@weblock-wallet/sdk 0.1.73 → 0.1.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +940 -926
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +937 -923
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules
|
|
1
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js
|
|
2
2
|
var exports$2 = {};
|
|
3
3
|
var _dewExec$2 = false;
|
|
4
4
|
function dew$2() {
|
|
@@ -1694,7 +1694,7 @@ function dew() {
|
|
|
1694
1694
|
function numberIsNaN(obj) {
|
|
1695
1695
|
return obj !== obj;
|
|
1696
1696
|
}
|
|
1697
|
-
const hexSliceLookupTable =
|
|
1697
|
+
const hexSliceLookupTable = function() {
|
|
1698
1698
|
const alphabet = "0123456789abcdef";
|
|
1699
1699
|
const table = new Array(256);
|
|
1700
1700
|
for (let i5 = 0; i5 < 16; ++i5) {
|
|
@@ -1704,7 +1704,7 @@ function dew() {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
1706
|
return table;
|
|
1707
|
-
}
|
|
1707
|
+
}();
|
|
1708
1708
|
function defineBigIntMethod(fn) {
|
|
1709
1709
|
return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
|
|
1710
1710
|
}
|
|
@@ -1714,7 +1714,7 @@ function dew() {
|
|
|
1714
1714
|
return exports;
|
|
1715
1715
|
}
|
|
1716
1716
|
|
|
1717
|
-
// node_modules
|
|
1717
|
+
// node_modules/@jspm/core/nodelibs/browser/buffer.js
|
|
1718
1718
|
var exports2 = dew();
|
|
1719
1719
|
exports2["Buffer"];
|
|
1720
1720
|
exports2["SlowBuffer"];
|
|
@@ -1726,6 +1726,14 @@ var kMaxLength = exports2.kMaxLength;
|
|
|
1726
1726
|
|
|
1727
1727
|
// src/utils/storage.ts
|
|
1728
1728
|
import localforage from "localforage";
|
|
1729
|
+
var toExpiryEpochMs = (value) => {
|
|
1730
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
1731
|
+
return null;
|
|
1732
|
+
}
|
|
1733
|
+
return value < 1e12 ? value * 1e3 : value;
|
|
1734
|
+
};
|
|
1735
|
+
var isObjectRecord = (value) => typeof value === "object" && value !== null;
|
|
1736
|
+
var isWrappedItem = (value) => isObjectRecord(value) && "value" in value && ("expiryEpochMs" in value || "expiry" in value || Object.keys(value).length === 1);
|
|
1729
1737
|
var storage = localforage.createInstance({
|
|
1730
1738
|
name: "@WeBlock-wallet",
|
|
1731
1739
|
storeName: "secure-storage",
|
|
@@ -1748,11 +1756,15 @@ var LocalForage = {
|
|
|
1748
1756
|
try {
|
|
1749
1757
|
const item = await storage.getItem(key);
|
|
1750
1758
|
if (!item) return null;
|
|
1751
|
-
if (
|
|
1752
|
-
|
|
1753
|
-
|
|
1759
|
+
if (isWrappedItem(item)) {
|
|
1760
|
+
const expiryEpochMs = toExpiryEpochMs(item.expiryEpochMs ?? item.expiry);
|
|
1761
|
+
if (expiryEpochMs && Date.now() > expiryEpochMs) {
|
|
1762
|
+
await storage.removeItem(key);
|
|
1763
|
+
return null;
|
|
1764
|
+
}
|
|
1765
|
+
return item.value ?? null;
|
|
1754
1766
|
}
|
|
1755
|
-
return item
|
|
1767
|
+
return item;
|
|
1756
1768
|
} catch (err) {
|
|
1757
1769
|
console.error(`Error retrieving data for key "${key}":`, err);
|
|
1758
1770
|
return null;
|
|
@@ -1775,20 +1787,35 @@ var LocalForage = {
|
|
|
1775
1787
|
};
|
|
1776
1788
|
|
|
1777
1789
|
// src/utils/jwt.ts
|
|
1790
|
+
var decodeBase64Url = (value) => {
|
|
1791
|
+
const base64 = value.replace(/-/g, "+").replace(/_/g, "/");
|
|
1792
|
+
const missingPadding = (4 - base64.length % 4) % 4;
|
|
1793
|
+
const padded = `${base64}${"=".repeat(missingPadding)}`;
|
|
1794
|
+
return atob(padded);
|
|
1795
|
+
};
|
|
1796
|
+
var parseToken = (token) => {
|
|
1797
|
+
try {
|
|
1798
|
+
const [, payloadSegment] = token.split(".");
|
|
1799
|
+
if (!payloadSegment) return null;
|
|
1800
|
+
const decoded = decodeBase64Url(payloadSegment);
|
|
1801
|
+
const jsonPayload = decodeURIComponent(
|
|
1802
|
+
decoded.split("").map((c5) => `%${("00" + c5.charCodeAt(0).toString(16)).slice(-2)}`).join("")
|
|
1803
|
+
);
|
|
1804
|
+
return JSON.parse(jsonPayload);
|
|
1805
|
+
} catch {
|
|
1806
|
+
return null;
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1778
1809
|
var Jwt = {
|
|
1779
1810
|
parse(token) {
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
const jsonPayload = decodeURIComponent(
|
|
1784
|
-
atob(base64).split("").map(function(c5) {
|
|
1785
|
-
return "%" + ("00" + c5.charCodeAt(0).toString(16)).slice(-2);
|
|
1786
|
-
}).join("")
|
|
1787
|
-
);
|
|
1788
|
-
return JSON.parse(jsonPayload);
|
|
1789
|
-
} catch (error) {
|
|
1790
|
-
throw new Error(`Error parsing JWT: ${error}`);
|
|
1811
|
+
const payload = parseToken(token);
|
|
1812
|
+
if (!payload) {
|
|
1813
|
+
throw new Error("Error parsing JWT");
|
|
1791
1814
|
}
|
|
1815
|
+
return payload;
|
|
1816
|
+
},
|
|
1817
|
+
tryParse(token) {
|
|
1818
|
+
return parseToken(token);
|
|
1792
1819
|
}
|
|
1793
1820
|
};
|
|
1794
1821
|
|
|
@@ -1808,16 +1835,18 @@ var AuthService = class {
|
|
|
1808
1835
|
idToken: credentials.idToken,
|
|
1809
1836
|
provider
|
|
1810
1837
|
});
|
|
1811
|
-
console.log("Server response:", response);
|
|
1812
1838
|
const { token, isNewUser } = response;
|
|
1813
|
-
const
|
|
1814
|
-
|
|
1815
|
-
|
|
1839
|
+
const payload = Jwt.tryParse(token);
|
|
1840
|
+
const exp = payload?.exp ? payload.exp * 1e3 : null;
|
|
1841
|
+
if (!exp || !Number.isFinite(exp) || exp <= Date.now()) {
|
|
1842
|
+
throw new SDKError(
|
|
1843
|
+
"Invalid access token received from server",
|
|
1844
|
+
"INVALID_RESPONSE" /* INVALID_RESPONSE */
|
|
1845
|
+
);
|
|
1846
|
+
}
|
|
1816
1847
|
await LocalForage.save(`${this.orgHost}:firebaseId`, credentials.firebaseId);
|
|
1817
1848
|
await LocalForage.save(`${this.orgHost}:accessToken`, token, exp);
|
|
1818
1849
|
await LocalForage.save(`${this.orgHost}:isNewUser`, isNewUser);
|
|
1819
|
-
const savedIsNewUser = await LocalForage.get(`${this.orgHost}:isNewUser`);
|
|
1820
|
-
console.log("Saved isNewUser:", savedIsNewUser);
|
|
1821
1850
|
let status;
|
|
1822
1851
|
if (isNewUser) {
|
|
1823
1852
|
status = "NEW_USER" /* NEW_USER */;
|
|
@@ -1891,7 +1920,7 @@ var AuthService = class {
|
|
|
1891
1920
|
import { Wallet, Interface, Transaction as EthersTx } from "ethers";
|
|
1892
1921
|
import { generateMnemonic, mnemonicToSeed } from "bip39";
|
|
1893
1922
|
|
|
1894
|
-
// node_modules
|
|
1923
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-CcCWfKp1.js
|
|
1895
1924
|
var exports$22 = {};
|
|
1896
1925
|
var _dewExec$12 = false;
|
|
1897
1926
|
function dew$12() {
|
|
@@ -2193,7 +2222,7 @@ var exports3 = dew2();
|
|
|
2193
2222
|
exports3["StringDecoder"];
|
|
2194
2223
|
var StringDecoder = exports3.StringDecoder;
|
|
2195
2224
|
|
|
2196
|
-
// node_modules
|
|
2225
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-DEMDiNwt.js
|
|
2197
2226
|
function unimplemented(name2) {
|
|
2198
2227
|
throw new Error("Node.js process " + name2 + " is not supported by JSPM core outside of Node.js");
|
|
2199
2228
|
}
|
|
@@ -2476,7 +2505,7 @@ var process = {
|
|
|
2476
2505
|
setSourceMapsEnabled
|
|
2477
2506
|
};
|
|
2478
2507
|
|
|
2479
|
-
// node_modules
|
|
2508
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-CkFCi-G1.js
|
|
2480
2509
|
var exports4 = {};
|
|
2481
2510
|
var _dewExec3 = false;
|
|
2482
2511
|
function dew3() {
|
|
@@ -2511,7 +2540,7 @@ function dew3() {
|
|
|
2511
2540
|
return exports4;
|
|
2512
2541
|
}
|
|
2513
2542
|
|
|
2514
|
-
// node_modules
|
|
2543
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-tHuMsdT0.js
|
|
2515
2544
|
var e;
|
|
2516
2545
|
var t;
|
|
2517
2546
|
var n = "object" == typeof Reflect ? Reflect : null;
|
|
@@ -2558,10 +2587,10 @@ function h(e7, t5, n5) {
|
|
|
2558
2587
|
var r5 = e7._events;
|
|
2559
2588
|
if (void 0 === r5) return [];
|
|
2560
2589
|
var i5 = r5[t5];
|
|
2561
|
-
return void 0 === i5 ? [] : "function" == typeof i5 ? n5 ? [i5.listener || i5] : [i5] : n5 ?
|
|
2590
|
+
return void 0 === i5 ? [] : "function" == typeof i5 ? n5 ? [i5.listener || i5] : [i5] : n5 ? function(e8) {
|
|
2562
2591
|
for (var t6 = new Array(e8.length), n6 = 0; n6 < t6.length; ++n6) t6[n6] = e8[n6].listener || e8[n6];
|
|
2563
2592
|
return t6;
|
|
2564
|
-
}
|
|
2593
|
+
}(i5) : c(i5, i5.length);
|
|
2565
2594
|
}
|
|
2566
2595
|
function p(e7) {
|
|
2567
2596
|
var t5 = this._events;
|
|
@@ -2626,10 +2655,10 @@ Object.defineProperty(o, "defaultMaxListeners", { enumerable: true, get: functio
|
|
|
2626
2655
|
break;
|
|
2627
2656
|
}
|
|
2628
2657
|
if (i5 < 0) return this;
|
|
2629
|
-
0 === i5 ? n5.shift() : !
|
|
2658
|
+
0 === i5 ? n5.shift() : !function(e8, t6) {
|
|
2630
2659
|
for (; t6 + 1 < e8.length; t6++) e8[t6] = e8[t6 + 1];
|
|
2631
2660
|
e8.pop();
|
|
2632
|
-
}
|
|
2661
|
+
}(n5, i5), 1 === n5.length && (r5[e7] = n5[0]), void 0 !== r5.removeListener && this.emit("removeListener", e7, s5 || t5);
|
|
2633
2662
|
}
|
|
2634
2663
|
return this;
|
|
2635
2664
|
}, o.prototype.off = o.prototype.removeListener, o.prototype.removeAllListeners = function(e7) {
|
|
@@ -2663,7 +2692,7 @@ y.defaultMaxListeners;
|
|
|
2663
2692
|
y.init;
|
|
2664
2693
|
y.listenerCount;
|
|
2665
2694
|
|
|
2666
|
-
// node_modules
|
|
2695
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-DtDiafJB.js
|
|
2667
2696
|
y.once = function(emitter, event) {
|
|
2668
2697
|
return new Promise((resolve, reject) => {
|
|
2669
2698
|
function eventListener(...args) {
|
|
@@ -2745,7 +2774,7 @@ y.on = function(emitter, event) {
|
|
|
2745
2774
|
}
|
|
2746
2775
|
};
|
|
2747
2776
|
|
|
2748
|
-
// node_modules
|
|
2777
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-D3uu3VYh.js
|
|
2749
2778
|
var e$2;
|
|
2750
2779
|
var t$3;
|
|
2751
2780
|
var n$2;
|
|
@@ -2770,7 +2799,7 @@ function c$2(e7) {
|
|
|
2770
2799
|
}
|
|
2771
2800
|
}
|
|
2772
2801
|
}
|
|
2773
|
-
!
|
|
2802
|
+
!function() {
|
|
2774
2803
|
try {
|
|
2775
2804
|
t$3 = "function" == typeof setTimeout ? setTimeout : i$2;
|
|
2776
2805
|
} catch (e7) {
|
|
@@ -2781,7 +2810,7 @@ function c$2(e7) {
|
|
|
2781
2810
|
} catch (e7) {
|
|
2782
2811
|
n$2 = u$2;
|
|
2783
2812
|
}
|
|
2784
|
-
}
|
|
2813
|
+
}();
|
|
2785
2814
|
var l$2;
|
|
2786
2815
|
var s$1 = [];
|
|
2787
2816
|
var f$1 = false;
|
|
@@ -2797,7 +2826,7 @@ function d$1() {
|
|
|
2797
2826
|
for (l$2 = s$1, s$1 = []; ++a$1 < t5; ) l$2 && l$2[a$1].run();
|
|
2798
2827
|
a$1 = -1, t5 = s$1.length;
|
|
2799
2828
|
}
|
|
2800
|
-
l$2 = null, f$1 = false,
|
|
2829
|
+
l$2 = null, f$1 = false, function(e8) {
|
|
2801
2830
|
if (n$2 === clearTimeout) return clearTimeout(e8);
|
|
2802
2831
|
if ((n$2 === u$2 || !n$2) && clearTimeout) return n$2 = clearTimeout, clearTimeout(e8);
|
|
2803
2832
|
try {
|
|
@@ -2809,7 +2838,7 @@ function d$1() {
|
|
|
2809
2838
|
return n$2.call(this || r$2, e8);
|
|
2810
2839
|
}
|
|
2811
2840
|
}
|
|
2812
|
-
}
|
|
2841
|
+
}(e7);
|
|
2813
2842
|
}
|
|
2814
2843
|
}
|
|
2815
2844
|
function m$1(e7, t5) {
|
|
@@ -2864,9 +2893,9 @@ var o2 = function(o5) {
|
|
|
2864
2893
|
var n2 = function(t5) {
|
|
2865
2894
|
return !!o2(t5) || null !== t5 && "object" == typeof t5 && "number" == typeof t5.length && t5.length >= 0 && "[object Array]" !== e2.call(t5) && "[object Function]" === e2.call(t5.callee);
|
|
2866
2895
|
};
|
|
2867
|
-
var r2 =
|
|
2896
|
+
var r2 = function() {
|
|
2868
2897
|
return o2(arguments);
|
|
2869
|
-
}
|
|
2898
|
+
}();
|
|
2870
2899
|
o2.isLegacyArguments = n2;
|
|
2871
2900
|
var l2 = r2 ? o2 : n2;
|
|
2872
2901
|
var t$1 = Object.prototype.toString;
|
|
@@ -2874,13 +2903,13 @@ var o$1 = Function.prototype.toString;
|
|
|
2874
2903
|
var n$1 = /^\s*(?:function)?\*/;
|
|
2875
2904
|
var e$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
|
|
2876
2905
|
var r$1 = Object.getPrototypeOf;
|
|
2877
|
-
var c2 =
|
|
2906
|
+
var c2 = function() {
|
|
2878
2907
|
if (!e$1) return false;
|
|
2879
2908
|
try {
|
|
2880
2909
|
return Function("return function*() {}")();
|
|
2881
2910
|
} catch (t5) {
|
|
2882
2911
|
}
|
|
2883
|
-
}
|
|
2912
|
+
}();
|
|
2884
2913
|
var u2 = c2 ? r$1(c2) : {};
|
|
2885
2914
|
var i2 = function(c5) {
|
|
2886
2915
|
return "function" == typeof c5 && (!!n$1.test(o$1.call(c5)) || (e$1 ? r$1(c5) === u2 : "[object GeneratorFunction]" === t$1.call(c5)));
|
|
@@ -3032,11 +3061,11 @@ o$2.isArgumentsObject = f2, o$2.isGeneratorFunction = a2, o$2.isPromise = functi
|
|
|
3032
3061
|
return H(e7) || Z(e7) || q(e7) || K(e7) || L(e7);
|
|
3033
3062
|
}, o$2.isAnyArrayBuffer = function(e7) {
|
|
3034
3063
|
return l$1 && (V(e7) || _(e7));
|
|
3035
|
-
}, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(
|
|
3064
|
+
}, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(e7) {
|
|
3036
3065
|
Object.defineProperty(o$2, e7, { enumerable: false, value: function() {
|
|
3037
3066
|
throw new Error(e7 + " is not supported in userland");
|
|
3038
3067
|
} });
|
|
3039
|
-
})
|
|
3068
|
+
});
|
|
3040
3069
|
var Q = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : global;
|
|
3041
3070
|
var X = {};
|
|
3042
3071
|
var Y = T$1;
|
|
@@ -3051,7 +3080,7 @@ X.format = function(e7) {
|
|
|
3051
3080
|
return t5.join(" ");
|
|
3052
3081
|
}
|
|
3053
3082
|
r5 = 1;
|
|
3054
|
-
for (var n5 = arguments, i5 = n5.length, o5 = String(e7).replace(te,
|
|
3083
|
+
for (var n5 = arguments, i5 = n5.length, o5 = String(e7).replace(te, function(e8) {
|
|
3055
3084
|
if ("%%" === e8) return "%";
|
|
3056
3085
|
if (r5 >= i5) return e8;
|
|
3057
3086
|
switch (e8) {
|
|
@@ -3068,7 +3097,7 @@ X.format = function(e7) {
|
|
|
3068
3097
|
default:
|
|
3069
3098
|
return e8;
|
|
3070
3099
|
}
|
|
3071
|
-
})
|
|
3100
|
+
}), u5 = n5[r5]; r5 < i5; u5 = n5[++r5]) le(u5) || !he(u5) ? o5 += " " + u5 : o5 += " " + oe(u5);
|
|
3072
3101
|
return o5;
|
|
3073
3102
|
}, X.deprecate = function(e7, t5) {
|
|
3074
3103
|
if (void 0 !== Y && true === Y.noDeprecation) return e7;
|
|
@@ -3107,7 +3136,7 @@ function ae(e7, t5, r5) {
|
|
|
3107
3136
|
var n5 = t5.inspect(r5, e7);
|
|
3108
3137
|
return ge(n5) || (n5 = ae(e7, n5, r5)), n5;
|
|
3109
3138
|
}
|
|
3110
|
-
var i5 =
|
|
3139
|
+
var i5 = function(e8, t6) {
|
|
3111
3140
|
if (be(t6)) return e8.stylize("undefined", "undefined");
|
|
3112
3141
|
if (ge(t6)) {
|
|
3113
3142
|
var r6 = "'" + JSON.stringify(t6).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
@@ -3116,14 +3145,14 @@ function ae(e7, t5, r5) {
|
|
|
3116
3145
|
if (de(t6)) return e8.stylize("" + t6, "number");
|
|
3117
3146
|
if (ye(t6)) return e8.stylize("" + t6, "boolean");
|
|
3118
3147
|
if (le(t6)) return e8.stylize("null", "null");
|
|
3119
|
-
}
|
|
3148
|
+
}(e7, t5);
|
|
3120
3149
|
if (i5) return i5;
|
|
3121
|
-
var o5 = Object.keys(t5), u5 =
|
|
3150
|
+
var o5 = Object.keys(t5), u5 = function(e8) {
|
|
3122
3151
|
var t6 = {};
|
|
3123
|
-
return e8.forEach(
|
|
3152
|
+
return e8.forEach(function(e9, r6) {
|
|
3124
3153
|
t6[e9] = true;
|
|
3125
|
-
})
|
|
3126
|
-
}
|
|
3154
|
+
}), t6;
|
|
3155
|
+
}(o5);
|
|
3127
3156
|
if (e7.showHidden && (o5 = Object.getOwnPropertyNames(t5)), Ae(t5) && (o5.indexOf("message") >= 0 || o5.indexOf("description") >= 0)) return ce(t5);
|
|
3128
3157
|
if (0 === o5.length) {
|
|
3129
3158
|
if (we(t5)) {
|
|
@@ -3136,31 +3165,31 @@ function ae(e7, t5, r5) {
|
|
|
3136
3165
|
}
|
|
3137
3166
|
var a5, c5 = "", s5 = false, p5 = ["{", "}"];
|
|
3138
3167
|
(pe(t5) && (s5 = true, p5 = ["[", "]"]), we(t5)) && (c5 = " [Function" + (t5.name ? ": " + t5.name : "") + "]");
|
|
3139
|
-
return me(t5) && (c5 = " " + RegExp.prototype.toString.call(t5)), je(t5) && (c5 = " " + Date.prototype.toUTCString.call(t5)), Ae(t5) && (c5 = " " + ce(t5)), 0 !== o5.length || s5 && 0 != t5.length ? r5 < 0 ? me(t5) ? e7.stylize(RegExp.prototype.toString.call(t5), "regexp") : e7.stylize("[Object]", "special") : (e7.seen.push(t5), a5 = s5 ?
|
|
3168
|
+
return me(t5) && (c5 = " " + RegExp.prototype.toString.call(t5)), je(t5) && (c5 = " " + Date.prototype.toUTCString.call(t5)), Ae(t5) && (c5 = " " + ce(t5)), 0 !== o5.length || s5 && 0 != t5.length ? r5 < 0 ? me(t5) ? e7.stylize(RegExp.prototype.toString.call(t5), "regexp") : e7.stylize("[Object]", "special") : (e7.seen.push(t5), a5 = s5 ? function(e8, t6, r6, n6, i6) {
|
|
3140
3169
|
for (var o6 = [], u6 = 0, f7 = t6.length; u6 < f7; ++u6) ke(t6, String(u6)) ? o6.push(se(e8, t6, r6, n6, String(u6), true)) : o6.push("");
|
|
3141
|
-
return i6.forEach(
|
|
3170
|
+
return i6.forEach(function(i7) {
|
|
3142
3171
|
i7.match(/^\d+$/) || o6.push(se(e8, t6, r6, n6, i7, true));
|
|
3143
|
-
})
|
|
3144
|
-
}
|
|
3172
|
+
}), o6;
|
|
3173
|
+
}(e7, t5, r5, u5, o5) : o5.map(function(n6) {
|
|
3145
3174
|
return se(e7, t5, r5, u5, n6, s5);
|
|
3146
|
-
})
|
|
3175
|
+
}), e7.seen.pop(), function(e8, t6, r6) {
|
|
3147
3176
|
var n6 = 0;
|
|
3148
|
-
if (e8.reduce(
|
|
3177
|
+
if (e8.reduce(function(e9, t7) {
|
|
3149
3178
|
return n6++, t7.indexOf("\n") >= 0 && n6++, e9 + t7.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3150
|
-
}
|
|
3179
|
+
}, 0) > 60) return r6[0] + ("" === t6 ? "" : t6 + "\n ") + " " + e8.join(",\n ") + " " + r6[1];
|
|
3151
3180
|
return r6[0] + t6 + " " + e8.join(", ") + " " + r6[1];
|
|
3152
|
-
}
|
|
3181
|
+
}(a5, c5, p5)) : p5[0] + c5 + p5[1];
|
|
3153
3182
|
}
|
|
3154
3183
|
function ce(e7) {
|
|
3155
3184
|
return "[" + Error.prototype.toString.call(e7) + "]";
|
|
3156
3185
|
}
|
|
3157
3186
|
function se(e7, t5, r5, n5, i5, o5) {
|
|
3158
3187
|
var u5, f6, a5;
|
|
3159
|
-
if ((a5 = Object.getOwnPropertyDescriptor(t5, i5) || { value: t5[i5] }).get ? f6 = a5.set ? e7.stylize("[Getter/Setter]", "special") : e7.stylize("[Getter]", "special") : a5.set && (f6 = e7.stylize("[Setter]", "special")), ke(n5, i5) || (u5 = "[" + i5 + "]"), f6 || (e7.seen.indexOf(a5.value) < 0 ? (f6 = le(r5) ? ae(e7, a5.value, null) : ae(e7, a5.value, r5 - 1)).indexOf("\n") > -1 && (f6 = o5 ? f6.split("\n").map(
|
|
3188
|
+
if ((a5 = Object.getOwnPropertyDescriptor(t5, i5) || { value: t5[i5] }).get ? f6 = a5.set ? e7.stylize("[Getter/Setter]", "special") : e7.stylize("[Getter]", "special") : a5.set && (f6 = e7.stylize("[Setter]", "special")), ke(n5, i5) || (u5 = "[" + i5 + "]"), f6 || (e7.seen.indexOf(a5.value) < 0 ? (f6 = le(r5) ? ae(e7, a5.value, null) : ae(e7, a5.value, r5 - 1)).indexOf("\n") > -1 && (f6 = o5 ? f6.split("\n").map(function(e8) {
|
|
3160
3189
|
return " " + e8;
|
|
3161
|
-
})
|
|
3190
|
+
}).join("\n").substr(2) : "\n" + f6.split("\n").map(function(e8) {
|
|
3162
3191
|
return " " + e8;
|
|
3163
|
-
})
|
|
3192
|
+
}).join("\n")) : f6 = e7.stylize("[Circular]", "special")), be(u5)) {
|
|
3164
3193
|
if (o5 && i5.match(/^\d+$/)) return f6;
|
|
3165
3194
|
(u5 = JSON.stringify("" + i5)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (u5 = u5.substr(1, u5.length - 2), u5 = e7.stylize(u5, "name")) : (u5 = u5.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), u5 = e7.stylize(u5, "string"));
|
|
3166
3195
|
}
|
|
@@ -3253,12 +3282,12 @@ X.promisify = function(e7) {
|
|
|
3253
3282
|
return Object.defineProperty(t5, Ee, { value: t5, enumerable: false, writable: false, configurable: true }), t5;
|
|
3254
3283
|
}
|
|
3255
3284
|
function t5() {
|
|
3256
|
-
for (var t6, r5, n5 = new Promise(
|
|
3285
|
+
for (var t6, r5, n5 = new Promise(function(e8, n6) {
|
|
3257
3286
|
t6 = e8, r5 = n6;
|
|
3258
|
-
})
|
|
3259
|
-
i5.push(
|
|
3287
|
+
}), i5 = [], o5 = 0; o5 < arguments.length; o5++) i5.push(arguments[o5]);
|
|
3288
|
+
i5.push(function(e8, n6) {
|
|
3260
3289
|
e8 ? r5(e8) : t6(n6);
|
|
3261
|
-
})
|
|
3290
|
+
});
|
|
3262
3291
|
try {
|
|
3263
3292
|
e7.apply(this || Q, i5);
|
|
3264
3293
|
} catch (e8) {
|
|
@@ -3276,11 +3305,11 @@ X.promisify = function(e7) {
|
|
|
3276
3305
|
var i5 = this || Q, o5 = function() {
|
|
3277
3306
|
return n5.apply(i5, arguments);
|
|
3278
3307
|
};
|
|
3279
|
-
e7.apply(this || Q, t6).then(
|
|
3308
|
+
e7.apply(this || Q, t6).then(function(e8) {
|
|
3280
3309
|
Y.nextTick(o5.bind(null, null, e8));
|
|
3281
|
-
}
|
|
3310
|
+
}, function(e8) {
|
|
3282
3311
|
Y.nextTick(De.bind(null, e8, o5));
|
|
3283
|
-
})
|
|
3312
|
+
});
|
|
3284
3313
|
}
|
|
3285
3314
|
return Object.setPrototypeOf(t5, Object.getPrototypeOf(e7)), Object.defineProperties(t5, ee(e7)), t5;
|
|
3286
3315
|
};
|
|
@@ -3334,7 +3363,7 @@ X.log;
|
|
|
3334
3363
|
var promisify = X.promisify;
|
|
3335
3364
|
X.types;
|
|
3336
3365
|
|
|
3337
|
-
// node_modules
|
|
3366
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-b0rmRow7.js
|
|
3338
3367
|
var exports5 = {};
|
|
3339
3368
|
var _dewExec4 = false;
|
|
3340
3369
|
var _global = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
|
|
@@ -3523,14 +3552,14 @@ process2.umask;
|
|
|
3523
3552
|
process2.version;
|
|
3524
3553
|
process2.versions;
|
|
3525
3554
|
|
|
3526
|
-
// node_modules
|
|
3555
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-B738Er4n.js
|
|
3527
3556
|
for (r$13 = { byteLength: function(r5) {
|
|
3528
3557
|
var t5 = u$22(r5), e7 = t5[0], n5 = t5[1];
|
|
3529
3558
|
return 3 * (e7 + n5) / 4 - n5;
|
|
3530
3559
|
}, toByteArray: function(r5) {
|
|
3531
|
-
var t5, o5, a5 = u$22(r5), h5 = a5[0], c5 = a5[1], d4 = new n$23(
|
|
3560
|
+
var t5, o5, a5 = u$22(r5), h5 = a5[0], c5 = a5[1], d4 = new n$23(function(r6, t6, e7) {
|
|
3532
3561
|
return 3 * (t6 + e7) / 4 - e7;
|
|
3533
|
-
}
|
|
3562
|
+
}(0, h5, c5)), f6 = 0, A4 = c5 > 0 ? h5 - 4 : h5;
|
|
3534
3563
|
for (o5 = 0; o5 < A4; o5 += 4) t5 = e$23[r5.charCodeAt(o5)] << 18 | e$23[r5.charCodeAt(o5 + 1)] << 12 | e$23[r5.charCodeAt(o5 + 2)] << 6 | e$23[r5.charCodeAt(o5 + 3)], d4[f6++] = t5 >> 16 & 255, d4[f6++] = t5 >> 8 & 255, d4[f6++] = 255 & t5;
|
|
3535
3564
|
2 === c5 && (t5 = e$23[r5.charCodeAt(o5)] << 2 | e$23[r5.charCodeAt(o5 + 1)] >> 4, d4[f6++] = 255 & t5);
|
|
3536
3565
|
1 === c5 && (t5 = e$23[r5.charCodeAt(o5)] << 10 | e$23[r5.charCodeAt(o5 + 1)] << 4 | e$23[r5.charCodeAt(o5 + 2)] >> 2, d4[f6++] = t5 >> 8 & 255, d4[f6++] = 255 & t5);
|
|
@@ -3595,13 +3624,13 @@ function u$1$1(t5, r5, e7) {
|
|
|
3595
3624
|
return s$12(t5, r5, e7);
|
|
3596
3625
|
}
|
|
3597
3626
|
function s$12(t5, r5, e7) {
|
|
3598
|
-
if ("string" == typeof t5) return
|
|
3627
|
+
if ("string" == typeof t5) return function(t6, r6) {
|
|
3599
3628
|
"string" == typeof r6 && "" !== r6 || (r6 = "utf8");
|
|
3600
3629
|
if (!u$1$1.isEncoding(r6)) throw new TypeError("Unknown encoding: " + r6);
|
|
3601
3630
|
var e8 = 0 | y3(t6, r6), n6 = f$2(e8), i6 = n6.write(t6, r6);
|
|
3602
3631
|
i6 !== e8 && (n6 = n6.slice(0, i6));
|
|
3603
3632
|
return n6;
|
|
3604
|
-
}
|
|
3633
|
+
}(t5, r5);
|
|
3605
3634
|
if (ArrayBuffer.isView(t5)) return p3(t5);
|
|
3606
3635
|
if (null == t5) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t5);
|
|
3607
3636
|
if (F2(t5, ArrayBuffer) || t5 && F2(t5.buffer, ArrayBuffer)) return c$1$1(t5, r5, e7);
|
|
@@ -3609,14 +3638,14 @@ function s$12(t5, r5, e7) {
|
|
|
3609
3638
|
if ("number" == typeof t5) throw new TypeError('The "value" argument must not be of type number. Received type number');
|
|
3610
3639
|
var n5 = t5.valueOf && t5.valueOf();
|
|
3611
3640
|
if (null != n5 && n5 !== t5) return u$1$1.from(n5, r5, e7);
|
|
3612
|
-
var i5 =
|
|
3641
|
+
var i5 = function(t6) {
|
|
3613
3642
|
if (u$1$1.isBuffer(t6)) {
|
|
3614
3643
|
var r6 = 0 | l$12(t6.length), e8 = f$2(r6);
|
|
3615
3644
|
return 0 === e8.length || t6.copy(e8, 0, 0, r6), e8;
|
|
3616
3645
|
}
|
|
3617
3646
|
if (void 0 !== t6.length) return "number" != typeof t6.length || N2(t6.length) ? f$2(0) : p3(t6);
|
|
3618
3647
|
if ("Buffer" === t6.type && Array.isArray(t6.data)) return p3(t6.data);
|
|
3619
|
-
}
|
|
3648
|
+
}(t5);
|
|
3620
3649
|
if (i5) return i5;
|
|
3621
3650
|
if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof t5[Symbol.toPrimitive]) return u$1$1.from(t5[Symbol.toPrimitive]("string"), r5, e7);
|
|
3622
3651
|
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t5);
|
|
@@ -3755,10 +3784,10 @@ function m2(t5, r5, e7, n5) {
|
|
|
3755
3784
|
return D2(_2(r5, t5.length - e7), t5, e7, n5);
|
|
3756
3785
|
}
|
|
3757
3786
|
function E2(t5, r5, e7, n5) {
|
|
3758
|
-
return D2(
|
|
3787
|
+
return D2(function(t6) {
|
|
3759
3788
|
for (var r6 = [], e8 = 0; e8 < t6.length; ++e8) r6.push(255 & t6.charCodeAt(e8));
|
|
3760
3789
|
return r6;
|
|
3761
|
-
}
|
|
3790
|
+
}(r5), t5, e7, n5);
|
|
3762
3791
|
}
|
|
3763
3792
|
function B2(t5, r5, e7, n5) {
|
|
3764
3793
|
return E2(t5, r5, e7, n5);
|
|
@@ -3767,10 +3796,10 @@ function A2(t5, r5, e7, n5) {
|
|
|
3767
3796
|
return D2(z2(r5), t5, e7, n5);
|
|
3768
3797
|
}
|
|
3769
3798
|
function U2(t5, r5, e7, n5) {
|
|
3770
|
-
return D2(
|
|
3799
|
+
return D2(function(t6, r6) {
|
|
3771
3800
|
for (var e8, n6, i5, o5 = [], f6 = 0; f6 < t6.length && !((r6 -= 2) < 0); ++f6) e8 = t6.charCodeAt(f6), n6 = e8 >> 8, i5 = e8 % 256, o5.push(i5), o5.push(n6);
|
|
3772
3801
|
return o5;
|
|
3773
|
-
}
|
|
3802
|
+
}(r5, t5.length - e7), t5, e7, n5);
|
|
3774
3803
|
}
|
|
3775
3804
|
function T2(t5, r5, e7) {
|
|
3776
3805
|
return 0 === r5 && e7 === t5.length ? n$1$1.fromByteArray(t5) : n$1$1.fromByteArray(t5.slice(r5, e7));
|
|
@@ -3794,15 +3823,15 @@ function I2(t5, r5, e7) {
|
|
|
3794
3823
|
}
|
|
3795
3824
|
null === a5 ? (a5 = 65533, p5 = 1) : a5 > 65535 && (a5 -= 65536, n5.push(a5 >>> 10 & 1023 | 55296), a5 = 56320 | 1023 & a5), n5.push(a5), i5 += p5;
|
|
3796
3825
|
}
|
|
3797
|
-
return
|
|
3826
|
+
return function(t6) {
|
|
3798
3827
|
var r6 = t6.length;
|
|
3799
3828
|
if (r6 <= 4096) return String.fromCharCode.apply(String, t6);
|
|
3800
3829
|
var e8 = "", n6 = 0;
|
|
3801
3830
|
for (; n6 < r6; ) e8 += String.fromCharCode.apply(String, t6.slice(n6, n6 += 4096));
|
|
3802
3831
|
return e8;
|
|
3803
|
-
}
|
|
3832
|
+
}(n5);
|
|
3804
3833
|
}
|
|
3805
|
-
e$1$1.kMaxLength = 2147483647, u$1$1.TYPED_ARRAY_SUPPORT =
|
|
3834
|
+
e$1$1.kMaxLength = 2147483647, u$1$1.TYPED_ARRAY_SUPPORT = function() {
|
|
3806
3835
|
try {
|
|
3807
3836
|
var t5 = new Uint8Array(1), r5 = { foo: function() {
|
|
3808
3837
|
return 42;
|
|
@@ -3811,16 +3840,16 @@ e$1$1.kMaxLength = 2147483647, u$1$1.TYPED_ARRAY_SUPPORT = (function() {
|
|
|
3811
3840
|
} catch (t6) {
|
|
3812
3841
|
return false;
|
|
3813
3842
|
}
|
|
3814
|
-
}
|
|
3843
|
+
}(), u$1$1.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || 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."), Object.defineProperty(u$1$1.prototype, "parent", { enumerable: true, get: function() {
|
|
3815
3844
|
if (u$1$1.isBuffer(this)) return this.buffer;
|
|
3816
3845
|
} }), Object.defineProperty(u$1$1.prototype, "offset", { enumerable: true, get: function() {
|
|
3817
3846
|
if (u$1$1.isBuffer(this)) return this.byteOffset;
|
|
3818
3847
|
} }), u$1$1.poolSize = 8192, u$1$1.from = function(t5, r5, e7) {
|
|
3819
3848
|
return s$12(t5, r5, e7);
|
|
3820
3849
|
}, Object.setPrototypeOf(u$1$1.prototype, Uint8Array.prototype), Object.setPrototypeOf(u$1$1, Uint8Array), u$1$1.alloc = function(t5, r5, e7) {
|
|
3821
|
-
return
|
|
3850
|
+
return function(t6, r6, e8) {
|
|
3822
3851
|
return h$1$1(t6), t6 <= 0 ? f$2(t6) : void 0 !== r6 ? "string" == typeof e8 ? f$2(t6).fill(r6, e8) : f$2(t6).fill(r6) : f$2(t6);
|
|
3823
|
-
}
|
|
3852
|
+
}(t5, r5, e7);
|
|
3824
3853
|
}, u$1$1.allocUnsafe = function(t5) {
|
|
3825
3854
|
return a$2(t5);
|
|
3826
3855
|
}, u$1$1.allocUnsafeSlow = function(t5) {
|
|
@@ -4164,11 +4193,11 @@ function _2(t5, r5) {
|
|
|
4164
4193
|
return o5;
|
|
4165
4194
|
}
|
|
4166
4195
|
function z2(t5) {
|
|
4167
|
-
return n$1$1.toByteArray(
|
|
4196
|
+
return n$1$1.toByteArray(function(t6) {
|
|
4168
4197
|
if ((t6 = (t6 = t6.split("=")[0]).trim().replace(j2, "")).length < 2) return "";
|
|
4169
4198
|
for (; t6.length % 4 != 0; ) t6 += "=";
|
|
4170
4199
|
return t6;
|
|
4171
|
-
}
|
|
4200
|
+
}(t5));
|
|
4172
4201
|
}
|
|
4173
4202
|
function D2(t5, r5, e7, n5) {
|
|
4174
4203
|
for (var i5 = 0; i5 < n5 && !(i5 + e7 >= r5.length || i5 >= t5.length); ++i5) r5[i5 + e7] = t5[i5];
|
|
@@ -4180,10 +4209,10 @@ function F2(t5, r5) {
|
|
|
4180
4209
|
function N2(t5) {
|
|
4181
4210
|
return t5 != t5;
|
|
4182
4211
|
}
|
|
4183
|
-
var Y2 =
|
|
4212
|
+
var Y2 = function() {
|
|
4184
4213
|
for (var t5 = new Array(256), r5 = 0; r5 < 16; ++r5) for (var e7 = 16 * r5, n5 = 0; n5 < 16; ++n5) t5[e7 + n5] = "0123456789abcdef"[r5] + "0123456789abcdef"[n5];
|
|
4185
4214
|
return t5;
|
|
4186
|
-
}
|
|
4215
|
+
}();
|
|
4187
4216
|
e$1$1.Buffer;
|
|
4188
4217
|
e$1$1.INSPECT_MAX_BYTES;
|
|
4189
4218
|
e$1$1.kMaxLength;
|
|
@@ -4233,8 +4262,8 @@ var i3 = s3.isEncoding || function(t5) {
|
|
|
4233
4262
|
};
|
|
4234
4263
|
function a3(t5) {
|
|
4235
4264
|
var e7;
|
|
4236
|
-
switch (this.encoding =
|
|
4237
|
-
var e8 =
|
|
4265
|
+
switch (this.encoding = function(t6) {
|
|
4266
|
+
var e8 = function(t7) {
|
|
4238
4267
|
if (!t7) return "utf8";
|
|
4239
4268
|
for (var e9; ; ) switch (t7) {
|
|
4240
4269
|
case "utf8":
|
|
@@ -4256,10 +4285,10 @@ function a3(t5) {
|
|
|
4256
4285
|
if (e9) return;
|
|
4257
4286
|
t7 = ("" + t7).toLowerCase(), e9 = true;
|
|
4258
4287
|
}
|
|
4259
|
-
}
|
|
4288
|
+
}(t6);
|
|
4260
4289
|
if ("string" != typeof e8 && (s3.isEncoding === i3 || !i3(t6))) throw new Error("Unknown encoding: " + t6);
|
|
4261
4290
|
return e8 || t6;
|
|
4262
|
-
}
|
|
4291
|
+
}(t5), this.encoding) {
|
|
4263
4292
|
case "utf16le":
|
|
4264
4293
|
this.text = h3, this.end = l3, e7 = 4;
|
|
4265
4294
|
break;
|
|
@@ -4278,13 +4307,13 @@ function r3(t5) {
|
|
|
4278
4307
|
return t5 <= 127 ? 0 : t5 >> 5 == 6 ? 2 : t5 >> 4 == 14 ? 3 : t5 >> 3 == 30 ? 4 : t5 >> 6 == 2 ? -1 : -2;
|
|
4279
4308
|
}
|
|
4280
4309
|
function n$12(t5) {
|
|
4281
|
-
var e7 = this.lastTotal - this.lastNeed, s5 =
|
|
4310
|
+
var e7 = this.lastTotal - this.lastNeed, s5 = function(t6, e8, s6) {
|
|
4282
4311
|
if (128 != (192 & e8[0])) return t6.lastNeed = 0, "\uFFFD";
|
|
4283
4312
|
if (t6.lastNeed > 1 && e8.length > 1) {
|
|
4284
4313
|
if (128 != (192 & e8[1])) return t6.lastNeed = 1, "\uFFFD";
|
|
4285
4314
|
if (t6.lastNeed > 2 && e8.length > 2 && 128 != (192 & e8[2])) return t6.lastNeed = 2, "\uFFFD";
|
|
4286
4315
|
}
|
|
4287
|
-
}
|
|
4316
|
+
}(this, t5);
|
|
4288
4317
|
return void 0 !== s5 ? s5 : this.lastNeed <= t5.length ? (t5.copy(this.lastChar, e7, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (t5.copy(this.lastChar, e7, 0, t5.length), this.lastNeed -= t5.length, void 0);
|
|
4289
4318
|
}
|
|
4290
4319
|
function h3(t5, e7) {
|
|
@@ -4332,7 +4361,7 @@ e$12.StringDecoder = a3, a3.prototype.write = function(t5) {
|
|
|
4332
4361
|
var e7 = t5 && t5.length ? this.write(t5) : "";
|
|
4333
4362
|
return this.lastNeed ? e7 + "\uFFFD" : e7;
|
|
4334
4363
|
}, a3.prototype.text = function(t5, e7) {
|
|
4335
|
-
var s5 =
|
|
4364
|
+
var s5 = function(t6, e8, s6) {
|
|
4336
4365
|
var i6 = e8.length - 1;
|
|
4337
4366
|
if (i6 < s6) return 0;
|
|
4338
4367
|
var a5 = r3(e8[i6]);
|
|
@@ -4342,7 +4371,7 @@ e$12.StringDecoder = a3, a3.prototype.write = function(t5) {
|
|
|
4342
4371
|
if (--i6 < s6 || -2 === a5) return 0;
|
|
4343
4372
|
if ((a5 = r3(e8[i6])) >= 0) return a5 > 0 && (2 === a5 ? a5 = 0 : t6.lastNeed = a5 - 3), a5;
|
|
4344
4373
|
return 0;
|
|
4345
|
-
}
|
|
4374
|
+
}(this, t5, e7);
|
|
4346
4375
|
if (!this.lastNeed) return t5.toString("utf8", e7);
|
|
4347
4376
|
this.lastTotal = s5;
|
|
4348
4377
|
var i5 = t5.length - (s5 - this.lastNeed);
|
|
@@ -6046,7 +6075,7 @@ function dew$g() {
|
|
|
6046
6075
|
function numberIsNaN(obj) {
|
|
6047
6076
|
return obj !== obj;
|
|
6048
6077
|
}
|
|
6049
|
-
const hexSliceLookupTable =
|
|
6078
|
+
const hexSliceLookupTable = function() {
|
|
6050
6079
|
const alphabet = "0123456789abcdef";
|
|
6051
6080
|
const table = new Array(256);
|
|
6052
6081
|
for (let i5 = 0; i5 < 16; ++i5) {
|
|
@@ -6056,7 +6085,7 @@ function dew$g() {
|
|
|
6056
6085
|
}
|
|
6057
6086
|
}
|
|
6058
6087
|
return table;
|
|
6059
|
-
}
|
|
6088
|
+
}();
|
|
6060
6089
|
function defineBigIntMethod(fn) {
|
|
6061
6090
|
return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
|
|
6062
6091
|
}
|
|
@@ -6180,7 +6209,7 @@ function dew$d() {
|
|
|
6180
6209
|
function copyBuffer(src, target, offset) {
|
|
6181
6210
|
Buffer2.prototype.copy.call(src, target, offset);
|
|
6182
6211
|
}
|
|
6183
|
-
exports$d = /* @__PURE__ */
|
|
6212
|
+
exports$d = /* @__PURE__ */ function() {
|
|
6184
6213
|
function BufferList() {
|
|
6185
6214
|
_classCallCheck(this, BufferList);
|
|
6186
6215
|
this.head = null;
|
|
@@ -6344,7 +6373,7 @@ function dew$d() {
|
|
|
6344
6373
|
}
|
|
6345
6374
|
}]);
|
|
6346
6375
|
return BufferList;
|
|
6347
|
-
}
|
|
6376
|
+
}();
|
|
6348
6377
|
return exports$d;
|
|
6349
6378
|
}
|
|
6350
6379
|
var exports$c = {};
|
|
@@ -8043,11 +8072,11 @@ function dew$3() {
|
|
|
8043
8072
|
});
|
|
8044
8073
|
for (var i5 in stream2) {
|
|
8045
8074
|
if (this[i5] === void 0 && typeof stream2[i5] === "function") {
|
|
8046
|
-
this[i5] = /* @__PURE__ */
|
|
8075
|
+
this[i5] = /* @__PURE__ */ function methodWrap(method) {
|
|
8047
8076
|
return function methodWrapReturnFunction() {
|
|
8048
8077
|
return stream2[method].apply(stream2, arguments);
|
|
8049
8078
|
};
|
|
8050
|
-
}
|
|
8079
|
+
}(i5);
|
|
8051
8080
|
}
|
|
8052
8081
|
}
|
|
8053
8082
|
for (var n5 = 0; n5 < kProxyEvents.length; n5++) {
|
|
@@ -8362,7 +8391,7 @@ function dew5() {
|
|
|
8362
8391
|
return exports6;
|
|
8363
8392
|
}
|
|
8364
8393
|
|
|
8365
|
-
// node_modules
|
|
8394
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-CbQqNoLO.js
|
|
8366
8395
|
X._extend;
|
|
8367
8396
|
X.callbackify;
|
|
8368
8397
|
X.debuglog;
|
|
@@ -8391,7 +8420,7 @@ X.types;
|
|
|
8391
8420
|
X.TextEncoder = globalThis.TextEncoder;
|
|
8392
8421
|
X.TextDecoder = globalThis.TextDecoder;
|
|
8393
8422
|
|
|
8394
|
-
// node_modules
|
|
8423
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-B6-G-Ftj.js
|
|
8395
8424
|
var exports$14 = {};
|
|
8396
8425
|
var _dewExec6 = false;
|
|
8397
8426
|
var _global3 = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
|
|
@@ -8493,7 +8522,7 @@ exports7.Stream;
|
|
|
8493
8522
|
pipeline: promisify2(exports7.pipeline)
|
|
8494
8523
|
});
|
|
8495
8524
|
|
|
8496
|
-
// node_modules
|
|
8525
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-C4rKjYLo.js
|
|
8497
8526
|
var exports8 = {};
|
|
8498
8527
|
var _dewExec7 = false;
|
|
8499
8528
|
function dew7() {
|
|
@@ -8511,7 +8540,7 @@ function dew7() {
|
|
|
8511
8540
|
return exports8;
|
|
8512
8541
|
}
|
|
8513
8542
|
|
|
8514
|
-
// node_modules
|
|
8543
|
+
// node_modules/@jspm/core/nodelibs/browser/chunk-BsRZ0PEC.js
|
|
8515
8544
|
var exports9 = {};
|
|
8516
8545
|
var _dewExec8 = false;
|
|
8517
8546
|
var _global4 = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
|
|
@@ -8552,7 +8581,7 @@ function dew8() {
|
|
|
8552
8581
|
return exports9;
|
|
8553
8582
|
}
|
|
8554
8583
|
|
|
8555
|
-
// node_modules
|
|
8584
|
+
// node_modules/@jspm/core/nodelibs/browser/vm.js
|
|
8556
8585
|
var exports$15 = {};
|
|
8557
8586
|
var _dewExec9 = false;
|
|
8558
8587
|
var _global5 = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
|
|
@@ -8580,7 +8609,7 @@ function dew9() {
|
|
|
8580
8609
|
fn(xs[i5], i5, xs);
|
|
8581
8610
|
}
|
|
8582
8611
|
};
|
|
8583
|
-
var defineProp =
|
|
8612
|
+
var defineProp = function() {
|
|
8584
8613
|
try {
|
|
8585
8614
|
Object.defineProperty({}, "_", {});
|
|
8586
8615
|
return function(obj, name2, value) {
|
|
@@ -8596,7 +8625,7 @@ function dew9() {
|
|
|
8596
8625
|
obj[name2] = value;
|
|
8597
8626
|
};
|
|
8598
8627
|
}
|
|
8599
|
-
}
|
|
8628
|
+
}();
|
|
8600
8629
|
var globals = ["Array", "Boolean", "Date", "Error", "EvalError", "Function", "Infinity", "JSON", "Math", "NaN", "Number", "Object", "RangeError", "ReferenceError", "RegExp", "String", "SyntaxError", "TypeError", "URIError", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "undefined", "unescape"];
|
|
8601
8630
|
function Context() {
|
|
8602
8631
|
}
|
|
@@ -8691,7 +8720,7 @@ var runInContext = exports10.runInContext;
|
|
|
8691
8720
|
var runInNewContext = exports10.runInNewContext;
|
|
8692
8721
|
var runInThisContext = exports10.runInThisContext;
|
|
8693
8722
|
|
|
8694
|
-
// node_modules
|
|
8723
|
+
// node_modules/@jspm/core/nodelibs/browser/crypto.js
|
|
8695
8724
|
var exports$3H = {};
|
|
8696
8725
|
var _dewExec$3G = false;
|
|
8697
8726
|
var _global$1e = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
|
|
@@ -10661,7 +10690,7 @@ function dew$3f() {
|
|
|
10661
10690
|
_dewExec$3f = true;
|
|
10662
10691
|
var assert2 = dew$3h();
|
|
10663
10692
|
var inherits = dew3();
|
|
10664
|
-
var
|
|
10693
|
+
var utils = dew$3i();
|
|
10665
10694
|
var Cipher2 = dew$3g();
|
|
10666
10695
|
function DESState() {
|
|
10667
10696
|
this.tmp = new Array(2);
|
|
@@ -10682,31 +10711,31 @@ function dew$3f() {
|
|
|
10682
10711
|
DES.prototype.deriveKeys = function deriveKeys(state, key) {
|
|
10683
10712
|
state.keys = new Array(16 * 2);
|
|
10684
10713
|
assert2.equal(key.length, this.blockSize, "Invalid key length");
|
|
10685
|
-
var kL =
|
|
10686
|
-
var kR =
|
|
10687
|
-
|
|
10714
|
+
var kL = utils.readUInt32BE(key, 0);
|
|
10715
|
+
var kR = utils.readUInt32BE(key, 4);
|
|
10716
|
+
utils.pc1(kL, kR, state.tmp, 0);
|
|
10688
10717
|
kL = state.tmp[0];
|
|
10689
10718
|
kR = state.tmp[1];
|
|
10690
10719
|
for (var i5 = 0; i5 < state.keys.length; i5 += 2) {
|
|
10691
10720
|
var shift = shiftTable[i5 >>> 1];
|
|
10692
|
-
kL =
|
|
10693
|
-
kR =
|
|
10694
|
-
|
|
10721
|
+
kL = utils.r28shl(kL, shift);
|
|
10722
|
+
kR = utils.r28shl(kR, shift);
|
|
10723
|
+
utils.pc2(kL, kR, state.keys, i5);
|
|
10695
10724
|
}
|
|
10696
10725
|
};
|
|
10697
10726
|
DES.prototype._update = function _update(inp, inOff, out, outOff) {
|
|
10698
10727
|
var state = this._desState;
|
|
10699
|
-
var l5 =
|
|
10700
|
-
var r5 =
|
|
10701
|
-
|
|
10728
|
+
var l5 = utils.readUInt32BE(inp, inOff);
|
|
10729
|
+
var r5 = utils.readUInt32BE(inp, inOff + 4);
|
|
10730
|
+
utils.ip(l5, r5, state.tmp, 0);
|
|
10702
10731
|
l5 = state.tmp[0];
|
|
10703
10732
|
r5 = state.tmp[1];
|
|
10704
10733
|
if (this.type === "encrypt") this._encrypt(state, l5, r5, state.tmp, 0);
|
|
10705
10734
|
else this._decrypt(state, l5, r5, state.tmp, 0);
|
|
10706
10735
|
l5 = state.tmp[0];
|
|
10707
10736
|
r5 = state.tmp[1];
|
|
10708
|
-
|
|
10709
|
-
|
|
10737
|
+
utils.writeUInt32BE(out, l5, outOff);
|
|
10738
|
+
utils.writeUInt32BE(out, r5, outOff + 4);
|
|
10710
10739
|
};
|
|
10711
10740
|
DES.prototype._pad = function _pad(buffer2, off2) {
|
|
10712
10741
|
if (this.padding === false) {
|
|
@@ -10730,16 +10759,16 @@ function dew$3f() {
|
|
|
10730
10759
|
for (var i5 = 0; i5 < state.keys.length; i5 += 2) {
|
|
10731
10760
|
var keyL = state.keys[i5];
|
|
10732
10761
|
var keyR = state.keys[i5 + 1];
|
|
10733
|
-
|
|
10762
|
+
utils.expand(r5, state.tmp, 0);
|
|
10734
10763
|
keyL ^= state.tmp[0];
|
|
10735
10764
|
keyR ^= state.tmp[1];
|
|
10736
|
-
var s5 =
|
|
10737
|
-
var f6 =
|
|
10765
|
+
var s5 = utils.substitute(keyL, keyR);
|
|
10766
|
+
var f6 = utils.permute(s5);
|
|
10738
10767
|
var t5 = r5;
|
|
10739
10768
|
r5 = (l5 ^ f6) >>> 0;
|
|
10740
10769
|
l5 = t5;
|
|
10741
10770
|
}
|
|
10742
|
-
|
|
10771
|
+
utils.rip(r5, l5, out, off2);
|
|
10743
10772
|
};
|
|
10744
10773
|
DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off2) {
|
|
10745
10774
|
var l5 = rStart;
|
|
@@ -10747,16 +10776,16 @@ function dew$3f() {
|
|
|
10747
10776
|
for (var i5 = state.keys.length - 2; i5 >= 0; i5 -= 2) {
|
|
10748
10777
|
var keyL = state.keys[i5];
|
|
10749
10778
|
var keyR = state.keys[i5 + 1];
|
|
10750
|
-
|
|
10779
|
+
utils.expand(l5, state.tmp, 0);
|
|
10751
10780
|
keyL ^= state.tmp[0];
|
|
10752
10781
|
keyR ^= state.tmp[1];
|
|
10753
|
-
var s5 =
|
|
10754
|
-
var f6 =
|
|
10782
|
+
var s5 = utils.substitute(keyL, keyR);
|
|
10783
|
+
var f6 = utils.permute(s5);
|
|
10755
10784
|
var t5 = l5;
|
|
10756
10785
|
l5 = (r5 ^ f6) >>> 0;
|
|
10757
10786
|
r5 = t5;
|
|
10758
10787
|
}
|
|
10759
|
-
|
|
10788
|
+
utils.rip(l5, r5, out, off2);
|
|
10760
10789
|
};
|
|
10761
10790
|
return exports$3g;
|
|
10762
10791
|
}
|
|
@@ -11426,7 +11455,7 @@ function dew$30() {
|
|
|
11426
11455
|
return [t0, t1, t22, t32];
|
|
11427
11456
|
}
|
|
11428
11457
|
var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
|
|
11429
|
-
var G3 =
|
|
11458
|
+
var G3 = function() {
|
|
11430
11459
|
var d4 = new Array(256);
|
|
11431
11460
|
for (var j4 = 0; j4 < 256; j4++) {
|
|
11432
11461
|
if (j4 < 128) {
|
|
@@ -11472,7 +11501,7 @@ function dew$30() {
|
|
|
11472
11501
|
SUB_MIX,
|
|
11473
11502
|
INV_SUB_MIX
|
|
11474
11503
|
};
|
|
11475
|
-
}
|
|
11504
|
+
}();
|
|
11476
11505
|
function AES(key) {
|
|
11477
11506
|
(this || _global$11)._key = asUInt32Array(key);
|
|
11478
11507
|
this._reset();
|
|
@@ -18687,7 +18716,7 @@ function dew$d$2() {
|
|
|
18687
18716
|
function copyBuffer(src, target, offset) {
|
|
18688
18717
|
Buffer2.prototype.copy.call(src, target, offset);
|
|
18689
18718
|
}
|
|
18690
|
-
exports$d$2 = /* @__PURE__ */
|
|
18719
|
+
exports$d$2 = /* @__PURE__ */ function() {
|
|
18691
18720
|
function BufferList() {
|
|
18692
18721
|
_classCallCheck(this, BufferList);
|
|
18693
18722
|
this.head = null;
|
|
@@ -18851,7 +18880,7 @@ function dew$d$2() {
|
|
|
18851
18880
|
}
|
|
18852
18881
|
}]);
|
|
18853
18882
|
return BufferList;
|
|
18854
|
-
}
|
|
18883
|
+
}();
|
|
18855
18884
|
return exports$d$2;
|
|
18856
18885
|
}
|
|
18857
18886
|
var exports$c$2 = {};
|
|
@@ -20550,11 +20579,11 @@ function dew$3$2() {
|
|
|
20550
20579
|
});
|
|
20551
20580
|
for (var i5 in stream2) {
|
|
20552
20581
|
if (this[i5] === void 0 && typeof stream2[i5] === "function") {
|
|
20553
|
-
this[i5] = /* @__PURE__ */
|
|
20582
|
+
this[i5] = /* @__PURE__ */ function methodWrap(method) {
|
|
20554
20583
|
return function methodWrapReturnFunction() {
|
|
20555
20584
|
return stream2[method].apply(stream2, arguments);
|
|
20556
20585
|
};
|
|
20557
|
-
}
|
|
20586
|
+
}(i5);
|
|
20558
20587
|
}
|
|
20559
20588
|
}
|
|
20560
20589
|
for (var n5 = 0; n5 < kProxyEvents.length; n5++) {
|
|
@@ -21962,7 +21991,7 @@ function dew$2k() {
|
|
|
21962
21991
|
_dewExec$2k = true;
|
|
21963
21992
|
var assert2 = dew$2m();
|
|
21964
21993
|
var inherits = dew$f();
|
|
21965
|
-
var
|
|
21994
|
+
var utils = dew$2n();
|
|
21966
21995
|
var Cipher2 = dew$2l();
|
|
21967
21996
|
function DESState() {
|
|
21968
21997
|
this.tmp = new Array(2);
|
|
@@ -21983,31 +22012,31 @@ function dew$2k() {
|
|
|
21983
22012
|
DES.prototype.deriveKeys = function deriveKeys(state, key) {
|
|
21984
22013
|
state.keys = new Array(16 * 2);
|
|
21985
22014
|
assert2.equal(key.length, this.blockSize, "Invalid key length");
|
|
21986
|
-
var kL =
|
|
21987
|
-
var kR =
|
|
21988
|
-
|
|
22015
|
+
var kL = utils.readUInt32BE(key, 0);
|
|
22016
|
+
var kR = utils.readUInt32BE(key, 4);
|
|
22017
|
+
utils.pc1(kL, kR, state.tmp, 0);
|
|
21989
22018
|
kL = state.tmp[0];
|
|
21990
22019
|
kR = state.tmp[1];
|
|
21991
22020
|
for (var i5 = 0; i5 < state.keys.length; i5 += 2) {
|
|
21992
22021
|
var shift = shiftTable[i5 >>> 1];
|
|
21993
|
-
kL =
|
|
21994
|
-
kR =
|
|
21995
|
-
|
|
22022
|
+
kL = utils.r28shl(kL, shift);
|
|
22023
|
+
kR = utils.r28shl(kR, shift);
|
|
22024
|
+
utils.pc2(kL, kR, state.keys, i5);
|
|
21996
22025
|
}
|
|
21997
22026
|
};
|
|
21998
22027
|
DES.prototype._update = function _update(inp, inOff, out, outOff) {
|
|
21999
22028
|
var state = this._desState;
|
|
22000
|
-
var l5 =
|
|
22001
|
-
var r5 =
|
|
22002
|
-
|
|
22029
|
+
var l5 = utils.readUInt32BE(inp, inOff);
|
|
22030
|
+
var r5 = utils.readUInt32BE(inp, inOff + 4);
|
|
22031
|
+
utils.ip(l5, r5, state.tmp, 0);
|
|
22003
22032
|
l5 = state.tmp[0];
|
|
22004
22033
|
r5 = state.tmp[1];
|
|
22005
22034
|
if (this.type === "encrypt") this._encrypt(state, l5, r5, state.tmp, 0);
|
|
22006
22035
|
else this._decrypt(state, l5, r5, state.tmp, 0);
|
|
22007
22036
|
l5 = state.tmp[0];
|
|
22008
22037
|
r5 = state.tmp[1];
|
|
22009
|
-
|
|
22010
|
-
|
|
22038
|
+
utils.writeUInt32BE(out, l5, outOff);
|
|
22039
|
+
utils.writeUInt32BE(out, r5, outOff + 4);
|
|
22011
22040
|
};
|
|
22012
22041
|
DES.prototype._pad = function _pad(buffer2, off2) {
|
|
22013
22042
|
var value = buffer2.length - off2;
|
|
@@ -22025,16 +22054,16 @@ function dew$2k() {
|
|
|
22025
22054
|
for (var i5 = 0; i5 < state.keys.length; i5 += 2) {
|
|
22026
22055
|
var keyL = state.keys[i5];
|
|
22027
22056
|
var keyR = state.keys[i5 + 1];
|
|
22028
|
-
|
|
22057
|
+
utils.expand(r5, state.tmp, 0);
|
|
22029
22058
|
keyL ^= state.tmp[0];
|
|
22030
22059
|
keyR ^= state.tmp[1];
|
|
22031
|
-
var s5 =
|
|
22032
|
-
var f6 =
|
|
22060
|
+
var s5 = utils.substitute(keyL, keyR);
|
|
22061
|
+
var f6 = utils.permute(s5);
|
|
22033
22062
|
var t5 = r5;
|
|
22034
22063
|
r5 = (l5 ^ f6) >>> 0;
|
|
22035
22064
|
l5 = t5;
|
|
22036
22065
|
}
|
|
22037
|
-
|
|
22066
|
+
utils.rip(r5, l5, out, off2);
|
|
22038
22067
|
};
|
|
22039
22068
|
DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off2) {
|
|
22040
22069
|
var l5 = rStart;
|
|
@@ -22042,16 +22071,16 @@ function dew$2k() {
|
|
|
22042
22071
|
for (var i5 = state.keys.length - 2; i5 >= 0; i5 -= 2) {
|
|
22043
22072
|
var keyL = state.keys[i5];
|
|
22044
22073
|
var keyR = state.keys[i5 + 1];
|
|
22045
|
-
|
|
22074
|
+
utils.expand(l5, state.tmp, 0);
|
|
22046
22075
|
keyL ^= state.tmp[0];
|
|
22047
22076
|
keyR ^= state.tmp[1];
|
|
22048
|
-
var s5 =
|
|
22049
|
-
var f6 =
|
|
22077
|
+
var s5 = utils.substitute(keyL, keyR);
|
|
22078
|
+
var f6 = utils.permute(s5);
|
|
22050
22079
|
var t5 = l5;
|
|
22051
22080
|
l5 = (r5 ^ f6) >>> 0;
|
|
22052
22081
|
r5 = t5;
|
|
22053
22082
|
}
|
|
22054
|
-
|
|
22083
|
+
utils.rip(l5, r5, out, off2);
|
|
22055
22084
|
};
|
|
22056
22085
|
return exports$2l;
|
|
22057
22086
|
}
|
|
@@ -22721,7 +22750,7 @@ function dew$25() {
|
|
|
22721
22750
|
return [t0, t1, t22, t32];
|
|
22722
22751
|
}
|
|
22723
22752
|
var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
|
|
22724
|
-
var G3 =
|
|
22753
|
+
var G3 = function() {
|
|
22725
22754
|
var d4 = new Array(256);
|
|
22726
22755
|
for (var j4 = 0; j4 < 256; j4++) {
|
|
22727
22756
|
if (j4 < 128) {
|
|
@@ -22767,7 +22796,7 @@ function dew$25() {
|
|
|
22767
22796
|
SUB_MIX,
|
|
22768
22797
|
INV_SUB_MIX
|
|
22769
22798
|
};
|
|
22770
|
-
}
|
|
22799
|
+
}();
|
|
22771
22800
|
function AES(key) {
|
|
22772
22801
|
(this || _global$F)._key = asUInt32Array(key);
|
|
22773
22802
|
this._reset();
|
|
@@ -29836,9 +29865,9 @@ function n$q(e7, n5, r5) {
|
|
|
29836
29865
|
r5 || (r5 = Error);
|
|
29837
29866
|
class o5 extends r5 {
|
|
29838
29867
|
constructor(e8, t5, r6) {
|
|
29839
|
-
super(
|
|
29868
|
+
super(function(e9, t6, r7) {
|
|
29840
29869
|
return "string" == typeof n5 ? n5 : n5(e9, t6, r7);
|
|
29841
|
-
}
|
|
29870
|
+
}(e8, t5, r6));
|
|
29842
29871
|
}
|
|
29843
29872
|
}
|
|
29844
29873
|
o5.prototype.name = r5.name, o5.prototype.code = e7, t$c[e7] = o5;
|
|
@@ -29850,28 +29879,28 @@ function r$h(e7, t5) {
|
|
|
29850
29879
|
}
|
|
29851
29880
|
return `of ${t5} ${String(e7)}`;
|
|
29852
29881
|
}
|
|
29853
|
-
n$q("ERR_INVALID_OPT_VALUE",
|
|
29882
|
+
n$q("ERR_INVALID_OPT_VALUE", function(e7, t5) {
|
|
29854
29883
|
return 'The value "' + t5 + '" is invalid for option "' + e7 + '"';
|
|
29855
|
-
}
|
|
29884
|
+
}, TypeError), n$q("ERR_INVALID_ARG_TYPE", function(e7, t5, n5) {
|
|
29856
29885
|
let o5;
|
|
29857
29886
|
var E4;
|
|
29858
29887
|
let u5;
|
|
29859
|
-
if ("string" == typeof t5 && (E4 = "not ", t5.substr(0, E4.length) === E4) ? (o5 = "must not be", t5 = t5.replace(/^not /, "")) : o5 = "must be",
|
|
29888
|
+
if ("string" == typeof t5 && (E4 = "not ", t5.substr(0, E4.length) === E4) ? (o5 = "must not be", t5 = t5.replace(/^not /, "")) : o5 = "must be", function(e8, t6, n6) {
|
|
29860
29889
|
return (void 0 === n6 || n6 > e8.length) && (n6 = e8.length), e8.substring(n6 - t6.length, n6) === t6;
|
|
29861
|
-
}
|
|
29890
|
+
}(e7, " argument")) u5 = `The ${e7} ${o5} ${r$h(t5, "type")}`;
|
|
29862
29891
|
else {
|
|
29863
|
-
u5 = `The "${e7}" ${
|
|
29892
|
+
u5 = `The "${e7}" ${function(e8, t6, n6) {
|
|
29864
29893
|
return "number" != typeof n6 && (n6 = 0), !(n6 + t6.length > e8.length) && -1 !== e8.indexOf(t6, n6);
|
|
29865
|
-
}
|
|
29894
|
+
}(e7, ".") ? "property" : "argument"} ${o5} ${r$h(t5, "type")}`;
|
|
29866
29895
|
}
|
|
29867
29896
|
return u5 += `. Received type ${typeof n5}`, u5;
|
|
29868
|
-
}
|
|
29897
|
+
}, TypeError), n$q("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), n$q("ERR_METHOD_NOT_IMPLEMENTED", function(e7) {
|
|
29869
29898
|
return "The " + e7 + " method is not implemented";
|
|
29870
|
-
})
|
|
29899
|
+
}), n$q("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), n$q("ERR_STREAM_DESTROYED", function(e7) {
|
|
29871
29900
|
return "Cannot call " + e7 + " after a stream was destroyed";
|
|
29872
|
-
})
|
|
29901
|
+
}), n$q("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), n$q("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), n$q("ERR_STREAM_WRITE_AFTER_END", "write after end"), n$q("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), n$q("ERR_UNKNOWN_ENCODING", function(e7) {
|
|
29873
29902
|
return "Unknown encoding: " + e7;
|
|
29874
|
-
}
|
|
29903
|
+
}, TypeError), n$q("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), e$1$12.codes = t$c;
|
|
29875
29904
|
var r$1$1 = function() {
|
|
29876
29905
|
throw new Error("Readable.from is not available in the browser");
|
|
29877
29906
|
};
|
|
@@ -29900,9 +29929,9 @@ function u$p(e7, t5) {
|
|
|
29900
29929
|
var n5 = Object.keys(e7);
|
|
29901
29930
|
if (Object.getOwnPropertySymbols) {
|
|
29902
29931
|
var r5 = Object.getOwnPropertySymbols(e7);
|
|
29903
|
-
t5 && (r5 = r5.filter(
|
|
29932
|
+
t5 && (r5 = r5.filter(function(t6) {
|
|
29904
29933
|
return Object.getOwnPropertyDescriptor(e7, t6).enumerable;
|
|
29905
|
-
}))
|
|
29934
|
+
})), n5.push.apply(n5, r5);
|
|
29906
29935
|
}
|
|
29907
29936
|
return n5;
|
|
29908
29937
|
}
|
|
@@ -29918,11 +29947,11 @@ function h$l(e7, t5) {
|
|
|
29918
29947
|
var c$n = e$1$1.Buffer;
|
|
29919
29948
|
var b$j = X.inspect;
|
|
29920
29949
|
var p$s = b$j && b$j.custom || "inspect";
|
|
29921
|
-
var g$h =
|
|
29950
|
+
var g$h = function() {
|
|
29922
29951
|
function e7() {
|
|
29923
|
-
!
|
|
29952
|
+
!function(e8, t6) {
|
|
29924
29953
|
if (!(e8 instanceof t6)) throw new TypeError("Cannot call a class as a function");
|
|
29925
|
-
}
|
|
29954
|
+
}(this, e7), this.head = null, this.tail = null, this.length = 0;
|
|
29926
29955
|
}
|
|
29927
29956
|
var t5, n5;
|
|
29928
29957
|
return t5 = e7, (n5 = [{ key: "push", value: function(e8) {
|
|
@@ -29974,19 +30003,19 @@ var g$h = (function() {
|
|
|
29974
30003
|
}
|
|
29975
30004
|
return this.length -= r5, t6;
|
|
29976
30005
|
} }, { key: p$s, value: function(e8, t6) {
|
|
29977
|
-
return b$j(this,
|
|
30006
|
+
return b$j(this, function(e9) {
|
|
29978
30007
|
for (var t7 = 1; t7 < arguments.length; t7++) {
|
|
29979
30008
|
var n6 = null != arguments[t7] ? arguments[t7] : {};
|
|
29980
|
-
t7 % 2 ? u$p(Object(n6), true).forEach(
|
|
30009
|
+
t7 % 2 ? u$p(Object(n6), true).forEach(function(t8) {
|
|
29981
30010
|
f$v(e9, t8, n6[t8]);
|
|
29982
|
-
})
|
|
30011
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e9, Object.getOwnPropertyDescriptors(n6)) : u$p(Object(n6)).forEach(function(t8) {
|
|
29983
30012
|
Object.defineProperty(e9, t8, Object.getOwnPropertyDescriptor(n6, t8));
|
|
29984
|
-
})
|
|
30013
|
+
});
|
|
29985
30014
|
}
|
|
29986
30015
|
return e9;
|
|
29987
|
-
}
|
|
30016
|
+
}({}, t6, { depth: 0, customInspect: false }));
|
|
29988
30017
|
} }]) && h$l(t5.prototype, n5), e7;
|
|
29989
|
-
}
|
|
30018
|
+
}();
|
|
29990
30019
|
var y$n = T$1;
|
|
29991
30020
|
function w$j(e7, t5) {
|
|
29992
30021
|
_$h(e7, t5), v$k(e7);
|
|
@@ -29999,9 +30028,9 @@ function _$h(e7, t5) {
|
|
|
29999
30028
|
}
|
|
30000
30029
|
var m$m = { destroy: function(e7, t5) {
|
|
30001
30030
|
var n5 = this, r5 = this._readableState && this._readableState.destroyed, i5 = this._writableState && this._writableState.destroyed;
|
|
30002
|
-
return r5 || i5 ? (t5 ? t5(e7) : e7 && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = true, y$n.nextTick(_$h, this, e7)) : y$n.nextTick(_$h, this, e7)), this) : (this._readableState && (this._readableState.destroyed = true), this._writableState && (this._writableState.destroyed = true), this._destroy(e7 || null,
|
|
30031
|
+
return r5 || i5 ? (t5 ? t5(e7) : e7 && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = true, y$n.nextTick(_$h, this, e7)) : y$n.nextTick(_$h, this, e7)), this) : (this._readableState && (this._readableState.destroyed = true), this._writableState && (this._writableState.destroyed = true), this._destroy(e7 || null, function(e8) {
|
|
30003
30032
|
!t5 && e8 ? n5._writableState ? n5._writableState.errorEmitted ? y$n.nextTick(v$k, n5) : (n5._writableState.errorEmitted = true, y$n.nextTick(w$j, n5, e8)) : y$n.nextTick(w$j, n5, e8) : t5 ? (y$n.nextTick(v$k, n5), t5(e8)) : y$n.nextTick(v$k, n5);
|
|
30004
|
-
})
|
|
30033
|
+
}), this);
|
|
30005
30034
|
}, undestroy: function() {
|
|
30006
30035
|
this._readableState && (this._readableState.destroyed = false, this._readableState.reading = false, this._readableState.ended = false, this._readableState.endEmitted = false), this._writableState && (this._writableState.destroyed = false, this._writableState.ended = false, this._writableState.ending = false, this._writableState.finalCalled = false, this._writableState.prefinished = false, this._writableState.finished = false, this._writableState.errorEmitted = false);
|
|
30007
30036
|
}, errorOrDestroy: function(e7, t5) {
|
|
@@ -30010,9 +30039,9 @@ var m$m = { destroy: function(e7, t5) {
|
|
|
30010
30039
|
} };
|
|
30011
30040
|
var S$e = e$1$12.codes.ERR_INVALID_OPT_VALUE;
|
|
30012
30041
|
var R$7 = { getHighWaterMark: function(e7, t5, n5, r5) {
|
|
30013
|
-
var i5 =
|
|
30042
|
+
var i5 = function(e8, t6, n6) {
|
|
30014
30043
|
return null != e8.highWaterMark ? e8.highWaterMark : t6 ? e8[n6] : null;
|
|
30015
|
-
}
|
|
30044
|
+
}(t5, r5, n5);
|
|
30016
30045
|
if (null != i5) {
|
|
30017
30046
|
if (!isFinite(i5) || Math.floor(i5) !== i5 || i5 < 0) throw new S$e(r5 ? n5 : "highWaterMark", i5);
|
|
30018
30047
|
return Math.floor(i5);
|
|
@@ -30025,7 +30054,7 @@ function E$e() {
|
|
|
30025
30054
|
var M$a;
|
|
30026
30055
|
var j$a = function e4(t5, n5, r5) {
|
|
30027
30056
|
if ("function" == typeof n5) return e4(t5, null, n5);
|
|
30028
|
-
n5 || (n5 = {}), r5 = /* @__PURE__ */
|
|
30057
|
+
n5 || (n5 = {}), r5 = /* @__PURE__ */ function(e7) {
|
|
30029
30058
|
var t6 = false;
|
|
30030
30059
|
return function() {
|
|
30031
30060
|
if (!t6) {
|
|
@@ -30034,7 +30063,7 @@ var j$a = function e4(t5, n5, r5) {
|
|
|
30034
30063
|
e7.apply(this, r6);
|
|
30035
30064
|
}
|
|
30036
30065
|
};
|
|
30037
|
-
}
|
|
30066
|
+
}(r5 || E$e);
|
|
30038
30067
|
var i5 = n5.readable || false !== n5.readable && t5.readable, a5 = n5.writable || false !== n5.writable && t5.writable, o5 = function() {
|
|
30039
30068
|
t5.writable || l5();
|
|
30040
30069
|
}, s5 = t5._writableState && t5._writableState.finished, l5 = function() {
|
|
@@ -30049,9 +30078,9 @@ var j$a = function e4(t5, n5, r5) {
|
|
|
30049
30078
|
}, c5 = function() {
|
|
30050
30079
|
t5.req.on("finish", l5);
|
|
30051
30080
|
};
|
|
30052
|
-
return !
|
|
30081
|
+
return !function(e7) {
|
|
30053
30082
|
return e7.setHeader && "function" == typeof e7.abort;
|
|
30054
|
-
}
|
|
30083
|
+
}(t5) ? a5 && !t5._writableState && (t5.on("end", o5), t5.on("close", o5)) : (t5.on("complete", l5), t5.on("abort", h5), t5.req ? c5() : t5.on("request", c5)), t5.on("end", u5), t5.on("finish", l5), false !== n5.error && t5.on("error", f6), t5.on("close", h5), function() {
|
|
30055
30084
|
t5.removeListener("complete", l5), t5.removeListener("abort", h5), t5.removeListener("request", c5), t5.req && t5.req.removeListener("finish", l5), t5.removeListener("end", o5), t5.removeListener("close", o5), t5.removeListener("finish", l5), t5.removeListener("end", u5), t5.removeListener("error", f6), t5.removeListener("close", h5);
|
|
30056
30085
|
};
|
|
30057
30086
|
};
|
|
@@ -30080,58 +30109,58 @@ function I$b(e7) {
|
|
|
30080
30109
|
function N$7(e7) {
|
|
30081
30110
|
O$8.nextTick(I$b, e7);
|
|
30082
30111
|
}
|
|
30083
|
-
var U$a = Object.getPrototypeOf(
|
|
30084
|
-
})
|
|
30112
|
+
var U$a = Object.getPrototypeOf(function() {
|
|
30113
|
+
});
|
|
30085
30114
|
var H$7 = Object.setPrototypeOf((T$8(M$a = { get stream() {
|
|
30086
30115
|
return this[W$5];
|
|
30087
30116
|
}, next: function() {
|
|
30088
30117
|
var e7 = this, t5 = this[D$9];
|
|
30089
30118
|
if (null !== t5) return Promise.reject(t5);
|
|
30090
30119
|
if (this[C$9]) return Promise.resolve(B$c(void 0, true));
|
|
30091
|
-
if (this[W$5].destroyed) return new Promise(
|
|
30092
|
-
O$8.nextTick(
|
|
30120
|
+
if (this[W$5].destroyed) return new Promise(function(t6, n6) {
|
|
30121
|
+
O$8.nextTick(function() {
|
|
30093
30122
|
e7[D$9] ? n6(e7[D$9]) : t6(B$c(void 0, true));
|
|
30094
|
-
})
|
|
30095
|
-
})
|
|
30123
|
+
});
|
|
30124
|
+
});
|
|
30096
30125
|
var n5, r5 = this[A$c];
|
|
30097
|
-
if (r5) n5 = new Promise(/* @__PURE__ */
|
|
30126
|
+
if (r5) n5 = new Promise(/* @__PURE__ */ function(e8, t6) {
|
|
30098
30127
|
return function(n6, r6) {
|
|
30099
|
-
e8.then(
|
|
30128
|
+
e8.then(function() {
|
|
30100
30129
|
if (t6[C$9]) return n6(B$c(void 0, true)), void 0;
|
|
30101
30130
|
t6[q$8](n6, r6);
|
|
30102
|
-
}
|
|
30131
|
+
}, r6);
|
|
30103
30132
|
};
|
|
30104
|
-
}
|
|
30133
|
+
}(r5, this));
|
|
30105
30134
|
else {
|
|
30106
30135
|
var i5 = this[W$5].read();
|
|
30107
30136
|
if (null !== i5) return Promise.resolve(B$c(i5, false));
|
|
30108
30137
|
n5 = new Promise(this[q$8]);
|
|
30109
30138
|
}
|
|
30110
30139
|
return this[A$c] = n5, n5;
|
|
30111
|
-
} }, Symbol.asyncIterator,
|
|
30140
|
+
} }, Symbol.asyncIterator, function() {
|
|
30112
30141
|
return this;
|
|
30113
|
-
})
|
|
30142
|
+
}), T$8(M$a, "return", function() {
|
|
30114
30143
|
var e7 = this;
|
|
30115
|
-
return new Promise(
|
|
30116
|
-
e7[W$5].destroy(null,
|
|
30144
|
+
return new Promise(function(t5, n5) {
|
|
30145
|
+
e7[W$5].destroy(null, function(e8) {
|
|
30117
30146
|
if (e8) return n5(e8), void 0;
|
|
30118
30147
|
t5(B$c(void 0, true));
|
|
30119
|
-
})
|
|
30120
|
-
})
|
|
30121
|
-
})
|
|
30148
|
+
});
|
|
30149
|
+
});
|
|
30150
|
+
}), M$a), U$a);
|
|
30122
30151
|
var F$8 = function(e7) {
|
|
30123
30152
|
var t5, n5 = Object.create(H$7, (T$8(t5 = {}, W$5, { value: e7, writable: true }), T$8(t5, x$a, { value: null, writable: true }), T$8(t5, L$8, { value: null, writable: true }), T$8(t5, D$9, { value: null, writable: true }), T$8(t5, C$9, { value: e7._readableState.endEmitted, writable: true }), T$8(t5, q$8, { value: function(e8, t6) {
|
|
30124
30153
|
var r5 = n5[W$5].read();
|
|
30125
30154
|
r5 ? (n5[A$c] = null, n5[x$a] = null, n5[L$8] = null, e8(B$c(r5, false))) : (n5[x$a] = e8, n5[L$8] = t6);
|
|
30126
30155
|
}, writable: true }), t5));
|
|
30127
|
-
return n5[A$c] = null, P$8(e7,
|
|
30156
|
+
return n5[A$c] = null, P$8(e7, function(e8) {
|
|
30128
30157
|
if (e8 && "ERR_STREAM_PREMATURE_CLOSE" !== e8.code) {
|
|
30129
30158
|
var t6 = n5[L$8];
|
|
30130
30159
|
return null !== t6 && (n5[A$c] = null, n5[x$a] = null, n5[L$8] = null, t6(e8)), n5[D$9] = e8, void 0;
|
|
30131
30160
|
}
|
|
30132
30161
|
var r5 = n5[x$a];
|
|
30133
30162
|
null !== r5 && (n5[A$c] = null, n5[x$a] = null, n5[L$8] = null, r5(B$c(void 0, true))), n5[C$9] = true;
|
|
30134
|
-
})
|
|
30163
|
+
}), e7.on("readable", N$7.bind(null, n5)), n5;
|
|
30135
30164
|
};
|
|
30136
30165
|
var V$6 = {};
|
|
30137
30166
|
var G$5 = false;
|
|
@@ -30163,23 +30192,23 @@ function K$8() {
|
|
|
30163
30192
|
function A4(e7, t5, n5, r5, i5) {
|
|
30164
30193
|
p5("readableAddChunk", t5);
|
|
30165
30194
|
var a5, o5 = e7._readableState;
|
|
30166
|
-
if (null === t5) o5.reading = false,
|
|
30195
|
+
if (null === t5) o5.reading = false, function(e8, t6) {
|
|
30167
30196
|
if (p5("onEofChunk"), t6.ended) return;
|
|
30168
30197
|
if (t6.decoder) {
|
|
30169
30198
|
var n6 = t6.decoder.end();
|
|
30170
30199
|
n6 && n6.length && (t6.buffer.push(n6), t6.length += t6.objectMode ? 1 : n6.length);
|
|
30171
30200
|
}
|
|
30172
30201
|
t6.ended = true, t6.sync ? B4(e8) : (t6.needReadable = false, t6.emittedReadable || (t6.emittedReadable = true, I4(e8)));
|
|
30173
|
-
}
|
|
30174
|
-
else if (i5 || (a5 =
|
|
30202
|
+
}(e7, o5);
|
|
30203
|
+
else if (i5 || (a5 = function(e8, t6) {
|
|
30175
30204
|
var n6;
|
|
30176
30205
|
r6 = t6, c5.isBuffer(r6) || r6 instanceof b4 || "string" == typeof t6 || void 0 === t6 || e8.objectMode || (n6 = new j4("chunk", ["string", "Buffer", "Uint8Array"], t6));
|
|
30177
30206
|
var r6;
|
|
30178
30207
|
return n6;
|
|
30179
|
-
}
|
|
30180
|
-
else if (o5.objectMode || t5 && t5.length > 0) if ("string" == typeof t5 || o5.objectMode || Object.getPrototypeOf(t5) === c5.prototype || (t5 =
|
|
30208
|
+
}(o5, t5)), a5) x4(e7, a5);
|
|
30209
|
+
else if (o5.objectMode || t5 && t5.length > 0) if ("string" == typeof t5 || o5.objectMode || Object.getPrototypeOf(t5) === c5.prototype || (t5 = function(e8) {
|
|
30181
30210
|
return c5.from(e8);
|
|
30182
|
-
}
|
|
30211
|
+
}(t5)), r5) o5.endEmitted ? x4(e7, new P4()) : q3(e7, o5, t5, true);
|
|
30183
30212
|
else if (o5.ended) x4(e7, new O4());
|
|
30184
30213
|
else {
|
|
30185
30214
|
if (o5.destroyed) return false;
|
|
@@ -30212,9 +30241,9 @@ function K$8() {
|
|
|
30212
30241
|
return this._readableState.buffer.clear(), "" !== r5 && this._readableState.buffer.push(r5), this._readableState.length = r5.length, this;
|
|
30213
30242
|
};
|
|
30214
30243
|
function W3(e7, t5) {
|
|
30215
|
-
return e7 <= 0 || 0 === t5.length && t5.ended ? 0 : t5.objectMode ? 1 : e7 != e7 ? t5.flowing && t5.length ? t5.buffer.head.data.length : t5.length : (e7 > t5.highWaterMark && (t5.highWaterMark =
|
|
30244
|
+
return e7 <= 0 || 0 === t5.length && t5.ended ? 0 : t5.objectMode ? 1 : e7 != e7 ? t5.flowing && t5.length ? t5.buffer.head.data.length : t5.length : (e7 > t5.highWaterMark && (t5.highWaterMark = function(e8) {
|
|
30216
30245
|
return e8 >= 1073741824 ? e8 = 1073741824 : (e8--, e8 |= e8 >>> 1, e8 |= e8 >>> 2, e8 |= e8 >>> 4, e8 |= e8 >>> 8, e8 |= e8 >>> 16, e8++), e8;
|
|
30217
|
-
}
|
|
30246
|
+
}(e7)), e7 <= t5.length ? e7 : t5.ended ? t5.length : (t5.needReadable = true, 0));
|
|
30218
30247
|
}
|
|
30219
30248
|
function B4(e7) {
|
|
30220
30249
|
var t5 = e7._readableState;
|
|
@@ -30296,12 +30325,12 @@ function K$8() {
|
|
|
30296
30325
|
p5("onend"), e7.end();
|
|
30297
30326
|
}
|
|
30298
30327
|
r5.endEmitted ? u5.nextTick(i5) : n5.once("end", i5), e7.on("unpipe", a5);
|
|
30299
|
-
var s5 = /* @__PURE__ */
|
|
30328
|
+
var s5 = /* @__PURE__ */ function(e8) {
|
|
30300
30329
|
return function() {
|
|
30301
30330
|
var t6 = e8._readableState;
|
|
30302
30331
|
p5("pipeOnDrain", t6.awaitDrain), t6.awaitDrain && t6.awaitDrain--, 0 === t6.awaitDrain && f6(e8, "data") && (t6.flowing = true, J3(e8));
|
|
30303
30332
|
};
|
|
30304
|
-
}
|
|
30333
|
+
}(n5);
|
|
30305
30334
|
e7.on("drain", s5);
|
|
30306
30335
|
var l5 = false;
|
|
30307
30336
|
function d5(t6) {
|
|
@@ -30321,10 +30350,10 @@ function K$8() {
|
|
|
30321
30350
|
function g4() {
|
|
30322
30351
|
p5("unpipe"), n5.unpipe(e7);
|
|
30323
30352
|
}
|
|
30324
|
-
return n5.on("data", d5),
|
|
30353
|
+
return n5.on("data", d5), function(e8, t6, n6) {
|
|
30325
30354
|
if ("function" == typeof e8.prependListener) return e8.prependListener(t6, n6);
|
|
30326
30355
|
e8._events && e8._events[t6] ? Array.isArray(e8._events[t6]) ? e8._events[t6].unshift(n6) : e8._events[t6] = [n6, e8._events[t6]] : e8.on(t6, n6);
|
|
30327
|
-
}
|
|
30356
|
+
}(e7, "error", h6), e7.once("close", c6), e7.once("finish", b5), e7.emit("pipe", n5), r5.flowing || (p5("pipe resume"), n5.resume()), e7;
|
|
30328
30357
|
}, C4.prototype.unpipe = function(e7) {
|
|
30329
30358
|
var t5 = this._readableState, n5 = { hasUnpiped: false };
|
|
30330
30359
|
if (0 === t5.pipesCount) return this;
|
|
@@ -30348,26 +30377,26 @@ function K$8() {
|
|
|
30348
30377
|
return "readable" !== e7 && void 0 !== e7 || u5.nextTick(H3, this), t5;
|
|
30349
30378
|
}, C4.prototype.resume = function() {
|
|
30350
30379
|
var e7 = this._readableState;
|
|
30351
|
-
return e7.flowing || (p5("resume"), e7.flowing = !e7.readableListening,
|
|
30380
|
+
return e7.flowing || (p5("resume"), e7.flowing = !e7.readableListening, function(e8, t5) {
|
|
30352
30381
|
t5.resumeScheduled || (t5.resumeScheduled = true, u5.nextTick(z4, e8, t5));
|
|
30353
|
-
}
|
|
30382
|
+
}(this, e7)), e7.paused = false, this;
|
|
30354
30383
|
}, C4.prototype.pause = function() {
|
|
30355
30384
|
return p5("call pause flowing=%j", this._readableState.flowing), false !== this._readableState.flowing && (p5("pause"), this._readableState.flowing = false, this.emit("pause")), this._readableState.paused = true, this;
|
|
30356
30385
|
}, C4.prototype.wrap = function(e7) {
|
|
30357
30386
|
var t5 = this, n5 = this._readableState, r5 = false;
|
|
30358
|
-
for (var i5 in e7.on("end",
|
|
30387
|
+
for (var i5 in e7.on("end", function() {
|
|
30359
30388
|
if (p5("wrapped end"), n5.decoder && !n5.ended) {
|
|
30360
30389
|
var e8 = n5.decoder.end();
|
|
30361
30390
|
e8 && e8.length && t5.push(e8);
|
|
30362
30391
|
}
|
|
30363
30392
|
t5.push(null);
|
|
30364
|
-
})
|
|
30393
|
+
}), e7.on("data", function(i6) {
|
|
30365
30394
|
(p5("wrapped data"), n5.decoder && (i6 = n5.decoder.write(i6)), n5.objectMode && null == i6) || (n5.objectMode || i6 && i6.length) && (t5.push(i6) || (r5 = true, e7.pause()));
|
|
30366
|
-
})
|
|
30395
|
+
}), e7) void 0 === this[i5] && "function" == typeof e7[i5] && (this[i5] = /* @__PURE__ */ function(t6) {
|
|
30367
30396
|
return function() {
|
|
30368
30397
|
return e7[t6].apply(e7, arguments);
|
|
30369
30398
|
};
|
|
30370
|
-
}
|
|
30399
|
+
}(i5));
|
|
30371
30400
|
for (var a5 = 0; a5 < L4.length; a5++) e7.on(L4[a5], this.emit.bind(this, L4[a5]));
|
|
30372
30401
|
return this._read = function(t6) {
|
|
30373
30402
|
p5("wrapped _read", t6), r5 && (r5 = false, e7.resume());
|
|
@@ -30398,7 +30427,7 @@ function X$4() {
|
|
|
30398
30427
|
function s5(e7) {
|
|
30399
30428
|
var t5 = this;
|
|
30400
30429
|
this.next = null, this.entry = null, this.finish = function() {
|
|
30401
|
-
!
|
|
30430
|
+
!function(e8, t6, n5) {
|
|
30402
30431
|
var r6 = e8.entry;
|
|
30403
30432
|
e8.entry = null;
|
|
30404
30433
|
for (; r6; ) {
|
|
@@ -30406,7 +30435,7 @@ function X$4() {
|
|
|
30406
30435
|
t6.pendingcb--, i5(n5), r6 = r6.next;
|
|
30407
30436
|
}
|
|
30408
30437
|
t6.corkedRequestsFree.next = e8;
|
|
30409
|
-
}
|
|
30438
|
+
}(t5, e7);
|
|
30410
30439
|
};
|
|
30411
30440
|
}
|
|
30412
30441
|
z$9 = P4, P4.WritableState = T4;
|
|
@@ -30419,19 +30448,19 @@ function X$4() {
|
|
|
30419
30448
|
e$23 = e$23 || ee$1(), t5 = t5 || {}, "boolean" != typeof i5 && (i5 = n5 instanceof e$23), this.objectMode = !!t5.objectMode, i5 && (this.objectMode = this.objectMode || !!t5.writableObjectMode), this.highWaterMark = p5(this, t5, "writableHighWaterMark", i5), this.finalCalled = false, this.needDrain = false, this.ending = false, this.ended = false, this.finished = false, this.destroyed = false;
|
|
30420
30449
|
var a5 = false === t5.decodeStrings;
|
|
30421
30450
|
this.decodeStrings = !a5, this.defaultEncoding = t5.defaultEncoding || "utf8", this.length = 0, this.writing = false, this.corked = 0, this.sync = true, this.bufferProcessing = false, this.onwrite = function(e7) {
|
|
30422
|
-
!
|
|
30451
|
+
!function(e8, t6) {
|
|
30423
30452
|
var n6 = e8._writableState, i6 = n6.sync, a6 = n6.writecb;
|
|
30424
30453
|
if ("function" != typeof a6) throw new v5();
|
|
30425
|
-
if (
|
|
30454
|
+
if (function(e9) {
|
|
30426
30455
|
e9.writing = false, e9.writecb = null, e9.length -= e9.writelen, e9.writelen = 0;
|
|
30427
|
-
}
|
|
30456
|
+
}(n6), t6) !function(e9, t7, n7, i7, a7) {
|
|
30428
30457
|
--t7.pendingcb, n7 ? (r5.nextTick(a7, i7), r5.nextTick(q3, e9, t7), e9._writableState.errorEmitted = true, j4(e9, i7)) : (a7(i7), e9._writableState.errorEmitted = true, j4(e9, i7), q3(e9, t7));
|
|
30429
|
-
}
|
|
30458
|
+
}(e8, n6, i6, t6, a6);
|
|
30430
30459
|
else {
|
|
30431
30460
|
var o5 = C4(n6) || e8.destroyed;
|
|
30432
30461
|
o5 || n6.corked || n6.bufferProcessing || !n6.bufferedRequest || D4(e8, n6), i6 ? r5.nextTick(L4, e8, n6, o5, a6) : L4(e8, n6, o5, a6);
|
|
30433
30462
|
}
|
|
30434
|
-
}
|
|
30463
|
+
}(n5, e7);
|
|
30435
30464
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = false, this.errorEmitted = false, this.emitClose = false !== t5.emitClose, this.autoDestroy = !!t5.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new s5(this);
|
|
30436
30465
|
}
|
|
30437
30466
|
function P4(t5) {
|
|
@@ -30443,9 +30472,9 @@ function X$4() {
|
|
|
30443
30472
|
t5.writelen = r6, t5.writecb = o5, t5.writing = true, t5.sync = true, t5.destroyed ? t5.onwrite(new S4("write")) : n5 ? e7._writev(i5, t5.onwrite) : e7._write(i5, a5, t5.onwrite), t5.sync = false;
|
|
30444
30473
|
}
|
|
30445
30474
|
function L4(e7, t5, n5, r6) {
|
|
30446
|
-
n5 || !
|
|
30475
|
+
n5 || !function(e8, t6) {
|
|
30447
30476
|
0 === t6.length && t6.needDrain && (t6.needDrain = false, e8.emit("drain"));
|
|
30448
|
-
}
|
|
30477
|
+
}(e7, t5), t5.pendingcb--, r6(), q3(e7, t5);
|
|
30449
30478
|
}
|
|
30450
30479
|
function D4(e7, t5) {
|
|
30451
30480
|
t5.bufferProcessing = true;
|
|
@@ -30468,15 +30497,15 @@ function X$4() {
|
|
|
30468
30497
|
return e7.ending && 0 === e7.length && null === e7.bufferedRequest && !e7.finished && !e7.writing;
|
|
30469
30498
|
}
|
|
30470
30499
|
function A4(e7, t5) {
|
|
30471
|
-
e7._final(
|
|
30500
|
+
e7._final(function(n5) {
|
|
30472
30501
|
t5.pendingcb--, n5 && j4(e7, n5), t5.prefinished = true, e7.emit("prefinish"), q3(e7, t5);
|
|
30473
|
-
})
|
|
30502
|
+
});
|
|
30474
30503
|
}
|
|
30475
30504
|
function q3(e7, t5) {
|
|
30476
30505
|
var n5 = C4(t5);
|
|
30477
|
-
if (n5 && (!
|
|
30506
|
+
if (n5 && (!function(e8, t6) {
|
|
30478
30507
|
t6.prefinished || t6.finalCalled || ("function" != typeof e8._final || t6.destroyed ? (t6.prefinished = true, e8.emit("prefinish")) : (t6.pendingcb++, t6.finalCalled = true, r5.nextTick(A4, e8, t6)));
|
|
30479
|
-
}
|
|
30508
|
+
}(e7, t5), 0 === t5.pendingcb && (t5.finished = true, e7.emit("finish"), t5.autoDestroy))) {
|
|
30480
30509
|
var i5 = e7._readableState;
|
|
30481
30510
|
(!i5 || i5.autoDestroy && i5.endEmitted) && e7.destroy();
|
|
30482
30511
|
}
|
|
@@ -30485,14 +30514,14 @@ function X$4() {
|
|
|
30485
30514
|
return t$2(P4, u5), T4.prototype.getBuffer = function() {
|
|
30486
30515
|
for (var e7 = this.bufferedRequest, t5 = []; e7; ) t5.push(e7), e7 = e7.next;
|
|
30487
30516
|
return t5;
|
|
30488
|
-
},
|
|
30517
|
+
}, function() {
|
|
30489
30518
|
try {
|
|
30490
|
-
Object.defineProperty(T4.prototype, "buffer", { get: l5.deprecate(
|
|
30519
|
+
Object.defineProperty(T4.prototype, "buffer", { get: l5.deprecate(function() {
|
|
30491
30520
|
return this.getBuffer();
|
|
30492
|
-
}
|
|
30521
|
+
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") });
|
|
30493
30522
|
} catch (e7) {
|
|
30494
30523
|
}
|
|
30495
|
-
}
|
|
30524
|
+
}(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (c5 = Function.prototype[Symbol.hasInstance], Object.defineProperty(P4, Symbol.hasInstance, { value: function(e7) {
|
|
30496
30525
|
return !!c5.call(this, e7) || this === P4 && (e7 && e7._writableState instanceof T4);
|
|
30497
30526
|
} })) : c5 = function(e7) {
|
|
30498
30527
|
return e7 instanceof this;
|
|
@@ -30500,20 +30529,20 @@ function X$4() {
|
|
|
30500
30529
|
j4(this, new _4());
|
|
30501
30530
|
}, P4.prototype.write = function(e7, t5, n5) {
|
|
30502
30531
|
var i5, a5 = this._writableState, o5 = false, s6 = !a5.objectMode && (i5 = e7, f6.isBuffer(i5) || i5 instanceof h5);
|
|
30503
|
-
return s6 && !f6.isBuffer(e7) && (e7 =
|
|
30532
|
+
return s6 && !f6.isBuffer(e7) && (e7 = function(e8) {
|
|
30504
30533
|
return f6.from(e8);
|
|
30505
|
-
}
|
|
30534
|
+
}(e7)), "function" == typeof t5 && (n5 = t5, t5 = null), s6 ? t5 = "buffer" : t5 || (t5 = a5.defaultEncoding), "function" != typeof n5 && (n5 = O4), a5.ending ? function(e8, t6) {
|
|
30506
30535
|
var n6 = new E4();
|
|
30507
30536
|
j4(e8, n6), r5.nextTick(t6, n6);
|
|
30508
|
-
}
|
|
30537
|
+
}(this, n5) : (s6 || function(e8, t6, n6, i6) {
|
|
30509
30538
|
var a6;
|
|
30510
30539
|
return null === n6 ? a6 = new k4() : "string" == typeof n6 || t6.objectMode || (a6 = new y5("chunk", ["string", "Buffer"], n6)), !a6 || (j4(e8, a6), r5.nextTick(i6, a6), false);
|
|
30511
|
-
}
|
|
30540
|
+
}(this, a5, e7, n5)) && (a5.pendingcb++, o5 = function(e8, t6, n6, r6, i6, a6) {
|
|
30512
30541
|
if (!n6) {
|
|
30513
|
-
var o6 =
|
|
30542
|
+
var o6 = function(e9, t7, n7) {
|
|
30514
30543
|
e9.objectMode || false === e9.decodeStrings || "string" != typeof t7 || (t7 = f6.from(t7, n7));
|
|
30515
30544
|
return t7;
|
|
30516
|
-
}
|
|
30545
|
+
}(t6, r6, i6);
|
|
30517
30546
|
r6 !== o6 && (n6 = true, i6 = "buffer", r6 = o6);
|
|
30518
30547
|
}
|
|
30519
30548
|
var s7 = t6.objectMode ? 1 : r6.length;
|
|
@@ -30525,7 +30554,7 @@ function X$4() {
|
|
|
30525
30554
|
t6.lastBufferedRequest = { chunk: r6, encoding: i6, isBuf: n6, callback: a6, next: null }, d4 ? d4.next = t6.lastBufferedRequest : t6.bufferedRequest = t6.lastBufferedRequest, t6.bufferedRequestCount += 1;
|
|
30526
30555
|
} else x4(e8, t6, false, s7, r6, i6, a6);
|
|
30527
30556
|
return l6;
|
|
30528
|
-
}
|
|
30557
|
+
}(this, a5, s6, e7, t5, n5)), o5;
|
|
30529
30558
|
}, P4.prototype.cork = function() {
|
|
30530
30559
|
this._writableState.corked++;
|
|
30531
30560
|
}, P4.prototype.uncork = function() {
|
|
@@ -30542,10 +30571,10 @@ function X$4() {
|
|
|
30542
30571
|
n5(new w4("_write()"));
|
|
30543
30572
|
}, P4.prototype._writev = null, P4.prototype.end = function(e7, t5, n5) {
|
|
30544
30573
|
var i5 = this._writableState;
|
|
30545
|
-
return "function" == typeof e7 ? (n5 = e7, e7 = null, t5 = null) : "function" == typeof t5 && (n5 = t5, t5 = null), null != e7 && this.write(e7, t5), i5.corked && (i5.corked = 1, this.uncork()), i5.ending ||
|
|
30574
|
+
return "function" == typeof e7 ? (n5 = e7, e7 = null, t5 = null) : "function" == typeof t5 && (n5 = t5, t5 = null), null != e7 && this.write(e7, t5), i5.corked && (i5.corked = 1, this.uncork()), i5.ending || function(e8, t6, n6) {
|
|
30546
30575
|
t6.ending = true, q3(e8, t6), n6 && (t6.finished ? r5.nextTick(n6) : e8.once("finish", n6));
|
|
30547
30576
|
t6.ended = true, e8.writable = false;
|
|
30548
|
-
}
|
|
30577
|
+
}(this, i5, n5), this;
|
|
30549
30578
|
}, Object.defineProperty(P4.prototype, "writableLength", { enumerable: false, get: function() {
|
|
30550
30579
|
return this._writableState.length;
|
|
30551
30580
|
} }), Object.defineProperty(P4.prototype, "destroyed", { enumerable: false, get: function() {
|
|
@@ -30601,7 +30630,7 @@ function t$3$1() {
|
|
|
30601
30630
|
}
|
|
30602
30631
|
var n$1$12 = function e5(n5, o5, a5) {
|
|
30603
30632
|
if ("function" == typeof o5) return e5(n5, null, o5);
|
|
30604
|
-
o5 || (o5 = {}), a5 = /* @__PURE__ */
|
|
30633
|
+
o5 || (o5 = {}), a5 = /* @__PURE__ */ function(e7) {
|
|
30605
30634
|
var r5 = false;
|
|
30606
30635
|
return function() {
|
|
30607
30636
|
if (!r5) {
|
|
@@ -30610,7 +30639,7 @@ var n$1$12 = function e5(n5, o5, a5) {
|
|
|
30610
30639
|
e7.apply(this, n6);
|
|
30611
30640
|
}
|
|
30612
30641
|
};
|
|
30613
|
-
}
|
|
30642
|
+
}(a5 || t$3$1);
|
|
30614
30643
|
var i5 = o5.readable || false !== o5.readable && n5.readable, l5 = o5.writable || false !== o5.writable && n5.writable, c5 = function() {
|
|
30615
30644
|
n5.writable || s5();
|
|
30616
30645
|
}, f6 = n5._writableState && n5._writableState.finished, s5 = function() {
|
|
@@ -30625,9 +30654,9 @@ var n$1$12 = function e5(n5, o5, a5) {
|
|
|
30625
30654
|
}, m4 = function() {
|
|
30626
30655
|
n5.req.on("finish", s5);
|
|
30627
30656
|
};
|
|
30628
|
-
return !
|
|
30657
|
+
return !function(e7) {
|
|
30629
30658
|
return e7.setHeader && "function" == typeof e7.abort;
|
|
30630
|
-
}
|
|
30659
|
+
}(n5) ? l5 && !n5._writableState && (n5.on("end", c5), n5.on("close", c5)) : (n5.on("complete", s5), n5.on("abort", v5), n5.req ? m4() : n5.on("request", m4)), n5.on("end", d4), n5.on("finish", s5), false !== o5.error && n5.on("error", b4), n5.on("close", v5), function() {
|
|
30631
30660
|
n5.removeListener("complete", s5), n5.removeListener("abort", v5), n5.removeListener("request", m4), n5.req && n5.req.removeListener("finish", s5), n5.removeListener("end", c5), n5.removeListener("close", c5), n5.removeListener("finish", s5), n5.removeListener("end", d4), n5.removeListener("error", b4), n5.removeListener("close", v5);
|
|
30632
30661
|
};
|
|
30633
30662
|
};
|
|
@@ -30635,9 +30664,9 @@ function f$1$1(e7, t5) {
|
|
|
30635
30664
|
var n5 = Object.keys(e7);
|
|
30636
30665
|
if (Object.getOwnPropertySymbols) {
|
|
30637
30666
|
var r5 = Object.getOwnPropertySymbols(e7);
|
|
30638
|
-
t5 && (r5 = r5.filter(
|
|
30667
|
+
t5 && (r5 = r5.filter(function(t6) {
|
|
30639
30668
|
return Object.getOwnPropertyDescriptor(e7, t6).enumerable;
|
|
30640
|
-
}))
|
|
30669
|
+
})), n5.push.apply(n5, r5);
|
|
30641
30670
|
}
|
|
30642
30671
|
return n5;
|
|
30643
30672
|
}
|
|
@@ -30653,11 +30682,11 @@ function c$1$12(e7, t5) {
|
|
|
30653
30682
|
var b$1$1 = e$1$1.Buffer;
|
|
30654
30683
|
var p$1$1 = X.inspect;
|
|
30655
30684
|
var g$1$1 = p$1$1 && p$1$1.custom || "inspect";
|
|
30656
|
-
var y$1$1 =
|
|
30685
|
+
var y$1$1 = function() {
|
|
30657
30686
|
function e7() {
|
|
30658
|
-
!
|
|
30687
|
+
!function(e8, t6) {
|
|
30659
30688
|
if (!(e8 instanceof t6)) throw new TypeError("Cannot call a class as a function");
|
|
30660
|
-
}
|
|
30689
|
+
}(this, e7), this.head = null, this.tail = null, this.length = 0;
|
|
30661
30690
|
}
|
|
30662
30691
|
var t5, n5;
|
|
30663
30692
|
return t5 = e7, (n5 = [{ key: "push", value: function(e8) {
|
|
@@ -30709,19 +30738,19 @@ var y$1$1 = (function() {
|
|
|
30709
30738
|
}
|
|
30710
30739
|
return this.length -= r5, t6;
|
|
30711
30740
|
} }, { key: g$1$1, value: function(e8, t6) {
|
|
30712
|
-
return p$1$1(this,
|
|
30741
|
+
return p$1$1(this, function(e9) {
|
|
30713
30742
|
for (var t7 = 1; t7 < arguments.length; t7++) {
|
|
30714
30743
|
var n6 = null != arguments[t7] ? arguments[t7] : {};
|
|
30715
|
-
t7 % 2 ? f$1$1(Object(n6), true).forEach(
|
|
30744
|
+
t7 % 2 ? f$1$1(Object(n6), true).forEach(function(t8) {
|
|
30716
30745
|
h$1$12(e9, t8, n6[t8]);
|
|
30717
|
-
})
|
|
30746
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e9, Object.getOwnPropertyDescriptors(n6)) : f$1$1(Object(n6)).forEach(function(t8) {
|
|
30718
30747
|
Object.defineProperty(e9, t8, Object.getOwnPropertyDescriptor(n6, t8));
|
|
30719
|
-
})
|
|
30748
|
+
});
|
|
30720
30749
|
}
|
|
30721
30750
|
return e9;
|
|
30722
|
-
}
|
|
30751
|
+
}({}, t6, { depth: 0, customInspect: false }));
|
|
30723
30752
|
} }]) && c$1$12(t5.prototype, n5), e7;
|
|
30724
|
-
}
|
|
30753
|
+
}();
|
|
30725
30754
|
var w$1$1 = T$1;
|
|
30726
30755
|
function _$1$1(e7, t5) {
|
|
30727
30756
|
m$1$1(e7, t5), v$1$1(e7);
|
|
@@ -30734,9 +30763,9 @@ function m$1$1(e7, t5) {
|
|
|
30734
30763
|
}
|
|
30735
30764
|
var S$1$1 = { destroy: function(e7, t5) {
|
|
30736
30765
|
var n5 = this, r5 = this._readableState && this._readableState.destroyed, i5 = this._writableState && this._writableState.destroyed;
|
|
30737
|
-
return r5 || i5 ? (t5 ? t5(e7) : e7 && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = true, w$1$1.nextTick(m$1$1, this, e7)) : w$1$1.nextTick(m$1$1, this, e7)), this) : (this._readableState && (this._readableState.destroyed = true), this._writableState && (this._writableState.destroyed = true), this._destroy(e7 || null,
|
|
30766
|
+
return r5 || i5 ? (t5 ? t5(e7) : e7 && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = true, w$1$1.nextTick(m$1$1, this, e7)) : w$1$1.nextTick(m$1$1, this, e7)), this) : (this._readableState && (this._readableState.destroyed = true), this._writableState && (this._writableState.destroyed = true), this._destroy(e7 || null, function(e8) {
|
|
30738
30767
|
!t5 && e8 ? n5._writableState ? n5._writableState.errorEmitted ? w$1$1.nextTick(v$1$1, n5) : (n5._writableState.errorEmitted = true, w$1$1.nextTick(_$1$1, n5, e8)) : w$1$1.nextTick(_$1$1, n5, e8) : t5 ? (w$1$1.nextTick(v$1$1, n5), t5(e8)) : w$1$1.nextTick(v$1$1, n5);
|
|
30739
|
-
})
|
|
30768
|
+
}), this);
|
|
30740
30769
|
}, undestroy: function() {
|
|
30741
30770
|
this._readableState && (this._readableState.destroyed = false, this._readableState.reading = false, this._readableState.ended = false, this._readableState.endEmitted = false), this._writableState && (this._writableState.destroyed = false, this._writableState.ended = false, this._writableState.ending = false, this._writableState.finalCalled = false, this._writableState.prefinished = false, this._writableState.finished = false, this._writableState.errorEmitted = false);
|
|
30742
30771
|
}, errorOrDestroy: function(e7, t5) {
|
|
@@ -30746,9 +30775,9 @@ var S$1$1 = { destroy: function(e7, t5) {
|
|
|
30746
30775
|
var R$1$1 = e$1$12.codes.ERR_INVALID_OPT_VALUE;
|
|
30747
30776
|
var k$1$1;
|
|
30748
30777
|
var E$1$1 = { getHighWaterMark: function(e7, t5, n5, r5) {
|
|
30749
|
-
var i5 =
|
|
30778
|
+
var i5 = function(e8, t6, n6) {
|
|
30750
30779
|
return null != e8.highWaterMark ? e8.highWaterMark : t6 ? e8[n6] : null;
|
|
30751
|
-
}
|
|
30780
|
+
}(t5, r5, n5);
|
|
30752
30781
|
if (null != i5) {
|
|
30753
30782
|
if (!isFinite(i5) || Math.floor(i5) !== i5 || i5 < 0) throw new R$1$1(r5 ? n5 : "highWaterMark", i5);
|
|
30754
30783
|
return Math.floor(i5);
|
|
@@ -30780,58 +30809,58 @@ function B$1$1(e7) {
|
|
|
30780
30809
|
function q$1$1(e7) {
|
|
30781
30810
|
M$1$1.nextTick(B$1$1, e7);
|
|
30782
30811
|
}
|
|
30783
|
-
var I$1$1 = Object.getPrototypeOf(
|
|
30784
|
-
})
|
|
30812
|
+
var I$1$1 = Object.getPrototypeOf(function() {
|
|
30813
|
+
});
|
|
30785
30814
|
var N$1$1 = Object.setPrototypeOf((j$1$1(k$1$1 = { get stream() {
|
|
30786
30815
|
return this[A$1$1];
|
|
30787
30816
|
}, next: function() {
|
|
30788
30817
|
var e7 = this, t5 = this[P$1$1];
|
|
30789
30818
|
if (null !== t5) return Promise.reject(t5);
|
|
30790
30819
|
if (this[D$1$1]) return Promise.resolve(W$1$1(void 0, true));
|
|
30791
|
-
if (this[A$1$1].destroyed) return new Promise(
|
|
30792
|
-
M$1$1.nextTick(
|
|
30820
|
+
if (this[A$1$1].destroyed) return new Promise(function(t6, n6) {
|
|
30821
|
+
M$1$1.nextTick(function() {
|
|
30793
30822
|
e7[P$1$1] ? n6(e7[P$1$1]) : t6(W$1$1(void 0, true));
|
|
30794
|
-
})
|
|
30795
|
-
})
|
|
30823
|
+
});
|
|
30824
|
+
});
|
|
30796
30825
|
var n5, r5 = this[L$1$1];
|
|
30797
|
-
if (r5) n5 = new Promise(/* @__PURE__ */
|
|
30826
|
+
if (r5) n5 = new Promise(/* @__PURE__ */ function(e8, t6) {
|
|
30798
30827
|
return function(n6, r6) {
|
|
30799
|
-
e8.then(
|
|
30828
|
+
e8.then(function() {
|
|
30800
30829
|
if (t6[D$1$1]) return n6(W$1$1(void 0, true)), void 0;
|
|
30801
30830
|
t6[C$1$1](n6, r6);
|
|
30802
|
-
}
|
|
30831
|
+
}, r6);
|
|
30803
30832
|
};
|
|
30804
|
-
}
|
|
30833
|
+
}(r5, this));
|
|
30805
30834
|
else {
|
|
30806
30835
|
var i5 = this[A$1$1].read();
|
|
30807
30836
|
if (null !== i5) return Promise.resolve(W$1$1(i5, false));
|
|
30808
30837
|
n5 = new Promise(this[C$1$1]);
|
|
30809
30838
|
}
|
|
30810
30839
|
return this[L$1$1] = n5, n5;
|
|
30811
|
-
} }, Symbol.asyncIterator,
|
|
30840
|
+
} }, Symbol.asyncIterator, function() {
|
|
30812
30841
|
return this;
|
|
30813
|
-
})
|
|
30842
|
+
}), j$1$1(k$1$1, "return", function() {
|
|
30814
30843
|
var e7 = this;
|
|
30815
|
-
return new Promise(
|
|
30816
|
-
e7[A$1$1].destroy(null,
|
|
30844
|
+
return new Promise(function(t5, n5) {
|
|
30845
|
+
e7[A$1$1].destroy(null, function(e8) {
|
|
30817
30846
|
if (e8) return n5(e8), void 0;
|
|
30818
30847
|
t5(W$1$1(void 0, true));
|
|
30819
|
-
})
|
|
30820
|
-
})
|
|
30821
|
-
})
|
|
30848
|
+
});
|
|
30849
|
+
});
|
|
30850
|
+
}), k$1$1), I$1$1);
|
|
30822
30851
|
var U$1$1 = function(e7) {
|
|
30823
30852
|
var t5, n5 = Object.create(N$1$1, (j$1$1(t5 = {}, A$1$1, { value: e7, writable: true }), j$1$1(t5, T$1$1, { value: null, writable: true }), j$1$1(t5, x$1$1, { value: null, writable: true }), j$1$1(t5, P$1$1, { value: null, writable: true }), j$1$1(t5, D$1$1, { value: e7._readableState.endEmitted, writable: true }), j$1$1(t5, C$1$1, { value: function(e8, t6) {
|
|
30824
30853
|
var r5 = n5[A$1$1].read();
|
|
30825
30854
|
r5 ? (n5[L$1$1] = null, n5[T$1$1] = null, n5[x$1$1] = null, e8(W$1$1(r5, false))) : (n5[T$1$1] = e8, n5[x$1$1] = t6);
|
|
30826
30855
|
}, writable: true }), t5));
|
|
30827
|
-
return n5[L$1$1] = null, O$1$1(e7,
|
|
30856
|
+
return n5[L$1$1] = null, O$1$1(e7, function(e8) {
|
|
30828
30857
|
if (e8 && "ERR_STREAM_PREMATURE_CLOSE" !== e8.code) {
|
|
30829
30858
|
var t6 = n5[x$1$1];
|
|
30830
30859
|
return null !== t6 && (n5[L$1$1] = null, n5[T$1$1] = null, n5[x$1$1] = null, t6(e8)), n5[P$1$1] = e8, void 0;
|
|
30831
30860
|
}
|
|
30832
30861
|
var r5 = n5[T$1$1];
|
|
30833
30862
|
null !== r5 && (n5[L$1$1] = null, n5[T$1$1] = null, n5[x$1$1] = null, r5(W$1$1(void 0, true))), n5[D$1$1] = true;
|
|
30834
|
-
})
|
|
30863
|
+
}), e7.on("readable", q$1$1.bind(null, n5)), n5;
|
|
30835
30864
|
};
|
|
30836
30865
|
var H$1$1 = {};
|
|
30837
30866
|
var F$1$1 = false;
|
|
@@ -30863,23 +30892,23 @@ function G$1$1() {
|
|
|
30863
30892
|
function A4(e7, t5, n5, r5, i5) {
|
|
30864
30893
|
p5("readableAddChunk", t5);
|
|
30865
30894
|
var a5, o5 = e7._readableState;
|
|
30866
|
-
if (null === t5) o5.reading = false,
|
|
30895
|
+
if (null === t5) o5.reading = false, function(e8, t6) {
|
|
30867
30896
|
if (p5("onEofChunk"), t6.ended) return;
|
|
30868
30897
|
if (t6.decoder) {
|
|
30869
30898
|
var n6 = t6.decoder.end();
|
|
30870
30899
|
n6 && n6.length && (t6.buffer.push(n6), t6.length += t6.objectMode ? 1 : n6.length);
|
|
30871
30900
|
}
|
|
30872
30901
|
t6.ended = true, t6.sync ? q3(e8) : (t6.needReadable = false, t6.emittedReadable || (t6.emittedReadable = true, I4(e8)));
|
|
30873
|
-
}
|
|
30874
|
-
else if (i5 || (a5 =
|
|
30902
|
+
}(e7, o5);
|
|
30903
|
+
else if (i5 || (a5 = function(e8, t6) {
|
|
30875
30904
|
var n6;
|
|
30876
30905
|
r6 = t6, c5.isBuffer(r6) || r6 instanceof b4 || "string" == typeof t6 || void 0 === t6 || e8.objectMode || (n6 = new j4("chunk", ["string", "Buffer", "Uint8Array"], t6));
|
|
30877
30906
|
var r6;
|
|
30878
30907
|
return n6;
|
|
30879
|
-
}
|
|
30880
|
-
else if (o5.objectMode || t5 && t5.length > 0) if ("string" == typeof t5 || o5.objectMode || Object.getPrototypeOf(t5) === c5.prototype || (t5 =
|
|
30908
|
+
}(o5, t5)), a5) P4(e7, a5);
|
|
30909
|
+
else if (o5.objectMode || t5 && t5.length > 0) if ("string" == typeof t5 || o5.objectMode || Object.getPrototypeOf(t5) === c5.prototype || (t5 = function(e8) {
|
|
30881
30910
|
return c5.from(e8);
|
|
30882
|
-
}
|
|
30911
|
+
}(t5)), r5) o5.endEmitted ? P4(e7, new x4()) : W3(e7, o5, t5, true);
|
|
30883
30912
|
else if (o5.ended) P4(e7, new O4());
|
|
30884
30913
|
else {
|
|
30885
30914
|
if (o5.destroyed) return false;
|
|
@@ -30912,9 +30941,9 @@ function G$1$1() {
|
|
|
30912
30941
|
return this._readableState.buffer.clear(), "" !== r5 && this._readableState.buffer.push(r5), this._readableState.length = r5.length, this;
|
|
30913
30942
|
};
|
|
30914
30943
|
function B4(e7, t5) {
|
|
30915
|
-
return e7 <= 0 || 0 === t5.length && t5.ended ? 0 : t5.objectMode ? 1 : e7 != e7 ? t5.flowing && t5.length ? t5.buffer.head.data.length : t5.length : (e7 > t5.highWaterMark && (t5.highWaterMark =
|
|
30944
|
+
return e7 <= 0 || 0 === t5.length && t5.ended ? 0 : t5.objectMode ? 1 : e7 != e7 ? t5.flowing && t5.length ? t5.buffer.head.data.length : t5.length : (e7 > t5.highWaterMark && (t5.highWaterMark = function(e8) {
|
|
30916
30945
|
return e8 >= 1073741824 ? e8 = 1073741824 : (e8--, e8 |= e8 >>> 1, e8 |= e8 >>> 2, e8 |= e8 >>> 4, e8 |= e8 >>> 8, e8 |= e8 >>> 16, e8++), e8;
|
|
30917
|
-
}
|
|
30946
|
+
}(e7)), e7 <= t5.length ? e7 : t5.ended ? t5.length : (t5.needReadable = true, 0));
|
|
30918
30947
|
}
|
|
30919
30948
|
function q3(e7) {
|
|
30920
30949
|
var t5 = e7._readableState;
|
|
@@ -30996,12 +31025,12 @@ function G$1$1() {
|
|
|
30996
31025
|
p5("onend"), e7.end();
|
|
30997
31026
|
}
|
|
30998
31027
|
r5.endEmitted ? u5.nextTick(i5) : n5.once("end", i5), e7.on("unpipe", a5);
|
|
30999
|
-
var s5 = /* @__PURE__ */
|
|
31028
|
+
var s5 = /* @__PURE__ */ function(e8) {
|
|
31000
31029
|
return function() {
|
|
31001
31030
|
var t6 = e8._readableState;
|
|
31002
31031
|
p5("pipeOnDrain", t6.awaitDrain), t6.awaitDrain && t6.awaitDrain--, 0 === t6.awaitDrain && f6(e8, "data") && (t6.flowing = true, J3(e8));
|
|
31003
31032
|
};
|
|
31004
|
-
}
|
|
31033
|
+
}(n5);
|
|
31005
31034
|
e7.on("drain", s5);
|
|
31006
31035
|
var l6 = false;
|
|
31007
31036
|
function d4(t6) {
|
|
@@ -31021,10 +31050,10 @@ function G$1$1() {
|
|
|
31021
31050
|
function g5() {
|
|
31022
31051
|
p5("unpipe"), n5.unpipe(e7);
|
|
31023
31052
|
}
|
|
31024
|
-
return n5.on("data", d4),
|
|
31053
|
+
return n5.on("data", d4), function(e8, t6, n6) {
|
|
31025
31054
|
if ("function" == typeof e8.prependListener) return e8.prependListener(t6, n6);
|
|
31026
31055
|
e8._events && e8._events[t6] ? Array.isArray(e8._events[t6]) ? e8._events[t6].unshift(n6) : e8._events[t6] = [n6, e8._events[t6]] : e8.on(t6, n6);
|
|
31027
|
-
}
|
|
31056
|
+
}(e7, "error", h6), e7.once("close", c6), e7.once("finish", b5), e7.emit("pipe", n5), r5.flowing || (p5("pipe resume"), n5.resume()), e7;
|
|
31028
31057
|
}, C4.prototype.unpipe = function(e7) {
|
|
31029
31058
|
var t5 = this._readableState, n5 = { hasUnpiped: false };
|
|
31030
31059
|
if (0 === t5.pipesCount) return this;
|
|
@@ -31048,26 +31077,26 @@ function G$1$1() {
|
|
|
31048
31077
|
return "readable" !== e7 && void 0 !== e7 || u5.nextTick(Y4, this), t5;
|
|
31049
31078
|
}, C4.prototype.resume = function() {
|
|
31050
31079
|
var e7 = this._readableState;
|
|
31051
|
-
return e7.flowing || (p5("resume"), e7.flowing = !e7.readableListening,
|
|
31080
|
+
return e7.flowing || (p5("resume"), e7.flowing = !e7.readableListening, function(e8, t5) {
|
|
31052
31081
|
t5.resumeScheduled || (t5.resumeScheduled = true, u5.nextTick(z4, e8, t5));
|
|
31053
|
-
}
|
|
31082
|
+
}(this, e7)), e7.paused = false, this;
|
|
31054
31083
|
}, C4.prototype.pause = function() {
|
|
31055
31084
|
return p5("call pause flowing=%j", this._readableState.flowing), false !== this._readableState.flowing && (p5("pause"), this._readableState.flowing = false, this.emit("pause")), this._readableState.paused = true, this;
|
|
31056
31085
|
}, C4.prototype.wrap = function(e7) {
|
|
31057
31086
|
var t5 = this, n5 = this._readableState, r5 = false;
|
|
31058
|
-
for (var i5 in e7.on("end",
|
|
31087
|
+
for (var i5 in e7.on("end", function() {
|
|
31059
31088
|
if (p5("wrapped end"), n5.decoder && !n5.ended) {
|
|
31060
31089
|
var e8 = n5.decoder.end();
|
|
31061
31090
|
e8 && e8.length && t5.push(e8);
|
|
31062
31091
|
}
|
|
31063
31092
|
t5.push(null);
|
|
31064
|
-
})
|
|
31093
|
+
}), e7.on("data", function(i6) {
|
|
31065
31094
|
(p5("wrapped data"), n5.decoder && (i6 = n5.decoder.write(i6)), n5.objectMode && null == i6) || (n5.objectMode || i6 && i6.length) && (t5.push(i6) || (r5 = true, e7.pause()));
|
|
31066
|
-
})
|
|
31095
|
+
}), e7) void 0 === this[i5] && "function" == typeof e7[i5] && (this[i5] = /* @__PURE__ */ function(t6) {
|
|
31067
31096
|
return function() {
|
|
31068
31097
|
return e7[t6].apply(e7, arguments);
|
|
31069
31098
|
};
|
|
31070
|
-
}
|
|
31099
|
+
}(i5));
|
|
31071
31100
|
for (var a5 = 0; a5 < D4.length; a5++) e7.on(D4[a5], this.emit.bind(this, D4[a5]));
|
|
31072
31101
|
return this._read = function(t6) {
|
|
31073
31102
|
p5("wrapped _read", t6), r5 && (r5 = false, e7.resume());
|
|
@@ -31098,7 +31127,7 @@ function J$1$1() {
|
|
|
31098
31127
|
function s5(e7) {
|
|
31099
31128
|
var t5 = this;
|
|
31100
31129
|
this.next = null, this.entry = null, this.finish = function() {
|
|
31101
|
-
!
|
|
31130
|
+
!function(e8, t6, n5) {
|
|
31102
31131
|
var r6 = e8.entry;
|
|
31103
31132
|
e8.entry = null;
|
|
31104
31133
|
for (; r6; ) {
|
|
@@ -31106,7 +31135,7 @@ function J$1$1() {
|
|
|
31106
31135
|
t6.pendingcb--, i5(n5), r6 = r6.next;
|
|
31107
31136
|
}
|
|
31108
31137
|
t6.corkedRequestsFree.next = e8;
|
|
31109
|
-
}
|
|
31138
|
+
}(t5, e7);
|
|
31110
31139
|
};
|
|
31111
31140
|
}
|
|
31112
31141
|
Y$1$1 = x4, x4.WritableState = T4;
|
|
@@ -31119,19 +31148,19 @@ function J$1$1() {
|
|
|
31119
31148
|
e$23 = e$23 || Z$1$1(), t5 = t5 || {}, "boolean" != typeof i5 && (i5 = n5 instanceof e$23), this.objectMode = !!t5.objectMode, i5 && (this.objectMode = this.objectMode || !!t5.writableObjectMode), this.highWaterMark = p5(this, t5, "writableHighWaterMark", i5), this.finalCalled = false, this.needDrain = false, this.ending = false, this.ended = false, this.finished = false, this.destroyed = false;
|
|
31120
31149
|
var a5 = false === t5.decodeStrings;
|
|
31121
31150
|
this.decodeStrings = !a5, this.defaultEncoding = t5.defaultEncoding || "utf8", this.length = 0, this.writing = false, this.corked = 0, this.sync = true, this.bufferProcessing = false, this.onwrite = function(e7) {
|
|
31122
|
-
!
|
|
31151
|
+
!function(e8, t6) {
|
|
31123
31152
|
var n6 = e8._writableState, i6 = n6.sync, a6 = n6.writecb;
|
|
31124
31153
|
if ("function" != typeof a6) throw new _4();
|
|
31125
|
-
if (
|
|
31154
|
+
if (function(e9) {
|
|
31126
31155
|
e9.writing = false, e9.writecb = null, e9.length -= e9.writelen, e9.writelen = 0;
|
|
31127
|
-
}
|
|
31156
|
+
}(n6), t6) !function(e9, t7, n7, i7, a7) {
|
|
31128
31157
|
--t7.pendingcb, n7 ? (r5.nextTick(a7, i7), r5.nextTick(W3, e9, t7), e9._writableState.errorEmitted = true, j4(e9, i7)) : (a7(i7), e9._writableState.errorEmitted = true, j4(e9, i7), W3(e9, t7));
|
|
31129
|
-
}
|
|
31158
|
+
}(e8, n6, i6, t6, a6);
|
|
31130
31159
|
else {
|
|
31131
31160
|
var o5 = C4(n6) || e8.destroyed;
|
|
31132
31161
|
o5 || n6.corked || n6.bufferProcessing || !n6.bufferedRequest || L4(e8, n6), i6 ? r5.nextTick(D4, e8, n6, o5, a6) : D4(e8, n6, o5, a6);
|
|
31133
31162
|
}
|
|
31134
|
-
}
|
|
31163
|
+
}(n5, e7);
|
|
31135
31164
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = false, this.errorEmitted = false, this.emitClose = false !== t5.emitClose, this.autoDestroy = !!t5.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new s5(this);
|
|
31136
31165
|
}
|
|
31137
31166
|
function x4(t5) {
|
|
@@ -31143,9 +31172,9 @@ function J$1$1() {
|
|
|
31143
31172
|
t5.writelen = r6, t5.writecb = o5, t5.writing = true, t5.sync = true, t5.destroyed ? t5.onwrite(new m4("write")) : n5 ? e7._writev(i5, t5.onwrite) : e7._write(i5, a5, t5.onwrite), t5.sync = false;
|
|
31144
31173
|
}
|
|
31145
31174
|
function D4(e7, t5, n5, r6) {
|
|
31146
|
-
n5 || !
|
|
31175
|
+
n5 || !function(e8, t6) {
|
|
31147
31176
|
0 === t6.length && t6.needDrain && (t6.needDrain = false, e8.emit("drain"));
|
|
31148
|
-
}
|
|
31177
|
+
}(e7, t5), t5.pendingcb--, r6(), W3(e7, t5);
|
|
31149
31178
|
}
|
|
31150
31179
|
function L4(e7, t5) {
|
|
31151
31180
|
t5.bufferProcessing = true;
|
|
@@ -31168,15 +31197,15 @@ function J$1$1() {
|
|
|
31168
31197
|
return e7.ending && 0 === e7.length && null === e7.bufferedRequest && !e7.finished && !e7.writing;
|
|
31169
31198
|
}
|
|
31170
31199
|
function A4(e7, t5) {
|
|
31171
|
-
e7._final(
|
|
31200
|
+
e7._final(function(n5) {
|
|
31172
31201
|
t5.pendingcb--, n5 && j4(e7, n5), t5.prefinished = true, e7.emit("prefinish"), W3(e7, t5);
|
|
31173
|
-
})
|
|
31202
|
+
});
|
|
31174
31203
|
}
|
|
31175
31204
|
function W3(e7, t5) {
|
|
31176
31205
|
var n5 = C4(t5);
|
|
31177
|
-
if (n5 && (!
|
|
31206
|
+
if (n5 && (!function(e8, t6) {
|
|
31178
31207
|
t6.prefinished || t6.finalCalled || ("function" != typeof e8._final || t6.destroyed ? (t6.prefinished = true, e8.emit("prefinish")) : (t6.pendingcb++, t6.finalCalled = true, r5.nextTick(A4, e8, t6)));
|
|
31179
|
-
}
|
|
31208
|
+
}(e7, t5), 0 === t5.pendingcb && (t5.finished = true, e7.emit("finish"), t5.autoDestroy))) {
|
|
31180
31209
|
var i5 = e7._readableState;
|
|
31181
31210
|
(!i5 || i5.autoDestroy && i5.endEmitted) && e7.destroy();
|
|
31182
31211
|
}
|
|
@@ -31185,14 +31214,14 @@ function J$1$1() {
|
|
|
31185
31214
|
return t$2(x4, d4), T4.prototype.getBuffer = function() {
|
|
31186
31215
|
for (var e7 = this.bufferedRequest, t5 = []; e7; ) t5.push(e7), e7 = e7.next;
|
|
31187
31216
|
return t5;
|
|
31188
|
-
},
|
|
31217
|
+
}, function() {
|
|
31189
31218
|
try {
|
|
31190
|
-
Object.defineProperty(T4.prototype, "buffer", { get: l5.deprecate(
|
|
31219
|
+
Object.defineProperty(T4.prototype, "buffer", { get: l5.deprecate(function() {
|
|
31191
31220
|
return this.getBuffer();
|
|
31192
|
-
}
|
|
31221
|
+
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") });
|
|
31193
31222
|
} catch (e7) {
|
|
31194
31223
|
}
|
|
31195
|
-
}
|
|
31224
|
+
}(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (c5 = Function.prototype[Symbol.hasInstance], Object.defineProperty(x4, Symbol.hasInstance, { value: function(e7) {
|
|
31196
31225
|
return !!c5.call(this, e7) || this === x4 && (e7 && e7._writableState instanceof T4);
|
|
31197
31226
|
} })) : c5 = function(e7) {
|
|
31198
31227
|
return e7 instanceof this;
|
|
@@ -31200,20 +31229,20 @@ function J$1$1() {
|
|
|
31200
31229
|
j4(this, new v5());
|
|
31201
31230
|
}, x4.prototype.write = function(e7, t5, n5) {
|
|
31202
31231
|
var i5, a5 = this._writableState, o5 = false, s6 = !a5.objectMode && (i5 = e7, f6.isBuffer(i5) || i5 instanceof h5);
|
|
31203
|
-
return s6 && !f6.isBuffer(e7) && (e7 =
|
|
31232
|
+
return s6 && !f6.isBuffer(e7) && (e7 = function(e8) {
|
|
31204
31233
|
return f6.from(e8);
|
|
31205
|
-
}
|
|
31234
|
+
}(e7)), "function" == typeof t5 && (n5 = t5, t5 = null), s6 ? t5 = "buffer" : t5 || (t5 = a5.defaultEncoding), "function" != typeof n5 && (n5 = O4), a5.ending ? function(e8, t6) {
|
|
31206
31235
|
var n6 = new k4();
|
|
31207
31236
|
j4(e8, n6), r5.nextTick(t6, n6);
|
|
31208
|
-
}
|
|
31237
|
+
}(this, n5) : (s6 || function(e8, t6, n6, i6) {
|
|
31209
31238
|
var a6;
|
|
31210
31239
|
return null === n6 ? a6 = new R4() : "string" == typeof n6 || t6.objectMode || (a6 = new y5("chunk", ["string", "Buffer"], n6)), !a6 || (j4(e8, a6), r5.nextTick(i6, a6), false);
|
|
31211
|
-
}
|
|
31240
|
+
}(this, a5, e7, n5)) && (a5.pendingcb++, o5 = function(e8, t6, n6, r6, i6, a6) {
|
|
31212
31241
|
if (!n6) {
|
|
31213
|
-
var o6 =
|
|
31242
|
+
var o6 = function(e9, t7, n7) {
|
|
31214
31243
|
e9.objectMode || false === e9.decodeStrings || "string" != typeof t7 || (t7 = f6.from(t7, n7));
|
|
31215
31244
|
return t7;
|
|
31216
|
-
}
|
|
31245
|
+
}(t6, r6, i6);
|
|
31217
31246
|
r6 !== o6 && (n6 = true, i6 = "buffer", r6 = o6);
|
|
31218
31247
|
}
|
|
31219
31248
|
var s7 = t6.objectMode ? 1 : r6.length;
|
|
@@ -31225,7 +31254,7 @@ function J$1$1() {
|
|
|
31225
31254
|
t6.lastBufferedRequest = { chunk: r6, encoding: i6, isBuf: n6, callback: a6, next: null }, d5 ? d5.next = t6.lastBufferedRequest : t6.bufferedRequest = t6.lastBufferedRequest, t6.bufferedRequestCount += 1;
|
|
31226
31255
|
} else P4(e8, t6, false, s7, r6, i6, a6);
|
|
31227
31256
|
return l6;
|
|
31228
|
-
}
|
|
31257
|
+
}(this, a5, s6, e7, t5, n5)), o5;
|
|
31229
31258
|
}, x4.prototype.cork = function() {
|
|
31230
31259
|
this._writableState.corked++;
|
|
31231
31260
|
}, x4.prototype.uncork = function() {
|
|
@@ -31242,10 +31271,10 @@ function J$1$1() {
|
|
|
31242
31271
|
n5(new w4("_write()"));
|
|
31243
31272
|
}, x4.prototype._writev = null, x4.prototype.end = function(e7, t5, n5) {
|
|
31244
31273
|
var i5 = this._writableState;
|
|
31245
|
-
return "function" == typeof e7 ? (n5 = e7, e7 = null, t5 = null) : "function" == typeof t5 && (n5 = t5, t5 = null), null != e7 && this.write(e7, t5), i5.corked && (i5.corked = 1, this.uncork()), i5.ending ||
|
|
31274
|
+
return "function" == typeof e7 ? (n5 = e7, e7 = null, t5 = null) : "function" == typeof t5 && (n5 = t5, t5 = null), null != e7 && this.write(e7, t5), i5.corked && (i5.corked = 1, this.uncork()), i5.ending || function(e8, t6, n6) {
|
|
31246
31275
|
t6.ending = true, W3(e8, t6), n6 && (t6.finished ? r5.nextTick(n6) : e8.once("finish", n6));
|
|
31247
31276
|
t6.ended = true, e8.writable = false;
|
|
31248
|
-
}
|
|
31277
|
+
}(this, i5, n5), this;
|
|
31249
31278
|
}, Object.defineProperty(x4.prototype, "writableLength", { enumerable: false, get: function() {
|
|
31250
31279
|
return this._writableState.length;
|
|
31251
31280
|
} }), Object.defineProperty(x4.prototype, "destroyed", { enumerable: false, get: function() {
|
|
@@ -31320,9 +31349,9 @@ function u$1$12(t5) {
|
|
|
31320
31349
|
}
|
|
31321
31350
|
function m$2$1() {
|
|
31322
31351
|
var t5 = this;
|
|
31323
|
-
"function" != typeof this._flush || this._readableState.destroyed ? _$2$1(this, null, null) : this._flush(
|
|
31352
|
+
"function" != typeof this._flush || this._readableState.destroyed ? _$2$1(this, null, null) : this._flush(function(r5, e7) {
|
|
31324
31353
|
_$2$1(t5, r5, e7);
|
|
31325
|
-
})
|
|
31354
|
+
});
|
|
31326
31355
|
}
|
|
31327
31356
|
function _$2$1(t5, r5, e7) {
|
|
31328
31357
|
if (r5) return t5.emit("error", r5);
|
|
@@ -31344,9 +31373,9 @@ t$2(u$1$12, h$2$1), u$1$12.prototype.push = function(t5, r5) {
|
|
|
31344
31373
|
var r5 = this._transformState;
|
|
31345
31374
|
null === r5.writechunk || r5.transforming ? r5.needTransform = true : (r5.transforming = true, this._transform(r5.writechunk, r5.writeencoding, r5.afterTransform));
|
|
31346
31375
|
}, u$1$12.prototype._destroy = function(t5, r5) {
|
|
31347
|
-
h$2$1.prototype._destroy.call(this, t5,
|
|
31376
|
+
h$2$1.prototype._destroy.call(this, t5, function(t6) {
|
|
31348
31377
|
r5(t6);
|
|
31349
|
-
})
|
|
31378
|
+
});
|
|
31350
31379
|
};
|
|
31351
31380
|
var p$2$1 = n$2$1;
|
|
31352
31381
|
var o$1$12;
|
|
@@ -31368,24 +31397,24 @@ function i$2$1(r5) {
|
|
|
31368
31397
|
if (r5) throw r5;
|
|
31369
31398
|
}
|
|
31370
31399
|
function u$2$1(r5, o5, e7, i5) {
|
|
31371
|
-
i5 = /* @__PURE__ */
|
|
31400
|
+
i5 = /* @__PURE__ */ function(r6) {
|
|
31372
31401
|
var n5 = false;
|
|
31373
31402
|
return function() {
|
|
31374
31403
|
n5 || (n5 = true, r6.apply(void 0, arguments));
|
|
31375
31404
|
};
|
|
31376
|
-
}
|
|
31405
|
+
}(i5);
|
|
31377
31406
|
var u5 = false;
|
|
31378
|
-
r5.on("close",
|
|
31407
|
+
r5.on("close", function() {
|
|
31379
31408
|
u5 = true;
|
|
31380
|
-
})
|
|
31409
|
+
}), void 0 === t$6$1 && (t$6$1 = n$1$12), t$6$1(r5, { readable: o5, writable: e7 }, function(r6) {
|
|
31381
31410
|
if (r6) return i5(r6);
|
|
31382
31411
|
u5 = true, i5();
|
|
31383
|
-
})
|
|
31412
|
+
});
|
|
31384
31413
|
var a5 = false;
|
|
31385
31414
|
return function(n5) {
|
|
31386
|
-
if (!u5 && !a5) return a5 = true,
|
|
31415
|
+
if (!u5 && !a5) return a5 = true, function(r6) {
|
|
31387
31416
|
return r6.setHeader && "function" == typeof r6.abort;
|
|
31388
|
-
}
|
|
31417
|
+
}(r5) ? r5.abort() : "function" == typeof r5.destroy ? r5.destroy() : (i5(n5 || new f$3$1("pipe")), void 0);
|
|
31389
31418
|
};
|
|
31390
31419
|
}
|
|
31391
31420
|
function a$1$12(r5) {
|
|
@@ -31401,12 +31430,12 @@ var v$2$1 = function() {
|
|
|
31401
31430
|
for (var r5 = arguments.length, n5 = new Array(r5), t5 = 0; t5 < r5; t5++) n5[t5] = arguments[t5];
|
|
31402
31431
|
var o5, f6 = p$3$1(n5);
|
|
31403
31432
|
if (Array.isArray(n5[0]) && (n5 = n5[0]), n5.length < 2) throw new e$4$1("streams");
|
|
31404
|
-
var i5 = n5.map(
|
|
31433
|
+
var i5 = n5.map(function(r6, t6) {
|
|
31405
31434
|
var e7 = t6 < n5.length - 1;
|
|
31406
|
-
return u$2$1(r6, e7, t6 > 0,
|
|
31435
|
+
return u$2$1(r6, e7, t6 > 0, function(r7) {
|
|
31407
31436
|
o5 || (o5 = r7), r7 && i5.forEach(a$1$12), e7 || (i5.forEach(a$1$12), f6(o5));
|
|
31408
|
-
})
|
|
31409
|
-
})
|
|
31437
|
+
});
|
|
31438
|
+
});
|
|
31410
31439
|
return n5.reduce(c$2$1);
|
|
31411
31440
|
};
|
|
31412
31441
|
var l$r;
|
|
@@ -32451,7 +32480,7 @@ function dew$1r() {
|
|
|
32451
32480
|
_dewExec$1r = true;
|
|
32452
32481
|
var assert2 = dew$1t();
|
|
32453
32482
|
var inherits = dew$f$2();
|
|
32454
|
-
var
|
|
32483
|
+
var utils = dew$1u();
|
|
32455
32484
|
var Cipher2 = dew$1s();
|
|
32456
32485
|
function DESState() {
|
|
32457
32486
|
this.tmp = new Array(2);
|
|
@@ -32472,31 +32501,31 @@ function dew$1r() {
|
|
|
32472
32501
|
DES.prototype.deriveKeys = function deriveKeys(state, key) {
|
|
32473
32502
|
state.keys = new Array(16 * 2);
|
|
32474
32503
|
assert2.equal(key.length, this.blockSize, "Invalid key length");
|
|
32475
|
-
var kL =
|
|
32476
|
-
var kR =
|
|
32477
|
-
|
|
32504
|
+
var kL = utils.readUInt32BE(key, 0);
|
|
32505
|
+
var kR = utils.readUInt32BE(key, 4);
|
|
32506
|
+
utils.pc1(kL, kR, state.tmp, 0);
|
|
32478
32507
|
kL = state.tmp[0];
|
|
32479
32508
|
kR = state.tmp[1];
|
|
32480
32509
|
for (var i5 = 0; i5 < state.keys.length; i5 += 2) {
|
|
32481
32510
|
var shift = shiftTable[i5 >>> 1];
|
|
32482
|
-
kL =
|
|
32483
|
-
kR =
|
|
32484
|
-
|
|
32511
|
+
kL = utils.r28shl(kL, shift);
|
|
32512
|
+
kR = utils.r28shl(kR, shift);
|
|
32513
|
+
utils.pc2(kL, kR, state.keys, i5);
|
|
32485
32514
|
}
|
|
32486
32515
|
};
|
|
32487
32516
|
DES.prototype._update = function _update(inp, inOff, out, outOff) {
|
|
32488
32517
|
var state = this._desState;
|
|
32489
|
-
var l5 =
|
|
32490
|
-
var r5 =
|
|
32491
|
-
|
|
32518
|
+
var l5 = utils.readUInt32BE(inp, inOff);
|
|
32519
|
+
var r5 = utils.readUInt32BE(inp, inOff + 4);
|
|
32520
|
+
utils.ip(l5, r5, state.tmp, 0);
|
|
32492
32521
|
l5 = state.tmp[0];
|
|
32493
32522
|
r5 = state.tmp[1];
|
|
32494
32523
|
if (this.type === "encrypt") this._encrypt(state, l5, r5, state.tmp, 0);
|
|
32495
32524
|
else this._decrypt(state, l5, r5, state.tmp, 0);
|
|
32496
32525
|
l5 = state.tmp[0];
|
|
32497
32526
|
r5 = state.tmp[1];
|
|
32498
|
-
|
|
32499
|
-
|
|
32527
|
+
utils.writeUInt32BE(out, l5, outOff);
|
|
32528
|
+
utils.writeUInt32BE(out, r5, outOff + 4);
|
|
32500
32529
|
};
|
|
32501
32530
|
DES.prototype._pad = function _pad(buffer2, off2) {
|
|
32502
32531
|
var value = buffer2.length - off2;
|
|
@@ -32514,16 +32543,16 @@ function dew$1r() {
|
|
|
32514
32543
|
for (var i5 = 0; i5 < state.keys.length; i5 += 2) {
|
|
32515
32544
|
var keyL = state.keys[i5];
|
|
32516
32545
|
var keyR = state.keys[i5 + 1];
|
|
32517
|
-
|
|
32546
|
+
utils.expand(r5, state.tmp, 0);
|
|
32518
32547
|
keyL ^= state.tmp[0];
|
|
32519
32548
|
keyR ^= state.tmp[1];
|
|
32520
|
-
var s5 =
|
|
32521
|
-
var f6 =
|
|
32549
|
+
var s5 = utils.substitute(keyL, keyR);
|
|
32550
|
+
var f6 = utils.permute(s5);
|
|
32522
32551
|
var t5 = r5;
|
|
32523
32552
|
r5 = (l5 ^ f6) >>> 0;
|
|
32524
32553
|
l5 = t5;
|
|
32525
32554
|
}
|
|
32526
|
-
|
|
32555
|
+
utils.rip(r5, l5, out, off2);
|
|
32527
32556
|
};
|
|
32528
32557
|
DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off2) {
|
|
32529
32558
|
var l5 = rStart;
|
|
@@ -32531,16 +32560,16 @@ function dew$1r() {
|
|
|
32531
32560
|
for (var i5 = state.keys.length - 2; i5 >= 0; i5 -= 2) {
|
|
32532
32561
|
var keyL = state.keys[i5];
|
|
32533
32562
|
var keyR = state.keys[i5 + 1];
|
|
32534
|
-
|
|
32563
|
+
utils.expand(l5, state.tmp, 0);
|
|
32535
32564
|
keyL ^= state.tmp[0];
|
|
32536
32565
|
keyR ^= state.tmp[1];
|
|
32537
|
-
var s5 =
|
|
32538
|
-
var f6 =
|
|
32566
|
+
var s5 = utils.substitute(keyL, keyR);
|
|
32567
|
+
var f6 = utils.permute(s5);
|
|
32539
32568
|
var t5 = l5;
|
|
32540
32569
|
l5 = (r5 ^ f6) >>> 0;
|
|
32541
32570
|
r5 = t5;
|
|
32542
32571
|
}
|
|
32543
|
-
|
|
32572
|
+
utils.rip(l5, r5, out, off2);
|
|
32544
32573
|
};
|
|
32545
32574
|
return exports$1s;
|
|
32546
32575
|
}
|
|
@@ -33210,7 +33239,7 @@ function dew$1c$1() {
|
|
|
33210
33239
|
return [t0, t1, t22, t32];
|
|
33211
33240
|
}
|
|
33212
33241
|
var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
|
|
33213
|
-
var G3 =
|
|
33242
|
+
var G3 = function() {
|
|
33214
33243
|
var d4 = new Array(256);
|
|
33215
33244
|
for (var j4 = 0; j4 < 256; j4++) {
|
|
33216
33245
|
if (j4 < 128) {
|
|
@@ -33256,7 +33285,7 @@ function dew$1c$1() {
|
|
|
33256
33285
|
SUB_MIX,
|
|
33257
33286
|
INV_SUB_MIX
|
|
33258
33287
|
};
|
|
33259
|
-
}
|
|
33288
|
+
}();
|
|
33260
33289
|
function AES(key) {
|
|
33261
33290
|
(this || _global$j$1)._key = asUInt32Array(key);
|
|
33262
33291
|
this._reset();
|
|
@@ -39294,7 +39323,7 @@ var forEach2 = function(e7, t5) {
|
|
|
39294
39323
|
if (e7.forEach) return e7.forEach(t5);
|
|
39295
39324
|
for (var n5 = 0; n5 < e7.length; n5++) t5(e7[n5], n5, e7);
|
|
39296
39325
|
};
|
|
39297
|
-
var defineProp2 =
|
|
39326
|
+
var defineProp2 = function() {
|
|
39298
39327
|
try {
|
|
39299
39328
|
return Object.defineProperty({}, "_", {}), function(e7, t5, n5) {
|
|
39300
39329
|
Object.defineProperty(e7, t5, { writable: true, enumerable: false, configurable: true, value: n5 });
|
|
@@ -39304,7 +39333,7 @@ var defineProp2 = (function() {
|
|
|
39304
39333
|
e8[t5] = n5;
|
|
39305
39334
|
};
|
|
39306
39335
|
}
|
|
39307
|
-
}
|
|
39336
|
+
}();
|
|
39308
39337
|
var globals2 = ["Array", "Boolean", "Date", "Error", "EvalError", "Function", "Infinity", "JSON", "Math", "NaN", "Number", "Object", "RangeError", "ReferenceError", "RegExp", "String", "SyntaxError", "TypeError", "URIError", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "undefined", "unescape"];
|
|
39309
39338
|
function Context2() {
|
|
39310
39339
|
}
|
|
@@ -39318,38 +39347,38 @@ Script3.prototype.runInContext = function(e7) {
|
|
|
39318
39347
|
var t5 = document.createElement("iframe");
|
|
39319
39348
|
t5.style || (t5.style = {}), t5.style.display = "none", document.body.appendChild(t5);
|
|
39320
39349
|
var n5 = t5.contentWindow, r5 = n5.eval, o5 = n5.execScript;
|
|
39321
|
-
!r5 && o5 && (o5.call(n5, "null"), r5 = n5.eval), forEach2(Object_keys2(e7),
|
|
39350
|
+
!r5 && o5 && (o5.call(n5, "null"), r5 = n5.eval), forEach2(Object_keys2(e7), function(t6) {
|
|
39322
39351
|
n5[t6] = e7[t6];
|
|
39323
|
-
})
|
|
39352
|
+
}), forEach2(globals2, function(t6) {
|
|
39324
39353
|
e7[t6] && (n5[t6] = e7[t6]);
|
|
39325
|
-
})
|
|
39354
|
+
});
|
|
39326
39355
|
var c5 = Object_keys2(n5), i5 = r5.call(n5, (this || _global$b$1).code);
|
|
39327
|
-
return forEach2(Object_keys2(n5),
|
|
39356
|
+
return forEach2(Object_keys2(n5), function(t6) {
|
|
39328
39357
|
(t6 in e7 || -1 === indexOf2(c5, t6)) && (e7[t6] = n5[t6]);
|
|
39329
|
-
})
|
|
39358
|
+
}), forEach2(globals2, function(t6) {
|
|
39330
39359
|
t6 in e7 || defineProp2(e7, t6, n5[t6]);
|
|
39331
|
-
})
|
|
39360
|
+
}), document.body.removeChild(t5), i5;
|
|
39332
39361
|
}, Script3.prototype.runInThisContext = function() {
|
|
39333
39362
|
return eval((this || _global$b$1).code);
|
|
39334
39363
|
}, Script3.prototype.runInNewContext = function(e7) {
|
|
39335
39364
|
var t5 = Script3.createContext(e7), n5 = this.runInContext(t5);
|
|
39336
|
-
return e7 && forEach2(Object_keys2(t5),
|
|
39365
|
+
return e7 && forEach2(Object_keys2(t5), function(n6) {
|
|
39337
39366
|
e7[n6] = t5[n6];
|
|
39338
|
-
})
|
|
39339
|
-
}, forEach2(Object_keys2(Script3.prototype),
|
|
39367
|
+
}), n5;
|
|
39368
|
+
}, forEach2(Object_keys2(Script3.prototype), function(e7) {
|
|
39340
39369
|
exports$11$1[e7] = Script3[e7] = function(t5) {
|
|
39341
39370
|
var n5 = Script3(t5);
|
|
39342
39371
|
return n5[e7].apply(n5, [].slice.call(arguments, 1));
|
|
39343
39372
|
};
|
|
39344
|
-
})
|
|
39373
|
+
}), exports$11$1.isContext = function(e7) {
|
|
39345
39374
|
return e7 instanceof Context2;
|
|
39346
39375
|
}, exports$11$1.createScript = function(e7) {
|
|
39347
39376
|
return exports$11$1.Script(e7);
|
|
39348
39377
|
}, exports$11$1.createContext = Script3.createContext = function(e7) {
|
|
39349
39378
|
var t5 = new Context2();
|
|
39350
|
-
return "object" == typeof e7 && forEach2(Object_keys2(e7),
|
|
39379
|
+
return "object" == typeof e7 && forEach2(Object_keys2(e7), function(n5) {
|
|
39351
39380
|
t5[n5] = e7[n5];
|
|
39352
|
-
})
|
|
39381
|
+
}), t5;
|
|
39353
39382
|
};
|
|
39354
39383
|
exports$11$1.Script;
|
|
39355
39384
|
exports$11$1.createContext;
|
|
@@ -39367,9 +39396,9 @@ var a4 = f4 && f4.getRandomValues ? function(e7, r5) {
|
|
|
39367
39396
|
var o5 = t4.allocUnsafe(e7);
|
|
39368
39397
|
if (e7 > 0) if (e7 > 65536) for (var a5 = 0; a5 < e7; a5 += 65536) f4.getRandomValues(o5.slice(a5, a5 + 65536));
|
|
39369
39398
|
else f4.getRandomValues(o5);
|
|
39370
|
-
if ("function" == typeof r5) return n4.nextTick(
|
|
39399
|
+
if ("function" == typeof r5) return n4.nextTick(function() {
|
|
39371
39400
|
r5(null, o5);
|
|
39372
|
-
})
|
|
39401
|
+
});
|
|
39373
39402
|
return o5;
|
|
39374
39403
|
} : function() {
|
|
39375
39404
|
throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11");
|
|
@@ -39396,9 +39425,9 @@ t$2(s4, o$13), s4.prototype._transform = function(t5, i5, r5) {
|
|
|
39396
39425
|
}
|
|
39397
39426
|
t5(i5);
|
|
39398
39427
|
}, s4.prototype.update = function(t5, i5) {
|
|
39399
|
-
if (!
|
|
39428
|
+
if (!function(t6, i6) {
|
|
39400
39429
|
if (!e6.isBuffer(t6) && "string" != typeof t6) throw new TypeError(i6 + " must be a string or a buffer");
|
|
39401
|
-
}
|
|
39430
|
+
}(t5, "Data"), this._finalized) throw new Error("Digest already called");
|
|
39402
39431
|
e6.isBuffer(t5) || (t5 = e6.from(t5, i5));
|
|
39403
39432
|
for (var r5 = this._block, o5 = 0; this._blockOffset + t5.length - o5 >= this._blockSize; ) {
|
|
39404
39433
|
for (var s5 = this._blockOffset; s5 < this._blockSize; ) r5[s5++] = t5[o5++];
|
|
@@ -39859,14 +39888,14 @@ var w$4 = u3.Buffer;
|
|
|
39859
39888
|
var g$2 = w$4.alloc(128);
|
|
39860
39889
|
var B$1 = { md5: 16, sha1: 20, sha224: 28, sha256: 32, sha384: 48, sha512: 64, rmd160: 20, ripemd160: 20 };
|
|
39861
39890
|
function T$12(r5, e7, t5) {
|
|
39862
|
-
var n5 = /* @__PURE__ */
|
|
39891
|
+
var n5 = /* @__PURE__ */ function(r6) {
|
|
39863
39892
|
function e8(e9) {
|
|
39864
39893
|
return y$2(r6).update(e9).digest();
|
|
39865
39894
|
}
|
|
39866
39895
|
return "rmd160" === r6 || "ripemd160" === r6 ? function(r7) {
|
|
39867
39896
|
return new m$3().update(r7).digest();
|
|
39868
39897
|
} : "md5" === r6 ? d$4 : e8;
|
|
39869
|
-
}
|
|
39898
|
+
}(r5), o5 = "sha512" === r5 || "sha384" === r5 ? 128 : 64;
|
|
39870
39899
|
e7.length > o5 ? e7 = n5(e7) : e7.length < o5 && (e7 = w$4.concat([e7, g$2], o5));
|
|
39871
39900
|
for (var i5 = w$4.allocUnsafe(o5 + B$1[r5]), f6 = w$4.allocUnsafe(o5 + B$1[r5]), a5 = 0; a5 < o5; a5++) i5[a5] = 54 ^ e7[a5], f6[a5] = 92 ^ e7[a5];
|
|
39872
39901
|
var s5 = w$4.allocUnsafe(o5 + t5 + 4);
|
|
@@ -39900,16 +39929,16 @@ var x$1 = A$1.crypto && A$1.crypto.subtle;
|
|
|
39900
39929
|
var z$1 = { sha: "SHA-1", "sha-1": "SHA-1", sha1: "SHA-1", sha256: "SHA-256", "sha-256": "SHA-256", sha384: "SHA-384", "sha-384": "SHA-384", "sha-512": "SHA-512", sha512: "SHA-512" };
|
|
39901
39930
|
var I$2 = [];
|
|
39902
39931
|
function D$1(r5, e7, t5, n5, o5) {
|
|
39903
|
-
return x$1.importKey("raw", r5, { name: "PBKDF2" }, false, ["deriveBits"]).then(
|
|
39932
|
+
return x$1.importKey("raw", r5, { name: "PBKDF2" }, false, ["deriveBits"]).then(function(r6) {
|
|
39904
39933
|
return x$1.deriveBits({ name: "PBKDF2", salt: e7, iterations: t5, hash: { name: o5 } }, r6, n5 << 3);
|
|
39905
|
-
})
|
|
39934
|
+
}).then(function(r6) {
|
|
39906
39935
|
return K$1.from(r6);
|
|
39907
|
-
})
|
|
39936
|
+
});
|
|
39908
39937
|
}
|
|
39909
39938
|
var F$1 = function(r5, e7, t5, n5, o5, i5) {
|
|
39910
39939
|
"function" == typeof o5 && (i5 = o5, o5 = void 0);
|
|
39911
39940
|
var f6 = z$1[(o5 = o5 || "sha1").toLowerCase()];
|
|
39912
|
-
if (!f6 || "function" != typeof A$1.Promise) return H$1.nextTick(
|
|
39941
|
+
if (!f6 || "function" != typeof A$1.Promise) return H$1.nextTick(function() {
|
|
39913
39942
|
var f7;
|
|
39914
39943
|
try {
|
|
39915
39944
|
f7 = U$1(r5, e7, t5, n5, o5);
|
|
@@ -39917,31 +39946,31 @@ var F$1 = function(r5, e7, t5, n5, o5, i5) {
|
|
|
39917
39946
|
return i5(r6);
|
|
39918
39947
|
}
|
|
39919
39948
|
i5(null, f7);
|
|
39920
|
-
})
|
|
39949
|
+
});
|
|
39921
39950
|
if (E$2(r5, e7, t5, n5), "function" != typeof i5) throw new Error("No callback provided to pbkdf2");
|
|
39922
|
-
K$1.isBuffer(r5) || (r5 = K$1.from(r5, P$1)), K$1.isBuffer(e7) || (e7 = K$1.from(e7, P$1)),
|
|
39923
|
-
r6.then(
|
|
39924
|
-
H$1.nextTick(
|
|
39951
|
+
K$1.isBuffer(r5) || (r5 = K$1.from(r5, P$1)), K$1.isBuffer(e7) || (e7 = K$1.from(e7, P$1)), function(r6, e8) {
|
|
39952
|
+
r6.then(function(r7) {
|
|
39953
|
+
H$1.nextTick(function() {
|
|
39925
39954
|
e8(null, r7);
|
|
39926
|
-
})
|
|
39927
|
-
}
|
|
39928
|
-
H$1.nextTick(
|
|
39955
|
+
});
|
|
39956
|
+
}, function(r7) {
|
|
39957
|
+
H$1.nextTick(function() {
|
|
39929
39958
|
e8(r7);
|
|
39930
|
-
})
|
|
39931
|
-
})
|
|
39932
|
-
}
|
|
39959
|
+
});
|
|
39960
|
+
});
|
|
39961
|
+
}(function(r6) {
|
|
39933
39962
|
if (A$1.process && !A$1.process.browser) return Promise.resolve(false);
|
|
39934
39963
|
if (!x$1 || !x$1.importKey || !x$1.deriveBits) return Promise.resolve(false);
|
|
39935
39964
|
if (void 0 !== I$2[r6]) return I$2[r6];
|
|
39936
|
-
var e8 = D$1(k$3 = k$3 || K$1.alloc(8), k$3, 10, 128, r6).then(
|
|
39965
|
+
var e8 = D$1(k$3 = k$3 || K$1.alloc(8), k$3, 10, 128, r6).then(function() {
|
|
39937
39966
|
return true;
|
|
39938
|
-
})
|
|
39967
|
+
}).catch(function() {
|
|
39939
39968
|
return false;
|
|
39940
|
-
})
|
|
39969
|
+
});
|
|
39941
39970
|
return I$2[r6] = e8, e8;
|
|
39942
|
-
}
|
|
39971
|
+
}(f6).then(function(i6) {
|
|
39943
39972
|
return i6 ? D$1(r5, e7, t5, n5, f6) : U$1(r5, e7, t5, n5, o5);
|
|
39944
|
-
})
|
|
39973
|
+
}), i5);
|
|
39945
39974
|
};
|
|
39946
39975
|
var M$1 = {};
|
|
39947
39976
|
M$1.pbkdf2 = F$1, M$1.pbkdf2Sync = S$1;
|
|
@@ -40312,7 +40341,7 @@ function l$9(t5, e7, i5, r5, n5) {
|
|
|
40312
40341
|
return a5 = (r5[p5 >>> 24] << 24 | r5[_4 >>> 16 & 255] << 16 | r5[d4 >>> 8 & 255] << 8 | r5[255 & y5]) ^ e7[B4++], h5 = (r5[_4 >>> 24] << 24 | r5[d4 >>> 16 & 255] << 16 | r5[y5 >>> 8 & 255] << 8 | r5[255 & p5]) ^ e7[B4++], o5 = (r5[d4 >>> 24] << 24 | r5[y5 >>> 16 & 255] << 16 | r5[p5 >>> 8 & 255] << 8 | r5[255 & _4]) ^ e7[B4++], s5 = (r5[y5 >>> 24] << 24 | r5[p5 >>> 16 & 255] << 16 | r5[_4 >>> 8 & 255] << 8 | r5[255 & d4]) ^ e7[B4++], [a5 >>>= 0, h5 >>>= 0, o5 >>>= 0, s5 >>>= 0];
|
|
40313
40342
|
}
|
|
40314
40343
|
var f$d = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
|
|
40315
|
-
var u$8 =
|
|
40344
|
+
var u$8 = function() {
|
|
40316
40345
|
for (var t5 = new Array(256), e7 = 0; e7 < 256; e7++) t5[e7] = e7 < 128 ? e7 << 1 : e7 << 1 ^ 283;
|
|
40317
40346
|
for (var i5 = [], r5 = [], n5 = [[], [], [], []], a5 = [[], [], [], []], h5 = 0, o5 = 0, s5 = 0; s5 < 256; ++s5) {
|
|
40318
40347
|
var c5 = o5 ^ o5 << 1 ^ o5 << 2 ^ o5 << 3 ^ o5 << 4;
|
|
@@ -40321,7 +40350,7 @@ var u$8 = (function() {
|
|
|
40321
40350
|
n5[0][h5] = p5 << 24 | p5 >>> 8, n5[1][h5] = p5 << 16 | p5 >>> 16, n5[2][h5] = p5 << 8 | p5 >>> 24, n5[3][h5] = p5, p5 = 16843009 * u5 ^ 65537 * f6 ^ 257 * l5 ^ 16843008 * h5, a5[0][c5] = p5 << 24 | p5 >>> 8, a5[1][c5] = p5 << 16 | p5 >>> 16, a5[2][c5] = p5 << 8 | p5 >>> 24, a5[3][c5] = p5, 0 === h5 ? h5 = o5 = 1 : (h5 = l5 ^ t5[t5[t5[u5 ^ l5]]], o5 ^= t5[t5[o5]]);
|
|
40322
40351
|
}
|
|
40323
40352
|
return { SBOX: i5, INV_SBOX: r5, SUB_MIX: n5, INV_SUB_MIX: a5 };
|
|
40324
|
-
}
|
|
40353
|
+
}();
|
|
40325
40354
|
function p$9(t5) {
|
|
40326
40355
|
(this || a$b)._key = s$8(t5), this._reset();
|
|
40327
40356
|
}
|
|
@@ -40387,7 +40416,7 @@ function X$1(t5, e7, i5, r5) {
|
|
|
40387
40416
|
var n5 = U$4.alloc(4, 0);
|
|
40388
40417
|
(this || v$5)._cipher = new I$5.AES(e7);
|
|
40389
40418
|
var a5 = (this || v$5)._cipher.encryptBlock(n5);
|
|
40390
|
-
(this || v$5)._ghash = new m$6(a5), i5 =
|
|
40419
|
+
(this || v$5)._ghash = new m$6(a5), i5 = function(t6, e8, i6) {
|
|
40391
40420
|
if (12 === e8.length) return t6._finID = U$4.concat([e8, U$4.from([0, 0, 0, 1])]), U$4.concat([e8, U$4.from([0, 0, 0, 2])]);
|
|
40392
40421
|
var r6 = new m$6(i6), n6 = e8.length, a6 = n6 % 16;
|
|
40393
40422
|
r6.update(e8), a6 && (a6 = 16 - a6, r6.update(U$4.alloc(a6, 0))), r6.update(U$4.alloc(8, 0));
|
|
@@ -40395,7 +40424,7 @@ function X$1(t5, e7, i5, r5) {
|
|
|
40395
40424
|
o5.writeUIntBE(h5, 0, 8), r6.update(o5), t6._finID = r6.state;
|
|
40396
40425
|
var s5 = U$4.from(t6._finID);
|
|
40397
40426
|
return b$6(s5), s5;
|
|
40398
|
-
}
|
|
40427
|
+
}(this || v$5, i5, a5), (this || v$5)._prev = U$4.from(i5), (this || v$5)._cache = U$4.allocUnsafe(0), (this || v$5)._secCache = U$4.allocUnsafe(0), (this || v$5)._decrypt = r5, (this || v$5)._alen = 0, (this || v$5)._len = 0, (this || v$5)._mode = t5, (this || v$5)._authTag = null, (this || v$5)._called = false;
|
|
40399
40428
|
}
|
|
40400
40429
|
t$2(X$1, w$7), X$1.prototype._update = function(t5) {
|
|
40401
40430
|
if (!(this || v$5)._called && (this || v$5)._alen) {
|
|
@@ -40408,12 +40437,12 @@ t$2(X$1, w$7), X$1.prototype._update = function(t5) {
|
|
|
40408
40437
|
}, X$1.prototype._final = function() {
|
|
40409
40438
|
if ((this || v$5)._decrypt && !(this || v$5)._authTag) throw new Error("Unsupported state or unable to authenticate data");
|
|
40410
40439
|
var t5 = E$5((this || v$5)._ghash.final(8 * (this || v$5)._alen, 8 * (this || v$5)._len), (this || v$5)._cipher.encryptBlock((this || v$5)._finID));
|
|
40411
|
-
if ((this || v$5)._decrypt &&
|
|
40440
|
+
if ((this || v$5)._decrypt && function(t6, e7) {
|
|
40412
40441
|
var i5 = 0;
|
|
40413
40442
|
t6.length !== e7.length && i5++;
|
|
40414
40443
|
for (var r5 = Math.min(t6.length, e7.length), n5 = 0; n5 < r5; ++n5) i5 += t6[n5] ^ e7[n5];
|
|
40415
40444
|
return i5;
|
|
40416
|
-
}
|
|
40445
|
+
}(t5, (this || v$5)._authTag)) throw new Error("Unsupported state or unable to authenticate data");
|
|
40417
40446
|
(this || v$5)._authTag = t5, (this || v$5)._cipher.scrub();
|
|
40418
40447
|
}, X$1.prototype.getAuthTag = function() {
|
|
40419
40448
|
if ((this || v$5)._decrypt || !U$4.isBuffer((this || v$5)._authTag)) throw new Error("Attempting to get auth tag in unsupported state");
|
|
@@ -40487,14 +40516,14 @@ t$2(g$6, d$9), g$6.prototype._update = function(t5) {
|
|
|
40487
40516
|
return p$a.concat(i5);
|
|
40488
40517
|
}, g$6.prototype._final = function() {
|
|
40489
40518
|
var t5 = (this || c$9)._cache.flush();
|
|
40490
|
-
if ((this || c$9)._autopadding) return
|
|
40519
|
+
if ((this || c$9)._autopadding) return function(t6) {
|
|
40491
40520
|
var e7 = t6[15];
|
|
40492
40521
|
if (e7 < 1 || e7 > 16) throw new Error("unable to decrypt data");
|
|
40493
40522
|
var r5 = -1;
|
|
40494
40523
|
for (; ++r5 < e7; ) if (t6[r5 + (16 - e7)] !== e7) throw new Error("unable to decrypt data");
|
|
40495
40524
|
if (16 === e7) return;
|
|
40496
40525
|
return t6.slice(0, 16 - e7);
|
|
40497
|
-
}
|
|
40526
|
+
}((this || c$9)._mode.decrypt(this || c$9, t5));
|
|
40498
40527
|
if (t5) throw new Error("data not multiple of block length");
|
|
40499
40528
|
}, g$6.prototype.setAutoPadding = function(t5) {
|
|
40500
40529
|
return (this || c$9)._autopadding = !!t5, this || c$9;
|
|
@@ -40616,7 +40645,7 @@ var t$4 = Object.freeze({});
|
|
|
40616
40645
|
var i$3 = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : global;
|
|
40617
40646
|
var r$7 = {};
|
|
40618
40647
|
var h$a = { exports: r$7 };
|
|
40619
|
-
!
|
|
40648
|
+
!function(r5, h5) {
|
|
40620
40649
|
function n5(t5, i5) {
|
|
40621
40650
|
if (!t5) throw new Error(i5 || "Assertion failed");
|
|
40622
40651
|
}
|
|
@@ -40922,7 +40951,7 @@ var h$a = { exports: r$7 };
|
|
|
40922
40951
|
}
|
|
40923
40952
|
Math.imul || (p5 = d4), o5.prototype.mulTo = function(t5, r6) {
|
|
40924
40953
|
var h6 = (this || i$3).length + t5.length;
|
|
40925
|
-
return 10 === (this || i$3).length && 10 === t5.length ? p5(this || i$3, t5, r6) : h6 < 63 ? d4(this || i$3, t5, r6) : h6 < 1024 ?
|
|
40954
|
+
return 10 === (this || i$3).length && 10 === t5.length ? p5(this || i$3, t5, r6) : h6 < 63 ? d4(this || i$3, t5, r6) : h6 < 1024 ? function(t6, i5, r7) {
|
|
40926
40955
|
r7.negative = i5.negative ^ t6.negative, r7.length = t6.length + i5.length;
|
|
40927
40956
|
for (var h7 = 0, n6 = 0, e8 = 0; e8 < r7.length - 1; e8++) {
|
|
40928
40957
|
var o6 = n6;
|
|
@@ -40934,7 +40963,7 @@ var h$a = { exports: r$7 };
|
|
|
40934
40963
|
r7.words[e8] = s6, h7 = o6, o6 = n6;
|
|
40935
40964
|
}
|
|
40936
40965
|
return 0 !== h7 ? r7.words[e8] = h7 : r7.length--, r7.strip();
|
|
40937
|
-
}
|
|
40966
|
+
}(this || i$3, t5, r6) : M4(this || i$3, t5, r6);
|
|
40938
40967
|
}, v5.prototype.makeRBT = function(t5) {
|
|
40939
40968
|
for (var i5 = new Array(t5), r6 = o5.prototype._countBits(t5) - 1, h6 = 0; h6 < t5; h6++) i5[h6] = this.revBin(h6, r6, t5);
|
|
40940
40969
|
return i5;
|
|
@@ -41002,13 +41031,13 @@ var h$a = { exports: r$7 };
|
|
|
41002
41031
|
}, o5.prototype.isqr = function() {
|
|
41003
41032
|
return this.imul(this.clone());
|
|
41004
41033
|
}, o5.prototype.pow = function(t5) {
|
|
41005
|
-
var r6 =
|
|
41034
|
+
var r6 = function(t6) {
|
|
41006
41035
|
for (var i5 = new Array(t6.bitLength()), r7 = 0; r7 < i5.length; r7++) {
|
|
41007
41036
|
var h7 = r7 / 26 | 0, n7 = r7 % 26;
|
|
41008
41037
|
i5[r7] = (t6.words[h7] & 1 << n7) >>> n7;
|
|
41009
41038
|
}
|
|
41010
41039
|
return i5;
|
|
41011
|
-
}
|
|
41040
|
+
}(t5);
|
|
41012
41041
|
if (0 === r6.length) return new o5(1);
|
|
41013
41042
|
for (var h6 = this || i$3, n6 = 0; n6 < r6.length && 0 === r6[n6]; n6++, h6 = h6.sqr()) ;
|
|
41014
41043
|
if (++n6 < r6.length) for (var e8 = h6.sqr(); n6 < r6.length; n6++, e8 = e8.sqr()) 0 !== r6[n6] && (h6 = h6.mul(e8));
|
|
@@ -41461,7 +41490,7 @@ var h$a = { exports: r$7 };
|
|
|
41461
41490
|
}, A4.prototype.invm = function(t5) {
|
|
41462
41491
|
return this.imod(t5._invmp((this || i$3).m).mul((this || i$3).r2))._forceRed(this || i$3);
|
|
41463
41492
|
};
|
|
41464
|
-
}
|
|
41493
|
+
}(h$a, r$7);
|
|
41465
41494
|
var n$c = h$a.exports;
|
|
41466
41495
|
var t$5;
|
|
41467
41496
|
var e$a;
|
|
@@ -41623,7 +41652,7 @@ function A$5(f6, e7) {
|
|
|
41623
41652
|
return e7 ? c5.toString(e7) : c5;
|
|
41624
41653
|
}
|
|
41625
41654
|
Object.defineProperty(k$7.prototype, "verifyError", { enumerable: true, get: function() {
|
|
41626
|
-
return "number" != typeof (this || B$5)._primeCode && ((this || B$5)._primeCode =
|
|
41655
|
+
return "number" != typeof (this || B$5)._primeCode && ((this || B$5)._primeCode = function(f6, e7) {
|
|
41627
41656
|
var c5 = e7.toString("hex"), a5 = [c5, f6.toString(16)].join("_");
|
|
41628
41657
|
if (a5 in M$4) return M$4[a5];
|
|
41629
41658
|
var b4, d4 = 0;
|
|
@@ -41639,7 +41668,7 @@ Object.defineProperty(k$7.prototype, "verifyError", { enumerable: true, get: fun
|
|
|
41639
41668
|
d4 += 4;
|
|
41640
41669
|
}
|
|
41641
41670
|
return M$4[a5] = d4, d4;
|
|
41642
|
-
}
|
|
41671
|
+
}((this || B$5).__prime, (this || B$5).__gen)), (this || B$5)._primeCode;
|
|
41643
41672
|
} }), k$7.prototype.generateKeys = function() {
|
|
41644
41673
|
return (this || B$5)._priv || ((this || B$5)._priv = new R$1(j$1((this || B$5)._primeLen))), (this || B$5)._pub = (this || B$5)._gen.toRed((this || B$5)._prime).redPow((this || B$5)._priv).fromRed(), this.getPublicKey();
|
|
41645
41674
|
}, k$7.prototype.computeSecret = function(f6) {
|
|
@@ -41678,10 +41707,10 @@ var u$c = e$1$1.Buffer;
|
|
|
41678
41707
|
var n$g = n$c;
|
|
41679
41708
|
var d$d = a4;
|
|
41680
41709
|
function t$8(e7, o5) {
|
|
41681
|
-
var r5 =
|
|
41710
|
+
var r5 = function(e8) {
|
|
41682
41711
|
var o6 = i$6(e8);
|
|
41683
41712
|
return { blinder: o6.toRed(n$g.mont(e8.modulus)).redPow(new n$g(e8.publicExponent)).fromRed(), unblinder: o6.invm(e8.modulus) };
|
|
41684
|
-
}
|
|
41713
|
+
}(o5), m4 = o5.modulus.byteLength(), d4 = (n$g.mont(o5.modulus), new n$g(e7).mul(r5.blinder).umod(o5.modulus)), t5 = d4.toRed(n$g.mont(o5.prime1)), l5 = d4.toRed(n$g.mont(o5.prime2)), f6 = o5.coefficient, p5 = o5.prime1, b4 = o5.prime2, s5 = t5.redPow(o5.exponent1), a5 = l5.redPow(o5.exponent2);
|
|
41685
41714
|
s5 = s5.fromRed(), a5 = a5.fromRed();
|
|
41686
41715
|
var w4 = s5.isub(a5).imul(f6).umod(p5);
|
|
41687
41716
|
return w4.imul(b4), a5.iadd(w4), new u$c(a5.imul(r5.unblinder).umod(o5.modulus).toArray(false, m4));
|
|
@@ -42346,9 +42375,9 @@ m$f(A$8, S$9), l$j = A$8, A$8.prototype._getEndomorphism = function(e7) {
|
|
|
42346
42375
|
var t5 = this._getEndoRoots(this.n);
|
|
42347
42376
|
0 === this.g.mul(t5[0]).x.cmp(this.g.x.redMul(f6)) ? d4 = t5[0] : (d4 = t5[1], g$d(0 === this.g.mul(d4).x.cmp(this.g.x.redMul(f6))));
|
|
42348
42377
|
}
|
|
42349
|
-
return { beta: f6, lambda: d4, basis: e7.basis ? e7.basis.map(
|
|
42378
|
+
return { beta: f6, lambda: d4, basis: e7.basis ? e7.basis.map(function(e8) {
|
|
42350
42379
|
return { a: new y$e(e8.a, 16), b: new y$e(e8.b, 16) };
|
|
42351
|
-
})
|
|
42380
|
+
}) : this._getEndoBasis(d4) };
|
|
42352
42381
|
}
|
|
42353
42382
|
}, A$8.prototype._getEndoRoots = function(e7) {
|
|
42354
42383
|
var f6 = e7 === this.p ? this.red : y$e.mont(e7), d4 = new y$e(2).toRed(f6).redInvm(), c5 = d4.redNeg(), t5 = new y$e(3).toRed(f6).redNeg().redSqrt().redMul(d4);
|
|
@@ -42872,20 +42901,20 @@ ye2.fromPublic = function(e7, f6) {
|
|
|
42872
42901
|
return f6 instanceof ye2 ? f6 : new ye2(e7, { secret: f6 });
|
|
42873
42902
|
}, ye2.prototype.secret = function() {
|
|
42874
42903
|
return this._secret;
|
|
42875
|
-
}, ve2(ye2, "pubBytes",
|
|
42904
|
+
}, ve2(ye2, "pubBytes", function() {
|
|
42876
42905
|
return this.eddsa.encodePoint(this.pub());
|
|
42877
|
-
})
|
|
42906
|
+
}), ve2(ye2, "pub", function() {
|
|
42878
42907
|
return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv());
|
|
42879
|
-
})
|
|
42908
|
+
}), ve2(ye2, "privBytes", function() {
|
|
42880
42909
|
var e7 = this.eddsa, f6 = this.hash(), d4 = e7.encodingLength - 1, c5 = f6.slice(0, e7.encodingLength);
|
|
42881
42910
|
return c5[0] &= 248, c5[d4] &= 127, c5[d4] |= 64, c5;
|
|
42882
|
-
})
|
|
42911
|
+
}), ve2(ye2, "priv", function() {
|
|
42883
42912
|
return this.eddsa.decodeInt(this.privBytes());
|
|
42884
|
-
})
|
|
42913
|
+
}), ve2(ye2, "hash", function() {
|
|
42885
42914
|
return this.eddsa.hash().update(this.secret()).digest();
|
|
42886
|
-
})
|
|
42915
|
+
}), ve2(ye2, "messagePrefix", function() {
|
|
42887
42916
|
return this.hash().slice(this.eddsa.encodingLength);
|
|
42888
|
-
})
|
|
42917
|
+
}), ye2.prototype.sign = function(e7) {
|
|
42889
42918
|
return pe2(this._secret, "KeyPair can only verify"), this.eddsa.sign(e7, this);
|
|
42890
42919
|
}, ye2.prototype.verify = function(e7, f6) {
|
|
42891
42920
|
return this.eddsa.verify(e7, f6, this);
|
|
@@ -42903,15 +42932,15 @@ var we2 = ge2.parseBytes;
|
|
|
42903
42932
|
function Me(e7, f6) {
|
|
42904
42933
|
this.eddsa = e7, "object" != typeof f6 && (f6 = we2(f6)), Array.isArray(f6) && (f6 = { R: f6.slice(0, e7.encodingLength), S: f6.slice(e7.encodingLength) }), Ae2(f6.R && f6.S, "Signature without R or S"), e7.isPoint(f6.R) && (this._R = f6.R), f6.S instanceof Se2 && (this._S = f6.S), this._Rencoded = Array.isArray(f6.R) ? f6.R : f6.Rencoded, this._Sencoded = Array.isArray(f6.S) ? f6.S : f6.Sencoded;
|
|
42905
42934
|
}
|
|
42906
|
-
Ie(Me, "S",
|
|
42935
|
+
Ie(Me, "S", function() {
|
|
42907
42936
|
return this.eddsa.decodeInt(this.Sencoded());
|
|
42908
|
-
})
|
|
42937
|
+
}), Ie(Me, "R", function() {
|
|
42909
42938
|
return this.eddsa.decodePoint(this.Rencoded());
|
|
42910
|
-
})
|
|
42939
|
+
}), Ie(Me, "Rencoded", function() {
|
|
42911
42940
|
return this.eddsa.encodePoint(this.R());
|
|
42912
|
-
})
|
|
42941
|
+
}), Ie(Me, "Sencoded", function() {
|
|
42913
42942
|
return this.eddsa.encodeInt(this.S());
|
|
42914
|
-
})
|
|
42943
|
+
}), Me.prototype.toBytes = function() {
|
|
42915
42944
|
return this.Rencoded().concat(this.Sencoded());
|
|
42916
42945
|
}, Me.prototype.toHex = function() {
|
|
42917
42946
|
return ge2.encode(this.toBytes(), "hex").toUpperCase();
|
|
@@ -43002,9 +43031,9 @@ c$i.Reporter = l$k, l$k.prototype.isError = function(e7) {
|
|
|
43002
43031
|
return t5.obj = e7, r5;
|
|
43003
43032
|
}, l$k.prototype.error = function(e7) {
|
|
43004
43033
|
var t5, r5 = (this || u$j)._reporterState, n5 = e7 instanceof h$g;
|
|
43005
|
-
if (t5 = n5 ? e7 : new h$g(r5.path.map(
|
|
43034
|
+
if (t5 = n5 ? e7 : new h$g(r5.path.map(function(e8) {
|
|
43006
43035
|
return "[" + JSON.stringify(e8) + "]";
|
|
43007
|
-
})
|
|
43036
|
+
}).join(""), e7.message || e7, e7.stack), !r5.options.partial) throw t5;
|
|
43008
43037
|
return n5 || r5.errors.push(t5), t5;
|
|
43009
43038
|
}, l$k.prototype.wrapResult = function(e7) {
|
|
43010
43039
|
var t5 = (this || u$j)._reporterState;
|
|
@@ -43029,9 +43058,9 @@ function y$f() {
|
|
|
43029
43058
|
(this || g$e).base = e8, (this || g$e).offset = 0, (this || g$e).length = e8.length;
|
|
43030
43059
|
}
|
|
43031
43060
|
function s5(e8, t5) {
|
|
43032
|
-
if (Array.isArray(e8)) (this || g$e).length = 0, (this || g$e).value = e8.map(
|
|
43061
|
+
if (Array.isArray(e8)) (this || g$e).length = 0, (this || g$e).value = e8.map(function(e9) {
|
|
43033
43062
|
return e9 instanceof s5 || (e9 = new s5(e9, t5)), (this || g$e).length += e9.length, e9;
|
|
43034
|
-
}
|
|
43063
|
+
}, this || g$e);
|
|
43035
43064
|
else if ("number" == typeof e8) {
|
|
43036
43065
|
if (!(0 <= e8 && e8 <= 255)) return t5.error("non-byte EncoderBuffer value");
|
|
43037
43066
|
(this || g$e).value = e8, (this || g$e).length = 1;
|
|
@@ -43057,9 +43086,9 @@ function y$f() {
|
|
|
43057
43086
|
}, o5.prototype.raw = function(e8) {
|
|
43058
43087
|
return (this || g$e).base.slice(e8 ? e8.offset : (this || g$e).offset, (this || g$e).length);
|
|
43059
43088
|
}, p$k.EncoderBuffer = s5, s5.prototype.join = function(e8, t5) {
|
|
43060
|
-
return e8 || (e8 = new i5((this || g$e).length)), t5 || (t5 = 0), 0 === (this || g$e).length || (Array.isArray((this || g$e).value) ? (this || g$e).value.forEach(
|
|
43089
|
+
return e8 || (e8 = new i5((this || g$e).length)), t5 || (t5 = 0), 0 === (this || g$e).length || (Array.isArray((this || g$e).value) ? (this || g$e).value.forEach(function(r6) {
|
|
43061
43090
|
r6.join(e8, t5), t5 += r6.length;
|
|
43062
|
-
})
|
|
43091
|
+
}) : ("number" == typeof (this || g$e).value ? e8[t5] = (this || g$e).value : "string" == typeof (this || g$e).value ? e8.write((this || g$e).value, t5) : i5.isBuffer((this || g$e).value) && (this || g$e).value.copy(e8, t5), t5 += (this || g$e).length)), e8;
|
|
43063
43092
|
}, p$k;
|
|
43064
43093
|
}
|
|
43065
43094
|
var _$e = {};
|
|
@@ -43071,7 +43100,7 @@ function E$9() {
|
|
|
43071
43100
|
if (S$a) return m$g;
|
|
43072
43101
|
S$a = true;
|
|
43073
43102
|
var e7 = m$g;
|
|
43074
|
-
return e7.Reporter = c$i.Reporter, e7.DecoderBuffer = y$f().DecoderBuffer, e7.EncoderBuffer = y$f().EncoderBuffer, e7.Node =
|
|
43103
|
+
return e7.Reporter = c$i.Reporter, e7.DecoderBuffer = y$f().DecoderBuffer, e7.EncoderBuffer = y$f().EncoderBuffer, e7.Node = function() {
|
|
43075
43104
|
if (v$f) return _$e;
|
|
43076
43105
|
v$f = true;
|
|
43077
43106
|
var e8 = E$9().Reporter, t5 = E$9().EncoderBuffer, r5 = E$9().DecoderBuffer, n5 = o$7, o5 = ["seq", "seqof", "set", "setof", "objid", "bool", "gentime", "utctime", "null_", "enum", "int", "objDesc", "bitstr", "bmpstr", "charstr", "genstr", "graphstr", "ia5str", "iso646str", "numstr", "octstr", "printstr", "t61str", "unistr", "utf8str", "videostr"], s5 = ["key", "obj", "use", "optional", "explicit", "implicit", "def", "choice", "any", "contains"].concat(o5);
|
|
@@ -43083,52 +43112,52 @@ function E$9() {
|
|
|
43083
43112
|
var u5 = ["enc", "parent", "children", "tag", "args", "reverseArgs", "choice", "optional", "any", "obj", "use", "alteredUse", "key", "default", "explicit", "implicit", "contains"];
|
|
43084
43113
|
return a5.prototype.clone = function() {
|
|
43085
43114
|
var e9 = (this || b$c)._baseState, t6 = {};
|
|
43086
|
-
u5.forEach(
|
|
43115
|
+
u5.forEach(function(r7) {
|
|
43087
43116
|
t6[r7] = e9[r7];
|
|
43088
|
-
})
|
|
43117
|
+
});
|
|
43089
43118
|
var r6 = new (this || b$c).constructor(t6.parent);
|
|
43090
43119
|
return r6._baseState = t6, r6;
|
|
43091
43120
|
}, a5.prototype._wrap = function() {
|
|
43092
43121
|
var e9 = (this || b$c)._baseState;
|
|
43093
|
-
s5.forEach(
|
|
43122
|
+
s5.forEach(function(t6) {
|
|
43094
43123
|
(this || b$c)[t6] = function() {
|
|
43095
43124
|
var r6 = new (this || b$c).constructor(this || b$c);
|
|
43096
43125
|
return e9.children.push(r6), r6[t6].apply(r6, arguments);
|
|
43097
43126
|
};
|
|
43098
|
-
}
|
|
43127
|
+
}, this || b$c);
|
|
43099
43128
|
}, a5.prototype._init = function(e9) {
|
|
43100
43129
|
var t6 = (this || b$c)._baseState;
|
|
43101
|
-
n5(null === t6.parent), e9.call(this || b$c), t6.children = t6.children.filter(
|
|
43130
|
+
n5(null === t6.parent), e9.call(this || b$c), t6.children = t6.children.filter(function(e10) {
|
|
43102
43131
|
return e10._baseState.parent === (this || b$c);
|
|
43103
|
-
}
|
|
43132
|
+
}, this || b$c), n5.equal(t6.children.length, 1, "Root node can have only one child");
|
|
43104
43133
|
}, a5.prototype._useArgs = function(e9) {
|
|
43105
|
-
var t6 = (this || b$c)._baseState, r6 = e9.filter(
|
|
43134
|
+
var t6 = (this || b$c)._baseState, r6 = e9.filter(function(e10) {
|
|
43106
43135
|
return e10 instanceof (this || b$c).constructor;
|
|
43107
|
-
}
|
|
43108
|
-
e9 = e9.filter(
|
|
43136
|
+
}, this || b$c);
|
|
43137
|
+
e9 = e9.filter(function(e10) {
|
|
43109
43138
|
return !(e10 instanceof (this || b$c).constructor);
|
|
43110
|
-
}
|
|
43139
|
+
}, this || b$c), 0 !== r6.length && (n5(null === t6.children), t6.children = r6, r6.forEach(function(e10) {
|
|
43111
43140
|
e10._baseState.parent = this || b$c;
|
|
43112
|
-
}
|
|
43141
|
+
}, this || b$c)), 0 !== e9.length && (n5(null === t6.args), t6.args = e9, t6.reverseArgs = e9.map(function(e10) {
|
|
43113
43142
|
if ("object" != typeof e10 || e10.constructor !== Object) return e10;
|
|
43114
43143
|
var t7 = {};
|
|
43115
|
-
return Object.keys(e10).forEach(
|
|
43144
|
+
return Object.keys(e10).forEach(function(r7) {
|
|
43116
43145
|
r7 == (0 | r7) && (r7 |= 0);
|
|
43117
43146
|
var n6 = e10[r7];
|
|
43118
43147
|
t7[n6] = r7;
|
|
43119
|
-
})
|
|
43120
|
-
}))
|
|
43121
|
-
}, ["_peekTag", "_decodeTag", "_use", "_decodeStr", "_decodeObjid", "_decodeTime", "_decodeNull", "_decodeInt", "_decodeBool", "_decodeList", "_encodeComposite", "_encodeStr", "_encodeObjid", "_encodeTime", "_encodeNull", "_encodeInt", "_encodeBool"].forEach(
|
|
43148
|
+
}), t7;
|
|
43149
|
+
}));
|
|
43150
|
+
}, ["_peekTag", "_decodeTag", "_use", "_decodeStr", "_decodeObjid", "_decodeTime", "_decodeNull", "_decodeInt", "_decodeBool", "_decodeList", "_encodeComposite", "_encodeStr", "_encodeObjid", "_encodeTime", "_encodeNull", "_encodeInt", "_encodeBool"].forEach(function(e9) {
|
|
43122
43151
|
a5.prototype[e9] = function() {
|
|
43123
43152
|
var t6 = (this || b$c)._baseState;
|
|
43124
43153
|
throw new Error(e9 + " not implemented for encoding: " + t6.enc);
|
|
43125
43154
|
};
|
|
43126
|
-
})
|
|
43155
|
+
}), o5.forEach(function(e9) {
|
|
43127
43156
|
a5.prototype[e9] = function() {
|
|
43128
43157
|
var t6 = (this || b$c)._baseState, r6 = Array.prototype.slice.call(arguments);
|
|
43129
43158
|
return n5(null === t6.tag), t6.tag = e9, this._useArgs(r6), this || b$c;
|
|
43130
43159
|
};
|
|
43131
|
-
})
|
|
43160
|
+
}), a5.prototype.use = function(e9) {
|
|
43132
43161
|
n5(e9);
|
|
43133
43162
|
var t6 = (this || b$c)._baseState;
|
|
43134
43163
|
return n5(null === t6.use), t6.use = e9, this || b$c;
|
|
@@ -43153,9 +43182,9 @@ function E$9() {
|
|
|
43153
43182
|
return (this || b$c)._baseState.any = true, this || b$c;
|
|
43154
43183
|
}, a5.prototype.choice = function(e9) {
|
|
43155
43184
|
var t6 = (this || b$c)._baseState;
|
|
43156
|
-
return n5(null === t6.choice), t6.choice = e9, this._useArgs(Object.keys(e9).map(
|
|
43185
|
+
return n5(null === t6.choice), t6.choice = e9, this._useArgs(Object.keys(e9).map(function(t7) {
|
|
43157
43186
|
return e9[t7];
|
|
43158
|
-
}))
|
|
43187
|
+
})), this || b$c;
|
|
43159
43188
|
}, a5.prototype.contains = function(e9) {
|
|
43160
43189
|
var t6 = (this || b$c)._baseState;
|
|
43161
43190
|
return n5(null === t6.use), t6.contains = e9, this || b$c;
|
|
@@ -43191,9 +43220,9 @@ function E$9() {
|
|
|
43191
43220
|
n6.any ? o6 = e9.raw(c5) : e9 = h5;
|
|
43192
43221
|
}
|
|
43193
43222
|
if (t6 && t6.track && null !== n6.tag && t6.track(e9.path(), l5, e9.length, "tagged"), t6 && t6.track && null !== n6.tag && t6.track(e9.path(), e9.offset, e9.length, "content"), o6 = n6.any ? o6 : null === n6.choice ? this._decodeGeneric(n6.tag, e9, t6) : this._decodeChoice(e9, t6), e9.isError(o6)) return o6;
|
|
43194
|
-
if (n6.any || null !== n6.choice || null === n6.children || n6.children.forEach(
|
|
43223
|
+
if (n6.any || null !== n6.choice || null === n6.children || n6.children.forEach(function(r6) {
|
|
43195
43224
|
r6._decode(e9, t6);
|
|
43196
|
-
})
|
|
43225
|
+
}), n6.contains && ("octstr" === n6.tag || "bitstr" === n6.tag)) {
|
|
43197
43226
|
var p5 = new r5(o6);
|
|
43198
43227
|
o6 = this._getUse(n6.contains, e9._reporterState.obj)._decode(p5, t6);
|
|
43199
43228
|
}
|
|
@@ -43207,7 +43236,7 @@ function E$9() {
|
|
|
43207
43236
|
return r6.useDecoder = this._use(e9, t6), n5(null === r6.useDecoder._baseState.parent), r6.useDecoder = r6.useDecoder._baseState.children[0], r6.implicit !== r6.useDecoder._baseState.implicit && (r6.useDecoder = r6.useDecoder.clone(), r6.useDecoder._baseState.implicit = r6.implicit), r6.useDecoder;
|
|
43208
43237
|
}, a5.prototype._decodeChoice = function(e9, t6) {
|
|
43209
43238
|
var r6 = (this || b$c)._baseState, n6 = null, i5 = false;
|
|
43210
|
-
return Object.keys(r6.choice).some(
|
|
43239
|
+
return Object.keys(r6.choice).some(function(o6) {
|
|
43211
43240
|
var s6 = e9.save(), a6 = r6.choice[o6];
|
|
43212
43241
|
try {
|
|
43213
43242
|
var u6 = a6._decode(e9, t6);
|
|
@@ -43217,7 +43246,7 @@ function E$9() {
|
|
|
43217
43246
|
return e9.restore(s6), false;
|
|
43218
43247
|
}
|
|
43219
43248
|
return true;
|
|
43220
|
-
}
|
|
43249
|
+
}, this || b$c), i5 ? n6 : e9.error("Choice not matched");
|
|
43221
43250
|
}, a5.prototype._createEncoderBuffer = function(e9) {
|
|
43222
43251
|
return new t5(e9, (this || b$c).reporter);
|
|
43223
43252
|
}, a5.prototype._encode = function(e9, t6, r6) {
|
|
@@ -43238,24 +43267,24 @@ function E$9() {
|
|
|
43238
43267
|
if (i5.any) o6 = this._createEncoderBuffer(t6);
|
|
43239
43268
|
else if (i5.choice) o6 = this._encodeChoice(t6, r6);
|
|
43240
43269
|
else if (i5.contains) s6 = this._getUse(i5.contains, n6)._encode(t6, r6), a6 = true;
|
|
43241
|
-
else if (i5.children) s6 = i5.children.map(
|
|
43270
|
+
else if (i5.children) s6 = i5.children.map(function(e9) {
|
|
43242
43271
|
if ("null_" === e9._baseState.tag) return e9._encode(null, r6, t6);
|
|
43243
43272
|
if (null === e9._baseState.key) return r6.error("Child should have a key");
|
|
43244
43273
|
var n7 = r6.enterKey(e9._baseState.key);
|
|
43245
43274
|
if ("object" != typeof t6) return r6.error("Child expected, but input is not object");
|
|
43246
43275
|
var i6 = e9._encode(t6[e9._baseState.key], r6, t6);
|
|
43247
43276
|
return r6.leaveKey(n7), i6;
|
|
43248
|
-
}
|
|
43277
|
+
}, this || b$c).filter(function(e9) {
|
|
43249
43278
|
return e9;
|
|
43250
|
-
})
|
|
43279
|
+
}), s6 = this._createEncoderBuffer(s6);
|
|
43251
43280
|
else if ("seqof" === i5.tag || "setof" === i5.tag) {
|
|
43252
43281
|
if (!i5.args || 1 !== i5.args.length) return r6.error("Too many args for : " + i5.tag);
|
|
43253
43282
|
if (!Array.isArray(t6)) return r6.error("seqof/setof, but data is not Array");
|
|
43254
43283
|
var u6 = this.clone();
|
|
43255
|
-
u6._baseState.implicit = null, s6 = this._createEncoderBuffer(t6.map(
|
|
43284
|
+
u6._baseState.implicit = null, s6 = this._createEncoderBuffer(t6.map(function(e9) {
|
|
43256
43285
|
var n7 = (this || b$c)._baseState;
|
|
43257
43286
|
return this._getUse(n7.args[0], t6)._encode(e9, r6);
|
|
43258
|
-
}
|
|
43287
|
+
}, u6));
|
|
43259
43288
|
} else null !== i5.use ? o6 = this._getUse(i5.use, n6)._encode(t6, r6) : (s6 = this._encodePrimitive(i5.tag, t6), a6 = true);
|
|
43260
43289
|
if (!i5.any && null === i5.choice) {
|
|
43261
43290
|
var c5 = null !== i5.implicit ? i5.implicit : i5.tag, f6 = null === i5.implicit ? "universal" : "context";
|
|
@@ -43281,7 +43310,7 @@ function E$9() {
|
|
|
43281
43310
|
}, a5.prototype._isPrintstr = function(e9) {
|
|
43282
43311
|
return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e9);
|
|
43283
43312
|
}, _$e;
|
|
43284
|
-
}
|
|
43313
|
+
}(), m$g;
|
|
43285
43314
|
}
|
|
43286
43315
|
var j$6 = {};
|
|
43287
43316
|
var w$f = false;
|
|
@@ -43293,17 +43322,17 @@ function T$6() {
|
|
|
43293
43322
|
var e7 = B$9;
|
|
43294
43323
|
return e7._reverse = function(e8) {
|
|
43295
43324
|
var t5 = {};
|
|
43296
|
-
return Object.keys(e8).forEach(
|
|
43325
|
+
return Object.keys(e8).forEach(function(r5) {
|
|
43297
43326
|
(0 | r5) == r5 && (r5 |= 0);
|
|
43298
43327
|
var n5 = e8[r5];
|
|
43299
43328
|
t5[n5] = r5;
|
|
43300
|
-
})
|
|
43301
|
-
}, e7.der =
|
|
43329
|
+
}), t5;
|
|
43330
|
+
}, e7.der = function() {
|
|
43302
43331
|
if (w$f) return j$6;
|
|
43303
43332
|
w$f = true;
|
|
43304
43333
|
var e8 = T$6();
|
|
43305
43334
|
return j$6.tagClass = { 0: "universal", 1: "application", 2: "context", 3: "private" }, j$6.tagClassByName = e8._reverse(j$6.tagClass), j$6.tag = { 0: "end", 1: "bool", 2: "int", 3: "bitstr", 4: "octstr", 5: "null_", 6: "objid", 7: "objDesc", 8: "external", 9: "real", 10: "enum", 11: "embed", 12: "utf8str", 13: "relativeOid", 16: "seq", 17: "set", 18: "numstr", 19: "printstr", 20: "t61str", 21: "videostr", 22: "ia5str", 23: "utctime", 24: "gentime", 25: "graphstr", 26: "iso646str", 27: "genstr", 28: "unistr", 29: "charstr", 30: "bmpstr" }, j$6.tagByName = e8._reverse(j$6.tag), j$6;
|
|
43306
|
-
}
|
|
43335
|
+
}(), B$9;
|
|
43307
43336
|
}
|
|
43308
43337
|
var D$5 = {};
|
|
43309
43338
|
var U$7 = false;
|
|
@@ -43444,7 +43473,7 @@ function P$5() {
|
|
|
43444
43473
|
if (q$5) return I$9;
|
|
43445
43474
|
q$5 = true;
|
|
43446
43475
|
var e7 = I$9;
|
|
43447
|
-
return e7.der = C$6(), e7.pem =
|
|
43476
|
+
return e7.der = C$6(), e7.pem = function() {
|
|
43448
43477
|
if (A$9) return O$6;
|
|
43449
43478
|
A$9 = true;
|
|
43450
43479
|
var e8 = t$2, r5 = e$1$1.Buffer, i5 = C$6();
|
|
@@ -43470,7 +43499,7 @@ function P$5() {
|
|
|
43470
43499
|
var h5 = new r5(l5, "base64");
|
|
43471
43500
|
return i5.prototype.decode.call(this || x$7, h5, t5);
|
|
43472
43501
|
}, O$6;
|
|
43473
|
-
}
|
|
43502
|
+
}(), I$9;
|
|
43474
43503
|
}
|
|
43475
43504
|
var F$6 = {};
|
|
43476
43505
|
var K$5 = false;
|
|
@@ -43491,7 +43520,7 @@ function $$2() {
|
|
|
43491
43520
|
return F$6 = a5, a5.prototype.encode = function(e8, t5) {
|
|
43492
43521
|
return (this || R$4).tree._encode(e8, t5).join();
|
|
43493
43522
|
}, e7(u5, o5.Node), u5.prototype._encodeComposite = function(e8, t5, n5, i6) {
|
|
43494
|
-
var o6, a6 =
|
|
43523
|
+
var o6, a6 = function(e9, t6, r6, n6) {
|
|
43495
43524
|
var i7;
|
|
43496
43525
|
"seqof" === e9 ? e9 = "seq" : "setof" === e9 && (e9 = "set");
|
|
43497
43526
|
if (s5.tagByName.hasOwnProperty(e9)) i7 = s5.tagByName[e9];
|
|
@@ -43502,7 +43531,7 @@ function $$2() {
|
|
|
43502
43531
|
if (i7 >= 31) return n6.error("Multi-octet tag encoding unsupported");
|
|
43503
43532
|
t6 || (i7 |= 32);
|
|
43504
43533
|
return i7 |= s5.tagClassByName[r6 || "universal"] << 6;
|
|
43505
|
-
}
|
|
43534
|
+
}(e8, t5, n5, (this || R$4).reporter);
|
|
43506
43535
|
if (i6.length < 128) return (o6 = new r5(2))[0] = a6, o6[1] = i6.length, this._createEncoderBuffer([o6, i6]);
|
|
43507
43536
|
for (var u6 = 1, c6 = i6.length; c6 >= 256; c6 >>= 8) u6++;
|
|
43508
43537
|
(o6 = new r5(2 + u6))[0] = a6, o6[1] = 128 | u6;
|
|
@@ -43591,7 +43620,7 @@ function Z$2() {
|
|
|
43591
43620
|
if (V$4) return J$4;
|
|
43592
43621
|
V$4 = true;
|
|
43593
43622
|
var e7 = J$4;
|
|
43594
|
-
return e7.der = $$2(), e7.pem =
|
|
43623
|
+
return e7.der = $$2(), e7.pem = function() {
|
|
43595
43624
|
if (L$5) return G$4;
|
|
43596
43625
|
L$5 = true;
|
|
43597
43626
|
var e8 = t$2, r5 = $$2();
|
|
@@ -43602,7 +43631,7 @@ function Z$2() {
|
|
|
43602
43631
|
for (var n6 = r5.prototype.encode.call(this || M$7, e9).toString("base64"), i5 = ["-----BEGIN " + t5.label + "-----"], o5 = 0; o5 < n6.length; o5 += 64) i5.push(n6.slice(o5, o5 + 64));
|
|
43603
43632
|
return i5.push("-----END " + t5.label + "-----"), i5.join("\n");
|
|
43604
43633
|
}, G$4;
|
|
43605
|
-
}
|
|
43634
|
+
}(), J$4;
|
|
43606
43635
|
}
|
|
43607
43636
|
var z$7 = {};
|
|
43608
43637
|
var H$6 = false;
|
|
@@ -43610,7 +43639,7 @@ function Y$3() {
|
|
|
43610
43639
|
if (H$6) return z$7;
|
|
43611
43640
|
H$6 = true;
|
|
43612
43641
|
var n5 = z$7;
|
|
43613
|
-
return n5.bignum = n$c, n5.define =
|
|
43642
|
+
return n5.bignum = n$c, n5.define = function() {
|
|
43614
43643
|
if (s$j) return o$n;
|
|
43615
43644
|
s$j = true;
|
|
43616
43645
|
var e7 = Y$3(), n6 = t$2;
|
|
@@ -43640,85 +43669,85 @@ function Y$3() {
|
|
|
43640
43669
|
}, i5.prototype.encode = function(e8, t5, r5) {
|
|
43641
43670
|
return this._getEncoder(t5).encode(e8, r5);
|
|
43642
43671
|
}, o$n;
|
|
43643
|
-
}
|
|
43672
|
+
}().define, n5.base = E$9(), n5.constants = T$6(), n5.decoders = P$5(), n5.encoders = Z$2(), z$7;
|
|
43644
43673
|
}
|
|
43645
43674
|
var Q$3 = Y$3();
|
|
43646
43675
|
var e$f = Q$3;
|
|
43647
|
-
var t$a = e$f.define("Time",
|
|
43676
|
+
var t$a = e$f.define("Time", function() {
|
|
43648
43677
|
this.choice({ utcTime: this.utctime(), generalTime: this.gentime() });
|
|
43649
|
-
})
|
|
43650
|
-
var s$k = e$f.define("AttributeTypeValue",
|
|
43678
|
+
});
|
|
43679
|
+
var s$k = e$f.define("AttributeTypeValue", function() {
|
|
43651
43680
|
this.seq().obj(this.key("type").objid(), this.key("value").any());
|
|
43652
|
-
})
|
|
43653
|
-
var n$n = e$f.define("AlgorithmIdentifier",
|
|
43681
|
+
});
|
|
43682
|
+
var n$n = e$f.define("AlgorithmIdentifier", function() {
|
|
43654
43683
|
this.seq().obj(this.key("algorithm").objid(), this.key("parameters").optional(), this.key("curve").objid().optional());
|
|
43655
|
-
})
|
|
43656
|
-
var o$o = e$f.define("SubjectPublicKeyInfo",
|
|
43684
|
+
});
|
|
43685
|
+
var o$o = e$f.define("SubjectPublicKeyInfo", function() {
|
|
43657
43686
|
this.seq().obj(this.key("algorithm").use(n$n), this.key("subjectPublicKey").bitstr());
|
|
43658
|
-
})
|
|
43659
|
-
var h$h = e$f.define("RelativeDistinguishedName",
|
|
43687
|
+
});
|
|
43688
|
+
var h$h = e$f.define("RelativeDistinguishedName", function() {
|
|
43660
43689
|
this.setof(s$k);
|
|
43661
|
-
})
|
|
43662
|
-
var y$g = e$f.define("RDNSequence",
|
|
43690
|
+
});
|
|
43691
|
+
var y$g = e$f.define("RDNSequence", function() {
|
|
43663
43692
|
this.seqof(h$h);
|
|
43664
|
-
})
|
|
43665
|
-
var r$g = e$f.define("Name",
|
|
43693
|
+
});
|
|
43694
|
+
var r$g = e$f.define("Name", function() {
|
|
43666
43695
|
this.choice({ rdnSequence: this.use(y$g) });
|
|
43667
|
-
})
|
|
43668
|
-
var u$k = e$f.define("Validity",
|
|
43696
|
+
});
|
|
43697
|
+
var u$k = e$f.define("Validity", function() {
|
|
43669
43698
|
this.seq().obj(this.key("notBefore").use(t$a), this.key("notAfter").use(t$a));
|
|
43670
|
-
})
|
|
43671
|
-
var a$n = e$f.define("Extension",
|
|
43699
|
+
});
|
|
43700
|
+
var a$n = e$f.define("Extension", function() {
|
|
43672
43701
|
this.seq().obj(this.key("extnID").objid(), this.key("critical").bool().def(false), this.key("extnValue").octstr());
|
|
43673
|
-
})
|
|
43674
|
-
var c$j = e$f.define("TBSCertificate",
|
|
43702
|
+
});
|
|
43703
|
+
var c$j = e$f.define("TBSCertificate", function() {
|
|
43675
43704
|
this.seq().obj(this.key("version").explicit(0).int().optional(), this.key("serialNumber").int(), this.key("signature").use(n$n), this.key("issuer").use(r$g), this.key("validity").use(u$k), this.key("subject").use(r$g), this.key("subjectPublicKeyInfo").use(o$o), this.key("issuerUniqueID").implicit(1).bitstr().optional(), this.key("subjectUniqueID").implicit(2).bitstr().optional(), this.key("extensions").explicit(3).seqof(a$n).optional());
|
|
43676
|
-
})
|
|
43677
|
-
var k$d = e$f.define("X509Certificate",
|
|
43705
|
+
});
|
|
43706
|
+
var k$d = e$f.define("X509Certificate", function() {
|
|
43678
43707
|
this.seq().obj(this.key("tbsCertificate").use(c$j), this.key("signatureAlgorithm").use(n$n), this.key("signatureValue").bitstr());
|
|
43679
|
-
})
|
|
43708
|
+
});
|
|
43680
43709
|
var f$o = {};
|
|
43681
43710
|
var b$d = Q$3;
|
|
43682
43711
|
f$o.certificate = k$d;
|
|
43683
|
-
var l$l = b$d.define("RSAPrivateKey",
|
|
43712
|
+
var l$l = b$d.define("RSAPrivateKey", function() {
|
|
43684
43713
|
this.seq().obj(this.key("version").int(), this.key("modulus").int(), this.key("publicExponent").int(), this.key("privateExponent").int(), this.key("prime1").int(), this.key("prime2").int(), this.key("exponent1").int(), this.key("exponent2").int(), this.key("coefficient").int());
|
|
43685
|
-
})
|
|
43714
|
+
});
|
|
43686
43715
|
f$o.RSAPrivateKey = l$l;
|
|
43687
|
-
var d$j = b$d.define("RSAPublicKey",
|
|
43716
|
+
var d$j = b$d.define("RSAPublicKey", function() {
|
|
43688
43717
|
this.seq().obj(this.key("modulus").int(), this.key("publicExponent").int());
|
|
43689
|
-
})
|
|
43718
|
+
});
|
|
43690
43719
|
f$o.RSAPublicKey = d$j;
|
|
43691
|
-
var p$l = b$d.define("SubjectPublicKeyInfo",
|
|
43720
|
+
var p$l = b$d.define("SubjectPublicKeyInfo", function() {
|
|
43692
43721
|
this.seq().obj(this.key("algorithm").use(j$7), this.key("subjectPublicKey").bitstr());
|
|
43693
|
-
})
|
|
43722
|
+
});
|
|
43694
43723
|
f$o.PublicKey = p$l;
|
|
43695
|
-
var j$7 = b$d.define("AlgorithmIdentifier",
|
|
43724
|
+
var j$7 = b$d.define("AlgorithmIdentifier", function() {
|
|
43696
43725
|
this.seq().obj(this.key("algorithm").objid(), this.key("none").null_().optional(), this.key("curve").objid().optional(), this.key("params").seq().obj(this.key("p").int(), this.key("q").int(), this.key("g").int()).optional());
|
|
43697
|
-
})
|
|
43698
|
-
var v$g = b$d.define("PrivateKeyInfo",
|
|
43726
|
+
});
|
|
43727
|
+
var v$g = b$d.define("PrivateKeyInfo", function() {
|
|
43699
43728
|
this.seq().obj(this.key("version").int(), this.key("algorithm").use(j$7), this.key("subjectPrivateKey").octstr());
|
|
43700
|
-
})
|
|
43729
|
+
});
|
|
43701
43730
|
f$o.PrivateKey = v$g;
|
|
43702
|
-
var m$h = b$d.define("EncryptedPrivateKeyInfo",
|
|
43731
|
+
var m$h = b$d.define("EncryptedPrivateKeyInfo", function() {
|
|
43703
43732
|
this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(), this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(), this.key("kdeparams").seq().obj(this.key("salt").octstr(), this.key("iters").int())), this.key("cipher").seq().obj(this.key("algo").objid(), this.key("iv").octstr()))), this.key("subjectPrivateKey").octstr());
|
|
43704
|
-
})
|
|
43733
|
+
});
|
|
43705
43734
|
f$o.EncryptedPrivateKey = m$h;
|
|
43706
|
-
var q$6 = b$d.define("DSAPrivateKey",
|
|
43735
|
+
var q$6 = b$d.define("DSAPrivateKey", function() {
|
|
43707
43736
|
this.seq().obj(this.key("version").int(), this.key("p").int(), this.key("q").int(), this.key("g").int(), this.key("pub_key").int(), this.key("priv_key").int());
|
|
43708
|
-
})
|
|
43709
|
-
f$o.DSAPrivateKey = q$6, f$o.DSAparam = b$d.define("DSAparam",
|
|
43737
|
+
});
|
|
43738
|
+
f$o.DSAPrivateKey = q$6, f$o.DSAparam = b$d.define("DSAparam", function() {
|
|
43710
43739
|
this.int();
|
|
43711
|
-
})
|
|
43712
|
-
var K$6 = b$d.define("ECPrivateKey",
|
|
43740
|
+
});
|
|
43741
|
+
var K$6 = b$d.define("ECPrivateKey", function() {
|
|
43713
43742
|
this.seq().obj(this.key("version").int(), this.key("privateKey").octstr(), this.key("parameters").optional().explicit(0).use(P$6), this.key("publicKey").optional().explicit(1).bitstr());
|
|
43714
|
-
})
|
|
43743
|
+
});
|
|
43715
43744
|
f$o.ECPrivateKey = K$6;
|
|
43716
|
-
var P$6 = b$d.define("ECParameters",
|
|
43745
|
+
var P$6 = b$d.define("ECParameters", function() {
|
|
43717
43746
|
this.choice({ namedCurve: this.objid() });
|
|
43718
|
-
})
|
|
43719
|
-
f$o.signature = b$d.define("signature",
|
|
43747
|
+
});
|
|
43748
|
+
f$o.signature = b$d.define("signature", function() {
|
|
43720
43749
|
this.seq().obj(this.key("r").int(), this.key("s").int());
|
|
43721
|
-
})
|
|
43750
|
+
});
|
|
43722
43751
|
var s$l;
|
|
43723
43752
|
var i$a = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m;
|
|
43724
43753
|
var o$p = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;
|
|
@@ -43761,10 +43790,10 @@ function l$m(e7) {
|
|
|
43761
43790
|
throw new Error("unknown key id " + a5);
|
|
43762
43791
|
}
|
|
43763
43792
|
case "ENCRYPTED PRIVATE KEY":
|
|
43764
|
-
i5 =
|
|
43793
|
+
i5 = function(e8, r6) {
|
|
43765
43794
|
var a6 = e8.algorithm.decrypt.kde.kdeparams.salt, t6 = parseInt(e8.algorithm.decrypt.kde.kdeparams.iters.toString(), 10), c6 = m$i[e8.algorithm.decrypt.cipher.algo.join(".")], s6 = e8.algorithm.decrypt.cipher.iv, i6 = e8.subjectPrivateKey, o5 = parseInt(c6.split("-")[1], 10) / 8, d4 = E$a.pbkdf2Sync(r6, a6, t6, o5, "sha1"), n5 = b$e.createDecipheriv(c6, d4, s6), p5 = [];
|
|
43766
43795
|
return p5.push(n5.update(i6)), p5.push(n5.final()), h$i.concat(p5);
|
|
43767
|
-
}
|
|
43796
|
+
}(i5 = y$h.EncryptedPrivateKey.decode(i5, "der"), r5);
|
|
43768
43797
|
case "PRIVATE KEY":
|
|
43769
43798
|
switch (a5 = (t5 = y$h.PrivateKey.decode(i5, "der")).algorithm.algorithm.join(".")) {
|
|
43770
43799
|
case "1.2.840.113549.1.1.1":
|
|
@@ -43804,7 +43833,7 @@ function y$i(e7, t5, r5, n5) {
|
|
|
43804
43833
|
var a5 = new f$q(t5.byteLength() - e7.length);
|
|
43805
43834
|
a5.fill(0), e7 = f$q.concat([a5, e7]);
|
|
43806
43835
|
}
|
|
43807
|
-
var o5 = r5.length, i5 =
|
|
43836
|
+
var o5 = r5.length, i5 = function(e8, t6) {
|
|
43808
43837
|
e8 = (e8 = b$f(e8, t6)).mod(t6);
|
|
43809
43838
|
var r6 = new f$q(e8.toArray());
|
|
43810
43839
|
if (r6.length < t6.byteLength()) {
|
|
@@ -43812,7 +43841,7 @@ function y$i(e7, t5, r5, n5) {
|
|
|
43812
43841
|
n6.fill(0), r6 = f$q.concat([n6, r6]);
|
|
43813
43842
|
}
|
|
43814
43843
|
return r6;
|
|
43815
|
-
}
|
|
43844
|
+
}(r5, t5), s5 = new f$q(o5);
|
|
43816
43845
|
s5.fill(1);
|
|
43817
43846
|
var h5 = new f$q(o5);
|
|
43818
43847
|
return h5.fill(0), h5 = c$k(n5, h5).update(s5).update(new f$q([0])).update(e7).update(i5).digest(), s5 = c$k(n5, h5).update(s5).digest(), { k: h5 = c$k(n5, h5).update(s5).update(new f$q([1])).update(e7).update(i5).digest(), v: s5 = c$k(n5, h5).update(s5).digest() };
|
|
@@ -43836,25 +43865,25 @@ function k$e(e7, t5, r5, n5) {
|
|
|
43836
43865
|
var o5 = m$j(t5);
|
|
43837
43866
|
if (o5.curve) {
|
|
43838
43867
|
if ("ecdsa" !== n5 && "ecdsa/rsa" !== n5) throw new Error("wrong private key type");
|
|
43839
|
-
return
|
|
43868
|
+
return function(e8, t6) {
|
|
43840
43869
|
var r6 = v$i[t6.curve.join(".")];
|
|
43841
43870
|
if (!r6) throw new Error("unknown curve " + t6.curve.join("."));
|
|
43842
43871
|
var n6 = new w$g(r6).keyFromPrivate(t6.privateKey).sign(e8);
|
|
43843
43872
|
return new f$q(n6.toDER());
|
|
43844
|
-
}
|
|
43873
|
+
}(e7, o5);
|
|
43845
43874
|
}
|
|
43846
43875
|
if ("dsa" === o5.type) {
|
|
43847
43876
|
if ("dsa" !== n5) throw new Error("wrong private key type");
|
|
43848
|
-
return
|
|
43877
|
+
return function(e8, t6, r6) {
|
|
43849
43878
|
var n6, a6 = t6.params.priv_key, o6 = t6.params.p, i6 = t6.params.q, s6 = t6.params.g, h6 = new l$n(0), u5 = b$f(e8, i6).mod(i6), p5 = false, d4 = y$i(a6, i6, e8, r6);
|
|
43850
43879
|
for (; false === p5; ) n6 = _$f(i6, d4, r6), h6 = k$e(s6, n6, o6, i6), 0 === (p5 = n6.invm(i6).imul(u5.add(a6.mul(h6))).mod(i6)).cmpn(0) && (p5 = false, h6 = new l$n(0));
|
|
43851
|
-
return
|
|
43880
|
+
return function(e9, t7) {
|
|
43852
43881
|
e9 = e9.toArray(), t7 = t7.toArray(), 128 & e9[0] && (e9 = [0].concat(e9));
|
|
43853
43882
|
128 & t7[0] && (t7 = [0].concat(t7));
|
|
43854
43883
|
var r7 = [48, e9.length + t7.length + 4, 2, e9.length];
|
|
43855
43884
|
return r7 = r7.concat(e9, [2, t7.length], t7), new f$q(r7);
|
|
43856
|
-
}
|
|
43857
|
-
}
|
|
43885
|
+
}(h6, p5);
|
|
43886
|
+
}(e7, o5, r5);
|
|
43858
43887
|
}
|
|
43859
43888
|
if ("rsa" !== n5 && "ecdsa/rsa" !== n5) throw new Error("wrong private key type");
|
|
43860
43889
|
e7 = f$q.concat([a5, e7]);
|
|
@@ -43877,21 +43906,21 @@ var K$7 = function(e7, t5, r5, n5, a5) {
|
|
|
43877
43906
|
var o5 = T$7(r5);
|
|
43878
43907
|
if ("ec" === o5.type) {
|
|
43879
43908
|
if ("ecdsa" !== n5 && "ecdsa/rsa" !== n5) throw new Error("wrong public key type");
|
|
43880
|
-
return
|
|
43909
|
+
return function(e8, t6, r6) {
|
|
43881
43910
|
var n6 = P$7[r6.data.algorithm.curve.join(".")];
|
|
43882
43911
|
if (!n6) throw new Error("unknown curve " + r6.data.algorithm.curve.join("."));
|
|
43883
43912
|
var a6 = new j$8(n6), o6 = r6.data.subjectPrivateKey.data;
|
|
43884
43913
|
return a6.verify(t6, e8, o6);
|
|
43885
|
-
}
|
|
43914
|
+
}(e7, t5, o5);
|
|
43886
43915
|
}
|
|
43887
43916
|
if ("dsa" === o5.type) {
|
|
43888
43917
|
if ("dsa" !== n5) throw new Error("wrong public key type");
|
|
43889
|
-
return
|
|
43918
|
+
return function(e8, t6, r6) {
|
|
43890
43919
|
var n6 = r6.data.p, a6 = r6.data.q, o6 = r6.data.g, i6 = r6.data.pub_key, s6 = T$7.signature.decode(e8, "der"), h6 = s6.s, u6 = s6.r;
|
|
43891
43920
|
A$a(h6, a6), A$a(u6, a6);
|
|
43892
43921
|
var p6 = R$5.mont(n6), d5 = h6.invm(a6);
|
|
43893
43922
|
return 0 === o6.toRed(p6).redPow(new R$5(t6).mul(d5).mod(a6)).fromRed().mul(i6.toRed(p6).redPow(u6.mul(d5).mod(a6)).fromRed()).mod(n6).mod(a6).cmp(u6);
|
|
43894
|
-
}
|
|
43923
|
+
}(e7, t5, o5);
|
|
43895
43924
|
}
|
|
43896
43925
|
if ("rsa" !== n5 && "ecdsa/rsa" !== n5) throw new Error("wrong public key type");
|
|
43897
43926
|
t5 = L$6.concat([a5, t5]);
|
|
@@ -43931,9 +43960,9 @@ function M$8(e7) {
|
|
|
43931
43960
|
function O$7(e7) {
|
|
43932
43961
|
return new F$7(e7);
|
|
43933
43962
|
}
|
|
43934
|
-
Object.keys(C$7).forEach(
|
|
43963
|
+
Object.keys(C$7).forEach(function(e7) {
|
|
43935
43964
|
C$7[e7].id = new x$8(C$7[e7].id, "hex"), C$7[e7.toLowerCase()] = C$7[e7];
|
|
43936
|
-
})
|
|
43965
|
+
}), q$7(D$6, S$b.Writable), D$6.prototype._write = function(e7, t5, r5) {
|
|
43937
43966
|
(this || W$4)._hash.update(e7), r5();
|
|
43938
43967
|
}, D$6.prototype.update = function(e7, t5) {
|
|
43939
43968
|
return "string" == typeof e7 && (e7 = new x$8(e7, t5)), (this || W$4)._hash.update(e7), this || W$4;
|
|
@@ -44021,22 +44050,22 @@ var x$9 = function(r5, n5, e7) {
|
|
|
44021
44050
|
var t5;
|
|
44022
44051
|
t5 = r5.padding ? r5.padding : e7 ? 1 : 4;
|
|
44023
44052
|
var o5, a5 = s$n(r5);
|
|
44024
|
-
if (4 === t5) o5 =
|
|
44053
|
+
if (4 === t5) o5 = function(r6, n6) {
|
|
44025
44054
|
var e8 = r6.modulus.byteLength(), t6 = n6.length, o6 = m$k("sha1").update(B$b.alloc(0)).digest(), a6 = o6.length, i5 = 2 * a6;
|
|
44026
44055
|
if (t6 > e8 - i5 - 2) throw new Error("message too long");
|
|
44027
44056
|
var l5 = B$b.alloc(e8 - t6 - i5 - 2), f6 = e8 - a6 - 1, u5 = g$g(a6), c5 = v$j(B$b.concat([o6, l5, B$b.alloc(1, 1), n6], f6), w$h(u5, f6)), p5 = v$j(u5, w$h(c5, a6));
|
|
44028
44057
|
return new y$k(B$b.concat([B$b.alloc(1), p5, c5], e8));
|
|
44029
|
-
}
|
|
44030
|
-
else if (1 === t5) o5 =
|
|
44058
|
+
}(a5, n5);
|
|
44059
|
+
else if (1 === t5) o5 = function(r6, n6, e8) {
|
|
44031
44060
|
var t6, o6 = n6.length, a6 = r6.modulus.byteLength();
|
|
44032
44061
|
if (o6 > a6 - 11) throw new Error("message too long");
|
|
44033
|
-
t6 = e8 ? B$b.alloc(a6 - o6 - 3, 255) :
|
|
44062
|
+
t6 = e8 ? B$b.alloc(a6 - o6 - 3, 255) : function(r7) {
|
|
44034
44063
|
var n7, e9 = B$b.allocUnsafe(r7), t7 = 0, o7 = g$g(2 * r7), a7 = 0;
|
|
44035
44064
|
for (; t7 < r7; ) a7 === o7.length && (o7 = g$g(2 * r7), a7 = 0), (n7 = o7[a7++]) && (e9[t7++] = n7);
|
|
44036
44065
|
return e9;
|
|
44037
|
-
}
|
|
44066
|
+
}(a6 - o6 - 3);
|
|
44038
44067
|
return new y$k(B$b.concat([B$b.from([0, e8 ? 1 : 2]), t6, B$b.alloc(1), n6], a6));
|
|
44039
|
-
}
|
|
44068
|
+
}(a5, n5, e7);
|
|
44040
44069
|
else {
|
|
44041
44070
|
if (3 !== t5) throw new Error("unknown padding");
|
|
44042
44071
|
if ((o5 = new y$k(n5)).cmp(a5.modulus) >= 0) throw new Error("data too long for modulus");
|
|
@@ -44058,24 +44087,24 @@ var I$a = function(r5, n5, e7) {
|
|
|
44058
44087
|
if (n5.length > i5 || new U$9(n5).cmp(a5.modulus) >= 0) throw new Error("decryption error");
|
|
44059
44088
|
o5 = e7 ? j$9(new U$9(n5), a5) : R$6(n5, a5);
|
|
44060
44089
|
var l5 = A$b.alloc(i5 - o5.length);
|
|
44061
|
-
if (o5 = A$b.concat([l5, o5], i5), 4 === t5) return
|
|
44090
|
+
if (o5 = A$b.concat([l5, o5], i5), 4 === t5) return function(r6, n6) {
|
|
44062
44091
|
var e8 = r6.modulus.byteLength(), t6 = S$c("sha1").update(A$b.alloc(0)).digest(), o6 = t6.length;
|
|
44063
44092
|
if (0 !== n6[0]) throw new Error("decryption error");
|
|
44064
44093
|
var a6 = n6.slice(1, o6 + 1), i6 = n6.slice(o6 + 1), l6 = D$7(a6, k$f(i6, o6)), f6 = D$7(i6, k$f(l6, e8 - o6 - 1));
|
|
44065
|
-
if (
|
|
44094
|
+
if (function(r7, n7) {
|
|
44066
44095
|
r7 = A$b.from(r7), n7 = A$b.from(n7);
|
|
44067
44096
|
var e9 = 0, t7 = r7.length;
|
|
44068
44097
|
r7.length !== n7.length && (e9++, t7 = Math.min(r7.length, n7.length));
|
|
44069
44098
|
var o7 = -1;
|
|
44070
44099
|
for (; ++o7 < t7; ) e9 += r7[o7] ^ n7[o7];
|
|
44071
44100
|
return e9;
|
|
44072
|
-
}
|
|
44101
|
+
}(t6, f6.slice(0, o6))) throw new Error("decryption error");
|
|
44073
44102
|
var u5 = o6;
|
|
44074
44103
|
for (; 0 === f6[u5]; ) u5++;
|
|
44075
44104
|
if (1 !== f6[u5++]) throw new Error("decryption error");
|
|
44076
44105
|
return f6.slice(u5);
|
|
44077
|
-
}
|
|
44078
|
-
if (1 === t5) return
|
|
44106
|
+
}(a5, o5);
|
|
44107
|
+
if (1 === t5) return function(r6, n6, e8) {
|
|
44079
44108
|
var t6 = n6.slice(0, 2), o6 = 2, a6 = 0;
|
|
44080
44109
|
for (; 0 !== n6[o6++]; ) if (o6 >= n6.length) {
|
|
44081
44110
|
a6++;
|
|
@@ -44086,7 +44115,7 @@ var I$a = function(r5, n5, e7) {
|
|
|
44086
44115
|
i6.length < 8 && a6++;
|
|
44087
44116
|
if (a6) throw new Error("decryption error");
|
|
44088
44117
|
return n6.slice(o6);
|
|
44089
|
-
}
|
|
44118
|
+
}(0, o5, e7);
|
|
44090
44119
|
if (3 === t5) return o5;
|
|
44091
44120
|
throw new Error("unknown padding");
|
|
44092
44121
|
};
|
|
@@ -44121,14 +44150,14 @@ function b$h(r5, e7, n5) {
|
|
|
44121
44150
|
function w$i(r5, e7, n5, o5) {
|
|
44122
44151
|
if (f$t.browser) {
|
|
44123
44152
|
var t5 = r5.buffer, i5 = new Uint8Array(t5, e7, n5);
|
|
44124
|
-
return m$l.getRandomValues(i5), o5 ? (f$t.nextTick(
|
|
44153
|
+
return m$l.getRandomValues(i5), o5 ? (f$t.nextTick(function() {
|
|
44125
44154
|
o5(null, r5);
|
|
44126
|
-
})
|
|
44155
|
+
}), void 0) : r5;
|
|
44127
44156
|
}
|
|
44128
|
-
return o5 ? (a$o(n5,
|
|
44157
|
+
return o5 ? (a$o(n5, function(n6, t6) {
|
|
44129
44158
|
if (n6) return o5(n6);
|
|
44130
44159
|
t6.copy(r5, e7), o5(null, r5);
|
|
44131
|
-
})
|
|
44160
|
+
}), void 0) : (a$o(n5).copy(r5, e7), r5);
|
|
44132
44161
|
}
|
|
44133
44162
|
m$l && m$l.getRandomValues || !f$t.browser ? (t$b.randomFill = function(r5, e7, n5, t5) {
|
|
44134
44163
|
if (!(s$o.isBuffer(r5) || r5 instanceof o$r.Uint8Array)) throw new TypeError('"buf" argument must be a Buffer or Uint8Array');
|
|
@@ -44544,7 +44573,7 @@ function dew$Z$1() {
|
|
|
44544
44573
|
}
|
|
44545
44574
|
return out;
|
|
44546
44575
|
};
|
|
44547
|
-
DH.prototype.getPublicKey = function
|
|
44576
|
+
DH.prototype.getPublicKey = function getPublicKey(enc) {
|
|
44548
44577
|
return formatReturnValue((this || _global$8$1)._pub, enc);
|
|
44549
44578
|
};
|
|
44550
44579
|
DH.prototype.getPrivateKey = function getPrivateKey(enc) {
|
|
@@ -50052,7 +50081,7 @@ var _dewExec$U$1 = false;
|
|
|
50052
50081
|
function dew$U$1() {
|
|
50053
50082
|
if (_dewExec$U$1) return exports$U$1;
|
|
50054
50083
|
_dewExec$U$1 = true;
|
|
50055
|
-
var
|
|
50084
|
+
var utils = exports$U$1;
|
|
50056
50085
|
function toArray(msg, enc) {
|
|
50057
50086
|
if (Array.isArray(msg)) return msg.slice();
|
|
50058
50087
|
if (!msg) return [];
|
|
@@ -50076,19 +50105,19 @@ function dew$U$1() {
|
|
|
50076
50105
|
}
|
|
50077
50106
|
return res;
|
|
50078
50107
|
}
|
|
50079
|
-
|
|
50108
|
+
utils.toArray = toArray;
|
|
50080
50109
|
function zero2(word) {
|
|
50081
50110
|
if (word.length === 1) return "0" + word;
|
|
50082
50111
|
else return word;
|
|
50083
50112
|
}
|
|
50084
|
-
|
|
50113
|
+
utils.zero2 = zero2;
|
|
50085
50114
|
function toHex(msg) {
|
|
50086
50115
|
var res = "";
|
|
50087
50116
|
for (var i5 = 0; i5 < msg.length; i5++) res += zero2(msg[i5].toString(16));
|
|
50088
50117
|
return res;
|
|
50089
50118
|
}
|
|
50090
|
-
|
|
50091
|
-
|
|
50119
|
+
utils.toHex = toHex;
|
|
50120
|
+
utils.encode = function encode(arr, enc) {
|
|
50092
50121
|
if (enc === "hex") return toHex(arr);
|
|
50093
50122
|
else return arr;
|
|
50094
50123
|
};
|
|
@@ -50099,15 +50128,15 @@ var _dewExec$T$1 = false;
|
|
|
50099
50128
|
function dew$T$1() {
|
|
50100
50129
|
if (_dewExec$T$1) return exports$T$1;
|
|
50101
50130
|
_dewExec$T$1 = true;
|
|
50102
|
-
var
|
|
50131
|
+
var utils = exports$T$1;
|
|
50103
50132
|
var BN = dew$V$1();
|
|
50104
50133
|
var minAssert = dew$1t();
|
|
50105
50134
|
var minUtils = dew$U$1();
|
|
50106
|
-
|
|
50107
|
-
|
|
50108
|
-
|
|
50109
|
-
|
|
50110
|
-
|
|
50135
|
+
utils.assert = minAssert;
|
|
50136
|
+
utils.toArray = minUtils.toArray;
|
|
50137
|
+
utils.zero2 = minUtils.zero2;
|
|
50138
|
+
utils.toHex = minUtils.toHex;
|
|
50139
|
+
utils.encode = minUtils.encode;
|
|
50111
50140
|
function getNAF(num, w4, bits) {
|
|
50112
50141
|
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
|
|
50113
50142
|
naf.fill(0);
|
|
@@ -50128,7 +50157,7 @@ function dew$T$1() {
|
|
|
50128
50157
|
}
|
|
50129
50158
|
return naf;
|
|
50130
50159
|
}
|
|
50131
|
-
|
|
50160
|
+
utils.getNAF = getNAF;
|
|
50132
50161
|
function getJSF(k1, k22) {
|
|
50133
50162
|
var jsf = [[], []];
|
|
50134
50163
|
k1 = k1.clone();
|
|
@@ -50166,22 +50195,22 @@ function dew$T$1() {
|
|
|
50166
50195
|
}
|
|
50167
50196
|
return jsf;
|
|
50168
50197
|
}
|
|
50169
|
-
|
|
50198
|
+
utils.getJSF = getJSF;
|
|
50170
50199
|
function cachedProperty(obj, name2, computer) {
|
|
50171
50200
|
var key = "_" + name2;
|
|
50172
50201
|
obj.prototype[name2] = function cachedProperty2() {
|
|
50173
50202
|
return this[key] !== void 0 ? this[key] : this[key] = computer.call(this);
|
|
50174
50203
|
};
|
|
50175
50204
|
}
|
|
50176
|
-
|
|
50205
|
+
utils.cachedProperty = cachedProperty;
|
|
50177
50206
|
function parseBytes(bytes) {
|
|
50178
|
-
return typeof bytes === "string" ?
|
|
50207
|
+
return typeof bytes === "string" ? utils.toArray(bytes, "hex") : bytes;
|
|
50179
50208
|
}
|
|
50180
|
-
|
|
50209
|
+
utils.parseBytes = parseBytes;
|
|
50181
50210
|
function intFromLE(bytes) {
|
|
50182
50211
|
return new BN(bytes, "hex", "le");
|
|
50183
50212
|
}
|
|
50184
|
-
|
|
50213
|
+
utils.intFromLE = intFromLE;
|
|
50185
50214
|
return exports$T$1;
|
|
50186
50215
|
}
|
|
50187
50216
|
var exports$S$1 = {};
|
|
@@ -50190,10 +50219,10 @@ function dew$S$1() {
|
|
|
50190
50219
|
if (_dewExec$S$1) return exports$S$1;
|
|
50191
50220
|
_dewExec$S$1 = true;
|
|
50192
50221
|
var BN = dew$V$1();
|
|
50193
|
-
var
|
|
50194
|
-
var getNAF =
|
|
50195
|
-
var getJSF =
|
|
50196
|
-
var assert2 =
|
|
50222
|
+
var utils = dew$T$1();
|
|
50223
|
+
var getNAF = utils.getNAF;
|
|
50224
|
+
var getJSF = utils.getJSF;
|
|
50225
|
+
var assert2 = utils.assert;
|
|
50197
50226
|
function BaseCurve(type, conf) {
|
|
50198
50227
|
this.type = type;
|
|
50199
50228
|
this.p = new BN(conf.p, 16);
|
|
@@ -50392,7 +50421,7 @@ function dew$S$1() {
|
|
|
50392
50421
|
return this.curve.validate(this);
|
|
50393
50422
|
};
|
|
50394
50423
|
BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
|
|
50395
|
-
bytes =
|
|
50424
|
+
bytes = utils.toArray(bytes, enc);
|
|
50396
50425
|
var len = this.p.byteLength();
|
|
50397
50426
|
if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {
|
|
50398
50427
|
if (bytes[0] === 6) assert2(bytes[bytes.length - 1] % 2 === 0);
|
|
@@ -50414,7 +50443,7 @@ function dew$S$1() {
|
|
|
50414
50443
|
return [4].concat(x4, this.getY().toArray("be", len));
|
|
50415
50444
|
};
|
|
50416
50445
|
BasePoint.prototype.encode = function encode(enc, compact) {
|
|
50417
|
-
return
|
|
50446
|
+
return utils.encode(this._encode(compact), enc);
|
|
50418
50447
|
};
|
|
50419
50448
|
BasePoint.prototype.precompute = function precompute(power) {
|
|
50420
50449
|
if (this.precomputed) return this;
|
|
@@ -50474,11 +50503,11 @@ var _dewExec$R$1 = false;
|
|
|
50474
50503
|
function dew$R$1() {
|
|
50475
50504
|
if (_dewExec$R$1) return exports$R$1;
|
|
50476
50505
|
_dewExec$R$1 = true;
|
|
50477
|
-
var
|
|
50506
|
+
var utils = dew$T$1();
|
|
50478
50507
|
var BN = dew$V$1();
|
|
50479
50508
|
var inherits = dew$f$2();
|
|
50480
50509
|
var Base = dew$S$1();
|
|
50481
|
-
var assert2 =
|
|
50510
|
+
var assert2 = utils.assert;
|
|
50482
50511
|
function ShortCurve(conf) {
|
|
50483
50512
|
Base.call(this, "short", conf);
|
|
50484
50513
|
this.a = new BN(conf.a, 16).toRed(this.red);
|
|
@@ -51121,7 +51150,7 @@ function dew$Q$1() {
|
|
|
51121
51150
|
var BN = dew$V$1();
|
|
51122
51151
|
var inherits = dew$f$2();
|
|
51123
51152
|
var Base = dew$S$1();
|
|
51124
|
-
var
|
|
51153
|
+
var utils = dew$T$1();
|
|
51125
51154
|
function MontCurve(conf) {
|
|
51126
51155
|
Base.call(this, "mont", conf);
|
|
51127
51156
|
this.a = new BN(conf.a, 16).toRed(this.red);
|
|
@@ -51153,7 +51182,7 @@ function dew$Q$1() {
|
|
|
51153
51182
|
}
|
|
51154
51183
|
inherits(Point, Base.BasePoint);
|
|
51155
51184
|
MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
|
|
51156
|
-
return this.point(
|
|
51185
|
+
return this.point(utils.toArray(bytes, enc), 1);
|
|
51157
51186
|
};
|
|
51158
51187
|
MontCurve.prototype.point = function point(x4, z4) {
|
|
51159
51188
|
return new Point(this, x4, z4);
|
|
@@ -51242,11 +51271,11 @@ var _dewExec$P$1 = false;
|
|
|
51242
51271
|
function dew$P$1() {
|
|
51243
51272
|
if (_dewExec$P$1) return exports$P$1;
|
|
51244
51273
|
_dewExec$P$1 = true;
|
|
51245
|
-
var
|
|
51274
|
+
var utils = dew$T$1();
|
|
51246
51275
|
var BN = dew$V$1();
|
|
51247
51276
|
var inherits = dew$f$2();
|
|
51248
51277
|
var Base = dew$S$1();
|
|
51249
|
-
var assert2 =
|
|
51278
|
+
var assert2 = utils.assert;
|
|
51250
51279
|
function EdwardsCurve(conf) {
|
|
51251
51280
|
this.twisted = (conf.a | 0) !== 1;
|
|
51252
51281
|
this.mOneA = this.twisted && (conf.a | 0) === -1;
|
|
@@ -51743,7 +51772,7 @@ var _dewExec$M$1 = false;
|
|
|
51743
51772
|
function dew$M$1() {
|
|
51744
51773
|
if (_dewExec$M$1) return exports$M$1;
|
|
51745
51774
|
_dewExec$M$1 = true;
|
|
51746
|
-
var
|
|
51775
|
+
var utils = dew$N$1();
|
|
51747
51776
|
var assert2 = dew$1t();
|
|
51748
51777
|
function BlockHash() {
|
|
51749
51778
|
this.pending = null;
|
|
@@ -51758,7 +51787,7 @@ function dew$M$1() {
|
|
|
51758
51787
|
}
|
|
51759
51788
|
exports$M$1.BlockHash = BlockHash;
|
|
51760
51789
|
BlockHash.prototype.update = function update(msg, enc) {
|
|
51761
|
-
msg =
|
|
51790
|
+
msg = utils.toArray(msg, enc);
|
|
51762
51791
|
if (!this.pending) this.pending = msg;
|
|
51763
51792
|
else this.pending = this.pending.concat(msg);
|
|
51764
51793
|
this.pendingTotal += msg.length;
|
|
@@ -51767,7 +51796,7 @@ function dew$M$1() {
|
|
|
51767
51796
|
var r5 = msg.length % this._delta8;
|
|
51768
51797
|
this.pending = msg.slice(msg.length - r5, msg.length);
|
|
51769
51798
|
if (this.pending.length === 0) this.pending = null;
|
|
51770
|
-
msg =
|
|
51799
|
+
msg = utils.join32(msg, 0, msg.length - r5, this.endian);
|
|
51771
51800
|
for (var i5 = 0; i5 < msg.length; i5 += this._delta32) this._update(msg, i5, i5 + this._delta32);
|
|
51772
51801
|
}
|
|
51773
51802
|
return this;
|
|
@@ -51822,12 +51851,12 @@ var _dewExec$K$1 = false;
|
|
|
51822
51851
|
function dew$K$1() {
|
|
51823
51852
|
if (_dewExec$K$1) return exports$K$1;
|
|
51824
51853
|
_dewExec$K$1 = true;
|
|
51825
|
-
var
|
|
51854
|
+
var utils = dew$N$1();
|
|
51826
51855
|
var common = dew$M$1();
|
|
51827
|
-
var rotl32 =
|
|
51828
|
-
var sum32 =
|
|
51829
|
-
var sum32_3 =
|
|
51830
|
-
var sum32_4 =
|
|
51856
|
+
var rotl32 = utils.rotl32;
|
|
51857
|
+
var sum32 = utils.sum32;
|
|
51858
|
+
var sum32_3 = utils.sum32_3;
|
|
51859
|
+
var sum32_4 = utils.sum32_4;
|
|
51831
51860
|
var BlockHash = common.BlockHash;
|
|
51832
51861
|
function RIPEMD160() {
|
|
51833
51862
|
if (!(this instanceof RIPEMD160)) return new RIPEMD160();
|
|
@@ -51835,7 +51864,7 @@ function dew$K$1() {
|
|
|
51835
51864
|
this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
51836
51865
|
this.endian = "little";
|
|
51837
51866
|
}
|
|
51838
|
-
|
|
51867
|
+
utils.inherits(RIPEMD160, BlockHash);
|
|
51839
51868
|
exports$K$1.ripemd160 = RIPEMD160;
|
|
51840
51869
|
RIPEMD160.blockSize = 512;
|
|
51841
51870
|
RIPEMD160.outSize = 160;
|
|
@@ -51874,8 +51903,8 @@ function dew$K$1() {
|
|
|
51874
51903
|
this.h[0] = T4;
|
|
51875
51904
|
};
|
|
51876
51905
|
RIPEMD160.prototype._digest = function digest(enc) {
|
|
51877
|
-
if (enc === "hex") return
|
|
51878
|
-
else return
|
|
51906
|
+
if (enc === "hex") return utils.toHex32(this.h, "little");
|
|
51907
|
+
else return utils.split32(this.h, "little");
|
|
51879
51908
|
};
|
|
51880
51909
|
function f6(j4, x4, y5, z4) {
|
|
51881
51910
|
if (j4 <= 15) return x4 ^ y5 ^ z4;
|
|
@@ -51909,7 +51938,7 @@ var _dewExec$J$1 = false;
|
|
|
51909
51938
|
function dew$J$1() {
|
|
51910
51939
|
if (_dewExec$J$1) return exports$J$1;
|
|
51911
51940
|
_dewExec$J$1 = true;
|
|
51912
|
-
var
|
|
51941
|
+
var utils = dew$N$1();
|
|
51913
51942
|
var assert2 = dew$1t();
|
|
51914
51943
|
function Hmac2(hash, key, enc) {
|
|
51915
51944
|
if (!(this instanceof Hmac2)) return new Hmac2(hash, key, enc);
|
|
@@ -51918,7 +51947,7 @@ function dew$J$1() {
|
|
|
51918
51947
|
this.outSize = hash.outSize / 8;
|
|
51919
51948
|
this.inner = null;
|
|
51920
51949
|
this.outer = null;
|
|
51921
|
-
this._init(
|
|
51950
|
+
this._init(utils.toArray(key, enc));
|
|
51922
51951
|
}
|
|
51923
51952
|
exports$J$1 = Hmac2;
|
|
51924
51953
|
Hmac2.prototype._init = function init2(key) {
|
|
@@ -51984,8 +52013,8 @@ function dew$G$1() {
|
|
|
51984
52013
|
var curves = exports$G$1;
|
|
51985
52014
|
var hash = dew$I$1();
|
|
51986
52015
|
var curve = dew$O$1();
|
|
51987
|
-
var
|
|
51988
|
-
var assert2 =
|
|
52016
|
+
var utils = dew$T$1();
|
|
52017
|
+
var assert2 = utils.assert;
|
|
51989
52018
|
function PresetCurve(options) {
|
|
51990
52019
|
if (options.type === "short") this.curve = new curve.short(options);
|
|
51991
52020
|
else if (options.type === "edwards") this.curve = new curve.edwards(options);
|
|
@@ -52131,7 +52160,7 @@ function dew$F$1() {
|
|
|
52131
52160
|
if (_dewExec$F$1) return exports$F$1;
|
|
52132
52161
|
_dewExec$F$1 = true;
|
|
52133
52162
|
var hash = dew$I$1();
|
|
52134
|
-
var
|
|
52163
|
+
var utils = dew$U$1();
|
|
52135
52164
|
var assert2 = dew$1t();
|
|
52136
52165
|
function HmacDRBG(options) {
|
|
52137
52166
|
if (!(this instanceof HmacDRBG)) return new HmacDRBG(options);
|
|
@@ -52143,9 +52172,9 @@ function dew$F$1() {
|
|
|
52143
52172
|
this.reseedInterval = null;
|
|
52144
52173
|
this.K = null;
|
|
52145
52174
|
this.V = null;
|
|
52146
|
-
var entropy =
|
|
52147
|
-
var nonce =
|
|
52148
|
-
var pers =
|
|
52175
|
+
var entropy = utils.toArray(options.entropy, options.entropyEnc || "hex");
|
|
52176
|
+
var nonce = utils.toArray(options.nonce, options.nonceEnc || "hex");
|
|
52177
|
+
var pers = utils.toArray(options.pers, options.persEnc || "hex");
|
|
52149
52178
|
assert2(entropy.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits");
|
|
52150
52179
|
this._init(entropy, nonce, pers);
|
|
52151
52180
|
}
|
|
@@ -52180,8 +52209,8 @@ function dew$F$1() {
|
|
|
52180
52209
|
add = entropyEnc;
|
|
52181
52210
|
entropyEnc = null;
|
|
52182
52211
|
}
|
|
52183
|
-
entropy =
|
|
52184
|
-
add =
|
|
52212
|
+
entropy = utils.toArray(entropy, entropyEnc);
|
|
52213
|
+
add = utils.toArray(add, addEnc);
|
|
52185
52214
|
assert2(entropy.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits");
|
|
52186
52215
|
this._update(entropy.concat(add || []));
|
|
52187
52216
|
this._reseed = 1;
|
|
@@ -52194,7 +52223,7 @@ function dew$F$1() {
|
|
|
52194
52223
|
enc = null;
|
|
52195
52224
|
}
|
|
52196
52225
|
if (add) {
|
|
52197
|
-
add =
|
|
52226
|
+
add = utils.toArray(add, addEnc || "hex");
|
|
52198
52227
|
this._update(add);
|
|
52199
52228
|
}
|
|
52200
52229
|
var temp = [];
|
|
@@ -52205,7 +52234,7 @@ function dew$F$1() {
|
|
|
52205
52234
|
var res = temp.slice(0, len);
|
|
52206
52235
|
this._update(add);
|
|
52207
52236
|
this._reseed++;
|
|
52208
|
-
return
|
|
52237
|
+
return utils.encode(res, enc);
|
|
52209
52238
|
};
|
|
52210
52239
|
return exports$F$1;
|
|
52211
52240
|
}
|
|
@@ -52215,8 +52244,8 @@ function dew$E$1() {
|
|
|
52215
52244
|
if (_dewExec$E$1) return exports$E$1;
|
|
52216
52245
|
_dewExec$E$1 = true;
|
|
52217
52246
|
var BN = dew$V$1();
|
|
52218
|
-
var
|
|
52219
|
-
var assert2 =
|
|
52247
|
+
var utils = dew$T$1();
|
|
52248
|
+
var assert2 = utils.assert;
|
|
52220
52249
|
function KeyPair(ec, options) {
|
|
52221
52250
|
this.ec = ec;
|
|
52222
52251
|
this.priv = null;
|
|
@@ -52310,8 +52339,8 @@ function dew$D$1() {
|
|
|
52310
52339
|
if (_dewExec$D$1) return exports$D$1;
|
|
52311
52340
|
_dewExec$D$1 = true;
|
|
52312
52341
|
var BN = dew$V$1();
|
|
52313
|
-
var
|
|
52314
|
-
var assert2 =
|
|
52342
|
+
var utils = dew$T$1();
|
|
52343
|
+
var assert2 = utils.assert;
|
|
52315
52344
|
function Signature(options, enc) {
|
|
52316
52345
|
if (options instanceof Signature) return options;
|
|
52317
52346
|
if (this._importDER(options, enc)) return;
|
|
@@ -52358,7 +52387,7 @@ function dew$D$1() {
|
|
|
52358
52387
|
return buf.slice(i5);
|
|
52359
52388
|
}
|
|
52360
52389
|
Signature.prototype._importDER = function _importDER(data, enc) {
|
|
52361
|
-
data =
|
|
52390
|
+
data = utils.toArray(data, enc);
|
|
52362
52391
|
var p5 = new Position();
|
|
52363
52392
|
if (data[p5.place++] !== 48) {
|
|
52364
52393
|
return false;
|
|
@@ -52440,7 +52469,7 @@ function dew$D$1() {
|
|
|
52440
52469
|
var res = [48];
|
|
52441
52470
|
constructLength(res, backHalf.length);
|
|
52442
52471
|
res = res.concat(backHalf);
|
|
52443
|
-
return
|
|
52472
|
+
return utils.encode(res, enc);
|
|
52444
52473
|
};
|
|
52445
52474
|
return exports$D$1;
|
|
52446
52475
|
}
|
|
@@ -52451,10 +52480,10 @@ function dew$C$1() {
|
|
|
52451
52480
|
_dewExec$C$1 = true;
|
|
52452
52481
|
var BN = dew$V$1();
|
|
52453
52482
|
var HmacDRBG = dew$F$1();
|
|
52454
|
-
var
|
|
52483
|
+
var utils = dew$T$1();
|
|
52455
52484
|
var curves = dew$G$1();
|
|
52456
52485
|
var rand = dew$10$1();
|
|
52457
|
-
var assert2 =
|
|
52486
|
+
var assert2 = utils.assert;
|
|
52458
52487
|
var KeyPair = dew$E$1();
|
|
52459
52488
|
var Signature = dew$D$1();
|
|
52460
52489
|
function EC(options) {
|
|
@@ -52611,10 +52640,10 @@ var _dewExec$B$1 = false;
|
|
|
52611
52640
|
function dew$B$1() {
|
|
52612
52641
|
if (_dewExec$B$1) return exports$B$1;
|
|
52613
52642
|
_dewExec$B$1 = true;
|
|
52614
|
-
var
|
|
52615
|
-
var assert2 =
|
|
52616
|
-
var parseBytes =
|
|
52617
|
-
var cachedProperty =
|
|
52643
|
+
var utils = dew$T$1();
|
|
52644
|
+
var assert2 = utils.assert;
|
|
52645
|
+
var parseBytes = utils.parseBytes;
|
|
52646
|
+
var cachedProperty = utils.cachedProperty;
|
|
52618
52647
|
function KeyPair(eddsa, params) {
|
|
52619
52648
|
this.eddsa = eddsa;
|
|
52620
52649
|
this._secret = parseBytes(params.secret);
|
|
@@ -52671,10 +52700,10 @@ function dew$B$1() {
|
|
|
52671
52700
|
};
|
|
52672
52701
|
KeyPair.prototype.getSecret = function getSecret(enc) {
|
|
52673
52702
|
assert2(this._secret, "KeyPair is public only");
|
|
52674
|
-
return
|
|
52703
|
+
return utils.encode(this.secret(), enc);
|
|
52675
52704
|
};
|
|
52676
52705
|
KeyPair.prototype.getPublic = function getPublic(enc) {
|
|
52677
|
-
return
|
|
52706
|
+
return utils.encode(this.pubBytes(), enc);
|
|
52678
52707
|
};
|
|
52679
52708
|
exports$B$1 = KeyPair;
|
|
52680
52709
|
return exports$B$1;
|
|
@@ -52685,10 +52714,10 @@ function dew$A$1() {
|
|
|
52685
52714
|
if (_dewExec$A$1) return exports$A$1;
|
|
52686
52715
|
_dewExec$A$1 = true;
|
|
52687
52716
|
var BN = dew$V$1();
|
|
52688
|
-
var
|
|
52689
|
-
var assert2 =
|
|
52690
|
-
var cachedProperty =
|
|
52691
|
-
var parseBytes =
|
|
52717
|
+
var utils = dew$T$1();
|
|
52718
|
+
var assert2 = utils.assert;
|
|
52719
|
+
var cachedProperty = utils.cachedProperty;
|
|
52720
|
+
var parseBytes = utils.parseBytes;
|
|
52692
52721
|
function Signature(eddsa, sig) {
|
|
52693
52722
|
this.eddsa = eddsa;
|
|
52694
52723
|
if (typeof sig !== "object") sig = parseBytes(sig);
|
|
@@ -52720,7 +52749,7 @@ function dew$A$1() {
|
|
|
52720
52749
|
return this.Rencoded().concat(this.Sencoded());
|
|
52721
52750
|
};
|
|
52722
52751
|
Signature.prototype.toHex = function toHex() {
|
|
52723
|
-
return
|
|
52752
|
+
return utils.encode(this.toBytes(), "hex").toUpperCase();
|
|
52724
52753
|
};
|
|
52725
52754
|
exports$A$1 = Signature;
|
|
52726
52755
|
return exports$A$1;
|
|
@@ -52732,9 +52761,9 @@ function dew$z$1() {
|
|
|
52732
52761
|
_dewExec$z$1 = true;
|
|
52733
52762
|
var hash = dew$I$1();
|
|
52734
52763
|
var curves = dew$G$1();
|
|
52735
|
-
var
|
|
52736
|
-
var assert2 =
|
|
52737
|
-
var parseBytes =
|
|
52764
|
+
var utils = dew$T$1();
|
|
52765
|
+
var assert2 = utils.assert;
|
|
52766
|
+
var parseBytes = utils.parseBytes;
|
|
52738
52767
|
var KeyPair = dew$B$1();
|
|
52739
52768
|
var Signature = dew$A$1();
|
|
52740
52769
|
function EDDSA(curve) {
|
|
@@ -52775,7 +52804,7 @@ function dew$z$1() {
|
|
|
52775
52804
|
EDDSA.prototype.hashInt = function hashInt() {
|
|
52776
52805
|
var hash2 = this.hash();
|
|
52777
52806
|
for (var i5 = 0; i5 < arguments.length; i5++) hash2.update(arguments[i5]);
|
|
52778
|
-
return
|
|
52807
|
+
return utils.intFromLE(hash2.digest()).umod(this.curve.n);
|
|
52779
52808
|
};
|
|
52780
52809
|
EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
|
|
52781
52810
|
return KeyPair.fromPublic(this, pub);
|
|
@@ -52793,18 +52822,18 @@ function dew$z$1() {
|
|
|
52793
52822
|
return enc;
|
|
52794
52823
|
};
|
|
52795
52824
|
EDDSA.prototype.decodePoint = function decodePoint(bytes) {
|
|
52796
|
-
bytes =
|
|
52825
|
+
bytes = utils.parseBytes(bytes);
|
|
52797
52826
|
var lastIx = bytes.length - 1;
|
|
52798
52827
|
var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);
|
|
52799
52828
|
var xIsOdd = (bytes[lastIx] & 128) !== 0;
|
|
52800
|
-
var y5 =
|
|
52829
|
+
var y5 = utils.intFromLE(normed);
|
|
52801
52830
|
return this.curve.pointFromY(y5, xIsOdd);
|
|
52802
52831
|
};
|
|
52803
52832
|
EDDSA.prototype.encodeInt = function encodeInt(num) {
|
|
52804
52833
|
return num.toArray("le", this.encodingLength);
|
|
52805
52834
|
};
|
|
52806
52835
|
EDDSA.prototype.decodeInt = function decodeInt(bytes) {
|
|
52807
|
-
return
|
|
52836
|
+
return utils.intFromLE(bytes);
|
|
52808
52837
|
};
|
|
52809
52838
|
EDDSA.prototype.isPoint = function isPoint(val) {
|
|
52810
52839
|
return val instanceof this.pointClass;
|
|
@@ -63731,7 +63760,7 @@ function dew$_$2() {
|
|
|
63731
63760
|
}
|
|
63732
63761
|
return out;
|
|
63733
63762
|
};
|
|
63734
|
-
DH.prototype.getPublicKey = function
|
|
63763
|
+
DH.prototype.getPublicKey = function getPublicKey(enc) {
|
|
63735
63764
|
return formatReturnValue((this || _global$8$2)._pub, enc);
|
|
63736
63765
|
};
|
|
63737
63766
|
DH.prototype.getPrivateKey = function getPrivateKey(enc) {
|
|
@@ -69266,7 +69295,7 @@ var _dewExec$U$2 = false;
|
|
|
69266
69295
|
function dew$U$2() {
|
|
69267
69296
|
if (_dewExec$U$2) return exports$V$2;
|
|
69268
69297
|
_dewExec$U$2 = true;
|
|
69269
|
-
var
|
|
69298
|
+
var utils = exports$V$2;
|
|
69270
69299
|
function toArray(msg, enc) {
|
|
69271
69300
|
if (Array.isArray(msg)) return msg.slice();
|
|
69272
69301
|
if (!msg) return [];
|
|
@@ -69290,19 +69319,19 @@ function dew$U$2() {
|
|
|
69290
69319
|
}
|
|
69291
69320
|
return res;
|
|
69292
69321
|
}
|
|
69293
|
-
|
|
69322
|
+
utils.toArray = toArray;
|
|
69294
69323
|
function zero2(word) {
|
|
69295
69324
|
if (word.length === 1) return "0" + word;
|
|
69296
69325
|
else return word;
|
|
69297
69326
|
}
|
|
69298
|
-
|
|
69327
|
+
utils.zero2 = zero2;
|
|
69299
69328
|
function toHex(msg) {
|
|
69300
69329
|
var res = "";
|
|
69301
69330
|
for (var i5 = 0; i5 < msg.length; i5++) res += zero2(msg[i5].toString(16));
|
|
69302
69331
|
return res;
|
|
69303
69332
|
}
|
|
69304
|
-
|
|
69305
|
-
|
|
69333
|
+
utils.toHex = toHex;
|
|
69334
|
+
utils.encode = function encode(arr, enc) {
|
|
69306
69335
|
if (enc === "hex") return toHex(arr);
|
|
69307
69336
|
else return arr;
|
|
69308
69337
|
};
|
|
@@ -69313,15 +69342,15 @@ var _dewExec$T$2 = false;
|
|
|
69313
69342
|
function dew$T$2() {
|
|
69314
69343
|
if (_dewExec$T$2) return exports$U$2;
|
|
69315
69344
|
_dewExec$T$2 = true;
|
|
69316
|
-
var
|
|
69345
|
+
var utils = exports$U$2;
|
|
69317
69346
|
var BN = dew$V$2();
|
|
69318
69347
|
var minAssert = dew$2m();
|
|
69319
69348
|
var minUtils = dew$U$2();
|
|
69320
|
-
|
|
69321
|
-
|
|
69322
|
-
|
|
69323
|
-
|
|
69324
|
-
|
|
69349
|
+
utils.assert = minAssert;
|
|
69350
|
+
utils.toArray = minUtils.toArray;
|
|
69351
|
+
utils.zero2 = minUtils.zero2;
|
|
69352
|
+
utils.toHex = minUtils.toHex;
|
|
69353
|
+
utils.encode = minUtils.encode;
|
|
69325
69354
|
function getNAF(num, w4, bits) {
|
|
69326
69355
|
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
|
|
69327
69356
|
naf.fill(0);
|
|
@@ -69342,7 +69371,7 @@ function dew$T$2() {
|
|
|
69342
69371
|
}
|
|
69343
69372
|
return naf;
|
|
69344
69373
|
}
|
|
69345
|
-
|
|
69374
|
+
utils.getNAF = getNAF;
|
|
69346
69375
|
function getJSF(k1, k22) {
|
|
69347
69376
|
var jsf = [[], []];
|
|
69348
69377
|
k1 = k1.clone();
|
|
@@ -69380,22 +69409,22 @@ function dew$T$2() {
|
|
|
69380
69409
|
}
|
|
69381
69410
|
return jsf;
|
|
69382
69411
|
}
|
|
69383
|
-
|
|
69412
|
+
utils.getJSF = getJSF;
|
|
69384
69413
|
function cachedProperty(obj, name2, computer) {
|
|
69385
69414
|
var key = "_" + name2;
|
|
69386
69415
|
obj.prototype[name2] = function cachedProperty2() {
|
|
69387
69416
|
return this[key] !== void 0 ? this[key] : this[key] = computer.call(this);
|
|
69388
69417
|
};
|
|
69389
69418
|
}
|
|
69390
|
-
|
|
69419
|
+
utils.cachedProperty = cachedProperty;
|
|
69391
69420
|
function parseBytes(bytes) {
|
|
69392
|
-
return typeof bytes === "string" ?
|
|
69421
|
+
return typeof bytes === "string" ? utils.toArray(bytes, "hex") : bytes;
|
|
69393
69422
|
}
|
|
69394
|
-
|
|
69423
|
+
utils.parseBytes = parseBytes;
|
|
69395
69424
|
function intFromLE(bytes) {
|
|
69396
69425
|
return new BN(bytes, "hex", "le");
|
|
69397
69426
|
}
|
|
69398
|
-
|
|
69427
|
+
utils.intFromLE = intFromLE;
|
|
69399
69428
|
return exports$U$2;
|
|
69400
69429
|
}
|
|
69401
69430
|
var exports$T$2 = {};
|
|
@@ -69404,10 +69433,10 @@ function dew$S$2() {
|
|
|
69404
69433
|
if (_dewExec$S$2) return exports$T$2;
|
|
69405
69434
|
_dewExec$S$2 = true;
|
|
69406
69435
|
var BN = dew$V$2();
|
|
69407
|
-
var
|
|
69408
|
-
var getNAF =
|
|
69409
|
-
var getJSF =
|
|
69410
|
-
var assert2 =
|
|
69436
|
+
var utils = dew$T$2();
|
|
69437
|
+
var getNAF = utils.getNAF;
|
|
69438
|
+
var getJSF = utils.getJSF;
|
|
69439
|
+
var assert2 = utils.assert;
|
|
69411
69440
|
function BaseCurve(type, conf) {
|
|
69412
69441
|
this.type = type;
|
|
69413
69442
|
this.p = new BN(conf.p, 16);
|
|
@@ -69606,7 +69635,7 @@ function dew$S$2() {
|
|
|
69606
69635
|
return this.curve.validate(this);
|
|
69607
69636
|
};
|
|
69608
69637
|
BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
|
|
69609
|
-
bytes =
|
|
69638
|
+
bytes = utils.toArray(bytes, enc);
|
|
69610
69639
|
var len = this.p.byteLength();
|
|
69611
69640
|
if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {
|
|
69612
69641
|
if (bytes[0] === 6) assert2(bytes[bytes.length - 1] % 2 === 0);
|
|
@@ -69628,7 +69657,7 @@ function dew$S$2() {
|
|
|
69628
69657
|
return [4].concat(x4, this.getY().toArray("be", len));
|
|
69629
69658
|
};
|
|
69630
69659
|
BasePoint.prototype.encode = function encode(enc, compact) {
|
|
69631
|
-
return
|
|
69660
|
+
return utils.encode(this._encode(compact), enc);
|
|
69632
69661
|
};
|
|
69633
69662
|
BasePoint.prototype.precompute = function precompute(power) {
|
|
69634
69663
|
if (this.precomputed) return this;
|
|
@@ -69688,11 +69717,11 @@ var _dewExec$R$2 = false;
|
|
|
69688
69717
|
function dew$R$2() {
|
|
69689
69718
|
if (_dewExec$R$2) return exports$S$2;
|
|
69690
69719
|
_dewExec$R$2 = true;
|
|
69691
|
-
var
|
|
69720
|
+
var utils = dew$T$2();
|
|
69692
69721
|
var BN = dew$V$2();
|
|
69693
69722
|
var inherits = dew$f();
|
|
69694
69723
|
var Base = dew$S$2();
|
|
69695
|
-
var assert2 =
|
|
69724
|
+
var assert2 = utils.assert;
|
|
69696
69725
|
function ShortCurve(conf) {
|
|
69697
69726
|
Base.call(this, "short", conf);
|
|
69698
69727
|
this.a = new BN(conf.a, 16).toRed(this.red);
|
|
@@ -70335,7 +70364,7 @@ function dew$Q$2() {
|
|
|
70335
70364
|
var BN = dew$V$2();
|
|
70336
70365
|
var inherits = dew$f();
|
|
70337
70366
|
var Base = dew$S$2();
|
|
70338
|
-
var
|
|
70367
|
+
var utils = dew$T$2();
|
|
70339
70368
|
function MontCurve(conf) {
|
|
70340
70369
|
Base.call(this, "mont", conf);
|
|
70341
70370
|
this.a = new BN(conf.a, 16).toRed(this.red);
|
|
@@ -70367,7 +70396,7 @@ function dew$Q$2() {
|
|
|
70367
70396
|
}
|
|
70368
70397
|
inherits(Point, Base.BasePoint);
|
|
70369
70398
|
MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
|
|
70370
|
-
return this.point(
|
|
70399
|
+
return this.point(utils.toArray(bytes, enc), 1);
|
|
70371
70400
|
};
|
|
70372
70401
|
MontCurve.prototype.point = function point(x4, z4) {
|
|
70373
70402
|
return new Point(this, x4, z4);
|
|
@@ -70456,11 +70485,11 @@ var _dewExec$P$2 = false;
|
|
|
70456
70485
|
function dew$P$2() {
|
|
70457
70486
|
if (_dewExec$P$2) return exports$Q$2;
|
|
70458
70487
|
_dewExec$P$2 = true;
|
|
70459
|
-
var
|
|
70488
|
+
var utils = dew$T$2();
|
|
70460
70489
|
var BN = dew$V$2();
|
|
70461
70490
|
var inherits = dew$f();
|
|
70462
70491
|
var Base = dew$S$2();
|
|
70463
|
-
var assert2 =
|
|
70492
|
+
var assert2 = utils.assert;
|
|
70464
70493
|
function EdwardsCurve(conf) {
|
|
70465
70494
|
this.twisted = (conf.a | 0) !== 1;
|
|
70466
70495
|
this.mOneA = this.twisted && (conf.a | 0) === -1;
|
|
@@ -70957,7 +70986,7 @@ var _dewExec$M$2 = false;
|
|
|
70957
70986
|
function dew$M$2() {
|
|
70958
70987
|
if (_dewExec$M$2) return exports$N$2;
|
|
70959
70988
|
_dewExec$M$2 = true;
|
|
70960
|
-
var
|
|
70989
|
+
var utils = dew$N$2();
|
|
70961
70990
|
var assert2 = dew$2m();
|
|
70962
70991
|
function BlockHash() {
|
|
70963
70992
|
this.pending = null;
|
|
@@ -70972,7 +71001,7 @@ function dew$M$2() {
|
|
|
70972
71001
|
}
|
|
70973
71002
|
exports$N$2.BlockHash = BlockHash;
|
|
70974
71003
|
BlockHash.prototype.update = function update(msg, enc) {
|
|
70975
|
-
msg =
|
|
71004
|
+
msg = utils.toArray(msg, enc);
|
|
70976
71005
|
if (!this.pending) this.pending = msg;
|
|
70977
71006
|
else this.pending = this.pending.concat(msg);
|
|
70978
71007
|
this.pendingTotal += msg.length;
|
|
@@ -70981,7 +71010,7 @@ function dew$M$2() {
|
|
|
70981
71010
|
var r5 = msg.length % this._delta8;
|
|
70982
71011
|
this.pending = msg.slice(msg.length - r5, msg.length);
|
|
70983
71012
|
if (this.pending.length === 0) this.pending = null;
|
|
70984
|
-
msg =
|
|
71013
|
+
msg = utils.join32(msg, 0, msg.length - r5, this.endian);
|
|
70985
71014
|
for (var i5 = 0; i5 < msg.length; i5 += this._delta32) this._update(msg, i5, i5 + this._delta32);
|
|
70986
71015
|
}
|
|
70987
71016
|
return this;
|
|
@@ -71036,12 +71065,12 @@ var _dewExec$K$2 = false;
|
|
|
71036
71065
|
function dew$K$2() {
|
|
71037
71066
|
if (_dewExec$K$2) return exports$L$2;
|
|
71038
71067
|
_dewExec$K$2 = true;
|
|
71039
|
-
var
|
|
71068
|
+
var utils = dew$N$2();
|
|
71040
71069
|
var common = dew$M$2();
|
|
71041
|
-
var rotl32 =
|
|
71042
|
-
var sum32 =
|
|
71043
|
-
var sum32_3 =
|
|
71044
|
-
var sum32_4 =
|
|
71070
|
+
var rotl32 = utils.rotl32;
|
|
71071
|
+
var sum32 = utils.sum32;
|
|
71072
|
+
var sum32_3 = utils.sum32_3;
|
|
71073
|
+
var sum32_4 = utils.sum32_4;
|
|
71045
71074
|
var BlockHash = common.BlockHash;
|
|
71046
71075
|
function RIPEMD160() {
|
|
71047
71076
|
if (!(this instanceof RIPEMD160)) return new RIPEMD160();
|
|
@@ -71049,7 +71078,7 @@ function dew$K$2() {
|
|
|
71049
71078
|
this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
71050
71079
|
this.endian = "little";
|
|
71051
71080
|
}
|
|
71052
|
-
|
|
71081
|
+
utils.inherits(RIPEMD160, BlockHash);
|
|
71053
71082
|
exports$L$2.ripemd160 = RIPEMD160;
|
|
71054
71083
|
RIPEMD160.blockSize = 512;
|
|
71055
71084
|
RIPEMD160.outSize = 160;
|
|
@@ -71088,8 +71117,8 @@ function dew$K$2() {
|
|
|
71088
71117
|
this.h[0] = T4;
|
|
71089
71118
|
};
|
|
71090
71119
|
RIPEMD160.prototype._digest = function digest(enc) {
|
|
71091
|
-
if (enc === "hex") return
|
|
71092
|
-
else return
|
|
71120
|
+
if (enc === "hex") return utils.toHex32(this.h, "little");
|
|
71121
|
+
else return utils.split32(this.h, "little");
|
|
71093
71122
|
};
|
|
71094
71123
|
function f6(j4, x4, y5, z4) {
|
|
71095
71124
|
if (j4 <= 15) return x4 ^ y5 ^ z4;
|
|
@@ -71123,7 +71152,7 @@ var _dewExec$J$2 = false;
|
|
|
71123
71152
|
function dew$J$2() {
|
|
71124
71153
|
if (_dewExec$J$2) return exports$K$2;
|
|
71125
71154
|
_dewExec$J$2 = true;
|
|
71126
|
-
var
|
|
71155
|
+
var utils = dew$N$2();
|
|
71127
71156
|
var assert2 = dew$2m();
|
|
71128
71157
|
function Hmac2(hash, key, enc) {
|
|
71129
71158
|
if (!(this instanceof Hmac2)) return new Hmac2(hash, key, enc);
|
|
@@ -71132,7 +71161,7 @@ function dew$J$2() {
|
|
|
71132
71161
|
this.outSize = hash.outSize / 8;
|
|
71133
71162
|
this.inner = null;
|
|
71134
71163
|
this.outer = null;
|
|
71135
|
-
this._init(
|
|
71164
|
+
this._init(utils.toArray(key, enc));
|
|
71136
71165
|
}
|
|
71137
71166
|
exports$K$2 = Hmac2;
|
|
71138
71167
|
Hmac2.prototype._init = function init2(key) {
|
|
@@ -71198,8 +71227,8 @@ function dew$G$2() {
|
|
|
71198
71227
|
var curves = exports$H$2;
|
|
71199
71228
|
var hash = dew$I$2();
|
|
71200
71229
|
var curve = dew$O$2();
|
|
71201
|
-
var
|
|
71202
|
-
var assert2 =
|
|
71230
|
+
var utils = dew$T$2();
|
|
71231
|
+
var assert2 = utils.assert;
|
|
71203
71232
|
function PresetCurve(options) {
|
|
71204
71233
|
if (options.type === "short") this.curve = new curve.short(options);
|
|
71205
71234
|
else if (options.type === "edwards") this.curve = new curve.edwards(options);
|
|
@@ -71345,7 +71374,7 @@ function dew$F$2() {
|
|
|
71345
71374
|
if (_dewExec$F$2) return exports$G$2;
|
|
71346
71375
|
_dewExec$F$2 = true;
|
|
71347
71376
|
var hash = dew$I$2();
|
|
71348
|
-
var
|
|
71377
|
+
var utils = dew$U$2();
|
|
71349
71378
|
var assert2 = dew$2m();
|
|
71350
71379
|
function HmacDRBG(options) {
|
|
71351
71380
|
if (!(this instanceof HmacDRBG)) return new HmacDRBG(options);
|
|
@@ -71357,9 +71386,9 @@ function dew$F$2() {
|
|
|
71357
71386
|
this.reseedInterval = null;
|
|
71358
71387
|
this.K = null;
|
|
71359
71388
|
this.V = null;
|
|
71360
|
-
var entropy =
|
|
71361
|
-
var nonce =
|
|
71362
|
-
var pers =
|
|
71389
|
+
var entropy = utils.toArray(options.entropy, options.entropyEnc || "hex");
|
|
71390
|
+
var nonce = utils.toArray(options.nonce, options.nonceEnc || "hex");
|
|
71391
|
+
var pers = utils.toArray(options.pers, options.persEnc || "hex");
|
|
71363
71392
|
assert2(entropy.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits");
|
|
71364
71393
|
this._init(entropy, nonce, pers);
|
|
71365
71394
|
}
|
|
@@ -71394,8 +71423,8 @@ function dew$F$2() {
|
|
|
71394
71423
|
add = entropyEnc;
|
|
71395
71424
|
entropyEnc = null;
|
|
71396
71425
|
}
|
|
71397
|
-
entropy =
|
|
71398
|
-
add =
|
|
71426
|
+
entropy = utils.toArray(entropy, entropyEnc);
|
|
71427
|
+
add = utils.toArray(add, addEnc);
|
|
71399
71428
|
assert2(entropy.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits");
|
|
71400
71429
|
this._update(entropy.concat(add || []));
|
|
71401
71430
|
this._reseed = 1;
|
|
@@ -71408,7 +71437,7 @@ function dew$F$2() {
|
|
|
71408
71437
|
enc = null;
|
|
71409
71438
|
}
|
|
71410
71439
|
if (add) {
|
|
71411
|
-
add =
|
|
71440
|
+
add = utils.toArray(add, addEnc || "hex");
|
|
71412
71441
|
this._update(add);
|
|
71413
71442
|
}
|
|
71414
71443
|
var temp = [];
|
|
@@ -71419,7 +71448,7 @@ function dew$F$2() {
|
|
|
71419
71448
|
var res = temp.slice(0, len);
|
|
71420
71449
|
this._update(add);
|
|
71421
71450
|
this._reseed++;
|
|
71422
|
-
return
|
|
71451
|
+
return utils.encode(res, enc);
|
|
71423
71452
|
};
|
|
71424
71453
|
return exports$G$2;
|
|
71425
71454
|
}
|
|
@@ -71429,8 +71458,8 @@ function dew$E$2() {
|
|
|
71429
71458
|
if (_dewExec$E$2) return exports$F$2;
|
|
71430
71459
|
_dewExec$E$2 = true;
|
|
71431
71460
|
var BN = dew$V$2();
|
|
71432
|
-
var
|
|
71433
|
-
var assert2 =
|
|
71461
|
+
var utils = dew$T$2();
|
|
71462
|
+
var assert2 = utils.assert;
|
|
71434
71463
|
function KeyPair(ec, options) {
|
|
71435
71464
|
this.ec = ec;
|
|
71436
71465
|
this.priv = null;
|
|
@@ -71524,8 +71553,8 @@ function dew$D$2() {
|
|
|
71524
71553
|
if (_dewExec$D$2) return exports$E$2;
|
|
71525
71554
|
_dewExec$D$2 = true;
|
|
71526
71555
|
var BN = dew$V$2();
|
|
71527
|
-
var
|
|
71528
|
-
var assert2 =
|
|
71556
|
+
var utils = dew$T$2();
|
|
71557
|
+
var assert2 = utils.assert;
|
|
71529
71558
|
function Signature(options, enc) {
|
|
71530
71559
|
if (options instanceof Signature) return options;
|
|
71531
71560
|
if (this._importDER(options, enc)) return;
|
|
@@ -71572,7 +71601,7 @@ function dew$D$2() {
|
|
|
71572
71601
|
return buf.slice(i5);
|
|
71573
71602
|
}
|
|
71574
71603
|
Signature.prototype._importDER = function _importDER(data, enc) {
|
|
71575
|
-
data =
|
|
71604
|
+
data = utils.toArray(data, enc);
|
|
71576
71605
|
var p5 = new Position();
|
|
71577
71606
|
if (data[p5.place++] !== 48) {
|
|
71578
71607
|
return false;
|
|
@@ -71654,7 +71683,7 @@ function dew$D$2() {
|
|
|
71654
71683
|
var res = [48];
|
|
71655
71684
|
constructLength(res, backHalf.length);
|
|
71656
71685
|
res = res.concat(backHalf);
|
|
71657
|
-
return
|
|
71686
|
+
return utils.encode(res, enc);
|
|
71658
71687
|
};
|
|
71659
71688
|
return exports$E$2;
|
|
71660
71689
|
}
|
|
@@ -71665,10 +71694,10 @@ function dew$C$2() {
|
|
|
71665
71694
|
_dewExec$C$2 = true;
|
|
71666
71695
|
var BN = dew$V$2();
|
|
71667
71696
|
var HmacDRBG = dew$F$2();
|
|
71668
|
-
var
|
|
71697
|
+
var utils = dew$T$2();
|
|
71669
71698
|
var curves = dew$G$2();
|
|
71670
71699
|
var rand = dew$11$2();
|
|
71671
|
-
var assert2 =
|
|
71700
|
+
var assert2 = utils.assert;
|
|
71672
71701
|
var KeyPair = dew$E$2();
|
|
71673
71702
|
var Signature = dew$D$2();
|
|
71674
71703
|
function EC(options) {
|
|
@@ -71825,10 +71854,10 @@ var _dewExec$B$2 = false;
|
|
|
71825
71854
|
function dew$B$2() {
|
|
71826
71855
|
if (_dewExec$B$2) return exports$C$2;
|
|
71827
71856
|
_dewExec$B$2 = true;
|
|
71828
|
-
var
|
|
71829
|
-
var assert2 =
|
|
71830
|
-
var parseBytes =
|
|
71831
|
-
var cachedProperty =
|
|
71857
|
+
var utils = dew$T$2();
|
|
71858
|
+
var assert2 = utils.assert;
|
|
71859
|
+
var parseBytes = utils.parseBytes;
|
|
71860
|
+
var cachedProperty = utils.cachedProperty;
|
|
71832
71861
|
function KeyPair(eddsa, params) {
|
|
71833
71862
|
this.eddsa = eddsa;
|
|
71834
71863
|
this._secret = parseBytes(params.secret);
|
|
@@ -71885,10 +71914,10 @@ function dew$B$2() {
|
|
|
71885
71914
|
};
|
|
71886
71915
|
KeyPair.prototype.getSecret = function getSecret(enc) {
|
|
71887
71916
|
assert2(this._secret, "KeyPair is public only");
|
|
71888
|
-
return
|
|
71917
|
+
return utils.encode(this.secret(), enc);
|
|
71889
71918
|
};
|
|
71890
71919
|
KeyPair.prototype.getPublic = function getPublic(enc) {
|
|
71891
|
-
return
|
|
71920
|
+
return utils.encode(this.pubBytes(), enc);
|
|
71892
71921
|
};
|
|
71893
71922
|
exports$C$2 = KeyPair;
|
|
71894
71923
|
return exports$C$2;
|
|
@@ -71899,10 +71928,10 @@ function dew$A$2() {
|
|
|
71899
71928
|
if (_dewExec$A$2) return exports$B$2;
|
|
71900
71929
|
_dewExec$A$2 = true;
|
|
71901
71930
|
var BN = dew$V$2();
|
|
71902
|
-
var
|
|
71903
|
-
var assert2 =
|
|
71904
|
-
var cachedProperty =
|
|
71905
|
-
var parseBytes =
|
|
71931
|
+
var utils = dew$T$2();
|
|
71932
|
+
var assert2 = utils.assert;
|
|
71933
|
+
var cachedProperty = utils.cachedProperty;
|
|
71934
|
+
var parseBytes = utils.parseBytes;
|
|
71906
71935
|
function Signature(eddsa, sig) {
|
|
71907
71936
|
this.eddsa = eddsa;
|
|
71908
71937
|
if (typeof sig !== "object") sig = parseBytes(sig);
|
|
@@ -71934,7 +71963,7 @@ function dew$A$2() {
|
|
|
71934
71963
|
return this.Rencoded().concat(this.Sencoded());
|
|
71935
71964
|
};
|
|
71936
71965
|
Signature.prototype.toHex = function toHex() {
|
|
71937
|
-
return
|
|
71966
|
+
return utils.encode(this.toBytes(), "hex").toUpperCase();
|
|
71938
71967
|
};
|
|
71939
71968
|
exports$B$2 = Signature;
|
|
71940
71969
|
return exports$B$2;
|
|
@@ -71946,9 +71975,9 @@ function dew$z$2() {
|
|
|
71946
71975
|
_dewExec$z$2 = true;
|
|
71947
71976
|
var hash = dew$I$2();
|
|
71948
71977
|
var curves = dew$G$2();
|
|
71949
|
-
var
|
|
71950
|
-
var assert2 =
|
|
71951
|
-
var parseBytes =
|
|
71978
|
+
var utils = dew$T$2();
|
|
71979
|
+
var assert2 = utils.assert;
|
|
71980
|
+
var parseBytes = utils.parseBytes;
|
|
71952
71981
|
var KeyPair = dew$B$2();
|
|
71953
71982
|
var Signature = dew$A$2();
|
|
71954
71983
|
function EDDSA(curve) {
|
|
@@ -71989,7 +72018,7 @@ function dew$z$2() {
|
|
|
71989
72018
|
EDDSA.prototype.hashInt = function hashInt() {
|
|
71990
72019
|
var hash2 = this.hash();
|
|
71991
72020
|
for (var i5 = 0; i5 < arguments.length; i5++) hash2.update(arguments[i5]);
|
|
71992
|
-
return
|
|
72021
|
+
return utils.intFromLE(hash2.digest()).umod(this.curve.n);
|
|
71993
72022
|
};
|
|
71994
72023
|
EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
|
|
71995
72024
|
return KeyPair.fromPublic(this, pub);
|
|
@@ -72007,18 +72036,18 @@ function dew$z$2() {
|
|
|
72007
72036
|
return enc;
|
|
72008
72037
|
};
|
|
72009
72038
|
EDDSA.prototype.decodePoint = function decodePoint(bytes) {
|
|
72010
|
-
bytes =
|
|
72039
|
+
bytes = utils.parseBytes(bytes);
|
|
72011
72040
|
var lastIx = bytes.length - 1;
|
|
72012
72041
|
var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);
|
|
72013
72042
|
var xIsOdd = (bytes[lastIx] & 128) !== 0;
|
|
72014
|
-
var y5 =
|
|
72043
|
+
var y5 = utils.intFromLE(normed);
|
|
72015
72044
|
return this.curve.pointFromY(y5, xIsOdd);
|
|
72016
72045
|
};
|
|
72017
72046
|
EDDSA.prototype.encodeInt = function encodeInt(num) {
|
|
72018
72047
|
return num.toArray("le", this.encodingLength);
|
|
72019
72048
|
};
|
|
72020
72049
|
EDDSA.prototype.decodeInt = function decodeInt(bytes) {
|
|
72021
|
-
return
|
|
72050
|
+
return utils.intFromLE(bytes);
|
|
72022
72051
|
};
|
|
72023
72052
|
EDDSA.prototype.isPoint = function isPoint(val) {
|
|
72024
72053
|
return val instanceof this.pointClass;
|
|
@@ -82986,7 +83015,7 @@ function dew$1f() {
|
|
|
82986
83015
|
}
|
|
82987
83016
|
return out;
|
|
82988
83017
|
};
|
|
82989
|
-
DH.prototype.getPublicKey = function
|
|
83018
|
+
DH.prototype.getPublicKey = function getPublicKey(enc) {
|
|
82990
83019
|
return formatReturnValue((this || _global$h)._pub, enc);
|
|
82991
83020
|
};
|
|
82992
83021
|
DH.prototype.getPrivateKey = function getPrivateKey(enc) {
|
|
@@ -83269,7 +83298,7 @@ function dew$18() {
|
|
|
83269
83298
|
function copyBuffer(src, target, offset) {
|
|
83270
83299
|
src.copy(target, offset);
|
|
83271
83300
|
}
|
|
83272
|
-
exports$19 =
|
|
83301
|
+
exports$19 = function() {
|
|
83273
83302
|
function BufferList() {
|
|
83274
83303
|
_classCallCheck(this, BufferList);
|
|
83275
83304
|
this.head = null;
|
|
@@ -83329,7 +83358,7 @@ function dew$18() {
|
|
|
83329
83358
|
return ret;
|
|
83330
83359
|
};
|
|
83331
83360
|
return BufferList;
|
|
83332
|
-
}
|
|
83361
|
+
}();
|
|
83333
83362
|
if (util && util.inspect && util.inspect.custom) {
|
|
83334
83363
|
exports$19.prototype[util.inspect.custom] = function() {
|
|
83335
83364
|
var obj = util.inspect({
|
|
@@ -84485,11 +84514,11 @@ function dew$14() {
|
|
|
84485
84514
|
});
|
|
84486
84515
|
for (var i5 in stream2) {
|
|
84487
84516
|
if (this[i5] === void 0 && typeof stream2[i5] === "function") {
|
|
84488
|
-
this[i5] = /* @__PURE__ */
|
|
84517
|
+
this[i5] = /* @__PURE__ */ function(method) {
|
|
84489
84518
|
return function() {
|
|
84490
84519
|
return stream2[method].apply(stream2, arguments);
|
|
84491
84520
|
};
|
|
84492
|
-
}
|
|
84521
|
+
}(i5);
|
|
84493
84522
|
}
|
|
84494
84523
|
}
|
|
84495
84524
|
for (var n5 = 0; n5 < kProxyEvents.length; n5++) {
|
|
@@ -90154,7 +90183,7 @@ var _dewExec$Z = false;
|
|
|
90154
90183
|
function dew$Z() {
|
|
90155
90184
|
if (_dewExec$Z) return exports$_;
|
|
90156
90185
|
_dewExec$Z = true;
|
|
90157
|
-
var
|
|
90186
|
+
var utils = exports$_;
|
|
90158
90187
|
function toArray(msg, enc) {
|
|
90159
90188
|
if (Array.isArray(msg)) return msg.slice();
|
|
90160
90189
|
if (!msg) return [];
|
|
@@ -90178,19 +90207,19 @@ function dew$Z() {
|
|
|
90178
90207
|
}
|
|
90179
90208
|
return res;
|
|
90180
90209
|
}
|
|
90181
|
-
|
|
90210
|
+
utils.toArray = toArray;
|
|
90182
90211
|
function zero2(word) {
|
|
90183
90212
|
if (word.length === 1) return "0" + word;
|
|
90184
90213
|
else return word;
|
|
90185
90214
|
}
|
|
90186
|
-
|
|
90215
|
+
utils.zero2 = zero2;
|
|
90187
90216
|
function toHex(msg) {
|
|
90188
90217
|
var res = "";
|
|
90189
90218
|
for (var i5 = 0; i5 < msg.length; i5++) res += zero2(msg[i5].toString(16));
|
|
90190
90219
|
return res;
|
|
90191
90220
|
}
|
|
90192
|
-
|
|
90193
|
-
|
|
90221
|
+
utils.toHex = toHex;
|
|
90222
|
+
utils.encode = function encode(arr, enc) {
|
|
90194
90223
|
if (enc === "hex") return toHex(arr);
|
|
90195
90224
|
else return arr;
|
|
90196
90225
|
};
|
|
@@ -90201,15 +90230,15 @@ var _dewExec$Y = false;
|
|
|
90201
90230
|
function dew$Y() {
|
|
90202
90231
|
if (_dewExec$Y) return exports$Z;
|
|
90203
90232
|
_dewExec$Y = true;
|
|
90204
|
-
var
|
|
90233
|
+
var utils = exports$Z;
|
|
90205
90234
|
var BN = dew$_();
|
|
90206
90235
|
var minAssert = dew$3h();
|
|
90207
90236
|
var minUtils = dew$Z();
|
|
90208
|
-
|
|
90209
|
-
|
|
90210
|
-
|
|
90211
|
-
|
|
90212
|
-
|
|
90237
|
+
utils.assert = minAssert;
|
|
90238
|
+
utils.toArray = minUtils.toArray;
|
|
90239
|
+
utils.zero2 = minUtils.zero2;
|
|
90240
|
+
utils.toHex = minUtils.toHex;
|
|
90241
|
+
utils.encode = minUtils.encode;
|
|
90213
90242
|
function getNAF(num, w4, bits) {
|
|
90214
90243
|
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
|
|
90215
90244
|
var i5;
|
|
@@ -90233,7 +90262,7 @@ function dew$Y() {
|
|
|
90233
90262
|
}
|
|
90234
90263
|
return naf;
|
|
90235
90264
|
}
|
|
90236
|
-
|
|
90265
|
+
utils.getNAF = getNAF;
|
|
90237
90266
|
function getJSF(k1, k22) {
|
|
90238
90267
|
var jsf = [[], []];
|
|
90239
90268
|
k1 = k1.clone();
|
|
@@ -90271,22 +90300,22 @@ function dew$Y() {
|
|
|
90271
90300
|
}
|
|
90272
90301
|
return jsf;
|
|
90273
90302
|
}
|
|
90274
|
-
|
|
90303
|
+
utils.getJSF = getJSF;
|
|
90275
90304
|
function cachedProperty(obj, name2, computer) {
|
|
90276
90305
|
var key = "_" + name2;
|
|
90277
90306
|
obj.prototype[name2] = function cachedProperty2() {
|
|
90278
90307
|
return this[key] !== void 0 ? this[key] : this[key] = computer.call(this);
|
|
90279
90308
|
};
|
|
90280
90309
|
}
|
|
90281
|
-
|
|
90310
|
+
utils.cachedProperty = cachedProperty;
|
|
90282
90311
|
function parseBytes(bytes) {
|
|
90283
|
-
return typeof bytes === "string" ?
|
|
90312
|
+
return typeof bytes === "string" ? utils.toArray(bytes, "hex") : bytes;
|
|
90284
90313
|
}
|
|
90285
|
-
|
|
90314
|
+
utils.parseBytes = parseBytes;
|
|
90286
90315
|
function intFromLE(bytes) {
|
|
90287
90316
|
return new BN(bytes, "hex", "le");
|
|
90288
90317
|
}
|
|
90289
|
-
|
|
90318
|
+
utils.intFromLE = intFromLE;
|
|
90290
90319
|
return exports$Z;
|
|
90291
90320
|
}
|
|
90292
90321
|
var exports$Y = {};
|
|
@@ -90295,10 +90324,10 @@ function dew$X() {
|
|
|
90295
90324
|
if (_dewExec$X) return exports$Y;
|
|
90296
90325
|
_dewExec$X = true;
|
|
90297
90326
|
var BN = dew$_();
|
|
90298
|
-
var
|
|
90299
|
-
var getNAF =
|
|
90300
|
-
var getJSF =
|
|
90301
|
-
var assert2 =
|
|
90327
|
+
var utils = dew$Y();
|
|
90328
|
+
var getNAF = utils.getNAF;
|
|
90329
|
+
var getJSF = utils.getJSF;
|
|
90330
|
+
var assert2 = utils.assert;
|
|
90302
90331
|
function BaseCurve(type, conf) {
|
|
90303
90332
|
this.type = type;
|
|
90304
90333
|
this.p = new BN(conf.p, 16);
|
|
@@ -90497,7 +90526,7 @@ function dew$X() {
|
|
|
90497
90526
|
return this.curve.validate(this);
|
|
90498
90527
|
};
|
|
90499
90528
|
BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
|
|
90500
|
-
bytes =
|
|
90529
|
+
bytes = utils.toArray(bytes, enc);
|
|
90501
90530
|
var len = this.p.byteLength();
|
|
90502
90531
|
if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {
|
|
90503
90532
|
if (bytes[0] === 6) assert2(bytes[bytes.length - 1] % 2 === 0);
|
|
@@ -90519,7 +90548,7 @@ function dew$X() {
|
|
|
90519
90548
|
return [4].concat(x4, this.getY().toArray("be", len));
|
|
90520
90549
|
};
|
|
90521
90550
|
BasePoint.prototype.encode = function encode(enc, compact) {
|
|
90522
|
-
return
|
|
90551
|
+
return utils.encode(this._encode(compact), enc);
|
|
90523
90552
|
};
|
|
90524
90553
|
BasePoint.prototype.precompute = function precompute(power) {
|
|
90525
90554
|
if (this.precomputed) return this;
|
|
@@ -90579,11 +90608,11 @@ var _dewExec$W = false;
|
|
|
90579
90608
|
function dew$W() {
|
|
90580
90609
|
if (_dewExec$W) return exports$X;
|
|
90581
90610
|
_dewExec$W = true;
|
|
90582
|
-
var
|
|
90611
|
+
var utils = dew$Y();
|
|
90583
90612
|
var BN = dew$_();
|
|
90584
90613
|
var inherits = dew3();
|
|
90585
90614
|
var Base = dew$X();
|
|
90586
|
-
var assert2 =
|
|
90615
|
+
var assert2 = utils.assert;
|
|
90587
90616
|
function ShortCurve(conf) {
|
|
90588
90617
|
Base.call(this, "short", conf);
|
|
90589
90618
|
this.a = new BN(conf.a, 16).toRed(this.red);
|
|
@@ -91226,7 +91255,7 @@ function dew$V() {
|
|
|
91226
91255
|
var BN = dew$_();
|
|
91227
91256
|
var inherits = dew3();
|
|
91228
91257
|
var Base = dew$X();
|
|
91229
|
-
var
|
|
91258
|
+
var utils = dew$Y();
|
|
91230
91259
|
function MontCurve(conf) {
|
|
91231
91260
|
Base.call(this, "mont", conf);
|
|
91232
91261
|
this.a = new BN(conf.a, 16).toRed(this.red);
|
|
@@ -91258,7 +91287,7 @@ function dew$V() {
|
|
|
91258
91287
|
}
|
|
91259
91288
|
inherits(Point, Base.BasePoint);
|
|
91260
91289
|
MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
|
|
91261
|
-
return this.point(
|
|
91290
|
+
return this.point(utils.toArray(bytes, enc), 1);
|
|
91262
91291
|
};
|
|
91263
91292
|
MontCurve.prototype.point = function point(x4, z4) {
|
|
91264
91293
|
return new Point(this, x4, z4);
|
|
@@ -91347,11 +91376,11 @@ var _dewExec$U = false;
|
|
|
91347
91376
|
function dew$U() {
|
|
91348
91377
|
if (_dewExec$U) return exports$V;
|
|
91349
91378
|
_dewExec$U = true;
|
|
91350
|
-
var
|
|
91379
|
+
var utils = dew$Y();
|
|
91351
91380
|
var BN = dew$_();
|
|
91352
91381
|
var inherits = dew3();
|
|
91353
91382
|
var Base = dew$X();
|
|
91354
|
-
var assert2 =
|
|
91383
|
+
var assert2 = utils.assert;
|
|
91355
91384
|
function EdwardsCurve(conf) {
|
|
91356
91385
|
this.twisted = (conf.a | 0) !== 1;
|
|
91357
91386
|
this.mOneA = this.twisted && (conf.a | 0) === -1;
|
|
@@ -91848,7 +91877,7 @@ var _dewExec$R = false;
|
|
|
91848
91877
|
function dew$R() {
|
|
91849
91878
|
if (_dewExec$R) return exports$S;
|
|
91850
91879
|
_dewExec$R = true;
|
|
91851
|
-
var
|
|
91880
|
+
var utils = dew$S();
|
|
91852
91881
|
var assert2 = dew$3h();
|
|
91853
91882
|
function BlockHash() {
|
|
91854
91883
|
this.pending = null;
|
|
@@ -91863,7 +91892,7 @@ function dew$R() {
|
|
|
91863
91892
|
}
|
|
91864
91893
|
exports$S.BlockHash = BlockHash;
|
|
91865
91894
|
BlockHash.prototype.update = function update(msg, enc) {
|
|
91866
|
-
msg =
|
|
91895
|
+
msg = utils.toArray(msg, enc);
|
|
91867
91896
|
if (!this.pending) this.pending = msg;
|
|
91868
91897
|
else this.pending = this.pending.concat(msg);
|
|
91869
91898
|
this.pendingTotal += msg.length;
|
|
@@ -91872,7 +91901,7 @@ function dew$R() {
|
|
|
91872
91901
|
var r5 = msg.length % this._delta8;
|
|
91873
91902
|
this.pending = msg.slice(msg.length - r5, msg.length);
|
|
91874
91903
|
if (this.pending.length === 0) this.pending = null;
|
|
91875
|
-
msg =
|
|
91904
|
+
msg = utils.join32(msg, 0, msg.length - r5, this.endian);
|
|
91876
91905
|
for (var i5 = 0; i5 < msg.length; i5 += this._delta32) this._update(msg, i5, i5 + this._delta32);
|
|
91877
91906
|
}
|
|
91878
91907
|
return this;
|
|
@@ -91920,8 +91949,8 @@ var _dewExec$Q = false;
|
|
|
91920
91949
|
function dew$Q() {
|
|
91921
91950
|
if (_dewExec$Q) return exports$R;
|
|
91922
91951
|
_dewExec$Q = true;
|
|
91923
|
-
var
|
|
91924
|
-
var rotr32 =
|
|
91952
|
+
var utils = dew$S();
|
|
91953
|
+
var rotr32 = utils.rotr32;
|
|
91925
91954
|
function ft_1(s5, x4, y5, z4) {
|
|
91926
91955
|
if (s5 === 0) return ch32(x4, y5, z4);
|
|
91927
91956
|
if (s5 === 1 || s5 === 3) return p32(x4, y5, z4);
|
|
@@ -91963,12 +91992,12 @@ var _dewExec$P = false;
|
|
|
91963
91992
|
function dew$P() {
|
|
91964
91993
|
if (_dewExec$P) return exports$Q;
|
|
91965
91994
|
_dewExec$P = true;
|
|
91966
|
-
var
|
|
91995
|
+
var utils = dew$S();
|
|
91967
91996
|
var common = dew$R();
|
|
91968
91997
|
var shaCommon = dew$Q();
|
|
91969
|
-
var rotl32 =
|
|
91970
|
-
var sum32 =
|
|
91971
|
-
var sum32_5 =
|
|
91998
|
+
var rotl32 = utils.rotl32;
|
|
91999
|
+
var sum32 = utils.sum32;
|
|
92000
|
+
var sum32_5 = utils.sum32_5;
|
|
91972
92001
|
var ft_1 = shaCommon.ft_1;
|
|
91973
92002
|
var BlockHash = common.BlockHash;
|
|
91974
92003
|
var sha1_K = [1518500249, 1859775393, 2400959708, 3395469782];
|
|
@@ -91978,7 +92007,7 @@ function dew$P() {
|
|
|
91978
92007
|
this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
91979
92008
|
this.W = new Array(80);
|
|
91980
92009
|
}
|
|
91981
|
-
|
|
92010
|
+
utils.inherits(SHA1, BlockHash);
|
|
91982
92011
|
exports$Q = SHA1;
|
|
91983
92012
|
SHA1.blockSize = 512;
|
|
91984
92013
|
SHA1.outSize = 160;
|
|
@@ -92009,8 +92038,8 @@ function dew$P() {
|
|
|
92009
92038
|
this.h[4] = sum32(this.h[4], e7);
|
|
92010
92039
|
};
|
|
92011
92040
|
SHA1.prototype._digest = function digest(enc) {
|
|
92012
|
-
if (enc === "hex") return
|
|
92013
|
-
else return
|
|
92041
|
+
if (enc === "hex") return utils.toHex32(this.h, "big");
|
|
92042
|
+
else return utils.split32(this.h, "big");
|
|
92014
92043
|
};
|
|
92015
92044
|
return exports$Q;
|
|
92016
92045
|
}
|
|
@@ -92019,13 +92048,13 @@ var _dewExec$O = false;
|
|
|
92019
92048
|
function dew$O() {
|
|
92020
92049
|
if (_dewExec$O) return exports$P;
|
|
92021
92050
|
_dewExec$O = true;
|
|
92022
|
-
var
|
|
92051
|
+
var utils = dew$S();
|
|
92023
92052
|
var common = dew$R();
|
|
92024
92053
|
var shaCommon = dew$Q();
|
|
92025
92054
|
var assert2 = dew$3h();
|
|
92026
|
-
var sum32 =
|
|
92027
|
-
var sum32_4 =
|
|
92028
|
-
var sum32_5 =
|
|
92055
|
+
var sum32 = utils.sum32;
|
|
92056
|
+
var sum32_4 = utils.sum32_4;
|
|
92057
|
+
var sum32_5 = utils.sum32_5;
|
|
92029
92058
|
var ch32 = shaCommon.ch32;
|
|
92030
92059
|
var maj32 = shaCommon.maj32;
|
|
92031
92060
|
var s0_256 = shaCommon.s0_256;
|
|
@@ -92041,7 +92070,7 @@ function dew$O() {
|
|
|
92041
92070
|
this.k = sha256_K;
|
|
92042
92071
|
this.W = new Array(64);
|
|
92043
92072
|
}
|
|
92044
|
-
|
|
92073
|
+
utils.inherits(SHA256, BlockHash);
|
|
92045
92074
|
exports$P = SHA256;
|
|
92046
92075
|
SHA256.blockSize = 512;
|
|
92047
92076
|
SHA256.outSize = 256;
|
|
@@ -92082,8 +92111,8 @@ function dew$O() {
|
|
|
92082
92111
|
this.h[7] = sum32(this.h[7], h5);
|
|
92083
92112
|
};
|
|
92084
92113
|
SHA256.prototype._digest = function digest(enc) {
|
|
92085
|
-
if (enc === "hex") return
|
|
92086
|
-
else return
|
|
92114
|
+
if (enc === "hex") return utils.toHex32(this.h, "big");
|
|
92115
|
+
else return utils.split32(this.h, "big");
|
|
92087
92116
|
};
|
|
92088
92117
|
return exports$P;
|
|
92089
92118
|
}
|
|
@@ -92092,22 +92121,22 @@ var _dewExec$N = false;
|
|
|
92092
92121
|
function dew$N() {
|
|
92093
92122
|
if (_dewExec$N) return exports$O;
|
|
92094
92123
|
_dewExec$N = true;
|
|
92095
|
-
var
|
|
92124
|
+
var utils = dew$S();
|
|
92096
92125
|
var SHA256 = dew$O();
|
|
92097
92126
|
function SHA224() {
|
|
92098
92127
|
if (!(this instanceof SHA224)) return new SHA224();
|
|
92099
92128
|
SHA256.call(this);
|
|
92100
92129
|
this.h = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428];
|
|
92101
92130
|
}
|
|
92102
|
-
|
|
92131
|
+
utils.inherits(SHA224, SHA256);
|
|
92103
92132
|
exports$O = SHA224;
|
|
92104
92133
|
SHA224.blockSize = 512;
|
|
92105
92134
|
SHA224.outSize = 224;
|
|
92106
92135
|
SHA224.hmacStrength = 192;
|
|
92107
92136
|
SHA224.padLength = 64;
|
|
92108
92137
|
SHA224.prototype._digest = function digest(enc) {
|
|
92109
|
-
if (enc === "hex") return
|
|
92110
|
-
else return
|
|
92138
|
+
if (enc === "hex") return utils.toHex32(this.h.slice(0, 7), "big");
|
|
92139
|
+
else return utils.split32(this.h.slice(0, 7), "big");
|
|
92111
92140
|
};
|
|
92112
92141
|
return exports$O;
|
|
92113
92142
|
}
|
|
@@ -92116,20 +92145,20 @@ var _dewExec$M = false;
|
|
|
92116
92145
|
function dew$M() {
|
|
92117
92146
|
if (_dewExec$M) return exports$N;
|
|
92118
92147
|
_dewExec$M = true;
|
|
92119
|
-
var
|
|
92148
|
+
var utils = dew$S();
|
|
92120
92149
|
var common = dew$R();
|
|
92121
92150
|
var assert2 = dew$3h();
|
|
92122
|
-
var rotr64_hi =
|
|
92123
|
-
var rotr64_lo =
|
|
92124
|
-
var shr64_hi =
|
|
92125
|
-
var shr64_lo =
|
|
92126
|
-
var sum64 =
|
|
92127
|
-
var sum64_hi =
|
|
92128
|
-
var sum64_lo =
|
|
92129
|
-
var sum64_4_hi =
|
|
92130
|
-
var sum64_4_lo =
|
|
92131
|
-
var sum64_5_hi =
|
|
92132
|
-
var sum64_5_lo =
|
|
92151
|
+
var rotr64_hi = utils.rotr64_hi;
|
|
92152
|
+
var rotr64_lo = utils.rotr64_lo;
|
|
92153
|
+
var shr64_hi = utils.shr64_hi;
|
|
92154
|
+
var shr64_lo = utils.shr64_lo;
|
|
92155
|
+
var sum64 = utils.sum64;
|
|
92156
|
+
var sum64_hi = utils.sum64_hi;
|
|
92157
|
+
var sum64_lo = utils.sum64_lo;
|
|
92158
|
+
var sum64_4_hi = utils.sum64_4_hi;
|
|
92159
|
+
var sum64_4_lo = utils.sum64_4_lo;
|
|
92160
|
+
var sum64_5_hi = utils.sum64_5_hi;
|
|
92161
|
+
var sum64_5_lo = utils.sum64_5_lo;
|
|
92133
92162
|
var BlockHash = common.BlockHash;
|
|
92134
92163
|
var sha512_K = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591];
|
|
92135
92164
|
function SHA512() {
|
|
@@ -92139,7 +92168,7 @@ function dew$M() {
|
|
|
92139
92168
|
this.k = sha512_K;
|
|
92140
92169
|
this.W = new Array(160);
|
|
92141
92170
|
}
|
|
92142
|
-
|
|
92171
|
+
utils.inherits(SHA512, BlockHash);
|
|
92143
92172
|
exports$N = SHA512;
|
|
92144
92173
|
SHA512.blockSize = 1024;
|
|
92145
92174
|
SHA512.outSize = 512;
|
|
@@ -92227,8 +92256,8 @@ function dew$M() {
|
|
|
92227
92256
|
sum64(this.h, 14, hh, hl);
|
|
92228
92257
|
};
|
|
92229
92258
|
SHA512.prototype._digest = function digest(enc) {
|
|
92230
|
-
if (enc === "hex") return
|
|
92231
|
-
else return
|
|
92259
|
+
if (enc === "hex") return utils.toHex32(this.h, "big");
|
|
92260
|
+
else return utils.split32(this.h, "big");
|
|
92232
92261
|
};
|
|
92233
92262
|
function ch64_hi(xh, xl, yh, yl, zh) {
|
|
92234
92263
|
var r5 = xh & yh ^ ~xh & zh;
|
|
@@ -92321,22 +92350,22 @@ var _dewExec$L = false;
|
|
|
92321
92350
|
function dew$L() {
|
|
92322
92351
|
if (_dewExec$L) return exports$M;
|
|
92323
92352
|
_dewExec$L = true;
|
|
92324
|
-
var
|
|
92353
|
+
var utils = dew$S();
|
|
92325
92354
|
var SHA512 = dew$M();
|
|
92326
92355
|
function SHA384() {
|
|
92327
92356
|
if (!(this instanceof SHA384)) return new SHA384();
|
|
92328
92357
|
SHA512.call(this);
|
|
92329
92358
|
this.h = [3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857, 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428];
|
|
92330
92359
|
}
|
|
92331
|
-
|
|
92360
|
+
utils.inherits(SHA384, SHA512);
|
|
92332
92361
|
exports$M = SHA384;
|
|
92333
92362
|
SHA384.blockSize = 1024;
|
|
92334
92363
|
SHA384.outSize = 384;
|
|
92335
92364
|
SHA384.hmacStrength = 192;
|
|
92336
92365
|
SHA384.padLength = 128;
|
|
92337
92366
|
SHA384.prototype._digest = function digest(enc) {
|
|
92338
|
-
if (enc === "hex") return
|
|
92339
|
-
else return
|
|
92367
|
+
if (enc === "hex") return utils.toHex32(this.h.slice(0, 12), "big");
|
|
92368
|
+
else return utils.split32(this.h.slice(0, 12), "big");
|
|
92340
92369
|
};
|
|
92341
92370
|
return exports$M;
|
|
92342
92371
|
}
|
|
@@ -92357,12 +92386,12 @@ var _dewExec$J = false;
|
|
|
92357
92386
|
function dew$J() {
|
|
92358
92387
|
if (_dewExec$J) return exports$K;
|
|
92359
92388
|
_dewExec$J = true;
|
|
92360
|
-
var
|
|
92389
|
+
var utils = dew$S();
|
|
92361
92390
|
var common = dew$R();
|
|
92362
|
-
var rotl32 =
|
|
92363
|
-
var sum32 =
|
|
92364
|
-
var sum32_3 =
|
|
92365
|
-
var sum32_4 =
|
|
92391
|
+
var rotl32 = utils.rotl32;
|
|
92392
|
+
var sum32 = utils.sum32;
|
|
92393
|
+
var sum32_3 = utils.sum32_3;
|
|
92394
|
+
var sum32_4 = utils.sum32_4;
|
|
92366
92395
|
var BlockHash = common.BlockHash;
|
|
92367
92396
|
function RIPEMD160() {
|
|
92368
92397
|
if (!(this instanceof RIPEMD160)) return new RIPEMD160();
|
|
@@ -92370,7 +92399,7 @@ function dew$J() {
|
|
|
92370
92399
|
this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
92371
92400
|
this.endian = "little";
|
|
92372
92401
|
}
|
|
92373
|
-
|
|
92402
|
+
utils.inherits(RIPEMD160, BlockHash);
|
|
92374
92403
|
exports$K.ripemd160 = RIPEMD160;
|
|
92375
92404
|
RIPEMD160.blockSize = 512;
|
|
92376
92405
|
RIPEMD160.outSize = 160;
|
|
@@ -92409,8 +92438,8 @@ function dew$J() {
|
|
|
92409
92438
|
this.h[0] = T4;
|
|
92410
92439
|
};
|
|
92411
92440
|
RIPEMD160.prototype._digest = function digest(enc) {
|
|
92412
|
-
if (enc === "hex") return
|
|
92413
|
-
else return
|
|
92441
|
+
if (enc === "hex") return utils.toHex32(this.h, "little");
|
|
92442
|
+
else return utils.split32(this.h, "little");
|
|
92414
92443
|
};
|
|
92415
92444
|
function f6(j4, x4, y5, z4) {
|
|
92416
92445
|
if (j4 <= 15) return x4 ^ y5 ^ z4;
|
|
@@ -92444,7 +92473,7 @@ var _dewExec$I = false;
|
|
|
92444
92473
|
function dew$I() {
|
|
92445
92474
|
if (_dewExec$I) return exports$J;
|
|
92446
92475
|
_dewExec$I = true;
|
|
92447
|
-
var
|
|
92476
|
+
var utils = dew$S();
|
|
92448
92477
|
var assert2 = dew$3h();
|
|
92449
92478
|
function Hmac2(hash, key, enc) {
|
|
92450
92479
|
if (!(this instanceof Hmac2)) return new Hmac2(hash, key, enc);
|
|
@@ -92453,7 +92482,7 @@ function dew$I() {
|
|
|
92453
92482
|
this.outSize = hash.outSize / 8;
|
|
92454
92483
|
this.inner = null;
|
|
92455
92484
|
this.outer = null;
|
|
92456
|
-
this._init(
|
|
92485
|
+
this._init(utils.toArray(key, enc));
|
|
92457
92486
|
}
|
|
92458
92487
|
exports$J = Hmac2;
|
|
92459
92488
|
Hmac2.prototype._init = function init2(key) {
|
|
@@ -92519,8 +92548,8 @@ function dew$F() {
|
|
|
92519
92548
|
var curves = exports$G;
|
|
92520
92549
|
var hash = dew$H();
|
|
92521
92550
|
var curve = dew$T();
|
|
92522
|
-
var
|
|
92523
|
-
var assert2 =
|
|
92551
|
+
var utils = dew$Y();
|
|
92552
|
+
var assert2 = utils.assert;
|
|
92524
92553
|
function PresetCurve(options) {
|
|
92525
92554
|
if (options.type === "short") this.curve = new curve.short(options);
|
|
92526
92555
|
else if (options.type === "edwards") this.curve = new curve.edwards(options);
|
|
@@ -92666,7 +92695,7 @@ function dew$E() {
|
|
|
92666
92695
|
if (_dewExec$E) return exports$F;
|
|
92667
92696
|
_dewExec$E = true;
|
|
92668
92697
|
var hash = dew$H();
|
|
92669
|
-
var
|
|
92698
|
+
var utils = dew$Z();
|
|
92670
92699
|
var assert2 = dew$3h();
|
|
92671
92700
|
function HmacDRBG(options) {
|
|
92672
92701
|
if (!(this instanceof HmacDRBG)) return new HmacDRBG(options);
|
|
@@ -92678,9 +92707,9 @@ function dew$E() {
|
|
|
92678
92707
|
this.reseedInterval = null;
|
|
92679
92708
|
this.K = null;
|
|
92680
92709
|
this.V = null;
|
|
92681
|
-
var entropy =
|
|
92682
|
-
var nonce =
|
|
92683
|
-
var pers =
|
|
92710
|
+
var entropy = utils.toArray(options.entropy, options.entropyEnc || "hex");
|
|
92711
|
+
var nonce = utils.toArray(options.nonce, options.nonceEnc || "hex");
|
|
92712
|
+
var pers = utils.toArray(options.pers, options.persEnc || "hex");
|
|
92684
92713
|
assert2(entropy.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits");
|
|
92685
92714
|
this._init(entropy, nonce, pers);
|
|
92686
92715
|
}
|
|
@@ -92715,8 +92744,8 @@ function dew$E() {
|
|
|
92715
92744
|
add = entropyEnc;
|
|
92716
92745
|
entropyEnc = null;
|
|
92717
92746
|
}
|
|
92718
|
-
entropy =
|
|
92719
|
-
add =
|
|
92747
|
+
entropy = utils.toArray(entropy, entropyEnc);
|
|
92748
|
+
add = utils.toArray(add, addEnc);
|
|
92720
92749
|
assert2(entropy.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits");
|
|
92721
92750
|
this._update(entropy.concat(add || []));
|
|
92722
92751
|
this._reseed = 1;
|
|
@@ -92729,7 +92758,7 @@ function dew$E() {
|
|
|
92729
92758
|
enc = null;
|
|
92730
92759
|
}
|
|
92731
92760
|
if (add) {
|
|
92732
|
-
add =
|
|
92761
|
+
add = utils.toArray(add, addEnc || "hex");
|
|
92733
92762
|
this._update(add);
|
|
92734
92763
|
}
|
|
92735
92764
|
var temp = [];
|
|
@@ -92740,7 +92769,7 @@ function dew$E() {
|
|
|
92740
92769
|
var res = temp.slice(0, len);
|
|
92741
92770
|
this._update(add);
|
|
92742
92771
|
this._reseed++;
|
|
92743
|
-
return
|
|
92772
|
+
return utils.encode(res, enc);
|
|
92744
92773
|
};
|
|
92745
92774
|
return exports$F;
|
|
92746
92775
|
}
|
|
@@ -92750,8 +92779,8 @@ function dew$D() {
|
|
|
92750
92779
|
if (_dewExec$D) return exports$E;
|
|
92751
92780
|
_dewExec$D = true;
|
|
92752
92781
|
var BN = dew$_();
|
|
92753
|
-
var
|
|
92754
|
-
var assert2 =
|
|
92782
|
+
var utils = dew$Y();
|
|
92783
|
+
var assert2 = utils.assert;
|
|
92755
92784
|
function KeyPair(ec, options) {
|
|
92756
92785
|
this.ec = ec;
|
|
92757
92786
|
this.priv = null;
|
|
@@ -92845,8 +92874,8 @@ function dew$C() {
|
|
|
92845
92874
|
if (_dewExec$C) return exports$D;
|
|
92846
92875
|
_dewExec$C = true;
|
|
92847
92876
|
var BN = dew$_();
|
|
92848
|
-
var
|
|
92849
|
-
var assert2 =
|
|
92877
|
+
var utils = dew$Y();
|
|
92878
|
+
var assert2 = utils.assert;
|
|
92850
92879
|
function Signature(options, enc) {
|
|
92851
92880
|
if (options instanceof Signature) return options;
|
|
92852
92881
|
if (this._importDER(options, enc)) return;
|
|
@@ -92896,7 +92925,7 @@ function dew$C() {
|
|
|
92896
92925
|
return buf.slice(i5);
|
|
92897
92926
|
}
|
|
92898
92927
|
Signature.prototype._importDER = function _importDER(data, enc) {
|
|
92899
|
-
data =
|
|
92928
|
+
data = utils.toArray(data, enc);
|
|
92900
92929
|
var p5 = new Position();
|
|
92901
92930
|
if (data[p5.place++] !== 48) {
|
|
92902
92931
|
return false;
|
|
@@ -92984,7 +93013,7 @@ function dew$C() {
|
|
|
92984
93013
|
var res = [48];
|
|
92985
93014
|
constructLength(res, backHalf.length);
|
|
92986
93015
|
res = res.concat(backHalf);
|
|
92987
|
-
return
|
|
93016
|
+
return utils.encode(res, enc);
|
|
92988
93017
|
};
|
|
92989
93018
|
return exports$D;
|
|
92990
93019
|
}
|
|
@@ -92995,10 +93024,10 @@ function dew$B() {
|
|
|
92995
93024
|
_dewExec$B = true;
|
|
92996
93025
|
var BN = dew$_();
|
|
92997
93026
|
var HmacDRBG = dew$E();
|
|
92998
|
-
var
|
|
93027
|
+
var utils = dew$Y();
|
|
92999
93028
|
var curves = dew$F();
|
|
93000
93029
|
var rand = dew$1i();
|
|
93001
|
-
var assert2 =
|
|
93030
|
+
var assert2 = utils.assert;
|
|
93002
93031
|
var KeyPair = dew$D();
|
|
93003
93032
|
var Signature = dew$C();
|
|
93004
93033
|
function EC(options) {
|
|
@@ -93155,10 +93184,10 @@ var _dewExec$A = false;
|
|
|
93155
93184
|
function dew$A() {
|
|
93156
93185
|
if (_dewExec$A) return exports$B;
|
|
93157
93186
|
_dewExec$A = true;
|
|
93158
|
-
var
|
|
93159
|
-
var assert2 =
|
|
93160
|
-
var parseBytes =
|
|
93161
|
-
var cachedProperty =
|
|
93187
|
+
var utils = dew$Y();
|
|
93188
|
+
var assert2 = utils.assert;
|
|
93189
|
+
var parseBytes = utils.parseBytes;
|
|
93190
|
+
var cachedProperty = utils.cachedProperty;
|
|
93162
93191
|
function KeyPair(eddsa, params) {
|
|
93163
93192
|
this.eddsa = eddsa;
|
|
93164
93193
|
this._secret = parseBytes(params.secret);
|
|
@@ -93215,10 +93244,10 @@ function dew$A() {
|
|
|
93215
93244
|
};
|
|
93216
93245
|
KeyPair.prototype.getSecret = function getSecret(enc) {
|
|
93217
93246
|
assert2(this._secret, "KeyPair is public only");
|
|
93218
|
-
return
|
|
93247
|
+
return utils.encode(this.secret(), enc);
|
|
93219
93248
|
};
|
|
93220
93249
|
KeyPair.prototype.getPublic = function getPublic(enc) {
|
|
93221
|
-
return
|
|
93250
|
+
return utils.encode(this.pubBytes(), enc);
|
|
93222
93251
|
};
|
|
93223
93252
|
exports$B = KeyPair;
|
|
93224
93253
|
return exports$B;
|
|
@@ -93229,10 +93258,10 @@ function dew$z() {
|
|
|
93229
93258
|
if (_dewExec$z) return exports$A;
|
|
93230
93259
|
_dewExec$z = true;
|
|
93231
93260
|
var BN = dew$_();
|
|
93232
|
-
var
|
|
93233
|
-
var assert2 =
|
|
93234
|
-
var cachedProperty =
|
|
93235
|
-
var parseBytes =
|
|
93261
|
+
var utils = dew$Y();
|
|
93262
|
+
var assert2 = utils.assert;
|
|
93263
|
+
var cachedProperty = utils.cachedProperty;
|
|
93264
|
+
var parseBytes = utils.parseBytes;
|
|
93236
93265
|
function Signature(eddsa, sig) {
|
|
93237
93266
|
this.eddsa = eddsa;
|
|
93238
93267
|
if (typeof sig !== "object") sig = parseBytes(sig);
|
|
@@ -93265,7 +93294,7 @@ function dew$z() {
|
|
|
93265
93294
|
return this.Rencoded().concat(this.Sencoded());
|
|
93266
93295
|
};
|
|
93267
93296
|
Signature.prototype.toHex = function toHex() {
|
|
93268
|
-
return
|
|
93297
|
+
return utils.encode(this.toBytes(), "hex").toUpperCase();
|
|
93269
93298
|
};
|
|
93270
93299
|
exports$A = Signature;
|
|
93271
93300
|
return exports$A;
|
|
@@ -93277,9 +93306,9 @@ function dew$y() {
|
|
|
93277
93306
|
_dewExec$y = true;
|
|
93278
93307
|
var hash = dew$H();
|
|
93279
93308
|
var curves = dew$F();
|
|
93280
|
-
var
|
|
93281
|
-
var assert2 =
|
|
93282
|
-
var parseBytes =
|
|
93309
|
+
var utils = dew$Y();
|
|
93310
|
+
var assert2 = utils.assert;
|
|
93311
|
+
var parseBytes = utils.parseBytes;
|
|
93283
93312
|
var KeyPair = dew$A();
|
|
93284
93313
|
var Signature = dew$z();
|
|
93285
93314
|
function EDDSA(curve) {
|
|
@@ -93323,7 +93352,7 @@ function dew$y() {
|
|
|
93323
93352
|
EDDSA.prototype.hashInt = function hashInt() {
|
|
93324
93353
|
var hash2 = this.hash();
|
|
93325
93354
|
for (var i5 = 0; i5 < arguments.length; i5++) hash2.update(arguments[i5]);
|
|
93326
|
-
return
|
|
93355
|
+
return utils.intFromLE(hash2.digest()).umod(this.curve.n);
|
|
93327
93356
|
};
|
|
93328
93357
|
EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
|
|
93329
93358
|
return KeyPair.fromPublic(this, pub);
|
|
@@ -93341,18 +93370,18 @@ function dew$y() {
|
|
|
93341
93370
|
return enc;
|
|
93342
93371
|
};
|
|
93343
93372
|
EDDSA.prototype.decodePoint = function decodePoint(bytes) {
|
|
93344
|
-
bytes =
|
|
93373
|
+
bytes = utils.parseBytes(bytes);
|
|
93345
93374
|
var lastIx = bytes.length - 1;
|
|
93346
93375
|
var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);
|
|
93347
93376
|
var xIsOdd = (bytes[lastIx] & 128) !== 0;
|
|
93348
|
-
var y5 =
|
|
93377
|
+
var y5 = utils.intFromLE(normed);
|
|
93349
93378
|
return this.curve.pointFromY(y5, xIsOdd);
|
|
93350
93379
|
};
|
|
93351
93380
|
EDDSA.prototype.encodeInt = function encodeInt(num) {
|
|
93352
93381
|
return num.toArray("le", this.encodingLength);
|
|
93353
93382
|
};
|
|
93354
93383
|
EDDSA.prototype.decodeInt = function decodeInt(bytes) {
|
|
93355
|
-
return
|
|
93384
|
+
return utils.intFromLE(bytes);
|
|
93356
93385
|
};
|
|
93357
93386
|
EDDSA.prototype.isPoint = function isPoint(val) {
|
|
93358
93387
|
return val instanceof this.pointClass;
|
|
@@ -103927,67 +103956,42 @@ var Secrets = {
|
|
|
103927
103956
|
};
|
|
103928
103957
|
|
|
103929
103958
|
// src/utils/crypto.ts
|
|
103930
|
-
import * as ed from "@noble/ed25519";
|
|
103931
|
-
function urlEncode(pemKey) {
|
|
103932
|
-
const pemFormat = /-----(BEGIN|END) (RSA PRIVATE|EC PRIVATE|PRIVATE|PUBLIC) KEY-----/g;
|
|
103933
|
-
const base64Key = pemKey.replace(pemFormat, "");
|
|
103934
|
-
return base64Key.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "").replace(/ /g, "").replace(/\r/g, "").replace(/\n/g, "");
|
|
103935
|
-
}
|
|
103936
103959
|
var Crypto = {
|
|
103937
103960
|
async createEdDSAKeyPair() {
|
|
103938
|
-
const privateKey = ed.utils.randomPrivateKey();
|
|
103939
|
-
const publicKey = ed.getPublicKey(privateKey);
|
|
103940
|
-
const apiKey = Buffer.from(publicKey).toString("base64url");
|
|
103941
|
-
const secretKey = urlEncode(Buffer.from(privateKey).toString("base64"));
|
|
103942
|
-
return { apiKey, secretKey };
|
|
103943
103961
|
},
|
|
103944
103962
|
encryptShare(share, password, salt) {
|
|
103945
|
-
|
|
103946
|
-
|
|
103947
|
-
|
|
103948
|
-
|
|
103949
|
-
|
|
103950
|
-
|
|
103951
|
-
|
|
103952
|
-
return `gcm:${iv.toString("hex")}:${tag.toString("hex")}:${encrypted}`;
|
|
103953
|
-
} catch (e7) {
|
|
103954
|
-
console.error("Error during encrypting share:", e7);
|
|
103955
|
-
throw e7;
|
|
103956
|
-
}
|
|
103963
|
+
const key = pbkdf2Sync(password, salt, 1e5, 32, "sha512");
|
|
103964
|
+
const iv = randomBytes(12);
|
|
103965
|
+
const cipher = createCipheriv("aes-256-gcm", key, iv);
|
|
103966
|
+
let encrypted = cipher.update(share, "utf8", "hex");
|
|
103967
|
+
encrypted += cipher.final("hex");
|
|
103968
|
+
const tag = cipher.getAuthTag();
|
|
103969
|
+
return `gcm:${iv.toString("hex")}:${tag.toString("hex")}:${encrypted}`;
|
|
103957
103970
|
},
|
|
103958
103971
|
decryptShare(encryptedShare, password, salt) {
|
|
103959
103972
|
const key = pbkdf2Sync(password, salt, 1e5, 32, "sha512");
|
|
103960
103973
|
try {
|
|
103961
103974
|
if (encryptedShare.startsWith("gcm:")) {
|
|
103962
|
-
const
|
|
103963
|
-
if (parts2.length !== 4) throw new Error("Invalid ciphertext format");
|
|
103964
|
-
const [, ivHex2, tagHex, cipherHex] = parts2;
|
|
103975
|
+
const [, ivHex2, tagHex, cipherHex2] = encryptedShare.split(":");
|
|
103965
103976
|
const iv2 = Buffer.from(ivHex2, "hex");
|
|
103966
103977
|
const tag = Buffer.from(tagHex, "hex");
|
|
103967
103978
|
const decipher2 = createDecipheriv("aes-256-gcm", key, iv2);
|
|
103968
103979
|
decipher2.setAuthTag(tag);
|
|
103969
|
-
let decrypted2 = decipher2.update(
|
|
103980
|
+
let decrypted2 = decipher2.update(cipherHex2, "hex", "utf8");
|
|
103970
103981
|
decrypted2 += decipher2.final("utf8");
|
|
103971
103982
|
return decrypted2;
|
|
103972
103983
|
}
|
|
103973
|
-
const
|
|
103974
|
-
if (parts.length !== 2) throw new Error("Invalid ciphertext format");
|
|
103975
|
-
const [ivHex, encrypted] = parts;
|
|
103984
|
+
const [ivHex, cipherHex] = encryptedShare.split(":");
|
|
103976
103985
|
const iv = Buffer.from(ivHex, "hex");
|
|
103977
103986
|
const decipher = createDecipheriv("aes-256-cbc", key, iv);
|
|
103978
|
-
let decrypted = decipher.update(
|
|
103987
|
+
let decrypted = decipher.update(cipherHex, "hex", "utf8");
|
|
103979
103988
|
decrypted += decipher.final("utf8");
|
|
103980
103989
|
if (!/^[0-9a-fA-F]+$/.test(decrypted) || decrypted.length % 2 !== 0) {
|
|
103981
103990
|
throw new Error("Wrong password");
|
|
103982
103991
|
}
|
|
103983
103992
|
return decrypted;
|
|
103984
103993
|
} catch (e7) {
|
|
103985
|
-
|
|
103986
|
-
const msg = String(e7?.message || "").toLowerCase();
|
|
103987
|
-
if (msg.includes("unable to decrypt data") || msg.includes("wrong password") || msg.includes("bad decrypt") || msg.includes("auth") || msg.includes("unsupported state") || msg.includes("invalid tag")) {
|
|
103988
|
-
throw new Error("Wrong password");
|
|
103989
|
-
}
|
|
103990
|
-
throw e7;
|
|
103994
|
+
throw new Error("Wrong password");
|
|
103991
103995
|
}
|
|
103992
103996
|
}
|
|
103993
103997
|
};
|
|
@@ -104084,8 +104088,6 @@ var SDKErrorCode = /* @__PURE__ */ ((SDKErrorCode2) => {
|
|
|
104084
104088
|
SDKErrorCode2["NETWORK_SWITCH_FAILED"] = "NETWORK_SWITCH_FAILED";
|
|
104085
104089
|
SDKErrorCode2["TRANSACTION_FAILED"] = "TRANSACTION_FAILED";
|
|
104086
104090
|
SDKErrorCode2["INVALID_PIN"] = "INVALID_PIN";
|
|
104087
|
-
SDKErrorCode2["RECOVERY_FAILED"] = "RECOVERY_FAILED";
|
|
104088
|
-
SDKErrorCode2["UNKNOWN"] = "UNKNOWN";
|
|
104089
104091
|
return SDKErrorCode2;
|
|
104090
104092
|
})(SDKErrorCode || {});
|
|
104091
104093
|
var SDKError = class extends Error {
|
|
@@ -104349,25 +104351,10 @@ var WalletService = class {
|
|
|
104349
104351
|
"INVALID_PARAMS" /* INVALID_PARAMS */
|
|
104350
104352
|
);
|
|
104351
104353
|
}
|
|
104352
|
-
const walletInfo = await this.walletClient.getWallet();
|
|
104353
|
-
const serverAddr = this.normalizeAddr(walletInfo?.address);
|
|
104354
|
-
const expectedShareLen = String(walletInfo?.share1 ?? "").length;
|
|
104355
104354
|
const decryptShareOrThrow = (encryptedShare) => {
|
|
104356
104355
|
try {
|
|
104357
|
-
|
|
104358
|
-
encryptedShare,
|
|
104359
|
-
password,
|
|
104360
|
-
firebaseId
|
|
104361
|
-
);
|
|
104362
|
-
if (expectedShareLen > 0 && share.length !== expectedShareLen) {
|
|
104363
|
-
throw new SDKError(
|
|
104364
|
-
"Incorrect PIN code",
|
|
104365
|
-
"INVALID_PASSWORD" /* INVALID_PASSWORD */
|
|
104366
|
-
);
|
|
104367
|
-
}
|
|
104368
|
-
return share;
|
|
104356
|
+
return Crypto.decryptShare(encryptedShare, password, firebaseId);
|
|
104369
104357
|
} catch (e7) {
|
|
104370
|
-
if (e7 instanceof SDKError) throw e7;
|
|
104371
104358
|
if (this.isInvalidPasswordError(e7)) {
|
|
104372
104359
|
throw new SDKError(
|
|
104373
104360
|
"Incorrect PIN code",
|
|
@@ -104378,6 +104365,8 @@ var WalletService = class {
|
|
|
104378
104365
|
throw e7;
|
|
104379
104366
|
}
|
|
104380
104367
|
};
|
|
104368
|
+
const walletInfo = await this.walletClient.getWallet();
|
|
104369
|
+
const serverAddr = this.normalizeAddr(walletInfo?.address);
|
|
104381
104370
|
let share2 = await LocalForage.get(
|
|
104382
104371
|
STORAGE_KEYS.share2(this.orgHost)
|
|
104383
104372
|
);
|
|
@@ -104400,8 +104389,8 @@ var WalletService = class {
|
|
|
104400
104389
|
const derivedAddr2 = this.normalizeAddr(wallet2.address);
|
|
104401
104390
|
if (this.addressesMismatch(serverAddr, derivedAddr2)) {
|
|
104402
104391
|
throw new SDKError(
|
|
104403
|
-
|
|
104404
|
-
"
|
|
104392
|
+
`Recovered wallet address mismatch. server=${serverAddr} derived=${derivedAddr2}`,
|
|
104393
|
+
"WALLET_RECOVERY_FAILED" /* WALLET_RECOVERY_FAILED */
|
|
104405
104394
|
);
|
|
104406
104395
|
}
|
|
104407
104396
|
const newShares = await Secrets.split(wallet2.privateKey, 3, 2);
|
|
@@ -104436,7 +104425,10 @@ var WalletService = class {
|
|
|
104436
104425
|
const wallet = new Wallet(privateKey);
|
|
104437
104426
|
const derivedAddr = this.normalizeAddr(wallet.address);
|
|
104438
104427
|
if (this.addressesMismatch(serverAddr, derivedAddr)) {
|
|
104439
|
-
throw new SDKError(
|
|
104428
|
+
throw new SDKError(
|
|
104429
|
+
`Recovered wallet address mismatch. server=${serverAddr} derived=${derivedAddr}`,
|
|
104430
|
+
"WALLET_RECOVERY_FAILED" /* WALLET_RECOVERY_FAILED */
|
|
104431
|
+
);
|
|
104440
104432
|
}
|
|
104441
104433
|
await this.ensureDeviceEncryptedShare2(share2, firebaseId);
|
|
104442
104434
|
this.walletAddress = wallet.address;
|
|
@@ -105016,6 +105008,30 @@ var HttpClient = class {
|
|
|
105016
105008
|
throw new Error("Invalid environment");
|
|
105017
105009
|
}
|
|
105018
105010
|
}
|
|
105011
|
+
getAccessTokenStorageKey() {
|
|
105012
|
+
return `${this.orgHost}:accessToken`;
|
|
105013
|
+
}
|
|
105014
|
+
async getValidAccessToken() {
|
|
105015
|
+
const tokenKey = this.getAccessTokenStorageKey();
|
|
105016
|
+
const accessToken = await LocalForage.get(tokenKey);
|
|
105017
|
+
if (!accessToken) {
|
|
105018
|
+
throw new SDKError(
|
|
105019
|
+
"Session expired. Please sign in again.",
|
|
105020
|
+
"AUTH_REQUIRED" /* AUTH_REQUIRED */
|
|
105021
|
+
);
|
|
105022
|
+
}
|
|
105023
|
+
const payload = Jwt.tryParse(accessToken);
|
|
105024
|
+
const expiryEpochMs = typeof payload?.exp === "number" && Number.isFinite(payload.exp) ? payload.exp * 1e3 : null;
|
|
105025
|
+
if (!expiryEpochMs || Date.now() >= expiryEpochMs) {
|
|
105026
|
+
await LocalForage.delete(tokenKey);
|
|
105027
|
+
throw new SDKError(
|
|
105028
|
+
"Session expired. Please sign in again.",
|
|
105029
|
+
"AUTH_REQUIRED" /* AUTH_REQUIRED */,
|
|
105030
|
+
{ reason: "access_token_expired" }
|
|
105031
|
+
);
|
|
105032
|
+
}
|
|
105033
|
+
return accessToken;
|
|
105034
|
+
}
|
|
105019
105035
|
async getHeaders(needsAccessToken = false) {
|
|
105020
105036
|
const headers = {
|
|
105021
105037
|
"Content-Type": "application/json",
|
|
@@ -105023,13 +105039,7 @@ var HttpClient = class {
|
|
|
105023
105039
|
"X-Al-Org-Host": this.orgHost
|
|
105024
105040
|
};
|
|
105025
105041
|
if (needsAccessToken) {
|
|
105026
|
-
const accessToken = await
|
|
105027
|
-
`${this.orgHost}:accessToken`
|
|
105028
|
-
);
|
|
105029
|
-
if (!accessToken) {
|
|
105030
|
-
throw new SDKError("No access token found", "AUTH_REQUIRED" /* AUTH_REQUIRED */);
|
|
105031
|
-
}
|
|
105032
|
-
;
|
|
105042
|
+
const accessToken = await this.getValidAccessToken();
|
|
105033
105043
|
headers["Authorization"] = `Bearer ${accessToken}`;
|
|
105034
105044
|
}
|
|
105035
105045
|
return headers;
|
|
@@ -105065,9 +105075,9 @@ var HttpClient = class {
|
|
|
105065
105075
|
const response = await fetch(`${this.baseUrl}${path}`, requestInit);
|
|
105066
105076
|
if (!response.ok) {
|
|
105067
105077
|
if (config2.needsAccessToken && (response.status === 401 || response.status === 403)) {
|
|
105068
|
-
await LocalForage.delete(
|
|
105078
|
+
await LocalForage.delete(this.getAccessTokenStorageKey());
|
|
105069
105079
|
throw new SDKError(
|
|
105070
|
-
|
|
105080
|
+
"Session expired. Please sign in again.",
|
|
105071
105081
|
"AUTH_REQUIRED" /* AUTH_REQUIRED */,
|
|
105072
105082
|
await this.safeReadErrorDetails(response)
|
|
105073
105083
|
);
|
|
@@ -105576,7 +105586,7 @@ var RBT_PROPERTY_TOKEN_ABI = [
|
|
|
105576
105586
|
// src/core/services/asset.ts
|
|
105577
105587
|
import { Interface as Interface2 } from "ethers";
|
|
105578
105588
|
|
|
105579
|
-
// node_modules
|
|
105589
|
+
// node_modules/@jspm/core/nodelibs/browser/events.js
|
|
105580
105590
|
var exports$111 = {};
|
|
105581
105591
|
var _dewExec11 = false;
|
|
105582
105592
|
function dew11() {
|
|
@@ -106019,7 +106029,7 @@ var {
|
|
|
106019
106029
|
once: once2
|
|
106020
106030
|
} = exports12;
|
|
106021
106031
|
|
|
106022
|
-
// node_modules
|
|
106032
|
+
// node_modules/@jspm/core/nodelibs/browser/timers.js
|
|
106023
106033
|
var exports$211 = {};
|
|
106024
106034
|
var _dewExec$111 = false;
|
|
106025
106035
|
var _global$111 = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
|
|
@@ -107337,7 +107347,7 @@ var WeBlockSDK = class {
|
|
|
107337
107347
|
return this.initialized;
|
|
107338
107348
|
}
|
|
107339
107349
|
};
|
|
107340
|
-
var
|
|
107350
|
+
var src_default = WeBlockSDK;
|
|
107341
107351
|
export {
|
|
107342
107352
|
DECIMALS,
|
|
107343
107353
|
SDKError,
|
|
@@ -107348,15 +107358,19 @@ export {
|
|
|
107348
107358
|
TransactionStatus,
|
|
107349
107359
|
TransactionType,
|
|
107350
107360
|
WeBlockSDK,
|
|
107351
|
-
|
|
107361
|
+
src_default as default
|
|
107352
107362
|
};
|
|
107353
107363
|
/*! Bundled license information:
|
|
107354
107364
|
|
|
107355
107365
|
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
107356
|
-
@jspm/core/nodelibs/browser/chunk-B738Er4n.js:
|
|
107357
107366
|
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
107358
107367
|
|
|
107359
107368
|
@jspm/core/nodelibs/browser/chunk-CcCWfKp1.js:
|
|
107369
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
107370
|
+
|
|
107371
|
+
@jspm/core/nodelibs/browser/chunk-B738Er4n.js:
|
|
107372
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
107373
|
+
|
|
107360
107374
|
@jspm/core/nodelibs/browser/crypto.js:
|
|
107361
107375
|
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
107362
107376
|
*/
|