@ghostlytools/cli 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/assets/{api-I_KbuXHa.js → api-BpQC8dAw.js} +68 -33
- package/dist/assets/api-BpQC8dAw.js.map +1 -0
- package/dist/assets/{api-Dj1yn0px.js → api-CttDF-S5.js} +2 -2
- package/dist/assets/{apiKit-C-_PWZvy.js → apiKit-CSMeHKgo.js} +2 -2
- package/dist/assets/{apiKit-C-_PWZvy.js.map → apiKit-CSMeHKgo.js.map} +1 -1
- package/dist/assets/{apps-DKIe8VjF.js → apps-DqTyZ40T.js} +2 -2
- package/dist/assets/{apps-DKIe8VjF.js.map → apps-DqTyZ40T.js.map} +1 -1
- package/dist/assets/{apps-DbEfL_3b.js → apps-DzFMdVt6.js} +1 -1
- package/dist/assets/{arkade-k1bdSm70.js → arkade-Cu3TbPxC.js} +2 -2
- package/dist/assets/{arkade-k1bdSm70.js.map → arkade-Cu3TbPxC.js.map} +1 -1
- package/dist/assets/{backup-Cdd6-HNu.js → backup-CLZOORFC.js} +1 -1
- package/dist/assets/{backup-beKfbfNk.js → backup-CyTZhu28.js} +4 -4
- package/dist/assets/{backup-beKfbfNk.js.map → backup-CyTZhu28.js.map} +1 -1
- package/dist/assets/{buttons-ClI13rdv.js → buttons-Bd9fR31r.js} +173 -20
- package/dist/assets/buttons-Bd9fR31r.js.map +1 -0
- package/dist/assets/buttons-c4CJnL6i.js +2 -0
- package/dist/assets/{envelope-B88yiCQj.js → envelope-CGfUsR1m.js} +2 -2
- package/dist/assets/{envelope-B88yiCQj.js.map → envelope-CGfUsR1m.js.map} +1 -1
- package/dist/assets/fixedHosts-BiukTsd9.js +24 -0
- package/dist/assets/fixedHosts-BiukTsd9.js.map +1 -0
- package/dist/assets/{ghostly_iroh_web-CO0onry8.js → ghostly_iroh_web-BzAXJUYH.js} +10 -10
- package/dist/assets/{ghostly_iroh_web-CO0onry8.js.map → ghostly_iroh_web-BzAXJUYH.js.map} +1 -1
- package/dist/assets/ghostly_iroh_web_bg.wasm +0 -0
- package/dist/assets/{groupFiles-DjQc5XXv.js → groupFiles-CeF9nPv9.js} +631 -12
- package/dist/assets/groupFiles-CeF9nPv9.js.map +1 -0
- package/dist/assets/{host-CNWGB3-j.js → host-CKAehWP6.js} +30 -18
- package/dist/assets/host-CKAehWP6.js.map +1 -0
- package/dist/assets/hyperdhtRelay-1wzya_0L.js +25 -0
- package/dist/assets/hyperdhtRelay-1wzya_0L.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-g7eXzf5h.js → hyperdhtRelay-B8Pdykhg.js} +15 -3
- package/dist/assets/hyperdhtRelay-B8Pdykhg.js.map +1 -0
- package/dist/assets/{irohWeb-Bx8dI4be.js → irohWeb-D6tAPHZa.js} +11 -7
- package/dist/assets/{irohWeb-Bx8dI4be.js.map → irohWeb-D6tAPHZa.js.map} +1 -1
- package/dist/assets/{main-BRxhBctJ.js → main-BDY-pfpz.js} +17 -17
- package/dist/assets/{main-BRxhBctJ.js.map → main-BDY-pfpz.js.map} +1 -1
- package/dist/assets/{mainline-CwuS6ngj.js → mainline-3ueXpFQL.js} +2 -2
- package/dist/assets/{mainline-CwuS6ngj.js.map → mainline-3ueXpFQL.js.map} +1 -1
- package/dist/assets/{networkReason-CIAMieQm.js → networkReason-DhJYOomu.js} +2 -2
- package/dist/assets/{networkReason-CIAMieQm.js.map → networkReason-DhJYOomu.js.map} +1 -1
- package/dist/assets/{nwc-C9JLJJkL.js → nwc-B1Quqda-.js} +3 -3
- package/dist/assets/{nwc-C9JLJJkL.js.map → nwc-B1Quqda-.js.map} +1 -1
- package/dist/assets/{nwcProvider-pFMrsUJh.js → nwcProvider-DUB6xO-b.js} +2 -2
- package/dist/assets/{nwcProvider-pFMrsUJh.js.map → nwcProvider-DUB6xO-b.js.map} +1 -1
- package/dist/assets/ownDid-BfqHJdA6.js +281 -0
- package/dist/assets/ownDid-BfqHJdA6.js.map +1 -0
- package/dist/assets/{registry-DY2ixQfU.js → registry-CZTmtSws.js} +1 -1
- package/dist/assets/{registry-Cks7FA_o.js → registry-DwlTNQjr.js} +5 -246
- package/dist/assets/registry-DwlTNQjr.js.map +1 -0
- package/dist/assets/{resolve-C4Y2HPqQ.js → resolve-BVwhiYjj.js} +3 -280
- package/dist/assets/resolve-BVwhiYjj.js.map +1 -0
- package/dist/assets/{server-D9RAmGdm.js → server-Br3XPwFG.js} +365 -107
- package/dist/assets/server-Br3XPwFG.js.map +1 -0
- package/dist/assets/{src-1RU4TilT.js → src-C4sOH4zH.js} +233 -106
- package/dist/assets/src-C4sOH4zH.js.map +1 -0
- package/dist/assets/sshForges-CQQomStK.js +253 -0
- package/dist/assets/sshForges-CQQomStK.js.map +1 -0
- package/dist/assets/{translate-od5GbpvR.js → translate-C2aNyUkR.js} +11 -5
- package/dist/assets/translate-C2aNyUkR.js.map +1 -0
- package/dist/assets/{usdt-DldXV0MR.js → usdt-CMwatDnQ.js} +3 -3
- package/dist/assets/{usdt-DldXV0MR.js.map → usdt-CMwatDnQ.js.map} +1 -1
- package/dist/assets/{words-BS2qq_vV.js → words-CqN2KG1r.js} +2 -2
- package/dist/assets/{words-BS2qq_vV.js.map → words-CqN2KG1r.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-I_KbuXHa.js.map +0 -1
- package/dist/assets/buttons-BO1_7V4L.js +0 -2
- package/dist/assets/buttons-ClI13rdv.js.map +0 -1
- package/dist/assets/groupFiles-DjQc5XXv.js.map +0 -1
- package/dist/assets/host-CNWGB3-j.js.map +0 -1
- package/dist/assets/hyperdhtRelay-BT_wRxab.js +0 -21
- package/dist/assets/hyperdhtRelay-BT_wRxab.js.map +0 -1
- package/dist/assets/hyperdhtRelay-g7eXzf5h.js.map +0 -1
- package/dist/assets/registry-Cks7FA_o.js.map +0 -1
- package/dist/assets/resolve-C4Y2HPqQ.js.map +0 -1
- package/dist/assets/server-D9RAmGdm.js.map +0 -1
- package/dist/assets/src-1RU4TilT.js.map +0 -1
- package/dist/assets/translate-od5GbpvR.js.map +0 -1
|
@@ -1,14 +1,605 @@
|
|
|
1
|
-
import { $n as readGroupHave,
|
|
1
|
+
import { $n as readGroupHave, Bi as IDENTITY_REVOCATION_LABEL, Dn as decodeBolt11, Ea as RateWindow, En as resolveLightningDestination, Gi as identityRevocationValue, Gn as GROUP_FILE_LIMITS, Hi as IdentityExchange, Hn as engineError, Ji as receivedIdentityStatus, Jn as GROUP_WANT_NO_FRAME, Ka as replySnippet, Ki as identityStatement, Kn as GROUP_HAVE_FRAME, Mu as toBase64Url, Nr as transferEnded, Tn as requestLnurlInvoice, Un as engineText, Vi as IdentityCheckUnavailable, Wi as emptyIdentityLedger, Xn as groupFileFallback, Yi as revokesIdentity, Yn as fetchesByItself, Zn as isGroupMessageId, _a as fileMessageText, cl as exifOrientation, er as readGroupWant, jr as FileUplink, ju as randomBytes, kr as ChatFiles, ku as fromBase64Url, ln as walletNetworkOf, qi as newIdentityBinding, rn as WALLET_NETWORKS, tr as readGroupWantNo } from "./src-C4sOH4zH.js";
|
|
2
2
|
import { a as describeProvider, c as offeredIn, d as sourceProblem, n as PROVIDER_PLATFORMS, o as isNothingSpentError, s as networkMode, t as NothingSpentError, u as redact } from "./types-C4_KafL_.js";
|
|
3
3
|
import { g as wrap, h as transact, i as STORES, m as store, s as databaseName, u as fileStore } from "./idb-BkOJES5_.js";
|
|
4
|
-
import { a as sealSeed, i as newDeviceKey, o as unsealSeed, t as networkReason } from "./networkReason-
|
|
4
|
+
import { a as sealSeed, i as newDeviceKey, o as unsealSeed, t as networkReason } from "./networkReason-DhJYOomu.js";
|
|
5
5
|
import { t as BITCOIN_INVOICE_ON_TESTNET, u as mintNetwork } from "./mints-j5XAOk4f.js";
|
|
6
|
-
import {
|
|
7
|
-
import { i as fromBase64Url$1 } from "./envelope-
|
|
6
|
+
import { c as boundedIdentityFetch, l as verifyIdentity } from "./ownDid-BfqHJdA6.js";
|
|
7
|
+
import { i as fromBase64Url$1 } from "./envelope-CGfUsR1m.js";
|
|
8
8
|
import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-DNgrRL0R.js";
|
|
9
9
|
import { sha256 } from "@noble/hashes/sha2.js";
|
|
10
10
|
import { validateMnemonic } from "@scure/bip39";
|
|
11
11
|
import { wordlist } from "@scure/bip39/wordlists/english.js";
|
|
12
|
+
//#region ../core/src/pictureMetadata.ts
|
|
13
|
+
/**
|
|
14
|
+
* What a picture leaves with. A photo's file says more than its pixels: its Exif and XMP hold where it was taken, the
|
|
15
|
+
* device, the time, often a thumbnail of the uncropped original. The sender removes them before the file is stored and
|
|
16
|
+
* its digest computed, so what the contact (or anyone in a community) receives is the picture alone: JPEG, PNG, WebP
|
|
17
|
+
* and HEIF (HEIC, AVIF), without decoding or re-encoding a pixel.
|
|
18
|
+
*
|
|
19
|
+
* Fail-closed: a file that is one of these pictures, by its bytes or by its type, and whose metadata cannot be removed
|
|
20
|
+
* (truncated, malformed, a part this does not know) is refused with `NO_PICTURE_METADATA`, never sent as it was. Any
|
|
21
|
+
* other file goes as it is.
|
|
22
|
+
*/
|
|
23
|
+
var PICTURE_METADATA_LIMITS = {
|
|
24
|
+
/** The largest picture read whole to remove its metadata: past this it is refused. */
|
|
25
|
+
maxBytes: 268435456,
|
|
26
|
+
/** Bytes read first to tell a picture from another file. */
|
|
27
|
+
headBytes: 64
|
|
28
|
+
};
|
|
29
|
+
/** Why a picture is refused: its metadata could not be removed, so it does not go at all. */
|
|
30
|
+
var NO_PICTURE_METADATA = "This picture cannot be sent: Ghostly could not remove the details saved in it, like where it was taken";
|
|
31
|
+
/** The types of the pictures stripped here: a file of one of them whose bytes are not that picture is refused. */
|
|
32
|
+
var STRIPPED_TYPES = /* @__PURE__ */ new Set([
|
|
33
|
+
"image/jpeg",
|
|
34
|
+
"image/jpg",
|
|
35
|
+
"image/pjpeg",
|
|
36
|
+
"image/png",
|
|
37
|
+
"image/apng",
|
|
38
|
+
"image/webp",
|
|
39
|
+
"image/heic",
|
|
40
|
+
"image/heif",
|
|
41
|
+
"image/heic-sequence",
|
|
42
|
+
"image/heif-sequence",
|
|
43
|
+
"image/avif",
|
|
44
|
+
"image/gif",
|
|
45
|
+
"image/tiff",
|
|
46
|
+
"image/tiff-fx"
|
|
47
|
+
]);
|
|
48
|
+
/** HEIF brands (HEIC, AVIF, the generic `mif1`): an MP4 video's `ftyp` names none of them. */
|
|
49
|
+
var HEIF_BRANDS = /* @__PURE__ */ new Set([
|
|
50
|
+
"heic",
|
|
51
|
+
"heix",
|
|
52
|
+
"heim",
|
|
53
|
+
"heis",
|
|
54
|
+
"hevc",
|
|
55
|
+
"hevx",
|
|
56
|
+
"mif1",
|
|
57
|
+
"mif2",
|
|
58
|
+
"msf1",
|
|
59
|
+
"avif",
|
|
60
|
+
"avis"
|
|
61
|
+
]);
|
|
62
|
+
var u16be = (b, at) => b[at] << 8 | b[at + 1];
|
|
63
|
+
var u32be = (b, at) => (b[at] << 24 >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
|
|
64
|
+
var u32le = (b, at) => (b[at] | b[at + 1] << 8 | b[at + 2] << 16 | b[at + 3] << 24) >>> 0;
|
|
65
|
+
var text = (b, at, length) => String.fromCharCode(...b.subarray(at, at + length));
|
|
66
|
+
var starts = (b, at, prefix) => at + prefix.length <= b.length && text(b, at, prefix.length) === prefix;
|
|
67
|
+
/** A picture this strips, by its first bytes. */
|
|
68
|
+
function kindOf(b) {
|
|
69
|
+
if (b.length >= 3 && b[0] === 255 && b[1] === 216 && b[2] === 255) return "jpeg";
|
|
70
|
+
if (b.length >= 8 && b[0] === 137 && starts(b, 1, "PNG\r\n\n")) return "png";
|
|
71
|
+
if (b.length >= 12 && starts(b, 0, "RIFF") && starts(b, 8, "WEBP")) return "webp";
|
|
72
|
+
if (starts(b, 0, "GIF87a") || starts(b, 0, "GIF89a")) return "gif";
|
|
73
|
+
if (starts(b, 0, "II*\0") || starts(b, 0, "MM\0*") || starts(b, 0, "II+\0") || starts(b, 0, "MM\0+")) return "tiff";
|
|
74
|
+
if (b.length >= 16 && starts(b, 4, "ftyp")) {
|
|
75
|
+
const end = Math.min(b.length, u32be(b, 0));
|
|
76
|
+
for (let at = 8; at + 4 <= end; at += 4) if (at !== 12 && HEIF_BRANDS.has(text(b, at, 4))) return "heif";
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** Refuses the picture where its bytes are not what this expects. */
|
|
80
|
+
function check(ok) {
|
|
81
|
+
if (!ok) throw new Error(NO_PICTURE_METADATA);
|
|
82
|
+
}
|
|
83
|
+
/** SOFn markers: every frame type but DHT (C4), JPG (C8) and DAC (CC). */
|
|
84
|
+
var JPEG_FRAME = /* @__PURE__ */ new Set([
|
|
85
|
+
192,
|
|
86
|
+
193,
|
|
87
|
+
194,
|
|
88
|
+
195,
|
|
89
|
+
197,
|
|
90
|
+
198,
|
|
91
|
+
199,
|
|
92
|
+
201,
|
|
93
|
+
202,
|
|
94
|
+
203,
|
|
95
|
+
205,
|
|
96
|
+
206,
|
|
97
|
+
207
|
|
98
|
+
]);
|
|
99
|
+
function jpegKeeps(marker, b, payload) {
|
|
100
|
+
if (marker >= 192 && marker <= 207 || marker >= 218 && marker <= 223) return true;
|
|
101
|
+
if (marker === 224) return starts(b, payload, "JFIF\0");
|
|
102
|
+
if (marker === 226) return starts(b, payload, "ICC_PROFILE\0");
|
|
103
|
+
if (marker === 238) return starts(b, payload, "Adobe");
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
/** An APP1 Exif, big-endian, whose IFD0 holds `orientation` alone. */
|
|
107
|
+
var orientationOnly = (orientation) => Uint8Array.of(255, 225, 0, 34, 69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 1, 1, 18, 0, 3, 0, 0, 0, 1, 0, orientation, 0, 0, 0, 0, 0, 0);
|
|
108
|
+
function stripJpeg(b) {
|
|
109
|
+
const parts = [b.subarray(0, 2)];
|
|
110
|
+
let at = 2, framed = false, scanned = false, exif = false;
|
|
111
|
+
for (;;) {
|
|
112
|
+
check(at < b.length && b[at] === 255);
|
|
113
|
+
while (at < b.length && b[at] === 255) at++;
|
|
114
|
+
check(at < b.length);
|
|
115
|
+
const marker = b[at++];
|
|
116
|
+
if (marker === 217) {
|
|
117
|
+
check(framed && scanned);
|
|
118
|
+
parts.push(Uint8Array.of(255, 217));
|
|
119
|
+
return parts;
|
|
120
|
+
}
|
|
121
|
+
if (marker === 1 || marker >= 208 && marker <= 215) {
|
|
122
|
+
parts.push(Uint8Array.of(255, marker));
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
check(marker !== 0 && marker !== 216 && at + 2 <= b.length);
|
|
126
|
+
const length = u16be(b, at);
|
|
127
|
+
check(length >= 2 && at + length <= b.length);
|
|
128
|
+
if (jpegKeeps(marker, b, at + 2)) {
|
|
129
|
+
parts.push(Uint8Array.of(255, marker), b.subarray(at, at + length));
|
|
130
|
+
if (JPEG_FRAME.has(marker)) framed = true;
|
|
131
|
+
} else if (marker === 225 && !scanned && !exif && starts(b, at + 2, "Exif\0\0")) {
|
|
132
|
+
exif = true;
|
|
133
|
+
const orientation = exifOrientation(b, at + 8, at + length);
|
|
134
|
+
if (orientation >= 2) parts.push(orientationOnly(orientation));
|
|
135
|
+
}
|
|
136
|
+
at += length;
|
|
137
|
+
if (marker !== 218) continue;
|
|
138
|
+
check(framed);
|
|
139
|
+
scanned = true;
|
|
140
|
+
let end = at;
|
|
141
|
+
for (;;) {
|
|
142
|
+
end = b.indexOf(255, end);
|
|
143
|
+
check(end >= 0);
|
|
144
|
+
let next = end + 1;
|
|
145
|
+
while (next < b.length && b[next] === 255) next++;
|
|
146
|
+
check(next < b.length);
|
|
147
|
+
if (b[next] !== 0 && !(b[next] >= 208 && b[next] <= 215)) break;
|
|
148
|
+
end = next + 1;
|
|
149
|
+
}
|
|
150
|
+
parts.push(b.subarray(at, end));
|
|
151
|
+
at = end;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
var PNG_CRITICAL = /* @__PURE__ */ new Set([
|
|
155
|
+
"IHDR",
|
|
156
|
+
"PLTE",
|
|
157
|
+
"IDAT",
|
|
158
|
+
"IEND"
|
|
159
|
+
]);
|
|
160
|
+
var PNG_DRAWS = /* @__PURE__ */ new Set([
|
|
161
|
+
"tRNS",
|
|
162
|
+
"gAMA",
|
|
163
|
+
"cHRM",
|
|
164
|
+
"sRGB",
|
|
165
|
+
"iCCP",
|
|
166
|
+
"sBIT",
|
|
167
|
+
"bKGD",
|
|
168
|
+
"pHYs",
|
|
169
|
+
"cICP",
|
|
170
|
+
"mDCV",
|
|
171
|
+
"cLLI",
|
|
172
|
+
"acTL",
|
|
173
|
+
"fcTL",
|
|
174
|
+
"fdAT"
|
|
175
|
+
]);
|
|
176
|
+
function stripPng(b) {
|
|
177
|
+
const parts = [b.subarray(0, 8)];
|
|
178
|
+
let at = 8;
|
|
179
|
+
for (;;) {
|
|
180
|
+
check(at + 12 <= b.length);
|
|
181
|
+
const length = u32be(b, at), type = text(b, at + 4, 4);
|
|
182
|
+
check(at + 12 + length <= b.length && (at > 8 || type === "IHDR"));
|
|
183
|
+
const critical = (b[at + 4] & 32) === 0;
|
|
184
|
+
check(!critical || PNG_CRITICAL.has(type));
|
|
185
|
+
if (critical || PNG_DRAWS.has(type)) parts.push(b.subarray(at, at + 12 + length));
|
|
186
|
+
at += 12 + length;
|
|
187
|
+
if (type === "IEND") return parts;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
var WEBP_KEEPS = /* @__PURE__ */ new Set([
|
|
191
|
+
"VP8 ",
|
|
192
|
+
"VP8L",
|
|
193
|
+
"VP8X",
|
|
194
|
+
"ALPH",
|
|
195
|
+
"ANIM",
|
|
196
|
+
"ANMF",
|
|
197
|
+
"ICCP"
|
|
198
|
+
]);
|
|
199
|
+
function stripWebp(b) {
|
|
200
|
+
check(b.length >= 20);
|
|
201
|
+
const riffEnd = 8 + u32le(b, 4);
|
|
202
|
+
check(riffEnd <= b.length && riffEnd % 2 === 0);
|
|
203
|
+
const parts = [];
|
|
204
|
+
let at = 12, size = 4, drawn = false;
|
|
205
|
+
while (at < riffEnd) {
|
|
206
|
+
check(at + 8 <= riffEnd);
|
|
207
|
+
const type = text(b, at, 4), length = u32le(b, at + 4), end = at + 8 + length + (length & 1);
|
|
208
|
+
check(end <= riffEnd && (at > 12 || type === "VP8 " || type === "VP8L" || type === "VP8X"));
|
|
209
|
+
if (WEBP_KEEPS.has(type)) {
|
|
210
|
+
let chunk = b.subarray(at, end);
|
|
211
|
+
if (type === "VP8X") {
|
|
212
|
+
check(length >= 10);
|
|
213
|
+
chunk = chunk.slice();
|
|
214
|
+
chunk[8] = chunk[8] & -13;
|
|
215
|
+
}
|
|
216
|
+
if (type === "VP8 " || type === "VP8L" || type === "ANMF") drawn = true;
|
|
217
|
+
parts.push(chunk);
|
|
218
|
+
size += chunk.length;
|
|
219
|
+
}
|
|
220
|
+
at = end;
|
|
221
|
+
}
|
|
222
|
+
check(drawn);
|
|
223
|
+
const header = /* @__PURE__ */ new Uint8Array(12);
|
|
224
|
+
header.set(b.subarray(0, 12));
|
|
225
|
+
new DataView(header.buffer).setUint32(4, size, true);
|
|
226
|
+
return [header, ...parts];
|
|
227
|
+
}
|
|
228
|
+
var HEIF_TOP = /* @__PURE__ */ new Set([
|
|
229
|
+
"ftyp",
|
|
230
|
+
"meta",
|
|
231
|
+
"mdat",
|
|
232
|
+
"free",
|
|
233
|
+
"skip"
|
|
234
|
+
]);
|
|
235
|
+
var HEIF_META = /* @__PURE__ */ new Set([
|
|
236
|
+
"hdlr",
|
|
237
|
+
"dinf",
|
|
238
|
+
"pitm",
|
|
239
|
+
"iloc",
|
|
240
|
+
"iinf",
|
|
241
|
+
"iref",
|
|
242
|
+
"iprp",
|
|
243
|
+
"idat",
|
|
244
|
+
"grpl",
|
|
245
|
+
"free",
|
|
246
|
+
"skip"
|
|
247
|
+
]);
|
|
248
|
+
/** Items that hold metadata: Exif, and XMP (or any other document) as a MIME item. */
|
|
249
|
+
var HEIF_METADATA_ITEMS = /* @__PURE__ */ new Set([
|
|
250
|
+
"Exif",
|
|
251
|
+
"mime",
|
|
252
|
+
"uri "
|
|
253
|
+
]);
|
|
254
|
+
function boxes(b, start, end) {
|
|
255
|
+
const found = [];
|
|
256
|
+
for (let at = start; at < end;) {
|
|
257
|
+
check(at + 8 <= end);
|
|
258
|
+
let size = u32be(b, at), body = at + 8;
|
|
259
|
+
const type = text(b, at + 4, 4);
|
|
260
|
+
if (size === 1) {
|
|
261
|
+
check(at + 16 <= end);
|
|
262
|
+
size = u32be(b, at + 8) * 2 ** 32 + u32be(b, at + 12);
|
|
263
|
+
body = at + 16;
|
|
264
|
+
} else if (size === 0) size = end - at;
|
|
265
|
+
if (type === "uuid") body += 16;
|
|
266
|
+
check(size >= body - at && at + size <= end);
|
|
267
|
+
found.push({
|
|
268
|
+
type,
|
|
269
|
+
start: at,
|
|
270
|
+
body,
|
|
271
|
+
end: at + size
|
|
272
|
+
});
|
|
273
|
+
at += size;
|
|
274
|
+
}
|
|
275
|
+
return found;
|
|
276
|
+
}
|
|
277
|
+
function stripHeif(b) {
|
|
278
|
+
const top = boxes(b, 0, b.length);
|
|
279
|
+
check(top[0]?.type === "ftyp" && top.every((box) => HEIF_TOP.has(box.type)));
|
|
280
|
+
const metas = top.filter((box) => box.type === "meta");
|
|
281
|
+
check(metas.length === 1);
|
|
282
|
+
const meta = metas[0];
|
|
283
|
+
const children = boxes(b, meta.body + 4, meta.end);
|
|
284
|
+
check(children.every((box) => HEIF_META.has(box.type)));
|
|
285
|
+
const one = (type) => {
|
|
286
|
+
const of = children.filter((box) => box.type === type);
|
|
287
|
+
check(of.length <= 1);
|
|
288
|
+
return of[0];
|
|
289
|
+
};
|
|
290
|
+
const iinf = one("iinf"), iloc = one("iloc"), idat = one("idat");
|
|
291
|
+
check(!!iinf && !!iloc);
|
|
292
|
+
const metadata = /* @__PURE__ */ new Set();
|
|
293
|
+
const infeVersion = b[iinf.body];
|
|
294
|
+
const entries = boxes(b, iinf.body + 4 + (infeVersion === 0 ? 2 : 4), iinf.end);
|
|
295
|
+
for (const infe of entries) {
|
|
296
|
+
check(infe.type === "infe" && infe.body + 4 <= infe.end);
|
|
297
|
+
const version = b[infe.body];
|
|
298
|
+
check(version === 2 || version === 3);
|
|
299
|
+
let at = infe.body + 4;
|
|
300
|
+
const id = version === 2 ? u16be(b, at) : u32be(b, at);
|
|
301
|
+
at += version === 2 ? 2 : 4;
|
|
302
|
+
check(at + 6 <= infe.end);
|
|
303
|
+
if (HEIF_METADATA_ITEMS.has(text(b, at + 2, 4))) metadata.add(id);
|
|
304
|
+
}
|
|
305
|
+
const out = b.slice();
|
|
306
|
+
const version = b[iloc.body];
|
|
307
|
+
check(version <= 2);
|
|
308
|
+
let at = iloc.body + 4;
|
|
309
|
+
/** The next field of `size` bytes (0, 2, 4 or 8), big-endian. */
|
|
310
|
+
const read = (size) => {
|
|
311
|
+
check(at + size <= iloc.end);
|
|
312
|
+
const value = size === 0 ? 0 : size === 2 ? u16be(b, at) : size === 4 ? u32be(b, at) : size === 8 ? u32be(b, at) * 2 ** 32 + u32be(b, at + 4) : NaN;
|
|
313
|
+
check(Number.isSafeInteger(value));
|
|
314
|
+
at += size;
|
|
315
|
+
return value;
|
|
316
|
+
};
|
|
317
|
+
const read2 = () => read(2);
|
|
318
|
+
check(at + 2 <= iloc.end);
|
|
319
|
+
const offsetSize = b[at] >> 4, lengthSize = b[at] & 15, baseSize = b[at + 1] >> 4, indexSize = version > 0 ? b[at + 1] & 15 : 0;
|
|
320
|
+
check([
|
|
321
|
+
offsetSize,
|
|
322
|
+
lengthSize,
|
|
323
|
+
baseSize,
|
|
324
|
+
indexSize
|
|
325
|
+
].every((size) => size === 0 || size === 4 || size === 8));
|
|
326
|
+
at += 2;
|
|
327
|
+
const count = read(version < 2 ? 2 : 4);
|
|
328
|
+
for (let i = 0; i < count; i++) {
|
|
329
|
+
const id = version < 2 ? read2() : read(4);
|
|
330
|
+
const method = version > 0 ? read2() & 15 : 0;
|
|
331
|
+
const reference = read2();
|
|
332
|
+
const base = read(baseSize);
|
|
333
|
+
const extents = read2();
|
|
334
|
+
for (let e = 0; e < extents; e++) {
|
|
335
|
+
if (indexSize) read(indexSize);
|
|
336
|
+
const offset = read(offsetSize), length = read(lengthSize);
|
|
337
|
+
if (!metadata.has(id)) continue;
|
|
338
|
+
check(reference === 0 && length > 0 && (method === 0 || method === 1 && !!idat));
|
|
339
|
+
const start = (method === 1 ? idat.body : 0) + base + offset, limit = method === 1 ? idat.end : b.length;
|
|
340
|
+
check(start + length <= limit);
|
|
341
|
+
out.fill(0, start, start + length);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return [out];
|
|
345
|
+
}
|
|
346
|
+
var GIF_APPS_KEPT = /* @__PURE__ */ new Set([
|
|
347
|
+
"NETSCAPE2.0",
|
|
348
|
+
"ANIMEXTS1.0",
|
|
349
|
+
"ICCRGBG1012"
|
|
350
|
+
]);
|
|
351
|
+
function stripGif(b) {
|
|
352
|
+
check(b.length >= 13);
|
|
353
|
+
/** A colour table's bytes, from the flags that say it is there and its size. */
|
|
354
|
+
const table = (flags) => flags & 128 ? 3 << (flags & 7) + 1 : 0;
|
|
355
|
+
/** The end of the data sub-blocks at `at`, past their empty block. */
|
|
356
|
+
const blocks = (at) => {
|
|
357
|
+
for (;;) {
|
|
358
|
+
check(at < b.length);
|
|
359
|
+
const length = b[at];
|
|
360
|
+
at += 1 + length;
|
|
361
|
+
if (!length) return at;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
let at = 13 + table(b[10]), framed = false;
|
|
365
|
+
check(at <= b.length);
|
|
366
|
+
const parts = [b.subarray(0, at)];
|
|
367
|
+
for (;;) {
|
|
368
|
+
check(at < b.length);
|
|
369
|
+
const introducer = b[at];
|
|
370
|
+
if (introducer === 59) {
|
|
371
|
+
check(framed);
|
|
372
|
+
parts.push(Uint8Array.of(59));
|
|
373
|
+
return parts;
|
|
374
|
+
}
|
|
375
|
+
if (introducer === 44) {
|
|
376
|
+
check(at + 10 <= b.length);
|
|
377
|
+
const data = at + 10 + table(b[at + 9]);
|
|
378
|
+
check(data < b.length);
|
|
379
|
+
const end = blocks(data + 1);
|
|
380
|
+
parts.push(b.subarray(at, end));
|
|
381
|
+
framed = true;
|
|
382
|
+
at = end;
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
check(introducer === 33 && at + 2 < b.length);
|
|
386
|
+
const label = b[at + 1], end = blocks(at + 2);
|
|
387
|
+
const app = label === 255 && b[at + 2] === 11 && GIF_APPS_KEPT.has(text(b, at + 3, 11));
|
|
388
|
+
if (label === 249 || label === 1 || app) parts.push(b.subarray(at, end));
|
|
389
|
+
else check(label === 254 || label === 255);
|
|
390
|
+
at = end;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
var TIFF_DRAWS = /* @__PURE__ */ new Set([
|
|
394
|
+
254,
|
|
395
|
+
255,
|
|
396
|
+
256,
|
|
397
|
+
257,
|
|
398
|
+
258,
|
|
399
|
+
259,
|
|
400
|
+
262,
|
|
401
|
+
263,
|
|
402
|
+
264,
|
|
403
|
+
265,
|
|
404
|
+
266,
|
|
405
|
+
273,
|
|
406
|
+
274,
|
|
407
|
+
277,
|
|
408
|
+
278,
|
|
409
|
+
279,
|
|
410
|
+
280,
|
|
411
|
+
281,
|
|
412
|
+
282,
|
|
413
|
+
283,
|
|
414
|
+
284,
|
|
415
|
+
286,
|
|
416
|
+
287,
|
|
417
|
+
290,
|
|
418
|
+
291,
|
|
419
|
+
292,
|
|
420
|
+
293,
|
|
421
|
+
296,
|
|
422
|
+
297,
|
|
423
|
+
301,
|
|
424
|
+
317,
|
|
425
|
+
318,
|
|
426
|
+
319,
|
|
427
|
+
320,
|
|
428
|
+
321,
|
|
429
|
+
322,
|
|
430
|
+
323,
|
|
431
|
+
324,
|
|
432
|
+
325,
|
|
433
|
+
332,
|
|
434
|
+
334,
|
|
435
|
+
336,
|
|
436
|
+
338,
|
|
437
|
+
339,
|
|
438
|
+
340,
|
|
439
|
+
341,
|
|
440
|
+
529,
|
|
441
|
+
530,
|
|
442
|
+
531,
|
|
443
|
+
532,
|
|
444
|
+
34675
|
|
445
|
+
]);
|
|
446
|
+
/** Text and documents about the picture: DocumentName to HostComputer, InkNames, XMP, Copyright, IPTC, Photoshop, Windows' XP tags, PrintIM. */
|
|
447
|
+
var TIFF_METADATA = /* @__PURE__ */ new Set([
|
|
448
|
+
269,
|
|
449
|
+
270,
|
|
450
|
+
271,
|
|
451
|
+
272,
|
|
452
|
+
285,
|
|
453
|
+
305,
|
|
454
|
+
306,
|
|
455
|
+
315,
|
|
456
|
+
316,
|
|
457
|
+
333,
|
|
458
|
+
700,
|
|
459
|
+
33432,
|
|
460
|
+
33723,
|
|
461
|
+
34377,
|
|
462
|
+
18246,
|
|
463
|
+
18249,
|
|
464
|
+
40091,
|
|
465
|
+
40092,
|
|
466
|
+
40093,
|
|
467
|
+
40094,
|
|
468
|
+
40095,
|
|
469
|
+
50341
|
|
470
|
+
]);
|
|
471
|
+
/** The IFDs of Exif, GPS and interoperability, emptied whole. */
|
|
472
|
+
var TIFF_METADATA_IFDS = /* @__PURE__ */ new Set([
|
|
473
|
+
34665,
|
|
474
|
+
34853,
|
|
475
|
+
40965
|
|
476
|
+
]);
|
|
477
|
+
/** Compression without JPEG: none, CCITT, LZW, Deflate, PackBits. */
|
|
478
|
+
var TIFF_COMPRESSION = /* @__PURE__ */ new Set([
|
|
479
|
+
1,
|
|
480
|
+
2,
|
|
481
|
+
3,
|
|
482
|
+
4,
|
|
483
|
+
5,
|
|
484
|
+
8,
|
|
485
|
+
32773,
|
|
486
|
+
32946
|
|
487
|
+
]);
|
|
488
|
+
/** Bytes per value of each field type. */
|
|
489
|
+
var TIFF_TYPE_BYTES = [
|
|
490
|
+
0,
|
|
491
|
+
1,
|
|
492
|
+
1,
|
|
493
|
+
2,
|
|
494
|
+
4,
|
|
495
|
+
8,
|
|
496
|
+
1,
|
|
497
|
+
1,
|
|
498
|
+
2,
|
|
499
|
+
4,
|
|
500
|
+
8,
|
|
501
|
+
4,
|
|
502
|
+
8,
|
|
503
|
+
4
|
|
504
|
+
];
|
|
505
|
+
function stripTiff(b) {
|
|
506
|
+
const little = b[0] === 73;
|
|
507
|
+
const u16 = (at) => {
|
|
508
|
+
check(at + 2 <= b.length);
|
|
509
|
+
return little ? b[at] | b[at + 1] << 8 : u16be(b, at);
|
|
510
|
+
};
|
|
511
|
+
const u32 = (at) => {
|
|
512
|
+
check(at + 4 <= b.length);
|
|
513
|
+
return little ? u32le(b, at) : u32be(b, at);
|
|
514
|
+
};
|
|
515
|
+
check(b.length >= 8 && u16(2) === 42);
|
|
516
|
+
const out = b.slice(), seen = /* @__PURE__ */ new Set();
|
|
517
|
+
/** An IFD's entries: tag, type, the value's first byte (in the entry or where it points) and its bytes. */
|
|
518
|
+
const entries = (ifd) => {
|
|
519
|
+
check(ifd >= 8 && !seen.has(ifd) && seen.size < 1024);
|
|
520
|
+
seen.add(ifd);
|
|
521
|
+
const count = u16(ifd), next = ifd + 2 + count * 12;
|
|
522
|
+
u32(next);
|
|
523
|
+
return {
|
|
524
|
+
next,
|
|
525
|
+
list: Array.from({ length: count }, (_, i) => {
|
|
526
|
+
const at = ifd + 2 + i * 12, tag = u16(at), type = u16(at + 2);
|
|
527
|
+
check(type >= 1 && type < TIFF_TYPE_BYTES.length);
|
|
528
|
+
const bytes = TIFF_TYPE_BYTES[type] * u32(at + 4);
|
|
529
|
+
const value = bytes <= 4 ? at + 8 : u32(at + 8);
|
|
530
|
+
check(Number.isSafeInteger(bytes) && value + bytes <= b.length);
|
|
531
|
+
return {
|
|
532
|
+
at,
|
|
533
|
+
tag,
|
|
534
|
+
type,
|
|
535
|
+
value,
|
|
536
|
+
bytes
|
|
537
|
+
};
|
|
538
|
+
})
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
/** An Exif, GPS or interoperability IFD: every value zeroed, then the IFD itself, so it holds no entry. */
|
|
542
|
+
const empty = (ifd) => {
|
|
543
|
+
const { next, list } = entries(ifd);
|
|
544
|
+
for (const entry of list) {
|
|
545
|
+
check(entry.tag !== 37500);
|
|
546
|
+
if (TIFF_METADATA_IFDS.has(entry.tag)) empty(u32(entry.value));
|
|
547
|
+
out.fill(0, entry.value, entry.value + entry.bytes);
|
|
548
|
+
}
|
|
549
|
+
out.fill(0, ifd, next + 4);
|
|
550
|
+
};
|
|
551
|
+
for (let ifd = u32(4); ifd;) {
|
|
552
|
+
const { next, list } = entries(ifd);
|
|
553
|
+
for (const { tag, value, bytes } of list) {
|
|
554
|
+
if (tag === 259) check(TIFF_COMPRESSION.has(u16(value)));
|
|
555
|
+
if (TIFF_METADATA_IFDS.has(tag)) empty(u32(value));
|
|
556
|
+
else if (TIFF_METADATA.has(tag)) out.fill(0, value, value + bytes);
|
|
557
|
+
else check(TIFF_DRAWS.has(tag));
|
|
558
|
+
}
|
|
559
|
+
ifd = u32(next);
|
|
560
|
+
}
|
|
561
|
+
return [out];
|
|
562
|
+
}
|
|
563
|
+
var STRIP = {
|
|
564
|
+
jpeg: stripJpeg,
|
|
565
|
+
png: stripPng,
|
|
566
|
+
webp: stripWebp,
|
|
567
|
+
heif: stripHeif,
|
|
568
|
+
gif: stripGif,
|
|
569
|
+
tiff: stripTiff
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* A picture's bytes without its metadata, as parts to put in a Blob; undefined when the file is not a picture this
|
|
573
|
+
* strips (by its bytes and its type), so it goes as it is. Throws `NO_PICTURE_METADATA` when it is one but its
|
|
574
|
+
* metadata cannot be removed.
|
|
575
|
+
*/
|
|
576
|
+
function stripPictureMetadata(bytes, mime) {
|
|
577
|
+
const kind = kindOf(bytes);
|
|
578
|
+
if (!kind) {
|
|
579
|
+
if (STRIPPED_TYPES.has(mime.split(";")[0].trim().toLowerCase())) throw new Error(NO_PICTURE_METADATA);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
return STRIP[kind](bytes);
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Whether a file is a picture whose metadata goes before it is sent, by its first `PICTURE_METADATA_LIMITS.headBytes`
|
|
586
|
+
* bytes or by its type: then it is read whole and stripped (`stripPictureMetadata`), else it goes as it is.
|
|
587
|
+
*/
|
|
588
|
+
function isStrippedPicture(head, mime) {
|
|
589
|
+
return !!kindOf(head) || STRIPPED_TYPES.has(mime.split(";")[0].trim().toLowerCase());
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* `source` as it is sent: without its metadata when it is a picture (`stripPictureMetadata`), or undefined when it is
|
|
593
|
+
* not one and goes as it is. Only its first bytes are read for any other file. Throws `NO_PICTURE_METADATA` for a
|
|
594
|
+
* picture that cannot be stripped or is past `PICTURE_METADATA_LIMITS.maxBytes`; an error reading `source` as it is.
|
|
595
|
+
*/
|
|
596
|
+
async function withoutPictureMetadata(source, mime) {
|
|
597
|
+
if (!isStrippedPicture(new Uint8Array(await source.slice(0, PICTURE_METADATA_LIMITS.headBytes).arrayBuffer()), mime)) return void 0;
|
|
598
|
+
if (source.size > PICTURE_METADATA_LIMITS.maxBytes) throw new Error(NO_PICTURE_METADATA);
|
|
599
|
+
const parts = stripPictureMetadata(new Uint8Array(await source.arrayBuffer()), mime);
|
|
600
|
+
return parts && new Blob(parts, { type: mime });
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
12
603
|
//#region ../browser/src/engine/paymentAdapters/away.ts
|
|
13
604
|
var away = /* @__PURE__ */ new Map();
|
|
14
605
|
/** The wallets away from this device, by wallet id, with the name of their home device ("" when it has none here). */
|
|
@@ -2059,7 +2650,7 @@ var registry;
|
|
|
2059
2650
|
var loading;
|
|
2060
2651
|
var listeners = /* @__PURE__ */ new Set();
|
|
2061
2652
|
function loadIdentityProviders() {
|
|
2062
|
-
return loading ??= import("./registry-
|
|
2653
|
+
return loading ??= import("./registry-CZTmtSws.js").then((m) => {
|
|
2063
2654
|
registry = m;
|
|
2064
2655
|
for (const listener of listeners) listener();
|
|
2065
2656
|
return m;
|
|
@@ -2192,14 +2783,40 @@ var IdentityProofs = class {
|
|
|
2192
2783
|
}
|
|
2193
2784
|
return seed;
|
|
2194
2785
|
}
|
|
2195
|
-
ctx() {
|
|
2786
|
+
ctx(fetch = this.fetch) {
|
|
2196
2787
|
return {
|
|
2197
2788
|
now: now(),
|
|
2198
2789
|
signal: AbortSignal.timeout(3e4),
|
|
2199
|
-
fetch
|
|
2790
|
+
fetch
|
|
2200
2791
|
};
|
|
2201
2792
|
}
|
|
2793
|
+
/** The person's own proof, before it is saved: on whatever servers it names, their own. */
|
|
2202
2794
|
verify = (statement, evidence) => verifyIdentity(this.providers(), statement, evidence, this.ctx());
|
|
2795
|
+
/**
|
|
2796
|
+
* A contact's proof. With Hide my IP on, a host its evidence names (a did:web or domain's web server, an AT Protocol
|
|
2797
|
+
* server, a Pubky homeserver) is not contacted, since it would learn this device's IP address: the check fails as one
|
|
2798
|
+
* that could not run, and the contact is told only that.
|
|
2799
|
+
*/
|
|
2800
|
+
verifyContact = async (statement, evidence) => {
|
|
2801
|
+
if (!this.host.relayOnly?.()) return this.verify(statement, evidence);
|
|
2802
|
+
const { fixedIdentityHosts } = await import("./fixedHosts-BiukTsd9.js");
|
|
2803
|
+
const fixed = fixedIdentityHosts();
|
|
2804
|
+
let refused;
|
|
2805
|
+
const fetch = async (url, options) => {
|
|
2806
|
+
const host = new URL(url).host;
|
|
2807
|
+
if (!fixed.has(host)) {
|
|
2808
|
+
refused ??= host;
|
|
2809
|
+
throw new IdentityCheckUnavailable(`${host} was not contacted`);
|
|
2810
|
+
}
|
|
2811
|
+
return this.fetch(url, options);
|
|
2812
|
+
};
|
|
2813
|
+
try {
|
|
2814
|
+
return await verifyIdentity(this.providers(), statement, evidence, this.ctx(fetch));
|
|
2815
|
+
} catch (e) {
|
|
2816
|
+
if (refused) throw new IdentityCheckUnavailable(`Hide my IP from contacts is on: ${refused}, a server your contact chose, was not contacted`);
|
|
2817
|
+
throw e;
|
|
2818
|
+
}
|
|
2819
|
+
};
|
|
2203
2820
|
revoked = async (statement) => {
|
|
2204
2821
|
if (!this.host.online()) return false;
|
|
2205
2822
|
const records = await this.host.resolve(statement.binding.key);
|
|
@@ -2432,7 +3049,7 @@ var IdentityProofs = class {
|
|
|
2432
3049
|
},
|
|
2433
3050
|
providers: () => this.providers().map((p) => p.id),
|
|
2434
3051
|
localProof: (id) => this.local(id),
|
|
2435
|
-
verify: this.
|
|
3052
|
+
verify: this.verifyContact,
|
|
2436
3053
|
revoked: this.revoked,
|
|
2437
3054
|
onError: (error) => {
|
|
2438
3055
|
this.errors.set(linkId, error);
|
|
@@ -2908,6 +3525,7 @@ var ENDED_KEPT = 8;
|
|
|
2908
3525
|
/** Why a want waits, as the person reads it (the app shows its own words for each `wait`). */
|
|
2909
3526
|
var WAITING_NOTES = {
|
|
2910
3527
|
nobody: "Nobody you are connected to has this file yet",
|
|
3528
|
+
author: "Nobody you are connected to has this file yet, and its sender is not one of them",
|
|
2911
3529
|
busy: "Its holders are busy; asking again soon",
|
|
2912
3530
|
day: "Its holders have shared all they can today; it comes when another member has it, or tomorrow",
|
|
2913
3531
|
damaged: "It arrived damaged; ask again"
|
|
@@ -3427,7 +4045,7 @@ var GroupFileDesk = class {
|
|
|
3427
4045
|
* asked whether or not it said so (one that does not hold it answers `gone`, and is not asked again). Only over an
|
|
3428
4046
|
* edge this device has. (A private group past 16 members, or a community, reaches a holder it has no edge with
|
|
3429
4047
|
* over a file session of the two members, WISP 503 § The file session; that session is not built yet, so such a
|
|
3430
|
-
* holder is not asked, and the file waits for one that is reachable.)
|
|
4048
|
+
* holder is not asked, and the file waits for one that is reachable: `author` when that is its author alone.)
|
|
3431
4049
|
*/
|
|
3432
4050
|
ask(kept) {
|
|
3433
4051
|
const want = this.wants.get(kept.id);
|
|
@@ -3492,7 +4110,8 @@ var GroupFileDesk = class {
|
|
|
3492
4110
|
});
|
|
3493
4111
|
return;
|
|
3494
4112
|
}
|
|
3495
|
-
const
|
|
4113
|
+
const outOfReach = !!membership?.onHubs && known.includes(kept.author) && known.every((key) => !edges.has(key));
|
|
4114
|
+
const wait = want.why ?? (outOfReach ? "author" : "nobody");
|
|
3496
4115
|
this.show(kept, {
|
|
3497
4116
|
state: "transferring",
|
|
3498
4117
|
stage: "waiting",
|
|
@@ -4082,6 +4701,6 @@ function messageFile(kept) {
|
|
|
4082
4701
|
};
|
|
4083
4702
|
}
|
|
4084
4703
|
//#endregion
|
|
4085
|
-
export { ModeChanged as $, IdentityProofs as A, INVOICE_PACE as B, FileAppender as C, streamStored as D, storedSize as E, LightningCards as F, cashuMint as G, ProviderSources as H, cardsKey as I, breezDatabasesFor as J, breezDatabase as K, isRecoveryPhrase as L, sealSecret as M, whenDataKeyDropped as N, waitingGroupFile as O, CASHU_CARD as P, relayOnlyProblem as Q, normalizePhrase as R, WALLET_TYPES as S, removeStored as T, sourceKey as U, nextInvoiceAsk as V, CASHU_MINT_SOURCE as W, iceServerProblem as X, dropBreezDatabase as Y, iceServerSetting as Z, crossNetwork as _, storedGroupFiles as a, requireTurn as at, walletInstances as b, receivedPairedReply as c, paymentAlias as d, ModeGate as et, paymentWireId as f, createTiming as g, createFailure as h, groupOfFile as i, refuseAway as it, openSecret as j, IDENTITY_DRAFT_TTL_MS as k, replyRef as l, assertConfirmedReal as m, groupFileId as n, networkLabel as nt, groupReply as o, setAwayWallets as ot, WALLET_NAMES as p, breezDatabaseInUse as q, groupFileText as r, awayFrom as rt, pairedWireReply as s, setSingleWriterGate as st, GroupFileDesk as t, WrongNetworkError as tt, replyTo as u, paymentNetwork as v, readStored as w, MESSAGE_DETAILS_MAX_BYTES as x, paymentNetworksOf as y, lightningPaying as z };
|
|
4704
|
+
export { ModeChanged as $, IdentityProofs as A, INVOICE_PACE as B, FileAppender as C, streamStored as D, storedSize as E, LightningCards as F, cashuMint as G, ProviderSources as H, cardsKey as I, breezDatabasesFor as J, breezDatabase as K, isRecoveryPhrase as L, sealSecret as M, whenDataKeyDropped as N, waitingGroupFile as O, CASHU_CARD as P, relayOnlyProblem as Q, normalizePhrase as R, WALLET_TYPES as S, removeStored as T, sourceKey as U, nextInvoiceAsk as V, CASHU_MINT_SOURCE as W, iceServerProblem as X, dropBreezDatabase as Y, iceServerSetting as Z, crossNetwork as _, storedGroupFiles as a, requireTurn as at, walletInstances as b, receivedPairedReply as c, NO_PICTURE_METADATA as ct, paymentAlias as d, stripPictureMetadata as dt, ModeGate as et, paymentWireId as f, withoutPictureMetadata as ft, createTiming as g, createFailure as h, groupOfFile as i, refuseAway as it, openSecret as j, IDENTITY_DRAFT_TTL_MS as k, replyRef as l, PICTURE_METADATA_LIMITS as lt, assertConfirmedReal as m, groupFileId as n, networkLabel as nt, groupReply as o, setAwayWallets as ot, WALLET_NAMES as p, breezDatabaseInUse as q, groupFileText as r, awayFrom as rt, pairedWireReply as s, setSingleWriterGate as st, GroupFileDesk as t, WrongNetworkError as tt, replyTo as u, isStrippedPicture as ut, paymentNetwork as v, readStored as w, MESSAGE_DETAILS_MAX_BYTES as x, paymentNetworksOf as y, lightningPaying as z };
|
|
4086
4705
|
|
|
4087
|
-
//# sourceMappingURL=groupFiles-
|
|
4706
|
+
//# sourceMappingURL=groupFiles-CeF9nPv9.js.map
|