@aikaara/chat-sdk 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MountTenant-BrBxPpjb.cjs → MountTenant-DvmiAoZ_.cjs} +13 -13
- package/dist/{MountTenant-BVimPLfY.mjs → MountTenant-DzNgBTiU.mjs} +701 -680
- package/dist/cdn/aikaara-chat.iife.js +18 -18
- package/dist/headless.cjs +1 -1
- package/dist/headless.d.ts +93 -1
- package/dist/headless.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +93 -1
- package/dist/index.mjs +2 -2
- package/dist/remote-author.cjs +1 -0
- package/dist/remote-author.d.ts +62 -0
- package/dist/remote-author.mjs +31 -0
- package/dist/remote-host.cjs +3 -0
- package/dist/remote-host.d.ts +68 -0
- package/dist/remote-host.mjs +104 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.mjs +1 -1
- package/package.json +11 -1
|
@@ -250,6 +250,8 @@ class bl {
|
|
|
250
250
|
baseUrl;
|
|
251
251
|
apiKey;
|
|
252
252
|
authToken;
|
|
253
|
+
// Held for future per-call user-scoped requests; declared so
|
|
254
|
+
// strict-mode consumers see a real field, not a dropped parameter.
|
|
253
255
|
userToken;
|
|
254
256
|
constructor(e, t, n, l) {
|
|
255
257
|
this.baseUrl = e, this.userToken = t, this.apiKey = n, this.authToken = l;
|
|
@@ -548,20 +550,20 @@ function Al() {
|
|
|
548
550
|
return (f + m) * 3 / 4 - m;
|
|
549
551
|
}
|
|
550
552
|
function a(y) {
|
|
551
|
-
var f, m = i(y), b = m[0],
|
|
552
|
-
for (v = 0; v < x; v += 4) f = e[y.charCodeAt(v)] << 18 | e[y.charCodeAt(v + 1)] << 12 | e[y.charCodeAt(v + 2)] << 6 | e[y.charCodeAt(v + 3)], g[
|
|
553
|
-
return
|
|
553
|
+
var f, m = i(y), b = m[0], _ = m[1], g = new t(s(y, b, _)), S = 0, x = _ > 0 ? b - 4 : b, v;
|
|
554
|
+
for (v = 0; v < x; v += 4) f = e[y.charCodeAt(v)] << 18 | e[y.charCodeAt(v + 1)] << 12 | e[y.charCodeAt(v + 2)] << 6 | e[y.charCodeAt(v + 3)], g[S++] = f >> 16 & 255, g[S++] = f >> 8 & 255, g[S++] = f & 255;
|
|
555
|
+
return _ === 2 && (f = e[y.charCodeAt(v)] << 2 | e[y.charCodeAt(v + 1)] >> 4, g[S++] = f & 255), _ === 1 && (f = e[y.charCodeAt(v)] << 10 | e[y.charCodeAt(v + 1)] << 4 | e[y.charCodeAt(v + 2)] >> 2, g[S++] = f >> 8 & 255, g[S++] = f & 255), g;
|
|
554
556
|
}
|
|
555
557
|
function c(y) {
|
|
556
558
|
return u[y >> 18 & 63] + u[y >> 12 & 63] + u[y >> 6 & 63] + u[y & 63];
|
|
557
559
|
}
|
|
558
560
|
function d(y, f, m) {
|
|
559
|
-
for (var b,
|
|
560
|
-
return
|
|
561
|
+
for (var b, _ = [], g = f; g < m; g += 3) b = (y[g] << 16 & 16711680) + (y[g + 1] << 8 & 65280) + (y[g + 2] & 255), _.push(c(b));
|
|
562
|
+
return _.join("");
|
|
561
563
|
}
|
|
562
564
|
function p(y) {
|
|
563
|
-
for (var f, m = y.length, b = m % 3,
|
|
564
|
-
return b === 1 ? (f = y[m - 1],
|
|
565
|
+
for (var f, m = y.length, b = m % 3, _ = [], g = 16383, S = 0, x = m - b; S < x; S += g) _.push(d(y, S, S + g > x ? x : S + g));
|
|
566
|
+
return b === 1 ? (f = y[m - 1], _.push(u[f >> 2] + u[f << 4 & 63] + "==")) : b === 2 && (f = (y[m - 2] << 8) + y[m - 1], _.push(u[f >> 10] + u[f >> 4 & 63] + u[f << 2 & 63] + "=")), _.join("");
|
|
565
567
|
}
|
|
566
568
|
return Ct;
|
|
567
569
|
}
|
|
@@ -587,7 +589,7 @@ function Tl() {
|
|
|
587
589
|
if (Zn) return dt;
|
|
588
590
|
Zn = !0;
|
|
589
591
|
let u = Al(), e = Il(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
|
|
590
|
-
dt.Buffer = i, dt.SlowBuffer =
|
|
592
|
+
dt.Buffer = i, dt.SlowBuffer = _, dt.INSPECT_MAX_BYTES = 50;
|
|
591
593
|
let n = 2147483647;
|
|
592
594
|
dt.kMaxLength = n, i.TYPED_ARRAY_SUPPORT = l(), !i.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
593
595
|
function l() {
|
|
@@ -687,7 +689,7 @@ function Tl() {
|
|
|
687
689
|
if (h >= n) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + n.toString(16) + " bytes");
|
|
688
690
|
return h | 0;
|
|
689
691
|
}
|
|
690
|
-
function
|
|
692
|
+
function _(h) {
|
|
691
693
|
return +h != h && (h = 0), i.alloc(+h);
|
|
692
694
|
}
|
|
693
695
|
i.isBuffer = function(h) {
|
|
@@ -763,7 +765,7 @@ function Tl() {
|
|
|
763
765
|
}
|
|
764
766
|
}
|
|
765
767
|
i.byteLength = g;
|
|
766
|
-
function
|
|
768
|
+
function S(h, w, A) {
|
|
767
769
|
let U = !1;
|
|
768
770
|
if ((w === void 0 || w < 0) && (w = 0), w > this.length || ((A === void 0 || A > this.length) && (A = this.length), A <= 0) || (A >>>= 0, w >>>= 0, A <= w)) return "";
|
|
769
771
|
for (h || (h = "utf8"); ; ) switch (h) {
|
|
@@ -811,7 +813,7 @@ function Tl() {
|
|
|
811
813
|
return this;
|
|
812
814
|
}, i.prototype.toString = function() {
|
|
813
815
|
let h = this.length;
|
|
814
|
-
return h === 0 ? "" : arguments.length === 0 ? W(this, 0, h) :
|
|
816
|
+
return h === 0 ? "" : arguments.length === 0 ? W(this, 0, h) : S.apply(this, arguments);
|
|
815
817
|
}, i.prototype.toLocaleString = i.prototype.toString, i.prototype.equals = function(h) {
|
|
816
818
|
if (!i.isBuffer(h)) throw new TypeError("Argument must be a Buffer");
|
|
817
819
|
return this === h ? !0 : i.compare(this, h) === 0;
|
|
@@ -1438,24 +1440,24 @@ var nt, Tr, Lo, No, Ne = He(() => {
|
|
|
1438
1440
|
}), We = pe((u, e) => {
|
|
1439
1441
|
le(), ce(), ue();
|
|
1440
1442
|
var { format: t, inspect: n } = Uo(), { AggregateError: l } = Re(), r = globalThis.AggregateError || l, i = /* @__PURE__ */ Symbol("kIsNodeError"), o = ["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"], s = /^([A-Z][a-z0-9]*)+$/, a = "__node_internal_", c = {};
|
|
1441
|
-
function d(g,
|
|
1442
|
-
if (!g) throw new c.ERR_INTERNAL_ASSERTION(
|
|
1443
|
+
function d(g, S) {
|
|
1444
|
+
if (!g) throw new c.ERR_INTERNAL_ASSERTION(S);
|
|
1443
1445
|
}
|
|
1444
1446
|
function p(g) {
|
|
1445
|
-
let
|
|
1446
|
-
for (; x >= v + 4; x -= 3)
|
|
1447
|
-
return `${g.slice(0, x)}${
|
|
1447
|
+
let S = "", x = g.length, v = g[0] === "-" ? 1 : 0;
|
|
1448
|
+
for (; x >= v + 4; x -= 3) S = `_${g.slice(x - 3, x)}${S}`;
|
|
1449
|
+
return `${g.slice(0, x)}${S}`;
|
|
1448
1450
|
}
|
|
1449
|
-
function y(g,
|
|
1450
|
-
if (typeof
|
|
1451
|
-
let v = (
|
|
1452
|
-
return d(v === x.length, `Code: ${g}; The provided arguments length (${x.length}) does not match the required ones (${v}).`), x.length === 0 ?
|
|
1451
|
+
function y(g, S, x) {
|
|
1452
|
+
if (typeof S == "function") return d(S.length <= x.length, `Code: ${g}; The provided arguments length (${x.length}) does not match the required ones (${S.length}).`), S(...x);
|
|
1453
|
+
let v = (S.match(/%[dfijoOs]/g) || []).length;
|
|
1454
|
+
return d(v === x.length, `Code: ${g}; The provided arguments length (${x.length}) does not match the required ones (${v}).`), x.length === 0 ? S : t(S, ...x);
|
|
1453
1455
|
}
|
|
1454
|
-
function f(g,
|
|
1456
|
+
function f(g, S, x) {
|
|
1455
1457
|
x || (x = Error);
|
|
1456
1458
|
class v extends x {
|
|
1457
1459
|
constructor(...k) {
|
|
1458
|
-
super(y(g,
|
|
1460
|
+
super(y(g, S, k));
|
|
1459
1461
|
}
|
|
1460
1462
|
toString() {
|
|
1461
1463
|
return `${this.name} [${g}]: ${this.message}`;
|
|
@@ -1466,29 +1468,29 @@ var nt, Tr, Lo, No, Ne = He(() => {
|
|
|
1466
1468
|
}, writable: !0, enumerable: !1, configurable: !0 } }), v.prototype.code = g, v.prototype[i] = !0, c[g] = v;
|
|
1467
1469
|
}
|
|
1468
1470
|
function m(g) {
|
|
1469
|
-
let
|
|
1470
|
-
return Object.defineProperty(g, "name", { value:
|
|
1471
|
+
let S = a + g.name;
|
|
1472
|
+
return Object.defineProperty(g, "name", { value: S }), g;
|
|
1471
1473
|
}
|
|
1472
|
-
function b(g,
|
|
1473
|
-
if (g &&
|
|
1474
|
-
if (Array.isArray(
|
|
1475
|
-
let x = new r([
|
|
1476
|
-
return x.code =
|
|
1474
|
+
function b(g, S) {
|
|
1475
|
+
if (g && S && g !== S) {
|
|
1476
|
+
if (Array.isArray(S.errors)) return S.errors.push(g), S;
|
|
1477
|
+
let x = new r([S, g], S.message);
|
|
1478
|
+
return x.code = S.code, x;
|
|
1477
1479
|
}
|
|
1478
|
-
return g ||
|
|
1480
|
+
return g || S;
|
|
1479
1481
|
}
|
|
1480
|
-
var
|
|
1481
|
-
constructor(g = "The operation was aborted",
|
|
1482
|
-
if (
|
|
1483
|
-
super(g,
|
|
1482
|
+
var _ = class extends Error {
|
|
1483
|
+
constructor(g = "The operation was aborted", S = void 0) {
|
|
1484
|
+
if (S !== void 0 && typeof S != "object") throw new c.ERR_INVALID_ARG_TYPE("options", "Object", S);
|
|
1485
|
+
super(g, S), this.code = "ABORT_ERR", this.name = "AbortError";
|
|
1484
1486
|
}
|
|
1485
1487
|
};
|
|
1486
|
-
f("ERR_ASSERTION", "%s", Error), f("ERR_INVALID_ARG_TYPE", (g,
|
|
1487
|
-
d(typeof g == "string", "'name' must be a string"), Array.isArray(
|
|
1488
|
+
f("ERR_ASSERTION", "%s", Error), f("ERR_INVALID_ARG_TYPE", (g, S, x) => {
|
|
1489
|
+
d(typeof g == "string", "'name' must be a string"), Array.isArray(S) || (S = [S]);
|
|
1488
1490
|
let v = "The ";
|
|
1489
1491
|
g.endsWith(" argument") ? v += `${g} ` : v += `"${g}" ${g.includes(".") ? "property" : "argument"} `, v += "must be ";
|
|
1490
1492
|
let E = [], k = [], I = [];
|
|
1491
|
-
for (let O of
|
|
1493
|
+
for (let O of S) d(typeof O == "string", "All expected entries have to be of type string"), o.includes(O) ? E.push(O.toLowerCase()) : s.test(O) ? k.push(O) : (d(O !== "object", 'The value "object" should be written as "Object"'), I.push(O));
|
|
1492
1494
|
if (k.length > 0) {
|
|
1493
1495
|
let O = E.indexOf("object");
|
|
1494
1496
|
O !== -1 && (E.splice(E, O, 1), k.push("Object"));
|
|
@@ -1551,33 +1553,33 @@ var nt, Tr, Lo, No, Ne = He(() => {
|
|
|
1551
1553
|
O.length > 25 && (O = `${O.slice(0, 25)}...`), v += `. Received type ${typeof x} (${O})`;
|
|
1552
1554
|
}
|
|
1553
1555
|
return v;
|
|
1554
|
-
}, TypeError), f("ERR_INVALID_ARG_VALUE", (g,
|
|
1555
|
-
let v = n(
|
|
1556
|
+
}, TypeError), f("ERR_INVALID_ARG_VALUE", (g, S, x = "is invalid") => {
|
|
1557
|
+
let v = n(S);
|
|
1556
1558
|
return v.length > 128 && (v = v.slice(0, 128) + "..."), `The ${g.includes(".") ? "property" : "argument"} '${g}' ${x}. Received ${v}`;
|
|
1557
|
-
}, TypeError), f("ERR_INVALID_RETURN_VALUE", (g,
|
|
1559
|
+
}, TypeError), f("ERR_INVALID_RETURN_VALUE", (g, S, x) => {
|
|
1558
1560
|
var v;
|
|
1559
1561
|
let E = x != null && (v = x.constructor) !== null && v !== void 0 && v.name ? `instance of ${x.constructor.name}` : `type ${typeof x}`;
|
|
1560
|
-
return `Expected ${g} to be returned from the "${
|
|
1562
|
+
return `Expected ${g} to be returned from the "${S}" function but got ${E}.`;
|
|
1561
1563
|
}, TypeError), f("ERR_MISSING_ARGS", (...g) => {
|
|
1562
1564
|
d(g.length > 0, "At least one arg needs to be specified");
|
|
1563
|
-
let
|
|
1565
|
+
let S, x = g.length;
|
|
1564
1566
|
switch (g = (Array.isArray(g) ? g : [g]).map((v) => `"${v}"`).join(" or "), x) {
|
|
1565
1567
|
case 1:
|
|
1566
|
-
|
|
1568
|
+
S += `The ${g[0]} argument`;
|
|
1567
1569
|
break;
|
|
1568
1570
|
case 2:
|
|
1569
|
-
|
|
1571
|
+
S += `The ${g[0]} and ${g[1]} arguments`;
|
|
1570
1572
|
break;
|
|
1571
1573
|
default:
|
|
1572
1574
|
{
|
|
1573
1575
|
let v = g.pop();
|
|
1574
|
-
|
|
1576
|
+
S += `The ${g.join(", ")}, and ${v} arguments`;
|
|
1575
1577
|
}
|
|
1576
1578
|
break;
|
|
1577
1579
|
}
|
|
1578
|
-
return `${
|
|
1579
|
-
}, TypeError), f("ERR_OUT_OF_RANGE", (g,
|
|
1580
|
-
d(
|
|
1580
|
+
return `${S} must be specified`;
|
|
1581
|
+
}, TypeError), f("ERR_OUT_OF_RANGE", (g, S, x) => {
|
|
1582
|
+
d(S, 'Missing "range" argument');
|
|
1581
1583
|
let v;
|
|
1582
1584
|
if (Number.isInteger(x) && Math.abs(x) > 2 ** 32) v = p(String(x));
|
|
1583
1585
|
else if (typeof x == "bigint") {
|
|
@@ -1585,8 +1587,8 @@ var nt, Tr, Lo, No, Ne = He(() => {
|
|
|
1585
1587
|
let E = BigInt(2) ** BigInt(32);
|
|
1586
1588
|
(x > E || x < -E) && (v = p(v)), v += "n";
|
|
1587
1589
|
} else v = n(x);
|
|
1588
|
-
return `The value of "${g}" is out of range. It must be ${
|
|
1589
|
-
}, RangeError), f("ERR_MULTIPLE_CALLBACK", "Callback called multiple times", Error), f("ERR_METHOD_NOT_IMPLEMENTED", "The %s method is not implemented", Error), f("ERR_STREAM_ALREADY_FINISHED", "Cannot call %s after a stream was finished", Error), f("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable", Error), f("ERR_STREAM_DESTROYED", "Cannot call %s after a stream was destroyed", Error), f("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), f("ERR_STREAM_PREMATURE_CLOSE", "Premature close", Error), f("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF", Error), f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event", Error), f("ERR_STREAM_WRITE_AFTER_END", "write after end", Error), f("ERR_UNKNOWN_ENCODING", "Unknown encoding: %s", TypeError), e.exports = { AbortError:
|
|
1590
|
+
return `The value of "${g}" is out of range. It must be ${S}. Received ${v}`;
|
|
1591
|
+
}, RangeError), f("ERR_MULTIPLE_CALLBACK", "Callback called multiple times", Error), f("ERR_METHOD_NOT_IMPLEMENTED", "The %s method is not implemented", Error), f("ERR_STREAM_ALREADY_FINISHED", "Cannot call %s after a stream was finished", Error), f("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable", Error), f("ERR_STREAM_DESTROYED", "Cannot call %s after a stream was destroyed", Error), f("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), f("ERR_STREAM_PREMATURE_CLOSE", "Premature close", Error), f("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF", Error), f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event", Error), f("ERR_STREAM_WRITE_AFTER_END", "write after end", Error), f("ERR_UNKNOWN_ENCODING", "Unknown encoding: %s", TypeError), e.exports = { AbortError: _, aggregateTwoErrors: m(b), hideStackFrames: m, codes: c };
|
|
1590
1592
|
}), Gt = pe((u, e) => {
|
|
1591
1593
|
le(), ce(), ue();
|
|
1592
1594
|
var { AbortController: t, AbortSignal: n } = typeof self < "u" ? self : typeof window < "u" ? window : void 0;
|
|
@@ -1613,7 +1615,7 @@ function Ol() {
|
|
|
1613
1615
|
function r() {
|
|
1614
1616
|
r.init.call(this);
|
|
1615
1617
|
}
|
|
1616
|
-
Ht = r, Ht.once =
|
|
1618
|
+
Ht = r, Ht.once = _, r.EventEmitter = r, r.prototype._events = void 0, r.prototype._eventsCount = 0, r.prototype._maxListeners = void 0;
|
|
1617
1619
|
var i = 10;
|
|
1618
1620
|
function o(x) {
|
|
1619
1621
|
if (typeof x != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof x);
|
|
@@ -1741,7 +1743,7 @@ function Ol() {
|
|
|
1741
1743
|
for (var v = new Array(x.length), E = 0; E < v.length; ++E) v[E] = x[E].listener || x[E];
|
|
1742
1744
|
return v;
|
|
1743
1745
|
}
|
|
1744
|
-
function
|
|
1746
|
+
function _(x, v) {
|
|
1745
1747
|
return new Promise(function(E, k) {
|
|
1746
1748
|
function I(O) {
|
|
1747
1749
|
x.removeListener(v, M), k(O);
|
|
@@ -1749,13 +1751,13 @@ function Ol() {
|
|
|
1749
1751
|
function M() {
|
|
1750
1752
|
typeof x.removeListener == "function" && x.removeListener("error", I), E([].slice.call(arguments));
|
|
1751
1753
|
}
|
|
1752
|
-
|
|
1754
|
+
S(x, v, M, { once: !0 }), v !== "error" && g(x, I, { once: !0 });
|
|
1753
1755
|
});
|
|
1754
1756
|
}
|
|
1755
1757
|
function g(x, v, E) {
|
|
1756
|
-
typeof x.on == "function" &&
|
|
1758
|
+
typeof x.on == "function" && S(x, "error", v, E);
|
|
1757
1759
|
}
|
|
1758
|
-
function
|
|
1760
|
+
function S(x, v, E, k) {
|
|
1759
1761
|
if (typeof x.on == "function") k.once ? x.once(v, E) : x.on(v, E);
|
|
1760
1762
|
else if (typeof x.addEventListener == "function") x.addEventListener(v, function I(M) {
|
|
1761
1763
|
k.once && x.removeEventListener(v, I), E(M);
|
|
@@ -1811,24 +1813,24 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1811
1813
|
return b instanceof p;
|
|
1812
1814
|
} : function(b) {
|
|
1813
1815
|
return !1;
|
|
1814
|
-
}, f = (b,
|
|
1815
|
-
if (b !== void 0 && (b === null || typeof b != "object" || !("aborted" in b))) throw new r(
|
|
1816
|
-
}, m = (b,
|
|
1817
|
-
if (typeof b != "function") throw new r(
|
|
1816
|
+
}, f = (b, _) => {
|
|
1817
|
+
if (b !== void 0 && (b === null || typeof b != "object" || !("aborted" in b))) throw new r(_, "AbortSignal", b);
|
|
1818
|
+
}, m = (b, _) => {
|
|
1819
|
+
if (typeof b != "function") throw new r(_, "Function", b);
|
|
1818
1820
|
};
|
|
1819
1821
|
e.exports = { AggregateError: o, kEmptyObject: Object.freeze({}), once(b) {
|
|
1820
|
-
let
|
|
1822
|
+
let _ = !1;
|
|
1821
1823
|
return function(...g) {
|
|
1822
|
-
|
|
1824
|
+
_ || (_ = !0, b.apply(this, g));
|
|
1823
1825
|
};
|
|
1824
1826
|
}, createDeferredPromise: function() {
|
|
1825
|
-
let b,
|
|
1826
|
-
return { promise: new Promise((g,
|
|
1827
|
-
b = g,
|
|
1828
|
-
}), resolve: b, reject:
|
|
1827
|
+
let b, _;
|
|
1828
|
+
return { promise: new Promise((g, S) => {
|
|
1829
|
+
b = g, _ = S;
|
|
1830
|
+
}), resolve: b, reject: _ };
|
|
1829
1831
|
}, promisify(b) {
|
|
1830
|
-
return new Promise((
|
|
1831
|
-
b((
|
|
1832
|
+
return new Promise((_, g) => {
|
|
1833
|
+
b((S, ...x) => S ? g(S) : _(...x));
|
|
1832
1834
|
});
|
|
1833
1835
|
}, debuglog() {
|
|
1834
1836
|
return function() {
|
|
@@ -1837,30 +1839,30 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1837
1839
|
return b instanceof d;
|
|
1838
1840
|
}, isArrayBufferView(b) {
|
|
1839
1841
|
return ArrayBuffer.isView(b);
|
|
1840
|
-
} }, isBlob: y, deprecate(b,
|
|
1842
|
+
} }, isBlob: y, deprecate(b, _) {
|
|
1841
1843
|
return b;
|
|
1842
|
-
}, addAbortListener: (Et(), Oe(mt)).addAbortListener || function(b,
|
|
1844
|
+
}, addAbortListener: (Et(), Oe(mt)).addAbortListener || function(b, _) {
|
|
1843
1845
|
if (b === void 0) throw new r("signal", "AbortSignal", b);
|
|
1844
|
-
f(b, "signal"), m(
|
|
1846
|
+
f(b, "signal"), m(_, "listener");
|
|
1845
1847
|
let g;
|
|
1846
|
-
return b.aborted ? queueMicrotask(() =>
|
|
1847
|
-
b.removeEventListener("abort",
|
|
1848
|
+
return b.aborted ? queueMicrotask(() => _()) : (b.addEventListener("abort", _, { __proto__: null, once: !0, [i]: !0 }), g = () => {
|
|
1849
|
+
b.removeEventListener("abort", _);
|
|
1848
1850
|
}), { __proto__: null, [s]() {
|
|
1849
|
-
var
|
|
1850
|
-
(
|
|
1851
|
+
var S;
|
|
1852
|
+
(S = g) === null || S === void 0 || S();
|
|
1851
1853
|
} };
|
|
1852
1854
|
}, AbortSignalAny: a.any || function(b) {
|
|
1853
1855
|
if (b.length === 1) return b[0];
|
|
1854
|
-
let
|
|
1855
|
-
return b.forEach((
|
|
1856
|
-
f(
|
|
1857
|
-
}),
|
|
1858
|
-
b.forEach((
|
|
1859
|
-
}, { once: !0 }),
|
|
1856
|
+
let _ = new c(), g = () => _.abort();
|
|
1857
|
+
return b.forEach((S) => {
|
|
1858
|
+
f(S, "signals"), S.addEventListener("abort", g, { once: !0 });
|
|
1859
|
+
}), _.signal.addEventListener("abort", () => {
|
|
1860
|
+
b.forEach((S) => S.removeEventListener("abort", g));
|
|
1861
|
+
}, { once: !0 }), _.signal;
|
|
1860
1862
|
} }, e.exports.promisify.custom = /* @__PURE__ */ Symbol.for("nodejs.util.promisify.custom");
|
|
1861
1863
|
}), Yt = pe((u, e) => {
|
|
1862
1864
|
le(), ce(), ue();
|
|
1863
|
-
var { ArrayIsArray: t, ArrayPrototypeIncludes: n, ArrayPrototypeJoin: l, ArrayPrototypeMap: r, NumberIsInteger: i, NumberIsNaN: o, NumberMAX_SAFE_INTEGER: s, NumberMIN_SAFE_INTEGER: a, NumberParseInt: c, ObjectPrototypeHasOwnProperty: d, RegExpPrototypeExec: p, String: y, StringPrototypeToUpperCase: f, StringPrototypeTrim: m } = Re(), { hideStackFrames: b, codes: { ERR_SOCKET_BAD_PORT:
|
|
1865
|
+
var { ArrayIsArray: t, ArrayPrototypeIncludes: n, ArrayPrototypeJoin: l, ArrayPrototypeMap: r, NumberIsInteger: i, NumberIsNaN: o, NumberMAX_SAFE_INTEGER: s, NumberMIN_SAFE_INTEGER: a, NumberParseInt: c, ObjectPrototypeHasOwnProperty: d, RegExpPrototypeExec: p, String: y, StringPrototypeToUpperCase: f, StringPrototypeTrim: m } = Re(), { hideStackFrames: b, codes: { ERR_SOCKET_BAD_PORT: _, ERR_INVALID_ARG_TYPE: g, ERR_INVALID_ARG_VALUE: S, ERR_OUT_OF_RANGE: x, ERR_UNKNOWN_SIGNAL: v } } = We(), { normalizeEncoding: E } = qe(), { isAsyncFunction: k, isArrayBufferView: I } = qe().types, M = {};
|
|
1864
1866
|
function O(q) {
|
|
1865
1867
|
return q === (q | 0);
|
|
1866
1868
|
}
|
|
@@ -1870,7 +1872,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1870
1872
|
var T = /^[0-7]+$/, W = "must be a 32-bit unsigned integer or an octal string";
|
|
1871
1873
|
function D(q, ge, ve) {
|
|
1872
1874
|
if (typeof q > "u" && (q = ve), typeof q == "string") {
|
|
1873
|
-
if (p(T, q) === null) throw new
|
|
1875
|
+
if (p(T, q) === null) throw new S(ge, q, W);
|
|
1874
1876
|
q = c(q, 8);
|
|
1875
1877
|
}
|
|
1876
1878
|
return Y(q, ge), q;
|
|
@@ -1899,7 +1901,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1899
1901
|
var F = b((q, ge, ve) => {
|
|
1900
1902
|
if (!n(ve, q)) {
|
|
1901
1903
|
let oe = "must be one of: " + l(r(ve, (Te) => typeof Te == "string" ? `'${Te}'` : y(Te)), ", ");
|
|
1902
|
-
throw new
|
|
1904
|
+
throw new S(ge, q, oe);
|
|
1903
1905
|
}
|
|
1904
1906
|
});
|
|
1905
1907
|
function Z(q, ge) {
|
|
@@ -1917,7 +1919,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1917
1919
|
if (!t(q)) throw new g(ge, "Array", q);
|
|
1918
1920
|
if (q.length < ve) {
|
|
1919
1921
|
let oe = `must be longer than ${ve}`;
|
|
1920
|
-
throw new
|
|
1922
|
+
throw new S(ge, q, oe);
|
|
1921
1923
|
}
|
|
1922
1924
|
});
|
|
1923
1925
|
function we(q, ge) {
|
|
@@ -1944,10 +1946,10 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1944
1946
|
});
|
|
1945
1947
|
function G(q, ge) {
|
|
1946
1948
|
let ve = E(ge), oe = q.length;
|
|
1947
|
-
if (ve === "hex" && oe % 2 !== 0) throw new
|
|
1949
|
+
if (ve === "hex" && oe % 2 !== 0) throw new S("encoding", ge, `is invalid for data of length ${oe}`);
|
|
1948
1950
|
}
|
|
1949
1951
|
function Q(q, ge = "Port", ve = !0) {
|
|
1950
|
-
if (typeof q != "number" && typeof q != "string" || typeof q == "string" && m(q).length === 0 || +q !== +q >>> 0 || q > 65535 || q === 0 && !ve) throw new
|
|
1952
|
+
if (typeof q != "number" && typeof q != "string" || typeof q == "string" && m(q).length === 0 || +q !== +q >>> 0 || q > 65535 || q === 0 && !ve) throw new _(ge, q, ve);
|
|
1951
1953
|
return q | 0;
|
|
1952
1954
|
}
|
|
1953
1955
|
var me = b((q, ge) => {
|
|
@@ -1964,7 +1966,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1964
1966
|
}
|
|
1965
1967
|
var fe = /^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;
|
|
1966
1968
|
function de(q, ge) {
|
|
1967
|
-
if (typeof q > "u" || !p(fe, q)) throw new
|
|
1969
|
+
if (typeof q > "u" || !p(fe, q)) throw new S(ge, q, 'must be an array or string of format "</styles.css>; rel=preload; as=style"');
|
|
1968
1970
|
}
|
|
1969
1971
|
function ye(q) {
|
|
1970
1972
|
if (typeof q == "string") return de(q, "hints"), q;
|
|
@@ -1977,7 +1979,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
1977
1979
|
}
|
|
1978
1980
|
return ve;
|
|
1979
1981
|
}
|
|
1980
|
-
throw new
|
|
1982
|
+
throw new S("hints", q, 'must be an array or string of format "</styles.css>; rel=preload; as=style"');
|
|
1981
1983
|
}
|
|
1982
1984
|
e.exports = { isInt32: O, isUint32: B, parseFileMode: D, validateArray: te, validateStringArray: we, validateBooleanArray: V, validateAbortSignalArray: L, validateBoolean: Z, validateBuffer: H, validateDictionary: be, validateEncoding: G, validateFunction: se, validateInt32: ae, validateInteger: N, validateNumber: re, validateObject: J, validateOneOf: F, validatePlainFunction: R, validatePort: Q, validateSignalName: ne, validateString: K, validateUint32: Y, validateUndefined: $, validateUnion: ee, validateAbortSignal: me, validateLinkHeaderValue: ye };
|
|
1983
1985
|
}), xt = pe((u, e) => {
|
|
@@ -2001,29 +2003,29 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2001
2003
|
l = i;
|
|
2002
2004
|
}
|
|
2003
2005
|
})();
|
|
2004
|
-
function o(
|
|
2005
|
-
if (n === setTimeout) return setTimeout(
|
|
2006
|
-
if ((n === r || !n) && setTimeout) return n = setTimeout, setTimeout(
|
|
2006
|
+
function o(_) {
|
|
2007
|
+
if (n === setTimeout) return setTimeout(_, 0);
|
|
2008
|
+
if ((n === r || !n) && setTimeout) return n = setTimeout, setTimeout(_, 0);
|
|
2007
2009
|
try {
|
|
2008
|
-
return n(
|
|
2010
|
+
return n(_, 0);
|
|
2009
2011
|
} catch {
|
|
2010
2012
|
try {
|
|
2011
|
-
return n.call(null,
|
|
2013
|
+
return n.call(null, _, 0);
|
|
2012
2014
|
} catch {
|
|
2013
|
-
return n.call(this,
|
|
2015
|
+
return n.call(this, _, 0);
|
|
2014
2016
|
}
|
|
2015
2017
|
}
|
|
2016
2018
|
}
|
|
2017
|
-
function s(
|
|
2018
|
-
if (l === clearTimeout) return clearTimeout(
|
|
2019
|
-
if ((l === i || !l) && clearTimeout) return l = clearTimeout, clearTimeout(
|
|
2019
|
+
function s(_) {
|
|
2020
|
+
if (l === clearTimeout) return clearTimeout(_);
|
|
2021
|
+
if ((l === i || !l) && clearTimeout) return l = clearTimeout, clearTimeout(_);
|
|
2020
2022
|
try {
|
|
2021
|
-
return l(
|
|
2023
|
+
return l(_);
|
|
2022
2024
|
} catch {
|
|
2023
2025
|
try {
|
|
2024
|
-
return l.call(null,
|
|
2026
|
+
return l.call(null, _);
|
|
2025
2027
|
} catch {
|
|
2026
|
-
return l.call(this,
|
|
2028
|
+
return l.call(this, _);
|
|
2027
2029
|
}
|
|
2028
2030
|
}
|
|
2029
2031
|
}
|
|
@@ -2033,35 +2035,35 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2033
2035
|
}
|
|
2034
2036
|
function f() {
|
|
2035
2037
|
if (!c) {
|
|
2036
|
-
var
|
|
2038
|
+
var _ = o(y);
|
|
2037
2039
|
c = !0;
|
|
2038
2040
|
for (var g = a.length; g; ) {
|
|
2039
2041
|
for (d = a, a = []; ++p < g; ) d && d[p].run();
|
|
2040
2042
|
p = -1, g = a.length;
|
|
2041
2043
|
}
|
|
2042
|
-
d = null, c = !1, s(
|
|
2044
|
+
d = null, c = !1, s(_);
|
|
2043
2045
|
}
|
|
2044
2046
|
}
|
|
2045
|
-
t.nextTick = function(
|
|
2047
|
+
t.nextTick = function(_) {
|
|
2046
2048
|
var g = new Array(arguments.length - 1);
|
|
2047
|
-
if (arguments.length > 1) for (var
|
|
2048
|
-
a.push(new m(
|
|
2049
|
+
if (arguments.length > 1) for (var S = 1; S < arguments.length; S++) g[S - 1] = arguments[S];
|
|
2050
|
+
a.push(new m(_, g)), a.length === 1 && !c && o(f);
|
|
2049
2051
|
};
|
|
2050
|
-
function m(
|
|
2051
|
-
this.fun =
|
|
2052
|
+
function m(_, g) {
|
|
2053
|
+
this.fun = _, this.array = g;
|
|
2052
2054
|
}
|
|
2053
2055
|
m.prototype.run = function() {
|
|
2054
2056
|
this.fun.apply(null, this.array);
|
|
2055
2057
|
}, t.title = "browser", t.browser = !0, t.env = {}, t.argv = [], t.version = "", t.versions = {};
|
|
2056
2058
|
function b() {
|
|
2057
2059
|
}
|
|
2058
|
-
t.on = b, t.addListener = b, t.once = b, t.off = b, t.removeListener = b, t.removeAllListeners = b, t.emit = b, t.prependListener = b, t.prependOnceListener = b, t.listeners = function(
|
|
2060
|
+
t.on = b, t.addListener = b, t.once = b, t.off = b, t.removeListener = b, t.removeAllListeners = b, t.emit = b, t.prependListener = b, t.prependOnceListener = b, t.listeners = function(_) {
|
|
2059
2061
|
return [];
|
|
2060
|
-
}, t.binding = function(
|
|
2062
|
+
}, t.binding = function(_) {
|
|
2061
2063
|
throw new Error("process.binding is not supported");
|
|
2062
2064
|
}, t.cwd = function() {
|
|
2063
2065
|
return "/";
|
|
2064
|
-
}, t.chdir = function(
|
|
2066
|
+
}, t.chdir = function(_) {
|
|
2065
2067
|
throw new Error("process.chdir is not supported");
|
|
2066
2068
|
}, t.umask = function() {
|
|
2067
2069
|
return 0;
|
|
@@ -2086,14 +2088,14 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2086
2088
|
function b(P) {
|
|
2087
2089
|
return !!(P && !m(P) && typeof P.pipeThrough == "function" && typeof P.getReader == "function" && typeof P.cancel == "function");
|
|
2088
2090
|
}
|
|
2089
|
-
function
|
|
2091
|
+
function _(P) {
|
|
2090
2092
|
return !!(P && !m(P) && typeof P.getWriter == "function" && typeof P.abort == "function");
|
|
2091
2093
|
}
|
|
2092
2094
|
function g(P) {
|
|
2093
2095
|
return !!(P && !m(P) && typeof P.readable == "object" && typeof P.writable == "object");
|
|
2094
2096
|
}
|
|
2095
|
-
function
|
|
2096
|
-
return b(P) ||
|
|
2097
|
+
function S(P) {
|
|
2098
|
+
return b(P) || _(P) || g(P);
|
|
2097
2099
|
}
|
|
2098
2100
|
function x(P, J) {
|
|
2099
2101
|
return P == null ? !1 : J === !0 ? typeof P[t] == "function" : J === !1 ? typeof P[n] == "function" : typeof P[t] == "function" || typeof P[n] == "function";
|
|
@@ -2172,10 +2174,10 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2172
2174
|
var J, be, te, we, V, L, ne, H, G, Q;
|
|
2173
2175
|
return !!(P && ((J = (be = (te = (we = (V = (L = P[i]) !== null && L !== void 0 ? L : P.readableErrored) !== null && V !== void 0 ? V : P.writableErrored) !== null && we !== void 0 ? we : (ne = P._readableState) === null || ne === void 0 ? void 0 : ne.errorEmitted) !== null && te !== void 0 ? te : (H = P._writableState) === null || H === void 0 ? void 0 : H.errorEmitted) !== null && be !== void 0 ? be : (G = P._readableState) === null || G === void 0 ? void 0 : G.errored) !== null && J !== void 0 ? J : !((Q = P._writableState) === null || Q === void 0) && Q.errored));
|
|
2174
2176
|
}
|
|
2175
|
-
e.exports = { isDestroyed: v, kIsDestroyed: r, isDisturbed: F, kIsDisturbed: a, isErrored: Z, kIsErrored: i, isReadable: O, kIsReadable: o, kIsClosedPromise: c, kControllerErrorFunction: d, kIsWritable: s, isClosed: N, isDuplexNodeStream: f, isFinished: T, isIterable: x, isReadableNodeStream: p, isReadableStream: b, isReadableEnded: I, isReadableFinished: M, isReadableErrored: D, isNodeStream: m, isWebStream:
|
|
2177
|
+
e.exports = { isDestroyed: v, kIsDestroyed: r, isDisturbed: F, kIsDisturbed: a, isErrored: Z, kIsErrored: i, isReadable: O, kIsReadable: o, kIsClosedPromise: c, kControllerErrorFunction: d, kIsWritable: s, isClosed: N, isDuplexNodeStream: f, isFinished: T, isIterable: x, isReadableNodeStream: p, isReadableStream: b, isReadableEnded: I, isReadableFinished: M, isReadableErrored: D, isNodeStream: m, isWebStream: S, isWritable: B, isWritableNodeStream: y, isWritableStream: _, isWritableEnded: E, isWritableFinished: k, isWritableErrored: W, isServerRequest: K, isServerResponse: Y, willEmitClose: re, isTransformStream: g };
|
|
2176
2178
|
}), bt = pe((u, e) => {
|
|
2177
2179
|
le(), ce(), ue();
|
|
2178
|
-
var t = xt(), { AbortError: n, codes: l } = We(), { ERR_INVALID_ARG_TYPE: r, ERR_STREAM_PREMATURE_CLOSE: i } = l, { kEmptyObject: o, once: s } = qe(), { validateAbortSignal: a, validateFunction: c, validateObject: d, validateBoolean: p } = Yt(), { Promise: y, PromisePrototypeThen: f, SymbolDispose: m } = Re(), { isClosed: b, isReadable:
|
|
2180
|
+
var t = xt(), { AbortError: n, codes: l } = We(), { ERR_INVALID_ARG_TYPE: r, ERR_STREAM_PREMATURE_CLOSE: i } = l, { kEmptyObject: o, once: s } = qe(), { validateAbortSignal: a, validateFunction: c, validateObject: d, validateBoolean: p } = Yt(), { Promise: y, PromisePrototypeThen: f, SymbolDispose: m } = Re(), { isClosed: b, isReadable: _, isReadableNodeStream: g, isReadableStream: S, isReadableFinished: x, isReadableErrored: v, isWritable: E, isWritableNodeStream: k, isWritableStream: I, isWritableFinished: M, isWritableErrored: O, isNodeStream: B, willEmitClose: T, kIsClosedPromise: W } = lt(), D;
|
|
2179
2181
|
function N(F) {
|
|
2180
2182
|
return F.setHeader && typeof F.abort == "function";
|
|
2181
2183
|
}
|
|
@@ -2183,7 +2185,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2183
2185
|
};
|
|
2184
2186
|
function Y(F, Z, P) {
|
|
2185
2187
|
var J, be;
|
|
2186
|
-
if (arguments.length === 2 ? (P = Z, Z = o) : Z == null ? Z = o : d(Z, "options"), c(P, "callback"), a(Z.signal, "options.signal"), P = s(P),
|
|
2188
|
+
if (arguments.length === 2 ? (P = Z, Z = o) : Z == null ? Z = o : d(Z, "options"), c(P, "callback"), a(Z.signal, "options.signal"), P = s(P), S(F) || I(F)) return K(F, Z, P);
|
|
2187
2189
|
if (!B(F)) throw new r("stream", ["ReadableStream", "WritableStream", "Stream"], F);
|
|
2188
2190
|
let te = (J = Z.readable) !== null && J !== void 0 ? J : g(F), we = (be = Z.writable) !== null && be !== void 0 ? be : k(F), V = F._writableState, L = F._readableState, ne = () => {
|
|
2189
2191
|
F.writable || Q();
|
|
@@ -2208,7 +2210,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2208
2210
|
}, de = () => {
|
|
2209
2211
|
F.req.on("finish", Q);
|
|
2210
2212
|
};
|
|
2211
|
-
N(F) ? (F.on("complete", Q), H || F.on("abort", ee), F.req ? de() : F.on("request", de)) : we && !V && (F.on("end", ne), F.on("close", ne)), !H && typeof F.aborted == "boolean" && F.on("aborted", ee), F.on("end", se), F.on("finish", Q), Z.error !== !1 && F.on("error", R), F.on("close", ee), $ ? t.nextTick(ee) : V != null && V.errorEmitted || L != null && L.errorEmitted ? H || t.nextTick(fe) : (!te && (!H ||
|
|
2213
|
+
N(F) ? (F.on("complete", Q), H || F.on("abort", ee), F.req ? de() : F.on("request", de)) : we && !V && (F.on("end", ne), F.on("close", ne)), !H && typeof F.aborted == "boolean" && F.on("aborted", ee), F.on("end", se), F.on("finish", Q), Z.error !== !1 && F.on("error", R), F.on("close", ee), $ ? t.nextTick(ee) : V != null && V.errorEmitted || L != null && L.errorEmitted ? H || t.nextTick(fe) : (!te && (!H || _(F)) && (G || E(F) === !1) || !we && (!H || E(F)) && (me || _(F) === !1) || L && F.req && F.aborted) && t.nextTick(fe);
|
|
2212
2214
|
let ye = () => {
|
|
2213
2215
|
P = ae, F.removeListener("aborted", ee), F.removeListener("complete", Q), F.removeListener("abort", ee), F.removeListener("request", de), F.req && F.req.removeListener("finish", Q), F.removeListener("end", ne), F.removeListener("close", ne), F.removeListener("finish", Q), F.removeListener("end", se), F.removeListener("error", R), F.removeListener("close", ee);
|
|
2214
2216
|
};
|
|
@@ -2273,7 +2275,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2273
2275
|
if (N) return;
|
|
2274
2276
|
N = !0;
|
|
2275
2277
|
let K = T._readableState, re = T._writableState;
|
|
2276
|
-
y(Y, re, K), re && (re.closed = !0), K && (K.closed = !0), typeof D == "function" && D(Y), Y ? t.nextTick(b, T, Y) : t.nextTick(
|
|
2278
|
+
y(Y, re, K), re && (re.closed = !0), K && (K.closed = !0), typeof D == "function" && D(Y), Y ? t.nextTick(b, T, Y) : t.nextTick(_, T);
|
|
2277
2279
|
}
|
|
2278
2280
|
try {
|
|
2279
2281
|
T._destroy(W || null, ae);
|
|
@@ -2282,9 +2284,9 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2282
2284
|
}
|
|
2283
2285
|
}
|
|
2284
2286
|
function b(T, W) {
|
|
2285
|
-
g(T, W),
|
|
2287
|
+
g(T, W), _(T);
|
|
2286
2288
|
}
|
|
2287
|
-
function
|
|
2289
|
+
function _(T) {
|
|
2288
2290
|
let W = T._readableState, D = T._writableState;
|
|
2289
2291
|
D && (D.closeEmitted = !0), W && (W.closeEmitted = !0), (D != null && D.emitClose || W != null && W.emitClose) && T.emit("close");
|
|
2290
2292
|
}
|
|
@@ -2292,7 +2294,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2292
2294
|
let D = T._readableState, N = T._writableState;
|
|
2293
2295
|
N != null && N.errorEmitted || D != null && D.errorEmitted || (N && (N.errorEmitted = !0), D && (D.errorEmitted = !0), T.emit("error", W));
|
|
2294
2296
|
}
|
|
2295
|
-
function
|
|
2297
|
+
function S() {
|
|
2296
2298
|
let T = this._readableState, W = this._writableState;
|
|
2297
2299
|
T && (T.constructed = !0, T.closed = !1, T.closeEmitted = !1, T.destroyed = !1, T.errored = null, T.errorEmitted = !1, T.reading = !1, T.ended = T.readable === !1, T.endEmitted = T.readable === !1), W && (W.constructed = !0, W.destroyed = !1, W.closed = !1, W.closeEmitted = !1, W.errored = null, W.errorEmitted = !1, W.finalCalled = !1, W.prefinished = !1, W.ended = W.writable === !1, W.ending = W.writable === !1, W.finished = W.writable === !1);
|
|
2298
2300
|
}
|
|
@@ -2340,7 +2342,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2340
2342
|
function B(T, W) {
|
|
2341
2343
|
!T || s(T) || (!W && !a(T) && (W = new r()), c(T) ? (T.socket = null, T.destroy(W)) : I(T) ? T.abort() : I(T.req) ? T.req.abort() : typeof T.destroy == "function" ? T.destroy(W) : typeof T.close == "function" ? T.close() : W ? t.nextTick(O, T, W) : t.nextTick(M, T), T.destroyed || (T[o] = !0));
|
|
2342
2344
|
}
|
|
2343
|
-
e.exports = { construct: v, destroyer: B, destroy: f, undestroy:
|
|
2345
|
+
e.exports = { construct: v, destroyer: B, destroy: f, undestroy: S, errorOrDestroy: x };
|
|
2344
2346
|
}), Gi = pe((u, e) => {
|
|
2345
2347
|
le(), ce(), ue();
|
|
2346
2348
|
var { ArrayIsArray: t, ObjectSetPrototypeOf: n } = Re(), { EventEmitter: l } = (Et(), Oe(mt));
|
|
@@ -2349,8 +2351,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2349
2351
|
}
|
|
2350
2352
|
n(r.prototype, l.prototype), n(r, l), r.prototype.pipe = function(o, s) {
|
|
2351
2353
|
let a = this;
|
|
2352
|
-
function c(
|
|
2353
|
-
o.writable && o.write(
|
|
2354
|
+
function c(_) {
|
|
2355
|
+
o.writable && o.write(_) === !1 && a.pause && a.pause();
|
|
2354
2356
|
}
|
|
2355
2357
|
a.on("data", c);
|
|
2356
2358
|
function d() {
|
|
@@ -2364,8 +2366,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2364
2366
|
function f() {
|
|
2365
2367
|
p || (p = !0, typeof o.destroy == "function" && o.destroy());
|
|
2366
2368
|
}
|
|
2367
|
-
function m(
|
|
2368
|
-
b(), l.listenerCount(this, "error") === 0 && this.emit("error",
|
|
2369
|
+
function m(_) {
|
|
2370
|
+
b(), l.listenerCount(this, "error") === 0 && this.emit("error", _);
|
|
2369
2371
|
}
|
|
2370
2372
|
i(a, "error", m), i(o, "error", m);
|
|
2371
2373
|
function b() {
|
|
@@ -2496,8 +2498,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2496
2498
|
let b = s(y, m, f);
|
|
2497
2499
|
if (b != null) {
|
|
2498
2500
|
if (!n(b) || b < 0) {
|
|
2499
|
-
let
|
|
2500
|
-
throw new r(
|
|
2501
|
+
let _ = m ? `options.${f}` : "options.highWaterMark";
|
|
2502
|
+
throw new r(_, b);
|
|
2501
2503
|
}
|
|
2502
2504
|
return t(b);
|
|
2503
2505
|
}
|
|
@@ -2550,7 +2552,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2550
2552
|
};
|
|
2551
2553
|
function n(g) {
|
|
2552
2554
|
if (!g) return "utf8";
|
|
2553
|
-
for (var
|
|
2555
|
+
for (var S; ; ) switch (g) {
|
|
2554
2556
|
case "utf8":
|
|
2555
2557
|
case "utf-8":
|
|
2556
2558
|
return "utf8";
|
|
@@ -2567,43 +2569,43 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2567
2569
|
case "hex":
|
|
2568
2570
|
return g;
|
|
2569
2571
|
default:
|
|
2570
|
-
if (
|
|
2571
|
-
g = ("" + g).toLowerCase(),
|
|
2572
|
+
if (S) return;
|
|
2573
|
+
g = ("" + g).toLowerCase(), S = !0;
|
|
2572
2574
|
}
|
|
2573
2575
|
}
|
|
2574
2576
|
function l(g) {
|
|
2575
|
-
var
|
|
2576
|
-
if (typeof
|
|
2577
|
-
return
|
|
2577
|
+
var S = n(g);
|
|
2578
|
+
if (typeof S != "string" && (e.isEncoding === t || !t(g))) throw new Error("Unknown encoding: " + g);
|
|
2579
|
+
return S || g;
|
|
2578
2580
|
}
|
|
2579
2581
|
u.StringDecoder = r;
|
|
2580
2582
|
function r(g) {
|
|
2581
2583
|
this.encoding = l(g);
|
|
2582
|
-
var
|
|
2584
|
+
var S;
|
|
2583
2585
|
switch (this.encoding) {
|
|
2584
2586
|
case "utf16le":
|
|
2585
|
-
this.text = p, this.end = y,
|
|
2587
|
+
this.text = p, this.end = y, S = 4;
|
|
2586
2588
|
break;
|
|
2587
2589
|
case "utf8":
|
|
2588
|
-
this.fillLast = a,
|
|
2590
|
+
this.fillLast = a, S = 4;
|
|
2589
2591
|
break;
|
|
2590
2592
|
case "base64":
|
|
2591
|
-
this.text = f, this.end = m,
|
|
2593
|
+
this.text = f, this.end = m, S = 3;
|
|
2592
2594
|
break;
|
|
2593
2595
|
default:
|
|
2594
|
-
this.write = b, this.end =
|
|
2596
|
+
this.write = b, this.end = _;
|
|
2595
2597
|
return;
|
|
2596
2598
|
}
|
|
2597
|
-
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = e.allocUnsafe(
|
|
2599
|
+
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = e.allocUnsafe(S);
|
|
2598
2600
|
}
|
|
2599
2601
|
r.prototype.write = function(g) {
|
|
2600
2602
|
if (g.length === 0) return "";
|
|
2601
|
-
var
|
|
2603
|
+
var S, x;
|
|
2602
2604
|
if (this.lastNeed) {
|
|
2603
|
-
if (
|
|
2605
|
+
if (S = this.fillLast(g), S === void 0) return "";
|
|
2604
2606
|
x = this.lastNeed, this.lastNeed = 0;
|
|
2605
2607
|
} else x = 0;
|
|
2606
|
-
return x < g.length ?
|
|
2608
|
+
return x < g.length ? S ? S + this.text(g, x) : this.text(g, x) : S || "";
|
|
2607
2609
|
}, r.prototype.end = d, r.prototype.text = c, r.prototype.fillLast = function(g) {
|
|
2608
2610
|
if (this.lastNeed <= g.length) return g.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
2609
2611
|
g.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, g.length), this.lastNeed -= g.length;
|
|
@@ -2611,67 +2613,67 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2611
2613
|
function i(g) {
|
|
2612
2614
|
return g <= 127 ? 0 : g >> 5 === 6 ? 2 : g >> 4 === 14 ? 3 : g >> 3 === 30 ? 4 : g >> 6 === 2 ? -1 : -2;
|
|
2613
2615
|
}
|
|
2614
|
-
function o(g,
|
|
2615
|
-
var v =
|
|
2616
|
+
function o(g, S, x) {
|
|
2617
|
+
var v = S.length - 1;
|
|
2616
2618
|
if (v < x) return 0;
|
|
2617
|
-
var E = i(
|
|
2618
|
-
return E >= 0 ? (E > 0 && (g.lastNeed = E - 1), E) : --v < x || E === -2 ? 0 : (E = i(
|
|
2619
|
+
var E = i(S[v]);
|
|
2620
|
+
return E >= 0 ? (E > 0 && (g.lastNeed = E - 1), E) : --v < x || E === -2 ? 0 : (E = i(S[v]), E >= 0 ? (E > 0 && (g.lastNeed = E - 2), E) : --v < x || E === -2 ? 0 : (E = i(S[v]), E >= 0 ? (E > 0 && (E === 2 ? E = 0 : g.lastNeed = E - 3), E) : 0));
|
|
2619
2621
|
}
|
|
2620
|
-
function s(g,
|
|
2621
|
-
if ((
|
|
2622
|
-
if (g.lastNeed > 1 &&
|
|
2623
|
-
if ((
|
|
2624
|
-
if (g.lastNeed > 2 &&
|
|
2622
|
+
function s(g, S, x) {
|
|
2623
|
+
if ((S[0] & 192) !== 128) return g.lastNeed = 0, "�";
|
|
2624
|
+
if (g.lastNeed > 1 && S.length > 1) {
|
|
2625
|
+
if ((S[1] & 192) !== 128) return g.lastNeed = 1, "�";
|
|
2626
|
+
if (g.lastNeed > 2 && S.length > 2 && (S[2] & 192) !== 128) return g.lastNeed = 2, "�";
|
|
2625
2627
|
}
|
|
2626
2628
|
}
|
|
2627
2629
|
function a(g) {
|
|
2628
|
-
var
|
|
2630
|
+
var S = this.lastTotal - this.lastNeed, x = s(this, g);
|
|
2629
2631
|
if (x !== void 0) return x;
|
|
2630
|
-
if (this.lastNeed <= g.length) return g.copy(this.lastChar,
|
|
2631
|
-
g.copy(this.lastChar,
|
|
2632
|
+
if (this.lastNeed <= g.length) return g.copy(this.lastChar, S, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
2633
|
+
g.copy(this.lastChar, S, 0, g.length), this.lastNeed -= g.length;
|
|
2632
2634
|
}
|
|
2633
|
-
function c(g,
|
|
2634
|
-
var x = o(this, g,
|
|
2635
|
-
if (!this.lastNeed) return g.toString("utf8",
|
|
2635
|
+
function c(g, S) {
|
|
2636
|
+
var x = o(this, g, S);
|
|
2637
|
+
if (!this.lastNeed) return g.toString("utf8", S);
|
|
2636
2638
|
this.lastTotal = x;
|
|
2637
2639
|
var v = g.length - (x - this.lastNeed);
|
|
2638
|
-
return g.copy(this.lastChar, 0, v), g.toString("utf8",
|
|
2640
|
+
return g.copy(this.lastChar, 0, v), g.toString("utf8", S, v);
|
|
2639
2641
|
}
|
|
2640
2642
|
function d(g) {
|
|
2641
|
-
var
|
|
2642
|
-
return this.lastNeed ?
|
|
2643
|
+
var S = g && g.length ? this.write(g) : "";
|
|
2644
|
+
return this.lastNeed ? S + "�" : S;
|
|
2643
2645
|
}
|
|
2644
|
-
function p(g,
|
|
2645
|
-
if ((g.length -
|
|
2646
|
-
var x = g.toString("utf16le",
|
|
2646
|
+
function p(g, S) {
|
|
2647
|
+
if ((g.length - S) % 2 === 0) {
|
|
2648
|
+
var x = g.toString("utf16le", S);
|
|
2647
2649
|
if (x) {
|
|
2648
2650
|
var v = x.charCodeAt(x.length - 1);
|
|
2649
2651
|
if (v >= 55296 && v <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = g[g.length - 2], this.lastChar[1] = g[g.length - 1], x.slice(0, -1);
|
|
2650
2652
|
}
|
|
2651
2653
|
return x;
|
|
2652
2654
|
}
|
|
2653
|
-
return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = g[g.length - 1], g.toString("utf16le",
|
|
2655
|
+
return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = g[g.length - 1], g.toString("utf16le", S, g.length - 1);
|
|
2654
2656
|
}
|
|
2655
2657
|
function y(g) {
|
|
2656
|
-
var
|
|
2658
|
+
var S = g && g.length ? this.write(g) : "";
|
|
2657
2659
|
if (this.lastNeed) {
|
|
2658
2660
|
var x = this.lastTotal - this.lastNeed;
|
|
2659
|
-
return
|
|
2661
|
+
return S + this.lastChar.toString("utf16le", 0, x);
|
|
2660
2662
|
}
|
|
2661
|
-
return
|
|
2663
|
+
return S;
|
|
2662
2664
|
}
|
|
2663
|
-
function f(g,
|
|
2664
|
-
var x = (g.length -
|
|
2665
|
-
return x === 0 ? g.toString("base64",
|
|
2665
|
+
function f(g, S) {
|
|
2666
|
+
var x = (g.length - S) % 3;
|
|
2667
|
+
return x === 0 ? g.toString("base64", S) : (this.lastNeed = 3 - x, this.lastTotal = 3, x === 1 ? this.lastChar[0] = g[g.length - 1] : (this.lastChar[0] = g[g.length - 2], this.lastChar[1] = g[g.length - 1]), g.toString("base64", S, g.length - x));
|
|
2666
2668
|
}
|
|
2667
2669
|
function m(g) {
|
|
2668
|
-
var
|
|
2669
|
-
return this.lastNeed ?
|
|
2670
|
+
var S = g && g.length ? this.write(g) : "";
|
|
2671
|
+
return this.lastNeed ? S + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : S;
|
|
2670
2672
|
}
|
|
2671
2673
|
function b(g) {
|
|
2672
2674
|
return g.toString(this.encoding);
|
|
2673
2675
|
}
|
|
2674
|
-
function
|
|
2676
|
+
function _(g) {
|
|
2675
2677
|
return g && g.length ? this.write(g) : "";
|
|
2676
2678
|
}
|
|
2677
2679
|
}), Ho = pe((u, e) => {
|
|
@@ -2689,13 +2691,13 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2689
2691
|
let m = new c({ objectMode: !0, highWaterMark: 1, ...p }), b = !1;
|
|
2690
2692
|
m._read = function() {
|
|
2691
2693
|
b || (b = !0, g());
|
|
2692
|
-
}, m._destroy = function(
|
|
2693
|
-
n(S
|
|
2694
|
+
}, m._destroy = function(S, x) {
|
|
2695
|
+
n(_(S), () => t.nextTick(x, S), (v) => t.nextTick(x, v || S));
|
|
2694
2696
|
};
|
|
2695
|
-
async function S
|
|
2696
|
-
let x =
|
|
2697
|
+
async function _(S) {
|
|
2698
|
+
let x = S != null, v = typeof y.throw == "function";
|
|
2697
2699
|
if (x && v) {
|
|
2698
|
-
let { value: E, done: k } = await y.throw(
|
|
2700
|
+
let { value: E, done: k } = await y.throw(S);
|
|
2699
2701
|
if (await E, k) return;
|
|
2700
2702
|
}
|
|
2701
2703
|
if (typeof y.return == "function") {
|
|
@@ -2706,16 +2708,16 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2706
2708
|
async function g() {
|
|
2707
2709
|
for (; ; ) {
|
|
2708
2710
|
try {
|
|
2709
|
-
let { value:
|
|
2711
|
+
let { value: S, done: x } = f ? await y.next() : y.next();
|
|
2710
2712
|
if (x) m.push(null);
|
|
2711
2713
|
else {
|
|
2712
|
-
let v =
|
|
2714
|
+
let v = S && typeof S.then == "function" ? await S : S;
|
|
2713
2715
|
if (v === null) throw b = !1, new s();
|
|
2714
2716
|
if (m.push(v)) continue;
|
|
2715
2717
|
b = !1;
|
|
2716
2718
|
}
|
|
2717
|
-
} catch (
|
|
2718
|
-
m.destroy(
|
|
2719
|
+
} catch (S) {
|
|
2720
|
+
m.destroy(S);
|
|
2719
2721
|
}
|
|
2720
2722
|
break;
|
|
2721
2723
|
}
|
|
@@ -2727,7 +2729,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2727
2729
|
le(), ce(), ue();
|
|
2728
2730
|
var t = xt(), { ArrayPrototypeIndexOf: n, NumberIsInteger: l, NumberIsNaN: r, NumberParseInt: i, ObjectDefineProperties: o, ObjectKeys: s, ObjectSetPrototypeOf: a, Promise: c, SafeSet: d, SymbolAsyncDispose: p, SymbolAsyncIterator: y, Symbol: f } = Re();
|
|
2729
2731
|
e.exports = oe, oe.ReadableState = ve;
|
|
2730
|
-
var { EventEmitter: m } = (Et(), Oe(mt)), { Stream: b, prependListener:
|
|
2732
|
+
var { EventEmitter: m } = (Et(), Oe(mt)), { Stream: b, prependListener: _ } = Gi(), { Buffer: g } = (Ne(), Oe(Le)), { addAbortSignal: S } = Pr(), x = bt(), v = qe().debuglog("stream", (C) => {
|
|
2731
2733
|
v = C;
|
|
2732
2734
|
}), E = Pl(), k = Lt(), { getHighWaterMark: I, getDefaultHighWaterMark: M } = Mr(), { aggregateTwoErrors: O, codes: { ERR_INVALID_ARG_TYPE: B, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: W, ERR_STREAM_PUSH_AFTER_EOF: D, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: N }, AbortError: ae } = We(), { validateObject: Y } = Yt(), K = f("kPaused"), { StringDecoder: re } = Rl(), F = Ho();
|
|
2733
2735
|
a(oe.prototype, b.prototype), a(oe, b);
|
|
@@ -2747,7 +2749,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2747
2749
|
function oe(C) {
|
|
2748
2750
|
if (!(this instanceof oe)) return new oe(C);
|
|
2749
2751
|
let j = this instanceof ot();
|
|
2750
|
-
this._readableState = new ve(C, this, j), C && (typeof C.read == "function" && (this._read = C.read), typeof C.destroy == "function" && (this._destroy = C.destroy), typeof C.construct == "function" && (this._construct = C.construct), C.signal && !j &&
|
|
2752
|
+
this._readableState = new ve(C, this, j), C && (typeof C.read == "function" && (this._read = C.read), typeof C.destroy == "function" && (this._destroy = C.destroy), typeof C.construct == "function" && (this._construct = C.construct), C.signal && !j && S(C.signal, this)), b.call(this, C), k.construct(this, () => {
|
|
2751
2753
|
this._readableState.needReadable && z(this, this._readableState);
|
|
2752
2754
|
});
|
|
2753
2755
|
}
|
|
@@ -2880,7 +2882,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
2880
2882
|
tt && !tt.errorEmitted ? P(C, Xe) : C.emit("error", Xe);
|
|
2881
2883
|
}
|
|
2882
2884
|
}
|
|
2883
|
-
|
|
2885
|
+
_(C, "error", yt);
|
|
2884
2886
|
function Je() {
|
|
2885
2887
|
C.removeListener("finish", ht), vt();
|
|
2886
2888
|
}
|
|
@@ -3083,13 +3085,13 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3083
3085
|
le(), ce(), ue();
|
|
3084
3086
|
var t = xt(), { ArrayPrototypeSlice: n, Error: l, FunctionPrototypeSymbolHasInstance: r, ObjectDefineProperty: i, ObjectDefineProperties: o, ObjectSetPrototypeOf: s, StringPrototypeToLowerCase: a, Symbol: c, SymbolHasInstance: d } = Re();
|
|
3085
3087
|
e.exports = Y, Y.WritableState = N;
|
|
3086
|
-
var { EventEmitter: p } = (Et(), Oe(mt)), y = Gi().Stream, { Buffer: f } = (Ne(), Oe(Le)), m = Lt(), { addAbortSignal: b } = Pr(), { getHighWaterMark:
|
|
3088
|
+
var { EventEmitter: p } = (Et(), Oe(mt)), y = Gi().Stream, { Buffer: f } = (Ne(), Oe(Le)), m = Lt(), { addAbortSignal: b } = Pr(), { getHighWaterMark: _, getDefaultHighWaterMark: g } = Mr(), { ERR_INVALID_ARG_TYPE: S, ERR_METHOD_NOT_IMPLEMENTED: x, ERR_MULTIPLE_CALLBACK: v, ERR_STREAM_CANNOT_PIPE: E, ERR_STREAM_DESTROYED: k, ERR_STREAM_ALREADY_FINISHED: I, ERR_STREAM_NULL_VALUES: M, ERR_STREAM_WRITE_AFTER_END: O, ERR_UNKNOWN_ENCODING: B } = We().codes, { errorOrDestroy: T } = m;
|
|
3087
3089
|
s(Y.prototype, y.prototype), s(Y, y);
|
|
3088
3090
|
function W() {
|
|
3089
3091
|
}
|
|
3090
3092
|
var D = c("kOnFinished");
|
|
3091
3093
|
function N(R, $, ee) {
|
|
3092
|
-
typeof ee != "boolean" && (ee = $ instanceof ot()), this.objectMode = !!(R && R.objectMode), ee && (this.objectMode = this.objectMode || !!(R && R.writableObjectMode)), this.highWaterMark = R ?
|
|
3094
|
+
typeof ee != "boolean" && (ee = $ instanceof ot()), this.objectMode = !!(R && R.objectMode), ee && (this.objectMode = this.objectMode || !!(R && R.writableObjectMode)), this.highWaterMark = R ? _(this, R, "writableHighWaterMark", ee) : g(!1), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
3093
3095
|
let fe = !!(R && R.decodeStrings === !1);
|
|
3094
3096
|
this.decodeStrings = !fe, this.defaultEncoding = R && R.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = P.bind(void 0, $), this.writecb = null, this.writelen = 0, this.afterWriteTickInfo = null, ae(this), this.pendingcb = 0, this.constructed = !0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !R || R.emitClose !== !1, this.autoDestroy = !R || R.autoDestroy !== !1, this.errored = null, this.closed = !1, this.closeEmitted = !1, this[D] = [];
|
|
3095
3097
|
}
|
|
@@ -3126,7 +3128,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3126
3128
|
if (!de.objectMode) if (typeof $ == "string") de.decodeStrings !== !1 && ($ = f.from($, ee), ee = "buffer");
|
|
3127
3129
|
else if ($ instanceof f) ee = "buffer";
|
|
3128
3130
|
else if (y._isUint8Array($)) $ = y._uint8ArrayToBuffer($), ee = "buffer";
|
|
3129
|
-
else throw new
|
|
3131
|
+
else throw new S("chunk", ["string", "Buffer", "Uint8Array"], $);
|
|
3130
3132
|
let ye;
|
|
3131
3133
|
return de.ending ? ye = new O() : de.destroyed && (ye = new k("write")), ye ? (t.nextTick(fe, ye), T(R, ye, !0), ye) : (de.pendingcb++, re(R, de, $, ee, fe));
|
|
3132
3134
|
}
|
|
@@ -3311,7 +3313,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3311
3313
|
};
|
|
3312
3314
|
}), jl = pe((u, e) => {
|
|
3313
3315
|
le(), ce(), ue();
|
|
3314
|
-
var t = xt(), n = (Ne(), Oe(Le)), { isReadable: l, isWritable: r, isIterable: i, isNodeStream: o, isReadableNodeStream: s, isWritableNodeStream: a, isDuplexNodeStream: c, isReadableStream: d, isWritableStream: p } = lt(), y = bt(), { AbortError: f, codes: { ERR_INVALID_ARG_TYPE: m, ERR_INVALID_RETURN_VALUE: b } } = We(), { destroyer:
|
|
3316
|
+
var t = xt(), n = (Ne(), Oe(Le)), { isReadable: l, isWritable: r, isIterable: i, isNodeStream: o, isReadableNodeStream: s, isWritableNodeStream: a, isDuplexNodeStream: c, isReadableStream: d, isWritableStream: p } = lt(), y = bt(), { AbortError: f, codes: { ERR_INVALID_ARG_TYPE: m, ERR_INVALID_RETURN_VALUE: b } } = We(), { destroyer: _ } = Lt(), g = ot(), S = Rr(), x = Yi(), { createDeferredPromise: v } = qe(), E = Ho(), k = globalThis.Blob || n.Blob, I = typeof k < "u" ? function(D) {
|
|
3315
3317
|
return D instanceof k;
|
|
3316
3318
|
} : function(D) {
|
|
3317
3319
|
return !1;
|
|
@@ -3325,7 +3327,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3325
3327
|
if (s(N)) return W({ readable: N });
|
|
3326
3328
|
if (a(N)) return W({ writable: N });
|
|
3327
3329
|
if (o(N)) return W({ writable: !1, readable: !1 });
|
|
3328
|
-
if (d(N)) return W({ readable:
|
|
3330
|
+
if (d(N)) return W({ readable: S.fromWeb(N) });
|
|
3329
3331
|
if (p(N)) return W({ writable: x.fromWeb(N) });
|
|
3330
3332
|
if (typeof N == "function") {
|
|
3331
3333
|
let { value: K, write: re, final: F, destroy: Z } = T(N);
|
|
@@ -3335,7 +3337,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3335
3337
|
let J, be = O(P, K, (te) => {
|
|
3336
3338
|
if (te != null) throw new b("nully", "body", te);
|
|
3337
3339
|
}, (te) => {
|
|
3338
|
-
|
|
3340
|
+
_(J, te);
|
|
3339
3341
|
});
|
|
3340
3342
|
return J = new B({ objectMode: !0, readable: !1, write: re, final(te) {
|
|
3341
3343
|
F(async () => {
|
|
@@ -3362,7 +3364,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3362
3364
|
return O(Y, N, (re) => {
|
|
3363
3365
|
re != null && K.push(re), K.push(null);
|
|
3364
3366
|
}, (re) => {
|
|
3365
|
-
|
|
3367
|
+
_(K, re);
|
|
3366
3368
|
}), K = new B({ objectMode: !0, writable: !1, read() {
|
|
3367
3369
|
} });
|
|
3368
3370
|
}
|
|
@@ -3390,13 +3392,13 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3390
3392
|
} };
|
|
3391
3393
|
}
|
|
3392
3394
|
function W(D) {
|
|
3393
|
-
let N = D.readable && typeof D.readable.read != "function" ?
|
|
3395
|
+
let N = D.readable && typeof D.readable.read != "function" ? S.wrap(D.readable) : D.readable, ae = D.writable, Y = !!l(N), K = !!r(ae), re, F, Z, P, J;
|
|
3394
3396
|
function be(te) {
|
|
3395
3397
|
let we = P;
|
|
3396
3398
|
P = null, we ? we(te) : te && J.destroy(te);
|
|
3397
3399
|
}
|
|
3398
3400
|
return J = new B({ readableObjectMode: !!(N != null && N.readableObjectMode), writableObjectMode: !!(ae != null && ae.writableObjectMode), readable: Y, writable: K }), K && (y(ae, (te) => {
|
|
3399
|
-
K = !1, te &&
|
|
3401
|
+
K = !1, te && _(N, te), be(te);
|
|
3400
3402
|
}), J._write = function(te, we, V) {
|
|
3401
3403
|
ae.write(te, we) ? V() : re = V;
|
|
3402
3404
|
}, J._final = function(te) {
|
|
@@ -3412,7 +3414,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3412
3414
|
F = null, te();
|
|
3413
3415
|
}
|
|
3414
3416
|
})), Y && (y(N, (te) => {
|
|
3415
|
-
Y = !1, te &&
|
|
3417
|
+
Y = !1, te && _(N, te), be(te);
|
|
3416
3418
|
}), N.on("readable", function() {
|
|
3417
3419
|
if (Z) {
|
|
3418
3420
|
let te = Z;
|
|
@@ -3430,7 +3432,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3430
3432
|
if (!J.push(te)) return;
|
|
3431
3433
|
}
|
|
3432
3434
|
}), J._destroy = function(te, we) {
|
|
3433
|
-
!te && P !== null && (te = new f()), Z = null, re = null, F = null, P === null ? we(te) : (P = we,
|
|
3435
|
+
!te && P !== null && (te = new f()), Z = null, re = null, F = null, P === null ? we(te) : (P = we, _(ae, te), _(N, te));
|
|
3434
3436
|
}, J;
|
|
3435
3437
|
}
|
|
3436
3438
|
}), ot = pe((u, e) => {
|
|
@@ -3496,9 +3498,9 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3496
3498
|
throw new l("_transform()");
|
|
3497
3499
|
}, s.prototype._write = function(d, p, y) {
|
|
3498
3500
|
let f = this._readableState, m = this._writableState, b = f.length;
|
|
3499
|
-
this._transform(d, p, (
|
|
3500
|
-
if (
|
|
3501
|
-
y(
|
|
3501
|
+
this._transform(d, p, (_, g) => {
|
|
3502
|
+
if (_) {
|
|
3503
|
+
y(_);
|
|
3502
3504
|
return;
|
|
3503
3505
|
}
|
|
3504
3506
|
g != null && this.push(g), m.ended || b === f.length || f.length < f.highWaterMark ? y() : this[o] = y;
|
|
@@ -3524,7 +3526,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3524
3526
|
};
|
|
3525
3527
|
}), Qi = pe((u, e) => {
|
|
3526
3528
|
le(), ce(), ue();
|
|
3527
|
-
var t = xt(), { ArrayIsArray: n, Promise: l, SymbolAsyncIterator: r, SymbolDispose: i } = Re(), o = bt(), { once: s } = qe(), a = Lt(), c = ot(), { aggregateTwoErrors: d, codes: { ERR_INVALID_ARG_TYPE: p, ERR_INVALID_RETURN_VALUE: y, ERR_MISSING_ARGS: f, ERR_STREAM_DESTROYED: m, ERR_STREAM_PREMATURE_CLOSE: b }, AbortError:
|
|
3529
|
+
var t = xt(), { ArrayIsArray: n, Promise: l, SymbolAsyncIterator: r, SymbolDispose: i } = Re(), o = bt(), { once: s } = qe(), a = Lt(), c = ot(), { aggregateTwoErrors: d, codes: { ERR_INVALID_ARG_TYPE: p, ERR_INVALID_RETURN_VALUE: y, ERR_MISSING_ARGS: f, ERR_STREAM_DESTROYED: m, ERR_STREAM_PREMATURE_CLOSE: b }, AbortError: _ } = We(), { validateFunction: g, validateAbortSignal: S } = Yt(), { isIterable: x, isReadable: v, isReadableNodeStream: E, isNodeStream: k, isTransformStream: I, isWebStream: M, isReadableStream: O, isReadableFinished: B } = lt(), T = globalThis.AbortController || Gt().AbortController, W, D, N;
|
|
3528
3530
|
function ae(te, we, V) {
|
|
3529
3531
|
let L = !1;
|
|
3530
3532
|
te.on("close", () => {
|
|
@@ -3592,9 +3594,9 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3592
3594
|
function J(te, we, V) {
|
|
3593
3595
|
if (te.length === 1 && n(te[0]) && (te = te[0]), te.length < 2) throw new f("streams");
|
|
3594
3596
|
let L = new T(), ne = L.signal, H = V?.signal, G = [];
|
|
3595
|
-
|
|
3597
|
+
S(H, "options.signal");
|
|
3596
3598
|
function Q() {
|
|
3597
|
-
de(new
|
|
3599
|
+
de(new _());
|
|
3598
3600
|
}
|
|
3599
3601
|
N = N || qe().addAbortListener;
|
|
3600
3602
|
let me;
|
|
@@ -3696,16 +3698,16 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3696
3698
|
e.exports = function(...b) {
|
|
3697
3699
|
if (b.length === 0) throw new f("streams");
|
|
3698
3700
|
if (b.length === 1) return n.from(b[0]);
|
|
3699
|
-
let
|
|
3701
|
+
let _ = [...b];
|
|
3700
3702
|
if (typeof b[0] == "function" && (b[0] = n.from(b[0])), typeof b[b.length - 1] == "function") {
|
|
3701
3703
|
let T = b.length - 1;
|
|
3702
3704
|
b[T] = n.from(b[T]);
|
|
3703
3705
|
}
|
|
3704
3706
|
for (let T = 0; T < b.length; ++T) if (!(!r(b[T]) && !s(b[T]))) {
|
|
3705
|
-
if (T < b.length - 1 && !(i(b[T]) || d(b[T]) || a(b[T]))) throw new y(`streams[${T}]`,
|
|
3706
|
-
if (T > 0 && !(o(b[T]) || c(b[T]) || a(b[T]))) throw new y(`streams[${T}]`,
|
|
3707
|
+
if (T < b.length - 1 && !(i(b[T]) || d(b[T]) || a(b[T]))) throw new y(`streams[${T}]`, _[T], "must be readable");
|
|
3708
|
+
if (T > 0 && !(o(b[T]) || c(b[T]) || a(b[T]))) throw new y(`streams[${T}]`, _[T], "must be writable");
|
|
3707
3709
|
}
|
|
3708
|
-
let g,
|
|
3710
|
+
let g, S, x, v, E;
|
|
3709
3711
|
function k(T) {
|
|
3710
3712
|
let W = v;
|
|
3711
3713
|
v = null, W ? W(T) : T ? E.destroy(T) : !B && !O && E.destroy();
|
|
@@ -3715,7 +3717,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3715
3717
|
if (r(I)) E._write = function(W, D, N) {
|
|
3716
3718
|
I.write(W, D) ? N() : g = N;
|
|
3717
3719
|
}, E._final = function(W) {
|
|
3718
|
-
I.end(),
|
|
3720
|
+
I.end(), S = W;
|
|
3719
3721
|
}, I.on("drain", function() {
|
|
3720
3722
|
if (g) {
|
|
3721
3723
|
let W = g;
|
|
@@ -3734,7 +3736,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3734
3736
|
}, E._final = async function(D) {
|
|
3735
3737
|
try {
|
|
3736
3738
|
await W.ready, W.close().catch(() => {
|
|
3737
|
-
}),
|
|
3739
|
+
}), S = D;
|
|
3738
3740
|
} catch (N) {
|
|
3739
3741
|
D(N);
|
|
3740
3742
|
}
|
|
@@ -3742,9 +3744,9 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3742
3744
|
}
|
|
3743
3745
|
let T = a(M) ? M.readable : M;
|
|
3744
3746
|
m(T, () => {
|
|
3745
|
-
if (
|
|
3746
|
-
let W =
|
|
3747
|
-
|
|
3747
|
+
if (S) {
|
|
3748
|
+
let W = S;
|
|
3749
|
+
S = null, W();
|
|
3748
3750
|
}
|
|
3749
3751
|
});
|
|
3750
3752
|
}
|
|
@@ -3783,14 +3785,14 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3783
3785
|
}
|
|
3784
3786
|
}
|
|
3785
3787
|
return E._destroy = function(T, W) {
|
|
3786
|
-
!T && v !== null && (T = new p()), x = null, g = null,
|
|
3788
|
+
!T && v !== null && (T = new p()), x = null, g = null, S = null, v === null ? W(T) : (v = W, r(M) && l(M, T));
|
|
3787
3789
|
}, E;
|
|
3788
3790
|
};
|
|
3789
3791
|
}), Ll = pe((u, e) => {
|
|
3790
3792
|
le(), ce(), ue();
|
|
3791
|
-
var t = globalThis.AbortController || Gt().AbortController, { codes: { ERR_INVALID_ARG_VALUE: n, ERR_INVALID_ARG_TYPE: l, ERR_MISSING_ARGS: r, ERR_OUT_OF_RANGE: i }, AbortError: o } = We(), { validateAbortSignal: s, validateInteger: a, validateObject: c } = Yt(), d = Re().Symbol("kWeak"), p = Re().Symbol("kResistStopPropagation"), { finished: y } = bt(), f = Vo(), { addAbortSignalNoValidate: m } = Pr(), { isWritable: b, isNodeStream:
|
|
3793
|
+
var t = globalThis.AbortController || Gt().AbortController, { codes: { ERR_INVALID_ARG_VALUE: n, ERR_INVALID_ARG_TYPE: l, ERR_MISSING_ARGS: r, ERR_OUT_OF_RANGE: i }, AbortError: o } = We(), { validateAbortSignal: s, validateInteger: a, validateObject: c } = Yt(), d = Re().Symbol("kWeak"), p = Re().Symbol("kResistStopPropagation"), { finished: y } = bt(), f = Vo(), { addAbortSignalNoValidate: m } = Pr(), { isWritable: b, isNodeStream: _ } = lt(), { deprecate: g } = qe(), { ArrayPrototypePush: S, Boolean: x, MathFloor: v, Number: E, NumberIsNaN: k, Promise: I, PromiseReject: M, PromiseResolve: O, PromisePrototypeThen: B, Symbol: T } = Re(), W = T("kEmpty"), D = T("kEof");
|
|
3792
3794
|
function N(H, G) {
|
|
3793
|
-
if (G != null && c(G, "options"), G?.signal != null && s(G.signal, "options.signal"),
|
|
3795
|
+
if (G != null && c(G, "options"), G?.signal != null && s(G.signal, "options.signal"), _(H) && !b(H)) throw new n("stream", H, "must be writable");
|
|
3794
3796
|
let Q = f(this, H);
|
|
3795
3797
|
return G != null && G.signal && m(G.signal, Q), Q;
|
|
3796
3798
|
}
|
|
@@ -3926,7 +3928,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3926
3928
|
for await (let me of this) {
|
|
3927
3929
|
var Q;
|
|
3928
3930
|
if (H != null && (Q = H.signal) !== null && Q !== void 0 && Q.aborted) throw new o(void 0, { cause: H.signal.reason });
|
|
3929
|
-
|
|
3931
|
+
S(G, me);
|
|
3930
3932
|
}
|
|
3931
3933
|
return G;
|
|
3932
3934
|
}
|
|
@@ -3975,16 +3977,16 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
3975
3977
|
let b = t(c);
|
|
3976
3978
|
y = b.signal, f = b.end;
|
|
3977
3979
|
}
|
|
3978
|
-
o(c, (b,
|
|
3979
|
-
b ? p(b) : d(
|
|
3980
|
+
o(c, (b, _) => {
|
|
3981
|
+
b ? p(b) : d(_);
|
|
3980
3982
|
}, { signal: y, end: f });
|
|
3981
3983
|
});
|
|
3982
3984
|
}
|
|
3983
3985
|
e.exports = { finished: s, pipeline: a };
|
|
3984
3986
|
}), Yo = pe((u, e) => {
|
|
3985
3987
|
le(), ce(), ue();
|
|
3986
|
-
var { Buffer: t } = (Ne(), Oe(Le)), { ObjectDefineProperty: n, ObjectKeys: l, ReflectApply: r } = Re(), { promisify: { custom: i } } = qe(), { streamReturningOperators: o, promiseReturningOperators: s } = Ll(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: a } } = We(), c = Vo(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = Mr(), { pipeline: y } = Qi(), { destroyer: f } = Lt(), m = bt(), b = Go(),
|
|
3987
|
-
g.isDestroyed =
|
|
3988
|
+
var { Buffer: t } = (Ne(), Oe(Le)), { ObjectDefineProperty: n, ObjectKeys: l, ReflectApply: r } = Re(), { promisify: { custom: i } } = qe(), { streamReturningOperators: o, promiseReturningOperators: s } = Ll(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: a } } = We(), c = Vo(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = Mr(), { pipeline: y } = Qi(), { destroyer: f } = Lt(), m = bt(), b = Go(), _ = lt(), g = e.exports = Gi().Stream;
|
|
3989
|
+
g.isDestroyed = _.isDestroyed, g.isDisturbed = _.isDisturbed, g.isErrored = _.isErrored, g.isReadable = _.isReadable, g.isWritable = _.isWritable, g.Readable = Rr();
|
|
3988
3990
|
for (let x of l(o)) {
|
|
3989
3991
|
let v = function(...k) {
|
|
3990
3992
|
if (new.target) throw a();
|
|
@@ -4000,8 +4002,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4000
4002
|
n(v, "name", { __proto__: null, value: E.name }), n(v, "length", { __proto__: null, value: E.length }), n(g.Readable.prototype, x, { __proto__: null, value: v, enumerable: !1, configurable: !0, writable: !0 });
|
|
4001
4003
|
}
|
|
4002
4004
|
g.Writable = Yi(), g.Duplex = ot(), g.Transform = zo(), g.PassThrough = Ko(), g.pipeline = y;
|
|
4003
|
-
var { addAbortSignal:
|
|
4004
|
-
g.addAbortSignal =
|
|
4005
|
+
var { addAbortSignal: S } = Pr();
|
|
4006
|
+
g.addAbortSignal = S, g.finished = m, g.destroy = f, g.compose = c, g.setDefaultHighWaterMark = d, g.getDefaultHighWaterMark = p, n(g, "promises", { __proto__: null, configurable: !0, enumerable: !0, get() {
|
|
4005
4007
|
return b;
|
|
4006
4008
|
} }), n(y, i, { __proto__: null, enumerable: !0, get() {
|
|
4007
4009
|
return b.pipeline;
|
|
@@ -4304,25 +4306,25 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4304
4306
|
}
|
|
4305
4307
|
r.selectColor = l;
|
|
4306
4308
|
function r(y) {
|
|
4307
|
-
let f, m = null, b,
|
|
4308
|
-
function g(...
|
|
4309
|
+
let f, m = null, b, _;
|
|
4310
|
+
function g(...S) {
|
|
4309
4311
|
if (!g.enabled) return;
|
|
4310
4312
|
let x = g, v = Number(/* @__PURE__ */ new Date()), E = v - (f || v);
|
|
4311
|
-
x.diff = E, x.prev = f, x.curr = v, f = v,
|
|
4313
|
+
x.diff = E, x.prev = f, x.curr = v, f = v, S[0] = r.coerce(S[0]), typeof S[0] != "string" && S.unshift("%O");
|
|
4312
4314
|
let k = 0;
|
|
4313
|
-
|
|
4315
|
+
S[0] = S[0].replace(/%([a-zA-Z%])/g, (I, M) => {
|
|
4314
4316
|
if (I === "%%") return "%";
|
|
4315
4317
|
k++;
|
|
4316
4318
|
let O = r.formatters[M];
|
|
4317
4319
|
if (typeof O == "function") {
|
|
4318
|
-
let B =
|
|
4319
|
-
I = O.call(x, B),
|
|
4320
|
+
let B = S[k];
|
|
4321
|
+
I = O.call(x, B), S.splice(k, 1), k--;
|
|
4320
4322
|
}
|
|
4321
4323
|
return I;
|
|
4322
|
-
}), r.formatArgs.call(x,
|
|
4324
|
+
}), r.formatArgs.call(x, S), (x.log || r.log).apply(x, S);
|
|
4323
4325
|
}
|
|
4324
|
-
return g.namespace = y, g.useColors = r.useColors(), g.color = r.selectColor(y), g.extend = i, g.destroy = r.destroy, Object.defineProperty(g, "enabled", { enumerable: !0, configurable: !1, get: () => m !== null ? m : (b !== r.namespaces && (b = r.namespaces,
|
|
4325
|
-
m =
|
|
4326
|
+
return g.namespace = y, g.useColors = r.useColors(), g.color = r.selectColor(y), g.extend = i, g.destroy = r.destroy, Object.defineProperty(g, "enabled", { enumerable: !0, configurable: !1, get: () => m !== null ? m : (b !== r.namespaces && (b = r.namespaces, _ = r.enabled(y)), _), set: (S) => {
|
|
4327
|
+
m = S;
|
|
4326
4328
|
} }), typeof r.init == "function" && r.init(g), g;
|
|
4327
4329
|
}
|
|
4328
4330
|
function i(y, f) {
|
|
@@ -4335,9 +4337,9 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4335
4337
|
for (let m of f) m[0] === "-" ? r.skips.push(m.slice(1)) : r.names.push(m);
|
|
4336
4338
|
}
|
|
4337
4339
|
function s(y, f) {
|
|
4338
|
-
let m = 0, b = 0,
|
|
4339
|
-
for (; m < y.length; ) if (b < f.length && (f[b] === y[m] || f[b] === "*")) f[b] === "*" ? (
|
|
4340
|
-
else if (
|
|
4340
|
+
let m = 0, b = 0, _ = -1, g = 0;
|
|
4341
|
+
for (; m < y.length; ) if (b < f.length && (f[b] === y[m] || f[b] === "*")) f[b] === "*" ? (_ = b, g = m, b++) : (m++, b++);
|
|
4342
|
+
else if (_ !== -1) b = _ + 1, g++, m = g;
|
|
4341
4343
|
else return !1;
|
|
4342
4344
|
for (; b < f.length && f[b] === "*"; ) b++;
|
|
4343
4345
|
return b === f.length;
|
|
@@ -4497,23 +4499,23 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4497
4499
|
if (this._pos++, this._pos >= this._list.length) return this._emitError(new Error("Packet too short"));
|
|
4498
4500
|
if (this._list.readUInt8(this._pos) & 1) return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));
|
|
4499
4501
|
y.username = this._list.readUInt8(this._pos) & r.USERNAME_MASK, y.password = this._list.readUInt8(this._pos) & r.PASSWORD_MASK, y.will = this._list.readUInt8(this._pos) & r.WILL_FLAG_MASK;
|
|
4500
|
-
let b = !!(this._list.readUInt8(this._pos) & r.WILL_RETAIN_MASK),
|
|
4501
|
-
if (y.will) f.will = {}, f.will.retain = b, f.will.qos =
|
|
4502
|
+
let b = !!(this._list.readUInt8(this._pos) & r.WILL_RETAIN_MASK), _ = (this._list.readUInt8(this._pos) & r.WILL_QOS_MASK) >> r.WILL_QOS_SHIFT;
|
|
4503
|
+
if (y.will) f.will = {}, f.will.retain = b, f.will.qos = _;
|
|
4502
4504
|
else {
|
|
4503
4505
|
if (b) return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));
|
|
4504
|
-
if (
|
|
4506
|
+
if (_) return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"));
|
|
4505
4507
|
}
|
|
4506
4508
|
if (f.clean = (this._list.readUInt8(this._pos) & r.CLEAN_SESSION_MASK) !== 0, this._pos++, f.keepalive = this._parseNum(), f.keepalive === -1) return this._emitError(new Error("Packet too short"));
|
|
4507
4509
|
if (f.protocolVersion === 5) {
|
|
4508
|
-
let
|
|
4509
|
-
Object.getOwnPropertyNames(
|
|
4510
|
+
let S = this._parseProperties();
|
|
4511
|
+
Object.getOwnPropertyNames(S).length && (f.properties = S);
|
|
4510
4512
|
}
|
|
4511
4513
|
let g = this._parseString();
|
|
4512
4514
|
if (g === null) return this._emitError(new Error("Packet too short"));
|
|
4513
4515
|
if (f.clientId = g, i("_parseConnect: packet.clientId: %s", f.clientId), y.will) {
|
|
4514
4516
|
if (f.protocolVersion === 5) {
|
|
4515
|
-
let
|
|
4516
|
-
Object.getOwnPropertyNames(
|
|
4517
|
+
let S = this._parseProperties();
|
|
4518
|
+
Object.getOwnPropertyNames(S).length && (f.will.properties = S);
|
|
4517
4519
|
}
|
|
4518
4520
|
if (a = this._parseString(), a === null) return this._emitError(new Error("Cannot parse will topic"));
|
|
4519
4521
|
if (f.will.topic = a, i("_parseConnect: packet.will.topic: %s", f.will.topic), c = this._parseBuffer(), c === null) return this._emitError(new Error("Cannot parse will payload"));
|
|
@@ -4564,8 +4566,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4564
4566
|
let a = this.packet, c, d, p, y, f, m, b;
|
|
4565
4567
|
if (a.subscriptions = [], !!this._parseMessageId()) {
|
|
4566
4568
|
if (this.settings.protocolVersion === 5) {
|
|
4567
|
-
let
|
|
4568
|
-
Object.getOwnPropertyNames(
|
|
4569
|
+
let _ = this._parseProperties();
|
|
4570
|
+
Object.getOwnPropertyNames(_).length && (a.properties = _);
|
|
4569
4571
|
}
|
|
4570
4572
|
if (a.length <= 0) return this._emitError(new Error("Malformed subscribe, no payload specified"));
|
|
4571
4573
|
for (; this._pos < a.length; ) {
|
|
@@ -4820,11 +4822,11 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4820
4822
|
le(), ce(), ue();
|
|
4821
4823
|
var t = Qo(), { Buffer: n } = (Ne(), Oe(Le)), l = n.allocUnsafe(0), r = n.from([0]), i = ql(), o = Hl().nextTick, s = at()("mqtt-packet:writeToStream"), a = i.cache, c = i.generateNumber, d = i.generateCache, p = i.genBufVariableByteInt, y = i.generate4ByteBuffer, f = Y, m = !0;
|
|
4822
4824
|
function b(V, L, ne) {
|
|
4823
|
-
switch (s("generate called"), L.cork && (L.cork(), o(
|
|
4825
|
+
switch (s("generate called"), L.cork && (L.cork(), o(_, L)), m && (m = !1, d()), s("generate: packet.cmd: %s", V.cmd), V.cmd) {
|
|
4824
4826
|
case "connect":
|
|
4825
4827
|
return g(V, L);
|
|
4826
4828
|
case "connack":
|
|
4827
|
-
return
|
|
4829
|
+
return S(V, L, ne);
|
|
4828
4830
|
case "publish":
|
|
4829
4831
|
return x(V, L, ne);
|
|
4830
4832
|
case "puback":
|
|
@@ -4856,7 +4858,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4856
4858
|
}, set(V) {
|
|
4857
4859
|
V ? ((!a || Object.keys(a).length === 0) && (m = !0), f = Y) : (m = !1, f = K);
|
|
4858
4860
|
} });
|
|
4859
|
-
function
|
|
4861
|
+
function _(V) {
|
|
4860
4862
|
V.uncork();
|
|
4861
4863
|
}
|
|
4862
4864
|
function g(V, L, ne) {
|
|
@@ -4899,7 +4901,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
4899
4901
|
let oe = 0;
|
|
4900
4902
|
return oe |= ee != null ? t.USERNAME_MASK : 0, oe |= fe != null ? t.PASSWORD_MASK : 0, oe |= me && me.retain ? t.WILL_RETAIN_MASK : 0, oe |= me && me.qos ? me.qos << t.WILL_QOS_SHIFT : 0, oe |= me ? t.WILL_FLAG_MASK : 0, oe |= se ? t.CLEAN_SESSION_MASK : 0, L.write(n.from([oe])), f(L, R), Q === 5 && q.write(), F(L, $), me && (Q === 5 && ge.write(), N(L, me.topic), F(L, me.payload)), ee != null && F(L, ee), fe != null && F(L, fe), !0;
|
|
4901
4903
|
}
|
|
4902
|
-
function
|
|
4904
|
+
function S(V, L, ne) {
|
|
4903
4905
|
let H = ne ? ne.protocolVersion : 4, G = V || {}, Q = H === 5 ? G.reasonCode : G.returnCode, me = G.properties, se = 2;
|
|
4904
4906
|
if (typeof Q != "number") return L.destroy(new Error("Invalid return code")), !1;
|
|
4905
4907
|
let R = null;
|
|
@@ -5241,8 +5243,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5241
5243
|
function s(d, p) {
|
|
5242
5244
|
let y = Object.keys(d), f = new Array(y.length);
|
|
5243
5245
|
for (let m = 0; m < y.length; m++) {
|
|
5244
|
-
let b = y[m],
|
|
5245
|
-
typeof
|
|
5246
|
+
let b = y[m], _ = d[b];
|
|
5247
|
+
typeof _ != "object" || _ === null ? f[b] = _ : _.constructor !== Object && (o = i.get(_.constructor)) ? f[b] = o(_, p) : ArrayBuffer.isView(_) ? f[b] = t(_) : f[b] = p(_);
|
|
5246
5248
|
}
|
|
5247
5249
|
return f;
|
|
5248
5250
|
}
|
|
@@ -5277,14 +5279,14 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5277
5279
|
return r.proto ? p : d;
|
|
5278
5280
|
function c(y, f) {
|
|
5279
5281
|
let m = Object.keys(y), b = new Array(m.length);
|
|
5280
|
-
for (let
|
|
5281
|
-
let g = m[
|
|
5282
|
-
if (typeof
|
|
5283
|
-
else if (
|
|
5284
|
-
else if (ArrayBuffer.isView(
|
|
5282
|
+
for (let _ = 0; _ < m.length; _++) {
|
|
5283
|
+
let g = m[_], S = y[g];
|
|
5284
|
+
if (typeof S != "object" || S === null) b[g] = S;
|
|
5285
|
+
else if (S.constructor !== Object && (a = s.get(S.constructor))) b[g] = a(S, f);
|
|
5286
|
+
else if (ArrayBuffer.isView(S)) b[g] = t(S);
|
|
5285
5287
|
else {
|
|
5286
|
-
let x = i.indexOf(
|
|
5287
|
-
x !== -1 ? b[g] = o[x] : b[g] = f(
|
|
5288
|
+
let x = i.indexOf(S);
|
|
5289
|
+
x !== -1 ? b[g] = o[x] : b[g] = f(S);
|
|
5288
5290
|
}
|
|
5289
5291
|
}
|
|
5290
5292
|
return b;
|
|
@@ -5302,8 +5304,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5302
5304
|
else if (b.constructor !== Object && (a = s.get(b.constructor))) f[m] = a(b, d);
|
|
5303
5305
|
else if (ArrayBuffer.isView(b)) f[m] = t(b);
|
|
5304
5306
|
else {
|
|
5305
|
-
let
|
|
5306
|
-
|
|
5307
|
+
let _ = i.indexOf(b);
|
|
5308
|
+
_ !== -1 ? f[m] = o[_] : f[m] = d(b);
|
|
5307
5309
|
}
|
|
5308
5310
|
}
|
|
5309
5311
|
return i.pop(), o.pop(), f;
|
|
@@ -5320,8 +5322,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5320
5322
|
else if (b.constructor !== Object && (a = s.get(b.constructor))) f[m] = a(b, p);
|
|
5321
5323
|
else if (ArrayBuffer.isView(b)) f[m] = t(b);
|
|
5322
5324
|
else {
|
|
5323
|
-
let
|
|
5324
|
-
|
|
5325
|
+
let _ = i.indexOf(b);
|
|
5326
|
+
_ !== -1 ? f[m] = o[_] : f[m] = p(b);
|
|
5325
5327
|
}
|
|
5326
5328
|
}
|
|
5327
5329
|
return i.pop(), o.pop(), f;
|
|
@@ -5640,7 +5642,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5640
5642
|
return f.#a;
|
|
5641
5643
|
}, get tail() {
|
|
5642
5644
|
return f.#s;
|
|
5643
|
-
}, free: f.#y, isBackgroundFetch: (m) => f.#t(m), backgroundFetch: (m, b,
|
|
5645
|
+
}, free: f.#y, isBackgroundFetch: (m) => f.#t(m), backgroundFetch: (m, b, _, g) => f.#j(m, b, _, g), moveToTail: (m) => f.#C(m), indexes: (m) => f.#S(m), rindexes: (m) => f.#k(m), isStale: (m) => f.#p(m) };
|
|
5644
5646
|
}
|
|
5645
5647
|
get max() {
|
|
5646
5648
|
return this.#l;
|
|
@@ -5667,7 +5669,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5667
5669
|
return this.#m;
|
|
5668
5670
|
}
|
|
5669
5671
|
constructor(f) {
|
|
5670
|
-
let { max: m = 0, ttl: b, ttlResolution:
|
|
5672
|
+
let { max: m = 0, ttl: b, ttlResolution: _ = 1, ttlAutopurge: g, updateAgeOnGet: S, updateAgeOnHas: x, allowStale: v, dispose: E, disposeAfter: k, noDisposeOnSet: I, noUpdateTTL: M, maxSize: O = 0, maxEntrySize: B = 0, sizeCalculation: T, fetchMethod: W, memoMethod: D, noDeleteOnFetchRejection: N, noDeleteOnStaleGet: ae, allowStaleOnFetchRejection: Y, allowStaleOnFetchAbort: K, ignoreFetchAbort: re } = f;
|
|
5671
5673
|
if (m !== 0 && !s(m)) throw new TypeError("max option must be a nonnegative integer");
|
|
5672
5674
|
let F = m ? a(m) : Array;
|
|
5673
5675
|
if (!F) throw new Error("invalid max value: " + m);
|
|
@@ -5682,7 +5684,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5682
5684
|
if (!s(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
5683
5685
|
this.#$();
|
|
5684
5686
|
}
|
|
5685
|
-
if (this.allowStale = !!v, this.noDeleteOnStaleGet = !!ae, this.updateAgeOnGet = !!
|
|
5687
|
+
if (this.allowStale = !!v, this.noDeleteOnStaleGet = !!ae, this.updateAgeOnGet = !!S, this.updateAgeOnHas = !!x, this.ttlResolution = s(_) || _ === 0 ? _ : 1, this.ttlAutopurge = !!g, this.ttl = b || 0, this.ttl) {
|
|
5686
5688
|
if (!s(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
5687
5689
|
this.#L();
|
|
5688
5690
|
}
|
|
@@ -5697,43 +5699,43 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5697
5699
|
}
|
|
5698
5700
|
#L() {
|
|
5699
5701
|
let f = new c(this.#l), m = new c(this.#l);
|
|
5700
|
-
this.#d = f, this.#w = m, this.#N = (g,
|
|
5701
|
-
if (m[g] =
|
|
5702
|
+
this.#d = f, this.#w = m, this.#N = (g, S, x = e.now()) => {
|
|
5703
|
+
if (m[g] = S !== 0 ? x : 0, f[g] = S, S !== 0 && this.ttlAutopurge) {
|
|
5702
5704
|
let v = setTimeout(() => {
|
|
5703
5705
|
this.#p(g) && this.#E(this.#r[g], "expire");
|
|
5704
|
-
},
|
|
5706
|
+
}, S + 1);
|
|
5705
5707
|
v.unref && v.unref();
|
|
5706
5708
|
}
|
|
5707
5709
|
}, this.#I = (g) => {
|
|
5708
5710
|
m[g] = f[g] !== 0 ? e.now() : 0;
|
|
5709
|
-
}, this.#x = (g,
|
|
5710
|
-
if (f[
|
|
5711
|
-
let x = f[
|
|
5711
|
+
}, this.#x = (g, S) => {
|
|
5712
|
+
if (f[S]) {
|
|
5713
|
+
let x = f[S], v = m[S];
|
|
5712
5714
|
if (!x || !v) return;
|
|
5713
|
-
g.ttl = x, g.start = v, g.now = b ||
|
|
5715
|
+
g.ttl = x, g.start = v, g.now = b || _();
|
|
5714
5716
|
let E = g.now - v;
|
|
5715
5717
|
g.remainingTTL = x - E;
|
|
5716
5718
|
}
|
|
5717
5719
|
};
|
|
5718
|
-
let b = 0,
|
|
5720
|
+
let b = 0, _ = () => {
|
|
5719
5721
|
let g = e.now();
|
|
5720
5722
|
if (this.ttlResolution > 0) {
|
|
5721
5723
|
b = g;
|
|
5722
|
-
let
|
|
5723
|
-
|
|
5724
|
+
let S = setTimeout(() => b = 0, this.ttlResolution);
|
|
5725
|
+
S.unref && S.unref();
|
|
5724
5726
|
}
|
|
5725
5727
|
return g;
|
|
5726
5728
|
};
|
|
5727
5729
|
this.getRemainingTTL = (g) => {
|
|
5728
|
-
let
|
|
5729
|
-
if (
|
|
5730
|
-
let x = f[
|
|
5730
|
+
let S = this.#n.get(g);
|
|
5731
|
+
if (S === void 0) return 0;
|
|
5732
|
+
let x = f[S], v = m[S];
|
|
5731
5733
|
if (!x || !v) return 1 / 0;
|
|
5732
|
-
let E = (b ||
|
|
5734
|
+
let E = (b || _()) - v;
|
|
5733
5735
|
return x - E;
|
|
5734
5736
|
}, this.#p = (g) => {
|
|
5735
|
-
let
|
|
5736
|
-
return !!x && !!
|
|
5737
|
+
let S = m[g], x = f[g];
|
|
5738
|
+
return !!x && !!S && (b || _()) - S > x;
|
|
5737
5739
|
};
|
|
5738
5740
|
}
|
|
5739
5741
|
#I = () => {
|
|
@@ -5747,27 +5749,27 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5747
5749
|
let f = new c(this.#l);
|
|
5748
5750
|
this.#b = 0, this.#v = f, this.#T = (m) => {
|
|
5749
5751
|
this.#b -= f[m], f[m] = 0;
|
|
5750
|
-
}, this.#U = (m, b,
|
|
5752
|
+
}, this.#U = (m, b, _, g) => {
|
|
5751
5753
|
if (this.#t(b)) return 0;
|
|
5752
|
-
if (!s(
|
|
5754
|
+
if (!s(_)) if (g) {
|
|
5753
5755
|
if (typeof g != "function") throw new TypeError("sizeCalculation must be a function");
|
|
5754
|
-
if (
|
|
5756
|
+
if (_ = g(b, m), !s(_)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
5755
5757
|
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
5756
|
-
return
|
|
5757
|
-
}, this.#M = (m, b,
|
|
5758
|
+
return _;
|
|
5759
|
+
}, this.#M = (m, b, _) => {
|
|
5758
5760
|
if (f[m] = b, this.#h) {
|
|
5759
5761
|
let g = this.#h - f[m];
|
|
5760
5762
|
for (; this.#b > g; ) this.#R(!0);
|
|
5761
5763
|
}
|
|
5762
|
-
this.#b += f[m],
|
|
5764
|
+
this.#b += f[m], _ && (_.entrySize = b, _.totalCalculatedSize = this.#b);
|
|
5763
5765
|
};
|
|
5764
5766
|
}
|
|
5765
5767
|
#T = (f) => {
|
|
5766
5768
|
};
|
|
5767
5769
|
#M = (f, m, b) => {
|
|
5768
5770
|
};
|
|
5769
|
-
#U = (f, m, b,
|
|
5770
|
-
if (b ||
|
|
5771
|
+
#U = (f, m, b, _) => {
|
|
5772
|
+
if (b || _) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
5771
5773
|
return 0;
|
|
5772
5774
|
};
|
|
5773
5775
|
*#S({ allowStale: f = this.allowStale } = {}) {
|
|
@@ -5809,19 +5811,19 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5809
5811
|
[Symbol.toStringTag] = "LRUCache";
|
|
5810
5812
|
find(f, m = {}) {
|
|
5811
5813
|
for (let b of this.#S()) {
|
|
5812
|
-
let
|
|
5814
|
+
let _ = this.#e[b], g = this.#t(_) ? _.__staleWhileFetching : _;
|
|
5813
5815
|
if (g !== void 0 && f(g, this.#r[b], this)) return this.get(this.#r[b], m);
|
|
5814
5816
|
}
|
|
5815
5817
|
}
|
|
5816
5818
|
forEach(f, m = this) {
|
|
5817
5819
|
for (let b of this.#S()) {
|
|
5818
|
-
let
|
|
5820
|
+
let _ = this.#e[b], g = this.#t(_) ? _.__staleWhileFetching : _;
|
|
5819
5821
|
g !== void 0 && f.call(m, g, this.#r[b], this);
|
|
5820
5822
|
}
|
|
5821
5823
|
}
|
|
5822
5824
|
rforEach(f, m = this) {
|
|
5823
5825
|
for (let b of this.#k()) {
|
|
5824
|
-
let
|
|
5826
|
+
let _ = this.#e[b], g = this.#t(_) ? _.__staleWhileFetching : _;
|
|
5825
5827
|
g !== void 0 && f.call(m, g, this.#r[b], this);
|
|
5826
5828
|
}
|
|
5827
5829
|
}
|
|
@@ -5833,13 +5835,13 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5833
5835
|
info(f) {
|
|
5834
5836
|
let m = this.#n.get(f);
|
|
5835
5837
|
if (m === void 0) return;
|
|
5836
|
-
let b = this.#e[m],
|
|
5837
|
-
if (
|
|
5838
|
-
let g = { value:
|
|
5838
|
+
let b = this.#e[m], _ = this.#t(b) ? b.__staleWhileFetching : b;
|
|
5839
|
+
if (_ === void 0) return;
|
|
5840
|
+
let g = { value: _ };
|
|
5839
5841
|
if (this.#d && this.#w) {
|
|
5840
|
-
let
|
|
5841
|
-
if (
|
|
5842
|
-
let v =
|
|
5842
|
+
let S = this.#d[m], x = this.#w[m];
|
|
5843
|
+
if (S && x) {
|
|
5844
|
+
let v = S - (e.now() - x);
|
|
5843
5845
|
g.ttl = v, g.start = Date.now();
|
|
5844
5846
|
}
|
|
5845
5847
|
}
|
|
@@ -5848,15 +5850,15 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5848
5850
|
dump() {
|
|
5849
5851
|
let f = [];
|
|
5850
5852
|
for (let m of this.#S({ allowStale: !0 })) {
|
|
5851
|
-
let b = this.#r[m],
|
|
5853
|
+
let b = this.#r[m], _ = this.#e[m], g = this.#t(_) ? _.__staleWhileFetching : _;
|
|
5852
5854
|
if (g === void 0 || b === void 0) continue;
|
|
5853
|
-
let
|
|
5855
|
+
let S = { value: g };
|
|
5854
5856
|
if (this.#d && this.#w) {
|
|
5855
|
-
|
|
5857
|
+
S.ttl = this.#d[m];
|
|
5856
5858
|
let x = e.now() - this.#w[m];
|
|
5857
|
-
|
|
5859
|
+
S.start = Math.floor(Date.now() - x);
|
|
5858
5860
|
}
|
|
5859
|
-
this.#v && (
|
|
5861
|
+
this.#v && (S.size = this.#v[m]), f.unshift([b, S]);
|
|
5860
5862
|
}
|
|
5861
5863
|
return f;
|
|
5862
5864
|
}
|
|
@@ -5864,15 +5866,15 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5864
5866
|
this.clear();
|
|
5865
5867
|
for (let [m, b] of f) {
|
|
5866
5868
|
if (b.start) {
|
|
5867
|
-
let
|
|
5868
|
-
b.start = e.now() -
|
|
5869
|
+
let _ = Date.now() - b.start;
|
|
5870
|
+
b.start = e.now() - _;
|
|
5869
5871
|
}
|
|
5870
5872
|
this.set(m, b.value, b);
|
|
5871
5873
|
}
|
|
5872
5874
|
}
|
|
5873
5875
|
set(f, m, b = {}) {
|
|
5874
5876
|
if (m === void 0) return this.delete(f), this;
|
|
5875
|
-
let { ttl:
|
|
5877
|
+
let { ttl: _ = this.ttl, start: g, noDisposeOnSet: S = this.noDisposeOnSet, sizeCalculation: x = this.sizeCalculation, status: v } = b, { noUpdateTTL: E = this.noUpdateTTL } = b, k = this.#U(f, m, b.size || 0, x);
|
|
5876
5878
|
if (this.maxEntrySize && k > this.maxEntrySize) return v && (v.set = "miss", v.maxEntrySizeExceeded = !0), this.#E(f, "set"), this;
|
|
5877
5879
|
let I = this.#i === 0 ? void 0 : this.#n.get(f);
|
|
5878
5880
|
if (I === void 0) I = this.#i === 0 ? this.#s : this.#y.length !== 0 ? this.#y.pop() : this.#i === this.#l ? this.#R(!1) : this.#i, this.#r[I] = f, this.#e[I] = m, this.#n.set(f, I), this.#u[this.#s] = I, this.#f[I] = this.#s, this.#s = I, this.#i++, this.#M(I, k, v), v && (v.set = "add"), E = !1;
|
|
@@ -5883,8 +5885,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5883
5885
|
if (this.#A && this.#t(M)) {
|
|
5884
5886
|
M.__abortController.abort(new Error("replaced"));
|
|
5885
5887
|
let { __staleWhileFetching: O } = M;
|
|
5886
|
-
O !== void 0 && !
|
|
5887
|
-
} else
|
|
5888
|
+
O !== void 0 && !S && (this.#_ && this.#g?.(O, f, "set"), this.#c && this.#o?.push([O, f, "set"]));
|
|
5889
|
+
} else S || (this.#_ && this.#g?.(M, f, "set"), this.#c && this.#o?.push([M, f, "set"]));
|
|
5888
5890
|
if (this.#T(I), this.#M(I, k, v), this.#e[I] = m, v) {
|
|
5889
5891
|
v.set = "replace";
|
|
5890
5892
|
let O = M && this.#t(M) ? M.__staleWhileFetching : M;
|
|
@@ -5892,7 +5894,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5892
5894
|
}
|
|
5893
5895
|
} else v && (v.set = "update");
|
|
5894
5896
|
}
|
|
5895
|
-
if (
|
|
5897
|
+
if (_ !== 0 && !this.#d && this.#L(), this.#d && (E || this.#N(I, _, g), v && this.#x(v, I)), !S && this.#c && this.#o) {
|
|
5896
5898
|
let M = this.#o, O;
|
|
5897
5899
|
for (; O = M?.shift(); ) this.#m?.(...O);
|
|
5898
5900
|
}
|
|
@@ -5914,47 +5916,47 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5914
5916
|
}
|
|
5915
5917
|
}
|
|
5916
5918
|
#R(f) {
|
|
5917
|
-
let m = this.#a, b = this.#r[m],
|
|
5918
|
-
return this.#A && this.#t(
|
|
5919
|
+
let m = this.#a, b = this.#r[m], _ = this.#e[m];
|
|
5920
|
+
return this.#A && this.#t(_) ? _.__abortController.abort(new Error("evicted")) : (this.#_ || this.#c) && (this.#_ && this.#g?.(_, b, "evict"), this.#c && this.#o?.push([_, b, "evict"])), this.#T(m), f && (this.#r[m] = void 0, this.#e[m] = void 0, this.#y.push(m)), this.#i === 1 ? (this.#a = this.#s = 0, this.#y.length = 0) : this.#a = this.#u[m], this.#n.delete(b), this.#i--, m;
|
|
5919
5921
|
}
|
|
5920
5922
|
has(f, m = {}) {
|
|
5921
|
-
let { updateAgeOnHas: b = this.updateAgeOnHas, status:
|
|
5923
|
+
let { updateAgeOnHas: b = this.updateAgeOnHas, status: _ } = m, g = this.#n.get(f);
|
|
5922
5924
|
if (g !== void 0) {
|
|
5923
|
-
let
|
|
5924
|
-
if (this.#t(
|
|
5925
|
-
if (this.#p(g))
|
|
5926
|
-
else return b && this.#I(g),
|
|
5927
|
-
} else
|
|
5925
|
+
let S = this.#e[g];
|
|
5926
|
+
if (this.#t(S) && S.__staleWhileFetching === void 0) return !1;
|
|
5927
|
+
if (this.#p(g)) _ && (_.has = "stale", this.#x(_, g));
|
|
5928
|
+
else return b && this.#I(g), _ && (_.has = "hit", this.#x(_, g)), !0;
|
|
5929
|
+
} else _ && (_.has = "miss");
|
|
5928
5930
|
return !1;
|
|
5929
5931
|
}
|
|
5930
5932
|
peek(f, m = {}) {
|
|
5931
|
-
let { allowStale: b = this.allowStale } = m,
|
|
5932
|
-
if (
|
|
5933
|
-
let g = this.#e[
|
|
5933
|
+
let { allowStale: b = this.allowStale } = m, _ = this.#n.get(f);
|
|
5934
|
+
if (_ === void 0 || !b && this.#p(_)) return;
|
|
5935
|
+
let g = this.#e[_];
|
|
5934
5936
|
return this.#t(g) ? g.__staleWhileFetching : g;
|
|
5935
5937
|
}
|
|
5936
|
-
#j(f, m, b,
|
|
5938
|
+
#j(f, m, b, _) {
|
|
5937
5939
|
let g = m === void 0 ? void 0 : this.#e[m];
|
|
5938
5940
|
if (this.#t(g)) return g;
|
|
5939
|
-
let
|
|
5940
|
-
x?.addEventListener("abort", () =>
|
|
5941
|
-
let v = { signal:
|
|
5942
|
-
let { aborted: D } =
|
|
5943
|
-
if (b.status && (D && !W ? (b.status.fetchAborted = !0, b.status.fetchError =
|
|
5941
|
+
let S = new r(), { signal: x } = b;
|
|
5942
|
+
x?.addEventListener("abort", () => S.abort(x.reason), { signal: S.signal });
|
|
5943
|
+
let v = { signal: S.signal, options: b, context: _ }, E = (T, W = !1) => {
|
|
5944
|
+
let { aborted: D } = S.signal, N = b.ignoreFetchAbort && T !== void 0;
|
|
5945
|
+
if (b.status && (D && !W ? (b.status.fetchAborted = !0, b.status.fetchError = S.signal.reason, N && (b.status.fetchAbortIgnored = !0)) : b.status.fetchResolved = !0), D && !N && !W) return I(S.signal.reason);
|
|
5944
5946
|
let ae = O;
|
|
5945
5947
|
return this.#e[m] === O && (T === void 0 ? ae.__staleWhileFetching ? this.#e[m] = ae.__staleWhileFetching : this.#E(f, "fetch") : (b.status && (b.status.fetchUpdated = !0), this.set(f, T, v.options))), T;
|
|
5946
5948
|
}, k = (T) => (b.status && (b.status.fetchRejected = !0, b.status.fetchError = T), I(T)), I = (T) => {
|
|
5947
|
-
let { aborted: W } =
|
|
5949
|
+
let { aborted: W } = S.signal, D = W && b.allowStaleOnFetchAbort, N = D || b.allowStaleOnFetchRejection, ae = N || b.noDeleteOnFetchRejection, Y = O;
|
|
5948
5950
|
if (this.#e[m] === O && (!ae || Y.__staleWhileFetching === void 0 ? this.#E(f, "fetch") : D || (this.#e[m] = Y.__staleWhileFetching)), N) return b.status && Y.__staleWhileFetching !== void 0 && (b.status.returnedStale = !0), Y.__staleWhileFetching;
|
|
5949
5951
|
if (Y.__returned === Y) throw T;
|
|
5950
5952
|
}, M = (T, W) => {
|
|
5951
5953
|
let D = this.#O?.(f, g, v);
|
|
5952
|
-
D && D instanceof Promise && D.then((N) => T(N === void 0 ? void 0 : N), W),
|
|
5954
|
+
D && D instanceof Promise && D.then((N) => T(N === void 0 ? void 0 : N), W), S.signal.addEventListener("abort", () => {
|
|
5953
5955
|
(!b.ignoreFetchAbort || b.allowStaleOnFetchAbort) && (T(void 0), b.allowStaleOnFetchAbort && (T = (N) => E(N, !0)));
|
|
5954
5956
|
});
|
|
5955
5957
|
};
|
|
5956
5958
|
b.status && (b.status.fetchDispatched = !0);
|
|
5957
|
-
let O = new Promise(M).then(E, k), B = Object.assign(O, { __abortController:
|
|
5959
|
+
let O = new Promise(M).then(E, k), B = Object.assign(O, { __abortController: S, __staleWhileFetching: g, __returned: void 0 });
|
|
5958
5960
|
return m === void 0 ? (this.set(f, B, { ...v.options, status: void 0 }), m = this.#n.get(f)) : this.#e[m] = B, B;
|
|
5959
5961
|
}
|
|
5960
5962
|
#t(f) {
|
|
@@ -5963,9 +5965,9 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5963
5965
|
return !!m && m instanceof Promise && m.hasOwnProperty("__staleWhileFetching") && m.__abortController instanceof r;
|
|
5964
5966
|
}
|
|
5965
5967
|
async fetch(f, m = {}) {
|
|
5966
|
-
let { allowStale: b = this.allowStale, updateAgeOnGet:
|
|
5967
|
-
if (!this.#A) return D && (D.fetch = "get"), this.get(f, { allowStale: b, updateAgeOnGet:
|
|
5968
|
-
let ae = { allowStale: b, updateAgeOnGet:
|
|
5968
|
+
let { allowStale: b = this.allowStale, updateAgeOnGet: _ = this.updateAgeOnGet, noDeleteOnStaleGet: g = this.noDeleteOnStaleGet, ttl: S = this.ttl, noDisposeOnSet: x = this.noDisposeOnSet, size: v = 0, sizeCalculation: E = this.sizeCalculation, noUpdateTTL: k = this.noUpdateTTL, noDeleteOnFetchRejection: I = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: M = this.allowStaleOnFetchRejection, ignoreFetchAbort: O = this.ignoreFetchAbort, allowStaleOnFetchAbort: B = this.allowStaleOnFetchAbort, context: T, forceRefresh: W = !1, status: D, signal: N } = m;
|
|
5969
|
+
if (!this.#A) return D && (D.fetch = "get"), this.get(f, { allowStale: b, updateAgeOnGet: _, noDeleteOnStaleGet: g, status: D });
|
|
5970
|
+
let ae = { allowStale: b, updateAgeOnGet: _, noDeleteOnStaleGet: g, ttl: S, noDisposeOnSet: x, size: v, sizeCalculation: E, noUpdateTTL: k, noDeleteOnFetchRejection: I, allowStaleOnFetchRejection: M, allowStaleOnFetchAbort: B, ignoreFetchAbort: O, status: D, signal: N }, Y = this.#n.get(f);
|
|
5969
5971
|
if (Y === void 0) {
|
|
5970
5972
|
D && (D.fetch = "miss");
|
|
5971
5973
|
let K = this.#j(f, Y, ae, T);
|
|
@@ -5977,7 +5979,7 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5977
5979
|
return D && (D.fetch = "inflight", P && (D.returnedStale = !0)), P ? K.__staleWhileFetching : K.__returned = K;
|
|
5978
5980
|
}
|
|
5979
5981
|
let re = this.#p(Y);
|
|
5980
|
-
if (!W && !re) return D && (D.fetch = "hit"), this.#C(Y),
|
|
5982
|
+
if (!W && !re) return D && (D.fetch = "hit"), this.#C(Y), _ && this.#I(Y), D && this.#x(D, Y), K;
|
|
5981
5983
|
let F = this.#j(f, Y, ae, T), Z = F.__staleWhileFetching !== void 0 && b;
|
|
5982
5984
|
return D && (D.fetch = re ? "stale" : "refresh", Z && re && (D.returnedStale = !0)), Z ? F.__staleWhileFetching : F.__returned = F;
|
|
5983
5985
|
}
|
|
@@ -5990,17 +5992,17 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
5990
5992
|
memo(f, m = {}) {
|
|
5991
5993
|
let b = this.#P;
|
|
5992
5994
|
if (!b) throw new Error("no memoMethod provided to constructor");
|
|
5993
|
-
let { context:
|
|
5995
|
+
let { context: _, forceRefresh: g, ...S } = m, x = this.get(f, S);
|
|
5994
5996
|
if (!g && x !== void 0) return x;
|
|
5995
|
-
let v = b(f, x, { options:
|
|
5996
|
-
return this.set(f, v,
|
|
5997
|
+
let v = b(f, x, { options: S, context: _ });
|
|
5998
|
+
return this.set(f, v, S), v;
|
|
5997
5999
|
}
|
|
5998
6000
|
get(f, m = {}) {
|
|
5999
|
-
let { allowStale: b = this.allowStale, updateAgeOnGet:
|
|
6001
|
+
let { allowStale: b = this.allowStale, updateAgeOnGet: _ = this.updateAgeOnGet, noDeleteOnStaleGet: g = this.noDeleteOnStaleGet, status: S } = m, x = this.#n.get(f);
|
|
6000
6002
|
if (x !== void 0) {
|
|
6001
6003
|
let v = this.#e[x], E = this.#t(v);
|
|
6002
|
-
return
|
|
6003
|
-
} else
|
|
6004
|
+
return S && this.#x(S, x), this.#p(x) ? (S && (S.get = "stale"), E ? (S && b && v.__staleWhileFetching !== void 0 && (S.returnedStale = !0), b ? v.__staleWhileFetching : void 0) : (g || this.#E(f, "expire"), S && b && (S.returnedStale = !0), b ? v : void 0)) : (S && (S.get = "hit"), E ? v.__staleWhileFetching : (this.#C(x), _ && this.#I(x), v));
|
|
6005
|
+
} else S && (S.get = "miss");
|
|
6004
6006
|
}
|
|
6005
6007
|
#D(f, m) {
|
|
6006
6008
|
this.#f[m] = f, this.#u[f] = m;
|
|
@@ -6014,25 +6016,25 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
6014
6016
|
#E(f, m) {
|
|
6015
6017
|
let b = !1;
|
|
6016
6018
|
if (this.#i !== 0) {
|
|
6017
|
-
let
|
|
6018
|
-
if (
|
|
6019
|
+
let _ = this.#n.get(f);
|
|
6020
|
+
if (_ !== void 0) if (b = !0, this.#i === 1) this.#F(m);
|
|
6019
6021
|
else {
|
|
6020
|
-
this.#T(
|
|
6021
|
-
let g = this.#e[
|
|
6022
|
-
if (this.#t(g) ? g.__abortController.abort(new Error("deleted")) : (this.#_ || this.#c) && (this.#_ && this.#g?.(g, f, m), this.#c && this.#o?.push([g, f, m])), this.#n.delete(f), this.#r[
|
|
6023
|
-
else if (
|
|
6022
|
+
this.#T(_);
|
|
6023
|
+
let g = this.#e[_];
|
|
6024
|
+
if (this.#t(g) ? g.__abortController.abort(new Error("deleted")) : (this.#_ || this.#c) && (this.#_ && this.#g?.(g, f, m), this.#c && this.#o?.push([g, f, m])), this.#n.delete(f), this.#r[_] = void 0, this.#e[_] = void 0, _ === this.#s) this.#s = this.#f[_];
|
|
6025
|
+
else if (_ === this.#a) this.#a = this.#u[_];
|
|
6024
6026
|
else {
|
|
6025
|
-
let
|
|
6026
|
-
this.#u[
|
|
6027
|
-
let x = this.#u[
|
|
6028
|
-
this.#f[x] = this.#f[
|
|
6027
|
+
let S = this.#f[_];
|
|
6028
|
+
this.#u[S] = this.#u[_];
|
|
6029
|
+
let x = this.#u[_];
|
|
6030
|
+
this.#f[x] = this.#f[_];
|
|
6029
6031
|
}
|
|
6030
|
-
this.#i--, this.#y.push(
|
|
6032
|
+
this.#i--, this.#y.push(_);
|
|
6031
6033
|
}
|
|
6032
6034
|
}
|
|
6033
6035
|
if (this.#c && this.#o?.length) {
|
|
6034
|
-
let
|
|
6035
|
-
for (; g =
|
|
6036
|
+
let _ = this.#o, g;
|
|
6037
|
+
for (; g = _?.shift(); ) this.#m?.(...g);
|
|
6036
6038
|
}
|
|
6037
6039
|
return b;
|
|
6038
6040
|
}
|
|
@@ -6044,8 +6046,8 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
6044
6046
|
let b = this.#e[m];
|
|
6045
6047
|
if (this.#t(b)) b.__abortController.abort(new Error("deleted"));
|
|
6046
6048
|
else {
|
|
6047
|
-
let
|
|
6048
|
-
this.#_ && this.#g?.(b,
|
|
6049
|
+
let _ = this.#r[m];
|
|
6050
|
+
this.#_ && this.#g?.(b, _, f), this.#c && this.#o?.push([b, _, f]);
|
|
6049
6051
|
}
|
|
6050
6052
|
}
|
|
6051
6053
|
if (this.#n.clear(), this.#e.fill(void 0), this.#r.fill(void 0), this.#d && this.#w && (this.#d.fill(0), this.#w.fill(0)), this.#v && this.#v.fill(0), this.#a = 0, this.#s = 0, this.#y.length = 0, this.#b = 0, this.#i = 0, this.#c && this.#o) {
|
|
@@ -6922,11 +6924,11 @@ var Ht, ei, Ot, Bo, Do, Fo, $o, Wo, qo, Et = He(() => {
|
|
|
6922
6924
|
f.l = o;
|
|
6923
6925
|
return;
|
|
6924
6926
|
} else if (m > 0) {
|
|
6925
|
-
let b = f.L(),
|
|
6926
|
-
if (
|
|
6927
|
+
let b = f.L(), _ = this.v(b.u, i);
|
|
6928
|
+
if (_ === 0) {
|
|
6927
6929
|
b.l = o;
|
|
6928
6930
|
return;
|
|
6929
|
-
} else
|
|
6931
|
+
} else _ < 0 && (a = new this.re(i, o), b.W === void 0 ? (b.W = a, a.tt = b) : (f.U = a, a.tt = f));
|
|
6930
6932
|
}
|
|
6931
6933
|
}
|
|
6932
6934
|
}
|
|
@@ -7819,15 +7821,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7819
7821
|
};
|
|
7820
7822
|
}, r = Number.MAX_SAFE_INTEGER === void 0 ? 9007199254740991 : Number.MAX_SAFE_INTEGER, i = 536870912, o = i * 2, s = function(y, f) {
|
|
7821
7823
|
return function(m) {
|
|
7822
|
-
var b = f.get(m),
|
|
7823
|
-
if (!m.has(
|
|
7824
|
+
var b = f.get(m), _ = b === void 0 ? m.size : b < o ? b + 1 : 0;
|
|
7825
|
+
if (!m.has(_)) return y(m, _);
|
|
7824
7826
|
if (m.size < i) {
|
|
7825
|
-
for (; m.has(
|
|
7826
|
-
return y(m,
|
|
7827
|
+
for (; m.has(_); ) _ = Math.floor(Math.random() * o);
|
|
7828
|
+
return y(m, _);
|
|
7827
7829
|
}
|
|
7828
7830
|
if (m.size > r) throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");
|
|
7829
|
-
for (; m.has(
|
|
7830
|
-
return y(m,
|
|
7831
|
+
for (; m.has(_); ) _ = Math.floor(Math.random() * r);
|
|
7832
|
+
return y(m, _);
|
|
7831
7833
|
};
|
|
7832
7834
|
}, a = /* @__PURE__ */ new WeakMap(), c = l(a), d = s(c, a), p = n(d);
|
|
7833
7835
|
t.addUniqueNumber = p, t.generateUniqueNumber = d;
|
|
@@ -7888,7 +7890,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7888
7890
|
var t = va();
|
|
7889
7891
|
function n() {
|
|
7890
7892
|
var l, r, i = typeof Symbol == "function" ? Symbol : {}, o = i.iterator || "@@iterator", s = i.toStringTag || "@@toStringTag";
|
|
7891
|
-
function a(
|
|
7893
|
+
function a(_, g, S, x) {
|
|
7892
7894
|
var v = g && g.prototype instanceof d ? g : d, E = Object.create(v.prototype);
|
|
7893
7895
|
return t(E, "_invoke", (function(k, I, M) {
|
|
7894
7896
|
var O, B, T, W = 0, D = M || [], N = !1, ae = { p: 0, n: 0, v: l, a: Y, f: Y.bind(l, 4), d: function(K, re) {
|
|
@@ -7923,7 +7925,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7923
7925
|
}
|
|
7924
7926
|
return { value: r, done: N };
|
|
7925
7927
|
};
|
|
7926
|
-
})(
|
|
7928
|
+
})(_, S, x), !0), E;
|
|
7927
7929
|
}
|
|
7928
7930
|
var c = {};
|
|
7929
7931
|
function d() {
|
|
@@ -7936,8 +7938,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7936
7938
|
var f = [][o] ? r(r([][o]())) : (t(r = {}, o, function() {
|
|
7937
7939
|
return this;
|
|
7938
7940
|
}), r), m = y.prototype = d.prototype = Object.create(f);
|
|
7939
|
-
function b(
|
|
7940
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
7941
|
+
function b(_) {
|
|
7942
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(_, y) : (_.__proto__ = y, t(_, s, "GeneratorFunction")), _.prototype = Object.create(m), _;
|
|
7941
7943
|
}
|
|
7942
7944
|
return p.prototype = y, t(m, "constructor", y), t(y, "constructor", p), p.displayName = "GeneratorFunction", t(y, s, "GeneratorFunction"), t(m), t(m, s, "Generator"), t(m, o, function() {
|
|
7943
7945
|
return this;
|
|
@@ -8030,45 +8032,45 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8030
8032
|
function a() {
|
|
8031
8033
|
var c = n(), d = c.m(a), p = (Object.getPrototypeOf ? Object.getPrototypeOf(d) : d.__proto__).constructor;
|
|
8032
8034
|
function y(b) {
|
|
8033
|
-
var
|
|
8034
|
-
return !!
|
|
8035
|
+
var _ = typeof b == "function" && b.constructor;
|
|
8036
|
+
return !!_ && (_ === p || (_.displayName || _.name) === "GeneratorFunction");
|
|
8035
8037
|
}
|
|
8036
8038
|
var f = { throw: 1, return: 2, break: 3, continue: 3 };
|
|
8037
8039
|
function m(b) {
|
|
8038
|
-
var
|
|
8039
|
-
return function(
|
|
8040
|
-
|
|
8041
|
-
return g(
|
|
8040
|
+
var _, g;
|
|
8041
|
+
return function(S) {
|
|
8042
|
+
_ || (_ = { stop: function() {
|
|
8043
|
+
return g(S.a, 2);
|
|
8042
8044
|
}, catch: function() {
|
|
8043
|
-
return
|
|
8045
|
+
return S.v;
|
|
8044
8046
|
}, abrupt: function(x, v) {
|
|
8045
|
-
return g(
|
|
8047
|
+
return g(S.a, f[x], v);
|
|
8046
8048
|
}, delegateYield: function(x, v, E) {
|
|
8047
|
-
return
|
|
8049
|
+
return _.resultName = v, g(S.d, s(x), E);
|
|
8048
8050
|
}, finish: function(x) {
|
|
8049
|
-
return g(
|
|
8051
|
+
return g(S.f, x);
|
|
8050
8052
|
} }, g = function(x, v, E) {
|
|
8051
|
-
|
|
8053
|
+
S.p = _.prev, S.n = _.next;
|
|
8052
8054
|
try {
|
|
8053
8055
|
return x(v, E);
|
|
8054
8056
|
} finally {
|
|
8055
|
-
|
|
8057
|
+
_.next = S.n;
|
|
8056
8058
|
}
|
|
8057
|
-
}),
|
|
8059
|
+
}), _.resultName && (_[_.resultName] = S.v, _.resultName = void 0), _.sent = S.v, _.next = S.n;
|
|
8058
8060
|
try {
|
|
8059
|
-
return b.call(this,
|
|
8061
|
+
return b.call(this, _);
|
|
8060
8062
|
} finally {
|
|
8061
|
-
|
|
8063
|
+
S.p = _.prev, S.n = _.next;
|
|
8062
8064
|
}
|
|
8063
8065
|
};
|
|
8064
8066
|
}
|
|
8065
8067
|
return (e.exports = a = function() {
|
|
8066
|
-
return { wrap: function(b,
|
|
8067
|
-
return c.w(m(b),
|
|
8068
|
-
}, isGeneratorFunction: y, mark: c.m, awrap: function(b,
|
|
8069
|
-
return new t(b,
|
|
8070
|
-
}, AsyncIterator: i, async: function(b,
|
|
8071
|
-
return (y(
|
|
8068
|
+
return { wrap: function(b, _, g, S) {
|
|
8069
|
+
return c.w(m(b), _, g, S && S.reverse());
|
|
8070
|
+
}, isGeneratorFunction: y, mark: c.m, awrap: function(b, _) {
|
|
8071
|
+
return new t(b, _);
|
|
8072
|
+
}, AsyncIterator: i, async: function(b, _, g, S, x) {
|
|
8073
|
+
return (y(_) ? r : l)(m(b), _, g, S, x);
|
|
8072
8074
|
}, keys: o, values: s };
|
|
8073
8075
|
}, e.exports.__esModule = !0, e.exports.default = e.exports)();
|
|
8074
8076
|
}
|
|
@@ -8089,20 +8091,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8089
8091
|
var s = function(g) {
|
|
8090
8092
|
return typeof g.start == "function";
|
|
8091
8093
|
}, a = /* @__PURE__ */ new WeakMap();
|
|
8092
|
-
function c(g,
|
|
8094
|
+
function c(g, S) {
|
|
8093
8095
|
var x = Object.keys(g);
|
|
8094
8096
|
if (Object.getOwnPropertySymbols) {
|
|
8095
8097
|
var v = Object.getOwnPropertySymbols(g);
|
|
8096
|
-
|
|
8098
|
+
S && (v = v.filter(function(E) {
|
|
8097
8099
|
return Object.getOwnPropertyDescriptor(g, E).enumerable;
|
|
8098
8100
|
})), x.push.apply(x, v);
|
|
8099
8101
|
}
|
|
8100
8102
|
return x;
|
|
8101
8103
|
}
|
|
8102
8104
|
function d(g) {
|
|
8103
|
-
for (var
|
|
8104
|
-
var x = arguments[
|
|
8105
|
-
|
|
8105
|
+
for (var S = 1; S < arguments.length; S++) {
|
|
8106
|
+
var x = arguments[S] != null ? arguments[S] : {};
|
|
8107
|
+
S % 2 ? c(Object(x), !0).forEach(function(v) {
|
|
8106
8108
|
n(g, v, x[v]);
|
|
8107
8109
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(g, Object.getOwnPropertyDescriptors(x)) : c(Object(x)).forEach(function(v) {
|
|
8108
8110
|
Object.defineProperty(g, v, Object.getOwnPropertyDescriptor(x, v));
|
|
@@ -8111,8 +8113,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8111
8113
|
return g;
|
|
8112
8114
|
}
|
|
8113
8115
|
var p = function(g) {
|
|
8114
|
-
return d(d({}, g), {}, { connect: function(
|
|
8115
|
-
var x =
|
|
8116
|
+
return d(d({}, g), {}, { connect: function(S) {
|
|
8117
|
+
var x = S.call;
|
|
8116
8118
|
return i(o.mark(function v() {
|
|
8117
8119
|
var E, k, I, M;
|
|
8118
8120
|
return o.wrap(function(O) {
|
|
@@ -8127,8 +8129,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8127
8129
|
}
|
|
8128
8130
|
}, v);
|
|
8129
8131
|
}));
|
|
8130
|
-
}, disconnect: function(
|
|
8131
|
-
var x =
|
|
8132
|
+
}, disconnect: function(S) {
|
|
8133
|
+
var x = S.call;
|
|
8132
8134
|
return (function() {
|
|
8133
8135
|
var v = i(o.mark(function E(k) {
|
|
8134
8136
|
var I;
|
|
@@ -8152,27 +8154,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8152
8154
|
return v.apply(this, arguments);
|
|
8153
8155
|
};
|
|
8154
8156
|
})();
|
|
8155
|
-
}, isSupported: function(
|
|
8156
|
-
var x =
|
|
8157
|
+
}, isSupported: function(S) {
|
|
8158
|
+
var x = S.call;
|
|
8157
8159
|
return function() {
|
|
8158
8160
|
return x("isSupported");
|
|
8159
8161
|
};
|
|
8160
8162
|
} });
|
|
8161
8163
|
};
|
|
8162
|
-
function y(g,
|
|
8164
|
+
function y(g, S) {
|
|
8163
8165
|
var x = Object.keys(g);
|
|
8164
8166
|
if (Object.getOwnPropertySymbols) {
|
|
8165
8167
|
var v = Object.getOwnPropertySymbols(g);
|
|
8166
|
-
|
|
8168
|
+
S && (v = v.filter(function(E) {
|
|
8167
8169
|
return Object.getOwnPropertyDescriptor(g, E).enumerable;
|
|
8168
8170
|
})), x.push.apply(x, v);
|
|
8169
8171
|
}
|
|
8170
8172
|
return x;
|
|
8171
8173
|
}
|
|
8172
8174
|
function f(g) {
|
|
8173
|
-
for (var
|
|
8174
|
-
var x = arguments[
|
|
8175
|
-
|
|
8175
|
+
for (var S = 1; S < arguments.length; S++) {
|
|
8176
|
+
var x = arguments[S] != null ? arguments[S] : {};
|
|
8177
|
+
S % 2 ? y(Object(x), !0).forEach(function(v) {
|
|
8176
8178
|
n(g, v, x[v]);
|
|
8177
8179
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(g, Object.getOwnPropertyDescriptors(x)) : y(Object(x)).forEach(function(v) {
|
|
8178
8180
|
Object.defineProperty(g, v, Object.getOwnPropertyDescriptor(x, v));
|
|
@@ -8182,10 +8184,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8182
8184
|
}
|
|
8183
8185
|
var m = /* @__PURE__ */ new WeakMap(), b = function(g) {
|
|
8184
8186
|
if (m.has(g)) return m.get(g);
|
|
8185
|
-
var
|
|
8186
|
-
return m.set(g,
|
|
8187
|
-
},
|
|
8188
|
-
var
|
|
8187
|
+
var S = /* @__PURE__ */ new Map();
|
|
8188
|
+
return m.set(g, S), S;
|
|
8189
|
+
}, _ = function(g) {
|
|
8190
|
+
var S = p(g);
|
|
8189
8191
|
return function(x) {
|
|
8190
8192
|
var v = b(x);
|
|
8191
8193
|
x.addEventListener("message", function(D) {
|
|
@@ -8204,14 +8206,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8204
8206
|
}, k = function(D, N) {
|
|
8205
8207
|
var ae = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
8206
8208
|
x.postMessage({ id: null, method: D, params: N }, ae);
|
|
8207
|
-
}, I = {}, M = 0, O = Object.entries(
|
|
8209
|
+
}, I = {}, M = 0, O = Object.entries(S); M < O.length; M++) {
|
|
8208
8210
|
var B = l(O[M], 2), T = B[0], W = B[1];
|
|
8209
8211
|
I = f(f({}, I), {}, n({}, T, W({ call: E, notify: k })));
|
|
8210
8212
|
}
|
|
8211
8213
|
return f({}, I);
|
|
8212
8214
|
};
|
|
8213
8215
|
};
|
|
8214
|
-
t.createBroker =
|
|
8216
|
+
t.createBroker = _;
|
|
8215
8217
|
});
|
|
8216
8218
|
}), ju = pe((u, e) => {
|
|
8217
8219
|
le(), ce(), ue(), (function(t, n) {
|
|
@@ -8235,26 +8237,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8235
8237
|
var d = c.call;
|
|
8236
8238
|
return function(p) {
|
|
8237
8239
|
for (var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, f = arguments.length, m = new Array(f > 2 ? f - 2 : 0), b = 2; b < f; b++) m[b - 2] = arguments[b];
|
|
8238
|
-
var
|
|
8239
|
-
i.set(g,
|
|
8240
|
-
var
|
|
8240
|
+
var _ = /* @__PURE__ */ Symbol(), g = r.generateUniqueNumber(i);
|
|
8241
|
+
i.set(g, _);
|
|
8242
|
+
var S = function() {
|
|
8241
8243
|
return d("set", { delay: y, now: performance.timeOrigin + performance.now(), timerId: g, timerType: "interval" }).then(function() {
|
|
8242
8244
|
var x = i.get(g);
|
|
8243
8245
|
if (x === void 0) throw new Error("The timer is in an undefined state.");
|
|
8244
|
-
x ===
|
|
8246
|
+
x === _ && (p.apply(void 0, m), i.get(g) === _ && S());
|
|
8245
8247
|
});
|
|
8246
8248
|
};
|
|
8247
|
-
return
|
|
8249
|
+
return S(), g;
|
|
8248
8250
|
};
|
|
8249
8251
|
}, setTimeout: function(c) {
|
|
8250
8252
|
var d = c.call;
|
|
8251
8253
|
return function(p) {
|
|
8252
8254
|
for (var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, f = arguments.length, m = new Array(f > 2 ? f - 2 : 0), b = 2; b < f; b++) m[b - 2] = arguments[b];
|
|
8253
|
-
var
|
|
8254
|
-
return o.set(g,
|
|
8255
|
-
var
|
|
8256
|
-
if (
|
|
8257
|
-
|
|
8255
|
+
var _ = /* @__PURE__ */ Symbol(), g = r.generateUniqueNumber(o);
|
|
8256
|
+
return o.set(g, _), d("set", { delay: y, now: performance.timeOrigin + performance.now(), timerId: g, timerType: "timeout" }).then(function() {
|
|
8257
|
+
var S = o.get(g);
|
|
8258
|
+
if (S === void 0) throw new Error("The timer is in an undefined state.");
|
|
8259
|
+
S === _ && (o.delete(g), p.apply(void 0, m));
|
|
8258
8260
|
}), g;
|
|
8259
8261
|
};
|
|
8260
8262
|
} }), a = function(c) {
|
|
@@ -8413,12 +8415,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8413
8415
|
return v && v.__esModule ? v : { default: v };
|
|
8414
8416
|
};
|
|
8415
8417
|
Object.defineProperty(u, "__esModule", { value: !0 });
|
|
8416
|
-
var r = l(Kl()), i = At(), o = l(Gl()), s = l(at()), a = n(Xo()), c = l(Zo()), d = l(gu()), p = l(ma()), y = l(mu()), f = Nt(), m = bu(), b = l(ka()),
|
|
8418
|
+
var r = l(Kl()), i = At(), o = l(Gl()), s = l(at()), a = n(Xo()), c = l(Zo()), d = l(gu()), p = l(ma()), y = l(mu()), f = Nt(), m = bu(), b = l(ka()), _ = n(Nr()), g = globalThis.setImmediate || ((...v) => {
|
|
8417
8419
|
let E = v.shift();
|
|
8418
8420
|
(0, f.nextTick)(() => {
|
|
8419
8421
|
E(...v);
|
|
8420
8422
|
});
|
|
8421
|
-
}),
|
|
8423
|
+
}), S = { keepalive: 60, reschedulePings: !0, protocolId: "MQTT", protocolVersion: 4, reconnectPeriod: 1e3, connectTimeout: 30 * 1e3, clean: !0, resubscribe: !0, subscribeBatchSize: null, writeCache: !0, timerVariant: "auto" }, x = class ni extends m.TypedEventEmitter {
|
|
8422
8424
|
static VERSION = f.MQTTJS_VERSION;
|
|
8423
8425
|
connected;
|
|
8424
8426
|
disconnecting;
|
|
@@ -8454,8 +8456,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8454
8456
|
}
|
|
8455
8457
|
constructor(E, k) {
|
|
8456
8458
|
super(), this.options = k || {};
|
|
8457
|
-
for (let I in
|
|
8458
|
-
this.log = this.options.log || (0, s.default)("mqttjs:client"), this.noop = this._noop.bind(this), this.log("MqttClient :: version:", ni.VERSION),
|
|
8459
|
+
for (let I in S) typeof this.options[I] > "u" ? this.options[I] = S[I] : this.options[I] = k[I];
|
|
8460
|
+
this.log = this.options.log || (0, s.default)("mqttjs:client"), this.noop = this._noop.bind(this), this.log("MqttClient :: version:", ni.VERSION), _.isWebWorker ? this.log("MqttClient :: environment", "webworker") : this.log("MqttClient :: environment", _.default ? "browser" : "node"), this.log("MqttClient :: options.protocol", k.protocol), this.log("MqttClient :: options.protocolVersion", k.protocolVersion), this.log("MqttClient :: options.username", k.username), this.log("MqttClient :: options.keepalive", k.keepalive), this.log("MqttClient :: options.reconnectPeriod", k.reconnectPeriod), this.log("MqttClient :: options.rejectUnauthorized", k.rejectUnauthorized), this.log("MqttClient :: options.properties.topicAliasMaximum", k.properties ? k.properties.topicAliasMaximum : void 0), this.options.clientId = typeof k.clientId == "string" ? k.clientId : ni.defaultId(), this.log("MqttClient :: clientId", this.options.clientId), this.options.customHandleAcks = k.protocolVersion === 5 && k.customHandleAcks ? k.customHandleAcks : (...I) => {
|
|
8459
8461
|
I[3](null, 0);
|
|
8460
8462
|
}, this.options.writeCache || (r.default.writeToStream.cacheNumbers = !1), this.streamBuilder = E, this.messageIdProvider = typeof this.options.messageIdProvider > "u" ? new p.default() : this.options.messageIdProvider, this.outgoingStore = k.outgoingStore || new c.default(), this.incomingStore = k.incomingStore || new c.default(), this.queueQoSZero = k.queueQoSZero === void 0 ? !0 : k.queueQoSZero, this._resubscribeTopics = {}, this.messageIdToTopic = {}, this.keepaliveManager = null, this.connected = !1, this.disconnecting = !1, this.reconnecting = !1, this.queue = [], this.connackTimer = null, this.reconnectTimer = null, this._storeProcessing = !1, this._packetIdsDuringStoreProcessing = {}, this._storeProcessingQueue = [], this.outgoing = {}, this._firstConnection = !0, k.properties && k.properties.topicAliasMaximum > 0 && (k.properties.topicAliasMaximum > 65535 ? this.log("MqttClient :: options.properties.topicAliasMaximum is out of range") : this.topicAliasRecv = new y.default(k.properties.topicAliasMaximum)), this.on("connect", () => {
|
|
8461
8463
|
let { queue: I } = this, M = () => {
|
|
@@ -8948,7 +8950,7 @@ function Bu() {
|
|
|
8948
8950
|
function b(O) {
|
|
8949
8951
|
throw new RangeError(p[O]);
|
|
8950
8952
|
}
|
|
8951
|
-
function
|
|
8953
|
+
function _(O, B) {
|
|
8952
8954
|
let T = [], W = O.length;
|
|
8953
8955
|
for (; W--; ) T[W] = B(O[W]);
|
|
8954
8956
|
return T;
|
|
@@ -8956,10 +8958,10 @@ function Bu() {
|
|
|
8956
8958
|
function g(O, B) {
|
|
8957
8959
|
let T = O.split("@"), W = "";
|
|
8958
8960
|
T.length > 1 && (W = T[0] + "@", O = T[1]), O = O.replace(d, ".");
|
|
8959
|
-
let D = O.split("."), N =
|
|
8961
|
+
let D = O.split("."), N = _(D, B).join(".");
|
|
8960
8962
|
return W + N;
|
|
8961
8963
|
}
|
|
8962
|
-
function
|
|
8964
|
+
function S(O) {
|
|
8963
8965
|
let B = [], T = 0, W = O.length;
|
|
8964
8966
|
for (; T < W; ) {
|
|
8965
8967
|
let D = O.charCodeAt(T++);
|
|
@@ -8999,7 +9001,7 @@ function Bu() {
|
|
|
8999
9001
|
return String.fromCodePoint(...B);
|
|
9000
9002
|
}, M = function(O) {
|
|
9001
9003
|
let B = [];
|
|
9002
|
-
O =
|
|
9004
|
+
O = S(O);
|
|
9003
9005
|
let T = O.length, W = o, D = 0, N = i;
|
|
9004
9006
|
for (let K of O) K < 128 && B.push(m(K));
|
|
9005
9007
|
let ae = B.length, Y = ae;
|
|
@@ -9022,7 +9024,7 @@ function Bu() {
|
|
|
9022
9024
|
}
|
|
9023
9025
|
return B.join("");
|
|
9024
9026
|
};
|
|
9025
|
-
return sr = { version: "2.3.1", ucs2: { decode:
|
|
9027
|
+
return sr = { version: "2.3.1", ucs2: { decode: S, encode: x }, decode: I, encode: M, toASCII: function(O) {
|
|
9026
9028
|
return g(O, function(B) {
|
|
9027
9029
|
return c.test(B) ? "xn--" + M(B) : B;
|
|
9028
9030
|
});
|
|
@@ -9163,12 +9165,12 @@ function Ut() {
|
|
|
9163
9165
|
}
|
|
9164
9166
|
})() : d, y = Ku()(), f = Vu()(), m = Object.getPrototypeOf || (f ? function(Y) {
|
|
9165
9167
|
return Y.__proto__;
|
|
9166
|
-
} : null), b = {},
|
|
9168
|
+
} : null), b = {}, _ = typeof Uint8Array > "u" || !m ? u : m(Uint8Array), g = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? u : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? u : ArrayBuffer, "%ArrayIteratorPrototype%": y && m ? m([][Symbol.iterator]()) : u, "%AsyncFromSyncIteratorPrototype%": u, "%AsyncFunction%": b, "%AsyncGenerator%": b, "%AsyncGeneratorFunction%": b, "%AsyncIteratorPrototype%": b, "%Atomics%": typeof Atomics > "u" ? u : Atomics, "%BigInt%": typeof BigInt > "u" ? u : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? u : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? u : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? u : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": e, "%eval%": eval, "%EvalError%": t, "%Float32Array%": typeof Float32Array > "u" ? u : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? u : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? u : FinalizationRegistry, "%Function%": s, "%GeneratorFunction%": b, "%Int8Array%": typeof Int8Array > "u" ? u : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? u : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? u : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": y && m ? m(m([][Symbol.iterator]())) : u, "%JSON%": typeof JSON == "object" ? JSON : u, "%Map%": typeof Map > "u" ? u : Map, "%MapIteratorPrototype%": typeof Map > "u" || !y || !m ? u : m((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? u : Promise, "%Proxy%": typeof Proxy > "u" ? u : Proxy, "%RangeError%": n, "%ReferenceError%": l, "%Reflect%": typeof Reflect > "u" ? u : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? u : Set, "%SetIteratorPrototype%": typeof Set > "u" || !y || !m ? u : m((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? u : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": y && m ? m(""[Symbol.iterator]()) : u, "%Symbol%": y ? Symbol : u, "%SyntaxError%": r, "%ThrowTypeError%": p, "%TypedArray%": _, "%TypeError%": i, "%Uint8Array%": typeof Uint8Array > "u" ? u : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? u : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? u : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? u : Uint32Array, "%URIError%": o, "%WeakMap%": typeof WeakMap > "u" ? u : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? u : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? u : WeakSet };
|
|
9167
9169
|
if (m) try {
|
|
9168
9170
|
null.error;
|
|
9169
9171
|
} catch (Y) {
|
|
9170
|
-
var
|
|
9171
|
-
g["%Error.prototype%"] =
|
|
9172
|
+
var S = m(m(Y));
|
|
9173
|
+
g["%Error.prototype%"] = S;
|
|
9172
9174
|
}
|
|
9173
9175
|
var x = function Y(K) {
|
|
9174
9176
|
var re;
|
|
@@ -9467,8 +9469,8 @@ function fc() {
|
|
|
9467
9469
|
} else a > y && (r.charCodeAt(o + m) === 47 ? f = m : m === 0 && (f = 0));
|
|
9468
9470
|
break;
|
|
9469
9471
|
}
|
|
9470
|
-
var b = r.charCodeAt(o + m),
|
|
9471
|
-
if (b !==
|
|
9472
|
+
var b = r.charCodeAt(o + m), _ = i.charCodeAt(c + m);
|
|
9473
|
+
if (b !== _) break;
|
|
9472
9474
|
b === 47 && (f = m);
|
|
9473
9475
|
}
|
|
9474
9476
|
var g = "";
|
|
@@ -9555,7 +9557,7 @@ jt(Ca, { URL: () => Da, Url: () => ja, default: () => Fe, fileURLToPath: () => P
|
|
|
9555
9557
|
function pc() {
|
|
9556
9558
|
if (Ni) return wr;
|
|
9557
9559
|
Ni = !0;
|
|
9558
|
-
var u = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && u ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = u && e && typeof e.get == "function" ? e.get : null, n = u && Map.prototype.forEach, l = typeof Set == "function" && Set.prototype, r = Object.getOwnPropertyDescriptor && l ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, i = l && r && typeof r.get == "function" ? r.get : null, o = l && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, a = s ? WeakMap.prototype.has : null, c = typeof WeakSet == "function" && WeakSet.prototype, d = c ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, y = p ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, m = Object.prototype.toString, b = Function.prototype.toString,
|
|
9560
|
+
var u = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && u ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = u && e && typeof e.get == "function" ? e.get : null, n = u && Map.prototype.forEach, l = typeof Set == "function" && Set.prototype, r = Object.getOwnPropertyDescriptor && l ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, i = l && r && typeof r.get == "function" ? r.get : null, o = l && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, a = s ? WeakMap.prototype.has : null, c = typeof WeakSet == "function" && WeakSet.prototype, d = c ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, y = p ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, m = Object.prototype.toString, b = Function.prototype.toString, _ = String.prototype.match, g = String.prototype.slice, S = String.prototype.replace, x = String.prototype.toUpperCase, v = String.prototype.toLowerCase, E = RegExp.prototype.test, k = Array.prototype.concat, I = Array.prototype.join, M = Array.prototype.slice, O = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, D = typeof Symbol == "function" && typeof Symbol.iterator == "object", N = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === D || !0) ? Symbol.toStringTag : null, ae = Object.prototype.propertyIsEnumerable, Y = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(z) {
|
|
9559
9561
|
return z.__proto__;
|
|
9560
9562
|
} : null);
|
|
9561
9563
|
function K(z, ie) {
|
|
@@ -9565,10 +9567,10 @@ function pc() {
|
|
|
9565
9567
|
var Ae = z < 0 ? -O(-z) : O(z);
|
|
9566
9568
|
if (Ae !== z) {
|
|
9567
9569
|
var Ie = String(Ae), Ce = g.call(ie, Ie.length + 1);
|
|
9568
|
-
return
|
|
9570
|
+
return S.call(Ie, xe, "$&_") + "." + S.call(S.call(Ce, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
9569
9571
|
}
|
|
9570
9572
|
}
|
|
9571
|
-
return
|
|
9573
|
+
return S.call(ie, xe, "$&_");
|
|
9572
9574
|
}
|
|
9573
9575
|
var re = Ra, F = re.custom, Z = G(F) ? F : null;
|
|
9574
9576
|
wr = function z(ie, xe, Ae, Ie) {
|
|
@@ -9610,7 +9612,7 @@ function pc() {
|
|
|
9610
9612
|
return "[Function" + (Jt ? ": " + Jt : " (anonymous)") + "]" + (Tt.length > 0 ? " { " + I.call(Tt, ", ") + " }" : "");
|
|
9611
9613
|
}
|
|
9612
9614
|
if (G(ie)) {
|
|
9613
|
-
var Bt = D ?
|
|
9615
|
+
var Bt = D ? S.call(String(ie), /^(Symbol\(.*\))_[^)]*$/, "$1") : W.call(ie);
|
|
9614
9616
|
return typeof ie == "object" && !D ? h(Bt) : Bt;
|
|
9615
9617
|
}
|
|
9616
9618
|
if (ve(ie)) {
|
|
@@ -9662,7 +9664,7 @@ function pc() {
|
|
|
9662
9664
|
return Ae + z + Ae;
|
|
9663
9665
|
}
|
|
9664
9666
|
function J(z) {
|
|
9665
|
-
return
|
|
9667
|
+
return S.call(String(z), /"/g, """);
|
|
9666
9668
|
}
|
|
9667
9669
|
function be(z) {
|
|
9668
9670
|
return R(z) === "[object Array]" && (!N || !(typeof z == "object" && N in z));
|
|
@@ -9714,7 +9716,7 @@ function pc() {
|
|
|
9714
9716
|
}
|
|
9715
9717
|
function $(z) {
|
|
9716
9718
|
if (z.name) return z.name;
|
|
9717
|
-
var ie =
|
|
9719
|
+
var ie = _.call(b.call(z), /^function\s*([\w$]+)/);
|
|
9718
9720
|
return ie ? ie[1] : null;
|
|
9719
9721
|
}
|
|
9720
9722
|
function ee(z, ie) {
|
|
@@ -9794,7 +9796,7 @@ function pc() {
|
|
|
9794
9796
|
var xe = z.length - ie.maxStringLength, Ae = "... " + xe + " more character" + (xe > 1 ? "s" : "");
|
|
9795
9797
|
return oe(g.call(z, 0, ie.maxStringLength), ie) + Ae;
|
|
9796
9798
|
}
|
|
9797
|
-
var Ie =
|
|
9799
|
+
var Ie = S.call(S.call(z, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Te);
|
|
9798
9800
|
return P(Ie, "single", ie);
|
|
9799
9801
|
}
|
|
9800
9802
|
function Te(z) {
|
|
@@ -9850,37 +9852,37 @@ function pc() {
|
|
|
9850
9852
|
function gc() {
|
|
9851
9853
|
if (Ui) return Sr;
|
|
9852
9854
|
Ui = !0;
|
|
9853
|
-
var u = Ut(), e = ec(), t = pc(), n = Qt(), l = u("%WeakMap%", !0), r = u("%Map%", !0), i = e("WeakMap.prototype.get", !0), o = e("WeakMap.prototype.set", !0), s = e("WeakMap.prototype.has", !0), a = e("Map.prototype.get", !0), c = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), p = function(b,
|
|
9854
|
-
for (var g = b,
|
|
9855
|
-
}, y = function(b,
|
|
9856
|
-
var g = p(b,
|
|
9855
|
+
var u = Ut(), e = ec(), t = pc(), n = Qt(), l = u("%WeakMap%", !0), r = u("%Map%", !0), i = e("WeakMap.prototype.get", !0), o = e("WeakMap.prototype.set", !0), s = e("WeakMap.prototype.has", !0), a = e("Map.prototype.get", !0), c = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), p = function(b, _) {
|
|
9856
|
+
for (var g = b, S; (S = g.next) !== null; g = S) if (S.key === _) return g.next = S.next, S.next = b.next, b.next = S, S;
|
|
9857
|
+
}, y = function(b, _) {
|
|
9858
|
+
var g = p(b, _);
|
|
9857
9859
|
return g && g.value;
|
|
9858
|
-
}, f = function(b,
|
|
9859
|
-
var
|
|
9860
|
-
|
|
9861
|
-
}, m = function(b,
|
|
9862
|
-
return !!p(b,
|
|
9860
|
+
}, f = function(b, _, g) {
|
|
9861
|
+
var S = p(b, _);
|
|
9862
|
+
S ? S.value = g : b.next = { key: _, next: b.next, value: g };
|
|
9863
|
+
}, m = function(b, _) {
|
|
9864
|
+
return !!p(b, _);
|
|
9863
9865
|
};
|
|
9864
9866
|
return Sr = function() {
|
|
9865
|
-
var b,
|
|
9866
|
-
if (!
|
|
9867
|
+
var b, _, g, S = { assert: function(x) {
|
|
9868
|
+
if (!S.has(x)) throw new n("Side channel does not contain " + t(x));
|
|
9867
9869
|
}, get: function(x) {
|
|
9868
9870
|
if (l && x && (typeof x == "object" || typeof x == "function")) {
|
|
9869
9871
|
if (b) return i(b, x);
|
|
9870
9872
|
} else if (r) {
|
|
9871
|
-
if (
|
|
9873
|
+
if (_) return a(_, x);
|
|
9872
9874
|
} else if (g) return y(g, x);
|
|
9873
9875
|
}, has: function(x) {
|
|
9874
9876
|
if (l && x && (typeof x == "object" || typeof x == "function")) {
|
|
9875
9877
|
if (b) return s(b, x);
|
|
9876
9878
|
} else if (r) {
|
|
9877
|
-
if (
|
|
9879
|
+
if (_) return d(_, x);
|
|
9878
9880
|
} else if (g) return m(g, x);
|
|
9879
9881
|
return !1;
|
|
9880
9882
|
}, set: function(x, v) {
|
|
9881
|
-
l && x && (typeof x == "object" || typeof x == "function") ? (b || (b = new l()), o(b, x, v)) : r ? (
|
|
9883
|
+
l && x && (typeof x == "object" || typeof x == "function") ? (b || (b = new l()), o(b, x, v)) : r ? (_ || (_ = new r()), c(_, x, v)) : (g || (g = { key: {}, next: null }), f(g, x, v));
|
|
9882
9884
|
} };
|
|
9883
|
-
return
|
|
9885
|
+
return S;
|
|
9884
9886
|
}, Sr;
|
|
9885
9887
|
}
|
|
9886
9888
|
function rs() {
|
|
@@ -9897,51 +9899,51 @@ function Oa() {
|
|
|
9897
9899
|
if (Di) return Er;
|
|
9898
9900
|
Di = !0;
|
|
9899
9901
|
var u = rs(), e = Object.prototype.hasOwnProperty, t = Array.isArray, n = (function() {
|
|
9900
|
-
for (var b = [],
|
|
9902
|
+
for (var b = [], _ = 0; _ < 256; ++_) b.push("%" + ((_ < 16 ? "0" : "") + _.toString(16)).toUpperCase());
|
|
9901
9903
|
return b;
|
|
9902
9904
|
})(), l = function(b) {
|
|
9903
9905
|
for (; b.length > 1; ) {
|
|
9904
|
-
var
|
|
9906
|
+
var _ = b.pop(), g = _.obj[_.prop];
|
|
9905
9907
|
if (t(g)) {
|
|
9906
|
-
for (var
|
|
9907
|
-
|
|
9908
|
+
for (var S = [], x = 0; x < g.length; ++x) typeof g[x] < "u" && S.push(g[x]);
|
|
9909
|
+
_.obj[_.prop] = S;
|
|
9908
9910
|
}
|
|
9909
9911
|
}
|
|
9910
|
-
}, r = function(b,
|
|
9911
|
-
for (var g =
|
|
9912
|
+
}, r = function(b, _) {
|
|
9913
|
+
for (var g = _ && _.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, S = 0; S < b.length; ++S) typeof b[S] < "u" && (g[S] = b[S]);
|
|
9912
9914
|
return g;
|
|
9913
|
-
}, i = function b(
|
|
9914
|
-
if (!g) return
|
|
9915
|
+
}, i = function b(_, g, S) {
|
|
9916
|
+
if (!g) return _;
|
|
9915
9917
|
if (typeof g != "object") {
|
|
9916
|
-
if (t(
|
|
9917
|
-
else if (
|
|
9918
|
-
else return [
|
|
9919
|
-
return
|
|
9918
|
+
if (t(_)) _.push(g);
|
|
9919
|
+
else if (_ && typeof _ == "object") (S && (S.plainObjects || S.allowPrototypes) || !e.call(Object.prototype, g)) && (_[g] = !0);
|
|
9920
|
+
else return [_, g];
|
|
9921
|
+
return _;
|
|
9920
9922
|
}
|
|
9921
|
-
if (!
|
|
9922
|
-
var x =
|
|
9923
|
-
return t(
|
|
9924
|
-
if (e.call(
|
|
9925
|
-
var k =
|
|
9926
|
-
k && typeof k == "object" && v && typeof v == "object" ?
|
|
9927
|
-
} else
|
|
9928
|
-
}),
|
|
9923
|
+
if (!_ || typeof _ != "object") return [_].concat(g);
|
|
9924
|
+
var x = _;
|
|
9925
|
+
return t(_) && !t(g) && (x = r(_, S)), t(_) && t(g) ? (g.forEach(function(v, E) {
|
|
9926
|
+
if (e.call(_, E)) {
|
|
9927
|
+
var k = _[E];
|
|
9928
|
+
k && typeof k == "object" && v && typeof v == "object" ? _[E] = b(k, v, S) : _.push(v);
|
|
9929
|
+
} else _[E] = v;
|
|
9930
|
+
}), _) : Object.keys(g).reduce(function(v, E) {
|
|
9929
9931
|
var k = g[E];
|
|
9930
|
-
return e.call(v, E) ? v[E] = b(v[E], k,
|
|
9932
|
+
return e.call(v, E) ? v[E] = b(v[E], k, S) : v[E] = k, v;
|
|
9931
9933
|
}, x);
|
|
9932
|
-
}, o = function(b,
|
|
9933
|
-
return Object.keys(
|
|
9934
|
-
return g[
|
|
9934
|
+
}, o = function(b, _) {
|
|
9935
|
+
return Object.keys(_).reduce(function(g, S) {
|
|
9936
|
+
return g[S] = _[S], g;
|
|
9935
9937
|
}, b);
|
|
9936
|
-
}, s = function(b,
|
|
9937
|
-
var
|
|
9938
|
-
if (g === "iso-8859-1") return
|
|
9938
|
+
}, s = function(b, _, g) {
|
|
9939
|
+
var S = b.replace(/\+/g, " ");
|
|
9940
|
+
if (g === "iso-8859-1") return S.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
9939
9941
|
try {
|
|
9940
|
-
return decodeURIComponent(
|
|
9942
|
+
return decodeURIComponent(S);
|
|
9941
9943
|
} catch {
|
|
9942
|
-
return
|
|
9944
|
+
return S;
|
|
9943
9945
|
}
|
|
9944
|
-
}, a = 1024, c = function(b,
|
|
9946
|
+
}, a = 1024, c = function(b, _, g, S, x) {
|
|
9945
9947
|
if (b.length === 0) return b;
|
|
9946
9948
|
var v = b;
|
|
9947
9949
|
if (typeof b == "symbol" ? v = Symbol.prototype.toString.call(b) : typeof b != "string" && (v = String(b)), g === "iso-8859-1") return escape(v).replace(/%u[0-9a-f]{4}/gi, function(T) {
|
|
@@ -9972,23 +9974,23 @@ function Oa() {
|
|
|
9972
9974
|
}
|
|
9973
9975
|
return E;
|
|
9974
9976
|
}, d = function(b) {
|
|
9975
|
-
for (var
|
|
9977
|
+
for (var _ = [{ obj: { o: b }, prop: "o" }], g = [], S = 0; S < _.length; ++S) for (var x = _[S], v = x.obj[x.prop], E = Object.keys(v), k = 0; k < E.length; ++k) {
|
|
9976
9978
|
var I = E[k], M = v[I];
|
|
9977
|
-
typeof M == "object" && M !== null && g.indexOf(M) === -1 && (
|
|
9979
|
+
typeof M == "object" && M !== null && g.indexOf(M) === -1 && (_.push({ obj: v, prop: I }), g.push(M));
|
|
9978
9980
|
}
|
|
9979
|
-
return l(
|
|
9981
|
+
return l(_), b;
|
|
9980
9982
|
}, p = function(b) {
|
|
9981
9983
|
return Object.prototype.toString.call(b) === "[object RegExp]";
|
|
9982
9984
|
}, y = function(b) {
|
|
9983
9985
|
return !b || typeof b != "object" ? !1 : !!(b.constructor && b.constructor.isBuffer && b.constructor.isBuffer(b));
|
|
9984
|
-
}, f = function(b,
|
|
9985
|
-
return [].concat(b,
|
|
9986
|
-
}, m = function(b,
|
|
9986
|
+
}, f = function(b, _) {
|
|
9987
|
+
return [].concat(b, _);
|
|
9988
|
+
}, m = function(b, _) {
|
|
9987
9989
|
if (t(b)) {
|
|
9988
|
-
for (var g = [],
|
|
9990
|
+
for (var g = [], S = 0; S < b.length; S += 1) g.push(_(b[S]));
|
|
9989
9991
|
return g;
|
|
9990
9992
|
}
|
|
9991
|
-
return
|
|
9993
|
+
return _(b);
|
|
9992
9994
|
};
|
|
9993
9995
|
return Er = { arrayToObject: r, assign: o, combine: f, compact: d, decode: s, encode: c, isBuffer: y, isRegExp: p, maybeMap: m, merge: i }, Er;
|
|
9994
9996
|
}
|
|
@@ -10007,7 +10009,7 @@ function mc() {
|
|
|
10007
10009
|
return s.call(m);
|
|
10008
10010
|
}, skipNulls: !1, strictNullHandling: !1 }, d = function(m) {
|
|
10009
10011
|
return typeof m == "string" || typeof m == "number" || typeof m == "boolean" || typeof m == "symbol" || typeof m == "bigint";
|
|
10010
|
-
}, p = {}, y = function m(b,
|
|
10012
|
+
}, p = {}, y = function m(b, _, g, S, x, v, E, k, I, M, O, B, T, W, D, N, ae, Y) {
|
|
10011
10013
|
for (var K = b, re = Y, F = 0, Z = !1; (re = re.get(p)) !== void 0 && !Z; ) {
|
|
10012
10014
|
var P = re.get(b);
|
|
10013
10015
|
if (F += 1, typeof P < "u") {
|
|
@@ -10016,18 +10018,18 @@ function mc() {
|
|
|
10016
10018
|
}
|
|
10017
10019
|
typeof re.get(p) > "u" && (F = 0);
|
|
10018
10020
|
}
|
|
10019
|
-
if (typeof M == "function" ? K = M(
|
|
10021
|
+
if (typeof M == "function" ? K = M(_, K) : K instanceof Date ? K = T(K) : g === "comma" && r(K) && (K = e.maybeMap(K, function(R) {
|
|
10020
10022
|
return R instanceof Date ? T(R) : R;
|
|
10021
10023
|
})), K === null) {
|
|
10022
|
-
if (v) return I && !N ? I(
|
|
10024
|
+
if (v) return I && !N ? I(_, c.encoder, ae, "key", W) : _;
|
|
10023
10025
|
K = "";
|
|
10024
10026
|
}
|
|
10025
10027
|
if (d(K) || e.isBuffer(K)) {
|
|
10026
10028
|
if (I) {
|
|
10027
|
-
var J = N ?
|
|
10029
|
+
var J = N ? _ : I(_, c.encoder, ae, "key", W);
|
|
10028
10030
|
return [D(J) + "=" + D(I(K, c.encoder, ae, "value", W))];
|
|
10029
10031
|
}
|
|
10030
|
-
return [D(
|
|
10032
|
+
return [D(_) + "=" + D(String(K))];
|
|
10031
10033
|
}
|
|
10032
10034
|
var be = [];
|
|
10033
10035
|
if (typeof K > "u") return be;
|
|
@@ -10038,7 +10040,7 @@ function mc() {
|
|
|
10038
10040
|
var we = Object.keys(K);
|
|
10039
10041
|
te = O ? we.sort(O) : we;
|
|
10040
10042
|
}
|
|
10041
|
-
var V = k ?
|
|
10043
|
+
var V = k ? _.replace(/\./g, "%2E") : _, L = S && r(K) && K.length === 1 ? V + "[]" : V;
|
|
10042
10044
|
if (x && r(K) && K.length === 0) return L + "[]";
|
|
10043
10045
|
for (var ne = 0; ne < te.length; ++ne) {
|
|
10044
10046
|
var H = te[ne], G = typeof H == "object" && typeof H.value < "u" ? H.value : K[H];
|
|
@@ -10046,7 +10048,7 @@ function mc() {
|
|
|
10046
10048
|
var Q = B && k ? H.replace(/\./g, "%2E") : H, me = r(K) ? typeof g == "function" ? g(L, Q) : L : L + (B ? "." + Q : "[" + Q + "]");
|
|
10047
10049
|
Y.set(b, F);
|
|
10048
10050
|
var se = u();
|
|
10049
|
-
se.set(p, Y), o(be, m(G, me, g,
|
|
10051
|
+
se.set(p, Y), o(be, m(G, me, g, S, x, v, E, k, g === "comma" && N && r(K) ? null : I, M, O, B, T, W, D, N, ae, se));
|
|
10050
10052
|
}
|
|
10051
10053
|
}
|
|
10052
10054
|
return be;
|
|
@@ -10057,28 +10059,28 @@ function mc() {
|
|
|
10057
10059
|
if (m.encoder !== null && typeof m.encoder < "u" && typeof m.encoder != "function") throw new TypeError("Encoder has to be a function.");
|
|
10058
10060
|
var b = m.charset || c.charset;
|
|
10059
10061
|
if (typeof m.charset < "u" && m.charset !== "utf-8" && m.charset !== "iso-8859-1") throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
10060
|
-
var
|
|
10062
|
+
var _ = t.default;
|
|
10061
10063
|
if (typeof m.format < "u") {
|
|
10062
10064
|
if (!n.call(t.formatters, m.format)) throw new TypeError("Unknown format option provided.");
|
|
10063
|
-
|
|
10065
|
+
_ = m.format;
|
|
10064
10066
|
}
|
|
10065
|
-
var g = t.formatters[
|
|
10066
|
-
(typeof m.filter == "function" || r(m.filter)) && (
|
|
10067
|
+
var g = t.formatters[_], S = c.filter;
|
|
10068
|
+
(typeof m.filter == "function" || r(m.filter)) && (S = m.filter);
|
|
10067
10069
|
var x;
|
|
10068
10070
|
if (m.arrayFormat in l ? x = m.arrayFormat : "indices" in m ? x = m.indices ? "indices" : "repeat" : x = c.arrayFormat, "commaRoundTrip" in m && typeof m.commaRoundTrip != "boolean") throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
10069
10071
|
var v = typeof m.allowDots > "u" ? m.encodeDotInKeys === !0 ? !0 : c.allowDots : !!m.allowDots;
|
|
10070
|
-
return { addQueryPrefix: typeof m.addQueryPrefix == "boolean" ? m.addQueryPrefix : c.addQueryPrefix, allowDots: v, allowEmptyArrays: typeof m.allowEmptyArrays == "boolean" ? !!m.allowEmptyArrays : c.allowEmptyArrays, arrayFormat: x, charset: b, charsetSentinel: typeof m.charsetSentinel == "boolean" ? m.charsetSentinel : c.charsetSentinel, commaRoundTrip: m.commaRoundTrip, delimiter: typeof m.delimiter > "u" ? c.delimiter : m.delimiter, encode: typeof m.encode == "boolean" ? m.encode : c.encode, encodeDotInKeys: typeof m.encodeDotInKeys == "boolean" ? m.encodeDotInKeys : c.encodeDotInKeys, encoder: typeof m.encoder == "function" ? m.encoder : c.encoder, encodeValuesOnly: typeof m.encodeValuesOnly == "boolean" ? m.encodeValuesOnly : c.encodeValuesOnly, filter:
|
|
10072
|
+
return { addQueryPrefix: typeof m.addQueryPrefix == "boolean" ? m.addQueryPrefix : c.addQueryPrefix, allowDots: v, allowEmptyArrays: typeof m.allowEmptyArrays == "boolean" ? !!m.allowEmptyArrays : c.allowEmptyArrays, arrayFormat: x, charset: b, charsetSentinel: typeof m.charsetSentinel == "boolean" ? m.charsetSentinel : c.charsetSentinel, commaRoundTrip: m.commaRoundTrip, delimiter: typeof m.delimiter > "u" ? c.delimiter : m.delimiter, encode: typeof m.encode == "boolean" ? m.encode : c.encode, encodeDotInKeys: typeof m.encodeDotInKeys == "boolean" ? m.encodeDotInKeys : c.encodeDotInKeys, encoder: typeof m.encoder == "function" ? m.encoder : c.encoder, encodeValuesOnly: typeof m.encodeValuesOnly == "boolean" ? m.encodeValuesOnly : c.encodeValuesOnly, filter: S, format: _, formatter: g, serializeDate: typeof m.serializeDate == "function" ? m.serializeDate : c.serializeDate, skipNulls: typeof m.skipNulls == "boolean" ? m.skipNulls : c.skipNulls, sort: typeof m.sort == "function" ? m.sort : null, strictNullHandling: typeof m.strictNullHandling == "boolean" ? m.strictNullHandling : c.strictNullHandling };
|
|
10071
10073
|
};
|
|
10072
10074
|
return xr = function(m, b) {
|
|
10073
|
-
var
|
|
10074
|
-
typeof g.filter == "function" ? (x = g.filter,
|
|
10075
|
+
var _ = m, g = f(b), S, x;
|
|
10076
|
+
typeof g.filter == "function" ? (x = g.filter, _ = x("", _)) : r(g.filter) && (x = g.filter, S = x);
|
|
10075
10077
|
var v = [];
|
|
10076
|
-
if (typeof
|
|
10078
|
+
if (typeof _ != "object" || _ === null) return "";
|
|
10077
10079
|
var E = l[g.arrayFormat], k = E === "comma" && g.commaRoundTrip;
|
|
10078
|
-
|
|
10079
|
-
for (var I = u(), M = 0; M <
|
|
10080
|
-
var O =
|
|
10081
|
-
g.skipNulls &&
|
|
10080
|
+
S || (S = Object.keys(_)), g.sort && S.sort(g.sort);
|
|
10081
|
+
for (var I = u(), M = 0; M < S.length; ++M) {
|
|
10082
|
+
var O = S[M];
|
|
10083
|
+
g.skipNulls && _[O] === null || o(v, y(_[O], O, E, k, g.allowEmptyArrays, g.strictNullHandling, g.skipNulls, g.encodeDotInKeys, g.encode ? g.encoder : null, g.filter, g.sort, g.allowDots, g.serializeDate, g.format, g.formatter, g.encodeValuesOnly, g.charset, I));
|
|
10082
10084
|
}
|
|
10083
10085
|
var B = v.join(g.delimiter), T = g.addQueryPrefix === !0 ? "?" : "";
|
|
10084
10086
|
return g.charsetSentinel && (g.charset === "iso-8859-1" ? T += "utf8=%26%2310003%3B&" : T += "utf8=%E2%9C%93&"), B.length > 0 ? T + B : "";
|
|
@@ -10096,10 +10098,10 @@ function bc() {
|
|
|
10096
10098
|
}, i = "utf8=%26%2310003%3B", o = "utf8=%E2%9C%93", s = function(p, y) {
|
|
10097
10099
|
var f = { __proto__: null }, m = y.ignoreQueryPrefix ? p.replace(/^\?/, "") : p;
|
|
10098
10100
|
m = m.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
10099
|
-
var b = y.parameterLimit === 1 / 0 ? void 0 : y.parameterLimit,
|
|
10100
|
-
if (y.charsetSentinel) for (
|
|
10101
|
-
for (
|
|
10102
|
-
var v = S
|
|
10101
|
+
var b = y.parameterLimit === 1 / 0 ? void 0 : y.parameterLimit, _ = m.split(y.delimiter, b), g = -1, S, x = y.charset;
|
|
10102
|
+
if (y.charsetSentinel) for (S = 0; S < _.length; ++S) _[S].indexOf("utf8=") === 0 && (_[S] === o ? x = "utf-8" : _[S] === i && (x = "iso-8859-1"), g = S, S = _.length);
|
|
10103
|
+
for (S = 0; S < _.length; ++S) if (S !== g) {
|
|
10104
|
+
var v = _[S], E = v.indexOf("]="), k = E === -1 ? v.indexOf("=") : E + 1, I, M;
|
|
10103
10105
|
k === -1 ? (I = y.decoder(v, n.decoder, x, "key"), M = y.strictNullHandling ? null : "") : (I = y.decoder(v.slice(0, k), n.decoder, x, "key"), M = u.maybeMap(r(v.slice(k + 1), y), function(B) {
|
|
10104
10106
|
return y.decoder(B, n.decoder, x, "value");
|
|
10105
10107
|
})), M && y.interpretNumericEntities && x === "iso-8859-1" && (M = l(M)), v.indexOf("[]=") > -1 && (M = t(M) ? [M] : M);
|
|
@@ -10108,31 +10110,31 @@ function bc() {
|
|
|
10108
10110
|
}
|
|
10109
10111
|
return f;
|
|
10110
10112
|
}, a = function(p, y, f, m) {
|
|
10111
|
-
for (var b = m ? y : r(y, f),
|
|
10112
|
-
var g,
|
|
10113
|
-
if (
|
|
10113
|
+
for (var b = m ? y : r(y, f), _ = p.length - 1; _ >= 0; --_) {
|
|
10114
|
+
var g, S = p[_];
|
|
10115
|
+
if (S === "[]" && f.parseArrays) g = f.allowEmptyArrays && (b === "" || f.strictNullHandling && b === null) ? [] : [].concat(b);
|
|
10114
10116
|
else {
|
|
10115
10117
|
g = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
10116
|
-
var x =
|
|
10117
|
-
!f.parseArrays && v === "" ? g = { 0: b } : !isNaN(E) &&
|
|
10118
|
+
var x = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, v = f.decodeDotInKeys ? x.replace(/%2E/g, ".") : x, E = parseInt(v, 10);
|
|
10119
|
+
!f.parseArrays && v === "" ? g = { 0: b } : !isNaN(E) && S !== v && String(E) === v && E >= 0 && f.parseArrays && E <= f.arrayLimit ? (g = [], g[E] = b) : v !== "__proto__" && (g[v] = b);
|
|
10118
10120
|
}
|
|
10119
10121
|
b = g;
|
|
10120
10122
|
}
|
|
10121
10123
|
return b;
|
|
10122
10124
|
}, c = function(p, y, f, m) {
|
|
10123
10125
|
if (p) {
|
|
10124
|
-
var b = f.allowDots ? p.replace(/\.([^.[]+)/g, "[$1]") : p,
|
|
10126
|
+
var b = f.allowDots ? p.replace(/\.([^.[]+)/g, "[$1]") : p, _ = /(\[[^[\]]*])/, g = /(\[[^[\]]*])/g, S = f.depth > 0 && _.exec(b), x = S ? b.slice(0, S.index) : b, v = [];
|
|
10125
10127
|
if (x) {
|
|
10126
10128
|
if (!f.plainObjects && e.call(Object.prototype, x) && !f.allowPrototypes) return;
|
|
10127
10129
|
v.push(x);
|
|
10128
10130
|
}
|
|
10129
|
-
for (var E = 0; f.depth > 0 && (
|
|
10130
|
-
if (E += 1, !f.plainObjects && e.call(Object.prototype,
|
|
10131
|
-
v.push(
|
|
10131
|
+
for (var E = 0; f.depth > 0 && (S = g.exec(b)) !== null && E < f.depth; ) {
|
|
10132
|
+
if (E += 1, !f.plainObjects && e.call(Object.prototype, S[1].slice(1, -1)) && !f.allowPrototypes) return;
|
|
10133
|
+
v.push(S[1]);
|
|
10132
10134
|
}
|
|
10133
|
-
if (
|
|
10135
|
+
if (S) {
|
|
10134
10136
|
if (f.strictDepth === !0) throw new RangeError("Input depth exceeded depth option of " + f.depth + " and strictDepth is true");
|
|
10135
|
-
v.push("[" + b.slice(
|
|
10137
|
+
v.push("[" + b.slice(S.index) + "]");
|
|
10136
10138
|
}
|
|
10137
10139
|
return a(v, y, f, m);
|
|
10138
10140
|
}
|
|
@@ -10150,8 +10152,8 @@ function bc() {
|
|
|
10150
10152
|
return Ar = function(p, y) {
|
|
10151
10153
|
var f = d(y);
|
|
10152
10154
|
if (p === "" || p === null || typeof p > "u") return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
10153
|
-
for (var m = typeof p == "string" ? s(p, f) : p, b = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {},
|
|
10154
|
-
var
|
|
10155
|
+
for (var m = typeof p == "string" ? s(p, f) : p, b = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, _ = Object.keys(m), g = 0; g < _.length; ++g) {
|
|
10156
|
+
var S = _[g], x = c(S, m[S], f, typeof p == "string");
|
|
10155
10157
|
b = u.merge(b, x, f);
|
|
10156
10158
|
}
|
|
10157
10159
|
return f.allowSparse === !0 ? b : u.compact(b);
|
|
@@ -10172,7 +10174,7 @@ function vc() {
|
|
|
10172
10174
|
}
|
|
10173
10175
|
var t = /^([a-z0-9.+-]+:)/i, n = /:[0-9]*$/, l = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, r = ["<", ">", '"', "`", " ", "\r", `
|
|
10174
10176
|
`, " "], i = ["{", "}", "|", "\\", "^", "`"].concat(r), o = ["'"].concat(i), s = ["%", "/", "?", ";", "#"].concat(o), a = ["/", "?", "#"], c = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = { javascript: !0, "javascript:": !0 }, f = { javascript: !0, "javascript:": !0 }, m = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, b = yc();
|
|
10175
|
-
function
|
|
10177
|
+
function _(v, E, k) {
|
|
10176
10178
|
if (v && typeof v == "object" && v instanceof e) return v;
|
|
10177
10179
|
var I = new e();
|
|
10178
10180
|
return I.parse(v, E, k), I;
|
|
@@ -10241,7 +10243,7 @@ function vc() {
|
|
|
10241
10243
|
return this.href = this.format(), this;
|
|
10242
10244
|
};
|
|
10243
10245
|
function g(v) {
|
|
10244
|
-
return typeof v == "string" && (v =
|
|
10246
|
+
return typeof v == "string" && (v = _(v)), v instanceof e ? v.format() : e.prototype.format.call(v);
|
|
10245
10247
|
}
|
|
10246
10248
|
e.prototype.format = function() {
|
|
10247
10249
|
var v = this.auth || "";
|
|
@@ -10253,14 +10255,14 @@ function vc() {
|
|
|
10253
10255
|
return encodeURIComponent(T);
|
|
10254
10256
|
}), B = B.replace("#", "%23"), E + M + k + B + I;
|
|
10255
10257
|
};
|
|
10256
|
-
function
|
|
10257
|
-
return
|
|
10258
|
+
function S(v, E) {
|
|
10259
|
+
return _(v, !1, !0).resolve(E);
|
|
10258
10260
|
}
|
|
10259
10261
|
e.prototype.resolve = function(v) {
|
|
10260
|
-
return this.resolveObject(
|
|
10262
|
+
return this.resolveObject(_(v, !1, !0)).format();
|
|
10261
10263
|
};
|
|
10262
10264
|
function x(v, E) {
|
|
10263
|
-
return v ?
|
|
10265
|
+
return v ? _(v, !1, !0).resolveObject(E) : E;
|
|
10264
10266
|
}
|
|
10265
10267
|
return e.prototype.resolveObject = function(v) {
|
|
10266
10268
|
if (typeof v == "string") {
|
|
@@ -10322,7 +10324,7 @@ function vc() {
|
|
|
10322
10324
|
}, e.prototype.parseHost = function() {
|
|
10323
10325
|
var v = this.host, E = n.exec(v);
|
|
10324
10326
|
E && (E = E[0], E !== ":" && (this.port = E.substr(1)), v = v.substr(0, v.length - E.length)), v && (this.hostname = v);
|
|
10325
|
-
}, gt.parse =
|
|
10327
|
+
}, gt.parse = _, gt.resolve = S, gt.resolveObject = x, gt.format = g, gt.Url = e, gt;
|
|
10326
10328
|
}
|
|
10327
10329
|
function Pa(u) {
|
|
10328
10330
|
if (typeof u == "string") u = new URL(u);
|
|
@@ -10411,73 +10413,73 @@ var Ra, wr, Ni, _r, Sr, Ui, kr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, gt, qi, Fe,
|
|
|
10411
10413
|
u.BufferedDuplex = l;
|
|
10412
10414
|
}), er = pe((u) => {
|
|
10413
10415
|
le(), ce(), ue();
|
|
10414
|
-
var e = u && u.__importDefault || function(
|
|
10415
|
-
return
|
|
10416
|
+
var e = u && u.__importDefault || function(_) {
|
|
10417
|
+
return _ && _.__esModule ? _ : { default: _ };
|
|
10416
10418
|
};
|
|
10417
10419
|
Object.defineProperty(u, "__esModule", { value: !0 }), u.streamBuilder = u.browserStreamBuilder = void 0;
|
|
10418
10420
|
var t = (Ne(), Oe(Le)), n = e(kc()), l = e(at()), r = At(), i = e(Nr()), o = ns(), s = (0, l.default)("mqttjs:ws"), a = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
|
|
10419
|
-
function c(
|
|
10420
|
-
let
|
|
10421
|
-
return typeof
|
|
10422
|
-
}
|
|
10423
|
-
function d(
|
|
10424
|
-
let g =
|
|
10425
|
-
return
|
|
10426
|
-
Object.prototype.hasOwnProperty.call(
|
|
10421
|
+
function c(_, g) {
|
|
10422
|
+
let S = `${_.protocol}://${_.hostname}:${_.port}${_.path}`;
|
|
10423
|
+
return typeof _.transformWsUrl == "function" && (S = _.transformWsUrl(S, _, g)), S;
|
|
10424
|
+
}
|
|
10425
|
+
function d(_) {
|
|
10426
|
+
let g = _;
|
|
10427
|
+
return _.port || (_.protocol === "wss" ? g.port = 443 : g.port = 80), _.path || (g.path = "/"), _.wsOptions || (g.wsOptions = {}), !i.default && !_.forceNativeWebSocket && _.protocol === "wss" && a.forEach((S) => {
|
|
10428
|
+
Object.prototype.hasOwnProperty.call(_, S) && !Object.prototype.hasOwnProperty.call(_.wsOptions, S) && (g.wsOptions[S] = _[S]);
|
|
10427
10429
|
}), g;
|
|
10428
10430
|
}
|
|
10429
|
-
function p(
|
|
10430
|
-
let g = d(
|
|
10431
|
+
function p(_) {
|
|
10432
|
+
let g = d(_);
|
|
10431
10433
|
if (g.hostname || (g.hostname = g.host), !g.hostname) {
|
|
10432
10434
|
if (typeof document > "u") throw new Error("Could not determine host. Specify host manually.");
|
|
10433
|
-
let
|
|
10434
|
-
g.hostname =
|
|
10435
|
+
let S = new URL(document.URL);
|
|
10436
|
+
g.hostname = S.hostname, g.port || (g.port = Number(S.port));
|
|
10435
10437
|
}
|
|
10436
10438
|
return g.objectMode === void 0 && (g.objectMode = !(g.binary === !0 || g.binary === void 0)), g;
|
|
10437
10439
|
}
|
|
10438
|
-
function y(
|
|
10439
|
-
s("createWebSocket"), s(`protocol: ${
|
|
10440
|
-
let x =
|
|
10440
|
+
function y(_, g, S) {
|
|
10441
|
+
s("createWebSocket"), s(`protocol: ${S.protocolId} ${S.protocolVersion}`);
|
|
10442
|
+
let x = S.protocolId === "MQIsdp" && S.protocolVersion === 3 ? "mqttv3.1" : "mqtt";
|
|
10441
10443
|
s(`creating new Websocket for url: ${g} and protocol: ${x}`);
|
|
10442
10444
|
let v;
|
|
10443
|
-
return
|
|
10445
|
+
return S.createWebsocket ? v = S.createWebsocket(g, [x], S) : v = new n.default(g, [x], S.wsOptions), v;
|
|
10444
10446
|
}
|
|
10445
|
-
function f(
|
|
10446
|
-
let
|
|
10447
|
-
return g.createWebsocket ? v = g.createWebsocket(x, [
|
|
10447
|
+
function f(_, g) {
|
|
10448
|
+
let S = g.protocolId === "MQIsdp" && g.protocolVersion === 3 ? "mqttv3.1" : "mqtt", x = c(g, _), v;
|
|
10449
|
+
return g.createWebsocket ? v = g.createWebsocket(x, [S], g) : v = new WebSocket(x, [S]), v.binaryType = "arraybuffer", v;
|
|
10448
10450
|
}
|
|
10449
|
-
var m = (
|
|
10451
|
+
var m = (_, g) => {
|
|
10450
10452
|
s("streamBuilder");
|
|
10451
|
-
let
|
|
10452
|
-
|
|
10453
|
-
let x = c(
|
|
10453
|
+
let S = d(g);
|
|
10454
|
+
S.hostname = S.hostname || S.host || "localhost";
|
|
10455
|
+
let x = c(S, _), v = y(_, x, S), E = n.default.createWebSocketStream(v, S.wsOptions);
|
|
10454
10456
|
return E.url = x, v.on("close", () => {
|
|
10455
10457
|
E.destroy();
|
|
10456
10458
|
}), E;
|
|
10457
10459
|
};
|
|
10458
10460
|
u.streamBuilder = m;
|
|
10459
|
-
var b = (
|
|
10461
|
+
var b = (_, g) => {
|
|
10460
10462
|
s("browserStreamBuilder");
|
|
10461
|
-
let
|
|
10463
|
+
let S, x = p(g).browserBufferSize || 1024 * 512, v = g.browserBufferTimeout || 1e3, E = !g.objectMode, k = f(_, g), I = O(g, N, ae);
|
|
10462
10464
|
g.objectMode || (I._writev = o.writev.bind(I)), I.on("close", () => {
|
|
10463
10465
|
k.close();
|
|
10464
10466
|
});
|
|
10465
10467
|
let M = typeof k.addEventListener < "u";
|
|
10466
|
-
k.readyState === k.OPEN ? (
|
|
10468
|
+
k.readyState === k.OPEN ? (S = I, S.socket = k) : (S = new o.BufferedDuplex(g, I, k), M ? k.addEventListener("open", B) : k.onopen = B), M ? (k.addEventListener("close", T), k.addEventListener("error", W), k.addEventListener("message", D)) : (k.onclose = T, k.onerror = W, k.onmessage = D);
|
|
10467
10469
|
function O(Y, K, re) {
|
|
10468
10470
|
let F = new r.Transform({ objectMode: Y.objectMode });
|
|
10469
10471
|
return F._write = K, F._flush = re, F;
|
|
10470
10472
|
}
|
|
10471
10473
|
function B() {
|
|
10472
|
-
s("WebSocket onOpen"),
|
|
10474
|
+
s("WebSocket onOpen"), S instanceof o.BufferedDuplex && S.socketReady();
|
|
10473
10475
|
}
|
|
10474
10476
|
function T(Y) {
|
|
10475
|
-
s("WebSocket onClose", Y),
|
|
10477
|
+
s("WebSocket onClose", Y), S.end(), S.destroy();
|
|
10476
10478
|
}
|
|
10477
10479
|
function W(Y) {
|
|
10478
10480
|
s("WebSocket onError", Y);
|
|
10479
10481
|
let K = new Error("WebSocket error");
|
|
10480
|
-
K.event = Y,
|
|
10482
|
+
K.event = Y, S.destroy(K);
|
|
10481
10483
|
}
|
|
10482
10484
|
async function D(Y) {
|
|
10483
10485
|
if (!I || !I.readable || !I.writable) return;
|
|
@@ -10500,7 +10502,7 @@ var Ra, wr, Ni, _r, Sr, Ui, kr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, gt, qi, Fe,
|
|
|
10500
10502
|
function ae(Y) {
|
|
10501
10503
|
k.close(), Y();
|
|
10502
10504
|
}
|
|
10503
|
-
return
|
|
10505
|
+
return S;
|
|
10504
10506
|
};
|
|
10505
10507
|
u.browserStreamBuilder = b;
|
|
10506
10508
|
}), is = {};
|
|
@@ -10597,15 +10599,15 @@ var el, Ec = He(() => {
|
|
|
10597
10599
|
let f = y.protocolId === "MQIsdp" && y.protocolVersion === 3 ? "mqttv3.1" : "mqtt";
|
|
10598
10600
|
s(y);
|
|
10599
10601
|
let m = a(y, p);
|
|
10600
|
-
l = wx.connectSocket({ url: m, protocols: [f] }), r = o(), i = new n.BufferedDuplex(y, r, l), i._destroy = (
|
|
10602
|
+
l = wx.connectSocket({ url: m, protocols: [f] }), r = o(), i = new n.BufferedDuplex(y, r, l), i._destroy = (_, g) => {
|
|
10601
10603
|
l.close({ success() {
|
|
10602
|
-
g && g(
|
|
10604
|
+
g && g(_);
|
|
10603
10605
|
} });
|
|
10604
10606
|
};
|
|
10605
10607
|
let b = i.destroy;
|
|
10606
|
-
return i.destroy = (
|
|
10608
|
+
return i.destroy = (_, g) => (i.destroy = b, setTimeout(() => {
|
|
10607
10609
|
l.close({ fail() {
|
|
10608
|
-
i._destroy(
|
|
10610
|
+
i._destroy(_, g);
|
|
10609
10611
|
} });
|
|
10610
10612
|
}, 0), i), c(), i;
|
|
10611
10613
|
};
|
|
@@ -10707,7 +10709,7 @@ var el, Ec = He(() => {
|
|
|
10707
10709
|
} else throw new Error("Missing secure protocol key");
|
|
10708
10710
|
if (o || (o = {}, !r.default && !p.forceNativeWebSocket ? (o.ws = er().streamBuilder, o.wss = er().streamBuilder, o.mqtt = po().default, o.tcp = po().default, o.ssl = go().default, o.tls = o.ssl, o.mqtts = go().default) : (o.ws = er().browserStreamBuilder, o.wss = er().browserStreamBuilder, o.wx = mo().default, o.wxs = mo().default, o.ali = bo().default, o.alis = bo().default)), !o[p.protocol]) {
|
|
10709
10711
|
let m = ["mqtts", "wss"].indexOf(p.protocol) !== -1;
|
|
10710
|
-
p.protocol = ["mqtt", "mqtts", "ws", "wss", "wx", "wxs", "ali", "alis"].filter((b,
|
|
10712
|
+
p.protocol = ["mqtt", "mqtts", "ws", "wss", "wx", "wxs", "ali", "alis"].filter((b, _) => m && _ % 2 === 0 ? !1 : typeof o[b] == "function")[0];
|
|
10711
10713
|
}
|
|
10712
10714
|
if (p.clean === !1 && !p.clientId) throw new Error("Missing clientId for unclean clients");
|
|
10713
10715
|
p.protocol && (p.defaultProtocol = p.protocol);
|
|
@@ -10720,23 +10722,23 @@ var el, Ec = He(() => {
|
|
|
10720
10722
|
}
|
|
10721
10723
|
function c(d, p, y = !0) {
|
|
10722
10724
|
return new Promise((f, m) => {
|
|
10723
|
-
let b = a(d, p),
|
|
10725
|
+
let b = a(d, p), _ = { connect: (S) => {
|
|
10724
10726
|
g(), f(b);
|
|
10725
10727
|
}, end: () => {
|
|
10726
10728
|
g(), f(b);
|
|
10727
|
-
}, error: (
|
|
10728
|
-
g(), b.end(), m(
|
|
10729
|
+
}, error: (S) => {
|
|
10730
|
+
g(), b.end(), m(S);
|
|
10729
10731
|
} };
|
|
10730
|
-
y === !1 && (
|
|
10731
|
-
|
|
10732
|
+
y === !1 && (_.close = () => {
|
|
10733
|
+
_.error(new Error("Couldn't connect to server"));
|
|
10732
10734
|
});
|
|
10733
10735
|
function g() {
|
|
10734
|
-
Object.keys(
|
|
10735
|
-
b.off(
|
|
10736
|
+
Object.keys(_).forEach((S) => {
|
|
10737
|
+
b.off(S, _[S]);
|
|
10736
10738
|
});
|
|
10737
10739
|
}
|
|
10738
|
-
Object.keys(
|
|
10739
|
-
b.on(
|
|
10740
|
+
Object.keys(_).forEach((S) => {
|
|
10741
|
+
b.on(S, _[S]);
|
|
10740
10742
|
});
|
|
10741
10743
|
});
|
|
10742
10744
|
}
|
|
@@ -10745,10 +10747,10 @@ var el, Ec = He(() => {
|
|
|
10745
10747
|
le(), ce(), ue();
|
|
10746
10748
|
var e = u && u.__createBinding || (Object.create ? function(y, f, m, b) {
|
|
10747
10749
|
b === void 0 && (b = m);
|
|
10748
|
-
var
|
|
10749
|
-
(!
|
|
10750
|
+
var _ = Object.getOwnPropertyDescriptor(f, m);
|
|
10751
|
+
(!_ || ("get" in _ ? !f.__esModule : _.writable || _.configurable)) && (_ = { enumerable: !0, get: function() {
|
|
10750
10752
|
return f[m];
|
|
10751
|
-
} }), Object.defineProperty(y, b,
|
|
10753
|
+
} }), Object.defineProperty(y, b, _);
|
|
10752
10754
|
} : function(y, f, m, b) {
|
|
10753
10755
|
b === void 0 && (b = m), y[b] = f[m];
|
|
10754
10756
|
}), t = u && u.__setModuleDefault || (Object.create ? function(y, f) {
|
|
@@ -10759,14 +10761,14 @@ var el, Ec = He(() => {
|
|
|
10759
10761
|
var y = function(f) {
|
|
10760
10762
|
return y = Object.getOwnPropertyNames || function(m) {
|
|
10761
10763
|
var b = [];
|
|
10762
|
-
for (var
|
|
10764
|
+
for (var _ in m) Object.prototype.hasOwnProperty.call(m, _) && (b[b.length] = _);
|
|
10763
10765
|
return b;
|
|
10764
10766
|
}, y(f);
|
|
10765
10767
|
};
|
|
10766
10768
|
return function(f) {
|
|
10767
10769
|
if (f && f.__esModule) return f;
|
|
10768
10770
|
var m = {};
|
|
10769
|
-
if (f != null) for (var b = y(f),
|
|
10771
|
+
if (f != null) for (var b = y(f), _ = 0; _ < b.length; _++) b[_] !== "default" && e(m, f, b[_]);
|
|
10770
10772
|
return t(m, f), m;
|
|
10771
10773
|
};
|
|
10772
10774
|
})(), l = u && u.__exportStar || function(y, f) {
|
|
@@ -11630,8 +11632,8 @@ function Fc(u) {
|
|
|
11630
11632
|
body: JSON.stringify(m)
|
|
11631
11633
|
});
|
|
11632
11634
|
if (!b.ok) {
|
|
11633
|
-
const
|
|
11634
|
-
throw new Error(`Register failed: ${b.status} ${
|
|
11635
|
+
const _ = await b.text().catch(() => "");
|
|
11636
|
+
throw new Error(`Register failed: ${b.status} ${_.slice(0, 200)}`);
|
|
11635
11637
|
}
|
|
11636
11638
|
}
|
|
11637
11639
|
return {
|
|
@@ -12724,17 +12726,17 @@ class Jc extends HTMLElement {
|
|
|
12724
12726
|
requestAnimationFrame(() => {
|
|
12725
12727
|
r.showElement?.(n.render, i, (y) => {
|
|
12726
12728
|
const f = n.props ?? { setData: p };
|
|
12727
|
-
for (const [b,
|
|
12729
|
+
for (const [b, _] of Object.entries(f)) {
|
|
12728
12730
|
const g = y[b];
|
|
12729
|
-
typeof g == "function" && g.call(y,
|
|
12731
|
+
typeof g == "function" && g.call(y, _);
|
|
12730
12732
|
}
|
|
12731
12733
|
const m = (b) => {
|
|
12732
|
-
const
|
|
12734
|
+
const _ = b, g = _.detail?.message ?? _.detail?.label;
|
|
12733
12735
|
g && (r.close?.(), this.dispatchEvent(
|
|
12734
12736
|
new CustomEvent("message-action", {
|
|
12735
12737
|
detail: {
|
|
12736
12738
|
text: g,
|
|
12737
|
-
attributes: { ...
|
|
12739
|
+
attributes: { ..._.detail?.attributes ?? {} }
|
|
12738
12740
|
},
|
|
12739
12741
|
bubbles: !0,
|
|
12740
12742
|
composed: !0
|
|
@@ -13250,7 +13252,11 @@ function ah(u, e = 5e3) {
|
|
|
13250
13252
|
});
|
|
13251
13253
|
});
|
|
13252
13254
|
}
|
|
13253
|
-
|
|
13255
|
+
function lh(u) {
|
|
13256
|
+
const e = `template:${u}`, t = window.__aikaara_descriptor__?.components?.[e];
|
|
13257
|
+
return t && t.kind === "iife-element" ? { render: t.tag, scriptUrl: t.scriptUrl, props: t.props } : window.__aikaara_descriptor__?.templates?.[u];
|
|
13258
|
+
}
|
|
13259
|
+
class uh extends HTMLElement {
|
|
13254
13260
|
shadow;
|
|
13255
13261
|
payloadData = null;
|
|
13256
13262
|
innerMessage = "";
|
|
@@ -13282,7 +13288,7 @@ class lh extends HTMLElement {
|
|
|
13282
13288
|
<slot></slot>
|
|
13283
13289
|
`; this.firstChild; ) this.removeChild(this.firstChild);
|
|
13284
13290
|
if (!e) return;
|
|
13285
|
-
const n = t ?
|
|
13291
|
+
const n = t ? lh(t) : void 0, l = n?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`);
|
|
13286
13292
|
if (n?.scriptUrl && !customElements.get(l) && oh(n.scriptUrl).then(() => ah(l)).then(() => this.render()).catch((r) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${n.scriptUrl}`, r)), customElements.get(l)) {
|
|
13287
13293
|
const r = document.createElement(l);
|
|
13288
13294
|
if (n?.props) {
|
|
@@ -13371,7 +13377,7 @@ class lh extends HTMLElement {
|
|
|
13371
13377
|
url: e.url ?? "",
|
|
13372
13378
|
openLinkInNewTab: e.openLinkInNewTab,
|
|
13373
13379
|
orderId: e.orderId,
|
|
13374
|
-
extra:
|
|
13380
|
+
extra: hh(e),
|
|
13375
13381
|
messageId: this.getAttribute("message-id") ?? void 0
|
|
13376
13382
|
}), this.appendChild(l);
|
|
13377
13383
|
});
|
|
@@ -13381,20 +13387,20 @@ class lh extends HTMLElement {
|
|
|
13381
13387
|
t.setPayload(e), this.appendChild(t);
|
|
13382
13388
|
}
|
|
13383
13389
|
}
|
|
13384
|
-
const
|
|
13390
|
+
const ch = /* @__PURE__ */ new Set([
|
|
13385
13391
|
"type",
|
|
13386
13392
|
"url",
|
|
13387
13393
|
"name",
|
|
13388
13394
|
"openLinkInNewTab",
|
|
13389
13395
|
"orderId"
|
|
13390
13396
|
]);
|
|
13391
|
-
function
|
|
13397
|
+
function hh(u) {
|
|
13392
13398
|
const e = {};
|
|
13393
13399
|
for (const [t, n] of Object.entries(u))
|
|
13394
|
-
|
|
13400
|
+
ch.has(t) || (e[t] = n);
|
|
13395
13401
|
return e;
|
|
13396
13402
|
}
|
|
13397
|
-
class
|
|
13403
|
+
class fh extends HTMLElement {
|
|
13398
13404
|
shadow;
|
|
13399
13405
|
static get observedAttributes() {
|
|
13400
13406
|
return ["text", "subtext"];
|
|
@@ -13443,7 +13449,7 @@ class hh extends HTMLElement {
|
|
|
13443
13449
|
function _o(u) {
|
|
13444
13450
|
return String(u).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13445
13451
|
}
|
|
13446
|
-
class
|
|
13452
|
+
class dh extends HTMLElement {
|
|
13447
13453
|
shadow;
|
|
13448
13454
|
data = null;
|
|
13449
13455
|
selected = /* @__PURE__ */ new Set();
|
|
@@ -13594,7 +13600,7 @@ function tr(u) {
|
|
|
13594
13600
|
function So(u) {
|
|
13595
13601
|
return String(u).replace(/[&<>"']/g, (e) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[e]);
|
|
13596
13602
|
}
|
|
13597
|
-
class
|
|
13603
|
+
class ph extends HTMLElement {
|
|
13598
13604
|
shadow;
|
|
13599
13605
|
data = null;
|
|
13600
13606
|
constructor() {
|
|
@@ -13654,14 +13660,14 @@ class dh extends HTMLElement {
|
|
|
13654
13660
|
button:hover { background: var(--aikaara-submit-hover-bg, var(--aikaara-primary-hover, #4f46e5)); }
|
|
13655
13661
|
button:disabled { opacity: var(--aikaara-submit-disabled-opacity, 0.5); cursor: not-allowed; }
|
|
13656
13662
|
</style>
|
|
13657
|
-
<button type="button">${
|
|
13663
|
+
<button type="button">${gh(e)}</button>
|
|
13658
13664
|
`, this.shadow.querySelector("button").addEventListener("click", () => this.handleClick());
|
|
13659
13665
|
}
|
|
13660
13666
|
}
|
|
13661
|
-
function
|
|
13667
|
+
function gh(u) {
|
|
13662
13668
|
return String(u).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13663
13669
|
}
|
|
13664
|
-
class
|
|
13670
|
+
class mh extends HTMLElement {
|
|
13665
13671
|
shadow;
|
|
13666
13672
|
data = null;
|
|
13667
13673
|
dismissed = !1;
|
|
@@ -13753,7 +13759,7 @@ class gh extends HTMLElement {
|
|
|
13753
13759
|
function qr(u) {
|
|
13754
13760
|
return String(u).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13755
13761
|
}
|
|
13756
|
-
class
|
|
13762
|
+
class bh extends HTMLElement {
|
|
13757
13763
|
static get observedAttributes() {
|
|
13758
13764
|
return ["slug", "user-id", "user-name", "user-token", "department-id", "config-base", "api-key"];
|
|
13759
13765
|
}
|
|
@@ -13807,7 +13813,7 @@ class mh extends HTMLElement {
|
|
|
13807
13813
|
const s = Object.keys(r).length > 0 ? r : void 0;
|
|
13808
13814
|
return this.mountInflight = (async () => {
|
|
13809
13815
|
try {
|
|
13810
|
-
this.mounted = await
|
|
13816
|
+
this.mounted = await Fh({
|
|
13811
13817
|
container: this,
|
|
13812
13818
|
slug: e,
|
|
13813
13819
|
configBase: this.getAttribute("config-base") ?? void 0,
|
|
@@ -13836,7 +13842,7 @@ class mh extends HTMLElement {
|
|
|
13836
13842
|
})(), this.mountInflight;
|
|
13837
13843
|
}
|
|
13838
13844
|
}
|
|
13839
|
-
class
|
|
13845
|
+
class yh extends HTMLElement {
|
|
13840
13846
|
shadow;
|
|
13841
13847
|
root = null;
|
|
13842
13848
|
iframe = null;
|
|
@@ -13953,7 +13959,7 @@ class bh extends HTMLElement {
|
|
|
13953
13959
|
});
|
|
13954
13960
|
}
|
|
13955
13961
|
}
|
|
13956
|
-
const
|
|
13962
|
+
const vh = [
|
|
13957
13963
|
{ label: "Self-filing guidance" },
|
|
13958
13964
|
{ label: "Smart tax suggestions" },
|
|
13959
13965
|
{ label: "Auto-fetch 26AS / AIS" },
|
|
@@ -13961,7 +13967,7 @@ const yh = [
|
|
|
13961
13967
|
{ label: "Dedicated tax expert" },
|
|
13962
13968
|
{ label: "End-to-end filing" },
|
|
13963
13969
|
{ label: "Document handling" }
|
|
13964
|
-
],
|
|
13970
|
+
], wh = [
|
|
13965
13971
|
{
|
|
13966
13972
|
label: "DIY",
|
|
13967
13973
|
match: ["DIY", "DIY_SALARY"],
|
|
@@ -13984,11 +13990,11 @@ const yh = [
|
|
|
13984
13990
|
features: [!0, !0, !0, !0, !0, !0, !0]
|
|
13985
13991
|
}
|
|
13986
13992
|
];
|
|
13987
|
-
class
|
|
13993
|
+
class _h extends HTMLElement {
|
|
13988
13994
|
shadow;
|
|
13989
13995
|
data = null;
|
|
13990
|
-
columns =
|
|
13991
|
-
features =
|
|
13996
|
+
columns = wh;
|
|
13997
|
+
features = vh;
|
|
13992
13998
|
constructor() {
|
|
13993
13999
|
super(), this.shadow = this.attachShadow({ mode: "open" });
|
|
13994
14000
|
}
|
|
@@ -14121,7 +14127,7 @@ function Hr(u) {
|
|
|
14121
14127
|
(e) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[e]
|
|
14122
14128
|
);
|
|
14123
14129
|
}
|
|
14124
|
-
function
|
|
14130
|
+
function Sh() {
|
|
14125
14131
|
const u = [
|
|
14126
14132
|
["aikaara-chat-widget", Hc],
|
|
14127
14133
|
["aikaara-chat-bubble", zc],
|
|
@@ -14132,19 +14138,19 @@ function _h() {
|
|
|
14132
14138
|
["aikaara-typing-indicator", nh],
|
|
14133
14139
|
["aikaara-streaming-message", ih],
|
|
14134
14140
|
["aikaara-error-banner", sh],
|
|
14135
|
-
["aikaara-template-renderer",
|
|
14136
|
-
["aikaara-system-pill",
|
|
14137
|
-
["aikaara-option-list",
|
|
14138
|
-
["aikaara-submit-action",
|
|
14139
|
-
["aikaara-modal-action",
|
|
14140
|
-
["aikaara-chat",
|
|
14141
|
-
["aikaara-link-modal",
|
|
14142
|
-
["aikaara-compare-plans",
|
|
14141
|
+
["aikaara-template-renderer", uh],
|
|
14142
|
+
["aikaara-system-pill", fh],
|
|
14143
|
+
["aikaara-option-list", dh],
|
|
14144
|
+
["aikaara-submit-action", ph],
|
|
14145
|
+
["aikaara-modal-action", mh],
|
|
14146
|
+
["aikaara-chat", bh],
|
|
14147
|
+
["aikaara-link-modal", yh],
|
|
14148
|
+
["aikaara-compare-plans", _h]
|
|
14143
14149
|
];
|
|
14144
14150
|
for (const [e, t] of u)
|
|
14145
14151
|
customElements.get(e) || customElements.define(e, t);
|
|
14146
14152
|
}
|
|
14147
|
-
|
|
14153
|
+
Sh();
|
|
14148
14154
|
function zr(u, e, t = "") {
|
|
14149
14155
|
if (!e) return t;
|
|
14150
14156
|
const n = e.split(".");
|
|
@@ -14155,7 +14161,7 @@ function zr(u, e, t = "") {
|
|
|
14155
14161
|
else return t;
|
|
14156
14162
|
return typeof l == "string" ? l : t;
|
|
14157
14163
|
}
|
|
14158
|
-
function
|
|
14164
|
+
function kh(u) {
|
|
14159
14165
|
try {
|
|
14160
14166
|
const e = u.split(".")[1];
|
|
14161
14167
|
if (!e) return 0;
|
|
@@ -14170,7 +14176,7 @@ function Sh(u) {
|
|
|
14170
14176
|
async function Or(u) {
|
|
14171
14177
|
return typeof u == "function" ? await u() : u;
|
|
14172
14178
|
}
|
|
14173
|
-
class
|
|
14179
|
+
class Eh {
|
|
14174
14180
|
constructor(e, t) {
|
|
14175
14181
|
this.descriptor = e, this.sessionToken = t;
|
|
14176
14182
|
}
|
|
@@ -14202,14 +14208,14 @@ class kh {
|
|
|
14202
14208
|
if (!d) throw new Error("Session auth response missing token");
|
|
14203
14209
|
const p = zr(s, this.descriptor.requestIdPath ?? "data.requestId"), y = this.cache?.requestId || p;
|
|
14204
14210
|
if (!y) throw new Error("Session auth response missing requestId");
|
|
14205
|
-
const f = zr(s, this.descriptor.fullNamePath ?? "data.fullName"), m =
|
|
14211
|
+
const f = zr(s, this.descriptor.fullNamePath ?? "data.fullName"), m = kh(d) || Date.now() + 3600 * 1e3;
|
|
14206
14212
|
return this.cache = { token: d, requestId: y, fullName: f, expiresAt: m }, this.cache;
|
|
14207
14213
|
}
|
|
14208
14214
|
}
|
|
14209
|
-
async function
|
|
14215
|
+
async function xh(u) {
|
|
14210
14216
|
const e = {};
|
|
14211
14217
|
for (const t of u.spec) {
|
|
14212
|
-
const n = await
|
|
14218
|
+
const n = await Ah(t, u.providers);
|
|
14213
14219
|
if (n !== void 0 && n !== "")
|
|
14214
14220
|
e[t.name] = n;
|
|
14215
14221
|
else {
|
|
@@ -14222,11 +14228,11 @@ async function Eh(u) {
|
|
|
14222
14228
|
}
|
|
14223
14229
|
return e;
|
|
14224
14230
|
}
|
|
14225
|
-
async function
|
|
14231
|
+
async function Ah(u, e) {
|
|
14226
14232
|
const t = u.key ?? u.name;
|
|
14227
14233
|
switch (u.source) {
|
|
14228
14234
|
case "cookie":
|
|
14229
|
-
return
|
|
14235
|
+
return Ih(t);
|
|
14230
14236
|
case "localStorage":
|
|
14231
14237
|
return rr(() => window.localStorage.getItem(t) ?? void 0);
|
|
14232
14238
|
case "sessionStorage":
|
|
@@ -14234,7 +14240,7 @@ async function xh(u, e) {
|
|
|
14234
14240
|
case "url_param":
|
|
14235
14241
|
return rr(() => new URL(window.location.href).searchParams.get(t) ?? void 0);
|
|
14236
14242
|
case "header_meta":
|
|
14237
|
-
return rr(() => document.querySelector(`meta[name="${
|
|
14243
|
+
return rr(() => document.querySelector(`meta[name="${Th(t)}"]`)?.content ?? void 0);
|
|
14238
14244
|
case "callback": {
|
|
14239
14245
|
const n = e?.[u.name];
|
|
14240
14246
|
if (!n) return;
|
|
@@ -14245,7 +14251,7 @@ async function xh(u, e) {
|
|
|
14245
14251
|
return;
|
|
14246
14252
|
}
|
|
14247
14253
|
}
|
|
14248
|
-
function
|
|
14254
|
+
function Ih(u) {
|
|
14249
14255
|
if (typeof document > "u") return;
|
|
14250
14256
|
const e = encodeURIComponent(u), t = document.cookie ? document.cookie.split("; ") : [];
|
|
14251
14257
|
for (const n of t) {
|
|
@@ -14267,11 +14273,11 @@ function rr(u) {
|
|
|
14267
14273
|
return;
|
|
14268
14274
|
}
|
|
14269
14275
|
}
|
|
14270
|
-
function
|
|
14276
|
+
function Th(u) {
|
|
14271
14277
|
return u.replace(/["\\]/g, "\\$&");
|
|
14272
14278
|
}
|
|
14273
|
-
const
|
|
14274
|
-
class
|
|
14279
|
+
const Ch = 1800;
|
|
14280
|
+
class Oh {
|
|
14275
14281
|
constructor(e) {
|
|
14276
14282
|
this.opts = e, this.cache = this.loadCache();
|
|
14277
14283
|
}
|
|
@@ -14296,7 +14302,7 @@ class Ch {
|
|
|
14296
14302
|
}), this.inflight);
|
|
14297
14303
|
}
|
|
14298
14304
|
async exchange() {
|
|
14299
|
-
const e = await
|
|
14305
|
+
const e = await xh({
|
|
14300
14306
|
spec: this.opts.descriptor.collect,
|
|
14301
14307
|
providers: this.opts.providers
|
|
14302
14308
|
}), t = JSON.stringify({ credentials: e }), n = {
|
|
@@ -14334,7 +14340,7 @@ class Ch {
|
|
|
14334
14340
|
return this.cache = c, this.persistCache(c), c;
|
|
14335
14341
|
}
|
|
14336
14342
|
computeExpiry() {
|
|
14337
|
-
const e = this.opts.descriptor.cacheTtlSec ??
|
|
14343
|
+
const e = this.opts.descriptor.cacheTtlSec ?? Ch;
|
|
14338
14344
|
if (!(!this.opts.descriptor.cacheKey || e <= 0))
|
|
14339
14345
|
return Date.now() + e * 1e3;
|
|
14340
14346
|
}
|
|
@@ -14367,7 +14373,7 @@ class Ch {
|
|
|
14367
14373
|
}
|
|
14368
14374
|
}
|
|
14369
14375
|
}
|
|
14370
|
-
function
|
|
14376
|
+
function Ph() {
|
|
14371
14377
|
const u = typeof crypto < "u" ? crypto : null;
|
|
14372
14378
|
if (u?.randomUUID) return u.randomUUID();
|
|
14373
14379
|
if (u?.getRandomValues) {
|
|
@@ -14381,30 +14387,30 @@ function Oh() {
|
|
|
14381
14387
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
14382
14388
|
});
|
|
14383
14389
|
}
|
|
14384
|
-
const
|
|
14390
|
+
const Mh = "aikaara_chat:requestId";
|
|
14385
14391
|
function ss(u, e) {
|
|
14386
|
-
return `${
|
|
14392
|
+
return `${Mh}:${u}:${e}`;
|
|
14387
14393
|
}
|
|
14388
|
-
function
|
|
14394
|
+
function Rh(u, e) {
|
|
14389
14395
|
try {
|
|
14390
14396
|
return localStorage.getItem(ss(u, e));
|
|
14391
14397
|
} catch {
|
|
14392
14398
|
return null;
|
|
14393
14399
|
}
|
|
14394
14400
|
}
|
|
14395
|
-
function
|
|
14401
|
+
function jh(u, e, t) {
|
|
14396
14402
|
try {
|
|
14397
14403
|
localStorage.setItem(ss(u, e), t);
|
|
14398
14404
|
} catch {
|
|
14399
14405
|
}
|
|
14400
14406
|
}
|
|
14401
|
-
function
|
|
14407
|
+
function $h(u, e) {
|
|
14402
14408
|
try {
|
|
14403
14409
|
localStorage.removeItem(ss(u, e));
|
|
14404
14410
|
} catch {
|
|
14405
14411
|
}
|
|
14406
14412
|
}
|
|
14407
|
-
async function
|
|
14413
|
+
async function Lh(u, e) {
|
|
14408
14414
|
console.log("[aikaara-chat-sdk] preflight running", u.length, "steps");
|
|
14409
14415
|
const t = {
|
|
14410
14416
|
userId: e.userId,
|
|
@@ -14437,26 +14443,26 @@ async function jh(u, e) {
|
|
|
14437
14443
|
try {
|
|
14438
14444
|
const b = await fetch(a, p);
|
|
14439
14445
|
if (b.ok) break;
|
|
14440
|
-
if (y = b.status, f = await b.text().catch(() => ""), m < i.length &&
|
|
14446
|
+
if (y = b.status, f = await b.text().catch(() => ""), m < i.length && Nh(y, f)) {
|
|
14441
14447
|
const g = i[m++];
|
|
14442
14448
|
console.warn(
|
|
14443
14449
|
`[aikaara-chat-sdk] preflight #${o} ${c} ${a} → ${y} (transient). Retry #${m} in ${g}ms.`
|
|
14444
|
-
), await new Promise((
|
|
14450
|
+
), await new Promise((S) => setTimeout(S, g));
|
|
14445
14451
|
continue;
|
|
14446
14452
|
}
|
|
14447
|
-
const
|
|
14453
|
+
const _ = `Preflight #${o} ${c} ${a} → ${y} ${f.slice(0, 200)}`;
|
|
14448
14454
|
if (s.soft) {
|
|
14449
|
-
console.warn("[aikaara-chat-sdk]",
|
|
14455
|
+
console.warn("[aikaara-chat-sdk]", _);
|
|
14450
14456
|
break;
|
|
14451
14457
|
}
|
|
14452
|
-
throw new Error(
|
|
14458
|
+
throw new Error(_);
|
|
14453
14459
|
} catch (b) {
|
|
14454
14460
|
if (m < i.length) {
|
|
14455
|
-
const
|
|
14461
|
+
const _ = i[m++];
|
|
14456
14462
|
console.warn(
|
|
14457
|
-
`[aikaara-chat-sdk] preflight #${o} threw, retry #${m} in ${
|
|
14463
|
+
`[aikaara-chat-sdk] preflight #${o} threw, retry #${m} in ${_}ms`,
|
|
14458
14464
|
b
|
|
14459
|
-
), await new Promise((g) => setTimeout(g,
|
|
14465
|
+
), await new Promise((g) => setTimeout(g, _));
|
|
14460
14466
|
continue;
|
|
14461
14467
|
}
|
|
14462
14468
|
if (s.soft) {
|
|
@@ -14467,7 +14473,7 @@ async function jh(u, e) {
|
|
|
14467
14473
|
}
|
|
14468
14474
|
}
|
|
14469
14475
|
}
|
|
14470
|
-
function
|
|
14476
|
+
function Nh(u, e) {
|
|
14471
14477
|
if (u === 503 || u === 504 || u === 502) return !0;
|
|
14472
14478
|
if (u === 401 || u === 403) return e.trim().length === 0;
|
|
14473
14479
|
if (u === 500) {
|
|
@@ -14492,18 +14498,18 @@ async function sl(u, e) {
|
|
|
14492
14498
|
}
|
|
14493
14499
|
return n;
|
|
14494
14500
|
}
|
|
14495
|
-
function
|
|
14496
|
-
return u.replace("{projectId}", e).replace("{uuid}",
|
|
14501
|
+
function Uh(u, e) {
|
|
14502
|
+
return u.replace("{projectId}", e).replace("{uuid}", Ph().replace(/-/g, ""));
|
|
14497
14503
|
}
|
|
14498
|
-
async function
|
|
14504
|
+
async function Bh(u) {
|
|
14499
14505
|
const e = {
|
|
14500
14506
|
...u.config ?? (u.configUrl ? await sl(u.configUrl, u.configHeaders) : {}),
|
|
14501
14507
|
...u.overrides ?? {}
|
|
14502
14508
|
}, t = e.transport ?? "tiledesk", n = e.tiledesk;
|
|
14503
14509
|
if ((t === "tiledesk" || t === "dual") && !n)
|
|
14504
14510
|
throw new Error("mount: descriptor.tiledesk is required for tiledesk/dual transport");
|
|
14505
|
-
const l = n?.projectId ?? "", r = u.identity.userId, i = u.forceNewConversation ? null :
|
|
14506
|
-
(!i || u.forceNewConversation) && l &&
|
|
14511
|
+
const l = n?.projectId ?? "", r = u.identity.userId, i = u.forceNewConversation ? null : Rh(r, l), o = n?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", s = u.conversationId ?? i ?? Uh(o, l);
|
|
14512
|
+
(!i || u.forceNewConversation) && l && jh(r, l, s);
|
|
14507
14513
|
const a = await u.tokenProvider(), c = u.tokenProvider, d = u.historyTokenProvider ?? c, p = n ? {
|
|
14508
14514
|
mqttEndpoint: n.mqttEndpoint,
|
|
14509
14515
|
jwtToken: a,
|
|
@@ -14590,13 +14596,13 @@ async function Uh(u) {
|
|
|
14590
14596
|
}
|
|
14591
14597
|
};
|
|
14592
14598
|
}
|
|
14593
|
-
function
|
|
14599
|
+
function Dh(u) {
|
|
14594
14600
|
if (typeof u != "string") return u;
|
|
14595
14601
|
const e = document.querySelector(u);
|
|
14596
14602
|
if (!e) throw new Error(`mountFromSlug: container "${u}" not found`);
|
|
14597
14603
|
return e;
|
|
14598
14604
|
}
|
|
14599
|
-
async function
|
|
14605
|
+
async function Fh(u) {
|
|
14600
14606
|
const e = (u.configBase ?? "https://api.aikaara.com").replace(/\/$/, ""), t = `${e}/api/v1/widget_configs/${encodeURIComponent(u.slug)}`;
|
|
14601
14607
|
let n = null;
|
|
14602
14608
|
try {
|
|
@@ -14613,27 +14619,42 @@ async function Dh(u) {
|
|
|
14613
14619
|
...n ?? {},
|
|
14614
14620
|
...u.overrides ?? {}
|
|
14615
14621
|
};
|
|
14616
|
-
if (
|
|
14622
|
+
if (l.templates && Object.keys(l.templates).length > 0) {
|
|
14623
|
+
l.components = { ...l.components ?? {} };
|
|
14624
|
+
for (const [b, _] of Object.entries(l.templates)) {
|
|
14625
|
+
const g = `template:${b}`;
|
|
14626
|
+
l.components[g] || !_?.scriptUrl || !_?.render || (l.components[g] = {
|
|
14627
|
+
kind: "iife-element",
|
|
14628
|
+
scriptUrl: _.scriptUrl,
|
|
14629
|
+
tag: _.render,
|
|
14630
|
+
..._.props ? { props: _.props } : {}
|
|
14631
|
+
});
|
|
14632
|
+
}
|
|
14633
|
+
}
|
|
14634
|
+
if (window.__aikaara_descriptor__ = {
|
|
14635
|
+
templates: l.templates,
|
|
14636
|
+
components: l.components
|
|
14637
|
+
}, !l.auth)
|
|
14617
14638
|
throw new Error(
|
|
14618
14639
|
`mountFromSlug: widget_configs/${u.slug} descriptor must include "auth" block`
|
|
14619
14640
|
);
|
|
14620
14641
|
let r = null, i = u.user.id, o = u.user.name, s = "";
|
|
14621
14642
|
if (l.sso) {
|
|
14622
14643
|
const b = `${e}/api/v1/projects/by-slug/${encodeURIComponent(u.slug)}/sso_exchange`;
|
|
14623
|
-
r = await new
|
|
14644
|
+
r = await new Oh({
|
|
14624
14645
|
descriptor: l.sso,
|
|
14625
14646
|
providers: u.user.credentialProviders,
|
|
14626
14647
|
exchangeUrl: b
|
|
14627
14648
|
}).get(), i = r.extUid || i, o = o ?? r.displayName, s = r.userToken;
|
|
14628
14649
|
}
|
|
14629
|
-
l.preflight && l.preflight.length && await
|
|
14650
|
+
l.preflight && l.preflight.length && await Lh(l.preflight, {
|
|
14630
14651
|
sessionToken: u.user.token,
|
|
14631
14652
|
userId: i,
|
|
14632
14653
|
projectId: l.tiledesk?.projectId ?? "",
|
|
14633
14654
|
slug: u.slug,
|
|
14634
14655
|
identity: u.user.identity
|
|
14635
14656
|
});
|
|
14636
|
-
const a = new
|
|
14657
|
+
const a = new Eh(l.auth, u.user.token), c = await a.get(), d = c.fullName || o || i, p = l.upload, y = async () => `Bearer ${p && "tokenSource" in p && p.tokenSource === "chat" ? (await a.get()).token : await Or(u.user.token)}`, f = u.hooks?.upload ?? (p && p.mode === "presigned-3step" ? Fc({
|
|
14637
14658
|
...p,
|
|
14638
14659
|
authHeader: y
|
|
14639
14660
|
}) : p && p.mode === "direct" ? rl({
|
|
@@ -14641,8 +14662,8 @@ async function Dh(u) {
|
|
|
14641
14662
|
fieldName: p.fieldName,
|
|
14642
14663
|
extraFields: p.extraFields,
|
|
14643
14664
|
headers: async () => ({ authorization: await y() })
|
|
14644
|
-
}) : void 0), m = await
|
|
14645
|
-
container:
|
|
14665
|
+
}) : void 0), m = await Bh({
|
|
14666
|
+
container: Dh(u.container),
|
|
14646
14667
|
config: l,
|
|
14647
14668
|
// SSO-issued Aikaara user token, used by the ActionCable transport.
|
|
14648
14669
|
// Tiledesk-only widgets ignore this; falls back to `userId` inside `mount`.
|
|
@@ -14673,18 +14694,18 @@ async function Dh(u) {
|
|
|
14673
14694
|
}
|
|
14674
14695
|
export {
|
|
14675
14696
|
os as A,
|
|
14676
|
-
|
|
14697
|
+
bh as B,
|
|
14677
14698
|
ol as C,
|
|
14678
|
-
|
|
14699
|
+
_h as D,
|
|
14679
14700
|
ko as E,
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14701
|
+
yh as F,
|
|
14702
|
+
mh as G,
|
|
14703
|
+
dh as H,
|
|
14704
|
+
ph as I,
|
|
14705
|
+
fh as J,
|
|
14706
|
+
uh as K,
|
|
14686
14707
|
yl as M,
|
|
14687
|
-
|
|
14708
|
+
Eh as S,
|
|
14688
14709
|
Mc as T,
|
|
14689
14710
|
zc as a,
|
|
14690
14711
|
Bc as b,
|
|
@@ -14699,17 +14720,17 @@ export {
|
|
|
14699
14720
|
bl as k,
|
|
14700
14721
|
ml as l,
|
|
14701
14722
|
vl as m,
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14723
|
+
Oh as n,
|
|
14724
|
+
$h as o,
|
|
14725
|
+
xh as p,
|
|
14705
14726
|
rl as q,
|
|
14706
|
-
|
|
14727
|
+
Sh as r,
|
|
14707
14728
|
Fc as s,
|
|
14708
14729
|
Wc as t,
|
|
14709
14730
|
Nc as u,
|
|
14710
14731
|
Lc as v,
|
|
14711
14732
|
jc as w,
|
|
14712
|
-
|
|
14713
|
-
|
|
14733
|
+
Fh as x,
|
|
14734
|
+
Bh as y,
|
|
14714
14735
|
tl as z
|
|
14715
14736
|
};
|