@wiscale/velesdb-wasm 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/velesdb_wasm.d.ts +207 -5
- package/velesdb_wasm.js +558 -13
- package/velesdb_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/velesdb_wasm.d.ts
CHANGED
|
@@ -1,6 +1,173 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
export class GraphEdge {
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
/**
|
|
8
|
+
* Sets a numeric property on the edge.
|
|
9
|
+
*/
|
|
10
|
+
set_number_property(key: string, value: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Sets a string property on the edge.
|
|
13
|
+
*/
|
|
14
|
+
set_string_property(key: string, value: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new graph edge.
|
|
17
|
+
*
|
|
18
|
+
* # Arguments
|
|
19
|
+
*
|
|
20
|
+
* * `id` - Unique identifier for the edge
|
|
21
|
+
* * `source` - Source node ID
|
|
22
|
+
* * `target` - Target node ID
|
|
23
|
+
* * `label` - Relationship type (e.g., "KNOWS", "WROTE")
|
|
24
|
+
*/
|
|
25
|
+
constructor(id: bigint, source: bigint, target: bigint, label: string);
|
|
26
|
+
/**
|
|
27
|
+
* Converts to JSON for JavaScript interop.
|
|
28
|
+
*/
|
|
29
|
+
to_json(): any;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the edge ID.
|
|
32
|
+
*/
|
|
33
|
+
readonly id: bigint;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the edge label (relationship type).
|
|
36
|
+
*/
|
|
37
|
+
readonly label: string;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the source node ID.
|
|
40
|
+
*/
|
|
41
|
+
readonly source: bigint;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the target node ID.
|
|
44
|
+
*/
|
|
45
|
+
readonly target: bigint;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class GraphNode {
|
|
49
|
+
free(): void;
|
|
50
|
+
[Symbol.dispose](): void;
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if this node has a vector embedding.
|
|
53
|
+
*/
|
|
54
|
+
has_vector(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Sets a vector embedding on the node.
|
|
57
|
+
*/
|
|
58
|
+
set_vector(vector: Float32Array): void;
|
|
59
|
+
/**
|
|
60
|
+
* Sets a boolean property on the node.
|
|
61
|
+
*/
|
|
62
|
+
set_bool_property(key: string, value: boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* Sets a numeric property on the node.
|
|
65
|
+
*/
|
|
66
|
+
set_number_property(key: string, value: number): void;
|
|
67
|
+
/**
|
|
68
|
+
* Sets a string property on the node.
|
|
69
|
+
*/
|
|
70
|
+
set_string_property(key: string, value: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Creates a new graph node.
|
|
73
|
+
*
|
|
74
|
+
* # Arguments
|
|
75
|
+
*
|
|
76
|
+
* * `id` - Unique identifier for the node
|
|
77
|
+
* * `label` - Node type/label (e.g., "Person", "Document")
|
|
78
|
+
*/
|
|
79
|
+
constructor(id: bigint, label: string);
|
|
80
|
+
/**
|
|
81
|
+
* Converts to JSON for JavaScript interop.
|
|
82
|
+
*/
|
|
83
|
+
to_json(): any;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the node ID.
|
|
86
|
+
*/
|
|
87
|
+
readonly id: bigint;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the node label.
|
|
90
|
+
*/
|
|
91
|
+
readonly label: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export class GraphStore {
|
|
95
|
+
free(): void;
|
|
96
|
+
[Symbol.dispose](): void;
|
|
97
|
+
/**
|
|
98
|
+
* Removes an edge by ID.
|
|
99
|
+
*/
|
|
100
|
+
remove_edge(edge_id: bigint): void;
|
|
101
|
+
/**
|
|
102
|
+
* Removes a node and all connected edges.
|
|
103
|
+
*/
|
|
104
|
+
remove_node(node_id: bigint): void;
|
|
105
|
+
/**
|
|
106
|
+
* Performs BFS traversal from a source node.
|
|
107
|
+
*
|
|
108
|
+
* # Arguments
|
|
109
|
+
*
|
|
110
|
+
* * `source_id` - Starting node ID
|
|
111
|
+
* * `max_depth` - Maximum traversal depth
|
|
112
|
+
* * `limit` - Maximum number of results
|
|
113
|
+
*
|
|
114
|
+
* # Returns
|
|
115
|
+
*
|
|
116
|
+
* Array of reachable node IDs with their depths.
|
|
117
|
+
*/
|
|
118
|
+
bfs_traverse(source_id: bigint, max_depth: number, limit: number): any;
|
|
119
|
+
/**
|
|
120
|
+
* Gets incoming edges to a node.
|
|
121
|
+
*/
|
|
122
|
+
get_incoming(node_id: bigint): GraphEdge[];
|
|
123
|
+
/**
|
|
124
|
+
* Gets outgoing edges from a node.
|
|
125
|
+
*/
|
|
126
|
+
get_outgoing(node_id: bigint): GraphEdge[];
|
|
127
|
+
/**
|
|
128
|
+
* Gets neighbors reachable from a node (1-hop).
|
|
129
|
+
*/
|
|
130
|
+
get_neighbors(node_id: bigint): BigUint64Array;
|
|
131
|
+
/**
|
|
132
|
+
* Gets outgoing edges filtered by label.
|
|
133
|
+
*/
|
|
134
|
+
get_outgoing_by_label(node_id: bigint, label: string): GraphEdge[];
|
|
135
|
+
/**
|
|
136
|
+
* Creates a new empty graph store.
|
|
137
|
+
*/
|
|
138
|
+
constructor();
|
|
139
|
+
/**
|
|
140
|
+
* Clears all nodes and edges.
|
|
141
|
+
*/
|
|
142
|
+
clear(): void;
|
|
143
|
+
/**
|
|
144
|
+
* Adds an edge to the graph.
|
|
145
|
+
*
|
|
146
|
+
* Returns an error if an edge with the same ID already exists.
|
|
147
|
+
*/
|
|
148
|
+
add_edge(edge: GraphEdge): void;
|
|
149
|
+
/**
|
|
150
|
+
* Adds a node to the graph.
|
|
151
|
+
*/
|
|
152
|
+
add_node(node: GraphNode): void;
|
|
153
|
+
/**
|
|
154
|
+
* Gets an edge by ID.
|
|
155
|
+
*/
|
|
156
|
+
get_edge(id: bigint): GraphEdge | undefined;
|
|
157
|
+
/**
|
|
158
|
+
* Gets a node by ID.
|
|
159
|
+
*/
|
|
160
|
+
get_node(id: bigint): GraphNode | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* Returns the number of edges.
|
|
163
|
+
*/
|
|
164
|
+
readonly edge_count: number;
|
|
165
|
+
/**
|
|
166
|
+
* Returns the number of nodes.
|
|
167
|
+
*/
|
|
168
|
+
readonly node_count: number;
|
|
169
|
+
}
|
|
170
|
+
|
|
4
171
|
/**
|
|
5
172
|
* Storage mode for vector quantization.
|
|
6
173
|
*/
|
|
@@ -370,7 +537,41 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
370
537
|
|
|
371
538
|
export interface InitOutput {
|
|
372
539
|
readonly memory: WebAssembly.Memory;
|
|
540
|
+
readonly __wbg_graphedge_free: (a: number, b: number) => void;
|
|
541
|
+
readonly __wbg_graphnode_free: (a: number, b: number) => void;
|
|
542
|
+
readonly __wbg_graphstore_free: (a: number, b: number) => void;
|
|
373
543
|
readonly __wbg_vectorstore_free: (a: number, b: number) => void;
|
|
544
|
+
readonly graphedge_id: (a: number) => bigint;
|
|
545
|
+
readonly graphedge_label: (a: number, b: number) => void;
|
|
546
|
+
readonly graphedge_new: (a: number, b: bigint, c: bigint, d: bigint, e: number, f: number) => void;
|
|
547
|
+
readonly graphedge_set_number_property: (a: number, b: number, c: number, d: number) => void;
|
|
548
|
+
readonly graphedge_set_string_property: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
549
|
+
readonly graphedge_source: (a: number) => bigint;
|
|
550
|
+
readonly graphedge_target: (a: number) => bigint;
|
|
551
|
+
readonly graphedge_to_json: (a: number, b: number) => void;
|
|
552
|
+
readonly graphnode_has_vector: (a: number) => number;
|
|
553
|
+
readonly graphnode_label: (a: number, b: number) => void;
|
|
554
|
+
readonly graphnode_new: (a: bigint, b: number, c: number) => number;
|
|
555
|
+
readonly graphnode_set_bool_property: (a: number, b: number, c: number, d: number) => void;
|
|
556
|
+
readonly graphnode_set_number_property: (a: number, b: number, c: number, d: number) => void;
|
|
557
|
+
readonly graphnode_set_string_property: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
558
|
+
readonly graphnode_set_vector: (a: number, b: number, c: number) => void;
|
|
559
|
+
readonly graphnode_to_json: (a: number, b: number) => void;
|
|
560
|
+
readonly graphstore_add_edge: (a: number, b: number, c: number) => void;
|
|
561
|
+
readonly graphstore_add_node: (a: number, b: number) => void;
|
|
562
|
+
readonly graphstore_bfs_traverse: (a: number, b: number, c: bigint, d: number, e: number) => void;
|
|
563
|
+
readonly graphstore_clear: (a: number) => void;
|
|
564
|
+
readonly graphstore_edge_count: (a: number) => number;
|
|
565
|
+
readonly graphstore_get_edge: (a: number, b: bigint) => number;
|
|
566
|
+
readonly graphstore_get_incoming: (a: number, b: number, c: bigint) => void;
|
|
567
|
+
readonly graphstore_get_neighbors: (a: number, b: number, c: bigint) => void;
|
|
568
|
+
readonly graphstore_get_node: (a: number, b: bigint) => number;
|
|
569
|
+
readonly graphstore_get_outgoing: (a: number, b: number, c: bigint) => void;
|
|
570
|
+
readonly graphstore_get_outgoing_by_label: (a: number, b: number, c: bigint, d: number, e: number) => void;
|
|
571
|
+
readonly graphstore_new: () => number;
|
|
572
|
+
readonly graphstore_node_count: (a: number) => number;
|
|
573
|
+
readonly graphstore_remove_edge: (a: number, b: bigint) => void;
|
|
574
|
+
readonly graphstore_remove_node: (a: number, b: bigint) => void;
|
|
374
575
|
readonly vectorstore_batch_search: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
375
576
|
readonly vectorstore_clear: (a: number) => void;
|
|
376
577
|
readonly vectorstore_delete_database: (a: number, b: number) => number;
|
|
@@ -399,11 +600,12 @@ export interface InitOutput {
|
|
|
399
600
|
readonly vectorstore_storage_mode: (a: number, b: number) => void;
|
|
400
601
|
readonly vectorstore_text_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
401
602
|
readonly vectorstore_with_capacity: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
402
|
-
readonly
|
|
403
|
-
readonly
|
|
404
|
-
readonly
|
|
405
|
-
readonly
|
|
406
|
-
readonly
|
|
603
|
+
readonly graphnode_id: (a: number) => bigint;
|
|
604
|
+
readonly __wasm_bindgen_func_elem_612: (a: number, b: number, c: number) => void;
|
|
605
|
+
readonly __wasm_bindgen_func_elem_611: (a: number, b: number) => void;
|
|
606
|
+
readonly __wasm_bindgen_func_elem_184: (a: number, b: number, c: number) => void;
|
|
607
|
+
readonly __wasm_bindgen_func_elem_183: (a: number, b: number) => void;
|
|
608
|
+
readonly __wasm_bindgen_func_elem_661: (a: number, b: number, c: number, d: number) => void;
|
|
407
609
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
408
610
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
409
611
|
readonly __wbindgen_export3: (a: number) => void;
|
package/velesdb_wasm.js
CHANGED
|
@@ -9,6 +9,12 @@ function addHeapObject(obj) {
|
|
|
9
9
|
return idx;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
function _assertClass(instance, klass) {
|
|
13
|
+
if (!(instance instanceof klass)) {
|
|
14
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
13
19
|
? { register: () => {}, unregister: () => {} }
|
|
14
20
|
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
@@ -84,11 +90,34 @@ function dropObject(idx) {
|
|
|
84
90
|
heap_next = idx;
|
|
85
91
|
}
|
|
86
92
|
|
|
93
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
94
|
+
ptr = ptr >>> 0;
|
|
95
|
+
const mem = getDataViewMemory0();
|
|
96
|
+
const result = [];
|
|
97
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
98
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
99
|
+
}
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function getArrayU64FromWasm0(ptr, len) {
|
|
104
|
+
ptr = ptr >>> 0;
|
|
105
|
+
return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
106
|
+
}
|
|
107
|
+
|
|
87
108
|
function getArrayU8FromWasm0(ptr, len) {
|
|
88
109
|
ptr = ptr >>> 0;
|
|
89
110
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
90
111
|
}
|
|
91
112
|
|
|
113
|
+
let cachedBigUint64ArrayMemory0 = null;
|
|
114
|
+
function getBigUint64ArrayMemory0() {
|
|
115
|
+
if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) {
|
|
116
|
+
cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer);
|
|
117
|
+
}
|
|
118
|
+
return cachedBigUint64ArrayMemory0;
|
|
119
|
+
}
|
|
120
|
+
|
|
92
121
|
let cachedDataViewMemory0 = null;
|
|
93
122
|
function getDataViewMemory0() {
|
|
94
123
|
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
@@ -251,24 +280,535 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
251
280
|
|
|
252
281
|
let WASM_VECTOR_LEN = 0;
|
|
253
282
|
|
|
254
|
-
function
|
|
255
|
-
wasm.
|
|
283
|
+
function __wasm_bindgen_func_elem_612(arg0, arg1, arg2) {
|
|
284
|
+
wasm.__wasm_bindgen_func_elem_612(arg0, arg1, addHeapObject(arg2));
|
|
256
285
|
}
|
|
257
286
|
|
|
258
|
-
function
|
|
259
|
-
wasm.
|
|
287
|
+
function __wasm_bindgen_func_elem_184(arg0, arg1, arg2) {
|
|
288
|
+
wasm.__wasm_bindgen_func_elem_184(arg0, arg1, addHeapObject(arg2));
|
|
260
289
|
}
|
|
261
290
|
|
|
262
|
-
function
|
|
263
|
-
wasm.
|
|
291
|
+
function __wasm_bindgen_func_elem_661(arg0, arg1, arg2, arg3) {
|
|
292
|
+
wasm.__wasm_bindgen_func_elem_661(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
264
293
|
}
|
|
265
294
|
|
|
266
295
|
const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
|
267
296
|
|
|
297
|
+
const GraphEdgeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
298
|
+
? { register: () => {}, unregister: () => {} }
|
|
299
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_graphedge_free(ptr >>> 0, 1));
|
|
300
|
+
|
|
301
|
+
const GraphNodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
302
|
+
? { register: () => {}, unregister: () => {} }
|
|
303
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_graphnode_free(ptr >>> 0, 1));
|
|
304
|
+
|
|
305
|
+
const GraphStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
306
|
+
? { register: () => {}, unregister: () => {} }
|
|
307
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_graphstore_free(ptr >>> 0, 1));
|
|
308
|
+
|
|
268
309
|
const VectorStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
269
310
|
? { register: () => {}, unregister: () => {} }
|
|
270
311
|
: new FinalizationRegistry(ptr => wasm.__wbg_vectorstore_free(ptr >>> 0, 1));
|
|
271
312
|
|
|
313
|
+
/**
|
|
314
|
+
* A graph edge representing a relationship between nodes.
|
|
315
|
+
*/
|
|
316
|
+
export class GraphEdge {
|
|
317
|
+
static __wrap(ptr) {
|
|
318
|
+
ptr = ptr >>> 0;
|
|
319
|
+
const obj = Object.create(GraphEdge.prototype);
|
|
320
|
+
obj.__wbg_ptr = ptr;
|
|
321
|
+
GraphEdgeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
322
|
+
return obj;
|
|
323
|
+
}
|
|
324
|
+
__destroy_into_raw() {
|
|
325
|
+
const ptr = this.__wbg_ptr;
|
|
326
|
+
this.__wbg_ptr = 0;
|
|
327
|
+
GraphEdgeFinalization.unregister(this);
|
|
328
|
+
return ptr;
|
|
329
|
+
}
|
|
330
|
+
free() {
|
|
331
|
+
const ptr = this.__destroy_into_raw();
|
|
332
|
+
wasm.__wbg_graphedge_free(ptr, 0);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Sets a numeric property on the edge.
|
|
336
|
+
* @param {string} key
|
|
337
|
+
* @param {number} value
|
|
338
|
+
*/
|
|
339
|
+
set_number_property(key, value) {
|
|
340
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
341
|
+
const len0 = WASM_VECTOR_LEN;
|
|
342
|
+
wasm.graphedge_set_number_property(this.__wbg_ptr, ptr0, len0, value);
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Sets a string property on the edge.
|
|
346
|
+
* @param {string} key
|
|
347
|
+
* @param {string} value
|
|
348
|
+
*/
|
|
349
|
+
set_string_property(key, value) {
|
|
350
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
351
|
+
const len0 = WASM_VECTOR_LEN;
|
|
352
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
353
|
+
const len1 = WASM_VECTOR_LEN;
|
|
354
|
+
wasm.graphedge_set_string_property(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Returns the edge ID.
|
|
358
|
+
* @returns {bigint}
|
|
359
|
+
*/
|
|
360
|
+
get id() {
|
|
361
|
+
const ret = wasm.graphedge_id(this.__wbg_ptr);
|
|
362
|
+
return BigInt.asUintN(64, ret);
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Creates a new graph edge.
|
|
366
|
+
*
|
|
367
|
+
* # Arguments
|
|
368
|
+
*
|
|
369
|
+
* * `id` - Unique identifier for the edge
|
|
370
|
+
* * `source` - Source node ID
|
|
371
|
+
* * `target` - Target node ID
|
|
372
|
+
* * `label` - Relationship type (e.g., "KNOWS", "WROTE")
|
|
373
|
+
* @param {bigint} id
|
|
374
|
+
* @param {bigint} source
|
|
375
|
+
* @param {bigint} target
|
|
376
|
+
* @param {string} label
|
|
377
|
+
*/
|
|
378
|
+
constructor(id, source, target, label) {
|
|
379
|
+
try {
|
|
380
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
381
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
382
|
+
const len0 = WASM_VECTOR_LEN;
|
|
383
|
+
wasm.graphedge_new(retptr, id, source, target, ptr0, len0);
|
|
384
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
385
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
386
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
387
|
+
if (r2) {
|
|
388
|
+
throw takeObject(r1);
|
|
389
|
+
}
|
|
390
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
391
|
+
GraphEdgeFinalization.register(this, this.__wbg_ptr, this);
|
|
392
|
+
return this;
|
|
393
|
+
} finally {
|
|
394
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Returns the edge label (relationship type).
|
|
399
|
+
* @returns {string}
|
|
400
|
+
*/
|
|
401
|
+
get label() {
|
|
402
|
+
let deferred1_0;
|
|
403
|
+
let deferred1_1;
|
|
404
|
+
try {
|
|
405
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
406
|
+
wasm.graphedge_label(retptr, this.__wbg_ptr);
|
|
407
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
408
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
409
|
+
deferred1_0 = r0;
|
|
410
|
+
deferred1_1 = r1;
|
|
411
|
+
return getStringFromWasm0(r0, r1);
|
|
412
|
+
} finally {
|
|
413
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
414
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Returns the source node ID.
|
|
419
|
+
* @returns {bigint}
|
|
420
|
+
*/
|
|
421
|
+
get source() {
|
|
422
|
+
const ret = wasm.graphedge_source(this.__wbg_ptr);
|
|
423
|
+
return BigInt.asUintN(64, ret);
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Returns the target node ID.
|
|
427
|
+
* @returns {bigint}
|
|
428
|
+
*/
|
|
429
|
+
get target() {
|
|
430
|
+
const ret = wasm.graphedge_target(this.__wbg_ptr);
|
|
431
|
+
return BigInt.asUintN(64, ret);
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Converts to JSON for JavaScript interop.
|
|
435
|
+
* @returns {any}
|
|
436
|
+
*/
|
|
437
|
+
to_json() {
|
|
438
|
+
try {
|
|
439
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
440
|
+
wasm.graphedge_to_json(retptr, this.__wbg_ptr);
|
|
441
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
442
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
443
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
444
|
+
if (r2) {
|
|
445
|
+
throw takeObject(r1);
|
|
446
|
+
}
|
|
447
|
+
return takeObject(r0);
|
|
448
|
+
} finally {
|
|
449
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
if (Symbol.dispose) GraphEdge.prototype[Symbol.dispose] = GraphEdge.prototype.free;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* A graph node for knowledge graph construction.
|
|
457
|
+
*/
|
|
458
|
+
export class GraphNode {
|
|
459
|
+
static __wrap(ptr) {
|
|
460
|
+
ptr = ptr >>> 0;
|
|
461
|
+
const obj = Object.create(GraphNode.prototype);
|
|
462
|
+
obj.__wbg_ptr = ptr;
|
|
463
|
+
GraphNodeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
464
|
+
return obj;
|
|
465
|
+
}
|
|
466
|
+
__destroy_into_raw() {
|
|
467
|
+
const ptr = this.__wbg_ptr;
|
|
468
|
+
this.__wbg_ptr = 0;
|
|
469
|
+
GraphNodeFinalization.unregister(this);
|
|
470
|
+
return ptr;
|
|
471
|
+
}
|
|
472
|
+
free() {
|
|
473
|
+
const ptr = this.__destroy_into_raw();
|
|
474
|
+
wasm.__wbg_graphnode_free(ptr, 0);
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Returns true if this node has a vector embedding.
|
|
478
|
+
* @returns {boolean}
|
|
479
|
+
*/
|
|
480
|
+
has_vector() {
|
|
481
|
+
const ret = wasm.graphnode_has_vector(this.__wbg_ptr);
|
|
482
|
+
return ret !== 0;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Sets a vector embedding on the node.
|
|
486
|
+
* @param {Float32Array} vector
|
|
487
|
+
*/
|
|
488
|
+
set_vector(vector) {
|
|
489
|
+
const ptr0 = passArrayF32ToWasm0(vector, wasm.__wbindgen_export);
|
|
490
|
+
const len0 = WASM_VECTOR_LEN;
|
|
491
|
+
wasm.graphnode_set_vector(this.__wbg_ptr, ptr0, len0);
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Sets a boolean property on the node.
|
|
495
|
+
* @param {string} key
|
|
496
|
+
* @param {boolean} value
|
|
497
|
+
*/
|
|
498
|
+
set_bool_property(key, value) {
|
|
499
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
500
|
+
const len0 = WASM_VECTOR_LEN;
|
|
501
|
+
wasm.graphnode_set_bool_property(this.__wbg_ptr, ptr0, len0, value);
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Sets a numeric property on the node.
|
|
505
|
+
* @param {string} key
|
|
506
|
+
* @param {number} value
|
|
507
|
+
*/
|
|
508
|
+
set_number_property(key, value) {
|
|
509
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
510
|
+
const len0 = WASM_VECTOR_LEN;
|
|
511
|
+
wasm.graphnode_set_number_property(this.__wbg_ptr, ptr0, len0, value);
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Sets a string property on the node.
|
|
515
|
+
* @param {string} key
|
|
516
|
+
* @param {string} value
|
|
517
|
+
*/
|
|
518
|
+
set_string_property(key, value) {
|
|
519
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
520
|
+
const len0 = WASM_VECTOR_LEN;
|
|
521
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
522
|
+
const len1 = WASM_VECTOR_LEN;
|
|
523
|
+
wasm.graphnode_set_string_property(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Returns the node ID.
|
|
527
|
+
* @returns {bigint}
|
|
528
|
+
*/
|
|
529
|
+
get id() {
|
|
530
|
+
const ret = wasm.graphedge_id(this.__wbg_ptr);
|
|
531
|
+
return BigInt.asUintN(64, ret);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Creates a new graph node.
|
|
535
|
+
*
|
|
536
|
+
* # Arguments
|
|
537
|
+
*
|
|
538
|
+
* * `id` - Unique identifier for the node
|
|
539
|
+
* * `label` - Node type/label (e.g., "Person", "Document")
|
|
540
|
+
* @param {bigint} id
|
|
541
|
+
* @param {string} label
|
|
542
|
+
*/
|
|
543
|
+
constructor(id, label) {
|
|
544
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
545
|
+
const len0 = WASM_VECTOR_LEN;
|
|
546
|
+
const ret = wasm.graphnode_new(id, ptr0, len0);
|
|
547
|
+
this.__wbg_ptr = ret >>> 0;
|
|
548
|
+
GraphNodeFinalization.register(this, this.__wbg_ptr, this);
|
|
549
|
+
return this;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Returns the node label.
|
|
553
|
+
* @returns {string}
|
|
554
|
+
*/
|
|
555
|
+
get label() {
|
|
556
|
+
let deferred1_0;
|
|
557
|
+
let deferred1_1;
|
|
558
|
+
try {
|
|
559
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
560
|
+
wasm.graphnode_label(retptr, this.__wbg_ptr);
|
|
561
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
562
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
563
|
+
deferred1_0 = r0;
|
|
564
|
+
deferred1_1 = r1;
|
|
565
|
+
return getStringFromWasm0(r0, r1);
|
|
566
|
+
} finally {
|
|
567
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
568
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Converts to JSON for JavaScript interop.
|
|
573
|
+
* @returns {any}
|
|
574
|
+
*/
|
|
575
|
+
to_json() {
|
|
576
|
+
try {
|
|
577
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
578
|
+
wasm.graphnode_to_json(retptr, this.__wbg_ptr);
|
|
579
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
580
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
581
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
582
|
+
if (r2) {
|
|
583
|
+
throw takeObject(r1);
|
|
584
|
+
}
|
|
585
|
+
return takeObject(r0);
|
|
586
|
+
} finally {
|
|
587
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
if (Symbol.dispose) GraphNode.prototype[Symbol.dispose] = GraphNode.prototype.free;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* In-memory graph store for browser-based knowledge graphs.
|
|
595
|
+
*
|
|
596
|
+
* Stores nodes and edges with bidirectional indexing for efficient traversal.
|
|
597
|
+
*/
|
|
598
|
+
export class GraphStore {
|
|
599
|
+
__destroy_into_raw() {
|
|
600
|
+
const ptr = this.__wbg_ptr;
|
|
601
|
+
this.__wbg_ptr = 0;
|
|
602
|
+
GraphStoreFinalization.unregister(this);
|
|
603
|
+
return ptr;
|
|
604
|
+
}
|
|
605
|
+
free() {
|
|
606
|
+
const ptr = this.__destroy_into_raw();
|
|
607
|
+
wasm.__wbg_graphstore_free(ptr, 0);
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Returns the number of edges.
|
|
611
|
+
* @returns {number}
|
|
612
|
+
*/
|
|
613
|
+
get edge_count() {
|
|
614
|
+
const ret = wasm.graphstore_edge_count(this.__wbg_ptr);
|
|
615
|
+
return ret >>> 0;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Returns the number of nodes.
|
|
619
|
+
* @returns {number}
|
|
620
|
+
*/
|
|
621
|
+
get node_count() {
|
|
622
|
+
const ret = wasm.graphstore_node_count(this.__wbg_ptr);
|
|
623
|
+
return ret >>> 0;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Removes an edge by ID.
|
|
627
|
+
* @param {bigint} edge_id
|
|
628
|
+
*/
|
|
629
|
+
remove_edge(edge_id) {
|
|
630
|
+
wasm.graphstore_remove_edge(this.__wbg_ptr, edge_id);
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* Removes a node and all connected edges.
|
|
634
|
+
* @param {bigint} node_id
|
|
635
|
+
*/
|
|
636
|
+
remove_node(node_id) {
|
|
637
|
+
wasm.graphstore_remove_node(this.__wbg_ptr, node_id);
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Performs BFS traversal from a source node.
|
|
641
|
+
*
|
|
642
|
+
* # Arguments
|
|
643
|
+
*
|
|
644
|
+
* * `source_id` - Starting node ID
|
|
645
|
+
* * `max_depth` - Maximum traversal depth
|
|
646
|
+
* * `limit` - Maximum number of results
|
|
647
|
+
*
|
|
648
|
+
* # Returns
|
|
649
|
+
*
|
|
650
|
+
* Array of reachable node IDs with their depths.
|
|
651
|
+
* @param {bigint} source_id
|
|
652
|
+
* @param {number} max_depth
|
|
653
|
+
* @param {number} limit
|
|
654
|
+
* @returns {any}
|
|
655
|
+
*/
|
|
656
|
+
bfs_traverse(source_id, max_depth, limit) {
|
|
657
|
+
try {
|
|
658
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
659
|
+
wasm.graphstore_bfs_traverse(retptr, this.__wbg_ptr, source_id, max_depth, limit);
|
|
660
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
661
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
662
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
663
|
+
if (r2) {
|
|
664
|
+
throw takeObject(r1);
|
|
665
|
+
}
|
|
666
|
+
return takeObject(r0);
|
|
667
|
+
} finally {
|
|
668
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Gets incoming edges to a node.
|
|
673
|
+
* @param {bigint} node_id
|
|
674
|
+
* @returns {GraphEdge[]}
|
|
675
|
+
*/
|
|
676
|
+
get_incoming(node_id) {
|
|
677
|
+
try {
|
|
678
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
679
|
+
wasm.graphstore_get_incoming(retptr, this.__wbg_ptr, node_id);
|
|
680
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
681
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
682
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
683
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
684
|
+
return v1;
|
|
685
|
+
} finally {
|
|
686
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Gets outgoing edges from a node.
|
|
691
|
+
* @param {bigint} node_id
|
|
692
|
+
* @returns {GraphEdge[]}
|
|
693
|
+
*/
|
|
694
|
+
get_outgoing(node_id) {
|
|
695
|
+
try {
|
|
696
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
697
|
+
wasm.graphstore_get_outgoing(retptr, this.__wbg_ptr, node_id);
|
|
698
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
699
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
700
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
701
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
702
|
+
return v1;
|
|
703
|
+
} finally {
|
|
704
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Gets neighbors reachable from a node (1-hop).
|
|
709
|
+
* @param {bigint} node_id
|
|
710
|
+
* @returns {BigUint64Array}
|
|
711
|
+
*/
|
|
712
|
+
get_neighbors(node_id) {
|
|
713
|
+
try {
|
|
714
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
715
|
+
wasm.graphstore_get_neighbors(retptr, this.__wbg_ptr, node_id);
|
|
716
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
717
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
718
|
+
var v1 = getArrayU64FromWasm0(r0, r1).slice();
|
|
719
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
720
|
+
return v1;
|
|
721
|
+
} finally {
|
|
722
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Gets outgoing edges filtered by label.
|
|
727
|
+
* @param {bigint} node_id
|
|
728
|
+
* @param {string} label
|
|
729
|
+
* @returns {GraphEdge[]}
|
|
730
|
+
*/
|
|
731
|
+
get_outgoing_by_label(node_id, label) {
|
|
732
|
+
try {
|
|
733
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
734
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
735
|
+
const len0 = WASM_VECTOR_LEN;
|
|
736
|
+
wasm.graphstore_get_outgoing_by_label(retptr, this.__wbg_ptr, node_id, ptr0, len0);
|
|
737
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
738
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
739
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
740
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
741
|
+
return v2;
|
|
742
|
+
} finally {
|
|
743
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Creates a new empty graph store.
|
|
748
|
+
*/
|
|
749
|
+
constructor() {
|
|
750
|
+
const ret = wasm.graphstore_new();
|
|
751
|
+
this.__wbg_ptr = ret >>> 0;
|
|
752
|
+
GraphStoreFinalization.register(this, this.__wbg_ptr, this);
|
|
753
|
+
return this;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Clears all nodes and edges.
|
|
757
|
+
*/
|
|
758
|
+
clear() {
|
|
759
|
+
wasm.graphstore_clear(this.__wbg_ptr);
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Adds an edge to the graph.
|
|
763
|
+
*
|
|
764
|
+
* Returns an error if an edge with the same ID already exists.
|
|
765
|
+
* @param {GraphEdge} edge
|
|
766
|
+
*/
|
|
767
|
+
add_edge(edge) {
|
|
768
|
+
try {
|
|
769
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
770
|
+
_assertClass(edge, GraphEdge);
|
|
771
|
+
var ptr0 = edge.__destroy_into_raw();
|
|
772
|
+
wasm.graphstore_add_edge(retptr, this.__wbg_ptr, ptr0);
|
|
773
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
774
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
775
|
+
if (r1) {
|
|
776
|
+
throw takeObject(r0);
|
|
777
|
+
}
|
|
778
|
+
} finally {
|
|
779
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Adds a node to the graph.
|
|
784
|
+
* @param {GraphNode} node
|
|
785
|
+
*/
|
|
786
|
+
add_node(node) {
|
|
787
|
+
_assertClass(node, GraphNode);
|
|
788
|
+
var ptr0 = node.__destroy_into_raw();
|
|
789
|
+
wasm.graphstore_add_node(this.__wbg_ptr, ptr0);
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Gets an edge by ID.
|
|
793
|
+
* @param {bigint} id
|
|
794
|
+
* @returns {GraphEdge | undefined}
|
|
795
|
+
*/
|
|
796
|
+
get_edge(id) {
|
|
797
|
+
const ret = wasm.graphstore_get_edge(this.__wbg_ptr, id);
|
|
798
|
+
return ret === 0 ? undefined : GraphEdge.__wrap(ret);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Gets a node by ID.
|
|
802
|
+
* @param {bigint} id
|
|
803
|
+
* @returns {GraphNode | undefined}
|
|
804
|
+
*/
|
|
805
|
+
get_node(id) {
|
|
806
|
+
const ret = wasm.graphstore_get_node(this.__wbg_ptr, id);
|
|
807
|
+
return ret === 0 ? undefined : GraphNode.__wrap(ret);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
if (Symbol.dispose) GraphStore.prototype[Symbol.dispose] = GraphStore.prototype.free;
|
|
811
|
+
|
|
272
812
|
/**
|
|
273
813
|
* Storage mode for vector quantization.
|
|
274
814
|
* @enum {0 | 1 | 2}
|
|
@@ -1193,6 +1733,10 @@ function __wbg_get_imports() {
|
|
|
1193
1733
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1194
1734
|
return addHeapObject(ret);
|
|
1195
1735
|
}, arguments) };
|
|
1736
|
+
imports.wbg.__wbg_graphedge_new = function(arg0) {
|
|
1737
|
+
const ret = GraphEdge.__wrap(arg0);
|
|
1738
|
+
return addHeapObject(ret);
|
|
1739
|
+
};
|
|
1196
1740
|
imports.wbg.__wbg_indexedDB_23c232e00a1e28ad = function() { return handleError(function (arg0) {
|
|
1197
1741
|
const ret = getObject(arg0).indexedDB;
|
|
1198
1742
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
@@ -1284,7 +1828,7 @@ function __wbg_get_imports() {
|
|
|
1284
1828
|
const a = state0.a;
|
|
1285
1829
|
state0.a = 0;
|
|
1286
1830
|
try {
|
|
1287
|
-
return
|
|
1831
|
+
return __wasm_bindgen_func_elem_661(a, state0.b, arg0, arg1);
|
|
1288
1832
|
} finally {
|
|
1289
1833
|
state0.a = a;
|
|
1290
1834
|
}
|
|
@@ -1405,11 +1949,6 @@ function __wbg_get_imports() {
|
|
|
1405
1949
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1406
1950
|
return addHeapObject(ret);
|
|
1407
1951
|
};
|
|
1408
|
-
imports.wbg.__wbindgen_cast_257c51b8abf9285e = function(arg0, arg1) {
|
|
1409
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 57, function: Function { arguments: [Externref], shim_idx: 58, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1410
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_527, __wasm_bindgen_func_elem_528);
|
|
1411
|
-
return addHeapObject(ret);
|
|
1412
|
-
};
|
|
1413
1952
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
1414
1953
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1415
1954
|
const ret = BigInt.asUintN(64, arg0);
|
|
@@ -1417,7 +1956,7 @@ function __wbg_get_imports() {
|
|
|
1417
1956
|
};
|
|
1418
1957
|
imports.wbg.__wbindgen_cast_59e89726c7c5a9af = function(arg0, arg1) {
|
|
1419
1958
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8, function: Function { arguments: [NamedExternref("Event")], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1420
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1959
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_183, __wasm_bindgen_func_elem_184);
|
|
1421
1960
|
return addHeapObject(ret);
|
|
1422
1961
|
};
|
|
1423
1962
|
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
@@ -1425,6 +1964,11 @@ function __wbg_get_imports() {
|
|
|
1425
1964
|
const ret = arg0;
|
|
1426
1965
|
return addHeapObject(ret);
|
|
1427
1966
|
};
|
|
1967
|
+
imports.wbg.__wbindgen_cast_c060e19e7a983f38 = function(arg0, arg1) {
|
|
1968
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 55, function: Function { arguments: [Externref], shim_idx: 56, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1969
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_611, __wasm_bindgen_func_elem_612);
|
|
1970
|
+
return addHeapObject(ret);
|
|
1971
|
+
};
|
|
1428
1972
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1429
1973
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1430
1974
|
const ret = arg0;
|
|
@@ -1444,6 +1988,7 @@ function __wbg_get_imports() {
|
|
|
1444
1988
|
function __wbg_finalize_init(instance, module) {
|
|
1445
1989
|
wasm = instance.exports;
|
|
1446
1990
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
1991
|
+
cachedBigUint64ArrayMemory0 = null;
|
|
1447
1992
|
cachedDataViewMemory0 = null;
|
|
1448
1993
|
cachedFloat32ArrayMemory0 = null;
|
|
1449
1994
|
cachedUint8ArrayMemory0 = null;
|
package/velesdb_wasm_bg.wasm
CHANGED
|
Binary file
|