@ghostlytools/cli 1.10.2 → 1.10.3

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.
Files changed (84) hide show
  1. package/README.md +4 -2
  2. package/dist/assets/{api-DcE4KylM.js → api-BdaxsDvA.js} +2 -2
  3. package/dist/assets/{api-EUGHGnRz.js → api-C4MLg5Rs.js} +42 -17
  4. package/dist/assets/api-C4MLg5Rs.js.map +1 -0
  5. package/dist/assets/{apiKit-CJVp_crp.js → apiKit-BbNaxZGZ.js} +27 -11
  6. package/dist/assets/apiKit-BbNaxZGZ.js.map +1 -0
  7. package/dist/assets/{apps-C54T_MOT.js → apps-BluQgEhv.js} +3 -3
  8. package/dist/assets/{apps-C54T_MOT.js.map → apps-BluQgEhv.js.map} +1 -1
  9. package/dist/assets/{apps-C-KbyLCa.js → apps-BtGFth7o.js} +1 -1
  10. package/dist/assets/{arkade-BmxJTa65.js → arkade-DdZx4b_I.js} +2 -2
  11. package/dist/assets/{arkade-BmxJTa65.js.map → arkade-DdZx4b_I.js.map} +1 -1
  12. package/dist/assets/{backup-BxSH5BZG.js → backup-DyDsW7sC.js} +6 -6
  13. package/dist/assets/{backup-BxSH5BZG.js.map → backup-DyDsW7sC.js.map} +1 -1
  14. package/dist/assets/{backup-C0Plp-DF.js → backup-I1n7ccz7.js} +1 -1
  15. package/dist/assets/{buttons-B-ZJYdo0.js → buttons-Do7dCku6.js} +4 -4
  16. package/dist/assets/{buttons-B-ZJYdo0.js.map → buttons-Do7dCku6.js.map} +1 -1
  17. package/dist/assets/buttons-DpjwXePb.js +2 -0
  18. package/dist/assets/{client-CDa87uYD.js → client-CWsjRiH8.js} +2 -2
  19. package/dist/assets/{client-CDa87uYD.js.map → client-CWsjRiH8.js.map} +1 -1
  20. package/dist/assets/{codec-D45W1L8n.js → codec-DPaXhuYc.js} +2 -2
  21. package/dist/assets/{codec-D45W1L8n.js.map → codec-DPaXhuYc.js.map} +1 -1
  22. package/dist/assets/{envelope-C3yFCQa-.js → envelope-5Gu9yGk_.js} +2 -2
  23. package/dist/assets/{envelope-C3yFCQa-.js.map → envelope-5Gu9yGk_.js.map} +1 -1
  24. package/dist/assets/{fixedHosts-C6nCHjOa.js → fixedHosts-PR1BcfKX.js} +7 -8
  25. package/dist/assets/fixedHosts-PR1BcfKX.js.map +1 -0
  26. package/dist/assets/{groupFiles-DYopNE57.js → groupFiles-BuToTMUk.js} +213 -90
  27. package/dist/assets/groupFiles-BuToTMUk.js.map +1 -0
  28. package/dist/assets/{host-G5seUwaI.js → host-fkQYBvKH.js} +226 -29
  29. package/dist/assets/host-fkQYBvKH.js.map +1 -0
  30. package/dist/assets/{hyperdhtRelay-B_uHjg_r.js → hyperdhtRelay-DDCak5PY.js} +2 -2
  31. package/dist/assets/{hyperdhtRelay-B_uHjg_r.js.map → hyperdhtRelay-DDCak5PY.js.map} +1 -1
  32. package/dist/assets/{irohWeb-C-2oslSU.js → irohWeb-B4_swKx0.js} +2 -2
  33. package/dist/assets/{irohWeb-C-2oslSU.js.map → irohWeb-B4_swKx0.js.map} +1 -1
  34. package/dist/assets/{main-Dk--nD7X.js → main-ClYsttvY.js} +49 -30
  35. package/dist/assets/main-ClYsttvY.js.map +1 -0
  36. package/dist/assets/{mainline-HPlVrl8R.js → mainline-Hsk2SZ1B.js} +63 -3
  37. package/dist/assets/mainline-Hsk2SZ1B.js.map +1 -0
  38. package/dist/assets/{networkReason-CfpO9ayz.js → networkReason-C9Hr-hO7.js} +4 -4
  39. package/dist/assets/{networkReason-CfpO9ayz.js.map → networkReason-C9Hr-hO7.js.map} +1 -1
  40. package/dist/assets/{nwc-BY7BPttn.js → nwc-BbK6qNxS.js} +3 -3
  41. package/dist/assets/{nwc-BY7BPttn.js.map → nwc-BbK6qNxS.js.map} +1 -1
  42. package/dist/assets/{nwcProvider-CfpbNUf7.js → nwcProvider-D_tt2X3Z.js} +2 -2
  43. package/dist/assets/{nwcProvider-CfpbNUf7.js.map → nwcProvider-D_tt2X3Z.js.map} +1 -1
  44. package/dist/assets/{ownDid-DJFZM2cV.js → ownDid-DkK_jem4.js} +2 -2
  45. package/dist/assets/{ownDid-DJFZM2cV.js.map → ownDid-DkK_jem4.js.map} +1 -1
  46. package/dist/assets/{profiles-DKmZGXp6.js → profiles-aV9vaK0B.js} +7 -5
  47. package/dist/assets/profiles-aV9vaK0B.js.map +1 -0
  48. package/dist/assets/{registry-CAzrtV0_.js → registry-C9T6tYCO.js} +1 -1
  49. package/dist/assets/{registry-BUm4cAzV.js → registry-CEjnubep.js} +8 -7
  50. package/dist/assets/registry-CEjnubep.js.map +1 -0
  51. package/dist/assets/{resolve-CDD4X68j.js → resolve-BBOrN13E.js} +24 -5
  52. package/dist/assets/resolve-BBOrN13E.js.map +1 -0
  53. package/dist/assets/{server-DcOsgYDU.js → server-BJ3T-kx3.js} +247 -107
  54. package/dist/assets/server-BJ3T-kx3.js.map +1 -0
  55. package/dist/assets/{src-D31D1_oY.js → src-BIdfHB7t.js} +254 -71
  56. package/dist/assets/src-BIdfHB7t.js.map +1 -0
  57. package/dist/assets/{sshForges-DerRwMf3.js → sshForges-CRg-NGld.js} +2 -2
  58. package/dist/assets/{sshForges-DerRwMf3.js.map → sshForges-CRg-NGld.js.map} +1 -1
  59. package/dist/assets/{translate-C-sj0VJe.js → translate-b0X61WMI.js} +2 -2
  60. package/dist/assets/{translate-C-sj0VJe.js.map → translate-b0X61WMI.js.map} +1 -1
  61. package/dist/assets/{usdt-DwHqp625.js → usdt-6CQdfye1.js} +7 -4
  62. package/dist/assets/usdt-6CQdfye1.js.map +1 -0
  63. package/dist/assets/{waitNotice-D52RWbV4.js → waitNotice-Ce3YCinu.js} +27 -5
  64. package/dist/assets/waitNotice-Ce3YCinu.js.map +1 -0
  65. package/dist/assets/{words-Db9WgatT.js → words-Dk6o6wz4.js} +3 -3
  66. package/dist/assets/words-Dk6o6wz4.js.map +1 -0
  67. package/dist/ghostly.mjs +1 -1
  68. package/package.json +1 -1
  69. package/dist/assets/api-EUGHGnRz.js.map +0 -1
  70. package/dist/assets/apiKit-CJVp_crp.js.map +0 -1
  71. package/dist/assets/buttons-DA3wZfG0.js +0 -2
  72. package/dist/assets/fixedHosts-C6nCHjOa.js.map +0 -1
  73. package/dist/assets/groupFiles-DYopNE57.js.map +0 -1
  74. package/dist/assets/host-G5seUwaI.js.map +0 -1
  75. package/dist/assets/main-Dk--nD7X.js.map +0 -1
  76. package/dist/assets/mainline-HPlVrl8R.js.map +0 -1
  77. package/dist/assets/profiles-DKmZGXp6.js.map +0 -1
  78. package/dist/assets/registry-BUm4cAzV.js.map +0 -1
  79. package/dist/assets/resolve-CDD4X68j.js.map +0 -1
  80. package/dist/assets/server-DcOsgYDU.js.map +0 -1
  81. package/dist/assets/src-D31D1_oY.js.map +0 -1
  82. package/dist/assets/usdt-DwHqp625.js.map +0 -1
  83. package/dist/assets/waitNotice-D52RWbV4.js.map +0 -1
  84. package/dist/assets/words-Db9WgatT.js.map +0 -1
@@ -960,6 +960,13 @@ var firstWriter = (who) => !who.write || who.background ? null : who.group ? "gr
960
960
  /** A key's turn neither asked nor read in the last minute: it is dropped, and asking again starts a new one (`TURNS_PRUNE_MS`). */
961
961
  var staleTurn = (turn, now) => now - Math.max(turn.askedAt, turn.servedAt) >= 6e4;
962
962
  /**
963
+ * The times of `list` (oldest first) within the last `ms`. One dated after now, the device clock gone back since (an NTP
964
+ * step, a clock that ran ahead fixed by hand), counts as of now: as just spent, not for as long as the clock went back.
965
+ * Counted as they were, an hour's step back held every background read for 59 minutes, and a daemon with 50 contacts
966
+ * away read 4 of them in the next 15 (bug hunt, 2026-11-07).
967
+ */
968
+ var within = (list, now, ms) => list.map((at) => Math.min(at, now)).filter((at) => now - at < ms);
969
+ /**
963
970
  * Keys and when each was last set, those of the last minute: how many and the latest, without walking them all (the
964
971
  * chats that need a relay, `chatNeeds`). Each is set at the time it is set, so the sets come oldest first; a clock
965
972
  * gone back makes the later ones as of now.
@@ -1783,8 +1790,8 @@ var RelayTransport = class {
1783
1790
  async resolve(pubKeyZ32, options = {}, keptOnFailure = true) {
1784
1791
  if (this.relays.length === 0) throw new Error("No Pkarr relays configured");
1785
1792
  if (options.background && !options.urgent && !options.group) this.chatNeedLapsed(pubKeyZ32);
1786
- const readAt = this.readAt.get(pubKeyZ32);
1787
- if (readAt !== void 0 && Date.now() - readAt < this.freshReadMs) return this.newest.get(pubKeyZ32) ?? null;
1793
+ const readAt = this.readAt.get(pubKeyZ32), age = readAt === void 0 ? Infinity : Date.now() - readAt;
1794
+ if (age >= 0 && age < this.freshReadMs) return this.newest.get(pubKeyZ32) ?? null;
1788
1795
  const order = this.readOrder(pubKeyZ32);
1789
1796
  const probe = this.breaker.allDownProbe(this.relays);
1790
1797
  let budgetWait = Infinity, down = false;
@@ -1992,7 +1999,7 @@ var RelayTransport = class {
1992
1999
  */
1993
2000
  hedgeRoom(relay) {
1994
2001
  const now = Date.now();
1995
- return (this.spent.get(relay) ?? []).filter((at) => now - at < 6e4).length < this.limitOf(relay) - this.reserveOf(relay);
2002
+ return within(this.spent.get(relay) ?? [], now, 6e4).length < this.limitOf(relay) - this.reserveOf(relay);
1996
2003
  }
1997
2004
  readAnsweredAt(pubKeyZ32) {
1998
2005
  return this.readAt.get(pubKeyZ32);
@@ -2218,23 +2225,23 @@ var RelayTransport = class {
2218
2225
  * without its own allowance (`ANSWER_READ_ALLOWANCE`).
2219
2226
  */
2220
2227
  heldFor(relay, who, now = Date.now(), key, turns = true, ownAllowance = true) {
2221
- const recent = (this.spent.get(relay) ?? []).filter((at) => now - at < 6e4);
2222
- const recentBackground = (this.spentBackground.get(relay) ?? []).filter((at) => now - at < 6e4);
2228
+ const recent = within(this.spent.get(relay) ?? [], now, 6e4);
2229
+ const recentBackground = within(this.spentBackground.get(relay) ?? [], now, 6e4);
2223
2230
  this.spent.set(relay, recent);
2224
2231
  this.spentBackground.set(relay, recentBackground);
2225
- const recentBackgroundWrites = (this.spentBackgroundWrites.get(relay) ?? []).filter((at) => now - at < 6e4);
2232
+ const recentBackgroundWrites = within(this.spentBackgroundWrites.get(relay) ?? [], now, 6e4);
2226
2233
  this.spentBackgroundWrites.set(relay, recentBackgroundWrites);
2227
2234
  const over = (list, limit) => list.length >= limit ? list[list.length - limit] + 6e4 - now : 0;
2228
2235
  const limit = this.limitOf(relay);
2229
2236
  const departed = isDepartedRead(who) && key !== void 0 && recent.length >= limit && this.departedReads(key, now) < 6;
2230
2237
  const share = isChatSignal(who) || departed ? SIGNALING_ALLOWANCE_SHARE : isGroupSignal(who) ? GROUP_SIGNALING_ALLOWANCE_SHARE : 0;
2231
2238
  const allowance = share ? Math.max(0, Math.floor(limit * share) - (who.write ? 0 : 1)) : 0;
2232
- const groupSignaled = (this.spentGroupSignal.get(relay) ?? []).filter((at) => now - at < 6e4);
2239
+ const groupSignaled = within(this.spentGroupSignal.get(relay) ?? [], now, 6e4);
2233
2240
  this.spentGroupSignal.set(relay, groupSignaled);
2234
2241
  const groupFloor = isGroupSignal(who) && groupSignaled.length < allowance;
2235
2242
  let wait = groupFloor ? 0 : over(recent, limit + allowance);
2236
2243
  const starved = key !== void 0 && this.starved(key, who, now);
2237
- const groupOver = (this.spentGroupOver.get(relay) ?? []).filter((at) => now - at < GROUP_OVER_PACE_MS);
2244
+ const groupOver = within(this.spentGroupOver.get(relay) ?? [], now, GROUP_OVER_PACE_MS);
2238
2245
  this.spentGroupOver.set(relay, groupOver);
2239
2246
  if (isGroupSignal(who) && !who.write && recent.length >= limit && groupOver.length > 0) wait = Math.max(wait, groupOver[groupOver.length - 1] + GROUP_OVER_PACE_MS - now);
2240
2247
  if (who.background && !starved) {
@@ -2244,16 +2251,16 @@ var RelayTransport = class {
2244
2251
  const signaling = this.urgentAt + SIGNALING_WINDOW_MS - now;
2245
2252
  if (signaling > 0 && !who.door) wait = Math.max(wait, Math.min(signaling, over(recentBackground, Math.min(this.backgroundWhileSignaling, Math.ceil(limit / 6)))));
2246
2253
  }
2247
- const burst = (this.spentGroupUrgent.get(relay) ?? []).filter((at) => now - at < GROUP_BURST_MS);
2254
+ const burst = within(this.spentGroupUrgent.get(relay) ?? [], now, GROUP_BURST_MS);
2248
2255
  this.spentGroupUrgent.set(relay, burst);
2249
- const answerBurst = (this.spentAnswerUrgent.get(relay) ?? []).filter((at) => now - at < GROUP_BURST_MS);
2256
+ const answerBurst = within(this.spentAnswerUrgent.get(relay) ?? [], now, GROUP_BURST_MS);
2250
2257
  this.spentAnswerUrgent.set(relay, answerBurst);
2251
2258
  if (isGroupUrgentRead(who)) {
2252
2259
  const most = Math.max(8, Math.floor(limit * GROUP_BURST_MS / 6e4));
2253
2260
  const spent = isGroupAnswerRead(who) ? answerBurst : burst;
2254
2261
  if (spent.length >= most) wait = Math.max(wait, spent[spent.length - most] + GROUP_BURST_MS - now);
2255
2262
  }
2256
- const watched = (this.spentWatch.get(relay) ?? []).filter((at) => now - at < GROUP_RATION_WINDOW_MS);
2263
+ const watched = within(this.spentWatch.get(relay) ?? [], now, GROUP_RATION_WINDOW_MS);
2257
2264
  this.spentWatch.set(relay, watched);
2258
2265
  let turn = 0;
2259
2266
  if (isWatch(who)) {
@@ -2261,14 +2268,14 @@ var RelayTransport = class {
2261
2268
  if (watched.length >= most) wait = Math.max(wait, watched[watched.length - most] + GROUP_RATION_WINDOW_MS - now);
2262
2269
  if (this.readsAhead(key, now, watchLane(who)) > 0) turn = TURN_WAIT_MS;
2263
2270
  }
2264
- const chatWatched = (this.spentChatWatch.get(relay) ?? []).filter((at) => now - at < GROUP_RATION_WINDOW_MS);
2271
+ const chatWatched = within(this.spentChatWatch.get(relay) ?? [], now, GROUP_RATION_WINDOW_MS);
2265
2272
  this.spentChatWatch.set(relay, chatWatched);
2266
2273
  if (isChatWatch(who) && !departed) {
2267
2274
  const most = Math.max(1, Math.ceil(limit * CHAT_WATCH_SHARE * GROUP_RATION_WINDOW_MS / 6e4));
2268
2275
  if (chatWatched.length >= most) wait = Math.max(wait, chatWatched[chatWatched.length - most] + GROUP_RATION_WINDOW_MS - now);
2269
2276
  if (this.readsAhead(key, now, watchLane(who)) > 0) turn = TURN_WAIT_MS;
2270
2277
  }
2271
- const rationed = (this.spentGroupReads.get(relay) ?? []).filter((at) => now - at < GROUP_RATION_WINDOW_MS);
2278
+ const rationed = within(this.spentGroupReads.get(relay) ?? [], now, GROUP_RATION_WINDOW_MS);
2272
2279
  this.spentGroupReads.set(relay, rationed);
2273
2280
  const pastLimit = isGroupSignal(who) && recent.length >= limit;
2274
2281
  if (isGroupRead(who) && !pastLimit && now - (this.groupsFullAt.get(relay) ?? -Infinity) < GROUP_RATION_MS) {
@@ -2301,7 +2308,7 @@ var RelayTransport = class {
2301
2308
  * than it in the last minute, and none within `ANSWER_READ_SPACING_MS`. None where the groups have no allowance.
2302
2309
  */
2303
2310
  answerAllowanceFree(relay, now) {
2304
- const spent = (this.spentAnswerAllowance.get(relay) ?? []).filter((at) => now - at < 6e4);
2311
+ const spent = within(this.spentAnswerAllowance.get(relay) ?? [], now, 6e4);
2305
2312
  this.spentAnswerAllowance.set(relay, spent);
2306
2313
  const most = Math.min(3, Math.floor(this.limitOf(relay) * GROUP_SIGNALING_ALLOWANCE_SHARE));
2307
2314
  return spent.length < most && (spent.length === 0 || now - spent[spent.length - 1] >= 2e4);
@@ -2326,7 +2333,7 @@ var RelayTransport = class {
2326
2333
  }
2327
2334
  /** What is left of the community members' way back allowance on this relay (`WAY_BACK_SHARE`); its reads leave a write the last of it. */
2328
2335
  wayBackLeft(relay, who, now) {
2329
- const spent = (this.spentWayBack.get(relay) ?? []).filter((at) => now - at < 6e4);
2336
+ const spent = within(this.spentWayBack.get(relay) ?? [], now, 6e4);
2330
2337
  this.spentWayBack.set(relay, spent);
2331
2338
  return Math.floor(this.limitOf(relay) * WAY_BACK_SHARE) - (who.write ? 0 : 1) - spent.length;
2332
2339
  }
@@ -2373,9 +2380,17 @@ var RelayTransport = class {
2373
2380
  }
2374
2381
  /** Drops the turns asked and read over a minute ago, at most once in `TURNS_PRUNE_MS` (or when the clock went back). */
2375
2382
  pruneTurns(turns, now) {
2376
- if (Math.abs(now - (this.turnsPrunedAt.get(turns) ?? -Infinity)) < TURNS_PRUNE_MS) return;
2383
+ const prunedAt = this.turnsPrunedAt.get(turns) ?? -Infinity;
2384
+ if (Math.abs(now - prunedAt) < TURNS_PRUNE_MS) return;
2377
2385
  this.turnsPrunedAt.set(turns, now);
2378
- for (const [key, turn] of turns) if (staleTurn(turn, now)) turns.delete(key);
2386
+ const back = now < prunedAt;
2387
+ for (const [key, turn] of turns) {
2388
+ if (back) {
2389
+ turn.servedAt = Math.min(turn.servedAt, now);
2390
+ turn.askedAt = Math.min(turn.askedAt, now);
2391
+ }
2392
+ if (staleTurn(turn, now)) turns.delete(key);
2393
+ }
2379
2394
  }
2380
2395
  /**
2381
2396
  * Whether a key read in turn longer ago than `key`, still asking, would take this relay's next request: one read in the
@@ -2402,7 +2417,7 @@ var RelayTransport = class {
2402
2417
  }
2403
2418
  /** This contact's departed reads past the limit in the last minute (`DEPARTED_READS`). */
2404
2419
  departedReads(key, now) {
2405
- const reads = (this.departedOver.get(key) ?? []).filter((at) => now - at < 6e4);
2420
+ const reads = within(this.departedOver.get(key) ?? [], now, 6e4);
2406
2421
  if (reads.length) this.departedOver.set(key, reads);
2407
2422
  else this.departedOver.delete(key);
2408
2423
  return reads.length;
@@ -2450,7 +2465,7 @@ var RelayTransport = class {
2450
2465
  spareHeldFor(relay, now) {
2451
2466
  const reserved = this.chatReservedFor(relay, now);
2452
2467
  if (reserved <= 0) return 0;
2453
- const recent = (this.spent.get(relay) ?? []).filter((at) => now - at < 6e4);
2468
+ const recent = within(this.spent.get(relay) ?? [], now, 6e4);
2454
2469
  const keep = this.limitOf(relay) - this.chatReserveOf(relay, now);
2455
2470
  return recent.length >= keep ? Math.min(reserved, recent[recent.length - keep] + 6e4 - now) : 0;
2456
2471
  }
@@ -12059,7 +12074,10 @@ var MAX_ATTEMPTS = 8;
12059
12074
  var SEQUENCE_BLOCK = 64;
12060
12075
  /** The wait before publication attempt `attempts + 1` of a text, or of a receipt the contact still asks for. */
12061
12076
  var backoff = (attempts) => Math.min(6e4, 4e3 * 2 ** attempts);
12062
- /** The contact's mailbox is read this often while either side is DHT-only, and otherwise… */
12077
+ /**
12078
+ * The contact's mailbox is read this often while this side is DHT-only (a contact that chose it is read at the chat's
12079
+ * pace: `ACTIVE_DHT_POLL_MS` open, or on a daemon, `peerDhtPollMs`), and otherwise…
12080
+ */
12063
12081
  var DHT_POLL_MS = 4e3;
12064
12082
  var STREAM_POLL_MS = 3e4;
12065
12083
  /**
@@ -13259,7 +13277,8 @@ var DhtDelivery = class DhtDelivery {
13259
13277
  if (this.mode === "dht" || this.state.peerMode === "dht" && now < this.leavingUntil || now < this.fastUntil) return DHT_POLL_MS;
13260
13278
  if (this.live) return LIVE_POLL_MS;
13261
13279
  if (this.state.pending && this.state.pending.expires > now) return DHT_POLL_MS;
13262
- return this.active ? ACTIVE_DHT_POLL_MS : STREAM_POLL_MS;
13280
+ if (this.active) return ACTIVE_DHT_POLL_MS;
13281
+ return this.state.peerMode === "dht" && this.options.peerDhtPollMs ? Math.min(this.options.peerDhtPollMs, STREAM_POLL_MS) : STREAM_POLL_MS;
13263
13282
  }
13264
13283
  /**
13265
13284
  * How long ago this side's invite was made (or joined), while nobody used it (or its inviter never answered,
@@ -15473,23 +15492,24 @@ function boundVerifiedIdentity(v) {
15473
15492
  if (!isInt$2(v.expiresAt)) throw new Error("Provider returned an invalid expiry");
15474
15493
  out.expiresAt = v.expiresAt;
15475
15494
  }
15476
- if (v.display) {
15477
- const d = v.display;
15478
- const display = {
15479
- source: clean$1(d.source, 120) ?? "Self-described",
15480
- fetchedAt: isInt$2(d.fetchedAt) ? d.fetchedAt : nowSeconds()
15481
- };
15482
- const name = clean$1(d.name, 64);
15483
- if (name) display.name = name;
15484
- if (typeof d.avatar === "string" && d.avatar.length <= 49152 && /^data:image\/(png|jpeg);base64,[A-Za-z0-9+/=]+$/.test(d.avatar)) display.avatar = d.avatar;
15485
- if (typeof d.url === "string" && d.url.length <= 512) try {
15486
- const u = new URL(d.url);
15487
- if (u.protocol === "https:" && !u.username && !u.password) display.url = u.href;
15488
- } catch {}
15489
- out.display = display;
15490
- }
15495
+ if (v.display) out.display = boundIdentityDisplay(v.display);
15491
15496
  return out;
15492
15497
  }
15498
+ /** Bounds a provider's public name/picture (from a proof or `lookupDisplay`): a name with nothing visible left is dropped. */
15499
+ function boundIdentityDisplay(d) {
15500
+ const display = {
15501
+ source: clean$1(d.source, 120) ?? "Self-described",
15502
+ fetchedAt: isInt$2(d.fetchedAt) ? d.fetchedAt : nowSeconds()
15503
+ };
15504
+ const name = clean$1(d.name, 64);
15505
+ if (name) display.name = name;
15506
+ if (typeof d.avatar === "string" && d.avatar.length <= 49152 && /^data:image\/(png|jpeg);base64,[A-Za-z0-9+/=]+$/.test(d.avatar)) display.avatar = d.avatar;
15507
+ if (typeof d.url === "string" && d.url.length <= 512) try {
15508
+ const u = new URL(d.url);
15509
+ if (u.protocol === "https:" && !u.username && !u.password) display.url = u.href;
15510
+ } catch {}
15511
+ return display;
15512
+ }
15493
15513
  var emptyIdentityLedger = () => ({
15494
15514
  challenges: [],
15495
15515
  shared: [],
@@ -15548,6 +15568,12 @@ var CONTACT_REFUSALS = /* @__PURE__ */ new Set([
15548
15568
  EXPIRED
15549
15569
  ]);
15550
15570
  /**
15571
+ * Why a share of mine was not accepted, as this app may say it under my identity: one of the refusals above or my own
15572
+ * app's line; else nothing past "not verified". Any other words came from the contact (a ledger kept before this check)
15573
+ * and would read as this app's own notice.
15574
+ */
15575
+ var identityRefusal = (error) => typeof error === "string" && (CONTACT_REFUSALS.has(error) || error === NOT_IN_PROFILE) ? error : void 0;
15576
+ /**
15551
15577
  * The `idp-*` exchange of one conversation. Frames (all JSON, additive, over the paired channel,
15552
15578
  * only when both offers carry `identity-proof/1`):
15553
15579
  *
@@ -20048,6 +20074,28 @@ var ChatFiles = class {
20048
20074
  });
20049
20075
  this.startNext();
20050
20076
  }
20077
+ /**
20078
+ * An offer taken here whose record or message the host could not store: refused, so its sender does not count it
20079
+ * delivered and keeps its Retry, and forgotten, so that retry is a new offer here. Nothing of it is reported changed
20080
+ * (there is nothing to write it to); what was stored of it is removed.
20081
+ */
20082
+ refuse(id, why) {
20083
+ const entry = this.entries.get(key("in", id));
20084
+ if (!entry || transferEnded(entry.record)) return;
20085
+ this.entries.delete(key("in", id));
20086
+ const incoming = entry.in;
20087
+ entry.record.state = "failed";
20088
+ clearTimeout(incoming.timer);
20089
+ clearTimeout(incoming.ackTimer);
20090
+ incoming.dropped = true;
20091
+ incoming.writing.then(() => incoming.target?.then((t) => t.discard())).catch(() => {});
20092
+ this.send({
20093
+ t: "pf-refuse",
20094
+ id,
20095
+ why
20096
+ });
20097
+ this.startNext();
20098
+ }
20051
20099
  pause(direction, id) {
20052
20100
  const entry = this.entry(direction, id), { record } = entry;
20053
20101
  if (transferEnded(record) || record.state === "verifying" || record.state === "paused" && record.pausedBy === "me") return;
@@ -22117,6 +22165,7 @@ var GhostLink = class {
22117
22165
  save: options.dht.save,
22118
22166
  pollMs: options.dht.pollMs,
22119
22167
  firstControlAfterMs: options.dht.firstControlAfterMs,
22168
+ ...options.dht.peerDhtPollMs && { peerDhtPollMs: options.dht.peerDhtPollMs },
22120
22169
  ...backsOff && { inviteMadeAt: options.madeAt ?? Date.now() },
22121
22170
  capsRev: options.dht.capsRev,
22122
22171
  peerCapsRev: options.dht.peerCapsRev,
@@ -22352,7 +22401,9 @@ var GhostLink = class {
22352
22401
  if (this.activeBinding) return;
22353
22402
  const wasLive = !!this.channel && this.paired?.state.status === "ready";
22354
22403
  this.detach();
22355
- if (wasLive) this.peerLost("closed");
22404
+ if (!wasLive) return;
22405
+ if (this.dataLink.state === "idle" && this.awaitsContactDial()) this.resumeAfterAbsence();
22406
+ this.peerLost("closed");
22356
22407
  },
22357
22408
  onState: (state) => {
22358
22409
  const was = this.lastDataLinkState;
@@ -26990,6 +27041,54 @@ var HEIF_METADATA_ITEMS = /* @__PURE__ */ new Set([
26990
27041
  "mime",
26991
27042
  "uri "
26992
27043
  ]);
27044
+ /**
27045
+ * Item properties that only draw the picture: the codec's configuration (HEVC, AV1, AVC, VVC, JPEG, JPEG 2000,
27046
+ * uncompressed and its components, layered HEVC with its operating points and layers), the size (`ispe`), the bits
27047
+ * per channel (`pixi`), colour (`colr`, its light levels and display volumes `clli`, `mdcv`, `cclv`, `amve`), geometry
27048
+ * (`irot`, `imir`, `clap`, `pasp`, `rloc`, `iscl`), what an auxiliary image is (`auxC`: alpha, depth, a gain map), and
27049
+ * AV1's operating point and layers (`a1op`, `a1lx`).
27050
+ */
27051
+ var HEIF_DRAWS = /* @__PURE__ */ new Set([
27052
+ "hvcC",
27053
+ "av1C",
27054
+ "avcC",
27055
+ "vvcC",
27056
+ "jpgC",
27057
+ "j2kH",
27058
+ "uncC",
27059
+ "cmpd",
27060
+ "lhvC",
27061
+ "oinf",
27062
+ "tols",
27063
+ "lsel",
27064
+ "ispe",
27065
+ "pixi",
27066
+ "colr",
27067
+ "clli",
27068
+ "mdcv",
27069
+ "cclv",
27070
+ "amve",
27071
+ "irot",
27072
+ "imir",
27073
+ "clap",
27074
+ "pasp",
27075
+ "rloc",
27076
+ "iscl",
27077
+ "auxC",
27078
+ "a1op",
27079
+ "a1lx"
27080
+ ]);
27081
+ /** Item properties about the picture: its user description (name, description, tags), accessibility text, creation and modification times, TAI clock and timestamp; and `free`, `skip`. */
27082
+ var HEIF_ABOUT = /* @__PURE__ */ new Set([
27083
+ "udes",
27084
+ "altt",
27085
+ "crtt",
27086
+ "mdft",
27087
+ "taic",
27088
+ "itai",
27089
+ "free",
27090
+ "skip"
27091
+ ]);
26993
27092
  function boxes$1(b, start, end) {
26994
27093
  const found = [];
26995
27094
  for (let at = start; at < end;) {
@@ -27041,8 +27140,16 @@ function stripHeif(b) {
27041
27140
  check$1(at + 6 <= infe.end);
27042
27141
  if (HEIF_METADATA_ITEMS.has(text$1(b, at + 2, 4))) metadata.add(id);
27043
27142
  }
27044
- /** `free` and `skip` boxes, at the top and in `meta`: their bodies go as zeros. */
27045
- const space = [...top, ...children].filter((box) => box.type === "free" || box.type === "skip");
27143
+ const iprp = one("iprp"), properties = [];
27144
+ if (iprp) {
27145
+ const held = boxes$1(b, iprp.body, iprp.end);
27146
+ const ipco = held.filter((box) => box.type === "ipco");
27147
+ check$1(ipco.length === 1 && held.every((box) => box.type === "ipco" || box.type === "ipma"));
27148
+ properties.push(...boxes$1(b, ipco[0].body, ipco[0].end));
27149
+ check$1(properties.every((box) => HEIF_DRAWS.has(box.type) || HEIF_ABOUT.has(box.type)));
27150
+ }
27151
+ /** `free` and `skip` boxes, at the top and in `meta`, and the properties about the picture: their bodies go as zeros. */
27152
+ const space = [...[...top, ...children].filter((box) => box.type === "free" || box.type === "skip"), ...properties.filter((box) => HEIF_ABOUT.has(box.type))];
27046
27153
  const out = b.slice();
27047
27154
  const version = b[iloc.body];
27048
27155
  check$1(version <= 2);
@@ -27723,8 +27830,8 @@ function selfContained(b, minf) {
27723
27830
  }
27724
27831
  /**
27725
27832
  * `moov` with its metadata boxes emptied and its headers' times zeroed, read whole: whether it has a video track, the
27726
- * byte ranges of its metadata and timecode tracks' samples (zeroed by the caller where they are), whether a metadata
27727
- * track has any, and every track's sample table.
27833
+ * byte ranges of its metadata and timecode tracks' samples (zeroed by the caller where they are), whether it has a
27834
+ * metadata or timecode track, and every track's sample table.
27728
27835
  */
27729
27836
  function stripMoov(b) {
27730
27837
  let video = false, fragmented = false, metadata = false;
@@ -27765,11 +27872,12 @@ function stripMoov(b) {
27765
27872
  tables.push(stbl);
27766
27873
  if (handler === "meta") {
27767
27874
  check(selfContained(b, minf));
27768
- const ranges = sampleRanges(b, stbl);
27769
- metadata ||= ranges.length > 0;
27770
- for (const range of ranges) zeroed.push(range);
27771
- } else if (handler === "tmcd" && selfContained(b, minf)) for (const range of sampleRanges(b, stbl)) zeroed.push(range);
27772
- else check(HANDLERS.has(handler));
27875
+ metadata = true;
27876
+ for (const range of sampleRanges(b, stbl)) zeroed.push(range);
27877
+ } else if (handler === "tmcd" && selfContained(b, minf)) {
27878
+ metadata = true;
27879
+ for (const range of sampleRanges(b, stbl)) zeroed.push(range);
27880
+ } else check(HANDLERS.has(handler));
27773
27881
  if (handler === "vide") video = true;
27774
27882
  if (VISUAL.has(handler)) zeroCompressorNames(b, stbl);
27775
27883
  emptyWithin(b, box.body, box.end);
@@ -31936,7 +32044,16 @@ var GROUP_LIMITS = {
31936
32044
  /** A received message is in the saved state within this long (`persistSoon`): a burst of them is one save, not one each. */
31937
32045
  saveWithinMs: 1e3,
31938
32046
  /** New name records of one member taken in `syncWindowMs` (WISP 902 § Messages, "The name record"): one a rename. */
31939
- namesPerMember: 4
32047
+ namesPerMember: 4,
32048
+ /**
32049
+ * Messages of one member taken per `messageWindowMs`, and the bytes of their frames, past a burst of twice its whole
32050
+ * log (`AuthorPace`); its edits the same, counted apart. As a community's (`COMMUNITY_LIMITS.messagesPerAuthor`): each
32051
+ * one taken is a row in every member's app and a frame each hub passes on. The rest are not taken now and come again
32052
+ * in a catch-up.
32053
+ */
32054
+ messagesPerAuthor: 30,
32055
+ messageBytesPerAuthor: 131072,
32056
+ messageWindowMs: 1e4
31940
32057
  };
31941
32058
  /** What every member should know about who can read what, in the words the apps show. */
31942
32059
  var GROUP_READ_NOTE = `Everyone in the group can read everything sent while they are a member. Someone removed keeps what they already received and cannot read what comes after; someone who joins later cannot read what came before. Messages go to each member; whoever was away gets what they missed from any member who has it (the group's last ${GROUP_LIMITS.relay} messages) when they meet again.`;
@@ -31945,6 +32062,33 @@ var GROUP_READ_NOTE = `Everyone in the group can read everything sent while they
31945
32062
  * answer: slices go one after another, each once my app handled the last (`CATCH_UP_PAUSE_MS` at most between them).
31946
32063
  */
31947
32064
  var ANSWER_WINDOW_MS$1 = 5e3;
32065
+ /**
32066
+ * One member's messages (or edits) taken: its whole log handed back at once twice over (`AUTHOR_BURST`: an edge opening
32067
+ * hears it, with what the member says live beside it, and the edits its app says again), then
32068
+ * `GROUP_LIMITS.messagesPerAuthor` and `messageBytesPerAuthor` per `messageWindowMs`, as a community's `MessagePace`.
32069
+ * One not taken is neither seen nor kept nor passed on, so a sync still names it (`miss`) and a catch-up hands it again.
32070
+ * What another member hands on in its answer to my sync is not counted: it took each at its author's pace already, and
32071
+ * a catch-up holds many.
32072
+ */
32073
+ var AUTHOR_BURST = {
32074
+ frames: 2 * GROUP_LIMITS.outlog,
32075
+ bytes: 2 * GROUP_LIMITS.outlogBytes
32076
+ };
32077
+ var AuthorPace = class {
32078
+ frames = AUTHOR_BURST.frames;
32079
+ bytes = AUTHOR_BURST.bytes;
32080
+ at;
32081
+ take(bytes, now) {
32082
+ const elapsed = Math.max(0, now - (this.at ?? now)) / GROUP_LIMITS.messageWindowMs;
32083
+ this.at = now;
32084
+ this.frames = Math.min(AUTHOR_BURST.frames, this.frames + elapsed * GROUP_LIMITS.messagesPerAuthor);
32085
+ this.bytes = Math.min(AUTHOR_BURST.bytes, this.bytes + elapsed * GROUP_LIMITS.messageBytesPerAuthor);
32086
+ if (this.frames < 1 || this.bytes < bytes) return false;
32087
+ this.frames -= 1;
32088
+ this.bytes -= bytes;
32089
+ return true;
32090
+ }
32091
+ };
31948
32092
  var MAX_TEXT_BOX$1 = Math.ceil((GROUP_LIMITS.textBytes + 16) * 4 / 3) + 4;
31949
32093
  /** Sixteen mentions as JSON, each a key and two offsets, with room to spare, sealed. */
31950
32094
  var MAX_MENTIONS_BOX = Math.ceil((MENTION_LIMITS.count * 96 + 16) * 4 / 3) + 4;
@@ -32315,6 +32459,9 @@ var GroupSession = class {
32315
32459
  nameSaid;
32316
32460
  /** New name records taken per member, a few a minute (`GROUP_LIMITS.namesPerMember`). In memory only. */
32317
32461
  namesTaken = /* @__PURE__ */ new Map();
32462
+ /** Messages, and apart from them edits, taken per author (`AuthorPace`). In memory only. */
32463
+ messagePace = /* @__PURE__ */ new Map();
32464
+ editPace = /* @__PURE__ */ new Map();
32318
32465
  queue = Promise.resolve();
32319
32466
  /** One metadata frame that names a commit or an epoch I do not have yet: tried again when the chain moves. */
32320
32467
  pendingMeta;
@@ -32873,16 +33020,29 @@ var GroupSession = class {
32873
33020
  return false;
32874
33021
  }
32875
33022
  }
32876
- /** Another member's edit, kept to hand on: the latest per message; the oldest go once the log is full. False: one as new was kept. */
33023
+ /**
33024
+ * Another member's edit, kept to hand on: the latest per message. Full (in count or in bytes), the oldest of the author
33025
+ * who holds the most of it goes (the one just kept's own on a tie): an author's edits of messages that are not there,
33026
+ * which no keeper can tell (a hub cannot even open them), as many as it likes, push out only its own. False: one as
33027
+ * new was kept, or this one went.
33028
+ */
32877
33029
  keepEdit(frame) {
32878
33030
  const same = (f) => f.s === frame.s && f.e === frame.e && f.n === frame.n;
32879
33031
  const log = this.state.relayEdits ?? [];
32880
33032
  if (log.some((f) => same(f) && f.v >= frame.v)) return false;
32881
- const next = [...log.filter((f) => !same(f)), cleanEdit(frame)];
33033
+ const kept = cleanEdit(frame);
33034
+ const next = [...log.filter((f) => !same(f)), kept];
32882
33035
  let bytes = next.reduce((sum, f) => sum + f.c.length, 0);
32883
- while (next.length > GROUP_LIMITS.relayEdits || bytes > GROUP_LIMITS.relayEditBytes) bytes -= next.shift().c.length;
33036
+ while (next.length > GROUP_LIMITS.relayEdits || bytes > GROUP_LIMITS.relayEditBytes) {
33037
+ const byCount = next.length > GROUP_LIMITS.relayEdits;
33038
+ const held = /* @__PURE__ */ new Map();
33039
+ for (const f of next) held.set(f.s, (held.get(f.s) ?? 0) + (byCount ? 1 : f.c.length));
33040
+ let most = frame.s;
33041
+ for (const [author, amount] of held) if (amount > held.get(most)) most = author;
33042
+ bytes -= next.splice(next.findIndex((f) => f.s === most), 1)[0].c.length;
33043
+ }
32884
33044
  this.state.relayEdits = next;
32885
- return true;
33045
+ return next.includes(kept);
32886
33046
  }
32887
33047
  /** A frame of another member, kept to hand on; the oldest go once the log is full. */
32888
33048
  keep(frame) {
@@ -33280,7 +33440,8 @@ var GroupSession = class {
33280
33440
  /**
33281
33441
  * Says an edit of one of my messages (WISP 902 § Edits): edit `v`, the whole new text and its mentions, sealed under
33282
33442
  * the key of the message's epoch and signed, to every member of that epoch still in the group, or to `to` alone (an
33283
- * edge that just opened). Someone admitted after the message cannot open it and is not sent it. The message's
33443
+ * edge that just opened). Someone admitted after the message cannot open it and is not sent it, but a hub I count on
33444
+ * (`hooks.carriers`), which carries it on to the members who can. The message's
33284
33445
  * epoch key must still be here: past `GROUP_LIMITS.secrets` epochs a message cannot be edited.
33285
33446
  */
33286
33447
  sendEdit(messageId, edit, to) {
@@ -33305,6 +33466,7 @@ var GroupSession = class {
33305
33466
  if (utf8Encode(plain).length > MAX_EDIT_PLAIN) return { error: "Message exceeds 16 KiB" };
33306
33467
  const copies = [ref, ...this.state.sent.filter((f) => f.o && f.o.e === ref.e && f.o.n === ref.n)];
33307
33468
  const told = /* @__PURE__ */ new Set();
33469
+ const carriers = this.hooks.carriers?.() ?? [];
33308
33470
  for (const copy of copies) {
33309
33471
  const readers = this.state.chain[copy.e]?.m, key = this.secret(copy.e);
33310
33472
  if (!readers || !key) continue;
@@ -33327,11 +33489,12 @@ var GroupSession = class {
33327
33489
  ...unsigned,
33328
33490
  sig: toBase64Url(sign(editSigned(unsigned), this.identity.seed))
33329
33491
  };
33330
- const members = (to === void 0 ? this.others : [to]).filter((k) => k !== this.myKey && !told.has(k) && rosterHas(this.roster, k) && rosterHas(readers, k));
33331
- for (const k of members) {
33492
+ const targets = (to === void 0 ? this.others : [to]).filter((k) => k !== this.myKey && rosterHas(this.roster, k));
33493
+ for (const k of targets.filter((k) => !told.has(k) && rosterHas(readers, k))) {
33332
33494
  this.hooks.send(k, frame);
33333
33495
  told.add(k);
33334
33496
  }
33497
+ for (const k of targets.filter((k) => carriers.includes(k) && !rosterHas(readers, k))) this.hooks.send(k, frame);
33335
33498
  }
33336
33499
  return { sent: told.size };
33337
33500
  });
@@ -33754,6 +33917,7 @@ var GroupSession = class {
33754
33917
  delete raw.o;
33755
33918
  delete raw.xs;
33756
33919
  }
33920
+ if (!(relayed && (answer || waited)) && !this.paced(this.messagePace, raw.s, frameBytes(raw))) return;
33757
33921
  const first = raw.o === void 0 ? null : readFirstPlace(raw.o, raw.e);
33758
33922
  if (raw.o !== void 0 && !first) return;
33759
33923
  const secret = this.secret(raw.e);
@@ -33830,7 +33994,7 @@ var GroupSession = class {
33830
33994
  * in, and a member away when it was said would keep the message for good. One for an epoch or a secret not here yet
33831
33995
  * waits, as a message does. Taken, it is kept to hand on in turn.
33832
33996
  */
33833
- async receiveEdit(from, raw) {
33997
+ async receiveEdit(from, raw, waited = false) {
33834
33998
  if (!isEditFrame(raw) || raw.s === this.myKey || !rosterHas(this.roster, from)) return;
33835
33999
  const member = rosterHas(this.roster, raw.s);
33836
34000
  if (!verify(fromBase64Url(raw.sig), editSigned(raw), publicKeyFromZ32(raw.s))) return;
@@ -33839,7 +34003,15 @@ var GroupSession = class {
33839
34003
  return;
33840
34004
  }
33841
34005
  const commit = this.state.chain[raw.e];
33842
- if (!commit || !rosterHas(commit.m, raw.s) || !rosterHas(commit.m, this.myKey)) return;
34006
+ if (!commit || !rosterHas(commit.m, raw.s)) return;
34007
+ if (!(this.state.relayEdits ?? []).some((f) => f.s === raw.s && f.e === raw.e && f.n === raw.n && f.v >= raw.v) && !(raw.s !== from && (this.awaitsAnswer(from) || waited)) && !this.paced(this.editPace, raw.s, raw.c.length + 400)) return;
34008
+ if (!rosterHas(commit.m, this.myKey)) {
34009
+ if (member && this.keepEdit(raw)) {
34010
+ this.persistSoon();
34011
+ this.took(cleanEdit(raw));
34012
+ }
34013
+ return;
34014
+ }
33843
34015
  const secret = this.secret(raw.e);
33844
34016
  if (!secret) {
33845
34017
  if (raw.e >= this.epoch - GROUP_LIMITS.secrets) this.parkEdit(from, raw);
@@ -33874,7 +34046,7 @@ var GroupSession = class {
33874
34046
  ...rm ? { rm: true } : {}
33875
34047
  });
33876
34048
  if (this.keepEdit(raw)) {
33877
- await this.persist();
34049
+ this.persistSoon();
33878
34050
  this.took(cleanEdit(raw));
33879
34051
  }
33880
34052
  }
@@ -33886,6 +34058,11 @@ var GroupSession = class {
33886
34058
  }].slice(-GROUP_LIMITS.outlog);
33887
34059
  this.ask(from);
33888
34060
  }
34061
+ paced(paces, author, bytes) {
34062
+ let pace = paces.get(author);
34063
+ if (!pace) paces.set(author, pace = new AuthorPace());
34064
+ return pace.take(bytes, this.now());
34065
+ }
33889
34066
  wholeSigned(raw) {
33890
34067
  if (typeof raw.xs !== "string" || raw.xs.length !== 86 || !B64$1.test(raw.xs)) return false;
33891
34068
  try {
@@ -34026,7 +34203,7 @@ var GroupSession = class {
34026
34203
  for (const { from, frame } of ready) await this.receiveMessage(from, frame, true);
34027
34204
  const edits = this.waitingEdits.filter((w) => w.frame.e <= this.epoch && !!this.state.secrets[w.frame.e]);
34028
34205
  this.waitingEdits = this.waitingEdits.filter((w) => !edits.includes(w));
34029
- for (const { from, frame } of edits) await this.receiveEdit(from, frame);
34206
+ for (const { from, frame } of edits) await this.receiveEdit(from, frame, true);
34030
34207
  }
34031
34208
  async receiveCommit(from, frame) {
34032
34209
  const raw = frame.commit;
@@ -35507,11 +35684,12 @@ var CommunitySession = class CommunitySession {
35507
35684
  * it was in. What one who left wrote while in the group is taken and handed on, its goodbye included, up to what the
35508
35685
  * member who committed the leave had heard of it then (its `group-left` mark), never past it: the leaver still holds
35509
35686
  * those epochs' secrets, and anything it signs later is not heard (WISP 903 § Leaving and removal). No mark here
35510
- * (one not come yet, or a committer's app before it) and nothing of it is heard.
35687
+ * (one not come yet, or a committer's app before it) and nothing of it is heard. A key let in only on a branch that
35688
+ * lost is heard no more either, as one removed, once this member knows it lost.
35511
35689
  */
35512
35690
  heardAfterOut(f) {
35513
35691
  const i = this.outIndex(f.s);
35514
- if (i < 0) return true;
35692
+ if (i < 0) return rosterHas(this.roster, f.s) || this.isRecentMember(f.s) || !this.lostAt(f.s);
35515
35693
  const commit = this.state.chain[i];
35516
35694
  if (commit.k !== "leave") return false;
35517
35695
  const high = this.state.left?.[communityCommitHash(commit)]?.hi[seenKey(f.e, f.h)];
@@ -35873,6 +36051,7 @@ var CommunitySession = class CommunitySession {
35873
36051
  }
35874
36052
  this.followEntry();
35875
36053
  this.pruneSide();
36054
+ this.state.pendingLeaves = this.state.pendingLeaves.filter((r) => rosterHas(this.roster, r.s));
35876
36055
  if (this.state.status !== status) await this.persist();
35877
36056
  else this.persistSoon();
35878
36057
  this.hooks.changed();
@@ -36070,7 +36249,8 @@ var CommunitySession = class CommunitySession {
36070
36249
  this.requireMember();
36071
36250
  if (!this.isAdmin) throw new Error("Only the admin can do that");
36072
36251
  }
36073
- async commit(kind, fields, now) {
36252
+ /** `alongside`: what else the commit changes in the state, saved in the same write (only once the commit is signed). */
36253
+ async commit(kind, fields, now, alongside) {
36074
36254
  if (!this.adminWork) throw new Error(GROUP_ADMIN_OFF_ERROR);
36075
36255
  if (this.hooks.adminTurn && !await this.hooks.adminTurn()) throw engineError("groupTurnUnconfirmed");
36076
36256
  if (this.state.chain.length >= COMMUNITY_LIMITS.chain) throw new Error("This group has reached its membership history limit. Create a new group.");
@@ -36114,6 +36294,7 @@ var CommunitySession = class CommunitySession {
36114
36294
  this.state.seq = 0;
36115
36295
  this.state.seqH = hash;
36116
36296
  this.pruneSide();
36297
+ alongside?.();
36117
36298
  await this.persist();
36118
36299
  this.hooks.broadcast({
36119
36300
  t: "group-commit",
@@ -36275,12 +36456,12 @@ var CommunitySession = class CommunitySession {
36275
36456
  return this.serialize(async () => {
36276
36457
  this.requireAdmin();
36277
36458
  const entry = off ? null : identityFromSeedB64(toBase64Url(randomBytes(32)));
36278
- await this.commit("link", { x: entry?.pubKeyZ32 ?? "" }, now);
36279
- this.state.entry = {
36280
- key: entry?.pubKeyZ32 ?? "",
36281
- seedB64: entry?.seedB64 ?? ""
36282
- };
36283
- await this.persist();
36459
+ await this.commit("link", { x: entry?.pubKeyZ32 ?? "" }, now, () => {
36460
+ this.state.entry = {
36461
+ key: entry?.pubKeyZ32 ?? "",
36462
+ seedB64: entry?.seedB64 ?? ""
36463
+ };
36464
+ });
36284
36465
  if (entry) {
36285
36466
  const pause = pacer(ENTRY_SLICE_MS);
36286
36467
  for (const key of this.others) {
@@ -37281,7 +37462,9 @@ var CommunitySession = class CommunitySession {
37281
37462
  if (!answered.take()) return;
37282
37463
  if (lost) {
37283
37464
  const at = this.mainIndex.get(frame.h);
37284
- const commits = this.state.chain.slice(at !== void 0 ? at + 1 : lost.fork + 1, lost.end + 1);
37465
+ let commits = this.state.chain.slice(at !== void 0 ? at + 1 : lost.fork + 1, lost.end + 1);
37466
+ const link = commits.findIndex((c) => c.k === "link" && !!c.x);
37467
+ if (link >= 0) commits = commits.slice(0, link);
37285
37468
  if (commits.length) this.answers.handOut(from, commits.map((commit) => ({
37286
37469
  t: "group-commit",
37287
37470
  v: 2,
@@ -37370,7 +37553,7 @@ var CommunitySession = class CommunitySession {
37370
37553
  const entry = this.entryFrame(from);
37371
37554
  if (entry) answer.push(entry);
37372
37555
  }
37373
- for (const request of this.state.pendingLeaves) answer.push({
37556
+ for (const request of this.state.pendingLeaves) if (rosterHas(this.roster, request.s)) answer.push({
37374
37557
  t: "group-leave",
37375
37558
  v: 2,
37376
37559
  g: this.id,
@@ -38262,6 +38445,6 @@ function readX401SdJwtVc(text) {
38262
38445
  };
38263
38446
  }
38264
38447
  //#endregion
38265
- export { SSHSIG_NAMESPACE as $, reactionEmoji as $a, requestRecords as $c, HoldKeys as $i, deviceLinkPairing as $l, engineError as $n, presenceSeenAt as $o, PIN_LIMITS as $r, handoffVersions as $s, ONCHAIN_PROVIDER as $t, isZ32Key as $u, knockIdentity as A, downsamplePeaks as Aa, verifyEnrollProof as Ac, IDENTITY_REVOCATION_LABEL as Ai, readImageMeta as Al, ENDPOINT as An, shownTime as Ao, lobbyKeys as Ar, HANDOFF_PIECE_BYTES as As, didJwsAlg as At, setLinkTraceSink as Au, GROUP_REACTED_FRAME as B, RateWindow as Ba, REQUEST_LIFETIME_MS as Bc, revokesIdentity as Bi, OwnInviteError as Bl, NO_PICTURE_METADATA as Bn, edgeParams as Bo, shouldBeHub as Br, handoffCancelFrame as Bs, parseDidSignaturePaste as Bt, parseRelayPayload as Bu, communityHasFrame as C, formatFileSize as Ca, enrollDigits as Cc, UPGRADE_CAPABILITY as Ci, readAppRevocation as Cl, pubkyProofFile as Cn, sameButtonText as Co, pickMeshHubs as Cr, HANDOFF_ACK as Cs, DID_DOCUMENT_MAX_BYTES as Ct, HEDGE_MS as Cu, decodeGroupEntryLink as D, VOICE_LIMITS as Da, enrollProofFrame as Dc, dialDescriptors as Di, signAppObject as Dl, requestLnurlInvoice as Dn, claimedTime as Do, doorHubs as Dr, HANDOFF_HELLO as Ds, checkDidJws as Dt, currentRelays as Du, KNOCK_TTL_MS as E, PLAYABLE_AUDIO as Ea, enrollHelloFrame as Ec, capsDescriptors as Ei, setAppSignatureFastPath as El, pubkyHomeserverOf as En, arrivalKey as Eo, beaconRecords as Er, HANDOFF_HAVE as Es, DidError as Et, SLOW_MS as Eu, GroupWakeLimiter as F, parseVideoMeta as Fa, planKnocks as Fc, identityRevocationValue as Fi, encodeContactLink as Fl, parseCashuRequestPayload as Fn, commitHash as Fo, pickHubs as Fr, filePartName as Fs, didWebFileUrl as Ft, PacketTooLargeError as Fu, GROUP_EDIT_FRAME as G, forwardedAgain as Ga, knockSlotOf as Gc, TRANSPORTS as Gi, inviteOwnership as Gl, GhostLink as Gn, DirectPathWatch as Go, transferEnded as Gr, handoffEphemeral as Gs, didDhtDocument as Gt, verify as Gu, GroupSession as H, LINK_TRAILING as Ha, contactAskerHolds as Hc, PeerProofs as Hi, decodeInviteCode as Hl, isStrippedPicture as Hn, RatchetBox as Ho, FILE_LIMITS as Hr, handoffContextProof as Hs, staticDidDocument as Ht, identityFromSeed as Hu, groupWakeFrame as I, EDIT_BUFFER_MS as Ia, settleRequest as Ic, identityStatement as Ii, readContactLink as Il, parseFedimintRequestPayload as In, parseGroupCommit as Io, rankHubs as Ir, handoffAttemptAllowed as Is, didWebHost as It, RELAY_PAYLOAD_MAX_BYTES as Iu, meshMessageRef as J, GROUP_REACTION_FRAME as Ja, makeStampPaced as Jc, irohDescriptor as Ji, ENROLL_CAPABILITY as Jl, PAIRED_FRAME_TOO_LARGE as Jn, DHT_POLL_INTERVALS as Jo, TYPING_REFRESH_MS as Jr, handoffOfferFrame as Js, encodeDidDhtPacket as Jt, hasVisible as Ju, GROUP_EDIT_TEXT_BYTES as K, readForwarded as Ka, knockSlotRecords as Kc, automaticTransport as Ki, ownInviteRefusal as Kl, INVITE_TAKEN as Kn, AWAITING_PEER_MS as Ko, transferStalled as Kr, handoffHelloFrame as Ks, didDhtFromPublicKey as Kt, MAX_AVATAR_LENGTH as Ku, groupWakes as L, EDIT_RATE_WINDOW_MS as La, takeRequest as Lc, isIdentityBinding as Li, createDeviceInvite as Ll, NO_VIDEO_METADATA as Ln, rosterAdmin as Lo, readBeacon as Lr, handoffAttemptFailed as Ls, normalizeDid as Lt, createRelayPayload as Lu, mergeKnocks as M, parseVoiceMeta as Ma, endedRequests as Mc, IdentityExchange as Mi, canonicalJsonBytes as Ml, fedimintRequestPayload as Mn, GROUP_MEMBER_CAP as Mo, mergeBeacon as Mr, HANDOFF_TIMINGS as Ms, didWebDocumentUrl as Mt, budgetRetryMs as Mu, readKnocks as N, voiceDownloadName as Na, inboxRecord as Nc, boundVerifiedIdentity as Ni, readCanonicalJson as Nl, findEndpoint as Nn, MAX_GROUP_CHAIN as No, mergeLobby as Nr, HANDOFF_VERIFIED as Ns, didWebFile as Nt, isDiscoveryBudgetError as Nu, encodeGroupEntryLink as O, VOICE_METER as Oa, readEnrollGrant as Oc, IDENTITY_MAX_EVIDENCE as Oi, signAppRevocation as Ol, resolveLightningDestination as On, heardTime as Oo, freshHubs as Or, HANDOFF_OFFER as Os, checkDidSignature as Ot, normalizeRelayUrl as Ou, GROUP_WAKE_FRAME as P, voiceLevel as Pa, newInbox as Pc, emptyIdentityLedger as Pi, createContactLink as Pl, isFederationId as Pn, MEMBER_KEY as Po, newerHead as Pr, NO_ATTEMPTS as Ps, didWebFileNames as Pt, withRequestOptions as Pu, SSHSIG_MAX_ARMOR as Q, queueReaction as Qa, readLinkRecord as Qc, HOLD_LIMITS as Qi, deviceKeyZ32 as Ql, EngineError as Qn, WATCH_PEER_MS as Qo, GROUP_PIN_FRAME as Qr, handoffStreamKey as Qs, EVM_TEST_CHAINS as Qt, fromBase64Url as Qu, parseGroupWakeFrame as R, MAX_REMOVAL_NUMBER as Ra, turnOff as Rc, newIdentityBinding as Ri, deviceInviteJoinerParams as Rl, videoMetadataPatches as Rn, rosterHas as Ro, readBeaconHead as Rr, handoffAttemptSucceeded as Rs, parseDid as Rt, newerPacket as Ru, GROUP_READ_NOTE_COMMUNITY as S, dhtFileId as Sa, enrollCancelReason as Sc, STATUS_CARD_CAPABILITY as Si, isAppRef as Sl, pubkyProofCapability as Sn, checkStatusCard as So, meshHubs as Sr, serviceIdFromName as Ss, verifyAtprotoRecordProof as St, HEDGE_MISSING_MS as Su, encodeCommunityLink as T, sanitizeMime as Ta, enrollGrantFrame as Tc, DHT_TEXT_CAPABILITY as Ti, readAppRevocations as Tl, homeserverWebEndpoint as Tn, statusCardText as To, beaconKeys as Tr, HANDOFF_DONE as Ts, DID_JWS_MAX_LENGTH as Tt, RelaysFailedError as Tu, frameBytes as U, linkStop as Ua, contactDay as Uc, emptyProofLedger as Ui, encodeInviteCode as Ul, stripPictureMetadata as Un, emptyRatchetState as Uo, FileUplink as Ur, handoffDataFrame as Us, strictBase64Url as Ut, identityFromSeedB64 as Uu, GROUP_READ_NOTE as V, dhtEditId as Va, contactAskerFrame as Vc, lastSharedWithMe as Vi, createChatInvite as Vl, PICTURE_METADATA_LIMITS as Vn, RATCHET_CAPABILITY as Vo, ChatFiles as Vr, handoffContext as Vs, signingKeys as Vt, createIdentity as Vu, COMMUNITY_EDIT_FRAME as W, parseLinkPreview as Wa, knockSlotIdentity as Wc, validExternalKey as Wi, inviteLink as Wl, withoutPictureMetadata as Wn, ratchetSessionOf as Wo, sentWhole as Wr, handoffDigest as Ws, DidDhtError as Wt, publicKeyFromZ32 as Wu, mentionsMember as X, ReactionWindow as Xa, openRequest as Xc, HOLD_CAPABILITY as Xi, deviceEchoFrame as Xl, pairedMessageFits as Xn, PRESENCE_WINDOW as Xo, sanitizeTypingStatus as Xr, handoffReleaseFrame as Xs, signDidDhtPacket as Xt, stripHidden as Xu, parseCommunityEdit as Y, REACTION_LIMITS as Ya, mergeContactKnocks as Yc, irohRelayUrl as Yi, HANDOFF_CAPABILITY as Yl, pairedEditFits as Yn, EXPECT_PEER_MS as Yo, TypingSender as Yr, handoffPakeFrame as Ys, resolveDidDht as Yt, sanitizeDisplayText as Yu, groupName as Z, nextReactionNumber as Za, readKnockSlot as Zc, HOLD_DATED_BACK_MS as Zi, deviceEchoNonce as Zl, pairedMessageFrame as Zn, RELAY_POLL_INTERVALS as Zo, typingActivity as Zr, handoffRetryAfter as Zs, ETHEREUM_USDT as Zt, bytesEqual as Zu, groupTypingEpoch as _, wellKnownUrl as _a, ENROLL_DONE as _c, chatAppId as _i, appRef as _l, PUBKY_PROOF_MAX_BYTES as _n, appCardId as _o, SIGNAL_REPLY_MS as _r, parseCallSignal as _s, isAtprotoDid as _t, turnKeys as _u, appRevocationFor as a, decodeDnsResponse as aa, readHandoffHello as ac, WAKE_CALL_INTERVAL_MS as ai, appDigest as al, WALLET_NETWORKS as an, readReply as ao, GROUP_WANT_NO_FRAME as ar, decodeControl as as, verifySshSignature as at, TURN_RAISE_READ_TIMEOUT_MS as au, COMMUNITY_LIMITS as b, peekDhtMailbox as ba, ENROLL_PROOF as bc, BUTTONS_CAPABILITY as bi, isAppHash as bl, newPubkyProofFolder as bn, cardLine as bo, MESH_HUBS as br, HTTP_SERVICE_PROTO as bs, shortAtprotoDid as bt, turnVerifierMark as bu, checkAppBeforeRun as c, domainWellKnownFile as ca, readHandoffVerified as cc, newWakeToken as ci, checkAppManifest as cl, assertWholeSats as cn, BUTTON_STYLES as co, isGroupMessageId as cr, CALL_SIGNAL_MAX_AGE_MS as cs, decodeAnyBitcoinAddress as ct, turnPutSummary as cu, checkAppStoreIndex as d, nip05RootKey as da, SET_UPDATE as dc, wakeRequest as di, readAppBundle as dl, walletNetworkOf as dn, PR_CHECKS as do, readGroupWant as dr, answersOffer as ds, ATPROTO_PROOF_COLLECTION as dt, firstDeviceSetSecret as du, HoldRefusedError as ea, newHandoffId as ec, randomBytes as ed, mayPin as ei, seenEntry as el, PaymentPreflightError as en, reactionIsNewer as eo, engineText as er, GhostlyHttpError as es, SshSigError as et, devicePingFrame as eu, readAppStore as f, normalizeDomain as fa, readSetUpdate as fc, checkPushEndpoint as fi, readAppBundleAsync as fl, SPARK_NETWORKS as fn, PR_STATES as fo, readGroupWantNo as fr, buildSdpFromSignal as fs, ATPROTO_PROOF_SCOPE as ft, nextTurnPosition as fu, GroupTypingBoard as g, txtValue as ga, verifySetUpdate as gc, APP_DATA_MAX_BYTES as gi, appFingerprint as gl, isBitcoinAddress as gn, TASK_STATUSES as go, SIGNAL_HOLD_MS as gr, extractParamsFromSdp as gs, checkAtprotoProofRecord as gt, turnInstance as gu, GROUP_TYPING_FRAME as h, recordsName as ha, signTombstone as hc, isServeId as hi, APP_STATEMENT_LIMITS as hl, sparkInvoiceDetails as hn, STATUS_CARD_LIMITS as ho, SIGNAL_FRESH_MS as hr, contactRtcConfig as hs, atprotoProofRkey as ht, signTurnRelease as hu, addedAppPermissions as i, DOMAIN_FILE_MAX_BYTES as ia, readHandoffHave as ic, utf8Encode as id, readPin as ii, APP_PERMISSIONS as il, USDT_PUBLIC_RPC as in, pairedReplyAuthor as io, GROUP_WANT_FRAME as ir, LIMITS as is, sshSignCommand as it, TURN_PUT_WINDOW_MS as iu, knockRecords as j, fileMessageText as ja, clearMissed as jc, IdentityCheckUnavailable as ji, canonicalJson as jl, cashuRequestPayload as jn, GROUP_ADMIN_OFF_ERROR as jo, lobbyRecords as jr, HANDOFF_REQUEST as js, didSignedMessages as jt, traceLink as ju, entryParams as k, baseMime as ka, readEnrollHello as kc, IDENTITY_MAX_VALIDITY as ki, parseImageMeta as kl, decodeBolt11 as kn, receivedTimestamp as ko, hubRank as kr, HANDOFF_PAKE as ks, didGhostlyServiceEntry as kt, relayUrlProblem as ku, planAppUpdate as l, encodeDnsQuery as la, sealHandoffPiece as lc, parseWakeFrame as li, isAppUrl as ll, formatPaymentAmount as ln, CRON_LINE as lo, readGroupFileMeta as lr, QUICK_REDIAL_MS as ls, ATPROTO_DECLARED_SCOPE as lt, TURN_LAST_SEQUENCE as lu, signAppStore as m, recordsFromWellKnown as ma, setUpdateFrame as mc, APP_RANGE_LIMITS as mi, APP_PREFIXES as ml, sparkAddressKind as mn, RUN_RESULTS as mo, GROUP_SIGNAL_FRAME as mr, callSignalHeardAt as ms, atprotoProofRecord as mt, signTurnPacket as mu, readX401SdJwtVc as n, newMailbox as na, readHandoffCancel as nc, toZ32 as nd, pinIsNewer as ni, APP_BUNDLE_MAGIC as nl, SEPOLIA_TEST_USDT_FAUCET as nn, validReactionNumber as no, GROUP_FILE_LIMITS as nr, parseLocalTarget as ns, parseSshSignature as nt, seedSigner as nu, appStoreDecision as o, dnsProofName as oa, readHandoffPake as oc, WakeLimiter as oi, appViewOf as ol, arkAddressPrefix as on, replySnippet as oo, fetchesByItself as or, encodeControl as os, verifyBitcoinMessage as ot, TURN_SETTLE_MS as ou, readAppStoreSteps as p, recordsFromTxt as pa, setAckFrame as pc, vapidKeysMatch as pi, sha256Paced as pl, SPARK_PROVIDER as pn, ROUTINE_STATES as po, CarriedTransport as pr, callRtcConfig as ps, atprotoDidMethod as pt, readTurnPacket as pu, carryMentions as q, COMMUNITY_REACTION_FRAME as qa, linkRecords as qc, dialableIrohRelay as qi, DEVICES_CAPABILITY as ql, LIVENESS_PING_MS as qn, DAEMON_WATCH_PEER_IDLE_MS as qo, TYPING_KINDS as qr, handoffManifestFrames as qs, encodeDidDhtDeactivated as qt, sanitizeAvatar as qu, sameX401HolderJwk as r, readManifest as ra, readHandoffDone as rc, utf8Decode as rd, pinNumberHolds as ri, APP_ICON_PATH as rl, TEST_USDT_FAUCET_AMOUNT as rn, wireReaction as ro, GROUP_HAVE_FRAME as rr, webLocalFetch as rs, sameSshKey as rt, webCryptoSigner as ru, appUpdateDecision as s, domainTxtRecord as sa, readHandoffTurnFrame as sc, deviceWakeRequest as si, assembleAppBundle as sl, assertTokenUnits as sn, BUTTON_ID as so, groupFileFallback as sr, BURST_RING_MS as ss, BitcoinAddressError as st, classifyTurnRead as su, newX401HolderKey as t, isHoldUrl as ta, readHandoffAck as tc, toBase64Url as td, nextPinNumber as ti, APP_BUNDLE_LIMITS as tl, SEPOLIA_TEST_USDT as tn, readReaction as to, parseEngineError as tr, formatLocalTarget as ts, parseSshPublicKey as tt, newDeviceSetSecret as tu, APP_STORE_LIMITS as u, isPublicAddress as ua, SET_ACK as uc, relayRequest as ui, pacer as ul, validatePaymentTarget as un, ITEM_STATES as uo, readGroupHave as ur, RTC_CONFIG as us, ATPROTO_FULL_SCOPE as ut, TURN_MAX as uu, openGroupTyping as v, DHT_FILE_TOO_LARGE as va, ENROLL_GRANT as vc, isAppVersion as vi, appRefPublisher as vl, isPubkyKey as vn, appCardUrl as vo, groupSignalFrame as vr, signalHasVideo as vs, normalizeAtprotoHandle as vt, turnName as vu, decodeCommunityLink as w, sanitizeFileName as wa, enrollDoneFrame as wc, CapsExchange as wi, readAppRevocationShape as wl, pubkyProofPath as wn, statusCardBytes as wo, COMMUNITY_TOPOLOGY as wr, HANDOFF_CANCEL as ws, DID_FILE_MAX_BYTES as wt, RelayTransport as wu, CommunitySession as x, DHT_FILE_CAPABILITY as xa, enrollCancelFrame as xc, EDIT_CAPABILITY as xi, isAppKey as xl, normalizePubkyKey as xn, cardUrl as xo, mayBeHub as xr, LEGACY_SERVICES as xs, AtprotoProofError as xt, DEFAULT_RELAYS as xu, sealGroupTyping as y, DHT_MESSAGE_TTL as ya, ENROLL_HELLO as yc, APPS_CAPABILITY as yi, checkAppRevokeStatement as yl, isPubkyProofFolder as yn, buttonLabelClash as yo, readGroupSignal as yr, emptyLinkRecords as ys, parseAtprotoDidDocument as yt, turnStatedVerifier as yu, GROUP_LIMITS as z, REMOVED_TEXT as za, ContactRequestError as zc, receivedIdentityStatus as zi, readDeviceInvite as zl, withoutVideoMetadata as zn, verifyCommitSignature as zo, readLobby as zr, handoffBusyFrame as zs, parseDidDocument as zt, openRelayPayload as zu };
38448
+ export { SSHSIG_NAMESPACE as $, ReactionWindow as $a, openRequest as $c, HOLD_DATED_BACK_MS as $i, deviceEchoFrame as $l, engineError as $n, PRESENCE_WINDOW as $o, PIN_LIMITS as $r, handoffReleaseFrame as $s, ONCHAIN_PROVIDER as $t, sanitizeDisplayText as $u, knockIdentity as A, VOICE_LIMITS as Aa, enrollProofFrame as Ac, IDENTITY_REVOCATION_LABEL as Ai, signAppObject as Al, ENDPOINT as An, claimedTime as Ao, lobbyKeys as Ar, HANDOFF_HELLO as As, didJwsAlg as At, currentRelays as Au, GROUP_REACTED_FRAME as B, EDIT_RATE_WINDOW_MS as Ba, takeRequest as Bc, newIdentityBinding as Bi, createDeviceInvite as Bl, NO_PICTURE_METADATA as Bn, rosterAdmin as Bo, shouldBeHub as Br, handoffAttemptFailed as Bs, parseDidSignaturePaste as Bt, RELAY_PAYLOAD_MAX_BYTES as Bu, communityHasFrame as C, peekDhtMailbox as Ca, ENROLL_PROOF as Cc, UPGRADE_CAPABILITY as Ci, isAppHash as Cl, pubkyProofFile as Cn, cardLine as Co, pickMeshHubs as Cr, HTTP_SERVICE_PROTO as Cs, DID_DOCUMENT_MAX_BYTES as Ct, turnVerifierMark as Cu, decodeGroupEntryLink as D, sanitizeFileName as Da, enrollDoneFrame as Dc, dialDescriptors as Di, readAppRevocationShape as Dl, requestLnurlInvoice as Dn, statusCardBytes as Do, doorHubs as Dr, HANDOFF_CANCEL as Ds, checkDidJws as Dt, RelayTransport as Du, KNOCK_TTL_MS as E, formatFileSize as Ea, enrollDigits as Ec, capsDescriptors as Ei, readAppRevocation as El, pubkyHomeserverOf as En, sameButtonText as Eo, beaconRecords as Er, HANDOFF_ACK as Es, DidError as Et, HEDGE_MS as Eu, GroupWakeLimiter as F, parseVoiceMeta as Fa, endedRequests as Fc, emptyIdentityLedger as Fi, canonicalJsonBytes as Fl, parseCashuRequestPayload as Fn, GROUP_MEMBER_CAP as Fo, pickHubs as Fr, HANDOFF_TIMINGS as Fs, didWebFileUrl as Ft, DiscoveryBudgetError as Fu, GROUP_EDIT_FRAME as G, LINK_TRAILING as Ga, contactAskerHolds as Gc, emptyProofLedger as Gi, decodeInviteCode as Gl, GhostLink as Gn, RatchetBox as Go, transferEnded as Gr, handoffContextProof as Gs, didDhtDocument as Gt, createIdentity as Gu, GroupSession as H, REMOVED_TEXT as Ha, ContactRequestError as Hc, revokesIdentity as Hi, readDeviceInvite as Hl, isStrippedPicture as Hn, verifyCommitSignature as Ho, FILE_LIMITS as Hr, handoffBusyFrame as Hs, staticDidDocument as Ht, newerPacket as Hu, groupWakeFrame as I, voiceDownloadName as Ia, inboxRecord as Ic, identityRefusal as Ii, readCanonicalJson as Il, parseFedimintRequestPayload as In, MAX_GROUP_CHAIN as Io, rankHubs as Ir, HANDOFF_VERIFIED as Is, didWebHost as It, budgetRetryMs as Iu, meshMessageRef as J, forwardedAgain as Ja, knockSlotOf as Jc, automaticTransport as Ji, inviteOwnership as Jl, PAIRED_FRAME_TOO_LARGE as Jn, DirectPathWatch as Jo, TYPING_REFRESH_MS as Jr, handoffEphemeral as Js, encodeDidDhtPacket as Jt, publicKeyFromZ32 as Ju, GROUP_EDIT_TEXT_BYTES as K, linkStop as Ka, contactDay as Kc, validExternalKey as Ki, encodeInviteCode as Kl, INVITE_TAKEN as Kn, emptyRatchetState as Ko, transferStalled as Kr, handoffDataFrame as Ks, didDhtFromPublicKey as Kt, identityFromSeed as Ku, groupWakes as L, voiceLevel as La, newInbox as Lc, identityRevocationValue as Li, createContactLink as Ll, NO_VIDEO_METADATA as Ln, MEMBER_KEY as Lo, readBeacon as Lr, NO_ATTEMPTS as Ls, normalizeDid as Lt, isDiscoveryBudgetError as Lu, mergeKnocks as M, baseMime as Ma, readEnrollHello as Mc, IdentityExchange as Mi, parseImageMeta as Ml, fedimintRequestPayload as Mn, receivedTimestamp as Mo, mergeBeacon as Mr, HANDOFF_PAKE as Ms, didWebDocumentUrl as Mt, relayUrlProblem as Mu, readKnocks as N, downsamplePeaks as Na, verifyEnrollProof as Nc, boundIdentityDisplay as Ni, readImageMeta as Nl, findEndpoint as Nn, shownTime as No, mergeLobby as Nr, HANDOFF_PIECE_BYTES as Ns, didWebFile as Nt, setLinkTraceSink as Nu, encodeGroupEntryLink as O, sanitizeMime as Oa, enrollGrantFrame as Oc, IDENTITY_MAX_EVIDENCE as Oi, readAppRevocations as Ol, resolveLightningDestination as On, statusCardText as Oo, freshHubs as Or, HANDOFF_DONE as Os, checkDidSignature as Ot, RelaysFailedError as Ou, GROUP_WAKE_FRAME as P, fileMessageText as Pa, clearMissed as Pc, boundVerifiedIdentity as Pi, canonicalJson as Pl, isFederationId as Pn, GROUP_ADMIN_OFF_ERROR as Po, newerHead as Pr, HANDOFF_REQUEST as Ps, didWebFileNames as Pt, traceLink as Pu, SSHSIG_MAX_ARMOR as Q, REACTION_LIMITS as Qa, mergeContactKnocks as Qc, HOLD_CAPABILITY as Qi, HANDOFF_CAPABILITY as Ql, EngineError as Qn, EXPECT_PEER_MS as Qo, GROUP_PIN_FRAME as Qr, handoffPakeFrame as Qs, EVM_TEST_CHAINS as Qt, hasVisible as Qu, parseGroupWakeFrame as R, parseVideoMeta as Ra, planKnocks as Rc, identityStatement as Ri, encodeContactLink as Rl, videoMetadataPatches as Rn, commitHash as Ro, readBeaconHead as Rr, filePartName as Rs, parseDid as Rt, withRequestOptions as Ru, GROUP_READ_NOTE_COMMUNITY as S, DHT_MESSAGE_TTL as Sa, ENROLL_HELLO as Sc, STATUS_CARD_CAPABILITY as Si, checkAppRevokeStatement as Sl, pubkyProofCapability as Sn, buttonLabelClash as So, meshHubs as Sr, emptyLinkRecords as Ss, verifyAtprotoRecordProof as St, turnStatedVerifier as Su, encodeCommunityLink as T, dhtFileId as Ta, enrollCancelReason as Tc, DHT_TEXT_CAPABILITY as Ti, isAppRef as Tl, homeserverWebEndpoint as Tn, checkStatusCard as To, beaconKeys as Tr, serviceIdFromName as Ts, DID_JWS_MAX_LENGTH as Tt, HEDGE_MISSING_MS as Tu, frameBytes as U, RateWindow as Ua, REQUEST_LIFETIME_MS as Uc, lastSharedWithMe as Ui, OwnInviteError as Ul, stripPictureMetadata as Un, edgeParams as Uo, FileUplink as Ur, handoffCancelFrame as Us, strictBase64Url as Ut, openRelayPayload as Uu, GROUP_READ_NOTE as V, MAX_REMOVAL_NUMBER as Va, turnOff as Vc, receivedIdentityStatus as Vi, deviceInviteJoinerParams as Vl, PICTURE_METADATA_LIMITS as Vn, rosterHas as Vo, ChatFiles as Vr, handoffAttemptSucceeded as Vs, signingKeys as Vt, createRelayPayload as Vu, COMMUNITY_EDIT_FRAME as W, dhtEditId as Wa, contactAskerFrame as Wc, PeerProofs as Wi, createChatInvite as Wl, withoutPictureMetadata as Wn, RATCHET_CAPABILITY as Wo, sentWhole as Wr, handoffContext as Ws, DidDhtError as Wt, parseRelayPayload as Wu, mentionsMember as X, COMMUNITY_REACTION_FRAME as Xa, linkRecords as Xc, irohDescriptor as Xi, DEVICES_CAPABILITY as Xl, pairedMessageFits as Xn, DAEMON_WATCH_PEER_IDLE_MS as Xo, sanitizeTypingStatus as Xr, handoffManifestFrames as Xs, signDidDhtPacket as Xt, MAX_AVATAR_LENGTH as Xu, parseCommunityEdit as Y, readForwarded as Ya, knockSlotRecords as Yc, dialableIrohRelay as Yi, ownInviteRefusal as Yl, pairedEditFits as Yn, AWAITING_PEER_MS as Yo, TypingSender as Yr, handoffHelloFrame as Ys, resolveDidDht as Yt, verify as Yu, groupName as Z, GROUP_REACTION_FRAME as Za, makeStampPaced as Zc, irohRelayUrl as Zi, ENROLL_CAPABILITY as Zl, pairedMessageFrame as Zn, DHT_POLL_INTERVALS as Zo, typingActivity as Zr, handoffOfferFrame as Zs, ETHEREUM_USDT as Zt, sanitizeAvatar as Zu, groupTypingEpoch as _, recordsName as _a, setUpdateFrame as _c, chatAppId as _i, APP_PREFIXES as _l, PUBKY_PROOF_MAX_BYTES as _n, RUN_RESULTS as _o, SIGNAL_REPLY_MS as _r, callSignalHeardAt as _s, isAtprotoDid as _t, signTurnPacket as _u, appRevocationFor as a, readManifest as aa, readHandoffCancel as ac, toBase64Url as ad, WAKE_CALL_INTERVAL_MS as ai, APP_BUNDLE_MAGIC as al, WALLET_NETWORKS as an, validReactionNumber as ao, GROUP_WANT_NO_FRAME as ar, parseLocalTarget as as, verifySshSignature as at, seedSigner as au, COMMUNITY_LIMITS as b, ACTIVE_DHT_POLL_MS as ba, ENROLL_DONE as bc, BUTTONS_CAPABILITY as bi, appRef as bl, newPubkyProofFolder as bn, appCardId as bo, MESH_HUBS as br, parseCallSignal as bs, shortAtprotoDid as bt, turnKeys as bu, checkAppBeforeRun as c, dnsProofName as ca, readHandoffHello as cc, utf8Encode as cd, newWakeToken as ci, appDigest as cl, assertWholeSats as cn, readReply as co, isGroupMessageId as cr, decodeControl as cs, decodeAnyBitcoinAddress as ct, TURN_RAISE_READ_TIMEOUT_MS as cu, checkAppStoreIndex as d, encodeDnsQuery as da, readHandoffVerified as dc, wakeRequest as di, checkAppManifest as dl, walletNetworkOf as dn, BUTTON_STYLES as do, readGroupWant as dr, CALL_SIGNAL_MAX_AGE_MS as ds, ATPROTO_PROOF_COLLECTION as dt, turnPutSummary as du, HOLD_LIMITS as ea, handoffRetryAfter as ec, stripHidden as ed, mayPin as ei, readKnockSlot as el, PaymentPreflightError as en, nextReactionNumber as eo, engineText as er, RELAY_POLL_INTERVALS as es, SshSigError as et, deviceEchoNonce as eu, readAppStore as f, isPublicAddress as fa, sealHandoffPiece as fc, checkPushEndpoint as fi, isAppUrl as fl, SPARK_NETWORKS as fn, CRON_LINE as fo, readGroupWantNo as fr, QUICK_REDIAL_MS as fs, ATPROTO_PROOF_SCOPE as ft, TURN_LAST_SEQUENCE as fu, GroupTypingBoard as g, recordsFromWellKnown as ga, setAckFrame as gc, APP_DATA_MAX_BYTES as gi, sha256Paced as gl, isBitcoinAddress as gn, ROUTINE_STATES as go, SIGNAL_HOLD_MS as gr, callRtcConfig as gs, checkAtprotoProofRecord as gt, readTurnPacket as gu, GROUP_TYPING_FRAME as h, recordsFromTxt as ha, readSetUpdate as hc, isServeId as hi, readAppBundleAsync as hl, sparkInvoiceDetails as hn, PR_STATES as ho, SIGNAL_FRESH_MS as hr, buildSdpFromSignal as hs, atprotoProofRkey as ht, nextTurnPosition as hu, addedAppPermissions as i, newMailbox as ia, readHandoffAck as ic, randomBytes as id, readPin as ii, APP_BUNDLE_LIMITS as il, USDT_PUBLIC_RPC as in, readReaction as io, GROUP_WANT_FRAME as ir, formatLocalTarget as is, sshSignCommand as it, newDeviceSetSecret as iu, knockRecords as j, VOICE_METER as ja, readEnrollGrant as jc, IdentityCheckUnavailable as ji, signAppRevocation as jl, cashuRequestPayload as jn, heardTime as jo, lobbyRecords as jr, HANDOFF_OFFER as js, didSignedMessages as jt, normalizeRelayUrl as ju, entryParams as k, PLAYABLE_AUDIO as ka, enrollHelloFrame as kc, IDENTITY_MAX_VALIDITY as ki, setAppSignatureFastPath as kl, decodeBolt11 as kn, arrivalKey as ko, hubRank as kr, HANDOFF_HAVE as ks, didGhostlyServiceEntry as kt, SLOW_MS as ku, planAppUpdate as l, domainTxtRecord as la, readHandoffPake as lc, parseWakeFrame as li, appViewOf as ll, formatPaymentAmount as ln, replySnippet as lo, readGroupFileMeta as lr, encodeControl as ls, ATPROTO_DECLARED_SCOPE as lt, TURN_SETTLE_MS as lu, signAppStore as m, normalizeDomain as ma, SET_UPDATE as mc, APP_RANGE_LIMITS as mi, readAppBundle as ml, sparkAddressKind as mn, PR_CHECKS as mo, GROUP_SIGNAL_FRAME as mr, answersOffer as ms, atprotoProofRecord as mt, firstDeviceSetSecret as mu, readX401SdJwtVc as n, HoldRefusedError as na, handoffVersions as nc, fromBase64Url as nd, pinIsNewer as ni, requestRecords as nl, SEPOLIA_TEST_USDT_FAUCET as nn, reactionEmoji as no, GROUP_FILE_LIMITS as nr, presenceSeenAt as ns, parseSshSignature as nt, deviceLinkPairing as nu, appStoreDecision as o, DOMAIN_FILE_MAX_BYTES as oa, readHandoffDone as oc, toZ32 as od, WakeLimiter as oi, APP_ICON_PATH as ol, arkAddressPrefix as on, wireReaction as oo, fetchesByItself as or, webLocalFetch as os, verifyBitcoinMessage as ot, webCryptoSigner as ou, readAppStoreSteps as p, nip05RootKey as pa, SET_ACK as pc, vapidKeysMatch as pi, pacer as pl, SPARK_PROVIDER as pn, ITEM_STATES as po, CarriedTransport as pr, RTC_CONFIG as ps, atprotoDidMethod as pt, TURN_MAX as pu, carryMentions as q, parseLinkPreview as qa, knockSlotIdentity as qc, TRANSPORTS as qi, inviteLink as ql, LIVENESS_PING_MS as qn, ratchetSessionOf as qo, TYPING_KINDS as qr, handoffDigest as qs, encodeDidDhtDeactivated as qt, identityFromSeedB64 as qu, sameX401HolderJwk as r, isHoldUrl as ra, newHandoffId as rc, isZ32Key as rd, pinNumberHolds as ri, seenEntry as rl, TEST_USDT_FAUCET_AMOUNT as rn, reactionIsNewer as ro, GROUP_HAVE_FRAME as rr, GhostlyHttpError as rs, sameSshKey as rt, devicePingFrame as ru, appUpdateDecision as s, decodeDnsResponse as sa, readHandoffHave as sc, utf8Decode as sd, deviceWakeRequest as si, APP_PERMISSIONS as sl, assertTokenUnits as sn, pairedReplyAuthor as so, groupFileFallback as sr, LIMITS as ss, BitcoinAddressError as st, TURN_PUT_WINDOW_MS as su, newX401HolderKey as t, HoldKeys as ta, handoffStreamKey as tc, bytesEqual as td, nextPinNumber as ti, readLinkRecord as tl, SEPOLIA_TEST_USDT as tn, queueReaction as to, parseEngineError as tr, WATCH_PEER_MS as ts, parseSshPublicKey as tt, deviceKeyZ32 as tu, APP_STORE_LIMITS as u, domainWellKnownFile as ua, readHandoffTurnFrame as uc, relayRequest as ui, assembleAppBundle as ul, validatePaymentTarget as un, BUTTON_ID as uo, readGroupHave as ur, BURST_RING_MS as us, ATPROTO_FULL_SCOPE as ut, classifyTurnRead as uu, openGroupTyping as v, txtValue as va, signTombstone as vc, isAppVersion as vi, APP_STATEMENT_LIMITS as vl, isPubkyKey as vn, STATUS_CARD_LIMITS as vo, groupSignalFrame as vr, contactRtcConfig as vs, normalizeAtprotoHandle as vt, signTurnRelease as vu, decodeCommunityLink as w, DHT_FILE_CAPABILITY as wa, enrollCancelFrame as wc, CapsExchange as wi, isAppKey as wl, pubkyProofPath as wn, cardUrl as wo, COMMUNITY_TOPOLOGY as wr, LEGACY_SERVICES as ws, DID_FILE_MAX_BYTES as wt, DEFAULT_RELAYS as wu, CommunitySession as x, DHT_FILE_TOO_LARGE as xa, ENROLL_GRANT as xc, EDIT_CAPABILITY as xi, appRefPublisher as xl, normalizePubkyKey as xn, appCardUrl as xo, mayBeHub as xr, signalHasVideo as xs, AtprotoProofError as xt, turnName as xu, sealGroupTyping as y, wellKnownUrl as ya, verifySetUpdate as yc, APPS_CAPABILITY as yi, appFingerprint as yl, isPubkyProofFolder as yn, TASK_STATUSES as yo, readGroupSignal as yr, extractParamsFromSdp as ys, parseAtprotoDidDocument as yt, turnInstance as yu, GROUP_LIMITS as z, EDIT_BUFFER_MS as za, settleRequest as zc, isIdentityBinding as zi, readContactLink as zl, withoutVideoMetadata as zn, parseGroupCommit as zo, readLobby as zr, handoffAttemptAllowed as zs, parseDidDocument as zt, PacketTooLargeError as zu };
38266
38449
 
38267
- //# sourceMappingURL=src-D31D1_oY.js.map
38450
+ //# sourceMappingURL=src-BIdfHB7t.js.map