libchai 0.1.14-alpha.1 → 0.2.1
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/LICENSE +674 -0
- package/chai.d.ts +9 -72
- package/chai.js +4 -776
- package/chai_bg.js +706 -0
- package/chai_bg.wasm +0 -0
- package/package.json +10 -1
package/chai.js
CHANGED
|
@@ -1,776 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
heap.push(undefined, null, true, false);
|
|
6
|
-
|
|
7
|
-
function getObject(idx) { return heap[idx]; }
|
|
8
|
-
|
|
9
|
-
let heap_next = heap.length;
|
|
10
|
-
|
|
11
|
-
function dropObject(idx) {
|
|
12
|
-
if (idx < 132) return;
|
|
13
|
-
heap[idx] = heap_next;
|
|
14
|
-
heap_next = idx;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function takeObject(idx) {
|
|
18
|
-
const ret = getObject(idx);
|
|
19
|
-
dropObject(idx);
|
|
20
|
-
return ret;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function isLikeNone(x) {
|
|
24
|
-
return x === undefined || x === null;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let cachedFloat64Memory0 = null;
|
|
28
|
-
|
|
29
|
-
function getFloat64Memory0() {
|
|
30
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
31
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
32
|
-
}
|
|
33
|
-
return cachedFloat64Memory0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
let cachedInt32Memory0 = null;
|
|
37
|
-
|
|
38
|
-
function getInt32Memory0() {
|
|
39
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
40
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
41
|
-
}
|
|
42
|
-
return cachedInt32Memory0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
let WASM_VECTOR_LEN = 0;
|
|
46
|
-
|
|
47
|
-
let cachedUint8Memory0 = null;
|
|
48
|
-
|
|
49
|
-
function getUint8Memory0() {
|
|
50
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
51
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
52
|
-
}
|
|
53
|
-
return cachedUint8Memory0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
57
|
-
|
|
58
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
59
|
-
? function (arg, view) {
|
|
60
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
61
|
-
}
|
|
62
|
-
: function (arg, view) {
|
|
63
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
64
|
-
view.set(buf);
|
|
65
|
-
return {
|
|
66
|
-
read: arg.length,
|
|
67
|
-
written: buf.length
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
72
|
-
|
|
73
|
-
if (realloc === undefined) {
|
|
74
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
75
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
76
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
77
|
-
WASM_VECTOR_LEN = buf.length;
|
|
78
|
-
return ptr;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
let len = arg.length;
|
|
82
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
83
|
-
|
|
84
|
-
const mem = getUint8Memory0();
|
|
85
|
-
|
|
86
|
-
let offset = 0;
|
|
87
|
-
|
|
88
|
-
for (; offset < len; offset++) {
|
|
89
|
-
const code = arg.charCodeAt(offset);
|
|
90
|
-
if (code > 0x7F) break;
|
|
91
|
-
mem[ptr + offset] = code;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (offset !== len) {
|
|
95
|
-
if (offset !== 0) {
|
|
96
|
-
arg = arg.slice(offset);
|
|
97
|
-
}
|
|
98
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
99
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
100
|
-
const ret = encodeString(arg, view);
|
|
101
|
-
|
|
102
|
-
offset += ret.written;
|
|
103
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
WASM_VECTOR_LEN = offset;
|
|
107
|
-
return ptr;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function addHeapObject(obj) {
|
|
111
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
112
|
-
const idx = heap_next;
|
|
113
|
-
heap_next = heap[idx];
|
|
114
|
-
|
|
115
|
-
heap[idx] = obj;
|
|
116
|
-
return idx;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
120
|
-
|
|
121
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
122
|
-
|
|
123
|
-
function getStringFromWasm0(ptr, len) {
|
|
124
|
-
ptr = ptr >>> 0;
|
|
125
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
let cachedBigInt64Memory0 = null;
|
|
129
|
-
|
|
130
|
-
function getBigInt64Memory0() {
|
|
131
|
-
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
132
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
133
|
-
}
|
|
134
|
-
return cachedBigInt64Memory0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function debugString(val) {
|
|
138
|
-
// primitive types
|
|
139
|
-
const type = typeof val;
|
|
140
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
141
|
-
return `${val}`;
|
|
142
|
-
}
|
|
143
|
-
if (type == 'string') {
|
|
144
|
-
return `"${val}"`;
|
|
145
|
-
}
|
|
146
|
-
if (type == 'symbol') {
|
|
147
|
-
const description = val.description;
|
|
148
|
-
if (description == null) {
|
|
149
|
-
return 'Symbol';
|
|
150
|
-
} else {
|
|
151
|
-
return `Symbol(${description})`;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (type == 'function') {
|
|
155
|
-
const name = val.name;
|
|
156
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
157
|
-
return `Function(${name})`;
|
|
158
|
-
} else {
|
|
159
|
-
return 'Function';
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
// objects
|
|
163
|
-
if (Array.isArray(val)) {
|
|
164
|
-
const length = val.length;
|
|
165
|
-
let debug = '[';
|
|
166
|
-
if (length > 0) {
|
|
167
|
-
debug += debugString(val[0]);
|
|
168
|
-
}
|
|
169
|
-
for(let i = 1; i < length; i++) {
|
|
170
|
-
debug += ', ' + debugString(val[i]);
|
|
171
|
-
}
|
|
172
|
-
debug += ']';
|
|
173
|
-
return debug;
|
|
174
|
-
}
|
|
175
|
-
// Test for built-in
|
|
176
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
177
|
-
let className;
|
|
178
|
-
if (builtInMatches.length > 1) {
|
|
179
|
-
className = builtInMatches[1];
|
|
180
|
-
} else {
|
|
181
|
-
// Failed to match the standard '[object ClassName]'
|
|
182
|
-
return toString.call(val);
|
|
183
|
-
}
|
|
184
|
-
if (className == 'Object') {
|
|
185
|
-
// we're a user defined class or Object
|
|
186
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
187
|
-
// easier than looping through ownProperties of `val`.
|
|
188
|
-
try {
|
|
189
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
190
|
-
} catch (_) {
|
|
191
|
-
return 'Object';
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
// errors
|
|
195
|
-
if (val instanceof Error) {
|
|
196
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
197
|
-
}
|
|
198
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
199
|
-
return className;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* @param {any} js_config
|
|
203
|
-
* @returns {any}
|
|
204
|
-
*/
|
|
205
|
-
export function validate(js_config) {
|
|
206
|
-
try {
|
|
207
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
208
|
-
wasm.validate(retptr, addHeapObject(js_config));
|
|
209
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
210
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
211
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
212
|
-
if (r2) {
|
|
213
|
-
throw takeObject(r1);
|
|
214
|
-
}
|
|
215
|
-
return takeObject(r0);
|
|
216
|
-
} finally {
|
|
217
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function handleError(f, args) {
|
|
222
|
-
try {
|
|
223
|
-
return f.apply(this, args);
|
|
224
|
-
} catch (e) {
|
|
225
|
-
wasm.__wbindgen_export_3(addHeapObject(e));
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const WebInterfaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
230
|
-
? { register: () => {}, unregister: () => {} }
|
|
231
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_webinterface_free(ptr >>> 0));
|
|
232
|
-
/**
|
|
233
|
-
*/
|
|
234
|
-
export class WebInterface {
|
|
235
|
-
|
|
236
|
-
static __wrap(ptr) {
|
|
237
|
-
ptr = ptr >>> 0;
|
|
238
|
-
const obj = Object.create(WebInterface.prototype);
|
|
239
|
-
obj.__wbg_ptr = ptr;
|
|
240
|
-
WebInterfaceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
241
|
-
return obj;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
__destroy_into_raw() {
|
|
245
|
-
const ptr = this.__wbg_ptr;
|
|
246
|
-
this.__wbg_ptr = 0;
|
|
247
|
-
WebInterfaceFinalization.unregister(this);
|
|
248
|
-
return ptr;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
free() {
|
|
252
|
-
const ptr = this.__destroy_into_raw();
|
|
253
|
-
wasm.__wbg_webinterface_free(ptr);
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* @param {Function} post_message
|
|
257
|
-
* @param {any} js_config
|
|
258
|
-
* @param {any} js_info
|
|
259
|
-
* @param {any} js_assets
|
|
260
|
-
* @returns {WebInterface}
|
|
261
|
-
*/
|
|
262
|
-
static new(post_message, js_config, js_info, js_assets) {
|
|
263
|
-
try {
|
|
264
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
265
|
-
wasm.webinterface_new(retptr, addHeapObject(post_message), addHeapObject(js_config), addHeapObject(js_info), addHeapObject(js_assets));
|
|
266
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
267
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
268
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
269
|
-
if (r2) {
|
|
270
|
-
throw takeObject(r1);
|
|
271
|
-
}
|
|
272
|
-
return WebInterface.__wrap(r0);
|
|
273
|
-
} finally {
|
|
274
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* @param {any} js_config
|
|
279
|
-
*/
|
|
280
|
-
update_config(js_config) {
|
|
281
|
-
try {
|
|
282
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
283
|
-
wasm.webinterface_update_config(retptr, this.__wbg_ptr, addHeapObject(js_config));
|
|
284
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
285
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
286
|
-
if (r1) {
|
|
287
|
-
throw takeObject(r0);
|
|
288
|
-
}
|
|
289
|
-
} finally {
|
|
290
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* @param {any} js_info
|
|
295
|
-
*/
|
|
296
|
-
update_info(js_info) {
|
|
297
|
-
try {
|
|
298
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
299
|
-
wasm.webinterface_update_info(retptr, this.__wbg_ptr, addHeapObject(js_info));
|
|
300
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
301
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
302
|
-
if (r1) {
|
|
303
|
-
throw takeObject(r0);
|
|
304
|
-
}
|
|
305
|
-
} finally {
|
|
306
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* @param {any} js_assets
|
|
311
|
-
*/
|
|
312
|
-
update_assets(js_assets) {
|
|
313
|
-
try {
|
|
314
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
315
|
-
wasm.webinterface_update_assets(retptr, this.__wbg_ptr, addHeapObject(js_assets));
|
|
316
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
317
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
318
|
-
if (r1) {
|
|
319
|
-
throw takeObject(r0);
|
|
320
|
-
}
|
|
321
|
-
} finally {
|
|
322
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* @param {any} js_objective
|
|
327
|
-
* @returns {any}
|
|
328
|
-
*/
|
|
329
|
-
encode_evaluate(js_objective) {
|
|
330
|
-
try {
|
|
331
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
332
|
-
wasm.webinterface_encode_evaluate(retptr, this.__wbg_ptr, addHeapObject(js_objective));
|
|
333
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
334
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
335
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
336
|
-
if (r2) {
|
|
337
|
-
throw takeObject(r1);
|
|
338
|
-
}
|
|
339
|
-
return takeObject(r0);
|
|
340
|
-
} finally {
|
|
341
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
*/
|
|
346
|
-
optimize() {
|
|
347
|
-
try {
|
|
348
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
349
|
-
wasm.webinterface_optimize(retptr, this.__wbg_ptr);
|
|
350
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
351
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
352
|
-
if (r1) {
|
|
353
|
-
throw takeObject(r0);
|
|
354
|
-
}
|
|
355
|
-
} finally {
|
|
356
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
async function __wbg_load(module, imports) {
|
|
362
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
363
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
364
|
-
try {
|
|
365
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
366
|
-
|
|
367
|
-
} catch (e) {
|
|
368
|
-
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
369
|
-
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);
|
|
370
|
-
|
|
371
|
-
} else {
|
|
372
|
-
throw e;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
const bytes = await module.arrayBuffer();
|
|
378
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
379
|
-
|
|
380
|
-
} else {
|
|
381
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
382
|
-
|
|
383
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
384
|
-
return { instance, module };
|
|
385
|
-
|
|
386
|
-
} else {
|
|
387
|
-
return instance;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
function __wbg_get_imports() {
|
|
393
|
-
const imports = {};
|
|
394
|
-
imports.wbg = {};
|
|
395
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
396
|
-
takeObject(arg0);
|
|
397
|
-
};
|
|
398
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
399
|
-
const v = getObject(arg0);
|
|
400
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
401
|
-
return ret;
|
|
402
|
-
};
|
|
403
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
404
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
405
|
-
return ret;
|
|
406
|
-
};
|
|
407
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
408
|
-
const obj = getObject(arg1);
|
|
409
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
410
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
411
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
412
|
-
};
|
|
413
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
414
|
-
const obj = getObject(arg1);
|
|
415
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
416
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
417
|
-
var len1 = WASM_VECTOR_LEN;
|
|
418
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
419
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
420
|
-
};
|
|
421
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
422
|
-
const val = getObject(arg0);
|
|
423
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
424
|
-
return ret;
|
|
425
|
-
};
|
|
426
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
427
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
428
|
-
return ret;
|
|
429
|
-
};
|
|
430
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
431
|
-
const ret = arg0;
|
|
432
|
-
return addHeapObject(ret);
|
|
433
|
-
};
|
|
434
|
-
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
435
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
436
|
-
return ret;
|
|
437
|
-
};
|
|
438
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
439
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
440
|
-
return addHeapObject(ret);
|
|
441
|
-
};
|
|
442
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
443
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
444
|
-
return addHeapObject(ret);
|
|
445
|
-
};
|
|
446
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
447
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
448
|
-
return ret;
|
|
449
|
-
};
|
|
450
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
451
|
-
const ret = getObject(arg0) === undefined;
|
|
452
|
-
return ret;
|
|
453
|
-
};
|
|
454
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
455
|
-
const ret = arg0;
|
|
456
|
-
return addHeapObject(ret);
|
|
457
|
-
};
|
|
458
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
459
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
460
|
-
return addHeapObject(ret);
|
|
461
|
-
};
|
|
462
|
-
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
463
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
464
|
-
return ret;
|
|
465
|
-
};
|
|
466
|
-
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
467
|
-
const ret = +getObject(arg0);
|
|
468
|
-
return ret;
|
|
469
|
-
};
|
|
470
|
-
imports.wbg.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
|
|
471
|
-
const ret = String(getObject(arg1));
|
|
472
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
473
|
-
const len1 = WASM_VECTOR_LEN;
|
|
474
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
475
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
476
|
-
};
|
|
477
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
478
|
-
const ret = getObject(arg0);
|
|
479
|
-
return addHeapObject(ret);
|
|
480
|
-
};
|
|
481
|
-
imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
|
|
482
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
483
|
-
return addHeapObject(ret);
|
|
484
|
-
};
|
|
485
|
-
imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
|
|
486
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
487
|
-
};
|
|
488
|
-
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
489
|
-
const ret = new Error();
|
|
490
|
-
return addHeapObject(ret);
|
|
491
|
-
};
|
|
492
|
-
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
493
|
-
const ret = getObject(arg1).stack;
|
|
494
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
495
|
-
const len1 = WASM_VECTOR_LEN;
|
|
496
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
497
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
498
|
-
};
|
|
499
|
-
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
500
|
-
let deferred0_0;
|
|
501
|
-
let deferred0_1;
|
|
502
|
-
try {
|
|
503
|
-
deferred0_0 = arg0;
|
|
504
|
-
deferred0_1 = arg1;
|
|
505
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
506
|
-
} finally {
|
|
507
|
-
wasm.__wbindgen_export_2(deferred0_0, deferred0_1, 1);
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
imports.wbg.__wbg_performance_a1b8bde2ee512264 = function(arg0) {
|
|
511
|
-
const ret = getObject(arg0).performance;
|
|
512
|
-
return addHeapObject(ret);
|
|
513
|
-
};
|
|
514
|
-
imports.wbg.__wbg_now_abd80e969af37148 = function(arg0) {
|
|
515
|
-
const ret = getObject(arg0).now();
|
|
516
|
-
return ret;
|
|
517
|
-
};
|
|
518
|
-
imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
|
|
519
|
-
const ret = getObject(arg0).crypto;
|
|
520
|
-
return addHeapObject(ret);
|
|
521
|
-
};
|
|
522
|
-
imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {
|
|
523
|
-
const ret = getObject(arg0).process;
|
|
524
|
-
return addHeapObject(ret);
|
|
525
|
-
};
|
|
526
|
-
imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {
|
|
527
|
-
const ret = getObject(arg0).versions;
|
|
528
|
-
return addHeapObject(ret);
|
|
529
|
-
};
|
|
530
|
-
imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {
|
|
531
|
-
const ret = getObject(arg0).node;
|
|
532
|
-
return addHeapObject(ret);
|
|
533
|
-
};
|
|
534
|
-
imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {
|
|
535
|
-
const ret = module.require;
|
|
536
|
-
return addHeapObject(ret);
|
|
537
|
-
}, arguments) };
|
|
538
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
539
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
540
|
-
return ret;
|
|
541
|
-
};
|
|
542
|
-
imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
|
|
543
|
-
const ret = getObject(arg0).msCrypto;
|
|
544
|
-
return addHeapObject(ret);
|
|
545
|
-
};
|
|
546
|
-
imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {
|
|
547
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
548
|
-
}, arguments) };
|
|
549
|
-
imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {
|
|
550
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
551
|
-
}, arguments) };
|
|
552
|
-
imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
|
|
553
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
554
|
-
return addHeapObject(ret);
|
|
555
|
-
};
|
|
556
|
-
imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
|
|
557
|
-
const ret = getObject(arg0).length;
|
|
558
|
-
return ret;
|
|
559
|
-
};
|
|
560
|
-
imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
|
|
561
|
-
const ret = new Array();
|
|
562
|
-
return addHeapObject(ret);
|
|
563
|
-
};
|
|
564
|
-
imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
|
|
565
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
566
|
-
return addHeapObject(ret);
|
|
567
|
-
};
|
|
568
|
-
imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
|
|
569
|
-
const ret = getObject(arg0).next;
|
|
570
|
-
return addHeapObject(ret);
|
|
571
|
-
};
|
|
572
|
-
imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
|
|
573
|
-
const ret = getObject(arg0).next();
|
|
574
|
-
return addHeapObject(ret);
|
|
575
|
-
}, arguments) };
|
|
576
|
-
imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
|
|
577
|
-
const ret = getObject(arg0).done;
|
|
578
|
-
return ret;
|
|
579
|
-
};
|
|
580
|
-
imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
|
|
581
|
-
const ret = getObject(arg0).value;
|
|
582
|
-
return addHeapObject(ret);
|
|
583
|
-
};
|
|
584
|
-
imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
|
|
585
|
-
const ret = Symbol.iterator;
|
|
586
|
-
return addHeapObject(ret);
|
|
587
|
-
};
|
|
588
|
-
imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
|
|
589
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
590
|
-
return addHeapObject(ret);
|
|
591
|
-
}, arguments) };
|
|
592
|
-
imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
|
|
593
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
594
|
-
return addHeapObject(ret);
|
|
595
|
-
}, arguments) };
|
|
596
|
-
imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
|
|
597
|
-
const ret = new Object();
|
|
598
|
-
return addHeapObject(ret);
|
|
599
|
-
};
|
|
600
|
-
imports.wbg.__wbg_length_dee433d4c85c9387 = function(arg0) {
|
|
601
|
-
const ret = getObject(arg0).length;
|
|
602
|
-
return ret;
|
|
603
|
-
};
|
|
604
|
-
imports.wbg.__wbg_codePointAt_158806992b6482b1 = function(arg0, arg1) {
|
|
605
|
-
const ret = getObject(arg0).codePointAt(arg1 >>> 0);
|
|
606
|
-
return addHeapObject(ret);
|
|
607
|
-
};
|
|
608
|
-
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
609
|
-
const ret = self.self;
|
|
610
|
-
return addHeapObject(ret);
|
|
611
|
-
}, arguments) };
|
|
612
|
-
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
|
|
613
|
-
const ret = window.window;
|
|
614
|
-
return addHeapObject(ret);
|
|
615
|
-
}, arguments) };
|
|
616
|
-
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
|
|
617
|
-
const ret = globalThis.globalThis;
|
|
618
|
-
return addHeapObject(ret);
|
|
619
|
-
}, arguments) };
|
|
620
|
-
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
|
|
621
|
-
const ret = global.global;
|
|
622
|
-
return addHeapObject(ret);
|
|
623
|
-
}, arguments) };
|
|
624
|
-
imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
|
|
625
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
626
|
-
};
|
|
627
|
-
imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
|
|
628
|
-
const ret = Array.isArray(getObject(arg0));
|
|
629
|
-
return ret;
|
|
630
|
-
};
|
|
631
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
|
|
632
|
-
let result;
|
|
633
|
-
try {
|
|
634
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
635
|
-
} catch (_) {
|
|
636
|
-
result = false;
|
|
637
|
-
}
|
|
638
|
-
const ret = result;
|
|
639
|
-
return ret;
|
|
640
|
-
};
|
|
641
|
-
imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
642
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
643
|
-
return addHeapObject(ret);
|
|
644
|
-
}, arguments) };
|
|
645
|
-
imports.wbg.__wbg_instanceof_Map_87917e0a7aaf4012 = function(arg0) {
|
|
646
|
-
let result;
|
|
647
|
-
try {
|
|
648
|
-
result = getObject(arg0) instanceof Map;
|
|
649
|
-
} catch (_) {
|
|
650
|
-
result = false;
|
|
651
|
-
}
|
|
652
|
-
const ret = result;
|
|
653
|
-
return ret;
|
|
654
|
-
};
|
|
655
|
-
imports.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2 = function(arg0) {
|
|
656
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
657
|
-
return ret;
|
|
658
|
-
};
|
|
659
|
-
imports.wbg.__wbg_entries_95cc2c823b285a09 = function(arg0) {
|
|
660
|
-
const ret = Object.entries(getObject(arg0));
|
|
661
|
-
return addHeapObject(ret);
|
|
662
|
-
};
|
|
663
|
-
imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
|
|
664
|
-
const ret = getObject(arg0).buffer;
|
|
665
|
-
return addHeapObject(ret);
|
|
666
|
-
};
|
|
667
|
-
imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
|
|
668
|
-
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
669
|
-
return addHeapObject(ret);
|
|
670
|
-
};
|
|
671
|
-
imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
|
|
672
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
673
|
-
return addHeapObject(ret);
|
|
674
|
-
};
|
|
675
|
-
imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
|
|
676
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
677
|
-
};
|
|
678
|
-
imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
|
|
679
|
-
const ret = getObject(arg0).length;
|
|
680
|
-
return ret;
|
|
681
|
-
};
|
|
682
|
-
imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
|
|
683
|
-
let result;
|
|
684
|
-
try {
|
|
685
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
686
|
-
} catch (_) {
|
|
687
|
-
result = false;
|
|
688
|
-
}
|
|
689
|
-
const ret = result;
|
|
690
|
-
return ret;
|
|
691
|
-
};
|
|
692
|
-
imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
|
|
693
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
694
|
-
return addHeapObject(ret);
|
|
695
|
-
};
|
|
696
|
-
imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
|
|
697
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
698
|
-
return addHeapObject(ret);
|
|
699
|
-
};
|
|
700
|
-
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
701
|
-
const v = getObject(arg1);
|
|
702
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
703
|
-
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
704
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
705
|
-
};
|
|
706
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
707
|
-
const ret = debugString(getObject(arg1));
|
|
708
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
709
|
-
const len1 = WASM_VECTOR_LEN;
|
|
710
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
711
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
712
|
-
};
|
|
713
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
714
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
715
|
-
};
|
|
716
|
-
imports.wbg.__wbindgen_memory = function() {
|
|
717
|
-
const ret = wasm.memory;
|
|
718
|
-
return addHeapObject(ret);
|
|
719
|
-
};
|
|
720
|
-
|
|
721
|
-
return imports;
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
function __wbg_init_memory(imports, maybe_memory) {
|
|
725
|
-
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
function __wbg_finalize_init(instance, module) {
|
|
729
|
-
wasm = instance.exports;
|
|
730
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
731
|
-
cachedBigInt64Memory0 = null;
|
|
732
|
-
cachedFloat64Memory0 = null;
|
|
733
|
-
cachedInt32Memory0 = null;
|
|
734
|
-
cachedUint8Memory0 = null;
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
return wasm;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
function initSync(module) {
|
|
741
|
-
if (wasm !== undefined) return wasm;
|
|
742
|
-
|
|
743
|
-
const imports = __wbg_get_imports();
|
|
744
|
-
|
|
745
|
-
__wbg_init_memory(imports);
|
|
746
|
-
|
|
747
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
748
|
-
module = new WebAssembly.Module(module);
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
752
|
-
|
|
753
|
-
return __wbg_finalize_init(instance, module);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
async function __wbg_init(input) {
|
|
757
|
-
if (wasm !== undefined) return wasm;
|
|
758
|
-
|
|
759
|
-
if (typeof input === 'undefined') {
|
|
760
|
-
input = new URL('chai_bg.wasm', import.meta.url);
|
|
761
|
-
}
|
|
762
|
-
const imports = __wbg_get_imports();
|
|
763
|
-
|
|
764
|
-
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
765
|
-
input = fetch(input);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
__wbg_init_memory(imports);
|
|
769
|
-
|
|
770
|
-
const { instance, module } = await __wbg_load(await input, imports);
|
|
771
|
-
|
|
772
|
-
return __wbg_finalize_init(instance, module);
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
export { initSync }
|
|
776
|
-
export default __wbg_init;
|
|
1
|
+
import * as wasm from "./chai_bg.wasm";
|
|
2
|
+
export * from "./chai_bg.js";
|
|
3
|
+
import { __wbg_set_wasm } from "./chai_bg.js";
|
|
4
|
+
__wbg_set_wasm(wasm);
|