@openheart/tavio-renderer 1.0.12-with-wasm

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.
Files changed (47) hide show
  1. package/README.md +25 -0
  2. package/build/esm/assets/tavio-B99BKbbN.js +971 -0
  3. package/build/esm/assets/workerHelpers-DWTUmD6Q.js +39 -0
  4. package/build/esm/index.js +45732 -0
  5. package/build/esm/types/animation/animationController.d.ts +133 -0
  6. package/build/esm/types/camera/cameraCollider.d.ts +54 -0
  7. package/build/esm/types/camera/cameraPath.d.ts +120 -0
  8. package/build/esm/types/camera/cameraPathControls.d.ts +73 -0
  9. package/build/esm/types/camera/cameraPathManager.d.ts +67 -0
  10. package/build/esm/types/camera/flightControls.d.ts +76 -0
  11. package/build/esm/types/camera/orbitControls.d.ts +216 -0
  12. package/build/esm/types/camera/transferControls.d.ts +122 -0
  13. package/build/esm/types/editor/selector/boxSelector.d.ts +60 -0
  14. package/build/esm/types/editor/selector/selector.d.ts +145 -0
  15. package/build/esm/types/editor/selector/sphereSelector.d.ts +45 -0
  16. package/build/esm/types/extension/InstancedMeshEX.d.ts +101 -0
  17. package/build/esm/types/global.iife.d.ts +9 -0
  18. package/build/esm/types/loader/streamLoader.d.ts +21 -0
  19. package/build/esm/types/math/easing.d.ts +18 -0
  20. package/build/esm/types/math/interpolation.d.ts +70 -0
  21. package/build/esm/types/module.d.ts +5 -0
  22. package/build/esm/types/types/global.d.ts +32 -0
  23. package/build/esm/types/types/wasm.d.ts +12 -0
  24. package/build/esm/types/utility/console.d.ts +7 -0
  25. package/build/esm/types/utility/plyDecoder.d.ts +103 -0
  26. package/build/esm/types/utility/utility.d.ts +58 -0
  27. package/build/esm/types/viewer/canvas.d.ts +1293 -0
  28. package/build/esm/types/viewer/materialGenerator.d.ts +121 -0
  29. package/build/esm/types/viewer/renderView.d.ts +67 -0
  30. package/build/esm/types/viewer/tavioMesh.d.ts +526 -0
  31. package/build/esm/types/wasm-bindings/wasm-handlers.d.ts +42 -0
  32. package/build/esm/types/wasm-bindings/wasm-worker-client.d.ts +123 -0
  33. package/build/esm/types/wasm-bindings/wasm-worker.d.ts +48 -0
  34. package/build/esm/types/wasm-bindings/wasm.d.ts +2 -0
  35. package/build/esm/types/worker/tavioWorker.d.ts +63 -0
  36. package/build/esm/wasm/pkg/no-thread/package.json +18 -0
  37. package/build/esm/wasm/pkg/no-thread/tavio.d.ts +127 -0
  38. package/build/esm/wasm/pkg/no-thread/tavio.js +1243 -0
  39. package/build/esm/wasm/pkg/no-thread/tavio_bg.wasm +0 -0
  40. package/build/esm/wasm/pkg/no-thread/tavio_bg.wasm.d.ts +39 -0
  41. package/build/esm/wasm/pkg/thread/package.json +18 -0
  42. package/build/esm/wasm/pkg/thread/snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js +107 -0
  43. package/build/esm/wasm/pkg/thread/tavio.d.ts +150 -0
  44. package/build/esm/wasm/pkg/thread/tavio.js +1419 -0
  45. package/build/esm/wasm/pkg/thread/tavio_bg.wasm +0 -0
  46. package/build/esm/wasm/pkg/thread/tavio_bg.wasm.d.ts +47 -0
  47. package/package.json +52 -0
@@ -0,0 +1,1243 @@
1
+ /* @ts-self-types="./tavio.d.ts" */
2
+
3
+ export class IntoUnderlyingByteSource {
4
+ __destroy_into_raw() {
5
+ const ptr = this.__wbg_ptr;
6
+ this.__wbg_ptr = 0;
7
+ IntoUnderlyingByteSourceFinalization.unregister(this);
8
+ return ptr;
9
+ }
10
+ free() {
11
+ const ptr = this.__destroy_into_raw();
12
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
13
+ }
14
+ /**
15
+ * @returns {number}
16
+ */
17
+ get autoAllocateChunkSize() {
18
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
19
+ return ret >>> 0;
20
+ }
21
+ cancel() {
22
+ const ptr = this.__destroy_into_raw();
23
+ wasm.intounderlyingbytesource_cancel(ptr);
24
+ }
25
+ /**
26
+ * @param {ReadableByteStreamController} controller
27
+ * @returns {Promise<any>}
28
+ */
29
+ pull(controller) {
30
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
31
+ return takeObject(ret);
32
+ }
33
+ /**
34
+ * @param {ReadableByteStreamController} controller
35
+ */
36
+ start(controller) {
37
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
38
+ }
39
+ /**
40
+ * @returns {ReadableStreamType}
41
+ */
42
+ get type() {
43
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
44
+ return __wbindgen_enum_ReadableStreamType[ret];
45
+ }
46
+ }
47
+ if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
48
+
49
+ export class IntoUnderlyingSink {
50
+ __destroy_into_raw() {
51
+ const ptr = this.__wbg_ptr;
52
+ this.__wbg_ptr = 0;
53
+ IntoUnderlyingSinkFinalization.unregister(this);
54
+ return ptr;
55
+ }
56
+ free() {
57
+ const ptr = this.__destroy_into_raw();
58
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
59
+ }
60
+ /**
61
+ * @param {any} reason
62
+ * @returns {Promise<any>}
63
+ */
64
+ abort(reason) {
65
+ const ptr = this.__destroy_into_raw();
66
+ const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
67
+ return takeObject(ret);
68
+ }
69
+ /**
70
+ * @returns {Promise<any>}
71
+ */
72
+ close() {
73
+ const ptr = this.__destroy_into_raw();
74
+ const ret = wasm.intounderlyingsink_close(ptr);
75
+ return takeObject(ret);
76
+ }
77
+ /**
78
+ * @param {any} chunk
79
+ * @returns {Promise<any>}
80
+ */
81
+ write(chunk) {
82
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
83
+ return takeObject(ret);
84
+ }
85
+ }
86
+ if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
87
+
88
+ export class IntoUnderlyingSource {
89
+ __destroy_into_raw() {
90
+ const ptr = this.__wbg_ptr;
91
+ this.__wbg_ptr = 0;
92
+ IntoUnderlyingSourceFinalization.unregister(this);
93
+ return ptr;
94
+ }
95
+ free() {
96
+ const ptr = this.__destroy_into_raw();
97
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
98
+ }
99
+ cancel() {
100
+ const ptr = this.__destroy_into_raw();
101
+ wasm.intounderlyingsource_cancel(ptr);
102
+ }
103
+ /**
104
+ * @param {ReadableStreamDefaultController} controller
105
+ * @returns {Promise<any>}
106
+ */
107
+ pull(controller) {
108
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
109
+ return takeObject(ret);
110
+ }
111
+ }
112
+ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
113
+
114
+ /**
115
+ * @param {string} url
116
+ * @param {any} decode_options
117
+ * @returns {Promise<void>}
118
+ */
119
+ export function decodePly(url, decode_options) {
120
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
121
+ const len0 = WASM_VECTOR_LEN;
122
+ const ret = wasm.decodePly(ptr0, len0, addHeapObject(decode_options));
123
+ return takeObject(ret);
124
+ }
125
+
126
+ /**
127
+ * @param {string} url
128
+ * @param {any} decode_options
129
+ * @returns {Promise<void>}
130
+ */
131
+ export function decodeSog(url, decode_options) {
132
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
133
+ const len0 = WASM_VECTOR_LEN;
134
+ const ret = wasm.decodeSog(ptr0, len0, addHeapObject(decode_options));
135
+ return takeObject(ret);
136
+ }
137
+
138
+ /**
139
+ * @param {string} url
140
+ * @param {any} decode_options
141
+ * @returns {Promise<void>}
142
+ */
143
+ export function decodeSplat(url, decode_options) {
144
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
145
+ const len0 = WASM_VECTOR_LEN;
146
+ const ret = wasm.decodeSplat(ptr0, len0, addHeapObject(decode_options));
147
+ return takeObject(ret);
148
+ }
149
+
150
+ /**
151
+ * @param {string} url
152
+ * @param {any} decode_options
153
+ * @returns {Promise<void>}
154
+ */
155
+ export function decodeSpz(url, decode_options) {
156
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
157
+ const len0 = WASM_VECTOR_LEN;
158
+ const ret = wasm.decodeSpz(ptr0, len0, addHeapObject(decode_options));
159
+ return takeObject(ret);
160
+ }
161
+
162
+ /**
163
+ * @param {string} url
164
+ * @param {any} decode_options
165
+ * @returns {Promise<void>}
166
+ */
167
+ export function decodeTavio(url, decode_options) {
168
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
169
+ const len0 = WASM_VECTOR_LEN;
170
+ const ret = wasm.decodeTavio(ptr0, len0, addHeapObject(decode_options));
171
+ return takeObject(ret);
172
+ }
173
+
174
+ /**
175
+ * @param {number} point_count
176
+ * @param {Uint8Array} gaussian_buffer
177
+ * @param {Float32Array | null | undefined} sh_buffer
178
+ * @param {Float32Array} scale_min_values
179
+ * @param {Float32Array} scale_max_values
180
+ * @param {number} alpha_min_value
181
+ * @param {number} alpha_max_value
182
+ * @param {any} celestial_sphere
183
+ * @returns {Uint8Array}
184
+ */
185
+ export function encodePly(point_count, gaussian_buffer, sh_buffer, scale_min_values, scale_max_values, alpha_min_value, alpha_max_value, celestial_sphere) {
186
+ try {
187
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
188
+ const ptr0 = passArrayF32ToWasm0(scale_min_values, wasm.__wbindgen_export);
189
+ const len0 = WASM_VECTOR_LEN;
190
+ const ptr1 = passArrayF32ToWasm0(scale_max_values, wasm.__wbindgen_export);
191
+ const len1 = WASM_VECTOR_LEN;
192
+ wasm.encodePly(retptr, point_count, addHeapObject(gaussian_buffer), isLikeNone(sh_buffer) ? 0 : addHeapObject(sh_buffer), ptr0, len0, ptr1, len1, alpha_min_value, alpha_max_value, addHeapObject(celestial_sphere));
193
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
194
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
195
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
196
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
197
+ if (r3) {
198
+ throw takeObject(r2);
199
+ }
200
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
201
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
202
+ return v3;
203
+ } finally {
204
+ wasm.__wbindgen_add_to_stack_pointer(16);
205
+ }
206
+ }
207
+
208
+ /**
209
+ * @param {number} point_count
210
+ * @param {Uint8Array} gaussian_buffer
211
+ * @param {Float32Array} scale_min_values
212
+ * @param {Float32Array} scale_max_values
213
+ * @param {number} alpha_min_value
214
+ * @param {number} alpha_max_value
215
+ * @param {any} celestial_sphere
216
+ * @returns {Uint8Array}
217
+ */
218
+ export function encodeSplat(point_count, gaussian_buffer, scale_min_values, scale_max_values, alpha_min_value, alpha_max_value, celestial_sphere) {
219
+ try {
220
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
221
+ const ptr0 = passArrayF32ToWasm0(scale_min_values, wasm.__wbindgen_export);
222
+ const len0 = WASM_VECTOR_LEN;
223
+ const ptr1 = passArrayF32ToWasm0(scale_max_values, wasm.__wbindgen_export);
224
+ const len1 = WASM_VECTOR_LEN;
225
+ wasm.encodeSplat(retptr, point_count, addHeapObject(gaussian_buffer), ptr0, len0, ptr1, len1, alpha_min_value, alpha_max_value, addHeapObject(celestial_sphere));
226
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
227
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
228
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
229
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
230
+ if (r3) {
231
+ throw takeObject(r2);
232
+ }
233
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
234
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
235
+ return v3;
236
+ } finally {
237
+ wasm.__wbindgen_add_to_stack_pointer(16);
238
+ }
239
+ }
240
+
241
+ /**
242
+ * @param {number} point_count
243
+ * @param {Uint8Array} gaussian_buffer
244
+ * @param {Float32Array | null | undefined} sh_buffer
245
+ * @param {Float32Array} scale_min_values
246
+ * @param {Float32Array} scale_max_values
247
+ * @param {number} alpha_min_value
248
+ * @param {number} alpha_max_value
249
+ * @param {any} celestial_sphere
250
+ * @returns {Uint8Array}
251
+ */
252
+ export function encodeSpz(point_count, gaussian_buffer, sh_buffer, scale_min_values, scale_max_values, alpha_min_value, alpha_max_value, celestial_sphere) {
253
+ try {
254
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
255
+ const ptr0 = passArrayF32ToWasm0(scale_min_values, wasm.__wbindgen_export);
256
+ const len0 = WASM_VECTOR_LEN;
257
+ const ptr1 = passArrayF32ToWasm0(scale_max_values, wasm.__wbindgen_export);
258
+ const len1 = WASM_VECTOR_LEN;
259
+ wasm.encodeSpz(retptr, point_count, addHeapObject(gaussian_buffer), isLikeNone(sh_buffer) ? 0 : addHeapObject(sh_buffer), ptr0, len0, ptr1, len1, alpha_min_value, alpha_max_value, addHeapObject(celestial_sphere));
260
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
261
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
262
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
263
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
264
+ if (r3) {
265
+ throw takeObject(r2);
266
+ }
267
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
268
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
269
+ return v3;
270
+ } finally {
271
+ wasm.__wbindgen_add_to_stack_pointer(16);
272
+ }
273
+ }
274
+
275
+ /**
276
+ * @param {number} total_point_count
277
+ * @param {Uint8Array} gaussian_buffer
278
+ * @param {Float32Array | null | undefined} sh_buffer
279
+ * @param {Float32Array} scale_min_values
280
+ * @param {Float32Array} scale_max_values
281
+ * @param {number} alpha_min_value
282
+ * @param {number} alpha_max_value
283
+ * @param {any} celestial_sphere
284
+ * @param {any} encode_options
285
+ * @returns {Uint8Array}
286
+ */
287
+ export function encodeTavio(total_point_count, gaussian_buffer, sh_buffer, scale_min_values, scale_max_values, alpha_min_value, alpha_max_value, celestial_sphere, encode_options) {
288
+ try {
289
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
290
+ const ptr0 = passArrayF32ToWasm0(scale_min_values, wasm.__wbindgen_export);
291
+ const len0 = WASM_VECTOR_LEN;
292
+ const ptr1 = passArrayF32ToWasm0(scale_max_values, wasm.__wbindgen_export);
293
+ const len1 = WASM_VECTOR_LEN;
294
+ wasm.encodeTavio(retptr, total_point_count, addHeapObject(gaussian_buffer), isLikeNone(sh_buffer) ? 0 : addHeapObject(sh_buffer), ptr0, len0, ptr1, len1, alpha_min_value, alpha_max_value, addHeapObject(celestial_sphere), addHeapObject(encode_options));
295
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
296
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
297
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
298
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
299
+ if (r3) {
300
+ throw takeObject(r2);
301
+ }
302
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
303
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
304
+ return v3;
305
+ } finally {
306
+ wasm.__wbindgen_add_to_stack_pointer(16);
307
+ }
308
+ }
309
+
310
+ export function main() {
311
+ wasm.main();
312
+ }
313
+
314
+ /**
315
+ * @param {Function} event_handler
316
+ * @returns {Promise<void>}
317
+ */
318
+ export function registerEventHandler(event_handler) {
319
+ const ret = wasm.registerEventHandler(addHeapObject(event_handler));
320
+ return takeObject(ret);
321
+ }
322
+
323
+ /**
324
+ * @param {number} point_count
325
+ * @param {Uint8Array} gaussian_buffer
326
+ * @param {Float32Array | null | undefined} sh_buffer
327
+ * @param {Uint8Array} general_data
328
+ * @param {Uint32Array} transform_data
329
+ * @param {Float32Array} scale_min_values
330
+ * @param {Float32Array} scale_max_values
331
+ * @returns {any}
332
+ */
333
+ export function resolveGaussianEdits(point_count, gaussian_buffer, sh_buffer, general_data, transform_data, scale_min_values, scale_max_values) {
334
+ try {
335
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
336
+ const ptr0 = passArrayF32ToWasm0(scale_min_values, wasm.__wbindgen_export);
337
+ const len0 = WASM_VECTOR_LEN;
338
+ const ptr1 = passArrayF32ToWasm0(scale_max_values, wasm.__wbindgen_export);
339
+ const len1 = WASM_VECTOR_LEN;
340
+ wasm.resolveGaussianEdits(retptr, point_count, addHeapObject(gaussian_buffer), isLikeNone(sh_buffer) ? 0 : addHeapObject(sh_buffer), addHeapObject(general_data), addHeapObject(transform_data), ptr0, len0, ptr1, len1);
341
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
342
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
343
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
344
+ if (r2) {
345
+ throw takeObject(r1);
346
+ }
347
+ return takeObject(r0);
348
+ } finally {
349
+ wasm.__wbindgen_add_to_stack_pointer(16);
350
+ }
351
+ }
352
+
353
+ /**
354
+ * @param {Uint16Array} depths
355
+ * @param {Uint32Array} ordering
356
+ * @param {number} splat_count
357
+ * @returns {number}
358
+ */
359
+ export function sort(depths, ordering, splat_count) {
360
+ const ret = wasm.sort(addHeapObject(depths), addHeapObject(ordering), splat_count);
361
+ return ret >>> 0;
362
+ }
363
+ function __wbg_get_imports() {
364
+ const import0 = {
365
+ __proto__: null,
366
+ __wbg___wbindgen_boolean_get_2304fb8c853028c8: function(arg0) {
367
+ const v = getObject(arg0);
368
+ const ret = typeof(v) === 'boolean' ? v : undefined;
369
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
370
+ },
371
+ __wbg___wbindgen_debug_string_edece8177ad01481: function(arg0, arg1) {
372
+ const ret = debugString(getObject(arg1));
373
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
374
+ const len1 = WASM_VECTOR_LEN;
375
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
376
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
377
+ },
378
+ __wbg___wbindgen_is_function_5cd60d5cf78b4eef: function(arg0) {
379
+ const ret = typeof(getObject(arg0)) === 'function';
380
+ return ret;
381
+ },
382
+ __wbg___wbindgen_is_null_2042690d351e14f0: function(arg0) {
383
+ const ret = getObject(arg0) === null;
384
+ return ret;
385
+ },
386
+ __wbg___wbindgen_is_object_b4593df85baada48: function(arg0) {
387
+ const val = getObject(arg0);
388
+ const ret = typeof(val) === 'object' && val !== null;
389
+ return ret;
390
+ },
391
+ __wbg___wbindgen_is_undefined_35bb9f4c7fd651d5: function(arg0) {
392
+ const ret = getObject(arg0) === undefined;
393
+ return ret;
394
+ },
395
+ __wbg___wbindgen_number_get_f73a1244370fcc2c: function(arg0, arg1) {
396
+ const obj = getObject(arg1);
397
+ const ret = typeof(obj) === 'number' ? obj : undefined;
398
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
399
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
400
+ },
401
+ __wbg___wbindgen_string_get_d109740c0d18f4d7: function(arg0, arg1) {
402
+ const obj = getObject(arg1);
403
+ const ret = typeof(obj) === 'string' ? obj : undefined;
404
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
405
+ var len1 = WASM_VECTOR_LEN;
406
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
407
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
408
+ },
409
+ __wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
410
+ throw new Error(getStringFromWasm0(arg0, arg1));
411
+ },
412
+ __wbg__wbg_cb_unref_3fa391f3fcdb55f8: function(arg0) {
413
+ getObject(arg0)._wbg_cb_unref();
414
+ },
415
+ __wbg_allocateSharedArrayBuffer_6fe46699bf03ba1c: function(arg0, arg1) {
416
+ const ret = allocateSharedArrayBuffer(takeObject(arg0), arg1 >>> 0);
417
+ return addHeapObject(ret);
418
+ },
419
+ __wbg_arrayBuffer_cb5d4748b5f3cad5: function() { return handleError(function (arg0) {
420
+ const ret = getObject(arg0).arrayBuffer();
421
+ return addHeapObject(ret);
422
+ }, arguments); },
423
+ __wbg_body_acbb5ec9cd18657f: function(arg0) {
424
+ const ret = getObject(arg0).body;
425
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
426
+ },
427
+ __wbg_buffer_8d6798e32d1afd34: function(arg0) {
428
+ const ret = getObject(arg0).buffer;
429
+ return addHeapObject(ret);
430
+ },
431
+ __wbg_byobRequest_9d8c3b7b2f692560: function(arg0) {
432
+ const ret = getObject(arg0).byobRequest;
433
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
434
+ },
435
+ __wbg_byteLength_c0cecdd68fab1693: function(arg0) {
436
+ const ret = getObject(arg0).byteLength;
437
+ return ret;
438
+ },
439
+ __wbg_byteOffset_3791b0030cc3b490: function(arg0) {
440
+ const ret = getObject(arg0).byteOffset;
441
+ return ret;
442
+ },
443
+ __wbg_call_dfde26266607c996: function() { return handleError(function (arg0, arg1, arg2) {
444
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
445
+ return addHeapObject(ret);
446
+ }, arguments); },
447
+ __wbg_cancel_bee68d5707c614fb: function(arg0) {
448
+ const ret = getObject(arg0).cancel();
449
+ return addHeapObject(ret);
450
+ },
451
+ __wbg_catch_ec5061a695c26496: function(arg0, arg1) {
452
+ const ret = getObject(arg0).catch(getObject(arg1));
453
+ return addHeapObject(ret);
454
+ },
455
+ __wbg_close_53179a3d37ed525d: function() { return handleError(function (arg0) {
456
+ getObject(arg0).close();
457
+ }, arguments); },
458
+ __wbg_close_807d553ef8405788: function() { return handleError(function (arg0) {
459
+ getObject(arg0).close();
460
+ }, arguments); },
461
+ __wbg_enqueue_c3ce0a986a355a8c: function() { return handleError(function (arg0, arg1) {
462
+ getObject(arg0).enqueue(getObject(arg1));
463
+ }, arguments); },
464
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
465
+ let deferred0_0;
466
+ let deferred0_1;
467
+ try {
468
+ deferred0_0 = arg0;
469
+ deferred0_1 = arg1;
470
+ console.error(getStringFromWasm0(arg0, arg1));
471
+ } finally {
472
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
473
+ }
474
+ },
475
+ __wbg_error_ea6decbec50643d2: function(arg0, arg1) {
476
+ console.error(getStringFromWasm0(arg0, arg1));
477
+ },
478
+ __wbg_getContext_47ea64e14d931e3e: function() { return handleError(function (arg0, arg1, arg2) {
479
+ const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));
480
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
481
+ }, arguments); },
482
+ __wbg_getReader_b4b1868fbca77dbe: function() { return handleError(function (arg0) {
483
+ const ret = getObject(arg0).getReader();
484
+ return addHeapObject(ret);
485
+ }, arguments); },
486
+ __wbg_get_0b3f3bb74d16b7ad: function() { return handleError(function (arg0, arg1, arg2, arg3) {
487
+ const ret = getObject(arg1).get(getStringFromWasm0(arg2, arg3));
488
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
489
+ var len1 = WASM_VECTOR_LEN;
490
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
491
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
492
+ }, arguments); },
493
+ __wbg_get_dcf82ab8aad1a593: function() { return handleError(function (arg0, arg1) {
494
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
495
+ return addHeapObject(ret);
496
+ }, arguments); },
497
+ __wbg_get_done_06210bfbda89c407: function(arg0) {
498
+ const ret = getObject(arg0).done;
499
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
500
+ },
501
+ __wbg_get_value_31eb9abef97d98cb: function(arg0) {
502
+ const ret = getObject(arg0).value;
503
+ return addHeapObject(ret);
504
+ },
505
+ __wbg_headers_18f39f24d3837dc1: function(arg0) {
506
+ const ret = getObject(arg0).headers;
507
+ return addHeapObject(ret);
508
+ },
509
+ __wbg_instanceof_OffscreenCanvasRenderingContext2d_0510c089e1f92f14: function(arg0) {
510
+ let result;
511
+ try {
512
+ result = getObject(arg0) instanceof OffscreenCanvasRenderingContext2D;
513
+ } catch (_) {
514
+ result = false;
515
+ }
516
+ const ret = result;
517
+ return ret;
518
+ },
519
+ __wbg_instanceof_Promise_09012cfa9708520a: function(arg0) {
520
+ let result;
521
+ try {
522
+ result = getObject(arg0) instanceof Promise;
523
+ } catch (_) {
524
+ result = false;
525
+ }
526
+ const ret = result;
527
+ return ret;
528
+ },
529
+ __wbg_instanceof_Response_ecfc823e8fb354e2: function(arg0) {
530
+ let result;
531
+ try {
532
+ result = getObject(arg0) instanceof Response;
533
+ } catch (_) {
534
+ result = false;
535
+ }
536
+ const ret = result;
537
+ return ret;
538
+ },
539
+ __wbg_instanceof_SharedArrayBuffer_c17fd66269e612d6: function(arg0) {
540
+ let result;
541
+ try {
542
+ result = getObject(arg0) instanceof SharedArrayBuffer;
543
+ } catch (_) {
544
+ result = false;
545
+ }
546
+ const ret = result;
547
+ return ret;
548
+ },
549
+ __wbg_instanceof_Uint8Array_abd07d4bd221d50b: function(arg0) {
550
+ let result;
551
+ try {
552
+ result = getObject(arg0) instanceof Uint8Array;
553
+ } catch (_) {
554
+ result = false;
555
+ }
556
+ const ret = result;
557
+ return ret;
558
+ },
559
+ __wbg_length_0adf2f3c5da33087: function(arg0) {
560
+ const ret = getObject(arg0).length;
561
+ return ret;
562
+ },
563
+ __wbg_length_13e61aa81636ec86: function(arg0) {
564
+ const ret = getObject(arg0).length;
565
+ return ret;
566
+ },
567
+ __wbg_length_3a1b902b6cde9e2c: function(arg0) {
568
+ const ret = getObject(arg0).length;
569
+ return ret;
570
+ },
571
+ __wbg_length_56fcd3e2b7e0299d: function(arg0) {
572
+ const ret = getObject(arg0).length;
573
+ return ret;
574
+ },
575
+ __wbg_length_949f85b73ce6595d: function(arg0) {
576
+ const ret = getObject(arg0).length;
577
+ return ret;
578
+ },
579
+ __wbg_log_5ab909734581952b: function(arg0, arg1) {
580
+ console.log(getStringFromWasm0(arg0, arg1));
581
+ },
582
+ __wbg_new_02d162bc6cf02f60: function() {
583
+ const ret = new Object();
584
+ return addHeapObject(ret);
585
+ },
586
+ __wbg_new_1f236d63ba0c4784: function(arg0, arg1) {
587
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
588
+ return addHeapObject(ret);
589
+ },
590
+ __wbg_new_227d7c05414eb861: function() {
591
+ const ret = new Error();
592
+ return addHeapObject(ret);
593
+ },
594
+ __wbg_new_310879b66b6e95e1: function() {
595
+ const ret = new Array();
596
+ return addHeapObject(ret);
597
+ },
598
+ __wbg_new_439823ec67f1ec48: function() { return handleError(function (arg0, arg1) {
599
+ const ret = new OffscreenCanvas(arg0 >>> 0, arg1 >>> 0);
600
+ return addHeapObject(ret);
601
+ }, arguments); },
602
+ __wbg_new_7ddec6de44ff8f5d: function(arg0) {
603
+ const ret = new Uint8Array(getObject(arg0));
604
+ return addHeapObject(ret);
605
+ },
606
+ __wbg_new_from_slice_269e35316ed2d061: function(arg0, arg1) {
607
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
608
+ return addHeapObject(ret);
609
+ },
610
+ __wbg_new_from_slice_7a419f18ea6472bf: function(arg0, arg1) {
611
+ const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
612
+ return addHeapObject(ret);
613
+ },
614
+ __wbg_new_typed_c072c4ce9a2a0cdf: function(arg0, arg1) {
615
+ try {
616
+ var state0 = {a: arg0, b: arg1};
617
+ var cb0 = (arg0, arg1) => {
618
+ const a = state0.a;
619
+ state0.a = 0;
620
+ try {
621
+ return __wasm_bindgen_func_elem_2884(a, state0.b, arg0, arg1);
622
+ } finally {
623
+ state0.a = a;
624
+ }
625
+ };
626
+ const ret = new Promise(cb0);
627
+ return addHeapObject(ret);
628
+ } finally {
629
+ state0.a = 0;
630
+ }
631
+ },
632
+ __wbg_new_with_byte_offset_and_length_a87e79143162d67f: function(arg0, arg1, arg2) {
633
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
634
+ return addHeapObject(ret);
635
+ },
636
+ __wbg_new_with_js_u8_clamped_array_and_sh_8de1e5a1d410d395: function() { return handleError(function (arg0, arg1, arg2) {
637
+ const ret = new ImageData(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
638
+ return addHeapObject(ret);
639
+ }, arguments); },
640
+ __wbg_new_with_length_f193d8561d89261d: function(arg0) {
641
+ const ret = new Uint8ClampedArray(arg0 >>> 0);
642
+ return addHeapObject(ret);
643
+ },
644
+ __wbg_prototypesetcall_303283bf37c9f014: function(arg0, arg1, arg2) {
645
+ Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), getObject(arg2));
646
+ },
647
+ __wbg_prototypesetcall_5f9bdc8d75e07276: function(arg0, arg1, arg2) {
648
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
649
+ },
650
+ __wbg_prototypesetcall_ca5e190e7872edac: function(arg0, arg1, arg2) {
651
+ Uint16Array.prototype.set.call(getArrayU16FromWasm0(arg0, arg1), getObject(arg2));
652
+ },
653
+ __wbg_prototypesetcall_fe9d129a614489fa: function(arg0, arg1, arg2) {
654
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
655
+ },
656
+ __wbg_push_b77c476b01548d0a: function(arg0, arg1) {
657
+ const ret = getObject(arg0).push(getObject(arg1));
658
+ return ret;
659
+ },
660
+ __wbg_putImageData_93b5f775895f6d09: function() { return handleError(function (arg0, arg1, arg2, arg3) {
661
+ getObject(arg0).putImageData(getObject(arg1), arg2, arg3);
662
+ }, arguments); },
663
+ __wbg_queueMicrotask_78d584b53af520f5: function(arg0) {
664
+ const ret = getObject(arg0).queueMicrotask;
665
+ return addHeapObject(ret);
666
+ },
667
+ __wbg_queueMicrotask_b39ea83c7f01971a: function(arg0) {
668
+ queueMicrotask(getObject(arg0));
669
+ },
670
+ __wbg_read_254bf22401498310: function(arg0) {
671
+ const ret = getObject(arg0).read();
672
+ return addHeapObject(ret);
673
+ },
674
+ __wbg_releaseLock_65f356509fef84ac: function(arg0) {
675
+ getObject(arg0).releaseLock();
676
+ },
677
+ __wbg_resolve_d17db9352f5a220e: function(arg0) {
678
+ const ret = Promise.resolve(getObject(arg0));
679
+ return addHeapObject(ret);
680
+ },
681
+ __wbg_respond_0196e052b003e1db: function() { return handleError(function (arg0, arg1) {
682
+ getObject(arg0).respond(arg1 >>> 0);
683
+ }, arguments); },
684
+ __wbg_set_24d0fa9e104112f9: function(arg0, arg1, arg2) {
685
+ getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
686
+ },
687
+ __wbg_set_37221b90dcdc9a98: function(arg0, arg1, arg2) {
688
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
689
+ },
690
+ __wbg_set_90474108ec025ba3: function(arg0, arg1, arg2) {
691
+ getObject(arg0).set(getArrayU32FromWasm0(arg1, arg2));
692
+ },
693
+ __wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
694
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
695
+ return ret;
696
+ }, arguments); },
697
+ __wbg_set_bf22f3de29cb1fce: function(arg0, arg1, arg2) {
698
+ getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
699
+ },
700
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
701
+ const ret = getObject(arg1).stack;
702
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
703
+ const len1 = WASM_VECTOR_LEN;
704
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
705
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
706
+ },
707
+ __wbg_static_accessor_GLOBAL_THIS_02344c9b09eb08a9: function() {
708
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
709
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
710
+ },
711
+ __wbg_static_accessor_GLOBAL_ac6d4ac874d5cd54: function() {
712
+ const ret = typeof global === 'undefined' ? null : global;
713
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
714
+ },
715
+ __wbg_static_accessor_SELF_9b2406c23aeb2023: function() {
716
+ const ret = typeof self === 'undefined' ? null : self;
717
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
718
+ },
719
+ __wbg_static_accessor_WINDOW_b34d2126934e16ba: function() {
720
+ const ret = typeof window === 'undefined' ? null : window;
721
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
722
+ },
723
+ __wbg_subarray_0be03218f5c2f558: function(arg0, arg1, arg2) {
724
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
725
+ return addHeapObject(ret);
726
+ },
727
+ __wbg_subarray_7c6a0da8f3b4a1ba: function(arg0, arg1, arg2) {
728
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
729
+ return addHeapObject(ret);
730
+ },
731
+ __wbg_subarray_c7f714190a01e8d2: function(arg0, arg1, arg2) {
732
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
733
+ return addHeapObject(ret);
734
+ },
735
+ __wbg_subarray_e36b0fd259e9e34a: function(arg0, arg1, arg2) {
736
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
737
+ return addHeapObject(ret);
738
+ },
739
+ __wbg_then_837494e384b37459: function(arg0, arg1) {
740
+ const ret = getObject(arg0).then(getObject(arg1));
741
+ return addHeapObject(ret);
742
+ },
743
+ __wbg_then_bd927500e8905df2: function(arg0, arg1, arg2) {
744
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
745
+ return addHeapObject(ret);
746
+ },
747
+ __wbg_transferToImageBitmap_ef78ff480500ad5d: function() { return handleError(function (arg0) {
748
+ const ret = getObject(arg0).transferToImageBitmap();
749
+ return addHeapObject(ret);
750
+ }, arguments); },
751
+ __wbg_view_1b637c097280508c: function(arg0) {
752
+ const ret = getObject(arg0).view;
753
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
754
+ },
755
+ __wbg_warn_11efefe1d20326cb: function(arg0, arg1) {
756
+ console.warn(getStringFromWasm0(arg0, arg1));
757
+ },
758
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
759
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 295, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
760
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1109);
761
+ return addHeapObject(ret);
762
+ },
763
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
764
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 592, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
765
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2882);
766
+ return addHeapObject(ret);
767
+ },
768
+ __wbindgen_cast_0000000000000003: function(arg0) {
769
+ // Cast intrinsic for `F64 -> Externref`.
770
+ const ret = arg0;
771
+ return addHeapObject(ret);
772
+ },
773
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
774
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
775
+ const ret = getArrayU8FromWasm0(arg0, arg1);
776
+ return addHeapObject(ret);
777
+ },
778
+ __wbindgen_cast_0000000000000005: function(arg0, arg1) {
779
+ // Cast intrinsic for `Ref(String) -> Externref`.
780
+ const ret = getStringFromWasm0(arg0, arg1);
781
+ return addHeapObject(ret);
782
+ },
783
+ __wbindgen_cast_0000000000000006: function(arg0) {
784
+ // Cast intrinsic for `U64 -> Externref`.
785
+ const ret = BigInt.asUintN(64, arg0);
786
+ return addHeapObject(ret);
787
+ },
788
+ __wbindgen_cast_0000000000000007: function(arg0, arg1) {
789
+ var v0 = getArrayF32FromWasm0(arg0, arg1).slice();
790
+ wasm.__wbindgen_export4(arg0, arg1 * 4, 4);
791
+ // Cast intrinsic for `Vector(F32) -> Externref`.
792
+ const ret = v0;
793
+ return addHeapObject(ret);
794
+ },
795
+ __wbindgen_cast_0000000000000008: function(arg0, arg1) {
796
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
797
+ wasm.__wbindgen_export4(arg0, arg1 * 4, 4);
798
+ // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
799
+ const ret = v0;
800
+ return addHeapObject(ret);
801
+ },
802
+ __wbindgen_cast_0000000000000009: function(arg0, arg1) {
803
+ var v0 = getArrayU32FromWasm0(arg0, arg1).slice();
804
+ wasm.__wbindgen_export4(arg0, arg1 * 4, 4);
805
+ // Cast intrinsic for `Vector(U32) -> Externref`.
806
+ const ret = v0;
807
+ return addHeapObject(ret);
808
+ },
809
+ __wbindgen_cast_000000000000000a: function(arg0, arg1) {
810
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
811
+ wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
812
+ // Cast intrinsic for `Vector(U8) -> Externref`.
813
+ const ret = v0;
814
+ return addHeapObject(ret);
815
+ },
816
+ __wbindgen_object_clone_ref: function(arg0) {
817
+ const ret = getObject(arg0);
818
+ return addHeapObject(ret);
819
+ },
820
+ __wbindgen_object_drop_ref: function(arg0) {
821
+ takeObject(arg0);
822
+ },
823
+ };
824
+ return {
825
+ __proto__: null,
826
+ "./tavio_bg.js": import0,
827
+ };
828
+ }
829
+
830
+ function __wasm_bindgen_func_elem_1109(arg0, arg1, arg2) {
831
+ wasm.__wasm_bindgen_func_elem_1109(arg0, arg1, addHeapObject(arg2));
832
+ }
833
+
834
+ function __wasm_bindgen_func_elem_2882(arg0, arg1, arg2) {
835
+ try {
836
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
837
+ wasm.__wasm_bindgen_func_elem_2882(retptr, arg0, arg1, addHeapObject(arg2));
838
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
839
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
840
+ if (r1) {
841
+ throw takeObject(r0);
842
+ }
843
+ } finally {
844
+ wasm.__wbindgen_add_to_stack_pointer(16);
845
+ }
846
+ }
847
+
848
+ function __wasm_bindgen_func_elem_2884(arg0, arg1, arg2, arg3) {
849
+ wasm.__wasm_bindgen_func_elem_2884(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
850
+ }
851
+
852
+
853
+ const __wbindgen_enum_ReadableStreamType = ["bytes"];
854
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
855
+ ? { register: () => {}, unregister: () => {} }
856
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
857
+ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
858
+ ? { register: () => {}, unregister: () => {} }
859
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
860
+ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
861
+ ? { register: () => {}, unregister: () => {} }
862
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
863
+
864
+ function addHeapObject(obj) {
865
+ if (heap_next === heap.length) heap.push(heap.length + 1);
866
+ const idx = heap_next;
867
+ heap_next = heap[idx];
868
+
869
+ heap[idx] = obj;
870
+ return idx;
871
+ }
872
+
873
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
874
+ ? { register: () => {}, unregister: () => {} }
875
+ : new FinalizationRegistry(state => wasm.__wbindgen_export5(state.a, state.b));
876
+
877
+ function debugString(val) {
878
+ // primitive types
879
+ const type = typeof val;
880
+ if (type == 'number' || type == 'boolean' || val == null) {
881
+ return `${val}`;
882
+ }
883
+ if (type == 'string') {
884
+ return `"${val}"`;
885
+ }
886
+ if (type == 'symbol') {
887
+ const description = val.description;
888
+ if (description == null) {
889
+ return 'Symbol';
890
+ } else {
891
+ return `Symbol(${description})`;
892
+ }
893
+ }
894
+ if (type == 'function') {
895
+ const name = val.name;
896
+ if (typeof name == 'string' && name.length > 0) {
897
+ return `Function(${name})`;
898
+ } else {
899
+ return 'Function';
900
+ }
901
+ }
902
+ // objects
903
+ if (Array.isArray(val)) {
904
+ const length = val.length;
905
+ let debug = '[';
906
+ if (length > 0) {
907
+ debug += debugString(val[0]);
908
+ }
909
+ for(let i = 1; i < length; i++) {
910
+ debug += ', ' + debugString(val[i]);
911
+ }
912
+ debug += ']';
913
+ return debug;
914
+ }
915
+ // Test for built-in
916
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
917
+ let className;
918
+ if (builtInMatches && builtInMatches.length > 1) {
919
+ className = builtInMatches[1];
920
+ } else {
921
+ // Failed to match the standard '[object ClassName]'
922
+ return toString.call(val);
923
+ }
924
+ if (className == 'Object') {
925
+ // we're a user defined class or Object
926
+ // JSON.stringify avoids problems with cycles, and is generally much
927
+ // easier than looping through ownProperties of `val`.
928
+ try {
929
+ return 'Object(' + JSON.stringify(val) + ')';
930
+ } catch (_) {
931
+ return 'Object';
932
+ }
933
+ }
934
+ // errors
935
+ if (val instanceof Error) {
936
+ return `${val.name}: ${val.message}\n${val.stack}`;
937
+ }
938
+ // TODO we could test for more things here, like `Set`s and `Map`s.
939
+ return className;
940
+ }
941
+
942
+ function dropObject(idx) {
943
+ if (idx < 1028) return;
944
+ heap[idx] = heap_next;
945
+ heap_next = idx;
946
+ }
947
+
948
+ function getArrayF32FromWasm0(ptr, len) {
949
+ ptr = ptr >>> 0;
950
+ return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
951
+ }
952
+
953
+ function getArrayJsValueFromWasm0(ptr, len) {
954
+ ptr = ptr >>> 0;
955
+ const mem = getDataViewMemory0();
956
+ const result = [];
957
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
958
+ result.push(takeObject(mem.getUint32(i, true)));
959
+ }
960
+ return result;
961
+ }
962
+
963
+ function getArrayU16FromWasm0(ptr, len) {
964
+ ptr = ptr >>> 0;
965
+ return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
966
+ }
967
+
968
+ function getArrayU32FromWasm0(ptr, len) {
969
+ ptr = ptr >>> 0;
970
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
971
+ }
972
+
973
+ function getArrayU8FromWasm0(ptr, len) {
974
+ ptr = ptr >>> 0;
975
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
976
+ }
977
+
978
+ let cachedDataViewMemory0 = null;
979
+ function getDataViewMemory0() {
980
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
981
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
982
+ }
983
+ return cachedDataViewMemory0;
984
+ }
985
+
986
+ let cachedFloat32ArrayMemory0 = null;
987
+ function getFloat32ArrayMemory0() {
988
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
989
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
990
+ }
991
+ return cachedFloat32ArrayMemory0;
992
+ }
993
+
994
+ function getStringFromWasm0(ptr, len) {
995
+ return decodeText(ptr >>> 0, len);
996
+ }
997
+
998
+ let cachedUint16ArrayMemory0 = null;
999
+ function getUint16ArrayMemory0() {
1000
+ if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
1001
+ cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
1002
+ }
1003
+ return cachedUint16ArrayMemory0;
1004
+ }
1005
+
1006
+ let cachedUint32ArrayMemory0 = null;
1007
+ function getUint32ArrayMemory0() {
1008
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
1009
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
1010
+ }
1011
+ return cachedUint32ArrayMemory0;
1012
+ }
1013
+
1014
+ let cachedUint8ArrayMemory0 = null;
1015
+ function getUint8ArrayMemory0() {
1016
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1017
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1018
+ }
1019
+ return cachedUint8ArrayMemory0;
1020
+ }
1021
+
1022
+ function getObject(idx) { return heap[idx]; }
1023
+
1024
+ function handleError(f, args) {
1025
+ try {
1026
+ return f.apply(this, args);
1027
+ } catch (e) {
1028
+ wasm.__wbindgen_export3(addHeapObject(e));
1029
+ }
1030
+ }
1031
+
1032
+ let heap = new Array(1024).fill(undefined);
1033
+ heap.push(undefined, null, true, false);
1034
+
1035
+ let heap_next = heap.length;
1036
+
1037
+ function isLikeNone(x) {
1038
+ return x === undefined || x === null;
1039
+ }
1040
+
1041
+ function makeMutClosure(arg0, arg1, f) {
1042
+ const state = { a: arg0, b: arg1, cnt: 1 };
1043
+ const real = (...args) => {
1044
+
1045
+ // First up with a closure we increment the internal reference
1046
+ // count. This ensures that the Rust closure environment won't
1047
+ // be deallocated while we're invoking it.
1048
+ state.cnt++;
1049
+ const a = state.a;
1050
+ state.a = 0;
1051
+ try {
1052
+ return f(a, state.b, ...args);
1053
+ } finally {
1054
+ state.a = a;
1055
+ real._wbg_cb_unref();
1056
+ }
1057
+ };
1058
+ real._wbg_cb_unref = () => {
1059
+ if (--state.cnt === 0) {
1060
+ wasm.__wbindgen_export5(state.a, state.b);
1061
+ state.a = 0;
1062
+ CLOSURE_DTORS.unregister(state);
1063
+ }
1064
+ };
1065
+ CLOSURE_DTORS.register(real, state, state);
1066
+ return real;
1067
+ }
1068
+
1069
+ function passArrayF32ToWasm0(arg, malloc) {
1070
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
1071
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
1072
+ WASM_VECTOR_LEN = arg.length;
1073
+ return ptr;
1074
+ }
1075
+
1076
+ function passStringToWasm0(arg, malloc, realloc) {
1077
+ if (realloc === undefined) {
1078
+ const buf = cachedTextEncoder.encode(arg);
1079
+ const ptr = malloc(buf.length, 1) >>> 0;
1080
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1081
+ WASM_VECTOR_LEN = buf.length;
1082
+ return ptr;
1083
+ }
1084
+
1085
+ let len = arg.length;
1086
+ let ptr = malloc(len, 1) >>> 0;
1087
+
1088
+ const mem = getUint8ArrayMemory0();
1089
+
1090
+ let offset = 0;
1091
+
1092
+ for (; offset < len; offset++) {
1093
+ const code = arg.charCodeAt(offset);
1094
+ if (code > 0x7F) break;
1095
+ mem[ptr + offset] = code;
1096
+ }
1097
+ if (offset !== len) {
1098
+ if (offset !== 0) {
1099
+ arg = arg.slice(offset);
1100
+ }
1101
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1102
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1103
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1104
+
1105
+ offset += ret.written;
1106
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1107
+ }
1108
+
1109
+ WASM_VECTOR_LEN = offset;
1110
+ return ptr;
1111
+ }
1112
+
1113
+ function takeObject(idx) {
1114
+ const ret = getObject(idx);
1115
+ dropObject(idx);
1116
+ return ret;
1117
+ }
1118
+
1119
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1120
+ cachedTextDecoder.decode();
1121
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1122
+ let numBytesDecoded = 0;
1123
+ function decodeText(ptr, len) {
1124
+ numBytesDecoded += len;
1125
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1126
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1127
+ cachedTextDecoder.decode();
1128
+ numBytesDecoded = len;
1129
+ }
1130
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1131
+ }
1132
+
1133
+ const cachedTextEncoder = new TextEncoder();
1134
+
1135
+ if (!('encodeInto' in cachedTextEncoder)) {
1136
+ cachedTextEncoder.encodeInto = function (arg, view) {
1137
+ const buf = cachedTextEncoder.encode(arg);
1138
+ view.set(buf);
1139
+ return {
1140
+ read: arg.length,
1141
+ written: buf.length
1142
+ };
1143
+ };
1144
+ }
1145
+
1146
+ let WASM_VECTOR_LEN = 0;
1147
+
1148
+ let wasmModule, wasmInstance, wasm;
1149
+ function __wbg_finalize_init(instance, module) {
1150
+ wasmInstance = instance;
1151
+ wasm = instance.exports;
1152
+ wasmModule = module;
1153
+ cachedDataViewMemory0 = null;
1154
+ cachedFloat32ArrayMemory0 = null;
1155
+ cachedUint16ArrayMemory0 = null;
1156
+ cachedUint32ArrayMemory0 = null;
1157
+ cachedUint8ArrayMemory0 = null;
1158
+ wasm.__wbindgen_start();
1159
+ return wasm;
1160
+ }
1161
+
1162
+ async function __wbg_load(module, imports) {
1163
+ if (typeof Response === 'function' && module instanceof Response) {
1164
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1165
+ try {
1166
+ return await WebAssembly.instantiateStreaming(module, imports);
1167
+ } catch (e) {
1168
+ const validResponse = module.ok && expectedResponseType(module.type);
1169
+
1170
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1171
+ 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);
1172
+
1173
+ } else { throw e; }
1174
+ }
1175
+ }
1176
+
1177
+ const bytes = await module.arrayBuffer();
1178
+ return await WebAssembly.instantiate(bytes, imports);
1179
+ } else {
1180
+ const instance = await WebAssembly.instantiate(module, imports);
1181
+
1182
+ if (instance instanceof WebAssembly.Instance) {
1183
+ return { instance, module };
1184
+ } else {
1185
+ return instance;
1186
+ }
1187
+ }
1188
+
1189
+ function expectedResponseType(type) {
1190
+ switch (type) {
1191
+ case 'basic': case 'cors': case 'default': return true;
1192
+ }
1193
+ return false;
1194
+ }
1195
+ }
1196
+
1197
+ function initSync(module) {
1198
+ if (wasm !== undefined) return wasm;
1199
+
1200
+
1201
+ if (module !== undefined) {
1202
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1203
+ ({module} = module)
1204
+ } else {
1205
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1206
+ }
1207
+ }
1208
+
1209
+ const imports = __wbg_get_imports();
1210
+ if (!(module instanceof WebAssembly.Module)) {
1211
+ module = new WebAssembly.Module(module);
1212
+ }
1213
+ const instance = new WebAssembly.Instance(module, imports);
1214
+ return __wbg_finalize_init(instance, module);
1215
+ }
1216
+
1217
+ async function __wbg_init(module_or_path) {
1218
+ if (wasm !== undefined) return wasm;
1219
+
1220
+
1221
+ if (module_or_path !== undefined) {
1222
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1223
+ ({module_or_path} = module_or_path)
1224
+ } else {
1225
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1226
+ }
1227
+ }
1228
+
1229
+ if (module_or_path === undefined) {
1230
+ module_or_path = new URL('tavio_bg.wasm', import.meta.url);
1231
+ }
1232
+ const imports = __wbg_get_imports();
1233
+
1234
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1235
+ module_or_path = fetch(module_or_path);
1236
+ }
1237
+
1238
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1239
+
1240
+ return __wbg_finalize_init(instance, module);
1241
+ }
1242
+
1243
+ export { initSync, __wbg_init as default };