1668 lines
57 KiB
JavaScript
1668 lines
57 KiB
JavaScript
let wasm;
|
|
|
|
const heap = new Array(128).fill(undefined);
|
|
|
|
heap.push(undefined, null, true, false);
|
|
|
|
function getObject(idx) { return heap[idx]; }
|
|
|
|
let heap_next = heap.length;
|
|
|
|
function dropObject(idx) {
|
|
if (idx < 132) return;
|
|
heap[idx] = heap_next;
|
|
heap_next = idx;
|
|
}
|
|
|
|
function takeObject(idx) {
|
|
const ret = getObject(idx);
|
|
dropObject(idx);
|
|
return ret;
|
|
}
|
|
|
|
let WASM_VECTOR_LEN = 0;
|
|
|
|
let cachedUint8Memory0 = null;
|
|
|
|
function getUint8Memory0() {
|
|
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
}
|
|
return cachedUint8Memory0;
|
|
}
|
|
|
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
|
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
? function (arg, view) {
|
|
return cachedTextEncoder.encodeInto(arg, view);
|
|
}
|
|
: function (arg, view) {
|
|
const buf = cachedTextEncoder.encode(arg);
|
|
view.set(buf);
|
|
return {
|
|
read: arg.length,
|
|
written: buf.length
|
|
};
|
|
});
|
|
|
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
|
|
if (realloc === undefined) {
|
|
const buf = cachedTextEncoder.encode(arg);
|
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
WASM_VECTOR_LEN = buf.length;
|
|
return ptr;
|
|
}
|
|
|
|
let len = arg.length;
|
|
let ptr = malloc(len, 1) >>> 0;
|
|
|
|
const mem = getUint8Memory0();
|
|
|
|
let offset = 0;
|
|
|
|
for (; offset < len; offset++) {
|
|
const code = arg.charCodeAt(offset);
|
|
if (code > 0x7F) break;
|
|
mem[ptr + offset] = code;
|
|
}
|
|
|
|
if (offset !== len) {
|
|
if (offset !== 0) {
|
|
arg = arg.slice(offset);
|
|
}
|
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
const ret = encodeString(arg, view);
|
|
|
|
offset += ret.written;
|
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
}
|
|
|
|
WASM_VECTOR_LEN = offset;
|
|
return ptr;
|
|
}
|
|
|
|
function isLikeNone(x) {
|
|
return x === undefined || x === null;
|
|
}
|
|
|
|
let cachedInt32Memory0 = null;
|
|
|
|
function getInt32Memory0() {
|
|
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
}
|
|
return cachedInt32Memory0;
|
|
}
|
|
|
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
|
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
|
|
function getStringFromWasm0(ptr, len) {
|
|
ptr = ptr >>> 0;
|
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
}
|
|
|
|
function addHeapObject(obj) {
|
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
const idx = heap_next;
|
|
heap_next = heap[idx];
|
|
|
|
heap[idx] = obj;
|
|
return idx;
|
|
}
|
|
|
|
function debugString(val) {
|
|
// primitive types
|
|
const type = typeof val;
|
|
if (type == 'number' || type == 'boolean' || val == null) {
|
|
return `${val}`;
|
|
}
|
|
if (type == 'string') {
|
|
return `"${val}"`;
|
|
}
|
|
if (type == 'symbol') {
|
|
const description = val.description;
|
|
if (description == null) {
|
|
return 'Symbol';
|
|
} else {
|
|
return `Symbol(${description})`;
|
|
}
|
|
}
|
|
if (type == 'function') {
|
|
const name = val.name;
|
|
if (typeof name == 'string' && name.length > 0) {
|
|
return `Function(${name})`;
|
|
} else {
|
|
return 'Function';
|
|
}
|
|
}
|
|
// objects
|
|
if (Array.isArray(val)) {
|
|
const length = val.length;
|
|
let debug = '[';
|
|
if (length > 0) {
|
|
debug += debugString(val[0]);
|
|
}
|
|
for(let i = 1; i < length; i++) {
|
|
debug += ', ' + debugString(val[i]);
|
|
}
|
|
debug += ']';
|
|
return debug;
|
|
}
|
|
// Test for built-in
|
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
let className;
|
|
if (builtInMatches.length > 1) {
|
|
className = builtInMatches[1];
|
|
} else {
|
|
// Failed to match the standard '[object ClassName]'
|
|
return toString.call(val);
|
|
}
|
|
if (className == 'Object') {
|
|
// we're a user defined class or Object
|
|
// JSON.stringify avoids problems with cycles, and is generally much
|
|
// easier than looping through ownProperties of `val`.
|
|
try {
|
|
return 'Object(' + JSON.stringify(val) + ')';
|
|
} catch (_) {
|
|
return 'Object';
|
|
}
|
|
}
|
|
// errors
|
|
if (val instanceof Error) {
|
|
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
}
|
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
return className;
|
|
}
|
|
|
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
? { register: () => {}, unregister: () => {} }
|
|
: new FinalizationRegistry(state => {
|
|
wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
|
|
});
|
|
|
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
const real = (...args) => {
|
|
// First up with a closure we increment the internal reference
|
|
// count. This ensures that the Rust closure environment won't
|
|
// be deallocated while we're invoking it.
|
|
state.cnt++;
|
|
const a = state.a;
|
|
state.a = 0;
|
|
try {
|
|
return f(a, state.b, ...args);
|
|
} finally {
|
|
if (--state.cnt === 0) {
|
|
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
CLOSURE_DTORS.unregister(state);
|
|
} else {
|
|
state.a = a;
|
|
}
|
|
}
|
|
};
|
|
real.original = state;
|
|
CLOSURE_DTORS.register(real, state, state);
|
|
return real;
|
|
}
|
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h441a9e3e174bc8f1(arg0, arg1, addHeapObject(arg2));
|
|
}
|
|
|
|
/**
|
|
* @param {string} json
|
|
* @returns {string}
|
|
*/
|
|
export function toml_stringify(json) {
|
|
let deferred3_0;
|
|
let deferred3_1;
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.toml_stringify(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
var ptr2 = r0;
|
|
var len2 = r1;
|
|
if (r3) {
|
|
ptr2 = 0; len2 = 0;
|
|
throw takeObject(r2);
|
|
}
|
|
deferred3_0 = ptr2;
|
|
deferred3_1 = len2;
|
|
return getStringFromWasm0(ptr2, len2);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param {string} program_str
|
|
* @param {string} memory_str
|
|
* @param {string} units
|
|
* @param {any} engine_manager
|
|
* @param {any} fs_manager
|
|
* @param {boolean} is_mock
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export function execute_wasm(program_str, memory_str, units, engine_manager, fs_manager, is_mock) {
|
|
const ptr0 = passStringToWasm0(program_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
const ptr1 = passStringToWasm0(memory_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
const ptr2 = passStringToWasm0(units, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len2 = WASM_VECTOR_LEN;
|
|
const ret = wasm.execute_wasm(ptr0, len0, ptr1, len1, ptr2, len2, addHeapObject(engine_manager), addHeapObject(fs_manager), is_mock);
|
|
return takeObject(ret);
|
|
}
|
|
|
|
/**
|
|
* @param {string} program_str
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export function kcl_lint(program_str) {
|
|
const ptr0 = passStringToWasm0(program_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
const ret = wasm.kcl_lint(ptr0, len0);
|
|
return takeObject(ret);
|
|
}
|
|
|
|
/**
|
|
* @param {any} engine_manager
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export function make_default_planes(engine_manager) {
|
|
const ret = wasm.make_default_planes(addHeapObject(engine_manager));
|
|
return takeObject(ret);
|
|
}
|
|
|
|
/**
|
|
* @param {any} engine_manager
|
|
* @param {boolean} hidden
|
|
* @returns {Promise<void>}
|
|
*/
|
|
export function modify_grid(engine_manager, hidden) {
|
|
const ret = wasm.modify_grid(addHeapObject(engine_manager), hidden);
|
|
return takeObject(ret);
|
|
}
|
|
|
|
/**
|
|
* @param {any} manager
|
|
* @param {string} program_str
|
|
* @param {string} sketch_name
|
|
* @param {string} plane_type
|
|
* @param {string} sketch_id
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export function modify_ast_for_sketch_wasm(manager, program_str, sketch_name, plane_type, sketch_id) {
|
|
const ptr0 = passStringToWasm0(program_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
const ptr1 = passStringToWasm0(sketch_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
const ptr2 = passStringToWasm0(plane_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len2 = WASM_VECTOR_LEN;
|
|
const ptr3 = passStringToWasm0(sketch_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len3 = WASM_VECTOR_LEN;
|
|
const ret = wasm.modify_ast_for_sketch_wasm(addHeapObject(manager), ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
return takeObject(ret);
|
|
}
|
|
|
|
function passArray8ToWasm0(arg, malloc) {
|
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
getUint8Memory0().set(arg, ptr / 1);
|
|
WASM_VECTOR_LEN = arg.length;
|
|
return ptr;
|
|
}
|
|
/**
|
|
* @param {Uint8Array} data
|
|
* @returns {any}
|
|
*/
|
|
export function deserialize_files(data) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.deserialize_files(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param {string} js
|
|
* @returns {any}
|
|
*/
|
|
export function lexer_wasm(js) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passStringToWasm0(js, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.lexer_wasm(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param {string} js
|
|
* @returns {any}
|
|
*/
|
|
export function parse_wasm(js) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passStringToWasm0(js, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.parse_wasm(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param {string} json_str
|
|
* @returns {any}
|
|
*/
|
|
export function recast_wasm(json_str) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passStringToWasm0(json_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.recast_wasm(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
function _assertClass(instance, klass) {
|
|
if (!(instance instanceof klass)) {
|
|
throw new Error(`expected instance of ${klass.name}`);
|
|
}
|
|
return instance.ptr;
|
|
}
|
|
/**
|
|
* Run the `kcl` lsp server.
|
|
* @param {ServerConfig} config
|
|
* @param {any | undefined} engine_manager
|
|
* @param {string} units
|
|
* @param {string} token
|
|
* @param {string} baseurl
|
|
* @returns {Promise<void>}
|
|
*/
|
|
export function kcl_lsp_run(config, engine_manager, units, token, baseurl) {
|
|
_assertClass(config, ServerConfig);
|
|
var ptr0 = config.__destroy_into_raw();
|
|
const ptr1 = passStringToWasm0(units, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
const ptr2 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len2 = WASM_VECTOR_LEN;
|
|
const ptr3 = passStringToWasm0(baseurl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len3 = WASM_VECTOR_LEN;
|
|
const ret = wasm.kcl_lsp_run(ptr0, isLikeNone(engine_manager) ? 0 : addHeapObject(engine_manager), ptr1, len1, ptr2, len2, ptr3, len3);
|
|
return takeObject(ret);
|
|
}
|
|
|
|
/**
|
|
* Run the `copilot` lsp server.
|
|
* @param {ServerConfig} config
|
|
* @param {string} token
|
|
* @param {string} baseurl
|
|
* @returns {Promise<void>}
|
|
*/
|
|
export function copilot_lsp_run(config, token, baseurl) {
|
|
_assertClass(config, ServerConfig);
|
|
var ptr0 = config.__destroy_into_raw();
|
|
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
const ptr2 = passStringToWasm0(baseurl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len2 = WASM_VECTOR_LEN;
|
|
const ret = wasm.copilot_lsp_run(ptr0, ptr1, len1, ptr2, len2);
|
|
return takeObject(ret);
|
|
}
|
|
|
|
let cachedFloat64Memory0 = null;
|
|
|
|
function getFloat64Memory0() {
|
|
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
}
|
|
return cachedFloat64Memory0;
|
|
}
|
|
|
|
function passArrayF64ToWasm0(arg, malloc) {
|
|
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
getFloat64Memory0().set(arg, ptr / 8);
|
|
WASM_VECTOR_LEN = arg.length;
|
|
return ptr;
|
|
}
|
|
/**
|
|
* @param {Float64Array} points
|
|
* @returns {number}
|
|
*/
|
|
export function is_points_ccw(points) {
|
|
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
const ret = wasm.is_points_ccw(ptr0, len0);
|
|
return ret;
|
|
}
|
|
|
|
/**
|
|
* @param {number} arc_start_point_x
|
|
* @param {number} arc_start_point_y
|
|
* @param {number} arc_end_point_x
|
|
* @param {number} arc_end_point_y
|
|
* @param {number} tan_previous_point_x
|
|
* @param {number} tan_previous_point_y
|
|
* @param {boolean} obtuse
|
|
* @returns {TangentialArcInfoOutputWasm}
|
|
*/
|
|
export function get_tangential_arc_to_info(arc_start_point_x, arc_start_point_y, arc_end_point_x, arc_end_point_y, tan_previous_point_x, tan_previous_point_y, obtuse) {
|
|
const ret = wasm.get_tangential_arc_to_info(arc_start_point_x, arc_start_point_y, arc_end_point_x, arc_end_point_y, tan_previous_point_x, tan_previous_point_y, obtuse);
|
|
return TangentialArcInfoOutputWasm.__wrap(ret);
|
|
}
|
|
|
|
/**
|
|
* Create the default program memory.
|
|
* @returns {any}
|
|
*/
|
|
export function program_memory_init() {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
wasm.program_memory_init(retptr);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Get a coredump.
|
|
* @param {any} core_dump_manager
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export function coredump(core_dump_manager) {
|
|
const ret = wasm.coredump(addHeapObject(core_dump_manager));
|
|
return takeObject(ret);
|
|
}
|
|
|
|
/**
|
|
* Get the default app settings.
|
|
* @returns {any}
|
|
*/
|
|
export function default_app_settings() {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
wasm.default_app_settings(retptr);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Parse the app settings.
|
|
* @param {string} toml_str
|
|
* @returns {any}
|
|
*/
|
|
export function parse_app_settings(toml_str) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passStringToWasm0(toml_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.parse_app_settings(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Get the default project settings.
|
|
* @returns {any}
|
|
*/
|
|
export function default_project_settings() {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
wasm.default_project_settings(retptr);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Parse (deserialize) the project settings.
|
|
* @param {string} toml_str
|
|
* @returns {any}
|
|
*/
|
|
export function parse_project_settings(toml_str) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passStringToWasm0(toml_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.parse_project_settings(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Serialize the project settings.
|
|
* @param {any} val
|
|
* @returns {any}
|
|
*/
|
|
export function serialize_project_settings(val) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
wasm.serialize_project_settings(retptr, addHeapObject(val));
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
if (r2) {
|
|
throw takeObject(r1);
|
|
}
|
|
return takeObject(r0);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
function getArrayU8FromWasm0(ptr, len) {
|
|
ptr = ptr >>> 0;
|
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
}
|
|
/**
|
|
* Base64 decode a string.
|
|
* @param {string} input
|
|
* @returns {Uint8Array}
|
|
*/
|
|
export function base64_decode(input) {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
wasm.base64_decode(retptr, ptr0, len0);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
if (r3) {
|
|
throw takeObject(r2);
|
|
}
|
|
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
return v2;
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
function handleError(f, args) {
|
|
try {
|
|
return f.apply(this, args);
|
|
} catch (e) {
|
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
}
|
|
}
|
|
function __wbg_adapter_234(arg0, arg1, arg2, arg3) {
|
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h38ba35493531eafd(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
}
|
|
|
|
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
? { register: () => {}, unregister: () => {} }
|
|
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0));
|
|
/**
|
|
*/
|
|
export class IntoUnderlyingByteSource {
|
|
|
|
__destroy_into_raw() {
|
|
const ptr = this.__wbg_ptr;
|
|
this.__wbg_ptr = 0;
|
|
IntoUnderlyingByteSourceFinalization.unregister(this);
|
|
return ptr;
|
|
}
|
|
|
|
free() {
|
|
const ptr = this.__destroy_into_raw();
|
|
wasm.__wbg_intounderlyingbytesource_free(ptr);
|
|
}
|
|
/**
|
|
* @returns {string}
|
|
*/
|
|
get type() {
|
|
let deferred1_0;
|
|
let deferred1_1;
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
wasm.intounderlyingbytesource_type(retptr, this.__wbg_ptr);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
deferred1_0 = r0;
|
|
deferred1_1 = r1;
|
|
return getStringFromWasm0(r0, r1);
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
}
|
|
}
|
|
/**
|
|
* @returns {number}
|
|
*/
|
|
get autoAllocateChunkSize() {
|
|
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
return ret >>> 0;
|
|
}
|
|
/**
|
|
* @param {ReadableByteStreamController} controller
|
|
*/
|
|
start(controller) {
|
|
wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
|
|
}
|
|
/**
|
|
* @param {ReadableByteStreamController} controller
|
|
* @returns {Promise<any>}
|
|
*/
|
|
pull(controller) {
|
|
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
|
|
return takeObject(ret);
|
|
}
|
|
/**
|
|
*/
|
|
cancel() {
|
|
const ptr = this.__destroy_into_raw();
|
|
wasm.intounderlyingbytesource_cancel(ptr);
|
|
}
|
|
}
|
|
|
|
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
? { register: () => {}, unregister: () => {} }
|
|
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0));
|
|
/**
|
|
*/
|
|
export class IntoUnderlyingSink {
|
|
|
|
__destroy_into_raw() {
|
|
const ptr = this.__wbg_ptr;
|
|
this.__wbg_ptr = 0;
|
|
IntoUnderlyingSinkFinalization.unregister(this);
|
|
return ptr;
|
|
}
|
|
|
|
free() {
|
|
const ptr = this.__destroy_into_raw();
|
|
wasm.__wbg_intounderlyingsink_free(ptr);
|
|
}
|
|
/**
|
|
* @param {any} chunk
|
|
* @returns {Promise<any>}
|
|
*/
|
|
write(chunk) {
|
|
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
|
|
return takeObject(ret);
|
|
}
|
|
/**
|
|
* @returns {Promise<any>}
|
|
*/
|
|
close() {
|
|
const ptr = this.__destroy_into_raw();
|
|
const ret = wasm.intounderlyingsink_close(ptr);
|
|
return takeObject(ret);
|
|
}
|
|
/**
|
|
* @param {any} reason
|
|
* @returns {Promise<any>}
|
|
*/
|
|
abort(reason) {
|
|
const ptr = this.__destroy_into_raw();
|
|
const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
|
|
return takeObject(ret);
|
|
}
|
|
}
|
|
|
|
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
? { register: () => {}, unregister: () => {} }
|
|
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0));
|
|
/**
|
|
*/
|
|
export class IntoUnderlyingSource {
|
|
|
|
__destroy_into_raw() {
|
|
const ptr = this.__wbg_ptr;
|
|
this.__wbg_ptr = 0;
|
|
IntoUnderlyingSourceFinalization.unregister(this);
|
|
return ptr;
|
|
}
|
|
|
|
free() {
|
|
const ptr = this.__destroy_into_raw();
|
|
wasm.__wbg_intounderlyingsource_free(ptr);
|
|
}
|
|
/**
|
|
* @param {ReadableStreamDefaultController} controller
|
|
* @returns {Promise<any>}
|
|
*/
|
|
pull(controller) {
|
|
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
|
|
return takeObject(ret);
|
|
}
|
|
/**
|
|
*/
|
|
cancel() {
|
|
const ptr = this.__destroy_into_raw();
|
|
wasm.intounderlyingsource_cancel(ptr);
|
|
}
|
|
}
|
|
|
|
const ServerConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
? { register: () => {}, unregister: () => {} }
|
|
: new FinalizationRegistry(ptr => wasm.__wbg_serverconfig_free(ptr >>> 0));
|
|
/**
|
|
*/
|
|
export class ServerConfig {
|
|
|
|
__destroy_into_raw() {
|
|
const ptr = this.__wbg_ptr;
|
|
this.__wbg_ptr = 0;
|
|
ServerConfigFinalization.unregister(this);
|
|
return ptr;
|
|
}
|
|
|
|
free() {
|
|
const ptr = this.__destroy_into_raw();
|
|
wasm.__wbg_serverconfig_free(ptr);
|
|
}
|
|
/**
|
|
* @param {AsyncIterator<any>} into_server
|
|
* @param {WritableStream} from_server
|
|
* @param {any} fs
|
|
*/
|
|
constructor(into_server, from_server, fs) {
|
|
const ret = wasm.serverconfig_new(addHeapObject(into_server), addHeapObject(from_server), addHeapObject(fs));
|
|
this.__wbg_ptr = ret >>> 0;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
const TangentialArcInfoOutputWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
? { register: () => {}, unregister: () => {} }
|
|
: new FinalizationRegistry(ptr => wasm.__wbg_tangentialarcinfooutputwasm_free(ptr >>> 0));
|
|
/**
|
|
*/
|
|
export class TangentialArcInfoOutputWasm {
|
|
|
|
static __wrap(ptr) {
|
|
ptr = ptr >>> 0;
|
|
const obj = Object.create(TangentialArcInfoOutputWasm.prototype);
|
|
obj.__wbg_ptr = ptr;
|
|
TangentialArcInfoOutputWasmFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
return obj;
|
|
}
|
|
|
|
__destroy_into_raw() {
|
|
const ptr = this.__wbg_ptr;
|
|
this.__wbg_ptr = 0;
|
|
TangentialArcInfoOutputWasmFinalization.unregister(this);
|
|
return ptr;
|
|
}
|
|
|
|
free() {
|
|
const ptr = this.__destroy_into_raw();
|
|
wasm.__wbg_tangentialarcinfooutputwasm_free(ptr);
|
|
}
|
|
/**
|
|
* The geometric center of the arc x.
|
|
* @returns {number}
|
|
*/
|
|
get center_x() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_center_x(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* The geometric center of the arc x.
|
|
* @param {number} arg0
|
|
*/
|
|
set center_x(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_center_x(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* The geometric center of the arc y.
|
|
* @returns {number}
|
|
*/
|
|
get center_y() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_center_y(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* The geometric center of the arc y.
|
|
* @param {number} arg0
|
|
*/
|
|
set center_y(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_center_y(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* The midpoint of the arc x.
|
|
* @returns {number}
|
|
*/
|
|
get arc_mid_point_x() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_arc_mid_point_x(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* The midpoint of the arc x.
|
|
* @param {number} arg0
|
|
*/
|
|
set arc_mid_point_x(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_arc_mid_point_x(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* The midpoint of the arc y.
|
|
* @returns {number}
|
|
*/
|
|
get arc_mid_point_y() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_arc_mid_point_y(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* The midpoint of the arc y.
|
|
* @param {number} arg0
|
|
*/
|
|
set arc_mid_point_y(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_arc_mid_point_y(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* The radius of the arc.
|
|
* @returns {number}
|
|
*/
|
|
get radius() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_radius(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* The radius of the arc.
|
|
* @param {number} arg0
|
|
*/
|
|
set radius(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_radius(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* Start angle of the arc in radians.
|
|
* @returns {number}
|
|
*/
|
|
get start_angle() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_start_angle(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* Start angle of the arc in radians.
|
|
* @param {number} arg0
|
|
*/
|
|
set start_angle(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_start_angle(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* End angle of the arc in radians.
|
|
* @returns {number}
|
|
*/
|
|
get end_angle() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_end_angle(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* End angle of the arc in radians.
|
|
* @param {number} arg0
|
|
*/
|
|
set end_angle(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_end_angle(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* Flag to determine if the arc is counter clockwise.
|
|
* @returns {number}
|
|
*/
|
|
get ccw() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_ccw(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* Flag to determine if the arc is counter clockwise.
|
|
* @param {number} arg0
|
|
*/
|
|
set ccw(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_ccw(this.__wbg_ptr, arg0);
|
|
}
|
|
/**
|
|
* The length of the arc.
|
|
* @returns {number}
|
|
*/
|
|
get arc_length() {
|
|
const ret = wasm.__wbg_get_tangentialarcinfooutputwasm_arc_length(this.__wbg_ptr);
|
|
return ret;
|
|
}
|
|
/**
|
|
* The length of the arc.
|
|
* @param {number} arg0
|
|
*/
|
|
set arc_length(arg0) {
|
|
wasm.__wbg_set_tangentialarcinfooutputwasm_arc_length(this.__wbg_ptr, arg0);
|
|
}
|
|
}
|
|
|
|
async function __wbg_load(module, imports) {
|
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
try {
|
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
|
|
} catch (e) {
|
|
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
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);
|
|
|
|
} else {
|
|
throw e;
|
|
}
|
|
}
|
|
}
|
|
|
|
const bytes = await module.arrayBuffer();
|
|
return await WebAssembly.instantiate(bytes, imports);
|
|
|
|
} else {
|
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
|
|
if (instance instanceof WebAssembly.Instance) {
|
|
return { instance, module };
|
|
|
|
} else {
|
|
return instance;
|
|
}
|
|
}
|
|
}
|
|
|
|
function __wbg_get_imports() {
|
|
const imports = {};
|
|
imports.wbg = {};
|
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
takeObject(arg0);
|
|
};
|
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
const obj = getObject(arg1);
|
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
};
|
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
const obj = takeObject(arg0).original;
|
|
if (obj.cnt-- == 1) {
|
|
obj.a = 0;
|
|
return true;
|
|
}
|
|
const ret = false;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
const ret = getObject(arg0) === undefined;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
const ret = new Error();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
const ret = getObject(arg1).stack;
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
};
|
|
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
let deferred0_0;
|
|
let deferred0_1;
|
|
try {
|
|
deferred0_0 = arg0;
|
|
deferred0_1 = arg1;
|
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
} finally {
|
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
}
|
|
};
|
|
imports.wbg.__wbg_authToken_6662366493f84bbd = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).authToken();
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_baseApiUrl_cd7531b650e04071 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).baseApiUrl();
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_version_76dcc6f7584894a1 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).version();
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_kclCode_3dd7c244069cea05 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).kclCode();
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_pool_8f5e41c1e16363b6 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).pool();
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getOsInfo_40b40129acd0c675 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).getOsInfo();
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_isDesktop_4539976cac1527ce = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).isDesktop();
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getWebrtcStats_bf5d4567a1577964 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).getWebrtcStats();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getClientState_f537c13788cd29b1 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).getClientState();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_screenshot_8b354a177a3619cb = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).screenshot();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
const ret = getObject(arg0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_wasmGetDefaultPlanes_30ea3ce9f4160083 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).wasmGetDefaultPlanes();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_clearDefaultPlanes_83937e41bf1759ee = function() { return handleError(function (arg0) {
|
|
getObject(arg0).clearDefaultPlanes();
|
|
}, arguments) };
|
|
imports.wbg.__wbg_startNewSession_aebe8bfd4a65fd33 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).startNewSession();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_sendModelingCommandFromWasm_6c7e7b53d52a0309 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
let deferred0_0;
|
|
let deferred0_1;
|
|
let deferred1_0;
|
|
let deferred1_1;
|
|
let deferred2_0;
|
|
let deferred2_1;
|
|
let deferred3_0;
|
|
let deferred3_1;
|
|
try {
|
|
deferred0_0 = arg1;
|
|
deferred0_1 = arg2;
|
|
deferred1_0 = arg3;
|
|
deferred1_1 = arg4;
|
|
deferred2_0 = arg5;
|
|
deferred2_1 = arg6;
|
|
deferred3_0 = arg7;
|
|
deferred3_1 = arg8;
|
|
const ret = getObject(arg0).sendModelingCommandFromWasm(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6), getStringFromWasm0(arg7, arg8));
|
|
return addHeapObject(ret);
|
|
} finally {
|
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
}
|
|
}, arguments) };
|
|
imports.wbg.__wbg_readFile_e49dda349149abc0 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
let deferred0_0;
|
|
let deferred0_1;
|
|
try {
|
|
deferred0_0 = arg1;
|
|
deferred0_1 = arg2;
|
|
const ret = getObject(arg0).readFile(getStringFromWasm0(arg1, arg2));
|
|
return addHeapObject(ret);
|
|
} finally {
|
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
}
|
|
}, arguments) };
|
|
imports.wbg.__wbg_exists_acffbefc6da89444 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
let deferred0_0;
|
|
let deferred0_1;
|
|
try {
|
|
deferred0_0 = arg1;
|
|
deferred0_1 = arg2;
|
|
const ret = getObject(arg0).exists(getStringFromWasm0(arg1, arg2));
|
|
return addHeapObject(ret);
|
|
} finally {
|
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
}
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getAllFiles_e0a18dd1cdd831b1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
let deferred0_0;
|
|
let deferred0_1;
|
|
try {
|
|
deferred0_0 = arg1;
|
|
deferred0_1 = arg2;
|
|
const ret = getObject(arg0).getAllFiles(getStringFromWasm0(arg1, arg2));
|
|
return addHeapObject(ret);
|
|
} finally {
|
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
}
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
const v = getObject(arg0);
|
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {
|
|
const ret = fetch(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
|
|
queueMicrotask(getObject(arg0));
|
|
};
|
|
imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
|
|
const ret = getObject(arg0).queueMicrotask;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_crypto_d05b68a3572bb8ca = function(arg0) {
|
|
const ret = getObject(arg0).crypto;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
const val = getObject(arg0);
|
|
const ret = typeof(val) === 'object' && val !== null;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_process_b02b3570280d0366 = function(arg0) {
|
|
const ret = getObject(arg0).process;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_versions_c1cb42213cedf0f5 = function(arg0) {
|
|
const ret = getObject(arg0).versions;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_node_43b1089f407e4ec2 = function(arg0) {
|
|
const ret = getObject(arg0).node;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_require_9a7e0f667ead4995 = function() { return handleError(function () {
|
|
const ret = module.require;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_msCrypto_10fc94afee92bd76 = function(arg0) {
|
|
const ret = getObject(arg0).msCrypto;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_randomFillSync_b70ccbdf4926a99d = function() { return handleError(function (arg0, arg1) {
|
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d = function() { return handleError(function (arg0, arg1) {
|
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {
|
|
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {
|
|
const ret = getObject(arg0).signal;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {
|
|
const ret = new AbortController();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {
|
|
getObject(arg0).abort();
|
|
};
|
|
imports.wbg.__wbg_close_a994f9425dab445c = function() { return handleError(function (arg0) {
|
|
getObject(arg0).close();
|
|
}, arguments) };
|
|
imports.wbg.__wbg_enqueue_ea194723156c0cc2 = function() { return handleError(function (arg0, arg1) {
|
|
getObject(arg0).enqueue(getObject(arg1));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_ready_2a66bc1809d7ed5c = function(arg0) {
|
|
const ret = getObject(arg0).ready;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_close_aa5e556ea5c0337f = function(arg0) {
|
|
const ret = getObject(arg0).close();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_releaseLock_6bbcfb877d412d49 = function(arg0) {
|
|
getObject(arg0).releaseLock();
|
|
};
|
|
imports.wbg.__wbg_write_0305cf168e5e805e = function(arg0, arg1) {
|
|
const ret = getObject(arg0).write(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_d4ab7daa4cb33d5f = function() { return handleError(function () {
|
|
const ret = new FormData();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_append_056476f73715b602 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_append_9fd018eae44ea54a = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3), getStringFromWasm0(arg4, arg5));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_append_9c9890ca2ce97dba = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getWriter_01ddb812f0418756 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).getWriter();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {
|
|
const ret = new Headers();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_view_7f0ce470793a340f = function(arg0) {
|
|
const ret = getObject(arg0).view;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_respond_b1a43b2e3a06d525 = function() { return handleError(function (arg0, arg1) {
|
|
getObject(arg0).respond(arg1 >>> 0);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_newwithu8arraysequenceandoptions_366f462e1b363808 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = new Blob(getObject(arg0), getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_byobRequest_72fca99f9c32c193 = function(arg0) {
|
|
const ret = getObject(arg0).byobRequest;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_close_184931724d961ccc = function() { return handleError(function (arg0) {
|
|
getObject(arg0).close();
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {
|
|
let result;
|
|
try {
|
|
result = getObject(arg0) instanceof Response;
|
|
} catch (_) {
|
|
result = false;
|
|
}
|
|
const ret = result;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {
|
|
const ret = getObject(arg1).url;
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
};
|
|
imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {
|
|
const ret = getObject(arg0).status;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {
|
|
const ret = getObject(arg0).headers;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_text_450a059667fd91fd = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).text();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
|
|
const ret = new Array();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
|
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
|
|
const ret = getObject(arg0).next;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).next();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
|
|
const ret = getObject(arg0).done;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
|
|
const ret = getObject(arg0).value;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
|
|
const ret = Symbol.iterator;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
|
|
const ret = new Object();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
const ret = self.self;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
|
|
const ret = window.window;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
|
|
const ret = globalThis.globalThis;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
|
|
const ret = global.global;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
|
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_new_28c511d9baebfa89 = function(arg0, arg1) {
|
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_toString_ffe4c9ea3b3532e9 = function(arg0) {
|
|
const ret = getObject(arg0).toString();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_next_a1c35169a4db2ac1 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).next();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getTime_2bc4375165f02d15 = function(arg0) {
|
|
const ret = getObject(arg0).getTime();
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_new0_7d84e5b2cd9fdc73 = function() {
|
|
const ret = new Date();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_toString_c816a20ab859d0c1 = function(arg0) {
|
|
const ret = getObject(arg0).toString();
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
try {
|
|
var state0 = {a: arg0, b: arg1};
|
|
var cb0 = (arg0, arg1) => {
|
|
const a = state0.a;
|
|
state0.a = 0;
|
|
try {
|
|
return __wbg_adapter_234(a, state0.b, arg0, arg1);
|
|
} finally {
|
|
state0.a = a;
|
|
}
|
|
};
|
|
const ret = new Promise(cb0);
|
|
return addHeapObject(ret);
|
|
} finally {
|
|
state0.a = state0.b = 0;
|
|
}
|
|
};
|
|
imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
|
|
const ret = Promise.resolve(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
|
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
|
|
const ret = getObject(arg0).buffer;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
|
|
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
|
|
const ret = new Uint8Array(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
|
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
};
|
|
imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
|
|
const ret = getObject(arg0).length;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
|
|
let result;
|
|
try {
|
|
result = getObject(arg0) instanceof Uint8Array;
|
|
} catch (_) {
|
|
result = false;
|
|
}
|
|
const ret = result;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
|
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_buffer_dd7f74bc60f1faab = function(arg0) {
|
|
const ret = getObject(arg0).buffer;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_byteLength_58f7b4fab1919d44 = function(arg0) {
|
|
const ret = getObject(arg0).byteLength;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_byteOffset_81d60f7392524f62 = function(arg0) {
|
|
const ret = getObject(arg0).byteOffset;
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_parse_66d1801634e099ac = function() { return handleError(function (arg0, arg1) {
|
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {
|
|
const ret = JSON.stringify(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
const ret = debugString(getObject(arg1));
|
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len1 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
};
|
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
};
|
|
imports.wbg.__wbindgen_memory = function() {
|
|
const ret = wasm.memory;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_closure_wrapper14419 = function(arg0, arg1, arg2) {
|
|
const ret = makeMutClosure(arg0, arg1, 5618, __wbg_adapter_30);
|
|
return addHeapObject(ret);
|
|
};
|
|
|
|
return imports;
|
|
}
|
|
|
|
function __wbg_init_memory(imports, maybe_memory) {
|
|
|
|
}
|
|
|
|
function __wbg_finalize_init(instance, module) {
|
|
wasm = instance.exports;
|
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
cachedFloat64Memory0 = null;
|
|
cachedInt32Memory0 = null;
|
|
cachedUint8Memory0 = null;
|
|
|
|
|
|
return wasm;
|
|
}
|
|
|
|
function initSync(module) {
|
|
if (wasm !== undefined) return wasm;
|
|
|
|
const imports = __wbg_get_imports();
|
|
|
|
__wbg_init_memory(imports);
|
|
|
|
if (!(module instanceof WebAssembly.Module)) {
|
|
module = new WebAssembly.Module(module);
|
|
}
|
|
|
|
const instance = new WebAssembly.Instance(module, imports);
|
|
|
|
return __wbg_finalize_init(instance, module);
|
|
}
|
|
|
|
async function __wbg_init(input) {
|
|
if (wasm !== undefined) return wasm;
|
|
|
|
if (typeof input === 'undefined') {
|
|
input = new URL('wasm_lib_bg.wasm', import.meta.url);
|
|
}
|
|
const imports = __wbg_get_imports();
|
|
|
|
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
input = fetch(input);
|
|
}
|
|
|
|
__wbg_init_memory(imports);
|
|
|
|
const { instance, module } = await __wbg_load(await input, imports);
|
|
|
|
return __wbg_finalize_init(instance, module);
|
|
}
|
|
|
|
export { initSync }
|
|
export default __wbg_init;
|