zigap-utils 0.0.22 → 0.0.23
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.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import * as
|
|
2
|
+
var ca = Object.defineProperty;
|
|
3
|
+
var da = (f, e, t) => e in f ? ca(f, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : f[e] = t;
|
|
4
|
+
var wt = (f, e, t) => (da(f, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
+
import * as ha from "react";
|
|
6
6
|
import nr, { useRef as ei, useState as qf, useEffect as zt } from "react";
|
|
7
7
|
var ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8
8
|
function sn(f) {
|
|
@@ -30,7 +30,7 @@ function on(f) {
|
|
|
30
30
|
}), t;
|
|
31
31
|
}
|
|
32
32
|
var Cf = { exports: {} }, Xt = {};
|
|
33
|
-
const cn = /* @__PURE__ */ on(
|
|
33
|
+
const cn = /* @__PURE__ */ on(ha);
|
|
34
34
|
/**
|
|
35
35
|
* @license React
|
|
36
36
|
* react-jsx-runtime.production.min.js
|
|
@@ -41,20 +41,20 @@ const cn = /* @__PURE__ */ on(da);
|
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
42
|
*/
|
|
43
43
|
var ti;
|
|
44
|
-
function
|
|
44
|
+
function ua() {
|
|
45
45
|
if (ti)
|
|
46
46
|
return Xt;
|
|
47
47
|
ti = 1;
|
|
48
48
|
var f = cn, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
49
49
|
function y(x, u, o) {
|
|
50
|
-
var c,
|
|
51
|
-
o !== void 0 && (
|
|
50
|
+
var c, b = {}, v = null, C = null;
|
|
51
|
+
o !== void 0 && (v = "" + o), u.key !== void 0 && (v = "" + u.key), u.ref !== void 0 && (C = u.ref);
|
|
52
52
|
for (c in u)
|
|
53
|
-
r.call(u, c) && !i.hasOwnProperty(c) && (
|
|
53
|
+
r.call(u, c) && !i.hasOwnProperty(c) && (b[c] = u[c]);
|
|
54
54
|
if (x && x.defaultProps)
|
|
55
55
|
for (c in u = x.defaultProps, u)
|
|
56
|
-
|
|
57
|
-
return { $$typeof: e, type: x, key:
|
|
56
|
+
b[c] === void 0 && (b[c] = u[c]);
|
|
57
|
+
return { $$typeof: e, type: x, key: v, ref: C, props: b, _owner: a.current };
|
|
58
58
|
}
|
|
59
59
|
return Xt.Fragment = t, Xt.jsx = y, Xt.jsxs = y, Xt;
|
|
60
60
|
}
|
|
@@ -69,9 +69,9 @@ var Zt = {};
|
|
|
69
69
|
* LICENSE file in the root directory of this source tree.
|
|
70
70
|
*/
|
|
71
71
|
var ri;
|
|
72
|
-
function
|
|
72
|
+
function la() {
|
|
73
73
|
return ri || (ri = 1, process.env.NODE_ENV !== "production" && function() {
|
|
74
|
-
var f = cn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), x = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), o = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"),
|
|
74
|
+
var f = cn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), x = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), o = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), w = Symbol.iterator, R = "@@iterator";
|
|
75
75
|
function P(p) {
|
|
76
76
|
if (p === null || typeof p != "object")
|
|
77
77
|
return null;
|
|
@@ -99,7 +99,7 @@ function ua() {
|
|
|
99
99
|
var T = !1, H = !1, $ = !1, K = !1, X = !1, Q;
|
|
100
100
|
Q = Symbol.for("react.module.reference");
|
|
101
101
|
function U(p) {
|
|
102
|
-
return !!(typeof p == "string" || typeof p == "function" || p === r || p === i || X || p === a || p === o || p === c || K || p === C || T || H || $ || typeof p == "object" && p !== null && (p.$$typeof ===
|
|
102
|
+
return !!(typeof p == "string" || typeof p == "function" || p === r || p === i || X || p === a || p === o || p === c || K || p === C || T || H || $ || typeof p == "object" && p !== null && (p.$$typeof === v || p.$$typeof === b || p.$$typeof === y || p.$$typeof === x || p.$$typeof === u || // This needs to include all possible module reference object
|
|
103
103
|
// types supported by any Flight configuration anywhere since
|
|
104
104
|
// we don't know which Flight build this will end up being used
|
|
105
105
|
// with.
|
|
@@ -146,10 +146,10 @@ function ua() {
|
|
|
146
146
|
return n(L._context) + ".Provider";
|
|
147
147
|
case u:
|
|
148
148
|
return A(p, p.render, "ForwardRef");
|
|
149
|
-
case
|
|
149
|
+
case b:
|
|
150
150
|
var V = p.displayName || null;
|
|
151
151
|
return V !== null ? V : d(p.type) || "Memo";
|
|
152
|
-
case
|
|
152
|
+
case v: {
|
|
153
153
|
var ne = p, fe = ne._payload, he = ne._init;
|
|
154
154
|
try {
|
|
155
155
|
return d(he(fe));
|
|
@@ -336,9 +336,9 @@ function ua() {
|
|
|
336
336
|
switch (p.$$typeof) {
|
|
337
337
|
case u:
|
|
338
338
|
return Oe(p.render);
|
|
339
|
-
case
|
|
339
|
+
case b:
|
|
340
340
|
return Ge(p.type, I, L);
|
|
341
|
-
case
|
|
341
|
+
case v: {
|
|
342
342
|
var V = p, ne = V._payload, fe = V._init;
|
|
343
343
|
try {
|
|
344
344
|
return Ge(fe(ne), I, L);
|
|
@@ -570,7 +570,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function yt(p) {
|
|
574
574
|
{
|
|
575
575
|
var I = p.type;
|
|
576
576
|
if (I == null || typeof I == "string")
|
|
@@ -580,7 +580,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
580
580
|
L = I.propTypes;
|
|
581
581
|
else if (typeof I == "object" && (I.$$typeof === u || // Note: Memo only checks outer props here.
|
|
582
582
|
// Inner props are checked in the reconciler.
|
|
583
|
-
I.$$typeof ===
|
|
583
|
+
I.$$typeof === b))
|
|
584
584
|
L = I.propTypes;
|
|
585
585
|
else
|
|
586
586
|
return;
|
|
@@ -649,7 +649,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
649
649
|
<%s key={someKey} {...props} />`, de, _e, ye, _e), Re[_e + de] = !0;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
return p === r ? Ie(ve) :
|
|
652
|
+
return p === r ? Ie(ve) : yt(ve), ve;
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
function _(p, I, L) {
|
|
@@ -662,15 +662,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
662
662
|
Zt.Fragment = r, Zt.jsx = s, Zt.jsxs = M;
|
|
663
663
|
}()), Zt;
|
|
664
664
|
}
|
|
665
|
-
process.env.NODE_ENV === "production" ? Cf.exports =
|
|
666
|
-
var vr = Cf.exports,
|
|
665
|
+
process.env.NODE_ENV === "production" ? Cf.exports = ua() : Cf.exports = la();
|
|
666
|
+
var vr = Cf.exports, xa = Object.defineProperty, br = Object.getOwnPropertySymbols, dn = Object.prototype.hasOwnProperty, hn = Object.prototype.propertyIsEnumerable, fi = (f, e, t) => e in f ? xa(f, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : f[e] = t, ii = (f, e) => {
|
|
667
667
|
for (var t in e || (e = {}))
|
|
668
668
|
dn.call(e, t) && fi(f, t, e[t]);
|
|
669
669
|
if (br)
|
|
670
670
|
for (var t of br(e))
|
|
671
671
|
hn.call(e, t) && fi(f, t, e[t]);
|
|
672
672
|
return f;
|
|
673
|
-
},
|
|
673
|
+
}, va = (f, e) => {
|
|
674
674
|
var t = {};
|
|
675
675
|
for (var r in f)
|
|
676
676
|
dn.call(f, r) && e.indexOf(r) < 0 && (t[r] = f[r]);
|
|
@@ -687,28 +687,28 @@ var vr = Cf.exports, la = Object.defineProperty, br = Object.getOwnPropertySymbo
|
|
|
687
687
|
var St;
|
|
688
688
|
((f) => {
|
|
689
689
|
const e = class {
|
|
690
|
-
constructor(u, o, c,
|
|
690
|
+
constructor(u, o, c, b) {
|
|
691
691
|
if (this.version = u, this.errorCorrectionLevel = o, this.modules = [], this.isFunction = [], u < e.MIN_VERSION || u > e.MAX_VERSION)
|
|
692
692
|
throw new RangeError("Version value out of range");
|
|
693
|
-
if (
|
|
693
|
+
if (b < -1 || b > 7)
|
|
694
694
|
throw new RangeError("Mask value out of range");
|
|
695
695
|
this.size = u * 4 + 17;
|
|
696
|
-
let
|
|
696
|
+
let v = [];
|
|
697
697
|
for (let w = 0; w < this.size; w++)
|
|
698
|
-
|
|
698
|
+
v.push(!1);
|
|
699
699
|
for (let w = 0; w < this.size; w++)
|
|
700
|
-
this.modules.push(
|
|
700
|
+
this.modules.push(v.slice()), this.isFunction.push(v.slice());
|
|
701
701
|
this.drawFunctionPatterns();
|
|
702
702
|
const C = this.addEccAndInterleave(c);
|
|
703
|
-
if (this.drawCodewords(C),
|
|
703
|
+
if (this.drawCodewords(C), b == -1) {
|
|
704
704
|
let w = 1e9;
|
|
705
705
|
for (let R = 0; R < 8; R++) {
|
|
706
706
|
this.applyMask(R), this.drawFormatBits(R);
|
|
707
707
|
const P = this.getPenaltyScore();
|
|
708
|
-
P < w && (
|
|
708
|
+
P < w && (b = R, w = P), this.applyMask(R);
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
i(0 <=
|
|
711
|
+
i(0 <= b && b <= 7), this.mask = b, this.applyMask(b), this.drawFormatBits(b), this.isFunction = [];
|
|
712
712
|
}
|
|
713
713
|
static encodeText(u, o) {
|
|
714
714
|
const c = f.QrSegment.makeSegments(u);
|
|
@@ -718,8 +718,8 @@ var St;
|
|
|
718
718
|
const c = f.QrSegment.makeBytes(u);
|
|
719
719
|
return e.encodeSegments([c], o);
|
|
720
720
|
}
|
|
721
|
-
static encodeSegments(u, o, c = 1,
|
|
722
|
-
if (!(e.MIN_VERSION <= c && c <=
|
|
721
|
+
static encodeSegments(u, o, c = 1, b = 40, v = -1, C = !0) {
|
|
722
|
+
if (!(e.MIN_VERSION <= c && c <= b && b <= e.MAX_VERSION) || v < -1 || v > 7)
|
|
723
723
|
throw new RangeError("Invalid value");
|
|
724
724
|
let w, R;
|
|
725
725
|
for (w = c; ; w++) {
|
|
@@ -728,7 +728,7 @@ var St;
|
|
|
728
728
|
R = T;
|
|
729
729
|
break;
|
|
730
730
|
}
|
|
731
|
-
if (w >=
|
|
731
|
+
if (w >= b)
|
|
732
732
|
throw new RangeError("Data too long");
|
|
733
733
|
}
|
|
734
734
|
for (const k of [e.Ecc.MEDIUM, e.Ecc.QUARTILE, e.Ecc.HIGH])
|
|
@@ -747,7 +747,7 @@ var St;
|
|
|
747
747
|
let S = [];
|
|
748
748
|
for (; S.length * 8 < P.length; )
|
|
749
749
|
S.push(0);
|
|
750
|
-
return P.forEach((k, T) => S[T >>> 3] |= k << 7 - (T & 7)), new e(w, o, S,
|
|
750
|
+
return P.forEach((k, T) => S[T >>> 3] |= k << 7 - (T & 7)), new e(w, o, S, v);
|
|
751
751
|
}
|
|
752
752
|
getModule(u, o) {
|
|
753
753
|
return 0 <= u && u < this.size && 0 <= o && o < this.size && this.modules[o][u];
|
|
@@ -761,26 +761,26 @@ var St;
|
|
|
761
761
|
this.drawFinderPattern(3, 3), this.drawFinderPattern(this.size - 4, 3), this.drawFinderPattern(3, this.size - 4);
|
|
762
762
|
const u = this.getAlignmentPatternPositions(), o = u.length;
|
|
763
763
|
for (let c = 0; c < o; c++)
|
|
764
|
-
for (let
|
|
765
|
-
c == 0 &&
|
|
764
|
+
for (let b = 0; b < o; b++)
|
|
765
|
+
c == 0 && b == 0 || c == 0 && b == o - 1 || c == o - 1 && b == 0 || this.drawAlignmentPattern(u[c], u[b]);
|
|
766
766
|
this.drawFormatBits(0), this.drawVersion();
|
|
767
767
|
}
|
|
768
768
|
drawFormatBits(u) {
|
|
769
769
|
const o = this.errorCorrectionLevel.formatBits << 3 | u;
|
|
770
770
|
let c = o;
|
|
771
|
-
for (let
|
|
771
|
+
for (let v = 0; v < 10; v++)
|
|
772
772
|
c = c << 1 ^ (c >>> 9) * 1335;
|
|
773
|
-
const
|
|
774
|
-
i(
|
|
775
|
-
for (let
|
|
776
|
-
this.setFunctionModule(8,
|
|
777
|
-
this.setFunctionModule(8, 7, a(
|
|
778
|
-
for (let
|
|
779
|
-
this.setFunctionModule(14 -
|
|
780
|
-
for (let
|
|
781
|
-
this.setFunctionModule(this.size - 1 -
|
|
782
|
-
for (let
|
|
783
|
-
this.setFunctionModule(8, this.size - 15 +
|
|
773
|
+
const b = (o << 10 | c) ^ 21522;
|
|
774
|
+
i(b >>> 15 == 0);
|
|
775
|
+
for (let v = 0; v <= 5; v++)
|
|
776
|
+
this.setFunctionModule(8, v, a(b, v));
|
|
777
|
+
this.setFunctionModule(8, 7, a(b, 6)), this.setFunctionModule(8, 8, a(b, 7)), this.setFunctionModule(7, 8, a(b, 8));
|
|
778
|
+
for (let v = 9; v < 15; v++)
|
|
779
|
+
this.setFunctionModule(14 - v, 8, a(b, v));
|
|
780
|
+
for (let v = 0; v < 8; v++)
|
|
781
|
+
this.setFunctionModule(this.size - 1 - v, 8, a(b, v));
|
|
782
|
+
for (let v = 8; v < 15; v++)
|
|
783
|
+
this.setFunctionModule(8, this.size - 15 + v, a(b, v));
|
|
784
784
|
this.setFunctionModule(8, this.size - 8, !0);
|
|
785
785
|
}
|
|
786
786
|
drawVersion() {
|
|
@@ -792,21 +792,21 @@ var St;
|
|
|
792
792
|
const o = this.version << 12 | u;
|
|
793
793
|
i(o >>> 18 == 0);
|
|
794
794
|
for (let c = 0; c < 18; c++) {
|
|
795
|
-
const
|
|
796
|
-
this.setFunctionModule(
|
|
795
|
+
const b = a(o, c), v = this.size - 11 + c % 3, C = Math.floor(c / 3);
|
|
796
|
+
this.setFunctionModule(v, C, b), this.setFunctionModule(C, v, b);
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
drawFinderPattern(u, o) {
|
|
800
800
|
for (let c = -4; c <= 4; c++)
|
|
801
|
-
for (let
|
|
802
|
-
const
|
|
803
|
-
0 <= C && C < this.size && 0 <= w && w < this.size && this.setFunctionModule(C, w,
|
|
801
|
+
for (let b = -4; b <= 4; b++) {
|
|
802
|
+
const v = Math.max(Math.abs(b), Math.abs(c)), C = u + b, w = o + c;
|
|
803
|
+
0 <= C && C < this.size && 0 <= w && w < this.size && this.setFunctionModule(C, w, v != 2 && v != 4);
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
drawAlignmentPattern(u, o) {
|
|
807
807
|
for (let c = -2; c <= 2; c++)
|
|
808
|
-
for (let
|
|
809
|
-
this.setFunctionModule(u +
|
|
808
|
+
for (let b = -2; b <= 2; b++)
|
|
809
|
+
this.setFunctionModule(u + b, o + c, Math.max(Math.abs(b), Math.abs(c)) != 1);
|
|
810
810
|
}
|
|
811
811
|
setFunctionModule(u, o, c) {
|
|
812
812
|
this.modules[o][u] = c, this.isFunction[o][u] = !0;
|
|
@@ -815,11 +815,11 @@ var St;
|
|
|
815
815
|
const o = this.version, c = this.errorCorrectionLevel;
|
|
816
816
|
if (u.length != e.getNumDataCodewords(o, c))
|
|
817
817
|
throw new RangeError("Invalid argument");
|
|
818
|
-
const
|
|
818
|
+
const b = e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][o], v = e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][o], C = Math.floor(e.getNumRawDataModules(o) / 8), w = b - C % b, R = Math.floor(C / b);
|
|
819
819
|
let P = [];
|
|
820
|
-
const q = e.reedSolomonComputeDivisor(
|
|
821
|
-
for (let k = 0, T = 0; k <
|
|
822
|
-
let H = u.slice(T, T + R -
|
|
820
|
+
const q = e.reedSolomonComputeDivisor(v);
|
|
821
|
+
for (let k = 0, T = 0; k < b; k++) {
|
|
822
|
+
let H = u.slice(T, T + R - v + (k < w ? 0 : 1));
|
|
823
823
|
T += H.length;
|
|
824
824
|
const $ = e.reedSolomonComputeRemainder(H, q);
|
|
825
825
|
k < w && H.push(0), P.push(H.concat($));
|
|
@@ -827,7 +827,7 @@ var St;
|
|
|
827
827
|
let S = [];
|
|
828
828
|
for (let k = 0; k < P[0].length; k++)
|
|
829
829
|
P.forEach((T, H) => {
|
|
830
|
-
(k != R -
|
|
830
|
+
(k != R - v || H >= w) && S.push(T[k]);
|
|
831
831
|
});
|
|
832
832
|
return i(S.length == C), S;
|
|
833
833
|
}
|
|
@@ -837,9 +837,9 @@ var St;
|
|
|
837
837
|
let o = 0;
|
|
838
838
|
for (let c = this.size - 1; c >= 1; c -= 2) {
|
|
839
839
|
c == 6 && (c = 5);
|
|
840
|
-
for (let
|
|
841
|
-
for (let
|
|
842
|
-
const C = c -
|
|
840
|
+
for (let b = 0; b < this.size; b++)
|
|
841
|
+
for (let v = 0; v < 2; v++) {
|
|
842
|
+
const C = c - v, R = (c + 1 & 2) == 0 ? this.size - 1 - b : b;
|
|
843
843
|
!this.isFunction[R][C] && o < u.length * 8 && (this.modules[R][C] = a(u[o >>> 3], 7 - (o & 7)), o++);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
@@ -850,62 +850,62 @@ var St;
|
|
|
850
850
|
throw new RangeError("Mask value out of range");
|
|
851
851
|
for (let o = 0; o < this.size; o++)
|
|
852
852
|
for (let c = 0; c < this.size; c++) {
|
|
853
|
-
let
|
|
853
|
+
let b;
|
|
854
854
|
switch (u) {
|
|
855
855
|
case 0:
|
|
856
|
-
|
|
856
|
+
b = (c + o) % 2 == 0;
|
|
857
857
|
break;
|
|
858
858
|
case 1:
|
|
859
|
-
|
|
859
|
+
b = o % 2 == 0;
|
|
860
860
|
break;
|
|
861
861
|
case 2:
|
|
862
|
-
|
|
862
|
+
b = c % 3 == 0;
|
|
863
863
|
break;
|
|
864
864
|
case 3:
|
|
865
|
-
|
|
865
|
+
b = (c + o) % 3 == 0;
|
|
866
866
|
break;
|
|
867
867
|
case 4:
|
|
868
|
-
|
|
868
|
+
b = (Math.floor(c / 3) + Math.floor(o / 2)) % 2 == 0;
|
|
869
869
|
break;
|
|
870
870
|
case 5:
|
|
871
|
-
|
|
871
|
+
b = c * o % 2 + c * o % 3 == 0;
|
|
872
872
|
break;
|
|
873
873
|
case 6:
|
|
874
|
-
|
|
874
|
+
b = (c * o % 2 + c * o % 3) % 2 == 0;
|
|
875
875
|
break;
|
|
876
876
|
case 7:
|
|
877
|
-
|
|
877
|
+
b = ((c + o) % 2 + c * o % 3) % 2 == 0;
|
|
878
878
|
break;
|
|
879
879
|
default:
|
|
880
880
|
throw new Error("Unreachable");
|
|
881
881
|
}
|
|
882
|
-
!this.isFunction[o][c] &&
|
|
882
|
+
!this.isFunction[o][c] && b && (this.modules[o][c] = !this.modules[o][c]);
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
885
|
getPenaltyScore() {
|
|
886
886
|
let u = 0;
|
|
887
|
-
for (let
|
|
887
|
+
for (let v = 0; v < this.size; v++) {
|
|
888
888
|
let C = !1, w = 0, R = [0, 0, 0, 0, 0, 0, 0];
|
|
889
889
|
for (let P = 0; P < this.size; P++)
|
|
890
|
-
this.modules[
|
|
890
|
+
this.modules[v][P] == C ? (w++, w == 5 ? u += e.PENALTY_N1 : w > 5 && u++) : (this.finderPenaltyAddHistory(w, R), C || (u += this.finderPenaltyCountPatterns(R) * e.PENALTY_N3), C = this.modules[v][P], w = 1);
|
|
891
891
|
u += this.finderPenaltyTerminateAndCount(C, w, R) * e.PENALTY_N3;
|
|
892
892
|
}
|
|
893
|
-
for (let
|
|
893
|
+
for (let v = 0; v < this.size; v++) {
|
|
894
894
|
let C = !1, w = 0, R = [0, 0, 0, 0, 0, 0, 0];
|
|
895
895
|
for (let P = 0; P < this.size; P++)
|
|
896
|
-
this.modules[P][
|
|
896
|
+
this.modules[P][v] == C ? (w++, w == 5 ? u += e.PENALTY_N1 : w > 5 && u++) : (this.finderPenaltyAddHistory(w, R), C || (u += this.finderPenaltyCountPatterns(R) * e.PENALTY_N3), C = this.modules[P][v], w = 1);
|
|
897
897
|
u += this.finderPenaltyTerminateAndCount(C, w, R) * e.PENALTY_N3;
|
|
898
898
|
}
|
|
899
|
-
for (let
|
|
899
|
+
for (let v = 0; v < this.size - 1; v++)
|
|
900
900
|
for (let C = 0; C < this.size - 1; C++) {
|
|
901
|
-
const w = this.modules[
|
|
902
|
-
w == this.modules[
|
|
901
|
+
const w = this.modules[v][C];
|
|
902
|
+
w == this.modules[v][C + 1] && w == this.modules[v + 1][C] && w == this.modules[v + 1][C + 1] && (u += e.PENALTY_N2);
|
|
903
903
|
}
|
|
904
904
|
let o = 0;
|
|
905
|
-
for (const
|
|
906
|
-
o =
|
|
907
|
-
const c = this.size * this.size,
|
|
908
|
-
return i(0 <=
|
|
905
|
+
for (const v of this.modules)
|
|
906
|
+
o = v.reduce((C, w) => C + (w ? 1 : 0), o);
|
|
907
|
+
const c = this.size * this.size, b = Math.ceil(Math.abs(o * 20 - c * 10) / c) - 1;
|
|
908
|
+
return i(0 <= b && b <= 9), u += b * e.PENALTY_N4, i(0 <= u && u <= 2568888), u;
|
|
909
909
|
}
|
|
910
910
|
getAlignmentPatternPositions() {
|
|
911
911
|
if (this.version == 1)
|
|
@@ -913,8 +913,8 @@ var St;
|
|
|
913
913
|
{
|
|
914
914
|
const u = Math.floor(this.version / 7) + 2, o = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (u * 2 - 2)) * 2;
|
|
915
915
|
let c = [6];
|
|
916
|
-
for (let
|
|
917
|
-
c.splice(1, 0,
|
|
916
|
+
for (let b = this.size - 7; c.length < u; b -= o)
|
|
917
|
+
c.splice(1, 0, b);
|
|
918
918
|
return c;
|
|
919
919
|
}
|
|
920
920
|
}
|
|
@@ -935,22 +935,22 @@ var St;
|
|
|
935
935
|
if (u < 1 || u > 255)
|
|
936
936
|
throw new RangeError("Degree out of range");
|
|
937
937
|
let o = [];
|
|
938
|
-
for (let
|
|
938
|
+
for (let b = 0; b < u - 1; b++)
|
|
939
939
|
o.push(0);
|
|
940
940
|
o.push(1);
|
|
941
941
|
let c = 1;
|
|
942
|
-
for (let
|
|
943
|
-
for (let
|
|
944
|
-
o[
|
|
942
|
+
for (let b = 0; b < u; b++) {
|
|
943
|
+
for (let v = 0; v < o.length; v++)
|
|
944
|
+
o[v] = e.reedSolomonMultiply(o[v], c), v + 1 < o.length && (o[v] ^= o[v + 1]);
|
|
945
945
|
c = e.reedSolomonMultiply(c, 2);
|
|
946
946
|
}
|
|
947
947
|
return o;
|
|
948
948
|
}
|
|
949
949
|
static reedSolomonComputeRemainder(u, o) {
|
|
950
|
-
let c = o.map((
|
|
951
|
-
for (const
|
|
952
|
-
const
|
|
953
|
-
c.push(0), o.forEach((C, w) => c[w] ^= e.reedSolomonMultiply(C,
|
|
950
|
+
let c = o.map((b) => 0);
|
|
951
|
+
for (const b of u) {
|
|
952
|
+
const v = b ^ c.shift();
|
|
953
|
+
c.push(0), o.forEach((C, w) => c[w] ^= e.reedSolomonMultiply(C, v));
|
|
954
954
|
}
|
|
955
955
|
return c;
|
|
956
956
|
}
|
|
@@ -958,8 +958,8 @@ var St;
|
|
|
958
958
|
if (u >>> 8 || o >>> 8)
|
|
959
959
|
throw new RangeError("Byte out of range");
|
|
960
960
|
let c = 0;
|
|
961
|
-
for (let
|
|
962
|
-
c = c << 1 ^ (c >>> 7) * 285, c ^= (o >>>
|
|
961
|
+
for (let b = 7; b >= 0; b--)
|
|
962
|
+
c = c << 1 ^ (c >>> 7) * 285, c ^= (o >>> b & 1) * u;
|
|
963
963
|
return i(c >>> 8 == 0), c;
|
|
964
964
|
}
|
|
965
965
|
finderPenaltyCountPatterns(u) {
|
|
@@ -990,8 +990,8 @@ var St;
|
|
|
990
990
|
function r(u, o, c) {
|
|
991
991
|
if (o < 0 || o > 31 || u >>> o)
|
|
992
992
|
throw new RangeError("Value out of range");
|
|
993
|
-
for (let
|
|
994
|
-
c.push(u >>>
|
|
993
|
+
for (let b = o - 1; b >= 0; b--)
|
|
994
|
+
c.push(u >>> b & 1);
|
|
995
995
|
}
|
|
996
996
|
function a(u, o) {
|
|
997
997
|
return (u >>> o & 1) != 0;
|
|
@@ -1017,8 +1017,8 @@ var St;
|
|
|
1017
1017
|
throw new RangeError("String contains non-numeric characters");
|
|
1018
1018
|
let o = [];
|
|
1019
1019
|
for (let c = 0; c < u.length; ) {
|
|
1020
|
-
const
|
|
1021
|
-
r(parseInt(u.substr(c,
|
|
1020
|
+
const b = Math.min(u.length - c, 3);
|
|
1021
|
+
r(parseInt(u.substr(c, b), 10), b * 3 + 1, o), c += b;
|
|
1022
1022
|
}
|
|
1023
1023
|
return new y(y.Mode.NUMERIC, u.length, o);
|
|
1024
1024
|
}
|
|
@@ -1027,8 +1027,8 @@ var St;
|
|
|
1027
1027
|
throw new RangeError("String contains unencodable characters in alphanumeric mode");
|
|
1028
1028
|
let o = [], c;
|
|
1029
1029
|
for (c = 0; c + 2 <= u.length; c += 2) {
|
|
1030
|
-
let
|
|
1031
|
-
|
|
1030
|
+
let b = y.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c)) * 45;
|
|
1031
|
+
b += y.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c + 1)), r(b, 11, o);
|
|
1032
1032
|
}
|
|
1033
1033
|
return c < u.length && r(y.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c)), 6, o), new y(y.Mode.ALPHANUMERIC, u.length, o);
|
|
1034
1034
|
}
|
|
@@ -1060,11 +1060,11 @@ var St;
|
|
|
1060
1060
|
}
|
|
1061
1061
|
static getTotalBits(u, o) {
|
|
1062
1062
|
let c = 0;
|
|
1063
|
-
for (const
|
|
1064
|
-
const
|
|
1065
|
-
if (
|
|
1063
|
+
for (const b of u) {
|
|
1064
|
+
const v = b.mode.numCharCountBits(o);
|
|
1065
|
+
if (b.numChars >= 1 << v)
|
|
1066
1066
|
return 1 / 0;
|
|
1067
|
-
c += 4 +
|
|
1067
|
+
c += 4 + v + b.bitData.length;
|
|
1068
1068
|
}
|
|
1069
1069
|
return c;
|
|
1070
1070
|
}
|
|
@@ -1110,13 +1110,13 @@ var tr = St;
|
|
|
1110
1110
|
* Copyright (c) Paul O'Shannessy
|
|
1111
1111
|
* SPDX-License-Identifier: ISC
|
|
1112
1112
|
*/
|
|
1113
|
-
var
|
|
1113
|
+
var ba = {
|
|
1114
1114
|
L: tr.QrCode.Ecc.LOW,
|
|
1115
1115
|
M: tr.QrCode.Ecc.MEDIUM,
|
|
1116
1116
|
Q: tr.QrCode.Ecc.QUARTILE,
|
|
1117
1117
|
H: tr.QrCode.Ecc.HIGH
|
|
1118
|
-
},
|
|
1119
|
-
function
|
|
1118
|
+
}, pa = 128, ya = "L", ga = "#FFFFFF", ma = "#000000", _a = !1, un = 4, Aa = 0.1;
|
|
1119
|
+
function Ea(f, e = 0) {
|
|
1120
1120
|
const t = [];
|
|
1121
1121
|
return f.forEach(function(r, a) {
|
|
1122
1122
|
let i = null;
|
|
@@ -1135,21 +1135,21 @@ function Aa(f, e = 0) {
|
|
|
1135
1135
|
});
|
|
1136
1136
|
}), t.join("");
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function wa(f, e) {
|
|
1139
1139
|
return f.slice().map((t, r) => r < e.y || r >= e.y + e.h ? t : t.map((a, i) => i < e.x || i >= e.x + e.w ? a : !1));
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function Ba(f, e, t, r) {
|
|
1142
1142
|
if (r == null)
|
|
1143
1143
|
return null;
|
|
1144
|
-
const a = t ? un : 0, i = f.length + a * 2, y = Math.floor(e *
|
|
1145
|
-
let
|
|
1144
|
+
const a = t ? un : 0, i = f.length + a * 2, y = Math.floor(e * Aa), x = i / e, u = (r.width || y) * x, o = (r.height || y) * x, c = r.x == null ? f.length / 2 - u / 2 : r.x * x, b = r.y == null ? f.length / 2 - o / 2 : r.y * x;
|
|
1145
|
+
let v = null;
|
|
1146
1146
|
if (r.excavate) {
|
|
1147
|
-
let C = Math.floor(c), w = Math.floor(
|
|
1148
|
-
|
|
1147
|
+
let C = Math.floor(c), w = Math.floor(b), R = Math.ceil(u + c - C), P = Math.ceil(o + b - w);
|
|
1148
|
+
v = { x: C, y: w, w: R, h: P };
|
|
1149
1149
|
}
|
|
1150
|
-
return { x: c, y:
|
|
1150
|
+
return { x: c, y: b, h: o, w: u, excavation: v };
|
|
1151
1151
|
}
|
|
1152
|
-
var
|
|
1152
|
+
var Ca = function() {
|
|
1153
1153
|
try {
|
|
1154
1154
|
new Path2D().addPath(new Path2D());
|
|
1155
1155
|
} catch {
|
|
@@ -1160,14 +1160,14 @@ var Ba = function() {
|
|
|
1160
1160
|
function ln(f) {
|
|
1161
1161
|
const e = f, {
|
|
1162
1162
|
value: t,
|
|
1163
|
-
size: r =
|
|
1164
|
-
level: a =
|
|
1165
|
-
bgColor: i =
|
|
1166
|
-
fgColor: y =
|
|
1167
|
-
includeMargin: x =
|
|
1163
|
+
size: r = pa,
|
|
1164
|
+
level: a = ya,
|
|
1165
|
+
bgColor: i = ga,
|
|
1166
|
+
fgColor: y = ma,
|
|
1167
|
+
includeMargin: x = _a,
|
|
1168
1168
|
style: u,
|
|
1169
1169
|
imageSettings: o
|
|
1170
|
-
} = e, c =
|
|
1170
|
+
} = e, c = va(e, [
|
|
1171
1171
|
"value",
|
|
1172
1172
|
"size",
|
|
1173
1173
|
"level",
|
|
@@ -1176,19 +1176,19 @@ function ln(f) {
|
|
|
1176
1176
|
"includeMargin",
|
|
1177
1177
|
"style",
|
|
1178
1178
|
"imageSettings"
|
|
1179
|
-
]),
|
|
1179
|
+
]), b = o == null ? void 0 : o.src, v = ei(null), C = ei(null), [w, R] = qf(!1);
|
|
1180
1180
|
zt(() => {
|
|
1181
|
-
if (
|
|
1182
|
-
const S =
|
|
1181
|
+
if (v.current != null) {
|
|
1182
|
+
const S = v.current, k = S.getContext("2d");
|
|
1183
1183
|
if (!k)
|
|
1184
1184
|
return;
|
|
1185
|
-
let T = tr.QrCode.encodeText(t,
|
|
1186
|
-
const H = x ? un : 0, $ = T.length + H * 2, K =
|
|
1187
|
-
Q && K.excavation != null && (T =
|
|
1185
|
+
let T = tr.QrCode.encodeText(t, ba[a]).getModules();
|
|
1186
|
+
const H = x ? un : 0, $ = T.length + H * 2, K = Ba(T, r, x, o), X = C.current, Q = K != null && X !== null && X.complete && X.naturalHeight !== 0 && X.naturalWidth !== 0;
|
|
1187
|
+
Q && K.excavation != null && (T = wa(T, K.excavation));
|
|
1188
1188
|
const U = window.devicePixelRatio || 1;
|
|
1189
1189
|
S.height = S.width = r * U;
|
|
1190
1190
|
const A = r / $ * U;
|
|
1191
|
-
k.scale(A, A), k.fillStyle = i, k.fillRect(0, 0, $, $), k.fillStyle = y,
|
|
1191
|
+
k.scale(A, A), k.fillStyle = i, k.fillRect(0, 0, $, $), k.fillStyle = y, Ca ? k.fill(new Path2D(Ea(T, H))) : T.forEach(function(n, d) {
|
|
1192
1192
|
n.forEach(function(g, B) {
|
|
1193
1193
|
g && k.fillRect(B + H, d + H, 1, 1);
|
|
1194
1194
|
});
|
|
@@ -1196,12 +1196,12 @@ function ln(f) {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
}), zt(() => {
|
|
1198
1198
|
R(!1);
|
|
1199
|
-
}, [
|
|
1199
|
+
}, [b]);
|
|
1200
1200
|
const P = ii({ height: r, width: r }, u);
|
|
1201
1201
|
let q = null;
|
|
1202
|
-
return
|
|
1203
|
-
src:
|
|
1204
|
-
key:
|
|
1202
|
+
return b != null && (q = /* @__PURE__ */ nr.createElement("img", {
|
|
1203
|
+
src: b,
|
|
1204
|
+
key: b,
|
|
1205
1205
|
style: { display: "none" },
|
|
1206
1206
|
onLoad: () => {
|
|
1207
1207
|
R(!0);
|
|
@@ -1211,7 +1211,7 @@ function ln(f) {
|
|
|
1211
1211
|
style: P,
|
|
1212
1212
|
height: r,
|
|
1213
1213
|
width: r,
|
|
1214
|
-
ref:
|
|
1214
|
+
ref: v
|
|
1215
1215
|
}, c)), q);
|
|
1216
1216
|
}
|
|
1217
1217
|
var xn = { exports: {} };
|
|
@@ -1219,10 +1219,10 @@ function vn(f) {
|
|
|
1219
1219
|
throw new Error('Could not dynamically require "' + f + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
1220
1220
|
}
|
|
1221
1221
|
var Ir = { exports: {} };
|
|
1222
|
-
const
|
|
1222
|
+
const Ma = {}, Fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1223
1223
|
__proto__: null,
|
|
1224
|
-
default:
|
|
1225
|
-
}, Symbol.toStringTag, { value: "Module" })), mr = /* @__PURE__ */ on(
|
|
1224
|
+
default: Ma
|
|
1225
|
+
}, Symbol.toStringTag, { value: "Module" })), mr = /* @__PURE__ */ on(Fa);
|
|
1226
1226
|
var ni;
|
|
1227
1227
|
function $e() {
|
|
1228
1228
|
return ni || (ni = 1, function(f, e) {
|
|
@@ -1342,7 +1342,7 @@ function $e() {
|
|
|
1342
1342
|
return this.init.prototype.extend(this);
|
|
1343
1343
|
}
|
|
1344
1344
|
};
|
|
1345
|
-
}(),
|
|
1345
|
+
}(), b = o.WordArray = c.extend({
|
|
1346
1346
|
/**
|
|
1347
1347
|
* Initializes a newly created word array.
|
|
1348
1348
|
*
|
|
@@ -1437,9 +1437,9 @@ function $e() {
|
|
|
1437
1437
|
random: function(S) {
|
|
1438
1438
|
for (var k = [], T = 0; T < S; T += 4)
|
|
1439
1439
|
k.push(y());
|
|
1440
|
-
return new
|
|
1440
|
+
return new b.init(k, S);
|
|
1441
1441
|
}
|
|
1442
|
-
}),
|
|
1442
|
+
}), v = u.enc = {}, C = v.Hex = {
|
|
1443
1443
|
/**
|
|
1444
1444
|
* Converts a word array to a hex string.
|
|
1445
1445
|
*
|
|
@@ -1476,9 +1476,9 @@ function $e() {
|
|
|
1476
1476
|
parse: function(S) {
|
|
1477
1477
|
for (var k = S.length, T = [], H = 0; H < k; H += 2)
|
|
1478
1478
|
T[H >>> 3] |= parseInt(S.substr(H, 2), 16) << 24 - H % 8 * 4;
|
|
1479
|
-
return new
|
|
1479
|
+
return new b.init(T, k / 2);
|
|
1480
1480
|
}
|
|
1481
|
-
}, w =
|
|
1481
|
+
}, w = v.Latin1 = {
|
|
1482
1482
|
/**
|
|
1483
1483
|
* Converts a word array to a Latin1 string.
|
|
1484
1484
|
*
|
|
@@ -1515,9 +1515,9 @@ function $e() {
|
|
|
1515
1515
|
parse: function(S) {
|
|
1516
1516
|
for (var k = S.length, T = [], H = 0; H < k; H++)
|
|
1517
1517
|
T[H >>> 2] |= (S.charCodeAt(H) & 255) << 24 - H % 4 * 8;
|
|
1518
|
-
return new
|
|
1518
|
+
return new b.init(T, k);
|
|
1519
1519
|
}
|
|
1520
|
-
}, R =
|
|
1520
|
+
}, R = v.Utf8 = {
|
|
1521
1521
|
/**
|
|
1522
1522
|
* Converts a word array to a UTF-8 string.
|
|
1523
1523
|
*
|
|
@@ -1563,7 +1563,7 @@ function $e() {
|
|
|
1563
1563
|
* bufferedBlockAlgorithm.reset();
|
|
1564
1564
|
*/
|
|
1565
1565
|
reset: function() {
|
|
1566
|
-
this._data = new
|
|
1566
|
+
this._data = new b.init(), this._nDataBytes = 0;
|
|
1567
1567
|
},
|
|
1568
1568
|
/**
|
|
1569
1569
|
* Adds new data to this block algorithm's buffer.
|
|
@@ -1601,7 +1601,7 @@ function $e() {
|
|
|
1601
1601
|
this._doProcessBlock(H, n);
|
|
1602
1602
|
k = H.splice(0, U), T.sigBytes -= A;
|
|
1603
1603
|
}
|
|
1604
|
-
return new
|
|
1604
|
+
return new b.init(k, A);
|
|
1605
1605
|
},
|
|
1606
1606
|
/**
|
|
1607
1607
|
* Creates a copy of this object.
|
|
@@ -1929,11 +1929,11 @@ function _r() {
|
|
|
1929
1929
|
* var x32WordArray = x64WordArray.toX32();
|
|
1930
1930
|
*/
|
|
1931
1931
|
toX32: function() {
|
|
1932
|
-
for (var o = this.words, c = o.length,
|
|
1933
|
-
var C = o[
|
|
1934
|
-
|
|
1932
|
+
for (var o = this.words, c = o.length, b = [], v = 0; v < c; v++) {
|
|
1933
|
+
var C = o[v];
|
|
1934
|
+
b.push(C.high), b.push(C.low);
|
|
1935
1935
|
}
|
|
1936
|
-
return x.create(
|
|
1936
|
+
return x.create(b, this.sigBytes);
|
|
1937
1937
|
},
|
|
1938
1938
|
/**
|
|
1939
1939
|
* Creates a copy of this word array.
|
|
@@ -1945,8 +1945,8 @@ function _r() {
|
|
|
1945
1945
|
* var clone = x64WordArray.clone();
|
|
1946
1946
|
*/
|
|
1947
1947
|
clone: function() {
|
|
1948
|
-
for (var o = y.clone.call(this), c = o.words = this.words.slice(0),
|
|
1949
|
-
c[
|
|
1948
|
+
for (var o = y.clone.call(this), c = o.words = this.words.slice(0), b = c.length, v = 0; v < b; v++)
|
|
1949
|
+
c[v] = c[v].clone();
|
|
1950
1950
|
return o;
|
|
1951
1951
|
}
|
|
1952
1952
|
});
|
|
@@ -1955,7 +1955,7 @@ function _r() {
|
|
|
1955
1955
|
}(Tr)), Tr.exports;
|
|
1956
1956
|
}
|
|
1957
1957
|
var Or = { exports: {} }, si;
|
|
1958
|
-
function
|
|
1958
|
+
function Sa() {
|
|
1959
1959
|
return si || (si = 1, function(f, e) {
|
|
1960
1960
|
(function(t, r) {
|
|
1961
1961
|
f.exports = r($e());
|
|
@@ -1964,8 +1964,8 @@ function Fa() {
|
|
|
1964
1964
|
if (typeof ArrayBuffer == "function") {
|
|
1965
1965
|
var r = t, a = r.lib, i = a.WordArray, y = i.init, x = i.init = function(u) {
|
|
1966
1966
|
if (u instanceof ArrayBuffer && (u = new Uint8Array(u)), (u instanceof Int8Array || typeof Uint8ClampedArray < "u" && u instanceof Uint8ClampedArray || u instanceof Int16Array || u instanceof Uint16Array || u instanceof Int32Array || u instanceof Uint32Array || u instanceof Float32Array || u instanceof Float64Array) && (u = new Uint8Array(u.buffer, u.byteOffset, u.byteLength)), u instanceof Uint8Array) {
|
|
1967
|
-
for (var o = u.byteLength, c = [],
|
|
1968
|
-
c[
|
|
1967
|
+
for (var o = u.byteLength, c = [], b = 0; b < o; b++)
|
|
1968
|
+
c[b >>> 2] |= u[b] << 24 - b % 4 * 8;
|
|
1969
1969
|
y.call(this, c, o);
|
|
1970
1970
|
} else
|
|
1971
1971
|
y.apply(this, arguments);
|
|
@@ -1977,7 +1977,7 @@ function Fa() {
|
|
|
1977
1977
|
}(Or)), Or.exports;
|
|
1978
1978
|
}
|
|
1979
1979
|
var zr = { exports: {} }, oi;
|
|
1980
|
-
function
|
|
1980
|
+
function Da() {
|
|
1981
1981
|
return oi || (oi = 1, function(f, e) {
|
|
1982
1982
|
(function(t, r) {
|
|
1983
1983
|
f.exports = r($e());
|
|
@@ -1999,11 +1999,11 @@ function Sa() {
|
|
|
1999
1999
|
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
|
|
2000
2000
|
*/
|
|
2001
2001
|
stringify: function(u) {
|
|
2002
|
-
for (var o = u.words, c = u.sigBytes,
|
|
2003
|
-
var C = o[
|
|
2004
|
-
|
|
2002
|
+
for (var o = u.words, c = u.sigBytes, b = [], v = 0; v < c; v += 2) {
|
|
2003
|
+
var C = o[v >>> 2] >>> 16 - v % 4 * 8 & 65535;
|
|
2004
|
+
b.push(String.fromCharCode(C));
|
|
2005
2005
|
}
|
|
2006
|
-
return
|
|
2006
|
+
return b.join("");
|
|
2007
2007
|
},
|
|
2008
2008
|
/**
|
|
2009
2009
|
* Converts a UTF-16 BE string to a word array.
|
|
@@ -2019,8 +2019,8 @@ function Sa() {
|
|
|
2019
2019
|
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
|
|
2020
2020
|
*/
|
|
2021
2021
|
parse: function(u) {
|
|
2022
|
-
for (var o = u.length, c = [],
|
|
2023
|
-
c[
|
|
2022
|
+
for (var o = u.length, c = [], b = 0; b < o; b++)
|
|
2023
|
+
c[b >>> 1] |= u.charCodeAt(b) << 16 - b % 2 * 16;
|
|
2024
2024
|
return i.create(c, o * 2);
|
|
2025
2025
|
}
|
|
2026
2026
|
}, y.Utf16LE = {
|
|
@@ -2038,11 +2038,11 @@ function Sa() {
|
|
|
2038
2038
|
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
|
|
2039
2039
|
*/
|
|
2040
2040
|
stringify: function(u) {
|
|
2041
|
-
for (var o = u.words, c = u.sigBytes,
|
|
2042
|
-
var C = x(o[
|
|
2043
|
-
|
|
2041
|
+
for (var o = u.words, c = u.sigBytes, b = [], v = 0; v < c; v += 2) {
|
|
2042
|
+
var C = x(o[v >>> 2] >>> 16 - v % 4 * 8 & 65535);
|
|
2043
|
+
b.push(String.fromCharCode(C));
|
|
2044
2044
|
}
|
|
2045
|
-
return
|
|
2045
|
+
return b.join("");
|
|
2046
2046
|
},
|
|
2047
2047
|
/**
|
|
2048
2048
|
* Converts a UTF-16 LE string to a word array.
|
|
@@ -2058,8 +2058,8 @@ function Sa() {
|
|
|
2058
2058
|
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
|
|
2059
2059
|
*/
|
|
2060
2060
|
parse: function(u) {
|
|
2061
|
-
for (var o = u.length, c = [],
|
|
2062
|
-
c[
|
|
2061
|
+
for (var o = u.length, c = [], b = 0; b < o; b++)
|
|
2062
|
+
c[b >>> 1] |= x(u.charCodeAt(b) << 16 - b % 2 * 16);
|
|
2063
2063
|
return i.create(c, o * 2);
|
|
2064
2064
|
}
|
|
2065
2065
|
};
|
|
@@ -2093,16 +2093,16 @@ function Rt() {
|
|
|
2093
2093
|
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
2094
2094
|
*/
|
|
2095
2095
|
stringify: function(u) {
|
|
2096
|
-
var o = u.words, c = u.sigBytes,
|
|
2096
|
+
var o = u.words, c = u.sigBytes, b = this._map;
|
|
2097
2097
|
u.clamp();
|
|
2098
|
-
for (var
|
|
2098
|
+
for (var v = [], C = 0; C < c; C += 3)
|
|
2099
2099
|
for (var w = o[C >>> 2] >>> 24 - C % 4 * 8 & 255, R = o[C + 1 >>> 2] >>> 24 - (C + 1) % 4 * 8 & 255, P = o[C + 2 >>> 2] >>> 24 - (C + 2) % 4 * 8 & 255, q = w << 16 | R << 8 | P, S = 0; S < 4 && C + S * 0.75 < c; S++)
|
|
2100
|
-
|
|
2101
|
-
var k =
|
|
2100
|
+
v.push(b.charAt(q >>> 6 * (3 - S) & 63));
|
|
2101
|
+
var k = b.charAt(64);
|
|
2102
2102
|
if (k)
|
|
2103
|
-
for (;
|
|
2104
|
-
|
|
2105
|
-
return
|
|
2103
|
+
for (; v.length % 4; )
|
|
2104
|
+
v.push(k);
|
|
2105
|
+
return v.join("");
|
|
2106
2106
|
},
|
|
2107
2107
|
/**
|
|
2108
2108
|
* Converts a Base64 string to a word array.
|
|
@@ -2118,35 +2118,35 @@ function Rt() {
|
|
|
2118
2118
|
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
2119
2119
|
*/
|
|
2120
2120
|
parse: function(u) {
|
|
2121
|
-
var o = u.length, c = this._map,
|
|
2122
|
-
if (!
|
|
2123
|
-
|
|
2124
|
-
for (var
|
|
2125
|
-
|
|
2121
|
+
var o = u.length, c = this._map, b = this._reverseMap;
|
|
2122
|
+
if (!b) {
|
|
2123
|
+
b = this._reverseMap = [];
|
|
2124
|
+
for (var v = 0; v < c.length; v++)
|
|
2125
|
+
b[c.charCodeAt(v)] = v;
|
|
2126
2126
|
}
|
|
2127
2127
|
var C = c.charAt(64);
|
|
2128
2128
|
if (C) {
|
|
2129
2129
|
var w = u.indexOf(C);
|
|
2130
2130
|
w !== -1 && (o = w);
|
|
2131
2131
|
}
|
|
2132
|
-
return x(u, o,
|
|
2132
|
+
return x(u, o, b);
|
|
2133
2133
|
},
|
|
2134
2134
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
2135
2135
|
};
|
|
2136
2136
|
function x(u, o, c) {
|
|
2137
|
-
for (var
|
|
2137
|
+
for (var b = [], v = 0, C = 0; C < o; C++)
|
|
2138
2138
|
if (C % 4) {
|
|
2139
2139
|
var w = c[u.charCodeAt(C - 1)] << C % 4 * 2, R = c[u.charCodeAt(C)] >>> 6 - C % 4 * 2, P = w | R;
|
|
2140
|
-
v
|
|
2140
|
+
b[v >>> 2] |= P << 24 - v % 4 * 8, v++;
|
|
2141
2141
|
}
|
|
2142
|
-
return i.create(
|
|
2142
|
+
return i.create(b, v);
|
|
2143
2143
|
}
|
|
2144
2144
|
}(), t.enc.Base64;
|
|
2145
2145
|
});
|
|
2146
2146
|
}(qr)), qr.exports;
|
|
2147
2147
|
}
|
|
2148
2148
|
var Nr = { exports: {} }, di;
|
|
2149
|
-
function
|
|
2149
|
+
function Ra() {
|
|
2150
2150
|
return di || (di = 1, function(f, e) {
|
|
2151
2151
|
(function(t, r) {
|
|
2152
2152
|
f.exports = r($e());
|
|
@@ -2171,12 +2171,12 @@ function Da() {
|
|
|
2171
2171
|
*/
|
|
2172
2172
|
stringify: function(u, o) {
|
|
2173
2173
|
o === void 0 && (o = !0);
|
|
2174
|
-
var c = u.words,
|
|
2174
|
+
var c = u.words, b = u.sigBytes, v = o ? this._safe_map : this._map;
|
|
2175
2175
|
u.clamp();
|
|
2176
|
-
for (var C = [], w = 0; w <
|
|
2177
|
-
for (var R = c[w >>> 2] >>> 24 - w % 4 * 8 & 255, P = c[w + 1 >>> 2] >>> 24 - (w + 1) % 4 * 8 & 255, q = c[w + 2 >>> 2] >>> 24 - (w + 2) % 4 * 8 & 255, S = R << 16 | P << 8 | q, k = 0; k < 4 && w + k * 0.75 <
|
|
2178
|
-
C.push(
|
|
2179
|
-
var T =
|
|
2176
|
+
for (var C = [], w = 0; w < b; w += 3)
|
|
2177
|
+
for (var R = c[w >>> 2] >>> 24 - w % 4 * 8 & 255, P = c[w + 1 >>> 2] >>> 24 - (w + 1) % 4 * 8 & 255, q = c[w + 2 >>> 2] >>> 24 - (w + 2) % 4 * 8 & 255, S = R << 16 | P << 8 | q, k = 0; k < 4 && w + k * 0.75 < b; k++)
|
|
2178
|
+
C.push(v.charAt(S >>> 6 * (3 - k) & 63));
|
|
2179
|
+
var T = v.charAt(64);
|
|
2180
2180
|
if (T)
|
|
2181
2181
|
for (; C.length % 4; )
|
|
2182
2182
|
C.push(T);
|
|
@@ -2199,29 +2199,29 @@ function Da() {
|
|
|
2199
2199
|
*/
|
|
2200
2200
|
parse: function(u, o) {
|
|
2201
2201
|
o === void 0 && (o = !0);
|
|
2202
|
-
var c = u.length,
|
|
2203
|
-
if (!
|
|
2204
|
-
|
|
2205
|
-
for (var C = 0; C <
|
|
2206
|
-
b
|
|
2202
|
+
var c = u.length, b = o ? this._safe_map : this._map, v = this._reverseMap;
|
|
2203
|
+
if (!v) {
|
|
2204
|
+
v = this._reverseMap = [];
|
|
2205
|
+
for (var C = 0; C < b.length; C++)
|
|
2206
|
+
v[b.charCodeAt(C)] = C;
|
|
2207
2207
|
}
|
|
2208
|
-
var w =
|
|
2208
|
+
var w = b.charAt(64);
|
|
2209
2209
|
if (w) {
|
|
2210
2210
|
var R = u.indexOf(w);
|
|
2211
2211
|
R !== -1 && (c = R);
|
|
2212
2212
|
}
|
|
2213
|
-
return x(u, c,
|
|
2213
|
+
return x(u, c, v);
|
|
2214
2214
|
},
|
|
2215
2215
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
2216
2216
|
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
|
2217
2217
|
};
|
|
2218
2218
|
function x(u, o, c) {
|
|
2219
|
-
for (var
|
|
2219
|
+
for (var b = [], v = 0, C = 0; C < o; C++)
|
|
2220
2220
|
if (C % 4) {
|
|
2221
2221
|
var w = c[u.charCodeAt(C - 1)] << C % 4 * 2, R = c[u.charCodeAt(C)] >>> 6 - C % 4 * 2, P = w | R;
|
|
2222
|
-
v
|
|
2222
|
+
b[v >>> 2] |= P << 24 - v % 4 * 8, v++;
|
|
2223
2223
|
}
|
|
2224
|
-
return i.create(
|
|
2224
|
+
return i.create(b, v);
|
|
2225
2225
|
}
|
|
2226
2226
|
}(), t.enc.Base64url;
|
|
2227
2227
|
});
|
|
@@ -2254,7 +2254,7 @@ function Pt() {
|
|
|
2254
2254
|
R[S] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
2255
2255
|
}
|
|
2256
2256
|
var T = this._hash.words, H = R[P + 0], $ = R[P + 1], K = R[P + 2], X = R[P + 3], Q = R[P + 4], U = R[P + 5], A = R[P + 6], n = R[P + 7], d = R[P + 8], g = R[P + 9], B = R[P + 10], F = R[P + 11], z = R[P + 12], N = R[P + 13], D = R[P + 14], h = R[P + 15], E = T[0], j = T[1], Y = T[2], W = T[3];
|
|
2257
|
-
E =
|
|
2257
|
+
E = b(E, j, Y, W, H, 7, o[0]), W = b(W, E, j, Y, $, 12, o[1]), Y = b(Y, W, E, j, K, 17, o[2]), j = b(j, Y, W, E, X, 22, o[3]), E = b(E, j, Y, W, Q, 7, o[4]), W = b(W, E, j, Y, U, 12, o[5]), Y = b(Y, W, E, j, A, 17, o[6]), j = b(j, Y, W, E, n, 22, o[7]), E = b(E, j, Y, W, d, 7, o[8]), W = b(W, E, j, Y, g, 12, o[9]), Y = b(Y, W, E, j, B, 17, o[10]), j = b(j, Y, W, E, F, 22, o[11]), E = b(E, j, Y, W, z, 7, o[12]), W = b(W, E, j, Y, N, 12, o[13]), Y = b(Y, W, E, j, D, 17, o[14]), j = b(j, Y, W, E, h, 22, o[15]), E = v(E, j, Y, W, $, 5, o[16]), W = v(W, E, j, Y, A, 9, o[17]), Y = v(Y, W, E, j, F, 14, o[18]), j = v(j, Y, W, E, H, 20, o[19]), E = v(E, j, Y, W, U, 5, o[20]), W = v(W, E, j, Y, B, 9, o[21]), Y = v(Y, W, E, j, h, 14, o[22]), j = v(j, Y, W, E, Q, 20, o[23]), E = v(E, j, Y, W, g, 5, o[24]), W = v(W, E, j, Y, D, 9, o[25]), Y = v(Y, W, E, j, X, 14, o[26]), j = v(j, Y, W, E, d, 20, o[27]), E = v(E, j, Y, W, N, 5, o[28]), W = v(W, E, j, Y, K, 9, o[29]), Y = v(Y, W, E, j, n, 14, o[30]), j = v(j, Y, W, E, z, 20, o[31]), E = C(E, j, Y, W, U, 4, o[32]), W = C(W, E, j, Y, d, 11, o[33]), Y = C(Y, W, E, j, F, 16, o[34]), j = C(j, Y, W, E, D, 23, o[35]), E = C(E, j, Y, W, $, 4, o[36]), W = C(W, E, j, Y, Q, 11, o[37]), Y = C(Y, W, E, j, n, 16, o[38]), j = C(j, Y, W, E, B, 23, o[39]), E = C(E, j, Y, W, N, 4, o[40]), W = C(W, E, j, Y, H, 11, o[41]), Y = C(Y, W, E, j, X, 16, o[42]), j = C(j, Y, W, E, A, 23, o[43]), E = C(E, j, Y, W, g, 4, o[44]), W = C(W, E, j, Y, z, 11, o[45]), Y = C(Y, W, E, j, h, 16, o[46]), j = C(j, Y, W, E, K, 23, o[47]), E = w(E, j, Y, W, H, 6, o[48]), W = w(W, E, j, Y, n, 10, o[49]), Y = w(Y, W, E, j, D, 15, o[50]), j = w(j, Y, W, E, U, 21, o[51]), E = w(E, j, Y, W, z, 6, o[52]), W = w(W, E, j, Y, X, 10, o[53]), Y = w(Y, W, E, j, B, 15, o[54]), j = w(j, Y, W, E, $, 21, o[55]), E = w(E, j, Y, W, d, 6, o[56]), W = w(W, E, j, Y, h, 10, o[57]), Y = w(Y, W, E, j, A, 15, o[58]), j = w(j, Y, W, E, N, 21, o[59]), E = w(E, j, Y, W, Q, 6, o[60]), W = w(W, E, j, Y, F, 10, o[61]), Y = w(Y, W, E, j, K, 15, o[62]), j = w(j, Y, W, E, g, 21, o[63]), T[0] = T[0] + E | 0, T[1] = T[1] + j | 0, T[2] = T[2] + Y | 0, T[3] = T[3] + W | 0;
|
|
2258
2258
|
},
|
|
2259
2259
|
_doFinalize: function() {
|
|
2260
2260
|
var R = this._data, P = R.words, q = this._nDataBytes * 8, S = R.sigBytes * 8;
|
|
@@ -2272,11 +2272,11 @@ function Pt() {
|
|
|
2272
2272
|
return R._hash = this._hash.clone(), R;
|
|
2273
2273
|
}
|
|
2274
2274
|
});
|
|
2275
|
-
function
|
|
2275
|
+
function b(R, P, q, S, k, T, H) {
|
|
2276
2276
|
var $ = R + (P & q | ~P & S) + k + H;
|
|
2277
2277
|
return ($ << T | $ >>> 32 - T) + P;
|
|
2278
2278
|
}
|
|
2279
|
-
function
|
|
2279
|
+
function v(R, P, q, S, k, T, H) {
|
|
2280
2280
|
var $ = R + (P & S | q & ~S) + k + H;
|
|
2281
2281
|
return ($ << T | $ >>> 32 - T) + P;
|
|
2282
2282
|
}
|
|
@@ -2310,10 +2310,10 @@ function bn() {
|
|
|
2310
2310
|
3285377520
|
|
2311
2311
|
]);
|
|
2312
2312
|
},
|
|
2313
|
-
_doProcessBlock: function(c,
|
|
2314
|
-
for (var
|
|
2313
|
+
_doProcessBlock: function(c, b) {
|
|
2314
|
+
for (var v = this._hash.words, C = v[0], w = v[1], R = v[2], P = v[3], q = v[4], S = 0; S < 80; S++) {
|
|
2315
2315
|
if (S < 16)
|
|
2316
|
-
u[S] = c[
|
|
2316
|
+
u[S] = c[b + S] | 0;
|
|
2317
2317
|
else {
|
|
2318
2318
|
var k = u[S - 3] ^ u[S - 8] ^ u[S - 14] ^ u[S - 16];
|
|
2319
2319
|
u[S] = k << 1 | k >>> 31;
|
|
@@ -2321,11 +2321,11 @@ function bn() {
|
|
|
2321
2321
|
var T = (C << 5 | C >>> 27) + q + u[S];
|
|
2322
2322
|
S < 20 ? T += (w & R | ~w & P) + 1518500249 : S < 40 ? T += (w ^ R ^ P) + 1859775393 : S < 60 ? T += (w & R | w & P | R & P) - 1894007588 : T += (w ^ R ^ P) - 899497514, q = P, P = R, R = w << 30 | w >>> 2, w = C, C = T;
|
|
2323
2323
|
}
|
|
2324
|
-
|
|
2324
|
+
v[0] = v[0] + C | 0, v[1] = v[1] + w | 0, v[2] = v[2] + R | 0, v[3] = v[3] + P | 0, v[4] = v[4] + q | 0;
|
|
2325
2325
|
},
|
|
2326
2326
|
_doFinalize: function() {
|
|
2327
|
-
var c = this._data,
|
|
2328
|
-
return
|
|
2327
|
+
var c = this._data, b = c.words, v = this._nDataBytes * 8, C = c.sigBytes * 8;
|
|
2328
|
+
return b[C >>> 5] |= 128 << 24 - C % 32, b[(C + 64 >>> 9 << 4) + 14] = Math.floor(v / 4294967296), b[(C + 64 >>> 9 << 4) + 15] = v, c.sigBytes = b.length * 4, this._process(), this._hash;
|
|
2329
2329
|
},
|
|
2330
2330
|
clone: function() {
|
|
2331
2331
|
var c = y.clone.call(this);
|
|
@@ -2358,19 +2358,19 @@ function Nf() {
|
|
|
2358
2358
|
for (var R = 2, P = 0; P < 64; )
|
|
2359
2359
|
C(R) && (P < 8 && (o[P] = w(r.pow(R, 1 / 2))), c[P] = w(r.pow(R, 1 / 3)), P++), R++;
|
|
2360
2360
|
})();
|
|
2361
|
-
var
|
|
2361
|
+
var b = [], v = u.SHA256 = x.extend({
|
|
2362
2362
|
_doReset: function() {
|
|
2363
2363
|
this._hash = new y.init(o.slice(0));
|
|
2364
2364
|
},
|
|
2365
2365
|
_doProcessBlock: function(C, w) {
|
|
2366
2366
|
for (var R = this._hash.words, P = R[0], q = R[1], S = R[2], k = R[3], T = R[4], H = R[5], $ = R[6], K = R[7], X = 0; X < 64; X++) {
|
|
2367
2367
|
if (X < 16)
|
|
2368
|
-
|
|
2368
|
+
b[X] = C[w + X] | 0;
|
|
2369
2369
|
else {
|
|
2370
|
-
var Q =
|
|
2371
|
-
|
|
2370
|
+
var Q = b[X - 15], U = (Q << 25 | Q >>> 7) ^ (Q << 14 | Q >>> 18) ^ Q >>> 3, A = b[X - 2], n = (A << 15 | A >>> 17) ^ (A << 13 | A >>> 19) ^ A >>> 10;
|
|
2371
|
+
b[X] = U + b[X - 7] + n + b[X - 16];
|
|
2372
2372
|
}
|
|
2373
|
-
var d = T & H ^ ~T & $, g = P & q ^ P & S ^ q & S, B = (P << 30 | P >>> 2) ^ (P << 19 | P >>> 13) ^ (P << 10 | P >>> 22), F = (T << 26 | T >>> 6) ^ (T << 21 | T >>> 11) ^ (T << 7 | T >>> 25), z = K + F + d + c[X] +
|
|
2373
|
+
var d = T & H ^ ~T & $, g = P & q ^ P & S ^ q & S, B = (P << 30 | P >>> 2) ^ (P << 19 | P >>> 13) ^ (P << 10 | P >>> 22), F = (T << 26 | T >>> 6) ^ (T << 21 | T >>> 11) ^ (T << 7 | T >>> 25), z = K + F + d + c[X] + b[X], N = B + g;
|
|
2374
2374
|
K = $, $ = H, H = T, T = k + z | 0, k = S, S = q, q = P, P = z + N | 0;
|
|
2375
2375
|
}
|
|
2376
2376
|
R[0] = R[0] + P | 0, R[1] = R[1] + q | 0, R[2] = R[2] + S | 0, R[3] = R[3] + k | 0, R[4] = R[4] + T | 0, R[5] = R[5] + H | 0, R[6] = R[6] + $ | 0, R[7] = R[7] + K | 0;
|
|
@@ -2384,13 +2384,13 @@ function Nf() {
|
|
|
2384
2384
|
return C._hash = this._hash.clone(), C;
|
|
2385
2385
|
}
|
|
2386
2386
|
});
|
|
2387
|
-
a.SHA256 = x._createHelper(
|
|
2387
|
+
a.SHA256 = x._createHelper(v), a.HmacSHA256 = x._createHmacHelper(v);
|
|
2388
2388
|
}(Math), t.SHA256;
|
|
2389
2389
|
});
|
|
2390
2390
|
}(Ur)), Ur.exports;
|
|
2391
2391
|
}
|
|
2392
2392
|
var $r = { exports: {} }, xi;
|
|
2393
|
-
function
|
|
2393
|
+
function Pa() {
|
|
2394
2394
|
return xi || (xi = 1, function(f, e) {
|
|
2395
2395
|
(function(t, r, a) {
|
|
2396
2396
|
f.exports = r($e(), Nf());
|
|
@@ -2430,7 +2430,7 @@ function pn() {
|
|
|
2430
2430
|
function c() {
|
|
2431
2431
|
return x.create.apply(x, arguments);
|
|
2432
2432
|
}
|
|
2433
|
-
var
|
|
2433
|
+
var b = [
|
|
2434
2434
|
c(1116352408, 3609767458),
|
|
2435
2435
|
c(1899447441, 602891725),
|
|
2436
2436
|
c(3049323471, 3964484399),
|
|
@@ -2511,10 +2511,10 @@ function pn() {
|
|
|
2511
2511
|
c(1501505948, 4234509866),
|
|
2512
2512
|
c(1607167915, 987167468),
|
|
2513
2513
|
c(1816402316, 1246189591)
|
|
2514
|
-
],
|
|
2514
|
+
], v = [];
|
|
2515
2515
|
(function() {
|
|
2516
2516
|
for (var w = 0; w < 80; w++)
|
|
2517
|
-
|
|
2517
|
+
v[w] = c();
|
|
2518
2518
|
})();
|
|
2519
2519
|
var C = o.SHA512 = i.extend({
|
|
2520
2520
|
_doReset: function() {
|
|
@@ -2531,14 +2531,14 @@ function pn() {
|
|
|
2531
2531
|
},
|
|
2532
2532
|
_doProcessBlock: function(w, R) {
|
|
2533
2533
|
for (var P = this._hash.words, q = P[0], S = P[1], k = P[2], T = P[3], H = P[4], $ = P[5], K = P[6], X = P[7], Q = q.high, U = q.low, A = S.high, n = S.low, d = k.high, g = k.low, B = T.high, F = T.low, z = H.high, N = H.low, D = $.high, h = $.low, E = K.high, j = K.low, Y = X.high, W = X.low, re = Q, ce = U, we = A, Ae = n, Me = d, Fe = g, Z0 = B, We = F, Oe = z, _0 = N, Ge = D, Ye = h, $0 = E, Qe = j, ze = Y, O0 = W, qe = 0; qe < 80; qe++) {
|
|
2534
|
-
var Se, F0, Je =
|
|
2534
|
+
var Se, F0, Je = v[qe];
|
|
2535
2535
|
if (qe < 16)
|
|
2536
2536
|
F0 = Je.high = w[R + qe * 2] | 0, Se = Je.low = w[R + qe * 2 + 1] | 0;
|
|
2537
2537
|
else {
|
|
2538
|
-
var f0 =
|
|
2538
|
+
var f0 = v[qe - 15], S0 = f0.high, Ne = f0.low, u0 = (S0 >>> 1 | Ne << 31) ^ (S0 >>> 8 | Ne << 24) ^ S0 >>> 7, G0 = (Ne >>> 1 | S0 << 31) ^ (Ne >>> 8 | S0 << 24) ^ (Ne >>> 7 | S0 << 25), l0 = v[qe - 2], He = l0.high, z0 = l0.low, a0 = (He >>> 19 | z0 << 13) ^ (He << 3 | z0 >>> 29) ^ He >>> 6, r0 = (z0 >>> 19 | He << 13) ^ (z0 << 3 | He >>> 29) ^ (z0 >>> 6 | He << 26), q0 = v[qe - 7], i0 = q0.high, s0 = q0.low, W0 = v[qe - 16], e0 = W0.high, n0 = W0.low;
|
|
2539
2539
|
Se = G0 + s0, F0 = u0 + i0 + (Se >>> 0 < G0 >>> 0 ? 1 : 0), Se = Se + r0, F0 = F0 + a0 + (Se >>> 0 < r0 >>> 0 ? 1 : 0), Se = Se + n0, F0 = F0 + e0 + (Se >>> 0 < n0 >>> 0 ? 1 : 0), Je.high = F0, Je.low = Se;
|
|
2540
2540
|
}
|
|
2541
|
-
var N0 = Oe & Ge ^ ~Oe & $0, o0 = _0 & Ye ^ ~_0 & Qe, x0 = re & we ^ re & Me ^ we & Me, D0 = ce & Ae ^ ce & Fe ^ Ae & Fe, t0 = (re >>> 28 | ce << 4) ^ (re << 30 | ce >>> 2) ^ (re << 25 | ce >>> 7), Ve = (ce >>> 28 | re << 4) ^ (ce << 30 | re >>> 2) ^ (ce << 25 | re >>> 7), tt = (Oe >>> 14 | _0 << 18) ^ (Oe >>> 18 | _0 << 14) ^ (Oe << 23 | _0 >>> 9), c0 = (_0 >>> 14 | Oe << 18) ^ (_0 >>> 18 | Oe << 14) ^ (_0 << 23 | Oe >>> 9), d0 =
|
|
2541
|
+
var N0 = Oe & Ge ^ ~Oe & $0, o0 = _0 & Ye ^ ~_0 & Qe, x0 = re & we ^ re & Me ^ we & Me, D0 = ce & Ae ^ ce & Fe ^ Ae & Fe, t0 = (re >>> 28 | ce << 4) ^ (re << 30 | ce >>> 2) ^ (re << 25 | ce >>> 7), Ve = (ce >>> 28 | re << 4) ^ (ce << 30 | re >>> 2) ^ (ce << 25 | re >>> 7), tt = (Oe >>> 14 | _0 << 18) ^ (Oe >>> 18 | _0 << 14) ^ (Oe << 23 | _0 >>> 9), c0 = (_0 >>> 14 | Oe << 18) ^ (_0 >>> 18 | Oe << 14) ^ (_0 << 23 | Oe >>> 9), d0 = b[qe], yt = d0.high, Ie = d0.low, Re = O0 + c0, l = ze + tt + (Re >>> 0 < O0 >>> 0 ? 1 : 0), Re = Re + o0, l = l + N0 + (Re >>> 0 < o0 >>> 0 ? 1 : 0), Re = Re + Ie, l = l + yt + (Re >>> 0 < Ie >>> 0 ? 1 : 0), Re = Re + Se, l = l + F0 + (Re >>> 0 < Se >>> 0 ? 1 : 0), _ = Ve + D0, m = t0 + x0 + (_ >>> 0 < Ve >>> 0 ? 1 : 0);
|
|
2542
2542
|
ze = $0, O0 = Qe, $0 = Ge, Qe = Ye, Ge = Oe, Ye = _0, _0 = We + Re | 0, Oe = Z0 + l + (_0 >>> 0 < We >>> 0 ? 1 : 0) | 0, Z0 = Me, We = Fe, Me = we, Fe = Ae, we = re, Ae = ce, ce = Re + _ | 0, re = l + m + (ce >>> 0 < Re >>> 0 ? 1 : 0) | 0;
|
|
2543
2543
|
}
|
|
2544
2544
|
U = q.low = U + ce, q.high = Q + re + (U >>> 0 < ce >>> 0 ? 1 : 0), n = S.low = n + Ae, S.high = A + we + (n >>> 0 < Ae >>> 0 ? 1 : 0), g = k.low = g + Fe, k.high = d + Me + (g >>> 0 < Fe >>> 0 ? 1 : 0), F = T.low = F + We, T.high = B + Z0 + (F >>> 0 < We >>> 0 ? 1 : 0), N = H.low = N + _0, H.high = z + Oe + (N >>> 0 < _0 >>> 0 ? 1 : 0), h = $.low = h + Ye, $.high = D + Ge + (h >>> 0 < Ye >>> 0 ? 1 : 0), j = K.low = j + Qe, K.high = E + $0 + (j >>> 0 < Qe >>> 0 ? 1 : 0), W = X.low = W + O0, X.high = Y + ze + (W >>> 0 < O0 >>> 0 ? 1 : 0);
|
|
@@ -2561,7 +2561,7 @@ function pn() {
|
|
|
2561
2561
|
}(Wr)), Wr.exports;
|
|
2562
2562
|
}
|
|
2563
2563
|
var Yr = { exports: {} }, bi;
|
|
2564
|
-
function
|
|
2564
|
+
function ka() {
|
|
2565
2565
|
return bi || (bi = 1, function(f, e) {
|
|
2566
2566
|
(function(t, r, a) {
|
|
2567
2567
|
f.exports = r($e(), _r(), pn());
|
|
@@ -2591,22 +2591,22 @@ function Pa() {
|
|
|
2591
2591
|
}(Yr)), Yr.exports;
|
|
2592
2592
|
}
|
|
2593
2593
|
var Kr = { exports: {} }, pi;
|
|
2594
|
-
function
|
|
2594
|
+
function Ia() {
|
|
2595
2595
|
return pi || (pi = 1, function(f, e) {
|
|
2596
2596
|
(function(t, r, a) {
|
|
2597
2597
|
f.exports = r($e(), _r());
|
|
2598
2598
|
})(ke, function(t) {
|
|
2599
2599
|
return function(r) {
|
|
2600
|
-
var a = t, i = a.lib, y = i.WordArray, x = i.Hasher, u = a.x64, o = u.Word, c = a.algo,
|
|
2600
|
+
var a = t, i = a.lib, y = i.WordArray, x = i.Hasher, u = a.x64, o = u.Word, c = a.algo, b = [], v = [], C = [];
|
|
2601
2601
|
(function() {
|
|
2602
2602
|
for (var P = 1, q = 0, S = 0; S < 24; S++) {
|
|
2603
|
-
|
|
2603
|
+
b[P + 5 * q] = (S + 1) * (S + 2) / 2 % 64;
|
|
2604
2604
|
var k = q % 5, T = (2 * P + 3 * q) % 5;
|
|
2605
2605
|
P = k, q = T;
|
|
2606
2606
|
}
|
|
2607
2607
|
for (var P = 0; P < 5; P++)
|
|
2608
2608
|
for (var q = 0; q < 5; q++)
|
|
2609
|
-
|
|
2609
|
+
v[P + 5 * q] = q + (2 * P + 3 * q) % 5 * 5;
|
|
2610
2610
|
for (var H = 1, $ = 0; $ < 24; $++) {
|
|
2611
2611
|
for (var K = 0, X = 0, Q = 0; Q < 7; Q++) {
|
|
2612
2612
|
if (H & 1) {
|
|
@@ -2662,9 +2662,9 @@ function ka() {
|
|
|
2662
2662
|
K.high ^= U, K.low ^= A;
|
|
2663
2663
|
}
|
|
2664
2664
|
for (var N = 1; N < 25; N++) {
|
|
2665
|
-
var U, A, K = S[N], D = K.high, h = K.low, E =
|
|
2665
|
+
var U, A, K = S[N], D = K.high, h = K.low, E = b[N];
|
|
2666
2666
|
E < 32 ? (U = D << E | h >>> 32 - E, A = h << E | D >>> 32 - E) : (U = h << E - 32 | D >>> 64 - E, A = D << E - 32 | h >>> 64 - E);
|
|
2667
|
-
var j = w[
|
|
2667
|
+
var j = w[v[N]];
|
|
2668
2668
|
j.high = U, j.low = A;
|
|
2669
2669
|
}
|
|
2670
2670
|
var Y = w[0], W = S[0];
|
|
@@ -2701,7 +2701,7 @@ function ka() {
|
|
|
2701
2701
|
}(Kr)), Kr.exports;
|
|
2702
2702
|
}
|
|
2703
2703
|
var jr = { exports: {} }, yi;
|
|
2704
|
-
function
|
|
2704
|
+
function Ta() {
|
|
2705
2705
|
return yi || (yi = 1, function(f, e) {
|
|
2706
2706
|
(function(t, r) {
|
|
2707
2707
|
f.exports = r($e());
|
|
@@ -2879,7 +2879,7 @@ function Ia() {
|
|
|
2879
2879
|
3,
|
|
2880
2880
|
9,
|
|
2881
2881
|
11
|
|
2882
|
-
]),
|
|
2882
|
+
]), b = y.create([
|
|
2883
2883
|
11,
|
|
2884
2884
|
14,
|
|
2885
2885
|
15,
|
|
@@ -2960,7 +2960,7 @@ function Ia() {
|
|
|
2960
2960
|
8,
|
|
2961
2961
|
5,
|
|
2962
2962
|
6
|
|
2963
|
-
]),
|
|
2963
|
+
]), v = y.create([
|
|
2964
2964
|
8,
|
|
2965
2965
|
9,
|
|
2966
2966
|
9,
|
|
@@ -3050,7 +3050,7 @@ function Ia() {
|
|
|
3050
3050
|
var Q = K + X, U = $[Q];
|
|
3051
3051
|
$[Q] = (U << 8 | U >>> 24) & 16711935 | (U << 24 | U >>> 8) & 4278255360;
|
|
3052
3052
|
}
|
|
3053
|
-
var A = this._hash.words, n = C.words, d = w.words, g = o.words, B = c.words, F =
|
|
3053
|
+
var A = this._hash.words, n = C.words, d = w.words, g = o.words, B = c.words, F = b.words, z = v.words, N, D, h, E, j, Y, W, re, ce, we;
|
|
3054
3054
|
Y = N = A[0], W = D = A[1], re = h = A[2], ce = E = A[3], we = j = A[4];
|
|
3055
3055
|
for (var Ae, X = 0; X < 80; X += 1)
|
|
3056
3056
|
Ae = N + $[K + g[X]] | 0, X < 16 ? Ae += P(D, h, E) + n[0] : X < 32 ? Ae += q(D, h, E) + n[1] : X < 48 ? Ae += S(D, h, E) + n[2] : X < 64 ? Ae += k(D, h, E) + n[3] : Ae += T(D, h, E) + n[4], Ae = Ae | 0, Ae = H(Ae, F[X]), Ae = Ae + j | 0, N = j, j = E, E = H(h, 10), h = D, D = Ae, Ae = Y + $[K + B[X]] | 0, X < 16 ? Ae += T(W, re, ce) + d[0] : X < 32 ? Ae += k(W, re, ce) + d[1] : X < 48 ? Ae += S(W, re, ce) + d[2] : X < 64 ? Ae += q(W, re, ce) + d[3] : Ae += P(W, re, ce) + d[4], Ae = Ae | 0, Ae = H(Ae, z[X]), Ae = Ae + we | 0, Y = we, we = ce, ce = H(re, 10), re = W, W = Ae;
|
|
@@ -3114,11 +3114,11 @@ function Lf() {
|
|
|
3114
3114
|
*/
|
|
3115
3115
|
init: function(o, c) {
|
|
3116
3116
|
o = this._hasher = new o.init(), typeof c == "string" && (c = x.parse(c));
|
|
3117
|
-
var
|
|
3118
|
-
c.sigBytes >
|
|
3119
|
-
for (var C = this._oKey = c.clone(), w = this._iKey = c.clone(), R = C.words, P = w.words, q = 0; q <
|
|
3117
|
+
var b = o.blockSize, v = b * 4;
|
|
3118
|
+
c.sigBytes > v && (c = o.finalize(c)), c.clamp();
|
|
3119
|
+
for (var C = this._oKey = c.clone(), w = this._iKey = c.clone(), R = C.words, P = w.words, q = 0; q < b; q++)
|
|
3120
3120
|
R[q] ^= 1549556828, P[q] ^= 909522486;
|
|
3121
|
-
C.sigBytes = w.sigBytes =
|
|
3121
|
+
C.sigBytes = w.sigBytes = v, this.reset();
|
|
3122
3122
|
},
|
|
3123
3123
|
/**
|
|
3124
3124
|
* Resets this HMAC to its initial state.
|
|
@@ -3161,10 +3161,10 @@ function Lf() {
|
|
|
3161
3161
|
* var hmac = hmacHasher.finalize(wordArray);
|
|
3162
3162
|
*/
|
|
3163
3163
|
finalize: function(o) {
|
|
3164
|
-
var c = this._hasher,
|
|
3164
|
+
var c = this._hasher, b = c.finalize(o);
|
|
3165
3165
|
c.reset();
|
|
3166
|
-
var
|
|
3167
|
-
return
|
|
3166
|
+
var v = c.finalize(this._oKey.clone().concat(b));
|
|
3167
|
+
return v;
|
|
3168
3168
|
}
|
|
3169
3169
|
});
|
|
3170
3170
|
})();
|
|
@@ -3172,7 +3172,7 @@ function Lf() {
|
|
|
3172
3172
|
}(Vr)), Vr.exports;
|
|
3173
3173
|
}
|
|
3174
3174
|
var Xr = { exports: {} }, mi;
|
|
3175
|
-
function
|
|
3175
|
+
function Oa() {
|
|
3176
3176
|
return mi || (mi = 1, function(f, e) {
|
|
3177
3177
|
(function(t, r, a) {
|
|
3178
3178
|
f.exports = r($e(), Nf(), Lf());
|
|
@@ -3202,8 +3202,8 @@ function Ta() {
|
|
|
3202
3202
|
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
|
|
3203
3203
|
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
|
|
3204
3204
|
*/
|
|
3205
|
-
init: function(
|
|
3206
|
-
this.cfg = this.cfg.extend(
|
|
3205
|
+
init: function(b) {
|
|
3206
|
+
this.cfg = this.cfg.extend(b);
|
|
3207
3207
|
},
|
|
3208
3208
|
/**
|
|
3209
3209
|
* Computes the Password-Based Key Derivation Function 2.
|
|
@@ -3217,9 +3217,9 @@ function Ta() {
|
|
|
3217
3217
|
*
|
|
3218
3218
|
* var key = kdf.compute(password, salt);
|
|
3219
3219
|
*/
|
|
3220
|
-
compute: function(
|
|
3221
|
-
for (var C = this.cfg, w = o.create(C.hasher,
|
|
3222
|
-
var H = w.update(
|
|
3220
|
+
compute: function(b, v) {
|
|
3221
|
+
for (var C = this.cfg, w = o.create(C.hasher, b), R = y.create(), P = y.create([1]), q = R.words, S = P.words, k = C.keySize, T = C.iterations; q.length < k; ) {
|
|
3222
|
+
var H = w.update(v).finalize(P);
|
|
3223
3223
|
w.reset();
|
|
3224
3224
|
for (var $ = H.words, K = $.length, X = H, Q = 1; Q < T; Q++) {
|
|
3225
3225
|
X = w.finalize(X), w.reset();
|
|
@@ -3231,15 +3231,15 @@ function Ta() {
|
|
|
3231
3231
|
return R.sigBytes = k * 4, R;
|
|
3232
3232
|
}
|
|
3233
3233
|
});
|
|
3234
|
-
r.PBKDF2 = function(
|
|
3235
|
-
return c.create(C).compute(
|
|
3234
|
+
r.PBKDF2 = function(b, v, C) {
|
|
3235
|
+
return c.create(C).compute(b, v);
|
|
3236
3236
|
};
|
|
3237
3237
|
}(), t.PBKDF2;
|
|
3238
3238
|
});
|
|
3239
3239
|
}(Xr)), Xr.exports;
|
|
3240
3240
|
}
|
|
3241
3241
|
var Zr = { exports: {} }, _i;
|
|
3242
|
-
function
|
|
3242
|
+
function At() {
|
|
3243
3243
|
return _i || (_i = 1, function(f, e) {
|
|
3244
3244
|
(function(t, r, a) {
|
|
3245
3245
|
f.exports = r($e(), bn(), Lf());
|
|
@@ -3284,18 +3284,18 @@ function _t() {
|
|
|
3284
3284
|
*
|
|
3285
3285
|
* var key = kdf.compute(password, salt);
|
|
3286
3286
|
*/
|
|
3287
|
-
compute: function(c,
|
|
3288
|
-
for (var
|
|
3289
|
-
|
|
3287
|
+
compute: function(c, b) {
|
|
3288
|
+
for (var v, C = this.cfg, w = C.hasher.create(), R = y.create(), P = R.words, q = C.keySize, S = C.iterations; P.length < q; ) {
|
|
3289
|
+
v && w.update(v), v = w.update(c).finalize(b), w.reset();
|
|
3290
3290
|
for (var k = 1; k < S; k++)
|
|
3291
|
-
|
|
3292
|
-
R.concat(
|
|
3291
|
+
v = w.finalize(v), w.reset();
|
|
3292
|
+
R.concat(v);
|
|
3293
3293
|
}
|
|
3294
3294
|
return R.sigBytes = q * 4, R;
|
|
3295
3295
|
}
|
|
3296
3296
|
});
|
|
3297
|
-
r.EvpKDF = function(c,
|
|
3298
|
-
return o.create(
|
|
3297
|
+
r.EvpKDF = function(c, b, v) {
|
|
3298
|
+
return o.create(v).compute(c, b);
|
|
3299
3299
|
};
|
|
3300
3300
|
}(), t.EvpKDF;
|
|
3301
3301
|
});
|
|
@@ -3305,12 +3305,12 @@ var Gr = { exports: {} }, Ai;
|
|
|
3305
3305
|
function C0() {
|
|
3306
3306
|
return Ai || (Ai = 1, function(f, e) {
|
|
3307
3307
|
(function(t, r, a) {
|
|
3308
|
-
f.exports = r($e(),
|
|
3308
|
+
f.exports = r($e(), At());
|
|
3309
3309
|
})(ke, function(t) {
|
|
3310
3310
|
t.lib.Cipher || function(r) {
|
|
3311
3311
|
var a = t, i = a.lib, y = i.Base, x = i.WordArray, u = i.BufferedBlockAlgorithm, o = a.enc;
|
|
3312
3312
|
o.Utf8;
|
|
3313
|
-
var c = o.Base64,
|
|
3313
|
+
var c = o.Base64, b = a.algo, v = b.EvpKDF, C = i.Cipher = u.extend({
|
|
3314
3314
|
/**
|
|
3315
3315
|
* Configuration options.
|
|
3316
3316
|
*
|
|
@@ -3771,9 +3771,9 @@ function C0() {
|
|
|
3771
3771
|
*/
|
|
3772
3772
|
execute: function(U, A, n, d, g) {
|
|
3773
3773
|
if (d || (d = x.random(64 / 8)), g)
|
|
3774
|
-
var B =
|
|
3774
|
+
var B = v.create({ keySize: A + n, hasher: g }).compute(U, d);
|
|
3775
3775
|
else
|
|
3776
|
-
var B =
|
|
3776
|
+
var B = v.create({ keySize: A + n }).compute(U, d);
|
|
3777
3777
|
var F = x.create(B.words.slice(A), n * 4);
|
|
3778
3778
|
return B.sigBytes = A * 4, k.create({ key: B, iv: F, salt: d });
|
|
3779
3779
|
}
|
|
@@ -3840,7 +3840,7 @@ function C0() {
|
|
|
3840
3840
|
}(Gr)), Gr.exports;
|
|
3841
3841
|
}
|
|
3842
3842
|
var Qr = { exports: {} }, Ei;
|
|
3843
|
-
function
|
|
3843
|
+
function za() {
|
|
3844
3844
|
return Ei || (Ei = 1, function(f, e) {
|
|
3845
3845
|
(function(t, r, a) {
|
|
3846
3846
|
f.exports = r($e(), C0());
|
|
@@ -3861,8 +3861,8 @@ function Oa() {
|
|
|
3861
3861
|
function a(i, y, x, u) {
|
|
3862
3862
|
var o, c = this._iv;
|
|
3863
3863
|
c ? (o = c.slice(0), this._iv = void 0) : o = this._prevBlock, u.encryptBlock(o, 0);
|
|
3864
|
-
for (var
|
|
3865
|
-
i[y +
|
|
3864
|
+
for (var b = 0; b < x; b++)
|
|
3865
|
+
i[y + b] ^= o[b];
|
|
3866
3866
|
}
|
|
3867
3867
|
return r;
|
|
3868
3868
|
}(), t.mode.CFB;
|
|
@@ -3870,7 +3870,7 @@ function Oa() {
|
|
|
3870
3870
|
}(Qr)), Qr.exports;
|
|
3871
3871
|
}
|
|
3872
3872
|
var Jr = { exports: {} }, wi;
|
|
3873
|
-
function
|
|
3873
|
+
function qa() {
|
|
3874
3874
|
return wi || (wi = 1, function(f, e) {
|
|
3875
3875
|
(function(t, r, a) {
|
|
3876
3876
|
f.exports = r($e(), C0());
|
|
@@ -3880,10 +3880,10 @@ function za() {
|
|
|
3880
3880
|
processBlock: function(i, y) {
|
|
3881
3881
|
var x = this._cipher, u = x.blockSize, o = this._iv, c = this._counter;
|
|
3882
3882
|
o && (c = this._counter = o.slice(0), this._iv = void 0);
|
|
3883
|
-
var
|
|
3884
|
-
x.encryptBlock(
|
|
3885
|
-
for (var
|
|
3886
|
-
i[y +
|
|
3883
|
+
var b = c.slice(0);
|
|
3884
|
+
x.encryptBlock(b, 0), c[u - 1] = c[u - 1] + 1 | 0;
|
|
3885
|
+
for (var v = 0; v < u; v++)
|
|
3886
|
+
i[y + v] ^= b[v];
|
|
3887
3887
|
}
|
|
3888
3888
|
});
|
|
3889
3889
|
return r.Decryptor = a, r;
|
|
@@ -3892,7 +3892,7 @@ function za() {
|
|
|
3892
3892
|
}(Jr)), Jr.exports;
|
|
3893
3893
|
}
|
|
3894
3894
|
var ef = { exports: {} }, Bi;
|
|
3895
|
-
function
|
|
3895
|
+
function Na() {
|
|
3896
3896
|
return Bi || (Bi = 1, function(f, e) {
|
|
3897
3897
|
(function(t, r, a) {
|
|
3898
3898
|
f.exports = r($e(), C0());
|
|
@@ -3917,9 +3917,9 @@ function qa() {
|
|
|
3917
3917
|
}
|
|
3918
3918
|
var y = r.Encryptor = r.extend({
|
|
3919
3919
|
processBlock: function(x, u) {
|
|
3920
|
-
var o = this._cipher, c = o.blockSize,
|
|
3921
|
-
|
|
3922
|
-
var C =
|
|
3920
|
+
var o = this._cipher, c = o.blockSize, b = this._iv, v = this._counter;
|
|
3921
|
+
b && (v = this._counter = b.slice(0), this._iv = void 0), i(v);
|
|
3922
|
+
var C = v.slice(0);
|
|
3923
3923
|
o.encryptBlock(C, 0);
|
|
3924
3924
|
for (var w = 0; w < c; w++)
|
|
3925
3925
|
x[u + w] ^= C[w];
|
|
@@ -3931,7 +3931,7 @@ function qa() {
|
|
|
3931
3931
|
}(ef)), ef.exports;
|
|
3932
3932
|
}
|
|
3933
3933
|
var tf = { exports: {} }, Ci;
|
|
3934
|
-
function
|
|
3934
|
+
function La() {
|
|
3935
3935
|
return Ci || (Ci = 1, function(f, e) {
|
|
3936
3936
|
(function(t, r, a) {
|
|
3937
3937
|
f.exports = r($e(), C0());
|
|
@@ -3941,8 +3941,8 @@ function Na() {
|
|
|
3941
3941
|
processBlock: function(i, y) {
|
|
3942
3942
|
var x = this._cipher, u = x.blockSize, o = this._iv, c = this._keystream;
|
|
3943
3943
|
o && (c = this._keystream = o.slice(0), this._iv = void 0), x.encryptBlock(c, 0);
|
|
3944
|
-
for (var
|
|
3945
|
-
i[y +
|
|
3944
|
+
for (var b = 0; b < u; b++)
|
|
3945
|
+
i[y + b] ^= c[b];
|
|
3946
3946
|
}
|
|
3947
3947
|
});
|
|
3948
3948
|
return r.Decryptor = a, r;
|
|
@@ -3951,7 +3951,7 @@ function Na() {
|
|
|
3951
3951
|
}(tf)), tf.exports;
|
|
3952
3952
|
}
|
|
3953
3953
|
var rf = { exports: {} }, Mi;
|
|
3954
|
-
function
|
|
3954
|
+
function Ha() {
|
|
3955
3955
|
return Mi || (Mi = 1, function(f, e) {
|
|
3956
3956
|
(function(t, r, a) {
|
|
3957
3957
|
f.exports = r($e(), C0());
|
|
@@ -3972,7 +3972,7 @@ function La() {
|
|
|
3972
3972
|
}(rf)), rf.exports;
|
|
3973
3973
|
}
|
|
3974
3974
|
var ff = { exports: {} }, Fi;
|
|
3975
|
-
function
|
|
3975
|
+
function Ua() {
|
|
3976
3976
|
return Fi || (Fi = 1, function(f, e) {
|
|
3977
3977
|
(function(t, r, a) {
|
|
3978
3978
|
f.exports = r($e(), C0());
|
|
@@ -3991,7 +3991,7 @@ function Ha() {
|
|
|
3991
3991
|
}(ff)), ff.exports;
|
|
3992
3992
|
}
|
|
3993
3993
|
var nf = { exports: {} }, Si;
|
|
3994
|
-
function
|
|
3994
|
+
function $a() {
|
|
3995
3995
|
return Si || (Si = 1, function(f, e) {
|
|
3996
3996
|
(function(t, r, a) {
|
|
3997
3997
|
f.exports = r($e(), C0());
|
|
@@ -4010,7 +4010,7 @@ function Ua() {
|
|
|
4010
4010
|
}(nf)), nf.exports;
|
|
4011
4011
|
}
|
|
4012
4012
|
var af = { exports: {} }, Di;
|
|
4013
|
-
function
|
|
4013
|
+
function Wa() {
|
|
4014
4014
|
return Di || (Di = 1, function(f, e) {
|
|
4015
4015
|
(function(t, r, a) {
|
|
4016
4016
|
f.exports = r($e(), C0());
|
|
@@ -4027,7 +4027,7 @@ function $a() {
|
|
|
4027
4027
|
}(af)), af.exports;
|
|
4028
4028
|
}
|
|
4029
4029
|
var sf = { exports: {} }, Ri;
|
|
4030
|
-
function
|
|
4030
|
+
function Ya() {
|
|
4031
4031
|
return Ri || (Ri = 1, function(f, e) {
|
|
4032
4032
|
(function(t, r, a) {
|
|
4033
4033
|
f.exports = r($e(), C0());
|
|
@@ -4049,7 +4049,7 @@ function Wa() {
|
|
|
4049
4049
|
}(sf)), sf.exports;
|
|
4050
4050
|
}
|
|
4051
4051
|
var of = { exports: {} }, Pi;
|
|
4052
|
-
function
|
|
4052
|
+
function Ka() {
|
|
4053
4053
|
return Pi || (Pi = 1, function(f, e) {
|
|
4054
4054
|
(function(t, r, a) {
|
|
4055
4055
|
f.exports = r($e(), C0());
|
|
@@ -4064,7 +4064,7 @@ function Ya() {
|
|
|
4064
4064
|
}(of)), of.exports;
|
|
4065
4065
|
}
|
|
4066
4066
|
var cf = { exports: {} }, ki;
|
|
4067
|
-
function
|
|
4067
|
+
function ja() {
|
|
4068
4068
|
return ki || (ki = 1, function(f, e) {
|
|
4069
4069
|
(function(t, r, a) {
|
|
4070
4070
|
f.exports = r($e(), C0());
|
|
@@ -4102,8 +4102,8 @@ function Ka() {
|
|
|
4102
4102
|
* var cipherParams = CryptoJS.format.Hex.parse(hexString);
|
|
4103
4103
|
*/
|
|
4104
4104
|
parse: function(c) {
|
|
4105
|
-
var
|
|
4106
|
-
return y.create({ ciphertext:
|
|
4105
|
+
var b = u.parse(c);
|
|
4106
|
+
return y.create({ ciphertext: b });
|
|
4107
4107
|
}
|
|
4108
4108
|
};
|
|
4109
4109
|
}(), t.format.Hex;
|
|
@@ -4111,13 +4111,13 @@ function Ka() {
|
|
|
4111
4111
|
}(cf)), cf.exports;
|
|
4112
4112
|
}
|
|
4113
4113
|
var df = { exports: {} }, Ii;
|
|
4114
|
-
function
|
|
4114
|
+
function Va() {
|
|
4115
4115
|
return Ii || (Ii = 1, function(f, e) {
|
|
4116
4116
|
(function(t, r, a) {
|
|
4117
|
-
f.exports = r($e(), Rt(), Pt(),
|
|
4117
|
+
f.exports = r($e(), Rt(), Pt(), At(), C0());
|
|
4118
4118
|
})(ke, function(t) {
|
|
4119
4119
|
return function() {
|
|
4120
|
-
var r = t, a = r.lib, i = a.BlockCipher, y = r.algo, x = [], u = [], o = [], c = [],
|
|
4120
|
+
var r = t, a = r.lib, i = a.BlockCipher, y = r.algo, x = [], u = [], o = [], c = [], b = [], v = [], C = [], w = [], R = [], P = [];
|
|
4121
4121
|
(function() {
|
|
4122
4122
|
for (var k = [], T = 0; T < 256; T++)
|
|
4123
4123
|
T < 128 ? k[T] = T << 1 : k[T] = T << 1 ^ 283;
|
|
@@ -4125,7 +4125,7 @@ function ja() {
|
|
|
4125
4125
|
var K = $ ^ $ << 1 ^ $ << 2 ^ $ << 3 ^ $ << 4;
|
|
4126
4126
|
K = K >>> 8 ^ K & 255 ^ 99, x[H] = K, u[K] = H;
|
|
4127
4127
|
var X = k[H], Q = k[X], U = k[Q], A = k[K] * 257 ^ K * 16843008;
|
|
4128
|
-
o[H] = A << 24 | A >>> 8, c[H] = A << 16 | A >>> 16,
|
|
4128
|
+
o[H] = A << 24 | A >>> 8, c[H] = A << 16 | A >>> 16, b[H] = A << 8 | A >>> 24, v[H] = A;
|
|
4129
4129
|
var A = U * 16843009 ^ Q * 65537 ^ X * 257 ^ H * 16843008;
|
|
4130
4130
|
C[K] = A << 24 | A >>> 8, w[K] = A << 16 | A >>> 16, R[K] = A << 8 | A >>> 24, P[K] = A, H ? (H = X ^ k[k[k[U ^ X]]], $ ^= k[k[$]]) : H = $ = 1;
|
|
4131
4131
|
}
|
|
@@ -4147,7 +4147,7 @@ function ja() {
|
|
|
4147
4147
|
}
|
|
4148
4148
|
},
|
|
4149
4149
|
encryptBlock: function(k, T) {
|
|
4150
|
-
this._doCryptBlock(k, T, this._keySchedule, o, c,
|
|
4150
|
+
this._doCryptBlock(k, T, this._keySchedule, o, c, b, v, x);
|
|
4151
4151
|
},
|
|
4152
4152
|
decryptBlock: function(k, T) {
|
|
4153
4153
|
var H = k[T + 1];
|
|
@@ -4171,10 +4171,10 @@ function ja() {
|
|
|
4171
4171
|
}(df)), df.exports;
|
|
4172
4172
|
}
|
|
4173
4173
|
var hf = { exports: {} }, Ti;
|
|
4174
|
-
function
|
|
4174
|
+
function Xa() {
|
|
4175
4175
|
return Ti || (Ti = 1, function(f, e) {
|
|
4176
4176
|
(function(t, r, a) {
|
|
4177
|
-
f.exports = r($e(), Rt(), Pt(),
|
|
4177
|
+
f.exports = r($e(), Rt(), Pt(), At(), C0());
|
|
4178
4178
|
})(ke, function(t) {
|
|
4179
4179
|
return function() {
|
|
4180
4180
|
var r = t, a = r.lib, i = a.WordArray, y = a.BlockCipher, x = r.algo, u = [
|
|
@@ -4283,7 +4283,7 @@ function Va() {
|
|
|
4283
4283
|
36,
|
|
4284
4284
|
29,
|
|
4285
4285
|
32
|
|
4286
|
-
], c = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],
|
|
4286
|
+
], c = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], b = [
|
|
4287
4287
|
{
|
|
4288
4288
|
0: 8421888,
|
|
4289
4289
|
268435456: 32768,
|
|
@@ -4812,7 +4812,7 @@ function Va() {
|
|
|
4812
4812
|
2147483678: 131104,
|
|
4813
4813
|
2147483679: 134350848
|
|
4814
4814
|
}
|
|
4815
|
-
],
|
|
4815
|
+
], v = [
|
|
4816
4816
|
4160749569,
|
|
4817
4817
|
528482304,
|
|
4818
4818
|
33030144,
|
|
@@ -4848,7 +4848,7 @@ function Va() {
|
|
|
4848
4848
|
this._lBlock = q[S], this._rBlock = q[S + 1], w.call(this, 4, 252645135), w.call(this, 16, 65535), R.call(this, 2, 858993459), R.call(this, 8, 16711935), w.call(this, 1, 1431655765);
|
|
4849
4849
|
for (var T = 0; T < 16; T++) {
|
|
4850
4850
|
for (var H = k[T], $ = this._lBlock, K = this._rBlock, X = 0, Q = 0; Q < 8; Q++)
|
|
4851
|
-
X |=
|
|
4851
|
+
X |= b[Q][((K ^ H[Q]) & v[Q]) >>> 0];
|
|
4852
4852
|
this._lBlock = K, this._rBlock = $ ^ X;
|
|
4853
4853
|
}
|
|
4854
4854
|
var U = this._lBlock;
|
|
@@ -4891,37 +4891,37 @@ function Va() {
|
|
|
4891
4891
|
}(hf)), hf.exports;
|
|
4892
4892
|
}
|
|
4893
4893
|
var uf = { exports: {} }, Oi;
|
|
4894
|
-
function
|
|
4894
|
+
function Za() {
|
|
4895
4895
|
return Oi || (Oi = 1, function(f, e) {
|
|
4896
4896
|
(function(t, r, a) {
|
|
4897
|
-
f.exports = r($e(), Rt(), Pt(),
|
|
4897
|
+
f.exports = r($e(), Rt(), Pt(), At(), C0());
|
|
4898
4898
|
})(ke, function(t) {
|
|
4899
4899
|
return function() {
|
|
4900
4900
|
var r = t, a = r.lib, i = a.StreamCipher, y = r.algo, x = y.RC4 = i.extend({
|
|
4901
4901
|
_doReset: function() {
|
|
4902
|
-
for (var c = this._key,
|
|
4902
|
+
for (var c = this._key, b = c.words, v = c.sigBytes, C = this._S = [], w = 0; w < 256; w++)
|
|
4903
4903
|
C[w] = w;
|
|
4904
4904
|
for (var w = 0, R = 0; w < 256; w++) {
|
|
4905
|
-
var P = w %
|
|
4905
|
+
var P = w % v, q = b[P >>> 2] >>> 24 - P % 4 * 8 & 255;
|
|
4906
4906
|
R = (R + C[w] + q) % 256;
|
|
4907
4907
|
var S = C[w];
|
|
4908
4908
|
C[w] = C[R], C[R] = S;
|
|
4909
4909
|
}
|
|
4910
4910
|
this._i = this._j = 0;
|
|
4911
4911
|
},
|
|
4912
|
-
_doProcessBlock: function(c,
|
|
4913
|
-
c[
|
|
4912
|
+
_doProcessBlock: function(c, b) {
|
|
4913
|
+
c[b] ^= u.call(this);
|
|
4914
4914
|
},
|
|
4915
4915
|
keySize: 256 / 32,
|
|
4916
4916
|
ivSize: 0
|
|
4917
4917
|
});
|
|
4918
4918
|
function u() {
|
|
4919
|
-
for (var c = this._S,
|
|
4920
|
-
|
|
4921
|
-
var R = c[
|
|
4922
|
-
c[
|
|
4919
|
+
for (var c = this._S, b = this._i, v = this._j, C = 0, w = 0; w < 4; w++) {
|
|
4920
|
+
b = (b + 1) % 256, v = (v + c[b]) % 256;
|
|
4921
|
+
var R = c[b];
|
|
4922
|
+
c[b] = c[v], c[v] = R, C |= c[(c[b] + c[v]) % 256] << 24 - w * 8;
|
|
4923
4923
|
}
|
|
4924
|
-
return this._i =
|
|
4924
|
+
return this._i = b, this._j = v, C;
|
|
4925
4925
|
}
|
|
4926
4926
|
r.RC4 = i._createHelper(x);
|
|
4927
4927
|
var o = y.RC4Drop = x.extend({
|
|
@@ -4945,65 +4945,65 @@ function Xa() {
|
|
|
4945
4945
|
}(uf)), uf.exports;
|
|
4946
4946
|
}
|
|
4947
4947
|
var lf = { exports: {} }, zi;
|
|
4948
|
-
function
|
|
4948
|
+
function Ga() {
|
|
4949
4949
|
return zi || (zi = 1, function(f, e) {
|
|
4950
4950
|
(function(t, r, a) {
|
|
4951
|
-
f.exports = r($e(), Rt(), Pt(),
|
|
4951
|
+
f.exports = r($e(), Rt(), Pt(), At(), C0());
|
|
4952
4952
|
})(ke, function(t) {
|
|
4953
4953
|
return function() {
|
|
4954
4954
|
var r = t, a = r.lib, i = a.StreamCipher, y = r.algo, x = [], u = [], o = [], c = y.Rabbit = i.extend({
|
|
4955
4955
|
_doReset: function() {
|
|
4956
|
-
for (var
|
|
4957
|
-
|
|
4956
|
+
for (var v = this._key.words, C = this.cfg.iv, w = 0; w < 4; w++)
|
|
4957
|
+
v[w] = (v[w] << 8 | v[w] >>> 24) & 16711935 | (v[w] << 24 | v[w] >>> 8) & 4278255360;
|
|
4958
4958
|
var R = this._X = [
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4959
|
+
v[0],
|
|
4960
|
+
v[3] << 16 | v[2] >>> 16,
|
|
4961
|
+
v[1],
|
|
4962
|
+
v[0] << 16 | v[3] >>> 16,
|
|
4963
|
+
v[2],
|
|
4964
|
+
v[1] << 16 | v[0] >>> 16,
|
|
4965
|
+
v[3],
|
|
4966
|
+
v[2] << 16 | v[1] >>> 16
|
|
4967
4967
|
], P = this._C = [
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4968
|
+
v[2] << 16 | v[2] >>> 16,
|
|
4969
|
+
v[0] & 4294901760 | v[1] & 65535,
|
|
4970
|
+
v[3] << 16 | v[3] >>> 16,
|
|
4971
|
+
v[1] & 4294901760 | v[2] & 65535,
|
|
4972
|
+
v[0] << 16 | v[0] >>> 16,
|
|
4973
|
+
v[2] & 4294901760 | v[3] & 65535,
|
|
4974
|
+
v[1] << 16 | v[1] >>> 16,
|
|
4975
|
+
v[3] & 4294901760 | v[0] & 65535
|
|
4976
4976
|
];
|
|
4977
4977
|
this._b = 0;
|
|
4978
4978
|
for (var w = 0; w < 4; w++)
|
|
4979
|
-
|
|
4979
|
+
b.call(this);
|
|
4980
4980
|
for (var w = 0; w < 8; w++)
|
|
4981
4981
|
P[w] ^= R[w + 4 & 7];
|
|
4982
4982
|
if (C) {
|
|
4983
4983
|
var q = C.words, S = q[0], k = q[1], T = (S << 8 | S >>> 24) & 16711935 | (S << 24 | S >>> 8) & 4278255360, H = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, $ = T >>> 16 | H & 4294901760, K = H << 16 | T & 65535;
|
|
4984
4984
|
P[0] ^= T, P[1] ^= $, P[2] ^= H, P[3] ^= K, P[4] ^= T, P[5] ^= $, P[6] ^= H, P[7] ^= K;
|
|
4985
4985
|
for (var w = 0; w < 4; w++)
|
|
4986
|
-
|
|
4986
|
+
b.call(this);
|
|
4987
4987
|
}
|
|
4988
4988
|
},
|
|
4989
|
-
_doProcessBlock: function(
|
|
4989
|
+
_doProcessBlock: function(v, C) {
|
|
4990
4990
|
var w = this._X;
|
|
4991
|
-
|
|
4991
|
+
b.call(this), x[0] = w[0] ^ w[5] >>> 16 ^ w[3] << 16, x[1] = w[2] ^ w[7] >>> 16 ^ w[5] << 16, x[2] = w[4] ^ w[1] >>> 16 ^ w[7] << 16, x[3] = w[6] ^ w[3] >>> 16 ^ w[1] << 16;
|
|
4992
4992
|
for (var R = 0; R < 4; R++)
|
|
4993
|
-
x[R] = (x[R] << 8 | x[R] >>> 24) & 16711935 | (x[R] << 24 | x[R] >>> 8) & 4278255360,
|
|
4993
|
+
x[R] = (x[R] << 8 | x[R] >>> 24) & 16711935 | (x[R] << 24 | x[R] >>> 8) & 4278255360, v[C + R] ^= x[R];
|
|
4994
4994
|
},
|
|
4995
4995
|
blockSize: 128 / 32,
|
|
4996
4996
|
ivSize: 64 / 32
|
|
4997
4997
|
});
|
|
4998
|
-
function
|
|
4999
|
-
for (var
|
|
4998
|
+
function b() {
|
|
4999
|
+
for (var v = this._X, C = this._C, w = 0; w < 8; w++)
|
|
5000
5000
|
u[w] = C[w];
|
|
5001
5001
|
C[0] = C[0] + 1295307597 + this._b | 0, C[1] = C[1] + 3545052371 + (C[0] >>> 0 < u[0] >>> 0 ? 1 : 0) | 0, C[2] = C[2] + 886263092 + (C[1] >>> 0 < u[1] >>> 0 ? 1 : 0) | 0, C[3] = C[3] + 1295307597 + (C[2] >>> 0 < u[2] >>> 0 ? 1 : 0) | 0, C[4] = C[4] + 3545052371 + (C[3] >>> 0 < u[3] >>> 0 ? 1 : 0) | 0, C[5] = C[5] + 886263092 + (C[4] >>> 0 < u[4] >>> 0 ? 1 : 0) | 0, C[6] = C[6] + 1295307597 + (C[5] >>> 0 < u[5] >>> 0 ? 1 : 0) | 0, C[7] = C[7] + 3545052371 + (C[6] >>> 0 < u[6] >>> 0 ? 1 : 0) | 0, this._b = C[7] >>> 0 < u[7] >>> 0 ? 1 : 0;
|
|
5002
5002
|
for (var w = 0; w < 8; w++) {
|
|
5003
|
-
var R =
|
|
5003
|
+
var R = v[w] + C[w], P = R & 65535, q = R >>> 16, S = ((P * P >>> 17) + P * q >>> 15) + q * q, k = ((R & 4294901760) * R | 0) + ((R & 65535) * R | 0);
|
|
5004
5004
|
o[w] = S ^ k;
|
|
5005
5005
|
}
|
|
5006
|
-
|
|
5006
|
+
v[0] = o[0] + (o[7] << 16 | o[7] >>> 16) + (o[6] << 16 | o[6] >>> 16) | 0, v[1] = o[1] + (o[0] << 8 | o[0] >>> 24) + o[7] | 0, v[2] = o[2] + (o[1] << 16 | o[1] >>> 16) + (o[0] << 16 | o[0] >>> 16) | 0, v[3] = o[3] + (o[2] << 8 | o[2] >>> 24) + o[1] | 0, v[4] = o[4] + (o[3] << 16 | o[3] >>> 16) + (o[2] << 16 | o[2] >>> 16) | 0, v[5] = o[5] + (o[4] << 8 | o[4] >>> 24) + o[3] | 0, v[6] = o[6] + (o[5] << 16 | o[5] >>> 16) + (o[4] << 16 | o[4] >>> 16) | 0, v[7] = o[7] + (o[6] << 8 | o[6] >>> 24) + o[5] | 0;
|
|
5007
5007
|
}
|
|
5008
5008
|
r.Rabbit = i._createHelper(c);
|
|
5009
5009
|
}(), t.Rabbit;
|
|
@@ -5011,63 +5011,63 @@ function Za() {
|
|
|
5011
5011
|
}(lf)), lf.exports;
|
|
5012
5012
|
}
|
|
5013
5013
|
var xf = { exports: {} }, qi;
|
|
5014
|
-
function
|
|
5014
|
+
function Qa() {
|
|
5015
5015
|
return qi || (qi = 1, function(f, e) {
|
|
5016
5016
|
(function(t, r, a) {
|
|
5017
|
-
f.exports = r($e(), Rt(), Pt(),
|
|
5017
|
+
f.exports = r($e(), Rt(), Pt(), At(), C0());
|
|
5018
5018
|
})(ke, function(t) {
|
|
5019
5019
|
return function() {
|
|
5020
5020
|
var r = t, a = r.lib, i = a.StreamCipher, y = r.algo, x = [], u = [], o = [], c = y.RabbitLegacy = i.extend({
|
|
5021
5021
|
_doReset: function() {
|
|
5022
|
-
var
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5022
|
+
var v = this._key.words, C = this.cfg.iv, w = this._X = [
|
|
5023
|
+
v[0],
|
|
5024
|
+
v[3] << 16 | v[2] >>> 16,
|
|
5025
|
+
v[1],
|
|
5026
|
+
v[0] << 16 | v[3] >>> 16,
|
|
5027
|
+
v[2],
|
|
5028
|
+
v[1] << 16 | v[0] >>> 16,
|
|
5029
|
+
v[3],
|
|
5030
|
+
v[2] << 16 | v[1] >>> 16
|
|
5031
5031
|
], R = this._C = [
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5032
|
+
v[2] << 16 | v[2] >>> 16,
|
|
5033
|
+
v[0] & 4294901760 | v[1] & 65535,
|
|
5034
|
+
v[3] << 16 | v[3] >>> 16,
|
|
5035
|
+
v[1] & 4294901760 | v[2] & 65535,
|
|
5036
|
+
v[0] << 16 | v[0] >>> 16,
|
|
5037
|
+
v[2] & 4294901760 | v[3] & 65535,
|
|
5038
|
+
v[1] << 16 | v[1] >>> 16,
|
|
5039
|
+
v[3] & 4294901760 | v[0] & 65535
|
|
5040
5040
|
];
|
|
5041
5041
|
this._b = 0;
|
|
5042
5042
|
for (var P = 0; P < 4; P++)
|
|
5043
|
-
|
|
5043
|
+
b.call(this);
|
|
5044
5044
|
for (var P = 0; P < 8; P++)
|
|
5045
5045
|
R[P] ^= w[P + 4 & 7];
|
|
5046
5046
|
if (C) {
|
|
5047
5047
|
var q = C.words, S = q[0], k = q[1], T = (S << 8 | S >>> 24) & 16711935 | (S << 24 | S >>> 8) & 4278255360, H = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, $ = T >>> 16 | H & 4294901760, K = H << 16 | T & 65535;
|
|
5048
5048
|
R[0] ^= T, R[1] ^= $, R[2] ^= H, R[3] ^= K, R[4] ^= T, R[5] ^= $, R[6] ^= H, R[7] ^= K;
|
|
5049
5049
|
for (var P = 0; P < 4; P++)
|
|
5050
|
-
|
|
5050
|
+
b.call(this);
|
|
5051
5051
|
}
|
|
5052
5052
|
},
|
|
5053
|
-
_doProcessBlock: function(
|
|
5053
|
+
_doProcessBlock: function(v, C) {
|
|
5054
5054
|
var w = this._X;
|
|
5055
|
-
|
|
5055
|
+
b.call(this), x[0] = w[0] ^ w[5] >>> 16 ^ w[3] << 16, x[1] = w[2] ^ w[7] >>> 16 ^ w[5] << 16, x[2] = w[4] ^ w[1] >>> 16 ^ w[7] << 16, x[3] = w[6] ^ w[3] >>> 16 ^ w[1] << 16;
|
|
5056
5056
|
for (var R = 0; R < 4; R++)
|
|
5057
|
-
x[R] = (x[R] << 8 | x[R] >>> 24) & 16711935 | (x[R] << 24 | x[R] >>> 8) & 4278255360,
|
|
5057
|
+
x[R] = (x[R] << 8 | x[R] >>> 24) & 16711935 | (x[R] << 24 | x[R] >>> 8) & 4278255360, v[C + R] ^= x[R];
|
|
5058
5058
|
},
|
|
5059
5059
|
blockSize: 128 / 32,
|
|
5060
5060
|
ivSize: 64 / 32
|
|
5061
5061
|
});
|
|
5062
|
-
function
|
|
5063
|
-
for (var
|
|
5062
|
+
function b() {
|
|
5063
|
+
for (var v = this._X, C = this._C, w = 0; w < 8; w++)
|
|
5064
5064
|
u[w] = C[w];
|
|
5065
5065
|
C[0] = C[0] + 1295307597 + this._b | 0, C[1] = C[1] + 3545052371 + (C[0] >>> 0 < u[0] >>> 0 ? 1 : 0) | 0, C[2] = C[2] + 886263092 + (C[1] >>> 0 < u[1] >>> 0 ? 1 : 0) | 0, C[3] = C[3] + 1295307597 + (C[2] >>> 0 < u[2] >>> 0 ? 1 : 0) | 0, C[4] = C[4] + 3545052371 + (C[3] >>> 0 < u[3] >>> 0 ? 1 : 0) | 0, C[5] = C[5] + 886263092 + (C[4] >>> 0 < u[4] >>> 0 ? 1 : 0) | 0, C[6] = C[6] + 1295307597 + (C[5] >>> 0 < u[5] >>> 0 ? 1 : 0) | 0, C[7] = C[7] + 3545052371 + (C[6] >>> 0 < u[6] >>> 0 ? 1 : 0) | 0, this._b = C[7] >>> 0 < u[7] >>> 0 ? 1 : 0;
|
|
5066
5066
|
for (var w = 0; w < 8; w++) {
|
|
5067
|
-
var R =
|
|
5067
|
+
var R = v[w] + C[w], P = R & 65535, q = R >>> 16, S = ((P * P >>> 17) + P * q >>> 15) + q * q, k = ((R & 4294901760) * R | 0) + ((R & 65535) * R | 0);
|
|
5068
5068
|
o[w] = S ^ k;
|
|
5069
5069
|
}
|
|
5070
|
-
|
|
5070
|
+
v[0] = o[0] + (o[7] << 16 | o[7] >>> 16) + (o[6] << 16 | o[6] >>> 16) | 0, v[1] = o[1] + (o[0] << 8 | o[0] >>> 24) + o[7] | 0, v[2] = o[2] + (o[1] << 16 | o[1] >>> 16) + (o[0] << 16 | o[0] >>> 16) | 0, v[3] = o[3] + (o[2] << 8 | o[2] >>> 24) + o[1] | 0, v[4] = o[4] + (o[3] << 16 | o[3] >>> 16) + (o[2] << 16 | o[2] >>> 16) | 0, v[5] = o[5] + (o[4] << 8 | o[4] >>> 24) + o[3] | 0, v[6] = o[6] + (o[5] << 16 | o[5] >>> 16) + (o[4] << 16 | o[4] >>> 16) | 0, v[7] = o[7] + (o[6] << 8 | o[6] >>> 24) + o[5] | 0;
|
|
5071
5071
|
}
|
|
5072
5072
|
r.RabbitLegacy = i._createHelper(c);
|
|
5073
5073
|
}(), t.RabbitLegacy;
|
|
@@ -5075,10 +5075,10 @@ function Ga() {
|
|
|
5075
5075
|
}(xf)), xf.exports;
|
|
5076
5076
|
}
|
|
5077
5077
|
var vf = { exports: {} }, Ni;
|
|
5078
|
-
function
|
|
5078
|
+
function Ja() {
|
|
5079
5079
|
return Ni || (Ni = 1, function(f, e) {
|
|
5080
5080
|
(function(t, r, a) {
|
|
5081
|
-
f.exports = r($e(), Rt(), Pt(),
|
|
5081
|
+
f.exports = r($e(), Rt(), Pt(), At(), C0());
|
|
5082
5082
|
})(ke, function(t) {
|
|
5083
5083
|
return function() {
|
|
5084
5084
|
var r = t, a = r.lib, i = a.BlockCipher, y = r.algo;
|
|
@@ -6139,20 +6139,20 @@ function Qa() {
|
|
|
6139
6139
|
pbox: [],
|
|
6140
6140
|
sbox: []
|
|
6141
6141
|
};
|
|
6142
|
-
function
|
|
6142
|
+
function b(P, q) {
|
|
6143
6143
|
let S = q >> 24 & 255, k = q >> 16 & 255, T = q >> 8 & 255, H = q & 255, $ = P.sbox[0][S] + P.sbox[1][k];
|
|
6144
6144
|
return $ = $ ^ P.sbox[2][T], $ = $ + P.sbox[3][H], $;
|
|
6145
6145
|
}
|
|
6146
|
-
function
|
|
6146
|
+
function v(P, q, S) {
|
|
6147
6147
|
let k = q, T = S, H;
|
|
6148
6148
|
for (let $ = 0; $ < x; ++$)
|
|
6149
|
-
k = k ^ P.pbox[$], T =
|
|
6149
|
+
k = k ^ P.pbox[$], T = b(P, k) ^ T, H = k, k = T, T = H;
|
|
6150
6150
|
return H = k, k = T, T = H, T = T ^ P.pbox[x], k = k ^ P.pbox[x + 1], { left: k, right: T };
|
|
6151
6151
|
}
|
|
6152
6152
|
function C(P, q, S) {
|
|
6153
6153
|
let k = q, T = S, H;
|
|
6154
6154
|
for (let $ = x + 1; $ > 1; --$)
|
|
6155
|
-
k = k ^ P.pbox[$], T =
|
|
6155
|
+
k = k ^ P.pbox[$], T = b(P, k) ^ T, H = k, k = T, T = H;
|
|
6156
6156
|
return H = k, k = T, T = H, T = T ^ P.pbox[1], k = k ^ P.pbox[0], { left: k, right: T };
|
|
6157
6157
|
}
|
|
6158
6158
|
function w(P, q, S) {
|
|
@@ -6166,10 +6166,10 @@ function Qa() {
|
|
|
6166
6166
|
P.pbox[K] = u[K] ^ q[k], k++, k >= S && (k = 0);
|
|
6167
6167
|
let T = 0, H = 0, $ = 0;
|
|
6168
6168
|
for (let K = 0; K < x + 2; K += 2)
|
|
6169
|
-
$ =
|
|
6169
|
+
$ = v(P, T, H), T = $.left, H = $.right, P.pbox[K] = T, P.pbox[K + 1] = H;
|
|
6170
6170
|
for (let K = 0; K < 4; K++)
|
|
6171
6171
|
for (let X = 0; X < 256; X += 2)
|
|
6172
|
-
$ =
|
|
6172
|
+
$ = v(P, T, H), T = $.left, H = $.right, P.sbox[K][X] = T, P.sbox[K][X + 1] = H;
|
|
6173
6173
|
return !0;
|
|
6174
6174
|
}
|
|
6175
6175
|
var R = y.Blowfish = i.extend({
|
|
@@ -6180,7 +6180,7 @@ function Qa() {
|
|
|
6180
6180
|
}
|
|
6181
6181
|
},
|
|
6182
6182
|
encryptBlock: function(P, q) {
|
|
6183
|
-
var S =
|
|
6183
|
+
var S = v(c, P[q], P[q + 1]);
|
|
6184
6184
|
P[q] = S.left, P[q + 1] = S.right;
|
|
6185
6185
|
},
|
|
6186
6186
|
decryptBlock: function(P, q) {
|
|
@@ -6198,33 +6198,33 @@ function Qa() {
|
|
|
6198
6198
|
}
|
|
6199
6199
|
(function(f, e) {
|
|
6200
6200
|
(function(t, r, a) {
|
|
6201
|
-
f.exports = r($e(), _r(),
|
|
6201
|
+
f.exports = r($e(), _r(), Sa(), Da(), Rt(), Ra(), Pt(), bn(), Nf(), Pa(), pn(), ka(), Ia(), Ta(), Lf(), Oa(), At(), C0(), za(), qa(), Na(), La(), Ha(), Ua(), $a(), Wa(), Ya(), Ka(), ja(), Va(), Xa(), Za(), Ga(), Qa(), Ja());
|
|
6202
6202
|
})(ke, function(t) {
|
|
6203
6203
|
return t;
|
|
6204
6204
|
});
|
|
6205
6205
|
})(xn);
|
|
6206
|
-
var
|
|
6207
|
-
const
|
|
6206
|
+
var es = xn.exports;
|
|
6207
|
+
const ut = /* @__PURE__ */ sn(es);
|
|
6208
6208
|
var yn = {};
|
|
6209
|
-
const
|
|
6209
|
+
const ts = "elliptic", rs = "6.5.5", fs = "EC cryptography", is = "lib/elliptic.js", ns = [
|
|
6210
6210
|
"lib"
|
|
6211
|
-
],
|
|
6211
|
+
], as = {
|
|
6212
6212
|
lint: "eslint lib test",
|
|
6213
6213
|
"lint:fix": "npm run lint -- --fix",
|
|
6214
6214
|
unit: "istanbul test _mocha --reporter=spec test/index.js",
|
|
6215
6215
|
test: "npm run lint && npm run unit",
|
|
6216
6216
|
version: "grunt dist && git add dist/"
|
|
6217
|
-
},
|
|
6217
|
+
}, ss = {
|
|
6218
6218
|
type: "git",
|
|
6219
6219
|
url: "git@github.com:indutny/elliptic"
|
|
6220
|
-
},
|
|
6220
|
+
}, os = [
|
|
6221
6221
|
"EC",
|
|
6222
6222
|
"Elliptic",
|
|
6223
6223
|
"curve",
|
|
6224
6224
|
"Cryptography"
|
|
6225
|
-
],
|
|
6225
|
+
], cs = "Fedor Indutny <fedor@indutny.com>", ds = "MIT", hs = {
|
|
6226
6226
|
url: "https://github.com/indutny/elliptic/issues"
|
|
6227
|
-
},
|
|
6227
|
+
}, us = "https://github.com/indutny/elliptic", ls = {
|
|
6228
6228
|
brfs: "^2.0.2",
|
|
6229
6229
|
coveralls: "^3.1.0",
|
|
6230
6230
|
eslint: "^7.6.0",
|
|
@@ -6238,7 +6238,7 @@ const es = "elliptic", ts = "6.5.5", rs = "EC cryptography", fs = "lib/elliptic.
|
|
|
6238
6238
|
"grunt-saucelabs": "^9.0.1",
|
|
6239
6239
|
istanbul: "^0.4.5",
|
|
6240
6240
|
mocha: "^8.0.1"
|
|
6241
|
-
},
|
|
6241
|
+
}, xs = {
|
|
6242
6242
|
"bn.js": "^4.11.9",
|
|
6243
6243
|
brorand: "^1.1.0",
|
|
6244
6244
|
"hash.js": "^1.0.0",
|
|
@@ -6246,21 +6246,21 @@ const es = "elliptic", ts = "6.5.5", rs = "EC cryptography", fs = "lib/elliptic.
|
|
|
6246
6246
|
inherits: "^2.0.4",
|
|
6247
6247
|
"minimalistic-assert": "^1.0.1",
|
|
6248
6248
|
"minimalistic-crypto-utils": "^1.0.1"
|
|
6249
|
-
},
|
|
6250
|
-
name:
|
|
6251
|
-
version:
|
|
6252
|
-
description:
|
|
6253
|
-
main:
|
|
6254
|
-
files:
|
|
6255
|
-
scripts:
|
|
6256
|
-
repository:
|
|
6257
|
-
keywords:
|
|
6258
|
-
author:
|
|
6259
|
-
license:
|
|
6260
|
-
bugs:
|
|
6261
|
-
homepage:
|
|
6262
|
-
devDependencies:
|
|
6263
|
-
dependencies:
|
|
6249
|
+
}, vs = {
|
|
6250
|
+
name: ts,
|
|
6251
|
+
version: rs,
|
|
6252
|
+
description: fs,
|
|
6253
|
+
main: is,
|
|
6254
|
+
files: ns,
|
|
6255
|
+
scripts: as,
|
|
6256
|
+
repository: ss,
|
|
6257
|
+
keywords: os,
|
|
6258
|
+
author: cs,
|
|
6259
|
+
license: ds,
|
|
6260
|
+
bugs: hs,
|
|
6261
|
+
homepage: us,
|
|
6262
|
+
devDependencies: ls,
|
|
6263
|
+
dependencies: xs
|
|
6264
6264
|
};
|
|
6265
6265
|
var Y0 = {}, Hf = { exports: {} };
|
|
6266
6266
|
Hf.exports;
|
|
@@ -6417,7 +6417,7 @@ Hf.exports;
|
|
|
6417
6417
|
"00000000000000000000000",
|
|
6418
6418
|
"000000000000000000000000",
|
|
6419
6419
|
"0000000000000000000000000"
|
|
6420
|
-
],
|
|
6420
|
+
], b = [
|
|
6421
6421
|
0,
|
|
6422
6422
|
0,
|
|
6423
6423
|
25,
|
|
@@ -6455,7 +6455,7 @@ Hf.exports;
|
|
|
6455
6455
|
5,
|
|
6456
6456
|
5,
|
|
6457
6457
|
5
|
|
6458
|
-
],
|
|
6458
|
+
], v = [
|
|
6459
6459
|
0,
|
|
6460
6460
|
0,
|
|
6461
6461
|
33554432,
|
|
@@ -6508,7 +6508,7 @@ Hf.exports;
|
|
|
6508
6508
|
return this.negative !== 0 && (g = "-" + g), g;
|
|
6509
6509
|
}
|
|
6510
6510
|
if (n === (n | 0) && n >= 2 && n <= 36) {
|
|
6511
|
-
var h =
|
|
6511
|
+
var h = b[n], E = v[n];
|
|
6512
6512
|
g = "";
|
|
6513
6513
|
var j = this.clone();
|
|
6514
6514
|
for (j.negative = 0; !j.isZero(); ) {
|
|
@@ -6699,7 +6699,7 @@ Hf.exports;
|
|
|
6699
6699
|
return D !== 0 ? d.words[h] = D | 0 : d.length--, d.strip();
|
|
6700
6700
|
}
|
|
6701
6701
|
var R = function(n, d, g) {
|
|
6702
|
-
var B = n.words, F = d.words, z = g.words, N = 0, D, h, E, j = B[0] | 0, Y = j & 8191, W = j >>> 13, re = B[1] | 0, ce = re & 8191, we = re >>> 13, Ae = B[2] | 0, Me = Ae & 8191, Fe = Ae >>> 13, Z0 = B[3] | 0, We = Z0 & 8191, Oe = Z0 >>> 13, _0 = B[4] | 0, Ge = _0 & 8191, Ye = _0 >>> 13, $0 = B[5] | 0, Qe = $0 & 8191, ze = $0 >>> 13, O0 = B[6] | 0, qe = O0 & 8191, Se = O0 >>> 13, F0 = B[7] | 0, Je = F0 & 8191, f0 = F0 >>> 13, S0 = B[8] | 0, Ne = S0 & 8191, u0 = S0 >>> 13, G0 = B[9] | 0, l0 = G0 & 8191, He = G0 >>> 13, z0 = F[0] | 0, a0 = z0 & 8191, r0 = z0 >>> 13, q0 = F[1] | 0, i0 = q0 & 8191, s0 = q0 >>> 13, W0 = F[2] | 0, e0 = W0 & 8191, n0 = W0 >>> 13, N0 = F[3] | 0, o0 = N0 & 8191, x0 = N0 >>> 13, D0 = F[4] | 0, t0 = D0 & 8191, Ve = D0 >>> 13, tt = F[5] | 0, c0 = tt & 8191, d0 = tt >>> 13,
|
|
6702
|
+
var B = n.words, F = d.words, z = g.words, N = 0, D, h, E, j = B[0] | 0, Y = j & 8191, W = j >>> 13, re = B[1] | 0, ce = re & 8191, we = re >>> 13, Ae = B[2] | 0, Me = Ae & 8191, Fe = Ae >>> 13, Z0 = B[3] | 0, We = Z0 & 8191, Oe = Z0 >>> 13, _0 = B[4] | 0, Ge = _0 & 8191, Ye = _0 >>> 13, $0 = B[5] | 0, Qe = $0 & 8191, ze = $0 >>> 13, O0 = B[6] | 0, qe = O0 & 8191, Se = O0 >>> 13, F0 = B[7] | 0, Je = F0 & 8191, f0 = F0 >>> 13, S0 = B[8] | 0, Ne = S0 & 8191, u0 = S0 >>> 13, G0 = B[9] | 0, l0 = G0 & 8191, He = G0 >>> 13, z0 = F[0] | 0, a0 = z0 & 8191, r0 = z0 >>> 13, q0 = F[1] | 0, i0 = q0 & 8191, s0 = q0 >>> 13, W0 = F[2] | 0, e0 = W0 & 8191, n0 = W0 >>> 13, N0 = F[3] | 0, o0 = N0 & 8191, x0 = N0 >>> 13, D0 = F[4] | 0, t0 = D0 & 8191, Ve = D0 >>> 13, tt = F[5] | 0, c0 = tt & 8191, d0 = tt >>> 13, yt = F[6] | 0, Ie = yt & 8191, Re = yt >>> 13, l = F[7] | 0, _ = l & 8191, m = l >>> 13, s = F[8] | 0, M = s & 8191, p = s >>> 13, I = F[9] | 0, L = I & 8191, V = I >>> 13;
|
|
6703
6703
|
g.negative = n.negative ^ d.negative, g.length = 19, D = Math.imul(Y, a0), h = Math.imul(Y, r0), h = h + Math.imul(W, a0) | 0, E = Math.imul(W, r0);
|
|
6704
6704
|
var ne = (N + D | 0) + ((h & 8191) << 13) | 0;
|
|
6705
6705
|
N = (E + (h >>> 13) | 0) + (ne >>> 26) | 0, ne &= 67108863, D = Math.imul(ce, a0), h = Math.imul(ce, r0), h = h + Math.imul(we, a0) | 0, E = Math.imul(we, r0), D = D + Math.imul(Y, i0) | 0, h = h + Math.imul(Y, s0) | 0, h = h + Math.imul(W, i0) | 0, E = E + Math.imul(W, s0) | 0;
|
|
@@ -7442,7 +7442,7 @@ Hf.exports;
|
|
|
7442
7442
|
};
|
|
7443
7443
|
})(f, ke);
|
|
7444
7444
|
})(Hf);
|
|
7445
|
-
var
|
|
7445
|
+
var pt = Hf.exports, kt = gn;
|
|
7446
7446
|
function gn(f, e) {
|
|
7447
7447
|
if (!f)
|
|
7448
7448
|
throw new Error(e || "Assertion failed");
|
|
@@ -7471,8 +7471,8 @@ var Uf = {};
|
|
|
7471
7471
|
x.push(parseInt(i[u] + i[u + 1], 16));
|
|
7472
7472
|
} else
|
|
7473
7473
|
for (var u = 0; u < i.length; u++) {
|
|
7474
|
-
var o = i.charCodeAt(u), c = o >> 8,
|
|
7475
|
-
c ? x.push(c,
|
|
7474
|
+
var o = i.charCodeAt(u), c = o >> 8, b = o & 255;
|
|
7475
|
+
c ? x.push(c, b) : x.push(b);
|
|
7476
7476
|
}
|
|
7477
7477
|
return x;
|
|
7478
7478
|
}
|
|
@@ -7491,13 +7491,13 @@ var Uf = {};
|
|
|
7491
7491
|
};
|
|
7492
7492
|
})(Uf);
|
|
7493
7493
|
(function(f) {
|
|
7494
|
-
var e = f, t =
|
|
7494
|
+
var e = f, t = pt, r = kt, a = Uf;
|
|
7495
7495
|
e.assert = r, e.toArray = a.toArray, e.zero2 = a.zero2, e.toHex = a.toHex, e.encode = a.encode;
|
|
7496
|
-
function i(c,
|
|
7497
|
-
var C = new Array(Math.max(c.bitLength(),
|
|
7496
|
+
function i(c, b, v) {
|
|
7497
|
+
var C = new Array(Math.max(c.bitLength(), v) + 1), w;
|
|
7498
7498
|
for (w = 0; w < C.length; w += 1)
|
|
7499
7499
|
C[w] = 0;
|
|
7500
|
-
var R = 1 <<
|
|
7500
|
+
var R = 1 << b + 1, P = c.clone();
|
|
7501
7501
|
for (w = 0; w < C.length; w++) {
|
|
7502
7502
|
var q, S = P.andln(R - 1);
|
|
7503
7503
|
P.isOdd() ? (S > (R >> 1) - 1 ? q = (R >> 1) - S : q = S, P.isubn(q)) : q = 0, C[w] = q, P.iushrn(1);
|
|
@@ -7505,27 +7505,27 @@ var Uf = {};
|
|
|
7505
7505
|
return C;
|
|
7506
7506
|
}
|
|
7507
7507
|
e.getNAF = i;
|
|
7508
|
-
function y(c,
|
|
7509
|
-
var
|
|
7508
|
+
function y(c, b) {
|
|
7509
|
+
var v = [
|
|
7510
7510
|
[],
|
|
7511
7511
|
[]
|
|
7512
7512
|
];
|
|
7513
|
-
c = c.clone(),
|
|
7514
|
-
for (var C = 0, w = 0, R; c.cmpn(-C) > 0 ||
|
|
7515
|
-
var P = c.andln(3) + C & 3, q =
|
|
7513
|
+
c = c.clone(), b = b.clone();
|
|
7514
|
+
for (var C = 0, w = 0, R; c.cmpn(-C) > 0 || b.cmpn(-w) > 0; ) {
|
|
7515
|
+
var P = c.andln(3) + C & 3, q = b.andln(3) + w & 3;
|
|
7516
7516
|
P === 3 && (P = -1), q === 3 && (q = -1);
|
|
7517
7517
|
var S;
|
|
7518
|
-
P & 1 ? (R = c.andln(7) + C & 7, (R === 3 || R === 5) && q === 2 ? S = -P : S = P) : S = 0,
|
|
7518
|
+
P & 1 ? (R = c.andln(7) + C & 7, (R === 3 || R === 5) && q === 2 ? S = -P : S = P) : S = 0, v[0].push(S);
|
|
7519
7519
|
var k;
|
|
7520
|
-
q & 1 ? (R =
|
|
7520
|
+
q & 1 ? (R = b.andln(7) + w & 7, (R === 3 || R === 5) && P === 2 ? k = -q : k = q) : k = 0, v[1].push(k), 2 * C === S + 1 && (C = 1 - C), 2 * w === k + 1 && (w = 1 - w), c.iushrn(1), b.iushrn(1);
|
|
7521
7521
|
}
|
|
7522
|
-
return
|
|
7522
|
+
return v;
|
|
7523
7523
|
}
|
|
7524
7524
|
e.getJSF = y;
|
|
7525
|
-
function x(c,
|
|
7526
|
-
var C = "_" +
|
|
7527
|
-
c.prototype[
|
|
7528
|
-
return this[C] !== void 0 ? this[C] : this[C] =
|
|
7525
|
+
function x(c, b, v) {
|
|
7526
|
+
var C = "_" + b;
|
|
7527
|
+
c.prototype[b] = function() {
|
|
7528
|
+
return this[C] !== void 0 ? this[C] : this[C] = v.call(this);
|
|
7529
7529
|
};
|
|
7530
7530
|
}
|
|
7531
7531
|
e.cachedProperty = x;
|
|
@@ -7540,16 +7540,16 @@ var Uf = {};
|
|
|
7540
7540
|
})(Y0);
|
|
7541
7541
|
var $f = { exports: {} }, bf;
|
|
7542
7542
|
$f.exports = function(e) {
|
|
7543
|
-
return bf || (bf = new
|
|
7543
|
+
return bf || (bf = new mt(null)), bf.generate(e);
|
|
7544
7544
|
};
|
|
7545
|
-
function
|
|
7545
|
+
function mt(f) {
|
|
7546
7546
|
this.rand = f;
|
|
7547
7547
|
}
|
|
7548
|
-
$f.exports.Rand =
|
|
7549
|
-
|
|
7548
|
+
$f.exports.Rand = mt;
|
|
7549
|
+
mt.prototype.generate = function(e) {
|
|
7550
7550
|
return this._rand(e);
|
|
7551
7551
|
};
|
|
7552
|
-
|
|
7552
|
+
mt.prototype._rand = function(e) {
|
|
7553
7553
|
if (this.rand.getBytes)
|
|
7554
7554
|
return this.rand.getBytes(e);
|
|
7555
7555
|
for (var t = new Uint8Array(e), r = 0; r < t.length; r++)
|
|
@@ -7557,13 +7557,13 @@ gt.prototype._rand = function(e) {
|
|
|
7557
7557
|
return t;
|
|
7558
7558
|
};
|
|
7559
7559
|
if (typeof self == "object")
|
|
7560
|
-
self.crypto && self.crypto.getRandomValues ?
|
|
7560
|
+
self.crypto && self.crypto.getRandomValues ? mt.prototype._rand = function(e) {
|
|
7561
7561
|
var t = new Uint8Array(e);
|
|
7562
7562
|
return self.crypto.getRandomValues(t), t;
|
|
7563
|
-
} : self.msCrypto && self.msCrypto.getRandomValues ?
|
|
7563
|
+
} : self.msCrypto && self.msCrypto.getRandomValues ? mt.prototype._rand = function(e) {
|
|
7564
7564
|
var t = new Uint8Array(e);
|
|
7565
7565
|
return self.msCrypto.getRandomValues(t), t;
|
|
7566
|
-
} : typeof window == "object" && (
|
|
7566
|
+
} : typeof window == "object" && (mt.prototype._rand = function() {
|
|
7567
7567
|
throw new Error("Not implemented yet");
|
|
7568
7568
|
});
|
|
7569
7569
|
else
|
|
@@ -7571,25 +7571,25 @@ else
|
|
|
7571
7571
|
var Li = mr;
|
|
7572
7572
|
if (typeof Li.randomBytes != "function")
|
|
7573
7573
|
throw new Error("Not supported");
|
|
7574
|
-
|
|
7574
|
+
mt.prototype._rand = function(e) {
|
|
7575
7575
|
return Li.randomBytes(e);
|
|
7576
7576
|
};
|
|
7577
7577
|
} catch {
|
|
7578
7578
|
}
|
|
7579
|
-
var mn = $f.exports, Wf = {},
|
|
7580
|
-
function
|
|
7581
|
-
this.type = f, this.p = new
|
|
7579
|
+
var mn = $f.exports, Wf = {}, Bt = pt, fr = Y0, pr = fr.getNAF, bs = fr.getJSF, yr = fr.assert;
|
|
7580
|
+
function Et(f, e) {
|
|
7581
|
+
this.type = f, this.p = new Bt(e.p, 16), this.red = e.prime ? Bt.red(e.prime) : Bt.mont(this.p), this.zero = new Bt(0).toRed(this.red), this.one = new Bt(1).toRed(this.red), this.two = new Bt(2).toRed(this.red), this.n = e.n && new Bt(e.n, 16), this.g = e.g && this.pointFromJSON(e.g, e.gRed), this._wnafT1 = new Array(4), this._wnafT2 = new Array(4), this._wnafT3 = new Array(4), this._wnafT4 = new Array(4), this._bitLength = this.n ? this.n.bitLength() : 0;
|
|
7582
7582
|
var t = this.n && this.p.div(this.n);
|
|
7583
7583
|
!t || t.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0, this.redN = this.n.toRed(this.red));
|
|
7584
7584
|
}
|
|
7585
|
-
var Ar =
|
|
7586
|
-
|
|
7585
|
+
var Ar = Et;
|
|
7586
|
+
Et.prototype.point = function() {
|
|
7587
7587
|
throw new Error("Not implemented");
|
|
7588
7588
|
};
|
|
7589
|
-
|
|
7589
|
+
Et.prototype.validate = function() {
|
|
7590
7590
|
throw new Error("Not implemented");
|
|
7591
7591
|
};
|
|
7592
|
-
|
|
7592
|
+
Et.prototype._fixedNafMul = function(e, t) {
|
|
7593
7593
|
yr(e.precomputed);
|
|
7594
7594
|
var r = e._getDoubles(), a = pr(t, 1, this._bitLength), i = (1 << r.step + 1) - (r.step % 2 === 0 ? 2 : 1);
|
|
7595
7595
|
i /= 3;
|
|
@@ -7600,14 +7600,14 @@ At.prototype._fixedNafMul = function(e, t) {
|
|
|
7600
7600
|
u = (u << 1) + a[o];
|
|
7601
7601
|
y.push(u);
|
|
7602
7602
|
}
|
|
7603
|
-
for (var c = this.jpoint(null, null, null),
|
|
7603
|
+
for (var c = this.jpoint(null, null, null), b = this.jpoint(null, null, null), v = i; v > 0; v--) {
|
|
7604
7604
|
for (x = 0; x < y.length; x++)
|
|
7605
|
-
u = y[x], u ===
|
|
7606
|
-
c = c.add(
|
|
7605
|
+
u = y[x], u === v ? b = b.mixedAdd(r.points[x]) : u === -v && (b = b.mixedAdd(r.points[x].neg()));
|
|
7606
|
+
c = c.add(b);
|
|
7607
7607
|
}
|
|
7608
7608
|
return c.toP();
|
|
7609
7609
|
};
|
|
7610
|
-
|
|
7610
|
+
Et.prototype._wnafMul = function(e, t) {
|
|
7611
7611
|
var r = 4, a = e._getNAFPoints(r);
|
|
7612
7612
|
r = a.wnd;
|
|
7613
7613
|
for (var i = a.points, y = pr(t, r, this._bitLength), x = this.jpoint(null, null, null), u = y.length - 1; u >= 0; u--) {
|
|
@@ -7620,11 +7620,11 @@ At.prototype._wnafMul = function(e, t) {
|
|
|
7620
7620
|
}
|
|
7621
7621
|
return e.type === "affine" ? x.toP() : x;
|
|
7622
7622
|
};
|
|
7623
|
-
|
|
7624
|
-
var y = this._wnafT1, x = this._wnafT2, u = this._wnafT3, o = 0, c,
|
|
7623
|
+
Et.prototype._wnafMulAdd = function(e, t, r, a, i) {
|
|
7624
|
+
var y = this._wnafT1, x = this._wnafT2, u = this._wnafT3, o = 0, c, b, v;
|
|
7625
7625
|
for (c = 0; c < a; c++) {
|
|
7626
|
-
|
|
7627
|
-
var C =
|
|
7626
|
+
v = t[c];
|
|
7627
|
+
var C = v._getNAFPoints(e);
|
|
7628
7628
|
y[c] = C.wnd, x[c] = C.points;
|
|
7629
7629
|
}
|
|
7630
7630
|
for (c = a - 1; c >= 1; c -= 2) {
|
|
@@ -7663,27 +7663,27 @@ At.prototype._wnafMulAdd = function(e, t, r, a, i) {
|
|
|
7663
7663
|
/* 1 0 */
|
|
7664
7664
|
3
|
|
7665
7665
|
/* 1 1 */
|
|
7666
|
-
], S =
|
|
7667
|
-
for (o = Math.max(S[0].length, o), u[w] = new Array(o), u[R] = new Array(o),
|
|
7668
|
-
var k = S[0][
|
|
7669
|
-
u[w][
|
|
7666
|
+
], S = bs(r[w], r[R]);
|
|
7667
|
+
for (o = Math.max(S[0].length, o), u[w] = new Array(o), u[R] = new Array(o), b = 0; b < o; b++) {
|
|
7668
|
+
var k = S[0][b] | 0, T = S[1][b] | 0;
|
|
7669
|
+
u[w][b] = q[(k + 1) * 3 + (T + 1)], u[R][b] = 0, x[w] = P;
|
|
7670
7670
|
}
|
|
7671
7671
|
}
|
|
7672
7672
|
var H = this.jpoint(null, null, null), $ = this._wnafT4;
|
|
7673
7673
|
for (c = o; c >= 0; c--) {
|
|
7674
7674
|
for (var K = 0; c >= 0; ) {
|
|
7675
7675
|
var X = !0;
|
|
7676
|
-
for (
|
|
7677
|
-
$[
|
|
7676
|
+
for (b = 0; b < a; b++)
|
|
7677
|
+
$[b] = u[b][c] | 0, $[b] !== 0 && (X = !1);
|
|
7678
7678
|
if (!X)
|
|
7679
7679
|
break;
|
|
7680
7680
|
K++, c--;
|
|
7681
7681
|
}
|
|
7682
7682
|
if (c >= 0 && K++, H = H.dblp(K), c < 0)
|
|
7683
7683
|
break;
|
|
7684
|
-
for (
|
|
7685
|
-
var Q = $[
|
|
7686
|
-
Q !== 0 && (Q > 0 ?
|
|
7684
|
+
for (b = 0; b < a; b++) {
|
|
7685
|
+
var Q = $[b];
|
|
7686
|
+
Q !== 0 && (Q > 0 ? v = x[b][Q - 1 >> 1] : Q < 0 && (v = x[b][-Q - 1 >> 1].neg()), v.type === "affine" ? H = H.mixedAdd(v) : H = H.add(v));
|
|
7687
7687
|
}
|
|
7688
7688
|
}
|
|
7689
7689
|
for (c = 0; c < a; c++)
|
|
@@ -7693,14 +7693,14 @@ At.prototype._wnafMulAdd = function(e, t, r, a, i) {
|
|
|
7693
7693
|
function V0(f, e) {
|
|
7694
7694
|
this.curve = f, this.type = e, this.precomputed = null;
|
|
7695
7695
|
}
|
|
7696
|
-
|
|
7696
|
+
Et.BasePoint = V0;
|
|
7697
7697
|
V0.prototype.eq = function() {
|
|
7698
7698
|
throw new Error("Not implemented");
|
|
7699
7699
|
};
|
|
7700
7700
|
V0.prototype.validate = function() {
|
|
7701
7701
|
return this.curve.validate(this);
|
|
7702
7702
|
};
|
|
7703
|
-
|
|
7703
|
+
Et.prototype.decodePoint = function(e, t) {
|
|
7704
7704
|
e = fr.toArray(e, t);
|
|
7705
7705
|
var r = this.p.byteLength();
|
|
7706
7706
|
if ((e[0] === 4 || e[0] === 6 || e[0] === 7) && e.length - 1 === 2 * r) {
|
|
@@ -7789,12 +7789,12 @@ typeof Object.create == "function" ? Mf.exports = function(e, t) {
|
|
|
7789
7789
|
r.prototype = t.prototype, e.prototype = new r(), e.prototype.constructor = e;
|
|
7790
7790
|
}
|
|
7791
7791
|
};
|
|
7792
|
-
var Er = Mf.exports,
|
|
7792
|
+
var Er = Mf.exports, ps = Y0, g0 = pt, Yf = Er, Ut = Ar, ys = ps.assert;
|
|
7793
7793
|
function X0(f) {
|
|
7794
7794
|
Ut.call(this, "short", f), this.a = new g0(f.a, 16).toRed(this.red), this.b = new g0(f.b, 16).toRed(this.red), this.tinv = this.two.redInvm(), this.zeroA = this.a.fromRed().cmpn(0) === 0, this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0, this.endo = this._getEndomorphism(f), this._endoWnafT1 = new Array(4), this._endoWnafT2 = new Array(4);
|
|
7795
7795
|
}
|
|
7796
7796
|
Yf(X0, Ut);
|
|
7797
|
-
var
|
|
7797
|
+
var gs = X0;
|
|
7798
7798
|
X0.prototype._getEndomorphism = function(e) {
|
|
7799
7799
|
if (!(!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)) {
|
|
7800
7800
|
var t, r;
|
|
@@ -7808,7 +7808,7 @@ X0.prototype._getEndomorphism = function(e) {
|
|
|
7808
7808
|
r = new g0(e.lambda, 16);
|
|
7809
7809
|
else {
|
|
7810
7810
|
var i = this._getEndoRoots(this.n);
|
|
7811
|
-
this.g.mul(i[0]).x.cmp(this.g.x.redMul(t)) === 0 ? r = i[0] : (r = i[1],
|
|
7811
|
+
this.g.mul(i[0]).x.cmp(this.g.x.redMul(t)) === 0 ? r = i[0] : (r = i[1], ys(this.g.mul(r).x.cmp(this.g.x.redMul(t)) === 0));
|
|
7812
7812
|
}
|
|
7813
7813
|
var y;
|
|
7814
7814
|
return e.basis ? y = e.basis.map(function(x) {
|
|
@@ -7828,26 +7828,26 @@ X0.prototype._getEndoRoots = function(e) {
|
|
|
7828
7828
|
return [y, x];
|
|
7829
7829
|
};
|
|
7830
7830
|
X0.prototype._getEndoBasis = function(e) {
|
|
7831
|
-
for (var t = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), r = e, a = this.n.clone(), i = new g0(1), y = new g0(0), x = new g0(0), u = new g0(1), o, c,
|
|
7831
|
+
for (var t = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), r = e, a = this.n.clone(), i = new g0(1), y = new g0(0), x = new g0(0), u = new g0(1), o, c, b, v, C, w, R, P = 0, q, S; r.cmpn(0) !== 0; ) {
|
|
7832
7832
|
var k = a.div(r);
|
|
7833
7833
|
q = a.sub(k.mul(r)), S = x.sub(k.mul(i));
|
|
7834
7834
|
var T = u.sub(k.mul(y));
|
|
7835
|
-
if (!
|
|
7836
|
-
o = R.neg(), c = i,
|
|
7837
|
-
else if (
|
|
7835
|
+
if (!b && q.cmp(t) < 0)
|
|
7836
|
+
o = R.neg(), c = i, b = q.neg(), v = S;
|
|
7837
|
+
else if (b && ++P === 2)
|
|
7838
7838
|
break;
|
|
7839
7839
|
R = q, a = r, r = q, x = i, i = S, u = y, y = T;
|
|
7840
7840
|
}
|
|
7841
7841
|
C = q.neg(), w = S;
|
|
7842
|
-
var H =
|
|
7843
|
-
return $.cmp(H) >= 0 && (C = o, w = c),
|
|
7844
|
-
{ a:
|
|
7842
|
+
var H = b.sqr().add(v.sqr()), $ = C.sqr().add(w.sqr());
|
|
7843
|
+
return $.cmp(H) >= 0 && (C = o, w = c), b.negative && (b = b.neg(), v = v.neg()), C.negative && (C = C.neg(), w = w.neg()), [
|
|
7844
|
+
{ a: b, b: v },
|
|
7845
7845
|
{ a: C, b: w }
|
|
7846
7846
|
];
|
|
7847
7847
|
};
|
|
7848
7848
|
X0.prototype._endoSplit = function(e) {
|
|
7849
|
-
var t = this.endo.basis, r = t[0], a = t[1], i = a.b.mul(e).divRound(this.n), y = r.b.neg().mul(e).divRound(this.n), x = i.mul(r.a), u = y.mul(a.a), o = i.mul(r.b), c = y.mul(a.b),
|
|
7850
|
-
return { k1:
|
|
7849
|
+
var t = this.endo.basis, r = t[0], a = t[1], i = a.b.mul(e).divRound(this.n), y = r.b.neg().mul(e).divRound(this.n), x = i.mul(r.a), u = y.mul(a.a), o = i.mul(r.b), c = y.mul(a.b), b = e.sub(x).sub(u), v = o.add(c).neg();
|
|
7850
|
+
return { k1: b, k2: v };
|
|
7851
7851
|
};
|
|
7852
7852
|
X0.prototype.pointFromX = function(e, t) {
|
|
7853
7853
|
e = new g0(e, 16), e.red || (e = e.toRed(this.red));
|
|
@@ -7868,8 +7868,8 @@ X0.prototype._endoWnafMulAdd = function(e, t, r) {
|
|
|
7868
7868
|
var x = this._endoSplit(t[y]), u = e[y], o = u._getBeta();
|
|
7869
7869
|
x.k1.negative && (x.k1.ineg(), u = u.neg(!0)), x.k2.negative && (x.k2.ineg(), o = o.neg(!0)), a[y * 2] = u, a[y * 2 + 1] = o, i[y * 2] = x.k1, i[y * 2 + 1] = x.k2;
|
|
7870
7870
|
}
|
|
7871
|
-
for (var c = this._wnafMulAdd(1, a, i, y * 2, r),
|
|
7872
|
-
a[
|
|
7871
|
+
for (var c = this._wnafMulAdd(1, a, i, y * 2, r), b = 0; b < y * 2; b++)
|
|
7872
|
+
a[b] = null, i[b] = null;
|
|
7873
7873
|
return c;
|
|
7874
7874
|
};
|
|
7875
7875
|
function M0(f, e, t, r) {
|
|
@@ -8042,7 +8042,7 @@ R0.prototype.add = function(e) {
|
|
|
8042
8042
|
var t = e.z.redSqr(), r = this.z.redSqr(), a = this.x.redMul(t), i = e.x.redMul(r), y = this.y.redMul(t.redMul(e.z)), x = e.y.redMul(r.redMul(this.z)), u = a.redSub(i), o = y.redSub(x);
|
|
8043
8043
|
if (u.cmpn(0) === 0)
|
|
8044
8044
|
return o.cmpn(0) !== 0 ? this.curve.jpoint(null, null, null) : this.dbl();
|
|
8045
|
-
var c = u.redSqr(),
|
|
8045
|
+
var c = u.redSqr(), b = c.redMul(u), v = a.redMul(c), C = o.redSqr().redIAdd(b).redISub(v).redISub(v), w = o.redMul(v.redISub(C)).redISub(y.redMul(b)), R = this.z.redMul(e.z).redMul(u);
|
|
8046
8046
|
return this.curve.jpoint(C, w, R);
|
|
8047
8047
|
};
|
|
8048
8048
|
R0.prototype.mixedAdd = function(e) {
|
|
@@ -8053,8 +8053,8 @@ R0.prototype.mixedAdd = function(e) {
|
|
|
8053
8053
|
var t = this.z.redSqr(), r = this.x, a = e.x.redMul(t), i = this.y, y = e.y.redMul(t).redMul(this.z), x = r.redSub(a), u = i.redSub(y);
|
|
8054
8054
|
if (x.cmpn(0) === 0)
|
|
8055
8055
|
return u.cmpn(0) !== 0 ? this.curve.jpoint(null, null, null) : this.dbl();
|
|
8056
|
-
var o = x.redSqr(), c = o.redMul(x),
|
|
8057
|
-
return this.curve.jpoint(
|
|
8056
|
+
var o = x.redSqr(), c = o.redMul(x), b = r.redMul(o), v = u.redSqr().redIAdd(c).redISub(b).redISub(b), C = u.redMul(b.redISub(v)).redISub(i.redMul(c)), w = this.z.redMul(x);
|
|
8057
|
+
return this.curve.jpoint(v, C, w);
|
|
8058
8058
|
};
|
|
8059
8059
|
R0.prototype.dblp = function(e) {
|
|
8060
8060
|
if (e === 0)
|
|
@@ -8072,7 +8072,7 @@ R0.prototype.dblp = function(e) {
|
|
|
8072
8072
|
}
|
|
8073
8073
|
var a = this.curve.a, i = this.curve.tinv, y = this.x, x = this.y, u = this.z, o = u.redSqr().redSqr(), c = x.redAdd(x);
|
|
8074
8074
|
for (t = 0; t < e; t++) {
|
|
8075
|
-
var
|
|
8075
|
+
var b = y.redSqr(), v = c.redSqr(), C = v.redSqr(), w = b.redAdd(b).redIAdd(b).redIAdd(a.redMul(o)), R = y.redMul(v), P = w.redSqr().redISub(R.redAdd(R)), q = R.redISub(P), S = w.redMul(q);
|
|
8076
8076
|
S = S.redIAdd(S).redISub(C);
|
|
8077
8077
|
var k = c.redMul(u);
|
|
8078
8078
|
t + 1 < e && (o = o.redMul(C)), y = P, u = k, c = S;
|
|
@@ -8090,9 +8090,9 @@ R0.prototype._zeroDbl = function() {
|
|
|
8090
8090
|
var u = a.redAdd(a).redIAdd(a), o = u.redSqr().redISub(x).redISub(x), c = y.redIAdd(y);
|
|
8091
8091
|
c = c.redIAdd(c), c = c.redIAdd(c), e = o, t = u.redMul(x.redISub(o)).redISub(c), r = this.y.redAdd(this.y);
|
|
8092
8092
|
} else {
|
|
8093
|
-
var
|
|
8093
|
+
var b = this.x.redSqr(), v = this.y.redSqr(), C = v.redSqr(), w = this.x.redAdd(v).redSqr().redISub(b).redISub(C);
|
|
8094
8094
|
w = w.redIAdd(w);
|
|
8095
|
-
var R =
|
|
8095
|
+
var R = b.redAdd(b).redIAdd(b), P = R.redSqr(), q = C.redIAdd(C);
|
|
8096
8096
|
q = q.redIAdd(q), q = q.redIAdd(q), e = P.redISub(w).redISub(w), t = R.redMul(w.redISub(e)).redISub(q), r = this.y.redMul(this.z), r = r.redIAdd(r);
|
|
8097
8097
|
}
|
|
8098
8098
|
return this.curve.jpoint(e, t, r);
|
|
@@ -8107,13 +8107,13 @@ R0.prototype._threeDbl = function() {
|
|
|
8107
8107
|
var c = y.redIAdd(y);
|
|
8108
8108
|
c = c.redIAdd(c), c = c.redIAdd(c), t = u.redMul(x.redISub(o)).redISub(c), r = this.y.redAdd(this.y);
|
|
8109
8109
|
} else {
|
|
8110
|
-
var
|
|
8110
|
+
var b = this.z.redSqr(), v = this.y.redSqr(), C = this.x.redMul(v), w = this.x.redSub(b).redMul(this.x.redAdd(b));
|
|
8111
8111
|
w = w.redAdd(w).redIAdd(w);
|
|
8112
8112
|
var R = C.redIAdd(C);
|
|
8113
8113
|
R = R.redIAdd(R);
|
|
8114
8114
|
var P = R.redAdd(R);
|
|
8115
|
-
e = w.redSqr().redISub(P), r = this.y.redAdd(this.z).redSqr().redISub(
|
|
8116
|
-
var q =
|
|
8115
|
+
e = w.redSqr().redISub(P), r = this.y.redAdd(this.z).redSqr().redISub(v).redISub(b);
|
|
8116
|
+
var q = v.redSqr();
|
|
8117
8117
|
q = q.redIAdd(q), q = q.redIAdd(q), q = q.redIAdd(q), t = w.redMul(R.redISub(e)).redISub(q);
|
|
8118
8118
|
}
|
|
8119
8119
|
return this.curve.jpoint(e, t, r);
|
|
@@ -8121,10 +8121,10 @@ R0.prototype._threeDbl = function() {
|
|
|
8121
8121
|
R0.prototype._dbl = function() {
|
|
8122
8122
|
var e = this.curve.a, t = this.x, r = this.y, a = this.z, i = a.redSqr().redSqr(), y = t.redSqr(), x = r.redSqr(), u = y.redAdd(y).redIAdd(y).redIAdd(e.redMul(i)), o = t.redAdd(t);
|
|
8123
8123
|
o = o.redIAdd(o);
|
|
8124
|
-
var c = o.redMul(x),
|
|
8124
|
+
var c = o.redMul(x), b = u.redSqr().redISub(c.redAdd(c)), v = c.redISub(b), C = x.redSqr();
|
|
8125
8125
|
C = C.redIAdd(C), C = C.redIAdd(C), C = C.redIAdd(C);
|
|
8126
|
-
var w = u.redMul(
|
|
8127
|
-
return this.curve.jpoint(
|
|
8126
|
+
var w = u.redMul(v).redISub(C), R = r.redAdd(r).redMul(a);
|
|
8127
|
+
return this.curve.jpoint(b, w, R);
|
|
8128
8128
|
};
|
|
8129
8129
|
R0.prototype.trpl = function() {
|
|
8130
8130
|
if (!this.curve.zeroA)
|
|
@@ -8133,14 +8133,14 @@ R0.prototype.trpl = function() {
|
|
|
8133
8133
|
x = x.redIAdd(x), x = x.redAdd(x).redIAdd(x), x = x.redISub(y);
|
|
8134
8134
|
var u = x.redSqr(), o = a.redIAdd(a);
|
|
8135
8135
|
o = o.redIAdd(o), o = o.redIAdd(o), o = o.redIAdd(o);
|
|
8136
|
-
var c = i.redIAdd(x).redSqr().redISub(y).redISub(u).redISub(o),
|
|
8137
|
-
v = v.redIAdd(v), v = v.redIAdd(v);
|
|
8138
|
-
var b = this.x.redMul(u).redISub(v);
|
|
8136
|
+
var c = i.redIAdd(x).redSqr().redISub(y).redISub(u).redISub(o), b = t.redMul(c);
|
|
8139
8137
|
b = b.redIAdd(b), b = b.redIAdd(b);
|
|
8138
|
+
var v = this.x.redMul(u).redISub(b);
|
|
8139
|
+
v = v.redIAdd(v), v = v.redIAdd(v);
|
|
8140
8140
|
var C = this.y.redMul(c.redMul(o.redISub(c)).redISub(x.redMul(u)));
|
|
8141
8141
|
C = C.redIAdd(C), C = C.redIAdd(C), C = C.redIAdd(C);
|
|
8142
8142
|
var w = this.z.redAdd(x).redSqr().redISub(r).redISub(u);
|
|
8143
|
-
return this.curve.jpoint(
|
|
8143
|
+
return this.curve.jpoint(v, C, w);
|
|
8144
8144
|
};
|
|
8145
8145
|
R0.prototype.mul = function(e, t) {
|
|
8146
8146
|
return e = new g0(e, t), this.curve._wnafMul(this, e);
|
|
@@ -8173,12 +8173,12 @@ R0.prototype.inspect = function() {
|
|
|
8173
8173
|
R0.prototype.isInfinity = function() {
|
|
8174
8174
|
return this.z.cmpn(0) === 0;
|
|
8175
8175
|
};
|
|
8176
|
-
var Ot =
|
|
8176
|
+
var Ot = pt, _n = Er, wr = Ar, ms = Y0;
|
|
8177
8177
|
function $t(f) {
|
|
8178
8178
|
wr.call(this, "mont", f), this.a = new Ot(f.a, 16).toRed(this.red), this.b = new Ot(f.b, 16).toRed(this.red), this.i4 = new Ot(4).toRed(this.red).redInvm(), this.two = new Ot(2).toRed(this.red), this.a24 = this.i4.redMul(this.a.redAdd(this.two));
|
|
8179
8179
|
}
|
|
8180
8180
|
_n($t, wr);
|
|
8181
|
-
var
|
|
8181
|
+
var _s = $t;
|
|
8182
8182
|
$t.prototype.validate = function(e) {
|
|
8183
8183
|
var t = e.normalize().x, r = t.redSqr(), a = r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t), i = a.redSqrt();
|
|
8184
8184
|
return i.redSqr().cmp(a) === 0;
|
|
@@ -8188,7 +8188,7 @@ function B0(f, e, t) {
|
|
|
8188
8188
|
}
|
|
8189
8189
|
_n(B0, wr.BasePoint);
|
|
8190
8190
|
$t.prototype.decodePoint = function(e, t) {
|
|
8191
|
-
return this.point(
|
|
8191
|
+
return this.point(ms.toArray(e, t), 1);
|
|
8192
8192
|
};
|
|
8193
8193
|
$t.prototype.point = function(e, t) {
|
|
8194
8194
|
return new B0(this, e, t);
|
|
@@ -8243,12 +8243,12 @@ B0.prototype.normalize = function() {
|
|
|
8243
8243
|
B0.prototype.getX = function() {
|
|
8244
8244
|
return this.normalize(), this.x.fromRed();
|
|
8245
8245
|
};
|
|
8246
|
-
var
|
|
8246
|
+
var As = Y0, lt = pt, An = Er, Br = Ar, Es = As.assert;
|
|
8247
8247
|
function dt(f) {
|
|
8248
|
-
this.twisted = (f.a | 0) !== 1, this.mOneA = this.twisted && (f.a | 0) === -1, this.extended = this.mOneA, Br.call(this, "edwards", f), this.a = new
|
|
8248
|
+
this.twisted = (f.a | 0) !== 1, this.mOneA = this.twisted && (f.a | 0) === -1, this.extended = this.mOneA, Br.call(this, "edwards", f), this.a = new lt(f.a, 16).umod(this.red.m), this.a = this.a.toRed(this.red), this.c = new lt(f.c, 16).toRed(this.red), this.c2 = this.c.redSqr(), this.d = new lt(f.d, 16).toRed(this.red), this.dd = this.d.redAdd(this.d), Es(!this.twisted || this.c.fromRed().cmpn(1) === 0), this.oneC = (f.c | 0) === 1;
|
|
8249
8249
|
}
|
|
8250
8250
|
An(dt, Br);
|
|
8251
|
-
var
|
|
8251
|
+
var ws = dt;
|
|
8252
8252
|
dt.prototype._mulA = function(e) {
|
|
8253
8253
|
return this.mOneA ? e.redNeg() : this.a.redMul(e);
|
|
8254
8254
|
};
|
|
@@ -8259,7 +8259,7 @@ dt.prototype.jpoint = function(e, t, r, a) {
|
|
|
8259
8259
|
return this.point(e, t, r, a);
|
|
8260
8260
|
};
|
|
8261
8261
|
dt.prototype.pointFromX = function(e, t) {
|
|
8262
|
-
e = new
|
|
8262
|
+
e = new lt(e, 16), e.red || (e = e.toRed(this.red));
|
|
8263
8263
|
var r = e.redSqr(), a = this.c2.redSub(this.a.redMul(r)), i = this.one.redSub(this.c2.redMul(this.d).redMul(r)), y = a.redMul(i.redInvm()), x = y.redSqrt();
|
|
8264
8264
|
if (x.redSqr().redSub(y).cmp(this.zero) !== 0)
|
|
8265
8265
|
throw new Error("invalid point");
|
|
@@ -8267,7 +8267,7 @@ dt.prototype.pointFromX = function(e, t) {
|
|
|
8267
8267
|
return (t && !u || !t && u) && (x = x.redNeg()), this.point(e, x);
|
|
8268
8268
|
};
|
|
8269
8269
|
dt.prototype.pointFromY = function(e, t) {
|
|
8270
|
-
e = new
|
|
8270
|
+
e = new lt(e, 16), e.red || (e = e.toRed(this.red));
|
|
8271
8271
|
var r = e.redSqr(), a = r.redSub(this.c2), i = r.redMul(this.d).redMul(this.c2).redSub(this.a), y = a.redMul(i.redInvm());
|
|
8272
8272
|
if (y.cmp(this.zero) === 0) {
|
|
8273
8273
|
if (t)
|
|
@@ -8287,7 +8287,7 @@ dt.prototype.validate = function(e) {
|
|
|
8287
8287
|
return a.cmp(i) === 0;
|
|
8288
8288
|
};
|
|
8289
8289
|
function v0(f, e, t, r, a) {
|
|
8290
|
-
Br.BasePoint.call(this, f, "projective"), e === null && t === null && r === null ? (this.x = this.curve.zero, this.y = this.curve.one, this.z = this.curve.one, this.t = this.curve.zero, this.zOne = !0) : (this.x = new
|
|
8290
|
+
Br.BasePoint.call(this, f, "projective"), e === null && t === null && r === null ? (this.x = this.curve.zero, this.y = this.curve.one, this.z = this.curve.one, this.t = this.curve.zero, this.zOne = !0) : (this.x = new lt(e, 16), this.y = new lt(t, 16), this.z = r ? new lt(r, 16) : this.curve.one, this.t = a && new lt(a, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)), this.zOne = this.z === this.curve.one, this.curve.extended && !this.t && (this.t = this.x.redMul(this.y), this.zOne || (this.t = this.t.redMul(this.z.redInvm()))));
|
|
8291
8291
|
}
|
|
8292
8292
|
An(v0, Br.BasePoint);
|
|
8293
8293
|
dt.prototype.pointFromJSON = function(e) {
|
|
@@ -8308,8 +8308,8 @@ v0.prototype.isInfinity = function() {
|
|
|
8308
8308
|
v0.prototype._extDbl = function() {
|
|
8309
8309
|
var e = this.x.redSqr(), t = this.y.redSqr(), r = this.z.redSqr();
|
|
8310
8310
|
r = r.redIAdd(r);
|
|
8311
|
-
var a = this.curve._mulA(e), i = this.x.redAdd(this.y).redSqr().redISub(e).redISub(t), y = a.redAdd(t), x = y.redSub(r), u = a.redSub(t), o = i.redMul(x), c = y.redMul(u),
|
|
8312
|
-
return this.curve.point(o, c,
|
|
8311
|
+
var a = this.curve._mulA(e), i = this.x.redAdd(this.y).redSqr().redISub(e).redISub(t), y = a.redAdd(t), x = y.redSub(r), u = a.redSub(t), o = i.redMul(x), c = y.redMul(u), b = i.redMul(u), v = x.redMul(y);
|
|
8312
|
+
return this.curve.point(o, c, v, b);
|
|
8313
8313
|
};
|
|
8314
8314
|
v0.prototype._projDbl = function() {
|
|
8315
8315
|
var e = this.x.redAdd(this.y).redSqr(), t = this.x.redSqr(), r = this.y.redSqr(), a, i, y, x, u, o;
|
|
@@ -8325,12 +8325,12 @@ v0.prototype.dbl = function() {
|
|
|
8325
8325
|
return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl();
|
|
8326
8326
|
};
|
|
8327
8327
|
v0.prototype._extAdd = function(e) {
|
|
8328
|
-
var t = this.y.redSub(this.x).redMul(e.y.redSub(e.x)), r = this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)), a = this.t.redMul(this.curve.dd).redMul(e.t), i = this.z.redMul(e.z.redAdd(e.z)), y = r.redSub(t), x = i.redSub(a), u = i.redAdd(a), o = r.redAdd(t), c = y.redMul(x),
|
|
8329
|
-
return this.curve.point(c,
|
|
8328
|
+
var t = this.y.redSub(this.x).redMul(e.y.redSub(e.x)), r = this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)), a = this.t.redMul(this.curve.dd).redMul(e.t), i = this.z.redMul(e.z.redAdd(e.z)), y = r.redSub(t), x = i.redSub(a), u = i.redAdd(a), o = r.redAdd(t), c = y.redMul(x), b = u.redMul(o), v = y.redMul(o), C = x.redMul(u);
|
|
8329
|
+
return this.curve.point(c, b, C, v);
|
|
8330
8330
|
};
|
|
8331
8331
|
v0.prototype._projAdd = function(e) {
|
|
8332
|
-
var t = this.z.redMul(e.z), r = t.redSqr(), a = this.x.redMul(e.x), i = this.y.redMul(e.y), y = this.curve.d.redMul(a).redMul(i), x = r.redSub(y), u = r.redAdd(y), o = this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(i), c = t.redMul(x).redMul(o),
|
|
8333
|
-
return this.curve.twisted ? (
|
|
8332
|
+
var t = this.z.redMul(e.z), r = t.redSqr(), a = this.x.redMul(e.x), i = this.y.redMul(e.y), y = this.curve.d.redMul(a).redMul(i), x = r.redSub(y), u = r.redAdd(y), o = this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(i), c = t.redMul(x).redMul(o), b, v;
|
|
8333
|
+
return this.curve.twisted ? (b = t.redMul(u).redMul(i.redSub(this.curve._mulA(a))), v = x.redMul(u)) : (b = t.redMul(u).redMul(i.redSub(a)), v = this.curve._mulC(x).redMul(u)), this.curve.point(c, b, v);
|
|
8334
8334
|
};
|
|
8335
8335
|
v0.prototype.add = function(e) {
|
|
8336
8336
|
return this.isInfinity() ? e : e.isInfinity() ? this : this.curve.extended ? this._extAdd(e) : this._projAdd(e);
|
|
@@ -8382,14 +8382,14 @@ v0.prototype.toP = v0.prototype.normalize;
|
|
|
8382
8382
|
v0.prototype.mixedAdd = v0.prototype.add;
|
|
8383
8383
|
(function(f) {
|
|
8384
8384
|
var e = f;
|
|
8385
|
-
e.base = Ar, e.short =
|
|
8385
|
+
e.base = Ar, e.short = gs, e.mont = _s, e.edwards = ws;
|
|
8386
8386
|
})(Wf);
|
|
8387
|
-
var Cr = {}, Mr = {}, Le = {},
|
|
8388
|
-
Le.inherits =
|
|
8389
|
-
function
|
|
8387
|
+
var Cr = {}, Mr = {}, Le = {}, Bs = kt, Cs = Er;
|
|
8388
|
+
Le.inherits = Cs;
|
|
8389
|
+
function Ms(f, e) {
|
|
8390
8390
|
return (f.charCodeAt(e) & 64512) !== 55296 || e < 0 || e + 1 >= f.length ? !1 : (f.charCodeAt(e + 1) & 64512) === 56320;
|
|
8391
8391
|
}
|
|
8392
|
-
function
|
|
8392
|
+
function Fs(f, e) {
|
|
8393
8393
|
if (Array.isArray(f))
|
|
8394
8394
|
return f.slice();
|
|
8395
8395
|
if (!f)
|
|
@@ -8403,33 +8403,33 @@ function Ms(f, e) {
|
|
|
8403
8403
|
} else
|
|
8404
8404
|
for (var r = 0, a = 0; a < f.length; a++) {
|
|
8405
8405
|
var i = f.charCodeAt(a);
|
|
8406
|
-
i < 128 ? t[r++] = i : i < 2048 ? (t[r++] = i >> 6 | 192, t[r++] = i & 63 | 128) :
|
|
8406
|
+
i < 128 ? t[r++] = i : i < 2048 ? (t[r++] = i >> 6 | 192, t[r++] = i & 63 | 128) : Ms(f, a) ? (i = 65536 + ((i & 1023) << 10) + (f.charCodeAt(++a) & 1023), t[r++] = i >> 18 | 240, t[r++] = i >> 12 & 63 | 128, t[r++] = i >> 6 & 63 | 128, t[r++] = i & 63 | 128) : (t[r++] = i >> 12 | 224, t[r++] = i >> 6 & 63 | 128, t[r++] = i & 63 | 128);
|
|
8407
8407
|
}
|
|
8408
8408
|
else
|
|
8409
8409
|
for (a = 0; a < f.length; a++)
|
|
8410
8410
|
t[a] = f[a] | 0;
|
|
8411
8411
|
return t;
|
|
8412
8412
|
}
|
|
8413
|
-
Le.toArray =
|
|
8414
|
-
function
|
|
8413
|
+
Le.toArray = Fs;
|
|
8414
|
+
function Ss(f) {
|
|
8415
8415
|
for (var e = "", t = 0; t < f.length; t++)
|
|
8416
8416
|
e += wn(f[t].toString(16));
|
|
8417
8417
|
return e;
|
|
8418
8418
|
}
|
|
8419
|
-
Le.toHex =
|
|
8419
|
+
Le.toHex = Ss;
|
|
8420
8420
|
function En(f) {
|
|
8421
8421
|
var e = f >>> 24 | f >>> 8 & 65280 | f << 8 & 16711680 | (f & 255) << 24;
|
|
8422
8422
|
return e >>> 0;
|
|
8423
8423
|
}
|
|
8424
8424
|
Le.htonl = En;
|
|
8425
|
-
function
|
|
8425
|
+
function Ds(f, e) {
|
|
8426
8426
|
for (var t = "", r = 0; r < f.length; r++) {
|
|
8427
8427
|
var a = f[r];
|
|
8428
8428
|
e === "little" && (a = En(a)), t += Bn(a.toString(16));
|
|
8429
8429
|
}
|
|
8430
8430
|
return t;
|
|
8431
8431
|
}
|
|
8432
|
-
Le.toHex32 =
|
|
8432
|
+
Le.toHex32 = Ds;
|
|
8433
8433
|
function wn(f) {
|
|
8434
8434
|
return f.length === 1 ? "0" + f : f;
|
|
8435
8435
|
}
|
|
@@ -8438,107 +8438,107 @@ function Bn(f) {
|
|
|
8438
8438
|
return f.length === 7 ? "0" + f : f.length === 6 ? "00" + f : f.length === 5 ? "000" + f : f.length === 4 ? "0000" + f : f.length === 3 ? "00000" + f : f.length === 2 ? "000000" + f : f.length === 1 ? "0000000" + f : f;
|
|
8439
8439
|
}
|
|
8440
8440
|
Le.zero8 = Bn;
|
|
8441
|
-
function
|
|
8441
|
+
function Rs(f, e, t, r) {
|
|
8442
8442
|
var a = t - e;
|
|
8443
|
-
|
|
8443
|
+
Bs(a % 4 === 0);
|
|
8444
8444
|
for (var i = new Array(a / 4), y = 0, x = e; y < i.length; y++, x += 4) {
|
|
8445
8445
|
var u;
|
|
8446
8446
|
r === "big" ? u = f[x] << 24 | f[x + 1] << 16 | f[x + 2] << 8 | f[x + 3] : u = f[x + 3] << 24 | f[x + 2] << 16 | f[x + 1] << 8 | f[x], i[y] = u >>> 0;
|
|
8447
8447
|
}
|
|
8448
8448
|
return i;
|
|
8449
8449
|
}
|
|
8450
|
-
Le.join32 =
|
|
8451
|
-
function
|
|
8450
|
+
Le.join32 = Rs;
|
|
8451
|
+
function Ps(f, e) {
|
|
8452
8452
|
for (var t = new Array(f.length * 4), r = 0, a = 0; r < f.length; r++, a += 4) {
|
|
8453
8453
|
var i = f[r];
|
|
8454
8454
|
e === "big" ? (t[a] = i >>> 24, t[a + 1] = i >>> 16 & 255, t[a + 2] = i >>> 8 & 255, t[a + 3] = i & 255) : (t[a + 3] = i >>> 24, t[a + 2] = i >>> 16 & 255, t[a + 1] = i >>> 8 & 255, t[a] = i & 255);
|
|
8455
8455
|
}
|
|
8456
8456
|
return t;
|
|
8457
8457
|
}
|
|
8458
|
-
Le.split32 =
|
|
8459
|
-
function
|
|
8458
|
+
Le.split32 = Ps;
|
|
8459
|
+
function ks(f, e) {
|
|
8460
8460
|
return f >>> e | f << 32 - e;
|
|
8461
8461
|
}
|
|
8462
|
-
Le.rotr32 =
|
|
8463
|
-
function
|
|
8462
|
+
Le.rotr32 = ks;
|
|
8463
|
+
function Is(f, e) {
|
|
8464
8464
|
return f << e | f >>> 32 - e;
|
|
8465
8465
|
}
|
|
8466
|
-
Le.rotl32 =
|
|
8467
|
-
function
|
|
8466
|
+
Le.rotl32 = Is;
|
|
8467
|
+
function Ts(f, e) {
|
|
8468
8468
|
return f + e >>> 0;
|
|
8469
8469
|
}
|
|
8470
|
-
Le.sum32 =
|
|
8471
|
-
function
|
|
8470
|
+
Le.sum32 = Ts;
|
|
8471
|
+
function Os(f, e, t) {
|
|
8472
8472
|
return f + e + t >>> 0;
|
|
8473
8473
|
}
|
|
8474
|
-
Le.sum32_3 =
|
|
8475
|
-
function
|
|
8474
|
+
Le.sum32_3 = Os;
|
|
8475
|
+
function zs(f, e, t, r) {
|
|
8476
8476
|
return f + e + t + r >>> 0;
|
|
8477
8477
|
}
|
|
8478
|
-
Le.sum32_4 =
|
|
8479
|
-
function
|
|
8478
|
+
Le.sum32_4 = zs;
|
|
8479
|
+
function qs(f, e, t, r, a) {
|
|
8480
8480
|
return f + e + t + r + a >>> 0;
|
|
8481
8481
|
}
|
|
8482
|
-
Le.sum32_5 =
|
|
8483
|
-
function
|
|
8482
|
+
Le.sum32_5 = qs;
|
|
8483
|
+
function Ns(f, e, t, r) {
|
|
8484
8484
|
var a = f[e], i = f[e + 1], y = r + i >>> 0, x = (y < r ? 1 : 0) + t + a;
|
|
8485
8485
|
f[e] = x >>> 0, f[e + 1] = y;
|
|
8486
8486
|
}
|
|
8487
|
-
Le.sum64 =
|
|
8488
|
-
function
|
|
8487
|
+
Le.sum64 = Ns;
|
|
8488
|
+
function Ls(f, e, t, r) {
|
|
8489
8489
|
var a = e + r >>> 0, i = (a < e ? 1 : 0) + f + t;
|
|
8490
8490
|
return i >>> 0;
|
|
8491
8491
|
}
|
|
8492
|
-
Le.sum64_hi =
|
|
8493
|
-
function
|
|
8492
|
+
Le.sum64_hi = Ls;
|
|
8493
|
+
function Hs(f, e, t, r) {
|
|
8494
8494
|
var a = e + r;
|
|
8495
8495
|
return a >>> 0;
|
|
8496
8496
|
}
|
|
8497
|
-
Le.sum64_lo =
|
|
8498
|
-
function
|
|
8497
|
+
Le.sum64_lo = Hs;
|
|
8498
|
+
function Us(f, e, t, r, a, i, y, x) {
|
|
8499
8499
|
var u = 0, o = e;
|
|
8500
8500
|
o = o + r >>> 0, u += o < e ? 1 : 0, o = o + i >>> 0, u += o < i ? 1 : 0, o = o + x >>> 0, u += o < x ? 1 : 0;
|
|
8501
8501
|
var c = f + t + a + y + u;
|
|
8502
8502
|
return c >>> 0;
|
|
8503
8503
|
}
|
|
8504
|
-
Le.sum64_4_hi =
|
|
8505
|
-
function
|
|
8504
|
+
Le.sum64_4_hi = Us;
|
|
8505
|
+
function $s(f, e, t, r, a, i, y, x) {
|
|
8506
8506
|
var u = e + r + i + x;
|
|
8507
8507
|
return u >>> 0;
|
|
8508
8508
|
}
|
|
8509
|
-
Le.sum64_4_lo =
|
|
8510
|
-
function $s(f, e, t, r, a, i, y, x, u, o) {
|
|
8511
|
-
var c = 0, v = e;
|
|
8512
|
-
v = v + r >>> 0, c += v < e ? 1 : 0, v = v + i >>> 0, c += v < i ? 1 : 0, v = v + x >>> 0, c += v < x ? 1 : 0, v = v + o >>> 0, c += v < o ? 1 : 0;
|
|
8513
|
-
var b = f + t + a + y + u + c;
|
|
8514
|
-
return b >>> 0;
|
|
8515
|
-
}
|
|
8516
|
-
Le.sum64_5_hi = $s;
|
|
8509
|
+
Le.sum64_4_lo = $s;
|
|
8517
8510
|
function Ws(f, e, t, r, a, i, y, x, u, o) {
|
|
8511
|
+
var c = 0, b = e;
|
|
8512
|
+
b = b + r >>> 0, c += b < e ? 1 : 0, b = b + i >>> 0, c += b < i ? 1 : 0, b = b + x >>> 0, c += b < x ? 1 : 0, b = b + o >>> 0, c += b < o ? 1 : 0;
|
|
8513
|
+
var v = f + t + a + y + u + c;
|
|
8514
|
+
return v >>> 0;
|
|
8515
|
+
}
|
|
8516
|
+
Le.sum64_5_hi = Ws;
|
|
8517
|
+
function Ys(f, e, t, r, a, i, y, x, u, o) {
|
|
8518
8518
|
var c = e + r + i + x + o;
|
|
8519
8519
|
return c >>> 0;
|
|
8520
8520
|
}
|
|
8521
|
-
Le.sum64_5_lo =
|
|
8522
|
-
function
|
|
8521
|
+
Le.sum64_5_lo = Ys;
|
|
8522
|
+
function Ks(f, e, t) {
|
|
8523
8523
|
var r = e << 32 - t | f >>> t;
|
|
8524
8524
|
return r >>> 0;
|
|
8525
8525
|
}
|
|
8526
|
-
Le.rotr64_hi =
|
|
8527
|
-
function
|
|
8526
|
+
Le.rotr64_hi = Ks;
|
|
8527
|
+
function js(f, e, t) {
|
|
8528
8528
|
var r = f << 32 - t | e >>> t;
|
|
8529
8529
|
return r >>> 0;
|
|
8530
8530
|
}
|
|
8531
|
-
Le.rotr64_lo =
|
|
8532
|
-
function
|
|
8531
|
+
Le.rotr64_lo = js;
|
|
8532
|
+
function Vs(f, e, t) {
|
|
8533
8533
|
return f >>> t;
|
|
8534
8534
|
}
|
|
8535
|
-
Le.shr64_hi =
|
|
8536
|
-
function
|
|
8535
|
+
Le.shr64_hi = Vs;
|
|
8536
|
+
function Xs(f, e, t) {
|
|
8537
8537
|
var r = f << 32 - t | e >>> t;
|
|
8538
8538
|
return r >>> 0;
|
|
8539
8539
|
}
|
|
8540
|
-
Le.shr64_lo =
|
|
8541
|
-
var Wt = {}, Hi = Le,
|
|
8540
|
+
Le.shr64_lo = Xs;
|
|
8541
|
+
var Wt = {}, Hi = Le, Zs = kt;
|
|
8542
8542
|
function Fr() {
|
|
8543
8543
|
this.pending = null, this.pendingTotal = 0, this.blockSize = this.constructor.blockSize, this.outSize = this.constructor.outSize, this.hmacStrength = this.constructor.hmacStrength, this.padLength = this.constructor.padLength / 8, this.endian = "big", this._delta8 = this.blockSize / 8, this._delta32 = this.blockSize / 32;
|
|
8544
8544
|
}
|
|
@@ -8554,7 +8554,7 @@ Fr.prototype.update = function(e, t) {
|
|
|
8554
8554
|
return this;
|
|
8555
8555
|
};
|
|
8556
8556
|
Fr.prototype.digest = function(e) {
|
|
8557
|
-
return this.update(this._pad()),
|
|
8557
|
+
return this.update(this._pad()), Zs(this.pending === null), this._digest(e);
|
|
8558
8558
|
};
|
|
8559
8559
|
Fr.prototype._pad = function() {
|
|
8560
8560
|
var e = this.pendingTotal, t = this._delta8, r = t - (e + this.padLength) % t, a = new Array(r + this.padLength);
|
|
@@ -8570,8 +8570,8 @@ Fr.prototype._pad = function() {
|
|
|
8570
8570
|
a[i++] = 0;
|
|
8571
8571
|
return a;
|
|
8572
8572
|
};
|
|
8573
|
-
var Yt = {}, ht = {},
|
|
8574
|
-
function
|
|
8573
|
+
var Yt = {}, ht = {}, Gs = Le, rt = Gs.rotr32;
|
|
8574
|
+
function Qs(f, e, t, r) {
|
|
8575
8575
|
if (f === 0)
|
|
8576
8576
|
return Cn(e, t, r);
|
|
8577
8577
|
if (f === 1 || f === 3)
|
|
@@ -8579,7 +8579,7 @@ function Gs(f, e, t, r) {
|
|
|
8579
8579
|
if (f === 2)
|
|
8580
8580
|
return Mn(e, t, r);
|
|
8581
8581
|
}
|
|
8582
|
-
ht.ft_1 =
|
|
8582
|
+
ht.ft_1 = Qs;
|
|
8583
8583
|
function Cn(f, e, t) {
|
|
8584
8584
|
return f & e ^ ~f & t;
|
|
8585
8585
|
}
|
|
@@ -8592,23 +8592,23 @@ function Fn(f, e, t) {
|
|
|
8592
8592
|
return f ^ e ^ t;
|
|
8593
8593
|
}
|
|
8594
8594
|
ht.p32 = Fn;
|
|
8595
|
-
function
|
|
8595
|
+
function Js(f) {
|
|
8596
8596
|
return rt(f, 2) ^ rt(f, 13) ^ rt(f, 22);
|
|
8597
8597
|
}
|
|
8598
|
-
ht.s0_256 =
|
|
8599
|
-
function
|
|
8598
|
+
ht.s0_256 = Js;
|
|
8599
|
+
function eo(f) {
|
|
8600
8600
|
return rt(f, 6) ^ rt(f, 11) ^ rt(f, 25);
|
|
8601
8601
|
}
|
|
8602
|
-
ht.s1_256 =
|
|
8603
|
-
function
|
|
8602
|
+
ht.s1_256 = eo;
|
|
8603
|
+
function to(f) {
|
|
8604
8604
|
return rt(f, 7) ^ rt(f, 18) ^ f >>> 3;
|
|
8605
8605
|
}
|
|
8606
|
-
ht.g0_256 =
|
|
8607
|
-
function
|
|
8606
|
+
ht.g0_256 = to;
|
|
8607
|
+
function ro(f) {
|
|
8608
8608
|
return rt(f, 17) ^ rt(f, 19) ^ f >>> 10;
|
|
8609
8609
|
}
|
|
8610
|
-
ht.g1_256 =
|
|
8611
|
-
var qt = Le,
|
|
8610
|
+
ht.g1_256 = ro;
|
|
8611
|
+
var qt = Le, fo = Wt, io = ht, pf = qt.rotl32, Gt = qt.sum32, no = qt.sum32_5, ao = io.ft_1, Sn = fo.BlockHash, so = [
|
|
8612
8612
|
1518500249,
|
|
8613
8613
|
1859775393,
|
|
8614
8614
|
2400959708,
|
|
@@ -8626,7 +8626,7 @@ function at() {
|
|
|
8626
8626
|
], this.W = new Array(80);
|
|
8627
8627
|
}
|
|
8628
8628
|
qt.inherits(at, Sn);
|
|
8629
|
-
var
|
|
8629
|
+
var oo = at;
|
|
8630
8630
|
at.blockSize = 512;
|
|
8631
8631
|
at.outSize = 160;
|
|
8632
8632
|
at.hmacStrength = 80;
|
|
@@ -8638,15 +8638,15 @@ at.prototype._update = function(e, t) {
|
|
|
8638
8638
|
r[a] = pf(r[a - 3] ^ r[a - 8] ^ r[a - 14] ^ r[a - 16], 1);
|
|
8639
8639
|
var i = this.h[0], y = this.h[1], x = this.h[2], u = this.h[3], o = this.h[4];
|
|
8640
8640
|
for (a = 0; a < r.length; a++) {
|
|
8641
|
-
var c = ~~(a / 20),
|
|
8642
|
-
o = u, u = x, x = pf(y, 30), y = i, i =
|
|
8641
|
+
var c = ~~(a / 20), b = no(pf(i, 5), ao(c, y, x, u), o, r[a], so[c]);
|
|
8642
|
+
o = u, u = x, x = pf(y, 30), y = i, i = b;
|
|
8643
8643
|
}
|
|
8644
8644
|
this.h[0] = Gt(this.h[0], i), this.h[1] = Gt(this.h[1], y), this.h[2] = Gt(this.h[2], x), this.h[3] = Gt(this.h[3], u), this.h[4] = Gt(this.h[4], o);
|
|
8645
8645
|
};
|
|
8646
8646
|
at.prototype._digest = function(e) {
|
|
8647
8647
|
return e === "hex" ? qt.toHex32(this.h, "big") : qt.split32(this.h, "big");
|
|
8648
8648
|
};
|
|
8649
|
-
var Nt = Le,
|
|
8649
|
+
var Nt = Le, co = Wt, Kt = ht, ho = kt, Q0 = Nt.sum32, uo = Nt.sum32_4, lo = Nt.sum32_5, xo = Kt.ch32, vo = Kt.maj32, bo = Kt.s0_256, po = Kt.s1_256, yo = Kt.g0_256, go = Kt.g1_256, Dn = co.BlockHash, mo = [
|
|
8650
8650
|
1116352408,
|
|
8651
8651
|
1899447441,
|
|
8652
8652
|
3049323471,
|
|
@@ -8724,7 +8724,7 @@ function st() {
|
|
|
8724
8724
|
2600822924,
|
|
8725
8725
|
528734635,
|
|
8726
8726
|
1541459225
|
|
8727
|
-
], this.k =
|
|
8727
|
+
], this.k = mo, this.W = new Array(64);
|
|
8728
8728
|
}
|
|
8729
8729
|
Nt.inherits(st, Dn);
|
|
8730
8730
|
var Rn = st;
|
|
@@ -8736,21 +8736,21 @@ st.prototype._update = function(e, t) {
|
|
|
8736
8736
|
for (var r = this.W, a = 0; a < 16; a++)
|
|
8737
8737
|
r[a] = e[t + a];
|
|
8738
8738
|
for (; a < r.length; a++)
|
|
8739
|
-
r[a] =
|
|
8740
|
-
var i = this.h[0], y = this.h[1], x = this.h[2], u = this.h[3], o = this.h[4], c = this.h[5],
|
|
8741
|
-
for (
|
|
8742
|
-
var C =
|
|
8743
|
-
|
|
8739
|
+
r[a] = uo(go(r[a - 2]), r[a - 7], yo(r[a - 15]), r[a - 16]);
|
|
8740
|
+
var i = this.h[0], y = this.h[1], x = this.h[2], u = this.h[3], o = this.h[4], c = this.h[5], b = this.h[6], v = this.h[7];
|
|
8741
|
+
for (ho(this.k.length === r.length), a = 0; a < r.length; a++) {
|
|
8742
|
+
var C = lo(v, po(o), xo(o, c, b), this.k[a], r[a]), w = Q0(bo(i), vo(i, y, x));
|
|
8743
|
+
v = b, b = c, c = o, o = Q0(u, C), u = x, x = y, y = i, i = Q0(C, w);
|
|
8744
8744
|
}
|
|
8745
|
-
this.h[0] = Q0(this.h[0], i), this.h[1] = Q0(this.h[1], y), this.h[2] = Q0(this.h[2], x), this.h[3] = Q0(this.h[3], u), this.h[4] = Q0(this.h[4], o), this.h[5] = Q0(this.h[5], c), this.h[6] = Q0(this.h[6],
|
|
8745
|
+
this.h[0] = Q0(this.h[0], i), this.h[1] = Q0(this.h[1], y), this.h[2] = Q0(this.h[2], x), this.h[3] = Q0(this.h[3], u), this.h[4] = Q0(this.h[4], o), this.h[5] = Q0(this.h[5], c), this.h[6] = Q0(this.h[6], b), this.h[7] = Q0(this.h[7], v);
|
|
8746
8746
|
};
|
|
8747
8747
|
st.prototype._digest = function(e) {
|
|
8748
8748
|
return e === "hex" ? Nt.toHex32(this.h, "big") : Nt.split32(this.h, "big");
|
|
8749
8749
|
};
|
|
8750
8750
|
var Ff = Le, Pn = Rn;
|
|
8751
|
-
function
|
|
8752
|
-
if (!(this instanceof
|
|
8753
|
-
return new
|
|
8751
|
+
function vt() {
|
|
8752
|
+
if (!(this instanceof vt))
|
|
8753
|
+
return new vt();
|
|
8754
8754
|
Pn.call(this), this.h = [
|
|
8755
8755
|
3238371032,
|
|
8756
8756
|
914150663,
|
|
@@ -8762,16 +8762,16 @@ function xt() {
|
|
|
8762
8762
|
3204075428
|
|
8763
8763
|
];
|
|
8764
8764
|
}
|
|
8765
|
-
Ff.inherits(
|
|
8766
|
-
var
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8765
|
+
Ff.inherits(vt, Pn);
|
|
8766
|
+
var _o = vt;
|
|
8767
|
+
vt.blockSize = 512;
|
|
8768
|
+
vt.outSize = 224;
|
|
8769
|
+
vt.hmacStrength = 192;
|
|
8770
|
+
vt.padLength = 64;
|
|
8771
|
+
vt.prototype._digest = function(e) {
|
|
8772
8772
|
return e === "hex" ? Ff.toHex32(this.h.slice(0, 7), "big") : Ff.split32(this.h.slice(0, 7), "big");
|
|
8773
8773
|
};
|
|
8774
|
-
var H0 = Le,
|
|
8774
|
+
var H0 = Le, Ao = Wt, Eo = kt, ft = H0.rotr64_hi, it = H0.rotr64_lo, kn = H0.shr64_hi, In = H0.shr64_lo, gt = H0.sum64, yf = H0.sum64_hi, gf = H0.sum64_lo, wo = H0.sum64_4_hi, Bo = H0.sum64_4_lo, Co = H0.sum64_5_hi, Mo = H0.sum64_5_lo, Tn = Ao.BlockHash, Fo = [
|
|
8775
8775
|
1116352408,
|
|
8776
8776
|
3609767458,
|
|
8777
8777
|
1899447441,
|
|
@@ -8953,7 +8953,7 @@ function et() {
|
|
|
8953
8953
|
4215389547,
|
|
8954
8954
|
1541459225,
|
|
8955
8955
|
327033209
|
|
8956
|
-
], this.k =
|
|
8956
|
+
], this.k = Fo, this.W = new Array(160);
|
|
8957
8957
|
}
|
|
8958
8958
|
H0.inherits(et, Tn);
|
|
8959
8959
|
var On = et;
|
|
@@ -8965,34 +8965,34 @@ et.prototype._prepareBlock = function(e, t) {
|
|
|
8965
8965
|
for (var r = this.W, a = 0; a < 32; a++)
|
|
8966
8966
|
r[a] = e[t + a];
|
|
8967
8967
|
for (; a < r.length; a += 2) {
|
|
8968
|
-
var i =
|
|
8969
|
-
r[a] =
|
|
8968
|
+
var i = No(r[a - 4], r[a - 3]), y = Lo(r[a - 4], r[a - 3]), x = r[a - 14], u = r[a - 13], o = zo(r[a - 30], r[a - 29]), c = qo(r[a - 30], r[a - 29]), b = r[a - 32], v = r[a - 31];
|
|
8969
|
+
r[a] = wo(
|
|
8970
8970
|
i,
|
|
8971
8971
|
y,
|
|
8972
8972
|
x,
|
|
8973
8973
|
u,
|
|
8974
8974
|
o,
|
|
8975
8975
|
c,
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
), r[a + 1] =
|
|
8976
|
+
b,
|
|
8977
|
+
v
|
|
8978
|
+
), r[a + 1] = Bo(
|
|
8979
8979
|
i,
|
|
8980
8980
|
y,
|
|
8981
8981
|
x,
|
|
8982
8982
|
u,
|
|
8983
8983
|
o,
|
|
8984
8984
|
c,
|
|
8985
|
-
|
|
8986
|
-
|
|
8985
|
+
b,
|
|
8986
|
+
v
|
|
8987
8987
|
);
|
|
8988
8988
|
}
|
|
8989
8989
|
};
|
|
8990
8990
|
et.prototype._update = function(e, t) {
|
|
8991
8991
|
this._prepareBlock(e, t);
|
|
8992
|
-
var r = this.W, a = this.h[0], i = this.h[1], y = this.h[2], x = this.h[3], u = this.h[4], o = this.h[5], c = this.h[6],
|
|
8993
|
-
|
|
8992
|
+
var r = this.W, a = this.h[0], i = this.h[1], y = this.h[2], x = this.h[3], u = this.h[4], o = this.h[5], c = this.h[6], b = this.h[7], v = this.h[8], C = this.h[9], w = this.h[10], R = this.h[11], P = this.h[12], q = this.h[13], S = this.h[14], k = this.h[15];
|
|
8993
|
+
Eo(this.k.length === r.length);
|
|
8994
8994
|
for (var T = 0; T < r.length; T += 2) {
|
|
8995
|
-
var H = S, $ = k, K =
|
|
8995
|
+
var H = S, $ = k, K = To(v, C), X = Oo(v, C), Q = So(v, C, w, R, P), U = Do(v, C, w, R, P, q), A = this.k[T], n = this.k[T + 1], d = r[T], g = r[T + 1], B = Co(
|
|
8996
8996
|
H,
|
|
8997
8997
|
$,
|
|
8998
8998
|
K,
|
|
@@ -9003,7 +9003,7 @@ et.prototype._update = function(e, t) {
|
|
|
9003
9003
|
n,
|
|
9004
9004
|
d,
|
|
9005
9005
|
g
|
|
9006
|
-
), F =
|
|
9006
|
+
), F = Mo(
|
|
9007
9007
|
H,
|
|
9008
9008
|
$,
|
|
9009
9009
|
K,
|
|
@@ -9015,67 +9015,67 @@ et.prototype._update = function(e, t) {
|
|
|
9015
9015
|
d,
|
|
9016
9016
|
g
|
|
9017
9017
|
);
|
|
9018
|
-
H =
|
|
9018
|
+
H = ko(a, i), $ = Io(a, i), K = Ro(a, i, y, x, u), X = Po(a, i, y, x, u, o);
|
|
9019
9019
|
var z = yf(H, $, K, X), N = gf(H, $, K, X);
|
|
9020
|
-
S = P, k = q, P = w, q = R, w =
|
|
9020
|
+
S = P, k = q, P = w, q = R, w = v, R = C, v = yf(c, b, B, F), C = gf(b, b, B, F), c = u, b = o, u = y, o = x, y = a, x = i, a = yf(B, F, z, N), i = gf(B, F, z, N);
|
|
9021
9021
|
}
|
|
9022
|
-
|
|
9022
|
+
gt(this.h, 0, a, i), gt(this.h, 2, y, x), gt(this.h, 4, u, o), gt(this.h, 6, c, b), gt(this.h, 8, v, C), gt(this.h, 10, w, R), gt(this.h, 12, P, q), gt(this.h, 14, S, k);
|
|
9023
9023
|
};
|
|
9024
9024
|
et.prototype._digest = function(e) {
|
|
9025
9025
|
return e === "hex" ? H0.toHex32(this.h, "big") : H0.split32(this.h, "big");
|
|
9026
9026
|
};
|
|
9027
|
-
function
|
|
9027
|
+
function So(f, e, t, r, a) {
|
|
9028
9028
|
var i = f & t ^ ~f & a;
|
|
9029
9029
|
return i < 0 && (i += 4294967296), i;
|
|
9030
9030
|
}
|
|
9031
|
-
function
|
|
9031
|
+
function Do(f, e, t, r, a, i) {
|
|
9032
9032
|
var y = e & r ^ ~e & i;
|
|
9033
9033
|
return y < 0 && (y += 4294967296), y;
|
|
9034
9034
|
}
|
|
9035
|
-
function
|
|
9035
|
+
function Ro(f, e, t, r, a) {
|
|
9036
9036
|
var i = f & t ^ f & a ^ t & a;
|
|
9037
9037
|
return i < 0 && (i += 4294967296), i;
|
|
9038
9038
|
}
|
|
9039
|
-
function
|
|
9039
|
+
function Po(f, e, t, r, a, i) {
|
|
9040
9040
|
var y = e & r ^ e & i ^ r & i;
|
|
9041
9041
|
return y < 0 && (y += 4294967296), y;
|
|
9042
9042
|
}
|
|
9043
|
-
function
|
|
9043
|
+
function ko(f, e) {
|
|
9044
9044
|
var t = ft(f, e, 28), r = ft(e, f, 2), a = ft(e, f, 7), i = t ^ r ^ a;
|
|
9045
9045
|
return i < 0 && (i += 4294967296), i;
|
|
9046
9046
|
}
|
|
9047
|
-
function
|
|
9047
|
+
function Io(f, e) {
|
|
9048
9048
|
var t = it(f, e, 28), r = it(e, f, 2), a = it(e, f, 7), i = t ^ r ^ a;
|
|
9049
9049
|
return i < 0 && (i += 4294967296), i;
|
|
9050
9050
|
}
|
|
9051
|
-
function
|
|
9051
|
+
function To(f, e) {
|
|
9052
9052
|
var t = ft(f, e, 14), r = ft(f, e, 18), a = ft(e, f, 9), i = t ^ r ^ a;
|
|
9053
9053
|
return i < 0 && (i += 4294967296), i;
|
|
9054
9054
|
}
|
|
9055
|
-
function
|
|
9055
|
+
function Oo(f, e) {
|
|
9056
9056
|
var t = it(f, e, 14), r = it(f, e, 18), a = it(e, f, 9), i = t ^ r ^ a;
|
|
9057
9057
|
return i < 0 && (i += 4294967296), i;
|
|
9058
9058
|
}
|
|
9059
|
-
function
|
|
9059
|
+
function zo(f, e) {
|
|
9060
9060
|
var t = ft(f, e, 1), r = ft(f, e, 8), a = kn(f, e, 7), i = t ^ r ^ a;
|
|
9061
9061
|
return i < 0 && (i += 4294967296), i;
|
|
9062
9062
|
}
|
|
9063
|
-
function
|
|
9063
|
+
function qo(f, e) {
|
|
9064
9064
|
var t = it(f, e, 1), r = it(f, e, 8), a = In(f, e, 7), i = t ^ r ^ a;
|
|
9065
9065
|
return i < 0 && (i += 4294967296), i;
|
|
9066
9066
|
}
|
|
9067
|
-
function
|
|
9067
|
+
function No(f, e) {
|
|
9068
9068
|
var t = ft(f, e, 19), r = ft(e, f, 29), a = kn(f, e, 6), i = t ^ r ^ a;
|
|
9069
9069
|
return i < 0 && (i += 4294967296), i;
|
|
9070
9070
|
}
|
|
9071
|
-
function
|
|
9071
|
+
function Lo(f, e) {
|
|
9072
9072
|
var t = it(f, e, 19), r = it(e, f, 29), a = In(f, e, 6), i = t ^ r ^ a;
|
|
9073
9073
|
return i < 0 && (i += 4294967296), i;
|
|
9074
9074
|
}
|
|
9075
9075
|
var Sf = Le, zn = On;
|
|
9076
|
-
function
|
|
9077
|
-
if (!(this instanceof
|
|
9078
|
-
return new
|
|
9076
|
+
function bt() {
|
|
9077
|
+
if (!(this instanceof bt))
|
|
9078
|
+
return new bt();
|
|
9079
9079
|
zn.call(this), this.h = [
|
|
9080
9080
|
3418070365,
|
|
9081
9081
|
3238371032,
|
|
@@ -9095,21 +9095,21 @@ function vt() {
|
|
|
9095
9095
|
3204075428
|
|
9096
9096
|
];
|
|
9097
9097
|
}
|
|
9098
|
-
Sf.inherits(
|
|
9099
|
-
var
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9098
|
+
Sf.inherits(bt, zn);
|
|
9099
|
+
var Ho = bt;
|
|
9100
|
+
bt.blockSize = 1024;
|
|
9101
|
+
bt.outSize = 384;
|
|
9102
|
+
bt.hmacStrength = 192;
|
|
9103
|
+
bt.padLength = 128;
|
|
9104
|
+
bt.prototype._digest = function(e) {
|
|
9105
9105
|
return e === "hex" ? Sf.toHex32(this.h.slice(0, 12), "big") : Sf.split32(this.h.slice(0, 12), "big");
|
|
9106
9106
|
};
|
|
9107
|
-
Yt.sha1 =
|
|
9108
|
-
Yt.sha224 =
|
|
9107
|
+
Yt.sha1 = oo;
|
|
9108
|
+
Yt.sha224 = _o;
|
|
9109
9109
|
Yt.sha256 = Rn;
|
|
9110
|
-
Yt.sha384 =
|
|
9110
|
+
Yt.sha384 = Ho;
|
|
9111
9111
|
Yt.sha512 = On;
|
|
9112
|
-
var qn = {}, Dt = Le,
|
|
9112
|
+
var qn = {}, Dt = Le, Uo = Wt, ar = Dt.rotl32, Ui = Dt.sum32, Qt = Dt.sum32_3, $i = Dt.sum32_4, Nn = Uo.BlockHash;
|
|
9113
9113
|
function ot() {
|
|
9114
9114
|
if (!(this instanceof ot))
|
|
9115
9115
|
return new ot();
|
|
@@ -9122,23 +9122,23 @@ ot.outSize = 160;
|
|
|
9122
9122
|
ot.hmacStrength = 192;
|
|
9123
9123
|
ot.padLength = 64;
|
|
9124
9124
|
ot.prototype._update = function(e, t) {
|
|
9125
|
-
for (var r = this.h[0], a = this.h[1], i = this.h[2], y = this.h[3], x = this.h[4], u = r, o = a, c = i,
|
|
9125
|
+
for (var r = this.h[0], a = this.h[1], i = this.h[2], y = this.h[3], x = this.h[4], u = r, o = a, c = i, b = y, v = x, C = 0; C < 80; C++) {
|
|
9126
9126
|
var w = Ui(
|
|
9127
9127
|
ar(
|
|
9128
|
-
$i(r, Wi(C, a, i, y), e[
|
|
9129
|
-
|
|
9128
|
+
$i(r, Wi(C, a, i, y), e[Yo[C] + t], $o(C)),
|
|
9129
|
+
jo[C]
|
|
9130
9130
|
),
|
|
9131
9131
|
x
|
|
9132
9132
|
);
|
|
9133
9133
|
r = x, x = y, y = ar(i, 10), i = a, a = w, w = Ui(
|
|
9134
9134
|
ar(
|
|
9135
|
-
$i(u, Wi(79 - C, o, c,
|
|
9136
|
-
|
|
9135
|
+
$i(u, Wi(79 - C, o, c, b), e[Ko[C] + t], Wo(C)),
|
|
9136
|
+
Vo[C]
|
|
9137
9137
|
),
|
|
9138
|
-
|
|
9139
|
-
), u =
|
|
9138
|
+
v
|
|
9139
|
+
), u = v, v = b, b = ar(c, 10), c = o, o = w;
|
|
9140
9140
|
}
|
|
9141
|
-
w = Qt(this.h[1], i,
|
|
9141
|
+
w = Qt(this.h[1], i, b), this.h[1] = Qt(this.h[2], y, v), this.h[2] = Qt(this.h[3], x, u), this.h[3] = Qt(this.h[4], r, o), this.h[4] = Qt(this.h[0], a, c), this.h[0] = w;
|
|
9142
9142
|
};
|
|
9143
9143
|
ot.prototype._digest = function(e) {
|
|
9144
9144
|
return e === "hex" ? Dt.toHex32(this.h, "little") : Dt.split32(this.h, "little");
|
|
@@ -9146,13 +9146,13 @@ ot.prototype._digest = function(e) {
|
|
|
9146
9146
|
function Wi(f, e, t, r) {
|
|
9147
9147
|
return f <= 15 ? e ^ t ^ r : f <= 31 ? e & t | ~e & r : f <= 47 ? (e | ~t) ^ r : f <= 63 ? e & r | t & ~r : e ^ (t | ~r);
|
|
9148
9148
|
}
|
|
9149
|
-
function
|
|
9149
|
+
function $o(f) {
|
|
9150
9150
|
return f <= 15 ? 0 : f <= 31 ? 1518500249 : f <= 47 ? 1859775393 : f <= 63 ? 2400959708 : 2840853838;
|
|
9151
9151
|
}
|
|
9152
|
-
function
|
|
9152
|
+
function Wo(f) {
|
|
9153
9153
|
return f <= 15 ? 1352829926 : f <= 31 ? 1548603684 : f <= 47 ? 1836072691 : f <= 63 ? 2053994217 : 0;
|
|
9154
9154
|
}
|
|
9155
|
-
var
|
|
9155
|
+
var Yo = [
|
|
9156
9156
|
0,
|
|
9157
9157
|
1,
|
|
9158
9158
|
2,
|
|
@@ -9233,7 +9233,7 @@ var Wo = [
|
|
|
9233
9233
|
6,
|
|
9234
9234
|
15,
|
|
9235
9235
|
13
|
|
9236
|
-
],
|
|
9236
|
+
], Ko = [
|
|
9237
9237
|
5,
|
|
9238
9238
|
14,
|
|
9239
9239
|
7,
|
|
@@ -9314,7 +9314,7 @@ var Wo = [
|
|
|
9314
9314
|
3,
|
|
9315
9315
|
9,
|
|
9316
9316
|
11
|
|
9317
|
-
],
|
|
9317
|
+
], jo = [
|
|
9318
9318
|
11,
|
|
9319
9319
|
14,
|
|
9320
9320
|
15,
|
|
@@ -9395,7 +9395,7 @@ var Wo = [
|
|
|
9395
9395
|
8,
|
|
9396
9396
|
5,
|
|
9397
9397
|
6
|
|
9398
|
-
],
|
|
9398
|
+
], Vo = [
|
|
9399
9399
|
8,
|
|
9400
9400
|
9,
|
|
9401
9401
|
9,
|
|
@@ -9476,15 +9476,15 @@ var Wo = [
|
|
|
9476
9476
|
13,
|
|
9477
9477
|
11,
|
|
9478
9478
|
11
|
|
9479
|
-
],
|
|
9479
|
+
], Xo = Le, Zo = kt;
|
|
9480
9480
|
function Lt(f, e, t) {
|
|
9481
9481
|
if (!(this instanceof Lt))
|
|
9482
9482
|
return new Lt(f, e, t);
|
|
9483
|
-
this.Hash = f, this.blockSize = f.blockSize / 8, this.outSize = f.outSize / 8, this.inner = null, this.outer = null, this._init(
|
|
9483
|
+
this.Hash = f, this.blockSize = f.blockSize / 8, this.outSize = f.outSize / 8, this.inner = null, this.outer = null, this._init(Xo.toArray(e, t));
|
|
9484
9484
|
}
|
|
9485
|
-
var
|
|
9485
|
+
var Go = Lt;
|
|
9486
9486
|
Lt.prototype._init = function(e) {
|
|
9487
|
-
e.length > this.blockSize && (e = new this.Hash().update(e).digest()),
|
|
9487
|
+
e.length > this.blockSize && (e = new this.Hash().update(e).digest()), Zo(e.length <= this.blockSize);
|
|
9488
9488
|
for (var t = e.length; t < this.blockSize; t++)
|
|
9489
9489
|
e.push(0);
|
|
9490
9490
|
for (t = 0; t < e.length; t++)
|
|
@@ -9501,10 +9501,10 @@ Lt.prototype.digest = function(e) {
|
|
|
9501
9501
|
};
|
|
9502
9502
|
(function(f) {
|
|
9503
9503
|
var e = f;
|
|
9504
|
-
e.utils = Le, e.common = Wt, e.sha = Yt, e.ripemd = qn, e.hmac =
|
|
9504
|
+
e.utils = Le, e.common = Wt, e.sha = Yt, e.ripemd = qn, e.hmac = Go, e.sha1 = e.sha.sha1, e.sha256 = e.sha.sha256, e.sha224 = e.sha.sha224, e.sha384 = e.sha.sha384, e.sha512 = e.sha.sha512, e.ripemd160 = e.ripemd.ripemd160;
|
|
9505
9505
|
})(Mr);
|
|
9506
9506
|
var mf, Yi;
|
|
9507
|
-
function
|
|
9507
|
+
function Qo() {
|
|
9508
9508
|
return Yi || (Yi = 1, mf = {
|
|
9509
9509
|
doubles: {
|
|
9510
9510
|
step: 4,
|
|
@@ -10297,12 +10297,12 @@ function Go() {
|
|
|
10297
10297
|
configurable: !0,
|
|
10298
10298
|
enumerable: !0,
|
|
10299
10299
|
get: function() {
|
|
10300
|
-
var
|
|
10300
|
+
var b = new y(c);
|
|
10301
10301
|
return Object.defineProperty(e, o, {
|
|
10302
10302
|
configurable: !0,
|
|
10303
10303
|
enumerable: !0,
|
|
10304
|
-
value:
|
|
10305
|
-
}),
|
|
10304
|
+
value: b
|
|
10305
|
+
}), b;
|
|
10306
10306
|
}
|
|
10307
10307
|
});
|
|
10308
10308
|
}
|
|
@@ -10402,7 +10402,7 @@ function Go() {
|
|
|
10402
10402
|
});
|
|
10403
10403
|
var u;
|
|
10404
10404
|
try {
|
|
10405
|
-
u =
|
|
10405
|
+
u = Qo();
|
|
10406
10406
|
} catch {
|
|
10407
10407
|
u = void 0;
|
|
10408
10408
|
}
|
|
@@ -10436,10 +10436,10 @@ function Go() {
|
|
|
10436
10436
|
]
|
|
10437
10437
|
});
|
|
10438
10438
|
})(Cr);
|
|
10439
|
-
var
|
|
10440
|
-
function
|
|
10441
|
-
if (!(this instanceof
|
|
10442
|
-
return new
|
|
10439
|
+
var Jo = Mr, Mt = Uf, Ln = kt;
|
|
10440
|
+
function _t(f) {
|
|
10441
|
+
if (!(this instanceof _t))
|
|
10442
|
+
return new _t(f);
|
|
10443
10443
|
this.hash = f.hash, this.predResist = !!f.predResist, this.outLen = this.hash.outSize, this.minEntropy = f.minEntropy || this.hash.hmacStrength, this._reseed = null, this.reseedInterval = null, this.K = null, this.V = null;
|
|
10444
10444
|
var e = Mt.toArray(f.entropy, f.entropyEnc || "hex"), t = Mt.toArray(f.nonce, f.nonceEnc || "hex"), r = Mt.toArray(f.pers, f.persEnc || "hex");
|
|
10445
10445
|
Ln(
|
|
@@ -10447,28 +10447,28 @@ function mt(f) {
|
|
|
10447
10447
|
"Not enough entropy. Minimum is: " + this.minEntropy + " bits"
|
|
10448
10448
|
), this._init(e, t, r);
|
|
10449
10449
|
}
|
|
10450
|
-
var
|
|
10451
|
-
|
|
10450
|
+
var ec = _t;
|
|
10451
|
+
_t.prototype._init = function(e, t, r) {
|
|
10452
10452
|
var a = e.concat(t).concat(r);
|
|
10453
10453
|
this.K = new Array(this.outLen / 8), this.V = new Array(this.outLen / 8);
|
|
10454
10454
|
for (var i = 0; i < this.V.length; i++)
|
|
10455
10455
|
this.K[i] = 0, this.V[i] = 1;
|
|
10456
10456
|
this._update(a), this._reseed = 1, this.reseedInterval = 281474976710656;
|
|
10457
10457
|
};
|
|
10458
|
-
|
|
10459
|
-
return new
|
|
10458
|
+
_t.prototype._hmac = function() {
|
|
10459
|
+
return new Jo.hmac(this.hash, this.K);
|
|
10460
10460
|
};
|
|
10461
|
-
|
|
10461
|
+
_t.prototype._update = function(e) {
|
|
10462
10462
|
var t = this._hmac().update(this.V).update([0]);
|
|
10463
10463
|
e && (t = t.update(e)), this.K = t.digest(), this.V = this._hmac().update(this.V).digest(), e && (this.K = this._hmac().update(this.V).update([1]).update(e).digest(), this.V = this._hmac().update(this.V).digest());
|
|
10464
10464
|
};
|
|
10465
|
-
|
|
10465
|
+
_t.prototype.reseed = function(e, t, r, a) {
|
|
10466
10466
|
typeof t != "string" && (a = r, r = t, t = null), e = Mt.toArray(e, t), r = Mt.toArray(r, a), Ln(
|
|
10467
10467
|
e.length >= this.minEntropy / 8,
|
|
10468
10468
|
"Not enough entropy. Minimum is: " + this.minEntropy + " bits"
|
|
10469
10469
|
), this._update(e.concat(r || [])), this._reseed = 1;
|
|
10470
10470
|
};
|
|
10471
|
-
|
|
10471
|
+
_t.prototype.generate = function(e, t, r, a) {
|
|
10472
10472
|
if (this._reseed > this.reseedInterval)
|
|
10473
10473
|
throw new Error("Reseed is required");
|
|
10474
10474
|
typeof t != "string" && (a = r, r = t, t = null), r && (r = Mt.toArray(r, a || "hex"), this._update(r));
|
|
@@ -10477,11 +10477,11 @@ mt.prototype.generate = function(e, t, r, a) {
|
|
|
10477
10477
|
var y = i.slice(0, e);
|
|
10478
10478
|
return this._update(r), this._reseed++, Mt.encode(y, t);
|
|
10479
10479
|
};
|
|
10480
|
-
var
|
|
10480
|
+
var tc = pt, rc = Y0, Df = rc.assert;
|
|
10481
10481
|
function T0(f, e) {
|
|
10482
10482
|
this.ec = f, this.priv = null, this.pub = null, e.priv && this._importPrivate(e.priv, e.privEnc), e.pub && this._importPublic(e.pub, e.pubEnc);
|
|
10483
10483
|
}
|
|
10484
|
-
var
|
|
10484
|
+
var fc = T0;
|
|
10485
10485
|
T0.fromPublic = function(e, t, r) {
|
|
10486
10486
|
return t instanceof T0 ? t : new T0(e, {
|
|
10487
10487
|
pub: t,
|
|
@@ -10505,7 +10505,7 @@ T0.prototype.getPrivate = function(e) {
|
|
|
10505
10505
|
return e === "hex" ? this.priv.toString(16, 2) : this.priv;
|
|
10506
10506
|
};
|
|
10507
10507
|
T0.prototype._importPrivate = function(e, t) {
|
|
10508
|
-
this.priv = new
|
|
10508
|
+
this.priv = new tc(e, t || 16), this.priv = this.priv.umod(this.ec.curve.n);
|
|
10509
10509
|
};
|
|
10510
10510
|
T0.prototype._importPublic = function(e, t) {
|
|
10511
10511
|
if (e.x || e.y) {
|
|
@@ -10526,14 +10526,14 @@ T0.prototype.verify = function(e, t) {
|
|
|
10526
10526
|
T0.prototype.inspect = function() {
|
|
10527
10527
|
return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " + (this.pub && this.pub.inspect()) + " >";
|
|
10528
10528
|
};
|
|
10529
|
-
var gr =
|
|
10529
|
+
var gr = pt, Kf = Y0, ic = Kf.assert;
|
|
10530
10530
|
function Sr(f, e) {
|
|
10531
10531
|
if (f instanceof Sr)
|
|
10532
10532
|
return f;
|
|
10533
|
-
this._importDER(f, e) || (
|
|
10533
|
+
this._importDER(f, e) || (ic(f.r && f.s, "Signature without r or s"), this.r = new gr(f.r, 16), this.s = new gr(f.s, 16), f.recoveryParam === void 0 ? this.recoveryParam = null : this.recoveryParam = f.recoveryParam);
|
|
10534
10534
|
}
|
|
10535
|
-
var
|
|
10536
|
-
function
|
|
10535
|
+
var nc = Sr;
|
|
10536
|
+
function ac() {
|
|
10537
10537
|
this.place = 0;
|
|
10538
10538
|
}
|
|
10539
10539
|
function _f(f, e) {
|
|
@@ -10554,7 +10554,7 @@ function Ki(f) {
|
|
|
10554
10554
|
}
|
|
10555
10555
|
Sr.prototype._importDER = function(e, t) {
|
|
10556
10556
|
e = Kf.toArray(e, t);
|
|
10557
|
-
var r = new
|
|
10557
|
+
var r = new ac();
|
|
10558
10558
|
if (e[r.place++] !== 48)
|
|
10559
10559
|
return !1;
|
|
10560
10560
|
var a = _f(e, r);
|
|
@@ -10601,7 +10601,7 @@ Sr.prototype.toDER = function(e) {
|
|
|
10601
10601
|
var i = a.concat(r), y = [48];
|
|
10602
10602
|
return Af(y, i.length), y = y.concat(i), Kf.encode(y, e);
|
|
10603
10603
|
};
|
|
10604
|
-
var Ft =
|
|
10604
|
+
var Ft = pt, Hn = ec, sc = Y0, Ef = Cr, oc = mn, Un = sc.assert, jf = fc, Dr = nc;
|
|
10605
10605
|
function j0(f) {
|
|
10606
10606
|
if (!(this instanceof j0))
|
|
10607
10607
|
return new j0(f);
|
|
@@ -10610,7 +10610,7 @@ function j0(f) {
|
|
|
10610
10610
|
"Unknown curve " + f
|
|
10611
10611
|
), f = Ef[f]), f instanceof Ef.PresetCurve && (f = { curve: f }), this.curve = f.curve.curve, this.n = this.curve.n, this.nh = this.n.ushrn(1), this.g = this.curve.g, this.g = f.curve.g, this.g.precompute(f.curve.n.bitLength() + 1), this.hash = f.hash || f.curve.hash;
|
|
10612
10612
|
}
|
|
10613
|
-
var
|
|
10613
|
+
var cc = j0;
|
|
10614
10614
|
j0.prototype.keyPair = function(e) {
|
|
10615
10615
|
return new jf(this, e);
|
|
10616
10616
|
};
|
|
@@ -10626,7 +10626,7 @@ j0.prototype.genKeyPair = function(e) {
|
|
|
10626
10626
|
hash: this.hash,
|
|
10627
10627
|
pers: e.pers,
|
|
10628
10628
|
persEnc: e.persEnc || "utf8",
|
|
10629
|
-
entropy: e.entropy ||
|
|
10629
|
+
entropy: e.entropy || oc(this.hash.hmacStrength),
|
|
10630
10630
|
entropyEnc: e.entropy && e.entropyEnc || "utf8",
|
|
10631
10631
|
nonce: this.n.toArray()
|
|
10632
10632
|
}), r = this.n.byteLength(), a = this.n.sub(new Ft(2)); ; ) {
|
|
@@ -10648,15 +10648,15 @@ j0.prototype.sign = function(e, t, r, a) {
|
|
|
10648
10648
|
pers: a.pers,
|
|
10649
10649
|
persEnc: a.persEnc || "utf8"
|
|
10650
10650
|
}), o = this.n.sub(new Ft(1)), c = 0; ; c++) {
|
|
10651
|
-
var
|
|
10652
|
-
if (
|
|
10653
|
-
var
|
|
10654
|
-
if (!
|
|
10655
|
-
var C =
|
|
10651
|
+
var b = a.k ? a.k(c) : new Ft(u.generate(this.n.byteLength()));
|
|
10652
|
+
if (b = this._truncateToN(b, !0), !(b.cmpn(1) <= 0 || b.cmp(o) >= 0)) {
|
|
10653
|
+
var v = this.g.mul(b);
|
|
10654
|
+
if (!v.isInfinity()) {
|
|
10655
|
+
var C = v.getX(), w = C.umod(this.n);
|
|
10656
10656
|
if (w.cmpn(0) !== 0) {
|
|
10657
|
-
var R =
|
|
10657
|
+
var R = b.invm(this.n).mul(w.mul(t.getPrivate()).iadd(e));
|
|
10658
10658
|
if (R = R.umod(this.n), R.cmpn(0) !== 0) {
|
|
10659
|
-
var P = (
|
|
10659
|
+
var P = (v.getY().isOdd() ? 1 : 0) | (C.cmp(w) !== 0 ? 2 : 0);
|
|
10660
10660
|
return a.canonical && R.cmp(this.nh) > 0 && (R = this.n.sub(R), P ^= 1), new Dr({ r: w, s: R, recoveryParam: P });
|
|
10661
10661
|
}
|
|
10662
10662
|
}
|
|
@@ -10678,8 +10678,8 @@ j0.prototype.recoverPubKey = function(f, e, t, r) {
|
|
|
10678
10678
|
if (y.cmp(this.curve.p.umod(this.curve.n)) >= 0 && o)
|
|
10679
10679
|
throw new Error("Unable to find sencond key candinate");
|
|
10680
10680
|
o ? y = this.curve.pointFromX(y.add(this.curve.n), u) : y = this.curve.pointFromX(y, u);
|
|
10681
|
-
var c = e.r.invm(a),
|
|
10682
|
-
return this.g.mulAdd(
|
|
10681
|
+
var c = e.r.invm(a), b = a.sub(i).mul(c).umod(a), v = x.mul(c).umod(a);
|
|
10682
|
+
return this.g.mulAdd(b, y, v);
|
|
10683
10683
|
};
|
|
10684
10684
|
j0.prototype.getKeyRecoveryParam = function(f, e, t, r) {
|
|
10685
10685
|
if (e = new Dr(e, r), e.recoveryParam !== null)
|
|
@@ -10740,12 +10740,12 @@ w0.prototype.getSecret = function(e) {
|
|
|
10740
10740
|
w0.prototype.getPublic = function(e) {
|
|
10741
10741
|
return ir.encode(this.pubBytes(), e);
|
|
10742
10742
|
};
|
|
10743
|
-
var
|
|
10743
|
+
var dc = w0, hc = pt, Rr = Y0, uc = Rr.assert, Pr = Rr.cachedProperty, lc = Rr.parseBytes;
|
|
10744
10744
|
function It(f, e) {
|
|
10745
|
-
this.eddsa = f, typeof e != "object" && (e =
|
|
10745
|
+
this.eddsa = f, typeof e != "object" && (e = lc(e)), Array.isArray(e) && (e = {
|
|
10746
10746
|
R: e.slice(0, f.encodingLength),
|
|
10747
10747
|
S: e.slice(f.encodingLength)
|
|
10748
|
-
}),
|
|
10748
|
+
}), uc(e.R && e.S, "Signature without R or S"), f.isPoint(e.R) && (this._R = e.R), e.S instanceof hc && (this._S = e.S), this._Rencoded = Array.isArray(e.R) ? e.R : e.Rencoded, this._Sencoded = Array.isArray(e.S) ? e.S : e.Sencoded;
|
|
10749
10749
|
}
|
|
10750
10750
|
Pr(It, "S", function() {
|
|
10751
10751
|
return this.eddsa.decodeInt(this.Sencoded());
|
|
@@ -10765,13 +10765,13 @@ It.prototype.toBytes = function() {
|
|
|
10765
10765
|
It.prototype.toHex = function() {
|
|
10766
10766
|
return Rr.encode(this.toBytes(), "hex").toUpperCase();
|
|
10767
10767
|
};
|
|
10768
|
-
var
|
|
10768
|
+
var xc = It, vc = Mr, bc = Cr, Ht = Y0, pc = Ht.assert, Wn = Ht.parseBytes, Yn = dc, Vi = xc;
|
|
10769
10769
|
function U0(f) {
|
|
10770
|
-
if (
|
|
10770
|
+
if (pc(f === "ed25519", "only tested with ed25519 so far"), !(this instanceof U0))
|
|
10771
10771
|
return new U0(f);
|
|
10772
|
-
f =
|
|
10772
|
+
f = bc[f].curve, this.curve = f, this.g = f.g, this.g.precompute(f.n.bitLength() + 1), this.pointClass = f.point().constructor, this.encodingLength = Math.ceil(f.n.bitLength() / 8), this.hash = vc.sha512;
|
|
10773
10773
|
}
|
|
10774
|
-
var
|
|
10774
|
+
var yc = U0;
|
|
10775
10775
|
U0.prototype.sign = function(e, t) {
|
|
10776
10776
|
e = Wn(e);
|
|
10777
10777
|
var r = this.keyFromSecret(t), a = this.hashInt(r.messagePrefix(), e), i = this.g.mul(a), y = this.encodePoint(i), x = this.hashInt(y, r.pubBytes(), e).mul(r.priv()), u = a.add(x).umod(this.curve.n);
|
|
@@ -10816,7 +10816,7 @@ U0.prototype.isPoint = function(e) {
|
|
|
10816
10816
|
};
|
|
10817
10817
|
(function(f) {
|
|
10818
10818
|
var e = f;
|
|
10819
|
-
e.version =
|
|
10819
|
+
e.version = vs.version, e.utils = Y0, e.rand = mn, e.curve = Wf, e.curves = Cr, e.ec = cc, e.eddsa = yc;
|
|
10820
10820
|
})(yn);
|
|
10821
10821
|
var Kn = { exports: {} };
|
|
10822
10822
|
(function(f) {
|
|
@@ -10831,7 +10831,7 @@ var Kn = { exports: {} };
|
|
|
10831
10831
|
throw new Error("no PRNG");
|
|
10832
10832
|
}, a = new Uint8Array(16), i = new Uint8Array(32);
|
|
10833
10833
|
i[0] = 9;
|
|
10834
|
-
var y = t(), x = t([1]), u = t([56129, 1]), o = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), c = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]),
|
|
10834
|
+
var y = t(), x = t([1]), u = t([56129, 1]), o = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), c = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), b = t([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), v = t([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), C = t([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
|
|
10835
10835
|
function w(l, _, m, s) {
|
|
10836
10836
|
l[_] = m >> 24 & 255, l[_ + 1] = m >> 16 & 255, l[_ + 2] = m >> 8 & 255, l[_ + 3] = m & 255, l[_ + 4] = s >> 24 & 255, l[_ + 5] = s >> 16 & 255, l[_ + 6] = s >> 8 & 255, l[_ + 7] = s & 255;
|
|
10837
10837
|
}
|
|
@@ -11288,7 +11288,7 @@ var Kn = { exports: {} };
|
|
|
11288
11288
|
}
|
|
11289
11289
|
function Je(l, _) {
|
|
11290
11290
|
var m = [t(), t(), t(), t()];
|
|
11291
|
-
F(m[0],
|
|
11291
|
+
F(m[0], b), F(m[1], v), F(m[2], x), re(m[3], b, v), F0(l, m, _);
|
|
11292
11292
|
}
|
|
11293
11293
|
function f0(l, _, m) {
|
|
11294
11294
|
var s = new Uint8Array(64), M = [t(), t(), t(), t()], p;
|
|
@@ -11422,7 +11422,7 @@ var Kn = { exports: {} };
|
|
|
11422
11422
|
if (_.length !== a0)
|
|
11423
11423
|
throw new Error("bad nonce size");
|
|
11424
11424
|
}
|
|
11425
|
-
function
|
|
11425
|
+
function yt(l, _) {
|
|
11426
11426
|
if (l.length !== W0)
|
|
11427
11427
|
throw new Error("bad public key size");
|
|
11428
11428
|
if (_.length !== e0)
|
|
@@ -11466,7 +11466,7 @@ var Kn = { exports: {} };
|
|
|
11466
11466
|
var M = e.box.before(m, s);
|
|
11467
11467
|
return e.secretbox(l, _, M);
|
|
11468
11468
|
}, e.box.before = function(l, _) {
|
|
11469
|
-
Ie(l, _),
|
|
11469
|
+
Ie(l, _), yt(l, _);
|
|
11470
11470
|
var m = new Uint8Array(n0);
|
|
11471
11471
|
return We(m, l, _), m;
|
|
11472
11472
|
}, e.box.after = e.secretbox, e.box.open = function(l, _, m, s) {
|
|
@@ -11554,9 +11554,9 @@ var Kn = { exports: {} };
|
|
|
11554
11554
|
}();
|
|
11555
11555
|
})(f.exports ? f.exports : self.nacl = self.nacl || {});
|
|
11556
11556
|
})(Kn);
|
|
11557
|
-
var
|
|
11558
|
-
const Jt = /* @__PURE__ */ sn(
|
|
11559
|
-
class
|
|
11557
|
+
var gc = Kn.exports;
|
|
11558
|
+
const Jt = /* @__PURE__ */ sn(gc);
|
|
11559
|
+
class mc {
|
|
11560
11560
|
string(e) {
|
|
11561
11561
|
let t;
|
|
11562
11562
|
return typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), this.stringToUnicode(t.replace(/\//g, "\\/"));
|
|
@@ -11588,13 +11588,13 @@ class gc {
|
|
|
11588
11588
|
return typeof e != "string" ? !1 : /^[0-9a-fA-F]+$/.test(e) && e.length % 2 === 0;
|
|
11589
11589
|
}
|
|
11590
11590
|
}
|
|
11591
|
-
const L0 = new
|
|
11592
|
-
class
|
|
11591
|
+
const L0 = new mc();
|
|
11592
|
+
class _c {
|
|
11593
11593
|
string(e) {
|
|
11594
11594
|
return L0.string(e);
|
|
11595
11595
|
}
|
|
11596
11596
|
crypto(e, t) {
|
|
11597
|
-
return
|
|
11597
|
+
return ut[e](t).toString(ut.enc.Hex);
|
|
11598
11598
|
}
|
|
11599
11599
|
hash(e) {
|
|
11600
11600
|
return this.crypto("SHA256", this.string(e));
|
|
@@ -11613,11 +11613,11 @@ class mc {
|
|
|
11613
11613
|
return L0.isHex(e);
|
|
11614
11614
|
}
|
|
11615
11615
|
}
|
|
11616
|
-
const sr = new
|
|
11617
|
-
class
|
|
11616
|
+
const sr = new _c();
|
|
11617
|
+
class Ac {
|
|
11618
11618
|
constructor() {
|
|
11619
|
-
|
|
11620
|
-
|
|
11619
|
+
wt(this, "KEY_SIZE");
|
|
11620
|
+
wt(this, "SIGNATURE_SIZE");
|
|
11621
11621
|
this.KEY_SIZE = 64, this.SIGNATURE_SIZE = 128;
|
|
11622
11622
|
}
|
|
11623
11623
|
keyPair() {
|
|
@@ -11650,10 +11650,10 @@ class _c {
|
|
|
11650
11650
|
);
|
|
11651
11651
|
}
|
|
11652
11652
|
}
|
|
11653
|
-
const Xi = new
|
|
11654
|
-
class
|
|
11653
|
+
const Xi = new Ac();
|
|
11654
|
+
class Ec {
|
|
11655
11655
|
constructor() {
|
|
11656
|
-
|
|
11656
|
+
wt(this, "ec");
|
|
11657
11657
|
this.ec = new yn.ec("secp256k1");
|
|
11658
11658
|
}
|
|
11659
11659
|
xphereSign(e, t) {
|
|
@@ -11676,13 +11676,16 @@ class Ac {
|
|
|
11676
11676
|
return this.ec.keyFromPublic(r, "hex").verify(e, t);
|
|
11677
11677
|
}
|
|
11678
11678
|
encrypt(e, t) {
|
|
11679
|
-
return
|
|
11679
|
+
return ut.AES.encrypt(e, t).toString();
|
|
11680
11680
|
}
|
|
11681
11681
|
decrypt(e, t) {
|
|
11682
|
-
return
|
|
11682
|
+
return ut.AES.decrypt(e, t).toString(ut.enc.Utf8);
|
|
11683
|
+
}
|
|
11684
|
+
generateNonce(e) {
|
|
11685
|
+
return ut.lib.WordArray.random(e).toString(ut.enc.Hex);
|
|
11683
11686
|
}
|
|
11684
11687
|
}
|
|
11685
|
-
const
|
|
11688
|
+
const jn = new Ec(), ct = /* @__PURE__ */ Object.create(null);
|
|
11686
11689
|
ct.open = "0";
|
|
11687
11690
|
ct.close = "1";
|
|
11688
11691
|
ct.ping = "2";
|
|
@@ -11694,7 +11697,7 @@ const ur = /* @__PURE__ */ Object.create(null);
|
|
|
11694
11697
|
Object.keys(ct).forEach((f) => {
|
|
11695
11698
|
ur[ct[f]] = f;
|
|
11696
11699
|
});
|
|
11697
|
-
const Rf = { type: "error", data: "parser error" },
|
|
11700
|
+
const Rf = { type: "error", data: "parser error" }, Vn = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Xn = typeof ArrayBuffer == "function", Zn = (f) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(f) : f && f.buffer instanceof ArrayBuffer, Vf = ({ type: f, data: e }, t, r) => Vn && e instanceof Blob ? t ? r(e) : Zi(e, r) : Xn && (e instanceof ArrayBuffer || Zn(e)) ? t ? r(e) : Zi(new Blob([e]), r) : r(ct[f] + (e || "")), Zi = (f, e) => {
|
|
11698
11701
|
const t = new FileReader();
|
|
11699
11702
|
return t.onload = function() {
|
|
11700
11703
|
const r = t.result.split(",")[1];
|
|
@@ -11706,9 +11709,9 @@ function Gi(f) {
|
|
|
11706
11709
|
}
|
|
11707
11710
|
let wf;
|
|
11708
11711
|
function wc(f, e) {
|
|
11709
|
-
if (
|
|
11712
|
+
if (Vn && f.data instanceof Blob)
|
|
11710
11713
|
return f.data.arrayBuffer().then(Gi).then(e);
|
|
11711
|
-
if (
|
|
11714
|
+
if (Xn && (f.data instanceof ArrayBuffer || Zn(f.data)))
|
|
11712
11715
|
return e(Gi(f.data));
|
|
11713
11716
|
Vf(f, !1, (t) => {
|
|
11714
11717
|
wf || (wf = new TextEncoder()), e(wf.encode(t));
|
|
@@ -11728,7 +11731,7 @@ const Bc = (f) => {
|
|
|
11728
11731
|
if (typeof f != "string")
|
|
11729
11732
|
return {
|
|
11730
11733
|
type: "message",
|
|
11731
|
-
data:
|
|
11734
|
+
data: Gn(f, e)
|
|
11732
11735
|
};
|
|
11733
11736
|
const t = f.charAt(0);
|
|
11734
11737
|
return t === "b" ? {
|
|
@@ -11743,10 +11746,10 @@ const Bc = (f) => {
|
|
|
11743
11746
|
}, Mc = (f, e) => {
|
|
11744
11747
|
if (Cc) {
|
|
11745
11748
|
const t = Bc(f);
|
|
11746
|
-
return
|
|
11749
|
+
return Gn(t, e);
|
|
11747
11750
|
} else
|
|
11748
11751
|
return { base64: !0, data: f };
|
|
11749
|
-
},
|
|
11752
|
+
}, Gn = (f, e) => {
|
|
11750
11753
|
switch (e) {
|
|
11751
11754
|
case "blob":
|
|
11752
11755
|
return f instanceof Blob ? f : new Blob([f]);
|
|
@@ -11754,16 +11757,16 @@ const Bc = (f) => {
|
|
|
11754
11757
|
default:
|
|
11755
11758
|
return f instanceof ArrayBuffer ? f : f.buffer;
|
|
11756
11759
|
}
|
|
11757
|
-
},
|
|
11760
|
+
}, Qn = "", Fc = (f, e) => {
|
|
11758
11761
|
const t = f.length, r = new Array(t);
|
|
11759
11762
|
let a = 0;
|
|
11760
11763
|
f.forEach((i, y) => {
|
|
11761
11764
|
Vf(i, !1, (x) => {
|
|
11762
|
-
r[y] = x, ++a === t && e(r.join(
|
|
11765
|
+
r[y] = x, ++a === t && e(r.join(Qn));
|
|
11763
11766
|
});
|
|
11764
11767
|
});
|
|
11765
11768
|
}, Sc = (f, e) => {
|
|
11766
|
-
const t = f.split(
|
|
11769
|
+
const t = f.split(Qn), r = [];
|
|
11767
11770
|
for (let a = 0; a < t.length; a++) {
|
|
11768
11771
|
const i = Xf(t[a], e);
|
|
11769
11772
|
if (r.push(i), i.type === "error")
|
|
@@ -11846,7 +11849,7 @@ function Rc(f, e) {
|
|
|
11846
11849
|
}
|
|
11847
11850
|
});
|
|
11848
11851
|
}
|
|
11849
|
-
const
|
|
11852
|
+
const Jn = 4;
|
|
11850
11853
|
function A0(f) {
|
|
11851
11854
|
if (f)
|
|
11852
11855
|
return Pc(f);
|
|
@@ -11899,7 +11902,7 @@ A0.prototype.hasListeners = function(f) {
|
|
|
11899
11902
|
return !!this.listeners(f).length;
|
|
11900
11903
|
};
|
|
11901
11904
|
const K0 = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
|
|
11902
|
-
function
|
|
11905
|
+
function ea(f, ...e) {
|
|
11903
11906
|
return e.reduce((t, r) => (f.hasOwnProperty(r) && (t[r] = f[r]), t), {});
|
|
11904
11907
|
}
|
|
11905
11908
|
const kc = K0.setTimeout, Ic = K0.clearTimeout;
|
|
@@ -12033,28 +12036,28 @@ class Zf extends A0 {
|
|
|
12033
12036
|
return t.length ? "?" + t : "";
|
|
12034
12037
|
}
|
|
12035
12038
|
}
|
|
12036
|
-
const
|
|
12039
|
+
const ta = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Pf = 64, Hc = {};
|
|
12037
12040
|
let Ji = 0, dr = 0, en;
|
|
12038
12041
|
function tn(f) {
|
|
12039
12042
|
let e = "";
|
|
12040
12043
|
do
|
|
12041
|
-
e =
|
|
12044
|
+
e = ta[f % Pf] + e, f = Math.floor(f / Pf);
|
|
12042
12045
|
while (f > 0);
|
|
12043
12046
|
return e;
|
|
12044
12047
|
}
|
|
12045
|
-
function
|
|
12048
|
+
function ra() {
|
|
12046
12049
|
const f = tn(+/* @__PURE__ */ new Date());
|
|
12047
12050
|
return f !== en ? (Ji = 0, en = f) : f + "." + tn(Ji++);
|
|
12048
12051
|
}
|
|
12049
12052
|
for (; dr < Pf; dr++)
|
|
12050
|
-
Hc[
|
|
12051
|
-
let
|
|
12053
|
+
Hc[ta[dr]] = dr;
|
|
12054
|
+
let fa = !1;
|
|
12052
12055
|
try {
|
|
12053
|
-
|
|
12056
|
+
fa = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
12054
12057
|
} catch {
|
|
12055
12058
|
}
|
|
12056
|
-
const Uc =
|
|
12057
|
-
function
|
|
12059
|
+
const Uc = fa;
|
|
12060
|
+
function ia(f) {
|
|
12058
12061
|
const e = f.xdomain;
|
|
12059
12062
|
try {
|
|
12060
12063
|
if (typeof XMLHttpRequest < "u" && (!e || Uc))
|
|
@@ -12070,7 +12073,7 @@ function fa(f) {
|
|
|
12070
12073
|
function $c() {
|
|
12071
12074
|
}
|
|
12072
12075
|
const Wc = function() {
|
|
12073
|
-
return new
|
|
12076
|
+
return new ia({
|
|
12074
12077
|
xdomain: !1
|
|
12075
12078
|
}).responseType != null;
|
|
12076
12079
|
}();
|
|
@@ -12175,7 +12178,7 @@ class Yc extends Zf {
|
|
|
12175
12178
|
*/
|
|
12176
12179
|
uri() {
|
|
12177
12180
|
const e = this.opts.secure ? "https" : "http", t = this.query || {};
|
|
12178
|
-
return this.opts.timestampRequests !== !1 && (t[this.opts.timestampParam] =
|
|
12181
|
+
return this.opts.timestampRequests !== !1 && (t[this.opts.timestampParam] = ra()), !this.supportsBinary && !t.sid && (t.b64 = 1), this.createUri(e, t);
|
|
12179
12182
|
}
|
|
12180
12183
|
/**
|
|
12181
12184
|
* Creates a request.
|
|
@@ -12231,9 +12234,9 @@ class nt extends A0 {
|
|
|
12231
12234
|
*/
|
|
12232
12235
|
create() {
|
|
12233
12236
|
var e;
|
|
12234
|
-
const t =
|
|
12237
|
+
const t = ea(this.opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
|
|
12235
12238
|
t.xdomain = !!this.opts.xd;
|
|
12236
|
-
const r = this.xhr = new
|
|
12239
|
+
const r = this.xhr = new ia(t);
|
|
12237
12240
|
try {
|
|
12238
12241
|
r.open(this.method, this.uri, !0);
|
|
12239
12242
|
try {
|
|
@@ -12339,7 +12342,7 @@ class jc extends Zf {
|
|
|
12339
12342
|
doOpen() {
|
|
12340
12343
|
if (!this.check())
|
|
12341
12344
|
return;
|
|
12342
|
-
const e = this.uri(), t = this.opts.protocols, r = nn ? {} :
|
|
12345
|
+
const e = this.uri(), t = this.opts.protocols, r = nn ? {} : ea(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
|
12343
12346
|
this.opts.extraHeaders && (r.headers = this.opts.extraHeaders);
|
|
12344
12347
|
try {
|
|
12345
12348
|
this.ws = fn && !nn ? t ? new hr(e, t) : new hr(e) : new hr(e, t, r);
|
|
@@ -12387,7 +12390,7 @@ class jc extends Zf {
|
|
|
12387
12390
|
*/
|
|
12388
12391
|
uri() {
|
|
12389
12392
|
const e = this.opts.secure ? "wss" : "ws", t = this.query || {};
|
|
12390
|
-
return this.opts.timestampRequests && (t[this.opts.timestampParam] =
|
|
12393
|
+
return this.opts.timestampRequests && (t[this.opts.timestampParam] = ra()), this.supportsBinary || (t.b64 = 1), this.createUri(e, t);
|
|
12391
12394
|
}
|
|
12392
12395
|
/**
|
|
12393
12396
|
* Feature detection for WebSocket.
|
|
@@ -12480,7 +12483,7 @@ function Jc(f, e) {
|
|
|
12480
12483
|
a && (t[a] = i);
|
|
12481
12484
|
}), t;
|
|
12482
12485
|
}
|
|
12483
|
-
let
|
|
12486
|
+
let na = class Tt extends A0 {
|
|
12484
12487
|
/**
|
|
12485
12488
|
* Socket constructor.
|
|
12486
12489
|
*
|
|
@@ -12523,7 +12526,7 @@ let ia = class Tt extends A0 {
|
|
|
12523
12526
|
*/
|
|
12524
12527
|
createTransport(e) {
|
|
12525
12528
|
const t = Object.assign({}, this.opts.query);
|
|
12526
|
-
t.EIO =
|
|
12529
|
+
t.EIO = Jn, t.transport = e, this.id && (t.sid = this.id);
|
|
12527
12530
|
const r = Object.assign({}, this.opts, {
|
|
12528
12531
|
query: t,
|
|
12529
12532
|
socket: this,
|
|
@@ -12576,26 +12579,26 @@ let ia = class Tt extends A0 {
|
|
|
12576
12579
|
let t = this.createTransport(e), r = !1;
|
|
12577
12580
|
Tt.priorWebsocketSuccess = !1;
|
|
12578
12581
|
const a = () => {
|
|
12579
|
-
r || (t.send([{ type: "ping", data: "probe" }]), t.once("packet", (
|
|
12582
|
+
r || (t.send([{ type: "ping", data: "probe" }]), t.once("packet", (b) => {
|
|
12580
12583
|
if (!r)
|
|
12581
|
-
if (
|
|
12584
|
+
if (b.type === "pong" && b.data === "probe") {
|
|
12582
12585
|
if (this.upgrading = !0, this.emitReserved("upgrading", t), !t)
|
|
12583
12586
|
return;
|
|
12584
12587
|
Tt.priorWebsocketSuccess = t.name === "websocket", this.transport.pause(() => {
|
|
12585
12588
|
r || this.readyState !== "closed" && (c(), this.setTransport(t), t.send([{ type: "upgrade" }]), this.emitReserved("upgrade", t), t = null, this.upgrading = !1, this.flush());
|
|
12586
12589
|
});
|
|
12587
12590
|
} else {
|
|
12588
|
-
const
|
|
12589
|
-
|
|
12591
|
+
const v = new Error("probe error");
|
|
12592
|
+
v.transport = t.name, this.emitReserved("upgradeError", v);
|
|
12590
12593
|
}
|
|
12591
12594
|
}));
|
|
12592
12595
|
};
|
|
12593
12596
|
function i() {
|
|
12594
12597
|
r || (r = !0, c(), t.close(), t = null);
|
|
12595
12598
|
}
|
|
12596
|
-
const y = (
|
|
12597
|
-
const
|
|
12598
|
-
|
|
12599
|
+
const y = (b) => {
|
|
12600
|
+
const v = new Error("probe error: " + b);
|
|
12601
|
+
v.transport = t.name, i(), this.emitReserved("upgradeError", v);
|
|
12599
12602
|
};
|
|
12600
12603
|
function x() {
|
|
12601
12604
|
y("transport closed");
|
|
@@ -12603,8 +12606,8 @@ let ia = class Tt extends A0 {
|
|
|
12603
12606
|
function u() {
|
|
12604
12607
|
y("socket closed");
|
|
12605
12608
|
}
|
|
12606
|
-
function o(
|
|
12607
|
-
t &&
|
|
12609
|
+
function o(b) {
|
|
12610
|
+
t && b.name !== t.name && i();
|
|
12608
12611
|
}
|
|
12609
12612
|
const c = () => {
|
|
12610
12613
|
t.removeListener("open", a), t.removeListener("error", y), t.removeListener("close", x), this.off("close", u), this.off("upgrading", o);
|
|
@@ -12785,14 +12788,14 @@ let ia = class Tt extends A0 {
|
|
|
12785
12788
|
return t;
|
|
12786
12789
|
}
|
|
12787
12790
|
};
|
|
12788
|
-
|
|
12791
|
+
na.protocol = Jn;
|
|
12789
12792
|
function e1(f, e = "", t) {
|
|
12790
12793
|
let r = f;
|
|
12791
12794
|
t = t || typeof location < "u" && location, f == null && (f = t.protocol + "//" + t.host), typeof f == "string" && (f.charAt(0) === "/" && (f.charAt(1) === "/" ? f = t.protocol + f : f = t.host + f), /^(https?|wss?):\/\//.test(f) || (typeof t < "u" ? f = t.protocol + "//" + f : f = "https://" + f), r = kf(f)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/";
|
|
12792
12795
|
const i = r.host.indexOf(":") !== -1 ? "[" + r.host + "]" : r.host;
|
|
12793
12796
|
return r.id = r.protocol + "://" + i + ":" + r.port + e, r.href = r.protocol + "://" + i + (t && t.port === r.port ? "" : ":" + r.port), r;
|
|
12794
12797
|
}
|
|
12795
|
-
const t1 = typeof ArrayBuffer == "function", r1 = (f) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(f) : f.buffer instanceof ArrayBuffer,
|
|
12798
|
+
const t1 = typeof ArrayBuffer == "function", r1 = (f) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(f) : f.buffer instanceof ArrayBuffer, aa = Object.prototype.toString, f1 = typeof Blob == "function" || typeof Blob < "u" && aa.call(Blob) === "[object BlobConstructor]", i1 = typeof File == "function" || typeof File < "u" && aa.call(File) === "[object FileConstructor]";
|
|
12796
12799
|
function Qf(f) {
|
|
12797
12800
|
return t1 && (f instanceof ArrayBuffer || r1(f)) || f1 && f instanceof Blob || i1 && f instanceof File;
|
|
12798
12801
|
}
|
|
@@ -13072,7 +13075,7 @@ const u1 = Object.freeze({
|
|
|
13072
13075
|
newListener: 1,
|
|
13073
13076
|
removeListener: 1
|
|
13074
13077
|
});
|
|
13075
|
-
class
|
|
13078
|
+
class sa extends A0 {
|
|
13076
13079
|
/**
|
|
13077
13080
|
* `Socket` constructor.
|
|
13078
13081
|
*/
|
|
@@ -13737,7 +13740,7 @@ class Of extends A0 {
|
|
|
13737
13740
|
open(e) {
|
|
13738
13741
|
if (~this._readyState.indexOf("open"))
|
|
13739
13742
|
return this;
|
|
13740
|
-
this.engine = new
|
|
13743
|
+
this.engine = new na(this.uri, this.opts);
|
|
13741
13744
|
const t = this.engine, r = this;
|
|
13742
13745
|
this._readyState = "opening", this.skipReconnect = !1;
|
|
13743
13746
|
const a = J0(t, "open", function() {
|
|
@@ -13820,7 +13823,7 @@ class Of extends A0 {
|
|
|
13820
13823
|
*/
|
|
13821
13824
|
socket(e, t) {
|
|
13822
13825
|
let r = this.nsps[e];
|
|
13823
|
-
return r ? this._autoConnect && !r.active && r.connect() : (r = new
|
|
13826
|
+
return r ? this._autoConnect && !r.active && r.connect() : (r = new sa(this, e, t), this.nsps[e] = r), r;
|
|
13824
13827
|
}
|
|
13825
13828
|
/**
|
|
13826
13829
|
* Called upon a socket close.
|
|
@@ -13921,24 +13924,24 @@ function xr(f, e) {
|
|
|
13921
13924
|
}
|
|
13922
13925
|
Object.assign(xr, {
|
|
13923
13926
|
Manager: Of,
|
|
13924
|
-
Socket:
|
|
13927
|
+
Socket: sa,
|
|
13925
13928
|
io: xr,
|
|
13926
13929
|
connect: xr
|
|
13927
13930
|
});
|
|
13928
|
-
const
|
|
13931
|
+
const Ct = class Ct {
|
|
13929
13932
|
constructor() {
|
|
13930
|
-
|
|
13933
|
+
wt(this, "socket");
|
|
13931
13934
|
this.socket = xr("http://159.138.233.132:8080");
|
|
13932
13935
|
}
|
|
13933
13936
|
static getInstance() {
|
|
13934
|
-
return
|
|
13937
|
+
return Ct.instance || (Ct.instance = new Ct()), Ct.instance;
|
|
13935
13938
|
}
|
|
13936
13939
|
};
|
|
13937
|
-
|
|
13938
|
-
let zf =
|
|
13940
|
+
wt(Ct, "instance");
|
|
13941
|
+
let zf = Ct;
|
|
13939
13942
|
class l1 {
|
|
13940
13943
|
constructor() {
|
|
13941
|
-
|
|
13944
|
+
wt(this, "socketInstance");
|
|
13942
13945
|
this.socketInstance = zf.getInstance();
|
|
13943
13946
|
}
|
|
13944
13947
|
joinRoom(e) {
|
|
@@ -13964,7 +13967,7 @@ class l1 {
|
|
|
13964
13967
|
e === "accountInfo" ? this.socketInstance.socket.off("accountInfo") : e === "requestMessage" ? this.socketInstance.socket.off("requestMessage") : e === "addressProvide" && this.socketInstance.socket.off("addressProvide");
|
|
13965
13968
|
}
|
|
13966
13969
|
}
|
|
13967
|
-
const
|
|
13970
|
+
const xt = new l1();
|
|
13968
13971
|
class x1 {
|
|
13969
13972
|
// 타입 가드 함수
|
|
13970
13973
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -13993,82 +13996,84 @@ class x1 {
|
|
|
13993
13996
|
// }
|
|
13994
13997
|
getAccountCrypto() {
|
|
13995
13998
|
return new Promise((e, t) => {
|
|
13996
|
-
|
|
13999
|
+
xt.onMessageReceived("accountInfo", (r) => {
|
|
13997
14000
|
this.isAccountCryptoType(r) ? e(r) : t(new Error("Invalid account crypto"));
|
|
13998
14001
|
});
|
|
13999
14002
|
});
|
|
14000
14003
|
}
|
|
14001
14004
|
reciveRequest() {
|
|
14002
14005
|
return new Promise((e, t) => {
|
|
14003
|
-
|
|
14006
|
+
xt.onMessageReceived("requestMessage", (r) => {
|
|
14004
14007
|
r.message === "Request Message" ? e(!0) : t(new Error("Request message is different"));
|
|
14005
14008
|
});
|
|
14006
14009
|
});
|
|
14007
14010
|
}
|
|
14008
14011
|
sendMessage(e, t) {
|
|
14009
14012
|
return new Promise((r, a) => {
|
|
14010
|
-
|
|
14013
|
+
xt.confirmMessage(e, t).connected ? r() : a(new Error("Send failed"));
|
|
14011
14014
|
});
|
|
14012
14015
|
}
|
|
14013
|
-
async qrLogin(e, t) {
|
|
14016
|
+
async qrLogin(e, t, r) {
|
|
14014
14017
|
try {
|
|
14015
14018
|
if (await this.reciveRequest()) {
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
|
|
14019
|
+
t = `${t}
|
|
14020
|
+
|
|
14021
|
+
Nonce: ${r}`, await this.sendMessage(e, t);
|
|
14022
|
+
const { publicKey: i, signature: y, address: x } = await this.getAccountCrypto();
|
|
14023
|
+
if (!jn.xphereVerify(t, i, y))
|
|
14019
14024
|
throw new Error("Verification failed");
|
|
14020
|
-
return { address:
|
|
14025
|
+
return { address: x };
|
|
14021
14026
|
} else
|
|
14022
14027
|
throw new Error("Verification failed");
|
|
14023
|
-
} catch (
|
|
14024
|
-
return Promise.reject(
|
|
14028
|
+
} catch (a) {
|
|
14029
|
+
return Promise.reject(a);
|
|
14025
14030
|
} finally {
|
|
14026
|
-
|
|
14031
|
+
xt.leaveRoom(e);
|
|
14027
14032
|
}
|
|
14028
14033
|
}
|
|
14029
14034
|
}
|
|
14030
14035
|
const v1 = new x1();
|
|
14031
14036
|
class b1 {
|
|
14032
14037
|
generateQrCode(e, t) {
|
|
14033
|
-
const r =
|
|
14038
|
+
const r = ut.lib.WordArray.random(16).toString(ut.enc.Hex);
|
|
14034
14039
|
let a = "";
|
|
14035
|
-
return e === "login" ? a = `zigap://login?roomId=${r}&dapp=${t}` : e === "send" ? a = `zigap://send?roomId=${r}&dapp=${t}` : e === "provide" && (a = `zigap://provide?roomId=${r}&dapp=${t}`),
|
|
14040
|
+
return e === "login" ? a = `zigap://login?roomId=${r}&dapp=${t}` : e === "send" ? a = `zigap://send?roomId=${r}&dapp=${t}` : e === "provide" && (a = `zigap://provide?roomId=${r}&dapp=${t}`), xt.joinRoom(r), {
|
|
14036
14041
|
qrCode: a,
|
|
14037
14042
|
roomId: r
|
|
14038
14043
|
};
|
|
14039
14044
|
}
|
|
14040
14045
|
}
|
|
14041
|
-
const
|
|
14042
|
-
const [
|
|
14046
|
+
const oa = new b1(), _1 = ({ dapp: f, sigMessage: e, validTime: t, onReceive: r, imgSrc: a, ...i }) => {
|
|
14047
|
+
const [y, x] = qf(!0), u = jn.generateNonce(16), { qrCode: o, roomId: c } = oa.generateQrCode("login", f);
|
|
14043
14048
|
return zt(() => {
|
|
14044
|
-
const
|
|
14049
|
+
const b = setTimeout(
|
|
14045
14050
|
() => {
|
|
14046
|
-
|
|
14051
|
+
xt.leaveRoom(c), x(!1);
|
|
14047
14052
|
},
|
|
14048
14053
|
t * 60 * 1e3
|
|
14049
14054
|
);
|
|
14050
|
-
return () => clearTimeout(
|
|
14051
|
-
}, [
|
|
14055
|
+
return () => clearTimeout(b);
|
|
14056
|
+
}, [c, t]), zt(() => {
|
|
14052
14057
|
(async () => {
|
|
14053
14058
|
try {
|
|
14054
|
-
console.log("roomId",
|
|
14055
|
-
const
|
|
14059
|
+
console.log("roomId", c);
|
|
14060
|
+
const C = {
|
|
14056
14061
|
isSuccess: !0,
|
|
14057
|
-
address: (await v1.qrLogin(
|
|
14062
|
+
address: (await v1.qrLogin(c, e, u)).address
|
|
14058
14063
|
};
|
|
14059
|
-
r(
|
|
14064
|
+
r(C);
|
|
14060
14065
|
} catch {
|
|
14061
14066
|
r({
|
|
14062
14067
|
isSuccess: !1
|
|
14063
14068
|
});
|
|
14064
14069
|
}
|
|
14065
14070
|
})();
|
|
14066
|
-
}, [r, e]),
|
|
14071
|
+
}, [r, e]), y ? /* @__PURE__ */ vr.jsx(
|
|
14067
14072
|
ln,
|
|
14068
14073
|
{
|
|
14069
|
-
value:
|
|
14070
|
-
...a,
|
|
14071
|
-
|
|
14074
|
+
value: o,
|
|
14075
|
+
...a && { imageSettings: { src: a, width: 60, height: 60, excavate: !1 } },
|
|
14076
|
+
...i
|
|
14072
14077
|
}
|
|
14073
14078
|
) : /* @__PURE__ */ vr.jsx("div", { children: "QR loading error" });
|
|
14074
14079
|
};
|
|
@@ -14080,7 +14085,7 @@ class p1 {
|
|
|
14080
14085
|
}
|
|
14081
14086
|
getAccount() {
|
|
14082
14087
|
return new Promise((e, t) => {
|
|
14083
|
-
|
|
14088
|
+
xt.onMessageReceived("addressProvide", (r) => {
|
|
14084
14089
|
this.isAccountType(r) ? e(r) : t(new Error("Invalid address"));
|
|
14085
14090
|
});
|
|
14086
14091
|
});
|
|
@@ -14091,16 +14096,16 @@ class p1 {
|
|
|
14091
14096
|
} catch (t) {
|
|
14092
14097
|
return Promise.reject(t);
|
|
14093
14098
|
} finally {
|
|
14094
|
-
|
|
14099
|
+
xt.leaveRoom(e);
|
|
14095
14100
|
}
|
|
14096
14101
|
}
|
|
14097
14102
|
}
|
|
14098
14103
|
const y1 = new p1(), A1 = ({ dapp: f, validTime: e, onReceive: t, ...r }) => {
|
|
14099
|
-
const [a, i] = qf(!0), { qrCode: y, roomId: x } =
|
|
14104
|
+
const [a, i] = qf(!0), { qrCode: y, roomId: x } = oa.generateQrCode("provide", f);
|
|
14100
14105
|
return zt(() => {
|
|
14101
14106
|
const u = setTimeout(
|
|
14102
14107
|
() => {
|
|
14103
|
-
|
|
14108
|
+
xt.leaveRoom(x), i(!1);
|
|
14104
14109
|
},
|
|
14105
14110
|
e * 60 * 1e3
|
|
14106
14111
|
);
|