@dxos/shell 0.8.3-main.672df60 → 0.8.3-main.7f5a14c

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.
@@ -12862,7 +12862,24 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
12862
12862
  });
12863
12863
  init_inject_globals();
12864
12864
  init_inject_globals();
12865
- __toESM(require_base32_decode());
12865
+ init_inject_globals();
12866
+ var ObjectIdSchema = String$.pipe(pattern(/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i)).annotations({
12867
+ description: "a Universally Unique Lexicographically Sortable Identifier",
12868
+ pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
12869
+ }), ObjectId = class extends ObjectIdSchema {
12870
+ static isValid(te) {
12871
+ try {
12872
+ return decodeSync(ObjectId)(te), !0;
12873
+ } catch {
12874
+ return !1;
12875
+ }
12876
+ }
12877
+ static random() {
12878
+ return ulid();
12879
+ }
12880
+ };
12881
+ init_inject_globals();
12882
+ var import_base32_decode = __toESM(require_base32_decode());
12866
12883
  init_inject_globals();
12867
12884
  init_inject_globals();
12868
12885
  function toDataView(te) {
@@ -12904,260 +12921,9 @@ init_inject_globals();
12904
12921
  var randomBytes = (te) => {
12905
12922
  const J = globalThis.crypto ?? __require("@dxos/node-std/crypto").webcrypto, ne = new Uint8Array(te);
12906
12923
  return J.getRandomValues(ne), ne;
12907
- };
12908
- init_inject_globals();
12909
- var import_base32_decode2 = __toESM(require_base32_decode()), __dxlog_file2$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts", PUBLIC_KEY_LENGTH = 32, isLikeArrayBuffer = (te) => typeof te == "object" && te !== null && Object.getPrototypeOf(te).constructor.name === "ArrayBuffer", tn, PublicKey = (tn = class {
12910
- /**
12911
- * Creates new instance of PublicKey automatically determining the input format.
12912
- * @param source A Buffer, or Uint8Array, or hex encoded string, or something with an `asUint8Array` method on it
12913
- * @returns PublicKey
12914
- */
12915
- static from(J) {
12916
- if (invariant$1(J, void 0, {
12917
- F: __dxlog_file2$1,
12918
- L: 49,
12919
- S: this,
12920
- A: [
12921
- "source",
12922
- ""
12923
- ]
12924
- }), J instanceof tn)
12925
- return J;
12926
- if (J instanceof export_Buffer)
12927
- return new tn(new Uint8Array(J.buffer, J.byteOffset, J.byteLength));
12928
- if (J instanceof Uint8Array)
12929
- return new tn(J);
12930
- if (J instanceof ArrayBuffer || isLikeArrayBuffer(J))
12931
- return new tn(new Uint8Array(J));
12932
- if (typeof J == "string")
12933
- return tn.fromHex(J);
12934
- if (J.asUint8Array)
12935
- return new tn(J.asUint8Array());
12936
- throw new TypeError(`Unable to create PublicKey from ${J}`);
12937
- }
12938
- /**
12939
- * Same as `PublicKey.from` but does not throw and instead returns a `{ key: PublicKey }` or `{ error: Error }`
12940
- * @param source Same PublicKeyLike argument as for `PublicKey.from`
12941
- * @returns PublicKey
12942
- */
12943
- static safeFrom(J) {
12944
- if (J)
12945
- try {
12946
- return tn.from(J);
12947
- } catch {
12948
- return;
12949
- }
12950
- }
12951
- /**
12952
- * Creates new instance of PublicKey from hex string.
12953
- */
12954
- static fromHex(J) {
12955
- J.startsWith("0x") && (J = J.slice(2));
12956
- const ne = export_Buffer.from(J, "hex");
12957
- return new tn(new Uint8Array(ne.buffer, ne.byteOffset, ne.byteLength));
12958
- }
12959
- /**
12960
- * Creates a new key.
12961
- */
12962
- static random() {
12963
- return tn.from(randomBytes(PUBLIC_KEY_LENGTH));
12964
- }
12965
- static randomOfLength(J) {
12966
- return tn.from(randomBytes(J));
12967
- }
12968
- static *randomSequence() {
12969
- for (let J = 0; J < 1e4; J++)
12970
- yield tn.random();
12971
- throw new Error("Too many keys requested");
12972
- }
12973
- /**
12974
- * Tests if provided values is an instance of PublicKey.
12975
- */
12976
- static isPublicKey(J) {
12977
- return J instanceof tn;
12978
- }
12979
- /**
12980
- * Asserts that provided values is an instance of PublicKey.
12981
- */
12982
- static assertValidPublicKey(J) {
12983
- if (!this.isPublicKey(J))
12984
- throw new TypeError("Invalid PublicKey");
12985
- }
12986
- /**
12987
- * Tests two keys for equality.
12988
- */
12989
- static equals(J, ne) {
12990
- return tn.from(J).equals(ne);
12991
- }
12992
- /**
12993
- * @param str string representation of key.
12994
- * @return Key buffer.
12995
- * @deprecated All keys should be represented as instances of PublicKey.
12996
- */
12997
- static bufferize(J) {
12998
- return invariant$1(typeof J == "string", "Invalid type", {
12999
- F: __dxlog_file2$1,
13000
- L: 152,
13001
- S: this,
13002
- A: [
13003
- "typeof str === 'string'",
13004
- "'Invalid type'"
13005
- ]
13006
- }), export_Buffer.from(J, "hex");
13007
- }
13008
- /**
13009
- * @param key key like data structure (but not PublicKey which should use toString).
13010
- * @return Hex string representation of key.
13011
- * @deprecated All keys should be represented as instances of PublicKey.
13012
- */
13013
- static stringify(J) {
13014
- return J instanceof tn ? J = J.asBuffer() : J instanceof Uint8Array && (J = export_Buffer.from(J.buffer, J.byteOffset, J.byteLength)), invariant$1(J instanceof export_Buffer, "Invalid type", {
13015
- F: __dxlog_file2$1,
13016
- L: 171,
13017
- S: this,
13018
- A: [
13019
- "key instanceof Buffer",
13020
- "'Invalid type'"
13021
- ]
13022
- }), J.toString("hex");
13023
- }
13024
- /**
13025
- * To be used with ComplexMap and ComplexSet.
13026
- * Returns a scalar representation for this key.
13027
- */
13028
- static hash(J) {
13029
- return J.toHex();
13030
- }
13031
- static fromMultibase32(J) {
13032
- return invariant$1(J.startsWith("B"), "Invalid multibase32 encoding", {
13033
- F: __dxlog_file2$1,
13034
- L: 184,
13035
- S: this,
13036
- A: [
13037
- "encoded.startsWith('B')",
13038
- "'Invalid multibase32 encoding'"
13039
- ]
13040
- }), new tn(new Uint8Array((0, import_base32_decode2.default)(J.slice(1), "RFC4648")));
13041
- }
13042
- constructor(J) {
13043
- if (this._value = J, !(J instanceof Uint8Array))
13044
- throw new TypeError(`Expected Uint8Array, got: ${J}`);
13045
- }
13046
- toString() {
13047
- return this.toHex();
13048
- }
13049
- toJSON() {
13050
- return this.toHex();
13051
- }
13052
- toJSONL() {
13053
- return this.truncate();
13054
- }
13055
- get length() {
13056
- return this._value.length;
13057
- }
13058
- toHex() {
13059
- return this.asBuffer().toString("hex");
13060
- }
13061
- toMultibase32() {
13062
- return "B" + base32Encode(this._value, "RFC4648");
13063
- }
13064
- truncate(J = void 0) {
13065
- return truncateKey(this, J);
13066
- }
13067
- asBuffer() {
13068
- return export_Buffer.from(this._value.buffer, this._value.byteOffset, this._value.byteLength);
13069
- }
13070
- asUint8Array() {
13071
- return this._value;
13072
- }
13073
- getInsecureHash(J) {
13074
- return Math.abs(this._value.reduce((ne, re) => ne ^ re | 0, 0)) % J;
13075
- }
13076
- /**
13077
- * Used by Node.js to get textual representation of this object when it's printed with a `console.log` statement.
13078
- */
13079
- [inspectCustom](J, ne, re) {
13080
- if (!ne.colors || typeof process$1.stdout.hasColors != "function" || !process$1.stdout.hasColors())
13081
- return `<PublicKey ${this.truncate()}>`;
13082
- const ae = (ce) => `\x1B[${ce}m`, oe = [
13083
- "red",
13084
- "green",
13085
- "yellow",
13086
- "blue",
13087
- "magenta",
13088
- "cyan",
13089
- "redBright",
13090
- "greenBright",
13091
- "yellowBright",
13092
- "blueBright",
13093
- "magentaBright",
13094
- "cyanBright",
13095
- "whiteBright"
13096
- ], le = oe[this.getInsecureHash(oe.length)];
13097
- return `PublicKey(${ae(re.colors[le][0])}${this.truncate()}${ae(re.colors.reset[0])})`;
13098
- }
13099
- get [devtoolsFormatter]() {
13100
- return {
13101
- header: () => {
13102
- const J = [
13103
- "darkred",
13104
- "green",
13105
- "orange",
13106
- "blue",
13107
- "darkmagenta",
13108
- "darkcyan",
13109
- "red",
13110
- "green",
13111
- "orange",
13112
- "blue",
13113
- "magenta",
13114
- "darkcyan",
13115
- "black"
13116
- ], ne = J[this.getInsecureHash(J.length)];
13117
- return [
13118
- "span",
13119
- {},
13120
- [
13121
- "span",
13122
- {},
13123
- "PublicKey("
13124
- ],
13125
- [
13126
- "span",
13127
- {
13128
- style: `color: ${ne};`
13129
- },
13130
- this.truncate()
13131
- ],
13132
- [
13133
- "span",
13134
- {},
13135
- ")"
13136
- ]
13137
- ];
13138
- }
13139
- };
13140
- }
13141
- /**
13142
- * Test this key for equality with some other key.
13143
- */
13144
- equals(J) {
13145
- const ne = tn.from(J);
13146
- if (this._value.length !== ne._value.length)
13147
- return !1;
13148
- let re = !0;
13149
- for (let ae = 0; ae < this._value.length; ae++)
13150
- re && (re = this._value[ae] === ne._value[ae]);
13151
- return re;
13152
- }
13153
- [equalsSymbol](J) {
13154
- return tn.isPublicKey(J) ? this.equals(J) : !1;
13155
- }
13156
- }, tn.ZERO = tn.from("00".repeat(PUBLIC_KEY_LENGTH)), tn);
13157
- init_inject_globals();
13158
- var import_base32_decode3 = __toESM(require_base32_decode()), __dxlog_file3$2 = "/home/runner/work/dxos/dxos/packages/common/keys/src/space-id.ts", MULTIBASE_PREFIX2 = "B", ENCODED_LENGTH2 = 33, isValid = (te) => typeof te == "string" && te.startsWith(MULTIBASE_PREFIX2) && te.length === ENCODED_LENGTH2, _n, SpaceId = (_n = class extends String$.pipe(filter(isValid)) {
12924
+ }, __dxlog_file$8 = "/home/runner/work/dxos/dxos/packages/common/keys/src/space-id.ts", MULTIBASE_PREFIX = "B", ENCODED_LENGTH = 33, isValid = (te) => typeof te == "string" && te.startsWith(MULTIBASE_PREFIX) && te.length === ENCODED_LENGTH, _n, SpaceId = (_n = class extends String$.pipe(filter(isValid)) {
13159
12925
  }, _n.byteLength = 20, _n.encode = (J) => (invariant$1(J instanceof Uint8Array, "Invalid type", {
13160
- F: __dxlog_file3$2,
12926
+ F: __dxlog_file$8,
13161
12927
  L: 43,
13162
12928
  S: _n,
13163
12929
  A: [
@@ -13165,54 +12931,37 @@ var import_base32_decode3 = __toESM(require_base32_decode()), __dxlog_file3$2 =
13165
12931
  "'Invalid type'"
13166
12932
  ]
13167
12933
  }), invariant$1(J.length === SpaceId.byteLength, "Invalid length", {
13168
- F: __dxlog_file3$2,
12934
+ F: __dxlog_file$8,
13169
12935
  L: 44,
13170
12936
  S: _n,
13171
12937
  A: [
13172
12938
  "value.length === SpaceId.byteLength",
13173
12939
  "'Invalid length'"
13174
12940
  ]
13175
- }), MULTIBASE_PREFIX2 + base32Encode(J, "RFC4648")), _n.decode = (J) => (invariant$1(J.startsWith(MULTIBASE_PREFIX2), "Invalid multibase32 encoding", {
13176
- F: __dxlog_file3$2,
12941
+ }), MULTIBASE_PREFIX + base32Encode(J, "RFC4648")), _n.decode = (J) => (invariant$1(J.startsWith(MULTIBASE_PREFIX), "Invalid multibase32 encoding", {
12942
+ F: __dxlog_file$8,
13177
12943
  L: 49,
13178
12944
  S: _n,
13179
12945
  A: [
13180
12946
  "value.startsWith(MULTIBASE_PREFIX)",
13181
12947
  "'Invalid multibase32 encoding'"
13182
12948
  ]
13183
- }), new Uint8Array((0, import_base32_decode3.default)(J.slice(1), "RFC4648"))), _n.isValid = isValid, _n.random = () => SpaceId.encode(randomBytes(SpaceId.byteLength)), _n);
13184
- init_inject_globals();
13185
- init_inject_globals();
13186
- var ObjectIdSchema = String$.pipe(pattern(/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i)).annotations({
13187
- description: "a Universally Unique Lexicographically Sortable Identifier",
13188
- pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
13189
- }), ObjectId = class extends ObjectIdSchema {
13190
- static isValid(te) {
13191
- try {
13192
- return decodeSync(ObjectId)(te), !0;
13193
- } catch {
13194
- return !1;
13195
- }
13196
- }
13197
- static random() {
13198
- return ulid();
13199
- }
13200
- }, __dxlog_file4$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/dxn.ts", LOCAL_SPACE_TAG = "@", An, yn, Zt;
12949
+ }), new Uint8Array((0, import_base32_decode.default)(J.slice(1), "RFC4648"))), _n.isValid = isValid, _n.random = () => SpaceId.encode(randomBytes(SpaceId.byteLength)), _n), __dxlog_file2$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/dxn.ts", LOCAL_SPACE_TAG = "@", An, yn, Zt;
13201
12950
  Zt = class {
13202
12951
  constructor(J, ne) {
13203
12952
  cn(this, An);
13204
12953
  cn(this, yn);
13205
12954
  switch (invariant$1(ne.length > 0, void 0, {
13206
- F: __dxlog_file4$1,
13207
- L: 157,
12955
+ F: __dxlog_file2$1,
12956
+ L: 161,
13208
12957
  S: this,
13209
12958
  A: [
13210
12959
  "parts.length > 0",
13211
12960
  ""
13212
12961
  ]
13213
12962
  }), invariant$1(ne.every((re) => typeof re == "string" && re.length > 0 && re.indexOf(":") === -1), void 0, {
13214
- F: __dxlog_file4$1,
13215
- L: 158,
12963
+ F: __dxlog_file2$1,
12964
+ L: 162,
13216
12965
  S: this,
13217
12966
  A: [
13218
12967
  "parts.every((part) => typeof part === 'string' && part.length > 0 && part.indexOf(':') === -1)",
@@ -13230,6 +12979,9 @@ Zt = class {
13230
12979
  }
13231
12980
  Jt(this, An, J), Jt(this, yn, ne);
13232
12981
  }
12982
+ static hash(J) {
12983
+ return J.toString();
12984
+ }
13233
12985
  get kind() {
13234
12986
  return At(this, An);
13235
12987
  }
@@ -13288,24 +13040,24 @@ Zt = class {
13288
13040
  }
13289
13041
  static fromQueue(J, ne, re, ae) {
13290
13042
  return invariant$1(SpaceId.isValid(ne), void 0, {
13291
- F: __dxlog_file4$1,
13292
- L: 146,
13043
+ F: __dxlog_file2$1,
13044
+ L: 150,
13293
13045
  S: this,
13294
13046
  A: [
13295
13047
  "SpaceId.isValid(spaceId)",
13296
13048
  ""
13297
13049
  ]
13298
13050
  }), invariant$1(ObjectId.isValid(re), void 0, {
13299
- F: __dxlog_file4$1,
13300
- L: 147,
13051
+ F: __dxlog_file2$1,
13052
+ L: 151,
13301
13053
  S: this,
13302
13054
  A: [
13303
13055
  "ObjectId.isValid(queueId)",
13304
13056
  ""
13305
13057
  ]
13306
13058
  }), invariant$1(!ae || ObjectId.isValid(ae), void 0, {
13307
- F: __dxlog_file4$1,
13308
- L: 148,
13059
+ F: __dxlog_file2$1,
13060
+ L: 152,
13309
13061
  S: this,
13310
13062
  A: [
13311
13063
  "!objectId || ObjectId.isValid(objectId)",
@@ -13326,8 +13078,8 @@ Zt = class {
13326
13078
  // TODO(burdon): Should getters fail?
13327
13079
  get typename() {
13328
13080
  return invariant$1(At(this, An) === Zt.kind.TYPE, void 0, {
13329
- F: __dxlog_file4$1,
13330
- L: 184,
13081
+ F: __dxlog_file2$1,
13082
+ L: 188,
13331
13083
  S: this,
13332
13084
  A: [
13333
13085
  "this.#kind === DXN.kind.TYPE",
@@ -13424,6 +13176,257 @@ Zt = class {
13424
13176
  */
13425
13177
  QUEUE: "queue"
13426
13178
  });
13179
+ init_inject_globals();
13180
+ __toESM(require_base32_decode());
13181
+ init_inject_globals();
13182
+ var import_base32_decode3 = __toESM(require_base32_decode()), __dxlog_file4$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts", PUBLIC_KEY_LENGTH = 32, isLikeArrayBuffer = (te) => typeof te == "object" && te !== null && Object.getPrototypeOf(te).constructor.name === "ArrayBuffer", tn, PublicKey = (tn = class {
13183
+ /**
13184
+ * Creates new instance of PublicKey automatically determining the input format.
13185
+ * @param source A Buffer, or Uint8Array, or hex encoded string, or something with an `asUint8Array` method on it
13186
+ * @returns PublicKey
13187
+ */
13188
+ static from(J) {
13189
+ if (invariant$1(J, void 0, {
13190
+ F: __dxlog_file4$1,
13191
+ L: 49,
13192
+ S: this,
13193
+ A: [
13194
+ "source",
13195
+ ""
13196
+ ]
13197
+ }), J instanceof tn)
13198
+ return J;
13199
+ if (J instanceof export_Buffer)
13200
+ return new tn(new Uint8Array(J.buffer, J.byteOffset, J.byteLength));
13201
+ if (J instanceof Uint8Array)
13202
+ return new tn(J);
13203
+ if (J instanceof ArrayBuffer || isLikeArrayBuffer(J))
13204
+ return new tn(new Uint8Array(J));
13205
+ if (typeof J == "string")
13206
+ return tn.fromHex(J);
13207
+ if (J.asUint8Array)
13208
+ return new tn(J.asUint8Array());
13209
+ throw new TypeError(`Unable to create PublicKey from ${J}`);
13210
+ }
13211
+ /**
13212
+ * Same as `PublicKey.from` but does not throw and instead returns a `{ key: PublicKey }` or `{ error: Error }`
13213
+ * @param source Same PublicKeyLike argument as for `PublicKey.from`
13214
+ * @returns PublicKey
13215
+ */
13216
+ static safeFrom(J) {
13217
+ if (J)
13218
+ try {
13219
+ return tn.from(J);
13220
+ } catch {
13221
+ return;
13222
+ }
13223
+ }
13224
+ /**
13225
+ * Creates new instance of PublicKey from hex string.
13226
+ */
13227
+ static fromHex(J) {
13228
+ J.startsWith("0x") && (J = J.slice(2));
13229
+ const ne = export_Buffer.from(J, "hex");
13230
+ return new tn(new Uint8Array(ne.buffer, ne.byteOffset, ne.byteLength));
13231
+ }
13232
+ /**
13233
+ * Creates a new key.
13234
+ */
13235
+ static random() {
13236
+ return tn.from(randomBytes(PUBLIC_KEY_LENGTH));
13237
+ }
13238
+ static randomOfLength(J) {
13239
+ return tn.from(randomBytes(J));
13240
+ }
13241
+ static *randomSequence() {
13242
+ for (let J = 0; J < 1e4; J++)
13243
+ yield tn.random();
13244
+ throw new Error("Too many keys requested");
13245
+ }
13246
+ /**
13247
+ * Tests if provided values is an instance of PublicKey.
13248
+ */
13249
+ static isPublicKey(J) {
13250
+ return J instanceof tn;
13251
+ }
13252
+ /**
13253
+ * Asserts that provided values is an instance of PublicKey.
13254
+ */
13255
+ static assertValidPublicKey(J) {
13256
+ if (!this.isPublicKey(J))
13257
+ throw new TypeError("Invalid PublicKey");
13258
+ }
13259
+ /**
13260
+ * Tests two keys for equality.
13261
+ */
13262
+ static equals(J, ne) {
13263
+ return tn.from(J).equals(ne);
13264
+ }
13265
+ /**
13266
+ * @param str string representation of key.
13267
+ * @return Key buffer.
13268
+ * @deprecated All keys should be represented as instances of PublicKey.
13269
+ */
13270
+ static bufferize(J) {
13271
+ return invariant$1(typeof J == "string", "Invalid type", {
13272
+ F: __dxlog_file4$1,
13273
+ L: 152,
13274
+ S: this,
13275
+ A: [
13276
+ "typeof str === 'string'",
13277
+ "'Invalid type'"
13278
+ ]
13279
+ }), export_Buffer.from(J, "hex");
13280
+ }
13281
+ /**
13282
+ * @param key key like data structure (but not PublicKey which should use toString).
13283
+ * @return Hex string representation of key.
13284
+ * @deprecated All keys should be represented as instances of PublicKey.
13285
+ */
13286
+ static stringify(J) {
13287
+ return J instanceof tn ? J = J.asBuffer() : J instanceof Uint8Array && (J = export_Buffer.from(J.buffer, J.byteOffset, J.byteLength)), invariant$1(J instanceof export_Buffer, "Invalid type", {
13288
+ F: __dxlog_file4$1,
13289
+ L: 171,
13290
+ S: this,
13291
+ A: [
13292
+ "key instanceof Buffer",
13293
+ "'Invalid type'"
13294
+ ]
13295
+ }), J.toString("hex");
13296
+ }
13297
+ /**
13298
+ * To be used with ComplexMap and ComplexSet.
13299
+ * Returns a scalar representation for this key.
13300
+ */
13301
+ static hash(J) {
13302
+ return J.toHex();
13303
+ }
13304
+ static fromMultibase32(J) {
13305
+ return invariant$1(J.startsWith("B"), "Invalid multibase32 encoding", {
13306
+ F: __dxlog_file4$1,
13307
+ L: 184,
13308
+ S: this,
13309
+ A: [
13310
+ "encoded.startsWith('B')",
13311
+ "'Invalid multibase32 encoding'"
13312
+ ]
13313
+ }), new tn(new Uint8Array((0, import_base32_decode3.default)(J.slice(1), "RFC4648")));
13314
+ }
13315
+ constructor(J) {
13316
+ if (this._value = J, !(J instanceof Uint8Array))
13317
+ throw new TypeError(`Expected Uint8Array, got: ${J}`);
13318
+ }
13319
+ toString() {
13320
+ return this.toHex();
13321
+ }
13322
+ toJSON() {
13323
+ return this.toHex();
13324
+ }
13325
+ toJSONL() {
13326
+ return this.truncate();
13327
+ }
13328
+ get length() {
13329
+ return this._value.length;
13330
+ }
13331
+ toHex() {
13332
+ return this.asBuffer().toString("hex");
13333
+ }
13334
+ toMultibase32() {
13335
+ return "B" + base32Encode(this._value, "RFC4648");
13336
+ }
13337
+ truncate(J = void 0) {
13338
+ return truncateKey(this, J);
13339
+ }
13340
+ asBuffer() {
13341
+ return export_Buffer.from(this._value.buffer, this._value.byteOffset, this._value.byteLength);
13342
+ }
13343
+ asUint8Array() {
13344
+ return this._value;
13345
+ }
13346
+ getInsecureHash(J) {
13347
+ return Math.abs(this._value.reduce((ne, re) => ne ^ re | 0, 0)) % J;
13348
+ }
13349
+ /**
13350
+ * Used by Node.js to get textual representation of this object when it's printed with a `console.log` statement.
13351
+ */
13352
+ [inspectCustom](J, ne, re) {
13353
+ if (!ne.colors || typeof process$1.stdout.hasColors != "function" || !process$1.stdout.hasColors())
13354
+ return `<PublicKey ${this.truncate()}>`;
13355
+ const ae = (ce) => `\x1B[${ce}m`, oe = [
13356
+ "red",
13357
+ "green",
13358
+ "yellow",
13359
+ "blue",
13360
+ "magenta",
13361
+ "cyan",
13362
+ "redBright",
13363
+ "greenBright",
13364
+ "yellowBright",
13365
+ "blueBright",
13366
+ "magentaBright",
13367
+ "cyanBright",
13368
+ "whiteBright"
13369
+ ], le = oe[this.getInsecureHash(oe.length)];
13370
+ return `PublicKey(${ae(re.colors[le][0])}${this.truncate()}${ae(re.colors.reset[0])})`;
13371
+ }
13372
+ get [devtoolsFormatter]() {
13373
+ return {
13374
+ header: () => {
13375
+ const J = [
13376
+ "darkred",
13377
+ "green",
13378
+ "orange",
13379
+ "blue",
13380
+ "darkmagenta",
13381
+ "darkcyan",
13382
+ "red",
13383
+ "green",
13384
+ "orange",
13385
+ "blue",
13386
+ "magenta",
13387
+ "darkcyan",
13388
+ "black"
13389
+ ], ne = J[this.getInsecureHash(J.length)];
13390
+ return [
13391
+ "span",
13392
+ {},
13393
+ [
13394
+ "span",
13395
+ {},
13396
+ "PublicKey("
13397
+ ],
13398
+ [
13399
+ "span",
13400
+ {
13401
+ style: `color: ${ne};`
13402
+ },
13403
+ this.truncate()
13404
+ ],
13405
+ [
13406
+ "span",
13407
+ {},
13408
+ ")"
13409
+ ]
13410
+ ];
13411
+ }
13412
+ };
13413
+ }
13414
+ /**
13415
+ * Test this key for equality with some other key.
13416
+ */
13417
+ equals(J) {
13418
+ const ne = tn.from(J);
13419
+ if (this._value.length !== ne._value.length)
13420
+ return !1;
13421
+ let re = !0;
13422
+ for (let ae = 0; ae < this._value.length; ae++)
13423
+ re && (re = this._value[ae] === ne._value[ae]);
13424
+ return re;
13425
+ }
13426
+ [equalsSymbol](J) {
13427
+ return tn.isPublicKey(J) ? this.equals(J) : !1;
13428
+ }
13429
+ }, tn.ZERO = tn.from("00".repeat(PUBLIC_KEY_LENGTH)), tn);
13427
13430
  for (let te = 0; te <= 255; ++te)
13428
13431
  te.toString(16).padStart(2, "0");
13429
13432
  var MAX_SERIALIZATION_LENGTH = 10;
@@ -19955,10 +19958,10 @@ class DxRefTagActivate extends Event {
19955
19958
  }
19956
19959
  let DxRefTag = class extends h$2 {
19957
19960
  constructor() {
19958
- super(), this.refid = makeId("dx-ref-tag"), this.rootclassname = void 0, this.addEventListener("click", this.handleActivate);
19961
+ super(...arguments), this.refid = makeId("dx-ref-tag"), this.rootclassname = void 0;
19959
19962
  }
19960
19963
  connectedCallback() {
19961
- super.connectedCallback(), this.tabIndex = 0, this.classList.add("dx-focus-ring"), this.rootclassname && this.classList.add(this.rootclassname), this.setAttribute("role", "button");
19964
+ super.connectedCallback(), this.tabIndex = 0, this.classList.add("dx-focus-ring"), this.rootclassname && this.classList.add(this.rootclassname), this.setAttribute("role", "button"), this.getAttribute("data-auto-trigger") === "true" ? this.handleActivate({ type: "auto-trigger" }) : this.addEventListener("click", this.handleActivate);
19962
19965
  }
19963
19966
  handleActivate(J) {
19964
19967
  var ne;
@@ -31369,7 +31372,7 @@ var reflectiveRelation = {
31369
31372
  //
31370
31373
  baseSurface: elevationCadence(0),
31371
31374
  groupSurface: elevationCadence(1),
31372
- modalSurface: elevationCadence(2),
31375
+ modalSurface: elevationCadence(2, 1.7),
31373
31376
  //
31374
31377
  // Contrast cadence tokens
31375
31378
  //
@@ -31648,10 +31651,16 @@ var reflectiveRelation = {
31648
31651
  ":root, .dark"
31649
31652
  ],
31650
31653
  group: [
31651
- groupAliases.map((te) => `.bg-${te}, .dark .bg-${te}`).join(", ")
31654
+ [
31655
+ ".sidebar-surface, .dark .sidebar-surface",
31656
+ ...groupAliases.map((te) => `.bg-${te}, .dark .bg-${te}`)
31657
+ ].join(", ")
31652
31658
  ],
31653
31659
  modal: [
31654
- modalAliases.map((te) => `.bg-${te}, .dark .bg-${te}`).join(", ")
31660
+ [
31661
+ ".modal-surface, .dark .modal-surface",
31662
+ ...modalAliases.map((te) => `.bg-${te}, .dark .bg-${te}`)
31663
+ ].join(", ")
31655
31664
  ]
31656
31665
  },
31657
31666
  aliases: {
@@ -31676,6 +31685,13 @@ var reflectiveRelation = {
31676
31685
  initial: 0,
31677
31686
  slope: 1
31678
31687
  }
31688
+ },
31689
+ lacuna: {
31690
+ root: {
31691
+ unit: "rem",
31692
+ initial: 0,
31693
+ slope: 0.125
31694
+ }
31679
31695
  }
31680
31696
  }
31681
31697
  },
@@ -31704,6 +31720,24 @@ var reflectiveRelation = {
31704
31720
  "line",
31705
31721
  2
31706
31722
  ]
31723
+ },
31724
+ trimXs: {
31725
+ root: [
31726
+ "lacuna",
31727
+ 3
31728
+ ]
31729
+ },
31730
+ trimSm: {
31731
+ root: [
31732
+ "lacuna",
31733
+ 6
31734
+ ]
31735
+ },
31736
+ trimMd: {
31737
+ root: [
31738
+ "lacuna",
31739
+ 9
31740
+ ]
31707
31741
  }
31708
31742
  }
31709
31743
  },
@@ -31732,6 +31766,17 @@ var reflectiveRelation = {
31732
31766
  root: [
31733
31767
  "focusLine"
31734
31768
  ]
31769
+ },
31770
+ trimSm: {
31771
+ root: [
31772
+ "card-spacing-inline",
31773
+ "card-spacing-block"
31774
+ ]
31775
+ },
31776
+ trimXs: {
31777
+ root: [
31778
+ "card-spacing-chrome"
31779
+ ]
31735
31780
  }
31736
31781
  }
31737
31782
  }
@@ -31956,6 +32001,11 @@ var reflectiveRelation = {
31956
32001
  facet: "lengths",
31957
32002
  disposition: "extend",
31958
32003
  tokenization: "omit-series"
32004
+ },
32005
+ spacing: {
32006
+ facet: "lengths",
32007
+ disposition: "extend",
32008
+ tokenization: "keep-series"
31959
32009
  }
31960
32010
  };
31961
32011
  physicalColors.definitions.series.neutral, physicalColors.definitions.series.primary, physicalColors.definitions.accompanyingSeries, physicalColors.conditions, physicalColors.series.neutral, physicalColors.series.primary, physicalColors.namespace, semanticColors.conditions, semanticColors.namespace, aliasColors.conditions, aliasColors.namespace;
@@ -32408,62 +32458,62 @@ var tokensTailwindConfig = src_default(tokenSet, adapterConfig), { extend: exten
32408
32458
  ],
32409
32459
  "logical.mlb": [
32410
32460
  {
32411
- mlb: getLength()
32461
+ mlb: getAny()
32412
32462
  }
32413
32463
  ],
32414
32464
  "logical.mli": [
32415
32465
  {
32416
- mli: getLength()
32466
+ mli: getAny()
32417
32467
  }
32418
32468
  ],
32419
32469
  "logical.mbs": [
32420
32470
  {
32421
- mbs: getLength()
32471
+ mbs: getAny()
32422
32472
  }
32423
32473
  ],
32424
32474
  "logical.mbe": [
32425
32475
  {
32426
- mbe: getLength()
32476
+ mbe: getAny()
32427
32477
  }
32428
32478
  ],
32429
32479
  "logical.mis": [
32430
32480
  {
32431
- mis: getLength()
32481
+ mis: getAny()
32432
32482
  }
32433
32483
  ],
32434
32484
  "logical.mie": [
32435
32485
  {
32436
- mie: getLength()
32486
+ mie: getAny()
32437
32487
  }
32438
32488
  ],
32439
32489
  "logical.plb": [
32440
32490
  {
32441
- plb: getLength()
32491
+ plb: getAny()
32442
32492
  }
32443
32493
  ],
32444
32494
  "logical.pli": [
32445
32495
  {
32446
- pli: getLength()
32496
+ pli: getAny()
32447
32497
  }
32448
32498
  ],
32449
32499
  "logical.pbs": [
32450
32500
  {
32451
- pbs: getLength()
32501
+ pbs: getAny()
32452
32502
  }
32453
32503
  ],
32454
32504
  "logical.pbe": [
32455
32505
  {
32456
- pbe: getLength()
32506
+ pbe: getAny()
32457
32507
  }
32458
32508
  ],
32459
32509
  "logical.pis": [
32460
32510
  {
32461
- pis: getLength()
32511
+ pis: getAny()
32462
32512
  }
32463
32513
  ],
32464
32514
  "logical.pie": [
32465
32515
  {
32466
- pie: getLength()
32516
+ pie: getAny()
32467
32517
  }
32468
32518
  ],
32469
32519
  "logical.space-b": [
@@ -33070,7 +33120,7 @@ mx(ghostHover, "hover:text-inherit data-[state=open]:bg-inputSurface aria-presse
33070
33120
  var buttonRoot = (te, ...J) => mx("dx-button dx-focus-ring group", ...J), buttonGroup = (te, ...J) => mx("inline-flex rounded-sm [&>:first-child]:rounded-is-sm [&>:last-child]:rounded-ie-sm [&>button]:relative", ...J), buttonTheme = {
33071
33121
  root: buttonRoot,
33072
33122
  group: buttonGroup
33073
- }, dialogOverlay = (te, ...J) => mx("dx-dialog__overlay", ...J), dialogContent = ({ inOverlayLayout: te }, ...J) => mx("dx-dialog__content @container dx-focus-ring", !te && "fixed z-50 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]", ...J), dialogTitle = ({ srOnly: te }, ...J) => mx("dx-dialog__title", te && "sr-only", ...J), dialogDescription = ({ srOnly: te }, ...J) => mx("dx-dialog__description", descriptionText, te && "sr-only", ...J), dialogTheme = {
33123
+ }, dialogOverlay = (te, ...J) => mx("dx-dialog__overlay", ...J), dialogContent = ({ inOverlayLayout: te }, ...J) => mx("dx-dialog__content modal-surface @container dx-focus-ring", !te && "fixed z-50 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]", ...J), dialogTitle = ({ srOnly: te }, ...J) => mx("dx-dialog__title", te && "sr-only", ...J), dialogDescription = ({ srOnly: te }, ...J) => mx("dx-dialog__description", descriptionText, te && "sr-only", ...J), dialogTheme = {
33074
33124
  overlay: dialogOverlay,
33075
33125
  content: dialogContent,
33076
33126
  title: dialogTitle,
@@ -33165,7 +33215,7 @@ var buttonRoot = (te, ...J) => mx("dx-button dx-focus-ring group", ...J), button
33165
33215
  root: messageRoot,
33166
33216
  title: messageTitle,
33167
33217
  body: messageBody
33168
- }, popoverViewport = ({ constrainBlock: te, constrainInline: J }, ...ne) => mx("rounded-md", te && "max-bs-[--radix-popover-content-available-height] overflow-y-auto", J && "max-is-[--radix-popover-content-available-width] overflow-x-auto", ...ne), popoverContent = ({ elevation: te }, ...J) => mx("border border-separator rounded-md overflow-hidden", modalSurface, surfaceShadow({
33218
+ }, popoverViewport = ({ constrainBlock: te, constrainInline: J }, ...ne) => mx("rounded-md", te && "max-bs-[--radix-popover-content-available-height] overflow-y-auto", J && "max-is-[--radix-popover-content-available-width] overflow-x-auto", ...ne), popoverContent = ({ elevation: te }, ...J) => mx("border border-separator rounded-md", modalSurface, surfaceShadow({
33169
33219
  elevation: "positioned"
33170
33220
  }), surfaceZIndex({
33171
33221
  elevation: te,
@@ -33185,7 +33235,7 @@ var buttonRoot = (te, ...J) => mx("dx-button dx-focus-ring group", ...J), button
33185
33235
  }), surfaceZIndex({
33186
33236
  elevation: te,
33187
33237
  level: "menu"
33188
- }), ...J), selectViewport = (te, ...J) => mx(...J), selectItem = (te, ...J) => mx("flex items-center min-bs-[2rem] pli-3 plb-1 gap-2", "text-baseText leading-none rounded-sm select-none outline-none", "[&>svg]:invisible [&[data-state=checked]>svg]:visible", ghostHighlighted, ...J), selectItemIndicator = (te, ...J) => mx("items-center", ...J), selectArrow = (te, ...J) => mx("fill-separator", ...J), selectSeparator = (te, ...J) => mx(blockSeparator, separatorBorderColor, ...J), selectScrollButton = (te, ...J) => mx(modalSurface, "flex items-center justify-center cursor-default bs-6 is-full", ...J), selectTriggerIcon = (te, ...J) => mx(getSize(2), ...J), selectTheme = {
33238
+ }), ...J), selectViewport = (te, ...J) => mx(...J), selectItem = (te, ...J) => mx("flex items-center min-bs-[2rem] pli-3 plb-1 gap-2", "text-baseText leading-none select-none outline-none", "[&>svg]:invisible [&[data-state=checked]>svg]:visible", ghostHighlighted, ...J), selectItemIndicator = (te, ...J) => mx("items-center", ...J), selectArrow = (te, ...J) => mx("fill-separator", ...J), selectSeparator = (te, ...J) => mx(blockSeparator, separatorBorderColor, ...J), selectScrollButton = (te, ...J) => mx(modalSurface, "flex items-center justify-center cursor-default bs-6 is-full", ...J), selectTriggerIcon = (te, ...J) => mx(getSize(2), ...J), selectTheme = {
33189
33239
  content: selectContent,
33190
33240
  viewport: selectViewport,
33191
33241
  item: selectItem,
@@ -33217,7 +33267,7 @@ var buttonRoot = (te, ...J) => mx("dx-button dx-focus-ring group", ...J), button
33217
33267
  actions: toastActions
33218
33268
  }, toolbarRoot = (te, ...J) => mx("flex shrink-0 items-center gap-1 p-1 is-full overflow-x-auto overflow-y-hidden contain-layout bg-toolbarSurface", ...J), toolbarTheme = {
33219
33269
  root: toolbarRoot
33220
- }, tooltipContent = ({ elevation: te }, ...J) => mx("inline-flex items-center rounded-md plb-1 pli-2 max-is-64 bg-inverseSurface text-inverseSurfaceText", popperMotion, surfaceShadow({
33270
+ }, tooltipContent = ({ elevation: te }, ...J) => mx("inline-flex items-center rounded-sm plb-1 pli-2 max-is-64 bg-inverseSurface text-inverseSurfaceText", popperMotion, surfaceShadow({
33221
33271
  elevation: "positioned"
33222
33272
  }), surfaceZIndex({
33223
33273
  elevation: te,
@@ -46660,7 +46710,7 @@ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/common/async/src/persi
46660
46710
  err: te
46661
46711
  }, {
46662
46712
  F: __dxlog_file4,
46663
- L: 77,
46713
+ L: 78,
46664
46714
  S: this,
46665
46715
  C: (ne, re) => ne(...re)
46666
46716
  }), (J = this._restartTask) == null || J.schedule();
@@ -46676,7 +46726,7 @@ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/common/async/src/persi
46676
46726
  state: this._lifecycleState
46677
46727
  }, {
46678
46728
  F: __dxlog_file4,
46679
- L: 90,
46729
+ L: 91,
46680
46730
  S: this,
46681
46731
  C: (J, ne) => J(...ne)
46682
46732
  }), await this._stopCurrentState(), this._lifecycleState === LifecycleState.OPEN && (await cancelWithContext(this._ctx, sleep(this._restartAfter)), this._restartAfter = Math.min(Math.max(this._restartAfter * 2, INIT_RESTART_DELAY), this._maxRestartDelay), await warnAfterTimeout(5e3, "Connection establishment takes too long", async () => {
@@ -46690,7 +46740,7 @@ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/common/async/src/persi
46690
46740
  } catch (te) {
46691
46741
  log$2.catch(te, void 0, {
46692
46742
  F: __dxlog_file4,
46693
- L: 112,
46743
+ L: 113,
46694
46744
  S: this,
46695
46745
  C: (J, ne) => J(...ne)
46696
46746
  });