@devup-ui/wasm 1.0.58 → 1.0.59

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/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "react",
18
18
  "wasm"
19
19
  ],
20
- "version": "1.0.58",
20
+ "version": "1.0.59",
21
21
  "scripts": {
22
22
  "build": "wasm-pack build --target nodejs --out-dir ./pkg --out-name index && node script.js",
23
23
  "test": "wasm-pack test --node"
package/pkg/index.d.ts CHANGED
@@ -2,20 +2,20 @@
2
2
  /* eslint-disable */
3
3
 
4
4
  export class Output {
5
- private constructor();
6
- free(): void;
7
- [Symbol.dispose](): void;
8
- readonly updatedBaseStyle: boolean;
9
- /**
10
- * Get the css
11
- */
12
- readonly css: string | undefined;
13
- readonly map: string | undefined;
14
- /**
15
- * Get the code
16
- */
17
- readonly code: string;
18
- readonly cssFile: string | undefined;
5
+ private constructor();
6
+ free(): void;
7
+ [Symbol.dispose](): void;
8
+ /**
9
+ * Get the code
10
+ */
11
+ readonly code: string;
12
+ /**
13
+ * Get the css
14
+ */
15
+ readonly css: string | undefined;
16
+ readonly cssFile: string | undefined;
17
+ readonly map: string | undefined;
18
+ readonly updatedBaseStyle: boolean;
19
19
  }
20
20
 
21
21
  export function codeExtract(filename: string, code: string, _package: string, css_dir: string, single_css: boolean, import_main_css_in_code: boolean, import_main_css_in_css: boolean, import_aliases: any): Output;
package/pkg/index.js CHANGED
@@ -1,184 +1,4 @@
1
-
2
- let imports = {};
3
- imports['__wbindgen_placeholder__'] = module.exports;
4
-
5
- function addToExternrefTable0(obj) {
6
- const idx = wasm.__externref_table_alloc();
7
- wasm.__wbindgen_externrefs.set(idx, obj);
8
- return idx;
9
- }
10
-
11
- function debugString(val) {
12
- // primitive types
13
- const type = typeof val;
14
- if (type == 'number' || type == 'boolean' || val == null) {
15
- return `${val}`;
16
- }
17
- if (type == 'string') {
18
- return `"${val}"`;
19
- }
20
- if (type == 'symbol') {
21
- const description = val.description;
22
- if (description == null) {
23
- return 'Symbol';
24
- } else {
25
- return `Symbol(${description})`;
26
- }
27
- }
28
- if (type == 'function') {
29
- const name = val.name;
30
- if (typeof name == 'string' && name.length > 0) {
31
- return `Function(${name})`;
32
- } else {
33
- return 'Function';
34
- }
35
- }
36
- // objects
37
- if (Array.isArray(val)) {
38
- const length = val.length;
39
- let debug = '[';
40
- if (length > 0) {
41
- debug += debugString(val[0]);
42
- }
43
- for(let i = 1; i < length; i++) {
44
- debug += ', ' + debugString(val[i]);
45
- }
46
- debug += ']';
47
- return debug;
48
- }
49
- // Test for built-in
50
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
51
- let className;
52
- if (builtInMatches && builtInMatches.length > 1) {
53
- className = builtInMatches[1];
54
- } else {
55
- // Failed to match the standard '[object ClassName]'
56
- return toString.call(val);
57
- }
58
- if (className == 'Object') {
59
- // we're a user defined class or Object
60
- // JSON.stringify avoids problems with cycles, and is generally much
61
- // easier than looping through ownProperties of `val`.
62
- try {
63
- return 'Object(' + JSON.stringify(val) + ')';
64
- } catch (_) {
65
- return 'Object';
66
- }
67
- }
68
- // errors
69
- if (val instanceof Error) {
70
- return `${val.name}: ${val.message}\n${val.stack}`;
71
- }
72
- // TODO we could test for more things here, like `Set`s and `Map`s.
73
- return className;
74
- }
75
-
76
- function getArrayU8FromWasm0(ptr, len) {
77
- ptr = ptr >>> 0;
78
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
79
- }
80
-
81
- let cachedDataViewMemory0 = null;
82
- function getDataViewMemory0() {
83
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
84
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
85
- }
86
- return cachedDataViewMemory0;
87
- }
88
-
89
- function getStringFromWasm0(ptr, len) {
90
- ptr = ptr >>> 0;
91
- return decodeText(ptr, len);
92
- }
93
-
94
- let cachedUint8ArrayMemory0 = null;
95
- function getUint8ArrayMemory0() {
96
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
97
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
98
- }
99
- return cachedUint8ArrayMemory0;
100
- }
101
-
102
- function handleError(f, args) {
103
- try {
104
- return f.apply(this, args);
105
- } catch (e) {
106
- const idx = addToExternrefTable0(e);
107
- wasm.__wbindgen_exn_store(idx);
108
- }
109
- }
110
-
111
- function isLikeNone(x) {
112
- return x === undefined || x === null;
113
- }
114
-
115
- function passStringToWasm0(arg, malloc, realloc) {
116
- if (realloc === undefined) {
117
- const buf = cachedTextEncoder.encode(arg);
118
- const ptr = malloc(buf.length, 1) >>> 0;
119
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
120
- WASM_VECTOR_LEN = buf.length;
121
- return ptr;
122
- }
123
-
124
- let len = arg.length;
125
- let ptr = malloc(len, 1) >>> 0;
126
-
127
- const mem = getUint8ArrayMemory0();
128
-
129
- let offset = 0;
130
-
131
- for (; offset < len; offset++) {
132
- const code = arg.charCodeAt(offset);
133
- if (code > 0x7F) break;
134
- mem[ptr + offset] = code;
135
- }
136
- if (offset !== len) {
137
- if (offset !== 0) {
138
- arg = arg.slice(offset);
139
- }
140
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
141
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
142
- const ret = cachedTextEncoder.encodeInto(arg, view);
143
-
144
- offset += ret.written;
145
- ptr = realloc(ptr, len, offset, 1) >>> 0;
146
- }
147
-
148
- WASM_VECTOR_LEN = offset;
149
- return ptr;
150
- }
151
-
152
- function takeFromExternrefTable0(idx) {
153
- const value = wasm.__wbindgen_externrefs.get(idx);
154
- wasm.__externref_table_dealloc(idx);
155
- return value;
156
- }
157
-
158
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
159
- cachedTextDecoder.decode();
160
- function decodeText(ptr, len) {
161
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
162
- }
163
-
164
- const cachedTextEncoder = new TextEncoder();
165
-
166
- if (!('encodeInto' in cachedTextEncoder)) {
167
- cachedTextEncoder.encodeInto = function (arg, view) {
168
- const buf = cachedTextEncoder.encode(arg);
169
- view.set(buf);
170
- return {
171
- read: arg.length,
172
- written: buf.length
173
- };
174
- }
175
- }
176
-
177
- let WASM_VECTOR_LEN = 0;
178
-
179
- const OutputFinalization = (typeof FinalizationRegistry === 'undefined')
180
- ? { register: () => {}, unregister: () => {} }
181
- : new FinalizationRegistry(ptr => wasm.__wbg_output_free(ptr >>> 0, 1));
1
+ /* @ts-self-types="./index.d.ts" */
182
2
 
183
3
  class Output {
184
4
  static __wrap(ptr) {
@@ -199,11 +19,20 @@ class Output {
199
19
  wasm.__wbg_output_free(ptr, 0);
200
20
  }
201
21
  /**
202
- * @returns {boolean}
22
+ * Get the code
23
+ * @returns {string}
203
24
  */
204
- get updatedBaseStyle() {
205
- const ret = wasm.output_updatedBaseStyle(this.__wbg_ptr);
206
- return ret !== 0;
25
+ get code() {
26
+ let deferred1_0;
27
+ let deferred1_1;
28
+ try {
29
+ const ret = wasm.output_code(this.__wbg_ptr);
30
+ deferred1_0 = ret[0];
31
+ deferred1_1 = ret[1];
32
+ return getStringFromWasm0(ret[0], ret[1]);
33
+ } finally {
34
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
35
+ }
207
36
  }
208
37
  /**
209
38
  * Get the css
@@ -221,8 +50,8 @@ class Output {
221
50
  /**
222
51
  * @returns {string | undefined}
223
52
  */
224
- get map() {
225
- const ret = wasm.output_map(this.__wbg_ptr);
53
+ get cssFile() {
54
+ const ret = wasm.output_cssFile(this.__wbg_ptr);
226
55
  let v1;
227
56
  if (ret[0] !== 0) {
228
57
  v1 = getStringFromWasm0(ret[0], ret[1]).slice();
@@ -230,27 +59,11 @@ class Output {
230
59
  }
231
60
  return v1;
232
61
  }
233
- /**
234
- * Get the code
235
- * @returns {string}
236
- */
237
- get code() {
238
- let deferred1_0;
239
- let deferred1_1;
240
- try {
241
- const ret = wasm.output_code(this.__wbg_ptr);
242
- deferred1_0 = ret[0];
243
- deferred1_1 = ret[1];
244
- return getStringFromWasm0(ret[0], ret[1]);
245
- } finally {
246
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
247
- }
248
- }
249
62
  /**
250
63
  * @returns {string | undefined}
251
64
  */
252
- get cssFile() {
253
- const ret = wasm.output_cssFile(this.__wbg_ptr);
65
+ get map() {
66
+ const ret = wasm.output_map(this.__wbg_ptr);
254
67
  let v1;
255
68
  if (ret[0] !== 0) {
256
69
  v1 = getStringFromWasm0(ret[0], ret[1]).slice();
@@ -258,6 +71,13 @@ class Output {
258
71
  }
259
72
  return v1;
260
73
  }
74
+ /**
75
+ * @returns {boolean}
76
+ */
77
+ get updatedBaseStyle() {
78
+ const ret = wasm.output_updatedBaseStyle(this.__wbg_ptr);
79
+ return ret !== 0;
80
+ }
261
81
  }
262
82
  if (Symbol.dispose) Output.prototype[Symbol.dispose] = Output.prototype.free;
263
83
  exports.Output = Output;
@@ -573,279 +393,420 @@ function setPrefix(prefix) {
573
393
  }
574
394
  exports.setPrefix = setPrefix;
575
395
 
576
- exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
577
- const ret = Error(getStringFromWasm0(arg0, arg1));
578
- return ret;
579
- };
396
+ function __wbg_get_imports() {
397
+ const import0 = {
398
+ __proto__: null,
399
+ __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
400
+ const ret = Error(getStringFromWasm0(arg0, arg1));
401
+ return ret;
402
+ },
403
+ __wbg_Number_04624de7d0e8332d: function(arg0) {
404
+ const ret = Number(arg0);
405
+ return ret;
406
+ },
407
+ __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
408
+ const ret = String(arg1);
409
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
410
+ const len1 = WASM_VECTOR_LEN;
411
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
412
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
413
+ },
414
+ __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(arg0, arg1) {
415
+ const v = arg1;
416
+ const ret = typeof(v) === 'bigint' ? v : undefined;
417
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
418
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
419
+ },
420
+ __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
421
+ const v = arg0;
422
+ const ret = typeof(v) === 'boolean' ? v : undefined;
423
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
424
+ },
425
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
426
+ const ret = debugString(arg1);
427
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
428
+ const len1 = WASM_VECTOR_LEN;
429
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
430
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
431
+ },
432
+ __wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
433
+ const ret = arg0 in arg1;
434
+ return ret;
435
+ },
436
+ __wbg___wbindgen_is_bigint_31b12575b56f32fc: function(arg0) {
437
+ const ret = typeof(arg0) === 'bigint';
438
+ return ret;
439
+ },
440
+ __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
441
+ const ret = typeof(arg0) === 'function';
442
+ return ret;
443
+ },
444
+ __wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
445
+ const val = arg0;
446
+ const ret = typeof(val) === 'object' && val !== null;
447
+ return ret;
448
+ },
449
+ __wbg___wbindgen_is_string_cd444516edc5b180: function(arg0) {
450
+ const ret = typeof(arg0) === 'string';
451
+ return ret;
452
+ },
453
+ __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
454
+ const ret = arg0 === undefined;
455
+ return ret;
456
+ },
457
+ __wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
458
+ const ret = arg0 === arg1;
459
+ return ret;
460
+ },
461
+ __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
462
+ const ret = arg0 == arg1;
463
+ return ret;
464
+ },
465
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
466
+ const obj = arg1;
467
+ const ret = typeof(obj) === 'number' ? obj : undefined;
468
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
469
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
470
+ },
471
+ __wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
472
+ const obj = arg1;
473
+ const ret = typeof(obj) === 'string' ? obj : undefined;
474
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
475
+ var len1 = WASM_VECTOR_LEN;
476
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
477
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
478
+ },
479
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
480
+ throw new Error(getStringFromWasm0(arg0, arg1));
481
+ },
482
+ __wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
483
+ const ret = arg0.call(arg1);
484
+ return ret;
485
+ }, arguments); },
486
+ __wbg_done_57b39ecd9addfe81: function(arg0) {
487
+ const ret = arg0.done;
488
+ return ret;
489
+ },
490
+ __wbg_entries_58c7934c745daac7: function(arg0) {
491
+ const ret = Object.entries(arg0);
492
+ return ret;
493
+ },
494
+ __wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
495
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
496
+ }, arguments); },
497
+ __wbg_getTime_1e3cd1391c5c3995: function(arg0) {
498
+ const ret = arg0.getTime();
499
+ return ret;
500
+ },
501
+ __wbg_getTimezoneOffset_81776d10a4ec18a8: function(arg0) {
502
+ const ret = arg0.getTimezoneOffset();
503
+ return ret;
504
+ },
505
+ __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
506
+ const ret = arg0[arg1 >>> 0];
507
+ return ret;
508
+ },
509
+ __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
510
+ const ret = Reflect.get(arg0, arg1);
511
+ return ret;
512
+ }, arguments); },
513
+ __wbg_get_with_ref_key_1dc361bd10053bfe: function(arg0, arg1) {
514
+ const ret = arg0[arg1];
515
+ return ret;
516
+ },
517
+ __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
518
+ let result;
519
+ try {
520
+ result = arg0 instanceof ArrayBuffer;
521
+ } catch (_) {
522
+ result = false;
523
+ }
524
+ const ret = result;
525
+ return ret;
526
+ },
527
+ __wbg_instanceof_Map_53af74335dec57f4: function(arg0) {
528
+ let result;
529
+ try {
530
+ result = arg0 instanceof Map;
531
+ } catch (_) {
532
+ result = false;
533
+ }
534
+ const ret = result;
535
+ return ret;
536
+ },
537
+ __wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
538
+ let result;
539
+ try {
540
+ result = arg0 instanceof Uint8Array;
541
+ } catch (_) {
542
+ result = false;
543
+ }
544
+ const ret = result;
545
+ return ret;
546
+ },
547
+ __wbg_isArray_d314bb98fcf08331: function(arg0) {
548
+ const ret = Array.isArray(arg0);
549
+ return ret;
550
+ },
551
+ __wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
552
+ const ret = Number.isSafeInteger(arg0);
553
+ return ret;
554
+ },
555
+ __wbg_iterator_6ff6560ca1568e55: function() {
556
+ const ret = Symbol.iterator;
557
+ return ret;
558
+ },
559
+ __wbg_length_32ed9a279acd054c: function(arg0) {
560
+ const ret = arg0.length;
561
+ return ret;
562
+ },
563
+ __wbg_length_35a7bace40f36eac: function(arg0) {
564
+ const ret = arg0.length;
565
+ return ret;
566
+ },
567
+ __wbg_new_0_73afc35eb544e539: function() {
568
+ const ret = new Date();
569
+ return ret;
570
+ },
571
+ __wbg_new_245cd5c49157e602: function(arg0) {
572
+ const ret = new Date(arg0);
573
+ return ret;
574
+ },
575
+ __wbg_new_dd2b680c8bf6ae29: function(arg0) {
576
+ const ret = new Uint8Array(arg0);
577
+ return ret;
578
+ },
579
+ __wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
580
+ const ret = arg0.next();
581
+ return ret;
582
+ }, arguments); },
583
+ __wbg_next_418f80d8f5303233: function(arg0) {
584
+ const ret = arg0.next;
585
+ return ret;
586
+ },
587
+ __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
588
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
589
+ },
590
+ __wbg_value_0546255b415e96c1: function(arg0) {
591
+ const ret = arg0.value;
592
+ return ret;
593
+ },
594
+ __wbindgen_cast_0000000000000001: function(arg0) {
595
+ // Cast intrinsic for `F64 -> Externref`.
596
+ const ret = arg0;
597
+ return ret;
598
+ },
599
+ __wbindgen_cast_0000000000000002: function(arg0) {
600
+ // Cast intrinsic for `I64 -> Externref`.
601
+ const ret = arg0;
602
+ return ret;
603
+ },
604
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
605
+ // Cast intrinsic for `Ref(String) -> Externref`.
606
+ const ret = getStringFromWasm0(arg0, arg1);
607
+ return ret;
608
+ },
609
+ __wbindgen_cast_0000000000000004: function(arg0) {
610
+ // Cast intrinsic for `U64 -> Externref`.
611
+ const ret = BigInt.asUintN(64, arg0);
612
+ return ret;
613
+ },
614
+ __wbindgen_init_externref_table: function() {
615
+ const table = wasm.__wbindgen_externrefs;
616
+ const offset = table.grow(4);
617
+ table.set(0, undefined);
618
+ table.set(offset + 0, undefined);
619
+ table.set(offset + 1, null);
620
+ table.set(offset + 2, true);
621
+ table.set(offset + 3, false);
622
+ },
623
+ };
624
+ return {
625
+ __proto__: null,
626
+ "./index_bg.js": import0,
627
+ };
628
+ }
580
629
 
581
- exports.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
582
- const ret = Number(arg0);
583
- return ret;
584
- };
630
+ const OutputFinalization = (typeof FinalizationRegistry === 'undefined')
631
+ ? { register: () => {}, unregister: () => {} }
632
+ : new FinalizationRegistry(ptr => wasm.__wbg_output_free(ptr >>> 0, 1));
585
633
 
586
- exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
587
- const ret = String(arg1);
588
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
589
- const len1 = WASM_VECTOR_LEN;
590
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
591
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
592
- };
593
-
594
- exports.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
595
- const v = arg1;
596
- const ret = typeof(v) === 'bigint' ? v : undefined;
597
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
598
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
599
- };
600
-
601
- exports.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
602
- const v = arg0;
603
- const ret = typeof(v) === 'boolean' ? v : undefined;
604
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
605
- };
606
-
607
- exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
608
- const ret = debugString(arg1);
609
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
610
- const len1 = WASM_VECTOR_LEN;
611
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
612
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
613
- };
614
-
615
- exports.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
616
- const ret = arg0 in arg1;
617
- return ret;
618
- };
619
-
620
- exports.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
621
- const ret = typeof(arg0) === 'bigint';
622
- return ret;
623
- };
624
-
625
- exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
626
- const ret = typeof(arg0) === 'function';
627
- return ret;
628
- };
629
-
630
- exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
631
- const val = arg0;
632
- const ret = typeof(val) === 'object' && val !== null;
633
- return ret;
634
- };
635
-
636
- exports.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
637
- const ret = typeof(arg0) === 'string';
638
- return ret;
639
- };
640
-
641
- exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
642
- const ret = arg0 === undefined;
643
- return ret;
644
- };
645
-
646
- exports.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
647
- const ret = arg0 === arg1;
648
- return ret;
649
- };
650
-
651
- exports.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
652
- const ret = arg0 == arg1;
653
- return ret;
654
- };
655
-
656
- exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
657
- const obj = arg1;
658
- const ret = typeof(obj) === 'number' ? obj : undefined;
659
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
660
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
661
- };
662
-
663
- exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
664
- const obj = arg1;
665
- const ret = typeof(obj) === 'string' ? obj : undefined;
666
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
667
- var len1 = WASM_VECTOR_LEN;
668
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
669
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
670
- };
671
-
672
- exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
673
- throw new Error(getStringFromWasm0(arg0, arg1));
674
- };
675
-
676
- exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
677
- const ret = arg0.call(arg1);
678
- return ret;
679
- }, arguments) };
680
-
681
- exports.__wbg_done_62ea16af4ce34b24 = function(arg0) {
682
- const ret = arg0.done;
683
- return ret;
684
- };
685
-
686
- exports.__wbg_entries_83c79938054e065f = function(arg0) {
687
- const ret = Object.entries(arg0);
688
- return ret;
689
- };
690
-
691
- exports.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
692
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
693
- }, arguments) };
694
-
695
- exports.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
696
- const ret = arg0.getTime();
697
- return ret;
698
- };
699
-
700
- exports.__wbg_getTimezoneOffset_45389e26d6f46823 = function(arg0) {
701
- const ret = arg0.getTimezoneOffset();
702
- return ret;
703
- };
704
-
705
- exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
706
- const ret = arg0[arg1 >>> 0];
707
- return ret;
708
- };
709
-
710
- exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
711
- const ret = Reflect.get(arg0, arg1);
712
- return ret;
713
- }, arguments) };
714
-
715
- exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
716
- const ret = arg0[arg1];
717
- return ret;
718
- };
719
-
720
- exports.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
721
- let result;
722
- try {
723
- result = arg0 instanceof ArrayBuffer;
724
- } catch (_) {
725
- result = false;
634
+ function addToExternrefTable0(obj) {
635
+ const idx = wasm.__externref_table_alloc();
636
+ wasm.__wbindgen_externrefs.set(idx, obj);
637
+ return idx;
638
+ }
639
+
640
+ function debugString(val) {
641
+ // primitive types
642
+ const type = typeof val;
643
+ if (type == 'number' || type == 'boolean' || val == null) {
644
+ return `${val}`;
645
+ }
646
+ if (type == 'string') {
647
+ return `"${val}"`;
726
648
  }
727
- const ret = result;
728
- return ret;
729
- };
649
+ if (type == 'symbol') {
650
+ const description = val.description;
651
+ if (description == null) {
652
+ return 'Symbol';
653
+ } else {
654
+ return `Symbol(${description})`;
655
+ }
656
+ }
657
+ if (type == 'function') {
658
+ const name = val.name;
659
+ if (typeof name == 'string' && name.length > 0) {
660
+ return `Function(${name})`;
661
+ } else {
662
+ return 'Function';
663
+ }
664
+ }
665
+ // objects
666
+ if (Array.isArray(val)) {
667
+ const length = val.length;
668
+ let debug = '[';
669
+ if (length > 0) {
670
+ debug += debugString(val[0]);
671
+ }
672
+ for(let i = 1; i < length; i++) {
673
+ debug += ', ' + debugString(val[i]);
674
+ }
675
+ debug += ']';
676
+ return debug;
677
+ }
678
+ // Test for built-in
679
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
680
+ let className;
681
+ if (builtInMatches && builtInMatches.length > 1) {
682
+ className = builtInMatches[1];
683
+ } else {
684
+ // Failed to match the standard '[object ClassName]'
685
+ return toString.call(val);
686
+ }
687
+ if (className == 'Object') {
688
+ // we're a user defined class or Object
689
+ // JSON.stringify avoids problems with cycles, and is generally much
690
+ // easier than looping through ownProperties of `val`.
691
+ try {
692
+ return 'Object(' + JSON.stringify(val) + ')';
693
+ } catch (_) {
694
+ return 'Object';
695
+ }
696
+ }
697
+ // errors
698
+ if (val instanceof Error) {
699
+ return `${val.name}: ${val.message}\n${val.stack}`;
700
+ }
701
+ // TODO we could test for more things here, like `Set`s and `Map`s.
702
+ return className;
703
+ }
730
704
 
731
- exports.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
732
- let result;
733
- try {
734
- result = arg0 instanceof Map;
735
- } catch (_) {
736
- result = false;
705
+ function getArrayU8FromWasm0(ptr, len) {
706
+ ptr = ptr >>> 0;
707
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
708
+ }
709
+
710
+ let cachedDataViewMemory0 = null;
711
+ function getDataViewMemory0() {
712
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
713
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
737
714
  }
738
- const ret = result;
739
- return ret;
740
- };
715
+ return cachedDataViewMemory0;
716
+ }
717
+
718
+ function getStringFromWasm0(ptr, len) {
719
+ ptr = ptr >>> 0;
720
+ return decodeText(ptr, len);
721
+ }
722
+
723
+ let cachedUint8ArrayMemory0 = null;
724
+ function getUint8ArrayMemory0() {
725
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
726
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
727
+ }
728
+ return cachedUint8ArrayMemory0;
729
+ }
741
730
 
742
- exports.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
743
- let result;
731
+ function handleError(f, args) {
744
732
  try {
745
- result = arg0 instanceof Uint8Array;
746
- } catch (_) {
747
- result = false;
748
- }
749
- const ret = result;
750
- return ret;
751
- };
752
-
753
- exports.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
754
- const ret = Array.isArray(arg0);
755
- return ret;
756
- };
757
-
758
- exports.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
759
- const ret = Number.isSafeInteger(arg0);
760
- return ret;
761
- };
762
-
763
- exports.__wbg_iterator_27b7c8b35ab3e86b = function() {
764
- const ret = Symbol.iterator;
765
- return ret;
766
- };
767
-
768
- exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
769
- const ret = arg0.length;
770
- return ret;
771
- };
772
-
773
- exports.__wbg_length_d45040a40c570362 = function(arg0) {
774
- const ret = arg0.length;
775
- return ret;
776
- };
777
-
778
- exports.__wbg_new_0_23cedd11d9b40c9d = function() {
779
- const ret = new Date();
780
- return ret;
781
- };
782
-
783
- exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
784
- const ret = new Uint8Array(arg0);
785
- return ret;
786
- };
787
-
788
- exports.__wbg_new_b2db8aa2650f793a = function(arg0) {
789
- const ret = new Date(arg0);
790
- return ret;
791
- };
792
-
793
- exports.__wbg_next_138a17bbf04e926c = function(arg0) {
794
- const ret = arg0.next;
795
- return ret;
796
- };
797
-
798
- exports.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
799
- const ret = arg0.next();
800
- return ret;
801
- }, arguments) };
802
-
803
- exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
804
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
805
- };
806
-
807
- exports.__wbg_value_57b7b035e117f7ee = function(arg0) {
808
- const ret = arg0.value;
809
- return ret;
810
- };
811
-
812
- exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
813
- // Cast intrinsic for `Ref(String) -> Externref`.
814
- const ret = getStringFromWasm0(arg0, arg1);
815
- return ret;
816
- };
817
-
818
- exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
819
- // Cast intrinsic for `U64 -> Externref`.
820
- const ret = BigInt.asUintN(64, arg0);
821
- return ret;
822
- };
823
-
824
- exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
825
- // Cast intrinsic for `I64 -> Externref`.
826
- const ret = arg0;
827
- return ret;
828
- };
829
-
830
- exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
831
- // Cast intrinsic for `F64 -> Externref`.
832
- const ret = arg0;
833
- return ret;
834
- };
835
-
836
- exports.__wbindgen_init_externref_table = function() {
837
- const table = wasm.__wbindgen_externrefs;
838
- const offset = table.grow(4);
839
- table.set(0, undefined);
840
- table.set(offset + 0, undefined);
841
- table.set(offset + 1, null);
842
- table.set(offset + 2, true);
843
- table.set(offset + 3, false);
844
- };
733
+ return f.apply(this, args);
734
+ } catch (e) {
735
+ const idx = addToExternrefTable0(e);
736
+ wasm.__wbindgen_exn_store(idx);
737
+ }
738
+ }
739
+
740
+ function isLikeNone(x) {
741
+ return x === undefined || x === null;
742
+ }
743
+
744
+ function passStringToWasm0(arg, malloc, realloc) {
745
+ if (realloc === undefined) {
746
+ const buf = cachedTextEncoder.encode(arg);
747
+ const ptr = malloc(buf.length, 1) >>> 0;
748
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
749
+ WASM_VECTOR_LEN = buf.length;
750
+ return ptr;
751
+ }
752
+
753
+ let len = arg.length;
754
+ let ptr = malloc(len, 1) >>> 0;
755
+
756
+ const mem = getUint8ArrayMemory0();
757
+
758
+ let offset = 0;
759
+
760
+ for (; offset < len; offset++) {
761
+ const code = arg.charCodeAt(offset);
762
+ if (code > 0x7F) break;
763
+ mem[ptr + offset] = code;
764
+ }
765
+ if (offset !== len) {
766
+ if (offset !== 0) {
767
+ arg = arg.slice(offset);
768
+ }
769
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
770
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
771
+ const ret = cachedTextEncoder.encodeInto(arg, view);
772
+
773
+ offset += ret.written;
774
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
775
+ }
776
+
777
+ WASM_VECTOR_LEN = offset;
778
+ return ptr;
779
+ }
780
+
781
+ function takeFromExternrefTable0(idx) {
782
+ const value = wasm.__wbindgen_externrefs.get(idx);
783
+ wasm.__externref_table_dealloc(idx);
784
+ return value;
785
+ }
786
+
787
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
788
+ cachedTextDecoder.decode();
789
+ function decodeText(ptr, len) {
790
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
791
+ }
792
+
793
+ const cachedTextEncoder = new TextEncoder();
794
+
795
+ if (!('encodeInto' in cachedTextEncoder)) {
796
+ cachedTextEncoder.encodeInto = function (arg, view) {
797
+ const buf = cachedTextEncoder.encode(arg);
798
+ view.set(buf);
799
+ return {
800
+ read: arg.length,
801
+ written: buf.length
802
+ };
803
+ };
804
+ }
805
+
806
+ let WASM_VECTOR_LEN = 0;
845
807
 
846
808
  const wasmPath = `${__dirname}/index_bg.wasm`;
847
809
  const wasmBytes = require('fs').readFileSync(wasmPath);
848
810
  const wasmModule = new WebAssembly.Module(wasmBytes);
849
- const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
850
-
811
+ const wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
851
812
  wasm.__wbindgen_start();
package/pkg/index_bg.wasm CHANGED
Binary file