n8n-nodes-mq 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nodes/Mq/MqEngine.d.ts +3 -3
- package/dist/nodes/Mq/MqEngine.d.ts.map +1 -1
- package/dist/nodes/Mq/MqEngine.js +24 -110
- package/dist/nodes/Mq/MqEngine.js.map +1 -1
- package/dist/nodes/Mq/wasm/core.cjs +2 -0
- package/dist/nodes/Mq/wasm/core.d.cts +69 -0
- package/dist/nodes/Mq/wasm/core.d.ts +69 -0
- package/dist/nodes/Mq/wasm/core.js +2 -0
- package/dist/nodes/Mq/wasm/index.cjs +2 -0
- package/dist/nodes/Mq/wasm/index.d.cts +31 -0
- package/dist/nodes/Mq/wasm/index.d.ts +31 -0
- package/dist/nodes/Mq/wasm/index.js +2 -0
- package/dist/nodes/Mq/wasm/mq_wasm.js +798 -0
- package/dist/nodes/Mq/wasm/mq_wasm_bg.wasm +0 -0
- package/dist/nodes/Mq/wasm-data.d.ts +8 -0
- package/dist/nodes/Mq/wasm-data.d.ts.map +1 -0
- package/dist/nodes/Mq/wasm-data.js +19 -0
- package/dist/nodes/Mq/wasm-data.js.map +1 -0
- package/package.json +3 -5
|
@@ -0,0 +1,798 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
|
|
3
|
+
function addHeapObject(obj) {
|
|
4
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
5
|
+
const idx = heap_next;
|
|
6
|
+
heap_next = heap[idx];
|
|
7
|
+
|
|
8
|
+
heap[idx] = obj;
|
|
9
|
+
return idx;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function _assertClass(instance, klass) {
|
|
13
|
+
if (!(instance instanceof klass)) {
|
|
14
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
19
|
+
? { register: () => {}, unregister: () => {} }
|
|
20
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
21
|
+
|
|
22
|
+
function debugString(val) {
|
|
23
|
+
// primitive types
|
|
24
|
+
const type = typeof val;
|
|
25
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
26
|
+
return `${val}`;
|
|
27
|
+
}
|
|
28
|
+
if (type == 'string') {
|
|
29
|
+
return `"${val}"`;
|
|
30
|
+
}
|
|
31
|
+
if (type == 'symbol') {
|
|
32
|
+
const description = val.description;
|
|
33
|
+
if (description == null) {
|
|
34
|
+
return 'Symbol';
|
|
35
|
+
} else {
|
|
36
|
+
return `Symbol(${description})`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (type == 'function') {
|
|
40
|
+
const name = val.name;
|
|
41
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
42
|
+
return `Function(${name})`;
|
|
43
|
+
} else {
|
|
44
|
+
return 'Function';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// objects
|
|
48
|
+
if (Array.isArray(val)) {
|
|
49
|
+
const length = val.length;
|
|
50
|
+
let debug = '[';
|
|
51
|
+
if (length > 0) {
|
|
52
|
+
debug += debugString(val[0]);
|
|
53
|
+
}
|
|
54
|
+
for(let i = 1; i < length; i++) {
|
|
55
|
+
debug += ', ' + debugString(val[i]);
|
|
56
|
+
}
|
|
57
|
+
debug += ']';
|
|
58
|
+
return debug;
|
|
59
|
+
}
|
|
60
|
+
// Test for built-in
|
|
61
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
62
|
+
let className;
|
|
63
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
64
|
+
className = builtInMatches[1];
|
|
65
|
+
} else {
|
|
66
|
+
// Failed to match the standard '[object ClassName]'
|
|
67
|
+
return toString.call(val);
|
|
68
|
+
}
|
|
69
|
+
if (className == 'Object') {
|
|
70
|
+
// we're a user defined class or Object
|
|
71
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
72
|
+
// easier than looping through ownProperties of `val`.
|
|
73
|
+
try {
|
|
74
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
75
|
+
} catch (_) {
|
|
76
|
+
return 'Object';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// errors
|
|
80
|
+
if (val instanceof Error) {
|
|
81
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
82
|
+
}
|
|
83
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
84
|
+
return className;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function dropObject(idx) {
|
|
88
|
+
if (idx < 132) return;
|
|
89
|
+
heap[idx] = heap_next;
|
|
90
|
+
heap_next = idx;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
94
|
+
ptr = ptr >>> 0;
|
|
95
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
let cachedDataViewMemory0 = null;
|
|
99
|
+
function getDataViewMemory0() {
|
|
100
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
101
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
102
|
+
}
|
|
103
|
+
return cachedDataViewMemory0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function getStringFromWasm0(ptr, len) {
|
|
107
|
+
ptr = ptr >>> 0;
|
|
108
|
+
return decodeText(ptr, len);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let cachedUint8ArrayMemory0 = null;
|
|
112
|
+
function getUint8ArrayMemory0() {
|
|
113
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
114
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
115
|
+
}
|
|
116
|
+
return cachedUint8ArrayMemory0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function getObject(idx) { return heap[idx]; }
|
|
120
|
+
|
|
121
|
+
function handleError(f, args) {
|
|
122
|
+
try {
|
|
123
|
+
return f.apply(this, args);
|
|
124
|
+
} catch (e) {
|
|
125
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
let heap = new Array(128).fill(undefined);
|
|
130
|
+
heap.push(undefined, null, true, false);
|
|
131
|
+
|
|
132
|
+
let heap_next = heap.length;
|
|
133
|
+
|
|
134
|
+
function isLikeNone(x) {
|
|
135
|
+
return x === undefined || x === null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
139
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
140
|
+
const real = (...args) => {
|
|
141
|
+
|
|
142
|
+
// First up with a closure we increment the internal reference
|
|
143
|
+
// count. This ensures that the Rust closure environment won't
|
|
144
|
+
// be deallocated while we're invoking it.
|
|
145
|
+
state.cnt++;
|
|
146
|
+
const a = state.a;
|
|
147
|
+
state.a = 0;
|
|
148
|
+
try {
|
|
149
|
+
return f(a, state.b, ...args);
|
|
150
|
+
} finally {
|
|
151
|
+
state.a = a;
|
|
152
|
+
real._wbg_cb_unref();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
real._wbg_cb_unref = () => {
|
|
156
|
+
if (--state.cnt === 0) {
|
|
157
|
+
state.dtor(state.a, state.b);
|
|
158
|
+
state.a = 0;
|
|
159
|
+
CLOSURE_DTORS.unregister(state);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
163
|
+
return real;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
167
|
+
if (realloc === undefined) {
|
|
168
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
169
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
170
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
171
|
+
WASM_VECTOR_LEN = buf.length;
|
|
172
|
+
return ptr;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
let len = arg.length;
|
|
176
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
177
|
+
|
|
178
|
+
const mem = getUint8ArrayMemory0();
|
|
179
|
+
|
|
180
|
+
let offset = 0;
|
|
181
|
+
|
|
182
|
+
for (; offset < len; offset++) {
|
|
183
|
+
const code = arg.charCodeAt(offset);
|
|
184
|
+
if (code > 0x7F) break;
|
|
185
|
+
mem[ptr + offset] = code;
|
|
186
|
+
}
|
|
187
|
+
if (offset !== len) {
|
|
188
|
+
if (offset !== 0) {
|
|
189
|
+
arg = arg.slice(offset);
|
|
190
|
+
}
|
|
191
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
192
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
193
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
194
|
+
|
|
195
|
+
offset += ret.written;
|
|
196
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
WASM_VECTOR_LEN = offset;
|
|
200
|
+
return ptr;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function takeObject(idx) {
|
|
204
|
+
const ret = getObject(idx);
|
|
205
|
+
dropObject(idx);
|
|
206
|
+
return ret;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
210
|
+
cachedTextDecoder.decode();
|
|
211
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
212
|
+
let numBytesDecoded = 0;
|
|
213
|
+
function decodeText(ptr, len) {
|
|
214
|
+
numBytesDecoded += len;
|
|
215
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
216
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
217
|
+
cachedTextDecoder.decode();
|
|
218
|
+
numBytesDecoded = len;
|
|
219
|
+
}
|
|
220
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const cachedTextEncoder = new TextEncoder();
|
|
224
|
+
|
|
225
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
226
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
227
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
228
|
+
view.set(buf);
|
|
229
|
+
return {
|
|
230
|
+
read: arg.length,
|
|
231
|
+
written: buf.length
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
let WASM_VECTOR_LEN = 0;
|
|
237
|
+
|
|
238
|
+
function __wasm_bindgen_func_elem_3024(arg0, arg1, arg2) {
|
|
239
|
+
wasm.__wasm_bindgen_func_elem_3024(arg0, arg1, addHeapObject(arg2));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function __wasm_bindgen_func_elem_827(arg0, arg1, arg2, arg3) {
|
|
243
|
+
wasm.__wasm_bindgen_func_elem_827(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const ConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
247
|
+
? { register: () => {}, unregister: () => {} }
|
|
248
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_conversionoptions_free(ptr >>> 0, 1));
|
|
249
|
+
|
|
250
|
+
const RunOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
251
|
+
? { register: () => {}, unregister: () => {} }
|
|
252
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_runoptions_free(ptr >>> 0, 1));
|
|
253
|
+
|
|
254
|
+
export class ConversionOptions {
|
|
255
|
+
__destroy_into_raw() {
|
|
256
|
+
const ptr = this.__wbg_ptr;
|
|
257
|
+
this.__wbg_ptr = 0;
|
|
258
|
+
ConversionOptionsFinalization.unregister(this);
|
|
259
|
+
return ptr;
|
|
260
|
+
}
|
|
261
|
+
free() {
|
|
262
|
+
const ptr = this.__destroy_into_raw();
|
|
263
|
+
wasm.__wbg_conversionoptions_free(ptr, 0);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* @returns {boolean}
|
|
267
|
+
*/
|
|
268
|
+
get extract_scripts_as_code_blocks() {
|
|
269
|
+
const ret = wasm.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr);
|
|
270
|
+
return ret !== 0;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* @param {boolean} arg0
|
|
274
|
+
*/
|
|
275
|
+
set extract_scripts_as_code_blocks(arg0) {
|
|
276
|
+
wasm.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr, arg0);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @returns {boolean}
|
|
280
|
+
*/
|
|
281
|
+
get generate_front_matter() {
|
|
282
|
+
const ret = wasm.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr);
|
|
283
|
+
return ret !== 0;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* @param {boolean} arg0
|
|
287
|
+
*/
|
|
288
|
+
set generate_front_matter(arg0) {
|
|
289
|
+
wasm.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr, arg0);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* @returns {boolean}
|
|
293
|
+
*/
|
|
294
|
+
get use_title_as_h1() {
|
|
295
|
+
const ret = wasm.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr);
|
|
296
|
+
return ret !== 0;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* @param {boolean} arg0
|
|
300
|
+
*/
|
|
301
|
+
set use_title_as_h1(arg0) {
|
|
302
|
+
wasm.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr, arg0);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
if (Symbol.dispose) ConversionOptions.prototype[Symbol.dispose] = ConversionOptions.prototype.free;
|
|
306
|
+
|
|
307
|
+
export class RunOptions {
|
|
308
|
+
__destroy_into_raw() {
|
|
309
|
+
const ptr = this.__wbg_ptr;
|
|
310
|
+
this.__wbg_ptr = 0;
|
|
311
|
+
RunOptionsFinalization.unregister(this);
|
|
312
|
+
return ptr;
|
|
313
|
+
}
|
|
314
|
+
free() {
|
|
315
|
+
const ptr = this.__destroy_into_raw();
|
|
316
|
+
wasm.__wbg_runoptions_free(ptr, 0);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (Symbol.dispose) RunOptions.prototype[Symbol.dispose] = RunOptions.prototype.free;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @param {string} code
|
|
323
|
+
* @param {string | null} [module]
|
|
324
|
+
* @returns {Promise<any>}
|
|
325
|
+
*/
|
|
326
|
+
export function definedValues(code, module) {
|
|
327
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
328
|
+
const len0 = WASM_VECTOR_LEN;
|
|
329
|
+
var ptr1 = isLikeNone(module) ? 0 : passStringToWasm0(module, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
330
|
+
var len1 = WASM_VECTOR_LEN;
|
|
331
|
+
const ret = wasm.definedValues(ptr0, len0, ptr1, len1);
|
|
332
|
+
return takeObject(ret);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* @param {string} code
|
|
337
|
+
* @returns {Promise<any>}
|
|
338
|
+
*/
|
|
339
|
+
export function diagnostics(code) {
|
|
340
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
341
|
+
const len0 = WASM_VECTOR_LEN;
|
|
342
|
+
const ret = wasm.diagnostics(ptr0, len0);
|
|
343
|
+
return takeObject(ret);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @param {string} code
|
|
348
|
+
* @returns {Promise<string>}
|
|
349
|
+
*/
|
|
350
|
+
export function format(code) {
|
|
351
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
352
|
+
const len0 = WASM_VECTOR_LEN;
|
|
353
|
+
const ret = wasm.format(ptr0, len0);
|
|
354
|
+
return takeObject(ret);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @param {string} html_input
|
|
359
|
+
* @param {ConversionOptions | null} [options]
|
|
360
|
+
* @returns {Promise<string>}
|
|
361
|
+
*/
|
|
362
|
+
export function htmlToMarkdown(html_input, options) {
|
|
363
|
+
const ptr0 = passStringToWasm0(html_input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
364
|
+
const len0 = WASM_VECTOR_LEN;
|
|
365
|
+
let ptr1 = 0;
|
|
366
|
+
if (!isLikeNone(options)) {
|
|
367
|
+
_assertClass(options, ConversionOptions);
|
|
368
|
+
ptr1 = options.__destroy_into_raw();
|
|
369
|
+
}
|
|
370
|
+
const ret = wasm.htmlToMarkdown(ptr0, len0, ptr1);
|
|
371
|
+
return takeObject(ret);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @param {string} code
|
|
376
|
+
* @param {string} content
|
|
377
|
+
* @param {any} options
|
|
378
|
+
* @returns {Promise<string>}
|
|
379
|
+
*/
|
|
380
|
+
export function run(code, content, options) {
|
|
381
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
382
|
+
const len0 = WASM_VECTOR_LEN;
|
|
383
|
+
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
384
|
+
const len1 = WASM_VECTOR_LEN;
|
|
385
|
+
const ret = wasm.run(ptr0, len0, ptr1, len1, addHeapObject(options));
|
|
386
|
+
return takeObject(ret);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* @param {string} code
|
|
391
|
+
* @returns {Promise<string>}
|
|
392
|
+
*/
|
|
393
|
+
export function toAst(code) {
|
|
394
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
395
|
+
const len0 = WASM_VECTOR_LEN;
|
|
396
|
+
const ret = wasm.toAst(ptr0, len0);
|
|
397
|
+
return takeObject(ret);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @param {string} markdown_input
|
|
402
|
+
* @returns {Promise<string>}
|
|
403
|
+
*/
|
|
404
|
+
export function toHtml(markdown_input) {
|
|
405
|
+
const ptr0 = passStringToWasm0(markdown_input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.toHtml(ptr0, len0);
|
|
408
|
+
return takeObject(ret);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
412
|
+
|
|
413
|
+
async function __wbg_load(module, imports) {
|
|
414
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
415
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
416
|
+
try {
|
|
417
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
418
|
+
} catch (e) {
|
|
419
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
420
|
+
|
|
421
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
422
|
+
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);
|
|
423
|
+
|
|
424
|
+
} else {
|
|
425
|
+
throw e;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
const bytes = await module.arrayBuffer();
|
|
431
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
432
|
+
} else {
|
|
433
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
434
|
+
|
|
435
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
436
|
+
return { instance, module };
|
|
437
|
+
} else {
|
|
438
|
+
return instance;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
function __wbg_get_imports() {
|
|
444
|
+
const imports = {};
|
|
445
|
+
imports.wbg = {};
|
|
446
|
+
imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
447
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
448
|
+
return addHeapObject(ret);
|
|
449
|
+
};
|
|
450
|
+
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
451
|
+
const ret = String(getObject(arg1));
|
|
452
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
453
|
+
const len1 = WASM_VECTOR_LEN;
|
|
454
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
455
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
456
|
+
};
|
|
457
|
+
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
458
|
+
const v = getObject(arg0);
|
|
459
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
460
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
461
|
+
};
|
|
462
|
+
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
463
|
+
const ret = debugString(getObject(arg1));
|
|
464
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
465
|
+
const len1 = WASM_VECTOR_LEN;
|
|
466
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
467
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
468
|
+
};
|
|
469
|
+
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
470
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
471
|
+
return ret;
|
|
472
|
+
};
|
|
473
|
+
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
474
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
475
|
+
return ret;
|
|
476
|
+
};
|
|
477
|
+
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
478
|
+
const val = getObject(arg0);
|
|
479
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
480
|
+
return ret;
|
|
481
|
+
};
|
|
482
|
+
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
483
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
484
|
+
return ret;
|
|
485
|
+
};
|
|
486
|
+
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
487
|
+
const ret = getObject(arg0) === undefined;
|
|
488
|
+
return ret;
|
|
489
|
+
};
|
|
490
|
+
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
491
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
492
|
+
return ret;
|
|
493
|
+
};
|
|
494
|
+
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
495
|
+
const obj = getObject(arg1);
|
|
496
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
497
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
498
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
499
|
+
};
|
|
500
|
+
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
501
|
+
const obj = getObject(arg1);
|
|
502
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
503
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
504
|
+
var len1 = WASM_VECTOR_LEN;
|
|
505
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
506
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
507
|
+
};
|
|
508
|
+
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
509
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
510
|
+
};
|
|
511
|
+
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
512
|
+
getObject(arg0)._wbg_cb_unref();
|
|
513
|
+
};
|
|
514
|
+
imports.wbg.__wbg_arrayBuffer_3356d392ef2d2aa9 = function(arg0) {
|
|
515
|
+
const ret = getObject(arg0).arrayBuffer();
|
|
516
|
+
return addHeapObject(ret);
|
|
517
|
+
};
|
|
518
|
+
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
519
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
520
|
+
return addHeapObject(ret);
|
|
521
|
+
}, arguments) };
|
|
522
|
+
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
523
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
524
|
+
return addHeapObject(ret);
|
|
525
|
+
}, arguments) };
|
|
526
|
+
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
527
|
+
const ret = getObject(arg0).done;
|
|
528
|
+
return ret;
|
|
529
|
+
};
|
|
530
|
+
imports.wbg.__wbg_entries_7de5c9edd116e219 = function(arg0) {
|
|
531
|
+
const ret = getObject(arg0).entries();
|
|
532
|
+
return addHeapObject(ret);
|
|
533
|
+
};
|
|
534
|
+
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
535
|
+
const ret = Object.entries(getObject(arg0));
|
|
536
|
+
return addHeapObject(ret);
|
|
537
|
+
};
|
|
538
|
+
imports.wbg.__wbg_from_29a8414a7a7cd19d = function(arg0) {
|
|
539
|
+
const ret = Array.from(getObject(arg0));
|
|
540
|
+
return addHeapObject(ret);
|
|
541
|
+
};
|
|
542
|
+
imports.wbg.__wbg_getDirectory_9beed6c83b6861f5 = function(arg0) {
|
|
543
|
+
const ret = getObject(arg0).getDirectory();
|
|
544
|
+
return addHeapObject(ret);
|
|
545
|
+
};
|
|
546
|
+
imports.wbg.__wbg_getFile_3d12eaf635641f3a = function(arg0) {
|
|
547
|
+
const ret = getObject(arg0).getFile();
|
|
548
|
+
return addHeapObject(ret);
|
|
549
|
+
};
|
|
550
|
+
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
551
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
552
|
+
return addHeapObject(ret);
|
|
553
|
+
};
|
|
554
|
+
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
555
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
556
|
+
return addHeapObject(ret);
|
|
557
|
+
};
|
|
558
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
559
|
+
let result;
|
|
560
|
+
try {
|
|
561
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
562
|
+
} catch (_) {
|
|
563
|
+
result = false;
|
|
564
|
+
}
|
|
565
|
+
const ret = result;
|
|
566
|
+
return ret;
|
|
567
|
+
};
|
|
568
|
+
imports.wbg.__wbg_instanceof_FileSystemDirectoryHandle_264085cadc86679a = function(arg0) {
|
|
569
|
+
let result;
|
|
570
|
+
try {
|
|
571
|
+
result = getObject(arg0) instanceof FileSystemDirectoryHandle;
|
|
572
|
+
} catch (_) {
|
|
573
|
+
result = false;
|
|
574
|
+
}
|
|
575
|
+
const ret = result;
|
|
576
|
+
return ret;
|
|
577
|
+
};
|
|
578
|
+
imports.wbg.__wbg_instanceof_FileSystemFileHandle_214d69e0ae063fc8 = function(arg0) {
|
|
579
|
+
let result;
|
|
580
|
+
try {
|
|
581
|
+
result = getObject(arg0) instanceof FileSystemFileHandle;
|
|
582
|
+
} catch (_) {
|
|
583
|
+
result = false;
|
|
584
|
+
}
|
|
585
|
+
const ret = result;
|
|
586
|
+
return ret;
|
|
587
|
+
};
|
|
588
|
+
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
589
|
+
let result;
|
|
590
|
+
try {
|
|
591
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
592
|
+
} catch (_) {
|
|
593
|
+
result = false;
|
|
594
|
+
}
|
|
595
|
+
const ret = result;
|
|
596
|
+
return ret;
|
|
597
|
+
};
|
|
598
|
+
imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
|
|
599
|
+
let result;
|
|
600
|
+
try {
|
|
601
|
+
result = getObject(arg0) instanceof Window;
|
|
602
|
+
} catch (_) {
|
|
603
|
+
result = false;
|
|
604
|
+
}
|
|
605
|
+
const ret = result;
|
|
606
|
+
return ret;
|
|
607
|
+
};
|
|
608
|
+
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
609
|
+
const ret = getObject(arg0).length;
|
|
610
|
+
return ret;
|
|
611
|
+
};
|
|
612
|
+
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
613
|
+
const ret = getObject(arg0).length;
|
|
614
|
+
return ret;
|
|
615
|
+
};
|
|
616
|
+
imports.wbg.__wbg_navigator_b49edef831236138 = function(arg0) {
|
|
617
|
+
const ret = getObject(arg0).navigator;
|
|
618
|
+
return addHeapObject(ret);
|
|
619
|
+
};
|
|
620
|
+
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
621
|
+
const ret = new Object();
|
|
622
|
+
return addHeapObject(ret);
|
|
623
|
+
};
|
|
624
|
+
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
625
|
+
const ret = new Array();
|
|
626
|
+
return addHeapObject(ret);
|
|
627
|
+
};
|
|
628
|
+
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
629
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
630
|
+
return addHeapObject(ret);
|
|
631
|
+
};
|
|
632
|
+
imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
633
|
+
try {
|
|
634
|
+
var state0 = {a: arg0, b: arg1};
|
|
635
|
+
var cb0 = (arg0, arg1) => {
|
|
636
|
+
const a = state0.a;
|
|
637
|
+
state0.a = 0;
|
|
638
|
+
try {
|
|
639
|
+
return __wasm_bindgen_func_elem_827(a, state0.b, arg0, arg1);
|
|
640
|
+
} finally {
|
|
641
|
+
state0.a = a;
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
const ret = new Promise(cb0);
|
|
645
|
+
return addHeapObject(ret);
|
|
646
|
+
} finally {
|
|
647
|
+
state0.a = state0.b = 0;
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
651
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
652
|
+
return addHeapObject(ret);
|
|
653
|
+
};
|
|
654
|
+
imports.wbg.__wbg_next_b34c09a202bf4424 = function() { return handleError(function (arg0) {
|
|
655
|
+
const ret = getObject(arg0).next();
|
|
656
|
+
return addHeapObject(ret);
|
|
657
|
+
}, arguments) };
|
|
658
|
+
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
659
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
660
|
+
};
|
|
661
|
+
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
662
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
663
|
+
return addHeapObject(ret);
|
|
664
|
+
};
|
|
665
|
+
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
666
|
+
queueMicrotask(getObject(arg0));
|
|
667
|
+
};
|
|
668
|
+
imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
669
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
670
|
+
return addHeapObject(ret);
|
|
671
|
+
};
|
|
672
|
+
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
673
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
674
|
+
};
|
|
675
|
+
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
676
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
677
|
+
};
|
|
678
|
+
imports.wbg.__wbg_size_82fbdb656de23326 = function(arg0) {
|
|
679
|
+
const ret = getObject(arg0).size;
|
|
680
|
+
return ret;
|
|
681
|
+
};
|
|
682
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
683
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
684
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
685
|
+
};
|
|
686
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
687
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
688
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
689
|
+
};
|
|
690
|
+
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
691
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
692
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
693
|
+
};
|
|
694
|
+
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
695
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
696
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
697
|
+
};
|
|
698
|
+
imports.wbg.__wbg_storage_b04c3b736f10dd3b = function(arg0) {
|
|
699
|
+
const ret = getObject(arg0).storage;
|
|
700
|
+
return addHeapObject(ret);
|
|
701
|
+
};
|
|
702
|
+
imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
703
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
704
|
+
return addHeapObject(ret);
|
|
705
|
+
};
|
|
706
|
+
imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
707
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
708
|
+
return addHeapObject(ret);
|
|
709
|
+
};
|
|
710
|
+
imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
711
|
+
const ret = getObject(arg0).value;
|
|
712
|
+
return addHeapObject(ret);
|
|
713
|
+
};
|
|
714
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
715
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
716
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
717
|
+
return addHeapObject(ret);
|
|
718
|
+
};
|
|
719
|
+
imports.wbg.__wbindgen_cast_29480d6a48b8e833 = function(arg0, arg1) {
|
|
720
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 286, function: Function { arguments: [Externref], shim_idx: 287, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
721
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3023, __wasm_bindgen_func_elem_3024);
|
|
722
|
+
return addHeapObject(ret);
|
|
723
|
+
};
|
|
724
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
725
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
726
|
+
const ret = arg0;
|
|
727
|
+
return addHeapObject(ret);
|
|
728
|
+
};
|
|
729
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
730
|
+
const ret = getObject(arg0);
|
|
731
|
+
return addHeapObject(ret);
|
|
732
|
+
};
|
|
733
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
734
|
+
takeObject(arg0);
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
return imports;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
function __wbg_finalize_init(instance, module) {
|
|
741
|
+
wasm = instance.exports;
|
|
742
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
743
|
+
cachedDataViewMemory0 = null;
|
|
744
|
+
cachedUint8ArrayMemory0 = null;
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
return wasm;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
function initSync(module) {
|
|
752
|
+
if (wasm !== undefined) return wasm;
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
if (typeof module !== 'undefined') {
|
|
756
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
757
|
+
({module} = module)
|
|
758
|
+
} else {
|
|
759
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
const imports = __wbg_get_imports();
|
|
764
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
765
|
+
module = new WebAssembly.Module(module);
|
|
766
|
+
}
|
|
767
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
768
|
+
return __wbg_finalize_init(instance, module);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
async function __wbg_init(module_or_path) {
|
|
772
|
+
if (wasm !== undefined) return wasm;
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
if (typeof module_or_path !== 'undefined') {
|
|
776
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
777
|
+
({module_or_path} = module_or_path)
|
|
778
|
+
} else {
|
|
779
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
if (typeof module_or_path === 'undefined') {
|
|
784
|
+
module_or_path = new URL('mq_wasm_bg.wasm', import.meta.url);
|
|
785
|
+
}
|
|
786
|
+
const imports = __wbg_get_imports();
|
|
787
|
+
|
|
788
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
789
|
+
module_or_path = fetch(module_or_path);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
793
|
+
|
|
794
|
+
return __wbg_finalize_init(instance, module);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export { initSync };
|
|
798
|
+
export default __wbg_init;
|