egraph 6.0.0-alpha.0 → 6.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1544 +0,0 @@
1
-
2
- let wasm;
3
-
4
- const heap = new Array(32).fill(undefined);
5
-
6
- heap.push(undefined, null, true, false);
7
-
8
- let heap_next = heap.length;
9
-
10
- function addHeapObject(obj) {
11
- if (heap_next === heap.length) heap.push(heap.length + 1);
12
- const idx = heap_next;
13
- heap_next = heap[idx];
14
-
15
- heap[idx] = obj;
16
- return idx;
17
- }
18
-
19
- function getObject(idx) { return heap[idx]; }
20
-
21
- function dropObject(idx) {
22
- if (idx < 36) return;
23
- heap[idx] = heap_next;
24
- heap_next = idx;
25
- }
26
-
27
- function takeObject(idx) {
28
- const ret = getObject(idx);
29
- dropObject(idx);
30
- return ret;
31
- }
32
-
33
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
34
-
35
- cachedTextDecoder.decode();
36
-
37
- let cachegetUint8Memory0 = null;
38
- function getUint8Memory0() {
39
- if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
40
- cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
41
- }
42
- return cachegetUint8Memory0;
43
- }
44
-
45
- function getStringFromWasm0(ptr, len) {
46
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
47
- }
48
-
49
- function isLikeNone(x) {
50
- return x === undefined || x === null;
51
- }
52
-
53
- let cachegetFloat64Memory0 = null;
54
- function getFloat64Memory0() {
55
- if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
56
- cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
57
- }
58
- return cachegetFloat64Memory0;
59
- }
60
-
61
- let cachegetInt32Memory0 = null;
62
- function getInt32Memory0() {
63
- if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
64
- cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
65
- }
66
- return cachegetInt32Memory0;
67
- }
68
-
69
- let WASM_VECTOR_LEN = 0;
70
-
71
- let cachedTextEncoder = new TextEncoder('utf-8');
72
-
73
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
74
- ? function (arg, view) {
75
- return cachedTextEncoder.encodeInto(arg, view);
76
- }
77
- : function (arg, view) {
78
- const buf = cachedTextEncoder.encode(arg);
79
- view.set(buf);
80
- return {
81
- read: arg.length,
82
- written: buf.length
83
- };
84
- });
85
-
86
- function passStringToWasm0(arg, malloc, realloc) {
87
-
88
- if (realloc === undefined) {
89
- const buf = cachedTextEncoder.encode(arg);
90
- const ptr = malloc(buf.length);
91
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
92
- WASM_VECTOR_LEN = buf.length;
93
- return ptr;
94
- }
95
-
96
- let len = arg.length;
97
- let ptr = malloc(len);
98
-
99
- const mem = getUint8Memory0();
100
-
101
- let offset = 0;
102
-
103
- for (; offset < len; offset++) {
104
- const code = arg.charCodeAt(offset);
105
- if (code > 0x7F) break;
106
- mem[ptr + offset] = code;
107
- }
108
-
109
- if (offset !== len) {
110
- if (offset !== 0) {
111
- arg = arg.slice(offset);
112
- }
113
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
114
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
115
- const ret = encodeString(arg, view);
116
-
117
- offset += ret.written;
118
- }
119
-
120
- WASM_VECTOR_LEN = offset;
121
- return ptr;
122
- }
123
-
124
- function debugString(val) {
125
- // primitive types
126
- const type = typeof val;
127
- if (type == 'number' || type == 'boolean' || val == null) {
128
- return `${val}`;
129
- }
130
- if (type == 'string') {
131
- return `"${val}"`;
132
- }
133
- if (type == 'symbol') {
134
- const description = val.description;
135
- if (description == null) {
136
- return 'Symbol';
137
- } else {
138
- return `Symbol(${description})`;
139
- }
140
- }
141
- if (type == 'function') {
142
- const name = val.name;
143
- if (typeof name == 'string' && name.length > 0) {
144
- return `Function(${name})`;
145
- } else {
146
- return 'Function';
147
- }
148
- }
149
- // objects
150
- if (Array.isArray(val)) {
151
- const length = val.length;
152
- let debug = '[';
153
- if (length > 0) {
154
- debug += debugString(val[0]);
155
- }
156
- for(let i = 1; i < length; i++) {
157
- debug += ', ' + debugString(val[i]);
158
- }
159
- debug += ']';
160
- return debug;
161
- }
162
- // Test for built-in
163
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
164
- let className;
165
- if (builtInMatches.length > 1) {
166
- className = builtInMatches[1];
167
- } else {
168
- // Failed to match the standard '[object ClassName]'
169
- return toString.call(val);
170
- }
171
- if (className == 'Object') {
172
- // we're a user defined class or Object
173
- // JSON.stringify avoids problems with cycles, and is generally much
174
- // easier than looping through ownProperties of `val`.
175
- try {
176
- return 'Object(' + JSON.stringify(val) + ')';
177
- } catch (_) {
178
- return 'Object';
179
- }
180
- }
181
- // errors
182
- if (val instanceof Error) {
183
- return `${val.name}: ${val.message}\n${val.stack}`;
184
- }
185
- // TODO we could test for more things here, like `Set`s and `Map`s.
186
- return className;
187
- }
188
-
189
- function _assertClass(instance, klass) {
190
- if (!(instance instanceof klass)) {
191
- throw new Error(`expected instance of ${klass.name}`);
192
- }
193
- return instance.ptr;
194
- }
195
-
196
- let stack_pointer = 32;
197
-
198
- function addBorrowedObject(obj) {
199
- if (stack_pointer == 1) throw new Error('out of js stack');
200
- heap[--stack_pointer] = obj;
201
- return stack_pointer;
202
- }
203
- /**
204
- * @param {Graph} graph
205
- * @param {Function} groups
206
- * @param {Function} shrink_node
207
- * @param {Function} shrink_edge
208
- * @returns {any}
209
- */
210
- export function coarsen(graph, groups, shrink_node, shrink_edge) {
211
- try {
212
- _assertClass(graph, Graph);
213
- var ret = wasm.coarsen(graph.ptr, addBorrowedObject(groups), addBorrowedObject(shrink_node), addBorrowedObject(shrink_edge));
214
- return takeObject(ret);
215
- } finally {
216
- heap[stack_pointer++] = undefined;
217
- heap[stack_pointer++] = undefined;
218
- heap[stack_pointer++] = undefined;
219
- }
220
- }
221
-
222
- /**
223
- * @param {Graph} graph
224
- * @param {any} coordinates
225
- * @returns {any}
226
- */
227
- export function fdeb(graph, coordinates) {
228
- try {
229
- _assertClass(graph, Graph);
230
- var ret = wasm.fdeb(graph.ptr, addBorrowedObject(coordinates));
231
- return takeObject(ret);
232
- } finally {
233
- heap[stack_pointer++] = undefined;
234
- }
235
- }
236
-
237
- /**
238
- * @param {Graph} graph
239
- * @param {number} min_size
240
- * @param {number} step_iteration
241
- * @param {Function} _shrink_node
242
- * @param {Function} _shrink_edge
243
- * @param {Function} _link_distance_accessor
244
- * @returns {Coordinates}
245
- */
246
- export function fm3(graph, min_size, step_iteration, _shrink_node, _shrink_edge, _link_distance_accessor) {
247
- _assertClass(graph, Graph);
248
- var ret = wasm.fm3(graph.ptr, min_size, step_iteration, addHeapObject(_shrink_node), addHeapObject(_shrink_edge), addHeapObject(_link_distance_accessor));
249
- return Coordinates.__wrap(ret);
250
- }
251
-
252
- let cachegetFloat32Memory0 = null;
253
- function getFloat32Memory0() {
254
- if (cachegetFloat32Memory0 === null || cachegetFloat32Memory0.buffer !== wasm.memory.buffer) {
255
- cachegetFloat32Memory0 = new Float32Array(wasm.memory.buffer);
256
- }
257
- return cachegetFloat32Memory0;
258
- }
259
- /**
260
- * @param {Graph} graph
261
- * @param {Coordinates} coordinates
262
- * @param {Function} _length
263
- * @param {number} eps
264
- * @param {number} width
265
- * @param {number} height
266
- * @returns {any}
267
- */
268
- export function kamadaKawai(graph, coordinates, _length, eps, width, height) {
269
- _assertClass(graph, Graph);
270
- _assertClass(coordinates, Coordinates);
271
- var ret = wasm.kamadaKawai(graph.ptr, coordinates.ptr, addHeapObject(_length), eps, width, height);
272
- return takeObject(ret);
273
- }
274
-
275
- function handleError(f, args) {
276
- try {
277
- return f.apply(this, args);
278
- } catch (e) {
279
- wasm.__wbindgen_exn_store(addHeapObject(e));
280
- }
281
- }
282
- /**
283
- */
284
- export class CollideForce {
285
-
286
- static __wrap(ptr) {
287
- const obj = Object.create(CollideForce.prototype);
288
- obj.ptr = ptr;
289
-
290
- return obj;
291
- }
292
-
293
- __destroy_into_raw() {
294
- const ptr = this.ptr;
295
- this.ptr = 0;
296
-
297
- return ptr;
298
- }
299
-
300
- free() {
301
- const ptr = this.__destroy_into_raw();
302
- wasm.__wbg_collideforce_free(ptr);
303
- }
304
- /**
305
- * @param {Graph} graph
306
- * @param {Function} f
307
- * @param {any} options
308
- */
309
- constructor(graph, f, options) {
310
- try {
311
- _assertClass(graph, Graph);
312
- var ret = wasm.collideforce_new(graph.ptr, addBorrowedObject(f), addBorrowedObject(options));
313
- return CollideForce.__wrap(ret);
314
- } finally {
315
- heap[stack_pointer++] = undefined;
316
- heap[stack_pointer++] = undefined;
317
- }
318
- }
319
- /**
320
- * @param {Coordinates} context
321
- * @param {number} alpha
322
- */
323
- apply(context, alpha) {
324
- _assertClass(context, Coordinates);
325
- wasm.collideforce_apply(this.ptr, context.ptr, alpha);
326
- }
327
- }
328
- /**
329
- */
330
- export class Coordinates {
331
-
332
- static __wrap(ptr) {
333
- const obj = Object.create(Coordinates.prototype);
334
- obj.ptr = ptr;
335
-
336
- return obj;
337
- }
338
-
339
- __destroy_into_raw() {
340
- const ptr = this.ptr;
341
- this.ptr = 0;
342
-
343
- return ptr;
344
- }
345
-
346
- free() {
347
- const ptr = this.__destroy_into_raw();
348
- wasm.__wbg_coordinates_free(ptr);
349
- }
350
- /**
351
- * @param {number} u
352
- * @returns {number | undefined}
353
- */
354
- x(u) {
355
- try {
356
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
357
- wasm.coordinates_x(retptr, this.ptr, u);
358
- var r0 = getInt32Memory0()[retptr / 4 + 0];
359
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
360
- return r0 === 0 ? undefined : r1;
361
- } finally {
362
- wasm.__wbindgen_add_to_stack_pointer(16);
363
- }
364
- }
365
- /**
366
- * @param {number} u
367
- * @returns {number | undefined}
368
- */
369
- y(u) {
370
- try {
371
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
372
- wasm.coordinates_y(retptr, this.ptr, u);
373
- var r0 = getInt32Memory0()[retptr / 4 + 0];
374
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
375
- return r0 === 0 ? undefined : r1;
376
- } finally {
377
- wasm.__wbindgen_add_to_stack_pointer(16);
378
- }
379
- }
380
- /**
381
- * @param {number} u
382
- * @param {number} x
383
- */
384
- setX(u, x) {
385
- wasm.coordinates_setX(this.ptr, u, x);
386
- }
387
- /**
388
- * @param {number} u
389
- * @param {number} y
390
- */
391
- setY(u, y) {
392
- wasm.coordinates_setY(this.ptr, u, y);
393
- }
394
- /**
395
- * @param {number} u
396
- * @returns {number | undefined}
397
- */
398
- vx(u) {
399
- try {
400
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
401
- wasm.coordinates_vx(retptr, this.ptr, u);
402
- var r0 = getInt32Memory0()[retptr / 4 + 0];
403
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
404
- return r0 === 0 ? undefined : r1;
405
- } finally {
406
- wasm.__wbindgen_add_to_stack_pointer(16);
407
- }
408
- }
409
- /**
410
- * @param {number} u
411
- * @returns {number | undefined}
412
- */
413
- vy(u) {
414
- try {
415
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
416
- wasm.coordinates_vy(retptr, this.ptr, u);
417
- var r0 = getInt32Memory0()[retptr / 4 + 0];
418
- var r1 = getFloat32Memory0()[retptr / 4 + 1];
419
- return r0 === 0 ? undefined : r1;
420
- } finally {
421
- wasm.__wbindgen_add_to_stack_pointer(16);
422
- }
423
- }
424
- /**
425
- * @returns {number}
426
- */
427
- len() {
428
- var ret = wasm.coordinates_len(this.ptr);
429
- return ret >>> 0;
430
- }
431
- /**
432
- * @returns {any}
433
- */
434
- toJSON() {
435
- var ret = wasm.coordinates_toJSON(this.ptr);
436
- return takeObject(ret);
437
- }
438
- /**
439
- */
440
- centralize() {
441
- wasm.coordinates_centralize(this.ptr);
442
- }
443
- /**
444
- * @param {number} velocity_decay
445
- */
446
- updatePosition(velocity_decay) {
447
- wasm.coordinates_updatePosition(this.ptr, velocity_decay);
448
- }
449
- /**
450
- * @param {number} x0
451
- * @param {number} y0
452
- * @param {number} x1
453
- * @param {number} y1
454
- */
455
- clampRegion(x0, y0, x1, y1) {
456
- wasm.coordinates_clampRegion(this.ptr, x0, y0, x1, y1);
457
- }
458
- /**
459
- * @param {Graph} graph
460
- * @returns {Coordinates}
461
- */
462
- static initialPlacement(graph) {
463
- _assertClass(graph, Graph);
464
- var ret = wasm.coordinates_initialPlacement(graph.ptr);
465
- return Coordinates.__wrap(ret);
466
- }
467
- }
468
- /**
469
- */
470
- export class FruchtermanReingoldForce {
471
-
472
- static __wrap(ptr) {
473
- const obj = Object.create(FruchtermanReingoldForce.prototype);
474
- obj.ptr = ptr;
475
-
476
- return obj;
477
- }
478
-
479
- __destroy_into_raw() {
480
- const ptr = this.ptr;
481
- this.ptr = 0;
482
-
483
- return ptr;
484
- }
485
-
486
- free() {
487
- const ptr = this.__destroy_into_raw();
488
- wasm.__wbg_fruchtermanreingoldforce_free(ptr);
489
- }
490
- /**
491
- * @param {Graph} graph
492
- * @param {number} k
493
- * @param {number} min_distance
494
- */
495
- constructor(graph, k, min_distance) {
496
- _assertClass(graph, Graph);
497
- var ret = wasm.fruchtermanreingoldforce_new(graph.ptr, k, min_distance);
498
- return FruchtermanReingoldForce.__wrap(ret);
499
- }
500
- /**
501
- * @param {Coordinates} coordinates
502
- * @param {number} alpha
503
- */
504
- apply(coordinates, alpha) {
505
- _assertClass(coordinates, Coordinates);
506
- wasm.fruchtermanreingoldforce_apply(this.ptr, coordinates.ptr, alpha);
507
- }
508
- /**
509
- * @param {number} u
510
- * @param {Coordinates} coordinates
511
- * @param {number} alpha
512
- */
513
- applyToNode(u, coordinates, alpha) {
514
- _assertClass(coordinates, Coordinates);
515
- wasm.fruchtermanreingoldforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
516
- }
517
- }
518
- /**
519
- */
520
- export class Graph {
521
-
522
- static __wrap(ptr) {
523
- const obj = Object.create(Graph.prototype);
524
- obj.ptr = ptr;
525
-
526
- return obj;
527
- }
528
-
529
- __destroy_into_raw() {
530
- const ptr = this.ptr;
531
- this.ptr = 0;
532
-
533
- return ptr;
534
- }
535
-
536
- free() {
537
- const ptr = this.__destroy_into_raw();
538
- wasm.__wbg_graph_free(ptr);
539
- }
540
- /**
541
- */
542
- constructor() {
543
- var ret = wasm.graph_new();
544
- return Graph.__wrap(ret);
545
- }
546
- /**
547
- * @returns {number}
548
- */
549
- nodeCount() {
550
- var ret = wasm.graph_nodeCount(this.ptr);
551
- return ret >>> 0;
552
- }
553
- /**
554
- * @returns {number}
555
- */
556
- edgeCount() {
557
- var ret = wasm.graph_edgeCount(this.ptr);
558
- return ret >>> 0;
559
- }
560
- /**
561
- * @param {any} value
562
- * @returns {number}
563
- */
564
- addNode(value) {
565
- var ret = wasm.graph_addNode(this.ptr, addHeapObject(value));
566
- return ret >>> 0;
567
- }
568
- /**
569
- * @param {number} a
570
- * @returns {any}
571
- */
572
- nodeWeight(a) {
573
- var ret = wasm.graph_nodeWeight(this.ptr, a);
574
- return takeObject(ret);
575
- }
576
- /**
577
- * @param {number} a
578
- * @param {number} b
579
- * @param {any} value
580
- * @returns {number}
581
- */
582
- addEdge(a, b, value) {
583
- var ret = wasm.graph_addEdge(this.ptr, a, b, addHeapObject(value));
584
- return ret >>> 0;
585
- }
586
- /**
587
- * @param {number} e
588
- * @returns {any}
589
- */
590
- edgeWeight(e) {
591
- var ret = wasm.graph_edgeWeight(this.ptr, e);
592
- return takeObject(ret);
593
- }
594
- /**
595
- * @param {number} e
596
- * @returns {Array<any>}
597
- */
598
- edgeEndpoints(e) {
599
- var ret = wasm.graph_edgeEndpoints(this.ptr, e);
600
- return takeObject(ret);
601
- }
602
- /**
603
- * @param {number} a
604
- * @returns {any}
605
- */
606
- removeNode(a) {
607
- var ret = wasm.graph_removeNode(this.ptr, a);
608
- return takeObject(ret);
609
- }
610
- /**
611
- * @param {number} e
612
- * @returns {any}
613
- */
614
- removeEdge(e) {
615
- var ret = wasm.graph_removeEdge(this.ptr, e);
616
- return takeObject(ret);
617
- }
618
- /**
619
- * @param {number} a
620
- * @returns {Array<any>}
621
- */
622
- neighbors(a) {
623
- var ret = wasm.graph_neighbors(this.ptr, a);
624
- return takeObject(ret);
625
- }
626
- /**
627
- * @param {number} a
628
- * @param {number} dir
629
- * @returns {Array<any>}
630
- */
631
- neighborsDirected(a, dir) {
632
- var ret = wasm.graph_neighborsDirected(this.ptr, a, dir);
633
- return takeObject(ret);
634
- }
635
- /**
636
- * @param {number} a
637
- * @returns {Array<any>}
638
- */
639
- neighborsUndirected(a) {
640
- var ret = wasm.graph_neighborsUndirected(this.ptr, a);
641
- return takeObject(ret);
642
- }
643
- /**
644
- * @param {number} a
645
- * @returns {Array<any>}
646
- */
647
- edges(a) {
648
- var ret = wasm.graph_edges(this.ptr, a);
649
- return takeObject(ret);
650
- }
651
- /**
652
- * @param {number} a
653
- * @param {number} b
654
- * @returns {boolean}
655
- */
656
- containsEdge(a, b) {
657
- var ret = wasm.graph_containsEdge(this.ptr, a, b);
658
- return ret !== 0;
659
- }
660
- /**
661
- * @param {number} a
662
- * @param {number} b
663
- * @returns {number}
664
- */
665
- findEdge(a, b) {
666
- var ret = wasm.graph_findEdge(this.ptr, a, b);
667
- return ret >>> 0;
668
- }
669
- /**
670
- * @param {number} dir
671
- * @returns {Array<any>}
672
- */
673
- externals(dir) {
674
- var ret = wasm.graph_externals(this.ptr, dir);
675
- return takeObject(ret);
676
- }
677
- /**
678
- * @returns {Array<any>}
679
- */
680
- nodeIndices() {
681
- var ret = wasm.graph_nodeIndices(this.ptr);
682
- return takeObject(ret);
683
- }
684
- /**
685
- * @returns {Array<any>}
686
- */
687
- edgeIndices() {
688
- var ret = wasm.graph_edgeIndices(this.ptr);
689
- return takeObject(ret);
690
- }
691
- /**
692
- * @param {Function} node_map
693
- * @param {Function} edge_map
694
- * @returns {Graph}
695
- */
696
- map(node_map, edge_map) {
697
- try {
698
- var ret = wasm.graph_map(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
699
- return Graph.__wrap(ret);
700
- } finally {
701
- heap[stack_pointer++] = undefined;
702
- heap[stack_pointer++] = undefined;
703
- }
704
- }
705
- /**
706
- * @param {Function} node_map
707
- * @param {Function} edge_map
708
- * @returns {Graph}
709
- */
710
- filterMap(node_map, edge_map) {
711
- try {
712
- var ret = wasm.graph_filterMap(this.ptr, addBorrowedObject(node_map), addBorrowedObject(edge_map));
713
- return Graph.__wrap(ret);
714
- } finally {
715
- heap[stack_pointer++] = undefined;
716
- heap[stack_pointer++] = undefined;
717
- }
718
- }
719
- }
720
- /**
721
- */
722
- export class GroupLinkForce {
723
-
724
- static __wrap(ptr) {
725
- const obj = Object.create(GroupLinkForce.prototype);
726
- obj.ptr = ptr;
727
-
728
- return obj;
729
- }
730
-
731
- __destroy_into_raw() {
732
- const ptr = this.ptr;
733
- this.ptr = 0;
734
-
735
- return ptr;
736
- }
737
-
738
- free() {
739
- const ptr = this.__destroy_into_raw();
740
- wasm.__wbg_grouplinkforce_free(ptr);
741
- }
742
- /**
743
- * @param {Graph} graph
744
- * @param {Function} group_accessor
745
- * @param {Function} inter_link_accessor
746
- * @param {Function} intra_link_accessor
747
- */
748
- constructor(graph, group_accessor, inter_link_accessor, intra_link_accessor) {
749
- try {
750
- _assertClass(graph, Graph);
751
- var ret = wasm.grouplinkforce_new(graph.ptr, addBorrowedObject(group_accessor), addBorrowedObject(inter_link_accessor), addBorrowedObject(intra_link_accessor));
752
- return GroupLinkForce.__wrap(ret);
753
- } finally {
754
- heap[stack_pointer++] = undefined;
755
- heap[stack_pointer++] = undefined;
756
- heap[stack_pointer++] = undefined;
757
- }
758
- }
759
- /**
760
- * @param {Coordinates} coordinates
761
- * @param {number} alpha
762
- */
763
- apply(coordinates, alpha) {
764
- _assertClass(coordinates, Coordinates);
765
- wasm.grouplinkforce_apply(this.ptr, coordinates.ptr, alpha);
766
- }
767
- }
768
- /**
769
- */
770
- export class GroupManyBodyForce {
771
-
772
- static __wrap(ptr) {
773
- const obj = Object.create(GroupManyBodyForce.prototype);
774
- obj.ptr = ptr;
775
-
776
- return obj;
777
- }
778
-
779
- __destroy_into_raw() {
780
- const ptr = this.ptr;
781
- this.ptr = 0;
782
-
783
- return ptr;
784
- }
785
-
786
- free() {
787
- const ptr = this.__destroy_into_raw();
788
- wasm.__wbg_groupmanybodyforce_free(ptr);
789
- }
790
- /**
791
- * @param {Graph} graph
792
- * @param {Function} node_accessor
793
- */
794
- constructor(graph, node_accessor) {
795
- try {
796
- _assertClass(graph, Graph);
797
- var ret = wasm.groupmanybodyforce_new(graph.ptr, addBorrowedObject(node_accessor));
798
- return GroupManyBodyForce.__wrap(ret);
799
- } finally {
800
- heap[stack_pointer++] = undefined;
801
- }
802
- }
803
- /**
804
- * @param {Coordinates} coordinates
805
- * @param {number} alpha
806
- */
807
- apply(coordinates, alpha) {
808
- _assertClass(coordinates, Coordinates);
809
- wasm.groupmanybodyforce_apply(this.ptr, coordinates.ptr, alpha);
810
- }
811
- }
812
- /**
813
- */
814
- export class GroupPositionForce {
815
-
816
- static __wrap(ptr) {
817
- const obj = Object.create(GroupPositionForce.prototype);
818
- obj.ptr = ptr;
819
-
820
- return obj;
821
- }
822
-
823
- __destroy_into_raw() {
824
- const ptr = this.ptr;
825
- this.ptr = 0;
826
-
827
- return ptr;
828
- }
829
-
830
- free() {
831
- const ptr = this.__destroy_into_raw();
832
- wasm.__wbg_grouppositionforce_free(ptr);
833
- }
834
- /**
835
- * @param {Graph} graph
836
- * @param {Function} node_accessor
837
- * @param {Function} group_accessor
838
- */
839
- constructor(graph, node_accessor, group_accessor) {
840
- try {
841
- _assertClass(graph, Graph);
842
- var ret = wasm.grouppositionforce_new(graph.ptr, addBorrowedObject(node_accessor), addBorrowedObject(group_accessor));
843
- return GroupPositionForce.__wrap(ret);
844
- } finally {
845
- heap[stack_pointer++] = undefined;
846
- heap[stack_pointer++] = undefined;
847
- }
848
- }
849
- /**
850
- * @param {Coordinates} coordinates
851
- * @param {number} alpha
852
- */
853
- apply(coordinates, alpha) {
854
- _assertClass(coordinates, Coordinates);
855
- wasm.grouppositionforce_apply(this.ptr, coordinates.ptr, alpha);
856
- }
857
- }
858
- /**
859
- */
860
- export class HyperbolicSpace {
861
-
862
- __destroy_into_raw() {
863
- const ptr = this.ptr;
864
- this.ptr = 0;
865
-
866
- return ptr;
867
- }
868
-
869
- free() {
870
- const ptr = this.__destroy_into_raw();
871
- wasm.__wbg_hyperbolicspace_free(ptr);
872
- }
873
- /**
874
- * @param {any} a
875
- * @param {any} b
876
- * @returns {any}
877
- */
878
- static toTangentSpace(a, b) {
879
- var ret = wasm.hyperbolicspace_toTangentSpace(addHeapObject(a), addHeapObject(b));
880
- return takeObject(ret);
881
- }
882
- /**
883
- * @param {any} a
884
- * @param {any} b
885
- * @returns {any}
886
- */
887
- static fromTangentSpace(a, b) {
888
- var ret = wasm.hyperbolicspace_fromTangentSpace(addHeapObject(a), addHeapObject(b));
889
- return takeObject(ret);
890
- }
891
- /**
892
- * @param {number} i
893
- * @param {Coordinates} riemann_space
894
- * @param {Coordinates} tangent_space
895
- */
896
- static mapToTangentSpace(i, riemann_space, tangent_space) {
897
- _assertClass(riemann_space, Coordinates);
898
- _assertClass(tangent_space, Coordinates);
899
- wasm.hyperbolicspace_mapToTangentSpace(i, riemann_space.ptr, tangent_space.ptr);
900
- }
901
- /**
902
- * @param {number} i
903
- * @param {Coordinates} riemann_space
904
- * @param {Coordinates} tangent_space
905
- * @param {number} velocity_decay
906
- */
907
- static updatePosition(i, riemann_space, tangent_space, velocity_decay) {
908
- _assertClass(riemann_space, Coordinates);
909
- _assertClass(tangent_space, Coordinates);
910
- wasm.hyperbolicspace_updatePosition(i, riemann_space.ptr, tangent_space.ptr, velocity_decay);
911
- }
912
- }
913
- /**
914
- */
915
- export class KamadaKawai {
916
-
917
- static __wrap(ptr) {
918
- const obj = Object.create(KamadaKawai.prototype);
919
- obj.ptr = ptr;
920
-
921
- return obj;
922
- }
923
-
924
- __destroy_into_raw() {
925
- const ptr = this.ptr;
926
- this.ptr = 0;
927
-
928
- return ptr;
929
- }
930
-
931
- free() {
932
- const ptr = this.__destroy_into_raw();
933
- wasm.__wbg_kamadakawai_free(ptr);
934
- }
935
- /**
936
- * @param {Graph} graph
937
- * @param {Function} f
938
- */
939
- constructor(graph, f) {
940
- try {
941
- _assertClass(graph, Graph);
942
- var ret = wasm.kamadakawai_new(graph.ptr, addBorrowedObject(f));
943
- return KamadaKawai.__wrap(ret);
944
- } finally {
945
- heap[stack_pointer++] = undefined;
946
- }
947
- }
948
- /**
949
- * @param {Coordinates} coordinates
950
- * @returns {number | undefined}
951
- */
952
- selectNode(coordinates) {
953
- try {
954
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
955
- _assertClass(coordinates, Coordinates);
956
- wasm.kamadakawai_selectNode(retptr, this.ptr, coordinates.ptr);
957
- var r0 = getInt32Memory0()[retptr / 4 + 0];
958
- var r1 = getInt32Memory0()[retptr / 4 + 1];
959
- return r0 === 0 ? undefined : r1 >>> 0;
960
- } finally {
961
- wasm.__wbindgen_add_to_stack_pointer(16);
962
- }
963
- }
964
- /**
965
- * @param {number} m
966
- * @param {Coordinates} coordinates
967
- */
968
- applyToNode(m, coordinates) {
969
- _assertClass(coordinates, Coordinates);
970
- wasm.kamadakawai_applyToNode(this.ptr, m, coordinates.ptr);
971
- }
972
- /**
973
- * @param {Coordinates} coordinates
974
- */
975
- run(coordinates) {
976
- _assertClass(coordinates, Coordinates);
977
- wasm.kamadakawai_run(this.ptr, coordinates.ptr);
978
- }
979
- }
980
- /**
981
- */
982
- export class LinkForce {
983
-
984
- static __wrap(ptr) {
985
- const obj = Object.create(LinkForce.prototype);
986
- obj.ptr = ptr;
987
-
988
- return obj;
989
- }
990
-
991
- __destroy_into_raw() {
992
- const ptr = this.ptr;
993
- this.ptr = 0;
994
-
995
- return ptr;
996
- }
997
-
998
- free() {
999
- const ptr = this.__destroy_into_raw();
1000
- wasm.__wbg_linkforce_free(ptr);
1001
- }
1002
- /**
1003
- * @param {Graph} graph
1004
- * @param {Function} f
1005
- */
1006
- constructor(graph, f) {
1007
- try {
1008
- _assertClass(graph, Graph);
1009
- var ret = wasm.linkforce_new(graph.ptr, addBorrowedObject(f));
1010
- return LinkForce.__wrap(ret);
1011
- } finally {
1012
- heap[stack_pointer++] = undefined;
1013
- }
1014
- }
1015
- /**
1016
- * @param {Coordinates} coordinates
1017
- * @param {number} alpha
1018
- */
1019
- apply(coordinates, alpha) {
1020
- _assertClass(coordinates, Coordinates);
1021
- wasm.linkforce_apply(this.ptr, coordinates.ptr, alpha);
1022
- }
1023
- /**
1024
- * @param {number} u
1025
- * @param {Coordinates} coordinates
1026
- * @param {number} alpha
1027
- */
1028
- applyToNode(u, coordinates, alpha) {
1029
- _assertClass(coordinates, Coordinates);
1030
- wasm.linkforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1031
- }
1032
- }
1033
- /**
1034
- */
1035
- export class ManyBodyForce {
1036
-
1037
- static __wrap(ptr) {
1038
- const obj = Object.create(ManyBodyForce.prototype);
1039
- obj.ptr = ptr;
1040
-
1041
- return obj;
1042
- }
1043
-
1044
- __destroy_into_raw() {
1045
- const ptr = this.ptr;
1046
- this.ptr = 0;
1047
-
1048
- return ptr;
1049
- }
1050
-
1051
- free() {
1052
- const ptr = this.__destroy_into_raw();
1053
- wasm.__wbg_manybodyforce_free(ptr);
1054
- }
1055
- /**
1056
- * @param {Graph} graph
1057
- * @param {Function} f
1058
- */
1059
- constructor(graph, f) {
1060
- try {
1061
- _assertClass(graph, Graph);
1062
- var ret = wasm.manybodyforce_new(graph.ptr, addBorrowedObject(f));
1063
- return ManyBodyForce.__wrap(ret);
1064
- } finally {
1065
- heap[stack_pointer++] = undefined;
1066
- }
1067
- }
1068
- /**
1069
- * @param {Coordinates} coordinates
1070
- * @param {number} alpha
1071
- */
1072
- apply(coordinates, alpha) {
1073
- _assertClass(coordinates, Coordinates);
1074
- wasm.manybodyforce_apply(this.ptr, coordinates.ptr, alpha);
1075
- }
1076
- /**
1077
- * @param {number} u
1078
- * @param {Coordinates} coordinates
1079
- * @param {number} alpha
1080
- */
1081
- applyToNode(u, coordinates, alpha) {
1082
- _assertClass(coordinates, Coordinates);
1083
- wasm.manybodyforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1084
- }
1085
- }
1086
- /**
1087
- */
1088
- export class PositionForce {
1089
-
1090
- static __wrap(ptr) {
1091
- const obj = Object.create(PositionForce.prototype);
1092
- obj.ptr = ptr;
1093
-
1094
- return obj;
1095
- }
1096
-
1097
- __destroy_into_raw() {
1098
- const ptr = this.ptr;
1099
- this.ptr = 0;
1100
-
1101
- return ptr;
1102
- }
1103
-
1104
- free() {
1105
- const ptr = this.__destroy_into_raw();
1106
- wasm.__wbg_positionforce_free(ptr);
1107
- }
1108
- /**
1109
- * @param {Graph} graph
1110
- * @param {Function} f
1111
- */
1112
- constructor(graph, f) {
1113
- try {
1114
- _assertClass(graph, Graph);
1115
- var ret = wasm.positionforce_new(graph.ptr, addBorrowedObject(f));
1116
- return PositionForce.__wrap(ret);
1117
- } finally {
1118
- heap[stack_pointer++] = undefined;
1119
- }
1120
- }
1121
- /**
1122
- * @param {Coordinates} coordinates
1123
- * @param {number} alpha
1124
- */
1125
- apply(coordinates, alpha) {
1126
- _assertClass(coordinates, Coordinates);
1127
- wasm.positionforce_apply(this.ptr, coordinates.ptr, alpha);
1128
- }
1129
- /**
1130
- * @param {number} u
1131
- * @param {Coordinates} coordinates
1132
- * @param {number} alpha
1133
- */
1134
- applyToNode(u, coordinates, alpha) {
1135
- _assertClass(coordinates, Coordinates);
1136
- wasm.positionforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1137
- }
1138
- }
1139
- /**
1140
- */
1141
- export class RadialForce {
1142
-
1143
- static __wrap(ptr) {
1144
- const obj = Object.create(RadialForce.prototype);
1145
- obj.ptr = ptr;
1146
-
1147
- return obj;
1148
- }
1149
-
1150
- __destroy_into_raw() {
1151
- const ptr = this.ptr;
1152
- this.ptr = 0;
1153
-
1154
- return ptr;
1155
- }
1156
-
1157
- free() {
1158
- const ptr = this.__destroy_into_raw();
1159
- wasm.__wbg_radialforce_free(ptr);
1160
- }
1161
- /**
1162
- * @param {Graph} graph
1163
- * @param {Function} f
1164
- */
1165
- constructor(graph, f) {
1166
- _assertClass(graph, Graph);
1167
- var ret = wasm.radialforce_new(graph.ptr, addHeapObject(f));
1168
- return RadialForce.__wrap(ret);
1169
- }
1170
- /**
1171
- * @param {Coordinates} coordinates
1172
- * @param {number} alpha
1173
- */
1174
- apply(coordinates, alpha) {
1175
- _assertClass(coordinates, Coordinates);
1176
- wasm.radialforce_apply(this.ptr, coordinates.ptr, alpha);
1177
- }
1178
- /**
1179
- * @param {number} u
1180
- * @param {Coordinates} coordinates
1181
- * @param {number} alpha
1182
- */
1183
- applyToNode(u, coordinates, alpha) {
1184
- _assertClass(coordinates, Coordinates);
1185
- wasm.radialforce_applyToNode(this.ptr, u, coordinates.ptr, alpha);
1186
- }
1187
- }
1188
- /**
1189
- */
1190
- export class Simulation {
1191
-
1192
- static __wrap(ptr) {
1193
- const obj = Object.create(Simulation.prototype);
1194
- obj.ptr = ptr;
1195
-
1196
- return obj;
1197
- }
1198
-
1199
- __destroy_into_raw() {
1200
- const ptr = this.ptr;
1201
- this.ptr = 0;
1202
-
1203
- return ptr;
1204
- }
1205
-
1206
- free() {
1207
- const ptr = this.__destroy_into_raw();
1208
- wasm.__wbg_simulation_free(ptr);
1209
- }
1210
- /**
1211
- */
1212
- constructor() {
1213
- var ret = wasm.simulation_new();
1214
- return Simulation.__wrap(ret);
1215
- }
1216
- /**
1217
- * @param {Function} f
1218
- */
1219
- run(f) {
1220
- try {
1221
- wasm.simulation_run(this.ptr, addBorrowedObject(f));
1222
- } finally {
1223
- heap[stack_pointer++] = undefined;
1224
- }
1225
- }
1226
- /**
1227
- * @param {number} n
1228
- * @param {Function} f
1229
- */
1230
- runStep(n, f) {
1231
- try {
1232
- wasm.simulation_runStep(this.ptr, n, addBorrowedObject(f));
1233
- } finally {
1234
- heap[stack_pointer++] = undefined;
1235
- }
1236
- }
1237
- /**
1238
- * @returns {boolean}
1239
- */
1240
- isFinished() {
1241
- var ret = wasm.simulation_isFinished(this.ptr);
1242
- return ret !== 0;
1243
- }
1244
- /**
1245
- * @param {number} alpha_start
1246
- */
1247
- reset(alpha_start) {
1248
- wasm.simulation_reset(this.ptr, alpha_start);
1249
- }
1250
- /**
1251
- * @returns {number}
1252
- */
1253
- get alphaStart() {
1254
- var ret = wasm.simulation_alpha(this.ptr);
1255
- return ret;
1256
- }
1257
- /**
1258
- * @param {number} value
1259
- */
1260
- set alphaStart(value) {
1261
- wasm.simulation_set_alpha(this.ptr, value);
1262
- }
1263
- /**
1264
- * @returns {number}
1265
- */
1266
- get alphaMin() {
1267
- var ret = wasm.simulation_alpha_min(this.ptr);
1268
- return ret;
1269
- }
1270
- /**
1271
- * @param {number} value
1272
- */
1273
- set alphaMin(value) {
1274
- wasm.simulation_set_alpha_min(this.ptr, value);
1275
- }
1276
- /**
1277
- * @returns {number}
1278
- */
1279
- get alphaTarget() {
1280
- var ret = wasm.simulation_alpha_target(this.ptr);
1281
- return ret;
1282
- }
1283
- /**
1284
- * @param {number} value
1285
- */
1286
- set alphaTarget(value) {
1287
- wasm.simulation_set_alpha_target(this.ptr, value);
1288
- }
1289
- /**
1290
- * @returns {number}
1291
- */
1292
- get iterations() {
1293
- var ret = wasm.simulation_iterations(this.ptr);
1294
- return ret >>> 0;
1295
- }
1296
- /**
1297
- * @param {number} value
1298
- */
1299
- set iterations(value) {
1300
- wasm.simulation_set_iterations(this.ptr, value);
1301
- }
1302
- }
1303
- /**
1304
- */
1305
- export class SphericalSpace {
1306
-
1307
- __destroy_into_raw() {
1308
- const ptr = this.ptr;
1309
- this.ptr = 0;
1310
-
1311
- return ptr;
1312
- }
1313
-
1314
- free() {
1315
- const ptr = this.__destroy_into_raw();
1316
- wasm.__wbg_sphericalspace_free(ptr);
1317
- }
1318
- /**
1319
- * @param {any} a
1320
- * @param {any} b
1321
- * @returns {any}
1322
- */
1323
- static toTangentSpace(a, b) {
1324
- var ret = wasm.sphericalspace_toTangentSpace(addHeapObject(a), addHeapObject(b));
1325
- return takeObject(ret);
1326
- }
1327
- /**
1328
- * @param {any} a
1329
- * @param {any} b
1330
- * @returns {any}
1331
- */
1332
- static fromTangentSpace(a, b) {
1333
- var ret = wasm.sphericalspace_fromTangentSpace(addHeapObject(a), addHeapObject(b));
1334
- return takeObject(ret);
1335
- }
1336
- /**
1337
- * @param {number} i
1338
- * @param {Coordinates} riemann_space
1339
- * @param {Coordinates} tangent_space
1340
- */
1341
- static mapToTangentSpace(i, riemann_space, tangent_space) {
1342
- _assertClass(riemann_space, Coordinates);
1343
- _assertClass(tangent_space, Coordinates);
1344
- wasm.sphericalspace_mapToTangentSpace(i, riemann_space.ptr, tangent_space.ptr);
1345
- }
1346
- /**
1347
- * @param {number} i
1348
- * @param {Coordinates} riemann_space
1349
- * @param {Coordinates} tangent_space
1350
- * @param {number} velocity_decay
1351
- */
1352
- static updatePosition(i, riemann_space, tangent_space, velocity_decay) {
1353
- _assertClass(riemann_space, Coordinates);
1354
- _assertClass(tangent_space, Coordinates);
1355
- wasm.sphericalspace_updatePosition(i, riemann_space.ptr, tangent_space.ptr, velocity_decay);
1356
- }
1357
- }
1358
- /**
1359
- */
1360
- export class StressMajorization {
1361
-
1362
- static __wrap(ptr) {
1363
- const obj = Object.create(StressMajorization.prototype);
1364
- obj.ptr = ptr;
1365
-
1366
- return obj;
1367
- }
1368
-
1369
- __destroy_into_raw() {
1370
- const ptr = this.ptr;
1371
- this.ptr = 0;
1372
-
1373
- return ptr;
1374
- }
1375
-
1376
- free() {
1377
- const ptr = this.__destroy_into_raw();
1378
- wasm.__wbg_stressmajorization_free(ptr);
1379
- }
1380
- /**
1381
- * @param {Graph} graph
1382
- * @param {Coordinates} coordinates
1383
- * @param {Function} f
1384
- */
1385
- constructor(graph, coordinates, f) {
1386
- try {
1387
- _assertClass(graph, Graph);
1388
- _assertClass(coordinates, Coordinates);
1389
- var ret = wasm.stressmajorization_new(graph.ptr, coordinates.ptr, addBorrowedObject(f));
1390
- return StressMajorization.__wrap(ret);
1391
- } finally {
1392
- heap[stack_pointer++] = undefined;
1393
- }
1394
- }
1395
- /**
1396
- * @param {Coordinates} coordinates
1397
- * @returns {number}
1398
- */
1399
- apply(coordinates) {
1400
- _assertClass(coordinates, Coordinates);
1401
- var ret = wasm.stressmajorization_apply(this.ptr, coordinates.ptr);
1402
- return ret;
1403
- }
1404
- /**
1405
- * @param {Coordinates} coordinates
1406
- */
1407
- run(coordinates) {
1408
- _assertClass(coordinates, Coordinates);
1409
- wasm.stressmajorization_run(this.ptr, coordinates.ptr);
1410
- }
1411
- }
1412
-
1413
- async function load(module, imports) {
1414
- if (typeof Response === 'function' && module instanceof Response) {
1415
- if (typeof WebAssembly.instantiateStreaming === 'function') {
1416
- try {
1417
- return await WebAssembly.instantiateStreaming(module, imports);
1418
-
1419
- } catch (e) {
1420
- if (module.headers.get('Content-Type') != 'application/wasm') {
1421
- 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);
1422
-
1423
- } else {
1424
- throw e;
1425
- }
1426
- }
1427
- }
1428
-
1429
- const bytes = await module.arrayBuffer();
1430
- return await WebAssembly.instantiate(bytes, imports);
1431
-
1432
- } else {
1433
- const instance = await WebAssembly.instantiate(module, imports);
1434
-
1435
- if (instance instanceof WebAssembly.Instance) {
1436
- return { instance, module };
1437
-
1438
- } else {
1439
- return instance;
1440
- }
1441
- }
1442
- }
1443
-
1444
- async function init(input) {
1445
- if (typeof input === 'undefined') {
1446
- input = new URL('egraph_wasm_bg.wasm', import.meta.url);
1447
- }
1448
- const imports = {};
1449
- imports.wbg = {};
1450
- imports.wbg.__wbindgen_number_new = function(arg0) {
1451
- var ret = arg0;
1452
- return addHeapObject(ret);
1453
- };
1454
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1455
- takeObject(arg0);
1456
- };
1457
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1458
- var ret = getStringFromWasm0(arg0, arg1);
1459
- return addHeapObject(ret);
1460
- };
1461
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
1462
- const obj = getObject(arg1);
1463
- var ret = typeof(obj) === 'number' ? obj : undefined;
1464
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
1465
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
1466
- };
1467
- imports.wbg.__wbg_graph_new = function(arg0) {
1468
- var ret = Graph.__wrap(arg0);
1469
- return addHeapObject(ret);
1470
- };
1471
- imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
1472
- var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
1473
- return addHeapObject(ret);
1474
- };
1475
- imports.wbg.__wbindgen_is_null = function(arg0) {
1476
- var ret = getObject(arg0) === null;
1477
- return ret;
1478
- };
1479
- imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
1480
- const obj = getObject(arg1);
1481
- var ret = JSON.stringify(obj === undefined ? null : obj);
1482
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1483
- var len0 = WASM_VECTOR_LEN;
1484
- getInt32Memory0()[arg0 / 4 + 1] = len0;
1485
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
1486
- };
1487
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1488
- var ret = getObject(arg0);
1489
- return addHeapObject(ret);
1490
- };
1491
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
1492
- var ret = getObject(arg0) === undefined;
1493
- return ret;
1494
- };
1495
- imports.wbg.__wbg_get_800098c980b31ea2 = function() { return handleError(function (arg0, arg1) {
1496
- var ret = Reflect.get(getObject(arg0), getObject(arg1));
1497
- return addHeapObject(ret);
1498
- }, arguments) };
1499
- imports.wbg.__wbg_new_515b65a8e7699d00 = function() {
1500
- var ret = new Array();
1501
- return addHeapObject(ret);
1502
- };
1503
- imports.wbg.__wbg_push_b7f68478f81d358b = function(arg0, arg1) {
1504
- var ret = getObject(arg0).push(getObject(arg1));
1505
- return ret;
1506
- };
1507
- imports.wbg.__wbg_call_3fc07b7d5fc9022d = function() { return handleError(function (arg0, arg1, arg2) {
1508
- var ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1509
- return addHeapObject(ret);
1510
- }, arguments) };
1511
- imports.wbg.__wbg_call_2c06c503c0d359bd = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1512
- var ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
1513
- return addHeapObject(ret);
1514
- }, arguments) };
1515
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
1516
- var ret = debugString(getObject(arg1));
1517
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1518
- var len0 = WASM_VECTOR_LEN;
1519
- getInt32Memory0()[arg0 / 4 + 1] = len0;
1520
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
1521
- };
1522
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1523
- throw new Error(getStringFromWasm0(arg0, arg1));
1524
- };
1525
- imports.wbg.__wbindgen_rethrow = function(arg0) {
1526
- throw takeObject(arg0);
1527
- };
1528
-
1529
- if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
1530
- input = fetch(input);
1531
- }
1532
-
1533
-
1534
-
1535
- const { instance, module } = await load(await input, imports);
1536
-
1537
- wasm = instance.exports;
1538
- init.__wbindgen_wasm_module = module;
1539
-
1540
- return wasm;
1541
- }
1542
-
1543
- export default init;
1544
-