vegafusion-wasm
Version:
VegaFusion WASM package for embedding Vega charts in the browser with a connection to a VegaFusion Runtime
1,473 lines (1,262 loc) • 41.9 kB
JavaScript
import { localTimezone, make_grpc_send_message_fn, setSignalValue, setDataValue, addSignalListener, addDataListener } from './snippets/vegafusion-wasm-f7e76dd0896f3e00/js/vega_utils.js';
import { default as default1 } from 'vega-embed';
let wasm;
export function __wbg_set_wasm(val) {
wasm = val;
}
function isLikeNone(x) {
return x === undefined || x === null;
}
let cachedDataViewMemory0 = null;
function getDataViewMemory0() {
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
}
return cachedDataViewMemory0;
}
let WASM_VECTOR_LEN = 0;
let cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8ArrayMemory0;
}
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
let cachedTextEncoder = new lTextEncoder('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 (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length, 1) >>> 0;
getUint8ArrayMemory0().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 = getUint8ArrayMemory0();
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 = getUint8ArrayMemory0().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;
}
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}
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_3.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_3.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_52(arg0, arg1, arg2, arg3) {
const ptr0 = passStringToWasm0(arg2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.closure8_externref_shim(arg0, arg1, ptr0, len0, arg3);
}
function __wbg_adapter_55(arg0, arg1, arg2) {
wasm.closure7997_externref_shim(arg0, arg1, arg2);
}
/**
* Embed a Vega chart and accelerate with VegaFusion
* @param element - The DOM element to embed the visualization into
* @param spec - The Vega specification (as string or object)
* @param config - Optional configuration options
* @param query_fn - Function to handle server-side query requests.
* If not provided, an embedded wasm VegaFusion runtime is created.
* @returns A ChartHandle instance for the embedded visualization
* @param {Element} element
* @param {any} spec
* @param {any} config
* @param {any} query_fn
* @returns {Promise<ChartHandle>}
*/
export function vegaFusionEmbed(element, spec, config, query_fn) {
const ret = wasm.vegaFusionEmbed(element, spec, config, query_fn);
return ret;
}
function takeFromExternrefTable0(idx) {
const value = wasm.__wbindgen_export_2.get(idx);
wasm.__externref_table_dealloc(idx);
return value;
}
/**
* @param {any} spec
* @returns {any}
*/
export function getColumnUsage(spec) {
const ret = wasm.getColumnUsage(spec);
if (ret[2]) {
throw takeFromExternrefTable0(ret[1]);
}
return takeFromExternrefTable0(ret[0]);
}
/**
* Create a function for sending VegaFusion queries to VegaFusion server over gRPC-Web
* @param client - The gRPC client instance
* @param hostname - The hostname to connect to
* @returns A function that can be used to send gRPC messages
* @param {any} client
* @param {string} hostname
* @returns {Function}
*/
export function makeGrpcSendMessageFn(client, hostname) {
const ptr0 = passStringToWasm0(hostname, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.makeGrpcSendMessageFn(client, ptr0, len0);
return ret;
}
let cachedUint32ArrayMemory0 = null;
function getUint32ArrayMemory0() {
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
}
return cachedUint32ArrayMemory0;
}
function getArrayU32FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
}
function addToExternrefTable0(obj) {
const idx = wasm.__externref_table_alloc();
wasm.__wbindgen_export_2.set(idx, obj);
return idx;
}
function handleError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
const idx = addToExternrefTable0(e);
wasm.__wbindgen_exn_store(idx);
}
}
function _assertClass(instance, klass) {
if (!(instance instanceof klass)) {
throw new Error(`expected instance of ${klass.name}`);
}
return instance.ptr;
}
function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; }
function __wbg_adapter_269(arg0, arg1, arg2, arg3) {
wasm.closure14853_externref_shim(arg0, arg1, arg2, arg3);
}
const __wbindgen_enum_ReadableStreamReaderMode = ["byob"];
const __wbindgen_enum_ReadableStreamType = ["bytes"];
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
const ChartHandleFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_charthandle_free(ptr >>> 0, 1));
/**
* Handle to an embedded VegaFusion chart
*/
export class ChartHandle {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(ChartHandle.prototype);
obj.__wbg_ptr = ptr;
ChartHandleFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
ChartHandleFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_charthandle_free(ptr, 0);
}
/**
* Get the Vega-Embed view
* @returns The Vega-Embed view
* @returns {any}
*/
view() {
const ret = wasm.charthandle_view(this.__wbg_ptr);
return ret;
}
/**
* Finalize the chart
*/
finalize() {
wasm.charthandle_finalize(this.__wbg_ptr);
}
/**
* Get the client specification
* @returns The client specification
* @returns {any}
*/
clientSpec() {
const ret = wasm.charthandle_clientSpec(this.__wbg_ptr);
return ret;
}
/**
* Get the server specification
* @returns The server specification
* @returns {any}
*/
serverSpec() {
const ret = wasm.charthandle_serverSpec(this.__wbg_ptr);
return ret;
}
/**
* Get the communication plan
* @returns The communication plan
* @returns {any}
*/
commPlan() {
const ret = wasm.charthandle_commPlan(this.__wbg_ptr);
return ret;
}
}
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
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, 0);
}
/**
* @returns {any}
*/
get type() {
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
return __wbindgen_enum_ReadableStreamType[ret];
}
/**
* @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, controller);
}
/**
* @param {ReadableByteStreamController} controller
* @returns {Promise<any>}
*/
pull(controller) {
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
return 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, 1));
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, 0);
}
/**
* @param {any} chunk
* @returns {Promise<any>}
*/
write(chunk) {
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
return ret;
}
/**
* @returns {Promise<any>}
*/
close() {
const ptr = this.__destroy_into_raw();
const ret = wasm.intounderlyingsink_close(ptr);
return ret;
}
/**
* @param {any} reason
* @returns {Promise<any>}
*/
abort(reason) {
const ptr = this.__destroy_into_raw();
const ret = wasm.intounderlyingsink_abort(ptr, reason);
return ret;
}
}
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
export class IntoUnderlyingSource {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(IntoUnderlyingSource.prototype);
obj.__wbg_ptr = ptr;
IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__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, 0);
}
/**
* @param {ReadableStreamDefaultController} controller
* @returns {Promise<any>}
*/
pull(controller) {
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
return ret;
}
cancel() {
const ptr = this.__destroy_into_raw();
wasm.intounderlyingsource_cancel(ptr);
}
}
const WasmGetOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_wasmgetoptions_free(ptr >>> 0, 1));
export class WasmGetOptions {
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
WasmGetOptionsFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_wasmgetoptions_free(ptr, 0);
}
}
const WasmObjectMetaFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_wasmobjectmeta_free(ptr >>> 0, 1));
export class WasmObjectMeta {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(WasmObjectMeta.prototype);
obj.__wbg_ptr = ptr;
WasmObjectMetaFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
toJSON() {
return {
location: this.location,
last_modified: this.last_modified,
size: this.size,
e_tag: this.e_tag,
version: this.version,
};
}
toString() {
return JSON.stringify(this);
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
WasmObjectMetaFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_wasmobjectmeta_free(ptr, 0);
}
/**
* The full path to the object
* @returns {string}
*/
get location() {
let deferred1_0;
let deferred1_1;
try {
const ret = wasm.__wbg_get_wasmobjectmeta_location(this.__wbg_ptr);
deferred1_0 = ret[0];
deferred1_1 = ret[1];
return getStringFromWasm0(ret[0], ret[1]);
} finally {
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
}
}
/**
* The full path to the object
* @param {string} arg0
*/
set location(arg0) {
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.__wbg_set_wasmobjectmeta_location(this.__wbg_ptr, ptr0, len0);
}
/**
* The last modified time
* @returns {Date}
*/
get last_modified() {
const ret = wasm.__wbg_get_wasmobjectmeta_last_modified(this.__wbg_ptr);
return ret;
}
/**
* The last modified time
* @param {Date} arg0
*/
set last_modified(arg0) {
wasm.__wbg_set_wasmobjectmeta_last_modified(this.__wbg_ptr, arg0);
}
/**
* The size in bytes of the object
* @returns {number}
*/
get size() {
const ret = wasm.__wbg_get_wasmobjectmeta_size(this.__wbg_ptr);
return ret >>> 0;
}
/**
* The size in bytes of the object
* @param {number} arg0
*/
set size(arg0) {
wasm.__wbg_set_wasmobjectmeta_size(this.__wbg_ptr, arg0);
}
/**
* The unique identifier for the object
*
* <https://datatracker.ietf.org/doc/html/rfc9110#name-etag>
* @returns {string | undefined}
*/
get e_tag() {
const ret = wasm.__wbg_get_wasmobjectmeta_e_tag(this.__wbg_ptr);
let v1;
if (ret[0] !== 0) {
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
}
return v1;
}
/**
* The unique identifier for the object
*
* <https://datatracker.ietf.org/doc/html/rfc9110#name-etag>
* @param {string | undefined} [arg0]
*/
set e_tag(arg0) {
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
wasm.__wbg_set_wasmobjectmeta_e_tag(this.__wbg_ptr, ptr0, len0);
}
/**
* A version indicator for this object
* @returns {string | undefined}
*/
get version() {
const ret = wasm.__wbg_get_wasmobjectmeta_version(this.__wbg_ptr);
let v1;
if (ret[0] !== 0) {
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
}
return v1;
}
/**
* A version indicator for this object
* @param {string | undefined} [arg0]
*/
set version(arg0) {
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
wasm.__wbg_set_wasmobjectmeta_version(this.__wbg_ptr, ptr0, len0);
}
}
const WasmObjectStoreFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_wasmobjectstore_free(ptr >>> 0, 1));
export class WasmObjectStore {
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
WasmObjectStoreFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_wasmobjectstore_free(ptr, 0);
}
/**
* @param {string} url
* @param {object | undefined} [options]
*/
constructor(url, options) {
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.wasmobjectstore_new(ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
if (ret[2]) {
throw takeFromExternrefTable0(ret[1]);
}
this.__wbg_ptr = ret[0] >>> 0;
WasmObjectStoreFinalization.register(this, this.__wbg_ptr, this);
return this;
}
/**
* @param {string} location
* @param {WasmGetOptions | undefined} [options]
* @returns {Promise<ReadableStream>}
*/
get(location, options) {
const ptr0 = passStringToWasm0(location, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
let ptr1 = 0;
if (!isLikeNone(options)) {
_assertClass(options, WasmGetOptions);
ptr1 = options.__destroy_into_raw();
}
const ret = wasm.wasmobjectstore_get(this.__wbg_ptr, ptr0, len0, ptr1);
return ret;
}
/**
* @param {string | undefined} [prefix]
* @returns {Promise<ReadableStream>}
*/
list(prefix) {
var ptr0 = isLikeNone(prefix) ? 0 : passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
const ret = wasm.wasmobjectstore_list(this.__wbg_ptr, ptr0, len0);
return ret;
}
}
export function __wbindgen_is_undefined(arg0) {
const ret = arg0 === undefined;
return ret;
};
export function __wbindgen_in(arg0, arg1) {
const ret = arg0 in arg1;
return ret;
};
export function __wbindgen_number_get(arg0, arg1) {
const obj = arg1;
const ret = typeof(obj) === 'number' ? obj : undefined;
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
};
export function __wbindgen_boolean_get(arg0) {
const v = arg0;
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
return ret;
};
export function __wbindgen_is_null(arg0) {
const ret = arg0 === null;
return ret;
};
export function __wbindgen_string_get(arg0, arg1) {
const obj = 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;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
export function __wbindgen_is_bigint(arg0) {
const ret = typeof(arg0) === 'bigint';
return ret;
};
export function __wbindgen_is_object(arg0) {
const val = arg0;
const ret = typeof(val) === 'object' && val !== null;
return ret;
};
export function __wbindgen_is_string(arg0) {
const ret = typeof(arg0) === 'string';
return ret;
};
export function __wbindgen_bigint_from_i64(arg0) {
const ret = arg0;
return ret;
};
export function __wbindgen_bigint_from_u64(arg0) {
const ret = BigInt.asUintN(64, arg0);
return ret;
};
export function __wbindgen_error_new(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
return ret;
};
export function __wbg_default_e87083ea77f5cb6f() { return handleError(function (arg0, arg1, arg2) {
const ret = default1(arg0, arg1, arg2);
return ret;
}, arguments) };
export function __wbindgen_jsval_eq(arg0, arg1) {
const ret = arg0 === arg1;
return ret;
};
export function __wbg_charthandle_new(arg0) {
const ret = ChartHandle.__wrap(arg0);
return ret;
};
export function __wbg_view_172e0fa799609b41(arg0) {
const ret = arg0.view;
return ret;
};
export function __wbg_finalize_39335cb2fdfa5c01(arg0) {
arg0.finalize();
};
export function __wbg_addDataListener_98036ccf2954a4b6(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
addDataListener(arg0, getStringFromWasm0(arg1, arg2), getArrayU32FromWasm0(arg3, arg4), arg5, arg6, arg7 === 0 ? undefined : arg8);
};
export function __wbg_addSignalListener_1d4569be04d0a9cd(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
addSignalListener(arg0, getStringFromWasm0(arg1, arg2), getArrayU32FromWasm0(arg3, arg4), arg5, arg6, arg7 === 0 ? undefined : arg8);
};
export function __wbg_log_878f2eb9e99a7e35(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
export function __wbg_setSignalValue_19cf3414643e5180(arg0, arg1, arg2, arg3, arg4, arg5) {
setSignalValue(arg0, getStringFromWasm0(arg1, arg2), getArrayU32FromWasm0(arg3, arg4), arg5);
};
export function __wbg_setDataValue_6611d1b91527bf88(arg0, arg1, arg2, arg3, arg4, arg5) {
setDataValue(arg0, getStringFromWasm0(arg1, arg2), getArrayU32FromWasm0(arg3, arg4), arg5);
};
export function __wbg_makegrpcsendmessagefn_e87c0dd0fe79e309(arg0, arg1, arg2) {
let deferred0_0;
let deferred0_1;
try {
deferred0_0 = arg1;
deferred0_1 = arg2;
const ret = make_grpc_send_message_fn(arg0, getStringFromWasm0(arg1, arg2));
return ret;
} finally {
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
}
};
export function __wbg_localTimezone_b29459477f89ac62(arg0) {
const ret = localTimezone();
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
export function __wbg_wasmobjectmeta_new(arg0) {
const ret = WasmObjectMeta.__wrap(arg0);
return ret;
};
export function __wbg_new_abda76e883ba8a5f() {
const ret = new Error();
return ret;
};
export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
const ret = arg1.stack;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
export function __wbg_error_f851667af71bcfc6(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);
}
};
export function __wbindgen_jsval_loose_eq(arg0, arg1) {
const ret = arg0 == arg1;
return ret;
};
export function __wbg_String_b9412f8799faab3e(arg0, arg1) {
const ret = String(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
export function __wbindgen_number_new(arg0) {
const ret = arg0;
return ret;
};
export function __wbindgen_string_new(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return ret;
};
export function __wbg_getwithrefkey_edc2c8960f0f1191(arg0, arg1) {
const ret = arg0[arg1];
return ret;
};
export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
arg0[arg1] = arg2;
};
export const __wbg_fetch_bc7c8e27076a5c84 = typeof fetch == 'function' ? fetch : notDefined('fetch');
export function __wbg_getReader_7a604d2d7b2f6e3e() { return handleError(function (arg0) {
const ret = arg0.getReader();
return ret;
}, arguments) };
export function __wbg_newwithintounderlyingsource_5527e309da822cfb(arg0, arg1) {
const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
return ret;
};
export function __wbg_queueMicrotask_848aa4969108a57e(arg0) {
const ret = arg0.queueMicrotask;
return ret;
};
export function __wbindgen_is_function(arg0) {
const ret = typeof(arg0) === 'function';
return ret;
};
export function __wbindgen_cb_drop(arg0) {
const obj = arg0.original;
if (obj.cnt-- == 1) {
obj.a = 0;
return true;
}
const ret = false;
return ret;
};
export const __wbg_queueMicrotask_c5419c06eab41e73 = typeof queueMicrotask == 'function' ? queueMicrotask : notDefined('queueMicrotask');
export function __wbg_signal_9acfcec9e7dffc22(arg0) {
const ret = arg0.signal;
return ret;
};
export function __wbg_new_75169ae5a9683c55() { return handleError(function () {
const ret = new AbortController();
return ret;
}, arguments) };
export function __wbg_abort_c57daab47a6c1215(arg0) {
arg0.abort();
};
export function __wbg_new_a9ae04a5200606a5() { return handleError(function () {
const ret = new Headers();
return ret;
}, arguments) };
export function __wbg_append_8b3e7f74a47ea7d5() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
}, arguments) };
export function __wbg_now_d3cbc9581625f686(arg0) {
const ret = arg0.now();
return ret;
};
export function __wbg_sethighwatermark_3e325942406b05aa(arg0, arg1) {
arg0.highWaterMark = arg1;
};
export function __wbg_byobRequest_86ac467c94924d3c(arg0) {
const ret = arg0.byobRequest;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
};
export function __wbg_close_7cda9dd901230214() { return handleError(function (arg0) {
arg0.close();
}, arguments) };
export function __wbg_view_de0e81c5c00d2129(arg0) {
const ret = arg0.view;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
};
export function __wbg_respond_ffb6928cd9b79c32() { return handleError(function (arg0, arg1) {
arg0.respond(arg1 >>> 0);
}, arguments) };
export function __wbg_close_cfd08d9cf9f36856() { return handleError(function (arg0) {
arg0.close();
}, arguments) };
export function __wbg_enqueue_e693a6fb4f3261c1() { return handleError(function (arg0, arg1) {
arg0.enqueue(arg1);
}, arguments) };
export function __wbg_read_08d62388e7870059(arg0) {
const ret = arg0.read();
return ret;
};
export function __wbg_releaseLock_32c310d7be334e1c(arg0) {
arg0.releaseLock();
};
export function __wbg_cancel_2a3c2f3c115ac7e0(arg0) {
const ret = arg0.cancel();
return ret;
};
export function __wbg_getdone_38a59a1c17131633(arg0) {
const ret = arg0.done;
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
};
export function __wbg_getvalue_674bb48c8380247b(arg0) {
const ret = arg0.value;
return ret;
};
export function __wbg_newwithstrandinit_4b92c89af0a8e383() { return handleError(function (arg0, arg1, arg2) {
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
return ret;
}, arguments) };
export function __wbg_setbody_aa8b691bec428bf4(arg0, arg1) {
arg0.body = arg1;
};
export function __wbg_setcredentials_a4e661320cdb9738(arg0, arg1) {
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
};
export function __wbg_setheaders_f5205d36e423a544(arg0, arg1) {
arg0.headers = arg1;
};
export function __wbg_setmethod_ce2da76000b02f6a(arg0, arg1, arg2) {
arg0.method = getStringFromWasm0(arg1, arg2);
};
export function __wbg_setmode_4919fd636102c586(arg0, arg1) {
arg0.mode = __wbindgen_enum_RequestMode[arg1];
};
export function __wbg_setsignal_812ccb8269a7fd90(arg0, arg1) {
arg0.signal = arg1;
};
export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
let result;
try {
result = arg0 instanceof Response;
} catch (_) {
result = false;
}
const ret = result;
return ret;
};
export function __wbg_url_58af972663531d16(arg0, arg1) {
const ret = arg1.url;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
export function __wbg_status_5f4e900d22140a18(arg0) {
const ret = arg0.status;
return ret;
};
export function __wbg_headers_1b9bf90c73fae600(arg0) {
const ret = arg0.headers;
return ret;
};
export function __wbg_body_06c4eb578a55c1d4(arg0) {
const ret = arg0.body;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
};
export function __wbg_fetch_1fdc4448ed9eec00(arg0, arg1) {
const ret = arg0.fetch(arg1);
return ret;
};
export function __wbg_crypto_1d1f22824a6a080c(arg0) {
const ret = arg0.crypto;
return ret;
};
export function __wbg_process_4a72847cc503995b(arg0) {
const ret = arg0.process;
return ret;
};
export function __wbg_versions_f686565e586dd935(arg0) {
const ret = arg0.versions;
return ret;
};
export function __wbg_node_104a2ff8d6ea03a2(arg0) {
const ret = arg0.node;
return ret;
};
export function __wbg_require_cca90b1a94a0255b() { return handleError(function () {
const ret = module.require;
return ret;
}, arguments) };
export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
const ret = arg0.msCrypto;
return ret;
};
export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) {
arg0.randomFillSync(arg1);
}, arguments) };
export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) {
arg0.getRandomValues(arg1);
}, arguments) };
export function __wbg_self_bf91bf94d9e04084() { return handleError(function () {
const ret = self.self;
return ret;
}, arguments) };
export function __wbg_window_52dd9f07d03fd5f8() { return handleError(function () {
const ret = window.window;
return ret;
}, arguments) };
export function __wbg_globalThis_05c129bf37fcf1be() { return handleError(function () {
const ret = globalThis.globalThis;
return ret;
}, arguments) };
export function __wbg_global_3eca19bb09e9c484() { return handleError(function () {
const ret = global.global;
return ret;
}, arguments) };
export function __wbg_newnoargs_1ede4bf2ebbaaf43(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));
return ret;
};
export function __wbg_length_f217bbbf7e8e4df4(arg0) {
const ret = arg0.length;
return ret;
};
export function __wbg_new_034f913e7636e987() {
const ret = new Array();
return ret;
};
export function __wbg_new_7a87a0376e40533b() {
const ret = new Map();
return ret;
};
export function __wbg_next_13b477da1eaa3897(arg0) {
const ret = arg0.next;
return ret;
};
export function __wbg_value_2ab8a198c834c26a(arg0) {
const ret = arg0.value;
return ret;
};
export function __wbg_iterator_695d699a44d6234c() {
const ret = Symbol.iterator;
return ret;
};
export function __wbg_new_e69b5f66fda8f13c() {
const ret = new Object();
return ret;
};
export function __wbg_get_5419cf6b954aa11d(arg0, arg1) {
const ret = arg0[arg1 >>> 0];
return ret;
};
export function __wbg_set_425e70f7c64ac962(arg0, arg1, arg2) {
arg0[arg1 >>> 0] = arg2;
};
export function __wbg_isArray_6f3b47f09adb61b5(arg0) {
const ret = Array.isArray(arg0);
return ret;
};
export function __wbg_instanceof_ArrayBuffer_74945570b4a62ec7(arg0) {
let result;
try {
result = arg0 instanceof ArrayBuffer;
} catch (_) {
result = false;
}
const ret = result;
return ret;
};
export function __wbg_new_70a2f23d1565c04c(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
return ret;
};
export function __wbg_call_a9ef466721e824f2() { return handleError(function (arg0, arg1) {
const ret = arg0.call(arg1);
return ret;
}, arguments) };
export function __wbg_call_3bfa248576352471() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.call(arg1, arg2);
return ret;
}, arguments) };
export function __wbg_instanceof_Map_f96986929e7e89ed(arg0) {
let result;
try {
result = arg0 instanceof Map;
} catch (_) {
result = false;
}
const ret = result;
return ret;
};
export function __wbg_set_277a63e77c89279f(arg0, arg1, arg2) {
const ret = arg0.set(arg1, arg2);
return ret;
};
export function __wbg_next_b06e115d1b01e10b() { return handleError(function (arg0) {
const ret = arg0.next();
return ret;
}, arguments) };
export function __wbg_done_983b5ffcaec8c583(arg0) {
const ret = arg0.done;
return ret;
};
export function __wbg_isSafeInteger_b9dff570f01a9100(arg0) {
const ret = Number.isSafeInteger(arg0);
return ret;
};
export function __wbg_getTime_41225036a0393d63(arg0) {
const ret = arg0.getTime();
return ret;
};
export function __wbg_new_6fb55f037293191b(arg0) {
const ret = new Date(arg0);
return ret;
};
export function __wbg_new0_218ada33b570be35() {
const ret = new Date();
return ret;
};
export function __wbg_entries_c02034de337d3ee2(arg0) {
const ret = Object.entries(arg0);
return ret;
};
export function __wbg_get_ef828680c64da212() { return handleError(function (arg0, arg1) {
const ret = Reflect.get(arg0, arg1);
return ret;
}, arguments) };
export function __wbg_has_bd717f25f195f23d() { return handleError(function (arg0, arg1) {
const ret = Reflect.has(arg0, arg1);
return ret;
}, arguments) };
export function __wbg_buffer_ccaed51a635d8a2d(arg0) {
const ret = arg0.buffer;
return ret;
};
export function __wbg_stringify_eead5648c09faaf8() { return handleError(function (arg0) {
const ret = JSON.stringify(arg0);
return ret;
}, arguments) };
export function __wbg_instanceof_Promise_f3fd1bcac3157f0c(arg0) {
let result;
try {
result = arg0 instanceof Promise;
} catch (_) {
result = false;
}
const ret = result;
return ret;
};
export function __wbg_new_1073970097e5a420(arg0, arg1) {
try {
var state0 = {a: arg0, b: arg1};
var cb0 = (arg0, arg1) => {
const a = state0.a;
state0.a = 0;
try {
return __wbg_adapter_269(a, state0.b, arg0, arg1);
} finally {
state0.a = a;
}
};
const ret = new Promise(cb0);
return ret;
} finally {
state0.a = state0.b = 0;
}
};
export function __wbg_resolve_0aad7c1484731c99(arg0) {
const ret = Promise.resolve(arg0);
return ret;
};
export function __wbg_catch_8097da4375a5dd1b(arg0, arg1) {
const ret = arg0.catch(arg1);
return ret;
};
export function __wbg_then_748f75edfb032440(arg0, arg1) {
const ret = arg0.then(arg1);
return ret;
};
export function __wbg_then_4866a7d9f55d8f3e(arg0, arg1, arg2) {
const ret = arg0.then(arg1, arg2);
return ret;
};
export function __wbg_newwithbyteoffsetandlength_7e3eb787208af730(arg0, arg1, arg2) {
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
return ret;
};
export function __wbg_new_fec2611eb9180f95(arg0) {
const ret = new Uint8Array(arg0);
return ret;
};
export function __wbg_instanceof_Uint8Array_df0761410414ef36(arg0) {
let result;
try {
result = arg0 instanceof Uint8Array;
} catch (_) {
result = false;
}
const ret = result;
return ret;
};
export function __wbg_newwithlength_76462a666eca145f(arg0) {
const ret = new Uint8Array(arg0 >>> 0);
return ret;
};
export function __wbg_buffer_95102df5554646dc(arg0) {
const ret = arg0.buffer;
return ret;
};
export function __wbg_subarray_975a06f9dbd16995(arg0, arg1, arg2) {
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
return ret;
};
export function __wbg_length_9254c4bd3b9f23c4(arg0) {
const ret = arg0.length;
return ret;
};
export function __wbg_byteLength_5d623ba3d92a3a9c(arg0) {
const ret = arg0.byteLength;
return ret;
};
export function __wbg_byteOffset_ec0928143c619cd7(arg0) {
const ret = arg0.byteOffset;
return ret;
};
export function __wbg_set_ec2fcf81bc573fd9(arg0, arg1, arg2) {
arg0.set(arg1, arg2 >>> 0);
};
export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
const v = arg1;
const ret = typeof(v) === 'bigint' ? v : undefined;
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
};
export function __wbindgen_debug_string(arg0, arg1) {
const ret = debugString(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
export function __wbindgen_throw(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
};
export function __wbindgen_memory() {
const ret = wasm.memory;
return ret;
};
export function __wbindgen_closure_wrapper816(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 9, __wbg_adapter_52);
return ret;
};
export function __wbindgen_closure_wrapper31153(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 7998, __wbg_adapter_55);
return ret;
};
export function __wbindgen_init_externref_table() {
const table = wasm.__wbindgen_export_2;
const offset = table.grow(4);
table.set(0, undefined);
table.set(offset + 0, undefined);
table.set(offset + 1, null);
table.set(offset + 2, true);
table.set(offset + 3, false);
;
};