swls-wasm 0.2.7 → 0.2.8
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 +4 -2
- package/swls_wasm.d.ts +0 -42
- package/swls_wasm.js +5 -678
- package/swls_wasm_bg.js +646 -0
- package/swls_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
"collaborators": [
|
|
5
5
|
"ajuvercr <arthur.vercruysse@outlook.com>"
|
|
6
6
|
],
|
|
7
|
-
"version": "0.2.
|
|
7
|
+
"version": "0.2.8",
|
|
8
8
|
"files": [
|
|
9
9
|
"swls_wasm_bg.wasm",
|
|
10
10
|
"swls_wasm.js",
|
|
11
|
+
"swls_wasm_bg.js",
|
|
11
12
|
"swls_wasm.d.ts"
|
|
12
13
|
],
|
|
13
14
|
"main": "swls_wasm.js",
|
|
14
15
|
"types": "swls_wasm.d.ts",
|
|
15
16
|
"sideEffects": [
|
|
17
|
+
"./swls_wasm.js",
|
|
16
18
|
"./snippets/*"
|
|
17
19
|
]
|
|
18
|
-
}
|
|
20
|
+
}
|
package/swls_wasm.d.ts
CHANGED
|
@@ -15,45 +15,3 @@ export class WasmLsp {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export function start_wasm_lsp(): Promise<void>;
|
|
18
|
-
|
|
19
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
20
|
-
|
|
21
|
-
export interface InitOutput {
|
|
22
|
-
readonly memory: WebAssembly.Memory;
|
|
23
|
-
readonly __wbg_wasmlsp_free: (a: number, b: number) => void;
|
|
24
|
-
readonly start_wasm_lsp: () => void;
|
|
25
|
-
readonly wasmlsp_new: (a: any, b: number) => number;
|
|
26
|
-
readonly wasmlsp_send: (a: number, b: number, c: number) => void;
|
|
27
|
-
readonly wasm_bindgen__convert__closures_____invoke__hdf449a9872fb8032: (a: number, b: number, c: any) => void;
|
|
28
|
-
readonly wasm_bindgen__closure__destroy__h78f7bf6209968402: (a: number, b: number) => void;
|
|
29
|
-
readonly wasm_bindgen__convert__closures_____invoke__h99ba0a2e80dc875e: (a: number, b: number, c: any, d: any) => void;
|
|
30
|
-
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
31
|
-
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
32
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
33
|
-
readonly __externref_table_alloc: () => number;
|
|
34
|
-
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
35
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
36
|
-
readonly __wbindgen_start: () => void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
43
|
-
* a precompiled `WebAssembly.Module`.
|
|
44
|
-
*
|
|
45
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
46
|
-
*
|
|
47
|
-
* @returns {InitOutput}
|
|
48
|
-
*/
|
|
49
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
53
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
54
|
-
*
|
|
55
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
56
|
-
*
|
|
57
|
-
* @returns {Promise<InitOutput>}
|
|
58
|
-
*/
|
|
59
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/swls_wasm.js
CHANGED
|
@@ -1,678 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return idx;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
10
|
-
? { register: () => {}, unregister: () => {} }
|
|
11
|
-
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
12
|
-
|
|
13
|
-
function debugString(val) {
|
|
14
|
-
// primitive types
|
|
15
|
-
const type = typeof val;
|
|
16
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
17
|
-
return `${val}`;
|
|
18
|
-
}
|
|
19
|
-
if (type == 'string') {
|
|
20
|
-
return `"${val}"`;
|
|
21
|
-
}
|
|
22
|
-
if (type == 'symbol') {
|
|
23
|
-
const description = val.description;
|
|
24
|
-
if (description == null) {
|
|
25
|
-
return 'Symbol';
|
|
26
|
-
} else {
|
|
27
|
-
return `Symbol(${description})`;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if (type == 'function') {
|
|
31
|
-
const name = val.name;
|
|
32
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
33
|
-
return `Function(${name})`;
|
|
34
|
-
} else {
|
|
35
|
-
return 'Function';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// objects
|
|
39
|
-
if (Array.isArray(val)) {
|
|
40
|
-
const length = val.length;
|
|
41
|
-
let debug = '[';
|
|
42
|
-
if (length > 0) {
|
|
43
|
-
debug += debugString(val[0]);
|
|
44
|
-
}
|
|
45
|
-
for(let i = 1; i < length; i++) {
|
|
46
|
-
debug += ', ' + debugString(val[i]);
|
|
47
|
-
}
|
|
48
|
-
debug += ']';
|
|
49
|
-
return debug;
|
|
50
|
-
}
|
|
51
|
-
// Test for built-in
|
|
52
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
53
|
-
let className;
|
|
54
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
55
|
-
className = builtInMatches[1];
|
|
56
|
-
} else {
|
|
57
|
-
// Failed to match the standard '[object ClassName]'
|
|
58
|
-
return toString.call(val);
|
|
59
|
-
}
|
|
60
|
-
if (className == 'Object') {
|
|
61
|
-
// we're a user defined class or Object
|
|
62
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
63
|
-
// easier than looping through ownProperties of `val`.
|
|
64
|
-
try {
|
|
65
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
66
|
-
} catch (_) {
|
|
67
|
-
return 'Object';
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
// errors
|
|
71
|
-
if (val instanceof Error) {
|
|
72
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
73
|
-
}
|
|
74
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
75
|
-
return className;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
79
|
-
ptr = ptr >>> 0;
|
|
80
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
let cachedDataViewMemory0 = null;
|
|
84
|
-
function getDataViewMemory0() {
|
|
85
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
86
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
87
|
-
}
|
|
88
|
-
return cachedDataViewMemory0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function getStringFromWasm0(ptr, len) {
|
|
92
|
-
ptr = ptr >>> 0;
|
|
93
|
-
return decodeText(ptr, len);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
let cachedUint8ArrayMemory0 = null;
|
|
97
|
-
function getUint8ArrayMemory0() {
|
|
98
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
99
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
100
|
-
}
|
|
101
|
-
return cachedUint8ArrayMemory0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function handleError(f, args) {
|
|
105
|
-
try {
|
|
106
|
-
return f.apply(this, args);
|
|
107
|
-
} catch (e) {
|
|
108
|
-
const idx = addToExternrefTable0(e);
|
|
109
|
-
wasm.__wbindgen_exn_store(idx);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function isLikeNone(x) {
|
|
114
|
-
return x === undefined || x === null;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
118
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
119
|
-
const real = (...args) => {
|
|
120
|
-
|
|
121
|
-
// First up with a closure we increment the internal reference
|
|
122
|
-
// count. This ensures that the Rust closure environment won't
|
|
123
|
-
// be deallocated while we're invoking it.
|
|
124
|
-
state.cnt++;
|
|
125
|
-
const a = state.a;
|
|
126
|
-
state.a = 0;
|
|
127
|
-
try {
|
|
128
|
-
return f(a, state.b, ...args);
|
|
129
|
-
} finally {
|
|
130
|
-
state.a = a;
|
|
131
|
-
real._wbg_cb_unref();
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
real._wbg_cb_unref = () => {
|
|
135
|
-
if (--state.cnt === 0) {
|
|
136
|
-
state.dtor(state.a, state.b);
|
|
137
|
-
state.a = 0;
|
|
138
|
-
CLOSURE_DTORS.unregister(state);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
142
|
-
return real;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
146
|
-
if (realloc === undefined) {
|
|
147
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
148
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
149
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
150
|
-
WASM_VECTOR_LEN = buf.length;
|
|
151
|
-
return ptr;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
let len = arg.length;
|
|
155
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
156
|
-
|
|
157
|
-
const mem = getUint8ArrayMemory0();
|
|
158
|
-
|
|
159
|
-
let offset = 0;
|
|
160
|
-
|
|
161
|
-
for (; offset < len; offset++) {
|
|
162
|
-
const code = arg.charCodeAt(offset);
|
|
163
|
-
if (code > 0x7F) break;
|
|
164
|
-
mem[ptr + offset] = code;
|
|
165
|
-
}
|
|
166
|
-
if (offset !== len) {
|
|
167
|
-
if (offset !== 0) {
|
|
168
|
-
arg = arg.slice(offset);
|
|
169
|
-
}
|
|
170
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
171
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
172
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
173
|
-
|
|
174
|
-
offset += ret.written;
|
|
175
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
WASM_VECTOR_LEN = offset;
|
|
179
|
-
return ptr;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
183
|
-
cachedTextDecoder.decode();
|
|
184
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
185
|
-
let numBytesDecoded = 0;
|
|
186
|
-
function decodeText(ptr, len) {
|
|
187
|
-
numBytesDecoded += len;
|
|
188
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
189
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
190
|
-
cachedTextDecoder.decode();
|
|
191
|
-
numBytesDecoded = len;
|
|
192
|
-
}
|
|
193
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const cachedTextEncoder = new TextEncoder();
|
|
197
|
-
|
|
198
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
199
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
200
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
201
|
-
view.set(buf);
|
|
202
|
-
return {
|
|
203
|
-
read: arg.length,
|
|
204
|
-
written: buf.length
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
let WASM_VECTOR_LEN = 0;
|
|
210
|
-
|
|
211
|
-
function wasm_bindgen__convert__closures_____invoke__hdf449a9872fb8032(arg0, arg1, arg2) {
|
|
212
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hdf449a9872fb8032(arg0, arg1, arg2);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function wasm_bindgen__convert__closures_____invoke__h99ba0a2e80dc875e(arg0, arg1, arg2, arg3) {
|
|
216
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h99ba0a2e80dc875e(arg0, arg1, arg2, arg3);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
const WasmLspFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
220
|
-
? { register: () => {}, unregister: () => {} }
|
|
221
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmlsp_free(ptr >>> 0, 1));
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* A self-contained WASM LSP instance that JS can create.
|
|
225
|
-
*/
|
|
226
|
-
export class WasmLsp {
|
|
227
|
-
__destroy_into_raw() {
|
|
228
|
-
const ptr = this.__wbg_ptr;
|
|
229
|
-
this.__wbg_ptr = 0;
|
|
230
|
-
WasmLspFinalization.unregister(this);
|
|
231
|
-
return ptr;
|
|
232
|
-
}
|
|
233
|
-
free() {
|
|
234
|
-
const ptr = this.__destroy_into_raw();
|
|
235
|
-
wasm.__wbg_wasmlsp_free(ptr, 0);
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* JS must pass a callback for receiving messages from Rust/WASM.
|
|
239
|
-
* @param {Function} post_message_cb
|
|
240
|
-
* @param {Function | null} [debug_cb]
|
|
241
|
-
*/
|
|
242
|
-
constructor(post_message_cb, debug_cb) {
|
|
243
|
-
const ret = wasm.wasmlsp_new(post_message_cb, isLikeNone(debug_cb) ? 0 : addToExternrefTable0(debug_cb));
|
|
244
|
-
this.__wbg_ptr = ret >>> 0;
|
|
245
|
-
WasmLspFinalization.register(this, this.__wbg_ptr, this);
|
|
246
|
-
return this;
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Send a message from JS → LSP.
|
|
250
|
-
* @param {string} msg
|
|
251
|
-
*/
|
|
252
|
-
send(msg) {
|
|
253
|
-
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
254
|
-
const len0 = WASM_VECTOR_LEN;
|
|
255
|
-
wasm.wasmlsp_send(this.__wbg_ptr, ptr0, len0);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
if (Symbol.dispose) WasmLsp.prototype[Symbol.dispose] = WasmLsp.prototype.free;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* @returns {Promise<void>}
|
|
262
|
-
*/
|
|
263
|
-
export function start_wasm_lsp() {
|
|
264
|
-
wasm.start_wasm_lsp();
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
268
|
-
|
|
269
|
-
async function __wbg_load(module, imports) {
|
|
270
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
271
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
272
|
-
try {
|
|
273
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
274
|
-
} catch (e) {
|
|
275
|
-
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
276
|
-
|
|
277
|
-
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
278
|
-
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);
|
|
279
|
-
|
|
280
|
-
} else {
|
|
281
|
-
throw e;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
const bytes = await module.arrayBuffer();
|
|
287
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
288
|
-
} else {
|
|
289
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
290
|
-
|
|
291
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
292
|
-
return { instance, module };
|
|
293
|
-
} else {
|
|
294
|
-
return instance;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
function __wbg_get_imports() {
|
|
300
|
-
const imports = {};
|
|
301
|
-
imports.wbg = {};
|
|
302
|
-
imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
303
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
304
|
-
return ret;
|
|
305
|
-
};
|
|
306
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
307
|
-
const ret = String(arg1);
|
|
308
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
|
-
const len1 = WASM_VECTOR_LEN;
|
|
310
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
311
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
312
|
-
};
|
|
313
|
-
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
314
|
-
const v = arg0;
|
|
315
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
316
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
317
|
-
};
|
|
318
|
-
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
319
|
-
const ret = debugString(arg1);
|
|
320
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
321
|
-
const len1 = WASM_VECTOR_LEN;
|
|
322
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
323
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
324
|
-
};
|
|
325
|
-
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
326
|
-
const ret = typeof(arg0) === 'function';
|
|
327
|
-
return ret;
|
|
328
|
-
};
|
|
329
|
-
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
330
|
-
const val = arg0;
|
|
331
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
332
|
-
return ret;
|
|
333
|
-
};
|
|
334
|
-
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
335
|
-
const ret = typeof(arg0) === 'string';
|
|
336
|
-
return ret;
|
|
337
|
-
};
|
|
338
|
-
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
339
|
-
const ret = arg0 === undefined;
|
|
340
|
-
return ret;
|
|
341
|
-
};
|
|
342
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
343
|
-
const ret = arg0 == arg1;
|
|
344
|
-
return ret;
|
|
345
|
-
};
|
|
346
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
347
|
-
const obj = arg1;
|
|
348
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
349
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
350
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
351
|
-
};
|
|
352
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
353
|
-
const obj = arg1;
|
|
354
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
355
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
|
-
var len1 = WASM_VECTOR_LEN;
|
|
357
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
358
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
359
|
-
};
|
|
360
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
361
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
362
|
-
};
|
|
363
|
-
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
364
|
-
arg0._wbg_cb_unref();
|
|
365
|
-
};
|
|
366
|
-
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
367
|
-
const ret = arg0.call(arg1, arg2);
|
|
368
|
-
return ret;
|
|
369
|
-
}, arguments) };
|
|
370
|
-
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
371
|
-
const ret = arg0.call(arg1);
|
|
372
|
-
return ret;
|
|
373
|
-
}, arguments) };
|
|
374
|
-
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
375
|
-
const ret = arg0.done;
|
|
376
|
-
return ret;
|
|
377
|
-
};
|
|
378
|
-
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
379
|
-
const ret = Object.entries(arg0);
|
|
380
|
-
return ret;
|
|
381
|
-
};
|
|
382
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
383
|
-
let deferred0_0;
|
|
384
|
-
let deferred0_1;
|
|
385
|
-
try {
|
|
386
|
-
deferred0_0 = arg0;
|
|
387
|
-
deferred0_1 = arg1;
|
|
388
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
389
|
-
} finally {
|
|
390
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
imports.wbg.__wbg_fetch_8d116804f1c746da = function() { return handleError(function (arg0, arg1) {
|
|
394
|
-
const ret = fetch(arg0, arg1);
|
|
395
|
-
return ret;
|
|
396
|
-
}, arguments) };
|
|
397
|
-
imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
398
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
399
|
-
}, arguments) };
|
|
400
|
-
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
401
|
-
const ret = arg0[arg1 >>> 0];
|
|
402
|
-
return ret;
|
|
403
|
-
};
|
|
404
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
405
|
-
const ret = Reflect.get(arg0, arg1);
|
|
406
|
-
return ret;
|
|
407
|
-
}, arguments) };
|
|
408
|
-
imports.wbg.__wbg_headers_654c30e1bcccc552 = function(arg0) {
|
|
409
|
-
const ret = arg0.headers;
|
|
410
|
-
return ret;
|
|
411
|
-
};
|
|
412
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
413
|
-
let result;
|
|
414
|
-
try {
|
|
415
|
-
result = arg0 instanceof ArrayBuffer;
|
|
416
|
-
} catch (_) {
|
|
417
|
-
result = false;
|
|
418
|
-
}
|
|
419
|
-
const ret = result;
|
|
420
|
-
return ret;
|
|
421
|
-
};
|
|
422
|
-
imports.wbg.__wbg_instanceof_Response_cd74d1c2ac92cb0b = function(arg0) {
|
|
423
|
-
let result;
|
|
424
|
-
try {
|
|
425
|
-
result = arg0 instanceof Response;
|
|
426
|
-
} catch (_) {
|
|
427
|
-
result = false;
|
|
428
|
-
}
|
|
429
|
-
const ret = result;
|
|
430
|
-
return ret;
|
|
431
|
-
};
|
|
432
|
-
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
433
|
-
let result;
|
|
434
|
-
try {
|
|
435
|
-
result = arg0 instanceof Uint8Array;
|
|
436
|
-
} catch (_) {
|
|
437
|
-
result = false;
|
|
438
|
-
}
|
|
439
|
-
const ret = result;
|
|
440
|
-
return ret;
|
|
441
|
-
};
|
|
442
|
-
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
443
|
-
const ret = Symbol.iterator;
|
|
444
|
-
return ret;
|
|
445
|
-
};
|
|
446
|
-
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
447
|
-
const ret = arg0.length;
|
|
448
|
-
return ret;
|
|
449
|
-
};
|
|
450
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
451
|
-
const ret = arg0.length;
|
|
452
|
-
return ret;
|
|
453
|
-
};
|
|
454
|
-
imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
|
|
455
|
-
console.log(arg0);
|
|
456
|
-
};
|
|
457
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
458
|
-
const ret = new Object();
|
|
459
|
-
return ret;
|
|
460
|
-
};
|
|
461
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
462
|
-
const ret = new Array();
|
|
463
|
-
return ret;
|
|
464
|
-
};
|
|
465
|
-
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
466
|
-
const ret = new Uint8Array(arg0);
|
|
467
|
-
return ret;
|
|
468
|
-
};
|
|
469
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
470
|
-
const ret = new Error();
|
|
471
|
-
return ret;
|
|
472
|
-
};
|
|
473
|
-
imports.wbg.__wbg_new_b546ae120718850e = function() {
|
|
474
|
-
const ret = new Map();
|
|
475
|
-
return ret;
|
|
476
|
-
};
|
|
477
|
-
imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
478
|
-
try {
|
|
479
|
-
var state0 = {a: arg0, b: arg1};
|
|
480
|
-
var cb0 = (arg0, arg1) => {
|
|
481
|
-
const a = state0.a;
|
|
482
|
-
state0.a = 0;
|
|
483
|
-
try {
|
|
484
|
-
return wasm_bindgen__convert__closures_____invoke__h99ba0a2e80dc875e(a, state0.b, arg0, arg1);
|
|
485
|
-
} finally {
|
|
486
|
-
state0.a = a;
|
|
487
|
-
}
|
|
488
|
-
};
|
|
489
|
-
const ret = new Promise(cb0);
|
|
490
|
-
return ret;
|
|
491
|
-
} finally {
|
|
492
|
-
state0.a = state0.b = 0;
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
|
|
496
|
-
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
497
|
-
return ret;
|
|
498
|
-
};
|
|
499
|
-
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
500
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
501
|
-
return ret;
|
|
502
|
-
};
|
|
503
|
-
imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
504
|
-
const ret = arg0.next;
|
|
505
|
-
return ret;
|
|
506
|
-
};
|
|
507
|
-
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
508
|
-
const ret = arg0.next();
|
|
509
|
-
return ret;
|
|
510
|
-
}, arguments) };
|
|
511
|
-
imports.wbg.__wbg_now_69d776cd24f5215b = function() {
|
|
512
|
-
const ret = Date.now();
|
|
513
|
-
return ret;
|
|
514
|
-
};
|
|
515
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
516
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
517
|
-
};
|
|
518
|
-
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
519
|
-
const ret = arg0.queueMicrotask;
|
|
520
|
-
return ret;
|
|
521
|
-
};
|
|
522
|
-
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
523
|
-
queueMicrotask(arg0);
|
|
524
|
-
};
|
|
525
|
-
imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
526
|
-
const ret = Promise.resolve(arg0);
|
|
527
|
-
return ret;
|
|
528
|
-
};
|
|
529
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
530
|
-
arg0[arg1] = arg2;
|
|
531
|
-
};
|
|
532
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
533
|
-
arg0[arg1 >>> 0] = arg2;
|
|
534
|
-
};
|
|
535
|
-
imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
|
|
536
|
-
const ret = arg0.set(arg1, arg2);
|
|
537
|
-
return ret;
|
|
538
|
-
};
|
|
539
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
540
|
-
const ret = arg1.stack;
|
|
541
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
542
|
-
const len1 = WASM_VECTOR_LEN;
|
|
543
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
544
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
545
|
-
};
|
|
546
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
547
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
548
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
549
|
-
};
|
|
550
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
551
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
552
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
553
|
-
};
|
|
554
|
-
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
555
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
556
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
557
|
-
};
|
|
558
|
-
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
559
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
560
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
561
|
-
};
|
|
562
|
-
imports.wbg.__wbg_status_9bfc680efca4bdfd = function(arg0) {
|
|
563
|
-
const ret = arg0.status;
|
|
564
|
-
return ret;
|
|
565
|
-
};
|
|
566
|
-
imports.wbg.__wbg_text_51046bb33d257f63 = function() { return handleError(function (arg0) {
|
|
567
|
-
const ret = arg0.text();
|
|
568
|
-
return ret;
|
|
569
|
-
}, arguments) };
|
|
570
|
-
imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
571
|
-
const ret = arg0.then(arg1, arg2);
|
|
572
|
-
return ret;
|
|
573
|
-
};
|
|
574
|
-
imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
575
|
-
const ret = arg0.then(arg1);
|
|
576
|
-
return ret;
|
|
577
|
-
};
|
|
578
|
-
imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
579
|
-
const ret = arg0.value;
|
|
580
|
-
return ret;
|
|
581
|
-
};
|
|
582
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
583
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
584
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
585
|
-
return ret;
|
|
586
|
-
};
|
|
587
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
588
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
589
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
590
|
-
return ret;
|
|
591
|
-
};
|
|
592
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
593
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
594
|
-
const ret = arg0;
|
|
595
|
-
return ret;
|
|
596
|
-
};
|
|
597
|
-
imports.wbg.__wbindgen_cast_a6bfd768c36f43a7 = function(arg0, arg1) {
|
|
598
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 3620, function: Function { arguments: [Externref], shim_idx: 3609, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
599
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h78f7bf6209968402, wasm_bindgen__convert__closures_____invoke__hdf449a9872fb8032);
|
|
600
|
-
return ret;
|
|
601
|
-
};
|
|
602
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
603
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
604
|
-
const ret = arg0;
|
|
605
|
-
return ret;
|
|
606
|
-
};
|
|
607
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
608
|
-
const table = wasm.__wbindgen_externrefs;
|
|
609
|
-
const offset = table.grow(4);
|
|
610
|
-
table.set(0, undefined);
|
|
611
|
-
table.set(offset + 0, undefined);
|
|
612
|
-
table.set(offset + 1, null);
|
|
613
|
-
table.set(offset + 2, true);
|
|
614
|
-
table.set(offset + 3, false);
|
|
615
|
-
};
|
|
616
|
-
|
|
617
|
-
return imports;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
function __wbg_finalize_init(instance, module) {
|
|
621
|
-
wasm = instance.exports;
|
|
622
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
623
|
-
cachedDataViewMemory0 = null;
|
|
624
|
-
cachedUint8ArrayMemory0 = null;
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
wasm.__wbindgen_start();
|
|
628
|
-
return wasm;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
function initSync(module) {
|
|
632
|
-
if (wasm !== undefined) return wasm;
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
if (typeof module !== 'undefined') {
|
|
636
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
637
|
-
({module} = module)
|
|
638
|
-
} else {
|
|
639
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
const imports = __wbg_get_imports();
|
|
644
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
645
|
-
module = new WebAssembly.Module(module);
|
|
646
|
-
}
|
|
647
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
648
|
-
return __wbg_finalize_init(instance, module);
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
async function __wbg_init(module_or_path) {
|
|
652
|
-
if (wasm !== undefined) return wasm;
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
if (typeof module_or_path !== 'undefined') {
|
|
656
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
657
|
-
({module_or_path} = module_or_path)
|
|
658
|
-
} else {
|
|
659
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
if (typeof module_or_path === 'undefined') {
|
|
664
|
-
module_or_path = new URL('swls_wasm_bg.wasm', import.meta.url);
|
|
665
|
-
}
|
|
666
|
-
const imports = __wbg_get_imports();
|
|
667
|
-
|
|
668
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
669
|
-
module_or_path = fetch(module_or_path);
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
673
|
-
|
|
674
|
-
return __wbg_finalize_init(instance, module);
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
export { initSync };
|
|
678
|
-
export default __wbg_init;
|
|
1
|
+
import * as wasm from "./swls_wasm_bg.wasm";
|
|
2
|
+
export * from "./swls_wasm_bg.js";
|
|
3
|
+
import { __wbg_set_wasm } from "./swls_wasm_bg.js";
|
|
4
|
+
__wbg_set_wasm(wasm);
|
|
5
|
+
wasm.__wbindgen_start();
|
package/swls_wasm_bg.js
ADDED
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
export function __wbg_set_wasm(val) {
|
|
3
|
+
wasm = val;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
function addToExternrefTable0(obj) {
|
|
7
|
+
const idx = wasm.__externref_table_alloc();
|
|
8
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
9
|
+
return idx;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
13
|
+
? { register: () => {}, unregister: () => {} }
|
|
14
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
15
|
+
|
|
16
|
+
function debugString(val) {
|
|
17
|
+
// primitive types
|
|
18
|
+
const type = typeof val;
|
|
19
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
20
|
+
return `${val}`;
|
|
21
|
+
}
|
|
22
|
+
if (type == 'string') {
|
|
23
|
+
return `"${val}"`;
|
|
24
|
+
}
|
|
25
|
+
if (type == 'symbol') {
|
|
26
|
+
const description = val.description;
|
|
27
|
+
if (description == null) {
|
|
28
|
+
return 'Symbol';
|
|
29
|
+
} else {
|
|
30
|
+
return `Symbol(${description})`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (type == 'function') {
|
|
34
|
+
const name = val.name;
|
|
35
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
36
|
+
return `Function(${name})`;
|
|
37
|
+
} else {
|
|
38
|
+
return 'Function';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// objects
|
|
42
|
+
if (Array.isArray(val)) {
|
|
43
|
+
const length = val.length;
|
|
44
|
+
let debug = '[';
|
|
45
|
+
if (length > 0) {
|
|
46
|
+
debug += debugString(val[0]);
|
|
47
|
+
}
|
|
48
|
+
for(let i = 1; i < length; i++) {
|
|
49
|
+
debug += ', ' + debugString(val[i]);
|
|
50
|
+
}
|
|
51
|
+
debug += ']';
|
|
52
|
+
return debug;
|
|
53
|
+
}
|
|
54
|
+
// Test for built-in
|
|
55
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
56
|
+
let className;
|
|
57
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
58
|
+
className = builtInMatches[1];
|
|
59
|
+
} else {
|
|
60
|
+
// Failed to match the standard '[object ClassName]'
|
|
61
|
+
return toString.call(val);
|
|
62
|
+
}
|
|
63
|
+
if (className == 'Object') {
|
|
64
|
+
// we're a user defined class or Object
|
|
65
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
66
|
+
// easier than looping through ownProperties of `val`.
|
|
67
|
+
try {
|
|
68
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
69
|
+
} catch (_) {
|
|
70
|
+
return 'Object';
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// errors
|
|
74
|
+
if (val instanceof Error) {
|
|
75
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
76
|
+
}
|
|
77
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
78
|
+
return className;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
82
|
+
ptr = ptr >>> 0;
|
|
83
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
let cachedDataViewMemory0 = null;
|
|
87
|
+
function getDataViewMemory0() {
|
|
88
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
89
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
90
|
+
}
|
|
91
|
+
return cachedDataViewMemory0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function getStringFromWasm0(ptr, len) {
|
|
95
|
+
ptr = ptr >>> 0;
|
|
96
|
+
return decodeText(ptr, len);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
let cachedUint8ArrayMemory0 = null;
|
|
100
|
+
function getUint8ArrayMemory0() {
|
|
101
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
102
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
103
|
+
}
|
|
104
|
+
return cachedUint8ArrayMemory0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function handleError(f, args) {
|
|
108
|
+
try {
|
|
109
|
+
return f.apply(this, args);
|
|
110
|
+
} catch (e) {
|
|
111
|
+
const idx = addToExternrefTable0(e);
|
|
112
|
+
wasm.__wbindgen_exn_store(idx);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function isLikeNone(x) {
|
|
117
|
+
return x === undefined || x === null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
121
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
122
|
+
const real = (...args) => {
|
|
123
|
+
|
|
124
|
+
// First up with a closure we increment the internal reference
|
|
125
|
+
// count. This ensures that the Rust closure environment won't
|
|
126
|
+
// be deallocated while we're invoking it.
|
|
127
|
+
state.cnt++;
|
|
128
|
+
const a = state.a;
|
|
129
|
+
state.a = 0;
|
|
130
|
+
try {
|
|
131
|
+
return f(a, state.b, ...args);
|
|
132
|
+
} finally {
|
|
133
|
+
state.a = a;
|
|
134
|
+
real._wbg_cb_unref();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
real._wbg_cb_unref = () => {
|
|
138
|
+
if (--state.cnt === 0) {
|
|
139
|
+
state.dtor(state.a, state.b);
|
|
140
|
+
state.a = 0;
|
|
141
|
+
CLOSURE_DTORS.unregister(state);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
145
|
+
return real;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
149
|
+
if (realloc === undefined) {
|
|
150
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
151
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
152
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
153
|
+
WASM_VECTOR_LEN = buf.length;
|
|
154
|
+
return ptr;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
let len = arg.length;
|
|
158
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
159
|
+
|
|
160
|
+
const mem = getUint8ArrayMemory0();
|
|
161
|
+
|
|
162
|
+
let offset = 0;
|
|
163
|
+
|
|
164
|
+
for (; offset < len; offset++) {
|
|
165
|
+
const code = arg.charCodeAt(offset);
|
|
166
|
+
if (code > 0x7F) break;
|
|
167
|
+
mem[ptr + offset] = code;
|
|
168
|
+
}
|
|
169
|
+
if (offset !== len) {
|
|
170
|
+
if (offset !== 0) {
|
|
171
|
+
arg = arg.slice(offset);
|
|
172
|
+
}
|
|
173
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
174
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
175
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
176
|
+
|
|
177
|
+
offset += ret.written;
|
|
178
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
WASM_VECTOR_LEN = offset;
|
|
182
|
+
return ptr;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
186
|
+
cachedTextDecoder.decode();
|
|
187
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
188
|
+
let numBytesDecoded = 0;
|
|
189
|
+
function decodeText(ptr, len) {
|
|
190
|
+
numBytesDecoded += len;
|
|
191
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
192
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
193
|
+
cachedTextDecoder.decode();
|
|
194
|
+
numBytesDecoded = len;
|
|
195
|
+
}
|
|
196
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const cachedTextEncoder = new TextEncoder();
|
|
200
|
+
|
|
201
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
202
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
203
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
204
|
+
view.set(buf);
|
|
205
|
+
return {
|
|
206
|
+
read: arg.length,
|
|
207
|
+
written: buf.length
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
let WASM_VECTOR_LEN = 0;
|
|
213
|
+
|
|
214
|
+
function wasm_bindgen__convert__closures_____invoke__hdf449a9872fb8032(arg0, arg1, arg2) {
|
|
215
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hdf449a9872fb8032(arg0, arg1, arg2);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function wasm_bindgen__convert__closures_____invoke__h99ba0a2e80dc875e(arg0, arg1, arg2, arg3) {
|
|
219
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h99ba0a2e80dc875e(arg0, arg1, arg2, arg3);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const WasmLspFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
223
|
+
? { register: () => {}, unregister: () => {} }
|
|
224
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmlsp_free(ptr >>> 0, 1));
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* A self-contained WASM LSP instance that JS can create.
|
|
228
|
+
*/
|
|
229
|
+
export class WasmLsp {
|
|
230
|
+
__destroy_into_raw() {
|
|
231
|
+
const ptr = this.__wbg_ptr;
|
|
232
|
+
this.__wbg_ptr = 0;
|
|
233
|
+
WasmLspFinalization.unregister(this);
|
|
234
|
+
return ptr;
|
|
235
|
+
}
|
|
236
|
+
free() {
|
|
237
|
+
const ptr = this.__destroy_into_raw();
|
|
238
|
+
wasm.__wbg_wasmlsp_free(ptr, 0);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* JS must pass a callback for receiving messages from Rust/WASM.
|
|
242
|
+
* @param {Function} post_message_cb
|
|
243
|
+
* @param {Function | null} [debug_cb]
|
|
244
|
+
*/
|
|
245
|
+
constructor(post_message_cb, debug_cb) {
|
|
246
|
+
const ret = wasm.wasmlsp_new(post_message_cb, isLikeNone(debug_cb) ? 0 : addToExternrefTable0(debug_cb));
|
|
247
|
+
this.__wbg_ptr = ret >>> 0;
|
|
248
|
+
WasmLspFinalization.register(this, this.__wbg_ptr, this);
|
|
249
|
+
return this;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Send a message from JS → LSP.
|
|
253
|
+
* @param {string} msg
|
|
254
|
+
*/
|
|
255
|
+
send(msg) {
|
|
256
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
257
|
+
const len0 = WASM_VECTOR_LEN;
|
|
258
|
+
wasm.wasmlsp_send(this.__wbg_ptr, ptr0, len0);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (Symbol.dispose) WasmLsp.prototype[Symbol.dispose] = WasmLsp.prototype.free;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @returns {Promise<void>}
|
|
265
|
+
*/
|
|
266
|
+
export function start_wasm_lsp() {
|
|
267
|
+
wasm.start_wasm_lsp();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
|
|
271
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
272
|
+
return ret;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
276
|
+
const ret = String(arg1);
|
|
277
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
278
|
+
const len1 = WASM_VECTOR_LEN;
|
|
279
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
280
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
|
|
284
|
+
const v = arg0;
|
|
285
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
286
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
|
|
290
|
+
const ret = debugString(arg1);
|
|
291
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
|
+
const len1 = WASM_VECTOR_LEN;
|
|
293
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
294
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
|
|
298
|
+
const ret = typeof(arg0) === 'function';
|
|
299
|
+
return ret;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
|
|
303
|
+
const val = arg0;
|
|
304
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
305
|
+
return ret;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
|
|
309
|
+
const ret = typeof(arg0) === 'string';
|
|
310
|
+
return ret;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
|
|
314
|
+
const ret = arg0 === undefined;
|
|
315
|
+
return ret;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
|
|
319
|
+
const ret = arg0 == arg1;
|
|
320
|
+
return ret;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
|
|
324
|
+
const obj = arg1;
|
|
325
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
326
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
327
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
|
|
331
|
+
const obj = arg1;
|
|
332
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
333
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
334
|
+
var len1 = WASM_VECTOR_LEN;
|
|
335
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
336
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
|
|
340
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
|
|
344
|
+
arg0._wbg_cb_unref();
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
|
|
348
|
+
const ret = arg0.call(arg1, arg2);
|
|
349
|
+
return ret;
|
|
350
|
+
}, arguments) };
|
|
351
|
+
|
|
352
|
+
export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
|
|
353
|
+
const ret = arg0.call(arg1);
|
|
354
|
+
return ret;
|
|
355
|
+
}, arguments) };
|
|
356
|
+
|
|
357
|
+
export function __wbg_done_62ea16af4ce34b24(arg0) {
|
|
358
|
+
const ret = arg0.done;
|
|
359
|
+
return ret;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
export function __wbg_entries_83c79938054e065f(arg0) {
|
|
363
|
+
const ret = Object.entries(arg0);
|
|
364
|
+
return ret;
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
|
368
|
+
let deferred0_0;
|
|
369
|
+
let deferred0_1;
|
|
370
|
+
try {
|
|
371
|
+
deferred0_0 = arg0;
|
|
372
|
+
deferred0_1 = arg1;
|
|
373
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
374
|
+
} finally {
|
|
375
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
export function __wbg_fetch_8d116804f1c746da() { return handleError(function (arg0, arg1) {
|
|
380
|
+
const ret = fetch(arg0, arg1);
|
|
381
|
+
return ret;
|
|
382
|
+
}, arguments) };
|
|
383
|
+
|
|
384
|
+
export function __wbg_getRandomValues_1c61fac11405ffdc() { return handleError(function (arg0, arg1) {
|
|
385
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
386
|
+
}, arguments) };
|
|
387
|
+
|
|
388
|
+
export function __wbg_get_6b7bd52aca3f9671(arg0, arg1) {
|
|
389
|
+
const ret = arg0[arg1 >>> 0];
|
|
390
|
+
return ret;
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
|
|
394
|
+
const ret = Reflect.get(arg0, arg1);
|
|
395
|
+
return ret;
|
|
396
|
+
}, arguments) };
|
|
397
|
+
|
|
398
|
+
export function __wbg_headers_654c30e1bcccc552(arg0) {
|
|
399
|
+
const ret = arg0.headers;
|
|
400
|
+
return ret;
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
|
|
404
|
+
let result;
|
|
405
|
+
try {
|
|
406
|
+
result = arg0 instanceof ArrayBuffer;
|
|
407
|
+
} catch (_) {
|
|
408
|
+
result = false;
|
|
409
|
+
}
|
|
410
|
+
const ret = result;
|
|
411
|
+
return ret;
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
|
|
415
|
+
let result;
|
|
416
|
+
try {
|
|
417
|
+
result = arg0 instanceof Response;
|
|
418
|
+
} catch (_) {
|
|
419
|
+
result = false;
|
|
420
|
+
}
|
|
421
|
+
const ret = result;
|
|
422
|
+
return ret;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
|
|
426
|
+
let result;
|
|
427
|
+
try {
|
|
428
|
+
result = arg0 instanceof Uint8Array;
|
|
429
|
+
} catch (_) {
|
|
430
|
+
result = false;
|
|
431
|
+
}
|
|
432
|
+
const ret = result;
|
|
433
|
+
return ret;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
export function __wbg_iterator_27b7c8b35ab3e86b() {
|
|
437
|
+
const ret = Symbol.iterator;
|
|
438
|
+
return ret;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
export function __wbg_length_22ac23eaec9d8053(arg0) {
|
|
442
|
+
const ret = arg0.length;
|
|
443
|
+
return ret;
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
export function __wbg_length_d45040a40c570362(arg0) {
|
|
447
|
+
const ret = arg0.length;
|
|
448
|
+
return ret;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
export function __wbg_log_1d990106d99dacb7(arg0) {
|
|
452
|
+
console.log(arg0);
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export function __wbg_new_1ba21ce319a06297() {
|
|
456
|
+
const ret = new Object();
|
|
457
|
+
return ret;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
export function __wbg_new_25f239778d6112b9() {
|
|
461
|
+
const ret = new Array();
|
|
462
|
+
return ret;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
export function __wbg_new_6421f6084cc5bc5a(arg0) {
|
|
466
|
+
const ret = new Uint8Array(arg0);
|
|
467
|
+
return ret;
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
export function __wbg_new_8a6f238a6ece86ea() {
|
|
471
|
+
const ret = new Error();
|
|
472
|
+
return ret;
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
export function __wbg_new_b546ae120718850e() {
|
|
476
|
+
const ret = new Map();
|
|
477
|
+
return ret;
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
|
|
481
|
+
try {
|
|
482
|
+
var state0 = {a: arg0, b: arg1};
|
|
483
|
+
var cb0 = (arg0, arg1) => {
|
|
484
|
+
const a = state0.a;
|
|
485
|
+
state0.a = 0;
|
|
486
|
+
try {
|
|
487
|
+
return wasm_bindgen__convert__closures_____invoke__h99ba0a2e80dc875e(a, state0.b, arg0, arg1);
|
|
488
|
+
} finally {
|
|
489
|
+
state0.a = a;
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
const ret = new Promise(cb0);
|
|
493
|
+
return ret;
|
|
494
|
+
} finally {
|
|
495
|
+
state0.a = state0.b = 0;
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
export function __wbg_new_from_slice_f9c22b9153b26992(arg0, arg1) {
|
|
500
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
501
|
+
return ret;
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
|
|
505
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
506
|
+
return ret;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
export function __wbg_next_138a17bbf04e926c(arg0) {
|
|
510
|
+
const ret = arg0.next;
|
|
511
|
+
return ret;
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
export function __wbg_next_3cfe5c0fe2a4cc53() { return handleError(function (arg0) {
|
|
515
|
+
const ret = arg0.next();
|
|
516
|
+
return ret;
|
|
517
|
+
}, arguments) };
|
|
518
|
+
|
|
519
|
+
export function __wbg_now_69d776cd24f5215b() {
|
|
520
|
+
const ret = Date.now();
|
|
521
|
+
return ret;
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0, arg1, arg2) {
|
|
525
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
export function __wbg_queueMicrotask_9b549dfce8865860(arg0) {
|
|
529
|
+
const ret = arg0.queueMicrotask;
|
|
530
|
+
return ret;
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
export function __wbg_queueMicrotask_fca69f5bfad613a5(arg0) {
|
|
534
|
+
queueMicrotask(arg0);
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
export function __wbg_resolve_fd5bfbaa4ce36e1e(arg0) {
|
|
538
|
+
const ret = Promise.resolve(arg0);
|
|
539
|
+
return ret;
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
543
|
+
arg0[arg1] = arg2;
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
export function __wbg_set_7df433eea03a5c14(arg0, arg1, arg2) {
|
|
547
|
+
arg0[arg1 >>> 0] = arg2;
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
export function __wbg_set_efaaf145b9377369(arg0, arg1, arg2) {
|
|
551
|
+
const ret = arg0.set(arg1, arg2);
|
|
552
|
+
return ret;
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
|
|
556
|
+
const ret = arg1.stack;
|
|
557
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
558
|
+
const len1 = WASM_VECTOR_LEN;
|
|
559
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
560
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
|
|
564
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
565
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
|
|
569
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
570
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
export function __wbg_static_accessor_SELF_08f5a74c69739274() {
|
|
574
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
575
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
export function __wbg_static_accessor_WINDOW_a8924b26aa92d024() {
|
|
579
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
580
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
export function __wbg_status_9bfc680efca4bdfd(arg0) {
|
|
584
|
+
const ret = arg0.status;
|
|
585
|
+
return ret;
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
export function __wbg_text_51046bb33d257f63() { return handleError(function (arg0) {
|
|
589
|
+
const ret = arg0.text();
|
|
590
|
+
return ret;
|
|
591
|
+
}, arguments) };
|
|
592
|
+
|
|
593
|
+
export function __wbg_then_429f7caf1026411d(arg0, arg1, arg2) {
|
|
594
|
+
const ret = arg0.then(arg1, arg2);
|
|
595
|
+
return ret;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
export function __wbg_then_4f95312d68691235(arg0, arg1) {
|
|
599
|
+
const ret = arg0.then(arg1);
|
|
600
|
+
return ret;
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
export function __wbg_value_57b7b035e117f7ee(arg0) {
|
|
604
|
+
const ret = arg0.value;
|
|
605
|
+
return ret;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
609
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
610
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
611
|
+
return ret;
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
|
|
615
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
616
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
617
|
+
return ret;
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
export function __wbindgen_cast_9ae0607507abb057(arg0) {
|
|
621
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
622
|
+
const ret = arg0;
|
|
623
|
+
return ret;
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
export function __wbindgen_cast_a6bfd768c36f43a7(arg0, arg1) {
|
|
627
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3620, function: Function { arguments: [Externref], shim_idx: 3609, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
628
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h78f7bf6209968402, wasm_bindgen__convert__closures_____invoke__hdf449a9872fb8032);
|
|
629
|
+
return ret;
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
|
|
633
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
634
|
+
const ret = arg0;
|
|
635
|
+
return ret;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
export function __wbindgen_init_externref_table() {
|
|
639
|
+
const table = wasm.__wbindgen_externrefs;
|
|
640
|
+
const offset = table.grow(4);
|
|
641
|
+
table.set(0, undefined);
|
|
642
|
+
table.set(offset + 0, undefined);
|
|
643
|
+
table.set(offset + 1, null);
|
|
644
|
+
table.set(offset + 2, true);
|
|
645
|
+
table.set(offset + 3, false);
|
|
646
|
+
};
|
package/swls_wasm_bg.wasm
CHANGED
|
Binary file
|