@boundaryml/baml-bridge-web 0.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/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/native.d.ts +79 -0
- package/dist/native.d.ts.map +1 -0
- package/dist/native.js +148 -0
- package/dist/native.js.map +1 -0
- package/dist/shared/define_function.d.ts +31 -0
- package/dist/shared/define_function.d.ts.map +1 -0
- package/dist/shared/define_function.js +274 -0
- package/dist/shared/define_function.js.map +1 -0
- package/dist/shared/errors.d.ts +51 -0
- package/dist/shared/errors.d.ts.map +1 -0
- package/dist/shared/errors.js +60 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/host_value_registry.d.ts +50 -0
- package/dist/shared/host_value_registry.d.ts.map +1 -0
- package/dist/shared/host_value_registry.js +134 -0
- package/dist/shared/host_value_registry.js.map +1 -0
- package/dist/shared/proto/baml_cffi.d.ts +6282 -0
- package/dist/shared/proto/baml_cffi.js +12482 -0
- package/dist/shared/proto.d.ts +55 -0
- package/dist/shared/proto.d.ts.map +1 -0
- package/dist/shared/proto.js +956 -0
- package/dist/shared/proto.js.map +1 -0
- package/dist/shared/stream.d.ts +16 -0
- package/dist/shared/stream.d.ts.map +1 -0
- package/dist/shared/stream.js +61 -0
- package/dist/shared/stream.js.map +1 -0
- package/dist/shared/typemap.d.ts +30 -0
- package/dist/shared/typemap.d.ts.map +1 -0
- package/dist/shared/typemap.js +103 -0
- package/dist/shared/typemap.js.map +1 -0
- package/dist/shared/wire_ty.d.ts +51 -0
- package/dist/shared/wire_ty.d.ts.map +1 -0
- package/dist/shared/wire_ty.js +140 -0
- package/dist/shared/wire_ty.js.map +1 -0
- package/dist/wasm/bridge_web_core.d.ts +174 -0
- package/dist/wasm/bridge_web_core.js +1277 -0
- package/dist/wasm/bridge_web_core_bg.wasm +0 -0
- package/dist/wasm/bridge_web_core_bg.wasm.d.ts +41 -0
- package/dist/wasm/package.json +19 -0
- package/dist/workerd/index.d.ts +30 -0
- package/dist/workerd/index.d.ts.map +1 -0
- package/dist/workerd/index.js +57 -0
- package/dist/workerd/index.js.map +1 -0
- package/dist/workerd/native.d.ts +79 -0
- package/dist/workerd/native.d.ts.map +1 -0
- package/dist/workerd/native.js +147 -0
- package/dist/workerd/shared/define_function.d.ts +31 -0
- package/dist/workerd/shared/define_function.d.ts.map +1 -0
- package/dist/workerd/shared/define_function.js +274 -0
- package/dist/workerd/shared/define_function.js.map +1 -0
- package/dist/workerd/shared/errors.d.ts +51 -0
- package/dist/workerd/shared/errors.d.ts.map +1 -0
- package/dist/workerd/shared/errors.js +60 -0
- package/dist/workerd/shared/errors.js.map +1 -0
- package/dist/workerd/shared/host_value_registry.d.ts +50 -0
- package/dist/workerd/shared/host_value_registry.d.ts.map +1 -0
- package/dist/workerd/shared/host_value_registry.js +134 -0
- package/dist/workerd/shared/host_value_registry.js.map +1 -0
- package/dist/workerd/shared/proto/baml_cffi.d.ts +6282 -0
- package/dist/workerd/shared/proto/baml_cffi.js +12482 -0
- package/dist/workerd/shared/proto.d.ts +55 -0
- package/dist/workerd/shared/proto.d.ts.map +1 -0
- package/dist/workerd/shared/proto.js +956 -0
- package/dist/workerd/shared/proto.js.map +1 -0
- package/dist/workerd/shared/stream.d.ts +16 -0
- package/dist/workerd/shared/stream.d.ts.map +1 -0
- package/dist/workerd/shared/stream.js +61 -0
- package/dist/workerd/shared/stream.js.map +1 -0
- package/dist/workerd/shared/typemap.d.ts +30 -0
- package/dist/workerd/shared/typemap.d.ts.map +1 -0
- package/dist/workerd/shared/typemap.js +103 -0
- package/dist/workerd/shared/typemap.js.map +1 -0
- package/dist/workerd/shared/wire_ty.d.ts +51 -0
- package/dist/workerd/shared/wire_ty.d.ts.map +1 -0
- package/dist/workerd/shared/wire_ty.js +140 -0
- package/dist/workerd/shared/wire_ty.js.map +1 -0
- package/dist/workerd-wasm/bridge_web_core.d.ts +108 -0
- package/dist/workerd-wasm/bridge_web_core.js +14 -0
- package/dist/workerd-wasm/bridge_web_core_bg.js +1178 -0
- package/dist/workerd-wasm/bridge_web_core_bg.wasm +0 -0
- package/dist/workerd-wasm/bridge_web_core_bg.wasm.d.ts +41 -0
- package/dist/workerd-wasm/package.json +21 -0
- package/package.json +31 -0
|
@@ -0,0 +1,1277 @@
|
|
|
1
|
+
/* @ts-self-types="./bridge_web_core.d.ts" */
|
|
2
|
+
|
|
3
|
+
export class IntoUnderlyingByteSource {
|
|
4
|
+
__destroy_into_raw() {
|
|
5
|
+
const ptr = this.__wbg_ptr;
|
|
6
|
+
this.__wbg_ptr = 0;
|
|
7
|
+
IntoUnderlyingByteSourceFinalization.unregister(this);
|
|
8
|
+
return ptr;
|
|
9
|
+
}
|
|
10
|
+
free() {
|
|
11
|
+
const ptr = this.__destroy_into_raw();
|
|
12
|
+
wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @returns {number}
|
|
16
|
+
*/
|
|
17
|
+
get autoAllocateChunkSize() {
|
|
18
|
+
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
19
|
+
return ret >>> 0;
|
|
20
|
+
}
|
|
21
|
+
cancel() {
|
|
22
|
+
const ptr = this.__destroy_into_raw();
|
|
23
|
+
wasm.intounderlyingbytesource_cancel(ptr);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @param {ReadableByteStreamController} controller
|
|
27
|
+
* @returns {Promise<any>}
|
|
28
|
+
*/
|
|
29
|
+
pull(controller) {
|
|
30
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
|
|
31
|
+
return takeObject(ret);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @param {ReadableByteStreamController} controller
|
|
35
|
+
*/
|
|
36
|
+
start(controller) {
|
|
37
|
+
wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @returns {ReadableStreamType}
|
|
41
|
+
*/
|
|
42
|
+
get type() {
|
|
43
|
+
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
44
|
+
return __wbindgen_enum_ReadableStreamType[ret];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
|
|
48
|
+
|
|
49
|
+
export class IntoUnderlyingSink {
|
|
50
|
+
__destroy_into_raw() {
|
|
51
|
+
const ptr = this.__wbg_ptr;
|
|
52
|
+
this.__wbg_ptr = 0;
|
|
53
|
+
IntoUnderlyingSinkFinalization.unregister(this);
|
|
54
|
+
return ptr;
|
|
55
|
+
}
|
|
56
|
+
free() {
|
|
57
|
+
const ptr = this.__destroy_into_raw();
|
|
58
|
+
wasm.__wbg_intounderlyingsink_free(ptr, 0);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @param {any} reason
|
|
62
|
+
* @returns {Promise<any>}
|
|
63
|
+
*/
|
|
64
|
+
abort(reason) {
|
|
65
|
+
const ptr = this.__destroy_into_raw();
|
|
66
|
+
const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
|
|
67
|
+
return takeObject(ret);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @returns {Promise<any>}
|
|
71
|
+
*/
|
|
72
|
+
close() {
|
|
73
|
+
const ptr = this.__destroy_into_raw();
|
|
74
|
+
const ret = wasm.intounderlyingsink_close(ptr);
|
|
75
|
+
return takeObject(ret);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @param {any} chunk
|
|
79
|
+
* @returns {Promise<any>}
|
|
80
|
+
*/
|
|
81
|
+
write(chunk) {
|
|
82
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
|
|
83
|
+
return takeObject(ret);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
|
|
87
|
+
|
|
88
|
+
export class IntoUnderlyingSource {
|
|
89
|
+
__destroy_into_raw() {
|
|
90
|
+
const ptr = this.__wbg_ptr;
|
|
91
|
+
this.__wbg_ptr = 0;
|
|
92
|
+
IntoUnderlyingSourceFinalization.unregister(this);
|
|
93
|
+
return ptr;
|
|
94
|
+
}
|
|
95
|
+
free() {
|
|
96
|
+
const ptr = this.__destroy_into_raw();
|
|
97
|
+
wasm.__wbg_intounderlyingsource_free(ptr, 0);
|
|
98
|
+
}
|
|
99
|
+
cancel() {
|
|
100
|
+
const ptr = this.__destroy_into_raw();
|
|
101
|
+
wasm.intounderlyingsource_cancel(ptr);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @param {ReadableStreamDefaultController} controller
|
|
105
|
+
* @returns {Promise<any>}
|
|
106
|
+
*/
|
|
107
|
+
pull(controller) {
|
|
108
|
+
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
|
|
109
|
+
return takeObject(ret);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @param {string} function_name
|
|
116
|
+
* @param {Uint8Array} encoded_args
|
|
117
|
+
* @returns {Promise<Uint8Array>}
|
|
118
|
+
*/
|
|
119
|
+
export function callFunction(function_name, encoded_args) {
|
|
120
|
+
const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
121
|
+
const len0 = WASM_VECTOR_LEN;
|
|
122
|
+
const ptr1 = passArray8ToWasm0(encoded_args, wasm.__wbindgen_export2);
|
|
123
|
+
const len1 = WASM_VECTOR_LEN;
|
|
124
|
+
const ret = wasm.callFunction(ptr0, len0, ptr1, len1);
|
|
125
|
+
return takeObject(ret);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @param {string} function_name
|
|
130
|
+
* @param {Uint8Array} encoded_args
|
|
131
|
+
* @returns {Uint8Array}
|
|
132
|
+
*/
|
|
133
|
+
export function callFunctionSync(function_name, encoded_args) {
|
|
134
|
+
try {
|
|
135
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
136
|
+
const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
137
|
+
const len0 = WASM_VECTOR_LEN;
|
|
138
|
+
const ptr1 = passArray8ToWasm0(encoded_args, wasm.__wbindgen_export2);
|
|
139
|
+
const len1 = WASM_VECTOR_LEN;
|
|
140
|
+
wasm.callFunctionSync(retptr, ptr0, len0, ptr1, len1);
|
|
141
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
142
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
143
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
144
|
+
wasm.__wbindgen_export5(r0, r1 * 1, 1);
|
|
145
|
+
return v3;
|
|
146
|
+
} finally {
|
|
147
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @param {bigint} call_id
|
|
153
|
+
* @returns {boolean}
|
|
154
|
+
*/
|
|
155
|
+
export function cancelFunctionCall(call_id) {
|
|
156
|
+
const ret = wasm.cancelFunctionCall(call_id);
|
|
157
|
+
return ret !== 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Complete an in-flight host call from JS.
|
|
162
|
+
*
|
|
163
|
+
* Exposed to JS as `completeHostCall(callId, isError, content)`.
|
|
164
|
+
*
|
|
165
|
+
* On success (`is_error == 0`), `content` is a protobuf-encoded `InboundValue`
|
|
166
|
+
* (host→engine direction, no type metadata — engine re-validates against the
|
|
167
|
+
* declared return type).
|
|
168
|
+
*
|
|
169
|
+
* On error (`is_error != 0`), `content` is a protobuf-encoded `InboundValue`
|
|
170
|
+
* representing the thrown value. The host bridge SDK wraps native exceptions
|
|
171
|
+
* in a synthetic `Instance` of class `baml.errors.HostCallable` carrying
|
|
172
|
+
* `message` / `class_name` / `language` / `traceback` fields; codegenned
|
|
173
|
+
* BAML errors flow through as their own `Instance` shape. The engine's
|
|
174
|
+
* `materialize_host_throw` runs the declared-throws contract check on the
|
|
175
|
+
* decoded value and either re-injects it as a catchable throw or escalates
|
|
176
|
+
* to a `HostContractViolation` panic.
|
|
177
|
+
*
|
|
178
|
+
* `call_id` is globally unique, so it resolves the originating runtime's
|
|
179
|
+
* pending call unambiguously. If `call_id` is unknown the call is silently
|
|
180
|
+
* dropped (likely a stale completion racing with a cancellation).
|
|
181
|
+
* @param {number} call_id
|
|
182
|
+
* @param {number} is_error
|
|
183
|
+
* @param {Uint8Array} content
|
|
184
|
+
*/
|
|
185
|
+
export function completeHostCall(call_id, is_error, content) {
|
|
186
|
+
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export2);
|
|
187
|
+
const len0 = WASM_VECTOR_LEN;
|
|
188
|
+
wasm.completeHostCall(call_id, is_error, ptr0, len0);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @param {number} call_id
|
|
193
|
+
* @param {number} is_error
|
|
194
|
+
* @param {Uint8Array} content
|
|
195
|
+
*/
|
|
196
|
+
export function completeWebHostCall(call_id, is_error, content) {
|
|
197
|
+
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export2);
|
|
198
|
+
const len0 = WASM_VECTOR_LEN;
|
|
199
|
+
wasm.completeWebHostCall(call_id, is_error, ptr0, len0);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Mint a key for a JS-owned opaque value from the same keyspace used by
|
|
204
|
+
* callable host values. Both kinds share one engine handle table.
|
|
205
|
+
* @returns {bigint}
|
|
206
|
+
*/
|
|
207
|
+
export function mintHostValueKey() {
|
|
208
|
+
const ret = wasm.mintHostValueKey();
|
|
209
|
+
return BigInt.asUintN(64, ret);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @returns {bigint}
|
|
214
|
+
*/
|
|
215
|
+
export function mintWebHostValueKey() {
|
|
216
|
+
const ret = wasm.mintWebHostValueKey();
|
|
217
|
+
return BigInt.asUintN(64, ret);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @returns {bigint}
|
|
222
|
+
*/
|
|
223
|
+
export function newFunctionCall() {
|
|
224
|
+
const ret = wasm.newFunctionCall();
|
|
225
|
+
return BigInt.asUintN(64, ret);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Register a JS callable in the WASM host-value table and return its key.
|
|
230
|
+
*
|
|
231
|
+
* Exposed to JS as `registerHostCallable(fn) -> bigint`. The key is then
|
|
232
|
+
* embedded in `InboundValue::Handle { key, handleType: HOST_VALUE_CALLABLE }`
|
|
233
|
+
* by the JS encoder. The returned value is a `BigInt` because `u64` does not
|
|
234
|
+
* fit into JS's safe-integer range.
|
|
235
|
+
* @param {Function} callable
|
|
236
|
+
* @returns {bigint}
|
|
237
|
+
*/
|
|
238
|
+
export function registerHostCallable(callable) {
|
|
239
|
+
const ret = wasm.registerHostCallable(addHeapObject(callable));
|
|
240
|
+
return BigInt.asUintN(64, ret);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Register the JS callback that releases opaque values from the SDK's local
|
|
245
|
+
* registry when the engine drops its last corresponding `HostValueArc`.
|
|
246
|
+
* @param {Function} callback
|
|
247
|
+
*/
|
|
248
|
+
export function registerHostValueReleaseCallback(callback) {
|
|
249
|
+
wasm.registerHostValueReleaseCallback(addHeapObject(callback));
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @param {Function} callable
|
|
254
|
+
* @returns {bigint}
|
|
255
|
+
*/
|
|
256
|
+
export function registerWebHostCallable(callable) {
|
|
257
|
+
const ret = wasm.registerWebHostCallable(addHeapObject(callable));
|
|
258
|
+
return BigInt.asUintN(64, ret);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @param {Function} callback
|
|
263
|
+
*/
|
|
264
|
+
export function registerWebHostValueReleaseCallback(callback) {
|
|
265
|
+
wasm.registerWebHostValueReleaseCallback(addHeapObject(callback));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Remove a callable that was registered but never transferred to the engine.
|
|
270
|
+
* @param {bigint} key
|
|
271
|
+
*/
|
|
272
|
+
export function releaseHostCallable(key) {
|
|
273
|
+
wasm.releaseHostCallable(key);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @param {bigint} key
|
|
278
|
+
*/
|
|
279
|
+
export function releaseWebHostCallable(key) {
|
|
280
|
+
wasm.releaseWebHostCallable(key);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @param {Uint8Array} bytecode
|
|
285
|
+
* @param {any} callbacks
|
|
286
|
+
*/
|
|
287
|
+
export function stageRuntimeBytecode(bytecode, callbacks) {
|
|
288
|
+
try {
|
|
289
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
290
|
+
const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_export2);
|
|
291
|
+
const len0 = WASM_VECTOR_LEN;
|
|
292
|
+
wasm.stageRuntimeBytecode(retptr, ptr0, len0, addBorrowedObject(callbacks));
|
|
293
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
294
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
295
|
+
if (r1) {
|
|
296
|
+
throw takeObject(r0);
|
|
297
|
+
}
|
|
298
|
+
} finally {
|
|
299
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
300
|
+
heap[stack_pointer++] = undefined;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
function __wbg_get_imports() {
|
|
304
|
+
const import0 = {
|
|
305
|
+
__proto__: null,
|
|
306
|
+
__wbg_BigInt_d576983233c6e0d1: function() { return handleError(function (arg0) {
|
|
307
|
+
const ret = BigInt(getObject(arg0));
|
|
308
|
+
return addHeapObject(ret);
|
|
309
|
+
}, arguments); },
|
|
310
|
+
__wbg_Error_ef53bc310eb298a0: function(arg0, arg1) {
|
|
311
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
312
|
+
return addHeapObject(ret);
|
|
313
|
+
},
|
|
314
|
+
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(arg0, arg1) {
|
|
315
|
+
const ret = debugString(getObject(arg1));
|
|
316
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
317
|
+
const len1 = WASM_VECTOR_LEN;
|
|
318
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
319
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
320
|
+
},
|
|
321
|
+
__wbg___wbindgen_is_bigint_6ffd6468a9bc44b9: function(arg0) {
|
|
322
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
323
|
+
return ret;
|
|
324
|
+
},
|
|
325
|
+
__wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
|
|
326
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
327
|
+
return ret;
|
|
328
|
+
},
|
|
329
|
+
__wbg___wbindgen_is_null_87c3bfe968c6a5ad: function(arg0) {
|
|
330
|
+
const ret = getObject(arg0) === null;
|
|
331
|
+
return ret;
|
|
332
|
+
},
|
|
333
|
+
__wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
|
|
334
|
+
const val = getObject(arg0);
|
|
335
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
336
|
+
return ret;
|
|
337
|
+
},
|
|
338
|
+
__wbg___wbindgen_is_string_c236cabd84a4d769: function(arg0) {
|
|
339
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
340
|
+
return ret;
|
|
341
|
+
},
|
|
342
|
+
__wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
|
|
343
|
+
const ret = getObject(arg0) === undefined;
|
|
344
|
+
return ret;
|
|
345
|
+
},
|
|
346
|
+
__wbg___wbindgen_number_get_9bb1761122181af2: function(arg0, arg1) {
|
|
347
|
+
const obj = getObject(arg1);
|
|
348
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
349
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
350
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
351
|
+
},
|
|
352
|
+
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) {
|
|
353
|
+
const obj = getObject(arg1);
|
|
354
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
355
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
356
|
+
var len1 = WASM_VECTOR_LEN;
|
|
357
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
358
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
359
|
+
},
|
|
360
|
+
__wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
|
|
361
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
362
|
+
},
|
|
363
|
+
__wbg__wbg_cb_unref_61db23ac97f16c31: function(arg0) {
|
|
364
|
+
getObject(arg0)._wbg_cb_unref();
|
|
365
|
+
},
|
|
366
|
+
__wbg_abort_2ec46222bf378517: function(arg0) {
|
|
367
|
+
getObject(arg0).abort();
|
|
368
|
+
},
|
|
369
|
+
__wbg_abort_b29d719932441c95: function(arg0, arg1) {
|
|
370
|
+
getObject(arg0).abort(getObject(arg1));
|
|
371
|
+
},
|
|
372
|
+
__wbg_append_e1746995edcb0170: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
373
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
374
|
+
}, arguments); },
|
|
375
|
+
__wbg_body_61a0827da5b6d2bc: function(arg0) {
|
|
376
|
+
const ret = getObject(arg0).body;
|
|
377
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
378
|
+
},
|
|
379
|
+
__wbg_buffer_d370c8cae5692933: function(arg0) {
|
|
380
|
+
const ret = getObject(arg0).buffer;
|
|
381
|
+
return addHeapObject(ret);
|
|
382
|
+
},
|
|
383
|
+
__wbg_byobRequest_2c89fb4ab478fa09: function(arg0) {
|
|
384
|
+
const ret = getObject(arg0).byobRequest;
|
|
385
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
386
|
+
},
|
|
387
|
+
__wbg_byteLength_2c6dc3b4b85d3547: function(arg0) {
|
|
388
|
+
const ret = getObject(arg0).byteLength;
|
|
389
|
+
return ret;
|
|
390
|
+
},
|
|
391
|
+
__wbg_byteOffset_349aa9bf0a183eca: function(arg0) {
|
|
392
|
+
const ret = getObject(arg0).byteOffset;
|
|
393
|
+
return ret;
|
|
394
|
+
},
|
|
395
|
+
__wbg_call_14a4382662630047: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
396
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4), getObject(arg5), getObject(arg6));
|
|
397
|
+
return addHeapObject(ret);
|
|
398
|
+
}, arguments); },
|
|
399
|
+
__wbg_call_40e4174f169eaca7: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
400
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
401
|
+
return addHeapObject(ret);
|
|
402
|
+
}, arguments); },
|
|
403
|
+
__wbg_call_6e37a87ff352da3d: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
404
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
|
|
405
|
+
return addHeapObject(ret);
|
|
406
|
+
}, arguments); },
|
|
407
|
+
__wbg_call_8a89609d89f6608a: function() { return handleError(function (arg0, arg1) {
|
|
408
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
409
|
+
return addHeapObject(ret);
|
|
410
|
+
}, arguments); },
|
|
411
|
+
__wbg_call_9c758de292015997: function() { return handleError(function (arg0, arg1, arg2) {
|
|
412
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
413
|
+
return addHeapObject(ret);
|
|
414
|
+
}, arguments); },
|
|
415
|
+
__wbg_cancel_3dedc1c2245a59d4: function(arg0) {
|
|
416
|
+
const ret = getObject(arg0).cancel();
|
|
417
|
+
return addHeapObject(ret);
|
|
418
|
+
},
|
|
419
|
+
__wbg_catch_17ae9c6dfb88ad8a: function(arg0, arg1) {
|
|
420
|
+
const ret = getObject(arg0).catch(getObject(arg1));
|
|
421
|
+
return addHeapObject(ret);
|
|
422
|
+
},
|
|
423
|
+
__wbg_clearTimeout_333bba87532ab9d3: function(arg0) {
|
|
424
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
425
|
+
return addHeapObject(ret);
|
|
426
|
+
},
|
|
427
|
+
__wbg_close_4859304bbf0f8208: function() { return handleError(function (arg0) {
|
|
428
|
+
getObject(arg0).close();
|
|
429
|
+
}, arguments); },
|
|
430
|
+
__wbg_close_6f12196fe155e8d2: function() { return handleError(function (arg0) {
|
|
431
|
+
getObject(arg0).close();
|
|
432
|
+
}, arguments); },
|
|
433
|
+
__wbg_construct_e0f002bb615dbba1: function() { return handleError(function (arg0, arg1) {
|
|
434
|
+
const ret = Reflect.construct(getObject(arg0), getObject(arg1));
|
|
435
|
+
return addHeapObject(ret);
|
|
436
|
+
}, arguments); },
|
|
437
|
+
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
438
|
+
const ret = getObject(arg0).crypto;
|
|
439
|
+
return addHeapObject(ret);
|
|
440
|
+
},
|
|
441
|
+
__wbg_done_60cf307fcc680536: function(arg0) {
|
|
442
|
+
const ret = getObject(arg0).done;
|
|
443
|
+
return ret;
|
|
444
|
+
},
|
|
445
|
+
__wbg_enqueue_09035479e2081625: function() { return handleError(function (arg0, arg1) {
|
|
446
|
+
getObject(arg0).enqueue(getObject(arg1));
|
|
447
|
+
}, arguments); },
|
|
448
|
+
__wbg_entries_18ec04521d5991e6: function(arg0) {
|
|
449
|
+
const ret = getObject(arg0).entries();
|
|
450
|
+
return addHeapObject(ret);
|
|
451
|
+
},
|
|
452
|
+
__wbg_env_4abd689850958904: function(arg0) {
|
|
453
|
+
const ret = getObject(arg0).env;
|
|
454
|
+
return addHeapObject(ret);
|
|
455
|
+
},
|
|
456
|
+
__wbg_exec_6d83602c99106c1b: function(arg0) {
|
|
457
|
+
const ret = getObject(arg0).exec;
|
|
458
|
+
return addHeapObject(ret);
|
|
459
|
+
},
|
|
460
|
+
__wbg_fetch_074561c3e313c86f: function(arg0) {
|
|
461
|
+
const ret = fetch(getObject(arg0));
|
|
462
|
+
return addHeapObject(ret);
|
|
463
|
+
},
|
|
464
|
+
__wbg_fetch_344c8d3849002659: function(arg0, arg1) {
|
|
465
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
466
|
+
return addHeapObject(ret);
|
|
467
|
+
},
|
|
468
|
+
__wbg_fetch_6b602715e8b82e62: function(arg0) {
|
|
469
|
+
const ret = getObject(arg0).fetch;
|
|
470
|
+
return addHeapObject(ret);
|
|
471
|
+
},
|
|
472
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
473
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
474
|
+
}, arguments); },
|
|
475
|
+
__wbg_getRandomValues_ef12552bf5acd2fe: function() { return handleError(function (arg0, arg1) {
|
|
476
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
477
|
+
}, arguments); },
|
|
478
|
+
__wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
|
|
479
|
+
const ret = getObject(arg0).getReader();
|
|
480
|
+
return addHeapObject(ret);
|
|
481
|
+
}, arguments); },
|
|
482
|
+
__wbg_get_2b48c7d0d006a781: function(arg0, arg1) {
|
|
483
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
484
|
+
return addHeapObject(ret);
|
|
485
|
+
},
|
|
486
|
+
__wbg_get_de6a0f7d4d18a304: function() { return handleError(function (arg0, arg1) {
|
|
487
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
488
|
+
return addHeapObject(ret);
|
|
489
|
+
}, arguments); },
|
|
490
|
+
__wbg_get_done_ea9eb315d4ec1e81: function(arg0) {
|
|
491
|
+
const ret = getObject(arg0).done;
|
|
492
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
493
|
+
},
|
|
494
|
+
__wbg_get_value_c68fe2e1a76c69ca: function(arg0) {
|
|
495
|
+
const ret = getObject(arg0).value;
|
|
496
|
+
return addHeapObject(ret);
|
|
497
|
+
},
|
|
498
|
+
__wbg_has_73740b27f436fed3: function() { return handleError(function (arg0, arg1) {
|
|
499
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
500
|
+
return ret;
|
|
501
|
+
}, arguments); },
|
|
502
|
+
__wbg_headers_0feb63d2d374b44a: function(arg0) {
|
|
503
|
+
const ret = getObject(arg0).headers;
|
|
504
|
+
return addHeapObject(ret);
|
|
505
|
+
},
|
|
506
|
+
__wbg_host_dispatch_1dac439e36ac80ac: function(arg0) {
|
|
507
|
+
const ret = getObject(arg0).host_dispatch;
|
|
508
|
+
return addHeapObject(ret);
|
|
509
|
+
},
|
|
510
|
+
__wbg_input_b99b0e4613244b4c: function(arg0) {
|
|
511
|
+
const ret = getObject(arg0).input;
|
|
512
|
+
return addHeapObject(ret);
|
|
513
|
+
},
|
|
514
|
+
__wbg_instanceof_ArrayBuffer_8f49811467741499: function(arg0) {
|
|
515
|
+
let result;
|
|
516
|
+
try {
|
|
517
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
518
|
+
} catch (_) {
|
|
519
|
+
result = false;
|
|
520
|
+
}
|
|
521
|
+
const ret = result;
|
|
522
|
+
return ret;
|
|
523
|
+
},
|
|
524
|
+
__wbg_instanceof_Error_94c8c9d9e410014a: function(arg0) {
|
|
525
|
+
let result;
|
|
526
|
+
try {
|
|
527
|
+
result = getObject(arg0) instanceof Error;
|
|
528
|
+
} catch (_) {
|
|
529
|
+
result = false;
|
|
530
|
+
}
|
|
531
|
+
const ret = result;
|
|
532
|
+
return ret;
|
|
533
|
+
},
|
|
534
|
+
__wbg_instanceof_Object_873c13f9f41aec78: function(arg0) {
|
|
535
|
+
let result;
|
|
536
|
+
try {
|
|
537
|
+
result = getObject(arg0) instanceof Object;
|
|
538
|
+
} catch (_) {
|
|
539
|
+
result = false;
|
|
540
|
+
}
|
|
541
|
+
const ret = result;
|
|
542
|
+
return ret;
|
|
543
|
+
},
|
|
544
|
+
__wbg_instanceof_Promise_d0db99486956c8e8: function(arg0) {
|
|
545
|
+
let result;
|
|
546
|
+
try {
|
|
547
|
+
result = getObject(arg0) instanceof Promise;
|
|
548
|
+
} catch (_) {
|
|
549
|
+
result = false;
|
|
550
|
+
}
|
|
551
|
+
const ret = result;
|
|
552
|
+
return ret;
|
|
553
|
+
},
|
|
554
|
+
__wbg_instanceof_Response_cb984bd66d7bd408: function(arg0) {
|
|
555
|
+
let result;
|
|
556
|
+
try {
|
|
557
|
+
result = getObject(arg0) instanceof Response;
|
|
558
|
+
} catch (_) {
|
|
559
|
+
result = false;
|
|
560
|
+
}
|
|
561
|
+
const ret = result;
|
|
562
|
+
return ret;
|
|
563
|
+
},
|
|
564
|
+
__wbg_instanceof_Uint8Array_86f30649f63ef9c2: function(arg0) {
|
|
565
|
+
let result;
|
|
566
|
+
try {
|
|
567
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
568
|
+
} catch (_) {
|
|
569
|
+
result = false;
|
|
570
|
+
}
|
|
571
|
+
const ret = result;
|
|
572
|
+
return ret;
|
|
573
|
+
},
|
|
574
|
+
__wbg_isArray_67c2c9c4313f4448: function(arg0) {
|
|
575
|
+
const ret = Array.isArray(getObject(arg0));
|
|
576
|
+
return ret;
|
|
577
|
+
},
|
|
578
|
+
__wbg_length_4a591ecaa01354d9: function(arg0) {
|
|
579
|
+
const ret = getObject(arg0).length;
|
|
580
|
+
return ret;
|
|
581
|
+
},
|
|
582
|
+
__wbg_lsp_send_notification_9a35310ef2027b11: function(arg0) {
|
|
583
|
+
const ret = getObject(arg0).lsp_send_notification;
|
|
584
|
+
return addHeapObject(ret);
|
|
585
|
+
},
|
|
586
|
+
__wbg_message_40300ed2d1f8bdc6: function(arg0) {
|
|
587
|
+
const ret = getObject(arg0).message;
|
|
588
|
+
return addHeapObject(ret);
|
|
589
|
+
},
|
|
590
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
591
|
+
const ret = getObject(arg0).msCrypto;
|
|
592
|
+
return addHeapObject(ret);
|
|
593
|
+
},
|
|
594
|
+
__wbg_new_0d09705104e164af: function() { return handleError(function () {
|
|
595
|
+
const ret = new AbortController();
|
|
596
|
+
return addHeapObject(ret);
|
|
597
|
+
}, arguments); },
|
|
598
|
+
__wbg_new_50bb5ebeecef71a8: function(arg0, arg1) {
|
|
599
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
600
|
+
return addHeapObject(ret);
|
|
601
|
+
},
|
|
602
|
+
__wbg_new_578aeef4b6b94378: function(arg0) {
|
|
603
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
604
|
+
return addHeapObject(ret);
|
|
605
|
+
},
|
|
606
|
+
__wbg_new_b682b81e8eaaf027: function(arg0, arg1) {
|
|
607
|
+
try {
|
|
608
|
+
var state0 = {a: arg0, b: arg1};
|
|
609
|
+
var cb0 = (arg0, arg1) => {
|
|
610
|
+
const a = state0.a;
|
|
611
|
+
state0.a = 0;
|
|
612
|
+
try {
|
|
613
|
+
return __wasm_bindgen_func_elem_37369(a, state0.b, arg0, arg1);
|
|
614
|
+
} finally {
|
|
615
|
+
state0.a = a;
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
const ret = new Promise(cb0);
|
|
619
|
+
return addHeapObject(ret);
|
|
620
|
+
} finally {
|
|
621
|
+
state0.a = 0;
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
__wbg_new_ce1ab61c1c2b300d: function() {
|
|
625
|
+
const ret = new Object();
|
|
626
|
+
return addHeapObject(ret);
|
|
627
|
+
},
|
|
628
|
+
__wbg_new_d90091b82fdf5b91: function() {
|
|
629
|
+
const ret = new Array();
|
|
630
|
+
return addHeapObject(ret);
|
|
631
|
+
},
|
|
632
|
+
__wbg_new_e436d06bc8e77460: function() { return handleError(function () {
|
|
633
|
+
const ret = new Headers();
|
|
634
|
+
return addHeapObject(ret);
|
|
635
|
+
}, arguments); },
|
|
636
|
+
__wbg_new_from_slice_18fa1f71286d66b8: function(arg0, arg1) {
|
|
637
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
638
|
+
return addHeapObject(ret);
|
|
639
|
+
},
|
|
640
|
+
__wbg_new_typed_bf31d18f92484486: function(arg0, arg1) {
|
|
641
|
+
try {
|
|
642
|
+
var state0 = {a: arg0, b: arg1};
|
|
643
|
+
var cb0 = (arg0, arg1) => {
|
|
644
|
+
const a = state0.a;
|
|
645
|
+
state0.a = 0;
|
|
646
|
+
try {
|
|
647
|
+
return __wasm_bindgen_func_elem_37369(a, state0.b, arg0, arg1);
|
|
648
|
+
} finally {
|
|
649
|
+
state0.a = a;
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
const ret = new Promise(cb0);
|
|
653
|
+
return addHeapObject(ret);
|
|
654
|
+
} finally {
|
|
655
|
+
state0.a = 0;
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
__wbg_new_with_byte_offset_and_length_d836f26d916dd9ad: function(arg0, arg1, arg2) {
|
|
659
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
660
|
+
return addHeapObject(ret);
|
|
661
|
+
},
|
|
662
|
+
__wbg_new_with_length_36a4998e27b014c5: function(arg0) {
|
|
663
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
664
|
+
return addHeapObject(ret);
|
|
665
|
+
},
|
|
666
|
+
__wbg_new_with_str_and_init_bcd02b79a793d27f: function() { return handleError(function (arg0, arg1, arg2) {
|
|
667
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
668
|
+
return addHeapObject(ret);
|
|
669
|
+
}, arguments); },
|
|
670
|
+
__wbg_next_eb8ca7351fa27906: function() { return handleError(function (arg0) {
|
|
671
|
+
const ret = getObject(arg0).next();
|
|
672
|
+
return addHeapObject(ret);
|
|
673
|
+
}, arguments); },
|
|
674
|
+
__wbg_node_84ea875411254db1: function(arg0) {
|
|
675
|
+
const ret = getObject(arg0).node;
|
|
676
|
+
return addHeapObject(ret);
|
|
677
|
+
},
|
|
678
|
+
__wbg_now_190933fa139cc119: function() {
|
|
679
|
+
const ret = Date.now();
|
|
680
|
+
return ret;
|
|
681
|
+
},
|
|
682
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
683
|
+
const ret = getObject(arg0).now();
|
|
684
|
+
return ret;
|
|
685
|
+
},
|
|
686
|
+
__wbg_of_f34f1ce50f299ee9: function(arg0, arg1) {
|
|
687
|
+
const ret = Array.of(getObject(arg0), getObject(arg1));
|
|
688
|
+
return addHeapObject(ret);
|
|
689
|
+
},
|
|
690
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
691
|
+
const ret = getObject(arg0).performance;
|
|
692
|
+
return addHeapObject(ret);
|
|
693
|
+
},
|
|
694
|
+
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
695
|
+
const ret = getObject(arg0).process;
|
|
696
|
+
return addHeapObject(ret);
|
|
697
|
+
},
|
|
698
|
+
__wbg_prototypesetcall_3249fc62a0fafa30: function(arg0, arg1, arg2) {
|
|
699
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
700
|
+
},
|
|
701
|
+
__wbg_push_a6822215aa43e71c: function(arg0, arg1) {
|
|
702
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
703
|
+
return ret;
|
|
704
|
+
},
|
|
705
|
+
__wbg_queueMicrotask_35c611f4a14830b2: function(arg0) {
|
|
706
|
+
queueMicrotask(getObject(arg0));
|
|
707
|
+
},
|
|
708
|
+
__wbg_queueMicrotask_404ed0a58e0b63cc: function(arg0) {
|
|
709
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
710
|
+
return addHeapObject(ret);
|
|
711
|
+
},
|
|
712
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
713
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
714
|
+
}, arguments); },
|
|
715
|
+
__wbg_read_282e152a24fd0856: function(arg0) {
|
|
716
|
+
const ret = getObject(arg0).read();
|
|
717
|
+
return addHeapObject(ret);
|
|
718
|
+
},
|
|
719
|
+
__wbg_releaseLock_cd76770b7f82a961: function(arg0) {
|
|
720
|
+
getObject(arg0).releaseLock();
|
|
721
|
+
},
|
|
722
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
723
|
+
const ret = module.require;
|
|
724
|
+
return addHeapObject(ret);
|
|
725
|
+
}, arguments); },
|
|
726
|
+
__wbg_resolve_25a7e548d5881dca: function(arg0) {
|
|
727
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
728
|
+
return addHeapObject(ret);
|
|
729
|
+
},
|
|
730
|
+
__wbg_respond_33b6f330b6d299fd: function() { return handleError(function (arg0, arg1) {
|
|
731
|
+
getObject(arg0).respond(arg1 >>> 0);
|
|
732
|
+
}, arguments); },
|
|
733
|
+
__wbg_setTimeout_3a808dd861dd3c12: function(arg0, arg1) {
|
|
734
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
735
|
+
return addHeapObject(ret);
|
|
736
|
+
},
|
|
737
|
+
__wbg_setTimeout_735435c9cbfa5e6d: function(arg0, arg1) {
|
|
738
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
739
|
+
return ret;
|
|
740
|
+
},
|
|
741
|
+
__wbg_set_29c99a8aac1c01e5: function(arg0, arg1, arg2) {
|
|
742
|
+
getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
|
|
743
|
+
},
|
|
744
|
+
__wbg_set_6e30c9374c26414c: function() { return handleError(function (arg0, arg1, arg2) {
|
|
745
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
746
|
+
return ret;
|
|
747
|
+
}, arguments); },
|
|
748
|
+
__wbg_set_body_36614c7e61546809: function(arg0, arg1) {
|
|
749
|
+
getObject(arg0).body = getObject(arg1);
|
|
750
|
+
},
|
|
751
|
+
__wbg_set_cache_488ea16c11cbf20d: function(arg0, arg1) {
|
|
752
|
+
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
753
|
+
},
|
|
754
|
+
__wbg_set_credentials_fa9c491a27c4bdf0: function(arg0, arg1) {
|
|
755
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
756
|
+
},
|
|
757
|
+
__wbg_set_headers_7c1e39ece7826bec: function(arg0, arg1) {
|
|
758
|
+
getObject(arg0).headers = getObject(arg1);
|
|
759
|
+
},
|
|
760
|
+
__wbg_set_method_7a6811dec7a4feff: function(arg0, arg1, arg2) {
|
|
761
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
762
|
+
},
|
|
763
|
+
__wbg_set_mode_c90e3667002857d4: function(arg0, arg1) {
|
|
764
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
765
|
+
},
|
|
766
|
+
__wbg_set_signal_d9da62b3f215c821: function(arg0, arg1) {
|
|
767
|
+
getObject(arg0).signal = getObject(arg1);
|
|
768
|
+
},
|
|
769
|
+
__wbg_shell_a8bf1e7b0ef07171: function(arg0) {
|
|
770
|
+
const ret = getObject(arg0).shell;
|
|
771
|
+
return addHeapObject(ret);
|
|
772
|
+
},
|
|
773
|
+
__wbg_signal_e03304a84df9ed09: function(arg0) {
|
|
774
|
+
const ret = getObject(arg0).signal;
|
|
775
|
+
return addHeapObject(ret);
|
|
776
|
+
},
|
|
777
|
+
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
778
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
779
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
780
|
+
},
|
|
781
|
+
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
782
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
783
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
784
|
+
},
|
|
785
|
+
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
786
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
787
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
788
|
+
},
|
|
789
|
+
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
790
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
791
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
792
|
+
},
|
|
793
|
+
__wbg_status_00549d55b78d949e: function(arg0) {
|
|
794
|
+
const ret = getObject(arg0).status;
|
|
795
|
+
return ret;
|
|
796
|
+
},
|
|
797
|
+
__wbg_stringify_8286df6dcc591521: function() { return handleError(function (arg0) {
|
|
798
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
799
|
+
return addHeapObject(ret);
|
|
800
|
+
}, arguments); },
|
|
801
|
+
__wbg_subarray_4aa221f6a4f5ab22: function(arg0, arg1, arg2) {
|
|
802
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
803
|
+
return addHeapObject(ret);
|
|
804
|
+
},
|
|
805
|
+
__wbg_text_a17febec76d36501: function() { return handleError(function (arg0) {
|
|
806
|
+
const ret = getObject(arg0).text();
|
|
807
|
+
return addHeapObject(ret);
|
|
808
|
+
}, arguments); },
|
|
809
|
+
__wbg_then_18f476d590e58992: function(arg0, arg1, arg2) {
|
|
810
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
811
|
+
return addHeapObject(ret);
|
|
812
|
+
},
|
|
813
|
+
__wbg_then_ac7b025999b52837: function(arg0, arg1) {
|
|
814
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
815
|
+
return addHeapObject(ret);
|
|
816
|
+
},
|
|
817
|
+
__wbg_toString_94ab8ae06f7372cf: function() { return handleError(function (arg0, arg1) {
|
|
818
|
+
const ret = getObject(arg0).toString(arg1);
|
|
819
|
+
return addHeapObject(ret);
|
|
820
|
+
}, arguments); },
|
|
821
|
+
__wbg_url_6808f1c468f2d0cd: function(arg0, arg1) {
|
|
822
|
+
const ret = getObject(arg1).url;
|
|
823
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
824
|
+
const len1 = WASM_VECTOR_LEN;
|
|
825
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
826
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
827
|
+
},
|
|
828
|
+
__wbg_value_f3625092ee4b37f4: function(arg0) {
|
|
829
|
+
const ret = getObject(arg0).value;
|
|
830
|
+
return addHeapObject(ret);
|
|
831
|
+
},
|
|
832
|
+
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
833
|
+
const ret = getObject(arg0).versions;
|
|
834
|
+
return addHeapObject(ret);
|
|
835
|
+
},
|
|
836
|
+
__wbg_view_d523e3b92648b62c: function(arg0) {
|
|
837
|
+
const ret = getObject(arg0).view;
|
|
838
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
839
|
+
},
|
|
840
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
841
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 231, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
842
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1351);
|
|
843
|
+
return addHeapObject(ret);
|
|
844
|
+
},
|
|
845
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
846
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6592, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
847
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_37361);
|
|
848
|
+
return addHeapObject(ret);
|
|
849
|
+
},
|
|
850
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
851
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 193, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
852
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1130);
|
|
853
|
+
return addHeapObject(ret);
|
|
854
|
+
},
|
|
855
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
856
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
857
|
+
const ret = arg0;
|
|
858
|
+
return addHeapObject(ret);
|
|
859
|
+
},
|
|
860
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
861
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
862
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
863
|
+
return addHeapObject(ret);
|
|
864
|
+
},
|
|
865
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
866
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
867
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
868
|
+
return addHeapObject(ret);
|
|
869
|
+
},
|
|
870
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
871
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
872
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
873
|
+
return addHeapObject(ret);
|
|
874
|
+
},
|
|
875
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
876
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
877
|
+
wasm.__wbindgen_export5(arg0, arg1 * 1, 1);
|
|
878
|
+
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
879
|
+
const ret = v0;
|
|
880
|
+
return addHeapObject(ret);
|
|
881
|
+
},
|
|
882
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
883
|
+
const ret = getObject(arg0);
|
|
884
|
+
return addHeapObject(ret);
|
|
885
|
+
},
|
|
886
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
887
|
+
takeObject(arg0);
|
|
888
|
+
},
|
|
889
|
+
};
|
|
890
|
+
return {
|
|
891
|
+
__proto__: null,
|
|
892
|
+
"./bridge_web_core_bg.js": import0,
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
function __wasm_bindgen_func_elem_1130(arg0, arg1) {
|
|
897
|
+
wasm.__wasm_bindgen_func_elem_1130(arg0, arg1);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
function __wasm_bindgen_func_elem_1351(arg0, arg1, arg2) {
|
|
901
|
+
wasm.__wasm_bindgen_func_elem_1351(arg0, arg1, addHeapObject(arg2));
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
function __wasm_bindgen_func_elem_37361(arg0, arg1, arg2) {
|
|
905
|
+
try {
|
|
906
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
907
|
+
wasm.__wasm_bindgen_func_elem_37361(retptr, arg0, arg1, addHeapObject(arg2));
|
|
908
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
909
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
910
|
+
if (r1) {
|
|
911
|
+
throw takeObject(r0);
|
|
912
|
+
}
|
|
913
|
+
} finally {
|
|
914
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
function __wasm_bindgen_func_elem_37369(arg0, arg1, arg2, arg3) {
|
|
919
|
+
wasm.__wasm_bindgen_func_elem_37369(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
933
|
+
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
934
|
+
? { register: () => {}, unregister: () => {} }
|
|
935
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
|
|
936
|
+
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
937
|
+
? { register: () => {}, unregister: () => {} }
|
|
938
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
|
|
939
|
+
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
940
|
+
? { register: () => {}, unregister: () => {} }
|
|
941
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
|
|
942
|
+
|
|
943
|
+
function addHeapObject(obj) {
|
|
944
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
945
|
+
const idx = heap_next;
|
|
946
|
+
heap_next = heap[idx];
|
|
947
|
+
|
|
948
|
+
heap[idx] = obj;
|
|
949
|
+
return idx;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
function addBorrowedObject(obj) {
|
|
953
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
954
|
+
heap[--stack_pointer] = obj;
|
|
955
|
+
return stack_pointer;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
959
|
+
? { register: () => {}, unregister: () => {} }
|
|
960
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_export4(state.a, state.b));
|
|
961
|
+
|
|
962
|
+
function debugString(val) {
|
|
963
|
+
// primitive types
|
|
964
|
+
const type = typeof val;
|
|
965
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
966
|
+
return `${val}`;
|
|
967
|
+
}
|
|
968
|
+
if (type == 'string') {
|
|
969
|
+
return `"${val}"`;
|
|
970
|
+
}
|
|
971
|
+
if (type == 'symbol') {
|
|
972
|
+
const description = val.description;
|
|
973
|
+
if (description == null) {
|
|
974
|
+
return 'Symbol';
|
|
975
|
+
} else {
|
|
976
|
+
return `Symbol(${description})`;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
if (type == 'function') {
|
|
980
|
+
const name = val.name;
|
|
981
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
982
|
+
return `Function(${name})`;
|
|
983
|
+
} else {
|
|
984
|
+
return 'Function';
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
// objects
|
|
988
|
+
if (Array.isArray(val)) {
|
|
989
|
+
const length = val.length;
|
|
990
|
+
let debug = '[';
|
|
991
|
+
if (length > 0) {
|
|
992
|
+
debug += debugString(val[0]);
|
|
993
|
+
}
|
|
994
|
+
for(let i = 1; i < length; i++) {
|
|
995
|
+
debug += ', ' + debugString(val[i]);
|
|
996
|
+
}
|
|
997
|
+
debug += ']';
|
|
998
|
+
return debug;
|
|
999
|
+
}
|
|
1000
|
+
// Test for built-in
|
|
1001
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1002
|
+
let className;
|
|
1003
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1004
|
+
className = builtInMatches[1];
|
|
1005
|
+
} else {
|
|
1006
|
+
// Failed to match the standard '[object ClassName]'
|
|
1007
|
+
return toString.call(val);
|
|
1008
|
+
}
|
|
1009
|
+
if (className == 'Object') {
|
|
1010
|
+
// we're a user defined class or Object
|
|
1011
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1012
|
+
// easier than looping through ownProperties of `val`.
|
|
1013
|
+
try {
|
|
1014
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1015
|
+
} catch (_) {
|
|
1016
|
+
return 'Object';
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
// errors
|
|
1020
|
+
if (val instanceof Error) {
|
|
1021
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1022
|
+
}
|
|
1023
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1024
|
+
return className;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
function dropObject(idx) {
|
|
1028
|
+
if (idx < 1028) return;
|
|
1029
|
+
heap[idx] = heap_next;
|
|
1030
|
+
heap_next = idx;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1034
|
+
ptr = ptr >>> 0;
|
|
1035
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
let cachedDataViewMemory0 = null;
|
|
1039
|
+
function getDataViewMemory0() {
|
|
1040
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1041
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1042
|
+
}
|
|
1043
|
+
return cachedDataViewMemory0;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
function getStringFromWasm0(ptr, len) {
|
|
1047
|
+
return decodeText(ptr >>> 0, len);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1051
|
+
function getUint8ArrayMemory0() {
|
|
1052
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1053
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1054
|
+
}
|
|
1055
|
+
return cachedUint8ArrayMemory0;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
function getObject(idx) { return heap[idx]; }
|
|
1059
|
+
|
|
1060
|
+
function handleError(f, args) {
|
|
1061
|
+
try {
|
|
1062
|
+
return f.apply(this, args);
|
|
1063
|
+
} catch (e) {
|
|
1064
|
+
wasm.__wbindgen_export(addHeapObject(e));
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
let heap = new Array(1024).fill(undefined);
|
|
1069
|
+
heap.push(undefined, null, true, false);
|
|
1070
|
+
|
|
1071
|
+
let heap_next = heap.length;
|
|
1072
|
+
|
|
1073
|
+
function isLikeNone(x) {
|
|
1074
|
+
return x === undefined || x === null;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
1078
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1079
|
+
const real = (...args) => {
|
|
1080
|
+
|
|
1081
|
+
// First up with a closure we increment the internal reference
|
|
1082
|
+
// count. This ensures that the Rust closure environment won't
|
|
1083
|
+
// be deallocated while we're invoking it.
|
|
1084
|
+
state.cnt++;
|
|
1085
|
+
const a = state.a;
|
|
1086
|
+
state.a = 0;
|
|
1087
|
+
try {
|
|
1088
|
+
return f(a, state.b, ...args);
|
|
1089
|
+
} finally {
|
|
1090
|
+
state.a = a;
|
|
1091
|
+
real._wbg_cb_unref();
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
real._wbg_cb_unref = () => {
|
|
1095
|
+
if (--state.cnt === 0) {
|
|
1096
|
+
wasm.__wbindgen_export4(state.a, state.b);
|
|
1097
|
+
state.a = 0;
|
|
1098
|
+
CLOSURE_DTORS.unregister(state);
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1102
|
+
return real;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1106
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1107
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1108
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1109
|
+
return ptr;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1113
|
+
if (realloc === undefined) {
|
|
1114
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1115
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1116
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1117
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1118
|
+
return ptr;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
let len = arg.length;
|
|
1122
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1123
|
+
|
|
1124
|
+
const mem = getUint8ArrayMemory0();
|
|
1125
|
+
|
|
1126
|
+
let offset = 0;
|
|
1127
|
+
|
|
1128
|
+
for (; offset < len; offset++) {
|
|
1129
|
+
const code = arg.charCodeAt(offset);
|
|
1130
|
+
if (code > 0x7F) break;
|
|
1131
|
+
mem[ptr + offset] = code;
|
|
1132
|
+
}
|
|
1133
|
+
if (offset !== len) {
|
|
1134
|
+
if (offset !== 0) {
|
|
1135
|
+
arg = arg.slice(offset);
|
|
1136
|
+
}
|
|
1137
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1138
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1139
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1140
|
+
|
|
1141
|
+
offset += ret.written;
|
|
1142
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
WASM_VECTOR_LEN = offset;
|
|
1146
|
+
return ptr;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
let stack_pointer = 1024;
|
|
1150
|
+
|
|
1151
|
+
function takeObject(idx) {
|
|
1152
|
+
const ret = getObject(idx);
|
|
1153
|
+
dropObject(idx);
|
|
1154
|
+
return ret;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1158
|
+
cachedTextDecoder.decode();
|
|
1159
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1160
|
+
let numBytesDecoded = 0;
|
|
1161
|
+
function decodeText(ptr, len) {
|
|
1162
|
+
numBytesDecoded += len;
|
|
1163
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1164
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1165
|
+
cachedTextDecoder.decode();
|
|
1166
|
+
numBytesDecoded = len;
|
|
1167
|
+
}
|
|
1168
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1172
|
+
|
|
1173
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1174
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1175
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1176
|
+
view.set(buf);
|
|
1177
|
+
return {
|
|
1178
|
+
read: arg.length,
|
|
1179
|
+
written: buf.length
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
let WASM_VECTOR_LEN = 0;
|
|
1185
|
+
|
|
1186
|
+
let wasmModule, wasmInstance, wasm;
|
|
1187
|
+
function __wbg_finalize_init(instance, module) {
|
|
1188
|
+
wasmInstance = instance;
|
|
1189
|
+
wasm = instance.exports;
|
|
1190
|
+
wasmModule = module;
|
|
1191
|
+
cachedDataViewMemory0 = null;
|
|
1192
|
+
cachedUint8ArrayMemory0 = null;
|
|
1193
|
+
return wasm;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
async function __wbg_load(module, imports) {
|
|
1197
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1198
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1199
|
+
try {
|
|
1200
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1201
|
+
} catch (e) {
|
|
1202
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1203
|
+
|
|
1204
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1205
|
+
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);
|
|
1206
|
+
|
|
1207
|
+
} else { throw e; }
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
const bytes = await module.arrayBuffer();
|
|
1212
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1213
|
+
} else {
|
|
1214
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1215
|
+
|
|
1216
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1217
|
+
return { instance, module };
|
|
1218
|
+
} else {
|
|
1219
|
+
return instance;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
function expectedResponseType(type) {
|
|
1224
|
+
switch (type) {
|
|
1225
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1226
|
+
}
|
|
1227
|
+
return false;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
function initSync(module) {
|
|
1232
|
+
if (wasm !== undefined) return wasm;
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
if (module !== undefined) {
|
|
1236
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1237
|
+
({module} = module)
|
|
1238
|
+
} else {
|
|
1239
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
const imports = __wbg_get_imports();
|
|
1244
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1245
|
+
module = new WebAssembly.Module(module);
|
|
1246
|
+
}
|
|
1247
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1248
|
+
return __wbg_finalize_init(instance, module);
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
async function __wbg_init(module_or_path) {
|
|
1252
|
+
if (wasm !== undefined) return wasm;
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
if (module_or_path !== undefined) {
|
|
1256
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1257
|
+
({module_or_path} = module_or_path)
|
|
1258
|
+
} else {
|
|
1259
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
if (module_or_path === undefined) {
|
|
1264
|
+
module_or_path = new URL('bridge_web_core_bg.wasm', import.meta.url);
|
|
1265
|
+
}
|
|
1266
|
+
const imports = __wbg_get_imports();
|
|
1267
|
+
|
|
1268
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1269
|
+
module_or_path = fetch(module_or_path);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1273
|
+
|
|
1274
|
+
return __wbg_finalize_init(instance, module);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
export { initSync, __wbg_init as default };
|