@restatedev/restate-sdk-cloudflare-workers 1.14.5 → 1.15.0-rc.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/common_api.d.cts +1 -1
- package/dist/common_api.d.cts.map +1 -1
- package/dist/common_api.d.ts +1 -1
- package/dist/common_api.d.ts.map +1 -1
- package/dist/common_api.js.map +1 -1
- package/dist/context.cjs +4 -4
- package/dist/context.d.cts +73 -8
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +73 -8
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +4 -4
- package/dist/context.js.map +1 -1
- package/dist/context_impl.cjs +50 -47
- package/dist/context_impl.js +50 -47
- package/dist/context_impl.js.map +1 -1
- package/dist/endpoint/endpoint.cjs +1 -1
- package/dist/endpoint/endpoint.js +1 -1
- package/dist/endpoint/endpoint.js.map +1 -1
- package/dist/endpoint/handlers/generic.cjs +1 -2
- package/dist/endpoint/handlers/generic.js +1 -2
- package/dist/endpoint/handlers/generic.js.map +1 -1
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.d.ts +133 -111
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.js +815 -915
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm +0 -0
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm.d.ts +3 -3
- package/dist/fetch.d.cts +2 -2
- package/dist/fetch.d.ts +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/internal.d.cts +2 -89
- package/dist/internal.d.cts.map +1 -1
- package/dist/internal.d.ts +2 -89
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/lambda.d.cts +2 -2
- package/dist/lambda.d.ts +2 -2
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/dist/promises.cjs +23 -19
- package/dist/promises.d.cts.map +1 -1
- package/dist/promises.d.ts.map +1 -1
- package/dist/promises.js +23 -19
- package/dist/promises.js.map +1 -1
- package/package.json +3 -3
- package/dist/utils/completable_promise.cjs +0 -22
- package/dist/utils/completable_promise.js +0 -22
- package/dist/utils/completable_promise.js.map +0 -1
|
@@ -1,258 +1,6 @@
|
|
|
1
1
|
import { vm_log } from '../core_logging.js';
|
|
2
2
|
|
|
3
|
-
let wasm;
|
|
4
|
-
export function __wbg_set_wasm(val) {
|
|
5
|
-
wasm = val;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let WASM_VECTOR_LEN = 0;
|
|
10
|
-
|
|
11
|
-
let cachedUint8ArrayMemory0 = null;
|
|
12
|
-
|
|
13
|
-
function getUint8ArrayMemory0() {
|
|
14
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
15
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
16
|
-
}
|
|
17
|
-
return cachedUint8ArrayMemory0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
21
|
-
|
|
22
|
-
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
23
|
-
|
|
24
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
25
|
-
? function (arg, view) {
|
|
26
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
27
|
-
}
|
|
28
|
-
: function (arg, view) {
|
|
29
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
30
|
-
view.set(buf);
|
|
31
|
-
return {
|
|
32
|
-
read: arg.length,
|
|
33
|
-
written: buf.length
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
38
|
-
|
|
39
|
-
if (realloc === undefined) {
|
|
40
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
41
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
42
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
43
|
-
WASM_VECTOR_LEN = buf.length;
|
|
44
|
-
return ptr;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
let len = arg.length;
|
|
48
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
49
|
-
|
|
50
|
-
const mem = getUint8ArrayMemory0();
|
|
51
|
-
|
|
52
|
-
let offset = 0;
|
|
53
|
-
|
|
54
|
-
for (; offset < len; offset++) {
|
|
55
|
-
const code = arg.charCodeAt(offset);
|
|
56
|
-
if (code > 0x7F) break;
|
|
57
|
-
mem[ptr + offset] = code;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (offset !== len) {
|
|
61
|
-
if (offset !== 0) {
|
|
62
|
-
arg = arg.slice(offset);
|
|
63
|
-
}
|
|
64
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
65
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
66
|
-
const ret = encodeString(arg, view);
|
|
67
|
-
|
|
68
|
-
offset += ret.written;
|
|
69
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
WASM_VECTOR_LEN = offset;
|
|
73
|
-
return ptr;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
let cachedDataViewMemory0 = null;
|
|
77
|
-
|
|
78
|
-
function getDataViewMemory0() {
|
|
79
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
80
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
81
|
-
}
|
|
82
|
-
return cachedDataViewMemory0;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function addToExternrefTable0(obj) {
|
|
86
|
-
const idx = wasm.__externref_table_alloc();
|
|
87
|
-
wasm.__wbindgen_export_4.set(idx, obj);
|
|
88
|
-
return idx;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function handleError(f, args) {
|
|
92
|
-
try {
|
|
93
|
-
return f.apply(this, args);
|
|
94
|
-
} catch (e) {
|
|
95
|
-
const idx = addToExternrefTable0(e);
|
|
96
|
-
wasm.__wbindgen_exn_store(idx);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
101
|
-
|
|
102
|
-
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
103
|
-
|
|
104
|
-
cachedTextDecoder.decode();
|
|
105
|
-
|
|
106
|
-
function getStringFromWasm0(ptr, len) {
|
|
107
|
-
ptr = ptr >>> 0;
|
|
108
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function isLikeNone(x) {
|
|
112
|
-
return x === undefined || x === null;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
116
|
-
ptr = ptr >>> 0;
|
|
117
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function debugString(val) {
|
|
121
|
-
// primitive types
|
|
122
|
-
const type = typeof val;
|
|
123
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
124
|
-
return `${val}`;
|
|
125
|
-
}
|
|
126
|
-
if (type == 'string') {
|
|
127
|
-
return `"${val}"`;
|
|
128
|
-
}
|
|
129
|
-
if (type == 'symbol') {
|
|
130
|
-
const description = val.description;
|
|
131
|
-
if (description == null) {
|
|
132
|
-
return 'Symbol';
|
|
133
|
-
} else {
|
|
134
|
-
return `Symbol(${description})`;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (type == 'function') {
|
|
138
|
-
const name = val.name;
|
|
139
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
140
|
-
return `Function(${name})`;
|
|
141
|
-
} else {
|
|
142
|
-
return 'Function';
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
// objects
|
|
146
|
-
if (Array.isArray(val)) {
|
|
147
|
-
const length = val.length;
|
|
148
|
-
let debug = '[';
|
|
149
|
-
if (length > 0) {
|
|
150
|
-
debug += debugString(val[0]);
|
|
151
|
-
}
|
|
152
|
-
for(let i = 1; i < length; i++) {
|
|
153
|
-
debug += ', ' + debugString(val[i]);
|
|
154
|
-
}
|
|
155
|
-
debug += ']';
|
|
156
|
-
return debug;
|
|
157
|
-
}
|
|
158
|
-
// Test for built-in
|
|
159
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
160
|
-
let className;
|
|
161
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
162
|
-
className = builtInMatches[1];
|
|
163
|
-
} else {
|
|
164
|
-
// Failed to match the standard '[object ClassName]'
|
|
165
|
-
return toString.call(val);
|
|
166
|
-
}
|
|
167
|
-
if (className == 'Object') {
|
|
168
|
-
// we're a user defined class or Object
|
|
169
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
170
|
-
// easier than looping through ownProperties of `val`.
|
|
171
|
-
try {
|
|
172
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
173
|
-
} catch (_) {
|
|
174
|
-
return 'Object';
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
// errors
|
|
178
|
-
if (val instanceof Error) {
|
|
179
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
180
|
-
}
|
|
181
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
182
|
-
return className;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* @returns {number}
|
|
186
|
-
*/
|
|
187
|
-
export function cancel_handle() {
|
|
188
|
-
const ret = wasm.cancel_handle();
|
|
189
|
-
return ret >>> 0;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* This will set the log level of the overall log subscriber.
|
|
194
|
-
* @param {LogLevel} level
|
|
195
|
-
*/
|
|
196
|
-
export function set_log_level(level) {
|
|
197
|
-
wasm.set_log_level(level);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Setups the WASM module
|
|
202
|
-
*/
|
|
203
|
-
export function start() {
|
|
204
|
-
wasm.start();
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
208
|
-
ptr = ptr >>> 0;
|
|
209
|
-
const mem = getDataViewMemory0();
|
|
210
|
-
const result = [];
|
|
211
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
212
|
-
result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
|
|
213
|
-
}
|
|
214
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
215
|
-
return result;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
219
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
220
|
-
for (let i = 0; i < array.length; i++) {
|
|
221
|
-
const add = addToExternrefTable0(array[i]);
|
|
222
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
223
|
-
}
|
|
224
|
-
WASM_VECTOR_LEN = array.length;
|
|
225
|
-
return ptr;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
function takeFromExternrefTable0(idx) {
|
|
229
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
230
|
-
wasm.__externref_table_dealloc(idx);
|
|
231
|
-
return value;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
let cachedUint32ArrayMemory0 = null;
|
|
235
|
-
|
|
236
|
-
function getUint32ArrayMemory0() {
|
|
237
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
238
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
239
|
-
}
|
|
240
|
-
return cachedUint32ArrayMemory0;
|
|
241
|
-
}
|
|
242
3
|
|
|
243
|
-
function passArray32ToWasm0(arg, malloc) {
|
|
244
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
245
|
-
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
246
|
-
WASM_VECTOR_LEN = arg.length;
|
|
247
|
-
return ptr;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
251
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
252
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
253
|
-
WASM_VECTOR_LEN = arg.length;
|
|
254
|
-
return ptr;
|
|
255
|
-
}
|
|
256
4
|
/**
|
|
257
5
|
* @enum {0 | 1 | 2 | 3 | 4}
|
|
258
6
|
*/
|
|
@@ -263,6 +11,7 @@ export const LogLevel = Object.freeze({
|
|
|
263
11
|
WARN: 3, "3": "WARN",
|
|
264
12
|
ERROR: 4, "4": "ERROR",
|
|
265
13
|
});
|
|
14
|
+
|
|
266
15
|
/**
|
|
267
16
|
* @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18}
|
|
268
17
|
*/
|
|
@@ -288,52 +37,29 @@ export const WasmCommandType = Object.freeze({
|
|
|
288
37
|
CancelInvocation: 18, "18": "CancelInvocation",
|
|
289
38
|
});
|
|
290
39
|
|
|
291
|
-
const WasmHeaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
292
|
-
? { register: () => {}, unregister: () => {} }
|
|
293
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmheader_free(ptr >>> 0, 1));
|
|
294
|
-
|
|
295
40
|
export class WasmHeader {
|
|
296
|
-
|
|
297
41
|
static __wrap(ptr) {
|
|
298
|
-
ptr = ptr >>> 0;
|
|
299
42
|
const obj = Object.create(WasmHeader.prototype);
|
|
300
43
|
obj.__wbg_ptr = ptr;
|
|
301
44
|
WasmHeaderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
302
45
|
return obj;
|
|
303
46
|
}
|
|
304
|
-
|
|
305
47
|
static __unwrap(jsValue) {
|
|
306
48
|
if (!(jsValue instanceof WasmHeader)) {
|
|
307
49
|
return 0;
|
|
308
50
|
}
|
|
309
51
|
return jsValue.__destroy_into_raw();
|
|
310
52
|
}
|
|
311
|
-
|
|
312
53
|
__destroy_into_raw() {
|
|
313
54
|
const ptr = this.__wbg_ptr;
|
|
314
55
|
this.__wbg_ptr = 0;
|
|
315
56
|
WasmHeaderFinalization.unregister(this);
|
|
316
57
|
return ptr;
|
|
317
58
|
}
|
|
318
|
-
|
|
319
59
|
free() {
|
|
320
60
|
const ptr = this.__destroy_into_raw();
|
|
321
61
|
wasm.__wbg_wasmheader_free(ptr, 0);
|
|
322
62
|
}
|
|
323
|
-
/**
|
|
324
|
-
* @param {string} key
|
|
325
|
-
* @param {string} value
|
|
326
|
-
*/
|
|
327
|
-
constructor(key, value) {
|
|
328
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
329
|
-
const len0 = WASM_VECTOR_LEN;
|
|
330
|
-
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
331
|
-
const len1 = WASM_VECTOR_LEN;
|
|
332
|
-
const ret = wasm.wasmheader_new(ptr0, len0, ptr1, len1);
|
|
333
|
-
this.__wbg_ptr = ret >>> 0;
|
|
334
|
-
WasmHeaderFinalization.register(this, this.__wbg_ptr, this);
|
|
335
|
-
return this;
|
|
336
|
-
}
|
|
337
63
|
/**
|
|
338
64
|
* @returns {string}
|
|
339
65
|
*/
|
|
@@ -364,25 +90,48 @@ export class WasmHeader {
|
|
|
364
90
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
365
91
|
}
|
|
366
92
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const
|
|
93
|
+
/**
|
|
94
|
+
* @param {string} key
|
|
95
|
+
* @param {string} value
|
|
96
|
+
*/
|
|
97
|
+
constructor(key, value) {
|
|
98
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
99
|
+
const len0 = WASM_VECTOR_LEN;
|
|
100
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
101
|
+
const len1 = WASM_VECTOR_LEN;
|
|
102
|
+
const ret = wasm.wasmheader_new(ptr0, len0, ptr1, len1);
|
|
103
|
+
this.__wbg_ptr = ret;
|
|
104
|
+
WasmHeaderFinalization.register(this, this.__wbg_ptr, this);
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (Symbol.dispose) WasmHeader.prototype[Symbol.dispose] = WasmHeader.prototype.free;
|
|
109
|
+
|
|
110
|
+
export class WasmIdentityVerifier {
|
|
111
|
+
__destroy_into_raw() {
|
|
112
|
+
const ptr = this.__wbg_ptr;
|
|
377
113
|
this.__wbg_ptr = 0;
|
|
378
114
|
WasmIdentityVerifierFinalization.unregister(this);
|
|
379
115
|
return ptr;
|
|
380
116
|
}
|
|
381
|
-
|
|
382
117
|
free() {
|
|
383
118
|
const ptr = this.__destroy_into_raw();
|
|
384
119
|
wasm.__wbg_wasmidentityverifier_free(ptr, 0);
|
|
385
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* @param {string[]} keys
|
|
123
|
+
*/
|
|
124
|
+
constructor(keys) {
|
|
125
|
+
const ptr0 = passArrayJsValueToWasm0(keys, wasm.__wbindgen_malloc);
|
|
126
|
+
const len0 = WASM_VECTOR_LEN;
|
|
127
|
+
const ret = wasm.wasmidentityverifier_new(ptr0, len0);
|
|
128
|
+
if (ret[2]) {
|
|
129
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
130
|
+
}
|
|
131
|
+
this.__wbg_ptr = ret[0];
|
|
132
|
+
WasmIdentityVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
386
135
|
/**
|
|
387
136
|
* @param {string} path
|
|
388
137
|
* @param {WasmHeader[]} headers
|
|
@@ -397,47 +146,42 @@ export class WasmIdentityVerifier {
|
|
|
397
146
|
throw takeFromExternrefTable0(ret[0]);
|
|
398
147
|
}
|
|
399
148
|
}
|
|
400
|
-
/**
|
|
401
|
-
* @param {string[]} keys
|
|
402
|
-
*/
|
|
403
|
-
constructor(keys) {
|
|
404
|
-
const ptr0 = passArrayJsValueToWasm0(keys, wasm.__wbindgen_malloc);
|
|
405
|
-
const len0 = WASM_VECTOR_LEN;
|
|
406
|
-
const ret = wasm.wasmidentityverifier_new(ptr0, len0);
|
|
407
|
-
if (ret[2]) {
|
|
408
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
409
|
-
}
|
|
410
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
411
|
-
WasmIdentityVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
412
|
-
return this;
|
|
413
|
-
}
|
|
414
149
|
}
|
|
415
|
-
|
|
416
|
-
const WasmInputFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
417
|
-
? { register: () => {}, unregister: () => {} }
|
|
418
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasminput_free(ptr >>> 0, 1));
|
|
150
|
+
if (Symbol.dispose) WasmIdentityVerifier.prototype[Symbol.dispose] = WasmIdentityVerifier.prototype.free;
|
|
419
151
|
|
|
420
152
|
export class WasmInput {
|
|
421
|
-
|
|
422
153
|
static __wrap(ptr) {
|
|
423
|
-
ptr = ptr >>> 0;
|
|
424
154
|
const obj = Object.create(WasmInput.prototype);
|
|
425
155
|
obj.__wbg_ptr = ptr;
|
|
426
156
|
WasmInputFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
427
157
|
return obj;
|
|
428
158
|
}
|
|
429
|
-
|
|
430
159
|
__destroy_into_raw() {
|
|
431
160
|
const ptr = this.__wbg_ptr;
|
|
432
161
|
this.__wbg_ptr = 0;
|
|
433
162
|
WasmInputFinalization.unregister(this);
|
|
434
163
|
return ptr;
|
|
435
164
|
}
|
|
436
|
-
|
|
437
165
|
free() {
|
|
438
166
|
const ptr = this.__destroy_into_raw();
|
|
439
167
|
wasm.__wbg_wasminput_free(ptr, 0);
|
|
440
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* @returns {WasmHeader[]}
|
|
171
|
+
*/
|
|
172
|
+
get headers() {
|
|
173
|
+
const ret = wasm.__wbg_get_wasminput_headers(this.__wbg_ptr);
|
|
174
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
175
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
176
|
+
return v1;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @returns {Uint8Array}
|
|
180
|
+
*/
|
|
181
|
+
get input() {
|
|
182
|
+
const ret = wasm.__wbg_get_wasminput_input(this.__wbg_ptr);
|
|
183
|
+
return ret;
|
|
184
|
+
}
|
|
441
185
|
/**
|
|
442
186
|
* @returns {string}
|
|
443
187
|
*/
|
|
@@ -468,22 +212,6 @@ export class WasmInput {
|
|
|
468
212
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
469
213
|
}
|
|
470
214
|
}
|
|
471
|
-
/**
|
|
472
|
-
* @returns {WasmHeader[]}
|
|
473
|
-
*/
|
|
474
|
-
get headers() {
|
|
475
|
-
const ret = wasm.__wbg_get_wasminput_headers(this.__wbg_ptr);
|
|
476
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
477
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
478
|
-
return v1;
|
|
479
|
-
}
|
|
480
|
-
/**
|
|
481
|
-
* @returns {Uint8Array}
|
|
482
|
-
*/
|
|
483
|
-
get input() {
|
|
484
|
-
const ret = wasm.__wbg_get_wasminput_input(this.__wbg_ptr);
|
|
485
|
-
return ret;
|
|
486
|
-
}
|
|
487
215
|
/**
|
|
488
216
|
* @returns {bigint}
|
|
489
217
|
*/
|
|
@@ -492,39 +220,25 @@ export class WasmInput {
|
|
|
492
220
|
return BigInt.asUintN(64, ret);
|
|
493
221
|
}
|
|
494
222
|
}
|
|
495
|
-
|
|
496
|
-
const WasmResponseHeadFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
497
|
-
? { register: () => {}, unregister: () => {} }
|
|
498
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmresponsehead_free(ptr >>> 0, 1));
|
|
223
|
+
if (Symbol.dispose) WasmInput.prototype[Symbol.dispose] = WasmInput.prototype.free;
|
|
499
224
|
|
|
500
225
|
export class WasmResponseHead {
|
|
501
|
-
|
|
502
226
|
static __wrap(ptr) {
|
|
503
|
-
ptr = ptr >>> 0;
|
|
504
227
|
const obj = Object.create(WasmResponseHead.prototype);
|
|
505
228
|
obj.__wbg_ptr = ptr;
|
|
506
229
|
WasmResponseHeadFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
507
230
|
return obj;
|
|
508
231
|
}
|
|
509
|
-
|
|
510
232
|
__destroy_into_raw() {
|
|
511
233
|
const ptr = this.__wbg_ptr;
|
|
512
234
|
this.__wbg_ptr = 0;
|
|
513
235
|
WasmResponseHeadFinalization.unregister(this);
|
|
514
236
|
return ptr;
|
|
515
237
|
}
|
|
516
|
-
|
|
517
238
|
free() {
|
|
518
239
|
const ptr = this.__destroy_into_raw();
|
|
519
240
|
wasm.__wbg_wasmresponsehead_free(ptr, 0);
|
|
520
241
|
}
|
|
521
|
-
/**
|
|
522
|
-
* @returns {number}
|
|
523
|
-
*/
|
|
524
|
-
get status_code() {
|
|
525
|
-
const ret = wasm.__wbg_get_wasmresponsehead_status_code(this.__wbg_ptr);
|
|
526
|
-
return ret;
|
|
527
|
-
}
|
|
528
242
|
/**
|
|
529
243
|
* @returns {WasmHeader[]}
|
|
530
244
|
*/
|
|
@@ -534,57 +248,44 @@ export class WasmResponseHead {
|
|
|
534
248
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
535
249
|
return v1;
|
|
536
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* @returns {number}
|
|
253
|
+
*/
|
|
254
|
+
get status_code() {
|
|
255
|
+
const ret = wasm.__wbg_get_wasmresponsehead_status_code(this.__wbg_ptr);
|
|
256
|
+
return ret;
|
|
257
|
+
}
|
|
537
258
|
}
|
|
538
|
-
|
|
539
|
-
const WasmVMFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
540
|
-
? { register: () => {}, unregister: () => {} }
|
|
541
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmvm_free(ptr >>> 0, 1));
|
|
259
|
+
if (Symbol.dispose) WasmResponseHead.prototype[Symbol.dispose] = WasmResponseHead.prototype.free;
|
|
542
260
|
|
|
543
261
|
export class WasmVM {
|
|
544
|
-
|
|
545
262
|
__destroy_into_raw() {
|
|
546
263
|
const ptr = this.__wbg_ptr;
|
|
547
264
|
this.__wbg_ptr = 0;
|
|
548
265
|
WasmVMFinalization.unregister(this);
|
|
549
266
|
return ptr;
|
|
550
267
|
}
|
|
551
|
-
|
|
552
268
|
free() {
|
|
553
269
|
const ptr = this.__destroy_into_raw();
|
|
554
270
|
wasm.__wbg_wasmvm_free(ptr, 0);
|
|
555
271
|
}
|
|
556
272
|
/**
|
|
557
|
-
* @param {
|
|
558
|
-
* @returns {number}
|
|
559
|
-
*/
|
|
560
|
-
sys_signal(signal_name) {
|
|
561
|
-
const ptr0 = passStringToWasm0(signal_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
562
|
-
const len0 = WASM_VECTOR_LEN;
|
|
563
|
-
const ret = wasm.wasmvm_sys_signal(this.__wbg_ptr, ptr0, len0);
|
|
564
|
-
if (ret[2]) {
|
|
565
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
566
|
-
}
|
|
567
|
-
return ret[0] >>> 0;
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* @param {Uint32Array} handles
|
|
273
|
+
* @param {WasmUnresolvedFuture} future
|
|
571
274
|
* @returns {WasmDoProgressResult}
|
|
572
275
|
*/
|
|
573
|
-
do_progress(
|
|
574
|
-
const
|
|
575
|
-
const len0 = WASM_VECTOR_LEN;
|
|
576
|
-
const ret = wasm.wasmvm_do_progress(this.__wbg_ptr, ptr0, len0);
|
|
276
|
+
do_progress(future) {
|
|
277
|
+
const ret = wasm.wasmvm_do_progress(this.__wbg_ptr, future);
|
|
577
278
|
if (ret[2]) {
|
|
578
279
|
throw takeFromExternrefTable0(ret[1]);
|
|
579
280
|
}
|
|
580
281
|
return takeFromExternrefTable0(ret[0]);
|
|
581
282
|
}
|
|
582
283
|
/**
|
|
583
|
-
* @returns {
|
|
284
|
+
* @returns {WasmResponseHead}
|
|
584
285
|
*/
|
|
585
|
-
|
|
586
|
-
const ret = wasm.
|
|
587
|
-
return ret;
|
|
286
|
+
get_response_head() {
|
|
287
|
+
const ret = wasm.wasmvm_get_response_head(this.__wbg_ptr);
|
|
288
|
+
return WasmResponseHead.__wrap(ret);
|
|
588
289
|
}
|
|
589
290
|
/**
|
|
590
291
|
* @param {number} handle
|
|
@@ -594,25 +295,6 @@ export class WasmVM {
|
|
|
594
295
|
const ret = wasm.wasmvm_is_completed(this.__wbg_ptr, handle);
|
|
595
296
|
return ret !== 0;
|
|
596
297
|
}
|
|
597
|
-
/**
|
|
598
|
-
* @param {string} error_message
|
|
599
|
-
* @param {string | null} [stacktrace]
|
|
600
|
-
*/
|
|
601
|
-
notify_error(error_message, stacktrace) {
|
|
602
|
-
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
603
|
-
const len0 = WASM_VECTOR_LEN;
|
|
604
|
-
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
605
|
-
var len1 = WASM_VECTOR_LEN;
|
|
606
|
-
wasm.wasmvm_notify_error(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* @param {Uint8Array} buffer
|
|
610
|
-
*/
|
|
611
|
-
notify_input(buffer) {
|
|
612
|
-
const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
613
|
-
const len0 = WASM_VECTOR_LEN;
|
|
614
|
-
wasm.wasmvm_notify_input(this.__wbg_ptr, ptr0, len0);
|
|
615
|
-
}
|
|
616
298
|
/**
|
|
617
299
|
* @returns {boolean}
|
|
618
300
|
*/
|
|
@@ -621,129 +303,156 @@ export class WasmVM {
|
|
|
621
303
|
return ret !== 0;
|
|
622
304
|
}
|
|
623
305
|
/**
|
|
624
|
-
* @returns {
|
|
306
|
+
* @returns {boolean}
|
|
625
307
|
*/
|
|
626
|
-
|
|
627
|
-
const ret = wasm.
|
|
308
|
+
is_ready_to_execute() {
|
|
309
|
+
const ret = wasm.wasmvm_is_ready_to_execute(this.__wbg_ptr);
|
|
628
310
|
if (ret[2]) {
|
|
629
311
|
throw takeFromExternrefTable0(ret[1]);
|
|
630
312
|
}
|
|
631
|
-
return
|
|
313
|
+
return ret[0] !== 0;
|
|
632
314
|
}
|
|
633
315
|
/**
|
|
634
|
-
* @param {string} key
|
|
635
316
|
* @returns {number}
|
|
636
317
|
*/
|
|
637
|
-
|
|
638
|
-
const
|
|
318
|
+
last_command_index() {
|
|
319
|
+
const ret = wasm.wasmvm_last_command_index(this.__wbg_ptr);
|
|
320
|
+
return ret;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* @param {WasmHeader[]} headers
|
|
324
|
+
* @param {LogLevel} log_level
|
|
325
|
+
* @param {number} logger_id
|
|
326
|
+
* @param {boolean} disable_payload_checks
|
|
327
|
+
* @param {boolean} explicit_cancellation
|
|
328
|
+
*/
|
|
329
|
+
constructor(headers, log_level, logger_id, disable_payload_checks, explicit_cancellation) {
|
|
330
|
+
const ptr0 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
639
331
|
const len0 = WASM_VECTOR_LEN;
|
|
640
|
-
const ret = wasm.
|
|
332
|
+
const ret = wasm.wasmvm_new(ptr0, len0, log_level, logger_id, disable_payload_checks, explicit_cancellation);
|
|
641
333
|
if (ret[2]) {
|
|
642
334
|
throw takeFromExternrefTable0(ret[1]);
|
|
643
335
|
}
|
|
644
|
-
|
|
336
|
+
this.__wbg_ptr = ret[0];
|
|
337
|
+
WasmVMFinalization.register(this, this.__wbg_ptr, this);
|
|
338
|
+
return this;
|
|
645
339
|
}
|
|
646
340
|
/**
|
|
647
|
-
* @param {string}
|
|
648
|
-
* @param {
|
|
341
|
+
* @param {string} error_message
|
|
342
|
+
* @param {string | null} [stacktrace]
|
|
649
343
|
*/
|
|
650
|
-
|
|
651
|
-
const ptr0 = passStringToWasm0(
|
|
344
|
+
notify_error(error_message, stacktrace) {
|
|
345
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
652
346
|
const len0 = WASM_VECTOR_LEN;
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
if (ret[1]) {
|
|
657
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
658
|
-
}
|
|
347
|
+
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
348
|
+
var len1 = WASM_VECTOR_LEN;
|
|
349
|
+
wasm.wasmvm_notify_error(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
659
350
|
}
|
|
660
351
|
/**
|
|
661
|
-
* @param {string}
|
|
352
|
+
* @param {string} error_message
|
|
353
|
+
* @param {string | null | undefined} stacktrace
|
|
354
|
+
* @param {WasmCommandType} wasm_command_type
|
|
662
355
|
*/
|
|
663
|
-
|
|
664
|
-
const ptr0 = passStringToWasm0(
|
|
356
|
+
notify_error_for_next_command(error_message, stacktrace, wasm_command_type) {
|
|
357
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
665
358
|
const len0 = WASM_VECTOR_LEN;
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
}
|
|
359
|
+
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
360
|
+
var len1 = WASM_VECTOR_LEN;
|
|
361
|
+
wasm.wasmvm_notify_error_for_next_command(this.__wbg_ptr, ptr0, len0, ptr1, len1, wasm_command_type);
|
|
670
362
|
}
|
|
671
363
|
/**
|
|
672
|
-
* @param {string}
|
|
673
|
-
* @
|
|
364
|
+
* @param {string} error_message
|
|
365
|
+
* @param {string | null | undefined} stacktrace
|
|
366
|
+
* @param {WasmCommandType} wasm_command_type
|
|
367
|
+
* @param {number} command_index
|
|
368
|
+
* @param {string | null} [command_name]
|
|
674
369
|
*/
|
|
675
|
-
|
|
676
|
-
const ptr0 = passStringToWasm0(
|
|
370
|
+
notify_error_for_specific_command(error_message, stacktrace, wasm_command_type, command_index, command_name) {
|
|
371
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
677
372
|
const len0 = WASM_VECTOR_LEN;
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
373
|
+
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
374
|
+
var len1 = WASM_VECTOR_LEN;
|
|
375
|
+
var ptr2 = isLikeNone(command_name) ? 0 : passStringToWasm0(command_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
376
|
+
var len2 = WASM_VECTOR_LEN;
|
|
377
|
+
wasm.wasmvm_notify_error_for_specific_command(this.__wbg_ptr, ptr0, len0, ptr1, len1, wasm_command_type, command_index, ptr2, len2);
|
|
683
378
|
}
|
|
684
379
|
/**
|
|
685
|
-
* @param {string}
|
|
686
|
-
* @
|
|
380
|
+
* @param {string} error_message
|
|
381
|
+
* @param {string | null} [stacktrace]
|
|
382
|
+
* @param {bigint | null} [delay_override]
|
|
687
383
|
*/
|
|
688
|
-
|
|
689
|
-
const ptr0 = passStringToWasm0(
|
|
384
|
+
notify_error_with_delay_override(error_message, stacktrace, delay_override) {
|
|
385
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
690
386
|
const len0 = WASM_VECTOR_LEN;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
return ret[0] >>> 0;
|
|
387
|
+
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
388
|
+
var len1 = WASM_VECTOR_LEN;
|
|
389
|
+
wasm.wasmvm_notify_error_with_delay_override(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(delay_override), isLikeNone(delay_override) ? BigInt(0) : delay_override);
|
|
696
390
|
}
|
|
697
391
|
/**
|
|
698
|
-
* @
|
|
392
|
+
* @param {Uint8Array} buffer
|
|
699
393
|
*/
|
|
700
|
-
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
*/
|
|
708
|
-
take_notification(handle) {
|
|
709
|
-
const ret = wasm.wasmvm_take_notification(this.__wbg_ptr, handle);
|
|
710
|
-
if (ret[2]) {
|
|
711
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
712
|
-
}
|
|
713
|
-
return takeFromExternrefTable0(ret[0]);
|
|
394
|
+
notify_input(buffer) {
|
|
395
|
+
const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
396
|
+
const len0 = WASM_VECTOR_LEN;
|
|
397
|
+
wasm.wasmvm_notify_input(this.__wbg_ptr, ptr0, len0);
|
|
398
|
+
}
|
|
399
|
+
notify_input_closed() {
|
|
400
|
+
wasm.wasmvm_notify_input_closed(this.__wbg_ptr);
|
|
714
401
|
}
|
|
715
402
|
/**
|
|
716
|
-
* @
|
|
403
|
+
* @param {number} handle
|
|
404
|
+
* @param {WasmFailure} value
|
|
717
405
|
*/
|
|
718
|
-
|
|
719
|
-
const ret = wasm.
|
|
720
|
-
|
|
406
|
+
propose_run_completion_failure(handle, value) {
|
|
407
|
+
const ret = wasm.wasmvm_propose_run_completion_failure(this.__wbg_ptr, handle, value);
|
|
408
|
+
if (ret[1]) {
|
|
409
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
410
|
+
}
|
|
721
411
|
}
|
|
722
412
|
/**
|
|
723
|
-
* @
|
|
413
|
+
* @param {number} handle
|
|
414
|
+
* @param {string} error_message
|
|
415
|
+
* @param {string | null | undefined} error_stacktrace
|
|
416
|
+
* @param {bigint} attempt_duration
|
|
417
|
+
* @param {WasmExponentialRetryConfig | null} [config]
|
|
724
418
|
*/
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
|
|
419
|
+
propose_run_completion_failure_transient(handle, error_message, error_stacktrace, attempt_duration, config) {
|
|
420
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
421
|
+
const len0 = WASM_VECTOR_LEN;
|
|
422
|
+
var ptr1 = isLikeNone(error_stacktrace) ? 0 : passStringToWasm0(error_stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
+
var len1 = WASM_VECTOR_LEN;
|
|
424
|
+
const ret = wasm.wasmvm_propose_run_completion_failure_transient(this.__wbg_ptr, handle, ptr0, len0, ptr1, len1, attempt_duration, isLikeNone(config) ? 0 : addToExternrefTable0(config));
|
|
425
|
+
if (ret[1]) {
|
|
426
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
729
427
|
}
|
|
730
|
-
return ret[0] >>> 0;
|
|
731
428
|
}
|
|
732
429
|
/**
|
|
733
|
-
* @
|
|
430
|
+
* @param {number} handle
|
|
431
|
+
* @param {string} error_message
|
|
432
|
+
* @param {string | null | undefined} error_stacktrace
|
|
433
|
+
* @param {bigint} attempt_duration
|
|
434
|
+
* @param {bigint | null} [delay_override]
|
|
435
|
+
* @param {number | null} [max_retry_attempts_override]
|
|
436
|
+
* @param {bigint | null} [max_retry_duration_override]
|
|
734
437
|
*/
|
|
735
|
-
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
|
|
438
|
+
propose_run_completion_failure_transient_with_delay_override(handle, error_message, error_stacktrace, attempt_duration, delay_override, max_retry_attempts_override, max_retry_duration_override) {
|
|
439
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
440
|
+
const len0 = WASM_VECTOR_LEN;
|
|
441
|
+
var ptr1 = isLikeNone(error_stacktrace) ? 0 : passStringToWasm0(error_stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
442
|
+
var len1 = WASM_VECTOR_LEN;
|
|
443
|
+
const ret = wasm.wasmvm_propose_run_completion_failure_transient_with_delay_override(this.__wbg_ptr, handle, ptr0, len0, ptr1, len1, attempt_duration, !isLikeNone(delay_override), isLikeNone(delay_override) ? BigInt(0) : delay_override, isLikeNone(max_retry_attempts_override) ? Number.MAX_SAFE_INTEGER : (max_retry_attempts_override) >>> 0, !isLikeNone(max_retry_duration_override), isLikeNone(max_retry_duration_override) ? BigInt(0) : max_retry_duration_override);
|
|
444
|
+
if (ret[1]) {
|
|
445
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
739
446
|
}
|
|
740
|
-
return ret[0] !== 0;
|
|
741
|
-
}
|
|
742
|
-
notify_input_closed() {
|
|
743
|
-
wasm.wasmvm_notify_input_closed(this.__wbg_ptr);
|
|
744
447
|
}
|
|
745
|
-
|
|
746
|
-
|
|
448
|
+
/**
|
|
449
|
+
* @param {number} handle
|
|
450
|
+
* @param {Uint8Array} buffer
|
|
451
|
+
*/
|
|
452
|
+
propose_run_completion_success(handle, buffer) {
|
|
453
|
+
const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
454
|
+
const len0 = WASM_VECTOR_LEN;
|
|
455
|
+
const ret = wasm.wasmvm_propose_run_completion_success(this.__wbg_ptr, handle, ptr0, len0);
|
|
747
456
|
if (ret[1]) {
|
|
748
457
|
throw takeFromExternrefTable0(ret[0]);
|
|
749
458
|
}
|
|
@@ -761,6 +470,47 @@ export class WasmVM {
|
|
|
761
470
|
}
|
|
762
471
|
return ret[0] >>> 0;
|
|
763
472
|
}
|
|
473
|
+
/**
|
|
474
|
+
* @returns {WasmAwakeable}
|
|
475
|
+
*/
|
|
476
|
+
sys_awakeable() {
|
|
477
|
+
const ret = wasm.wasmvm_sys_awakeable(this.__wbg_ptr);
|
|
478
|
+
if (ret[2]) {
|
|
479
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
480
|
+
}
|
|
481
|
+
return takeFromExternrefTable0(ret[0]);
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* @param {string} service
|
|
485
|
+
* @param {string} handler
|
|
486
|
+
* @param {Uint8Array} buffer
|
|
487
|
+
* @param {string | null | undefined} key
|
|
488
|
+
* @param {WasmHeader[]} headers
|
|
489
|
+
* @param {string | null} [idempotency_key]
|
|
490
|
+
* @param {string | null} [name]
|
|
491
|
+
* @returns {WasmCallHandle}
|
|
492
|
+
*/
|
|
493
|
+
sys_call(service, handler, buffer, key, headers, idempotency_key, name) {
|
|
494
|
+
const ptr0 = passStringToWasm0(service, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
495
|
+
const len0 = WASM_VECTOR_LEN;
|
|
496
|
+
const ptr1 = passStringToWasm0(handler, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
497
|
+
const len1 = WASM_VECTOR_LEN;
|
|
498
|
+
const ptr2 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
499
|
+
const len2 = WASM_VECTOR_LEN;
|
|
500
|
+
var ptr3 = isLikeNone(key) ? 0 : passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
501
|
+
var len3 = WASM_VECTOR_LEN;
|
|
502
|
+
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
503
|
+
const len4 = WASM_VECTOR_LEN;
|
|
504
|
+
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
505
|
+
var len5 = WASM_VECTOR_LEN;
|
|
506
|
+
var ptr6 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
507
|
+
var len6 = WASM_VECTOR_LEN;
|
|
508
|
+
const ret = wasm.wasmvm_sys_call(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
509
|
+
if (ret[2]) {
|
|
510
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
511
|
+
}
|
|
512
|
+
return takeFromExternrefTable0(ret[0]);
|
|
513
|
+
}
|
|
764
514
|
/**
|
|
765
515
|
* @param {string} target_invocation_id
|
|
766
516
|
*/
|
|
@@ -772,34 +522,74 @@ export class WasmVM {
|
|
|
772
522
|
throw takeFromExternrefTable0(ret[0]);
|
|
773
523
|
}
|
|
774
524
|
}
|
|
525
|
+
sys_clear_all_state() {
|
|
526
|
+
const ret = wasm.wasmvm_sys_clear_all_state(this.__wbg_ptr);
|
|
527
|
+
if (ret[1]) {
|
|
528
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* @param {string} key
|
|
533
|
+
*/
|
|
534
|
+
sys_clear_state(key) {
|
|
535
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
536
|
+
const len0 = WASM_VECTOR_LEN;
|
|
537
|
+
const ret = wasm.wasmvm_sys_clear_state(this.__wbg_ptr, ptr0, len0);
|
|
538
|
+
if (ret[1]) {
|
|
539
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
775
542
|
/**
|
|
543
|
+
* @param {string} id
|
|
776
544
|
* @param {WasmFailure} value
|
|
777
545
|
*/
|
|
778
|
-
|
|
779
|
-
const
|
|
546
|
+
sys_complete_awakeable_failure(id, value) {
|
|
547
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
548
|
+
const len0 = WASM_VECTOR_LEN;
|
|
549
|
+
const ret = wasm.wasmvm_sys_complete_awakeable_failure(this.__wbg_ptr, ptr0, len0, value);
|
|
780
550
|
if (ret[1]) {
|
|
781
551
|
throw takeFromExternrefTable0(ret[0]);
|
|
782
552
|
}
|
|
783
553
|
}
|
|
784
554
|
/**
|
|
555
|
+
* @param {string} id
|
|
785
556
|
* @param {Uint8Array} buffer
|
|
786
557
|
*/
|
|
787
|
-
|
|
788
|
-
const ptr0 =
|
|
558
|
+
sys_complete_awakeable_success(id, buffer) {
|
|
559
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
789
560
|
const len0 = WASM_VECTOR_LEN;
|
|
790
|
-
const
|
|
561
|
+
const ptr1 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
562
|
+
const len1 = WASM_VECTOR_LEN;
|
|
563
|
+
const ret = wasm.wasmvm_sys_complete_awakeable_success(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
791
564
|
if (ret[1]) {
|
|
792
565
|
throw takeFromExternrefTable0(ret[0]);
|
|
793
566
|
}
|
|
794
567
|
}
|
|
795
568
|
/**
|
|
796
|
-
* @param {string}
|
|
569
|
+
* @param {string} key
|
|
570
|
+
* @param {WasmFailure} value
|
|
797
571
|
* @returns {number}
|
|
798
572
|
*/
|
|
799
|
-
|
|
800
|
-
const ptr0 = passStringToWasm0(
|
|
573
|
+
sys_complete_promise_failure(key, value) {
|
|
574
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
801
575
|
const len0 = WASM_VECTOR_LEN;
|
|
802
|
-
const ret = wasm.
|
|
576
|
+
const ret = wasm.wasmvm_sys_complete_promise_failure(this.__wbg_ptr, ptr0, len0, value);
|
|
577
|
+
if (ret[2]) {
|
|
578
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
579
|
+
}
|
|
580
|
+
return ret[0] >>> 0;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* @param {string} key
|
|
584
|
+
* @param {Uint8Array} buffer
|
|
585
|
+
* @returns {number}
|
|
586
|
+
*/
|
|
587
|
+
sys_complete_promise_success(key, buffer) {
|
|
588
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
589
|
+
const len0 = WASM_VECTOR_LEN;
|
|
590
|
+
const ptr1 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
591
|
+
const len1 = WASM_VECTOR_LEN;
|
|
592
|
+
const ret = wasm.wasmvm_sys_complete_promise_success(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
803
593
|
if (ret[2]) {
|
|
804
594
|
throw takeFromExternrefTable0(ret[1]);
|
|
805
595
|
}
|
|
@@ -837,15 +627,20 @@ export class WasmVM {
|
|
|
837
627
|
throw takeFromExternrefTable0(ret[0]);
|
|
838
628
|
}
|
|
839
629
|
}
|
|
630
|
+
sys_end() {
|
|
631
|
+
const ret = wasm.wasmvm_sys_end(this.__wbg_ptr);
|
|
632
|
+
if (ret[1]) {
|
|
633
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
840
636
|
/**
|
|
841
|
-
* @param {string}
|
|
842
|
-
* @param {WasmFailure} value
|
|
637
|
+
* @param {string} invocation_id
|
|
843
638
|
* @returns {number}
|
|
844
639
|
*/
|
|
845
|
-
|
|
846
|
-
const ptr0 = passStringToWasm0(
|
|
640
|
+
sys_get_invocation_output(invocation_id) {
|
|
641
|
+
const ptr0 = passStringToWasm0(invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
847
642
|
const len0 = WASM_VECTOR_LEN;
|
|
848
|
-
const ret = wasm.
|
|
643
|
+
const ret = wasm.wasmvm_sys_get_invocation_output(this.__wbg_ptr, ptr0, len0);
|
|
849
644
|
if (ret[2]) {
|
|
850
645
|
throw takeFromExternrefTable0(ret[1]);
|
|
851
646
|
}
|
|
@@ -853,171 +648,66 @@ export class WasmVM {
|
|
|
853
648
|
}
|
|
854
649
|
/**
|
|
855
650
|
* @param {string} key
|
|
856
|
-
* @param {Uint8Array} buffer
|
|
857
651
|
* @returns {number}
|
|
858
652
|
*/
|
|
859
|
-
|
|
653
|
+
sys_get_promise(key) {
|
|
860
654
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
861
655
|
const len0 = WASM_VECTOR_LEN;
|
|
862
|
-
const
|
|
863
|
-
const len1 = WASM_VECTOR_LEN;
|
|
864
|
-
const ret = wasm.wasmvm_sys_complete_promise_success(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
656
|
+
const ret = wasm.wasmvm_sys_get_promise(this.__wbg_ptr, ptr0, len0);
|
|
865
657
|
if (ret[2]) {
|
|
866
658
|
throw takeFromExternrefTable0(ret[1]);
|
|
867
659
|
}
|
|
868
660
|
return ret[0] >>> 0;
|
|
869
661
|
}
|
|
870
662
|
/**
|
|
871
|
-
* @param {string}
|
|
872
|
-
* @
|
|
873
|
-
* @param {WasmCommandType} wasm_command_type
|
|
663
|
+
* @param {string} key
|
|
664
|
+
* @returns {number}
|
|
874
665
|
*/
|
|
875
|
-
|
|
876
|
-
const ptr0 = passStringToWasm0(
|
|
666
|
+
sys_get_state(key) {
|
|
667
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
877
668
|
const len0 = WASM_VECTOR_LEN;
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
669
|
+
const ret = wasm.wasmvm_sys_get_state(this.__wbg_ptr, ptr0, len0);
|
|
670
|
+
if (ret[2]) {
|
|
671
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
672
|
+
}
|
|
673
|
+
return ret[0] >>> 0;
|
|
881
674
|
}
|
|
882
675
|
/**
|
|
883
|
-
* @
|
|
884
|
-
* @param {WasmFailure} value
|
|
676
|
+
* @returns {number}
|
|
885
677
|
*/
|
|
886
|
-
|
|
887
|
-
const ret = wasm.
|
|
888
|
-
if (ret[
|
|
889
|
-
throw takeFromExternrefTable0(ret[
|
|
678
|
+
sys_get_state_keys() {
|
|
679
|
+
const ret = wasm.wasmvm_sys_get_state_keys(this.__wbg_ptr);
|
|
680
|
+
if (ret[2]) {
|
|
681
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
890
682
|
}
|
|
683
|
+
return ret[0] >>> 0;
|
|
891
684
|
}
|
|
892
685
|
/**
|
|
893
|
-
* @
|
|
894
|
-
* @param {Uint8Array} buffer
|
|
686
|
+
* @returns {WasmInput}
|
|
895
687
|
*/
|
|
896
|
-
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
if (ret[1]) {
|
|
901
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
688
|
+
sys_input() {
|
|
689
|
+
const ret = wasm.wasmvm_sys_input(this.__wbg_ptr);
|
|
690
|
+
if (ret[2]) {
|
|
691
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
902
692
|
}
|
|
693
|
+
return WasmInput.__wrap(ret[0]);
|
|
903
694
|
}
|
|
904
695
|
/**
|
|
905
|
-
* @param {string}
|
|
906
|
-
* @
|
|
696
|
+
* @param {string} key
|
|
697
|
+
* @returns {number}
|
|
907
698
|
*/
|
|
908
|
-
|
|
909
|
-
const ptr0 = passStringToWasm0(
|
|
699
|
+
sys_peek_promise(key) {
|
|
700
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
910
701
|
const len0 = WASM_VECTOR_LEN;
|
|
911
|
-
const ret = wasm.
|
|
912
|
-
if (ret[
|
|
913
|
-
throw takeFromExternrefTable0(ret[
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
/**
|
|
917
|
-
* @param {string} id
|
|
918
|
-
* @param {Uint8Array} buffer
|
|
919
|
-
*/
|
|
920
|
-
sys_complete_awakeable_success(id, buffer) {
|
|
921
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
922
|
-
const len0 = WASM_VECTOR_LEN;
|
|
923
|
-
const ptr1 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
924
|
-
const len1 = WASM_VECTOR_LEN;
|
|
925
|
-
const ret = wasm.wasmvm_sys_complete_awakeable_success(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
926
|
-
if (ret[1]) {
|
|
927
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
/**
|
|
931
|
-
* @param {string} error_message
|
|
932
|
-
* @param {string | null} [stacktrace]
|
|
933
|
-
* @param {bigint | null} [delay_override]
|
|
934
|
-
*/
|
|
935
|
-
notify_error_with_delay_override(error_message, stacktrace, delay_override) {
|
|
936
|
-
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
937
|
-
const len0 = WASM_VECTOR_LEN;
|
|
938
|
-
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
939
|
-
var len1 = WASM_VECTOR_LEN;
|
|
940
|
-
wasm.wasmvm_notify_error_with_delay_override(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(delay_override), isLikeNone(delay_override) ? BigInt(0) : delay_override);
|
|
941
|
-
}
|
|
942
|
-
/**
|
|
943
|
-
* @param {string} error_message
|
|
944
|
-
* @param {string | null | undefined} stacktrace
|
|
945
|
-
* @param {WasmCommandType} wasm_command_type
|
|
946
|
-
* @param {number} command_index
|
|
947
|
-
* @param {string | null} [command_name]
|
|
948
|
-
*/
|
|
949
|
-
notify_error_for_specific_command(error_message, stacktrace, wasm_command_type, command_index, command_name) {
|
|
950
|
-
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
951
|
-
const len0 = WASM_VECTOR_LEN;
|
|
952
|
-
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
953
|
-
var len1 = WASM_VECTOR_LEN;
|
|
954
|
-
var ptr2 = isLikeNone(command_name) ? 0 : passStringToWasm0(command_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
955
|
-
var len2 = WASM_VECTOR_LEN;
|
|
956
|
-
wasm.wasmvm_notify_error_for_specific_command(this.__wbg_ptr, ptr0, len0, ptr1, len1, wasm_command_type, command_index, ptr2, len2);
|
|
957
|
-
}
|
|
958
|
-
/**
|
|
959
|
-
* @param {WasmHeader[]} headers
|
|
960
|
-
* @param {LogLevel} log_level
|
|
961
|
-
* @param {number} logger_id
|
|
962
|
-
* @param {boolean} disable_payload_checks
|
|
963
|
-
* @param {boolean} explicit_cancellation
|
|
964
|
-
*/
|
|
965
|
-
constructor(headers, log_level, logger_id, disable_payload_checks, explicit_cancellation) {
|
|
966
|
-
const ptr0 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
967
|
-
const len0 = WASM_VECTOR_LEN;
|
|
968
|
-
const ret = wasm.wasmvm_new(ptr0, len0, log_level, logger_id, disable_payload_checks, explicit_cancellation);
|
|
969
|
-
if (ret[2]) {
|
|
970
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
971
|
-
}
|
|
972
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
973
|
-
WasmVMFinalization.register(this, this.__wbg_ptr, this);
|
|
974
|
-
return this;
|
|
975
|
-
}
|
|
976
|
-
/**
|
|
977
|
-
* @param {number} handle
|
|
978
|
-
* @param {string} error_message
|
|
979
|
-
* @param {string | null | undefined} error_stacktrace
|
|
980
|
-
* @param {bigint} attempt_duration
|
|
981
|
-
* @param {WasmExponentialRetryConfig | null} [config]
|
|
982
|
-
*/
|
|
983
|
-
propose_run_completion_failure_transient(handle, error_message, error_stacktrace, attempt_duration, config) {
|
|
984
|
-
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
985
|
-
const len0 = WASM_VECTOR_LEN;
|
|
986
|
-
var ptr1 = isLikeNone(error_stacktrace) ? 0 : passStringToWasm0(error_stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
987
|
-
var len1 = WASM_VECTOR_LEN;
|
|
988
|
-
const ret = wasm.wasmvm_propose_run_completion_failure_transient(this.__wbg_ptr, handle, ptr0, len0, ptr1, len1, attempt_duration, isLikeNone(config) ? 0 : addToExternrefTable0(config));
|
|
989
|
-
if (ret[1]) {
|
|
990
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
/**
|
|
994
|
-
* @param {number} handle
|
|
995
|
-
* @param {string} error_message
|
|
996
|
-
* @param {string | null | undefined} error_stacktrace
|
|
997
|
-
* @param {bigint} attempt_duration
|
|
998
|
-
* @param {bigint | null} [delay_override]
|
|
999
|
-
* @param {number | null} [max_retry_attempts_override]
|
|
1000
|
-
* @param {bigint | null} [max_retry_duration_override]
|
|
1001
|
-
*/
|
|
1002
|
-
propose_run_completion_failure_transient_with_delay_override(handle, error_message, error_stacktrace, attempt_duration, delay_override, max_retry_attempts_override, max_retry_duration_override) {
|
|
1003
|
-
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1004
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1005
|
-
var ptr1 = isLikeNone(error_stacktrace) ? 0 : passStringToWasm0(error_stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1006
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1007
|
-
const ret = wasm.wasmvm_propose_run_completion_failure_transient_with_delay_override(this.__wbg_ptr, handle, ptr0, len0, ptr1, len1, attempt_duration, !isLikeNone(delay_override), isLikeNone(delay_override) ? BigInt(0) : delay_override, isLikeNone(max_retry_attempts_override) ? 0x100000001 : (max_retry_attempts_override) >>> 0, !isLikeNone(max_retry_duration_override), isLikeNone(max_retry_duration_override) ? BigInt(0) : max_retry_duration_override);
|
|
1008
|
-
if (ret[1]) {
|
|
1009
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
sys_end() {
|
|
1013
|
-
const ret = wasm.wasmvm_sys_end(this.__wbg_ptr);
|
|
1014
|
-
if (ret[1]) {
|
|
1015
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
702
|
+
const ret = wasm.wasmvm_sys_peek_promise(this.__wbg_ptr, ptr0, len0);
|
|
703
|
+
if (ret[2]) {
|
|
704
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1016
705
|
}
|
|
706
|
+
return ret[0] >>> 0;
|
|
1017
707
|
}
|
|
1018
708
|
/**
|
|
1019
709
|
* @param {string} name
|
|
1020
|
-
* @returns {
|
|
710
|
+
* @returns {WasmRun}
|
|
1021
711
|
*/
|
|
1022
712
|
sys_run(name) {
|
|
1023
713
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1026,7 +716,7 @@ export class WasmVM {
|
|
|
1026
716
|
if (ret[2]) {
|
|
1027
717
|
throw takeFromExternrefTable0(ret[1]);
|
|
1028
718
|
}
|
|
1029
|
-
return ret[0]
|
|
719
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1030
720
|
}
|
|
1031
721
|
/**
|
|
1032
722
|
* @param {string} service
|
|
@@ -1034,11 +724,12 @@ export class WasmVM {
|
|
|
1034
724
|
* @param {Uint8Array} buffer
|
|
1035
725
|
* @param {string | null | undefined} key
|
|
1036
726
|
* @param {WasmHeader[]} headers
|
|
727
|
+
* @param {bigint | null} [delay]
|
|
1037
728
|
* @param {string | null} [idempotency_key]
|
|
1038
729
|
* @param {string | null} [name]
|
|
1039
|
-
* @returns {
|
|
730
|
+
* @returns {WasmSendHandle}
|
|
1040
731
|
*/
|
|
1041
|
-
|
|
732
|
+
sys_send(service, handler, buffer, key, headers, delay, idempotency_key, name) {
|
|
1042
733
|
const ptr0 = passStringToWasm0(service, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1043
734
|
const len0 = WASM_VECTOR_LEN;
|
|
1044
735
|
const ptr1 = passStringToWasm0(handler, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1053,53 +744,38 @@ export class WasmVM {
|
|
|
1053
744
|
var len5 = WASM_VECTOR_LEN;
|
|
1054
745
|
var ptr6 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1055
746
|
var len6 = WASM_VECTOR_LEN;
|
|
1056
|
-
const ret = wasm.
|
|
747
|
+
const ret = wasm.wasmvm_sys_send(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(delay), isLikeNone(delay) ? BigInt(0) : delay, ptr5, len5, ptr6, len6);
|
|
1057
748
|
if (ret[2]) {
|
|
1058
749
|
throw takeFromExternrefTable0(ret[1]);
|
|
1059
750
|
}
|
|
1060
751
|
return takeFromExternrefTable0(ret[0]);
|
|
1061
752
|
}
|
|
1062
753
|
/**
|
|
1063
|
-
* @param {string}
|
|
1064
|
-
* @param {string} handler
|
|
754
|
+
* @param {string} key
|
|
1065
755
|
* @param {Uint8Array} buffer
|
|
1066
|
-
* @param {string | null | undefined} key
|
|
1067
|
-
* @param {WasmHeader[]} headers
|
|
1068
|
-
* @param {bigint | null} [delay]
|
|
1069
|
-
* @param {string | null} [idempotency_key]
|
|
1070
|
-
* @param {string | null} [name]
|
|
1071
|
-
* @returns {WasmSendHandle}
|
|
1072
756
|
*/
|
|
1073
|
-
|
|
1074
|
-
const ptr0 = passStringToWasm0(
|
|
757
|
+
sys_set_state(key, buffer) {
|
|
758
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1075
759
|
const len0 = WASM_VECTOR_LEN;
|
|
1076
|
-
const ptr1 =
|
|
760
|
+
const ptr1 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
1077
761
|
const len1 = WASM_VECTOR_LEN;
|
|
1078
|
-
const
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
var len3 = WASM_VECTOR_LEN;
|
|
1082
|
-
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
1083
|
-
const len4 = WASM_VECTOR_LEN;
|
|
1084
|
-
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1085
|
-
var len5 = WASM_VECTOR_LEN;
|
|
1086
|
-
var ptr6 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1087
|
-
var len6 = WASM_VECTOR_LEN;
|
|
1088
|
-
const ret = wasm.wasmvm_sys_send(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(delay), isLikeNone(delay) ? BigInt(0) : delay, ptr5, len5, ptr6, len6);
|
|
1089
|
-
if (ret[2]) {
|
|
1090
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
762
|
+
const ret = wasm.wasmvm_sys_set_state(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
763
|
+
if (ret[1]) {
|
|
764
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1091
765
|
}
|
|
1092
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1093
766
|
}
|
|
1094
767
|
/**
|
|
1095
|
-
* @
|
|
768
|
+
* @param {string} signal_name
|
|
769
|
+
* @returns {number}
|
|
1096
770
|
*/
|
|
1097
|
-
|
|
1098
|
-
const
|
|
771
|
+
sys_signal(signal_name) {
|
|
772
|
+
const ptr0 = passStringToWasm0(signal_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
773
|
+
const len0 = WASM_VECTOR_LEN;
|
|
774
|
+
const ret = wasm.wasmvm_sys_signal(this.__wbg_ptr, ptr0, len0);
|
|
1099
775
|
if (ret[2]) {
|
|
1100
776
|
throw takeFromExternrefTable0(ret[1]);
|
|
1101
777
|
}
|
|
1102
|
-
return
|
|
778
|
+
return ret[0] >>> 0;
|
|
1103
779
|
}
|
|
1104
780
|
/**
|
|
1105
781
|
* @param {bigint} millis
|
|
@@ -1115,83 +791,211 @@ export class WasmVM {
|
|
|
1115
791
|
}
|
|
1116
792
|
return ret[0] >>> 0;
|
|
1117
793
|
}
|
|
794
|
+
/**
|
|
795
|
+
* @param {WasmFailure} value
|
|
796
|
+
*/
|
|
797
|
+
sys_write_output_failure(value) {
|
|
798
|
+
const ret = wasm.wasmvm_sys_write_output_failure(this.__wbg_ptr, value);
|
|
799
|
+
if (ret[1]) {
|
|
800
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* @param {Uint8Array} buffer
|
|
805
|
+
*/
|
|
806
|
+
sys_write_output_success(buffer) {
|
|
807
|
+
const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
808
|
+
const len0 = WASM_VECTOR_LEN;
|
|
809
|
+
const ret = wasm.wasmvm_sys_write_output_success(this.__wbg_ptr, ptr0, len0);
|
|
810
|
+
if (ret[1]) {
|
|
811
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* @param {number} handle
|
|
816
|
+
* @returns {WasmAsyncResultValue}
|
|
817
|
+
*/
|
|
818
|
+
take_notification(handle) {
|
|
819
|
+
const ret = wasm.wasmvm_take_notification(this.__wbg_ptr, handle);
|
|
820
|
+
if (ret[2]) {
|
|
821
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
822
|
+
}
|
|
823
|
+
return takeFromExternrefTable0(ret[0]);
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @returns {any}
|
|
827
|
+
*/
|
|
828
|
+
take_output() {
|
|
829
|
+
const ret = wasm.wasmvm_take_output(this.__wbg_ptr);
|
|
830
|
+
return ret;
|
|
831
|
+
}
|
|
1118
832
|
}
|
|
833
|
+
if (Symbol.dispose) WasmVM.prototype[Symbol.dispose] = WasmVM.prototype.free;
|
|
1119
834
|
|
|
1120
|
-
|
|
835
|
+
/**
|
|
836
|
+
* @returns {number}
|
|
837
|
+
*/
|
|
838
|
+
export function cancel_handle() {
|
|
839
|
+
const ret = wasm.cancel_handle();
|
|
840
|
+
return ret >>> 0;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* This will set the log level of the overall log subscriber.
|
|
845
|
+
* @param {LogLevel} level
|
|
846
|
+
*/
|
|
847
|
+
export function set_log_level(level) {
|
|
848
|
+
wasm.set_log_level(level);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Setups the WASM module
|
|
853
|
+
*/
|
|
854
|
+
export function start() {
|
|
855
|
+
wasm.start();
|
|
856
|
+
}
|
|
857
|
+
export function __wbg_Error_bce6d499ff0a4aff(arg0, arg1) {
|
|
858
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
859
|
+
return ret;
|
|
860
|
+
}
|
|
861
|
+
export function __wbg_Number_b7972a139bfbfdf0(arg0) {
|
|
862
|
+
const ret = Number(arg0);
|
|
863
|
+
return ret;
|
|
864
|
+
}
|
|
865
|
+
export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
1121
866
|
const ret = String(arg1);
|
|
1122
867
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1123
868
|
const len1 = WASM_VECTOR_LEN;
|
|
1124
869
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1125
870
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
const ret =
|
|
871
|
+
}
|
|
872
|
+
export function __wbg___wbindgen_bigint_get_as_i64_410e28c7b761ad83(arg0, arg1) {
|
|
873
|
+
const v = arg1;
|
|
874
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
875
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
876
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
877
|
+
}
|
|
878
|
+
export function __wbg___wbindgen_boolean_get_2304fb8c853028c8(arg0) {
|
|
879
|
+
const v = arg0;
|
|
880
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
881
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
882
|
+
}
|
|
883
|
+
export function __wbg___wbindgen_debug_string_edece8177ad01481(arg0, arg1) {
|
|
884
|
+
const ret = debugString(arg1);
|
|
885
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
886
|
+
const len1 = WASM_VECTOR_LEN;
|
|
887
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
888
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
889
|
+
}
|
|
890
|
+
export function __wbg___wbindgen_in_07056af4f902c445(arg0, arg1) {
|
|
891
|
+
const ret = arg0 in arg1;
|
|
1130
892
|
return ret;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
const ret = arg0.call(arg1);
|
|
893
|
+
}
|
|
894
|
+
export function __wbg___wbindgen_is_bigint_aeae3893f30ed54e(arg0) {
|
|
895
|
+
const ret = typeof(arg0) === 'bigint';
|
|
1135
896
|
return ret;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
const ret = arg0.call(arg1, arg2);
|
|
897
|
+
}
|
|
898
|
+
export function __wbg___wbindgen_is_function_5cd60d5cf78b4eef(arg0) {
|
|
899
|
+
const ret = typeof(arg0) === 'function';
|
|
1140
900
|
return ret;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
const ret =
|
|
901
|
+
}
|
|
902
|
+
export function __wbg___wbindgen_is_object_b4593df85baada48(arg0) {
|
|
903
|
+
const val = arg0;
|
|
904
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
1145
905
|
return ret;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
const ret = arg0.done;
|
|
906
|
+
}
|
|
907
|
+
export function __wbg___wbindgen_is_string_dde0fd9020db4434(arg0) {
|
|
908
|
+
const ret = typeof(arg0) === 'string';
|
|
1150
909
|
return ret;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
910
|
+
}
|
|
911
|
+
export function __wbg___wbindgen_is_undefined_35bb9f4c7fd651d5(arg0) {
|
|
912
|
+
const ret = arg0 === undefined;
|
|
913
|
+
return ret;
|
|
914
|
+
}
|
|
915
|
+
export function __wbg___wbindgen_jsval_eq_c0ed08b3e0f393b9(arg0, arg1) {
|
|
916
|
+
const ret = arg0 === arg1;
|
|
917
|
+
return ret;
|
|
918
|
+
}
|
|
919
|
+
export function __wbg___wbindgen_jsval_loose_eq_0ad77b7717db155c(arg0, arg1) {
|
|
920
|
+
const ret = arg0 == arg1;
|
|
921
|
+
return ret;
|
|
922
|
+
}
|
|
923
|
+
export function __wbg___wbindgen_number_get_f73a1244370fcc2c(arg0, arg1) {
|
|
924
|
+
const obj = arg1;
|
|
925
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
926
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
927
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
928
|
+
}
|
|
929
|
+
export function __wbg___wbindgen_string_get_d109740c0d18f4d7(arg0, arg1) {
|
|
930
|
+
const obj = arg1;
|
|
931
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
932
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
933
|
+
var len1 = WASM_VECTOR_LEN;
|
|
934
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
935
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
936
|
+
}
|
|
937
|
+
export function __wbg___wbindgen_throw_9c31b086c2b26051(arg0, arg1) {
|
|
938
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
939
|
+
}
|
|
940
|
+
export function __wbg_call_13665d9f14390edc() { return handleError(function (arg0, arg1) {
|
|
941
|
+
const ret = arg0.call(arg1);
|
|
942
|
+
return ret;
|
|
943
|
+
}, arguments); }
|
|
944
|
+
export function __wbg_call_dfde26266607c996() { return handleError(function (arg0, arg1, arg2) {
|
|
945
|
+
const ret = arg0.call(arg1, arg2);
|
|
946
|
+
return ret;
|
|
947
|
+
}, arguments); }
|
|
948
|
+
export function __wbg_crypto_38df2bab126b63dc(arg0) {
|
|
949
|
+
const ret = arg0.crypto;
|
|
950
|
+
return ret;
|
|
951
|
+
}
|
|
952
|
+
export function __wbg_done_54b8da57023b7ed2(arg0) {
|
|
953
|
+
const ret = arg0.done;
|
|
954
|
+
return ret;
|
|
955
|
+
}
|
|
956
|
+
export function __wbg_entries_564a7e8b1e54ede5(arg0) {
|
|
957
|
+
const ret = Object.entries(arg0);
|
|
958
|
+
return ret;
|
|
959
|
+
}
|
|
960
|
+
export function __wbg_error_a6fa202b58aa1cd3(arg0, arg1) {
|
|
961
|
+
let deferred0_0;
|
|
962
|
+
let deferred0_1;
|
|
963
|
+
try {
|
|
964
|
+
deferred0_0 = arg0;
|
|
1158
965
|
deferred0_1 = arg1;
|
|
1159
966
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
1160
967
|
} finally {
|
|
1161
968
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1162
969
|
}
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
export function __wbg_from_2a5d3e218e67aa85(arg0) {
|
|
970
|
+
}
|
|
971
|
+
export function __wbg_from_fa561fa561dc8031(arg0) {
|
|
1166
972
|
const ret = Array.from(arg0);
|
|
1167
973
|
return ret;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
export function __wbg_getRandomValues_b3f15fcbfabb0f8b() { return handleError(function (arg0, arg1) {
|
|
974
|
+
}
|
|
975
|
+
export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
|
|
1171
976
|
arg0.getRandomValues(arg1);
|
|
1172
|
-
}, arguments) }
|
|
1173
|
-
|
|
1174
|
-
export function __wbg_getTime_46267b1c24877e30(arg0) {
|
|
977
|
+
}, arguments); }
|
|
978
|
+
export function __wbg_getTime_09f1dd40a44edb30(arg0) {
|
|
1175
979
|
const ret = arg0.getTime();
|
|
1176
980
|
return ret;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
export function __wbg_get_67b2ba62fc30de12() { return handleError(function (arg0, arg1) {
|
|
981
|
+
}
|
|
982
|
+
export function __wbg_get_3e9a707ab7d352eb() { return handleError(function (arg0, arg1) {
|
|
1180
983
|
const ret = Reflect.get(arg0, arg1);
|
|
1181
984
|
return ret;
|
|
1182
|
-
}, arguments) }
|
|
1183
|
-
|
|
1184
|
-
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
985
|
+
}, arguments); }
|
|
986
|
+
export function __wbg_get_98fdf51d029a75eb(arg0, arg1) {
|
|
1185
987
|
const ret = arg0[arg1 >>> 0];
|
|
1186
988
|
return ret;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
|
|
989
|
+
}
|
|
990
|
+
export function __wbg_get_unchecked_1dfe6d05ad91d9b7(arg0, arg1) {
|
|
991
|
+
const ret = arg0[arg1 >>> 0];
|
|
992
|
+
return ret;
|
|
993
|
+
}
|
|
994
|
+
export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
|
|
1190
995
|
const ret = arg0[arg1];
|
|
1191
996
|
return ret;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
|
|
997
|
+
}
|
|
998
|
+
export function __wbg_instanceof_ArrayBuffer_53db37b06f6b9afe(arg0) {
|
|
1195
999
|
let result;
|
|
1196
1000
|
try {
|
|
1197
1001
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1200,9 +1004,8 @@ export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
|
|
|
1200
1004
|
}
|
|
1201
1005
|
const ret = result;
|
|
1202
1006
|
return ret;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
|
|
1007
|
+
}
|
|
1008
|
+
export function __wbg_instanceof_Uint8Array_abd07d4bd221d50b(arg0) {
|
|
1206
1009
|
let result;
|
|
1207
1010
|
try {
|
|
1208
1011
|
result = arg0 instanceof Uint8Array;
|
|
@@ -1211,300 +1014,397 @@ export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
|
|
|
1211
1014
|
}
|
|
1212
1015
|
const ret = result;
|
|
1213
1016
|
return ret;
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
export function __wbg_isArray_a1eab7e0d067391b(arg0) {
|
|
1017
|
+
}
|
|
1018
|
+
export function __wbg_isArray_94898ed3aad6947b(arg0) {
|
|
1217
1019
|
const ret = Array.isArray(arg0);
|
|
1218
1020
|
return ret;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
|
|
1021
|
+
}
|
|
1022
|
+
export function __wbg_isSafeInteger_01e964d144ad3a55(arg0) {
|
|
1222
1023
|
const ret = Number.isSafeInteger(arg0);
|
|
1223
1024
|
return ret;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
export function __wbg_iterator_9a24c88df860dc65() {
|
|
1025
|
+
}
|
|
1026
|
+
export function __wbg_iterator_1441b47f341dc34f() {
|
|
1227
1027
|
const ret = Symbol.iterator;
|
|
1228
1028
|
return ret;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
export function __wbg_length_a446193dc22c12f8(arg0) {
|
|
1029
|
+
}
|
|
1030
|
+
export function __wbg_length_2591a0f4f659a55c(arg0) {
|
|
1232
1031
|
const ret = arg0.length;
|
|
1233
1032
|
return ret;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
1033
|
+
}
|
|
1034
|
+
export function __wbg_length_56fcd3e2b7e0299d(arg0) {
|
|
1237
1035
|
const ret = arg0.length;
|
|
1238
1036
|
return ret;
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
export function __wbg_msCrypto_d562bbe83e0d4b91(arg0) {
|
|
1037
|
+
}
|
|
1038
|
+
export function __wbg_msCrypto_bd5a034af96bcba6(arg0) {
|
|
1242
1039
|
const ret = arg0.msCrypto;
|
|
1243
1040
|
return ret;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
export function __wbg_new0_f788a2397c7ca929() {
|
|
1247
|
-
const ret = new Date();
|
|
1248
|
-
return ret;
|
|
1249
|
-
};
|
|
1250
|
-
|
|
1251
|
-
export function __wbg_new_405e22f390576ce2() {
|
|
1041
|
+
}
|
|
1042
|
+
export function __wbg_new_02d162bc6cf02f60() {
|
|
1252
1043
|
const ret = new Object();
|
|
1253
1044
|
return ret;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
const ret = new Array();
|
|
1045
|
+
}
|
|
1046
|
+
export function __wbg_new_0_2722fcdb71a888a6() {
|
|
1047
|
+
const ret = new Date();
|
|
1258
1048
|
return ret;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
export function __wbg_new_8a6f238a6ece86ea() {
|
|
1049
|
+
}
|
|
1050
|
+
export function __wbg_new_227d7c05414eb861() {
|
|
1262
1051
|
const ret = new Error();
|
|
1263
1052
|
return ret;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
const ret = new Uint8Array(arg0);
|
|
1053
|
+
}
|
|
1054
|
+
export function __wbg_new_310879b66b6e95e1() {
|
|
1055
|
+
const ret = new Array();
|
|
1268
1056
|
return ret;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1057
|
+
}
|
|
1058
|
+
export function __wbg_new_7ddec6de44ff8f5d(arg0) {
|
|
1059
|
+
const ret = new Uint8Array(arg0);
|
|
1273
1060
|
return ret;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1061
|
+
}
|
|
1062
|
+
export function __wbg_new_from_slice_269e35316ed2d061(arg0, arg1) {
|
|
1063
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1278
1064
|
return ret;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
export function __wbg_newwithlength_a381634e90c276d4(arg0) {
|
|
1065
|
+
}
|
|
1066
|
+
export function __wbg_new_with_length_99887c91eae4abab(arg0) {
|
|
1282
1067
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1283
1068
|
return ret;
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
export function __wbg_next_25feadfc0913fea9(arg0) {
|
|
1069
|
+
}
|
|
1070
|
+
export function __wbg_next_2a4e19f4f5083b0f(arg0) {
|
|
1287
1071
|
const ret = arg0.next;
|
|
1288
1072
|
return ret;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
export function __wbg_next_6574e1a8a62d1055() { return handleError(function (arg0) {
|
|
1073
|
+
}
|
|
1074
|
+
export function __wbg_next_6429a146bf756f93() { return handleError(function (arg0) {
|
|
1292
1075
|
const ret = arg0.next();
|
|
1293
1076
|
return ret;
|
|
1294
|
-
}, arguments) }
|
|
1295
|
-
|
|
1296
|
-
export function __wbg_node_e1f24f89a7336c2e(arg0) {
|
|
1077
|
+
}, arguments); }
|
|
1078
|
+
export function __wbg_node_84ea875411254db1(arg0) {
|
|
1297
1079
|
const ret = arg0.node;
|
|
1298
1080
|
return ret;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
export function __wbg_now_807e54c39636c349() {
|
|
1081
|
+
}
|
|
1082
|
+
export function __wbg_now_81363d44c96dd239() {
|
|
1302
1083
|
const ret = Date.now();
|
|
1303
1084
|
return ret;
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
export function __wbg_process_3975fd6c72f520aa(arg0) {
|
|
1085
|
+
}
|
|
1086
|
+
export function __wbg_process_44c7a14e11e9f69e(arg0) {
|
|
1307
1087
|
const ret = arg0.process;
|
|
1308
1088
|
return ret;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1089
|
+
}
|
|
1090
|
+
export function __wbg_prototypesetcall_5f9bdc8d75e07276(arg0, arg1, arg2) {
|
|
1091
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1092
|
+
}
|
|
1093
|
+
export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
|
|
1312
1094
|
arg0.randomFillSync(arg1);
|
|
1313
|
-
}, arguments) }
|
|
1314
|
-
|
|
1315
|
-
export function __wbg_require_b74f47fc2d022fd6() { return handleError(function () {
|
|
1095
|
+
}, arguments); }
|
|
1096
|
+
export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function () {
|
|
1316
1097
|
const ret = module.require;
|
|
1317
1098
|
return ret;
|
|
1318
|
-
}, arguments) }
|
|
1319
|
-
|
|
1320
|
-
export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
|
|
1321
|
-
arg0[arg1 >>> 0] = arg2;
|
|
1322
|
-
};
|
|
1323
|
-
|
|
1324
|
-
export function __wbg_set_3807d5f0bfc24aa7(arg0, arg1, arg2) {
|
|
1325
|
-
arg0[arg1] = arg2;
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
|
-
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
1099
|
+
}, arguments); }
|
|
1100
|
+
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1329
1101
|
arg0[arg1] = arg2;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
|
|
1102
|
+
}
|
|
1103
|
+
export function __wbg_set_78ea6a19f4818587(arg0, arg1, arg2) {
|
|
1104
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1105
|
+
}
|
|
1106
|
+
export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
|
|
1337
1107
|
const ret = arg1.stack;
|
|
1338
1108
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1339
1109
|
const len1 = WASM_VECTOR_LEN;
|
|
1340
1110
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1341
1111
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
|
|
1345
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1346
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1347
|
-
};
|
|
1348
|
-
|
|
1349
|
-
export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
|
|
1112
|
+
}
|
|
1113
|
+
export function __wbg_static_accessor_GLOBAL_THIS_02344c9b09eb08a9() {
|
|
1350
1114
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1351
1115
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
|
|
1116
|
+
}
|
|
1117
|
+
export function __wbg_static_accessor_GLOBAL_ac6d4ac874d5cd54() {
|
|
1118
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1119
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1120
|
+
}
|
|
1121
|
+
export function __wbg_static_accessor_SELF_9b2406c23aeb2023() {
|
|
1355
1122
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1356
1123
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
|
|
1124
|
+
}
|
|
1125
|
+
export function __wbg_static_accessor_WINDOW_b34d2126934e16ba() {
|
|
1360
1126
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1361
1127
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
|
|
1128
|
+
}
|
|
1129
|
+
export function __wbg_subarray_7c6a0da8f3b4a1ba(arg0, arg1, arg2) {
|
|
1365
1130
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1366
1131
|
return ret;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
|
|
1132
|
+
}
|
|
1133
|
+
export function __wbg_value_9cc0518af87a489c(arg0) {
|
|
1370
1134
|
const ret = arg0.value;
|
|
1371
1135
|
return ret;
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
export function __wbg_versions_4e31226f5e8dc909(arg0) {
|
|
1136
|
+
}
|
|
1137
|
+
export function __wbg_versions_276b2795b1c6a219(arg0) {
|
|
1375
1138
|
const ret = arg0.versions;
|
|
1376
1139
|
return ret;
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
};
|
|
1382
|
-
|
|
1140
|
+
}
|
|
1141
|
+
export function __wbg_vm_log_702db15d7203ea28(arg0, arg1, arg2, arg3) {
|
|
1142
|
+
vm_log(arg0, getArrayU8FromWasm0(arg1, arg2), arg3 === Number.MAX_SAFE_INTEGER ? undefined : arg3);
|
|
1143
|
+
}
|
|
1383
1144
|
export function __wbg_wasmheader_new(arg0) {
|
|
1384
1145
|
const ret = WasmHeader.__wrap(arg0);
|
|
1385
1146
|
return ret;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1147
|
+
}
|
|
1388
1148
|
export function __wbg_wasmheader_unwrap(arg0) {
|
|
1389
1149
|
const ret = WasmHeader.__unwrap(arg0);
|
|
1390
1150
|
return ret;
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
const ret =
|
|
1151
|
+
}
|
|
1152
|
+
export function __wbindgen_cast_0000000000000001(arg0) {
|
|
1153
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1154
|
+
const ret = arg0;
|
|
1395
1155
|
return ret;
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
const
|
|
1400
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1401
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1402
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1403
|
-
};
|
|
1404
|
-
|
|
1405
|
-
export function __wbindgen_boolean_get(arg0) {
|
|
1406
|
-
const v = arg0;
|
|
1407
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
1156
|
+
}
|
|
1157
|
+
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1158
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1159
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1408
1160
|
return ret;
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
const ret =
|
|
1413
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1414
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1415
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1416
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1417
|
-
};
|
|
1418
|
-
|
|
1419
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
|
1420
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1161
|
+
}
|
|
1162
|
+
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1163
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1164
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1421
1165
|
return ret;
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
const ret = arg0
|
|
1166
|
+
}
|
|
1167
|
+
export function __wbindgen_cast_0000000000000004(arg0) {
|
|
1168
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1169
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1426
1170
|
return ret;
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1171
|
+
}
|
|
1429
1172
|
export function __wbindgen_init_externref_table() {
|
|
1430
|
-
const table = wasm.
|
|
1173
|
+
const table = wasm.__wbindgen_externrefs;
|
|
1431
1174
|
const offset = table.grow(4);
|
|
1432
1175
|
table.set(0, undefined);
|
|
1433
1176
|
table.set(offset + 0, undefined);
|
|
1434
1177
|
table.set(offset + 1, null);
|
|
1435
1178
|
table.set(offset + 2, true);
|
|
1436
1179
|
table.set(offset + 3, false);
|
|
1437
|
-
|
|
1438
|
-
|
|
1180
|
+
}
|
|
1181
|
+
const WasmHeaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1182
|
+
? { register: () => {}, unregister: () => {} }
|
|
1183
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmheader_free(ptr, 1));
|
|
1184
|
+
const WasmIdentityVerifierFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1185
|
+
? { register: () => {}, unregister: () => {} }
|
|
1186
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmidentityverifier_free(ptr, 1));
|
|
1187
|
+
const WasmInputFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1188
|
+
? { register: () => {}, unregister: () => {} }
|
|
1189
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasminput_free(ptr, 1));
|
|
1190
|
+
const WasmResponseHeadFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1191
|
+
? { register: () => {}, unregister: () => {} }
|
|
1192
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmresponsehead_free(ptr, 1));
|
|
1193
|
+
const WasmVMFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1194
|
+
? { register: () => {}, unregister: () => {} }
|
|
1195
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmvm_free(ptr, 1));
|
|
1439
1196
|
|
|
1440
|
-
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1443
|
-
|
|
1197
|
+
function addToExternrefTable0(obj) {
|
|
1198
|
+
const idx = wasm.__externref_table_alloc();
|
|
1199
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
1200
|
+
return idx;
|
|
1201
|
+
}
|
|
1444
1202
|
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1203
|
+
function debugString(val) {
|
|
1204
|
+
// primitive types
|
|
1205
|
+
const type = typeof val;
|
|
1206
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1207
|
+
return `${val}`;
|
|
1208
|
+
}
|
|
1209
|
+
if (type == 'string') {
|
|
1210
|
+
return `"${val}"`;
|
|
1211
|
+
}
|
|
1212
|
+
if (type == 'symbol') {
|
|
1213
|
+
const description = val.description;
|
|
1214
|
+
if (description == null) {
|
|
1215
|
+
return 'Symbol';
|
|
1216
|
+
} else {
|
|
1217
|
+
return `Symbol(${description})`;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
if (type == 'function') {
|
|
1221
|
+
const name = val.name;
|
|
1222
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1223
|
+
return `Function(${name})`;
|
|
1224
|
+
} else {
|
|
1225
|
+
return 'Function';
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
// objects
|
|
1229
|
+
if (Array.isArray(val)) {
|
|
1230
|
+
const length = val.length;
|
|
1231
|
+
let debug = '[';
|
|
1232
|
+
if (length > 0) {
|
|
1233
|
+
debug += debugString(val[0]);
|
|
1234
|
+
}
|
|
1235
|
+
for(let i = 1; i < length; i++) {
|
|
1236
|
+
debug += ', ' + debugString(val[i]);
|
|
1237
|
+
}
|
|
1238
|
+
debug += ']';
|
|
1239
|
+
return debug;
|
|
1240
|
+
}
|
|
1241
|
+
// Test for built-in
|
|
1242
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1243
|
+
let className;
|
|
1244
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1245
|
+
className = builtInMatches[1];
|
|
1246
|
+
} else {
|
|
1247
|
+
// Failed to match the standard '[object ClassName]'
|
|
1248
|
+
return toString.call(val);
|
|
1249
|
+
}
|
|
1250
|
+
if (className == 'Object') {
|
|
1251
|
+
// we're a user defined class or Object
|
|
1252
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1253
|
+
// easier than looping through ownProperties of `val`.
|
|
1254
|
+
try {
|
|
1255
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1256
|
+
} catch (_) {
|
|
1257
|
+
return 'Object';
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
// errors
|
|
1261
|
+
if (val instanceof Error) {
|
|
1262
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1263
|
+
}
|
|
1264
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1265
|
+
return className;
|
|
1266
|
+
}
|
|
1449
1267
|
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
const
|
|
1453
|
-
|
|
1454
|
-
|
|
1268
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1269
|
+
ptr = ptr >>> 0;
|
|
1270
|
+
const mem = getDataViewMemory0();
|
|
1271
|
+
const result = [];
|
|
1272
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1273
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
1274
|
+
}
|
|
1275
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
1276
|
+
return result;
|
|
1277
|
+
}
|
|
1455
1278
|
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
return
|
|
1459
|
-
}
|
|
1279
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1280
|
+
ptr = ptr >>> 0;
|
|
1281
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1282
|
+
}
|
|
1460
1283
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1284
|
+
let cachedDataViewMemory0 = null;
|
|
1285
|
+
function getDataViewMemory0() {
|
|
1286
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1287
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1288
|
+
}
|
|
1289
|
+
return cachedDataViewMemory0;
|
|
1290
|
+
}
|
|
1465
1291
|
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
};
|
|
1292
|
+
function getStringFromWasm0(ptr, len) {
|
|
1293
|
+
return decodeText(ptr >>> 0, len);
|
|
1294
|
+
}
|
|
1470
1295
|
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1296
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1297
|
+
function getUint8ArrayMemory0() {
|
|
1298
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1299
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1300
|
+
}
|
|
1301
|
+
return cachedUint8ArrayMemory0;
|
|
1302
|
+
}
|
|
1475
1303
|
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
}
|
|
1304
|
+
function handleError(f, args) {
|
|
1305
|
+
try {
|
|
1306
|
+
return f.apply(this, args);
|
|
1307
|
+
} catch (e) {
|
|
1308
|
+
const idx = addToExternrefTable0(e);
|
|
1309
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1480
1312
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1485
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1486
|
-
};
|
|
1313
|
+
function isLikeNone(x) {
|
|
1314
|
+
return x === undefined || x === null;
|
|
1315
|
+
}
|
|
1487
1316
|
|
|
1488
|
-
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1491
|
-
|
|
1317
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1318
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1319
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1320
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1321
|
+
return ptr;
|
|
1322
|
+
}
|
|
1492
1323
|
|
|
1493
|
-
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1324
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
1325
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
1326
|
+
for (let i = 0; i < array.length; i++) {
|
|
1327
|
+
const add = addToExternrefTable0(array[i]);
|
|
1328
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
1329
|
+
}
|
|
1330
|
+
WASM_VECTOR_LEN = array.length;
|
|
1331
|
+
return ptr;
|
|
1332
|
+
}
|
|
1501
1333
|
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1334
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1335
|
+
if (realloc === undefined) {
|
|
1336
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1337
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1338
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1339
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1340
|
+
return ptr;
|
|
1341
|
+
}
|
|
1506
1342
|
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1343
|
+
let len = arg.length;
|
|
1344
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1345
|
+
|
|
1346
|
+
const mem = getUint8ArrayMemory0();
|
|
1347
|
+
|
|
1348
|
+
let offset = 0;
|
|
1349
|
+
|
|
1350
|
+
for (; offset < len; offset++) {
|
|
1351
|
+
const code = arg.charCodeAt(offset);
|
|
1352
|
+
if (code > 0x7F) break;
|
|
1353
|
+
mem[ptr + offset] = code;
|
|
1354
|
+
}
|
|
1355
|
+
if (offset !== len) {
|
|
1356
|
+
if (offset !== 0) {
|
|
1357
|
+
arg = arg.slice(offset);
|
|
1358
|
+
}
|
|
1359
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1360
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1361
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1362
|
+
|
|
1363
|
+
offset += ret.written;
|
|
1364
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
WASM_VECTOR_LEN = offset;
|
|
1368
|
+
return ptr;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
function takeFromExternrefTable0(idx) {
|
|
1372
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1373
|
+
wasm.__externref_table_dealloc(idx);
|
|
1374
|
+
return value;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1378
|
+
cachedTextDecoder.decode();
|
|
1379
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1380
|
+
let numBytesDecoded = 0;
|
|
1381
|
+
function decodeText(ptr, len) {
|
|
1382
|
+
numBytesDecoded += len;
|
|
1383
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1384
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1385
|
+
cachedTextDecoder.decode();
|
|
1386
|
+
numBytesDecoded = len;
|
|
1387
|
+
}
|
|
1388
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1389
|
+
}
|
|
1510
1390
|
|
|
1391
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1392
|
+
|
|
1393
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1394
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1395
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1396
|
+
view.set(buf);
|
|
1397
|
+
return {
|
|
1398
|
+
read: arg.length,
|
|
1399
|
+
written: buf.length
|
|
1400
|
+
};
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
let WASM_VECTOR_LEN = 0;
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
let wasm;
|
|
1408
|
+
export function __wbg_set_wasm(val) {
|
|
1409
|
+
wasm = val;
|
|
1410
|
+
}
|