@fxhash/errors 0.0.13 → 0.0.14
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/dist/index.d.ts +442 -2
- package/dist/index.js +501 -465
- package/dist/index.js.map +1 -1
- package/package.json +5 -6
- package/dist/errors/_index.d.ts +0 -6
- package/dist/errors/common.d.ts +0 -109
- package/dist/errors/core.d.ts +0 -25
- package/dist/errors/graphql/_index.d.ts +0 -4
- package/dist/errors/graphql/common.d.ts +0 -11
- package/dist/errors/graphql/email-otp.d.ts +0 -26
- package/dist/errors/graphql/oauth.d.ts +0 -15
- package/dist/errors/graphql/wallet-linking.d.ts +0 -40
- package/dist/errors/network.d.ts +0 -8
- package/dist/errors/wallet-api.d.ts +0 -31
- package/dist/errors/web3auth.d.ts +0 -63
- package/dist/utils/_index.d.ts +0 -1
- package/dist/utils/rich-error.d.ts +0 -108
package/dist/index.js
CHANGED
|
@@ -1,541 +1,577 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { capitalize, failure, success } from "@fxhash/utils";
|
|
2
|
+
|
|
3
|
+
//#region src/errors/common.ts
|
|
4
|
+
/**
|
|
5
|
+
* Static error messages for "unexpected" errors. This payload is reused accross
|
|
6
|
+
* the stack for when error data is missing.
|
|
7
|
+
*/
|
|
8
|
+
const UnexpectedRichErrorMessages = {
|
|
9
|
+
dev: "Unexpected error",
|
|
10
|
+
user: "Unexpected error"
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* An error which provides messages intended for devs & users. This class should
|
|
14
|
+
* be used accross our stack to provide meaningful error objects which can be
|
|
15
|
+
* used for both developers & users. When typed errors are returned, if they all
|
|
16
|
+
* are instances of `RichError`, then client applications can take some simple
|
|
17
|
+
* shortcuts to provide error feedback to both the developer and the user.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* export class SomeCustomError extends RichError {
|
|
23
|
+
* name = "SomeCustomError" as const // `code` will have same value
|
|
24
|
+
* messages = {
|
|
25
|
+
* dev: "some message for devs",
|
|
26
|
+
* user: "some message for users"
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* const res = await something()
|
|
33
|
+
* if (res.isFailure()) {
|
|
34
|
+
* const err = res.error // if this is typed as `RichError`
|
|
35
|
+
* displayErrorOnUI(err.userMessage) // safely display user message
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
6
39
|
var RichError = class extends Error {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
40
|
+
constructor(messagesOverride) {
|
|
41
|
+
super();
|
|
42
|
+
this.messages = UnexpectedRichErrorMessages;
|
|
43
|
+
if (messagesOverride) this.messagesOverride = messagesOverride;
|
|
44
|
+
}
|
|
45
|
+
_message(target) {
|
|
46
|
+
return this.messagesOverride?.[target] || this.messages[target] || UnexpectedRichErrorMessages[target];
|
|
47
|
+
}
|
|
48
|
+
get message() {
|
|
49
|
+
return this._message("dev");
|
|
50
|
+
}
|
|
51
|
+
get userMessage() {
|
|
52
|
+
return this._message("user");
|
|
53
|
+
}
|
|
54
|
+
get code() {
|
|
55
|
+
return this.name;
|
|
56
|
+
}
|
|
57
|
+
serialize() {
|
|
58
|
+
return {
|
|
59
|
+
code: this.code,
|
|
60
|
+
messages: this.messagesOverride || this.messages
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get code() {
|
|
64
|
+
return this.name;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Instanciates a Rich Error, trying to match the serialized error with the
|
|
68
|
+
* provided Rich Error classes. The `code` property of the serialized payload
|
|
69
|
+
* is matched against `RichError.name`
|
|
70
|
+
*
|
|
71
|
+
* @param serialized A rich error serialized
|
|
72
|
+
* @param expected A list of Rich Error classes which are expected. If the
|
|
73
|
+
* serialized error doesn't match any of these, UnexpectedRichError will be
|
|
74
|
+
* returned.
|
|
75
|
+
*
|
|
76
|
+
* @returns An instance of Rich Error which type matches the `code` property,
|
|
77
|
+
* or {@link UnexpectedRichError} if no match.
|
|
78
|
+
*/
|
|
79
|
+
static parse(serialized, expected) {
|
|
80
|
+
for (const RichErrorClass of expected) {
|
|
81
|
+
const maybeError = new RichErrorClass(serialized.messages);
|
|
82
|
+
if (maybeError.code === serialized.code) return maybeError;
|
|
83
|
+
}
|
|
84
|
+
return new UnexpectedRichError(serialized.messages);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Returns a new instance of {@link UnexpectedRichError}
|
|
88
|
+
* @param messagesOverride Optional overrides of default unexpected messages
|
|
89
|
+
*/
|
|
90
|
+
static Unexpected(messagesOverride) {
|
|
91
|
+
return new UnexpectedRichError(messagesOverride);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* A general-purpose error which is thrown when no better error could be
|
|
96
|
+
* inferred from the available context.
|
|
97
|
+
*/
|
|
65
98
|
var UnexpectedRichError = class extends RichError {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
99
|
+
constructor(..._args) {
|
|
100
|
+
super(..._args);
|
|
101
|
+
this.name = "UnexpectedRichError";
|
|
102
|
+
this.messages = UnexpectedRichErrorMessages;
|
|
103
|
+
}
|
|
71
104
|
};
|
|
72
105
|
|
|
73
|
-
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/errors/network.ts
|
|
74
108
|
var NetworkRichError = class extends RichError {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
109
|
+
constructor(..._args) {
|
|
110
|
+
super(..._args);
|
|
111
|
+
this.name = "NetworkRichError";
|
|
112
|
+
this.messages = {
|
|
113
|
+
dev: "An network error occured.",
|
|
114
|
+
user: "Network error"
|
|
115
|
+
};
|
|
116
|
+
}
|
|
83
117
|
};
|
|
84
118
|
|
|
85
|
-
|
|
86
|
-
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/errors/graphql/common.ts
|
|
121
|
+
const GraphQLErrors = [NetworkRichError, UnexpectedRichError];
|
|
87
122
|
|
|
88
|
-
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/errors/graphql/email-otp.ts
|
|
89
125
|
var EmailOTPLockedError = class extends RichError {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
EmailOTPLockedError
|
|
101
|
-
];
|
|
126
|
+
constructor(..._args) {
|
|
127
|
+
super(..._args);
|
|
128
|
+
this.name = "EmailOTPLockedError";
|
|
129
|
+
this.messages = {
|
|
130
|
+
dev: "Email locked 2h because too many attempts",
|
|
131
|
+
user: "This email is locked for verification during 2 hours because of too many attempts in a short period of time"
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const EmailOTPRequestErrors = [EmailOTPLockedError];
|
|
102
136
|
var EmailOTPInvalidError = class extends RichError {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
137
|
+
constructor(..._args2) {
|
|
138
|
+
super(..._args2);
|
|
139
|
+
this.name = "EmailOTPInvalidError";
|
|
140
|
+
this.messages = {
|
|
141
|
+
dev: "Email verification failed because OTP is invalid",
|
|
142
|
+
user: "The validation code is invalid"
|
|
143
|
+
};
|
|
144
|
+
}
|
|
111
145
|
};
|
|
112
146
|
var EmailOTPExpiredError = class extends RichError {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
};
|
|
122
|
-
|
|
147
|
+
constructor(..._args3) {
|
|
148
|
+
super(..._args3);
|
|
149
|
+
this.name = "EmailOTPExpiredError";
|
|
150
|
+
this.messages = {
|
|
151
|
+
dev: "Email verification failed because OTP has expired. A new OTP request must be initiated",
|
|
152
|
+
user: "Verification code has expired. Please make another request."
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const EmailOTPVerificationErrors = [
|
|
157
|
+
EmailOTPInvalidError,
|
|
158
|
+
EmailOTPExpiredError,
|
|
159
|
+
EmailOTPLockedError
|
|
160
|
+
];
|
|
123
161
|
|
|
124
|
-
|
|
125
|
-
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/utils/rich-error.ts
|
|
164
|
+
/**
|
|
165
|
+
* Instanciate a new {@link RichError} using a declarative object. This is
|
|
166
|
+
* useful when Rich Error are instanciated programmatically when type is
|
|
167
|
+
* unknown.
|
|
168
|
+
*/
|
|
126
169
|
function richError(params) {
|
|
127
|
-
|
|
170
|
+
return Object.assign(new RichError(), params);
|
|
128
171
|
}
|
|
129
172
|
function isFxhashErrorExtensions(ext) {
|
|
130
|
-
|
|
173
|
+
return typeof ext === "object" && ext.version === "fxhash@0.1.0";
|
|
131
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Test whether a given value is implementing the {@link IRichErrorMessages}
|
|
177
|
+
* interface.
|
|
178
|
+
* @param value Any value
|
|
179
|
+
*/
|
|
132
180
|
function isRichErrorMessages(value) {
|
|
133
|
-
|
|
134
|
-
|
|
181
|
+
if (typeof value !== "object") return false;
|
|
182
|
+
return typeof value.dev === "string" || typeof value.user === "string";
|
|
135
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Parses the GraphQL error object into a RichError. This function detects
|
|
186
|
+
* fxhash error extensions for outputting user error messages returned by
|
|
187
|
+
* the backend.
|
|
188
|
+
*
|
|
189
|
+
* @param error A GraphQL error response
|
|
190
|
+
*
|
|
191
|
+
* @returns An "untyped" rich error constructed by parsing the GraphQL error
|
|
192
|
+
*/
|
|
136
193
|
function richErrorFromGraphQLError(error) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (error.networkError) {
|
|
148
|
-
return new NetworkRichError();
|
|
149
|
-
}
|
|
150
|
-
return new UnexpectedRichError();
|
|
194
|
+
if (error.graphQLErrors.length > 0) {
|
|
195
|
+
const gqlError = error.graphQLErrors[0];
|
|
196
|
+
if (isFxhashErrorExtensions(gqlError.extensions)) return richError({
|
|
197
|
+
name: gqlError.extensions.richError.code,
|
|
198
|
+
messages: gqlError.extensions.richError.messages
|
|
199
|
+
});
|
|
200
|
+
return new UnexpectedRichError();
|
|
201
|
+
}
|
|
202
|
+
if (error.networkError) return new NetworkRichError();
|
|
203
|
+
return new UnexpectedRichError();
|
|
151
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Parses the GraphQL error response to find the fxhash GraphQL error extension,
|
|
207
|
+
* which is used to instanciate a Rich Error from a list of provided RichErrors.
|
|
208
|
+
* The `name` constant property of such classes will be compared to the `code`
|
|
209
|
+
* property of the fxhash error extension to find a match.
|
|
210
|
+
*
|
|
211
|
+
* @param graphQLError GraphQL error response
|
|
212
|
+
* @param expectedErrors An array of RichError classes which will be parsed to
|
|
213
|
+
* find matches between the RichError `name` constant and the `code` returned
|
|
214
|
+
* by the GraphQL fxhash error extension.
|
|
215
|
+
*
|
|
216
|
+
* @returns A RichError instance matchin the error code, or
|
|
217
|
+
* {@link NetworkRichError} if a network error occured, else
|
|
218
|
+
* {@link UnexpectedRichError}
|
|
219
|
+
*/
|
|
152
220
|
function typedRichErrorFromGraphQLError(graphQLError, expectedErrors) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
return new UnexpectedRichError();
|
|
162
|
-
}
|
|
163
|
-
return new UnexpectedRichError();
|
|
221
|
+
if (graphQLError.networkError) return new NetworkRichError();
|
|
222
|
+
if (graphQLError.graphQLErrors.length > 0) {
|
|
223
|
+
const gqlError = graphQLError.graphQLErrors[0];
|
|
224
|
+
if (isFxhashErrorExtensions(gqlError.extensions)) return RichError.parse(gqlError.extensions.richError, expectedErrors);
|
|
225
|
+
return new UnexpectedRichError();
|
|
226
|
+
}
|
|
227
|
+
return new UnexpectedRichError();
|
|
164
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Returns a `Result<Data, TypedRichError>` by parsing a GraphQL response. If
|
|
231
|
+
* the response has an error, {@link typedRichErrorFromGraphQLError} will be
|
|
232
|
+
* called with such error to return a proper error instance based on the error
|
|
233
|
+
* code in the fxhash graphql error extension (or a a generic error if none).
|
|
234
|
+
*
|
|
235
|
+
* @param operationResult A GraphQL response from fxhash hasura endpoint
|
|
236
|
+
* @param getData A function which takes the response and returns the data (if
|
|
237
|
+
* no data is found it should return `null` | `undefined`, in which case it will
|
|
238
|
+
* fail with UnexpectedError)
|
|
239
|
+
* @param potentialErrors An array of Rich Error classes which could be found in
|
|
240
|
+
* the error response.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
*
|
|
244
|
+
* ```ts
|
|
245
|
+
* const emailRequestOTP = async (email) => {
|
|
246
|
+
* return richResultFromGraphQLResponse(
|
|
247
|
+
* await gqlWrapper.client().mutation(Mu_Web3AuthEmailRequestOTP, {
|
|
248
|
+
* email,
|
|
249
|
+
* }),
|
|
250
|
+
* res => res.data?.web3auth_email_request_otp,
|
|
251
|
+
* EmailOTPRequestErrors
|
|
252
|
+
* )
|
|
253
|
+
* },
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
165
256
|
function richResultFromGraphQLResponse(operationResult, getData, potentialErrors) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const data = getData(res);
|
|
171
|
-
return data ? success(data) : failure(
|
|
172
|
-
new UnexpectedRichError({
|
|
173
|
-
dev: "Expected data missing from GraphQL response"
|
|
174
|
-
})
|
|
175
|
-
);
|
|
257
|
+
const res = operationResult;
|
|
258
|
+
if (res.error) return failure(typedRichErrorFromGraphQLError(res.error, potentialErrors));
|
|
259
|
+
const data = getData(res);
|
|
260
|
+
return data ? success(data) : failure(new UnexpectedRichError({ dev: "Expected data missing from GraphQL response" }));
|
|
176
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Test if an error is of a certain error kind, among a list of [errors] or
|
|
264
|
+
* [list of errors]. This allows testing multiple array of errors, which are
|
|
265
|
+
* defined quite a lot throughout the errors stack.
|
|
266
|
+
*
|
|
267
|
+
* @param error The error which needs to be tested
|
|
268
|
+
* @param kinds List of [errors]/[array of errors]
|
|
269
|
+
*
|
|
270
|
+
* @returns boolean if error is of given kind
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
*
|
|
274
|
+
* ```ts
|
|
275
|
+
* isErrorOfKind(
|
|
276
|
+
* someErr,
|
|
277
|
+
* UnexpectedRichError,
|
|
278
|
+
* [SuperError, BigError],
|
|
279
|
+
* SimpleError
|
|
280
|
+
* )
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
177
283
|
function isErrorOfKind(error, ...kinds) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
return false;
|
|
284
|
+
for (const kind of kinds) if (Array.isArray(kind)) {
|
|
285
|
+
if (isErrorOfKind(error, ...kind)) return true;
|
|
286
|
+
} else {
|
|
287
|
+
if (error.name === kind.name) return true;
|
|
288
|
+
if (error.name === kind.errorType) return true;
|
|
289
|
+
}
|
|
290
|
+
return false;
|
|
187
291
|
}
|
|
188
292
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/errors/graphql/oauth.ts
|
|
295
|
+
const couldntSignIn = (provider) => `Couldn't sign in using ${capitalize(provider)}`;
|
|
192
296
|
var OAuthTokenVerificationError = class extends RichError {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
this.name = "OAuthTokenVerificationError";
|
|
201
|
-
}
|
|
297
|
+
constructor(par) {
|
|
298
|
+
super(isRichErrorMessages(par) ? par : {
|
|
299
|
+
dev: `The provided ${capitalize(par)} OAuth token could not be verified against ${capitalize(par)} services.`,
|
|
300
|
+
user: couldntSignIn(par)
|
|
301
|
+
});
|
|
302
|
+
this.name = "OAuthTokenVerificationError";
|
|
303
|
+
}
|
|
202
304
|
};
|
|
203
305
|
var OAuthMissingInfoError = class extends RichError {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
};
|
|
214
|
-
var OAuthErrors = [OAuthTokenVerificationError, OAuthMissingInfoError];
|
|
306
|
+
constructor(par, missing) {
|
|
307
|
+
super(isRichErrorMessages(par) ? par : {
|
|
308
|
+
dev: `Some user information is missing at the end of the ${capitalize(par)} OAuth authentication flow: ${missing?.join(", ")}. This shouldn't happen and requires investigation from the fxhash team. Please forward this issue to our team.`,
|
|
309
|
+
user: couldntSignIn(par)
|
|
310
|
+
});
|
|
311
|
+
this.name = "OAuthMissingInfoError";
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
const OAuthErrors = [OAuthTokenVerificationError, OAuthMissingInfoError];
|
|
215
315
|
|
|
216
|
-
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region src/errors/graphql/wallet-linking.ts
|
|
217
318
|
var WalletAlreadyOtherAccountMainWalletError = class extends RichError {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
319
|
+
constructor(..._args) {
|
|
320
|
+
super(..._args);
|
|
321
|
+
this.name = "WalletAlreadyOtherAccountMainWalletError";
|
|
322
|
+
this.messages = {
|
|
323
|
+
dev: "Wallet is already the main wallet of another account.",
|
|
324
|
+
user: "This wallet is already registered as the main wallet for another account. To link this wallet to your current account, you need to delete the account associated with this wallet first. Please log in to the other account and proceed to delete the account from the profile menu. After this, you can link the wallet to this account."
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
static {
|
|
328
|
+
this.errorType = "WalletAlreadyOtherAccountMainWalletError";
|
|
329
|
+
}
|
|
330
|
+
};
|
|
228
331
|
var WalletAlreadyLinkedError = class extends RichError {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
332
|
+
constructor(..._args2) {
|
|
333
|
+
super(..._args2);
|
|
334
|
+
this.name = "WalletAlreadyLinkedError";
|
|
335
|
+
this.messages = {
|
|
336
|
+
dev: "Wallet is already linked to another account (not as the main wallet)",
|
|
337
|
+
user: "This wallet is already associated to another account. You must first connect to your other account and unlink this wallet from it."
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
static {
|
|
341
|
+
this.errorType = "WalletAlreadyLinkedError";
|
|
342
|
+
}
|
|
343
|
+
};
|
|
239
344
|
var AccountAlreadyLinkedOnNetworkError = class extends RichError {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
WalletAlreadyLinkedError,
|
|
253
|
-
AccountAlreadyLinkedOnNetworkError
|
|
345
|
+
constructor(par) {
|
|
346
|
+
super(isRichErrorMessages(par) ? par : {
|
|
347
|
+
dev: `Account already linked to a wallet on ${par.toLowerCase()}. There can only be one wallet per network linked to each account.`,
|
|
348
|
+
user: `Your account is already linked to a wallet on ${par.toLowerCase()}`
|
|
349
|
+
});
|
|
350
|
+
this.name = "AccountAlreadyLinkedOnNetworkError";
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
const LinkWalletErrors = [
|
|
354
|
+
WalletAlreadyOtherAccountMainWalletError,
|
|
355
|
+
WalletAlreadyLinkedError,
|
|
356
|
+
AccountAlreadyLinkedOnNetworkError
|
|
254
357
|
];
|
|
255
358
|
var WalletNotLinkedToAccountError = class extends RichError {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
359
|
+
constructor(..._args3) {
|
|
360
|
+
super(..._args3);
|
|
361
|
+
this.name = "WalletNotLinkedToAccountError";
|
|
362
|
+
this.messages = {
|
|
363
|
+
dev: "Wallet cannot be unlinked because it's not linked to the account currently authenticated",
|
|
364
|
+
user: "The wallet cannot be unlinked because it isn't linked to your account."
|
|
365
|
+
};
|
|
366
|
+
}
|
|
264
367
|
};
|
|
265
368
|
var MainWalletCannotBeUnlinkedError = class extends RichError {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
};
|
|
275
|
-
|
|
369
|
+
constructor(..._args4) {
|
|
370
|
+
super(..._args4);
|
|
371
|
+
this.name = "MainWalletCannotBeUnlinkedError";
|
|
372
|
+
this.messages = {
|
|
373
|
+
dev: "The main wallet of an account cannot be unlinked from the account.",
|
|
374
|
+
user: "This wallet is the main one associated with your account, as such it cannot be unlinked."
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
const UnlinkWalletErrors = [WalletNotLinkedToAccountError, MainWalletCannotBeUnlinkedError];
|
|
276
379
|
|
|
277
|
-
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region src/errors/core.ts
|
|
278
382
|
var WalletSourceRequestConnectionRejectedError = class extends RichError {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
383
|
+
constructor(..._args) {
|
|
384
|
+
super(..._args);
|
|
385
|
+
this.name = "WalletSourceRequestConnectionRejectedError";
|
|
386
|
+
this.messages = {
|
|
387
|
+
dev: "The connection request was rejected by the user",
|
|
388
|
+
user: "It looks like you've rejected the connection request - if you didn't mean to, please try again"
|
|
389
|
+
};
|
|
390
|
+
}
|
|
287
391
|
};
|
|
288
392
|
var WalletSourceRequestConnectionUnknownError = class extends RichError {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
this.name = "WalletSourceRequestConnectionUnknownError";
|
|
297
|
-
}
|
|
393
|
+
constructor(par) {
|
|
394
|
+
super(isRichErrorMessages(par) ? par : {
|
|
395
|
+
dev: `An unknown error occurred while requesting a connection: ${par}`,
|
|
396
|
+
user: "An unknown error occurred while trying to connect to your wallet - please try again"
|
|
397
|
+
});
|
|
398
|
+
this.name = "WalletSourceRequestConnectionUnknownError";
|
|
399
|
+
}
|
|
298
400
|
};
|
|
299
401
|
var WalletSourceRequestConnectionWalletNotAvailableError = class extends RichError {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
WalletSourceRequestConnectionUnknownError,
|
|
313
|
-
WalletSourceRequestConnectionWalletNotAvailableError
|
|
402
|
+
constructor(par) {
|
|
403
|
+
super(isRichErrorMessages(par) ? par : {
|
|
404
|
+
dev: `The wallet source for ${par} is not available`,
|
|
405
|
+
user: "An unknown error occurred while trying to connect to your wallet - please try again"
|
|
406
|
+
});
|
|
407
|
+
this.name = "WalletSourceRequestConnectionWalletNotAvailableError";
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
const WalletSourceRequestConnectionErrors = [
|
|
411
|
+
WalletSourceRequestConnectionRejectedError,
|
|
412
|
+
WalletSourceRequestConnectionUnknownError,
|
|
413
|
+
WalletSourceRequestConnectionWalletNotAvailableError
|
|
314
414
|
];
|
|
315
415
|
var NoWalletConnectedForNetworkError = class extends RichError {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
this.name = "NoWalletConnectedForNetworkError";
|
|
324
|
-
}
|
|
416
|
+
constructor(par) {
|
|
417
|
+
super(isRichErrorMessages(par) ? par : {
|
|
418
|
+
dev: `${par} - No wallet is connected to the client`,
|
|
419
|
+
user: "A wallet needs to be connected before performing this action"
|
|
420
|
+
});
|
|
421
|
+
this.name = "NoWalletConnectedForNetworkError";
|
|
422
|
+
}
|
|
325
423
|
};
|
|
326
424
|
|
|
327
|
-
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region src/errors/wallet-api.ts
|
|
328
427
|
var WalletAPIRpcUnknownNetworkError = class extends RichError {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
this.name = "WalletApiRpcHealthError";
|
|
337
|
-
}
|
|
428
|
+
constructor(par) {
|
|
429
|
+
super(isRichErrorMessages(par) ? par : {
|
|
430
|
+
dev: `Could not check rpc health for network: ${par}`,
|
|
431
|
+
user: "Rpc health check failed"
|
|
432
|
+
});
|
|
433
|
+
this.name = "WalletApiRpcHealthError";
|
|
434
|
+
}
|
|
338
435
|
};
|
|
339
436
|
var WalletAPIInvalidRequestError = class extends RichError {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
);
|
|
350
|
-
this.name = "WalletAPIInvalidRequestError";
|
|
351
|
-
}
|
|
437
|
+
constructor(par) {
|
|
438
|
+
const details = Array.isArray(par) ? `\nValidation errors:\n${par.map((err) => ` - ${err.path.join(".")}: ${err.message}`).join("\n")}` : "";
|
|
439
|
+
super(isRichErrorMessages(par) ? par : {
|
|
440
|
+
dev: `Invalid operation request payload.${details}`,
|
|
441
|
+
user: "Invalid request. Please check your input and try again."
|
|
442
|
+
});
|
|
443
|
+
this.name = "WalletAPIInvalidRequestError";
|
|
444
|
+
}
|
|
352
445
|
};
|
|
353
446
|
var WalletAPIFetchError = class extends RichError {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
this.name = "WalletAPIFetchError";
|
|
362
|
-
}
|
|
447
|
+
constructor(par, statusCode, attempt, maxRetries) {
|
|
448
|
+
super(isRichErrorMessages(par) ? par : {
|
|
449
|
+
dev: `Request to ${par} failed (status: ${statusCode}) on attempt ${attempt}/${maxRetries}`,
|
|
450
|
+
user: "Failed to fetch required data. Please try again later."
|
|
451
|
+
});
|
|
452
|
+
this.name = "WalletAPIFetchError";
|
|
453
|
+
}
|
|
363
454
|
};
|
|
364
455
|
var WalletAPIFetchTimeoutError = class extends RichError {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
this.name = "WalletAPIFetchTimeoutError";
|
|
374
|
-
}
|
|
456
|
+
constructor(par, maxRetries, finalError) {
|
|
457
|
+
const errorMessage = finalError instanceof Error ? finalError.message : String(finalError);
|
|
458
|
+
super(isRichErrorMessages(par) ? par : {
|
|
459
|
+
dev: `Request to ${par} failed after ${maxRetries} retries. Final error: ${errorMessage}`,
|
|
460
|
+
user: "Service temporarily unavailable. Please try again later."
|
|
461
|
+
});
|
|
462
|
+
this.name = "WalletAPIFetchTimeoutError";
|
|
463
|
+
}
|
|
375
464
|
};
|
|
376
465
|
var WalletAPIInvalidURLError = class extends RichError {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
WalletAPIFetchTimeoutError,
|
|
392
|
-
WalletAPIInvalidURLError
|
|
466
|
+
constructor(par) {
|
|
467
|
+
super(isRichErrorMessages(par) ? par : {
|
|
468
|
+
dev: `Invalid URL provided: ${par}`,
|
|
469
|
+
user: "Invalid request URL configuration."
|
|
470
|
+
});
|
|
471
|
+
this.name = "WalletAPIInvalidURLError";
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
const WalletAPIErrors = [
|
|
475
|
+
WalletAPIRpcUnknownNetworkError,
|
|
476
|
+
WalletAPIInvalidRequestError,
|
|
477
|
+
WalletAPIFetchError,
|
|
478
|
+
WalletAPIFetchTimeoutError,
|
|
479
|
+
WalletAPIInvalidURLError
|
|
393
480
|
];
|
|
394
481
|
|
|
395
|
-
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/errors/web3auth.ts
|
|
396
484
|
var Web3AuthFrameNotLoading = class extends RichError {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
this.name = "Web3AuthFrameNotLoading";
|
|
406
|
-
}
|
|
485
|
+
constructor(par1, error) {
|
|
486
|
+
const _error = error ? typeof error === "string" ? error : error.type : "/";
|
|
487
|
+
super(isRichErrorMessages(par1) ? par1 : {
|
|
488
|
+
dev: `Fxhash embedded wallet iframe (at "${par1}") could not be loaded. The following error was retured: ${_error}`,
|
|
489
|
+
user: "Fxhash embedded wallet has not loaded"
|
|
490
|
+
});
|
|
491
|
+
this.name = "Web3AuthFrameNotLoading";
|
|
492
|
+
}
|
|
407
493
|
};
|
|
408
494
|
var Web3AuthFrameNotResponding = class extends RichError {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
495
|
+
constructor(url) {
|
|
496
|
+
super({
|
|
497
|
+
dev: `Fxhash embedded wallet iframe (at "${url}") is not responding to requests`,
|
|
498
|
+
user: "Fxhash embedded wallet is not responding"
|
|
499
|
+
});
|
|
500
|
+
this.name = "Web3AuthFrameNotResponding";
|
|
501
|
+
}
|
|
416
502
|
};
|
|
417
503
|
var Web3AuthFrameNotInitialized = class extends RichError {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
504
|
+
constructor(..._args) {
|
|
505
|
+
super(..._args);
|
|
506
|
+
this.name = "Web3AuthFrameNotInitialized";
|
|
507
|
+
this.messages = {
|
|
508
|
+
dev: "Fxhash embedded wallet <iframe> hasn't been initialized while it should have",
|
|
509
|
+
user: "Fxhash embedded wallet wasn't initialized"
|
|
510
|
+
};
|
|
511
|
+
}
|
|
426
512
|
};
|
|
427
513
|
var Web3AuthFrameAuthenticationError = class extends RichError {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
514
|
+
constructor(..._args2) {
|
|
515
|
+
super(..._args2);
|
|
516
|
+
this.name = "Web3AuthFrameAuthenticationError";
|
|
517
|
+
this.messages = {
|
|
518
|
+
dev: "An error occurred when attempting to authenticate on Web3Auth",
|
|
519
|
+
user: "Authentication error"
|
|
520
|
+
};
|
|
521
|
+
}
|
|
436
522
|
};
|
|
437
523
|
var Web3AuthFrameFxhashAuthenticationError = class extends RichError {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
524
|
+
constructor(..._args3) {
|
|
525
|
+
super(..._args3);
|
|
526
|
+
this.name = "Web3AuthFrameFxhashAuthenticationError";
|
|
527
|
+
this.messages = {
|
|
528
|
+
dev: "An error occurred when attempting to authenticate on fxhash",
|
|
529
|
+
user: "Authentication error"
|
|
530
|
+
};
|
|
531
|
+
}
|
|
446
532
|
};
|
|
447
533
|
var Web3AuthFrameLogoutFailedError = class extends RichError {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
534
|
+
constructor(..._args4) {
|
|
535
|
+
super(..._args4);
|
|
536
|
+
this.name = "Web3AuthFrameLogoutFailedError";
|
|
537
|
+
this.messages = {
|
|
538
|
+
dev: "Logout failed. This is likely an issue on fxhash end.",
|
|
539
|
+
user: "Could not logout your account. Please try again."
|
|
540
|
+
};
|
|
541
|
+
}
|
|
456
542
|
};
|
|
457
543
|
var Web3AuthInitializationFailedError = class extends RichError {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
544
|
+
constructor(..._args5) {
|
|
545
|
+
super(..._args5);
|
|
546
|
+
this.name = "Web3AuthInitializationFailedError";
|
|
547
|
+
this.messages = {
|
|
548
|
+
dev: "Web3Auth initialization failed, as such the embedded wallet cannot be constructed and used. If this issue persists, please raise it on Github.",
|
|
549
|
+
user: "Could not initialize embedded wallet."
|
|
550
|
+
};
|
|
551
|
+
}
|
|
466
552
|
};
|
|
467
553
|
var Web3AuthFrameUnknownError = class extends RichError {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
};
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
export {
|
|
492
|
-
AccountAlreadyLinkedOnNetworkError,
|
|
493
|
-
AllWeb3AuthFrameErrors,
|
|
494
|
-
EmailOTPExpiredError,
|
|
495
|
-
EmailOTPInvalidError,
|
|
496
|
-
EmailOTPLockedError,
|
|
497
|
-
EmailOTPRequestErrors,
|
|
498
|
-
EmailOTPVerificationErrors,
|
|
499
|
-
GraphQLErrors,
|
|
500
|
-
LinkWalletErrors,
|
|
501
|
-
MainWalletCannotBeUnlinkedError,
|
|
502
|
-
NetworkRichError,
|
|
503
|
-
NoWalletConnectedForNetworkError,
|
|
504
|
-
OAuthErrors,
|
|
505
|
-
OAuthMissingInfoError,
|
|
506
|
-
OAuthTokenVerificationError,
|
|
507
|
-
RichError,
|
|
508
|
-
UnexpectedRichError,
|
|
509
|
-
UnexpectedRichErrorMessages,
|
|
510
|
-
UnlinkWalletErrors,
|
|
511
|
-
WalletAPIErrors,
|
|
512
|
-
WalletAPIFetchError,
|
|
513
|
-
WalletAPIFetchTimeoutError,
|
|
514
|
-
WalletAPIInvalidRequestError,
|
|
515
|
-
WalletAPIInvalidURLError,
|
|
516
|
-
WalletAPIRpcUnknownNetworkError,
|
|
517
|
-
WalletAlreadyLinkedError,
|
|
518
|
-
WalletAlreadyOtherAccountMainWalletError,
|
|
519
|
-
WalletNotLinkedToAccountError,
|
|
520
|
-
WalletSourceRequestConnectionErrors,
|
|
521
|
-
WalletSourceRequestConnectionRejectedError,
|
|
522
|
-
WalletSourceRequestConnectionUnknownError,
|
|
523
|
-
WalletSourceRequestConnectionWalletNotAvailableError,
|
|
524
|
-
Web3AuthFrameAuthenticationError,
|
|
525
|
-
Web3AuthFrameErrors,
|
|
526
|
-
Web3AuthFrameFxhashAuthenticationError,
|
|
527
|
-
Web3AuthFrameLogoutFailedError,
|
|
528
|
-
Web3AuthFrameNotInitialized,
|
|
529
|
-
Web3AuthFrameNotLoading,
|
|
530
|
-
Web3AuthFrameNotResponding,
|
|
531
|
-
Web3AuthFrameUnknownError,
|
|
532
|
-
Web3AuthInitializationFailedError,
|
|
533
|
-
isErrorOfKind,
|
|
534
|
-
isFxhashErrorExtensions,
|
|
535
|
-
isRichErrorMessages,
|
|
536
|
-
richError,
|
|
537
|
-
richErrorFromGraphQLError,
|
|
538
|
-
richResultFromGraphQLResponse,
|
|
539
|
-
typedRichErrorFromGraphQLError
|
|
540
|
-
};
|
|
554
|
+
constructor(..._args6) {
|
|
555
|
+
super(..._args6);
|
|
556
|
+
this.name = "Web3AuthFrameUnknownError";
|
|
557
|
+
this.messages = {
|
|
558
|
+
dev: "An unexpected error was raised using Web3Auth",
|
|
559
|
+
user: UnexpectedRichErrorMessages.user
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
const Web3AuthFrameErrors = {
|
|
564
|
+
init: [Web3AuthInitializationFailedError],
|
|
565
|
+
getSessionDetails: [Web3AuthFrameAuthenticationError],
|
|
566
|
+
login: [
|
|
567
|
+
Web3AuthFrameAuthenticationError,
|
|
568
|
+
Web3AuthFrameFxhashAuthenticationError,
|
|
569
|
+
Web3AuthFrameUnknownError
|
|
570
|
+
],
|
|
571
|
+
logout: [Web3AuthFrameLogoutFailedError]
|
|
572
|
+
};
|
|
573
|
+
const AllWeb3AuthFrameErrors = Array().concat.apply([], Object.values(Web3AuthFrameErrors));
|
|
574
|
+
|
|
575
|
+
//#endregion
|
|
576
|
+
export { AccountAlreadyLinkedOnNetworkError, AllWeb3AuthFrameErrors, EmailOTPExpiredError, EmailOTPInvalidError, EmailOTPLockedError, EmailOTPRequestErrors, EmailOTPVerificationErrors, GraphQLErrors, LinkWalletErrors, MainWalletCannotBeUnlinkedError, NetworkRichError, NoWalletConnectedForNetworkError, OAuthErrors, OAuthMissingInfoError, OAuthTokenVerificationError, RichError, UnexpectedRichError, UnexpectedRichErrorMessages, UnlinkWalletErrors, WalletAPIErrors, WalletAPIFetchError, WalletAPIFetchTimeoutError, WalletAPIInvalidRequestError, WalletAPIInvalidURLError, WalletAPIRpcUnknownNetworkError, WalletAlreadyLinkedError, WalletAlreadyOtherAccountMainWalletError, WalletNotLinkedToAccountError, WalletSourceRequestConnectionErrors, WalletSourceRequestConnectionRejectedError, WalletSourceRequestConnectionUnknownError, WalletSourceRequestConnectionWalletNotAvailableError, Web3AuthFrameAuthenticationError, Web3AuthFrameErrors, Web3AuthFrameFxhashAuthenticationError, Web3AuthFrameLogoutFailedError, Web3AuthFrameNotInitialized, Web3AuthFrameNotLoading, Web3AuthFrameNotResponding, Web3AuthFrameUnknownError, Web3AuthInitializationFailedError, isErrorOfKind, isFxhashErrorExtensions, isRichErrorMessages, richError, richErrorFromGraphQLError, richResultFromGraphQLResponse, typedRichErrorFromGraphQLError };
|
|
541
577
|
//# sourceMappingURL=index.js.map
|