windmill-parser-wasm-ts 1.385.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 ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "windmill-parser-wasm-ts",
3
+ "collaborators": [
4
+ "Ruben Fiszel <ruben@windmill.dev>"
5
+ ],
6
+ "version": "1.385.0",
7
+ "files": [
8
+ "windmill_parser_wasm_bg.wasm",
9
+ "windmill_parser_wasm.js",
10
+ "windmill_parser_wasm.d.ts"
11
+ ],
12
+ "module": "windmill_parser_wasm.js",
13
+ "types": "windmill_parser_wasm.d.ts",
14
+ "sideEffects": [
15
+ "./snippets/*"
16
+ ]
17
+ }
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @param {string} code
5
+ * @returns {string}
6
+ */
7
+ export function parse_deno(code: string): string;
8
+ /**
9
+ * @param {string} code
10
+ * @returns {string}
11
+ */
12
+ export function parse_outputs(code: string): string;
13
+ /**
14
+ * @param {string} code
15
+ * @returns {string}
16
+ */
17
+ export function parse_ts_imports(code: string): string;
18
+
19
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
20
+
21
+ export interface InitOutput {
22
+ readonly memory: WebAssembly.Memory;
23
+ readonly parse_deno: (a: number, b: number, c: number) => void;
24
+ readonly parse_outputs: (a: number, b: number, c: number) => void;
25
+ readonly parse_ts_imports: (a: number, b: number, c: number) => void;
26
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
27
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
28
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
29
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
30
+ readonly __wbindgen_exn_store: (a: number) => void;
31
+ }
32
+
33
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
34
+ /**
35
+ * Instantiates the given `module`, which can either be bytes or
36
+ * a precompiled `WebAssembly.Module`.
37
+ *
38
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
39
+ *
40
+ * @returns {InitOutput}
41
+ */
42
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
43
+
44
+ /**
45
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
46
+ * for everything else, calls `WebAssembly.instantiate` directly.
47
+ *
48
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
49
+ *
50
+ * @returns {Promise<InitOutput>}
51
+ */
52
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
@@ -0,0 +1,537 @@
1
+ let wasm;
2
+
3
+ const heap = new Array(128).fill(undefined);
4
+
5
+ heap.push(undefined, null, true, false);
6
+
7
+ function getObject(idx) { return heap[idx]; }
8
+
9
+ let heap_next = heap.length;
10
+
11
+ function dropObject(idx) {
12
+ if (idx < 132) return;
13
+ heap[idx] = heap_next;
14
+ heap_next = idx;
15
+ }
16
+
17
+ function takeObject(idx) {
18
+ const ret = getObject(idx);
19
+ dropObject(idx);
20
+ return ret;
21
+ }
22
+
23
+ let WASM_VECTOR_LEN = 0;
24
+
25
+ let cachedUint8ArrayMemory0 = null;
26
+
27
+ function getUint8ArrayMemory0() {
28
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
29
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
30
+ }
31
+ return cachedUint8ArrayMemory0;
32
+ }
33
+
34
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
35
+
36
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
37
+ ? function (arg, view) {
38
+ return cachedTextEncoder.encodeInto(arg, view);
39
+ }
40
+ : function (arg, view) {
41
+ const buf = cachedTextEncoder.encode(arg);
42
+ view.set(buf);
43
+ return {
44
+ read: arg.length,
45
+ written: buf.length
46
+ };
47
+ });
48
+
49
+ function passStringToWasm0(arg, malloc, realloc) {
50
+
51
+ if (realloc === undefined) {
52
+ const buf = cachedTextEncoder.encode(arg);
53
+ const ptr = malloc(buf.length, 1) >>> 0;
54
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
55
+ WASM_VECTOR_LEN = buf.length;
56
+ return ptr;
57
+ }
58
+
59
+ let len = arg.length;
60
+ let ptr = malloc(len, 1) >>> 0;
61
+
62
+ const mem = getUint8ArrayMemory0();
63
+
64
+ let offset = 0;
65
+
66
+ for (; offset < len; offset++) {
67
+ const code = arg.charCodeAt(offset);
68
+ if (code > 0x7F) break;
69
+ mem[ptr + offset] = code;
70
+ }
71
+
72
+ if (offset !== len) {
73
+ if (offset !== 0) {
74
+ arg = arg.slice(offset);
75
+ }
76
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
77
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
78
+ const ret = encodeString(arg, view);
79
+
80
+ offset += ret.written;
81
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
82
+ }
83
+
84
+ WASM_VECTOR_LEN = offset;
85
+ return ptr;
86
+ }
87
+
88
+ function isLikeNone(x) {
89
+ return x === undefined || x === null;
90
+ }
91
+
92
+ let cachedDataViewMemory0 = null;
93
+
94
+ function getDataViewMemory0() {
95
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
96
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
97
+ }
98
+ return cachedDataViewMemory0;
99
+ }
100
+
101
+ function addHeapObject(obj) {
102
+ if (heap_next === heap.length) heap.push(heap.length + 1);
103
+ const idx = heap_next;
104
+ heap_next = heap[idx];
105
+
106
+ heap[idx] = obj;
107
+ return idx;
108
+ }
109
+
110
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
111
+
112
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
113
+
114
+ function getStringFromWasm0(ptr, len) {
115
+ ptr = ptr >>> 0;
116
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
117
+ }
118
+
119
+ function debugString(val) {
120
+ // primitive types
121
+ const type = typeof val;
122
+ if (type == 'number' || type == 'boolean' || val == null) {
123
+ return `${val}`;
124
+ }
125
+ if (type == 'string') {
126
+ return `"${val}"`;
127
+ }
128
+ if (type == 'symbol') {
129
+ const description = val.description;
130
+ if (description == null) {
131
+ return 'Symbol';
132
+ } else {
133
+ return `Symbol(${description})`;
134
+ }
135
+ }
136
+ if (type == 'function') {
137
+ const name = val.name;
138
+ if (typeof name == 'string' && name.length > 0) {
139
+ return `Function(${name})`;
140
+ } else {
141
+ return 'Function';
142
+ }
143
+ }
144
+ // objects
145
+ if (Array.isArray(val)) {
146
+ const length = val.length;
147
+ let debug = '[';
148
+ if (length > 0) {
149
+ debug += debugString(val[0]);
150
+ }
151
+ for(let i = 1; i < length; i++) {
152
+ debug += ', ' + debugString(val[i]);
153
+ }
154
+ debug += ']';
155
+ return debug;
156
+ }
157
+ // Test for built-in
158
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
159
+ let className;
160
+ if (builtInMatches.length > 1) {
161
+ className = builtInMatches[1];
162
+ } else {
163
+ // Failed to match the standard '[object ClassName]'
164
+ return toString.call(val);
165
+ }
166
+ if (className == 'Object') {
167
+ // we're a user defined class or Object
168
+ // JSON.stringify avoids problems with cycles, and is generally much
169
+ // easier than looping through ownProperties of `val`.
170
+ try {
171
+ return 'Object(' + JSON.stringify(val) + ')';
172
+ } catch (_) {
173
+ return 'Object';
174
+ }
175
+ }
176
+ // errors
177
+ if (val instanceof Error) {
178
+ return `${val.name}: ${val.message}\n${val.stack}`;
179
+ }
180
+ // TODO we could test for more things here, like `Set`s and `Map`s.
181
+ return className;
182
+ }
183
+ /**
184
+ * @param {string} code
185
+ * @returns {string}
186
+ */
187
+ export function parse_deno(code) {
188
+ let deferred2_0;
189
+ let deferred2_1;
190
+ try {
191
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
192
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
193
+ const len0 = WASM_VECTOR_LEN;
194
+ wasm.parse_deno(retptr, ptr0, len0);
195
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
196
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
197
+ deferred2_0 = r0;
198
+ deferred2_1 = r1;
199
+ return getStringFromWasm0(r0, r1);
200
+ } finally {
201
+ wasm.__wbindgen_add_to_stack_pointer(16);
202
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
203
+ }
204
+ }
205
+
206
+ /**
207
+ * @param {string} code
208
+ * @returns {string}
209
+ */
210
+ export function parse_outputs(code) {
211
+ let deferred2_0;
212
+ let deferred2_1;
213
+ try {
214
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
215
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
216
+ const len0 = WASM_VECTOR_LEN;
217
+ wasm.parse_outputs(retptr, ptr0, len0);
218
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
219
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
220
+ deferred2_0 = r0;
221
+ deferred2_1 = r1;
222
+ return getStringFromWasm0(r0, r1);
223
+ } finally {
224
+ wasm.__wbindgen_add_to_stack_pointer(16);
225
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
226
+ }
227
+ }
228
+
229
+ /**
230
+ * @param {string} code
231
+ * @returns {string}
232
+ */
233
+ export function parse_ts_imports(code) {
234
+ let deferred2_0;
235
+ let deferred2_1;
236
+ try {
237
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
238
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
239
+ const len0 = WASM_VECTOR_LEN;
240
+ wasm.parse_ts_imports(retptr, ptr0, len0);
241
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
242
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
243
+ deferred2_0 = r0;
244
+ deferred2_1 = r1;
245
+ return getStringFromWasm0(r0, r1);
246
+ } finally {
247
+ wasm.__wbindgen_add_to_stack_pointer(16);
248
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
249
+ }
250
+ }
251
+
252
+ function handleError(f, args) {
253
+ try {
254
+ return f.apply(this, args);
255
+ } catch (e) {
256
+ wasm.__wbindgen_exn_store(addHeapObject(e));
257
+ }
258
+ }
259
+
260
+ async function __wbg_load(module, imports) {
261
+ if (typeof Response === 'function' && module instanceof Response) {
262
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
263
+ try {
264
+ return await WebAssembly.instantiateStreaming(module, imports);
265
+
266
+ } catch (e) {
267
+ if (module.headers.get('Content-Type') != 'application/wasm') {
268
+ 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);
269
+
270
+ } else {
271
+ throw e;
272
+ }
273
+ }
274
+ }
275
+
276
+ const bytes = await module.arrayBuffer();
277
+ return await WebAssembly.instantiate(bytes, imports);
278
+
279
+ } else {
280
+ const instance = await WebAssembly.instantiate(module, imports);
281
+
282
+ if (instance instanceof WebAssembly.Instance) {
283
+ return { instance, module };
284
+
285
+ } else {
286
+ return instance;
287
+ }
288
+ }
289
+ }
290
+
291
+ function __wbg_get_imports() {
292
+ const imports = {};
293
+ imports.wbg = {};
294
+ imports.wbg.__wbg_eval_204ec87eadeaef4a = function(arg0, arg1) {
295
+ const ret = eval(getStringFromWasm0(arg0, arg1));
296
+ return addHeapObject(ret);
297
+ };
298
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
299
+ takeObject(arg0);
300
+ };
301
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
302
+ const obj = getObject(arg1);
303
+ const ret = typeof(obj) === 'string' ? obj : undefined;
304
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
305
+ var len1 = WASM_VECTOR_LEN;
306
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
307
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
308
+ };
309
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
310
+ const v = getObject(arg0);
311
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
312
+ return ret;
313
+ };
314
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
315
+ const ret = typeof(getObject(arg0)) === 'bigint';
316
+ return ret;
317
+ };
318
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
319
+ const obj = getObject(arg1);
320
+ const ret = typeof(obj) === 'number' ? obj : undefined;
321
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
322
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
323
+ };
324
+ imports.wbg.__wbindgen_is_object = function(arg0) {
325
+ const val = getObject(arg0);
326
+ const ret = typeof(val) === 'object' && val !== null;
327
+ return ret;
328
+ };
329
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
330
+ const ret = getObject(arg0) in getObject(arg1);
331
+ return ret;
332
+ };
333
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
334
+ const ret = arg0;
335
+ return addHeapObject(ret);
336
+ };
337
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
338
+ const ret = getObject(arg0) === getObject(arg1);
339
+ return ret;
340
+ };
341
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
342
+ const ret = BigInt.asUintN(64, arg0);
343
+ return addHeapObject(ret);
344
+ };
345
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
346
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
347
+ return addHeapObject(ret);
348
+ };
349
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
350
+ const ret = getObject(arg0) == getObject(arg1);
351
+ return ret;
352
+ };
353
+ imports.wbg.__wbg_get_3baa728f9d58d3f6 = function(arg0, arg1) {
354
+ const ret = getObject(arg0)[arg1 >>> 0];
355
+ return addHeapObject(ret);
356
+ };
357
+ imports.wbg.__wbg_length_ae22078168b726f5 = function(arg0) {
358
+ const ret = getObject(arg0).length;
359
+ return ret;
360
+ };
361
+ imports.wbg.__wbindgen_is_function = function(arg0) {
362
+ const ret = typeof(getObject(arg0)) === 'function';
363
+ return ret;
364
+ };
365
+ imports.wbg.__wbg_next_de3e9db4440638b2 = function(arg0) {
366
+ const ret = getObject(arg0).next;
367
+ return addHeapObject(ret);
368
+ };
369
+ imports.wbg.__wbg_next_f9cb570345655b9a = function() { return handleError(function (arg0) {
370
+ const ret = getObject(arg0).next();
371
+ return addHeapObject(ret);
372
+ }, arguments) };
373
+ imports.wbg.__wbg_done_bfda7aa8f252b39f = function(arg0) {
374
+ const ret = getObject(arg0).done;
375
+ return ret;
376
+ };
377
+ imports.wbg.__wbg_value_6d39332ab4788d86 = function(arg0) {
378
+ const ret = getObject(arg0).value;
379
+ return addHeapObject(ret);
380
+ };
381
+ imports.wbg.__wbg_iterator_888179a48810a9fe = function() {
382
+ const ret = Symbol.iterator;
383
+ return addHeapObject(ret);
384
+ };
385
+ imports.wbg.__wbg_get_224d16597dbbfd96 = function() { return handleError(function (arg0, arg1) {
386
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
387
+ return addHeapObject(ret);
388
+ }, arguments) };
389
+ imports.wbg.__wbg_call_1084a111329e68ce = function() { return handleError(function (arg0, arg1) {
390
+ const ret = getObject(arg0).call(getObject(arg1));
391
+ return addHeapObject(ret);
392
+ }, arguments) };
393
+ imports.wbg.__wbg_isArray_8364a5371e9737d8 = function(arg0) {
394
+ const ret = Array.isArray(getObject(arg0));
395
+ return ret;
396
+ };
397
+ imports.wbg.__wbg_instanceof_ArrayBuffer_61dfc3198373c902 = function(arg0) {
398
+ let result;
399
+ try {
400
+ result = getObject(arg0) instanceof ArrayBuffer;
401
+ } catch (_) {
402
+ result = false;
403
+ }
404
+ const ret = result;
405
+ return ret;
406
+ };
407
+ imports.wbg.__wbg_instanceof_Map_763ce0e95960d55e = function(arg0) {
408
+ let result;
409
+ try {
410
+ result = getObject(arg0) instanceof Map;
411
+ } catch (_) {
412
+ result = false;
413
+ }
414
+ const ret = result;
415
+ return ret;
416
+ };
417
+ imports.wbg.__wbg_isSafeInteger_7f1ed56200d90674 = function(arg0) {
418
+ const ret = Number.isSafeInteger(getObject(arg0));
419
+ return ret;
420
+ };
421
+ imports.wbg.__wbg_entries_7a0e06255456ebcd = function(arg0) {
422
+ const ret = Object.entries(getObject(arg0));
423
+ return addHeapObject(ret);
424
+ };
425
+ imports.wbg.__wbg_buffer_b7b08af79b0b0974 = function(arg0) {
426
+ const ret = getObject(arg0).buffer;
427
+ return addHeapObject(ret);
428
+ };
429
+ imports.wbg.__wbg_new_ea1883e1e5e86686 = function(arg0) {
430
+ const ret = new Uint8Array(getObject(arg0));
431
+ return addHeapObject(ret);
432
+ };
433
+ imports.wbg.__wbg_set_d1e79e2388520f18 = function(arg0, arg1, arg2) {
434
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
435
+ };
436
+ imports.wbg.__wbg_length_8339fcf5d8ecd12e = function(arg0) {
437
+ const ret = getObject(arg0).length;
438
+ return ret;
439
+ };
440
+ imports.wbg.__wbg_instanceof_Uint8Array_247a91427532499e = function(arg0) {
441
+ let result;
442
+ try {
443
+ result = getObject(arg0) instanceof Uint8Array;
444
+ } catch (_) {
445
+ result = false;
446
+ }
447
+ const ret = result;
448
+ return ret;
449
+ };
450
+ imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
451
+ const v = getObject(arg1);
452
+ const ret = typeof(v) === 'bigint' ? v : undefined;
453
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
454
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
455
+ };
456
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
457
+ const ret = debugString(getObject(arg1));
458
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
459
+ const len1 = WASM_VECTOR_LEN;
460
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
461
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
462
+ };
463
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
464
+ throw new Error(getStringFromWasm0(arg0, arg1));
465
+ };
466
+ imports.wbg.__wbindgen_memory = function() {
467
+ const ret = wasm.memory;
468
+ return addHeapObject(ret);
469
+ };
470
+
471
+ return imports;
472
+ }
473
+
474
+ function __wbg_init_memory(imports, memory) {
475
+
476
+ }
477
+
478
+ function __wbg_finalize_init(instance, module) {
479
+ wasm = instance.exports;
480
+ __wbg_init.__wbindgen_wasm_module = module;
481
+ cachedDataViewMemory0 = null;
482
+ cachedUint8ArrayMemory0 = null;
483
+
484
+
485
+
486
+ return wasm;
487
+ }
488
+
489
+ function initSync(module) {
490
+ if (wasm !== undefined) return wasm;
491
+
492
+
493
+ if (typeof module !== 'undefined' && Object.getPrototypeOf(module) === Object.prototype)
494
+ ({module} = module)
495
+ else
496
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
497
+
498
+ const imports = __wbg_get_imports();
499
+
500
+ __wbg_init_memory(imports);
501
+
502
+ if (!(module instanceof WebAssembly.Module)) {
503
+ module = new WebAssembly.Module(module);
504
+ }
505
+
506
+ const instance = new WebAssembly.Instance(module, imports);
507
+
508
+ return __wbg_finalize_init(instance, module);
509
+ }
510
+
511
+ async function __wbg_init(module_or_path) {
512
+ if (wasm !== undefined) return wasm;
513
+
514
+
515
+ if (typeof module_or_path !== 'undefined' && Object.getPrototypeOf(module_or_path) === Object.prototype)
516
+ ({module_or_path} = module_or_path)
517
+ else
518
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
519
+
520
+ if (typeof module_or_path === 'undefined') {
521
+ module_or_path = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
522
+ }
523
+ const imports = __wbg_get_imports();
524
+
525
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
526
+ module_or_path = fetch(module_or_path);
527
+ }
528
+
529
+ __wbg_init_memory(imports);
530
+
531
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
532
+
533
+ return __wbg_finalize_init(instance, module);
534
+ }
535
+
536
+ export { initSync };
537
+ export default __wbg_init;
Binary file