@iyulab/u-numflow 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,20 +9,18 @@
9
9
  * Throws `non_positive_data`, `value_not_finite` or `insufficient_data` when
10
10
  * data contains a value ≤ 0, a NaN or infinity, or fewer than 2 elements, and
11
11
  * `invalid_transform` when a result is not finite.
12
- * @param {Float64Array} data
12
+ * @param {number[] | Float64Array} data
13
13
  * @param {number} lambda
14
14
  * @returns {Float64Array}
15
15
  */
16
16
  function box_cox(data, lambda) {
17
- const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
18
- const len0 = WASM_VECTOR_LEN;
19
- const ret = wasm.box_cox(ptr0, len0, lambda);
17
+ const ret = wasm.box_cox(data, lambda);
20
18
  if (ret[3]) {
21
19
  throw takeFromExternrefTable0(ret[2]);
22
20
  }
23
- var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
21
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
24
22
  wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
25
- return v2;
23
+ return v1;
26
24
  }
27
25
  exports.box_cox = box_cox;
28
26
 
@@ -63,6 +61,91 @@ function chi_squared_quantile(p, k) {
63
61
  }
64
62
  exports.chi_squared_quantile = chi_squared_quantile;
65
63
 
64
+ /**
65
+ * `P(X ≤ x)` for the distribution `{ kind, ...parameters }`.
66
+ *
67
+ * # Errors
68
+ * As every `distribution` argument: `malformed_input` for a value that is
69
+ * not such an object, `unknown_option` for an unknown `kind` (with
70
+ * `expected`), `value_not_finite` for a NaN or infinite parameter,
71
+ * `parameter_out_of_range` for a parameter that must be `> 0`, and
72
+ * `invalid_option` for parameters out of order (`min < max`,
73
+ * `min ≤ mode ≤ max`). `x` NaN throws `value_not_finite`.
74
+ * @param {DistributionSpec} distribution
75
+ * @param {number} x
76
+ * @returns {number}
77
+ */
78
+ function distribution_cdf(distribution, x) {
79
+ const ret = wasm.distribution_cdf(distribution, x);
80
+ if (ret[2]) {
81
+ throw takeFromExternrefTable0(ret[1]);
82
+ }
83
+ return ret[0];
84
+ }
85
+ exports.distribution_cdf = distribution_cdf;
86
+
87
+ /**
88
+ * Mean and variance of `distribution` — also the way to check a
89
+ * specification before using it.
90
+ *
91
+ * # Errors
92
+ * As [`distribution_cdf`] for `distribution`.
93
+ * @param {DistributionSpec} distribution
94
+ * @returns {MomentsDto}
95
+ */
96
+ function distribution_moments(distribution) {
97
+ const ret = wasm.distribution_moments(distribution);
98
+ if (ret[2]) {
99
+ throw takeFromExternrefTable0(ret[1]);
100
+ }
101
+ return takeFromExternrefTable0(ret[0]);
102
+ }
103
+ exports.distribution_moments = distribution_moments;
104
+
105
+ /**
106
+ * The `x` with `P(X ≤ x) = p`.
107
+ *
108
+ * # Errors
109
+ * As [`distribution_cdf`] for `distribution`; `p` outside `(0, 1)` throws
110
+ * `parameter_out_of_range`.
111
+ * @param {DistributionSpec} distribution
112
+ * @param {number} p
113
+ * @returns {number}
114
+ */
115
+ function distribution_quantile(distribution, p) {
116
+ const ret = wasm.distribution_quantile(distribution, p);
117
+ if (ret[2]) {
118
+ throw takeFromExternrefTable0(ret[1]);
119
+ }
120
+ return ret[0];
121
+ }
122
+ exports.distribution_quantile = distribution_quantile;
123
+
124
+ /**
125
+ * `n` random variates, reproducible from `seed`: the same `(distribution, n,
126
+ * seed)` always returns the same values. Uniforms are drawn from the open
127
+ * interval (0, 1), so no variate is infinite.
128
+ *
129
+ * # Errors
130
+ * As [`distribution_cdf`] for `distribution`; `n` not a whole number in
131
+ * `[0, 2³² − 1]` or `seed` not a whole number in `[0, 2⁵³]` throws
132
+ * `parameter_out_of_range`.
133
+ * @param {DistributionSpec} distribution
134
+ * @param {number} n
135
+ * @param {number} seed
136
+ * @returns {Float64Array}
137
+ */
138
+ function distribution_sample(distribution, n, seed) {
139
+ const ret = wasm.distribution_sample(distribution, n, seed);
140
+ if (ret[3]) {
141
+ throw takeFromExternrefTable0(ret[2]);
142
+ }
143
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
144
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
145
+ return v1;
146
+ }
147
+ exports.distribution_sample = distribution_sample;
148
+
66
149
  /**
67
150
  * Estimate the optimal Box-Cox lambda via profile maximum likelihood.
68
151
  *
@@ -75,15 +158,13 @@ exports.chi_squared_quantile = chi_squared_quantile;
75
158
  * # Errors
76
159
  * Throws as [`box_cox`] does for the data, and `invalid_lambda_range` when the
77
160
  * range is not finite with `lambda_min < lambda_max`.
78
- * @param {Float64Array} data
161
+ * @param {number[] | Float64Array} data
79
162
  * @param {number} lambda_min
80
163
  * @param {number} lambda_max
81
164
  * @returns {LambdaEstimateDto}
82
165
  */
83
166
  function estimate_lambda(data, lambda_min, lambda_max) {
84
- const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
85
- const len0 = WASM_VECTOR_LEN;
86
- const ret = wasm.estimate_lambda(ptr0, len0, lambda_min, lambda_max);
167
+ const ret = wasm.estimate_lambda(data, lambda_min, lambda_max);
87
168
  if (ret[2]) {
88
169
  throw takeFromExternrefTable0(ret[1]);
89
170
  }
@@ -130,6 +211,101 @@ function f_distribution_quantile(p, df1, df2) {
130
211
  }
131
212
  exports.f_distribution_quantile = f_distribution_quantile;
132
213
 
214
+ /**
215
+ * Points in `a` but not in `b`, in normal form — e.g. a reporting window
216
+ * minus down-time is up-time.
217
+ *
218
+ * # Errors
219
+ * As [`interval_normalize`], naming `a` or `b`.
220
+ * @param {[number, number][]} a
221
+ * @param {[number, number][]} b
222
+ * @returns {[number, number][]}
223
+ */
224
+ function interval_difference(a, b) {
225
+ const ret = wasm.interval_difference(a, b);
226
+ if (ret[2]) {
227
+ throw takeFromExternrefTable0(ret[1]);
228
+ }
229
+ return takeFromExternrefTable0(ret[0]);
230
+ }
231
+ exports.interval_difference = interval_difference;
232
+
233
+ /**
234
+ * Points in both `a` and `b`, in normal form. Clipping to a window is
235
+ * `interval_intersection(a, [[from, to]])`.
236
+ *
237
+ * # Errors
238
+ * As [`interval_normalize`], naming `a` or `b`.
239
+ * @param {[number, number][]} a
240
+ * @param {[number, number][]} b
241
+ * @returns {[number, number][]}
242
+ */
243
+ function interval_intersection(a, b) {
244
+ const ret = wasm.interval_intersection(a, b);
245
+ if (ret[2]) {
246
+ throw takeFromExternrefTable0(ret[1]);
247
+ }
248
+ return takeFromExternrefTable0(ret[0]);
249
+ }
250
+ exports.interval_intersection = interval_intersection;
251
+
252
+ /**
253
+ * Total length of the union of `intervals`: each point counts once, however
254
+ * many rows cover it.
255
+ *
256
+ * # Errors
257
+ * As [`interval_normalize`].
258
+ * @param {[number, number][]} intervals
259
+ * @returns {number}
260
+ */
261
+ function interval_measure(intervals) {
262
+ const ret = wasm.interval_measure(intervals);
263
+ if (ret[2]) {
264
+ throw takeFromExternrefTable0(ret[1]);
265
+ }
266
+ return ret[0];
267
+ }
268
+ exports.interval_measure = interval_measure;
269
+
270
+ /**
271
+ * The union of `intervals` (each `[start, end]`, half-open) in normal form:
272
+ * sorted, disjoint, touching pieces merged, empty ones dropped.
273
+ *
274
+ * # Errors
275
+ * Throws `malformed_input` for a row that is not two numbers (`parameter` is
276
+ * the row's path, e.g. `intervals[2]`), `value_not_finite` for a NaN or
277
+ * ±Infinity bound, and `reversed_interval` (`parameter`, `index`) for a row
278
+ * with start > end — reversed rows are refused, not swapped.
279
+ * @param {[number, number][]} intervals
280
+ * @returns {[number, number][]}
281
+ */
282
+ function interval_normalize(intervals) {
283
+ const ret = wasm.interval_normalize(intervals);
284
+ if (ret[2]) {
285
+ throw takeFromExternrefTable0(ret[1]);
286
+ }
287
+ return takeFromExternrefTable0(ret[0]);
288
+ }
289
+ exports.interval_normalize = interval_normalize;
290
+
291
+ /**
292
+ * Points in `a` or `b`, in normal form.
293
+ *
294
+ * # Errors
295
+ * As [`interval_normalize`], naming `a` or `b`.
296
+ * @param {[number, number][]} a
297
+ * @param {[number, number][]} b
298
+ * @returns {[number, number][]}
299
+ */
300
+ function interval_union(a, b) {
301
+ const ret = wasm.interval_union(a, b);
302
+ if (ret[2]) {
303
+ throw takeFromExternrefTable0(ret[1]);
304
+ }
305
+ return takeFromExternrefTable0(ret[0]);
306
+ }
307
+ exports.interval_union = interval_union;
308
+
133
309
  /**
134
310
  * Standard normal quantile Φ⁻¹(p): the `z` with `P(Z ≤ z) = p`.
135
311
  *
@@ -150,15 +326,18 @@ exports.inverse_normal_cdf = inverse_normal_cdf;
150
326
  /**
151
327
  * Arithmetic mean of `data` using Kahan compensated summation.
152
328
  *
153
- * Returns `NaN` if `data` is empty or contains non-finite values.
154
- * @param {Float64Array} data
329
+ * # Errors
330
+ * Throws `empty_input` when `data` is empty, and as every `data` argument
331
+ * does for an element that is not a finite number.
332
+ * @param {number[] | Float64Array} data
155
333
  * @returns {number}
156
334
  */
157
335
  function mean(data) {
158
- const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
159
- const len0 = WASM_VECTOR_LEN;
160
- const ret = wasm.mean(ptr0, len0);
161
- return ret;
336
+ const ret = wasm.mean(data);
337
+ if (ret[2]) {
338
+ throw takeFromExternrefTable0(ret[1]);
339
+ }
340
+ return ret[0];
162
341
  }
163
342
  exports.mean = mean;
164
343
 
@@ -199,31 +378,38 @@ exports.normal_sf = normal_sf;
199
378
  * Returns the `n` complex bins interleaved as `[re0, im0, re1, im1, …]`
200
379
  * (length `2n`). Bins `k` and `n − k` are conjugates, so the spectrum of a
201
380
  * real signal is fully described by bins `0..=n/2`.
202
- * @param {Float64Array} data
381
+ *
382
+ * # Errors
383
+ * Throws as every `data` argument does for an element that is not a finite
384
+ * number.
385
+ * @param {number[] | Float64Array} data
203
386
  * @returns {Float64Array}
204
387
  */
205
388
  function rfft(data) {
206
- const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
207
- const len0 = WASM_VECTOR_LEN;
208
- const ret = wasm.rfft(ptr0, len0);
209
- var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
389
+ const ret = wasm.rfft(data);
390
+ if (ret[3]) {
391
+ throw takeFromExternrefTable0(ret[2]);
392
+ }
393
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
210
394
  wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
211
- return v2;
395
+ return v1;
212
396
  }
213
397
  exports.rfft = rfft;
214
398
 
215
399
  /**
216
400
  * Sample standard deviation of `data` (Bessel-corrected, denominator n−1).
217
401
  *
218
- * Returns `NaN` if `data` has fewer than 2 elements or contains non-finite values.
219
- * @param {Float64Array} data
402
+ * # Errors
403
+ * Throws `insufficient_data` below 2 values.
404
+ * @param {number[] | Float64Array} data
220
405
  * @returns {number}
221
406
  */
222
407
  function std_dev(data) {
223
- const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
224
- const len0 = WASM_VECTOR_LEN;
225
- const ret = wasm.std_dev(ptr0, len0);
226
- return ret;
408
+ const ret = wasm.std_dev(data);
409
+ if (ret[2]) {
410
+ throw takeFromExternrefTable0(ret[1]);
411
+ }
412
+ return ret[0];
227
413
  }
228
414
  exports.std_dev = std_dev;
229
415
 
@@ -268,20 +454,26 @@ exports.t_distribution_quantile = t_distribution_quantile;
268
454
  /**
269
455
  * Sample variance of `data` (Bessel-corrected, denominator n−1).
270
456
  *
271
- * Returns `NaN` if `data` has fewer than 2 elements or contains non-finite values.
272
- * @param {Float64Array} data
457
+ * # Errors
458
+ * Throws `insufficient_data` below 2 values.
459
+ * @param {number[] | Float64Array} data
273
460
  * @returns {number}
274
461
  */
275
462
  function variance(data) {
276
- const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
277
- const len0 = WASM_VECTOR_LEN;
278
- const ret = wasm.variance(ptr0, len0);
279
- return ret;
463
+ const ret = wasm.variance(data);
464
+ if (ret[2]) {
465
+ throw takeFromExternrefTable0(ret[1]);
466
+ }
467
+ return ret[0];
280
468
  }
281
469
  exports.variance = variance;
282
470
  function __wbg_get_imports() {
283
471
  const import0 = {
284
472
  __proto__: null,
473
+ __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
474
+ const ret = Error(getStringFromWasm0(arg0, arg1));
475
+ return ret;
476
+ },
285
477
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
286
478
  const ret = String(arg1);
287
479
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -289,9 +481,170 @@ function __wbg_get_imports() {
289
481
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
290
482
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
291
483
  },
484
+ __wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c: function(arg0, arg1) {
485
+ const v = arg1;
486
+ const ret = typeof(v) === 'bigint' ? v : undefined;
487
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
488
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
489
+ },
490
+ __wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
491
+ const v = arg0;
492
+ const ret = typeof(v) === 'boolean' ? v : undefined;
493
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
494
+ },
495
+ __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
496
+ const ret = debugString(arg1);
497
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
498
+ const len1 = WASM_VECTOR_LEN;
499
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
500
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
501
+ },
502
+ __wbg___wbindgen_in_92f62ee1427d9e49: function(arg0, arg1) {
503
+ const ret = arg0 in arg1;
504
+ return ret;
505
+ },
506
+ __wbg___wbindgen_is_bigint_b123553bed3bb382: function(arg0) {
507
+ const ret = typeof(arg0) === 'bigint';
508
+ return ret;
509
+ },
510
+ __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
511
+ const ret = typeof(arg0) === 'function';
512
+ return ret;
513
+ },
514
+ __wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
515
+ const ret = arg0 === null;
516
+ return ret;
517
+ },
518
+ __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
519
+ const val = arg0;
520
+ const ret = typeof(val) === 'object' && val !== null;
521
+ return ret;
522
+ },
523
+ __wbg___wbindgen_jsval_eq_02babf21faa37971: function(arg0, arg1) {
524
+ const ret = arg0 === arg1;
525
+ return ret;
526
+ },
527
+ __wbg___wbindgen_jsval_loose_eq_677f21e468d6b461: function(arg0, arg1) {
528
+ const ret = arg0 == arg1;
529
+ return ret;
530
+ },
531
+ __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
532
+ const obj = arg1;
533
+ const ret = typeof(obj) === 'number' ? obj : undefined;
534
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
535
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
536
+ },
537
+ __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
538
+ const obj = arg1;
539
+ const ret = typeof(obj) === 'string' ? obj : undefined;
540
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
541
+ var len1 = WASM_VECTOR_LEN;
542
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
543
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
544
+ },
292
545
  __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
293
546
  throw new Error(getStringFromWasm0(arg0, arg1));
294
547
  },
548
+ __wbg___wbindgen_typeof_e777a26e115d416b: function(arg0) {
549
+ const ret = typeof arg0;
550
+ return ret;
551
+ },
552
+ __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
553
+ const ret = arg0.call(arg1);
554
+ return ret;
555
+ }, arguments); },
556
+ __wbg_done_b41a1d26cdb37fb6: function(arg0) {
557
+ const ret = arg0.done;
558
+ return ret;
559
+ },
560
+ __wbg_entries_fb6397112b1de25f: function(arg0) {
561
+ const ret = Object.entries(arg0);
562
+ return ret;
563
+ },
564
+ __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
565
+ const ret = Reflect.get(arg0, arg1);
566
+ return ret;
567
+ }, arguments); },
568
+ __wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
569
+ const ret = Reflect.get(arg0, arg1);
570
+ return ret;
571
+ }, arguments); },
572
+ __wbg_get_6c896e0571ddae51: function(arg0, arg1) {
573
+ const ret = arg0[arg1 >>> 0];
574
+ return ret;
575
+ },
576
+ __wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
577
+ const ret = arg0[arg1 >>> 0];
578
+ return ret;
579
+ },
580
+ __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
581
+ let result;
582
+ try {
583
+ result = arg0 instanceof ArrayBuffer;
584
+ } catch (_) {
585
+ result = false;
586
+ }
587
+ const ret = result;
588
+ return ret;
589
+ },
590
+ __wbg_instanceof_Float64Array_8a59377f9eec1b8b: function(arg0) {
591
+ let result;
592
+ try {
593
+ result = arg0 instanceof Float64Array;
594
+ } catch (_) {
595
+ result = false;
596
+ }
597
+ const ret = result;
598
+ return ret;
599
+ },
600
+ __wbg_instanceof_Map_b2611749102d7ba3: function(arg0) {
601
+ let result;
602
+ try {
603
+ result = arg0 instanceof Map;
604
+ } catch (_) {
605
+ result = false;
606
+ }
607
+ const ret = result;
608
+ return ret;
609
+ },
610
+ __wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
611
+ let result;
612
+ try {
613
+ result = arg0 instanceof Uint8Array;
614
+ } catch (_) {
615
+ result = false;
616
+ }
617
+ const ret = result;
618
+ return ret;
619
+ },
620
+ __wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
621
+ const ret = Array.isArray(arg0);
622
+ return ret;
623
+ },
624
+ __wbg_isSafeInteger_717808ad6a54bd9e: function(arg0) {
625
+ const ret = Number.isSafeInteger(arg0);
626
+ return ret;
627
+ },
628
+ __wbg_iterator_e3c31c892080e444: function() {
629
+ const ret = Symbol.iterator;
630
+ return ret;
631
+ },
632
+ __wbg_length_7f3c00c40364105e: function(arg0) {
633
+ const ret = arg0.length;
634
+ return ret;
635
+ },
636
+ __wbg_length_b5f0008bbf60cf59: function(arg0) {
637
+ const ret = arg0.length;
638
+ return ret;
639
+ },
640
+ __wbg_length_d4bdea10311bd9cf: function(arg0) {
641
+ const ret = arg0.length;
642
+ return ret;
643
+ },
644
+ __wbg_new_1dbf7428bba60a42: function(arg0) {
645
+ const ret = new Uint8Array(arg0);
646
+ return ret;
647
+ },
295
648
  __wbg_new_343a093a3c2ffb4e: function(arg0, arg1) {
296
649
  const ret = new Error(getStringFromWasm0(arg0, arg1));
297
650
  return ret;
@@ -300,6 +653,32 @@ function __wbg_get_imports() {
300
653
  const ret = new Object();
301
654
  return ret;
302
655
  },
656
+ __wbg_new_ee2291f50781bf1d: function() {
657
+ const ret = new Array();
658
+ return ret;
659
+ },
660
+ __wbg_next_33784799010f1bbe: function(arg0) {
661
+ const ret = arg0.next;
662
+ return ret;
663
+ },
664
+ __wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
665
+ const ret = arg0.next();
666
+ return ret;
667
+ }, arguments); },
668
+ __wbg_of_20798cb14708764f: function(arg0, arg1) {
669
+ const ret = Array.of(arg0, arg1);
670
+ return ret;
671
+ },
672
+ __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
673
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
674
+ },
675
+ __wbg_prototypesetcall_d49a4fab5ca427bc: function(arg0, arg1, arg2) {
676
+ Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);
677
+ },
678
+ __wbg_push_2baf45db356cf468: function(arg0, arg1) {
679
+ const ret = arg0.push(arg1);
680
+ return ret;
681
+ },
303
682
  __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
304
683
  const ret = Reflect.set(arg0, arg1, arg2);
305
684
  return ret;
@@ -307,16 +686,30 @@ function __wbg_get_imports() {
307
686
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
308
687
  arg0[arg1] = arg2;
309
688
  },
689
+ __wbg_value_f3c585ee8f5ba40c: function(arg0) {
690
+ const ret = arg0.value;
691
+ return ret;
692
+ },
310
693
  __wbindgen_generic_0000000000000001: function(arg0) {
311
694
  // Cast intrinsic for `F64 -> Externref`.
312
695
  const ret = arg0;
313
696
  return ret;
314
697
  },
315
- __wbindgen_generic_0000000000000002: function(arg0, arg1) {
698
+ __wbindgen_generic_0000000000000002: function(arg0) {
699
+ // Cast intrinsic for `I64 -> Externref`.
700
+ const ret = arg0;
701
+ return ret;
702
+ },
703
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
316
704
  // Cast intrinsic for `Ref(String) -> Externref`.
317
705
  const ret = getStringFromWasm0(arg0, arg1);
318
706
  return ret;
319
707
  },
708
+ __wbindgen_generic_0000000000000004: function(arg0) {
709
+ // Cast intrinsic for `U64 -> Externref`.
710
+ const ret = BigInt.asUintN(64, arg0);
711
+ return ret;
712
+ },
320
713
  __wbindgen_init_externref_table: function() {
321
714
  const table = wasm.__wbindgen_externrefs;
322
715
  const offset = table.grow(4);
@@ -339,11 +732,81 @@ function addToExternrefTable0(obj) {
339
732
  return idx;
340
733
  }
341
734
 
735
+ function debugString(val) {
736
+ // primitive types
737
+ const type = typeof val;
738
+ if (type == 'number' || type == 'boolean' || val == null) {
739
+ return `${val}`;
740
+ }
741
+ if (type == 'string') {
742
+ return `"${val}"`;
743
+ }
744
+ if (type == 'symbol') {
745
+ const description = val.description;
746
+ if (description == null) {
747
+ return 'Symbol';
748
+ } else {
749
+ return `Symbol(${description})`;
750
+ }
751
+ }
752
+ if (type == 'function') {
753
+ const name = val.name;
754
+ if (typeof name == 'string' && name.length > 0) {
755
+ return `Function(${name})`;
756
+ } else {
757
+ return 'Function';
758
+ }
759
+ }
760
+ // objects
761
+ if (Array.isArray(val)) {
762
+ const length = val.length;
763
+ let debug = '[';
764
+ if (length > 0) {
765
+ debug += debugString(val[0]);
766
+ }
767
+ for(let i = 1; i < length; i++) {
768
+ debug += ', ' + debugString(val[i]);
769
+ }
770
+ debug += ']';
771
+ return debug;
772
+ }
773
+ // Test for built-in
774
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
775
+ let className;
776
+ if (builtInMatches && builtInMatches.length > 1) {
777
+ className = builtInMatches[1];
778
+ } else {
779
+ // Failed to match the standard '[object ClassName]'
780
+ return toString.call(val);
781
+ }
782
+ if (className == 'Object') {
783
+ // we're a user defined class or Object
784
+ // JSON.stringify avoids problems with cycles, and is generally much
785
+ // easier than looping through ownProperties of `val`.
786
+ try {
787
+ return 'Object(' + JSON.stringify(val) + ')';
788
+ } catch (_) {
789
+ return 'Object';
790
+ }
791
+ }
792
+ // errors
793
+ if (val instanceof Error) {
794
+ return `${val.name}: ${val.message}\n${val.stack}`;
795
+ }
796
+ // TODO we could test for more things here, like `Set`s and `Map`s.
797
+ return className;
798
+ }
799
+
342
800
  function getArrayF64FromWasm0(ptr, len) {
343
801
  ptr = ptr >>> 0;
344
802
  return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
345
803
  }
346
804
 
805
+ function getArrayU8FromWasm0(ptr, len) {
806
+ ptr = ptr >>> 0;
807
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
808
+ }
809
+
347
810
  let cachedDataViewMemory0 = null;
348
811
  function getDataViewMemory0() {
349
812
  if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
@@ -381,11 +844,8 @@ function handleError(f, args) {
381
844
  }
382
845
  }
383
846
 
384
- function passArrayF64ToWasm0(arg, malloc) {
385
- const ptr = malloc(arg.length * 8, 8) >>> 0;
386
- getFloat64ArrayMemory0().set(arg, ptr / 8);
387
- WASM_VECTOR_LEN = arg.length;
388
- return ptr;
847
+ function isLikeNone(x) {
848
+ return x === undefined || x === null;
389
849
  }
390
850
 
391
851
  function passStringToWasm0(arg, malloc, realloc) {