rust-fetch 1.0.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/rust_fetch.js CHANGED
@@ -1,137 +1,1000 @@
1
- let wasm;
1
+ /* @ts-self-types="./rust_fetch.d.ts" */
2
2
 
3
- let WASM_VECTOR_LEN = 0;
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, controller);
31
+ return ret;
32
+ }
33
+ /**
34
+ * @param {ReadableByteStreamController} controller
35
+ */
36
+ start(controller) {
37
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, 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;
4
48
 
5
- let cachedUint8ArrayMemory0 = null;
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, reason);
67
+ return 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 ret;
76
+ }
77
+ /**
78
+ * @param {any} chunk
79
+ * @returns {Promise<any>}
80
+ */
81
+ write(chunk) {
82
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
83
+ return ret;
84
+ }
85
+ }
86
+ if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
6
87
 
7
- function getUint8ArrayMemory0() {
8
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
88
+ export class IntoUnderlyingSource {
89
+ static __wrap(ptr) {
90
+ const obj = Object.create(IntoUnderlyingSource.prototype);
91
+ obj.__wbg_ptr = ptr;
92
+ IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj);
93
+ return obj;
10
94
  }
11
- return cachedUint8ArrayMemory0;
95
+ __destroy_into_raw() {
96
+ const ptr = this.__wbg_ptr;
97
+ this.__wbg_ptr = 0;
98
+ IntoUnderlyingSourceFinalization.unregister(this);
99
+ return ptr;
100
+ }
101
+ free() {
102
+ const ptr = this.__destroy_into_raw();
103
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
104
+ }
105
+ cancel() {
106
+ const ptr = this.__destroy_into_raw();
107
+ wasm.intounderlyingsource_cancel(ptr);
108
+ }
109
+ /**
110
+ * @param {ReadableStreamDefaultController} controller
111
+ * @returns {Promise<any>}
112
+ */
113
+ pull(controller) {
114
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
115
+ return ret;
116
+ }
117
+ }
118
+ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
119
+
120
+ /**
121
+ * HTTP client for JavaScript
122
+ */
123
+ export class WasmClient {
124
+ static __wrap(ptr) {
125
+ const obj = Object.create(WasmClient.prototype);
126
+ obj.__wbg_ptr = ptr;
127
+ WasmClientFinalization.register(obj, obj.__wbg_ptr, obj);
128
+ return obj;
129
+ }
130
+ __destroy_into_raw() {
131
+ const ptr = this.__wbg_ptr;
132
+ this.__wbg_ptr = 0;
133
+ WasmClientFinalization.unregister(this);
134
+ return ptr;
135
+ }
136
+ free() {
137
+ const ptr = this.__destroy_into_raw();
138
+ wasm.__wbg_wasmclient_free(ptr, 0);
139
+ }
140
+ /**
141
+ * Run `interceptor` on every request before it is sent; returns an id for `ejectInterceptor`
142
+ * @param {RequestInterceptor} interceptor
143
+ * @returns {number}
144
+ */
145
+ addRequestInterceptor(interceptor) {
146
+ const ret = wasm.wasmclient_addRequestInterceptor(this.__wbg_ptr, interceptor);
147
+ return ret >>> 0;
148
+ }
149
+ /**
150
+ * Run handlers on every settled request, like `promise.then(onFulfilled, onRejected)`;
151
+ * returns an id for `ejectInterceptor`
152
+ * @param {ResponseFulfilledInterceptor | null} [on_fulfilled]
153
+ * @param {ResponseRejectedInterceptor | null} [on_rejected]
154
+ * @returns {number}
155
+ */
156
+ addResponseInterceptor(on_fulfilled, on_rejected) {
157
+ const ret = wasm.wasmclient_addResponseInterceptor(this.__wbg_ptr, isLikeNone(on_fulfilled) ? 0 : addToExternrefTable0(on_fulfilled), isLikeNone(on_rejected) ? 0 : addToExternrefTable0(on_rejected));
158
+ return ret >>> 0;
159
+ }
160
+ /**
161
+ * Remove all interceptors
162
+ */
163
+ clearInterceptors() {
164
+ wasm.wasmclient_clearInterceptors(this.__wbg_ptr);
165
+ }
166
+ /**
167
+ * Make a DELETE request
168
+ * @param {string} url
169
+ * @param {RequestOptions | null} [options]
170
+ * @returns {Promise<HttpResponse>}
171
+ */
172
+ delete(url, options) {
173
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
174
+ const len0 = WASM_VECTOR_LEN;
175
+ const ret = wasm.wasmclient_delete(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
176
+ return ret;
177
+ }
178
+ /**
179
+ * Remove an interceptor; returns whether it was registered
180
+ * @param {number} id
181
+ * @returns {boolean}
182
+ */
183
+ ejectInterceptor(id) {
184
+ const ret = wasm.wasmclient_ejectInterceptor(this.__wbg_ptr, id);
185
+ return ret !== 0;
186
+ }
187
+ /**
188
+ * Make a request described by a `fetch`-style init object
189
+ * @param {string} url
190
+ * @param {FetchInit | null} [init]
191
+ * @returns {Promise<HttpResponse>}
192
+ */
193
+ fetch(url, init) {
194
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
195
+ const len0 = WASM_VECTOR_LEN;
196
+ const ret = wasm.wasmclient_fetch(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
197
+ return ret;
198
+ }
199
+ /**
200
+ * Make a GET request
201
+ * @param {string} url
202
+ * @param {RequestOptions | null} [options]
203
+ * @returns {Promise<HttpResponse>}
204
+ */
205
+ get(url, options) {
206
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
207
+ const len0 = WASM_VECTOR_LEN;
208
+ const ret = wasm.wasmclient_get(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
209
+ return ret;
210
+ }
211
+ /**
212
+ * Make a HEAD request
213
+ * @param {string} url
214
+ * @param {RequestOptions | null} [options]
215
+ * @returns {Promise<HttpResponse>}
216
+ */
217
+ head(url, options) {
218
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
219
+ const len0 = WASM_VECTOR_LEN;
220
+ const ret = wasm.wasmclient_head(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
221
+ return ret;
222
+ }
223
+ /**
224
+ * Create a new client
225
+ * @param {ClientOptions | null} [options]
226
+ */
227
+ constructor(options) {
228
+ const ret = wasm.wasmclient_new(isLikeNone(options) ? 0 : addToExternrefTable0(options));
229
+ if (ret[2]) {
230
+ throw takeFromExternrefTable0(ret[1]);
231
+ }
232
+ this.__wbg_ptr = ret[0];
233
+ WasmClientFinalization.register(this, this.__wbg_ptr, this);
234
+ return this;
235
+ }
236
+ /**
237
+ * Make a PATCH request; the body is taken from `init.body`
238
+ * @param {string} url
239
+ * @param {FetchInit | null} [init]
240
+ * @returns {Promise<HttpResponse>}
241
+ */
242
+ patch(url, init) {
243
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
244
+ const len0 = WASM_VECTOR_LEN;
245
+ const ret = wasm.wasmclient_patch(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
246
+ return ret;
247
+ }
248
+ /**
249
+ * Make a PATCH request with a JSON body
250
+ * @param {string} url
251
+ * @param {any} body
252
+ * @param {RequestOptions | null} [options]
253
+ * @returns {Promise<HttpResponse>}
254
+ */
255
+ patch_json(url, body, options) {
256
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
+ const len0 = WASM_VECTOR_LEN;
258
+ const ret = wasm.wasmclient_patch_json(this.__wbg_ptr, ptr0, len0, body, isLikeNone(options) ? 0 : addToExternrefTable0(options));
259
+ return ret;
260
+ }
261
+ /**
262
+ * Make a POST request; the body is taken from `init.body`
263
+ * @param {string} url
264
+ * @param {FetchInit | null} [init]
265
+ * @returns {Promise<HttpResponse>}
266
+ */
267
+ post(url, init) {
268
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
269
+ const len0 = WASM_VECTOR_LEN;
270
+ const ret = wasm.wasmclient_post(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
271
+ return ret;
272
+ }
273
+ /**
274
+ * Make a POST request with a JSON body
275
+ * @param {string} url
276
+ * @param {any} body
277
+ * @param {RequestOptions | null} [options]
278
+ * @returns {Promise<HttpResponse>}
279
+ */
280
+ post_json(url, body, options) {
281
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
+ const len0 = WASM_VECTOR_LEN;
283
+ const ret = wasm.wasmclient_post_json(this.__wbg_ptr, ptr0, len0, body, isLikeNone(options) ? 0 : addToExternrefTable0(options));
284
+ return ret;
285
+ }
286
+ /**
287
+ * Make a PUT request; the body is taken from `init.body`
288
+ * @param {string} url
289
+ * @param {FetchInit | null} [init]
290
+ * @returns {Promise<HttpResponse>}
291
+ */
292
+ put(url, init) {
293
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
294
+ const len0 = WASM_VECTOR_LEN;
295
+ const ret = wasm.wasmclient_put(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
296
+ return ret;
297
+ }
298
+ /**
299
+ * Make a PUT request with a JSON body
300
+ * @param {string} url
301
+ * @param {any} body
302
+ * @param {RequestOptions | null} [options]
303
+ * @returns {Promise<HttpResponse>}
304
+ */
305
+ put_json(url, body, options) {
306
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
307
+ const len0 = WASM_VECTOR_LEN;
308
+ const ret = wasm.wasmclient_put_json(this.__wbg_ptr, ptr0, len0, body, isLikeNone(options) ? 0 : addToExternrefTable0(options));
309
+ return ret;
310
+ }
311
+ /**
312
+ * Make a request with any method, headers and body
313
+ * @param {string} method
314
+ * @param {string} url
315
+ * @param {HeadersLike | null} [headers]
316
+ * @param {RequestBody | null} [body]
317
+ * @param {RequestOptions | null} [options]
318
+ * @returns {Promise<HttpResponse>}
319
+ */
320
+ request(method, url, headers, body, options) {
321
+ const ptr0 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
+ const len0 = WASM_VECTOR_LEN;
323
+ const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
324
+ const len1 = WASM_VECTOR_LEN;
325
+ const ret = wasm.wasmclient_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(headers) ? 0 : addToExternrefTable0(headers), isLikeNone(body) ? 0 : addToExternrefTable0(body), isLikeNone(options) ? 0 : addToExternrefTable0(options));
326
+ return ret;
327
+ }
328
+ }
329
+ if (Symbol.dispose) WasmClient.prototype[Symbol.dispose] = WasmClient.prototype.free;
330
+
331
+ /**
332
+ * Create a configured HTTP client (exported for advanced use)
333
+ * @returns {WasmClient}
334
+ */
335
+ export function create_client() {
336
+ const ret = wasm.create_client();
337
+ if (ret[2]) {
338
+ throw takeFromExternrefTable0(ret[1]);
339
+ }
340
+ return WasmClient.__wrap(ret[0]);
341
+ }
342
+
343
+ /**
344
+ * Fetch a URL and parse the body as JSON (whatever its Content-Type).
345
+ * An empty body resolves to `null`.
346
+ * @param {string} url
347
+ * @returns {Promise<any>}
348
+ */
349
+ export function fetch_json(url) {
350
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
+ const len0 = WASM_VECTOR_LEN;
352
+ const ret = wasm.fetch_json(ptr0, len0);
353
+ return ret;
354
+ }
355
+
356
+ /**
357
+ * Fetch JSON data and return as a Promise
358
+ * @param {string} url
359
+ * @returns {Promise<any>}
360
+ */
361
+ export function fetch_json_promise(url) {
362
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
363
+ const len0 = WASM_VECTOR_LEN;
364
+ const ret = wasm.fetch_json_promise(ptr0, len0);
365
+ return ret;
366
+ }
367
+
368
+ /**
369
+ * Fetch a URL and return the body as text
370
+ * @param {string} url
371
+ * @returns {Promise<string>}
372
+ */
373
+ export function fetch_text(url) {
374
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
375
+ const len0 = WASM_VECTOR_LEN;
376
+ const ret = wasm.fetch_text(ptr0, len0);
377
+ return ret;
378
+ }
379
+
380
+ /**
381
+ * Fetch API data (deprecated, use fetch_json instead)
382
+ * @param {string} url
383
+ * @returns {Promise<any>}
384
+ */
385
+ export function fetch_wasm_api(url) {
386
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
387
+ const len0 = WASM_VECTOR_LEN;
388
+ const ret = wasm.fetch_wasm_api(ptr0, len0);
389
+ return ret;
390
+ }
391
+
392
+ /**
393
+ * Fetch HTML data (deprecated, use fetch_text instead)
394
+ * @param {string} url
395
+ * @returns {Promise<string>}
396
+ */
397
+ export function fetch_wasm_html(url) {
398
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
399
+ const len0 = WASM_VECTOR_LEN;
400
+ const ret = wasm.fetch_wasm_html(ptr0, len0);
401
+ return ret;
402
+ }
403
+
404
+ /**
405
+ * Fetch JSON data (deprecated, use fetch_json instead)
406
+ * @param {string} url
407
+ * @returns {Promise<any>}
408
+ */
409
+ export function fetch_wasm_json(url) {
410
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
411
+ const len0 = WASM_VECTOR_LEN;
412
+ const ret = wasm.fetch_wasm_json(ptr0, len0);
413
+ return ret;
414
+ }
415
+
416
+ /**
417
+ * Fetch data and return as map (deprecated, use fetch_json instead)
418
+ * @param {string} url
419
+ * @returns {Promise<any>}
420
+ */
421
+ export function fetch_wasm_map(url) {
422
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
423
+ const len0 = WASM_VECTOR_LEN;
424
+ const ret = wasm.fetch_wasm_map(ptr0, len0);
425
+ return ret;
426
+ }
427
+
428
+ /**
429
+ * Fetch with a method, headers and an optional string body.
430
+ *
431
+ * Resolves to `{ status, statusText, ok, url, headers, body }`.
432
+ * @param {string} url
433
+ * @param {string} method
434
+ * @param {any} headers
435
+ * @param {string | null} [body]
436
+ * @returns {Promise<any>}
437
+ */
438
+ export function fetch_with_options(url, method, headers, body) {
439
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
440
+ const len0 = WASM_VECTOR_LEN;
441
+ const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
442
+ const len1 = WASM_VECTOR_LEN;
443
+ var ptr2 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
444
+ var len2 = WASM_VECTOR_LEN;
445
+ const ret = wasm.fetch_with_options(ptr0, len0, ptr1, len1, headers, ptr2, len2);
446
+ return ret;
447
+ }
448
+ function __wbg_get_imports() {
449
+ const import0 = {
450
+ __proto__: null,
451
+ __wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
452
+ const v = arg0;
453
+ const ret = typeof(v) === 'boolean' ? v : undefined;
454
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
455
+ },
456
+ __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
457
+ const ret = debugString(arg1);
458
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
459
+ const len1 = WASM_VECTOR_LEN;
460
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
461
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
462
+ },
463
+ __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
464
+ const ret = typeof(arg0) === 'function';
465
+ return ret;
466
+ },
467
+ __wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
468
+ const ret = arg0 === null;
469
+ return ret;
470
+ },
471
+ __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
472
+ const val = arg0;
473
+ const ret = typeof(val) === 'object' && val !== null;
474
+ return ret;
475
+ },
476
+ __wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
477
+ const ret = arg0 === undefined;
478
+ return ret;
479
+ },
480
+ __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
481
+ const obj = arg1;
482
+ const ret = typeof(obj) === 'number' ? obj : undefined;
483
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
484
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
485
+ },
486
+ __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
487
+ const obj = arg1;
488
+ const ret = typeof(obj) === 'string' ? obj : undefined;
489
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
490
+ var len1 = WASM_VECTOR_LEN;
491
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
492
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
493
+ },
494
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
495
+ throw new Error(getStringFromWasm0(arg0, arg1));
496
+ },
497
+ __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
498
+ arg0._wbg_cb_unref();
499
+ },
500
+ __wbg_abort_334e7f918b7c5047: function(arg0, arg1) {
501
+ arg0.abort(arg1);
502
+ },
503
+ __wbg_abort_f78b99d80248bacb: function(arg0) {
504
+ arg0.abort();
505
+ },
506
+ __wbg_aborted_5b2b5f06b5e59fde: function(arg0) {
507
+ const ret = arg0.aborted;
508
+ return ret;
509
+ },
510
+ __wbg_addEventListener_4d0db17c671ea324: function() { return handleError(function (arg0, arg1, arg2, arg3) {
511
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
512
+ }, arguments); },
513
+ __wbg_append_1938ed58fb5613b8: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
514
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
515
+ }, arguments); },
516
+ __wbg_body_4e088733babc630d: function(arg0) {
517
+ const ret = arg0.body;
518
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
519
+ },
520
+ __wbg_buffer_56ec2905a66f58b9: function(arg0) {
521
+ const ret = arg0.buffer;
522
+ return ret;
523
+ },
524
+ __wbg_byobRequest_54f7ce41d584549a: function(arg0) {
525
+ const ret = arg0.byobRequest;
526
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
527
+ },
528
+ __wbg_byteLength_9f985b8373f1f3fe: function(arg0) {
529
+ const ret = arg0.byteLength;
530
+ return ret;
531
+ },
532
+ __wbg_byteOffset_0bd5a6a03553639c: function(arg0) {
533
+ const ret = arg0.byteOffset;
534
+ return ret;
535
+ },
536
+ __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
537
+ const ret = arg0.call(arg1, arg2);
538
+ return ret;
539
+ }, arguments); },
540
+ __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
541
+ const ret = arg0.call(arg1);
542
+ return ret;
543
+ }, arguments); },
544
+ __wbg_cancel_7c2a08c8db4c73f3: function(arg0) {
545
+ const ret = arg0.cancel();
546
+ return ret;
547
+ },
548
+ __wbg_catch_92594c2d17f55f12: function(arg0, arg1) {
549
+ const ret = arg0.catch(arg1);
550
+ return ret;
551
+ },
552
+ __wbg_clearTimeout_1daad5c6ee4fcd3b: function(arg0) {
553
+ const ret = clearTimeout(arg0);
554
+ return ret;
555
+ },
556
+ __wbg_clearTimeout_80e0bf42f165386a: function(arg0) {
557
+ clearTimeout(arg0);
558
+ },
559
+ __wbg_close_185286988f30f252: function() { return handleError(function (arg0) {
560
+ arg0.close();
561
+ }, arguments); },
562
+ __wbg_close_748f26698dabe269: function() { return handleError(function (arg0) {
563
+ arg0.close();
564
+ }, arguments); },
565
+ __wbg_done_b41a1d26cdb37fb6: function(arg0) {
566
+ const ret = arg0.done;
567
+ return ret;
568
+ },
569
+ __wbg_enqueue_4a01c128f9a0de16: function() { return handleError(function (arg0, arg1) {
570
+ arg0.enqueue(arg1);
571
+ }, arguments); },
572
+ __wbg_entries_b55ec7e0dc443355: function(arg0) {
573
+ const ret = arg0.entries();
574
+ return ret;
575
+ },
576
+ __wbg_entries_fb6397112b1de25f: function(arg0) {
577
+ const ret = Object.entries(arg0);
578
+ return ret;
579
+ },
580
+ __wbg_fetch_7a37768ab67c5bd8: function(arg0) {
581
+ const ret = fetch(arg0);
582
+ return ret;
583
+ },
584
+ __wbg_fetch_efc64baf325b084d: function(arg0, arg1) {
585
+ const ret = arg0.fetch(arg1);
586
+ return ret;
587
+ },
588
+ __wbg_from_296ca31f8d0f1c52: function(arg0) {
589
+ const ret = Array.from(arg0);
590
+ return ret;
591
+ },
592
+ __wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
593
+ const ret = arg0.getReader();
594
+ return ret;
595
+ }, arguments); },
596
+ __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
597
+ const ret = Reflect.get(arg0, arg1);
598
+ return ret;
599
+ }, arguments); },
600
+ __wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
601
+ const ret = Reflect.get(arg0, arg1);
602
+ return ret;
603
+ }, arguments); },
604
+ __wbg_get_6c896e0571ddae51: function(arg0, arg1) {
605
+ const ret = arg0[arg1 >>> 0];
606
+ return ret;
607
+ },
608
+ __wbg_get_done_7020b91c987365c7: function(arg0) {
609
+ const ret = arg0.done;
610
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
611
+ },
612
+ __wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
613
+ const ret = arg0[arg1 >>> 0];
614
+ return ret;
615
+ },
616
+ __wbg_get_value_87fbd6ad1283f2e7: function(arg0) {
617
+ const ret = arg0.value;
618
+ return ret;
619
+ },
620
+ __wbg_has_5d6706e5209576c1: function() { return handleError(function (arg0, arg1) {
621
+ const ret = Reflect.has(arg0, arg1);
622
+ return ret;
623
+ }, arguments); },
624
+ __wbg_headers_eba93595f8944c2f: function(arg0) {
625
+ const ret = arg0.headers;
626
+ return ret;
627
+ },
628
+ __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
629
+ let result;
630
+ try {
631
+ result = arg0 instanceof ArrayBuffer;
632
+ } catch (_) {
633
+ result = false;
634
+ }
635
+ const ret = result;
636
+ return ret;
637
+ },
638
+ __wbg_instanceof_Response_b8758567269c30b2: function(arg0) {
639
+ let result;
640
+ try {
641
+ result = arg0 instanceof Response;
642
+ } catch (_) {
643
+ result = false;
644
+ }
645
+ const ret = result;
646
+ return ret;
647
+ },
648
+ __wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
649
+ const ret = Array.isArray(arg0);
650
+ return ret;
651
+ },
652
+ __wbg_isPrototypeOf_59fbabb5a4f3f1ff: function(arg0, arg1) {
653
+ const ret = arg0.isPrototypeOf(arg1);
654
+ return ret;
655
+ },
656
+ __wbg_isView_87b70d94ddaa60d3: function(arg0) {
657
+ const ret = ArrayBuffer.isView(arg0);
658
+ return ret;
659
+ },
660
+ __wbg_iterator_e3c31c892080e444: function() {
661
+ const ret = Symbol.iterator;
662
+ return ret;
663
+ },
664
+ __wbg_length_7f3c00c40364105e: function(arg0) {
665
+ const ret = arg0.length;
666
+ return ret;
667
+ },
668
+ __wbg_length_d4bdea10311bd9cf: function(arg0) {
669
+ const ret = arg0.length;
670
+ return ret;
671
+ },
672
+ __wbg_new_1dbf7428bba60a42: function(arg0) {
673
+ const ret = new Uint8Array(arg0);
674
+ return ret;
675
+ },
676
+ __wbg_new_2e41357094e99294: function() { return handleError(function () {
677
+ const ret = new AbortController();
678
+ return ret;
679
+ }, arguments); },
680
+ __wbg_new_343a093a3c2ffb4e: function(arg0, arg1) {
681
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
682
+ return ret;
683
+ },
684
+ __wbg_new_5502aad30c185fc8: function(arg0, arg1) {
685
+ try {
686
+ var state0 = {a: arg0, b: arg1};
687
+ var cb0 = (arg0, arg1) => {
688
+ const a = state0.a;
689
+ state0.a = 0;
690
+ try {
691
+ return wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(a, state0.b, arg0, arg1);
692
+ } finally {
693
+ state0.a = a;
694
+ }
695
+ };
696
+ const ret = new Promise(cb0);
697
+ return ret;
698
+ } finally {
699
+ state0.a = 0;
700
+ }
701
+ },
702
+ __wbg_new_617a8cdb8bb1130e: function() {
703
+ const ret = new Object();
704
+ return ret;
705
+ },
706
+ __wbg_new_83ca405eae412a62: function() { return handleError(function () {
707
+ const ret = new Headers();
708
+ return ret;
709
+ }, arguments); },
710
+ __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
711
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
712
+ return ret;
713
+ },
714
+ __wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
715
+ try {
716
+ var state0 = {a: arg0, b: arg1};
717
+ var cb0 = (arg0, arg1) => {
718
+ const a = state0.a;
719
+ state0.a = 0;
720
+ try {
721
+ return wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(a, state0.b, arg0, arg1);
722
+ } finally {
723
+ state0.a = a;
724
+ }
725
+ };
726
+ const ret = new Promise(cb0);
727
+ return ret;
728
+ } finally {
729
+ state0.a = 0;
730
+ }
731
+ },
732
+ __wbg_new_with_byte_offset_and_length_2f5d7fc2a828b74d: function(arg0, arg1, arg2) {
733
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
734
+ return ret;
735
+ },
736
+ __wbg_new_with_into_underlying_source_fd904252f385f59c: function(arg0, arg1) {
737
+ const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
738
+ return ret;
739
+ },
740
+ __wbg_new_with_length_3da0ad195f6f63ba: function(arg0) {
741
+ const ret = new Uint8Array(arg0 >>> 0);
742
+ return ret;
743
+ },
744
+ __wbg_new_with_str_and_init_4618dee4e950224f: function() { return handleError(function (arg0, arg1, arg2) {
745
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
746
+ return ret;
747
+ }, arguments); },
748
+ __wbg_next_33784799010f1bbe: function(arg0) {
749
+ const ret = arg0.next;
750
+ return ret;
751
+ },
752
+ __wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
753
+ const ret = arg0.next();
754
+ return ret;
755
+ }, arguments); },
756
+ __wbg_parse_0fc53dead14b3b42: function() { return handleError(function (arg0, arg1) {
757
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
758
+ return ret;
759
+ }, arguments); },
760
+ __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
761
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
762
+ },
763
+ __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
764
+ const ret = arg0.queueMicrotask;
765
+ return ret;
766
+ },
767
+ __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
768
+ queueMicrotask(arg0);
769
+ },
770
+ __wbg_random_5a4cafd2f02395ff: function() {
771
+ const ret = Math.random();
772
+ return ret;
773
+ },
774
+ __wbg_read_2a943774344c9728: function(arg0) {
775
+ const ret = arg0.read();
776
+ return ret;
777
+ },
778
+ __wbg_reject_1548d2ad77237dc9: function(arg0) {
779
+ const ret = Promise.reject(arg0);
780
+ return ret;
781
+ },
782
+ __wbg_releaseLock_eb64cd83aa9fcfe4: function(arg0) {
783
+ arg0.releaseLock();
784
+ },
785
+ __wbg_removeEventListener_6e68185345978771: function() { return handleError(function (arg0, arg1, arg2, arg3) {
786
+ arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
787
+ }, arguments); },
788
+ __wbg_resolve_0076e10020304ede: function(arg0) {
789
+ const ret = Promise.resolve(arg0);
790
+ return ret;
791
+ },
792
+ __wbg_respond_c102fabcc79e5ef0: function() { return handleError(function (arg0, arg1) {
793
+ arg0.respond(arg1 >>> 0);
794
+ }, arguments); },
795
+ __wbg_setTimeout_52f32a16f2242504: function(arg0, arg1) {
796
+ const ret = setTimeout(arg0, arg1);
797
+ return ret;
798
+ },
799
+ __wbg_setTimeout_b4a9096784635514: function(arg0, arg1) {
800
+ const ret = setTimeout(arg0, arg1);
801
+ return ret;
802
+ },
803
+ __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
804
+ const ret = Reflect.set(arg0, arg1, arg2);
805
+ return ret;
806
+ }, arguments); },
807
+ __wbg_set_575d3ddb70fe831d: function(arg0, arg1, arg2) {
808
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
809
+ },
810
+ __wbg_set_body_1fb0f1008bfc7df6: function(arg0, arg1) {
811
+ arg0.body = arg1;
812
+ },
813
+ __wbg_set_cache_7507c4cc5938ccc7: function(arg0, arg1) {
814
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
815
+ },
816
+ __wbg_set_credentials_e0dcce31ca532b7d: function(arg0, arg1) {
817
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
818
+ },
819
+ __wbg_set_headers_40ad33dcf016613f: function(arg0, arg1) {
820
+ arg0.headers = arg1;
821
+ },
822
+ __wbg_set_high_water_mark_3a96edf83df7e06c: function(arg0, arg1) {
823
+ arg0.highWaterMark = arg1;
824
+ },
825
+ __wbg_set_method_dcb32343247ec427: function(arg0, arg1, arg2) {
826
+ arg0.method = getStringFromWasm0(arg1, arg2);
827
+ },
828
+ __wbg_set_mode_74e772635acb96ec: function(arg0, arg1) {
829
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
830
+ },
831
+ __wbg_set_name_2c630595dc90a7aa: function(arg0, arg1, arg2) {
832
+ arg0.name = getStringFromWasm0(arg1, arg2);
833
+ },
834
+ __wbg_set_referrer_efd0fb956d6b70b2: function(arg0, arg1, arg2) {
835
+ arg0.referrer = getStringFromWasm0(arg1, arg2);
836
+ },
837
+ __wbg_set_referrer_policy_465382f52c1a03d3: function(arg0, arg1) {
838
+ arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
839
+ },
840
+ __wbg_set_signal_2dbd377604627f26: function(arg0, arg1) {
841
+ arg0.signal = arg1;
842
+ },
843
+ __wbg_signal_e5a49a2d9c65b7f6: function(arg0) {
844
+ const ret = arg0.signal;
845
+ return ret;
846
+ },
847
+ __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
848
+ const ret = typeof global === 'undefined' ? null : global;
849
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
850
+ },
851
+ __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
852
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
853
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
854
+ },
855
+ __wbg_static_accessor_SELF_0b583911f537483a: function() {
856
+ const ret = typeof self === 'undefined' ? null : self;
857
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
858
+ },
859
+ __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
860
+ const ret = typeof window === 'undefined' ? null : window;
861
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
862
+ },
863
+ __wbg_status_ce0a98d3c57125f3: function(arg0) {
864
+ const ret = arg0.status;
865
+ return ret;
866
+ },
867
+ __wbg_stringify_52ff602c1cc4fbb6: function() { return handleError(function (arg0) {
868
+ const ret = JSON.stringify(arg0);
869
+ return ret;
870
+ }, arguments); },
871
+ __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
872
+ const ret = arg0.then(arg1, arg2);
873
+ return ret;
874
+ },
875
+ __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
876
+ const ret = arg0.then(arg1);
877
+ return ret;
878
+ },
879
+ __wbg_toString_0a6162345e699dea: function(arg0) {
880
+ const ret = arg0.toString();
881
+ return ret;
882
+ },
883
+ __wbg_toString_aad181a510c306d8: function() { return handleError(function (arg0, arg1) {
884
+ const ret = arg0.toString(arg1);
885
+ return ret;
886
+ }, arguments); },
887
+ __wbg_url_8e28edeab4cd6bed: function(arg0, arg1) {
888
+ const ret = arg1.url;
889
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
890
+ const len1 = WASM_VECTOR_LEN;
891
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
892
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
893
+ },
894
+ __wbg_value_f3c585ee8f5ba40c: function(arg0) {
895
+ const ret = arg0.value;
896
+ return ret;
897
+ },
898
+ __wbg_view_9c570f33e8d6ab96: function(arg0) {
899
+ const ret = arg0.view;
900
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
901
+ },
902
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
903
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 211, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
904
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_);
905
+ return ret;
906
+ },
907
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
908
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 331, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
909
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_);
910
+ return ret;
911
+ },
912
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
913
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 176, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
914
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_);
915
+ return ret;
916
+ },
917
+ __wbindgen_generic_0000000000000004: function(arg0) {
918
+ // Cast intrinsic for `F64 -> Externref`.
919
+ const ret = arg0;
920
+ return ret;
921
+ },
922
+ __wbindgen_generic_0000000000000005: function(arg0, arg1) {
923
+ // Cast intrinsic for `Ref(String) -> Externref`.
924
+ const ret = getStringFromWasm0(arg0, arg1);
925
+ return ret;
926
+ },
927
+ __wbindgen_init_externref_table: function() {
928
+ const table = wasm.__wbindgen_externrefs;
929
+ const offset = table.grow(4);
930
+ table.set(0, undefined);
931
+ table.set(offset + 0, undefined);
932
+ table.set(offset + 1, null);
933
+ table.set(offset + 2, true);
934
+ table.set(offset + 3, false);
935
+ },
936
+ };
937
+ return {
938
+ __proto__: null,
939
+ "./rust_fetch_bg.js": import0,
940
+ };
12
941
  }
13
942
 
14
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
15
-
16
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
17
- ? function (arg, view) {
18
- return cachedTextEncoder.encodeInto(arg, view);
943
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_(arg0, arg1) {
944
+ wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_(arg0, arg1);
19
945
  }
20
- : function (arg, view) {
21
- const buf = cachedTextEncoder.encode(arg);
22
- view.set(buf);
23
- return {
24
- read: arg.length,
25
- written: buf.length
26
- };
27
- });
28
946
 
29
- function passStringToWasm0(arg, malloc, realloc) {
947
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_(arg0, arg1, arg2) {
948
+ wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_(arg0, arg1, arg2);
949
+ }
30
950
 
31
- if (realloc === undefined) {
32
- const buf = cachedTextEncoder.encode(arg);
33
- const ptr = malloc(buf.length, 1) >>> 0;
34
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
35
- WASM_VECTOR_LEN = buf.length;
36
- return ptr;
951
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_(arg0, arg1, arg2) {
952
+ const ret = wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_(arg0, arg1, arg2);
953
+ if (ret[1]) {
954
+ throw takeFromExternrefTable0(ret[0]);
37
955
  }
956
+ }
38
957
 
39
- let len = arg.length;
40
- let ptr = malloc(len, 1) >>> 0;
41
-
42
- const mem = getUint8ArrayMemory0();
958
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
959
+ wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
960
+ }
43
961
 
44
- let offset = 0;
45
962
 
46
- for (; offset < len; offset++) {
47
- const code = arg.charCodeAt(offset);
48
- if (code > 0x7F) break;
49
- mem[ptr + offset] = code;
50
- }
963
+ const __wbindgen_enum_ReadableStreamType = ["bytes"];
51
964
 
52
- if (offset !== len) {
53
- if (offset !== 0) {
54
- arg = arg.slice(offset);
55
- }
56
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
57
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
58
- const ret = encodeString(arg, view);
59
965
 
60
- offset += ret.written;
61
- ptr = realloc(ptr, len, offset, 1) >>> 0;
62
- }
966
+ const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
63
967
 
64
- WASM_VECTOR_LEN = offset;
65
- return ptr;
66
- }
67
968
 
68
- let cachedDataViewMemory0 = null;
969
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
69
970
 
70
- function getDataViewMemory0() {
71
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
72
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
73
- }
74
- return cachedDataViewMemory0;
75
- }
76
971
 
77
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
972
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
78
973
 
79
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
80
974
 
81
- function getStringFromWasm0(ptr, len) {
82
- ptr = ptr >>> 0;
83
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
84
- }
975
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
976
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
977
+ ? { register: () => {}, unregister: () => {} }
978
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
979
+ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
980
+ ? { register: () => {}, unregister: () => {} }
981
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
982
+ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
983
+ ? { register: () => {}, unregister: () => {} }
984
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
985
+ const WasmClientFinalization = (typeof FinalizationRegistry === 'undefined')
986
+ ? { register: () => {}, unregister: () => {} }
987
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmclient_free(ptr, 1));
85
988
 
86
989
  function addToExternrefTable0(obj) {
87
990
  const idx = wasm.__externref_table_alloc();
88
- wasm.__wbindgen_export_4.set(idx, obj);
991
+ wasm.__wbindgen_externrefs.set(idx, obj);
89
992
  return idx;
90
993
  }
91
994
 
92
- function handleError(f, args) {
93
- try {
94
- return f.apply(this, args);
95
- } catch (e) {
96
- const idx = addToExternrefTable0(e);
97
- wasm.__wbindgen_exn_store(idx);
98
- }
99
- }
100
-
101
- function isLikeNone(x) {
102
- return x === undefined || x === null;
103
- }
104
-
105
995
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
106
996
  ? { register: () => {}, unregister: () => {} }
107
- : new FinalizationRegistry(state => {
108
- wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
109
- });
110
-
111
- function makeMutClosure(arg0, arg1, dtor, f) {
112
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
113
- const real = (...args) => {
114
- // First up with a closure we increment the internal reference
115
- // count. This ensures that the Rust closure environment won't
116
- // be deallocated while we're invoking it.
117
- state.cnt++;
118
- const a = state.a;
119
- state.a = 0;
120
- try {
121
- return f(a, state.b, ...args);
122
- } finally {
123
- if (--state.cnt === 0) {
124
- wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
125
- CLOSURE_DTORS.unregister(state);
126
- } else {
127
- state.a = a;
128
- }
129
- }
130
- };
131
- real.original = state;
132
- CLOSURE_DTORS.register(real, state, state);
133
- return real;
134
- }
997
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
135
998
 
136
999
  function debugString(val) {
137
1000
  // primitive types
@@ -197,677 +1060,200 @@ function debugString(val) {
197
1060
  // TODO we could test for more things here, like `Set`s and `Map`s.
198
1061
  return className;
199
1062
  }
200
- /**
201
- * Simple fetch function for JSON data
202
- * @param {string} url
203
- * @returns {Promise<any>}
204
- */
205
- export function fetch_json(url) {
206
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
207
- const len0 = WASM_VECTOR_LEN;
208
- const ret = wasm.fetch_json(ptr0, len0);
209
- return ret;
210
- }
211
1063
 
212
- /**
213
- * Fetch JSON data and return as a Promise
214
- * @param {string} url
215
- * @returns {Promise<any>}
216
- */
217
- export function fetch_json_promise(url) {
218
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
219
- const len0 = WASM_VECTOR_LEN;
220
- const ret = wasm.fetch_json_promise(ptr0, len0);
221
- return ret;
1064
+ function getArrayU8FromWasm0(ptr, len) {
1065
+ ptr = ptr >>> 0;
1066
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
222
1067
  }
223
1068
 
224
- /**
225
- * Simple fetch function for text/HTML data
226
- * @param {string} url
227
- * @returns {Promise<string>}
228
- */
229
- export function fetch_text(url) {
230
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
231
- const len0 = WASM_VECTOR_LEN;
232
- const ret = wasm.fetch_text(ptr0, len0);
233
- return ret;
1069
+ let cachedDataViewMemory0 = null;
1070
+ function getDataViewMemory0() {
1071
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1072
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1073
+ }
1074
+ return cachedDataViewMemory0;
234
1075
  }
235
1076
 
236
- /**
237
- * Advanced fetch function with full options
238
- * @param {string} url
239
- * @param {string} method
240
- * @param {any} headers
241
- * @param {string | undefined} [body]
242
- * @returns {Promise<any>}
243
- */
244
- export function fetch_with_options(url, method, headers, body) {
245
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
246
- const len0 = WASM_VECTOR_LEN;
247
- const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
248
- const len1 = WASM_VECTOR_LEN;
249
- var ptr2 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
250
- var len2 = WASM_VECTOR_LEN;
251
- const ret = wasm.fetch_with_options(ptr0, len0, ptr1, len1, headers, ptr2, len2);
252
- return ret;
1077
+ function getStringFromWasm0(ptr, len) {
1078
+ return decodeText(ptr >>> 0, len);
253
1079
  }
254
1080
 
255
- function takeFromExternrefTable0(idx) {
256
- const value = wasm.__wbindgen_export_4.get(idx);
257
- wasm.__externref_table_dealloc(idx);
258
- return value;
259
- }
260
- /**
261
- * Create a configured HTTP client (exported for advanced use)
262
- * @returns {WasmClient}
263
- */
264
- export function create_client() {
265
- const ret = wasm.create_client();
266
- if (ret[2]) {
267
- throw takeFromExternrefTable0(ret[1]);
1081
+ let cachedUint8ArrayMemory0 = null;
1082
+ function getUint8ArrayMemory0() {
1083
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1084
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
268
1085
  }
269
- return WasmClient.__wrap(ret[0]);
1086
+ return cachedUint8ArrayMemory0;
270
1087
  }
271
1088
 
272
- /**
273
- * Fetch JSON data (deprecated, use fetch_json instead)
274
- * @param {string} url
275
- * @returns {Promise<any>}
276
- */
277
- export function fetch_wasm_json(url) {
278
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
279
- const len0 = WASM_VECTOR_LEN;
280
- const ret = wasm.fetch_wasm_json(ptr0, len0);
281
- return ret;
1089
+ function handleError(f, args) {
1090
+ try {
1091
+ return f.apply(this, args);
1092
+ } catch (e) {
1093
+ const idx = addToExternrefTable0(e);
1094
+ wasm.__wbindgen_exn_store(idx);
1095
+ }
282
1096
  }
283
1097
 
284
- /**
285
- * Fetch HTML data (deprecated, use fetch_text instead)
286
- * @param {string} url
287
- * @returns {Promise<string>}
288
- */
289
- export function fetch_wasm_html(url) {
290
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
291
- const len0 = WASM_VECTOR_LEN;
292
- const ret = wasm.fetch_wasm_html(ptr0, len0);
293
- return ret;
1098
+ function isLikeNone(x) {
1099
+ return x === undefined || x === null;
294
1100
  }
295
1101
 
296
- /**
297
- * Fetch data and return as map (deprecated, use fetch_json instead)
298
- * @param {string} url
299
- * @returns {Promise<any>}
300
- */
301
- export function fetch_wasm_map(url) {
302
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
303
- const len0 = WASM_VECTOR_LEN;
304
- const ret = wasm.fetch_wasm_map(ptr0, len0);
305
- return ret;
1102
+ function makeMutClosure(arg0, arg1, f) {
1103
+ const state = { a: arg0, b: arg1, cnt: 1 };
1104
+ const real = (...args) => {
1105
+
1106
+ // First up with a closure we increment the internal reference
1107
+ // count. This ensures that the Rust closure environment won't
1108
+ // be deallocated while we're invoking it.
1109
+ state.cnt++;
1110
+ const a = state.a;
1111
+ state.a = 0;
1112
+ try {
1113
+ return f(a, state.b, ...args);
1114
+ } finally {
1115
+ state.a = a;
1116
+ real._wbg_cb_unref();
1117
+ }
1118
+ };
1119
+ real._wbg_cb_unref = () => {
1120
+ if (--state.cnt === 0) {
1121
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1122
+ state.a = 0;
1123
+ CLOSURE_DTORS.unregister(state);
1124
+ }
1125
+ };
1126
+ CLOSURE_DTORS.register(real, state, state);
1127
+ return real;
306
1128
  }
307
1129
 
308
- /**
309
- * Fetch API data (deprecated, use fetch_json instead)
310
- * @param {string} url
311
- * @returns {Promise<any>}
312
- */
313
- export function fetch_wasm_api(url) {
314
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
315
- const len0 = WASM_VECTOR_LEN;
316
- const ret = wasm.fetch_wasm_api(ptr0, len0);
317
- return ret;
1130
+ function passStringToWasm0(arg, malloc, realloc) {
1131
+ if (realloc === undefined) {
1132
+ const buf = cachedTextEncoder.encode(arg);
1133
+ const ptr = malloc(buf.length, 1) >>> 0;
1134
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1135
+ WASM_VECTOR_LEN = buf.length;
1136
+ return ptr;
1137
+ }
1138
+
1139
+ let len = arg.length;
1140
+ let ptr = malloc(len, 1) >>> 0;
1141
+
1142
+ const mem = getUint8ArrayMemory0();
1143
+
1144
+ let offset = 0;
1145
+
1146
+ for (; offset < len; offset++) {
1147
+ const code = arg.charCodeAt(offset);
1148
+ if (code > 0x7F) break;
1149
+ mem[ptr + offset] = code;
1150
+ }
1151
+ if (offset !== len) {
1152
+ if (offset !== 0) {
1153
+ arg = arg.slice(offset);
1154
+ }
1155
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1156
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1157
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1158
+
1159
+ offset += ret.written;
1160
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1161
+ }
1162
+
1163
+ WASM_VECTOR_LEN = offset;
1164
+ return ptr;
318
1165
  }
319
1166
 
320
- function __wbg_adapter_52(arg0, arg1, arg2) {
321
- wasm.closure243_externref_shim(arg0, arg1, arg2);
1167
+ function takeFromExternrefTable0(idx) {
1168
+ const value = wasm.__wbindgen_externrefs.get(idx);
1169
+ wasm.__externref_table_dealloc(idx);
1170
+ return value;
322
1171
  }
323
1172
 
324
- function __wbg_adapter_159(arg0, arg1, arg2, arg3) {
325
- wasm.closure265_externref_shim(arg0, arg1, arg2, arg3);
1173
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1174
+ cachedTextDecoder.decode();
1175
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1176
+ let numBytesDecoded = 0;
1177
+ function decodeText(ptr, len) {
1178
+ numBytesDecoded += len;
1179
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1180
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1181
+ cachedTextDecoder.decode();
1182
+ numBytesDecoded = len;
1183
+ }
1184
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
326
1185
  }
327
1186
 
328
- const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
329
-
330
- const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
331
-
332
- const WasmClientFinalization = (typeof FinalizationRegistry === 'undefined')
333
- ? { register: () => {}, unregister: () => {} }
334
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmclient_free(ptr >>> 0, 1));
335
- /**
336
- * WASM bindings for the client
337
- */
338
- export class WasmClient {
1187
+ const cachedTextEncoder = new TextEncoder();
339
1188
 
340
- static __wrap(ptr) {
341
- ptr = ptr >>> 0;
342
- const obj = Object.create(WasmClient.prototype);
343
- obj.__wbg_ptr = ptr;
344
- WasmClientFinalization.register(obj, obj.__wbg_ptr, obj);
345
- return obj;
346
- }
1189
+ if (!('encodeInto' in cachedTextEncoder)) {
1190
+ cachedTextEncoder.encodeInto = function (arg, view) {
1191
+ const buf = cachedTextEncoder.encode(arg);
1192
+ view.set(buf);
1193
+ return {
1194
+ read: arg.length,
1195
+ written: buf.length
1196
+ };
1197
+ };
1198
+ }
347
1199
 
348
- __destroy_into_raw() {
349
- const ptr = this.__wbg_ptr;
350
- this.__wbg_ptr = 0;
351
- WasmClientFinalization.unregister(this);
352
- return ptr;
353
- }
1200
+ let WASM_VECTOR_LEN = 0;
354
1201
 
355
- free() {
356
- const ptr = this.__destroy_into_raw();
357
- wasm.__wbg_wasmclient_free(ptr, 0);
358
- }
359
- /**
360
- * Create a new client
361
- */
362
- constructor() {
363
- const ret = wasm.wasmclient_new();
364
- if (ret[2]) {
365
- throw takeFromExternrefTable0(ret[1]);
366
- }
367
- this.__wbg_ptr = ret[0] >>> 0;
368
- WasmClientFinalization.register(this, this.__wbg_ptr, this);
369
- return this;
370
- }
371
- /**
372
- * Make a GET request
373
- * @param {string} url
374
- * @returns {Promise<any>}
375
- */
376
- get(url) {
377
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
378
- const len0 = WASM_VECTOR_LEN;
379
- const ret = wasm.wasmclient_get(this.__wbg_ptr, ptr0, len0);
380
- return ret;
381
- }
382
- /**
383
- * Make a POST request with JSON body
384
- * @param {string} url
385
- * @param {any} body
386
- * @returns {Promise<any>}
387
- */
388
- post_json(url, body) {
389
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
390
- const len0 = WASM_VECTOR_LEN;
391
- const ret = wasm.wasmclient_post_json(this.__wbg_ptr, ptr0, len0, body);
392
- return ret;
393
- }
1202
+ let wasmModule, wasmInstance, wasm;
1203
+ function __wbg_finalize_init(instance, module) {
1204
+ wasmInstance = instance;
1205
+ wasm = instance.exports;
1206
+ wasmModule = module;
1207
+ cachedDataViewMemory0 = null;
1208
+ cachedUint8ArrayMemory0 = null;
1209
+ wasm.__wbindgen_start();
1210
+ return wasm;
394
1211
  }
395
1212
 
396
1213
  async function __wbg_load(module, imports) {
397
1214
  if (typeof Response === 'function' && module instanceof Response) {
1215
+ if (!module.ok) {
1216
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
1217
+ }
1218
+
398
1219
  if (typeof WebAssembly.instantiateStreaming === 'function') {
399
1220
  try {
400
1221
  return await WebAssembly.instantiateStreaming(module, imports);
401
-
402
1222
  } catch (e) {
403
- if (module.headers.get('Content-Type') != 'application/wasm') {
1223
+ const validResponse = expectedResponseType(module.type);
1224
+
1225
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
404
1226
  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);
405
1227
 
406
- } else {
407
- throw e;
408
- }
1228
+ } else { throw e; }
409
1229
  }
410
1230
  }
411
1231
 
412
1232
  const bytes = await module.arrayBuffer();
413
1233
  return await WebAssembly.instantiate(bytes, imports);
414
-
415
1234
  } else {
416
1235
  const instance = await WebAssembly.instantiate(module, imports);
417
1236
 
418
1237
  if (instance instanceof WebAssembly.Instance) {
419
1238
  return { instance, module };
420
-
421
1239
  } else {
422
1240
  return instance;
423
1241
  }
424
1242
  }
425
- }
426
1243
 
427
- function __wbg_get_imports() {
428
- const imports = {};
429
- imports.wbg = {};
430
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
431
- const ret = String(arg1);
432
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
433
- const len1 = WASM_VECTOR_LEN;
434
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
435
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
436
- };
437
- imports.wbg.__wbg_abort_05026c983d86824c = function(arg0) {
438
- arg0.abort();
439
- };
440
- imports.wbg.__wbg_append_72d1635ad8643998 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
441
- arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
442
- }, arguments) };
443
- imports.wbg.__wbg_arrayBuffer_d0ca2ad8bda0039b = function() { return handleError(function (arg0) {
444
- const ret = arg0.arrayBuffer();
445
- return ret;
446
- }, arguments) };
447
- imports.wbg.__wbg_buffer_61b7ce01341d7f88 = function(arg0) {
448
- const ret = arg0.buffer;
449
- return ret;
450
- };
451
- imports.wbg.__wbg_call_500db948e69c7330 = function() { return handleError(function (arg0, arg1, arg2) {
452
- const ret = arg0.call(arg1, arg2);
453
- return ret;
454
- }, arguments) };
455
- imports.wbg.__wbg_call_b0d8e36992d9900d = function() { return handleError(function (arg0, arg1) {
456
- const ret = arg0.call(arg1);
457
- return ret;
458
- }, arguments) };
459
- imports.wbg.__wbg_done_f22c1561fa919baa = function(arg0) {
460
- const ret = arg0.done;
461
- return ret;
462
- };
463
- imports.wbg.__wbg_entries_4f2bb9b0d701c0f6 = function(arg0) {
464
- const ret = Object.entries(arg0);
465
- return ret;
466
- };
467
- imports.wbg.__wbg_fetch_229368eecee9d217 = function(arg0, arg1) {
468
- const ret = arg0.fetch(arg1);
469
- return ret;
470
- };
471
- imports.wbg.__wbg_fetch_f1856afdb49415d1 = function(arg0) {
472
- const ret = fetch(arg0);
473
- return ret;
474
- };
475
- imports.wbg.__wbg_from_d68eaa96dba25449 = function(arg0) {
476
- const ret = Array.from(arg0);
477
- return ret;
478
- };
479
- imports.wbg.__wbg_get_9aa3dff3f0266054 = function(arg0, arg1) {
480
- const ret = arg0[arg1 >>> 0];
481
- return ret;
482
- };
483
- imports.wbg.__wbg_get_bbccf8970793c087 = function() { return handleError(function (arg0, arg1) {
484
- const ret = Reflect.get(arg0, arg1);
485
- return ret;
486
- }, arguments) };
487
- imports.wbg.__wbg_has_94c2fc1d261bbfe9 = function() { return handleError(function (arg0, arg1) {
488
- const ret = Reflect.has(arg0, arg1);
489
- return ret;
490
- }, arguments) };
491
- imports.wbg.__wbg_headers_24e3e19fe3f187c0 = function(arg0) {
492
- const ret = arg0.headers;
493
- return ret;
494
- };
495
- imports.wbg.__wbg_instanceof_ArrayBuffer_670ddde44cdb2602 = function(arg0) {
496
- let result;
497
- try {
498
- result = arg0 instanceof ArrayBuffer;
499
- } catch (_) {
500
- result = false;
501
- }
502
- const ret = result;
503
- return ret;
504
- };
505
- imports.wbg.__wbg_instanceof_Map_98ecb30afec5acdb = function(arg0) {
506
- let result;
507
- try {
508
- result = arg0 instanceof Map;
509
- } catch (_) {
510
- result = false;
511
- }
512
- const ret = result;
513
- return ret;
514
- };
515
- imports.wbg.__wbg_instanceof_Response_d3453657e10c4300 = function(arg0) {
516
- let result;
517
- try {
518
- result = arg0 instanceof Response;
519
- } catch (_) {
520
- result = false;
521
- }
522
- const ret = result;
523
- return ret;
524
- };
525
- imports.wbg.__wbg_instanceof_Uint8Array_28af5bc19d6acad8 = function(arg0) {
526
- let result;
527
- try {
528
- result = arg0 instanceof Uint8Array;
529
- } catch (_) {
530
- result = false;
531
- }
532
- const ret = result;
533
- return ret;
534
- };
535
- imports.wbg.__wbg_instanceof_Window_d2514c6a7ee7ba60 = function(arg0) {
536
- let result;
537
- try {
538
- result = arg0 instanceof Window;
539
- } catch (_) {
540
- result = false;
541
- }
542
- const ret = result;
543
- return ret;
544
- };
545
- imports.wbg.__wbg_isArray_1ba11a930108ec51 = function(arg0) {
546
- const ret = Array.isArray(arg0);
547
- return ret;
548
- };
549
- imports.wbg.__wbg_isSafeInteger_12f5549b2fca23f4 = function(arg0) {
550
- const ret = Number.isSafeInteger(arg0);
551
- return ret;
552
- };
553
- imports.wbg.__wbg_iterator_23604bb983791576 = function() {
554
- const ret = Symbol.iterator;
555
- return ret;
556
- };
557
- imports.wbg.__wbg_length_65d1cd11729ced11 = function(arg0) {
558
- const ret = arg0.length;
559
- return ret;
560
- };
561
- imports.wbg.__wbg_length_d65cf0786bfc5739 = function(arg0) {
562
- const ret = arg0.length;
563
- return ret;
564
- };
565
- imports.wbg.__wbg_new_254fa9eac11932ae = function() {
566
- const ret = new Array();
567
- return ret;
568
- };
569
- imports.wbg.__wbg_new_35d748855c4620b9 = function() { return handleError(function () {
570
- const ret = new Headers();
571
- return ret;
572
- }, arguments) };
573
- imports.wbg.__wbg_new_3d446df9155128ef = function(arg0, arg1) {
574
- try {
575
- var state0 = {a: arg0, b: arg1};
576
- var cb0 = (arg0, arg1) => {
577
- const a = state0.a;
578
- state0.a = 0;
579
- try {
580
- return __wbg_adapter_159(a, state0.b, arg0, arg1);
581
- } finally {
582
- state0.a = a;
583
- }
584
- };
585
- const ret = new Promise(cb0);
586
- return ret;
587
- } finally {
588
- state0.a = state0.b = 0;
589
- }
590
- };
591
- imports.wbg.__wbg_new_3ff5b33b1ce712df = function(arg0) {
592
- const ret = new Uint8Array(arg0);
593
- return ret;
594
- };
595
- imports.wbg.__wbg_new_5f48f21d4be11586 = function() { return handleError(function () {
596
- const ret = new AbortController();
597
- return ret;
598
- }, arguments) };
599
- imports.wbg.__wbg_new_688846f374351c92 = function() {
600
- const ret = new Object();
601
- return ret;
602
- };
603
- imports.wbg.__wbg_new_bc96c6a1c0786643 = function() {
604
- const ret = new Map();
605
- return ret;
606
- };
607
- imports.wbg.__wbg_newnoargs_fd9e4bf8be2bc16d = function(arg0, arg1) {
608
- const ret = new Function(getStringFromWasm0(arg0, arg1));
609
- return ret;
610
- };
611
- imports.wbg.__wbg_newwithbyteoffsetandlength_ba35896968751d91 = function(arg0, arg1, arg2) {
612
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
613
- return ret;
614
- };
615
- imports.wbg.__wbg_newwithstrandinit_a1f6583f20e4faff = function() { return handleError(function (arg0, arg1, arg2) {
616
- const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
617
- return ret;
618
- }, arguments) };
619
- imports.wbg.__wbg_next_01dd9234a5bf6d05 = function() { return handleError(function (arg0) {
620
- const ret = arg0.next();
621
- return ret;
622
- }, arguments) };
623
- imports.wbg.__wbg_next_137428deb98342b0 = function(arg0) {
624
- const ret = arg0.next;
625
- return ret;
626
- };
627
- imports.wbg.__wbg_queueMicrotask_2181040e064c0dc8 = function(arg0) {
628
- queueMicrotask(arg0);
629
- };
630
- imports.wbg.__wbg_queueMicrotask_ef9ac43769cbcc4f = function(arg0) {
631
- const ret = arg0.queueMicrotask;
632
- return ret;
633
- };
634
- imports.wbg.__wbg_resolve_0bf7c44d641804f9 = function(arg0) {
635
- const ret = Promise.resolve(arg0);
636
- return ret;
637
- };
638
- imports.wbg.__wbg_setTimeout_8d2afdcdb34b4e5a = function() { return handleError(function (arg0, arg1, arg2) {
639
- const ret = arg0.setTimeout(arg1, arg2);
640
- return ret;
641
- }, arguments) };
642
- imports.wbg.__wbg_set_1d80752d0d5f0b21 = function(arg0, arg1, arg2) {
643
- arg0[arg1 >>> 0] = arg2;
644
- };
645
- imports.wbg.__wbg_set_23d69db4e5c66a6e = function(arg0, arg1, arg2) {
646
- arg0.set(arg1, arg2 >>> 0);
647
- };
648
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
649
- arg0[arg1] = arg2;
650
- };
651
- imports.wbg.__wbg_set_4e647025551483bd = function() { return handleError(function (arg0, arg1, arg2) {
652
- const ret = Reflect.set(arg0, arg1, arg2);
653
- return ret;
654
- }, arguments) };
655
- imports.wbg.__wbg_set_76818dc3c59a63d5 = function(arg0, arg1, arg2) {
656
- const ret = arg0.set(arg1, arg2);
657
- return ret;
658
- };
659
- imports.wbg.__wbg_setbody_64920df008e48adc = function(arg0, arg1) {
660
- arg0.body = arg1;
661
- };
662
- imports.wbg.__wbg_setcredentials_cfc15e48e3a3a535 = function(arg0, arg1) {
663
- arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
664
- };
665
- imports.wbg.__wbg_setheaders_4c921e8e226bdfa7 = function(arg0, arg1) {
666
- arg0.headers = arg1;
667
- };
668
- imports.wbg.__wbg_setmethod_cfc7f688ba46a6be = function(arg0, arg1, arg2) {
669
- arg0.method = getStringFromWasm0(arg1, arg2);
670
- };
671
- imports.wbg.__wbg_setmode_cd03637eb7da01e0 = function(arg0, arg1) {
672
- arg0.mode = __wbindgen_enum_RequestMode[arg1];
673
- };
674
- imports.wbg.__wbg_setsignal_f766190d206f09e5 = function(arg0, arg1) {
675
- arg0.signal = arg1;
676
- };
677
- imports.wbg.__wbg_signal_1fdadeba2d04660e = function(arg0) {
678
- const ret = arg0.signal;
679
- return ret;
680
- };
681
- imports.wbg.__wbg_static_accessor_GLOBAL_0be7472e492ad3e3 = function() {
682
- const ret = typeof global === 'undefined' ? null : global;
683
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
684
- };
685
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb = function() {
686
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
687
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
688
- };
689
- imports.wbg.__wbg_static_accessor_SELF_1dc398a895c82351 = function() {
690
- const ret = typeof self === 'undefined' ? null : self;
691
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
692
- };
693
- imports.wbg.__wbg_static_accessor_WINDOW_ae1c80c7eea8d64a = function() {
694
- const ret = typeof window === 'undefined' ? null : window;
695
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
696
- };
697
- imports.wbg.__wbg_status_317f53bc4c7638df = function(arg0) {
698
- const ret = arg0.status;
699
- return ret;
700
- };
701
- imports.wbg.__wbg_stringify_f4f701bc34ceda61 = function() { return handleError(function (arg0) {
702
- const ret = JSON.stringify(arg0);
703
- return ret;
704
- }, arguments) };
705
- imports.wbg.__wbg_text_dfc4cb7631d2eb34 = function() { return handleError(function (arg0) {
706
- const ret = arg0.text();
707
- return ret;
708
- }, arguments) };
709
- imports.wbg.__wbg_then_0438fad860fe38e1 = function(arg0, arg1) {
710
- const ret = arg0.then(arg1);
711
- return ret;
712
- };
713
- imports.wbg.__wbg_then_0ffafeddf0e182a4 = function(arg0, arg1, arg2) {
714
- const ret = arg0.then(arg1, arg2);
715
- return ret;
716
- };
717
- imports.wbg.__wbg_url_5327bc0a41a9b085 = function(arg0, arg1) {
718
- const ret = arg1.url;
719
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
720
- const len1 = WASM_VECTOR_LEN;
721
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
722
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
723
- };
724
- imports.wbg.__wbg_value_4c32fd138a88eee2 = function(arg0) {
725
- const ret = arg0.value;
726
- return ret;
727
- };
728
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
729
- const ret = arg0;
730
- return ret;
731
- };
732
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
733
- const ret = BigInt.asUintN(64, arg0);
734
- return ret;
735
- };
736
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
737
- const v = arg1;
738
- const ret = typeof(v) === 'bigint' ? v : undefined;
739
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
740
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
741
- };
742
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
743
- const v = arg0;
744
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
745
- return ret;
746
- };
747
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
748
- const obj = arg0.original;
749
- if (obj.cnt-- == 1) {
750
- obj.a = 0;
751
- return true;
1244
+ function expectedResponseType(type) {
1245
+ switch (type) {
1246
+ case 'basic': case 'cors': case 'default': return true;
752
1247
  }
753
- const ret = false;
754
- return ret;
755
- };
756
- imports.wbg.__wbindgen_closure_wrapper1686 = function(arg0, arg1, arg2) {
757
- const ret = makeMutClosure(arg0, arg1, 244, __wbg_adapter_52);
758
- return ret;
759
- };
760
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
761
- const ret = debugString(arg1);
762
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
763
- const len1 = WASM_VECTOR_LEN;
764
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
765
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
766
- };
767
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
768
- const ret = new Error(getStringFromWasm0(arg0, arg1));
769
- return ret;
770
- };
771
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
772
- const ret = arg0 in arg1;
773
- return ret;
774
- };
775
- imports.wbg.__wbindgen_init_externref_table = function() {
776
- const table = wasm.__wbindgen_export_4;
777
- const offset = table.grow(4);
778
- table.set(0, undefined);
779
- table.set(offset + 0, undefined);
780
- table.set(offset + 1, null);
781
- table.set(offset + 2, true);
782
- table.set(offset + 3, false);
783
- ;
784
- };
785
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
786
- const ret = typeof(arg0) === 'bigint';
787
- return ret;
788
- };
789
- imports.wbg.__wbindgen_is_function = function(arg0) {
790
- const ret = typeof(arg0) === 'function';
791
- return ret;
792
- };
793
- imports.wbg.__wbindgen_is_null = function(arg0) {
794
- const ret = arg0 === null;
795
- return ret;
796
- };
797
- imports.wbg.__wbindgen_is_object = function(arg0) {
798
- const val = arg0;
799
- const ret = typeof(val) === 'object' && val !== null;
800
- return ret;
801
- };
802
- imports.wbg.__wbindgen_is_string = function(arg0) {
803
- const ret = typeof(arg0) === 'string';
804
- return ret;
805
- };
806
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
807
- const ret = arg0 === undefined;
808
- return ret;
809
- };
810
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
811
- const ret = arg0 === arg1;
812
- return ret;
813
- };
814
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
815
- const ret = arg0 == arg1;
816
- return ret;
817
- };
818
- imports.wbg.__wbindgen_memory = function() {
819
- const ret = wasm.memory;
820
- return ret;
821
- };
822
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
823
- const obj = arg1;
824
- const ret = typeof(obj) === 'number' ? obj : undefined;
825
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
826
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
827
- };
828
- imports.wbg.__wbindgen_number_new = function(arg0) {
829
- const ret = arg0;
830
- return ret;
831
- };
832
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
833
- const obj = arg1;
834
- const ret = typeof(obj) === 'string' ? obj : undefined;
835
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
836
- var len1 = WASM_VECTOR_LEN;
837
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
838
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
839
- };
840
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
841
- const ret = getStringFromWasm0(arg0, arg1);
842
- return ret;
843
- };
844
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
845
- throw new Error(getStringFromWasm0(arg0, arg1));
846
- };
847
-
848
- return imports;
849
- }
850
-
851
- function __wbg_init_memory(imports, memory) {
852
-
853
- }
854
-
855
- function __wbg_finalize_init(instance, module) {
856
- wasm = instance.exports;
857
- __wbg_init.__wbindgen_wasm_module = module;
858
- cachedDataViewMemory0 = null;
859
- cachedUint8ArrayMemory0 = null;
860
-
861
-
862
- wasm.__wbindgen_start();
863
- return wasm;
1248
+ return false;
1249
+ }
864
1250
  }
865
1251
 
866
1252
  function initSync(module) {
867
1253
  if (wasm !== undefined) return wasm;
868
1254
 
869
1255
 
870
- if (typeof module !== 'undefined') {
1256
+ if (module !== undefined) {
871
1257
  if (Object.getPrototypeOf(module) === Object.prototype) {
872
1258
  ({module} = module)
873
1259
  } else {
@@ -876,15 +1262,10 @@ function initSync(module) {
876
1262
  }
877
1263
 
878
1264
  const imports = __wbg_get_imports();
879
-
880
- __wbg_init_memory(imports);
881
-
882
1265
  if (!(module instanceof WebAssembly.Module)) {
883
1266
  module = new WebAssembly.Module(module);
884
1267
  }
885
-
886
1268
  const instance = new WebAssembly.Instance(module, imports);
887
-
888
1269
  return __wbg_finalize_init(instance, module);
889
1270
  }
890
1271
 
@@ -892,7 +1273,7 @@ async function __wbg_init(module_or_path) {
892
1273
  if (wasm !== undefined) return wasm;
893
1274
 
894
1275
 
895
- if (typeof module_or_path !== 'undefined') {
1276
+ if (module_or_path !== undefined) {
896
1277
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
897
1278
  ({module_or_path} = module_or_path)
898
1279
  } else {
@@ -900,7 +1281,7 @@ async function __wbg_init(module_or_path) {
900
1281
  }
901
1282
  }
902
1283
 
903
- if (typeof module_or_path === 'undefined') {
1284
+ if (module_or_path === undefined) {
904
1285
  module_or_path = new URL('rust_fetch_bg.wasm', import.meta.url);
905
1286
  }
906
1287
  const imports = __wbg_get_imports();
@@ -909,12 +1290,9 @@ async function __wbg_init(module_or_path) {
909
1290
  module_or_path = fetch(module_or_path);
910
1291
  }
911
1292
 
912
- __wbg_init_memory(imports);
913
-
914
1293
  const { instance, module } = await __wbg_load(await module_or_path, imports);
915
1294
 
916
1295
  return __wbg_finalize_init(instance, module);
917
1296
  }
918
1297
 
919
- export { initSync };
920
- export default __wbg_init;
1298
+ export { initSync, __wbg_init as default };