mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-24 04:57:00 +01:00
* working on debian builds again * github actions tweaks * fixed a ref in the build script * updating makefile targets to include build profile env * updates to docs and makefiles
936 lines
38 KiB
JavaScript
936 lines
38 KiB
JavaScript
import { modal_hide_by_id } from '/pkg/wasmloader.js';
|
|
|
|
let wasm;
|
|
|
|
const heap = new Array(32).fill(undefined);
|
|
|
|
heap.push(undefined, null, true, false);
|
|
|
|
function getObject(idx) { return heap[idx]; }
|
|
|
|
let WASM_VECTOR_LEN = 0;
|
|
|
|
let cachedUint8Memory0;
|
|
function getUint8Memory0() {
|
|
if (cachedUint8Memory0.byteLength === 0) {
|
|
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
}
|
|
return cachedUint8Memory0;
|
|
}
|
|
|
|
const cachedTextEncoder = new TextEncoder('utf-8');
|
|
|
|
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 (typeof(arg) !== 'string') throw new Error('expected a string argument');
|
|
|
|
if (realloc === undefined) {
|
|
const buf = cachedTextEncoder.encode(arg);
|
|
const ptr = malloc(buf.length);
|
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
WASM_VECTOR_LEN = buf.length;
|
|
return ptr;
|
|
}
|
|
|
|
let len = arg.length;
|
|
let ptr = malloc(len);
|
|
|
|
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);
|
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
const ret = encodeString(arg, view);
|
|
if (ret.read !== arg.length) throw new Error('failed to pass whole string');
|
|
offset += ret.written;
|
|
}
|
|
|
|
WASM_VECTOR_LEN = offset;
|
|
return ptr;
|
|
}
|
|
|
|
let cachedInt32Memory0;
|
|
function getInt32Memory0() {
|
|
if (cachedInt32Memory0.byteLength === 0) {
|
|
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
}
|
|
return cachedInt32Memory0;
|
|
}
|
|
|
|
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
|
|
cachedTextDecoder.decode();
|
|
|
|
function getStringFromWasm0(ptr, len) {
|
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
}
|
|
|
|
let heap_next = heap.length;
|
|
|
|
function addHeapObject(obj) {
|
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
const idx = heap_next;
|
|
heap_next = heap[idx];
|
|
|
|
if (typeof(heap_next) !== 'number') throw new Error('corrupt heap');
|
|
|
|
heap[idx] = obj;
|
|
return idx;
|
|
}
|
|
|
|
function isLikeNone(x) {
|
|
return x === undefined || x === null;
|
|
}
|
|
|
|
function _assertBoolean(n) {
|
|
if (typeof(n) !== 'boolean') {
|
|
throw new Error('expected a boolean argument');
|
|
}
|
|
}
|
|
|
|
function _assertNum(n) {
|
|
if (typeof(n) !== 'number') throw new Error('expected a number argument');
|
|
}
|
|
|
|
let cachedFloat64Memory0;
|
|
function getFloat64Memory0() {
|
|
if (cachedFloat64Memory0.byteLength === 0) {
|
|
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
}
|
|
return cachedFloat64Memory0;
|
|
}
|
|
|
|
function dropObject(idx) {
|
|
if (idx < 36) return;
|
|
heap[idx] = heap_next;
|
|
heap_next = idx;
|
|
}
|
|
|
|
function takeObject(idx) {
|
|
const ret = getObject(idx);
|
|
dropObject(idx);
|
|
return ret;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
function makeClosure(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++;
|
|
try {
|
|
return f(state.a, state.b, ...args);
|
|
} finally {
|
|
if (--state.cnt === 0) {
|
|
wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
|
|
state.a = 0;
|
|
|
|
}
|
|
}
|
|
};
|
|
real.original = state;
|
|
|
|
return real;
|
|
}
|
|
|
|
function logError(f, args) {
|
|
try {
|
|
return f.apply(this, args);
|
|
} catch (e) {
|
|
let error = (function () {
|
|
try {
|
|
return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString();
|
|
} catch(_) {
|
|
return "<failed to stringify thrown value>";
|
|
}
|
|
}());
|
|
console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error);
|
|
throw e;
|
|
}
|
|
}
|
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
_assertNum(arg0);
|
|
_assertNum(arg1);
|
|
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc0b84f4ddf4a8fd2(arg0, arg1, addHeapObject(arg2));
|
|
}
|
|
|
|
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);
|
|
|
|
} else {
|
|
state.a = a;
|
|
}
|
|
}
|
|
};
|
|
real.original = state;
|
|
|
|
return real;
|
|
}
|
|
function __wbg_adapter_33(arg0, arg1, arg2) {
|
|
_assertNum(arg0);
|
|
_assertNum(arg1);
|
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfed1f3471f1b926f(arg0, arg1, addHeapObject(arg2));
|
|
}
|
|
|
|
let stack_pointer = 32;
|
|
|
|
function addBorrowedObject(obj) {
|
|
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
heap[--stack_pointer] = obj;
|
|
return stack_pointer;
|
|
}
|
|
function __wbg_adapter_36(arg0, arg1, arg2) {
|
|
try {
|
|
_assertNum(arg0);
|
|
_assertNum(arg1);
|
|
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3b7aa7dd2123cac1(arg0, arg1, addBorrowedObject(arg2));
|
|
} finally {
|
|
heap[stack_pointer++] = undefined;
|
|
}
|
|
}
|
|
|
|
/**
|
|
*/
|
|
export function run_app() {
|
|
try {
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
wasm.run_app(retptr);
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
if (r1) {
|
|
throw takeObject(r0);
|
|
}
|
|
} finally {
|
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
}
|
|
}
|
|
|
|
let cachedUint32Memory0;
|
|
function getUint32Memory0() {
|
|
if (cachedUint32Memory0.byteLength === 0) {
|
|
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
}
|
|
return cachedUint32Memory0;
|
|
}
|
|
|
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
const mem = getUint32Memory0();
|
|
const slice = mem.subarray(ptr / 4, ptr / 4 + len);
|
|
const result = [];
|
|
for (let i = 0; i < slice.length; i++) {
|
|
result.push(takeObject(slice[i]));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function handleError(f, args) {
|
|
try {
|
|
return f.apply(this, args);
|
|
} catch (e) {
|
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
}
|
|
}
|
|
|
|
async function 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 getImports() {
|
|
const imports = {};
|
|
imports.wbg = {};
|
|
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
const obj = getObject(arg1);
|
|
const ret = JSON.stringify(obj === undefined ? null : obj);
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
};
|
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
const obj = getObject(arg1);
|
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
};
|
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
const ret = getObject(arg0);
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbg_modalhidebyid_b9efcd5f48cb1c79 = function() { return logError(function (arg0, arg1) {
|
|
modal_hide_by_id(getStringFromWasm0(arg0, arg1));
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
|
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
const ret = getObject(arg0) === undefined;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
const v = getObject(arg0);
|
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
_assertNum(ret);
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
const obj = getObject(arg1);
|
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
if (!isLikeNone(ret)) {
|
|
_assertNum(ret);
|
|
}
|
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
};
|
|
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
const ret = arg0;
|
|
return addHeapObject(ret);
|
|
};
|
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
takeObject(arg0);
|
|
};
|
|
imports.wbg.__wbg_error_09919627ac0992f5 = function() { return logError(function (arg0, arg1) {
|
|
try {
|
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
} finally {
|
|
wasm.__wbindgen_free(arg0, arg1);
|
|
}
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_693216e109162396 = function() { return logError(function () {
|
|
const ret = new Error();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_stack_0ddaca5d1abfb52f = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).stack;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
const obj = takeObject(arg0).original;
|
|
if (obj.cnt-- == 1) {
|
|
obj.a = 0;
|
|
return true;
|
|
}
|
|
const ret = false;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
};
|
|
imports.wbg.__wbg_debug_5a27eb2cb0d074ba = function() { return logError(function (arg0, arg1) {
|
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
console.debug(...v0);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_log_06b7ffc63a0f8bee = function() { return logError(function (arg0, arg1) {
|
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
console.log(...v0);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_warn_2aa0e7178e1d35f6 = function() { return logError(function (arg0, arg1) {
|
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
console.warn(...v0);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_Window_a2a08d3918d7d4d0 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof Window;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_document_14a383364c173445 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).document;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_location_3b5031b281e8d218 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).location;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_history_138ac6c183c00847 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).history;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_navigator_2d05aef684d827d8 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).navigator;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_localStorage_2409bbdfe5a4d2a7 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).localStorage;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_sessionStorage_e83c2c60c5113416 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).sessionStorage;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_fetch_23507368eed8d838 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_body_36a11f2467926b2b = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).body;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_createElement_2d8b75cffbd32c70 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_createElementNS_02b4562aadf76190 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
const ret = getObject(arg0).createElementNS(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_createTextNode_cdbaccf3b941b486 = function() { return logError(function (arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).createTextNode(getStringFromWasm0(arg1, arg2));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getElementById_0c9415d96f5b9ec6 = function() { return logError(function (arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_querySelector_d5f2cd97210290fd = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).querySelector(getStringFromWasm0(arg1, arg2));
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_pushState_54f843ea8212e98f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
getObject(arg0).pushState(getObject(arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_pathname_84f841cd108e1614 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).pathname;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_search_48955415868c6221 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).search;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_replace_22c22b6b59d0a5ff = function() { return handleError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).replace(getStringFromWasm0(arg1, arg2));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_parentElement_479f575ed7e67715 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).parentElement;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_lastChild_0df6447e8b05813b = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).lastChild;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_setnodeValue_103010d70088271d = function() { return logError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).nodeValue = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_appendChild_e9d52952defb480f = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).appendChild(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_insertBefore_8a88fe62c2fad6ca = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).insertBefore(getObject(arg1), getObject(arg2));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_removeChild_67ab7410bea7e2cb = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).removeChild(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_Response_e928c54c1025470c = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof Response;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_status_5b4a574de7c5bbfe = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).status;
|
|
_assertNum(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_headers_1dc1ef92ba3d32b1 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).headers;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_json_6416cf78642ce433 = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).json();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_text_5cb78830c1a11c5b = function() { return handleError(function (arg0) {
|
|
const ret = getObject(arg0).text();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getItem_9cb4c95f48b3e51b = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_removeItem_6d8d7a1539920d51 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).removeItem(getStringFromWasm0(arg1, arg2));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_setItem_04c4ba5c4a9c337f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_get_053104ee983370de = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
const ret = getObject(arg1).get(getStringFromWasm0(arg2, arg3));
|
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_set_23d56ff06768e13b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_headers_3618f72dcec019b7 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).headers;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_newwithstrandinit_41c86e821f771b24 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_pathname_362af71fbfa579b5 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).pathname;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_f508102bcfd6feb6 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = new URL(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_get_f93fc477a365e405 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).get(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_add_2c230dc2850cac52 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).add(getStringFromWasm0(arg1, arg2));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_remove_1e3a41bd96b25c83 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).remove(getStringFromWasm0(arg1, arg2));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_value_92e4233a8e4ce8c1 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).value;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_setvalue_61440ce246b0279d = function() { return logError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).value = getStringFromWasm0(arg1, arg2);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_Element_9a257409019cee1b = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof Element;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_namespaceURI_46712e5b566ccc37 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).namespaceURI;
|
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
var len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_classList_69b08a61aad2445b = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).classList;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_setinnerHTML_c3959ab1092c9bae = function() { return logError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).innerHTML = getStringFromWasm0(arg1, arg2);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_removeAttribute_8f6b6cf6fe7a2054 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_setAttribute_6091f6f3602fc299 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_HtmlElement_d2b7afdac18ee070 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof HTMLElement;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_focus_c3aa381bd2a1b65c = function() { return handleError(function (arg0) {
|
|
getObject(arg0).focus();
|
|
}, arguments) };
|
|
imports.wbg.__wbg_href_3e6228257a9ec234 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).href;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_HtmlInputElement_756d5883770e3491 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof HTMLInputElement;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_setchecked_5ce7b275aa2d0bbd = function() { return logError(function (arg0, arg1) {
|
|
getObject(arg0).checked = arg1 !== 0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_value_5573c798506a4119 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).value;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_setvalue_f3bd4ea96d361b70 = function() { return logError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).value = getStringFromWasm0(arg1, arg2);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_getClientExtensionResults_6f7de95bed8d48ef = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).getClientExtensionResults();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_Event_16c4141f82752987 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof Event;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_target_98e6e332956ee051 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).target;
|
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_cancelBubble_050e4dd024a8d3f8 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).cancelBubble;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_preventDefault_2e92eb64f38efc0d = function() { return logError(function (arg0) {
|
|
getObject(arg0).preventDefault();
|
|
}, arguments) };
|
|
imports.wbg.__wbg_credentials_544a26c31049992f = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).credentials;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_addEventListener_a77a92f38176616e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
|
|
}, arguments) };
|
|
imports.wbg.__wbg_removeEventListener_2882dfde82b5b4d9 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_HtmlDocument_85f8820e092a58bd = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof HTMLDocument;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_cookie_6a5bd022c585a389 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg1).cookie;
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_2ab697f1555e0dbc = function() { return logError(function () {
|
|
const ret = new Array();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_push_811c8b08bf4ff9d5 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
_assertNum(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_instanceof_Error_53fd3b982f19be06 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0) instanceof Error;
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_message_136debd54c3edfe4 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).message;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_name_d0cc50bf0e4abe7f = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).name;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_toString_ef76a2af8f5bb98a = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).toString();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_newnoargs_fc5356289219b93b = function() { return logError(function (arg0, arg1) {
|
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_call_4573f605ca4b5f10 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_valueOf_3520735ced6d6137 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).valueOf();
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_is_aafa609b540ad47f = function() { return logError(function (arg0, arg1) {
|
|
const ret = Object.is(getObject(arg0), getObject(arg1));
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_306ce8d57919e6ae = function() { return logError(function () {
|
|
const ret = new Object();
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_resolve_f269ce174f88b294 = function() { return logError(function (arg0) {
|
|
const ret = Promise.resolve(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_then_1c698eedca15eed6 = function() { return logError(function (arg0, arg1) {
|
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_then_4debc41d4fc92ce5 = function() { return logError(function (arg0, arg1, arg2) {
|
|
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_globalThis_56d9c9f814daeeee = function() { return handleError(function () {
|
|
const ret = globalThis.globalThis;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_self_ba1ddafe9ea7a3a2 = function() { return handleError(function () {
|
|
const ret = self.self;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_window_be3cc430364fd32c = function() { return handleError(function () {
|
|
const ret = window.window;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_global_8c35aeee4ac77f2b = function() { return handleError(function () {
|
|
const ret = global.global;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_new_97cf52648830a70d = function() { return logError(function (arg0) {
|
|
const ret = new Uint8Array(getObject(arg0));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_newwithbyteoffsetandlength_9ca61320599a2c84 = function() { return logError(function (arg0, arg1, arg2) {
|
|
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_length_e09c0b925ab8de5d = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).length;
|
|
_assertNum(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbg_set_a0172b213e2469e9 = function() { return logError(function (arg0, arg1, arg2) {
|
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_buffer_de1150f91b23aa89 = function() { return logError(function (arg0) {
|
|
const ret = getObject(arg0).buffer;
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_get_89247d3aeaa38cc5 = function() { return handleError(function (arg0, arg1) {
|
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbg_set_b12cd0ab82903c2f = function() { return handleError(function (arg0, arg1, arg2) {
|
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
_assertBoolean(ret);
|
|
return ret;
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
const ret = debugString(getObject(arg1));
|
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
const len0 = WASM_VECTOR_LEN;
|
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
};
|
|
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_wrapper19416 = function() { return logError(function (arg0, arg1, arg2) {
|
|
const ret = makeClosure(arg0, arg1, 1344, __wbg_adapter_30);
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_closure_wrapper23348 = function() { return logError(function (arg0, arg1, arg2) {
|
|
const ret = makeMutClosure(arg0, arg1, 1370, __wbg_adapter_33);
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
imports.wbg.__wbindgen_closure_wrapper23799 = function() { return logError(function (arg0, arg1, arg2) {
|
|
const ret = makeMutClosure(arg0, arg1, 1396, __wbg_adapter_36);
|
|
return addHeapObject(ret);
|
|
}, arguments) };
|
|
|
|
return imports;
|
|
}
|
|
|
|
function initMemory(imports, maybe_memory) {
|
|
|
|
}
|
|
|
|
function finalizeInit(instance, module) {
|
|
wasm = instance.exports;
|
|
init.__wbindgen_wasm_module = module;
|
|
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
|
|
|
|
return wasm;
|
|
}
|
|
|
|
function initSync(bytes) {
|
|
const imports = getImports();
|
|
|
|
initMemory(imports);
|
|
|
|
const module = new WebAssembly.Module(bytes);
|
|
const instance = new WebAssembly.Instance(module, imports);
|
|
|
|
return finalizeInit(instance, module);
|
|
}
|
|
|
|
async function init(input) {
|
|
if (typeof input === 'undefined') {
|
|
input = new URL('kanidmd_web_ui_bg.wasm', import.meta.url);
|
|
}
|
|
const imports = getImports();
|
|
|
|
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
input = fetch(input);
|
|
}
|
|
|
|
initMemory(imports);
|
|
|
|
const { instance, module } = await load(await input, imports);
|
|
|
|
return finalizeInit(instance, module);
|
|
}
|
|
|
|
export { initSync }
|
|
export default init;
|