@janssenproject/cedarling_wasm 0.0.283 → 0.0.284-nodejs

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cedarling_wasm.js CHANGED
@@ -1,101 +1,22 @@
1
- let wasm;
2
1
 
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 WASM_VECTOR_LEN = 0;
34
-
35
- const cachedTextEncoder = new TextEncoder();
36
-
37
- if (!('encodeInto' in cachedTextEncoder)) {
38
- cachedTextEncoder.encodeInto = function (arg, view) {
39
- const buf = cachedTextEncoder.encode(arg);
40
- view.set(buf);
41
- return {
42
- read: arg.length,
43
- written: buf.length
44
- };
45
- }
46
- }
47
-
48
- function passStringToWasm0(arg, malloc, realloc) {
49
-
50
- if (realloc === undefined) {
51
- const buf = cachedTextEncoder.encode(arg);
52
- const ptr = malloc(buf.length, 1) >>> 0;
53
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
54
- WASM_VECTOR_LEN = buf.length;
55
- return ptr;
56
- }
57
-
58
- let len = arg.length;
59
- let ptr = malloc(len, 1) >>> 0;
60
-
61
- const mem = getUint8ArrayMemory0();
62
-
63
- let offset = 0;
64
-
65
- for (; offset < len; offset++) {
66
- const code = arg.charCodeAt(offset);
67
- if (code > 0x7F) break;
68
- mem[ptr + offset] = code;
69
- }
70
-
71
- if (offset !== len) {
72
- if (offset !== 0) {
73
- arg = arg.slice(offset);
74
- }
75
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
76
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
77
- const ret = cachedTextEncoder.encodeInto(arg, view);
78
-
79
- offset += ret.written;
80
- ptr = realloc(ptr, len, offset, 1) >>> 0;
81
- }
2
+ let imports = {};
3
+ imports['__wbindgen_placeholder__'] = module.exports;
82
4
 
83
- WASM_VECTOR_LEN = offset;
84
- return ptr;
5
+ function addToExternrefTable0(obj) {
6
+ const idx = wasm.__externref_table_alloc();
7
+ wasm.__wbindgen_externrefs.set(idx, obj);
8
+ return idx;
85
9
  }
86
10
 
87
- let cachedDataViewMemory0 = null;
88
-
89
- function getDataViewMemory0() {
90
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
91
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
11
+ function _assertClass(instance, klass) {
12
+ if (!(instance instanceof klass)) {
13
+ throw new Error(`expected instance of ${klass.name}`);
92
14
  }
93
- return cachedDataViewMemory0;
94
15
  }
95
16
 
96
- function isLikeNone(x) {
97
- return x === undefined || x === null;
98
- }
17
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
18
+ ? { register: () => {}, unregister: () => {} }
19
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
99
20
 
100
21
  function debugString(val) {
101
22
  // primitive types
@@ -162,10 +83,41 @@ function debugString(val) {
162
83
  return className;
163
84
  }
164
85
 
165
- function addToExternrefTable0(obj) {
166
- const idx = wasm.__externref_table_alloc();
167
- wasm.__wbindgen_externrefs.set(idx, obj);
168
- return idx;
86
+ function getArrayJsValueFromWasm0(ptr, len) {
87
+ ptr = ptr >>> 0;
88
+ const mem = getDataViewMemory0();
89
+ const result = [];
90
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
91
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
92
+ }
93
+ wasm.__externref_drop_slice(ptr, len);
94
+ return result;
95
+ }
96
+
97
+ function getArrayU8FromWasm0(ptr, len) {
98
+ ptr = ptr >>> 0;
99
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
100
+ }
101
+
102
+ let cachedDataViewMemory0 = null;
103
+ function getDataViewMemory0() {
104
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
105
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
106
+ }
107
+ return cachedDataViewMemory0;
108
+ }
109
+
110
+ function getStringFromWasm0(ptr, len) {
111
+ ptr = ptr >>> 0;
112
+ return decodeText(ptr, len);
113
+ }
114
+
115
+ let cachedUint8ArrayMemory0 = null;
116
+ function getUint8ArrayMemory0() {
117
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
118
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
119
+ }
120
+ return cachedUint8ArrayMemory0;
169
121
  }
170
122
 
171
123
  function handleError(f, args) {
@@ -177,15 +129,10 @@ function handleError(f, args) {
177
129
  }
178
130
  }
179
131
 
180
- function getArrayU8FromWasm0(ptr, len) {
181
- ptr = ptr >>> 0;
182
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
132
+ function isLikeNone(x) {
133
+ return x === undefined || x === null;
183
134
  }
184
135
 
185
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
186
- ? { register: () => {}, unregister: () => {} }
187
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
188
-
189
136
  function makeMutClosure(arg0, arg1, dtor, f) {
190
137
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
191
138
  const real = (...args) => {
@@ -214,20 +161,41 @@ function makeMutClosure(arg0, arg1, dtor, f) {
214
161
  return real;
215
162
  }
216
163
 
217
- function _assertClass(instance, klass) {
218
- if (!(instance instanceof klass)) {
219
- throw new Error(`expected instance of ${klass.name}`);
164
+ function passStringToWasm0(arg, malloc, realloc) {
165
+ if (realloc === undefined) {
166
+ const buf = cachedTextEncoder.encode(arg);
167
+ const ptr = malloc(buf.length, 1) >>> 0;
168
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
169
+ WASM_VECTOR_LEN = buf.length;
170
+ return ptr;
220
171
  }
221
- }
222
- /**
223
- * Create a new instance of the Cedarling application.
224
- * This function can take as config parameter the eather `Map` other `Object`
225
- * @param {any} config
226
- * @returns {Promise<Cedarling>}
227
- */
228
- export function init(config) {
229
- const ret = wasm.init(config);
230
- return ret;
172
+
173
+ let len = arg.length;
174
+ let ptr = malloc(len, 1) >>> 0;
175
+
176
+ const mem = getUint8ArrayMemory0();
177
+
178
+ let offset = 0;
179
+
180
+ for (; offset < len; offset++) {
181
+ const code = arg.charCodeAt(offset);
182
+ if (code > 0x7F) break;
183
+ mem[ptr + offset] = code;
184
+ }
185
+ if (offset !== len) {
186
+ if (offset !== 0) {
187
+ arg = arg.slice(offset);
188
+ }
189
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
190
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
191
+ const ret = cachedTextEncoder.encodeInto(arg, view);
192
+
193
+ offset += ret.written;
194
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
195
+ }
196
+
197
+ WASM_VECTOR_LEN = offset;
198
+ return ptr;
231
199
  }
232
200
 
233
201
  function takeFromExternrefTable0(idx) {
@@ -236,26 +204,37 @@ function takeFromExternrefTable0(idx) {
236
204
  return value;
237
205
  }
238
206
 
239
- function getArrayJsValueFromWasm0(ptr, len) {
240
- ptr = ptr >>> 0;
241
- const mem = getDataViewMemory0();
242
- const result = [];
243
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
244
- result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
207
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
208
+ cachedTextDecoder.decode();
209
+ function decodeText(ptr, len) {
210
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
211
+ }
212
+
213
+ const cachedTextEncoder = new TextEncoder();
214
+
215
+ if (!('encodeInto' in cachedTextEncoder)) {
216
+ cachedTextEncoder.encodeInto = function (arg, view) {
217
+ const buf = cachedTextEncoder.encode(arg);
218
+ view.set(buf);
219
+ return {
220
+ read: arg.length,
221
+ written: buf.length
222
+ };
245
223
  }
246
- wasm.__externref_drop_slice(ptr, len);
247
- return result;
248
224
  }
249
- function wasm_bindgen__convert__closures_____invoke__h6327561d424f9a15(arg0, arg1, arg2) {
250
- wasm.wasm_bindgen__convert__closures_____invoke__h6327561d424f9a15(arg0, arg1, arg2);
225
+
226
+ let WASM_VECTOR_LEN = 0;
227
+
228
+ function wasm_bindgen__convert__closures_____invoke__he934e31379087ee0(arg0, arg1, arg2) {
229
+ wasm.wasm_bindgen__convert__closures_____invoke__he934e31379087ee0(arg0, arg1, arg2);
251
230
  }
252
231
 
253
- function wasm_bindgen__convert__closures_____invoke__h1ef9cb20a66113c0(arg0, arg1) {
254
- wasm.wasm_bindgen__convert__closures_____invoke__h1ef9cb20a66113c0(arg0, arg1);
232
+ function wasm_bindgen__convert__closures_____invoke__hfa802aa0addaec97(arg0, arg1) {
233
+ wasm.wasm_bindgen__convert__closures_____invoke__hfa802aa0addaec97(arg0, arg1);
255
234
  }
256
235
 
257
- function wasm_bindgen__convert__closures_____invoke__h4e75ae6afb7ea833(arg0, arg1, arg2, arg3) {
258
- wasm.wasm_bindgen__convert__closures_____invoke__h4e75ae6afb7ea833(arg0, arg1, arg2, arg3);
236
+ function wasm_bindgen__convert__closures_____invoke__h048f8d0721d2ddfa(arg0, arg1, arg2, arg3) {
237
+ wasm.wasm_bindgen__convert__closures_____invoke__h048f8d0721d2ddfa(arg0, arg1, arg2, arg3);
259
238
  }
260
239
 
261
240
  const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
@@ -267,12 +246,36 @@ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate
267
246
  const AuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
268
247
  ? { register: () => {}, unregister: () => {} }
269
248
  : new FinalizationRegistry(ptr => wasm.__wbg_authorizeresult_free(ptr >>> 0, 1));
249
+
250
+ const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'undefined')
251
+ ? { register: () => {}, unregister: () => {} }
252
+ : new FinalizationRegistry(ptr => wasm.__wbg_authorizeresultresponse_free(ptr >>> 0, 1));
253
+
254
+ const CedarlingFinalization = (typeof FinalizationRegistry === 'undefined')
255
+ ? { register: () => {}, unregister: () => {} }
256
+ : new FinalizationRegistry(ptr => wasm.__wbg_cedarling_free(ptr >>> 0, 1));
257
+
258
+ const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
259
+ ? { register: () => {}, unregister: () => {} }
260
+ : new FinalizationRegistry(ptr => wasm.__wbg_diagnostics_free(ptr >>> 0, 1));
261
+
262
+ const JsJsonLogicFinalization = (typeof FinalizationRegistry === 'undefined')
263
+ ? { register: () => {}, unregister: () => {} }
264
+ : new FinalizationRegistry(ptr => wasm.__wbg_jsjsonlogic_free(ptr >>> 0, 1));
265
+
266
+ const MultiIssuerAuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
267
+ ? { register: () => {}, unregister: () => {} }
268
+ : new FinalizationRegistry(ptr => wasm.__wbg_multiissuerauthorizeresult_free(ptr >>> 0, 1));
269
+
270
+ const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
271
+ ? { register: () => {}, unregister: () => {} }
272
+ : new FinalizationRegistry(ptr => wasm.__wbg_policyevaluationerror_free(ptr >>> 0, 1));
273
+
270
274
  /**
271
275
  * A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
272
276
  * Represents the result of an authorization request.
273
277
  */
274
- export class AuthorizeResult {
275
-
278
+ class AuthorizeResult {
276
279
  static __wrap(ptr) {
277
280
  ptr = ptr >>> 0;
278
281
  const obj = Object.create(AuthorizeResult.prototype);
@@ -280,14 +283,12 @@ export class AuthorizeResult {
280
283
  AuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
281
284
  return obj;
282
285
  }
283
-
284
286
  __destroy_into_raw() {
285
287
  const ptr = this.__wbg_ptr;
286
288
  this.__wbg_ptr = 0;
287
289
  AuthorizeResultFinalization.unregister(this);
288
290
  return ptr;
289
291
  }
290
-
291
292
  free() {
292
293
  const ptr = this.__destroy_into_raw();
293
294
  wasm.__wbg_authorizeresult_free(ptr, 0);
@@ -408,16 +409,13 @@ export class AuthorizeResult {
408
409
  }
409
410
  }
410
411
  if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
412
+ exports.AuthorizeResult = AuthorizeResult;
411
413
 
412
- const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'undefined')
413
- ? { register: () => {}, unregister: () => {} }
414
- : new FinalizationRegistry(ptr => wasm.__wbg_authorizeresultresponse_free(ptr >>> 0, 1));
415
414
  /**
416
415
  * A WASM wrapper for the Rust `cedar_policy::Response` struct.
417
416
  * Represents the result of an authorization request.
418
417
  */
419
- export class AuthorizeResultResponse {
420
-
418
+ class AuthorizeResultResponse {
421
419
  static __wrap(ptr) {
422
420
  ptr = ptr >>> 0;
423
421
  const obj = Object.create(AuthorizeResultResponse.prototype);
@@ -425,14 +423,12 @@ export class AuthorizeResultResponse {
425
423
  AuthorizeResultResponseFinalization.register(obj, obj.__wbg_ptr, obj);
426
424
  return obj;
427
425
  }
428
-
429
426
  __destroy_into_raw() {
430
427
  const ptr = this.__wbg_ptr;
431
428
  this.__wbg_ptr = 0;
432
429
  AuthorizeResultResponseFinalization.unregister(this);
433
430
  return ptr;
434
431
  }
435
-
436
432
  free() {
437
433
  const ptr = this.__destroy_into_raw();
438
434
  wasm.__wbg_authorizeresultresponse_free(ptr, 0);
@@ -455,15 +451,12 @@ export class AuthorizeResultResponse {
455
451
  }
456
452
  }
457
453
  if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
454
+ exports.AuthorizeResultResponse = AuthorizeResultResponse;
458
455
 
459
- const CedarlingFinalization = (typeof FinalizationRegistry === 'undefined')
460
- ? { register: () => {}, unregister: () => {} }
461
- : new FinalizationRegistry(ptr => wasm.__wbg_cedarling_free(ptr >>> 0, 1));
462
456
  /**
463
457
  * The instance of the Cedarling application.
464
458
  */
465
- export class Cedarling {
466
-
459
+ class Cedarling {
467
460
  static __wrap(ptr) {
468
461
  ptr = ptr >>> 0;
469
462
  const obj = Object.create(Cedarling.prototype);
@@ -471,14 +464,12 @@ export class Cedarling {
471
464
  CedarlingFinalization.register(obj, obj.__wbg_ptr, obj);
472
465
  return obj;
473
466
  }
474
-
475
467
  __destroy_into_raw() {
476
468
  const ptr = this.__wbg_ptr;
477
469
  this.__wbg_ptr = 0;
478
470
  CedarlingFinalization.unregister(this);
479
471
  return ptr;
480
472
  }
481
-
482
473
  free() {
483
474
  const ptr = this.__destroy_into_raw();
484
475
  wasm.__wbg_cedarling_free(ptr, 0);
@@ -634,18 +625,15 @@ export class Cedarling {
634
625
  }
635
626
  }
636
627
  if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
628
+ exports.Cedarling = Cedarling;
637
629
 
638
- const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
639
- ? { register: () => {}, unregister: () => {} }
640
- : new FinalizationRegistry(ptr => wasm.__wbg_diagnostics_free(ptr >>> 0, 1));
641
630
  /**
642
631
  * Diagnostics
643
632
  * ===========
644
633
  *
645
634
  * Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
646
635
  */
647
- export class Diagnostics {
648
-
636
+ class Diagnostics {
649
637
  static __wrap(ptr) {
650
638
  ptr = ptr >>> 0;
651
639
  const obj = Object.create(Diagnostics.prototype);
@@ -653,14 +641,12 @@ export class Diagnostics {
653
641
  DiagnosticsFinalization.register(obj, obj.__wbg_ptr, obj);
654
642
  return obj;
655
643
  }
656
-
657
644
  __destroy_into_raw() {
658
645
  const ptr = this.__wbg_ptr;
659
646
  this.__wbg_ptr = 0;
660
647
  DiagnosticsFinalization.unregister(this);
661
648
  return ptr;
662
649
  }
663
-
664
650
  free() {
665
651
  const ptr = this.__destroy_into_raw();
666
652
  wasm.__wbg_diagnostics_free(ptr, 0);
@@ -691,20 +677,15 @@ export class Diagnostics {
691
677
  }
692
678
  }
693
679
  if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
680
+ exports.Diagnostics = Diagnostics;
694
681
 
695
- const JsJsonLogicFinalization = (typeof FinalizationRegistry === 'undefined')
696
- ? { register: () => {}, unregister: () => {} }
697
- : new FinalizationRegistry(ptr => wasm.__wbg_jsjsonlogic_free(ptr >>> 0, 1));
698
-
699
- export class JsJsonLogic {
700
-
682
+ class JsJsonLogic {
701
683
  __destroy_into_raw() {
702
684
  const ptr = this.__wbg_ptr;
703
685
  this.__wbg_ptr = 0;
704
686
  JsJsonLogicFinalization.unregister(this);
705
687
  return ptr;
706
688
  }
707
-
708
689
  free() {
709
690
  const ptr = this.__destroy_into_raw();
710
691
  wasm.__wbg_jsjsonlogic_free(ptr, 0);
@@ -729,16 +710,13 @@ export class JsJsonLogic {
729
710
  }
730
711
  }
731
712
  if (Symbol.dispose) JsJsonLogic.prototype[Symbol.dispose] = JsJsonLogic.prototype.free;
713
+ exports.JsJsonLogic = JsJsonLogic;
732
714
 
733
- const MultiIssuerAuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
734
- ? { register: () => {}, unregister: () => {} }
735
- : new FinalizationRegistry(ptr => wasm.__wbg_multiissuerauthorizeresult_free(ptr >>> 0, 1));
736
715
  /**
737
716
  * A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
738
717
  * Represents the result of a multi-issuer authorization request.
739
718
  */
740
- export class MultiIssuerAuthorizeResult {
741
-
719
+ class MultiIssuerAuthorizeResult {
742
720
  static __wrap(ptr) {
743
721
  ptr = ptr >>> 0;
744
722
  const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
@@ -746,14 +724,12 @@ export class MultiIssuerAuthorizeResult {
746
724
  MultiIssuerAuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
747
725
  return obj;
748
726
  }
749
-
750
727
  __destroy_into_raw() {
751
728
  const ptr = this.__wbg_ptr;
752
729
  this.__wbg_ptr = 0;
753
730
  MultiIssuerAuthorizeResultFinalization.unregister(this);
754
731
  return ptr;
755
732
  }
756
-
757
733
  free() {
758
734
  const ptr = this.__destroy_into_raw();
759
735
  wasm.__wbg_multiissuerauthorizeresult_free(ptr, 0);
@@ -837,18 +813,15 @@ export class MultiIssuerAuthorizeResult {
837
813
  }
838
814
  }
839
815
  if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
816
+ exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
840
817
 
841
- const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
842
- ? { register: () => {}, unregister: () => {} }
843
- : new FinalizationRegistry(ptr => wasm.__wbg_policyevaluationerror_free(ptr >>> 0, 1));
844
818
  /**
845
819
  * PolicyEvaluationError
846
820
  * =====================
847
821
  *
848
822
  * Represents an error that occurred when evaluating a Cedar policy.
849
823
  */
850
- export class PolicyEvaluationError {
851
-
824
+ class PolicyEvaluationError {
852
825
  static __wrap(ptr) {
853
826
  ptr = ptr >>> 0;
854
827
  const obj = Object.create(PolicyEvaluationError.prototype);
@@ -856,14 +829,12 @@ export class PolicyEvaluationError {
856
829
  PolicyEvaluationErrorFinalization.register(obj, obj.__wbg_ptr, obj);
857
830
  return obj;
858
831
  }
859
-
860
832
  __destroy_into_raw() {
861
833
  const ptr = this.__wbg_ptr;
862
834
  this.__wbg_ptr = 0;
863
835
  PolicyEvaluationErrorFinalization.unregister(this);
864
836
  return ptr;
865
837
  }
866
-
867
838
  free() {
868
839
  const ptr = this.__destroy_into_raw();
869
840
  wasm.__wbg_policyevaluationerror_free(ptr, 0);
@@ -902,647 +873,683 @@ export class PolicyEvaluationError {
902
873
  }
903
874
  }
904
875
  if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
876
+ exports.PolicyEvaluationError = PolicyEvaluationError;
905
877
 
906
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
878
+ /**
879
+ * Create a new instance of the Cedarling application.
880
+ * This function can take as config parameter the eather `Map` other `Object`
881
+ * @param {any} config
882
+ * @returns {Promise<Cedarling>}
883
+ */
884
+ function init(config) {
885
+ const ret = wasm.init(config);
886
+ return ret;
887
+ }
888
+ exports.init = init;
907
889
 
908
- async function __wbg_load(module, imports) {
909
- if (typeof Response === 'function' && module instanceof Response) {
910
- if (typeof WebAssembly.instantiateStreaming === 'function') {
911
- try {
912
- return await WebAssembly.instantiateStreaming(module, imports);
890
+ exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
891
+ const ret = Error(getStringFromWasm0(arg0, arg1));
892
+ return ret;
893
+ };
913
894
 
914
- } catch (e) {
915
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
895
+ exports.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
896
+ const ret = Number(arg0);
897
+ return ret;
898
+ };
899
+
900
+ exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
901
+ const ret = String(arg1);
902
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
903
+ const len1 = WASM_VECTOR_LEN;
904
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
905
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
906
+ };
907
+
908
+ exports.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
909
+ const v = arg1;
910
+ const ret = typeof(v) === 'bigint' ? v : undefined;
911
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
912
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
913
+ };
914
+
915
+ exports.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
916
+ const v = arg0;
917
+ const ret = typeof(v) === 'boolean' ? v : undefined;
918
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
919
+ };
920
+
921
+ exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
922
+ const ret = debugString(arg1);
923
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
924
+ const len1 = WASM_VECTOR_LEN;
925
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
926
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
927
+ };
928
+
929
+ exports.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
930
+ const ret = arg0 in arg1;
931
+ return ret;
932
+ };
916
933
 
917
- if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
918
- 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);
934
+ exports.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
935
+ const ret = typeof(arg0) === 'bigint';
936
+ return ret;
937
+ };
919
938
 
920
- } else {
921
- throw e;
922
- }
923
- }
924
- }
939
+ exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
940
+ const ret = typeof(arg0) === 'function';
941
+ return ret;
942
+ };
925
943
 
926
- const bytes = await module.arrayBuffer();
927
- return await WebAssembly.instantiate(bytes, imports);
944
+ exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
945
+ const val = arg0;
946
+ const ret = typeof(val) === 'object' && val !== null;
947
+ return ret;
948
+ };
928
949
 
929
- } else {
930
- const instance = await WebAssembly.instantiate(module, imports);
950
+ exports.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
951
+ const ret = typeof(arg0) === 'string';
952
+ return ret;
953
+ };
931
954
 
932
- if (instance instanceof WebAssembly.Instance) {
933
- return { instance, module };
955
+ exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
956
+ const ret = arg0 === undefined;
957
+ return ret;
958
+ };
934
959
 
935
- } else {
936
- return instance;
937
- }
938
- }
939
- }
960
+ exports.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
961
+ const ret = arg0 === arg1;
962
+ return ret;
963
+ };
940
964
 
941
- function __wbg_get_imports() {
942
- const imports = {};
943
- imports.wbg = {};
944
- imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
945
- const ret = Error(getStringFromWasm0(arg0, arg1));
946
- return ret;
947
- };
948
- imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
949
- const ret = Number(arg0);
950
- return ret;
951
- };
952
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
953
- const ret = String(arg1);
954
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
955
- const len1 = WASM_VECTOR_LEN;
956
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
957
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
958
- };
959
- imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
960
- const v = arg1;
961
- const ret = typeof(v) === 'bigint' ? v : undefined;
962
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
963
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
964
- };
965
- imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
966
- const v = arg0;
967
- const ret = typeof(v) === 'boolean' ? v : undefined;
968
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
969
- };
970
- imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
971
- const ret = debugString(arg1);
972
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
973
- const len1 = WASM_VECTOR_LEN;
974
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
975
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
976
- };
977
- imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
978
- const ret = arg0 in arg1;
979
- return ret;
980
- };
981
- imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
982
- const ret = typeof(arg0) === 'bigint';
983
- return ret;
984
- };
985
- imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
986
- const ret = typeof(arg0) === 'function';
987
- return ret;
988
- };
989
- imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
990
- const val = arg0;
991
- const ret = typeof(val) === 'object' && val !== null;
992
- return ret;
993
- };
994
- imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
995
- const ret = typeof(arg0) === 'string';
996
- return ret;
997
- };
998
- imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
999
- const ret = arg0 === undefined;
1000
- return ret;
1001
- };
1002
- imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
1003
- const ret = arg0 === arg1;
1004
- return ret;
1005
- };
1006
- imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
1007
- const ret = arg0 == arg1;
1008
- return ret;
1009
- };
1010
- imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
1011
- const obj = arg1;
1012
- const ret = typeof(obj) === 'number' ? obj : undefined;
1013
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1014
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1015
- };
1016
- imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
1017
- const obj = arg1;
1018
- const ret = typeof(obj) === 'string' ? obj : undefined;
1019
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1020
- var len1 = WASM_VECTOR_LEN;
1021
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1022
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1023
- };
1024
- imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
1025
- throw new Error(getStringFromWasm0(arg0, arg1));
1026
- };
1027
- imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
1028
- arg0._wbg_cb_unref();
1029
- };
1030
- imports.wbg.__wbg_abort_28ad55c5825b004d = function(arg0, arg1) {
1031
- arg0.abort(arg1);
1032
- };
1033
- imports.wbg.__wbg_abort_e7eb059f72f9ed0c = function(arg0) {
1034
- arg0.abort();
1035
- };
1036
- imports.wbg.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1037
- arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1038
- }, arguments) };
1039
- imports.wbg.__wbg_arrayBuffer_b375eccb84b4ddf3 = function() { return handleError(function (arg0) {
1040
- const ret = arg0.arrayBuffer();
1041
- return ret;
1042
- }, arguments) };
1043
- imports.wbg.__wbg_authorizeresult_new = function(arg0) {
1044
- const ret = AuthorizeResult.__wrap(arg0);
1045
- return ret;
1046
- };
1047
- imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
1048
- const ret = arg0.call(arg1, arg2);
1049
- return ret;
1050
- }, arguments) };
1051
- imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
1052
- const ret = arg0.call(arg1);
1053
- return ret;
1054
- }, arguments) };
1055
- imports.wbg.__wbg_cedarling_new = function(arg0) {
1056
- const ret = Cedarling.__wrap(arg0);
1057
- return ret;
1058
- };
1059
- imports.wbg.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
1060
- const ret = clearTimeout(arg0);
1061
- return ret;
1062
- };
1063
- imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1064
- const ret = arg0.crypto;
1065
- return ret;
1066
- };
1067
- imports.wbg.__wbg_debug_755c0800f64c9a88 = function(arg0) {
1068
- console.debug(...arg0);
1069
- };
1070
- imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
1071
- const ret = arg0.done;
1072
- return ret;
1073
- };
1074
- imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
1075
- const ret = Object.entries(arg0);
1076
- return ret;
1077
- };
1078
- imports.wbg.__wbg_entries_eb145c4da5c811f7 = function(arg0) {
1079
- const ret = arg0.entries();
1080
- return ret;
1081
- };
1082
- imports.wbg.__wbg_error_7a6b3e62969d4270 = function(arg0) {
1083
- console.error(...arg0);
1084
- };
1085
- imports.wbg.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
1086
- const ret = fetch(arg0);
1087
- return ret;
1088
- };
1089
- imports.wbg.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
1090
- const ret = arg0.fetch(arg1);
1091
- return ret;
1092
- };
1093
- imports.wbg.__wbg_fromEntries_c7159f3787268c9f = function() { return handleError(function (arg0) {
1094
- const ret = Object.fromEntries(arg0);
1095
- return ret;
1096
- }, arguments) };
1097
- imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
1098
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1099
- }, arguments) };
1100
- imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1101
- arg0.getRandomValues(arg1);
1102
- }, arguments) };
1103
- imports.wbg.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
1104
- const ret = arg0.getTime();
1105
- return ret;
1106
- };
1107
- imports.wbg.__wbg_getTimezoneOffset_d391cb11d54969f8 = function(arg0) {
1108
- const ret = arg0.getTimezoneOffset();
1109
- return ret;
1110
- };
1111
- imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
1112
- const ret = arg0[arg1 >>> 0];
1113
- return ret;
1114
- };
1115
- imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
1116
- const ret = Reflect.get(arg0, arg1);
1117
- return ret;
1118
- }, arguments) };
1119
- imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
1120
- const ret = arg0[arg1];
1121
- return ret;
1122
- };
1123
- imports.wbg.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
1124
- const ret = Reflect.has(arg0, arg1);
1125
- return ret;
1126
- }, arguments) };
1127
- imports.wbg.__wbg_headers_b87d7eaba61c3278 = function(arg0) {
1128
- const ret = arg0.headers;
1129
- return ret;
1130
- };
1131
- imports.wbg.__wbg_info_f0ce824723264770 = function(arg0) {
1132
- console.info(...arg0);
1133
- };
1134
- imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
1135
- let result;
1136
- try {
1137
- result = arg0 instanceof ArrayBuffer;
1138
- } catch (_) {
1139
- result = false;
1140
- }
1141
- const ret = result;
1142
- return ret;
1143
- };
1144
- imports.wbg.__wbg_instanceof_Array_fca44e0f4a7f6240 = function(arg0) {
1145
- let result;
1146
- try {
1147
- result = arg0 instanceof Array;
1148
- } catch (_) {
1149
- result = false;
1150
- }
1151
- const ret = result;
1152
- return ret;
1153
- };
1154
- imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
1155
- let result;
1156
- try {
1157
- result = arg0 instanceof Map;
1158
- } catch (_) {
1159
- result = false;
1160
- }
1161
- const ret = result;
1162
- return ret;
1163
- };
1164
- imports.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
1165
- let result;
1166
- try {
1167
- result = arg0 instanceof Response;
1168
- } catch (_) {
1169
- result = false;
1170
- }
1171
- const ret = result;
1172
- return ret;
1173
- };
1174
- imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
1175
- let result;
1176
- try {
1177
- result = arg0 instanceof Uint8Array;
1178
- } catch (_) {
1179
- result = false;
1180
- }
1181
- const ret = result;
1182
- return ret;
1183
- };
1184
- imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
1185
- const ret = Array.isArray(arg0);
1186
- return ret;
1187
- };
1188
- imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
1189
- const ret = Number.isSafeInteger(arg0);
1190
- return ret;
1191
- };
1192
- imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
1193
- const ret = Symbol.iterator;
1194
- return ret;
1195
- };
1196
- imports.wbg.__wbg_keys_b4d27b02ad14f4be = function(arg0) {
1197
- const ret = Object.keys(arg0);
1198
- return ret;
1199
- };
1200
- imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
1201
- const ret = arg0.length;
1202
- return ret;
1203
- };
1204
- imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
1205
- const ret = arg0.length;
1206
- return ret;
1207
- };
1208
- imports.wbg.__wbg_log_33f7f6dbc0d0ccf4 = function(arg0) {
1209
- console.log(...arg0);
1210
- };
1211
- imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1212
- const ret = arg0.msCrypto;
1213
- return ret;
1214
- };
1215
- imports.wbg.__wbg_multiissuerauthorizeresult_new = function(arg0) {
1216
- const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
1217
- return ret;
1218
- };
1219
- imports.wbg.__wbg_new_0_f9740686d739025c = function() {
1220
- const ret = new Date();
1221
- return ret;
1222
- };
1223
- imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
1224
- const ret = new Object();
1225
- return ret;
1226
- };
1227
- imports.wbg.__wbg_new_2531773dac38ebb3 = function() { return handleError(function () {
1228
- const ret = new AbortController();
1229
- return ret;
1230
- }, arguments) };
1231
- imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
1232
- try {
1233
- var state0 = {a: arg0, b: arg1};
1234
- var cb0 = (arg0, arg1) => {
1235
- const a = state0.a;
1236
- state0.a = 0;
1237
- try {
1238
- return wasm_bindgen__convert__closures_____invoke__h4e75ae6afb7ea833(a, state0.b, arg0, arg1);
1239
- } finally {
1240
- state0.a = a;
1241
- }
1242
- };
1243
- const ret = new Promise(cb0);
1244
- return ret;
1245
- } finally {
1246
- state0.a = state0.b = 0;
1247
- }
1248
- };
1249
- imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
1250
- const ret = new Uint8Array(arg0);
1251
- return ret;
1252
- };
1253
- imports.wbg.__wbg_new_68651c719dcda04e = function() {
1254
- const ret = new Map();
1255
- return ret;
1256
- };
1257
- imports.wbg.__wbg_new_93d9417ed3fb115d = function(arg0) {
1258
- const ret = new Date(arg0);
1259
- return ret;
1260
- };
1261
- imports.wbg.__wbg_new_9edf9838a2def39c = function() { return handleError(function () {
1262
- const ret = new Headers();
1263
- return ret;
1264
- }, arguments) };
1265
- imports.wbg.__wbg_new_e17d9f43105b08be = function() {
1266
- const ret = new Array();
1267
- return ret;
1268
- };
1269
- imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
1270
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1271
- return ret;
1272
- };
1273
- imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
1274
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1275
- return ret;
1276
- };
1277
- imports.wbg.__wbg_new_with_args_02cbc439ce3fd7db = function(arg0, arg1, arg2, arg3) {
1278
- const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1279
- return ret;
1280
- };
1281
- imports.wbg.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
1282
- const ret = new Uint8Array(arg0 >>> 0);
1283
- return ret;
1284
- };
1285
- imports.wbg.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function() { return handleError(function (arg0, arg1, arg2) {
1286
- const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1287
- return ret;
1288
- }, arguments) };
1289
- imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
1290
- const ret = arg0.next();
1291
- return ret;
1292
- }, arguments) };
1293
- imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
1294
- const ret = arg0.next;
1295
- return ret;
1296
- };
1297
- imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
1298
- const ret = arg0.node;
1299
- return ret;
1300
- };
1301
- imports.wbg.__wbg_policyevaluationerror_new = function(arg0) {
1302
- const ret = PolicyEvaluationError.__wrap(arg0);
1303
- return ret;
1304
- };
1305
- imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1306
- const ret = arg0.process;
1307
- return ret;
1308
- };
1309
- imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
1310
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1311
- };
1312
- imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
1313
- const ret = arg0.push(arg1);
1314
- return ret;
1315
- };
1316
- imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
1317
- const ret = arg0.queueMicrotask;
1318
- return ret;
1319
- };
1320
- imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
1321
- queueMicrotask(arg0);
1322
- };
1323
- imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1324
- arg0.randomFillSync(arg1);
1325
- }, arguments) };
1326
- imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1327
- const ret = module.require;
1328
- return ret;
1329
- }, arguments) };
1330
- imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
1331
- const ret = Promise.resolve(arg0);
1332
- return ret;
1333
- };
1334
- imports.wbg.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
1335
- const ret = setTimeout(arg0, arg1);
1336
- return ret;
1337
- };
1338
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1339
- arg0[arg1] = arg2;
1340
- };
1341
- imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
1342
- const ret = arg0.set(arg1, arg2);
1343
- return ret;
1344
- };
1345
- imports.wbg.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
1346
- arg0.body = arg1;
1347
- };
1348
- imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
1349
- arg0[arg1 >>> 0] = arg2;
1350
- };
1351
- imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
1352
- const ret = Reflect.set(arg0, arg1, arg2);
1353
- return ret;
1354
- }, arguments) };
1355
- imports.wbg.__wbg_set_cache_2f9deb19b92b81e3 = function(arg0, arg1) {
1356
- arg0.cache = __wbindgen_enum_RequestCache[arg1];
1357
- };
1358
- imports.wbg.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
1359
- arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1360
- };
1361
- imports.wbg.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
1362
- arg0.headers = arg1;
1363
- };
1364
- imports.wbg.__wbg_set_method_c02d8cbbe204ac2d = function(arg0, arg1, arg2) {
1365
- arg0.method = getStringFromWasm0(arg1, arg2);
1366
- };
1367
- imports.wbg.__wbg_set_mode_52ef73cfa79639cb = function(arg0, arg1) {
1368
- arg0.mode = __wbindgen_enum_RequestMode[arg1];
1369
- };
1370
- imports.wbg.__wbg_set_signal_dda2cf7ccb6bee0f = function(arg0, arg1) {
1371
- arg0.signal = arg1;
1372
- };
1373
- imports.wbg.__wbg_signal_4db5aa055bf9eb9a = function(arg0) {
1374
- const ret = arg0.signal;
1375
- return ret;
1376
- };
1377
- imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
1378
- const ret = typeof global === 'undefined' ? null : global;
1379
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1380
- };
1381
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
1382
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1383
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1384
- };
1385
- imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
1386
- const ret = typeof self === 'undefined' ? null : self;
1387
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1388
- };
1389
- imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
1390
- const ret = typeof window === 'undefined' ? null : window;
1391
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1392
- };
1393
- imports.wbg.__wbg_status_de7eed5a7a5bfd5d = function(arg0) {
1394
- const ret = arg0.status;
1395
- return ret;
1396
- };
1397
- imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function() { return handleError(function (arg0) {
1398
- const ret = JSON.stringify(arg0);
1399
- return ret;
1400
- }, arguments) };
1401
- imports.wbg.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
1402
- const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1403
- return ret;
1404
- };
1405
- imports.wbg.__wbg_text_dc33c15c17bdfb52 = function() { return handleError(function (arg0) {
1406
- const ret = arg0.text();
1407
- return ret;
1408
- }, arguments) };
1409
- imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
1410
- const ret = arg0.then(arg1);
1411
- return ret;
1412
- };
1413
- imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
1414
- const ret = arg0.then(arg1, arg2);
1415
- return ret;
1416
- };
1417
- imports.wbg.__wbg_trace_15baa8999e3f2ed1 = function(arg0) {
1418
- console.trace(...arg0);
1419
- };
1420
- imports.wbg.__wbg_url_b36d2a5008eb056f = function(arg0, arg1) {
1421
- const ret = arg1.url;
1422
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1423
- const len1 = WASM_VECTOR_LEN;
1424
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1425
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1426
- };
1427
- imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
1428
- const ret = arg0.value;
1429
- return ret;
1430
- };
1431
- imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1432
- const ret = arg0.versions;
1433
- return ret;
1434
- };
1435
- imports.wbg.__wbg_warn_a2d80c28bcdb1933 = function(arg0) {
1436
- console.warn(...arg0);
1437
- };
1438
- imports.wbg.__wbindgen_cast_02fea57424c85e3c = function(arg0, arg1) {
1439
- // Cast intrinsic for `Closure(Closure { dtor_idx: 561, function: Function { arguments: [Externref], shim_idx: 562, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1440
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h4fff4cc5f82a04c0, wasm_bindgen__convert__closures_____invoke__h6327561d424f9a15);
1441
- return ret;
1442
- };
1443
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1444
- // Cast intrinsic for `Ref(String) -> Externref`.
1445
- const ret = getStringFromWasm0(arg0, arg1);
1446
- return ret;
1447
- };
1448
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1449
- // Cast intrinsic for `U64 -> Externref`.
1450
- const ret = BigInt.asUintN(64, arg0);
1451
- return ret;
1452
- };
1453
- imports.wbg.__wbindgen_cast_67365bd7b36f80c7 = function(arg0, arg1) {
1454
- // Cast intrinsic for `Closure(Closure { dtor_idx: 517, function: Function { arguments: [], shim_idx: 518, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1455
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8149dcdd225949c1, wasm_bindgen__convert__closures_____invoke__h1ef9cb20a66113c0);
1456
- return ret;
1457
- };
1458
- imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1459
- // Cast intrinsic for `I64 -> Externref`.
1460
- const ret = arg0;
1461
- return ret;
1462
- };
1463
- imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1464
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1465
- const ret = getArrayU8FromWasm0(arg0, arg1);
1466
- return ret;
1467
- };
1468
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1469
- // Cast intrinsic for `F64 -> Externref`.
1470
- const ret = arg0;
1471
- return ret;
1472
- };
1473
- imports.wbg.__wbindgen_init_externref_table = function() {
1474
- const table = wasm.__wbindgen_externrefs;
1475
- const offset = table.grow(4);
1476
- table.set(0, undefined);
1477
- table.set(offset + 0, undefined);
1478
- table.set(offset + 1, null);
1479
- table.set(offset + 2, true);
1480
- table.set(offset + 3, false);
1481
- ;
1482
- };
965
+ exports.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
966
+ const ret = arg0 == arg1;
967
+ return ret;
968
+ };
969
+
970
+ exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
971
+ const obj = arg1;
972
+ const ret = typeof(obj) === 'number' ? obj : undefined;
973
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
974
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
975
+ };
976
+
977
+ exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
978
+ const obj = arg1;
979
+ const ret = typeof(obj) === 'string' ? obj : undefined;
980
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
981
+ var len1 = WASM_VECTOR_LEN;
982
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
983
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
984
+ };
985
+
986
+ exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
987
+ throw new Error(getStringFromWasm0(arg0, arg1));
988
+ };
989
+
990
+ exports.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
991
+ arg0._wbg_cb_unref();
992
+ };
993
+
994
+ exports.__wbg_abort_07646c894ebbf2bd = function(arg0) {
995
+ arg0.abort();
996
+ };
997
+
998
+ exports.__wbg_abort_399ecbcfd6ef3c8e = function(arg0, arg1) {
999
+ arg0.abort(arg1);
1000
+ };
1001
+
1002
+ exports.__wbg_append_c5cbdf46455cc776 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1003
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1004
+ }, arguments) };
1005
+
1006
+ exports.__wbg_arrayBuffer_c04af4fce566092d = function() { return handleError(function (arg0) {
1007
+ const ret = arg0.arrayBuffer();
1008
+ return ret;
1009
+ }, arguments) };
1483
1010
 
1484
- return imports;
1485
- }
1011
+ exports.__wbg_authorizeresult_new = function(arg0) {
1012
+ const ret = AuthorizeResult.__wrap(arg0);
1013
+ return ret;
1014
+ };
1486
1015
 
1487
- function __wbg_finalize_init(instance, module) {
1488
- wasm = instance.exports;
1489
- __wbg_init.__wbindgen_wasm_module = module;
1490
- cachedDataViewMemory0 = null;
1491
- cachedUint8ArrayMemory0 = null;
1016
+ exports.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
1017
+ const ret = arg0.call(arg1, arg2);
1018
+ return ret;
1019
+ }, arguments) };
1492
1020
 
1021
+ exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
1022
+ const ret = arg0.call(arg1);
1023
+ return ret;
1024
+ }, arguments) };
1493
1025
 
1494
- wasm.__wbindgen_start();
1495
- return wasm;
1496
- }
1026
+ exports.__wbg_cedarling_new = function(arg0) {
1027
+ const ret = Cedarling.__wrap(arg0);
1028
+ return ret;
1029
+ };
1497
1030
 
1498
- function initSync(module) {
1499
- if (wasm !== undefined) return wasm;
1031
+ exports.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
1032
+ const ret = clearTimeout(arg0);
1033
+ return ret;
1034
+ };
1500
1035
 
1036
+ exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1037
+ const ret = arg0.crypto;
1038
+ return ret;
1039
+ };
1501
1040
 
1502
- if (typeof module !== 'undefined') {
1503
- if (Object.getPrototypeOf(module) === Object.prototype) {
1504
- ({module} = module)
1505
- } else {
1506
- console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1507
- }
1508
- }
1041
+ exports.__wbg_debug_24d884048190fccc = function(arg0) {
1042
+ console.debug(...arg0);
1043
+ };
1509
1044
 
1510
- const imports = __wbg_get_imports();
1045
+ exports.__wbg_done_62ea16af4ce34b24 = function(arg0) {
1046
+ const ret = arg0.done;
1047
+ return ret;
1048
+ };
1511
1049
 
1512
- if (!(module instanceof WebAssembly.Module)) {
1513
- module = new WebAssembly.Module(module);
1514
- }
1050
+ exports.__wbg_entries_83c79938054e065f = function(arg0) {
1051
+ const ret = Object.entries(arg0);
1052
+ return ret;
1053
+ };
1515
1054
 
1516
- const instance = new WebAssembly.Instance(module, imports);
1055
+ exports.__wbg_entries_9af46b7eaf7dfefa = function(arg0) {
1056
+ const ret = arg0.entries();
1057
+ return ret;
1058
+ };
1517
1059
 
1518
- return __wbg_finalize_init(instance, module);
1519
- }
1060
+ exports.__wbg_error_98d791de55bc7c97 = function(arg0) {
1061
+ console.error(...arg0);
1062
+ };
1520
1063
 
1521
- async function __wbg_init(module_or_path) {
1522
- if (wasm !== undefined) return wasm;
1064
+ exports.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
1065
+ const ret = fetch(arg0);
1066
+ return ret;
1067
+ };
1523
1068
 
1069
+ exports.__wbg_fetch_90447c28cc0b095e = function(arg0, arg1) {
1070
+ const ret = arg0.fetch(arg1);
1071
+ return ret;
1072
+ };
1524
1073
 
1525
- if (typeof module_or_path !== 'undefined') {
1526
- if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1527
- ({module_or_path} = module_or_path)
1528
- } else {
1529
- console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1530
- }
1074
+ exports.__wbg_fromEntries_743eaaa008e6db37 = function() { return handleError(function (arg0) {
1075
+ const ret = Object.fromEntries(arg0);
1076
+ return ret;
1077
+ }, arguments) };
1078
+
1079
+ exports.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
1080
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1081
+ }, arguments) };
1082
+
1083
+ exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1084
+ arg0.getRandomValues(arg1);
1085
+ }, arguments) };
1086
+
1087
+ exports.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
1088
+ const ret = arg0.getTime();
1089
+ return ret;
1090
+ };
1091
+
1092
+ exports.__wbg_getTimezoneOffset_45389e26d6f46823 = function(arg0) {
1093
+ const ret = arg0.getTimezoneOffset();
1094
+ return ret;
1095
+ };
1096
+
1097
+ exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
1098
+ const ret = arg0[arg1 >>> 0];
1099
+ return ret;
1100
+ };
1101
+
1102
+ exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
1103
+ const ret = Reflect.get(arg0, arg1);
1104
+ return ret;
1105
+ }, arguments) };
1106
+
1107
+ exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
1108
+ const ret = arg0[arg1];
1109
+ return ret;
1110
+ };
1111
+
1112
+ exports.__wbg_has_0e670569d65d3a45 = function() { return handleError(function (arg0, arg1) {
1113
+ const ret = Reflect.has(arg0, arg1);
1114
+ return ret;
1115
+ }, arguments) };
1116
+
1117
+ exports.__wbg_headers_654c30e1bcccc552 = function(arg0) {
1118
+ const ret = arg0.headers;
1119
+ return ret;
1120
+ };
1121
+
1122
+ exports.__wbg_info_e951478d580c1573 = function(arg0) {
1123
+ console.info(...arg0);
1124
+ };
1125
+
1126
+ exports.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
1127
+ let result;
1128
+ try {
1129
+ result = arg0 instanceof ArrayBuffer;
1130
+ } catch (_) {
1131
+ result = false;
1531
1132
  }
1133
+ const ret = result;
1134
+ return ret;
1135
+ };
1532
1136
 
1533
- if (typeof module_or_path === 'undefined') {
1534
- module_or_path = new URL('cedarling_wasm_bg.wasm', import.meta.url);
1137
+ exports.__wbg_instanceof_Array_bc64f5da83077362 = function(arg0) {
1138
+ let result;
1139
+ try {
1140
+ result = arg0 instanceof Array;
1141
+ } catch (_) {
1142
+ result = false;
1535
1143
  }
1536
- const imports = __wbg_get_imports();
1144
+ const ret = result;
1145
+ return ret;
1146
+ };
1537
1147
 
1538
- if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1539
- module_or_path = fetch(module_or_path);
1148
+ exports.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
1149
+ let result;
1150
+ try {
1151
+ result = arg0 instanceof Map;
1152
+ } catch (_) {
1153
+ result = false;
1540
1154
  }
1155
+ const ret = result;
1156
+ return ret;
1157
+ };
1541
1158
 
1542
- const { instance, module } = await __wbg_load(await module_or_path, imports);
1159
+ exports.__wbg_instanceof_Response_cd74d1c2ac92cb0b = function(arg0) {
1160
+ let result;
1161
+ try {
1162
+ result = arg0 instanceof Response;
1163
+ } catch (_) {
1164
+ result = false;
1165
+ }
1166
+ const ret = result;
1167
+ return ret;
1168
+ };
1543
1169
 
1544
- return __wbg_finalize_init(instance, module);
1545
- }
1170
+ exports.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
1171
+ let result;
1172
+ try {
1173
+ result = arg0 instanceof Uint8Array;
1174
+ } catch (_) {
1175
+ result = false;
1176
+ }
1177
+ const ret = result;
1178
+ return ret;
1179
+ };
1180
+
1181
+ exports.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
1182
+ const ret = Array.isArray(arg0);
1183
+ return ret;
1184
+ };
1185
+
1186
+ exports.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
1187
+ const ret = Number.isSafeInteger(arg0);
1188
+ return ret;
1189
+ };
1190
+
1191
+ exports.__wbg_iterator_27b7c8b35ab3e86b = function() {
1192
+ const ret = Symbol.iterator;
1193
+ return ret;
1194
+ };
1195
+
1196
+ exports.__wbg_keys_f5c6002ff150fc6c = function(arg0) {
1197
+ const ret = Object.keys(arg0);
1198
+ return ret;
1199
+ };
1200
+
1201
+ exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
1202
+ const ret = arg0.length;
1203
+ return ret;
1204
+ };
1546
1205
 
1547
- export { initSync };
1548
- export default __wbg_init;
1206
+ exports.__wbg_length_d45040a40c570362 = function(arg0) {
1207
+ const ret = arg0.length;
1208
+ return ret;
1209
+ };
1210
+
1211
+ exports.__wbg_log_3f650af133a6de58 = function(arg0) {
1212
+ console.log(...arg0);
1213
+ };
1214
+
1215
+ exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1216
+ const ret = arg0.msCrypto;
1217
+ return ret;
1218
+ };
1219
+
1220
+ exports.__wbg_multiissuerauthorizeresult_new = function(arg0) {
1221
+ const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
1222
+ return ret;
1223
+ };
1224
+
1225
+ exports.__wbg_new_0_23cedd11d9b40c9d = function() {
1226
+ const ret = new Date();
1227
+ return ret;
1228
+ };
1229
+
1230
+ exports.__wbg_new_1ba21ce319a06297 = function() {
1231
+ const ret = new Object();
1232
+ return ret;
1233
+ };
1234
+
1235
+ exports.__wbg_new_25f239778d6112b9 = function() {
1236
+ const ret = new Array();
1237
+ return ret;
1238
+ };
1239
+
1240
+ exports.__wbg_new_3c79b3bb1b32b7d3 = function() { return handleError(function () {
1241
+ const ret = new Headers();
1242
+ return ret;
1243
+ }, arguments) };
1244
+
1245
+ exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1246
+ const ret = new Uint8Array(arg0);
1247
+ return ret;
1248
+ };
1249
+
1250
+ exports.__wbg_new_881a222c65f168fc = function() { return handleError(function () {
1251
+ const ret = new AbortController();
1252
+ return ret;
1253
+ }, arguments) };
1254
+
1255
+ exports.__wbg_new_b2db8aa2650f793a = function(arg0) {
1256
+ const ret = new Date(arg0);
1257
+ return ret;
1258
+ };
1259
+
1260
+ exports.__wbg_new_b546ae120718850e = function() {
1261
+ const ret = new Map();
1262
+ return ret;
1263
+ };
1264
+
1265
+ exports.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
1266
+ try {
1267
+ var state0 = {a: arg0, b: arg1};
1268
+ var cb0 = (arg0, arg1) => {
1269
+ const a = state0.a;
1270
+ state0.a = 0;
1271
+ try {
1272
+ return wasm_bindgen__convert__closures_____invoke__h048f8d0721d2ddfa(a, state0.b, arg0, arg1);
1273
+ } finally {
1274
+ state0.a = a;
1275
+ }
1276
+ };
1277
+ const ret = new Promise(cb0);
1278
+ return ret;
1279
+ } finally {
1280
+ state0.a = state0.b = 0;
1281
+ }
1282
+ };
1283
+
1284
+ exports.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1285
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1286
+ return ret;
1287
+ };
1288
+
1289
+ exports.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1290
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1291
+ return ret;
1292
+ };
1293
+
1294
+ exports.__wbg_new_with_args_df9e7125ffe55248 = function(arg0, arg1, arg2, arg3) {
1295
+ const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1296
+ return ret;
1297
+ };
1298
+
1299
+ exports.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
1300
+ const ret = new Uint8Array(arg0 >>> 0);
1301
+ return ret;
1302
+ };
1303
+
1304
+ exports.__wbg_new_with_str_and_init_c5748f76f5108934 = function() { return handleError(function (arg0, arg1, arg2) {
1305
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1306
+ return ret;
1307
+ }, arguments) };
1308
+
1309
+ exports.__wbg_next_138a17bbf04e926c = function(arg0) {
1310
+ const ret = arg0.next;
1311
+ return ret;
1312
+ };
1313
+
1314
+ exports.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
1315
+ const ret = arg0.next();
1316
+ return ret;
1317
+ }, arguments) };
1318
+
1319
+ exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
1320
+ const ret = arg0.node;
1321
+ return ret;
1322
+ };
1323
+
1324
+ exports.__wbg_policyevaluationerror_new = function(arg0) {
1325
+ const ret = PolicyEvaluationError.__wrap(arg0);
1326
+ return ret;
1327
+ };
1328
+
1329
+ exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1330
+ const ret = arg0.process;
1331
+ return ret;
1332
+ };
1333
+
1334
+ exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1335
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1336
+ };
1337
+
1338
+ exports.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
1339
+ const ret = arg0.push(arg1);
1340
+ return ret;
1341
+ };
1342
+
1343
+ exports.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1344
+ const ret = arg0.queueMicrotask;
1345
+ return ret;
1346
+ };
1347
+
1348
+ exports.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1349
+ queueMicrotask(arg0);
1350
+ };
1351
+
1352
+ exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1353
+ arg0.randomFillSync(arg1);
1354
+ }, arguments) };
1355
+
1356
+ exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1357
+ const ret = module.require;
1358
+ return ret;
1359
+ }, arguments) };
1360
+
1361
+ exports.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1362
+ const ret = Promise.resolve(arg0);
1363
+ return ret;
1364
+ };
1365
+
1366
+ exports.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
1367
+ const ret = setTimeout(arg0, arg1);
1368
+ return ret;
1369
+ };
1370
+
1371
+ exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1372
+ arg0[arg1] = arg2;
1373
+ };
1374
+
1375
+ exports.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
1376
+ const ret = Reflect.set(arg0, arg1, arg2);
1377
+ return ret;
1378
+ }, arguments) };
1379
+
1380
+ exports.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
1381
+ arg0[arg1 >>> 0] = arg2;
1382
+ };
1383
+
1384
+ exports.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {
1385
+ arg0.body = arg1;
1386
+ };
1387
+
1388
+ exports.__wbg_set_cache_0e437c7c8e838b9b = function(arg0, arg1) {
1389
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
1390
+ };
1391
+
1392
+ exports.__wbg_set_credentials_55ae7c3c106fd5be = function(arg0, arg1) {
1393
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1394
+ };
1395
+
1396
+ exports.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
1397
+ const ret = arg0.set(arg1, arg2);
1398
+ return ret;
1399
+ };
1400
+
1401
+ exports.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {
1402
+ arg0.headers = arg1;
1403
+ };
1404
+
1405
+ exports.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {
1406
+ arg0.method = getStringFromWasm0(arg1, arg2);
1407
+ };
1408
+
1409
+ exports.__wbg_set_mode_611016a6818fc690 = function(arg0, arg1) {
1410
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
1411
+ };
1412
+
1413
+ exports.__wbg_set_signal_e89be862d0091009 = function(arg0, arg1) {
1414
+ arg0.signal = arg1;
1415
+ };
1416
+
1417
+ exports.__wbg_signal_3c14fbdc89694b39 = function(arg0) {
1418
+ const ret = arg0.signal;
1419
+ return ret;
1420
+ };
1421
+
1422
+ exports.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
1423
+ const ret = typeof global === 'undefined' ? null : global;
1424
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1425
+ };
1426
+
1427
+ exports.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
1428
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1429
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1430
+ };
1431
+
1432
+ exports.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1433
+ const ret = typeof self === 'undefined' ? null : self;
1434
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1435
+ };
1436
+
1437
+ exports.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1438
+ const ret = typeof window === 'undefined' ? null : window;
1439
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1440
+ };
1441
+
1442
+ exports.__wbg_status_9bfc680efca4bdfd = function(arg0) {
1443
+ const ret = arg0.status;
1444
+ return ret;
1445
+ };
1446
+
1447
+ exports.__wbg_stringify_655a6390e1f5eb6b = function() { return handleError(function (arg0) {
1448
+ const ret = JSON.stringify(arg0);
1449
+ return ret;
1450
+ }, arguments) };
1451
+
1452
+ exports.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
1453
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1454
+ return ret;
1455
+ };
1456
+
1457
+ exports.__wbg_text_51046bb33d257f63 = function() { return handleError(function (arg0) {
1458
+ const ret = arg0.text();
1459
+ return ret;
1460
+ }, arguments) };
1461
+
1462
+ exports.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1463
+ const ret = arg0.then(arg1, arg2);
1464
+ return ret;
1465
+ };
1466
+
1467
+ exports.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1468
+ const ret = arg0.then(arg1);
1469
+ return ret;
1470
+ };
1471
+
1472
+ exports.__wbg_trace_b213249bfc587469 = function(arg0) {
1473
+ console.trace(...arg0);
1474
+ };
1475
+
1476
+ exports.__wbg_url_b6d11838a4f95198 = function(arg0, arg1) {
1477
+ const ret = arg1.url;
1478
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1479
+ const len1 = WASM_VECTOR_LEN;
1480
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1481
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1482
+ };
1483
+
1484
+ exports.__wbg_value_57b7b035e117f7ee = function(arg0) {
1485
+ const ret = arg0.value;
1486
+ return ret;
1487
+ };
1488
+
1489
+ exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1490
+ const ret = arg0.versions;
1491
+ return ret;
1492
+ };
1493
+
1494
+ exports.__wbg_warn_14a9fd75d0abe5d7 = function(arg0) {
1495
+ console.warn(...arg0);
1496
+ };
1497
+
1498
+ exports.__wbindgen_cast_06e9015128396e60 = function(arg0, arg1) {
1499
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 505, function: Function { arguments: [], shim_idx: 506, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1500
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3b69c8350c009da1, wasm_bindgen__convert__closures_____invoke__hfa802aa0addaec97);
1501
+ return ret;
1502
+ };
1503
+
1504
+ exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1505
+ // Cast intrinsic for `Ref(String) -> Externref`.
1506
+ const ret = getStringFromWasm0(arg0, arg1);
1507
+ return ret;
1508
+ };
1509
+
1510
+ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1511
+ // Cast intrinsic for `U64 -> Externref`.
1512
+ const ret = BigInt.asUintN(64, arg0);
1513
+ return ret;
1514
+ };
1515
+
1516
+ exports.__wbindgen_cast_4bdd81be241a5b48 = function(arg0, arg1) {
1517
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 549, function: Function { arguments: [Externref], shim_idx: 550, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1518
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5f4f3416747f6981, wasm_bindgen__convert__closures_____invoke__he934e31379087ee0);
1519
+ return ret;
1520
+ };
1521
+
1522
+ exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1523
+ // Cast intrinsic for `I64 -> Externref`.
1524
+ const ret = arg0;
1525
+ return ret;
1526
+ };
1527
+
1528
+ exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1529
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1530
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1531
+ return ret;
1532
+ };
1533
+
1534
+ exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1535
+ // Cast intrinsic for `F64 -> Externref`.
1536
+ const ret = arg0;
1537
+ return ret;
1538
+ };
1539
+
1540
+ exports.__wbindgen_init_externref_table = function() {
1541
+ const table = wasm.__wbindgen_externrefs;
1542
+ const offset = table.grow(4);
1543
+ table.set(0, undefined);
1544
+ table.set(offset + 0, undefined);
1545
+ table.set(offset + 1, null);
1546
+ table.set(offset + 2, true);
1547
+ table.set(offset + 3, false);
1548
+ };
1549
+
1550
+ const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
1551
+ const wasmBytes = require('fs').readFileSync(wasmPath);
1552
+ const wasmModule = new WebAssembly.Module(wasmBytes);
1553
+ const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
1554
+
1555
+ wasm.__wbindgen_start();