@cognipilot/rumoca-core 0.9.4

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.
@@ -0,0 +1,1159 @@
1
+ /* @ts-self-types="./rumoca_bind_wasm.d.ts" */
2
+
3
+ /**
4
+ * Check Modelica source code and return all diagnostics.
5
+ * @param {string} source
6
+ * @returns {any}
7
+ */
8
+ export function check(source) {
9
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
10
+ const len0 = WASM_VECTOR_LEN;
11
+ const ret = wasm.check(ptr0, len0);
12
+ return ret;
13
+ }
14
+
15
+ export function clear_source_root_cache() {
16
+ wasm.clear_source_root_cache();
17
+ }
18
+
19
+ /**
20
+ * Compile Modelica source code to DAE JSON.
21
+ * @param {string} source
22
+ * @param {string} model_name
23
+ * @returns {string}
24
+ */
25
+ export function compile(source, model_name) {
26
+ let deferred4_0;
27
+ let deferred4_1;
28
+ try {
29
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
30
+ const len0 = WASM_VECTOR_LEN;
31
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
32
+ const len1 = WASM_VECTOR_LEN;
33
+ const ret = wasm.compile(ptr0, len0, ptr1, len1);
34
+ var ptr3 = ret[0];
35
+ var len3 = ret[1];
36
+ if (ret[3]) {
37
+ ptr3 = 0; len3 = 0;
38
+ throw takeFromExternrefTable0(ret[2]);
39
+ }
40
+ deferred4_0 = ptr3;
41
+ deferred4_1 = len3;
42
+ return getStringFromWasm0(ptr3, len3);
43
+ } finally {
44
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
45
+ }
46
+ }
47
+
48
+ /**
49
+ * @param {string} source
50
+ * @param {string} model_name
51
+ * @param {string} source_roots_json
52
+ * @returns {string}
53
+ */
54
+ export function compile_check_with_source_roots(source, model_name, source_roots_json) {
55
+ let deferred5_0;
56
+ let deferred5_1;
57
+ try {
58
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
59
+ const len0 = WASM_VECTOR_LEN;
60
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
61
+ const len1 = WASM_VECTOR_LEN;
62
+ const ptr2 = passStringToWasm0(source_roots_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
63
+ const len2 = WASM_VECTOR_LEN;
64
+ const ret = wasm.compile_check_with_source_roots(ptr0, len0, ptr1, len1, ptr2, len2);
65
+ var ptr4 = ret[0];
66
+ var len4 = ret[1];
67
+ if (ret[3]) {
68
+ ptr4 = 0; len4 = 0;
69
+ throw takeFromExternrefTable0(ret[2]);
70
+ }
71
+ deferred5_0 = ptr4;
72
+ deferred5_1 = len4;
73
+ return getStringFromWasm0(ptr4, len4);
74
+ } finally {
75
+ wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Strict compile-check using loaded source roots with explicit behavior options.
81
+ *
82
+ * This validates requested-model compilation without producing full DAE output.
83
+ * Option semantics are identical to `compile_with_source_roots_with_options`.
84
+ * @param {string} source
85
+ * @param {string} model_name
86
+ * @param {string} source_roots_json
87
+ * @param {string} compile_options_json
88
+ * @returns {string}
89
+ */
90
+ export function compile_check_with_source_roots_with_options(source, model_name, source_roots_json, compile_options_json) {
91
+ let deferred6_0;
92
+ let deferred6_1;
93
+ try {
94
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
95
+ const len0 = WASM_VECTOR_LEN;
96
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
97
+ const len1 = WASM_VECTOR_LEN;
98
+ const ptr2 = passStringToWasm0(source_roots_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
99
+ const len2 = WASM_VECTOR_LEN;
100
+ const ptr3 = passStringToWasm0(compile_options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
101
+ const len3 = WASM_VECTOR_LEN;
102
+ const ret = wasm.compile_check_with_source_roots_with_options(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
103
+ var ptr5 = ret[0];
104
+ var len5 = ret[1];
105
+ if (ret[3]) {
106
+ ptr5 = 0; len5 = 0;
107
+ throw takeFromExternrefTable0(ret[2]);
108
+ }
109
+ deferred6_0 = ptr5;
110
+ deferred6_1 = len5;
111
+ return getStringFromWasm0(ptr5, len5);
112
+ } finally {
113
+ wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Compile Modelica source code to DAE JSON (alias for worker compatibility).
119
+ * @param {string} source
120
+ * @param {string} model_name
121
+ * @returns {string}
122
+ */
123
+ export function compile_to_json(source, model_name) {
124
+ let deferred4_0;
125
+ let deferred4_1;
126
+ try {
127
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
128
+ const len0 = WASM_VECTOR_LEN;
129
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
130
+ const len1 = WASM_VECTOR_LEN;
131
+ const ret = wasm.compile_to_json(ptr0, len0, ptr1, len1);
132
+ var ptr3 = ret[0];
133
+ var len3 = ret[1];
134
+ if (ret[3]) {
135
+ ptr3 = 0; len3 = 0;
136
+ throw takeFromExternrefTable0(ret[2]);
137
+ }
138
+ deferred4_0 = ptr3;
139
+ deferred4_1 = len3;
140
+ return getStringFromWasm0(ptr3, len3);
141
+ } finally {
142
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
143
+ }
144
+ }
145
+
146
+ /**
147
+ * @param {string} source
148
+ * @param {string} model_name
149
+ * @param {string} project_sources_json
150
+ * @returns {string}
151
+ */
152
+ export function compile_with_project_sources(source, model_name, project_sources_json) {
153
+ let deferred5_0;
154
+ let deferred5_1;
155
+ try {
156
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
157
+ const len0 = WASM_VECTOR_LEN;
158
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
159
+ const len1 = WASM_VECTOR_LEN;
160
+ const ptr2 = passStringToWasm0(project_sources_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
161
+ const len2 = WASM_VECTOR_LEN;
162
+ const ret = wasm.compile_with_project_sources(ptr0, len0, ptr1, len1, ptr2, len2);
163
+ var ptr4 = ret[0];
164
+ var len4 = ret[1];
165
+ if (ret[3]) {
166
+ ptr4 = 0; len4 = 0;
167
+ throw takeFromExternrefTable0(ret[2]);
168
+ }
169
+ deferred5_0 = ptr4;
170
+ deferred5_1 = len4;
171
+ return getStringFromWasm0(ptr4, len4);
172
+ } finally {
173
+ wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
174
+ }
175
+ }
176
+
177
+ /**
178
+ * @param {string} source
179
+ * @param {string} model_name
180
+ * @param {string} source_roots_json
181
+ * @returns {string}
182
+ */
183
+ export function compile_with_source_roots(source, model_name, source_roots_json) {
184
+ let deferred5_0;
185
+ let deferred5_1;
186
+ try {
187
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
188
+ const len0 = WASM_VECTOR_LEN;
189
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
190
+ const len1 = WASM_VECTOR_LEN;
191
+ const ptr2 = passStringToWasm0(source_roots_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
192
+ const len2 = WASM_VECTOR_LEN;
193
+ const ret = wasm.compile_with_source_roots(ptr0, len0, ptr1, len1, ptr2, len2);
194
+ var ptr4 = ret[0];
195
+ var len4 = ret[1];
196
+ if (ret[3]) {
197
+ ptr4 = 0; len4 = 0;
198
+ throw takeFromExternrefTable0(ret[2]);
199
+ }
200
+ deferred5_0 = ptr4;
201
+ deferred5_1 = len4;
202
+ return getStringFromWasm0(ptr4, len4);
203
+ } finally {
204
+ wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
205
+ }
206
+ }
207
+
208
+ /**
209
+ * Compile using loaded source roots with explicit compile behavior options.
210
+ *
211
+ * `compile_options_json` example:
212
+ * `{"allowNonParamEvaluateAnnotation":true,"allowMultiWhenSingleAssign":false}`
213
+ *
214
+ * Strict behavior remains default when this function is not used (or options are false).
215
+ * @param {string} source
216
+ * @param {string} model_name
217
+ * @param {string} source_roots_json
218
+ * @param {string} compile_options_json
219
+ * @returns {string}
220
+ */
221
+ export function compile_with_source_roots_with_options(source, model_name, source_roots_json, compile_options_json) {
222
+ let deferred6_0;
223
+ let deferred6_1;
224
+ try {
225
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
226
+ const len0 = WASM_VECTOR_LEN;
227
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
228
+ const len1 = WASM_VECTOR_LEN;
229
+ const ptr2 = passStringToWasm0(source_roots_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
230
+ const len2 = WASM_VECTOR_LEN;
231
+ const ptr3 = passStringToWasm0(compile_options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
232
+ const len3 = WASM_VECTOR_LEN;
233
+ const ret = wasm.compile_with_source_roots_with_options(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
234
+ var ptr5 = ret[0];
235
+ var len5 = ret[1];
236
+ if (ret[3]) {
237
+ ptr5 = 0; len5 = 0;
238
+ throw takeFromExternrefTable0(ret[2]);
239
+ }
240
+ deferred6_0 = ptr5;
241
+ deferred6_1 = len5;
242
+ return getStringFromWasm0(ptr5, len5);
243
+ } finally {
244
+ wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
245
+ }
246
+ }
247
+
248
+ /**
249
+ * @param {string} uris_json
250
+ * @returns {Uint8Array}
251
+ */
252
+ export function export_parsed_source_roots_binary(uris_json) {
253
+ const ptr0 = passStringToWasm0(uris_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
254
+ const len0 = WASM_VECTOR_LEN;
255
+ const ret = wasm.export_parsed_source_roots_binary(ptr0, len0);
256
+ if (ret[3]) {
257
+ throw takeFromExternrefTable0(ret[2]);
258
+ }
259
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
260
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
261
+ return v2;
262
+ }
263
+
264
+ /**
265
+ * Get the UTC build timestamp for this WASM build.
266
+ * @returns {string}
267
+ */
268
+ export function get_build_time_utc() {
269
+ let deferred1_0;
270
+ let deferred1_1;
271
+ try {
272
+ const ret = wasm.get_build_time_utc();
273
+ deferred1_0 = ret[0];
274
+ deferred1_1 = ret[1];
275
+ return getStringFromWasm0(ret[0], ret[1]);
276
+ } finally {
277
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
278
+ }
279
+ }
280
+
281
+ /**
282
+ * Get the built-in codegen targets bundled with the WASM runtime.
283
+ * @returns {any}
284
+ */
285
+ export function get_builtin_targets() {
286
+ const ret = wasm.get_builtin_targets();
287
+ return ret;
288
+ }
289
+
290
+ /**
291
+ * @returns {string}
292
+ */
293
+ export function get_bundled_source_root_manifest() {
294
+ let deferred1_0;
295
+ let deferred1_1;
296
+ try {
297
+ const ret = wasm.get_bundled_source_root_manifest();
298
+ deferred1_0 = ret[0];
299
+ deferred1_1 = ret[1];
300
+ return getStringFromWasm0(ret[0], ret[1]);
301
+ } finally {
302
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
303
+ }
304
+ }
305
+
306
+ /**
307
+ * Get detailed class documentation and summary metadata.
308
+ * @param {string} qualified_name
309
+ * @returns {string}
310
+ */
311
+ export function get_class_info(qualified_name) {
312
+ let deferred3_0;
313
+ let deferred3_1;
314
+ try {
315
+ const ptr0 = passStringToWasm0(qualified_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
316
+ const len0 = WASM_VECTOR_LEN;
317
+ const ret = wasm.get_class_info(ptr0, len0);
318
+ var ptr2 = ret[0];
319
+ var len2 = ret[1];
320
+ if (ret[3]) {
321
+ ptr2 = 0; len2 = 0;
322
+ throw takeFromExternrefTable0(ret[2]);
323
+ }
324
+ deferred3_0 = ptr2;
325
+ deferred3_1 = len2;
326
+ return getStringFromWasm0(ptr2, len2);
327
+ } finally {
328
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
329
+ }
330
+ }
331
+
332
+ /**
333
+ * Get the Git commit hash for this WASM build.
334
+ * @returns {string}
335
+ */
336
+ export function get_git_commit() {
337
+ let deferred1_0;
338
+ let deferred1_1;
339
+ try {
340
+ const ret = wasm.get_git_commit();
341
+ deferred1_0 = ret[0];
342
+ deferred1_1 = ret[1];
343
+ return getStringFromWasm0(ret[0], ret[1]);
344
+ } finally {
345
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
346
+ }
347
+ }
348
+
349
+ /**
350
+ * Discover compilable simulation models in a source document.
351
+ * @param {string} source
352
+ * @param {string} default_model
353
+ * @returns {string}
354
+ */
355
+ export function get_simulation_models(source, default_model) {
356
+ let deferred4_0;
357
+ let deferred4_1;
358
+ try {
359
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
360
+ const len0 = WASM_VECTOR_LEN;
361
+ const ptr1 = passStringToWasm0(default_model, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
+ const len1 = WASM_VECTOR_LEN;
363
+ const ret = wasm.get_simulation_models(ptr0, len0, ptr1, len1);
364
+ var ptr3 = ret[0];
365
+ var len3 = ret[1];
366
+ if (ret[3]) {
367
+ ptr3 = 0; len3 = 0;
368
+ throw takeFromExternrefTable0(ret[2]);
369
+ }
370
+ deferred4_0 = ptr3;
371
+ deferred4_1 = len3;
372
+ return getStringFromWasm0(ptr3, len3);
373
+ } finally {
374
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
375
+ }
376
+ }
377
+
378
+ /**
379
+ * @returns {number}
380
+ */
381
+ export function get_source_root_document_count() {
382
+ const ret = wasm.get_source_root_document_count();
383
+ return ret >>> 0;
384
+ }
385
+
386
+ /**
387
+ * @returns {string}
388
+ */
389
+ export function get_source_root_statuses() {
390
+ let deferred2_0;
391
+ let deferred2_1;
392
+ try {
393
+ const ret = wasm.get_source_root_statuses();
394
+ var ptr1 = ret[0];
395
+ var len1 = ret[1];
396
+ if (ret[3]) {
397
+ ptr1 = 0; len1 = 0;
398
+ throw takeFromExternrefTable0(ret[2]);
399
+ }
400
+ deferred2_0 = ptr1;
401
+ deferred2_1 = len1;
402
+ return getStringFromWasm0(ptr1, len1);
403
+ } finally {
404
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
405
+ }
406
+ }
407
+
408
+ /**
409
+ * Get the Rumoca version string.
410
+ * @returns {string}
411
+ */
412
+ export function get_version() {
413
+ let deferred1_0;
414
+ let deferred1_1;
415
+ try {
416
+ const ret = wasm.get_version();
417
+ deferred1_0 = ret[0];
418
+ deferred1_1 = ret[1];
419
+ return getStringFromWasm0(ret[0], ret[1]);
420
+ } finally {
421
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
422
+ }
423
+ }
424
+
425
+ /**
426
+ * Initialize panic hook for better error messages in console.
427
+ */
428
+ export function init() {
429
+ wasm.init();
430
+ }
431
+
432
+ /**
433
+ * Lint Modelica source code and return messages.
434
+ * @param {string} source
435
+ * @returns {any}
436
+ */
437
+ export function lint(source) {
438
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
439
+ const len0 = WASM_VECTOR_LEN;
440
+ const ret = wasm.lint(ptr0, len0);
441
+ return ret;
442
+ }
443
+
444
+ /**
445
+ * List all loaded classes as a package/class hierarchy.
446
+ * @returns {string}
447
+ */
448
+ export function list_classes() {
449
+ let deferred2_0;
450
+ let deferred2_1;
451
+ try {
452
+ const ret = wasm.list_classes();
453
+ var ptr1 = ret[0];
454
+ var len1 = ret[1];
455
+ if (ret[3]) {
456
+ ptr1 = 0; len1 = 0;
457
+ throw takeFromExternrefTable0(ret[2]);
458
+ }
459
+ deferred2_0 = ptr1;
460
+ deferred2_1 = len1;
461
+ return getStringFromWasm0(ptr1, len1);
462
+ } finally {
463
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
464
+ }
465
+ }
466
+
467
+ /**
468
+ * @param {string} archive_id
469
+ * @returns {number}
470
+ */
471
+ export function load_bundled_source_root_cache(archive_id) {
472
+ const ptr0 = passStringToWasm0(archive_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
473
+ const len0 = WASM_VECTOR_LEN;
474
+ const ret = wasm.load_bundled_source_root_cache(ptr0, len0);
475
+ if (ret[2]) {
476
+ throw takeFromExternrefTable0(ret[1]);
477
+ }
478
+ return ret[0] >>> 0;
479
+ }
480
+
481
+ /**
482
+ * @param {string} source_roots_json
483
+ * @returns {string}
484
+ */
485
+ export function load_source_roots(source_roots_json) {
486
+ let deferred3_0;
487
+ let deferred3_1;
488
+ try {
489
+ const ptr0 = passStringToWasm0(source_roots_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
490
+ const len0 = WASM_VECTOR_LEN;
491
+ const ret = wasm.load_source_roots(ptr0, len0);
492
+ var ptr2 = ret[0];
493
+ var len2 = ret[1];
494
+ if (ret[3]) {
495
+ ptr2 = 0; len2 = 0;
496
+ throw takeFromExternrefTable0(ret[2]);
497
+ }
498
+ deferred3_0 = ptr2;
499
+ deferred3_1 = len2;
500
+ return getStringFromWasm0(ptr2, len2);
501
+ } finally {
502
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
503
+ }
504
+ }
505
+
506
+ /**
507
+ * Get code actions (quick fixes) for diagnostics in a selected range.
508
+ * @param {string} source
509
+ * @param {number} range_start_line
510
+ * @param {number} range_start_character
511
+ * @param {number} range_end_line
512
+ * @param {number} range_end_character
513
+ * @param {string} diagnostics_json
514
+ * @returns {string}
515
+ */
516
+ export function lsp_code_actions(source, range_start_line, range_start_character, range_end_line, range_end_character, diagnostics_json) {
517
+ let deferred4_0;
518
+ let deferred4_1;
519
+ try {
520
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
521
+ const len0 = WASM_VECTOR_LEN;
522
+ const ptr1 = passStringToWasm0(diagnostics_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
523
+ const len1 = WASM_VECTOR_LEN;
524
+ const ret = wasm.lsp_code_actions(ptr0, len0, range_start_line, range_start_character, range_end_line, range_end_character, ptr1, len1);
525
+ var ptr3 = ret[0];
526
+ var len3 = ret[1];
527
+ if (ret[3]) {
528
+ ptr3 = 0; len3 = 0;
529
+ throw takeFromExternrefTable0(ret[2]);
530
+ }
531
+ deferred4_0 = ptr3;
532
+ deferred4_1 = len3;
533
+ return getStringFromWasm0(ptr3, len3);
534
+ } finally {
535
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
536
+ }
537
+ }
538
+
539
+ /**
540
+ * Get code completion suggestions.
541
+ * @param {string} source
542
+ * @param {number} line
543
+ * @param {number} character
544
+ * @returns {string}
545
+ */
546
+ export function lsp_completion(source, line, character) {
547
+ let deferred3_0;
548
+ let deferred3_1;
549
+ try {
550
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
551
+ const len0 = WASM_VECTOR_LEN;
552
+ const ret = wasm.lsp_completion(ptr0, len0, line, character);
553
+ var ptr2 = ret[0];
554
+ var len2 = ret[1];
555
+ if (ret[3]) {
556
+ ptr2 = 0; len2 = 0;
557
+ throw takeFromExternrefTable0(ret[2]);
558
+ }
559
+ deferred3_0 = ptr2;
560
+ deferred3_1 = len2;
561
+ return getStringFromWasm0(ptr2, len2);
562
+ } finally {
563
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
564
+ }
565
+ }
566
+
567
+ /**
568
+ * Get code completion suggestions plus the completion timing breakdown used by the benchmark.
569
+ * @param {string} source
570
+ * @param {number} line
571
+ * @param {number} character
572
+ * @returns {string}
573
+ */
574
+ export function lsp_completion_with_timing(source, line, character) {
575
+ let deferred3_0;
576
+ let deferred3_1;
577
+ try {
578
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
579
+ const len0 = WASM_VECTOR_LEN;
580
+ const ret = wasm.lsp_completion_with_timing(ptr0, len0, line, character);
581
+ var ptr2 = ret[0];
582
+ var len2 = ret[1];
583
+ if (ret[3]) {
584
+ ptr2 = 0; len2 = 0;
585
+ throw takeFromExternrefTable0(ret[2]);
586
+ }
587
+ deferred3_0 = ptr2;
588
+ deferred3_1 = len2;
589
+ return getStringFromWasm0(ptr2, len2);
590
+ } finally {
591
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
592
+ }
593
+ }
594
+
595
+ /**
596
+ * Get go-to-definition target(s) for a position.
597
+ * @param {string} source
598
+ * @param {number} line
599
+ * @param {number} character
600
+ * @returns {string}
601
+ */
602
+ export function lsp_definition(source, line, character) {
603
+ let deferred3_0;
604
+ let deferred3_1;
605
+ try {
606
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
607
+ const len0 = WASM_VECTOR_LEN;
608
+ const ret = wasm.lsp_definition(ptr0, len0, line, character);
609
+ var ptr2 = ret[0];
610
+ var len2 = ret[1];
611
+ if (ret[3]) {
612
+ ptr2 = 0; len2 = 0;
613
+ throw takeFromExternrefTable0(ret[2]);
614
+ }
615
+ deferred3_0 = ptr2;
616
+ deferred3_1 = len2;
617
+ return getStringFromWasm0(ptr2, len2);
618
+ } finally {
619
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
620
+ }
621
+ }
622
+
623
+ /**
624
+ * Compute diagnostics (syntax, lint, and compilation errors).
625
+ * @param {string} source
626
+ * @returns {string}
627
+ */
628
+ export function lsp_diagnostics(source) {
629
+ let deferred3_0;
630
+ let deferred3_1;
631
+ try {
632
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
633
+ const len0 = WASM_VECTOR_LEN;
634
+ const ret = wasm.lsp_diagnostics(ptr0, len0);
635
+ var ptr2 = ret[0];
636
+ var len2 = ret[1];
637
+ if (ret[3]) {
638
+ ptr2 = 0; len2 = 0;
639
+ throw takeFromExternrefTable0(ret[2]);
640
+ }
641
+ deferred3_0 = ptr2;
642
+ deferred3_1 = len2;
643
+ return getStringFromWasm0(ptr2, len2);
644
+ } finally {
645
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
646
+ }
647
+ }
648
+
649
+ /**
650
+ * Get document symbols (outline).
651
+ * @param {string} source
652
+ * @returns {string}
653
+ */
654
+ export function lsp_document_symbols(source) {
655
+ let deferred3_0;
656
+ let deferred3_1;
657
+ try {
658
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
659
+ const len0 = WASM_VECTOR_LEN;
660
+ const ret = wasm.lsp_document_symbols(ptr0, len0);
661
+ var ptr2 = ret[0];
662
+ var len2 = ret[1];
663
+ if (ret[3]) {
664
+ ptr2 = 0; len2 = 0;
665
+ throw takeFromExternrefTable0(ret[2]);
666
+ }
667
+ deferred3_0 = ptr2;
668
+ deferred3_1 = len2;
669
+ return getStringFromWasm0(ptr2, len2);
670
+ } finally {
671
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
672
+ }
673
+ }
674
+
675
+ /**
676
+ * Get hover information for a position.
677
+ * @param {string} source
678
+ * @param {number} line
679
+ * @param {number} character
680
+ * @returns {string}
681
+ */
682
+ export function lsp_hover(source, line, character) {
683
+ let deferred3_0;
684
+ let deferred3_1;
685
+ try {
686
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
687
+ const len0 = WASM_VECTOR_LEN;
688
+ const ret = wasm.lsp_hover(ptr0, len0, line, character);
689
+ var ptr2 = ret[0];
690
+ var len2 = ret[1];
691
+ if (ret[3]) {
692
+ ptr2 = 0; len2 = 0;
693
+ throw takeFromExternrefTable0(ret[2]);
694
+ }
695
+ deferred3_0 = ptr2;
696
+ deferred3_1 = len2;
697
+ return getStringFromWasm0(ptr2, len2);
698
+ } finally {
699
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
700
+ }
701
+ }
702
+
703
+ /**
704
+ * Get the semantic token legend.
705
+ * @returns {string}
706
+ */
707
+ export function lsp_semantic_token_legend() {
708
+ let deferred2_0;
709
+ let deferred2_1;
710
+ try {
711
+ const ret = wasm.lsp_semantic_token_legend();
712
+ var ptr1 = ret[0];
713
+ var len1 = ret[1];
714
+ if (ret[3]) {
715
+ ptr1 = 0; len1 = 0;
716
+ throw takeFromExternrefTable0(ret[2]);
717
+ }
718
+ deferred2_0 = ptr1;
719
+ deferred2_1 = len1;
720
+ return getStringFromWasm0(ptr1, len1);
721
+ } finally {
722
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
723
+ }
724
+ }
725
+
726
+ /**
727
+ * Get semantic tokens for syntax highlighting.
728
+ * @param {string} source
729
+ * @returns {string}
730
+ */
731
+ export function lsp_semantic_tokens(source) {
732
+ let deferred3_0;
733
+ let deferred3_1;
734
+ try {
735
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
736
+ const len0 = WASM_VECTOR_LEN;
737
+ const ret = wasm.lsp_semantic_tokens(ptr0, len0);
738
+ var ptr2 = ret[0];
739
+ var len2 = ret[1];
740
+ if (ret[3]) {
741
+ ptr2 = 0; len2 = 0;
742
+ throw takeFromExternrefTable0(ret[2]);
743
+ }
744
+ deferred3_0 = ptr2;
745
+ deferred3_1 = len2;
746
+ return getStringFromWasm0(ptr2, len2);
747
+ } finally {
748
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
749
+ }
750
+ }
751
+
752
+ /**
753
+ * @param {string} definitions_json
754
+ * @returns {number}
755
+ */
756
+ export function merge_parsed_source_roots(definitions_json) {
757
+ const ptr0 = passStringToWasm0(definitions_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
758
+ const len0 = WASM_VECTOR_LEN;
759
+ const ret = wasm.merge_parsed_source_roots(ptr0, len0);
760
+ if (ret[2]) {
761
+ throw takeFromExternrefTable0(ret[1]);
762
+ }
763
+ return ret[0] >>> 0;
764
+ }
765
+
766
+ /**
767
+ * @param {Uint8Array} bytes
768
+ * @returns {number}
769
+ */
770
+ export function merge_parsed_source_roots_binary(bytes) {
771
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
772
+ const len0 = WASM_VECTOR_LEN;
773
+ const ret = wasm.merge_parsed_source_roots_binary(ptr0, len0);
774
+ if (ret[2]) {
775
+ throw takeFromExternrefTable0(ret[1]);
776
+ }
777
+ return ret[0] >>> 0;
778
+ }
779
+
780
+ /**
781
+ * Parse Modelica source code and return whether it's valid.
782
+ * @param {string} source
783
+ * @returns {any}
784
+ */
785
+ export function parse(source) {
786
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
787
+ const len0 = WASM_VECTOR_LEN;
788
+ const ret = wasm.parse(ptr0, len0);
789
+ return ret;
790
+ }
791
+
792
+ /**
793
+ * @param {string} source
794
+ * @param {string} filename
795
+ * @returns {string}
796
+ */
797
+ export function parse_source_root_file(source, filename) {
798
+ let deferred4_0;
799
+ let deferred4_1;
800
+ try {
801
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
802
+ const len0 = WASM_VECTOR_LEN;
803
+ const ptr1 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
804
+ const len1 = WASM_VECTOR_LEN;
805
+ const ret = wasm.parse_source_root_file(ptr0, len0, ptr1, len1);
806
+ var ptr3 = ret[0];
807
+ var len3 = ret[1];
808
+ if (ret[3]) {
809
+ ptr3 = 0; len3 = 0;
810
+ throw takeFromExternrefTable0(ret[2]);
811
+ }
812
+ deferred4_0 = ptr3;
813
+ deferred4_1 = len3;
814
+ return getStringFromWasm0(ptr3, len3);
815
+ } finally {
816
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
817
+ }
818
+ }
819
+
820
+ /**
821
+ * @param {string} dae_json
822
+ * @param {string} model_name
823
+ * @param {string} target
824
+ * @param {string} manifest_source
825
+ * @param {string} templates_json
826
+ * @returns {any}
827
+ */
828
+ export function render_target(dae_json, model_name, target, manifest_source, templates_json) {
829
+ const ptr0 = passStringToWasm0(dae_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
830
+ const len0 = WASM_VECTOR_LEN;
831
+ const ptr1 = passStringToWasm0(model_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
832
+ const len1 = WASM_VECTOR_LEN;
833
+ const ptr2 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
834
+ const len2 = WASM_VECTOR_LEN;
835
+ const ptr3 = passStringToWasm0(manifest_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
836
+ const len3 = WASM_VECTOR_LEN;
837
+ const ptr4 = passStringToWasm0(templates_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
838
+ const len4 = WASM_VECTOR_LEN;
839
+ const ret = wasm.render_target(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
840
+ if (ret[2]) {
841
+ throw takeFromExternrefTable0(ret[1]);
842
+ }
843
+ return takeFromExternrefTable0(ret[0]);
844
+ }
845
+
846
+ /**
847
+ * @param {string} project_sources_json
848
+ * @returns {string}
849
+ */
850
+ export function sync_project_sources(project_sources_json) {
851
+ let deferred3_0;
852
+ let deferred3_1;
853
+ try {
854
+ const ptr0 = passStringToWasm0(project_sources_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
855
+ const len0 = WASM_VECTOR_LEN;
856
+ const ret = wasm.sync_project_sources(ptr0, len0);
857
+ var ptr2 = ret[0];
858
+ var len2 = ret[1];
859
+ if (ret[3]) {
860
+ ptr2 = 0; len2 = 0;
861
+ throw takeFromExternrefTable0(ret[2]);
862
+ }
863
+ deferred3_0 = ptr2;
864
+ deferred3_1 = len2;
865
+ return getStringFromWasm0(ptr2, len2);
866
+ } finally {
867
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
868
+ }
869
+ }
870
+
871
+ /**
872
+ * Fallback thread-pool initializer for non-threaded builds.
873
+ * @param {number} _num_threads
874
+ * @returns {boolean}
875
+ */
876
+ export function wasm_init(_num_threads) {
877
+ const ret = wasm.wasm_init(_num_threads);
878
+ return ret !== 0;
879
+ }
880
+
881
+ function __wbg_get_imports() {
882
+ const import0 = {
883
+ __proto__: null,
884
+ __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
885
+ const ret = String(arg1);
886
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
887
+ const len1 = WASM_VECTOR_LEN;
888
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
889
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
890
+ },
891
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
892
+ throw new Error(getStringFromWasm0(arg0, arg1));
893
+ },
894
+ __wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
895
+ let deferred0_0;
896
+ let deferred0_1;
897
+ try {
898
+ deferred0_0 = arg0;
899
+ deferred0_1 = arg1;
900
+ console.error(getStringFromWasm0(arg0, arg1));
901
+ } finally {
902
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
903
+ }
904
+ },
905
+ __wbg_log_30dc80163601f3bb: function(arg0, arg1) {
906
+ console.log(getStringFromWasm0(arg0, arg1));
907
+ },
908
+ __wbg_new_361308b2356cecd0: function() {
909
+ const ret = new Object();
910
+ return ret;
911
+ },
912
+ __wbg_new_3eb36ae241fe6f44: function() {
913
+ const ret = new Array();
914
+ return ret;
915
+ },
916
+ __wbg_new_8a6f238a6ece86ea: function() {
917
+ const ret = new Error();
918
+ return ret;
919
+ },
920
+ __wbg_now_a3af9a2f4bbaa4d1: function() {
921
+ const ret = Date.now();
922
+ return ret;
923
+ },
924
+ __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
925
+ arg0[arg1] = arg2;
926
+ },
927
+ __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
928
+ arg0[arg1 >>> 0] = arg2;
929
+ },
930
+ __wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
931
+ const ret = arg1.stack;
932
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
933
+ const len1 = WASM_VECTOR_LEN;
934
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
935
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
936
+ },
937
+ __wbindgen_cast_0000000000000001: function(arg0) {
938
+ // Cast intrinsic for `F64 -> Externref`.
939
+ const ret = arg0;
940
+ return ret;
941
+ },
942
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
943
+ // Cast intrinsic for `Ref(String) -> Externref`.
944
+ const ret = getStringFromWasm0(arg0, arg1);
945
+ return ret;
946
+ },
947
+ __wbindgen_init_externref_table: function() {
948
+ const table = wasm.__wbindgen_externrefs;
949
+ const offset = table.grow(4);
950
+ table.set(0, undefined);
951
+ table.set(offset + 0, undefined);
952
+ table.set(offset + 1, null);
953
+ table.set(offset + 2, true);
954
+ table.set(offset + 3, false);
955
+ },
956
+ };
957
+ return {
958
+ __proto__: null,
959
+ "./rumoca_bind_wasm_bg.js": import0,
960
+ };
961
+ }
962
+
963
+ function getArrayU8FromWasm0(ptr, len) {
964
+ ptr = ptr >>> 0;
965
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
966
+ }
967
+
968
+ let cachedDataViewMemory0 = null;
969
+ function getDataViewMemory0() {
970
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
971
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
972
+ }
973
+ return cachedDataViewMemory0;
974
+ }
975
+
976
+ function getStringFromWasm0(ptr, len) {
977
+ ptr = ptr >>> 0;
978
+ return decodeText(ptr, len);
979
+ }
980
+
981
+ let cachedUint8ArrayMemory0 = null;
982
+ function getUint8ArrayMemory0() {
983
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
984
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
985
+ }
986
+ return cachedUint8ArrayMemory0;
987
+ }
988
+
989
+ function passArray8ToWasm0(arg, malloc) {
990
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
991
+ getUint8ArrayMemory0().set(arg, ptr / 1);
992
+ WASM_VECTOR_LEN = arg.length;
993
+ return ptr;
994
+ }
995
+
996
+ function passStringToWasm0(arg, malloc, realloc) {
997
+ if (realloc === undefined) {
998
+ const buf = cachedTextEncoder.encode(arg);
999
+ const ptr = malloc(buf.length, 1) >>> 0;
1000
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1001
+ WASM_VECTOR_LEN = buf.length;
1002
+ return ptr;
1003
+ }
1004
+
1005
+ let len = arg.length;
1006
+ let ptr = malloc(len, 1) >>> 0;
1007
+
1008
+ const mem = getUint8ArrayMemory0();
1009
+
1010
+ let offset = 0;
1011
+
1012
+ for (; offset < len; offset++) {
1013
+ const code = arg.charCodeAt(offset);
1014
+ if (code > 0x7F) break;
1015
+ mem[ptr + offset] = code;
1016
+ }
1017
+ if (offset !== len) {
1018
+ if (offset !== 0) {
1019
+ arg = arg.slice(offset);
1020
+ }
1021
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1022
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1023
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1024
+
1025
+ offset += ret.written;
1026
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1027
+ }
1028
+
1029
+ WASM_VECTOR_LEN = offset;
1030
+ return ptr;
1031
+ }
1032
+
1033
+ function takeFromExternrefTable0(idx) {
1034
+ const value = wasm.__wbindgen_externrefs.get(idx);
1035
+ wasm.__externref_table_dealloc(idx);
1036
+ return value;
1037
+ }
1038
+
1039
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1040
+ cachedTextDecoder.decode();
1041
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1042
+ let numBytesDecoded = 0;
1043
+ function decodeText(ptr, len) {
1044
+ numBytesDecoded += len;
1045
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1046
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1047
+ cachedTextDecoder.decode();
1048
+ numBytesDecoded = len;
1049
+ }
1050
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1051
+ }
1052
+
1053
+ const cachedTextEncoder = new TextEncoder();
1054
+
1055
+ if (!('encodeInto' in cachedTextEncoder)) {
1056
+ cachedTextEncoder.encodeInto = function (arg, view) {
1057
+ const buf = cachedTextEncoder.encode(arg);
1058
+ view.set(buf);
1059
+ return {
1060
+ read: arg.length,
1061
+ written: buf.length
1062
+ };
1063
+ };
1064
+ }
1065
+
1066
+ let WASM_VECTOR_LEN = 0;
1067
+
1068
+ let wasmModule, wasm;
1069
+ function __wbg_finalize_init(instance, module) {
1070
+ wasm = instance.exports;
1071
+ wasmModule = module;
1072
+ cachedDataViewMemory0 = null;
1073
+ cachedUint8ArrayMemory0 = null;
1074
+ wasm.__wbindgen_start();
1075
+ return wasm;
1076
+ }
1077
+
1078
+ async function __wbg_load(module, imports) {
1079
+ if (typeof Response === 'function' && module instanceof Response) {
1080
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1081
+ try {
1082
+ return await WebAssembly.instantiateStreaming(module, imports);
1083
+ } catch (e) {
1084
+ const validResponse = module.ok && expectedResponseType(module.type);
1085
+
1086
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1087
+ 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);
1088
+
1089
+ } else { throw e; }
1090
+ }
1091
+ }
1092
+
1093
+ const bytes = await module.arrayBuffer();
1094
+ return await WebAssembly.instantiate(bytes, imports);
1095
+ } else {
1096
+ const instance = await WebAssembly.instantiate(module, imports);
1097
+
1098
+ if (instance instanceof WebAssembly.Instance) {
1099
+ return { instance, module };
1100
+ } else {
1101
+ return instance;
1102
+ }
1103
+ }
1104
+
1105
+ function expectedResponseType(type) {
1106
+ switch (type) {
1107
+ case 'basic': case 'cors': case 'default': return true;
1108
+ }
1109
+ return false;
1110
+ }
1111
+ }
1112
+
1113
+ function initSync(module) {
1114
+ if (wasm !== undefined) return wasm;
1115
+
1116
+
1117
+ if (module !== undefined) {
1118
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1119
+ ({module} = module)
1120
+ } else {
1121
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1122
+ }
1123
+ }
1124
+
1125
+ const imports = __wbg_get_imports();
1126
+ if (!(module instanceof WebAssembly.Module)) {
1127
+ module = new WebAssembly.Module(module);
1128
+ }
1129
+ const instance = new WebAssembly.Instance(module, imports);
1130
+ return __wbg_finalize_init(instance, module);
1131
+ }
1132
+
1133
+ async function __wbg_init(module_or_path) {
1134
+ if (wasm !== undefined) return wasm;
1135
+
1136
+
1137
+ if (module_or_path !== undefined) {
1138
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1139
+ ({module_or_path} = module_or_path)
1140
+ } else {
1141
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1142
+ }
1143
+ }
1144
+
1145
+ if (module_or_path === undefined) {
1146
+ module_or_path = new URL('rumoca_bind_wasm_bg.wasm', import.meta.url);
1147
+ }
1148
+ const imports = __wbg_get_imports();
1149
+
1150
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1151
+ module_or_path = fetch(module_or_path);
1152
+ }
1153
+
1154
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1155
+
1156
+ return __wbg_finalize_init(instance, module);
1157
+ }
1158
+
1159
+ export { initSync, __wbg_init as default };