strictjs-runtime 2.0.7 → 2.0.10
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/index.js +205 -39
- package/package.json +1 -1
- package/pkg/README.md +0 -20
- package/pkg/package.json +0 -24
- package/pkg/strictjs_runtime.d.ts +0 -498
- package/pkg/strictjs_runtime.js +0 -2761
- package/pkg/strictjs_runtime_bg.wasm +0 -0
- package/pkg/strictjs_runtime_bg.wasm.d.ts +0 -207
package/pkg/strictjs_runtime.js
DELETED
|
@@ -1,2761 +0,0 @@
|
|
|
1
|
-
let wasm;
|
|
2
|
-
|
|
3
|
-
function addToExternrefTable0(obj) {
|
|
4
|
-
const idx = wasm.__externref_table_alloc();
|
|
5
|
-
wasm.__wbindgen_export_2.set(idx, obj);
|
|
6
|
-
return idx;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function handleError(f, args) {
|
|
10
|
-
try {
|
|
11
|
-
return f.apply(this, args);
|
|
12
|
-
} catch (e) {
|
|
13
|
-
const idx = addToExternrefTable0(e);
|
|
14
|
-
wasm.__wbindgen_exn_store(idx);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
19
|
-
|
|
20
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
21
|
-
|
|
22
|
-
let cachedUint8ArrayMemory0 = null;
|
|
23
|
-
|
|
24
|
-
function getUint8ArrayMemory0() {
|
|
25
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
26
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
27
|
-
}
|
|
28
|
-
return cachedUint8ArrayMemory0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function getStringFromWasm0(ptr, len) {
|
|
32
|
-
ptr = ptr >>> 0;
|
|
33
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
37
|
-
ptr = ptr >>> 0;
|
|
38
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function isLikeNone(x) {
|
|
42
|
-
return x === undefined || x === null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
46
|
-
? { register: () => {}, unregister: () => {} }
|
|
47
|
-
: new FinalizationRegistry(state => {
|
|
48
|
-
wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
52
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
53
|
-
const real = (...args) => {
|
|
54
|
-
// First up with a closure we increment the internal reference
|
|
55
|
-
// count. This ensures that the Rust closure environment won't
|
|
56
|
-
// be deallocated while we're invoking it.
|
|
57
|
-
state.cnt++;
|
|
58
|
-
const a = state.a;
|
|
59
|
-
state.a = 0;
|
|
60
|
-
try {
|
|
61
|
-
return f(a, state.b, ...args);
|
|
62
|
-
} finally {
|
|
63
|
-
if (--state.cnt === 0) {
|
|
64
|
-
wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
|
|
65
|
-
CLOSURE_DTORS.unregister(state);
|
|
66
|
-
} else {
|
|
67
|
-
state.a = a;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
real.original = state;
|
|
72
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
73
|
-
return real;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function debugString(val) {
|
|
77
|
-
// primitive types
|
|
78
|
-
const type = typeof val;
|
|
79
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
80
|
-
return `${val}`;
|
|
81
|
-
}
|
|
82
|
-
if (type == 'string') {
|
|
83
|
-
return `"${val}"`;
|
|
84
|
-
}
|
|
85
|
-
if (type == 'symbol') {
|
|
86
|
-
const description = val.description;
|
|
87
|
-
if (description == null) {
|
|
88
|
-
return 'Symbol';
|
|
89
|
-
} else {
|
|
90
|
-
return `Symbol(${description})`;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (type == 'function') {
|
|
94
|
-
const name = val.name;
|
|
95
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
96
|
-
return `Function(${name})`;
|
|
97
|
-
} else {
|
|
98
|
-
return 'Function';
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
// objects
|
|
102
|
-
if (Array.isArray(val)) {
|
|
103
|
-
const length = val.length;
|
|
104
|
-
let debug = '[';
|
|
105
|
-
if (length > 0) {
|
|
106
|
-
debug += debugString(val[0]);
|
|
107
|
-
}
|
|
108
|
-
for(let i = 1; i < length; i++) {
|
|
109
|
-
debug += ', ' + debugString(val[i]);
|
|
110
|
-
}
|
|
111
|
-
debug += ']';
|
|
112
|
-
return debug;
|
|
113
|
-
}
|
|
114
|
-
// Test for built-in
|
|
115
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
116
|
-
let className;
|
|
117
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
118
|
-
className = builtInMatches[1];
|
|
119
|
-
} else {
|
|
120
|
-
// Failed to match the standard '[object ClassName]'
|
|
121
|
-
return toString.call(val);
|
|
122
|
-
}
|
|
123
|
-
if (className == 'Object') {
|
|
124
|
-
// we're a user defined class or Object
|
|
125
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
126
|
-
// easier than looping through ownProperties of `val`.
|
|
127
|
-
try {
|
|
128
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
129
|
-
} catch (_) {
|
|
130
|
-
return 'Object';
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// errors
|
|
134
|
-
if (val instanceof Error) {
|
|
135
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
136
|
-
}
|
|
137
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
138
|
-
return className;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
let WASM_VECTOR_LEN = 0;
|
|
142
|
-
|
|
143
|
-
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
144
|
-
|
|
145
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
146
|
-
? function (arg, view) {
|
|
147
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
148
|
-
}
|
|
149
|
-
: function (arg, view) {
|
|
150
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
151
|
-
view.set(buf);
|
|
152
|
-
return {
|
|
153
|
-
read: arg.length,
|
|
154
|
-
written: buf.length
|
|
155
|
-
};
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
159
|
-
|
|
160
|
-
if (realloc === undefined) {
|
|
161
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
162
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
163
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
164
|
-
WASM_VECTOR_LEN = buf.length;
|
|
165
|
-
return ptr;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
let len = arg.length;
|
|
169
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
170
|
-
|
|
171
|
-
const mem = getUint8ArrayMemory0();
|
|
172
|
-
|
|
173
|
-
let offset = 0;
|
|
174
|
-
|
|
175
|
-
for (; offset < len; offset++) {
|
|
176
|
-
const code = arg.charCodeAt(offset);
|
|
177
|
-
if (code > 0x7F) break;
|
|
178
|
-
mem[ptr + offset] = code;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
if (offset !== len) {
|
|
182
|
-
if (offset !== 0) {
|
|
183
|
-
arg = arg.slice(offset);
|
|
184
|
-
}
|
|
185
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
186
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
187
|
-
const ret = encodeString(arg, view);
|
|
188
|
-
|
|
189
|
-
offset += ret.written;
|
|
190
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
WASM_VECTOR_LEN = offset;
|
|
194
|
-
return ptr;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
let cachedDataViewMemory0 = null;
|
|
198
|
-
|
|
199
|
-
function getDataViewMemory0() {
|
|
200
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
201
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
202
|
-
}
|
|
203
|
-
return cachedDataViewMemory0;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
let cachedUint16ArrayMemory0 = null;
|
|
207
|
-
|
|
208
|
-
function getUint16ArrayMemory0() {
|
|
209
|
-
if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
|
|
210
|
-
cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
|
|
211
|
-
}
|
|
212
|
-
return cachedUint16ArrayMemory0;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function getArrayU16FromWasm0(ptr, len) {
|
|
216
|
-
ptr = ptr >>> 0;
|
|
217
|
-
return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function takeFromExternrefTable0(idx) {
|
|
221
|
-
const value = wasm.__wbindgen_export_2.get(idx);
|
|
222
|
-
wasm.__externref_table_dealloc(idx);
|
|
223
|
-
return value;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function _assertChar(c) {
|
|
227
|
-
if (typeof(c) === 'number' && (c >= 0x110000 || (c >= 0xD800 && c < 0xE000))) throw new Error(`expected a valid Unicode scalar value, found ${c}`);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function _assertClass(instance, klass) {
|
|
231
|
-
if (!(instance instanceof klass)) {
|
|
232
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* @param {string} url
|
|
237
|
-
* @param {HeapType} return_type
|
|
238
|
-
* @returns {Promise<any>}
|
|
239
|
-
*/
|
|
240
|
-
export function strict_fetch(url, return_type) {
|
|
241
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
242
|
-
const len0 = WASM_VECTOR_LEN;
|
|
243
|
-
const ret = wasm.strict_fetch(ptr0, len0, return_type);
|
|
244
|
-
return ret;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
248
|
-
ptr = ptr >>> 0;
|
|
249
|
-
const mem = getDataViewMemory0();
|
|
250
|
-
const result = [];
|
|
251
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
252
|
-
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
253
|
-
}
|
|
254
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
255
|
-
return result;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
259
|
-
|
|
260
|
-
function getFloat64ArrayMemory0() {
|
|
261
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
262
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
263
|
-
}
|
|
264
|
-
return cachedFloat64ArrayMemory0;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
function passArrayF64ToWasm0(arg, malloc) {
|
|
268
|
-
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
269
|
-
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
270
|
-
WASM_VECTOR_LEN = arg.length;
|
|
271
|
-
return ptr;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
function getArrayF64FromWasm0(ptr, len) {
|
|
275
|
-
ptr = ptr >>> 0;
|
|
276
|
-
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* @param {any} config
|
|
280
|
-
* @returns {ThreadManager}
|
|
281
|
-
*/
|
|
282
|
-
export function init_thread_manager(config) {
|
|
283
|
-
const ret = wasm.init_thread_manager(config);
|
|
284
|
-
if (ret[2]) {
|
|
285
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
286
|
-
}
|
|
287
|
-
return ThreadManager.__wrap(ret[0]);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* @returns {any}
|
|
292
|
-
*/
|
|
293
|
-
export function get_memory() {
|
|
294
|
-
const ret = wasm.get_memory();
|
|
295
|
-
return ret;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
function __wbg_adapter_40(arg0, arg1) {
|
|
299
|
-
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36f2658aa7b0e9c1(arg0, arg1);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
function __wbg_adapter_43(arg0, arg1, arg2) {
|
|
303
|
-
wasm.closure71_externref_shim(arg0, arg1, arg2);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function __wbg_adapter_260(arg0, arg1, arg2, arg3) {
|
|
307
|
-
wasm.closure93_externref_shim(arg0, arg1, arg2, arg3);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11}
|
|
312
|
-
*/
|
|
313
|
-
export const HeapType = Object.freeze({
|
|
314
|
-
Number: 0, "0": "Number",
|
|
315
|
-
U8: 1, "1": "U8",
|
|
316
|
-
I8: 2, "2": "I8",
|
|
317
|
-
U16: 3, "3": "U16",
|
|
318
|
-
I16: 4, "4": "I16",
|
|
319
|
-
U32: 5, "5": "U32",
|
|
320
|
-
I32: 6, "6": "I32",
|
|
321
|
-
Bool: 7, "7": "Bool",
|
|
322
|
-
U64: 8, "8": "U64",
|
|
323
|
-
I64: 9, "9": "I64",
|
|
324
|
-
Str: 10, "10": "Str",
|
|
325
|
-
Any: 11, "11": "Any",
|
|
326
|
-
});
|
|
327
|
-
/**
|
|
328
|
-
* @enum {0 | 1 | 2}
|
|
329
|
-
*/
|
|
330
|
-
export const StringEncoding = Object.freeze({
|
|
331
|
-
Utf8: 0, "0": "Utf8",
|
|
332
|
-
Utf16: 1, "1": "Utf16",
|
|
333
|
-
Ascii: 2, "2": "Ascii",
|
|
334
|
-
});
|
|
335
|
-
/**
|
|
336
|
-
* @enum {0 | 1 | 2 | 3}
|
|
337
|
-
*/
|
|
338
|
-
export const ThreadPriority = Object.freeze({
|
|
339
|
-
Low: 0, "0": "Low",
|
|
340
|
-
Normal: 1, "1": "Normal",
|
|
341
|
-
High: 2, "2": "High",
|
|
342
|
-
Critical: 3, "3": "Critical",
|
|
343
|
-
});
|
|
344
|
-
/**
|
|
345
|
-
* @enum {0 | 1 | 2 | 3 | 4}
|
|
346
|
-
*/
|
|
347
|
-
export const ThreadState = Object.freeze({
|
|
348
|
-
Idle: 0, "0": "Idle",
|
|
349
|
-
Running: 1, "1": "Running",
|
|
350
|
-
Paused: 2, "2": "Paused",
|
|
351
|
-
Completed: 3, "3": "Completed",
|
|
352
|
-
Error: 4, "4": "Error",
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
const ComputedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
356
|
-
? { register: () => {}, unregister: () => {} }
|
|
357
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_computed_free(ptr >>> 0, 1));
|
|
358
|
-
|
|
359
|
-
export class Computed {
|
|
360
|
-
|
|
361
|
-
__destroy_into_raw() {
|
|
362
|
-
const ptr = this.__wbg_ptr;
|
|
363
|
-
this.__wbg_ptr = 0;
|
|
364
|
-
ComputedFinalization.unregister(this);
|
|
365
|
-
return ptr;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
free() {
|
|
369
|
-
const ptr = this.__destroy_into_raw();
|
|
370
|
-
wasm.__wbg_computed_free(ptr, 0);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
const ReactiveCellFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
375
|
-
? { register: () => {}, unregister: () => {} }
|
|
376
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_reactivecell_free(ptr >>> 0, 1));
|
|
377
|
-
|
|
378
|
-
export class ReactiveCell {
|
|
379
|
-
|
|
380
|
-
__destroy_into_raw() {
|
|
381
|
-
const ptr = this.__wbg_ptr;
|
|
382
|
-
this.__wbg_ptr = 0;
|
|
383
|
-
ReactiveCellFinalization.unregister(this);
|
|
384
|
-
return ptr;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
free() {
|
|
388
|
-
const ptr = this.__destroy_into_raw();
|
|
389
|
-
wasm.__wbg_reactivecell_free(ptr, 0);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
const ReactiveSystemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
394
|
-
? { register: () => {}, unregister: () => {} }
|
|
395
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_reactivesystem_free(ptr >>> 0, 1));
|
|
396
|
-
|
|
397
|
-
export class ReactiveSystem {
|
|
398
|
-
|
|
399
|
-
__destroy_into_raw() {
|
|
400
|
-
const ptr = this.__wbg_ptr;
|
|
401
|
-
this.__wbg_ptr = 0;
|
|
402
|
-
ReactiveSystemFinalization.unregister(this);
|
|
403
|
-
return ptr;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
free() {
|
|
407
|
-
const ptr = this.__destroy_into_raw();
|
|
408
|
-
wasm.__wbg_reactivesystem_free(ptr, 0);
|
|
409
|
-
}
|
|
410
|
-
constructor() {
|
|
411
|
-
const ret = wasm.reactivesystem_new();
|
|
412
|
-
this.__wbg_ptr = ret >>> 0;
|
|
413
|
-
ReactiveSystemFinalization.register(this, this.__wbg_ptr, this);
|
|
414
|
-
return this;
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* @param {string} name
|
|
418
|
-
* @param {number} initial_value
|
|
419
|
-
* @param {HeapType} heap_type
|
|
420
|
-
*/
|
|
421
|
-
defineCell(name, initial_value, heap_type) {
|
|
422
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
-
const len0 = WASM_VECTOR_LEN;
|
|
424
|
-
const ret = wasm.reactivesystem_defineCell(this.__wbg_ptr, ptr0, len0, initial_value, heap_type);
|
|
425
|
-
if (ret[1]) {
|
|
426
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* @param {string} name
|
|
431
|
-
* @param {number} new_value
|
|
432
|
-
*/
|
|
433
|
-
setCell(name, new_value) {
|
|
434
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
435
|
-
const len0 = WASM_VECTOR_LEN;
|
|
436
|
-
const ret = wasm.reactivesystem_setCell(this.__wbg_ptr, ptr0, len0, new_value);
|
|
437
|
-
if (ret[1]) {
|
|
438
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* @param {string} name
|
|
443
|
-
* @returns {number}
|
|
444
|
-
*/
|
|
445
|
-
getCell(name) {
|
|
446
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
447
|
-
const len0 = WASM_VECTOR_LEN;
|
|
448
|
-
const ret = wasm.reactivesystem_getCell(this.__wbg_ptr, ptr0, len0);
|
|
449
|
-
if (ret[2]) {
|
|
450
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
451
|
-
}
|
|
452
|
-
return ret[0];
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
* @param {string} name
|
|
456
|
-
* @param {StrictFunction} computation
|
|
457
|
-
* @param {any} dependencies
|
|
458
|
-
*/
|
|
459
|
-
defineComputed(name, computation, dependencies) {
|
|
460
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
461
|
-
const len0 = WASM_VECTOR_LEN;
|
|
462
|
-
_assertClass(computation, StrictFunction);
|
|
463
|
-
var ptr1 = computation.__destroy_into_raw();
|
|
464
|
-
const ret = wasm.reactivesystem_defineComputed(this.__wbg_ptr, ptr0, len0, ptr1, dependencies);
|
|
465
|
-
if (ret[1]) {
|
|
466
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* @param {string} name
|
|
471
|
-
* @returns {number}
|
|
472
|
-
*/
|
|
473
|
-
getComputed(name) {
|
|
474
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
475
|
-
const len0 = WASM_VECTOR_LEN;
|
|
476
|
-
const ret = wasm.reactivesystem_getComputed(this.__wbg_ptr, ptr0, len0);
|
|
477
|
-
if (ret[2]) {
|
|
478
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
479
|
-
}
|
|
480
|
-
return ret[0];
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* @returns {any}
|
|
484
|
-
*/
|
|
485
|
-
getSystemState() {
|
|
486
|
-
const ret = wasm.reactivesystem_getSystemState(this.__wbg_ptr);
|
|
487
|
-
return ret;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
const SchemaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
492
|
-
? { register: () => {}, unregister: () => {} }
|
|
493
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_schema_free(ptr >>> 0, 1));
|
|
494
|
-
|
|
495
|
-
export class Schema {
|
|
496
|
-
|
|
497
|
-
static __wrap(ptr) {
|
|
498
|
-
ptr = ptr >>> 0;
|
|
499
|
-
const obj = Object.create(Schema.prototype);
|
|
500
|
-
obj.__wbg_ptr = ptr;
|
|
501
|
-
SchemaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
502
|
-
return obj;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
__destroy_into_raw() {
|
|
506
|
-
const ptr = this.__wbg_ptr;
|
|
507
|
-
this.__wbg_ptr = 0;
|
|
508
|
-
SchemaFinalization.unregister(this);
|
|
509
|
-
return ptr;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
free() {
|
|
513
|
-
const ptr = this.__destroy_into_raw();
|
|
514
|
-
wasm.__wbg_schema_free(ptr, 0);
|
|
515
|
-
}
|
|
516
|
-
constructor() {
|
|
517
|
-
const ret = wasm.schema_new();
|
|
518
|
-
this.__wbg_ptr = ret >>> 0;
|
|
519
|
-
SchemaFinalization.register(this, this.__wbg_ptr, this);
|
|
520
|
-
return this;
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* @param {string} field
|
|
524
|
-
* @param {string} type_str
|
|
525
|
-
*/
|
|
526
|
-
addField(field, type_str) {
|
|
527
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
528
|
-
const len0 = WASM_VECTOR_LEN;
|
|
529
|
-
const ptr1 = passStringToWasm0(type_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
530
|
-
const len1 = WASM_VECTOR_LEN;
|
|
531
|
-
wasm.schema_addField(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
532
|
-
}
|
|
533
|
-
/**
|
|
534
|
-
* @param {string} field
|
|
535
|
-
* @param {Schema} schema
|
|
536
|
-
*/
|
|
537
|
-
addNestedField(field, schema) {
|
|
538
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
539
|
-
const len0 = WASM_VECTOR_LEN;
|
|
540
|
-
_assertClass(schema, Schema);
|
|
541
|
-
var ptr1 = schema.__destroy_into_raw();
|
|
542
|
-
wasm.schema_addNestedField(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* @param {string} field
|
|
546
|
-
* @returns {string | undefined}
|
|
547
|
-
*/
|
|
548
|
-
getFieldType(field) {
|
|
549
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
550
|
-
const len0 = WASM_VECTOR_LEN;
|
|
551
|
-
const ret = wasm.schema_getFieldType(this.__wbg_ptr, ptr0, len0);
|
|
552
|
-
let v2;
|
|
553
|
-
if (ret[0] !== 0) {
|
|
554
|
-
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
555
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
556
|
-
}
|
|
557
|
-
return v2;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* @param {string} field
|
|
561
|
-
* @returns {Schema | undefined}
|
|
562
|
-
*/
|
|
563
|
-
getNestedSchema(field) {
|
|
564
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
565
|
-
const len0 = WASM_VECTOR_LEN;
|
|
566
|
-
const ret = wasm.schema_getNestedSchema(this.__wbg_ptr, ptr0, len0);
|
|
567
|
-
return ret === 0 ? undefined : Schema.__wrap(ret);
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* @param {string} field
|
|
571
|
-
* @returns {boolean}
|
|
572
|
-
*/
|
|
573
|
-
hasField(field) {
|
|
574
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
575
|
-
const len0 = WASM_VECTOR_LEN;
|
|
576
|
-
const ret = wasm.schema_hasField(this.__wbg_ptr, ptr0, len0);
|
|
577
|
-
return ret !== 0;
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* @param {string} field
|
|
581
|
-
* @returns {boolean}
|
|
582
|
-
*/
|
|
583
|
-
isNestedField(field) {
|
|
584
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
585
|
-
const len0 = WASM_VECTOR_LEN;
|
|
586
|
-
const ret = wasm.schema_isNestedField(this.__wbg_ptr, ptr0, len0);
|
|
587
|
-
return ret !== 0;
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* @returns {any[]}
|
|
591
|
-
*/
|
|
592
|
-
fieldNames() {
|
|
593
|
-
const ret = wasm.schema_fieldNames(this.__wbg_ptr);
|
|
594
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
595
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
596
|
-
return v1;
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* @returns {any}
|
|
600
|
-
*/
|
|
601
|
-
toJS() {
|
|
602
|
-
const ret = wasm.schema_toJS(this.__wbg_ptr);
|
|
603
|
-
return ret;
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
* @param {object} js_obj
|
|
607
|
-
* @returns {Schema}
|
|
608
|
-
*/
|
|
609
|
-
static from_js_object(js_obj) {
|
|
610
|
-
const ret = wasm.schema_from_js_object(js_obj);
|
|
611
|
-
if (ret[2]) {
|
|
612
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
613
|
-
}
|
|
614
|
-
return Schema.__wrap(ret[0]);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
const StrictArrayFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
619
|
-
? { register: () => {}, unregister: () => {} }
|
|
620
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictarray_free(ptr >>> 0, 1));
|
|
621
|
-
|
|
622
|
-
export class StrictArray {
|
|
623
|
-
|
|
624
|
-
static __wrap(ptr) {
|
|
625
|
-
ptr = ptr >>> 0;
|
|
626
|
-
const obj = Object.create(StrictArray.prototype);
|
|
627
|
-
obj.__wbg_ptr = ptr;
|
|
628
|
-
StrictArrayFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
629
|
-
return obj;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
__destroy_into_raw() {
|
|
633
|
-
const ptr = this.__wbg_ptr;
|
|
634
|
-
this.__wbg_ptr = 0;
|
|
635
|
-
StrictArrayFinalization.unregister(this);
|
|
636
|
-
return ptr;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
free() {
|
|
640
|
-
const ptr = this.__destroy_into_raw();
|
|
641
|
-
wasm.__wbg_strictarray_free(ptr, 0);
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* @param {HeapType} heap
|
|
645
|
-
* @param {number} len
|
|
646
|
-
*/
|
|
647
|
-
constructor(heap, len) {
|
|
648
|
-
const ret = wasm.strictarray_new(heap, len);
|
|
649
|
-
this.__wbg_ptr = ret >>> 0;
|
|
650
|
-
StrictArrayFinalization.register(this, this.__wbg_ptr, this);
|
|
651
|
-
return this;
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* @returns {number}
|
|
655
|
-
*/
|
|
656
|
-
len() {
|
|
657
|
-
const ret = wasm.strictarray_len(this.__wbg_ptr);
|
|
658
|
-
return ret >>> 0;
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* @returns {HeapType}
|
|
662
|
-
*/
|
|
663
|
-
heap() {
|
|
664
|
-
const ret = wasm.strictarray_heap(this.__wbg_ptr);
|
|
665
|
-
return ret;
|
|
666
|
-
}
|
|
667
|
-
/**
|
|
668
|
-
* @returns {number}
|
|
669
|
-
*/
|
|
670
|
-
buffer() {
|
|
671
|
-
const ret = wasm.strictarray_as_ptr(this.__wbg_ptr);
|
|
672
|
-
return ret >>> 0;
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* @returns {number}
|
|
676
|
-
*/
|
|
677
|
-
capacity() {
|
|
678
|
-
const ret = wasm.strictarray_byte_len(this.__wbg_ptr);
|
|
679
|
-
return ret >>> 0;
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* @returns {number}
|
|
683
|
-
*/
|
|
684
|
-
byte_len() {
|
|
685
|
-
const ret = wasm.strictarray_byte_len(this.__wbg_ptr);
|
|
686
|
-
return ret >>> 0;
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* @returns {number}
|
|
690
|
-
*/
|
|
691
|
-
as_ptr() {
|
|
692
|
-
const ret = wasm.strictarray_as_ptr(this.__wbg_ptr);
|
|
693
|
-
return ret >>> 0;
|
|
694
|
-
}
|
|
695
|
-
/**
|
|
696
|
-
* @param {number} index
|
|
697
|
-
* @returns {number}
|
|
698
|
-
*/
|
|
699
|
-
get(index) {
|
|
700
|
-
const ret = wasm.strictarray_get(this.__wbg_ptr, index);
|
|
701
|
-
if (ret[2]) {
|
|
702
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
703
|
-
}
|
|
704
|
-
return ret[0];
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* @param {number} index
|
|
708
|
-
* @param {number} value
|
|
709
|
-
*/
|
|
710
|
-
set(index, value) {
|
|
711
|
-
const ret = wasm.strictarray_set(this.__wbg_ptr, index, value);
|
|
712
|
-
if (ret[1]) {
|
|
713
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
/**
|
|
717
|
-
* @param {any} js_function
|
|
718
|
-
* @returns {StrictArray}
|
|
719
|
-
*/
|
|
720
|
-
map(js_function) {
|
|
721
|
-
const ret = wasm.strictarray_map(this.__wbg_ptr, js_function);
|
|
722
|
-
if (ret[2]) {
|
|
723
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
724
|
-
}
|
|
725
|
-
return StrictArray.__wrap(ret[0]);
|
|
726
|
-
}
|
|
727
|
-
/**
|
|
728
|
-
* @param {any} js_function
|
|
729
|
-
*/
|
|
730
|
-
forEach(js_function) {
|
|
731
|
-
const ret = wasm.strictarray_forEach(this.__wbg_ptr, js_function);
|
|
732
|
-
if (ret[1]) {
|
|
733
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
/**
|
|
737
|
-
* @param {any} js_function
|
|
738
|
-
* @param {number} initial_value
|
|
739
|
-
* @returns {number}
|
|
740
|
-
*/
|
|
741
|
-
reduce(js_function, initial_value) {
|
|
742
|
-
const ret = wasm.strictarray_reduce(this.__wbg_ptr, js_function, initial_value);
|
|
743
|
-
if (ret[2]) {
|
|
744
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
745
|
-
}
|
|
746
|
-
return ret[0];
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* @param {number} start
|
|
750
|
-
* @param {Float64Array} values
|
|
751
|
-
*/
|
|
752
|
-
setRange(start, values) {
|
|
753
|
-
const ptr0 = passArrayF64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
754
|
-
const len0 = WASM_VECTOR_LEN;
|
|
755
|
-
const ret = wasm.strictarray_setRange(this.__wbg_ptr, start, ptr0, len0);
|
|
756
|
-
if (ret[1]) {
|
|
757
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* @param {number} start
|
|
762
|
-
* @param {number} count
|
|
763
|
-
* @returns {Float64Array}
|
|
764
|
-
*/
|
|
765
|
-
getRange(start, count) {
|
|
766
|
-
const ret = wasm.strictarray_getRange(this.__wbg_ptr, start, count);
|
|
767
|
-
if (ret[3]) {
|
|
768
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
769
|
-
}
|
|
770
|
-
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
771
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
772
|
-
return v1;
|
|
773
|
-
}
|
|
774
|
-
/**
|
|
775
|
-
* @param {number} value
|
|
776
|
-
*/
|
|
777
|
-
fill(value) {
|
|
778
|
-
const ret = wasm.strictarray_fill(this.__wbg_ptr, value);
|
|
779
|
-
if (ret[1]) {
|
|
780
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
const StrictAsyncFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
786
|
-
? { register: () => {}, unregister: () => {} }
|
|
787
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictasync_free(ptr >>> 0, 1));
|
|
788
|
-
|
|
789
|
-
export class StrictAsync {
|
|
790
|
-
|
|
791
|
-
__destroy_into_raw() {
|
|
792
|
-
const ptr = this.__wbg_ptr;
|
|
793
|
-
this.__wbg_ptr = 0;
|
|
794
|
-
StrictAsyncFinalization.unregister(this);
|
|
795
|
-
return ptr;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
free() {
|
|
799
|
-
const ptr = this.__destroy_into_raw();
|
|
800
|
-
wasm.__wbg_strictasync_free(ptr, 0);
|
|
801
|
-
}
|
|
802
|
-
/**
|
|
803
|
-
* @param {number} max_concurrent
|
|
804
|
-
*/
|
|
805
|
-
constructor(max_concurrent) {
|
|
806
|
-
const ret = wasm.strictasync_new(max_concurrent);
|
|
807
|
-
this.__wbg_ptr = ret >>> 0;
|
|
808
|
-
StrictAsyncFinalization.register(this, this.__wbg_ptr, this);
|
|
809
|
-
return this;
|
|
810
|
-
}
|
|
811
|
-
/**
|
|
812
|
-
* @param {Promise<any>} promise
|
|
813
|
-
* @param {Function | null | undefined} callback
|
|
814
|
-
* @param {Function | null | undefined} error_handler
|
|
815
|
-
* @param {HeapType} return_type
|
|
816
|
-
*/
|
|
817
|
-
addTask(promise, callback, error_handler, return_type) {
|
|
818
|
-
wasm.strictasync_addTask(this.__wbg_ptr, promise, isLikeNone(callback) ? 0 : addToExternrefTable0(callback), isLikeNone(error_handler) ? 0 : addToExternrefTable0(error_handler), return_type);
|
|
819
|
-
}
|
|
820
|
-
/**
|
|
821
|
-
* @returns {Promise<any>}
|
|
822
|
-
*/
|
|
823
|
-
runTasks() {
|
|
824
|
-
const ret = wasm.strictasync_runTasks(this.__wbg_ptr);
|
|
825
|
-
return ret;
|
|
826
|
-
}
|
|
827
|
-
/**
|
|
828
|
-
* @returns {number}
|
|
829
|
-
*/
|
|
830
|
-
getQueueSize() {
|
|
831
|
-
const ret = wasm.strictasync_getQueueSize(this.__wbg_ptr);
|
|
832
|
-
return ret >>> 0;
|
|
833
|
-
}
|
|
834
|
-
/**
|
|
835
|
-
* @returns {number}
|
|
836
|
-
*/
|
|
837
|
-
getRunningTasks() {
|
|
838
|
-
const ret = wasm.strictasync_getRunningTasks(this.__wbg_ptr);
|
|
839
|
-
return ret >>> 0;
|
|
840
|
-
}
|
|
841
|
-
clearQueue() {
|
|
842
|
-
wasm.strictasync_clearQueue(this.__wbg_ptr);
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
const StrictBigIntFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
847
|
-
? { register: () => {}, unregister: () => {} }
|
|
848
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictbigint_free(ptr >>> 0, 1));
|
|
849
|
-
|
|
850
|
-
export class StrictBigInt {
|
|
851
|
-
|
|
852
|
-
__destroy_into_raw() {
|
|
853
|
-
const ptr = this.__wbg_ptr;
|
|
854
|
-
this.__wbg_ptr = 0;
|
|
855
|
-
StrictBigIntFinalization.unregister(this);
|
|
856
|
-
return ptr;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
free() {
|
|
860
|
-
const ptr = this.__destroy_into_raw();
|
|
861
|
-
wasm.__wbg_strictbigint_free(ptr, 0);
|
|
862
|
-
}
|
|
863
|
-
/**
|
|
864
|
-
* @param {any} value
|
|
865
|
-
* @param {HeapType} heap
|
|
866
|
-
*/
|
|
867
|
-
constructor(value, heap) {
|
|
868
|
-
const ret = wasm.strictbigint_new(value, heap);
|
|
869
|
-
if (ret[2]) {
|
|
870
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
871
|
-
}
|
|
872
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
873
|
-
StrictBigIntFinalization.register(this, this.__wbg_ptr, this);
|
|
874
|
-
return this;
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* @returns {any}
|
|
878
|
-
*/
|
|
879
|
-
get() {
|
|
880
|
-
const ret = wasm.strictbigint_get(this.__wbg_ptr);
|
|
881
|
-
return ret;
|
|
882
|
-
}
|
|
883
|
-
/**
|
|
884
|
-
* @param {any} value
|
|
885
|
-
*/
|
|
886
|
-
set(value) {
|
|
887
|
-
const ret = wasm.strictbigint_set(this.__wbg_ptr, value);
|
|
888
|
-
if (ret[1]) {
|
|
889
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
/**
|
|
893
|
-
* @param {any} delta
|
|
894
|
-
*/
|
|
895
|
-
add(delta) {
|
|
896
|
-
const ret = wasm.strictbigint_add(this.__wbg_ptr, delta);
|
|
897
|
-
if (ret[1]) {
|
|
898
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
const StrictBooleanFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
904
|
-
? { register: () => {}, unregister: () => {} }
|
|
905
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictboolean_free(ptr >>> 0, 1));
|
|
906
|
-
|
|
907
|
-
export class StrictBoolean {
|
|
908
|
-
|
|
909
|
-
__destroy_into_raw() {
|
|
910
|
-
const ptr = this.__wbg_ptr;
|
|
911
|
-
this.__wbg_ptr = 0;
|
|
912
|
-
StrictBooleanFinalization.unregister(this);
|
|
913
|
-
return ptr;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
free() {
|
|
917
|
-
const ptr = this.__destroy_into_raw();
|
|
918
|
-
wasm.__wbg_strictboolean_free(ptr, 0);
|
|
919
|
-
}
|
|
920
|
-
/**
|
|
921
|
-
* @param {boolean} value
|
|
922
|
-
*/
|
|
923
|
-
constructor(value) {
|
|
924
|
-
const ret = wasm.strictboolean_new(value);
|
|
925
|
-
this.__wbg_ptr = ret >>> 0;
|
|
926
|
-
StrictBooleanFinalization.register(this, this.__wbg_ptr, this);
|
|
927
|
-
return this;
|
|
928
|
-
}
|
|
929
|
-
/**
|
|
930
|
-
* @returns {boolean}
|
|
931
|
-
*/
|
|
932
|
-
get() {
|
|
933
|
-
const ret = wasm.strictboolean_get(this.__wbg_ptr);
|
|
934
|
-
return ret !== 0;
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* @param {boolean} value
|
|
938
|
-
*/
|
|
939
|
-
set(value) {
|
|
940
|
-
wasm.strictboolean_set(this.__wbg_ptr, value);
|
|
941
|
-
}
|
|
942
|
-
toggle() {
|
|
943
|
-
wasm.strictboolean_toggle(this.__wbg_ptr);
|
|
944
|
-
}
|
|
945
|
-
/**
|
|
946
|
-
* @param {boolean} other
|
|
947
|
-
* @returns {boolean}
|
|
948
|
-
*/
|
|
949
|
-
and(other) {
|
|
950
|
-
const ret = wasm.strictboolean_and(this.__wbg_ptr, other);
|
|
951
|
-
return ret !== 0;
|
|
952
|
-
}
|
|
953
|
-
/**
|
|
954
|
-
* @param {boolean} other
|
|
955
|
-
* @returns {boolean}
|
|
956
|
-
*/
|
|
957
|
-
or(other) {
|
|
958
|
-
const ret = wasm.strictboolean_or(this.__wbg_ptr, other);
|
|
959
|
-
return ret !== 0;
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* @returns {boolean}
|
|
963
|
-
*/
|
|
964
|
-
not() {
|
|
965
|
-
const ret = wasm.strictboolean_not(this.__wbg_ptr);
|
|
966
|
-
return ret !== 0;
|
|
967
|
-
}
|
|
968
|
-
/**
|
|
969
|
-
* @returns {string}
|
|
970
|
-
*/
|
|
971
|
-
toString() {
|
|
972
|
-
let deferred1_0;
|
|
973
|
-
let deferred1_1;
|
|
974
|
-
try {
|
|
975
|
-
const ret = wasm.strictboolean_toString(this.__wbg_ptr);
|
|
976
|
-
deferred1_0 = ret[0];
|
|
977
|
-
deferred1_1 = ret[1];
|
|
978
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
979
|
-
} finally {
|
|
980
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
const StrictForLoopFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
986
|
-
? { register: () => {}, unregister: () => {} }
|
|
987
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictforloop_free(ptr >>> 0, 1));
|
|
988
|
-
|
|
989
|
-
export class StrictForLoop {
|
|
990
|
-
|
|
991
|
-
__destroy_into_raw() {
|
|
992
|
-
const ptr = this.__wbg_ptr;
|
|
993
|
-
this.__wbg_ptr = 0;
|
|
994
|
-
StrictForLoopFinalization.unregister(this);
|
|
995
|
-
return ptr;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
free() {
|
|
999
|
-
const ptr = this.__destroy_into_raw();
|
|
1000
|
-
wasm.__wbg_strictforloop_free(ptr, 0);
|
|
1001
|
-
}
|
|
1002
|
-
/**
|
|
1003
|
-
* @param {number} start
|
|
1004
|
-
* @param {number} end
|
|
1005
|
-
* @param {number} step
|
|
1006
|
-
* @param {HeapType} heap_type
|
|
1007
|
-
* @param {number} max_iterations
|
|
1008
|
-
*/
|
|
1009
|
-
constructor(start, end, step, heap_type, max_iterations) {
|
|
1010
|
-
const ret = wasm.strictforloop_new(start, end, step, heap_type, max_iterations);
|
|
1011
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1012
|
-
StrictForLoopFinalization.register(this, this.__wbg_ptr, this);
|
|
1013
|
-
return this;
|
|
1014
|
-
}
|
|
1015
|
-
/**
|
|
1016
|
-
* @returns {boolean}
|
|
1017
|
-
*/
|
|
1018
|
-
hasNext() {
|
|
1019
|
-
const ret = wasm.strictforloop_hasNext(this.__wbg_ptr);
|
|
1020
|
-
return ret !== 0;
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* @returns {number}
|
|
1024
|
-
*/
|
|
1025
|
-
next() {
|
|
1026
|
-
const ret = wasm.strictforloop_next(this.__wbg_ptr);
|
|
1027
|
-
if (ret[2]) {
|
|
1028
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1029
|
-
}
|
|
1030
|
-
return ret[0];
|
|
1031
|
-
}
|
|
1032
|
-
/**
|
|
1033
|
-
* @returns {number}
|
|
1034
|
-
*/
|
|
1035
|
-
getIterationCount() {
|
|
1036
|
-
const ret = wasm.strictforloop_getIterationCount(this.__wbg_ptr);
|
|
1037
|
-
return ret >>> 0;
|
|
1038
|
-
}
|
|
1039
|
-
reset() {
|
|
1040
|
-
wasm.strictforloop_reset(this.__wbg_ptr);
|
|
1041
|
-
}
|
|
1042
|
-
/**
|
|
1043
|
-
* @returns {number}
|
|
1044
|
-
*/
|
|
1045
|
-
getCurrent() {
|
|
1046
|
-
const ret = wasm.strictforloop_getCurrent(this.__wbg_ptr);
|
|
1047
|
-
return ret;
|
|
1048
|
-
}
|
|
1049
|
-
/**
|
|
1050
|
-
* @returns {number}
|
|
1051
|
-
*/
|
|
1052
|
-
getProgress() {
|
|
1053
|
-
const ret = wasm.strictforloop_getProgress(this.__wbg_ptr);
|
|
1054
|
-
return ret;
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* @returns {number}
|
|
1058
|
-
*/
|
|
1059
|
-
getStep() {
|
|
1060
|
-
const ret = wasm.strictforloop_getStep(this.__wbg_ptr);
|
|
1061
|
-
return ret;
|
|
1062
|
-
}
|
|
1063
|
-
/**
|
|
1064
|
-
* @returns {number}
|
|
1065
|
-
*/
|
|
1066
|
-
getEnd() {
|
|
1067
|
-
const ret = wasm.strictforloop_getEnd(this.__wbg_ptr);
|
|
1068
|
-
return ret;
|
|
1069
|
-
}
|
|
1070
|
-
/**
|
|
1071
|
-
* @returns {HeapType}
|
|
1072
|
-
*/
|
|
1073
|
-
getHeapType() {
|
|
1074
|
-
const ret = wasm.strictforloop_getHeapType(this.__wbg_ptr);
|
|
1075
|
-
return ret;
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
const StrictFunctionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1080
|
-
? { register: () => {}, unregister: () => {} }
|
|
1081
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictfunction_free(ptr >>> 0, 1));
|
|
1082
|
-
|
|
1083
|
-
export class StrictFunction {
|
|
1084
|
-
|
|
1085
|
-
__destroy_into_raw() {
|
|
1086
|
-
const ptr = this.__wbg_ptr;
|
|
1087
|
-
this.__wbg_ptr = 0;
|
|
1088
|
-
StrictFunctionFinalization.unregister(this);
|
|
1089
|
-
return ptr;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
free() {
|
|
1093
|
-
const ptr = this.__destroy_into_raw();
|
|
1094
|
-
wasm.__wbg_strictfunction_free(ptr, 0);
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* @param {Function} js_function
|
|
1098
|
-
* @param {any} arg_types
|
|
1099
|
-
* @param {HeapType} return_type
|
|
1100
|
-
*/
|
|
1101
|
-
constructor(js_function, arg_types, return_type) {
|
|
1102
|
-
const ret = wasm.strictfunction_new(js_function, arg_types, return_type);
|
|
1103
|
-
if (ret[2]) {
|
|
1104
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1105
|
-
}
|
|
1106
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
1107
|
-
StrictFunctionFinalization.register(this, this.__wbg_ptr, this);
|
|
1108
|
-
return this;
|
|
1109
|
-
}
|
|
1110
|
-
/**
|
|
1111
|
-
* @param {any} args
|
|
1112
|
-
* @param {any} context
|
|
1113
|
-
* @returns {StrictFunctionResult}
|
|
1114
|
-
*/
|
|
1115
|
-
callComplex(args, context) {
|
|
1116
|
-
const ret = wasm.strictfunction_callComplex(this.__wbg_ptr, args, context);
|
|
1117
|
-
if (ret[2]) {
|
|
1118
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1119
|
-
}
|
|
1120
|
-
return StrictFunctionResult.__wrap(ret[0]);
|
|
1121
|
-
}
|
|
1122
|
-
/**
|
|
1123
|
-
* @param {any} args
|
|
1124
|
-
*/
|
|
1125
|
-
validateArguments(args) {
|
|
1126
|
-
const ret = wasm.strictfunction_validateArguments(this.__wbg_ptr, args);
|
|
1127
|
-
if (ret[1]) {
|
|
1128
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
/**
|
|
1132
|
-
* @param {any} args
|
|
1133
|
-
* @returns {number}
|
|
1134
|
-
*/
|
|
1135
|
-
call(args) {
|
|
1136
|
-
const ret = wasm.strictfunction_call(this.__wbg_ptr, args);
|
|
1137
|
-
if (ret[2]) {
|
|
1138
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1139
|
-
}
|
|
1140
|
-
return ret[0];
|
|
1141
|
-
}
|
|
1142
|
-
/**
|
|
1143
|
-
* @returns {any}
|
|
1144
|
-
*/
|
|
1145
|
-
getArgTypes() {
|
|
1146
|
-
const ret = wasm.strictfunction_getArgTypes(this.__wbg_ptr);
|
|
1147
|
-
return ret;
|
|
1148
|
-
}
|
|
1149
|
-
/**
|
|
1150
|
-
* @returns {any}
|
|
1151
|
-
*/
|
|
1152
|
-
getReturnType() {
|
|
1153
|
-
const ret = wasm.strictfunction_getReturnType(this.__wbg_ptr);
|
|
1154
|
-
return ret;
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
const StrictFunctionResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1159
|
-
? { register: () => {}, unregister: () => {} }
|
|
1160
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictfunctionresult_free(ptr >>> 0, 1));
|
|
1161
|
-
|
|
1162
|
-
export class StrictFunctionResult {
|
|
1163
|
-
|
|
1164
|
-
static __wrap(ptr) {
|
|
1165
|
-
ptr = ptr >>> 0;
|
|
1166
|
-
const obj = Object.create(StrictFunctionResult.prototype);
|
|
1167
|
-
obj.__wbg_ptr = ptr;
|
|
1168
|
-
StrictFunctionResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1169
|
-
return obj;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
__destroy_into_raw() {
|
|
1173
|
-
const ptr = this.__wbg_ptr;
|
|
1174
|
-
this.__wbg_ptr = 0;
|
|
1175
|
-
StrictFunctionResultFinalization.unregister(this);
|
|
1176
|
-
return ptr;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
free() {
|
|
1180
|
-
const ptr = this.__destroy_into_raw();
|
|
1181
|
-
wasm.__wbg_strictfunctionresult_free(ptr, 0);
|
|
1182
|
-
}
|
|
1183
|
-
/**
|
|
1184
|
-
* @returns {any}
|
|
1185
|
-
*/
|
|
1186
|
-
get value() {
|
|
1187
|
-
const ret = wasm.strictfunctionresult_value(this.__wbg_ptr);
|
|
1188
|
-
return ret;
|
|
1189
|
-
}
|
|
1190
|
-
/**
|
|
1191
|
-
* @returns {string}
|
|
1192
|
-
*/
|
|
1193
|
-
get result_type() {
|
|
1194
|
-
let deferred1_0;
|
|
1195
|
-
let deferred1_1;
|
|
1196
|
-
try {
|
|
1197
|
-
const ret = wasm.strictfunctionresult_result_type(this.__wbg_ptr);
|
|
1198
|
-
deferred1_0 = ret[0];
|
|
1199
|
-
deferred1_1 = ret[1];
|
|
1200
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1201
|
-
} finally {
|
|
1202
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
/**
|
|
1206
|
-
* @returns {number | undefined}
|
|
1207
|
-
*/
|
|
1208
|
-
toNumber() {
|
|
1209
|
-
const ret = wasm.strictfunctionresult_toNumber(this.__wbg_ptr);
|
|
1210
|
-
return ret[0] === 0 ? undefined : ret[1];
|
|
1211
|
-
}
|
|
1212
|
-
/**
|
|
1213
|
-
* @returns {boolean | undefined}
|
|
1214
|
-
*/
|
|
1215
|
-
toBoolean() {
|
|
1216
|
-
const ret = wasm.strictfunctionresult_toBoolean(this.__wbg_ptr);
|
|
1217
|
-
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* @returns {string | undefined}
|
|
1221
|
-
*/
|
|
1222
|
-
toString() {
|
|
1223
|
-
const ret = wasm.strictfunctionresult_toString(this.__wbg_ptr);
|
|
1224
|
-
let v1;
|
|
1225
|
-
if (ret[0] !== 0) {
|
|
1226
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
1227
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1228
|
-
}
|
|
1229
|
-
return v1;
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
const StrictNumberFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1234
|
-
? { register: () => {}, unregister: () => {} }
|
|
1235
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictnumber_free(ptr >>> 0, 1));
|
|
1236
|
-
|
|
1237
|
-
export class StrictNumber {
|
|
1238
|
-
|
|
1239
|
-
__destroy_into_raw() {
|
|
1240
|
-
const ptr = this.__wbg_ptr;
|
|
1241
|
-
this.__wbg_ptr = 0;
|
|
1242
|
-
StrictNumberFinalization.unregister(this);
|
|
1243
|
-
return ptr;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
free() {
|
|
1247
|
-
const ptr = this.__destroy_into_raw();
|
|
1248
|
-
wasm.__wbg_strictnumber_free(ptr, 0);
|
|
1249
|
-
}
|
|
1250
|
-
/**
|
|
1251
|
-
* @param {number} val
|
|
1252
|
-
* @param {HeapType} heap
|
|
1253
|
-
*/
|
|
1254
|
-
constructor(val, heap) {
|
|
1255
|
-
const ret = wasm.strictnumber_new(val, heap);
|
|
1256
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1257
|
-
StrictNumberFinalization.register(this, this.__wbg_ptr, this);
|
|
1258
|
-
return this;
|
|
1259
|
-
}
|
|
1260
|
-
/**
|
|
1261
|
-
* @returns {HeapType}
|
|
1262
|
-
*/
|
|
1263
|
-
heap() {
|
|
1264
|
-
const ret = wasm.strictnumber_heap(this.__wbg_ptr);
|
|
1265
|
-
return ret;
|
|
1266
|
-
}
|
|
1267
|
-
/**
|
|
1268
|
-
* @returns {number}
|
|
1269
|
-
*/
|
|
1270
|
-
get() {
|
|
1271
|
-
const ret = wasm.strictnumber_get(this.__wbg_ptr);
|
|
1272
|
-
return ret;
|
|
1273
|
-
}
|
|
1274
|
-
/**
|
|
1275
|
-
* @param {number} val
|
|
1276
|
-
*/
|
|
1277
|
-
set(val) {
|
|
1278
|
-
wasm.strictnumber_set(this.__wbg_ptr, val);
|
|
1279
|
-
}
|
|
1280
|
-
/**
|
|
1281
|
-
* @param {number} delta
|
|
1282
|
-
*/
|
|
1283
|
-
add(delta) {
|
|
1284
|
-
wasm.strictnumber_add(this.__wbg_ptr, delta);
|
|
1285
|
-
}
|
|
1286
|
-
/**
|
|
1287
|
-
* @param {number} delta
|
|
1288
|
-
*/
|
|
1289
|
-
sub(delta) {
|
|
1290
|
-
wasm.strictnumber_sub(this.__wbg_ptr, delta);
|
|
1291
|
-
}
|
|
1292
|
-
/**
|
|
1293
|
-
* @param {number} factor
|
|
1294
|
-
*/
|
|
1295
|
-
mul(factor) {
|
|
1296
|
-
wasm.strictnumber_mul(this.__wbg_ptr, factor);
|
|
1297
|
-
}
|
|
1298
|
-
/**
|
|
1299
|
-
* @param {number} divisor
|
|
1300
|
-
*/
|
|
1301
|
-
div(divisor) {
|
|
1302
|
-
wasm.strictnumber_div(this.__wbg_ptr, divisor);
|
|
1303
|
-
}
|
|
1304
|
-
/**
|
|
1305
|
-
* @returns {number}
|
|
1306
|
-
*/
|
|
1307
|
-
valueOf() {
|
|
1308
|
-
const ret = wasm.strictnumber_get(this.__wbg_ptr);
|
|
1309
|
-
return ret;
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
const StrictObjectFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1314
|
-
? { register: () => {}, unregister: () => {} }
|
|
1315
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictobject_free(ptr >>> 0, 1));
|
|
1316
|
-
|
|
1317
|
-
export class StrictObject {
|
|
1318
|
-
|
|
1319
|
-
static __wrap(ptr) {
|
|
1320
|
-
ptr = ptr >>> 0;
|
|
1321
|
-
const obj = Object.create(StrictObject.prototype);
|
|
1322
|
-
obj.__wbg_ptr = ptr;
|
|
1323
|
-
StrictObjectFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1324
|
-
return obj;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
__destroy_into_raw() {
|
|
1328
|
-
const ptr = this.__wbg_ptr;
|
|
1329
|
-
this.__wbg_ptr = 0;
|
|
1330
|
-
StrictObjectFinalization.unregister(this);
|
|
1331
|
-
return ptr;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
free() {
|
|
1335
|
-
const ptr = this.__destroy_into_raw();
|
|
1336
|
-
wasm.__wbg_strictobject_free(ptr, 0);
|
|
1337
|
-
}
|
|
1338
|
-
/**
|
|
1339
|
-
* @param {any} schema
|
|
1340
|
-
*/
|
|
1341
|
-
constructor(schema) {
|
|
1342
|
-
const ret = wasm.strictobject_new(schema);
|
|
1343
|
-
if (ret[2]) {
|
|
1344
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1345
|
-
}
|
|
1346
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
1347
|
-
StrictObjectFinalization.register(this, this.__wbg_ptr, this);
|
|
1348
|
-
return this;
|
|
1349
|
-
}
|
|
1350
|
-
/**
|
|
1351
|
-
* @param {string} field
|
|
1352
|
-
* @param {any} value
|
|
1353
|
-
*/
|
|
1354
|
-
setField(field, value) {
|
|
1355
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1356
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1357
|
-
const ret = wasm.strictobject_setField(this.__wbg_ptr, ptr0, len0, value);
|
|
1358
|
-
if (ret[1]) {
|
|
1359
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
/**
|
|
1363
|
-
* @param {any} schema
|
|
1364
|
-
* @param {any} initial_data
|
|
1365
|
-
* @returns {StrictObject}
|
|
1366
|
-
*/
|
|
1367
|
-
static newWithData(schema, initial_data) {
|
|
1368
|
-
const ret = wasm.strictobject_newWithData(schema, initial_data);
|
|
1369
|
-
if (ret[2]) {
|
|
1370
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1371
|
-
}
|
|
1372
|
-
return StrictObject.__wrap(ret[0]);
|
|
1373
|
-
}
|
|
1374
|
-
/**
|
|
1375
|
-
* @param {string} field
|
|
1376
|
-
* @returns {any}
|
|
1377
|
-
*/
|
|
1378
|
-
getField(field) {
|
|
1379
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1380
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1381
|
-
const ret = wasm.strictobject_getField(this.__wbg_ptr, ptr0, len0);
|
|
1382
|
-
if (ret[2]) {
|
|
1383
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1384
|
-
}
|
|
1385
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1386
|
-
}
|
|
1387
|
-
/**
|
|
1388
|
-
* @param {string} field
|
|
1389
|
-
* @returns {string}
|
|
1390
|
-
*/
|
|
1391
|
-
getFieldAsString(field) {
|
|
1392
|
-
let deferred3_0;
|
|
1393
|
-
let deferred3_1;
|
|
1394
|
-
try {
|
|
1395
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1396
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1397
|
-
const ret = wasm.strictobject_getFieldAsString(this.__wbg_ptr, ptr0, len0);
|
|
1398
|
-
var ptr2 = ret[0];
|
|
1399
|
-
var len2 = ret[1];
|
|
1400
|
-
if (ret[3]) {
|
|
1401
|
-
ptr2 = 0; len2 = 0;
|
|
1402
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1403
|
-
}
|
|
1404
|
-
deferred3_0 = ptr2;
|
|
1405
|
-
deferred3_1 = len2;
|
|
1406
|
-
return getStringFromWasm0(ptr2, len2);
|
|
1407
|
-
} finally {
|
|
1408
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
/**
|
|
1412
|
-
* @param {string} field
|
|
1413
|
-
* @returns {number}
|
|
1414
|
-
*/
|
|
1415
|
-
getFieldAsNumber(field) {
|
|
1416
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1417
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1418
|
-
const ret = wasm.strictobject_getFieldAsNumber(this.__wbg_ptr, ptr0, len0);
|
|
1419
|
-
if (ret[2]) {
|
|
1420
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1421
|
-
}
|
|
1422
|
-
return ret[0];
|
|
1423
|
-
}
|
|
1424
|
-
/**
|
|
1425
|
-
* @param {string} field
|
|
1426
|
-
* @returns {boolean}
|
|
1427
|
-
*/
|
|
1428
|
-
getFieldAsBoolean(field) {
|
|
1429
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1430
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1431
|
-
const ret = wasm.strictobject_getFieldAsBoolean(this.__wbg_ptr, ptr0, len0);
|
|
1432
|
-
if (ret[2]) {
|
|
1433
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1434
|
-
}
|
|
1435
|
-
return ret[0] !== 0;
|
|
1436
|
-
}
|
|
1437
|
-
/**
|
|
1438
|
-
* @param {string} field
|
|
1439
|
-
* @returns {StrictObject}
|
|
1440
|
-
*/
|
|
1441
|
-
getNestedObject(field) {
|
|
1442
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1443
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1444
|
-
const ret = wasm.strictobject_getNestedObject(this.__wbg_ptr, ptr0, len0);
|
|
1445
|
-
if (ret[2]) {
|
|
1446
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1447
|
-
}
|
|
1448
|
-
return StrictObject.__wrap(ret[0]);
|
|
1449
|
-
}
|
|
1450
|
-
/**
|
|
1451
|
-
* @returns {any}
|
|
1452
|
-
*/
|
|
1453
|
-
getSchema() {
|
|
1454
|
-
const ret = wasm.strictobject_getSchema(this.__wbg_ptr);
|
|
1455
|
-
return ret;
|
|
1456
|
-
}
|
|
1457
|
-
/**
|
|
1458
|
-
* @returns {any}
|
|
1459
|
-
*/
|
|
1460
|
-
toJS() {
|
|
1461
|
-
const ret = wasm.strictobject_toJS(this.__wbg_ptr);
|
|
1462
|
-
return ret;
|
|
1463
|
-
}
|
|
1464
|
-
/**
|
|
1465
|
-
* @returns {any[]}
|
|
1466
|
-
*/
|
|
1467
|
-
fieldNames() {
|
|
1468
|
-
const ret = wasm.strictobject_fieldNames(this.__wbg_ptr);
|
|
1469
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1470
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1471
|
-
return v1;
|
|
1472
|
-
}
|
|
1473
|
-
/**
|
|
1474
|
-
* @param {string} field
|
|
1475
|
-
* @returns {boolean}
|
|
1476
|
-
*/
|
|
1477
|
-
isNestedField(field) {
|
|
1478
|
-
const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1479
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1480
|
-
const ret = wasm.strictobject_isNestedField(this.__wbg_ptr, ptr0, len0);
|
|
1481
|
-
return ret !== 0;
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
const StrictPromiseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1486
|
-
? { register: () => {}, unregister: () => {} }
|
|
1487
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictpromise_free(ptr >>> 0, 1));
|
|
1488
|
-
|
|
1489
|
-
export class StrictPromise {
|
|
1490
|
-
|
|
1491
|
-
static __wrap(ptr) {
|
|
1492
|
-
ptr = ptr >>> 0;
|
|
1493
|
-
const obj = Object.create(StrictPromise.prototype);
|
|
1494
|
-
obj.__wbg_ptr = ptr;
|
|
1495
|
-
StrictPromiseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1496
|
-
return obj;
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
__destroy_into_raw() {
|
|
1500
|
-
const ptr = this.__wbg_ptr;
|
|
1501
|
-
this.__wbg_ptr = 0;
|
|
1502
|
-
StrictPromiseFinalization.unregister(this);
|
|
1503
|
-
return ptr;
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
free() {
|
|
1507
|
-
const ptr = this.__destroy_into_raw();
|
|
1508
|
-
wasm.__wbg_strictpromise_free(ptr, 0);
|
|
1509
|
-
}
|
|
1510
|
-
/**
|
|
1511
|
-
* @param {Function} executor
|
|
1512
|
-
* @param {HeapType} return_type
|
|
1513
|
-
*/
|
|
1514
|
-
constructor(executor, return_type) {
|
|
1515
|
-
const ret = wasm.strictpromise_new(executor, return_type);
|
|
1516
|
-
if (ret[2]) {
|
|
1517
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1518
|
-
}
|
|
1519
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
1520
|
-
StrictPromiseFinalization.register(this, this.__wbg_ptr, this);
|
|
1521
|
-
return this;
|
|
1522
|
-
}
|
|
1523
|
-
/**
|
|
1524
|
-
* @returns {Promise<any>}
|
|
1525
|
-
*/
|
|
1526
|
-
awaitValue() {
|
|
1527
|
-
const ret = wasm.strictpromise_awaitValue(this.__wbg_ptr);
|
|
1528
|
-
return ret;
|
|
1529
|
-
}
|
|
1530
|
-
/**
|
|
1531
|
-
* @param {Function} on_fulfilled
|
|
1532
|
-
* @returns {StrictPromise}
|
|
1533
|
-
*/
|
|
1534
|
-
then(on_fulfilled) {
|
|
1535
|
-
const ret = wasm.strictpromise_then(this.__wbg_ptr, on_fulfilled);
|
|
1536
|
-
if (ret[2]) {
|
|
1537
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1538
|
-
}
|
|
1539
|
-
return StrictPromise.__wrap(ret[0]);
|
|
1540
|
-
}
|
|
1541
|
-
/**
|
|
1542
|
-
* @param {Function} on_rejected
|
|
1543
|
-
* @returns {StrictPromise}
|
|
1544
|
-
*/
|
|
1545
|
-
catch(on_rejected) {
|
|
1546
|
-
const ret = wasm.strictpromise_catch(this.__wbg_ptr, on_rejected);
|
|
1547
|
-
if (ret[2]) {
|
|
1548
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1549
|
-
}
|
|
1550
|
-
return StrictPromise.__wrap(ret[0]);
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
const StrictStringFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1555
|
-
? { register: () => {}, unregister: () => {} }
|
|
1556
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictstring_free(ptr >>> 0, 1));
|
|
1557
|
-
|
|
1558
|
-
export class StrictString {
|
|
1559
|
-
|
|
1560
|
-
static __wrap(ptr) {
|
|
1561
|
-
ptr = ptr >>> 0;
|
|
1562
|
-
const obj = Object.create(StrictString.prototype);
|
|
1563
|
-
obj.__wbg_ptr = ptr;
|
|
1564
|
-
StrictStringFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1565
|
-
return obj;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
__destroy_into_raw() {
|
|
1569
|
-
const ptr = this.__wbg_ptr;
|
|
1570
|
-
this.__wbg_ptr = 0;
|
|
1571
|
-
StrictStringFinalization.unregister(this);
|
|
1572
|
-
return ptr;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
free() {
|
|
1576
|
-
const ptr = this.__destroy_into_raw();
|
|
1577
|
-
wasm.__wbg_strictstring_free(ptr, 0);
|
|
1578
|
-
}
|
|
1579
|
-
/**
|
|
1580
|
-
* @param {string} val
|
|
1581
|
-
* @param {number} max_chars
|
|
1582
|
-
*/
|
|
1583
|
-
constructor(val, max_chars) {
|
|
1584
|
-
const ptr0 = passStringToWasm0(val, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1585
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1586
|
-
const ret = wasm.strictstring_new(ptr0, len0, max_chars);
|
|
1587
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1588
|
-
StrictStringFinalization.register(this, this.__wbg_ptr, this);
|
|
1589
|
-
return this;
|
|
1590
|
-
}
|
|
1591
|
-
/**
|
|
1592
|
-
* @param {string} val
|
|
1593
|
-
* @param {number} max_chars
|
|
1594
|
-
* @param {StringEncoding} encoding
|
|
1595
|
-
* @returns {StrictString}
|
|
1596
|
-
*/
|
|
1597
|
-
static newWithEncoding(val, max_chars, encoding) {
|
|
1598
|
-
const ptr0 = passStringToWasm0(val, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1599
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1600
|
-
const ret = wasm.strictstring_newWithEncoding(ptr0, len0, max_chars, encoding);
|
|
1601
|
-
return StrictString.__wrap(ret);
|
|
1602
|
-
}
|
|
1603
|
-
/**
|
|
1604
|
-
* @returns {string}
|
|
1605
|
-
*/
|
|
1606
|
-
get() {
|
|
1607
|
-
let deferred1_0;
|
|
1608
|
-
let deferred1_1;
|
|
1609
|
-
try {
|
|
1610
|
-
const ret = wasm.strictstring_get(this.__wbg_ptr);
|
|
1611
|
-
deferred1_0 = ret[0];
|
|
1612
|
-
deferred1_1 = ret[1];
|
|
1613
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1614
|
-
} finally {
|
|
1615
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
/**
|
|
1619
|
-
* @returns {Uint8Array}
|
|
1620
|
-
*/
|
|
1621
|
-
getBytes() {
|
|
1622
|
-
const ret = wasm.strictstring_getBytes(this.__wbg_ptr);
|
|
1623
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1624
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1625
|
-
return v1;
|
|
1626
|
-
}
|
|
1627
|
-
/**
|
|
1628
|
-
* @returns {Uint16Array}
|
|
1629
|
-
*/
|
|
1630
|
-
getBytes16() {
|
|
1631
|
-
const ret = wasm.strictstring_getBytes16(this.__wbg_ptr);
|
|
1632
|
-
var v1 = getArrayU16FromWasm0(ret[0], ret[1]).slice();
|
|
1633
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 2, 2);
|
|
1634
|
-
return v1;
|
|
1635
|
-
}
|
|
1636
|
-
/**
|
|
1637
|
-
* @param {string} val
|
|
1638
|
-
*/
|
|
1639
|
-
set(val) {
|
|
1640
|
-
const ptr0 = passStringToWasm0(val, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1641
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1642
|
-
const ret = wasm.strictstring_set(this.__wbg_ptr, ptr0, len0);
|
|
1643
|
-
if (ret[1]) {
|
|
1644
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
/**
|
|
1648
|
-
* @param {string} extra
|
|
1649
|
-
*/
|
|
1650
|
-
push(extra) {
|
|
1651
|
-
const ptr0 = passStringToWasm0(extra, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1652
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1653
|
-
const ret = wasm.strictstring_push(this.__wbg_ptr, ptr0, len0);
|
|
1654
|
-
if (ret[1]) {
|
|
1655
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
/**
|
|
1659
|
-
* @param {string} c
|
|
1660
|
-
*/
|
|
1661
|
-
pushChar(c) {
|
|
1662
|
-
const char0 = c.codePointAt(0);
|
|
1663
|
-
_assertChar(char0);
|
|
1664
|
-
const ret = wasm.strictstring_pushChar(this.__wbg_ptr, char0);
|
|
1665
|
-
if (ret[1]) {
|
|
1666
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
/**
|
|
1670
|
-
* @returns {string | undefined}
|
|
1671
|
-
*/
|
|
1672
|
-
popChar() {
|
|
1673
|
-
const ret = wasm.strictstring_popChar(this.__wbg_ptr);
|
|
1674
|
-
return ret === 0xFFFFFF ? undefined : String.fromCodePoint(ret);
|
|
1675
|
-
}
|
|
1676
|
-
/**
|
|
1677
|
-
* @returns {number}
|
|
1678
|
-
*/
|
|
1679
|
-
len_chars() {
|
|
1680
|
-
const ret = wasm.strictstring_len_chars(this.__wbg_ptr);
|
|
1681
|
-
return ret >>> 0;
|
|
1682
|
-
}
|
|
1683
|
-
/**
|
|
1684
|
-
* @returns {number}
|
|
1685
|
-
*/
|
|
1686
|
-
lenBytes() {
|
|
1687
|
-
const ret = wasm.strictstring_lenBytes(this.__wbg_ptr);
|
|
1688
|
-
return ret >>> 0;
|
|
1689
|
-
}
|
|
1690
|
-
/**
|
|
1691
|
-
* @returns {number}
|
|
1692
|
-
*/
|
|
1693
|
-
lenBytes16() {
|
|
1694
|
-
const ret = wasm.strictstring_lenBytes16(this.__wbg_ptr);
|
|
1695
|
-
return ret >>> 0;
|
|
1696
|
-
}
|
|
1697
|
-
/**
|
|
1698
|
-
* @returns {number}
|
|
1699
|
-
*/
|
|
1700
|
-
max_chars() {
|
|
1701
|
-
const ret = wasm.strictstring_max_chars(this.__wbg_ptr);
|
|
1702
|
-
return ret >>> 0;
|
|
1703
|
-
}
|
|
1704
|
-
/**
|
|
1705
|
-
* @returns {StringEncoding}
|
|
1706
|
-
*/
|
|
1707
|
-
getEncoding() {
|
|
1708
|
-
const ret = wasm.strictstring_getEncoding(this.__wbg_ptr);
|
|
1709
|
-
return ret;
|
|
1710
|
-
}
|
|
1711
|
-
/**
|
|
1712
|
-
* @param {StringEncoding} encoding
|
|
1713
|
-
*/
|
|
1714
|
-
setEncoding(encoding) {
|
|
1715
|
-
const ret = wasm.strictstring_setEncoding(this.__wbg_ptr, encoding);
|
|
1716
|
-
if (ret[1]) {
|
|
1717
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
/**
|
|
1721
|
-
* @param {number} start
|
|
1722
|
-
* @param {number} end
|
|
1723
|
-
* @returns {StrictString}
|
|
1724
|
-
*/
|
|
1725
|
-
substring(start, end) {
|
|
1726
|
-
const ret = wasm.strictstring_substring(this.__wbg_ptr, start, end);
|
|
1727
|
-
if (ret[2]) {
|
|
1728
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1729
|
-
}
|
|
1730
|
-
return StrictString.__wrap(ret[0]);
|
|
1731
|
-
}
|
|
1732
|
-
/**
|
|
1733
|
-
* @param {number} index
|
|
1734
|
-
* @returns {string | undefined}
|
|
1735
|
-
*/
|
|
1736
|
-
charAt(index) {
|
|
1737
|
-
const ret = wasm.strictstring_charAt(this.__wbg_ptr, index);
|
|
1738
|
-
let v1;
|
|
1739
|
-
if (ret[0] !== 0) {
|
|
1740
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
1741
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1742
|
-
}
|
|
1743
|
-
return v1;
|
|
1744
|
-
}
|
|
1745
|
-
/**
|
|
1746
|
-
* @param {string} search
|
|
1747
|
-
* @returns {number}
|
|
1748
|
-
*/
|
|
1749
|
-
indexOf(search) {
|
|
1750
|
-
const ptr0 = passStringToWasm0(search, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1751
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1752
|
-
const ret = wasm.strictstring_indexOf(this.__wbg_ptr, ptr0, len0);
|
|
1753
|
-
return ret;
|
|
1754
|
-
}
|
|
1755
|
-
/**
|
|
1756
|
-
* @param {string} search
|
|
1757
|
-
* @returns {number}
|
|
1758
|
-
*/
|
|
1759
|
-
lastIndexOf(search) {
|
|
1760
|
-
const ptr0 = passStringToWasm0(search, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1761
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1762
|
-
const ret = wasm.strictstring_lastIndexOf(this.__wbg_ptr, ptr0, len0);
|
|
1763
|
-
return ret;
|
|
1764
|
-
}
|
|
1765
|
-
/**
|
|
1766
|
-
* @param {string} prefix
|
|
1767
|
-
* @returns {boolean}
|
|
1768
|
-
*/
|
|
1769
|
-
startsWith(prefix) {
|
|
1770
|
-
const ptr0 = passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1771
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1772
|
-
const ret = wasm.strictstring_startsWith(this.__wbg_ptr, ptr0, len0);
|
|
1773
|
-
return ret !== 0;
|
|
1774
|
-
}
|
|
1775
|
-
/**
|
|
1776
|
-
* @param {string} suffix
|
|
1777
|
-
* @returns {boolean}
|
|
1778
|
-
*/
|
|
1779
|
-
endsWith(suffix) {
|
|
1780
|
-
const ptr0 = passStringToWasm0(suffix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1781
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1782
|
-
const ret = wasm.strictstring_endsWith(this.__wbg_ptr, ptr0, len0);
|
|
1783
|
-
return ret !== 0;
|
|
1784
|
-
}
|
|
1785
|
-
/**
|
|
1786
|
-
* @param {string} search
|
|
1787
|
-
* @returns {boolean}
|
|
1788
|
-
*/
|
|
1789
|
-
contains(search) {
|
|
1790
|
-
const ptr0 = passStringToWasm0(search, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1791
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1792
|
-
const ret = wasm.strictstring_contains(this.__wbg_ptr, ptr0, len0);
|
|
1793
|
-
return ret !== 0;
|
|
1794
|
-
}
|
|
1795
|
-
/**
|
|
1796
|
-
* @param {string} old
|
|
1797
|
-
* @param {string} _new
|
|
1798
|
-
*/
|
|
1799
|
-
replace(old, _new) {
|
|
1800
|
-
const ptr0 = passStringToWasm0(old, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1801
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1802
|
-
const ptr1 = passStringToWasm0(_new, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1803
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1804
|
-
const ret = wasm.strictstring_replace(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1805
|
-
if (ret[1]) {
|
|
1806
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
toLowerCase() {
|
|
1810
|
-
wasm.strictstring_toLowerCase(this.__wbg_ptr);
|
|
1811
|
-
}
|
|
1812
|
-
toUpperCase() {
|
|
1813
|
-
wasm.strictstring_toUpperCase(this.__wbg_ptr);
|
|
1814
|
-
}
|
|
1815
|
-
trim() {
|
|
1816
|
-
wasm.strictstring_trim(this.__wbg_ptr);
|
|
1817
|
-
}
|
|
1818
|
-
trimStart() {
|
|
1819
|
-
wasm.strictstring_trimStart(this.__wbg_ptr);
|
|
1820
|
-
}
|
|
1821
|
-
trimEnd() {
|
|
1822
|
-
wasm.strictstring_trimEnd(this.__wbg_ptr);
|
|
1823
|
-
}
|
|
1824
|
-
/**
|
|
1825
|
-
* @param {number} target_length
|
|
1826
|
-
* @param {string} pad_char
|
|
1827
|
-
*/
|
|
1828
|
-
padStart(target_length, pad_char) {
|
|
1829
|
-
const ptr0 = passStringToWasm0(pad_char, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1830
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1831
|
-
const ret = wasm.strictstring_padStart(this.__wbg_ptr, target_length, ptr0, len0);
|
|
1832
|
-
if (ret[1]) {
|
|
1833
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
/**
|
|
1837
|
-
* @param {number} target_length
|
|
1838
|
-
* @param {string} pad_char
|
|
1839
|
-
*/
|
|
1840
|
-
padEnd(target_length, pad_char) {
|
|
1841
|
-
const ptr0 = passStringToWasm0(pad_char, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1842
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1843
|
-
const ret = wasm.strictstring_padEnd(this.__wbg_ptr, target_length, ptr0, len0);
|
|
1844
|
-
if (ret[1]) {
|
|
1845
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
/**
|
|
1849
|
-
* @param {string} delimiter
|
|
1850
|
-
* @returns {Array<any>}
|
|
1851
|
-
*/
|
|
1852
|
-
split(delimiter) {
|
|
1853
|
-
const ptr0 = passStringToWasm0(delimiter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1854
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1855
|
-
const ret = wasm.strictstring_split(this.__wbg_ptr, ptr0, len0);
|
|
1856
|
-
return ret;
|
|
1857
|
-
}
|
|
1858
|
-
/**
|
|
1859
|
-
* @param {any} js_function
|
|
1860
|
-
* @returns {StrictString}
|
|
1861
|
-
*/
|
|
1862
|
-
map(js_function) {
|
|
1863
|
-
const ret = wasm.strictstring_map(this.__wbg_ptr, js_function);
|
|
1864
|
-
if (ret[2]) {
|
|
1865
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1866
|
-
}
|
|
1867
|
-
return StrictString.__wrap(ret[0]);
|
|
1868
|
-
}
|
|
1869
|
-
/**
|
|
1870
|
-
* @param {any} js_function
|
|
1871
|
-
* @returns {StrictString}
|
|
1872
|
-
*/
|
|
1873
|
-
filter(js_function) {
|
|
1874
|
-
const ret = wasm.strictstring_filter(this.__wbg_ptr, js_function);
|
|
1875
|
-
if (ret[2]) {
|
|
1876
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1877
|
-
}
|
|
1878
|
-
return StrictString.__wrap(ret[0]);
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
const StrictTimeoutFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1883
|
-
? { register: () => {}, unregister: () => {} }
|
|
1884
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_stricttimeout_free(ptr >>> 0, 1));
|
|
1885
|
-
|
|
1886
|
-
export class StrictTimeout {
|
|
1887
|
-
|
|
1888
|
-
__destroy_into_raw() {
|
|
1889
|
-
const ptr = this.__wbg_ptr;
|
|
1890
|
-
this.__wbg_ptr = 0;
|
|
1891
|
-
StrictTimeoutFinalization.unregister(this);
|
|
1892
|
-
return ptr;
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
free() {
|
|
1896
|
-
const ptr = this.__destroy_into_raw();
|
|
1897
|
-
wasm.__wbg_stricttimeout_free(ptr, 0);
|
|
1898
|
-
}
|
|
1899
|
-
/**
|
|
1900
|
-
* @param {number} duration
|
|
1901
|
-
* @param {Function} callback
|
|
1902
|
-
* @param {HeapType} return_type
|
|
1903
|
-
*/
|
|
1904
|
-
constructor(duration, callback, return_type) {
|
|
1905
|
-
const ret = wasm.stricttimeout_new(duration, callback, return_type);
|
|
1906
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1907
|
-
StrictTimeoutFinalization.register(this, this.__wbg_ptr, this);
|
|
1908
|
-
return this;
|
|
1909
|
-
}
|
|
1910
|
-
/**
|
|
1911
|
-
* @returns {Promise<any>}
|
|
1912
|
-
*/
|
|
1913
|
-
start() {
|
|
1914
|
-
const ret = wasm.stricttimeout_start(this.__wbg_ptr);
|
|
1915
|
-
return ret;
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
const StrictWhileLoopFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1920
|
-
? { register: () => {}, unregister: () => {} }
|
|
1921
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_strictwhileloop_free(ptr >>> 0, 1));
|
|
1922
|
-
|
|
1923
|
-
export class StrictWhileLoop {
|
|
1924
|
-
|
|
1925
|
-
__destroy_into_raw() {
|
|
1926
|
-
const ptr = this.__wbg_ptr;
|
|
1927
|
-
this.__wbg_ptr = 0;
|
|
1928
|
-
StrictWhileLoopFinalization.unregister(this);
|
|
1929
|
-
return ptr;
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
free() {
|
|
1933
|
-
const ptr = this.__destroy_into_raw();
|
|
1934
|
-
wasm.__wbg_strictwhileloop_free(ptr, 0);
|
|
1935
|
-
}
|
|
1936
|
-
/**
|
|
1937
|
-
* @param {Function} condition
|
|
1938
|
-
* @param {number} max_iterations
|
|
1939
|
-
*/
|
|
1940
|
-
constructor(condition, max_iterations) {
|
|
1941
|
-
const ret = wasm.strictwhileloop_new(condition, max_iterations);
|
|
1942
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1943
|
-
StrictWhileLoopFinalization.register(this, this.__wbg_ptr, this);
|
|
1944
|
-
return this;
|
|
1945
|
-
}
|
|
1946
|
-
/**
|
|
1947
|
-
* @returns {boolean}
|
|
1948
|
-
*/
|
|
1949
|
-
shouldContinue() {
|
|
1950
|
-
const ret = wasm.strictwhileloop_shouldContinue(this.__wbg_ptr);
|
|
1951
|
-
if (ret[2]) {
|
|
1952
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1953
|
-
}
|
|
1954
|
-
return ret[0] !== 0;
|
|
1955
|
-
}
|
|
1956
|
-
/**
|
|
1957
|
-
* @returns {number}
|
|
1958
|
-
*/
|
|
1959
|
-
increment() {
|
|
1960
|
-
const ret = wasm.strictwhileloop_increment(this.__wbg_ptr);
|
|
1961
|
-
if (ret[2]) {
|
|
1962
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1963
|
-
}
|
|
1964
|
-
return ret[0] >>> 0;
|
|
1965
|
-
}
|
|
1966
|
-
/**
|
|
1967
|
-
* @returns {number}
|
|
1968
|
-
*/
|
|
1969
|
-
getIterationCount() {
|
|
1970
|
-
const ret = wasm.strictwhileloop_getIterationCount(this.__wbg_ptr);
|
|
1971
|
-
return ret >>> 0;
|
|
1972
|
-
}
|
|
1973
|
-
reset() {
|
|
1974
|
-
wasm.strictwhileloop_reset(this.__wbg_ptr);
|
|
1975
|
-
}
|
|
1976
|
-
/**
|
|
1977
|
-
* @param {Function} callback
|
|
1978
|
-
* @returns {number}
|
|
1979
|
-
*/
|
|
1980
|
-
run(callback) {
|
|
1981
|
-
const ret = wasm.strictwhileloop_run(this.__wbg_ptr, callback);
|
|
1982
|
-
if (ret[2]) {
|
|
1983
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1984
|
-
}
|
|
1985
|
-
return ret[0] >>> 0;
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
const ThreadConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1990
|
-
? { register: () => {}, unregister: () => {} }
|
|
1991
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_threadconfig_free(ptr >>> 0, 1));
|
|
1992
|
-
|
|
1993
|
-
export class ThreadConfig {
|
|
1994
|
-
|
|
1995
|
-
__destroy_into_raw() {
|
|
1996
|
-
const ptr = this.__wbg_ptr;
|
|
1997
|
-
this.__wbg_ptr = 0;
|
|
1998
|
-
ThreadConfigFinalization.unregister(this);
|
|
1999
|
-
return ptr;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
free() {
|
|
2003
|
-
const ptr = this.__destroy_into_raw();
|
|
2004
|
-
wasm.__wbg_threadconfig_free(ptr, 0);
|
|
2005
|
-
}
|
|
2006
|
-
/**
|
|
2007
|
-
* @returns {ThreadPriority}
|
|
2008
|
-
*/
|
|
2009
|
-
get priority() {
|
|
2010
|
-
const ret = wasm.__wbg_get_threadconfig_priority(this.__wbg_ptr);
|
|
2011
|
-
return ret;
|
|
2012
|
-
}
|
|
2013
|
-
/**
|
|
2014
|
-
* @param {ThreadPriority} arg0
|
|
2015
|
-
*/
|
|
2016
|
-
set priority(arg0) {
|
|
2017
|
-
wasm.__wbg_set_threadconfig_priority(this.__wbg_ptr, arg0);
|
|
2018
|
-
}
|
|
2019
|
-
/**
|
|
2020
|
-
* @returns {number}
|
|
2021
|
-
*/
|
|
2022
|
-
get stack_size() {
|
|
2023
|
-
const ret = wasm.__wbg_get_threadconfig_stack_size(this.__wbg_ptr);
|
|
2024
|
-
return ret >>> 0;
|
|
2025
|
-
}
|
|
2026
|
-
/**
|
|
2027
|
-
* @param {number} arg0
|
|
2028
|
-
*/
|
|
2029
|
-
set stack_size(arg0) {
|
|
2030
|
-
wasm.__wbg_set_threadconfig_stack_size(this.__wbg_ptr, arg0);
|
|
2031
|
-
}
|
|
2032
|
-
/**
|
|
2033
|
-
* @returns {number}
|
|
2034
|
-
*/
|
|
2035
|
-
get timeout_ms() {
|
|
2036
|
-
const ret = wasm.__wbg_get_threadconfig_timeout_ms(this.__wbg_ptr);
|
|
2037
|
-
return ret >>> 0;
|
|
2038
|
-
}
|
|
2039
|
-
/**
|
|
2040
|
-
* @param {number} arg0
|
|
2041
|
-
*/
|
|
2042
|
-
set timeout_ms(arg0) {
|
|
2043
|
-
wasm.__wbg_set_threadconfig_timeout_ms(this.__wbg_ptr, arg0);
|
|
2044
|
-
}
|
|
2045
|
-
/**
|
|
2046
|
-
* @returns {number}
|
|
2047
|
-
*/
|
|
2048
|
-
get max_retries() {
|
|
2049
|
-
const ret = wasm.__wbg_get_threadconfig_max_retries(this.__wbg_ptr);
|
|
2050
|
-
return ret >>> 0;
|
|
2051
|
-
}
|
|
2052
|
-
/**
|
|
2053
|
-
* @param {number} arg0
|
|
2054
|
-
*/
|
|
2055
|
-
set max_retries(arg0) {
|
|
2056
|
-
wasm.__wbg_set_threadconfig_max_retries(this.__wbg_ptr, arg0);
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
const ThreadManagerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2061
|
-
? { register: () => {}, unregister: () => {} }
|
|
2062
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_threadmanager_free(ptr >>> 0, 1));
|
|
2063
|
-
|
|
2064
|
-
export class ThreadManager {
|
|
2065
|
-
|
|
2066
|
-
static __wrap(ptr) {
|
|
2067
|
-
ptr = ptr >>> 0;
|
|
2068
|
-
const obj = Object.create(ThreadManager.prototype);
|
|
2069
|
-
obj.__wbg_ptr = ptr;
|
|
2070
|
-
ThreadManagerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2071
|
-
return obj;
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
__destroy_into_raw() {
|
|
2075
|
-
const ptr = this.__wbg_ptr;
|
|
2076
|
-
this.__wbg_ptr = 0;
|
|
2077
|
-
ThreadManagerFinalization.unregister(this);
|
|
2078
|
-
return ptr;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
free() {
|
|
2082
|
-
const ptr = this.__destroy_into_raw();
|
|
2083
|
-
wasm.__wbg_threadmanager_free(ptr, 0);
|
|
2084
|
-
}
|
|
2085
|
-
/**
|
|
2086
|
-
* @param {any} config
|
|
2087
|
-
*/
|
|
2088
|
-
constructor(config) {
|
|
2089
|
-
const ret = wasm.threadmanager_new(config);
|
|
2090
|
-
if (ret[2]) {
|
|
2091
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2092
|
-
}
|
|
2093
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
2094
|
-
ThreadManagerFinalization.register(this, this.__wbg_ptr, this);
|
|
2095
|
-
return this;
|
|
2096
|
-
}
|
|
2097
|
-
/**
|
|
2098
|
-
* @param {string} name
|
|
2099
|
-
* @param {number} max_threads
|
|
2100
|
-
* @returns {boolean}
|
|
2101
|
-
*/
|
|
2102
|
-
createPool(name, max_threads) {
|
|
2103
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2104
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2105
|
-
const ret = wasm.threadmanager_createPool(this.__wbg_ptr, ptr0, len0, max_threads);
|
|
2106
|
-
return ret !== 0;
|
|
2107
|
-
}
|
|
2108
|
-
/**
|
|
2109
|
-
* @param {string} name
|
|
2110
|
-
* @returns {ThreadPool | undefined}
|
|
2111
|
-
*/
|
|
2112
|
-
getPool(name) {
|
|
2113
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2114
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2115
|
-
const ret = wasm.threadmanager_getPool(this.__wbg_ptr, ptr0, len0);
|
|
2116
|
-
return ret === 0 ? undefined : ThreadPool.__wrap(ret);
|
|
2117
|
-
}
|
|
2118
|
-
/**
|
|
2119
|
-
* @param {string} pool_name
|
|
2120
|
-
* @param {Function} _function
|
|
2121
|
-
* @param {any} args
|
|
2122
|
-
* @param {any} result_type
|
|
2123
|
-
* @param {ThreadPriority} priority
|
|
2124
|
-
* @returns {string}
|
|
2125
|
-
*/
|
|
2126
|
-
submitToPool(pool_name, _function, args, result_type, priority) {
|
|
2127
|
-
let deferred3_0;
|
|
2128
|
-
let deferred3_1;
|
|
2129
|
-
try {
|
|
2130
|
-
const ptr0 = passStringToWasm0(pool_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2131
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2132
|
-
const ret = wasm.threadmanager_submitToPool(this.__wbg_ptr, ptr0, len0, _function, args, result_type, priority);
|
|
2133
|
-
var ptr2 = ret[0];
|
|
2134
|
-
var len2 = ret[1];
|
|
2135
|
-
if (ret[3]) {
|
|
2136
|
-
ptr2 = 0; len2 = 0;
|
|
2137
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
2138
|
-
}
|
|
2139
|
-
deferred3_0 = ptr2;
|
|
2140
|
-
deferred3_1 = len2;
|
|
2141
|
-
return getStringFromWasm0(ptr2, len2);
|
|
2142
|
-
} finally {
|
|
2143
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
/**
|
|
2147
|
-
* @param {string | null | undefined} pool_name
|
|
2148
|
-
* @param {number} count
|
|
2149
|
-
* @returns {Promise<any>}
|
|
2150
|
-
*/
|
|
2151
|
-
executeBatch(pool_name, count) {
|
|
2152
|
-
var ptr0 = isLikeNone(pool_name) ? 0 : passStringToWasm0(pool_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2153
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2154
|
-
const ret = wasm.threadmanager_executeBatch(this.__wbg_ptr, ptr0, len0, count);
|
|
2155
|
-
return ret;
|
|
2156
|
-
}
|
|
2157
|
-
/**
|
|
2158
|
-
* @param {any} array
|
|
2159
|
-
* @param {Function} mapper
|
|
2160
|
-
* @param {any} result_type
|
|
2161
|
-
* @param {string | null} [_pool_name]
|
|
2162
|
-
* @returns {Promise<any>}
|
|
2163
|
-
*/
|
|
2164
|
-
parallelMap(array, mapper, result_type, _pool_name) {
|
|
2165
|
-
var ptr0 = isLikeNone(_pool_name) ? 0 : passStringToWasm0(_pool_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2166
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2167
|
-
const ret = wasm.threadmanager_parallelMap(this.__wbg_ptr, array, mapper, result_type, ptr0, len0);
|
|
2168
|
-
return ret;
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
const ThreadPoolFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2173
|
-
? { register: () => {}, unregister: () => {} }
|
|
2174
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_threadpool_free(ptr >>> 0, 1));
|
|
2175
|
-
|
|
2176
|
-
export class ThreadPool {
|
|
2177
|
-
|
|
2178
|
-
static __wrap(ptr) {
|
|
2179
|
-
ptr = ptr >>> 0;
|
|
2180
|
-
const obj = Object.create(ThreadPool.prototype);
|
|
2181
|
-
obj.__wbg_ptr = ptr;
|
|
2182
|
-
ThreadPoolFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2183
|
-
return obj;
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
__destroy_into_raw() {
|
|
2187
|
-
const ptr = this.__wbg_ptr;
|
|
2188
|
-
this.__wbg_ptr = 0;
|
|
2189
|
-
ThreadPoolFinalization.unregister(this);
|
|
2190
|
-
return ptr;
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
free() {
|
|
2194
|
-
const ptr = this.__destroy_into_raw();
|
|
2195
|
-
wasm.__wbg_threadpool_free(ptr, 0);
|
|
2196
|
-
}
|
|
2197
|
-
/**
|
|
2198
|
-
* @param {number} max_threads
|
|
2199
|
-
*/
|
|
2200
|
-
constructor(max_threads) {
|
|
2201
|
-
const ret = wasm.threadpool_new(max_threads);
|
|
2202
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2203
|
-
ThreadPoolFinalization.register(this, this.__wbg_ptr, this);
|
|
2204
|
-
return this;
|
|
2205
|
-
}
|
|
2206
|
-
/**
|
|
2207
|
-
* @param {ThreadTask} task
|
|
2208
|
-
* @returns {string}
|
|
2209
|
-
*/
|
|
2210
|
-
submitTask(task) {
|
|
2211
|
-
let deferred2_0;
|
|
2212
|
-
let deferred2_1;
|
|
2213
|
-
try {
|
|
2214
|
-
_assertClass(task, ThreadTask);
|
|
2215
|
-
var ptr0 = task.__destroy_into_raw();
|
|
2216
|
-
const ret = wasm.threadpool_submitTask(this.__wbg_ptr, ptr0);
|
|
2217
|
-
deferred2_0 = ret[0];
|
|
2218
|
-
deferred2_1 = ret[1];
|
|
2219
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
2220
|
-
} finally {
|
|
2221
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
/**
|
|
2225
|
-
* @param {Function} _function
|
|
2226
|
-
* @param {any} args
|
|
2227
|
-
* @param {any} result_type
|
|
2228
|
-
* @param {ThreadPriority} priority
|
|
2229
|
-
* @returns {string}
|
|
2230
|
-
*/
|
|
2231
|
-
submitFunction(_function, args, result_type, priority) {
|
|
2232
|
-
let deferred2_0;
|
|
2233
|
-
let deferred2_1;
|
|
2234
|
-
try {
|
|
2235
|
-
const ret = wasm.threadpool_submitFunction(this.__wbg_ptr, _function, args, result_type, priority);
|
|
2236
|
-
var ptr1 = ret[0];
|
|
2237
|
-
var len1 = ret[1];
|
|
2238
|
-
if (ret[3]) {
|
|
2239
|
-
ptr1 = 0; len1 = 0;
|
|
2240
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
2241
|
-
}
|
|
2242
|
-
deferred2_0 = ptr1;
|
|
2243
|
-
deferred2_1 = len1;
|
|
2244
|
-
return getStringFromWasm0(ptr1, len1);
|
|
2245
|
-
} finally {
|
|
2246
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
/**
|
|
2250
|
-
* @returns {Promise<any>}
|
|
2251
|
-
*/
|
|
2252
|
-
executeNext() {
|
|
2253
|
-
const ret = wasm.threadpool_executeNext(this.__wbg_ptr);
|
|
2254
|
-
return ret;
|
|
2255
|
-
}
|
|
2256
|
-
/**
|
|
2257
|
-
* @param {string} task_id
|
|
2258
|
-
* @returns {any}
|
|
2259
|
-
*/
|
|
2260
|
-
getTaskStatus(task_id) {
|
|
2261
|
-
const ptr0 = passStringToWasm0(task_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2262
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2263
|
-
const ret = wasm.threadpool_getTaskStatus(this.__wbg_ptr, ptr0, len0);
|
|
2264
|
-
return ret;
|
|
2265
|
-
}
|
|
2266
|
-
/**
|
|
2267
|
-
* @param {string} task_id
|
|
2268
|
-
* @returns {boolean}
|
|
2269
|
-
*/
|
|
2270
|
-
cancelTask(task_id) {
|
|
2271
|
-
const ptr0 = passStringToWasm0(task_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2272
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2273
|
-
const ret = wasm.threadpool_cancelTask(this.__wbg_ptr, ptr0, len0);
|
|
2274
|
-
return ret !== 0;
|
|
2275
|
-
}
|
|
2276
|
-
/**
|
|
2277
|
-
* @param {string} task_id
|
|
2278
|
-
* @returns {any}
|
|
2279
|
-
*/
|
|
2280
|
-
getCompletedResult(task_id) {
|
|
2281
|
-
const ptr0 = passStringToWasm0(task_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2282
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2283
|
-
const ret = wasm.threadpool_getCompletedResult(this.__wbg_ptr, ptr0, len0);
|
|
2284
|
-
return ret;
|
|
2285
|
-
}
|
|
2286
|
-
/**
|
|
2287
|
-
* @returns {number}
|
|
2288
|
-
*/
|
|
2289
|
-
get active_count() {
|
|
2290
|
-
const ret = wasm.threadpool_active_count(this.__wbg_ptr);
|
|
2291
|
-
return ret >>> 0;
|
|
2292
|
-
}
|
|
2293
|
-
/**
|
|
2294
|
-
* @returns {number}
|
|
2295
|
-
*/
|
|
2296
|
-
get pending_count() {
|
|
2297
|
-
const ret = wasm.threadpool_pending_count(this.__wbg_ptr);
|
|
2298
|
-
return ret >>> 0;
|
|
2299
|
-
}
|
|
2300
|
-
/**
|
|
2301
|
-
* @returns {number}
|
|
2302
|
-
*/
|
|
2303
|
-
get completed_count() {
|
|
2304
|
-
const ret = wasm.threadpool_completed_count(this.__wbg_ptr);
|
|
2305
|
-
return ret >>> 0;
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
const ThreadTaskFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2310
|
-
? { register: () => {}, unregister: () => {} }
|
|
2311
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_threadtask_free(ptr >>> 0, 1));
|
|
2312
|
-
|
|
2313
|
-
export class ThreadTask {
|
|
2314
|
-
|
|
2315
|
-
__destroy_into_raw() {
|
|
2316
|
-
const ptr = this.__wbg_ptr;
|
|
2317
|
-
this.__wbg_ptr = 0;
|
|
2318
|
-
ThreadTaskFinalization.unregister(this);
|
|
2319
|
-
return ptr;
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
|
-
free() {
|
|
2323
|
-
const ptr = this.__destroy_into_raw();
|
|
2324
|
-
wasm.__wbg_threadtask_free(ptr, 0);
|
|
2325
|
-
}
|
|
2326
|
-
/**
|
|
2327
|
-
* @param {Function} _function
|
|
2328
|
-
* @param {any} args
|
|
2329
|
-
* @param {HeapType} result_type
|
|
2330
|
-
* @param {ThreadPriority} priority
|
|
2331
|
-
*/
|
|
2332
|
-
constructor(_function, args, result_type, priority) {
|
|
2333
|
-
const ret = wasm.threadtask_new(_function, args, result_type, priority);
|
|
2334
|
-
if (ret[2]) {
|
|
2335
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2336
|
-
}
|
|
2337
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
2338
|
-
ThreadTaskFinalization.register(this, this.__wbg_ptr, this);
|
|
2339
|
-
return this;
|
|
2340
|
-
}
|
|
2341
|
-
/**
|
|
2342
|
-
* @returns {string}
|
|
2343
|
-
*/
|
|
2344
|
-
get id() {
|
|
2345
|
-
let deferred1_0;
|
|
2346
|
-
let deferred1_1;
|
|
2347
|
-
try {
|
|
2348
|
-
const ret = wasm.threadtask_id(this.__wbg_ptr);
|
|
2349
|
-
deferred1_0 = ret[0];
|
|
2350
|
-
deferred1_1 = ret[1];
|
|
2351
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
2352
|
-
} finally {
|
|
2353
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2354
|
-
}
|
|
2355
|
-
}
|
|
2356
|
-
/**
|
|
2357
|
-
* @returns {ThreadState}
|
|
2358
|
-
*/
|
|
2359
|
-
get state() {
|
|
2360
|
-
const ret = wasm.threadtask_state(this.__wbg_ptr);
|
|
2361
|
-
return ret;
|
|
2362
|
-
}
|
|
2363
|
-
/**
|
|
2364
|
-
* @returns {ThreadPriority}
|
|
2365
|
-
*/
|
|
2366
|
-
get priority() {
|
|
2367
|
-
const ret = wasm.threadtask_priority(this.__wbg_ptr);
|
|
2368
|
-
return ret;
|
|
2369
|
-
}
|
|
2370
|
-
/**
|
|
2371
|
-
* @returns {Promise<any>}
|
|
2372
|
-
*/
|
|
2373
|
-
execute() {
|
|
2374
|
-
const ret = wasm.threadtask_execute(this.__wbg_ptr);
|
|
2375
|
-
return ret;
|
|
2376
|
-
}
|
|
2377
|
-
/**
|
|
2378
|
-
* @returns {Promise<any>}
|
|
2379
|
-
*/
|
|
2380
|
-
to_promise() {
|
|
2381
|
-
const ret = wasm.threadtask_to_promise(this.__wbg_ptr);
|
|
2382
|
-
return ret;
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
async function __wbg_load(module, imports) {
|
|
2387
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
2388
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
2389
|
-
try {
|
|
2390
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
2391
|
-
|
|
2392
|
-
} catch (e) {
|
|
2393
|
-
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
2394
|
-
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);
|
|
2395
|
-
|
|
2396
|
-
} else {
|
|
2397
|
-
throw e;
|
|
2398
|
-
}
|
|
2399
|
-
}
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
const bytes = await module.arrayBuffer();
|
|
2403
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
2404
|
-
|
|
2405
|
-
} else {
|
|
2406
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
2407
|
-
|
|
2408
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
2409
|
-
return { instance, module };
|
|
2410
|
-
|
|
2411
|
-
} else {
|
|
2412
|
-
return instance;
|
|
2413
|
-
}
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
function __wbg_get_imports() {
|
|
2418
|
-
const imports = {};
|
|
2419
|
-
imports.wbg = {};
|
|
2420
|
-
imports.wbg.__wbg_all_d5bf227e8f68795d = function(arg0) {
|
|
2421
|
-
const ret = Promise.all(arg0);
|
|
2422
|
-
return ret;
|
|
2423
|
-
};
|
|
2424
|
-
imports.wbg.__wbg_apply_36be6a55257c99bf = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2425
|
-
const ret = arg0.apply(arg1, arg2);
|
|
2426
|
-
return ret;
|
|
2427
|
-
}, arguments) };
|
|
2428
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
2429
|
-
const ret = arg0.call(arg1);
|
|
2430
|
-
return ret;
|
|
2431
|
-
}, arguments) };
|
|
2432
|
-
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2433
|
-
const ret = arg0.call(arg1, arg2);
|
|
2434
|
-
return ret;
|
|
2435
|
-
}, arguments) };
|
|
2436
|
-
imports.wbg.__wbg_catch_a6e601879b2610e9 = function(arg0, arg1) {
|
|
2437
|
-
const ret = arg0.catch(arg1);
|
|
2438
|
-
return ret;
|
|
2439
|
-
};
|
|
2440
|
-
imports.wbg.__wbg_fetch_1b7e793ab8320753 = function(arg0, arg1, arg2) {
|
|
2441
|
-
const ret = arg0.fetch(getStringFromWasm0(arg1, arg2));
|
|
2442
|
-
return ret;
|
|
2443
|
-
};
|
|
2444
|
-
imports.wbg.__wbg_getRandomValues_38a1ff1ea09f6cc7 = function() { return handleError(function (arg0, arg1) {
|
|
2445
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
2446
|
-
}, arguments) };
|
|
2447
|
-
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
2448
|
-
const ret = Reflect.get(arg0, arg1);
|
|
2449
|
-
return ret;
|
|
2450
|
-
}, arguments) };
|
|
2451
|
-
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
2452
|
-
const ret = arg0[arg1 >>> 0];
|
|
2453
|
-
return ret;
|
|
2454
|
-
};
|
|
2455
|
-
imports.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4 = function(arg0) {
|
|
2456
|
-
let result;
|
|
2457
|
-
try {
|
|
2458
|
-
result = arg0 instanceof Object;
|
|
2459
|
-
} catch (_) {
|
|
2460
|
-
result = false;
|
|
2461
|
-
}
|
|
2462
|
-
const ret = result;
|
|
2463
|
-
return ret;
|
|
2464
|
-
};
|
|
2465
|
-
imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
2466
|
-
let result;
|
|
2467
|
-
try {
|
|
2468
|
-
result = arg0 instanceof Response;
|
|
2469
|
-
} catch (_) {
|
|
2470
|
-
result = false;
|
|
2471
|
-
}
|
|
2472
|
-
const ret = result;
|
|
2473
|
-
return ret;
|
|
2474
|
-
};
|
|
2475
|
-
imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
2476
|
-
let result;
|
|
2477
|
-
try {
|
|
2478
|
-
result = arg0 instanceof Window;
|
|
2479
|
-
} catch (_) {
|
|
2480
|
-
result = false;
|
|
2481
|
-
}
|
|
2482
|
-
const ret = result;
|
|
2483
|
-
return ret;
|
|
2484
|
-
};
|
|
2485
|
-
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
2486
|
-
const ret = Array.isArray(arg0);
|
|
2487
|
-
return ret;
|
|
2488
|
-
};
|
|
2489
|
-
imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
|
|
2490
|
-
const ret = Object.keys(arg0);
|
|
2491
|
-
return ret;
|
|
2492
|
-
};
|
|
2493
|
-
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
2494
|
-
const ret = arg0.length;
|
|
2495
|
-
return ret;
|
|
2496
|
-
};
|
|
2497
|
-
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
2498
|
-
try {
|
|
2499
|
-
var state0 = {a: arg0, b: arg1};
|
|
2500
|
-
var cb0 = (arg0, arg1) => {
|
|
2501
|
-
const a = state0.a;
|
|
2502
|
-
state0.a = 0;
|
|
2503
|
-
try {
|
|
2504
|
-
return __wbg_adapter_260(a, state0.b, arg0, arg1);
|
|
2505
|
-
} finally {
|
|
2506
|
-
state0.a = a;
|
|
2507
|
-
}
|
|
2508
|
-
};
|
|
2509
|
-
const ret = new Promise(cb0);
|
|
2510
|
-
return ret;
|
|
2511
|
-
} finally {
|
|
2512
|
-
state0.a = state0.b = 0;
|
|
2513
|
-
}
|
|
2514
|
-
};
|
|
2515
|
-
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
2516
|
-
const ret = new Object();
|
|
2517
|
-
return ret;
|
|
2518
|
-
};
|
|
2519
|
-
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
2520
|
-
const ret = new Array();
|
|
2521
|
-
return ret;
|
|
2522
|
-
};
|
|
2523
|
-
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
2524
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2525
|
-
return ret;
|
|
2526
|
-
};
|
|
2527
|
-
imports.wbg.__wbg_newwithlength_c4c419ef0bc8a1f8 = function(arg0) {
|
|
2528
|
-
const ret = new Array(arg0 >>> 0);
|
|
2529
|
-
return ret;
|
|
2530
|
-
};
|
|
2531
|
-
imports.wbg.__wbg_ok_3aaf32d069979723 = function(arg0) {
|
|
2532
|
-
const ret = arg0.ok;
|
|
2533
|
-
return ret;
|
|
2534
|
-
};
|
|
2535
|
-
imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
2536
|
-
const ret = arg0.push(arg1);
|
|
2537
|
-
return ret;
|
|
2538
|
-
};
|
|
2539
|
-
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
2540
|
-
queueMicrotask(arg0);
|
|
2541
|
-
};
|
|
2542
|
-
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
2543
|
-
const ret = arg0.queueMicrotask;
|
|
2544
|
-
return ret;
|
|
2545
|
-
};
|
|
2546
|
-
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
2547
|
-
const ret = Promise.resolve(arg0);
|
|
2548
|
-
return ret;
|
|
2549
|
-
};
|
|
2550
|
-
imports.wbg.__wbg_setTimeout_360b2cfb66ec92c4 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2551
|
-
const ret = arg0.setTimeout(arg1, arg2, ...arg3);
|
|
2552
|
-
return ret;
|
|
2553
|
-
}, arguments) };
|
|
2554
|
-
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
2555
|
-
arg0[arg1 >>> 0] = arg2;
|
|
2556
|
-
};
|
|
2557
|
-
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2558
|
-
const ret = Reflect.set(arg0, arg1, arg2);
|
|
2559
|
-
return ret;
|
|
2560
|
-
}, arguments) };
|
|
2561
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
2562
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
2563
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2564
|
-
};
|
|
2565
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
2566
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2567
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2568
|
-
};
|
|
2569
|
-
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
2570
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
2571
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2572
|
-
};
|
|
2573
|
-
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
2574
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
2575
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2576
|
-
};
|
|
2577
|
-
imports.wbg.__wbg_text_7805bea50de2af49 = function() { return handleError(function (arg0) {
|
|
2578
|
-
const ret = arg0.text();
|
|
2579
|
-
return ret;
|
|
2580
|
-
}, arguments) };
|
|
2581
|
-
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
2582
|
-
const ret = arg0.then(arg1);
|
|
2583
|
-
return ret;
|
|
2584
|
-
};
|
|
2585
|
-
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
2586
|
-
const ret = arg0.then(arg1, arg2);
|
|
2587
|
-
return ret;
|
|
2588
|
-
};
|
|
2589
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
2590
|
-
const ret = arg0;
|
|
2591
|
-
return ret;
|
|
2592
|
-
};
|
|
2593
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
2594
|
-
const v = arg0;
|
|
2595
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
2596
|
-
return ret;
|
|
2597
|
-
};
|
|
2598
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
2599
|
-
const obj = arg0.original;
|
|
2600
|
-
if (obj.cnt-- == 1) {
|
|
2601
|
-
obj.a = 0;
|
|
2602
|
-
return true;
|
|
2603
|
-
}
|
|
2604
|
-
const ret = false;
|
|
2605
|
-
return ret;
|
|
2606
|
-
};
|
|
2607
|
-
imports.wbg.__wbindgen_closure_wrapper490 = function(arg0, arg1, arg2) {
|
|
2608
|
-
const ret = makeMutClosure(arg0, arg1, 64, __wbg_adapter_40);
|
|
2609
|
-
return ret;
|
|
2610
|
-
};
|
|
2611
|
-
imports.wbg.__wbindgen_closure_wrapper672 = function(arg0, arg1, arg2) {
|
|
2612
|
-
const ret = makeMutClosure(arg0, arg1, 72, __wbg_adapter_43);
|
|
2613
|
-
return ret;
|
|
2614
|
-
};
|
|
2615
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
2616
|
-
const ret = debugString(arg1);
|
|
2617
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2618
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2619
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2620
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2621
|
-
};
|
|
2622
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
2623
|
-
const table = wasm.__wbindgen_export_2;
|
|
2624
|
-
const offset = table.grow(4);
|
|
2625
|
-
table.set(0, undefined);
|
|
2626
|
-
table.set(offset + 0, undefined);
|
|
2627
|
-
table.set(offset + 1, null);
|
|
2628
|
-
table.set(offset + 2, true);
|
|
2629
|
-
table.set(offset + 3, false);
|
|
2630
|
-
;
|
|
2631
|
-
};
|
|
2632
|
-
imports.wbg.__wbindgen_is_falsy = function(arg0) {
|
|
2633
|
-
const ret = !arg0;
|
|
2634
|
-
return ret;
|
|
2635
|
-
};
|
|
2636
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
2637
|
-
const ret = typeof(arg0) === 'function';
|
|
2638
|
-
return ret;
|
|
2639
|
-
};
|
|
2640
|
-
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
2641
|
-
const ret = arg0 === null;
|
|
2642
|
-
return ret;
|
|
2643
|
-
};
|
|
2644
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
2645
|
-
const val = arg0;
|
|
2646
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2647
|
-
return ret;
|
|
2648
|
-
};
|
|
2649
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
2650
|
-
const ret = typeof(arg0) === 'string';
|
|
2651
|
-
return ret;
|
|
2652
|
-
};
|
|
2653
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
2654
|
-
const ret = arg0 === undefined;
|
|
2655
|
-
return ret;
|
|
2656
|
-
};
|
|
2657
|
-
imports.wbg.__wbindgen_memory = function() {
|
|
2658
|
-
const ret = wasm.memory;
|
|
2659
|
-
return ret;
|
|
2660
|
-
};
|
|
2661
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
2662
|
-
const obj = arg1;
|
|
2663
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2664
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2665
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2666
|
-
};
|
|
2667
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
2668
|
-
const ret = arg0;
|
|
2669
|
-
return ret;
|
|
2670
|
-
};
|
|
2671
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
2672
|
-
const obj = arg1;
|
|
2673
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2674
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2675
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2676
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2677
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2678
|
-
};
|
|
2679
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2680
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2681
|
-
return ret;
|
|
2682
|
-
};
|
|
2683
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
2684
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2685
|
-
};
|
|
2686
|
-
|
|
2687
|
-
return imports;
|
|
2688
|
-
}
|
|
2689
|
-
|
|
2690
|
-
function __wbg_init_memory(imports, memory) {
|
|
2691
|
-
|
|
2692
|
-
}
|
|
2693
|
-
|
|
2694
|
-
function __wbg_finalize_init(instance, module) {
|
|
2695
|
-
wasm = instance.exports;
|
|
2696
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
2697
|
-
cachedDataViewMemory0 = null;
|
|
2698
|
-
cachedFloat64ArrayMemory0 = null;
|
|
2699
|
-
cachedUint16ArrayMemory0 = null;
|
|
2700
|
-
cachedUint8ArrayMemory0 = null;
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
wasm.__wbindgen_start();
|
|
2704
|
-
return wasm;
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2707
|
-
function initSync(module) {
|
|
2708
|
-
if (wasm !== undefined) return wasm;
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
if (typeof module !== 'undefined') {
|
|
2712
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
2713
|
-
({module} = module)
|
|
2714
|
-
} else {
|
|
2715
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
2716
|
-
}
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
const imports = __wbg_get_imports();
|
|
2720
|
-
|
|
2721
|
-
__wbg_init_memory(imports);
|
|
2722
|
-
|
|
2723
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
2724
|
-
module = new WebAssembly.Module(module);
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
2728
|
-
|
|
2729
|
-
return __wbg_finalize_init(instance, module);
|
|
2730
|
-
}
|
|
2731
|
-
|
|
2732
|
-
async function __wbg_init(module_or_path) {
|
|
2733
|
-
if (wasm !== undefined) return wasm;
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
if (typeof module_or_path !== 'undefined') {
|
|
2737
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2738
|
-
({module_or_path} = module_or_path)
|
|
2739
|
-
} else {
|
|
2740
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
2741
|
-
}
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
if (typeof module_or_path === 'undefined') {
|
|
2745
|
-
module_or_path = new URL('strictjs_runtime_bg.wasm', import.meta.url);
|
|
2746
|
-
}
|
|
2747
|
-
const imports = __wbg_get_imports();
|
|
2748
|
-
|
|
2749
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
2750
|
-
module_or_path = fetch(module_or_path);
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
__wbg_init_memory(imports);
|
|
2754
|
-
|
|
2755
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
2756
|
-
|
|
2757
|
-
return __wbg_finalize_init(instance, module);
|
|
2758
|
-
}
|
|
2759
|
-
|
|
2760
|
-
export { initSync };
|
|
2761
|
-
export default __wbg_init;
|