@feltdb/core 0.16.0 → 0.16.1

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.
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schema": "feltdb.build-identity.v2",
3
3
  "package": "@feltdb/core",
4
- "version": "0.16.0",
4
+ "version": "0.16.1",
5
5
  "git": {
6
- "sha1": "2433b73d6e643c8476de7e3364350af0230f47be",
6
+ "sha1": "dd9fe9449e38054dee71cc9e6e5ea929d25026ee",
7
7
  "dirty": false
8
8
  },
9
9
  "path_in_vcs": "packages/core",
10
- "source_digest": "sha256:8bc6dd69a986ac9db9b709570851ebbdf8cdd9ecf2f61e60d21bb8b5c5f1ed9e",
10
+ "source_digest": "sha256:f5f01ce7dad3501af8542326bdbe3cabfd4859b1e2a31851f6be419988360ce0",
11
11
  "inputs": [
12
12
  "Cargo.lock",
13
13
  "Cargo.toml",
@@ -20,12 +20,12 @@
20
20
  "tools/cli",
21
21
  "tools/create-feltdb"
22
22
  ],
23
- "files": 792,
23
+ "files": 790,
24
24
  "release": {
25
- "tag": "v0.16.0",
25
+ "tag": "v0.16.1",
26
26
  "ref": "main",
27
27
  "origin_main": {
28
- "sha1": "2433b73d6e643c8476de7e3364350af0230f47be",
28
+ "sha1": "dd9fe9449e38054dee71cc9e6e5ea929d25026ee",
29
29
  "contains_commit": true
30
30
  }
31
31
  },
@@ -1 +1 @@
1
- {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EAAE,WAAW,EAAc,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAErF,6CAA6C;AAC7C,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;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AAG,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;CAoBxD"}
@@ -41,6 +41,21 @@ function assertRecordValue(collection, operation, value) {
41
41
  + `The id goes second: insert(record, id).`, FeltDBErrorCode.INVALID_REQUEST);
42
42
  }
43
43
  }
44
+ /**
45
+ * A query result as the document `find()` returns on every backend. A FeltDB server adds its
46
+ * record identity (`recordId`, authority metadata, equal to the document's `id`) to each
47
+ * bounded-query result; the embedded runtimes do not. `find()` returns documents, so a caller
48
+ * that reads one and writes it back never stores the authority's metadata as a field.
49
+ */
50
+ function storedDocument(record) {
51
+ if (!record || typeof record !== 'object' || Array.isArray(record))
52
+ return record;
53
+ const value = record;
54
+ if (!('recordId' in value) || value.recordId !== value.id)
55
+ return record;
56
+ const { recordId: _authority, ...document } = value;
57
+ return document;
58
+ }
44
59
  /**
45
60
  * A live collection that automatically updates when underlying data changes.
46
61
  * Represents application state, not a one-time query result.
@@ -168,7 +183,7 @@ export class Collection {
168
183
  candidatesExamined: page.plan?.actual_rows_scanned ?? page.records.length,
169
184
  recordsReturned: page.records.length,
170
185
  };
171
- return page.records;
186
+ return page.records.map(storedDocument);
172
187
  }
173
188
  if (entries.length > 0 && this.db.authority_query && this.db.collection_queries_via_authority) {
174
189
  const records = [];
@@ -185,7 +200,7 @@ export class Collection {
185
200
  limit: 100,
186
201
  ...(cursor ? { cursor } : {}),
187
202
  });
188
- records.push(...page.records);
203
+ records.push(...page.records.map(storedDocument));
189
204
  candidatesExamined += page.plan?.actual_rows_scanned ?? page.records.length;
190
205
  indexName = page.plan?.index ?? indexName;
191
206
  cursor = page.nextCursor;
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schema": "feltdb.build-identity.v2",
3
3
  "package": "create-feltdb",
4
- "version": "0.16.0",
4
+ "version": "0.16.1",
5
5
  "git": {
6
- "sha1": "2433b73d6e643c8476de7e3364350af0230f47be",
6
+ "sha1": "dd9fe9449e38054dee71cc9e6e5ea929d25026ee",
7
7
  "dirty": false
8
8
  },
9
9
  "path_in_vcs": "tools/create-feltdb",
10
- "source_digest": "sha256:8bc6dd69a986ac9db9b709570851ebbdf8cdd9ecf2f61e60d21bb8b5c5f1ed9e",
10
+ "source_digest": "sha256:f5f01ce7dad3501af8542326bdbe3cabfd4859b1e2a31851f6be419988360ce0",
11
11
  "inputs": [
12
12
  "Cargo.lock",
13
13
  "Cargo.toml",
@@ -20,12 +20,12 @@
20
20
  "tools/cli",
21
21
  "tools/create-feltdb"
22
22
  ],
23
- "files": 792,
23
+ "files": 790,
24
24
  "release": {
25
- "tag": "v0.16.0",
25
+ "tag": "v0.16.1",
26
26
  "ref": "main",
27
27
  "origin_main": {
28
- "sha1": "2433b73d6e643c8476de7e3364350af0230f47be",
28
+ "sha1": "dd9fe9449e38054dee71cc9e6e5ea929d25026ee",
29
29
  "contains_commit": true
30
30
  }
31
31
  },
@@ -1,4 +1,4 @@
1
1
  // One release train keeps generated applications installable. The repository
2
2
  // validation script checks these values against every workspace manifest.
3
- export const FELTDB_PACKAGE_VERSION = '0.16.0';
3
+ export const FELTDB_PACKAGE_VERSION = '0.16.1';
4
4
  export const feltdbPackageRange = `^${FELTDB_PACKAGE_VERSION}`;
@@ -333,9 +333,9 @@ dependencies = [
333
333
 
334
334
  [[package]]
335
335
  name = "feltdb"
336
- version = "0.4.1"
336
+ version = "0.4.2"
337
337
  source = "registry+https://github.com/rust-lang/crates.io-index"
338
- checksum = "d505554df02cc3bd36ebbe62d739bc47ad3618a50aea8a241bc90c71955ecbf7"
338
+ checksum = "a3595a2d90fa55ba389f3262c34fdea1e69c79dd4af56647bd3a087359603d66"
339
339
  dependencies = [
340
340
  "async-stream",
341
341
  "async-trait",
@@ -350,7 +350,7 @@ dependencies = [
350
350
 
351
351
  [[package]]
352
352
  name = "feltdb-client"
353
- version = "0.4.1"
353
+ version = "0.4.2"
354
354
  dependencies = [
355
355
  "feltdb",
356
356
  "reqwest",
@@ -363,7 +363,7 @@ dependencies = [
363
363
 
364
364
  [[package]]
365
365
  name = "feltdb-server"
366
- version = "0.4.1"
366
+ version = "0.4.2"
367
367
  dependencies = [
368
368
  "argon2",
369
369
  "async-stream",
@@ -389,7 +389,7 @@ dependencies = [
389
389
 
390
390
  [[package]]
391
391
  name = "feltdb-wasm"
392
- version = "0.4.1"
392
+ version = "0.4.2"
393
393
  dependencies = [
394
394
  "feltdb",
395
395
  "getrandom 0.2.17",
@@ -3,5 +3,5 @@ members = ["crates/feltdb-server", "crates/feltdb-wasm", "crates/feltdb-client"]
3
3
  resolver = "2"
4
4
 
5
5
  [workspace.package]
6
- version = "0.4.1"
6
+ version = "0.4.2"
7
7
  edition = "2021"
@@ -16,7 +16,7 @@ exclude = ["tests/", "target/"]
16
16
  # The wire types are the server's own: the request and response documents are defined once, in
17
17
  # `feltdb`, and both sides serialize the same structs. Exact, because the modules they come from are
18
18
  # not yet covered by `feltdb`'s compatibility policy; the workspace releases both at one version.
19
- feltdb = { version = "=0.4.1" }
19
+ feltdb = { version = "=0.4.2" }
20
20
  reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
21
21
  serde = { version = "1", features = ["derive"] }
22
22
  serde_json = "1"
@@ -24,7 +24,7 @@ hmac = "0.12"
24
24
  # Exact: the server uses `unstable-internals`, which carries no semver promise, so a release of
25
25
  # this crate is built against the one `feltdb` release it was tested with. The workspace shares one
26
26
  # version, so this moves with every release (a mismatch fails to resolve, it cannot drift silently).
27
- feltdb = { version = "=0.4.1", features = ["unstable-internals"] }
27
+ feltdb = { version = "=0.4.2", features = ["unstable-internals"] }
28
28
  futures-core = "0.3"
29
29
  rand = "0.8"
30
30
  ring = "0.17"
@@ -14056,7 +14056,7 @@ async fn search_collection(
14056
14056
  Path(collection): Path<String>,
14057
14057
  Json(request): Json<SearchRequest>,
14058
14058
  ) -> Result<Json<Vec<RecordResponse>>, ApiError> {
14059
- validate_segment(&collection)?;
14059
+ validate_collection_name(&collection)?;
14060
14060
  authorize_capability_read(&state, &CapabilityAccess::Principal(&principal), &collection)?;
14061
14061
  if request.query.len() > 512 || request.limit == 0 || request.limit > 500 {
14062
14062
  return Err(ApiError(
@@ -15274,19 +15274,16 @@ async fn execute_bounded_query(
15274
15274
  let request: BoundedQueryRequest = serde_json::from_value(request)
15275
15275
  .map_err(|error| bounded_query_error("INVALID_QUERY", error.to_string()))?;
15276
15276
  let execution = bounded_query_execution(&headers)?;
15277
- validate_segment(&request.collection)?;
15277
+ validate_collection_name(&request.collection)?;
15278
15278
  if request.limit == 0 || request.limit > MAX_BOUNDED_QUERY_LIMIT {
15279
15279
  return Err(bounded_query_error(
15280
15280
  "INVALID_QUERY",
15281
15281
  format!("limit must be between 1 and {MAX_BOUNDED_QUERY_LIMIT}"),
15282
15282
  ));
15283
15283
  }
15284
- if request.order_by.is_empty() {
15285
- return Err(bounded_query_error(
15286
- "INVALID_QUERY",
15287
- "orderBy must contain at least one field",
15288
- ));
15289
- }
15284
+ // `orderBy` is optional, as on every embedded runtime: the record id is always the
15285
+ // final tie-breaker below, so with no ordering field the order is record id
15286
+ // (adrs/canonical-durable-state-api.md, Q1).
15290
15287
  for order in &request.order_by {
15291
15288
  if order.field.trim().is_empty() || !matches!(order.direction.as_str(), "asc" | "desc") {
15292
15289
  return Err(bounded_query_error(
@@ -15685,7 +15682,7 @@ async fn list_records(
15685
15682
  "system collection requires proposal service".into(),
15686
15683
  ));
15687
15684
  }
15688
- validate_segment(&collection)?;
15685
+ validate_collection_name(&collection)?;
15689
15686
  let rows = state.db.list_collection(&collection)?;
15690
15687
  Ok(Json(rows.into_iter().map(record_response).collect()))
15691
15688
  }
@@ -16066,7 +16063,7 @@ async fn create_record(
16066
16063
  "system collection requires proposal service".into(),
16067
16064
  ));
16068
16065
  }
16069
- validate_segment(&collection)?;
16066
+ validate_collection_name(&collection)?;
16070
16067
  let id = record
16071
16068
  .id
16072
16069
  .take()
@@ -17797,11 +17794,103 @@ async fn state_reconciliation_execute(
17797
17794
  }
17798
17795
 
17799
17796
  fn record_key(collection: &str, id: &str) -> Result<String, ApiError> {
17800
- validate_segment(collection)?;
17801
- validate_segment(id)?;
17797
+ validate_collection_name(collection)?;
17798
+ // An agent-state record's id is FeltDB's own (its transition contract defines it);
17799
+ // every other record keeps the plain segment rule.
17800
+ if is_agent_state_collection(collection) {
17801
+ if !feltdb::agent_transition_contract::agent_state_record_id_ok(id) {
17802
+ return Err(ApiError(
17803
+ StatusCode::BAD_REQUEST,
17804
+ "invalid collection or record identifier".to_string(),
17805
+ ));
17806
+ }
17807
+ } else {
17808
+ validate_segment(id)?;
17809
+ }
17802
17810
  Ok(format!("{collection}:{id}"))
17803
17811
  }
17804
17812
 
17813
+ /// A collection name on the namespace data API: a plain segment, or one of FeltDB's own
17814
+ /// agent-state collections (`_feltdb.AgentTask`, `_feltdb.AgentCheckpoint`, …), which
17815
+ /// FeltDB's client writes for `openAgentState`. Exactly `_feltdb.Agent` followed by ASCII
17816
+ /// letters: no other reserved (`_feltdb.Composition…`) or dotted name is accepted, and
17817
+ /// record ids, namespaces, fields and workers keep `validate_segment`. Authorization and
17818
+ /// namespace isolation do not depend on the name.
17819
+ fn validate_collection_name(value: &str) -> Result<(), ApiError> {
17820
+ if validate_segment(value).is_ok() || is_agent_state_collection(value) {
17821
+ return Ok(());
17822
+ }
17823
+ Err(ApiError(
17824
+ StatusCode::BAD_REQUEST,
17825
+ "invalid collection or record identifier".to_string(),
17826
+ ))
17827
+ }
17828
+
17829
+ fn is_agent_state_collection(value: &str) -> bool {
17830
+ value
17831
+ .strip_prefix(feltdb::agent_transition_contract::AGENT_COLLECTION_PREFIX)
17832
+ .is_some_and(|rest| {
17833
+ !rest.is_empty()
17834
+ && rest.len() <= 64
17835
+ && rest.bytes().all(|byte| byte.is_ascii_alphabetic())
17836
+ })
17837
+ }
17838
+
17839
+ #[cfg(test)]
17840
+ mod collection_name_tests {
17841
+ use super::{is_agent_state_collection, record_key, validate_collection_name};
17842
+
17843
+ #[test]
17844
+ fn agent_state_collections_and_plain_names_only() {
17845
+ for ok in [
17846
+ "_feltdb.AgentTask",
17847
+ "_feltdb.AgentCheckpoint",
17848
+ "_feltdb.AgentHandoff",
17849
+ "_feltdb.AgentMemory",
17850
+ "_feltdb.AgentIntent",
17851
+ "tasks",
17852
+ "a-b_c",
17853
+ ] {
17854
+ assert!(validate_collection_name(ok).is_ok(), "{ok}");
17855
+ }
17856
+ for refused in [
17857
+ "",
17858
+ "_feltdb.Agent",
17859
+ "_feltdb.CompositionContract",
17860
+ "_feltdb.StateChange",
17861
+ "_feltdb.AgentTask.x",
17862
+ "_feltdb.Agent..x",
17863
+ "_feltdb.Agent1",
17864
+ "_FELTDB.AgentTask",
17865
+ "a.b",
17866
+ "../x",
17867
+ "_feltdb.AgentTask/x",
17868
+ ] {
17869
+ assert!(validate_collection_name(refused).is_err(), "{refused}");
17870
+ }
17871
+ assert!(!is_agent_state_collection("_feltdb.Agent"));
17872
+ }
17873
+
17874
+ #[test]
17875
+ fn record_ids_follow_their_collection() {
17876
+ assert_eq!(
17877
+ record_key("_feltdb.AgentCheckpoint", "task-1.v2").unwrap(),
17878
+ "_feltdb.AgentCheckpoint:task-1.v2"
17879
+ );
17880
+ assert!(record_key("_feltdb.AgentIntent", "task-1~key").is_ok());
17881
+ for refused in ["a:b", "..", ".", ""] {
17882
+ assert!(
17883
+ record_key("_feltdb.AgentTask", refused).is_err(),
17884
+ "{refused}"
17885
+ );
17886
+ }
17887
+ assert!(record_key("_feltdb.AgentTask", &"x".repeat(258)).is_err());
17888
+ for refused in ["a.b", "a~b", "a:b"] {
17889
+ assert!(record_key("tasks", refused).is_err(), "plain {refused}");
17890
+ }
17891
+ }
17892
+ }
17893
+
17805
17894
  fn validate_segment(value: &str) -> Result<(), ApiError> {
17806
17895
  if value.is_empty()
17807
17896
  || value.len() > 128
@@ -347,8 +347,17 @@ async fn the_bounded_query_pages_in_a_total_order() {
347
347
  .collect();
348
348
  assert_eq!(values, vec![json!(4), json!(2), json!(0)]);
349
349
 
350
+ // No ordering field: record-id order, as on the embedded runtimes.
351
+ let unordered = client.query(&BoundedQuery::new("items", 10)).await.unwrap();
352
+ let ids: Vec<_> = unordered
353
+ .records
354
+ .iter()
355
+ .map(|record| record["recordId"].clone())
356
+ .collect();
357
+ assert_eq!(ids, vec![json!("i-0"), json!("i-1"), json!("i-2"), json!("i-3"), json!("i-4")]);
358
+
350
359
  let invalid = client
351
- .query(&BoundedQuery::new("items", 10))
360
+ .query(&BoundedQuery::new("items", 0))
352
361
  .await
353
362
  .unwrap_err();
354
363
  assert_eq!(invalid.code(), Some("INVALID_QUERY"));
@@ -9,7 +9,7 @@ publish = false
9
9
  crate-type = ["cdylib"]
10
10
 
11
11
  [dependencies]
12
- feltdb = { version = "=0.4.1", features = ["unstable-internals"] }
12
+ feltdb = { version = "=0.4.2", features = ["unstable-internals"] }
13
13
  wasm-bindgen = "0.2"
14
14
  wasm-bindgen-futures = "0.4"
15
15
  serde = { version = "1", features = ["derive"] }
@@ -1 +1 @@
1
- var e=class e{static __wrap(t){let n=Object.create(e.prototype);return n.__wbg_ptr=t,O.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,O.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_jsdb_free(e,0)}acknowledge_peer_operations(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=K.jsdb_acknowledge_peer_operations(this.__wbg_ptr,r,i,n);return t.__wrap(a)}add_sync_peer(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_add_sync_peer(this.__wbg_ptr,n,r);return t.__wrap(i)}delete(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_delete(this.__wbg_ptr,n,r);return t.__wrap(i)}execute_canonical_query(e,n,r,i){let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=R(r,K.__wbindgen_malloc,K.__wbindgen_realloc),u=G,d=R(i,K.__wbindgen_malloc,K.__wbindgen_realloc),f=G,p=K.jsdb_execute_canonical_query(this.__wbg_ptr,a,o,s,c,l,u,d,f);return t.__wrap(p)}execute_canonical_transaction(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.jsdb_execute_canonical_transaction(this.__wbg_ptr,r,i,a,o);return t.__wrap(s)}execute_semantic_decision(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_execute_semantic_decision(this.__wbg_ptr,n,r);return t.__wrap(i)}get(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_get(this.__wbg_ptr,n,r);return t.__wrap(i)}get_capability_records(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_get_capability_records(this.__wbg_ptr,n,r);return t.__wrap(i)}get_pending_for_peer(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=K.jsdb_get_pending_for_peer(this.__wbg_ptr,r,i,n);return t.__wrap(a)}get_sequence(){let e=K.jsdb_get_sequence(this.__wbg_ptr);return BigInt.asUintN(64,e)}insert(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.jsdb_insert(this.__wbg_ptr,r,i,a,o);return t.__wrap(s)}instance_id(){let e,t;try{let n=K.jsdb_instance_id(this.__wbg_ptr);return e=n[0],t=n[1],P(n[0],n[1])}finally{K.__wbindgen_free(e,t,1)}}is_auto_indexed(){return K.jsdb_is_auto_indexed(this.__wbg_ptr)!==0}query(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_query(this.__wbg_ptr,n,r);return t.__wrap(i)}remove_sync_peer(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_remove_sync_peer(this.__wbg_ptr,n,r);return t.__wrap(i)}sync_info(){let e=K.jsdb_sync_info(this.__wbg_ptr);return t.__wrap(e)}update(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.jsdb_update(this.__wbg_ptr,r,i,a,o);return t.__wrap(s)}};Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);var t=class e{static __wrap(t){let n=Object.create(e.prototype);return n.__wbg_ptr=t,k.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_jsresult_free(e,0)}get data(){let e=K.jsresult_data(this.__wbg_ptr),t;return e[0]!==0&&(t=P(e[0],e[1]),K.__wbindgen_free(e[0],e[1]*1,1)),t}get error(){let e=K.jsresult_error(this.__wbg_ptr),t;return e[0]!==0&&(t=P(e[0],e[1]),K.__wbindgen_free(e[0],e[1]*1,1)),t}get success(){return K.jsresult_success(this.__wbg_ptr)!==0}};Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);var n=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmanalytics_free(e,0)}generate_report(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.wasmanalytics_generate_report(this.__wbg_ptr,o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}get_all_metrics(){let e,t;try{let i=K.wasmanalytics_get_all_metrics(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_frequent_fields(e){let t,n;try{let a=K.wasmanalytics_get_frequent_fields(this.__wbg_ptr,e);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,z(a[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_index_metrics(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmanalytics_get_index_metrics(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_slowest_queries(e){let t,n;try{let a=K.wasmanalytics_get_slowest_queries(this.__wbg_ptr,e);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,z(a[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}constructor(){let e=K.wasmanalytics_new();return this.__wbg_ptr=e,A.register(this,this.__wbg_ptr,this),this}record_index_usage(e,t,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G;K.wasmanalytics_record_index_usage(this.__wbg_ptr,r,i,a,o,n)}record_query(e,t,n,r,i,a){let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G;var u=L(a)?0:R(a,K.__wbindgen_malloc,K.__wbindgen_realloc),d=G;let f=K.wasmanalytics_record_query(this.__wbg_ptr,o,s,c,l,n,r,i,u,d);if(f[1])throw z(f[0])}reset(){K.wasmanalytics_reset(this.__wbg_ptr)}};Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);var r=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmdistributedindexmanager_free(e,0)}create_replicated_index(e,t,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=K.wasmdistributedindexmanager_create_replicated_index(this.__wbg_ptr,r,i,a,o,s,c);if(l[1])throw z(l[0])}detect_conflicts(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmdistributedindexmanager_detect_conflicts(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_replication_status(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmdistributedindexmanager_get_replication_status(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_replication_targets(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmdistributedindexmanager_get_replication_targets(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_sync_status(){let e,t;try{let i=K.wasmdistributedindexmanager_get_sync_status(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}merge_versions(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmdistributedindexmanager_merge_versions(this.__wbg_ptr,t,n);if(r[1])throw z(r[0])}constructor(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmdistributedindexmanager_new(t,n);return this.__wbg_ptr=r,j.register(this,this.__wbg_ptr,this),this}register_peer(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G;K.wasmdistributedindexmanager_register_peer(this.__wbg_ptr,t,n)}set_peer_reachable(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G;K.wasmdistributedindexmanager_set_peer_reachable(this.__wbg_ptr,n,r,t)}};Symbol.dispose&&(r.prototype[Symbol.dispose]=r.prototype.free);var i=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmindexmanager_free(e,0)}create_index(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmindexmanager_create_index(this.__wbg_ptr,t,n);if(r[1])throw z(r[0])}get_stats(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmindexmanager_get_stats(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}list_indexes(){let e,t;try{let i=K.wasmindexmanager_list_indexes(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}constructor(){let e=K.wasmindexmanager_new();return this.__wbg_ptr=e,M.register(this,this.__wbg_ptr,this),this}query_index(e,t,n){let r,i;try{let s=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),u=G,d=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),f=G,p=K.wasmindexmanager_query_index(this.__wbg_ptr,s,c,l,u,d,f);var a=p[0],o=p[1];if(p[3])throw a=0,o=0,z(p[2]);return r=a,i=o,P(a,o)}finally{K.__wbindgen_free(r,i,1)}}update_record(e,t,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G;var a=L(t)?0:R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G;let s=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=K.wasmindexmanager_update_record(this.__wbg_ptr,r,i,a,o,s,c);if(l[1])throw z(l[0])}};Symbol.dispose&&(i.prototype[Symbol.dispose]=i.prototype.free);var a=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmshardmanager_free(e,0)}detect_hotspots(){let e,t;try{let i=K.wasmshardmanager_detect_hotspots(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}generate_rebalance_ops(){let e,t;try{let i=K.wasmshardmanager_generate_rebalance_ops(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_all_metrics(){let e,t;try{let i=K.wasmshardmanager_get_all_metrics(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_distribution_summary(){let e,t;try{let i=K.wasmshardmanager_get_distribution_summary(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_shard_for_key(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmshardmanager_get_shard_for_key(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}initialize_shards(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmshardmanager_initialize_shards(this.__wbg_ptr,t,n);if(r[1])throw z(r[0])}constructor(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=K.wasmshardmanager_new(n,r,i,a);return this.__wbg_ptr=o,N.register(this,this.__wbg_ptr,this),this}record_shard_operation(e,t,n,r,i){let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G;K.wasmshardmanager_record_shard_operation(this.__wbg_ptr,a,o,s,c,n,r,i)}};Symbol.dispose&&(a.prototype[Symbol.dispose]=a.prototype.free);function o(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.apply_sync_result(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function s(e,t,n,r,i,a){let o,s;try{let u=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),d=G,f=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),p=G,m=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),h=G,g=R(r,K.__wbindgen_malloc,K.__wbindgen_realloc),_=G,v=R(i,K.__wbindgen_malloc,K.__wbindgen_realloc),y=G,b=R(a,K.__wbindgen_malloc,K.__wbindgen_realloc),x=G,S=K.authorize_offline(u,d,f,p,m,h,g,_,v,y,b,x);var c=S[0],l=S[1];if(S[3])throw c=0,l=0,z(S[2]);return o=c,s=l,P(c,l)}finally{K.__wbindgen_free(o,s,1)}}function c(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.canonical_bundle_hash(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function l(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.canonicalize_application_manifest(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function u(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.compare_state_schemas(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function d(e,t){let n,r;try{var i=L(e)?0:R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G;let c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.diff_application_revisions(i,a,c,l);var o=u[0],s=u[1];if(u[3])throw o=0,s=0,z(u[2]);return n=o,r=s,P(o,s)}finally{K.__wbindgen_free(n,r,1)}}function f(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.execute_semantic_decision(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function p(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.hash_application_manifest(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function m(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.hash_application_runtime(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function h(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.hash_state_schema(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function g(t){let n=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.open(n,r);if(i[2])throw z(i[1]);return e.__wrap(i[0])}function _(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.resolve_application_runtime(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function v(e,t,n,r){let i=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.validate_mesh_claim(i,a,o,s,c,l,r);if(u[1])throw z(u[0])}function y(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.validate_semantic_decision_definition(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function b(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.validate_semantic_decision_result(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function x(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.validate_state_schema(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function S(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.validate_sync_operation(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function C(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=K.validate_worker_transition(n,r,i,a);if(o[2])throw z(o[1]);return o[0]!==0}function w(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=K.validate_workload_transition(n,r,i,a);if(o[2])throw z(o[1]);return o[0]!==0}function T(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.verify_bundle_integrity(t,n);if(r[2])throw z(r[1]);return r[0]!==0}function E(e,t,n,r,i,a){let o,s;try{let u=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),d=G,f=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),p=G,m=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),h=G,g=R(r,K.__wbindgen_malloc,K.__wbindgen_realloc),_=G,v=R(i,K.__wbindgen_malloc,K.__wbindgen_realloc),y=G,b=R(a,K.__wbindgen_malloc,K.__wbindgen_realloc),x=G,S=K.verify_signed_grant(u,d,f,p,m,h,g,_,v,y,b,x);var c=S[0],l=S[1];if(S[3])throw c=0,l=0,z(S[2]);return o=c,s=l,P(c,l)}finally{K.__wbindgen_free(o,s,1)}}function D(){return{__proto__:null,"./feltdb_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_bb96b2010945f0bc:function(e,t){throw Error(P(e,t))},__wbindgen_cast_0000000000000001:function(e,t){return P(e,t)},__wbindgen_init_externref_table:function(){let e=K.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}var O=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_jsdb_free(e,1)),k=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_jsresult_free(e,1)),A=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmanalytics_free(e,1)),j=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmdistributedindexmanager_free(e,1)),M=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmindexmanager_free(e,1)),N=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmshardmanager_free(e,1));function P(e,t){return U(e>>>0,t)}var F=null;function I(){return(F===null||F.byteLength===0)&&(F=new Uint8Array(K.memory.buffer)),F}function L(e){return e==null}function R(e,t,n){if(n===void 0){let n=W.encode(e),r=t(n.length,1)>>>0;return I().subarray(r,r+n.length).set(n),G=n.length,r}let r=e.length,i=t(r,1)>>>0,a=I(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=I().subarray(i+o,i+r),a=W.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return G=o,i}function z(e){let t=K.__wbindgen_externrefs.get(e);return K.__externref_table_dealloc(e),t}var B=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});B.decode();var V=2146435072,H=0;function U(e,t){return H+=t,H>=V&&(B=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),B.decode(),H=t),B.decode(I().subarray(e,e+t))}var W=new TextEncoder;`encodeInto`in W||(W.encodeInto=function(e,t){let n=W.encode(e);return t.set(n),{read:e.length,written:n.length}});var G=0,K;function q(e,t){return K=e.exports,F=null,K.__wbindgen_start(),K}async function J(e,t){if(typeof Response==`function`&&e instanceof Response){if(!e.ok)throw Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}function Y(e){if(K!==void 0)return K;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=D();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),q(new WebAssembly.Instance(e,t),e)}async function X(e){if(K!==void 0)return K;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0&&(e=new URL(`/assets/feltdb_wasm_bg-DsgIUwaB.wasm`,``+import.meta.url));let t=D();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await J(await e,t);return q(n,r)}export{e as JsDb,t as JsResult,n as WasmAnalytics,r as WasmDistributedIndexManager,i as WasmIndexManager,a as WasmShardManager,o as apply_sync_result,s as authorize_offline,c as canonical_bundle_hash,l as canonicalize_application_manifest,u as compare_state_schemas,X as default,d as diff_application_revisions,f as execute_semantic_decision,p as hash_application_manifest,m as hash_application_runtime,h as hash_state_schema,Y as initSync,g as open,_ as resolve_application_runtime,v as validate_mesh_claim,y as validate_semantic_decision_definition,b as validate_semantic_decision_result,x as validate_state_schema,S as validate_sync_operation,C as validate_worker_transition,w as validate_workload_transition,T as verify_bundle_integrity,E as verify_signed_grant};
1
+ var e=class e{static __wrap(t){let n=Object.create(e.prototype);return n.__wbg_ptr=t,O.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,O.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_jsdb_free(e,0)}acknowledge_peer_operations(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=K.jsdb_acknowledge_peer_operations(this.__wbg_ptr,r,i,n);return t.__wrap(a)}add_sync_peer(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_add_sync_peer(this.__wbg_ptr,n,r);return t.__wrap(i)}delete(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_delete(this.__wbg_ptr,n,r);return t.__wrap(i)}execute_canonical_query(e,n,r,i){let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=R(r,K.__wbindgen_malloc,K.__wbindgen_realloc),u=G,d=R(i,K.__wbindgen_malloc,K.__wbindgen_realloc),f=G,p=K.jsdb_execute_canonical_query(this.__wbg_ptr,a,o,s,c,l,u,d,f);return t.__wrap(p)}execute_canonical_transaction(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.jsdb_execute_canonical_transaction(this.__wbg_ptr,r,i,a,o);return t.__wrap(s)}execute_semantic_decision(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_execute_semantic_decision(this.__wbg_ptr,n,r);return t.__wrap(i)}get(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_get(this.__wbg_ptr,n,r);return t.__wrap(i)}get_capability_records(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_get_capability_records(this.__wbg_ptr,n,r);return t.__wrap(i)}get_pending_for_peer(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=K.jsdb_get_pending_for_peer(this.__wbg_ptr,r,i,n);return t.__wrap(a)}get_sequence(){let e=K.jsdb_get_sequence(this.__wbg_ptr);return BigInt.asUintN(64,e)}insert(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.jsdb_insert(this.__wbg_ptr,r,i,a,o);return t.__wrap(s)}instance_id(){let e,t;try{let n=K.jsdb_instance_id(this.__wbg_ptr);return e=n[0],t=n[1],P(n[0],n[1])}finally{K.__wbindgen_free(e,t,1)}}is_auto_indexed(){return K.jsdb_is_auto_indexed(this.__wbg_ptr)!==0}query(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_query(this.__wbg_ptr,n,r);return t.__wrap(i)}remove_sync_peer(e){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.jsdb_remove_sync_peer(this.__wbg_ptr,n,r);return t.__wrap(i)}sync_info(){let e=K.jsdb_sync_info(this.__wbg_ptr);return t.__wrap(e)}update(e,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.jsdb_update(this.__wbg_ptr,r,i,a,o);return t.__wrap(s)}};Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);var t=class e{static __wrap(t){let n=Object.create(e.prototype);return n.__wbg_ptr=t,k.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_jsresult_free(e,0)}get data(){let e=K.jsresult_data(this.__wbg_ptr),t;return e[0]!==0&&(t=P(e[0],e[1]),K.__wbindgen_free(e[0],e[1]*1,1)),t}get error(){let e=K.jsresult_error(this.__wbg_ptr),t;return e[0]!==0&&(t=P(e[0],e[1]),K.__wbindgen_free(e[0],e[1]*1,1)),t}get success(){return K.jsresult_success(this.__wbg_ptr)!==0}};Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);var n=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmanalytics_free(e,0)}generate_report(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.wasmanalytics_generate_report(this.__wbg_ptr,o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}get_all_metrics(){let e,t;try{let i=K.wasmanalytics_get_all_metrics(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_frequent_fields(e){let t,n;try{let a=K.wasmanalytics_get_frequent_fields(this.__wbg_ptr,e);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,z(a[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_index_metrics(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmanalytics_get_index_metrics(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_slowest_queries(e){let t,n;try{let a=K.wasmanalytics_get_slowest_queries(this.__wbg_ptr,e);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,z(a[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}constructor(){let e=K.wasmanalytics_new();return this.__wbg_ptr=e,A.register(this,this.__wbg_ptr,this),this}record_index_usage(e,t,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G;K.wasmanalytics_record_index_usage(this.__wbg_ptr,r,i,a,o,n)}record_query(e,t,n,r,i,a){let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G;var u=L(a)?0:R(a,K.__wbindgen_malloc,K.__wbindgen_realloc),d=G;let f=K.wasmanalytics_record_query(this.__wbg_ptr,o,s,c,l,n,r,i,u,d);if(f[1])throw z(f[0])}reset(){K.wasmanalytics_reset(this.__wbg_ptr)}};Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);var r=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmdistributedindexmanager_free(e,0)}create_replicated_index(e,t,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G,a=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=K.wasmdistributedindexmanager_create_replicated_index(this.__wbg_ptr,r,i,a,o,s,c);if(l[1])throw z(l[0])}detect_conflicts(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmdistributedindexmanager_detect_conflicts(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_replication_status(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmdistributedindexmanager_get_replication_status(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_replication_targets(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmdistributedindexmanager_get_replication_targets(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}get_sync_status(){let e,t;try{let i=K.wasmdistributedindexmanager_get_sync_status(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}merge_versions(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmdistributedindexmanager_merge_versions(this.__wbg_ptr,t,n);if(r[1])throw z(r[0])}constructor(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmdistributedindexmanager_new(t,n);return this.__wbg_ptr=r,j.register(this,this.__wbg_ptr,this),this}register_peer(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G;K.wasmdistributedindexmanager_register_peer(this.__wbg_ptr,t,n)}set_peer_reachable(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G;K.wasmdistributedindexmanager_set_peer_reachable(this.__wbg_ptr,n,r,t)}};Symbol.dispose&&(r.prototype[Symbol.dispose]=r.prototype.free);var i=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmindexmanager_free(e,0)}create_index(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmindexmanager_create_index(this.__wbg_ptr,t,n);if(r[1])throw z(r[0])}get_stats(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmindexmanager_get_stats(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}list_indexes(){let e,t;try{let i=K.wasmindexmanager_list_indexes(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}constructor(){let e=K.wasmindexmanager_new();return this.__wbg_ptr=e,M.register(this,this.__wbg_ptr,this),this}query_index(e,t,n){let r,i;try{let s=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),u=G,d=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),f=G,p=K.wasmindexmanager_query_index(this.__wbg_ptr,s,c,l,u,d,f);var a=p[0],o=p[1];if(p[3])throw a=0,o=0,z(p[2]);return r=a,i=o,P(a,o)}finally{K.__wbindgen_free(r,i,1)}}update_record(e,t,n){let r=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),i=G;var a=L(t)?0:R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G;let s=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G,l=K.wasmindexmanager_update_record(this.__wbg_ptr,r,i,a,o,s,c);if(l[1])throw z(l[0])}};Symbol.dispose&&(i.prototype[Symbol.dispose]=i.prototype.free);var a=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){let e=this.__destroy_into_raw();K.__wbg_wasmshardmanager_free(e,0)}detect_hotspots(){let e,t;try{let i=K.wasmshardmanager_detect_hotspots(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}generate_rebalance_ops(){let e,t;try{let i=K.wasmshardmanager_generate_rebalance_ops(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_all_metrics(){let e,t;try{let i=K.wasmshardmanager_get_all_metrics(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_distribution_summary(){let e,t;try{let i=K.wasmshardmanager_get_distribution_summary(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,z(i[2]);return e=n,t=r,P(n,r)}finally{K.__wbindgen_free(e,t,1)}}get_shard_for_key(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.wasmshardmanager_get_shard_for_key(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}initialize_shards(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.wasmshardmanager_initialize_shards(this.__wbg_ptr,t,n);if(r[1])throw z(r[0])}constructor(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=K.wasmshardmanager_new(n,r,i,a);return this.__wbg_ptr=o,N.register(this,this.__wbg_ptr,this),this}record_shard_operation(e,t,n,r,i){let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=G;K.wasmshardmanager_record_shard_operation(this.__wbg_ptr,a,o,s,c,n,r,i)}};Symbol.dispose&&(a.prototype[Symbol.dispose]=a.prototype.free);function o(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.apply_sync_result(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function s(e,t,n,r,i,a){let o,s;try{let u=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),d=G,f=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),p=G,m=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),h=G,g=R(r,K.__wbindgen_malloc,K.__wbindgen_realloc),_=G,v=R(i,K.__wbindgen_malloc,K.__wbindgen_realloc),y=G,b=R(a,K.__wbindgen_malloc,K.__wbindgen_realloc),x=G,S=K.authorize_offline(u,d,f,p,m,h,g,_,v,y,b,x);var c=S[0],l=S[1];if(S[3])throw c=0,l=0,z(S[2]);return o=c,s=l,P(c,l)}finally{K.__wbindgen_free(o,s,1)}}function c(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.canonical_bundle_hash(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function l(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.canonicalize_application_manifest(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function u(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.compare_state_schemas(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function d(e,t){let n,r;try{var i=L(e)?0:R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G;let c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.diff_application_revisions(i,a,c,l);var o=u[0],s=u[1];if(u[3])throw o=0,s=0,z(u[2]);return n=o,r=s,P(o,s)}finally{K.__wbindgen_free(n,r,1)}}function f(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.execute_semantic_decision(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function p(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.hash_application_manifest(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function m(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.hash_application_runtime(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function h(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.hash_state_schema(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function g(t){let n=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=K.open(n,r);if(i[2])throw z(i[1]);return e.__wrap(i[0])}function _(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.resolve_application_runtime(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function v(e,t,n,r){let i=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.validate_mesh_claim(i,a,o,s,c,l,r);if(u[1])throw z(u[0])}function y(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.validate_semantic_decision_definition(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function b(e,t){let n,r;try{let o=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=G,c=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=G,u=K.validate_semantic_decision_result(o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,z(u[2]);return n=i,r=a,P(i,a)}finally{K.__wbindgen_free(n,r,1)}}function x(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.validate_state_schema(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function S(e){let t,n;try{let a=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),o=G,s=K.validate_sync_operation(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,z(s[2]);return t=r,n=i,P(r,i)}finally{K.__wbindgen_free(t,n,1)}}function C(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=K.validate_worker_transition(n,r,i,a);if(o[2])throw z(o[1]);return o[0]!==0}function w(e,t){let n=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),r=G,i=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),a=G,o=K.validate_workload_transition(n,r,i,a);if(o[2])throw z(o[1]);return o[0]!==0}function T(e){let t=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=G,r=K.verify_bundle_integrity(t,n);if(r[2])throw z(r[1]);return r[0]!==0}function E(e,t,n,r,i,a){let o,s;try{let u=R(e,K.__wbindgen_malloc,K.__wbindgen_realloc),d=G,f=R(t,K.__wbindgen_malloc,K.__wbindgen_realloc),p=G,m=R(n,K.__wbindgen_malloc,K.__wbindgen_realloc),h=G,g=R(r,K.__wbindgen_malloc,K.__wbindgen_realloc),_=G,v=R(i,K.__wbindgen_malloc,K.__wbindgen_realloc),y=G,b=R(a,K.__wbindgen_malloc,K.__wbindgen_realloc),x=G,S=K.verify_signed_grant(u,d,f,p,m,h,g,_,v,y,b,x);var c=S[0],l=S[1];if(S[3])throw c=0,l=0,z(S[2]);return o=c,s=l,P(c,l)}finally{K.__wbindgen_free(o,s,1)}}function D(){return{__proto__:null,"./feltdb_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_bb96b2010945f0bc:function(e,t){throw Error(P(e,t))},__wbindgen_cast_0000000000000001:function(e,t){return P(e,t)},__wbindgen_init_externref_table:function(){let e=K.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}var O=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_jsdb_free(e,1)),k=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_jsresult_free(e,1)),A=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmanalytics_free(e,1)),j=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmdistributedindexmanager_free(e,1)),M=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmindexmanager_free(e,1)),N=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>K.__wbg_wasmshardmanager_free(e,1));function P(e,t){return U(e>>>0,t)}var F=null;function I(){return(F===null||F.byteLength===0)&&(F=new Uint8Array(K.memory.buffer)),F}function L(e){return e==null}function R(e,t,n){if(n===void 0){let n=W.encode(e),r=t(n.length,1)>>>0;return I().subarray(r,r+n.length).set(n),G=n.length,r}let r=e.length,i=t(r,1)>>>0,a=I(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=I().subarray(i+o,i+r),a=W.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return G=o,i}function z(e){let t=K.__wbindgen_externrefs.get(e);return K.__externref_table_dealloc(e),t}var B=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});B.decode();var V=2146435072,H=0;function U(e,t){return H+=t,H>=V&&(B=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),B.decode(),H=t),B.decode(I().subarray(e,e+t))}var W=new TextEncoder;`encodeInto`in W||(W.encodeInto=function(e,t){let n=W.encode(e);return t.set(n),{read:e.length,written:n.length}});var G=0,K;function q(e,t){return K=e.exports,F=null,K.__wbindgen_start(),K}async function J(e,t){if(typeof Response==`function`&&e instanceof Response){if(!e.ok)throw Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}function Y(e){if(K!==void 0)return K;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=D();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),q(new WebAssembly.Instance(e,t),e)}async function X(e){if(K!==void 0)return K;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0&&(e=new URL(`/assets/feltdb_wasm_bg-C3D6y6DK.wasm`,``+import.meta.url));let t=D();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await J(await e,t);return q(n,r)}export{e as JsDb,t as JsResult,n as WasmAnalytics,r as WasmDistributedIndexManager,i as WasmIndexManager,a as WasmShardManager,o as apply_sync_result,s as authorize_offline,c as canonical_bundle_hash,l as canonicalize_application_manifest,u as compare_state_schemas,X as default,d as diff_application_revisions,f as execute_semantic_decision,p as hash_application_manifest,m as hash_application_runtime,h as hash_state_schema,Y as initSync,g as open,_ as resolve_application_runtime,v as validate_mesh_claim,y as validate_semantic_decision_definition,b as validate_semantic_decision_result,x as validate_state_schema,S as validate_sync_operation,C as validate_worker_transition,w as validate_workload_transition,T as verify_bundle_integrity,E as verify_signed_grant};