@janssenproject/cedarling_wasm 0.0.467-nodejs → 0.0.468

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3159 @@
1
+ import __cedarlingWasmBytes from "../wasm/cedarling_wasm_bg.wasm?url" with { type: "bytes" };
2
+
3
+ // cedarling-generated-glue:/home/runner/work/jans/jans/jans-cedarling/bindings/cedarling_wasm/pkg/cedarling_wasm.js
4
+ var AuthorizeResult = class _AuthorizeResult {
5
+ static __wrap(ptr) {
6
+ const obj = Object.create(_AuthorizeResult.prototype);
7
+ obj.__wbg_ptr = ptr;
8
+ AuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
9
+ return obj;
10
+ }
11
+ __destroy_into_raw() {
12
+ const ptr = this.__wbg_ptr;
13
+ this.__wbg_ptr = 0;
14
+ AuthorizeResultFinalization.unregister(this);
15
+ return ptr;
16
+ }
17
+ free() {
18
+ const ptr = this.__destroy_into_raw();
19
+ wasm.__wbg_authorizeresult_free(ptr, 0);
20
+ }
21
+ /**
22
+ * Convert `AuthorizeResult` to json string value
23
+ * @returns {string}
24
+ */
25
+ jsonString() {
26
+ let deferred1_0;
27
+ let deferred1_1;
28
+ try {
29
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
30
+ wasm.authorizeresult_jsonString(retptr, this.__wbg_ptr);
31
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
32
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
33
+ deferred1_0 = r0;
34
+ deferred1_1 = r1;
35
+ return getStringFromWasm0(r0, r1);
36
+ } finally {
37
+ wasm.__wbindgen_add_to_stack_pointer(16);
38
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
39
+ }
40
+ }
41
+ /**
42
+ * Result of authorization
43
+ * true means `ALLOW`
44
+ * false means `Deny`
45
+ *
46
+ * this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
47
+ * @returns {boolean}
48
+ */
49
+ get decision() {
50
+ const ret = wasm.__wbg_get_authorizeresult_decision(this.__wbg_ptr);
51
+ return ret !== 0;
52
+ }
53
+ /**
54
+ * Request ID of the authorization request
55
+ * @returns {string}
56
+ */
57
+ get request_id() {
58
+ let deferred1_0;
59
+ let deferred1_1;
60
+ try {
61
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
62
+ wasm.__wbg_get_authorizeresult_request_id(retptr, this.__wbg_ptr);
63
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
64
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
65
+ deferred1_0 = r0;
66
+ deferred1_1 = r1;
67
+ return getStringFromWasm0(r0, r1);
68
+ } finally {
69
+ wasm.__wbindgen_add_to_stack_pointer(16);
70
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
71
+ }
72
+ }
73
+ /**
74
+ * Cedar authorization response for the request.
75
+ * @returns {AuthorizeResultResponse}
76
+ */
77
+ get response() {
78
+ const ret = wasm.__wbg_get_authorizeresult_response(this.__wbg_ptr);
79
+ return AuthorizeResultResponse.__wrap(ret);
80
+ }
81
+ /**
82
+ * Result of authorization
83
+ * true means `ALLOW`
84
+ * false means `Deny`
85
+ *
86
+ * this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
87
+ * @param {boolean} arg0
88
+ */
89
+ set decision(arg0) {
90
+ wasm.__wbg_set_authorizeresult_decision(this.__wbg_ptr, arg0);
91
+ }
92
+ /**
93
+ * Request ID of the authorization request
94
+ * @param {string} arg0
95
+ */
96
+ set request_id(arg0) {
97
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
98
+ const len0 = WASM_VECTOR_LEN;
99
+ wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
100
+ }
101
+ /**
102
+ * Cedar authorization response for the request.
103
+ * @param {AuthorizeResultResponse} arg0
104
+ */
105
+ set response(arg0) {
106
+ _assertClass(arg0, AuthorizeResultResponse);
107
+ var ptr0 = arg0.__destroy_into_raw();
108
+ wasm.__wbg_set_authorizeresult_response(this.__wbg_ptr, ptr0);
109
+ }
110
+ };
111
+ if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
112
+ var AuthorizeResultResponse = class _AuthorizeResultResponse {
113
+ static __wrap(ptr) {
114
+ const obj = Object.create(_AuthorizeResultResponse.prototype);
115
+ obj.__wbg_ptr = ptr;
116
+ AuthorizeResultResponseFinalization.register(obj, obj.__wbg_ptr, obj);
117
+ return obj;
118
+ }
119
+ __destroy_into_raw() {
120
+ const ptr = this.__wbg_ptr;
121
+ this.__wbg_ptr = 0;
122
+ AuthorizeResultResponseFinalization.unregister(this);
123
+ return ptr;
124
+ }
125
+ free() {
126
+ const ptr = this.__destroy_into_raw();
127
+ wasm.__wbg_authorizeresultresponse_free(ptr, 0);
128
+ }
129
+ /**
130
+ * Authorization decision
131
+ * @returns {boolean}
132
+ */
133
+ get decision() {
134
+ const ret = wasm.authorizeresultresponse_decision(this.__wbg_ptr);
135
+ return ret !== 0;
136
+ }
137
+ /**
138
+ * Diagnostics providing more information on how this decision was reached
139
+ * @returns {Diagnostics}
140
+ */
141
+ get diagnostics() {
142
+ const ret = wasm.authorizeresultresponse_diagnostics(this.__wbg_ptr);
143
+ return Diagnostics.__wrap(ret);
144
+ }
145
+ };
146
+ if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
147
+ var BatchAuthorizeMultiIssuerResponse = class _BatchAuthorizeMultiIssuerResponse {
148
+ static __wrap(ptr) {
149
+ const obj = Object.create(_BatchAuthorizeMultiIssuerResponse.prototype);
150
+ obj.__wbg_ptr = ptr;
151
+ BatchAuthorizeMultiIssuerResponseFinalization.register(obj, obj.__wbg_ptr, obj);
152
+ return obj;
153
+ }
154
+ __destroy_into_raw() {
155
+ const ptr = this.__wbg_ptr;
156
+ this.__wbg_ptr = 0;
157
+ BatchAuthorizeMultiIssuerResponseFinalization.unregister(this);
158
+ return ptr;
159
+ }
160
+ free() {
161
+ const ptr = this.__destroy_into_raw();
162
+ wasm.__wbg_batchauthorizemultiissuerresponse_free(ptr, 0);
163
+ }
164
+ /**
165
+ * Shared correlation id stamped on every per-item decision log entry.
166
+ * @returns {string}
167
+ */
168
+ get batch_id() {
169
+ let deferred1_0;
170
+ let deferred1_1;
171
+ try {
172
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
173
+ wasm.batchauthorizemultiissuerresponse_batch_id(retptr, this.__wbg_ptr);
174
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
175
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
176
+ deferred1_0 = r0;
177
+ deferred1_1 = r1;
178
+ return getStringFromWasm0(r0, r1);
179
+ } finally {
180
+ wasm.__wbindgen_add_to_stack_pointer(16);
181
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
182
+ }
183
+ }
184
+ /**
185
+ * Per-item results in input order — each slot is a
186
+ * [`BatchItemMultiIssuerResult`].
187
+ * @returns {BatchItemMultiIssuerResult[]}
188
+ */
189
+ get results() {
190
+ try {
191
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
192
+ wasm.batchauthorizemultiissuerresponse_results(retptr, this.__wbg_ptr);
193
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
194
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
195
+ var v1 = getArrayJsValueFromWasm0(r0, r1);
196
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
197
+ return v1;
198
+ } finally {
199
+ wasm.__wbindgen_add_to_stack_pointer(16);
200
+ }
201
+ }
202
+ };
203
+ if (Symbol.dispose) BatchAuthorizeMultiIssuerResponse.prototype[Symbol.dispose] = BatchAuthorizeMultiIssuerResponse.prototype.free;
204
+ var BatchAuthorizeUnsignedResponse = class _BatchAuthorizeUnsignedResponse {
205
+ static __wrap(ptr) {
206
+ const obj = Object.create(_BatchAuthorizeUnsignedResponse.prototype);
207
+ obj.__wbg_ptr = ptr;
208
+ BatchAuthorizeUnsignedResponseFinalization.register(obj, obj.__wbg_ptr, obj);
209
+ return obj;
210
+ }
211
+ __destroy_into_raw() {
212
+ const ptr = this.__wbg_ptr;
213
+ this.__wbg_ptr = 0;
214
+ BatchAuthorizeUnsignedResponseFinalization.unregister(this);
215
+ return ptr;
216
+ }
217
+ free() {
218
+ const ptr = this.__destroy_into_raw();
219
+ wasm.__wbg_batchauthorizeunsignedresponse_free(ptr, 0);
220
+ }
221
+ /**
222
+ * Shared correlation id stamped on every per-item decision log entry.
223
+ * @returns {string}
224
+ */
225
+ get batch_id() {
226
+ let deferred1_0;
227
+ let deferred1_1;
228
+ try {
229
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
230
+ wasm.batchauthorizeunsignedresponse_batch_id(retptr, this.__wbg_ptr);
231
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
232
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
233
+ deferred1_0 = r0;
234
+ deferred1_1 = r1;
235
+ return getStringFromWasm0(r0, r1);
236
+ } finally {
237
+ wasm.__wbindgen_add_to_stack_pointer(16);
238
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
239
+ }
240
+ }
241
+ /**
242
+ * Per-item results in input order — each slot is a
243
+ * [`BatchItemUnsignedResult`].
244
+ * @returns {BatchItemUnsignedResult[]}
245
+ */
246
+ get results() {
247
+ try {
248
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
249
+ wasm.batchauthorizeunsignedresponse_results(retptr, this.__wbg_ptr);
250
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
251
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
252
+ var v1 = getArrayJsValueFromWasm0(r0, r1);
253
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
254
+ return v1;
255
+ } finally {
256
+ wasm.__wbindgen_add_to_stack_pointer(16);
257
+ }
258
+ }
259
+ };
260
+ if (Symbol.dispose) BatchAuthorizeUnsignedResponse.prototype[Symbol.dispose] = BatchAuthorizeUnsignedResponse.prototype.free;
261
+ var BatchItemError = class _BatchItemError {
262
+ static __wrap(ptr) {
263
+ const obj = Object.create(_BatchItemError.prototype);
264
+ obj.__wbg_ptr = ptr;
265
+ BatchItemErrorFinalization.register(obj, obj.__wbg_ptr, obj);
266
+ return obj;
267
+ }
268
+ __destroy_into_raw() {
269
+ const ptr = this.__wbg_ptr;
270
+ this.__wbg_ptr = 0;
271
+ BatchItemErrorFinalization.unregister(this);
272
+ return ptr;
273
+ }
274
+ free() {
275
+ const ptr = this.__destroy_into_raw();
276
+ wasm.__wbg_batchitemerror_free(ptr, 0);
277
+ }
278
+ /**
279
+ * Stable variant slug — `action_parse`, `resource_build`, `context_build`,
280
+ * `principal_build`, `schema_validation`, `multi_issuer_entity`,
281
+ * `request_validation`.
282
+ * @returns {string}
283
+ */
284
+ get category() {
285
+ let deferred1_0;
286
+ let deferred1_1;
287
+ try {
288
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
289
+ wasm.batchitemerror_category(retptr, this.__wbg_ptr);
290
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
291
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
292
+ deferred1_0 = r0;
293
+ deferred1_1 = r1;
294
+ return getStringFromWasm0(r0, r1);
295
+ } finally {
296
+ wasm.__wbindgen_add_to_stack_pointer(16);
297
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
298
+ }
299
+ }
300
+ /**
301
+ * Position of the failing item in the original `items` vector.
302
+ * @returns {number}
303
+ */
304
+ get item_index() {
305
+ const ret = wasm.batchitemerror_item_index(this.__wbg_ptr);
306
+ return ret >>> 0;
307
+ }
308
+ /**
309
+ * Human-readable diagnostic. Safe to log.
310
+ * @returns {string}
311
+ */
312
+ get message() {
313
+ let deferred1_0;
314
+ let deferred1_1;
315
+ try {
316
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
317
+ wasm.batchitemerror_message(retptr, this.__wbg_ptr);
318
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
319
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
320
+ deferred1_0 = r0;
321
+ deferred1_1 = r1;
322
+ return getStringFromWasm0(r0, r1);
323
+ } finally {
324
+ wasm.__wbindgen_add_to_stack_pointer(16);
325
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
326
+ }
327
+ }
328
+ };
329
+ if (Symbol.dispose) BatchItemError.prototype[Symbol.dispose] = BatchItemError.prototype.free;
330
+ var BatchItemMultiIssuerResult = class _BatchItemMultiIssuerResult {
331
+ static __wrap(ptr) {
332
+ const obj = Object.create(_BatchItemMultiIssuerResult.prototype);
333
+ obj.__wbg_ptr = ptr;
334
+ BatchItemMultiIssuerResultFinalization.register(obj, obj.__wbg_ptr, obj);
335
+ return obj;
336
+ }
337
+ __destroy_into_raw() {
338
+ const ptr = this.__wbg_ptr;
339
+ this.__wbg_ptr = 0;
340
+ BatchItemMultiIssuerResultFinalization.unregister(this);
341
+ return ptr;
342
+ }
343
+ free() {
344
+ const ptr = this.__destroy_into_raw();
345
+ wasm.__wbg_batchitemmultiissuerresult_free(ptr, 0);
346
+ }
347
+ /**
348
+ * The per-item error if `!is_ok()`; `undefined` otherwise.
349
+ * @returns {BatchItemError | undefined}
350
+ */
351
+ get error() {
352
+ const ret = wasm.batchitemmultiissuerresult_error(this.__wbg_ptr);
353
+ return ret === 0 ? void 0 : BatchItemError.__wrap(ret);
354
+ }
355
+ /**
356
+ * `true` when Cedar evaluated this item.
357
+ * @returns {boolean}
358
+ */
359
+ get is_ok() {
360
+ const ret = wasm.batchitemmultiissuerresult_is_ok(this.__wbg_ptr);
361
+ return ret !== 0;
362
+ }
363
+ /**
364
+ * The multi-issuer decision if `is_ok()`; throws otherwise.
365
+ * @returns {MultiIssuerAuthorizeResult}
366
+ */
367
+ unwrap() {
368
+ try {
369
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
370
+ wasm.batchitemmultiissuerresult_unwrap(retptr, this.__wbg_ptr);
371
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
372
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
373
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
374
+ if (r2) {
375
+ throw takeObject(r1);
376
+ }
377
+ return MultiIssuerAuthorizeResult.__wrap(r0);
378
+ } finally {
379
+ wasm.__wbindgen_add_to_stack_pointer(16);
380
+ }
381
+ }
382
+ };
383
+ if (Symbol.dispose) BatchItemMultiIssuerResult.prototype[Symbol.dispose] = BatchItemMultiIssuerResult.prototype.free;
384
+ var BatchItemUnsignedResult = class _BatchItemUnsignedResult {
385
+ static __wrap(ptr) {
386
+ const obj = Object.create(_BatchItemUnsignedResult.prototype);
387
+ obj.__wbg_ptr = ptr;
388
+ BatchItemUnsignedResultFinalization.register(obj, obj.__wbg_ptr, obj);
389
+ return obj;
390
+ }
391
+ __destroy_into_raw() {
392
+ const ptr = this.__wbg_ptr;
393
+ this.__wbg_ptr = 0;
394
+ BatchItemUnsignedResultFinalization.unregister(this);
395
+ return ptr;
396
+ }
397
+ free() {
398
+ const ptr = this.__destroy_into_raw();
399
+ wasm.__wbg_batchitemunsignedresult_free(ptr, 0);
400
+ }
401
+ /**
402
+ * The per-item error if `!is_ok()`; `undefined` otherwise.
403
+ * @returns {BatchItemError | undefined}
404
+ */
405
+ get error() {
406
+ const ret = wasm.batchitemunsignedresult_error(this.__wbg_ptr);
407
+ return ret === 0 ? void 0 : BatchItemError.__wrap(ret);
408
+ }
409
+ /**
410
+ * `true` when Cedar evaluated this item (Allow or Deny); `false` when it
411
+ * failed to build.
412
+ * @returns {boolean}
413
+ */
414
+ get is_ok() {
415
+ const ret = wasm.batchitemunsignedresult_is_ok(this.__wbg_ptr);
416
+ return ret !== 0;
417
+ }
418
+ /**
419
+ * The Cedar decision if `is_ok()`; throws otherwise.
420
+ * @returns {AuthorizeResult}
421
+ */
422
+ unwrap() {
423
+ try {
424
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
425
+ wasm.batchitemunsignedresult_unwrap(retptr, this.__wbg_ptr);
426
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
427
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
428
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
429
+ if (r2) {
430
+ throw takeObject(r1);
431
+ }
432
+ return AuthorizeResult.__wrap(r0);
433
+ } finally {
434
+ wasm.__wbindgen_add_to_stack_pointer(16);
435
+ }
436
+ }
437
+ };
438
+ if (Symbol.dispose) BatchItemUnsignedResult.prototype[Symbol.dispose] = BatchItemUnsignedResult.prototype.free;
439
+ var Cedarling = class _Cedarling {
440
+ static __wrap(ptr) {
441
+ const obj = Object.create(_Cedarling.prototype);
442
+ obj.__wbg_ptr = ptr;
443
+ CedarlingFinalization.register(obj, obj.__wbg_ptr, obj);
444
+ return obj;
445
+ }
446
+ __destroy_into_raw() {
447
+ const ptr = this.__wbg_ptr;
448
+ this.__wbg_ptr = 0;
449
+ CedarlingFinalization.unregister(this);
450
+ return ptr;
451
+ }
452
+ free() {
453
+ const ptr = this.__destroy_into_raw();
454
+ wasm.__wbg_cedarling_free(ptr, 0);
455
+ }
456
+ /**
457
+ * Collect every value of the annotation `key` across the given policies,
458
+ * preserving duplicates. Unknown policy IDs are silently skipped.
459
+ *
460
+ * # Arguments
461
+ *
462
+ * * `policy_ids` - List of policy IDs to search. Typically
463
+ * `result.response.diagnostics.reason` from an authorization result.
464
+ * * `key` - The annotation key to collect values for (e.g. `"redirect"`).
465
+ *
466
+ * # Example
467
+ *
468
+ * ```javascript
469
+ * const redirects = cedarling.annotationValues(
470
+ * result.response.diagnostics.reason,
471
+ * "redirect",
472
+ * );
473
+ * // ["/upgrade"]
474
+ * ```
475
+ * @param {string[]} policy_ids
476
+ * @param {string} key
477
+ * @returns {string[]}
478
+ */
479
+ annotationValues(policy_ids, key) {
480
+ try {
481
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
482
+ const ptr0 = passArrayJsValueToWasm0(policy_ids, wasm.__wbindgen_export);
483
+ const len0 = WASM_VECTOR_LEN;
484
+ const ptr1 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
485
+ const len1 = WASM_VECTOR_LEN;
486
+ wasm.cedarling_annotationValues(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
487
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
488
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
489
+ var v3 = getArrayJsValueFromWasm0(r0, r1);
490
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
491
+ return v3;
492
+ } finally {
493
+ wasm.__wbindgen_add_to_stack_pointer(16);
494
+ }
495
+ }
496
+ /**
497
+ * Return the annotations of each given policy, grouped by policy ID. It is
498
+ * the loss-free companion to `annotationsMap`. Unknown policy IDs are
499
+ * silently skipped.
500
+ *
501
+ * # Arguments
502
+ *
503
+ * * `policy_ids` - List of policy IDs whose annotations should be returned
504
+ * grouped by policy ID. Typically `result.response.diagnostics.reason` from
505
+ * an authorization result.
506
+ *
507
+ * # Example
508
+ *
509
+ * ```javascript
510
+ * const byPolicy = cedarling.annotationsByPolicy(result.response.diagnostics.reason);
511
+ * // { "5": { redirect: "/upgrade", tier: "premium" } }
512
+ * ```
513
+ * @param {string[]} policy_ids
514
+ * @returns {any}
515
+ */
516
+ annotationsByPolicy(policy_ids) {
517
+ try {
518
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
519
+ const ptr0 = passArrayJsValueToWasm0(policy_ids, wasm.__wbindgen_export);
520
+ const len0 = WASM_VECTOR_LEN;
521
+ wasm.cedarling_annotationsByPolicy(retptr, this.__wbg_ptr, ptr0, len0);
522
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
523
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
524
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
525
+ if (r2) {
526
+ throw takeObject(r1);
527
+ }
528
+ return takeObject(r0);
529
+ } finally {
530
+ wasm.__wbindgen_add_to_stack_pointer(16);
531
+ }
532
+ }
533
+ /**
534
+ * Merge the annotations (`@key("value")`) of the given policies into a single object.
535
+ *
536
+ * Intended for resolving the determining policies of an authorization decision:
537
+ * pass `result.response.diagnostics.reason`.
538
+ *
539
+ * Lossy: if the same annotation key appears on several policies, one value wins
540
+ * arbitrarily. Use `annotationValues` / `annotationsByPolicy` when duplicates
541
+ * matter. Unknown policy IDs are silently skipped.
542
+ *
543
+ * # Arguments
544
+ *
545
+ * * `policy_ids` - List of policy IDs whose annotations should be merged into
546
+ * a single object. Typically `result.response.diagnostics.reason` from an
547
+ * authorization result.
548
+ *
549
+ * # Example
550
+ *
551
+ * ```javascript
552
+ * const annotations = cedarling.annotationsMap(result.response.diagnostics.reason);
553
+ * // { redirect: "/upgrade", tier: "premium" }
554
+ * ```
555
+ * @param {string[]} policy_ids
556
+ * @returns {any}
557
+ */
558
+ annotationsMap(policy_ids) {
559
+ try {
560
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
561
+ const ptr0 = passArrayJsValueToWasm0(policy_ids, wasm.__wbindgen_export);
562
+ const len0 = WASM_VECTOR_LEN;
563
+ wasm.cedarling_annotationsMap(retptr, this.__wbg_ptr, ptr0, len0);
564
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
565
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
566
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
567
+ if (r2) {
568
+ throw takeObject(r1);
569
+ }
570
+ return takeObject(r0);
571
+ } finally {
572
+ wasm.__wbindgen_add_to_stack_pointer(16);
573
+ }
574
+ }
575
+ /**
576
+ * Authorize a batch of multi-issuer requests against one shared token set.
577
+ *
578
+ * Tokens are validated and token/issuer entities are built once, then
579
+ * each item is evaluated in input order. Batch-level failures (validation,
580
+ * JWT verification, status-list refresh) reject the whole call; per-item
581
+ * failures are returned as `BatchItemError` results and exposed by WASM
582
+ * with `is_ok=false` and `error`, while genuine Cedar denials remain
583
+ * `AuthorizeResult` values with `decision=false`.
584
+ *
585
+ * # Arguments
586
+ *
587
+ * * `request` - JSON string representation of [`BatchAuthorizeMultiIssuerRequest`].
588
+ *
589
+ * # Example
590
+ *
591
+ * ```javascript
592
+ * const result = await cedarling.authorizeMultiIssuerBatch(JSON.stringify(batchRequest));
593
+ * ```
594
+ * @param {string} request
595
+ * @returns {Promise<BatchAuthorizeMultiIssuerResponse>}
596
+ */
597
+ authorizeMultiIssuerBatch(request) {
598
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
599
+ const len0 = WASM_VECTOR_LEN;
600
+ const ret = wasm.cedarling_authorizeMultiIssuerBatch(this.__wbg_ptr, ptr0, len0);
601
+ return takeObject(ret);
602
+ }
603
+ /**
604
+ * Authorize multi-issuer request.
605
+ * Makes authorization decision based on multiple JWT tokens from different issuers.
606
+ *
607
+ * # Arguments
608
+ *
609
+ * * `request` - JSON string representation of [`AuthorizeMultiIssuerRequest`].
610
+ *
611
+ * # Example
612
+ *
613
+ * ```javascript
614
+ * const result = await cedarling.authorizeMultiIssuer(JSON.stringify(request));
615
+ * ```
616
+ * @param {string} request
617
+ * @returns {Promise<MultiIssuerAuthorizeResult>}
618
+ */
619
+ authorizeMultiIssuer(request) {
620
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
621
+ const len0 = WASM_VECTOR_LEN;
622
+ const ret = wasm.cedarling_authorizeMultiIssuer(this.__wbg_ptr, ptr0, len0);
623
+ return takeObject(ret);
624
+ }
625
+ /**
626
+ * Authorize a batch of unsigned requests against one shared principal.
627
+ *
628
+ * Setup work (principal build + pushed-data snapshot) runs once and each
629
+ * item is evaluated in input order. Results are returned inside a
630
+ * [`BatchAuthorizeUnsignedResponse`] carrying the shared `batch_id`.
631
+ * Batch-level failures (validation, principal parse) reject the whole
632
+ * call; per-item failures are returned as `BatchItemError` results and
633
+ * exposed by WASM with `is_ok=false` and `error`, while genuine Cedar
634
+ * denials remain `AuthorizeResult` values with `decision=false`.
635
+ * # Arguments
636
+ *
637
+ * * `request` - JSON string representation of [`BatchAuthorizeUnsignedRequest`].
638
+ *
639
+ * # Example
640
+ *
641
+ * ```javascript
642
+ * const result = await cedarling.authorizeUnsignedBatch(JSON.stringify(batchRequest));
643
+ * ```
644
+ * @param {string} request
645
+ * @returns {Promise<BatchAuthorizeUnsignedResponse>}
646
+ */
647
+ authorizeUnsignedBatch(request) {
648
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
649
+ const len0 = WASM_VECTOR_LEN;
650
+ const ret = wasm.cedarling_authorizeUnsignedBatch(this.__wbg_ptr, ptr0, len0);
651
+ return takeObject(ret);
652
+ }
653
+ /**
654
+ * Authorize an unsigned request carrying an optional single principal.
655
+ * Makes an authorization decision based on the [`RequestUnsigned`].
656
+ *
657
+ * When `principal` is omitted / `null` on the JS side the core uses Cedar
658
+ * partial evaluation; residual-dependent requests fail closed with
659
+ * `Decision::Deny` and surface residual policy ids in
660
+ * `response.diagnostics.reason`.
661
+ *
662
+ * # Arguments
663
+ *
664
+ * * `request` - JSON string representation of [`RequestUnsigned`].
665
+ *
666
+ * # Example
667
+ *
668
+ * ```javascript
669
+ * const result = await cedarling.authorizeUnsigned(JSON.stringify(request));
670
+ * ```
671
+ * @param {string} request
672
+ * @returns {Promise<AuthorizeResult>}
673
+ */
674
+ authorizeUnsigned(request) {
675
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
676
+ const len0 = WASM_VECTOR_LEN;
677
+ const ret = wasm.cedarling_authorizeUnsigned(this.__wbg_ptr, ptr0, len0);
678
+ return takeObject(ret);
679
+ }
680
+ /**
681
+ * Clear all entries from the data store.
682
+ *
683
+ * # Arguments
684
+ *
685
+ * None.
686
+ *
687
+ * # Example
688
+ *
689
+ * ```javascript
690
+ * cedarling.clearDataCtx();
691
+ * console.log("All data entries cleared");
692
+ * ```
693
+ */
694
+ clearDataCtx() {
695
+ try {
696
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
697
+ wasm.cedarling_clearDataCtx(retptr, this.__wbg_ptr);
698
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
699
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
700
+ if (r1) {
701
+ throw takeObject(r0);
702
+ }
703
+ } finally {
704
+ wasm.__wbindgen_add_to_stack_pointer(16);
705
+ }
706
+ }
707
+ /**
708
+ * Get trusted issuer identifiers that failed to load.
709
+ *
710
+ * # Arguments
711
+ *
712
+ * None.
713
+ *
714
+ * # Example
715
+ *
716
+ * ```javascript
717
+ * const ids = cedarling.failedTrustedIssuerIds();
718
+ * ```
719
+ * @returns {Array<any>}
720
+ */
721
+ failedTrustedIssuerIds() {
722
+ const ret = wasm.cedarling_failedTrustedIssuerIds(this.__wbg_ptr);
723
+ return takeObject(ret);
724
+ }
725
+ /**
726
+ * Get a value from the data store by key.
727
+ * Returns null if the key doesn't exist or the entry has expired.
728
+ *
729
+ * # Arguments
730
+ *
731
+ * * `key` - A string key for the data entry to retrieve
732
+ *
733
+ * # Example
734
+ *
735
+ * ```javascript
736
+ * const value = cedarling.getDataCtx("user:123");
737
+ * if (value !== null) {
738
+ * console.log(value.name); // "John"
739
+ * }
740
+ * ```
741
+ * @param {string} key
742
+ * @returns {any}
743
+ */
744
+ getDataCtx(key) {
745
+ try {
746
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
747
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
748
+ const len0 = WASM_VECTOR_LEN;
749
+ wasm.cedarling_getDataCtx(retptr, this.__wbg_ptr, ptr0, len0);
750
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
751
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
752
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
753
+ if (r2) {
754
+ throw takeObject(r1);
755
+ }
756
+ return takeObject(r0);
757
+ } finally {
758
+ wasm.__wbindgen_add_to_stack_pointer(16);
759
+ }
760
+ }
761
+ /**
762
+ * Get a data entry with full metadata by key.
763
+ * Returns undefined if the key doesn't exist or the entry has expired.
764
+ *
765
+ * # Arguments
766
+ *
767
+ * * `key` - A string key for the data entry to retrieve
768
+ *
769
+ * # Example
770
+ *
771
+ * ```javascript
772
+ * const entry = cedarling.getDataEntryCtx("user:123");
773
+ * if (entry !== undefined) {
774
+ * console.log(entry.key); // "user:123"
775
+ * console.log(entry.value()); // { name: "John", age: 30 }
776
+ * console.log(entry.data_type); // "Record"
777
+ * console.log(entry.created_at); // "2024-01-01T12:00:00Z"
778
+ * console.log(entry.access_count); // 5
779
+ * }
780
+ * ```
781
+ * @param {string} key
782
+ * @returns {DataEntry | undefined}
783
+ */
784
+ getDataEntryCtx(key) {
785
+ try {
786
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
787
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
788
+ const len0 = WASM_VECTOR_LEN;
789
+ wasm.cedarling_getDataEntryCtx(retptr, this.__wbg_ptr, ptr0, len0);
790
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
791
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
792
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
793
+ if (r2) {
794
+ throw takeObject(r1);
795
+ }
796
+ return r0 === 0 ? void 0 : DataEntry.__wrap(r0);
797
+ } finally {
798
+ wasm.__wbindgen_add_to_stack_pointer(16);
799
+ }
800
+ }
801
+ /**
802
+ * Returns one retained memory log by ID, or `null` when it is not retained.
803
+ *
804
+ * # Arguments
805
+ *
806
+ * * `id` - The retained log identifier.
807
+ *
808
+ * # Example
809
+ *
810
+ * ```javascript
811
+ * const log = cedarling.getLogById("request-id");
812
+ * ```
813
+ * @param {string} id
814
+ * @returns {any}
815
+ */
816
+ getLogById(id) {
817
+ try {
818
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
819
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
820
+ const len0 = WASM_VECTOR_LEN;
821
+ wasm.cedarling_getLogById(retptr, this.__wbg_ptr, ptr0, len0);
822
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
823
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
824
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
825
+ if (r2) {
826
+ throw takeObject(r1);
827
+ }
828
+ return takeObject(r0);
829
+ } finally {
830
+ wasm.__wbindgen_add_to_stack_pointer(16);
831
+ }
832
+ }
833
+ /**
834
+ * Returns identifiers for all retained memory logs.
835
+ *
836
+ * # Arguments
837
+ *
838
+ * None.
839
+ *
840
+ * # Example
841
+ *
842
+ * ```javascript
843
+ * const ids = cedarling.getLogIds();
844
+ * ```
845
+ * @returns {Array<any>}
846
+ */
847
+ getLogIds() {
848
+ const ret = wasm.cedarling_getLogIds(this.__wbg_ptr);
849
+ return takeObject(ret);
850
+ }
851
+ /**
852
+ * Returns retained memory logs matching one request ID and indexed value.
853
+ *
854
+ * # Arguments
855
+ *
856
+ * * `requestId` - The request identifier to match.
857
+ * * `tag` - A log kind (`"System"`, `"Decision"`, or `"Metric"`) or a
858
+ * system-log level such as `"DEBUG"`.
859
+ *
860
+ * # Example
861
+ *
862
+ * ```javascript
863
+ * const logs = cedarling.getLogsByRequestIdAndTag("request-id", "System");
864
+ * ```
865
+ * @param {string} request_id
866
+ * @param {string} tag
867
+ * @returns {any[]}
868
+ */
869
+ getLogsByRequestIdAndTag(request_id, tag) {
870
+ try {
871
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
872
+ const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
873
+ const len0 = WASM_VECTOR_LEN;
874
+ const ptr1 = passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
875
+ const len1 = WASM_VECTOR_LEN;
876
+ wasm.cedarling_getLogsByRequestIdAndTag(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
877
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
878
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
879
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
880
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
881
+ if (r3) {
882
+ throw takeObject(r2);
883
+ }
884
+ var v3 = getArrayJsValueFromWasm0(r0, r1);
885
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
886
+ return v3;
887
+ } finally {
888
+ wasm.__wbindgen_add_to_stack_pointer(16);
889
+ }
890
+ }
891
+ /**
892
+ * Returns retained memory logs for one request ID.
893
+ *
894
+ * # Arguments
895
+ *
896
+ * * `requestId` - The request identifier to match.
897
+ *
898
+ * # Example
899
+ *
900
+ * ```javascript
901
+ * const logs = cedarling.getLogsByRequestId("request-id");
902
+ * ```
903
+ * @param {string} request_id
904
+ * @returns {any[]}
905
+ */
906
+ getLogsByRequestId(request_id) {
907
+ try {
908
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
909
+ const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
910
+ const len0 = WASM_VECTOR_LEN;
911
+ wasm.cedarling_getLogsByRequestId(retptr, this.__wbg_ptr, ptr0, len0);
912
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
913
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
914
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
915
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
916
+ if (r3) {
917
+ throw takeObject(r2);
918
+ }
919
+ var v2 = getArrayJsValueFromWasm0(r0, r1);
920
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
921
+ return v2;
922
+ } finally {
923
+ wasm.__wbindgen_add_to_stack_pointer(16);
924
+ }
925
+ }
926
+ /**
927
+ * Returns retained memory logs matching an indexed value.
928
+ *
929
+ * # Arguments
930
+ *
931
+ * * `tag` - A log kind (`"System"`, `"Decision"`, or `"Metric"`) or a
932
+ * system-log level such as `"DEBUG"`.
933
+ *
934
+ * # Example
935
+ *
936
+ * ```javascript
937
+ * const logs = cedarling.getLogsByTag("System");
938
+ * ```
939
+ * @param {string} tag
940
+ * @returns {any[]}
941
+ */
942
+ getLogsByTag(tag) {
943
+ try {
944
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
945
+ const ptr0 = passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
946
+ const len0 = WASM_VECTOR_LEN;
947
+ wasm.cedarling_getLogsByTag(retptr, this.__wbg_ptr, ptr0, len0);
948
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
949
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
950
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
951
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
952
+ if (r3) {
953
+ throw takeObject(r2);
954
+ }
955
+ var v2 = getArrayJsValueFromWasm0(r0, r1);
956
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
957
+ return v2;
958
+ } finally {
959
+ wasm.__wbindgen_add_to_stack_pointer(16);
960
+ }
961
+ }
962
+ /**
963
+ * Get statistics about the data store.
964
+ *
965
+ * # Arguments
966
+ *
967
+ * None.
968
+ *
969
+ * # Example
970
+ *
971
+ * ```javascript
972
+ * const stats = cedarling.getStatsCtx();
973
+ * console.log(`Entries: ${stats.entry_count}/${stats.max_entries || 'unlimited'}`);
974
+ * console.log(`Capacity: ${stats.capacity_usage_percent.toFixed(2)}%`);
975
+ * console.log(`Total size: ${stats.total_size_bytes} bytes`);
976
+ * ```
977
+ * @returns {DataStoreStats}
978
+ */
979
+ getStatsCtx() {
980
+ try {
981
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
982
+ wasm.cedarling_getStatsCtx(retptr, this.__wbg_ptr);
983
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
984
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
985
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
986
+ if (r2) {
987
+ throw takeObject(r1);
988
+ }
989
+ return DataStoreStats.__wrap(r0);
990
+ } finally {
991
+ wasm.__wbindgen_add_to_stack_pointer(16);
992
+ }
993
+ }
994
+ /**
995
+ * Check whether a trusted issuer was loaded by `iss` claim.
996
+ *
997
+ * # Arguments
998
+ *
999
+ * * `iss_claim` - Issuer `iss` claim value to check.
1000
+ *
1001
+ * # Example
1002
+ *
1003
+ * ```javascript
1004
+ * const ok = cedarling.isTrustedIssuerLoadedByIss("https://issuer.example.org");
1005
+ * ```
1006
+ * @param {string} iss_claim
1007
+ * @returns {boolean}
1008
+ */
1009
+ isTrustedIssuerLoadedByIss(iss_claim) {
1010
+ const ptr0 = passStringToWasm0(iss_claim, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1011
+ const len0 = WASM_VECTOR_LEN;
1012
+ const ret = wasm.cedarling_isTrustedIssuerLoadedByIss(this.__wbg_ptr, ptr0, len0);
1013
+ return ret !== 0;
1014
+ }
1015
+ /**
1016
+ * Check whether a trusted issuer was loaded by issuer identifier.
1017
+ *
1018
+ * # Arguments
1019
+ *
1020
+ * * `issuer_id` - Trusted issuer identifier to check.
1021
+ *
1022
+ * # Example
1023
+ *
1024
+ * ```javascript
1025
+ * const ok = cedarling.isTrustedIssuerLoadedByName("issuer_id");
1026
+ * ```
1027
+ * @param {string} issuer_id
1028
+ * @returns {boolean}
1029
+ */
1030
+ isTrustedIssuerLoadedByName(issuer_id) {
1031
+ const ptr0 = passStringToWasm0(issuer_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1032
+ const len0 = WASM_VECTOR_LEN;
1033
+ const ret = wasm.cedarling_isTrustedIssuerLoadedByName(this.__wbg_ptr, ptr0, len0);
1034
+ return ret !== 0;
1035
+ }
1036
+ /**
1037
+ * List all entries with their metadata.
1038
+ * Returns an array of DataEntry objects.
1039
+ *
1040
+ * # Arguments
1041
+ *
1042
+ * None.
1043
+ *
1044
+ * # Example
1045
+ *
1046
+ * ```javascript
1047
+ * const entries = cedarling.listDataCtx();
1048
+ * entries.forEach(entry => {
1049
+ * console.log(`${entry.key}: ${entry.data_type} (accessed ${entry.access_count} times)`);
1050
+ * });
1051
+ * ```
1052
+ * @returns {Array<any>}
1053
+ */
1054
+ listDataCtx() {
1055
+ try {
1056
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1057
+ wasm.cedarling_listDataCtx(retptr, this.__wbg_ptr);
1058
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1059
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1060
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1061
+ if (r2) {
1062
+ throw takeObject(r1);
1063
+ }
1064
+ return takeObject(r0);
1065
+ } finally {
1066
+ wasm.__wbindgen_add_to_stack_pointer(16);
1067
+ }
1068
+ }
1069
+ /**
1070
+ * Get trusted issuer identifiers loaded successfully.
1071
+ *
1072
+ * # Arguments
1073
+ *
1074
+ * None.
1075
+ *
1076
+ * # Example
1077
+ *
1078
+ * ```javascript
1079
+ * const ids = cedarling.loadedTrustedIssuerIds();
1080
+ * ```
1081
+ * @returns {Array<any>}
1082
+ */
1083
+ loadedTrustedIssuerIds() {
1084
+ const ret = wasm.cedarling_loadedTrustedIssuerIds(this.__wbg_ptr);
1085
+ return takeObject(ret);
1086
+ }
1087
+ /**
1088
+ * Get the number of trusted issuers loaded successfully.
1089
+ *
1090
+ * # Arguments
1091
+ *
1092
+ * None.
1093
+ *
1094
+ * # Example
1095
+ *
1096
+ * ```javascript
1097
+ * const loadedCount = cedarling.loadedTrustedIssuersCount();
1098
+ * ```
1099
+ * @returns {number}
1100
+ */
1101
+ loadedTrustedIssuersCount() {
1102
+ const ret = wasm.cedarling_loadedTrustedIssuersCount(this.__wbg_ptr);
1103
+ return ret >>> 0;
1104
+ }
1105
+ /**
1106
+ * Creates a new Cedarling application from a JavaScript `Map`.
1107
+ *
1108
+ * # Arguments
1109
+ *
1110
+ * * `config` - A `Map` of Cedarling bootstrap-property names and values.
1111
+ *
1112
+ * # Example
1113
+ *
1114
+ * ```javascript
1115
+ * await initWasm();
1116
+ * const cedarling = await Cedarling.newFromMap(new Map([
1117
+ * ["CEDARLING_APPLICATION_NAME", "task-api"],
1118
+ * ["CEDARLING_POLICY_STORE_URI", "https://example.com/policy-store.cjar"],
1119
+ * ["CEDARLING_LOG_TYPE", "memory"],
1120
+ * ["CEDARLING_LOG_TTL", 120],
1121
+ * ]));
1122
+ * ```
1123
+ * @param {Map<any, any>} config
1124
+ * @returns {Promise<Cedarling>}
1125
+ */
1126
+ static newFromMap(config) {
1127
+ const ret = wasm.cedarling_newFromMap(addHeapObject(config));
1128
+ return takeObject(ret);
1129
+ }
1130
+ /**
1131
+ * Creates a Cedarling application from bootstrap properties.
1132
+ *
1133
+ * # Arguments
1134
+ *
1135
+ * * `config` - A plain object of Cedarling bootstrap-property names and values.
1136
+ *
1137
+ * # Example
1138
+ *
1139
+ * ```javascript
1140
+ * await initWasm();
1141
+ * const cedarling = await Cedarling.new({
1142
+ * CEDARLING_APPLICATION_NAME: "task-api",
1143
+ * CEDARLING_POLICY_STORE_URI: "https://example.com/policy-store.cjar",
1144
+ * CEDARLING_LOG_TYPE: "memory",
1145
+ * CEDARLING_LOG_TTL: 120,
1146
+ * });
1147
+ * ```
1148
+ * @param {object} config
1149
+ * @returns {Promise<Cedarling>}
1150
+ */
1151
+ static new(config) {
1152
+ const ret = wasm.cedarling_new(addHeapObject(config));
1153
+ return takeObject(ret);
1154
+ }
1155
+ /**
1156
+ * Returns all retained memory logs and removes them from storage.
1157
+ * Other log configurations return an empty array.
1158
+ *
1159
+ * # Arguments
1160
+ *
1161
+ * None.
1162
+ *
1163
+ * # Example
1164
+ *
1165
+ * ```javascript
1166
+ * const logs = cedarling.popLogs();
1167
+ * ```
1168
+ * @returns {Array<any>}
1169
+ */
1170
+ popLogs() {
1171
+ try {
1172
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1173
+ wasm.cedarling_popLogs(retptr, this.__wbg_ptr);
1174
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1175
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1176
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1177
+ if (r2) {
1178
+ throw takeObject(r1);
1179
+ }
1180
+ return takeObject(r0);
1181
+ } finally {
1182
+ wasm.__wbindgen_add_to_stack_pointer(16);
1183
+ }
1184
+ }
1185
+ /**
1186
+ * Push a value into the data store with an optional TTL.
1187
+ * If the key already exists, the value will be replaced.
1188
+ * If TTL is not provided, the default TTL from configuration is used.
1189
+ *
1190
+ * # Arguments
1191
+ *
1192
+ * * `key` - A string key for the data entry (must not be empty)
1193
+ * * `value` - The value to store (any JSON-serializable JavaScript value: object, array, string, number, boolean)
1194
+ * * `ttl_secs` - Optional TTL in seconds (undefined/null uses default from config)
1195
+ *
1196
+ * # Example
1197
+ *
1198
+ * ```javascript
1199
+ * cedarling.pushDataCtx("user:123", { name: "John", age: 30 }, 3600);
1200
+ * cedarling.pushDataCtx("config", { setting: "value" }); // Uses default TTL
1201
+ * ```
1202
+ * @param {string} key
1203
+ * @param {any} value
1204
+ * @param {bigint | null} [ttl_secs]
1205
+ */
1206
+ pushDataCtx(key, value, ttl_secs) {
1207
+ try {
1208
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1209
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1210
+ const len0 = WASM_VECTOR_LEN;
1211
+ wasm.cedarling_pushDataCtx(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value), !isLikeNone(ttl_secs), isLikeNone(ttl_secs) ? BigInt(0) : ttl_secs);
1212
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1213
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1214
+ if (r1) {
1215
+ throw takeObject(r0);
1216
+ }
1217
+ } finally {
1218
+ wasm.__wbindgen_add_to_stack_pointer(16);
1219
+ }
1220
+ }
1221
+ /**
1222
+ * Remove a value from the data store by key.
1223
+ * Returns true if the key existed and was removed, false otherwise.
1224
+ *
1225
+ * # Arguments
1226
+ *
1227
+ * * `key` - A string key for the data entry to remove
1228
+ *
1229
+ * # Example
1230
+ *
1231
+ * ```javascript
1232
+ * const removed = cedarling.removeDataCtx("user:123");
1233
+ * if (removed) {
1234
+ * console.log("Entry was successfully removed");
1235
+ * }
1236
+ * ```
1237
+ * @param {string} key
1238
+ * @returns {boolean}
1239
+ */
1240
+ removeDataCtx(key) {
1241
+ try {
1242
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1243
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1244
+ const len0 = WASM_VECTOR_LEN;
1245
+ wasm.cedarling_removeDataCtx(retptr, this.__wbg_ptr, ptr0, len0);
1246
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1247
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1248
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1249
+ if (r2) {
1250
+ throw takeObject(r1);
1251
+ }
1252
+ return r0 !== 0;
1253
+ } finally {
1254
+ wasm.__wbindgen_add_to_stack_pointer(16);
1255
+ }
1256
+ }
1257
+ /**
1258
+ * Closes Lock Server connections and pushes all available logs.
1259
+ *
1260
+ * # Arguments
1261
+ *
1262
+ * None.
1263
+ *
1264
+ * # Example
1265
+ *
1266
+ * ```javascript
1267
+ * await cedarling.shutDown();
1268
+ * ```
1269
+ * @returns {Promise<void>}
1270
+ */
1271
+ shutDown() {
1272
+ const ret = wasm.cedarling_shutDown(this.__wbg_ptr);
1273
+ return takeObject(ret);
1274
+ }
1275
+ /**
1276
+ * Get the total number of trusted issuer entries discovered.
1277
+ *
1278
+ * # Arguments
1279
+ *
1280
+ * None.
1281
+ *
1282
+ * # Example
1283
+ *
1284
+ * ```javascript
1285
+ * const total = cedarling.totalIssuers();
1286
+ * ```
1287
+ * @returns {number}
1288
+ */
1289
+ totalIssuers() {
1290
+ const ret = wasm.cedarling_totalIssuers(this.__wbg_ptr);
1291
+ return ret >>> 0;
1292
+ }
1293
+ };
1294
+ if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
1295
+ var DataEntry = class _DataEntry {
1296
+ static __wrap(ptr) {
1297
+ const obj = Object.create(_DataEntry.prototype);
1298
+ obj.__wbg_ptr = ptr;
1299
+ DataEntryFinalization.register(obj, obj.__wbg_ptr, obj);
1300
+ return obj;
1301
+ }
1302
+ __destroy_into_raw() {
1303
+ const ptr = this.__wbg_ptr;
1304
+ this.__wbg_ptr = 0;
1305
+ DataEntryFinalization.unregister(this);
1306
+ return ptr;
1307
+ }
1308
+ free() {
1309
+ const ptr = this.__destroy_into_raw();
1310
+ wasm.__wbg_dataentry_free(ptr, 0);
1311
+ }
1312
+ /**
1313
+ * Convert `DataEntry` to json string value
1314
+ * @returns {string}
1315
+ */
1316
+ jsonString() {
1317
+ let deferred1_0;
1318
+ let deferred1_1;
1319
+ try {
1320
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1321
+ wasm.dataentry_jsonString(retptr, this.__wbg_ptr);
1322
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1323
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1324
+ deferred1_0 = r0;
1325
+ deferred1_1 = r1;
1326
+ return getStringFromWasm0(r0, r1);
1327
+ } finally {
1328
+ wasm.__wbindgen_add_to_stack_pointer(16);
1329
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1330
+ }
1331
+ }
1332
+ /**
1333
+ * Get the value stored in this entry as a JavaScript object
1334
+ * @returns {any}
1335
+ */
1336
+ value() {
1337
+ try {
1338
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1339
+ wasm.dataentry_value(retptr, this.__wbg_ptr);
1340
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1341
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1342
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1343
+ if (r2) {
1344
+ throw takeObject(r1);
1345
+ }
1346
+ return takeObject(r0);
1347
+ } finally {
1348
+ wasm.__wbindgen_add_to_stack_pointer(16);
1349
+ }
1350
+ }
1351
+ /**
1352
+ * Number of times this entry has been accessed
1353
+ * @returns {bigint}
1354
+ */
1355
+ get access_count() {
1356
+ const ret = wasm.__wbg_get_dataentry_access_count(this.__wbg_ptr);
1357
+ return BigInt.asUintN(64, ret);
1358
+ }
1359
+ /**
1360
+ * Timestamp when this entry was created (RFC 3339 format)
1361
+ * @returns {string}
1362
+ */
1363
+ get created_at() {
1364
+ let deferred1_0;
1365
+ let deferred1_1;
1366
+ try {
1367
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1368
+ wasm.__wbg_get_dataentry_created_at(retptr, this.__wbg_ptr);
1369
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1370
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1371
+ deferred1_0 = r0;
1372
+ deferred1_1 = r1;
1373
+ return getStringFromWasm0(r0, r1);
1374
+ } finally {
1375
+ wasm.__wbindgen_add_to_stack_pointer(16);
1376
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1377
+ }
1378
+ }
1379
+ /**
1380
+ * The inferred Cedar type of the value
1381
+ * @returns {string}
1382
+ */
1383
+ get data_type() {
1384
+ let deferred1_0;
1385
+ let deferred1_1;
1386
+ try {
1387
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1388
+ wasm.__wbg_get_dataentry_data_type(retptr, this.__wbg_ptr);
1389
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1390
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1391
+ deferred1_0 = r0;
1392
+ deferred1_1 = r1;
1393
+ return getStringFromWasm0(r0, r1);
1394
+ } finally {
1395
+ wasm.__wbindgen_add_to_stack_pointer(16);
1396
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1397
+ }
1398
+ }
1399
+ /**
1400
+ * Timestamp when this entry expires (RFC 3339 format). The getter returns undefined if no TTL.
1401
+ * @returns {string | undefined}
1402
+ */
1403
+ get expires_at() {
1404
+ try {
1405
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1406
+ wasm.__wbg_get_dataentry_expires_at(retptr, this.__wbg_ptr);
1407
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1408
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1409
+ let v1;
1410
+ if (r0 !== 0) {
1411
+ v1 = getStringFromWasm0(r0, r1);
1412
+ wasm.__wbindgen_export5(r0, r1 * 1, 1);
1413
+ }
1414
+ return v1;
1415
+ } finally {
1416
+ wasm.__wbindgen_add_to_stack_pointer(16);
1417
+ }
1418
+ }
1419
+ /**
1420
+ * The key for this entry
1421
+ * @returns {string}
1422
+ */
1423
+ get key() {
1424
+ let deferred1_0;
1425
+ let deferred1_1;
1426
+ try {
1427
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1428
+ wasm.__wbg_get_dataentry_key(retptr, this.__wbg_ptr);
1429
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1430
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1431
+ deferred1_0 = r0;
1432
+ deferred1_1 = r1;
1433
+ return getStringFromWasm0(r0, r1);
1434
+ } finally {
1435
+ wasm.__wbindgen_add_to_stack_pointer(16);
1436
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1437
+ }
1438
+ }
1439
+ /**
1440
+ * Number of times this entry has been accessed
1441
+ * @param {bigint} arg0
1442
+ */
1443
+ set access_count(arg0) {
1444
+ wasm.__wbg_set_dataentry_access_count(this.__wbg_ptr, arg0);
1445
+ }
1446
+ /**
1447
+ * Timestamp when this entry was created (RFC 3339 format)
1448
+ * @param {string} arg0
1449
+ */
1450
+ set created_at(arg0) {
1451
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1452
+ const len0 = WASM_VECTOR_LEN;
1453
+ wasm.__wbg_set_dataentry_created_at(this.__wbg_ptr, ptr0, len0);
1454
+ }
1455
+ /**
1456
+ * The inferred Cedar type of the value
1457
+ * @param {string} arg0
1458
+ */
1459
+ set data_type(arg0) {
1460
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1461
+ const len0 = WASM_VECTOR_LEN;
1462
+ wasm.__wbg_set_dataentry_data_type(this.__wbg_ptr, ptr0, len0);
1463
+ }
1464
+ /**
1465
+ * Timestamp when this entry expires (RFC 3339 format). The getter returns undefined if no TTL.
1466
+ * @param {string | null} [arg0]
1467
+ */
1468
+ set expires_at(arg0) {
1469
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1470
+ var len0 = WASM_VECTOR_LEN;
1471
+ wasm.__wbg_set_dataentry_expires_at(this.__wbg_ptr, ptr0, len0);
1472
+ }
1473
+ /**
1474
+ * The key for this entry
1475
+ * @param {string} arg0
1476
+ */
1477
+ set key(arg0) {
1478
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1479
+ const len0 = WASM_VECTOR_LEN;
1480
+ wasm.__wbg_set_dataentry_key(this.__wbg_ptr, ptr0, len0);
1481
+ }
1482
+ };
1483
+ if (Symbol.dispose) DataEntry.prototype[Symbol.dispose] = DataEntry.prototype.free;
1484
+ var DataStoreStats = class _DataStoreStats {
1485
+ static __wrap(ptr) {
1486
+ const obj = Object.create(_DataStoreStats.prototype);
1487
+ obj.__wbg_ptr = ptr;
1488
+ DataStoreStatsFinalization.register(obj, obj.__wbg_ptr, obj);
1489
+ return obj;
1490
+ }
1491
+ __destroy_into_raw() {
1492
+ const ptr = this.__wbg_ptr;
1493
+ this.__wbg_ptr = 0;
1494
+ DataStoreStatsFinalization.unregister(this);
1495
+ return ptr;
1496
+ }
1497
+ free() {
1498
+ const ptr = this.__destroy_into_raw();
1499
+ wasm.__wbg_datastorestats_free(ptr, 0);
1500
+ }
1501
+ /**
1502
+ * Convert `DataStoreStats` to json string value
1503
+ * @returns {string}
1504
+ */
1505
+ jsonString() {
1506
+ let deferred1_0;
1507
+ let deferred1_1;
1508
+ try {
1509
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1510
+ wasm.datastorestats_jsonString(retptr, this.__wbg_ptr);
1511
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1512
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1513
+ deferred1_0 = r0;
1514
+ deferred1_1 = r1;
1515
+ return getStringFromWasm0(r0, r1);
1516
+ } finally {
1517
+ wasm.__wbindgen_add_to_stack_pointer(16);
1518
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1519
+ }
1520
+ }
1521
+ /**
1522
+ * Average size per entry in bytes (0 if no entries)
1523
+ * @returns {number}
1524
+ */
1525
+ get avg_entry_size_bytes() {
1526
+ const ret = wasm.__wbg_get_datastorestats_avg_entry_size_bytes(this.__wbg_ptr);
1527
+ return ret >>> 0;
1528
+ }
1529
+ /**
1530
+ * Percentage of capacity used (0.0-100.0, based on entry count)
1531
+ * @returns {number}
1532
+ */
1533
+ get capacity_usage_percent() {
1534
+ const ret = wasm.__wbg_get_datastorestats_capacity_usage_percent(this.__wbg_ptr);
1535
+ return ret;
1536
+ }
1537
+ /**
1538
+ * Number of entries currently stored
1539
+ * @returns {number}
1540
+ */
1541
+ get entry_count() {
1542
+ const ret = wasm.__wbg_get_datastorestats_entry_count(this.__wbg_ptr);
1543
+ return ret >>> 0;
1544
+ }
1545
+ /**
1546
+ * Maximum number of entries allowed (0 = unlimited)
1547
+ * @returns {number}
1548
+ */
1549
+ get max_entries() {
1550
+ const ret = wasm.__wbg_get_datastorestats_max_entries(this.__wbg_ptr);
1551
+ return ret >>> 0;
1552
+ }
1553
+ /**
1554
+ * Maximum size per entry in bytes (0 = unlimited)
1555
+ * @returns {number}
1556
+ */
1557
+ get max_entry_size() {
1558
+ const ret = wasm.__wbg_get_datastorestats_max_entry_size(this.__wbg_ptr);
1559
+ return ret >>> 0;
1560
+ }
1561
+ /**
1562
+ * Memory usage threshold percentage (from config)
1563
+ * @returns {number}
1564
+ */
1565
+ get memory_alert_threshold() {
1566
+ const ret = wasm.__wbg_get_datastorestats_memory_alert_threshold(this.__wbg_ptr);
1567
+ return ret;
1568
+ }
1569
+ /**
1570
+ * Whether memory usage exceeds the alert threshold
1571
+ * @returns {boolean}
1572
+ */
1573
+ get memory_alert_triggered() {
1574
+ const ret = wasm.__wbg_get_datastorestats_memory_alert_triggered(this.__wbg_ptr);
1575
+ return ret !== 0;
1576
+ }
1577
+ /**
1578
+ * Whether metrics tracking is enabled
1579
+ * @returns {boolean}
1580
+ */
1581
+ get metrics_enabled() {
1582
+ const ret = wasm.__wbg_get_datastorestats_metrics_enabled(this.__wbg_ptr);
1583
+ return ret !== 0;
1584
+ }
1585
+ /**
1586
+ * Total size of all entries in bytes (approximate, based on JSON serialization)
1587
+ * @returns {number}
1588
+ */
1589
+ get total_size_bytes() {
1590
+ const ret = wasm.__wbg_get_datastorestats_total_size_bytes(this.__wbg_ptr);
1591
+ return ret >>> 0;
1592
+ }
1593
+ /**
1594
+ * Average size per entry in bytes (0 if no entries)
1595
+ * @param {number} arg0
1596
+ */
1597
+ set avg_entry_size_bytes(arg0) {
1598
+ wasm.__wbg_set_datastorestats_avg_entry_size_bytes(this.__wbg_ptr, arg0);
1599
+ }
1600
+ /**
1601
+ * Percentage of capacity used (0.0-100.0, based on entry count)
1602
+ * @param {number} arg0
1603
+ */
1604
+ set capacity_usage_percent(arg0) {
1605
+ wasm.__wbg_set_datastorestats_capacity_usage_percent(this.__wbg_ptr, arg0);
1606
+ }
1607
+ /**
1608
+ * Number of entries currently stored
1609
+ * @param {number} arg0
1610
+ */
1611
+ set entry_count(arg0) {
1612
+ wasm.__wbg_set_datastorestats_entry_count(this.__wbg_ptr, arg0);
1613
+ }
1614
+ /**
1615
+ * Maximum number of entries allowed (0 = unlimited)
1616
+ * @param {number} arg0
1617
+ */
1618
+ set max_entries(arg0) {
1619
+ wasm.__wbg_set_datastorestats_max_entries(this.__wbg_ptr, arg0);
1620
+ }
1621
+ /**
1622
+ * Maximum size per entry in bytes (0 = unlimited)
1623
+ * @param {number} arg0
1624
+ */
1625
+ set max_entry_size(arg0) {
1626
+ wasm.__wbg_set_datastorestats_max_entry_size(this.__wbg_ptr, arg0);
1627
+ }
1628
+ /**
1629
+ * Memory usage threshold percentage (from config)
1630
+ * @param {number} arg0
1631
+ */
1632
+ set memory_alert_threshold(arg0) {
1633
+ wasm.__wbg_set_datastorestats_memory_alert_threshold(this.__wbg_ptr, arg0);
1634
+ }
1635
+ /**
1636
+ * Whether memory usage exceeds the alert threshold
1637
+ * @param {boolean} arg0
1638
+ */
1639
+ set memory_alert_triggered(arg0) {
1640
+ wasm.__wbg_set_datastorestats_memory_alert_triggered(this.__wbg_ptr, arg0);
1641
+ }
1642
+ /**
1643
+ * Whether metrics tracking is enabled
1644
+ * @param {boolean} arg0
1645
+ */
1646
+ set metrics_enabled(arg0) {
1647
+ wasm.__wbg_set_datastorestats_metrics_enabled(this.__wbg_ptr, arg0);
1648
+ }
1649
+ /**
1650
+ * Total size of all entries in bytes (approximate, based on JSON serialization)
1651
+ * @param {number} arg0
1652
+ */
1653
+ set total_size_bytes(arg0) {
1654
+ wasm.__wbg_set_datastorestats_total_size_bytes(this.__wbg_ptr, arg0);
1655
+ }
1656
+ };
1657
+ if (Symbol.dispose) DataStoreStats.prototype[Symbol.dispose] = DataStoreStats.prototype.free;
1658
+ var Diagnostics = class _Diagnostics {
1659
+ static __wrap(ptr) {
1660
+ const obj = Object.create(_Diagnostics.prototype);
1661
+ obj.__wbg_ptr = ptr;
1662
+ DiagnosticsFinalization.register(obj, obj.__wbg_ptr, obj);
1663
+ return obj;
1664
+ }
1665
+ __destroy_into_raw() {
1666
+ const ptr = this.__wbg_ptr;
1667
+ this.__wbg_ptr = 0;
1668
+ DiagnosticsFinalization.unregister(this);
1669
+ return ptr;
1670
+ }
1671
+ free() {
1672
+ const ptr = this.__destroy_into_raw();
1673
+ wasm.__wbg_diagnostics_free(ptr, 0);
1674
+ }
1675
+ /**
1676
+ * Errors that occurred during authorization. The errors should be
1677
+ * treated as unordered, since policies may be evaluated in any order.
1678
+ * @returns {PolicyEvaluationError[]}
1679
+ */
1680
+ get errors() {
1681
+ try {
1682
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1683
+ wasm.diagnostics_errors(retptr, this.__wbg_ptr);
1684
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1685
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1686
+ var v1 = getArrayJsValueFromWasm0(r0, r1);
1687
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
1688
+ return v1;
1689
+ } finally {
1690
+ wasm.__wbindgen_add_to_stack_pointer(16);
1691
+ }
1692
+ }
1693
+ /**
1694
+ * `PolicyId`s of the policies that contributed to the decision.
1695
+ * If no policies applied to the request, this set will be empty.
1696
+ *
1697
+ * The ids should be treated as unordered,
1698
+ * @returns {string[]}
1699
+ */
1700
+ get reason() {
1701
+ try {
1702
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1703
+ wasm.diagnostics_reason(retptr, this.__wbg_ptr);
1704
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1705
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1706
+ var v1 = getArrayJsValueFromWasm0(r0, r1);
1707
+ wasm.__wbindgen_export5(r0, r1 * 4, 4);
1708
+ return v1;
1709
+ } finally {
1710
+ wasm.__wbindgen_add_to_stack_pointer(16);
1711
+ }
1712
+ }
1713
+ };
1714
+ if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
1715
+ var IntoUnderlyingByteSource = class {
1716
+ __destroy_into_raw() {
1717
+ const ptr = this.__wbg_ptr;
1718
+ this.__wbg_ptr = 0;
1719
+ IntoUnderlyingByteSourceFinalization.unregister(this);
1720
+ return ptr;
1721
+ }
1722
+ free() {
1723
+ const ptr = this.__destroy_into_raw();
1724
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
1725
+ }
1726
+ /**
1727
+ * @returns {number}
1728
+ */
1729
+ get autoAllocateChunkSize() {
1730
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
1731
+ return ret >>> 0;
1732
+ }
1733
+ cancel() {
1734
+ const ptr = this.__destroy_into_raw();
1735
+ wasm.intounderlyingbytesource_cancel(ptr);
1736
+ }
1737
+ /**
1738
+ * @param {ReadableByteStreamController} controller
1739
+ * @returns {Promise<any>}
1740
+ */
1741
+ pull(controller) {
1742
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
1743
+ return takeObject(ret);
1744
+ }
1745
+ /**
1746
+ * @param {ReadableByteStreamController} controller
1747
+ */
1748
+ start(controller) {
1749
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
1750
+ }
1751
+ /**
1752
+ * @returns {ReadableStreamType}
1753
+ */
1754
+ get type() {
1755
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
1756
+ return __wbindgen_enum_ReadableStreamType[ret];
1757
+ }
1758
+ };
1759
+ if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
1760
+ var IntoUnderlyingSink = class {
1761
+ __destroy_into_raw() {
1762
+ const ptr = this.__wbg_ptr;
1763
+ this.__wbg_ptr = 0;
1764
+ IntoUnderlyingSinkFinalization.unregister(this);
1765
+ return ptr;
1766
+ }
1767
+ free() {
1768
+ const ptr = this.__destroy_into_raw();
1769
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
1770
+ }
1771
+ /**
1772
+ * @param {any} reason
1773
+ * @returns {Promise<any>}
1774
+ */
1775
+ abort(reason) {
1776
+ const ptr = this.__destroy_into_raw();
1777
+ const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
1778
+ return takeObject(ret);
1779
+ }
1780
+ /**
1781
+ * @returns {Promise<any>}
1782
+ */
1783
+ close() {
1784
+ const ptr = this.__destroy_into_raw();
1785
+ const ret = wasm.intounderlyingsink_close(ptr);
1786
+ return takeObject(ret);
1787
+ }
1788
+ /**
1789
+ * @param {any} chunk
1790
+ * @returns {Promise<any>}
1791
+ */
1792
+ write(chunk) {
1793
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
1794
+ return takeObject(ret);
1795
+ }
1796
+ };
1797
+ if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
1798
+ var IntoUnderlyingSource = class {
1799
+ __destroy_into_raw() {
1800
+ const ptr = this.__wbg_ptr;
1801
+ this.__wbg_ptr = 0;
1802
+ IntoUnderlyingSourceFinalization.unregister(this);
1803
+ return ptr;
1804
+ }
1805
+ free() {
1806
+ const ptr = this.__destroy_into_raw();
1807
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
1808
+ }
1809
+ cancel() {
1810
+ const ptr = this.__destroy_into_raw();
1811
+ wasm.intounderlyingsource_cancel(ptr);
1812
+ }
1813
+ /**
1814
+ * @param {ReadableStreamDefaultController} controller
1815
+ * @returns {Promise<any>}
1816
+ */
1817
+ pull(controller) {
1818
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
1819
+ return takeObject(ret);
1820
+ }
1821
+ };
1822
+ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
1823
+ var MultiIssuerAuthorizeResult = class _MultiIssuerAuthorizeResult {
1824
+ static __wrap(ptr) {
1825
+ const obj = Object.create(_MultiIssuerAuthorizeResult.prototype);
1826
+ obj.__wbg_ptr = ptr;
1827
+ MultiIssuerAuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
1828
+ return obj;
1829
+ }
1830
+ __destroy_into_raw() {
1831
+ const ptr = this.__wbg_ptr;
1832
+ this.__wbg_ptr = 0;
1833
+ MultiIssuerAuthorizeResultFinalization.unregister(this);
1834
+ return ptr;
1835
+ }
1836
+ free() {
1837
+ const ptr = this.__destroy_into_raw();
1838
+ wasm.__wbg_multiissuerauthorizeresult_free(ptr, 0);
1839
+ }
1840
+ /**
1841
+ * Result of authorization
1842
+ * true means `ALLOW`
1843
+ * false means `Deny`
1844
+ * @returns {boolean}
1845
+ */
1846
+ get decision() {
1847
+ const ret = wasm.__wbg_get_multiissuerauthorizeresult_decision(this.__wbg_ptr);
1848
+ return ret !== 0;
1849
+ }
1850
+ /**
1851
+ * Request ID of the authorization request
1852
+ * @returns {string}
1853
+ */
1854
+ get request_id() {
1855
+ let deferred1_0;
1856
+ let deferred1_1;
1857
+ try {
1858
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1859
+ wasm.__wbg_get_multiissuerauthorizeresult_request_id(retptr, this.__wbg_ptr);
1860
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1861
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1862
+ deferred1_0 = r0;
1863
+ deferred1_1 = r1;
1864
+ return getStringFromWasm0(r0, r1);
1865
+ } finally {
1866
+ wasm.__wbindgen_add_to_stack_pointer(16);
1867
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1868
+ }
1869
+ }
1870
+ /**
1871
+ * Result of Cedar policy authorization
1872
+ * @returns {AuthorizeResultResponse}
1873
+ */
1874
+ get response() {
1875
+ const ret = wasm.__wbg_get_multiissuerauthorizeresult_response(this.__wbg_ptr);
1876
+ return AuthorizeResultResponse.__wrap(ret);
1877
+ }
1878
+ /**
1879
+ * Convert `MultiIssuerAuthorizeResult` to json string value
1880
+ * @returns {string}
1881
+ */
1882
+ jsonString() {
1883
+ let deferred1_0;
1884
+ let deferred1_1;
1885
+ try {
1886
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1887
+ wasm.multiissuerauthorizeresult_jsonString(retptr, this.__wbg_ptr);
1888
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1889
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1890
+ deferred1_0 = r0;
1891
+ deferred1_1 = r1;
1892
+ return getStringFromWasm0(r0, r1);
1893
+ } finally {
1894
+ wasm.__wbindgen_add_to_stack_pointer(16);
1895
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1896
+ }
1897
+ }
1898
+ /**
1899
+ * Result of authorization
1900
+ * true means `ALLOW`
1901
+ * false means `Deny`
1902
+ * @param {boolean} arg0
1903
+ */
1904
+ set decision(arg0) {
1905
+ wasm.__wbg_set_multiissuerauthorizeresult_decision(this.__wbg_ptr, arg0);
1906
+ }
1907
+ /**
1908
+ * Request ID of the authorization request
1909
+ * @param {string} arg0
1910
+ */
1911
+ set request_id(arg0) {
1912
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1913
+ const len0 = WASM_VECTOR_LEN;
1914
+ wasm.__wbg_set_multiissuerauthorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
1915
+ }
1916
+ /**
1917
+ * Result of Cedar policy authorization
1918
+ * @param {AuthorizeResultResponse} arg0
1919
+ */
1920
+ set response(arg0) {
1921
+ _assertClass(arg0, AuthorizeResultResponse);
1922
+ var ptr0 = arg0.__destroy_into_raw();
1923
+ wasm.__wbg_set_multiissuerauthorizeresult_response(this.__wbg_ptr, ptr0);
1924
+ }
1925
+ };
1926
+ if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
1927
+ var PolicyEvaluationError = class _PolicyEvaluationError {
1928
+ static __wrap(ptr) {
1929
+ const obj = Object.create(_PolicyEvaluationError.prototype);
1930
+ obj.__wbg_ptr = ptr;
1931
+ PolicyEvaluationErrorFinalization.register(obj, obj.__wbg_ptr, obj);
1932
+ return obj;
1933
+ }
1934
+ __destroy_into_raw() {
1935
+ const ptr = this.__wbg_ptr;
1936
+ this.__wbg_ptr = 0;
1937
+ PolicyEvaluationErrorFinalization.unregister(this);
1938
+ return ptr;
1939
+ }
1940
+ free() {
1941
+ const ptr = this.__destroy_into_raw();
1942
+ wasm.__wbg_policyevaluationerror_free(ptr, 0);
1943
+ }
1944
+ /**
1945
+ * Underlying evaluation error string representation
1946
+ * @returns {string}
1947
+ */
1948
+ get error() {
1949
+ let deferred1_0;
1950
+ let deferred1_1;
1951
+ try {
1952
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1953
+ wasm.policyevaluationerror_error(retptr, this.__wbg_ptr);
1954
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1955
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1956
+ deferred1_0 = r0;
1957
+ deferred1_1 = r1;
1958
+ return getStringFromWasm0(r0, r1);
1959
+ } finally {
1960
+ wasm.__wbindgen_add_to_stack_pointer(16);
1961
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1962
+ }
1963
+ }
1964
+ /**
1965
+ * Id of the policy with an error
1966
+ * @returns {string}
1967
+ */
1968
+ get id() {
1969
+ let deferred1_0;
1970
+ let deferred1_1;
1971
+ try {
1972
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1973
+ wasm.policyevaluationerror_id(retptr, this.__wbg_ptr);
1974
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1975
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1976
+ deferred1_0 = r0;
1977
+ deferred1_1 = r1;
1978
+ return getStringFromWasm0(r0, r1);
1979
+ } finally {
1980
+ wasm.__wbindgen_add_to_stack_pointer(16);
1981
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
1982
+ }
1983
+ }
1984
+ };
1985
+ if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
1986
+ function init(config) {
1987
+ const ret = wasm.init(addHeapObject(config));
1988
+ return takeObject(ret);
1989
+ }
1990
+ function initFromArchiveBytes(config, archive_bytes) {
1991
+ const ret = wasm.initFromArchiveBytes(addHeapObject(config), addHeapObject(archive_bytes));
1992
+ return takeObject(ret);
1993
+ }
1994
+ function __wbg_get_imports() {
1995
+ const import0 = {
1996
+ __proto__: null,
1997
+ __wbg_Error_67e7344beaa85059: function(arg0, arg1) {
1998
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1999
+ return addHeapObject(ret);
2000
+ },
2001
+ __wbg_Number_c54e7112a3fa7e3e: function(arg0) {
2002
+ const ret = Number(getObject(arg0));
2003
+ return ret;
2004
+ },
2005
+ __wbg___wbindgen_bigint_get_as_i64_b482365c149396c8: function(arg0, arg1) {
2006
+ const v = getObject(arg1);
2007
+ const ret = typeof v === "bigint" ? v : void 0;
2008
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
2009
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2010
+ },
2011
+ __wbg___wbindgen_boolean_get_7a12af2b3f899c5a: function(arg0) {
2012
+ const v = getObject(arg0);
2013
+ const ret = typeof v === "boolean" ? v : void 0;
2014
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
2015
+ },
2016
+ __wbg___wbindgen_debug_string_0e68cf47c9cbd9b0: function(arg0, arg1) {
2017
+ const ret = debugString(getObject(arg1));
2018
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2019
+ const len1 = WASM_VECTOR_LEN;
2020
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2021
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2022
+ },
2023
+ __wbg___wbindgen_in_50072d4d6e45c193: function(arg0, arg1) {
2024
+ const ret = getObject(arg0) in getObject(arg1);
2025
+ return ret;
2026
+ },
2027
+ __wbg___wbindgen_is_bigint_60fc0336cb14f5d7: function(arg0) {
2028
+ const ret = typeof getObject(arg0) === "bigint";
2029
+ return ret;
2030
+ },
2031
+ __wbg___wbindgen_is_function_fcda5e3902d732fe: function(arg0) {
2032
+ const ret = typeof getObject(arg0) === "function";
2033
+ return ret;
2034
+ },
2035
+ __wbg___wbindgen_is_object_edb6b15aa3afe12e: function(arg0) {
2036
+ const val = getObject(arg0);
2037
+ const ret = typeof val === "object" && val !== null;
2038
+ return ret;
2039
+ },
2040
+ __wbg___wbindgen_is_string_c4f7cb494a2a21f1: function(arg0) {
2041
+ const ret = typeof getObject(arg0) === "string";
2042
+ return ret;
2043
+ },
2044
+ __wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
2045
+ const ret = getObject(arg0) === void 0;
2046
+ return ret;
2047
+ },
2048
+ __wbg___wbindgen_jsval_eq_9fdcd3c0a860dd3b: function(arg0, arg1) {
2049
+ const ret = getObject(arg0) === getObject(arg1);
2050
+ return ret;
2051
+ },
2052
+ __wbg___wbindgen_jsval_loose_eq_3c30021c243b64cd: function(arg0, arg1) {
2053
+ const ret = getObject(arg0) == getObject(arg1);
2054
+ return ret;
2055
+ },
2056
+ __wbg___wbindgen_number_get_1dc732b810cb937c: function(arg0, arg1) {
2057
+ const obj = getObject(arg1);
2058
+ const ret = typeof obj === "number" ? obj : void 0;
2059
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2060
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2061
+ },
2062
+ __wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
2063
+ const obj = getObject(arg1);
2064
+ const ret = typeof obj === "string" ? obj : void 0;
2065
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2066
+ var len1 = WASM_VECTOR_LEN;
2067
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2068
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2069
+ },
2070
+ __wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
2071
+ throw new Error(getStringFromWasm0(arg0, arg1));
2072
+ },
2073
+ __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
2074
+ getObject(arg0)._wbg_cb_unref();
2075
+ },
2076
+ __wbg_abort_03f8c5804715cb9a: function(arg0, arg1) {
2077
+ getObject(arg0).abort(getObject(arg1));
2078
+ },
2079
+ __wbg_abort_76dea11221098ae5: function(arg0) {
2080
+ getObject(arg0).abort();
2081
+ },
2082
+ __wbg_append_8e87c13f0f08f8cd: function() {
2083
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2084
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2085
+ }, arguments);
2086
+ },
2087
+ __wbg_arrayBuffer_06f3da76f071d37f: function() {
2088
+ return handleError(function(arg0) {
2089
+ const ret = getObject(arg0).arrayBuffer();
2090
+ return addHeapObject(ret);
2091
+ }, arguments);
2092
+ },
2093
+ __wbg_authorizeresult_new: function(arg0) {
2094
+ const ret = AuthorizeResult.__wrap(arg0);
2095
+ return addHeapObject(ret);
2096
+ },
2097
+ __wbg_batchauthorizemultiissuerresponse_new: function(arg0) {
2098
+ const ret = BatchAuthorizeMultiIssuerResponse.__wrap(arg0);
2099
+ return addHeapObject(ret);
2100
+ },
2101
+ __wbg_batchauthorizeunsignedresponse_new: function(arg0) {
2102
+ const ret = BatchAuthorizeUnsignedResponse.__wrap(arg0);
2103
+ return addHeapObject(ret);
2104
+ },
2105
+ __wbg_batchitemmultiissuerresult_new: function(arg0) {
2106
+ const ret = BatchItemMultiIssuerResult.__wrap(arg0);
2107
+ return addHeapObject(ret);
2108
+ },
2109
+ __wbg_batchitemunsignedresult_new: function(arg0) {
2110
+ const ret = BatchItemUnsignedResult.__wrap(arg0);
2111
+ return addHeapObject(ret);
2112
+ },
2113
+ __wbg_body_9ee03724e9ad0639: function(arg0) {
2114
+ const ret = getObject(arg0).body;
2115
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2116
+ },
2117
+ __wbg_buffer_4a989bded7035f57: function(arg0) {
2118
+ const ret = getObject(arg0).buffer;
2119
+ return addHeapObject(ret);
2120
+ },
2121
+ __wbg_byobRequest_f161fc37241dd3d4: function(arg0) {
2122
+ const ret = getObject(arg0).byobRequest;
2123
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2124
+ },
2125
+ __wbg_byteLength_0ddb1795e2c7e689: function(arg0) {
2126
+ const ret = getObject(arg0).byteLength;
2127
+ return ret;
2128
+ },
2129
+ __wbg_byteOffset_46eb015f52b6ad7d: function(arg0) {
2130
+ const ret = getObject(arg0).byteOffset;
2131
+ return ret;
2132
+ },
2133
+ __wbg_call_269c5566fbede3eb: function() {
2134
+ return handleError(function(arg0, arg1) {
2135
+ const ret = getObject(arg0).call(getObject(arg1));
2136
+ return addHeapObject(ret);
2137
+ }, arguments);
2138
+ },
2139
+ __wbg_call_6bcf8d3e20937e46: function() {
2140
+ return handleError(function(arg0, arg1, arg2) {
2141
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2142
+ return addHeapObject(ret);
2143
+ }, arguments);
2144
+ },
2145
+ __wbg_cancel_c076350a7e8954be: function(arg0) {
2146
+ const ret = getObject(arg0).cancel();
2147
+ return addHeapObject(ret);
2148
+ },
2149
+ __wbg_catch_e2134ef6dcdb69ed: function(arg0, arg1) {
2150
+ const ret = getObject(arg0).catch(getObject(arg1));
2151
+ return addHeapObject(ret);
2152
+ },
2153
+ __wbg_cedarling_new: function(arg0) {
2154
+ const ret = Cedarling.__wrap(arg0);
2155
+ return addHeapObject(ret);
2156
+ },
2157
+ __wbg_clearTimeout_1daad5c6ee4fcd3b: function(arg0) {
2158
+ const ret = clearTimeout(takeObject(arg0));
2159
+ return addHeapObject(ret);
2160
+ },
2161
+ __wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
2162
+ const ret = clearTimeout(takeObject(arg0));
2163
+ return addHeapObject(ret);
2164
+ },
2165
+ __wbg_clearTimeout_fa0abacb8606b0a7: function(arg0) {
2166
+ const ret = clearTimeout(takeObject(arg0));
2167
+ return addHeapObject(ret);
2168
+ },
2169
+ __wbg_close_22882088c136df25: function() {
2170
+ return handleError(function(arg0) {
2171
+ getObject(arg0).close();
2172
+ }, arguments);
2173
+ },
2174
+ __wbg_close_8b609460dd26e367: function() {
2175
+ return handleError(function(arg0) {
2176
+ getObject(arg0).close();
2177
+ }, arguments);
2178
+ },
2179
+ __wbg_crypto_38df2bab126b63dc: function(arg0) {
2180
+ const ret = getObject(arg0).crypto;
2181
+ return addHeapObject(ret);
2182
+ },
2183
+ __wbg_dataentry_new: function(arg0) {
2184
+ const ret = DataEntry.__wrap(arg0);
2185
+ return addHeapObject(ret);
2186
+ },
2187
+ __wbg_debug_05a311ddbfef3a8f: function(arg0) {
2188
+ console.debug(...getObject(arg0));
2189
+ },
2190
+ __wbg_done_cffed884d87aa22e: function(arg0) {
2191
+ const ret = getObject(arg0).done;
2192
+ return ret;
2193
+ },
2194
+ __wbg_enqueue_6cb545d22db14f33: function() {
2195
+ return handleError(function(arg0, arg1) {
2196
+ getObject(arg0).enqueue(getObject(arg1));
2197
+ }, arguments);
2198
+ },
2199
+ __wbg_entries_20b9608d57d8ddd6: function(arg0) {
2200
+ const ret = getObject(arg0).entries();
2201
+ return addHeapObject(ret);
2202
+ },
2203
+ __wbg_entries_972a87586902cf87: function(arg0) {
2204
+ const ret = Object.entries(getObject(arg0));
2205
+ return addHeapObject(ret);
2206
+ },
2207
+ __wbg_entries_f9de04c09a57314e: function(arg0) {
2208
+ const ret = getObject(arg0).entries();
2209
+ return addHeapObject(ret);
2210
+ },
2211
+ __wbg_error_b73a4f5824169740: function(arg0) {
2212
+ console.error(...getObject(arg0));
2213
+ },
2214
+ __wbg_fetch_37b5c90ecd638071: function(arg0, arg1) {
2215
+ const ret = fetch(getObject(arg0), getObject(arg1));
2216
+ return addHeapObject(ret);
2217
+ },
2218
+ __wbg_fetch_7a37768ab67c5bd8: function(arg0) {
2219
+ const ret = fetch(getObject(arg0));
2220
+ return addHeapObject(ret);
2221
+ },
2222
+ __wbg_fetch_920242d59bac2026: function(arg0, arg1) {
2223
+ const ret = getObject(arg0).fetch(getObject(arg1));
2224
+ return addHeapObject(ret);
2225
+ },
2226
+ __wbg_fetch_db3df7e2da5d3a3b: function(arg0, arg1, arg2) {
2227
+ const ret = getObject(arg0).fetch(getObject(arg1), getObject(arg2));
2228
+ return addHeapObject(ret);
2229
+ },
2230
+ __wbg_fromEntries_7b28aba4b67dea2a: function() {
2231
+ return handleError(function(arg0) {
2232
+ const ret = Object.fromEntries(getObject(arg0));
2233
+ return addHeapObject(ret);
2234
+ }, arguments);
2235
+ },
2236
+ __wbg_getRandomValues_436a51d0629d84e1: function() {
2237
+ return handleError(function(arg0, arg1) {
2238
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
2239
+ }, arguments);
2240
+ },
2241
+ __wbg_getRandomValues_c44a50d8cfdaebeb: function() {
2242
+ return handleError(function(arg0, arg1) {
2243
+ getObject(arg0).getRandomValues(getObject(arg1));
2244
+ }, arguments);
2245
+ },
2246
+ __wbg_getReader_bf34f92ee19c42b4: function() {
2247
+ return handleError(function(arg0) {
2248
+ const ret = getObject(arg0).getReader();
2249
+ return addHeapObject(ret);
2250
+ }, arguments);
2251
+ },
2252
+ __wbg_getTime_65922ba0b59d55a7: function(arg0) {
2253
+ const ret = getObject(arg0).getTime();
2254
+ return ret;
2255
+ },
2256
+ __wbg_getTimezoneOffset_6e4850ad528ac37d: function(arg0) {
2257
+ const ret = getObject(arg0).getTimezoneOffset();
2258
+ return ret;
2259
+ },
2260
+ __wbg_get_6cf5a4d4d8ad3c5a: function() {
2261
+ return handleError(function(arg0, arg1) {
2262
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
2263
+ return addHeapObject(ret);
2264
+ }, arguments);
2265
+ },
2266
+ __wbg_get_989d0a1309644f2b: function() {
2267
+ return handleError(function(arg0, arg1) {
2268
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
2269
+ return addHeapObject(ret);
2270
+ }, arguments);
2271
+ },
2272
+ __wbg_get_b1f0ab13c737f856: function(arg0, arg1) {
2273
+ const ret = getObject(arg0)[arg1 >>> 0];
2274
+ return addHeapObject(ret);
2275
+ },
2276
+ __wbg_get_done_a668aa62d81fad70: function(arg0) {
2277
+ const ret = getObject(arg0).done;
2278
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
2279
+ },
2280
+ __wbg_get_unchecked_363572bdd397d473: function(arg0, arg1) {
2281
+ const ret = getObject(arg0)[arg1 >>> 0];
2282
+ return addHeapObject(ret);
2283
+ },
2284
+ __wbg_get_value_6c62a77c168d825a: function(arg0) {
2285
+ const ret = getObject(arg0).value;
2286
+ return addHeapObject(ret);
2287
+ },
2288
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
2289
+ const ret = getObject(arg0)[getObject(arg1)];
2290
+ return addHeapObject(ret);
2291
+ },
2292
+ __wbg_has_464f8b9416279d65: function() {
2293
+ return handleError(function(arg0, arg1) {
2294
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
2295
+ return ret;
2296
+ }, arguments);
2297
+ },
2298
+ __wbg_headers_2594464ff62969f3: function(arg0) {
2299
+ const ret = getObject(arg0).headers;
2300
+ return addHeapObject(ret);
2301
+ },
2302
+ __wbg_info_e117f690cadd7085: function(arg0) {
2303
+ console.info(...getObject(arg0));
2304
+ },
2305
+ __wbg_instanceof_ArrayBuffer_d4ff01f8247925ae: function(arg0) {
2306
+ let result;
2307
+ try {
2308
+ result = getObject(arg0) instanceof ArrayBuffer;
2309
+ } catch (_) {
2310
+ result = false;
2311
+ }
2312
+ const ret = result;
2313
+ return ret;
2314
+ },
2315
+ __wbg_instanceof_Array_fb99baf356838802: function(arg0) {
2316
+ let result;
2317
+ try {
2318
+ result = getObject(arg0) instanceof Array;
2319
+ } catch (_) {
2320
+ result = false;
2321
+ }
2322
+ const ret = result;
2323
+ return ret;
2324
+ },
2325
+ __wbg_instanceof_Map_1ff6a2b54c899f0d: function(arg0) {
2326
+ let result;
2327
+ try {
2328
+ result = getObject(arg0) instanceof Map;
2329
+ } catch (_) {
2330
+ result = false;
2331
+ }
2332
+ const ret = result;
2333
+ return ret;
2334
+ },
2335
+ __wbg_instanceof_Response_6366a785e400039b: function(arg0) {
2336
+ let result;
2337
+ try {
2338
+ result = getObject(arg0) instanceof Response;
2339
+ } catch (_) {
2340
+ result = false;
2341
+ }
2342
+ const ret = result;
2343
+ return ret;
2344
+ },
2345
+ __wbg_instanceof_Uint8Array_598adc0fef426aa8: function(arg0) {
2346
+ let result;
2347
+ try {
2348
+ result = getObject(arg0) instanceof Uint8Array;
2349
+ } catch (_) {
2350
+ result = false;
2351
+ }
2352
+ const ret = result;
2353
+ return ret;
2354
+ },
2355
+ __wbg_isArray_5674713bb7b79043: function(arg0) {
2356
+ const ret = Array.isArray(getObject(arg0));
2357
+ return ret;
2358
+ },
2359
+ __wbg_isSafeInteger_8f51c743827d1ec5: function(arg0) {
2360
+ const ret = Number.isSafeInteger(getObject(arg0));
2361
+ return ret;
2362
+ },
2363
+ __wbg_iterator_22ddeb808cf55a6f: function() {
2364
+ const ret = Symbol.iterator;
2365
+ return addHeapObject(ret);
2366
+ },
2367
+ __wbg_keys_6efc298980178da1: function(arg0) {
2368
+ const ret = Object.keys(getObject(arg0));
2369
+ return addHeapObject(ret);
2370
+ },
2371
+ __wbg_length_31bdaf014f5fbde2: function(arg0) {
2372
+ const ret = getObject(arg0).length;
2373
+ return ret;
2374
+ },
2375
+ __wbg_length_4e1adc0d42e23620: function(arg0) {
2376
+ const ret = getObject(arg0).length;
2377
+ return ret;
2378
+ },
2379
+ __wbg_log_16ab6e7183963f7e: function(arg0) {
2380
+ console.log(...getObject(arg0));
2381
+ },
2382
+ __wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
2383
+ const ret = getObject(arg0).msCrypto;
2384
+ return addHeapObject(ret);
2385
+ },
2386
+ __wbg_multiissuerauthorizeresult_new: function(arg0) {
2387
+ const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
2388
+ return addHeapObject(ret);
2389
+ },
2390
+ __wbg_new_0_35540e542ba689d2: function() {
2391
+ const ret = /* @__PURE__ */ new Date();
2392
+ return addHeapObject(ret);
2393
+ },
2394
+ __wbg_new_0afe64b4dc16ab74: function() {
2395
+ return handleError(function() {
2396
+ const ret = new Headers();
2397
+ return addHeapObject(ret);
2398
+ }, arguments);
2399
+ },
2400
+ __wbg_new_180f1022bb6ee517: function(arg0) {
2401
+ const ret = new Date(getObject(arg0));
2402
+ return addHeapObject(ret);
2403
+ },
2404
+ __wbg_new_1da3429bc3c4541c: function(arg0) {
2405
+ const ret = new Uint8Array(getObject(arg0));
2406
+ return addHeapObject(ret);
2407
+ },
2408
+ __wbg_new_8d36e20aa758e411: function() {
2409
+ const ret = /* @__PURE__ */ new Map();
2410
+ return addHeapObject(ret);
2411
+ },
2412
+ __wbg_new_a32a1ab6c6655abe: function(arg0, arg1) {
2413
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2414
+ return addHeapObject(ret);
2415
+ },
2416
+ __wbg_new_baa0a0207935dd43: function() {
2417
+ return handleError(function() {
2418
+ const ret = new AbortController();
2419
+ return addHeapObject(ret);
2420
+ }, arguments);
2421
+ },
2422
+ __wbg_new_bebc3f4757acf305: function() {
2423
+ const ret = new Object();
2424
+ return addHeapObject(ret);
2425
+ },
2426
+ __wbg_new_ffa92086ea89f79c: function() {
2427
+ const ret = new Array();
2428
+ return addHeapObject(ret);
2429
+ },
2430
+ __wbg_new_from_slice_4ee02165f9de919e: function(arg0, arg1) {
2431
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
2432
+ return addHeapObject(ret);
2433
+ },
2434
+ __wbg_new_typed_6f8b0d724fe26c07: function(arg0, arg1) {
2435
+ try {
2436
+ var state0 = { a: arg0, b: arg1 };
2437
+ var cb0 = (arg02, arg12) => {
2438
+ const a = state0.a;
2439
+ state0.a = 0;
2440
+ try {
2441
+ return __wasm_bindgen_func_elem_8955(a, state0.b, arg02, arg12);
2442
+ } finally {
2443
+ state0.a = a;
2444
+ }
2445
+ };
2446
+ const ret = new Promise(cb0);
2447
+ return addHeapObject(ret);
2448
+ } finally {
2449
+ state0.a = 0;
2450
+ }
2451
+ },
2452
+ __wbg_new_with_byte_offset_and_length_492c969e8b5da8a4: function(arg0, arg1, arg2) {
2453
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2454
+ return addHeapObject(ret);
2455
+ },
2456
+ __wbg_new_with_length_5ffeddb9d9fbb96f: function(arg0) {
2457
+ const ret = new Uint8Array(arg0 >>> 0);
2458
+ return addHeapObject(ret);
2459
+ },
2460
+ __wbg_new_with_str_and_init_2f31a77deda127fd: function() {
2461
+ return handleError(function(arg0, arg1, arg2) {
2462
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
2463
+ return addHeapObject(ret);
2464
+ }, arguments);
2465
+ },
2466
+ __wbg_next_95053e306b1c3aed: function(arg0) {
2467
+ const ret = getObject(arg0).next;
2468
+ return addHeapObject(ret);
2469
+ },
2470
+ __wbg_next_f31ecb8646d2c605: function() {
2471
+ return handleError(function(arg0) {
2472
+ const ret = getObject(arg0).next();
2473
+ return addHeapObject(ret);
2474
+ }, arguments);
2475
+ },
2476
+ __wbg_node_84ea875411254db1: function(arg0) {
2477
+ const ret = getObject(arg0).node;
2478
+ return addHeapObject(ret);
2479
+ },
2480
+ __wbg_policyevaluationerror_new: function(arg0) {
2481
+ const ret = PolicyEvaluationError.__wrap(arg0);
2482
+ return addHeapObject(ret);
2483
+ },
2484
+ __wbg_process_44c7a14e11e9f69e: function(arg0) {
2485
+ const ret = getObject(arg0).process;
2486
+ return addHeapObject(ret);
2487
+ },
2488
+ __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
2489
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
2490
+ },
2491
+ __wbg_push_bfdf956ba476f65b: function(arg0, arg1) {
2492
+ const ret = getObject(arg0).push(getObject(arg1));
2493
+ return ret;
2494
+ },
2495
+ __wbg_queueMicrotask_85c90f6987555d65: function(arg0) {
2496
+ const ret = getObject(arg0).queueMicrotask;
2497
+ return addHeapObject(ret);
2498
+ },
2499
+ __wbg_queueMicrotask_f6a1fa10b81d1fc0: function(arg0) {
2500
+ queueMicrotask(getObject(arg0));
2501
+ },
2502
+ __wbg_randomFillSync_6c25eac9869eb53c: function() {
2503
+ return handleError(function(arg0, arg1) {
2504
+ getObject(arg0).randomFillSync(takeObject(arg1));
2505
+ }, arguments);
2506
+ },
2507
+ __wbg_read_31091533ffadf971: function(arg0) {
2508
+ const ret = getObject(arg0).read();
2509
+ return addHeapObject(ret);
2510
+ },
2511
+ __wbg_releaseLock_1538945f5f183d9f: function(arg0) {
2512
+ getObject(arg0).releaseLock();
2513
+ },
2514
+ __wbg_require_b4edbdcf3e2a1ef0: function() {
2515
+ return handleError(function() {
2516
+ const ret = module.require;
2517
+ return addHeapObject(ret);
2518
+ }, arguments);
2519
+ },
2520
+ __wbg_resolve_35ec7e0c6af4c82c: function(arg0) {
2521
+ const ret = Promise.resolve(getObject(arg0));
2522
+ return addHeapObject(ret);
2523
+ },
2524
+ __wbg_respond_83a71686e927ca32: function() {
2525
+ return handleError(function(arg0, arg1) {
2526
+ getObject(arg0).respond(arg1 >>> 0);
2527
+ }, arguments);
2528
+ },
2529
+ __wbg_setTimeout_56bcdccbad22fd44: function() {
2530
+ return handleError(function(arg0, arg1) {
2531
+ const ret = setTimeout(getObject(arg0), arg1);
2532
+ return addHeapObject(ret);
2533
+ }, arguments);
2534
+ },
2535
+ __wbg_setTimeout_9c23a5767d86152f: function(arg0, arg1) {
2536
+ const ret = setTimeout(getObject(arg0), arg1);
2537
+ return addHeapObject(ret);
2538
+ },
2539
+ __wbg_setTimeout_b4a9096784635514: function(arg0, arg1) {
2540
+ const ret = setTimeout(getObject(arg0), arg1);
2541
+ return addHeapObject(ret);
2542
+ },
2543
+ __wbg_set_13d25b81ab403f5e: function(arg0, arg1, arg2) {
2544
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2545
+ },
2546
+ __wbg_set_5f2ad37e5e02dc7b: function(arg0, arg1, arg2) {
2547
+ getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
2548
+ },
2549
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
2550
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2551
+ },
2552
+ __wbg_set_7923e5ea63b41e6b: function() {
2553
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2554
+ getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2555
+ }, arguments);
2556
+ },
2557
+ __wbg_set_a377297433dfea63: function() {
2558
+ return handleError(function(arg0, arg1, arg2) {
2559
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2560
+ return ret;
2561
+ }, arguments);
2562
+ },
2563
+ __wbg_set_bf6dde4923b9b059: function(arg0, arg1, arg2) {
2564
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2565
+ return addHeapObject(ret);
2566
+ },
2567
+ __wbg_set_body_f39cee72c74a5b02: function(arg0, arg1) {
2568
+ getObject(arg0).body = getObject(arg1);
2569
+ },
2570
+ __wbg_set_cache_6e8c35a5ed76edb1: function(arg0, arg1) {
2571
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
2572
+ },
2573
+ __wbg_set_credentials_bf1d3e014213a571: function(arg0, arg1) {
2574
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
2575
+ },
2576
+ __wbg_set_headers_31d373f68f28bf76: function(arg0, arg1) {
2577
+ getObject(arg0).headers = getObject(arg1);
2578
+ },
2579
+ __wbg_set_integrity_d3d0eab9ab838204: function(arg0, arg1, arg2) {
2580
+ getObject(arg0).integrity = getStringFromWasm0(arg1, arg2);
2581
+ },
2582
+ __wbg_set_method_82e6c3c083da0734: function(arg0, arg1, arg2) {
2583
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
2584
+ },
2585
+ __wbg_set_mode_f7e56ed768d0ade0: function(arg0, arg1) {
2586
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
2587
+ },
2588
+ __wbg_set_redirect_96061705212f7800: function(arg0, arg1) {
2589
+ getObject(arg0).redirect = __wbindgen_enum_RequestRedirect[arg1];
2590
+ },
2591
+ __wbg_set_referrer_13cf56bbccbb2ceb: function(arg0, arg1, arg2) {
2592
+ getObject(arg0).referrer = getStringFromWasm0(arg1, arg2);
2593
+ },
2594
+ __wbg_set_referrer_policy_dac1caa6e937479a: function(arg0, arg1) {
2595
+ getObject(arg0).referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
2596
+ },
2597
+ __wbg_set_signal_f4b32f40f19786f4: function(arg0, arg1) {
2598
+ getObject(arg0).signal = getObject(arg1);
2599
+ },
2600
+ __wbg_signal_45367c6c2255877a: function(arg0) {
2601
+ const ret = getObject(arg0).signal;
2602
+ return addHeapObject(ret);
2603
+ },
2604
+ __wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
2605
+ const ret = typeof global === "undefined" ? null : global;
2606
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2607
+ },
2608
+ __wbg_static_accessor_GLOBAL_THIS_1e7044f654e934db: function() {
2609
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
2610
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2611
+ },
2612
+ __wbg_static_accessor_SELF_d8b50611246a6d92: function() {
2613
+ const ret = typeof self === "undefined" ? null : self;
2614
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2615
+ },
2616
+ __wbg_static_accessor_WINDOW_fd0bc376bf0f8b42: function() {
2617
+ const ret = typeof window === "undefined" ? null : window;
2618
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2619
+ },
2620
+ __wbg_status_88ccc72fe7bea621: function(arg0) {
2621
+ const ret = getObject(arg0).status;
2622
+ return ret;
2623
+ },
2624
+ __wbg_subarray_1daff70dde20c145: function(arg0, arg1, arg2) {
2625
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2626
+ return addHeapObject(ret);
2627
+ },
2628
+ __wbg_then_7a850dae4493f353: function(arg0, arg1, arg2) {
2629
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2630
+ return addHeapObject(ret);
2631
+ },
2632
+ __wbg_then_b830475380919203: function(arg0, arg1) {
2633
+ const ret = getObject(arg0).then(getObject(arg1));
2634
+ return addHeapObject(ret);
2635
+ },
2636
+ __wbg_toString_794a30e85c994f2a: function(arg0) {
2637
+ const ret = getObject(arg0).toString();
2638
+ return addHeapObject(ret);
2639
+ },
2640
+ __wbg_trace_584ab86b20e4c341: function(arg0) {
2641
+ console.trace(...getObject(arg0));
2642
+ },
2643
+ __wbg_url_f1948b0d7f881e02: function(arg0, arg1) {
2644
+ const ret = getObject(arg1).url;
2645
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2646
+ const len1 = WASM_VECTOR_LEN;
2647
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2648
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2649
+ },
2650
+ __wbg_value_c227f843d21da141: function(arg0) {
2651
+ const ret = getObject(arg0).value;
2652
+ return addHeapObject(ret);
2653
+ },
2654
+ __wbg_versions_276b2795b1c6a219: function(arg0) {
2655
+ const ret = getObject(arg0).versions;
2656
+ return addHeapObject(ret);
2657
+ },
2658
+ __wbg_view_d8c7b26e4d4650f1: function(arg0) {
2659
+ const ret = getObject(arg0).view;
2660
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2661
+ },
2662
+ __wbg_warn_0bd6e4ae163b14e2: function(arg0) {
2663
+ console.warn(...getObject(arg0));
2664
+ },
2665
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
2666
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_8900);
2667
+ return addHeapObject(ret);
2668
+ },
2669
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
2670
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12460);
2671
+ return addHeapObject(ret);
2672
+ },
2673
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
2674
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_8734);
2675
+ return addHeapObject(ret);
2676
+ },
2677
+ __wbindgen_generic_0000000000000004: function(arg0) {
2678
+ const ret = arg0;
2679
+ return addHeapObject(ret);
2680
+ },
2681
+ __wbindgen_generic_0000000000000005: function(arg0) {
2682
+ const ret = arg0;
2683
+ return addHeapObject(ret);
2684
+ },
2685
+ __wbindgen_generic_0000000000000006: function(arg0, arg1) {
2686
+ const ret = getArrayU8FromWasm0(arg0, arg1);
2687
+ return addHeapObject(ret);
2688
+ },
2689
+ __wbindgen_generic_0000000000000007: function(arg0, arg1) {
2690
+ const ret = getStringFromWasm0(arg0, arg1);
2691
+ return addHeapObject(ret);
2692
+ },
2693
+ __wbindgen_generic_0000000000000008: function(arg0) {
2694
+ const ret = BigInt.asUintN(64, arg0);
2695
+ return addHeapObject(ret);
2696
+ },
2697
+ __wbindgen_object_clone_ref: function(arg0) {
2698
+ const ret = getObject(arg0);
2699
+ return addHeapObject(ret);
2700
+ },
2701
+ __wbindgen_object_drop_ref: function(arg0) {
2702
+ takeObject(arg0);
2703
+ }
2704
+ };
2705
+ return {
2706
+ __proto__: null,
2707
+ "./cedarling_wasm_bg.js": import0
2708
+ };
2709
+ }
2710
+ function __wasm_bindgen_func_elem_8734(arg0, arg1) {
2711
+ wasm.__wasm_bindgen_func_elem_8734(arg0, arg1);
2712
+ }
2713
+ function __wasm_bindgen_func_elem_12460(arg0, arg1, arg2) {
2714
+ wasm.__wasm_bindgen_func_elem_12460(arg0, arg1, addHeapObject(arg2));
2715
+ }
2716
+ function __wasm_bindgen_func_elem_8955(arg0, arg1, arg2, arg3) {
2717
+ wasm.__wasm_bindgen_func_elem_8955(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2718
+ }
2719
+ function __wasm_bindgen_func_elem_8900(arg0, arg1, arg2) {
2720
+ try {
2721
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2722
+ wasm.__wasm_bindgen_func_elem_8900(retptr, arg0, arg1, addHeapObject(arg2));
2723
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2724
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2725
+ if (r1) {
2726
+ throw takeObject(r0);
2727
+ }
2728
+ } finally {
2729
+ wasm.__wbindgen_add_to_stack_pointer(16);
2730
+ }
2731
+ }
2732
+ var __wbindgen_enum_ReadableStreamType = ["bytes"];
2733
+ var __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
2734
+ var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
2735
+ var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
2736
+ var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
2737
+ var __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
2738
+ var AuthorizeResultFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2739
+ }, unregister: () => {
2740
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_authorizeresult_free(ptr, 1));
2741
+ var AuthorizeResultResponseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2742
+ }, unregister: () => {
2743
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_authorizeresultresponse_free(ptr, 1));
2744
+ var BatchAuthorizeMultiIssuerResponseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2745
+ }, unregister: () => {
2746
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_batchauthorizemultiissuerresponse_free(ptr, 1));
2747
+ var BatchAuthorizeUnsignedResponseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2748
+ }, unregister: () => {
2749
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_batchauthorizeunsignedresponse_free(ptr, 1));
2750
+ var BatchItemErrorFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2751
+ }, unregister: () => {
2752
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_batchitemerror_free(ptr, 1));
2753
+ var BatchItemMultiIssuerResultFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2754
+ }, unregister: () => {
2755
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_batchitemmultiissuerresult_free(ptr, 1));
2756
+ var BatchItemUnsignedResultFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2757
+ }, unregister: () => {
2758
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_batchitemunsignedresult_free(ptr, 1));
2759
+ var CedarlingFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2760
+ }, unregister: () => {
2761
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_cedarling_free(ptr, 1));
2762
+ var DataEntryFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2763
+ }, unregister: () => {
2764
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_dataentry_free(ptr, 1));
2765
+ var DataStoreStatsFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2766
+ }, unregister: () => {
2767
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_datastorestats_free(ptr, 1));
2768
+ var DiagnosticsFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2769
+ }, unregister: () => {
2770
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_diagnostics_free(ptr, 1));
2771
+ var IntoUnderlyingByteSourceFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2772
+ }, unregister: () => {
2773
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
2774
+ var IntoUnderlyingSinkFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2775
+ }, unregister: () => {
2776
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_intounderlyingsink_free(ptr, 1));
2777
+ var IntoUnderlyingSourceFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2778
+ }, unregister: () => {
2779
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_intounderlyingsource_free(ptr, 1));
2780
+ var MultiIssuerAuthorizeResultFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2781
+ }, unregister: () => {
2782
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_multiissuerauthorizeresult_free(ptr, 1));
2783
+ var PolicyEvaluationErrorFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2784
+ }, unregister: () => {
2785
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_policyevaluationerror_free(ptr, 1));
2786
+ function addHeapObject(obj) {
2787
+ if (heap_next === heap.length) heap.push(heap.length + 1);
2788
+ const idx = heap_next;
2789
+ heap_next = heap[idx];
2790
+ heap[idx] = obj;
2791
+ return idx;
2792
+ }
2793
+ function _assertClass(instance, klass) {
2794
+ if (!(instance instanceof klass)) {
2795
+ throw new Error(`expected instance of ${klass.name}`);
2796
+ }
2797
+ }
2798
+ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
2799
+ }, unregister: () => {
2800
+ } } : new FinalizationRegistry((state) => wasm.__wbindgen_export4(state.a, state.b));
2801
+ function debugString(val) {
2802
+ const type = typeof val;
2803
+ if (type == "number" || type == "boolean" || val == null) {
2804
+ return `${val}`;
2805
+ }
2806
+ if (type == "string") {
2807
+ return `"${val}"`;
2808
+ }
2809
+ if (type == "symbol") {
2810
+ const description = val.description;
2811
+ if (description == null) {
2812
+ return "Symbol";
2813
+ } else {
2814
+ return `Symbol(${description})`;
2815
+ }
2816
+ }
2817
+ if (type == "function") {
2818
+ const name = val.name;
2819
+ if (typeof name == "string" && name.length > 0) {
2820
+ return `Function(${name})`;
2821
+ } else {
2822
+ return "Function";
2823
+ }
2824
+ }
2825
+ if (Array.isArray(val)) {
2826
+ const length = val.length;
2827
+ let debug = "[";
2828
+ if (length > 0) {
2829
+ debug += debugString(val[0]);
2830
+ }
2831
+ for (let i = 1; i < length; i++) {
2832
+ debug += ", " + debugString(val[i]);
2833
+ }
2834
+ debug += "]";
2835
+ return debug;
2836
+ }
2837
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
2838
+ let className;
2839
+ if (builtInMatches && builtInMatches.length > 1) {
2840
+ className = builtInMatches[1];
2841
+ } else {
2842
+ return toString.call(val);
2843
+ }
2844
+ if (className == "Object") {
2845
+ try {
2846
+ return "Object(" + JSON.stringify(val) + ")";
2847
+ } catch (_) {
2848
+ return "Object";
2849
+ }
2850
+ }
2851
+ if (val instanceof Error) {
2852
+ return `${val.name}: ${val.message}
2853
+ ${val.stack}`;
2854
+ }
2855
+ return className;
2856
+ }
2857
+ function dropObject(idx) {
2858
+ if (idx < 1028) return;
2859
+ heap[idx] = heap_next;
2860
+ heap_next = idx;
2861
+ }
2862
+ function getArrayJsValueFromWasm0(ptr, len) {
2863
+ ptr = ptr >>> 0;
2864
+ const mem = getDataViewMemory0();
2865
+ const result = [];
2866
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
2867
+ result.push(takeObject(mem.getUint32(i, true)));
2868
+ }
2869
+ return result;
2870
+ }
2871
+ function getArrayU8FromWasm0(ptr, len) {
2872
+ ptr = ptr >>> 0;
2873
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
2874
+ }
2875
+ var cachedDataViewMemory0 = null;
2876
+ function getDataViewMemory0() {
2877
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
2878
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
2879
+ }
2880
+ return cachedDataViewMemory0;
2881
+ }
2882
+ function getStringFromWasm0(ptr, len) {
2883
+ return decodeText(ptr >>> 0, len);
2884
+ }
2885
+ var cachedUint8ArrayMemory0 = null;
2886
+ function getUint8ArrayMemory0() {
2887
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2888
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2889
+ }
2890
+ return cachedUint8ArrayMemory0;
2891
+ }
2892
+ function getObject(idx) {
2893
+ return heap[idx];
2894
+ }
2895
+ function handleError(f, args) {
2896
+ try {
2897
+ return f.apply(this, args);
2898
+ } catch (e) {
2899
+ wasm.__wbindgen_export3(addHeapObject(e));
2900
+ }
2901
+ }
2902
+ var heap = new Array(1024).fill(void 0);
2903
+ heap.push(void 0, null, true, false);
2904
+ var heap_next = heap.length;
2905
+ function isLikeNone(x) {
2906
+ return x === void 0 || x === null;
2907
+ }
2908
+ function makeMutClosure(arg0, arg1, f) {
2909
+ const state = { a: arg0, b: arg1, cnt: 1 };
2910
+ const real = (...args) => {
2911
+ state.cnt++;
2912
+ const a = state.a;
2913
+ state.a = 0;
2914
+ try {
2915
+ return f(a, state.b, ...args);
2916
+ } finally {
2917
+ state.a = a;
2918
+ real._wbg_cb_unref();
2919
+ }
2920
+ };
2921
+ real._wbg_cb_unref = () => {
2922
+ if (--state.cnt === 0) {
2923
+ wasm.__wbindgen_export4(state.a, state.b);
2924
+ state.a = 0;
2925
+ CLOSURE_DTORS.unregister(state);
2926
+ }
2927
+ };
2928
+ CLOSURE_DTORS.register(real, state, state);
2929
+ return real;
2930
+ }
2931
+ function passArrayJsValueToWasm0(array, malloc) {
2932
+ const ptr = malloc(array.length * 4, 4) >>> 0;
2933
+ const mem = getDataViewMemory0();
2934
+ for (let i = 0; i < array.length; i++) {
2935
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
2936
+ }
2937
+ WASM_VECTOR_LEN = array.length;
2938
+ return ptr;
2939
+ }
2940
+ function passStringToWasm0(arg, malloc, realloc) {
2941
+ if (realloc === void 0) {
2942
+ const buf = cachedTextEncoder.encode(arg);
2943
+ const ptr2 = malloc(buf.length, 1) >>> 0;
2944
+ getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
2945
+ WASM_VECTOR_LEN = buf.length;
2946
+ return ptr2;
2947
+ }
2948
+ let len = arg.length;
2949
+ let ptr = malloc(len, 1) >>> 0;
2950
+ const mem = getUint8ArrayMemory0();
2951
+ let offset = 0;
2952
+ for (; offset < len; offset++) {
2953
+ const code = arg.charCodeAt(offset);
2954
+ if (code > 127) break;
2955
+ mem[ptr + offset] = code;
2956
+ }
2957
+ if (offset !== len) {
2958
+ if (offset !== 0) {
2959
+ arg = arg.slice(offset);
2960
+ }
2961
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2962
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2963
+ const ret = cachedTextEncoder.encodeInto(arg, view);
2964
+ offset += ret.written;
2965
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
2966
+ }
2967
+ WASM_VECTOR_LEN = offset;
2968
+ return ptr;
2969
+ }
2970
+ function takeObject(idx) {
2971
+ const ret = getObject(idx);
2972
+ dropObject(idx);
2973
+ return ret;
2974
+ }
2975
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
2976
+ cachedTextDecoder.decode();
2977
+ var MAX_SAFARI_DECODE_BYTES = 2146435072;
2978
+ var numBytesDecoded = 0;
2979
+ function decodeText(ptr, len) {
2980
+ numBytesDecoded += len;
2981
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2982
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
2983
+ cachedTextDecoder.decode();
2984
+ numBytesDecoded = len;
2985
+ }
2986
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2987
+ }
2988
+ var cachedTextEncoder = new TextEncoder();
2989
+ if (!("encodeInto" in cachedTextEncoder)) {
2990
+ cachedTextEncoder.encodeInto = function(arg, view) {
2991
+ const buf = cachedTextEncoder.encode(arg);
2992
+ view.set(buf);
2993
+ return {
2994
+ read: arg.length,
2995
+ written: buf.length
2996
+ };
2997
+ };
2998
+ }
2999
+ var WASM_VECTOR_LEN = 0;
3000
+ var wasmModule;
3001
+ var wasmInstance;
3002
+ var wasm;
3003
+ function __wbg_finalize_init(instance, module2) {
3004
+ wasmInstance = instance;
3005
+ wasm = instance.exports;
3006
+ wasmModule = module2;
3007
+ cachedDataViewMemory0 = null;
3008
+ cachedUint8ArrayMemory0 = null;
3009
+ return wasm;
3010
+ }
3011
+ async function __wbg_load(module2, imports) {
3012
+ if (typeof Response === "function" && module2 instanceof Response) {
3013
+ if (!module2.ok) {
3014
+ throw new Error(`failed to fetch Wasm: ${module2.status} ${module2.statusText} fetching '${module2.url}'`);
3015
+ }
3016
+ if (typeof WebAssembly.instantiateStreaming === "function") {
3017
+ try {
3018
+ return await WebAssembly.instantiateStreaming(module2, imports);
3019
+ } catch (e) {
3020
+ const validResponse = expectedResponseType(module2.type);
3021
+ if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
3022
+ 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);
3023
+ } else {
3024
+ throw e;
3025
+ }
3026
+ }
3027
+ }
3028
+ const bytes = await module2.arrayBuffer();
3029
+ return await WebAssembly.instantiate(bytes, imports);
3030
+ } else {
3031
+ const instance = await WebAssembly.instantiate(module2, imports);
3032
+ if (instance instanceof WebAssembly.Instance) {
3033
+ return { instance, module: module2 };
3034
+ } else {
3035
+ return instance;
3036
+ }
3037
+ }
3038
+ function expectedResponseType(type) {
3039
+ switch (type) {
3040
+ case "basic":
3041
+ case "cors":
3042
+ case "default":
3043
+ return true;
3044
+ }
3045
+ return false;
3046
+ }
3047
+ }
3048
+ function initSync(module2) {
3049
+ if (wasm !== void 0) return wasm;
3050
+ if (module2 !== void 0) {
3051
+ if (Object.getPrototypeOf(module2) === Object.prototype) {
3052
+ ({ module: module2 } = module2);
3053
+ } else {
3054
+ console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
3055
+ }
3056
+ }
3057
+ const imports = __wbg_get_imports();
3058
+ if (!(module2 instanceof WebAssembly.Module)) {
3059
+ try {
3060
+ WebAssembly.Module.exports(module2);
3061
+ } catch {
3062
+ module2 = new WebAssembly.Module(module2);
3063
+ }
3064
+ }
3065
+ const instance = new WebAssembly.Instance(module2, imports);
3066
+ return __wbg_finalize_init(instance, module2);
3067
+ }
3068
+ async function __wbg_init(module_or_path) {
3069
+ if (wasm !== void 0) return wasm;
3070
+ if (module_or_path !== void 0) {
3071
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
3072
+ ({ module_or_path } = module_or_path);
3073
+ } else {
3074
+ console.warn("using deprecated parameters for the initialization function; pass a single object instead");
3075
+ }
3076
+ }
3077
+ if (module_or_path === void 0) {
3078
+ module_or_path = new URL(["cedarling_wasm_bg", "wasm"].join("."), import.meta.url);
3079
+ }
3080
+ const imports = __wbg_get_imports();
3081
+ if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
3082
+ module_or_path = fetch(module_or_path);
3083
+ }
3084
+ const { instance, module: module2 } = await __wbg_load(await module_or_path, imports);
3085
+ return __wbg_finalize_init(instance, module2);
3086
+ }
3087
+
3088
+ // cedarling:wasm-bytes
3089
+ var wasm_bytes_default = __cedarlingWasmBytes;
3090
+
3091
+ // .build/src/runtime.js
3092
+ function createRuntime(loadModule, initializeInput) {
3093
+ let initialized;
3094
+ function initialize(operation) {
3095
+ if (initialized === void 0) {
3096
+ const attempt = operation().catch((error) => {
3097
+ if (initialized === attempt)
3098
+ initialized = void 0;
3099
+ throw error;
3100
+ });
3101
+ initialized = attempt;
3102
+ }
3103
+ return initialized;
3104
+ }
3105
+ function initWasm2(input) {
3106
+ const moduleOrPath = input !== void 0 && typeof input === "object" && input !== null && "module_or_path" in input ? input.module_or_path : input;
3107
+ return initialize(() => {
3108
+ if (moduleOrPath === void 0) {
3109
+ return loadModule().then((module2) => initSync({ module: module2 }));
3110
+ }
3111
+ if (initializeInput === void 0) {
3112
+ throw new TypeError("Cedarling edge initialization accepts no input");
3113
+ }
3114
+ return initializeInput(moduleOrPath);
3115
+ });
3116
+ }
3117
+ function initSync3(input) {
3118
+ const output = initSync(input);
3119
+ initialized = Promise.resolve(output);
3120
+ return output;
3121
+ }
3122
+ return Object.freeze({
3123
+ initWasm: initWasm2,
3124
+ initSync: initSync3,
3125
+ async init(config) {
3126
+ await initWasm2();
3127
+ return init(config);
3128
+ },
3129
+ async initFromArchiveBytes(config, archiveBytes) {
3130
+ await initWasm2();
3131
+ return initFromArchiveBytes(config, archiveBytes);
3132
+ }
3133
+ });
3134
+ }
3135
+
3136
+ // .build/src/index.js
3137
+ var cedarling = createRuntime(async () => {
3138
+ if (typeof wasm_bytes_default === "string") {
3139
+ const response = await fetch(wasm_bytes_default);
3140
+ if (!response.ok)
3141
+ throw new Error("Cedarling WASM asset could not be loaded");
3142
+ return WebAssembly.compile(await response.arrayBuffer());
3143
+ }
3144
+ const copy = new Uint8Array(wasm_bytes_default.byteLength);
3145
+ copy.set(wasm_bytes_default);
3146
+ return WebAssembly.compile(copy);
3147
+ }, __wbg_init);
3148
+ var init2 = cedarling.init;
3149
+ var initSync2 = cedarling.initSync;
3150
+ var initWasm = cedarling.initWasm;
3151
+ var initFromArchiveBytes2 = cedarling.initFromArchiveBytes;
3152
+ export {
3153
+ initWasm as default,
3154
+ init2 as init,
3155
+ initFromArchiveBytes2 as initFromArchiveBytes,
3156
+ initSync2 as initSync,
3157
+ initWasm
3158
+ };
3159
+ //# sourceMappingURL=index.js.map