@vulcan-energy/mcp-helper 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/src/tools/autoThermalBridges.d.ts +8 -0
- package/dist/src/tools/autoThermalBridges.d.ts.map +1 -0
- package/dist/src/tools/autoThermalBridges.js +12 -0
- package/dist/src/tools/autoThermalBridges.js.map +1 -0
- package/dist/src/tools/calculateMetrics.d.ts +1 -27
- package/dist/src/tools/calculateMetrics.d.ts.map +1 -1
- package/dist/src/tools/calculateMetrics.js +4 -430
- package/dist/src/tools/calculateMetrics.js.map +1 -1
- package/dist/src/tools/createBatchConfig.d.ts +1 -19
- package/dist/src/tools/createBatchConfig.d.ts.map +1 -1
- package/dist/src/tools/createBatchConfig.js +2 -122
- package/dist/src/tools/createBatchConfig.js.map +1 -1
- package/dist/src/tools/geometryCsvConversion.d.ts +3 -0
- package/dist/src/tools/geometryCsvConversion.d.ts.map +1 -0
- package/dist/src/tools/geometryCsvConversion.js +2 -0
- package/dist/src/tools/geometryCsvConversion.js.map +1 -0
- package/dist/src/tools/getBatchStatus.d.ts +1 -17
- package/dist/src/tools/getBatchStatus.d.ts.map +1 -1
- package/dist/src/tools/getBatchStatus.js +2 -191
- package/dist/src/tools/getBatchStatus.js.map +1 -1
- package/dist/src/tools/index.d.ts +25 -1
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +84 -3
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/listBatchModels.d.ts +3 -20
- package/dist/src/tools/listBatchModels.d.ts.map +1 -1
- package/dist/src/tools/listBatchModels.js +3 -81
- package/dist/src/tools/listBatchModels.js.map +1 -1
- package/dist/src/tools/listCsvColumns.d.ts +3 -22
- package/dist/src/tools/listCsvColumns.d.ts.map +1 -1
- package/dist/src/tools/listCsvColumns.js +3 -88
- package/dist/src/tools/listCsvColumns.js.map +1 -1
- package/dist/src/tools/listParameters.d.ts +1 -19
- package/dist/src/tools/listParameters.d.ts.map +1 -1
- package/dist/src/tools/listParameters.js +2 -58
- package/dist/src/tools/listParameters.js.map +1 -1
- package/dist/src/tools/mergeCsvToJson.d.ts +2 -8
- package/dist/src/tools/mergeCsvToJson.d.ts.map +1 -1
- package/dist/src/tools/mergeCsvToJson.js +11 -121
- package/dist/src/tools/mergeCsvToJson.js.map +1 -1
- package/dist/src/tools/runBatch.d.ts +1 -13
- package/dist/src/tools/runBatch.d.ts.map +1 -1
- package/dist/src/tools/runBatch.js +6 -55
- package/dist/src/tools/runBatch.js.map +1 -1
- package/dist/src/tools/saveParameter.d.ts +1 -17
- package/dist/src/tools/saveParameter.d.ts.map +1 -1
- package/dist/src/tools/saveParameter.js +4 -68
- package/dist/src/tools/saveParameter.js.map +1 -1
- package/dist/src/tools/validateGeometryCsv.d.ts +8 -0
- package/dist/src/tools/validateGeometryCsv.d.ts.map +1 -0
- package/dist/src/tools/validateGeometryCsv.js +12 -0
- package/dist/src/tools/validateGeometryCsv.js.map +1 -0
- package/dist/src/tools/validateThermalBridges.d.ts +9 -0
- package/dist/src/tools/validateThermalBridges.d.ts.map +1 -0
- package/dist/src/tools/validateThermalBridges.js +13 -0
- package/dist/src/tools/validateThermalBridges.js.map +1 -0
- package/dist/src/tools/viewParameter.d.ts +1 -12
- package/dist/src/tools/viewParameter.d.ts.map +1 -1
- package/dist/src/tools/viewParameter.js +2 -45
- package/dist/src/tools/viewParameter.js.map +1 -1
- package/dist/src/utils/defaultsPaths.d.ts +10 -0
- package/dist/src/utils/defaultsPaths.d.ts.map +1 -0
- package/dist/src/utils/defaultsPaths.js +47 -0
- package/dist/src/utils/defaultsPaths.js.map +1 -0
- package/dist/src/utils/fileLoader.d.ts +4 -3
- package/dist/src/utils/fileLoader.d.ts.map +1 -1
- package/dist/src/utils/fileLoader.js +26 -36
- package/dist/src/utils/fileLoader.js.map +1 -1
- package/dist/src/utils/schemaPaths.d.ts +2 -0
- package/dist/src/utils/schemaPaths.d.ts.map +1 -0
- package/dist/src/utils/schemaPaths.js +12 -0
- package/dist/src/utils/schemaPaths.js.map +1 -0
- package/package.json +2 -1
- package/wasm/wasm_version.json +5 -4
- package/wasm/wasm_wrapper.js +869 -790
- package/wasm/wasm_wrapper_bg.wasm +0 -0
package/wasm/wasm_wrapper.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PROPRIETARY SOFTWARE LICENSE
|
|
3
3
|
*
|
|
4
|
-
* Copyright (c)
|
|
4
|
+
* Copyright (c) 2026 Home Energy Foundry Limited
|
|
5
|
+
* Runtime origin marker: HEF-VULCAN-RUNTIME-2026
|
|
5
6
|
*
|
|
6
7
|
* This software and associated documentation files (the "Software") are the
|
|
7
8
|
* proprietary and confidential information of Home Energy Foundry Limited.
|
|
@@ -19,172 +20,10 @@
|
|
|
19
20
|
* For licensing inquiries, contact: info@usevulcan.app
|
|
20
21
|
*/
|
|
21
22
|
|
|
23
|
+
/* @ts-self-types="./wasm_wrapper.d.ts" */
|
|
22
24
|
import { startWorkers } from './snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.no-bundler.js';
|
|
23
25
|
|
|
24
|
-
let wasm;
|
|
25
26
|
|
|
26
|
-
function addToExternrefTable0(obj) {
|
|
27
|
-
const idx = wasm.__externref_table_alloc();
|
|
28
|
-
wasm.__wbindgen_export_2.set(idx, obj);
|
|
29
|
-
return idx;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function handleError(f, args) {
|
|
33
|
-
try {
|
|
34
|
-
return f.apply(this, args);
|
|
35
|
-
} catch (e) {
|
|
36
|
-
const idx = addToExternrefTable0(e);
|
|
37
|
-
wasm.__wbindgen_exn_store(idx);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
42
|
-
|
|
43
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
44
|
-
|
|
45
|
-
let cachedUint8ArrayMemory0 = null;
|
|
46
|
-
|
|
47
|
-
function getUint8ArrayMemory0() {
|
|
48
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
49
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
50
|
-
}
|
|
51
|
-
return cachedUint8ArrayMemory0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function getStringFromWasm0(ptr, len) {
|
|
55
|
-
ptr = ptr >>> 0;
|
|
56
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function isLikeNone(x) {
|
|
60
|
-
return x === undefined || x === null;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function debugString(val) {
|
|
64
|
-
// primitive types
|
|
65
|
-
const type = typeof val;
|
|
66
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
67
|
-
return `${val}`;
|
|
68
|
-
}
|
|
69
|
-
if (type == 'string') {
|
|
70
|
-
return `"${val}"`;
|
|
71
|
-
}
|
|
72
|
-
if (type == 'symbol') {
|
|
73
|
-
const description = val.description;
|
|
74
|
-
if (description == null) {
|
|
75
|
-
return 'Symbol';
|
|
76
|
-
} else {
|
|
77
|
-
return `Symbol(${description})`;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if (type == 'function') {
|
|
81
|
-
const name = val.name;
|
|
82
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
83
|
-
return `Function(${name})`;
|
|
84
|
-
} else {
|
|
85
|
-
return 'Function';
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// objects
|
|
89
|
-
if (Array.isArray(val)) {
|
|
90
|
-
const length = val.length;
|
|
91
|
-
let debug = '[';
|
|
92
|
-
if (length > 0) {
|
|
93
|
-
debug += debugString(val[0]);
|
|
94
|
-
}
|
|
95
|
-
for(let i = 1; i < length; i++) {
|
|
96
|
-
debug += ', ' + debugString(val[i]);
|
|
97
|
-
}
|
|
98
|
-
debug += ']';
|
|
99
|
-
return debug;
|
|
100
|
-
}
|
|
101
|
-
// Test for built-in
|
|
102
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
103
|
-
let className;
|
|
104
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
105
|
-
className = builtInMatches[1];
|
|
106
|
-
} else {
|
|
107
|
-
// Failed to match the standard '[object ClassName]'
|
|
108
|
-
return toString.call(val);
|
|
109
|
-
}
|
|
110
|
-
if (className == 'Object') {
|
|
111
|
-
// we're a user defined class or Object
|
|
112
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
113
|
-
// easier than looping through ownProperties of `val`.
|
|
114
|
-
try {
|
|
115
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
116
|
-
} catch (_) {
|
|
117
|
-
return 'Object';
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
// errors
|
|
121
|
-
if (val instanceof Error) {
|
|
122
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
123
|
-
}
|
|
124
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
125
|
-
return className;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
let WASM_VECTOR_LEN = 0;
|
|
129
|
-
|
|
130
|
-
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
131
|
-
|
|
132
|
-
const encodeString = function (arg, view) {
|
|
133
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
134
|
-
view.set(buf);
|
|
135
|
-
return {
|
|
136
|
-
read: arg.length,
|
|
137
|
-
written: buf.length
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
142
|
-
|
|
143
|
-
if (realloc === undefined) {
|
|
144
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
145
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
146
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
147
|
-
WASM_VECTOR_LEN = buf.length;
|
|
148
|
-
return ptr;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
let len = arg.length;
|
|
152
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
153
|
-
|
|
154
|
-
const mem = getUint8ArrayMemory0();
|
|
155
|
-
|
|
156
|
-
let offset = 0;
|
|
157
|
-
|
|
158
|
-
for (; offset < len; offset++) {
|
|
159
|
-
const code = arg.charCodeAt(offset);
|
|
160
|
-
if (code > 0x7F) break;
|
|
161
|
-
mem[ptr + offset] = code;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (offset !== len) {
|
|
165
|
-
if (offset !== 0) {
|
|
166
|
-
arg = arg.slice(offset);
|
|
167
|
-
}
|
|
168
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
169
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
170
|
-
const ret = encodeString(arg, view);
|
|
171
|
-
|
|
172
|
-
offset += ret.written;
|
|
173
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
WASM_VECTOR_LEN = offset;
|
|
177
|
-
return ptr;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
let cachedDataViewMemory0 = null;
|
|
181
|
-
|
|
182
|
-
function getDataViewMemory0() {
|
|
183
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
184
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
185
|
-
}
|
|
186
|
-
return cachedDataViewMemory0;
|
|
187
|
-
}
|
|
188
27
|
/**
|
|
189
28
|
* Build stamp function to identify WASM builds and detect stale caching
|
|
190
29
|
* This returns a unique identifier that changes with each build
|
|
@@ -204,41 +43,115 @@ export function build_stamp() {
|
|
|
204
43
|
}
|
|
205
44
|
|
|
206
45
|
/**
|
|
207
|
-
*
|
|
208
|
-
* This
|
|
46
|
+
* Calculate metrics from pre-parsed CoreResultsData
|
|
47
|
+
* This function accepts JSON data that has been parsed by the JavaScript CSV parser
|
|
48
|
+
* and returns metric calculation results
|
|
49
|
+
*
|
|
50
|
+
* # Arguments
|
|
51
|
+
* * `data_json` - JSON string containing CoreResultsData (from CSV parser)
|
|
52
|
+
* * `metrics_json` - JSON string containing array of metric definitions
|
|
53
|
+
* * `time_range_json` - Optional JSON string containing TimeRange for filtering
|
|
54
|
+
* * `tariff_rates_json` - Optional JSON string containing tariff rates array for cost metrics
|
|
55
|
+
*
|
|
56
|
+
* # Returns
|
|
57
|
+
* * JSON string with metric calculation results
|
|
58
|
+
* @param {string} data_json
|
|
59
|
+
* @param {string} metrics_json
|
|
60
|
+
* @param {string | null} [time_range_json]
|
|
61
|
+
* @param {string | null} [tariff_rates_json]
|
|
209
62
|
* @returns {string}
|
|
210
63
|
*/
|
|
211
|
-
export function
|
|
212
|
-
let
|
|
213
|
-
let
|
|
64
|
+
export function calculate_metrics_from_parsed_data(data_json, metrics_json, time_range_json, tariff_rates_json) {
|
|
65
|
+
let deferred6_0;
|
|
66
|
+
let deferred6_1;
|
|
214
67
|
try {
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
68
|
+
const ptr0 = passStringToWasm0(data_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
69
|
+
const len0 = WASM_VECTOR_LEN;
|
|
70
|
+
const ptr1 = passStringToWasm0(metrics_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
71
|
+
const len1 = WASM_VECTOR_LEN;
|
|
72
|
+
var ptr2 = isLikeNone(time_range_json) ? 0 : passStringToWasm0(time_range_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
73
|
+
var len2 = WASM_VECTOR_LEN;
|
|
74
|
+
var ptr3 = isLikeNone(tariff_rates_json) ? 0 : passStringToWasm0(tariff_rates_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
75
|
+
var len3 = WASM_VECTOR_LEN;
|
|
76
|
+
const ret = wasm.calculate_metrics_from_parsed_data(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
77
|
+
var ptr5 = ret[0];
|
|
78
|
+
var len5 = ret[1];
|
|
79
|
+
if (ret[3]) {
|
|
80
|
+
ptr5 = 0; len5 = 0;
|
|
81
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
82
|
+
}
|
|
83
|
+
deferred6_0 = ptr5;
|
|
84
|
+
deferred6_1 = len5;
|
|
85
|
+
return getStringFromWasm0(ptr5, len5);
|
|
219
86
|
} finally {
|
|
220
|
-
wasm.__wbindgen_free(
|
|
87
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
221
88
|
}
|
|
222
89
|
}
|
|
223
90
|
|
|
224
91
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
92
|
+
* Convert Geometry CSV -> HEM JSON using shared core (browser path)
|
|
93
|
+
* @param {string} csv
|
|
94
|
+
* @param {string} schema_json
|
|
95
|
+
* @param {string} defaults_json
|
|
227
96
|
* @returns {string}
|
|
228
97
|
*/
|
|
229
|
-
export function
|
|
230
|
-
let
|
|
231
|
-
let
|
|
98
|
+
export function convert_geometry_csv_to_json(csv, schema_json, defaults_json) {
|
|
99
|
+
let deferred4_0;
|
|
100
|
+
let deferred4_1;
|
|
232
101
|
try {
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
102
|
+
const ptr0 = passStringToWasm0(csv, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
103
|
+
const len0 = WASM_VECTOR_LEN;
|
|
104
|
+
const ptr1 = passStringToWasm0(schema_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
105
|
+
const len1 = WASM_VECTOR_LEN;
|
|
106
|
+
const ptr2 = passStringToWasm0(defaults_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
107
|
+
const len2 = WASM_VECTOR_LEN;
|
|
108
|
+
const ret = wasm.convert_geometry_csv_to_json(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
109
|
+
deferred4_0 = ret[0];
|
|
110
|
+
deferred4_1 = ret[1];
|
|
236
111
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
237
112
|
} finally {
|
|
238
|
-
wasm.__wbindgen_free(
|
|
113
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Create directories recursively using the JavaScript fileService
|
|
119
|
+
* @param {string} path
|
|
120
|
+
*/
|
|
121
|
+
export function create_dir_all(path) {
|
|
122
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
123
|
+
const len0 = WASM_VECTOR_LEN;
|
|
124
|
+
const ret = wasm.create_dir_all(ptr0, len0);
|
|
125
|
+
if (ret[1]) {
|
|
126
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
239
127
|
}
|
|
240
128
|
}
|
|
241
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Delete a file using the JavaScript fileService
|
|
132
|
+
* @param {string} path
|
|
133
|
+
*/
|
|
134
|
+
export function delete_file(path) {
|
|
135
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
136
|
+
const len0 = WASM_VECTOR_LEN;
|
|
137
|
+
const ret = wasm.delete_file(ptr0, len0);
|
|
138
|
+
if (ret[1]) {
|
|
139
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Check if a file exists using the JavaScript fileService
|
|
145
|
+
* @param {string} path
|
|
146
|
+
* @returns {boolean}
|
|
147
|
+
*/
|
|
148
|
+
export function file_exists(path) {
|
|
149
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
150
|
+
const len0 = WASM_VECTOR_LEN;
|
|
151
|
+
const ret = wasm.file_exists(ptr0, len0);
|
|
152
|
+
return ret !== 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
242
155
|
/**
|
|
243
156
|
* Get build info as JSON for more detailed debugging
|
|
244
157
|
* @returns {string}
|
|
@@ -257,10 +170,61 @@ export function get_build_info() {
|
|
|
257
170
|
}
|
|
258
171
|
|
|
259
172
|
/**
|
|
260
|
-
*
|
|
173
|
+
* Sum `hem_pv_micro` timestep PV AC output (kWh) over aligned irradiance/shading series (same contract as `annual_pv_kwh_sum`).
|
|
174
|
+
* Returns `[energy_produced_kwh, energy_lost_kwh]` for the full series.
|
|
175
|
+
* @param {number} peak_power_kw
|
|
176
|
+
* @param {number} ventilation_code
|
|
177
|
+
* @param {number} simulation_timestep_hours
|
|
178
|
+
* @param {number} inverter_peak_power_dc_kw
|
|
179
|
+
* @param {number} inverter_peak_power_ac_kw
|
|
180
|
+
* @param {number} inverter_type_code
|
|
181
|
+
* @param {Float64Array} i_sol_dir_w_m2
|
|
182
|
+
* @param {Float64Array} i_sol_dif_w_m2
|
|
183
|
+
* @param {Float64Array} f_sh_dir
|
|
184
|
+
* @param {Float64Array} f_sh_dif
|
|
185
|
+
* @returns {Float64Array}
|
|
261
186
|
*/
|
|
262
|
-
export function
|
|
263
|
-
wasm.
|
|
187
|
+
export function hem_pv_micro_annual_kwh_sum(peak_power_kw, ventilation_code, simulation_timestep_hours, inverter_peak_power_dc_kw, inverter_peak_power_ac_kw, inverter_type_code, i_sol_dir_w_m2, i_sol_dif_w_m2, f_sh_dir, f_sh_dif) {
|
|
188
|
+
const ptr0 = passArrayF64ToWasm0(i_sol_dir_w_m2, wasm.__wbindgen_malloc);
|
|
189
|
+
const len0 = WASM_VECTOR_LEN;
|
|
190
|
+
const ptr1 = passArrayF64ToWasm0(i_sol_dif_w_m2, wasm.__wbindgen_malloc);
|
|
191
|
+
const len1 = WASM_VECTOR_LEN;
|
|
192
|
+
const ptr2 = passArrayF64ToWasm0(f_sh_dir, wasm.__wbindgen_malloc);
|
|
193
|
+
const len2 = WASM_VECTOR_LEN;
|
|
194
|
+
const ptr3 = passArrayF64ToWasm0(f_sh_dif, wasm.__wbindgen_malloc);
|
|
195
|
+
const len3 = WASM_VECTOR_LEN;
|
|
196
|
+
const ret = wasm.hem_pv_micro_annual_kwh_sum(peak_power_kw, ventilation_code, simulation_timestep_hours, inverter_peak_power_dc_kw, inverter_peak_power_ac_kw, inverter_type_code, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
197
|
+
if (ret[3]) {
|
|
198
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
199
|
+
}
|
|
200
|
+
var v5 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
201
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
202
|
+
return v5;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Single-timestep PV AC output (kWh) using the same BS EN 15316 + inverter path as `hem_engine` PV.
|
|
207
|
+
* Returns `[energy_produced_kwh, energy_lost_kwh]` (lost is DC-side energy not delivered as AC).
|
|
208
|
+
*
|
|
209
|
+
* `ventilation_code`: 0 unventilated, 1 moderately ventilated, 2 strongly/forced, 3 rear surface free (invalid → 1).
|
|
210
|
+
* `inverter_type_code`: 0 optimised inverter, 1 string inverter.
|
|
211
|
+
* @param {number} peak_power_kw
|
|
212
|
+
* @param {number} ventilation_code
|
|
213
|
+
* @param {number} simulation_timestep_hours
|
|
214
|
+
* @param {number} inverter_peak_power_dc_kw
|
|
215
|
+
* @param {number} inverter_peak_power_ac_kw
|
|
216
|
+
* @param {number} inverter_type_code
|
|
217
|
+
* @param {number} i_sol_dir_w_m2
|
|
218
|
+
* @param {number} i_sol_dif_w_m2
|
|
219
|
+
* @param {number} f_sh_dir
|
|
220
|
+
* @param {number} f_sh_dif
|
|
221
|
+
* @returns {Float64Array}
|
|
222
|
+
*/
|
|
223
|
+
export function hem_pv_micro_timestep_kwh(peak_power_kw, ventilation_code, simulation_timestep_hours, inverter_peak_power_dc_kw, inverter_peak_power_ac_kw, inverter_type_code, i_sol_dir_w_m2, i_sol_dif_w_m2, f_sh_dir, f_sh_dif) {
|
|
224
|
+
const ret = wasm.hem_pv_micro_timestep_kwh(peak_power_kw, ventilation_code, simulation_timestep_hours, inverter_peak_power_dc_kw, inverter_peak_power_ac_kw, inverter_type_code, i_sol_dir_w_m2, i_sol_dif_w_m2, f_sh_dir, f_sh_dif);
|
|
225
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
226
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
227
|
+
return v1;
|
|
264
228
|
}
|
|
265
229
|
|
|
266
230
|
/**
|
|
@@ -271,74 +235,100 @@ export function init() {
|
|
|
271
235
|
}
|
|
272
236
|
|
|
273
237
|
/**
|
|
274
|
-
* @param {
|
|
275
|
-
* @
|
|
276
|
-
* @returns {bigint}
|
|
238
|
+
* @param {number} num_threads
|
|
239
|
+
* @returns {Promise<any>}
|
|
277
240
|
*/
|
|
278
|
-
export function
|
|
279
|
-
const ret = wasm.
|
|
280
|
-
return
|
|
241
|
+
export function initThreadPool(num_threads) {
|
|
242
|
+
const ret = wasm.initThreadPool(num_threads);
|
|
243
|
+
return ret;
|
|
281
244
|
}
|
|
282
245
|
|
|
283
246
|
/**
|
|
284
|
-
*
|
|
247
|
+
* List files in a directory using the JavaScript fileService
|
|
248
|
+
* @param {string} _path
|
|
249
|
+
* @returns {string[]}
|
|
285
250
|
*/
|
|
286
|
-
export function
|
|
287
|
-
const
|
|
288
|
-
|
|
251
|
+
export function list_dir(_path) {
|
|
252
|
+
const ptr0 = passStringToWasm0(_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
|
+
const len0 = WASM_VECTOR_LEN;
|
|
254
|
+
const ret = wasm.list_dir(ptr0, len0);
|
|
255
|
+
if (ret[3]) {
|
|
256
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
257
|
+
}
|
|
258
|
+
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
259
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
260
|
+
return v2;
|
|
289
261
|
}
|
|
290
262
|
|
|
291
263
|
/**
|
|
292
|
-
*
|
|
293
|
-
* @param {string} csv
|
|
294
|
-
* @param {string} schema_json
|
|
295
|
-
* @param {string} defaults_json
|
|
264
|
+
* FHS wrapper version string (`hem_fhs_upstream::FHS_VERSION`) for profile / about UI.
|
|
296
265
|
* @returns {string}
|
|
297
266
|
*/
|
|
298
|
-
export function
|
|
299
|
-
let
|
|
300
|
-
let
|
|
267
|
+
export function metadata_fhs_wrapper_version() {
|
|
268
|
+
let deferred1_0;
|
|
269
|
+
let deferred1_1;
|
|
301
270
|
try {
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
const len1 = WASM_VECTOR_LEN;
|
|
306
|
-
const ptr2 = passStringToWasm0(defaults_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
307
|
-
const len2 = WASM_VECTOR_LEN;
|
|
308
|
-
const ret = wasm.convert_geometry_csv_to_json(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
309
|
-
deferred4_0 = ret[0];
|
|
310
|
-
deferred4_1 = ret[1];
|
|
271
|
+
const ret = wasm.metadata_fhs_wrapper_version();
|
|
272
|
+
deferred1_0 = ret[0];
|
|
273
|
+
deferred1_1 = ret[1];
|
|
311
274
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
312
275
|
} finally {
|
|
313
|
-
wasm.__wbindgen_free(
|
|
276
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
314
277
|
}
|
|
315
278
|
}
|
|
316
279
|
|
|
317
280
|
/**
|
|
318
|
-
*
|
|
319
|
-
* All inputs are JSON strings to avoid file I/O and be WASM friendly.
|
|
320
|
-
* @param {string} category
|
|
321
|
-
* @param {string} snippet_json
|
|
322
|
-
* @param {string} schema_json
|
|
323
|
-
* @param {string} baseline_json
|
|
324
|
-
* @param {string | null} [simplified_example_json]
|
|
281
|
+
* Same string merged into FHS JSON as `metadata.hem_core_version` (`hem_batch_core::METADATA_HEM_CORE_VERSION`).
|
|
325
282
|
* @returns {string}
|
|
326
283
|
*/
|
|
327
|
-
export function
|
|
284
|
+
export function metadata_hem_core_version() {
|
|
285
|
+
let deferred1_0;
|
|
286
|
+
let deferred1_1;
|
|
287
|
+
try {
|
|
288
|
+
const ret = wasm.metadata_hem_core_version();
|
|
289
|
+
deferred1_0 = ret[0];
|
|
290
|
+
deferred1_1 = ret[1];
|
|
291
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
292
|
+
} finally {
|
|
293
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Process a batch configuration using the existing hem-batch-core logic
|
|
299
|
+
* This function uses the same run_batch_from_config function as the desktop version
|
|
300
|
+
*
|
|
301
|
+
* # Arguments
|
|
302
|
+
* * `config_json` - JSON string containing the batch configuration
|
|
303
|
+
* * `project_root` - Project root directory (relative in browser)
|
|
304
|
+
* * `output_dir` - Output directory (relative in browser)
|
|
305
|
+
* * `config_name` - The actual config filename (e.g., "benchmark_rust_config")
|
|
306
|
+
* * `job_id` - Unique job identifier for progress tracking
|
|
307
|
+
*
|
|
308
|
+
* # Returns
|
|
309
|
+
* * JSON string with processing results
|
|
310
|
+
* @param {string} config_json
|
|
311
|
+
* @param {string} project_root
|
|
312
|
+
* @param {string} output_dir
|
|
313
|
+
* @param {string} config_name
|
|
314
|
+
* @param {string} job_id
|
|
315
|
+
* @returns {string}
|
|
316
|
+
*/
|
|
317
|
+
export function process_batch_config(config_json, project_root, output_dir, config_name, job_id) {
|
|
328
318
|
let deferred6_0;
|
|
329
319
|
let deferred6_1;
|
|
330
320
|
try {
|
|
331
|
-
const ptr0 = passStringToWasm0(
|
|
321
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
332
322
|
const len0 = WASM_VECTOR_LEN;
|
|
333
|
-
const ptr1 = passStringToWasm0(
|
|
323
|
+
const ptr1 = passStringToWasm0(project_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
334
324
|
const len1 = WASM_VECTOR_LEN;
|
|
335
|
-
const ptr2 = passStringToWasm0(
|
|
325
|
+
const ptr2 = passStringToWasm0(output_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
336
326
|
const len2 = WASM_VECTOR_LEN;
|
|
337
|
-
const ptr3 = passStringToWasm0(
|
|
327
|
+
const ptr3 = passStringToWasm0(config_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
338
328
|
const len3 = WASM_VECTOR_LEN;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
const ret = wasm.
|
|
329
|
+
const ptr4 = passStringToWasm0(job_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
330
|
+
const len4 = WASM_VECTOR_LEN;
|
|
331
|
+
const ret = wasm.process_batch_config(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
342
332
|
deferred6_0 = ret[0];
|
|
343
333
|
deferred6_1 = ret[1];
|
|
344
334
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -348,36 +338,59 @@ export function validate_snippet_js(category, snippet_json, schema_json, baselin
|
|
|
348
338
|
}
|
|
349
339
|
|
|
350
340
|
/**
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
* # Arguments
|
|
355
|
-
* * `model_json` - JSON string containing the building model data
|
|
356
|
-
* * `weather_json` - JSON string containing weather data
|
|
357
|
-
*
|
|
358
|
-
* # Returns
|
|
359
|
-
* * JSON string with dummy simulation results
|
|
360
|
-
* @param {string} model_json
|
|
361
|
-
* @param {string} weather_json
|
|
341
|
+
* Read a file using the JavaScript fileService
|
|
342
|
+
* @param {string} path
|
|
362
343
|
* @returns {string}
|
|
363
344
|
*/
|
|
364
|
-
export function
|
|
345
|
+
export function read_file(path) {
|
|
365
346
|
let deferred3_0;
|
|
366
347
|
let deferred3_1;
|
|
367
348
|
try {
|
|
368
|
-
const ptr0 = passStringToWasm0(
|
|
349
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
369
350
|
const len0 = WASM_VECTOR_LEN;
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
351
|
+
const ret = wasm.read_file(ptr0, len0);
|
|
352
|
+
var ptr2 = ret[0];
|
|
353
|
+
var len2 = ret[1];
|
|
354
|
+
if (ret[3]) {
|
|
355
|
+
ptr2 = 0; len2 = 0;
|
|
356
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
357
|
+
}
|
|
358
|
+
deferred3_0 = ptr2;
|
|
359
|
+
deferred3_1 = len2;
|
|
360
|
+
return getStringFromWasm0(ptr2, len2);
|
|
376
361
|
} finally {
|
|
377
362
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
378
363
|
}
|
|
379
364
|
}
|
|
380
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Report batch progress to JavaScript
|
|
368
|
+
* This function will be called from Rust and will invoke the JavaScript report_batch_progress callback
|
|
369
|
+
* @param {string} progress_json
|
|
370
|
+
*/
|
|
371
|
+
export function report_batch_progress(progress_json) {
|
|
372
|
+
const ptr0 = passStringToWasm0(progress_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
373
|
+
const len0 = WASM_VECTOR_LEN;
|
|
374
|
+
const ret = wasm.report_batch_progress(ptr0, len0);
|
|
375
|
+
if (ret[1]) {
|
|
376
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Report simulation progress to JavaScript
|
|
382
|
+
* This function will be called from Rust and will invoke the JavaScript report_simulation_progress callback
|
|
383
|
+
* @param {string} progress_json
|
|
384
|
+
*/
|
|
385
|
+
export function report_simulation_progress(progress_json) {
|
|
386
|
+
const ptr0 = passStringToWasm0(progress_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
387
|
+
const len0 = WASM_VECTOR_LEN;
|
|
388
|
+
const ret = wasm.report_simulation_progress(ptr0, len0);
|
|
389
|
+
if (ret[1]) {
|
|
390
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
381
394
|
/**
|
|
382
395
|
* Real batch simulation function using the shared crate.
|
|
383
396
|
* This replicates the desktop pattern by calling the same run_batch function.
|
|
@@ -422,75 +435,100 @@ export function run_batch_simulation(config_json, base_params_json, weather_cont
|
|
|
422
435
|
}
|
|
423
436
|
|
|
424
437
|
/**
|
|
425
|
-
*
|
|
426
|
-
* This is the main function that should be called for batch processing in the browser
|
|
427
|
-
*
|
|
428
|
-
* # Arguments
|
|
429
|
-
* * `workspace_dir` - Workspace directory path (relative in browser)
|
|
430
|
-
* * `config_path` - Path to the config file
|
|
431
|
-
* * `job_id` - Unique job identifier
|
|
432
|
-
*
|
|
433
|
-
* # Returns
|
|
434
|
-
* * JSON string with execution result
|
|
435
|
-
* @param {string} workspace_dir
|
|
436
|
-
* @param {string} config_path
|
|
437
|
-
* @param {string} job_id
|
|
438
|
+
* Stable runtime provenance marker for copied browser/WASM artifacts.
|
|
438
439
|
* @returns {string}
|
|
439
440
|
*/
|
|
440
|
-
export function
|
|
441
|
-
let
|
|
442
|
-
let
|
|
441
|
+
export function runtime_origin_descriptor() {
|
|
442
|
+
let deferred1_0;
|
|
443
|
+
let deferred1_1;
|
|
444
|
+
try {
|
|
445
|
+
const ret = wasm.runtime_origin_descriptor();
|
|
446
|
+
deferred1_0 = ret[0];
|
|
447
|
+
deferred1_1 = ret[1];
|
|
448
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
449
|
+
} finally {
|
|
450
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Set up panic hook for WASM to capture panic information
|
|
456
|
+
*/
|
|
457
|
+
export function setup_panic_hook() {
|
|
458
|
+
wasm.setup_panic_hook();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Solve a thermal bridge FEM problem in the browser and return the core solution JSON.
|
|
463
|
+
* @param {string} problem_json
|
|
464
|
+
* @returns {string}
|
|
465
|
+
*/
|
|
466
|
+
export function solve_thermal_bridge_problem(problem_json) {
|
|
467
|
+
let deferred3_0;
|
|
468
|
+
let deferred3_1;
|
|
443
469
|
try {
|
|
444
|
-
const ptr0 = passStringToWasm0(
|
|
470
|
+
const ptr0 = passStringToWasm0(problem_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
445
471
|
const len0 = WASM_VECTOR_LEN;
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
472
|
+
const ret = wasm.solve_thermal_bridge_problem(ptr0, len0);
|
|
473
|
+
var ptr2 = ret[0];
|
|
474
|
+
var len2 = ret[1];
|
|
475
|
+
if (ret[3]) {
|
|
476
|
+
ptr2 = 0; len2 = 0;
|
|
477
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
478
|
+
}
|
|
479
|
+
deferred3_0 = ptr2;
|
|
480
|
+
deferred3_1 = len2;
|
|
481
|
+
return getStringFromWasm0(ptr2, len2);
|
|
482
|
+
} finally {
|
|
483
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Run FHS wrapper preflight (schema + Part F preprocessing) without simulation.
|
|
489
|
+
* @param {string} model_json
|
|
490
|
+
* @returns {string}
|
|
491
|
+
*/
|
|
492
|
+
export function validate_fhs_preflight(model_json) {
|
|
493
|
+
let deferred2_0;
|
|
494
|
+
let deferred2_1;
|
|
495
|
+
try {
|
|
496
|
+
const ptr0 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
497
|
+
const len0 = WASM_VECTOR_LEN;
|
|
498
|
+
const ret = wasm.validate_fhs_preflight(ptr0, len0);
|
|
499
|
+
deferred2_0 = ret[0];
|
|
500
|
+
deferred2_1 = ret[1];
|
|
453
501
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
454
502
|
} finally {
|
|
455
|
-
wasm.__wbindgen_free(
|
|
503
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
456
504
|
}
|
|
457
505
|
}
|
|
458
506
|
|
|
459
507
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
* * `config_name` - The actual config filename (e.g., "benchmark_rust_config")
|
|
468
|
-
* * `job_id` - Unique job identifier for progress tracking
|
|
469
|
-
*
|
|
470
|
-
* # Returns
|
|
471
|
-
* * JSON string with processing results
|
|
472
|
-
* @param {string} config_json
|
|
473
|
-
* @param {string} project_root
|
|
474
|
-
* @param {string} output_dir
|
|
475
|
-
* @param {string} config_name
|
|
476
|
-
* @param {string} job_id
|
|
508
|
+
* Validate a snippet in-browser using hem-batch-core validation core.
|
|
509
|
+
* All inputs are JSON strings to avoid file I/O and be WASM friendly.
|
|
510
|
+
* @param {string} category
|
|
511
|
+
* @param {string} snippet_json
|
|
512
|
+
* @param {string} schema_json
|
|
513
|
+
* @param {string} baseline_json
|
|
514
|
+
* @param {string | null} [simplified_example_json]
|
|
477
515
|
* @returns {string}
|
|
478
516
|
*/
|
|
479
|
-
export function
|
|
517
|
+
export function validate_snippet_js(category, snippet_json, schema_json, baseline_json, simplified_example_json) {
|
|
480
518
|
let deferred6_0;
|
|
481
519
|
let deferred6_1;
|
|
482
520
|
try {
|
|
483
|
-
const ptr0 = passStringToWasm0(
|
|
521
|
+
const ptr0 = passStringToWasm0(category, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
484
522
|
const len0 = WASM_VECTOR_LEN;
|
|
485
|
-
const ptr1 = passStringToWasm0(
|
|
523
|
+
const ptr1 = passStringToWasm0(snippet_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
486
524
|
const len1 = WASM_VECTOR_LEN;
|
|
487
|
-
const ptr2 = passStringToWasm0(
|
|
525
|
+
const ptr2 = passStringToWasm0(schema_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
488
526
|
const len2 = WASM_VECTOR_LEN;
|
|
489
|
-
const ptr3 = passStringToWasm0(
|
|
527
|
+
const ptr3 = passStringToWasm0(baseline_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
490
528
|
const len3 = WASM_VECTOR_LEN;
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
const ret = wasm.
|
|
529
|
+
var ptr4 = isLikeNone(simplified_example_json) ? 0 : passStringToWasm0(simplified_example_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
530
|
+
var len4 = WASM_VECTOR_LEN;
|
|
531
|
+
const ret = wasm.validate_snippet_js(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
494
532
|
deferred6_0 = ret[0];
|
|
495
533
|
deferred6_1 = ret[1];
|
|
496
534
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -499,101 +537,127 @@ export function process_batch_config(config_json, project_root, output_dir, conf
|
|
|
499
537
|
}
|
|
500
538
|
}
|
|
501
539
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
540
|
+
export class wbg_rayon_PoolBuilder {
|
|
541
|
+
static __wrap(ptr) {
|
|
542
|
+
const obj = Object.create(wbg_rayon_PoolBuilder.prototype);
|
|
543
|
+
obj.__wbg_ptr = ptr;
|
|
544
|
+
wbg_rayon_PoolBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
545
|
+
return obj;
|
|
546
|
+
}
|
|
547
|
+
__destroy_into_raw() {
|
|
548
|
+
const ptr = this.__wbg_ptr;
|
|
549
|
+
this.__wbg_ptr = 0;
|
|
550
|
+
wbg_rayon_PoolBuilderFinalization.unregister(this);
|
|
551
|
+
return ptr;
|
|
552
|
+
}
|
|
553
|
+
free() {
|
|
554
|
+
const ptr = this.__destroy_into_raw();
|
|
555
|
+
wasm.__wbg_wbg_rayon_poolbuilder_free(ptr, 0);
|
|
556
|
+
}
|
|
557
|
+
build() {
|
|
558
|
+
wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* @returns {string}
|
|
562
|
+
*/
|
|
563
|
+
mainJS() {
|
|
564
|
+
const ret = wasm.wbg_rayon_poolbuilder_mainJS(this.__wbg_ptr);
|
|
565
|
+
return ret;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* @returns {number}
|
|
569
|
+
*/
|
|
570
|
+
numThreads() {
|
|
571
|
+
const ret = wasm.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr);
|
|
572
|
+
return ret >>> 0;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* @returns {number}
|
|
576
|
+
*/
|
|
577
|
+
receiver() {
|
|
578
|
+
const ret = wasm.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr);
|
|
579
|
+
return ret >>> 0;
|
|
580
|
+
}
|
|
506
581
|
}
|
|
582
|
+
if (Symbol.dispose) wbg_rayon_PoolBuilder.prototype[Symbol.dispose] = wbg_rayon_PoolBuilder.prototype.free;
|
|
583
|
+
|
|
507
584
|
/**
|
|
508
|
-
*
|
|
509
|
-
* This function accepts JSON data that has been parsed by the JavaScript CSV parser
|
|
510
|
-
* and returns metric calculation results
|
|
511
|
-
*
|
|
512
|
-
* # Arguments
|
|
513
|
-
* * `data_json` - JSON string containing CoreResultsData (from CSV parser)
|
|
514
|
-
* * `metrics_json` - JSON string containing array of metric definitions
|
|
515
|
-
* * `time_range_json` - Optional JSON string containing TimeRange for filtering
|
|
516
|
-
* * `tariff_rates_json` - Optional JSON string containing tariff rates array for cost metrics
|
|
517
|
-
*
|
|
518
|
-
* # Returns
|
|
519
|
-
* * JSON string with metric calculation results
|
|
520
|
-
* @param {string} data_json
|
|
521
|
-
* @param {string} metrics_json
|
|
522
|
-
* @param {string | null} [time_range_json]
|
|
523
|
-
* @param {string | null} [tariff_rates_json]
|
|
524
|
-
* @returns {string}
|
|
585
|
+
* @param {number} receiver
|
|
525
586
|
*/
|
|
526
|
-
export function
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
var len5 = ret[1];
|
|
541
|
-
if (ret[3]) {
|
|
542
|
-
ptr5 = 0; len5 = 0;
|
|
543
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
544
|
-
}
|
|
545
|
-
deferred6_0 = ptr5;
|
|
546
|
-
deferred6_1 = len5;
|
|
547
|
-
return getStringFromWasm0(ptr5, len5);
|
|
548
|
-
} finally {
|
|
549
|
-
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
587
|
+
export function wbg_rayon_start_worker(receiver) {
|
|
588
|
+
wasm.wbg_rayon_start_worker(receiver);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Create directories using synchronous cache (like main thread)
|
|
593
|
+
* @param {string} path
|
|
594
|
+
*/
|
|
595
|
+
export function worker_create_dir_all(path) {
|
|
596
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
597
|
+
const len0 = WASM_VECTOR_LEN;
|
|
598
|
+
const ret = wasm.worker_create_dir_all(ptr0, len0);
|
|
599
|
+
if (ret[1]) {
|
|
600
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
550
601
|
}
|
|
551
602
|
}
|
|
552
603
|
|
|
553
604
|
/**
|
|
554
|
-
*
|
|
555
|
-
* @
|
|
605
|
+
* Delete a file using synchronous cache (like main thread)
|
|
606
|
+
* @param {string} path
|
|
556
607
|
*/
|
|
557
|
-
export function
|
|
558
|
-
const
|
|
559
|
-
|
|
608
|
+
export function worker_delete_file(path) {
|
|
609
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
610
|
+
const len0 = WASM_VECTOR_LEN;
|
|
611
|
+
const ret = wasm.worker_delete_file(ptr0, len0);
|
|
612
|
+
if (ret[1]) {
|
|
613
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
614
|
+
}
|
|
560
615
|
}
|
|
561
616
|
|
|
562
617
|
/**
|
|
563
|
-
*
|
|
618
|
+
* Check if a file exists using synchronous cache (like main thread)
|
|
619
|
+
* @param {string} path
|
|
620
|
+
* @returns {boolean}
|
|
564
621
|
*/
|
|
565
|
-
export function
|
|
566
|
-
wasm.
|
|
622
|
+
export function worker_file_exists(path) {
|
|
623
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
624
|
+
const len0 = WASM_VECTOR_LEN;
|
|
625
|
+
const ret = wasm.worker_file_exists(ptr0, len0);
|
|
626
|
+
if (ret[2]) {
|
|
627
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
628
|
+
}
|
|
629
|
+
return ret[0] !== 0;
|
|
567
630
|
}
|
|
568
631
|
|
|
569
632
|
/**
|
|
570
|
-
*
|
|
633
|
+
* List files in a directory using synchronous cache (like main thread)
|
|
571
634
|
* @param {string} path
|
|
572
|
-
* @
|
|
635
|
+
* @returns {string[]}
|
|
573
636
|
*/
|
|
574
|
-
export function
|
|
637
|
+
export function worker_list_dir(path) {
|
|
575
638
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
576
639
|
const len0 = WASM_VECTOR_LEN;
|
|
577
|
-
const
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
if (ret[1]) {
|
|
581
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
640
|
+
const ret = wasm.worker_list_dir(ptr0, len0);
|
|
641
|
+
if (ret[3]) {
|
|
642
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
582
643
|
}
|
|
644
|
+
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
645
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
646
|
+
return v2;
|
|
583
647
|
}
|
|
584
648
|
|
|
585
649
|
/**
|
|
586
|
-
* Read a file using
|
|
650
|
+
* Read a file using synchronous cache (like main thread)
|
|
587
651
|
* @param {string} path
|
|
588
652
|
* @returns {string}
|
|
589
653
|
*/
|
|
590
|
-
export function
|
|
654
|
+
export function worker_read_file(path) {
|
|
591
655
|
let deferred3_0;
|
|
592
656
|
let deferred3_1;
|
|
593
657
|
try {
|
|
594
658
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
595
659
|
const len0 = WASM_VECTOR_LEN;
|
|
596
|
-
const ret = wasm.
|
|
660
|
+
const ret = wasm.worker_read_file(ptr0, len0);
|
|
597
661
|
var ptr2 = ret[0];
|
|
598
662
|
var len2 = ret[1];
|
|
599
663
|
if (ret[3]) {
|
|
@@ -609,248 +673,498 @@ export function read_file(path) {
|
|
|
609
673
|
}
|
|
610
674
|
|
|
611
675
|
/**
|
|
612
|
-
*
|
|
613
|
-
* @param {string} path
|
|
614
|
-
* @returns {boolean}
|
|
615
|
-
*/
|
|
616
|
-
export function file_exists(path) {
|
|
617
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
618
|
-
const len0 = WASM_VECTOR_LEN;
|
|
619
|
-
const ret = wasm.file_exists(ptr0, len0);
|
|
620
|
-
return ret !== 0;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* Create directories recursively using the JavaScript fileService
|
|
625
|
-
* @param {string} path
|
|
626
|
-
*/
|
|
627
|
-
export function create_dir_all(path) {
|
|
628
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
629
|
-
const len0 = WASM_VECTOR_LEN;
|
|
630
|
-
const ret = wasm.create_dir_all(ptr0, len0);
|
|
631
|
-
if (ret[1]) {
|
|
632
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* Report batch progress to JavaScript
|
|
638
|
-
* This function will be called from Rust and will invoke the JavaScript report_batch_progress callback
|
|
676
|
+
* Report batch progress using message passing to main thread
|
|
639
677
|
* @param {string} progress_json
|
|
640
678
|
*/
|
|
641
|
-
export function
|
|
679
|
+
export function worker_report_batch_progress(progress_json) {
|
|
642
680
|
const ptr0 = passStringToWasm0(progress_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
643
681
|
const len0 = WASM_VECTOR_LEN;
|
|
644
|
-
const ret = wasm.
|
|
682
|
+
const ret = wasm.worker_report_batch_progress(ptr0, len0);
|
|
645
683
|
if (ret[1]) {
|
|
646
684
|
throw takeFromExternrefTable0(ret[0]);
|
|
647
685
|
}
|
|
648
686
|
}
|
|
649
687
|
|
|
650
688
|
/**
|
|
651
|
-
* Report simulation progress to
|
|
652
|
-
* This function will be called from Rust and will invoke the JavaScript report_simulation_progress callback
|
|
689
|
+
* Report simulation progress using message passing to main thread
|
|
653
690
|
* @param {string} progress_json
|
|
654
691
|
*/
|
|
655
|
-
export function
|
|
692
|
+
export function worker_report_simulation_progress(progress_json) {
|
|
656
693
|
const ptr0 = passStringToWasm0(progress_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
657
694
|
const len0 = WASM_VECTOR_LEN;
|
|
658
|
-
const ret = wasm.
|
|
695
|
+
const ret = wasm.worker_report_simulation_progress(ptr0, len0);
|
|
659
696
|
if (ret[1]) {
|
|
660
697
|
throw takeFromExternrefTable0(ret[0]);
|
|
661
698
|
}
|
|
662
699
|
}
|
|
663
700
|
|
|
664
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
665
|
-
ptr = ptr >>> 0;
|
|
666
|
-
const mem = getDataViewMemory0();
|
|
667
|
-
const result = [];
|
|
668
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
669
|
-
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
670
|
-
}
|
|
671
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
672
|
-
return result;
|
|
673
|
-
}
|
|
674
701
|
/**
|
|
675
|
-
*
|
|
702
|
+
* Worker file system functions that use message passing to main thread
|
|
703
|
+
* Write a file using synchronous cache (like main thread)
|
|
676
704
|
* @param {string} path
|
|
677
|
-
* @
|
|
705
|
+
* @param {string} content
|
|
678
706
|
*/
|
|
679
|
-
export function
|
|
707
|
+
export function worker_write_file(path, content) {
|
|
680
708
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
681
709
|
const len0 = WASM_VECTOR_LEN;
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
|
|
710
|
+
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
711
|
+
const len1 = WASM_VECTOR_LEN;
|
|
712
|
+
const ret = wasm.worker_write_file(ptr0, len0, ptr1, len1);
|
|
713
|
+
if (ret[1]) {
|
|
714
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
685
715
|
}
|
|
686
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
687
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
688
|
-
return v2;
|
|
689
716
|
}
|
|
690
717
|
|
|
691
718
|
/**
|
|
692
|
-
*
|
|
693
|
-
* Write a file using synchronous cache (like main thread)
|
|
719
|
+
* Write a file using the JavaScript fileService
|
|
694
720
|
* @param {string} path
|
|
695
721
|
* @param {string} content
|
|
696
722
|
*/
|
|
697
|
-
export function
|
|
723
|
+
export function write_file(path, content) {
|
|
698
724
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
725
|
const len0 = WASM_VECTOR_LEN;
|
|
700
726
|
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
727
|
const len1 = WASM_VECTOR_LEN;
|
|
702
|
-
const ret = wasm.
|
|
728
|
+
const ret = wasm.write_file(ptr0, len0, ptr1, len1);
|
|
703
729
|
if (ret[1]) {
|
|
704
730
|
throw takeFromExternrefTable0(ret[0]);
|
|
705
731
|
}
|
|
706
732
|
}
|
|
733
|
+
function __wbg_get_imports(memory) {
|
|
734
|
+
const import0 = {
|
|
735
|
+
__proto__: null,
|
|
736
|
+
__wbg___wbindgen_boolean_get_edaed31a367ce1bd: function(arg0) {
|
|
737
|
+
const v = arg0;
|
|
738
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
739
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
740
|
+
},
|
|
741
|
+
__wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) {
|
|
742
|
+
const ret = debugString(arg1);
|
|
743
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
744
|
+
const len1 = WASM_VECTOR_LEN;
|
|
745
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
746
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
747
|
+
},
|
|
748
|
+
__wbg___wbindgen_is_function_acc5528be2b923f2: function(arg0) {
|
|
749
|
+
const ret = typeof(arg0) === 'function';
|
|
750
|
+
return ret;
|
|
751
|
+
},
|
|
752
|
+
__wbg___wbindgen_is_object_0beba4a1980d3eea: function(arg0) {
|
|
753
|
+
const val = arg0;
|
|
754
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
755
|
+
return ret;
|
|
756
|
+
},
|
|
757
|
+
__wbg___wbindgen_is_undefined_721f8decd50c87a3: function(arg0) {
|
|
758
|
+
const ret = arg0 === undefined;
|
|
759
|
+
return ret;
|
|
760
|
+
},
|
|
761
|
+
__wbg___wbindgen_memory_9751d9a3017e7c25: function() {
|
|
762
|
+
const ret = wasm.memory;
|
|
763
|
+
return ret;
|
|
764
|
+
},
|
|
765
|
+
__wbg___wbindgen_module_f86f28f0f85995dd: function() {
|
|
766
|
+
const ret = wasmModule;
|
|
767
|
+
return ret;
|
|
768
|
+
},
|
|
769
|
+
__wbg___wbindgen_string_get_71bb4348194e31f0: function(arg0, arg1) {
|
|
770
|
+
const obj = arg1;
|
|
771
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
772
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
773
|
+
var len1 = WASM_VECTOR_LEN;
|
|
774
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
775
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
776
|
+
},
|
|
777
|
+
__wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
|
|
778
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
779
|
+
},
|
|
780
|
+
__wbg_apply_b37ddce350829e95: function() { return handleError(function (arg0, arg1, arg2) {
|
|
781
|
+
const ret = arg0.apply(arg1, arg2);
|
|
782
|
+
return ret;
|
|
783
|
+
}, arguments); },
|
|
784
|
+
__wbg_error_933f449d72fef598: function(arg0) {
|
|
785
|
+
console.error(arg0);
|
|
786
|
+
},
|
|
787
|
+
__wbg_getRandomValues_b2176991427f6db8: function() { return handleError(function (arg0) {
|
|
788
|
+
globalThis.crypto.getRandomValues(arg0);
|
|
789
|
+
}, arguments); },
|
|
790
|
+
__wbg_getTime_7a770f8a2ec8d634: function(arg0) {
|
|
791
|
+
const ret = arg0.getTime();
|
|
792
|
+
return ret;
|
|
793
|
+
},
|
|
794
|
+
__wbg_get_197a3fe98f169e38: function(arg0, arg1) {
|
|
795
|
+
const ret = arg0[arg1 >>> 0];
|
|
796
|
+
return ret;
|
|
797
|
+
},
|
|
798
|
+
__wbg_get_2ce09c920398340c: function(arg0, arg1, arg2) {
|
|
799
|
+
const ret = arg0[getStringFromWasm0(arg1, arg2)];
|
|
800
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
801
|
+
},
|
|
802
|
+
__wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
|
|
803
|
+
const ret = Reflect.get(arg0, arg1);
|
|
804
|
+
return ret;
|
|
805
|
+
}, arguments); },
|
|
806
|
+
__wbg_hardwareConcurrency_39543e75ca857dac: function(arg0) {
|
|
807
|
+
const ret = arg0.hardwareConcurrency;
|
|
808
|
+
return ret;
|
|
809
|
+
},
|
|
810
|
+
__wbg_has_4f060fe202ad7e87: function() { return handleError(function (arg0, arg1) {
|
|
811
|
+
const ret = Reflect.has(arg0, arg1);
|
|
812
|
+
return ret;
|
|
813
|
+
}, arguments); },
|
|
814
|
+
__wbg_instanceof_Window_0d356b88a2f77c42: function(arg0) {
|
|
815
|
+
let result;
|
|
816
|
+
try {
|
|
817
|
+
result = arg0 instanceof Window;
|
|
818
|
+
} catch (_) {
|
|
819
|
+
result = false;
|
|
820
|
+
}
|
|
821
|
+
const ret = result;
|
|
822
|
+
return ret;
|
|
823
|
+
},
|
|
824
|
+
__wbg_isArray_145a34fd0a38d37b: function(arg0) {
|
|
825
|
+
const ret = Array.isArray(arg0);
|
|
826
|
+
return ret;
|
|
827
|
+
},
|
|
828
|
+
__wbg_length_589238bdcf171f0e: function(arg0) {
|
|
829
|
+
const ret = arg0.length;
|
|
830
|
+
return ret;
|
|
831
|
+
},
|
|
832
|
+
__wbg_length_c6054974c0a6cdb9: function(arg0) {
|
|
833
|
+
const ret = arg0.length;
|
|
834
|
+
return ret;
|
|
835
|
+
},
|
|
836
|
+
__wbg_log_6b5af08dd293697f: function(arg0) {
|
|
837
|
+
console.log(arg0);
|
|
838
|
+
},
|
|
839
|
+
__wbg_navigator_935098efd1dc7fe5: function(arg0) {
|
|
840
|
+
const ret = arg0.navigator;
|
|
841
|
+
return ret;
|
|
842
|
+
},
|
|
843
|
+
__wbg_new_0_1b32bedde98fef4b: function() {
|
|
844
|
+
const ret = new Date();
|
|
845
|
+
return ret;
|
|
846
|
+
},
|
|
847
|
+
__wbg_new_2e117a478906f062: function() {
|
|
848
|
+
const ret = new Object();
|
|
849
|
+
return ret;
|
|
850
|
+
},
|
|
851
|
+
__wbg_new_36e147a8ced3c6e0: function() {
|
|
852
|
+
const ret = new Array();
|
|
853
|
+
return ret;
|
|
854
|
+
},
|
|
855
|
+
__wbg_new_with_length_9b650f44b5c44a4e: function(arg0) {
|
|
856
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
857
|
+
return ret;
|
|
858
|
+
},
|
|
859
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
860
|
+
const ret = arg0.now();
|
|
861
|
+
return ret;
|
|
862
|
+
},
|
|
863
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
864
|
+
const ret = arg0.performance;
|
|
865
|
+
return ret;
|
|
866
|
+
},
|
|
867
|
+
__wbg_postMessage_22207429888eccbb: function(arg0) {
|
|
868
|
+
self.postMessage(arg0);
|
|
869
|
+
},
|
|
870
|
+
__wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) {
|
|
871
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
872
|
+
},
|
|
873
|
+
__wbg_push_f724b5db8acf89d2: function(arg0, arg1) {
|
|
874
|
+
const ret = arg0.push(arg1);
|
|
875
|
+
return ret;
|
|
876
|
+
},
|
|
877
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
878
|
+
arg0[arg1] = arg2;
|
|
879
|
+
},
|
|
880
|
+
__wbg_startWorkers_622cedd0d351664e: function(arg0, arg1, arg2) {
|
|
881
|
+
const ret = startWorkers(arg0, arg1, wbg_rayon_PoolBuilder.__wrap(arg2));
|
|
882
|
+
return ret;
|
|
883
|
+
},
|
|
884
|
+
__wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938: function() {
|
|
885
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
886
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
887
|
+
},
|
|
888
|
+
__wbg_static_accessor_GLOBAL_ce44e66a4935da8c: function() {
|
|
889
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
890
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
891
|
+
},
|
|
892
|
+
__wbg_static_accessor_SELF_44f6e0cb5e67cdad: function() {
|
|
893
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
894
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
895
|
+
},
|
|
896
|
+
__wbg_static_accessor_URL_151cb8815849ce83: function() {
|
|
897
|
+
const ret = import.meta.url;
|
|
898
|
+
return ret;
|
|
899
|
+
},
|
|
900
|
+
__wbg_static_accessor_WINDOW_168f178805d978fe: function() {
|
|
901
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
902
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
903
|
+
},
|
|
904
|
+
__wbg_subarray_b0e8ac4ed313fea8: function(arg0, arg1, arg2) {
|
|
905
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
906
|
+
return ret;
|
|
907
|
+
},
|
|
908
|
+
__wbg_timeOrigin_f3d5cb4f4a06c2b7: function(arg0) {
|
|
909
|
+
const ret = arg0.timeOrigin;
|
|
910
|
+
return ret;
|
|
911
|
+
},
|
|
912
|
+
__wbg_warn_cd671287bc02594a: function(arg0) {
|
|
913
|
+
console.warn(arg0);
|
|
914
|
+
},
|
|
915
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
916
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
917
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
918
|
+
return ret;
|
|
919
|
+
},
|
|
920
|
+
__wbindgen_init_externref_table: function() {
|
|
921
|
+
const table = wasm.__wbindgen_externrefs;
|
|
922
|
+
const offset = table.grow(4);
|
|
923
|
+
table.set(0, undefined);
|
|
924
|
+
table.set(offset + 0, undefined);
|
|
925
|
+
table.set(offset + 1, null);
|
|
926
|
+
table.set(offset + 2, true);
|
|
927
|
+
table.set(offset + 3, false);
|
|
928
|
+
},
|
|
929
|
+
memory: memory || new WebAssembly.Memory({initial:118,maximum:16384,shared:true}),
|
|
930
|
+
};
|
|
931
|
+
return {
|
|
932
|
+
__proto__: null,
|
|
933
|
+
"./wasm_wrapper_bg.js": import0,
|
|
934
|
+
};
|
|
935
|
+
}
|
|
707
936
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
937
|
+
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
938
|
+
? { register: () => {}, unregister: () => {} }
|
|
939
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr, 1));
|
|
940
|
+
|
|
941
|
+
function addToExternrefTable0(obj) {
|
|
942
|
+
const idx = wasm.__externref_table_alloc();
|
|
943
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
944
|
+
return idx;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
function debugString(val) {
|
|
948
|
+
// primitive types
|
|
949
|
+
const type = typeof val;
|
|
950
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
951
|
+
return `${val}`;
|
|
952
|
+
}
|
|
953
|
+
if (type == 'string') {
|
|
954
|
+
return `"${val}"`;
|
|
955
|
+
}
|
|
956
|
+
if (type == 'symbol') {
|
|
957
|
+
const description = val.description;
|
|
958
|
+
if (description == null) {
|
|
959
|
+
return 'Symbol';
|
|
960
|
+
} else {
|
|
961
|
+
return `Symbol(${description})`;
|
|
725
962
|
}
|
|
726
|
-
deferred3_0 = ptr2;
|
|
727
|
-
deferred3_1 = len2;
|
|
728
|
-
return getStringFromWasm0(ptr2, len2);
|
|
729
|
-
} finally {
|
|
730
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
731
963
|
}
|
|
964
|
+
if (type == 'function') {
|
|
965
|
+
const name = val.name;
|
|
966
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
967
|
+
return `Function(${name})`;
|
|
968
|
+
} else {
|
|
969
|
+
return 'Function';
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
// objects
|
|
973
|
+
if (Array.isArray(val)) {
|
|
974
|
+
const length = val.length;
|
|
975
|
+
let debug = '[';
|
|
976
|
+
if (length > 0) {
|
|
977
|
+
debug += debugString(val[0]);
|
|
978
|
+
}
|
|
979
|
+
for(let i = 1; i < length; i++) {
|
|
980
|
+
debug += ', ' + debugString(val[i]);
|
|
981
|
+
}
|
|
982
|
+
debug += ']';
|
|
983
|
+
return debug;
|
|
984
|
+
}
|
|
985
|
+
// Test for built-in
|
|
986
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
987
|
+
let className;
|
|
988
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
989
|
+
className = builtInMatches[1];
|
|
990
|
+
} else {
|
|
991
|
+
// Failed to match the standard '[object ClassName]'
|
|
992
|
+
return toString.call(val);
|
|
993
|
+
}
|
|
994
|
+
if (className == 'Object') {
|
|
995
|
+
// we're a user defined class or Object
|
|
996
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
997
|
+
// easier than looping through ownProperties of `val`.
|
|
998
|
+
try {
|
|
999
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1000
|
+
} catch (_) {
|
|
1001
|
+
return 'Object';
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
// errors
|
|
1005
|
+
if (val instanceof Error) {
|
|
1006
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1007
|
+
}
|
|
1008
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1009
|
+
return className;
|
|
732
1010
|
}
|
|
733
1011
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
|
|
1012
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
1013
|
+
ptr = ptr >>> 0;
|
|
1014
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1018
|
+
ptr = ptr >>> 0;
|
|
1019
|
+
const mem = getDataViewMemory0();
|
|
1020
|
+
const result = [];
|
|
1021
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1022
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
745
1023
|
}
|
|
746
|
-
|
|
1024
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
1025
|
+
return result;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1029
|
+
ptr = ptr >>> 0;
|
|
1030
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
let cachedDataViewMemory0 = null;
|
|
1034
|
+
function getDataViewMemory0() {
|
|
1035
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
1036
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1037
|
+
}
|
|
1038
|
+
return cachedDataViewMemory0;
|
|
747
1039
|
}
|
|
748
1040
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
export function worker_create_dir_all(path) {
|
|
754
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
755
|
-
const len0 = WASM_VECTOR_LEN;
|
|
756
|
-
const ret = wasm.worker_create_dir_all(ptr0, len0);
|
|
757
|
-
if (ret[1]) {
|
|
758
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1041
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
1042
|
+
function getFloat64ArrayMemory0() {
|
|
1043
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
1044
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
759
1045
|
}
|
|
1046
|
+
return cachedFloat64ArrayMemory0;
|
|
760
1047
|
}
|
|
761
1048
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
* @param {string} path
|
|
765
|
-
* @returns {string[]}
|
|
766
|
-
*/
|
|
767
|
-
export function worker_list_dir(path) {
|
|
768
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
769
|
-
const len0 = WASM_VECTOR_LEN;
|
|
770
|
-
const ret = wasm.worker_list_dir(ptr0, len0);
|
|
771
|
-
if (ret[3]) {
|
|
772
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
773
|
-
}
|
|
774
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
775
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
776
|
-
return v2;
|
|
1049
|
+
function getStringFromWasm0(ptr, len) {
|
|
1050
|
+
return decodeText(ptr >>> 0, len);
|
|
777
1051
|
}
|
|
778
1052
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
export function worker_report_batch_progress(progress_json) {
|
|
784
|
-
const ptr0 = passStringToWasm0(progress_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
785
|
-
const len0 = WASM_VECTOR_LEN;
|
|
786
|
-
const ret = wasm.worker_report_batch_progress(ptr0, len0);
|
|
787
|
-
if (ret[1]) {
|
|
788
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1053
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1054
|
+
function getUint8ArrayMemory0() {
|
|
1055
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
1056
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
789
1057
|
}
|
|
1058
|
+
return cachedUint8ArrayMemory0;
|
|
790
1059
|
}
|
|
791
1060
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
const len0 = WASM_VECTOR_LEN;
|
|
799
|
-
const ret = wasm.worker_report_simulation_progress(ptr0, len0);
|
|
800
|
-
if (ret[1]) {
|
|
801
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1061
|
+
function handleError(f, args) {
|
|
1062
|
+
try {
|
|
1063
|
+
return f.apply(this, args);
|
|
1064
|
+
} catch (e) {
|
|
1065
|
+
const idx = addToExternrefTable0(e);
|
|
1066
|
+
wasm.__wbindgen_exn_store(idx);
|
|
802
1067
|
}
|
|
803
1068
|
}
|
|
804
1069
|
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
export class wbg_rayon_PoolBuilder {
|
|
1070
|
+
function isLikeNone(x) {
|
|
1071
|
+
return x === undefined || x === null;
|
|
1072
|
+
}
|
|
810
1073
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
}
|
|
1074
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
1075
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
1076
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
1077
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1078
|
+
return ptr;
|
|
1079
|
+
}
|
|
818
1080
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
1081
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1082
|
+
if (realloc === undefined) {
|
|
1083
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1084
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1085
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1086
|
+
WASM_VECTOR_LEN = buf.length;
|
|
823
1087
|
return ptr;
|
|
824
1088
|
}
|
|
825
1089
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
const
|
|
835
|
-
|
|
1090
|
+
let len = arg.length;
|
|
1091
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1092
|
+
|
|
1093
|
+
const mem = getUint8ArrayMemory0();
|
|
1094
|
+
|
|
1095
|
+
let offset = 0;
|
|
1096
|
+
|
|
1097
|
+
for (; offset < len; offset++) {
|
|
1098
|
+
const code = arg.charCodeAt(offset);
|
|
1099
|
+
if (code > 0x7F) break;
|
|
1100
|
+
mem[ptr + offset] = code;
|
|
836
1101
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
1102
|
+
if (offset !== len) {
|
|
1103
|
+
if (offset !== 0) {
|
|
1104
|
+
arg = arg.slice(offset);
|
|
1105
|
+
}
|
|
1106
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1107
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1108
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1109
|
+
|
|
1110
|
+
offset += ret.written;
|
|
1111
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
843
1112
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
1113
|
+
|
|
1114
|
+
WASM_VECTOR_LEN = offset;
|
|
1115
|
+
return ptr;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
function takeFromExternrefTable0(idx) {
|
|
1119
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1120
|
+
wasm.__externref_table_dealloc(idx);
|
|
1121
|
+
return value;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : undefined);
|
|
1125
|
+
if (cachedTextDecoder) cachedTextDecoder.decode();
|
|
1126
|
+
|
|
1127
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1128
|
+
let numBytesDecoded = 0;
|
|
1129
|
+
function decodeText(ptr, len) {
|
|
1130
|
+
numBytesDecoded += len;
|
|
1131
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1132
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1133
|
+
cachedTextDecoder.decode();
|
|
1134
|
+
numBytesDecoded = len;
|
|
850
1135
|
}
|
|
851
|
-
|
|
852
|
-
|
|
1136
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined);
|
|
1140
|
+
|
|
1141
|
+
if (cachedTextEncoder) {
|
|
1142
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1143
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1144
|
+
view.set(buf);
|
|
1145
|
+
return {
|
|
1146
|
+
read: arg.length,
|
|
1147
|
+
written: buf.length
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
let WASM_VECTOR_LEN = 0;
|
|
1153
|
+
|
|
1154
|
+
let wasmModule, wasmInstance, wasm;
|
|
1155
|
+
function __wbg_finalize_init(instance, module, thread_stack_size) {
|
|
1156
|
+
wasmInstance = instance;
|
|
1157
|
+
wasm = instance.exports;
|
|
1158
|
+
wasmModule = module;
|
|
1159
|
+
cachedDataViewMemory0 = null;
|
|
1160
|
+
cachedFloat64ArrayMemory0 = null;
|
|
1161
|
+
cachedUint8ArrayMemory0 = null;
|
|
1162
|
+
if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) {
|
|
1163
|
+
throw new Error('invalid stack size');
|
|
853
1164
|
}
|
|
1165
|
+
|
|
1166
|
+
wasm.__wbindgen_start(thread_stack_size);
|
|
1167
|
+
return wasm;
|
|
854
1168
|
}
|
|
855
1169
|
|
|
856
1170
|
async function __wbg_load(module, imports) {
|
|
@@ -858,268 +1172,41 @@ async function __wbg_load(module, imports) {
|
|
|
858
1172
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
859
1173
|
try {
|
|
860
1174
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
861
|
-
|
|
862
1175
|
} catch (e) {
|
|
863
|
-
|
|
1176
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1177
|
+
|
|
1178
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
864
1179
|
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);
|
|
865
1180
|
|
|
866
|
-
} else {
|
|
867
|
-
throw e;
|
|
868
|
-
}
|
|
1181
|
+
} else { throw e; }
|
|
869
1182
|
}
|
|
870
1183
|
}
|
|
871
1184
|
|
|
872
1185
|
const bytes = await module.arrayBuffer();
|
|
873
1186
|
return await WebAssembly.instantiate(bytes, imports);
|
|
874
|
-
|
|
875
1187
|
} else {
|
|
876
1188
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
877
1189
|
|
|
878
1190
|
if (instance instanceof WebAssembly.Instance) {
|
|
879
1191
|
return { instance, module };
|
|
880
|
-
|
|
881
1192
|
} else {
|
|
882
1193
|
return instance;
|
|
883
1194
|
}
|
|
884
1195
|
}
|
|
885
|
-
}
|
|
886
1196
|
|
|
887
|
-
function
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
imports.wbg.__wbg_apply_36be6a55257c99bf = function() { return handleError(function (arg0, arg1, arg2) {
|
|
891
|
-
const ret = arg0.apply(arg1, arg2);
|
|
892
|
-
return ret;
|
|
893
|
-
}, arguments) };
|
|
894
|
-
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
895
|
-
const ret = arg0.buffer;
|
|
896
|
-
return ret;
|
|
897
|
-
};
|
|
898
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
899
|
-
const ret = arg0.call(arg1);
|
|
900
|
-
return ret;
|
|
901
|
-
}, arguments) };
|
|
902
|
-
imports.wbg.__wbg_error_524f506f44df1645 = function(arg0) {
|
|
903
|
-
console.error(arg0);
|
|
904
|
-
};
|
|
905
|
-
imports.wbg.__wbg_getRandomValues_80578b2ff2a093ba = function() { return handleError(function (arg0) {
|
|
906
|
-
globalThis.crypto.getRandomValues(arg0);
|
|
907
|
-
}, arguments) };
|
|
908
|
-
imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
|
|
909
|
-
const ret = arg0.getTime();
|
|
910
|
-
return ret;
|
|
911
|
-
};
|
|
912
|
-
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
913
|
-
const ret = Reflect.get(arg0, arg1);
|
|
914
|
-
return ret;
|
|
915
|
-
}, arguments) };
|
|
916
|
-
imports.wbg.__wbg_get_74b8744f6a23f4fa = function(arg0, arg1, arg2) {
|
|
917
|
-
const ret = arg0[getStringFromWasm0(arg1, arg2)];
|
|
918
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
919
|
-
};
|
|
920
|
-
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
921
|
-
const ret = arg0[arg1 >>> 0];
|
|
922
|
-
return ret;
|
|
923
|
-
};
|
|
924
|
-
imports.wbg.__wbg_hardwareConcurrency_e840281060cd1953 = function(arg0) {
|
|
925
|
-
const ret = arg0.hardwareConcurrency;
|
|
926
|
-
return ret;
|
|
927
|
-
};
|
|
928
|
-
imports.wbg.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
|
|
929
|
-
const ret = Reflect.has(arg0, arg1);
|
|
930
|
-
return ret;
|
|
931
|
-
}, arguments) };
|
|
932
|
-
imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
933
|
-
let result;
|
|
934
|
-
try {
|
|
935
|
-
result = arg0 instanceof Window;
|
|
936
|
-
} catch (_) {
|
|
937
|
-
result = false;
|
|
1197
|
+
function expectedResponseType(type) {
|
|
1198
|
+
switch (type) {
|
|
1199
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
938
1200
|
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
};
|
|
942
|
-
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
943
|
-
const ret = Array.isArray(arg0);
|
|
944
|
-
return ret;
|
|
945
|
-
};
|
|
946
|
-
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
947
|
-
const ret = arg0.length;
|
|
948
|
-
return ret;
|
|
949
|
-
};
|
|
950
|
-
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
951
|
-
const ret = arg0.length;
|
|
952
|
-
return ret;
|
|
953
|
-
};
|
|
954
|
-
imports.wbg.__wbg_log_c222819a41e063d3 = function(arg0) {
|
|
955
|
-
console.log(arg0);
|
|
956
|
-
};
|
|
957
|
-
imports.wbg.__wbg_navigator_1577371c070c8947 = function(arg0) {
|
|
958
|
-
const ret = arg0.navigator;
|
|
959
|
-
return ret;
|
|
960
|
-
};
|
|
961
|
-
imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
|
|
962
|
-
const ret = new Date();
|
|
963
|
-
return ret;
|
|
964
|
-
};
|
|
965
|
-
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
966
|
-
const ret = new Object();
|
|
967
|
-
return ret;
|
|
968
|
-
};
|
|
969
|
-
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
970
|
-
const ret = new Array();
|
|
971
|
-
return ret;
|
|
972
|
-
};
|
|
973
|
-
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
974
|
-
const ret = new Uint8Array(arg0);
|
|
975
|
-
return ret;
|
|
976
|
-
};
|
|
977
|
-
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
978
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
979
|
-
return ret;
|
|
980
|
-
};
|
|
981
|
-
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
982
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
983
|
-
return ret;
|
|
984
|
-
};
|
|
985
|
-
imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
|
|
986
|
-
const ret = arg0.now();
|
|
987
|
-
return ret;
|
|
988
|
-
};
|
|
989
|
-
imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
|
|
990
|
-
const ret = arg0.performance;
|
|
991
|
-
return ret;
|
|
992
|
-
};
|
|
993
|
-
imports.wbg.__wbg_postMessage_78f8ee924c64d038 = function(arg0) {
|
|
994
|
-
self.postMessage(arg0);
|
|
995
|
-
};
|
|
996
|
-
imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
997
|
-
const ret = arg0.push(arg1);
|
|
998
|
-
return ret;
|
|
999
|
-
};
|
|
1000
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1001
|
-
arg0[arg1] = arg2;
|
|
1002
|
-
};
|
|
1003
|
-
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
1004
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
1005
|
-
};
|
|
1006
|
-
imports.wbg.__wbg_startWorkers_2329d931beb7bef4 = function(arg0, arg1, arg2) {
|
|
1007
|
-
const ret = startWorkers(arg0, arg1, wbg_rayon_PoolBuilder.__wrap(arg2));
|
|
1008
|
-
return ret;
|
|
1009
|
-
};
|
|
1010
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
1011
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1012
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1013
|
-
};
|
|
1014
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
1015
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1016
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1017
|
-
};
|
|
1018
|
-
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
1019
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
1020
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1021
|
-
};
|
|
1022
|
-
imports.wbg.__wbg_static_accessor_URL_151cb8815849ce83 = function() {
|
|
1023
|
-
const ret = import.meta.url;
|
|
1024
|
-
return ret;
|
|
1025
|
-
};
|
|
1026
|
-
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
1027
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
1028
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1029
|
-
};
|
|
1030
|
-
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
1031
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1032
|
-
return ret;
|
|
1033
|
-
};
|
|
1034
|
-
imports.wbg.__wbg_timeOrigin_9f29a08704a944d0 = function(arg0) {
|
|
1035
|
-
const ret = arg0.timeOrigin;
|
|
1036
|
-
return ret;
|
|
1037
|
-
};
|
|
1038
|
-
imports.wbg.__wbg_warn_4ca3906c248c47c4 = function(arg0) {
|
|
1039
|
-
console.warn(arg0);
|
|
1040
|
-
};
|
|
1041
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1042
|
-
const v = arg0;
|
|
1043
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
1044
|
-
return ret;
|
|
1045
|
-
};
|
|
1046
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1047
|
-
const ret = debugString(arg1);
|
|
1048
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1049
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1050
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1051
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1052
|
-
};
|
|
1053
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1054
|
-
const table = wasm.__wbindgen_export_2;
|
|
1055
|
-
const offset = table.grow(4);
|
|
1056
|
-
table.set(0, undefined);
|
|
1057
|
-
table.set(offset + 0, undefined);
|
|
1058
|
-
table.set(offset + 1, null);
|
|
1059
|
-
table.set(offset + 2, true);
|
|
1060
|
-
table.set(offset + 3, false);
|
|
1061
|
-
;
|
|
1062
|
-
};
|
|
1063
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
1064
|
-
const ret = typeof(arg0) === 'function';
|
|
1065
|
-
return ret;
|
|
1066
|
-
};
|
|
1067
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
1068
|
-
const val = arg0;
|
|
1069
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
1070
|
-
return ret;
|
|
1071
|
-
};
|
|
1072
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1073
|
-
const ret = arg0 === undefined;
|
|
1074
|
-
return ret;
|
|
1075
|
-
};
|
|
1076
|
-
imports.wbg.__wbindgen_memory = function() {
|
|
1077
|
-
const ret = wasm.memory;
|
|
1078
|
-
return ret;
|
|
1079
|
-
};
|
|
1080
|
-
imports.wbg.__wbindgen_module = function() {
|
|
1081
|
-
const ret = __wbg_init.__wbindgen_wasm_module;
|
|
1082
|
-
return ret;
|
|
1083
|
-
};
|
|
1084
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1085
|
-
const obj = arg1;
|
|
1086
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1087
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1088
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1089
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1090
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1091
|
-
};
|
|
1092
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1093
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1094
|
-
return ret;
|
|
1095
|
-
};
|
|
1096
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1097
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1098
|
-
};
|
|
1099
|
-
|
|
1100
|
-
return imports;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
function __wbg_init_memory(imports, memory) {
|
|
1104
|
-
imports.wbg.memory = memory || new WebAssembly.Memory({initial:69,maximum:16384,shared:true});
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
function __wbg_finalize_init(instance, module, thread_stack_size) {
|
|
1108
|
-
wasm = instance.exports;
|
|
1109
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
1110
|
-
cachedDataViewMemory0 = null;
|
|
1111
|
-
cachedUint8ArrayMemory0 = null;
|
|
1112
|
-
|
|
1113
|
-
if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) { throw 'invalid stack size' }
|
|
1114
|
-
wasm.__wbindgen_start(thread_stack_size);
|
|
1115
|
-
return wasm;
|
|
1201
|
+
return false;
|
|
1202
|
+
}
|
|
1116
1203
|
}
|
|
1117
1204
|
|
|
1118
1205
|
function initSync(module, memory) {
|
|
1119
1206
|
if (wasm !== undefined) return wasm;
|
|
1120
1207
|
|
|
1121
1208
|
let thread_stack_size
|
|
1122
|
-
if (
|
|
1209
|
+
if (module !== undefined) {
|
|
1123
1210
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1124
1211
|
({module, memory, thread_stack_size} = module)
|
|
1125
1212
|
} else {
|
|
@@ -1127,16 +1214,11 @@ function initSync(module, memory) {
|
|
|
1127
1214
|
}
|
|
1128
1215
|
}
|
|
1129
1216
|
|
|
1130
|
-
const imports = __wbg_get_imports();
|
|
1131
|
-
|
|
1132
|
-
__wbg_init_memory(imports, memory);
|
|
1133
|
-
|
|
1217
|
+
const imports = __wbg_get_imports(memory);
|
|
1134
1218
|
if (!(module instanceof WebAssembly.Module)) {
|
|
1135
1219
|
module = new WebAssembly.Module(module);
|
|
1136
1220
|
}
|
|
1137
|
-
|
|
1138
1221
|
const instance = new WebAssembly.Instance(module, imports);
|
|
1139
|
-
|
|
1140
1222
|
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
1141
1223
|
}
|
|
1142
1224
|
|
|
@@ -1144,7 +1226,7 @@ async function __wbg_init(module_or_path, memory) {
|
|
|
1144
1226
|
if (wasm !== undefined) return wasm;
|
|
1145
1227
|
|
|
1146
1228
|
let thread_stack_size
|
|
1147
|
-
if (
|
|
1229
|
+
if (module_or_path !== undefined) {
|
|
1148
1230
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1149
1231
|
({module_or_path, memory, thread_stack_size} = module_or_path)
|
|
1150
1232
|
} else {
|
|
@@ -1152,39 +1234,36 @@ async function __wbg_init(module_or_path, memory) {
|
|
|
1152
1234
|
}
|
|
1153
1235
|
}
|
|
1154
1236
|
|
|
1155
|
-
if (
|
|
1237
|
+
if (module_or_path === undefined) {
|
|
1156
1238
|
module_or_path = new URL('wasm_wrapper_bg.wasm', import.meta.url);
|
|
1157
1239
|
}
|
|
1158
|
-
const imports = __wbg_get_imports();
|
|
1240
|
+
const imports = __wbg_get_imports(memory);
|
|
1159
1241
|
|
|
1160
1242
|
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1161
1243
|
module_or_path = fetch(module_or_path);
|
|
1162
1244
|
}
|
|
1163
1245
|
|
|
1164
|
-
__wbg_init_memory(imports, memory);
|
|
1165
|
-
|
|
1166
1246
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1167
1247
|
|
|
1168
1248
|
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
1169
1249
|
}
|
|
1170
1250
|
|
|
1171
|
-
export { initSync };
|
|
1172
|
-
export default __wbg_init;
|
|
1251
|
+
export { initSync, __wbg_init as default };
|
|
1173
1252
|
|
|
1174
1253
|
// Build hash injected at build time
|
|
1175
|
-
export const BUILD_HASH = "
|
|
1176
|
-
export const BUILD_ID = "
|
|
1254
|
+
export const BUILD_HASH = "2f7c454e61bbac23f9c4e889cfa962a990771c57e8a42fa3531d545e27492f39";
|
|
1255
|
+
export const BUILD_ID = "20260629-090524";
|
|
1177
1256
|
export const WASM_FILENAME = "wasm_wrapper_bg.wasm";
|
|
1178
1257
|
export const JS_FILENAME = "wasm_wrapper.js";
|
|
1179
1258
|
|
|
1180
1259
|
// Function to get the current build hash
|
|
1181
1260
|
export function getBuildHash() {
|
|
1182
|
-
return "
|
|
1261
|
+
return "2f7c454e61bbac23f9c4e889cfa962a990771c57e8a42fa3531d545e27492f39";
|
|
1183
1262
|
}
|
|
1184
1263
|
|
|
1185
1264
|
// Function to get the current build ID
|
|
1186
1265
|
export function getBuildId() {
|
|
1187
|
-
return "
|
|
1266
|
+
return "20260629-090524";
|
|
1188
1267
|
}
|
|
1189
1268
|
|
|
1190
1269
|
// Function to get the WASM filename
|