@janssenproject/cedarling_wasm 0.0.467 → 0.0.469

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