denotify-client 1.1.30 → 1.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/denotify-client.cjs +2 -2
- package/dist/denotify-client.iife.js +2 -2
- package/dist/denotify-client.mjs +370 -346
- package/package.json +1 -1
package/dist/denotify-client.mjs
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
var Yi = Object.defineProperty;
|
2
2
|
var Qi = (n, e, t) => e in n ? Yi(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
3
|
-
var d = (n, e, t) => (Qi(n, typeof e != "symbol" ? e + "" : e, t), t),
|
3
|
+
var d = (n, e, t) => (Qi(n, typeof e != "symbol" ? e + "" : e, t), t), zr = (n, e, t) => {
|
4
4
|
if (!e.has(n))
|
5
5
|
throw TypeError("Cannot " + t);
|
6
6
|
};
|
7
|
-
var m = (n, e, t) => (
|
7
|
+
var m = (n, e, t) => (zr(n, e, "read from private field"), t ? t.call(n) : e.get(n)), F = (n, e, t) => {
|
8
8
|
if (e.has(n))
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
10
10
|
e instanceof WeakSet ? e.add(n) : e.set(n, t);
|
11
|
-
}, P = (n, e, t, r) => (
|
11
|
+
}, P = (n, e, t, r) => (zr(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t), Xn = (n, e, t, r) => ({
|
12
12
|
set _(s) {
|
13
13
|
P(n, e, s, t);
|
14
14
|
},
|
15
15
|
get _() {
|
16
16
|
return m(n, e, r);
|
17
17
|
}
|
18
|
-
}), B = (n, e, t) => (
|
18
|
+
}), B = (n, e, t) => (zr(n, e, "access private method"), t);
|
19
19
|
function eo(n, e) {
|
20
20
|
for (var t = 0; t < e.length; t++) {
|
21
21
|
const r = e[t];
|
@@ -65,22 +65,22 @@ const ro = (n) => {
|
|
65
65
|
return yield (yield Promise.resolve().then(() => Sr)).fetch(...t);
|
66
66
|
}) : e = fetch, (...t) => e(...t);
|
67
67
|
};
|
68
|
-
class
|
68
|
+
class An extends Error {
|
69
69
|
constructor(e, t = "FunctionsError", r) {
|
70
70
|
super(e), super.name = t, this.context = r;
|
71
71
|
}
|
72
72
|
}
|
73
|
-
class no extends
|
73
|
+
class no extends An {
|
74
74
|
constructor(e) {
|
75
75
|
super("Failed to send a request to the Edge Function", "FunctionsFetchError", e);
|
76
76
|
}
|
77
77
|
}
|
78
|
-
class so extends
|
78
|
+
class so extends An {
|
79
79
|
constructor(e) {
|
80
80
|
super("Relay Error invoking the Edge Function", "FunctionsRelayError", e);
|
81
81
|
}
|
82
82
|
}
|
83
|
-
class io extends
|
83
|
+
class io extends An {
|
84
84
|
constructor(e) {
|
85
85
|
super("Edge Function returned a non-2xx status code", "FunctionsHttpError", e);
|
86
86
|
}
|
@@ -220,8 +220,8 @@ var It = {}, lo = {
|
|
220
220
|
function p(f) {
|
221
221
|
var b = {
|
222
222
|
next: function() {
|
223
|
-
var
|
224
|
-
return { done:
|
223
|
+
var T = f.shift();
|
224
|
+
return { done: T === void 0, value: T };
|
225
225
|
}
|
226
226
|
};
|
227
227
|
return a.iterable && (b[Symbol.iterator] = function() {
|
@@ -229,8 +229,8 @@ var It = {}, lo = {
|
|
229
229
|
}), b;
|
230
230
|
}
|
231
231
|
function w(f) {
|
232
|
-
this.map = {}, f instanceof w ? f.forEach(function(b,
|
233
|
-
this.append(
|
232
|
+
this.map = {}, f instanceof w ? f.forEach(function(b, T) {
|
233
|
+
this.append(T, b);
|
234
234
|
}, this) : Array.isArray(f) ? f.forEach(function(b) {
|
235
235
|
this.append(b[0], b[1]);
|
236
236
|
}, this) : f && Object.getOwnPropertyNames(f).forEach(function(b) {
|
@@ -239,8 +239,8 @@ var It = {}, lo = {
|
|
239
239
|
}
|
240
240
|
w.prototype.append = function(f, b) {
|
241
241
|
f = h(f), b = y(b);
|
242
|
-
var
|
243
|
-
this.map[f] =
|
242
|
+
var T = this.map[f];
|
243
|
+
this.map[f] = T ? T + ", " + b : b;
|
244
244
|
}, w.prototype.delete = function(f) {
|
245
245
|
delete this.map[h(f)];
|
246
246
|
}, w.prototype.get = function(f) {
|
@@ -250,12 +250,12 @@ var It = {}, lo = {
|
|
250
250
|
}, w.prototype.set = function(f, b) {
|
251
251
|
this.map[h(f)] = y(b);
|
252
252
|
}, w.prototype.forEach = function(f, b) {
|
253
|
-
for (var
|
254
|
-
this.map.hasOwnProperty(
|
253
|
+
for (var T in this.map)
|
254
|
+
this.map.hasOwnProperty(T) && f.call(b, this.map[T], T, this);
|
255
255
|
}, w.prototype.keys = function() {
|
256
256
|
var f = [];
|
257
|
-
return this.forEach(function(b,
|
258
|
-
f.push(
|
257
|
+
return this.forEach(function(b, T) {
|
258
|
+
f.push(T);
|
259
259
|
}), p(f);
|
260
260
|
}, w.prototype.values = function() {
|
261
261
|
var f = [];
|
@@ -264,8 +264,8 @@ var It = {}, lo = {
|
|
264
264
|
}), p(f);
|
265
265
|
}, w.prototype.entries = function() {
|
266
266
|
var f = [];
|
267
|
-
return this.forEach(function(b,
|
268
|
-
f.push([
|
267
|
+
return this.forEach(function(b, T) {
|
268
|
+
f.push([T, b]);
|
269
269
|
}), p(f);
|
270
270
|
}, a.iterable && (w.prototype[Symbol.iterator] = w.prototype.entries);
|
271
271
|
function v(f) {
|
@@ -274,26 +274,26 @@ var It = {}, lo = {
|
|
274
274
|
f.bodyUsed = !0;
|
275
275
|
}
|
276
276
|
function g(f) {
|
277
|
-
return new Promise(function(b,
|
277
|
+
return new Promise(function(b, T) {
|
278
278
|
f.onload = function() {
|
279
279
|
b(f.result);
|
280
280
|
}, f.onerror = function() {
|
281
|
-
|
281
|
+
T(f.error);
|
282
282
|
};
|
283
283
|
});
|
284
284
|
}
|
285
285
|
function A(f) {
|
286
|
-
var b = new FileReader(),
|
287
|
-
return b.readAsArrayBuffer(f),
|
286
|
+
var b = new FileReader(), T = g(b);
|
287
|
+
return b.readAsArrayBuffer(f), T;
|
288
288
|
}
|
289
289
|
function C(f) {
|
290
|
-
var b = new FileReader(),
|
291
|
-
return b.readAsText(f),
|
290
|
+
var b = new FileReader(), T = g(b);
|
291
|
+
return b.readAsText(f), T;
|
292
292
|
}
|
293
293
|
function X(f) {
|
294
|
-
for (var b = new Uint8Array(f),
|
295
|
-
|
296
|
-
return
|
294
|
+
for (var b = new Uint8Array(f), T = new Array(b.length), J = 0; J < b.length; J++)
|
295
|
+
T[J] = String.fromCharCode(b[J]);
|
296
|
+
return T.join("");
|
297
297
|
}
|
298
298
|
function U(f) {
|
299
299
|
if (f.slice)
|
@@ -341,32 +341,32 @@ var It = {}, lo = {
|
|
341
341
|
}
|
342
342
|
function fe(f, b) {
|
343
343
|
b = b || {};
|
344
|
-
var
|
344
|
+
var T = b.body;
|
345
345
|
if (f instanceof fe) {
|
346
346
|
if (f.bodyUsed)
|
347
347
|
throw new TypeError("Already read");
|
348
|
-
this.url = f.url, this.credentials = f.credentials, b.headers || (this.headers = new w(f.headers)), this.method = f.method, this.mode = f.mode, this.signal = f.signal, !
|
348
|
+
this.url = f.url, this.credentials = f.credentials, b.headers || (this.headers = new w(f.headers)), this.method = f.method, this.mode = f.mode, this.signal = f.signal, !T && f._bodyInit != null && (T = f._bodyInit, f.bodyUsed = !0);
|
349
349
|
} else
|
350
350
|
this.url = String(f);
|
351
|
-
if (this.credentials = b.credentials || this.credentials || "same-origin", (b.headers || !this.headers) && (this.headers = new w(b.headers)), this.method = rr(b.method || this.method || "GET"), this.mode = b.mode || this.mode || null, this.signal = b.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") &&
|
351
|
+
if (this.credentials = b.credentials || this.credentials || "same-origin", (b.headers || !this.headers) && (this.headers = new w(b.headers)), this.method = rr(b.method || this.method || "GET"), this.mode = b.mode || this.mode || null, this.signal = b.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && T)
|
352
352
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
353
|
-
this._initBody(
|
353
|
+
this._initBody(T);
|
354
354
|
}
|
355
355
|
fe.prototype.clone = function() {
|
356
356
|
return new fe(this, { body: this._bodyInit });
|
357
357
|
};
|
358
358
|
function nr(f) {
|
359
359
|
var b = new FormData();
|
360
|
-
return f.trim().split("&").forEach(function(
|
361
|
-
if (
|
362
|
-
var J =
|
360
|
+
return f.trim().split("&").forEach(function(T) {
|
361
|
+
if (T) {
|
362
|
+
var J = T.split("="), V = J.shift().replace(/\+/g, " "), N = J.join("=").replace(/\+/g, " ");
|
363
363
|
b.append(decodeURIComponent(V), decodeURIComponent(N));
|
364
364
|
}
|
365
365
|
}), b;
|
366
366
|
}
|
367
367
|
function L(f) {
|
368
|
-
var b = new w(),
|
369
|
-
return
|
368
|
+
var b = new w(), T = f.replace(/\r?\n[\t ]+/g, " ");
|
369
|
+
return T.split(/\r?\n/).forEach(function(J) {
|
370
370
|
var V = J.split(":"), N = V.shift().trim();
|
371
371
|
if (N) {
|
372
372
|
var ir = V.join(":").trim();
|
@@ -398,14 +398,14 @@ var It = {}, lo = {
|
|
398
398
|
try {
|
399
399
|
new o.DOMException();
|
400
400
|
} catch {
|
401
|
-
o.DOMException = function(b,
|
402
|
-
this.message = b, this.name =
|
401
|
+
o.DOMException = function(b, T) {
|
402
|
+
this.message = b, this.name = T;
|
403
403
|
var J = Error(b);
|
404
404
|
this.stack = J.stack;
|
405
405
|
}, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException;
|
406
406
|
}
|
407
407
|
function gt(f, b) {
|
408
|
-
return new Promise(function(
|
408
|
+
return new Promise(function(T, J) {
|
409
409
|
var V = new fe(f, b);
|
410
410
|
if (V.signal && V.signal.aborted)
|
411
411
|
return J(new o.DOMException("Aborted", "AbortError"));
|
@@ -420,16 +420,16 @@ var It = {}, lo = {
|
|
420
420
|
headers: L(N.getAllResponseHeaders() || "")
|
421
421
|
};
|
422
422
|
Ut.url = "responseURL" in N ? N.responseURL : Ut.headers.get("X-Request-URL");
|
423
|
-
var
|
424
|
-
|
423
|
+
var Vr = "response" in N ? N.response : N.responseText;
|
424
|
+
T(new M(Vr, Ut));
|
425
425
|
}, N.onerror = function() {
|
426
426
|
J(new TypeError("Network request failed"));
|
427
427
|
}, N.ontimeout = function() {
|
428
428
|
J(new TypeError("Network request failed"));
|
429
429
|
}, N.onabort = function() {
|
430
430
|
J(new o.DOMException("Aborted", "AbortError"));
|
431
|
-
}, N.open(V.method, V.url, !0), V.credentials === "include" ? N.withCredentials = !0 : V.credentials === "omit" && (N.withCredentials = !1), "responseType" in N && a.blob && (N.responseType = "blob"), V.headers.forEach(function(Ut,
|
432
|
-
N.setRequestHeader(
|
431
|
+
}, N.open(V.method, V.url, !0), V.credentials === "include" ? N.withCredentials = !0 : V.credentials === "omit" && (N.withCredentials = !1), "responseType" in N && a.blob && (N.responseType = "blob"), V.headers.forEach(function(Ut, Vr) {
|
432
|
+
N.setRequestHeader(Vr, Ut);
|
433
433
|
}), V.signal && (V.signal.addEventListener("abort", ir), N.onreadystatechange = function() {
|
434
434
|
N.readyState === 4 && V.signal.removeEventListener("abort", ir);
|
435
435
|
}), N.send(typeof V._bodyInit > "u" ? null : V._bodyInit);
|
@@ -441,13 +441,13 @@ var It = {}, lo = {
|
|
441
441
|
var s = r;
|
442
442
|
e = s.fetch, e.default = s.fetch, e.fetch = s.fetch, e.Headers = s.Headers, e.Request = s.Request, e.Response = s.Response, n.exports = e;
|
443
443
|
})(lo, It);
|
444
|
-
const
|
444
|
+
const Sn = /* @__PURE__ */ uo(It), Sr = /* @__PURE__ */ eo({
|
445
445
|
__proto__: null,
|
446
|
-
default:
|
446
|
+
default: Sn
|
447
447
|
}, [It]);
|
448
448
|
class ho {
|
449
449
|
constructor(e) {
|
450
|
-
this.shouldThrowOnError = !1, this.method = e.method, this.url = e.url, this.headers = e.headers, this.schema = e.schema, this.body = e.body, this.shouldThrowOnError = e.shouldThrowOnError, this.signal = e.signal, this.allowEmpty = e.allowEmpty, e.fetch ? this.fetch = e.fetch : typeof fetch > "u" ? this.fetch =
|
450
|
+
this.shouldThrowOnError = !1, this.method = e.method, this.url = e.url, this.headers = e.headers, this.schema = e.schema, this.body = e.body, this.shouldThrowOnError = e.shouldThrowOnError, this.signal = e.signal, this.allowEmpty = e.allowEmpty, e.fetch ? this.fetch = e.fetch : typeof fetch > "u" ? this.fetch = Sn : this.fetch = fetch;
|
451
451
|
}
|
452
452
|
/**
|
453
453
|
* If there's an error with the query, throwOnError will reject the promise by
|
@@ -1176,10 +1176,10 @@ class go {
|
|
1176
1176
|
});
|
1177
1177
|
}
|
1178
1178
|
}
|
1179
|
-
var
|
1179
|
+
var qr, Zn;
|
1180
1180
|
function wo() {
|
1181
1181
|
if (Zn)
|
1182
|
-
return
|
1182
|
+
return qr;
|
1183
1183
|
Zn = 1;
|
1184
1184
|
var n = function() {
|
1185
1185
|
if (typeof self == "object" && self)
|
@@ -1188,7 +1188,7 @@ function wo() {
|
|
1188
1188
|
return window;
|
1189
1189
|
throw new Error("Unable to resolve global `this`");
|
1190
1190
|
};
|
1191
|
-
return
|
1191
|
+
return qr = function() {
|
1192
1192
|
if (this)
|
1193
1193
|
return this;
|
1194
1194
|
if (typeof globalThis == "object" && globalThis)
|
@@ -1208,7 +1208,7 @@ function wo() {
|
|
1208
1208
|
} finally {
|
1209
1209
|
delete Object.prototype.__global__;
|
1210
1210
|
}
|
1211
|
-
}(),
|
1211
|
+
}(), qr;
|
1212
1212
|
}
|
1213
1213
|
const bo = "websocket", vo = "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.", _o = [
|
1214
1214
|
"websocket",
|
@@ -1300,18 +1300,18 @@ var Mt;
|
|
1300
1300
|
(function(n) {
|
1301
1301
|
n[n.connecting = 0] = "connecting", n[n.open = 1] = "open", n[n.closing = 2] = "closing", n[n.closed = 3] = "closed";
|
1302
1302
|
})(Mt || (Mt = {}));
|
1303
|
-
var
|
1303
|
+
var ne;
|
1304
1304
|
(function(n) {
|
1305
1305
|
n.closed = "closed", n.errored = "errored", n.joined = "joined", n.joining = "joining", n.leaving = "leaving";
|
1306
|
-
})(
|
1306
|
+
})(ne || (ne = {}));
|
1307
1307
|
var ye;
|
1308
1308
|
(function(n) {
|
1309
1309
|
n.close = "phx_close", n.error = "phx_error", n.join = "phx_join", n.reply = "phx_reply", n.leave = "phx_leave", n.access_token = "access_token";
|
1310
1310
|
})(ye || (ye = {}));
|
1311
|
-
var
|
1311
|
+
var on;
|
1312
1312
|
(function(n) {
|
1313
1313
|
n.websocket = "websocket";
|
1314
|
-
})(
|
1314
|
+
})(on || (on = {}));
|
1315
1315
|
var et;
|
1316
1316
|
(function(n) {
|
1317
1317
|
n.Connecting = "connecting", n.Open = "open", n.Closing = "closing", n.Closed = "closed";
|
@@ -1352,7 +1352,7 @@ class zo {
|
|
1352
1352
|
return { ref: null, topic: a, event: c, payload: u };
|
1353
1353
|
}
|
1354
1354
|
}
|
1355
|
-
class
|
1355
|
+
class Gr {
|
1356
1356
|
/**
|
1357
1357
|
* Initializes the Push
|
1358
1358
|
*
|
@@ -1586,7 +1586,7 @@ const Qn = (n, e, t = {}) => {
|
|
1586
1586
|
return Object.keys(e).reduce((i, o) => (i[o] = qo(o, n, e, s), i), {});
|
1587
1587
|
}, qo = (n, e, t, r) => {
|
1588
1588
|
const s = e.find((a) => a.name === n), i = s == null ? void 0 : s.type, o = t[n];
|
1589
|
-
return i && !r.includes(i) ? Gs(i, o) :
|
1589
|
+
return i && !r.includes(i) ? Gs(i, o) : an(o);
|
1590
1590
|
}, Gs = (n, e) => {
|
1591
1591
|
if (n.charAt(0) === "_") {
|
1592
1592
|
const t = n.slice(1, n.length);
|
@@ -1621,11 +1621,11 @@ const Qn = (n, e, t = {}) => {
|
|
1621
1621
|
case D.timetz:
|
1622
1622
|
case D.tsrange:
|
1623
1623
|
case D.tstzrange:
|
1624
|
-
return
|
1624
|
+
return an(e);
|
1625
1625
|
default:
|
1626
|
-
return
|
1626
|
+
return an(e);
|
1627
1627
|
}
|
1628
|
-
},
|
1628
|
+
}, an = (n) => n, Go = (n) => {
|
1629
1629
|
switch (n) {
|
1630
1630
|
case "t":
|
1631
1631
|
return !0;
|
@@ -1703,19 +1703,19 @@ var ns;
|
|
1703
1703
|
(function(n) {
|
1704
1704
|
n.SUBSCRIBED = "SUBSCRIBED", n.TIMED_OUT = "TIMED_OUT", n.CLOSED = "CLOSED", n.CHANNEL_ERROR = "CHANNEL_ERROR";
|
1705
1705
|
})(ns || (ns = {}));
|
1706
|
-
class
|
1706
|
+
class Rn {
|
1707
1707
|
constructor(e, t = { config: {} }, r) {
|
1708
|
-
this.topic = e, this.params = t, this.socket = r, this.bindings = {}, this.state =
|
1708
|
+
this.topic = e, this.params = t, this.socket = r, this.bindings = {}, this.state = ne.closed, this.joinedOnce = !1, this.pushBuffer = [], this.params.config = Object.assign({
|
1709
1709
|
broadcast: { ack: !1, self: !1 },
|
1710
1710
|
presence: { key: "" }
|
1711
|
-
}, t.config), this.timeout = this.socket.timeout, this.joinPush = new
|
1712
|
-
this.state =
|
1711
|
+
}, t.config), this.timeout = this.socket.timeout, this.joinPush = new Gr(this, ye.join, this.params, this.timeout), this.rejoinTimer = new qs(() => this._rejoinUntilConnected(), this.socket.reconnectAfterMs), this.joinPush.receive("ok", () => {
|
1712
|
+
this.state = ne.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((s) => s.send()), this.pushBuffer = [];
|
1713
1713
|
}), this._onClose(() => {
|
1714
|
-
this.rejoinTimer.reset(), this.socket.log("channel", `close ${this.topic} ${this._joinRef()}`), this.state =
|
1714
|
+
this.rejoinTimer.reset(), this.socket.log("channel", `close ${this.topic} ${this._joinRef()}`), this.state = ne.closed, this.socket._remove(this);
|
1715
1715
|
}), this._onError((s) => {
|
1716
|
-
this._isLeaving() || this._isClosed() || (this.socket.log("channel", `error ${this.topic}`, s), this.state =
|
1716
|
+
this._isLeaving() || this._isClosed() || (this.socket.log("channel", `error ${this.topic}`, s), this.state = ne.errored, this.rejoinTimer.scheduleTimeout());
|
1717
1717
|
}), this.joinPush.receive("timeout", () => {
|
1718
|
-
this._isJoining() && (this.socket.log("channel", `timeout ${this.topic}`, this.joinPush.timeout), this.state =
|
1718
|
+
this._isJoining() && (this.socket.log("channel", `timeout ${this.topic}`, this.joinPush.timeout), this.state = ne.errored, this.rejoinTimer.scheduleTimeout());
|
1719
1719
|
}), this._on(ye.reply, {}, (s, i) => {
|
1720
1720
|
this._trigger(this._replyEventName(i), s);
|
1721
1721
|
}), this.presence = new Vt(this);
|
@@ -1803,12 +1803,12 @@ class $n {
|
|
1803
1803
|
* channel.unsubscribe().receive("ok", () => alert("left!") )
|
1804
1804
|
*/
|
1805
1805
|
unsubscribe(e = this.timeout) {
|
1806
|
-
this.state =
|
1806
|
+
this.state = ne.leaving;
|
1807
1807
|
const t = () => {
|
1808
1808
|
this.socket.log("channel", `leave ${this.topic}`), this._trigger(ye.close, "leave", this._joinRef());
|
1809
1809
|
};
|
1810
1810
|
return this.rejoinTimer.reset(), this.joinPush.destroy(), new Promise((r) => {
|
1811
|
-
const s = new
|
1811
|
+
const s = new Gr(this, ye.leave, {}, e);
|
1812
1812
|
s.receive("ok", () => {
|
1813
1813
|
t(), r("ok");
|
1814
1814
|
}).receive("timeout", () => {
|
@@ -1822,7 +1822,7 @@ class $n {
|
|
1822
1822
|
_push(e, t, r = this.timeout) {
|
1823
1823
|
if (!this.joinedOnce)
|
1824
1824
|
throw `tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;
|
1825
|
-
let s = new
|
1825
|
+
let s = new Gr(this, e, t, r);
|
1826
1826
|
return this._canPush() ? s.send() : (s.startTimeout(), this.pushBuffer.push(s)), s;
|
1827
1827
|
}
|
1828
1828
|
/**
|
@@ -1886,19 +1886,19 @@ class $n {
|
|
1886
1886
|
}
|
1887
1887
|
/** @internal */
|
1888
1888
|
_isClosed() {
|
1889
|
-
return this.state ===
|
1889
|
+
return this.state === ne.closed;
|
1890
1890
|
}
|
1891
1891
|
/** @internal */
|
1892
1892
|
_isJoined() {
|
1893
|
-
return this.state ===
|
1893
|
+
return this.state === ne.joined;
|
1894
1894
|
}
|
1895
1895
|
/** @internal */
|
1896
1896
|
_isJoining() {
|
1897
|
-
return this.state ===
|
1897
|
+
return this.state === ne.joining;
|
1898
1898
|
}
|
1899
1899
|
/** @internal */
|
1900
1900
|
_isLeaving() {
|
1901
|
-
return this.state ===
|
1901
|
+
return this.state === ne.leaving;
|
1902
1902
|
}
|
1903
1903
|
/** @internal */
|
1904
1904
|
_replyEventName(e) {
|
@@ -1918,7 +1918,7 @@ class $n {
|
|
1918
1918
|
const r = e.toLocaleLowerCase();
|
1919
1919
|
return this.bindings[r] = this.bindings[r].filter((s) => {
|
1920
1920
|
var i;
|
1921
|
-
return !(((i = s.type) === null || i === void 0 ? void 0 : i.toLocaleLowerCase()) === r &&
|
1921
|
+
return !(((i = s.type) === null || i === void 0 ? void 0 : i.toLocaleLowerCase()) === r && Rn.isEqual(s.filter, t));
|
1922
1922
|
}), this;
|
1923
1923
|
}
|
1924
1924
|
/** @internal */
|
@@ -1960,7 +1960,7 @@ class $n {
|
|
1960
1960
|
}
|
1961
1961
|
/** @internal */
|
1962
1962
|
_rejoin(e = this.timeout) {
|
1963
|
-
this._isLeaving() || (this.socket._leaveOpenTopic(this.topic), this.state =
|
1963
|
+
this._isLeaving() || (this.socket._leaveOpenTopic(this.topic), this.state = ne.joining, this.joinPush.resend(e));
|
1964
1964
|
}
|
1965
1965
|
/** @internal */
|
1966
1966
|
_getPayloadRecords(e) {
|
@@ -2022,7 +2022,7 @@ class Qo {
|
|
2022
2022
|
close: [],
|
2023
2023
|
error: [],
|
2024
2024
|
message: []
|
2025
|
-
}, this.eventsPerSecondLimitMs = 100, this.inThrottle = !1, this.endPoint = `${e}/${
|
2025
|
+
}, this.eventsPerSecondLimitMs = 100, this.inThrottle = !1, this.endPoint = `${e}/${on.websocket}`, t != null && t.params && (this.params = t.params), t != null && t.headers && (this.headers = Object.assign(Object.assign({}, this.headers), t.headers)), t != null && t.timeout && (this.timeout = t.timeout), t != null && t.logger && (this.logger = t.logger), t != null && t.transport && (this.transport = t.transport), t != null && t.heartbeatIntervalMs && (this.heartbeatIntervalMs = t.heartbeatIntervalMs);
|
2026
2026
|
const s = (r = t == null ? void 0 : t.params) === null || r === void 0 ? void 0 : r.eventsPerSecond;
|
2027
2027
|
s && (this.eventsPerSecondLimitMs = Math.floor(1e3 / s)), this.reconnectAfterMs = t != null && t.reconnectAfterMs ? t.reconnectAfterMs : (i) => [1e3, 2e3, 5e3, 1e4][i - 1] || 1e4, this.encode = t != null && t.encode ? t.encode : (i, o) => o(JSON.stringify(i)), this.decode = t != null && t.decode ? t.decode : this.serializer.decode.bind(this.serializer), this.reconnectTimer = new qs(() => Zo(this, void 0, void 0, function* () {
|
2028
2028
|
this.disconnect(), this.connect();
|
@@ -2094,7 +2094,7 @@ class Qo {
|
|
2094
2094
|
}
|
2095
2095
|
channel(e, t = { config: {} }) {
|
2096
2096
|
this.isConnected() || this.connect();
|
2097
|
-
const r = new
|
2097
|
+
const r = new Rn(`realtime:${e}`, t, this);
|
2098
2098
|
return this.channels.push(r), r;
|
2099
2099
|
}
|
2100
2100
|
/**
|
@@ -2309,13 +2309,13 @@ var Ct = globalThis && globalThis.__awaiter || function(n, e, t, r) {
|
|
2309
2309
|
u((r = r.apply(n, e || [])).next());
|
2310
2310
|
});
|
2311
2311
|
};
|
2312
|
-
const
|
2312
|
+
const Jr = (n) => n.msg || n.message || n.error_description || n.error || JSON.stringify(n), ra = (n, e) => Ct(void 0, void 0, void 0, function* () {
|
2313
2313
|
const t = yield ta();
|
2314
2314
|
n instanceof t ? n.json().then((r) => {
|
2315
|
-
e(new ea(
|
2315
|
+
e(new ea(Jr(r), n.status || 500));
|
2316
2316
|
}).catch((r) => {
|
2317
|
-
e(new ss(
|
2318
|
-
}) : e(new ss(
|
2317
|
+
e(new ss(Jr(r), r));
|
2318
|
+
}) : e(new ss(Jr(n), n));
|
2319
2319
|
}), na = (n, e, t, r) => {
|
2320
2320
|
const s = { method: n, headers: (e == null ? void 0 : e.headers) || {} };
|
2321
2321
|
return n === "GET" ? s : (s.headers = Object.assign({ "Content-Type": "application/json" }, e == null ? void 0 : e.headers), s.body = JSON.stringify(r), Object.assign(Object.assign({}, s), t));
|
@@ -2331,7 +2331,7 @@ function Rr(n, e, t, r, s, i) {
|
|
2331
2331
|
});
|
2332
2332
|
});
|
2333
2333
|
}
|
2334
|
-
function
|
2334
|
+
function cn(n, e, t, r) {
|
2335
2335
|
return Ct(this, void 0, void 0, function* () {
|
2336
2336
|
return Rr(n, "GET", e, t, r);
|
2337
2337
|
});
|
@@ -2533,7 +2533,7 @@ class aa {
|
|
2533
2533
|
const s = typeof (t == null ? void 0 : t.transform) < "u" ? "render/image/authenticated" : "object", i = this.transformOptsToQueryString((t == null ? void 0 : t.transform) || {}), o = i ? `?${i}` : "";
|
2534
2534
|
try {
|
2535
2535
|
const a = this._getFinalPath(e);
|
2536
|
-
return { data: yield (yield
|
2536
|
+
return { data: yield (yield cn(this.fetch, `${this.url}/${s}/${a}${o}`, {
|
2537
2537
|
headers: this.headers,
|
2538
2538
|
noResolveJson: !0
|
2539
2539
|
})).blob(), error: null };
|
@@ -2702,7 +2702,7 @@ class la {
|
|
2702
2702
|
listBuckets() {
|
2703
2703
|
return wt(this, void 0, void 0, function* () {
|
2704
2704
|
try {
|
2705
|
-
return { data: yield
|
2705
|
+
return { data: yield cn(this.fetch, `${this.url}/bucket`, { headers: this.headers }), error: null };
|
2706
2706
|
} catch (e) {
|
2707
2707
|
if (Q(e))
|
2708
2708
|
return { data: null, error: e };
|
@@ -2718,7 +2718,7 @@ class la {
|
|
2718
2718
|
getBucket(e) {
|
2719
2719
|
return wt(this, void 0, void 0, function* () {
|
2720
2720
|
try {
|
2721
|
-
return { data: yield
|
2721
|
+
return { data: yield cn(this.fetch, `${this.url}/bucket/${e}`, { headers: this.headers }), error: null };
|
2722
2722
|
} catch (t) {
|
2723
2723
|
if (Q(t))
|
2724
2724
|
return { data: null, error: t };
|
@@ -2838,7 +2838,7 @@ var pa = globalThis && globalThis.__awaiter || function(n, e, t, r) {
|
|
2838
2838
|
};
|
2839
2839
|
const ya = (n) => {
|
2840
2840
|
let e;
|
2841
|
-
return n ? e = n : typeof fetch > "u" ? e =
|
2841
|
+
return n ? e = n : typeof fetch > "u" ? e = Sn : e = fetch, (...t) => e(...t);
|
2842
2842
|
}, ma = () => typeof Headers > "u" ? It.Headers : Headers, ga = (n, e, t) => {
|
2843
2843
|
const r = ya(t), s = ma();
|
2844
2844
|
return (i, o) => pa(void 0, void 0, void 0, function* () {
|
@@ -2899,7 +2899,7 @@ function _a() {
|
|
2899
2899
|
const Ye = () => typeof document < "u", Xe = {
|
2900
2900
|
tested: !1,
|
2901
2901
|
writable: !1
|
2902
|
-
},
|
2902
|
+
}, Wr = () => {
|
2903
2903
|
if (!Ye())
|
2904
2904
|
return !1;
|
2905
2905
|
try {
|
@@ -2991,7 +2991,7 @@ function Aa(n, e) {
|
|
2991
2991
|
});
|
2992
2992
|
});
|
2993
2993
|
}
|
2994
|
-
class
|
2994
|
+
class $n extends Error {
|
2995
2995
|
constructor(e, t) {
|
2996
2996
|
super(e), this.__isAuthError = !0, this.name = "AuthError", this.status = t;
|
2997
2997
|
}
|
@@ -2999,7 +2999,7 @@ class Pn extends Error {
|
|
2999
2999
|
function $(n) {
|
3000
3000
|
return typeof n == "object" && n !== null && "__isAuthError" in n;
|
3001
3001
|
}
|
3002
|
-
class Sa extends
|
3002
|
+
class Sa extends $n {
|
3003
3003
|
constructor(e, t) {
|
3004
3004
|
super(e, t), this.name = "AuthApiError", this.status = t;
|
3005
3005
|
}
|
@@ -3014,12 +3014,12 @@ class Sa extends Pn {
|
|
3014
3014
|
function Ra(n) {
|
3015
3015
|
return $(n) && n.name === "AuthApiError";
|
3016
3016
|
}
|
3017
|
-
class Ys extends
|
3017
|
+
class Ys extends $n {
|
3018
3018
|
constructor(e, t) {
|
3019
3019
|
super(e), this.name = "AuthUnknownError", this.originalError = t;
|
3020
3020
|
}
|
3021
3021
|
}
|
3022
|
-
class Pr extends
|
3022
|
+
class Pr extends $n {
|
3023
3023
|
constructor(e, t, r) {
|
3024
3024
|
super(e), this.name = t, this.status = r;
|
3025
3025
|
}
|
@@ -3036,7 +3036,7 @@ class jt extends Pr {
|
|
3036
3036
|
super("Auth session missing!", "AuthSessionMissingError", 400);
|
3037
3037
|
}
|
3038
3038
|
}
|
3039
|
-
class
|
3039
|
+
class Kr extends Pr {
|
3040
3040
|
constructor(e) {
|
3041
3041
|
super(e, "AuthInvalidCredentialsError", 400);
|
3042
3042
|
}
|
@@ -3054,12 +3054,12 @@ class Ae extends Pr {
|
|
3054
3054
|
};
|
3055
3055
|
}
|
3056
3056
|
}
|
3057
|
-
class
|
3057
|
+
class un extends Pr {
|
3058
3058
|
constructor(e, t) {
|
3059
3059
|
super(e, "AuthRetryableFetchError", t);
|
3060
3060
|
}
|
3061
3061
|
}
|
3062
|
-
var
|
3062
|
+
var Pn = globalThis && globalThis.__awaiter || function(n, e, t, r) {
|
3063
3063
|
function s(i) {
|
3064
3064
|
return i instanceof t ? i : new t(function(o) {
|
3065
3065
|
o(i);
|
@@ -3094,20 +3094,20 @@ var Nn = globalThis && globalThis.__awaiter || function(n, e, t, r) {
|
|
3094
3094
|
e.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[s]) && (t[r[s]] = n[r[s]]);
|
3095
3095
|
return t;
|
3096
3096
|
};
|
3097
|
-
const or = (n) => n.msg || n.message || n.error_description || n.error || JSON.stringify(n), Pa = (n, e) =>
|
3097
|
+
const or = (n) => n.msg || n.message || n.error_description || n.error || JSON.stringify(n), Pa = (n, e) => Pn(void 0, void 0, void 0, function* () {
|
3098
3098
|
const t = [502, 503, 504];
|
3099
|
-
Ea(n) ? t.includes(n.status) ? e(new
|
3099
|
+
Ea(n) ? t.includes(n.status) ? e(new un(or(n), n.status)) : n.json().then((r) => {
|
3100
3100
|
e(new Sa(or(r), n.status || 500));
|
3101
3101
|
}).catch((r) => {
|
3102
3102
|
e(new Ys(or(r), r));
|
3103
|
-
}) : e(new
|
3103
|
+
}) : e(new un(or(n), 0));
|
3104
3104
|
}), Na = (n, e, t, r) => {
|
3105
3105
|
const s = { method: n, headers: (e == null ? void 0 : e.headers) || {} };
|
3106
3106
|
return n === "GET" ? s : (s.headers = Object.assign({ "Content-Type": "application/json;charset=UTF-8" }, e == null ? void 0 : e.headers), s.body = JSON.stringify(r), Object.assign(Object.assign({}, s), t));
|
3107
3107
|
};
|
3108
3108
|
function I(n, e, t, r) {
|
3109
3109
|
var s;
|
3110
|
-
return
|
3110
|
+
return Pn(this, void 0, void 0, function* () {
|
3111
3111
|
const i = Object.assign({}, r == null ? void 0 : r.headers);
|
3112
3112
|
r != null && r.jwt && (i.Authorization = `Bearer ${r.jwt}`);
|
3113
3113
|
const o = (s = r == null ? void 0 : r.query) !== null && s !== void 0 ? s : {};
|
@@ -3117,7 +3117,7 @@ function I(n, e, t, r) {
|
|
3117
3117
|
});
|
3118
3118
|
}
|
3119
3119
|
function Ia(n, e, t, r, s, i) {
|
3120
|
-
return
|
3120
|
+
return Pn(this, void 0, void 0, function* () {
|
3121
3121
|
return new Promise((o, a) => {
|
3122
3122
|
n(t, Na(e, r, s, i)).then((c) => {
|
3123
3123
|
if (!c.ok)
|
@@ -3428,12 +3428,12 @@ class La {
|
|
3428
3428
|
}
|
3429
3429
|
}
|
3430
3430
|
const Ba = "2.13.0", Ha = "http://localhost:9999", Ma = "supabase.auth.token", Va = { "X-Client-Info": `gotrue-js/${Ba}` }, za = 10, qa = {
|
3431
|
-
getItem: (n) =>
|
3431
|
+
getItem: (n) => Wr() ? globalThis.localStorage.getItem(n) : null,
|
3432
3432
|
setItem: (n, e) => {
|
3433
|
-
|
3433
|
+
Wr() && globalThis.localStorage.setItem(n, e);
|
3434
3434
|
},
|
3435
3435
|
removeItem: (n) => {
|
3436
|
-
|
3436
|
+
Wr() && globalThis.localStorage.removeItem(n);
|
3437
3437
|
}
|
3438
3438
|
};
|
3439
3439
|
function Ga() {
|
@@ -3484,7 +3484,7 @@ const Ja = {
|
|
3484
3484
|
persistSession: !0,
|
3485
3485
|
detectSessionInUrl: !0,
|
3486
3486
|
headers: Va
|
3487
|
-
},
|
3487
|
+
}, Xr = 10 * 1e3, Wa = 3;
|
3488
3488
|
class Ka {
|
3489
3489
|
/**
|
3490
3490
|
* Create a new client for use in the browser.
|
@@ -3587,7 +3587,7 @@ class Ka {
|
|
3587
3587
|
xform: Ze
|
3588
3588
|
});
|
3589
3589
|
} else
|
3590
|
-
throw new
|
3590
|
+
throw new Kr("You must provide either an email or phone number and a password");
|
3591
3591
|
const { data: i, error: o } = s;
|
3592
3592
|
if (o || !i)
|
3593
3593
|
return { data: { user: null, session: null }, error: o };
|
@@ -3641,7 +3641,7 @@ class Ka {
|
|
3641
3641
|
xform: Ze
|
3642
3642
|
});
|
3643
3643
|
} else
|
3644
|
-
throw new
|
3644
|
+
throw new Kr("You must provide either an email or phone number and a password");
|
3645
3645
|
const { data: s, error: i } = r;
|
3646
3646
|
return i || !s ? { data: { user: null, session: null }, error: i } : (s.session && (yield this._saveSession(s.session), this._notifyAllSubscribers("SIGNED_IN", s.session)), { data: s, error: i });
|
3647
3647
|
} catch (r) {
|
@@ -3739,7 +3739,7 @@ class Ka {
|
|
3739
3739
|
});
|
3740
3740
|
return { data: { user: null, session: null }, error: u };
|
3741
3741
|
}
|
3742
|
-
throw new
|
3742
|
+
throw new Kr("You must provide either an email or phone number.");
|
3743
3743
|
} catch (a) {
|
3744
3744
|
if ($(a))
|
3745
3745
|
return { data: { user: null, session: null }, error: a };
|
@@ -4086,8 +4086,8 @@ class Ka {
|
|
4086
4086
|
headers: this.headers,
|
4087
4087
|
xform: Ze
|
4088
4088
|
});
|
4089
|
-
}), (r, s, i) => i && i.error && i.error instanceof
|
4090
|
-
Date.now() + (r + 1) * 200 - t <
|
4089
|
+
}), (r, s, i) => i && i.error && i.error instanceof un && // retryable only if the request can be sent before the backoff overflows the tick duration
|
4090
|
+
Date.now() + (r + 1) * 200 - t < Xr);
|
4091
4091
|
} catch (t) {
|
4092
4092
|
if ($(t))
|
4093
4093
|
return { data: { session: null, user: null }, error: t };
|
@@ -4203,7 +4203,7 @@ class Ka {
|
|
4203
4203
|
_startAutoRefresh() {
|
4204
4204
|
return k(this, void 0, void 0, function* () {
|
4205
4205
|
yield this._stopAutoRefresh();
|
4206
|
-
const e = setInterval(() => this._autoRefreshTokenTick(),
|
4206
|
+
const e = setInterval(() => this._autoRefreshTokenTick(), Xr);
|
4207
4207
|
this.autoRefreshTicker = e, e && typeof e == "object" && typeof e.unref == "function" && e.unref(), yield this._autoRefreshTokenTick();
|
4208
4208
|
});
|
4209
4209
|
}
|
@@ -4267,7 +4267,7 @@ class Ka {
|
|
4267
4267
|
const { data: { session: t } } = yield this.getSession();
|
4268
4268
|
if (!t || !t.refresh_token || !t.expires_at)
|
4269
4269
|
return;
|
4270
|
-
Math.floor((t.expires_at * 1e3 - e) /
|
4270
|
+
Math.floor((t.expires_at * 1e3 - e) / Xr) < Wa && (yield this._callRefreshToken(t.refresh_token));
|
4271
4271
|
} catch (t) {
|
4272
4272
|
console.error("Auto refresh tick failed with error. This is likely a transient error.", t);
|
4273
4273
|
}
|
@@ -4642,12 +4642,12 @@ pt.prototype.get = function(n) {
|
|
4642
4642
|
pt.prototype.set = function(n, e) {
|
4643
4643
|
return this._size >= this._maxSize && this.clear(), n in this._values || this._size++, this._values[n] = e;
|
4644
4644
|
};
|
4645
|
-
var sc = /[^.^\]^[]+|(?=\[\]|\.\.)/g, Qs = /^\d+$/, ic = /^\d/, oc = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, ac = /^\s*(['"]?)(.*?)(\1)\s*$/,
|
4645
|
+
var sc = /[^.^\]^[]+|(?=\[\]|\.\.)/g, Qs = /^\d+$/, ic = /^\d/, oc = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, ac = /^\s*(['"]?)(.*?)(\1)\s*$/, Nn = 512, as = new pt(Nn), cs = new pt(Nn), us = new pt(Nn), ot = {
|
4646
4646
|
Cache: pt,
|
4647
|
-
split:
|
4648
|
-
normalizePath:
|
4647
|
+
split: ln,
|
4648
|
+
normalizePath: Zr,
|
4649
4649
|
setter: function(n) {
|
4650
|
-
var e =
|
4650
|
+
var e = Zr(n);
|
4651
4651
|
return cs.get(n) || cs.set(n, function(r, s) {
|
4652
4652
|
for (var i = 0, o = e.length, a = r; i < o - 1; ) {
|
4653
4653
|
var c = e[i];
|
@@ -4659,7 +4659,7 @@ var sc = /[^.^\]^[]+|(?=\[\]|\.\.)/g, Qs = /^\d+$/, ic = /^\d/, oc = /[~`!#$%\^&
|
|
4659
4659
|
});
|
4660
4660
|
},
|
4661
4661
|
getter: function(n, e) {
|
4662
|
-
var t =
|
4662
|
+
var t = Zr(n);
|
4663
4663
|
return us.get(n) || us.set(n, function(s) {
|
4664
4664
|
for (var i = 0, o = t.length; i < o; )
|
4665
4665
|
if (s != null || !e)
|
@@ -4671,30 +4671,30 @@ var sc = /[^.^\]^[]+|(?=\[\]|\.\.)/g, Qs = /^\d+$/, ic = /^\d/, oc = /[~`!#$%\^&
|
|
4671
4671
|
},
|
4672
4672
|
join: function(n) {
|
4673
4673
|
return n.reduce(function(e, t) {
|
4674
|
-
return e + (
|
4674
|
+
return e + (In(t) || Qs.test(t) ? "[" + t + "]" : (e ? "." : "") + t);
|
4675
4675
|
}, "");
|
4676
4676
|
},
|
4677
4677
|
forEach: function(n, e, t) {
|
4678
|
-
cc(Array.isArray(n) ? n :
|
4678
|
+
cc(Array.isArray(n) ? n : ln(n), e, t);
|
4679
4679
|
}
|
4680
4680
|
};
|
4681
|
-
function
|
4681
|
+
function Zr(n) {
|
4682
4682
|
return as.get(n) || as.set(
|
4683
4683
|
n,
|
4684
|
-
|
4684
|
+
ln(n).map(function(e) {
|
4685
4685
|
return e.replace(ac, "$2");
|
4686
4686
|
})
|
4687
4687
|
);
|
4688
4688
|
}
|
4689
|
-
function
|
4689
|
+
function ln(n) {
|
4690
4690
|
return n.match(sc) || [""];
|
4691
4691
|
}
|
4692
4692
|
function cc(n, e, t) {
|
4693
4693
|
var r = n.length, s, i, o, a;
|
4694
4694
|
for (i = 0; i < r; i++)
|
4695
|
-
s = n[i], s && (hc(s) && (s = '"' + s + '"'), a =
|
4695
|
+
s = n[i], s && (hc(s) && (s = '"' + s + '"'), a = In(s), o = !a && /^\d+$/.test(s), e.call(t, s, a, o, i, n));
|
4696
4696
|
}
|
4697
|
-
function
|
4697
|
+
function In(n) {
|
4698
4698
|
return typeof n == "string" && n && ["'", '"'].indexOf(n.charAt(0)) !== -1;
|
4699
4699
|
}
|
4700
4700
|
function uc(n) {
|
@@ -4704,13 +4704,13 @@ function lc(n) {
|
|
4704
4704
|
return oc.test(n);
|
4705
4705
|
}
|
4706
4706
|
function hc(n) {
|
4707
|
-
return !
|
4707
|
+
return !In(n) && (uc(n) || lc(n));
|
4708
4708
|
}
|
4709
|
-
const fc = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g, Nr = (n) => n.match(fc) || [], Ir = (n) => n[0].toUpperCase() + n.slice(1),
|
4709
|
+
const fc = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g, Nr = (n) => n.match(fc) || [], Ir = (n) => n[0].toUpperCase() + n.slice(1), Cn = (n, e) => Nr(n).join(e).toLowerCase(), ei = (n) => Nr(n).reduce(
|
4710
4710
|
(e, t) => `${e}${e ? t[0].toUpperCase() + t.slice(1).toLowerCase() : t.toLowerCase()}`,
|
4711
4711
|
""
|
4712
|
-
), dc = (n) => Ir(ei(n)), pc = (n) =>
|
4713
|
-
var
|
4712
|
+
), dc = (n) => Ir(ei(n)), pc = (n) => Cn(n, "_"), yc = (n) => Cn(n, "-"), mc = (n) => Ir(Cn(n, " ")), gc = (n) => Nr(n).map(Ir).join(" ");
|
4713
|
+
var Yr = {
|
4714
4714
|
words: Nr,
|
4715
4715
|
upperFirst: Ir,
|
4716
4716
|
camelCase: ei,
|
@@ -4815,7 +4815,7 @@ function ri(n) {
|
|
4815
4815
|
return n == null ? [] : [].concat(n);
|
4816
4816
|
}
|
4817
4817
|
let Sc = /\$\{\s*(\w+)\s*\}/g;
|
4818
|
-
class
|
4818
|
+
class ie extends Error {
|
4819
4819
|
static formatError(e, t) {
|
4820
4820
|
const r = t.label || t.path || "this";
|
4821
4821
|
return r !== t.path && (t = Object.assign({}, t, {
|
@@ -4827,8 +4827,8 @@ class oe extends Error {
|
|
4827
4827
|
}
|
4828
4828
|
constructor(e, t, r, s) {
|
4829
4829
|
super(), this.value = void 0, this.path = void 0, this.type = void 0, this.errors = void 0, this.params = void 0, this.inner = void 0, this.name = "ValidationError", this.value = t, this.path = r, this.type = s, this.errors = [], this.inner = [], ri(e).forEach((i) => {
|
4830
|
-
|
4831
|
-
}), this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0], Error.captureStackTrace && Error.captureStackTrace(this,
|
4830
|
+
ie.isError(i) ? (this.errors.push(...i.errors), this.inner = this.inner.concat(i.inner.length ? i.inner : i)) : this.errors.push(i);
|
4831
|
+
}), this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0], Error.captureStackTrace && Error.captureStackTrace(this, ie);
|
4832
4832
|
}
|
4833
4833
|
}
|
4834
4834
|
let Se = {
|
@@ -4866,12 +4866,12 @@ let Se = {
|
|
4866
4866
|
positive: "${path} must be a positive number",
|
4867
4867
|
negative: "${path} must be a negative number",
|
4868
4868
|
integer: "${path} must be an integer"
|
4869
|
-
},
|
4869
|
+
}, hn = {
|
4870
4870
|
min: "${path} field must be later than ${min}",
|
4871
4871
|
max: "${path} field must be at earlier than ${max}"
|
4872
|
-
},
|
4872
|
+
}, fn = {
|
4873
4873
|
isValue: "${path} field must be ${value}"
|
4874
|
-
},
|
4874
|
+
}, dn = {
|
4875
4875
|
noUnknown: "${path} field has unspecified keys: ${unknown}"
|
4876
4876
|
}, dr = {
|
4877
4877
|
min: "${path} field must have at least ${min} items",
|
@@ -4882,10 +4882,10 @@ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
4882
4882
|
mixed: Se,
|
4883
4883
|
string: de,
|
4884
4884
|
number: He,
|
4885
|
-
date:
|
4886
|
-
object:
|
4885
|
+
date: hn,
|
4886
|
+
object: dn,
|
4887
4887
|
array: dr,
|
4888
|
-
boolean:
|
4888
|
+
boolean: fn
|
4889
4889
|
});
|
4890
4890
|
const Cr = (n) => n && n.__isYupSchema__;
|
4891
4891
|
class wr {
|
@@ -4998,7 +4998,7 @@ function bt(n) {
|
|
4998
4998
|
}, h, L.params);
|
4999
4999
|
for (const gt of Object.keys(M))
|
5000
5000
|
M[gt] = A(M[gt]);
|
5001
|
-
const sr = new
|
5001
|
+
const sr = new ie(ie.formatError(L.message || y, M), t, M.path, L.type || u);
|
5002
5002
|
return sr.params = M, sr;
|
5003
5003
|
}
|
5004
5004
|
const X = g ? a : c;
|
@@ -5014,9 +5014,9 @@ function bt(n) {
|
|
5014
5014
|
schema: o
|
5015
5015
|
};
|
5016
5016
|
const be = (L) => {
|
5017
|
-
|
5017
|
+
ie.isError(L) ? X(L) : L ? c(null) : X(C());
|
5018
5018
|
}, Dt = (L) => {
|
5019
|
-
|
5019
|
+
ie.isError(L) ? X(L) : a(L);
|
5020
5020
|
}, rr = p && he(t);
|
5021
5021
|
if (!s.sync) {
|
5022
5022
|
try {
|
@@ -5317,9 +5317,9 @@ attempted value: ${o}
|
|
5317
5317
|
value: e
|
5318
5318
|
}));
|
5319
5319
|
return new Promise((s, i) => r._validate(e, t, (o, a) => {
|
5320
|
-
|
5320
|
+
ie.isError(o) && (o.value = a), i(o);
|
5321
5321
|
}, (o, a) => {
|
5322
|
-
o.length ? i(new
|
5322
|
+
o.length ? i(new ie(o, a)) : s(a);
|
5323
5323
|
}));
|
5324
5324
|
}
|
5325
5325
|
validateSync(e, t) {
|
@@ -5329,16 +5329,16 @@ attempted value: ${o}
|
|
5329
5329
|
return r._validate(e, Object.assign({}, t, {
|
5330
5330
|
sync: !0
|
5331
5331
|
}), (i, o) => {
|
5332
|
-
throw
|
5332
|
+
throw ie.isError(i) && (i.value = o), i;
|
5333
5333
|
}, (i, o) => {
|
5334
5334
|
if (i.length)
|
5335
|
-
throw new
|
5335
|
+
throw new ie(i, e);
|
5336
5336
|
s = o;
|
5337
5337
|
}), s;
|
5338
5338
|
}
|
5339
5339
|
isValid(e, t) {
|
5340
5340
|
return this.validate(e, t).then(() => !0, (r) => {
|
5341
|
-
if (
|
5341
|
+
if (ie.isError(r))
|
5342
5342
|
return !1;
|
5343
5343
|
throw r;
|
5344
5344
|
});
|
@@ -5347,7 +5347,7 @@ attempted value: ${o}
|
|
5347
5347
|
try {
|
5348
5348
|
return this.validateSync(e, t), !0;
|
5349
5349
|
} catch (r) {
|
5350
|
-
if (
|
5350
|
+
if (ie.isError(r))
|
5351
5351
|
return !1;
|
5352
5352
|
throw r;
|
5353
5353
|
}
|
@@ -5569,7 +5569,7 @@ class si extends te {
|
|
5569
5569
|
}
|
5570
5570
|
}
|
5571
5571
|
ni.prototype = si.prototype;
|
5572
|
-
function
|
5572
|
+
function Fn() {
|
5573
5573
|
return new ii();
|
5574
5574
|
}
|
5575
5575
|
class ii extends te {
|
@@ -5591,7 +5591,7 @@ class ii extends te {
|
|
5591
5591
|
});
|
5592
5592
|
});
|
5593
5593
|
}
|
5594
|
-
isTrue(e =
|
5594
|
+
isTrue(e = fn.isValue) {
|
5595
5595
|
return this.test({
|
5596
5596
|
message: e,
|
5597
5597
|
name: "is-value",
|
@@ -5604,7 +5604,7 @@ class ii extends te {
|
|
5604
5604
|
}
|
5605
5605
|
});
|
5606
5606
|
}
|
5607
|
-
isFalse(e =
|
5607
|
+
isFalse(e = fn.isValue) {
|
5608
5608
|
return this.test({
|
5609
5609
|
message: e,
|
5610
5610
|
name: "is-value",
|
@@ -5642,7 +5642,7 @@ class ii extends te {
|
|
5642
5642
|
return super.strip(e);
|
5643
5643
|
}
|
5644
5644
|
}
|
5645
|
-
|
5645
|
+
Fn.prototype = ii.prototype;
|
5646
5646
|
let Pc = (
|
5647
5647
|
// eslint-disable-next-line
|
5648
5648
|
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
|
@@ -5650,7 +5650,7 @@ let Pc = (
|
|
5650
5650
|
// eslint-disable-next-line
|
5651
5651
|
/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i
|
5652
5652
|
), Ic = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i, Cc = (n) => he(n) || n === n.trim(), Fc = {}.toString();
|
5653
|
-
function
|
5653
|
+
function O() {
|
5654
5654
|
return new oi();
|
5655
5655
|
}
|
5656
5656
|
class oi extends te {
|
@@ -5789,7 +5789,7 @@ class oi extends te {
|
|
5789
5789
|
});
|
5790
5790
|
}
|
5791
5791
|
}
|
5792
|
-
|
5792
|
+
O.prototype = oi.prototype;
|
5793
5793
|
let Dc = (n) => n != +n;
|
5794
5794
|
function q() {
|
5795
5795
|
return new ai();
|
@@ -5911,7 +5911,7 @@ function jc(n) {
|
|
5911
5911
|
return r;
|
5912
5912
|
}
|
5913
5913
|
let Lc = new Date(""), Bc = (n) => Object.prototype.toString.call(n) === "[object Date]";
|
5914
|
-
class
|
5914
|
+
class Fr extends te {
|
5915
5915
|
constructor() {
|
5916
5916
|
super({
|
5917
5917
|
type: "date",
|
@@ -5919,7 +5919,7 @@ class Dr extends te {
|
|
5919
5919
|
return Bc(e) && !isNaN(e.getTime());
|
5920
5920
|
}
|
5921
5921
|
}), this.withMutation(() => {
|
5922
|
-
this.transform((e, t, r) => !r.spec.coerce || r.isType(e) ? e : (e = jc(e), isNaN(e) ?
|
5922
|
+
this.transform((e, t, r) => !r.spec.coerce || r.isType(e) ? e : (e = jc(e), isNaN(e) ? Fr.INVALID_DATE : new Date(e)));
|
5923
5923
|
});
|
5924
5924
|
}
|
5925
5925
|
prepareParam(e, t) {
|
@@ -5934,7 +5934,7 @@ class Dr extends te {
|
|
5934
5934
|
}
|
5935
5935
|
return r;
|
5936
5936
|
}
|
5937
|
-
min(e, t =
|
5937
|
+
min(e, t = hn.min) {
|
5938
5938
|
let r = this.prepareParam(e, "min");
|
5939
5939
|
return this.test({
|
5940
5940
|
message: t,
|
@@ -5949,7 +5949,7 @@ class Dr extends te {
|
|
5949
5949
|
}
|
5950
5950
|
});
|
5951
5951
|
}
|
5952
|
-
max(e, t =
|
5952
|
+
max(e, t = hn.max) {
|
5953
5953
|
let r = this.prepareParam(e, "max");
|
5954
5954
|
return this.test({
|
5955
5955
|
message: t,
|
@@ -5965,8 +5965,8 @@ class Dr extends te {
|
|
5965
5965
|
});
|
5966
5966
|
}
|
5967
5967
|
}
|
5968
|
-
|
5969
|
-
|
5968
|
+
Fr.INVALID_DATE = Lc;
|
5969
|
+
Fr.prototype;
|
5970
5970
|
function Hc(n, e = []) {
|
5971
5971
|
let t = [], r = /* @__PURE__ */ new Set(), s = new Set(e.map(([o, a]) => `${o}-${a}`));
|
5972
5972
|
function i(o, a) {
|
@@ -6028,7 +6028,7 @@ function Vc(n, e) {
|
|
6028
6028
|
return Object.keys(e).filter((r) => t.indexOf(r) === -1);
|
6029
6029
|
}
|
6030
6030
|
const zc = ci([]);
|
6031
|
-
function
|
6031
|
+
function oe(n) {
|
6032
6032
|
return new li(n);
|
6033
6033
|
}
|
6034
6034
|
class li extends te {
|
@@ -6180,7 +6180,7 @@ class li extends te {
|
|
6180
6180
|
json() {
|
6181
6181
|
return this.transform(ui);
|
6182
6182
|
}
|
6183
|
-
noUnknown(e = !0, t =
|
6183
|
+
noUnknown(e = !0, t = dn.noUnknown) {
|
6184
6184
|
typeof e != "boolean" && (t = e, e = !0);
|
6185
6185
|
let r = this.test({
|
6186
6186
|
name: "noUnknown",
|
@@ -6199,7 +6199,7 @@ class li extends te {
|
|
6199
6199
|
});
|
6200
6200
|
return r.spec.noUnknown = e, r;
|
6201
6201
|
}
|
6202
|
-
unknown(e = !0, t =
|
6202
|
+
unknown(e = !0, t = dn.noUnknown) {
|
6203
6203
|
return this.noUnknown(!e, t);
|
6204
6204
|
}
|
6205
6205
|
transformKeys(e) {
|
@@ -6213,13 +6213,13 @@ class li extends te {
|
|
6213
6213
|
});
|
6214
6214
|
}
|
6215
6215
|
camelCase() {
|
6216
|
-
return this.transformKeys(
|
6216
|
+
return this.transformKeys(Yr.camelCase);
|
6217
6217
|
}
|
6218
6218
|
snakeCase() {
|
6219
|
-
return this.transformKeys(
|
6219
|
+
return this.transformKeys(Yr.snakeCase);
|
6220
6220
|
}
|
6221
6221
|
constantCase() {
|
6222
|
-
return this.transformKeys((e) =>
|
6222
|
+
return this.transformKeys((e) => Yr.snakeCase(e).toUpperCase());
|
6223
6223
|
}
|
6224
6224
|
describe(e) {
|
6225
6225
|
let t = super.describe(e);
|
@@ -6235,7 +6235,7 @@ class li extends te {
|
|
6235
6235
|
return t;
|
6236
6236
|
}
|
6237
6237
|
}
|
6238
|
-
|
6238
|
+
oe.prototype = li.prototype;
|
6239
6239
|
function ut(n) {
|
6240
6240
|
return new hi(n);
|
6241
6241
|
}
|
@@ -6374,22 +6374,22 @@ class hi extends te {
|
|
6374
6374
|
}
|
6375
6375
|
}
|
6376
6376
|
ut.prototype = hi.prototype;
|
6377
|
-
const ds =
|
6378
|
-
url:
|
6377
|
+
const ds = oe({
|
6378
|
+
url: O(),
|
6379
6379
|
height: q(),
|
6380
6380
|
width: q()
|
6381
|
-
}), qc =
|
6382
|
-
type:
|
6383
|
-
title:
|
6381
|
+
}), qc = oe({
|
6382
|
+
type: O().default("rich"),
|
6383
|
+
title: O(),
|
6384
6384
|
color: q(),
|
6385
6385
|
thumbnail: ds,
|
6386
6386
|
image: ds,
|
6387
|
-
url:
|
6388
|
-
}), Gc =
|
6389
|
-
url:
|
6390
|
-
username:
|
6391
|
-
avatar_url:
|
6392
|
-
message:
|
6387
|
+
url: O()
|
6388
|
+
}), Gc = oe({
|
6389
|
+
url: O().url().required(),
|
6390
|
+
username: O(),
|
6391
|
+
avatar_url: O().url(),
|
6392
|
+
message: O().required(),
|
6393
6393
|
embed: qc
|
6394
6394
|
}), Jc = "notify_discord_webhook";
|
6395
6395
|
class Dn {
|
@@ -6405,10 +6405,10 @@ class Dn {
|
|
6405
6405
|
return Gc.validate(e);
|
6406
6406
|
}
|
6407
6407
|
}
|
6408
|
-
const Wc =
|
6409
|
-
email:
|
6410
|
-
subject:
|
6411
|
-
html:
|
6408
|
+
const Wc = oe({
|
6409
|
+
email: O().required(),
|
6410
|
+
subject: O(),
|
6411
|
+
html: O().required()
|
6412
6412
|
}), Kc = "notify_email";
|
6413
6413
|
class Un {
|
6414
6414
|
static async SimpleToRaw(e) {
|
@@ -6423,9 +6423,9 @@ class Un {
|
|
6423
6423
|
return Wc.validate(e);
|
6424
6424
|
}
|
6425
6425
|
}
|
6426
|
-
const Xc =
|
6426
|
+
const Xc = oe({
|
6427
6427
|
clientId: q().required(),
|
6428
|
-
content:
|
6428
|
+
content: O().required()
|
6429
6429
|
}), Zc = "notify_telegram";
|
6430
6430
|
class jn {
|
6431
6431
|
static async SimpleToRaw(e) {
|
@@ -6440,7 +6440,7 @@ class jn {
|
|
6440
6440
|
return Xc.validate(e);
|
6441
6441
|
}
|
6442
6442
|
}
|
6443
|
-
class
|
6443
|
+
class Qr {
|
6444
6444
|
static async SimpleToRaw(e, t) {
|
6445
6445
|
switch (e) {
|
6446
6446
|
case "Discord":
|
@@ -6494,12 +6494,12 @@ class ps {
|
|
6494
6494
|
}
|
6495
6495
|
static validate(e) {
|
6496
6496
|
const t = ([s], i) => s === "true" ? i.notRequired() : i.required();
|
6497
|
-
return
|
6498
|
-
address:
|
6497
|
+
return oe({
|
6498
|
+
address: O().required(),
|
6499
6499
|
abi: ut().required(),
|
6500
6500
|
nBlocks: q().default(100).min(10).required(),
|
6501
|
-
function:
|
6502
|
-
condition:
|
6501
|
+
function: O().required(),
|
6502
|
+
condition: O().default("true").oneOf([">", ">=", "<", "<=", "=", "true"]).required(),
|
6503
6503
|
constant: q().min(0).when("condition", t),
|
6504
6504
|
responseArgIndex: q().min(0).when("condition", t),
|
6505
6505
|
responseArgDecimals: q().min(0).when("condition", t)
|
@@ -6520,12 +6520,12 @@ class ys {
|
|
6520
6520
|
}
|
6521
6521
|
static validate(e) {
|
6522
6522
|
const t = ([s], i) => s === "true" ? i.notRequired() : i.required();
|
6523
|
-
return
|
6524
|
-
address:
|
6525
|
-
event:
|
6523
|
+
return oe({
|
6524
|
+
address: O().required(),
|
6525
|
+
event: O().required(),
|
6526
6526
|
// TODO check event is in abi
|
6527
6527
|
abi: ut().required(),
|
6528
|
-
condition:
|
6528
|
+
condition: O().default("true").oneOf([">", ">=", "<", "<=", "=", "true"]).required(),
|
6529
6529
|
constant: q().min(0).when("condition", t),
|
6530
6530
|
paramsIndex: q().min(0).when("condition", t),
|
6531
6531
|
// TODO check paramsIndex exists in ABI
|
@@ -6598,7 +6598,7 @@ function vr(n, e) {
|
|
6598
6598
|
function di(n) {
|
6599
6599
|
return vr(n, "CALL_EXCEPTION");
|
6600
6600
|
}
|
6601
|
-
function
|
6601
|
+
function Dr(n, e, t) {
|
6602
6602
|
{
|
6603
6603
|
const s = [];
|
6604
6604
|
if (t) {
|
@@ -6627,7 +6627,7 @@ function Ur(n, e, t) {
|
|
6627
6627
|
}
|
6628
6628
|
function x(n, e, t, r) {
|
6629
6629
|
if (!n)
|
6630
|
-
throw
|
6630
|
+
throw Dr(e, t, r);
|
6631
6631
|
}
|
6632
6632
|
function _(n, e, t, r) {
|
6633
6633
|
x(n, e, "INVALID_ARGUMENT", { argument: t, value: r });
|
@@ -6724,10 +6724,10 @@ function su(n, e, t) {
|
|
6724
6724
|
function iu(n, e) {
|
6725
6725
|
return su(n, e, !0);
|
6726
6726
|
}
|
6727
|
-
const
|
6727
|
+
const Ur = BigInt(0), me = BigInt(1), kt = 9007199254740991;
|
6728
6728
|
function ou(n, e) {
|
6729
|
-
const t =
|
6730
|
-
if (x(t >> r ===
|
6729
|
+
const t = jr(n, "value"), r = BigInt(Le(e, "width"));
|
6730
|
+
if (x(t >> r === Ur, "overflow", "NUMERIC_FAULT", {
|
6731
6731
|
operation: "fromTwos",
|
6732
6732
|
fault: "overflow",
|
6733
6733
|
value: n
|
@@ -6740,7 +6740,7 @@ function ou(n, e) {
|
|
6740
6740
|
function au(n, e) {
|
6741
6741
|
let t = mt(n, "value");
|
6742
6742
|
const r = BigInt(Le(e, "width")), s = me << r - me;
|
6743
|
-
if (t <
|
6743
|
+
if (t < Ur) {
|
6744
6744
|
t = -t, x(t <= s, "too low", "NUMERIC_FAULT", {
|
6745
6745
|
operation: "toTwos",
|
6746
6746
|
fault: "overflow",
|
@@ -6757,7 +6757,7 @@ function au(n, e) {
|
|
6757
6757
|
return t;
|
6758
6758
|
}
|
6759
6759
|
function cr(n, e) {
|
6760
|
-
const t =
|
6760
|
+
const t = jr(n, "value"), r = BigInt(Le(e, "bits"));
|
6761
6761
|
return t & (me << r) - me;
|
6762
6762
|
}
|
6763
6763
|
function mt(n, e) {
|
@@ -6777,9 +6777,9 @@ function mt(n, e) {
|
|
6777
6777
|
}
|
6778
6778
|
_(!1, "invalid BigNumberish value", e || "value", n);
|
6779
6779
|
}
|
6780
|
-
function
|
6780
|
+
function jr(n, e) {
|
6781
6781
|
const t = mt(n, e);
|
6782
|
-
return x(t >=
|
6782
|
+
return x(t >= Ur, "unsigned value cannot be negative", "NUMERIC_FAULT", {
|
6783
6783
|
fault: "overflow",
|
6784
6784
|
operation: "getUint",
|
6785
6785
|
value: n
|
@@ -6816,7 +6816,7 @@ function cu(n) {
|
|
6816
6816
|
return Le(mi(n));
|
6817
6817
|
}
|
6818
6818
|
function gi(n, e) {
|
6819
|
-
let r =
|
6819
|
+
let r = jr(n, "value").toString(16);
|
6820
6820
|
if (e == null)
|
6821
6821
|
r.length % 2 && (r = "0" + r);
|
6822
6822
|
else {
|
@@ -6831,8 +6831,8 @@ function gi(n, e) {
|
|
6831
6831
|
return "0x" + r;
|
6832
6832
|
}
|
6833
6833
|
function uu(n) {
|
6834
|
-
const e =
|
6835
|
-
if (e ===
|
6834
|
+
const e = jr(n, "value");
|
6835
|
+
if (e === Ur)
|
6836
6836
|
return new Uint8Array([]);
|
6837
6837
|
let t = e.toString(16);
|
6838
6838
|
t.length % 2 && (t = "0" + t);
|
@@ -6967,7 +6967,7 @@ function yu(n) {
|
|
6967
6967
|
function mu(n, e) {
|
6968
6968
|
return yu(pu(n, e));
|
6969
6969
|
}
|
6970
|
-
const Z = 32,
|
6970
|
+
const Z = 32, pn = new Uint8Array(Z), gu = ["then"], ur = {};
|
6971
6971
|
function lr(n, e) {
|
6972
6972
|
const t = new Error(`deferred error during ABI decoding triggered accessing ${n}`);
|
6973
6973
|
throw t.error = e, t;
|
@@ -7086,7 +7086,7 @@ let _r = zt;
|
|
7086
7086
|
Ve = new WeakMap();
|
7087
7087
|
function ws(n) {
|
7088
7088
|
let e = uu(n);
|
7089
|
-
return x(e.length <= Z, "value out-of-bounds", "BUFFER_OVERRUN", { buffer: e, length: Z, offset: e.length }), e.length !== Z && (e = Fe(St([
|
7089
|
+
return x(e.length <= Z, "value out-of-bounds", "BUFFER_OVERRUN", { buffer: e, length: Z, offset: e.length }), e.length !== Z && (e = Fe(St([pn.slice(e.length % Z), e]))), e;
|
7090
7090
|
}
|
7091
7091
|
class Be {
|
7092
7092
|
constructor(e, t, r, s) {
|
@@ -7115,7 +7115,7 @@ class Be {
|
|
7115
7115
|
}
|
7116
7116
|
}
|
7117
7117
|
var Ie, st, $t, yr;
|
7118
|
-
class
|
7118
|
+
class yn {
|
7119
7119
|
constructor() {
|
7120
7120
|
F(this, $t);
|
7121
7121
|
// An array of WordSize lengthed objects to concatenation
|
@@ -7136,7 +7136,7 @@ class mn {
|
|
7136
7136
|
writeBytes(e) {
|
7137
7137
|
let t = Fe(e);
|
7138
7138
|
const r = t.length % Z;
|
7139
|
-
return r && (t = Fe(St([t,
|
7139
|
+
return r && (t = Fe(St([t, pn.slice(r)]))), B(this, $t, yr).call(this, t);
|
7140
7140
|
}
|
7141
7141
|
// Numeric item; pad on the left *to* WordSize
|
7142
7142
|
writeValue(e) {
|
@@ -7146,7 +7146,7 @@ class mn {
|
|
7146
7146
|
// be used to asjust the value later
|
7147
7147
|
writeUpdatableValue() {
|
7148
7148
|
const e = m(this, Ie).length;
|
7149
|
-
return m(this, Ie).push(
|
7149
|
+
return m(this, Ie).push(pn), P(this, st, m(this, st) + Z), (t) => {
|
7150
7150
|
m(this, Ie)[e] = ws(t);
|
7151
7151
|
};
|
7152
7152
|
}
|
@@ -7154,7 +7154,7 @@ class mn {
|
|
7154
7154
|
Ie = new WeakMap(), st = new WeakMap(), $t = new WeakSet(), yr = function(e) {
|
7155
7155
|
return m(this, Ie).push(e), P(this, st, m(this, st) + e.length), e.length;
|
7156
7156
|
};
|
7157
|
-
var
|
7157
|
+
var se, le, Tr, vi;
|
7158
7158
|
const Wn = class {
|
7159
7159
|
constructor(e, t) {
|
7160
7160
|
F(this, Tr);
|
@@ -7163,25 +7163,25 @@ const Wn = class {
|
|
7163
7163
|
// to deal with an old Solidity bug, in which event data for
|
7164
7164
|
// external (not public thoguh) was tightly packed.
|
7165
7165
|
d(this, "allowLoose");
|
7166
|
-
F(this,
|
7166
|
+
F(this, se, void 0);
|
7167
7167
|
F(this, le, void 0);
|
7168
|
-
S(this, { allowLoose: !!t }), P(this,
|
7168
|
+
S(this, { allowLoose: !!t }), P(this, se, Fe(e)), P(this, le, 0);
|
7169
7169
|
}
|
7170
7170
|
get data() {
|
7171
|
-
return H(m(this,
|
7171
|
+
return H(m(this, se));
|
7172
7172
|
}
|
7173
7173
|
get dataLength() {
|
7174
|
-
return m(this,
|
7174
|
+
return m(this, se).length;
|
7175
7175
|
}
|
7176
7176
|
get consumed() {
|
7177
7177
|
return m(this, le);
|
7178
7178
|
}
|
7179
7179
|
get bytes() {
|
7180
|
-
return new Uint8Array(m(this,
|
7180
|
+
return new Uint8Array(m(this, se));
|
7181
7181
|
}
|
7182
7182
|
// Create a sub-reader with the same underlying data, but offset
|
7183
7183
|
subReader(e) {
|
7184
|
-
return new Wn(m(this,
|
7184
|
+
return new Wn(m(this, se).slice(m(this, le) + e), this.allowLoose);
|
7185
7185
|
}
|
7186
7186
|
// Read bytes
|
7187
7187
|
readBytes(e, t) {
|
@@ -7196,16 +7196,16 @@ const Wn = class {
|
|
7196
7196
|
return cu(this.readBytes(Z));
|
7197
7197
|
}
|
7198
7198
|
};
|
7199
|
-
let
|
7200
|
-
|
7199
|
+
let mn = Wn;
|
7200
|
+
se = new WeakMap(), le = new WeakMap(), Tr = new WeakSet(), vi = function(e, t, r) {
|
7201
7201
|
let s = Math.ceil(t / Z) * Z;
|
7202
|
-
return m(this, le) + s > m(this,
|
7203
|
-
buffer: Fe(m(this,
|
7204
|
-
length: m(this,
|
7202
|
+
return m(this, le) + s > m(this, se).length && (this.allowLoose && r && m(this, le) + t <= m(this, se).length ? s = t : x(!1, "data out-of-bounds", "BUFFER_OVERRUN", {
|
7203
|
+
buffer: Fe(m(this, se)),
|
7204
|
+
length: m(this, se).length,
|
7205
7205
|
offset: m(this, le) + s
|
7206
|
-
})), m(this,
|
7206
|
+
})), m(this, se).slice(m(this, le), m(this, le) + s);
|
7207
7207
|
};
|
7208
|
-
function
|
7208
|
+
function gn(n) {
|
7209
7209
|
if (!Number.isSafeInteger(n) || n < 0)
|
7210
7210
|
throw new Error(`Wrong positive integer: ${n}`);
|
7211
7211
|
}
|
@@ -7222,7 +7222,7 @@ function _i(n, ...e) {
|
|
7222
7222
|
function bu(n) {
|
7223
7223
|
if (typeof n != "function" || typeof n.create != "function")
|
7224
7224
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
7225
|
-
|
7225
|
+
gn(n.outputLen), gn(n.blockLen);
|
7226
7226
|
}
|
7227
7227
|
function vu(n, e = !0) {
|
7228
7228
|
if (n.destroyed)
|
@@ -7237,7 +7237,7 @@ function _u(n, e) {
|
|
7237
7237
|
throw new Error(`digestInto() expects output buffer of length at least ${t}`);
|
7238
7238
|
}
|
7239
7239
|
const _t = {
|
7240
|
-
number:
|
7240
|
+
number: gn,
|
7241
7241
|
bool: wu,
|
7242
7242
|
bytes: _i,
|
7243
7243
|
hash: bu,
|
@@ -7273,9 +7273,9 @@ function Au(n) {
|
|
7273
7273
|
const e = (r, s) => n(s).update(Bn(r)).digest(), t = n({});
|
7274
7274
|
return e.outputLen = t.outputLen, e.blockLen = t.blockLen, e.create = (r) => n(r), e;
|
7275
7275
|
}
|
7276
|
-
const hr = BigInt(2 ** 32 - 1),
|
7276
|
+
const hr = BigInt(2 ** 32 - 1), wn = BigInt(32);
|
7277
7277
|
function Ei(n, e = !1) {
|
7278
|
-
return e ? { h: Number(n & hr), l: Number(n >>
|
7278
|
+
return e ? { h: Number(n & hr), l: Number(n >> wn & hr) } : { h: Number(n >> wn & hr) | 0, l: Number(n & hr) | 0 };
|
7279
7279
|
}
|
7280
7280
|
function Su(n, e = !1) {
|
7281
7281
|
let t = new Uint32Array(n.length), r = new Uint32Array(n.length);
|
@@ -7285,7 +7285,7 @@ function Su(n, e = !1) {
|
|
7285
7285
|
}
|
7286
7286
|
return [t, r];
|
7287
7287
|
}
|
7288
|
-
const Ru = (n, e) => BigInt(n >>> 0) <<
|
7288
|
+
const Ru = (n, e) => BigInt(n >>> 0) << wn | BigInt(e >>> 0), $u = (n, e, t) => n >>> t, Pu = (n, e, t) => n << 32 - t | e >>> t, Nu = (n, e, t) => n >>> t | e << 32 - t, Iu = (n, e, t) => n << 32 - t | e >>> t, Cu = (n, e, t) => n << 64 - t | e >>> t - 32, Fu = (n, e, t) => n >>> t - 32 | e << 64 - t, Du = (n, e) => e, Uu = (n, e) => n, ju = (n, e, t) => n << t | e >>> 32 - t, Lu = (n, e, t) => e << t | n >>> 32 - t, Bu = (n, e, t) => e << t - 32 | n >>> 64 - t, Hu = (n, e, t) => n << t - 32 | e >>> 64 - t;
|
7289
7289
|
function Mu(n, e, t, r) {
|
7290
7290
|
const s = (e >>> 0) + (r >>> 0);
|
7291
7291
|
return { h: n + t + (s / 2 ** 32 | 0) | 0, l: s | 0 };
|
@@ -7347,7 +7347,7 @@ function rl(n, e = 24) {
|
|
7347
7347
|
}
|
7348
7348
|
t.fill(0);
|
7349
7349
|
}
|
7350
|
-
class
|
7350
|
+
class Lr extends Ou {
|
7351
7351
|
// NOTE: we accept arguments in bytes instead of bits here.
|
7352
7352
|
constructor(e, t, r, s = !1, i = 24) {
|
7353
7353
|
if (super(), this.blockLen = e, this.suffix = t, this.outputLen = r, this.enableXOF = s, this.rounds = i, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, _t.number(r), 0 >= this.blockLen || this.blockLen >= 200)
|
@@ -7408,10 +7408,10 @@ class Br extends Ou {
|
|
7408
7408
|
}
|
7409
7409
|
_cloneInto(e) {
|
7410
7410
|
const { blockLen: t, suffix: r, outputLen: s, rounds: i, enableXOF: o } = this;
|
7411
|
-
return e || (e = new
|
7411
|
+
return e || (e = new Lr(t, r, s, o, i)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = i, e.suffix = r, e.outputLen = s, e.enableXOF = o, e.destroyed = this.destroyed, e;
|
7412
7412
|
}
|
7413
7413
|
}
|
7414
|
-
const We = (n, e, t) => ku(() => new
|
7414
|
+
const We = (n, e, t) => ku(() => new Lr(e, n, t));
|
7415
7415
|
We(6, 144, 224 / 8);
|
7416
7416
|
We(6, 136, 256 / 8);
|
7417
7417
|
We(6, 104, 384 / 8);
|
@@ -7420,7 +7420,7 @@ We(1, 144, 224 / 8);
|
|
7420
7420
|
const nl = We(1, 136, 256 / 8);
|
7421
7421
|
We(1, 104, 384 / 8);
|
7422
7422
|
We(1, 72, 512 / 8);
|
7423
|
-
const ki = (n, e, t) => Au((r = {}) => new
|
7423
|
+
const ki = (n, e, t) => Au((r = {}) => new Lr(e, n, r.dkLen === void 0 ? t : r.dkLen, !0));
|
7424
7424
|
ki(31, 168, 128 / 8);
|
7425
7425
|
ki(31, 136, 256 / 8);
|
7426
7426
|
let Ai = !1;
|
@@ -7504,17 +7504,17 @@ function lt(n) {
|
|
7504
7504
|
function ul(n) {
|
7505
7505
|
return n && typeof n.getAddress == "function";
|
7506
7506
|
}
|
7507
|
-
async function
|
7507
|
+
async function en(n, e) {
|
7508
7508
|
const t = await e;
|
7509
7509
|
return (t == null || t === "0x0000000000000000000000000000000000000000") && (x(typeof n != "string", "unconfigured name", "UNCONFIGURED_NAME", { value: n }), _(!1, "invalid AddressLike value; did not resolve to a value address", "target", n)), lt(t);
|
7510
7510
|
}
|
7511
7511
|
function Mn(n, e) {
|
7512
7512
|
if (typeof n == "string")
|
7513
|
-
return n.match(/^0x[0-9a-f]{40}$/i) ? lt(n) : (x(e != null, "ENS resolution requires a provider", "UNSUPPORTED_OPERATION", { operation: "resolveName" }),
|
7513
|
+
return n.match(/^0x[0-9a-f]{40}$/i) ? lt(n) : (x(e != null, "ENS resolution requires a provider", "UNSUPPORTED_OPERATION", { operation: "resolveName" }), en(n, e.resolveName(n)));
|
7514
7514
|
if (ul(n))
|
7515
|
-
return
|
7515
|
+
return en(n, n.getAddress());
|
7516
7516
|
if (n && typeof n.then == "function")
|
7517
|
-
return
|
7517
|
+
return en(n, n);
|
7518
7518
|
_(!1, "unsupported addressable value", "target", n);
|
7519
7519
|
}
|
7520
7520
|
const Re = {};
|
@@ -7965,7 +7965,7 @@ function $i(n, e, t) {
|
|
7965
7965
|
} else
|
7966
7966
|
_(!1, "invalid tuple value", "tuple", t);
|
7967
7967
|
_(e.length === r.length, "types/value length mismatch", "tuple", t);
|
7968
|
-
let s = new
|
7968
|
+
let s = new yn(), i = new yn(), o = [];
|
7969
7969
|
e.forEach((c, u) => {
|
7970
7970
|
let l = r[u];
|
7971
7971
|
if (c.dynamic) {
|
@@ -8191,7 +8191,7 @@ class fr extends Be {
|
|
8191
8191
|
function Jt(n) {
|
8192
8192
|
return Je(bi(n));
|
8193
8193
|
}
|
8194
|
-
function
|
8194
|
+
function tn(n, e) {
|
8195
8195
|
return {
|
8196
8196
|
address: lt(n),
|
8197
8197
|
storageKeys: e.map((t, r) => (_(Ge(t, 32), "invalid slot", `storageKeys[${r}]`, t), t.toLowerCase()))
|
@@ -8199,11 +8199,11 @@ function rn(n, e) {
|
|
8199
8199
|
}
|
8200
8200
|
function xl(n) {
|
8201
8201
|
if (Array.isArray(n))
|
8202
|
-
return n.map((t, r) => Array.isArray(t) ? (_(t.length === 2, "invalid slot set", `value[${r}]`, t),
|
8202
|
+
return n.map((t, r) => Array.isArray(t) ? (_(t.length === 2, "invalid slot set", `value[${r}]`, t), tn(t[0], t[1])) : (_(t != null && typeof t == "object", "invalid address-slot set", "value", n), tn(t.address, t.storageKeys)));
|
8203
8203
|
_(n != null && typeof n == "object", "invalid access list", "value", n);
|
8204
8204
|
const e = Object.keys(n).map((t) => {
|
8205
8205
|
const r = n[t].reduce((s, i) => (s[i] = !0, s), {});
|
8206
|
-
return
|
8206
|
+
return tn(t, Object.keys(r).sort());
|
8207
8207
|
});
|
8208
8208
|
return e.sort((t, r) => t.address.localeCompare(r.address)), e;
|
8209
8209
|
}
|
@@ -8219,7 +8219,7 @@ const Ii = "constant external internal payable private public pure view", Tl = Y
|
|
8219
8219
|
",": "COMMA",
|
8220
8220
|
"@": "AT"
|
8221
8221
|
}, $l = new RegExp("^(\\s*)"), Pl = new RegExp("^([0-9]+)"), Nl = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"), Ui = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"), ji = new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");
|
8222
|
-
var z, pe, Kt,
|
8222
|
+
var z, pe, Kt, bn;
|
8223
8223
|
const Or = class {
|
8224
8224
|
constructor(e) {
|
8225
8225
|
F(this, Kt);
|
@@ -8257,7 +8257,7 @@ const Or = class {
|
|
8257
8257
|
const e = this.peek();
|
8258
8258
|
if (e.type !== "OPEN_PAREN")
|
8259
8259
|
throw new Error("bad start");
|
8260
|
-
const t = B(this, Kt,
|
8260
|
+
const t = B(this, Kt, bn).call(this, m(this, z) + 1, e.match + 1);
|
8261
8261
|
return P(this, z, e.match + 1), t;
|
8262
8262
|
}
|
8263
8263
|
// Pops and returns the items within "(" ITEM1 "," ITEM2 "," ... ")"
|
@@ -8268,7 +8268,7 @@ const Or = class {
|
|
8268
8268
|
const t = [];
|
8269
8269
|
for (; m(this, z) < e.match - 1; ) {
|
8270
8270
|
const r = this.peek().linkNext;
|
8271
|
-
t.push(B(this, Kt,
|
8271
|
+
t.push(B(this, Kt, bn).call(this, m(this, z) + 1, r)), P(this, z, r);
|
8272
8272
|
}
|
8273
8273
|
return P(this, z, e.match + 1), t;
|
8274
8274
|
}
|
@@ -8305,7 +8305,7 @@ const Or = class {
|
|
8305
8305
|
}
|
8306
8306
|
};
|
8307
8307
|
let ge = Or;
|
8308
|
-
z = new WeakMap(), pe = new WeakMap(), Kt = new WeakSet(),
|
8308
|
+
z = new WeakMap(), pe = new WeakMap(), Kt = new WeakSet(), bn = function(e = 0, t = 0) {
|
8309
8309
|
return new Or(m(this, pe).slice(e, t).map((r) => Object.freeze(Object.assign({}, r, {
|
8310
8310
|
match: r.match - e,
|
8311
8311
|
linkBack: r.linkBack - e,
|
@@ -8372,7 +8372,7 @@ function Ts(n, e) {
|
|
8372
8372
|
if (t.length > 1)
|
8373
8373
|
throw new Error(`conflicting types: ${t.join(", ")}`);
|
8374
8374
|
}
|
8375
|
-
function
|
8375
|
+
function Br(n, e) {
|
8376
8376
|
if (e.peekKeyword(Fi)) {
|
8377
8377
|
const t = e.pop().text;
|
8378
8378
|
if (t !== n)
|
@@ -8427,7 +8427,7 @@ function Os(n) {
|
|
8427
8427
|
}
|
8428
8428
|
return n;
|
8429
8429
|
}
|
8430
|
-
const j = {},
|
8430
|
+
const j = {}, re = Symbol.for("_ethers_internal"), ks = "_ParamTypeInternal", As = "_ErrorInternal", Ss = "_EventInternal", Rs = "_ConstructorInternal", $s = "_FallbackInternal", Ps = "_FunctionInternal", Ns = "_StructInternal";
|
8431
8431
|
var Pt, mr;
|
8432
8432
|
const ue = class {
|
8433
8433
|
/**
|
@@ -8472,7 +8472,7 @@ const ue = class {
|
|
8472
8472
|
* For non-array types this is ``null``.
|
8473
8473
|
*/
|
8474
8474
|
d(this, "arrayChildren");
|
8475
|
-
if (Ln(e, j, "ParamType"), Object.defineProperty(this,
|
8475
|
+
if (Ln(e, j, "ParamType"), Object.defineProperty(this, re, { value: ks }), o && (o = Object.freeze(o.slice())), s === "array") {
|
8476
8476
|
if (a == null || c == null)
|
8477
8477
|
throw new Error("");
|
8478
8478
|
} else if (a != null || c != null)
|
@@ -8644,7 +8644,7 @@ const ue = class {
|
|
8644
8644
|
* Returns true if %%value%% is a **ParamType**.
|
8645
8645
|
*/
|
8646
8646
|
static isParamType(e) {
|
8647
|
-
return e && e[
|
8647
|
+
return e && e[re] === ks;
|
8648
8648
|
}
|
8649
8649
|
};
|
8650
8650
|
let G = ue;
|
@@ -8790,7 +8790,7 @@ class ft {
|
|
8790
8790
|
return ct.isFragment(e);
|
8791
8791
|
}
|
8792
8792
|
}
|
8793
|
-
class
|
8793
|
+
class Hr extends ft {
|
8794
8794
|
/**
|
8795
8795
|
* @private
|
8796
8796
|
*/
|
@@ -8806,12 +8806,12 @@ class Mr extends ft {
|
|
8806
8806
|
function Wt(n, e) {
|
8807
8807
|
return "(" + e.map((t) => t.format(n)).join(n === "full" ? ", " : ",") + ")";
|
8808
8808
|
}
|
8809
|
-
class ee extends
|
8809
|
+
class ee extends Hr {
|
8810
8810
|
/**
|
8811
8811
|
* @private
|
8812
8812
|
*/
|
8813
8813
|
constructor(e, t, r) {
|
8814
|
-
super(e, "error", t, r), Object.defineProperty(this,
|
8814
|
+
super(e, "error", t, r), Object.defineProperty(this, re, { value: As });
|
8815
8815
|
}
|
8816
8816
|
/**
|
8817
8817
|
* The Custom Error selector.
|
@@ -8835,23 +8835,23 @@ class ee extends Mr {
|
|
8835
8835
|
if (typeof e == "string")
|
8836
8836
|
return ee.from(Ke(e));
|
8837
8837
|
if (e instanceof ge) {
|
8838
|
-
const t =
|
8838
|
+
const t = Br("error", e), r = De(e);
|
8839
8839
|
return ht(e), new ee(j, t, r);
|
8840
8840
|
}
|
8841
8841
|
return new ee(j, e.name, e.inputs ? e.inputs.map(G.from) : []);
|
8842
8842
|
}
|
8843
8843
|
static isFragment(e) {
|
8844
|
-
return e && e[
|
8844
|
+
return e && e[re] === As;
|
8845
8845
|
}
|
8846
8846
|
}
|
8847
|
-
class Oe extends
|
8847
|
+
class Oe extends Hr {
|
8848
8848
|
/**
|
8849
8849
|
* @private
|
8850
8850
|
*/
|
8851
8851
|
constructor(t, r, s, i) {
|
8852
8852
|
super(t, "event", r, s);
|
8853
8853
|
d(this, "anonymous");
|
8854
|
-
Object.defineProperty(this,
|
8854
|
+
Object.defineProperty(this, re, { value: Ss }), S(this, { anonymous: i });
|
8855
8855
|
}
|
8856
8856
|
/**
|
8857
8857
|
* The Event topic hash.
|
@@ -8879,13 +8879,13 @@ class Oe extends Mr {
|
|
8879
8879
|
if (typeof t == "string")
|
8880
8880
|
return Oe.from(Ke(t));
|
8881
8881
|
if (t instanceof ge) {
|
8882
|
-
const r =
|
8882
|
+
const r = Br("event", t), s = De(t, !0), i = !!je(t, Y(["anonymous"])).has("anonymous");
|
8883
8883
|
return ht(t), new Oe(j, r, s, i);
|
8884
8884
|
}
|
8885
8885
|
return new Oe(j, t.name, t.inputs ? t.inputs.map((r) => G.from(r, !0)) : [], !!t.anonymous);
|
8886
8886
|
}
|
8887
8887
|
static isFragment(t) {
|
8888
|
-
return t && t[
|
8888
|
+
return t && t[re] === Ss;
|
8889
8889
|
}
|
8890
8890
|
}
|
8891
8891
|
class Ce extends ft {
|
@@ -8896,7 +8896,7 @@ class Ce extends ft {
|
|
8896
8896
|
super(t, r, s);
|
8897
8897
|
d(this, "payable");
|
8898
8898
|
d(this, "gas");
|
8899
|
-
Object.defineProperty(this,
|
8899
|
+
Object.defineProperty(this, re, { value: Rs }), S(this, { payable: i, gas: o });
|
8900
8900
|
}
|
8901
8901
|
format(t) {
|
8902
8902
|
if (x(t != null && t !== "sighash", "cannot format a constructor for sighash", "UNSUPPORTED_OPERATION", { operation: "format(sighash)" }), t === "json")
|
@@ -8923,7 +8923,7 @@ class Ce extends ft {
|
|
8923
8923
|
return new Ce(j, "constructor", t.inputs ? t.inputs.map(G.from) : [], !!t.payable, t.gas != null ? t.gas : null);
|
8924
8924
|
}
|
8925
8925
|
static isFragment(t) {
|
8926
|
-
return t && t[
|
8926
|
+
return t && t[re] === Rs;
|
8927
8927
|
}
|
8928
8928
|
}
|
8929
8929
|
class Pe extends ft {
|
@@ -8933,7 +8933,7 @@ class Pe extends ft {
|
|
8933
8933
|
* If the function can be sent value during invocation.
|
8934
8934
|
*/
|
8935
8935
|
d(this, "payable");
|
8936
|
-
Object.defineProperty(this,
|
8936
|
+
Object.defineProperty(this, re, { value: $s }), S(this, { payable: s });
|
8937
8937
|
}
|
8938
8938
|
format(t) {
|
8939
8939
|
const r = this.inputs.length === 0 ? "receive" : "fallback";
|
@@ -8972,10 +8972,10 @@ class Pe extends ft {
|
|
8972
8972
|
_(!1, "invalid fallback description", "obj", t);
|
8973
8973
|
}
|
8974
8974
|
static isFragment(t) {
|
8975
|
-
return t && t[
|
8975
|
+
return t && t[re] === $s;
|
8976
8976
|
}
|
8977
8977
|
}
|
8978
|
-
class ke extends
|
8978
|
+
class ke extends Hr {
|
8979
8979
|
/**
|
8980
8980
|
* @private
|
8981
8981
|
*/
|
@@ -9002,7 +9002,7 @@ class ke extends Mr {
|
|
9002
9002
|
* The amount of gas to send when calling this function
|
9003
9003
|
*/
|
9004
9004
|
d(this, "gas");
|
9005
|
-
Object.defineProperty(this,
|
9005
|
+
Object.defineProperty(this, re, { value: Ps }), o = Object.freeze(o.slice()), S(this, { constant: s === "view" || s === "pure", gas: a, outputs: o, payable: s === "payable", stateMutability: s });
|
9006
9006
|
}
|
9007
9007
|
/**
|
9008
9008
|
* The Function selector.
|
@@ -9034,7 +9034,7 @@ class ke extends Mr {
|
|
9034
9034
|
if (typeof t == "string")
|
9035
9035
|
return ke.from(Ke(t));
|
9036
9036
|
if (t instanceof ge) {
|
9037
|
-
const r =
|
9037
|
+
const r = Br("function", t), s = De(t), i = Li(t);
|
9038
9038
|
let o = [];
|
9039
9039
|
je(t, Y(["returns"])).has("returns") && (o = De(t));
|
9040
9040
|
const a = Bi(t);
|
@@ -9043,15 +9043,15 @@ class ke extends Mr {
|
|
9043
9043
|
return new ke(j, t.name, t.stateMutability, t.inputs ? t.inputs.map(G.from) : [], t.outputs ? t.outputs.map(G.from) : [], t.gas != null ? t.gas : null);
|
9044
9044
|
}
|
9045
9045
|
static isFragment(t) {
|
9046
|
-
return t && t[
|
9046
|
+
return t && t[re] === Ps;
|
9047
9047
|
}
|
9048
9048
|
}
|
9049
|
-
class ct extends
|
9049
|
+
class ct extends Hr {
|
9050
9050
|
/**
|
9051
9051
|
* @private
|
9052
9052
|
*/
|
9053
9053
|
constructor(e, t, r) {
|
9054
|
-
super(e, "struct", t, r), Object.defineProperty(this,
|
9054
|
+
super(e, "struct", t, r), Object.defineProperty(this, re, { value: Ns });
|
9055
9055
|
}
|
9056
9056
|
format() {
|
9057
9057
|
throw new Error("@TODO");
|
@@ -9060,13 +9060,13 @@ class ct extends Mr {
|
|
9060
9060
|
if (typeof e == "string")
|
9061
9061
|
return ct.from(Ke(e));
|
9062
9062
|
if (e instanceof ge) {
|
9063
|
-
const t =
|
9063
|
+
const t = Br("struct", e), r = De(e);
|
9064
9064
|
return ht(e), new ct(j, t, r);
|
9065
9065
|
}
|
9066
9066
|
return new ct(j, e.name, e.inputs ? e.inputs.map(G.from) : []);
|
9067
9067
|
}
|
9068
9068
|
static isFragment(e) {
|
9069
|
-
return e && e[
|
9069
|
+
return e && e[re] === Ns;
|
9070
9070
|
}
|
9071
9071
|
}
|
9072
9072
|
const we = /* @__PURE__ */ new Map();
|
@@ -9081,7 +9081,7 @@ we.set(50, "ARRAY_RANGE_ERROR");
|
|
9081
9081
|
we.set(65, "OUT_OF_MEMORY");
|
9082
9082
|
we.set(81, "UNINITIALIZED_FUNCTION_CALL");
|
9083
9083
|
const Cl = new RegExp(/^bytes([0-9]*)$/), Fl = new RegExp(/^(u?int)([0-9]*)$/);
|
9084
|
-
let
|
9084
|
+
let rn = null;
|
9085
9085
|
function Dl(n, e, t, r) {
|
9086
9086
|
let s = "missing revert data", i = null;
|
9087
9087
|
const o = null;
|
@@ -9121,7 +9121,7 @@ function Dl(n, e, t, r) {
|
|
9121
9121
|
to: e.to ? lt(e.to) : null,
|
9122
9122
|
data: e.data || "0x"
|
9123
9123
|
};
|
9124
|
-
return e.from && (c.from = lt(e.from)),
|
9124
|
+
return e.from && (c.from = lt(e.from)), Dr(s, "CALL_EXCEPTION", {
|
9125
9125
|
action: n,
|
9126
9126
|
data: t,
|
9127
9127
|
reason: i,
|
@@ -9152,7 +9152,7 @@ const kr = class {
|
|
9152
9152
|
*/
|
9153
9153
|
encode(e, t) {
|
9154
9154
|
pi(t.length, e.length, "types/values length mismatch");
|
9155
|
-
const r = e.map((o) => B(this, ze, xt).call(this, G.from(o))), s = new fr(r, "_"), i = new
|
9155
|
+
const r = e.map((o) => B(this, ze, xt).call(this, G.from(o))), s = new fr(r, "_"), i = new yn();
|
9156
9156
|
return s.encode(i, t), i.data;
|
9157
9157
|
}
|
9158
9158
|
/**
|
@@ -9164,7 +9164,7 @@ const kr = class {
|
|
9164
9164
|
*/
|
9165
9165
|
decode(e, t, r) {
|
9166
9166
|
const s = e.map((o) => B(this, ze, xt).call(this, G.from(o)));
|
9167
|
-
return new fr(s, "_").decode(new
|
9167
|
+
return new fr(s, "_").decode(new mn(t, r));
|
9168
9168
|
}
|
9169
9169
|
/**
|
9170
9170
|
* Returns the shared singleton instance of a default [[AbiCoder]].
|
@@ -9172,7 +9172,7 @@ const kr = class {
|
|
9172
9172
|
* On the first call, the instance is created internally.
|
9173
9173
|
*/
|
9174
9174
|
static defaultAbiCoder() {
|
9175
|
-
return
|
9175
|
+
return rn == null && (rn = new kr()), rn;
|
9176
9176
|
}
|
9177
9177
|
/**
|
9178
9178
|
* Returns an ethers-compatible [[CallExceptionError]] Error for the given
|
@@ -9303,7 +9303,7 @@ const Cs = {
|
|
9303
9303
|
}
|
9304
9304
|
}
|
9305
9305
|
};
|
9306
|
-
var Ee, xe, Te, W, Xt,
|
9306
|
+
var Ee, xe, Te, W, Xt, _n, Zt, En;
|
9307
9307
|
const At = class {
|
9308
9308
|
/**
|
9309
9309
|
* Create a new Interface for the %%fragments%%.
|
@@ -9407,7 +9407,7 @@ const At = class {
|
|
9407
9407
|
* function name or function signature that belongs to the ABI.
|
9408
9408
|
*/
|
9409
9409
|
getFunctionName(e) {
|
9410
|
-
const t = B(this, Xt,
|
9410
|
+
const t = B(this, Xt, _n).call(this, e, null, !1);
|
9411
9411
|
return _(t, "no matching function", "key", e), t.name;
|
9412
9412
|
}
|
9413
9413
|
/**
|
@@ -9421,7 +9421,7 @@ const At = class {
|
|
9421
9421
|
* the ABI, this will throw.
|
9422
9422
|
*/
|
9423
9423
|
getFunction(e, t) {
|
9424
|
-
return B(this, Xt,
|
9424
|
+
return B(this, Xt, _n).call(this, e, t || null, !0);
|
9425
9425
|
}
|
9426
9426
|
/**
|
9427
9427
|
* Iterate over all functions, calling %%callback%%, sorted by their name.
|
@@ -9439,7 +9439,7 @@ const At = class {
|
|
9439
9439
|
* event name or event signature that belongs to the ABI.
|
9440
9440
|
*/
|
9441
9441
|
getEventName(e) {
|
9442
|
-
const t = B(this, Zt,
|
9442
|
+
const t = B(this, Zt, En).call(this, e, null, !1);
|
9443
9443
|
return _(t, "no matching event", "key", e), t.name;
|
9444
9444
|
}
|
9445
9445
|
/**
|
@@ -9453,7 +9453,7 @@ const At = class {
|
|
9453
9453
|
* the ABI, this will throw.
|
9454
9454
|
*/
|
9455
9455
|
getEvent(e, t) {
|
9456
|
-
return B(this, Zt,
|
9456
|
+
return B(this, Zt, En).call(this, e, t || null, !0);
|
9457
9457
|
}
|
9458
9458
|
/**
|
9459
9459
|
* Iterate over all events, calling %%callback%%, sorted by their name.
|
@@ -9852,8 +9852,8 @@ const At = class {
|
|
9852
9852
|
return e instanceof At ? e : typeof e == "string" ? new At(JSON.parse(e)) : typeof e.format == "function" ? new At(e.format("json")) : new At(e);
|
9853
9853
|
}
|
9854
9854
|
};
|
9855
|
-
let
|
9856
|
-
Ee = new WeakMap(), xe = new WeakMap(), Te = new WeakMap(), W = new WeakMap(), Xt = new WeakSet(),
|
9855
|
+
let vn = At;
|
9856
|
+
Ee = new WeakMap(), xe = new WeakMap(), Te = new WeakMap(), W = new WeakMap(), Xt = new WeakSet(), _n = function(e, t, r) {
|
9857
9857
|
if (Ge(e)) {
|
9858
9858
|
const i = e.toLowerCase();
|
9859
9859
|
for (const o of m(this, Te).values())
|
@@ -9907,7 +9907,7 @@ Ee = new WeakMap(), xe = new WeakMap(), Te = new WeakMap(), W = new WeakMap(), X
|
|
9907
9907
|
}
|
9908
9908
|
const s = m(this, Te).get(ke.from(e).format());
|
9909
9909
|
return s || null;
|
9910
|
-
}, Zt = new WeakSet(),
|
9910
|
+
}, Zt = new WeakSet(), En = function(e, t, r) {
|
9911
9911
|
if (Ge(e)) {
|
9912
9912
|
const i = e.toLowerCase();
|
9913
9913
|
for (const o of m(this, xe).values())
|
@@ -10255,7 +10255,7 @@ const Kn = class {
|
|
10255
10255
|
a = !0;
|
10256
10256
|
}), s > 0) {
|
10257
10257
|
const g = setTimeout(() => {
|
10258
|
-
w(), y(
|
10258
|
+
w(), y(Dr("wait for transaction timeout", "TIMEOUT"));
|
10259
10259
|
}, s);
|
10260
10260
|
p.push(() => {
|
10261
10261
|
clearTimeout(g);
|
@@ -10317,7 +10317,7 @@ const Kn = class {
|
|
10317
10317
|
return P(t, qe, e), t;
|
10318
10318
|
}
|
10319
10319
|
};
|
10320
|
-
let
|
10320
|
+
let xn = Kn;
|
10321
10321
|
qe = new WeakMap();
|
10322
10322
|
function Hi(n, e) {
|
10323
10323
|
return { orphan: "reorder-transaction", tx: n, other: e };
|
@@ -10368,7 +10368,7 @@ class zl extends Ml {
|
|
10368
10368
|
}
|
10369
10369
|
Nt = new WeakMap();
|
10370
10370
|
var Qt;
|
10371
|
-
class qn extends
|
10371
|
+
class qn extends xn {
|
10372
10372
|
constructor(t, r, s) {
|
10373
10373
|
super(s, r);
|
10374
10374
|
F(this, Qt, void 0);
|
@@ -10646,9 +10646,9 @@ async function Us(n, e, t) {
|
|
10646
10646
|
}
|
10647
10647
|
if (A) {
|
10648
10648
|
const C = A, X = s ? n.interface.decodeEventLog(s, g.data, g.topics) : [];
|
10649
|
-
|
10649
|
+
On(n, t, X, (U) => new ql(n, U, t, C, g));
|
10650
10650
|
} else
|
10651
|
-
|
10651
|
+
On(n, t, [], (C) => new Vi(n, C, t, g));
|
10652
10652
|
};
|
10653
10653
|
let p = [];
|
10654
10654
|
u = { tag: i, listeners: [], start: () => {
|
@@ -10662,9 +10662,9 @@ async function Us(n, e, t) {
|
|
10662
10662
|
}
|
10663
10663
|
return u;
|
10664
10664
|
}
|
10665
|
-
let
|
10665
|
+
let Tn = Promise.resolve();
|
10666
10666
|
async function th(n, e, t, r) {
|
10667
|
-
await
|
10667
|
+
await Tn;
|
10668
10668
|
const s = await Bt(n, e);
|
10669
10669
|
if (!s)
|
10670
10670
|
return !1;
|
@@ -10679,13 +10679,13 @@ async function th(n, e, t, r) {
|
|
10679
10679
|
return !a;
|
10680
10680
|
}), i > 0;
|
10681
10681
|
}
|
10682
|
-
async function
|
10682
|
+
async function On(n, e, t, r) {
|
10683
10683
|
try {
|
10684
|
-
await
|
10684
|
+
await Tn;
|
10685
10685
|
} catch {
|
10686
10686
|
}
|
10687
10687
|
const s = th(n, e, t, r);
|
10688
|
-
return
|
10688
|
+
return Tn = s, await s;
|
10689
10689
|
}
|
10690
10690
|
const js = ["then"];
|
10691
10691
|
var lh;
|
@@ -10698,7 +10698,7 @@ const Ar = class {
|
|
10698
10698
|
d(this, lh);
|
10699
10699
|
d(this, "fallback");
|
10700
10700
|
r == null && (r = null);
|
10701
|
-
const i =
|
10701
|
+
const i = vn.from(t);
|
10702
10702
|
S(this, { target: e, runner: r, interface: i }), Object.defineProperty(this, xr, { value: {} });
|
10703
10703
|
let o, a = null, c = null;
|
10704
10704
|
if (s) {
|
@@ -10712,7 +10712,7 @@ const Ar = class {
|
|
10712
10712
|
else {
|
10713
10713
|
const h = dt(r, "resolveName");
|
10714
10714
|
if (!Gn(h))
|
10715
|
-
throw
|
10715
|
+
throw Dr("contract runner does not support name resolution", "UNSUPPORTED_OPERATION", {
|
10716
10716
|
operation: "resolveName"
|
10717
10717
|
});
|
10718
10718
|
o = h.resolveName(e).then((y) => {
|
@@ -10817,7 +10817,7 @@ const Ar = class {
|
|
10817
10817
|
return r.listeners.push({ listener: t, once: !0 }), r.start(), this;
|
10818
10818
|
}
|
10819
10819
|
async emit(e, ...t) {
|
10820
|
-
return await
|
10820
|
+
return await On(this, e, t, null);
|
10821
10821
|
}
|
10822
10822
|
async listenerCount(e) {
|
10823
10823
|
if (e) {
|
@@ -10884,10 +10884,10 @@ const Ar = class {
|
|
10884
10884
|
return r == null && (r = null), new this(e, t, r);
|
10885
10885
|
}
|
10886
10886
|
};
|
10887
|
-
let
|
10887
|
+
let kn = Ar;
|
10888
10888
|
lh = xr;
|
10889
10889
|
function rh() {
|
10890
|
-
return
|
10890
|
+
return kn;
|
10891
10891
|
}
|
10892
10892
|
class nh extends rh() {
|
10893
10893
|
}
|
@@ -10939,11 +10939,11 @@ class Ft {
|
|
10939
10939
|
}
|
10940
10940
|
static schema() {
|
10941
10941
|
return ut().of(
|
10942
|
-
|
10943
|
-
address:
|
10944
|
-
bytecode:
|
10945
|
-
abiHash:
|
10946
|
-
function:
|
10942
|
+
oe({
|
10943
|
+
address: O().required(),
|
10944
|
+
bytecode: O().matches(/^(0x)?([0-9a-fA-F]{2})*$/).required(),
|
10945
|
+
abiHash: O().matches(/^[A-Fa-f0-9]{64}/).required(),
|
10946
|
+
function: O().required()
|
10947
10947
|
})
|
10948
10948
|
);
|
10949
10949
|
}
|
@@ -11065,7 +11065,7 @@ class Me {
|
|
11065
11065
|
throw new Error("Invalid Filter. Unknown Type");
|
11066
11066
|
}
|
11067
11067
|
}
|
11068
|
-
class
|
11068
|
+
class Mr {
|
11069
11069
|
constructor() {
|
11070
11070
|
d(this, "groups", []);
|
11071
11071
|
this.newGroup("WHERE");
|
@@ -11074,7 +11074,7 @@ class Vr {
|
|
11074
11074
|
return Me.version();
|
11075
11075
|
}
|
11076
11076
|
static new() {
|
11077
|
-
return new
|
11077
|
+
return new Mr();
|
11078
11078
|
}
|
11079
11079
|
newGroup(e) {
|
11080
11080
|
if (this.groups.length !== 0 && e === "WHERE")
|
@@ -11106,11 +11106,11 @@ class Vr {
|
|
11106
11106
|
return this.groups;
|
11107
11107
|
}
|
11108
11108
|
static schema() {
|
11109
|
-
const e =
|
11109
|
+
const e = O().oneOf(["AND", "OR", "XOR", "NAND", "NOR", "WHERE"]).required(), t = oe({
|
11110
11110
|
logic: e,
|
11111
|
-
key:
|
11112
|
-
type:
|
11113
|
-
operation:
|
11111
|
+
key: O().required(),
|
11112
|
+
type: O().oneOf(["String", "Address", "Number"]).required(),
|
11113
|
+
operation: O().when("type", ([r], s) => {
|
11114
11114
|
switch (r) {
|
11115
11115
|
case "String":
|
11116
11116
|
return s.oneOf([
|
@@ -11132,9 +11132,9 @@ class Vr {
|
|
11132
11132
|
constant: ni().when("type", ([r]) => {
|
11133
11133
|
switch (r) {
|
11134
11134
|
case "String":
|
11135
|
-
return
|
11135
|
+
return O();
|
11136
11136
|
case "Address":
|
11137
|
-
return
|
11137
|
+
return O();
|
11138
11138
|
case "Number":
|
11139
11139
|
return q();
|
11140
11140
|
default:
|
@@ -11143,20 +11143,20 @@ class Vr {
|
|
11143
11143
|
}).required()
|
11144
11144
|
});
|
11145
11145
|
return ut().of(
|
11146
|
-
|
11146
|
+
oe({
|
11147
11147
|
logic: e,
|
11148
11148
|
conditions: ut().of(t).required()
|
11149
11149
|
})
|
11150
11150
|
);
|
11151
11151
|
}
|
11152
11152
|
}
|
11153
|
-
const sh = "handler_function_call_v2", ih = /^(\d+)([SMHD])$/i, Ls =
|
11154
|
-
timeBase:
|
11153
|
+
const sh = "handler_function_call_v2", ih = /^(\d+)([SMHD])$/i, Ls = oe({
|
11154
|
+
timeBase: O().oneOf(["blocks", "time"]).required(),
|
11155
11155
|
nBlocks: q().min(10).when(
|
11156
11156
|
"timeBase",
|
11157
11157
|
([n], e) => n === "blocks" ? e.required() : e
|
11158
11158
|
),
|
11159
|
-
timePeriod:
|
11159
|
+
timePeriod: O().matches(
|
11160
11160
|
ih,
|
11161
11161
|
"timePeriod must be of the format n[s|m|h|d], eg 10s for 10 seconds"
|
11162
11162
|
).when(
|
@@ -11166,18 +11166,18 @@ const sh = "handler_function_call_v2", ih = /^(\d+)([SMHD])$/i, Ls = re({
|
|
11166
11166
|
startTime: q().default(0),
|
11167
11167
|
debounceCount: q().default(0),
|
11168
11168
|
functions: Ft.schema().required(),
|
11169
|
-
triggerOn:
|
11170
|
-
latch:
|
11171
|
-
filterVersion:
|
11169
|
+
triggerOn: O().oneOf(["always", "filter"]).default("always"),
|
11170
|
+
latch: Fn().default(!1),
|
11171
|
+
filterVersion: O().when(
|
11172
11172
|
"triggerOn",
|
11173
11173
|
([n], e) => n === "filter" ? e.default("0") : e.nullable().default(null)
|
11174
11174
|
).required(),
|
11175
|
-
filter:
|
11175
|
+
filter: Mr.schema().when(
|
11176
11176
|
"triggerOn",
|
11177
11177
|
([n], e) => n === "filter" ? e.required() : e.nullable().default(null)
|
11178
11178
|
).required()
|
11179
11179
|
});
|
11180
|
-
class
|
11180
|
+
class nn {
|
11181
11181
|
static async SimpleToRaw(e, t, r) {
|
11182
11182
|
return {
|
11183
11183
|
alertType: "event",
|
@@ -11229,16 +11229,16 @@ class sn {
|
|
11229
11229
|
];
|
11230
11230
|
}
|
11231
11231
|
}
|
11232
|
-
const oh = "handler_onchain_event_v2", ah =
|
11233
|
-
addresses: ut().of(
|
11234
|
-
abiHash:
|
11235
|
-
event:
|
11232
|
+
const oh = "handler_onchain_event_v2", ah = oe({
|
11233
|
+
addresses: ut().of(O().required()).required(),
|
11234
|
+
abiHash: O().required(),
|
11235
|
+
event: O().required(),
|
11236
11236
|
debounceCount: q().default(0),
|
11237
11237
|
functions: Ft.schema().nullable().default(null),
|
11238
|
-
triggerOn:
|
11239
|
-
latch:
|
11240
|
-
filterVersion:
|
11241
|
-
filter:
|
11238
|
+
triggerOn: O().oneOf(["always", "filter"]).default("always"),
|
11239
|
+
latch: Fn().default(!1),
|
11240
|
+
filterVersion: O().nullable().default(null),
|
11241
|
+
filter: Mr.schema().when(
|
11242
11242
|
"triggerOn",
|
11243
11243
|
([n], e) => n === "filter" ? e : e.nullable().default(null)
|
11244
11244
|
).required()
|
@@ -11262,7 +11262,7 @@ const oh = "handler_onchain_event_v2", ah = re({
|
|
11262
11262
|
index: o
|
11263
11263
|
});
|
11264
11264
|
}), t);
|
11265
|
-
class
|
11265
|
+
class sn {
|
11266
11266
|
static async SimpleToRaw(e, t, r) {
|
11267
11267
|
return {
|
11268
11268
|
alertType: "event",
|
@@ -11280,12 +11280,37 @@ class on {
|
|
11280
11280
|
let r = [
|
11281
11281
|
/* eslint-disable */
|
11282
11282
|
{ source: "defaults", label: "Network", type: "string", key: "network" },
|
11283
|
-
{
|
11284
|
-
|
11283
|
+
{
|
11284
|
+
source: "defaults",
|
11285
|
+
label: "Timestamp",
|
11286
|
+
type: "number",
|
11287
|
+
key: "timestamp"
|
11288
|
+
},
|
11289
|
+
{
|
11290
|
+
source: "defaults",
|
11291
|
+
label: "Time GMT",
|
11292
|
+
type: "string",
|
11293
|
+
key: "timeStringGMT"
|
11294
|
+
},
|
11285
11295
|
{ source: "defaults", label: "Block", type: "number", key: "block" },
|
11286
|
-
{
|
11287
|
-
|
11288
|
-
|
11296
|
+
{
|
11297
|
+
source: "defaults",
|
11298
|
+
label: "Time Period",
|
11299
|
+
type: "string",
|
11300
|
+
key: "timePeriod"
|
11301
|
+
},
|
11302
|
+
{
|
11303
|
+
source: "defaults",
|
11304
|
+
label: "Block Hash",
|
11305
|
+
type: "string",
|
11306
|
+
key: "blockHash"
|
11307
|
+
},
|
11308
|
+
{
|
11309
|
+
source: "defaults",
|
11310
|
+
label: "Transaction Hash",
|
11311
|
+
type: "string",
|
11312
|
+
key: "txHash"
|
11313
|
+
},
|
11289
11314
|
{ source: "defaults", label: "Event", type: "string", key: "event" }
|
11290
11315
|
/* eslint-enable */
|
11291
11316
|
];
|
@@ -11314,7 +11339,7 @@ class Ht {
|
|
11314
11339
|
static SimpleToRaw(e, t, r, s) {
|
11315
11340
|
switch (t) {
|
11316
11341
|
case "PollFunctionV2":
|
11317
|
-
return
|
11342
|
+
return nn.SimpleToRaw(
|
11318
11343
|
e,
|
11319
11344
|
r,
|
11320
11345
|
s
|
@@ -11332,7 +11357,7 @@ class Ht {
|
|
11332
11357
|
s
|
11333
11358
|
);
|
11334
11359
|
case "OnchainEventV2":
|
11335
|
-
return
|
11360
|
+
return sn.SimpleToRaw(
|
11336
11361
|
e,
|
11337
11362
|
r,
|
11338
11363
|
s
|
@@ -11344,13 +11369,13 @@ class Ht {
|
|
11344
11369
|
static Validate(e, t) {
|
11345
11370
|
switch (e) {
|
11346
11371
|
case "PollFunctionV2":
|
11347
|
-
return
|
11372
|
+
return nn.validate(t);
|
11348
11373
|
case "PollFunctionV1":
|
11349
11374
|
return ps.validate(t);
|
11350
11375
|
case "OnchainEventV1":
|
11351
11376
|
return ys.validate(t);
|
11352
11377
|
case "OnchainEventV2":
|
11353
|
-
return
|
11378
|
+
return sn.validate(t);
|
11354
11379
|
default:
|
11355
11380
|
throw new Error("Invalid Trigger ID");
|
11356
11381
|
}
|
@@ -11393,12 +11418,12 @@ class Ht {
|
|
11393
11418
|
static readFields(e, t, r) {
|
11394
11419
|
switch (e) {
|
11395
11420
|
case "PollFunctionV2":
|
11396
|
-
return
|
11421
|
+
return nn.readFields(
|
11397
11422
|
t,
|
11398
11423
|
r
|
11399
11424
|
);
|
11400
11425
|
case "OnchainEventV2":
|
11401
|
-
return
|
11426
|
+
return sn.readFields(
|
11402
11427
|
t,
|
11403
11428
|
r
|
11404
11429
|
);
|
@@ -11452,10 +11477,9 @@ class Xi {
|
|
11452
11477
|
return await this.request("post", "alerts", { body: t });
|
11453
11478
|
}
|
11454
11479
|
async updateRawTrigger(e, t) {
|
11455
|
-
const r =
|
11456
|
-
|
11457
|
-
|
11458
|
-
}).validate(t);
|
11480
|
+
const r = {};
|
11481
|
+
if (t.name !== void 0 && (r.nickname = t.name), t.enabled !== void 0 && (r.enabled = t.enabled), Object.keys(r).length === 0)
|
11482
|
+
throw new Error("No suitable fields");
|
11459
11483
|
await this.request("patch", `alerts/trigger/${e}`, { body: r });
|
11460
11484
|
}
|
11461
11485
|
async updateAlert(e, t) {
|
@@ -11474,10 +11498,10 @@ class Xi {
|
|
11474
11498
|
triggered: e.trigger.triggered,
|
11475
11499
|
triggerId: Ht.RawTypeToSimpleType(e.trigger.type),
|
11476
11500
|
trigger: await Ht.RawToSimple(e.trigger),
|
11477
|
-
notificationId:
|
11501
|
+
notificationId: Qr.RawTypeToSimpleType(
|
11478
11502
|
e.notification.notify_type
|
11479
11503
|
),
|
11480
|
-
notification: await
|
11504
|
+
notification: await Qr.RawToSimple(e.notification)
|
11481
11505
|
};
|
11482
11506
|
}
|
11483
11507
|
async encode(e) {
|
@@ -11488,7 +11512,7 @@ class Xi {
|
|
11488
11512
|
e.network,
|
11489
11513
|
e.trigger
|
11490
11514
|
),
|
11491
|
-
notification: await
|
11515
|
+
notification: await Qr.SimpleToRaw(
|
11492
11516
|
e.notificationId,
|
11493
11517
|
e.notification
|
11494
11518
|
)
|
@@ -11584,7 +11608,7 @@ const fh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11584
11608
|
export {
|
11585
11609
|
Zi as AlertBuilder,
|
11586
11610
|
Xi as DeNotifyClient,
|
11587
|
-
|
11611
|
+
Mr as FilterBuilder,
|
11588
11612
|
Ft as FunctionBuilder,
|
11589
11613
|
dh as Notification,
|
11590
11614
|
fh as Trigger
|