@aws/cloudformation-validate 1.0.0-beta

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.
@@ -0,0 +1,871 @@
1
+ /* @ts-self-types="./bindings_wasm.d.ts" */
2
+
3
+ class WasmCelEngine {
4
+ __destroy_into_raw() {
5
+ const ptr = this.__wbg_ptr;
6
+ this.__wbg_ptr = 0;
7
+ WasmCelEngineFinalization.unregister(this);
8
+ return ptr;
9
+ }
10
+ free() {
11
+ const ptr = this.__destroy_into_raw();
12
+ wasm.__wbg_wasmcelengine_free(ptr, 0);
13
+ }
14
+ /**
15
+ * @returns {string}
16
+ */
17
+ engineName() {
18
+ let deferred1_0;
19
+ let deferred1_1;
20
+ try {
21
+ const ret = wasm.wasmcelengine_engineName(this.__wbg_ptr);
22
+ deferred1_0 = ret[0];
23
+ deferred1_1 = ret[1];
24
+ return getStringFromWasm0(ret[0], ret[1]);
25
+ } finally {
26
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
27
+ }
28
+ }
29
+ /**
30
+ * @returns {any}
31
+ */
32
+ listRules() {
33
+ const ret = wasm.wasmcelengine_listRules(this.__wbg_ptr);
34
+ if (ret[2]) {
35
+ throw takeFromExternrefTable0(ret[1]);
36
+ }
37
+ return takeFromExternrefTable0(ret[0]);
38
+ }
39
+ /**
40
+ * @param {EngineConfig} config
41
+ */
42
+ constructor(config) {
43
+ const ret = wasm.wasmcelengine_new(config);
44
+ if (ret[2]) {
45
+ throw takeFromExternrefTable0(ret[1]);
46
+ }
47
+ this.__wbg_ptr = ret[0];
48
+ WasmCelEngineFinalization.register(this, this.__wbg_ptr, this);
49
+ return this;
50
+ }
51
+ /**
52
+ * @param {Uint8Array} template
53
+ * @param {ValidateConfig} options
54
+ * @param {string} file_path
55
+ * @returns {any}
56
+ */
57
+ validateDetailed(template, options, file_path) {
58
+ const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
59
+ const len0 = WASM_VECTOR_LEN;
60
+ const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
61
+ const len1 = WASM_VECTOR_LEN;
62
+ const ret = wasm.wasmcelengine_validateDetailed(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
63
+ if (ret[2]) {
64
+ throw takeFromExternrefTable0(ret[1]);
65
+ }
66
+ return takeFromExternrefTable0(ret[0]);
67
+ }
68
+ /**
69
+ * @param {Uint8Array} template
70
+ * @param {ValidateConfig} options
71
+ * @param {string} file_path
72
+ * @returns {any}
73
+ */
74
+ validateStandard(template, options, file_path) {
75
+ const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
76
+ const len0 = WASM_VECTOR_LEN;
77
+ const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
78
+ const len1 = WASM_VECTOR_LEN;
79
+ const ret = wasm.wasmcelengine_validateStandard(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
80
+ if (ret[2]) {
81
+ throw takeFromExternrefTable0(ret[1]);
82
+ }
83
+ return takeFromExternrefTable0(ret[0]);
84
+ }
85
+ }
86
+ if (Symbol.dispose) WasmCelEngine.prototype[Symbol.dispose] = WasmCelEngine.prototype.free;
87
+ exports.WasmCelEngine = WasmCelEngine;
88
+
89
+ class WasmRegoEngine {
90
+ __destroy_into_raw() {
91
+ const ptr = this.__wbg_ptr;
92
+ this.__wbg_ptr = 0;
93
+ WasmRegoEngineFinalization.unregister(this);
94
+ return ptr;
95
+ }
96
+ free() {
97
+ const ptr = this.__destroy_into_raw();
98
+ wasm.__wbg_wasmregoengine_free(ptr, 0);
99
+ }
100
+ /**
101
+ * @returns {string}
102
+ */
103
+ engineName() {
104
+ let deferred1_0;
105
+ let deferred1_1;
106
+ try {
107
+ const ret = wasm.wasmregoengine_engineName(this.__wbg_ptr);
108
+ deferred1_0 = ret[0];
109
+ deferred1_1 = ret[1];
110
+ return getStringFromWasm0(ret[0], ret[1]);
111
+ } finally {
112
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
113
+ }
114
+ }
115
+ /**
116
+ * @returns {any}
117
+ */
118
+ listRules() {
119
+ const ret = wasm.wasmregoengine_listRules(this.__wbg_ptr);
120
+ if (ret[2]) {
121
+ throw takeFromExternrefTable0(ret[1]);
122
+ }
123
+ return takeFromExternrefTable0(ret[0]);
124
+ }
125
+ /**
126
+ * @param {EngineConfig} config
127
+ */
128
+ constructor(config) {
129
+ const ret = wasm.wasmregoengine_new(config);
130
+ if (ret[2]) {
131
+ throw takeFromExternrefTable0(ret[1]);
132
+ }
133
+ this.__wbg_ptr = ret[0];
134
+ WasmRegoEngineFinalization.register(this, this.__wbg_ptr, this);
135
+ return this;
136
+ }
137
+ /**
138
+ * @param {Uint8Array} template
139
+ * @param {ValidateConfig} options
140
+ * @param {string} file_path
141
+ * @returns {any}
142
+ */
143
+ validateDetailed(template, options, file_path) {
144
+ const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
145
+ const len0 = WASM_VECTOR_LEN;
146
+ const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
147
+ const len1 = WASM_VECTOR_LEN;
148
+ const ret = wasm.wasmregoengine_validateDetailed(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
149
+ if (ret[2]) {
150
+ throw takeFromExternrefTable0(ret[1]);
151
+ }
152
+ return takeFromExternrefTable0(ret[0]);
153
+ }
154
+ /**
155
+ * @param {Uint8Array} template
156
+ * @param {ValidateConfig} options
157
+ * @param {string} file_path
158
+ * @returns {any}
159
+ */
160
+ validateStandard(template, options, file_path) {
161
+ const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
162
+ const len0 = WASM_VECTOR_LEN;
163
+ const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
164
+ const len1 = WASM_VECTOR_LEN;
165
+ const ret = wasm.wasmregoengine_validateStandard(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
166
+ if (ret[2]) {
167
+ throw takeFromExternrefTable0(ret[1]);
168
+ }
169
+ return takeFromExternrefTable0(ret[0]);
170
+ }
171
+ }
172
+ if (Symbol.dispose) WasmRegoEngine.prototype[Symbol.dispose] = WasmRegoEngine.prototype.free;
173
+ exports.WasmRegoEngine = WasmRegoEngine;
174
+
175
+ class WasmSchemaValidator {
176
+ __destroy_into_raw() {
177
+ const ptr = this.__wbg_ptr;
178
+ this.__wbg_ptr = 0;
179
+ WasmSchemaValidatorFinalization.unregister(this);
180
+ return ptr;
181
+ }
182
+ free() {
183
+ const ptr = this.__destroy_into_raw();
184
+ wasm.__wbg_wasmschemavalidator_free(ptr, 0);
185
+ }
186
+ /**
187
+ * @returns {any}
188
+ */
189
+ listRules() {
190
+ const ret = wasm.wasmschemavalidator_listRules(this.__wbg_ptr);
191
+ if (ret[2]) {
192
+ throw takeFromExternrefTable0(ret[1]);
193
+ }
194
+ return takeFromExternrefTable0(ret[0]);
195
+ }
196
+ constructor() {
197
+ const ret = wasm.wasmschemavalidator_new();
198
+ this.__wbg_ptr = ret;
199
+ WasmSchemaValidatorFinalization.register(this, this.__wbg_ptr, this);
200
+ return this;
201
+ }
202
+ /**
203
+ * @returns {number}
204
+ */
205
+ schemaCount() {
206
+ const ret = wasm.wasmschemavalidator_schemaCount(this.__wbg_ptr);
207
+ return ret >>> 0;
208
+ }
209
+ /**
210
+ * @param {WasmSemanticModel} model
211
+ * @param {string} region
212
+ * @returns {any}
213
+ */
214
+ validate(model, region) {
215
+ _assertClass(model, WasmSemanticModel);
216
+ const ptr0 = passStringToWasm0(region, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
217
+ const len0 = WASM_VECTOR_LEN;
218
+ const ret = wasm.wasmschemavalidator_validate(this.__wbg_ptr, model.__wbg_ptr, ptr0, len0);
219
+ if (ret[2]) {
220
+ throw takeFromExternrefTable0(ret[1]);
221
+ }
222
+ return takeFromExternrefTable0(ret[0]);
223
+ }
224
+ }
225
+ if (Symbol.dispose) WasmSchemaValidator.prototype[Symbol.dispose] = WasmSchemaValidator.prototype.free;
226
+ exports.WasmSchemaValidator = WasmSchemaValidator;
227
+
228
+ class WasmSemanticModel {
229
+ static __wrap(ptr) {
230
+ const obj = Object.create(WasmSemanticModel.prototype);
231
+ obj.__wbg_ptr = ptr;
232
+ WasmSemanticModelFinalization.register(obj, obj.__wbg_ptr, obj);
233
+ return obj;
234
+ }
235
+ __destroy_into_raw() {
236
+ const ptr = this.__wbg_ptr;
237
+ this.__wbg_ptr = 0;
238
+ WasmSemanticModelFinalization.unregister(this);
239
+ return ptr;
240
+ }
241
+ free() {
242
+ const ptr = this.__destroy_into_raw();
243
+ wasm.__wbg_wasmsemanticmodel_free(ptr, 0);
244
+ }
245
+ /**
246
+ * @returns {any}
247
+ */
248
+ conditions() {
249
+ const ret = wasm.wasmsemanticmodel_conditions(this.__wbg_ptr);
250
+ if (ret[2]) {
251
+ throw takeFromExternrefTable0(ret[1]);
252
+ }
253
+ return takeFromExternrefTable0(ret[0]);
254
+ }
255
+ /**
256
+ * @returns {string | undefined}
257
+ */
258
+ description() {
259
+ const ret = wasm.wasmsemanticmodel_description(this.__wbg_ptr);
260
+ let v1;
261
+ if (ret[0] !== 0) {
262
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
263
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
264
+ }
265
+ return v1;
266
+ }
267
+ /**
268
+ * @returns {string | undefined}
269
+ */
270
+ formatVersion() {
271
+ const ret = wasm.wasmsemanticmodel_formatVersion(this.__wbg_ptr);
272
+ let v1;
273
+ if (ret[0] !== 0) {
274
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
275
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
276
+ }
277
+ return v1;
278
+ }
279
+ /**
280
+ * @returns {any}
281
+ */
282
+ outputs() {
283
+ const ret = wasm.wasmsemanticmodel_outputs(this.__wbg_ptr);
284
+ if (ret[2]) {
285
+ throw takeFromExternrefTable0(ret[1]);
286
+ }
287
+ return takeFromExternrefTable0(ret[0]);
288
+ }
289
+ /**
290
+ * @returns {any}
291
+ */
292
+ parameters() {
293
+ const ret = wasm.wasmsemanticmodel_parameters(this.__wbg_ptr);
294
+ if (ret[2]) {
295
+ throw takeFromExternrefTable0(ret[1]);
296
+ }
297
+ return takeFromExternrefTable0(ret[0]);
298
+ }
299
+ /**
300
+ * @param {Uint8Array} template
301
+ * @returns {WasmSemanticModel}
302
+ */
303
+ static parse(template) {
304
+ const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
305
+ const len0 = WASM_VECTOR_LEN;
306
+ const ret = wasm.wasmsemanticmodel_parse(ptr0, len0);
307
+ if (ret[2]) {
308
+ throw takeFromExternrefTable0(ret[1]);
309
+ }
310
+ return WasmSemanticModel.__wrap(ret[0]);
311
+ }
312
+ /**
313
+ * @returns {any}
314
+ */
315
+ resources() {
316
+ const ret = wasm.wasmsemanticmodel_resources(this.__wbg_ptr);
317
+ if (ret[2]) {
318
+ throw takeFromExternrefTable0(ret[1]);
319
+ }
320
+ return takeFromExternrefTable0(ret[0]);
321
+ }
322
+ /**
323
+ * @param {string} path
324
+ * @returns {any}
325
+ */
326
+ sourceLocation(path) {
327
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
328
+ const len0 = WASM_VECTOR_LEN;
329
+ const ret = wasm.wasmsemanticmodel_sourceLocation(this.__wbg_ptr, ptr0, len0);
330
+ if (ret[2]) {
331
+ throw takeFromExternrefTable0(ret[1]);
332
+ }
333
+ return takeFromExternrefTable0(ret[0]);
334
+ }
335
+ /**
336
+ * @returns {any}
337
+ */
338
+ toDiagnosticModel() {
339
+ const ret = wasm.wasmsemanticmodel_toDiagnosticModel(this.__wbg_ptr);
340
+ if (ret[2]) {
341
+ throw takeFromExternrefTable0(ret[1]);
342
+ }
343
+ return takeFromExternrefTable0(ret[0]);
344
+ }
345
+ /**
346
+ * @returns {any}
347
+ */
348
+ transforms() {
349
+ const ret = wasm.wasmsemanticmodel_transforms(this.__wbg_ptr);
350
+ if (ret[2]) {
351
+ throw takeFromExternrefTable0(ret[1]);
352
+ }
353
+ return takeFromExternrefTable0(ret[0]);
354
+ }
355
+ }
356
+ if (Symbol.dispose) WasmSemanticModel.prototype[Symbol.dispose] = WasmSemanticModel.prototype.free;
357
+ exports.WasmSemanticModel = WasmSemanticModel;
358
+
359
+ function init() {
360
+ wasm.init();
361
+ }
362
+ exports.init = init;
363
+
364
+ /**
365
+ * @returns {string}
366
+ */
367
+ function version() {
368
+ let deferred1_0;
369
+ let deferred1_1;
370
+ try {
371
+ const ret = wasm.version();
372
+ deferred1_0 = ret[0];
373
+ deferred1_1 = ret[1];
374
+ return getStringFromWasm0(ret[0], ret[1]);
375
+ } finally {
376
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
377
+ }
378
+ }
379
+ exports.version = version;
380
+ function __wbg_get_imports() {
381
+ const import0 = {
382
+ __proto__: null,
383
+ __wbg_Error_9dc85fe1bc224456: function (arg0, arg1) {
384
+ const ret = Error(getStringFromWasm0(arg0, arg1));
385
+ return ret;
386
+ },
387
+ __wbg_String_8564e559799eccda: function (arg0, arg1) {
388
+ const ret = String(arg1);
389
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
390
+ const len1 = WASM_VECTOR_LEN;
391
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
392
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
393
+ },
394
+ __wbg_String_b51de6b05a10845b: function (arg0, arg1) {
395
+ const ret = String(arg1);
396
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
397
+ const len1 = WASM_VECTOR_LEN;
398
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
399
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
400
+ },
401
+ __wbg___wbindgen_boolean_get_b131b2f36d6b2f55: function (arg0) {
402
+ const v = arg0;
403
+ const ret = typeof v === 'boolean' ? v : undefined;
404
+ return isLikeNone(ret) ? 0xffffff : ret ? 1 : 0;
405
+ },
406
+ __wbg___wbindgen_debug_string_56c147eb1a51f0c4: function (arg0, arg1) {
407
+ const ret = debugString(arg1);
408
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
409
+ const len1 = WASM_VECTOR_LEN;
410
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
411
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
412
+ },
413
+ __wbg___wbindgen_in_ce8569b2fc6f5088: function (arg0, arg1) {
414
+ const ret = arg0 in arg1;
415
+ return ret;
416
+ },
417
+ __wbg___wbindgen_is_function_147961669f068cd4: function (arg0) {
418
+ const ret = typeof arg0 === 'function';
419
+ return ret;
420
+ },
421
+ __wbg___wbindgen_is_object_3a2c414391dbf751: function (arg0) {
422
+ const val = arg0;
423
+ const ret = typeof val === 'object' && val !== null;
424
+ return ret;
425
+ },
426
+ __wbg___wbindgen_is_string_6541b0f6ecd4e8e5: function (arg0) {
427
+ const ret = typeof arg0 === 'string';
428
+ return ret;
429
+ },
430
+ __wbg___wbindgen_is_undefined_4410e3c20a99fa97: function (arg0) {
431
+ const ret = arg0 === undefined;
432
+ return ret;
433
+ },
434
+ __wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c: function (arg0, arg1) {
435
+ const ret = arg0 == arg1;
436
+ return ret;
437
+ },
438
+ __wbg___wbindgen_number_get_588ed6b97f0d7e14: function (arg0, arg1) {
439
+ const obj = arg1;
440
+ const ret = typeof obj === 'number' ? obj : undefined;
441
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
442
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
443
+ },
444
+ __wbg___wbindgen_string_get_fa2687d531ed17a5: function (arg0, arg1) {
445
+ const obj = arg1;
446
+ const ret = typeof obj === 'string' ? obj : undefined;
447
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
448
+ var len1 = WASM_VECTOR_LEN;
449
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
450
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
451
+ },
452
+ __wbg___wbindgen_throw_bbadd78c1bac3a77: function (arg0, arg1) {
453
+ throw new Error(getStringFromWasm0(arg0, arg1));
454
+ },
455
+ __wbg_call_91f00ddc43e01490: function () {
456
+ return handleError(function (arg0, arg1) {
457
+ const ret = arg0.call(arg1);
458
+ return ret;
459
+ }, arguments);
460
+ },
461
+ __wbg_done_6a8439e544ec6206: function (arg0) {
462
+ const ret = arg0.done;
463
+ return ret;
464
+ },
465
+ __wbg_entries_5a6a7e7e0df09fe5: function (arg0) {
466
+ const ret = Object.entries(arg0);
467
+ return ret;
468
+ },
469
+ __wbg_error_a6fa202b58aa1cd3: function (arg0, arg1) {
470
+ let deferred0_0;
471
+ let deferred0_1;
472
+ try {
473
+ deferred0_0 = arg0;
474
+ deferred0_1 = arg1;
475
+ console.error(getStringFromWasm0(arg0, arg1));
476
+ } finally {
477
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
478
+ }
479
+ },
480
+ __wbg_getRandomValues_3f44b700395062e5: function () {
481
+ return handleError(function (arg0, arg1) {
482
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
483
+ }, arguments);
484
+ },
485
+ __wbg_get_44e98e27bda25b5b: function () {
486
+ return handleError(function (arg0, arg1) {
487
+ const ret = Reflect.get(arg0, arg1);
488
+ return ret;
489
+ }, arguments);
490
+ },
491
+ __wbg_get_4b90d6d8c5deb5d5: function (arg0, arg1) {
492
+ const ret = arg0[arg1 >>> 0];
493
+ return ret;
494
+ },
495
+ __wbg_get_unchecked_46e778e3cec74b5e: function (arg0, arg1) {
496
+ const ret = arg0[arg1 >>> 0];
497
+ return ret;
498
+ },
499
+ __wbg_get_with_ref_key_f64427178466f623: function (arg0, arg1) {
500
+ const ret = arg0[arg1];
501
+ return ret;
502
+ },
503
+ __wbg_instanceof_ArrayBuffer_a581da923203f29f: function (arg0) {
504
+ let result;
505
+ try {
506
+ result = arg0 instanceof ArrayBuffer;
507
+ } catch (_) {
508
+ result = false;
509
+ }
510
+ const ret = result;
511
+ return ret;
512
+ },
513
+ __wbg_instanceof_Uint8Array_b6fe1ac89eba107e: function (arg0) {
514
+ let result;
515
+ try {
516
+ result = arg0 instanceof Uint8Array;
517
+ } catch (_) {
518
+ result = false;
519
+ }
520
+ const ret = result;
521
+ return ret;
522
+ },
523
+ __wbg_isArray_139f48e3c057ede8: function (arg0) {
524
+ const ret = Array.isArray(arg0);
525
+ return ret;
526
+ },
527
+ __wbg_isSafeInteger_c22ccb4af2201fe9: function (arg0) {
528
+ const ret = Number.isSafeInteger(arg0);
529
+ return ret;
530
+ },
531
+ __wbg_iterator_9b36cebf3be7b7cd: function () {
532
+ const ret = Symbol.iterator;
533
+ return ret;
534
+ },
535
+ __wbg_length_68a9d5278d084f4f: function (arg0) {
536
+ const ret = arg0.length;
537
+ return ret;
538
+ },
539
+ __wbg_length_fb04d16d7bdf6d4c: function (arg0) {
540
+ const ret = arg0.length;
541
+ return ret;
542
+ },
543
+ __wbg_new_0b303268aa395a38: function () {
544
+ const ret = new Array();
545
+ return ret;
546
+ },
547
+ __wbg_new_20b778a4c5c691c3: function () {
548
+ const ret = new Object();
549
+ return ret;
550
+ },
551
+ __wbg_new_227d7c05414eb861: function () {
552
+ const ret = new Error();
553
+ return ret;
554
+ },
555
+ __wbg_new_883c0db065f06efd: function () {
556
+ const ret = new Map();
557
+ return ret;
558
+ },
559
+ __wbg_new_b06772b280cc6e52: function (arg0) {
560
+ const ret = new Uint8Array(arg0);
561
+ return ret;
562
+ },
563
+ __wbg_next_8cb028b6ba50743f: function () {
564
+ return handleError(function (arg0) {
565
+ const ret = arg0.next();
566
+ return ret;
567
+ }, arguments);
568
+ },
569
+ __wbg_next_cfd0b146c9538df8: function (arg0) {
570
+ const ret = arg0.next;
571
+ return ret;
572
+ },
573
+ __wbg_now_e7c6795a7f81e10f: function (arg0) {
574
+ const ret = arg0.now();
575
+ return ret;
576
+ },
577
+ __wbg_performance_3fcf6e32a7e1ed0a: function (arg0) {
578
+ const ret = arg0.performance;
579
+ return ret;
580
+ },
581
+ __wbg_prototypesetcall_956c7493c68e29b4: function (arg0, arg1, arg2) {
582
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
583
+ },
584
+ __wbg_set_5f806304fb633ab3: function (arg0, arg1, arg2) {
585
+ const ret = arg0.set(arg1, arg2);
586
+ return ret;
587
+ },
588
+ __wbg_set_6be42768c690e380: function (arg0, arg1, arg2) {
589
+ arg0[arg1] = arg2;
590
+ },
591
+ __wbg_set_da33c120a6584674: function (arg0, arg1, arg2) {
592
+ arg0[arg1 >>> 0] = arg2;
593
+ },
594
+ __wbg_stack_3b0d974bbf31e44f: function (arg0, arg1) {
595
+ const ret = arg1.stack;
596
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
597
+ const len1 = WASM_VECTOR_LEN;
598
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
599
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
600
+ },
601
+ __wbg_static_accessor_GLOBAL_60a4124bab7dcc9a: function () {
602
+ const ret = typeof global === 'undefined' ? null : global;
603
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
604
+ },
605
+ __wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13: function () {
606
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
607
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
608
+ },
609
+ __wbg_static_accessor_SELF_4c95f759a91e9aae: function () {
610
+ const ret = typeof self === 'undefined' ? null : self;
611
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
612
+ },
613
+ __wbg_static_accessor_WINDOW_44b435597f9e9ee7: function () {
614
+ const ret = typeof window === 'undefined' ? null : window;
615
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
616
+ },
617
+ __wbg_value_3d3defe09fb1ffca: function (arg0) {
618
+ const ret = arg0.value;
619
+ return ret;
620
+ },
621
+ __wbindgen_cast_0000000000000001: function (arg0) {
622
+ // Cast intrinsic for `F64 -> Externref`.
623
+ const ret = arg0;
624
+ return ret;
625
+ },
626
+ __wbindgen_cast_0000000000000002: function (arg0) {
627
+ // Cast intrinsic for `I64 -> Externref`.
628
+ const ret = arg0;
629
+ return ret;
630
+ },
631
+ __wbindgen_cast_0000000000000003: function (arg0, arg1) {
632
+ // Cast intrinsic for `Ref(String) -> Externref`.
633
+ const ret = getStringFromWasm0(arg0, arg1);
634
+ return ret;
635
+ },
636
+ __wbindgen_cast_0000000000000004: function (arg0) {
637
+ // Cast intrinsic for `U64 -> Externref`.
638
+ const ret = BigInt.asUintN(64, arg0);
639
+ return ret;
640
+ },
641
+ __wbindgen_init_externref_table: function () {
642
+ const table = wasm.__wbindgen_externrefs;
643
+ const offset = table.grow(4);
644
+ table.set(0, undefined);
645
+ table.set(offset + 0, undefined);
646
+ table.set(offset + 1, null);
647
+ table.set(offset + 2, true);
648
+ table.set(offset + 3, false);
649
+ },
650
+ };
651
+ return {
652
+ __proto__: null,
653
+ './bindings_wasm_bg.js': import0,
654
+ };
655
+ }
656
+
657
+ const WasmCelEngineFinalization =
658
+ typeof FinalizationRegistry === 'undefined'
659
+ ? { register: () => {}, unregister: () => {} }
660
+ : new FinalizationRegistry((ptr) => wasm.__wbg_wasmcelengine_free(ptr, 1));
661
+ const WasmRegoEngineFinalization =
662
+ typeof FinalizationRegistry === 'undefined'
663
+ ? { register: () => {}, unregister: () => {} }
664
+ : new FinalizationRegistry((ptr) => wasm.__wbg_wasmregoengine_free(ptr, 1));
665
+ const WasmSchemaValidatorFinalization =
666
+ typeof FinalizationRegistry === 'undefined'
667
+ ? { register: () => {}, unregister: () => {} }
668
+ : new FinalizationRegistry((ptr) => wasm.__wbg_wasmschemavalidator_free(ptr, 1));
669
+ const WasmSemanticModelFinalization =
670
+ typeof FinalizationRegistry === 'undefined'
671
+ ? { register: () => {}, unregister: () => {} }
672
+ : new FinalizationRegistry((ptr) => wasm.__wbg_wasmsemanticmodel_free(ptr, 1));
673
+
674
+ function addToExternrefTable0(obj) {
675
+ const idx = wasm.__externref_table_alloc();
676
+ wasm.__wbindgen_externrefs.set(idx, obj);
677
+ return idx;
678
+ }
679
+
680
+ function _assertClass(instance, klass) {
681
+ if (!(instance instanceof klass)) {
682
+ throw new Error(`expected instance of ${klass.name}`);
683
+ }
684
+ }
685
+
686
+ function debugString(val) {
687
+ // primitive types
688
+ const type = typeof val;
689
+ if (type == 'number' || type == 'boolean' || val == null) {
690
+ return `${val}`;
691
+ }
692
+ if (type == 'string') {
693
+ return `"${val}"`;
694
+ }
695
+ if (type == 'symbol') {
696
+ const description = val.description;
697
+ if (description == null) {
698
+ return 'Symbol';
699
+ } else {
700
+ return `Symbol(${description})`;
701
+ }
702
+ }
703
+ if (type == 'function') {
704
+ const name = val.name;
705
+ if (typeof name == 'string' && name.length > 0) {
706
+ return `Function(${name})`;
707
+ } else {
708
+ return 'Function';
709
+ }
710
+ }
711
+ // objects
712
+ if (Array.isArray(val)) {
713
+ const length = val.length;
714
+ let debug = '[';
715
+ if (length > 0) {
716
+ debug += debugString(val[0]);
717
+ }
718
+ for (let i = 1; i < length; i++) {
719
+ debug += ', ' + debugString(val[i]);
720
+ }
721
+ debug += ']';
722
+ return debug;
723
+ }
724
+ // Test for built-in
725
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
726
+ let className;
727
+ if (builtInMatches && builtInMatches.length > 1) {
728
+ className = builtInMatches[1];
729
+ } else {
730
+ // Failed to match the standard '[object ClassName]'
731
+ return toString.call(val);
732
+ }
733
+ if (className == 'Object') {
734
+ // we're a user defined class or Object
735
+ // JSON.stringify avoids problems with cycles, and is generally much
736
+ // easier than looping through ownProperties of `val`.
737
+ try {
738
+ return 'Object(' + JSON.stringify(val) + ')';
739
+ } catch (_) {
740
+ return 'Object';
741
+ }
742
+ }
743
+ // errors
744
+ if (val instanceof Error) {
745
+ return `${val.name}: ${val.message}\n${val.stack}`;
746
+ }
747
+ // TODO we could test for more things here, like `Set`s and `Map`s.
748
+ return className;
749
+ }
750
+
751
+ function getArrayU8FromWasm0(ptr, len) {
752
+ ptr = ptr >>> 0;
753
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
754
+ }
755
+
756
+ let cachedDataViewMemory0 = null;
757
+ function getDataViewMemory0() {
758
+ if (
759
+ cachedDataViewMemory0 === null ||
760
+ cachedDataViewMemory0.buffer.detached === true ||
761
+ (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)
762
+ ) {
763
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
764
+ }
765
+ return cachedDataViewMemory0;
766
+ }
767
+
768
+ function getStringFromWasm0(ptr, len) {
769
+ return decodeText(ptr >>> 0, len);
770
+ }
771
+
772
+ let cachedUint8ArrayMemory0 = null;
773
+ function getUint8ArrayMemory0() {
774
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
775
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
776
+ }
777
+ return cachedUint8ArrayMemory0;
778
+ }
779
+
780
+ function handleError(f, args) {
781
+ try {
782
+ return f.apply(this, args);
783
+ } catch (e) {
784
+ const idx = addToExternrefTable0(e);
785
+ wasm.__wbindgen_exn_store(idx);
786
+ }
787
+ }
788
+
789
+ function isLikeNone(x) {
790
+ return x === undefined || x === null;
791
+ }
792
+
793
+ function passArray8ToWasm0(arg, malloc) {
794
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
795
+ getUint8ArrayMemory0().set(arg, ptr / 1);
796
+ WASM_VECTOR_LEN = arg.length;
797
+ return ptr;
798
+ }
799
+
800
+ function passStringToWasm0(arg, malloc, realloc) {
801
+ if (realloc === undefined) {
802
+ const buf = cachedTextEncoder.encode(arg);
803
+ const ptr = malloc(buf.length, 1) >>> 0;
804
+ getUint8ArrayMemory0()
805
+ .subarray(ptr, ptr + buf.length)
806
+ .set(buf);
807
+ WASM_VECTOR_LEN = buf.length;
808
+ return ptr;
809
+ }
810
+
811
+ let len = arg.length;
812
+ let ptr = malloc(len, 1) >>> 0;
813
+
814
+ const mem = getUint8ArrayMemory0();
815
+
816
+ let offset = 0;
817
+
818
+ for (; offset < len; offset++) {
819
+ const code = arg.charCodeAt(offset);
820
+ if (code > 0x7f) break;
821
+ mem[ptr + offset] = code;
822
+ }
823
+ if (offset !== len) {
824
+ if (offset !== 0) {
825
+ arg = arg.slice(offset);
826
+ }
827
+ ptr = realloc(ptr, len, (len = offset + arg.length * 3), 1) >>> 0;
828
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
829
+ const ret = cachedTextEncoder.encodeInto(arg, view);
830
+
831
+ offset += ret.written;
832
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
833
+ }
834
+
835
+ WASM_VECTOR_LEN = offset;
836
+ return ptr;
837
+ }
838
+
839
+ function takeFromExternrefTable0(idx) {
840
+ const value = wasm.__wbindgen_externrefs.get(idx);
841
+ wasm.__externref_table_dealloc(idx);
842
+ return value;
843
+ }
844
+
845
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
846
+ cachedTextDecoder.decode();
847
+ function decodeText(ptr, len) {
848
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
849
+ }
850
+
851
+ const cachedTextEncoder = new TextEncoder();
852
+
853
+ if (!('encodeInto' in cachedTextEncoder)) {
854
+ cachedTextEncoder.encodeInto = function (arg, view) {
855
+ const buf = cachedTextEncoder.encode(arg);
856
+ view.set(buf);
857
+ return {
858
+ read: arg.length,
859
+ written: buf.length,
860
+ };
861
+ };
862
+ }
863
+
864
+ let WASM_VECTOR_LEN = 0;
865
+
866
+ const wasmPath = `${__dirname}/bindings_wasm_bg.wasm`;
867
+ const wasmBytes = require('fs').readFileSync(wasmPath);
868
+ const wasmModule = new WebAssembly.Module(wasmBytes);
869
+ let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
870
+ let wasm = wasmInstance.exports;
871
+ wasm.__wbindgen_start();