@jieyin/editor-sdk 1.1.138 → 1.1.140
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 +4962 -4820
- package/dist/renderWorker.js +573 -572
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var F0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(F0 || {});
|
|
2
2
|
function Ge(r) {
|
|
3
|
-
let
|
|
3
|
+
let p = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = p;
|
|
6
|
+
return p += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ke(r, p) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,19 +23,19 @@ function Xe(r, v) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? p,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let u = r.name || "",
|
|
34
|
-
if (r.type === "Group" && m === void 0 && (!
|
|
35
|
-
const x = r.children[0].name, n =
|
|
36
|
-
(E !== void 0 || n?.id !== void 0) && (u = x,
|
|
32
|
+
function Xe(r, p, t, e) {
|
|
33
|
+
let u = r.name || "", h = p[u], m = h?.partId ?? (r.type === "Group" ? t.get(u) : void 0);
|
|
34
|
+
if (r.type === "Group" && m === void 0 && (!h || h.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
+
const x = r.children[0].name, n = p[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (u = x, h = n, m = E);
|
|
37
37
|
}
|
|
38
|
-
const B = r.id ??
|
|
38
|
+
const B = r.id ?? h?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
41
|
id: B,
|
|
@@ -45,13 +45,13 @@ function Ke(r, v, t, e) {
|
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: F0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => Ke(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
52
52
|
layerOrder: r.layerOrder
|
|
53
53
|
};
|
|
54
|
-
let C =
|
|
54
|
+
let C = h?.url;
|
|
55
55
|
return !C && r.imagePath && (C = r.imagePath), {
|
|
56
56
|
id: B,
|
|
57
57
|
name: r.name || "",
|
|
@@ -64,19 +64,19 @@ function Ke(r, v, t, e) {
|
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function Ye(r,
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function Ye(r, p) {
|
|
68
|
+
const t = new Map(p.parts.map((u) => [u.name, u.id])), e = Ge(p.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
70
|
+
parts: p.parts,
|
|
71
71
|
models: r.map((u) => {
|
|
72
|
-
const
|
|
72
|
+
const h = u.layerExtrasByName ?? {}, m = u.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 l = [], g = [], i = [...
|
|
77
|
+
for (const v of s)
|
|
78
|
+
if (v.type === "Group" && v.children) {
|
|
79
|
+
const l = [], g = [], i = [...v.children].sort((o, d) => {
|
|
80
80
|
const b = o.layerOrder ?? 0, D = d.layerOrder ?? 0;
|
|
81
81
|
return b - D;
|
|
82
82
|
});
|
|
@@ -87,14 +87,14 @@ function Ye(r, v) {
|
|
|
87
87
|
f.push(...o);
|
|
88
88
|
}
|
|
89
89
|
l.length > 0 && f.push({
|
|
90
|
-
...
|
|
90
|
+
...v,
|
|
91
91
|
children: l
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
|
-
f.push(
|
|
94
|
+
f.push(v);
|
|
95
95
|
return f;
|
|
96
96
|
}, a = n(B).map(
|
|
97
|
-
(s) =>
|
|
97
|
+
(s) => Xe(s, h, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -110,44 +110,44 @@ function Ze(r) {
|
|
|
110
110
|
function Qe(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((p) => ({
|
|
114
|
+
open: !!p.open,
|
|
115
|
+
knots: p.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((p) => ({
|
|
123
|
+
x: p.x,
|
|
124
|
+
y: p.y,
|
|
125
|
+
type: p.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function lr(r, p) {
|
|
130
|
+
if (p) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), p.type === "bezier" && Array.isArray(p.paths))
|
|
132
|
+
p.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
135
|
const u = e[0];
|
|
136
136
|
r.moveTo(u.points[2], u.points[3]);
|
|
137
|
-
for (let
|
|
138
|
-
const m = e[
|
|
139
|
-
let B = (
|
|
140
|
-
if (!t.open &&
|
|
137
|
+
for (let h = 0; h < e.length; h++) {
|
|
138
|
+
const m = e[h];
|
|
139
|
+
let B = (h + 1) % e.length;
|
|
140
|
+
if (!t.open && h === e.length - 1)
|
|
141
141
|
B = 0;
|
|
142
|
-
else if (t.open &&
|
|
142
|
+
else if (t.open && h === 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 (p.type === "simple" && Array.isArray(p.points)) {
|
|
150
|
+
const t = p.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 h0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(p) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(p);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class h0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(p, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(p, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class h0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(p) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(p), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -251,10 +251,10 @@ class l0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(p) {
|
|
255
255
|
try {
|
|
256
256
|
const t = cr.getOrigin();
|
|
257
|
-
return new URL(
|
|
257
|
+
return new URL(p, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,205 +262,206 @@ class l0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const u = this.parse(
|
|
267
|
-
return !u || u.searchParams.has(t) ?
|
|
265
|
+
static addParam(p, t, e) {
|
|
266
|
+
const u = this.parse(p);
|
|
267
|
+
return !u || u.searchParams.has(t) ? p : (u.searchParams.set(t, e), this.formatUrl(p, u));
|
|
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(p, t) {
|
|
273
|
+
const e = this.parse(p);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? p : (e.searchParams.delete(t), this.formatUrl(p, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(p, t) {
|
|
280
|
+
return this.parse(p)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
285
|
+
static formatUrl(p, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(p), u = p.startsWith("//");
|
|
287
287
|
return e ? t.toString() : u ? 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(p) {
|
|
293
|
+
return p?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(p) {
|
|
299
|
+
return p?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
(function(r, v) {
|
|
307
|
-
const t = pr, e = r();
|
|
302
|
+
const J = fr;
|
|
303
|
+
(function(r, p) {
|
|
304
|
+
const t = fr, e = r();
|
|
308
305
|
for (; ; )
|
|
309
306
|
try {
|
|
310
|
-
if (parseInt(t(
|
|
307
|
+
if (parseInt(t(261)) / 1 + -parseInt(t(248)) / 2 * (parseInt(t(262)) / 3) + -parseInt(t(253)) / 4 + parseInt(t(244)) / 5 + -parseInt(t(251)) / 6 + -parseInt(t(249)) / 7 + -parseInt(t(265)) / 8 * (-parseInt(t(278)) / 9) === p) break;
|
|
311
308
|
e.push(e.shift());
|
|
312
309
|
} catch {
|
|
313
310
|
e.push(e.shift());
|
|
314
311
|
}
|
|
315
|
-
})(sr,
|
|
312
|
+
})(sr, -375091 * 1 + -226215 + -1036687 * -1);
|
|
313
|
+
function fr(r, p) {
|
|
314
|
+
return r = r - 237, sr()[r];
|
|
315
|
+
}
|
|
316
316
|
const E0 = /* @__PURE__ */ (function() {
|
|
317
317
|
let r = !0;
|
|
318
|
-
return function(
|
|
318
|
+
return function(p, t) {
|
|
319
319
|
const e = r ? function() {
|
|
320
|
+
const u = fr;
|
|
320
321
|
if (t) {
|
|
321
|
-
const
|
|
322
|
-
return t = null,
|
|
322
|
+
const h = t[u(260)](p, arguments);
|
|
323
|
+
return t = null, h;
|
|
323
324
|
}
|
|
324
325
|
} : function() {
|
|
325
326
|
};
|
|
326
327
|
return r = !1, e;
|
|
327
328
|
};
|
|
328
329
|
})(), Ve = E0(void 0, function() {
|
|
329
|
-
const r =
|
|
330
|
-
let
|
|
330
|
+
const r = fr;
|
|
331
|
+
let p;
|
|
331
332
|
try {
|
|
332
|
-
|
|
333
|
+
p = Function("retur" + r(267) + "nction() " + (r(277) + 'nstructor("retu' + r(242) + 'is")( )') + ");")();
|
|
333
334
|
} catch {
|
|
334
|
-
|
|
335
|
+
p = window;
|
|
335
336
|
}
|
|
336
|
-
const t =
|
|
337
|
-
for (let u =
|
|
338
|
-
const
|
|
339
|
-
|
|
337
|
+
const t = p[r(243) + "le"] = p.console || {}, e = [r(258), "warn", r(241), "error", r(271) + "tion", r(266), "trace"];
|
|
338
|
+
for (let u = 641 + -5 * 503 + 1874; u < e[r(269) + "h"]; u++) {
|
|
339
|
+
const h = E0.constructor["proto" + r(254)][r(276)](E0), m = e[u], B = t[m] || h;
|
|
340
|
+
h.__proto__ = E0.bind(E0), h["toStr" + r(255)] = B.toString.bind(B), t[m] = h;
|
|
340
341
|
}
|
|
341
342
|
});
|
|
342
|
-
function sr() {
|
|
343
|
-
const r = ["3358224NRjIjI", "tion", "rn th", "1635330XzCSmU", "fetch", "bind", "code", "token", "excep", "n() ", "numbe", "2066562ogUaUf", "setIt", "oken", "hasPa", "okenR", "toStr", "file_", "ame", "300335GeNmcH", "log", "5msyuLc", "addPa", "/file", "5357320unkcjt", "statu", "7811192rpelYT", "249246duEcXV", "warn", '"retu', "conso", "fileT"];
|
|
344
|
-
return sr = function() {
|
|
345
|
-
return r;
|
|
346
|
-
}, sr();
|
|
347
|
-
}
|
|
348
343
|
Ve();
|
|
349
|
-
const Br =
|
|
350
|
-
function
|
|
344
|
+
const Br = "file_" + J(259), Cr = J(275) + J(259) + J(240) + "re_time", Je = (-29 * -344 + 1734 + -11650) * (-3502 + 4 * 2417 + -5166);
|
|
345
|
+
function vr() {
|
|
351
346
|
return h0.getItem(Br);
|
|
352
347
|
}
|
|
353
348
|
function rt(r = Je) {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
349
|
+
const p = J;
|
|
350
|
+
if (!vr()) return !0;
|
|
351
|
+
const e = h0[p(250) + "em"](Cr);
|
|
352
|
+
if (!e) return !1;
|
|
353
|
+
const u = Number(e);
|
|
354
|
+
return Date.now() + r > u;
|
|
359
355
|
}
|
|
360
|
-
function et(r,
|
|
361
|
-
const t =
|
|
362
|
-
if (h0
|
|
363
|
-
const e = Date.now() +
|
|
364
|
-
h0
|
|
356
|
+
function et(r, p) {
|
|
357
|
+
const t = J;
|
|
358
|
+
if (h0.setItem(Br, r), typeof p == "number" && p > 9696 + 21 * -407 + 1149 * -1) {
|
|
359
|
+
const e = Date.now() + p * 1e3;
|
|
360
|
+
h0[t(252) + "em"](Cr, String(e));
|
|
365
361
|
}
|
|
366
362
|
}
|
|
363
|
+
function sr() {
|
|
364
|
+
const r = ["data", "parse", "file_", "bind", "{}.co", "36DcOfeM", "statu", "FileT", "inclu", "_expi", "info", "rn th", "conso", "1521640SakjwV", "isBro", "oken=", "oken", "2EqLTaR", "2210033aumEWg", "getIt", "1309686DPOtHU", "setIt", "2291092jkaMJy", "type", "ing", "efres", "ePara", "log", "token", "apply", "390883RpgaSg", "62043daVSzW", "fileT", "addPa", "1735248IQjfyV", "table", "n (fu", "remov", "lengt", "pathn", "excep", "ram"];
|
|
365
|
+
return sr = function() {
|
|
366
|
+
return r;
|
|
367
|
+
}, sr();
|
|
368
|
+
}
|
|
367
369
|
function tt() {
|
|
368
|
-
h0
|
|
370
|
+
h0[J(268) + "eItem"](Br), h0.removeItem(Cr);
|
|
369
371
|
}
|
|
370
372
|
async function Pr(r) {
|
|
371
|
-
const
|
|
372
|
-
return t?.data?.
|
|
373
|
+
const p = J, t = await r(), e = t?.data?.[p(273)];
|
|
374
|
+
return t?.data?.code === 200 && e?.[p(275) + "token"] ? (et(e[p(275) + "token"], e.expires_in), e.file_token) : null;
|
|
373
375
|
}
|
|
374
376
|
let xt = null;
|
|
375
|
-
function
|
|
377
|
+
function Wr() {
|
|
376
378
|
return cr.isBrowser() ? xt : null;
|
|
377
379
|
}
|
|
378
380
|
async function De() {
|
|
379
|
-
const r =
|
|
380
|
-
if (!cr
|
|
381
|
-
const
|
|
382
|
-
if (
|
|
381
|
+
const r = J;
|
|
382
|
+
if (!cr[r(245) + "wser"]()) return vr();
|
|
383
|
+
const p = vr();
|
|
384
|
+
if (p && !rt()) return p;
|
|
383
385
|
try {
|
|
384
|
-
const t = await
|
|
385
|
-
if (
|
|
386
|
-
const e = await Pr(t["
|
|
386
|
+
const t = await Wr();
|
|
387
|
+
if (p && t?.["fetchFileTokenR" + r(256) + "h"]) {
|
|
388
|
+
const e = await Pr(t["fetch" + r(238) + "okenRefresh"]);
|
|
387
389
|
if (e) return e;
|
|
388
390
|
}
|
|
389
391
|
} catch {
|
|
390
392
|
}
|
|
391
393
|
try {
|
|
392
|
-
const t =
|
|
393
|
-
return t?.[
|
|
394
|
+
const t = Wr();
|
|
395
|
+
return t?.["fetchFileToken"] ? await Pr(t["fetchFileT" + r(247)]) : null;
|
|
394
396
|
} catch {
|
|
395
397
|
return null;
|
|
396
398
|
}
|
|
397
399
|
}
|
|
398
400
|
function ge(r) {
|
|
399
|
-
const
|
|
401
|
+
const p = J;
|
|
400
402
|
if (!r || l0.isDataUrl(r) || l0.isBlobUrl(r)) return !1;
|
|
401
|
-
const t = l0
|
|
402
|
-
return t ? t[
|
|
403
|
+
const t = l0[p(274)](r);
|
|
404
|
+
return t ? t[p(270) + "ame"].includes("/files/") && !l0["hasPa" + p(272)](r, "fileToken") : r.includes("/files/") && !r[p(239) + "des"]("fileT" + p(246));
|
|
403
405
|
}
|
|
404
|
-
function be(r,
|
|
405
|
-
const t =
|
|
406
|
-
return !
|
|
406
|
+
function be(r, p) {
|
|
407
|
+
const t = J;
|
|
408
|
+
return !p || !ge(r) ? r : l0[t(264) + "ram"](r, t(263) + "oken", p);
|
|
407
409
|
}
|
|
408
410
|
function nt(r) {
|
|
409
|
-
|
|
410
|
-
return l0.removeParam(r, "fileT" + v(266));
|
|
411
|
+
return l0["remov" + J(257) + "m"](r, "fileToken");
|
|
411
412
|
}
|
|
412
413
|
async function at(r) {
|
|
413
414
|
if (!ge(r)) return r;
|
|
414
|
-
const
|
|
415
|
-
return be(r,
|
|
415
|
+
const p = await De();
|
|
416
|
+
return be(r, p);
|
|
416
417
|
}
|
|
417
|
-
async function me(r,
|
|
418
|
-
const t =
|
|
419
|
-
if (!cr
|
|
420
|
-
const e = nt(r), u = await at(e),
|
|
421
|
-
if (
|
|
418
|
+
async function me(r, p) {
|
|
419
|
+
const t = J;
|
|
420
|
+
if (!cr[t(245) + "wser"]()) return fetch(r, p);
|
|
421
|
+
const e = nt(r), u = await at(e), h = await fetch(u, p);
|
|
422
|
+
if (h[t(237) + "s"] !== 401) return h;
|
|
422
423
|
tt();
|
|
423
424
|
const m = await De(), B = be(e, m);
|
|
424
|
-
return fetch(B,
|
|
425
|
+
return fetch(B, p);
|
|
425
426
|
}
|
|
426
|
-
const _e = (r,
|
|
427
|
+
const _e = (r, p) => {
|
|
427
428
|
if (!r) return r;
|
|
428
|
-
const t = (
|
|
429
|
+
const t = (p || "").replace(/\/$/, "");
|
|
429
430
|
if (t && r.startsWith(t))
|
|
430
431
|
return r;
|
|
431
432
|
if (typeof window < "u") {
|
|
432
433
|
const u = window.location.hostname;
|
|
433
434
|
if (u === "localhost" || u === "127.0.0.1")
|
|
434
435
|
try {
|
|
435
|
-
const
|
|
436
|
+
const h = new URL(r);
|
|
436
437
|
if (t)
|
|
437
438
|
try {
|
|
438
439
|
const m = new URL(t).origin;
|
|
439
|
-
if (
|
|
440
|
+
if (h.origin === m)
|
|
440
441
|
return r;
|
|
441
442
|
} catch {
|
|
442
443
|
}
|
|
443
|
-
if (
|
|
444
|
-
return t ? `${t}${
|
|
444
|
+
if (h.pathname.startsWith("/files/"))
|
|
445
|
+
return t ? `${t}${h.pathname}${h.search}${h.hash}` : `${h.pathname}${h.search}${h.hash}`;
|
|
445
446
|
} catch {
|
|
446
447
|
}
|
|
447
448
|
}
|
|
448
449
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
449
450
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
450
451
|
return e ? `/oss${e[2]}` : r;
|
|
451
|
-
}, ot = (r,
|
|
452
|
+
}, ot = (r, p) => {
|
|
452
453
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
453
|
-
return new OffscreenCanvas(r,
|
|
454
|
+
return new OffscreenCanvas(r, p);
|
|
454
455
|
const t = document.createElement("canvas");
|
|
455
|
-
return t.width = r, t.height =
|
|
456
|
-
}, m0 = async (r,
|
|
457
|
-
if (!
|
|
456
|
+
return t.width = r, t.height = p, t;
|
|
457
|
+
}, m0 = async (r, p) => {
|
|
458
|
+
if (!p || p <= 0) return r;
|
|
458
459
|
const t = Math.max(r.width, r.height);
|
|
459
|
-
if (t <=
|
|
460
|
-
const e =
|
|
461
|
-
return B ? (B.drawImage(r, 0, 0, u,
|
|
460
|
+
if (t <= p) return r;
|
|
461
|
+
const e = p / t, u = Math.max(1, Math.round(r.width * e)), h = Math.max(1, Math.round(r.height * e)), m = ot(u, h), B = m.getContext("2d");
|
|
462
|
+
return B ? (B.drawImage(r, 0, 0, u, h), r.close?.(), await createImageBitmap(m)) : r;
|
|
462
463
|
};
|
|
463
|
-
async function it(r,
|
|
464
|
+
async function it(r, p, t) {
|
|
464
465
|
if (typeof r == "string")
|
|
465
466
|
try {
|
|
466
467
|
const e = _e(r, t), u = await me(e);
|
|
@@ -468,12 +469,12 @@ async function it(r, v, t) {
|
|
|
468
469
|
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
469
470
|
throw new Error(m);
|
|
470
471
|
}
|
|
471
|
-
const
|
|
472
|
-
if (!
|
|
472
|
+
const h = await u.blob();
|
|
473
|
+
if (!h.type.startsWith("image/") && h.size === 0)
|
|
473
474
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
474
475
|
try {
|
|
475
|
-
const m = await createImageBitmap(
|
|
476
|
-
return await m0(m,
|
|
476
|
+
const m = await createImageBitmap(h);
|
|
477
|
+
return await m0(m, p);
|
|
477
478
|
} catch (m) {
|
|
478
479
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
479
480
|
}
|
|
@@ -487,7 +488,7 @@ async function it(r, v, t) {
|
|
|
487
488
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
488
489
|
try {
|
|
489
490
|
const e = await createImageBitmap(r);
|
|
490
|
-
return await m0(e,
|
|
491
|
+
return await m0(e, p);
|
|
491
492
|
} catch (e) {
|
|
492
493
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
493
494
|
}
|
|
@@ -495,23 +496,23 @@ async function it(r, v, t) {
|
|
|
495
496
|
if (r instanceof ImageBitmap) {
|
|
496
497
|
if (r.width === 0 || r.height === 0)
|
|
497
498
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
498
|
-
return await m0(r,
|
|
499
|
+
return await m0(r, p);
|
|
499
500
|
}
|
|
500
501
|
throw new Error("不支持的图片类型");
|
|
501
502
|
}
|
|
502
|
-
async function st(r,
|
|
503
|
+
async function st(r, p, t) {
|
|
503
504
|
try {
|
|
504
505
|
const e = _e(r, t), u = await me(e);
|
|
505
506
|
if (!u.ok) {
|
|
506
507
|
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
507
508
|
throw new Error(m);
|
|
508
509
|
}
|
|
509
|
-
const
|
|
510
|
-
if (!
|
|
510
|
+
const h = await u.blob();
|
|
511
|
+
if (!h.type.startsWith("image/") && h.size === 0)
|
|
511
512
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
512
513
|
try {
|
|
513
|
-
const m = await createImageBitmap(
|
|
514
|
-
return await m0(m,
|
|
514
|
+
const m = await createImageBitmap(h);
|
|
515
|
+
return await m0(m, p);
|
|
515
516
|
} catch (m) {
|
|
516
517
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
517
518
|
}
|
|
@@ -519,9 +520,9 @@ async function st(r, v, t) {
|
|
|
519
520
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
520
521
|
}
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
+
function zr(r) {
|
|
523
524
|
if (!r) return "source-over";
|
|
524
|
-
const
|
|
525
|
+
const p = r.trim().toLowerCase();
|
|
525
526
|
return {
|
|
526
527
|
normal: "source-over",
|
|
527
528
|
multiply: "multiply",
|
|
@@ -547,22 +548,22 @@ function Wr(r) {
|
|
|
547
548
|
"linear dodge": "lighter",
|
|
548
549
|
lighter: "lighter",
|
|
549
550
|
"pass-through": "source-over"
|
|
550
|
-
}[
|
|
551
|
+
}[p] || "source-over";
|
|
551
552
|
}
|
|
552
|
-
var
|
|
553
|
+
var hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
553
554
|
function ct(r) {
|
|
554
555
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
555
|
-
var
|
|
556
|
-
if (typeof
|
|
556
|
+
var p = r.default;
|
|
557
|
+
if (typeof p == "function") {
|
|
557
558
|
var t = function e() {
|
|
558
559
|
var u = !1;
|
|
559
560
|
try {
|
|
560
561
|
u = this instanceof e;
|
|
561
562
|
} catch {
|
|
562
563
|
}
|
|
563
|
-
return u ? Reflect.construct(
|
|
564
|
+
return u ? Reflect.construct(p, arguments, this.constructor) : p.apply(this, arguments);
|
|
564
565
|
};
|
|
565
|
-
t.prototype =
|
|
566
|
+
t.prototype = p.prototype;
|
|
566
567
|
} else t = {};
|
|
567
568
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
568
569
|
var u = Object.getOwnPropertyDescriptor(r, e);
|
|
@@ -583,27 +584,27 @@ var y0 = { exports: {} }, ut = {}, dt = /* @__PURE__ */ Object.freeze({
|
|
|
583
584
|
default: ut
|
|
584
585
|
}), lt = /* @__PURE__ */ ct(dt), ht = y0.exports, Ir;
|
|
585
586
|
function M() {
|
|
586
|
-
return Ir || (Ir = 1, (function(r,
|
|
587
|
+
return Ir || (Ir = 1, (function(r, p) {
|
|
587
588
|
(function(t, e) {
|
|
588
589
|
r.exports = e();
|
|
589
590
|
})(ht, function() {
|
|
590
591
|
var t = t || (function(e, u) {
|
|
591
|
-
var
|
|
592
|
-
if (typeof window < "u" && window.crypto && (
|
|
592
|
+
var h;
|
|
593
|
+
if (typeof window < "u" && window.crypto && (h = window.crypto), typeof self < "u" && self.crypto && (h = self.crypto), typeof globalThis < "u" && globalThis.crypto && (h = globalThis.crypto), !h && typeof window < "u" && window.msCrypto && (h = window.msCrypto), !h && typeof hr < "u" && hr.crypto && (h = hr.crypto), !h && typeof ft == "function")
|
|
593
594
|
try {
|
|
594
|
-
|
|
595
|
+
h = lt;
|
|
595
596
|
} catch {
|
|
596
597
|
}
|
|
597
598
|
var m = function() {
|
|
598
|
-
if (
|
|
599
|
-
if (typeof
|
|
599
|
+
if (h) {
|
|
600
|
+
if (typeof h.getRandomValues == "function")
|
|
600
601
|
try {
|
|
601
|
-
return
|
|
602
|
+
return h.getRandomValues(new Uint32Array(1))[0];
|
|
602
603
|
} catch {
|
|
603
604
|
}
|
|
604
|
-
if (typeof
|
|
605
|
+
if (typeof h.randomBytes == "function")
|
|
605
606
|
try {
|
|
606
|
-
return
|
|
607
|
+
return h.randomBytes(4).readInt32LE();
|
|
607
608
|
} catch {
|
|
608
609
|
}
|
|
609
610
|
}
|
|
@@ -875,7 +876,7 @@ function M() {
|
|
|
875
876
|
d[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
876
877
|
return new E.init(d, o);
|
|
877
878
|
}
|
|
878
|
-
},
|
|
879
|
+
}, v = a.Utf8 = {
|
|
879
880
|
/**
|
|
880
881
|
* Converts a word array to a UTF-8 string.
|
|
881
882
|
*
|
|
@@ -934,7 +935,7 @@ function M() {
|
|
|
934
935
|
* bufferedBlockAlgorithm._append(wordArray);
|
|
935
936
|
*/
|
|
936
937
|
_append: function(i) {
|
|
937
|
-
typeof i == "string" && (i =
|
|
938
|
+
typeof i == "string" && (i = v.parse(i)), this._data.concat(i), this._nDataBytes += i.sigBytes;
|
|
938
939
|
},
|
|
939
940
|
/**
|
|
940
941
|
* Processes available data blocks.
|
|
@@ -1083,13 +1084,13 @@ function M() {
|
|
|
1083
1084
|
})(y0)), y0.exports;
|
|
1084
1085
|
}
|
|
1085
1086
|
var w0 = { exports: {} }, vt = w0.exports, Lr;
|
|
1086
|
-
function
|
|
1087
|
-
return Lr || (Lr = 1, (function(r,
|
|
1087
|
+
function ur() {
|
|
1088
|
+
return Lr || (Lr = 1, (function(r, p) {
|
|
1088
1089
|
(function(t, e) {
|
|
1089
1090
|
r.exports = e(M());
|
|
1090
1091
|
})(vt, function(t) {
|
|
1091
1092
|
return (function(e) {
|
|
1092
|
-
var u = t,
|
|
1093
|
+
var u = t, h = u.lib, m = h.Base, B = h.WordArray, C = u.x64 = {};
|
|
1093
1094
|
C.Word = m.extend({
|
|
1094
1095
|
/**
|
|
1095
1096
|
* Initializes a newly created 64-bit word.
|
|
@@ -1314,13 +1315,13 @@ function fr() {
|
|
|
1314
1315
|
}
|
|
1315
1316
|
var k0 = { exports: {} }, pt = k0.exports, Or;
|
|
1316
1317
|
function Bt() {
|
|
1317
|
-
return Or || (Or = 1, (function(r,
|
|
1318
|
+
return Or || (Or = 1, (function(r, p) {
|
|
1318
1319
|
(function(t, e) {
|
|
1319
1320
|
r.exports = e(M());
|
|
1320
1321
|
})(pt, function(t) {
|
|
1321
1322
|
return (function() {
|
|
1322
1323
|
if (typeof ArrayBuffer == "function") {
|
|
1323
|
-
var e = t, u = e.lib,
|
|
1324
|
+
var e = t, u = e.lib, h = u.WordArray, m = h.init, B = h.init = function(C) {
|
|
1324
1325
|
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) {
|
|
1325
1326
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1326
1327
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
@@ -1328,7 +1329,7 @@ function Bt() {
|
|
|
1328
1329
|
} else
|
|
1329
1330
|
m.apply(this, arguments);
|
|
1330
1331
|
};
|
|
1331
|
-
B.prototype =
|
|
1332
|
+
B.prototype = h;
|
|
1332
1333
|
}
|
|
1333
1334
|
})(), t.lib.WordArray;
|
|
1334
1335
|
});
|
|
@@ -1336,12 +1337,12 @@ function Bt() {
|
|
|
1336
1337
|
}
|
|
1337
1338
|
var S0 = { exports: {} }, Ct = S0.exports, qr;
|
|
1338
1339
|
function Et() {
|
|
1339
|
-
return qr || (qr = 1, (function(r,
|
|
1340
|
+
return qr || (qr = 1, (function(r, p) {
|
|
1340
1341
|
(function(t, e) {
|
|
1341
1342
|
r.exports = e(M());
|
|
1342
1343
|
})(Ct, function(t) {
|
|
1343
1344
|
return (function() {
|
|
1344
|
-
var e = t, u = e.lib,
|
|
1345
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.enc;
|
|
1345
1346
|
m.Utf16 = m.Utf16BE = {
|
|
1346
1347
|
/**
|
|
1347
1348
|
* Converts a word array to a UTF-16 BE string.
|
|
@@ -1379,7 +1380,7 @@ function Et() {
|
|
|
1379
1380
|
parse: function(C) {
|
|
1380
1381
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1381
1382
|
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1382
|
-
return
|
|
1383
|
+
return h.create(n, x * 2);
|
|
1383
1384
|
}
|
|
1384
1385
|
}, m.Utf16LE = {
|
|
1385
1386
|
/**
|
|
@@ -1418,7 +1419,7 @@ function Et() {
|
|
|
1418
1419
|
parse: function(C) {
|
|
1419
1420
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1420
1421
|
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1421
|
-
return
|
|
1422
|
+
return h.create(n, x * 2);
|
|
1422
1423
|
}
|
|
1423
1424
|
};
|
|
1424
1425
|
function B(C) {
|
|
@@ -1430,12 +1431,12 @@ function Et() {
|
|
|
1430
1431
|
}
|
|
1431
1432
|
var H0 = { exports: {} }, At = H0.exports, Tr;
|
|
1432
1433
|
function i0() {
|
|
1433
|
-
return Tr || (Tr = 1, (function(r,
|
|
1434
|
+
return Tr || (Tr = 1, (function(r, p) {
|
|
1434
1435
|
(function(t, e) {
|
|
1435
1436
|
r.exports = e(M());
|
|
1436
1437
|
})(At, function(t) {
|
|
1437
1438
|
return (function() {
|
|
1438
|
-
var e = t, u = e.lib,
|
|
1439
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.enc;
|
|
1439
1440
|
m.Base64 = {
|
|
1440
1441
|
/**
|
|
1441
1442
|
* Converts a word array to a Base64 string.
|
|
@@ -1454,7 +1455,7 @@ function i0() {
|
|
|
1454
1455
|
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1455
1456
|
C.clamp();
|
|
1456
1457
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1457
|
-
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255,
|
|
1458
|
+
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, v = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, l = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, g = f << 16 | v << 8 | l, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1458
1459
|
a.push(E.charAt(g >>> 6 * (3 - i) & 63));
|
|
1459
1460
|
var o = E.charAt(64);
|
|
1460
1461
|
if (o)
|
|
@@ -1494,10 +1495,10 @@ function i0() {
|
|
|
1494
1495
|
function B(C, x, n) {
|
|
1495
1496
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1496
1497
|
if (s % 4) {
|
|
1497
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1498
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1498
1499
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1499
1500
|
}
|
|
1500
|
-
return
|
|
1501
|
+
return h.create(E, a);
|
|
1501
1502
|
}
|
|
1502
1503
|
})(), t.enc.Base64;
|
|
1503
1504
|
});
|
|
@@ -1505,12 +1506,12 @@ function i0() {
|
|
|
1505
1506
|
}
|
|
1506
1507
|
var $0 = { exports: {} }, Ft = $0.exports, Mr;
|
|
1507
1508
|
function Dt() {
|
|
1508
|
-
return Mr || (Mr = 1, (function(r,
|
|
1509
|
+
return Mr || (Mr = 1, (function(r, p) {
|
|
1509
1510
|
(function(t, e) {
|
|
1510
1511
|
r.exports = e(M());
|
|
1511
1512
|
})(Ft, function(t) {
|
|
1512
1513
|
return (function() {
|
|
1513
|
-
var e = t, u = e.lib,
|
|
1514
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.enc;
|
|
1514
1515
|
m.Base64url = {
|
|
1515
1516
|
/**
|
|
1516
1517
|
* Converts a word array to a Base64url string.
|
|
@@ -1532,7 +1533,7 @@ function Dt() {
|
|
|
1532
1533
|
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1533
1534
|
C.clamp();
|
|
1534
1535
|
for (var s = [], f = 0; f < E; f += 3)
|
|
1535
|
-
for (var
|
|
1536
|
+
for (var v = n[f >>> 2] >>> 24 - f % 4 * 8 & 255, l = n[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, g = n[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, i = v << 16 | l << 8 | g, o = 0; o < 4 && f + o * 0.75 < E; o++)
|
|
1536
1537
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1537
1538
|
var d = a.charAt(64);
|
|
1538
1539
|
if (d)
|
|
@@ -1565,8 +1566,8 @@ function Dt() {
|
|
|
1565
1566
|
}
|
|
1566
1567
|
var f = E.charAt(64);
|
|
1567
1568
|
if (f) {
|
|
1568
|
-
var
|
|
1569
|
-
|
|
1569
|
+
var v = C.indexOf(f);
|
|
1570
|
+
v !== -1 && (n = v);
|
|
1570
1571
|
}
|
|
1571
1572
|
return B(C, n, a);
|
|
1572
1573
|
},
|
|
@@ -1576,10 +1577,10 @@ function Dt() {
|
|
|
1576
1577
|
function B(C, x, n) {
|
|
1577
1578
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1578
1579
|
if (s % 4) {
|
|
1579
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1580
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1580
1581
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1581
1582
|
}
|
|
1582
|
-
return
|
|
1583
|
+
return h.create(E, a);
|
|
1583
1584
|
}
|
|
1584
1585
|
})(), t.enc.Base64url;
|
|
1585
1586
|
});
|
|
@@ -1587,15 +1588,15 @@ function Dt() {
|
|
|
1587
1588
|
}
|
|
1588
1589
|
var R0 = { exports: {} }, gt = R0.exports, Nr;
|
|
1589
1590
|
function s0() {
|
|
1590
|
-
return Nr || (Nr = 1, (function(r,
|
|
1591
|
+
return Nr || (Nr = 1, (function(r, p) {
|
|
1591
1592
|
(function(t, e) {
|
|
1592
1593
|
r.exports = e(M());
|
|
1593
1594
|
})(gt, function(t) {
|
|
1594
1595
|
return (function(e) {
|
|
1595
|
-
var u = t,
|
|
1596
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = [];
|
|
1596
1597
|
(function() {
|
|
1597
|
-
for (var
|
|
1598
|
-
x[
|
|
1598
|
+
for (var v = 0; v < 64; v++)
|
|
1599
|
+
x[v] = e.abs(e.sin(v + 1)) * 4294967296 | 0;
|
|
1599
1600
|
})();
|
|
1600
1601
|
var n = C.MD5 = B.extend({
|
|
1601
1602
|
_doReset: function() {
|
|
@@ -1606,19 +1607,19 @@ function s0() {
|
|
|
1606
1607
|
271733878
|
|
1607
1608
|
]);
|
|
1608
1609
|
},
|
|
1609
|
-
_doProcessBlock: function(
|
|
1610
|
+
_doProcessBlock: function(v, l) {
|
|
1610
1611
|
for (var g = 0; g < 16; g++) {
|
|
1611
|
-
var i = l + g, o =
|
|
1612
|
-
|
|
1612
|
+
var i = l + g, o = v[i];
|
|
1613
|
+
v[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1613
1614
|
}
|
|
1614
|
-
var d = this._hash.words, b =
|
|
1615
|
-
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, D, 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,
|
|
1615
|
+
var d = this._hash.words, b = v[l + 0], D = v[l + 1], y = v[l + 2], k = v[l + 3], R = v[l + 4], F = v[l + 5], w = v[l + 6], H = v[l + 7], $ = v[l + 8], W = v[l + 9], O = v[l + 10], q = v[l + 11], U = v[l + 12], T = v[l + 13], N = v[l + 14], j = v[l + 15], S = d[0], c = d[1], A = d[2], _ = d[3];
|
|
1616
|
+
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, D, 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, W, 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, _, D, 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, _, W, 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, _, D, 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, _, W, 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, D, 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, W, 21, x[63]), d[0] = d[0] + S | 0, d[1] = d[1] + c | 0, d[2] = d[2] + A | 0, d[3] = d[3] + _ | 0;
|
|
1616
1617
|
},
|
|
1617
1618
|
_doFinalize: function() {
|
|
1618
|
-
var
|
|
1619
|
+
var v = this._data, l = v.words, g = this._nDataBytes * 8, i = v.sigBytes * 8;
|
|
1619
1620
|
l[i >>> 5] |= 128 << 24 - i % 32;
|
|
1620
1621
|
var o = e.floor(g / 4294967296), d = g;
|
|
1621
|
-
l[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, l[(i + 64 >>> 9 << 4) + 14] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360,
|
|
1622
|
+
l[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, l[(i + 64 >>> 9 << 4) + 14] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360, v.sigBytes = (l.length + 1) * 4, this._process();
|
|
1622
1623
|
for (var b = this._hash, D = b.words, y = 0; y < 4; y++) {
|
|
1623
1624
|
var k = D[y];
|
|
1624
1625
|
D[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
@@ -1626,24 +1627,24 @@ function s0() {
|
|
|
1626
1627
|
return b;
|
|
1627
1628
|
},
|
|
1628
1629
|
clone: function() {
|
|
1629
|
-
var
|
|
1630
|
-
return
|
|
1630
|
+
var v = B.clone.call(this);
|
|
1631
|
+
return v._hash = this._hash.clone(), v;
|
|
1631
1632
|
}
|
|
1632
1633
|
});
|
|
1633
|
-
function E(
|
|
1634
|
-
var D =
|
|
1634
|
+
function E(v, l, g, i, o, d, b) {
|
|
1635
|
+
var D = v + (l & g | ~l & i) + o + b;
|
|
1635
1636
|
return (D << d | D >>> 32 - d) + l;
|
|
1636
1637
|
}
|
|
1637
|
-
function a(
|
|
1638
|
-
var D =
|
|
1638
|
+
function a(v, l, g, i, o, d, b) {
|
|
1639
|
+
var D = v + (l & i | g & ~i) + o + b;
|
|
1639
1640
|
return (D << d | D >>> 32 - d) + l;
|
|
1640
1641
|
}
|
|
1641
|
-
function s(
|
|
1642
|
-
var D =
|
|
1642
|
+
function s(v, l, g, i, o, d, b) {
|
|
1643
|
+
var D = v + (l ^ g ^ i) + o + b;
|
|
1643
1644
|
return (D << d | D >>> 32 - d) + l;
|
|
1644
1645
|
}
|
|
1645
|
-
function f(
|
|
1646
|
-
var D =
|
|
1646
|
+
function f(v, l, g, i, o, d, b) {
|
|
1647
|
+
var D = v + (g ^ (l | ~i)) + o + b;
|
|
1647
1648
|
return (D << d | D >>> 32 - d) + l;
|
|
1648
1649
|
}
|
|
1649
1650
|
u.MD5 = B._createHelper(n), u.HmacMD5 = B._createHmacHelper(n);
|
|
@@ -1653,14 +1654,14 @@ function s0() {
|
|
|
1653
1654
|
}
|
|
1654
1655
|
var P0 = { exports: {} }, bt = P0.exports, Ur;
|
|
1655
1656
|
function ye() {
|
|
1656
|
-
return Ur || (Ur = 1, (function(r,
|
|
1657
|
+
return Ur || (Ur = 1, (function(r, p) {
|
|
1657
1658
|
(function(t, e) {
|
|
1658
1659
|
r.exports = e(M());
|
|
1659
1660
|
})(bt, function(t) {
|
|
1660
1661
|
return (function() {
|
|
1661
|
-
var e = t, u = e.lib,
|
|
1662
|
+
var e = t, u = e.lib, h = u.WordArray, m = u.Hasher, B = e.algo, C = [], x = B.SHA1 = m.extend({
|
|
1662
1663
|
_doReset: function() {
|
|
1663
|
-
this._hash = new
|
|
1664
|
+
this._hash = new h.init([
|
|
1664
1665
|
1732584193,
|
|
1665
1666
|
4023233417,
|
|
1666
1667
|
2562383102,
|
|
@@ -1669,7 +1670,7 @@ function ye() {
|
|
|
1669
1670
|
]);
|
|
1670
1671
|
},
|
|
1671
1672
|
_doProcessBlock: function(n, E) {
|
|
1672
|
-
for (var a = this._hash.words, s = a[0], f = a[1],
|
|
1673
|
+
for (var a = this._hash.words, s = a[0], f = a[1], v = a[2], l = a[3], g = a[4], i = 0; i < 80; i++) {
|
|
1673
1674
|
if (i < 16)
|
|
1674
1675
|
C[i] = n[E + i] | 0;
|
|
1675
1676
|
else {
|
|
@@ -1677,9 +1678,9 @@ function ye() {
|
|
|
1677
1678
|
C[i] = o << 1 | o >>> 31;
|
|
1678
1679
|
}
|
|
1679
1680
|
var d = (s << 5 | s >>> 27) + g + C[i];
|
|
1680
|
-
i < 20 ? d += (f &
|
|
1681
|
+
i < 20 ? d += (f & v | ~f & l) + 1518500249 : i < 40 ? d += (f ^ v ^ l) + 1859775393 : i < 60 ? d += (f & v | f & l | v & l) - 1894007588 : d += (f ^ v ^ l) - 899497514, g = l, l = v, v = f << 30 | f >>> 2, f = s, s = d;
|
|
1681
1682
|
}
|
|
1682
|
-
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] +
|
|
1683
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] + v | 0, a[3] = a[3] + l | 0, a[4] = a[4] + g | 0;
|
|
1683
1684
|
},
|
|
1684
1685
|
_doFinalize: function() {
|
|
1685
1686
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
@@ -1695,14 +1696,14 @@ function ye() {
|
|
|
1695
1696
|
});
|
|
1696
1697
|
})(P0)), P0.exports;
|
|
1697
1698
|
}
|
|
1698
|
-
var
|
|
1699
|
+
var W0 = { exports: {} }, mt = W0.exports, jr;
|
|
1699
1700
|
function Er() {
|
|
1700
|
-
return jr || (jr = 1, (function(r,
|
|
1701
|
+
return jr || (jr = 1, (function(r, p) {
|
|
1701
1702
|
(function(t, e) {
|
|
1702
1703
|
r.exports = e(M());
|
|
1703
1704
|
})(mt, function(t) {
|
|
1704
1705
|
return (function(e) {
|
|
1705
|
-
var u = t,
|
|
1706
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = [], n = [];
|
|
1706
1707
|
(function() {
|
|
1707
1708
|
function s(g) {
|
|
1708
1709
|
for (var i = e.sqrt(g), o = 2; o <= i; o++)
|
|
@@ -1713,29 +1714,29 @@ function Er() {
|
|
|
1713
1714
|
function f(g) {
|
|
1714
1715
|
return (g - (g | 0)) * 4294967296 | 0;
|
|
1715
1716
|
}
|
|
1716
|
-
for (var
|
|
1717
|
-
s(
|
|
1717
|
+
for (var v = 2, l = 0; l < 64; )
|
|
1718
|
+
s(v) && (l < 8 && (x[l] = f(e.pow(v, 1 / 2))), n[l] = f(e.pow(v, 1 / 3)), l++), v++;
|
|
1718
1719
|
})();
|
|
1719
1720
|
var E = [], a = C.SHA256 = B.extend({
|
|
1720
1721
|
_doReset: function() {
|
|
1721
1722
|
this._hash = new m.init(x.slice(0));
|
|
1722
1723
|
},
|
|
1723
1724
|
_doProcessBlock: function(s, f) {
|
|
1724
|
-
for (var
|
|
1725
|
+
for (var v = this._hash.words, l = v[0], g = v[1], i = v[2], o = v[3], d = v[4], b = v[5], D = v[6], y = v[7], k = 0; k < 64; k++) {
|
|
1725
1726
|
if (k < 16)
|
|
1726
1727
|
E[k] = s[f + k] | 0;
|
|
1727
1728
|
else {
|
|
1728
1729
|
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;
|
|
1729
1730
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1730
1731
|
}
|
|
1731
|
-
var $ = d & b ^ ~d & D,
|
|
1732
|
+
var $ = d & b ^ ~d & D, W = l & g ^ l & i ^ g & i, O = (l << 30 | l >>> 2) ^ (l << 19 | l >>> 13) ^ (l << 10 | l >>> 22), q = (d << 26 | d >>> 6) ^ (d << 21 | d >>> 11) ^ (d << 7 | d >>> 25), U = y + q + $ + n[k] + E[k], T = O + W;
|
|
1732
1733
|
y = D, D = b, b = d, d = o + U | 0, o = i, i = g, g = l, l = U + T | 0;
|
|
1733
1734
|
}
|
|
1734
|
-
|
|
1735
|
+
v[0] = v[0] + l | 0, v[1] = v[1] + g | 0, v[2] = v[2] + i | 0, v[3] = v[3] + o | 0, v[4] = v[4] + d | 0, v[5] = v[5] + b | 0, v[6] = v[6] + D | 0, v[7] = v[7] + y | 0;
|
|
1735
1736
|
},
|
|
1736
1737
|
_doFinalize: function() {
|
|
1737
|
-
var s = this._data, f = s.words,
|
|
1738
|
-
return f[l >>> 5] |= 128 << 24 - l % 32, f[(l + 64 >>> 9 << 4) + 14] = e.floor(
|
|
1738
|
+
var s = this._data, f = s.words, v = this._nDataBytes * 8, l = s.sigBytes * 8;
|
|
1739
|
+
return f[l >>> 5] |= 128 << 24 - l % 32, f[(l + 64 >>> 9 << 4) + 14] = e.floor(v / 4294967296), f[(l + 64 >>> 9 << 4) + 15] = v, s.sigBytes = f.length * 4, this._process(), this._hash;
|
|
1739
1740
|
},
|
|
1740
1741
|
clone: function() {
|
|
1741
1742
|
var s = B.clone.call(this);
|
|
@@ -1745,18 +1746,18 @@ function Er() {
|
|
|
1745
1746
|
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1746
1747
|
})(Math), t.SHA256;
|
|
1747
1748
|
});
|
|
1748
|
-
})(
|
|
1749
|
+
})(W0)), W0.exports;
|
|
1749
1750
|
}
|
|
1750
|
-
var
|
|
1751
|
+
var z0 = { exports: {} }, _t = z0.exports, Gr;
|
|
1751
1752
|
function yt() {
|
|
1752
|
-
return Gr || (Gr = 1, (function(r,
|
|
1753
|
+
return Gr || (Gr = 1, (function(r, p) {
|
|
1753
1754
|
(function(t, e, u) {
|
|
1754
1755
|
r.exports = e(M(), Er());
|
|
1755
1756
|
})(_t, function(t) {
|
|
1756
1757
|
return (function() {
|
|
1757
|
-
var e = t, u = e.lib,
|
|
1758
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.algo, B = m.SHA256, C = m.SHA224 = B.extend({
|
|
1758
1759
|
_doReset: function() {
|
|
1759
|
-
this._hash = new
|
|
1760
|
+
this._hash = new h.init([
|
|
1760
1761
|
3238371032,
|
|
1761
1762
|
914150663,
|
|
1762
1763
|
812702999,
|
|
@@ -1775,16 +1776,16 @@ function yt() {
|
|
|
1775
1776
|
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1776
1777
|
})(), t.SHA224;
|
|
1777
1778
|
});
|
|
1778
|
-
})(
|
|
1779
|
+
})(z0)), z0.exports;
|
|
1779
1780
|
}
|
|
1780
|
-
var I0 = { exports: {} }, wt = I0.exports,
|
|
1781
|
+
var I0 = { exports: {} }, wt = I0.exports, Kr;
|
|
1781
1782
|
function we() {
|
|
1782
|
-
return
|
|
1783
|
+
return Kr || (Kr = 1, (function(r, p) {
|
|
1783
1784
|
(function(t, e, u) {
|
|
1784
|
-
r.exports = e(M(),
|
|
1785
|
+
r.exports = e(M(), ur());
|
|
1785
1786
|
})(wt, function(t) {
|
|
1786
1787
|
return (function() {
|
|
1787
|
-
var e = t, u = e.lib,
|
|
1788
|
+
var e = t, u = e.lib, h = u.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
1788
1789
|
function n() {
|
|
1789
1790
|
return B.create.apply(B, arguments);
|
|
1790
1791
|
}
|
|
@@ -1874,7 +1875,7 @@ function we() {
|
|
|
1874
1875
|
for (var f = 0; f < 80; f++)
|
|
1875
1876
|
a[f] = n();
|
|
1876
1877
|
})();
|
|
1877
|
-
var s = x.SHA512 =
|
|
1878
|
+
var s = x.SHA512 = h.extend({
|
|
1878
1879
|
_doReset: function() {
|
|
1879
1880
|
this._hash = new C.init([
|
|
1880
1881
|
new B.init(1779033703, 4089235720),
|
|
@@ -1887,55 +1888,55 @@ function we() {
|
|
|
1887
1888
|
new B.init(1541459225, 327033209)
|
|
1888
1889
|
]);
|
|
1889
1890
|
},
|
|
1890
|
-
_doProcessBlock: function(f,
|
|
1891
|
-
for (var l = this._hash.words, g = l[0], i = l[1], o = l[2], d = l[3], b = l[4], D = l[5], y = l[6], k = l[7], R = g.high, F = g.low, w = i.high, H = i.low, $ = o.high,
|
|
1892
|
-
var
|
|
1893
|
-
if (
|
|
1894
|
-
x0 = g0.high = f[
|
|
1891
|
+
_doProcessBlock: function(f, v) {
|
|
1892
|
+
for (var l = this._hash.words, g = l[0], i = l[1], o = l[2], d = l[3], b = l[4], D = l[5], y = l[6], k = l[7], R = g.high, F = g.low, w = i.high, H = i.low, $ = o.high, W = o.low, O = d.high, q = d.low, U = b.high, T = b.low, N = D.high, j = D.low, S = y.high, c = y.low, A = k.high, _ = k.low, z = R, P = F, L = w, I = H, Z = $, Q = W, o0 = O, K = q, G = U, Y = T, e0 = N, c0 = j, D0 = S, v0 = c, dr = A, p0 = _, t0 = 0; t0 < 80; t0++) {
|
|
1893
|
+
var r0, x0, g0 = a[t0];
|
|
1894
|
+
if (t0 < 16)
|
|
1895
|
+
x0 = g0.high = f[v + t0 * 2] | 0, r0 = g0.low = f[v + t0 * 2 + 1] | 0;
|
|
1895
1896
|
else {
|
|
1896
|
-
var Dr = a[
|
|
1897
|
-
|
|
1897
|
+
var Dr = a[t0 - 15], f0 = Dr.high, B0 = Dr.low, Re = (f0 >>> 1 | B0 << 31) ^ (f0 >>> 8 | B0 << 24) ^ f0 >>> 7, gr = (B0 >>> 1 | f0 << 31) ^ (B0 >>> 8 | f0 << 24) ^ (B0 >>> 7 | f0 << 25), br = a[t0 - 2], u0 = br.high, C0 = br.low, Pe = (u0 >>> 19 | C0 << 13) ^ (u0 << 3 | C0 >>> 29) ^ u0 >>> 6, mr = (C0 >>> 19 | u0 << 13) ^ (C0 << 3 | u0 >>> 29) ^ (C0 >>> 6 | u0 << 26), _r = a[t0 - 7], We = _r.high, ze = _r.low, yr = a[t0 - 16], Ie = yr.high, wr = yr.low;
|
|
1898
|
+
r0 = gr + ze, x0 = Re + We + (r0 >>> 0 < gr >>> 0 ? 1 : 0), r0 = r0 + mr, x0 = x0 + Pe + (r0 >>> 0 < mr >>> 0 ? 1 : 0), r0 = r0 + wr, x0 = x0 + Ie + (r0 >>> 0 < wr >>> 0 ? 1 : 0), g0.high = x0, g0.low = r0;
|
|
1898
1899
|
}
|
|
1899
|
-
var Le = G &
|
|
1900
|
-
|
|
1900
|
+
var Le = G & e0 ^ ~G & D0, kr = Y & c0 ^ ~Y & v0, Oe = z & L ^ z & Z ^ L & Z, qe = P & I ^ P & Q ^ I & Q, Te = (z >>> 28 | P << 4) ^ (z << 30 | P >>> 2) ^ (z << 25 | P >>> 7), Sr = (P >>> 28 | z << 4) ^ (P << 30 | z >>> 2) ^ (P << 25 | z >>> 7), Me = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Ne = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Hr = E[t0], Ue = Hr.high, $r = Hr.low, V = p0 + Ne, n0 = dr + Me + (V >>> 0 < p0 >>> 0 ? 1 : 0), V = V + kr, n0 = n0 + Le + (V >>> 0 < kr >>> 0 ? 1 : 0), V = V + $r, n0 = n0 + Ue + (V >>> 0 < $r >>> 0 ? 1 : 0), V = V + r0, n0 = n0 + x0 + (V >>> 0 < r0 >>> 0 ? 1 : 0), Rr = Sr + qe, je = Te + Oe + (Rr >>> 0 < Sr >>> 0 ? 1 : 0);
|
|
1901
|
+
dr = D0, p0 = v0, D0 = e0, v0 = c0, e0 = G, c0 = Y, Y = K + V | 0, G = o0 + n0 + (Y >>> 0 < K >>> 0 ? 1 : 0) | 0, o0 = Z, K = Q, Z = L, Q = I, L = z, I = P, P = V + Rr | 0, z = n0 + je + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1901
1902
|
}
|
|
1902
|
-
F = g.low = F + P, g.high = R +
|
|
1903
|
+
F = g.low = F + P, g.high = R + z + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + I, i.high = w + L + (H >>> 0 < I >>> 0 ? 1 : 0), W = o.low = W + Q, o.high = $ + Z + (W >>> 0 < Q >>> 0 ? 1 : 0), q = d.low = q + K, d.high = O + o0 + (q >>> 0 < K >>> 0 ? 1 : 0), T = b.low = T + Y, b.high = U + G + (T >>> 0 < Y >>> 0 ? 1 : 0), j = D.low = j + c0, D.high = N + e0 + (j >>> 0 < c0 >>> 0 ? 1 : 0), c = y.low = c + v0, y.high = S + D0 + (c >>> 0 < v0 >>> 0 ? 1 : 0), _ = k.low = _ + p0, k.high = A + dr + (_ >>> 0 < p0 >>> 0 ? 1 : 0);
|
|
1903
1904
|
},
|
|
1904
1905
|
_doFinalize: function() {
|
|
1905
|
-
var f = this._data,
|
|
1906
|
-
|
|
1906
|
+
var f = this._data, v = f.words, l = this._nDataBytes * 8, g = f.sigBytes * 8;
|
|
1907
|
+
v[g >>> 5] |= 128 << 24 - g % 32, v[(g + 128 >>> 10 << 5) + 30] = Math.floor(l / 4294967296), v[(g + 128 >>> 10 << 5) + 31] = l, f.sigBytes = v.length * 4, this._process();
|
|
1907
1908
|
var i = this._hash.toX32();
|
|
1908
1909
|
return i;
|
|
1909
1910
|
},
|
|
1910
1911
|
clone: function() {
|
|
1911
|
-
var f =
|
|
1912
|
+
var f = h.clone.call(this);
|
|
1912
1913
|
return f._hash = this._hash.clone(), f;
|
|
1913
1914
|
},
|
|
1914
1915
|
blockSize: 1024 / 32
|
|
1915
1916
|
});
|
|
1916
|
-
e.SHA512 =
|
|
1917
|
+
e.SHA512 = h._createHelper(s), e.HmacSHA512 = h._createHmacHelper(s);
|
|
1917
1918
|
})(), t.SHA512;
|
|
1918
1919
|
});
|
|
1919
1920
|
})(I0)), I0.exports;
|
|
1920
1921
|
}
|
|
1921
|
-
var L0 = { exports: {} }, kt = L0.exports,
|
|
1922
|
+
var L0 = { exports: {} }, kt = L0.exports, Xr;
|
|
1922
1923
|
function St() {
|
|
1923
|
-
return
|
|
1924
|
+
return Xr || (Xr = 1, (function(r, p) {
|
|
1924
1925
|
(function(t, e, u) {
|
|
1925
|
-
r.exports = e(M(),
|
|
1926
|
+
r.exports = e(M(), ur(), we());
|
|
1926
1927
|
})(kt, function(t) {
|
|
1927
1928
|
return (function() {
|
|
1928
|
-
var e = t, u = e.x64,
|
|
1929
|
+
var e = t, u = e.x64, h = u.Word, m = u.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1929
1930
|
_doReset: function() {
|
|
1930
1931
|
this._hash = new m.init([
|
|
1931
|
-
new
|
|
1932
|
-
new
|
|
1933
|
-
new
|
|
1934
|
-
new
|
|
1935
|
-
new
|
|
1936
|
-
new
|
|
1937
|
-
new
|
|
1938
|
-
new
|
|
1932
|
+
new h.init(3418070365, 3238371032),
|
|
1933
|
+
new h.init(1654270250, 914150663),
|
|
1934
|
+
new h.init(2438529370, 812702999),
|
|
1935
|
+
new h.init(355462360, 4144912697),
|
|
1936
|
+
new h.init(1731405415, 4290775857),
|
|
1937
|
+
new h.init(2394180231, 1750603025),
|
|
1938
|
+
new h.init(3675008525, 1694076839),
|
|
1939
|
+
new h.init(1203062813, 3204075428)
|
|
1939
1940
|
]);
|
|
1940
1941
|
},
|
|
1941
1942
|
_doFinalize: function() {
|
|
@@ -1950,12 +1951,12 @@ function St() {
|
|
|
1950
1951
|
}
|
|
1951
1952
|
var O0 = { exports: {} }, Ht = O0.exports, Yr;
|
|
1952
1953
|
function $t() {
|
|
1953
|
-
return Yr || (Yr = 1, (function(r,
|
|
1954
|
+
return Yr || (Yr = 1, (function(r, p) {
|
|
1954
1955
|
(function(t, e, u) {
|
|
1955
|
-
r.exports = e(M(),
|
|
1956
|
+
r.exports = e(M(), ur());
|
|
1956
1957
|
})(Ht, function(t) {
|
|
1957
1958
|
return (function(e) {
|
|
1958
|
-
var u = t,
|
|
1959
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
1959
1960
|
(function() {
|
|
1960
1961
|
for (var l = 1, g = 0, i = 0; i < 24; i++) {
|
|
1961
1962
|
E[l + 5 * g] = (i + 1) * (i + 2) / 2 % 64;
|
|
@@ -1981,7 +1982,7 @@ function $t() {
|
|
|
1981
1982
|
for (var l = 0; l < 25; l++)
|
|
1982
1983
|
f[l] = x.create();
|
|
1983
1984
|
})();
|
|
1984
|
-
var
|
|
1985
|
+
var v = n.SHA3 = B.extend({
|
|
1985
1986
|
/**
|
|
1986
1987
|
* Configuration options.
|
|
1987
1988
|
*
|
|
@@ -2015,7 +2016,7 @@ function $t() {
|
|
|
2015
2016
|
$.high = F, $.low = w;
|
|
2016
2017
|
}
|
|
2017
2018
|
for (var R = 0; R < 5; R++)
|
|
2018
|
-
for (var
|
|
2019
|
+
for (var W = f[(R + 4) % 5], O = f[(R + 1) % 5], q = O.high, U = O.low, F = W.high ^ (q << 1 | U >>> 31), w = W.low ^ (U << 1 | q >>> 31), H = 0; H < 5; H++) {
|
|
2019
2020
|
var y = i[R + 5 * H];
|
|
2020
2021
|
y.high ^= F, y.low ^= w;
|
|
2021
2022
|
}
|
|
@@ -2029,8 +2030,8 @@ function $t() {
|
|
|
2029
2030
|
A.high = _.high, A.low = _.low;
|
|
2030
2031
|
for (var R = 0; R < 5; R++)
|
|
2031
2032
|
for (var H = 0; H < 5; H++) {
|
|
2032
|
-
var T = R + 5 * H, y = i[T],
|
|
2033
|
-
y.high =
|
|
2033
|
+
var T = R + 5 * H, y = i[T], z = f[T], P = f[(R + 1) % 5 + 5 * H], L = f[(R + 2) % 5 + 5 * H];
|
|
2034
|
+
y.high = z.high ^ ~P.high & L.high, y.low = z.low ^ ~P.low & L.low;
|
|
2034
2035
|
}
|
|
2035
2036
|
var y = i[0], I = s[k];
|
|
2036
2037
|
y.high ^= I.high, y.low ^= I.low;
|
|
@@ -2053,19 +2054,19 @@ function $t() {
|
|
|
2053
2054
|
return l;
|
|
2054
2055
|
}
|
|
2055
2056
|
});
|
|
2056
|
-
u.SHA3 = B._createHelper(
|
|
2057
|
+
u.SHA3 = B._createHelper(v), u.HmacSHA3 = B._createHmacHelper(v);
|
|
2057
2058
|
})(Math), t.SHA3;
|
|
2058
2059
|
});
|
|
2059
2060
|
})(O0)), O0.exports;
|
|
2060
2061
|
}
|
|
2061
2062
|
var q0 = { exports: {} }, Rt = q0.exports, Zr;
|
|
2062
2063
|
function Pt() {
|
|
2063
|
-
return Zr || (Zr = 1, (function(r,
|
|
2064
|
+
return Zr || (Zr = 1, (function(r, p) {
|
|
2064
2065
|
(function(t, e) {
|
|
2065
2066
|
r.exports = e(M());
|
|
2066
2067
|
})(Rt, function(t) {
|
|
2067
2068
|
return (function(e) {
|
|
2068
|
-
var u = t,
|
|
2069
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = m.create([
|
|
2069
2070
|
0,
|
|
2070
2071
|
1,
|
|
2071
2072
|
2,
|
|
@@ -2389,7 +2390,7 @@ function Pt() {
|
|
|
2389
2390
|
13,
|
|
2390
2391
|
11,
|
|
2391
2392
|
11
|
|
2392
|
-
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
|
|
2393
|
+
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), v = C.RIPEMD160 = B.extend({
|
|
2393
2394
|
_doReset: function() {
|
|
2394
2395
|
this._hash = m.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2395
2396
|
},
|
|
@@ -2398,11 +2399,11 @@ function Pt() {
|
|
|
2398
2399
|
var R = y + k, F = D[R];
|
|
2399
2400
|
D[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2400
2401
|
}
|
|
2401
|
-
var w = this._hash.words, H = s.words, $ = f.words,
|
|
2402
|
-
A = T = w[0], _ = N = w[1],
|
|
2402
|
+
var w = this._hash.words, H = s.words, $ = f.words, W = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _, z, P, L;
|
|
2403
|
+
A = T = w[0], _ = N = w[1], z = j = w[2], P = S = w[3], L = c = w[4];
|
|
2403
2404
|
for (var I, k = 0; k < 80; k += 1)
|
|
2404
|
-
I = T + D[y +
|
|
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 +
|
|
2405
|
+
I = T + D[y + W[k]] | 0, k < 16 ? I += l(N, j, S) + H[0] : k < 32 ? I += g(N, j, S) + H[1] : k < 48 ? I += i(N, j, S) + H[2] : k < 64 ? I += o(N, j, S) + H[3] : I += d(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 + D[y + O[k]] | 0, k < 16 ? I += d(_, z, P) + $[0] : k < 32 ? I += o(_, z, P) + $[1] : k < 48 ? I += i(_, z, P) + $[2] : k < 64 ? I += g(_, z, P) + $[3] : I += l(_, z, P) + $[4], I = I | 0, I = b(I, U[k]), I = I + L | 0, A = L, L = P, P = b(z, 10), z = _, _ = I;
|
|
2406
|
+
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 + z | 0, w[0] = I;
|
|
2406
2407
|
},
|
|
2407
2408
|
_doFinalize: function() {
|
|
2408
2409
|
var D = this._data, y = D.words, k = this._nDataBytes * 8, R = D.sigBytes * 8;
|
|
@@ -2436,20 +2437,20 @@ function Pt() {
|
|
|
2436
2437
|
function b(D, y) {
|
|
2437
2438
|
return D << y | D >>> 32 - y;
|
|
2438
2439
|
}
|
|
2439
|
-
u.RIPEMD160 = B._createHelper(
|
|
2440
|
+
u.RIPEMD160 = B._createHelper(v), u.HmacRIPEMD160 = B._createHmacHelper(v);
|
|
2440
2441
|
})(), t.RIPEMD160;
|
|
2441
2442
|
});
|
|
2442
2443
|
})(q0)), q0.exports;
|
|
2443
2444
|
}
|
|
2444
|
-
var T0 = { exports: {} },
|
|
2445
|
+
var T0 = { exports: {} }, Wt = T0.exports, Qr;
|
|
2445
2446
|
function Ar() {
|
|
2446
|
-
return Qr || (Qr = 1, (function(r,
|
|
2447
|
+
return Qr || (Qr = 1, (function(r, p) {
|
|
2447
2448
|
(function(t, e) {
|
|
2448
2449
|
r.exports = e(M());
|
|
2449
|
-
})(
|
|
2450
|
+
})(Wt, function(t) {
|
|
2450
2451
|
(function() {
|
|
2451
|
-
var e = t, u = e.lib,
|
|
2452
|
-
C.HMAC =
|
|
2452
|
+
var e = t, u = e.lib, h = u.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2453
|
+
C.HMAC = h.extend({
|
|
2453
2454
|
/**
|
|
2454
2455
|
* Initializes a newly created HMAC.
|
|
2455
2456
|
*
|
|
@@ -2464,8 +2465,8 @@ function Ar() {
|
|
|
2464
2465
|
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2465
2466
|
var E = x.blockSize, a = E * 4;
|
|
2466
2467
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2467
|
-
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(),
|
|
2468
|
-
|
|
2468
|
+
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), v = s.words, l = f.words, g = 0; g < E; g++)
|
|
2469
|
+
v[g] ^= 1549556828, l[g] ^= 909522486;
|
|
2469
2470
|
s.sigBytes = f.sigBytes = a, this.reset();
|
|
2470
2471
|
},
|
|
2471
2472
|
/**
|
|
@@ -2519,14 +2520,14 @@ function Ar() {
|
|
|
2519
2520
|
});
|
|
2520
2521
|
})(T0)), T0.exports;
|
|
2521
2522
|
}
|
|
2522
|
-
var M0 = { exports: {} },
|
|
2523
|
+
var M0 = { exports: {} }, zt = M0.exports, Vr;
|
|
2523
2524
|
function It() {
|
|
2524
|
-
return Vr || (Vr = 1, (function(r,
|
|
2525
|
+
return Vr || (Vr = 1, (function(r, p) {
|
|
2525
2526
|
(function(t, e, u) {
|
|
2526
2527
|
r.exports = e(M(), Er(), Ar());
|
|
2527
|
-
})(
|
|
2528
|
+
})(zt, function(t) {
|
|
2528
2529
|
return (function() {
|
|
2529
|
-
var e = t, u = e.lib,
|
|
2530
|
+
var e = t, u = e.lib, h = u.Base, m = u.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = h.extend({
|
|
2530
2531
|
/**
|
|
2531
2532
|
* Configuration options.
|
|
2532
2533
|
*
|
|
@@ -2534,7 +2535,7 @@ function It() {
|
|
|
2534
2535
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2535
2536
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2536
2537
|
*/
|
|
2537
|
-
cfg:
|
|
2538
|
+
cfg: h.extend({
|
|
2538
2539
|
keySize: 128 / 32,
|
|
2539
2540
|
hasher: C,
|
|
2540
2541
|
iterations: 25e4
|
|
@@ -2566,7 +2567,7 @@ function It() {
|
|
|
2566
2567
|
* var key = kdf.compute(password, salt);
|
|
2567
2568
|
*/
|
|
2568
2569
|
compute: function(E, a) {
|
|
2569
|
-
for (var s = this.cfg, f = x.create(s.hasher, E),
|
|
2570
|
+
for (var s = this.cfg, f = x.create(s.hasher, E), v = m.create(), l = m.create([1]), g = v.words, i = l.words, o = s.keySize, d = s.iterations; g.length < o; ) {
|
|
2570
2571
|
var b = f.update(a).finalize(l);
|
|
2571
2572
|
f.reset();
|
|
2572
2573
|
for (var D = b.words, y = D.length, k = b, R = 1; R < d; R++) {
|
|
@@ -2574,9 +2575,9 @@ function It() {
|
|
|
2574
2575
|
for (var F = k.words, w = 0; w < y; w++)
|
|
2575
2576
|
D[w] ^= F[w];
|
|
2576
2577
|
}
|
|
2577
|
-
|
|
2578
|
+
v.concat(b), i[0]++;
|
|
2578
2579
|
}
|
|
2579
|
-
return
|
|
2580
|
+
return v.sigBytes = o * 4, v;
|
|
2580
2581
|
}
|
|
2581
2582
|
});
|
|
2582
2583
|
e.PBKDF2 = function(E, a, s) {
|
|
@@ -2588,12 +2589,12 @@ function It() {
|
|
|
2588
2589
|
}
|
|
2589
2590
|
var N0 = { exports: {} }, Lt = N0.exports, Jr;
|
|
2590
2591
|
function a0() {
|
|
2591
|
-
return Jr || (Jr = 1, (function(r,
|
|
2592
|
+
return Jr || (Jr = 1, (function(r, p) {
|
|
2592
2593
|
(function(t, e, u) {
|
|
2593
2594
|
r.exports = e(M(), ye(), Ar());
|
|
2594
2595
|
})(Lt, function(t) {
|
|
2595
2596
|
return (function() {
|
|
2596
|
-
var e = t, u = e.lib,
|
|
2597
|
+
var e = t, u = e.lib, h = u.Base, m = u.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = h.extend({
|
|
2597
2598
|
/**
|
|
2598
2599
|
* Configuration options.
|
|
2599
2600
|
*
|
|
@@ -2601,7 +2602,7 @@ function a0() {
|
|
|
2601
2602
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2602
2603
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2603
2604
|
*/
|
|
2604
|
-
cfg:
|
|
2605
|
+
cfg: h.extend({
|
|
2605
2606
|
keySize: 128 / 32,
|
|
2606
2607
|
hasher: C,
|
|
2607
2608
|
iterations: 1
|
|
@@ -2633,13 +2634,13 @@ function a0() {
|
|
|
2633
2634
|
* var key = kdf.compute(password, salt);
|
|
2634
2635
|
*/
|
|
2635
2636
|
compute: function(n, E) {
|
|
2636
|
-
for (var a, s = this.cfg, f = s.hasher.create(),
|
|
2637
|
+
for (var a, s = this.cfg, f = s.hasher.create(), v = m.create(), l = v.words, g = s.keySize, i = s.iterations; l.length < g; ) {
|
|
2637
2638
|
a && f.update(a), a = f.update(n).finalize(E), f.reset();
|
|
2638
2639
|
for (var o = 1; o < i; o++)
|
|
2639
2640
|
a = f.finalize(a), f.reset();
|
|
2640
|
-
|
|
2641
|
+
v.concat(a);
|
|
2641
2642
|
}
|
|
2642
|
-
return
|
|
2643
|
+
return v.sigBytes = g * 4, v;
|
|
2643
2644
|
}
|
|
2644
2645
|
});
|
|
2645
2646
|
e.EvpKDF = function(n, E, a) {
|
|
@@ -2650,15 +2651,15 @@ function a0() {
|
|
|
2650
2651
|
})(N0)), N0.exports;
|
|
2651
2652
|
}
|
|
2652
2653
|
var U0 = { exports: {} }, Ot = U0.exports, re;
|
|
2653
|
-
function
|
|
2654
|
-
return re || (re = 1, (function(r,
|
|
2654
|
+
function X() {
|
|
2655
|
+
return re || (re = 1, (function(r, p) {
|
|
2655
2656
|
(function(t, e, u) {
|
|
2656
2657
|
r.exports = e(M(), a0());
|
|
2657
2658
|
})(Ot, function(t) {
|
|
2658
2659
|
t.lib.Cipher || (function(e) {
|
|
2659
|
-
var u = t,
|
|
2660
|
+
var u = t, h = u.lib, m = h.Base, B = h.WordArray, C = h.BufferedBlockAlgorithm, x = u.enc;
|
|
2660
2661
|
x.Utf8;
|
|
2661
|
-
var n = x.Base64, E = u.algo, a = E.EvpKDF, s =
|
|
2662
|
+
var n = x.Base64, E = u.algo, a = E.EvpKDF, s = h.Cipher = C.extend({
|
|
2662
2663
|
/**
|
|
2663
2664
|
* Configuration options.
|
|
2664
2665
|
*
|
|
@@ -2780,24 +2781,24 @@ function K() {
|
|
|
2780
2781
|
}
|
|
2781
2782
|
return function(w) {
|
|
2782
2783
|
return {
|
|
2783
|
-
encrypt: function(H, $,
|
|
2784
|
-
return F($).encrypt(w, H, $,
|
|
2784
|
+
encrypt: function(H, $, W) {
|
|
2785
|
+
return F($).encrypt(w, H, $, W);
|
|
2785
2786
|
},
|
|
2786
|
-
decrypt: function(H, $,
|
|
2787
|
-
return F($).decrypt(w, H, $,
|
|
2787
|
+
decrypt: function(H, $, W) {
|
|
2788
|
+
return F($).decrypt(w, H, $, W);
|
|
2788
2789
|
}
|
|
2789
2790
|
};
|
|
2790
2791
|
};
|
|
2791
2792
|
})()
|
|
2792
2793
|
});
|
|
2793
|
-
|
|
2794
|
+
h.StreamCipher = s.extend({
|
|
2794
2795
|
_doFinalize: function() {
|
|
2795
2796
|
var F = this._process(!0);
|
|
2796
2797
|
return F;
|
|
2797
2798
|
},
|
|
2798
2799
|
blockSize: 1
|
|
2799
2800
|
});
|
|
2800
|
-
var f = u.mode = {},
|
|
2801
|
+
var f = u.mode = {}, v = h.BlockCipherMode = m.extend({
|
|
2801
2802
|
/**
|
|
2802
2803
|
* Creates this mode for encryption.
|
|
2803
2804
|
*
|
|
@@ -2842,7 +2843,7 @@ function K() {
|
|
|
2842
2843
|
this._cipher = F, this._iv = w;
|
|
2843
2844
|
}
|
|
2844
2845
|
}), l = f.CBC = (function() {
|
|
2845
|
-
var F =
|
|
2846
|
+
var F = v.extend();
|
|
2846
2847
|
F.Encryptor = F.extend({
|
|
2847
2848
|
/**
|
|
2848
2849
|
* Processes the data block at offset.
|
|
@@ -2855,8 +2856,8 @@ function K() {
|
|
|
2855
2856
|
* mode.processBlock(data.words, offset);
|
|
2856
2857
|
*/
|
|
2857
2858
|
processBlock: function(H, $) {
|
|
2858
|
-
var
|
|
2859
|
-
w.call(this, H, $, O),
|
|
2859
|
+
var W = this._cipher, O = W.blockSize;
|
|
2860
|
+
w.call(this, H, $, O), W.encryptBlock(H, $), this._prevBlock = H.slice($, $ + O);
|
|
2860
2861
|
}
|
|
2861
2862
|
}), F.Decryptor = F.extend({
|
|
2862
2863
|
/**
|
|
@@ -2870,14 +2871,14 @@ function K() {
|
|
|
2870
2871
|
* mode.processBlock(data.words, offset);
|
|
2871
2872
|
*/
|
|
2872
2873
|
processBlock: function(H, $) {
|
|
2873
|
-
var
|
|
2874
|
-
|
|
2874
|
+
var W = this._cipher, O = W.blockSize, q = H.slice($, $ + O);
|
|
2875
|
+
W.decryptBlock(H, $), w.call(this, H, $, O), this._prevBlock = q;
|
|
2875
2876
|
}
|
|
2876
2877
|
});
|
|
2877
|
-
function w(H, $,
|
|
2878
|
+
function w(H, $, W) {
|
|
2878
2879
|
var O, q = this._iv;
|
|
2879
2880
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2880
|
-
for (var U = 0; U <
|
|
2881
|
+
for (var U = 0; U < W; U++)
|
|
2881
2882
|
H[$ + U] ^= O[U];
|
|
2882
2883
|
}
|
|
2883
2884
|
return F;
|
|
@@ -2895,8 +2896,8 @@ function K() {
|
|
|
2895
2896
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2896
2897
|
*/
|
|
2897
2898
|
pad: function(F, w) {
|
|
2898
|
-
for (var H = w * 4, $ = H - F.sigBytes % H,
|
|
2899
|
-
O.push(
|
|
2899
|
+
for (var H = w * 4, $ = H - F.sigBytes % H, W = $ << 24 | $ << 16 | $ << 8 | $, O = [], q = 0; q < $; q += 4)
|
|
2900
|
+
O.push(W);
|
|
2900
2901
|
var U = B.create(O, $);
|
|
2901
2902
|
F.concat(U);
|
|
2902
2903
|
},
|
|
@@ -2916,7 +2917,7 @@ function K() {
|
|
|
2916
2917
|
F.sigBytes -= w;
|
|
2917
2918
|
}
|
|
2918
2919
|
};
|
|
2919
|
-
|
|
2920
|
+
h.BlockCipher = s.extend({
|
|
2920
2921
|
/**
|
|
2921
2922
|
* Configuration options.
|
|
2922
2923
|
*
|
|
@@ -2942,7 +2943,7 @@ function K() {
|
|
|
2942
2943
|
},
|
|
2943
2944
|
blockSize: 128 / 32
|
|
2944
2945
|
});
|
|
2945
|
-
var o =
|
|
2946
|
+
var o = h.CipherParams = m.extend({
|
|
2946
2947
|
/**
|
|
2947
2948
|
* Initializes a newly created cipher params object.
|
|
2948
2949
|
*
|
|
@@ -3018,7 +3019,7 @@ function K() {
|
|
|
3018
3019
|
var w, H = n.parse(F), $ = H.words;
|
|
3019
3020
|
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3020
3021
|
}
|
|
3021
|
-
}, D =
|
|
3022
|
+
}, D = h.SerializableCipher = m.extend({
|
|
3022
3023
|
/**
|
|
3023
3024
|
* Configuration options.
|
|
3024
3025
|
*
|
|
@@ -3047,7 +3048,7 @@ function K() {
|
|
|
3047
3048
|
*/
|
|
3048
3049
|
encrypt: function(F, w, H, $) {
|
|
3049
3050
|
$ = this.cfg.extend($);
|
|
3050
|
-
var
|
|
3051
|
+
var W = F.createEncryptor(H, $), O = W.finalize(w), q = W.cfg;
|
|
3051
3052
|
return o.create({
|
|
3052
3053
|
ciphertext: O,
|
|
3053
3054
|
key: H,
|
|
@@ -3078,8 +3079,8 @@ function K() {
|
|
|
3078
3079
|
*/
|
|
3079
3080
|
decrypt: function(F, w, H, $) {
|
|
3080
3081
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3081
|
-
var
|
|
3082
|
-
return
|
|
3082
|
+
var W = F.createDecryptor(H, $).finalize(w.ciphertext);
|
|
3083
|
+
return W;
|
|
3083
3084
|
},
|
|
3084
3085
|
/**
|
|
3085
3086
|
* Converts serialized ciphertext to CipherParams,
|
|
@@ -3117,15 +3118,15 @@ function K() {
|
|
|
3117
3118
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3118
3119
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3119
3120
|
*/
|
|
3120
|
-
execute: function(F, w, H, $,
|
|
3121
|
-
if ($ || ($ = B.random(64 / 8)),
|
|
3122
|
-
var O = a.create({ keySize: w + H, hasher:
|
|
3121
|
+
execute: function(F, w, H, $, W) {
|
|
3122
|
+
if ($ || ($ = B.random(64 / 8)), W)
|
|
3123
|
+
var O = a.create({ keySize: w + H, hasher: W }).compute(F, $);
|
|
3123
3124
|
else
|
|
3124
3125
|
var O = a.create({ keySize: w + H }).compute(F, $);
|
|
3125
3126
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3126
3127
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3127
3128
|
}
|
|
3128
|
-
}, R =
|
|
3129
|
+
}, R = h.PasswordBasedCipher = D.extend({
|
|
3129
3130
|
/**
|
|
3130
3131
|
* Configuration options.
|
|
3131
3132
|
*
|
|
@@ -3153,10 +3154,10 @@ function K() {
|
|
|
3153
3154
|
*/
|
|
3154
3155
|
encrypt: function(F, w, H, $) {
|
|
3155
3156
|
$ = this.cfg.extend($);
|
|
3156
|
-
var
|
|
3157
|
-
$.iv =
|
|
3158
|
-
var O = D.encrypt.call(this, F, w,
|
|
3159
|
-
return O.mixIn(
|
|
3157
|
+
var W = $.kdf.execute(H, F.keySize, F.ivSize, $.salt, $.hasher);
|
|
3158
|
+
$.iv = W.iv;
|
|
3159
|
+
var O = D.encrypt.call(this, F, w, W.key, $);
|
|
3160
|
+
return O.mixIn(W), O;
|
|
3160
3161
|
},
|
|
3161
3162
|
/**
|
|
3162
3163
|
* Decrypts serialized ciphertext using a password.
|
|
@@ -3177,9 +3178,9 @@ function K() {
|
|
|
3177
3178
|
*/
|
|
3178
3179
|
decrypt: function(F, w, H, $) {
|
|
3179
3180
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3180
|
-
var
|
|
3181
|
-
$.iv =
|
|
3182
|
-
var O = D.decrypt.call(this, F, w,
|
|
3181
|
+
var W = $.kdf.execute(H, F.keySize, F.ivSize, w.salt, $.hasher);
|
|
3182
|
+
$.iv = W.iv;
|
|
3183
|
+
var O = D.decrypt.call(this, F, w, W.key, $);
|
|
3183
3184
|
return O;
|
|
3184
3185
|
}
|
|
3185
3186
|
});
|
|
@@ -3189,28 +3190,28 @@ function K() {
|
|
|
3189
3190
|
}
|
|
3190
3191
|
var j0 = { exports: {} }, qt = j0.exports, ee;
|
|
3191
3192
|
function Tt() {
|
|
3192
|
-
return ee || (ee = 1, (function(r,
|
|
3193
|
+
return ee || (ee = 1, (function(r, p) {
|
|
3193
3194
|
(function(t, e, u) {
|
|
3194
|
-
r.exports = e(M(),
|
|
3195
|
+
r.exports = e(M(), X());
|
|
3195
3196
|
})(qt, function(t) {
|
|
3196
3197
|
return t.mode.CFB = (function() {
|
|
3197
3198
|
var e = t.lib.BlockCipherMode.extend();
|
|
3198
3199
|
e.Encryptor = e.extend({
|
|
3199
|
-
processBlock: function(
|
|
3200
|
+
processBlock: function(h, m) {
|
|
3200
3201
|
var B = this._cipher, C = B.blockSize;
|
|
3201
|
-
u.call(this,
|
|
3202
|
+
u.call(this, h, m, C, B), this._prevBlock = h.slice(m, m + C);
|
|
3202
3203
|
}
|
|
3203
3204
|
}), e.Decryptor = e.extend({
|
|
3204
|
-
processBlock: function(
|
|
3205
|
-
var B = this._cipher, C = B.blockSize, x =
|
|
3206
|
-
u.call(this,
|
|
3205
|
+
processBlock: function(h, m) {
|
|
3206
|
+
var B = this._cipher, C = B.blockSize, x = h.slice(m, m + C);
|
|
3207
|
+
u.call(this, h, m, C, B), this._prevBlock = x;
|
|
3207
3208
|
}
|
|
3208
3209
|
});
|
|
3209
|
-
function u(
|
|
3210
|
+
function u(h, m, B, C) {
|
|
3210
3211
|
var x, n = this._iv;
|
|
3211
3212
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3212
3213
|
for (var E = 0; E < B; E++)
|
|
3213
|
-
|
|
3214
|
+
h[m + E] ^= x[E];
|
|
3214
3215
|
}
|
|
3215
3216
|
return e;
|
|
3216
3217
|
})(), t.mode.CFB;
|
|
@@ -3219,19 +3220,19 @@ function Tt() {
|
|
|
3219
3220
|
}
|
|
3220
3221
|
var G0 = { exports: {} }, Mt = G0.exports, te;
|
|
3221
3222
|
function Nt() {
|
|
3222
|
-
return te || (te = 1, (function(r,
|
|
3223
|
+
return te || (te = 1, (function(r, p) {
|
|
3223
3224
|
(function(t, e, u) {
|
|
3224
|
-
r.exports = e(M(),
|
|
3225
|
+
r.exports = e(M(), X());
|
|
3225
3226
|
})(Mt, function(t) {
|
|
3226
3227
|
return t.mode.CTR = (function() {
|
|
3227
3228
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3228
|
-
processBlock: function(
|
|
3229
|
+
processBlock: function(h, m) {
|
|
3229
3230
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3230
3231
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3231
3232
|
var E = n.slice(0);
|
|
3232
3233
|
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3233
3234
|
for (var a = 0; a < C; a++)
|
|
3234
|
-
|
|
3235
|
+
h[m + a] ^= E[a];
|
|
3235
3236
|
}
|
|
3236
3237
|
});
|
|
3237
3238
|
return e.Decryptor = u, e;
|
|
@@ -3239,11 +3240,11 @@ function Nt() {
|
|
|
3239
3240
|
});
|
|
3240
3241
|
})(G0)), G0.exports;
|
|
3241
3242
|
}
|
|
3242
|
-
var
|
|
3243
|
+
var K0 = { exports: {} }, Ut = K0.exports, xe;
|
|
3243
3244
|
function jt() {
|
|
3244
|
-
return xe || (xe = 1, (function(r,
|
|
3245
|
+
return xe || (xe = 1, (function(r, p) {
|
|
3245
3246
|
(function(t, e, u) {
|
|
3246
|
-
r.exports = e(M(),
|
|
3247
|
+
r.exports = e(M(), X());
|
|
3247
3248
|
})(Ut, function(t) {
|
|
3248
3249
|
return t.mode.CTRGladman = (function() {
|
|
3249
3250
|
var e = t.lib.BlockCipherMode.extend();
|
|
@@ -3255,13 +3256,13 @@ function jt() {
|
|
|
3255
3256
|
B += 1 << 24;
|
|
3256
3257
|
return B;
|
|
3257
3258
|
}
|
|
3258
|
-
function
|
|
3259
|
+
function h(B) {
|
|
3259
3260
|
return (B[0] = u(B[0])) === 0 && (B[1] = u(B[1])), B;
|
|
3260
3261
|
}
|
|
3261
3262
|
var m = e.Encryptor = e.extend({
|
|
3262
3263
|
processBlock: function(B, C) {
|
|
3263
3264
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3264
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3265
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), h(a);
|
|
3265
3266
|
var s = a.slice(0);
|
|
3266
3267
|
x.encryptBlock(s, 0);
|
|
3267
3268
|
for (var f = 0; f < n; f++)
|
|
@@ -3271,43 +3272,43 @@ function jt() {
|
|
|
3271
3272
|
return e.Decryptor = m, e;
|
|
3272
3273
|
})(), t.mode.CTRGladman;
|
|
3273
3274
|
});
|
|
3274
|
-
})(
|
|
3275
|
+
})(K0)), K0.exports;
|
|
3275
3276
|
}
|
|
3276
|
-
var
|
|
3277
|
-
function
|
|
3278
|
-
return ne || (ne = 1, (function(r,
|
|
3277
|
+
var X0 = { exports: {} }, Gt = X0.exports, ne;
|
|
3278
|
+
function Kt() {
|
|
3279
|
+
return ne || (ne = 1, (function(r, p) {
|
|
3279
3280
|
(function(t, e, u) {
|
|
3280
|
-
r.exports = e(M(),
|
|
3281
|
+
r.exports = e(M(), X());
|
|
3281
3282
|
})(Gt, function(t) {
|
|
3282
3283
|
return t.mode.OFB = (function() {
|
|
3283
3284
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3284
|
-
processBlock: function(
|
|
3285
|
+
processBlock: function(h, m) {
|
|
3285
3286
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3286
3287
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3287
3288
|
for (var E = 0; E < C; E++)
|
|
3288
|
-
|
|
3289
|
+
h[m + E] ^= n[E];
|
|
3289
3290
|
}
|
|
3290
3291
|
});
|
|
3291
3292
|
return e.Decryptor = u, e;
|
|
3292
3293
|
})(), t.mode.OFB;
|
|
3293
3294
|
});
|
|
3294
|
-
})(
|
|
3295
|
+
})(X0)), X0.exports;
|
|
3295
3296
|
}
|
|
3296
|
-
var Y0 = { exports: {} },
|
|
3297
|
+
var Y0 = { exports: {} }, Xt = Y0.exports, ae;
|
|
3297
3298
|
function Yt() {
|
|
3298
|
-
return ae || (ae = 1, (function(r,
|
|
3299
|
+
return ae || (ae = 1, (function(r, p) {
|
|
3299
3300
|
(function(t, e, u) {
|
|
3300
|
-
r.exports = e(M(),
|
|
3301
|
-
})(
|
|
3301
|
+
r.exports = e(M(), X());
|
|
3302
|
+
})(Xt, function(t) {
|
|
3302
3303
|
return t.mode.ECB = (function() {
|
|
3303
3304
|
var e = t.lib.BlockCipherMode.extend();
|
|
3304
3305
|
return e.Encryptor = e.extend({
|
|
3305
|
-
processBlock: function(u,
|
|
3306
|
-
this._cipher.encryptBlock(u,
|
|
3306
|
+
processBlock: function(u, h) {
|
|
3307
|
+
this._cipher.encryptBlock(u, h);
|
|
3307
3308
|
}
|
|
3308
3309
|
}), e.Decryptor = e.extend({
|
|
3309
|
-
processBlock: function(u,
|
|
3310
|
-
this._cipher.decryptBlock(u,
|
|
3310
|
+
processBlock: function(u, h) {
|
|
3311
|
+
this._cipher.decryptBlock(u, h);
|
|
3311
3312
|
}
|
|
3312
3313
|
}), e;
|
|
3313
3314
|
})(), t.mode.ECB;
|
|
@@ -3316,13 +3317,13 @@ function Yt() {
|
|
|
3316
3317
|
}
|
|
3317
3318
|
var Z0 = { exports: {} }, Zt = Z0.exports, oe;
|
|
3318
3319
|
function Qt() {
|
|
3319
|
-
return oe || (oe = 1, (function(r,
|
|
3320
|
+
return oe || (oe = 1, (function(r, p) {
|
|
3320
3321
|
(function(t, e, u) {
|
|
3321
|
-
r.exports = e(M(),
|
|
3322
|
+
r.exports = e(M(), X());
|
|
3322
3323
|
})(Zt, function(t) {
|
|
3323
3324
|
return t.pad.AnsiX923 = {
|
|
3324
3325
|
pad: function(e, u) {
|
|
3325
|
-
var
|
|
3326
|
+
var h = e.sigBytes, m = u * 4, B = m - h % m, C = h + B - 1;
|
|
3326
3327
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3327
3328
|
},
|
|
3328
3329
|
unpad: function(e) {
|
|
@@ -3335,13 +3336,13 @@ function Qt() {
|
|
|
3335
3336
|
}
|
|
3336
3337
|
var Q0 = { exports: {} }, Vt = Q0.exports, ie;
|
|
3337
3338
|
function Jt() {
|
|
3338
|
-
return ie || (ie = 1, (function(r,
|
|
3339
|
+
return ie || (ie = 1, (function(r, p) {
|
|
3339
3340
|
(function(t, e, u) {
|
|
3340
|
-
r.exports = e(M(),
|
|
3341
|
+
r.exports = e(M(), X());
|
|
3341
3342
|
})(Vt, function(t) {
|
|
3342
3343
|
return t.pad.Iso10126 = {
|
|
3343
3344
|
pad: function(e, u) {
|
|
3344
|
-
var
|
|
3345
|
+
var h = u * 4, m = h - e.sigBytes % h;
|
|
3345
3346
|
e.concat(t.lib.WordArray.random(m - 1)).concat(t.lib.WordArray.create([m << 24], 1));
|
|
3346
3347
|
},
|
|
3347
3348
|
unpad: function(e) {
|
|
@@ -3354,9 +3355,9 @@ function Jt() {
|
|
|
3354
3355
|
}
|
|
3355
3356
|
var V0 = { exports: {} }, rx = V0.exports, se;
|
|
3356
3357
|
function ex() {
|
|
3357
|
-
return se || (se = 1, (function(r,
|
|
3358
|
+
return se || (se = 1, (function(r, p) {
|
|
3358
3359
|
(function(t, e, u) {
|
|
3359
|
-
r.exports = e(M(),
|
|
3360
|
+
r.exports = e(M(), X());
|
|
3360
3361
|
})(rx, function(t) {
|
|
3361
3362
|
return t.pad.Iso97971 = {
|
|
3362
3363
|
pad: function(e, u) {
|
|
@@ -3371,19 +3372,19 @@ function ex() {
|
|
|
3371
3372
|
}
|
|
3372
3373
|
var J0 = { exports: {} }, tx = J0.exports, ce;
|
|
3373
3374
|
function xx() {
|
|
3374
|
-
return ce || (ce = 1, (function(r,
|
|
3375
|
+
return ce || (ce = 1, (function(r, p) {
|
|
3375
3376
|
(function(t, e, u) {
|
|
3376
|
-
r.exports = e(M(),
|
|
3377
|
+
r.exports = e(M(), X());
|
|
3377
3378
|
})(tx, function(t) {
|
|
3378
3379
|
return t.pad.ZeroPadding = {
|
|
3379
3380
|
pad: function(e, u) {
|
|
3380
|
-
var
|
|
3381
|
-
e.clamp(), e.sigBytes +=
|
|
3381
|
+
var h = u * 4;
|
|
3382
|
+
e.clamp(), e.sigBytes += h - (e.sigBytes % h || h);
|
|
3382
3383
|
},
|
|
3383
3384
|
unpad: function(e) {
|
|
3384
|
-
for (var u = e.words,
|
|
3385
|
-
if (u[
|
|
3386
|
-
e.sigBytes =
|
|
3385
|
+
for (var u = e.words, h = e.sigBytes - 1, h = e.sigBytes - 1; h >= 0; h--)
|
|
3386
|
+
if (u[h >>> 2] >>> 24 - h % 4 * 8 & 255) {
|
|
3387
|
+
e.sigBytes = h + 1;
|
|
3387
3388
|
break;
|
|
3388
3389
|
}
|
|
3389
3390
|
}
|
|
@@ -3393,9 +3394,9 @@ function xx() {
|
|
|
3393
3394
|
}
|
|
3394
3395
|
var rr = { exports: {} }, nx = rr.exports, fe;
|
|
3395
3396
|
function ax() {
|
|
3396
|
-
return fe || (fe = 1, (function(r,
|
|
3397
|
+
return fe || (fe = 1, (function(r, p) {
|
|
3397
3398
|
(function(t, e, u) {
|
|
3398
|
-
r.exports = e(M(),
|
|
3399
|
+
r.exports = e(M(), X());
|
|
3399
3400
|
})(nx, function(t) {
|
|
3400
3401
|
return t.pad.NoPadding = {
|
|
3401
3402
|
pad: function() {
|
|
@@ -3408,12 +3409,12 @@ function ax() {
|
|
|
3408
3409
|
}
|
|
3409
3410
|
var er = { exports: {} }, ox = er.exports, ue;
|
|
3410
3411
|
function ix() {
|
|
3411
|
-
return ue || (ue = 1, (function(r,
|
|
3412
|
+
return ue || (ue = 1, (function(r, p) {
|
|
3412
3413
|
(function(t, e, u) {
|
|
3413
|
-
r.exports = e(M(),
|
|
3414
|
+
r.exports = e(M(), X());
|
|
3414
3415
|
})(ox, function(t) {
|
|
3415
3416
|
return (function(e) {
|
|
3416
|
-
var u = t,
|
|
3417
|
+
var u = t, h = u.lib, m = h.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
3417
3418
|
x.Hex = {
|
|
3418
3419
|
/**
|
|
3419
3420
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3455,12 +3456,12 @@ function ix() {
|
|
|
3455
3456
|
}
|
|
3456
3457
|
var tr = { exports: {} }, sx = tr.exports, de;
|
|
3457
3458
|
function cx() {
|
|
3458
|
-
return de || (de = 1, (function(r,
|
|
3459
|
+
return de || (de = 1, (function(r, p) {
|
|
3459
3460
|
(function(t, e, u) {
|
|
3460
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
3461
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3461
3462
|
})(sx, function(t) {
|
|
3462
3463
|
return (function() {
|
|
3463
|
-
var e = t, u = e.lib,
|
|
3464
|
+
var e = t, u = e.lib, h = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], v = [], l = [];
|
|
3464
3465
|
(function() {
|
|
3465
3466
|
for (var o = [], d = 0; d < 256; d++)
|
|
3466
3467
|
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
@@ -3470,10 +3471,10 @@ function cx() {
|
|
|
3470
3471
|
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3471
3472
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3472
3473
|
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3473
|
-
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16,
|
|
3474
|
+
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, v[y] = w << 8 | w >>> 24, l[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], D ^= o[o[D]]) : b = D = 1;
|
|
3474
3475
|
}
|
|
3475
3476
|
})();
|
|
3476
|
-
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES =
|
|
3477
|
+
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES = h.extend({
|
|
3477
3478
|
_doReset: function() {
|
|
3478
3479
|
var o;
|
|
3479
3480
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
@@ -3485,7 +3486,7 @@ function cx() {
|
|
|
3485
3486
|
var o = R[F];
|
|
3486
3487
|
else
|
|
3487
3488
|
var o = R[F - 4];
|
|
3488
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^
|
|
3489
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^ v[B[o >>> 8 & 255]] ^ l[B[o & 255]];
|
|
3489
3490
|
}
|
|
3490
3491
|
}
|
|
3491
3492
|
},
|
|
@@ -3494,33 +3495,33 @@ function cx() {
|
|
|
3494
3495
|
},
|
|
3495
3496
|
decryptBlock: function(o, d) {
|
|
3496
3497
|
var b = o[d + 1];
|
|
3497
|
-
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f,
|
|
3498
|
+
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f, v, l, C);
|
|
3498
3499
|
var b = o[d + 1];
|
|
3499
3500
|
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3500
3501
|
},
|
|
3501
3502
|
_doCryptBlock: function(o, d, b, D, y, k, R, F) {
|
|
3502
|
-
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1],
|
|
3503
|
-
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[
|
|
3504
|
-
H = T, $ = N,
|
|
3503
|
+
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1], W = o[d + 2] ^ b[2], O = o[d + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3504
|
+
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[W >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = D[$ >>> 24] ^ y[W >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = D[W >>> 24] ^ y[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ R[$ & 255] ^ b[q++], S = D[O >>> 24] ^ y[H >>> 16 & 255] ^ k[$ >>> 8 & 255] ^ R[W & 255] ^ b[q++];
|
|
3505
|
+
H = T, $ = N, W = j, O = S;
|
|
3505
3506
|
}
|
|
3506
|
-
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[
|
|
3507
|
+
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[W >>> 8 & 255] << 8 | F[O & 255]) ^ b[q++], N = (F[$ >>> 24] << 24 | F[W >>> 16 & 255] << 16 | F[O >>> 8 & 255] << 8 | F[H & 255]) ^ b[q++], j = (F[W >>> 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[W & 255]) ^ b[q++];
|
|
3507
3508
|
o[d] = T, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3508
3509
|
},
|
|
3509
3510
|
keySize: 256 / 32
|
|
3510
3511
|
});
|
|
3511
|
-
e.AES =
|
|
3512
|
+
e.AES = h._createHelper(i);
|
|
3512
3513
|
})(), t.AES;
|
|
3513
3514
|
});
|
|
3514
3515
|
})(tr)), tr.exports;
|
|
3515
3516
|
}
|
|
3516
3517
|
var xr = { exports: {} }, fx = xr.exports, le;
|
|
3517
3518
|
function ux() {
|
|
3518
|
-
return le || (le = 1, (function(r,
|
|
3519
|
+
return le || (le = 1, (function(r, p) {
|
|
3519
3520
|
(function(t, e, u) {
|
|
3520
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
3521
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3521
3522
|
})(fx, function(t) {
|
|
3522
3523
|
return (function() {
|
|
3523
|
-
var e = t, u = e.lib,
|
|
3524
|
+
var e = t, u = e.lib, h = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
3524
3525
|
57,
|
|
3525
3526
|
49,
|
|
3526
3527
|
41,
|
|
@@ -4188,14 +4189,14 @@ function ux() {
|
|
|
4188
4189
|
this._doCryptBlock(g, i, this._invSubKeys);
|
|
4189
4190
|
},
|
|
4190
4191
|
_doCryptBlock: function(g, i, o) {
|
|
4191
|
-
this._lBlock = g[i], this._rBlock = g[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535),
|
|
4192
|
+
this._lBlock = g[i], this._rBlock = g[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535), v.call(this, 2, 858993459), v.call(this, 8, 16711935), f.call(this, 1, 1431655765);
|
|
4192
4193
|
for (var d = 0; d < 16; d++) {
|
|
4193
4194
|
for (var b = o[d], D = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4194
4195
|
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4195
4196
|
this._lBlock = y, this._rBlock = D ^ k;
|
|
4196
4197
|
}
|
|
4197
4198
|
var F = this._lBlock;
|
|
4198
|
-
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765),
|
|
4199
|
+
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765), v.call(this, 8, 16711935), v.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135), g[i] = this._lBlock, g[i + 1] = this._rBlock;
|
|
4199
4200
|
},
|
|
4200
4201
|
keySize: 64 / 32,
|
|
4201
4202
|
ivSize: 64 / 32,
|
|
@@ -4205,7 +4206,7 @@ function ux() {
|
|
|
4205
4206
|
var o = (this._lBlock >>> g ^ this._rBlock) & i;
|
|
4206
4207
|
this._rBlock ^= o, this._lBlock ^= o << g;
|
|
4207
4208
|
}
|
|
4208
|
-
function
|
|
4209
|
+
function v(g, i) {
|
|
4209
4210
|
var o = (this._rBlock >>> g ^ this._lBlock) & i;
|
|
4210
4211
|
this._lBlock ^= o, this._rBlock ^= o << g;
|
|
4211
4212
|
}
|
|
@@ -4216,7 +4217,7 @@ function ux() {
|
|
|
4216
4217
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4217
4218
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4218
4219
|
var o = i.slice(0, 2), d = 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(
|
|
4220
|
+
this._des1 = s.createEncryptor(h.create(o)), this._des2 = s.createEncryptor(h.create(d)), this._des3 = s.createEncryptor(h.create(b));
|
|
4220
4221
|
},
|
|
4221
4222
|
encryptBlock: function(g, i) {
|
|
4222
4223
|
this._des1.encryptBlock(g, i), this._des2.decryptBlock(g, i), this._des3.encryptBlock(g, i);
|
|
@@ -4235,20 +4236,20 @@ function ux() {
|
|
|
4235
4236
|
}
|
|
4236
4237
|
var nr = { exports: {} }, dx = nr.exports, he;
|
|
4237
4238
|
function lx() {
|
|
4238
|
-
return he || (he = 1, (function(r,
|
|
4239
|
+
return he || (he = 1, (function(r, p) {
|
|
4239
4240
|
(function(t, e, u) {
|
|
4240
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4241
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4241
4242
|
})(dx, function(t) {
|
|
4242
4243
|
return (function() {
|
|
4243
|
-
var e = t, u = e.lib,
|
|
4244
|
+
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = m.RC4 = h.extend({
|
|
4244
4245
|
_doReset: function() {
|
|
4245
4246
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4246
4247
|
s[f] = f;
|
|
4247
|
-
for (var f = 0,
|
|
4248
|
+
for (var f = 0, v = 0; f < 256; f++) {
|
|
4248
4249
|
var l = f % a, g = E[l >>> 2] >>> 24 - l % 4 * 8 & 255;
|
|
4249
|
-
|
|
4250
|
+
v = (v + s[f] + g) % 256;
|
|
4250
4251
|
var i = s[f];
|
|
4251
|
-
s[f] = s[
|
|
4252
|
+
s[f] = s[v], s[v] = i;
|
|
4252
4253
|
}
|
|
4253
4254
|
this._i = this._j = 0;
|
|
4254
4255
|
},
|
|
@@ -4261,12 +4262,12 @@ function lx() {
|
|
|
4261
4262
|
function C() {
|
|
4262
4263
|
for (var n = this._S, E = this._i, a = this._j, s = 0, f = 0; f < 4; f++) {
|
|
4263
4264
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4264
|
-
var
|
|
4265
|
-
n[E] = n[a], n[a] =
|
|
4265
|
+
var v = n[E];
|
|
4266
|
+
n[E] = n[a], n[a] = v, s |= n[(n[E] + n[a]) % 256] << 24 - f * 8;
|
|
4266
4267
|
}
|
|
4267
4268
|
return this._i = E, this._j = a, s;
|
|
4268
4269
|
}
|
|
4269
|
-
e.RC4 =
|
|
4270
|
+
e.RC4 = h._createHelper(B);
|
|
4270
4271
|
var x = m.RC4Drop = B.extend({
|
|
4271
4272
|
/**
|
|
4272
4273
|
* Configuration options.
|
|
@@ -4282,23 +4283,23 @@ function lx() {
|
|
|
4282
4283
|
C.call(this);
|
|
4283
4284
|
}
|
|
4284
4285
|
});
|
|
4285
|
-
e.RC4Drop =
|
|
4286
|
+
e.RC4Drop = h._createHelper(x);
|
|
4286
4287
|
})(), t.RC4;
|
|
4287
4288
|
});
|
|
4288
4289
|
})(nr)), nr.exports;
|
|
4289
4290
|
}
|
|
4290
4291
|
var ar = { exports: {} }, hx = ar.exports, ve;
|
|
4291
4292
|
function vx() {
|
|
4292
|
-
return ve || (ve = 1, (function(r,
|
|
4293
|
+
return ve || (ve = 1, (function(r, p) {
|
|
4293
4294
|
(function(t, e, u) {
|
|
4294
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4295
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4295
4296
|
})(hx, function(t) {
|
|
4296
4297
|
return (function() {
|
|
4297
|
-
var e = t, u = e.lib,
|
|
4298
|
+
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = h.extend({
|
|
4298
4299
|
_doReset: function() {
|
|
4299
4300
|
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4300
4301
|
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
4301
|
-
var
|
|
4302
|
+
var v = this._X = [
|
|
4302
4303
|
a[0],
|
|
4303
4304
|
a[3] << 16 | a[2] >>> 16,
|
|
4304
4305
|
a[1],
|
|
@@ -4321,7 +4322,7 @@ function vx() {
|
|
|
4321
4322
|
for (var f = 0; f < 4; f++)
|
|
4322
4323
|
E.call(this);
|
|
4323
4324
|
for (var f = 0; f < 8; f++)
|
|
4324
|
-
l[f] ^=
|
|
4325
|
+
l[f] ^= v[f + 4 & 7];
|
|
4325
4326
|
if (s) {
|
|
4326
4327
|
var g = s.words, i = g[0], o = g[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4327
4328
|
l[0] ^= d, l[1] ^= D, l[2] ^= b, l[3] ^= y, l[4] ^= d, l[5] ^= D, l[6] ^= b, l[7] ^= y;
|
|
@@ -4332,8 +4333,8 @@ function vx() {
|
|
|
4332
4333
|
_doProcessBlock: function(a, s) {
|
|
4333
4334
|
var f = this._X;
|
|
4334
4335
|
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;
|
|
4335
|
-
for (var
|
|
4336
|
-
B[
|
|
4336
|
+
for (var v = 0; v < 4; v++)
|
|
4337
|
+
B[v] = (B[v] << 8 | B[v] >>> 24) & 16711935 | (B[v] << 24 | B[v] >>> 8) & 4278255360, a[s + v] ^= B[v];
|
|
4337
4338
|
},
|
|
4338
4339
|
blockSize: 128 / 32,
|
|
4339
4340
|
ivSize: 64 / 32
|
|
@@ -4343,24 +4344,24 @@ function vx() {
|
|
|
4343
4344
|
C[f] = s[f];
|
|
4344
4345
|
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;
|
|
4345
4346
|
for (var f = 0; f < 8; f++) {
|
|
4346
|
-
var
|
|
4347
|
+
var v = a[f] + s[f], l = v & 65535, g = v >>> 16, i = ((l * l >>> 17) + l * g >>> 15) + g * g, o = ((v & 4294901760) * v | 0) + ((v & 65535) * v | 0);
|
|
4347
4348
|
x[f] = i ^ o;
|
|
4348
4349
|
}
|
|
4349
4350
|
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;
|
|
4350
4351
|
}
|
|
4351
|
-
e.Rabbit =
|
|
4352
|
+
e.Rabbit = h._createHelper(n);
|
|
4352
4353
|
})(), t.Rabbit;
|
|
4353
4354
|
});
|
|
4354
4355
|
})(ar)), ar.exports;
|
|
4355
4356
|
}
|
|
4356
4357
|
var or = { exports: {} }, px = or.exports, pe;
|
|
4357
4358
|
function Bx() {
|
|
4358
|
-
return pe || (pe = 1, (function(r,
|
|
4359
|
+
return pe || (pe = 1, (function(r, p) {
|
|
4359
4360
|
(function(t, e, u) {
|
|
4360
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4361
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4361
4362
|
})(px, function(t) {
|
|
4362
4363
|
return (function() {
|
|
4363
|
-
var e = t, u = e.lib,
|
|
4364
|
+
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = h.extend({
|
|
4364
4365
|
_doReset: function() {
|
|
4365
4366
|
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4366
4367
|
a[0],
|
|
@@ -4371,7 +4372,7 @@ function Bx() {
|
|
|
4371
4372
|
a[1] << 16 | a[0] >>> 16,
|
|
4372
4373
|
a[3],
|
|
4373
4374
|
a[2] << 16 | a[1] >>> 16
|
|
4374
|
-
],
|
|
4375
|
+
], v = this._C = [
|
|
4375
4376
|
a[2] << 16 | a[2] >>> 16,
|
|
4376
4377
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4377
4378
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4385,10 +4386,10 @@ function Bx() {
|
|
|
4385
4386
|
for (var l = 0; l < 4; l++)
|
|
4386
4387
|
E.call(this);
|
|
4387
4388
|
for (var l = 0; l < 8; l++)
|
|
4388
|
-
|
|
4389
|
+
v[l] ^= f[l + 4 & 7];
|
|
4389
4390
|
if (s) {
|
|
4390
4391
|
var g = s.words, i = g[0], o = g[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4391
|
-
|
|
4392
|
+
v[0] ^= d, v[1] ^= D, v[2] ^= b, v[3] ^= y, v[4] ^= d, v[5] ^= D, v[6] ^= b, v[7] ^= y;
|
|
4392
4393
|
for (var l = 0; l < 4; l++)
|
|
4393
4394
|
E.call(this);
|
|
4394
4395
|
}
|
|
@@ -4396,8 +4397,8 @@ function Bx() {
|
|
|
4396
4397
|
_doProcessBlock: function(a, s) {
|
|
4397
4398
|
var f = this._X;
|
|
4398
4399
|
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;
|
|
4399
|
-
for (var
|
|
4400
|
-
B[
|
|
4400
|
+
for (var v = 0; v < 4; v++)
|
|
4401
|
+
B[v] = (B[v] << 8 | B[v] >>> 24) & 16711935 | (B[v] << 24 | B[v] >>> 8) & 4278255360, a[s + v] ^= B[v];
|
|
4401
4402
|
},
|
|
4402
4403
|
blockSize: 128 / 32,
|
|
4403
4404
|
ivSize: 64 / 32
|
|
@@ -4407,24 +4408,24 @@ function Bx() {
|
|
|
4407
4408
|
C[f] = s[f];
|
|
4408
4409
|
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;
|
|
4409
4410
|
for (var f = 0; f < 8; f++) {
|
|
4410
|
-
var
|
|
4411
|
+
var v = a[f] + s[f], l = v & 65535, g = v >>> 16, i = ((l * l >>> 17) + l * g >>> 15) + g * g, o = ((v & 4294901760) * v | 0) + ((v & 65535) * v | 0);
|
|
4411
4412
|
x[f] = i ^ o;
|
|
4412
4413
|
}
|
|
4413
4414
|
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;
|
|
4414
4415
|
}
|
|
4415
|
-
e.RabbitLegacy =
|
|
4416
|
+
e.RabbitLegacy = h._createHelper(n);
|
|
4416
4417
|
})(), t.RabbitLegacy;
|
|
4417
4418
|
});
|
|
4418
4419
|
})(or)), or.exports;
|
|
4419
4420
|
}
|
|
4420
4421
|
var ir = { exports: {} }, Cx = ir.exports, Be;
|
|
4421
4422
|
function Ex() {
|
|
4422
|
-
return Be || (Be = 1, (function(r,
|
|
4423
|
+
return Be || (Be = 1, (function(r, p) {
|
|
4423
4424
|
(function(t, e, u) {
|
|
4424
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4425
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4425
4426
|
})(Cx, function(t) {
|
|
4426
4427
|
return (function() {
|
|
4427
|
-
var e = t, u = e.lib,
|
|
4428
|
+
var e = t, u = e.lib, h = u.BlockCipher, m = e.algo;
|
|
4428
4429
|
const B = 16, C = [
|
|
4429
4430
|
608135816,
|
|
4430
4431
|
2242054355,
|
|
@@ -5515,7 +5516,7 @@ function Ex() {
|
|
|
5515
5516
|
D = a(l, d, b), d = D.left, b = D.right, l.sbox[y][k] = d, l.sbox[y][k + 1] = b;
|
|
5516
5517
|
return !0;
|
|
5517
5518
|
}
|
|
5518
|
-
var
|
|
5519
|
+
var v = m.Blowfish = h.extend({
|
|
5519
5520
|
_doReset: function() {
|
|
5520
5521
|
if (this._keyPriorReset !== this._key) {
|
|
5521
5522
|
var l = this._keyPriorReset = this._key, g = l.words, i = l.sigBytes / 4;
|
|
@@ -5534,16 +5535,16 @@ function Ex() {
|
|
|
5534
5535
|
keySize: 128 / 32,
|
|
5535
5536
|
ivSize: 64 / 32
|
|
5536
5537
|
});
|
|
5537
|
-
e.Blowfish =
|
|
5538
|
+
e.Blowfish = h._createHelper(v);
|
|
5538
5539
|
})(), t.Blowfish;
|
|
5539
5540
|
});
|
|
5540
5541
|
})(ir)), ir.exports;
|
|
5541
5542
|
}
|
|
5542
5543
|
var Ax = _0.exports, Ce;
|
|
5543
5544
|
function Fx() {
|
|
5544
|
-
return Ce || (Ce = 1, (function(r,
|
|
5545
|
+
return Ce || (Ce = 1, (function(r, p) {
|
|
5545
5546
|
(function(t, e, u) {
|
|
5546
|
-
r.exports = e(M(),
|
|
5547
|
+
r.exports = e(M(), ur(), Bt(), Et(), i0(), Dt(), s0(), ye(), Er(), yt(), we(), St(), $t(), Pt(), Ar(), It(), a0(), X(), Tt(), Nt(), jt(), Kt(), Yt(), Qt(), Jt(), ex(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex());
|
|
5547
5548
|
})(Ax, function(t) {
|
|
5548
5549
|
return t;
|
|
5549
5550
|
});
|
|
@@ -5564,11 +5565,11 @@ function gx() {
|
|
|
5564
5565
|
};
|
|
5565
5566
|
}
|
|
5566
5567
|
function bx(r) {
|
|
5567
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5568
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.140`;
|
|
5568
5569
|
}
|
|
5569
|
-
function mx(r,
|
|
5570
|
+
function mx(r, p) {
|
|
5570
5571
|
const t = bx(r);
|
|
5571
|
-
return new Worker(t, { type: "module", ...
|
|
5572
|
+
return new Worker(t, { type: "module", ...p });
|
|
5572
5573
|
}
|
|
5573
5574
|
const Fr = () => {
|
|
5574
5575
|
try {
|
|
@@ -5580,27 +5581,27 @@ const Fr = () => {
|
|
|
5580
5581
|
Fr();
|
|
5581
5582
|
}, Ee = (...r) => {
|
|
5582
5583
|
Fr();
|
|
5583
|
-
}, Ae = /* @__PURE__ */ new Map(),
|
|
5584
|
+
}, Ae = /* @__PURE__ */ new Map(), pr = /* @__PURE__ */ new Map();
|
|
5584
5585
|
let _x = 0;
|
|
5585
5586
|
function yx(r) {
|
|
5586
|
-
const
|
|
5587
|
-
if (
|
|
5587
|
+
const p = Ae.get(r);
|
|
5588
|
+
if (p) return p;
|
|
5588
5589
|
const t = mx("./deform.worker.ts");
|
|
5589
5590
|
try {
|
|
5590
5591
|
t.postMessage({ type: "SET_DEBUG", debugRender: Fr() });
|
|
5591
5592
|
} catch {
|
|
5592
5593
|
}
|
|
5593
5594
|
t.onmessage = (u) => {
|
|
5594
|
-
const { id:
|
|
5595
|
-
b0(`[renderService] deform worker 响应 id=${
|
|
5595
|
+
const { id: h, imageBitmap: m, error: B, duration: C } = u.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5596
|
+
b0(`[renderService] deform worker 响应 id=${h}${x}`, {
|
|
5596
5597
|
hasImageBitmap: !!m,
|
|
5597
5598
|
width: m?.width,
|
|
5598
5599
|
height: m?.height,
|
|
5599
5600
|
error: B
|
|
5600
5601
|
});
|
|
5601
|
-
const n =
|
|
5602
|
+
const n = pr.get(h);
|
|
5602
5603
|
if (n) {
|
|
5603
|
-
if (
|
|
5604
|
+
if (pr.delete(h), B) {
|
|
5604
5605
|
n.reject(new Error(B));
|
|
5605
5606
|
return;
|
|
5606
5607
|
}
|
|
@@ -5635,10 +5636,10 @@ function wx(r) {
|
|
|
5635
5636
|
type: r.type,
|
|
5636
5637
|
blendMode: r.blendMode,
|
|
5637
5638
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5638
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5639
|
-
x:
|
|
5640
|
-
y:
|
|
5641
|
-
type:
|
|
5639
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((p) => ({
|
|
5640
|
+
x: p.x,
|
|
5641
|
+
y: p.y,
|
|
5642
|
+
type: p.type
|
|
5642
5643
|
})) : [],
|
|
5643
5644
|
bounds: r.bounds ? {
|
|
5644
5645
|
width: r.bounds.width,
|
|
@@ -5661,30 +5662,30 @@ function wx(r) {
|
|
|
5661
5662
|
layerOrder: r.layerOrder,
|
|
5662
5663
|
imagePath: r.imagePath,
|
|
5663
5664
|
vectorMask: r.vectorMask ? {
|
|
5664
|
-
paths: r.vectorMask.paths?.map((
|
|
5665
|
-
open:
|
|
5666
|
-
knots:
|
|
5665
|
+
paths: r.vectorMask.paths?.map((p) => ({
|
|
5666
|
+
open: p.open,
|
|
5667
|
+
knots: p.knots?.map((t) => ({
|
|
5667
5668
|
linked: t.linked,
|
|
5668
5669
|
points: [...t.points]
|
|
5669
5670
|
})),
|
|
5670
|
-
fillRule:
|
|
5671
|
-
operation:
|
|
5671
|
+
fillRule: p.fillRule,
|
|
5672
|
+
operation: p.operation
|
|
5672
5673
|
})),
|
|
5673
|
-
points: r.vectorMask.points?.map((
|
|
5674
|
-
x:
|
|
5675
|
-
y:
|
|
5676
|
-
type:
|
|
5674
|
+
points: r.vectorMask.points?.map((p) => ({
|
|
5675
|
+
x: p.x,
|
|
5676
|
+
y: p.y,
|
|
5677
|
+
type: p.type
|
|
5677
5678
|
})),
|
|
5678
5679
|
invert: r.vectorMask.invert,
|
|
5679
5680
|
notLink: r.vectorMask.notLink,
|
|
5680
5681
|
disable: r.vectorMask.disable,
|
|
5681
5682
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5682
5683
|
} : void 0,
|
|
5683
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5684
|
-
type:
|
|
5685
|
-
enabled:
|
|
5686
|
-
filter:
|
|
5687
|
-
puppetShapeList:
|
|
5684
|
+
filterList: r.filterList ? r.filterList.map((p) => ({
|
|
5685
|
+
type: p.type,
|
|
5686
|
+
enabled: p.enabled,
|
|
5687
|
+
filter: p.filter ? {
|
|
5688
|
+
puppetShapeList: p.filter.puppetShapeList?.map((t) => ({
|
|
5688
5689
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5689
5690
|
x: e.x,
|
|
5690
5691
|
y: e.y
|
|
@@ -5701,33 +5702,33 @@ function wx(r) {
|
|
|
5701
5702
|
clipping: r.clipping
|
|
5702
5703
|
};
|
|
5703
5704
|
}
|
|
5704
|
-
function kx(r,
|
|
5705
|
-
const u = ++_x,
|
|
5705
|
+
function kx(r, p, t, e) {
|
|
5706
|
+
const u = ++_x, h = yx(t);
|
|
5706
5707
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5707
|
-
|
|
5708
|
+
pr.set(u, {
|
|
5708
5709
|
resolve: (x) => {
|
|
5709
5710
|
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5710
5711
|
},
|
|
5711
5712
|
reject: B
|
|
5712
5713
|
});
|
|
5713
|
-
const C = wx(
|
|
5714
|
-
|
|
5714
|
+
const C = wx(p);
|
|
5715
|
+
h.postMessage({ id: u, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5715
5716
|
r
|
|
5716
5717
|
]);
|
|
5717
5718
|
});
|
|
5718
5719
|
}
|
|
5719
|
-
async function Sx(r,
|
|
5720
|
-
const m = await it(r, u,
|
|
5720
|
+
async function Sx(r, p, t = 0, e, u, h) {
|
|
5721
|
+
const m = await it(r, u, h);
|
|
5721
5722
|
if (!m || m.width === 0 || m.height === 0)
|
|
5722
5723
|
throw new Error("图片无效:尺寸为 0");
|
|
5723
|
-
return await kx(m,
|
|
5724
|
+
return await kx(m, p, t, e);
|
|
5724
5725
|
}
|
|
5725
|
-
function d0(r,
|
|
5726
|
+
function d0(r, p) {
|
|
5726
5727
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5727
|
-
return new OffscreenCanvas(r,
|
|
5728
|
+
return new OffscreenCanvas(r, p);
|
|
5728
5729
|
if (typeof document < "u") {
|
|
5729
5730
|
const t = document.createElement("canvas");
|
|
5730
|
-
return t.width = r, t.height =
|
|
5731
|
+
return t.width = r, t.height = p, t;
|
|
5731
5732
|
} else
|
|
5732
5733
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5733
5734
|
}
|
|
@@ -5735,13 +5736,13 @@ function A0(r) {
|
|
|
5735
5736
|
return r.getContext("2d");
|
|
5736
5737
|
}
|
|
5737
5738
|
function Fe(r) {
|
|
5738
|
-
const
|
|
5739
|
-
if (!
|
|
5739
|
+
const p = A0(r);
|
|
5740
|
+
if (!p)
|
|
5740
5741
|
throw new Error("无法创建 canvas context");
|
|
5741
|
-
return
|
|
5742
|
+
return p;
|
|
5742
5743
|
}
|
|
5743
5744
|
async function Hx(r) {
|
|
5744
|
-
const
|
|
5745
|
+
const p = performance.now(), t = () => {
|
|
5745
5746
|
try {
|
|
5746
5747
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5747
5748
|
} catch {
|
|
@@ -5752,7 +5753,7 @@ async function Hx(r) {
|
|
|
5752
5753
|
}, u = (...c) => {
|
|
5753
5754
|
t();
|
|
5754
5755
|
}, {
|
|
5755
|
-
psdJson:
|
|
5756
|
+
psdJson: h,
|
|
5756
5757
|
materialList: m,
|
|
5757
5758
|
fabricScreenshotList: B,
|
|
5758
5759
|
width: C,
|
|
@@ -5760,8 +5761,8 @@ async function Hx(r) {
|
|
|
5760
5761
|
baseUrl: n
|
|
5761
5762
|
} = r, E = r.maxImageSize;
|
|
5762
5763
|
e("[renderByJson] 接收到的数据:", {
|
|
5763
|
-
psdJsonLayerCount:
|
|
5764
|
-
psdJsonLayers:
|
|
5764
|
+
psdJsonLayerCount: h.layerList?.length || 0,
|
|
5765
|
+
psdJsonLayers: h.layerList?.map((c) => ({
|
|
5765
5766
|
name: c.name,
|
|
5766
5767
|
type: c.type,
|
|
5767
5768
|
id: c.id,
|
|
@@ -5799,10 +5800,10 @@ async function Hx(r) {
|
|
|
5799
5800
|
url: c.url
|
|
5800
5801
|
}), f.set(c.layerName, c.url));
|
|
5801
5802
|
}
|
|
5802
|
-
const
|
|
5803
|
+
const v = /* @__PURE__ */ new Map();
|
|
5803
5804
|
for (const c of B)
|
|
5804
|
-
|
|
5805
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(
|
|
5805
|
+
v.set(c.id, c.url);
|
|
5806
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(v.entries())), e("[renderByJson] psdJson.layerList 结构:", h.layerList?.map((c) => ({
|
|
5806
5807
|
name: c.name,
|
|
5807
5808
|
type: c.type,
|
|
5808
5809
|
id: c.id,
|
|
@@ -5813,28 +5814,28 @@ async function Hx(r) {
|
|
|
5813
5814
|
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5814
5815
|
if (c.type === "Layer") {
|
|
5815
5816
|
if (c.imagePath) {
|
|
5816
|
-
const
|
|
5817
|
+
const z = m.find((P) => {
|
|
5817
5818
|
const L = P.sourceName || P.layerName;
|
|
5818
5819
|
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5819
5820
|
});
|
|
5820
|
-
|
|
5821
|
-
url:
|
|
5821
|
+
z && (s[c.imagePath] = {
|
|
5822
|
+
url: z.url
|
|
5822
5823
|
});
|
|
5823
5824
|
}
|
|
5824
5825
|
if (c.name) {
|
|
5825
5826
|
if (_) {
|
|
5826
|
-
const
|
|
5827
|
+
const z = `${_}-${c.name}`, P = m.find((L) => {
|
|
5827
5828
|
const I = L.sourceName || L.layerName;
|
|
5828
5829
|
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5829
5830
|
});
|
|
5830
|
-
P && (s[
|
|
5831
|
+
P && (s[z] = {
|
|
5831
5832
|
url: P.url
|
|
5832
5833
|
});
|
|
5833
5834
|
}
|
|
5834
5835
|
if (c.imagePath && c.name) {
|
|
5835
|
-
const
|
|
5836
|
+
const z = c.imagePath.split("/").pop() || c.imagePath, P = m.find((L) => {
|
|
5836
5837
|
const I = L.sourceName || L.layerName;
|
|
5837
|
-
return I ? (I.split("/").pop() || I) ===
|
|
5838
|
+
return I ? (I.split("/").pop() || I) === z : !1;
|
|
5838
5839
|
});
|
|
5839
5840
|
P && (s[c.imagePath] = {
|
|
5840
5841
|
url: P.url
|
|
@@ -5843,37 +5844,37 @@ async function Hx(r) {
|
|
|
5843
5844
|
}
|
|
5844
5845
|
}
|
|
5845
5846
|
if (c.children)
|
|
5846
|
-
for (const
|
|
5847
|
-
|
|
5847
|
+
for (const z of c.children)
|
|
5848
|
+
z && l(z, _);
|
|
5848
5849
|
}
|
|
5849
5850
|
function g(c, A) {
|
|
5850
5851
|
const _ = c.id ?? A;
|
|
5851
5852
|
if (c.type === "Group" && _)
|
|
5852
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${
|
|
5853
|
-
const
|
|
5854
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${
|
|
5853
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${v.has(_)}`), v.has(_)) {
|
|
5854
|
+
const z = v.get(_);
|
|
5855
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${z.substring(0, 50)}...`), c.children) {
|
|
5855
5856
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5856
5857
|
for (const P of c.children)
|
|
5857
5858
|
if (P && P.isSmartObject === !0) {
|
|
5858
5859
|
const L = P?.name || "";
|
|
5859
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5860
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = z, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${z.substring(0, 50)}...`)) : u("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5860
5861
|
}
|
|
5861
5862
|
} else
|
|
5862
5863
|
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5863
5864
|
} else
|
|
5864
5865
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5865
5866
|
if (c.children)
|
|
5866
|
-
for (const
|
|
5867
|
-
|
|
5867
|
+
for (const z of c.children)
|
|
5868
|
+
z && g(z, _);
|
|
5868
5869
|
}
|
|
5869
|
-
if (
|
|
5870
|
-
for (const c of
|
|
5870
|
+
if (h.layerList)
|
|
5871
|
+
for (const c of h.layerList)
|
|
5871
5872
|
c && l(c);
|
|
5872
|
-
if (
|
|
5873
|
-
for (const c of
|
|
5873
|
+
if (h.layerList)
|
|
5874
|
+
for (const c of h.layerList)
|
|
5874
5875
|
c && g(c);
|
|
5875
5876
|
const o = Ye([{
|
|
5876
|
-
psdJson:
|
|
5877
|
+
psdJson: h,
|
|
5877
5878
|
layerExtrasByName: s
|
|
5878
5879
|
}], {
|
|
5879
5880
|
parts: [],
|
|
@@ -5891,14 +5892,14 @@ async function Hx(r) {
|
|
|
5891
5892
|
const A = c.url.split("/").pop() || c.url;
|
|
5892
5893
|
if (s[A])
|
|
5893
5894
|
return s[A];
|
|
5894
|
-
const _ = m.find((
|
|
5895
|
-
const P =
|
|
5895
|
+
const _ = m.find((z) => {
|
|
5896
|
+
const P = z.sourceName || z.layerName;
|
|
5896
5897
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5897
5898
|
});
|
|
5898
5899
|
if (_) {
|
|
5899
|
-
const
|
|
5900
|
-
if (
|
|
5901
|
-
return s[
|
|
5900
|
+
const z = _.sourceName || _.layerName;
|
|
5901
|
+
if (z)
|
|
5902
|
+
return s[z] || { url: _.url };
|
|
5902
5903
|
}
|
|
5903
5904
|
}
|
|
5904
5905
|
};
|
|
@@ -5909,7 +5910,7 @@ async function Hx(r) {
|
|
|
5909
5910
|
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5910
5911
|
continue;
|
|
5911
5912
|
}
|
|
5912
|
-
const
|
|
5913
|
+
const z = _.url, P = a(z);
|
|
5913
5914
|
if (!P) {
|
|
5914
5915
|
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5915
5916
|
continue;
|
|
@@ -5923,17 +5924,17 @@ async function Hx(r) {
|
|
|
5923
5924
|
} else if (A.type === F0.Group) {
|
|
5924
5925
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5925
5926
|
continue;
|
|
5926
|
-
for (let
|
|
5927
|
-
const P = A.smartObjects[
|
|
5927
|
+
for (let z = 0; z < A.smartObjects.length; z++) {
|
|
5928
|
+
const P = A.smartObjects[z];
|
|
5928
5929
|
if (!P || !P.name)
|
|
5929
5930
|
continue;
|
|
5930
5931
|
let L = s[P.name] ?? _;
|
|
5931
5932
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5932
|
-
const
|
|
5933
|
-
if (L = s[
|
|
5933
|
+
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5934
|
+
if (L = s[K], !L) {
|
|
5934
5935
|
const G = m.find((Y) => {
|
|
5935
|
-
const
|
|
5936
|
-
return !
|
|
5936
|
+
const e0 = Y.sourceName || Y.layerName;
|
|
5937
|
+
return !e0 || !P.imagePath ? !1 : (e0.split("/").pop() || e0) === K || e0 === P.imagePath || e0.endsWith(P.imagePath) || P.imagePath.endsWith(e0);
|
|
5937
5938
|
});
|
|
5938
5939
|
G && (L = { url: G.url });
|
|
5939
5940
|
}
|
|
@@ -5950,9 +5951,9 @@ async function Hx(r) {
|
|
|
5950
5951
|
continue;
|
|
5951
5952
|
I = G;
|
|
5952
5953
|
}
|
|
5953
|
-
const Z = (A.partId ?? A.id) * 100 +
|
|
5954
|
+
const Z = (A.partId ?? A.id) * 100 + z, Q = Qe(Ze(P)), o0 = { width: b, height: D };
|
|
5954
5955
|
R.push({
|
|
5955
|
-
index: c +
|
|
5956
|
+
index: c + z * 0.01,
|
|
5956
5957
|
type: "group",
|
|
5957
5958
|
partData: A,
|
|
5958
5959
|
smartObject: P,
|
|
@@ -5964,7 +5965,7 @@ async function Hx(r) {
|
|
|
5964
5965
|
o0,
|
|
5965
5966
|
E,
|
|
5966
5967
|
n
|
|
5967
|
-
).catch((
|
|
5968
|
+
).catch((K) => null)
|
|
5968
5969
|
});
|
|
5969
5970
|
}
|
|
5970
5971
|
}
|
|
@@ -5973,75 +5974,75 @@ async function Hx(r) {
|
|
|
5973
5974
|
task: c,
|
|
5974
5975
|
imageBitmap: w[A]
|
|
5975
5976
|
})).sort((c, A) => {
|
|
5976
|
-
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index,
|
|
5977
|
-
return _ -
|
|
5977
|
+
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, z = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
5978
|
+
return _ - z;
|
|
5978
5979
|
});
|
|
5979
|
-
let $ = d0(b, D),
|
|
5980
|
+
let $ = d0(b, D), W = A0($), O = !1, q = "normal";
|
|
5980
5981
|
for (let c = 0; c < H.length; c++) {
|
|
5981
5982
|
const { task: A, imageBitmap: _ } = H[c];
|
|
5982
5983
|
if (!_) {
|
|
5983
5984
|
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5984
5985
|
continue;
|
|
5985
5986
|
}
|
|
5986
|
-
const { partData:
|
|
5987
|
+
const { partData: z } = A, P = z.bounds;
|
|
5987
5988
|
let L;
|
|
5988
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
5989
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? z.opacity : L = z.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
5989
5990
|
let I;
|
|
5990
|
-
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ??
|
|
5991
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? z.clipping === !0 : I = z.clipping === !0;
|
|
5991
5992
|
const Z = H[c + 1];
|
|
5992
5993
|
let Q = !1;
|
|
5993
5994
|
if (Z) {
|
|
5994
|
-
const
|
|
5995
|
-
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ??
|
|
5995
|
+
const K = Z.task.partData;
|
|
5996
|
+
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
5996
5997
|
}
|
|
5997
|
-
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
5998
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : z?.name || "未命名图层";
|
|
5998
5999
|
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
5999
6000
|
type: A.type,
|
|
6000
6001
|
bitmapSize: { width: _.width, height: _.height },
|
|
6001
6002
|
bounds: P,
|
|
6002
6003
|
hasMask: !!A.maskData,
|
|
6003
|
-
blendMode:
|
|
6004
|
+
blendMode: z.blendMode,
|
|
6004
6005
|
opacity: L,
|
|
6005
6006
|
clipping: I
|
|
6006
6007
|
}), !I && Q) {
|
|
6007
|
-
if (O = !0, q =
|
|
6008
|
-
if (
|
|
6008
|
+
if (O = !0, q = z.blendMode || "normal", W) {
|
|
6009
|
+
if (W.clearRect(0, 0, b, D), W.globalCompositeOperation = "source-over", W.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6009
6010
|
if (A.maskData) {
|
|
6010
|
-
const
|
|
6011
|
-
G && (G.drawImage(_, 0, 0),
|
|
6011
|
+
const K = d0(b, D), G = A0(K);
|
|
6012
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), W.drawImage(K, 0, 0));
|
|
6012
6013
|
} else
|
|
6013
|
-
|
|
6014
|
-
else A.type === "layer" && (P ?
|
|
6014
|
+
W.drawImage(_, 0, 0);
|
|
6015
|
+
else A.type === "layer" && (P ? W.drawImage(
|
|
6015
6016
|
_,
|
|
6016
6017
|
P.left,
|
|
6017
6018
|
P.top,
|
|
6018
6019
|
P.width,
|
|
6019
6020
|
P.height
|
|
6020
|
-
) :
|
|
6021
|
-
|
|
6021
|
+
) : W.drawImage(_, 0, 0));
|
|
6022
|
+
W.globalAlpha = 1;
|
|
6022
6023
|
}
|
|
6023
6024
|
} else if (I) {
|
|
6024
|
-
if (
|
|
6025
|
-
if (
|
|
6025
|
+
if (W) {
|
|
6026
|
+
if (W.globalCompositeOperation = "source-atop", W.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6026
6027
|
if (A.maskData) {
|
|
6027
|
-
const
|
|
6028
|
-
G && (G.drawImage(_, 0, 0),
|
|
6028
|
+
const K = d0(b, D), G = A0(K);
|
|
6029
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), W.drawImage(K, 0, 0));
|
|
6029
6030
|
} else
|
|
6030
|
-
|
|
6031
|
-
else A.type === "layer" && (P ?
|
|
6031
|
+
W.drawImage(_, 0, 0);
|
|
6032
|
+
else A.type === "layer" && (P ? W.drawImage(
|
|
6032
6033
|
_,
|
|
6033
6034
|
P.left,
|
|
6034
6035
|
P.top,
|
|
6035
6036
|
P.width,
|
|
6036
6037
|
P.height
|
|
6037
|
-
) :
|
|
6038
|
-
|
|
6038
|
+
) : W.drawImage(_, 0, 0));
|
|
6039
|
+
W.globalAlpha = 1, W.globalCompositeOperation = "source-over";
|
|
6039
6040
|
}
|
|
6040
6041
|
} else {
|
|
6041
|
-
if (k.globalCompositeOperation =
|
|
6042
|
+
if (k.globalCompositeOperation = zr(z.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6042
6043
|
if (A.maskData) {
|
|
6043
|
-
const
|
|
6044
|
-
G && (G.drawImage(_, 0, 0),
|
|
6044
|
+
const K = d0(b, D), G = A0(K);
|
|
6045
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6045
6046
|
} else
|
|
6046
6047
|
k.drawImage(_, 0, 0);
|
|
6047
6048
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6053,9 +6054,9 @@ async function Hx(r) {
|
|
|
6053
6054
|
) : k.drawImage(_, 0, 0));
|
|
6054
6055
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6055
6056
|
}
|
|
6056
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6057
|
+
O && !Q && (k.globalCompositeOperation = zr(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6057
6058
|
}
|
|
6058
|
-
$ = null,
|
|
6059
|
+
$ = null, W = null;
|
|
6059
6060
|
let U = y, T = b, N = D;
|
|
6060
6061
|
if (C !== void 0 || x !== void 0) {
|
|
6061
6062
|
if (C !== void 0 && x !== void 0)
|
|
@@ -6071,7 +6072,7 @@ async function Hx(r) {
|
|
|
6071
6072
|
const c = Fe(U);
|
|
6072
6073
|
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b, D, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${D} -> ${T}x${N}`);
|
|
6073
6074
|
}
|
|
6074
|
-
const S = performance.now() -
|
|
6075
|
+
const S = performance.now() - p;
|
|
6075
6076
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6076
6077
|
canvas: U,
|
|
6077
6078
|
width: T,
|
|
@@ -6083,9 +6084,9 @@ const $x = async (r) => {
|
|
|
6083
6084
|
return t ? createImageBitmap(t) : null;
|
|
6084
6085
|
};
|
|
6085
6086
|
self.onmessage = async (r) => {
|
|
6086
|
-
const
|
|
6087
|
-
if (
|
|
6088
|
-
const e =
|
|
6087
|
+
const p = r.data;
|
|
6088
|
+
if (p && typeof p == "object" && "type" in p && p.type === "SET_LICENSE") {
|
|
6089
|
+
const e = p;
|
|
6089
6090
|
Dx({
|
|
6090
6091
|
token: e.licenseToken,
|
|
6091
6092
|
apiUrl: e.licenseApiUrl,
|
|
@@ -6094,7 +6095,7 @@ self.onmessage = async (r) => {
|
|
|
6094
6095
|
});
|
|
6095
6096
|
return;
|
|
6096
6097
|
}
|
|
6097
|
-
const t =
|
|
6098
|
+
const t = p;
|
|
6098
6099
|
try {
|
|
6099
6100
|
const e = await $x(t.renderData);
|
|
6100
6101
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|