@ghostlytools/cli 1.13.3 → 1.13.4

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 (86) hide show
  1. package/dist/assets/{api-DO0YMLiB.js → api-B5qxNMgg.js} +2 -2
  2. package/dist/assets/{api-Dz2cw7WD.js → api-iiij_pP5.js} +71 -28
  3. package/dist/assets/api-iiij_pP5.js.map +1 -0
  4. package/dist/assets/{apiKit-DAFsWtyk.js → apiKit-BPuHOoXF.js} +2 -2
  5. package/dist/assets/{apiKit-DAFsWtyk.js.map → apiKit-BPuHOoXF.js.map} +1 -1
  6. package/dist/assets/{appFetch-BQO5Pk7W.js → appFetch-D89FnCxr.js} +2 -2
  7. package/dist/assets/{appFetch-BQO5Pk7W.js.map → appFetch-D89FnCxr.js.map} +1 -1
  8. package/dist/assets/{apps-D4KRpZB4.js → apps-BpZcd86Y.js} +1 -1
  9. package/dist/assets/{apps-B88rYWRm.js → apps-D2YGSPJe.js} +5 -5
  10. package/dist/assets/{apps-B88rYWRm.js.map → apps-D2YGSPJe.js.map} +1 -1
  11. package/dist/assets/{backup-CNLY905d.js → backup-BrMe9VPY.js} +4 -4
  12. package/dist/assets/{backup-CNLY905d.js.map → backup-BrMe9VPY.js.map} +1 -1
  13. package/dist/assets/{backup-BeXBtbVL.js → backup-COkkM8Yy.js} +1 -1
  14. package/dist/assets/{bitcoind-BXZdQ1wZ.js → bitcoind-CK1QEUHn.js} +2 -2
  15. package/dist/assets/{bitcoind-BXZdQ1wZ.js.map → bitcoind-CK1QEUHn.js.map} +1 -1
  16. package/dist/assets/{blobFiles-DDs34n0r.js → blobFiles-DA3UEn37.js} +3 -3
  17. package/dist/assets/{blobFiles-DDs34n0r.js.map → blobFiles-DA3UEn37.js.map} +1 -1
  18. package/dist/assets/buttons-BWEdoxgK.js +1 -0
  19. package/dist/assets/{buttons-BKojbx0Q.js → buttons-UsDPQJsQ.js} +4 -4
  20. package/dist/assets/{buttons-BKojbx0Q.js.map → buttons-UsDPQJsQ.js.map} +1 -1
  21. package/dist/assets/{client-BtPhfWjK.js → client-Cj-VLeTs.js} +2 -2
  22. package/dist/assets/{client-BtPhfWjK.js.map → client-Cj-VLeTs.js.map} +1 -1
  23. package/dist/assets/{fileBytes-CfvUXdSy.js → fileBytes-B2jXQI8e.js} +3 -3
  24. package/dist/assets/{fileBytes-CfvUXdSy.js.map → fileBytes-B2jXQI8e.js.map} +1 -1
  25. package/dist/assets/{fileBytes-tj6-VZcB.js → fileBytes-BQrW3m-d.js} +2 -2
  26. package/dist/assets/{fileBytes-tj6-VZcB.js.map → fileBytes-BQrW3m-d.js.map} +1 -1
  27. package/dist/assets/{fileBytes-CCKbwqG_.js → fileBytes-CtjxJ6AL.js} +1 -1
  28. package/dist/assets/{fileBytesIdb-BJirUAjI.js → fileBytesIdb-B7Wjw0S8.js} +3 -3
  29. package/dist/assets/{fileBytesIdb-BJirUAjI.js.map → fileBytesIdb-B7Wjw0S8.js.map} +1 -1
  30. package/dist/assets/fileBytesIdb-Fcj2mwj6.js +1 -0
  31. package/dist/assets/{fileBytesOpfs-DRUYLER4.js → fileBytesOpfs-BW0u-_f_.js} +3 -3
  32. package/dist/assets/{fileBytesOpfs-DRUYLER4.js.map → fileBytesOpfs-BW0u-_f_.js.map} +1 -1
  33. package/dist/assets/{fixedHosts-BJFL8Ell.js → fixedHosts-CrO01M_y.js} +3 -3
  34. package/dist/assets/{fixedHosts-BJFL8Ell.js.map → fixedHosts-CrO01M_y.js.map} +1 -1
  35. package/dist/assets/{groupMeta-Cz95F6sX.js → groupMeta-DHJxOu0K.js} +3 -3
  36. package/dist/assets/groupMeta-DHJxOu0K.js.map +1 -0
  37. package/dist/assets/{host-BsBWxTtW.js → host-C4J4y-Zq.js} +24 -16
  38. package/dist/assets/host-C4J4y-Zq.js.map +1 -0
  39. package/dist/assets/{idb-ewvbqyDI.js → idb-CmIR_bxg.js} +2 -1
  40. package/dist/assets/idb-CmIR_bxg.js.map +1 -0
  41. package/dist/assets/{identityProofs-zI_Iy9uI.js → identityProofs-C0rIGT6y.js} +6 -3
  42. package/dist/assets/identityProofs-C0rIGT6y.js.map +1 -0
  43. package/dist/assets/{irohWeb-BLDcHwYz.js → irohWeb-BXgunUhu.js} +69 -26
  44. package/dist/assets/irohWeb-BXgunUhu.js.map +1 -0
  45. package/dist/assets/{main-D48Ben7C.js → main-BLs-zUTt.js} +18 -18
  46. package/dist/assets/{main-D48Ben7C.js.map → main-BLs-zUTt.js.map} +1 -1
  47. package/dist/assets/{mainline-CDUXtV-I.js → mainline-CYek1H10.js} +2 -2
  48. package/dist/assets/{mainline-CDUXtV-I.js.map → mainline-CYek1H10.js.map} +1 -1
  49. package/dist/assets/{networkReason-DYlPZS5M.js → networkReason-C6LYbjF2.js} +2 -2
  50. package/dist/assets/{networkReason-DYlPZS5M.js.map → networkReason-C6LYbjF2.js.map} +1 -1
  51. package/dist/assets/{ownDid-CwxFBzOH.js → ownDid-Dg-8e_hs.js} +4 -4
  52. package/dist/assets/{ownDid-CwxFBzOH.js.map → ownDid-Dg-8e_hs.js.map} +1 -1
  53. package/dist/assets/{ownStatus-DjD0sQKF.js → ownStatus-BOx4vLi6.js} +3 -3
  54. package/dist/assets/{ownStatus-DjD0sQKF.js.map → ownStatus-BOx4vLi6.js.map} +1 -1
  55. package/dist/assets/{profiles-BAJf0c9E.js → profiles-BA0ePikY.js} +2 -2
  56. package/dist/assets/{profiles-BAJf0c9E.js.map → profiles-BA0ePikY.js.map} +1 -1
  57. package/dist/assets/{registry-CHwHTWbK.js → registry-DuSwXntJ.js} +1 -1
  58. package/dist/assets/{registry-CPuexTle.js → registry-OoIgxDrO.js} +5 -5
  59. package/dist/assets/{registry-CPuexTle.js.map → registry-OoIgxDrO.js.map} +1 -1
  60. package/dist/assets/{relay-gJTOYQJZ.js → relay-NT5bf1WA.js} +9 -6
  61. package/dist/assets/relay-NT5bf1WA.js.map +1 -0
  62. package/dist/assets/{resolve-BqmGXKn4.js → resolve-DUmE70Eo.js} +3 -3
  63. package/dist/assets/{resolve-BqmGXKn4.js.map → resolve-DUmE70Eo.js.map} +1 -1
  64. package/dist/assets/{restoredRows-D_WSHE7H.js → restoredRows-Cgaxx1xW.js} +2 -2
  65. package/dist/assets/{restoredRows-D_WSHE7H.js.map → restoredRows-Cgaxx1xW.js.map} +1 -1
  66. package/dist/assets/{server-e4oKeNez.js → server-WWlXICVB.js} +166 -32
  67. package/dist/assets/server-WWlXICVB.js.map +1 -0
  68. package/dist/assets/{sshForges-Cqt3qfWe.js → sshForges-Cfu-dSwc.js} +2 -2
  69. package/dist/assets/{sshForges-Cqt3qfWe.js.map → sshForges-Cfu-dSwc.js.map} +1 -1
  70. package/dist/assets/{usdt-DLmtf8F9.js → usdt-BkO4SY07.js} +2 -2
  71. package/dist/assets/{usdt-DLmtf8F9.js.map → usdt-BkO4SY07.js.map} +1 -1
  72. package/dist/assets/{waitNotice-mB0Ym145.js → waitNotice-DSECf6II.js} +2 -2
  73. package/dist/assets/{waitNotice-mB0Ym145.js.map → waitNotice-DSECf6II.js.map} +1 -1
  74. package/dist/ghostly.mjs +1 -1
  75. package/npm-shrinkwrap.json +2 -2
  76. package/package.json +1 -1
  77. package/dist/assets/api-Dz2cw7WD.js.map +0 -1
  78. package/dist/assets/buttons-_5Fw8uHn.js +0 -1
  79. package/dist/assets/fileBytesIdb-B0zzJ6p7.js +0 -1
  80. package/dist/assets/groupMeta-Cz95F6sX.js.map +0 -1
  81. package/dist/assets/host-BsBWxTtW.js.map +0 -1
  82. package/dist/assets/idb-ewvbqyDI.js.map +0 -1
  83. package/dist/assets/identityProofs-zI_Iy9uI.js.map +0 -1
  84. package/dist/assets/irohWeb-BLDcHwYz.js.map +0 -1
  85. package/dist/assets/relay-gJTOYQJZ.js.map +0 -1
  86. package/dist/assets/server-e4oKeNez.js.map +0 -1
@@ -1,23 +1,23 @@
1
- import { $ as beaconKeys, $i as MAX_SHARED_APPS, $n as reactionEmoji, $t as vapidKeysMatch, Aa as sha256Paced, Ai as GhostlyHttpError, Ar as statusCardText, At as TypingSender, Bn as REMOVED_TEXT, Br as GROUP_MEMBER_CAP, Bt as WAKE_CALL_INTERVAL_MS, C as MESSAGE_PACED, Cn as dhtFileId, Cr as cardEditNumber, Ct as liveStatus, D as pairedMessageFrame, Da as pacer, Di as RELAY_POLL_INTERVALS, Dr as readStatusCard, E as pairedMessageFits, Ei as PRESENCE_WINDOW, En as sanitizeMime, Er as checkStatusCard, Et as TYPING_FRAME, F as readGroupFileMeta, Fa as appRefPublisher, Fi as LIMITS, Fr as heardTime, Ft as mayPin, G as readGroupSignal, Gn as forwardedAgain, Gr as commitHash, Gt as WakeLimiter, Ha as readAppRevocation, Hn as dhtEditId, Hr as MEMBER_KEY, Ht as WAKE_ONLINE_BATCH_MS, Ia as appRevocationsFileEntries, Ii as decodeControl, In as parseVideoMeta, Ir as receivedTimestamp, It as nextPinNumber, J as mayBeHub, Ji as parseCallSignal, Jn as GROUP_REACTION_FRAME, Jr as parseGroupCommit, Jt as parseWakeFrame, K as MESH_HUBS, Ki as contactRtcConfig, Kn as readForwarded, Kr as commitUntaggedHash, Kt as deviceWakeRequest, Li as encodeControl, Ln as EDIT_BUFFER_MS, Lr as shownTime, Lt as pinIsNewer, Mi as formatLocalTarget, Mn as fileMessageText, Mt as typingActivity, N as groupFileFallback, Na as appFingerprint, Ni as parseLocalTarget, Nn as parseVoiceMeta, Nr as arrivalKey, Nt as GROUP_PIN_FRAME, O as GROUP_FILE_LIMITS, Oi as WATCH_PEER_MS, Or as sameButtonText, Pa as appRef, Pi as webLocalFetch, Pr as claimedTime, Pt as PIN_LIMITS, Q as COMMUNITY_TOPOLOGY, Qa as parseImageMeta, Qi as LEGACY_SERVICES, Qn as queueReaction, Qr as signCommit, Qt as checkPushEndpoint, Ra as isAppHash, Rn as EDIT_RATE_WINDOW_MS, Rr as GROUP_ADMIN_OFF_ERROR, Rt as pinNumberHolds, S as LIVENESS_PING_MS, Sa as appViewOf, Sn as DHT_FILE_CAPABILITY, St as STATUS_IDLE_AFTER_MS, T as pairedEditFits, Tn as sanitizeFileName, Ua as readAppRevocationShape, Un as validEditNumber, Ur as OWN_FRAME_LIMIT, Ut as WAKE_ONLINE_DELAY_MS, Va as isAppRef, Vi as RTC_CONFIG, Vn as RateWindow, Vt as WAKE_INTERVAL_MS, W as groupSignalFrame, Wn as validRemovalNumber, Wr as SAID_AGAIN, X as meshRendezvous, Xi as emptyLinkRecords, Xn as ReactionWindow, Xr as rosterAdmin, Xt as wakeFrame, Y as meshHubs, Yn as REACTION_LIMITS, Yr as rememberAlone, Yt as relayRequest, Z as pickMeshHubs, Zi as HTTP_SERVICE_PROTO, Zn as nextReactionNumber, Zr as rosterHas, Zt as wakeRequest, _ as signGroupMeta, _a as seenEntry, _i as RATCHET_CAPABILITY, _o as deviceEchoNonce, a as groupMetaChange, aa as contactDay, ai as confirmationTag, an as APPS_CAPABILITY, ao as OwnInviteError, ar as groupReplyAuthor, at as lobbyRecords, b as GhostLink, bi as ratchetSessionOf, bo as devicePingFrame, bt as transferStalled, c as groupMetaTag, ca as knockSlotOf, ci as encryptText, cn as STATUS_CARD_CAPABILITY, co as encodeInviteCode, cr as replySnippet, ct as newerHead, d as keepPastGroupMeta, da as makeStampPaced, di as newEpochSecret, dn as DHT_TEXT_CAPABILITY, dt as readBeacon, ea as serviceIdFromName, ei as verifyChain, en as APP_RANGE_LIMITS, eo as canonicalJson, er as reactionIsNewer, et as beaconRecords, f as nextGroupMetaRevision, fa as mergeContactKnocks, fn as capsDescriptors, fo as pastedAgain, ft as readBeaconHead, g as parseGroupMetaTag, ga as requestRecords, gi as sha256Hex, gn as validExternalKey, go as deviceEchoFrame, gt as FILE_LIMITS, h as parseGroupMetaFrame, ha as readLinkRecord, hi as sealSecret, hn as emptyProofLedger, ho as HANDOFF_CAPABILITY, ht as ChatFiles, i as groupMetaBody, ia as contactAskerHolds, ii as confirmationMatches, in as isAppVersion, io as INVITE_MAX_LENGTH, ir as REPLY_LIMITS, it as lobbyKeys, jr as withoutAppLink, k as GROUP_HAVE_FRAME, ka as readAppBundleAsync, ki as presenceSeenAt, kt as TypingReceiver, l as groupMetaToHand, la as knockSlotRecords, li as epochKeys, ln as UPGRADE_CAPABILITY, lo as inviteLink, lr as wireReply, lt as pickHubs, m as parseGroupMetaBody, ma as readKnockSlot, mn as PeerProofs, mo as ENROLL_CAPABILITY, mt as shouldBeHub, na as REQUEST_LIFETIME_MS, ni as verifyCommitSignature, no as readCanonicalJson, nr as validReactionNumber, nt as freshHubs, o as groupMetaNewer, oa as knockHolds, oi as decryptText, on as BUTTONS_CAPABILITY, oo as createChatInvite, or as pairedReplyAuthor, ot as mergeBeacon, p as openGroupMeta, pa as openRequest, pi as openSecret, pn as dialDescriptors, po as DEVICES_CAPABILITY, pt as readLobby, q as NO_HUB_POLICY, qn as COMMUNITY_REACTION_FRAME, qr as expectedRoster, qt as newWakeToken, r as groupDisplayName, ra as contactAskerFrame, ri as GROUP_PROFILE, rn as chatAppId, ro as INVITE_HRP, rr as wireReaction, rt as hubRank, s as groupMetaPicture, sa as knockSlotIdentity, si as edgeParams, sn as EDIT_CAPABILITY, so as decodeInviteCode, sr as readReply, st as mergeLobby, t as encodeGroupMetaBody, ta as ContactRequestError, ti as verifyCommit, tn as isServeId, to as canonicalJsonBytes, tr as readReaction, tt as doorHubs, u as groupName, ua as linkRecords, un as CapsExchange, uo as inviteOwnership, ur as BUTTON_ID, ut as rankHubs, v as verifyGroupMetaSignature, va as APP_BUNDLE_LIMITS, vi as RatchetBox, vo as deviceKeyZ32, vr as STATUS_CARD_LIMITS, vt as sentWhole, w as PAIRED_FRAME_TOO_LARGE, wi as DHT_POLL_INTERVALS, wn as formatFileSize, wt as personStatus, x as INVITE_TAKEN, xa as appDigest, xi as DirectPathWatch, xn as peekDhtMailbox, xo as newDeviceSetSecret, y as wrapGroupMeta, ya as APP_BUNDLE_MAGIC, yi as emptyRatchetState, yn as DHT_MESSAGE_TTL, yo as deviceLinkPairing, yt as transferEnded, z as CarriedTransport, za as isAppKey, zn as MAX_REMOVAL_NUMBER, zr as GROUP_ID, zt as readPin } from "./groupMeta-Cz95F6sX.js";
2
- import { _ as receivedIdentityStatus, d as emptyIdentityLedger, y as lastSharedWithMe } from "./identityProofs-zI_Iy9uI.js";
3
- import { _ as openDb, a as GROUP_LIGHT_RANGE, b as transact, c as clearProfileStores, d as deleteDatabase, f as errorLine, h as groupLiveKey, i as FILE_INDEX, l as committed, m as groupLightKey, n as APP_STORAGE_SCOPE_INDEX, o as GROUP_LIVE_RANGE, p as fileStore, r as CARD_INDEX, s as STORES$1, t as APP_STORAGE_CHAT_INDEX, u as databaseName, v as profileOpenFailure, x as wrap, y as store } from "./idb-ewvbqyDI.js";
4
- import { c as fileSpace, f as FILE_BYTES_STEP, o as fileBytes, r as blobDigest, s as fileBytesOf, u as removeFileBytes } from "./fileBytes-CfvUXdSy.js";
5
- import { a as sealSeed, c as openRow, d as sealRow, g as whenDataKeyDropped, h as sealSecret$1, i as newDeviceKey, l as openRows, m as openSecret$1, o as unsealSeed, r as intentRepository, s as RowSeals } from "./networkReason-DYlPZS5M.js";
6
- import { $ as cardsKey, $t as validEditText, A as assertConfirmedReal, At as COMMUNITY_LIMITS, B as copyForForward, Bt as encodeGroupEntryLink, C as pairedWireReply, Ct as WrongNetworkError, D as paymentAlias, Dt as requireTurn, E as replyTo, Et as refuseAway, F as paymentNetworksOf, Ft as encodeCommunityLink, G as removeStored, Gt as readKnocks, H as forwardKind, Ht as knockIdentity, I as walletInstances, It as memberAdmissions, Jt as GROUP_EDIT_FRAME, K as storedSize, Kt as CatchUpAnswers, Lt as routedCommunityFrame, M as createTiming, Mt as GROUP_READ_NOTE_COMMUNITY, N as crossNetwork, Nt as communityHasFrame, O as paymentWireId, Ot as setAwayWallets, P as paymentNetwork, Pt as decodeCommunityLink, Q as LightningCards, Qt as parseCommunityEdit, R as WALLET_TYPES, S as groupReply, St as ModeGate, T as replyRef, Tt as awayFrom, U as FileAppender, Ut as knockRecords, V as forwardError, Vt as entryParams, W as readStored$2, Wt as mergeKnocks, X as IdentityProofs, Xt as carryMentions, Yt as GROUP_EDIT_TEXT_BYTES, Z as CASHU_CARD, Zt as meshMessageRef, _ as GroupFileDesk, _t as breezDatabasesFor, a as CashuWallet, at as INVOICE_PACE, b as groupOfFile, bt as relayOnlyProblem, c as assertAmount, ct as CASHU_MINT_SOURCE, d as groupPayLineId, dt as CashuAdapter, en as MENTION_LIMITS, et as BREEZ_SOURCE, ft as swapSettledAt, g as parsePayLink, gt as breezDatabaseInUse, h as pairLinkId, ht as openBreez, i as onPublicIrohRelay, it as lightningPaying, j as createFailure, jt as CommunitySession, k as WALLET_NAMES, kt as setSingleWriterGate, l as normalizeMintUrl, lt as cashuMint, m as groupLinkId, mt as loadBreezSdk, n as createIrohWebEndpoint, nn as validMentions, nt as normalizePhrase, o as SwapUnsettledError, ot as ProviderSources, pt as forgetBreez, q as streamStored, r as irohRelayProblem, rn as wireMentions, rt as journaledPayment, st as sourceKey, t as DEFAULT_IROH_RELAYS, tn as mentionsMember, tt as breez, ut as AskBackoff, v as groupFileId, vt as iceServerProblem, w as receivedPairedReply, wt as networkLabel, x as storedGroupFiles, xt as ModeChanged, y as groupFileText, yt as iceServerSetting, z as FORWARD_MESSAGE_GONE, zt as decodeGroupEntryLink } from "./irohWeb-BLDcHwYz.js";
1
+ import { $ as beaconKeys, $i as MAX_SHARED_APPS, $n as reactionEmoji, $t as vapidKeysMatch, Aa as sha256Paced, Ai as GhostlyHttpError, Ar as statusCardText, At as TypingSender, Bn as REMOVED_TEXT, Br as GROUP_MEMBER_CAP, Bt as WAKE_CALL_INTERVAL_MS, C as MESSAGE_PACED, Cn as dhtFileId, Cr as cardEditNumber, Ct as liveStatus, D as pairedMessageFrame, Da as pacer, Di as RELAY_POLL_INTERVALS, Dr as readStatusCard, E as pairedMessageFits, Ei as PRESENCE_WINDOW, En as sanitizeMime, Er as checkStatusCard, Et as TYPING_FRAME, F as readGroupFileMeta, Fa as appRefPublisher, Fi as LIMITS, Fr as heardTime, Ft as mayPin, G as readGroupSignal, Gn as forwardedAgain, Gr as commitHash, Gt as WakeLimiter, Ha as readAppRevocation, Hn as dhtEditId, Hr as MEMBER_KEY, Ht as WAKE_ONLINE_BATCH_MS, Ia as appRevocationsFileEntries, Ii as decodeControl, In as parseVideoMeta, Ir as receivedTimestamp, It as nextPinNumber, J as mayBeHub, Ji as parseCallSignal, Jn as GROUP_REACTION_FRAME, Jr as parseGroupCommit, Jt as parseWakeFrame, K as MESH_HUBS, Ki as contactRtcConfig, Kn as readForwarded, Kr as commitUntaggedHash, Kt as deviceWakeRequest, Li as encodeControl, Ln as EDIT_BUFFER_MS, Lr as shownTime, Lt as pinIsNewer, Mi as formatLocalTarget, Mn as fileMessageText, Mt as typingActivity, N as groupFileFallback, Na as appFingerprint, Ni as parseLocalTarget, Nn as parseVoiceMeta, Nr as arrivalKey, Nt as GROUP_PIN_FRAME, O as GROUP_FILE_LIMITS, Oi as WATCH_PEER_MS, Or as sameButtonText, Pa as appRef, Pi as webLocalFetch, Pr as claimedTime, Pt as PIN_LIMITS, Q as COMMUNITY_TOPOLOGY, Qa as parseImageMeta, Qi as LEGACY_SERVICES, Qn as queueReaction, Qr as signCommit, Qt as checkPushEndpoint, Ra as isAppHash, Rn as EDIT_RATE_WINDOW_MS, Rr as GROUP_ADMIN_OFF_ERROR, Rt as pinNumberHolds, S as LIVENESS_PING_MS, Sa as appViewOf, Sn as DHT_FILE_CAPABILITY, St as STATUS_IDLE_AFTER_MS, T as pairedEditFits, Tn as sanitizeFileName, Ua as readAppRevocationShape, Un as validEditNumber, Ur as OWN_FRAME_LIMIT, Ut as WAKE_ONLINE_DELAY_MS, Va as isAppRef, Vi as RTC_CONFIG, Vn as RateWindow, Vt as WAKE_INTERVAL_MS, W as groupSignalFrame, Wn as validRemovalNumber, Wr as SAID_AGAIN, X as meshRendezvous, Xi as emptyLinkRecords, Xn as ReactionWindow, Xr as rosterAdmin, Xt as wakeFrame, Y as meshHubs, Yn as REACTION_LIMITS, Yr as rememberAlone, Yt as relayRequest, Z as pickMeshHubs, Zi as HTTP_SERVICE_PROTO, Zn as nextReactionNumber, Zr as rosterHas, Zt as wakeRequest, _ as signGroupMeta, _a as seenEntry, _i as RATCHET_CAPABILITY, _o as deviceEchoNonce, a as groupMetaChange, aa as contactDay, ai as confirmationTag, an as APPS_CAPABILITY, ao as OwnInviteError, ar as groupReplyAuthor, at as lobbyRecords, b as GhostLink, bi as ratchetSessionOf, bo as devicePingFrame, bt as transferStalled, c as groupMetaTag, ca as knockSlotOf, ci as encryptText, cn as STATUS_CARD_CAPABILITY, co as encodeInviteCode, cr as replySnippet, ct as newerHead, d as keepPastGroupMeta, da as makeStampPaced, di as newEpochSecret, dn as DHT_TEXT_CAPABILITY, dt as readBeacon, ea as serviceIdFromName, ei as verifyChain, en as APP_RANGE_LIMITS, eo as canonicalJson, er as reactionIsNewer, et as beaconRecords, f as nextGroupMetaRevision, fa as mergeContactKnocks, fn as capsDescriptors, fo as pastedAgain, ft as readBeaconHead, g as parseGroupMetaTag, ga as requestRecords, gi as sha256Hex, gn as validExternalKey, go as deviceEchoFrame, gt as FILE_LIMITS, h as parseGroupMetaFrame, ha as readLinkRecord, hi as sealSecret, hn as emptyProofLedger, ho as HANDOFF_CAPABILITY, ht as ChatFiles, i as groupMetaBody, ia as contactAskerHolds, ii as confirmationMatches, in as isAppVersion, io as INVITE_MAX_LENGTH, ir as REPLY_LIMITS, it as lobbyKeys, jr as withoutAppLink, k as GROUP_HAVE_FRAME, ka as readAppBundleAsync, ki as presenceSeenAt, kt as TypingReceiver, l as groupMetaToHand, la as knockSlotRecords, li as epochKeys, ln as UPGRADE_CAPABILITY, lo as inviteLink, lr as wireReply, lt as pickHubs, m as parseGroupMetaBody, ma as readKnockSlot, mn as PeerProofs, mo as ENROLL_CAPABILITY, mt as shouldBeHub, na as REQUEST_LIFETIME_MS, ni as verifyCommitSignature, no as readCanonicalJson, nr as validReactionNumber, nt as freshHubs, o as groupMetaNewer, oa as knockHolds, oi as decryptText, on as BUTTONS_CAPABILITY, oo as createChatInvite, or as pairedReplyAuthor, ot as mergeBeacon, p as openGroupMeta, pa as openRequest, pi as openSecret, pn as dialDescriptors, po as DEVICES_CAPABILITY, pt as readLobby, q as NO_HUB_POLICY, qn as COMMUNITY_REACTION_FRAME, qr as expectedRoster, qt as newWakeToken, r as groupDisplayName, ra as contactAskerFrame, ri as GROUP_PROFILE, rn as chatAppId, ro as INVITE_HRP, rr as wireReaction, rt as hubRank, s as groupMetaPicture, sa as knockSlotIdentity, si as edgeParams, sn as EDIT_CAPABILITY, so as decodeInviteCode, sr as readReply, st as mergeLobby, t as encodeGroupMetaBody, ta as ContactRequestError, ti as verifyCommit, tn as isServeId, to as canonicalJsonBytes, tr as readReaction, tt as doorHubs, u as groupName, ua as linkRecords, un as CapsExchange, uo as inviteOwnership, ur as BUTTON_ID, ut as rankHubs, v as verifyGroupMetaSignature, va as APP_BUNDLE_LIMITS, vi as RatchetBox, vo as deviceKeyZ32, vr as STATUS_CARD_LIMITS, vt as sentWhole, w as PAIRED_FRAME_TOO_LARGE, wi as DHT_POLL_INTERVALS, wn as formatFileSize, wt as personStatus, x as INVITE_TAKEN, xa as appDigest, xi as DirectPathWatch, xn as peekDhtMailbox, xo as newDeviceSetSecret, y as wrapGroupMeta, ya as APP_BUNDLE_MAGIC, yi as emptyRatchetState, yn as DHT_MESSAGE_TTL, yo as deviceLinkPairing, yt as transferEnded, z as CarriedTransport, za as isAppKey, zn as MAX_REMOVAL_NUMBER, zr as GROUP_ID, zt as readPin } from "./groupMeta-DHJxOu0K.js";
2
+ import { _ as receivedIdentityStatus, d as emptyIdentityLedger, y as lastSharedWithMe } from "./identityProofs-C0rIGT6y.js";
3
+ import { _ as openDb, a as GROUP_LIGHT_RANGE, b as transact, c as clearProfileStores, d as deleteDatabase, f as errorLine, h as groupLiveKey, i as FILE_INDEX, l as committed, m as groupLightKey, n as APP_STORAGE_SCOPE_INDEX, o as GROUP_LIVE_RANGE, p as fileStore, r as CARD_INDEX, s as STORES$1, t as APP_STORAGE_CHAT_INDEX, u as databaseName, v as profileOpenFailure, x as wrap, y as store } from "./idb-CmIR_bxg.js";
4
+ import { c as fileSpace, f as FILE_BYTES_STEP, o as fileBytes, r as blobDigest, s as fileBytesOf, u as removeFileBytes } from "./fileBytes-B2jXQI8e.js";
5
+ import { a as sealSeed, c as openRow, d as sealRow, g as whenDataKeyDropped, h as sealSecret$1, i as newDeviceKey, l as openRows, m as openSecret$1, o as unsealSeed, r as intentRepository, s as RowSeals } from "./networkReason-C6LYbjF2.js";
6
+ import { $ as cardsKey, $t as validEditText, A as assertConfirmedReal, At as COMMUNITY_LIMITS, B as copyForForward, Bt as encodeGroupEntryLink, C as pairedWireReply, Ct as WrongNetworkError, D as paymentAlias, Dt as requireTurn, E as replyTo, Et as refuseAway, F as paymentNetworksOf, Ft as encodeCommunityLink, G as removeStored, Gt as readKnocks, H as forwardKind, Ht as knockIdentity, I as walletInstances, It as memberAdmissions, Jt as GROUP_EDIT_FRAME, K as storedSize, Kt as CatchUpAnswers, Lt as routedCommunityFrame, M as createTiming, Mt as GROUP_READ_NOTE_COMMUNITY, N as crossNetwork, Nt as communityHasFrame, O as paymentWireId, Ot as setAwayWallets, P as paymentNetwork, Pt as decodeCommunityLink, Q as LightningCards, Qt as parseCommunityEdit, R as WALLET_TYPES, S as groupReply, St as ModeGate, T as replyRef, Tt as awayFrom, U as FileAppender, Ut as knockRecords, V as forwardError, Vt as entryParams, W as readStored$2, Wt as mergeKnocks, X as IdentityProofs, Xt as carryMentions, Yt as GROUP_EDIT_TEXT_BYTES, Z as CASHU_CARD, Zt as meshMessageRef, _ as GroupFileDesk, _t as breezDatabasesFor, a as CashuWallet, at as INVOICE_PACE, b as groupOfFile, bt as relayOnlyProblem, c as assertAmount, ct as CASHU_MINT_SOURCE, d as groupPayLineId, dt as CashuAdapter, en as MENTION_LIMITS, et as BREEZ_SOURCE, ft as swapSettledAt, g as parsePayLink, gt as breezDatabaseInUse, h as pairLinkId, ht as openBreez, i as onPublicIrohRelay, it as lightningPaying, j as createFailure, jt as CommunitySession, k as WALLET_NAMES, kt as setSingleWriterGate, l as normalizeMintUrl, lt as cashuMint, m as groupLinkId, mt as loadBreezSdk, n as createIrohWebEndpoint, nn as validMentions, nt as normalizePhrase, o as SwapUnsettledError, ot as ProviderSources, pt as forgetBreez, q as streamStored, r as irohRelayProblem, rn as wireMentions, rt as journaledPayment, st as sourceKey, t as DEFAULT_IROH_RELAYS, tn as mentionsMember, tt as breez, ut as AskBackoff, v as groupFileId, vt as iceServerProblem, w as receivedPairedReply, wt as networkLabel, x as storedGroupFiles, xt as ModeChanged, y as groupFileText, yt as iceServerSetting, z as FORWARD_MESSAGE_GONE, zt as decodeGroupEntryLink } from "./irohWeb-BXgunUhu.js";
7
7
  import { C as cashuRequestPayload, D as parseCashuRequestPayload, E as isFederationId, O as parseFedimintRequestPayload, S as ENDPOINT, T as findEndpoint, _ as SPARK_NETWORKS, a as SEPOLIA_TEST_USDT, b as sparkInvoiceDetails, c as USDT_PUBLIC_RPC, d as assertTokenUnits, f as assertWholeSats, g as walletNetworkOf, h as validatePaymentTarget, i as PaymentPreflightError, l as WALLET_NETWORKS, n as EVM_TEST_CHAINS, p as formatPaymentAmount, r as ONCHAIN_PROVIDER, s as TEST_USDT_FAUCET_AMOUNT, t as ETHEREUM_USDT, u as arkAddressPrefix, v as SPARK_PROVIDER, w as fedimintRequestPayload, x as isBitcoinAddress, y as sparkAddressKind } from "./paymentIntent-Cr3uZa_0.js";
8
8
  import { a as decodeBolt11, t as nwc } from "./nwcProvider-pL2XqSbW.js";
9
9
  import { a as parseEngineError, i as engineText, r as engineError, t as EngineError } from "./engineErrors-wWlLy54D.js";
10
10
  import { r as loadFedimintSdk, t as fedimintDatabase } from "./fedimintSdk-eLXBrj9i.js";
11
11
  import { i as SourceUnreachableError, n as PROVIDER_PLATFORMS, o as isNothingSpentError, r as SourceConfigError, t as NothingSpentError, u as redact } from "./types-CdWwgvyt.js";
12
- import { a as registeredLightningProviders, b as isPubkyKey, c as boundedIdentityFetch, d as testSwitch, g as encodeDidDhtPacket, h as encodeDidDhtDeactivated, m as didDhtFromPublicKey, n as setOwnDidSource, o as registeredOnchainProviders, p as didDhtDocument, r as onAdaptersChanged, s as reserveAdapterIds, u as testBuild, v as signDidDhtPacket } from "./ownDid-CwxFBzOH.js";
12
+ import { a as registeredLightningProviders, b as isPubkyKey, c as boundedIdentityFetch, d as testSwitch, g as encodeDidDhtPacket, h as encodeDidDhtDeactivated, m as didDhtFromPublicKey, n as setOwnDidSource, o as registeredOnchainProviders, p as didDhtDocument, r as onAdaptersChanged, s as reserveAdapterIds, u as testBuild, v as signDidDhtPacket } from "./ownDid-Dg-8e_hs.js";
13
+ import { c as normalizeRelayUrl, d as traceLink, g as withRequestOptions, i as RelayTransport, m as isDiscoveryBudgetError, p as budgetRetryMs, s as currentRelays, t as DEFAULT_RELAYS } from "./relay-NT5bf1WA.js";
13
14
  import { S as verify, _ as identityFromSeed, a as createRelayPayload, c as openRelayPayload, d as signRelayPayload, f as decodeDnsAnswers, g as createIdentity, m as encodeTxtPacket, p as decodeTxtPacket, r as PacketTooLargeError, v as identityFromSeedB64, x as sign, y as publicKeyFromZ32 } from "./pkarr-BQo4PcCg.js";
14
- import { c as normalizeRelayUrl, d as traceLink, g as withRequestOptions, i as RelayTransport, m as isDiscoveryBudgetError, p as budgetRetryMs, s as currentRelays, t as DEFAULT_RELAYS } from "./relay-gJTOYQJZ.js";
15
15
  import { a as stripHidden, i as sanitizeNick, n as hasVisible, r as sanitizeDisplayText, s as unwrapPasted, t as dropLoneJoiners } from "./text-li76pThX.js";
16
16
  import { a as fromZ32, d as utf8Decode, f as utf8Encode, i as fromBase64Url, l as toBase64Url, n as concatBytes$1, o as isZ32Key, s as randomBytes, t as bytesEqual, u as toZ32 } from "./bytes-C1DNGY18.js";
17
17
  import { _ as HoldKeys, b as newMailbox, g as HOLD_LIMITS, h as HOLD_DATED_BACK_MS, i as automaticTransport, m as HOLD_CAPABILITY, r as TRANSPORTS, v as HoldRefusedError, w as generateEncryptionKey, x as readManifest, y as isHoldUrl } from "./pairedTransports-DAzupLYo.js";
18
18
  import { a as parseLinkPreview, s as sanitizeAvatar } from "./linkPreview-5kHmKUTN.js";
19
- import { C as isAtprotoDid, d as chosenResolver, h as setPkarrRelaySource, r as resolveAtprotoDid, t as assertPublicServer, w as normalizeAtprotoHandle } from "./resolve-BqmGXKn4.js";
20
- import { S as webCryptoSigner, a as besideUrl, c as isGitHubPage, d as appStoreDecision, f as appUpdateDecision, h as APP_STORE_LIMITS, i as appPasteUrl, l as addedAppPermissions, m as planAppUpdate, n as APP_FETCH_LIMITS, o as boundedAppFetch, p as checkAppBeforeRun, r as AppFetchError, s as isAppFetchUrl, u as appRevocationFor, v as readAppStoreSteps, x as seedSigner } from "./appFetch-BQO5Pk7W.js";
19
+ import { C as isAtprotoDid, d as chosenResolver, h as setPkarrRelaySource, r as resolveAtprotoDid, t as assertPublicServer, w as normalizeAtprotoHandle } from "./resolve-DUmE70Eo.js";
20
+ import { S as webCryptoSigner, a as besideUrl, c as isGitHubPage, d as appStoreDecision, f as appUpdateDecision, h as APP_STORE_LIMITS, i as appPasteUrl, l as addedAppPermissions, m as planAppUpdate, n as APP_FETCH_LIMITS, o as boundedAppFetch, p as checkAppBeforeRun, r as AppFetchError, s as isAppFetchUrl, u as appRevocationFor, v as readAppStoreSteps, x as seedSigner } from "./appFetch-D89FnCxr.js";
21
21
  import { l as isWorthlessMint, n as DEFAULT_MINTS, r as TEST_MINT, u as mintNetwork } from "./mints-CMDLbMeH.js";
22
22
  import { n as traceJoin } from "./joinTrace-xKBe73j9.js";
23
23
  import { n as MAX_BACKUP_BYTES, t as BACKUP_MEDIA_TYPE } from "./envelope-Bi2kMqbp.js";
@@ -5380,7 +5380,7 @@ var bitcoindRpc = {
5380
5380
  if (!user || !password) throw new Error("Enter the RPC user and password, or paste the .cookie file");
5381
5381
  },
5382
5382
  async create(settings, host) {
5383
- const { BitcoindOnchain, tauriTransport } = await import("./bitcoind-BXZdQ1wZ.js");
5383
+ const { BitcoindOnchain, tauriTransport } = await import("./bitcoind-CK1QEUHn.js");
5384
5384
  return BitcoindOnchain.connect({
5385
5385
  url: settings.config.url.trim(),
5386
5386
  wallet: settings.config.wallet?.trim() ?? "",
@@ -6005,7 +6005,7 @@ function viewNews(before, after) {
6005
6005
  }
6006
6006
  // ../browser/src/engine/paymentAdapters/usdtWallet.ts
6007
6007
  /** The Ethereum libraries, a large part of the app: loaded once a USDT wallet is made, opened or restored, not with the engine. */
6008
- var loadUsdt = () => import("./usdt-DLmtf8F9.js");
6008
+ var loadUsdt = () => import("./usdt-BkO4SY07.js");
6009
6009
  /** Every new profile starts with this wallet: an address to receive on, nothing to set up. */
6010
6010
  var DEFAULT_USDT = {
6011
6011
  network: "ethereum",
@@ -14581,7 +14581,7 @@ var HostNotContacted = class extends Error {};
14581
14581
  */
14582
14582
  function fixedHostsFetch(fetch) {
14583
14583
  return async (url, options) => {
14584
- const { fixedIdentityHosts } = await import("./fixedHosts-BJFL8Ell.js");
14584
+ const { fixedIdentityHosts } = await import("./fixedHosts-CrO01M_y.js");
14585
14585
  const host = hostOf$1(url);
14586
14586
  if (!fixedIdentityHosts().has(host) && host !== hostOf$1("https://public.api.bsky.app") && host !== hostOf$1("https://nexus.pubky.app")) throw new HostNotContacted(`Hide my IP from contacts is on: ${host}, a server your contact chose, was not contacted`);
14587
14587
  return fetch(url, options);
@@ -16205,6 +16205,12 @@ var APP_CHECK_TIMINGS = {
16205
16205
  everyMs: 864e5,
16206
16206
  /** A check the network was off for, or whose read of the installed apps failed, is tried again this soon, not a day later. */
16207
16207
  offlineRetryMs: 6e5,
16208
+ /**
16209
+ * A check that ran while no publisher's file could be reached (the device without a network though Ghostly's is on,
16210
+ * the host down or rate-limiting) is tried again after `offlineRetryMs`, then twice as long each time it fails again,
16211
+ * up to this.
16212
+ */
16213
+ unreachedRetryMaxMs: 72e5,
16208
16214
  /** A check at start is skipped when every app was checked this recently (a page reloaded several times). */
16209
16215
  freshMs: 36e5
16210
16216
  };
@@ -16711,6 +16717,8 @@ var Apps = class {
16711
16717
  /** Drops `previewed` past `STAGED.ms`: an index is up to 4 MiB, and a closed Add screen sends no call. */
16712
16718
  previewedSweep = null;
16713
16719
  checking = null;
16720
+ /** Checks in a row in which an app's publisher's files could not be reached at all (`checkApp`); 0 after one that reached them all. */
16721
+ unreachedChecks = 0;
16714
16722
  /**
16715
16723
  * Runs the person started with Run anyway (`<ref> <digest>`): a removal does not cut them off. Only that run's: dropped
16716
16724
  * when the version starts without it, when a call finds it no longer removed, and at Uninstall.
@@ -16862,7 +16870,9 @@ var Apps = class {
16862
16870
  }
16863
16871
  const fresh = atStart && apps.length > 0 && apps.every((a) => this.checkedWithin(a.checkedAt, APP_CHECK_TIMINGS.freshMs));
16864
16872
  if (apps.length && !fresh) await this.checkUpdates().catch(() => {});
16865
- if (!this.stopped) this.schedule(APP_CHECK_TIMINGS.everyMs);
16873
+ const unreached = apps.length && !fresh ? this.unreachedChecks : 0;
16874
+ const next = unreached ? Math.min(APP_CHECK_TIMINGS.offlineRetryMs * 2 ** (unreached - 1), APP_CHECK_TIMINGS.unreachedRetryMaxMs) : APP_CHECK_TIMINGS.everyMs;
16875
+ if (!this.stopped) this.schedule(next);
16866
16876
  })();
16867
16877
  }, ms);
16868
16878
  }
@@ -17483,8 +17493,10 @@ var Apps = class {
17483
17493
  /**
17484
17494
  * The revocations its publisher signed, read beside each URL (`ghostly-revoke.json`); none there is not an error.
17485
17495
  * `read` holds the files already read, which are skipped, and gets the ones read now. Null when no file answered now.
17496
+ * `reach`, when given, learns whether a host answered (a file, or none there) and whether a read failed for a reason
17497
+ * that may pass (offline, the host not reached or too slow, its own trouble).
17486
17498
  */
17487
- async readRevocations(ref, urls, read = /* @__PURE__ */ new Set()) {
17499
+ async readRevocations(ref, urls, read = /* @__PURE__ */ new Set(), reach) {
17488
17500
  let out = null;
17489
17501
  for (const url of new Set(urls.filter(isAppFetchUrl).map((u) => besideUrl(u, "ghostly-revoke.json")))) {
17490
17502
  if (read.has(url)) continue;
@@ -17495,7 +17507,13 @@ var Apps = class {
17495
17507
  revalidate: true
17496
17508
  }));
17497
17509
  if (file) (out ??= []).push(...file);
17498
- } catch {}
17510
+ if (reach) reach.answered = true;
17511
+ } catch (error) {
17512
+ if (reach) {
17513
+ if (passing(error)) reach.failed = true;
17514
+ else reach.answered = true;
17515
+ }
17516
+ }
17499
17517
  }
17500
17518
  return out;
17501
17519
  }
@@ -18256,6 +18274,7 @@ var Apps = class {
18256
18274
  this.listingsRead = read;
18257
18275
  try {
18258
18276
  const out = (await Promise.all(pooled(apps, APP_CHECK_PARALLEL, (app) => this.checkApp(app, stores).catch(() => null)))).filter((r) => r !== null);
18277
+ this.unreachedChecks = out.some((r) => r.unreached) ? this.unreachedChecks + 1 : 0;
18259
18278
  for (const missed of this.listingMisses.keys()) if (!read.has(missed)) this.listingMisses.delete(missed);
18260
18279
  const kept = out.length ? await this.keptValue() : null;
18261
18280
  return await Promise.all(out.map(async ({ app, outcome }) => ({
@@ -18268,7 +18287,10 @@ var Apps = class {
18268
18287
  this.listingsRead = null;
18269
18288
  }
18270
18289
  }
18271
- /** One app's part of the update check (`checkNow`): its record as written; null when it is not installed any more. */
18290
+ /**
18291
+ * One app's part of the update check (`checkNow`): its record as written; null when it is not installed any more.
18292
+ * `unreached` when none of its publisher's files answered, every read failing for a reason that may pass.
18293
+ */
18272
18294
  async checkApp(listed, stores) {
18273
18295
  if (!await this.hasBundle(listed.bytes, listed.digest, listed.manifest)) await this.fetchFiles({ ref: listed.ref }).catch(() => {});
18274
18296
  const first = await this.app(listed.ref);
@@ -18323,7 +18345,11 @@ var Apps = class {
18323
18345
  } catch {}
18324
18346
  }
18325
18347
  const revokeRead = /* @__PURE__ */ new Set();
18326
- const before = await this.readRevocations(app.ref, [app.from, ...app.manifest.sources ?? []], revokeRead);
18348
+ const reach = {
18349
+ answered: false,
18350
+ failed: false
18351
+ };
18352
+ const before = await this.readRevocations(app.ref, [app.from, ...app.manifest.sources ?? []], revokeRead, reach);
18327
18353
  app = withRevocations(app, before ?? []);
18328
18354
  const kept = await this.keptRevocationsOf(app.ref);
18329
18355
  const judge = (version) => this.runStatus(version, this.storeViews(stores), [...app.revocations ?? [], ...kept]);
@@ -18461,7 +18487,7 @@ var Apps = class {
18461
18487
  }
18462
18488
  break;
18463
18489
  }
18464
- const after = await this.readRevocations(app.ref, [app.from, ...app.manifest.sources ?? []], revokeRead);
18490
+ const after = await this.readRevocations(app.ref, [app.from, ...app.manifest.sources ?? []], revokeRead, reach);
18465
18491
  const revocations = before || after ? [...before ?? [], ...after ?? []] : null;
18466
18492
  const versions = this.versionsOf(app);
18467
18493
  const stays = revocations ? stopping(versions, app.revocations ?? []) : app.revocations ?? [];
@@ -18476,17 +18502,19 @@ var Apps = class {
18476
18502
  const { store: _s, ...unpinned } = app;
18477
18503
  app = unpinned;
18478
18504
  }
18505
+ const unreached = reach.failed && !reach.answered;
18479
18506
  app = {
18480
18507
  ...app,
18481
18508
  ...merged.size && { revocations: [...merged.values()] },
18482
- checkedAt: this.now()
18509
+ ...!unreached && { checkedAt: this.now() }
18483
18510
  };
18484
- const put = this.checkedWithin(stored.checkedAt, APP_CHECK_TIMINGS.freshMs / 2) && sameExceptChecked(app, stored) ? sameRecord(current, stored) : await this.putAppIfUnchanged(app, stored);
18511
+ const put = sameExceptChecked(app, stored) && (unreached || this.checkedWithin(stored.checkedAt, APP_CHECK_TIMINGS.freshMs / 2)) ? sameRecord(current, stored) : await this.putAppIfUnchanged(app, stored);
18485
18512
  for (const files of [...dropped, ...!put && wrote ? [wrote] : []]) await this.removeUnusedBundle(app.ref, files.bytes, files.digest);
18486
18513
  if (!put) return null;
18487
18514
  return {
18488
18515
  app,
18489
- outcome
18516
+ outcome,
18517
+ ...unreached && { unreached: true }
18490
18518
  };
18491
18519
  }
18492
18520
  /**
@@ -22862,6 +22890,8 @@ function verifierStands(record, latest) {
22862
22890
  const stated = turnStatedVerifier(latest.instance);
22863
22891
  return !stated || bytesEqual(stated, turnVerifierMark(record.verifier));
22864
22892
  }
22893
+ /** Whether the record names a pull's staging namespace apart from the profile's own (`handoff.ts`, `dropStaging`). */
22894
+ var staged = (record) => record.handoff?.role === "taking" && !!record.handoff.staging && record.handoff.staging !== record.profile;
22865
22895
  /** A name as it is seen and typed: nobody types a joiner, a variation selector or a filler, which draw nothing. */
22866
22896
  var typedName = (name) => name.normalize("NFC").replace(/\p{Default_Ignorable_Code_Point}/gu, "").trim().toLocaleLowerCase();
22867
22897
  var sameName = (a, b) => typedName(a) === typedName(b);
@@ -22909,6 +22939,11 @@ async function forceTakeover(ports, request) {
22909
22939
  });
22910
22940
  const keeper = await ports.keeper();
22911
22941
  if (!keeper) throw new TakeoverRefusal("offline", "Go online to take over.");
22942
+ if (staged(record)) {
22943
+ await ports.dropStaging?.().catch(() => {});
22944
+ const now = await ports.read();
22945
+ if (!now || staged(now)) throw new TakeoverRefusal("state", "A move to this device is still being undone. Try again.");
22946
+ }
22912
22947
  const outcome = await keeper.raise({ before: (latest) => {
22913
22948
  if (!verifierStands(record, latest)) throw new TakeoverRefusal("changed", `The lock password was changed${target ? ` on ${target}` : ""}. Use here moves the profile with the new one.`);
22914
22949
  } });
@@ -24527,7 +24562,10 @@ var DeviceLinks = class {
24527
24562
  read: () => (this.options.readRecord ?? readDeviceRecord)(this.options.profile),
24528
24563
  amend: (patch) => amendDevice(this.options.profile, patch),
24529
24564
  proves: (verifier, password) => provesHandoffPassword(verifier, password),
24530
- keeper: () => this.turnKeeper()
24565
+ keeper: () => this.turnKeeper(),
24566
+ dropStaging: async () => {
24567
+ await this.handoff?.dropStaging?.();
24568
+ }
24531
24569
  }, {
24532
24570
  password: typeof p.password === "string" ? p.password : "",
24533
24571
  name: typeof p.name === "string" ? p.name : ""
@@ -27089,6 +27127,7 @@ var FileDesk = class {
27089
27127
  wire: fileWire("files/3", file.size)
27090
27128
  }
27091
27129
  });
27130
+ if (this.deps.deleted(linkId, `peer_${record.id}`)) this.deletedMeanwhile(linkId, id);
27092
27131
  }).catch((error) => this.unkept(linkId, chat, record.id, id, error, said));
27093
27132
  }
27094
27133
  if (record.direction === "in" && !chat.local.has(record.id)) {
@@ -27192,7 +27231,7 @@ var FileDesk = class {
27192
27231
  chat.files.refuse(wireId, error?.name === "QuotaExceededError" ? "no-room" : "invalid");
27193
27232
  this.deps.changed();
27194
27233
  }
27195
- /** A new offer whose message was deleted before its row was kept: forgotten as a deleted message's file is. */
27234
+ /** An offer whose message was deleted before its row was kept: forgotten as a deleted message's file is. */
27196
27235
  deletedMeanwhile(linkId, id) {
27197
27236
  this.forget(linkId, id);
27198
27237
  this.deps.transfers.delete(id);
@@ -41277,6 +41316,61 @@ var TransportLog = class {
41277
41316
  return entry;
41278
41317
  }
41279
41318
  };
41319
+ // ../browser/src/engine/resumeTurns.ts
41320
+ /**
41321
+ * The chats live when this app last ran, back after a restart a few at a time (`RESUMES_AT_ONCE` in node.ts), the most
41322
+ * recently live first; the next starts as soon as one is done: live again, its contact found away, or its resume
41323
+ * window over (`RESUME_SPENT_MS`). Started all at once, every chat read its contact and offered or answered in the
41324
+ * same second, the relays' per-minute budget was spread over all of them, and few got through a whole offer/answer
41325
+ * round: a daemon whose 50 contacts were all online had 13 to 30 of them back after 3 to 4.5 min, most chats' resumes
41326
+ * spent before they finished. A chat someone wants now (opened, written to) starts at once, ahead of the line. A chat
41327
+ * waiting its turn has not started: it reads as offline until then, as a chat does before its link starts.
41328
+ */
41329
+ var ResumeTurns = class {
41330
+ atOnce;
41331
+ begin;
41332
+ /** The chats resuming now. */
41333
+ running = /* @__PURE__ */ new Set();
41334
+ /** The chats waiting for a turn, first in line first. */
41335
+ line = [];
41336
+ /** `begin`: starts the chat's link; false when it did not start (gone, started already, offline). */
41337
+ constructor(atOnce, begin) {
41338
+ this.atOnce = atOnce;
41339
+ this.begin = begin;
41340
+ }
41341
+ /** Starts the chat now if a turn is free, or puts it at the end of the line. */
41342
+ add(linkId) {
41343
+ if (this.running.has(linkId) || this.line.includes(linkId)) return;
41344
+ this.line.push(linkId);
41345
+ this.next();
41346
+ }
41347
+ /** The chat is done resuming (live, its contact away, its window over, gone): its turn goes to the next in line. */
41348
+ finished(linkId) {
41349
+ const at = this.line.indexOf(linkId);
41350
+ if (at >= 0) this.line.splice(at, 1);
41351
+ if (this.running.delete(linkId)) this.next();
41352
+ }
41353
+ /** Someone wants the chat now: if it waits in line, it starts at once, past the turns. */
41354
+ now(linkId) {
41355
+ const at = this.line.indexOf(linkId);
41356
+ if (at < 0) return;
41357
+ this.line.splice(at, 1);
41358
+ this.running.add(linkId);
41359
+ if (!this.begin(linkId)) this.running.delete(linkId);
41360
+ }
41361
+ /** Nothing waits any more (the network went off, the app stops): links started later queue anew. */
41362
+ clear() {
41363
+ this.running.clear();
41364
+ this.line.length = 0;
41365
+ }
41366
+ next() {
41367
+ while (this.running.size < this.atOnce && this.line.length) {
41368
+ const linkId = this.line.shift();
41369
+ this.running.add(linkId);
41370
+ if (!this.begin(linkId)) this.running.delete(linkId);
41371
+ }
41372
+ }
41373
+ };
41280
41374
  // ../browser/src/backup/database.ts
41281
41375
  /** Whether a database of this name exists; opening one that does not would create it. */
41282
41376
  async function databaseExists(name) {
@@ -45481,6 +45575,14 @@ var SPARE_INVITE_WARM_AFTER_TAKE_MS = 3e4;
45481
45575
  var STARTUP_QUIET_MS = 15e3;
45482
45576
  /** At start, how long links start in one task before the page gets the thread back (`startNow`). */
45483
45577
  var START_SLICE_MS = 10;
45578
+ /**
45579
+ * How many chats live when this app last ran resume at once (`ResumeTurns`): the relays' per-minute budget
45580
+ * (`REQUESTS_PER_MINUTE`) over the requests an offer/answer round costs a chat (a read, an offer or answer, a read for
45581
+ * the answer: 3). All 50 of a daemon's chats at once, none got through a round in the first minute; 10 at a time get
45582
+ * through it in seconds, and the line moves on. More at once can spend the minute again: 12 at a time had 7 of 50
45583
+ * back after 5 min in one run of two, against 40 at 10 (engine test, one relay).
45584
+ */
45585
+ var RESUMES_AT_ONCE = Math.floor(10);
45484
45586
  /** How long the wallets' changes gather into one view of them (`walletChanged`). */
45485
45587
  var WALLET_CHANGE_MS = 50;
45486
45588
  /** How often the shared services' request counts may send a state while contacts use them (`hostedService`). */
@@ -47978,6 +48080,7 @@ var GhostlyNode = class GhostlyNode {
47978
48080
  if (this.activeSlotRetry) clearTimeout(this.activeSlotRetry);
47979
48081
  for (const timer of this.resumeTimers.values()) clearTimeout(timer);
47980
48082
  this.resumeTimers.clear();
48083
+ this.resumeLine?.clear();
47981
48084
  if (this.paymentTimer) clearTimeout(this.paymentTimer);
47982
48085
  clearTimeout(this.awaitingTimer);
47983
48086
  clearTimeout(this.walletChangeTimer);
@@ -49319,6 +49422,7 @@ var GhostlyNode = class GhostlyNode {
49319
49422
  const filesEnded = this.fileDesk.drop(linkId);
49320
49423
  this.links.delete(linkId);
49321
49424
  this.removedChats.set(linkId, (this.removedChats.get(linkId) ?? 0) + 1);
49425
+ this.resumeLine?.finished(linkId);
49322
49426
  this.newestAt.delete(linkId);
49323
49427
  this.clockLeads.delete(linkId);
49324
49428
  this.placedAt.delete(linkId);
@@ -49365,6 +49469,7 @@ var GhostlyNode = class GhostlyNode {
49365
49469
  const groupId = linkId?.startsWith("group:") ? linkId.slice(6) : void 0;
49366
49470
  const chat = groupId === void 0 ? linkId : null;
49367
49471
  if (groupId !== void 0) this.groupOnScreen(groupId);
49472
+ if (chat) this.resumeTurns.now(chat);
49368
49473
  if (chat) this.ensureNativeEndpoints(chat);
49369
49474
  if (chat && this.settings.nostr?.autoLoadProfiles) this.nostrSocial.ledgerChanged(chat).catch(() => {});
49370
49475
  if (chat) this.hold.wake(chat);
@@ -50767,6 +50872,7 @@ var GhostlyNode = class GhostlyNode {
50767
50872
  ...forwarded && { forwarded }
50768
50873
  };
50769
50874
  const wire = reply && pairedWireReply(reply);
50875
+ this.resumeTurns.now(linkId);
50770
50876
  const live = this.linksAdding.has(linkId) ? await this.linkWhenAdded(linkId) : this.links.get(linkId);
50771
50877
  const fail = (error) => {
50772
50878
  const transfer = {
@@ -51700,6 +51806,7 @@ var GhostlyNode = class GhostlyNode {
51700
51806
  this.emitState();
51701
51807
  }
51702
51808
  async connect({ linkId }) {
51809
+ this.resumeTurns.now(linkId);
51703
51810
  const link = this.links.get(linkId)?.link;
51704
51811
  if (!link) throw new Error("You are offline. Go online before reconnecting.");
51705
51812
  const live = this.links.get(linkId), native = this.ensureNativeEndpoints(linkId);
@@ -53998,6 +54105,7 @@ var GhostlyNode = class GhostlyNode {
53998
54105
  }
53999
54106
  if (wasOnline && !this.networkOn) {
54000
54107
  this.enrollment?.cancel("offline").catch(() => {});
54108
+ this.resumeLine?.clear();
54001
54109
  await Promise.allSettled([...this.links.values()].map(async (live) => {
54002
54110
  live.carried?.stop();
54003
54111
  await live.link?.stop(true);
@@ -54918,9 +55026,11 @@ var GhostlyNode = class GhostlyNode {
54918
55026
  * The chat by its id, once it has started if it is still being added: the app may send to it by that id (a message,
54919
55027
  * a file, a forward, a payment) right after a reload, and that send waits for the chat rather than say "You are
54920
55028
  * offline" for that moment. A chat not being added is returned at once, offline or not; one whose adding failed is gone.
55029
+ * One waiting for its turn to resume after a restart (`ResumeTurns`) starts now, ahead of the line.
54921
55030
  */
54922
55031
  async linkWhenAdded(linkId) {
54923
55032
  await this.linksAdding.get(linkId)?.catch(() => {});
55033
+ this.resumeTurns.now(linkId);
54924
55034
  return this.links.get(linkId);
54925
55035
  }
54926
55036
  addLink(params, inviteCode) {
@@ -55440,6 +55550,7 @@ var GhostlyNode = class GhostlyNode {
55440
55550
  * the next ones follow the setting. No goodbye: the contacts see the chat back in a moment.
55441
55551
  */
55442
55552
  async restartLinksForRelayOnly() {
55553
+ this.resumeLine?.clear();
55443
55554
  await Promise.allSettled([...this.links.values()].map(async (live) => {
55444
55555
  const link = live.link;
55445
55556
  live.carried?.stop();
@@ -55456,15 +55567,18 @@ var GhostlyNode = class GhostlyNode {
55456
55567
  * Starts these chats' and groups' links, the chats most recently live first (`nativeStartOrder`), in slices that let
55457
55568
  * the page go: each link derives its keys and seals its capability record as it starts, and 50 chats and 20 groups in
55458
55569
  * one task held the page for 575-762 ms at 4x CPU, right as the chat list appeared. A chat not started yet reads as
55459
- * offline until its turn. `started`: after each link started. Gone offline or shut down meanwhile: the links left
55460
- * start with the network, if ever.
55570
+ * offline until its turn. The chats live when this app last ran resume a few at a time, in that order
55571
+ * (`ResumeTurns`). `started`: after each link started or took its place in that line. Gone offline or shut down
55572
+ * meanwhile: the links left start with the network, if ever.
55461
55573
  */
55462
55574
  async startLinks(linkIds, started) {
55463
55575
  const pause = pacer(START_SLICE_MS);
55464
55576
  for (const linkId of this.nativeStartOrder(linkIds)) {
55465
55577
  if (!this.networkOn || this.shuttingDown) break;
55466
- if (!this.links.has(linkId)) continue;
55467
- this.startLink(linkId);
55578
+ const live = this.links.get(linkId);
55579
+ if (!live) continue;
55580
+ if (!live.link && !this.deferredChats.has(linkId) && this.resumesAtStart(live).resume) this.resumeTurns.add(linkId);
55581
+ else this.startLink(linkId);
55468
55582
  started?.(linkId);
55469
55583
  await pause();
55470
55584
  }
@@ -55504,7 +55618,7 @@ var GhostlyNode = class GhostlyNode {
55504
55618
  verifiedPeerKey: stored.peerTrust ? stored.peerTrust.verifiedKey : stored.pairedPeerKey,
55505
55619
  expectedPeerKey: stored.peerParticipationKeyZ32
55506
55620
  } : void 0;
55507
- const resumed = stored.pairedPeerKey && stored.deliveryMode !== "dht" ? resumeHere(this.transportLogOf(live), this.transportsHere(), stored.peerTransports ?? live.caps?.peer?.transports) : {};
55621
+ const resumed = this.resumesAtStart(live);
55508
55622
  let dhtShown;
55509
55623
  let dhtFlushed;
55510
55624
  let wasTaken = false;
@@ -55739,6 +55853,7 @@ var GhostlyNode = class GhostlyNode {
55739
55853
  interval: nextInMs || live.poll.interval
55740
55854
  };
55741
55855
  if (was && !polling) live.firstReadDone = true;
55856
+ if (was && !polling && !live.presence.online && this.transport.readAnsweredAt?.(stored.peerPubKeyZ32) !== void 0) this.resumeTurns.finished(linkId);
55742
55857
  if (linkId === this.activeLinkId || first && polling !== was) this.chatChanged(linkId);
55743
55858
  },
55744
55859
  onMessageReceipt: async (id) => {
@@ -55783,6 +55898,7 @@ var GhostlyNode = class GhostlyNode {
55783
55898
  live.dataLink = state;
55784
55899
  if (state === "open") {
55785
55900
  live.pairedAt = void 0;
55901
+ this.resumeTurns.finished(linkId);
55786
55902
  this.wakeLimiter.reset(linkId);
55787
55903
  this.desk.replay(linkId).catch(() => {}).then(() => this.sendWaiting(linkId)).catch(() => {});
55788
55904
  this.identities.ready(linkId);
@@ -56648,13 +56764,31 @@ var GhostlyNode = class GhostlyNode {
56648
56764
  if (before) clearTimeout(before);
56649
56765
  this.resumeTimers.set(linkId, setTimeout(() => {
56650
56766
  this.resumeTimers.delete(linkId);
56651
- const live = this.links.get(linkId), log = live && this.transportLogOf(live);
56652
- if (this.shuttingDown || !live || !log || live.link !== link) return;
56767
+ const live = this.links.get(linkId);
56768
+ if (!live || live.link !== link) return;
56769
+ this.resumeTurns.finished(linkId);
56770
+ const log = this.transportLogOf(live);
56771
+ if (this.shuttingDown || !log) return;
56653
56772
  if (!log.notBackAfterRestart(Date.now())) return;
56654
56773
  traceLink(live.myPubKeyZ32, "resume-spent", {});
56655
56774
  this.saveTransportLog(live, log);
56656
56775
  }, RESUME_SPENT_MS));
56657
56776
  }
56777
+ /** The chats back after a restart, resuming a few at a time (`RESUMES_AT_ONCE`). */
56778
+ resumeLine;
56779
+ get resumeTurns() {
56780
+ return this.resumeLine ??= new ResumeTurns(this.options.resumesAtOnce ?? RESUMES_AT_ONCE, (linkId) => {
56781
+ const live = this.links.get(linkId);
56782
+ if (!live || live.link || !this.networkOn || this.shuttingDown) return false;
56783
+ this.startLink(linkId);
56784
+ return !!live.link;
56785
+ });
56786
+ }
56787
+ /** A chat that resumes when it starts: it was live when this app last ran (`resumeHere`). */
56788
+ resumesAtStart(live) {
56789
+ const { stored } = live;
56790
+ return stored.pairedPeerKey && stored.deliveryMode !== "dht" && !stored.group ? resumeHere(this.transportLogOf(live), this.transportsHere(), stored.peerTransports ?? live.caps?.peer?.transports) : {};
56791
+ }
56658
56792
  /** The chat on screen found every native slot busy: it tries again in a moment, while it stays on screen. */
56659
56793
  activeSlotRetry = null;
56660
56794
  retryActiveSlot(linkId) {
@@ -57669,4 +57803,4 @@ function signalKind(signal) {
57669
57803
  }
57670
57804
  export { EngineServer, credentials as n, bitcoindRpc as t };
57671
57805
 
57672
- //# sourceMappingURL=server-e4oKeNez.js.map
57806
+ //# sourceMappingURL=server-WWlXICVB.js.map