@jieyin/editor-sdk-test 1.1.162 → 1.1.163
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/editor-sdk.es.js +7256 -6824
- package/dist/renderWorker.js +767 -765
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var g0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(g0 || {});
|
|
2
2
|
function Ye(r) {
|
|
3
|
-
let
|
|
3
|
+
let d = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = d;
|
|
6
|
+
return d += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function Qe(r,
|
|
9
|
+
function Qe(r, d) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,24 +23,24 @@ function Qe(r, h) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? d,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function Ve(r,
|
|
33
|
-
let
|
|
34
|
-
if (r.type === "Group" && m === void 0 && (!
|
|
35
|
-
const x = r.children[0].name, n =
|
|
36
|
-
(E !== void 0 || n?.id !== void 0) && (
|
|
32
|
+
function Ve(r, d, t, e) {
|
|
33
|
+
let l = r.name || "", v = d[l], m = v?.partId ?? (r.type === "Group" ? t.get(l) : void 0);
|
|
34
|
+
if (r.type === "Group" && m === void 0 && (!v || v.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
+
const x = r.children[0].name, n = d[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (l = x, v = n, m = E);
|
|
37
37
|
}
|
|
38
|
-
const B = r.id ??
|
|
38
|
+
const B = r.id ?? v?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
41
|
id: B,
|
|
42
42
|
partId: m,
|
|
43
|
-
name:
|
|
43
|
+
name: l,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: g0.Group,
|
|
@@ -51,7 +51,7 @@ function Ve(r, h, t, e) {
|
|
|
51
51
|
clipping: r.clipping,
|
|
52
52
|
layerOrder: r.layerOrder
|
|
53
53
|
};
|
|
54
|
-
let C =
|
|
54
|
+
let C = v?.url;
|
|
55
55
|
return !C && r.imagePath && (C = r.imagePath), {
|
|
56
56
|
id: B,
|
|
57
57
|
name: r.name || "",
|
|
@@ -64,37 +64,37 @@ function Ve(r, h, t, e) {
|
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function Je(r,
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function Je(r, d) {
|
|
68
|
+
const t = new Map(d.parts.map((l) => [l.name, l.id])), e = Ye(d.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const
|
|
70
|
+
parts: d.parts,
|
|
71
|
+
models: r.map((l) => {
|
|
72
|
+
const v = l.layerExtrasByName ?? {}, m = l.psdJson, B = m.layerList || m.layerList || [], C = m.canvasWidth, x = m.canvasHeight;
|
|
73
73
|
if (!C || !x)
|
|
74
74
|
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${C}, canvasHeight=${x}。请确保 jsonurl 中的 canvasWidth 和 canvasHeight 存在`);
|
|
75
75
|
const n = (s) => {
|
|
76
76
|
const f = [];
|
|
77
|
-
for (const
|
|
78
|
-
if (
|
|
79
|
-
const
|
|
80
|
-
const b = o.layerOrder ?? 0, g =
|
|
77
|
+
for (const p of s)
|
|
78
|
+
if (p.type === "Group" && p.children) {
|
|
79
|
+
const h = [], D = [], i = [...p.children].sort((o, u) => {
|
|
80
|
+
const b = o.layerOrder ?? 0, g = u.layerOrder ?? 0;
|
|
81
81
|
return b - g;
|
|
82
82
|
});
|
|
83
83
|
for (const o of i)
|
|
84
|
-
o.isSmartObject === !0 ?
|
|
84
|
+
o.isSmartObject === !0 ? h.push(o) : D.push(o);
|
|
85
85
|
if (D.length > 0) {
|
|
86
86
|
const o = n(D);
|
|
87
87
|
f.push(...o);
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
...
|
|
91
|
-
children:
|
|
89
|
+
h.length > 0 && f.push({
|
|
90
|
+
...p,
|
|
91
|
+
children: h
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
|
-
f.push(
|
|
94
|
+
f.push(p);
|
|
95
95
|
return f;
|
|
96
96
|
}, a = n(B).map(
|
|
97
|
-
(s) => Ve(s,
|
|
97
|
+
(s) => Ve(s, v, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -110,44 +110,44 @@ function rt(r) {
|
|
|
110
110
|
function et(r) {
|
|
111
111
|
return r ? r.type === "bezier" ? {
|
|
112
112
|
type: "bezier",
|
|
113
|
-
paths: r.paths.map((
|
|
114
|
-
open: !!
|
|
115
|
-
knots:
|
|
113
|
+
paths: r.paths.map((d) => ({
|
|
114
|
+
open: !!d.open,
|
|
115
|
+
knots: d.knots.map((t) => ({
|
|
116
116
|
linked: !!t.linked,
|
|
117
117
|
points: Array.isArray(t.points) ? [...t.points] : []
|
|
118
118
|
}))
|
|
119
119
|
}))
|
|
120
120
|
} : r.type === "simple" ? {
|
|
121
121
|
type: "simple",
|
|
122
|
-
points: r.points.map((
|
|
123
|
-
x:
|
|
124
|
-
y:
|
|
125
|
-
type:
|
|
122
|
+
points: r.points.map((d) => ({
|
|
123
|
+
x: d.x,
|
|
124
|
+
y: d.y,
|
|
125
|
+
type: d.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function hr(r, d) {
|
|
130
|
+
if (d) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), d.type === "bezier" && Array.isArray(d.paths))
|
|
132
|
+
d.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
137
|
-
for (let
|
|
138
|
-
const m = e[
|
|
139
|
-
let B = (
|
|
140
|
-
if (!t.open &&
|
|
135
|
+
const l = e[0];
|
|
136
|
+
r.moveTo(l.points[2], l.points[3]);
|
|
137
|
+
for (let v = 0; v < e.length; v++) {
|
|
138
|
+
const m = e[v];
|
|
139
|
+
let B = (v + 1) % e.length;
|
|
140
|
+
if (!t.open && v === e.length - 1)
|
|
141
141
|
B = 0;
|
|
142
|
-
else if (t.open &&
|
|
142
|
+
else if (t.open && v === e.length - 1)
|
|
143
143
|
break;
|
|
144
144
|
const C = e[B], x = m.points[4], n = m.points[5], E = C.points[0], a = C.points[1], s = C.points[2], f = C.points[3];
|
|
145
145
|
r.bezierCurveTo(x, n, E, a, s, f);
|
|
146
146
|
}
|
|
147
147
|
t.open || r.closePath();
|
|
148
148
|
});
|
|
149
|
-
else if (
|
|
150
|
-
const t =
|
|
149
|
+
else if (d.type === "simple" && Array.isArray(d.points)) {
|
|
150
|
+
const t = d.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -161,10 +161,10 @@ class v0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(d) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(d);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class v0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(d, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(d, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class v0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(d) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(d), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -209,7 +209,7 @@ class v0 {
|
|
|
209
209
|
return this.hasStorage;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class ur {
|
|
213
213
|
/**
|
|
214
214
|
* 是否在浏览器环境
|
|
215
215
|
*/
|
|
@@ -251,10 +251,10 @@ class h0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(d) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
257
|
-
return new URL(
|
|
256
|
+
const t = ur.getOrigin();
|
|
257
|
+
return new URL(d, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,216 +262,218 @@ class h0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(d, t, e) {
|
|
266
|
+
const l = this.parse(d);
|
|
267
|
+
return !l || l.searchParams.has(t) ? d : (l.searchParams.set(t, e), this.formatUrl(d, l));
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* 移除查询参数
|
|
271
271
|
*/
|
|
272
|
-
static removeParam(
|
|
273
|
-
const e = this.parse(
|
|
274
|
-
return !e || !e.searchParams.has(t) ?
|
|
272
|
+
static removeParam(d, t) {
|
|
273
|
+
const e = this.parse(d);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? d : (e.searchParams.delete(t), this.formatUrl(d, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(d, t) {
|
|
280
|
+
return this.parse(d)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
287
|
-
return e ? t.toString() :
|
|
285
|
+
static formatUrl(d, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(d), l = d.startsWith("//");
|
|
287
|
+
return e ? t.toString() : l ? t.toString().replace(/^https?:/, "") : `${t.pathname}${t.search}${t.hash}`;
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* 检查是否为数据 URL
|
|
291
291
|
*/
|
|
292
|
-
static isDataUrl(
|
|
293
|
-
return
|
|
292
|
+
static isDataUrl(d) {
|
|
293
|
+
return d?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(d) {
|
|
299
|
+
return d?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
const t0 =
|
|
303
|
-
(function(r,
|
|
304
|
-
const t =
|
|
302
|
+
const t0 = cr;
|
|
303
|
+
(function(r, d) {
|
|
304
|
+
const t = cr, e = r();
|
|
305
305
|
for (; ; )
|
|
306
306
|
try {
|
|
307
|
-
if (
|
|
307
|
+
if (parseInt(t(457)) / 1 * (parseInt(t(484)) / 2) + parseInt(t(463)) / 3 * (parseInt(t(466)) / 4) + -parseInt(t(476)) / 5 + -parseInt(t(461)) / 6 * (-parseInt(t(460)) / 7) + -parseInt(t(492)) / 8 + -parseInt(t(490)) / 9 * (parseInt(t(487)) / 10) + -parseInt(t(493)) / 11 * (-parseInt(t(475)) / 12) === d) break;
|
|
308
308
|
e.push(e.shift());
|
|
309
309
|
} catch {
|
|
310
310
|
e.push(e.shift());
|
|
311
311
|
}
|
|
312
|
-
})(
|
|
313
|
-
function cr() {
|
|
314
|
-
const r = ["eItem", "bind", "re_ti", "FileT", "isDat", "fileT", "data", "inclu", "n (fu", "isBro", "128SLFsXt", "32727170nYpbSf", "1385631goLKiB", "tion", "1076131sIzItM", "wser", "bUrl", "11ZGpjmv", "ctor(", "1jfmAnc", "fetch", "11932389GnBjtJ", "toStr", "error", "2000KhuCrn", "token", "8hqqlfv", "es_in", "des", "__pro", "797630zceZIv", "getIt", "efres", "6132432KKCTXS", "file_"];
|
|
315
|
-
return cr = function() {
|
|
316
|
-
return r;
|
|
317
|
-
}, cr();
|
|
318
|
-
}
|
|
312
|
+
})(fr, -24 * -3107 + 880907 + -5 * 91093);
|
|
319
313
|
const A0 = /* @__PURE__ */ (function() {
|
|
320
314
|
let r = !0;
|
|
321
|
-
return function(
|
|
315
|
+
return function(d, t) {
|
|
322
316
|
const e = r ? function() {
|
|
323
317
|
if (t) {
|
|
324
|
-
const
|
|
325
|
-
return t = null,
|
|
318
|
+
const l = t.apply(d, arguments);
|
|
319
|
+
return t = null, l;
|
|
326
320
|
}
|
|
327
321
|
} : function() {
|
|
328
322
|
};
|
|
329
323
|
return r = !1, e;
|
|
330
324
|
};
|
|
331
325
|
})(), tt = A0(void 0, function() {
|
|
332
|
-
const r =
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
326
|
+
const r = cr, d = function() {
|
|
327
|
+
const v = cr;
|
|
328
|
+
let m;
|
|
329
|
+
try {
|
|
330
|
+
m = Function("return (functio" + v(453) + ("{}.constructor(" + v(483) + 'rn this")( )') + ");")();
|
|
331
|
+
} catch {
|
|
332
|
+
m = window;
|
|
333
|
+
}
|
|
334
|
+
return m;
|
|
335
|
+
}, t = d(), e = t.console = t.console || {}, l = ["log", "warn", "info", "error", r(462) + r(458), "table", "trace"];
|
|
336
|
+
for (let v = -9404 + 7 * -632 + 13828; v < l[r(459) + "h"]; v++) {
|
|
337
|
+
const m = A0["const" + r(452) + "r"][r(480) + "type"].bind(A0), B = l[v], C = e[B] || m;
|
|
338
|
+
m["__pro" + r(486)] = A0.bind(A0), m.toString = C[r(464) + "ing"].bind(C), e[B] = m;
|
|
343
339
|
}
|
|
344
340
|
});
|
|
345
341
|
tt();
|
|
346
|
-
const
|
|
347
|
-
function
|
|
348
|
-
return v0[t0(
|
|
342
|
+
const Er = t0(456) + "token", Ar = "file_token_expire_time", xt = 60 * (3 * 3235 + -11 * -781 + -17296);
|
|
343
|
+
function Br() {
|
|
344
|
+
return v0[t0(485) + "em"](Er);
|
|
349
345
|
}
|
|
350
346
|
function nt(r = xt) {
|
|
351
|
-
if (!
|
|
352
|
-
const t = v0.getItem(
|
|
347
|
+
if (!Br()) return !0;
|
|
348
|
+
const t = v0.getItem(Ar);
|
|
353
349
|
if (!t) return !1;
|
|
354
350
|
const e = Number(t);
|
|
355
351
|
return Date.now() + r > e;
|
|
356
352
|
}
|
|
357
|
-
function at(r,
|
|
358
|
-
if (v0.setItem(
|
|
359
|
-
const t = Date.now() +
|
|
360
|
-
v0.setItem(
|
|
353
|
+
function at(r, d) {
|
|
354
|
+
if (v0.setItem(Er, r), typeof d == "number" && d > 0) {
|
|
355
|
+
const t = Date.now() + d * 1e3;
|
|
356
|
+
v0.setItem(Ar, String(t));
|
|
361
357
|
}
|
|
362
358
|
}
|
|
363
359
|
function ot() {
|
|
364
360
|
const r = t0;
|
|
365
|
-
v0
|
|
361
|
+
v0[r(474) + "eItem"](Er), v0["remov" + r(494)](Ar);
|
|
366
362
|
}
|
|
367
|
-
async function
|
|
368
|
-
const
|
|
369
|
-
return t?.
|
|
363
|
+
async function Wr(r) {
|
|
364
|
+
const d = t0, t = await r(), e = t?.data?.[d(478)];
|
|
365
|
+
return t?.[d(478)]?.[d(469)] === -2 * 1223 + -2 * 641 + 3928 && e?.["file_token"] ? (at(e["file_" + d(465)], e["expir" + d(481)]), e[d(456) + "token"]) : null;
|
|
366
|
+
}
|
|
367
|
+
function cr(r, d) {
|
|
368
|
+
return r = r - (-3214 * 2 + 13 * 443 + 1121), fr()[r];
|
|
370
369
|
}
|
|
371
370
|
let it = null;
|
|
372
|
-
function
|
|
373
|
-
return
|
|
371
|
+
function Ir() {
|
|
372
|
+
return ur.isBrowser() ? it : null;
|
|
374
373
|
}
|
|
375
374
|
async function be() {
|
|
376
375
|
const r = t0;
|
|
377
|
-
if (!
|
|
378
|
-
const
|
|
379
|
-
if (
|
|
376
|
+
if (!ur[r(489) + "wser"]()) return Br();
|
|
377
|
+
const d = Br();
|
|
378
|
+
if (d && !nt()) return d;
|
|
380
379
|
try {
|
|
381
|
-
const t = await
|
|
382
|
-
if (
|
|
383
|
-
const e = await
|
|
380
|
+
const t = await Ir();
|
|
381
|
+
if (d && t?.[r(491) + "FileT" + r(477) + "efresh"]) {
|
|
382
|
+
const e = await Wr(t["fetchFileT" + r(477) + "efresh"]);
|
|
384
383
|
if (e) return e;
|
|
385
384
|
}
|
|
386
385
|
} catch {
|
|
387
386
|
}
|
|
388
387
|
try {
|
|
389
|
-
const t =
|
|
390
|
-
return t?.[
|
|
388
|
+
const t = Ir();
|
|
389
|
+
return t?.["fetchFileToken"] ? await Wr(t.fetchFileToken) : null;
|
|
391
390
|
} catch {
|
|
392
391
|
return null;
|
|
393
392
|
}
|
|
394
393
|
}
|
|
395
394
|
function me(r) {
|
|
396
|
-
const
|
|
397
|
-
if (!r || h0[
|
|
395
|
+
const d = t0;
|
|
396
|
+
if (!r || h0[d(455) + d(482)](r) || h0[d(468) + "bUrl"](r)) return !1;
|
|
398
397
|
const t = h0.parse(r);
|
|
399
|
-
return t ? t.
|
|
400
|
-
}
|
|
401
|
-
function _e(r, h) {
|
|
402
|
-
return !h || !me(r) ? r : h0.addParam(r, "fileToken", h);
|
|
398
|
+
return t ? t["pathn" + d(473)].includes(d(454) + "s/") && !h0[d(488) + "ram"](r, "fileT" + d(472)) : r["inclu" + d(470)](d(454) + "s/") && !r.includes(d(467) + d(471));
|
|
403
399
|
}
|
|
404
|
-
function
|
|
405
|
-
|
|
400
|
+
function _e(r, d) {
|
|
401
|
+
const t = t0;
|
|
402
|
+
return !d || !me(r) ? r : h0.addParam(r, t(467) + t(472), d);
|
|
406
403
|
}
|
|
407
404
|
function st(r) {
|
|
408
|
-
|
|
409
|
-
return h0.removeParam(r, h(177) + "oken");
|
|
405
|
+
return h0["remov" + t0(479) + "m"](r, "fileToken");
|
|
410
406
|
}
|
|
411
407
|
async function ct(r) {
|
|
412
408
|
if (!me(r)) return r;
|
|
413
|
-
const
|
|
414
|
-
return _e(r,
|
|
409
|
+
const d = await be();
|
|
410
|
+
return _e(r, d);
|
|
415
411
|
}
|
|
416
|
-
async function ye(r,
|
|
417
|
-
if (!
|
|
418
|
-
const
|
|
419
|
-
if (
|
|
412
|
+
async function ye(r, d) {
|
|
413
|
+
if (!ur[t0(489) + "wser"]()) return fetch(r, d);
|
|
414
|
+
const e = st(r), l = await ct(e), v = await fetch(l, d);
|
|
415
|
+
if (v.status !== 401) return v;
|
|
420
416
|
ot();
|
|
421
|
-
const
|
|
422
|
-
return fetch(
|
|
417
|
+
const m = await be(), B = _e(e, m);
|
|
418
|
+
return fetch(B, d);
|
|
423
419
|
}
|
|
424
|
-
|
|
420
|
+
function fr() {
|
|
421
|
+
const r = ["token", "3328340ILmANe", "fileT", "isBlo", "code", "des", "oken=", "oken", "ame", "remov", "4946100WPgBej", "3601920yASylq", "okenR", "data", "ePara", "proto", "es_in", "aUrl", '"retu', "2uTqEhr", "getIt", "to__", "10LXakdT", "hasPa", "isBro", "2953917ltURnE", "fetch", "5774712TxZLSe", "11DOuXgz", "eItem", "ructo", "n() ", "/file", "isDat", "file_", "410577UgJqXt", "tion", "lengt", "7gKDuys", "3693654UnjzRn", "excep", "3wZcCAn", "toStr"];
|
|
422
|
+
return fr = function() {
|
|
423
|
+
return r;
|
|
424
|
+
}, fr();
|
|
425
|
+
}
|
|
426
|
+
const we = (r, d) => {
|
|
425
427
|
if (!r) return r;
|
|
426
|
-
const t = (
|
|
428
|
+
const t = (d || "").replace(/\/$/, "");
|
|
427
429
|
if (t && r.startsWith(t))
|
|
428
430
|
return r;
|
|
429
431
|
if (typeof window < "u") {
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
432
|
+
const l = window.location.hostname;
|
|
433
|
+
if (l === "localhost" || l === "127.0.0.1")
|
|
432
434
|
try {
|
|
433
|
-
const
|
|
435
|
+
const v = new URL(r);
|
|
434
436
|
if (t)
|
|
435
437
|
try {
|
|
436
438
|
const m = new URL(t).origin;
|
|
437
|
-
if (
|
|
439
|
+
if (v.origin === m)
|
|
438
440
|
return r;
|
|
439
441
|
} catch {
|
|
440
442
|
}
|
|
441
|
-
if (
|
|
442
|
-
return t ? `${t}${
|
|
443
|
+
if (v.pathname.startsWith("/files/"))
|
|
444
|
+
return t ? `${t}${v.pathname}${v.search}${v.hash}` : `${v.pathname}${v.search}${v.hash}`;
|
|
443
445
|
} catch {
|
|
444
446
|
}
|
|
445
447
|
}
|
|
446
448
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
447
449
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
448
450
|
return e ? `/oss${e[2]}` : r;
|
|
449
|
-
}, ft = (r,
|
|
451
|
+
}, ft = (r, d) => {
|
|
450
452
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
451
|
-
return new OffscreenCanvas(r,
|
|
453
|
+
return new OffscreenCanvas(r, d);
|
|
452
454
|
const t = document.createElement("canvas");
|
|
453
|
-
return t.width = r, t.height =
|
|
454
|
-
}, _0 = async (r,
|
|
455
|
-
if (!
|
|
455
|
+
return t.width = r, t.height = d, t;
|
|
456
|
+
}, _0 = async (r, d) => {
|
|
457
|
+
if (!d || d <= 0) return r;
|
|
456
458
|
const t = Math.max(r.width, r.height);
|
|
457
|
-
if (t <=
|
|
458
|
-
const e =
|
|
459
|
-
return B ? (B.drawImage(r, 0, 0,
|
|
459
|
+
if (t <= d) return r;
|
|
460
|
+
const e = d / t, l = Math.max(1, Math.round(r.width * e)), v = Math.max(1, Math.round(r.height * e)), m = ft(l, v), B = m.getContext("2d");
|
|
461
|
+
return B ? (B.drawImage(r, 0, 0, l, v), r.close?.(), await createImageBitmap(m)) : r;
|
|
460
462
|
};
|
|
461
|
-
async function ut(r,
|
|
463
|
+
async function ut(r, d, t) {
|
|
462
464
|
if (typeof r == "string")
|
|
463
465
|
try {
|
|
464
|
-
const e = we(r, t),
|
|
465
|
-
if (!
|
|
466
|
-
const m =
|
|
466
|
+
const e = we(r, t), l = await ye(e);
|
|
467
|
+
if (!l.ok) {
|
|
468
|
+
const m = l.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${l.status} ${l.statusText}): ${r}`;
|
|
467
469
|
throw new Error(m);
|
|
468
470
|
}
|
|
469
|
-
const
|
|
470
|
-
if (!
|
|
471
|
+
const v = await l.blob();
|
|
472
|
+
if (!v.type.startsWith("image/") && v.size === 0)
|
|
471
473
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
472
474
|
try {
|
|
473
|
-
const m = await createImageBitmap(
|
|
474
|
-
return await _0(m,
|
|
475
|
+
const m = await createImageBitmap(v);
|
|
476
|
+
return await _0(m, d);
|
|
475
477
|
} catch (m) {
|
|
476
478
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
477
479
|
}
|
|
@@ -479,13 +481,13 @@ async function ut(r, h, t) {
|
|
|
479
481
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
480
482
|
}
|
|
481
483
|
if (r instanceof HTMLImageElement) {
|
|
482
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
483
|
-
r.onload = e, r.onerror = () =>
|
|
484
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, l) => {
|
|
485
|
+
r.onload = e, r.onerror = () => l(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
484
486
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
485
487
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
486
488
|
try {
|
|
487
489
|
const e = await createImageBitmap(r);
|
|
488
|
-
return await _0(e,
|
|
490
|
+
return await _0(e, d);
|
|
489
491
|
} catch (e) {
|
|
490
492
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
491
493
|
}
|
|
@@ -493,23 +495,23 @@ async function ut(r, h, t) {
|
|
|
493
495
|
if (r instanceof ImageBitmap) {
|
|
494
496
|
if (r.width === 0 || r.height === 0)
|
|
495
497
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
496
|
-
return await _0(r,
|
|
498
|
+
return await _0(r, d);
|
|
497
499
|
}
|
|
498
500
|
throw new Error("不支持的图片类型");
|
|
499
501
|
}
|
|
500
|
-
async function dt(r,
|
|
502
|
+
async function dt(r, d, t) {
|
|
501
503
|
try {
|
|
502
|
-
const e = we(r, t),
|
|
503
|
-
if (!
|
|
504
|
-
const m =
|
|
504
|
+
const e = we(r, t), l = await ye(e);
|
|
505
|
+
if (!l.ok) {
|
|
506
|
+
const m = l.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${l.status} ${l.statusText}): ${r}`;
|
|
505
507
|
throw new Error(m);
|
|
506
508
|
}
|
|
507
|
-
const
|
|
508
|
-
if (!
|
|
509
|
+
const v = await l.blob();
|
|
510
|
+
if (!v.type.startsWith("image/") && v.size === 0)
|
|
509
511
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
510
512
|
try {
|
|
511
|
-
const m = await createImageBitmap(
|
|
512
|
-
return await _0(m,
|
|
513
|
+
const m = await createImageBitmap(v);
|
|
514
|
+
return await _0(m, d);
|
|
513
515
|
} catch (m) {
|
|
514
516
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
515
517
|
}
|
|
@@ -519,7 +521,7 @@ async function dt(r, h, t) {
|
|
|
519
521
|
}
|
|
520
522
|
function Lr(r) {
|
|
521
523
|
if (!r) return "source-over";
|
|
522
|
-
const
|
|
524
|
+
const d = r.trim().toLowerCase();
|
|
523
525
|
return {
|
|
524
526
|
normal: "source-over",
|
|
525
527
|
multiply: "multiply",
|
|
@@ -545,26 +547,26 @@ function Lr(r) {
|
|
|
545
547
|
"linear dodge": "lighter",
|
|
546
548
|
lighter: "lighter",
|
|
547
549
|
"pass-through": "source-over"
|
|
548
|
-
}[
|
|
550
|
+
}[d] || "source-over";
|
|
549
551
|
}
|
|
550
|
-
var
|
|
552
|
+
var vr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
551
553
|
function lt(r) {
|
|
552
554
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
553
|
-
var
|
|
554
|
-
if (typeof
|
|
555
|
+
var d = r.default;
|
|
556
|
+
if (typeof d == "function") {
|
|
555
557
|
var t = function e() {
|
|
556
|
-
var
|
|
558
|
+
var l = !1;
|
|
557
559
|
try {
|
|
558
|
-
|
|
560
|
+
l = this instanceof e;
|
|
559
561
|
} catch {
|
|
560
562
|
}
|
|
561
|
-
return
|
|
563
|
+
return l ? Reflect.construct(d, arguments, this.constructor) : d.apply(this, arguments);
|
|
562
564
|
};
|
|
563
|
-
t.prototype =
|
|
565
|
+
t.prototype = d.prototype;
|
|
564
566
|
} else t = {};
|
|
565
567
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
566
|
-
var
|
|
567
|
-
Object.defineProperty(t, e,
|
|
568
|
+
var l = Object.getOwnPropertyDescriptor(r, e);
|
|
569
|
+
Object.defineProperty(t, e, l.get ? l : {
|
|
568
570
|
enumerable: !0,
|
|
569
571
|
get: function() {
|
|
570
572
|
return r[e];
|
|
@@ -581,27 +583,27 @@ var w0 = { exports: {} }, vt = {}, pt = /* @__PURE__ */ Object.freeze({
|
|
|
581
583
|
default: vt
|
|
582
584
|
}), Bt = /* @__PURE__ */ lt(pt), Ct = w0.exports, Or;
|
|
583
585
|
function M() {
|
|
584
|
-
return Or || (Or = 1, (function(r,
|
|
586
|
+
return Or || (Or = 1, (function(r, d) {
|
|
585
587
|
(function(t, e) {
|
|
586
588
|
r.exports = e();
|
|
587
589
|
})(Ct, function() {
|
|
588
|
-
var t = t || (function(e,
|
|
589
|
-
var
|
|
590
|
-
if (typeof window < "u" && window.crypto && (
|
|
590
|
+
var t = t || (function(e, l) {
|
|
591
|
+
var v;
|
|
592
|
+
if (typeof window < "u" && window.crypto && (v = window.crypto), typeof self < "u" && self.crypto && (v = self.crypto), typeof globalThis < "u" && globalThis.crypto && (v = globalThis.crypto), !v && typeof window < "u" && window.msCrypto && (v = window.msCrypto), !v && typeof vr < "u" && vr.crypto && (v = vr.crypto), !v && typeof ht == "function")
|
|
591
593
|
try {
|
|
592
|
-
|
|
594
|
+
v = Bt;
|
|
593
595
|
} catch {
|
|
594
596
|
}
|
|
595
597
|
var m = function() {
|
|
596
|
-
if (
|
|
597
|
-
if (typeof
|
|
598
|
+
if (v) {
|
|
599
|
+
if (typeof v.getRandomValues == "function")
|
|
598
600
|
try {
|
|
599
|
-
return
|
|
601
|
+
return v.getRandomValues(new Uint32Array(1))[0];
|
|
600
602
|
} catch {
|
|
601
603
|
}
|
|
602
|
-
if (typeof
|
|
604
|
+
if (typeof v.randomBytes == "function")
|
|
603
605
|
try {
|
|
604
|
-
return
|
|
606
|
+
return v.randomBytes(4).readInt32LE();
|
|
605
607
|
} catch {
|
|
606
608
|
}
|
|
607
609
|
}
|
|
@@ -610,8 +612,8 @@ function M() {
|
|
|
610
612
|
function i() {
|
|
611
613
|
}
|
|
612
614
|
return function(o) {
|
|
613
|
-
var
|
|
614
|
-
return i.prototype = o,
|
|
615
|
+
var u;
|
|
616
|
+
return i.prototype = o, u = new i(), i.prototype = null, u;
|
|
615
617
|
};
|
|
616
618
|
})(), C = {}, x = C.lib = {}, n = x.Base = /* @__PURE__ */ (function() {
|
|
617
619
|
return {
|
|
@@ -712,7 +714,7 @@ function M() {
|
|
|
712
714
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
713
715
|
*/
|
|
714
716
|
init: function(i, o) {
|
|
715
|
-
i = this.words = i || [], o !=
|
|
717
|
+
i = this.words = i || [], o != l ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
716
718
|
},
|
|
717
719
|
/**
|
|
718
720
|
* Converts this word array to a string.
|
|
@@ -742,15 +744,15 @@ function M() {
|
|
|
742
744
|
* wordArray1.concat(wordArray2);
|
|
743
745
|
*/
|
|
744
746
|
concat: function(i) {
|
|
745
|
-
var o = this.words,
|
|
747
|
+
var o = this.words, u = i.words, b = this.sigBytes, g = i.sigBytes;
|
|
746
748
|
if (this.clamp(), b % 4)
|
|
747
749
|
for (var y = 0; y < g; y++) {
|
|
748
|
-
var k =
|
|
750
|
+
var k = u[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
749
751
|
o[b + y >>> 2] |= k << 24 - (b + y) % 4 * 8;
|
|
750
752
|
}
|
|
751
753
|
else
|
|
752
754
|
for (var R = 0; R < g; R += 4)
|
|
753
|
-
o[b + R >>> 2] =
|
|
755
|
+
o[b + R >>> 2] = u[R >>> 2];
|
|
754
756
|
return this.sigBytes += g, this;
|
|
755
757
|
},
|
|
756
758
|
/**
|
|
@@ -791,7 +793,7 @@ function M() {
|
|
|
791
793
|
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
|
792
794
|
*/
|
|
793
795
|
random: function(i) {
|
|
794
|
-
for (var o = [],
|
|
796
|
+
for (var o = [], u = 0; u < i; u += 4)
|
|
795
797
|
o.push(m());
|
|
796
798
|
return new E.init(o, i);
|
|
797
799
|
}
|
|
@@ -810,7 +812,7 @@ function M() {
|
|
|
810
812
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
811
813
|
*/
|
|
812
814
|
stringify: function(i) {
|
|
813
|
-
for (var o = i.words,
|
|
815
|
+
for (var o = i.words, u = i.sigBytes, b = [], g = 0; g < u; g++) {
|
|
814
816
|
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
815
817
|
b.push((y >>> 4).toString(16)), b.push((y & 15).toString(16));
|
|
816
818
|
}
|
|
@@ -830,9 +832,9 @@ function M() {
|
|
|
830
832
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
831
833
|
*/
|
|
832
834
|
parse: function(i) {
|
|
833
|
-
for (var o = i.length,
|
|
834
|
-
|
|
835
|
-
return new E.init(
|
|
835
|
+
for (var o = i.length, u = [], b = 0; b < o; b += 2)
|
|
836
|
+
u[b >>> 3] |= parseInt(i.substr(b, 2), 16) << 24 - b % 8 * 4;
|
|
837
|
+
return new E.init(u, o / 2);
|
|
836
838
|
}
|
|
837
839
|
}, f = a.Latin1 = {
|
|
838
840
|
/**
|
|
@@ -849,7 +851,7 @@ function M() {
|
|
|
849
851
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
850
852
|
*/
|
|
851
853
|
stringify: function(i) {
|
|
852
|
-
for (var o = i.words,
|
|
854
|
+
for (var o = i.words, u = i.sigBytes, b = [], g = 0; g < u; g++) {
|
|
853
855
|
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
854
856
|
b.push(String.fromCharCode(y));
|
|
855
857
|
}
|
|
@@ -869,11 +871,11 @@ function M() {
|
|
|
869
871
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
870
872
|
*/
|
|
871
873
|
parse: function(i) {
|
|
872
|
-
for (var o = i.length,
|
|
873
|
-
|
|
874
|
-
return new E.init(
|
|
874
|
+
for (var o = i.length, u = [], b = 0; b < o; b++)
|
|
875
|
+
u[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
876
|
+
return new E.init(u, o);
|
|
875
877
|
}
|
|
876
|
-
},
|
|
878
|
+
}, p = a.Utf8 = {
|
|
877
879
|
/**
|
|
878
880
|
* Converts a word array to a UTF-8 string.
|
|
879
881
|
*
|
|
@@ -910,7 +912,7 @@ function M() {
|
|
|
910
912
|
parse: function(i) {
|
|
911
913
|
return f.parse(unescape(encodeURIComponent(i)));
|
|
912
914
|
}
|
|
913
|
-
},
|
|
915
|
+
}, h = x.BufferedBlockAlgorithm = n.extend({
|
|
914
916
|
/**
|
|
915
917
|
* Resets this block algorithm's data buffer to its initial state.
|
|
916
918
|
*
|
|
@@ -932,7 +934,7 @@ function M() {
|
|
|
932
934
|
* bufferedBlockAlgorithm._append(wordArray);
|
|
933
935
|
*/
|
|
934
936
|
_append: function(i) {
|
|
935
|
-
typeof i == "string" && (i =
|
|
937
|
+
typeof i == "string" && (i = p.parse(i)), this._data.concat(i), this._nDataBytes += i.sigBytes;
|
|
936
938
|
},
|
|
937
939
|
/**
|
|
938
940
|
* Processes available data blocks.
|
|
@@ -949,13 +951,13 @@ function M() {
|
|
|
949
951
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
950
952
|
*/
|
|
951
953
|
_process: function(i) {
|
|
952
|
-
var o,
|
|
954
|
+
var o, u = this._data, b = u.words, g = u.sigBytes, y = this.blockSize, k = y * 4, R = g / k;
|
|
953
955
|
i ? R = e.ceil(R) : R = e.max((R | 0) - this._minBufferSize, 0);
|
|
954
956
|
var F = R * y, w = e.min(F * 4, g);
|
|
955
957
|
if (F) {
|
|
956
958
|
for (var H = 0; H < F; H += y)
|
|
957
959
|
this._doProcessBlock(b, H);
|
|
958
|
-
o = b.splice(0, F),
|
|
960
|
+
o = b.splice(0, F), u.sigBytes -= w;
|
|
959
961
|
}
|
|
960
962
|
return new E.init(o, w);
|
|
961
963
|
},
|
|
@@ -974,7 +976,7 @@ function M() {
|
|
|
974
976
|
},
|
|
975
977
|
_minBufferSize: 0
|
|
976
978
|
});
|
|
977
|
-
x.Hasher =
|
|
979
|
+
x.Hasher = h.extend({
|
|
978
980
|
/**
|
|
979
981
|
* Configuration options.
|
|
980
982
|
*/
|
|
@@ -999,7 +1001,7 @@ function M() {
|
|
|
999
1001
|
* hasher.reset();
|
|
1000
1002
|
*/
|
|
1001
1003
|
reset: function() {
|
|
1002
|
-
|
|
1004
|
+
h.reset.call(this), this._doReset();
|
|
1003
1005
|
},
|
|
1004
1006
|
/**
|
|
1005
1007
|
* Updates this hasher with a message.
|
|
@@ -1050,8 +1052,8 @@ function M() {
|
|
|
1050
1052
|
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
|
1051
1053
|
*/
|
|
1052
1054
|
_createHelper: function(i) {
|
|
1053
|
-
return function(o,
|
|
1054
|
-
return new i.init(
|
|
1055
|
+
return function(o, u) {
|
|
1056
|
+
return new i.init(u).finalize(o);
|
|
1055
1057
|
};
|
|
1056
1058
|
},
|
|
1057
1059
|
/**
|
|
@@ -1068,8 +1070,8 @@ function M() {
|
|
|
1068
1070
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
|
1069
1071
|
*/
|
|
1070
1072
|
_createHmacHelper: function(i) {
|
|
1071
|
-
return function(o,
|
|
1072
|
-
return new D.HMAC.init(i,
|
|
1073
|
+
return function(o, u) {
|
|
1074
|
+
return new D.HMAC.init(i, u).finalize(o);
|
|
1073
1075
|
};
|
|
1074
1076
|
}
|
|
1075
1077
|
});
|
|
@@ -1081,13 +1083,13 @@ function M() {
|
|
|
1081
1083
|
})(w0)), w0.exports;
|
|
1082
1084
|
}
|
|
1083
1085
|
var k0 = { exports: {} }, Et = k0.exports, qr;
|
|
1084
|
-
function
|
|
1085
|
-
return qr || (qr = 1, (function(r,
|
|
1086
|
+
function dr() {
|
|
1087
|
+
return qr || (qr = 1, (function(r, d) {
|
|
1086
1088
|
(function(t, e) {
|
|
1087
1089
|
r.exports = e(M());
|
|
1088
1090
|
})(Et, function(t) {
|
|
1089
1091
|
return (function(e) {
|
|
1090
|
-
var
|
|
1092
|
+
var l = t, v = l.lib, m = v.Base, B = v.WordArray, C = l.x64 = {};
|
|
1091
1093
|
C.Word = m.extend({
|
|
1092
1094
|
/**
|
|
1093
1095
|
* Initializes a newly created 64-bit word.
|
|
@@ -1312,13 +1314,13 @@ function ur() {
|
|
|
1312
1314
|
}
|
|
1313
1315
|
var S0 = { exports: {} }, At = S0.exports, Tr;
|
|
1314
1316
|
function Ft() {
|
|
1315
|
-
return Tr || (Tr = 1, (function(r,
|
|
1317
|
+
return Tr || (Tr = 1, (function(r, d) {
|
|
1316
1318
|
(function(t, e) {
|
|
1317
1319
|
r.exports = e(M());
|
|
1318
1320
|
})(At, function(t) {
|
|
1319
1321
|
return (function() {
|
|
1320
1322
|
if (typeof ArrayBuffer == "function") {
|
|
1321
|
-
var e = t,
|
|
1323
|
+
var e = t, l = e.lib, v = l.WordArray, m = v.init, B = v.init = function(C) {
|
|
1322
1324
|
if (C instanceof ArrayBuffer && (C = new Uint8Array(C)), (C instanceof Int8Array || typeof Uint8ClampedArray < "u" && C instanceof Uint8ClampedArray || C instanceof Int16Array || C instanceof Uint16Array || C instanceof Int32Array || C instanceof Uint32Array || C instanceof Float32Array || C instanceof Float64Array) && (C = new Uint8Array(C.buffer, C.byteOffset, C.byteLength)), C instanceof Uint8Array) {
|
|
1323
1325
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1324
1326
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
@@ -1326,7 +1328,7 @@ function Ft() {
|
|
|
1326
1328
|
} else
|
|
1327
1329
|
m.apply(this, arguments);
|
|
1328
1330
|
};
|
|
1329
|
-
B.prototype =
|
|
1331
|
+
B.prototype = v;
|
|
1330
1332
|
}
|
|
1331
1333
|
})(), t.lib.WordArray;
|
|
1332
1334
|
});
|
|
@@ -1334,12 +1336,12 @@ function Ft() {
|
|
|
1334
1336
|
}
|
|
1335
1337
|
var H0 = { exports: {} }, gt = H0.exports, Mr;
|
|
1336
1338
|
function Dt() {
|
|
1337
|
-
return Mr || (Mr = 1, (function(r,
|
|
1339
|
+
return Mr || (Mr = 1, (function(r, d) {
|
|
1338
1340
|
(function(t, e) {
|
|
1339
1341
|
r.exports = e(M());
|
|
1340
1342
|
})(gt, function(t) {
|
|
1341
1343
|
return (function() {
|
|
1342
|
-
var e = t,
|
|
1344
|
+
var e = t, l = e.lib, v = l.WordArray, m = e.enc;
|
|
1343
1345
|
m.Utf16 = m.Utf16BE = {
|
|
1344
1346
|
/**
|
|
1345
1347
|
* Converts a word array to a UTF-16 BE string.
|
|
@@ -1377,7 +1379,7 @@ function Dt() {
|
|
|
1377
1379
|
parse: function(C) {
|
|
1378
1380
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1379
1381
|
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1380
|
-
return
|
|
1382
|
+
return v.create(n, x * 2);
|
|
1381
1383
|
}
|
|
1382
1384
|
}, m.Utf16LE = {
|
|
1383
1385
|
/**
|
|
@@ -1416,7 +1418,7 @@ function Dt() {
|
|
|
1416
1418
|
parse: function(C) {
|
|
1417
1419
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1418
1420
|
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1419
|
-
return
|
|
1421
|
+
return v.create(n, x * 2);
|
|
1420
1422
|
}
|
|
1421
1423
|
};
|
|
1422
1424
|
function B(C) {
|
|
@@ -1428,12 +1430,12 @@ function Dt() {
|
|
|
1428
1430
|
}
|
|
1429
1431
|
var $0 = { exports: {} }, bt = $0.exports, Nr;
|
|
1430
1432
|
function s0() {
|
|
1431
|
-
return Nr || (Nr = 1, (function(r,
|
|
1433
|
+
return Nr || (Nr = 1, (function(r, d) {
|
|
1432
1434
|
(function(t, e) {
|
|
1433
1435
|
r.exports = e(M());
|
|
1434
1436
|
})(bt, function(t) {
|
|
1435
1437
|
return (function() {
|
|
1436
|
-
var e = t,
|
|
1438
|
+
var e = t, l = e.lib, v = l.WordArray, m = e.enc;
|
|
1437
1439
|
m.Base64 = {
|
|
1438
1440
|
/**
|
|
1439
1441
|
* Converts a word array to a Base64 string.
|
|
@@ -1452,7 +1454,7 @@ function s0() {
|
|
|
1452
1454
|
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1453
1455
|
C.clamp();
|
|
1454
1456
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1455
|
-
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255,
|
|
1457
|
+
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, h = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, D = f << 16 | p << 8 | h, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1456
1458
|
a.push(E.charAt(D >>> 6 * (3 - i) & 63));
|
|
1457
1459
|
var o = E.charAt(64);
|
|
1458
1460
|
if (o)
|
|
@@ -1492,10 +1494,10 @@ function s0() {
|
|
|
1492
1494
|
function B(C, x, n) {
|
|
1493
1495
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1494
1496
|
if (s % 4) {
|
|
1495
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1496
|
-
E[a >>> 2] |=
|
|
1497
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, h = f | p;
|
|
1498
|
+
E[a >>> 2] |= h << 24 - a % 4 * 8, a++;
|
|
1497
1499
|
}
|
|
1498
|
-
return
|
|
1500
|
+
return v.create(E, a);
|
|
1499
1501
|
}
|
|
1500
1502
|
})(), t.enc.Base64;
|
|
1501
1503
|
});
|
|
@@ -1503,12 +1505,12 @@ function s0() {
|
|
|
1503
1505
|
}
|
|
1504
1506
|
var R0 = { exports: {} }, mt = R0.exports, Ur;
|
|
1505
1507
|
function _t() {
|
|
1506
|
-
return Ur || (Ur = 1, (function(r,
|
|
1508
|
+
return Ur || (Ur = 1, (function(r, d) {
|
|
1507
1509
|
(function(t, e) {
|
|
1508
1510
|
r.exports = e(M());
|
|
1509
1511
|
})(mt, function(t) {
|
|
1510
1512
|
return (function() {
|
|
1511
|
-
var e = t,
|
|
1513
|
+
var e = t, l = e.lib, v = l.WordArray, m = e.enc;
|
|
1512
1514
|
m.Base64url = {
|
|
1513
1515
|
/**
|
|
1514
1516
|
* Converts a word array to a Base64url string.
|
|
@@ -1530,12 +1532,12 @@ function _t() {
|
|
|
1530
1532
|
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1531
1533
|
C.clamp();
|
|
1532
1534
|
for (var s = [], f = 0; f < E; f += 3)
|
|
1533
|
-
for (var
|
|
1535
|
+
for (var p = n[f >>> 2] >>> 24 - f % 4 * 8 & 255, h = n[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, D = n[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, i = p << 16 | h << 8 | D, o = 0; o < 4 && f + o * 0.75 < E; o++)
|
|
1534
1536
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1535
|
-
var
|
|
1536
|
-
if (
|
|
1537
|
+
var u = a.charAt(64);
|
|
1538
|
+
if (u)
|
|
1537
1539
|
for (; s.length % 4; )
|
|
1538
|
-
s.push(
|
|
1540
|
+
s.push(u);
|
|
1539
1541
|
return s.join("");
|
|
1540
1542
|
},
|
|
1541
1543
|
/**
|
|
@@ -1563,8 +1565,8 @@ function _t() {
|
|
|
1563
1565
|
}
|
|
1564
1566
|
var f = E.charAt(64);
|
|
1565
1567
|
if (f) {
|
|
1566
|
-
var
|
|
1567
|
-
|
|
1568
|
+
var p = C.indexOf(f);
|
|
1569
|
+
p !== -1 && (n = p);
|
|
1568
1570
|
}
|
|
1569
1571
|
return B(C, n, a);
|
|
1570
1572
|
},
|
|
@@ -1574,10 +1576,10 @@ function _t() {
|
|
|
1574
1576
|
function B(C, x, n) {
|
|
1575
1577
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1576
1578
|
if (s % 4) {
|
|
1577
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1578
|
-
E[a >>> 2] |=
|
|
1579
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, h = f | p;
|
|
1580
|
+
E[a >>> 2] |= h << 24 - a % 4 * 8, a++;
|
|
1579
1581
|
}
|
|
1580
|
-
return
|
|
1582
|
+
return v.create(E, a);
|
|
1581
1583
|
}
|
|
1582
1584
|
})(), t.enc.Base64url;
|
|
1583
1585
|
});
|
|
@@ -1585,15 +1587,15 @@ function _t() {
|
|
|
1585
1587
|
}
|
|
1586
1588
|
var P0 = { exports: {} }, yt = P0.exports, jr;
|
|
1587
1589
|
function c0() {
|
|
1588
|
-
return jr || (jr = 1, (function(r,
|
|
1590
|
+
return jr || (jr = 1, (function(r, d) {
|
|
1589
1591
|
(function(t, e) {
|
|
1590
1592
|
r.exports = e(M());
|
|
1591
1593
|
})(yt, function(t) {
|
|
1592
1594
|
return (function(e) {
|
|
1593
|
-
var
|
|
1595
|
+
var l = t, v = l.lib, m = v.WordArray, B = v.Hasher, C = l.algo, x = [];
|
|
1594
1596
|
(function() {
|
|
1595
|
-
for (var
|
|
1596
|
-
x[
|
|
1597
|
+
for (var p = 0; p < 64; p++)
|
|
1598
|
+
x[p] = e.abs(e.sin(p + 1)) * 4294967296 | 0;
|
|
1597
1599
|
})();
|
|
1598
1600
|
var n = C.MD5 = B.extend({
|
|
1599
1601
|
_doReset: function() {
|
|
@@ -1604,19 +1606,19 @@ function c0() {
|
|
|
1604
1606
|
271733878
|
|
1605
1607
|
]);
|
|
1606
1608
|
},
|
|
1607
|
-
_doProcessBlock: function(
|
|
1609
|
+
_doProcessBlock: function(p, h) {
|
|
1608
1610
|
for (var D = 0; D < 16; D++) {
|
|
1609
|
-
var i =
|
|
1610
|
-
|
|
1611
|
+
var i = h + D, o = p[i];
|
|
1612
|
+
p[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1611
1613
|
}
|
|
1612
|
-
var
|
|
1613
|
-
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, g, 12, x[1]), A = E(A, _, S, c, y, 17, x[2]), c = E(c, A, _, S, k, 22, x[3]), S = E(S, c, A, _, R, 7, x[4]), _ = E(_, S, c, A, F, 12, x[5]), A = E(A, _, S, c, w, 17, x[6]), c = E(c, A, _, S, H, 22, x[7]), S = E(S, c, A, _, $, 7, x[8]), _ = E(_, S, c, A, z, 12, x[9]), A = E(A, _, S, c, O, 17, x[10]), c = E(c, A, _, S, q, 22, x[11]), S = E(S, c, A, _, U, 7, x[12]), _ = E(_, S, c, A, T, 12, x[13]), A = E(A, _, S, c, N, 17, x[14]), c = E(c, A, _, S, j, 22, x[15]), S = a(S, c, A, _, g, 5, x[16]), _ = a(_, S, c, A, w, 9, x[17]), A = a(A, _, S, c, q, 14, x[18]), c = a(c, A, _, S, b, 20, x[19]), S = a(S, c, A, _, F, 5, x[20]), _ = a(_, S, c, A, O, 9, x[21]), A = a(A, _, S, c, j, 14, x[22]), c = a(c, A, _, S, R, 20, x[23]), S = a(S, c, A, _, z, 5, x[24]), _ = a(_, S, c, A, N, 9, x[25]), A = a(A, _, S, c, k, 14, x[26]), c = a(c, A, _, S, $, 20, x[27]), S = a(S, c, A, _, T, 5, x[28]), _ = a(_, S, c, A, y, 9, x[29]), A = a(A, _, S, c, H, 14, x[30]), c = a(c, A, _, S, U, 20, x[31]), S = s(S, c, A, _, F, 4, x[32]), _ = s(_, S, c, A, $, 11, x[33]), A = s(A, _, S, c, q, 16, x[34]), c = s(c, A, _, S, N, 23, x[35]), S = s(S, c, A, _, g, 4, x[36]), _ = s(_, S, c, A, R, 11, x[37]), A = s(A, _, S, c, H, 16, x[38]), c = s(c, A, _, S, O, 23, x[39]), S = s(S, c, A, _, T, 4, x[40]), _ = s(_, S, c, A, b, 11, x[41]), A = s(A, _, S, c, k, 16, x[42]), c = s(c, A, _, S, w, 23, x[43]), S = s(S, c, A, _, z, 4, x[44]), _ = s(_, S, c, A, U, 11, x[45]), A = s(A, _, S, c, j, 16, x[46]), c = s(c, A, _, S, y, 23, x[47]), S = f(S, c, A, _, b, 6, x[48]), _ = f(_, S, c, A, H, 10, x[49]), A = f(A, _, S, c, N, 15, x[50]), c = f(c, A, _, S, F, 21, x[51]), S = f(S, c, A, _, U, 6, x[52]), _ = f(_, S, c, A, k, 10, x[53]), A = f(A, _, S, c, O, 15, x[54]), c = f(c, A, _, S, g, 21, x[55]), S = f(S, c, A, _, $, 6, x[56]), _ = f(_, S, c, A, j, 10, x[57]), A = f(A, _, S, c, w, 15, x[58]), c = f(c, A, _, S, T, 21, x[59]), S = f(S, c, A, _, R, 6, x[60]), _ = f(_, S, c, A, q, 10, x[61]), A = f(A, _, S, c, y, 15, x[62]), c = f(c, A, _, S, z, 21, x[63]),
|
|
1614
|
+
var u = this._hash.words, b = p[h + 0], g = p[h + 1], y = p[h + 2], k = p[h + 3], R = p[h + 4], F = p[h + 5], w = p[h + 6], H = p[h + 7], $ = p[h + 8], z = p[h + 9], O = p[h + 10], q = p[h + 11], U = p[h + 12], T = p[h + 13], N = p[h + 14], j = p[h + 15], S = u[0], c = u[1], A = u[2], _ = u[3];
|
|
1615
|
+
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, g, 12, x[1]), A = E(A, _, S, c, y, 17, x[2]), c = E(c, A, _, S, k, 22, x[3]), S = E(S, c, A, _, R, 7, x[4]), _ = E(_, S, c, A, F, 12, x[5]), A = E(A, _, S, c, w, 17, x[6]), c = E(c, A, _, S, H, 22, x[7]), S = E(S, c, A, _, $, 7, x[8]), _ = E(_, S, c, A, z, 12, x[9]), A = E(A, _, S, c, O, 17, x[10]), c = E(c, A, _, S, q, 22, x[11]), S = E(S, c, A, _, U, 7, x[12]), _ = E(_, S, c, A, T, 12, x[13]), A = E(A, _, S, c, N, 17, x[14]), c = E(c, A, _, S, j, 22, x[15]), S = a(S, c, A, _, g, 5, x[16]), _ = a(_, S, c, A, w, 9, x[17]), A = a(A, _, S, c, q, 14, x[18]), c = a(c, A, _, S, b, 20, x[19]), S = a(S, c, A, _, F, 5, x[20]), _ = a(_, S, c, A, O, 9, x[21]), A = a(A, _, S, c, j, 14, x[22]), c = a(c, A, _, S, R, 20, x[23]), S = a(S, c, A, _, z, 5, x[24]), _ = a(_, S, c, A, N, 9, x[25]), A = a(A, _, S, c, k, 14, x[26]), c = a(c, A, _, S, $, 20, x[27]), S = a(S, c, A, _, T, 5, x[28]), _ = a(_, S, c, A, y, 9, x[29]), A = a(A, _, S, c, H, 14, x[30]), c = a(c, A, _, S, U, 20, x[31]), S = s(S, c, A, _, F, 4, x[32]), _ = s(_, S, c, A, $, 11, x[33]), A = s(A, _, S, c, q, 16, x[34]), c = s(c, A, _, S, N, 23, x[35]), S = s(S, c, A, _, g, 4, x[36]), _ = s(_, S, c, A, R, 11, x[37]), A = s(A, _, S, c, H, 16, x[38]), c = s(c, A, _, S, O, 23, x[39]), S = s(S, c, A, _, T, 4, x[40]), _ = s(_, S, c, A, b, 11, x[41]), A = s(A, _, S, c, k, 16, x[42]), c = s(c, A, _, S, w, 23, x[43]), S = s(S, c, A, _, z, 4, x[44]), _ = s(_, S, c, A, U, 11, x[45]), A = s(A, _, S, c, j, 16, x[46]), c = s(c, A, _, S, y, 23, x[47]), S = f(S, c, A, _, b, 6, x[48]), _ = f(_, S, c, A, H, 10, x[49]), A = f(A, _, S, c, N, 15, x[50]), c = f(c, A, _, S, F, 21, x[51]), S = f(S, c, A, _, U, 6, x[52]), _ = f(_, S, c, A, k, 10, x[53]), A = f(A, _, S, c, O, 15, x[54]), c = f(c, A, _, S, g, 21, x[55]), S = f(S, c, A, _, $, 6, x[56]), _ = f(_, S, c, A, j, 10, x[57]), A = f(A, _, S, c, w, 15, x[58]), c = f(c, A, _, S, T, 21, x[59]), S = f(S, c, A, _, R, 6, x[60]), _ = f(_, S, c, A, q, 10, x[61]), A = f(A, _, S, c, y, 15, x[62]), c = f(c, A, _, S, z, 21, x[63]), u[0] = u[0] + S | 0, u[1] = u[1] + c | 0, u[2] = u[2] + A | 0, u[3] = u[3] + _ | 0;
|
|
1614
1616
|
},
|
|
1615
1617
|
_doFinalize: function() {
|
|
1616
|
-
var
|
|
1617
|
-
|
|
1618
|
-
var o = e.floor(D / 4294967296),
|
|
1619
|
-
|
|
1618
|
+
var p = this._data, h = p.words, D = this._nDataBytes * 8, i = p.sigBytes * 8;
|
|
1619
|
+
h[i >>> 5] |= 128 << 24 - i % 32;
|
|
1620
|
+
var o = e.floor(D / 4294967296), u = D;
|
|
1621
|
+
h[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, h[(i + 64 >>> 9 << 4) + 14] = (u << 8 | u >>> 24) & 16711935 | (u << 24 | u >>> 8) & 4278255360, p.sigBytes = (h.length + 1) * 4, this._process();
|
|
1620
1622
|
for (var b = this._hash, g = b.words, y = 0; y < 4; y++) {
|
|
1621
1623
|
var k = g[y];
|
|
1622
1624
|
g[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
@@ -1624,41 +1626,41 @@ function c0() {
|
|
|
1624
1626
|
return b;
|
|
1625
1627
|
},
|
|
1626
1628
|
clone: function() {
|
|
1627
|
-
var
|
|
1628
|
-
return
|
|
1629
|
+
var p = B.clone.call(this);
|
|
1630
|
+
return p._hash = this._hash.clone(), p;
|
|
1629
1631
|
}
|
|
1630
1632
|
});
|
|
1631
|
-
function E(
|
|
1632
|
-
var g =
|
|
1633
|
-
return (g <<
|
|
1633
|
+
function E(p, h, D, i, o, u, b) {
|
|
1634
|
+
var g = p + (h & D | ~h & i) + o + b;
|
|
1635
|
+
return (g << u | g >>> 32 - u) + h;
|
|
1634
1636
|
}
|
|
1635
|
-
function a(
|
|
1636
|
-
var g =
|
|
1637
|
-
return (g <<
|
|
1637
|
+
function a(p, h, D, i, o, u, b) {
|
|
1638
|
+
var g = p + (h & i | D & ~i) + o + b;
|
|
1639
|
+
return (g << u | g >>> 32 - u) + h;
|
|
1638
1640
|
}
|
|
1639
|
-
function s(
|
|
1640
|
-
var g =
|
|
1641
|
-
return (g <<
|
|
1641
|
+
function s(p, h, D, i, o, u, b) {
|
|
1642
|
+
var g = p + (h ^ D ^ i) + o + b;
|
|
1643
|
+
return (g << u | g >>> 32 - u) + h;
|
|
1642
1644
|
}
|
|
1643
|
-
function f(
|
|
1644
|
-
var g =
|
|
1645
|
-
return (g <<
|
|
1645
|
+
function f(p, h, D, i, o, u, b) {
|
|
1646
|
+
var g = p + (D ^ (h | ~i)) + o + b;
|
|
1647
|
+
return (g << u | g >>> 32 - u) + h;
|
|
1646
1648
|
}
|
|
1647
|
-
|
|
1649
|
+
l.MD5 = B._createHelper(n), l.HmacMD5 = B._createHmacHelper(n);
|
|
1648
1650
|
})(Math), t.MD5;
|
|
1649
1651
|
});
|
|
1650
1652
|
})(P0)), P0.exports;
|
|
1651
1653
|
}
|
|
1652
1654
|
var z0 = { exports: {} }, wt = z0.exports, Gr;
|
|
1653
1655
|
function ke() {
|
|
1654
|
-
return Gr || (Gr = 1, (function(r,
|
|
1656
|
+
return Gr || (Gr = 1, (function(r, d) {
|
|
1655
1657
|
(function(t, e) {
|
|
1656
1658
|
r.exports = e(M());
|
|
1657
1659
|
})(wt, function(t) {
|
|
1658
1660
|
return (function() {
|
|
1659
|
-
var e = t,
|
|
1661
|
+
var e = t, l = e.lib, v = l.WordArray, m = l.Hasher, B = e.algo, C = [], x = B.SHA1 = m.extend({
|
|
1660
1662
|
_doReset: function() {
|
|
1661
|
-
this._hash = new
|
|
1663
|
+
this._hash = new v.init([
|
|
1662
1664
|
1732584193,
|
|
1663
1665
|
4023233417,
|
|
1664
1666
|
2562383102,
|
|
@@ -1667,17 +1669,17 @@ function ke() {
|
|
|
1667
1669
|
]);
|
|
1668
1670
|
},
|
|
1669
1671
|
_doProcessBlock: function(n, E) {
|
|
1670
|
-
for (var a = this._hash.words, s = a[0], f = a[1],
|
|
1672
|
+
for (var a = this._hash.words, s = a[0], f = a[1], p = a[2], h = a[3], D = a[4], i = 0; i < 80; i++) {
|
|
1671
1673
|
if (i < 16)
|
|
1672
1674
|
C[i] = n[E + i] | 0;
|
|
1673
1675
|
else {
|
|
1674
1676
|
var o = C[i - 3] ^ C[i - 8] ^ C[i - 14] ^ C[i - 16];
|
|
1675
1677
|
C[i] = o << 1 | o >>> 31;
|
|
1676
1678
|
}
|
|
1677
|
-
var
|
|
1678
|
-
i < 20 ?
|
|
1679
|
+
var u = (s << 5 | s >>> 27) + D + C[i];
|
|
1680
|
+
i < 20 ? u += (f & p | ~f & h) + 1518500249 : i < 40 ? u += (f ^ p ^ h) + 1859775393 : i < 60 ? u += (f & p | f & h | p & h) - 1894007588 : u += (f ^ p ^ h) - 899497514, D = h, h = p, p = f << 30 | f >>> 2, f = s, s = u;
|
|
1679
1681
|
}
|
|
1680
|
-
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] +
|
|
1682
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] + p | 0, a[3] = a[3] + h | 0, a[4] = a[4] + D | 0;
|
|
1681
1683
|
},
|
|
1682
1684
|
_doFinalize: function() {
|
|
1683
1685
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
@@ -1693,14 +1695,14 @@ function ke() {
|
|
|
1693
1695
|
});
|
|
1694
1696
|
})(z0)), z0.exports;
|
|
1695
1697
|
}
|
|
1696
|
-
var
|
|
1698
|
+
var W0 = { exports: {} }, kt = W0.exports, Xr;
|
|
1697
1699
|
function Fr() {
|
|
1698
|
-
return
|
|
1700
|
+
return Xr || (Xr = 1, (function(r, d) {
|
|
1699
1701
|
(function(t, e) {
|
|
1700
1702
|
r.exports = e(M());
|
|
1701
1703
|
})(kt, function(t) {
|
|
1702
1704
|
return (function(e) {
|
|
1703
|
-
var
|
|
1705
|
+
var l = t, v = l.lib, m = v.WordArray, B = v.Hasher, C = l.algo, x = [], n = [];
|
|
1704
1706
|
(function() {
|
|
1705
1707
|
function s(D) {
|
|
1706
1708
|
for (var i = e.sqrt(D), o = 2; o <= i; o++)
|
|
@@ -1711,50 +1713,50 @@ function Fr() {
|
|
|
1711
1713
|
function f(D) {
|
|
1712
1714
|
return (D - (D | 0)) * 4294967296 | 0;
|
|
1713
1715
|
}
|
|
1714
|
-
for (var
|
|
1715
|
-
s(
|
|
1716
|
+
for (var p = 2, h = 0; h < 64; )
|
|
1717
|
+
s(p) && (h < 8 && (x[h] = f(e.pow(p, 1 / 2))), n[h] = f(e.pow(p, 1 / 3)), h++), p++;
|
|
1716
1718
|
})();
|
|
1717
1719
|
var E = [], a = C.SHA256 = B.extend({
|
|
1718
1720
|
_doReset: function() {
|
|
1719
1721
|
this._hash = new m.init(x.slice(0));
|
|
1720
1722
|
},
|
|
1721
1723
|
_doProcessBlock: function(s, f) {
|
|
1722
|
-
for (var
|
|
1724
|
+
for (var p = this._hash.words, h = p[0], D = p[1], i = p[2], o = p[3], u = p[4], b = p[5], g = p[6], y = p[7], k = 0; k < 64; k++) {
|
|
1723
1725
|
if (k < 16)
|
|
1724
1726
|
E[k] = s[f + k] | 0;
|
|
1725
1727
|
else {
|
|
1726
1728
|
var R = E[k - 15], F = (R << 25 | R >>> 7) ^ (R << 14 | R >>> 18) ^ R >>> 3, w = E[k - 2], H = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
|
|
1727
1729
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1728
1730
|
}
|
|
1729
|
-
var $ =
|
|
1730
|
-
y = g, g = b, b =
|
|
1731
|
+
var $ = u & b ^ ~u & g, z = h & D ^ h & i ^ D & i, O = (h << 30 | h >>> 2) ^ (h << 19 | h >>> 13) ^ (h << 10 | h >>> 22), q = (u << 26 | u >>> 6) ^ (u << 21 | u >>> 11) ^ (u << 7 | u >>> 25), U = y + q + $ + n[k] + E[k], T = O + z;
|
|
1732
|
+
y = g, g = b, b = u, u = o + U | 0, o = i, i = D, D = h, h = U + T | 0;
|
|
1731
1733
|
}
|
|
1732
|
-
|
|
1734
|
+
p[0] = p[0] + h | 0, p[1] = p[1] + D | 0, p[2] = p[2] + i | 0, p[3] = p[3] + o | 0, p[4] = p[4] + u | 0, p[5] = p[5] + b | 0, p[6] = p[6] + g | 0, p[7] = p[7] + y | 0;
|
|
1733
1735
|
},
|
|
1734
1736
|
_doFinalize: function() {
|
|
1735
|
-
var s = this._data, f = s.words,
|
|
1736
|
-
return f[
|
|
1737
|
+
var s = this._data, f = s.words, p = this._nDataBytes * 8, h = s.sigBytes * 8;
|
|
1738
|
+
return f[h >>> 5] |= 128 << 24 - h % 32, f[(h + 64 >>> 9 << 4) + 14] = e.floor(p / 4294967296), f[(h + 64 >>> 9 << 4) + 15] = p, s.sigBytes = f.length * 4, this._process(), this._hash;
|
|
1737
1739
|
},
|
|
1738
1740
|
clone: function() {
|
|
1739
1741
|
var s = B.clone.call(this);
|
|
1740
1742
|
return s._hash = this._hash.clone(), s;
|
|
1741
1743
|
}
|
|
1742
1744
|
});
|
|
1743
|
-
|
|
1745
|
+
l.SHA256 = B._createHelper(a), l.HmacSHA256 = B._createHmacHelper(a);
|
|
1744
1746
|
})(Math), t.SHA256;
|
|
1745
1747
|
});
|
|
1746
|
-
})(
|
|
1748
|
+
})(W0)), W0.exports;
|
|
1747
1749
|
}
|
|
1748
|
-
var
|
|
1750
|
+
var I0 = { exports: {} }, St = I0.exports, Kr;
|
|
1749
1751
|
function Ht() {
|
|
1750
|
-
return
|
|
1751
|
-
(function(t, e,
|
|
1752
|
+
return Kr || (Kr = 1, (function(r, d) {
|
|
1753
|
+
(function(t, e, l) {
|
|
1752
1754
|
r.exports = e(M(), Fr());
|
|
1753
1755
|
})(St, function(t) {
|
|
1754
1756
|
return (function() {
|
|
1755
|
-
var e = t,
|
|
1757
|
+
var e = t, l = e.lib, v = l.WordArray, m = e.algo, B = m.SHA256, C = m.SHA224 = B.extend({
|
|
1756
1758
|
_doReset: function() {
|
|
1757
|
-
this._hash = new
|
|
1759
|
+
this._hash = new v.init([
|
|
1758
1760
|
3238371032,
|
|
1759
1761
|
914150663,
|
|
1760
1762
|
812702999,
|
|
@@ -1773,16 +1775,16 @@ function Ht() {
|
|
|
1773
1775
|
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1774
1776
|
})(), t.SHA224;
|
|
1775
1777
|
});
|
|
1776
|
-
})(
|
|
1778
|
+
})(I0)), I0.exports;
|
|
1777
1779
|
}
|
|
1778
1780
|
var L0 = { exports: {} }, $t = L0.exports, Zr;
|
|
1779
1781
|
function Se() {
|
|
1780
|
-
return Zr || (Zr = 1, (function(r,
|
|
1781
|
-
(function(t, e,
|
|
1782
|
-
r.exports = e(M(),
|
|
1782
|
+
return Zr || (Zr = 1, (function(r, d) {
|
|
1783
|
+
(function(t, e, l) {
|
|
1784
|
+
r.exports = e(M(), dr());
|
|
1783
1785
|
})($t, function(t) {
|
|
1784
1786
|
return (function() {
|
|
1785
|
-
var e = t,
|
|
1787
|
+
var e = t, l = e.lib, v = l.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
1786
1788
|
function n() {
|
|
1787
1789
|
return B.create.apply(B, arguments);
|
|
1788
1790
|
}
|
|
@@ -1872,7 +1874,7 @@ function Se() {
|
|
|
1872
1874
|
for (var f = 0; f < 80; f++)
|
|
1873
1875
|
a[f] = n();
|
|
1874
1876
|
})();
|
|
1875
|
-
var s = x.SHA512 =
|
|
1877
|
+
var s = x.SHA512 = v.extend({
|
|
1876
1878
|
_doReset: function() {
|
|
1877
1879
|
this._hash = new C.init([
|
|
1878
1880
|
new B.init(1779033703, 4089235720),
|
|
@@ -1885,55 +1887,55 @@ function Se() {
|
|
|
1885
1887
|
new B.init(1541459225, 327033209)
|
|
1886
1888
|
]);
|
|
1887
1889
|
},
|
|
1888
|
-
_doProcessBlock: function(f,
|
|
1889
|
-
for (var
|
|
1890
|
+
_doProcessBlock: function(f, p) {
|
|
1891
|
+
for (var h = this._hash.words, D = h[0], i = h[1], o = h[2], u = h[3], b = h[4], g = h[5], y = h[6], k = h[7], R = D.high, F = D.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = u.high, q = u.low, U = b.high, T = b.low, N = g.high, j = g.low, S = y.high, c = y.low, A = k.high, _ = k.low, W = R, P = F, L = w, I = H, Y = $, Q = z, o0 = O, X = q, G = U, Z = T, r0 = N, f0 = j, D0 = S, p0 = c, lr = A, B0 = _, e0 = 0; e0 < 80; e0++) {
|
|
1890
1892
|
var J, x0, b0 = a[e0];
|
|
1891
1893
|
if (e0 < 16)
|
|
1892
|
-
x0 = b0.high = f[
|
|
1894
|
+
x0 = b0.high = f[p + e0 * 2] | 0, J = b0.low = f[p + e0 * 2 + 1] | 0;
|
|
1893
1895
|
else {
|
|
1894
|
-
var br = a[e0 - 15], u0 = br.high, C0 = br.low,
|
|
1895
|
-
J = mr + qe, x0 =
|
|
1896
|
+
var br = a[e0 - 15], u0 = br.high, C0 = br.low, Ie = (u0 >>> 1 | C0 << 31) ^ (u0 >>> 8 | C0 << 24) ^ u0 >>> 7, mr = (C0 >>> 1 | u0 << 31) ^ (C0 >>> 8 | u0 << 24) ^ (C0 >>> 7 | u0 << 25), _r = a[e0 - 2], d0 = _r.high, E0 = _r.low, Le = (d0 >>> 19 | E0 << 13) ^ (d0 << 3 | E0 >>> 29) ^ d0 >>> 6, yr = (E0 >>> 19 | d0 << 13) ^ (E0 << 3 | d0 >>> 29) ^ (E0 >>> 6 | d0 << 26), wr = a[e0 - 7], Oe = wr.high, qe = wr.low, kr = a[e0 - 16], Te = kr.high, Sr = kr.low;
|
|
1897
|
+
J = mr + qe, x0 = Ie + Oe + (J >>> 0 < mr >>> 0 ? 1 : 0), J = J + yr, x0 = x0 + Le + (J >>> 0 < yr >>> 0 ? 1 : 0), J = J + Sr, x0 = x0 + Te + (J >>> 0 < Sr >>> 0 ? 1 : 0), b0.high = x0, b0.low = J;
|
|
1896
1898
|
}
|
|
1897
|
-
var Me = G & r0 ^ ~G & D0, Hr = Z & f0 ^ ~Z & p0, Ne =
|
|
1898
|
-
|
|
1899
|
+
var Me = G & r0 ^ ~G & D0, Hr = Z & f0 ^ ~Z & p0, Ne = W & L ^ W & Y ^ L & Y, Ue = P & I ^ P & Q ^ I & Q, je = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), $r = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Ge = (G >>> 14 | Z << 18) ^ (G >>> 18 | Z << 14) ^ (G << 23 | Z >>> 9), Xe = (Z >>> 14 | G << 18) ^ (Z >>> 18 | G << 14) ^ (Z << 23 | G >>> 9), Rr = E[e0], Ke = Rr.high, Pr = Rr.low, V = B0 + Xe, n0 = lr + Ge + (V >>> 0 < B0 >>> 0 ? 1 : 0), V = V + Hr, n0 = n0 + Me + (V >>> 0 < Hr >>> 0 ? 1 : 0), V = V + Pr, n0 = n0 + Ke + (V >>> 0 < Pr >>> 0 ? 1 : 0), V = V + J, n0 = n0 + x0 + (V >>> 0 < J >>> 0 ? 1 : 0), zr = $r + Ue, Ze = je + Ne + (zr >>> 0 < $r >>> 0 ? 1 : 0);
|
|
1900
|
+
lr = D0, B0 = p0, D0 = r0, p0 = f0, r0 = G, f0 = Z, Z = X + V | 0, G = o0 + n0 + (Z >>> 0 < X >>> 0 ? 1 : 0) | 0, o0 = Y, X = Q, Y = L, Q = I, L = W, I = P, P = V + zr | 0, W = n0 + Ze + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1899
1901
|
}
|
|
1900
|
-
F = D.low = F + P, D.high = R +
|
|
1902
|
+
F = D.low = F + P, D.high = R + W + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + I, i.high = w + L + (H >>> 0 < I >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = $ + Y + (z >>> 0 < Q >>> 0 ? 1 : 0), q = u.low = q + X, u.high = O + o0 + (q >>> 0 < X >>> 0 ? 1 : 0), T = b.low = T + Z, b.high = U + G + (T >>> 0 < Z >>> 0 ? 1 : 0), j = g.low = j + f0, g.high = N + r0 + (j >>> 0 < f0 >>> 0 ? 1 : 0), c = y.low = c + p0, y.high = S + D0 + (c >>> 0 < p0 >>> 0 ? 1 : 0), _ = k.low = _ + B0, k.high = A + lr + (_ >>> 0 < B0 >>> 0 ? 1 : 0);
|
|
1901
1903
|
},
|
|
1902
1904
|
_doFinalize: function() {
|
|
1903
|
-
var f = this._data,
|
|
1904
|
-
|
|
1905
|
+
var f = this._data, p = f.words, h = this._nDataBytes * 8, D = f.sigBytes * 8;
|
|
1906
|
+
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(h / 4294967296), p[(D + 128 >>> 10 << 5) + 31] = h, f.sigBytes = p.length * 4, this._process();
|
|
1905
1907
|
var i = this._hash.toX32();
|
|
1906
1908
|
return i;
|
|
1907
1909
|
},
|
|
1908
1910
|
clone: function() {
|
|
1909
|
-
var f =
|
|
1911
|
+
var f = v.clone.call(this);
|
|
1910
1912
|
return f._hash = this._hash.clone(), f;
|
|
1911
1913
|
},
|
|
1912
1914
|
blockSize: 1024 / 32
|
|
1913
1915
|
});
|
|
1914
|
-
e.SHA512 =
|
|
1916
|
+
e.SHA512 = v._createHelper(s), e.HmacSHA512 = v._createHmacHelper(s);
|
|
1915
1917
|
})(), t.SHA512;
|
|
1916
1918
|
});
|
|
1917
1919
|
})(L0)), L0.exports;
|
|
1918
1920
|
}
|
|
1919
1921
|
var O0 = { exports: {} }, Rt = O0.exports, Yr;
|
|
1920
1922
|
function Pt() {
|
|
1921
|
-
return Yr || (Yr = 1, (function(r,
|
|
1922
|
-
(function(t, e,
|
|
1923
|
-
r.exports = e(M(),
|
|
1923
|
+
return Yr || (Yr = 1, (function(r, d) {
|
|
1924
|
+
(function(t, e, l) {
|
|
1925
|
+
r.exports = e(M(), dr(), Se());
|
|
1924
1926
|
})(Rt, function(t) {
|
|
1925
1927
|
return (function() {
|
|
1926
|
-
var e = t,
|
|
1928
|
+
var e = t, l = e.x64, v = l.Word, m = l.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1927
1929
|
_doReset: function() {
|
|
1928
1930
|
this._hash = new m.init([
|
|
1929
|
-
new
|
|
1930
|
-
new
|
|
1931
|
-
new
|
|
1932
|
-
new
|
|
1933
|
-
new
|
|
1934
|
-
new
|
|
1935
|
-
new
|
|
1936
|
-
new
|
|
1931
|
+
new v.init(3418070365, 3238371032),
|
|
1932
|
+
new v.init(1654270250, 914150663),
|
|
1933
|
+
new v.init(2438529370, 812702999),
|
|
1934
|
+
new v.init(355462360, 4144912697),
|
|
1935
|
+
new v.init(1731405415, 4290775857),
|
|
1936
|
+
new v.init(2394180231, 1750603025),
|
|
1937
|
+
new v.init(3675008525, 1694076839),
|
|
1938
|
+
new v.init(1203062813, 3204075428)
|
|
1937
1939
|
]);
|
|
1938
1940
|
},
|
|
1939
1941
|
_doFinalize: function() {
|
|
@@ -1947,22 +1949,22 @@ function Pt() {
|
|
|
1947
1949
|
})(O0)), O0.exports;
|
|
1948
1950
|
}
|
|
1949
1951
|
var q0 = { exports: {} }, zt = q0.exports, Qr;
|
|
1950
|
-
function
|
|
1951
|
-
return Qr || (Qr = 1, (function(r,
|
|
1952
|
-
(function(t, e,
|
|
1953
|
-
r.exports = e(M(),
|
|
1952
|
+
function Wt() {
|
|
1953
|
+
return Qr || (Qr = 1, (function(r, d) {
|
|
1954
|
+
(function(t, e, l) {
|
|
1955
|
+
r.exports = e(M(), dr());
|
|
1954
1956
|
})(zt, function(t) {
|
|
1955
1957
|
return (function(e) {
|
|
1956
|
-
var
|
|
1958
|
+
var l = t, v = l.lib, m = v.WordArray, B = v.Hasher, C = l.x64, x = C.Word, n = l.algo, E = [], a = [], s = [];
|
|
1957
1959
|
(function() {
|
|
1958
|
-
for (var
|
|
1959
|
-
E[
|
|
1960
|
-
var o = D % 5,
|
|
1961
|
-
|
|
1960
|
+
for (var h = 1, D = 0, i = 0; i < 24; i++) {
|
|
1961
|
+
E[h + 5 * D] = (i + 1) * (i + 2) / 2 % 64;
|
|
1962
|
+
var o = D % 5, u = (2 * h + 3 * D) % 5;
|
|
1963
|
+
h = o, D = u;
|
|
1962
1964
|
}
|
|
1963
|
-
for (var
|
|
1965
|
+
for (var h = 0; h < 5; h++)
|
|
1964
1966
|
for (var D = 0; D < 5; D++)
|
|
1965
|
-
a[
|
|
1967
|
+
a[h + 5 * D] = D + (2 * h + 3 * D) % 5 * 5;
|
|
1966
1968
|
for (var b = 1, g = 0; g < 24; g++) {
|
|
1967
1969
|
for (var y = 0, k = 0, R = 0; R < 7; R++) {
|
|
1968
1970
|
if (b & 1) {
|
|
@@ -1976,10 +1978,10 @@ function It() {
|
|
|
1976
1978
|
})();
|
|
1977
1979
|
var f = [];
|
|
1978
1980
|
(function() {
|
|
1979
|
-
for (var
|
|
1980
|
-
f[
|
|
1981
|
+
for (var h = 0; h < 25; h++)
|
|
1982
|
+
f[h] = x.create();
|
|
1981
1983
|
})();
|
|
1982
|
-
var
|
|
1984
|
+
var p = n.SHA3 = B.extend({
|
|
1983
1985
|
/**
|
|
1984
1986
|
* Configuration options.
|
|
1985
1987
|
*
|
|
@@ -1992,15 +1994,15 @@ function It() {
|
|
|
1992
1994
|
outputLength: 512
|
|
1993
1995
|
}),
|
|
1994
1996
|
_doReset: function() {
|
|
1995
|
-
for (var
|
|
1996
|
-
|
|
1997
|
+
for (var h = this._state = [], D = 0; D < 25; D++)
|
|
1998
|
+
h[D] = new x.init();
|
|
1997
1999
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
1998
2000
|
},
|
|
1999
|
-
_doProcessBlock: function(
|
|
2000
|
-
for (var i = this._state, o = this.blockSize / 2,
|
|
2001
|
-
var b =
|
|
2001
|
+
_doProcessBlock: function(h, D) {
|
|
2002
|
+
for (var i = this._state, o = this.blockSize / 2, u = 0; u < o; u++) {
|
|
2003
|
+
var b = h[D + 2 * u], g = h[D + 2 * u + 1];
|
|
2002
2004
|
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, g = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
|
|
2003
|
-
var y = i[
|
|
2005
|
+
var y = i[u];
|
|
2004
2006
|
y.high ^= g, y.low ^= b;
|
|
2005
2007
|
}
|
|
2006
2008
|
for (var k = 0; k < 24; k++) {
|
|
@@ -2027,43 +2029,43 @@ function It() {
|
|
|
2027
2029
|
A.high = _.high, A.low = _.low;
|
|
2028
2030
|
for (var R = 0; R < 5; R++)
|
|
2029
2031
|
for (var H = 0; H < 5; H++) {
|
|
2030
|
-
var T = R + 5 * H, y = i[T],
|
|
2031
|
-
y.high =
|
|
2032
|
+
var T = R + 5 * H, y = i[T], W = f[T], P = f[(R + 1) % 5 + 5 * H], L = f[(R + 2) % 5 + 5 * H];
|
|
2033
|
+
y.high = W.high ^ ~P.high & L.high, y.low = W.low ^ ~P.low & L.low;
|
|
2032
2034
|
}
|
|
2033
|
-
var y = i[0],
|
|
2034
|
-
y.high ^=
|
|
2035
|
+
var y = i[0], I = s[k];
|
|
2036
|
+
y.high ^= I.high, y.low ^= I.low;
|
|
2035
2037
|
}
|
|
2036
2038
|
},
|
|
2037
2039
|
_doFinalize: function() {
|
|
2038
|
-
var
|
|
2040
|
+
var h = this._data, D = h.words;
|
|
2039
2041
|
this._nDataBytes * 8;
|
|
2040
|
-
var i =
|
|
2041
|
-
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128,
|
|
2042
|
-
for (var
|
|
2043
|
-
var R =
|
|
2042
|
+
var i = h.sigBytes * 8, o = this.blockSize * 32;
|
|
2043
|
+
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, h.sigBytes = D.length * 4, this._process();
|
|
2044
|
+
for (var u = this._state, b = this.cfg.outputLength / 8, g = b / 8, y = [], k = 0; k < g; k++) {
|
|
2045
|
+
var R = u[k], F = R.high, w = R.low;
|
|
2044
2046
|
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, y.push(w), y.push(F);
|
|
2045
2047
|
}
|
|
2046
2048
|
return new m.init(y, b);
|
|
2047
2049
|
},
|
|
2048
2050
|
clone: function() {
|
|
2049
|
-
for (var
|
|
2051
|
+
for (var h = B.clone.call(this), D = h._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2050
2052
|
D[i] = D[i].clone();
|
|
2051
|
-
return
|
|
2053
|
+
return h;
|
|
2052
2054
|
}
|
|
2053
2055
|
});
|
|
2054
|
-
|
|
2056
|
+
l.SHA3 = B._createHelper(p), l.HmacSHA3 = B._createHmacHelper(p);
|
|
2055
2057
|
})(Math), t.SHA3;
|
|
2056
2058
|
});
|
|
2057
2059
|
})(q0)), q0.exports;
|
|
2058
2060
|
}
|
|
2059
|
-
var T0 = { exports: {} },
|
|
2061
|
+
var T0 = { exports: {} }, It = T0.exports, Vr;
|
|
2060
2062
|
function Lt() {
|
|
2061
|
-
return Vr || (Vr = 1, (function(r,
|
|
2063
|
+
return Vr || (Vr = 1, (function(r, d) {
|
|
2062
2064
|
(function(t, e) {
|
|
2063
2065
|
r.exports = e(M());
|
|
2064
|
-
})(
|
|
2066
|
+
})(It, function(t) {
|
|
2065
2067
|
return (function(e) {
|
|
2066
|
-
var
|
|
2068
|
+
var l = t, v = l.lib, m = v.WordArray, B = v.Hasher, C = l.algo, x = m.create([
|
|
2067
2069
|
0,
|
|
2068
2070
|
1,
|
|
2069
2071
|
2,
|
|
@@ -2387,7 +2389,7 @@ function Lt() {
|
|
|
2387
2389
|
13,
|
|
2388
2390
|
11,
|
|
2389
2391
|
11
|
|
2390
|
-
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
|
|
2392
|
+
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), p = C.RIPEMD160 = B.extend({
|
|
2391
2393
|
_doReset: function() {
|
|
2392
2394
|
this._hash = m.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2393
2395
|
},
|
|
@@ -2396,11 +2398,11 @@ function Lt() {
|
|
|
2396
2398
|
var R = y + k, F = g[R];
|
|
2397
2399
|
g[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2398
2400
|
}
|
|
2399
|
-
var w = this._hash.words, H = s.words, $ = f.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _,
|
|
2400
|
-
A = T = w[0], _ = N = w[1],
|
|
2401
|
-
for (var
|
|
2402
|
-
|
|
2403
|
-
|
|
2401
|
+
var w = this._hash.words, H = s.words, $ = f.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _, W, P, L;
|
|
2402
|
+
A = T = w[0], _ = N = w[1], W = j = w[2], P = S = w[3], L = c = w[4];
|
|
2403
|
+
for (var I, k = 0; k < 80; k += 1)
|
|
2404
|
+
I = T + g[y + z[k]] | 0, k < 16 ? I += h(N, j, S) + H[0] : k < 32 ? I += D(N, j, S) + H[1] : k < 48 ? I += i(N, j, S) + H[2] : k < 64 ? I += o(N, j, S) + H[3] : I += u(N, j, S) + H[4], I = I | 0, I = b(I, q[k]), I = I + c | 0, T = c, c = S, S = b(j, 10), j = N, N = I, I = A + g[y + O[k]] | 0, k < 16 ? I += u(_, W, P) + $[0] : k < 32 ? I += o(_, W, P) + $[1] : k < 48 ? I += i(_, W, P) + $[2] : k < 64 ? I += D(_, W, P) + $[3] : I += h(_, W, P) + $[4], I = I | 0, I = b(I, U[k]), I = I + L | 0, A = L, L = P, P = b(W, 10), W = _, _ = I;
|
|
2405
|
+
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + _ | 0, w[4] = w[0] + N + W | 0, w[0] = I;
|
|
2404
2406
|
},
|
|
2405
2407
|
_doFinalize: function() {
|
|
2406
2408
|
var g = this._data, y = g.words, k = this._nDataBytes * 8, R = g.sigBytes * 8;
|
|
@@ -2416,7 +2418,7 @@ function Lt() {
|
|
|
2416
2418
|
return g._hash = this._hash.clone(), g;
|
|
2417
2419
|
}
|
|
2418
2420
|
});
|
|
2419
|
-
function
|
|
2421
|
+
function h(g, y, k) {
|
|
2420
2422
|
return g ^ y ^ k;
|
|
2421
2423
|
}
|
|
2422
2424
|
function D(g, y, k) {
|
|
@@ -2428,26 +2430,26 @@ function Lt() {
|
|
|
2428
2430
|
function o(g, y, k) {
|
|
2429
2431
|
return g & k | y & ~k;
|
|
2430
2432
|
}
|
|
2431
|
-
function
|
|
2433
|
+
function u(g, y, k) {
|
|
2432
2434
|
return g ^ (y | ~k);
|
|
2433
2435
|
}
|
|
2434
2436
|
function b(g, y) {
|
|
2435
2437
|
return g << y | g >>> 32 - y;
|
|
2436
2438
|
}
|
|
2437
|
-
|
|
2439
|
+
l.RIPEMD160 = B._createHelper(p), l.HmacRIPEMD160 = B._createHmacHelper(p);
|
|
2438
2440
|
})(), t.RIPEMD160;
|
|
2439
2441
|
});
|
|
2440
2442
|
})(T0)), T0.exports;
|
|
2441
2443
|
}
|
|
2442
2444
|
var M0 = { exports: {} }, Ot = M0.exports, Jr;
|
|
2443
2445
|
function gr() {
|
|
2444
|
-
return Jr || (Jr = 1, (function(r,
|
|
2446
|
+
return Jr || (Jr = 1, (function(r, d) {
|
|
2445
2447
|
(function(t, e) {
|
|
2446
2448
|
r.exports = e(M());
|
|
2447
2449
|
})(Ot, function(t) {
|
|
2448
2450
|
(function() {
|
|
2449
|
-
var e = t,
|
|
2450
|
-
C.HMAC =
|
|
2451
|
+
var e = t, l = e.lib, v = l.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2452
|
+
C.HMAC = v.extend({
|
|
2451
2453
|
/**
|
|
2452
2454
|
* Initializes a newly created HMAC.
|
|
2453
2455
|
*
|
|
@@ -2462,8 +2464,8 @@ function gr() {
|
|
|
2462
2464
|
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2463
2465
|
var E = x.blockSize, a = E * 4;
|
|
2464
2466
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2465
|
-
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(),
|
|
2466
|
-
|
|
2467
|
+
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), p = s.words, h = f.words, D = 0; D < E; D++)
|
|
2468
|
+
p[D] ^= 1549556828, h[D] ^= 909522486;
|
|
2467
2469
|
s.sigBytes = f.sigBytes = a, this.reset();
|
|
2468
2470
|
},
|
|
2469
2471
|
/**
|
|
@@ -2519,12 +2521,12 @@ function gr() {
|
|
|
2519
2521
|
}
|
|
2520
2522
|
var N0 = { exports: {} }, qt = N0.exports, re;
|
|
2521
2523
|
function Tt() {
|
|
2522
|
-
return re || (re = 1, (function(r,
|
|
2523
|
-
(function(t, e,
|
|
2524
|
+
return re || (re = 1, (function(r, d) {
|
|
2525
|
+
(function(t, e, l) {
|
|
2524
2526
|
r.exports = e(M(), Fr(), gr());
|
|
2525
2527
|
})(qt, function(t) {
|
|
2526
2528
|
return (function() {
|
|
2527
|
-
var e = t,
|
|
2529
|
+
var e = t, l = e.lib, v = l.Base, m = l.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = v.extend({
|
|
2528
2530
|
/**
|
|
2529
2531
|
* Configuration options.
|
|
2530
2532
|
*
|
|
@@ -2532,7 +2534,7 @@ function Tt() {
|
|
|
2532
2534
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2533
2535
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2534
2536
|
*/
|
|
2535
|
-
cfg:
|
|
2537
|
+
cfg: v.extend({
|
|
2536
2538
|
keySize: 128 / 32,
|
|
2537
2539
|
hasher: C,
|
|
2538
2540
|
iterations: 25e4
|
|
@@ -2564,17 +2566,17 @@ function Tt() {
|
|
|
2564
2566
|
* var key = kdf.compute(password, salt);
|
|
2565
2567
|
*/
|
|
2566
2568
|
compute: function(E, a) {
|
|
2567
|
-
for (var s = this.cfg, f = x.create(s.hasher, E),
|
|
2568
|
-
var b = f.update(a).finalize(
|
|
2569
|
+
for (var s = this.cfg, f = x.create(s.hasher, E), p = m.create(), h = m.create([1]), D = p.words, i = h.words, o = s.keySize, u = s.iterations; D.length < o; ) {
|
|
2570
|
+
var b = f.update(a).finalize(h);
|
|
2569
2571
|
f.reset();
|
|
2570
|
-
for (var g = b.words, y = g.length, k = b, R = 1; R <
|
|
2572
|
+
for (var g = b.words, y = g.length, k = b, R = 1; R < u; R++) {
|
|
2571
2573
|
k = f.finalize(k), f.reset();
|
|
2572
2574
|
for (var F = k.words, w = 0; w < y; w++)
|
|
2573
2575
|
g[w] ^= F[w];
|
|
2574
2576
|
}
|
|
2575
|
-
|
|
2577
|
+
p.concat(b), i[0]++;
|
|
2576
2578
|
}
|
|
2577
|
-
return
|
|
2579
|
+
return p.sigBytes = o * 4, p;
|
|
2578
2580
|
}
|
|
2579
2581
|
});
|
|
2580
2582
|
e.PBKDF2 = function(E, a, s) {
|
|
@@ -2586,12 +2588,12 @@ function Tt() {
|
|
|
2586
2588
|
}
|
|
2587
2589
|
var U0 = { exports: {} }, Mt = U0.exports, ee;
|
|
2588
2590
|
function a0() {
|
|
2589
|
-
return ee || (ee = 1, (function(r,
|
|
2590
|
-
(function(t, e,
|
|
2591
|
+
return ee || (ee = 1, (function(r, d) {
|
|
2592
|
+
(function(t, e, l) {
|
|
2591
2593
|
r.exports = e(M(), ke(), gr());
|
|
2592
2594
|
})(Mt, function(t) {
|
|
2593
2595
|
return (function() {
|
|
2594
|
-
var e = t,
|
|
2596
|
+
var e = t, l = e.lib, v = l.Base, m = l.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = v.extend({
|
|
2595
2597
|
/**
|
|
2596
2598
|
* Configuration options.
|
|
2597
2599
|
*
|
|
@@ -2599,7 +2601,7 @@ function a0() {
|
|
|
2599
2601
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2600
2602
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2601
2603
|
*/
|
|
2602
|
-
cfg:
|
|
2604
|
+
cfg: v.extend({
|
|
2603
2605
|
keySize: 128 / 32,
|
|
2604
2606
|
hasher: C,
|
|
2605
2607
|
iterations: 1
|
|
@@ -2631,13 +2633,13 @@ function a0() {
|
|
|
2631
2633
|
* var key = kdf.compute(password, salt);
|
|
2632
2634
|
*/
|
|
2633
2635
|
compute: function(n, E) {
|
|
2634
|
-
for (var a, s = this.cfg, f = s.hasher.create(),
|
|
2636
|
+
for (var a, s = this.cfg, f = s.hasher.create(), p = m.create(), h = p.words, D = s.keySize, i = s.iterations; h.length < D; ) {
|
|
2635
2637
|
a && f.update(a), a = f.update(n).finalize(E), f.reset();
|
|
2636
2638
|
for (var o = 1; o < i; o++)
|
|
2637
2639
|
a = f.finalize(a), f.reset();
|
|
2638
|
-
|
|
2640
|
+
p.concat(a);
|
|
2639
2641
|
}
|
|
2640
|
-
return
|
|
2642
|
+
return p.sigBytes = D * 4, p;
|
|
2641
2643
|
}
|
|
2642
2644
|
});
|
|
2643
2645
|
e.EvpKDF = function(n, E, a) {
|
|
@@ -2648,15 +2650,15 @@ function a0() {
|
|
|
2648
2650
|
})(U0)), U0.exports;
|
|
2649
2651
|
}
|
|
2650
2652
|
var j0 = { exports: {} }, Nt = j0.exports, te;
|
|
2651
|
-
function
|
|
2652
|
-
return te || (te = 1, (function(r,
|
|
2653
|
-
(function(t, e,
|
|
2653
|
+
function K() {
|
|
2654
|
+
return te || (te = 1, (function(r, d) {
|
|
2655
|
+
(function(t, e, l) {
|
|
2654
2656
|
r.exports = e(M(), a0());
|
|
2655
2657
|
})(Nt, function(t) {
|
|
2656
2658
|
t.lib.Cipher || (function(e) {
|
|
2657
|
-
var
|
|
2659
|
+
var l = t, v = l.lib, m = v.Base, B = v.WordArray, C = v.BufferedBlockAlgorithm, x = l.enc;
|
|
2658
2660
|
x.Utf8;
|
|
2659
|
-
var n = x.Base64, E =
|
|
2661
|
+
var n = x.Base64, E = l.algo, a = E.EvpKDF, s = v.Cipher = C.extend({
|
|
2660
2662
|
/**
|
|
2661
2663
|
* Configuration options.
|
|
2662
2664
|
*
|
|
@@ -2788,14 +2790,14 @@ function X() {
|
|
|
2788
2790
|
};
|
|
2789
2791
|
})()
|
|
2790
2792
|
});
|
|
2791
|
-
|
|
2793
|
+
v.StreamCipher = s.extend({
|
|
2792
2794
|
_doFinalize: function() {
|
|
2793
2795
|
var F = this._process(!0);
|
|
2794
2796
|
return F;
|
|
2795
2797
|
},
|
|
2796
2798
|
blockSize: 1
|
|
2797
2799
|
});
|
|
2798
|
-
var f =
|
|
2800
|
+
var f = l.mode = {}, p = v.BlockCipherMode = m.extend({
|
|
2799
2801
|
/**
|
|
2800
2802
|
* Creates this mode for encryption.
|
|
2801
2803
|
*
|
|
@@ -2839,8 +2841,8 @@ function X() {
|
|
|
2839
2841
|
init: function(F, w) {
|
|
2840
2842
|
this._cipher = F, this._iv = w;
|
|
2841
2843
|
}
|
|
2842
|
-
}),
|
|
2843
|
-
var F =
|
|
2844
|
+
}), h = f.CBC = (function() {
|
|
2845
|
+
var F = p.extend();
|
|
2844
2846
|
F.Encryptor = F.extend({
|
|
2845
2847
|
/**
|
|
2846
2848
|
* Processes the data block at offset.
|
|
@@ -2879,7 +2881,7 @@ function X() {
|
|
|
2879
2881
|
H[$ + U] ^= O[U];
|
|
2880
2882
|
}
|
|
2881
2883
|
return F;
|
|
2882
|
-
})(), D =
|
|
2884
|
+
})(), D = l.pad = {}, i = D.Pkcs7 = {
|
|
2883
2885
|
/**
|
|
2884
2886
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2885
2887
|
*
|
|
@@ -2914,7 +2916,7 @@ function X() {
|
|
|
2914
2916
|
F.sigBytes -= w;
|
|
2915
2917
|
}
|
|
2916
2918
|
};
|
|
2917
|
-
|
|
2919
|
+
v.BlockCipher = s.extend({
|
|
2918
2920
|
/**
|
|
2919
2921
|
* Configuration options.
|
|
2920
2922
|
*
|
|
@@ -2922,7 +2924,7 @@ function X() {
|
|
|
2922
2924
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2923
2925
|
*/
|
|
2924
2926
|
cfg: s.cfg.extend({
|
|
2925
|
-
mode:
|
|
2927
|
+
mode: h,
|
|
2926
2928
|
padding: i
|
|
2927
2929
|
}),
|
|
2928
2930
|
reset: function() {
|
|
@@ -2940,7 +2942,7 @@ function X() {
|
|
|
2940
2942
|
},
|
|
2941
2943
|
blockSize: 128 / 32
|
|
2942
2944
|
});
|
|
2943
|
-
var o =
|
|
2945
|
+
var o = v.CipherParams = m.extend({
|
|
2944
2946
|
/**
|
|
2945
2947
|
* Initializes a newly created cipher params object.
|
|
2946
2948
|
*
|
|
@@ -2981,7 +2983,7 @@ function X() {
|
|
|
2981
2983
|
toString: function(F) {
|
|
2982
2984
|
return (F || this.formatter).stringify(this);
|
|
2983
2985
|
}
|
|
2984
|
-
}),
|
|
2986
|
+
}), u = l.format = {}, b = u.OpenSSL = {
|
|
2985
2987
|
/**
|
|
2986
2988
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
2987
2989
|
*
|
|
@@ -3016,7 +3018,7 @@ function X() {
|
|
|
3016
3018
|
var w, H = n.parse(F), $ = H.words;
|
|
3017
3019
|
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3018
3020
|
}
|
|
3019
|
-
}, g =
|
|
3021
|
+
}, g = v.SerializableCipher = m.extend({
|
|
3020
3022
|
/**
|
|
3021
3023
|
* Configuration options.
|
|
3022
3024
|
*
|
|
@@ -3097,7 +3099,7 @@ function X() {
|
|
|
3097
3099
|
_parse: function(F, w) {
|
|
3098
3100
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3099
3101
|
}
|
|
3100
|
-
}), y =
|
|
3102
|
+
}), y = l.kdf = {}, k = y.OpenSSL = {
|
|
3101
3103
|
/**
|
|
3102
3104
|
* Derives a key and IV from a password.
|
|
3103
3105
|
*
|
|
@@ -3123,7 +3125,7 @@ function X() {
|
|
|
3123
3125
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3124
3126
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3125
3127
|
}
|
|
3126
|
-
}, R =
|
|
3128
|
+
}, R = v.PasswordBasedCipher = g.extend({
|
|
3127
3129
|
/**
|
|
3128
3130
|
* Configuration options.
|
|
3129
3131
|
*
|
|
@@ -3187,65 +3189,65 @@ function X() {
|
|
|
3187
3189
|
}
|
|
3188
3190
|
var G0 = { exports: {} }, Ut = G0.exports, xe;
|
|
3189
3191
|
function jt() {
|
|
3190
|
-
return xe || (xe = 1, (function(r,
|
|
3191
|
-
(function(t, e,
|
|
3192
|
-
r.exports = e(M(),
|
|
3192
|
+
return xe || (xe = 1, (function(r, d) {
|
|
3193
|
+
(function(t, e, l) {
|
|
3194
|
+
r.exports = e(M(), K());
|
|
3193
3195
|
})(Ut, function(t) {
|
|
3194
3196
|
return t.mode.CFB = (function() {
|
|
3195
3197
|
var e = t.lib.BlockCipherMode.extend();
|
|
3196
3198
|
e.Encryptor = e.extend({
|
|
3197
|
-
processBlock: function(
|
|
3199
|
+
processBlock: function(v, m) {
|
|
3198
3200
|
var B = this._cipher, C = B.blockSize;
|
|
3199
|
-
|
|
3201
|
+
l.call(this, v, m, C, B), this._prevBlock = v.slice(m, m + C);
|
|
3200
3202
|
}
|
|
3201
3203
|
}), e.Decryptor = e.extend({
|
|
3202
|
-
processBlock: function(
|
|
3203
|
-
var B = this._cipher, C = B.blockSize, x =
|
|
3204
|
-
|
|
3204
|
+
processBlock: function(v, m) {
|
|
3205
|
+
var B = this._cipher, C = B.blockSize, x = v.slice(m, m + C);
|
|
3206
|
+
l.call(this, v, m, C, B), this._prevBlock = x;
|
|
3205
3207
|
}
|
|
3206
3208
|
});
|
|
3207
|
-
function
|
|
3209
|
+
function l(v, m, B, C) {
|
|
3208
3210
|
var x, n = this._iv;
|
|
3209
3211
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3210
3212
|
for (var E = 0; E < B; E++)
|
|
3211
|
-
|
|
3213
|
+
v[m + E] ^= x[E];
|
|
3212
3214
|
}
|
|
3213
3215
|
return e;
|
|
3214
3216
|
})(), t.mode.CFB;
|
|
3215
3217
|
});
|
|
3216
3218
|
})(G0)), G0.exports;
|
|
3217
3219
|
}
|
|
3218
|
-
var
|
|
3219
|
-
function
|
|
3220
|
-
return ne || (ne = 1, (function(r,
|
|
3221
|
-
(function(t, e,
|
|
3222
|
-
r.exports = e(M(),
|
|
3220
|
+
var X0 = { exports: {} }, Gt = X0.exports, ne;
|
|
3221
|
+
function Xt() {
|
|
3222
|
+
return ne || (ne = 1, (function(r, d) {
|
|
3223
|
+
(function(t, e, l) {
|
|
3224
|
+
r.exports = e(M(), K());
|
|
3223
3225
|
})(Gt, function(t) {
|
|
3224
3226
|
return t.mode.CTR = (function() {
|
|
3225
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3226
|
-
processBlock: function(
|
|
3227
|
+
var e = t.lib.BlockCipherMode.extend(), l = e.Encryptor = e.extend({
|
|
3228
|
+
processBlock: function(v, m) {
|
|
3227
3229
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3228
3230
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3229
3231
|
var E = n.slice(0);
|
|
3230
3232
|
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3231
3233
|
for (var a = 0; a < C; a++)
|
|
3232
|
-
|
|
3234
|
+
v[m + a] ^= E[a];
|
|
3233
3235
|
}
|
|
3234
3236
|
});
|
|
3235
|
-
return e.Decryptor =
|
|
3237
|
+
return e.Decryptor = l, e;
|
|
3236
3238
|
})(), t.mode.CTR;
|
|
3237
3239
|
});
|
|
3238
|
-
})(
|
|
3240
|
+
})(X0)), X0.exports;
|
|
3239
3241
|
}
|
|
3240
|
-
var
|
|
3242
|
+
var K0 = { exports: {} }, Kt = K0.exports, ae;
|
|
3241
3243
|
function Zt() {
|
|
3242
|
-
return ae || (ae = 1, (function(r,
|
|
3243
|
-
(function(t, e,
|
|
3244
|
-
r.exports = e(M(),
|
|
3245
|
-
})(
|
|
3244
|
+
return ae || (ae = 1, (function(r, d) {
|
|
3245
|
+
(function(t, e, l) {
|
|
3246
|
+
r.exports = e(M(), K());
|
|
3247
|
+
})(Kt, function(t) {
|
|
3246
3248
|
return t.mode.CTRGladman = (function() {
|
|
3247
3249
|
var e = t.lib.BlockCipherMode.extend();
|
|
3248
|
-
function
|
|
3250
|
+
function l(B) {
|
|
3249
3251
|
if ((B >> 24 & 255) === 255) {
|
|
3250
3252
|
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3251
3253
|
C === 255 ? (C = 0, x === 255 ? (x = 0, n === 255 ? n = 0 : ++n) : ++x) : ++C, B = 0, B += C << 16, B += x << 8, B += n;
|
|
@@ -3253,13 +3255,13 @@ function Zt() {
|
|
|
3253
3255
|
B += 1 << 24;
|
|
3254
3256
|
return B;
|
|
3255
3257
|
}
|
|
3256
|
-
function
|
|
3257
|
-
return (B[0] =
|
|
3258
|
+
function v(B) {
|
|
3259
|
+
return (B[0] = l(B[0])) === 0 && (B[1] = l(B[1])), B;
|
|
3258
3260
|
}
|
|
3259
3261
|
var m = e.Encryptor = e.extend({
|
|
3260
3262
|
processBlock: function(B, C) {
|
|
3261
3263
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3262
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3264
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), v(a);
|
|
3263
3265
|
var s = a.slice(0);
|
|
3264
3266
|
x.encryptBlock(s, 0);
|
|
3265
3267
|
for (var f = 0; f < n; f++)
|
|
@@ -3269,43 +3271,43 @@ function Zt() {
|
|
|
3269
3271
|
return e.Decryptor = m, e;
|
|
3270
3272
|
})(), t.mode.CTRGladman;
|
|
3271
3273
|
});
|
|
3272
|
-
})(
|
|
3274
|
+
})(K0)), K0.exports;
|
|
3273
3275
|
}
|
|
3274
3276
|
var Z0 = { exports: {} }, Yt = Z0.exports, oe;
|
|
3275
3277
|
function Qt() {
|
|
3276
|
-
return oe || (oe = 1, (function(r,
|
|
3277
|
-
(function(t, e,
|
|
3278
|
-
r.exports = e(M(),
|
|
3278
|
+
return oe || (oe = 1, (function(r, d) {
|
|
3279
|
+
(function(t, e, l) {
|
|
3280
|
+
r.exports = e(M(), K());
|
|
3279
3281
|
})(Yt, function(t) {
|
|
3280
3282
|
return t.mode.OFB = (function() {
|
|
3281
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3282
|
-
processBlock: function(
|
|
3283
|
+
var e = t.lib.BlockCipherMode.extend(), l = e.Encryptor = e.extend({
|
|
3284
|
+
processBlock: function(v, m) {
|
|
3283
3285
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3284
3286
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3285
3287
|
for (var E = 0; E < C; E++)
|
|
3286
|
-
|
|
3288
|
+
v[m + E] ^= n[E];
|
|
3287
3289
|
}
|
|
3288
3290
|
});
|
|
3289
|
-
return e.Decryptor =
|
|
3291
|
+
return e.Decryptor = l, e;
|
|
3290
3292
|
})(), t.mode.OFB;
|
|
3291
3293
|
});
|
|
3292
3294
|
})(Z0)), Z0.exports;
|
|
3293
3295
|
}
|
|
3294
3296
|
var Y0 = { exports: {} }, Vt = Y0.exports, ie;
|
|
3295
3297
|
function Jt() {
|
|
3296
|
-
return ie || (ie = 1, (function(r,
|
|
3297
|
-
(function(t, e,
|
|
3298
|
-
r.exports = e(M(),
|
|
3298
|
+
return ie || (ie = 1, (function(r, d) {
|
|
3299
|
+
(function(t, e, l) {
|
|
3300
|
+
r.exports = e(M(), K());
|
|
3299
3301
|
})(Vt, function(t) {
|
|
3300
3302
|
return t.mode.ECB = (function() {
|
|
3301
3303
|
var e = t.lib.BlockCipherMode.extend();
|
|
3302
3304
|
return e.Encryptor = e.extend({
|
|
3303
|
-
processBlock: function(
|
|
3304
|
-
this._cipher.encryptBlock(
|
|
3305
|
+
processBlock: function(l, v) {
|
|
3306
|
+
this._cipher.encryptBlock(l, v);
|
|
3305
3307
|
}
|
|
3306
3308
|
}), e.Decryptor = e.extend({
|
|
3307
|
-
processBlock: function(
|
|
3308
|
-
this._cipher.decryptBlock(
|
|
3309
|
+
processBlock: function(l, v) {
|
|
3310
|
+
this._cipher.decryptBlock(l, v);
|
|
3309
3311
|
}
|
|
3310
3312
|
}), e;
|
|
3311
3313
|
})(), t.mode.ECB;
|
|
@@ -3314,18 +3316,18 @@ function Jt() {
|
|
|
3314
3316
|
}
|
|
3315
3317
|
var Q0 = { exports: {} }, rx = Q0.exports, se;
|
|
3316
3318
|
function ex() {
|
|
3317
|
-
return se || (se = 1, (function(r,
|
|
3318
|
-
(function(t, e,
|
|
3319
|
-
r.exports = e(M(),
|
|
3319
|
+
return se || (se = 1, (function(r, d) {
|
|
3320
|
+
(function(t, e, l) {
|
|
3321
|
+
r.exports = e(M(), K());
|
|
3320
3322
|
})(rx, function(t) {
|
|
3321
3323
|
return t.pad.AnsiX923 = {
|
|
3322
|
-
pad: function(e,
|
|
3323
|
-
var
|
|
3324
|
+
pad: function(e, l) {
|
|
3325
|
+
var v = e.sigBytes, m = l * 4, B = m - v % m, C = v + B - 1;
|
|
3324
3326
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3325
3327
|
},
|
|
3326
3328
|
unpad: function(e) {
|
|
3327
|
-
var
|
|
3328
|
-
e.sigBytes -=
|
|
3329
|
+
var l = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3330
|
+
e.sigBytes -= l;
|
|
3329
3331
|
}
|
|
3330
3332
|
}, t.pad.Ansix923;
|
|
3331
3333
|
});
|
|
@@ -3333,18 +3335,18 @@ function ex() {
|
|
|
3333
3335
|
}
|
|
3334
3336
|
var V0 = { exports: {} }, tx = V0.exports, ce;
|
|
3335
3337
|
function xx() {
|
|
3336
|
-
return ce || (ce = 1, (function(r,
|
|
3337
|
-
(function(t, e,
|
|
3338
|
-
r.exports = e(M(),
|
|
3338
|
+
return ce || (ce = 1, (function(r, d) {
|
|
3339
|
+
(function(t, e, l) {
|
|
3340
|
+
r.exports = e(M(), K());
|
|
3339
3341
|
})(tx, function(t) {
|
|
3340
3342
|
return t.pad.Iso10126 = {
|
|
3341
|
-
pad: function(e,
|
|
3342
|
-
var
|
|
3343
|
+
pad: function(e, l) {
|
|
3344
|
+
var v = l * 4, m = v - e.sigBytes % v;
|
|
3343
3345
|
e.concat(t.lib.WordArray.random(m - 1)).concat(t.lib.WordArray.create([m << 24], 1));
|
|
3344
3346
|
},
|
|
3345
3347
|
unpad: function(e) {
|
|
3346
|
-
var
|
|
3347
|
-
e.sigBytes -=
|
|
3348
|
+
var l = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3349
|
+
e.sigBytes -= l;
|
|
3348
3350
|
}
|
|
3349
3351
|
}, t.pad.Iso10126;
|
|
3350
3352
|
});
|
|
@@ -3352,13 +3354,13 @@ function xx() {
|
|
|
3352
3354
|
}
|
|
3353
3355
|
var J0 = { exports: {} }, nx = J0.exports, fe;
|
|
3354
3356
|
function ax() {
|
|
3355
|
-
return fe || (fe = 1, (function(r,
|
|
3356
|
-
(function(t, e,
|
|
3357
|
-
r.exports = e(M(),
|
|
3357
|
+
return fe || (fe = 1, (function(r, d) {
|
|
3358
|
+
(function(t, e, l) {
|
|
3359
|
+
r.exports = e(M(), K());
|
|
3358
3360
|
})(nx, function(t) {
|
|
3359
3361
|
return t.pad.Iso97971 = {
|
|
3360
|
-
pad: function(e,
|
|
3361
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3362
|
+
pad: function(e, l) {
|
|
3363
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, l);
|
|
3362
3364
|
},
|
|
3363
3365
|
unpad: function(e) {
|
|
3364
3366
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
@@ -3369,19 +3371,19 @@ function ax() {
|
|
|
3369
3371
|
}
|
|
3370
3372
|
var rr = { exports: {} }, ox = rr.exports, ue;
|
|
3371
3373
|
function ix() {
|
|
3372
|
-
return ue || (ue = 1, (function(r,
|
|
3373
|
-
(function(t, e,
|
|
3374
|
-
r.exports = e(M(),
|
|
3374
|
+
return ue || (ue = 1, (function(r, d) {
|
|
3375
|
+
(function(t, e, l) {
|
|
3376
|
+
r.exports = e(M(), K());
|
|
3375
3377
|
})(ox, function(t) {
|
|
3376
3378
|
return t.pad.ZeroPadding = {
|
|
3377
|
-
pad: function(e,
|
|
3378
|
-
var
|
|
3379
|
-
e.clamp(), e.sigBytes +=
|
|
3379
|
+
pad: function(e, l) {
|
|
3380
|
+
var v = l * 4;
|
|
3381
|
+
e.clamp(), e.sigBytes += v - (e.sigBytes % v || v);
|
|
3380
3382
|
},
|
|
3381
3383
|
unpad: function(e) {
|
|
3382
|
-
for (var
|
|
3383
|
-
if (
|
|
3384
|
-
e.sigBytes =
|
|
3384
|
+
for (var l = e.words, v = e.sigBytes - 1, v = e.sigBytes - 1; v >= 0; v--)
|
|
3385
|
+
if (l[v >>> 2] >>> 24 - v % 4 * 8 & 255) {
|
|
3386
|
+
e.sigBytes = v + 1;
|
|
3385
3387
|
break;
|
|
3386
3388
|
}
|
|
3387
3389
|
}
|
|
@@ -3391,9 +3393,9 @@ function ix() {
|
|
|
3391
3393
|
}
|
|
3392
3394
|
var er = { exports: {} }, sx = er.exports, de;
|
|
3393
3395
|
function cx() {
|
|
3394
|
-
return de || (de = 1, (function(r,
|
|
3395
|
-
(function(t, e,
|
|
3396
|
-
r.exports = e(M(),
|
|
3396
|
+
return de || (de = 1, (function(r, d) {
|
|
3397
|
+
(function(t, e, l) {
|
|
3398
|
+
r.exports = e(M(), K());
|
|
3397
3399
|
})(sx, function(t) {
|
|
3398
3400
|
return t.pad.NoPadding = {
|
|
3399
3401
|
pad: function() {
|
|
@@ -3406,12 +3408,12 @@ function cx() {
|
|
|
3406
3408
|
}
|
|
3407
3409
|
var tr = { exports: {} }, fx = tr.exports, le;
|
|
3408
3410
|
function ux() {
|
|
3409
|
-
return le || (le = 1, (function(r,
|
|
3410
|
-
(function(t, e,
|
|
3411
|
-
r.exports = e(M(),
|
|
3411
|
+
return le || (le = 1, (function(r, d) {
|
|
3412
|
+
(function(t, e, l) {
|
|
3413
|
+
r.exports = e(M(), K());
|
|
3412
3414
|
})(fx, function(t) {
|
|
3413
3415
|
return (function(e) {
|
|
3414
|
-
var
|
|
3416
|
+
var l = t, v = l.lib, m = v.CipherParams, B = l.enc, C = B.Hex, x = l.format;
|
|
3415
3417
|
x.Hex = {
|
|
3416
3418
|
/**
|
|
3417
3419
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3453,29 +3455,29 @@ function ux() {
|
|
|
3453
3455
|
}
|
|
3454
3456
|
var xr = { exports: {} }, dx = xr.exports, he;
|
|
3455
3457
|
function lx() {
|
|
3456
|
-
return he || (he = 1, (function(r,
|
|
3457
|
-
(function(t, e,
|
|
3458
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
3458
|
+
return he || (he = 1, (function(r, d) {
|
|
3459
|
+
(function(t, e, l) {
|
|
3460
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
3459
3461
|
})(dx, function(t) {
|
|
3460
3462
|
return (function() {
|
|
3461
|
-
var e = t,
|
|
3463
|
+
var e = t, l = e.lib, v = l.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], p = [], h = [];
|
|
3462
3464
|
(function() {
|
|
3463
|
-
for (var o = [],
|
|
3464
|
-
|
|
3465
|
-
for (var b = 0, g = 0,
|
|
3465
|
+
for (var o = [], u = 0; u < 256; u++)
|
|
3466
|
+
u < 128 ? o[u] = u << 1 : o[u] = u << 1 ^ 283;
|
|
3467
|
+
for (var b = 0, g = 0, u = 0; u < 256; u++) {
|
|
3466
3468
|
var y = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4;
|
|
3467
3469
|
y = y >>> 8 ^ y & 255 ^ 99, B[b] = y, C[y] = b;
|
|
3468
3470
|
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3469
3471
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3470
3472
|
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3471
|
-
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16,
|
|
3473
|
+
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, p[y] = w << 8 | w >>> 24, h[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], g ^= o[o[g]]) : b = g = 1;
|
|
3472
3474
|
}
|
|
3473
3475
|
})();
|
|
3474
|
-
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES =
|
|
3476
|
+
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES = v.extend({
|
|
3475
3477
|
_doReset: function() {
|
|
3476
3478
|
var o;
|
|
3477
3479
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3478
|
-
for (var
|
|
3480
|
+
for (var u = this._keyPriorReset = this._key, b = u.words, g = u.sigBytes / 4, y = this._nRounds = g + 6, k = (y + 1) * 4, R = this._keySchedule = [], F = 0; F < k; F++)
|
|
3479
3481
|
F < g ? R[F] = b[F] : (o = R[F - 1], F % g ? g > 6 && F % g == 4 && (o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255]) : (o = o << 8 | o >>> 24, o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255], o ^= D[F / g | 0] << 24), R[F] = R[F - g] ^ o);
|
|
3480
3482
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3481
3483
|
var F = k - H;
|
|
@@ -3483,42 +3485,42 @@ function lx() {
|
|
|
3483
3485
|
var o = R[F];
|
|
3484
3486
|
else
|
|
3485
3487
|
var o = R[F - 4];
|
|
3486
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^
|
|
3488
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^ p[B[o >>> 8 & 255]] ^ h[B[o & 255]];
|
|
3487
3489
|
}
|
|
3488
3490
|
}
|
|
3489
3491
|
},
|
|
3490
|
-
encryptBlock: function(o,
|
|
3491
|
-
this._doCryptBlock(o,
|
|
3492
|
+
encryptBlock: function(o, u) {
|
|
3493
|
+
this._doCryptBlock(o, u, this._keySchedule, x, n, E, a, B);
|
|
3492
3494
|
},
|
|
3493
|
-
decryptBlock: function(o,
|
|
3494
|
-
var b = o[
|
|
3495
|
-
o[
|
|
3496
|
-
var b = o[
|
|
3497
|
-
o[
|
|
3495
|
+
decryptBlock: function(o, u) {
|
|
3496
|
+
var b = o[u + 1];
|
|
3497
|
+
o[u + 1] = o[u + 3], o[u + 3] = b, this._doCryptBlock(o, u, this._invKeySchedule, s, f, p, h, C);
|
|
3498
|
+
var b = o[u + 1];
|
|
3499
|
+
o[u + 1] = o[u + 3], o[u + 3] = b;
|
|
3498
3500
|
},
|
|
3499
|
-
_doCryptBlock: function(o,
|
|
3500
|
-
for (var w = this._nRounds, H = o[
|
|
3501
|
+
_doCryptBlock: function(o, u, b, g, y, k, R, F) {
|
|
3502
|
+
for (var w = this._nRounds, H = o[u] ^ b[0], $ = o[u + 1] ^ b[1], z = o[u + 2] ^ b[2], O = o[u + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3501
3503
|
var T = g[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[z >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = g[$ >>> 24] ^ y[z >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = g[z >>> 24] ^ y[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ R[$ & 255] ^ b[q++], S = g[O >>> 24] ^ y[H >>> 16 & 255] ^ k[$ >>> 8 & 255] ^ R[z & 255] ^ b[q++];
|
|
3502
3504
|
H = T, $ = N, z = j, O = S;
|
|
3503
3505
|
}
|
|
3504
3506
|
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[z >>> 8 & 255] << 8 | F[O & 255]) ^ b[q++], N = (F[$ >>> 24] << 24 | F[z >>> 16 & 255] << 16 | F[O >>> 8 & 255] << 8 | F[H & 255]) ^ b[q++], j = (F[z >>> 24] << 24 | F[O >>> 16 & 255] << 16 | F[H >>> 8 & 255] << 8 | F[$ & 255]) ^ b[q++], S = (F[O >>> 24] << 24 | F[H >>> 16 & 255] << 16 | F[$ >>> 8 & 255] << 8 | F[z & 255]) ^ b[q++];
|
|
3505
|
-
o[
|
|
3507
|
+
o[u] = T, o[u + 1] = N, o[u + 2] = j, o[u + 3] = S;
|
|
3506
3508
|
},
|
|
3507
3509
|
keySize: 256 / 32
|
|
3508
3510
|
});
|
|
3509
|
-
e.AES =
|
|
3511
|
+
e.AES = v._createHelper(i);
|
|
3510
3512
|
})(), t.AES;
|
|
3511
3513
|
});
|
|
3512
3514
|
})(xr)), xr.exports;
|
|
3513
3515
|
}
|
|
3514
3516
|
var nr = { exports: {} }, hx = nr.exports, ve;
|
|
3515
3517
|
function vx() {
|
|
3516
|
-
return ve || (ve = 1, (function(r,
|
|
3517
|
-
(function(t, e,
|
|
3518
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
3518
|
+
return ve || (ve = 1, (function(r, d) {
|
|
3519
|
+
(function(t, e, l) {
|
|
3520
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
3519
3521
|
})(hx, function(t) {
|
|
3520
3522
|
return (function() {
|
|
3521
|
-
var e = t,
|
|
3523
|
+
var e = t, l = e.lib, v = l.WordArray, m = l.BlockCipher, B = e.algo, C = [
|
|
3522
3524
|
57,
|
|
3523
3525
|
49,
|
|
3524
3526
|
41,
|
|
@@ -4164,20 +4166,20 @@ function vx() {
|
|
|
4164
4166
|
2147483679
|
|
4165
4167
|
], s = B.DES = m.extend({
|
|
4166
4168
|
_doReset: function() {
|
|
4167
|
-
for (var D = this._key, i = D.words, o = [],
|
|
4168
|
-
var b = C[
|
|
4169
|
-
o[
|
|
4169
|
+
for (var D = this._key, i = D.words, o = [], u = 0; u < 56; u++) {
|
|
4170
|
+
var b = C[u] - 1;
|
|
4171
|
+
o[u] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4170
4172
|
}
|
|
4171
4173
|
for (var g = this._subKeys = [], y = 0; y < 16; y++) {
|
|
4172
|
-
for (var k = g[y] = [], R = n[y],
|
|
4173
|
-
k[
|
|
4174
|
+
for (var k = g[y] = [], R = n[y], u = 0; u < 24; u++)
|
|
4175
|
+
k[u / 6 | 0] |= o[(x[u] - 1 + R) % 28] << 31 - u % 6, k[4 + (u / 6 | 0)] |= o[28 + (x[u + 24] - 1 + R) % 28] << 31 - u % 6;
|
|
4174
4176
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4175
|
-
for (var
|
|
4176
|
-
k[
|
|
4177
|
+
for (var u = 1; u < 7; u++)
|
|
4178
|
+
k[u] = k[u] >>> (u - 1) * 4 + 3;
|
|
4177
4179
|
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
4178
4180
|
}
|
|
4179
|
-
for (var F = this._invSubKeys = [],
|
|
4180
|
-
F[
|
|
4181
|
+
for (var F = this._invSubKeys = [], u = 0; u < 16; u++)
|
|
4182
|
+
F[u] = g[15 - u];
|
|
4181
4183
|
},
|
|
4182
4184
|
encryptBlock: function(D, i) {
|
|
4183
4185
|
this._doCryptBlock(D, i, this._subKeys);
|
|
@@ -4186,14 +4188,14 @@ function vx() {
|
|
|
4186
4188
|
this._doCryptBlock(D, i, this._invSubKeys);
|
|
4187
4189
|
},
|
|
4188
4190
|
_doCryptBlock: function(D, i, o) {
|
|
4189
|
-
this._lBlock = D[i], this._rBlock = D[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535),
|
|
4190
|
-
for (var
|
|
4191
|
-
for (var b = o[
|
|
4191
|
+
this._lBlock = D[i], this._rBlock = D[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535), p.call(this, 2, 858993459), p.call(this, 8, 16711935), f.call(this, 1, 1431655765);
|
|
4192
|
+
for (var u = 0; u < 16; u++) {
|
|
4193
|
+
for (var b = o[u], g = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4192
4194
|
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4193
4195
|
this._lBlock = y, this._rBlock = g ^ k;
|
|
4194
4196
|
}
|
|
4195
4197
|
var F = this._lBlock;
|
|
4196
|
-
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765),
|
|
4198
|
+
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765), p.call(this, 8, 16711935), p.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135), D[i] = this._lBlock, D[i + 1] = this._rBlock;
|
|
4197
4199
|
},
|
|
4198
4200
|
keySize: 64 / 32,
|
|
4199
4201
|
ivSize: 64 / 32,
|
|
@@ -4203,18 +4205,18 @@ function vx() {
|
|
|
4203
4205
|
var o = (this._lBlock >>> D ^ this._rBlock) & i;
|
|
4204
4206
|
this._rBlock ^= o, this._lBlock ^= o << D;
|
|
4205
4207
|
}
|
|
4206
|
-
function
|
|
4208
|
+
function p(D, i) {
|
|
4207
4209
|
var o = (this._rBlock >>> D ^ this._lBlock) & i;
|
|
4208
4210
|
this._lBlock ^= o, this._rBlock ^= o << D;
|
|
4209
4211
|
}
|
|
4210
4212
|
e.DES = m._createHelper(s);
|
|
4211
|
-
var
|
|
4213
|
+
var h = B.TripleDES = m.extend({
|
|
4212
4214
|
_doReset: function() {
|
|
4213
4215
|
var D = this._key, i = D.words;
|
|
4214
4216
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4215
4217
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4216
|
-
var o = i.slice(0, 2),
|
|
4217
|
-
this._des1 = s.createEncryptor(
|
|
4218
|
+
var o = i.slice(0, 2), u = i.length < 4 ? i.slice(0, 2) : i.slice(2, 4), b = i.length < 6 ? i.slice(0, 2) : i.slice(4, 6);
|
|
4219
|
+
this._des1 = s.createEncryptor(v.create(o)), this._des2 = s.createEncryptor(v.create(u)), this._des3 = s.createEncryptor(v.create(b));
|
|
4218
4220
|
},
|
|
4219
4221
|
encryptBlock: function(D, i) {
|
|
4220
4222
|
this._des1.encryptBlock(D, i), this._des2.decryptBlock(D, i), this._des3.encryptBlock(D, i);
|
|
@@ -4226,27 +4228,27 @@ function vx() {
|
|
|
4226
4228
|
ivSize: 64 / 32,
|
|
4227
4229
|
blockSize: 64 / 32
|
|
4228
4230
|
});
|
|
4229
|
-
e.TripleDES = m._createHelper(
|
|
4231
|
+
e.TripleDES = m._createHelper(h);
|
|
4230
4232
|
})(), t.TripleDES;
|
|
4231
4233
|
});
|
|
4232
4234
|
})(nr)), nr.exports;
|
|
4233
4235
|
}
|
|
4234
4236
|
var ar = { exports: {} }, px = ar.exports, pe;
|
|
4235
4237
|
function Bx() {
|
|
4236
|
-
return pe || (pe = 1, (function(r,
|
|
4237
|
-
(function(t, e,
|
|
4238
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4238
|
+
return pe || (pe = 1, (function(r, d) {
|
|
4239
|
+
(function(t, e, l) {
|
|
4240
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4239
4241
|
})(px, function(t) {
|
|
4240
4242
|
return (function() {
|
|
4241
|
-
var e = t,
|
|
4243
|
+
var e = t, l = e.lib, v = l.StreamCipher, m = e.algo, B = m.RC4 = v.extend({
|
|
4242
4244
|
_doReset: function() {
|
|
4243
4245
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4244
4246
|
s[f] = f;
|
|
4245
|
-
for (var f = 0,
|
|
4246
|
-
var
|
|
4247
|
-
|
|
4247
|
+
for (var f = 0, p = 0; f < 256; f++) {
|
|
4248
|
+
var h = f % a, D = E[h >>> 2] >>> 24 - h % 4 * 8 & 255;
|
|
4249
|
+
p = (p + s[f] + D) % 256;
|
|
4248
4250
|
var i = s[f];
|
|
4249
|
-
s[f] = s[
|
|
4251
|
+
s[f] = s[p], s[p] = i;
|
|
4250
4252
|
}
|
|
4251
4253
|
this._i = this._j = 0;
|
|
4252
4254
|
},
|
|
@@ -4259,12 +4261,12 @@ function Bx() {
|
|
|
4259
4261
|
function C() {
|
|
4260
4262
|
for (var n = this._S, E = this._i, a = this._j, s = 0, f = 0; f < 4; f++) {
|
|
4261
4263
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4262
|
-
var
|
|
4263
|
-
n[E] = n[a], n[a] =
|
|
4264
|
+
var p = n[E];
|
|
4265
|
+
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 - f * 8;
|
|
4264
4266
|
}
|
|
4265
4267
|
return this._i = E, this._j = a, s;
|
|
4266
4268
|
}
|
|
4267
|
-
e.RC4 =
|
|
4269
|
+
e.RC4 = v._createHelper(B);
|
|
4268
4270
|
var x = m.RC4Drop = B.extend({
|
|
4269
4271
|
/**
|
|
4270
4272
|
* Configuration options.
|
|
@@ -4280,23 +4282,23 @@ function Bx() {
|
|
|
4280
4282
|
C.call(this);
|
|
4281
4283
|
}
|
|
4282
4284
|
});
|
|
4283
|
-
e.RC4Drop =
|
|
4285
|
+
e.RC4Drop = v._createHelper(x);
|
|
4284
4286
|
})(), t.RC4;
|
|
4285
4287
|
});
|
|
4286
4288
|
})(ar)), ar.exports;
|
|
4287
4289
|
}
|
|
4288
4290
|
var or = { exports: {} }, Cx = or.exports, Be;
|
|
4289
4291
|
function Ex() {
|
|
4290
|
-
return Be || (Be = 1, (function(r,
|
|
4291
|
-
(function(t, e,
|
|
4292
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4292
|
+
return Be || (Be = 1, (function(r, d) {
|
|
4293
|
+
(function(t, e, l) {
|
|
4294
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4293
4295
|
})(Cx, function(t) {
|
|
4294
4296
|
return (function() {
|
|
4295
|
-
var e = t,
|
|
4297
|
+
var e = t, l = e.lib, v = l.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = v.extend({
|
|
4296
4298
|
_doReset: function() {
|
|
4297
4299
|
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4298
4300
|
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
4299
|
-
var
|
|
4301
|
+
var p = this._X = [
|
|
4300
4302
|
a[0],
|
|
4301
4303
|
a[3] << 16 | a[2] >>> 16,
|
|
4302
4304
|
a[1],
|
|
@@ -4305,7 +4307,7 @@ function Ex() {
|
|
|
4305
4307
|
a[1] << 16 | a[0] >>> 16,
|
|
4306
4308
|
a[3],
|
|
4307
4309
|
a[2] << 16 | a[1] >>> 16
|
|
4308
|
-
],
|
|
4310
|
+
], h = this._C = [
|
|
4309
4311
|
a[2] << 16 | a[2] >>> 16,
|
|
4310
4312
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4311
4313
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4319,10 +4321,10 @@ function Ex() {
|
|
|
4319
4321
|
for (var f = 0; f < 4; f++)
|
|
4320
4322
|
E.call(this);
|
|
4321
4323
|
for (var f = 0; f < 8; f++)
|
|
4322
|
-
|
|
4324
|
+
h[f] ^= p[f + 4 & 7];
|
|
4323
4325
|
if (s) {
|
|
4324
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4325
|
-
|
|
4326
|
+
var D = s.words, i = D[0], o = D[1], u = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = u >>> 16 | b & 4294901760, y = b << 16 | u & 65535;
|
|
4327
|
+
h[0] ^= u, h[1] ^= g, h[2] ^= b, h[3] ^= y, h[4] ^= u, h[5] ^= g, h[6] ^= b, h[7] ^= y;
|
|
4326
4328
|
for (var f = 0; f < 4; f++)
|
|
4327
4329
|
E.call(this);
|
|
4328
4330
|
}
|
|
@@ -4330,8 +4332,8 @@ function Ex() {
|
|
|
4330
4332
|
_doProcessBlock: function(a, s) {
|
|
4331
4333
|
var f = this._X;
|
|
4332
4334
|
E.call(this), B[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, B[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, B[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, B[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
4333
|
-
for (var
|
|
4334
|
-
B[
|
|
4335
|
+
for (var p = 0; p < 4; p++)
|
|
4336
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4335
4337
|
},
|
|
4336
4338
|
blockSize: 128 / 32,
|
|
4337
4339
|
ivSize: 64 / 32
|
|
@@ -4341,24 +4343,24 @@ function Ex() {
|
|
|
4341
4343
|
C[f] = s[f];
|
|
4342
4344
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4343
4345
|
for (var f = 0; f < 8; f++) {
|
|
4344
|
-
var
|
|
4346
|
+
var p = a[f] + s[f], h = p & 65535, D = p >>> 16, i = ((h * h >>> 17) + h * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4345
4347
|
x[f] = i ^ o;
|
|
4346
4348
|
}
|
|
4347
4349
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4348
4350
|
}
|
|
4349
|
-
e.Rabbit =
|
|
4351
|
+
e.Rabbit = v._createHelper(n);
|
|
4350
4352
|
})(), t.Rabbit;
|
|
4351
4353
|
});
|
|
4352
4354
|
})(or)), or.exports;
|
|
4353
4355
|
}
|
|
4354
4356
|
var ir = { exports: {} }, Ax = ir.exports, Ce;
|
|
4355
4357
|
function Fx() {
|
|
4356
|
-
return Ce || (Ce = 1, (function(r,
|
|
4357
|
-
(function(t, e,
|
|
4358
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4358
|
+
return Ce || (Ce = 1, (function(r, d) {
|
|
4359
|
+
(function(t, e, l) {
|
|
4360
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4359
4361
|
})(Ax, function(t) {
|
|
4360
4362
|
return (function() {
|
|
4361
|
-
var e = t,
|
|
4363
|
+
var e = t, l = e.lib, v = l.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = v.extend({
|
|
4362
4364
|
_doReset: function() {
|
|
4363
4365
|
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4364
4366
|
a[0],
|
|
@@ -4369,7 +4371,7 @@ function Fx() {
|
|
|
4369
4371
|
a[1] << 16 | a[0] >>> 16,
|
|
4370
4372
|
a[3],
|
|
4371
4373
|
a[2] << 16 | a[1] >>> 16
|
|
4372
|
-
],
|
|
4374
|
+
], p = this._C = [
|
|
4373
4375
|
a[2] << 16 | a[2] >>> 16,
|
|
4374
4376
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4375
4377
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4380,22 +4382,22 @@ function Fx() {
|
|
|
4380
4382
|
a[3] & 4294901760 | a[0] & 65535
|
|
4381
4383
|
];
|
|
4382
4384
|
this._b = 0;
|
|
4383
|
-
for (var
|
|
4385
|
+
for (var h = 0; h < 4; h++)
|
|
4384
4386
|
E.call(this);
|
|
4385
|
-
for (var
|
|
4386
|
-
|
|
4387
|
+
for (var h = 0; h < 8; h++)
|
|
4388
|
+
p[h] ^= f[h + 4 & 7];
|
|
4387
4389
|
if (s) {
|
|
4388
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4389
|
-
|
|
4390
|
-
for (var
|
|
4390
|
+
var D = s.words, i = D[0], o = D[1], u = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = u >>> 16 | b & 4294901760, y = b << 16 | u & 65535;
|
|
4391
|
+
p[0] ^= u, p[1] ^= g, p[2] ^= b, p[3] ^= y, p[4] ^= u, p[5] ^= g, p[6] ^= b, p[7] ^= y;
|
|
4392
|
+
for (var h = 0; h < 4; h++)
|
|
4391
4393
|
E.call(this);
|
|
4392
4394
|
}
|
|
4393
4395
|
},
|
|
4394
4396
|
_doProcessBlock: function(a, s) {
|
|
4395
4397
|
var f = this._X;
|
|
4396
4398
|
E.call(this), B[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, B[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, B[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, B[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
4397
|
-
for (var
|
|
4398
|
-
B[
|
|
4399
|
+
for (var p = 0; p < 4; p++)
|
|
4400
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4399
4401
|
},
|
|
4400
4402
|
blockSize: 128 / 32,
|
|
4401
4403
|
ivSize: 64 / 32
|
|
@@ -4405,24 +4407,24 @@ function Fx() {
|
|
|
4405
4407
|
C[f] = s[f];
|
|
4406
4408
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4407
4409
|
for (var f = 0; f < 8; f++) {
|
|
4408
|
-
var
|
|
4410
|
+
var p = a[f] + s[f], h = p & 65535, D = p >>> 16, i = ((h * h >>> 17) + h * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4409
4411
|
x[f] = i ^ o;
|
|
4410
4412
|
}
|
|
4411
4413
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4412
4414
|
}
|
|
4413
|
-
e.RabbitLegacy =
|
|
4415
|
+
e.RabbitLegacy = v._createHelper(n);
|
|
4414
4416
|
})(), t.RabbitLegacy;
|
|
4415
4417
|
});
|
|
4416
4418
|
})(ir)), ir.exports;
|
|
4417
4419
|
}
|
|
4418
4420
|
var sr = { exports: {} }, gx = sr.exports, Ee;
|
|
4419
4421
|
function Dx() {
|
|
4420
|
-
return Ee || (Ee = 1, (function(r,
|
|
4421
|
-
(function(t, e,
|
|
4422
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4422
|
+
return Ee || (Ee = 1, (function(r, d) {
|
|
4423
|
+
(function(t, e, l) {
|
|
4424
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4423
4425
|
})(gx, function(t) {
|
|
4424
4426
|
return (function() {
|
|
4425
|
-
var e = t,
|
|
4427
|
+
var e = t, l = e.lib, v = l.BlockCipher, m = e.algo;
|
|
4426
4428
|
const B = 16, C = [
|
|
4427
4429
|
608135816,
|
|
4428
4430
|
2242054355,
|
|
@@ -5480,68 +5482,68 @@ function Dx() {
|
|
|
5480
5482
|
pbox: [],
|
|
5481
5483
|
sbox: []
|
|
5482
5484
|
};
|
|
5483
|
-
function E(
|
|
5484
|
-
let i = D >> 24 & 255, o = D >> 16 & 255,
|
|
5485
|
-
return g = g ^
|
|
5485
|
+
function E(h, D) {
|
|
5486
|
+
let i = D >> 24 & 255, o = D >> 16 & 255, u = D >> 8 & 255, b = D & 255, g = h.sbox[0][i] + h.sbox[1][o];
|
|
5487
|
+
return g = g ^ h.sbox[2][u], g = g + h.sbox[3][b], g;
|
|
5486
5488
|
}
|
|
5487
|
-
function a(
|
|
5488
|
-
let o = D,
|
|
5489
|
+
function a(h, D, i) {
|
|
5490
|
+
let o = D, u = i, b;
|
|
5489
5491
|
for (let g = 0; g < B; ++g)
|
|
5490
|
-
o = o ^
|
|
5491
|
-
return b = o, o =
|
|
5492
|
+
o = o ^ h.pbox[g], u = E(h, o) ^ u, b = o, o = u, u = b;
|
|
5493
|
+
return b = o, o = u, u = b, u = u ^ h.pbox[B], o = o ^ h.pbox[B + 1], { left: o, right: u };
|
|
5492
5494
|
}
|
|
5493
|
-
function s(
|
|
5494
|
-
let o = D,
|
|
5495
|
+
function s(h, D, i) {
|
|
5496
|
+
let o = D, u = i, b;
|
|
5495
5497
|
for (let g = B + 1; g > 1; --g)
|
|
5496
|
-
o = o ^
|
|
5497
|
-
return b = o, o =
|
|
5498
|
+
o = o ^ h.pbox[g], u = E(h, o) ^ u, b = o, o = u, u = b;
|
|
5499
|
+
return b = o, o = u, u = b, u = u ^ h.pbox[1], o = o ^ h.pbox[0], { left: o, right: u };
|
|
5498
5500
|
}
|
|
5499
|
-
function f(
|
|
5501
|
+
function f(h, D, i) {
|
|
5500
5502
|
for (let y = 0; y < 4; y++) {
|
|
5501
|
-
|
|
5503
|
+
h.sbox[y] = [];
|
|
5502
5504
|
for (let k = 0; k < 256; k++)
|
|
5503
|
-
|
|
5505
|
+
h.sbox[y][k] = x[y][k];
|
|
5504
5506
|
}
|
|
5505
5507
|
let o = 0;
|
|
5506
5508
|
for (let y = 0; y < B + 2; y++)
|
|
5507
|
-
|
|
5508
|
-
let
|
|
5509
|
+
h.pbox[y] = C[y] ^ D[o], o++, o >= i && (o = 0);
|
|
5510
|
+
let u = 0, b = 0, g = 0;
|
|
5509
5511
|
for (let y = 0; y < B + 2; y += 2)
|
|
5510
|
-
g = a(
|
|
5512
|
+
g = a(h, u, b), u = g.left, b = g.right, h.pbox[y] = u, h.pbox[y + 1] = b;
|
|
5511
5513
|
for (let y = 0; y < 4; y++)
|
|
5512
5514
|
for (let k = 0; k < 256; k += 2)
|
|
5513
|
-
g = a(
|
|
5515
|
+
g = a(h, u, b), u = g.left, b = g.right, h.sbox[y][k] = u, h.sbox[y][k + 1] = b;
|
|
5514
5516
|
return !0;
|
|
5515
5517
|
}
|
|
5516
|
-
var
|
|
5518
|
+
var p = m.Blowfish = v.extend({
|
|
5517
5519
|
_doReset: function() {
|
|
5518
5520
|
if (this._keyPriorReset !== this._key) {
|
|
5519
|
-
var
|
|
5521
|
+
var h = this._keyPriorReset = this._key, D = h.words, i = h.sigBytes / 4;
|
|
5520
5522
|
f(n, D, i);
|
|
5521
5523
|
}
|
|
5522
5524
|
},
|
|
5523
|
-
encryptBlock: function(
|
|
5524
|
-
var i = a(n,
|
|
5525
|
-
|
|
5525
|
+
encryptBlock: function(h, D) {
|
|
5526
|
+
var i = a(n, h[D], h[D + 1]);
|
|
5527
|
+
h[D] = i.left, h[D + 1] = i.right;
|
|
5526
5528
|
},
|
|
5527
|
-
decryptBlock: function(
|
|
5528
|
-
var i = s(n,
|
|
5529
|
-
|
|
5529
|
+
decryptBlock: function(h, D) {
|
|
5530
|
+
var i = s(n, h[D], h[D + 1]);
|
|
5531
|
+
h[D] = i.left, h[D + 1] = i.right;
|
|
5530
5532
|
},
|
|
5531
5533
|
blockSize: 64 / 32,
|
|
5532
5534
|
keySize: 128 / 32,
|
|
5533
5535
|
ivSize: 64 / 32
|
|
5534
5536
|
});
|
|
5535
|
-
e.Blowfish =
|
|
5537
|
+
e.Blowfish = v._createHelper(p);
|
|
5536
5538
|
})(), t.Blowfish;
|
|
5537
5539
|
});
|
|
5538
5540
|
})(sr)), sr.exports;
|
|
5539
5541
|
}
|
|
5540
5542
|
var bx = y0.exports, Ae;
|
|
5541
5543
|
function mx() {
|
|
5542
|
-
return Ae || (Ae = 1, (function(r,
|
|
5543
|
-
(function(t, e,
|
|
5544
|
-
r.exports = e(M(),
|
|
5544
|
+
return Ae || (Ae = 1, (function(r, d) {
|
|
5545
|
+
(function(t, e, l) {
|
|
5546
|
+
r.exports = e(M(), dr(), Ft(), Dt(), s0(), _t(), c0(), ke(), Fr(), Ht(), Se(), Pt(), Wt(), Lt(), gr(), Tt(), a0(), K(), jt(), Xt(), Zt(), Qt(), Jt(), ex(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex(), Fx(), Dx());
|
|
5545
5547
|
})(bx, function(t) {
|
|
5546
5548
|
return t;
|
|
5547
5549
|
});
|
|
@@ -5562,11 +5564,11 @@ function yx() {
|
|
|
5562
5564
|
};
|
|
5563
5565
|
}
|
|
5564
5566
|
function wx(r) {
|
|
5565
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5567
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.163`;
|
|
5566
5568
|
}
|
|
5567
|
-
function kx(r,
|
|
5569
|
+
function kx(r, d) {
|
|
5568
5570
|
const t = wx(r);
|
|
5569
|
-
return new Worker(t, { type: "module", ...
|
|
5571
|
+
return new Worker(t, { type: "module", ...d });
|
|
5570
5572
|
}
|
|
5571
5573
|
const Dr = () => {
|
|
5572
5574
|
try {
|
|
@@ -5578,47 +5580,47 @@ const Dr = () => {
|
|
|
5578
5580
|
Dr();
|
|
5579
5581
|
}, Fe = (...r) => {
|
|
5580
5582
|
Dr();
|
|
5581
|
-
}, ge = /* @__PURE__ */ new Map(),
|
|
5583
|
+
}, ge = /* @__PURE__ */ new Map(), Cr = /* @__PURE__ */ new Map();
|
|
5582
5584
|
let Sx = 0;
|
|
5583
5585
|
function Hx(r) {
|
|
5584
|
-
const
|
|
5585
|
-
if (
|
|
5586
|
+
const d = ge.get(r);
|
|
5587
|
+
if (d) return d;
|
|
5586
5588
|
const t = kx("./deform.worker.ts");
|
|
5587
5589
|
try {
|
|
5588
5590
|
t.postMessage({ type: "SET_DEBUG", debugRender: Dr() });
|
|
5589
5591
|
} catch {
|
|
5590
5592
|
}
|
|
5591
|
-
t.onmessage = (
|
|
5592
|
-
const { id:
|
|
5593
|
-
m0(`[renderService] deform worker 响应 id=${
|
|
5593
|
+
t.onmessage = (l) => {
|
|
5594
|
+
const { id: v, imageBitmap: m, error: B, duration: C } = l.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5595
|
+
m0(`[renderService] deform worker 响应 id=${v}${x}`, {
|
|
5594
5596
|
hasImageBitmap: !!m,
|
|
5595
5597
|
width: m?.width,
|
|
5596
5598
|
height: m?.height,
|
|
5597
5599
|
error: B
|
|
5598
5600
|
});
|
|
5599
|
-
const n =
|
|
5601
|
+
const n = Cr.get(v);
|
|
5600
5602
|
if (n) {
|
|
5601
|
-
if (
|
|
5603
|
+
if (Cr.delete(v), B) {
|
|
5602
5604
|
n.reject(new Error(B));
|
|
5603
5605
|
return;
|
|
5604
5606
|
}
|
|
5605
5607
|
n.resolve(m);
|
|
5606
5608
|
}
|
|
5607
|
-
}, t.onerror = (
|
|
5609
|
+
}, t.onerror = (l) => {
|
|
5608
5610
|
};
|
|
5609
5611
|
const e = () => {
|
|
5610
|
-
const
|
|
5612
|
+
const l = yx();
|
|
5611
5613
|
return m0("🔍 [workerManager] 检查 License Token:", {
|
|
5612
|
-
hasToken: !!
|
|
5613
|
-
tokenPreview:
|
|
5614
|
+
hasToken: !!l.token,
|
|
5615
|
+
tokenPreview: l.token ? l.token.substring(0, 20) + "..." : "undefined",
|
|
5614
5616
|
faceId: r,
|
|
5615
5617
|
source: "licenseStore模块"
|
|
5616
|
-
}),
|
|
5618
|
+
}), l.token ? (m0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5617
5619
|
type: "SET_LICENSE",
|
|
5618
|
-
licenseToken:
|
|
5619
|
-
licenseApiUrl:
|
|
5620
|
-
deviceId:
|
|
5621
|
-
domain:
|
|
5620
|
+
licenseToken: l.token,
|
|
5621
|
+
licenseApiUrl: l.apiUrl,
|
|
5622
|
+
deviceId: l.deviceId,
|
|
5623
|
+
domain: l.domain
|
|
5622
5624
|
}), !0) : !1;
|
|
5623
5625
|
};
|
|
5624
5626
|
return e() || (m0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
@@ -5633,10 +5635,10 @@ function $x(r) {
|
|
|
5633
5635
|
type: r.type,
|
|
5634
5636
|
blendMode: r.blendMode,
|
|
5635
5637
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5636
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5637
|
-
x:
|
|
5638
|
-
y:
|
|
5639
|
-
type:
|
|
5638
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((d) => ({
|
|
5639
|
+
x: d.x,
|
|
5640
|
+
y: d.y,
|
|
5641
|
+
type: d.type
|
|
5640
5642
|
})) : [],
|
|
5641
5643
|
bounds: r.bounds ? {
|
|
5642
5644
|
width: r.bounds.width,
|
|
@@ -5659,30 +5661,30 @@ function $x(r) {
|
|
|
5659
5661
|
layerOrder: r.layerOrder,
|
|
5660
5662
|
imagePath: r.imagePath,
|
|
5661
5663
|
vectorMask: r.vectorMask ? {
|
|
5662
|
-
paths: r.vectorMask.paths?.map((
|
|
5663
|
-
open:
|
|
5664
|
-
knots:
|
|
5664
|
+
paths: r.vectorMask.paths?.map((d) => ({
|
|
5665
|
+
open: d.open,
|
|
5666
|
+
knots: d.knots?.map((t) => ({
|
|
5665
5667
|
linked: t.linked,
|
|
5666
5668
|
points: [...t.points]
|
|
5667
5669
|
})),
|
|
5668
|
-
fillRule:
|
|
5669
|
-
operation:
|
|
5670
|
+
fillRule: d.fillRule,
|
|
5671
|
+
operation: d.operation
|
|
5670
5672
|
})),
|
|
5671
|
-
points: r.vectorMask.points?.map((
|
|
5672
|
-
x:
|
|
5673
|
-
y:
|
|
5674
|
-
type:
|
|
5673
|
+
points: r.vectorMask.points?.map((d) => ({
|
|
5674
|
+
x: d.x,
|
|
5675
|
+
y: d.y,
|
|
5676
|
+
type: d.type
|
|
5675
5677
|
})),
|
|
5676
5678
|
invert: r.vectorMask.invert,
|
|
5677
5679
|
notLink: r.vectorMask.notLink,
|
|
5678
5680
|
disable: r.vectorMask.disable,
|
|
5679
5681
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5680
5682
|
} : void 0,
|
|
5681
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5682
|
-
type:
|
|
5683
|
-
enabled:
|
|
5684
|
-
filter:
|
|
5685
|
-
puppetShapeList:
|
|
5683
|
+
filterList: r.filterList ? r.filterList.map((d) => ({
|
|
5684
|
+
type: d.type,
|
|
5685
|
+
enabled: d.enabled,
|
|
5686
|
+
filter: d.filter ? {
|
|
5687
|
+
puppetShapeList: d.filter.puppetShapeList?.map((t) => ({
|
|
5686
5688
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5687
5689
|
x: e.x,
|
|
5688
5690
|
y: e.y
|
|
@@ -5699,33 +5701,33 @@ function $x(r) {
|
|
|
5699
5701
|
clipping: r.clipping
|
|
5700
5702
|
};
|
|
5701
5703
|
}
|
|
5702
|
-
function Rx(r,
|
|
5703
|
-
const
|
|
5704
|
+
function Rx(r, d, t, e) {
|
|
5705
|
+
const l = ++Sx, v = Hx(t);
|
|
5704
5706
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5705
|
-
|
|
5707
|
+
Cr.set(l, {
|
|
5706
5708
|
resolve: (x) => {
|
|
5707
5709
|
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5708
5710
|
},
|
|
5709
5711
|
reject: B
|
|
5710
5712
|
});
|
|
5711
|
-
const C = $x(
|
|
5712
|
-
|
|
5713
|
+
const C = $x(d);
|
|
5714
|
+
v.postMessage({ id: l, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5713
5715
|
r
|
|
5714
5716
|
]);
|
|
5715
5717
|
});
|
|
5716
5718
|
}
|
|
5717
|
-
async function Px(r,
|
|
5718
|
-
const m = await ut(r,
|
|
5719
|
+
async function Px(r, d, t = 0, e, l, v) {
|
|
5720
|
+
const m = await ut(r, l, v);
|
|
5719
5721
|
if (!m || m.width === 0 || m.height === 0)
|
|
5720
5722
|
throw new Error("图片无效:尺寸为 0");
|
|
5721
|
-
return await Rx(m,
|
|
5723
|
+
return await Rx(m, d, t, e);
|
|
5722
5724
|
}
|
|
5723
|
-
function l0(r,
|
|
5725
|
+
function l0(r, d) {
|
|
5724
5726
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5725
|
-
return new OffscreenCanvas(r,
|
|
5727
|
+
return new OffscreenCanvas(r, d);
|
|
5726
5728
|
if (typeof document < "u") {
|
|
5727
5729
|
const t = document.createElement("canvas");
|
|
5728
|
-
return t.width = r, t.height =
|
|
5730
|
+
return t.width = r, t.height = d, t;
|
|
5729
5731
|
} else
|
|
5730
5732
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5731
5733
|
}
|
|
@@ -5733,13 +5735,13 @@ function F0(r) {
|
|
|
5733
5735
|
return r.getContext("2d");
|
|
5734
5736
|
}
|
|
5735
5737
|
function De(r) {
|
|
5736
|
-
const
|
|
5737
|
-
if (!
|
|
5738
|
+
const d = F0(r);
|
|
5739
|
+
if (!d)
|
|
5738
5740
|
throw new Error("无法创建 canvas context");
|
|
5739
|
-
return
|
|
5741
|
+
return d;
|
|
5740
5742
|
}
|
|
5741
5743
|
async function zx(r) {
|
|
5742
|
-
const
|
|
5744
|
+
const d = performance.now(), t = () => {
|
|
5743
5745
|
try {
|
|
5744
5746
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5745
5747
|
} catch {
|
|
@@ -5747,10 +5749,10 @@ async function zx(r) {
|
|
|
5747
5749
|
return !1;
|
|
5748
5750
|
}, e = (...c) => {
|
|
5749
5751
|
t();
|
|
5750
|
-
},
|
|
5752
|
+
}, l = (...c) => {
|
|
5751
5753
|
t();
|
|
5752
5754
|
}, {
|
|
5753
|
-
psdJson:
|
|
5755
|
+
psdJson: v,
|
|
5754
5756
|
materialList: m,
|
|
5755
5757
|
fabricScreenshotList: B,
|
|
5756
5758
|
width: C,
|
|
@@ -5758,8 +5760,8 @@ async function zx(r) {
|
|
|
5758
5760
|
baseUrl: n
|
|
5759
5761
|
} = r, E = r.maxImageSize;
|
|
5760
5762
|
e("[renderByJson] 接收到的数据:", {
|
|
5761
|
-
psdJsonLayerCount:
|
|
5762
|
-
psdJsonLayers:
|
|
5763
|
+
psdJsonLayerCount: v.layerList?.length || 0,
|
|
5764
|
+
psdJsonLayers: v.layerList?.map((c) => ({
|
|
5763
5765
|
name: c.name,
|
|
5764
5766
|
type: c.type,
|
|
5765
5767
|
id: c.id,
|
|
@@ -5785,7 +5787,7 @@ async function zx(r) {
|
|
|
5785
5787
|
const _ = new URL(c, n).toString();
|
|
5786
5788
|
return !_.includes("http") && !_.startsWith("data:") && !_.startsWith("blob:") ? void 0 : _;
|
|
5787
5789
|
} catch (_) {
|
|
5788
|
-
|
|
5790
|
+
l(`[renderByJson] 解析图片 URL 失败: ${c}`, _);
|
|
5789
5791
|
return;
|
|
5790
5792
|
}
|
|
5791
5793
|
}, s = {}, f = /* @__PURE__ */ new Map();
|
|
@@ -5797,42 +5799,42 @@ async function zx(r) {
|
|
|
5797
5799
|
url: c.url
|
|
5798
5800
|
}), f.set(c.layerName, c.url));
|
|
5799
5801
|
}
|
|
5800
|
-
const
|
|
5802
|
+
const p = /* @__PURE__ */ new Map();
|
|
5801
5803
|
for (const c of B)
|
|
5802
|
-
|
|
5803
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(
|
|
5804
|
+
p.set(c.id, c.url);
|
|
5805
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", v.layerList?.map((c) => ({
|
|
5804
5806
|
name: c.name,
|
|
5805
5807
|
type: c.type,
|
|
5806
5808
|
id: c.id,
|
|
5807
5809
|
hasChildren: !!c.children,
|
|
5808
5810
|
childrenCount: c.children?.length || 0
|
|
5809
5811
|
})));
|
|
5810
|
-
function
|
|
5812
|
+
function h(c, A) {
|
|
5811
5813
|
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5812
5814
|
if (c.type === "Layer") {
|
|
5813
5815
|
if (c.imagePath) {
|
|
5814
|
-
const
|
|
5816
|
+
const W = m.find((P) => {
|
|
5815
5817
|
const L = P.sourceName || P.layerName;
|
|
5816
5818
|
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5817
5819
|
});
|
|
5818
|
-
|
|
5819
|
-
url:
|
|
5820
|
+
W && (s[c.imagePath] = {
|
|
5821
|
+
url: W.url
|
|
5820
5822
|
});
|
|
5821
5823
|
}
|
|
5822
5824
|
if (c.name) {
|
|
5823
5825
|
if (_) {
|
|
5824
|
-
const
|
|
5825
|
-
const
|
|
5826
|
-
return
|
|
5826
|
+
const W = `${_}-${c.name}`, P = m.find((L) => {
|
|
5827
|
+
const I = L.sourceName || L.layerName;
|
|
5828
|
+
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5827
5829
|
});
|
|
5828
|
-
P && (s[
|
|
5830
|
+
P && (s[W] = {
|
|
5829
5831
|
url: P.url
|
|
5830
5832
|
});
|
|
5831
5833
|
}
|
|
5832
5834
|
if (c.imagePath && c.name) {
|
|
5833
|
-
const
|
|
5834
|
-
const
|
|
5835
|
-
return
|
|
5835
|
+
const W = c.imagePath.split("/").pop() || c.imagePath, P = m.find((L) => {
|
|
5836
|
+
const I = L.sourceName || L.layerName;
|
|
5837
|
+
return I ? (I.split("/").pop() || I) === W : !1;
|
|
5836
5838
|
});
|
|
5837
5839
|
P && (s[c.imagePath] = {
|
|
5838
5840
|
url: P.url
|
|
@@ -5841,37 +5843,37 @@ async function zx(r) {
|
|
|
5841
5843
|
}
|
|
5842
5844
|
}
|
|
5843
5845
|
if (c.children)
|
|
5844
|
-
for (const
|
|
5845
|
-
|
|
5846
|
+
for (const W of c.children)
|
|
5847
|
+
W && h(W, _);
|
|
5846
5848
|
}
|
|
5847
5849
|
function D(c, A) {
|
|
5848
5850
|
const _ = c.id ?? A;
|
|
5849
5851
|
if (c.type === "Group" && _)
|
|
5850
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${
|
|
5851
|
-
const
|
|
5852
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${
|
|
5852
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${p.has(_)}`), p.has(_)) {
|
|
5853
|
+
const W = p.get(_);
|
|
5854
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${W.substring(0, 50)}...`), c.children) {
|
|
5853
5855
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5854
5856
|
for (const P of c.children)
|
|
5855
5857
|
if (P && P.isSmartObject === !0) {
|
|
5856
5858
|
const L = P?.name || "";
|
|
5857
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5859
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) : l("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5858
5860
|
}
|
|
5859
5861
|
} else
|
|
5860
|
-
|
|
5862
|
+
l(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5861
5863
|
} else
|
|
5862
5864
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5863
5865
|
if (c.children)
|
|
5864
|
-
for (const
|
|
5865
|
-
|
|
5866
|
+
for (const W of c.children)
|
|
5867
|
+
W && D(W, _);
|
|
5866
5868
|
}
|
|
5867
|
-
if (
|
|
5868
|
-
for (const c of
|
|
5869
|
-
c &&
|
|
5870
|
-
if (
|
|
5871
|
-
for (const c of
|
|
5869
|
+
if (v.layerList)
|
|
5870
|
+
for (const c of v.layerList)
|
|
5871
|
+
c && h(c);
|
|
5872
|
+
if (v.layerList)
|
|
5873
|
+
for (const c of v.layerList)
|
|
5872
5874
|
c && D(c);
|
|
5873
5875
|
const o = Je([{
|
|
5874
|
-
psdJson:
|
|
5876
|
+
psdJson: v,
|
|
5875
5877
|
layerExtrasByName: s
|
|
5876
5878
|
}], {
|
|
5877
5879
|
parts: [],
|
|
@@ -5879,37 +5881,37 @@ async function zx(r) {
|
|
|
5879
5881
|
});
|
|
5880
5882
|
if (!o.models || o.models.length === 0)
|
|
5881
5883
|
throw new Error("无法解析 JSON 数据");
|
|
5882
|
-
const
|
|
5883
|
-
if (!
|
|
5884
|
+
const u = o.models[0];
|
|
5885
|
+
if (!u.psdPartData)
|
|
5884
5886
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5885
|
-
const b =
|
|
5887
|
+
const b = u.width, g = u.height, y = l0(b, g), k = De(y), R = [], F = (c) => {
|
|
5886
5888
|
if (c.url && s[c.url])
|
|
5887
5889
|
return s[c.url];
|
|
5888
5890
|
if (c.url) {
|
|
5889
5891
|
const A = c.url.split("/").pop() || c.url;
|
|
5890
5892
|
if (s[A])
|
|
5891
5893
|
return s[A];
|
|
5892
|
-
const _ = m.find((
|
|
5893
|
-
const P =
|
|
5894
|
+
const _ = m.find((W) => {
|
|
5895
|
+
const P = W.sourceName || W.layerName;
|
|
5894
5896
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5895
5897
|
});
|
|
5896
5898
|
if (_) {
|
|
5897
|
-
const
|
|
5898
|
-
if (
|
|
5899
|
-
return s[
|
|
5899
|
+
const W = _.sourceName || _.layerName;
|
|
5900
|
+
if (W)
|
|
5901
|
+
return s[W] || { url: _.url };
|
|
5900
5902
|
}
|
|
5901
5903
|
}
|
|
5902
5904
|
};
|
|
5903
|
-
for (let c = 0; c <
|
|
5904
|
-
const A =
|
|
5905
|
+
for (let c = 0; c < u.psdPartData.length; c++) {
|
|
5906
|
+
const A = u.psdPartData[c], _ = F(A);
|
|
5905
5907
|
if (A.type === g0.Layer) {
|
|
5906
5908
|
if (!_ || !_.url) {
|
|
5907
|
-
|
|
5909
|
+
l(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5908
5910
|
continue;
|
|
5909
5911
|
}
|
|
5910
|
-
const
|
|
5912
|
+
const W = _.url, P = a(W);
|
|
5911
5913
|
if (!P) {
|
|
5912
|
-
|
|
5914
|
+
l(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5913
5915
|
continue;
|
|
5914
5916
|
}
|
|
5915
5917
|
R.push({
|
|
@@ -5921,48 +5923,48 @@ async function zx(r) {
|
|
|
5921
5923
|
} else if (A.type === g0.Group) {
|
|
5922
5924
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5923
5925
|
continue;
|
|
5924
|
-
for (let
|
|
5925
|
-
const P = A.smartObjects[
|
|
5926
|
+
for (let W = 0; W < A.smartObjects.length; W++) {
|
|
5927
|
+
const P = A.smartObjects[W];
|
|
5926
5928
|
if (!P || !P.name)
|
|
5927
5929
|
continue;
|
|
5928
5930
|
let L = s[P.name] ?? _;
|
|
5929
5931
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5930
|
-
const
|
|
5931
|
-
if (L = s[
|
|
5932
|
+
const X = P.imagePath.split("/").pop() || P.imagePath;
|
|
5933
|
+
if (L = s[X], !L) {
|
|
5932
5934
|
const G = m.find((Z) => {
|
|
5933
5935
|
const r0 = Z.sourceName || Z.layerName;
|
|
5934
|
-
return !r0 || !P.imagePath ? !1 : (r0.split("/").pop() || r0) ===
|
|
5936
|
+
return !r0 || !P.imagePath ? !1 : (r0.split("/").pop() || r0) === X || r0 === P.imagePath || r0.endsWith(P.imagePath) || P.imagePath.endsWith(r0);
|
|
5935
5937
|
});
|
|
5936
5938
|
G && (L = { url: G.url });
|
|
5937
5939
|
}
|
|
5938
5940
|
}
|
|
5939
5941
|
if (!L || !L.designImage && !L.url)
|
|
5940
5942
|
continue;
|
|
5941
|
-
let
|
|
5942
|
-
if (!
|
|
5943
|
+
let I = L.designImage ?? L.url;
|
|
5944
|
+
if (!I)
|
|
5943
5945
|
continue;
|
|
5944
|
-
if (typeof
|
|
5945
|
-
/^(https?:)?\/\//i.test(
|
|
5946
|
-
const G = a(
|
|
5946
|
+
if (typeof I == "string") {
|
|
5947
|
+
/^(https?:)?\/\//i.test(I) || I.startsWith("data:") || I.startsWith("blob:") || (I = f.get(I) ?? I);
|
|
5948
|
+
const G = a(I);
|
|
5947
5949
|
if (!G)
|
|
5948
5950
|
continue;
|
|
5949
|
-
|
|
5951
|
+
I = G;
|
|
5950
5952
|
}
|
|
5951
|
-
const Y = (A.partId ?? A.id) * 100 +
|
|
5953
|
+
const Y = (A.partId ?? A.id) * 100 + W, Q = et(rt(P)), o0 = { width: b, height: g };
|
|
5952
5954
|
R.push({
|
|
5953
|
-
index: c +
|
|
5955
|
+
index: c + W * 0.01,
|
|
5954
5956
|
type: "group",
|
|
5955
5957
|
partData: A,
|
|
5956
5958
|
smartObject: P,
|
|
5957
5959
|
maskData: Q,
|
|
5958
5960
|
promise: Px(
|
|
5959
|
-
|
|
5961
|
+
I,
|
|
5960
5962
|
P,
|
|
5961
5963
|
Y,
|
|
5962
5964
|
o0,
|
|
5963
5965
|
E,
|
|
5964
5966
|
n
|
|
5965
|
-
).catch((
|
|
5967
|
+
).catch((X) => null)
|
|
5966
5968
|
});
|
|
5967
5969
|
}
|
|
5968
5970
|
}
|
|
@@ -5971,42 +5973,42 @@ async function zx(r) {
|
|
|
5971
5973
|
task: c,
|
|
5972
5974
|
imageBitmap: w[A]
|
|
5973
5975
|
})).sort((c, A) => {
|
|
5974
|
-
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index,
|
|
5975
|
-
return _ -
|
|
5976
|
+
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, W = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
5977
|
+
return _ - W;
|
|
5976
5978
|
});
|
|
5977
5979
|
let $ = l0(b, g), z = F0($), O = !1, q = "normal";
|
|
5978
5980
|
for (let c = 0; c < H.length; c++) {
|
|
5979
5981
|
const { task: A, imageBitmap: _ } = H[c];
|
|
5980
5982
|
if (!_) {
|
|
5981
|
-
|
|
5983
|
+
l(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5982
5984
|
continue;
|
|
5983
5985
|
}
|
|
5984
|
-
const { partData:
|
|
5986
|
+
const { partData: W } = A, P = W.bounds;
|
|
5985
5987
|
let L;
|
|
5986
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
5987
|
-
let
|
|
5988
|
-
A.type === "group" && A.smartObject ?
|
|
5988
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
5989
|
+
let I;
|
|
5990
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? W.clipping === !0 : I = W.clipping === !0;
|
|
5989
5991
|
const Y = H[c + 1];
|
|
5990
5992
|
let Q = !1;
|
|
5991
5993
|
if (Y) {
|
|
5992
|
-
const
|
|
5993
|
-
Y.task.type === "group" && Y.task.smartObject ? Q = Y.task.smartObject.clipping ??
|
|
5994
|
+
const X = Y.task.partData;
|
|
5995
|
+
Y.task.type === "group" && Y.task.smartObject ? Q = Y.task.smartObject.clipping ?? X.clipping === !0 : Q = X.clipping === !0;
|
|
5994
5996
|
}
|
|
5995
|
-
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
5997
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
5996
5998
|
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
5997
5999
|
type: A.type,
|
|
5998
6000
|
bitmapSize: { width: _.width, height: _.height },
|
|
5999
6001
|
bounds: P,
|
|
6000
6002
|
hasMask: !!A.maskData,
|
|
6001
|
-
blendMode:
|
|
6003
|
+
blendMode: W.blendMode,
|
|
6002
6004
|
opacity: L,
|
|
6003
|
-
clipping:
|
|
6004
|
-
}), !
|
|
6005
|
-
if (O = !0, q =
|
|
6005
|
+
clipping: I
|
|
6006
|
+
}), !I && Q) {
|
|
6007
|
+
if (O = !0, q = W.blendMode || "normal", z) {
|
|
6006
6008
|
if (z.clearRect(0, 0, b, g), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6007
6009
|
if (A.maskData) {
|
|
6008
|
-
const
|
|
6009
|
-
G && (G.drawImage(_, 0, 0),
|
|
6010
|
+
const X = l0(b, g), G = F0(X);
|
|
6011
|
+
G && (G.drawImage(_, 0, 0), hr(G, A.maskData), z.drawImage(X, 0, 0));
|
|
6010
6012
|
} else
|
|
6011
6013
|
z.drawImage(_, 0, 0);
|
|
6012
6014
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6018,12 +6020,12 @@ async function zx(r) {
|
|
|
6018
6020
|
) : z.drawImage(_, 0, 0));
|
|
6019
6021
|
z.globalAlpha = 1;
|
|
6020
6022
|
}
|
|
6021
|
-
} else if (
|
|
6023
|
+
} else if (I) {
|
|
6022
6024
|
if (z) {
|
|
6023
6025
|
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6024
6026
|
if (A.maskData) {
|
|
6025
|
-
const
|
|
6026
|
-
G && (G.drawImage(_, 0, 0),
|
|
6027
|
+
const X = l0(b, g), G = F0(X);
|
|
6028
|
+
G && (G.drawImage(_, 0, 0), hr(G, A.maskData), z.drawImage(X, 0, 0));
|
|
6027
6029
|
} else
|
|
6028
6030
|
z.drawImage(_, 0, 0);
|
|
6029
6031
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6036,10 +6038,10 @@ async function zx(r) {
|
|
|
6036
6038
|
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6037
6039
|
}
|
|
6038
6040
|
} else {
|
|
6039
|
-
if (k.globalCompositeOperation = Lr(
|
|
6041
|
+
if (k.globalCompositeOperation = Lr(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6040
6042
|
if (A.maskData) {
|
|
6041
|
-
const
|
|
6042
|
-
G && (G.drawImage(_, 0, 0),
|
|
6043
|
+
const X = l0(b, g), G = F0(X);
|
|
6044
|
+
G && (G.drawImage(_, 0, 0), hr(G, A.maskData), k.drawImage(X, 0, 0));
|
|
6043
6045
|
} else
|
|
6044
6046
|
k.drawImage(_, 0, 0);
|
|
6045
6047
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6069,7 +6071,7 @@ async function zx(r) {
|
|
|
6069
6071
|
const c = De(U);
|
|
6070
6072
|
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b, g, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${g} -> ${T}x${N}`);
|
|
6071
6073
|
}
|
|
6072
|
-
const S = performance.now() -
|
|
6074
|
+
const S = performance.now() - d;
|
|
6073
6075
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6074
6076
|
canvas: U,
|
|
6075
6077
|
width: T,
|
|
@@ -6080,38 +6082,38 @@ const ze = async (r) => {
|
|
|
6080
6082
|
const t = (await zx(r)).canvas;
|
|
6081
6083
|
return t ? createImageBitmap(t) : null;
|
|
6082
6084
|
};
|
|
6083
|
-
let i0 = null,
|
|
6084
|
-
const
|
|
6085
|
-
if (!
|
|
6086
|
-
|
|
6085
|
+
let i0 = null, pr = !1;
|
|
6086
|
+
const We = async () => {
|
|
6087
|
+
if (!pr) {
|
|
6088
|
+
pr = !0;
|
|
6087
6089
|
try {
|
|
6088
6090
|
for (; i0; ) {
|
|
6089
6091
|
const r = i0;
|
|
6090
6092
|
i0 = null;
|
|
6091
6093
|
try {
|
|
6092
|
-
const
|
|
6094
|
+
const d = await ze(r.renderData);
|
|
6093
6095
|
if (i0) {
|
|
6094
|
-
|
|
6096
|
+
d?.close?.();
|
|
6095
6097
|
continue;
|
|
6096
6098
|
}
|
|
6097
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6098
|
-
} catch (
|
|
6099
|
+
self.postMessage({ id: r.id, bitmap: d }, d ? [d] : []);
|
|
6100
|
+
} catch (d) {
|
|
6099
6101
|
if (i0) continue;
|
|
6100
6102
|
self.postMessage({
|
|
6101
6103
|
id: r.id,
|
|
6102
|
-
error:
|
|
6104
|
+
error: d instanceof Error ? d.message : String(d)
|
|
6103
6105
|
});
|
|
6104
6106
|
}
|
|
6105
6107
|
}
|
|
6106
6108
|
} finally {
|
|
6107
|
-
|
|
6109
|
+
pr = !1, i0 && We();
|
|
6108
6110
|
}
|
|
6109
6111
|
}
|
|
6110
6112
|
};
|
|
6111
6113
|
self.onmessage = async (r) => {
|
|
6112
|
-
const
|
|
6113
|
-
if (
|
|
6114
|
-
const e =
|
|
6114
|
+
const d = r.data;
|
|
6115
|
+
if (d && typeof d == "object" && "type" in d && d.type === "SET_LICENSE") {
|
|
6116
|
+
const e = d;
|
|
6115
6117
|
_x({
|
|
6116
6118
|
token: e.licenseToken,
|
|
6117
6119
|
apiUrl: e.licenseApiUrl,
|
|
@@ -6120,9 +6122,9 @@ self.onmessage = async (r) => {
|
|
|
6120
6122
|
});
|
|
6121
6123
|
return;
|
|
6122
6124
|
}
|
|
6123
|
-
const t =
|
|
6125
|
+
const t = d;
|
|
6124
6126
|
if (t.coalesce === !0) {
|
|
6125
|
-
i0 = { id: t.id, renderData: t.renderData },
|
|
6127
|
+
i0 = { id: t.id, renderData: t.renderData }, We();
|
|
6126
6128
|
return;
|
|
6127
6129
|
}
|
|
6128
6130
|
try {
|