alpathfinder 0.2.4 → 0.2.7
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/alpathfinder.d.ts +6 -2
- package/alpathfinder.js +5 -1
- package/alpathfinder_bg.js +293 -339
- package/alpathfinder_bg.wasm +0 -0
- package/package.json +1 -1
package/alpathfinder.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
export function getPath(map_from_name: string, x_from: number, y_from: number, map_to_name: string, x_to: number, y_to: number, speed?: number | null): any;
|
|
3
|
+
|
|
5
4
|
export function canWalkPath(map_name: string, x1: number, y1: number, x2: number, y2: number): boolean;
|
|
5
|
+
|
|
6
|
+
export function getPath(map_from_name: string, x_from: number, y_from: number, map_to_name: string, x_to: number, y_to: number, speed?: number | null): any;
|
|
7
|
+
|
|
6
8
|
export function isWalkable(map_name: string, x_i: number, y_i: number): boolean;
|
|
9
|
+
|
|
10
|
+
export function prepare(g_js: any, exclude_maps?: any | null): void;
|
package/alpathfinder.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/* @ts-self-types="./alpathfinder.d.ts" */
|
|
2
|
+
|
|
1
3
|
import * as wasm from "./alpathfinder_bg.wasm";
|
|
2
|
-
export * from "./alpathfinder_bg.js";
|
|
3
4
|
import { __wbg_set_wasm } from "./alpathfinder_bg.js";
|
|
4
5
|
__wbg_set_wasm(wasm);
|
|
5
6
|
wasm.__wbindgen_start();
|
|
7
|
+
export {
|
|
8
|
+
canWalkPath, getPath, isWalkable, prepare
|
|
9
|
+
} from "./alpathfinder_bg.js";
|
package/alpathfinder_bg.js
CHANGED
|
@@ -1,195 +1,16 @@
|
|
|
1
|
-
let wasm;
|
|
2
|
-
export function __wbg_set_wasm(val) {
|
|
3
|
-
wasm = val;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let cachedUint8ArrayMemory0 = null;
|
|
8
|
-
|
|
9
|
-
function getUint8ArrayMemory0() {
|
|
10
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
11
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
12
|
-
}
|
|
13
|
-
return cachedUint8ArrayMemory0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
17
|
-
|
|
18
|
-
cachedTextDecoder.decode();
|
|
19
|
-
|
|
20
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
21
|
-
let numBytesDecoded = 0;
|
|
22
|
-
function decodeText(ptr, len) {
|
|
23
|
-
numBytesDecoded += len;
|
|
24
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
25
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
26
|
-
cachedTextDecoder.decode();
|
|
27
|
-
numBytesDecoded = len;
|
|
28
|
-
}
|
|
29
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function getStringFromWasm0(ptr, len) {
|
|
33
|
-
ptr = ptr >>> 0;
|
|
34
|
-
return decodeText(ptr, len);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function isLikeNone(x) {
|
|
38
|
-
return x === undefined || x === null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
let cachedDataViewMemory0 = null;
|
|
42
|
-
|
|
43
|
-
function getDataViewMemory0() {
|
|
44
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
45
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
46
|
-
}
|
|
47
|
-
return cachedDataViewMemory0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function debugString(val) {
|
|
51
|
-
// primitive types
|
|
52
|
-
const type = typeof val;
|
|
53
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
54
|
-
return `${val}`;
|
|
55
|
-
}
|
|
56
|
-
if (type == 'string') {
|
|
57
|
-
return `"${val}"`;
|
|
58
|
-
}
|
|
59
|
-
if (type == 'symbol') {
|
|
60
|
-
const description = val.description;
|
|
61
|
-
if (description == null) {
|
|
62
|
-
return 'Symbol';
|
|
63
|
-
} else {
|
|
64
|
-
return `Symbol(${description})`;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (type == 'function') {
|
|
68
|
-
const name = val.name;
|
|
69
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
70
|
-
return `Function(${name})`;
|
|
71
|
-
} else {
|
|
72
|
-
return 'Function';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
// objects
|
|
76
|
-
if (Array.isArray(val)) {
|
|
77
|
-
const length = val.length;
|
|
78
|
-
let debug = '[';
|
|
79
|
-
if (length > 0) {
|
|
80
|
-
debug += debugString(val[0]);
|
|
81
|
-
}
|
|
82
|
-
for(let i = 1; i < length; i++) {
|
|
83
|
-
debug += ', ' + debugString(val[i]);
|
|
84
|
-
}
|
|
85
|
-
debug += ']';
|
|
86
|
-
return debug;
|
|
87
|
-
}
|
|
88
|
-
// Test for built-in
|
|
89
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
90
|
-
let className;
|
|
91
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
92
|
-
className = builtInMatches[1];
|
|
93
|
-
} else {
|
|
94
|
-
// Failed to match the standard '[object ClassName]'
|
|
95
|
-
return toString.call(val);
|
|
96
|
-
}
|
|
97
|
-
if (className == 'Object') {
|
|
98
|
-
// we're a user defined class or Object
|
|
99
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
100
|
-
// easier than looping through ownProperties of `val`.
|
|
101
|
-
try {
|
|
102
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
103
|
-
} catch (_) {
|
|
104
|
-
return 'Object';
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// errors
|
|
108
|
-
if (val instanceof Error) {
|
|
109
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
110
|
-
}
|
|
111
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
112
|
-
return className;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
let WASM_VECTOR_LEN = 0;
|
|
116
|
-
|
|
117
|
-
const cachedTextEncoder = new TextEncoder();
|
|
118
|
-
|
|
119
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
120
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
121
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
122
|
-
view.set(buf);
|
|
123
|
-
return {
|
|
124
|
-
read: arg.length,
|
|
125
|
-
written: buf.length
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
131
|
-
|
|
132
|
-
if (realloc === undefined) {
|
|
133
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
134
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
135
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
136
|
-
WASM_VECTOR_LEN = buf.length;
|
|
137
|
-
return ptr;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
let len = arg.length;
|
|
141
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
142
|
-
|
|
143
|
-
const mem = getUint8ArrayMemory0();
|
|
144
|
-
|
|
145
|
-
let offset = 0;
|
|
146
|
-
|
|
147
|
-
for (; offset < len; offset++) {
|
|
148
|
-
const code = arg.charCodeAt(offset);
|
|
149
|
-
if (code > 0x7F) break;
|
|
150
|
-
mem[ptr + offset] = code;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (offset !== len) {
|
|
154
|
-
if (offset !== 0) {
|
|
155
|
-
arg = arg.slice(offset);
|
|
156
|
-
}
|
|
157
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
158
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
159
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
160
|
-
|
|
161
|
-
offset += ret.written;
|
|
162
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
WASM_VECTOR_LEN = offset;
|
|
166
|
-
return ptr;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function addToExternrefTable0(obj) {
|
|
170
|
-
const idx = wasm.__externref_table_alloc();
|
|
171
|
-
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
172
|
-
return idx;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function handleError(f, args) {
|
|
176
|
-
try {
|
|
177
|
-
return f.apply(this, args);
|
|
178
|
-
} catch (e) {
|
|
179
|
-
const idx = addToExternrefTable0(e);
|
|
180
|
-
wasm.__wbindgen_exn_store(idx);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
185
|
-
ptr = ptr >>> 0;
|
|
186
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
187
|
-
}
|
|
188
1
|
/**
|
|
189
|
-
* @param {
|
|
2
|
+
* @param {string} map_name
|
|
3
|
+
* @param {number} x1
|
|
4
|
+
* @param {number} y1
|
|
5
|
+
* @param {number} x2
|
|
6
|
+
* @param {number} y2
|
|
7
|
+
* @returns {boolean}
|
|
190
8
|
*/
|
|
191
|
-
export function
|
|
192
|
-
wasm.
|
|
9
|
+
export function canWalkPath(map_name, x1, y1, x2, y2) {
|
|
10
|
+
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11
|
+
const len0 = WASM_VECTOR_LEN;
|
|
12
|
+
const ret = wasm.canWalkPath(ptr0, len0, x1, y1, x2, y2);
|
|
13
|
+
return ret !== 0;
|
|
193
14
|
}
|
|
194
15
|
|
|
195
16
|
/**
|
|
@@ -211,21 +32,6 @@ export function getPath(map_from_name, x_from, y_from, map_to_name, x_to, y_to,
|
|
|
211
32
|
return ret;
|
|
212
33
|
}
|
|
213
34
|
|
|
214
|
-
/**
|
|
215
|
-
* @param {string} map_name
|
|
216
|
-
* @param {number} x1
|
|
217
|
-
* @param {number} y1
|
|
218
|
-
* @param {number} x2
|
|
219
|
-
* @param {number} y2
|
|
220
|
-
* @returns {boolean}
|
|
221
|
-
*/
|
|
222
|
-
export function canWalkPath(map_name, x1, y1, x2, y2) {
|
|
223
|
-
const ptr0 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
224
|
-
const len0 = WASM_VECTOR_LEN;
|
|
225
|
-
const ret = wasm.canWalkPath(ptr0, len0, x1, y1, x2, y2);
|
|
226
|
-
return ret !== 0;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
35
|
/**
|
|
230
36
|
* @param {string} map_name
|
|
231
37
|
* @param {number} x_i
|
|
@@ -239,124 +45,110 @@ export function isWalkable(map_name, x_i, y_i) {
|
|
|
239
45
|
return ret !== 0;
|
|
240
46
|
}
|
|
241
47
|
|
|
242
|
-
|
|
48
|
+
/**
|
|
49
|
+
* @param {any} g_js
|
|
50
|
+
* @param {any | null} [exclude_maps]
|
|
51
|
+
*/
|
|
52
|
+
export function prepare(g_js, exclude_maps) {
|
|
53
|
+
wasm.prepare(g_js, isLikeNone(exclude_maps) ? 0 : addToExternrefTable0(exclude_maps));
|
|
54
|
+
}
|
|
55
|
+
export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
|
|
243
56
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
244
57
|
return ret;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export function __wbg_Number_bb48ca12f395cd08(arg0) {
|
|
58
|
+
}
|
|
59
|
+
export function __wbg_Number_04624de7d0e8332d(arg0) {
|
|
248
60
|
const ret = Number(arg0);
|
|
249
61
|
return ret;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export function __wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd(arg0, arg1) {
|
|
62
|
+
}
|
|
63
|
+
export function __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2(arg0, arg1) {
|
|
253
64
|
const v = arg1;
|
|
254
65
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
255
66
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
256
67
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export function __wbg___wbindgen_boolean_get_6d5a1ee65bab5f68(arg0) {
|
|
68
|
+
}
|
|
69
|
+
export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
|
|
260
70
|
const v = arg0;
|
|
261
71
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
262
72
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0, arg1) {
|
|
73
|
+
}
|
|
74
|
+
export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
|
|
266
75
|
const ret = debugString(arg1);
|
|
267
76
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
268
77
|
const len1 = WASM_VECTOR_LEN;
|
|
269
78
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
270
79
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
|
|
80
|
+
}
|
|
81
|
+
export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
|
|
274
82
|
const ret = arg0 in arg1;
|
|
275
83
|
return ret;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export function __wbg___wbindgen_is_bigint_cb320707dcd35f0b(arg0) {
|
|
84
|
+
}
|
|
85
|
+
export function __wbg___wbindgen_is_bigint_31b12575b56f32fc(arg0) {
|
|
279
86
|
const ret = typeof(arg0) === 'bigint';
|
|
280
87
|
return ret;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
|
|
88
|
+
}
|
|
89
|
+
export function __wbg___wbindgen_is_function_0095a73b8b156f76(arg0) {
|
|
284
90
|
const ret = typeof(arg0) === 'function';
|
|
285
91
|
return ret;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
|
|
92
|
+
}
|
|
93
|
+
export function __wbg___wbindgen_is_object_5ae8e5880f2c1fbd(arg0) {
|
|
289
94
|
const val = arg0;
|
|
290
95
|
const ret = typeof(val) === 'object' && val !== null;
|
|
291
96
|
return ret;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export function __wbg___wbindgen_is_undefined_2d472862bd29a478(arg0) {
|
|
97
|
+
}
|
|
98
|
+
export function __wbg___wbindgen_is_undefined_9e4d92534c42d778(arg0) {
|
|
295
99
|
const ret = arg0 === undefined;
|
|
296
100
|
return ret;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
export function __wbg___wbindgen_jsval_eq_6b13ab83478b1c50(arg0, arg1) {
|
|
101
|
+
}
|
|
102
|
+
export function __wbg___wbindgen_jsval_eq_11888390b0186270(arg0, arg1) {
|
|
300
103
|
const ret = arg0 === arg1;
|
|
301
104
|
return ret;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
export function __wbg___wbindgen_jsval_loose_eq_b664b38a2f582147(arg0, arg1) {
|
|
105
|
+
}
|
|
106
|
+
export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
|
|
305
107
|
const ret = arg0 == arg1;
|
|
306
108
|
return ret;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export function __wbg___wbindgen_number_get_a20bf9b85341449d(arg0, arg1) {
|
|
109
|
+
}
|
|
110
|
+
export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
|
|
310
111
|
const obj = arg1;
|
|
311
112
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
312
113
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
313
114
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
|
|
115
|
+
}
|
|
116
|
+
export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
|
|
317
117
|
const obj = arg1;
|
|
318
118
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
319
119
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
120
|
var len1 = WASM_VECTOR_LEN;
|
|
321
121
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
322
122
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
|
|
123
|
+
}
|
|
124
|
+
export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
|
|
326
125
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
|
|
126
|
+
}
|
|
127
|
+
export function __wbg_call_389efe28435a9388() { return handleError(function (arg0, arg1) {
|
|
330
128
|
const ret = arg0.call(arg1);
|
|
331
129
|
return ret;
|
|
332
|
-
}, arguments) }
|
|
333
|
-
|
|
334
|
-
export function __wbg_done_2042aa2670fb1db1(arg0) {
|
|
130
|
+
}, arguments); }
|
|
131
|
+
export function __wbg_done_57b39ecd9addfe81(arg0) {
|
|
335
132
|
const ret = arg0.done;
|
|
336
133
|
return ret;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
export function __wbg_entries_e171b586f8f6bdbf(arg0) {
|
|
134
|
+
}
|
|
135
|
+
export function __wbg_entries_58c7934c745daac7(arg0) {
|
|
340
136
|
const ret = Object.entries(arg0);
|
|
341
137
|
return ret;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
138
|
+
}
|
|
139
|
+
export function __wbg_get_9b94d73e6221f75c(arg0, arg1) {
|
|
345
140
|
const ret = arg0[arg1 >>> 0];
|
|
346
141
|
return ret;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export function __wbg_get_efcb449f58ec27c2() { return handleError(function (arg0, arg1) {
|
|
142
|
+
}
|
|
143
|
+
export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
|
|
350
144
|
const ret = Reflect.get(arg0, arg1);
|
|
351
145
|
return ret;
|
|
352
|
-
}, arguments) }
|
|
353
|
-
|
|
146
|
+
}, arguments); }
|
|
354
147
|
export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
355
148
|
const ret = arg0[arg1];
|
|
356
149
|
return ret;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
|
|
150
|
+
}
|
|
151
|
+
export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
|
|
360
152
|
let result;
|
|
361
153
|
try {
|
|
362
154
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -365,9 +157,8 @@ export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
|
|
|
365
157
|
}
|
|
366
158
|
const ret = result;
|
|
367
159
|
return ret;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export function __wbg_instanceof_Map_8579b5e2ab5437c7(arg0) {
|
|
160
|
+
}
|
|
161
|
+
export function __wbg_instanceof_Map_53af74335dec57f4(arg0) {
|
|
371
162
|
let result;
|
|
372
163
|
try {
|
|
373
164
|
result = arg0 instanceof Map;
|
|
@@ -376,9 +167,8 @@ export function __wbg_instanceof_Map_8579b5e2ab5437c7(arg0) {
|
|
|
376
167
|
}
|
|
377
168
|
const ret = result;
|
|
378
169
|
return ret;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
|
|
170
|
+
}
|
|
171
|
+
export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
|
|
382
172
|
let result;
|
|
383
173
|
try {
|
|
384
174
|
result = arg0 instanceof Uint8Array;
|
|
@@ -387,99 +177,80 @@ export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
|
|
|
387
177
|
}
|
|
388
178
|
const ret = result;
|
|
389
179
|
return ret;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export function __wbg_isArray_96e0af9891d0945d(arg0) {
|
|
180
|
+
}
|
|
181
|
+
export function __wbg_isArray_d314bb98fcf08331(arg0) {
|
|
393
182
|
const ret = Array.isArray(arg0);
|
|
394
183
|
return ret;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
|
|
184
|
+
}
|
|
185
|
+
export function __wbg_isSafeInteger_bfbc7332a9768d2a(arg0) {
|
|
398
186
|
const ret = Number.isSafeInteger(arg0);
|
|
399
187
|
return ret;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
export function __wbg_iterator_e5822695327a3c39() {
|
|
188
|
+
}
|
|
189
|
+
export function __wbg_iterator_6ff6560ca1568e55() {
|
|
403
190
|
const ret = Symbol.iterator;
|
|
404
191
|
return ret;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
export function __wbg_length_69bca3cb64fc8748(arg0) {
|
|
192
|
+
}
|
|
193
|
+
export function __wbg_length_32ed9a279acd054c(arg0) {
|
|
408
194
|
const ret = arg0.length;
|
|
409
195
|
return ret;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
196
|
+
}
|
|
197
|
+
export function __wbg_length_35a7bace40f36eac(arg0) {
|
|
413
198
|
const ret = arg0.length;
|
|
414
199
|
return ret;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
export function __wbg_new_1acc0b6eea89d040() {
|
|
200
|
+
}
|
|
201
|
+
export function __wbg_new_361308b2356cecd0() {
|
|
418
202
|
const ret = new Object();
|
|
419
203
|
return ret;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export function __wbg_new_5a79be3ab53b8aa5(arg0) {
|
|
423
|
-
const ret = new Uint8Array(arg0);
|
|
424
|
-
return ret;
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
export function __wbg_new_e17d9f43105b08be() {
|
|
204
|
+
}
|
|
205
|
+
export function __wbg_new_3eb36ae241fe6f44() {
|
|
428
206
|
const ret = new Array();
|
|
429
207
|
return ret;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
|
|
208
|
+
}
|
|
209
|
+
export function __wbg_new_dd2b680c8bf6ae29(arg0) {
|
|
210
|
+
const ret = new Uint8Array(arg0);
|
|
211
|
+
return ret;
|
|
212
|
+
}
|
|
213
|
+
export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
|
|
433
214
|
const ret = arg0.next();
|
|
434
215
|
return ret;
|
|
435
|
-
}, arguments) }
|
|
436
|
-
|
|
437
|
-
export function __wbg_next_2c826fe5dfec6b6a(arg0) {
|
|
216
|
+
}, arguments); }
|
|
217
|
+
export function __wbg_next_418f80d8f5303233(arg0) {
|
|
438
218
|
const ret = arg0.next;
|
|
439
219
|
return ret;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
|
|
220
|
+
}
|
|
221
|
+
export function __wbg_prototypesetcall_bdcdcc5842e4d77d(arg0, arg1, arg2) {
|
|
443
222
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
444
|
-
}
|
|
445
|
-
|
|
223
|
+
}
|
|
446
224
|
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
447
225
|
arg0[arg1] = arg2;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
|
|
226
|
+
}
|
|
227
|
+
export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) {
|
|
451
228
|
arg0[arg1 >>> 0] = arg2;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export function __wbg_value_692627309814bb8c(arg0) {
|
|
229
|
+
}
|
|
230
|
+
export function __wbg_value_0546255b415e96c1(arg0) {
|
|
455
231
|
const ret = arg0.value;
|
|
456
232
|
return ret;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
233
|
+
}
|
|
234
|
+
export function __wbindgen_cast_0000000000000001(arg0) {
|
|
235
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
236
|
+
const ret = arg0;
|
|
237
|
+
return ret;
|
|
238
|
+
}
|
|
239
|
+
export function __wbindgen_cast_0000000000000002(arg0) {
|
|
240
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
241
|
+
const ret = arg0;
|
|
242
|
+
return ret;
|
|
243
|
+
}
|
|
244
|
+
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
460
245
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
461
246
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
462
247
|
return ret;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
|
|
248
|
+
}
|
|
249
|
+
export function __wbindgen_cast_0000000000000004(arg0) {
|
|
466
250
|
// Cast intrinsic for `U64 -> Externref`.
|
|
467
251
|
const ret = BigInt.asUintN(64, arg0);
|
|
468
252
|
return ret;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
export function __wbindgen_cast_9ae0607507abb057(arg0) {
|
|
472
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
473
|
-
const ret = arg0;
|
|
474
|
-
return ret;
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
|
|
478
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
479
|
-
const ret = arg0;
|
|
480
|
-
return ret;
|
|
481
|
-
};
|
|
482
|
-
|
|
253
|
+
}
|
|
483
254
|
export function __wbindgen_init_externref_table() {
|
|
484
255
|
const table = wasm.__wbindgen_externrefs;
|
|
485
256
|
const offset = table.grow(4);
|
|
@@ -488,6 +259,189 @@ export function __wbindgen_init_externref_table() {
|
|
|
488
259
|
table.set(offset + 1, null);
|
|
489
260
|
table.set(offset + 2, true);
|
|
490
261
|
table.set(offset + 3, false);
|
|
491
|
-
|
|
492
|
-
|
|
262
|
+
}
|
|
263
|
+
export function __wbindgen_object_is_undefined(arg0) {
|
|
264
|
+
const ret = arg0 === undefined;
|
|
265
|
+
return ret;
|
|
266
|
+
}
|
|
267
|
+
function addToExternrefTable0(obj) {
|
|
268
|
+
const idx = wasm.__externref_table_alloc();
|
|
269
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
270
|
+
return idx;
|
|
271
|
+
}
|
|
493
272
|
|
|
273
|
+
function debugString(val) {
|
|
274
|
+
// primitive types
|
|
275
|
+
const type = typeof val;
|
|
276
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
277
|
+
return `${val}`;
|
|
278
|
+
}
|
|
279
|
+
if (type == 'string') {
|
|
280
|
+
return `"${val}"`;
|
|
281
|
+
}
|
|
282
|
+
if (type == 'symbol') {
|
|
283
|
+
const description = val.description;
|
|
284
|
+
if (description == null) {
|
|
285
|
+
return 'Symbol';
|
|
286
|
+
} else {
|
|
287
|
+
return `Symbol(${description})`;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (type == 'function') {
|
|
291
|
+
const name = val.name;
|
|
292
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
293
|
+
return `Function(${name})`;
|
|
294
|
+
} else {
|
|
295
|
+
return 'Function';
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// objects
|
|
299
|
+
if (Array.isArray(val)) {
|
|
300
|
+
const length = val.length;
|
|
301
|
+
let debug = '[';
|
|
302
|
+
if (length > 0) {
|
|
303
|
+
debug += debugString(val[0]);
|
|
304
|
+
}
|
|
305
|
+
for(let i = 1; i < length; i++) {
|
|
306
|
+
debug += ', ' + debugString(val[i]);
|
|
307
|
+
}
|
|
308
|
+
debug += ']';
|
|
309
|
+
return debug;
|
|
310
|
+
}
|
|
311
|
+
// Test for built-in
|
|
312
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
313
|
+
let className;
|
|
314
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
315
|
+
className = builtInMatches[1];
|
|
316
|
+
} else {
|
|
317
|
+
// Failed to match the standard '[object ClassName]'
|
|
318
|
+
return toString.call(val);
|
|
319
|
+
}
|
|
320
|
+
if (className == 'Object') {
|
|
321
|
+
// we're a user defined class or Object
|
|
322
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
323
|
+
// easier than looping through ownProperties of `val`.
|
|
324
|
+
try {
|
|
325
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
326
|
+
} catch (_) {
|
|
327
|
+
return 'Object';
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// errors
|
|
331
|
+
if (val instanceof Error) {
|
|
332
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
333
|
+
}
|
|
334
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
335
|
+
return className;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
339
|
+
ptr = ptr >>> 0;
|
|
340
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
let cachedDataViewMemory0 = null;
|
|
344
|
+
function getDataViewMemory0() {
|
|
345
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
346
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
347
|
+
}
|
|
348
|
+
return cachedDataViewMemory0;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function getStringFromWasm0(ptr, len) {
|
|
352
|
+
ptr = ptr >>> 0;
|
|
353
|
+
return decodeText(ptr, len);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
let cachedUint8ArrayMemory0 = null;
|
|
357
|
+
function getUint8ArrayMemory0() {
|
|
358
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
359
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
360
|
+
}
|
|
361
|
+
return cachedUint8ArrayMemory0;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
function handleError(f, args) {
|
|
365
|
+
try {
|
|
366
|
+
return f.apply(this, args);
|
|
367
|
+
} catch (e) {
|
|
368
|
+
const idx = addToExternrefTable0(e);
|
|
369
|
+
wasm.__wbindgen_exn_store(idx);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function isLikeNone(x) {
|
|
374
|
+
return x === undefined || x === null;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
378
|
+
if (realloc === undefined) {
|
|
379
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
380
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
381
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
382
|
+
WASM_VECTOR_LEN = buf.length;
|
|
383
|
+
return ptr;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
let len = arg.length;
|
|
387
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
388
|
+
|
|
389
|
+
const mem = getUint8ArrayMemory0();
|
|
390
|
+
|
|
391
|
+
let offset = 0;
|
|
392
|
+
|
|
393
|
+
for (; offset < len; offset++) {
|
|
394
|
+
const code = arg.charCodeAt(offset);
|
|
395
|
+
if (code > 0x7F) break;
|
|
396
|
+
mem[ptr + offset] = code;
|
|
397
|
+
}
|
|
398
|
+
if (offset !== len) {
|
|
399
|
+
if (offset !== 0) {
|
|
400
|
+
arg = arg.slice(offset);
|
|
401
|
+
}
|
|
402
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
403
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
404
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
405
|
+
|
|
406
|
+
offset += ret.written;
|
|
407
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
WASM_VECTOR_LEN = offset;
|
|
411
|
+
return ptr;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
415
|
+
cachedTextDecoder.decode();
|
|
416
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
417
|
+
let numBytesDecoded = 0;
|
|
418
|
+
function decodeText(ptr, len) {
|
|
419
|
+
numBytesDecoded += len;
|
|
420
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
421
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
422
|
+
cachedTextDecoder.decode();
|
|
423
|
+
numBytesDecoded = len;
|
|
424
|
+
}
|
|
425
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
const cachedTextEncoder = new TextEncoder();
|
|
429
|
+
|
|
430
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
431
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
432
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
433
|
+
view.set(buf);
|
|
434
|
+
return {
|
|
435
|
+
read: arg.length,
|
|
436
|
+
written: buf.length
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
let WASM_VECTOR_LEN = 0;
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
let wasm;
|
|
445
|
+
export function __wbg_set_wasm(val) {
|
|
446
|
+
wasm = val;
|
|
447
|
+
}
|
package/alpathfinder_bg.wasm
CHANGED
|
Binary file
|