@json-eval-rs/vanilla 0.0.72 → 0.0.74

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.
@@ -1,227 +1,9 @@
1
- let wasm;
1
+ /* @ts-self-types="./json_eval_rs.d.ts" */
2
2
 
3
- let cachedUint8ArrayMemory0 = null;
4
-
5
- function getUint8ArrayMemory0() {
6
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
- }
9
- return cachedUint8ArrayMemory0;
10
- }
11
-
12
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
-
14
- cachedTextDecoder.decode();
15
-
16
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
- let numBytesDecoded = 0;
18
- function decodeText(ptr, len) {
19
- numBytesDecoded += len;
20
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
- cachedTextDecoder.decode();
23
- numBytesDecoded = len;
24
- }
25
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
- }
27
-
28
- function getStringFromWasm0(ptr, len) {
29
- ptr = ptr >>> 0;
30
- return decodeText(ptr, len);
31
- }
32
-
33
- let heap = new Array(128).fill(undefined);
34
-
35
- heap.push(undefined, null, true, false);
36
-
37
- let heap_next = heap.length;
38
-
39
- function addHeapObject(obj) {
40
- if (heap_next === heap.length) heap.push(heap.length + 1);
41
- const idx = heap_next;
42
- heap_next = heap[idx];
43
-
44
- heap[idx] = obj;
45
- return idx;
46
- }
47
-
48
- function getObject(idx) { return heap[idx]; }
49
-
50
- let WASM_VECTOR_LEN = 0;
51
-
52
- const cachedTextEncoder = new TextEncoder();
53
-
54
- if (!('encodeInto' in cachedTextEncoder)) {
55
- cachedTextEncoder.encodeInto = function (arg, view) {
56
- const buf = cachedTextEncoder.encode(arg);
57
- view.set(buf);
58
- return {
59
- read: arg.length,
60
- written: buf.length
61
- };
62
- }
63
- }
64
-
65
- function passStringToWasm0(arg, malloc, realloc) {
66
-
67
- if (realloc === undefined) {
68
- const buf = cachedTextEncoder.encode(arg);
69
- const ptr = malloc(buf.length, 1) >>> 0;
70
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
71
- WASM_VECTOR_LEN = buf.length;
72
- return ptr;
73
- }
74
-
75
- let len = arg.length;
76
- let ptr = malloc(len, 1) >>> 0;
77
-
78
- const mem = getUint8ArrayMemory0();
79
-
80
- let offset = 0;
81
-
82
- for (; offset < len; offset++) {
83
- const code = arg.charCodeAt(offset);
84
- if (code > 0x7F) break;
85
- mem[ptr + offset] = code;
86
- }
87
-
88
- if (offset !== len) {
89
- if (offset !== 0) {
90
- arg = arg.slice(offset);
91
- }
92
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
93
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
94
- const ret = cachedTextEncoder.encodeInto(arg, view);
95
-
96
- offset += ret.written;
97
- ptr = realloc(ptr, len, offset, 1) >>> 0;
98
- }
99
-
100
- WASM_VECTOR_LEN = offset;
101
- return ptr;
102
- }
103
-
104
- let cachedDataViewMemory0 = null;
105
-
106
- function getDataViewMemory0() {
107
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
108
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
109
- }
110
- return cachedDataViewMemory0;
111
- }
112
-
113
- function getArrayU8FromWasm0(ptr, len) {
114
- ptr = ptr >>> 0;
115
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
116
- }
117
-
118
- function handleError(f, args) {
119
- try {
120
- return f.apply(this, args);
121
- } catch (e) {
122
- wasm.__wbindgen_export_3(addHeapObject(e));
123
- }
124
- }
125
-
126
- function dropObject(idx) {
127
- if (idx < 132) return;
128
- heap[idx] = heap_next;
129
- heap_next = idx;
130
- }
131
-
132
- function takeObject(idx) {
133
- const ret = getObject(idx);
134
- dropObject(idx);
135
- return ret;
136
- }
137
-
138
- function isLikeNone(x) {
139
- return x === undefined || x === null;
140
- }
141
-
142
- function passArrayJsValueToWasm0(array, malloc) {
143
- const ptr = malloc(array.length * 4, 4) >>> 0;
144
- const mem = getDataViewMemory0();
145
- for (let i = 0; i < array.length; i++) {
146
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
147
- }
148
- WASM_VECTOR_LEN = array.length;
149
- return ptr;
150
- }
151
- /**
152
- * Get the library version
153
- * @returns {string}
154
- */
155
- export function getVersion() {
156
- let deferred1_0;
157
- let deferred1_1;
158
- try {
159
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
160
- wasm.getVersion(retptr);
161
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
162
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
163
- deferred1_0 = r0;
164
- deferred1_1 = r1;
165
- return getStringFromWasm0(r0, r1);
166
- } finally {
167
- wasm.__wbindgen_add_to_stack_pointer(16);
168
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
169
- }
170
- }
171
-
172
- /**
173
- * Initialize the library (sets up panic hook)
174
- */
175
- export function init() {
176
- wasm.init();
177
- }
178
-
179
- /**
180
- * Get library version (alias)
181
- * @returns {string}
182
- */
183
- export function version() {
184
- let deferred1_0;
185
- let deferred1_1;
186
- try {
187
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
188
- wasm.getVersion(retptr);
189
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
190
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
191
- deferred1_0 = r0;
192
- deferred1_1 = r1;
193
- return getStringFromWasm0(r0, r1);
194
- } finally {
195
- wasm.__wbindgen_add_to_stack_pointer(16);
196
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
197
- }
198
- }
199
-
200
- function passArray8ToWasm0(arg, malloc) {
201
- const ptr = malloc(arg.length * 1, 1) >>> 0;
202
- getUint8ArrayMemory0().set(arg, ptr / 1);
203
- WASM_VECTOR_LEN = arg.length;
204
- return ptr;
205
- }
206
-
207
- function getArrayJsValueFromWasm0(ptr, len) {
208
- ptr = ptr >>> 0;
209
- const mem = getDataViewMemory0();
210
- const result = [];
211
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
212
- result.push(takeObject(mem.getUint32(i, true)));
213
- }
214
- return result;
215
- }
216
-
217
- const JSONEvalWasmFinalization = (typeof FinalizationRegistry === 'undefined')
218
- ? { register: () => {}, unregister: () => {} }
219
- : new FinalizationRegistry(ptr => wasm.__wbg_jsonevalwasm_free(ptr >>> 0, 1));
220
3
  /**
221
4
  * WebAssembly wrapper for JSONEval
222
5
  */
223
6
  export class JSONEvalWasm {
224
-
225
7
  static __wrap(ptr) {
226
8
  ptr = ptr >>> 0;
227
9
  const obj = Object.create(JSONEvalWasm.prototype);
@@ -229,39 +11,80 @@ export class JSONEvalWasm {
229
11
  JSONEvalWasmFinalization.register(obj, obj.__wbg_ptr, obj);
230
12
  return obj;
231
13
  }
232
-
233
14
  __destroy_into_raw() {
234
15
  const ptr = this.__wbg_ptr;
235
16
  this.__wbg_ptr = 0;
236
17
  JSONEvalWasmFinalization.unregister(this);
237
18
  return ptr;
238
19
  }
239
-
240
20
  free() {
241
21
  const ptr = this.__destroy_into_raw();
242
22
  wasm.__wbg_jsonevalwasm_free(ptr, 0);
243
23
  }
244
24
  /**
245
- * Evaluate and return as JsValue for direct JavaScript object access
25
+ * Get the number of cached entries
246
26
  *
247
- * @param data - JSON data string
248
- * @param context - Optional context data JSON string
249
- * @returns Evaluated schema as JavaScript object
250
- * @param {string} data
27
+ * @returns Number of cached entries
28
+ * @returns {number}
29
+ */
30
+ cacheLen() {
31
+ const ret = wasm.jsonevalwasm_cacheLen(this.__wbg_ptr);
32
+ return ret >>> 0;
33
+ }
34
+ /**
35
+ * Get cache statistics
36
+ *
37
+ * @returns Cache statistics as JavaScript object with hits, misses, and entries
38
+ * @returns {any}
39
+ */
40
+ cacheStats() {
41
+ try {
42
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
43
+ wasm.jsonevalwasm_cacheStats(retptr, this.__wbg_ptr);
44
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
45
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
46
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
47
+ if (r2) {
48
+ throw takeObject(r1);
49
+ }
50
+ return takeObject(r0);
51
+ } finally {
52
+ wasm.__wbindgen_add_to_stack_pointer(16);
53
+ }
54
+ }
55
+ /**
56
+ * Cancel any currently running operation
57
+ */
58
+ cancel() {
59
+ wasm.jsonevalwasm_cancel(this.__wbg_ptr);
60
+ }
61
+ /**
62
+ * Clear the evaluation cache
63
+ */
64
+ clearCache() {
65
+ wasm.jsonevalwasm_clearCache(this.__wbg_ptr);
66
+ }
67
+ /**
68
+ * Compile and run JSON logic from a JSON logic string
69
+ * @param logic_str - JSON logic expression as a string
70
+ * @param data - Optional JSON data string
71
+ * @param context - Optional JSON context string
72
+ * @returns Result as JavaScript object
73
+ * @param {string} logic_str
74
+ * @param {string | null} [data]
251
75
  * @param {string | null} [context]
252
- * @param {string[] | null} [paths]
253
76
  * @returns {any}
254
77
  */
255
- evaluateJS(data, context, paths) {
78
+ compileAndRunLogic(logic_str, data, context) {
256
79
  try {
257
80
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
258
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
81
+ const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
259
82
  const len0 = WASM_VECTOR_LEN;
260
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
83
+ var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
261
84
  var len1 = WASM_VECTOR_LEN;
262
- var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
85
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
263
86
  var len2 = WASM_VECTOR_LEN;
264
- wasm.jsonevalwasm_evaluateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
87
+ wasm.jsonevalwasm_compileAndRunLogic(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
265
88
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
266
89
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
267
90
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -283,7 +106,7 @@ export class JSONEvalWasm {
283
106
  compileLogic(logic_str) {
284
107
  try {
285
108
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
286
- const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
109
+ const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
287
110
  const len0 = WASM_VECTOR_LEN;
288
111
  wasm.jsonevalwasm_compileLogic(retptr, this.__wbg_ptr, ptr0, len0);
289
112
  var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
@@ -297,6 +120,50 @@ export class JSONEvalWasm {
297
120
  wasm.__wbindgen_add_to_stack_pointer(16);
298
121
  }
299
122
  }
123
+ /**
124
+ * Disable evaluation caching
125
+ * Useful for web API usage where each request creates a new JSONEval instance
126
+ * Improves performance by skipping cache operations that have no benefit for single-use instances
127
+ */
128
+ disableCache() {
129
+ wasm.jsonevalwasm_disableCache(this.__wbg_ptr);
130
+ }
131
+ /**
132
+ * Enable evaluation caching
133
+ * Useful for reusing JSONEval instances with different data
134
+ */
135
+ enableCache() {
136
+ wasm.jsonevalwasm_enableCache(this.__wbg_ptr);
137
+ }
138
+ /**
139
+ * Evaluate schema with provided data (does not return schema - use getEvaluatedSchema() for that)
140
+ *
141
+ * @param data - JSON data string
142
+ * @param context - Optional context data JSON string
143
+ * @throws Error if evaluation fails
144
+ * @param {string} data
145
+ * @param {string | null} [context]
146
+ * @param {string[] | null} [paths]
147
+ */
148
+ evaluate(data, context, paths) {
149
+ try {
150
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
151
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
152
+ const len0 = WASM_VECTOR_LEN;
153
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
154
+ var len1 = WASM_VECTOR_LEN;
155
+ var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export);
156
+ var len2 = WASM_VECTOR_LEN;
157
+ wasm.jsonevalwasm_evaluate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
158
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
159
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
160
+ if (r1) {
161
+ throw takeObject(r0);
162
+ }
163
+ } finally {
164
+ wasm.__wbindgen_add_to_stack_pointer(16);
165
+ }
166
+ }
300
167
  /**
301
168
  * Evaluate dependents when a field changes (returns array of changes as JSON string)
302
169
  *
@@ -315,11 +182,11 @@ export class JSONEvalWasm {
315
182
  let deferred5_1;
316
183
  try {
317
184
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
318
- const ptr0 = passStringToWasm0(changed_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
185
+ const ptr0 = passStringToWasm0(changed_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
319
186
  const len0 = WASM_VECTOR_LEN;
320
- var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
187
+ var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
321
188
  var len1 = WASM_VECTOR_LEN;
322
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
189
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
323
190
  var len2 = WASM_VECTOR_LEN;
324
191
  wasm.jsonevalwasm_evaluateDependents(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, re_evaluate);
325
192
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -337,30 +204,33 @@ export class JSONEvalWasm {
337
204
  return getStringFromWasm0(ptr4, len4);
338
205
  } finally {
339
206
  wasm.__wbindgen_add_to_stack_pointer(16);
340
- wasm.__wbindgen_export_2(deferred5_0, deferred5_1, 1);
207
+ wasm.__wbindgen_export3(deferred5_0, deferred5_1, 1);
341
208
  }
342
209
  }
343
210
  /**
344
- * Compile and run JSON logic from a JSON logic string
345
- * @param logic_str - JSON logic expression as a string
346
- * @param data - Optional JSON data string
347
- * @param context - Optional JSON context string
348
- * @returns Result as JavaScript object
349
- * @param {string} logic_str
350
- * @param {string | null} [data]
351
- * @param {string | null} [context]
211
+ * Evaluate dependents and return as JavaScript object
212
+ *
213
+ * @param changedPathsJson - JSON array of field paths that changed
214
+ * @param data - Optional updated JSON data string
215
+ * @param context - Optional context data JSON string
216
+ * @param reEvaluate - If true, performs full evaluation after processing dependents
217
+ * @returns Array of dependent change objects as JavaScript object
218
+ * @param {string} changed_paths_json
219
+ * @param {string | null | undefined} data
220
+ * @param {string | null | undefined} context
221
+ * @param {boolean} re_evaluate
352
222
  * @returns {any}
353
223
  */
354
- compileAndRunLogic(logic_str, data, context) {
224
+ evaluateDependentsJS(changed_paths_json, data, context, re_evaluate) {
355
225
  try {
356
226
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
357
- const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
227
+ const ptr0 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
358
228
  const len0 = WASM_VECTOR_LEN;
359
- var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
229
+ var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
360
230
  var len1 = WASM_VECTOR_LEN;
361
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
231
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
362
232
  var len2 = WASM_VECTOR_LEN;
363
- wasm.jsonevalwasm_compileAndRunLogic(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
233
+ wasm.jsonevalwasm_evaluateDependentsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, re_evaluate);
364
234
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
365
235
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
366
236
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -373,61 +243,79 @@ export class JSONEvalWasm {
373
243
  }
374
244
  }
375
245
  /**
376
- * Static helper to evaluate logic without creating an instance
377
- * @param logic_str - JSON logic expression string
378
- * @param data - Optional JSON data string
379
- * @param context - Optional JSON context string
380
- * @returns Result as JavaScript object
381
- * @param {string} logic_str
382
- * @param {string | null} [data]
383
- * @param {string | null} [context]
384
- * @returns {any}
246
+ * Evaluate dependents in subform when fields change
247
+ *
248
+ * @param subformPath - Path to the subform
249
+ * @param changedPaths - JSON array of paths that changed
250
+ * @param data - Optional updated JSON data string
251
+ * @param context - Optional context data JSON string
252
+ * @returns Array of dependent change objects as JSON string
253
+ * @param {string} subform_path
254
+ * @param {string} changed_paths_json
255
+ * @param {string | null | undefined} data
256
+ * @param {string | null | undefined} context
257
+ * @param {boolean} re_evaluate
258
+ * @returns {string}
385
259
  */
386
- static evaluateLogic(logic_str, data, context) {
260
+ evaluateDependentsSubform(subform_path, changed_paths_json, data, context, re_evaluate) {
261
+ let deferred6_0;
262
+ let deferred6_1;
387
263
  try {
388
264
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
389
- const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
265
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
390
266
  const len0 = WASM_VECTOR_LEN;
391
- var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
392
- var len1 = WASM_VECTOR_LEN;
393
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
267
+ const ptr1 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
268
+ const len1 = WASM_VECTOR_LEN;
269
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
394
270
  var len2 = WASM_VECTOR_LEN;
395
- wasm.jsonevalwasm_evaluateLogic(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
271
+ var ptr3 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
272
+ var len3 = WASM_VECTOR_LEN;
273
+ wasm.jsonevalwasm_evaluateDependentsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, re_evaluate);
396
274
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
397
275
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
398
276
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
399
- if (r2) {
400
- throw takeObject(r1);
277
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
278
+ var ptr5 = r0;
279
+ var len5 = r1;
280
+ if (r3) {
281
+ ptr5 = 0; len5 = 0;
282
+ throw takeObject(r2);
401
283
  }
402
- return takeObject(r0);
284
+ deferred6_0 = ptr5;
285
+ deferred6_1 = len5;
286
+ return getStringFromWasm0(ptr5, len5);
403
287
  } finally {
404
288
  wasm.__wbindgen_add_to_stack_pointer(16);
289
+ wasm.__wbindgen_export3(deferred6_0, deferred6_1, 1);
405
290
  }
406
291
  }
407
292
  /**
408
- * Evaluate dependents and return as JavaScript object
293
+ * Evaluate dependents in subform and return as JavaScript object
409
294
  *
410
- * @param changedPathsJson - JSON array of field paths that changed
295
+ * @param subformPath - Path to the subform
296
+ * @param changedPath - Path of the field that changed
411
297
  * @param data - Optional updated JSON data string
412
298
  * @param context - Optional context data JSON string
413
- * @param reEvaluate - If true, performs full evaluation after processing dependents
414
299
  * @returns Array of dependent change objects as JavaScript object
300
+ * @param {string} subform_path
415
301
  * @param {string} changed_paths_json
416
302
  * @param {string | null | undefined} data
417
303
  * @param {string | null | undefined} context
418
304
  * @param {boolean} re_evaluate
419
305
  * @returns {any}
420
306
  */
421
- evaluateDependentsJS(changed_paths_json, data, context, re_evaluate) {
307
+ evaluateDependentsSubformJS(subform_path, changed_paths_json, data, context, re_evaluate) {
422
308
  try {
423
309
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
424
- const ptr0 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
310
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
425
311
  const len0 = WASM_VECTOR_LEN;
426
- var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
427
- var len1 = WASM_VECTOR_LEN;
428
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
312
+ const ptr1 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
313
+ const len1 = WASM_VECTOR_LEN;
314
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
429
315
  var len2 = WASM_VECTOR_LEN;
430
- wasm.jsonevalwasm_evaluateDependentsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, re_evaluate);
316
+ var ptr3 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
317
+ var len3 = WASM_VECTOR_LEN;
318
+ wasm.jsonevalwasm_evaluateDependentsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, re_evaluate);
431
319
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
432
320
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
433
321
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -440,53 +328,26 @@ export class JSONEvalWasm {
440
328
  }
441
329
  }
442
330
  /**
443
- * Evaluate schema with provided data (does not return schema - use getEvaluatedSchema() for that)
331
+ * Evaluate and return as JsValue for direct JavaScript object access
444
332
  *
445
333
  * @param data - JSON data string
446
334
  * @param context - Optional context data JSON string
447
- * @throws Error if evaluation fails
335
+ * @returns Evaluated schema as JavaScript object
448
336
  * @param {string} data
449
337
  * @param {string | null} [context]
450
338
  * @param {string[] | null} [paths]
339
+ * @returns {any}
451
340
  */
452
- evaluate(data, context, paths) {
341
+ evaluateJS(data, context, paths) {
453
342
  try {
454
343
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
455
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
344
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
456
345
  const len0 = WASM_VECTOR_LEN;
457
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
346
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
458
347
  var len1 = WASM_VECTOR_LEN;
459
- var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
348
+ var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export);
460
349
  var len2 = WASM_VECTOR_LEN;
461
- wasm.jsonevalwasm_evaluate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
462
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
463
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
464
- if (r1) {
465
- throw takeObject(r0);
466
- }
467
- } finally {
468
- wasm.__wbindgen_add_to_stack_pointer(16);
469
- }
470
- }
471
- /**
472
- * Run pre-compiled logic by ID
473
- * @param logic_id - Compiled logic ID from compileLogic
474
- * @param data - Optional JSON data string
475
- * @param context - Optional JSON context string
476
- * @returns Result as JavaScript object
477
- * @param {number} logic_id
478
- * @param {string | null} [data]
479
- * @param {string | null} [context]
480
- * @returns {any}
481
- */
482
- runLogic(logic_id, data, context) {
483
- try {
484
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
485
- var ptr0 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
486
- var len0 = WASM_VECTOR_LEN;
487
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
488
- var len1 = WASM_VECTOR_LEN;
489
- wasm.jsonevalwasm_runLogic(retptr, this.__wbg_ptr, logic_id, ptr0, len0, ptr1, len1);
350
+ wasm.jsonevalwasm_evaluateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
490
351
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
491
352
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
492
353
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -499,23 +360,26 @@ export class JSONEvalWasm {
499
360
  }
500
361
  }
501
362
  /**
502
- * Validate data and return as plain JavaScript object (Worker-safe)
503
- *
504
- * @param data - JSON data string
505
- * @param context - Optional context data JSON string
506
- * @returns Plain JavaScript object with validation result
507
- * @param {string} data
363
+ * Static helper to evaluate logic without creating an instance
364
+ * @param logic_str - JSON logic expression string
365
+ * @param data - Optional JSON data string
366
+ * @param context - Optional JSON context string
367
+ * @returns Result as JavaScript object
368
+ * @param {string} logic_str
369
+ * @param {string | null} [data]
508
370
  * @param {string | null} [context]
509
371
  * @returns {any}
510
372
  */
511
- validateJS(data, context) {
373
+ static evaluateLogic(logic_str, data, context) {
512
374
  try {
513
375
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
514
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
376
+ const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
515
377
  const len0 = WASM_VECTOR_LEN;
516
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
378
+ var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
517
379
  var len1 = WASM_VECTOR_LEN;
518
- wasm.jsonevalwasm_validateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
380
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
381
+ var len2 = WASM_VECTOR_LEN;
382
+ wasm.jsonevalwasm_evaluateLogic(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
519
383
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
520
384
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
521
385
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -528,335 +392,308 @@ export class JSONEvalWasm {
528
392
  }
529
393
  }
530
394
  /**
531
- * Validate data against schema rules with optional path filtering
395
+ * Evaluate a subform with data
532
396
  *
533
- * @param data - JSON data string
397
+ * @param subformPath - Path to the subform (e.g., "#/riders")
398
+ * @param data - JSON data string for the subform
534
399
  * @param context - Optional context data JSON string
535
- * @param paths - Optional array of paths to validate (null for all)
536
- * @returns ValidationResult
400
+ * @param paths - Optional array of paths to evaluate (JSON string array)
401
+ * @throws Error if evaluation fails
402
+ * @param {string} subform_path
537
403
  * @param {string} data
538
404
  * @param {string | null} [context]
539
405
  * @param {string[] | null} [paths]
540
- * @returns {ValidationResult}
541
406
  */
542
- validatePaths(data, context, paths) {
407
+ evaluateSubform(subform_path, data, context, paths) {
543
408
  try {
544
409
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
545
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
410
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
546
411
  const len0 = WASM_VECTOR_LEN;
547
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
548
- var len1 = WASM_VECTOR_LEN;
549
- var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
412
+ const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
413
+ const len1 = WASM_VECTOR_LEN;
414
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
550
415
  var len2 = WASM_VECTOR_LEN;
551
- wasm.jsonevalwasm_validatePaths(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
416
+ var ptr3 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export);
417
+ var len3 = WASM_VECTOR_LEN;
418
+ wasm.jsonevalwasm_evaluateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
552
419
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
553
420
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
554
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
555
- if (r2) {
556
- throw takeObject(r1);
421
+ if (r1) {
422
+ throw takeObject(r0);
557
423
  }
558
- return ValidationResult.__wrap(r0);
559
424
  } finally {
560
425
  wasm.__wbindgen_add_to_stack_pointer(16);
561
426
  }
562
427
  }
563
428
  /**
564
- * Validate with path filtering and return as plain JavaScript object (Worker-safe)
429
+ * Get the evaluated schema with optional layout resolution
565
430
  *
566
- * @param data - JSON data string
567
- * @param context - Optional context data JSON string
568
- * @param paths - Optional array of paths to validate (null for all)
569
- * @returns Plain JavaScript object with validation result
570
- * @param {string} data
571
- * @param {string | null} [context]
572
- * @param {string[] | null} [paths]
573
- * @returns {any}
431
+ * @param skipLayout - Whether to skip layout resolution
432
+ * @returns Evaluated schema as JSON string
433
+ * @param {boolean} skip_layout
434
+ * @returns {string}
574
435
  */
575
- validatePathsJS(data, context, paths) {
436
+ getEvaluatedSchema(skip_layout) {
437
+ let deferred1_0;
438
+ let deferred1_1;
576
439
  try {
577
440
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
578
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
579
- const len0 = WASM_VECTOR_LEN;
580
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
581
- var len1 = WASM_VECTOR_LEN;
582
- var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
583
- var len2 = WASM_VECTOR_LEN;
584
- wasm.jsonevalwasm_validatePathsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
441
+ wasm.jsonevalwasm_getEvaluatedSchema(retptr, this.__wbg_ptr, skip_layout);
585
442
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
586
443
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
587
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
588
- if (r2) {
589
- throw takeObject(r1);
590
- }
591
- return takeObject(r0);
444
+ deferred1_0 = r0;
445
+ deferred1_1 = r1;
446
+ return getStringFromWasm0(r0, r1);
592
447
  } finally {
593
448
  wasm.__wbindgen_add_to_stack_pointer(16);
449
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
594
450
  }
595
451
  }
596
452
  /**
597
- * Validate data against schema rules
453
+ * Get a value from the evaluated schema using dotted path notation
598
454
  *
599
- * @param data - JSON data string
600
- * @param context - Optional context data JSON string
601
- * @returns ValidationResult
602
- * @param {string} data
603
- * @param {string | null} [context]
604
- * @returns {ValidationResult}
455
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
456
+ * @param skipLayout - Whether to skip layout resolution
457
+ * @returns Value as JSON string or null if not found
458
+ * @param {string} path
459
+ * @param {boolean} skip_layout
460
+ * @returns {string | undefined}
605
461
  */
606
- validate(data, context) {
462
+ getEvaluatedSchemaByPath(path, skip_layout) {
607
463
  try {
608
464
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
609
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
465
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
610
466
  const len0 = WASM_VECTOR_LEN;
611
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
612
- var len1 = WASM_VECTOR_LEN;
613
- wasm.jsonevalwasm_validate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
467
+ wasm.jsonevalwasm_getEvaluatedSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
614
468
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
615
469
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
616
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
617
- if (r2) {
618
- throw takeObject(r1);
470
+ let v2;
471
+ if (r0 !== 0) {
472
+ v2 = getStringFromWasm0(r0, r1).slice();
473
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
619
474
  }
620
- return ValidationResult.__wrap(r0);
475
+ return v2;
621
476
  } finally {
622
477
  wasm.__wbindgen_add_to_stack_pointer(16);
623
478
  }
624
479
  }
625
480
  /**
626
- * Create a new JSONEval instance from a cached ParsedSchema
481
+ * Get a value from the evaluated schema using dotted path notation as JavaScript object
627
482
  *
628
- * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
629
- * @param context - Optional context data JSON string
630
- * @param data - Optional initial data JSON string
631
- * @param {string} cache_key
632
- * @param {string | null} [context]
633
- * @param {string | null} [data]
634
- * @returns {JSONEvalWasm}
483
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
484
+ * @param skipLayout - Whether to skip layout resolution
485
+ * @returns Value as JavaScript object or null if not found
486
+ * @param {string} path
487
+ * @param {boolean} skip_layout
488
+ * @returns {any}
635
489
  */
636
- static newFromCache(cache_key, context, data) {
490
+ getEvaluatedSchemaByPathJS(path, skip_layout) {
637
491
  try {
638
492
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
639
- const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
493
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
640
494
  const len0 = WASM_VECTOR_LEN;
641
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
642
- var len1 = WASM_VECTOR_LEN;
643
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
644
- var len2 = WASM_VECTOR_LEN;
645
- wasm.jsonevalwasm_newFromCache(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
495
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
646
496
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
647
497
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
648
498
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
649
499
  if (r2) {
650
500
  throw takeObject(r1);
651
501
  }
652
- return JSONEvalWasm.__wrap(r0);
502
+ return takeObject(r0);
653
503
  } finally {
654
504
  wasm.__wbindgen_add_to_stack_pointer(16);
655
505
  }
656
506
  }
657
507
  /**
658
- * Create a new JSONEval instance from MessagePack-encoded schema
508
+ * Get evaluated schema by specific path from subform
659
509
  *
660
- * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
661
- * @param context - Optional context data JSON string
662
- * @param data - Optional initial data JSON string
663
- * @param {Uint8Array} schema_msgpack
664
- * @param {string | null} [context]
665
- * @param {string | null} [data]
666
- * @returns {JSONEvalWasm}
510
+ * @param subformPath - Path to the subform
511
+ * @param schemaPath - Dotted path to the value within the subform
512
+ * @param skipLayout - Whether to skip layout resolution
513
+ * @returns Value as JSON string or null if not found
514
+ * @param {string} subform_path
515
+ * @param {string} schema_path
516
+ * @param {boolean} skip_layout
517
+ * @returns {string | undefined}
667
518
  */
668
- static newFromMsgpack(schema_msgpack, context, data) {
519
+ getEvaluatedSchemaByPathSubform(subform_path, schema_path, skip_layout) {
669
520
  try {
670
521
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
671
- const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export_0);
522
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
672
523
  const len0 = WASM_VECTOR_LEN;
673
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
674
- var len1 = WASM_VECTOR_LEN;
675
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
676
- var len2 = WASM_VECTOR_LEN;
677
- wasm.jsonevalwasm_newFromMsgpack(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
524
+ const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
525
+ const len1 = WASM_VECTOR_LEN;
526
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout);
678
527
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
679
528
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
680
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
681
- if (r2) {
682
- throw takeObject(r1);
529
+ let v3;
530
+ if (r0 !== 0) {
531
+ v3 = getStringFromWasm0(r0, r1).slice();
532
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
683
533
  }
684
- return JSONEvalWasm.__wrap(r0);
534
+ return v3;
685
535
  } finally {
686
536
  wasm.__wbindgen_add_to_stack_pointer(16);
687
537
  }
688
538
  }
689
539
  /**
690
- * Set timezone offset for datetime operations (TODAY, NOW)
691
- *
692
- * @param offsetMinutes - Timezone offset in minutes from UTC (e.g., 420 for UTC+7, -300 for UTC-5)
693
- * Pass null or undefined to reset to UTC
694
- * @param {number | null} [offset_minutes]
695
- */
696
- setTimezoneOffset(offset_minutes) {
697
- wasm.jsonevalwasm_setTimezoneOffset(this.__wbg_ptr, isLikeNone(offset_minutes) ? 0x100000001 : (offset_minutes) >> 0);
698
- }
699
- /**
700
- * Create a new JSONEval instance
540
+ * Get evaluated schema by specific path from subform as JavaScript object
701
541
  *
702
- * @param schema - JSON schema string
703
- * @param context - Optional context data JSON string
704
- * @param data - Optional initial data JSON string
705
- * @param {string} schema
706
- * @param {string | null} [context]
707
- * @param {string | null} [data]
542
+ * @param subformPath - Path to the subform
543
+ * @param schemaPath - Dotted path to the value within the subform
544
+ * @param skipLayout - Whether to skip layout resolution
545
+ * @returns Value as JavaScript object or null if not found
546
+ * @param {string} subform_path
547
+ * @param {string} schema_path
548
+ * @param {boolean} skip_layout
549
+ * @returns {any}
708
550
  */
709
- constructor(schema, context, data) {
551
+ getEvaluatedSchemaByPathSubformJS(subform_path, schema_path, skip_layout) {
710
552
  try {
711
553
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
712
- const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
554
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
713
555
  const len0 = WASM_VECTOR_LEN;
714
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
715
- var len1 = WASM_VECTOR_LEN;
716
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
717
- var len2 = WASM_VECTOR_LEN;
718
- wasm.jsonevalwasm_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
556
+ const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
557
+ const len1 = WASM_VECTOR_LEN;
558
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout);
719
559
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
720
560
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
721
561
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
722
562
  if (r2) {
723
563
  throw takeObject(r1);
724
564
  }
725
- this.__wbg_ptr = r0 >>> 0;
726
- JSONEvalWasmFinalization.register(this, this.__wbg_ptr, this);
727
- return this;
565
+ return takeObject(r0);
728
566
  } finally {
729
567
  wasm.__wbindgen_add_to_stack_pointer(16);
730
568
  }
731
569
  }
732
570
  /**
733
- * Cancel any currently running operation
734
- */
735
- cancel() {
736
- wasm.jsonevalwasm_cancel(this.__wbg_ptr);
737
- }
738
- /**
739
- * Get cache statistics
740
- *
741
- * @returns Cache statistics as JavaScript object with hits, misses, and entries
742
- * @returns {any}
571
+ * Get values from evaluated schema using multiple dotted paths
572
+ * @param pathsJson - JSON array of dotted paths
573
+ * @param skipLayout - Whether to skip layout resolution
574
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
575
+ * @returns Data in specified format as JSON string
576
+ * @param {string} paths_json
577
+ * @param {boolean} skip_layout
578
+ * @param {number} format
579
+ * @returns {string}
743
580
  */
744
- cacheStats() {
581
+ getEvaluatedSchemaByPaths(paths_json, skip_layout, format) {
582
+ let deferred3_0;
583
+ let deferred3_1;
745
584
  try {
746
585
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
747
- wasm.jsonevalwasm_cacheStats(retptr, this.__wbg_ptr);
586
+ const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
587
+ const len0 = WASM_VECTOR_LEN;
588
+ wasm.jsonevalwasm_getEvaluatedSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
748
589
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
749
590
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
750
591
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
751
- if (r2) {
752
- throw takeObject(r1);
592
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
593
+ var ptr2 = r0;
594
+ var len2 = r1;
595
+ if (r3) {
596
+ ptr2 = 0; len2 = 0;
597
+ throw takeObject(r2);
753
598
  }
754
- return takeObject(r0);
599
+ deferred3_0 = ptr2;
600
+ deferred3_1 = len2;
601
+ return getStringFromWasm0(ptr2, len2);
755
602
  } finally {
756
603
  wasm.__wbindgen_add_to_stack_pointer(16);
604
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
757
605
  }
758
606
  }
759
607
  /**
760
- * Clear the evaluation cache
761
- */
762
- clearCache() {
763
- wasm.jsonevalwasm_clearCache(this.__wbg_ptr);
764
- }
765
- /**
766
- * Enable evaluation caching
767
- * Useful for reusing JSONEval instances with different data
768
- */
769
- enableCache() {
770
- wasm.jsonevalwasm_enableCache(this.__wbg_ptr);
771
- }
772
- /**
773
- * Disable evaluation caching
774
- * Useful for web API usage where each request creates a new JSONEval instance
775
- * Improves performance by skipping cache operations that have no benefit for single-use instances
776
- */
777
- disableCache() {
778
- wasm.jsonevalwasm_disableCache(this.__wbg_ptr);
779
- }
780
- /**
781
- * Check if evaluation caching is enabled
782
- *
783
- * @returns true if caching is enabled, false otherwise
784
- * @returns {boolean}
785
- */
786
- isCacheEnabled() {
787
- const ret = wasm.jsonevalwasm_isCacheEnabled(this.__wbg_ptr);
788
- return ret !== 0;
789
- }
790
- /**
791
- * Get the number of cached entries
792
- *
793
- * @returns Number of cached entries
794
- * @returns {number}
795
- */
796
- cacheLen() {
797
- const ret = wasm.jsonevalwasm_cacheLen(this.__wbg_ptr);
798
- return ret >>> 0;
799
- }
800
- /**
801
- * Resolve layout with optional evaluation
802
- *
803
- * @param evaluate - If true, runs evaluation before resolving layout
804
- * @throws Error if resolve fails
805
- * @param {boolean} evaluate
608
+ * Get values from evaluated schema using multiple dotted paths (JS object)
609
+ * @param pathsJson - JSON array of dotted paths
610
+ * @param skipLayout - Whether to skip layout resolution
611
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
612
+ * @returns Data in specified format as JavaScript object
613
+ * @param {string} paths_json
614
+ * @param {boolean} skip_layout
615
+ * @param {number} format
616
+ * @returns {any}
806
617
  */
807
- resolveLayout(evaluate) {
618
+ getEvaluatedSchemaByPathsJS(paths_json, skip_layout, format) {
808
619
  try {
809
620
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
810
- wasm.jsonevalwasm_resolveLayout(retptr, this.__wbg_ptr, evaluate);
621
+ const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
622
+ const len0 = WASM_VECTOR_LEN;
623
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
811
624
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
812
625
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
813
- if (r1) {
814
- throw takeObject(r0);
626
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
627
+ if (r2) {
628
+ throw takeObject(r1);
815
629
  }
630
+ return takeObject(r0);
816
631
  } finally {
817
632
  wasm.__wbindgen_add_to_stack_pointer(16);
818
633
  }
819
634
  }
820
635
  /**
821
- * Reload schema with new data
822
- *
823
- * @param schema - New JSON schema string
824
- * @param context - Optional context data JSON string
825
- * @param data - Optional initial data JSON string
826
- * @param {string} schema
827
- * @param {string | null} [context]
828
- * @param {string | null} [data]
636
+ * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JSON string)
637
+ * @param subformPath - Path to the subform
638
+ * @param pathsJson - JSON array of dotted paths
639
+ * @param skipLayout - Whether to skip layout resolution
640
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
641
+ * @returns Data in specified format as JSON string
642
+ * @param {string} subform_path
643
+ * @param {string} paths_json
644
+ * @param {boolean} skip_layout
645
+ * @param {number} format
646
+ * @returns {string}
829
647
  */
830
- reloadSchema(schema, context, data) {
648
+ getEvaluatedSchemaByPathsSubform(subform_path, paths_json, skip_layout, format) {
649
+ let deferred4_0;
650
+ let deferred4_1;
831
651
  try {
832
652
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
833
- const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
653
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
834
654
  const len0 = WASM_VECTOR_LEN;
835
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
836
- var len1 = WASM_VECTOR_LEN;
837
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
838
- var len2 = WASM_VECTOR_LEN;
839
- wasm.jsonevalwasm_reloadSchema(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
655
+ const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
656
+ const len1 = WASM_VECTOR_LEN;
657
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout, format);
840
658
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
841
659
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
842
- if (r1) {
843
- throw takeObject(r0);
660
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
661
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
662
+ var ptr3 = r0;
663
+ var len3 = r1;
664
+ if (r3) {
665
+ ptr3 = 0; len3 = 0;
666
+ throw takeObject(r2);
844
667
  }
668
+ deferred4_0 = ptr3;
669
+ deferred4_1 = len3;
670
+ return getStringFromWasm0(ptr3, len3);
845
671
  } finally {
846
672
  wasm.__wbindgen_add_to_stack_pointer(16);
673
+ wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
847
674
  }
848
675
  }
849
676
  /**
850
- * Get all schema values (evaluations ending with .value)
851
- * Mutates internal data by overriding with values from value evaluations
852
- *
853
- * @returns Modified data as JavaScript object
677
+ * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
678
+ * @param subformPath - Path to the subform
679
+ * @param paths - Array of dotted paths
680
+ * @param skipLayout - Whether to skip layout resolution
681
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
682
+ * @returns Data in specified format as JavaScript object
683
+ * @param {string} subform_path
684
+ * @param {string} paths_json
685
+ * @param {boolean} skip_layout
686
+ * @param {number} format
854
687
  * @returns {any}
855
688
  */
856
- getSchemaValue() {
689
+ getEvaluatedSchemaByPathsSubformJS(subform_path, paths_json, skip_layout, format) {
857
690
  try {
858
691
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
859
- wasm.jsonevalwasm_getSchemaValue(retptr, this.__wbg_ptr);
692
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
693
+ const len0 = WASM_VECTOR_LEN;
694
+ const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
695
+ const len1 = WASM_VECTOR_LEN;
696
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout, format);
860
697
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
861
698
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
862
699
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -869,104 +706,107 @@ export class JSONEvalWasm {
869
706
  }
870
707
  }
871
708
  /**
872
- * Get a value from the schema using dotted path notation
709
+ * Get the evaluated schema as JavaScript object
873
710
  *
874
- * @param path - Dotted path to the value (e.g., "properties.field.value")
875
- * @returns Value as JSON string or null if not found
876
- * @param {string} path
877
- * @returns {string | undefined}
711
+ * @param skipLayout - Whether to skip layout resolution
712
+ * @returns Evaluated schema as JavaScript object
713
+ * @param {boolean} skip_layout
714
+ * @returns {any}
878
715
  */
879
- getSchemaByPath(path) {
716
+ getEvaluatedSchemaJS(skip_layout) {
880
717
  try {
881
718
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
882
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
883
- const len0 = WASM_VECTOR_LEN;
884
- wasm.jsonevalwasm_getSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0);
719
+ wasm.jsonevalwasm_getEvaluatedSchemaJS(retptr, this.__wbg_ptr, skip_layout);
885
720
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
886
721
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
887
- let v2;
888
- if (r0 !== 0) {
889
- v2 = getStringFromWasm0(r0, r1).slice();
890
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
722
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
723
+ if (r2) {
724
+ throw takeObject(r1);
891
725
  }
892
- return v2;
726
+ return takeObject(r0);
893
727
  } finally {
894
728
  wasm.__wbindgen_add_to_stack_pointer(16);
895
729
  }
896
730
  }
897
731
  /**
898
- * Get values from schema using multiple dotted paths
899
- * @param pathsJson - JSON array of dotted paths
900
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
901
- * @returns Data in specified format as JSON string
902
- * @param {string} paths_json
903
- * @param {number} format
904
- * @returns {string}
732
+ * Get the evaluated schema in MessagePack format
733
+ *
734
+ * @param skipLayout - Whether to skip layout resolution
735
+ * @returns Evaluated schema as MessagePack bytes (Uint8Array)
736
+ *
737
+ * # Zero-Copy Optimization
738
+ *
739
+ * This method returns MessagePack binary data with minimal copying:
740
+ * 1. Serializes schema to Vec<u8> in Rust (unavoidable)
741
+ * 2. wasm-bindgen transfers Vec<u8> to JS as Uint8Array (optimized)
742
+ * 3. Result is a Uint8Array view (minimal overhead)
743
+ *
744
+ * MessagePack format is 20-50% smaller than JSON, ideal for web/WASM.
745
+ * @param {boolean} skip_layout
746
+ * @returns {Uint8Array}
905
747
  */
906
- getSchemaByPaths(paths_json, format) {
907
- let deferred3_0;
908
- let deferred3_1;
748
+ getEvaluatedSchemaMsgpack(skip_layout) {
909
749
  try {
910
750
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
911
- const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
912
- const len0 = WASM_VECTOR_LEN;
913
- wasm.jsonevalwasm_getSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, format);
751
+ wasm.jsonevalwasm_getEvaluatedSchemaMsgpack(retptr, this.__wbg_ptr, skip_layout);
914
752
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
915
753
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
916
754
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
917
755
  var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
918
- var ptr2 = r0;
919
- var len2 = r1;
920
756
  if (r3) {
921
- ptr2 = 0; len2 = 0;
922
757
  throw takeObject(r2);
923
758
  }
924
- deferred3_0 = ptr2;
925
- deferred3_1 = len2;
926
- return getStringFromWasm0(ptr2, len2);
759
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
760
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
761
+ return v1;
927
762
  } finally {
928
763
  wasm.__wbindgen_add_to_stack_pointer(16);
929
- wasm.__wbindgen_export_2(deferred3_0, deferred3_1, 1);
930
764
  }
931
765
  }
932
766
  /**
933
- * Get the evaluated schema with optional layout resolution
767
+ * Get evaluated schema from subform
934
768
  *
935
- * @param skipLayout - Whether to skip layout resolution
769
+ * @param subformPath - Path to the subform
770
+ * @param resolveLayout - Whether to resolve layout
936
771
  * @returns Evaluated schema as JSON string
937
- * @param {boolean} skip_layout
772
+ * @param {string} subform_path
773
+ * @param {boolean} resolve_layout
938
774
  * @returns {string}
939
775
  */
940
- getEvaluatedSchema(skip_layout) {
941
- let deferred1_0;
942
- let deferred1_1;
776
+ getEvaluatedSchemaSubform(subform_path, resolve_layout) {
777
+ let deferred2_0;
778
+ let deferred2_1;
943
779
  try {
944
780
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
945
- wasm.jsonevalwasm_getEvaluatedSchema(retptr, this.__wbg_ptr, skip_layout);
781
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
782
+ const len0 = WASM_VECTOR_LEN;
783
+ wasm.jsonevalwasm_getEvaluatedSchemaSubform(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
946
784
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
947
785
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
948
- deferred1_0 = r0;
949
- deferred1_1 = r1;
786
+ deferred2_0 = r0;
787
+ deferred2_1 = r1;
950
788
  return getStringFromWasm0(r0, r1);
951
789
  } finally {
952
790
  wasm.__wbindgen_add_to_stack_pointer(16);
953
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
791
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
954
792
  }
955
793
  }
956
794
  /**
957
- * Get a value from the schema using dotted path notation as JavaScript object
958
- *
959
- * @param path - Dotted path to the value (e.g., "properties.field.value")
960
- * @returns Value as JavaScript object or null if not found
961
- * @param {string} path
795
+ * Get evaluated schema from subform as JavaScript object
796
+ *
797
+ * @param subformPath - Path to the subform
798
+ * @param resolveLayout - Whether to resolve layout
799
+ * @returns Evaluated schema as JavaScript object
800
+ * @param {string} subform_path
801
+ * @param {boolean} resolve_layout
962
802
  * @returns {any}
963
803
  */
964
- getSchemaByPathJS(path) {
804
+ getEvaluatedSchemaSubformJS(subform_path, resolve_layout) {
965
805
  try {
966
806
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
967
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
807
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
968
808
  const len0 = WASM_VECTOR_LEN;
969
- wasm.jsonevalwasm_getSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0);
809
+ wasm.jsonevalwasm_getEvaluatedSchemaSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
970
810
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
971
811
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
972
812
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -979,49 +819,41 @@ export class JSONEvalWasm {
979
819
  }
980
820
  }
981
821
  /**
982
- * Reload schema from MessagePack-encoded bytes
822
+ * Get the evaluated schema without $params field
983
823
  *
984
- * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
985
- * @param context - Optional context data JSON string
986
- * @param data - Optional initial data JSON string
987
- * @param {Uint8Array} schema_msgpack
988
- * @param {string | null} [context]
989
- * @param {string | null} [data]
824
+ * @param skipLayout - Whether to skip layout resolution
825
+ * @returns Evaluated schema as JSON string
826
+ * @param {boolean} skip_layout
827
+ * @returns {string}
990
828
  */
991
- reloadSchemaMsgpack(schema_msgpack, context, data) {
829
+ getEvaluatedSchemaWithoutParams(skip_layout) {
830
+ let deferred1_0;
831
+ let deferred1_1;
992
832
  try {
993
833
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
994
- const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export_0);
995
- const len0 = WASM_VECTOR_LEN;
996
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
997
- var len1 = WASM_VECTOR_LEN;
998
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
999
- var len2 = WASM_VECTOR_LEN;
1000
- wasm.jsonevalwasm_reloadSchemaMsgpack(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
834
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParams(retptr, this.__wbg_ptr, skip_layout);
1001
835
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1002
836
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1003
- if (r1) {
1004
- throw takeObject(r0);
1005
- }
837
+ deferred1_0 = r0;
838
+ deferred1_1 = r1;
839
+ return getStringFromWasm0(r0, r1);
1006
840
  } finally {
1007
841
  wasm.__wbindgen_add_to_stack_pointer(16);
842
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
1008
843
  }
1009
844
  }
1010
845
  /**
1011
- * Get values from schema using multiple dotted paths (JS object)
1012
- * @param pathsJson - JSON array of dotted paths
1013
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1014
- * @returns Data in specified format as JavaScript object
1015
- * @param {string} paths_json
1016
- * @param {number} format
846
+ * Get the evaluated schema without $params as JavaScript object
847
+ *
848
+ * @param skipLayout - Whether to skip layout resolution
849
+ * @returns Evaluated schema as JavaScript object
850
+ * @param {boolean} skip_layout
1017
851
  * @returns {any}
1018
852
  */
1019
- getSchemaByPathsJS(paths_json, format) {
853
+ getEvaluatedSchemaWithoutParamsJS(skip_layout) {
1020
854
  try {
1021
855
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1022
- const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1023
- const len0 = WASM_VECTOR_LEN;
1024
- wasm.jsonevalwasm_getSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, format);
856
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsJS(retptr, this.__wbg_ptr, skip_layout);
1025
857
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1026
858
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1027
859
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1034,39 +866,49 @@ export class JSONEvalWasm {
1034
866
  }
1035
867
  }
1036
868
  /**
1037
- * Get all schema values as array of path-value pairs
1038
- * Returns [{path: "", value: ""}, ...]
869
+ * Get evaluated schema without $params from subform
1039
870
  *
1040
- * @returns Array of {path, value} objects as JavaScript array
1041
- * @returns {any}
871
+ * @param subformPath - Path to the subform
872
+ * @param resolveLayout - Whether to resolve layout
873
+ * @returns Evaluated schema as JSON string
874
+ * @param {string} subform_path
875
+ * @param {boolean} resolve_layout
876
+ * @returns {string}
1042
877
  */
1043
- getSchemaValueArray() {
878
+ getEvaluatedSchemaWithoutParamsSubform(subform_path, resolve_layout) {
879
+ let deferred2_0;
880
+ let deferred2_1;
1044
881
  try {
1045
882
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1046
- wasm.jsonevalwasm_getSchemaValueArray(retptr, this.__wbg_ptr);
883
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
884
+ const len0 = WASM_VECTOR_LEN;
885
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubform(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1047
886
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1048
887
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1049
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1050
- if (r2) {
1051
- throw takeObject(r1);
1052
- }
1053
- return takeObject(r0);
888
+ deferred2_0 = r0;
889
+ deferred2_1 = r1;
890
+ return getStringFromWasm0(r0, r1);
1054
891
  } finally {
1055
892
  wasm.__wbindgen_add_to_stack_pointer(16);
893
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
1056
894
  }
1057
895
  }
1058
896
  /**
1059
- * Get the evaluated schema as JavaScript object
897
+ * Get evaluated schema without $params from subform as JavaScript object
1060
898
  *
1061
- * @param skipLayout - Whether to skip layout resolution
899
+ * @param subformPath - Path to the subform
900
+ * @param resolveLayout - Whether to resolve layout
1062
901
  * @returns Evaluated schema as JavaScript object
1063
- * @param {boolean} skip_layout
902
+ * @param {string} subform_path
903
+ * @param {boolean} resolve_layout
1064
904
  * @returns {any}
1065
905
  */
1066
- getEvaluatedSchemaJS(skip_layout) {
906
+ getEvaluatedSchemaWithoutParamsSubformJS(subform_path, resolve_layout) {
1067
907
  try {
1068
908
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1069
- wasm.jsonevalwasm_getEvaluatedSchemaJS(retptr, this.__wbg_ptr, skip_layout);
909
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
910
+ const len0 = WASM_VECTOR_LEN;
911
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1070
912
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1071
913
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1072
914
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1079,138 +921,130 @@ export class JSONEvalWasm {
1079
921
  }
1080
922
  }
1081
923
  /**
1082
- * Get all schema values as object with dotted path keys
1083
- * Returns {path: value, ...}
924
+ * Get a value from the schema using dotted path notation
1084
925
  *
1085
- * @returns Flat object with dotted paths as keys
1086
- * @returns {any}
926
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
927
+ * @returns Value as JSON string or null if not found
928
+ * @param {string} path
929
+ * @returns {string | undefined}
1087
930
  */
1088
- getSchemaValueObject() {
931
+ getSchemaByPath(path) {
1089
932
  try {
1090
933
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1091
- wasm.jsonevalwasm_getSchemaValueObject(retptr, this.__wbg_ptr);
934
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
935
+ const len0 = WASM_VECTOR_LEN;
936
+ wasm.jsonevalwasm_getSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0);
1092
937
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1093
938
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1094
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1095
- if (r2) {
1096
- throw takeObject(r1);
939
+ let v2;
940
+ if (r0 !== 0) {
941
+ v2 = getStringFromWasm0(r0, r1).slice();
942
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
1097
943
  }
1098
- return takeObject(r0);
944
+ return v2;
1099
945
  } finally {
1100
946
  wasm.__wbindgen_add_to_stack_pointer(16);
1101
947
  }
1102
948
  }
1103
949
  /**
1104
- * Reload schema from ParsedSchemaCache using a cache key
950
+ * Get a value from the schema using dotted path notation as JavaScript object
1105
951
  *
1106
- * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
1107
- * @param context - Optional context data JSON string
1108
- * @param data - Optional initial data JSON string
1109
- * @param {string} cache_key
1110
- * @param {string | null} [context]
1111
- * @param {string | null} [data]
952
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
953
+ * @returns Value as JavaScript object or null if not found
954
+ * @param {string} path
955
+ * @returns {any}
1112
956
  */
1113
- reloadSchemaFromCache(cache_key, context, data) {
957
+ getSchemaByPathJS(path) {
1114
958
  try {
1115
959
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1116
- const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
960
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1117
961
  const len0 = WASM_VECTOR_LEN;
1118
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1119
- var len1 = WASM_VECTOR_LEN;
1120
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1121
- var len2 = WASM_VECTOR_LEN;
1122
- wasm.jsonevalwasm_reloadSchemaFromCache(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
962
+ wasm.jsonevalwasm_getSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0);
1123
963
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1124
964
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1125
- if (r1) {
1126
- throw takeObject(r0);
965
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
966
+ if (r2) {
967
+ throw takeObject(r1);
1127
968
  }
969
+ return takeObject(r0);
1128
970
  } finally {
1129
971
  wasm.__wbindgen_add_to_stack_pointer(16);
1130
972
  }
1131
973
  }
1132
974
  /**
1133
- * Get a value from the evaluated schema using dotted path notation
1134
- *
1135
- * @param path - Dotted path to the value (e.g., "properties.field.value")
1136
- * @param skipLayout - Whether to skip layout resolution
975
+ * Get schema by specific path from subform (returns JSON string)
976
+ * @param subformPath - Path to the subform
977
+ * @param schemaPath - Path within the subform
1137
978
  * @returns Value as JSON string or null if not found
1138
- * @param {string} path
1139
- * @param {boolean} skip_layout
979
+ * @param {string} subform_path
980
+ * @param {string} schema_path
1140
981
  * @returns {string | undefined}
1141
982
  */
1142
- getEvaluatedSchemaByPath(path, skip_layout) {
983
+ getSchemaByPathSubform(subform_path, schema_path) {
1143
984
  try {
1144
985
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1145
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
986
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1146
987
  const len0 = WASM_VECTOR_LEN;
1147
- wasm.jsonevalwasm_getEvaluatedSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
988
+ const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
989
+ const len1 = WASM_VECTOR_LEN;
990
+ wasm.jsonevalwasm_getSchemaByPathSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1148
991
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1149
992
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1150
- let v2;
993
+ let v3;
1151
994
  if (r0 !== 0) {
1152
- v2 = getStringFromWasm0(r0, r1).slice();
1153
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
995
+ v3 = getStringFromWasm0(r0, r1).slice();
996
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
1154
997
  }
1155
- return v2;
998
+ return v3;
1156
999
  } finally {
1157
1000
  wasm.__wbindgen_add_to_stack_pointer(16);
1158
1001
  }
1159
1002
  }
1160
1003
  /**
1161
- * Get the evaluated schema in MessagePack format
1162
- *
1163
- * @param skipLayout - Whether to skip layout resolution
1164
- * @returns Evaluated schema as MessagePack bytes (Uint8Array)
1165
- *
1166
- * # Zero-Copy Optimization
1167
- *
1168
- * This method returns MessagePack binary data with minimal copying:
1169
- * 1. Serializes schema to Vec<u8> in Rust (unavoidable)
1170
- * 2. wasm-bindgen transfers Vec<u8> to JS as Uint8Array (optimized)
1171
- * 3. Result is a Uint8Array view (minimal overhead)
1172
- *
1173
- * MessagePack format is 20-50% smaller than JSON, ideal for web/WASM.
1174
- * @param {boolean} skip_layout
1175
- * @returns {Uint8Array}
1004
+ * Get schema by specific path from subform (returns JS object)
1005
+ * @param subformPath - Path to the subform
1006
+ * @param schemaPath - Path within the subform
1007
+ * @returns Value as JavaScript object or null if not found
1008
+ * @param {string} subform_path
1009
+ * @param {string} schema_path
1010
+ * @returns {any}
1176
1011
  */
1177
- getEvaluatedSchemaMsgpack(skip_layout) {
1012
+ getSchemaByPathSubformJS(subform_path, schema_path) {
1178
1013
  try {
1179
1014
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1180
- wasm.jsonevalwasm_getEvaluatedSchemaMsgpack(retptr, this.__wbg_ptr, skip_layout);
1015
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1016
+ const len0 = WASM_VECTOR_LEN;
1017
+ const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1018
+ const len1 = WASM_VECTOR_LEN;
1019
+ wasm.jsonevalwasm_getSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1181
1020
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1182
1021
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1183
1022
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1184
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1185
- if (r3) {
1186
- throw takeObject(r2);
1023
+ if (r2) {
1024
+ throw takeObject(r1);
1187
1025
  }
1188
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
1189
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1190
- return v1;
1026
+ return takeObject(r0);
1191
1027
  } finally {
1192
1028
  wasm.__wbindgen_add_to_stack_pointer(16);
1193
1029
  }
1194
1030
  }
1195
1031
  /**
1196
- * Get values from evaluated schema using multiple dotted paths
1032
+ * Get values from schema using multiple dotted paths
1197
1033
  * @param pathsJson - JSON array of dotted paths
1198
- * @param skipLayout - Whether to skip layout resolution
1199
1034
  * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1200
1035
  * @returns Data in specified format as JSON string
1201
1036
  * @param {string} paths_json
1202
- * @param {boolean} skip_layout
1203
1037
  * @param {number} format
1204
1038
  * @returns {string}
1205
1039
  */
1206
- getEvaluatedSchemaByPaths(paths_json, skip_layout, format) {
1040
+ getSchemaByPaths(paths_json, format) {
1207
1041
  let deferred3_0;
1208
1042
  let deferred3_1;
1209
1043
  try {
1210
1044
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1211
- const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1045
+ const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1212
1046
  const len0 = WASM_VECTOR_LEN;
1213
- wasm.jsonevalwasm_getEvaluatedSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
1047
+ wasm.jsonevalwasm_getSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, format);
1214
1048
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1215
1049
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1216
1050
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1226,25 +1060,24 @@ export class JSONEvalWasm {
1226
1060
  return getStringFromWasm0(ptr2, len2);
1227
1061
  } finally {
1228
1062
  wasm.__wbindgen_add_to_stack_pointer(16);
1229
- wasm.__wbindgen_export_2(deferred3_0, deferred3_1, 1);
1063
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
1230
1064
  }
1231
1065
  }
1232
1066
  /**
1233
- * Get a value from the evaluated schema using dotted path notation as JavaScript object
1234
- *
1235
- * @param path - Dotted path to the value (e.g., "properties.field.value")
1236
- * @param skipLayout - Whether to skip layout resolution
1237
- * @returns Value as JavaScript object or null if not found
1238
- * @param {string} path
1239
- * @param {boolean} skip_layout
1067
+ * Get values from schema using multiple dotted paths (JS object)
1068
+ * @param pathsJson - JSON array of dotted paths
1069
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1070
+ * @returns Data in specified format as JavaScript object
1071
+ * @param {string} paths_json
1072
+ * @param {number} format
1240
1073
  * @returns {any}
1241
1074
  */
1242
- getEvaluatedSchemaByPathJS(path, skip_layout) {
1075
+ getSchemaByPathsJS(paths_json, format) {
1243
1076
  try {
1244
1077
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1245
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1078
+ const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1246
1079
  const len0 = WASM_VECTOR_LEN;
1247
- wasm.jsonevalwasm_getEvaluatedSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
1080
+ wasm.jsonevalwasm_getSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, format);
1248
1081
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1249
1082
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1250
1083
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1257,22 +1090,63 @@ export class JSONEvalWasm {
1257
1090
  }
1258
1091
  }
1259
1092
  /**
1260
- * Get values from evaluated schema using multiple dotted paths (JS object)
1093
+ * Get schema by multiple paths from subform
1094
+ * @param subformPath - Path to the subform
1261
1095
  * @param pathsJson - JSON array of dotted paths
1262
- * @param skipLayout - Whether to skip layout resolution
1096
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1097
+ * @returns Data in specified format as JSON string
1098
+ * @param {string} subform_path
1099
+ * @param {string} paths_json
1100
+ * @param {number} format
1101
+ * @returns {string}
1102
+ */
1103
+ getSchemaByPathsSubform(subform_path, paths_json, format) {
1104
+ let deferred4_0;
1105
+ let deferred4_1;
1106
+ try {
1107
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1108
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1109
+ const len0 = WASM_VECTOR_LEN;
1110
+ const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1111
+ const len1 = WASM_VECTOR_LEN;
1112
+ wasm.jsonevalwasm_getSchemaByPathsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1113
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1114
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1115
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1116
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1117
+ var ptr3 = r0;
1118
+ var len3 = r1;
1119
+ if (r3) {
1120
+ ptr3 = 0; len3 = 0;
1121
+ throw takeObject(r2);
1122
+ }
1123
+ deferred4_0 = ptr3;
1124
+ deferred4_1 = len3;
1125
+ return getStringFromWasm0(ptr3, len3);
1126
+ } finally {
1127
+ wasm.__wbindgen_add_to_stack_pointer(16);
1128
+ wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
1129
+ }
1130
+ }
1131
+ /**
1132
+ * Get schema by multiple paths from subform (JS object)
1133
+ * @param subformPath - Path to the subform
1134
+ * @param paths - Array of dotted paths
1263
1135
  * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1264
1136
  * @returns Data in specified format as JavaScript object
1137
+ * @param {string} subform_path
1265
1138
  * @param {string} paths_json
1266
- * @param {boolean} skip_layout
1267
1139
  * @param {number} format
1268
1140
  * @returns {any}
1269
1141
  */
1270
- getEvaluatedSchemaByPathsJS(paths_json, skip_layout, format) {
1142
+ getSchemaByPathsSubformJS(subform_path, paths_json, format) {
1271
1143
  try {
1272
1144
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1273
- const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1145
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1274
1146
  const len0 = WASM_VECTOR_LEN;
1275
- wasm.jsonevalwasm_getEvaluatedSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
1147
+ const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1148
+ const len1 = WASM_VECTOR_LEN;
1149
+ wasm.jsonevalwasm_getSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1276
1150
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1277
1151
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1278
1152
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1285,41 +1159,16 @@ export class JSONEvalWasm {
1285
1159
  }
1286
1160
  }
1287
1161
  /**
1288
- * Get the evaluated schema without $params field
1289
- *
1290
- * @param skipLayout - Whether to skip layout resolution
1291
- * @returns Evaluated schema as JSON string
1292
- * @param {boolean} skip_layout
1293
- * @returns {string}
1294
- */
1295
- getEvaluatedSchemaWithoutParams(skip_layout) {
1296
- let deferred1_0;
1297
- let deferred1_1;
1298
- try {
1299
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1300
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParams(retptr, this.__wbg_ptr, skip_layout);
1301
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1302
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1303
- deferred1_0 = r0;
1304
- deferred1_1 = r1;
1305
- return getStringFromWasm0(r0, r1);
1306
- } finally {
1307
- wasm.__wbindgen_add_to_stack_pointer(16);
1308
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
1309
- }
1310
- }
1311
- /**
1312
- * Get the evaluated schema without $params as JavaScript object
1162
+ * Get all schema values (evaluations ending with .value)
1163
+ * Mutates internal data by overriding with values from value evaluations
1313
1164
  *
1314
- * @param skipLayout - Whether to skip layout resolution
1315
- * @returns Evaluated schema as JavaScript object
1316
- * @param {boolean} skip_layout
1165
+ * @returns Modified data as JavaScript object
1317
1166
  * @returns {any}
1318
1167
  */
1319
- getEvaluatedSchemaWithoutParamsJS(skip_layout) {
1168
+ getSchemaValue() {
1320
1169
  try {
1321
1170
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1322
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsJS(retptr, this.__wbg_ptr, skip_layout);
1171
+ wasm.jsonevalwasm_getSchemaValue(retptr, this.__wbg_ptr);
1323
1172
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1324
1173
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1325
1174
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1332,125 +1181,97 @@ export class JSONEvalWasm {
1332
1181
  }
1333
1182
  }
1334
1183
  /**
1335
- * Check if a subform exists at the given path
1336
- *
1337
- * @param subformPath - Path to check
1338
- * @returns True if subform exists, false otherwise
1339
- * @param {string} subform_path
1340
- * @returns {boolean}
1341
- */
1342
- hasSubform(subform_path) {
1343
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1344
- const len0 = WASM_VECTOR_LEN;
1345
- const ret = wasm.jsonevalwasm_hasSubform(this.__wbg_ptr, ptr0, len0);
1346
- return ret !== 0;
1347
- }
1348
- /**
1349
- * Evaluate a subform with data
1184
+ * Get all schema values as array of path-value pairs
1185
+ * Returns [{path: "", value: ""}, ...]
1350
1186
  *
1351
- * @param subformPath - Path to the subform (e.g., "#/riders")
1352
- * @param data - JSON data string for the subform
1353
- * @param context - Optional context data JSON string
1354
- * @param paths - Optional array of paths to evaluate (JSON string array)
1355
- * @throws Error if evaluation fails
1356
- * @param {string} subform_path
1357
- * @param {string} data
1358
- * @param {string | null} [context]
1359
- * @param {string[] | null} [paths]
1187
+ * @returns Array of {path, value} objects as JavaScript array
1188
+ * @returns {any}
1360
1189
  */
1361
- evaluateSubform(subform_path, data, context, paths) {
1190
+ getSchemaValueArray() {
1362
1191
  try {
1363
1192
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1364
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1365
- const len0 = WASM_VECTOR_LEN;
1366
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1367
- const len1 = WASM_VECTOR_LEN;
1368
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1369
- var len2 = WASM_VECTOR_LEN;
1370
- var ptr3 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
1371
- var len3 = WASM_VECTOR_LEN;
1372
- wasm.jsonevalwasm_evaluateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1193
+ wasm.jsonevalwasm_getSchemaValueArray(retptr, this.__wbg_ptr);
1373
1194
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1374
1195
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1375
- if (r1) {
1376
- throw takeObject(r0);
1196
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1197
+ if (r2) {
1198
+ throw takeObject(r1);
1377
1199
  }
1200
+ return takeObject(r0);
1378
1201
  } finally {
1379
1202
  wasm.__wbindgen_add_to_stack_pointer(16);
1380
1203
  }
1381
1204
  }
1382
1205
  /**
1383
- * Validate subform data against its schema rules
1206
+ * Get schema values from subform as a flat array of path-value pairs.
1207
+ * Returns an array like `[{path: "field.sub", value: 123}, ...]`.
1384
1208
  *
1385
1209
  * @param subformPath - Path to the subform
1386
- * @param data - JSON data string for the subform
1387
- * @param context - Optional context data JSON string
1388
- * @returns ValidationResult
1210
+ * @returns Array of {path, value} objects
1389
1211
  * @param {string} subform_path
1390
- * @param {string} data
1391
- * @param {string | null} [context]
1392
- * @returns {ValidationResult}
1212
+ * @returns {any}
1393
1213
  */
1394
- validateSubform(subform_path, data, context) {
1214
+ getSchemaValueArraySubform(subform_path) {
1395
1215
  try {
1396
1216
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1397
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1217
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1398
1218
  const len0 = WASM_VECTOR_LEN;
1399
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1400
- const len1 = WASM_VECTOR_LEN;
1401
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1402
- var len2 = WASM_VECTOR_LEN;
1403
- wasm.jsonevalwasm_validateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1219
+ wasm.jsonevalwasm_getSchemaValueArraySubform(retptr, this.__wbg_ptr, ptr0, len0);
1404
1220
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1405
1221
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1406
1222
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1407
1223
  if (r2) {
1408
1224
  throw takeObject(r1);
1409
1225
  }
1410
- return ValidationResult.__wrap(r0);
1226
+ return takeObject(r0);
1411
1227
  } finally {
1412
1228
  wasm.__wbindgen_add_to_stack_pointer(16);
1413
1229
  }
1414
1230
  }
1415
1231
  /**
1416
- * Get list of available subform paths
1232
+ * Get all schema values as object with dotted path keys
1233
+ * Returns {path: value, ...}
1417
1234
  *
1418
- * @returns Array of subform paths
1419
- * @returns {string[]}
1235
+ * @returns Flat object with dotted paths as keys
1236
+ * @returns {any}
1420
1237
  */
1421
- getSubformPaths() {
1238
+ getSchemaValueObject() {
1422
1239
  try {
1423
1240
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1424
- wasm.jsonevalwasm_getSubformPaths(retptr, this.__wbg_ptr);
1241
+ wasm.jsonevalwasm_getSchemaValueObject(retptr, this.__wbg_ptr);
1425
1242
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1426
1243
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1427
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1428
- wasm.__wbindgen_export_2(r0, r1 * 4, 4);
1429
- return v1;
1244
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1245
+ if (r2) {
1246
+ throw takeObject(r1);
1247
+ }
1248
+ return takeObject(r0);
1430
1249
  } finally {
1431
1250
  wasm.__wbindgen_add_to_stack_pointer(16);
1432
1251
  }
1433
1252
  }
1434
1253
  /**
1435
- * Resolve layout for subform
1254
+ * Get schema values from subform as a flat object with dotted path keys.
1255
+ * Returns an object like `{"field.sub": 123, ...}`.
1436
1256
  *
1437
1257
  * @param subformPath - Path to the subform
1438
- * @param evaluate - If true, runs evaluation before resolving layout
1439
- * @throws Error if resolve fails
1258
+ * @returns Flat object with dotted paths as keys
1440
1259
  * @param {string} subform_path
1441
- * @param {boolean} evaluate
1260
+ * @returns {any}
1442
1261
  */
1443
- resolveLayoutSubform(subform_path, evaluate) {
1262
+ getSchemaValueObjectSubform(subform_path) {
1444
1263
  try {
1445
1264
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1446
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1265
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1447
1266
  const len0 = WASM_VECTOR_LEN;
1448
- wasm.jsonevalwasm_resolveLayoutSubform(retptr, this.__wbg_ptr, ptr0, len0, evaluate);
1267
+ wasm.jsonevalwasm_getSchemaValueObjectSubform(retptr, this.__wbg_ptr, ptr0, len0);
1449
1268
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1450
1269
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1451
- if (r1) {
1452
- throw takeObject(r0);
1270
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1271
+ if (r2) {
1272
+ throw takeObject(r1);
1453
1273
  }
1274
+ return takeObject(r0);
1454
1275
  } finally {
1455
1276
  wasm.__wbindgen_add_to_stack_pointer(16);
1456
1277
  }
@@ -1467,7 +1288,7 @@ export class JSONEvalWasm {
1467
1288
  getSchemaValueSubform(subform_path) {
1468
1289
  try {
1469
1290
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1470
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1291
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1471
1292
  const len0 = WASM_VECTOR_LEN;
1472
1293
  wasm.jsonevalwasm_getSchemaValueSubform(retptr, this.__wbg_ptr, ptr0, len0);
1473
1294
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -1482,312 +1303,295 @@ export class JSONEvalWasm {
1482
1303
  }
1483
1304
  }
1484
1305
  /**
1485
- * Get schema by specific path from subform (returns JSON string)
1486
- * @param subformPath - Path to the subform
1487
- * @param schemaPath - Path within the subform
1488
- * @returns Value as JSON string or null if not found
1489
- * @param {string} subform_path
1490
- * @param {string} schema_path
1491
- * @returns {string | undefined}
1306
+ * Get list of available subform paths
1307
+ *
1308
+ * @returns Array of subform paths
1309
+ * @returns {string[]}
1492
1310
  */
1493
- getSchemaByPathSubform(subform_path, schema_path) {
1311
+ getSubformPaths() {
1494
1312
  try {
1495
1313
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1496
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1497
- const len0 = WASM_VECTOR_LEN;
1498
- const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1499
- const len1 = WASM_VECTOR_LEN;
1500
- wasm.jsonevalwasm_getSchemaByPathSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1314
+ wasm.jsonevalwasm_getSubformPaths(retptr, this.__wbg_ptr);
1501
1315
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1502
1316
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1503
- let v3;
1504
- if (r0 !== 0) {
1505
- v3 = getStringFromWasm0(r0, r1).slice();
1506
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1507
- }
1508
- return v3;
1317
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1318
+ wasm.__wbindgen_export3(r0, r1 * 4, 4);
1319
+ return v1;
1509
1320
  } finally {
1510
1321
  wasm.__wbindgen_add_to_stack_pointer(16);
1511
1322
  }
1512
1323
  }
1513
1324
  /**
1514
- * Evaluate dependents in subform when fields change
1325
+ * Check if a subform exists at the given path
1515
1326
  *
1516
- * @param subformPath - Path to the subform
1517
- * @param changedPaths - JSON array of paths that changed
1518
- * @param data - Optional updated JSON data string
1519
- * @param context - Optional context data JSON string
1520
- * @returns Array of dependent change objects as JSON string
1327
+ * @param subformPath - Path to check
1328
+ * @returns True if subform exists, false otherwise
1521
1329
  * @param {string} subform_path
1522
- * @param {string} changed_paths_json
1523
- * @param {string | null | undefined} data
1524
- * @param {string | null | undefined} context
1525
- * @param {boolean} re_evaluate
1526
- * @returns {string}
1330
+ * @returns {boolean}
1527
1331
  */
1528
- evaluateDependentsSubform(subform_path, changed_paths_json, data, context, re_evaluate) {
1529
- let deferred6_0;
1530
- let deferred6_1;
1332
+ hasSubform(subform_path) {
1333
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1334
+ const len0 = WASM_VECTOR_LEN;
1335
+ const ret = wasm.jsonevalwasm_hasSubform(this.__wbg_ptr, ptr0, len0);
1336
+ return ret !== 0;
1337
+ }
1338
+ /**
1339
+ * Check if evaluation caching is enabled
1340
+ *
1341
+ * @returns true if caching is enabled, false otherwise
1342
+ * @returns {boolean}
1343
+ */
1344
+ isCacheEnabled() {
1345
+ const ret = wasm.jsonevalwasm_isCacheEnabled(this.__wbg_ptr);
1346
+ return ret !== 0;
1347
+ }
1348
+ /**
1349
+ * Create a new JSONEval instance
1350
+ *
1351
+ * @param schema - JSON schema string
1352
+ * @param context - Optional context data JSON string
1353
+ * @param data - Optional initial data JSON string
1354
+ * @param {string} schema
1355
+ * @param {string | null} [context]
1356
+ * @param {string | null} [data]
1357
+ */
1358
+ constructor(schema, context, data) {
1531
1359
  try {
1532
1360
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1533
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1361
+ const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1534
1362
  const len0 = WASM_VECTOR_LEN;
1535
- const ptr1 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1536
- const len1 = WASM_VECTOR_LEN;
1537
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1363
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1364
+ var len1 = WASM_VECTOR_LEN;
1365
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1538
1366
  var len2 = WASM_VECTOR_LEN;
1539
- var ptr3 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1540
- var len3 = WASM_VECTOR_LEN;
1541
- wasm.jsonevalwasm_evaluateDependentsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, re_evaluate);
1367
+ wasm.jsonevalwasm_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
1542
1368
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1543
1369
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1544
1370
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1545
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1546
- var ptr5 = r0;
1547
- var len5 = r1;
1548
- if (r3) {
1549
- ptr5 = 0; len5 = 0;
1550
- throw takeObject(r2);
1371
+ if (r2) {
1372
+ throw takeObject(r1);
1551
1373
  }
1552
- deferred6_0 = ptr5;
1553
- deferred6_1 = len5;
1554
- return getStringFromWasm0(ptr5, len5);
1374
+ this.__wbg_ptr = r0 >>> 0;
1375
+ JSONEvalWasmFinalization.register(this, this.__wbg_ptr, this);
1376
+ return this;
1555
1377
  } finally {
1556
1378
  wasm.__wbindgen_add_to_stack_pointer(16);
1557
- wasm.__wbindgen_export_2(deferred6_0, deferred6_1, 1);
1558
1379
  }
1559
1380
  }
1560
1381
  /**
1561
- * Get schema by multiple paths from subform
1562
- * @param subformPath - Path to the subform
1563
- * @param pathsJson - JSON array of dotted paths
1564
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1565
- * @returns Data in specified format as JSON string
1566
- * @param {string} subform_path
1567
- * @param {string} paths_json
1568
- * @param {number} format
1569
- * @returns {string}
1382
+ * Create a new JSONEval instance from a cached ParsedSchema
1383
+ *
1384
+ * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
1385
+ * @param context - Optional context data JSON string
1386
+ * @param data - Optional initial data JSON string
1387
+ * @param {string} cache_key
1388
+ * @param {string | null} [context]
1389
+ * @param {string | null} [data]
1390
+ * @returns {JSONEvalWasm}
1570
1391
  */
1571
- getSchemaByPathsSubform(subform_path, paths_json, format) {
1572
- let deferred4_0;
1573
- let deferred4_1;
1392
+ static newFromCache(cache_key, context, data) {
1574
1393
  try {
1575
1394
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1576
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1395
+ const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1577
1396
  const len0 = WASM_VECTOR_LEN;
1578
- const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1579
- const len1 = WASM_VECTOR_LEN;
1580
- wasm.jsonevalwasm_getSchemaByPathsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1397
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1398
+ var len1 = WASM_VECTOR_LEN;
1399
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1400
+ var len2 = WASM_VECTOR_LEN;
1401
+ wasm.jsonevalwasm_newFromCache(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
1581
1402
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1582
1403
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1583
1404
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1584
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1585
- var ptr3 = r0;
1586
- var len3 = r1;
1587
- if (r3) {
1588
- ptr3 = 0; len3 = 0;
1589
- throw takeObject(r2);
1405
+ if (r2) {
1406
+ throw takeObject(r1);
1590
1407
  }
1591
- deferred4_0 = ptr3;
1592
- deferred4_1 = len3;
1593
- return getStringFromWasm0(ptr3, len3);
1408
+ return JSONEvalWasm.__wrap(r0);
1594
1409
  } finally {
1595
1410
  wasm.__wbindgen_add_to_stack_pointer(16);
1596
- wasm.__wbindgen_export_2(deferred4_0, deferred4_1, 1);
1597
1411
  }
1598
1412
  }
1599
1413
  /**
1600
- * Get evaluated schema from subform
1414
+ * Create a new JSONEval instance from MessagePack-encoded schema
1601
1415
  *
1602
- * @param subformPath - Path to the subform
1603
- * @param resolveLayout - Whether to resolve layout
1604
- * @returns Evaluated schema as JSON string
1605
- * @param {string} subform_path
1606
- * @param {boolean} resolve_layout
1607
- * @returns {string}
1416
+ * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
1417
+ * @param context - Optional context data JSON string
1418
+ * @param data - Optional initial data JSON string
1419
+ * @param {Uint8Array} schema_msgpack
1420
+ * @param {string | null} [context]
1421
+ * @param {string | null} [data]
1422
+ * @returns {JSONEvalWasm}
1608
1423
  */
1609
- getEvaluatedSchemaSubform(subform_path, resolve_layout) {
1610
- let deferred2_0;
1611
- let deferred2_1;
1424
+ static newFromMsgpack(schema_msgpack, context, data) {
1612
1425
  try {
1613
1426
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1614
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1427
+ const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export);
1615
1428
  const len0 = WASM_VECTOR_LEN;
1616
- wasm.jsonevalwasm_getEvaluatedSchemaSubform(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1429
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1430
+ var len1 = WASM_VECTOR_LEN;
1431
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1432
+ var len2 = WASM_VECTOR_LEN;
1433
+ wasm.jsonevalwasm_newFromMsgpack(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
1617
1434
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1618
1435
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1619
- deferred2_0 = r0;
1620
- deferred2_1 = r1;
1621
- return getStringFromWasm0(r0, r1);
1436
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1437
+ if (r2) {
1438
+ throw takeObject(r1);
1439
+ }
1440
+ return JSONEvalWasm.__wrap(r0);
1622
1441
  } finally {
1623
1442
  wasm.__wbindgen_add_to_stack_pointer(16);
1624
- wasm.__wbindgen_export_2(deferred2_0, deferred2_1, 1);
1625
1443
  }
1626
1444
  }
1627
1445
  /**
1628
- * Get schema by specific path from subform (returns JS object)
1629
- * @param subformPath - Path to the subform
1630
- * @param schemaPath - Path within the subform
1631
- * @returns Value as JavaScript object or null if not found
1632
- * @param {string} subform_path
1633
- * @param {string} schema_path
1634
- * @returns {any}
1446
+ * Reload schema with new data
1447
+ *
1448
+ * @param schema - New JSON schema string
1449
+ * @param context - Optional context data JSON string
1450
+ * @param data - Optional initial data JSON string
1451
+ * @param {string} schema
1452
+ * @param {string | null} [context]
1453
+ * @param {string | null} [data]
1635
1454
  */
1636
- getSchemaByPathSubformJS(subform_path, schema_path) {
1455
+ reloadSchema(schema, context, data) {
1637
1456
  try {
1638
1457
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1639
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1458
+ const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1640
1459
  const len0 = WASM_VECTOR_LEN;
1641
- const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1642
- const len1 = WASM_VECTOR_LEN;
1643
- wasm.jsonevalwasm_getSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1460
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1461
+ var len1 = WASM_VECTOR_LEN;
1462
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1463
+ var len2 = WASM_VECTOR_LEN;
1464
+ wasm.jsonevalwasm_reloadSchema(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1644
1465
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1645
1466
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1646
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1647
- if (r2) {
1648
- throw takeObject(r1);
1467
+ if (r1) {
1468
+ throw takeObject(r0);
1649
1469
  }
1650
- return takeObject(r0);
1651
1470
  } finally {
1652
1471
  wasm.__wbindgen_add_to_stack_pointer(16);
1653
1472
  }
1654
1473
  }
1655
1474
  /**
1656
- * Evaluate dependents in subform and return as JavaScript object
1475
+ * Reload schema from ParsedSchemaCache using a cache key
1657
1476
  *
1658
- * @param subformPath - Path to the subform
1659
- * @param changedPath - Path of the field that changed
1660
- * @param data - Optional updated JSON data string
1477
+ * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
1661
1478
  * @param context - Optional context data JSON string
1662
- * @returns Array of dependent change objects as JavaScript object
1663
- * @param {string} subform_path
1664
- * @param {string} changed_paths_json
1665
- * @param {string | null | undefined} data
1666
- * @param {string | null | undefined} context
1667
- * @param {boolean} re_evaluate
1668
- * @returns {any}
1479
+ * @param data - Optional initial data JSON string
1480
+ * @param {string} cache_key
1481
+ * @param {string | null} [context]
1482
+ * @param {string | null} [data]
1669
1483
  */
1670
- evaluateDependentsSubformJS(subform_path, changed_paths_json, data, context, re_evaluate) {
1484
+ reloadSchemaFromCache(cache_key, context, data) {
1671
1485
  try {
1672
1486
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1673
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1487
+ const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1674
1488
  const len0 = WASM_VECTOR_LEN;
1675
- const ptr1 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1676
- const len1 = WASM_VECTOR_LEN;
1677
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1489
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1490
+ var len1 = WASM_VECTOR_LEN;
1491
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1678
1492
  var len2 = WASM_VECTOR_LEN;
1679
- var ptr3 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1680
- var len3 = WASM_VECTOR_LEN;
1681
- wasm.jsonevalwasm_evaluateDependentsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, re_evaluate);
1493
+ wasm.jsonevalwasm_reloadSchemaFromCache(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1682
1494
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1683
1495
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1684
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1685
- if (r2) {
1686
- throw takeObject(r1);
1496
+ if (r1) {
1497
+ throw takeObject(r0);
1687
1498
  }
1688
- return takeObject(r0);
1689
1499
  } finally {
1690
1500
  wasm.__wbindgen_add_to_stack_pointer(16);
1691
1501
  }
1692
1502
  }
1693
1503
  /**
1694
- * Get schema by multiple paths from subform (JS object)
1695
- * @param subformPath - Path to the subform
1696
- * @param paths - Array of dotted paths
1697
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1698
- * @returns Data in specified format as JavaScript object
1699
- * @param {string} subform_path
1700
- * @param {string} paths_json
1701
- * @param {number} format
1702
- * @returns {any}
1504
+ * Reload schema from MessagePack-encoded bytes
1505
+ *
1506
+ * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
1507
+ * @param context - Optional context data JSON string
1508
+ * @param data - Optional initial data JSON string
1509
+ * @param {Uint8Array} schema_msgpack
1510
+ * @param {string | null} [context]
1511
+ * @param {string | null} [data]
1703
1512
  */
1704
- getSchemaByPathsSubformJS(subform_path, paths_json, format) {
1513
+ reloadSchemaMsgpack(schema_msgpack, context, data) {
1705
1514
  try {
1706
1515
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1707
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1516
+ const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export);
1708
1517
  const len0 = WASM_VECTOR_LEN;
1709
- const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1710
- const len1 = WASM_VECTOR_LEN;
1711
- wasm.jsonevalwasm_getSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1518
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1519
+ var len1 = WASM_VECTOR_LEN;
1520
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1521
+ var len2 = WASM_VECTOR_LEN;
1522
+ wasm.jsonevalwasm_reloadSchemaMsgpack(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1712
1523
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1713
1524
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1714
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1715
- if (r2) {
1716
- throw takeObject(r1);
1525
+ if (r1) {
1526
+ throw takeObject(r0);
1717
1527
  }
1718
- return takeObject(r0);
1719
1528
  } finally {
1720
1529
  wasm.__wbindgen_add_to_stack_pointer(16);
1721
1530
  }
1722
1531
  }
1723
1532
  /**
1724
- * Get schema values from subform as a flat array of path-value pairs.
1725
- * Returns an array like `[{path: "field.sub", value: 123}, ...]`.
1533
+ * Resolve layout with optional evaluation
1726
1534
  *
1727
- * @param subformPath - Path to the subform
1728
- * @returns Array of {path, value} objects
1729
- * @param {string} subform_path
1730
- * @returns {any}
1535
+ * @param evaluate - If true, runs evaluation before resolving layout
1536
+ * @throws Error if resolve fails
1537
+ * @param {boolean} evaluate
1731
1538
  */
1732
- getSchemaValueArraySubform(subform_path) {
1539
+ resolveLayout(evaluate) {
1733
1540
  try {
1734
1541
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1735
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1736
- const len0 = WASM_VECTOR_LEN;
1737
- wasm.jsonevalwasm_getSchemaValueArraySubform(retptr, this.__wbg_ptr, ptr0, len0);
1542
+ wasm.jsonevalwasm_resolveLayout(retptr, this.__wbg_ptr, evaluate);
1738
1543
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1739
1544
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1740
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1741
- if (r2) {
1742
- throw takeObject(r1);
1545
+ if (r1) {
1546
+ throw takeObject(r0);
1743
1547
  }
1744
- return takeObject(r0);
1745
1548
  } finally {
1746
1549
  wasm.__wbindgen_add_to_stack_pointer(16);
1747
1550
  }
1748
1551
  }
1749
1552
  /**
1750
- * Get evaluated schema from subform as JavaScript object
1553
+ * Resolve layout for subform
1751
1554
  *
1752
1555
  * @param subformPath - Path to the subform
1753
- * @param resolveLayout - Whether to resolve layout
1754
- * @returns Evaluated schema as JavaScript object
1556
+ * @param evaluate - If true, runs evaluation before resolving layout
1557
+ * @throws Error if resolve fails
1755
1558
  * @param {string} subform_path
1756
- * @param {boolean} resolve_layout
1757
- * @returns {any}
1559
+ * @param {boolean} evaluate
1758
1560
  */
1759
- getEvaluatedSchemaSubformJS(subform_path, resolve_layout) {
1561
+ resolveLayoutSubform(subform_path, evaluate) {
1760
1562
  try {
1761
1563
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1762
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1564
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1763
1565
  const len0 = WASM_VECTOR_LEN;
1764
- wasm.jsonevalwasm_getEvaluatedSchemaSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1566
+ wasm.jsonevalwasm_resolveLayoutSubform(retptr, this.__wbg_ptr, ptr0, len0, evaluate);
1765
1567
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1766
1568
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1767
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1768
- if (r2) {
1769
- throw takeObject(r1);
1569
+ if (r1) {
1570
+ throw takeObject(r0);
1770
1571
  }
1771
- return takeObject(r0);
1772
1572
  } finally {
1773
1573
  wasm.__wbindgen_add_to_stack_pointer(16);
1774
1574
  }
1775
1575
  }
1776
1576
  /**
1777
- * Get schema values from subform as a flat object with dotted path keys.
1778
- * Returns an object like `{"field.sub": 123, ...}`.
1779
- *
1780
- * @param subformPath - Path to the subform
1781
- * @returns Flat object with dotted paths as keys
1782
- * @param {string} subform_path
1577
+ * Run pre-compiled logic by ID
1578
+ * @param logic_id - Compiled logic ID from compileLogic
1579
+ * @param data - Optional JSON data string
1580
+ * @param context - Optional JSON context string
1581
+ * @returns Result as JavaScript object
1582
+ * @param {number} logic_id
1583
+ * @param {string | null} [data]
1584
+ * @param {string | null} [context]
1783
1585
  * @returns {any}
1784
1586
  */
1785
- getSchemaValueObjectSubform(subform_path) {
1587
+ runLogic(logic_id, data, context) {
1786
1588
  try {
1787
1589
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1788
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1789
- const len0 = WASM_VECTOR_LEN;
1790
- wasm.jsonevalwasm_getSchemaValueObjectSubform(retptr, this.__wbg_ptr, ptr0, len0);
1590
+ var ptr0 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1591
+ var len0 = WASM_VECTOR_LEN;
1592
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1593
+ var len1 = WASM_VECTOR_LEN;
1594
+ wasm.jsonevalwasm_runLogic(retptr, this.__wbg_ptr, logic_id, ptr0, len0, ptr1, len1);
1791
1595
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1792
1596
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1793
1597
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1800,98 +1604,62 @@ export class JSONEvalWasm {
1800
1604
  }
1801
1605
  }
1802
1606
  /**
1803
- * Get evaluated schema by specific path from subform
1607
+ * Set timezone offset for datetime operations (TODAY, NOW)
1804
1608
  *
1805
- * @param subformPath - Path to the subform
1806
- * @param schemaPath - Dotted path to the value within the subform
1807
- * @param skipLayout - Whether to skip layout resolution
1808
- * @returns Value as JSON string or null if not found
1809
- * @param {string} subform_path
1810
- * @param {string} schema_path
1811
- * @param {boolean} skip_layout
1812
- * @returns {string | undefined}
1609
+ * @param offsetMinutes - Timezone offset in minutes from UTC (e.g., 420 for UTC+7, -300 for UTC-5)
1610
+ * Pass null or undefined to reset to UTC
1611
+ * @param {number | null} [offset_minutes]
1813
1612
  */
1814
- getEvaluatedSchemaByPathSubform(subform_path, schema_path, skip_layout) {
1815
- try {
1816
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1817
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1818
- const len0 = WASM_VECTOR_LEN;
1819
- const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1820
- const len1 = WASM_VECTOR_LEN;
1821
- wasm.jsonevalwasm_getEvaluatedSchemaByPathSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout);
1822
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1823
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1824
- let v3;
1825
- if (r0 !== 0) {
1826
- v3 = getStringFromWasm0(r0, r1).slice();
1827
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1828
- }
1829
- return v3;
1830
- } finally {
1831
- wasm.__wbindgen_add_to_stack_pointer(16);
1832
- }
1613
+ setTimezoneOffset(offset_minutes) {
1614
+ wasm.jsonevalwasm_setTimezoneOffset(this.__wbg_ptr, isLikeNone(offset_minutes) ? 0x100000001 : (offset_minutes) >> 0);
1833
1615
  }
1834
1616
  /**
1835
- * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JSON string)
1836
- * @param subformPath - Path to the subform
1837
- * @param pathsJson - JSON array of dotted paths
1838
- * @param skipLayout - Whether to skip layout resolution
1839
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1840
- * @returns Data in specified format as JSON string
1841
- * @param {string} subform_path
1842
- * @param {string} paths_json
1843
- * @param {boolean} skip_layout
1844
- * @param {number} format
1845
- * @returns {string}
1617
+ * Validate data against schema rules
1618
+ *
1619
+ * @param data - JSON data string
1620
+ * @param context - Optional context data JSON string
1621
+ * @returns ValidationResult
1622
+ * @param {string} data
1623
+ * @param {string | null} [context]
1624
+ * @returns {ValidationResult}
1846
1625
  */
1847
- getEvaluatedSchemaByPathsSubform(subform_path, paths_json, skip_layout, format) {
1848
- let deferred4_0;
1849
- let deferred4_1;
1626
+ validate(data, context) {
1850
1627
  try {
1851
1628
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1852
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1629
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1853
1630
  const len0 = WASM_VECTOR_LEN;
1854
- const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1855
- const len1 = WASM_VECTOR_LEN;
1856
- wasm.jsonevalwasm_getEvaluatedSchemaByPathsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout, format);
1631
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1632
+ var len1 = WASM_VECTOR_LEN;
1633
+ wasm.jsonevalwasm_validate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1857
1634
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1858
1635
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1859
1636
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1860
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1861
- var ptr3 = r0;
1862
- var len3 = r1;
1863
- if (r3) {
1864
- ptr3 = 0; len3 = 0;
1865
- throw takeObject(r2);
1637
+ if (r2) {
1638
+ throw takeObject(r1);
1866
1639
  }
1867
- deferred4_0 = ptr3;
1868
- deferred4_1 = len3;
1869
- return getStringFromWasm0(ptr3, len3);
1640
+ return ValidationResult.__wrap(r0);
1870
1641
  } finally {
1871
1642
  wasm.__wbindgen_add_to_stack_pointer(16);
1872
- wasm.__wbindgen_export_2(deferred4_0, deferred4_1, 1);
1873
1643
  }
1874
1644
  }
1875
1645
  /**
1876
- * Get evaluated schema by specific path from subform as JavaScript object
1646
+ * Validate data and return as plain JavaScript object (Worker-safe)
1877
1647
  *
1878
- * @param subformPath - Path to the subform
1879
- * @param schemaPath - Dotted path to the value within the subform
1880
- * @param skipLayout - Whether to skip layout resolution
1881
- * @returns Value as JavaScript object or null if not found
1882
- * @param {string} subform_path
1883
- * @param {string} schema_path
1884
- * @param {boolean} skip_layout
1648
+ * @param data - JSON data string
1649
+ * @param context - Optional context data JSON string
1650
+ * @returns Plain JavaScript object with validation result
1651
+ * @param {string} data
1652
+ * @param {string | null} [context]
1885
1653
  * @returns {any}
1886
1654
  */
1887
- getEvaluatedSchemaByPathSubformJS(subform_path, schema_path, skip_layout) {
1655
+ validateJS(data, context) {
1888
1656
  try {
1889
1657
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1890
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1658
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1891
1659
  const len0 = WASM_VECTOR_LEN;
1892
- const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1893
- const len1 = WASM_VECTOR_LEN;
1894
- wasm.jsonevalwasm_getEvaluatedSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout);
1660
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1661
+ var len1 = WASM_VECTOR_LEN;
1662
+ wasm.jsonevalwasm_validateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1895
1663
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1896
1664
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1897
1665
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1904,88 +1672,100 @@ export class JSONEvalWasm {
1904
1672
  }
1905
1673
  }
1906
1674
  /**
1907
- * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
1908
- * @param subformPath - Path to the subform
1909
- * @param paths - Array of dotted paths
1910
- * @param skipLayout - Whether to skip layout resolution
1911
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1912
- * @returns Data in specified format as JavaScript object
1913
- * @param {string} subform_path
1914
- * @param {string} paths_json
1915
- * @param {boolean} skip_layout
1916
- * @param {number} format
1917
- * @returns {any}
1675
+ * Validate data against schema rules with optional path filtering
1676
+ *
1677
+ * @param data - JSON data string
1678
+ * @param context - Optional context data JSON string
1679
+ * @param paths - Optional array of paths to validate (null for all)
1680
+ * @returns ValidationResult
1681
+ * @param {string} data
1682
+ * @param {string | null} [context]
1683
+ * @param {string[] | null} [paths]
1684
+ * @returns {ValidationResult}
1918
1685
  */
1919
- getEvaluatedSchemaByPathsSubformJS(subform_path, paths_json, skip_layout, format) {
1686
+ validatePaths(data, context, paths) {
1920
1687
  try {
1921
1688
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1922
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1689
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1923
1690
  const len0 = WASM_VECTOR_LEN;
1924
- const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1925
- const len1 = WASM_VECTOR_LEN;
1926
- wasm.jsonevalwasm_getEvaluatedSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout, format);
1691
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1692
+ var len1 = WASM_VECTOR_LEN;
1693
+ var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export);
1694
+ var len2 = WASM_VECTOR_LEN;
1695
+ wasm.jsonevalwasm_validatePaths(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1927
1696
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1928
1697
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1929
1698
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1930
1699
  if (r2) {
1931
1700
  throw takeObject(r1);
1932
1701
  }
1933
- return takeObject(r0);
1702
+ return ValidationResult.__wrap(r0);
1934
1703
  } finally {
1935
1704
  wasm.__wbindgen_add_to_stack_pointer(16);
1936
1705
  }
1937
1706
  }
1938
1707
  /**
1939
- * Get evaluated schema without $params from subform
1708
+ * Validate with path filtering and return as plain JavaScript object (Worker-safe)
1940
1709
  *
1941
- * @param subformPath - Path to the subform
1942
- * @param resolveLayout - Whether to resolve layout
1943
- * @returns Evaluated schema as JSON string
1944
- * @param {string} subform_path
1945
- * @param {boolean} resolve_layout
1946
- * @returns {string}
1710
+ * @param data - JSON data string
1711
+ * @param context - Optional context data JSON string
1712
+ * @param paths - Optional array of paths to validate (null for all)
1713
+ * @returns Plain JavaScript object with validation result
1714
+ * @param {string} data
1715
+ * @param {string | null} [context]
1716
+ * @param {string[] | null} [paths]
1717
+ * @returns {any}
1947
1718
  */
1948
- getEvaluatedSchemaWithoutParamsSubform(subform_path, resolve_layout) {
1949
- let deferred2_0;
1950
- let deferred2_1;
1719
+ validatePathsJS(data, context, paths) {
1951
1720
  try {
1952
1721
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1953
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1722
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1954
1723
  const len0 = WASM_VECTOR_LEN;
1955
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubform(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1724
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1725
+ var len1 = WASM_VECTOR_LEN;
1726
+ var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export);
1727
+ var len2 = WASM_VECTOR_LEN;
1728
+ wasm.jsonevalwasm_validatePathsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1956
1729
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1957
1730
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1958
- deferred2_0 = r0;
1959
- deferred2_1 = r1;
1960
- return getStringFromWasm0(r0, r1);
1731
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1732
+ if (r2) {
1733
+ throw takeObject(r1);
1734
+ }
1735
+ return takeObject(r0);
1961
1736
  } finally {
1962
1737
  wasm.__wbindgen_add_to_stack_pointer(16);
1963
- wasm.__wbindgen_export_2(deferred2_0, deferred2_1, 1);
1964
1738
  }
1965
1739
  }
1966
1740
  /**
1967
- * Get evaluated schema without $params from subform as JavaScript object
1741
+ * Validate subform data against its schema rules
1968
1742
  *
1969
1743
  * @param subformPath - Path to the subform
1970
- * @param resolveLayout - Whether to resolve layout
1971
- * @returns Evaluated schema as JavaScript object
1744
+ * @param data - JSON data string for the subform
1745
+ * @param context - Optional context data JSON string
1746
+ * @returns ValidationResult
1972
1747
  * @param {string} subform_path
1973
- * @param {boolean} resolve_layout
1974
- * @returns {any}
1748
+ * @param {string} data
1749
+ * @param {string | null} [context]
1750
+ * @returns {ValidationResult}
1975
1751
  */
1976
- getEvaluatedSchemaWithoutParamsSubformJS(subform_path, resolve_layout) {
1752
+ validateSubform(subform_path, data, context) {
1977
1753
  try {
1978
1754
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1979
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1755
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1980
1756
  const len0 = WASM_VECTOR_LEN;
1981
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1757
+ const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1758
+ const len1 = WASM_VECTOR_LEN;
1759
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1760
+ var len2 = WASM_VECTOR_LEN;
1761
+ wasm.jsonevalwasm_validateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1982
1762
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1983
1763
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1984
1764
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1985
1765
  if (r2) {
1986
1766
  throw takeObject(r1);
1987
1767
  }
1988
- return takeObject(r0);
1768
+ return ValidationResult.__wrap(r0);
1989
1769
  } finally {
1990
1770
  wasm.__wbindgen_add_to_stack_pointer(16);
1991
1771
  }
@@ -1993,21 +1773,16 @@ export class JSONEvalWasm {
1993
1773
  }
1994
1774
  if (Symbol.dispose) JSONEvalWasm.prototype[Symbol.dispose] = JSONEvalWasm.prototype.free;
1995
1775
 
1996
- const ValidationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
1997
- ? { register: () => {}, unregister: () => {} }
1998
- : new FinalizationRegistry(ptr => wasm.__wbg_validationerror_free(ptr >>> 0, 1));
1999
1776
  /**
2000
1777
  * Validation error for JavaScript
2001
1778
  */
2002
1779
  export class ValidationError {
2003
-
2004
1780
  __destroy_into_raw() {
2005
1781
  const ptr = this.__wbg_ptr;
2006
1782
  this.__wbg_ptr = 0;
2007
1783
  ValidationErrorFinalization.unregister(this);
2008
1784
  return ptr;
2009
1785
  }
2010
-
2011
1786
  free() {
2012
1787
  const ptr = this.__destroy_into_raw();
2013
1788
  wasm.__wbg_validationerror_free(ptr, 0);
@@ -2015,57 +1790,57 @@ export class ValidationError {
2015
1790
  /**
2016
1791
  * @returns {string | undefined}
2017
1792
  */
2018
- get field_value() {
1793
+ get code() {
2019
1794
  try {
2020
1795
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2021
- wasm.validationerror_field_value(retptr, this.__wbg_ptr);
1796
+ wasm.validationerror_code(retptr, this.__wbg_ptr);
2022
1797
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2023
1798
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2024
1799
  let v1;
2025
1800
  if (r0 !== 0) {
2026
1801
  v1 = getStringFromWasm0(r0, r1).slice();
2027
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1802
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
2028
1803
  }
2029
1804
  return v1;
2030
1805
  } finally {
2031
1806
  wasm.__wbindgen_add_to_stack_pointer(16);
2032
1807
  }
2033
1808
  }
1809
+ /**
1810
+ * @returns {any}
1811
+ */
1812
+ get data() {
1813
+ const ret = wasm.validationerror_data(this.__wbg_ptr);
1814
+ return takeObject(ret);
1815
+ }
2034
1816
  /**
2035
1817
  * @returns {string | undefined}
2036
1818
  */
2037
- get code() {
1819
+ get field_value() {
2038
1820
  try {
2039
1821
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2040
- wasm.validationerror_code(retptr, this.__wbg_ptr);
1822
+ wasm.validationerror_field_value(retptr, this.__wbg_ptr);
2041
1823
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2042
1824
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2043
1825
  let v1;
2044
1826
  if (r0 !== 0) {
2045
1827
  v1 = getStringFromWasm0(r0, r1).slice();
2046
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1828
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
2047
1829
  }
2048
1830
  return v1;
2049
1831
  } finally {
2050
1832
  wasm.__wbindgen_add_to_stack_pointer(16);
2051
1833
  }
2052
1834
  }
2053
- /**
2054
- * @returns {any}
2055
- */
2056
- get data() {
2057
- const ret = wasm.validationerror_data(this.__wbg_ptr);
2058
- return takeObject(ret);
2059
- }
2060
1835
  /**
2061
1836
  * @returns {string}
2062
1837
  */
2063
- get path() {
1838
+ get message() {
2064
1839
  let deferred1_0;
2065
1840
  let deferred1_1;
2066
1841
  try {
2067
1842
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2068
- wasm.validationerror_path(retptr, this.__wbg_ptr);
1843
+ wasm.validationerror_message(retptr, this.__wbg_ptr);
2069
1844
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2070
1845
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2071
1846
  deferred1_0 = r0;
@@ -2073,18 +1848,18 @@ export class ValidationError {
2073
1848
  return getStringFromWasm0(r0, r1);
2074
1849
  } finally {
2075
1850
  wasm.__wbindgen_add_to_stack_pointer(16);
2076
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
1851
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
2077
1852
  }
2078
1853
  }
2079
1854
  /**
2080
1855
  * @returns {string}
2081
1856
  */
2082
- get message() {
1857
+ get path() {
2083
1858
  let deferred1_0;
2084
1859
  let deferred1_1;
2085
1860
  try {
2086
1861
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2087
- wasm.validationerror_message(retptr, this.__wbg_ptr);
1862
+ wasm.validationerror_path(retptr, this.__wbg_ptr);
2088
1863
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2089
1864
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2090
1865
  deferred1_0 = r0;
@@ -2092,7 +1867,7 @@ export class ValidationError {
2092
1867
  return getStringFromWasm0(r0, r1);
2093
1868
  } finally {
2094
1869
  wasm.__wbindgen_add_to_stack_pointer(16);
2095
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
1870
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
2096
1871
  }
2097
1872
  }
2098
1873
  /**
@@ -2107,7 +1882,7 @@ export class ValidationError {
2107
1882
  let v1;
2108
1883
  if (r0 !== 0) {
2109
1884
  v1 = getStringFromWasm0(r0, r1).slice();
2110
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1885
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
2111
1886
  }
2112
1887
  return v1;
2113
1888
  } finally {
@@ -2130,247 +1905,457 @@ export class ValidationError {
2130
1905
  return getStringFromWasm0(r0, r1);
2131
1906
  } finally {
2132
1907
  wasm.__wbindgen_add_to_stack_pointer(16);
2133
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
1908
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
1909
+ }
1910
+ }
1911
+ }
1912
+ if (Symbol.dispose) ValidationError.prototype[Symbol.dispose] = ValidationError.prototype.free;
1913
+
1914
+ /**
1915
+ * Validation result for JavaScript
1916
+ */
1917
+ export class ValidationResult {
1918
+ static __wrap(ptr) {
1919
+ ptr = ptr >>> 0;
1920
+ const obj = Object.create(ValidationResult.prototype);
1921
+ obj.__wbg_ptr = ptr;
1922
+ ValidationResultFinalization.register(obj, obj.__wbg_ptr, obj);
1923
+ return obj;
1924
+ }
1925
+ __destroy_into_raw() {
1926
+ const ptr = this.__wbg_ptr;
1927
+ this.__wbg_ptr = 0;
1928
+ ValidationResultFinalization.unregister(this);
1929
+ return ptr;
1930
+ }
1931
+ free() {
1932
+ const ptr = this.__destroy_into_raw();
1933
+ wasm.__wbg_validationresult_free(ptr, 0);
1934
+ }
1935
+ /**
1936
+ * @returns {any}
1937
+ */
1938
+ get error() {
1939
+ const ret = wasm.validationresult_error(this.__wbg_ptr);
1940
+ return takeObject(ret);
1941
+ }
1942
+ /**
1943
+ * @returns {boolean}
1944
+ */
1945
+ get has_error() {
1946
+ const ret = wasm.validationresult_has_error(this.__wbg_ptr);
1947
+ return ret !== 0;
1948
+ }
1949
+ /**
1950
+ * @returns {any}
1951
+ */
1952
+ toJSON() {
1953
+ try {
1954
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1955
+ wasm.validationresult_toJSON(retptr, this.__wbg_ptr);
1956
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1957
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1958
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1959
+ if (r2) {
1960
+ throw takeObject(r1);
1961
+ }
1962
+ return takeObject(r0);
1963
+ } finally {
1964
+ wasm.__wbindgen_add_to_stack_pointer(16);
2134
1965
  }
2135
1966
  }
2136
1967
  }
2137
- if (Symbol.dispose) ValidationError.prototype[Symbol.dispose] = ValidationError.prototype.free;
1968
+ if (Symbol.dispose) ValidationResult.prototype[Symbol.dispose] = ValidationResult.prototype.free;
1969
+
1970
+ /**
1971
+ * Get the library version
1972
+ * @returns {string}
1973
+ */
1974
+ export function getVersion() {
1975
+ let deferred1_0;
1976
+ let deferred1_1;
1977
+ try {
1978
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1979
+ wasm.getVersion(retptr);
1980
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1981
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1982
+ deferred1_0 = r0;
1983
+ deferred1_1 = r1;
1984
+ return getStringFromWasm0(r0, r1);
1985
+ } finally {
1986
+ wasm.__wbindgen_add_to_stack_pointer(16);
1987
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
1988
+ }
1989
+ }
1990
+
1991
+ /**
1992
+ * Initialize the library (sets up panic hook)
1993
+ */
1994
+ export function init() {
1995
+ wasm.init();
1996
+ }
1997
+
1998
+ /**
1999
+ * Get library version (alias)
2000
+ * @returns {string}
2001
+ */
2002
+ export function version() {
2003
+ let deferred1_0;
2004
+ let deferred1_1;
2005
+ try {
2006
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2007
+ wasm.version(retptr);
2008
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2009
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2010
+ deferred1_0 = r0;
2011
+ deferred1_1 = r1;
2012
+ return getStringFromWasm0(r0, r1);
2013
+ } finally {
2014
+ wasm.__wbindgen_add_to_stack_pointer(16);
2015
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
2016
+ }
2017
+ }
2018
+
2019
+ function __wbg_get_imports() {
2020
+ const import0 = {
2021
+ __proto__: null,
2022
+ __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
2023
+ const ret = Error(getStringFromWasm0(arg0, arg1));
2024
+ return addHeapObject(ret);
2025
+ },
2026
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
2027
+ const ret = String(getObject(arg1));
2028
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2029
+ const len1 = WASM_VECTOR_LEN;
2030
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2031
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2032
+ },
2033
+ __wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
2034
+ const ret = typeof(getObject(arg0)) === 'string';
2035
+ return ret;
2036
+ },
2037
+ __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
2038
+ const obj = getObject(arg1);
2039
+ const ret = typeof(obj) === 'string' ? obj : undefined;
2040
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2041
+ var len1 = WASM_VECTOR_LEN;
2042
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2043
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2044
+ },
2045
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
2046
+ throw new Error(getStringFromWasm0(arg0, arg1));
2047
+ },
2048
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
2049
+ let deferred0_0;
2050
+ let deferred0_1;
2051
+ try {
2052
+ deferred0_0 = arg0;
2053
+ deferred0_1 = arg1;
2054
+ console.error(getStringFromWasm0(arg0, arg1));
2055
+ } finally {
2056
+ wasm.__wbindgen_export3(deferred0_0, deferred0_1, 1);
2057
+ }
2058
+ },
2059
+ __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
2060
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
2061
+ }, arguments); },
2062
+ __wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
2063
+ const ret = getObject(arg0).getTime();
2064
+ return ret;
2065
+ },
2066
+ __wbg_log_c6d5ff35ea0ea84b: function(arg0, arg1) {
2067
+ console.log(getStringFromWasm0(arg0, arg1));
2068
+ },
2069
+ __wbg_new_0_1dcafdf5e786e876: function() {
2070
+ const ret = new Date();
2071
+ return addHeapObject(ret);
2072
+ },
2073
+ __wbg_new_227d7c05414eb861: function() {
2074
+ const ret = new Error();
2075
+ return addHeapObject(ret);
2076
+ },
2077
+ __wbg_new_49d5571bd3f0c4d4: function() {
2078
+ const ret = new Map();
2079
+ return addHeapObject(ret);
2080
+ },
2081
+ __wbg_new_a70fbab9066b301f: function() {
2082
+ const ret = new Array();
2083
+ return addHeapObject(ret);
2084
+ },
2085
+ __wbg_new_ab79df5bd7c26067: function() {
2086
+ const ret = new Object();
2087
+ return addHeapObject(ret);
2088
+ },
2089
+ __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
2090
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2091
+ },
2092
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
2093
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2094
+ },
2095
+ __wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
2096
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2097
+ return addHeapObject(ret);
2098
+ },
2099
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
2100
+ const ret = getObject(arg1).stack;
2101
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2102
+ const len1 = WASM_VECTOR_LEN;
2103
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2104
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2105
+ },
2106
+ __wbindgen_cast_0000000000000001: function(arg0) {
2107
+ // Cast intrinsic for `F64 -> Externref`.
2108
+ const ret = arg0;
2109
+ return addHeapObject(ret);
2110
+ },
2111
+ __wbindgen_cast_0000000000000002: function(arg0) {
2112
+ // Cast intrinsic for `I64 -> Externref`.
2113
+ const ret = arg0;
2114
+ return addHeapObject(ret);
2115
+ },
2116
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2117
+ // Cast intrinsic for `Ref(String) -> Externref`.
2118
+ const ret = getStringFromWasm0(arg0, arg1);
2119
+ return addHeapObject(ret);
2120
+ },
2121
+ __wbindgen_cast_0000000000000004: function(arg0) {
2122
+ // Cast intrinsic for `U64 -> Externref`.
2123
+ const ret = BigInt.asUintN(64, arg0);
2124
+ return addHeapObject(ret);
2125
+ },
2126
+ __wbindgen_object_clone_ref: function(arg0) {
2127
+ const ret = getObject(arg0);
2128
+ return addHeapObject(ret);
2129
+ },
2130
+ __wbindgen_object_drop_ref: function(arg0) {
2131
+ takeObject(arg0);
2132
+ },
2133
+ };
2134
+ return {
2135
+ __proto__: null,
2136
+ "./json_eval_rs_bg.js": import0,
2137
+ };
2138
+ }
2138
2139
 
2140
+ const JSONEvalWasmFinalization = (typeof FinalizationRegistry === 'undefined')
2141
+ ? { register: () => {}, unregister: () => {} }
2142
+ : new FinalizationRegistry(ptr => wasm.__wbg_jsonevalwasm_free(ptr >>> 0, 1));
2143
+ const ValidationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
2144
+ ? { register: () => {}, unregister: () => {} }
2145
+ : new FinalizationRegistry(ptr => wasm.__wbg_validationerror_free(ptr >>> 0, 1));
2139
2146
  const ValidationResultFinalization = (typeof FinalizationRegistry === 'undefined')
2140
2147
  ? { register: () => {}, unregister: () => {} }
2141
2148
  : new FinalizationRegistry(ptr => wasm.__wbg_validationresult_free(ptr >>> 0, 1));
2142
- /**
2143
- * Validation result for JavaScript
2144
- */
2145
- export class ValidationResult {
2146
2149
 
2147
- static __wrap(ptr) {
2148
- ptr = ptr >>> 0;
2149
- const obj = Object.create(ValidationResult.prototype);
2150
- obj.__wbg_ptr = ptr;
2151
- ValidationResultFinalization.register(obj, obj.__wbg_ptr, obj);
2152
- return obj;
2150
+ function addHeapObject(obj) {
2151
+ if (heap_next === heap.length) heap.push(heap.length + 1);
2152
+ const idx = heap_next;
2153
+ heap_next = heap[idx];
2154
+
2155
+ heap[idx] = obj;
2156
+ return idx;
2157
+ }
2158
+
2159
+ function dropObject(idx) {
2160
+ if (idx < 1028) return;
2161
+ heap[idx] = heap_next;
2162
+ heap_next = idx;
2163
+ }
2164
+
2165
+ function getArrayJsValueFromWasm0(ptr, len) {
2166
+ ptr = ptr >>> 0;
2167
+ const mem = getDataViewMemory0();
2168
+ const result = [];
2169
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
2170
+ result.push(takeObject(mem.getUint32(i, true)));
2153
2171
  }
2172
+ return result;
2173
+ }
2154
2174
 
2155
- __destroy_into_raw() {
2156
- const ptr = this.__wbg_ptr;
2157
- this.__wbg_ptr = 0;
2158
- ValidationResultFinalization.unregister(this);
2159
- return ptr;
2175
+ function getArrayU8FromWasm0(ptr, len) {
2176
+ ptr = ptr >>> 0;
2177
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
2178
+ }
2179
+
2180
+ let cachedDataViewMemory0 = null;
2181
+ function getDataViewMemory0() {
2182
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
2183
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
2160
2184
  }
2185
+ return cachedDataViewMemory0;
2186
+ }
2161
2187
 
2162
- free() {
2163
- const ptr = this.__destroy_into_raw();
2164
- wasm.__wbg_validationresult_free(ptr, 0);
2188
+ function getStringFromWasm0(ptr, len) {
2189
+ ptr = ptr >>> 0;
2190
+ return decodeText(ptr, len);
2191
+ }
2192
+
2193
+ let cachedUint8ArrayMemory0 = null;
2194
+ function getUint8ArrayMemory0() {
2195
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2196
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2165
2197
  }
2166
- /**
2167
- * @returns {any}
2168
- */
2169
- get error() {
2170
- const ret = wasm.validationresult_error(this.__wbg_ptr);
2171
- return takeObject(ret);
2198
+ return cachedUint8ArrayMemory0;
2199
+ }
2200
+
2201
+ function getObject(idx) { return heap[idx]; }
2202
+
2203
+ function handleError(f, args) {
2204
+ try {
2205
+ return f.apply(this, args);
2206
+ } catch (e) {
2207
+ wasm.__wbindgen_export4(addHeapObject(e));
2172
2208
  }
2173
- /**
2174
- * @returns {any}
2175
- */
2176
- toJSON() {
2177
- try {
2178
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2179
- wasm.validationresult_toJSON(retptr, this.__wbg_ptr);
2180
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2181
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2182
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2183
- if (r2) {
2184
- throw takeObject(r1);
2185
- }
2186
- return takeObject(r0);
2187
- } finally {
2188
- wasm.__wbindgen_add_to_stack_pointer(16);
2209
+ }
2210
+
2211
+ let heap = new Array(1024).fill(undefined);
2212
+ heap.push(undefined, null, true, false);
2213
+
2214
+ let heap_next = heap.length;
2215
+
2216
+ function isLikeNone(x) {
2217
+ return x === undefined || x === null;
2218
+ }
2219
+
2220
+ function passArray8ToWasm0(arg, malloc) {
2221
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
2222
+ getUint8ArrayMemory0().set(arg, ptr / 1);
2223
+ WASM_VECTOR_LEN = arg.length;
2224
+ return ptr;
2225
+ }
2226
+
2227
+ function passArrayJsValueToWasm0(array, malloc) {
2228
+ const ptr = malloc(array.length * 4, 4) >>> 0;
2229
+ const mem = getDataViewMemory0();
2230
+ for (let i = 0; i < array.length; i++) {
2231
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
2232
+ }
2233
+ WASM_VECTOR_LEN = array.length;
2234
+ return ptr;
2235
+ }
2236
+
2237
+ function passStringToWasm0(arg, malloc, realloc) {
2238
+ if (realloc === undefined) {
2239
+ const buf = cachedTextEncoder.encode(arg);
2240
+ const ptr = malloc(buf.length, 1) >>> 0;
2241
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
2242
+ WASM_VECTOR_LEN = buf.length;
2243
+ return ptr;
2244
+ }
2245
+
2246
+ let len = arg.length;
2247
+ let ptr = malloc(len, 1) >>> 0;
2248
+
2249
+ const mem = getUint8ArrayMemory0();
2250
+
2251
+ let offset = 0;
2252
+
2253
+ for (; offset < len; offset++) {
2254
+ const code = arg.charCodeAt(offset);
2255
+ if (code > 0x7F) break;
2256
+ mem[ptr + offset] = code;
2257
+ }
2258
+ if (offset !== len) {
2259
+ if (offset !== 0) {
2260
+ arg = arg.slice(offset);
2189
2261
  }
2262
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2263
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2264
+ const ret = cachedTextEncoder.encodeInto(arg, view);
2265
+
2266
+ offset += ret.written;
2267
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
2190
2268
  }
2191
- /**
2192
- * @returns {boolean}
2193
- */
2194
- get has_error() {
2195
- const ret = wasm.validationresult_has_error(this.__wbg_ptr);
2196
- return ret !== 0;
2269
+
2270
+ WASM_VECTOR_LEN = offset;
2271
+ return ptr;
2272
+ }
2273
+
2274
+ function takeObject(idx) {
2275
+ const ret = getObject(idx);
2276
+ dropObject(idx);
2277
+ return ret;
2278
+ }
2279
+
2280
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2281
+ cachedTextDecoder.decode();
2282
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
2283
+ let numBytesDecoded = 0;
2284
+ function decodeText(ptr, len) {
2285
+ numBytesDecoded += len;
2286
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2287
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2288
+ cachedTextDecoder.decode();
2289
+ numBytesDecoded = len;
2197
2290
  }
2291
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2198
2292
  }
2199
- if (Symbol.dispose) ValidationResult.prototype[Symbol.dispose] = ValidationResult.prototype.free;
2200
2293
 
2201
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
2294
+ const cachedTextEncoder = new TextEncoder();
2295
+
2296
+ if (!('encodeInto' in cachedTextEncoder)) {
2297
+ cachedTextEncoder.encodeInto = function (arg, view) {
2298
+ const buf = cachedTextEncoder.encode(arg);
2299
+ view.set(buf);
2300
+ return {
2301
+ read: arg.length,
2302
+ written: buf.length
2303
+ };
2304
+ };
2305
+ }
2306
+
2307
+ let WASM_VECTOR_LEN = 0;
2308
+
2309
+ let wasmModule, wasm;
2310
+ function __wbg_finalize_init(instance, module) {
2311
+ wasm = instance.exports;
2312
+ wasmModule = module;
2313
+ cachedDataViewMemory0 = null;
2314
+ cachedUint8ArrayMemory0 = null;
2315
+ wasm.__wbindgen_start();
2316
+ return wasm;
2317
+ }
2202
2318
 
2203
2319
  async function __wbg_load(module, imports) {
2204
2320
  if (typeof Response === 'function' && module instanceof Response) {
2205
2321
  if (typeof WebAssembly.instantiateStreaming === 'function') {
2206
2322
  try {
2207
2323
  return await WebAssembly.instantiateStreaming(module, imports);
2208
-
2209
2324
  } catch (e) {
2210
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
2325
+ const validResponse = module.ok && expectedResponseType(module.type);
2211
2326
 
2212
2327
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
2213
2328
  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);
2214
2329
 
2215
- } else {
2216
- throw e;
2217
- }
2330
+ } else { throw e; }
2218
2331
  }
2219
2332
  }
2220
2333
 
2221
2334
  const bytes = await module.arrayBuffer();
2222
2335
  return await WebAssembly.instantiate(bytes, imports);
2223
-
2224
2336
  } else {
2225
2337
  const instance = await WebAssembly.instantiate(module, imports);
2226
2338
 
2227
2339
  if (instance instanceof WebAssembly.Instance) {
2228
2340
  return { instance, module };
2229
-
2230
2341
  } else {
2231
2342
  return instance;
2232
2343
  }
2233
2344
  }
2234
- }
2235
2345
 
2236
- function __wbg_get_imports() {
2237
- const imports = {};
2238
- imports.wbg = {};
2239
- imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
2240
- const ret = Error(getStringFromWasm0(arg0, arg1));
2241
- return addHeapObject(ret);
2242
- };
2243
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
2244
- const ret = String(getObject(arg1));
2245
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2246
- const len1 = WASM_VECTOR_LEN;
2247
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2248
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2249
- };
2250
- imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
2251
- let deferred0_0;
2252
- let deferred0_1;
2253
- try {
2254
- deferred0_0 = arg0;
2255
- deferred0_1 = arg1;
2256
- console.error(getStringFromWasm0(arg0, arg1));
2257
- } finally {
2258
- wasm.__wbindgen_export_2(deferred0_0, deferred0_1, 1);
2346
+ function expectedResponseType(type) {
2347
+ switch (type) {
2348
+ case 'basic': case 'cors': case 'default': return true;
2259
2349
  }
2260
- };
2261
- imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
2262
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
2263
- }, arguments) };
2264
- imports.wbg.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
2265
- const ret = getObject(arg0).getTime();
2266
- return ret;
2267
- };
2268
- imports.wbg.__wbg_log_e4e5c76e87a2771f = function(arg0, arg1) {
2269
- console.log(getStringFromWasm0(arg0, arg1));
2270
- };
2271
- imports.wbg.__wbg_new0_b0a0a38c201e6df5 = function() {
2272
- const ret = new Date();
2273
- return addHeapObject(ret);
2274
- };
2275
- imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
2276
- const ret = new Object();
2277
- return addHeapObject(ret);
2278
- };
2279
- imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
2280
- const ret = new Array();
2281
- return addHeapObject(ret);
2282
- };
2283
- imports.wbg.__wbg_new_2ff1f68f3676ea53 = function() {
2284
- const ret = new Map();
2285
- return addHeapObject(ret);
2286
- };
2287
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
2288
- const ret = new Error();
2289
- return addHeapObject(ret);
2290
- };
2291
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2292
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2293
- };
2294
- imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
2295
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2296
- };
2297
- imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
2298
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2299
- return addHeapObject(ret);
2300
- };
2301
- imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2302
- const ret = getObject(arg1).stack;
2303
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2304
- const len1 = WASM_VECTOR_LEN;
2305
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2306
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2307
- };
2308
- imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
2309
- const ret = typeof(getObject(arg0)) === 'string';
2310
- return ret;
2311
- };
2312
- imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
2313
- const obj = getObject(arg1);
2314
- const ret = typeof(obj) === 'string' ? obj : undefined;
2315
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2316
- var len1 = WASM_VECTOR_LEN;
2317
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2318
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2319
- };
2320
- imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
2321
- throw new Error(getStringFromWasm0(arg0, arg1));
2322
- };
2323
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
2324
- // Cast intrinsic for `Ref(String) -> Externref`.
2325
- const ret = getStringFromWasm0(arg0, arg1);
2326
- return addHeapObject(ret);
2327
- };
2328
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
2329
- // Cast intrinsic for `U64 -> Externref`.
2330
- const ret = BigInt.asUintN(64, arg0);
2331
- return addHeapObject(ret);
2332
- };
2333
- imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
2334
- // Cast intrinsic for `I64 -> Externref`.
2335
- const ret = arg0;
2336
- return addHeapObject(ret);
2337
- };
2338
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
2339
- // Cast intrinsic for `F64 -> Externref`.
2340
- const ret = arg0;
2341
- return addHeapObject(ret);
2342
- };
2343
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2344
- const ret = getObject(arg0);
2345
- return addHeapObject(ret);
2346
- };
2347
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2348
- takeObject(arg0);
2349
- };
2350
-
2351
- return imports;
2352
- }
2353
-
2354
- function __wbg_init_memory(imports, memory) {
2355
-
2356
- }
2357
-
2358
- function __wbg_finalize_init(instance, module) {
2359
- wasm = instance.exports;
2360
- __wbg_init.__wbindgen_wasm_module = module;
2361
- cachedDataViewMemory0 = null;
2362
- cachedUint8ArrayMemory0 = null;
2363
-
2364
-
2365
- wasm.__wbindgen_start();
2366
- return wasm;
2350
+ return false;
2351
+ }
2367
2352
  }
2368
2353
 
2369
2354
  function initSync(module) {
2370
2355
  if (wasm !== undefined) return wasm;
2371
2356
 
2372
2357
 
2373
- if (typeof module !== 'undefined') {
2358
+ if (module !== undefined) {
2374
2359
  if (Object.getPrototypeOf(module) === Object.prototype) {
2375
2360
  ({module} = module)
2376
2361
  } else {
@@ -2379,15 +2364,10 @@ function initSync(module) {
2379
2364
  }
2380
2365
 
2381
2366
  const imports = __wbg_get_imports();
2382
-
2383
- __wbg_init_memory(imports);
2384
-
2385
2367
  if (!(module instanceof WebAssembly.Module)) {
2386
2368
  module = new WebAssembly.Module(module);
2387
2369
  }
2388
-
2389
2370
  const instance = new WebAssembly.Instance(module, imports);
2390
-
2391
2371
  return __wbg_finalize_init(instance, module);
2392
2372
  }
2393
2373
 
@@ -2395,7 +2375,7 @@ async function __wbg_init(module_or_path) {
2395
2375
  if (wasm !== undefined) return wasm;
2396
2376
 
2397
2377
 
2398
- if (typeof module_or_path !== 'undefined') {
2378
+ if (module_or_path !== undefined) {
2399
2379
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2400
2380
  ({module_or_path} = module_or_path)
2401
2381
  } else {
@@ -2403,7 +2383,7 @@ async function __wbg_init(module_or_path) {
2403
2383
  }
2404
2384
  }
2405
2385
 
2406
- if (typeof module_or_path === 'undefined') {
2386
+ if (module_or_path === undefined) {
2407
2387
  module_or_path = new URL('json_eval_rs_bg.wasm', import.meta.url);
2408
2388
  }
2409
2389
  const imports = __wbg_get_imports();
@@ -2412,12 +2392,9 @@ async function __wbg_init(module_or_path) {
2412
2392
  module_or_path = fetch(module_or_path);
2413
2393
  }
2414
2394
 
2415
- __wbg_init_memory(imports);
2416
-
2417
2395
  const { instance, module } = await __wbg_load(await module_or_path, imports);
2418
2396
 
2419
2397
  return __wbg_finalize_init(instance, module);
2420
2398
  }
2421
2399
 
2422
- export { initSync };
2423
- export default __wbg_init;
2400
+ export { initSync, __wbg_init as default };