@cartridge/controller-wasm 0.9.0 → 0.9.2

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.
@@ -1,275 +1,5 @@
1
1
  import { Mutex } from './snippets/account-wasm-35da9c7350cbc3ae/src/wasm-mutex.js';
2
2
 
3
- let wasm;
4
- export function __wbg_set_wasm(val) {
5
- wasm = val;
6
- }
7
-
8
- function addHeapObject(obj) {
9
- if (heap_next === heap.length) heap.push(heap.length + 1);
10
- const idx = heap_next;
11
- heap_next = heap[idx];
12
-
13
- heap[idx] = obj;
14
- return idx;
15
- }
16
-
17
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
18
- ? { register: () => {}, unregister: () => {} }
19
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
20
-
21
- function debugString(val) {
22
- // primitive types
23
- const type = typeof val;
24
- if (type == 'number' || type == 'boolean' || val == null) {
25
- return `${val}`;
26
- }
27
- if (type == 'string') {
28
- return `"${val}"`;
29
- }
30
- if (type == 'symbol') {
31
- const description = val.description;
32
- if (description == null) {
33
- return 'Symbol';
34
- } else {
35
- return `Symbol(${description})`;
36
- }
37
- }
38
- if (type == 'function') {
39
- const name = val.name;
40
- if (typeof name == 'string' && name.length > 0) {
41
- return `Function(${name})`;
42
- } else {
43
- return 'Function';
44
- }
45
- }
46
- // objects
47
- if (Array.isArray(val)) {
48
- const length = val.length;
49
- let debug = '[';
50
- if (length > 0) {
51
- debug += debugString(val[0]);
52
- }
53
- for(let i = 1; i < length; i++) {
54
- debug += ', ' + debugString(val[i]);
55
- }
56
- debug += ']';
57
- return debug;
58
- }
59
- // Test for built-in
60
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
61
- let className;
62
- if (builtInMatches && builtInMatches.length > 1) {
63
- className = builtInMatches[1];
64
- } else {
65
- // Failed to match the standard '[object ClassName]'
66
- return toString.call(val);
67
- }
68
- if (className == 'Object') {
69
- // we're a user defined class or Object
70
- // JSON.stringify avoids problems with cycles, and is generally much
71
- // easier than looping through ownProperties of `val`.
72
- try {
73
- return 'Object(' + JSON.stringify(val) + ')';
74
- } catch (_) {
75
- return 'Object';
76
- }
77
- }
78
- // errors
79
- if (val instanceof Error) {
80
- return `${val.name}: ${val.message}\n${val.stack}`;
81
- }
82
- // TODO we could test for more things here, like `Set`s and `Map`s.
83
- return className;
84
- }
85
-
86
- function dropObject(idx) {
87
- if (idx < 132) return;
88
- heap[idx] = heap_next;
89
- heap_next = idx;
90
- }
91
-
92
- function getArrayU8FromWasm0(ptr, len) {
93
- ptr = ptr >>> 0;
94
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
95
- }
96
-
97
- let cachedDataViewMemory0 = null;
98
- function getDataViewMemory0() {
99
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
100
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
101
- }
102
- return cachedDataViewMemory0;
103
- }
104
-
105
- function getStringFromWasm0(ptr, len) {
106
- ptr = ptr >>> 0;
107
- return decodeText(ptr, len);
108
- }
109
-
110
- let cachedUint8ArrayMemory0 = null;
111
- function getUint8ArrayMemory0() {
112
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
113
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
114
- }
115
- return cachedUint8ArrayMemory0;
116
- }
117
-
118
- function getObject(idx) { return heap[idx]; }
119
-
120
- function handleError(f, args) {
121
- try {
122
- return f.apply(this, args);
123
- } catch (e) {
124
- wasm.__wbindgen_export3(addHeapObject(e));
125
- }
126
- }
127
-
128
- let heap = new Array(128).fill(undefined);
129
- heap.push(undefined, null, true, false);
130
-
131
- let heap_next = heap.length;
132
-
133
- function isLikeNone(x) {
134
- return x === undefined || x === null;
135
- }
136
-
137
- function makeMutClosure(arg0, arg1, dtor, f) {
138
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
139
- const real = (...args) => {
140
-
141
- // First up with a closure we increment the internal reference
142
- // count. This ensures that the Rust closure environment won't
143
- // be deallocated while we're invoking it.
144
- state.cnt++;
145
- const a = state.a;
146
- state.a = 0;
147
- try {
148
- return f(a, state.b, ...args);
149
- } finally {
150
- state.a = a;
151
- real._wbg_cb_unref();
152
- }
153
- };
154
- real._wbg_cb_unref = () => {
155
- if (--state.cnt === 0) {
156
- state.dtor(state.a, state.b);
157
- state.a = 0;
158
- CLOSURE_DTORS.unregister(state);
159
- }
160
- };
161
- CLOSURE_DTORS.register(real, state, state);
162
- return real;
163
- }
164
-
165
- function passArrayJsValueToWasm0(array, malloc) {
166
- const ptr = malloc(array.length * 4, 4) >>> 0;
167
- const mem = getDataViewMemory0();
168
- for (let i = 0; i < array.length; i++) {
169
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
170
- }
171
- WASM_VECTOR_LEN = array.length;
172
- return ptr;
173
- }
174
-
175
- function passStringToWasm0(arg, malloc, realloc) {
176
- if (realloc === undefined) {
177
- const buf = cachedTextEncoder.encode(arg);
178
- const ptr = malloc(buf.length, 1) >>> 0;
179
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
180
- WASM_VECTOR_LEN = buf.length;
181
- return ptr;
182
- }
183
-
184
- let len = arg.length;
185
- let ptr = malloc(len, 1) >>> 0;
186
-
187
- const mem = getUint8ArrayMemory0();
188
-
189
- let offset = 0;
190
-
191
- for (; offset < len; offset++) {
192
- const code = arg.charCodeAt(offset);
193
- if (code > 0x7F) break;
194
- mem[ptr + offset] = code;
195
- }
196
- if (offset !== len) {
197
- if (offset !== 0) {
198
- arg = arg.slice(offset);
199
- }
200
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
201
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
202
- const ret = cachedTextEncoder.encodeInto(arg, view);
203
-
204
- offset += ret.written;
205
- ptr = realloc(ptr, len, offset, 1) >>> 0;
206
- }
207
-
208
- WASM_VECTOR_LEN = offset;
209
- return ptr;
210
- }
211
-
212
- function takeObject(idx) {
213
- const ret = getObject(idx);
214
- dropObject(idx);
215
- return ret;
216
- }
217
-
218
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
219
- cachedTextDecoder.decode();
220
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
221
- let numBytesDecoded = 0;
222
- function decodeText(ptr, len) {
223
- numBytesDecoded += len;
224
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
225
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
226
- cachedTextDecoder.decode();
227
- numBytesDecoded = len;
228
- }
229
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
230
- }
231
-
232
- const cachedTextEncoder = new TextEncoder();
233
-
234
- if (!('encodeInto' in cachedTextEncoder)) {
235
- cachedTextEncoder.encodeInto = function (arg, view) {
236
- const buf = cachedTextEncoder.encode(arg);
237
- view.set(buf);
238
- return {
239
- read: arg.length,
240
- written: buf.length
241
- };
242
- }
243
- }
244
-
245
- let WASM_VECTOR_LEN = 0;
246
-
247
- function __wasm_bindgen_func_elem_4017(arg0, arg1, arg2) {
248
- wasm.__wasm_bindgen_func_elem_4017(arg0, arg1, addHeapObject(arg2));
249
- }
250
-
251
- function __wasm_bindgen_func_elem_3872(arg0, arg1) {
252
- wasm.__wasm_bindgen_func_elem_3872(arg0, arg1);
253
- }
254
-
255
- function __wasm_bindgen_func_elem_5802(arg0, arg1, arg2, arg3) {
256
- wasm.__wasm_bindgen_func_elem_5802(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
257
- }
258
-
259
- const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
260
-
261
- const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
262
-
263
- const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
264
-
265
- const CartridgeSessionAccountFinalization = (typeof FinalizationRegistry === 'undefined')
266
- ? { register: () => {}, unregister: () => {} }
267
- : new FinalizationRegistry(ptr => wasm.__wbg_cartridgesessionaccount_free(ptr >>> 0, 1));
268
-
269
- const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
270
- ? { register: () => {}, unregister: () => {} }
271
- : new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
272
-
273
3
  export class CartridgeSessionAccount {
274
4
  static __wrap(ptr) {
275
5
  ptr = ptr >>> 0;
@@ -288,21 +18,43 @@ export class CartridgeSessionAccount {
288
18
  const ptr = this.__destroy_into_raw();
289
19
  wasm.__wbg_cartridgesessionaccount_free(ptr, 0);
290
20
  }
21
+ /**
22
+ * @param {JsCall[]} calls
23
+ * @returns {Promise<any>}
24
+ */
25
+ execute(calls) {
26
+ const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
27
+ const len0 = WASM_VECTOR_LEN;
28
+ const ret = wasm.cartridgesessionaccount_execute(this.__wbg_ptr, ptr0, len0);
29
+ return takeObject(ret);
30
+ }
31
+ /**
32
+ * @param {JsCall[]} calls
33
+ * @returns {Promise<any>}
34
+ */
35
+ executeFromOutside(calls) {
36
+ const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
37
+ const len0 = WASM_VECTOR_LEN;
38
+ const ret = wasm.cartridgesessionaccount_executeFromOutside(this.__wbg_ptr, ptr0, len0);
39
+ return takeObject(ret);
40
+ }
291
41
  /**
292
42
  * @param {string} rpc_url
293
43
  * @param {JsFelt} signer
294
44
  * @param {JsFelt} address
295
- * @param {JsFelt} owner_guid
296
45
  * @param {JsFelt} chain_id
46
+ * @param {JsFelt[]} session_authorization
297
47
  * @param {Session} session
298
48
  * @returns {CartridgeSessionAccount}
299
49
  */
300
- static newAsRegistered(rpc_url, signer, address, owner_guid, chain_id, session) {
50
+ static new(rpc_url, signer, address, chain_id, session_authorization, session) {
301
51
  try {
302
52
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
303
53
  const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
304
54
  const len0 = WASM_VECTOR_LEN;
305
- wasm.cartridgesessionaccount_newAsRegistered(retptr, ptr0, len0, addHeapObject(signer), addHeapObject(address), addHeapObject(owner_guid), addHeapObject(chain_id), addHeapObject(session));
55
+ const ptr1 = passArrayJsValueToWasm0(session_authorization, wasm.__wbindgen_export);
56
+ const len1 = WASM_VECTOR_LEN;
57
+ wasm.cartridgesessionaccount_new(retptr, ptr0, len0, addHeapObject(signer), addHeapObject(address), addHeapObject(chain_id), ptr1, len1, addHeapObject(session));
306
58
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
307
59
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
308
60
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -314,33 +66,21 @@ export class CartridgeSessionAccount {
314
66
  wasm.__wbindgen_add_to_stack_pointer(16);
315
67
  }
316
68
  }
317
- /**
318
- * @param {JsCall[]} calls
319
- * @returns {Promise<any>}
320
- */
321
- executeFromOutside(calls) {
322
- const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
323
- const len0 = WASM_VECTOR_LEN;
324
- const ret = wasm.cartridgesessionaccount_executeFromOutside(this.__wbg_ptr, ptr0, len0);
325
- return takeObject(ret);
326
- }
327
69
  /**
328
70
  * @param {string} rpc_url
329
71
  * @param {JsFelt} signer
330
72
  * @param {JsFelt} address
73
+ * @param {JsFelt} owner_guid
331
74
  * @param {JsFelt} chain_id
332
- * @param {JsFelt[]} session_authorization
333
75
  * @param {Session} session
334
76
  * @returns {CartridgeSessionAccount}
335
77
  */
336
- static new(rpc_url, signer, address, chain_id, session_authorization, session) {
78
+ static newAsRegistered(rpc_url, signer, address, owner_guid, chain_id, session) {
337
79
  try {
338
80
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
339
81
  const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
340
82
  const len0 = WASM_VECTOR_LEN;
341
- const ptr1 = passArrayJsValueToWasm0(session_authorization, wasm.__wbindgen_export);
342
- const len1 = WASM_VECTOR_LEN;
343
- wasm.cartridgesessionaccount_new(retptr, ptr0, len0, addHeapObject(signer), addHeapObject(address), addHeapObject(chain_id), ptr1, len1, addHeapObject(session));
83
+ wasm.cartridgesessionaccount_newAsRegistered(retptr, ptr0, len0, addHeapObject(signer), addHeapObject(address), addHeapObject(owner_guid), addHeapObject(chain_id), addHeapObject(session));
344
84
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
345
85
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
346
86
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -363,16 +103,6 @@ export class CartridgeSessionAccount {
363
103
  const ret = wasm.cartridgesessionaccount_sign(this.__wbg_ptr, addHeapObject(hash), ptr0, len0);
364
104
  return takeObject(ret);
365
105
  }
366
- /**
367
- * @param {JsCall[]} calls
368
- * @returns {Promise<any>}
369
- */
370
- execute(calls) {
371
- const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
372
- const len0 = WASM_VECTOR_LEN;
373
- const ret = wasm.cartridgesessionaccount_execute(this.__wbg_ptr, ptr0, len0);
374
- return takeObject(ret);
375
- }
376
106
  }
377
107
  if (Symbol.dispose) CartridgeSessionAccount.prototype[Symbol.dispose] = CartridgeSessionAccount.prototype.free;
378
108
 
@@ -481,10 +211,23 @@ export class JsControllerError {
481
211
  return ret;
482
212
  }
483
213
  /**
484
- * @param {ErrorCode} arg0
214
+ * @returns {string | undefined}
485
215
  */
486
- set code(arg0) {
487
- wasm.__wbg_set_jscontrollererror_code(this.__wbg_ptr, arg0);
216
+ get data() {
217
+ try {
218
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
219
+ wasm.__wbg_get_jscontrollererror_data(retptr, this.__wbg_ptr);
220
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
221
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
222
+ let v1;
223
+ if (r0 !== 0) {
224
+ v1 = getStringFromWasm0(r0, r1).slice();
225
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
226
+ }
227
+ return v1;
228
+ } finally {
229
+ wasm.__wbindgen_add_to_stack_pointer(16);
230
+ }
488
231
  }
489
232
  /**
490
233
  * @returns {string}
@@ -506,31 +249,10 @@ export class JsControllerError {
506
249
  }
507
250
  }
508
251
  /**
509
- * @param {string} arg0
510
- */
511
- set message(arg0) {
512
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
513
- const len0 = WASM_VECTOR_LEN;
514
- wasm.__wbg_set_jscontrollererror_message(this.__wbg_ptr, ptr0, len0);
515
- }
516
- /**
517
- * @returns {string | undefined}
252
+ * @param {ErrorCode} arg0
518
253
  */
519
- get data() {
520
- try {
521
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
522
- wasm.__wbg_get_jscontrollererror_data(retptr, this.__wbg_ptr);
523
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
524
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
525
- let v1;
526
- if (r0 !== 0) {
527
- v1 = getStringFromWasm0(r0, r1).slice();
528
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
529
- }
530
- return v1;
531
- } finally {
532
- wasm.__wbindgen_add_to_stack_pointer(16);
533
- }
254
+ set code(arg0) {
255
+ wasm.__wbg_set_jscontrollererror_code(this.__wbg_ptr, arg0);
534
256
  }
535
257
  /**
536
258
  * @param {string | null} [arg0]
@@ -540,6 +262,14 @@ export class JsControllerError {
540
262
  var len0 = WASM_VECTOR_LEN;
541
263
  wasm.__wbg_set_jscontrollererror_data(this.__wbg_ptr, ptr0, len0);
542
264
  }
265
+ /**
266
+ * @param {string} arg0
267
+ */
268
+ set message(arg0) {
269
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
270
+ const len0 = WASM_VECTOR_LEN;
271
+ wasm.__wbg_set_jscontrollererror_message(this.__wbg_ptr, ptr0, len0);
272
+ }
543
273
  }
544
274
  if (Symbol.dispose) JsControllerError.prototype[Symbol.dispose] = JsControllerError.prototype.free;
545
275
 
@@ -577,191 +307,155 @@ export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
577
307
  const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
578
308
  return takeObject(ret);
579
309
  }
580
-
581
- export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
310
+ export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
582
311
  const ret = Error(getStringFromWasm0(arg0, arg1));
583
312
  return addHeapObject(ret);
584
- };
585
-
313
+ }
586
314
  export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
587
315
  const ret = String(getObject(arg1));
588
316
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
589
317
  const len1 = WASM_VECTOR_LEN;
590
318
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
591
319
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
592
- };
593
-
594
- export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
320
+ }
321
+ export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
595
322
  const v = getObject(arg0);
596
323
  const ret = typeof(v) === 'boolean' ? v : undefined;
597
324
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
598
- };
599
-
600
- export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
325
+ }
326
+ export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
601
327
  const ret = debugString(getObject(arg1));
602
328
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
603
329
  const len1 = WASM_VECTOR_LEN;
604
330
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
605
331
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
606
- };
607
-
608
- export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0, arg1) {
332
+ }
333
+ export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
609
334
  const ret = getObject(arg0) in getObject(arg1);
610
335
  return ret;
611
- };
612
-
613
- export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
336
+ }
337
+ export function __wbg___wbindgen_is_function_0095a73b8b156f76(arg0) {
614
338
  const ret = typeof(getObject(arg0)) === 'function';
615
339
  return ret;
616
- };
617
-
618
- export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
340
+ }
341
+ export function __wbg___wbindgen_is_object_5ae8e5880f2c1fbd(arg0) {
619
342
  const val = getObject(arg0);
620
343
  const ret = typeof(val) === 'object' && val !== null;
621
344
  return ret;
622
- };
623
-
624
- export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
345
+ }
346
+ export function __wbg___wbindgen_is_string_cd444516edc5b180(arg0) {
625
347
  const ret = typeof(getObject(arg0)) === 'string';
626
348
  return ret;
627
- };
628
-
629
- export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
349
+ }
350
+ export function __wbg___wbindgen_is_undefined_9e4d92534c42d778(arg0) {
630
351
  const ret = getObject(arg0) === undefined;
631
352
  return ret;
632
- };
633
-
634
- export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
353
+ }
354
+ export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
635
355
  const ret = getObject(arg0) == getObject(arg1);
636
356
  return ret;
637
- };
638
-
639
- export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
357
+ }
358
+ export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
640
359
  const obj = getObject(arg1);
641
360
  const ret = typeof(obj) === 'number' ? obj : undefined;
642
361
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
643
362
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
644
- };
645
-
646
- export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
363
+ }
364
+ export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
647
365
  const obj = getObject(arg1);
648
366
  const ret = typeof(obj) === 'string' ? obj : undefined;
649
367
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
650
368
  var len1 = WASM_VECTOR_LEN;
651
369
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
652
370
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
653
- };
654
-
655
- export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
371
+ }
372
+ export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
656
373
  throw new Error(getStringFromWasm0(arg0, arg1));
657
- };
658
-
659
- export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
374
+ }
375
+ export function __wbg__wbg_cb_unref_d9b87ff7982e3b21(arg0) {
660
376
  getObject(arg0)._wbg_cb_unref();
661
- };
662
-
663
- export function __wbg_abort_07646c894ebbf2bd(arg0) {
377
+ }
378
+ export function __wbg_abort_2f0584e03e8e3950(arg0) {
664
379
  getObject(arg0).abort();
665
- };
666
-
667
- export function __wbg_abort_399ecbcfd6ef3c8e(arg0, arg1) {
380
+ }
381
+ export function __wbg_abort_d549b92d3c665de1(arg0, arg1) {
668
382
  getObject(arg0).abort(getObject(arg1));
669
- };
670
-
671
- export function __wbg_append_c5cbdf46455cc776() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
383
+ }
384
+ export function __wbg_append_a992ccc37aa62dc4() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
672
385
  getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
673
- }, arguments) };
674
-
675
- export function __wbg_arrayBuffer_c04af4fce566092d() { return handleError(function (arg0) {
386
+ }, arguments); }
387
+ export function __wbg_arrayBuffer_bb54076166006c39() { return handleError(function (arg0) {
676
388
  const ret = getObject(arg0).arrayBuffer();
677
389
  return addHeapObject(ret);
678
- }, arguments) };
679
-
680
- export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
681
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
682
- return addHeapObject(ret);
683
- }, arguments) };
684
-
685
- export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
390
+ }, arguments); }
391
+ export function __wbg_call_389efe28435a9388() { return handleError(function (arg0, arg1) {
686
392
  const ret = getObject(arg0).call(getObject(arg1));
687
393
  return addHeapObject(ret);
688
- }, arguments) };
689
-
394
+ }, arguments); }
395
+ export function __wbg_call_4708e0c13bdc8e95() { return handleError(function (arg0, arg1, arg2) {
396
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
397
+ return addHeapObject(ret);
398
+ }, arguments); }
690
399
  export function __wbg_clearTimeout_42d9ccd50822fd3a(arg0) {
691
400
  const ret = clearTimeout(takeObject(arg0));
692
401
  return addHeapObject(ret);
693
- };
694
-
695
- export function __wbg_credentials_36e0572b476d4883(arg0) {
402
+ }
403
+ export function __wbg_credentials_c8f18c5a8bda3a18(arg0) {
696
404
  const ret = getObject(arg0).credentials;
697
405
  return addHeapObject(ret);
698
- };
699
-
700
- export function __wbg_crypto_574e78ad8b13b65f(arg0) {
406
+ }
407
+ export function __wbg_crypto_86f2631e91b51511(arg0) {
701
408
  const ret = getObject(arg0).crypto;
702
409
  return addHeapObject(ret);
703
- };
704
-
705
- export function __wbg_done_62ea16af4ce34b24(arg0) {
410
+ }
411
+ export function __wbg_done_57b39ecd9addfe81(arg0) {
706
412
  const ret = getObject(arg0).done;
707
413
  return ret;
708
- };
709
-
414
+ }
710
415
  export function __wbg_fetch_6bbc32f991730587(arg0) {
711
416
  const ret = fetch(getObject(arg0));
712
417
  return addHeapObject(ret);
713
- };
714
-
715
- export function __wbg_fetch_90447c28cc0b095e(arg0, arg1) {
418
+ }
419
+ export function __wbg_fetch_afb6a4b6cacf876d(arg0, arg1) {
716
420
  const ret = getObject(arg0).fetch(getObject(arg1));
717
421
  return addHeapObject(ret);
718
- };
719
-
422
+ }
720
423
  export function __wbg_fetch_f1856afdb49415d1(arg0) {
721
424
  const ret = fetch(getObject(arg0));
722
425
  return addHeapObject(ret);
723
- };
724
-
725
- export function __wbg_getClientExtensionResults_8668622b21a5eef7(arg0) {
426
+ }
427
+ export function __wbg_getClientExtensionResults_8f33db77a64c1fec(arg0) {
726
428
  const ret = getObject(arg0).getClientExtensionResults();
727
429
  return addHeapObject(ret);
728
- };
729
-
730
- export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(function (arg0, arg1) {
430
+ }
431
+ export function __wbg_getRandomValues_b3f15fcbfabb0f8b() { return handleError(function (arg0, arg1) {
731
432
  getObject(arg0).getRandomValues(getObject(arg1));
732
- }, arguments) };
733
-
734
- export function __wbg_getTime_ad1e9878a735af08(arg0) {
433
+ }, arguments); }
434
+ export function __wbg_getTime_1e3cd1391c5c3995(arg0) {
735
435
  const ret = getObject(arg0).getTime();
736
436
  return ret;
737
- };
738
-
739
- export function __wbg_get_29726a9b608aea28() { return handleError(function (arg0, arg1) {
437
+ }
438
+ export function __wbg_get_4b6d542e6f171f17() { return handleError(function (arg0, arg1) {
740
439
  const ret = getObject(arg0).get(getObject(arg1));
741
440
  return addHeapObject(ret);
742
- }, arguments) };
743
-
744
- export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
441
+ }, arguments); }
442
+ export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
745
443
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
746
444
  return addHeapObject(ret);
747
- }, arguments) };
748
-
445
+ }, arguments); }
749
446
  export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
750
447
  const ret = getObject(arg0)[getObject(arg1)];
751
448
  return addHeapObject(ret);
752
- };
753
-
754
- export function __wbg_has_0e670569d65d3a45() { return handleError(function (arg0, arg1) {
449
+ }
450
+ export function __wbg_has_d4e53238966c12b6() { return handleError(function (arg0, arg1) {
755
451
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
756
452
  return ret;
757
- }, arguments) };
758
-
759
- export function __wbg_headers_654c30e1bcccc552(arg0) {
453
+ }, arguments); }
454
+ export function __wbg_headers_59a2938db9f80985(arg0) {
760
455
  const ret = getObject(arg0).headers;
761
456
  return addHeapObject(ret);
762
- };
763
-
764
- export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
457
+ }
458
+ export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
765
459
  let result;
766
460
  try {
767
461
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -770,9 +464,8 @@ export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
770
464
  }
771
465
  const ret = result;
772
466
  return ret;
773
- };
774
-
775
- export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
467
+ }
468
+ export function __wbg_instanceof_Object_1c6af87502b733ed(arg0) {
776
469
  let result;
777
470
  try {
778
471
  result = getObject(arg0) instanceof Object;
@@ -781,9 +474,8 @@ export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
781
474
  }
782
475
  const ret = result;
783
476
  return ret;
784
- };
785
-
786
- export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
477
+ }
478
+ export function __wbg_instanceof_Response_ee1d54d79ae41977(arg0) {
787
479
  let result;
788
480
  try {
789
481
  result = getObject(arg0) instanceof Response;
@@ -792,9 +484,8 @@ export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
792
484
  }
793
485
  const ret = result;
794
486
  return ret;
795
- };
796
-
797
- export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
487
+ }
488
+ export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
798
489
  let result;
799
490
  try {
800
491
  result = getObject(arg0) instanceof Uint8Array;
@@ -803,9 +494,8 @@ export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
803
494
  }
804
495
  const ret = result;
805
496
  return ret;
806
- };
807
-
808
- export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
497
+ }
498
+ export function __wbg_instanceof_Window_ed49b2db8df90359(arg0) {
809
499
  let result;
810
500
  try {
811
501
  result = getObject(arg0) instanceof Window;
@@ -814,85 +504,62 @@ export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
814
504
  }
815
505
  const ret = result;
816
506
  return ret;
817
- };
818
-
819
- export function __wbg_iterator_27b7c8b35ab3e86b() {
507
+ }
508
+ export function __wbg_iterator_6ff6560ca1568e55() {
820
509
  const ret = Symbol.iterator;
821
510
  return addHeapObject(ret);
822
- };
823
-
511
+ }
824
512
  export function __wbg_jscontrollererror_new(arg0) {
825
513
  const ret = JsControllerError.__wrap(arg0);
826
514
  return addHeapObject(ret);
827
- };
828
-
829
- export function __wbg_length_22ac23eaec9d8053(arg0) {
515
+ }
516
+ export function __wbg_length_32ed9a279acd054c(arg0) {
830
517
  const ret = getObject(arg0).length;
831
518
  return ret;
832
- };
833
-
834
- export function __wbg_location_962e75c1c1b3ebed(arg0) {
519
+ }
520
+ export function __wbg_location_df7ca06c93e51763(arg0) {
835
521
  const ret = getObject(arg0).location;
836
522
  return addHeapObject(ret);
837
- };
838
-
839
- export function __wbg_log_1d990106d99dacb7(arg0) {
523
+ }
524
+ export function __wbg_log_6b5ca2e6124b2808(arg0) {
840
525
  console.log(getObject(arg0));
841
- };
842
-
843
- export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
526
+ }
527
+ export function __wbg_msCrypto_d562bbe83e0d4b91(arg0) {
844
528
  const ret = getObject(arg0).msCrypto;
845
529
  return addHeapObject(ret);
846
- };
847
-
848
- export function __wbg_navigator_b49edef831236138(arg0) {
530
+ }
531
+ export function __wbg_navigator_43be698ba96fc088(arg0) {
849
532
  const ret = getObject(arg0).navigator;
850
533
  return addHeapObject(ret);
851
- };
852
-
853
- export function __wbg_new_0_23cedd11d9b40c9d() {
534
+ }
535
+ export function __wbg_new_0_73afc35eb544e539() {
854
536
  const ret = new Date();
855
537
  return addHeapObject(ret);
856
- };
857
-
858
- export function __wbg_new_1ba21ce319a06297() {
859
- const ret = new Object();
860
- return addHeapObject(ret);
861
- };
862
-
863
- export function __wbg_new_25f239778d6112b9() {
864
- const ret = new Array();
865
- return addHeapObject(ret);
866
- };
867
-
538
+ }
868
539
  export function __wbg_new_2658d63118834d8e() {
869
540
  const ret = new Mutex();
870
541
  return addHeapObject(ret);
871
- };
872
-
873
- export function __wbg_new_3c79b3bb1b32b7d3() { return handleError(function () {
874
- const ret = new Headers();
542
+ }
543
+ export function __wbg_new_361308b2356cecd0() {
544
+ const ret = new Object();
875
545
  return addHeapObject(ret);
876
- }, arguments) };
877
-
878
- export function __wbg_new_6421f6084cc5bc5a(arg0) {
879
- const ret = new Uint8Array(getObject(arg0));
546
+ }
547
+ export function __wbg_new_3eb36ae241fe6f44() {
548
+ const ret = new Array();
880
549
  return addHeapObject(ret);
881
- };
882
-
883
- export function __wbg_new_881a222c65f168fc() { return handleError(function () {
884
- const ret = new AbortController();
550
+ }
551
+ export function __wbg_new_64284bd487f9d239() { return handleError(function () {
552
+ const ret = new Headers();
885
553
  return addHeapObject(ret);
886
- }, arguments) };
887
-
888
- export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
554
+ }, arguments); }
555
+ export function __wbg_new_b5d9e2fb389fef91(arg0, arg1) {
889
556
  try {
890
557
  var state0 = {a: arg0, b: arg1};
891
558
  var cb0 = (arg0, arg1) => {
892
559
  const a = state0.a;
893
560
  state0.a = 0;
894
561
  try {
895
- return __wasm_bindgen_func_elem_5802(a, state0.b, arg0, arg1);
562
+ return __wasm_bindgen_func_elem_5826(a, state0.b, arg0, arg1);
896
563
  } finally {
897
564
  state0.a = a;
898
565
  }
@@ -902,57 +569,55 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
902
569
  } finally {
903
570
  state0.a = state0.b = 0;
904
571
  }
905
- };
906
-
907
- export function __wbg_new_from_slice_f9c22b9153b26992(arg0, arg1) {
572
+ }
573
+ export function __wbg_new_b949e7f56150a5d1() { return handleError(function () {
574
+ const ret = new AbortController();
575
+ return addHeapObject(ret);
576
+ }, arguments); }
577
+ export function __wbg_new_dd2b680c8bf6ae29(arg0) {
578
+ const ret = new Uint8Array(getObject(arg0));
579
+ return addHeapObject(ret);
580
+ }
581
+ export function __wbg_new_from_slice_a3d2629dc1826784(arg0, arg1) {
908
582
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
909
583
  return addHeapObject(ret);
910
- };
911
-
912
- export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
584
+ }
585
+ export function __wbg_new_no_args_1c7c842f08d00ebb(arg0, arg1) {
913
586
  const ret = new Function(getStringFromWasm0(arg0, arg1));
914
587
  return addHeapObject(ret);
915
- };
916
-
917
- export function __wbg_new_with_length_aa5eaf41d35235e5(arg0) {
588
+ }
589
+ export function __wbg_new_with_length_a2c39cbe88fd8ff1(arg0) {
918
590
  const ret = new Uint8Array(arg0 >>> 0);
919
591
  return addHeapObject(ret);
920
- };
921
-
922
- export function __wbg_new_with_str_and_init_c5748f76f5108934() { return handleError(function (arg0, arg1, arg2) {
592
+ }
593
+ export function __wbg_new_with_str_and_init_a61cbc6bdef21614() { return handleError(function (arg0, arg1, arg2) {
923
594
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
924
595
  return addHeapObject(ret);
925
- }, arguments) };
926
-
927
- export function __wbg_next_138a17bbf04e926c(arg0) {
928
- const ret = getObject(arg0).next;
929
- return addHeapObject(ret);
930
- };
931
-
932
- export function __wbg_next_3cfe5c0fe2a4cc53() { return handleError(function (arg0) {
596
+ }, arguments); }
597
+ export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
933
598
  const ret = getObject(arg0).next();
934
599
  return addHeapObject(ret);
935
- }, arguments) };
936
-
937
- export function __wbg_node_905d3e251edff8a2(arg0) {
600
+ }, arguments); }
601
+ export function __wbg_next_418f80d8f5303233(arg0) {
602
+ const ret = getObject(arg0).next;
603
+ return addHeapObject(ret);
604
+ }
605
+ export function __wbg_node_e1f24f89a7336c2e(arg0) {
938
606
  const ret = getObject(arg0).node;
939
607
  return addHeapObject(ret);
940
- };
941
-
608
+ }
942
609
  export function __wbg_obtain_a9626b3b96e6dc2c(arg0) {
943
610
  const ret = getObject(arg0).obtain();
944
611
  return addHeapObject(ret);
945
- };
946
-
947
- export function __wbg_origin_c4ac149104b9ebad() { return handleError(function (arg0, arg1) {
612
+ }
613
+ export function __wbg_origin_a9c891fa602b4d40() { return handleError(function (arg0, arg1) {
948
614
  const ret = getObject(arg1).origin;
949
615
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
950
616
  const len1 = WASM_VECTOR_LEN;
951
617
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
952
618
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
953
- }, arguments) };
954
-
955
- export function __wbg_parse_7ff95c018af680b3(arg0, arg1) {
619
+ }, arguments); }
620
+ export function __wbg_parse_9e3ea228dba1cc2a(arg0, arg1) {
956
621
  let deferred0_0;
957
622
  let deferred0_1;
958
623
  try {
@@ -963,229 +628,457 @@ export function __wbg_parse_7ff95c018af680b3(arg0, arg1) {
963
628
  } finally {
964
629
  wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
965
630
  }
966
- };
967
-
968
- export function __wbg_process_dc0fbacc7c1c06f7(arg0) {
969
- const ret = getObject(arg0).process;
970
- return addHeapObject(ret);
971
- };
972
-
973
- export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0, arg1, arg2) {
974
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
975
- };
976
-
977
- export function __wbg_push_7d9be8f38fc13975(arg0, arg1) {
978
- const ret = getObject(arg0).push(getObject(arg1));
979
- return ret;
980
- };
981
-
982
- export function __wbg_queueMicrotask_9b549dfce8865860(arg0) {
983
- const ret = getObject(arg0).queueMicrotask;
984
- return addHeapObject(ret);
985
- };
986
-
987
- export function __wbg_queueMicrotask_fca69f5bfad613a5(arg0) {
988
- queueMicrotask(getObject(arg0));
989
- };
990
-
991
- export function __wbg_randomFillSync_ac0988aba3254290() { return handleError(function (arg0, arg1) {
992
- getObject(arg0).randomFillSync(takeObject(arg1));
993
- }, arguments) };
994
-
995
- export function __wbg_require_60cc747a6bc5215a() { return handleError(function () {
996
- const ret = module.require;
997
- return addHeapObject(ret);
998
- }, arguments) };
999
-
1000
- export function __wbg_resolve_fd5bfbaa4ce36e1e(arg0) {
1001
- const ret = Promise.resolve(getObject(arg0));
1002
- return addHeapObject(ret);
1003
- };
1004
-
1005
- export function __wbg_setTimeout_4ec014681668a581(arg0, arg1) {
1006
- const ret = setTimeout(getObject(arg0), arg1);
1007
- return addHeapObject(ret);
1008
- };
1009
-
1010
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
1011
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1012
- };
1013
-
1014
- export function __wbg_set_3fda3bac07393de4(arg0, arg1, arg2) {
1015
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1016
- };
1017
-
1018
- export function __wbg_set_781438a03c0c3c81() { return handleError(function (arg0, arg1, arg2) {
1019
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1020
- return ret;
1021
- }, arguments) };
1022
-
1023
- export function __wbg_set_7df433eea03a5c14(arg0, arg1, arg2) {
1024
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1025
- };
1026
-
1027
- export function __wbg_set_body_8e743242d6076a4f(arg0, arg1) {
1028
- getObject(arg0).body = getObject(arg1);
1029
- };
631
+ }
632
+ export function __wbg_process_3975fd6c72f520aa(arg0) {
633
+ const ret = getObject(arg0).process;
634
+ return addHeapObject(ret);
635
+ }
636
+ export function __wbg_prototypesetcall_bdcdcc5842e4d77d(arg0, arg1, arg2) {
637
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
638
+ }
639
+ export function __wbg_push_8ffdcb2063340ba5(arg0, arg1) {
640
+ const ret = getObject(arg0).push(getObject(arg1));
641
+ return ret;
642
+ }
643
+ export function __wbg_queueMicrotask_0aa0a927f78f5d98(arg0) {
644
+ const ret = getObject(arg0).queueMicrotask;
645
+ return addHeapObject(ret);
646
+ }
647
+ export function __wbg_queueMicrotask_5bb536982f78a56f(arg0) {
648
+ queueMicrotask(getObject(arg0));
649
+ }
650
+ export function __wbg_randomFillSync_f8c153b79f285817() { return handleError(function (arg0, arg1) {
651
+ getObject(arg0).randomFillSync(takeObject(arg1));
652
+ }, arguments); }
653
+ export function __wbg_require_b74f47fc2d022fd6() { return handleError(function () {
654
+ const ret = module.require;
655
+ return addHeapObject(ret);
656
+ }, arguments); }
657
+ export function __wbg_resolve_002c4b7d9d8f6b64(arg0) {
658
+ const ret = Promise.resolve(getObject(arg0));
659
+ return addHeapObject(ret);
660
+ }
661
+ export function __wbg_setTimeout_4ec014681668a581(arg0, arg1) {
662
+ const ret = setTimeout(getObject(arg0), arg1);
663
+ return addHeapObject(ret);
664
+ }
665
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
666
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
667
+ }
668
+ export function __wbg_set_3fda3bac07393de4(arg0, arg1, arg2) {
669
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
670
+ }
671
+ export function __wbg_set_6cb8631f80447a67() { return handleError(function (arg0, arg1, arg2) {
672
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
673
+ return ret;
674
+ }, arguments); }
675
+ export function __wbg_set_body_9a7e00afe3cfe244(arg0, arg1) {
676
+ getObject(arg0).body = getObject(arg1);
677
+ }
678
+ export function __wbg_set_cache_315a3ed773a41543(arg0, arg1) {
679
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
680
+ }
681
+ export function __wbg_set_credentials_c4a58d2e05ef24fb(arg0, arg1) {
682
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
683
+ }
684
+ export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) {
685
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
686
+ }
687
+ export function __wbg_set_headers_cfc5f4b2c1f20549(arg0, arg1) {
688
+ getObject(arg0).headers = getObject(arg1);
689
+ }
690
+ export function __wbg_set_method_c3e20375f5ae7fac(arg0, arg1, arg2) {
691
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
692
+ }
693
+ export function __wbg_set_mode_b13642c312648202(arg0, arg1) {
694
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
695
+ }
696
+ export function __wbg_set_signal_f2d3f8599248896d(arg0, arg1) {
697
+ getObject(arg0).signal = getObject(arg1);
698
+ }
699
+ export function __wbg_signMessage_c732ea9d998cac79() { return handleError(function (arg0, arg1, arg2, arg3) {
700
+ let deferred0_0;
701
+ let deferred0_1;
702
+ let deferred1_0;
703
+ let deferred1_1;
704
+ try {
705
+ deferred0_0 = arg0;
706
+ deferred0_1 = arg1;
707
+ deferred1_0 = arg2;
708
+ deferred1_1 = arg3;
709
+ const ret = window.keychain_wallets.signMessage(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
710
+ return addHeapObject(ret);
711
+ } finally {
712
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
713
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
714
+ }
715
+ }, arguments); }
716
+ export function __wbg_signal_d1285ecab4ebc5ad(arg0) {
717
+ const ret = getObject(arg0).signal;
718
+ return addHeapObject(ret);
719
+ }
720
+ export function __wbg_static_accessor_GLOBAL_12837167ad935116() {
721
+ const ret = typeof global === 'undefined' ? null : global;
722
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
723
+ }
724
+ export function __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f() {
725
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
726
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
727
+ }
728
+ export function __wbg_static_accessor_SELF_a621d3dfbb60d0ce() {
729
+ const ret = typeof self === 'undefined' ? null : self;
730
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
731
+ }
732
+ export function __wbg_static_accessor_WINDOW_f8727f0cf888e0bd() {
733
+ const ret = typeof window === 'undefined' ? null : window;
734
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
735
+ }
736
+ export function __wbg_status_89d7e803db911ee7(arg0) {
737
+ const ret = getObject(arg0).status;
738
+ return ret;
739
+ }
740
+ export function __wbg_stringify_8d1cc6ff383e8bae() { return handleError(function (arg0) {
741
+ const ret = JSON.stringify(getObject(arg0));
742
+ return addHeapObject(ret);
743
+ }, arguments); }
744
+ export function __wbg_stringify_e4a940b133e6b7d8(arg0, arg1) {
745
+ const ret = JSON.stringify(getObject(arg1));
746
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
747
+ var len1 = WASM_VECTOR_LEN;
748
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
749
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
750
+ }
751
+ export function __wbg_subarray_a96e1fef17ed23cb(arg0, arg1, arg2) {
752
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
753
+ return addHeapObject(ret);
754
+ }
755
+ export function __wbg_text_083b8727c990c8c0() { return handleError(function (arg0) {
756
+ const ret = getObject(arg0).text();
757
+ return addHeapObject(ret);
758
+ }, arguments); }
759
+ export function __wbg_then_0d9fe2c7b1857d32(arg0, arg1, arg2) {
760
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
761
+ return addHeapObject(ret);
762
+ }
763
+ export function __wbg_then_b9e7b3b5f1a9e1b5(arg0, arg1) {
764
+ const ret = getObject(arg0).then(getObject(arg1));
765
+ return addHeapObject(ret);
766
+ }
767
+ export function __wbg_url_c484c26b1fbf5126(arg0, arg1) {
768
+ const ret = getObject(arg1).url;
769
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
770
+ const len1 = WASM_VECTOR_LEN;
771
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
772
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
773
+ }
774
+ export function __wbg_value_0546255b415e96c1(arg0) {
775
+ const ret = getObject(arg0).value;
776
+ return addHeapObject(ret);
777
+ }
778
+ export function __wbg_versions_4e31226f5e8dc909(arg0) {
779
+ const ret = getObject(arg0).versions;
780
+ return addHeapObject(ret);
781
+ }
782
+ export function __wbindgen_cast_0000000000000001(arg0, arg1) {
783
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 464, function: Function { arguments: [], shim_idx: 465, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
784
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3889, __wasm_bindgen_func_elem_3898);
785
+ return addHeapObject(ret);
786
+ }
787
+ export function __wbindgen_cast_0000000000000002(arg0, arg1) {
788
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 499, function: Function { arguments: [Externref], shim_idx: 500, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
789
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4028, __wasm_bindgen_func_elem_4043);
790
+ return addHeapObject(ret);
791
+ }
792
+ export function __wbindgen_cast_0000000000000003(arg0) {
793
+ // Cast intrinsic for `F64 -> Externref`.
794
+ const ret = arg0;
795
+ return addHeapObject(ret);
796
+ }
797
+ export function __wbindgen_cast_0000000000000004(arg0, arg1) {
798
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
799
+ const ret = getArrayU8FromWasm0(arg0, arg1);
800
+ return addHeapObject(ret);
801
+ }
802
+ export function __wbindgen_cast_0000000000000005(arg0, arg1) {
803
+ // Cast intrinsic for `Ref(String) -> Externref`.
804
+ const ret = getStringFromWasm0(arg0, arg1);
805
+ return addHeapObject(ret);
806
+ }
807
+ export function __wbindgen_object_clone_ref(arg0) {
808
+ const ret = getObject(arg0);
809
+ return addHeapObject(ret);
810
+ }
811
+ export function __wbindgen_object_drop_ref(arg0) {
812
+ takeObject(arg0);
813
+ }
814
+ function __wasm_bindgen_func_elem_3898(arg0, arg1) {
815
+ wasm.__wasm_bindgen_func_elem_3898(arg0, arg1);
816
+ }
817
+
818
+ function __wasm_bindgen_func_elem_4043(arg0, arg1, arg2) {
819
+ wasm.__wasm_bindgen_func_elem_4043(arg0, arg1, addHeapObject(arg2));
820
+ }
821
+
822
+ function __wasm_bindgen_func_elem_5826(arg0, arg1, arg2, arg3) {
823
+ wasm.__wasm_bindgen_func_elem_5826(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
824
+ }
825
+
826
+
827
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
828
+
829
+
830
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
831
+
832
+
833
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
834
+ const CartridgeSessionAccountFinalization = (typeof FinalizationRegistry === 'undefined')
835
+ ? { register: () => {}, unregister: () => {} }
836
+ : new FinalizationRegistry(ptr => wasm.__wbg_cartridgesessionaccount_free(ptr >>> 0, 1));
837
+ const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
838
+ ? { register: () => {}, unregister: () => {} }
839
+ : new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
840
+
841
+ function addHeapObject(obj) {
842
+ if (heap_next === heap.length) heap.push(heap.length + 1);
843
+ const idx = heap_next;
844
+ heap_next = heap[idx];
845
+
846
+ heap[idx] = obj;
847
+ return idx;
848
+ }
849
+
850
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
851
+ ? { register: () => {}, unregister: () => {} }
852
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
853
+
854
+ function debugString(val) {
855
+ // primitive types
856
+ const type = typeof val;
857
+ if (type == 'number' || type == 'boolean' || val == null) {
858
+ return `${val}`;
859
+ }
860
+ if (type == 'string') {
861
+ return `"${val}"`;
862
+ }
863
+ if (type == 'symbol') {
864
+ const description = val.description;
865
+ if (description == null) {
866
+ return 'Symbol';
867
+ } else {
868
+ return `Symbol(${description})`;
869
+ }
870
+ }
871
+ if (type == 'function') {
872
+ const name = val.name;
873
+ if (typeof name == 'string' && name.length > 0) {
874
+ return `Function(${name})`;
875
+ } else {
876
+ return 'Function';
877
+ }
878
+ }
879
+ // objects
880
+ if (Array.isArray(val)) {
881
+ const length = val.length;
882
+ let debug = '[';
883
+ if (length > 0) {
884
+ debug += debugString(val[0]);
885
+ }
886
+ for(let i = 1; i < length; i++) {
887
+ debug += ', ' + debugString(val[i]);
888
+ }
889
+ debug += ']';
890
+ return debug;
891
+ }
892
+ // Test for built-in
893
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
894
+ let className;
895
+ if (builtInMatches && builtInMatches.length > 1) {
896
+ className = builtInMatches[1];
897
+ } else {
898
+ // Failed to match the standard '[object ClassName]'
899
+ return toString.call(val);
900
+ }
901
+ if (className == 'Object') {
902
+ // we're a user defined class or Object
903
+ // JSON.stringify avoids problems with cycles, and is generally much
904
+ // easier than looping through ownProperties of `val`.
905
+ try {
906
+ return 'Object(' + JSON.stringify(val) + ')';
907
+ } catch (_) {
908
+ return 'Object';
909
+ }
910
+ }
911
+ // errors
912
+ if (val instanceof Error) {
913
+ return `${val.name}: ${val.message}\n${val.stack}`;
914
+ }
915
+ // TODO we could test for more things here, like `Set`s and `Map`s.
916
+ return className;
917
+ }
1030
918
 
1031
- export function __wbg_set_cache_0e437c7c8e838b9b(arg0, arg1) {
1032
- getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
1033
- };
919
+ function dropObject(idx) {
920
+ if (idx < 132) return;
921
+ heap[idx] = heap_next;
922
+ heap_next = idx;
923
+ }
1034
924
 
1035
- export function __wbg_set_credentials_55ae7c3c106fd5be(arg0, arg1) {
1036
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1037
- };
925
+ function getArrayU8FromWasm0(ptr, len) {
926
+ ptr = ptr >>> 0;
927
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
928
+ }
1038
929
 
1039
- export function __wbg_set_headers_5671cf088e114d2b(arg0, arg1) {
1040
- getObject(arg0).headers = getObject(arg1);
1041
- };
930
+ let cachedDataViewMemory0 = null;
931
+ function getDataViewMemory0() {
932
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
933
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
934
+ }
935
+ return cachedDataViewMemory0;
936
+ }
1042
937
 
1043
- export function __wbg_set_method_76c69e41b3570627(arg0, arg1, arg2) {
1044
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1045
- };
938
+ function getStringFromWasm0(ptr, len) {
939
+ ptr = ptr >>> 0;
940
+ return decodeText(ptr, len);
941
+ }
1046
942
 
1047
- export function __wbg_set_mode_611016a6818fc690(arg0, arg1) {
1048
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1049
- };
943
+ let cachedUint8ArrayMemory0 = null;
944
+ function getUint8ArrayMemory0() {
945
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
946
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
947
+ }
948
+ return cachedUint8ArrayMemory0;
949
+ }
1050
950
 
1051
- export function __wbg_set_signal_e89be862d0091009(arg0, arg1) {
1052
- getObject(arg0).signal = getObject(arg1);
1053
- };
951
+ function getObject(idx) { return heap[idx]; }
1054
952
 
1055
- export function __wbg_signMessage_c732ea9d998cac79() { return handleError(function (arg0, arg1, arg2, arg3) {
1056
- let deferred0_0;
1057
- let deferred0_1;
1058
- let deferred1_0;
1059
- let deferred1_1;
953
+ function handleError(f, args) {
1060
954
  try {
1061
- deferred0_0 = arg0;
1062
- deferred0_1 = arg1;
1063
- deferred1_0 = arg2;
1064
- deferred1_1 = arg3;
1065
- const ret = window.keychain_wallets.signMessage(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1066
- return addHeapObject(ret);
1067
- } finally {
1068
- wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
1069
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
955
+ return f.apply(this, args);
956
+ } catch (e) {
957
+ wasm.__wbindgen_export3(addHeapObject(e));
1070
958
  }
1071
- }, arguments) };
1072
-
1073
- export function __wbg_signal_3c14fbdc89694b39(arg0) {
1074
- const ret = getObject(arg0).signal;
1075
- return addHeapObject(ret);
1076
- };
1077
-
1078
- export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
1079
- const ret = typeof global === 'undefined' ? null : global;
1080
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1081
- };
959
+ }
1082
960
 
1083
- export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
1084
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1085
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1086
- };
961
+ let heap = new Array(128).fill(undefined);
962
+ heap.push(undefined, null, true, false);
1087
963
 
1088
- export function __wbg_static_accessor_SELF_08f5a74c69739274() {
1089
- const ret = typeof self === 'undefined' ? null : self;
1090
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1091
- };
964
+ let heap_next = heap.length;
1092
965
 
1093
- export function __wbg_static_accessor_WINDOW_a8924b26aa92d024() {
1094
- const ret = typeof window === 'undefined' ? null : window;
1095
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1096
- };
966
+ function isLikeNone(x) {
967
+ return x === undefined || x === null;
968
+ }
1097
969
 
1098
- export function __wbg_status_9bfc680efca4bdfd(arg0) {
1099
- const ret = getObject(arg0).status;
1100
- return ret;
1101
- };
970
+ function makeMutClosure(arg0, arg1, dtor, f) {
971
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
972
+ const real = (...args) => {
1102
973
 
1103
- export function __wbg_stringify_56d3c6664110414f(arg0, arg1) {
1104
- const ret = JSON.stringify(getObject(arg1));
1105
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1106
- var len1 = WASM_VECTOR_LEN;
1107
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1108
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1109
- };
974
+ // First up with a closure we increment the internal reference
975
+ // count. This ensures that the Rust closure environment won't
976
+ // be deallocated while we're invoking it.
977
+ state.cnt++;
978
+ const a = state.a;
979
+ state.a = 0;
980
+ try {
981
+ return f(a, state.b, ...args);
982
+ } finally {
983
+ state.a = a;
984
+ real._wbg_cb_unref();
985
+ }
986
+ };
987
+ real._wbg_cb_unref = () => {
988
+ if (--state.cnt === 0) {
989
+ state.dtor(state.a, state.b);
990
+ state.a = 0;
991
+ CLOSURE_DTORS.unregister(state);
992
+ }
993
+ };
994
+ CLOSURE_DTORS.register(real, state, state);
995
+ return real;
996
+ }
1110
997
 
1111
- export function __wbg_stringify_655a6390e1f5eb6b() { return handleError(function (arg0) {
1112
- const ret = JSON.stringify(getObject(arg0));
1113
- return addHeapObject(ret);
1114
- }, arguments) };
998
+ function passArrayJsValueToWasm0(array, malloc) {
999
+ const ptr = malloc(array.length * 4, 4) >>> 0;
1000
+ const mem = getDataViewMemory0();
1001
+ for (let i = 0; i < array.length; i++) {
1002
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
1003
+ }
1004
+ WASM_VECTOR_LEN = array.length;
1005
+ return ptr;
1006
+ }
1115
1007
 
1116
- export function __wbg_subarray_845f2f5bce7d061a(arg0, arg1, arg2) {
1117
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1118
- return addHeapObject(ret);
1119
- };
1008
+ function passStringToWasm0(arg, malloc, realloc) {
1009
+ if (realloc === undefined) {
1010
+ const buf = cachedTextEncoder.encode(arg);
1011
+ const ptr = malloc(buf.length, 1) >>> 0;
1012
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1013
+ WASM_VECTOR_LEN = buf.length;
1014
+ return ptr;
1015
+ }
1120
1016
 
1121
- export function __wbg_text_51046bb33d257f63() { return handleError(function (arg0) {
1122
- const ret = getObject(arg0).text();
1123
- return addHeapObject(ret);
1124
- }, arguments) };
1017
+ let len = arg.length;
1018
+ let ptr = malloc(len, 1) >>> 0;
1125
1019
 
1126
- export function __wbg_then_429f7caf1026411d(arg0, arg1, arg2) {
1127
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1128
- return addHeapObject(ret);
1129
- };
1020
+ const mem = getUint8ArrayMemory0();
1130
1021
 
1131
- export function __wbg_then_4f95312d68691235(arg0, arg1) {
1132
- const ret = getObject(arg0).then(getObject(arg1));
1133
- return addHeapObject(ret);
1134
- };
1022
+ let offset = 0;
1135
1023
 
1136
- export function __wbg_url_b6d11838a4f95198(arg0, arg1) {
1137
- const ret = getObject(arg1).url;
1138
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1139
- const len1 = WASM_VECTOR_LEN;
1140
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1141
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1142
- };
1024
+ for (; offset < len; offset++) {
1025
+ const code = arg.charCodeAt(offset);
1026
+ if (code > 0x7F) break;
1027
+ mem[ptr + offset] = code;
1028
+ }
1029
+ if (offset !== len) {
1030
+ if (offset !== 0) {
1031
+ arg = arg.slice(offset);
1032
+ }
1033
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1034
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1035
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1143
1036
 
1144
- export function __wbg_value_57b7b035e117f7ee(arg0) {
1145
- const ret = getObject(arg0).value;
1146
- return addHeapObject(ret);
1147
- };
1037
+ offset += ret.written;
1038
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1039
+ }
1148
1040
 
1149
- export function __wbg_versions_c01dfd4722a88165(arg0) {
1150
- const ret = getObject(arg0).versions;
1151
- return addHeapObject(ret);
1152
- };
1041
+ WASM_VECTOR_LEN = offset;
1042
+ return ptr;
1043
+ }
1153
1044
 
1154
- export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1155
- // Cast intrinsic for `Ref(String) -> Externref`.
1156
- const ret = getStringFromWasm0(arg0, arg1);
1157
- return addHeapObject(ret);
1158
- };
1045
+ function takeObject(idx) {
1046
+ const ret = getObject(idx);
1047
+ dropObject(idx);
1048
+ return ret;
1049
+ }
1159
1050
 
1160
- export function __wbindgen_cast_5878cfe9fa9dbe2e(arg0, arg1) {
1161
- // Cast intrinsic for `Closure(Closure { dtor_idx: 495, function: Function { arguments: [Externref], shim_idx: 496, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1162
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4002, __wasm_bindgen_func_elem_4017);
1163
- return addHeapObject(ret);
1164
- };
1051
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1052
+ cachedTextDecoder.decode();
1053
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1054
+ let numBytesDecoded = 0;
1055
+ function decodeText(ptr, len) {
1056
+ numBytesDecoded += len;
1057
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1058
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1059
+ cachedTextDecoder.decode();
1060
+ numBytesDecoded = len;
1061
+ }
1062
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1063
+ }
1165
1064
 
1166
- export function __wbindgen_cast_c006400c7b517809(arg0, arg1) {
1167
- // Cast intrinsic for `Closure(Closure { dtor_idx: 460, function: Function { arguments: [], shim_idx: 461, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1168
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3863, __wasm_bindgen_func_elem_3872);
1169
- return addHeapObject(ret);
1170
- };
1065
+ const cachedTextEncoder = new TextEncoder();
1171
1066
 
1172
- export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
1173
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1174
- const ret = getArrayU8FromWasm0(arg0, arg1);
1175
- return addHeapObject(ret);
1176
- };
1067
+ if (!('encodeInto' in cachedTextEncoder)) {
1068
+ cachedTextEncoder.encodeInto = function (arg, view) {
1069
+ const buf = cachedTextEncoder.encode(arg);
1070
+ view.set(buf);
1071
+ return {
1072
+ read: arg.length,
1073
+ written: buf.length
1074
+ };
1075
+ };
1076
+ }
1177
1077
 
1178
- export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1179
- // Cast intrinsic for `F64 -> Externref`.
1180
- const ret = arg0;
1181
- return addHeapObject(ret);
1182
- };
1078
+ let WASM_VECTOR_LEN = 0;
1183
1079
 
1184
- export function __wbindgen_object_clone_ref(arg0) {
1185
- const ret = getObject(arg0);
1186
- return addHeapObject(ret);
1187
- };
1188
1080
 
1189
- export function __wbindgen_object_drop_ref(arg0) {
1190
- takeObject(arg0);
1191
- };
1081
+ let wasm;
1082
+ export function __wbg_set_wasm(val) {
1083
+ wasm = val;
1084
+ }