@trust0/ridb-core 1.7.36 → 1.7.38

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.
@@ -90,6 +90,13 @@ function takeObject(idx) {
90
90
  dropObject(idx);
91
91
  return ret;
92
92
  }
93
+ function addHeapObject(obj) {
94
+ if (heap_next === heap.length) heap.push(heap.length + 1);
95
+ const idx = heap_next;
96
+ heap_next = heap[idx];
97
+ heap[idx] = obj;
98
+ return idx;
99
+ }
93
100
  var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
94
101
  throw Error("TextDecoder not available");
95
102
  } };
@@ -107,13 +114,6 @@ function getStringFromWasm0(ptr, len) {
107
114
  ptr = ptr >>> 0;
108
115
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
109
116
  }
110
- function addHeapObject(obj) {
111
- if (heap_next === heap.length) heap.push(heap.length + 1);
112
- const idx = heap_next;
113
- heap_next = heap[idx];
114
- heap[idx] = obj;
115
- return idx;
116
- }
117
117
  var WASM_VECTOR_LEN = 0;
118
118
  var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
119
119
  throw Error("TextEncoder not available");
@@ -265,7 +265,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
265
265
  return real;
266
266
  }
267
267
  function __wbg_adapter_56(arg0, arg1, arg2) {
268
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcf4fe6fd0b7ccc8d(arg0, arg1, addHeapObject(arg2));
268
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha7bc4bff3dafa2ad(arg0, arg1, addHeapObject(arg2));
269
269
  }
270
270
  function makeClosure(arg0, arg1, dtor, f) {
271
271
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -288,7 +288,7 @@ function makeClosure(arg0, arg1, dtor, f) {
288
288
  function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
289
289
  try {
290
290
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
291
- wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he6024291054ff5aa(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
291
+ wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h804a1f09b692c771(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
292
292
  var r0 = getInt32Memory0()[retptr / 4 + 0];
293
293
  var r1 = getInt32Memory0()[retptr / 4 + 1];
294
294
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -301,7 +301,13 @@ function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
301
301
  }
302
302
  }
303
303
  function __wbg_adapter_62(arg0, arg1, arg2) {
304
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb6eb1f8e3b5e56e9(arg0, arg1, addHeapObject(arg2));
304
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd4647cb021495324(arg0, arg1, addHeapObject(arg2));
305
+ }
306
+ var stack_pointer = 128;
307
+ function addBorrowedObject(obj) {
308
+ if (stack_pointer == 1) throw new Error("out of js stack");
309
+ heap[--stack_pointer] = obj;
310
+ return stack_pointer;
305
311
  }
306
312
  var cachedUint32Memory0 = null;
307
313
  function getUint32Memory0() {
@@ -320,13 +326,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
320
326
  }
321
327
  return result;
322
328
  }
323
- function main_js() {
324
- wasm.main_js();
325
- }
326
- function is_debug_mode() {
327
- const ret = wasm.is_debug_mode();
328
- return ret !== 0;
329
- }
330
329
  function _assertClass(instance, klass) {
331
330
  if (!(instance instanceof klass)) {
332
331
  throw new Error(`expected instance of ${klass.name}`);
@@ -349,36 +348,40 @@ function handleError(f, args) {
349
348
  wasm.__wbindgen_exn_store(addHeapObject(e));
350
349
  }
351
350
  }
352
- var stack_pointer = 128;
353
- function addBorrowedObject(obj) {
354
- if (stack_pointer == 1) throw new Error("out of js stack");
355
- heap[--stack_pointer] = obj;
356
- return stack_pointer;
351
+ function is_debug_mode() {
352
+ const ret = wasm.is_debug_mode();
353
+ return ret !== 0;
357
354
  }
358
- function __wbgtest_console_log(args) {
355
+ function main_js() {
356
+ wasm.main_js();
357
+ }
358
+ function __wbgtest_console_info(args) {
359
359
  try {
360
- wasm.__wbgtest_console_log(addBorrowedObject(args));
360
+ wasm.__wbgtest_console_info(addBorrowedObject(args));
361
361
  } finally {
362
362
  heap[stack_pointer++] = void 0;
363
363
  }
364
364
  }
365
- function __wbgtest_console_debug(args) {
365
+ function __wbgtest_console_warn(args) {
366
366
  try {
367
- wasm.__wbgtest_console_debug(addBorrowedObject(args));
367
+ wasm.__wbgtest_console_warn(addBorrowedObject(args));
368
368
  } finally {
369
369
  heap[stack_pointer++] = void 0;
370
370
  }
371
371
  }
372
- function __wbgtest_console_info(args) {
372
+ function __wbg_adapter_287(arg0, arg1) {
373
+ wasm.wasm_bindgen__convert__closures__invoke0_mut__hc6452fdbb8c4addc(arg0, arg1);
374
+ }
375
+ function __wbgtest_console_debug(args) {
373
376
  try {
374
- wasm.__wbgtest_console_info(addBorrowedObject(args));
377
+ wasm.__wbgtest_console_debug(addBorrowedObject(args));
375
378
  } finally {
376
379
  heap[stack_pointer++] = void 0;
377
380
  }
378
381
  }
379
- function __wbgtest_console_warn(args) {
382
+ function __wbgtest_console_log(args) {
380
383
  try {
381
- wasm.__wbgtest_console_warn(addBorrowedObject(args));
384
+ wasm.__wbgtest_console_log(addBorrowedObject(args));
382
385
  } finally {
383
386
  heap[stack_pointer++] = void 0;
384
387
  }
@@ -390,14 +393,11 @@ function __wbgtest_console_error(args) {
390
393
  heap[stack_pointer++] = void 0;
391
394
  }
392
395
  }
393
- function __wbg_adapter_297(arg0, arg1) {
394
- wasm.wasm_bindgen__convert__closures__invoke0_mut__hff00333f3d941090(arg0, arg1);
395
- }
396
- function __wbg_adapter_340(arg0, arg1, arg2, arg3, arg4) {
397
- wasm.wasm_bindgen__convert__closures__invoke3_mut__h703f9c33fd3008bf(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
396
+ function __wbg_adapter_378(arg0, arg1, arg2, arg3, arg4) {
397
+ wasm.wasm_bindgen__convert__closures__invoke3_mut__h2f203dbfa61ca113(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
398
398
  }
399
- function __wbg_adapter_397(arg0, arg1, arg2, arg3) {
400
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h97988f5fa0547d24(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
399
+ function __wbg_adapter_395(arg0, arg1, arg2, arg3) {
400
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h42aa995f02b6fdcb(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
401
401
  }
402
402
  var OpType = Object.freeze({
403
403
  /**
@@ -442,6 +442,32 @@ var BasePlugin = class {
442
442
  wasm.__wbg_baseplugin_free(ptr);
443
443
  }
444
444
  /**
445
+ * @returns {any}
446
+ */
447
+ get docCreateHook() {
448
+ const ret = wasm.baseplugin_get_doc_create_hook(this.__wbg_ptr);
449
+ return takeObject(ret);
450
+ }
451
+ /**
452
+ * @param {any} hook
453
+ */
454
+ set docCreateHook(hook) {
455
+ wasm.baseplugin_set_doc_create_hook(this.__wbg_ptr, addHeapObject(hook));
456
+ }
457
+ /**
458
+ * @returns {any}
459
+ */
460
+ get docRecoverHook() {
461
+ const ret = wasm.baseplugin_get_doc_recover_hook(this.__wbg_ptr);
462
+ return takeObject(ret);
463
+ }
464
+ /**
465
+ * @param {any} hook
466
+ */
467
+ set docRecoverHook(hook) {
468
+ wasm.baseplugin_set_doc_recover_hook(this.__wbg_ptr, addHeapObject(hook));
469
+ }
470
+ /**
445
471
  * @param {string} name
446
472
  */
447
473
  constructor(name) {
@@ -469,32 +495,6 @@ var BasePlugin = class {
469
495
  const ret = wasm.baseplugin_name(this.__wbg_ptr);
470
496
  return takeObject(ret);
471
497
  }
472
- /**
473
- * @returns {any}
474
- */
475
- get docCreateHook() {
476
- const ret = wasm.baseplugin_get_doc_create_hook(this.__wbg_ptr);
477
- return takeObject(ret);
478
- }
479
- /**
480
- * @returns {any}
481
- */
482
- get docRecoverHook() {
483
- const ret = wasm.baseplugin_get_doc_recover_hook(this.__wbg_ptr);
484
- return takeObject(ret);
485
- }
486
- /**
487
- * @param {any} hook
488
- */
489
- set docCreateHook(hook) {
490
- wasm.baseplugin_set_doc_create_hook(this.__wbg_ptr, addHeapObject(hook));
491
- }
492
- /**
493
- * @param {any} hook
494
- */
495
- set docRecoverHook(hook) {
496
- wasm.baseplugin_set_doc_recover_hook(this.__wbg_ptr, addHeapObject(hook));
497
- }
498
498
  };
499
499
  var BaseStorageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
500
500
  }, unregister: () => {
@@ -511,66 +511,54 @@ var BaseStorage = class {
511
511
  wasm.__wbg_basestorage_free(ptr);
512
512
  }
513
513
  /**
514
- * Creates a new `BaseStorage` instance with the provided name and schema type.
515
- *
516
- * # Arguments
517
- *
518
- * * `name` - The name of the storage.
519
- * * `schema_type` - The schema type in `JsValue` format.
520
- *
521
- * # Returns
522
- *
523
- * * `Result<BaseStorage, JsValue>` - A result containing the new `BaseStorage` instance or an error.
524
514
  * @param {string} name
525
- * @param {object} schemas_js
526
- * @param {object | undefined} [options]
515
+ * @returns {any}
527
516
  */
528
- constructor(name, schemas_js, options) {
517
+ getOption(name) {
529
518
  try {
530
519
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
531
520
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
532
521
  const len0 = WASM_VECTOR_LEN;
533
- wasm.basestorage_new(retptr, ptr0, len0, addHeapObject(schemas_js), isLikeNone(options) ? 0 : addHeapObject(options));
522
+ wasm.basestorage_getOption(retptr, this.__wbg_ptr, ptr0, len0);
534
523
  var r0 = getInt32Memory0()[retptr / 4 + 0];
535
524
  var r1 = getInt32Memory0()[retptr / 4 + 1];
536
525
  var r2 = getInt32Memory0()[retptr / 4 + 2];
537
526
  if (r2) {
538
527
  throw takeObject(r1);
539
528
  }
540
- this.__wbg_ptr = r0 >>> 0;
541
- return this;
529
+ return takeObject(r0);
542
530
  } finally {
543
531
  wasm.__wbindgen_add_to_stack_pointer(16);
544
532
  }
545
533
  }
546
534
  /**
547
- * @returns {any}
535
+ * @param {string} name
536
+ * @returns {Schema}
548
537
  */
549
- addIndexSchemas() {
538
+ getSchema(name) {
550
539
  try {
551
540
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
552
- wasm.basestorage_addIndexSchemas(retptr, this.__wbg_ptr);
541
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
542
+ const len0 = WASM_VECTOR_LEN;
543
+ wasm.basestorage_getSchema(retptr, this.__wbg_ptr, ptr0, len0);
553
544
  var r0 = getInt32Memory0()[retptr / 4 + 0];
554
545
  var r1 = getInt32Memory0()[retptr / 4 + 1];
555
546
  var r2 = getInt32Memory0()[retptr / 4 + 2];
556
547
  if (r2) {
557
548
  throw takeObject(r1);
558
549
  }
559
- return takeObject(r0);
550
+ return Schema.__wrap(r0);
560
551
  } finally {
561
552
  wasm.__wbindgen_add_to_stack_pointer(16);
562
553
  }
563
554
  }
564
555
  /**
565
- * @param {string} name
566
556
  * @returns {any}
567
557
  */
568
- getOption(name) {
558
+ addIndexSchemas() {
569
559
  try {
570
560
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
571
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
572
- const len0 = WASM_VECTOR_LEN;
573
- wasm.basestorage_getOption(retptr, this.__wbg_ptr, ptr0, len0);
561
+ wasm.basestorage_addIndexSchemas(retptr, this.__wbg_ptr);
574
562
  var r0 = getInt32Memory0()[retptr / 4 + 0];
575
563
  var r1 = getInt32Memory0()[retptr / 4 + 1];
576
564
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -583,22 +571,34 @@ var BaseStorage = class {
583
571
  }
584
572
  }
585
573
  /**
574
+ * Creates a new `BaseStorage` instance with the provided name and schema type.
575
+ *
576
+ * # Arguments
577
+ *
578
+ * * `name` - The name of the storage.
579
+ * * `schema_type` - The schema type in `JsValue` format.
580
+ *
581
+ * # Returns
582
+ *
583
+ * * `Result<BaseStorage, JsValue>` - A result containing the new `BaseStorage` instance or an error.
586
584
  * @param {string} name
587
- * @returns {Schema}
585
+ * @param {object} schemas_js
586
+ * @param {object | undefined} [options]
588
587
  */
589
- getSchema(name) {
588
+ constructor(name, schemas_js, options) {
590
589
  try {
591
590
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
592
591
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
593
592
  const len0 = WASM_VECTOR_LEN;
594
- wasm.basestorage_getSchema(retptr, this.__wbg_ptr, ptr0, len0);
593
+ wasm.basestorage_new(retptr, ptr0, len0, addHeapObject(schemas_js), isLikeNone(options) ? 0 : addHeapObject(options));
595
594
  var r0 = getInt32Memory0()[retptr / 4 + 0];
596
595
  var r1 = getInt32Memory0()[retptr / 4 + 1];
597
596
  var r2 = getInt32Memory0()[retptr / 4 + 2];
598
597
  if (r2) {
599
598
  throw takeObject(r1);
600
599
  }
601
- return Schema.__wrap(r0);
600
+ this.__wbg_ptr = r0 >>> 0;
601
+ return this;
602
602
  } finally {
603
603
  wasm.__wbindgen_add_to_stack_pointer(16);
604
604
  }
@@ -644,38 +644,31 @@ var Collection = class _Collection {
644
644
  wasm.__wbg_collection_free(ptr);
645
645
  }
646
646
  /**
647
- * @returns {string}
647
+ * Finds and returns a single document in the collection by its ID.
648
+ *
649
+ * This function is asynchronous.
650
+ * @param {any} primary_key
651
+ * @returns {Promise<any>}
648
652
  */
649
- get name() {
650
- let deferred1_0;
651
- let deferred1_1;
652
- try {
653
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
654
- wasm.collection_name(retptr, this.__wbg_ptr);
655
- var r0 = getInt32Memory0()[retptr / 4 + 0];
656
- var r1 = getInt32Memory0()[retptr / 4 + 1];
657
- deferred1_0 = r0;
658
- deferred1_1 = r1;
659
- return getStringFromWasm0(r0, r1);
660
- } finally {
661
- wasm.__wbindgen_add_to_stack_pointer(16);
662
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
663
- }
653
+ findById(primary_key) {
654
+ const ret = wasm.collection_findById(this.__wbg_ptr, addHeapObject(primary_key));
655
+ return takeObject(ret);
664
656
  }
665
657
  /**
666
- * @returns {Schema}
658
+ * @param {any} options
659
+ * @returns {QueryOptions}
667
660
  */
668
- get schema() {
661
+ parse_query_options(options) {
669
662
  try {
670
663
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
671
- wasm.collection_schema(retptr, this.__wbg_ptr);
664
+ wasm.collection_parse_query_options(retptr, this.__wbg_ptr, addHeapObject(options));
672
665
  var r0 = getInt32Memory0()[retptr / 4 + 0];
673
666
  var r1 = getInt32Memory0()[retptr / 4 + 1];
674
667
  var r2 = getInt32Memory0()[retptr / 4 + 2];
675
668
  if (r2) {
676
669
  throw takeObject(r1);
677
670
  }
678
- return Schema.__wrap(r0);
671
+ return QueryOptions.__wrap(r0);
679
672
  } finally {
680
673
  wasm.__wbindgen_add_to_stack_pointer(16);
681
674
  }
@@ -694,22 +687,22 @@ var Collection = class _Collection {
694
687
  return takeObject(ret);
695
688
  }
696
689
  /**
697
- * @param {any} options
698
- * @returns {QueryOptions}
690
+ * @returns {string}
699
691
  */
700
- parse_query_options(options) {
692
+ get name() {
693
+ let deferred1_0;
694
+ let deferred1_1;
701
695
  try {
702
696
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
703
- wasm.collection_parse_query_options(retptr, this.__wbg_ptr, addHeapObject(options));
697
+ wasm.collection_name(retptr, this.__wbg_ptr);
704
698
  var r0 = getInt32Memory0()[retptr / 4 + 0];
705
699
  var r1 = getInt32Memory0()[retptr / 4 + 1];
706
- var r2 = getInt32Memory0()[retptr / 4 + 2];
707
- if (r2) {
708
- throw takeObject(r1);
709
- }
710
- return QueryOptions.__wrap(r0);
700
+ deferred1_0 = r0;
701
+ deferred1_1 = r1;
702
+ return getStringFromWasm0(r0, r1);
711
703
  } finally {
712
704
  wasm.__wbindgen_add_to_stack_pointer(16);
705
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
713
706
  }
714
707
  }
715
708
  /**
@@ -726,32 +719,6 @@ var Collection = class _Collection {
726
719
  return takeObject(ret);
727
720
  }
728
721
  /**
729
- * Finds and returns a single document in the collection by its ID.
730
- *
731
- * This function is asynchronous.
732
- * @param {any} primary_key
733
- * @returns {Promise<any>}
734
- */
735
- findById(primary_key) {
736
- const ret = wasm.collection_findById(this.__wbg_ptr, addHeapObject(primary_key));
737
- return takeObject(ret);
738
- }
739
- /**
740
- * Updates a document in the collection with the given data.
741
- *
742
- * This function is asynchronous and returns a `Result` indicating success or failure.
743
- *
744
- * # Arguments
745
- *
746
- * * `document` - A `JsValue` representing the partial document to update.
747
- * @param {any} document
748
- * @returns {Promise<any>}
749
- */
750
- update(document2) {
751
- const ret = wasm.collection_update(this.__wbg_ptr, addHeapObject(document2));
752
- return takeObject(ret);
753
- }
754
- /**
755
722
  * Creates a new document in the collection.
756
723
  *
757
724
  * This function is asynchronous and returns a `Result` indicating success or failure.
@@ -777,19 +744,52 @@ var Collection = class _Collection {
777
744
  const ret = wasm.collection_delete(this.__wbg_ptr, addHeapObject(primary_key));
778
745
  return takeObject(ret);
779
746
  }
780
- };
781
- var CoreStorageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
782
- }, unregister: () => {
783
- } } : new FinalizationRegistry((ptr) => wasm.__wbg_corestorage_free(ptr >>> 0));
784
- var CoreStorage = class _CoreStorage {
785
- static __wrap(ptr) {
786
- ptr = ptr >>> 0;
787
- const obj = Object.create(_CoreStorage.prototype);
788
- obj.__wbg_ptr = ptr;
789
- CoreStorageFinalization.register(obj, obj.__wbg_ptr, obj);
790
- return obj;
791
- }
792
- __destroy_into_raw() {
747
+ /**
748
+ * @returns {Schema}
749
+ */
750
+ get schema() {
751
+ try {
752
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
753
+ wasm.collection_schema(retptr, this.__wbg_ptr);
754
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
755
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
756
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
757
+ if (r2) {
758
+ throw takeObject(r1);
759
+ }
760
+ return Schema.__wrap(r0);
761
+ } finally {
762
+ wasm.__wbindgen_add_to_stack_pointer(16);
763
+ }
764
+ }
765
+ /**
766
+ * Updates a document in the collection with the given data.
767
+ *
768
+ * This function is asynchronous and returns a `Result` indicating success or failure.
769
+ *
770
+ * # Arguments
771
+ *
772
+ * * `document` - A `JsValue` representing the partial document to update.
773
+ * @param {any} document
774
+ * @returns {Promise<any>}
775
+ */
776
+ update(document2) {
777
+ const ret = wasm.collection_update(this.__wbg_ptr, addHeapObject(document2));
778
+ return takeObject(ret);
779
+ }
780
+ };
781
+ var CoreStorageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
782
+ }, unregister: () => {
783
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_corestorage_free(ptr >>> 0));
784
+ var CoreStorage = class _CoreStorage {
785
+ static __wrap(ptr) {
786
+ ptr = ptr >>> 0;
787
+ const obj = Object.create(_CoreStorage.prototype);
788
+ obj.__wbg_ptr = ptr;
789
+ CoreStorageFinalization.register(obj, obj.__wbg_ptr, obj);
790
+ return obj;
791
+ }
792
+ __destroy_into_raw() {
793
793
  const ptr = this.__wbg_ptr;
794
794
  this.__wbg_ptr = 0;
795
795
  CoreStorageFinalization.unregister(this);
@@ -800,11 +800,29 @@ var CoreStorage = class _CoreStorage {
800
800
  wasm.__wbg_corestorage_free(ptr);
801
801
  }
802
802
  /**
803
+ * @param {Schema} schema
804
+ * @param {Operation} op
805
+ * @returns {(string)[]}
803
806
  */
804
- constructor() {
805
- const ret = wasm.corestorage_new();
806
- this.__wbg_ptr = ret >>> 0;
807
- return this;
807
+ getIndexes(schema, op) {
808
+ try {
809
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
810
+ _assertClass(schema, Schema);
811
+ _assertClass(op, Operation);
812
+ wasm.corestorage_getIndexes(retptr, this.__wbg_ptr, schema.__wbg_ptr, op.__wbg_ptr);
813
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
814
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
815
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
816
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
817
+ if (r3) {
818
+ throw takeObject(r2);
819
+ }
820
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
821
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
822
+ return v1;
823
+ } finally {
824
+ wasm.__wbindgen_add_to_stack_pointer(16);
825
+ }
808
826
  }
809
827
  /**
810
828
  * @param {any} value
@@ -836,31 +854,6 @@ var CoreStorage = class _CoreStorage {
836
854
  }
837
855
  }
838
856
  /**
839
- * @param {Schema} schema
840
- * @param {Operation} op
841
- * @returns {(string)[]}
842
- */
843
- getIndexes(schema, op) {
844
- try {
845
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
846
- _assertClass(schema, Schema);
847
- _assertClass(op, Operation);
848
- wasm.corestorage_getIndexes(retptr, this.__wbg_ptr, schema.__wbg_ptr, op.__wbg_ptr);
849
- var r0 = getInt32Memory0()[retptr / 4 + 0];
850
- var r1 = getInt32Memory0()[retptr / 4 + 1];
851
- var r2 = getInt32Memory0()[retptr / 4 + 2];
852
- var r3 = getInt32Memory0()[retptr / 4 + 3];
853
- if (r3) {
854
- throw takeObject(r2);
855
- }
856
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
857
- wasm.__wbindgen_free(r0, r1 * 4, 4);
858
- return v1;
859
- } finally {
860
- wasm.__wbindgen_add_to_stack_pointer(16);
861
- }
862
- }
863
- /**
864
857
  * @param {any} document
865
858
  * @param {Query} query
866
859
  * @returns {boolean}
@@ -882,6 +875,13 @@ var CoreStorage = class _CoreStorage {
882
875
  heap[stack_pointer++] = void 0;
883
876
  }
884
877
  }
878
+ /**
879
+ */
880
+ constructor() {
881
+ const ret = wasm.corestorage_new();
882
+ this.__wbg_ptr = ret >>> 0;
883
+ return this;
884
+ }
885
885
  };
886
886
  var DatabaseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
887
887
  }, unregister: () => {
@@ -905,38 +905,6 @@ var Database = class _Database {
905
905
  wasm.__wbg_database_free(ptr);
906
906
  }
907
907
  /**
908
- * @returns {Promise<any>}
909
- */
910
- start() {
911
- const ret = wasm.database_start(this.__wbg_ptr);
912
- return takeObject(ret);
913
- }
914
- /**
915
- * @returns {Promise<any>}
916
- */
917
- close() {
918
- const ptr = this.__destroy_into_raw();
919
- const ret = wasm.database_close(ptr);
920
- return takeObject(ret);
921
- }
922
- /**
923
- * @returns {boolean}
924
- */
925
- get started() {
926
- const ret = wasm.database_started(this.__wbg_ptr);
927
- return ret !== 0;
928
- }
929
- /**
930
- * @param {string} password
931
- * @returns {Promise<boolean>}
932
- */
933
- authenticate(password) {
934
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
935
- const len0 = WASM_VECTOR_LEN;
936
- const ret = wasm.database_authenticate(this.__wbg_ptr, ptr0, len0);
937
- return takeObject(ret);
938
- }
939
- /**
940
908
  * Retrieves the collections in the database.
941
909
  *
942
910
  * This function returns an `Object` containing the collections.
@@ -962,6 +930,31 @@ var Database = class _Database {
962
930
  }
963
931
  }
964
932
  /**
933
+ * @param {string} password
934
+ * @returns {Promise<boolean>}
935
+ */
936
+ authenticate(password) {
937
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
938
+ const len0 = WASM_VECTOR_LEN;
939
+ const ret = wasm.database_authenticate(this.__wbg_ptr, ptr0, len0);
940
+ return takeObject(ret);
941
+ }
942
+ /**
943
+ * @returns {Promise<any>}
944
+ */
945
+ close() {
946
+ const ptr = this.__destroy_into_raw();
947
+ const ret = wasm.database_close(ptr);
948
+ return takeObject(ret);
949
+ }
950
+ /**
951
+ * @returns {Promise<any>}
952
+ */
953
+ start() {
954
+ const ret = wasm.database_start(this.__wbg_ptr);
955
+ return takeObject(ret);
956
+ }
957
+ /**
965
958
  * @param {string} db_name
966
959
  * @param {object} schemas_js
967
960
  * @param {object} migrations_js
@@ -979,6 +972,13 @@ var Database = class _Database {
979
972
  const ret = wasm.database_create(ptr0, len0, addHeapObject(schemas_js), addHeapObject(migrations_js), addHeapObject(plugins), addHeapObject(module2), ptr1, len1, isLikeNone(storage) ? 0 : addHeapObject(storage));
980
973
  return takeObject(ret);
981
974
  }
975
+ /**
976
+ * @returns {boolean}
977
+ */
978
+ get started() {
979
+ const ret = wasm.database_started(this.__wbg_ptr);
980
+ return ret !== 0;
981
+ }
982
982
  };
983
983
  var InMemoryFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
984
984
  }, unregister: () => {
@@ -1002,6 +1002,17 @@ var InMemory = class _InMemory {
1002
1002
  wasm.__wbg_inmemory_free(ptr);
1003
1003
  }
1004
1004
  /**
1005
+ * @param {string} collection_name
1006
+ * @param {any} primary_key
1007
+ * @returns {Promise<any>}
1008
+ */
1009
+ findDocumentById(collection_name, primary_key) {
1010
+ const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1011
+ const len0 = WASM_VECTOR_LEN;
1012
+ const ret = wasm.inmemory_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
1013
+ return takeObject(ret);
1014
+ }
1015
+ /**
1005
1016
  * @param {string} name
1006
1017
  * @param {object} schemas_js
1007
1018
  * @returns {Promise<InMemory>}
@@ -1013,16 +1024,6 @@ var InMemory = class _InMemory {
1013
1024
  return takeObject(ret);
1014
1025
  }
1015
1026
  /**
1016
- * @param {Operation} op
1017
- * @returns {Promise<any>}
1018
- */
1019
- write(op) {
1020
- _assertClass(op, Operation);
1021
- var ptr0 = op.__destroy_into_raw();
1022
- const ret = wasm.inmemory_write(this.__wbg_ptr, ptr0);
1023
- return takeObject(ret);
1024
- }
1025
- /**
1026
1027
  * @param {string} collection_name
1027
1028
  * @param {any} query_js
1028
1029
  * @param {QueryOptions} options
@@ -1037,14 +1038,10 @@ var InMemory = class _InMemory {
1037
1038
  return takeObject(ret);
1038
1039
  }
1039
1040
  /**
1040
- * @param {string} collection_name
1041
- * @param {any} primary_key
1042
1041
  * @returns {Promise<any>}
1043
1042
  */
1044
- findDocumentById(collection_name, primary_key) {
1045
- const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1046
- const len0 = WASM_VECTOR_LEN;
1047
- const ret = wasm.inmemory_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
1043
+ close() {
1044
+ const ret = wasm.inmemory_close(this.__wbg_ptr);
1048
1045
  return takeObject(ret);
1049
1046
  }
1050
1047
  /**
@@ -1064,15 +1061,18 @@ var InMemory = class _InMemory {
1064
1061
  /**
1065
1062
  * @returns {Promise<any>}
1066
1063
  */
1067
- close() {
1068
- const ret = wasm.inmemory_close(this.__wbg_ptr);
1064
+ start() {
1065
+ const ret = wasm.inmemory_start(this.__wbg_ptr);
1069
1066
  return takeObject(ret);
1070
1067
  }
1071
1068
  /**
1069
+ * @param {Operation} op
1072
1070
  * @returns {Promise<any>}
1073
1071
  */
1074
- start() {
1075
- const ret = wasm.inmemory_start(this.__wbg_ptr);
1072
+ write(op) {
1073
+ _assertClass(op, Operation);
1074
+ var ptr0 = op.__destroy_into_raw();
1075
+ const ret = wasm.inmemory_write(this.__wbg_ptr, ptr0);
1076
1076
  return takeObject(ret);
1077
1077
  }
1078
1078
  };
@@ -1119,12 +1119,12 @@ var IndexDB = class _IndexDB {
1119
1119
  * @param {string} store_name
1120
1120
  * @returns {IDBObjectStore}
1121
1121
  */
1122
- get_store(store_name) {
1122
+ get_store_readonly(store_name) {
1123
1123
  try {
1124
1124
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1125
1125
  const ptr0 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1126
1126
  const len0 = WASM_VECTOR_LEN;
1127
- wasm.indexdb_get_store(retptr, this.__wbg_ptr, ptr0, len0);
1127
+ wasm.indexdb_get_store_readonly(retptr, this.__wbg_ptr, ptr0, len0);
1128
1128
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1129
1129
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1130
1130
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1137,25 +1137,15 @@ var IndexDB = class _IndexDB {
1137
1137
  }
1138
1138
  }
1139
1139
  /**
1140
- * @param {string} store_name
1141
- * @returns {IDBObjectStore}
1140
+ * @param {string} collection_name
1141
+ * @param {any} primary_key
1142
+ * @returns {Promise<any>}
1142
1143
  */
1143
- get_store_readonly(store_name) {
1144
- try {
1145
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1146
- const ptr0 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1147
- const len0 = WASM_VECTOR_LEN;
1148
- wasm.indexdb_get_store_readonly(retptr, this.__wbg_ptr, ptr0, len0);
1149
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1150
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1151
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1152
- if (r2) {
1153
- throw takeObject(r1);
1154
- }
1155
- return takeObject(r0);
1156
- } finally {
1157
- wasm.__wbindgen_add_to_stack_pointer(16);
1158
- }
1144
+ findDocumentById(collection_name, primary_key) {
1145
+ const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1146
+ const len0 = WASM_VECTOR_LEN;
1147
+ const ret = wasm.indexdb_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
1148
+ return takeObject(ret);
1159
1149
  }
1160
1150
  /**
1161
1151
  * @param {string} name
@@ -1169,16 +1159,6 @@ var IndexDB = class _IndexDB {
1169
1159
  return takeObject(ret);
1170
1160
  }
1171
1161
  /**
1172
- * @param {Operation} op
1173
- * @returns {Promise<any>}
1174
- */
1175
- write(op) {
1176
- _assertClass(op, Operation);
1177
- var ptr0 = op.__destroy_into_raw();
1178
- const ret = wasm.indexdb_write(this.__wbg_ptr, ptr0);
1179
- return takeObject(ret);
1180
- }
1181
- /**
1182
1162
  * @param {string} collection_name
1183
1163
  * @param {any} query
1184
1164
  * @param {QueryOptions} options
@@ -1193,14 +1173,10 @@ var IndexDB = class _IndexDB {
1193
1173
  return takeObject(ret);
1194
1174
  }
1195
1175
  /**
1196
- * @param {string} collection_name
1197
- * @param {any} primary_key
1198
1176
  * @returns {Promise<any>}
1199
1177
  */
1200
- findDocumentById(collection_name, primary_key) {
1201
- const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1202
- const len0 = WASM_VECTOR_LEN;
1203
- const ret = wasm.indexdb_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
1178
+ close() {
1179
+ const ret = wasm.indexdb_close(this.__wbg_ptr);
1204
1180
  return takeObject(ret);
1205
1181
  }
1206
1182
  /**
@@ -1220,17 +1196,41 @@ var IndexDB = class _IndexDB {
1220
1196
  /**
1221
1197
  * @returns {Promise<any>}
1222
1198
  */
1223
- close() {
1224
- const ret = wasm.indexdb_close(this.__wbg_ptr);
1199
+ start() {
1200
+ const ret = wasm.indexdb_start(this.__wbg_ptr);
1225
1201
  return takeObject(ret);
1226
1202
  }
1227
1203
  /**
1204
+ * @param {Operation} op
1228
1205
  * @returns {Promise<any>}
1229
1206
  */
1230
- start() {
1231
- const ret = wasm.indexdb_start(this.__wbg_ptr);
1207
+ write(op) {
1208
+ _assertClass(op, Operation);
1209
+ var ptr0 = op.__destroy_into_raw();
1210
+ const ret = wasm.indexdb_write(this.__wbg_ptr, ptr0);
1232
1211
  return takeObject(ret);
1233
1212
  }
1213
+ /**
1214
+ * @param {string} store_name
1215
+ * @returns {IDBObjectStore}
1216
+ */
1217
+ get_store(store_name) {
1218
+ try {
1219
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1220
+ const ptr0 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1221
+ const len0 = WASM_VECTOR_LEN;
1222
+ wasm.indexdb_get_store(retptr, this.__wbg_ptr, ptr0, len0);
1223
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1224
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1225
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1226
+ if (r2) {
1227
+ throw takeObject(r1);
1228
+ }
1229
+ return takeObject(r0);
1230
+ } finally {
1231
+ wasm.__wbindgen_add_to_stack_pointer(16);
1232
+ }
1233
+ }
1234
1234
  };
1235
1235
  var OperationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1236
1236
  }, unregister: () => {
@@ -1278,27 +1278,15 @@ var Operation = class _Operation {
1278
1278
  }
1279
1279
  }
1280
1280
  /**
1281
- * Retrieves the type of operation.
1282
- *
1283
- * # Returns
1284
- *
1285
- * * `OpType` - The type of operation.
1286
- * @returns {OpType}
1287
- */
1288
- get opType() {
1289
- const ret = wasm.operation_opType(this.__wbg_ptr);
1290
- return ret;
1291
- }
1292
- /**
1293
- * Retrieves the data involved in the operation.
1281
+ * Retrieves the primary key value of the current data.
1294
1282
  *
1295
1283
  * # Returns
1296
1284
  *
1297
- * * `JsValue` - The data involved in the operation.
1285
+ * * `Option<JsValue>` - The primary key value of the current data.
1298
1286
  * @returns {any}
1299
1287
  */
1300
- get data() {
1301
- const ret = wasm.operation_data(this.__wbg_ptr);
1288
+ get primaryKey() {
1289
+ const ret = wasm.operation_primaryKey(this.__wbg_ptr);
1302
1290
  return takeObject(ret);
1303
1291
  }
1304
1292
  /**
@@ -1314,18 +1302,6 @@ var Operation = class _Operation {
1314
1302
  return takeObject(ret);
1315
1303
  }
1316
1304
  /**
1317
- * Retrieves the primary key value of the current data.
1318
- *
1319
- * # Returns
1320
- *
1321
- * * `Option<JsValue>` - The primary key value of the current data.
1322
- * @returns {any}
1323
- */
1324
- get primaryKey() {
1325
- const ret = wasm.operation_primaryKey(this.__wbg_ptr);
1326
- return takeObject(ret);
1327
- }
1328
- /**
1329
1305
  * @returns {string}
1330
1306
  */
1331
1307
  get primaryKeyIndex() {
@@ -1353,6 +1329,30 @@ var Operation = class _Operation {
1353
1329
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1354
1330
  }
1355
1331
  }
1332
+ /**
1333
+ * Retrieves the data involved in the operation.
1334
+ *
1335
+ * # Returns
1336
+ *
1337
+ * * `JsValue` - The data involved in the operation.
1338
+ * @returns {any}
1339
+ */
1340
+ get data() {
1341
+ const ret = wasm.operation_data(this.__wbg_ptr);
1342
+ return takeObject(ret);
1343
+ }
1344
+ /**
1345
+ * Retrieves the type of operation.
1346
+ *
1347
+ * # Returns
1348
+ *
1349
+ * * `OpType` - The type of operation.
1350
+ * @returns {OpType}
1351
+ */
1352
+ get opType() {
1353
+ const ret = wasm.operation_opType(this.__wbg_ptr);
1354
+ return ret;
1355
+ }
1356
1356
  };
1357
1357
  var PropertyFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1358
1358
  }, unregister: () => {
@@ -1369,52 +1369,40 @@ var Property = class {
1369
1369
  wasm.__wbg_property_free(ptr);
1370
1370
  }
1371
1371
  /**
1372
- * Checks is the schema is valid.
1372
+ * Retrieves the maximum length of the property.
1373
1373
  *
1374
1374
  * # Returns
1375
1375
  *
1376
- * Throws exception if not valid
1377
- * @returns {boolean}
1376
+ * * `Result<JsValue, JsValue>` - A result containing the maximum length as a `JsValue` or an error.
1377
+ * @returns {any}
1378
1378
  */
1379
- is_valid() {
1379
+ get maxLength() {
1380
1380
  try {
1381
1381
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1382
- wasm.property_is_valid(retptr, this.__wbg_ptr);
1382
+ wasm.property_maxLength(retptr, this.__wbg_ptr);
1383
1383
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1384
1384
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1385
1385
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1386
1386
  if (r2) {
1387
1387
  throw takeObject(r1);
1388
1388
  }
1389
- return r0 !== 0;
1389
+ return takeObject(r0);
1390
1390
  } finally {
1391
1391
  wasm.__wbindgen_add_to_stack_pointer(16);
1392
1392
  }
1393
1393
  }
1394
1394
  /**
1395
- * Retrieves the type of the property.
1396
- *
1397
- * # Returns
1398
- *
1399
- * * `PropertyType` - The type of the property.
1400
- * @returns {any}
1401
- */
1402
- get type() {
1403
- const ret = wasm.property_type(this.__wbg_ptr);
1404
- return takeObject(ret);
1405
- }
1406
- /**
1407
- * Retrieves the items of the property.
1395
+ * Retrieves the minimum length of the property.
1408
1396
  *
1409
1397
  * # Returns
1410
1398
  *
1411
- * * `Result<JsValue, JsValue>` - A result containing the items as a `JsValue` or an error.
1399
+ * * `Result<JsValue, JsValue>` - A result containing the minimum length as a `JsValue` or an error.
1412
1400
  * @returns {any}
1413
1401
  */
1414
- get items() {
1402
+ get minLength() {
1415
1403
  try {
1416
1404
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1417
- wasm.property_items(retptr, this.__wbg_ptr);
1405
+ wasm.property_minLength(retptr, this.__wbg_ptr);
1418
1406
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1419
1407
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1420
1408
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1427,17 +1415,17 @@ var Property = class {
1427
1415
  }
1428
1416
  }
1429
1417
  /**
1430
- * Retrieves the maximum number of items of the property.
1418
+ * Retrieves the nested properties of the property.
1431
1419
  *
1432
1420
  * # Returns
1433
1421
  *
1434
- * * `Result<JsValue, JsValue>` - A result containing the maximum number of items as a `JsValue` or an error.
1422
+ * * `Result<JsValue, JsValue>` - A result containing the nested properties as a `JsValue` or an error.
1435
1423
  * @returns {any}
1436
1424
  */
1437
- get maxItems() {
1425
+ get properties() {
1438
1426
  try {
1439
1427
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1440
- wasm.property_maxItems(retptr, this.__wbg_ptr);
1428
+ wasm.property_properties(retptr, this.__wbg_ptr);
1441
1429
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1442
1430
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1443
1431
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1450,17 +1438,29 @@ var Property = class {
1450
1438
  }
1451
1439
  }
1452
1440
  /**
1453
- * Retrieves the minimum number of items of the property.
1441
+ * Retrieves the type of the property.
1454
1442
  *
1455
1443
  * # Returns
1456
1444
  *
1457
- * * `Result<JsValue, JsValue>` - A result containing the minimum number of items as a `JsValue` or an error.
1445
+ * * `PropertyType` - The type of the property.
1458
1446
  * @returns {any}
1459
1447
  */
1460
- get minItems() {
1448
+ get type() {
1449
+ const ret = wasm.property_type(this.__wbg_ptr);
1450
+ return takeObject(ret);
1451
+ }
1452
+ /**
1453
+ * Retrieves the items of the property.
1454
+ *
1455
+ * # Returns
1456
+ *
1457
+ * * `Result<JsValue, JsValue>` - A result containing the items as a `JsValue` or an error.
1458
+ * @returns {any}
1459
+ */
1460
+ get items() {
1461
1461
  try {
1462
1462
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1463
- wasm.property_minItems(retptr, this.__wbg_ptr);
1463
+ wasm.property_items(retptr, this.__wbg_ptr);
1464
1464
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1465
1465
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1466
1466
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1473,40 +1473,40 @@ var Property = class {
1473
1473
  }
1474
1474
  }
1475
1475
  /**
1476
- * Retrieves the maximum length of the property.
1476
+ * Checks is the schema is valid.
1477
1477
  *
1478
1478
  * # Returns
1479
1479
  *
1480
- * * `Result<JsValue, JsValue>` - A result containing the maximum length as a `JsValue` or an error.
1481
- * @returns {any}
1480
+ * Throws exception if not valid
1481
+ * @returns {boolean}
1482
1482
  */
1483
- get maxLength() {
1483
+ is_valid() {
1484
1484
  try {
1485
1485
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1486
- wasm.property_maxLength(retptr, this.__wbg_ptr);
1486
+ wasm.property_is_valid(retptr, this.__wbg_ptr);
1487
1487
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1488
1488
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1489
1489
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1490
1490
  if (r2) {
1491
1491
  throw takeObject(r1);
1492
1492
  }
1493
- return takeObject(r0);
1493
+ return r0 !== 0;
1494
1494
  } finally {
1495
1495
  wasm.__wbindgen_add_to_stack_pointer(16);
1496
1496
  }
1497
1497
  }
1498
1498
  /**
1499
- * Retrieves the minimum length of the property.
1499
+ * Retrieves the maximum number of items of the property.
1500
1500
  *
1501
1501
  * # Returns
1502
1502
  *
1503
- * * `Result<JsValue, JsValue>` - A result containing the minimum length as a `JsValue` or an error.
1503
+ * * `Result<JsValue, JsValue>` - A result containing the maximum number of items as a `JsValue` or an error.
1504
1504
  * @returns {any}
1505
1505
  */
1506
- get minLength() {
1506
+ get maxItems() {
1507
1507
  try {
1508
1508
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1509
- wasm.property_minLength(retptr, this.__wbg_ptr);
1509
+ wasm.property_maxItems(retptr, this.__wbg_ptr);
1510
1510
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1511
1511
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1512
1512
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1519,17 +1519,17 @@ var Property = class {
1519
1519
  }
1520
1520
  }
1521
1521
  /**
1522
- * Retrieves the nested properties of the property.
1522
+ * Retrieves the minimum number of items of the property.
1523
1523
  *
1524
1524
  * # Returns
1525
1525
  *
1526
- * * `Result<JsValue, JsValue>` - A result containing the nested properties as a `JsValue` or an error.
1526
+ * * `Result<JsValue, JsValue>` - A result containing the minimum number of items as a `JsValue` or an error.
1527
1527
  * @returns {any}
1528
1528
  */
1529
- get properties() {
1529
+ get minItems() {
1530
1530
  try {
1531
1531
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1532
- wasm.property_properties(retptr, this.__wbg_ptr);
1532
+ wasm.property_minItems(retptr, this.__wbg_ptr);
1533
1533
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1534
1534
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1535
1535
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1558,33 +1558,12 @@ var Query = class {
1558
1558
  }
1559
1559
  /**
1560
1560
  * @param {any} query
1561
- * @param {Schema} schema
1562
- */
1563
- constructor(query, schema) {
1564
- try {
1565
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1566
- _assertClass(schema, Schema);
1567
- var ptr0 = schema.__destroy_into_raw();
1568
- wasm.query_new(retptr, addHeapObject(query), ptr0);
1569
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1570
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1571
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1572
- if (r2) {
1573
- throw takeObject(r1);
1574
- }
1575
- this.__wbg_ptr = r0 >>> 0;
1576
- return this;
1577
- } finally {
1578
- wasm.__wbindgen_add_to_stack_pointer(16);
1579
- }
1580
- }
1581
- /**
1582
1561
  * @returns {any}
1583
1562
  */
1584
- get query() {
1563
+ process_query(query) {
1585
1564
  try {
1586
1565
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1587
- wasm.query_query(retptr, this.__wbg_ptr);
1566
+ wasm.query_process_query(retptr, this.__wbg_ptr, addBorrowedObject(query));
1588
1567
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1589
1568
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1590
1569
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1594,6 +1573,7 @@ var Query = class {
1594
1573
  return takeObject(r0);
1595
1574
  } finally {
1596
1575
  wasm.__wbindgen_add_to_stack_pointer(16);
1576
+ heap[stack_pointer++] = void 0;
1597
1577
  }
1598
1578
  }
1599
1579
  /**
@@ -1620,12 +1600,31 @@ var Query = class {
1620
1600
  }
1621
1601
  }
1622
1602
  /**
1603
+ * @returns {boolean}
1604
+ */
1605
+ has_or_operator() {
1606
+ const ret = wasm.query_has_or_operator(this.__wbg_ptr);
1607
+ return ret !== 0;
1608
+ }
1609
+ /**
1610
+ * Returns the value of a property from the (normalized) query by its name.
1611
+ * This will scan the normalized query structure (including arrays, $and/$or blocks, etc.)
1612
+ * to find the first occurrence of the given property name and return its corresponding value.
1613
+ *
1614
+ * If not found, an error is returned.
1615
+ *
1616
+ * Example:
1617
+ * let val = query.get("age")?;
1618
+ * // val is a JsValue that might be a number, string, boolean, array, or object (e.g., { "$gt": 30 })
1619
+ * @param {string} property_name
1623
1620
  * @returns {any}
1624
1621
  */
1625
- parse() {
1622
+ get(property_name) {
1626
1623
  try {
1627
1624
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1628
- wasm.query_parse(retptr, this.__wbg_ptr);
1625
+ const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1626
+ const len0 = WASM_VECTOR_LEN;
1627
+ wasm.query_get(retptr, this.__wbg_ptr, ptr0, len0);
1629
1628
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1630
1629
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1631
1630
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1639,43 +1638,33 @@ var Query = class {
1639
1638
  }
1640
1639
  /**
1641
1640
  * @param {any} query
1642
- * @returns {any}
1641
+ * @param {Schema} schema
1643
1642
  */
1644
- process_query(query) {
1643
+ constructor(query, schema) {
1645
1644
  try {
1646
1645
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1647
- wasm.query_process_query(retptr, this.__wbg_ptr, addBorrowedObject(query));
1646
+ _assertClass(schema, Schema);
1647
+ var ptr0 = schema.__destroy_into_raw();
1648
+ wasm.query_new(retptr, addHeapObject(query), ptr0);
1648
1649
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1649
1650
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1650
1651
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1651
1652
  if (r2) {
1652
1653
  throw takeObject(r1);
1653
1654
  }
1654
- return takeObject(r0);
1655
+ this.__wbg_ptr = r0 >>> 0;
1656
+ return this;
1655
1657
  } finally {
1656
1658
  wasm.__wbindgen_add_to_stack_pointer(16);
1657
- heap[stack_pointer++] = void 0;
1658
1659
  }
1659
1660
  }
1660
1661
  /**
1661
- * Returns the value of a property from the (normalized) query by its name.
1662
- * This will scan the normalized query structure (including arrays, $and/$or blocks, etc.)
1663
- * to find the first occurrence of the given property name and return its corresponding value.
1664
- *
1665
- * If not found, an error is returned.
1666
- *
1667
- * Example:
1668
- * let val = query.get("age")?;
1669
- * // val is a JsValue that might be a number, string, boolean, array, or object (e.g., { "$gt": 30 })
1670
- * @param {string} property_name
1671
1662
  * @returns {any}
1672
1663
  */
1673
- get(property_name) {
1664
+ parse() {
1674
1665
  try {
1675
1666
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1676
- const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1677
- const len0 = WASM_VECTOR_LEN;
1678
- wasm.query_get(retptr, this.__wbg_ptr, ptr0, len0);
1667
+ wasm.query_parse(retptr, this.__wbg_ptr);
1679
1668
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1680
1669
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1681
1670
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1688,11 +1677,22 @@ var Query = class {
1688
1677
  }
1689
1678
  }
1690
1679
  /**
1691
- * @returns {boolean}
1680
+ * @returns {any}
1692
1681
  */
1693
- has_or_operator() {
1694
- const ret = wasm.query_has_or_operator(this.__wbg_ptr);
1695
- return ret !== 0;
1682
+ get query() {
1683
+ try {
1684
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1685
+ wasm.query_query(retptr, this.__wbg_ptr);
1686
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1687
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1688
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1689
+ if (r2) {
1690
+ throw takeObject(r1);
1691
+ }
1692
+ return takeObject(r0);
1693
+ } finally {
1694
+ wasm.__wbindgen_add_to_stack_pointer(16);
1695
+ }
1696
1696
  }
1697
1697
  };
1698
1698
  var QueryOptionsFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
@@ -1719,10 +1719,10 @@ var QueryOptions = class _QueryOptions {
1719
1719
  /**
1720
1720
  * @returns {any}
1721
1721
  */
1722
- get limit() {
1722
+ get offset() {
1723
1723
  try {
1724
1724
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1725
- wasm.queryoptions_limit(retptr, this.__wbg_ptr);
1725
+ wasm.queryoptions_offset(retptr, this.__wbg_ptr);
1726
1726
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1727
1727
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1728
1728
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1737,10 +1737,10 @@ var QueryOptions = class _QueryOptions {
1737
1737
  /**
1738
1738
  * @returns {any}
1739
1739
  */
1740
- get offset() {
1740
+ get limit() {
1741
1741
  try {
1742
1742
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1743
- wasm.queryoptions_offset(retptr, this.__wbg_ptr);
1743
+ wasm.queryoptions_limit(retptr, this.__wbg_ptr);
1744
1744
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1745
1745
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1746
1746
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1766,9 +1766,9 @@ var RIDBError = class _RIDBError {
1766
1766
  }
1767
1767
  toJSON() {
1768
1768
  return {
1769
- type: this.type,
1769
+ message: this.message,
1770
1770
  code: this.code,
1771
- message: this.message
1771
+ type: this.type
1772
1772
  };
1773
1773
  }
1774
1774
  toString() {
@@ -1785,44 +1785,15 @@ var RIDBError = class _RIDBError {
1785
1785
  wasm.__wbg_ridberror_free(ptr);
1786
1786
  }
1787
1787
  /**
1788
- * @param {string} err_type
1789
- * @param {string} message
1788
+ * @param {string} err
1790
1789
  * @param {number} code
1790
+ * @returns {RIDBError}
1791
1791
  */
1792
- constructor(err_type, message, code) {
1793
- const ptr0 = passStringToWasm0(err_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1792
+ static validation(err, code) {
1793
+ const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1794
1794
  const len0 = WASM_VECTOR_LEN;
1795
- const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1796
- const len1 = WASM_VECTOR_LEN;
1797
- const ret = wasm.ridberror_new(ptr0, len0, ptr1, len1, code);
1798
- this.__wbg_ptr = ret >>> 0;
1799
- return this;
1800
- }
1801
- /**
1802
- * @returns {string}
1803
- */
1804
- get type() {
1805
- let deferred1_0;
1806
- let deferred1_1;
1807
- try {
1808
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1809
- wasm.ridberror_type(retptr, this.__wbg_ptr);
1810
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1811
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1812
- deferred1_0 = r0;
1813
- deferred1_1 = r1;
1814
- return getStringFromWasm0(r0, r1);
1815
- } finally {
1816
- wasm.__wbindgen_add_to_stack_pointer(16);
1817
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1818
- }
1819
- }
1820
- /**
1821
- * @returns {any}
1822
- */
1823
- get code() {
1824
- const ret = wasm.ridberror_code(this.__wbg_ptr);
1825
- return takeObject(ret);
1795
+ const ret = wasm.ridberror_validation(ptr0, len0, code);
1796
+ return _RIDBError.__wrap(ret);
1826
1797
  }
1827
1798
  /**
1828
1799
  * @returns {string}
@@ -1844,11 +1815,14 @@ var RIDBError = class _RIDBError {
1844
1815
  }
1845
1816
  }
1846
1817
  /**
1847
- * @param {any} err
1818
+ * @param {string} err
1819
+ * @param {number} code
1848
1820
  * @returns {RIDBError}
1849
1821
  */
1850
- static from(err) {
1851
- const ret = wasm.ridberror_from(addHeapObject(err));
1822
+ static serialisation(err, code) {
1823
+ const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1824
+ const len0 = WASM_VECTOR_LEN;
1825
+ const ret = wasm.ridberror_serialisation(ptr0, len0, code);
1852
1826
  return _RIDBError.__wrap(ret);
1853
1827
  }
1854
1828
  /**
@@ -1856,32 +1830,35 @@ var RIDBError = class _RIDBError {
1856
1830
  * @param {number} code
1857
1831
  * @returns {RIDBError}
1858
1832
  */
1859
- static error(err, code) {
1833
+ static authentication(err, code) {
1860
1834
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1861
1835
  const len0 = WASM_VECTOR_LEN;
1862
- const ret = wasm.ridberror_error(ptr0, len0, code);
1836
+ const ret = wasm.ridberror_authentication(ptr0, len0, code);
1863
1837
  return _RIDBError.__wrap(ret);
1864
1838
  }
1865
1839
  /**
1866
- * @param {string} err
1840
+ * @param {string} err_type
1841
+ * @param {string} message
1867
1842
  * @param {number} code
1868
- * @returns {RIDBError}
1869
1843
  */
1870
- static query(err, code) {
1871
- const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1844
+ constructor(err_type, message, code) {
1845
+ const ptr0 = passStringToWasm0(err_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1872
1846
  const len0 = WASM_VECTOR_LEN;
1873
- const ret = wasm.ridberror_query(ptr0, len0, code);
1874
- return _RIDBError.__wrap(ret);
1847
+ const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1848
+ const len1 = WASM_VECTOR_LEN;
1849
+ const ret = wasm.ridberror_new(ptr0, len0, ptr1, len1, code);
1850
+ this.__wbg_ptr = ret >>> 0;
1851
+ return this;
1875
1852
  }
1876
1853
  /**
1877
1854
  * @param {string} err
1878
1855
  * @param {number} code
1879
1856
  * @returns {RIDBError}
1880
1857
  */
1881
- static authentication(err, code) {
1858
+ static hook(err, code) {
1882
1859
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1883
1860
  const len0 = WASM_VECTOR_LEN;
1884
- const ret = wasm.ridberror_authentication(ptr0, len0, code);
1861
+ const ret = wasm.ridberror_hook(ptr0, len0, code);
1885
1862
  return _RIDBError.__wrap(ret);
1886
1863
  }
1887
1864
  /**
@@ -1889,10 +1866,10 @@ var RIDBError = class _RIDBError {
1889
1866
  * @param {number} code
1890
1867
  * @returns {RIDBError}
1891
1868
  */
1892
- static serialisation(err, code) {
1869
+ static error(err, code) {
1893
1870
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1894
1871
  const len0 = WASM_VECTOR_LEN;
1895
- const ret = wasm.ridberror_serialisation(ptr0, len0, code);
1872
+ const ret = wasm.ridberror_error(ptr0, len0, code);
1896
1873
  return _RIDBError.__wrap(ret);
1897
1874
  }
1898
1875
  /**
@@ -1900,23 +1877,46 @@ var RIDBError = class _RIDBError {
1900
1877
  * @param {number} code
1901
1878
  * @returns {RIDBError}
1902
1879
  */
1903
- static validation(err, code) {
1880
+ static query(err, code) {
1904
1881
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1905
1882
  const len0 = WASM_VECTOR_LEN;
1906
- const ret = wasm.ridberror_validation(ptr0, len0, code);
1883
+ const ret = wasm.ridberror_query(ptr0, len0, code);
1907
1884
  return _RIDBError.__wrap(ret);
1908
1885
  }
1909
1886
  /**
1910
- * @param {string} err
1911
- * @param {number} code
1887
+ * @returns {any}
1888
+ */
1889
+ get code() {
1890
+ const ret = wasm.ridberror_code(this.__wbg_ptr);
1891
+ return takeObject(ret);
1892
+ }
1893
+ /**
1894
+ * @param {any} err
1912
1895
  * @returns {RIDBError}
1913
1896
  */
1914
- static hook(err, code) {
1915
- const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1916
- const len0 = WASM_VECTOR_LEN;
1917
- const ret = wasm.ridberror_hook(ptr0, len0, code);
1897
+ static from(err) {
1898
+ const ret = wasm.ridberror_from(addHeapObject(err));
1918
1899
  return _RIDBError.__wrap(ret);
1919
1900
  }
1901
+ /**
1902
+ * @returns {string}
1903
+ */
1904
+ get type() {
1905
+ let deferred1_0;
1906
+ let deferred1_1;
1907
+ try {
1908
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1909
+ wasm.ridberror_type(retptr, this.__wbg_ptr);
1910
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1911
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1912
+ deferred1_0 = r0;
1913
+ deferred1_1 = r1;
1914
+ return getStringFromWasm0(r0, r1);
1915
+ } finally {
1916
+ wasm.__wbindgen_add_to_stack_pointer(16);
1917
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1918
+ }
1919
+ }
1920
1920
  };
1921
1921
  var SchemaFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1922
1922
  }, unregister: () => {
@@ -1940,80 +1940,84 @@ var Schema = class _Schema {
1940
1940
  wasm.__wbg_schema_free(ptr);
1941
1941
  }
1942
1942
  /**
1943
- * @param {any} document
1943
+ * Retrieves the indexes of the schema, if any.
1944
+ *
1945
+ * # Returns
1946
+ *
1947
+ * * `Option<Vec<String>>` - The indexes of the schema, if any.
1948
+ * @returns {(string)[] | undefined}
1944
1949
  */
1945
- validate(document2) {
1950
+ get indexes() {
1946
1951
  try {
1947
1952
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1948
- wasm.schema_validate(retptr, this.__wbg_ptr, addHeapObject(document2));
1953
+ wasm.schema_indexes(retptr, this.__wbg_ptr);
1949
1954
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1950
1955
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1951
- if (r1) {
1952
- throw takeObject(r0);
1956
+ let v1;
1957
+ if (r0 !== 0) {
1958
+ v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1959
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
1953
1960
  }
1961
+ return v1;
1954
1962
  } finally {
1955
1963
  wasm.__wbindgen_add_to_stack_pointer(16);
1956
1964
  }
1957
1965
  }
1958
1966
  /**
1959
- * @returns {boolean}
1967
+ * Retrieves the version of the schema.
1968
+ *
1969
+ * # Returns
1970
+ *
1971
+ * * `i32` - The version of the schema.
1972
+ * @returns {number}
1960
1973
  */
1961
- is_valid() {
1974
+ get version() {
1975
+ const ret = wasm.schema_version(this.__wbg_ptr);
1976
+ return ret;
1977
+ }
1978
+ /**
1979
+ * @returns {(string)[] | undefined}
1980
+ */
1981
+ get encrypted() {
1962
1982
  try {
1963
1983
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1964
- wasm.schema_is_valid(retptr, this.__wbg_ptr);
1984
+ wasm.schema_encrypted(retptr, this.__wbg_ptr);
1965
1985
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1966
1986
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1967
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1968
- if (r2) {
1969
- throw takeObject(r1);
1987
+ let v1;
1988
+ if (r0 !== 0) {
1989
+ v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1990
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
1970
1991
  }
1971
- return r0 !== 0;
1992
+ return v1;
1972
1993
  } finally {
1973
1994
  wasm.__wbindgen_add_to_stack_pointer(16);
1974
1995
  }
1975
1996
  }
1976
1997
  /**
1977
- * Creates a new `Schema` instance from a given `JsValue`.
1978
- *
1979
- * # Arguments
1980
- *
1981
- * * `schema` - A `JsValue` representing the schema.
1998
+ * Retrieves the properties of the schema.
1982
1999
  *
1983
2000
  * # Returns
1984
2001
  *
1985
- * * `Result<Schema, JsValue>` - A result containing the new `Schema` instance or an error.
1986
- * @param {any} schema
1987
- * @returns {Schema}
2002
+ * * `Result<JsValue, JsValue>` - A result containing the properties as a `JsValue` or an error.
2003
+ * @returns {any}
1988
2004
  */
1989
- static create(schema) {
2005
+ get properties() {
1990
2006
  try {
1991
2007
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1992
- wasm.schema_create(retptr, addHeapObject(schema));
2008
+ wasm.schema_properties(retptr, this.__wbg_ptr);
1993
2009
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1994
2010
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1995
2011
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1996
2012
  if (r2) {
1997
2013
  throw takeObject(r1);
1998
2014
  }
1999
- return _Schema.__wrap(r0);
2015
+ return takeObject(r0);
2000
2016
  } finally {
2001
2017
  wasm.__wbindgen_add_to_stack_pointer(16);
2002
2018
  }
2003
2019
  }
2004
2020
  /**
2005
- * Retrieves the version of the schema.
2006
- *
2007
- * # Returns
2008
- *
2009
- * * `i32` - The version of the schema.
2010
- * @returns {number}
2011
- */
2012
- get version() {
2013
- const ret = wasm.schema_version(this.__wbg_ptr);
2014
- return ret;
2015
- }
2016
- /**
2017
2021
  * Retrieves the primary key of the schema.
2018
2022
  *
2019
2023
  * # Returns
@@ -2062,67 +2066,63 @@ var Schema = class _Schema {
2062
2066
  }
2063
2067
  }
2064
2068
  /**
2065
- * Retrieves the indexes of the schema, if any.
2066
- *
2067
- * # Returns
2068
- *
2069
- * * `Option<Vec<String>>` - The indexes of the schema, if any.
2070
- * @returns {(string)[] | undefined}
2069
+ * @param {any} document
2071
2070
  */
2072
- get indexes() {
2071
+ validate(document2) {
2073
2072
  try {
2074
2073
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2075
- wasm.schema_indexes(retptr, this.__wbg_ptr);
2074
+ wasm.schema_validate(retptr, this.__wbg_ptr, addHeapObject(document2));
2076
2075
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2077
2076
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2078
- let v1;
2079
- if (r0 !== 0) {
2080
- v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2081
- wasm.__wbindgen_free(r0, r1 * 4, 4);
2077
+ if (r1) {
2078
+ throw takeObject(r0);
2082
2079
  }
2083
- return v1;
2084
2080
  } finally {
2085
2081
  wasm.__wbindgen_add_to_stack_pointer(16);
2086
2082
  }
2087
2083
  }
2088
2084
  /**
2089
- * @returns {(string)[] | undefined}
2085
+ * Creates a new `Schema` instance from a given `JsValue`.
2086
+ *
2087
+ * # Arguments
2088
+ *
2089
+ * * `schema` - A `JsValue` representing the schema.
2090
+ *
2091
+ * # Returns
2092
+ *
2093
+ * * `Result<Schema, JsValue>` - A result containing the new `Schema` instance or an error.
2094
+ * @param {any} schema
2095
+ * @returns {Schema}
2090
2096
  */
2091
- get encrypted() {
2097
+ static create(schema) {
2092
2098
  try {
2093
2099
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2094
- wasm.schema_encrypted(retptr, this.__wbg_ptr);
2100
+ wasm.schema_create(retptr, addHeapObject(schema));
2095
2101
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2096
2102
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2097
- let v1;
2098
- if (r0 !== 0) {
2099
- v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2100
- wasm.__wbindgen_free(r0, r1 * 4, 4);
2103
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2104
+ if (r2) {
2105
+ throw takeObject(r1);
2101
2106
  }
2102
- return v1;
2107
+ return _Schema.__wrap(r0);
2103
2108
  } finally {
2104
2109
  wasm.__wbindgen_add_to_stack_pointer(16);
2105
2110
  }
2106
2111
  }
2107
2112
  /**
2108
- * Retrieves the properties of the schema.
2109
- *
2110
- * # Returns
2111
- *
2112
- * * `Result<JsValue, JsValue>` - A result containing the properties as a `JsValue` or an error.
2113
- * @returns {any}
2113
+ * @returns {boolean}
2114
2114
  */
2115
- get properties() {
2115
+ is_valid() {
2116
2116
  try {
2117
2117
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2118
- wasm.schema_properties(retptr, this.__wbg_ptr);
2118
+ wasm.schema_is_valid(retptr, this.__wbg_ptr);
2119
2119
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2120
2120
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2121
2121
  var r2 = getInt32Memory0()[retptr / 4 + 2];
2122
2122
  if (r2) {
2123
2123
  throw takeObject(r1);
2124
2124
  }
2125
- return takeObject(r0);
2125
+ return r0 !== 0;
2126
2126
  } finally {
2127
2127
  wasm.__wbindgen_add_to_stack_pointer(16);
2128
2128
  }
@@ -2155,16 +2155,6 @@ var WasmBindgenTestContext = class {
2155
2155
  return this;
2156
2156
  }
2157
2157
  /**
2158
- * Inform this context about runtime arguments passed to the test
2159
- * harness.
2160
- * @param {any[]} args
2161
- */
2162
- args(args) {
2163
- const ptr0 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
2164
- const len0 = WASM_VECTOR_LEN;
2165
- wasm.wasmbindgentestcontext_args(this.__wbg_ptr, ptr0, len0);
2166
- }
2167
- /**
2168
2158
  * Executes a list of tests, returning a promise representing their
2169
2159
  * eventual completion.
2170
2160
  *
@@ -2183,6 +2173,16 @@ var WasmBindgenTestContext = class {
2183
2173
  const ret = wasm.wasmbindgentestcontext_run(this.__wbg_ptr, ptr0, len0);
2184
2174
  return takeObject(ret);
2185
2175
  }
2176
+ /**
2177
+ * Inform this context about runtime arguments passed to the test
2178
+ * harness.
2179
+ * @param {any[]} args
2180
+ */
2181
+ args(args) {
2182
+ const ptr0 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
2183
+ const len0 = WASM_VECTOR_LEN;
2184
+ wasm.wasmbindgentestcontext_args(this.__wbg_ptr, ptr0, len0);
2185
+ }
2186
2186
  };
2187
2187
  async function __wbg_load(module2, imports) {
2188
2188
  if (typeof Response === "function" && module2 instanceof Response) {
@@ -2214,51 +2214,30 @@ function __wbg_get_imports() {
2214
2214
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2215
2215
  takeObject(arg0);
2216
2216
  };
2217
- imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2218
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2219
- const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2220
- return addHeapObject(ret);
2221
- }, arguments);
2222
- };
2223
- imports.wbg.__wbg_ridberror_new = function(arg0) {
2224
- const ret = RIDBError.__wrap(arg0);
2217
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2218
+ const ret = getObject(arg0);
2225
2219
  return addHeapObject(ret);
2226
2220
  };
2227
2221
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2228
2222
  const ret = getStringFromWasm0(arg0, arg1);
2229
2223
  return addHeapObject(ret);
2230
2224
  };
2231
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2232
- const ret = getObject(arg0);
2225
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2226
+ const ret = arg0;
2233
2227
  return addHeapObject(ret);
2234
2228
  };
2235
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
2236
- const ret = getObject(arg0) === void 0;
2237
- return ret;
2229
+ imports.wbg.__wbg_ridberror_new = function(arg0) {
2230
+ const ret = RIDBError.__wrap(arg0);
2231
+ return addHeapObject(ret);
2238
2232
  };
2239
2233
  imports.wbg.__wbindgen_is_null = function(arg0) {
2240
2234
  const ret = getObject(arg0) === null;
2241
2235
  return ret;
2242
2236
  };
2243
- imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2244
- return handleError(function(arg0) {
2245
- const ret = getObject(arg0).start();
2246
- return addHeapObject(ret);
2247
- }, arguments);
2248
- };
2249
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
2250
- const obj = takeObject(arg0).original;
2251
- if (obj.cnt-- == 1) {
2252
- obj.a = 0;
2253
- return true;
2254
- }
2255
- const ret = false;
2237
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
2238
+ const ret = getObject(arg0) === void 0;
2256
2239
  return ret;
2257
2240
  };
2258
- imports.wbg.__wbindgen_number_new = function(arg0) {
2259
- const ret = arg0;
2260
- return addHeapObject(ret);
2261
- };
2262
2241
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2263
2242
  const obj = getObject(arg1);
2264
2243
  const ret = typeof obj === "string" ? obj : void 0;
@@ -2267,6 +2246,12 @@ function __wbg_get_imports() {
2267
2246
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2268
2247
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2269
2248
  };
2249
+ imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2250
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2251
+ const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2252
+ return addHeapObject(ret);
2253
+ }, arguments);
2254
+ };
2270
2255
  imports.wbg.__wbg_apply_9f557eba1534d597 = function() {
2271
2256
  return handleError(function(arg0, arg1, arg2) {
2272
2257
  const ret = getObject(arg1).apply(takeObject(arg2));
@@ -2280,57 +2265,51 @@ function __wbg_get_imports() {
2280
2265
  const ret = InMemory.__wrap(arg0);
2281
2266
  return addHeapObject(ret);
2282
2267
  };
2268
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
2269
+ const obj = takeObject(arg0).original;
2270
+ if (obj.cnt-- == 1) {
2271
+ obj.a = 0;
2272
+ return true;
2273
+ }
2274
+ const ret = false;
2275
+ return ret;
2276
+ };
2283
2277
  imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() {
2284
2278
  return handleError(function(arg0) {
2285
2279
  const ret = getObject(arg0).close();
2286
2280
  return addHeapObject(ret);
2287
2281
  }, arguments);
2288
2282
  };
2283
+ imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2284
+ return handleError(function(arg0) {
2285
+ const ret = getObject(arg0).start();
2286
+ return addHeapObject(ret);
2287
+ }, arguments);
2288
+ };
2289
2289
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2290
2290
  const obj = getObject(arg1);
2291
2291
  const ret = typeof obj === "number" ? obj : void 0;
2292
2292
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
2293
2293
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
2294
2294
  };
2295
- imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() {
2296
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2297
- const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2298
- return addHeapObject(ret);
2299
- }, arguments);
2300
- };
2301
2295
  imports.wbg.__wbg_findDocumentById_2edf7350e5f12657 = function() {
2302
2296
  return handleError(function(arg0, arg1, arg2, arg3) {
2303
2297
  const ret = getObject(arg0).findDocumentById(getStringFromWasm0(arg1, arg2), takeObject(arg3));
2304
2298
  return addHeapObject(ret);
2305
2299
  }, arguments);
2306
2300
  };
2301
+ imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() {
2302
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2303
+ const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2304
+ return addHeapObject(ret);
2305
+ }, arguments);
2306
+ };
2307
2307
  imports.wbg.__wbg_write_1159c67c07f62020 = function() {
2308
2308
  return handleError(function(arg0, arg1) {
2309
2309
  const ret = getObject(arg0).write(Operation.__wrap(arg1));
2310
2310
  return addHeapObject(ret);
2311
2311
  }, arguments);
2312
2312
  };
2313
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2314
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2315
- return addHeapObject(ret);
2316
- };
2317
- imports.wbg.__wbg_database_new = function(arg0) {
2318
- const ret = Database.__wrap(arg0);
2319
- return addHeapObject(ret);
2320
- };
2321
- imports.wbg.__wbg_collection_new = function(arg0) {
2322
- const ret = Collection.__wrap(arg0);
2323
- return addHeapObject(ret);
2324
- };
2325
- imports.wbg.__wbg_indexdb_new = function(arg0) {
2326
- const ret = IndexDB.__wrap(arg0);
2327
- return addHeapObject(ret);
2328
- };
2329
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
2330
- const v = getObject(arg0);
2331
- const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
2332
- return ret;
2333
- };
2334
2313
  imports.wbg.__wbindgen_is_object = function(arg0) {
2335
2314
  const val = getObject(arg0);
2336
2315
  const ret = typeof val === "object" && val !== null;
@@ -2340,26 +2319,31 @@ function __wbg_get_imports() {
2340
2319
  const ret = typeof getObject(arg0) === "string";
2341
2320
  return ret;
2342
2321
  };
2343
- imports.wbg.__wbindgen_is_function = function(arg0) {
2344
- const ret = typeof getObject(arg0) === "function";
2345
- return ret;
2346
- };
2347
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
2348
- const ret = typeof getObject(arg0) === "bigint";
2322
+ imports.wbg.__wbindgen_is_array = function(arg0) {
2323
+ const ret = Array.isArray(getObject(arg0));
2349
2324
  return ret;
2350
2325
  };
2351
2326
  imports.wbg.__wbindgen_is_falsy = function(arg0) {
2352
2327
  const ret = !getObject(arg0);
2353
2328
  return ret;
2354
2329
  };
2355
- imports.wbg.__wbindgen_is_array = function(arg0) {
2356
- const ret = Array.isArray(getObject(arg0));
2330
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
2331
+ const v = getObject(arg0);
2332
+ const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
2357
2333
  return ret;
2358
2334
  };
2359
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2360
- const ret = getObject(arg0) === getObject(arg1);
2335
+ imports.wbg.__wbindgen_is_function = function(arg0) {
2336
+ const ret = typeof getObject(arg0) === "function";
2361
2337
  return ret;
2362
2338
  };
2339
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
2340
+ const ret = typeof getObject(arg0) === "bigint";
2341
+ return ret;
2342
+ };
2343
+ imports.wbg.__wbg_collection_new = function(arg0) {
2344
+ const ret = Collection.__wrap(arg0);
2345
+ return addHeapObject(ret);
2346
+ };
2363
2347
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
2364
2348
  const ret = getObject(arg0) in getObject(arg1);
2365
2349
  return ret;
@@ -2368,10 +2352,26 @@ function __wbg_get_imports() {
2368
2352
  const ret = arg0;
2369
2353
  return addHeapObject(ret);
2370
2354
  };
2355
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2356
+ const ret = getObject(arg0) === getObject(arg1);
2357
+ return ret;
2358
+ };
2371
2359
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2372
2360
  const ret = BigInt.asUintN(64, arg0);
2373
2361
  return addHeapObject(ret);
2374
2362
  };
2363
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2364
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2365
+ return addHeapObject(ret);
2366
+ };
2367
+ imports.wbg.__wbg_database_new = function(arg0) {
2368
+ const ret = Database.__wrap(arg0);
2369
+ return addHeapObject(ret);
2370
+ };
2371
+ imports.wbg.__wbg_indexdb_new = function(arg0) {
2372
+ const ret = IndexDB.__wrap(arg0);
2373
+ return addHeapObject(ret);
2374
+ };
2375
2375
  imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
2376
2376
  const ret = getObject(arg0).crypto;
2377
2377
  return addHeapObject(ret);
@@ -2424,6 +2424,12 @@ function __wbg_get_imports() {
2424
2424
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2425
2425
  }, arguments);
2426
2426
  };
2427
+ imports.wbg.__wbg_indexedDB_d312f95759a15fdc = function() {
2428
+ return handleError(function(arg0) {
2429
+ const ret = getObject(arg0).indexedDB;
2430
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2431
+ }, arguments);
2432
+ };
2427
2433
  imports.wbg.__wbg_instanceof_WorkerGlobalScope_46b577f151fad960 = function(arg0) {
2428
2434
  let result;
2429
2435
  try {
@@ -2434,89 +2440,102 @@ function __wbg_get_imports() {
2434
2440
  const ret = result;
2435
2441
  return ret;
2436
2442
  };
2437
- imports.wbg.__wbg_indexedDB_d312f95759a15fdc = function() {
2443
+ imports.wbg.__wbg_continue_f1c3e0815924de62 = function() {
2438
2444
  return handleError(function(arg0) {
2439
- const ret = getObject(arg0).indexedDB;
2440
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2445
+ getObject(arg0).continue();
2441
2446
  }, arguments);
2442
2447
  };
2443
- imports.wbg.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
2444
- console.debug(getObject(arg0));
2445
- };
2446
- imports.wbg.__wbg_openCursor_425aba9cbe1d4d39 = function() {
2447
- return handleError(function(arg0) {
2448
- const ret = getObject(arg0).openCursor();
2448
+ imports.wbg.__wbg_open_f0d7259fd7e689ce = function() {
2449
+ return handleError(function(arg0, arg1, arg2, arg3) {
2450
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
2449
2451
  return addHeapObject(ret);
2450
2452
  }, arguments);
2451
2453
  };
2452
- imports.wbg.__wbg_openCursor_e3042770817a8d57 = function() {
2453
- return handleError(function(arg0, arg1) {
2454
- const ret = getObject(arg0).openCursor(getObject(arg1));
2454
+ imports.wbg.__wbg_lowerBound_cd1c8a3b3fdf1582 = function() {
2455
+ return handleError(function(arg0) {
2456
+ const ret = IDBKeyRange.lowerBound(getObject(arg0));
2455
2457
  return addHeapObject(ret);
2456
2458
  }, arguments);
2457
2459
  };
2458
- imports.wbg.__wbg_createIndex_b8da1f5571f644be = function() {
2459
- return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
2460
- const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getObject(arg5));
2460
+ imports.wbg.__wbg_upperBound_1e3077b2c05bdd71 = function() {
2461
+ return handleError(function(arg0) {
2462
+ const ret = IDBKeyRange.upperBound(getObject(arg0));
2461
2463
  return addHeapObject(ret);
2462
2464
  }, arguments);
2463
2465
  };
2464
- imports.wbg.__wbg_delete_f60bba7d0ae59a4f = function() {
2466
+ imports.wbg.__wbg_lowerBound_e77f6e14cb69151e = function() {
2465
2467
  return handleError(function(arg0, arg1) {
2466
- const ret = getObject(arg0).delete(getObject(arg1));
2468
+ const ret = IDBKeyRange.lowerBound(getObject(arg0), arg1 !== 0);
2467
2469
  return addHeapObject(ret);
2468
2470
  }, arguments);
2469
2471
  };
2470
- imports.wbg.__wbg_get_5361b64cac0d0826 = function() {
2472
+ imports.wbg.__wbg_upperBound_4c692da072d1a11e = function() {
2471
2473
  return handleError(function(arg0, arg1) {
2472
- const ret = getObject(arg0).get(getObject(arg1));
2474
+ const ret = IDBKeyRange.upperBound(getObject(arg0), arg1 !== 0);
2473
2475
  return addHeapObject(ret);
2474
2476
  }, arguments);
2475
2477
  };
2476
- imports.wbg.__wbg_index_383b6812c1508030 = function() {
2477
- return handleError(function(arg0, arg1, arg2) {
2478
- const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
2478
+ imports.wbg.__wbg_bound_25385469508e98c7 = function() {
2479
+ return handleError(function(arg0, arg1, arg2, arg3) {
2480
+ const ret = IDBKeyRange.bound(getObject(arg0), getObject(arg1), arg2 !== 0, arg3 !== 0);
2479
2481
  return addHeapObject(ret);
2480
2482
  }, arguments);
2481
2483
  };
2482
- imports.wbg.__wbg_openCursor_30d58ae27a327629 = function() {
2484
+ imports.wbg.__wbg_only_cacf767244bdc280 = function() {
2483
2485
  return handleError(function(arg0) {
2484
- const ret = getObject(arg0).openCursor();
2486
+ const ret = IDBKeyRange.only(getObject(arg0));
2485
2487
  return addHeapObject(ret);
2486
2488
  }, arguments);
2487
2489
  };
2488
- imports.wbg.__wbg_openCursor_611b1e488c393dd8 = function() {
2489
- return handleError(function(arg0, arg1) {
2490
- const ret = getObject(arg0).openCursor(getObject(arg1));
2491
- return addHeapObject(ret);
2492
- }, arguments);
2490
+ imports.wbg.__wbg_get_910bbb94abdcf488 = function(arg0, arg1, arg2) {
2491
+ const ret = getObject(arg1)[arg2 >>> 0];
2492
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2493
+ var len1 = WASM_VECTOR_LEN;
2494
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2495
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2493
2496
  };
2494
- imports.wbg.__wbg_put_22792e17580ca18b = function() {
2495
- return handleError(function(arg0, arg1, arg2) {
2496
- const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
2497
+ imports.wbg.__wbg_length_9ae5daf9a690cba9 = function(arg0) {
2498
+ const ret = getObject(arg0).length;
2499
+ return ret;
2500
+ };
2501
+ imports.wbg.__wbg_contains_c65b44400b549286 = function(arg0, arg1, arg2) {
2502
+ const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2503
+ return ret;
2504
+ };
2505
+ imports.wbg.__wbg_value_86d3334f5075b232 = function() {
2506
+ return handleError(function(arg0) {
2507
+ const ret = getObject(arg0).value;
2497
2508
  return addHeapObject(ret);
2498
2509
  }, arguments);
2499
2510
  };
2500
- imports.wbg.__wbg_target_2fc177e386c8b7b0 = function(arg0) {
2501
- const ret = getObject(arg0).target;
2502
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2503
- };
2504
- imports.wbg.__wbg_instanceof_IdbDatabase_db671cf2454a9542 = function(arg0) {
2511
+ imports.wbg.__wbg_instanceof_IdbCursorWithValue_abeb44d13d947bc2 = function(arg0) {
2505
2512
  let result;
2506
2513
  try {
2507
- result = getObject(arg0) instanceof IDBDatabase;
2514
+ result = getObject(arg0) instanceof IDBCursorWithValue;
2508
2515
  } catch (_) {
2509
2516
  result = false;
2510
2517
  }
2511
2518
  const ret = result;
2512
2519
  return ret;
2513
2520
  };
2514
- imports.wbg.__wbg_objectStoreNames_588b5924274239fd = function(arg0) {
2515
- const ret = getObject(arg0).objectStoreNames;
2516
- return addHeapObject(ret);
2521
+ imports.wbg.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
2522
+ console.debug(getObject(arg0));
2517
2523
  };
2518
- imports.wbg.__wbg_close_6bfe4ca2fe67cb67 = function(arg0) {
2519
- getObject(arg0).close();
2524
+ imports.wbg.__wbg_openCursor_425aba9cbe1d4d39 = function() {
2525
+ return handleError(function(arg0) {
2526
+ const ret = getObject(arg0).openCursor();
2527
+ return addHeapObject(ret);
2528
+ }, arguments);
2529
+ };
2530
+ imports.wbg.__wbg_openCursor_e3042770817a8d57 = function() {
2531
+ return handleError(function(arg0, arg1) {
2532
+ const ret = getObject(arg0).openCursor(getObject(arg1));
2533
+ return addHeapObject(ret);
2534
+ }, arguments);
2535
+ };
2536
+ imports.wbg.__wbg_objectStoreNames_588b5924274239fd = function(arg0) {
2537
+ const ret = getObject(arg0).objectStoreNames;
2538
+ return addHeapObject(ret);
2520
2539
  };
2521
2540
  imports.wbg.__wbg_createObjectStore_882f2f6b1b1ef040 = function() {
2522
2541
  return handleError(function(arg0, arg1, arg2) {
@@ -2536,131 +2555,112 @@ function __wbg_get_imports() {
2536
2555
  return addHeapObject(ret);
2537
2556
  }, arguments);
2538
2557
  };
2539
- imports.wbg.__wbg_objectStore_da468793bd9df17b = function() {
2540
- return handleError(function(arg0, arg1, arg2) {
2541
- const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2542
- return addHeapObject(ret);
2543
- }, arguments);
2544
- };
2545
- imports.wbg.__wbg_continue_f1c3e0815924de62 = function() {
2546
- return handleError(function(arg0) {
2547
- getObject(arg0).continue();
2548
- }, arguments);
2549
- };
2550
- imports.wbg.__wbg_length_9ae5daf9a690cba9 = function(arg0) {
2551
- const ret = getObject(arg0).length;
2552
- return ret;
2553
- };
2554
- imports.wbg.__wbg_contains_c65b44400b549286 = function(arg0, arg1, arg2) {
2555
- const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2556
- return ret;
2557
- };
2558
- imports.wbg.__wbg_get_910bbb94abdcf488 = function(arg0, arg1, arg2) {
2559
- const ret = getObject(arg1)[arg2 >>> 0];
2560
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2561
- var len1 = WASM_VECTOR_LEN;
2562
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2563
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2558
+ imports.wbg.__wbg_close_6bfe4ca2fe67cb67 = function(arg0) {
2559
+ getObject(arg0).close();
2564
2560
  };
2565
- imports.wbg.__wbg_instanceof_IdbCursorWithValue_abeb44d13d947bc2 = function(arg0) {
2561
+ imports.wbg.__wbg_instanceof_IdbDatabase_db671cf2454a9542 = function(arg0) {
2566
2562
  let result;
2567
2563
  try {
2568
- result = getObject(arg0) instanceof IDBCursorWithValue;
2564
+ result = getObject(arg0) instanceof IDBDatabase;
2569
2565
  } catch (_) {
2570
2566
  result = false;
2571
2567
  }
2572
2568
  const ret = result;
2573
2569
  return ret;
2574
2570
  };
2575
- imports.wbg.__wbg_value_86d3334f5075b232 = function() {
2571
+ imports.wbg.__wbg_openCursor_30d58ae27a327629 = function() {
2576
2572
  return handleError(function(arg0) {
2577
- const ret = getObject(arg0).value;
2573
+ const ret = getObject(arg0).openCursor();
2578
2574
  return addHeapObject(ret);
2579
2575
  }, arguments);
2580
2576
  };
2581
- imports.wbg.__wbg_open_f0d7259fd7e689ce = function() {
2582
- return handleError(function(arg0, arg1, arg2, arg3) {
2583
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
2577
+ imports.wbg.__wbg_put_22792e17580ca18b = function() {
2578
+ return handleError(function(arg0, arg1, arg2) {
2579
+ const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
2584
2580
  return addHeapObject(ret);
2585
2581
  }, arguments);
2586
2582
  };
2587
- imports.wbg.__wbg_bound_25385469508e98c7 = function() {
2588
- return handleError(function(arg0, arg1, arg2, arg3) {
2589
- const ret = IDBKeyRange.bound(getObject(arg0), getObject(arg1), arg2 !== 0, arg3 !== 0);
2583
+ imports.wbg.__wbg_openCursor_611b1e488c393dd8 = function() {
2584
+ return handleError(function(arg0, arg1) {
2585
+ const ret = getObject(arg0).openCursor(getObject(arg1));
2590
2586
  return addHeapObject(ret);
2591
2587
  }, arguments);
2592
2588
  };
2593
- imports.wbg.__wbg_lowerBound_cd1c8a3b3fdf1582 = function() {
2594
- return handleError(function(arg0) {
2595
- const ret = IDBKeyRange.lowerBound(getObject(arg0));
2589
+ imports.wbg.__wbg_get_5361b64cac0d0826 = function() {
2590
+ return handleError(function(arg0, arg1) {
2591
+ const ret = getObject(arg0).get(getObject(arg1));
2596
2592
  return addHeapObject(ret);
2597
2593
  }, arguments);
2598
2594
  };
2599
- imports.wbg.__wbg_lowerBound_e77f6e14cb69151e = function() {
2600
- return handleError(function(arg0, arg1) {
2601
- const ret = IDBKeyRange.lowerBound(getObject(arg0), arg1 !== 0);
2595
+ imports.wbg.__wbg_createIndex_b8da1f5571f644be = function() {
2596
+ return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
2597
+ const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getObject(arg5));
2602
2598
  return addHeapObject(ret);
2603
2599
  }, arguments);
2604
2600
  };
2605
- imports.wbg.__wbg_only_cacf767244bdc280 = function() {
2606
- return handleError(function(arg0) {
2607
- const ret = IDBKeyRange.only(getObject(arg0));
2601
+ imports.wbg.__wbg_index_383b6812c1508030 = function() {
2602
+ return handleError(function(arg0, arg1, arg2) {
2603
+ const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
2608
2604
  return addHeapObject(ret);
2609
2605
  }, arguments);
2610
2606
  };
2611
- imports.wbg.__wbg_upperBound_1e3077b2c05bdd71 = function() {
2612
- return handleError(function(arg0) {
2613
- const ret = IDBKeyRange.upperBound(getObject(arg0));
2607
+ imports.wbg.__wbg_delete_f60bba7d0ae59a4f = function() {
2608
+ return handleError(function(arg0, arg1) {
2609
+ const ret = getObject(arg0).delete(getObject(arg1));
2614
2610
  return addHeapObject(ret);
2615
2611
  }, arguments);
2616
2612
  };
2617
- imports.wbg.__wbg_upperBound_4c692da072d1a11e = function() {
2618
- return handleError(function(arg0, arg1) {
2619
- const ret = IDBKeyRange.upperBound(getObject(arg0), arg1 !== 0);
2613
+ imports.wbg.__wbg_target_2fc177e386c8b7b0 = function(arg0) {
2614
+ const ret = getObject(arg0).target;
2615
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2616
+ };
2617
+ imports.wbg.__wbg_setonerror_8479b33e7568a904 = function(arg0, arg1) {
2618
+ getObject(arg0).onerror = getObject(arg1);
2619
+ };
2620
+ imports.wbg.__wbg_setonsuccess_632ce0a1460455c2 = function(arg0, arg1) {
2621
+ getObject(arg0).onsuccess = getObject(arg1);
2622
+ };
2623
+ imports.wbg.__wbg_error_685b20024dc2d6ca = function() {
2624
+ return handleError(function(arg0) {
2625
+ const ret = getObject(arg0).error;
2626
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2627
+ }, arguments);
2628
+ };
2629
+ imports.wbg.__wbg_result_6cedf5f78600a79c = function() {
2630
+ return handleError(function(arg0) {
2631
+ const ret = getObject(arg0).result;
2620
2632
  return addHeapObject(ret);
2621
2633
  }, arguments);
2622
2634
  };
2623
- imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
2635
+ imports.wbg.__wbg_instanceof_IdbRequest_93249da04f5370b6 = function(arg0) {
2624
2636
  let result;
2625
2637
  try {
2626
- result = getObject(arg0) instanceof IDBOpenDBRequest;
2638
+ result = getObject(arg0) instanceof IDBRequest;
2627
2639
  } catch (_) {
2628
2640
  result = false;
2629
2641
  }
2630
2642
  const ret = result;
2631
2643
  return ret;
2632
2644
  };
2645
+ imports.wbg.__wbg_objectStore_da468793bd9df17b = function() {
2646
+ return handleError(function(arg0, arg1, arg2) {
2647
+ const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2648
+ return addHeapObject(ret);
2649
+ }, arguments);
2650
+ };
2633
2651
  imports.wbg.__wbg_setonupgradeneeded_ad7645373c7d5e1b = function(arg0, arg1) {
2634
2652
  getObject(arg0).onupgradeneeded = getObject(arg1);
2635
2653
  };
2636
- imports.wbg.__wbg_instanceof_IdbRequest_93249da04f5370b6 = function(arg0) {
2654
+ imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
2637
2655
  let result;
2638
2656
  try {
2639
- result = getObject(arg0) instanceof IDBRequest;
2657
+ result = getObject(arg0) instanceof IDBOpenDBRequest;
2640
2658
  } catch (_) {
2641
2659
  result = false;
2642
2660
  }
2643
2661
  const ret = result;
2644
2662
  return ret;
2645
2663
  };
2646
- imports.wbg.__wbg_result_6cedf5f78600a79c = function() {
2647
- return handleError(function(arg0) {
2648
- const ret = getObject(arg0).result;
2649
- return addHeapObject(ret);
2650
- }, arguments);
2651
- };
2652
- imports.wbg.__wbg_error_685b20024dc2d6ca = function() {
2653
- return handleError(function(arg0) {
2654
- const ret = getObject(arg0).error;
2655
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2656
- }, arguments);
2657
- };
2658
- imports.wbg.__wbg_setonsuccess_632ce0a1460455c2 = function(arg0, arg1) {
2659
- getObject(arg0).onsuccess = getObject(arg1);
2660
- };
2661
- imports.wbg.__wbg_setonerror_8479b33e7568a904 = function(arg0, arg1) {
2662
- getObject(arg0).onerror = getObject(arg1);
2663
- };
2664
2664
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2665
2665
  const ret = getObject(arg0) == getObject(arg1);
2666
2666
  return ret;
@@ -2669,13 +2669,6 @@ function __wbg_get_imports() {
2669
2669
  const ret = +getObject(arg0);
2670
2670
  return ret;
2671
2671
  };
2672
- imports.wbg.__wbg_String_389b54bd9d25375f = function(arg0, arg1) {
2673
- const ret = String(getObject(arg1));
2674
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2675
- const len1 = WASM_VECTOR_LEN;
2676
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2677
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2678
- };
2679
2672
  imports.wbg.__wbg_getwithrefkey_4a92a5eca60879b9 = function(arg0, arg1) {
2680
2673
  const ret = getObject(arg0)[getObject(arg1)];
2681
2674
  return addHeapObject(ret);
@@ -2683,22 +2676,15 @@ function __wbg_get_imports() {
2683
2676
  imports.wbg.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
2684
2677
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2685
2678
  };
2686
- imports.wbg.__wbg_log_28eee4e6432efd24 = function(arg0, arg1) {
2687
- console.log(getStringFromWasm0(arg0, arg1));
2688
- };
2689
- imports.wbg.__wbg_String_55b8bdc4bc243677 = function(arg0, arg1) {
2679
+ imports.wbg.__wbg_String_389b54bd9d25375f = function(arg0, arg1) {
2690
2680
  const ret = String(getObject(arg1));
2691
2681
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2692
2682
  const len1 = WASM_VECTOR_LEN;
2693
2683
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2694
2684
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2695
2685
  };
2696
- imports.wbg.__wbg_getElementById_8458f2a6c28467dc = function(arg0, arg1, arg2) {
2697
- const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
2698
- return addHeapObject(ret);
2699
- };
2700
- imports.wbg.__wbg_settextcontent_fc3ff485b96fcb1d = function(arg0, arg1, arg2) {
2701
- getObject(arg0).textContent = getStringFromWasm0(arg1, arg2);
2686
+ imports.wbg.__wbg_log_28eee4e6432efd24 = function(arg0, arg1) {
2687
+ console.log(getStringFromWasm0(arg0, arg1));
2702
2688
  };
2703
2689
  imports.wbg.__wbg_wbgtestinvoke_8c20f4132af2bded = function() {
2704
2690
  return handleError(function(arg0, arg1) {
@@ -2708,7 +2694,7 @@ function __wbg_get_imports() {
2708
2694
  const a = state0.a;
2709
2695
  state0.a = 0;
2710
2696
  try {
2711
- return __wbg_adapter_297(a, state0.b);
2697
+ return __wbg_adapter_287(a, state0.b);
2712
2698
  } finally {
2713
2699
  state0.a = a;
2714
2700
  }
@@ -2719,13 +2705,20 @@ function __wbg_get_imports() {
2719
2705
  }
2720
2706
  }, arguments);
2721
2707
  };
2722
- imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2723
- __wbg_test_output_writeln(takeObject(arg0));
2724
- };
2725
- imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2726
- const ret = getObject(arg0).stack;
2708
+ imports.wbg.__wbg_getElementById_8458f2a6c28467dc = function(arg0, arg1, arg2) {
2709
+ const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
2727
2710
  return addHeapObject(ret);
2728
2711
  };
2712
+ imports.wbg.__wbg_settextcontent_fc3ff485b96fcb1d = function(arg0, arg1, arg2) {
2713
+ getObject(arg0).textContent = getStringFromWasm0(arg1, arg2);
2714
+ };
2715
+ imports.wbg.__wbg_String_55b8bdc4bc243677 = function(arg0, arg1) {
2716
+ const ret = String(getObject(arg1));
2717
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2718
+ const len1 = WASM_VECTOR_LEN;
2719
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2720
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2721
+ };
2729
2722
  imports.wbg.__wbg_self_55106357ec10ecd4 = function(arg0) {
2730
2723
  const ret = getObject(arg0).self;
2731
2724
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
@@ -2741,8 +2734,12 @@ function __wbg_get_imports() {
2741
2734
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2742
2735
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2743
2736
  };
2744
- imports.wbg.__wbg_textcontent_67e4e811cbdf00fc = function(arg0, arg1) {
2745
- const ret = getObject(arg1).textContent;
2737
+ imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2738
+ const ret = document;
2739
+ return addHeapObject(ret);
2740
+ };
2741
+ imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2742
+ const ret = getObject(arg1).stack;
2746
2743
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2747
2744
  const len1 = WASM_VECTOR_LEN;
2748
2745
  getInt32Memory0()[arg0 / 4 + 1] = len1;
@@ -2752,17 +2749,20 @@ function __wbg_get_imports() {
2752
2749
  const ret = getObject(arg0).stack;
2753
2750
  return addHeapObject(ret);
2754
2751
  };
2755
- imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2756
- const ret = document;
2757
- return addHeapObject(ret);
2758
- };
2759
- imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2760
- const ret = getObject(arg1).stack;
2752
+ imports.wbg.__wbg_textcontent_67e4e811cbdf00fc = function(arg0, arg1) {
2753
+ const ret = getObject(arg1).textContent;
2761
2754
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2762
2755
  const len1 = WASM_VECTOR_LEN;
2763
2756
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2764
2757
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2765
2758
  };
2759
+ imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2760
+ const ret = getObject(arg0).stack;
2761
+ return addHeapObject(ret);
2762
+ };
2763
+ imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2764
+ __wbg_test_output_writeln(takeObject(arg0));
2765
+ };
2766
2766
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
2767
2767
  const ret = new Error();
2768
2768
  return addHeapObject(ret);
@@ -2785,42 +2785,55 @@ function __wbg_get_imports() {
2785
2785
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2786
2786
  }
2787
2787
  };
2788
- imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
2789
- const ret = getObject(arg0).queueMicrotask;
2790
- return addHeapObject(ret);
2791
- };
2792
2788
  imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
2793
2789
  queueMicrotask(getObject(arg0));
2794
2790
  };
2795
- imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
2796
- const ret = getObject(arg0)[arg1 >>> 0];
2791
+ imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
2792
+ const ret = getObject(arg0).queueMicrotask;
2797
2793
  return addHeapObject(ret);
2798
2794
  };
2799
- imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
2800
- const ret = getObject(arg0).length;
2801
- return ret;
2795
+ imports.wbg.__wbg_new_d9bc3a0147634640 = function() {
2796
+ const ret = /* @__PURE__ */ new Map();
2797
+ return addHeapObject(ret);
2802
2798
  };
2803
2799
  imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
2804
2800
  const ret = new Array();
2805
2801
  return addHeapObject(ret);
2806
2802
  };
2803
+ imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
2804
+ const ret = new Object();
2805
+ return addHeapObject(ret);
2806
+ };
2807
2807
  imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
2808
2808
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2809
2809
  return addHeapObject(ret);
2810
2810
  };
2811
- imports.wbg.__wbg_new_d9bc3a0147634640 = function() {
2812
- const ret = /* @__PURE__ */ new Map();
2811
+ imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
2812
+ const ret = new Uint8Array(getObject(arg0));
2813
2813
  return addHeapObject(ret);
2814
2814
  };
2815
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
2816
- const ret = getObject(arg0).next;
2815
+ imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
2816
+ const ret = getObject(arg0).buffer;
2817
2817
  return addHeapObject(ret);
2818
2818
  };
2819
- imports.wbg.__wbg_next_196c84450b364254 = function() {
2820
- return handleError(function(arg0) {
2821
- const ret = getObject(arg0).next();
2822
- return addHeapObject(ret);
2823
- }, arguments);
2819
+ imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
2820
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2821
+ return addHeapObject(ret);
2822
+ };
2823
+ imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
2824
+ const ret = new Uint8Array(arg0 >>> 0);
2825
+ return addHeapObject(ret);
2826
+ };
2827
+ imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
2828
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2829
+ };
2830
+ imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
2831
+ const ret = getObject(arg0).length;
2832
+ return ret;
2833
+ };
2834
+ imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
2835
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2836
+ return addHeapObject(ret);
2824
2837
  };
2825
2838
  imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
2826
2839
  const ret = getObject(arg0).done;
@@ -2830,49 +2843,55 @@ function __wbg_get_imports() {
2830
2843
  const ret = getObject(arg0).value;
2831
2844
  return addHeapObject(ret);
2832
2845
  };
2833
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
2834
- const ret = Symbol.iterator;
2835
- return addHeapObject(ret);
2836
- };
2837
- imports.wbg.__wbg_get_e3c254076557e348 = function() {
2838
- return handleError(function(arg0, arg1) {
2839
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
2840
- return addHeapObject(ret);
2841
- }, arguments);
2846
+ imports.wbg.__wbg_instanceof_Object_71ca3c0a59266746 = function(arg0) {
2847
+ let result;
2848
+ try {
2849
+ result = getObject(arg0) instanceof Object;
2850
+ } catch (_) {
2851
+ result = false;
2852
+ }
2853
+ const ret = result;
2854
+ return ret;
2842
2855
  };
2843
- imports.wbg.__wbg_call_27c0f87801dedf93 = function() {
2844
- return handleError(function(arg0, arg1) {
2845
- const ret = getObject(arg0).call(getObject(arg1));
2846
- return addHeapObject(ret);
2847
- }, arguments);
2856
+ imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
2857
+ let result;
2858
+ try {
2859
+ result = getObject(arg0) instanceof Uint8Array;
2860
+ } catch (_) {
2861
+ result = false;
2862
+ }
2863
+ const ret = result;
2864
+ return ret;
2848
2865
  };
2849
- imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
2850
- const ret = new Object();
2866
+ imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
2867
+ let result;
2868
+ try {
2869
+ result = getObject(arg0) instanceof ArrayBuffer;
2870
+ } catch (_) {
2871
+ result = false;
2872
+ }
2873
+ const ret = result;
2874
+ return ret;
2875
+ };
2876
+ imports.wbg.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
2877
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2851
2878
  return addHeapObject(ret);
2852
2879
  };
2853
- imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() {
2854
- return handleError(function() {
2855
- const ret = self.self;
2856
- return addHeapObject(ret);
2857
- }, arguments);
2880
+ imports.wbg.__wbg_new0_7d84e5b2cd9fdc73 = function() {
2881
+ const ret = /* @__PURE__ */ new Date();
2882
+ return addHeapObject(ret);
2858
2883
  };
2859
- imports.wbg.__wbg_window_c6fb939a7f436783 = function() {
2860
- return handleError(function() {
2861
- const ret = window.window;
2862
- return addHeapObject(ret);
2863
- }, arguments);
2884
+ imports.wbg.__wbg_getTime_2bc4375165f02d15 = function(arg0) {
2885
+ const ret = getObject(arg0).getTime();
2886
+ return ret;
2864
2887
  };
2865
- imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() {
2866
- return handleError(function() {
2867
- const ret = globalThis.globalThis;
2868
- return addHeapObject(ret);
2869
- }, arguments);
2888
+ imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
2889
+ const ret = getObject(arg0)[arg1 >>> 0];
2890
+ return addHeapObject(ret);
2870
2891
  };
2871
- imports.wbg.__wbg_global_207b558942527489 = function() {
2872
- return handleError(function() {
2873
- const ret = global.global;
2874
- return addHeapObject(ret);
2875
- }, arguments);
2892
+ imports.wbg.__wbg_of_4a2b313a453ec059 = function(arg0) {
2893
+ const ret = Array.of(getObject(arg0));
2894
+ return addHeapObject(ret);
2876
2895
  };
2877
2896
  imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
2878
2897
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
@@ -2881,6 +2900,14 @@ function __wbg_get_imports() {
2881
2900
  const ret = Array.from(getObject(arg0));
2882
2901
  return addHeapObject(ret);
2883
2902
  };
2903
+ imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
2904
+ const ret = getObject(arg0).length;
2905
+ return ret;
2906
+ };
2907
+ imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
2908
+ const ret = getObject(arg0).push(getObject(arg1));
2909
+ return ret;
2910
+ };
2884
2911
  imports.wbg.__wbg_forEach_2be8de7347d63332 = function(arg0, arg1, arg2) {
2885
2912
  try {
2886
2913
  var state0 = { a: arg1, b: arg2 };
@@ -2888,7 +2915,7 @@ function __wbg_get_imports() {
2888
2915
  const a = state0.a;
2889
2916
  state0.a = 0;
2890
2917
  try {
2891
- return __wbg_adapter_340(a, state0.b, arg02, arg12, arg22);
2918
+ return __wbg_adapter_378(a, state0.b, arg02, arg12, arg22);
2892
2919
  } finally {
2893
2920
  state0.a = a;
2894
2921
  }
@@ -2902,70 +2929,26 @@ function __wbg_get_imports() {
2902
2929
  const ret = Array.isArray(getObject(arg0));
2903
2930
  return ret;
2904
2931
  };
2905
- imports.wbg.__wbg_of_4a2b313a453ec059 = function(arg0) {
2906
- const ret = Array.of(getObject(arg0));
2907
- return addHeapObject(ret);
2908
- };
2909
- imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
2910
- const ret = getObject(arg0).push(getObject(arg1));
2911
- return ret;
2912
- };
2913
- imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
2914
- let result;
2915
- try {
2916
- result = getObject(arg0) instanceof ArrayBuffer;
2917
- } catch (_) {
2918
- result = false;
2919
- }
2920
- const ret = result;
2921
- return ret;
2922
- };
2923
- imports.wbg.__wbg_message_5bf28016c2b49cfb = function(arg0) {
2924
- const ret = getObject(arg0).message;
2925
- return addHeapObject(ret);
2926
- };
2927
2932
  imports.wbg.__wbg_name_e7429f0dda6079e2 = function(arg0) {
2928
2933
  const ret = getObject(arg0).name;
2929
2934
  return addHeapObject(ret);
2930
2935
  };
2931
- imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() {
2932
- return handleError(function(arg0, arg1, arg2) {
2933
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2934
- return addHeapObject(ret);
2935
- }, arguments);
2936
- };
2937
- imports.wbg.__wbg_call_938992c832f74314 = function() {
2938
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2939
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2940
- return addHeapObject(ret);
2941
- }, arguments);
2942
- };
2943
- imports.wbg.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
2944
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2936
+ imports.wbg.__wbg_message_5bf28016c2b49cfb = function(arg0) {
2937
+ const ret = getObject(arg0).message;
2945
2938
  return addHeapObject(ret);
2946
2939
  };
2947
2940
  imports.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2 = function(arg0) {
2948
2941
  const ret = Number.isSafeInteger(getObject(arg0));
2949
2942
  return ret;
2950
2943
  };
2951
- imports.wbg.__wbg_getTime_2bc4375165f02d15 = function(arg0) {
2952
- const ret = getObject(arg0).getTime();
2944
+ imports.wbg.__wbg_is_010fdc0f4ab96916 = function(arg0, arg1) {
2945
+ const ret = Object.is(getObject(arg0), getObject(arg1));
2953
2946
  return ret;
2954
2947
  };
2955
- imports.wbg.__wbg_new0_7d84e5b2cd9fdc73 = function() {
2956
- const ret = /* @__PURE__ */ new Date();
2948
+ imports.wbg.__wbg_keys_91e412b4b222659f = function(arg0) {
2949
+ const ret = Object.keys(getObject(arg0));
2957
2950
  return addHeapObject(ret);
2958
2951
  };
2959
- imports.wbg.__wbg_instanceof_Object_71ca3c0a59266746 = function(arg0) {
2960
- let result;
2961
- try {
2962
- result = getObject(arg0) instanceof Object;
2963
- } catch (_) {
2964
- result = false;
2965
- }
2966
- const ret = result;
2967
- return ret;
2968
- };
2969
2952
  imports.wbg.__wbg_assign_496d2d14fecafbcf = function(arg0, arg1) {
2970
2953
  const ret = Object.assign(getObject(arg0), getObject(arg1));
2971
2954
  return addHeapObject(ret);
@@ -2974,14 +2957,40 @@ function __wbg_get_imports() {
2974
2957
  const ret = Object.entries(getObject(arg0));
2975
2958
  return addHeapObject(ret);
2976
2959
  };
2977
- imports.wbg.__wbg_is_010fdc0f4ab96916 = function(arg0, arg1) {
2978
- const ret = Object.is(getObject(arg0), getObject(arg1));
2979
- return ret;
2980
- };
2981
- imports.wbg.__wbg_keys_91e412b4b222659f = function(arg0) {
2982
- const ret = Object.keys(getObject(arg0));
2960
+ imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
2961
+ const ret = Symbol.iterator;
2983
2962
  return addHeapObject(ret);
2984
2963
  };
2964
+ imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() {
2965
+ return handleError(function() {
2966
+ const ret = self.self;
2967
+ return addHeapObject(ret);
2968
+ }, arguments);
2969
+ };
2970
+ imports.wbg.__wbg_window_c6fb939a7f436783 = function() {
2971
+ return handleError(function() {
2972
+ const ret = window.window;
2973
+ return addHeapObject(ret);
2974
+ }, arguments);
2975
+ };
2976
+ imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() {
2977
+ return handleError(function() {
2978
+ const ret = globalThis.globalThis;
2979
+ return addHeapObject(ret);
2980
+ }, arguments);
2981
+ };
2982
+ imports.wbg.__wbg_global_207b558942527489 = function() {
2983
+ return handleError(function() {
2984
+ const ret = global.global;
2985
+ return addHeapObject(ret);
2986
+ }, arguments);
2987
+ };
2988
+ imports.wbg.__wbg_call_27c0f87801dedf93 = function() {
2989
+ return handleError(function(arg0, arg1) {
2990
+ const ret = getObject(arg0).call(getObject(arg1));
2991
+ return addHeapObject(ret);
2992
+ }, arguments);
2993
+ };
2985
2994
  imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
2986
2995
  try {
2987
2996
  var state0 = { a: arg0, b: arg1 };
@@ -2989,7 +2998,7 @@ function __wbg_get_imports() {
2989
2998
  const a = state0.a;
2990
2999
  state0.a = 0;
2991
3000
  try {
2992
- return __wbg_adapter_397(a, state0.b, arg02, arg12);
3001
+ return __wbg_adapter_395(a, state0.b, arg02, arg12);
2993
3002
  } finally {
2994
3003
  state0.a = a;
2995
3004
  }
@@ -3000,10 +3009,6 @@ function __wbg_get_imports() {
3000
3009
  state0.a = state0.b = 0;
3001
3010
  }
3002
3011
  };
3003
- imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
3004
- const ret = Promise.resolve(getObject(arg0));
3005
- return addHeapObject(ret);
3006
- };
3007
3012
  imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
3008
3013
  const ret = getObject(arg0).then(getObject(arg1));
3009
3014
  return addHeapObject(ret);
@@ -3012,46 +3017,47 @@ function __wbg_get_imports() {
3012
3017
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
3013
3018
  return addHeapObject(ret);
3014
3019
  };
3015
- imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
3016
- const ret = getObject(arg0).buffer;
3017
- return addHeapObject(ret);
3018
- };
3019
- imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
3020
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
3020
+ imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
3021
+ const ret = Promise.resolve(getObject(arg0));
3021
3022
  return addHeapObject(ret);
3022
3023
  };
3023
- imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
3024
- const ret = new Uint8Array(getObject(arg0));
3025
- return addHeapObject(ret);
3024
+ imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() {
3025
+ return handleError(function(arg0, arg1, arg2) {
3026
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
3027
+ return addHeapObject(ret);
3028
+ }, arguments);
3026
3029
  };
3027
- imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
3028
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3030
+ imports.wbg.__wbg_call_938992c832f74314 = function() {
3031
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
3032
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
3033
+ return addHeapObject(ret);
3034
+ }, arguments);
3029
3035
  };
3030
- imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
3031
- const ret = getObject(arg0).length;
3032
- return ret;
3036
+ imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
3037
+ const ret = getObject(arg0).next;
3038
+ return addHeapObject(ret);
3033
3039
  };
3034
- imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
3035
- let result;
3036
- try {
3037
- result = getObject(arg0) instanceof Uint8Array;
3038
- } catch (_) {
3039
- result = false;
3040
- }
3041
- const ret = result;
3042
- return ret;
3040
+ imports.wbg.__wbg_next_196c84450b364254 = function() {
3041
+ return handleError(function(arg0) {
3042
+ const ret = getObject(arg0).next();
3043
+ return addHeapObject(ret);
3044
+ }, arguments);
3043
3045
  };
3044
- imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
3045
- const ret = new Uint8Array(arg0 >>> 0);
3046
- return addHeapObject(ret);
3046
+ imports.wbg.__wbg_get_e3c254076557e348 = function() {
3047
+ return handleError(function(arg0, arg1) {
3048
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
3049
+ return addHeapObject(ret);
3050
+ }, arguments);
3047
3051
  };
3048
- imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
3049
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
3050
- return addHeapObject(ret);
3052
+ imports.wbg.__wbg_parse_66d1801634e099ac = function() {
3053
+ return handleError(function(arg0, arg1) {
3054
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
3055
+ return addHeapObject(ret);
3056
+ }, arguments);
3051
3057
  };
3052
- imports.wbg.__wbg_apply_0a5aa603881e6d79 = function() {
3053
- return handleError(function(arg0, arg1, arg2) {
3054
- const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
3058
+ imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() {
3059
+ return handleError(function(arg0) {
3060
+ const ret = JSON.stringify(getObject(arg0));
3055
3061
  return addHeapObject(ret);
3056
3062
  }, arguments);
3057
3063
  };
@@ -3073,15 +3079,9 @@ function __wbg_get_imports() {
3073
3079
  return ret;
3074
3080
  }, arguments);
3075
3081
  };
3076
- imports.wbg.__wbg_parse_66d1801634e099ac = function() {
3077
- return handleError(function(arg0, arg1) {
3078
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
3079
- return addHeapObject(ret);
3080
- }, arguments);
3081
- };
3082
- imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() {
3083
- return handleError(function(arg0) {
3084
- const ret = JSON.stringify(getObject(arg0));
3082
+ imports.wbg.__wbg_apply_0a5aa603881e6d79 = function() {
3083
+ return handleError(function(arg0, arg1, arg2) {
3084
+ const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
3085
3085
  return addHeapObject(ret);
3086
3086
  }, arguments);
3087
3087
  };
@@ -3091,6 +3091,13 @@ function __wbg_get_imports() {
3091
3091
  getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
3092
3092
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
3093
3093
  };
3094
+ imports.wbg.__wbindgen_memory = function() {
3095
+ const ret = wasm.memory;
3096
+ return addHeapObject(ret);
3097
+ };
3098
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
3099
+ throw new Error(getStringFromWasm0(arg0, arg1));
3100
+ };
3094
3101
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
3095
3102
  const ret = debugString(getObject(arg1));
3096
3103
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -3098,23 +3105,16 @@ function __wbg_get_imports() {
3098
3105
  getInt32Memory0()[arg0 / 4 + 1] = len1;
3099
3106
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3100
3107
  };
3101
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
3102
- throw new Error(getStringFromWasm0(arg0, arg1));
3103
- };
3104
- imports.wbg.__wbindgen_memory = function() {
3105
- const ret = wasm.memory;
3106
- return addHeapObject(ret);
3107
- };
3108
- imports.wbg.__wbindgen_closure_wrapper563 = function(arg0, arg1, arg2) {
3109
- const ret = makeMutClosure(arg0, arg1, 211, __wbg_adapter_56);
3108
+ imports.wbg.__wbindgen_closure_wrapper515 = function(arg0, arg1, arg2) {
3109
+ const ret = makeMutClosure(arg0, arg1, 181, __wbg_adapter_56);
3110
3110
  return addHeapObject(ret);
3111
3111
  };
3112
- imports.wbg.__wbindgen_closure_wrapper565 = function(arg0, arg1, arg2) {
3113
- const ret = makeClosure(arg0, arg1, 211, __wbg_adapter_59);
3112
+ imports.wbg.__wbindgen_closure_wrapper517 = function(arg0, arg1, arg2) {
3113
+ const ret = makeClosure(arg0, arg1, 181, __wbg_adapter_59);
3114
3114
  return addHeapObject(ret);
3115
3115
  };
3116
- imports.wbg.__wbindgen_closure_wrapper1677 = function(arg0, arg1, arg2) {
3117
- const ret = makeMutClosure(arg0, arg1, 451, __wbg_adapter_62);
3116
+ imports.wbg.__wbindgen_closure_wrapper1702 = function(arg0, arg1, arg2) {
3117
+ const ret = makeMutClosure(arg0, arg1, 465, __wbg_adapter_62);
3118
3118
  return addHeapObject(ret);
3119
3119
  };
3120
3120
  return imports;