@modelhealth/sdk 0.1.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.
@@ -0,0 +1,1110 @@
1
+ /* @ts-self-types="./model_health_wasm.d.ts" */
2
+
3
+ export class ModelHealthService {
4
+ __destroy_into_raw() {
5
+ const ptr = this.__wbg_ptr;
6
+ this.__wbg_ptr = 0;
7
+ ModelHealthServiceFinalization.unregister(this);
8
+ return ptr;
9
+ }
10
+ free() {
11
+ const ptr = this.__destroy_into_raw();
12
+ wasm.__wbg_modelhealthservice_free(ptr, 0);
13
+ }
14
+ /**
15
+ * @returns {Promise<any>}
16
+ */
17
+ createSession() {
18
+ const ret = wasm.modelhealthservice_createSession(this.__wbg_ptr);
19
+ return takeObject(ret);
20
+ }
21
+ /**
22
+ * @param {any} parameters
23
+ * @returns {Promise<any>}
24
+ */
25
+ createSubject(parameters) {
26
+ const ret = wasm.modelhealthservice_createSubject(this.__wbg_ptr, addHeapObject(parameters));
27
+ return takeObject(ret);
28
+ }
29
+ /**
30
+ * @param {any} activity_json
31
+ * @returns {Promise<void>}
32
+ */
33
+ deleteActivity(activity_json) {
34
+ const ret = wasm.modelhealthservice_deleteActivity(this.__wbg_ptr, addHeapObject(activity_json));
35
+ return takeObject(ret);
36
+ }
37
+ /**
38
+ * @param {any} trial_json
39
+ * @param {string} result_tag
40
+ * @returns {Promise<any>}
41
+ */
42
+ downloadAnalysisResult(trial_json, result_tag) {
43
+ const ptr0 = passStringToWasm0(result_tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
44
+ const len0 = WASM_VECTOR_LEN;
45
+ const ret = wasm.modelhealthservice_downloadAnalysisResult(this.__wbg_ptr, addHeapObject(trial_json), ptr0, len0);
46
+ return takeObject(ret);
47
+ }
48
+ /**
49
+ * @param {any} trial_json
50
+ * @param {any} data_types_json
51
+ * @returns {Promise<any>}
52
+ */
53
+ downloadTrialResultData(trial_json, data_types_json) {
54
+ const ret = wasm.modelhealthservice_downloadTrialResultData(this.__wbg_ptr, addHeapObject(trial_json), addHeapObject(data_types_json));
55
+ return takeObject(ret);
56
+ }
57
+ /**
58
+ * @param {any} trial_json
59
+ * @param {any} version_json
60
+ * @returns {Promise<Array<any>>}
61
+ */
62
+ downloadTrialVideos(trial_json, version_json) {
63
+ const ret = wasm.modelhealthservice_downloadTrialVideos(this.__wbg_ptr, addHeapObject(trial_json), addHeapObject(version_json));
64
+ return takeObject(ret);
65
+ }
66
+ /**
67
+ * @param {string} subject_id
68
+ * @param {number} start_index
69
+ * @param {number} count
70
+ * @param {any} sort
71
+ * @returns {Promise<any>}
72
+ */
73
+ getActivitiesForSubject(subject_id, start_index, count, sort) {
74
+ const ptr0 = passStringToWasm0(subject_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
75
+ const len0 = WASM_VECTOR_LEN;
76
+ const ret = wasm.modelhealthservice_getActivitiesForSubject(this.__wbg_ptr, ptr0, len0, start_index, count, addHeapObject(sort));
77
+ return takeObject(ret);
78
+ }
79
+ /**
80
+ * @param {string} activity_id
81
+ * @returns {Promise<any>}
82
+ */
83
+ getActivity(activity_id) {
84
+ const ptr0 = passStringToWasm0(activity_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
85
+ const len0 = WASM_VECTOR_LEN;
86
+ const ret = wasm.modelhealthservice_getActivity(this.__wbg_ptr, ptr0, len0);
87
+ return takeObject(ret);
88
+ }
89
+ /**
90
+ * @returns {Promise<any>}
91
+ */
92
+ getActivityTags() {
93
+ const ret = wasm.modelhealthservice_getActivityTags(this.__wbg_ptr);
94
+ return takeObject(ret);
95
+ }
96
+ /**
97
+ * @param {any} task_json
98
+ * @returns {Promise<any>}
99
+ */
100
+ getAnalysisStatus(task_json) {
101
+ const ret = wasm.modelhealthservice_getAnalysisStatus(this.__wbg_ptr, addHeapObject(task_json));
102
+ return takeObject(ret);
103
+ }
104
+ /**
105
+ * @param {string} session_id
106
+ * @returns {Promise<any>}
107
+ */
108
+ getSession(session_id) {
109
+ const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
110
+ const len0 = WASM_VECTOR_LEN;
111
+ const ret = wasm.modelhealthservice_getSession(this.__wbg_ptr, ptr0, len0);
112
+ return takeObject(ret);
113
+ }
114
+ /**
115
+ * @param {any} trial_json
116
+ * @returns {Promise<any>}
117
+ */
118
+ getStatus(trial_json) {
119
+ const ret = wasm.modelhealthservice_getStatus(this.__wbg_ptr, addHeapObject(trial_json));
120
+ return takeObject(ret);
121
+ }
122
+ /**
123
+ * @returns {string | undefined}
124
+ */
125
+ getToken() {
126
+ try {
127
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
128
+ wasm.modelhealthservice_getToken(retptr, this.__wbg_ptr);
129
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
130
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
131
+ let v1;
132
+ if (r0 !== 0) {
133
+ v1 = getStringFromWasm0(r0, r1).slice();
134
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
135
+ }
136
+ return v1;
137
+ } finally {
138
+ wasm.__wbindgen_add_to_stack_pointer(16);
139
+ }
140
+ }
141
+ /**
142
+ * @returns {Promise<boolean>}
143
+ */
144
+ isAuthenticated() {
145
+ const ret = wasm.modelhealthservice_isAuthenticated(this.__wbg_ptr);
146
+ return takeObject(ret);
147
+ }
148
+ /**
149
+ * @param {string} username
150
+ * @param {string} password
151
+ * @returns {Promise<any>}
152
+ */
153
+ login(username, password) {
154
+ const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
155
+ const len0 = WASM_VECTOR_LEN;
156
+ const ptr1 = passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
157
+ const len1 = WASM_VECTOR_LEN;
158
+ const ret = wasm.modelhealthservice_login(this.__wbg_ptr, ptr0, len0, ptr1, len1);
159
+ return takeObject(ret);
160
+ }
161
+ /**
162
+ * @returns {Promise<void>}
163
+ */
164
+ logout() {
165
+ const ret = wasm.modelhealthservice_logout(this.__wbg_ptr);
166
+ return takeObject(ret);
167
+ }
168
+ /**
169
+ * @param {string} api_key
170
+ */
171
+ constructor(api_key) {
172
+ try {
173
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
174
+ const ptr0 = passStringToWasm0(api_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
175
+ const len0 = WASM_VECTOR_LEN;
176
+ wasm.modelhealthservice_new(retptr, ptr0, len0);
177
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
178
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
179
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
180
+ if (r2) {
181
+ throw takeObject(r1);
182
+ }
183
+ this.__wbg_ptr = r0 >>> 0;
184
+ ModelHealthServiceFinalization.register(this, this.__wbg_ptr, this);
185
+ return this;
186
+ } finally {
187
+ wasm.__wbindgen_add_to_stack_pointer(16);
188
+ }
189
+ }
190
+ /**
191
+ * @param {string} trial_name
192
+ * @param {any} session_json
193
+ * @returns {Promise<any>}
194
+ */
195
+ record(trial_name, session_json) {
196
+ const ptr0 = passStringToWasm0(trial_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
197
+ const len0 = WASM_VECTOR_LEN;
198
+ const ret = wasm.modelhealthservice_record(this.__wbg_ptr, ptr0, len0, addHeapObject(session_json));
199
+ return takeObject(ret);
200
+ }
201
+ /**
202
+ * @param {any} parameters
203
+ * @returns {Promise<void>}
204
+ */
205
+ register(parameters) {
206
+ const ret = wasm.modelhealthservice_register(this.__wbg_ptr, addHeapObject(parameters));
207
+ return takeObject(ret);
208
+ }
209
+ /**
210
+ * @returns {Promise<boolean>}
211
+ */
212
+ restoreToken() {
213
+ const ret = wasm.modelhealthservice_restoreToken(this.__wbg_ptr);
214
+ return takeObject(ret);
215
+ }
216
+ /**
217
+ * @returns {Promise<any>}
218
+ */
219
+ sessionList() {
220
+ const ret = wasm.modelhealthservice_sessionList(this.__wbg_ptr);
221
+ return takeObject(ret);
222
+ }
223
+ /**
224
+ * @param {TokenStorage} storage
225
+ */
226
+ setStorage(storage) {
227
+ wasm.modelhealthservice_setStorage(this.__wbg_ptr, addHeapObject(storage));
228
+ }
229
+ /**
230
+ * @param {string} token
231
+ */
232
+ setToken(token) {
233
+ const ptr0 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
234
+ const len0 = WASM_VECTOR_LEN;
235
+ wasm.modelhealthservice_setToken(this.__wbg_ptr, ptr0, len0);
236
+ }
237
+ /**
238
+ * @param {any} analysis_type_json
239
+ * @param {any} trial_json
240
+ * @param {any} session_json
241
+ * @returns {Promise<any>}
242
+ */
243
+ startAnalysis(analysis_type_json, trial_json, session_json) {
244
+ const ret = wasm.modelhealthservice_startAnalysis(this.__wbg_ptr, addHeapObject(analysis_type_json), addHeapObject(trial_json), addHeapObject(session_json));
245
+ return takeObject(ret);
246
+ }
247
+ /**
248
+ * @param {any} session_json
249
+ * @returns {Promise<void>}
250
+ */
251
+ stopRecording(session_json) {
252
+ const ret = wasm.modelhealthservice_stopRecording(this.__wbg_ptr, addHeapObject(session_json));
253
+ return takeObject(ret);
254
+ }
255
+ /**
256
+ * @returns {Promise<any>}
257
+ */
258
+ subjectList() {
259
+ const ret = wasm.modelhealthservice_subjectList(this.__wbg_ptr);
260
+ return takeObject(ret);
261
+ }
262
+ /**
263
+ * @param {string} session_id
264
+ * @returns {Promise<any>}
265
+ */
266
+ trialList(session_id) {
267
+ const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
268
+ const len0 = WASM_VECTOR_LEN;
269
+ const ret = wasm.modelhealthservice_trialList(this.__wbg_ptr, ptr0, len0);
270
+ return takeObject(ret);
271
+ }
272
+ /**
273
+ * @param {any} activity_json
274
+ * @returns {Promise<any>}
275
+ */
276
+ updateActivity(activity_json) {
277
+ const ret = wasm.modelhealthservice_updateActivity(this.__wbg_ptr, addHeapObject(activity_json));
278
+ return takeObject(ret);
279
+ }
280
+ /**
281
+ * @param {string} code
282
+ * @param {boolean} remember_device
283
+ * @returns {Promise<void>}
284
+ */
285
+ verify(code, remember_device) {
286
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
287
+ const len0 = WASM_VECTOR_LEN;
288
+ const ret = wasm.modelhealthservice_verify(this.__wbg_ptr, ptr0, len0, remember_device);
289
+ return takeObject(ret);
290
+ }
291
+ }
292
+ if (Symbol.dispose) ModelHealthService.prototype[Symbol.dispose] = ModelHealthService.prototype.free;
293
+
294
+ /**
295
+ * @param {string} api_key
296
+ * @param {string} token
297
+ * @param {any} session_json
298
+ * @param {any} checkerboard_json
299
+ * @param {Function} _status_callback
300
+ * @returns {Promise<any>}
301
+ */
302
+ export function calibrateCamera(api_key, token, session_json, checkerboard_json, _status_callback) {
303
+ const ptr0 = passStringToWasm0(api_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
304
+ const len0 = WASM_VECTOR_LEN;
305
+ const ptr1 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
306
+ const len1 = WASM_VECTOR_LEN;
307
+ const ret = wasm.calibrateCamera(ptr0, len0, ptr1, len1, addHeapObject(session_json), addHeapObject(checkerboard_json), addHeapObject(_status_callback));
308
+ return takeObject(ret);
309
+ }
310
+
311
+ /**
312
+ * @param {string} api_key
313
+ * @param {string} token
314
+ * @param {any} subject_json
315
+ * @param {any} session_json
316
+ * @param {Function} _status_callback
317
+ * @returns {Promise<any>}
318
+ */
319
+ export function calibrateNeutralPose(api_key, token, subject_json, session_json, _status_callback) {
320
+ const ptr0 = passStringToWasm0(api_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
321
+ const len0 = WASM_VECTOR_LEN;
322
+ const ptr1 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
323
+ const len1 = WASM_VECTOR_LEN;
324
+ const ret = wasm.calibrateNeutralPose(ptr0, len0, ptr1, len1, addHeapObject(subject_json), addHeapObject(session_json), addHeapObject(_status_callback));
325
+ return takeObject(ret);
326
+ }
327
+
328
+ export function init() {
329
+ wasm.init();
330
+ }
331
+
332
+ function __wbg_get_imports() {
333
+ const import0 = {
334
+ __proto__: null,
335
+ __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
336
+ const ret = Error(getStringFromWasm0(arg0, arg1));
337
+ return addHeapObject(ret);
338
+ },
339
+ __wbg_Number_04624de7d0e8332d: function(arg0) {
340
+ const ret = Number(getObject(arg0));
341
+ return ret;
342
+ },
343
+ __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
344
+ const ret = String(getObject(arg1));
345
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
346
+ const len1 = WASM_VECTOR_LEN;
347
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
348
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
349
+ },
350
+ __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
351
+ const v = getObject(arg0);
352
+ const ret = typeof(v) === 'boolean' ? v : undefined;
353
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
354
+ },
355
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
356
+ const ret = debugString(getObject(arg1));
357
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
358
+ const len1 = WASM_VECTOR_LEN;
359
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
360
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
361
+ },
362
+ __wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
363
+ const ret = getObject(arg0) in getObject(arg1);
364
+ return ret;
365
+ },
366
+ __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
367
+ const ret = typeof(getObject(arg0)) === 'function';
368
+ return ret;
369
+ },
370
+ __wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
371
+ const val = getObject(arg0);
372
+ const ret = typeof(val) === 'object' && val !== null;
373
+ return ret;
374
+ },
375
+ __wbg___wbindgen_is_string_cd444516edc5b180: function(arg0) {
376
+ const ret = typeof(getObject(arg0)) === 'string';
377
+ return ret;
378
+ },
379
+ __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
380
+ const ret = getObject(arg0) === undefined;
381
+ return ret;
382
+ },
383
+ __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
384
+ const ret = getObject(arg0) == getObject(arg1);
385
+ return ret;
386
+ },
387
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
388
+ const obj = getObject(arg1);
389
+ const ret = typeof(obj) === 'number' ? obj : undefined;
390
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
391
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
392
+ },
393
+ __wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
394
+ const obj = getObject(arg1);
395
+ const ret = typeof(obj) === 'string' ? obj : undefined;
396
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
397
+ var len1 = WASM_VECTOR_LEN;
398
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
399
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
400
+ },
401
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
402
+ throw new Error(getStringFromWasm0(arg0, arg1));
403
+ },
404
+ __wbg__wbg_cb_unref_d9b87ff7982e3b21: function(arg0) {
405
+ getObject(arg0)._wbg_cb_unref();
406
+ },
407
+ __wbg_abort_2f0584e03e8e3950: function(arg0) {
408
+ getObject(arg0).abort();
409
+ },
410
+ __wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
411
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
412
+ }, arguments); },
413
+ __wbg_arrayBuffer_bb54076166006c39: function() { return handleError(function (arg0) {
414
+ const ret = getObject(arg0).arrayBuffer();
415
+ return addHeapObject(ret);
416
+ }, arguments); },
417
+ __wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
418
+ const ret = getObject(arg0).call(getObject(arg1));
419
+ return addHeapObject(ret);
420
+ }, arguments); },
421
+ __wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
422
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
423
+ return addHeapObject(ret);
424
+ }, arguments); },
425
+ __wbg_debug_46a93995fc6f8820: function(arg0, arg1, arg2, arg3) {
426
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
427
+ },
428
+ __wbg_done_57b39ecd9addfe81: function(arg0) {
429
+ const ret = getObject(arg0).done;
430
+ return ret;
431
+ },
432
+ __wbg_entries_58c7934c745daac7: function(arg0) {
433
+ const ret = Object.entries(getObject(arg0));
434
+ return addHeapObject(ret);
435
+ },
436
+ __wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
437
+ let deferred0_0;
438
+ let deferred0_1;
439
+ try {
440
+ deferred0_0 = arg0;
441
+ deferred0_1 = arg1;
442
+ console.error(getStringFromWasm0(arg0, arg1));
443
+ } finally {
444
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
445
+ }
446
+ },
447
+ __wbg_error_794d0ffc9d00d5c3: function(arg0, arg1, arg2, arg3) {
448
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
449
+ },
450
+ __wbg_error_9a7fe3f932034cde: function(arg0) {
451
+ console.error(getObject(arg0));
452
+ },
453
+ __wbg_fetch_afb6a4b6cacf876d: function(arg0, arg1) {
454
+ const ret = getObject(arg0).fetch(getObject(arg1));
455
+ return addHeapObject(ret);
456
+ },
457
+ __wbg_fetch_f1856afdb49415d1: function(arg0) {
458
+ const ret = fetch(getObject(arg0));
459
+ return addHeapObject(ret);
460
+ },
461
+ __wbg_getToken_0219bad7f942aa94: function(arg0) {
462
+ const ret = getObject(arg0).getToken();
463
+ return addHeapObject(ret);
464
+ },
465
+ __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
466
+ const ret = getObject(arg0)[arg1 >>> 0];
467
+ return addHeapObject(ret);
468
+ },
469
+ __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
470
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
471
+ return addHeapObject(ret);
472
+ }, arguments); },
473
+ __wbg_get_with_ref_key_1dc361bd10053bfe: function(arg0, arg1) {
474
+ const ret = getObject(arg0)[getObject(arg1)];
475
+ return addHeapObject(ret);
476
+ },
477
+ __wbg_has_d4e53238966c12b6: function() { return handleError(function (arg0, arg1) {
478
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
479
+ return ret;
480
+ }, arguments); },
481
+ __wbg_headers_59a2938db9f80985: function(arg0) {
482
+ const ret = getObject(arg0).headers;
483
+ return addHeapObject(ret);
484
+ },
485
+ __wbg_info_9e602cf10c5c690b: function(arg0, arg1, arg2, arg3) {
486
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
487
+ },
488
+ __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
489
+ let result;
490
+ try {
491
+ result = getObject(arg0) instanceof ArrayBuffer;
492
+ } catch (_) {
493
+ result = false;
494
+ }
495
+ const ret = result;
496
+ return ret;
497
+ },
498
+ __wbg_instanceof_Response_ee1d54d79ae41977: function(arg0) {
499
+ let result;
500
+ try {
501
+ result = getObject(arg0) instanceof Response;
502
+ } catch (_) {
503
+ result = false;
504
+ }
505
+ const ret = result;
506
+ return ret;
507
+ },
508
+ __wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
509
+ let result;
510
+ try {
511
+ result = getObject(arg0) instanceof Uint8Array;
512
+ } catch (_) {
513
+ result = false;
514
+ }
515
+ const ret = result;
516
+ return ret;
517
+ },
518
+ __wbg_instanceof_Window_ed49b2db8df90359: function(arg0) {
519
+ let result;
520
+ try {
521
+ result = getObject(arg0) instanceof Window;
522
+ } catch (_) {
523
+ result = false;
524
+ }
525
+ const ret = result;
526
+ return ret;
527
+ },
528
+ __wbg_isArray_d314bb98fcf08331: function(arg0) {
529
+ const ret = Array.isArray(getObject(arg0));
530
+ return ret;
531
+ },
532
+ __wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
533
+ const ret = Number.isSafeInteger(getObject(arg0));
534
+ return ret;
535
+ },
536
+ __wbg_iterator_6ff6560ca1568e55: function() {
537
+ const ret = Symbol.iterator;
538
+ return addHeapObject(ret);
539
+ },
540
+ __wbg_length_32ed9a279acd054c: function(arg0) {
541
+ const ret = getObject(arg0).length;
542
+ return ret;
543
+ },
544
+ __wbg_length_35a7bace40f36eac: function(arg0) {
545
+ const ret = getObject(arg0).length;
546
+ return ret;
547
+ },
548
+ __wbg_log_24aba2a6d8990b35: function(arg0, arg1, arg2, arg3) {
549
+ console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
550
+ },
551
+ __wbg_new_361308b2356cecd0: function() {
552
+ const ret = new Object();
553
+ return addHeapObject(ret);
554
+ },
555
+ __wbg_new_3eb36ae241fe6f44: function() {
556
+ const ret = new Array();
557
+ return addHeapObject(ret);
558
+ },
559
+ __wbg_new_64284bd487f9d239: function() { return handleError(function () {
560
+ const ret = new Headers();
561
+ return addHeapObject(ret);
562
+ }, arguments); },
563
+ __wbg_new_8a6f238a6ece86ea: function() {
564
+ const ret = new Error();
565
+ return addHeapObject(ret);
566
+ },
567
+ __wbg_new_b5d9e2fb389fef91: function(arg0, arg1) {
568
+ try {
569
+ var state0 = {a: arg0, b: arg1};
570
+ var cb0 = (arg0, arg1) => {
571
+ const a = state0.a;
572
+ state0.a = 0;
573
+ try {
574
+ return __wasm_bindgen_func_elem_1271(a, state0.b, arg0, arg1);
575
+ } finally {
576
+ state0.a = a;
577
+ }
578
+ };
579
+ const ret = new Promise(cb0);
580
+ return addHeapObject(ret);
581
+ } finally {
582
+ state0.a = state0.b = 0;
583
+ }
584
+ },
585
+ __wbg_new_b949e7f56150a5d1: function() { return handleError(function () {
586
+ const ret = new AbortController();
587
+ return addHeapObject(ret);
588
+ }, arguments); },
589
+ __wbg_new_dca287b076112a51: function() {
590
+ const ret = new Map();
591
+ return addHeapObject(ret);
592
+ },
593
+ __wbg_new_dd2b680c8bf6ae29: function(arg0) {
594
+ const ret = new Uint8Array(getObject(arg0));
595
+ return addHeapObject(ret);
596
+ },
597
+ __wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
598
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
599
+ return addHeapObject(ret);
600
+ },
601
+ __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
602
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
603
+ return addHeapObject(ret);
604
+ },
605
+ __wbg_new_with_str_and_init_a61cbc6bdef21614: function() { return handleError(function (arg0, arg1, arg2) {
606
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
607
+ return addHeapObject(ret);
608
+ }, arguments); },
609
+ __wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
610
+ const ret = getObject(arg0).next();
611
+ return addHeapObject(ret);
612
+ }, arguments); },
613
+ __wbg_next_418f80d8f5303233: function(arg0) {
614
+ const ret = getObject(arg0).next;
615
+ return addHeapObject(ret);
616
+ },
617
+ __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
618
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
619
+ },
620
+ __wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
621
+ const ret = getObject(arg0).push(getObject(arg1));
622
+ return ret;
623
+ },
624
+ __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
625
+ const ret = getObject(arg0).queueMicrotask;
626
+ return addHeapObject(ret);
627
+ },
628
+ __wbg_queueMicrotask_5bb536982f78a56f: function(arg0) {
629
+ queueMicrotask(getObject(arg0));
630
+ },
631
+ __wbg_reject_a2176de7f1212be5: function(arg0) {
632
+ const ret = Promise.reject(getObject(arg0));
633
+ return addHeapObject(ret);
634
+ },
635
+ __wbg_removeToken_6425f06e5d0e85a4: function(arg0) {
636
+ const ret = getObject(arg0).removeToken();
637
+ return addHeapObject(ret);
638
+ },
639
+ __wbg_resolve_002c4b7d9d8f6b64: function(arg0) {
640
+ const ret = Promise.resolve(getObject(arg0));
641
+ return addHeapObject(ret);
642
+ },
643
+ __wbg_setTimeout_eff32631ea138533: function() { return handleError(function (arg0, arg1, arg2) {
644
+ const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
645
+ return ret;
646
+ }, arguments); },
647
+ __wbg_setToken_d7bed0c5c0251a65: function(arg0, arg1, arg2) {
648
+ let deferred0_0;
649
+ let deferred0_1;
650
+ try {
651
+ deferred0_0 = arg1;
652
+ deferred0_1 = arg2;
653
+ const ret = getObject(arg0).setToken(getStringFromWasm0(arg1, arg2));
654
+ return addHeapObject(ret);
655
+ } finally {
656
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
657
+ }
658
+ },
659
+ __wbg_set_1eb0999cf5d27fc8: function(arg0, arg1, arg2) {
660
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
661
+ return addHeapObject(ret);
662
+ },
663
+ __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
664
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
665
+ },
666
+ __wbg_set_body_9a7e00afe3cfe244: function(arg0, arg1) {
667
+ getObject(arg0).body = getObject(arg1);
668
+ },
669
+ __wbg_set_credentials_c4a58d2e05ef24fb: function(arg0, arg1) {
670
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
671
+ },
672
+ __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
673
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
674
+ },
675
+ __wbg_set_headers_cfc5f4b2c1f20549: function(arg0, arg1) {
676
+ getObject(arg0).headers = getObject(arg1);
677
+ },
678
+ __wbg_set_method_c3e20375f5ae7fac: function(arg0, arg1, arg2) {
679
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
680
+ },
681
+ __wbg_set_mode_b13642c312648202: function(arg0, arg1) {
682
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
683
+ },
684
+ __wbg_set_signal_f2d3f8599248896d: function(arg0, arg1) {
685
+ getObject(arg0).signal = getObject(arg1);
686
+ },
687
+ __wbg_signal_d1285ecab4ebc5ad: function(arg0) {
688
+ const ret = getObject(arg0).signal;
689
+ return addHeapObject(ret);
690
+ },
691
+ __wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
692
+ const ret = getObject(arg1).stack;
693
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
694
+ const len1 = WASM_VECTOR_LEN;
695
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
696
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
697
+ },
698
+ __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
699
+ const ret = typeof global === 'undefined' ? null : global;
700
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
701
+ },
702
+ __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
703
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
704
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
705
+ },
706
+ __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
707
+ const ret = typeof self === 'undefined' ? null : self;
708
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
709
+ },
710
+ __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
711
+ const ret = typeof window === 'undefined' ? null : window;
712
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
713
+ },
714
+ __wbg_status_89d7e803db911ee7: function(arg0) {
715
+ const ret = getObject(arg0).status;
716
+ return ret;
717
+ },
718
+ __wbg_stringify_8d1cc6ff383e8bae: function() { return handleError(function (arg0) {
719
+ const ret = JSON.stringify(getObject(arg0));
720
+ return addHeapObject(ret);
721
+ }, arguments); },
722
+ __wbg_then_0d9fe2c7b1857d32: function(arg0, arg1, arg2) {
723
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
724
+ return addHeapObject(ret);
725
+ },
726
+ __wbg_then_b9e7b3b5f1a9e1b5: function(arg0, arg1) {
727
+ const ret = getObject(arg0).then(getObject(arg1));
728
+ return addHeapObject(ret);
729
+ },
730
+ __wbg_url_c484c26b1fbf5126: function(arg0, arg1) {
731
+ const ret = getObject(arg1).url;
732
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
733
+ const len1 = WASM_VECTOR_LEN;
734
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
735
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
736
+ },
737
+ __wbg_value_0546255b415e96c1: function(arg0) {
738
+ const ret = getObject(arg0).value;
739
+ return addHeapObject(ret);
740
+ },
741
+ __wbg_warn_a40b971467b219c7: function(arg0, arg1, arg2, arg3) {
742
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
743
+ },
744
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
745
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 415, function: Function { arguments: [Externref], shim_idx: 416, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
746
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_883, __wasm_bindgen_func_elem_884);
747
+ return addHeapObject(ret);
748
+ },
749
+ __wbindgen_cast_0000000000000002: function(arg0) {
750
+ // Cast intrinsic for `F64 -> Externref`.
751
+ const ret = arg0;
752
+ return addHeapObject(ret);
753
+ },
754
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
755
+ // Cast intrinsic for `Ref(String) -> Externref`.
756
+ const ret = getStringFromWasm0(arg0, arg1);
757
+ return addHeapObject(ret);
758
+ },
759
+ __wbindgen_object_clone_ref: function(arg0) {
760
+ const ret = getObject(arg0);
761
+ return addHeapObject(ret);
762
+ },
763
+ __wbindgen_object_drop_ref: function(arg0) {
764
+ takeObject(arg0);
765
+ },
766
+ };
767
+ return {
768
+ __proto__: null,
769
+ "./model_health_wasm_bg.js": import0,
770
+ };
771
+ }
772
+
773
+ function __wasm_bindgen_func_elem_884(arg0, arg1, arg2) {
774
+ wasm.__wasm_bindgen_func_elem_884(arg0, arg1, addHeapObject(arg2));
775
+ }
776
+
777
+ function __wasm_bindgen_func_elem_1271(arg0, arg1, arg2, arg3) {
778
+ wasm.__wasm_bindgen_func_elem_1271(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
779
+ }
780
+
781
+
782
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
783
+
784
+
785
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
786
+ const ModelHealthServiceFinalization = (typeof FinalizationRegistry === 'undefined')
787
+ ? { register: () => {}, unregister: () => {} }
788
+ : new FinalizationRegistry(ptr => wasm.__wbg_modelhealthservice_free(ptr >>> 0, 1));
789
+
790
+ function addHeapObject(obj) {
791
+ if (heap_next === heap.length) heap.push(heap.length + 1);
792
+ const idx = heap_next;
793
+ heap_next = heap[idx];
794
+
795
+ heap[idx] = obj;
796
+ return idx;
797
+ }
798
+
799
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
800
+ ? { register: () => {}, unregister: () => {} }
801
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
802
+
803
+ function debugString(val) {
804
+ // primitive types
805
+ const type = typeof val;
806
+ if (type == 'number' || type == 'boolean' || val == null) {
807
+ return `${val}`;
808
+ }
809
+ if (type == 'string') {
810
+ return `"${val}"`;
811
+ }
812
+ if (type == 'symbol') {
813
+ const description = val.description;
814
+ if (description == null) {
815
+ return 'Symbol';
816
+ } else {
817
+ return `Symbol(${description})`;
818
+ }
819
+ }
820
+ if (type == 'function') {
821
+ const name = val.name;
822
+ if (typeof name == 'string' && name.length > 0) {
823
+ return `Function(${name})`;
824
+ } else {
825
+ return 'Function';
826
+ }
827
+ }
828
+ // objects
829
+ if (Array.isArray(val)) {
830
+ const length = val.length;
831
+ let debug = '[';
832
+ if (length > 0) {
833
+ debug += debugString(val[0]);
834
+ }
835
+ for(let i = 1; i < length; i++) {
836
+ debug += ', ' + debugString(val[i]);
837
+ }
838
+ debug += ']';
839
+ return debug;
840
+ }
841
+ // Test for built-in
842
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
843
+ let className;
844
+ if (builtInMatches && builtInMatches.length > 1) {
845
+ className = builtInMatches[1];
846
+ } else {
847
+ // Failed to match the standard '[object ClassName]'
848
+ return toString.call(val);
849
+ }
850
+ if (className == 'Object') {
851
+ // we're a user defined class or Object
852
+ // JSON.stringify avoids problems with cycles, and is generally much
853
+ // easier than looping through ownProperties of `val`.
854
+ try {
855
+ return 'Object(' + JSON.stringify(val) + ')';
856
+ } catch (_) {
857
+ return 'Object';
858
+ }
859
+ }
860
+ // errors
861
+ if (val instanceof Error) {
862
+ return `${val.name}: ${val.message}\n${val.stack}`;
863
+ }
864
+ // TODO we could test for more things here, like `Set`s and `Map`s.
865
+ return className;
866
+ }
867
+
868
+ function dropObject(idx) {
869
+ if (idx < 132) return;
870
+ heap[idx] = heap_next;
871
+ heap_next = idx;
872
+ }
873
+
874
+ function getArrayU8FromWasm0(ptr, len) {
875
+ ptr = ptr >>> 0;
876
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
877
+ }
878
+
879
+ let cachedDataViewMemory0 = null;
880
+ function getDataViewMemory0() {
881
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
882
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
883
+ }
884
+ return cachedDataViewMemory0;
885
+ }
886
+
887
+ function getStringFromWasm0(ptr, len) {
888
+ ptr = ptr >>> 0;
889
+ return decodeText(ptr, len);
890
+ }
891
+
892
+ let cachedUint8ArrayMemory0 = null;
893
+ function getUint8ArrayMemory0() {
894
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
895
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
896
+ }
897
+ return cachedUint8ArrayMemory0;
898
+ }
899
+
900
+ function getObject(idx) { return heap[idx]; }
901
+
902
+ function handleError(f, args) {
903
+ try {
904
+ return f.apply(this, args);
905
+ } catch (e) {
906
+ wasm.__wbindgen_export3(addHeapObject(e));
907
+ }
908
+ }
909
+
910
+ let heap = new Array(128).fill(undefined);
911
+ heap.push(undefined, null, true, false);
912
+
913
+ let heap_next = heap.length;
914
+
915
+ function isLikeNone(x) {
916
+ return x === undefined || x === null;
917
+ }
918
+
919
+ function makeMutClosure(arg0, arg1, dtor, f) {
920
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
921
+ const real = (...args) => {
922
+
923
+ // First up with a closure we increment the internal reference
924
+ // count. This ensures that the Rust closure environment won't
925
+ // be deallocated while we're invoking it.
926
+ state.cnt++;
927
+ const a = state.a;
928
+ state.a = 0;
929
+ try {
930
+ return f(a, state.b, ...args);
931
+ } finally {
932
+ state.a = a;
933
+ real._wbg_cb_unref();
934
+ }
935
+ };
936
+ real._wbg_cb_unref = () => {
937
+ if (--state.cnt === 0) {
938
+ state.dtor(state.a, state.b);
939
+ state.a = 0;
940
+ CLOSURE_DTORS.unregister(state);
941
+ }
942
+ };
943
+ CLOSURE_DTORS.register(real, state, state);
944
+ return real;
945
+ }
946
+
947
+ function passStringToWasm0(arg, malloc, realloc) {
948
+ if (realloc === undefined) {
949
+ const buf = cachedTextEncoder.encode(arg);
950
+ const ptr = malloc(buf.length, 1) >>> 0;
951
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
952
+ WASM_VECTOR_LEN = buf.length;
953
+ return ptr;
954
+ }
955
+
956
+ let len = arg.length;
957
+ let ptr = malloc(len, 1) >>> 0;
958
+
959
+ const mem = getUint8ArrayMemory0();
960
+
961
+ let offset = 0;
962
+
963
+ for (; offset < len; offset++) {
964
+ const code = arg.charCodeAt(offset);
965
+ if (code > 0x7F) break;
966
+ mem[ptr + offset] = code;
967
+ }
968
+ if (offset !== len) {
969
+ if (offset !== 0) {
970
+ arg = arg.slice(offset);
971
+ }
972
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
973
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
974
+ const ret = cachedTextEncoder.encodeInto(arg, view);
975
+
976
+ offset += ret.written;
977
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
978
+ }
979
+
980
+ WASM_VECTOR_LEN = offset;
981
+ return ptr;
982
+ }
983
+
984
+ function takeObject(idx) {
985
+ const ret = getObject(idx);
986
+ dropObject(idx);
987
+ return ret;
988
+ }
989
+
990
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
991
+ cachedTextDecoder.decode();
992
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
993
+ let numBytesDecoded = 0;
994
+ function decodeText(ptr, len) {
995
+ numBytesDecoded += len;
996
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
997
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
998
+ cachedTextDecoder.decode();
999
+ numBytesDecoded = len;
1000
+ }
1001
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1002
+ }
1003
+
1004
+ const cachedTextEncoder = new TextEncoder();
1005
+
1006
+ if (!('encodeInto' in cachedTextEncoder)) {
1007
+ cachedTextEncoder.encodeInto = function (arg, view) {
1008
+ const buf = cachedTextEncoder.encode(arg);
1009
+ view.set(buf);
1010
+ return {
1011
+ read: arg.length,
1012
+ written: buf.length
1013
+ };
1014
+ };
1015
+ }
1016
+
1017
+ let WASM_VECTOR_LEN = 0;
1018
+
1019
+ let wasmModule, wasm;
1020
+ function __wbg_finalize_init(instance, module) {
1021
+ wasm = instance.exports;
1022
+ wasmModule = module;
1023
+ cachedDataViewMemory0 = null;
1024
+ cachedUint8ArrayMemory0 = null;
1025
+ wasm.__wbindgen_start();
1026
+ return wasm;
1027
+ }
1028
+
1029
+ async function __wbg_load(module, imports) {
1030
+ if (typeof Response === 'function' && module instanceof Response) {
1031
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1032
+ try {
1033
+ return await WebAssembly.instantiateStreaming(module, imports);
1034
+ } catch (e) {
1035
+ const validResponse = module.ok && expectedResponseType(module.type);
1036
+
1037
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1038
+ 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);
1039
+
1040
+ } else { throw e; }
1041
+ }
1042
+ }
1043
+
1044
+ const bytes = await module.arrayBuffer();
1045
+ return await WebAssembly.instantiate(bytes, imports);
1046
+ } else {
1047
+ const instance = await WebAssembly.instantiate(module, imports);
1048
+
1049
+ if (instance instanceof WebAssembly.Instance) {
1050
+ return { instance, module };
1051
+ } else {
1052
+ return instance;
1053
+ }
1054
+ }
1055
+
1056
+ function expectedResponseType(type) {
1057
+ switch (type) {
1058
+ case 'basic': case 'cors': case 'default': return true;
1059
+ }
1060
+ return false;
1061
+ }
1062
+ }
1063
+
1064
+ function initSync(module) {
1065
+ if (wasm !== undefined) return wasm;
1066
+
1067
+
1068
+ if (module !== undefined) {
1069
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1070
+ ({module} = module)
1071
+ } else {
1072
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1073
+ }
1074
+ }
1075
+
1076
+ const imports = __wbg_get_imports();
1077
+ if (!(module instanceof WebAssembly.Module)) {
1078
+ module = new WebAssembly.Module(module);
1079
+ }
1080
+ const instance = new WebAssembly.Instance(module, imports);
1081
+ return __wbg_finalize_init(instance, module);
1082
+ }
1083
+
1084
+ async function __wbg_init(module_or_path) {
1085
+ if (wasm !== undefined) return wasm;
1086
+
1087
+
1088
+ if (module_or_path !== undefined) {
1089
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1090
+ ({module_or_path} = module_or_path)
1091
+ } else {
1092
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1093
+ }
1094
+ }
1095
+
1096
+ if (module_or_path === undefined) {
1097
+ module_or_path = new URL('model_health_wasm_bg.wasm', import.meta.url);
1098
+ }
1099
+ const imports = __wbg_get_imports();
1100
+
1101
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1102
+ module_or_path = fetch(module_or_path);
1103
+ }
1104
+
1105
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1106
+
1107
+ return __wbg_finalize_init(instance, module);
1108
+ }
1109
+
1110
+ export { initSync, __wbg_init as default };