@janssenproject/cedarling_wasm 0.0.251-nodejs → 0.0.252

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,6 +1,4 @@
1
-
2
- let imports = {};
3
- imports['__wbindgen_placeholder__'] = module.exports;
1
+ let wasm;
4
2
 
5
3
  let cachedUint8ArrayMemory0 = null;
6
4
 
@@ -15,7 +13,15 @@ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true
15
13
 
16
14
  cachedTextDecoder.decode();
17
15
 
16
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ let numBytesDecoded = 0;
18
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
+ }
19
25
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
20
26
  }
21
27
 
@@ -87,26 +93,6 @@ function getDataViewMemory0() {
87
93
  return cachedDataViewMemory0;
88
94
  }
89
95
 
90
- function addToExternrefTable0(obj) {
91
- const idx = wasm.__externref_table_alloc();
92
- wasm.__wbindgen_export_4.set(idx, obj);
93
- return idx;
94
- }
95
-
96
- function handleError(f, args) {
97
- try {
98
- return f.apply(this, args);
99
- } catch (e) {
100
- const idx = addToExternrefTable0(e);
101
- wasm.__wbindgen_exn_store(idx);
102
- }
103
- }
104
-
105
- function getArrayU8FromWasm0(ptr, len) {
106
- ptr = ptr >>> 0;
107
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
108
- }
109
-
110
96
  function isLikeNone(x) {
111
97
  return x === undefined || x === null;
112
98
  }
@@ -176,13 +162,29 @@ function debugString(val) {
176
162
  return className;
177
163
  }
178
164
 
165
+ function addToExternrefTable0(obj) {
166
+ const idx = wasm.__externref_table_alloc();
167
+ wasm.__wbindgen_externrefs.set(idx, obj);
168
+ return idx;
169
+ }
170
+
171
+ function handleError(f, args) {
172
+ try {
173
+ return f.apply(this, args);
174
+ } catch (e) {
175
+ const idx = addToExternrefTable0(e);
176
+ wasm.__wbindgen_exn_store(idx);
177
+ }
178
+ }
179
+
180
+ function getArrayU8FromWasm0(ptr, len) {
181
+ ptr = ptr >>> 0;
182
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
183
+ }
184
+
179
185
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
180
186
  ? { register: () => {}, unregister: () => {} }
181
- : new FinalizationRegistry(
182
- state => {
183
- wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
184
- }
185
- );
187
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
186
188
 
187
189
  function makeMutClosure(arg0, arg1, dtor, f) {
188
190
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -197,15 +199,17 @@ function makeMutClosure(arg0, arg1, dtor, f) {
197
199
  try {
198
200
  return f(a, state.b, ...args);
199
201
  } finally {
200
- if (--state.cnt === 0) {
201
- wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
202
- CLOSURE_DTORS.unregister(state);
203
- } else {
204
- state.a = a;
205
- }
202
+ state.a = a;
203
+ real._wbg_cb_unref();
204
+ }
205
+ };
206
+ real._wbg_cb_unref = () => {
207
+ if (--state.cnt === 0) {
208
+ state.dtor(state.a, state.b);
209
+ state.a = 0;
210
+ CLOSURE_DTORS.unregister(state);
206
211
  }
207
212
  };
208
- real.original = state;
209
213
  CLOSURE_DTORS.register(real, state, state);
210
214
  return real;
211
215
  }
@@ -215,13 +219,13 @@ function makeMutClosure(arg0, arg1, dtor, f) {
215
219
  * @param {any} config
216
220
  * @returns {Promise<Cedarling>}
217
221
  */
218
- exports.init = function(config) {
222
+ export function init(config) {
219
223
  const ret = wasm.init(config);
220
224
  return ret;
221
- };
225
+ }
222
226
 
223
227
  function takeFromExternrefTable0(idx) {
224
- const value = wasm.__wbindgen_export_4.get(idx);
228
+ const value = wasm.__wbindgen_externrefs.get(idx);
225
229
  wasm.__externref_table_dealloc(idx);
226
230
  return value;
227
231
  }
@@ -231,7 +235,7 @@ function getArrayJsValueFromWasm0(ptr, len) {
231
235
  const mem = getDataViewMemory0();
232
236
  const result = [];
233
237
  for (let i = ptr; i < ptr + 4 * len; i += 4) {
234
- result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
238
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
235
239
  }
236
240
  wasm.__externref_drop_slice(ptr, len);
237
241
  return result;
@@ -242,16 +246,16 @@ function _assertClass(instance, klass) {
242
246
  throw new Error(`expected instance of ${klass.name}`);
243
247
  }
244
248
  }
245
- function __wbg_adapter_6(arg0, arg1, arg2) {
246
- wasm.closure553_externref_shim(arg0, arg1, arg2);
249
+ function wasm_bindgen__convert__closures_____invoke__h559bc6a3933a5765(arg0, arg1, arg2) {
250
+ wasm.wasm_bindgen__convert__closures_____invoke__h559bc6a3933a5765(arg0, arg1, arg2);
247
251
  }
248
252
 
249
- function __wbg_adapter_9(arg0, arg1) {
250
- wasm.wasm_bindgen__convert__closures_____invoke__h45fb813e03a674d3(arg0, arg1);
253
+ function wasm_bindgen__convert__closures_____invoke__hc1fc6e0e3b60f4a4(arg0, arg1) {
254
+ wasm.wasm_bindgen__convert__closures_____invoke__hc1fc6e0e3b60f4a4(arg0, arg1);
251
255
  }
252
256
 
253
- function __wbg_adapter_214(arg0, arg1, arg2, arg3) {
254
- wasm.closure1831_externref_shim(arg0, arg1, arg2, arg3);
257
+ function wasm_bindgen__convert__closures_____invoke__h132b7432541a1b5f(arg0, arg1, arg2, arg3) {
258
+ wasm.wasm_bindgen__convert__closures_____invoke__h132b7432541a1b5f(arg0, arg1, arg2, arg3);
255
259
  }
256
260
 
257
261
  const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
@@ -267,7 +271,7 @@ const AuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined'
267
271
  * A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
268
272
  * Represents the result of an authorization request.
269
273
  */
270
- class AuthorizeResult {
274
+ export class AuthorizeResult {
271
275
 
272
276
  static __wrap(ptr) {
273
277
  ptr = ptr >>> 0;
@@ -405,8 +409,6 @@ class AuthorizeResult {
405
409
  }
406
410
  if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
407
411
 
408
- exports.AuthorizeResult = AuthorizeResult;
409
-
410
412
  const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'undefined')
411
413
  ? { register: () => {}, unregister: () => {} }
412
414
  : new FinalizationRegistry(ptr => wasm.__wbg_authorizeresultresponse_free(ptr >>> 0, 1));
@@ -414,7 +416,7 @@ const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'un
414
416
  * A WASM wrapper for the Rust `cedar_policy::Response` struct.
415
417
  * Represents the result of an authorization request.
416
418
  */
417
- class AuthorizeResultResponse {
419
+ export class AuthorizeResultResponse {
418
420
 
419
421
  static __wrap(ptr) {
420
422
  ptr = ptr >>> 0;
@@ -454,15 +456,13 @@ class AuthorizeResultResponse {
454
456
  }
455
457
  if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
456
458
 
457
- exports.AuthorizeResultResponse = AuthorizeResultResponse;
458
-
459
459
  const CedarlingFinalization = (typeof FinalizationRegistry === 'undefined')
460
460
  ? { register: () => {}, unregister: () => {} }
461
461
  : new FinalizationRegistry(ptr => wasm.__wbg_cedarling_free(ptr >>> 0, 1));
462
462
  /**
463
463
  * The instance of the Cedarling application.
464
464
  */
465
- class Cedarling {
465
+ export class Cedarling {
466
466
 
467
467
  static __wrap(ptr) {
468
468
  ptr = ptr >>> 0;
@@ -625,8 +625,6 @@ class Cedarling {
625
625
  }
626
626
  if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
627
627
 
628
- exports.Cedarling = Cedarling;
629
-
630
628
  const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
631
629
  ? { register: () => {}, unregister: () => {} }
632
630
  : new FinalizationRegistry(ptr => wasm.__wbg_diagnostics_free(ptr >>> 0, 1));
@@ -636,7 +634,7 @@ const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
636
634
  *
637
635
  * Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
638
636
  */
639
- class Diagnostics {
637
+ export class Diagnostics {
640
638
 
641
639
  static __wrap(ptr) {
642
640
  ptr = ptr >>> 0;
@@ -684,13 +682,11 @@ class Diagnostics {
684
682
  }
685
683
  if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
686
684
 
687
- exports.Diagnostics = Diagnostics;
688
-
689
685
  const JsJsonLogicFinalization = (typeof FinalizationRegistry === 'undefined')
690
686
  ? { register: () => {}, unregister: () => {} }
691
687
  : new FinalizationRegistry(ptr => wasm.__wbg_jsjsonlogic_free(ptr >>> 0, 1));
692
688
 
693
- class JsJsonLogic {
689
+ export class JsJsonLogic {
694
690
 
695
691
  __destroy_into_raw() {
696
692
  const ptr = this.__wbg_ptr;
@@ -724,8 +720,6 @@ class JsJsonLogic {
724
720
  }
725
721
  if (Symbol.dispose) JsJsonLogic.prototype[Symbol.dispose] = JsJsonLogic.prototype.free;
726
722
 
727
- exports.JsJsonLogic = JsJsonLogic;
728
-
729
723
  const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
730
724
  ? { register: () => {}, unregister: () => {} }
731
725
  : new FinalizationRegistry(ptr => wasm.__wbg_policyevaluationerror_free(ptr >>> 0, 1));
@@ -735,7 +729,7 @@ const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'unde
735
729
  *
736
730
  * Represents an error that occurred when evaluating a Cedar policy.
737
731
  */
738
- class PolicyEvaluationError {
732
+ export class PolicyEvaluationError {
739
733
 
740
734
  static __wrap(ptr) {
741
735
  ptr = ptr >>> 0;
@@ -791,674 +785,642 @@ class PolicyEvaluationError {
791
785
  }
792
786
  if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
793
787
 
794
- exports.PolicyEvaluationError = PolicyEvaluationError;
795
-
796
- exports.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
797
- const ret = Error(getStringFromWasm0(arg0, arg1));
798
- return ret;
799
- };
788
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
800
789
 
801
- exports.__wbg_Number_998bea33bd87c3e0 = function(arg0) {
802
- const ret = Number(arg0);
803
- return ret;
804
- };
805
-
806
- exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
807
- const ret = String(arg1);
808
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
809
- const len1 = WASM_VECTOR_LEN;
810
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
811
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
812
- };
813
-
814
- exports.__wbg_abort_67e1b49bf6614565 = function(arg0) {
815
- arg0.abort();
816
- };
817
-
818
- exports.__wbg_abort_d830bf2e9aa6ec5b = function(arg0, arg1) {
819
- arg0.abort(arg1);
820
- };
821
-
822
- exports.__wbg_append_72a3c0addd2bce38 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
823
- arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
824
- }, arguments) };
825
-
826
- exports.__wbg_arrayBuffer_9c99b8e2809e8cbb = function() { return handleError(function (arg0) {
827
- const ret = arg0.arrayBuffer();
828
- return ret;
829
- }, arguments) };
830
-
831
- exports.__wbg_authorizeresult_new = function(arg0) {
832
- const ret = AuthorizeResult.__wrap(arg0);
833
- return ret;
834
- };
835
-
836
- exports.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
837
- const ret = arg0.call(arg1);
838
- return ret;
839
- }, arguments) };
840
-
841
- exports.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
842
- const ret = arg0.call(arg1, arg2);
843
- return ret;
844
- }, arguments) };
845
-
846
- exports.__wbg_cedarling_new = function(arg0) {
847
- const ret = Cedarling.__wrap(arg0);
848
- return ret;
849
- };
850
-
851
- exports.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
852
- const ret = clearTimeout(arg0);
853
- return ret;
854
- };
855
-
856
- exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
857
- const ret = arg0.crypto;
858
- return ret;
859
- };
860
-
861
- exports.__wbg_debug_3bc8bd5a0fc361c6 = function(arg0) {
862
- console.debug(...arg0);
863
- };
864
-
865
- exports.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
866
- const ret = arg0.done;
867
- return ret;
868
- };
869
-
870
- exports.__wbg_entries_2be2f15bd5554996 = function(arg0) {
871
- const ret = Object.entries(arg0);
872
- return ret;
873
- };
874
-
875
- exports.__wbg_entries_7a842f4caac72cb9 = function(arg0) {
876
- const ret = arg0.entries();
877
- return ret;
878
- };
879
-
880
- exports.__wbg_error_3e65ef00ce5a8b19 = function(arg0) {
881
- console.error(...arg0);
882
- };
883
-
884
- exports.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
885
- const ret = fetch(arg0);
886
- return ret;
887
- };
790
+ async function __wbg_load(module, imports) {
791
+ if (typeof Response === 'function' && module instanceof Response) {
792
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
793
+ try {
794
+ return await WebAssembly.instantiateStreaming(module, imports);
888
795
 
889
- exports.__wbg_fetch_87aed7f306ec6d63 = function(arg0, arg1) {
890
- const ret = arg0.fetch(arg1);
891
- return ret;
892
- };
796
+ } catch (e) {
797
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
893
798
 
894
- exports.__wbg_fromEntries_90d06c670ebbfb45 = function() { return handleError(function (arg0) {
895
- const ret = Object.fromEntries(arg0);
896
- return ret;
897
- }, arguments) };
799
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
800
+ 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);
898
801
 
899
- exports.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
900
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
901
- }, arguments) };
802
+ } else {
803
+ throw e;
804
+ }
805
+ }
806
+ }
902
807
 
903
- exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
904
- arg0.getRandomValues(arg1);
905
- }, arguments) };
808
+ const bytes = await module.arrayBuffer();
809
+ return await WebAssembly.instantiate(bytes, imports);
906
810
 
907
- exports.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
908
- const ret = arg0.getTime();
909
- return ret;
910
- };
811
+ } else {
812
+ const instance = await WebAssembly.instantiate(module, imports);
911
813
 
912
- exports.__wbg_getTimezoneOffset_1e3ddc1382e7c8b0 = function(arg0) {
913
- const ret = arg0.getTimezoneOffset();
914
- return ret;
915
- };
814
+ if (instance instanceof WebAssembly.Instance) {
815
+ return { instance, module };
916
816
 
917
- exports.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
918
- const ret = arg0[arg1 >>> 0];
919
- return ret;
920
- };
817
+ } else {
818
+ return instance;
819
+ }
820
+ }
821
+ }
921
822
 
922
- exports.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
923
- const ret = Reflect.get(arg0, arg1);
924
- return ret;
925
- }, arguments) };
823
+ function __wbg_get_imports() {
824
+ const imports = {};
825
+ imports.wbg = {};
826
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
827
+ const ret = Error(getStringFromWasm0(arg0, arg1));
828
+ return ret;
829
+ };
830
+ imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
831
+ const ret = Number(arg0);
832
+ return ret;
833
+ };
834
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
835
+ const ret = String(arg1);
836
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
837
+ const len1 = WASM_VECTOR_LEN;
838
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
839
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
840
+ };
841
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
842
+ const v = arg1;
843
+ const ret = typeof(v) === 'bigint' ? v : undefined;
844
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
845
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
846
+ };
847
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
848
+ const v = arg0;
849
+ const ret = typeof(v) === 'boolean' ? v : undefined;
850
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
851
+ };
852
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
853
+ const ret = debugString(arg1);
854
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
855
+ const len1 = WASM_VECTOR_LEN;
856
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
857
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
858
+ };
859
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
860
+ const ret = arg0 in arg1;
861
+ return ret;
862
+ };
863
+ imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
864
+ const ret = typeof(arg0) === 'bigint';
865
+ return ret;
866
+ };
867
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
868
+ const ret = typeof(arg0) === 'function';
869
+ return ret;
870
+ };
871
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
872
+ const val = arg0;
873
+ const ret = typeof(val) === 'object' && val !== null;
874
+ return ret;
875
+ };
876
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
877
+ const ret = typeof(arg0) === 'string';
878
+ return ret;
879
+ };
880
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
881
+ const ret = arg0 === undefined;
882
+ return ret;
883
+ };
884
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
885
+ const ret = arg0 === arg1;
886
+ return ret;
887
+ };
888
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
889
+ const ret = arg0 == arg1;
890
+ return ret;
891
+ };
892
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
893
+ const obj = arg1;
894
+ const ret = typeof(obj) === 'number' ? obj : undefined;
895
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
896
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
897
+ };
898
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
899
+ const obj = arg1;
900
+ const ret = typeof(obj) === 'string' ? obj : undefined;
901
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
902
+ var len1 = WASM_VECTOR_LEN;
903
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
904
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
905
+ };
906
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
907
+ throw new Error(getStringFromWasm0(arg0, arg1));
908
+ };
909
+ imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
910
+ arg0._wbg_cb_unref();
911
+ };
912
+ imports.wbg.__wbg_abort_28ad55c5825b004d = function(arg0, arg1) {
913
+ arg0.abort(arg1);
914
+ };
915
+ imports.wbg.__wbg_abort_e7eb059f72f9ed0c = function(arg0) {
916
+ arg0.abort();
917
+ };
918
+ imports.wbg.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
919
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
920
+ }, arguments) };
921
+ imports.wbg.__wbg_arrayBuffer_b375eccb84b4ddf3 = function() { return handleError(function (arg0) {
922
+ const ret = arg0.arrayBuffer();
923
+ return ret;
924
+ }, arguments) };
925
+ imports.wbg.__wbg_authorizeresult_new = function(arg0) {
926
+ const ret = AuthorizeResult.__wrap(arg0);
927
+ return ret;
928
+ };
929
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
930
+ const ret = arg0.call(arg1, arg2);
931
+ return ret;
932
+ }, arguments) };
933
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
934
+ const ret = arg0.call(arg1);
935
+ return ret;
936
+ }, arguments) };
937
+ imports.wbg.__wbg_cedarling_new = function(arg0) {
938
+ const ret = Cedarling.__wrap(arg0);
939
+ return ret;
940
+ };
941
+ imports.wbg.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
942
+ const ret = clearTimeout(arg0);
943
+ return ret;
944
+ };
945
+ imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
946
+ const ret = arg0.crypto;
947
+ return ret;
948
+ };
949
+ imports.wbg.__wbg_debug_755c0800f64c9a88 = function(arg0) {
950
+ console.debug(...arg0);
951
+ };
952
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
953
+ const ret = arg0.done;
954
+ return ret;
955
+ };
956
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
957
+ const ret = Object.entries(arg0);
958
+ return ret;
959
+ };
960
+ imports.wbg.__wbg_entries_eb145c4da5c811f7 = function(arg0) {
961
+ const ret = arg0.entries();
962
+ return ret;
963
+ };
964
+ imports.wbg.__wbg_error_7a6b3e62969d4270 = function(arg0) {
965
+ console.error(...arg0);
966
+ };
967
+ imports.wbg.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
968
+ const ret = fetch(arg0);
969
+ return ret;
970
+ };
971
+ imports.wbg.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
972
+ const ret = arg0.fetch(arg1);
973
+ return ret;
974
+ };
975
+ imports.wbg.__wbg_fromEntries_c7159f3787268c9f = function() { return handleError(function (arg0) {
976
+ const ret = Object.fromEntries(arg0);
977
+ return ret;
978
+ }, arguments) };
979
+ imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
980
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
981
+ }, arguments) };
982
+ imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
983
+ arg0.getRandomValues(arg1);
984
+ }, arguments) };
985
+ imports.wbg.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
986
+ const ret = arg0.getTime();
987
+ return ret;
988
+ };
989
+ imports.wbg.__wbg_getTimezoneOffset_d391cb11d54969f8 = function(arg0) {
990
+ const ret = arg0.getTimezoneOffset();
991
+ return ret;
992
+ };
993
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
994
+ const ret = arg0[arg1 >>> 0];
995
+ return ret;
996
+ };
997
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
998
+ const ret = Reflect.get(arg0, arg1);
999
+ return ret;
1000
+ }, arguments) };
1001
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
1002
+ const ret = arg0[arg1];
1003
+ return ret;
1004
+ };
1005
+ imports.wbg.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
1006
+ const ret = Reflect.has(arg0, arg1);
1007
+ return ret;
1008
+ }, arguments) };
1009
+ imports.wbg.__wbg_headers_b87d7eaba61c3278 = function(arg0) {
1010
+ const ret = arg0.headers;
1011
+ return ret;
1012
+ };
1013
+ imports.wbg.__wbg_info_f0ce824723264770 = function(arg0) {
1014
+ console.info(...arg0);
1015
+ };
1016
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
1017
+ let result;
1018
+ try {
1019
+ result = arg0 instanceof ArrayBuffer;
1020
+ } catch (_) {
1021
+ result = false;
1022
+ }
1023
+ const ret = result;
1024
+ return ret;
1025
+ };
1026
+ imports.wbg.__wbg_instanceof_Array_fca44e0f4a7f6240 = function(arg0) {
1027
+ let result;
1028
+ try {
1029
+ result = arg0 instanceof Array;
1030
+ } catch (_) {
1031
+ result = false;
1032
+ }
1033
+ const ret = result;
1034
+ return ret;
1035
+ };
1036
+ imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
1037
+ let result;
1038
+ try {
1039
+ result = arg0 instanceof Map;
1040
+ } catch (_) {
1041
+ result = false;
1042
+ }
1043
+ const ret = result;
1044
+ return ret;
1045
+ };
1046
+ imports.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
1047
+ let result;
1048
+ try {
1049
+ result = arg0 instanceof Response;
1050
+ } catch (_) {
1051
+ result = false;
1052
+ }
1053
+ const ret = result;
1054
+ return ret;
1055
+ };
1056
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
1057
+ let result;
1058
+ try {
1059
+ result = arg0 instanceof Uint8Array;
1060
+ } catch (_) {
1061
+ result = false;
1062
+ }
1063
+ const ret = result;
1064
+ return ret;
1065
+ };
1066
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
1067
+ const ret = Array.isArray(arg0);
1068
+ return ret;
1069
+ };
1070
+ imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
1071
+ const ret = Number.isSafeInteger(arg0);
1072
+ return ret;
1073
+ };
1074
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
1075
+ const ret = Symbol.iterator;
1076
+ return ret;
1077
+ };
1078
+ imports.wbg.__wbg_keys_b4d27b02ad14f4be = function(arg0) {
1079
+ const ret = Object.keys(arg0);
1080
+ return ret;
1081
+ };
1082
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
1083
+ const ret = arg0.length;
1084
+ return ret;
1085
+ };
1086
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
1087
+ const ret = arg0.length;
1088
+ return ret;
1089
+ };
1090
+ imports.wbg.__wbg_log_33f7f6dbc0d0ccf4 = function(arg0) {
1091
+ console.log(...arg0);
1092
+ };
1093
+ imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1094
+ const ret = arg0.msCrypto;
1095
+ return ret;
1096
+ };
1097
+ imports.wbg.__wbg_new_0_f9740686d739025c = function() {
1098
+ const ret = new Date();
1099
+ return ret;
1100
+ };
1101
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
1102
+ const ret = new Object();
1103
+ return ret;
1104
+ };
1105
+ imports.wbg.__wbg_new_2531773dac38ebb3 = function() { return handleError(function () {
1106
+ const ret = new AbortController();
1107
+ return ret;
1108
+ }, arguments) };
1109
+ imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
1110
+ try {
1111
+ var state0 = {a: arg0, b: arg1};
1112
+ var cb0 = (arg0, arg1) => {
1113
+ const a = state0.a;
1114
+ state0.a = 0;
1115
+ try {
1116
+ return wasm_bindgen__convert__closures_____invoke__h132b7432541a1b5f(a, state0.b, arg0, arg1);
1117
+ } finally {
1118
+ state0.a = a;
1119
+ }
1120
+ };
1121
+ const ret = new Promise(cb0);
1122
+ return ret;
1123
+ } finally {
1124
+ state0.a = state0.b = 0;
1125
+ }
1126
+ };
1127
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
1128
+ const ret = new Uint8Array(arg0);
1129
+ return ret;
1130
+ };
1131
+ imports.wbg.__wbg_new_68651c719dcda04e = function() {
1132
+ const ret = new Map();
1133
+ return ret;
1134
+ };
1135
+ imports.wbg.__wbg_new_93d9417ed3fb115d = function(arg0) {
1136
+ const ret = new Date(arg0);
1137
+ return ret;
1138
+ };
1139
+ imports.wbg.__wbg_new_9edf9838a2def39c = function() { return handleError(function () {
1140
+ const ret = new Headers();
1141
+ return ret;
1142
+ }, arguments) };
1143
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
1144
+ const ret = new Array();
1145
+ return ret;
1146
+ };
1147
+ imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
1148
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1149
+ return ret;
1150
+ };
1151
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
1152
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1153
+ return ret;
1154
+ };
1155
+ imports.wbg.__wbg_new_with_args_02cbc439ce3fd7db = function(arg0, arg1, arg2, arg3) {
1156
+ const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1157
+ return ret;
1158
+ };
1159
+ imports.wbg.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
1160
+ const ret = new Uint8Array(arg0 >>> 0);
1161
+ return ret;
1162
+ };
1163
+ imports.wbg.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function() { return handleError(function (arg0, arg1, arg2) {
1164
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1165
+ return ret;
1166
+ }, arguments) };
1167
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
1168
+ const ret = arg0.next();
1169
+ return ret;
1170
+ }, arguments) };
1171
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
1172
+ const ret = arg0.next;
1173
+ return ret;
1174
+ };
1175
+ imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
1176
+ const ret = arg0.node;
1177
+ return ret;
1178
+ };
1179
+ imports.wbg.__wbg_policyevaluationerror_new = function(arg0) {
1180
+ const ret = PolicyEvaluationError.__wrap(arg0);
1181
+ return ret;
1182
+ };
1183
+ imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1184
+ const ret = arg0.process;
1185
+ return ret;
1186
+ };
1187
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
1188
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1189
+ };
1190
+ imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
1191
+ const ret = arg0.push(arg1);
1192
+ return ret;
1193
+ };
1194
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
1195
+ const ret = arg0.queueMicrotask;
1196
+ return ret;
1197
+ };
1198
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
1199
+ queueMicrotask(arg0);
1200
+ };
1201
+ imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1202
+ arg0.randomFillSync(arg1);
1203
+ }, arguments) };
1204
+ imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1205
+ const ret = module.require;
1206
+ return ret;
1207
+ }, arguments) };
1208
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
1209
+ const ret = Promise.resolve(arg0);
1210
+ return ret;
1211
+ };
1212
+ imports.wbg.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
1213
+ const ret = setTimeout(arg0, arg1);
1214
+ return ret;
1215
+ };
1216
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1217
+ arg0[arg1] = arg2;
1218
+ };
1219
+ imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
1220
+ const ret = arg0.set(arg1, arg2);
1221
+ return ret;
1222
+ };
1223
+ imports.wbg.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
1224
+ arg0.body = arg1;
1225
+ };
1226
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
1227
+ arg0[arg1 >>> 0] = arg2;
1228
+ };
1229
+ imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
1230
+ const ret = Reflect.set(arg0, arg1, arg2);
1231
+ return ret;
1232
+ }, arguments) };
1233
+ imports.wbg.__wbg_set_cache_2f9deb19b92b81e3 = function(arg0, arg1) {
1234
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
1235
+ };
1236
+ imports.wbg.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
1237
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1238
+ };
1239
+ imports.wbg.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
1240
+ arg0.headers = arg1;
1241
+ };
1242
+ imports.wbg.__wbg_set_method_c02d8cbbe204ac2d = function(arg0, arg1, arg2) {
1243
+ arg0.method = getStringFromWasm0(arg1, arg2);
1244
+ };
1245
+ imports.wbg.__wbg_set_mode_52ef73cfa79639cb = function(arg0, arg1) {
1246
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
1247
+ };
1248
+ imports.wbg.__wbg_set_signal_dda2cf7ccb6bee0f = function(arg0, arg1) {
1249
+ arg0.signal = arg1;
1250
+ };
1251
+ imports.wbg.__wbg_signal_4db5aa055bf9eb9a = function(arg0) {
1252
+ const ret = arg0.signal;
1253
+ return ret;
1254
+ };
1255
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
1256
+ const ret = typeof global === 'undefined' ? null : global;
1257
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1258
+ };
1259
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
1260
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1261
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1262
+ };
1263
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
1264
+ const ret = typeof self === 'undefined' ? null : self;
1265
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1266
+ };
1267
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
1268
+ const ret = typeof window === 'undefined' ? null : window;
1269
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1270
+ };
1271
+ imports.wbg.__wbg_status_de7eed5a7a5bfd5d = function(arg0) {
1272
+ const ret = arg0.status;
1273
+ return ret;
1274
+ };
1275
+ imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function() { return handleError(function (arg0) {
1276
+ const ret = JSON.stringify(arg0);
1277
+ return ret;
1278
+ }, arguments) };
1279
+ imports.wbg.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
1280
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1281
+ return ret;
1282
+ };
1283
+ imports.wbg.__wbg_text_dc33c15c17bdfb52 = function() { return handleError(function (arg0) {
1284
+ const ret = arg0.text();
1285
+ return ret;
1286
+ }, arguments) };
1287
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
1288
+ const ret = arg0.then(arg1);
1289
+ return ret;
1290
+ };
1291
+ imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
1292
+ const ret = arg0.then(arg1, arg2);
1293
+ return ret;
1294
+ };
1295
+ imports.wbg.__wbg_trace_15baa8999e3f2ed1 = function(arg0) {
1296
+ console.trace(...arg0);
1297
+ };
1298
+ imports.wbg.__wbg_url_b36d2a5008eb056f = function(arg0, arg1) {
1299
+ const ret = arg1.url;
1300
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1301
+ const len1 = WASM_VECTOR_LEN;
1302
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1303
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1304
+ };
1305
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
1306
+ const ret = arg0.value;
1307
+ return ret;
1308
+ };
1309
+ imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1310
+ const ret = arg0.versions;
1311
+ return ret;
1312
+ };
1313
+ imports.wbg.__wbg_warn_a2d80c28bcdb1933 = function(arg0) {
1314
+ console.warn(...arg0);
1315
+ };
1316
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1317
+ // Cast intrinsic for `Ref(String) -> Externref`.
1318
+ const ret = getStringFromWasm0(arg0, arg1);
1319
+ return ret;
1320
+ };
1321
+ imports.wbg.__wbindgen_cast_3f672b6028f26d1d = function(arg0, arg1) {
1322
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 506, function: Function { arguments: [], shim_idx: 507, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1323
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h6d2901713d099ee2, wasm_bindgen__convert__closures_____invoke__hc1fc6e0e3b60f4a4);
1324
+ return ret;
1325
+ };
1326
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1327
+ // Cast intrinsic for `U64 -> Externref`.
1328
+ const ret = BigInt.asUintN(64, arg0);
1329
+ return ret;
1330
+ };
1331
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1332
+ // Cast intrinsic for `I64 -> Externref`.
1333
+ const ret = arg0;
1334
+ return ret;
1335
+ };
1336
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1337
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1338
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1339
+ return ret;
1340
+ };
1341
+ imports.wbg.__wbindgen_cast_d1dd07120553c180 = function(arg0, arg1) {
1342
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 552, function: Function { arguments: [Externref], shim_idx: 553, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1343
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf4c9146f86ff048f, wasm_bindgen__convert__closures_____invoke__h559bc6a3933a5765);
1344
+ return ret;
1345
+ };
1346
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1347
+ // Cast intrinsic for `F64 -> Externref`.
1348
+ const ret = arg0;
1349
+ return ret;
1350
+ };
1351
+ imports.wbg.__wbindgen_init_externref_table = function() {
1352
+ const table = wasm.__wbindgen_externrefs;
1353
+ const offset = table.grow(4);
1354
+ table.set(0, undefined);
1355
+ table.set(offset + 0, undefined);
1356
+ table.set(offset + 1, null);
1357
+ table.set(offset + 2, true);
1358
+ table.set(offset + 3, false);
1359
+ ;
1360
+ };
926
1361
 
927
- exports.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
928
- const ret = arg0[arg1];
929
- return ret;
930
- };
1362
+ return imports;
1363
+ }
931
1364
 
932
- exports.__wbg_has_b89e451f638123e3 = function() { return handleError(function (arg0, arg1) {
933
- const ret = Reflect.has(arg0, arg1);
934
- return ret;
935
- }, arguments) };
1365
+ function __wbg_finalize_init(instance, module) {
1366
+ wasm = instance.exports;
1367
+ __wbg_init.__wbindgen_wasm_module = module;
1368
+ cachedDataViewMemory0 = null;
1369
+ cachedUint8ArrayMemory0 = null;
936
1370
 
937
- exports.__wbg_headers_29fec3c72865cd75 = function(arg0) {
938
- const ret = arg0.headers;
939
- return ret;
940
- };
941
1371
 
942
- exports.__wbg_info_8fdedfc14c52e0d2 = function(arg0) {
943
- console.info(...arg0);
944
- };
1372
+ wasm.__wbindgen_start();
1373
+ return wasm;
1374
+ }
945
1375
 
946
- exports.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
947
- let result;
948
- try {
949
- result = arg0 instanceof ArrayBuffer;
950
- } catch (_) {
951
- result = false;
952
- }
953
- const ret = result;
954
- return ret;
955
- };
1376
+ function initSync(module) {
1377
+ if (wasm !== undefined) return wasm;
956
1378
 
957
- exports.__wbg_instanceof_Array_0b7383f4189e69c2 = function(arg0) {
958
- let result;
959
- try {
960
- result = arg0 instanceof Array;
961
- } catch (_) {
962
- result = false;
963
- }
964
- const ret = result;
965
- return ret;
966
- };
967
1379
 
968
- exports.__wbg_instanceof_Map_ebb01a5b6b5ffd0b = function(arg0) {
969
- let result;
970
- try {
971
- result = arg0 instanceof Map;
972
- } catch (_) {
973
- result = false;
1380
+ if (typeof module !== 'undefined') {
1381
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1382
+ ({module} = module)
1383
+ } else {
1384
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1385
+ }
974
1386
  }
975
- const ret = result;
976
- return ret;
977
- };
978
1387
 
979
- exports.__wbg_instanceof_Response_50fde2cd696850bf = function(arg0) {
980
- let result;
981
- try {
982
- result = arg0 instanceof Response;
983
- } catch (_) {
984
- result = false;
985
- }
986
- const ret = result;
987
- return ret;
988
- };
1388
+ const imports = __wbg_get_imports();
989
1389
 
990
- exports.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
991
- let result;
992
- try {
993
- result = arg0 instanceof Uint8Array;
994
- } catch (_) {
995
- result = false;
1390
+ if (!(module instanceof WebAssembly.Module)) {
1391
+ module = new WebAssembly.Module(module);
996
1392
  }
997
- const ret = result;
998
- return ret;
999
- };
1000
1393
 
1001
- exports.__wbg_isArray_030cce220591fb41 = function(arg0) {
1002
- const ret = Array.isArray(arg0);
1003
- return ret;
1004
- };
1394
+ const instance = new WebAssembly.Instance(module, imports);
1005
1395
 
1006
- exports.__wbg_isSafeInteger_1c0d1af5542e102a = function(arg0) {
1007
- const ret = Number.isSafeInteger(arg0);
1008
- return ret;
1009
- };
1010
-
1011
- exports.__wbg_iterator_f370b34483c71a1c = function() {
1012
- const ret = Symbol.iterator;
1013
- return ret;
1014
- };
1015
-
1016
- exports.__wbg_keys_ef52390b2ae0e714 = function(arg0) {
1017
- const ret = Object.keys(arg0);
1018
- return ret;
1019
- };
1020
-
1021
- exports.__wbg_length_186546c51cd61acd = function(arg0) {
1022
- const ret = arg0.length;
1023
- return ret;
1024
- };
1025
-
1026
- exports.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
1027
- const ret = arg0.length;
1028
- return ret;
1029
- };
1030
-
1031
- exports.__wbg_log_77195989eb27ffe5 = function(arg0) {
1032
- console.log(...arg0);
1033
- };
1034
-
1035
- exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1036
- const ret = arg0.msCrypto;
1037
- return ret;
1038
- };
1039
-
1040
- exports.__wbg_new0_b0a0a38c201e6df5 = function() {
1041
- const ret = new Date();
1042
- return ret;
1043
- };
1396
+ return __wbg_finalize_init(instance, module);
1397
+ }
1044
1398
 
1045
- exports.__wbg_new_19c25a3f2fa63a02 = function() {
1046
- const ret = new Object();
1047
- return ret;
1048
- };
1399
+ async function __wbg_init(module_or_path) {
1400
+ if (wasm !== undefined) return wasm;
1049
1401
 
1050
- exports.__wbg_new_1f3a344cf3123716 = function() {
1051
- const ret = new Array();
1052
- return ret;
1053
- };
1054
1402
 
1055
- exports.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
1056
- try {
1057
- var state0 = {a: arg0, b: arg1};
1058
- var cb0 = (arg0, arg1) => {
1059
- const a = state0.a;
1060
- state0.a = 0;
1061
- try {
1062
- return __wbg_adapter_214(a, state0.b, arg0, arg1);
1063
- } finally {
1064
- state0.a = a;
1065
- }
1066
- };
1067
- const ret = new Promise(cb0);
1068
- return ret;
1069
- } finally {
1070
- state0.a = state0.b = 0;
1403
+ if (typeof module_or_path !== 'undefined') {
1404
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1405
+ ({module_or_path} = module_or_path)
1406
+ } else {
1407
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1408
+ }
1071
1409
  }
1072
- };
1073
-
1074
- exports.__wbg_new_2ff1f68f3676ea53 = function() {
1075
- const ret = new Map();
1076
- return ret;
1077
- };
1078
-
1079
- exports.__wbg_new_5a2ae4557f92b50e = function(arg0) {
1080
- const ret = new Date(arg0);
1081
- return ret;
1082
- };
1083
-
1084
- exports.__wbg_new_638ebfaedbf32a5e = function(arg0) {
1085
- const ret = new Uint8Array(arg0);
1086
- return ret;
1087
- };
1088
-
1089
- exports.__wbg_new_66b9434b4e59b63e = function() { return handleError(function () {
1090
- const ret = new AbortController();
1091
- return ret;
1092
- }, arguments) };
1093
-
1094
- exports.__wbg_new_f6e53210afea8e45 = function() { return handleError(function () {
1095
- const ret = new Headers();
1096
- return ret;
1097
- }, arguments) };
1098
-
1099
- exports.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
1100
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1101
- return ret;
1102
- };
1103
-
1104
- exports.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
1105
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1106
- return ret;
1107
- };
1108
-
1109
- exports.__wbg_newwithargs_b8065bb443501079 = function(arg0, arg1, arg2, arg3) {
1110
- const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1111
- return ret;
1112
- };
1113
-
1114
- exports.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
1115
- const ret = new Uint8Array(arg0 >>> 0);
1116
- return ret;
1117
- };
1118
-
1119
- exports.__wbg_newwithstrandinit_b5d168a29a3fd85f = function() { return handleError(function (arg0, arg1, arg2) {
1120
- const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1121
- return ret;
1122
- }, arguments) };
1123
-
1124
- exports.__wbg_next_5b3530e612fde77d = function(arg0) {
1125
- const ret = arg0.next;
1126
- return ret;
1127
- };
1128
-
1129
- exports.__wbg_next_692e82279131b03c = function() { return handleError(function (arg0) {
1130
- const ret = arg0.next();
1131
- return ret;
1132
- }, arguments) };
1133
-
1134
- exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
1135
- const ret = arg0.node;
1136
- return ret;
1137
- };
1138
-
1139
- exports.__wbg_policyevaluationerror_new = function(arg0) {
1140
- const ret = PolicyEvaluationError.__wrap(arg0);
1141
- return ret;
1142
- };
1143
-
1144
- exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1145
- const ret = arg0.process;
1146
- return ret;
1147
- };
1148
-
1149
- exports.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
1150
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1151
- };
1152
-
1153
- exports.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
1154
- const ret = arg0.push(arg1);
1155
- return ret;
1156
- };
1157
-
1158
- exports.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
1159
- queueMicrotask(arg0);
1160
- };
1161
-
1162
- exports.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
1163
- const ret = arg0.queueMicrotask;
1164
- return ret;
1165
- };
1166
-
1167
- exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1168
- arg0.randomFillSync(arg1);
1169
- }, arguments) };
1170
-
1171
- exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1172
- const ret = module.require;
1173
- return ret;
1174
- }, arguments) };
1175
-
1176
- exports.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
1177
- const ret = Promise.resolve(arg0);
1178
- return ret;
1179
- };
1180
-
1181
- exports.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
1182
- const ret = setTimeout(arg0, arg1);
1183
- return ret;
1184
- };
1185
-
1186
- exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1187
- arg0[arg1] = arg2;
1188
- };
1189
-
1190
- exports.__wbg_set_453345bcda80b89a = function() { return handleError(function (arg0, arg1, arg2) {
1191
- const ret = Reflect.set(arg0, arg1, arg2);
1192
- return ret;
1193
- }, arguments) };
1194
-
1195
- exports.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
1196
- arg0[arg1 >>> 0] = arg2;
1197
- };
1198
-
1199
- exports.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
1200
- const ret = arg0.set(arg1, arg2);
1201
- return ret;
1202
- };
1203
-
1204
- exports.__wbg_setbody_c8460bdf44147df8 = function(arg0, arg1) {
1205
- arg0.body = arg1;
1206
- };
1207
-
1208
- exports.__wbg_setcache_90ca4ad8a8ad40d3 = function(arg0, arg1) {
1209
- arg0.cache = __wbindgen_enum_RequestCache[arg1];
1210
- };
1211
-
1212
- exports.__wbg_setcredentials_9cd60d632c9d5dfc = function(arg0, arg1) {
1213
- arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1214
- };
1215
-
1216
- exports.__wbg_setheaders_0052283e2f3503d1 = function(arg0, arg1) {
1217
- arg0.headers = arg1;
1218
- };
1219
-
1220
- exports.__wbg_setmethod_9b504d5b855b329c = function(arg0, arg1, arg2) {
1221
- arg0.method = getStringFromWasm0(arg1, arg2);
1222
- };
1223
-
1224
- exports.__wbg_setmode_a23e1a2ad8b512f8 = function(arg0, arg1) {
1225
- arg0.mode = __wbindgen_enum_RequestMode[arg1];
1226
- };
1227
-
1228
- exports.__wbg_setsignal_8c45ad1247a74809 = function(arg0, arg1) {
1229
- arg0.signal = arg1;
1230
- };
1231
-
1232
- exports.__wbg_signal_da4d466ce86118b5 = function(arg0) {
1233
- const ret = arg0.signal;
1234
- return ret;
1235
- };
1236
-
1237
- exports.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
1238
- const ret = typeof global === 'undefined' ? null : global;
1239
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1240
- };
1241
-
1242
- exports.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
1243
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1244
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1245
- };
1246
-
1247
- exports.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
1248
- const ret = typeof self === 'undefined' ? null : self;
1249
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1250
- };
1251
-
1252
- exports.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
1253
- const ret = typeof window === 'undefined' ? null : window;
1254
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1255
- };
1256
-
1257
- exports.__wbg_status_3fea3036088621d6 = function(arg0) {
1258
- const ret = arg0.status;
1259
- return ret;
1260
- };
1261
1410
 
1262
- exports.__wbg_stringify_b98c93d0a190446a = function() { return handleError(function (arg0) {
1263
- const ret = JSON.stringify(arg0);
1264
- return ret;
1265
- }, arguments) };
1266
-
1267
- exports.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
1268
- const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1269
- return ret;
1270
- };
1271
-
1272
- exports.__wbg_text_0f69a215637b9b34 = function() { return handleError(function (arg0) {
1273
- const ret = arg0.text();
1274
- return ret;
1275
- }, arguments) };
1276
-
1277
- exports.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
1278
- const ret = arg0.then(arg1, arg2);
1279
- return ret;
1280
- };
1281
-
1282
- exports.__wbg_then_e22500defe16819f = function(arg0, arg1) {
1283
- const ret = arg0.then(arg1);
1284
- return ret;
1285
- };
1286
-
1287
- exports.__wbg_trace_fe562a020dec3e6f = function(arg0) {
1288
- console.trace(...arg0);
1289
- };
1290
-
1291
- exports.__wbg_url_e5720dfacf77b05e = function(arg0, arg1) {
1292
- const ret = arg1.url;
1293
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1294
- const len1 = WASM_VECTOR_LEN;
1295
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1296
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1297
- };
1298
-
1299
- exports.__wbg_value_dd9372230531eade = function(arg0) {
1300
- const ret = arg0.value;
1301
- return ret;
1302
- };
1303
-
1304
- exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1305
- const ret = arg0.versions;
1306
- return ret;
1307
- };
1308
-
1309
- exports.__wbg_warn_3e0e93af109bb736 = function(arg0) {
1310
- console.warn(...arg0);
1311
- };
1312
-
1313
- exports.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1 = function(arg0, arg1) {
1314
- const v = arg1;
1315
- const ret = typeof(v) === 'bigint' ? v : undefined;
1316
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1317
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1318
- };
1319
-
1320
- exports.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
1321
- const v = arg0;
1322
- const ret = typeof(v) === 'boolean' ? v : undefined;
1323
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1324
- };
1325
-
1326
- exports.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
1327
- const obj = arg0.original;
1328
- if (obj.cnt-- == 1) {
1329
- obj.a = 0;
1330
- return true;
1331
- }
1332
- const ret = false;
1333
- return ret;
1334
- };
1335
-
1336
- exports.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
1337
- const ret = debugString(arg1);
1338
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1339
- const len1 = WASM_VECTOR_LEN;
1340
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1341
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1342
- };
1343
-
1344
- exports.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
1345
- const ret = arg0 in arg1;
1346
- return ret;
1347
- };
1348
-
1349
- exports.__wbg_wbindgenisbigint_ecb90cc08a5a9154 = function(arg0) {
1350
- const ret = typeof(arg0) === 'bigint';
1351
- return ret;
1352
- };
1353
-
1354
- exports.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
1355
- const ret = typeof(arg0) === 'function';
1356
- return ret;
1357
- };
1358
-
1359
- exports.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
1360
- const val = arg0;
1361
- const ret = typeof(val) === 'object' && val !== null;
1362
- return ret;
1363
- };
1364
-
1365
- exports.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
1366
- const ret = typeof(arg0) === 'string';
1367
- return ret;
1368
- };
1369
-
1370
- exports.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
1371
- const ret = arg0 === undefined;
1372
- return ret;
1373
- };
1374
-
1375
- exports.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58 = function(arg0, arg1) {
1376
- const ret = arg0 === arg1;
1377
- return ret;
1378
- };
1379
-
1380
- exports.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
1381
- const ret = arg0 == arg1;
1382
- return ret;
1383
- };
1384
-
1385
- exports.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
1386
- const obj = arg1;
1387
- const ret = typeof(obj) === 'number' ? obj : undefined;
1388
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1389
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1390
- };
1391
-
1392
- exports.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
1393
- const obj = arg1;
1394
- const ret = typeof(obj) === 'string' ? obj : undefined;
1395
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1396
- var len1 = WASM_VECTOR_LEN;
1397
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1398
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1399
- };
1400
-
1401
- exports.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
1402
- throw new Error(getStringFromWasm0(arg0, arg1));
1403
- };
1404
-
1405
- exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1406
- // Cast intrinsic for `Ref(String) -> Externref`.
1407
- const ret = getStringFromWasm0(arg0, arg1);
1408
- return ret;
1409
- };
1410
-
1411
- exports.__wbindgen_cast_3f672b6028f26d1d = function(arg0, arg1) {
1412
- // Cast intrinsic for `Closure(Closure { dtor_idx: 506, function: Function { arguments: [], shim_idx: 507, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1413
- const ret = makeMutClosure(arg0, arg1, 506, __wbg_adapter_9);
1414
- return ret;
1415
- };
1416
-
1417
- exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1418
- // Cast intrinsic for `U64 -> Externref`.
1419
- const ret = BigInt.asUintN(64, arg0);
1420
- return ret;
1421
- };
1422
-
1423
- exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1424
- // Cast intrinsic for `I64 -> Externref`.
1425
- const ret = arg0;
1426
- return ret;
1427
- };
1411
+ if (typeof module_or_path === 'undefined') {
1412
+ module_or_path = new URL('cedarling_wasm_bg.wasm', import.meta.url);
1413
+ }
1414
+ const imports = __wbg_get_imports();
1428
1415
 
1429
- exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1430
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1431
- const ret = getArrayU8FromWasm0(arg0, arg1);
1432
- return ret;
1433
- };
1416
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1417
+ module_or_path = fetch(module_or_path);
1418
+ }
1434
1419
 
1435
- exports.__wbindgen_cast_d1dd07120553c180 = function(arg0, arg1) {
1436
- // Cast intrinsic for `Closure(Closure { dtor_idx: 552, function: Function { arguments: [Externref], shim_idx: 553, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1437
- const ret = makeMutClosure(arg0, arg1, 552, __wbg_adapter_6);
1438
- return ret;
1439
- };
1420
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1440
1421
 
1441
- exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1442
- // Cast intrinsic for `F64 -> Externref`.
1443
- const ret = arg0;
1444
- return ret;
1445
- };
1446
-
1447
- exports.__wbindgen_init_externref_table = function() {
1448
- const table = wasm.__wbindgen_export_4;
1449
- const offset = table.grow(4);
1450
- table.set(0, undefined);
1451
- table.set(offset + 0, undefined);
1452
- table.set(offset + 1, null);
1453
- table.set(offset + 2, true);
1454
- table.set(offset + 3, false);
1455
- ;
1456
- };
1457
-
1458
- const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
1459
- const wasmBytes = require('fs').readFileSync(wasmPath);
1460
- const wasmModule = new WebAssembly.Module(wasmBytes);
1461
- const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
1462
-
1463
- wasm.__wbindgen_start();
1422
+ return __wbg_finalize_init(instance, module);
1423
+ }
1464
1424
 
1425
+ export { initSync };
1426
+ export default __wbg_init;