@ensomi/runtime 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +28 -0
- package/package.json +34 -3
- package/pkg/ensomi_generate_wasm.d.ts +109 -0
- package/pkg/ensomi_generate_wasm.js +806 -0
- package/pkg/ensomi_generate_wasm_bg.wasm +0 -0
- package/pkg/ensomi_generate_wasm_bg.wasm.d.ts +25 -0
- package/resampler/resample-11025-boundary.bin +0 -0
- package/resampler/resample-11025.bin +0 -0
- package/resampler/resample-11025.json +18 -0
- package/resampler/resample-16000-boundary.bin +0 -0
- package/resampler/resample-16000.bin +0 -0
- package/resampler/resample-16000.json +18 -0
- package/resampler/resample-192000-boundary.bin +0 -0
- package/resampler/resample-192000.bin +0 -0
- package/resampler/resample-192000.json +18 -0
- package/resampler/resample-24000-boundary.bin +0 -0
- package/resampler/resample-24000.bin +0 -0
- package/resampler/resample-24000.json +18 -0
- package/resampler/resample-32000-boundary.bin +0 -0
- package/resampler/resample-32000.bin +0 -0
- package/resampler/resample-32000.json +18 -0
- package/resampler/resample-44100-boundary.bin +0 -0
- package/resampler/resample-44100.bin +0 -0
- package/resampler/resample-44100.json +18 -0
- package/resampler/resample-48000-boundary.bin +0 -0
- package/resampler/resample-48000.bin +0 -0
- package/resampler/resample-48000.json +18 -0
- package/resampler/resample-88200-boundary.bin +0 -0
- package/resampler/resample-88200.bin +0 -0
- package/resampler/resample-88200.json +18 -0
- package/resampler/resample-96000-boundary.bin +0 -0
- package/resampler/resample-96000.bin +0 -0
- package/resampler/resample-96000.json +18 -0
- package/src/core.js +40 -0
- package/src/decode_audio.js +22 -0
- package/src/export.js +31 -0
- package/src/generate.js +73 -0
- package/src/index.d.ts +157 -0
- package/src/index.js +5 -0
- package/src/models.js +116 -0
- package/src/types.js +7 -0
|
@@ -0,0 +1,806 @@
|
|
|
1
|
+
/* @ts-self-types="./ensomi_generate_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Recorded random draws, to replay a release recording. Passing it to a generator moves it there.
|
|
5
|
+
*/
|
|
6
|
+
export class ReplayDraws {
|
|
7
|
+
__destroy_into_raw() {
|
|
8
|
+
const ptr = this.__wbg_ptr;
|
|
9
|
+
this.__wbg_ptr = 0;
|
|
10
|
+
ReplayDrawsFinalization.unregister(this);
|
|
11
|
+
return ptr;
|
|
12
|
+
}
|
|
13
|
+
free() {
|
|
14
|
+
const ptr = this.__destroy_into_raw();
|
|
15
|
+
__wbg_call_guard();
|
|
16
|
+
wasm.__wbg_replaydraws_free(ptr, 0);
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} name
|
|
21
|
+
* @param {string} kind
|
|
22
|
+
* @param {Float64Array} values
|
|
23
|
+
* @param {number} chosen
|
|
24
|
+
*/
|
|
25
|
+
add(name, kind, values, chosen) {
|
|
26
|
+
if (this.__wbg_inst !== undefined && this.__wbg_inst !== __wbg_instance_id) {
|
|
27
|
+
throw new Error('Invalid stale object from previous Wasm instance');
|
|
28
|
+
}
|
|
29
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
30
|
+
const len0 = WASM_VECTOR_LEN;
|
|
31
|
+
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
32
|
+
const len1 = WASM_VECTOR_LEN;
|
|
33
|
+
__wbg_call_guard();
|
|
34
|
+
wasm.replaydraws_add(this.__wbg_ptr, ptr0, len0, ptr1, len1, values, chosen);
|
|
35
|
+
}
|
|
36
|
+
constructor() {
|
|
37
|
+
let ret;
|
|
38
|
+
__wbg_call_guard();
|
|
39
|
+
ret = wasm.replaydraws_new();
|
|
40
|
+
this.__wbg_ptr = ret;
|
|
41
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
42
|
+
ReplayDrawsFinalization.register(this, { ptr: ret, instance: __wbg_instance_id }, this);
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @returns {number}
|
|
47
|
+
*/
|
|
48
|
+
recorded() {
|
|
49
|
+
if (this.__wbg_inst !== undefined && this.__wbg_inst !== __wbg_instance_id) {
|
|
50
|
+
throw new Error('Invalid stale object from previous Wasm instance');
|
|
51
|
+
}
|
|
52
|
+
let ret;
|
|
53
|
+
__wbg_call_guard();
|
|
54
|
+
ret = wasm.replaydraws_recorded(this.__wbg_ptr);
|
|
55
|
+
return ret >>> 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (Symbol.dispose) ReplayDraws.prototype[Symbol.dispose] = ReplayDraws.prototype.free;
|
|
59
|
+
|
|
60
|
+
export class WasmGenerator {
|
|
61
|
+
__destroy_into_raw() {
|
|
62
|
+
const ptr = this.__wbg_ptr;
|
|
63
|
+
this.__wbg_ptr = 0;
|
|
64
|
+
WasmGeneratorFinalization.unregister(this);
|
|
65
|
+
return ptr;
|
|
66
|
+
}
|
|
67
|
+
free() {
|
|
68
|
+
const ptr = this.__destroy_into_raw();
|
|
69
|
+
__wbg_call_guard();
|
|
70
|
+
wasm.__wbg_wasmgenerator_free(ptr, 0);
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* `samples` is a `Float32Array` or `Float64Array` of interleaved PCM. `resampler` is the array
|
|
75
|
+
* of the three `resamplerFiles` for `sample_rate`, when there is no `beatthis` stream. `request_json`
|
|
76
|
+
* is the request without its seed, which is passed as a BigInt. `clock` returns milliseconds.
|
|
77
|
+
* @param {WasmModels} models
|
|
78
|
+
* @param {any} samples
|
|
79
|
+
* @param {number} channels
|
|
80
|
+
* @param {number} sample_rate
|
|
81
|
+
* @param {Float32Array | null | undefined} mel
|
|
82
|
+
* @param {Float32Array | null | undefined} beatthis
|
|
83
|
+
* @param {Array<any> | null | undefined} resampler
|
|
84
|
+
* @param {string} request_json
|
|
85
|
+
* @param {bigint} seed
|
|
86
|
+
* @param {boolean} seed_is_bigint
|
|
87
|
+
* @param {string | null | undefined} setting
|
|
88
|
+
* @param {string | null | undefined} audio_name
|
|
89
|
+
* @param {Function} clock
|
|
90
|
+
* @param {ReplayDraws | null} [replay]
|
|
91
|
+
*/
|
|
92
|
+
constructor(models, samples, channels, sample_rate, mel, beatthis, resampler, request_json, seed, seed_is_bigint, setting, audio_name, clock, replay) {
|
|
93
|
+
_assertClass(models, WasmModels);
|
|
94
|
+
if ((models).__wbg_inst !== undefined && (models).__wbg_inst !== __wbg_instance_id) {
|
|
95
|
+
throw new Error('Invalid stale object from previous Wasm instance');
|
|
96
|
+
}
|
|
97
|
+
const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
98
|
+
const len0 = WASM_VECTOR_LEN;
|
|
99
|
+
var ptr1 = isLikeNone(setting) ? 0 : passStringToWasm0(setting, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
100
|
+
var len1 = WASM_VECTOR_LEN;
|
|
101
|
+
var ptr2 = isLikeNone(audio_name) ? 0 : passStringToWasm0(audio_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
102
|
+
var len2 = WASM_VECTOR_LEN;
|
|
103
|
+
let ptr3 = 0;
|
|
104
|
+
if (!isLikeNone(replay)) {
|
|
105
|
+
_assertClass(replay, ReplayDraws);
|
|
106
|
+
if ((replay).__wbg_inst !== undefined && (replay).__wbg_inst !== __wbg_instance_id) {
|
|
107
|
+
throw new Error('Invalid stale object from previous Wasm instance');
|
|
108
|
+
}
|
|
109
|
+
ptr3 = replay.__destroy_into_raw();
|
|
110
|
+
}
|
|
111
|
+
let ret;
|
|
112
|
+
__wbg_call_guard();
|
|
113
|
+
ret = wasm.wasmgenerator_new(models.__wbg_ptr, samples, channels, sample_rate, isLikeNone(mel) ? 0 : addToExternrefTable0(mel), isLikeNone(beatthis) ? 0 : addToExternrefTable0(beatthis), isLikeNone(resampler) ? 0 : addToExternrefTable0(resampler), ptr0, len0, seed, seed_is_bigint, ptr1, len1, ptr2, len2, clock, ptr3);
|
|
114
|
+
if (ret[2]) {
|
|
115
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
116
|
+
}
|
|
117
|
+
this.__wbg_ptr = ret[0];
|
|
118
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
119
|
+
WasmGeneratorFinalization.register(this, { ptr: ret[0], instance: __wbg_instance_id }, this);
|
|
120
|
+
return this;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The next step. Pass the outputs of the graph the previous step asked for as an object of
|
|
124
|
+
* `{type, dims, data}` by output name, and `undefined` otherwise.
|
|
125
|
+
* @param {any} outputs
|
|
126
|
+
* @returns {any}
|
|
127
|
+
*/
|
|
128
|
+
step(outputs) {
|
|
129
|
+
if (this.__wbg_inst !== undefined && this.__wbg_inst !== __wbg_instance_id) {
|
|
130
|
+
throw new Error('Invalid stale object from previous Wasm instance');
|
|
131
|
+
}
|
|
132
|
+
let ret;
|
|
133
|
+
__wbg_call_guard();
|
|
134
|
+
ret = wasm.wasmgenerator_step(this.__wbg_ptr, outputs);
|
|
135
|
+
if (ret[2]) {
|
|
136
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
137
|
+
}
|
|
138
|
+
return takeFromExternrefTable0(ret[0]);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Does a slice of the work that needs no graph outputs (the Log-Mel spectrogram while BeatThis
|
|
142
|
+
* runs) and returns whether any is left. Call it after a `run` step while the graph runs.
|
|
143
|
+
* @returns {boolean}
|
|
144
|
+
*/
|
|
145
|
+
work() {
|
|
146
|
+
if (this.__wbg_inst !== undefined && this.__wbg_inst !== __wbg_instance_id) {
|
|
147
|
+
throw new Error('Invalid stale object from previous Wasm instance');
|
|
148
|
+
}
|
|
149
|
+
let ret;
|
|
150
|
+
__wbg_call_guard();
|
|
151
|
+
ret = wasm.wasmgenerator_work(this.__wbg_ptr);
|
|
152
|
+
return ret !== 0;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (Symbol.dispose) WasmGenerator.prototype[Symbol.dispose] = WasmGenerator.prototype.free;
|
|
156
|
+
|
|
157
|
+
export class WasmModels {
|
|
158
|
+
__destroy_into_raw() {
|
|
159
|
+
const ptr = this.__wbg_ptr;
|
|
160
|
+
this.__wbg_ptr = 0;
|
|
161
|
+
WasmModelsFinalization.unregister(this);
|
|
162
|
+
return ptr;
|
|
163
|
+
}
|
|
164
|
+
free() {
|
|
165
|
+
const ptr = this.__destroy_into_raw();
|
|
166
|
+
__wbg_call_guard();
|
|
167
|
+
wasm.__wbg_wasmmodels_free(ptr, 0);
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* EnsomiProtocol `ModelCapabilities` as JSON.
|
|
172
|
+
* @returns {string}
|
|
173
|
+
*/
|
|
174
|
+
capabilities() {
|
|
175
|
+
let deferred1_0;
|
|
176
|
+
let deferred1_1;
|
|
177
|
+
try {
|
|
178
|
+
if (this.__wbg_inst !== undefined && this.__wbg_inst !== __wbg_instance_id) {
|
|
179
|
+
throw new Error('Invalid stale object from previous Wasm instance');
|
|
180
|
+
}
|
|
181
|
+
let ret;
|
|
182
|
+
__wbg_call_guard();
|
|
183
|
+
ret = wasm.wasmmodels_capabilities(this.__wbg_ptr);
|
|
184
|
+
deferred1_0 = ret[0];
|
|
185
|
+
deferred1_1 = ret[1];
|
|
186
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
187
|
+
} finally {
|
|
188
|
+
__wbg_call_guard();
|
|
189
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* `files` maps each path to its bytes (`Uint8Array`).
|
|
194
|
+
* @param {string} manifest_json
|
|
195
|
+
* @param {object} files
|
|
196
|
+
*/
|
|
197
|
+
constructor(manifest_json, files) {
|
|
198
|
+
const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
199
|
+
const len0 = WASM_VECTOR_LEN;
|
|
200
|
+
let ret;
|
|
201
|
+
__wbg_call_guard();
|
|
202
|
+
ret = wasm.wasmmodels_new(ptr0, len0, files);
|
|
203
|
+
if (ret[2]) {
|
|
204
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
205
|
+
}
|
|
206
|
+
this.__wbg_ptr = ret[0];
|
|
207
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
208
|
+
WasmModelsFinalization.register(this, { ptr: ret[0], instance: __wbg_instance_id }, this);
|
|
209
|
+
return this;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* The files, other than graphs, that `new WasmModels` needs for this `runtime.json`.
|
|
213
|
+
* @param {string} manifest_json
|
|
214
|
+
* @returns {Array<any>}
|
|
215
|
+
*/
|
|
216
|
+
static requiredFiles(manifest_json) {
|
|
217
|
+
const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
218
|
+
const len0 = WASM_VECTOR_LEN;
|
|
219
|
+
let ret;
|
|
220
|
+
__wbg_call_guard();
|
|
221
|
+
ret = wasm.wasmmodels_requiredFiles(ptr0, len0);
|
|
222
|
+
if (ret[2]) {
|
|
223
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
224
|
+
}
|
|
225
|
+
return takeFromExternrefTable0(ret[0]);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The three `resample-*` files for a PCM sample rate the release bundles tables for, or null.
|
|
229
|
+
* @param {number} sample_rate
|
|
230
|
+
* @returns {any}
|
|
231
|
+
*/
|
|
232
|
+
static resamplerFiles(sample_rate) {
|
|
233
|
+
let ret;
|
|
234
|
+
__wbg_call_guard();
|
|
235
|
+
ret = wasm.wasmmodels_resamplerFiles(sample_rate);
|
|
236
|
+
return ret;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (Symbol.dispose) WasmModels.prototype[Symbol.dispose] = WasmModels.prototype.free;
|
|
240
|
+
|
|
241
|
+
export function __wbg_reset_state () {
|
|
242
|
+
__wbg_instance_id++;
|
|
243
|
+
cachedBigInt64ArrayMemory0 = null;
|
|
244
|
+
cachedDataViewMemory0 = null;
|
|
245
|
+
cachedFloat32ArrayMemory0 = null;
|
|
246
|
+
cachedFloat64ArrayMemory0 = null;
|
|
247
|
+
cachedUint8ArrayMemory0 = null;
|
|
248
|
+
if (typeof numBytesDecoded !== 'undefined') numBytesDecoded = 0;
|
|
249
|
+
if (typeof WASM_VECTOR_LEN !== 'undefined') WASM_VECTOR_LEN = 0;
|
|
250
|
+
__wbg_reinit_scheduled = false;
|
|
251
|
+
wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
252
|
+
wasm = wasmInstance.exports;
|
|
253
|
+
wasm.__wbindgen_start();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export function start() {
|
|
257
|
+
__wbg_call_guard();
|
|
258
|
+
wasm.start();
|
|
259
|
+
}
|
|
260
|
+
function __wbg_get_imports() {
|
|
261
|
+
const import0 = {
|
|
262
|
+
__proto__: null,
|
|
263
|
+
__wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
|
|
264
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
265
|
+
return ret;
|
|
266
|
+
},
|
|
267
|
+
__wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
|
|
268
|
+
const ret = debugString(arg1);
|
|
269
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
270
|
+
const len1 = WASM_VECTOR_LEN;
|
|
271
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
272
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
273
|
+
},
|
|
274
|
+
__wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
|
|
275
|
+
const ret = arg0 === null;
|
|
276
|
+
return ret;
|
|
277
|
+
},
|
|
278
|
+
__wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
|
|
279
|
+
const ret = arg0 === undefined;
|
|
280
|
+
return ret;
|
|
281
|
+
},
|
|
282
|
+
__wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
|
|
283
|
+
const obj = arg1;
|
|
284
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
285
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
286
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
287
|
+
},
|
|
288
|
+
__wbg___wbindgen_rethrow_cb2e88c6b2a16733: function(arg0) {
|
|
289
|
+
throw arg0;
|
|
290
|
+
},
|
|
291
|
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
|
292
|
+
const obj = arg1;
|
|
293
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
294
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
var len1 = WASM_VECTOR_LEN;
|
|
296
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
297
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
298
|
+
},
|
|
299
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
300
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
301
|
+
},
|
|
302
|
+
__wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
|
|
303
|
+
const ret = arg0.call(arg1);
|
|
304
|
+
return ret;
|
|
305
|
+
}, arguments); },
|
|
306
|
+
__wbg_entries_fb6397112b1de25f: function(arg0) {
|
|
307
|
+
const ret = Object.entries(arg0);
|
|
308
|
+
return ret;
|
|
309
|
+
},
|
|
310
|
+
__wbg_error_00cb6a36fd5c2130: function(arg0, arg1) {
|
|
311
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
312
|
+
},
|
|
313
|
+
__wbg_from_296ca31f8d0f1c52: function(arg0) {
|
|
314
|
+
const ret = Array.from(arg0);
|
|
315
|
+
return ret;
|
|
316
|
+
},
|
|
317
|
+
__wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
|
|
318
|
+
const ret = Reflect.get(arg0, arg1);
|
|
319
|
+
return ret;
|
|
320
|
+
}, arguments); },
|
|
321
|
+
__wbg_get_6c896e0571ddae51: function(arg0, arg1) {
|
|
322
|
+
const ret = arg0[arg1 >>> 0];
|
|
323
|
+
return ret;
|
|
324
|
+
},
|
|
325
|
+
__wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
|
|
326
|
+
const ret = arg0[arg1 >>> 0];
|
|
327
|
+
return ret;
|
|
328
|
+
},
|
|
329
|
+
__wbg_instanceof_Float32Array_595afb0f28b828c9: function(arg0) {
|
|
330
|
+
let result;
|
|
331
|
+
try {
|
|
332
|
+
result = arg0 instanceof Float32Array;
|
|
333
|
+
} catch (_) {
|
|
334
|
+
result = false;
|
|
335
|
+
}
|
|
336
|
+
const ret = result;
|
|
337
|
+
return ret;
|
|
338
|
+
},
|
|
339
|
+
__wbg_instanceof_Float64Array_8a59377f9eec1b8b: function(arg0) {
|
|
340
|
+
let result;
|
|
341
|
+
try {
|
|
342
|
+
result = arg0 instanceof Float64Array;
|
|
343
|
+
} catch (_) {
|
|
344
|
+
result = false;
|
|
345
|
+
}
|
|
346
|
+
const ret = result;
|
|
347
|
+
return ret;
|
|
348
|
+
},
|
|
349
|
+
__wbg_length_58572db4c38f3c3e: function(arg0) {
|
|
350
|
+
const ret = arg0.length;
|
|
351
|
+
return ret;
|
|
352
|
+
},
|
|
353
|
+
__wbg_length_7f3c00c40364105e: function(arg0) {
|
|
354
|
+
const ret = arg0.length;
|
|
355
|
+
return ret;
|
|
356
|
+
},
|
|
357
|
+
__wbg_length_b5f0008bbf60cf59: function(arg0) {
|
|
358
|
+
const ret = arg0.length;
|
|
359
|
+
return ret;
|
|
360
|
+
},
|
|
361
|
+
__wbg_length_beff923aab722a55: function(arg0) {
|
|
362
|
+
const ret = arg0.length;
|
|
363
|
+
return ret;
|
|
364
|
+
},
|
|
365
|
+
__wbg_length_d4bdea10311bd9cf: function(arg0) {
|
|
366
|
+
const ret = arg0.length;
|
|
367
|
+
return ret;
|
|
368
|
+
},
|
|
369
|
+
__wbg_new_1dbf7428bba60a42: function(arg0) {
|
|
370
|
+
const ret = new Uint8Array(arg0);
|
|
371
|
+
return ret;
|
|
372
|
+
},
|
|
373
|
+
__wbg_new_51964c8aa9e1daa2: function(arg0) {
|
|
374
|
+
const ret = new BigInt64Array(arg0);
|
|
375
|
+
return ret;
|
|
376
|
+
},
|
|
377
|
+
__wbg_new_607ae974c34d1e8c: function(arg0, arg1) {
|
|
378
|
+
const ret = new WebAssembly.RuntimeError(getStringFromWasm0(arg0, arg1));
|
|
379
|
+
return ret;
|
|
380
|
+
},
|
|
381
|
+
__wbg_new_617a8cdb8bb1130e: function() {
|
|
382
|
+
const ret = new Object();
|
|
383
|
+
return ret;
|
|
384
|
+
},
|
|
385
|
+
__wbg_new_63c4c65d2534e5d3: function(arg0) {
|
|
386
|
+
const ret = new Float32Array(arg0);
|
|
387
|
+
return ret;
|
|
388
|
+
},
|
|
389
|
+
__wbg_new_ee2291f50781bf1d: function() {
|
|
390
|
+
const ret = new Array();
|
|
391
|
+
return ret;
|
|
392
|
+
},
|
|
393
|
+
__wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
|
|
394
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
395
|
+
return ret;
|
|
396
|
+
},
|
|
397
|
+
__wbg_new_from_slice_ca6ad97db1f4779a: function(arg0, arg1) {
|
|
398
|
+
const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
|
|
399
|
+
return ret;
|
|
400
|
+
},
|
|
401
|
+
__wbg_new_with_length_178f83910c35a379: function(arg0) {
|
|
402
|
+
const ret = new BigInt64Array(arg0 >>> 0);
|
|
403
|
+
return ret;
|
|
404
|
+
},
|
|
405
|
+
__wbg_prototypesetcall_8b03c01e2c0f8066: function(arg0, arg1, arg2) {
|
|
406
|
+
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
|
|
407
|
+
},
|
|
408
|
+
__wbg_prototypesetcall_b275ad9519a0a737: function(arg0, arg1, arg2) {
|
|
409
|
+
BigInt64Array.prototype.set.call(getArrayI64FromWasm0(arg0, arg1), arg2);
|
|
410
|
+
},
|
|
411
|
+
__wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
|
|
412
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
413
|
+
},
|
|
414
|
+
__wbg_prototypesetcall_d49a4fab5ca427bc: function(arg0, arg1, arg2) {
|
|
415
|
+
Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);
|
|
416
|
+
},
|
|
417
|
+
__wbg_push_2baf45db356cf468: function(arg0, arg1) {
|
|
418
|
+
const ret = arg0.push(arg1);
|
|
419
|
+
return ret;
|
|
420
|
+
},
|
|
421
|
+
__wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
|
|
422
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
423
|
+
return ret;
|
|
424
|
+
}, arguments); },
|
|
425
|
+
__wbg_set_2f31151a8da4149e: function(arg0, arg1, arg2) {
|
|
426
|
+
arg0.set(getArrayI64FromWasm0(arg1, arg2));
|
|
427
|
+
},
|
|
428
|
+
__wbindgen_generic_0000000000000001: function(arg0) {
|
|
429
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
430
|
+
const ret = arg0;
|
|
431
|
+
return ret;
|
|
432
|
+
},
|
|
433
|
+
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
434
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
435
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
436
|
+
return ret;
|
|
437
|
+
},
|
|
438
|
+
__wbindgen_init_externref_table: function() {
|
|
439
|
+
const table = wasm.__wbindgen_externrefs;
|
|
440
|
+
const offset = table.grow(4);
|
|
441
|
+
table.set(0, undefined);
|
|
442
|
+
table.set(offset + 0, undefined);
|
|
443
|
+
table.set(offset + 1, null);
|
|
444
|
+
table.set(offset + 2, true);
|
|
445
|
+
table.set(offset + 3, false);
|
|
446
|
+
},
|
|
447
|
+
};
|
|
448
|
+
return {
|
|
449
|
+
__proto__: null,
|
|
450
|
+
"./ensomi_generate_wasm_bg.js": import0,
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
function __wbg_call_guard() {
|
|
455
|
+
if (__wbg_reinit_scheduled) {
|
|
456
|
+
__wbg_reset_state();
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
let __wbg_instance_id = 0;
|
|
463
|
+
const ReplayDrawsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
464
|
+
? { register: () => {}, unregister: () => {} }
|
|
465
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
466
|
+
if (instance === __wbg_instance_id) wasm.__wbg_replaydraws_free(ptr, 1);
|
|
467
|
+
});
|
|
468
|
+
const WasmGeneratorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
469
|
+
? { register: () => {}, unregister: () => {} }
|
|
470
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
471
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmgenerator_free(ptr, 1);
|
|
472
|
+
});
|
|
473
|
+
const WasmModelsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
474
|
+
? { register: () => {}, unregister: () => {} }
|
|
475
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
476
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmmodels_free(ptr, 1);
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
function addToExternrefTable0(obj) {
|
|
480
|
+
const idx = wasm.__externref_table_alloc();
|
|
481
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
482
|
+
return idx;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function _assertClass(instance, klass) {
|
|
486
|
+
if (!(instance instanceof klass)) {
|
|
487
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
function debugString(val) {
|
|
492
|
+
// primitive types
|
|
493
|
+
const type = typeof val;
|
|
494
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
495
|
+
return `${val}`;
|
|
496
|
+
}
|
|
497
|
+
if (type == 'string') {
|
|
498
|
+
return `"${val}"`;
|
|
499
|
+
}
|
|
500
|
+
if (type == 'symbol') {
|
|
501
|
+
const description = val.description;
|
|
502
|
+
if (description == null) {
|
|
503
|
+
return 'Symbol';
|
|
504
|
+
} else {
|
|
505
|
+
return `Symbol(${description})`;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
if (type == 'function') {
|
|
509
|
+
const name = val.name;
|
|
510
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
511
|
+
return `Function(${name})`;
|
|
512
|
+
} else {
|
|
513
|
+
return 'Function';
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
// objects
|
|
517
|
+
if (Array.isArray(val)) {
|
|
518
|
+
const length = val.length;
|
|
519
|
+
let debug = '[';
|
|
520
|
+
if (length > 0) {
|
|
521
|
+
debug += debugString(val[0]);
|
|
522
|
+
}
|
|
523
|
+
for(let i = 1; i < length; i++) {
|
|
524
|
+
debug += ', ' + debugString(val[i]);
|
|
525
|
+
}
|
|
526
|
+
debug += ']';
|
|
527
|
+
return debug;
|
|
528
|
+
}
|
|
529
|
+
// Test for built-in
|
|
530
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
531
|
+
let className;
|
|
532
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
533
|
+
className = builtInMatches[1];
|
|
534
|
+
} else {
|
|
535
|
+
// Failed to match the standard '[object ClassName]'
|
|
536
|
+
return toString.call(val);
|
|
537
|
+
}
|
|
538
|
+
if (className == 'Object') {
|
|
539
|
+
// we're a user defined class or Object
|
|
540
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
541
|
+
// easier than looping through ownProperties of `val`.
|
|
542
|
+
try {
|
|
543
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
544
|
+
} catch (_) {
|
|
545
|
+
return 'Object';
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
// errors
|
|
549
|
+
if (val instanceof Error) {
|
|
550
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
551
|
+
}
|
|
552
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
553
|
+
return className;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
function getArrayF32FromWasm0(ptr, len) {
|
|
557
|
+
ptr = ptr >>> 0;
|
|
558
|
+
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
562
|
+
ptr = ptr >>> 0;
|
|
563
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
function getArrayI64FromWasm0(ptr, len) {
|
|
567
|
+
ptr = ptr >>> 0;
|
|
568
|
+
return getBigInt64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
572
|
+
ptr = ptr >>> 0;
|
|
573
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
let cachedBigInt64ArrayMemory0 = null;
|
|
577
|
+
function getBigInt64ArrayMemory0() {
|
|
578
|
+
if (cachedBigInt64ArrayMemory0 === null || cachedBigInt64ArrayMemory0.byteLength === 0) {
|
|
579
|
+
cachedBigInt64ArrayMemory0 = new BigInt64Array(wasm.memory.buffer);
|
|
580
|
+
}
|
|
581
|
+
return cachedBigInt64ArrayMemory0;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
let cachedDataViewMemory0 = null;
|
|
585
|
+
function getDataViewMemory0() {
|
|
586
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
587
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
588
|
+
}
|
|
589
|
+
return cachedDataViewMemory0;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
let cachedFloat32ArrayMemory0 = null;
|
|
593
|
+
function getFloat32ArrayMemory0() {
|
|
594
|
+
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
|
|
595
|
+
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
|
596
|
+
}
|
|
597
|
+
return cachedFloat32ArrayMemory0;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
601
|
+
function getFloat64ArrayMemory0() {
|
|
602
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
603
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
604
|
+
}
|
|
605
|
+
return cachedFloat64ArrayMemory0;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
function getStringFromWasm0(ptr, len) {
|
|
609
|
+
return decodeText(ptr >>> 0, len);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
let cachedUint8ArrayMemory0 = null;
|
|
613
|
+
function getUint8ArrayMemory0() {
|
|
614
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
615
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
616
|
+
}
|
|
617
|
+
return cachedUint8ArrayMemory0;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
function handleError(f, args) {
|
|
621
|
+
try {
|
|
622
|
+
return f.apply(this, args);
|
|
623
|
+
} catch (e) {
|
|
624
|
+
const idx = addToExternrefTable0(e);
|
|
625
|
+
wasm.__wbindgen_exn_store(idx);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
function isLikeNone(x) {
|
|
630
|
+
return x === undefined || x === null;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
634
|
+
if (realloc === undefined) {
|
|
635
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
636
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
637
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
638
|
+
WASM_VECTOR_LEN = buf.length;
|
|
639
|
+
return ptr;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
let len = arg.length;
|
|
643
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
644
|
+
|
|
645
|
+
const mem = getUint8ArrayMemory0();
|
|
646
|
+
|
|
647
|
+
let offset = 0;
|
|
648
|
+
|
|
649
|
+
for (; offset < len; offset++) {
|
|
650
|
+
const code = arg.charCodeAt(offset);
|
|
651
|
+
if (code > 0x7F) break;
|
|
652
|
+
mem[ptr + offset] = code;
|
|
653
|
+
}
|
|
654
|
+
if (offset !== len) {
|
|
655
|
+
if (offset !== 0) {
|
|
656
|
+
arg = arg.slice(offset);
|
|
657
|
+
}
|
|
658
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
659
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
660
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
661
|
+
|
|
662
|
+
offset += ret.written;
|
|
663
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
WASM_VECTOR_LEN = offset;
|
|
667
|
+
return ptr;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
let __wbg_reinit_scheduled = false;
|
|
671
|
+
|
|
672
|
+
function takeFromExternrefTable0(idx) {
|
|
673
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
674
|
+
wasm.__externref_table_dealloc(idx);
|
|
675
|
+
return value;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
679
|
+
cachedTextDecoder.decode();
|
|
680
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
681
|
+
let numBytesDecoded = 0;
|
|
682
|
+
function decodeText(ptr, len) {
|
|
683
|
+
numBytesDecoded += len;
|
|
684
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
685
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
686
|
+
cachedTextDecoder.decode();
|
|
687
|
+
numBytesDecoded = len;
|
|
688
|
+
}
|
|
689
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
const cachedTextEncoder = new TextEncoder();
|
|
693
|
+
|
|
694
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
695
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
696
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
697
|
+
view.set(buf);
|
|
698
|
+
return {
|
|
699
|
+
read: arg.length,
|
|
700
|
+
written: buf.length
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
let WASM_VECTOR_LEN = 0;
|
|
706
|
+
|
|
707
|
+
let wasmModule, wasmInstance, wasm;
|
|
708
|
+
function __wbg_finalize_init(instance, module) {
|
|
709
|
+
wasmInstance = instance;
|
|
710
|
+
wasm = instance.exports;
|
|
711
|
+
wasmModule = module;
|
|
712
|
+
cachedBigInt64ArrayMemory0 = null;
|
|
713
|
+
cachedDataViewMemory0 = null;
|
|
714
|
+
cachedFloat32ArrayMemory0 = null;
|
|
715
|
+
cachedFloat64ArrayMemory0 = null;
|
|
716
|
+
cachedUint8ArrayMemory0 = null;
|
|
717
|
+
wasm.__wbindgen_start();
|
|
718
|
+
return wasm;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
async function __wbg_load(module, imports) {
|
|
722
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
723
|
+
if (!module.ok) {
|
|
724
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
728
|
+
try {
|
|
729
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
730
|
+
} catch (e) {
|
|
731
|
+
const validResponse = expectedResponseType(module.type);
|
|
732
|
+
|
|
733
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
734
|
+
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);
|
|
735
|
+
|
|
736
|
+
} else { throw e; }
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
const bytes = await module.arrayBuffer();
|
|
741
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
742
|
+
} else {
|
|
743
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
744
|
+
|
|
745
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
746
|
+
return { instance, module };
|
|
747
|
+
} else {
|
|
748
|
+
return instance;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
function expectedResponseType(type) {
|
|
753
|
+
switch (type) {
|
|
754
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
755
|
+
}
|
|
756
|
+
return false;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
function initSync(module) {
|
|
761
|
+
if (wasm !== undefined) return wasm;
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
if (module !== undefined) {
|
|
765
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
766
|
+
({module} = module)
|
|
767
|
+
} else {
|
|
768
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
const imports = __wbg_get_imports();
|
|
773
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
774
|
+
module = new WebAssembly.Module(module);
|
|
775
|
+
}
|
|
776
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
777
|
+
return __wbg_finalize_init(instance, module);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
async function __wbg_init(module_or_path) {
|
|
781
|
+
if (wasm !== undefined) return wasm;
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
if (module_or_path !== undefined) {
|
|
785
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
786
|
+
({module_or_path} = module_or_path)
|
|
787
|
+
} else {
|
|
788
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
if (module_or_path === undefined) {
|
|
793
|
+
module_or_path = new URL('ensomi_generate_wasm_bg.wasm', import.meta.url);
|
|
794
|
+
}
|
|
795
|
+
const imports = __wbg_get_imports();
|
|
796
|
+
|
|
797
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
798
|
+
module_or_path = fetch(module_or_path);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
802
|
+
|
|
803
|
+
return __wbg_finalize_init(instance, module);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
export { initSync, __wbg_init as default };
|