@jieyin/editor-sdk-test 1.1.147 → 1.1.148
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 +2653 -2654
- package/dist/renderWorker.js +632 -628
- 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 Ke(r,
|
|
9
|
+
function Ke(r, p) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,19 +23,19 @@ function Ke(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 Xe(r,
|
|
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,
|
|
@@ -51,7 +51,7 @@ function Xe(r, v, t, e) {
|
|
|
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 Xe(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) => Xe(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
|
}
|
|
@@ -209,7 +209,7 @@ class h0 {
|
|
|
209
209
|
return this.hasStorage;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class fr {
|
|
213
213
|
/**
|
|
214
214
|
* 是否在浏览器环境
|
|
215
215
|
*/
|
|
@@ -251,10 +251,10 @@ class l0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(p) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
257
|
-
return new URL(
|
|
256
|
+
const t = fr.getOrigin();
|
|
257
|
+
return new URL(p, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,203 +262,207 @@ 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(r,
|
|
304
|
-
const t =
|
|
302
|
+
const n0 = D0;
|
|
303
|
+
(function(r, p) {
|
|
304
|
+
const t = D0, e = r();
|
|
305
305
|
for (; ; )
|
|
306
306
|
try {
|
|
307
|
-
if (-parseInt(t(
|
|
307
|
+
if (-parseInt(t(484)) / 1 + parseInt(t(512)) / 2 * (-parseInt(t(486)) / 3) + parseInt(t(493)) / 4 * (parseInt(t(483)) / 5) + -parseInt(t(485)) / 6 * (-parseInt(t(497)) / 7) + -parseInt(t(521)) / 8 * (parseInt(t(502)) / 9) + -parseInt(t(520)) / 10 * (-parseInt(t(495)) / 11) + parseInt(t(491)) / 12 * (parseInt(t(482)) / 13) === p) break;
|
|
308
308
|
e.push(e.shift());
|
|
309
309
|
} catch {
|
|
310
310
|
e.push(e.shift());
|
|
311
311
|
}
|
|
312
|
-
})(
|
|
312
|
+
})(cr, 1136727 + 1 * 364983 + 862136 * -1);
|
|
313
|
+
function D0(r, p) {
|
|
314
|
+
return r = r - (-2093 + 2 * -507 + -1 * -3589), cr()[r];
|
|
315
|
+
}
|
|
313
316
|
const E0 = /* @__PURE__ */ (function() {
|
|
314
317
|
let r = !0;
|
|
315
|
-
return function(
|
|
318
|
+
return function(p, t) {
|
|
316
319
|
const e = r ? function() {
|
|
320
|
+
const u = D0;
|
|
317
321
|
if (t) {
|
|
318
|
-
const
|
|
319
|
-
return t = null,
|
|
322
|
+
const h = t[u(511)](p, arguments);
|
|
323
|
+
return t = null, h;
|
|
320
324
|
}
|
|
321
325
|
} : function() {
|
|
322
326
|
};
|
|
323
327
|
return r = !1, e;
|
|
324
328
|
};
|
|
325
329
|
})(), Ve = E0(void 0, function() {
|
|
326
|
-
const r =
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
330
|
+
const r = D0, p = function() {
|
|
331
|
+
const h = D0;
|
|
332
|
+
let m;
|
|
333
|
+
try {
|
|
334
|
+
m = Function("return (function() " + ("{}.co" + h(488) + 'ctor("return th' + h(515) + " )") + ");")();
|
|
335
|
+
} catch {
|
|
336
|
+
m = window;
|
|
337
|
+
}
|
|
338
|
+
return m;
|
|
339
|
+
}, t = p(), e = t.console = t.console || {}, u = ["log", r(510), r(500), "error", "exception", r(489), "trace"];
|
|
340
|
+
for (let h = 0; h < u[r(516) + "h"]; h++) {
|
|
341
|
+
const m = E0[r(507) + "ructor"].prototype[r(501)](E0), B = u[h], C = e[B] || m;
|
|
342
|
+
m["__pro" + r(496)] = E0.bind(E0), m.toString = C[r(499) + "ing"].bind(C), e[B] = m;
|
|
337
343
|
}
|
|
338
344
|
});
|
|
339
345
|
Ve();
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
return
|
|
343
|
-
return r;
|
|
344
|
-
}, sr();
|
|
345
|
-
}
|
|
346
|
-
const pr = "file_token", Br = t0(399) + t0(397) + "_expire_time", Je = (-2513 + 3382 * -2 + 9337) * 1e3;
|
|
347
|
-
function hr() {
|
|
348
|
-
return h0.getItem(pr);
|
|
346
|
+
const Br = "file_" + n0(508), Cr = "file_token_expire_time", Je = (-1678 + -2 * -869) * (-4881 * -1 + 461 * -17 + 3956);
|
|
347
|
+
function vr() {
|
|
348
|
+
return h0.getItem(Br);
|
|
349
349
|
}
|
|
350
350
|
function rt(r = Je) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
351
|
+
const p = n0;
|
|
352
|
+
if (!vr()) return !0;
|
|
353
|
+
const e = h0[p(509) + "em"](Cr);
|
|
354
|
+
if (!e) return !1;
|
|
355
|
+
const u = Number(e);
|
|
356
|
+
return Date.now() + r > u;
|
|
356
357
|
}
|
|
357
|
-
function et(r,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
358
|
+
function et(r, p) {
|
|
359
|
+
const t = n0;
|
|
360
|
+
if (h0.setItem(Br, r), typeof p == t(505) + "r" && p > -8e3 + -20 * -400) {
|
|
361
|
+
const e = Date[t(519)]() + p * 1e3;
|
|
362
|
+
h0.setItem(Cr, String(e));
|
|
361
363
|
}
|
|
362
364
|
}
|
|
363
365
|
function tt() {
|
|
364
|
-
|
|
366
|
+
const r = n0;
|
|
367
|
+
h0.removeItem(Br), h0[r(504) + "eItem"](Cr);
|
|
365
368
|
}
|
|
366
369
|
async function Pr(r) {
|
|
367
|
-
const
|
|
368
|
-
return t?.[
|
|
370
|
+
const p = n0, t = await r(), e = t?.data?.[p(518)];
|
|
371
|
+
return t?.data?.[p(490)] === 8 * 350 + 8654 + -11254 && e?.["file_token"] ? (et(e.file_token, e["expir" + p(494)]), e.file_token) : null;
|
|
369
372
|
}
|
|
370
373
|
let xt = null;
|
|
371
|
-
function
|
|
372
|
-
return
|
|
374
|
+
function zr() {
|
|
375
|
+
return fr.isBrowser() ? xt : null;
|
|
373
376
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
377
|
+
function cr() {
|
|
378
|
+
const r = ["oken", "2561orGXul", "6226985OwNmqy", "1130017pbjzuE", "30uIrxsC", "726NDYOSF", "parse", "nstru", "table", "code", "52344oQeLIZ", "oken=", "4BNkoBO", "es_in", "143grCwwf", "to__", "674737zQKfdB", "ram", "toStr", "info", "bind", "639DsoYMf", "des", "remov", "numbe", "fetch", "const", "token", "getIt", "warn", "apply", "4046HJEbYx", "isBlo", "efres", 'is")(', "lengt", "isBro", "data", "now", "585160VxKvLg", "122616pGgRHx"];
|
|
379
|
+
return cr = function() {
|
|
380
|
+
return r;
|
|
381
|
+
}, cr();
|
|
376
382
|
}
|
|
377
383
|
async function De() {
|
|
378
|
-
const r =
|
|
379
|
-
if (!
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
384
|
+
const r = n0;
|
|
385
|
+
if (!fr.isBrowser()) return vr();
|
|
386
|
+
const p = vr();
|
|
387
|
+
if (p && !rt()) return p;
|
|
382
388
|
try {
|
|
383
|
-
const t = await
|
|
384
|
-
if (
|
|
385
|
-
const e = await Pr(t[
|
|
389
|
+
const t = await zr();
|
|
390
|
+
if (p && t?.["fetchFileTokenRefresh"]) {
|
|
391
|
+
const e = await Pr(t["fetchFileTokenR" + r(514) + "h"]);
|
|
386
392
|
if (e) return e;
|
|
387
393
|
}
|
|
388
394
|
} catch {
|
|
389
395
|
}
|
|
390
396
|
try {
|
|
391
|
-
const t =
|
|
392
|
-
return t?.["
|
|
397
|
+
const t = zr();
|
|
398
|
+
return t?.[r(506) + "FileT" + r(522)] ? await Pr(t.fetchFileToken) : null;
|
|
393
399
|
} catch {
|
|
394
400
|
return null;
|
|
395
401
|
}
|
|
396
402
|
}
|
|
397
403
|
function ge(r) {
|
|
398
|
-
const
|
|
399
|
-
if (!r || l0
|
|
400
|
-
const t = l0
|
|
401
|
-
return t ? t[
|
|
404
|
+
const p = n0;
|
|
405
|
+
if (!r || l0.isDataUrl(r) || l0[p(513) + "bUrl"](r)) return !1;
|
|
406
|
+
const t = l0[p(487)](r);
|
|
407
|
+
return t ? t.pathname["inclu" + p(503)]("/files/") && !l0["hasPa" + p(498)](r, "fileToken") : r.includes("/files/") && !r.includes("fileT" + p(492));
|
|
402
408
|
}
|
|
403
|
-
function be(r,
|
|
404
|
-
|
|
405
|
-
return !v || !ge(r) ? r : l0.addParam(r, t(421) + "oken", v);
|
|
409
|
+
function be(r, p) {
|
|
410
|
+
return !p || !ge(r) ? r : l0.addParam(r, "fileToken", p);
|
|
406
411
|
}
|
|
407
412
|
function nt(r) {
|
|
408
|
-
|
|
409
|
-
return l0[v(400) + v(412) + "m"](r, "fileToken");
|
|
413
|
+
return l0.removeParam(r, "fileToken");
|
|
410
414
|
}
|
|
411
415
|
async function at(r) {
|
|
412
416
|
if (!ge(r)) return r;
|
|
413
|
-
const
|
|
414
|
-
return be(r,
|
|
417
|
+
const p = await De();
|
|
418
|
+
return be(r, p);
|
|
415
419
|
}
|
|
416
|
-
async function me(r,
|
|
417
|
-
if (!
|
|
418
|
-
const e = nt(r), u = await at(e),
|
|
419
|
-
if (
|
|
420
|
+
async function me(r, p) {
|
|
421
|
+
if (!fr[n0(517) + "wser"]()) return fetch(r, p);
|
|
422
|
+
const e = nt(r), u = await at(e), h = await fetch(u, p);
|
|
423
|
+
if (h.status !== 401) return h;
|
|
420
424
|
tt();
|
|
421
425
|
const m = await De(), B = be(e, m);
|
|
422
|
-
return fetch(B,
|
|
426
|
+
return fetch(B, p);
|
|
423
427
|
}
|
|
424
|
-
const _e = (r,
|
|
428
|
+
const _e = (r, p) => {
|
|
425
429
|
if (!r) return r;
|
|
426
|
-
const t = (
|
|
430
|
+
const t = (p || "").replace(/\/$/, "");
|
|
427
431
|
if (t && r.startsWith(t))
|
|
428
432
|
return r;
|
|
429
433
|
if (typeof window < "u") {
|
|
430
434
|
const u = window.location.hostname;
|
|
431
435
|
if (u === "localhost" || u === "127.0.0.1")
|
|
432
436
|
try {
|
|
433
|
-
const
|
|
437
|
+
const h = new URL(r);
|
|
434
438
|
if (t)
|
|
435
439
|
try {
|
|
436
440
|
const m = new URL(t).origin;
|
|
437
|
-
if (
|
|
441
|
+
if (h.origin === m)
|
|
438
442
|
return r;
|
|
439
443
|
} catch {
|
|
440
444
|
}
|
|
441
|
-
if (
|
|
442
|
-
return t ? `${t}${
|
|
445
|
+
if (h.pathname.startsWith("/files/"))
|
|
446
|
+
return t ? `${t}${h.pathname}${h.search}${h.hash}` : `${h.pathname}${h.search}${h.hash}`;
|
|
443
447
|
} catch {
|
|
444
448
|
}
|
|
445
449
|
}
|
|
446
450
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
447
451
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
448
452
|
return e ? `/oss${e[2]}` : r;
|
|
449
|
-
}, ot = (r,
|
|
453
|
+
}, ot = (r, p) => {
|
|
450
454
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
451
|
-
return new OffscreenCanvas(r,
|
|
455
|
+
return new OffscreenCanvas(r, p);
|
|
452
456
|
const t = document.createElement("canvas");
|
|
453
|
-
return t.width = r, t.height =
|
|
454
|
-
},
|
|
455
|
-
if (!
|
|
457
|
+
return t.width = r, t.height = p, t;
|
|
458
|
+
}, _0 = async (r, p) => {
|
|
459
|
+
if (!p || p <= 0) return r;
|
|
456
460
|
const t = Math.max(r.width, r.height);
|
|
457
|
-
if (t <=
|
|
458
|
-
const e =
|
|
459
|
-
return B ? (B.drawImage(r, 0, 0, u,
|
|
461
|
+
if (t <= p) return r;
|
|
462
|
+
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");
|
|
463
|
+
return B ? (B.drawImage(r, 0, 0, u, h), r.close?.(), await createImageBitmap(m)) : r;
|
|
460
464
|
};
|
|
461
|
-
async function it(r,
|
|
465
|
+
async function it(r, p, t) {
|
|
462
466
|
if (typeof r == "string")
|
|
463
467
|
try {
|
|
464
468
|
const e = _e(r, t), u = await me(e);
|
|
@@ -466,12 +470,12 @@ async function it(r, v, t) {
|
|
|
466
470
|
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
467
471
|
throw new Error(m);
|
|
468
472
|
}
|
|
469
|
-
const
|
|
470
|
-
if (!
|
|
473
|
+
const h = await u.blob();
|
|
474
|
+
if (!h.type.startsWith("image/") && h.size === 0)
|
|
471
475
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
472
476
|
try {
|
|
473
|
-
const m = await createImageBitmap(
|
|
474
|
-
return await
|
|
477
|
+
const m = await createImageBitmap(h);
|
|
478
|
+
return await _0(m, p);
|
|
475
479
|
} catch (m) {
|
|
476
480
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
477
481
|
}
|
|
@@ -485,7 +489,7 @@ async function it(r, v, t) {
|
|
|
485
489
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
486
490
|
try {
|
|
487
491
|
const e = await createImageBitmap(r);
|
|
488
|
-
return await
|
|
492
|
+
return await _0(e, p);
|
|
489
493
|
} catch (e) {
|
|
490
494
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
491
495
|
}
|
|
@@ -493,23 +497,23 @@ async function it(r, v, t) {
|
|
|
493
497
|
if (r instanceof ImageBitmap) {
|
|
494
498
|
if (r.width === 0 || r.height === 0)
|
|
495
499
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
496
|
-
return await
|
|
500
|
+
return await _0(r, p);
|
|
497
501
|
}
|
|
498
502
|
throw new Error("不支持的图片类型");
|
|
499
503
|
}
|
|
500
|
-
async function st(r,
|
|
504
|
+
async function st(r, p, t) {
|
|
501
505
|
try {
|
|
502
506
|
const e = _e(r, t), u = await me(e);
|
|
503
507
|
if (!u.ok) {
|
|
504
508
|
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
505
509
|
throw new Error(m);
|
|
506
510
|
}
|
|
507
|
-
const
|
|
508
|
-
if (!
|
|
511
|
+
const h = await u.blob();
|
|
512
|
+
if (!h.type.startsWith("image/") && h.size === 0)
|
|
509
513
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
510
514
|
try {
|
|
511
|
-
const m = await createImageBitmap(
|
|
512
|
-
return await
|
|
515
|
+
const m = await createImageBitmap(h);
|
|
516
|
+
return await _0(m, p);
|
|
513
517
|
} catch (m) {
|
|
514
518
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
515
519
|
}
|
|
@@ -517,9 +521,9 @@ async function st(r, v, t) {
|
|
|
517
521
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
518
522
|
}
|
|
519
523
|
}
|
|
520
|
-
function
|
|
524
|
+
function Ir(r) {
|
|
521
525
|
if (!r) return "source-over";
|
|
522
|
-
const
|
|
526
|
+
const p = r.trim().toLowerCase();
|
|
523
527
|
return {
|
|
524
528
|
normal: "source-over",
|
|
525
529
|
multiply: "multiply",
|
|
@@ -545,22 +549,22 @@ function zr(r) {
|
|
|
545
549
|
"linear dodge": "lighter",
|
|
546
550
|
lighter: "lighter",
|
|
547
551
|
"pass-through": "source-over"
|
|
548
|
-
}[
|
|
552
|
+
}[p] || "source-over";
|
|
549
553
|
}
|
|
550
|
-
var
|
|
554
|
+
var hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
551
555
|
function ct(r) {
|
|
552
556
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
553
|
-
var
|
|
554
|
-
if (typeof
|
|
557
|
+
var p = r.default;
|
|
558
|
+
if (typeof p == "function") {
|
|
555
559
|
var t = function e() {
|
|
556
560
|
var u = !1;
|
|
557
561
|
try {
|
|
558
562
|
u = this instanceof e;
|
|
559
563
|
} catch {
|
|
560
564
|
}
|
|
561
|
-
return u ? Reflect.construct(
|
|
565
|
+
return u ? Reflect.construct(p, arguments, this.constructor) : p.apply(this, arguments);
|
|
562
566
|
};
|
|
563
|
-
t.prototype =
|
|
567
|
+
t.prototype = p.prototype;
|
|
564
568
|
} else t = {};
|
|
565
569
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
566
570
|
var u = Object.getOwnPropertyDescriptor(r, e);
|
|
@@ -572,36 +576,36 @@ function ct(r) {
|
|
|
572
576
|
});
|
|
573
577
|
}), t;
|
|
574
578
|
}
|
|
575
|
-
var
|
|
579
|
+
var y0 = { exports: {} };
|
|
576
580
|
function ft(r) {
|
|
577
581
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
578
582
|
}
|
|
579
|
-
var
|
|
583
|
+
var w0 = { exports: {} }, ut = {}, dt = /* @__PURE__ */ Object.freeze({
|
|
580
584
|
__proto__: null,
|
|
581
585
|
default: ut
|
|
582
|
-
}), lt = /* @__PURE__ */ ct(dt), ht =
|
|
586
|
+
}), lt = /* @__PURE__ */ ct(dt), ht = w0.exports, Wr;
|
|
583
587
|
function M() {
|
|
584
|
-
return
|
|
588
|
+
return Wr || (Wr = 1, (function(r, p) {
|
|
585
589
|
(function(t, e) {
|
|
586
590
|
r.exports = e();
|
|
587
591
|
})(ht, function() {
|
|
588
592
|
var t = t || (function(e, u) {
|
|
589
|
-
var
|
|
590
|
-
if (typeof window < "u" && window.crypto && (
|
|
593
|
+
var h;
|
|
594
|
+
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")
|
|
591
595
|
try {
|
|
592
|
-
|
|
596
|
+
h = lt;
|
|
593
597
|
} catch {
|
|
594
598
|
}
|
|
595
599
|
var m = function() {
|
|
596
|
-
if (
|
|
597
|
-
if (typeof
|
|
600
|
+
if (h) {
|
|
601
|
+
if (typeof h.getRandomValues == "function")
|
|
598
602
|
try {
|
|
599
|
-
return
|
|
603
|
+
return h.getRandomValues(new Uint32Array(1))[0];
|
|
600
604
|
} catch {
|
|
601
605
|
}
|
|
602
|
-
if (typeof
|
|
606
|
+
if (typeof h.randomBytes == "function")
|
|
603
607
|
try {
|
|
604
|
-
return
|
|
608
|
+
return h.randomBytes(4).readInt32LE();
|
|
605
609
|
} catch {
|
|
606
610
|
}
|
|
607
611
|
}
|
|
@@ -873,7 +877,7 @@ function M() {
|
|
|
873
877
|
d[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
874
878
|
return new E.init(d, o);
|
|
875
879
|
}
|
|
876
|
-
},
|
|
880
|
+
}, v = a.Utf8 = {
|
|
877
881
|
/**
|
|
878
882
|
* Converts a word array to a UTF-8 string.
|
|
879
883
|
*
|
|
@@ -932,7 +936,7 @@ function M() {
|
|
|
932
936
|
* bufferedBlockAlgorithm._append(wordArray);
|
|
933
937
|
*/
|
|
934
938
|
_append: function(i) {
|
|
935
|
-
typeof i == "string" && (i =
|
|
939
|
+
typeof i == "string" && (i = v.parse(i)), this._data.concat(i), this._nDataBytes += i.sigBytes;
|
|
936
940
|
},
|
|
937
941
|
/**
|
|
938
942
|
* Processes available data blocks.
|
|
@@ -1078,16 +1082,16 @@ function M() {
|
|
|
1078
1082
|
})(Math);
|
|
1079
1083
|
return t;
|
|
1080
1084
|
});
|
|
1081
|
-
})(
|
|
1085
|
+
})(w0)), w0.exports;
|
|
1082
1086
|
}
|
|
1083
|
-
var
|
|
1084
|
-
function
|
|
1085
|
-
return Lr || (Lr = 1, (function(r,
|
|
1087
|
+
var k0 = { exports: {} }, vt = k0.exports, Lr;
|
|
1088
|
+
function ur() {
|
|
1089
|
+
return Lr || (Lr = 1, (function(r, p) {
|
|
1086
1090
|
(function(t, e) {
|
|
1087
1091
|
r.exports = e(M());
|
|
1088
1092
|
})(vt, function(t) {
|
|
1089
1093
|
return (function(e) {
|
|
1090
|
-
var u = t,
|
|
1094
|
+
var u = t, h = u.lib, m = h.Base, B = h.WordArray, C = u.x64 = {};
|
|
1091
1095
|
C.Word = m.extend({
|
|
1092
1096
|
/**
|
|
1093
1097
|
* Initializes a newly created 64-bit word.
|
|
@@ -1308,17 +1312,17 @@ function fr() {
|
|
|
1308
1312
|
});
|
|
1309
1313
|
})(), t;
|
|
1310
1314
|
});
|
|
1311
|
-
})(
|
|
1315
|
+
})(k0)), k0.exports;
|
|
1312
1316
|
}
|
|
1313
|
-
var
|
|
1317
|
+
var S0 = { exports: {} }, pt = S0.exports, Or;
|
|
1314
1318
|
function Bt() {
|
|
1315
|
-
return Or || (Or = 1, (function(r,
|
|
1319
|
+
return Or || (Or = 1, (function(r, p) {
|
|
1316
1320
|
(function(t, e) {
|
|
1317
1321
|
r.exports = e(M());
|
|
1318
1322
|
})(pt, function(t) {
|
|
1319
1323
|
return (function() {
|
|
1320
1324
|
if (typeof ArrayBuffer == "function") {
|
|
1321
|
-
var e = t, u = e.lib,
|
|
1325
|
+
var e = t, u = e.lib, h = u.WordArray, m = h.init, B = h.init = function(C) {
|
|
1322
1326
|
if (C instanceof ArrayBuffer && (C = new Uint8Array(C)), (C instanceof Int8Array || typeof Uint8ClampedArray < "u" && C instanceof Uint8ClampedArray || C instanceof Int16Array || C instanceof Uint16Array || C instanceof Int32Array || C instanceof Uint32Array || C instanceof Float32Array || C instanceof Float64Array) && (C = new Uint8Array(C.buffer, C.byteOffset, C.byteLength)), C instanceof Uint8Array) {
|
|
1323
1327
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1324
1328
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
@@ -1326,20 +1330,20 @@ function Bt() {
|
|
|
1326
1330
|
} else
|
|
1327
1331
|
m.apply(this, arguments);
|
|
1328
1332
|
};
|
|
1329
|
-
B.prototype =
|
|
1333
|
+
B.prototype = h;
|
|
1330
1334
|
}
|
|
1331
1335
|
})(), t.lib.WordArray;
|
|
1332
1336
|
});
|
|
1333
|
-
})(
|
|
1337
|
+
})(S0)), S0.exports;
|
|
1334
1338
|
}
|
|
1335
|
-
var
|
|
1339
|
+
var H0 = { exports: {} }, Ct = H0.exports, qr;
|
|
1336
1340
|
function Et() {
|
|
1337
|
-
return qr || (qr = 1, (function(r,
|
|
1341
|
+
return qr || (qr = 1, (function(r, p) {
|
|
1338
1342
|
(function(t, e) {
|
|
1339
1343
|
r.exports = e(M());
|
|
1340
1344
|
})(Ct, function(t) {
|
|
1341
1345
|
return (function() {
|
|
1342
|
-
var e = t, u = e.lib,
|
|
1346
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.enc;
|
|
1343
1347
|
m.Utf16 = m.Utf16BE = {
|
|
1344
1348
|
/**
|
|
1345
1349
|
* Converts a word array to a UTF-16 BE string.
|
|
@@ -1377,7 +1381,7 @@ function Et() {
|
|
|
1377
1381
|
parse: function(C) {
|
|
1378
1382
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1379
1383
|
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1380
|
-
return
|
|
1384
|
+
return h.create(n, x * 2);
|
|
1381
1385
|
}
|
|
1382
1386
|
}, m.Utf16LE = {
|
|
1383
1387
|
/**
|
|
@@ -1416,7 +1420,7 @@ function Et() {
|
|
|
1416
1420
|
parse: function(C) {
|
|
1417
1421
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1418
1422
|
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1419
|
-
return
|
|
1423
|
+
return h.create(n, x * 2);
|
|
1420
1424
|
}
|
|
1421
1425
|
};
|
|
1422
1426
|
function B(C) {
|
|
@@ -1424,16 +1428,16 @@ function Et() {
|
|
|
1424
1428
|
}
|
|
1425
1429
|
})(), t.enc.Utf16;
|
|
1426
1430
|
});
|
|
1427
|
-
})(
|
|
1431
|
+
})(H0)), H0.exports;
|
|
1428
1432
|
}
|
|
1429
|
-
var
|
|
1433
|
+
var $0 = { exports: {} }, At = $0.exports, Tr;
|
|
1430
1434
|
function i0() {
|
|
1431
|
-
return Tr || (Tr = 1, (function(r,
|
|
1435
|
+
return Tr || (Tr = 1, (function(r, p) {
|
|
1432
1436
|
(function(t, e) {
|
|
1433
1437
|
r.exports = e(M());
|
|
1434
1438
|
})(At, function(t) {
|
|
1435
1439
|
return (function() {
|
|
1436
|
-
var e = t, u = e.lib,
|
|
1440
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.enc;
|
|
1437
1441
|
m.Base64 = {
|
|
1438
1442
|
/**
|
|
1439
1443
|
* Converts a word array to a Base64 string.
|
|
@@ -1452,7 +1456,7 @@ function i0() {
|
|
|
1452
1456
|
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1453
1457
|
C.clamp();
|
|
1454
1458
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1455
|
-
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255,
|
|
1459
|
+
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++)
|
|
1456
1460
|
a.push(E.charAt(g >>> 6 * (3 - i) & 63));
|
|
1457
1461
|
var o = E.charAt(64);
|
|
1458
1462
|
if (o)
|
|
@@ -1492,23 +1496,23 @@ function i0() {
|
|
|
1492
1496
|
function B(C, x, n) {
|
|
1493
1497
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1494
1498
|
if (s % 4) {
|
|
1495
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1499
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1496
1500
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1497
1501
|
}
|
|
1498
|
-
return
|
|
1502
|
+
return h.create(E, a);
|
|
1499
1503
|
}
|
|
1500
1504
|
})(), t.enc.Base64;
|
|
1501
1505
|
});
|
|
1502
|
-
})(
|
|
1506
|
+
})($0)), $0.exports;
|
|
1503
1507
|
}
|
|
1504
|
-
var
|
|
1508
|
+
var R0 = { exports: {} }, Ft = R0.exports, Mr;
|
|
1505
1509
|
function Dt() {
|
|
1506
|
-
return Mr || (Mr = 1, (function(r,
|
|
1510
|
+
return Mr || (Mr = 1, (function(r, p) {
|
|
1507
1511
|
(function(t, e) {
|
|
1508
1512
|
r.exports = e(M());
|
|
1509
1513
|
})(Ft, function(t) {
|
|
1510
1514
|
return (function() {
|
|
1511
|
-
var e = t, u = e.lib,
|
|
1515
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.enc;
|
|
1512
1516
|
m.Base64url = {
|
|
1513
1517
|
/**
|
|
1514
1518
|
* Converts a word array to a Base64url string.
|
|
@@ -1530,7 +1534,7 @@ function Dt() {
|
|
|
1530
1534
|
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1531
1535
|
C.clamp();
|
|
1532
1536
|
for (var s = [], f = 0; f < E; f += 3)
|
|
1533
|
-
for (var
|
|
1537
|
+
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++)
|
|
1534
1538
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1535
1539
|
var d = a.charAt(64);
|
|
1536
1540
|
if (d)
|
|
@@ -1563,8 +1567,8 @@ function Dt() {
|
|
|
1563
1567
|
}
|
|
1564
1568
|
var f = E.charAt(64);
|
|
1565
1569
|
if (f) {
|
|
1566
|
-
var
|
|
1567
|
-
|
|
1570
|
+
var v = C.indexOf(f);
|
|
1571
|
+
v !== -1 && (n = v);
|
|
1568
1572
|
}
|
|
1569
1573
|
return B(C, n, a);
|
|
1570
1574
|
},
|
|
@@ -1574,26 +1578,26 @@ function Dt() {
|
|
|
1574
1578
|
function B(C, x, n) {
|
|
1575
1579
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1576
1580
|
if (s % 4) {
|
|
1577
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1581
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1578
1582
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1579
1583
|
}
|
|
1580
|
-
return
|
|
1584
|
+
return h.create(E, a);
|
|
1581
1585
|
}
|
|
1582
1586
|
})(), t.enc.Base64url;
|
|
1583
1587
|
});
|
|
1584
|
-
})(
|
|
1588
|
+
})(R0)), R0.exports;
|
|
1585
1589
|
}
|
|
1586
|
-
var
|
|
1590
|
+
var P0 = { exports: {} }, gt = P0.exports, Nr;
|
|
1587
1591
|
function s0() {
|
|
1588
|
-
return Nr || (Nr = 1, (function(r,
|
|
1592
|
+
return Nr || (Nr = 1, (function(r, p) {
|
|
1589
1593
|
(function(t, e) {
|
|
1590
1594
|
r.exports = e(M());
|
|
1591
1595
|
})(gt, function(t) {
|
|
1592
1596
|
return (function(e) {
|
|
1593
|
-
var u = t,
|
|
1597
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = [];
|
|
1594
1598
|
(function() {
|
|
1595
|
-
for (var
|
|
1596
|
-
x[
|
|
1599
|
+
for (var v = 0; v < 64; v++)
|
|
1600
|
+
x[v] = e.abs(e.sin(v + 1)) * 4294967296 | 0;
|
|
1597
1601
|
})();
|
|
1598
1602
|
var n = C.MD5 = B.extend({
|
|
1599
1603
|
_doReset: function() {
|
|
@@ -1604,19 +1608,19 @@ function s0() {
|
|
|
1604
1608
|
271733878
|
|
1605
1609
|
]);
|
|
1606
1610
|
},
|
|
1607
|
-
_doProcessBlock: function(
|
|
1611
|
+
_doProcessBlock: function(v, l) {
|
|
1608
1612
|
for (var g = 0; g < 16; g++) {
|
|
1609
|
-
var i = l + g, o =
|
|
1610
|
-
|
|
1613
|
+
var i = l + g, o = v[i];
|
|
1614
|
+
v[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1611
1615
|
}
|
|
1612
|
-
var d = this._hash.words, b =
|
|
1613
|
-
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,
|
|
1616
|
+
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], z = 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];
|
|
1617
|
+
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, z, 12, x[9]), A = E(A, _, S, c, O, 17, x[10]), c = E(c, A, _, S, q, 22, x[11]), S = E(S, c, A, _, U, 7, x[12]), _ = E(_, S, c, A, T, 12, x[13]), A = E(A, _, S, c, N, 17, x[14]), c = E(c, A, _, S, j, 22, x[15]), S = a(S, c, A, _, 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, _, z, 5, x[24]), _ = a(_, S, c, A, N, 9, x[25]), A = a(A, _, S, c, k, 14, x[26]), c = a(c, A, _, S, $, 20, x[27]), S = a(S, c, A, _, T, 5, x[28]), _ = a(_, S, c, A, y, 9, x[29]), A = a(A, _, S, c, H, 14, x[30]), c = a(c, A, _, S, U, 20, x[31]), S = s(S, c, A, _, F, 4, x[32]), _ = s(_, S, c, A, $, 11, x[33]), A = s(A, _, S, c, q, 16, x[34]), c = s(c, A, _, S, N, 23, x[35]), S = s(S, c, A, _, 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, _, z, 4, x[44]), _ = s(_, S, c, A, U, 11, x[45]), A = s(A, _, S, c, j, 16, x[46]), c = s(c, A, _, S, y, 23, x[47]), S = f(S, c, A, _, b, 6, x[48]), _ = f(_, S, c, A, H, 10, x[49]), A = f(A, _, S, c, N, 15, x[50]), c = f(c, A, _, S, F, 21, x[51]), S = f(S, c, A, _, U, 6, x[52]), _ = f(_, S, c, A, k, 10, x[53]), A = f(A, _, S, c, O, 15, x[54]), c = f(c, A, _, S, 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, z, 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;
|
|
1614
1618
|
},
|
|
1615
1619
|
_doFinalize: function() {
|
|
1616
|
-
var
|
|
1620
|
+
var v = this._data, l = v.words, g = this._nDataBytes * 8, i = v.sigBytes * 8;
|
|
1617
1621
|
l[i >>> 5] |= 128 << 24 - i % 32;
|
|
1618
1622
|
var o = e.floor(g / 4294967296), d = g;
|
|
1619
|
-
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,
|
|
1623
|
+
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();
|
|
1620
1624
|
for (var b = this._hash, D = b.words, y = 0; y < 4; y++) {
|
|
1621
1625
|
var k = D[y];
|
|
1622
1626
|
D[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
@@ -1624,41 +1628,41 @@ function s0() {
|
|
|
1624
1628
|
return b;
|
|
1625
1629
|
},
|
|
1626
1630
|
clone: function() {
|
|
1627
|
-
var
|
|
1628
|
-
return
|
|
1631
|
+
var v = B.clone.call(this);
|
|
1632
|
+
return v._hash = this._hash.clone(), v;
|
|
1629
1633
|
}
|
|
1630
1634
|
});
|
|
1631
|
-
function E(
|
|
1632
|
-
var D =
|
|
1635
|
+
function E(v, l, g, i, o, d, b) {
|
|
1636
|
+
var D = v + (l & g | ~l & i) + o + b;
|
|
1633
1637
|
return (D << d | D >>> 32 - d) + l;
|
|
1634
1638
|
}
|
|
1635
|
-
function a(
|
|
1636
|
-
var D =
|
|
1639
|
+
function a(v, l, g, i, o, d, b) {
|
|
1640
|
+
var D = v + (l & i | g & ~i) + o + b;
|
|
1637
1641
|
return (D << d | D >>> 32 - d) + l;
|
|
1638
1642
|
}
|
|
1639
|
-
function s(
|
|
1640
|
-
var D =
|
|
1643
|
+
function s(v, l, g, i, o, d, b) {
|
|
1644
|
+
var D = v + (l ^ g ^ i) + o + b;
|
|
1641
1645
|
return (D << d | D >>> 32 - d) + l;
|
|
1642
1646
|
}
|
|
1643
|
-
function f(
|
|
1644
|
-
var D =
|
|
1647
|
+
function f(v, l, g, i, o, d, b) {
|
|
1648
|
+
var D = v + (g ^ (l | ~i)) + o + b;
|
|
1645
1649
|
return (D << d | D >>> 32 - d) + l;
|
|
1646
1650
|
}
|
|
1647
1651
|
u.MD5 = B._createHelper(n), u.HmacMD5 = B._createHmacHelper(n);
|
|
1648
1652
|
})(Math), t.MD5;
|
|
1649
1653
|
});
|
|
1650
|
-
})(
|
|
1654
|
+
})(P0)), P0.exports;
|
|
1651
1655
|
}
|
|
1652
|
-
var
|
|
1656
|
+
var z0 = { exports: {} }, bt = z0.exports, Ur;
|
|
1653
1657
|
function ye() {
|
|
1654
|
-
return Ur || (Ur = 1, (function(r,
|
|
1658
|
+
return Ur || (Ur = 1, (function(r, p) {
|
|
1655
1659
|
(function(t, e) {
|
|
1656
1660
|
r.exports = e(M());
|
|
1657
1661
|
})(bt, function(t) {
|
|
1658
1662
|
return (function() {
|
|
1659
|
-
var e = t, u = e.lib,
|
|
1663
|
+
var e = t, u = e.lib, h = u.WordArray, m = u.Hasher, B = e.algo, C = [], x = B.SHA1 = m.extend({
|
|
1660
1664
|
_doReset: function() {
|
|
1661
|
-
this._hash = new
|
|
1665
|
+
this._hash = new h.init([
|
|
1662
1666
|
1732584193,
|
|
1663
1667
|
4023233417,
|
|
1664
1668
|
2562383102,
|
|
@@ -1667,7 +1671,7 @@ function ye() {
|
|
|
1667
1671
|
]);
|
|
1668
1672
|
},
|
|
1669
1673
|
_doProcessBlock: function(n, E) {
|
|
1670
|
-
for (var a = this._hash.words, s = a[0], f = a[1],
|
|
1674
|
+
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++) {
|
|
1671
1675
|
if (i < 16)
|
|
1672
1676
|
C[i] = n[E + i] | 0;
|
|
1673
1677
|
else {
|
|
@@ -1675,9 +1679,9 @@ function ye() {
|
|
|
1675
1679
|
C[i] = o << 1 | o >>> 31;
|
|
1676
1680
|
}
|
|
1677
1681
|
var d = (s << 5 | s >>> 27) + g + C[i];
|
|
1678
|
-
i < 20 ? d += (f &
|
|
1682
|
+
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;
|
|
1679
1683
|
}
|
|
1680
|
-
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] +
|
|
1684
|
+
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;
|
|
1681
1685
|
},
|
|
1682
1686
|
_doFinalize: function() {
|
|
1683
1687
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
@@ -1691,16 +1695,16 @@ function ye() {
|
|
|
1691
1695
|
e.SHA1 = m._createHelper(x), e.HmacSHA1 = m._createHmacHelper(x);
|
|
1692
1696
|
})(), t.SHA1;
|
|
1693
1697
|
});
|
|
1694
|
-
})(
|
|
1698
|
+
})(z0)), z0.exports;
|
|
1695
1699
|
}
|
|
1696
|
-
var
|
|
1700
|
+
var I0 = { exports: {} }, mt = I0.exports, jr;
|
|
1697
1701
|
function Er() {
|
|
1698
|
-
return jr || (jr = 1, (function(r,
|
|
1702
|
+
return jr || (jr = 1, (function(r, p) {
|
|
1699
1703
|
(function(t, e) {
|
|
1700
1704
|
r.exports = e(M());
|
|
1701
1705
|
})(mt, function(t) {
|
|
1702
1706
|
return (function(e) {
|
|
1703
|
-
var u = t,
|
|
1707
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = [], n = [];
|
|
1704
1708
|
(function() {
|
|
1705
1709
|
function s(g) {
|
|
1706
1710
|
for (var i = e.sqrt(g), o = 2; o <= i; o++)
|
|
@@ -1711,29 +1715,29 @@ function Er() {
|
|
|
1711
1715
|
function f(g) {
|
|
1712
1716
|
return (g - (g | 0)) * 4294967296 | 0;
|
|
1713
1717
|
}
|
|
1714
|
-
for (var
|
|
1715
|
-
s(
|
|
1718
|
+
for (var v = 2, l = 0; l < 64; )
|
|
1719
|
+
s(v) && (l < 8 && (x[l] = f(e.pow(v, 1 / 2))), n[l] = f(e.pow(v, 1 / 3)), l++), v++;
|
|
1716
1720
|
})();
|
|
1717
1721
|
var E = [], a = C.SHA256 = B.extend({
|
|
1718
1722
|
_doReset: function() {
|
|
1719
1723
|
this._hash = new m.init(x.slice(0));
|
|
1720
1724
|
},
|
|
1721
1725
|
_doProcessBlock: function(s, f) {
|
|
1722
|
-
for (var
|
|
1726
|
+
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++) {
|
|
1723
1727
|
if (k < 16)
|
|
1724
1728
|
E[k] = s[f + k] | 0;
|
|
1725
1729
|
else {
|
|
1726
1730
|
var R = E[k - 15], F = (R << 25 | R >>> 7) ^ (R << 14 | R >>> 18) ^ R >>> 3, w = E[k - 2], H = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
|
|
1727
1731
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1728
1732
|
}
|
|
1729
|
-
var $ = d & b ^ ~d & D,
|
|
1733
|
+
var $ = d & b ^ ~d & D, z = 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 + z;
|
|
1730
1734
|
y = D, D = b, b = d, d = o + U | 0, o = i, i = g, g = l, l = U + T | 0;
|
|
1731
1735
|
}
|
|
1732
|
-
|
|
1736
|
+
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;
|
|
1733
1737
|
},
|
|
1734
1738
|
_doFinalize: function() {
|
|
1735
|
-
var s = this._data, f = s.words,
|
|
1736
|
-
return f[l >>> 5] |= 128 << 24 - l % 32, f[(l + 64 >>> 9 << 4) + 14] = e.floor(
|
|
1739
|
+
var s = this._data, f = s.words, v = this._nDataBytes * 8, l = s.sigBytes * 8;
|
|
1740
|
+
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;
|
|
1737
1741
|
},
|
|
1738
1742
|
clone: function() {
|
|
1739
1743
|
var s = B.clone.call(this);
|
|
@@ -1743,18 +1747,18 @@ function Er() {
|
|
|
1743
1747
|
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1744
1748
|
})(Math), t.SHA256;
|
|
1745
1749
|
});
|
|
1746
|
-
})(
|
|
1750
|
+
})(I0)), I0.exports;
|
|
1747
1751
|
}
|
|
1748
|
-
var
|
|
1752
|
+
var W0 = { exports: {} }, _t = W0.exports, Gr;
|
|
1749
1753
|
function yt() {
|
|
1750
|
-
return Gr || (Gr = 1, (function(r,
|
|
1754
|
+
return Gr || (Gr = 1, (function(r, p) {
|
|
1751
1755
|
(function(t, e, u) {
|
|
1752
1756
|
r.exports = e(M(), Er());
|
|
1753
1757
|
})(_t, function(t) {
|
|
1754
1758
|
return (function() {
|
|
1755
|
-
var e = t, u = e.lib,
|
|
1759
|
+
var e = t, u = e.lib, h = u.WordArray, m = e.algo, B = m.SHA256, C = m.SHA224 = B.extend({
|
|
1756
1760
|
_doReset: function() {
|
|
1757
|
-
this._hash = new
|
|
1761
|
+
this._hash = new h.init([
|
|
1758
1762
|
3238371032,
|
|
1759
1763
|
914150663,
|
|
1760
1764
|
812702999,
|
|
@@ -1773,16 +1777,16 @@ function yt() {
|
|
|
1773
1777
|
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1774
1778
|
})(), t.SHA224;
|
|
1775
1779
|
});
|
|
1776
|
-
})(
|
|
1780
|
+
})(W0)), W0.exports;
|
|
1777
1781
|
}
|
|
1778
|
-
var
|
|
1782
|
+
var L0 = { exports: {} }, wt = L0.exports, Kr;
|
|
1779
1783
|
function we() {
|
|
1780
|
-
return Kr || (Kr = 1, (function(r,
|
|
1784
|
+
return Kr || (Kr = 1, (function(r, p) {
|
|
1781
1785
|
(function(t, e, u) {
|
|
1782
|
-
r.exports = e(M(),
|
|
1786
|
+
r.exports = e(M(), ur());
|
|
1783
1787
|
})(wt, function(t) {
|
|
1784
1788
|
return (function() {
|
|
1785
|
-
var e = t, u = e.lib,
|
|
1789
|
+
var e = t, u = e.lib, h = u.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
1786
1790
|
function n() {
|
|
1787
1791
|
return B.create.apply(B, arguments);
|
|
1788
1792
|
}
|
|
@@ -1872,7 +1876,7 @@ function we() {
|
|
|
1872
1876
|
for (var f = 0; f < 80; f++)
|
|
1873
1877
|
a[f] = n();
|
|
1874
1878
|
})();
|
|
1875
|
-
var s = x.SHA512 =
|
|
1879
|
+
var s = x.SHA512 = h.extend({
|
|
1876
1880
|
_doReset: function() {
|
|
1877
1881
|
this._hash = new C.init([
|
|
1878
1882
|
new B.init(1779033703, 4089235720),
|
|
@@ -1885,55 +1889,55 @@ function we() {
|
|
|
1885
1889
|
new B.init(1541459225, 327033209)
|
|
1886
1890
|
]);
|
|
1887
1891
|
},
|
|
1888
|
-
_doProcessBlock: function(f,
|
|
1889
|
-
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,
|
|
1890
|
-
var J,
|
|
1892
|
+
_doProcessBlock: function(f, v) {
|
|
1893
|
+
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, z = 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, I = R, P = F, L = w, W = H, Z = $, Q = z, o0 = O, K = q, G = U, Y = T, r0 = N, c0 = j, g0 = S, v0 = c, dr = A, p0 = _, e0 = 0; e0 < 80; e0++) {
|
|
1894
|
+
var J, t0, b0 = a[e0];
|
|
1891
1895
|
if (e0 < 16)
|
|
1892
|
-
|
|
1896
|
+
t0 = b0.high = f[v + e0 * 2] | 0, J = b0.low = f[v + e0 * 2 + 1] | 0;
|
|
1893
1897
|
else {
|
|
1894
|
-
var Dr = a[e0 - 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[e0 - 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[e0 - 7],
|
|
1895
|
-
J = gr +
|
|
1898
|
+
var Dr = a[e0 - 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[e0 - 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[e0 - 7], ze = _r.high, Ie = _r.low, yr = a[e0 - 16], We = yr.high, wr = yr.low;
|
|
1899
|
+
J = gr + Ie, t0 = Re + ze + (J >>> 0 < gr >>> 0 ? 1 : 0), J = J + mr, t0 = t0 + Pe + (J >>> 0 < mr >>> 0 ? 1 : 0), J = J + wr, t0 = t0 + We + (J >>> 0 < wr >>> 0 ? 1 : 0), b0.high = t0, b0.low = J;
|
|
1896
1900
|
}
|
|
1897
|
-
var Le = G & r0 ^ ~G &
|
|
1898
|
-
|
|
1901
|
+
var Le = G & r0 ^ ~G & g0, kr = Y & c0 ^ ~Y & v0, Oe = I & L ^ I & Z ^ L & Z, qe = P & W ^ P & Q ^ W & Q, Te = (I >>> 28 | P << 4) ^ (I << 30 | P >>> 2) ^ (I << 25 | P >>> 7), Sr = (P >>> 28 | I << 4) ^ (P << 30 | I >>> 2) ^ (P << 25 | I >>> 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[e0], Ue = Hr.high, $r = Hr.low, V = p0 + Ne, x0 = dr + Me + (V >>> 0 < p0 >>> 0 ? 1 : 0), V = V + kr, x0 = x0 + Le + (V >>> 0 < kr >>> 0 ? 1 : 0), V = V + $r, x0 = x0 + Ue + (V >>> 0 < $r >>> 0 ? 1 : 0), V = V + J, x0 = x0 + t0 + (V >>> 0 < J >>> 0 ? 1 : 0), Rr = Sr + qe, je = Te + Oe + (Rr >>> 0 < Sr >>> 0 ? 1 : 0);
|
|
1902
|
+
dr = g0, p0 = v0, g0 = r0, v0 = c0, r0 = G, c0 = Y, Y = K + V | 0, G = o0 + x0 + (Y >>> 0 < K >>> 0 ? 1 : 0) | 0, o0 = Z, K = Q, Z = L, Q = W, L = I, W = P, P = V + Rr | 0, I = x0 + je + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1899
1903
|
}
|
|
1900
|
-
F = g.low = F + P, g.high = R +
|
|
1904
|
+
F = g.low = F + P, g.high = R + I + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + W, i.high = w + L + (H >>> 0 < W >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = $ + Z + (z >>> 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 + r0 + (j >>> 0 < c0 >>> 0 ? 1 : 0), c = y.low = c + v0, y.high = S + g0 + (c >>> 0 < v0 >>> 0 ? 1 : 0), _ = k.low = _ + p0, k.high = A + dr + (_ >>> 0 < p0 >>> 0 ? 1 : 0);
|
|
1901
1905
|
},
|
|
1902
1906
|
_doFinalize: function() {
|
|
1903
|
-
var f = this._data,
|
|
1904
|
-
|
|
1907
|
+
var f = this._data, v = f.words, l = this._nDataBytes * 8, g = f.sigBytes * 8;
|
|
1908
|
+
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();
|
|
1905
1909
|
var i = this._hash.toX32();
|
|
1906
1910
|
return i;
|
|
1907
1911
|
},
|
|
1908
1912
|
clone: function() {
|
|
1909
|
-
var f =
|
|
1913
|
+
var f = h.clone.call(this);
|
|
1910
1914
|
return f._hash = this._hash.clone(), f;
|
|
1911
1915
|
},
|
|
1912
1916
|
blockSize: 1024 / 32
|
|
1913
1917
|
});
|
|
1914
|
-
e.SHA512 =
|
|
1918
|
+
e.SHA512 = h._createHelper(s), e.HmacSHA512 = h._createHmacHelper(s);
|
|
1915
1919
|
})(), t.SHA512;
|
|
1916
1920
|
});
|
|
1917
|
-
})(
|
|
1921
|
+
})(L0)), L0.exports;
|
|
1918
1922
|
}
|
|
1919
|
-
var
|
|
1923
|
+
var O0 = { exports: {} }, kt = O0.exports, Xr;
|
|
1920
1924
|
function St() {
|
|
1921
|
-
return Xr || (Xr = 1, (function(r,
|
|
1925
|
+
return Xr || (Xr = 1, (function(r, p) {
|
|
1922
1926
|
(function(t, e, u) {
|
|
1923
|
-
r.exports = e(M(),
|
|
1927
|
+
r.exports = e(M(), ur(), we());
|
|
1924
1928
|
})(kt, function(t) {
|
|
1925
1929
|
return (function() {
|
|
1926
|
-
var e = t, u = e.x64,
|
|
1930
|
+
var e = t, u = e.x64, h = u.Word, m = u.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1927
1931
|
_doReset: function() {
|
|
1928
1932
|
this._hash = new m.init([
|
|
1929
|
-
new
|
|
1930
|
-
new
|
|
1931
|
-
new
|
|
1932
|
-
new
|
|
1933
|
-
new
|
|
1934
|
-
new
|
|
1935
|
-
new
|
|
1936
|
-
new
|
|
1933
|
+
new h.init(3418070365, 3238371032),
|
|
1934
|
+
new h.init(1654270250, 914150663),
|
|
1935
|
+
new h.init(2438529370, 812702999),
|
|
1936
|
+
new h.init(355462360, 4144912697),
|
|
1937
|
+
new h.init(1731405415, 4290775857),
|
|
1938
|
+
new h.init(2394180231, 1750603025),
|
|
1939
|
+
new h.init(3675008525, 1694076839),
|
|
1940
|
+
new h.init(1203062813, 3204075428)
|
|
1937
1941
|
]);
|
|
1938
1942
|
},
|
|
1939
1943
|
_doFinalize: function() {
|
|
@@ -1944,16 +1948,16 @@ function St() {
|
|
|
1944
1948
|
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
1945
1949
|
})(), t.SHA384;
|
|
1946
1950
|
});
|
|
1947
|
-
})(
|
|
1951
|
+
})(O0)), O0.exports;
|
|
1948
1952
|
}
|
|
1949
|
-
var
|
|
1953
|
+
var q0 = { exports: {} }, Ht = q0.exports, Yr;
|
|
1950
1954
|
function $t() {
|
|
1951
|
-
return Yr || (Yr = 1, (function(r,
|
|
1955
|
+
return Yr || (Yr = 1, (function(r, p) {
|
|
1952
1956
|
(function(t, e, u) {
|
|
1953
|
-
r.exports = e(M(),
|
|
1957
|
+
r.exports = e(M(), ur());
|
|
1954
1958
|
})(Ht, function(t) {
|
|
1955
1959
|
return (function(e) {
|
|
1956
|
-
var u = t,
|
|
1960
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
1957
1961
|
(function() {
|
|
1958
1962
|
for (var l = 1, g = 0, i = 0; i < 24; i++) {
|
|
1959
1963
|
E[l + 5 * g] = (i + 1) * (i + 2) / 2 % 64;
|
|
@@ -1979,7 +1983,7 @@ function $t() {
|
|
|
1979
1983
|
for (var l = 0; l < 25; l++)
|
|
1980
1984
|
f[l] = x.create();
|
|
1981
1985
|
})();
|
|
1982
|
-
var
|
|
1986
|
+
var v = n.SHA3 = B.extend({
|
|
1983
1987
|
/**
|
|
1984
1988
|
* Configuration options.
|
|
1985
1989
|
*
|
|
@@ -2013,7 +2017,7 @@ function $t() {
|
|
|
2013
2017
|
$.high = F, $.low = w;
|
|
2014
2018
|
}
|
|
2015
2019
|
for (var R = 0; R < 5; R++)
|
|
2016
|
-
for (var
|
|
2020
|
+
for (var z = f[(R + 4) % 5], O = f[(R + 1) % 5], q = O.high, U = O.low, F = z.high ^ (q << 1 | U >>> 31), w = z.low ^ (U << 1 | q >>> 31), H = 0; H < 5; H++) {
|
|
2017
2021
|
var y = i[R + 5 * H];
|
|
2018
2022
|
y.high ^= F, y.low ^= w;
|
|
2019
2023
|
}
|
|
@@ -2027,11 +2031,11 @@ function $t() {
|
|
|
2027
2031
|
A.high = _.high, A.low = _.low;
|
|
2028
2032
|
for (var R = 0; R < 5; R++)
|
|
2029
2033
|
for (var H = 0; H < 5; H++) {
|
|
2030
|
-
var T = R + 5 * H, y = i[T],
|
|
2031
|
-
y.high =
|
|
2034
|
+
var T = R + 5 * H, y = i[T], I = f[T], P = f[(R + 1) % 5 + 5 * H], L = f[(R + 2) % 5 + 5 * H];
|
|
2035
|
+
y.high = I.high ^ ~P.high & L.high, y.low = I.low ^ ~P.low & L.low;
|
|
2032
2036
|
}
|
|
2033
|
-
var y = i[0],
|
|
2034
|
-
y.high ^=
|
|
2037
|
+
var y = i[0], W = s[k];
|
|
2038
|
+
y.high ^= W.high, y.low ^= W.low;
|
|
2035
2039
|
}
|
|
2036
2040
|
},
|
|
2037
2041
|
_doFinalize: function() {
|
|
@@ -2051,19 +2055,19 @@ function $t() {
|
|
|
2051
2055
|
return l;
|
|
2052
2056
|
}
|
|
2053
2057
|
});
|
|
2054
|
-
u.SHA3 = B._createHelper(
|
|
2058
|
+
u.SHA3 = B._createHelper(v), u.HmacSHA3 = B._createHmacHelper(v);
|
|
2055
2059
|
})(Math), t.SHA3;
|
|
2056
2060
|
});
|
|
2057
|
-
})(
|
|
2061
|
+
})(q0)), q0.exports;
|
|
2058
2062
|
}
|
|
2059
|
-
var
|
|
2063
|
+
var T0 = { exports: {} }, Rt = T0.exports, Zr;
|
|
2060
2064
|
function Pt() {
|
|
2061
|
-
return Zr || (Zr = 1, (function(r,
|
|
2065
|
+
return Zr || (Zr = 1, (function(r, p) {
|
|
2062
2066
|
(function(t, e) {
|
|
2063
2067
|
r.exports = e(M());
|
|
2064
2068
|
})(Rt, function(t) {
|
|
2065
2069
|
return (function(e) {
|
|
2066
|
-
var u = t,
|
|
2070
|
+
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = m.create([
|
|
2067
2071
|
0,
|
|
2068
2072
|
1,
|
|
2069
2073
|
2,
|
|
@@ -2387,7 +2391,7 @@ function Pt() {
|
|
|
2387
2391
|
13,
|
|
2388
2392
|
11,
|
|
2389
2393
|
11
|
|
2390
|
-
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
|
|
2394
|
+
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), v = C.RIPEMD160 = B.extend({
|
|
2391
2395
|
_doReset: function() {
|
|
2392
2396
|
this._hash = m.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2393
2397
|
},
|
|
@@ -2396,11 +2400,11 @@ function Pt() {
|
|
|
2396
2400
|
var R = y + k, F = D[R];
|
|
2397
2401
|
D[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2398
2402
|
}
|
|
2399
|
-
var w = this._hash.words, H = s.words, $ = f.words,
|
|
2400
|
-
A = T = w[0], _ = N = w[1],
|
|
2401
|
-
for (var
|
|
2402
|
-
|
|
2403
|
-
|
|
2403
|
+
var w = this._hash.words, H = s.words, $ = f.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _, I, P, L;
|
|
2404
|
+
A = T = w[0], _ = N = w[1], I = j = w[2], P = S = w[3], L = c = w[4];
|
|
2405
|
+
for (var W, k = 0; k < 80; k += 1)
|
|
2406
|
+
W = T + D[y + z[k]] | 0, k < 16 ? W += l(N, j, S) + H[0] : k < 32 ? W += g(N, j, S) + H[1] : k < 48 ? W += i(N, j, S) + H[2] : k < 64 ? W += o(N, j, S) + H[3] : W += d(N, j, S) + H[4], W = W | 0, W = b(W, q[k]), W = W + c | 0, T = c, c = S, S = b(j, 10), j = N, N = W, W = A + D[y + O[k]] | 0, k < 16 ? W += d(_, I, P) + $[0] : k < 32 ? W += o(_, I, P) + $[1] : k < 48 ? W += i(_, I, P) + $[2] : k < 64 ? W += g(_, I, P) + $[3] : W += l(_, I, P) + $[4], W = W | 0, W = b(W, U[k]), W = W + L | 0, A = L, L = P, P = b(I, 10), I = _, _ = W;
|
|
2407
|
+
W = 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 + I | 0, w[0] = W;
|
|
2404
2408
|
},
|
|
2405
2409
|
_doFinalize: function() {
|
|
2406
2410
|
var D = this._data, y = D.words, k = this._nDataBytes * 8, R = D.sigBytes * 8;
|
|
@@ -2434,20 +2438,20 @@ function Pt() {
|
|
|
2434
2438
|
function b(D, y) {
|
|
2435
2439
|
return D << y | D >>> 32 - y;
|
|
2436
2440
|
}
|
|
2437
|
-
u.RIPEMD160 = B._createHelper(
|
|
2441
|
+
u.RIPEMD160 = B._createHelper(v), u.HmacRIPEMD160 = B._createHmacHelper(v);
|
|
2438
2442
|
})(), t.RIPEMD160;
|
|
2439
2443
|
});
|
|
2440
|
-
})(
|
|
2444
|
+
})(T0)), T0.exports;
|
|
2441
2445
|
}
|
|
2442
|
-
var
|
|
2446
|
+
var M0 = { exports: {} }, zt = M0.exports, Qr;
|
|
2443
2447
|
function Ar() {
|
|
2444
|
-
return Qr || (Qr = 1, (function(r,
|
|
2448
|
+
return Qr || (Qr = 1, (function(r, p) {
|
|
2445
2449
|
(function(t, e) {
|
|
2446
2450
|
r.exports = e(M());
|
|
2447
|
-
})(
|
|
2451
|
+
})(zt, function(t) {
|
|
2448
2452
|
(function() {
|
|
2449
|
-
var e = t, u = e.lib,
|
|
2450
|
-
C.HMAC =
|
|
2453
|
+
var e = t, u = e.lib, h = u.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2454
|
+
C.HMAC = h.extend({
|
|
2451
2455
|
/**
|
|
2452
2456
|
* Initializes a newly created HMAC.
|
|
2453
2457
|
*
|
|
@@ -2462,8 +2466,8 @@ function Ar() {
|
|
|
2462
2466
|
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2463
2467
|
var E = x.blockSize, a = E * 4;
|
|
2464
2468
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2465
|
-
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(),
|
|
2466
|
-
|
|
2469
|
+
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), v = s.words, l = f.words, g = 0; g < E; g++)
|
|
2470
|
+
v[g] ^= 1549556828, l[g] ^= 909522486;
|
|
2467
2471
|
s.sigBytes = f.sigBytes = a, this.reset();
|
|
2468
2472
|
},
|
|
2469
2473
|
/**
|
|
@@ -2515,16 +2519,16 @@ function Ar() {
|
|
|
2515
2519
|
});
|
|
2516
2520
|
})();
|
|
2517
2521
|
});
|
|
2518
|
-
})(
|
|
2522
|
+
})(M0)), M0.exports;
|
|
2519
2523
|
}
|
|
2520
|
-
var
|
|
2521
|
-
function
|
|
2522
|
-
return Vr || (Vr = 1, (function(r,
|
|
2524
|
+
var N0 = { exports: {} }, It = N0.exports, Vr;
|
|
2525
|
+
function Wt() {
|
|
2526
|
+
return Vr || (Vr = 1, (function(r, p) {
|
|
2523
2527
|
(function(t, e, u) {
|
|
2524
2528
|
r.exports = e(M(), Er(), Ar());
|
|
2525
|
-
})(
|
|
2529
|
+
})(It, function(t) {
|
|
2526
2530
|
return (function() {
|
|
2527
|
-
var e = t, u = e.lib,
|
|
2531
|
+
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({
|
|
2528
2532
|
/**
|
|
2529
2533
|
* Configuration options.
|
|
2530
2534
|
*
|
|
@@ -2532,7 +2536,7 @@ function It() {
|
|
|
2532
2536
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2533
2537
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2534
2538
|
*/
|
|
2535
|
-
cfg:
|
|
2539
|
+
cfg: h.extend({
|
|
2536
2540
|
keySize: 128 / 32,
|
|
2537
2541
|
hasher: C,
|
|
2538
2542
|
iterations: 25e4
|
|
@@ -2564,7 +2568,7 @@ function It() {
|
|
|
2564
2568
|
* var key = kdf.compute(password, salt);
|
|
2565
2569
|
*/
|
|
2566
2570
|
compute: function(E, a) {
|
|
2567
|
-
for (var s = this.cfg, f = x.create(s.hasher, E),
|
|
2571
|
+
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; ) {
|
|
2568
2572
|
var b = f.update(a).finalize(l);
|
|
2569
2573
|
f.reset();
|
|
2570
2574
|
for (var D = b.words, y = D.length, k = b, R = 1; R < d; R++) {
|
|
@@ -2572,9 +2576,9 @@ function It() {
|
|
|
2572
2576
|
for (var F = k.words, w = 0; w < y; w++)
|
|
2573
2577
|
D[w] ^= F[w];
|
|
2574
2578
|
}
|
|
2575
|
-
|
|
2579
|
+
v.concat(b), i[0]++;
|
|
2576
2580
|
}
|
|
2577
|
-
return
|
|
2581
|
+
return v.sigBytes = o * 4, v;
|
|
2578
2582
|
}
|
|
2579
2583
|
});
|
|
2580
2584
|
e.PBKDF2 = function(E, a, s) {
|
|
@@ -2582,16 +2586,16 @@ function It() {
|
|
|
2582
2586
|
};
|
|
2583
2587
|
})(), t.PBKDF2;
|
|
2584
2588
|
});
|
|
2585
|
-
})(
|
|
2589
|
+
})(N0)), N0.exports;
|
|
2586
2590
|
}
|
|
2587
|
-
var
|
|
2591
|
+
var U0 = { exports: {} }, Lt = U0.exports, Jr;
|
|
2588
2592
|
function a0() {
|
|
2589
|
-
return Jr || (Jr = 1, (function(r,
|
|
2593
|
+
return Jr || (Jr = 1, (function(r, p) {
|
|
2590
2594
|
(function(t, e, u) {
|
|
2591
2595
|
r.exports = e(M(), ye(), Ar());
|
|
2592
2596
|
})(Lt, function(t) {
|
|
2593
2597
|
return (function() {
|
|
2594
|
-
var e = t, u = e.lib,
|
|
2598
|
+
var e = t, u = e.lib, h = u.Base, m = u.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = h.extend({
|
|
2595
2599
|
/**
|
|
2596
2600
|
* Configuration options.
|
|
2597
2601
|
*
|
|
@@ -2599,7 +2603,7 @@ function a0() {
|
|
|
2599
2603
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2600
2604
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2601
2605
|
*/
|
|
2602
|
-
cfg:
|
|
2606
|
+
cfg: h.extend({
|
|
2603
2607
|
keySize: 128 / 32,
|
|
2604
2608
|
hasher: C,
|
|
2605
2609
|
iterations: 1
|
|
@@ -2631,13 +2635,13 @@ function a0() {
|
|
|
2631
2635
|
* var key = kdf.compute(password, salt);
|
|
2632
2636
|
*/
|
|
2633
2637
|
compute: function(n, E) {
|
|
2634
|
-
for (var a, s = this.cfg, f = s.hasher.create(),
|
|
2638
|
+
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; ) {
|
|
2635
2639
|
a && f.update(a), a = f.update(n).finalize(E), f.reset();
|
|
2636
2640
|
for (var o = 1; o < i; o++)
|
|
2637
2641
|
a = f.finalize(a), f.reset();
|
|
2638
|
-
|
|
2642
|
+
v.concat(a);
|
|
2639
2643
|
}
|
|
2640
|
-
return
|
|
2644
|
+
return v.sigBytes = g * 4, v;
|
|
2641
2645
|
}
|
|
2642
2646
|
});
|
|
2643
2647
|
e.EvpKDF = function(n, E, a) {
|
|
@@ -2645,18 +2649,18 @@ function a0() {
|
|
|
2645
2649
|
};
|
|
2646
2650
|
})(), t.EvpKDF;
|
|
2647
2651
|
});
|
|
2648
|
-
})(
|
|
2652
|
+
})(U0)), U0.exports;
|
|
2649
2653
|
}
|
|
2650
|
-
var
|
|
2654
|
+
var j0 = { exports: {} }, Ot = j0.exports, re;
|
|
2651
2655
|
function X() {
|
|
2652
|
-
return re || (re = 1, (function(r,
|
|
2656
|
+
return re || (re = 1, (function(r, p) {
|
|
2653
2657
|
(function(t, e, u) {
|
|
2654
2658
|
r.exports = e(M(), a0());
|
|
2655
2659
|
})(Ot, function(t) {
|
|
2656
2660
|
t.lib.Cipher || (function(e) {
|
|
2657
|
-
var u = t,
|
|
2661
|
+
var u = t, h = u.lib, m = h.Base, B = h.WordArray, C = h.BufferedBlockAlgorithm, x = u.enc;
|
|
2658
2662
|
x.Utf8;
|
|
2659
|
-
var n = x.Base64, E = u.algo, a = E.EvpKDF, s =
|
|
2663
|
+
var n = x.Base64, E = u.algo, a = E.EvpKDF, s = h.Cipher = C.extend({
|
|
2660
2664
|
/**
|
|
2661
2665
|
* Configuration options.
|
|
2662
2666
|
*
|
|
@@ -2778,24 +2782,24 @@ function X() {
|
|
|
2778
2782
|
}
|
|
2779
2783
|
return function(w) {
|
|
2780
2784
|
return {
|
|
2781
|
-
encrypt: function(H, $,
|
|
2782
|
-
return F($).encrypt(w, H, $,
|
|
2785
|
+
encrypt: function(H, $, z) {
|
|
2786
|
+
return F($).encrypt(w, H, $, z);
|
|
2783
2787
|
},
|
|
2784
|
-
decrypt: function(H, $,
|
|
2785
|
-
return F($).decrypt(w, H, $,
|
|
2788
|
+
decrypt: function(H, $, z) {
|
|
2789
|
+
return F($).decrypt(w, H, $, z);
|
|
2786
2790
|
}
|
|
2787
2791
|
};
|
|
2788
2792
|
};
|
|
2789
2793
|
})()
|
|
2790
2794
|
});
|
|
2791
|
-
|
|
2795
|
+
h.StreamCipher = s.extend({
|
|
2792
2796
|
_doFinalize: function() {
|
|
2793
2797
|
var F = this._process(!0);
|
|
2794
2798
|
return F;
|
|
2795
2799
|
},
|
|
2796
2800
|
blockSize: 1
|
|
2797
2801
|
});
|
|
2798
|
-
var f = u.mode = {},
|
|
2802
|
+
var f = u.mode = {}, v = h.BlockCipherMode = m.extend({
|
|
2799
2803
|
/**
|
|
2800
2804
|
* Creates this mode for encryption.
|
|
2801
2805
|
*
|
|
@@ -2840,7 +2844,7 @@ function X() {
|
|
|
2840
2844
|
this._cipher = F, this._iv = w;
|
|
2841
2845
|
}
|
|
2842
2846
|
}), l = f.CBC = (function() {
|
|
2843
|
-
var F =
|
|
2847
|
+
var F = v.extend();
|
|
2844
2848
|
F.Encryptor = F.extend({
|
|
2845
2849
|
/**
|
|
2846
2850
|
* Processes the data block at offset.
|
|
@@ -2853,8 +2857,8 @@ function X() {
|
|
|
2853
2857
|
* mode.processBlock(data.words, offset);
|
|
2854
2858
|
*/
|
|
2855
2859
|
processBlock: function(H, $) {
|
|
2856
|
-
var
|
|
2857
|
-
w.call(this, H, $, O),
|
|
2860
|
+
var z = this._cipher, O = z.blockSize;
|
|
2861
|
+
w.call(this, H, $, O), z.encryptBlock(H, $), this._prevBlock = H.slice($, $ + O);
|
|
2858
2862
|
}
|
|
2859
2863
|
}), F.Decryptor = F.extend({
|
|
2860
2864
|
/**
|
|
@@ -2868,14 +2872,14 @@ function X() {
|
|
|
2868
2872
|
* mode.processBlock(data.words, offset);
|
|
2869
2873
|
*/
|
|
2870
2874
|
processBlock: function(H, $) {
|
|
2871
|
-
var
|
|
2872
|
-
|
|
2875
|
+
var z = this._cipher, O = z.blockSize, q = H.slice($, $ + O);
|
|
2876
|
+
z.decryptBlock(H, $), w.call(this, H, $, O), this._prevBlock = q;
|
|
2873
2877
|
}
|
|
2874
2878
|
});
|
|
2875
|
-
function w(H, $,
|
|
2879
|
+
function w(H, $, z) {
|
|
2876
2880
|
var O, q = this._iv;
|
|
2877
2881
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2878
|
-
for (var U = 0; U <
|
|
2882
|
+
for (var U = 0; U < z; U++)
|
|
2879
2883
|
H[$ + U] ^= O[U];
|
|
2880
2884
|
}
|
|
2881
2885
|
return F;
|
|
@@ -2893,8 +2897,8 @@ function X() {
|
|
|
2893
2897
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2894
2898
|
*/
|
|
2895
2899
|
pad: function(F, w) {
|
|
2896
|
-
for (var H = w * 4, $ = H - F.sigBytes % H,
|
|
2897
|
-
O.push(
|
|
2900
|
+
for (var H = w * 4, $ = H - F.sigBytes % H, z = $ << 24 | $ << 16 | $ << 8 | $, O = [], q = 0; q < $; q += 4)
|
|
2901
|
+
O.push(z);
|
|
2898
2902
|
var U = B.create(O, $);
|
|
2899
2903
|
F.concat(U);
|
|
2900
2904
|
},
|
|
@@ -2914,7 +2918,7 @@ function X() {
|
|
|
2914
2918
|
F.sigBytes -= w;
|
|
2915
2919
|
}
|
|
2916
2920
|
};
|
|
2917
|
-
|
|
2921
|
+
h.BlockCipher = s.extend({
|
|
2918
2922
|
/**
|
|
2919
2923
|
* Configuration options.
|
|
2920
2924
|
*
|
|
@@ -2940,7 +2944,7 @@ function X() {
|
|
|
2940
2944
|
},
|
|
2941
2945
|
blockSize: 128 / 32
|
|
2942
2946
|
});
|
|
2943
|
-
var o =
|
|
2947
|
+
var o = h.CipherParams = m.extend({
|
|
2944
2948
|
/**
|
|
2945
2949
|
* Initializes a newly created cipher params object.
|
|
2946
2950
|
*
|
|
@@ -3016,7 +3020,7 @@ function X() {
|
|
|
3016
3020
|
var w, H = n.parse(F), $ = H.words;
|
|
3017
3021
|
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3018
3022
|
}
|
|
3019
|
-
}, D =
|
|
3023
|
+
}, D = h.SerializableCipher = m.extend({
|
|
3020
3024
|
/**
|
|
3021
3025
|
* Configuration options.
|
|
3022
3026
|
*
|
|
@@ -3045,7 +3049,7 @@ function X() {
|
|
|
3045
3049
|
*/
|
|
3046
3050
|
encrypt: function(F, w, H, $) {
|
|
3047
3051
|
$ = this.cfg.extend($);
|
|
3048
|
-
var
|
|
3052
|
+
var z = F.createEncryptor(H, $), O = z.finalize(w), q = z.cfg;
|
|
3049
3053
|
return o.create({
|
|
3050
3054
|
ciphertext: O,
|
|
3051
3055
|
key: H,
|
|
@@ -3076,8 +3080,8 @@ function X() {
|
|
|
3076
3080
|
*/
|
|
3077
3081
|
decrypt: function(F, w, H, $) {
|
|
3078
3082
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3079
|
-
var
|
|
3080
|
-
return
|
|
3083
|
+
var z = F.createDecryptor(H, $).finalize(w.ciphertext);
|
|
3084
|
+
return z;
|
|
3081
3085
|
},
|
|
3082
3086
|
/**
|
|
3083
3087
|
* Converts serialized ciphertext to CipherParams,
|
|
@@ -3115,15 +3119,15 @@ function X() {
|
|
|
3115
3119
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3116
3120
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3117
3121
|
*/
|
|
3118
|
-
execute: function(F, w, H, $,
|
|
3119
|
-
if ($ || ($ = B.random(64 / 8)),
|
|
3120
|
-
var O = a.create({ keySize: w + H, hasher:
|
|
3122
|
+
execute: function(F, w, H, $, z) {
|
|
3123
|
+
if ($ || ($ = B.random(64 / 8)), z)
|
|
3124
|
+
var O = a.create({ keySize: w + H, hasher: z }).compute(F, $);
|
|
3121
3125
|
else
|
|
3122
3126
|
var O = a.create({ keySize: w + H }).compute(F, $);
|
|
3123
3127
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3124
3128
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3125
3129
|
}
|
|
3126
|
-
}, R =
|
|
3130
|
+
}, R = h.PasswordBasedCipher = D.extend({
|
|
3127
3131
|
/**
|
|
3128
3132
|
* Configuration options.
|
|
3129
3133
|
*
|
|
@@ -3151,10 +3155,10 @@ function X() {
|
|
|
3151
3155
|
*/
|
|
3152
3156
|
encrypt: function(F, w, H, $) {
|
|
3153
3157
|
$ = this.cfg.extend($);
|
|
3154
|
-
var
|
|
3155
|
-
$.iv =
|
|
3156
|
-
var O = D.encrypt.call(this, F, w,
|
|
3157
|
-
return O.mixIn(
|
|
3158
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, $.salt, $.hasher);
|
|
3159
|
+
$.iv = z.iv;
|
|
3160
|
+
var O = D.encrypt.call(this, F, w, z.key, $);
|
|
3161
|
+
return O.mixIn(z), O;
|
|
3158
3162
|
},
|
|
3159
3163
|
/**
|
|
3160
3164
|
* Decrypts serialized ciphertext using a password.
|
|
@@ -3175,71 +3179,71 @@ function X() {
|
|
|
3175
3179
|
*/
|
|
3176
3180
|
decrypt: function(F, w, H, $) {
|
|
3177
3181
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3178
|
-
var
|
|
3179
|
-
$.iv =
|
|
3180
|
-
var O = D.decrypt.call(this, F, w,
|
|
3182
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, w.salt, $.hasher);
|
|
3183
|
+
$.iv = z.iv;
|
|
3184
|
+
var O = D.decrypt.call(this, F, w, z.key, $);
|
|
3181
3185
|
return O;
|
|
3182
3186
|
}
|
|
3183
3187
|
});
|
|
3184
3188
|
})();
|
|
3185
3189
|
});
|
|
3186
|
-
})(
|
|
3190
|
+
})(j0)), j0.exports;
|
|
3187
3191
|
}
|
|
3188
|
-
var
|
|
3192
|
+
var G0 = { exports: {} }, qt = G0.exports, ee;
|
|
3189
3193
|
function Tt() {
|
|
3190
|
-
return ee || (ee = 1, (function(r,
|
|
3194
|
+
return ee || (ee = 1, (function(r, p) {
|
|
3191
3195
|
(function(t, e, u) {
|
|
3192
3196
|
r.exports = e(M(), X());
|
|
3193
3197
|
})(qt, function(t) {
|
|
3194
3198
|
return t.mode.CFB = (function() {
|
|
3195
3199
|
var e = t.lib.BlockCipherMode.extend();
|
|
3196
3200
|
e.Encryptor = e.extend({
|
|
3197
|
-
processBlock: function(
|
|
3201
|
+
processBlock: function(h, m) {
|
|
3198
3202
|
var B = this._cipher, C = B.blockSize;
|
|
3199
|
-
u.call(this,
|
|
3203
|
+
u.call(this, h, m, C, B), this._prevBlock = h.slice(m, m + C);
|
|
3200
3204
|
}
|
|
3201
3205
|
}), e.Decryptor = e.extend({
|
|
3202
|
-
processBlock: function(
|
|
3203
|
-
var B = this._cipher, C = B.blockSize, x =
|
|
3204
|
-
u.call(this,
|
|
3206
|
+
processBlock: function(h, m) {
|
|
3207
|
+
var B = this._cipher, C = B.blockSize, x = h.slice(m, m + C);
|
|
3208
|
+
u.call(this, h, m, C, B), this._prevBlock = x;
|
|
3205
3209
|
}
|
|
3206
3210
|
});
|
|
3207
|
-
function u(
|
|
3211
|
+
function u(h, m, B, C) {
|
|
3208
3212
|
var x, n = this._iv;
|
|
3209
3213
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3210
3214
|
for (var E = 0; E < B; E++)
|
|
3211
|
-
|
|
3215
|
+
h[m + E] ^= x[E];
|
|
3212
3216
|
}
|
|
3213
3217
|
return e;
|
|
3214
3218
|
})(), t.mode.CFB;
|
|
3215
3219
|
});
|
|
3216
|
-
})(
|
|
3220
|
+
})(G0)), G0.exports;
|
|
3217
3221
|
}
|
|
3218
|
-
var
|
|
3222
|
+
var K0 = { exports: {} }, Mt = K0.exports, te;
|
|
3219
3223
|
function Nt() {
|
|
3220
|
-
return te || (te = 1, (function(r,
|
|
3224
|
+
return te || (te = 1, (function(r, p) {
|
|
3221
3225
|
(function(t, e, u) {
|
|
3222
3226
|
r.exports = e(M(), X());
|
|
3223
3227
|
})(Mt, function(t) {
|
|
3224
3228
|
return t.mode.CTR = (function() {
|
|
3225
3229
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3226
|
-
processBlock: function(
|
|
3230
|
+
processBlock: function(h, m) {
|
|
3227
3231
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3228
3232
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3229
3233
|
var E = n.slice(0);
|
|
3230
3234
|
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3231
3235
|
for (var a = 0; a < C; a++)
|
|
3232
|
-
|
|
3236
|
+
h[m + a] ^= E[a];
|
|
3233
3237
|
}
|
|
3234
3238
|
});
|
|
3235
3239
|
return e.Decryptor = u, e;
|
|
3236
3240
|
})(), t.mode.CTR;
|
|
3237
3241
|
});
|
|
3238
|
-
})(
|
|
3242
|
+
})(K0)), K0.exports;
|
|
3239
3243
|
}
|
|
3240
|
-
var
|
|
3244
|
+
var X0 = { exports: {} }, Ut = X0.exports, xe;
|
|
3241
3245
|
function jt() {
|
|
3242
|
-
return xe || (xe = 1, (function(r,
|
|
3246
|
+
return xe || (xe = 1, (function(r, p) {
|
|
3243
3247
|
(function(t, e, u) {
|
|
3244
3248
|
r.exports = e(M(), X());
|
|
3245
3249
|
})(Ut, function(t) {
|
|
@@ -3253,13 +3257,13 @@ function jt() {
|
|
|
3253
3257
|
B += 1 << 24;
|
|
3254
3258
|
return B;
|
|
3255
3259
|
}
|
|
3256
|
-
function
|
|
3260
|
+
function h(B) {
|
|
3257
3261
|
return (B[0] = u(B[0])) === 0 && (B[1] = u(B[1])), B;
|
|
3258
3262
|
}
|
|
3259
3263
|
var m = e.Encryptor = e.extend({
|
|
3260
3264
|
processBlock: function(B, C) {
|
|
3261
3265
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3262
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3266
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), h(a);
|
|
3263
3267
|
var s = a.slice(0);
|
|
3264
3268
|
x.encryptBlock(s, 0);
|
|
3265
3269
|
for (var f = 0; f < n; f++)
|
|
@@ -3269,58 +3273,58 @@ function jt() {
|
|
|
3269
3273
|
return e.Decryptor = m, e;
|
|
3270
3274
|
})(), t.mode.CTRGladman;
|
|
3271
3275
|
});
|
|
3272
|
-
})(
|
|
3276
|
+
})(X0)), X0.exports;
|
|
3273
3277
|
}
|
|
3274
|
-
var
|
|
3278
|
+
var Y0 = { exports: {} }, Gt = Y0.exports, ne;
|
|
3275
3279
|
function Kt() {
|
|
3276
|
-
return ne || (ne = 1, (function(r,
|
|
3280
|
+
return ne || (ne = 1, (function(r, p) {
|
|
3277
3281
|
(function(t, e, u) {
|
|
3278
3282
|
r.exports = e(M(), X());
|
|
3279
3283
|
})(Gt, function(t) {
|
|
3280
3284
|
return t.mode.OFB = (function() {
|
|
3281
3285
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3282
|
-
processBlock: function(
|
|
3286
|
+
processBlock: function(h, m) {
|
|
3283
3287
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3284
3288
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3285
3289
|
for (var E = 0; E < C; E++)
|
|
3286
|
-
|
|
3290
|
+
h[m + E] ^= n[E];
|
|
3287
3291
|
}
|
|
3288
3292
|
});
|
|
3289
3293
|
return e.Decryptor = u, e;
|
|
3290
3294
|
})(), t.mode.OFB;
|
|
3291
3295
|
});
|
|
3292
|
-
})(
|
|
3296
|
+
})(Y0)), Y0.exports;
|
|
3293
3297
|
}
|
|
3294
|
-
var
|
|
3298
|
+
var Z0 = { exports: {} }, Xt = Z0.exports, ae;
|
|
3295
3299
|
function Yt() {
|
|
3296
|
-
return ae || (ae = 1, (function(r,
|
|
3300
|
+
return ae || (ae = 1, (function(r, p) {
|
|
3297
3301
|
(function(t, e, u) {
|
|
3298
3302
|
r.exports = e(M(), X());
|
|
3299
3303
|
})(Xt, function(t) {
|
|
3300
3304
|
return t.mode.ECB = (function() {
|
|
3301
3305
|
var e = t.lib.BlockCipherMode.extend();
|
|
3302
3306
|
return e.Encryptor = e.extend({
|
|
3303
|
-
processBlock: function(u,
|
|
3304
|
-
this._cipher.encryptBlock(u,
|
|
3307
|
+
processBlock: function(u, h) {
|
|
3308
|
+
this._cipher.encryptBlock(u, h);
|
|
3305
3309
|
}
|
|
3306
3310
|
}), e.Decryptor = e.extend({
|
|
3307
|
-
processBlock: function(u,
|
|
3308
|
-
this._cipher.decryptBlock(u,
|
|
3311
|
+
processBlock: function(u, h) {
|
|
3312
|
+
this._cipher.decryptBlock(u, h);
|
|
3309
3313
|
}
|
|
3310
3314
|
}), e;
|
|
3311
3315
|
})(), t.mode.ECB;
|
|
3312
3316
|
});
|
|
3313
|
-
})(
|
|
3317
|
+
})(Z0)), Z0.exports;
|
|
3314
3318
|
}
|
|
3315
|
-
var
|
|
3319
|
+
var Q0 = { exports: {} }, Zt = Q0.exports, oe;
|
|
3316
3320
|
function Qt() {
|
|
3317
|
-
return oe || (oe = 1, (function(r,
|
|
3321
|
+
return oe || (oe = 1, (function(r, p) {
|
|
3318
3322
|
(function(t, e, u) {
|
|
3319
3323
|
r.exports = e(M(), X());
|
|
3320
3324
|
})(Zt, function(t) {
|
|
3321
3325
|
return t.pad.AnsiX923 = {
|
|
3322
3326
|
pad: function(e, u) {
|
|
3323
|
-
var
|
|
3327
|
+
var h = e.sigBytes, m = u * 4, B = m - h % m, C = h + B - 1;
|
|
3324
3328
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3325
3329
|
},
|
|
3326
3330
|
unpad: function(e) {
|
|
@@ -3329,17 +3333,17 @@ function Qt() {
|
|
|
3329
3333
|
}
|
|
3330
3334
|
}, t.pad.Ansix923;
|
|
3331
3335
|
});
|
|
3332
|
-
})(
|
|
3336
|
+
})(Q0)), Q0.exports;
|
|
3333
3337
|
}
|
|
3334
|
-
var
|
|
3338
|
+
var V0 = { exports: {} }, Vt = V0.exports, ie;
|
|
3335
3339
|
function Jt() {
|
|
3336
|
-
return ie || (ie = 1, (function(r,
|
|
3340
|
+
return ie || (ie = 1, (function(r, p) {
|
|
3337
3341
|
(function(t, e, u) {
|
|
3338
3342
|
r.exports = e(M(), X());
|
|
3339
3343
|
})(Vt, function(t) {
|
|
3340
3344
|
return t.pad.Iso10126 = {
|
|
3341
3345
|
pad: function(e, u) {
|
|
3342
|
-
var
|
|
3346
|
+
var h = u * 4, m = h - e.sigBytes % h;
|
|
3343
3347
|
e.concat(t.lib.WordArray.random(m - 1)).concat(t.lib.WordArray.create([m << 24], 1));
|
|
3344
3348
|
},
|
|
3345
3349
|
unpad: function(e) {
|
|
@@ -3348,11 +3352,11 @@ function Jt() {
|
|
|
3348
3352
|
}
|
|
3349
3353
|
}, t.pad.Iso10126;
|
|
3350
3354
|
});
|
|
3351
|
-
})(
|
|
3355
|
+
})(V0)), V0.exports;
|
|
3352
3356
|
}
|
|
3353
|
-
var
|
|
3357
|
+
var J0 = { exports: {} }, rx = J0.exports, se;
|
|
3354
3358
|
function ex() {
|
|
3355
|
-
return se || (se = 1, (function(r,
|
|
3359
|
+
return se || (se = 1, (function(r, p) {
|
|
3356
3360
|
(function(t, e, u) {
|
|
3357
3361
|
r.exports = e(M(), X());
|
|
3358
3362
|
})(rx, function(t) {
|
|
@@ -3365,33 +3369,33 @@ function ex() {
|
|
|
3365
3369
|
}
|
|
3366
3370
|
}, t.pad.Iso97971;
|
|
3367
3371
|
});
|
|
3368
|
-
})(
|
|
3372
|
+
})(J0)), J0.exports;
|
|
3369
3373
|
}
|
|
3370
|
-
var
|
|
3374
|
+
var rr = { exports: {} }, tx = rr.exports, ce;
|
|
3371
3375
|
function xx() {
|
|
3372
|
-
return ce || (ce = 1, (function(r,
|
|
3376
|
+
return ce || (ce = 1, (function(r, p) {
|
|
3373
3377
|
(function(t, e, u) {
|
|
3374
3378
|
r.exports = e(M(), X());
|
|
3375
3379
|
})(tx, function(t) {
|
|
3376
3380
|
return t.pad.ZeroPadding = {
|
|
3377
3381
|
pad: function(e, u) {
|
|
3378
|
-
var
|
|
3379
|
-
e.clamp(), e.sigBytes +=
|
|
3382
|
+
var h = u * 4;
|
|
3383
|
+
e.clamp(), e.sigBytes += h - (e.sigBytes % h || h);
|
|
3380
3384
|
},
|
|
3381
3385
|
unpad: function(e) {
|
|
3382
|
-
for (var u = e.words,
|
|
3383
|
-
if (u[
|
|
3384
|
-
e.sigBytes =
|
|
3386
|
+
for (var u = e.words, h = e.sigBytes - 1, h = e.sigBytes - 1; h >= 0; h--)
|
|
3387
|
+
if (u[h >>> 2] >>> 24 - h % 4 * 8 & 255) {
|
|
3388
|
+
e.sigBytes = h + 1;
|
|
3385
3389
|
break;
|
|
3386
3390
|
}
|
|
3387
3391
|
}
|
|
3388
3392
|
}, t.pad.ZeroPadding;
|
|
3389
3393
|
});
|
|
3390
|
-
})(
|
|
3394
|
+
})(rr)), rr.exports;
|
|
3391
3395
|
}
|
|
3392
|
-
var
|
|
3396
|
+
var er = { exports: {} }, nx = er.exports, fe;
|
|
3393
3397
|
function ax() {
|
|
3394
|
-
return fe || (fe = 1, (function(r,
|
|
3398
|
+
return fe || (fe = 1, (function(r, p) {
|
|
3395
3399
|
(function(t, e, u) {
|
|
3396
3400
|
r.exports = e(M(), X());
|
|
3397
3401
|
})(nx, function(t) {
|
|
@@ -3402,16 +3406,16 @@ function ax() {
|
|
|
3402
3406
|
}
|
|
3403
3407
|
}, t.pad.NoPadding;
|
|
3404
3408
|
});
|
|
3405
|
-
})(
|
|
3409
|
+
})(er)), er.exports;
|
|
3406
3410
|
}
|
|
3407
|
-
var
|
|
3411
|
+
var tr = { exports: {} }, ox = tr.exports, ue;
|
|
3408
3412
|
function ix() {
|
|
3409
|
-
return ue || (ue = 1, (function(r,
|
|
3413
|
+
return ue || (ue = 1, (function(r, p) {
|
|
3410
3414
|
(function(t, e, u) {
|
|
3411
3415
|
r.exports = e(M(), X());
|
|
3412
3416
|
})(ox, function(t) {
|
|
3413
3417
|
return (function(e) {
|
|
3414
|
-
var u = t,
|
|
3418
|
+
var u = t, h = u.lib, m = h.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
3415
3419
|
x.Hex = {
|
|
3416
3420
|
/**
|
|
3417
3421
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3449,16 +3453,16 @@ function ix() {
|
|
|
3449
3453
|
};
|
|
3450
3454
|
})(), t.format.Hex;
|
|
3451
3455
|
});
|
|
3452
|
-
})(
|
|
3456
|
+
})(tr)), tr.exports;
|
|
3453
3457
|
}
|
|
3454
|
-
var
|
|
3458
|
+
var xr = { exports: {} }, sx = xr.exports, de;
|
|
3455
3459
|
function cx() {
|
|
3456
|
-
return de || (de = 1, (function(r,
|
|
3460
|
+
return de || (de = 1, (function(r, p) {
|
|
3457
3461
|
(function(t, e, u) {
|
|
3458
3462
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3459
3463
|
})(sx, function(t) {
|
|
3460
3464
|
return (function() {
|
|
3461
|
-
var e = t, u = e.lib,
|
|
3465
|
+
var e = t, u = e.lib, h = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], v = [], l = [];
|
|
3462
3466
|
(function() {
|
|
3463
3467
|
for (var o = [], d = 0; d < 256; d++)
|
|
3464
3468
|
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
@@ -3468,10 +3472,10 @@ function cx() {
|
|
|
3468
3472
|
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3469
3473
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3470
3474
|
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3471
|
-
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16,
|
|
3475
|
+
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;
|
|
3472
3476
|
}
|
|
3473
3477
|
})();
|
|
3474
|
-
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES =
|
|
3478
|
+
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES = h.extend({
|
|
3475
3479
|
_doReset: function() {
|
|
3476
3480
|
var o;
|
|
3477
3481
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
@@ -3483,7 +3487,7 @@ function cx() {
|
|
|
3483
3487
|
var o = R[F];
|
|
3484
3488
|
else
|
|
3485
3489
|
var o = R[F - 4];
|
|
3486
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^
|
|
3490
|
+
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]];
|
|
3487
3491
|
}
|
|
3488
3492
|
}
|
|
3489
3493
|
},
|
|
@@ -3492,33 +3496,33 @@ function cx() {
|
|
|
3492
3496
|
},
|
|
3493
3497
|
decryptBlock: function(o, d) {
|
|
3494
3498
|
var b = o[d + 1];
|
|
3495
|
-
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f,
|
|
3499
|
+
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f, v, l, C);
|
|
3496
3500
|
var b = o[d + 1];
|
|
3497
3501
|
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3498
3502
|
},
|
|
3499
3503
|
_doCryptBlock: function(o, d, b, D, y, k, R, F) {
|
|
3500
|
-
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1],
|
|
3501
|
-
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[
|
|
3502
|
-
H = T, $ = N,
|
|
3504
|
+
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1], z = o[d + 2] ^ b[2], O = o[d + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3505
|
+
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[z >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = D[$ >>> 24] ^ y[z >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = D[z >>> 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[z & 255] ^ b[q++];
|
|
3506
|
+
H = T, $ = N, z = j, O = S;
|
|
3503
3507
|
}
|
|
3504
|
-
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[
|
|
3508
|
+
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[z >>> 8 & 255] << 8 | F[O & 255]) ^ b[q++], N = (F[$ >>> 24] << 24 | F[z >>> 16 & 255] << 16 | F[O >>> 8 & 255] << 8 | F[H & 255]) ^ b[q++], j = (F[z >>> 24] << 24 | F[O >>> 16 & 255] << 16 | F[H >>> 8 & 255] << 8 | F[$ & 255]) ^ b[q++], S = (F[O >>> 24] << 24 | F[H >>> 16 & 255] << 16 | F[$ >>> 8 & 255] << 8 | F[z & 255]) ^ b[q++];
|
|
3505
3509
|
o[d] = T, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3506
3510
|
},
|
|
3507
3511
|
keySize: 256 / 32
|
|
3508
3512
|
});
|
|
3509
|
-
e.AES =
|
|
3513
|
+
e.AES = h._createHelper(i);
|
|
3510
3514
|
})(), t.AES;
|
|
3511
3515
|
});
|
|
3512
|
-
})(
|
|
3516
|
+
})(xr)), xr.exports;
|
|
3513
3517
|
}
|
|
3514
|
-
var
|
|
3518
|
+
var nr = { exports: {} }, fx = nr.exports, le;
|
|
3515
3519
|
function ux() {
|
|
3516
|
-
return le || (le = 1, (function(r,
|
|
3520
|
+
return le || (le = 1, (function(r, p) {
|
|
3517
3521
|
(function(t, e, u) {
|
|
3518
3522
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3519
3523
|
})(fx, function(t) {
|
|
3520
3524
|
return (function() {
|
|
3521
|
-
var e = t, u = e.lib,
|
|
3525
|
+
var e = t, u = e.lib, h = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
3522
3526
|
57,
|
|
3523
3527
|
49,
|
|
3524
3528
|
41,
|
|
@@ -4186,14 +4190,14 @@ function ux() {
|
|
|
4186
4190
|
this._doCryptBlock(g, i, this._invSubKeys);
|
|
4187
4191
|
},
|
|
4188
4192
|
_doCryptBlock: function(g, i, o) {
|
|
4189
|
-
this._lBlock = g[i], this._rBlock = g[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535),
|
|
4193
|
+
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);
|
|
4190
4194
|
for (var d = 0; d < 16; d++) {
|
|
4191
4195
|
for (var b = o[d], D = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4192
4196
|
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4193
4197
|
this._lBlock = y, this._rBlock = D ^ k;
|
|
4194
4198
|
}
|
|
4195
4199
|
var F = this._lBlock;
|
|
4196
|
-
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765),
|
|
4200
|
+
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;
|
|
4197
4201
|
},
|
|
4198
4202
|
keySize: 64 / 32,
|
|
4199
4203
|
ivSize: 64 / 32,
|
|
@@ -4203,7 +4207,7 @@ function ux() {
|
|
|
4203
4207
|
var o = (this._lBlock >>> g ^ this._rBlock) & i;
|
|
4204
4208
|
this._rBlock ^= o, this._lBlock ^= o << g;
|
|
4205
4209
|
}
|
|
4206
|
-
function
|
|
4210
|
+
function v(g, i) {
|
|
4207
4211
|
var o = (this._rBlock >>> g ^ this._lBlock) & i;
|
|
4208
4212
|
this._lBlock ^= o, this._rBlock ^= o << g;
|
|
4209
4213
|
}
|
|
@@ -4214,7 +4218,7 @@ function ux() {
|
|
|
4214
4218
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4215
4219
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4216
4220
|
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);
|
|
4217
|
-
this._des1 = s.createEncryptor(
|
|
4221
|
+
this._des1 = s.createEncryptor(h.create(o)), this._des2 = s.createEncryptor(h.create(d)), this._des3 = s.createEncryptor(h.create(b));
|
|
4218
4222
|
},
|
|
4219
4223
|
encryptBlock: function(g, i) {
|
|
4220
4224
|
this._des1.encryptBlock(g, i), this._des2.decryptBlock(g, i), this._des3.encryptBlock(g, i);
|
|
@@ -4229,24 +4233,24 @@ function ux() {
|
|
|
4229
4233
|
e.TripleDES = m._createHelper(l);
|
|
4230
4234
|
})(), t.TripleDES;
|
|
4231
4235
|
});
|
|
4232
|
-
})(
|
|
4236
|
+
})(nr)), nr.exports;
|
|
4233
4237
|
}
|
|
4234
|
-
var
|
|
4238
|
+
var ar = { exports: {} }, dx = ar.exports, he;
|
|
4235
4239
|
function lx() {
|
|
4236
|
-
return he || (he = 1, (function(r,
|
|
4240
|
+
return he || (he = 1, (function(r, p) {
|
|
4237
4241
|
(function(t, e, u) {
|
|
4238
4242
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4239
4243
|
})(dx, function(t) {
|
|
4240
4244
|
return (function() {
|
|
4241
|
-
var e = t, u = e.lib,
|
|
4245
|
+
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = m.RC4 = h.extend({
|
|
4242
4246
|
_doReset: function() {
|
|
4243
4247
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4244
4248
|
s[f] = f;
|
|
4245
|
-
for (var f = 0,
|
|
4249
|
+
for (var f = 0, v = 0; f < 256; f++) {
|
|
4246
4250
|
var l = f % a, g = E[l >>> 2] >>> 24 - l % 4 * 8 & 255;
|
|
4247
|
-
|
|
4251
|
+
v = (v + s[f] + g) % 256;
|
|
4248
4252
|
var i = s[f];
|
|
4249
|
-
s[f] = s[
|
|
4253
|
+
s[f] = s[v], s[v] = i;
|
|
4250
4254
|
}
|
|
4251
4255
|
this._i = this._j = 0;
|
|
4252
4256
|
},
|
|
@@ -4259,12 +4263,12 @@ function lx() {
|
|
|
4259
4263
|
function C() {
|
|
4260
4264
|
for (var n = this._S, E = this._i, a = this._j, s = 0, f = 0; f < 4; f++) {
|
|
4261
4265
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4262
|
-
var
|
|
4263
|
-
n[E] = n[a], n[a] =
|
|
4266
|
+
var v = n[E];
|
|
4267
|
+
n[E] = n[a], n[a] = v, s |= n[(n[E] + n[a]) % 256] << 24 - f * 8;
|
|
4264
4268
|
}
|
|
4265
4269
|
return this._i = E, this._j = a, s;
|
|
4266
4270
|
}
|
|
4267
|
-
e.RC4 =
|
|
4271
|
+
e.RC4 = h._createHelper(B);
|
|
4268
4272
|
var x = m.RC4Drop = B.extend({
|
|
4269
4273
|
/**
|
|
4270
4274
|
* Configuration options.
|
|
@@ -4280,23 +4284,23 @@ function lx() {
|
|
|
4280
4284
|
C.call(this);
|
|
4281
4285
|
}
|
|
4282
4286
|
});
|
|
4283
|
-
e.RC4Drop =
|
|
4287
|
+
e.RC4Drop = h._createHelper(x);
|
|
4284
4288
|
})(), t.RC4;
|
|
4285
4289
|
});
|
|
4286
|
-
})(
|
|
4290
|
+
})(ar)), ar.exports;
|
|
4287
4291
|
}
|
|
4288
|
-
var
|
|
4292
|
+
var or = { exports: {} }, hx = or.exports, ve;
|
|
4289
4293
|
function vx() {
|
|
4290
|
-
return ve || (ve = 1, (function(r,
|
|
4294
|
+
return ve || (ve = 1, (function(r, p) {
|
|
4291
4295
|
(function(t, e, u) {
|
|
4292
4296
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4293
4297
|
})(hx, function(t) {
|
|
4294
4298
|
return (function() {
|
|
4295
|
-
var e = t, u = e.lib,
|
|
4299
|
+
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = h.extend({
|
|
4296
4300
|
_doReset: function() {
|
|
4297
4301
|
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4298
4302
|
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
4299
|
-
var
|
|
4303
|
+
var v = this._X = [
|
|
4300
4304
|
a[0],
|
|
4301
4305
|
a[3] << 16 | a[2] >>> 16,
|
|
4302
4306
|
a[1],
|
|
@@ -4319,7 +4323,7 @@ function vx() {
|
|
|
4319
4323
|
for (var f = 0; f < 4; f++)
|
|
4320
4324
|
E.call(this);
|
|
4321
4325
|
for (var f = 0; f < 8; f++)
|
|
4322
|
-
l[f] ^=
|
|
4326
|
+
l[f] ^= v[f + 4 & 7];
|
|
4323
4327
|
if (s) {
|
|
4324
4328
|
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;
|
|
4325
4329
|
l[0] ^= d, l[1] ^= D, l[2] ^= b, l[3] ^= y, l[4] ^= d, l[5] ^= D, l[6] ^= b, l[7] ^= y;
|
|
@@ -4330,8 +4334,8 @@ function vx() {
|
|
|
4330
4334
|
_doProcessBlock: function(a, s) {
|
|
4331
4335
|
var f = this._X;
|
|
4332
4336
|
E.call(this), B[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, B[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, B[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, B[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
4333
|
-
for (var
|
|
4334
|
-
B[
|
|
4337
|
+
for (var v = 0; v < 4; v++)
|
|
4338
|
+
B[v] = (B[v] << 8 | B[v] >>> 24) & 16711935 | (B[v] << 24 | B[v] >>> 8) & 4278255360, a[s + v] ^= B[v];
|
|
4335
4339
|
},
|
|
4336
4340
|
blockSize: 128 / 32,
|
|
4337
4341
|
ivSize: 64 / 32
|
|
@@ -4341,24 +4345,24 @@ function vx() {
|
|
|
4341
4345
|
C[f] = s[f];
|
|
4342
4346
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4343
4347
|
for (var f = 0; f < 8; f++) {
|
|
4344
|
-
var
|
|
4348
|
+
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);
|
|
4345
4349
|
x[f] = i ^ o;
|
|
4346
4350
|
}
|
|
4347
4351
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4348
4352
|
}
|
|
4349
|
-
e.Rabbit =
|
|
4353
|
+
e.Rabbit = h._createHelper(n);
|
|
4350
4354
|
})(), t.Rabbit;
|
|
4351
4355
|
});
|
|
4352
|
-
})(
|
|
4356
|
+
})(or)), or.exports;
|
|
4353
4357
|
}
|
|
4354
|
-
var
|
|
4358
|
+
var ir = { exports: {} }, px = ir.exports, pe;
|
|
4355
4359
|
function Bx() {
|
|
4356
|
-
return pe || (pe = 1, (function(r,
|
|
4360
|
+
return pe || (pe = 1, (function(r, p) {
|
|
4357
4361
|
(function(t, e, u) {
|
|
4358
4362
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4359
4363
|
})(px, function(t) {
|
|
4360
4364
|
return (function() {
|
|
4361
|
-
var e = t, u = e.lib,
|
|
4365
|
+
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = h.extend({
|
|
4362
4366
|
_doReset: function() {
|
|
4363
4367
|
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4364
4368
|
a[0],
|
|
@@ -4369,7 +4373,7 @@ function Bx() {
|
|
|
4369
4373
|
a[1] << 16 | a[0] >>> 16,
|
|
4370
4374
|
a[3],
|
|
4371
4375
|
a[2] << 16 | a[1] >>> 16
|
|
4372
|
-
],
|
|
4376
|
+
], v = this._C = [
|
|
4373
4377
|
a[2] << 16 | a[2] >>> 16,
|
|
4374
4378
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4375
4379
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4383,10 +4387,10 @@ function Bx() {
|
|
|
4383
4387
|
for (var l = 0; l < 4; l++)
|
|
4384
4388
|
E.call(this);
|
|
4385
4389
|
for (var l = 0; l < 8; l++)
|
|
4386
|
-
|
|
4390
|
+
v[l] ^= f[l + 4 & 7];
|
|
4387
4391
|
if (s) {
|
|
4388
4392
|
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;
|
|
4389
|
-
|
|
4393
|
+
v[0] ^= d, v[1] ^= D, v[2] ^= b, v[3] ^= y, v[4] ^= d, v[5] ^= D, v[6] ^= b, v[7] ^= y;
|
|
4390
4394
|
for (var l = 0; l < 4; l++)
|
|
4391
4395
|
E.call(this);
|
|
4392
4396
|
}
|
|
@@ -4394,8 +4398,8 @@ function Bx() {
|
|
|
4394
4398
|
_doProcessBlock: function(a, s) {
|
|
4395
4399
|
var f = this._X;
|
|
4396
4400
|
E.call(this), B[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, B[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, B[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, B[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
4397
|
-
for (var
|
|
4398
|
-
B[
|
|
4401
|
+
for (var v = 0; v < 4; v++)
|
|
4402
|
+
B[v] = (B[v] << 8 | B[v] >>> 24) & 16711935 | (B[v] << 24 | B[v] >>> 8) & 4278255360, a[s + v] ^= B[v];
|
|
4399
4403
|
},
|
|
4400
4404
|
blockSize: 128 / 32,
|
|
4401
4405
|
ivSize: 64 / 32
|
|
@@ -4405,24 +4409,24 @@ function Bx() {
|
|
|
4405
4409
|
C[f] = s[f];
|
|
4406
4410
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4407
4411
|
for (var f = 0; f < 8; f++) {
|
|
4408
|
-
var
|
|
4412
|
+
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);
|
|
4409
4413
|
x[f] = i ^ o;
|
|
4410
4414
|
}
|
|
4411
4415
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4412
4416
|
}
|
|
4413
|
-
e.RabbitLegacy =
|
|
4417
|
+
e.RabbitLegacy = h._createHelper(n);
|
|
4414
4418
|
})(), t.RabbitLegacy;
|
|
4415
4419
|
});
|
|
4416
|
-
})(
|
|
4420
|
+
})(ir)), ir.exports;
|
|
4417
4421
|
}
|
|
4418
|
-
var
|
|
4422
|
+
var sr = { exports: {} }, Cx = sr.exports, Be;
|
|
4419
4423
|
function Ex() {
|
|
4420
|
-
return Be || (Be = 1, (function(r,
|
|
4424
|
+
return Be || (Be = 1, (function(r, p) {
|
|
4421
4425
|
(function(t, e, u) {
|
|
4422
4426
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4423
4427
|
})(Cx, function(t) {
|
|
4424
4428
|
return (function() {
|
|
4425
|
-
var e = t, u = e.lib,
|
|
4429
|
+
var e = t, u = e.lib, h = u.BlockCipher, m = e.algo;
|
|
4426
4430
|
const B = 16, C = [
|
|
4427
4431
|
608135816,
|
|
4428
4432
|
2242054355,
|
|
@@ -5513,7 +5517,7 @@ function Ex() {
|
|
|
5513
5517
|
D = a(l, d, b), d = D.left, b = D.right, l.sbox[y][k] = d, l.sbox[y][k + 1] = b;
|
|
5514
5518
|
return !0;
|
|
5515
5519
|
}
|
|
5516
|
-
var
|
|
5520
|
+
var v = m.Blowfish = h.extend({
|
|
5517
5521
|
_doReset: function() {
|
|
5518
5522
|
if (this._keyPriorReset !== this._key) {
|
|
5519
5523
|
var l = this._keyPriorReset = this._key, g = l.words, i = l.sigBytes / 4;
|
|
@@ -5532,20 +5536,20 @@ function Ex() {
|
|
|
5532
5536
|
keySize: 128 / 32,
|
|
5533
5537
|
ivSize: 64 / 32
|
|
5534
5538
|
});
|
|
5535
|
-
e.Blowfish =
|
|
5539
|
+
e.Blowfish = h._createHelper(v);
|
|
5536
5540
|
})(), t.Blowfish;
|
|
5537
5541
|
});
|
|
5538
|
-
})(
|
|
5542
|
+
})(sr)), sr.exports;
|
|
5539
5543
|
}
|
|
5540
|
-
var Ax =
|
|
5544
|
+
var Ax = y0.exports, Ce;
|
|
5541
5545
|
function Fx() {
|
|
5542
|
-
return Ce || (Ce = 1, (function(r,
|
|
5546
|
+
return Ce || (Ce = 1, (function(r, p) {
|
|
5543
5547
|
(function(t, e, u) {
|
|
5544
|
-
r.exports = e(M(),
|
|
5548
|
+
r.exports = e(M(), ur(), Bt(), Et(), i0(), Dt(), s0(), ye(), Er(), yt(), we(), St(), $t(), Pt(), Ar(), Wt(), a0(), X(), Tt(), Nt(), jt(), Kt(), Yt(), Qt(), Jt(), ex(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex());
|
|
5545
5549
|
})(Ax, function(t) {
|
|
5546
5550
|
return t;
|
|
5547
5551
|
});
|
|
5548
|
-
})(
|
|
5552
|
+
})(y0)), y0.exports;
|
|
5549
5553
|
}
|
|
5550
5554
|
Fx();
|
|
5551
5555
|
let ke = null, Se = null, He = null, $e = null;
|
|
@@ -5562,11 +5566,11 @@ function gx() {
|
|
|
5562
5566
|
};
|
|
5563
5567
|
}
|
|
5564
5568
|
function bx(r) {
|
|
5565
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5569
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.148`;
|
|
5566
5570
|
}
|
|
5567
|
-
function mx(r,
|
|
5571
|
+
function mx(r, p) {
|
|
5568
5572
|
const t = bx(r);
|
|
5569
|
-
return new Worker(t, { type: "module", ...
|
|
5573
|
+
return new Worker(t, { type: "module", ...p });
|
|
5570
5574
|
}
|
|
5571
5575
|
const Fr = () => {
|
|
5572
5576
|
try {
|
|
@@ -5574,31 +5578,31 @@ const Fr = () => {
|
|
|
5574
5578
|
} catch {
|
|
5575
5579
|
}
|
|
5576
5580
|
return !1;
|
|
5577
|
-
},
|
|
5581
|
+
}, m0 = (...r) => {
|
|
5578
5582
|
Fr();
|
|
5579
5583
|
}, Ee = (...r) => {
|
|
5580
5584
|
Fr();
|
|
5581
|
-
}, Ae = /* @__PURE__ */ new Map(),
|
|
5585
|
+
}, Ae = /* @__PURE__ */ new Map(), pr = /* @__PURE__ */ new Map();
|
|
5582
5586
|
let _x = 0;
|
|
5583
5587
|
function yx(r) {
|
|
5584
|
-
const
|
|
5585
|
-
if (
|
|
5588
|
+
const p = Ae.get(r);
|
|
5589
|
+
if (p) return p;
|
|
5586
5590
|
const t = mx("./deform.worker.ts");
|
|
5587
5591
|
try {
|
|
5588
5592
|
t.postMessage({ type: "SET_DEBUG", debugRender: Fr() });
|
|
5589
5593
|
} catch {
|
|
5590
5594
|
}
|
|
5591
5595
|
t.onmessage = (u) => {
|
|
5592
|
-
const { id:
|
|
5593
|
-
|
|
5596
|
+
const { id: h, imageBitmap: m, error: B, duration: C } = u.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5597
|
+
m0(`[renderService] deform worker 响应 id=${h}${x}`, {
|
|
5594
5598
|
hasImageBitmap: !!m,
|
|
5595
5599
|
width: m?.width,
|
|
5596
5600
|
height: m?.height,
|
|
5597
5601
|
error: B
|
|
5598
5602
|
});
|
|
5599
|
-
const n =
|
|
5603
|
+
const n = pr.get(h);
|
|
5600
5604
|
if (n) {
|
|
5601
|
-
if (
|
|
5605
|
+
if (pr.delete(h), B) {
|
|
5602
5606
|
n.reject(new Error(B));
|
|
5603
5607
|
return;
|
|
5604
5608
|
}
|
|
@@ -5608,12 +5612,12 @@ function yx(r) {
|
|
|
5608
5612
|
};
|
|
5609
5613
|
const e = () => {
|
|
5610
5614
|
const u = gx();
|
|
5611
|
-
return
|
|
5615
|
+
return m0("🔍 [workerManager] 检查 License Token:", {
|
|
5612
5616
|
hasToken: !!u.token,
|
|
5613
5617
|
tokenPreview: u.token ? u.token.substring(0, 20) + "..." : "undefined",
|
|
5614
5618
|
faceId: r,
|
|
5615
5619
|
source: "licenseStore模块"
|
|
5616
|
-
}), u.token ? (
|
|
5620
|
+
}), u.token ? (m0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5617
5621
|
type: "SET_LICENSE",
|
|
5618
5622
|
licenseToken: u.token,
|
|
5619
5623
|
licenseApiUrl: u.apiUrl,
|
|
@@ -5621,7 +5625,7 @@ function yx(r) {
|
|
|
5621
5625
|
domain: u.domain
|
|
5622
5626
|
}), !0) : !1;
|
|
5623
5627
|
};
|
|
5624
|
-
return e() || (
|
|
5628
|
+
return e() || (m0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5625
5629
|
e() || Ee("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5626
5630
|
}, 200), setTimeout(() => {
|
|
5627
5631
|
e() || Ee("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
@@ -5633,10 +5637,10 @@ function wx(r) {
|
|
|
5633
5637
|
type: r.type,
|
|
5634
5638
|
blendMode: r.blendMode,
|
|
5635
5639
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5636
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5637
|
-
x:
|
|
5638
|
-
y:
|
|
5639
|
-
type:
|
|
5640
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((p) => ({
|
|
5641
|
+
x: p.x,
|
|
5642
|
+
y: p.y,
|
|
5643
|
+
type: p.type
|
|
5640
5644
|
})) : [],
|
|
5641
5645
|
bounds: r.bounds ? {
|
|
5642
5646
|
width: r.bounds.width,
|
|
@@ -5659,30 +5663,30 @@ function wx(r) {
|
|
|
5659
5663
|
layerOrder: r.layerOrder,
|
|
5660
5664
|
imagePath: r.imagePath,
|
|
5661
5665
|
vectorMask: r.vectorMask ? {
|
|
5662
|
-
paths: r.vectorMask.paths?.map((
|
|
5663
|
-
open:
|
|
5664
|
-
knots:
|
|
5666
|
+
paths: r.vectorMask.paths?.map((p) => ({
|
|
5667
|
+
open: p.open,
|
|
5668
|
+
knots: p.knots?.map((t) => ({
|
|
5665
5669
|
linked: t.linked,
|
|
5666
5670
|
points: [...t.points]
|
|
5667
5671
|
})),
|
|
5668
|
-
fillRule:
|
|
5669
|
-
operation:
|
|
5672
|
+
fillRule: p.fillRule,
|
|
5673
|
+
operation: p.operation
|
|
5670
5674
|
})),
|
|
5671
|
-
points: r.vectorMask.points?.map((
|
|
5672
|
-
x:
|
|
5673
|
-
y:
|
|
5674
|
-
type:
|
|
5675
|
+
points: r.vectorMask.points?.map((p) => ({
|
|
5676
|
+
x: p.x,
|
|
5677
|
+
y: p.y,
|
|
5678
|
+
type: p.type
|
|
5675
5679
|
})),
|
|
5676
5680
|
invert: r.vectorMask.invert,
|
|
5677
5681
|
notLink: r.vectorMask.notLink,
|
|
5678
5682
|
disable: r.vectorMask.disable,
|
|
5679
5683
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5680
5684
|
} : void 0,
|
|
5681
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5682
|
-
type:
|
|
5683
|
-
enabled:
|
|
5684
|
-
filter:
|
|
5685
|
-
puppetShapeList:
|
|
5685
|
+
filterList: r.filterList ? r.filterList.map((p) => ({
|
|
5686
|
+
type: p.type,
|
|
5687
|
+
enabled: p.enabled,
|
|
5688
|
+
filter: p.filter ? {
|
|
5689
|
+
puppetShapeList: p.filter.puppetShapeList?.map((t) => ({
|
|
5686
5690
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5687
5691
|
x: e.x,
|
|
5688
5692
|
y: e.y
|
|
@@ -5699,33 +5703,33 @@ function wx(r) {
|
|
|
5699
5703
|
clipping: r.clipping
|
|
5700
5704
|
};
|
|
5701
5705
|
}
|
|
5702
|
-
function kx(r,
|
|
5703
|
-
const u = ++_x,
|
|
5706
|
+
function kx(r, p, t, e) {
|
|
5707
|
+
const u = ++_x, h = yx(t);
|
|
5704
5708
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5705
|
-
|
|
5709
|
+
pr.set(u, {
|
|
5706
5710
|
resolve: (x) => {
|
|
5707
5711
|
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5708
5712
|
},
|
|
5709
5713
|
reject: B
|
|
5710
5714
|
});
|
|
5711
|
-
const C = wx(
|
|
5712
|
-
|
|
5715
|
+
const C = wx(p);
|
|
5716
|
+
h.postMessage({ id: u, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5713
5717
|
r
|
|
5714
5718
|
]);
|
|
5715
5719
|
});
|
|
5716
5720
|
}
|
|
5717
|
-
async function Sx(r,
|
|
5718
|
-
const m = await it(r, u,
|
|
5721
|
+
async function Sx(r, p, t = 0, e, u, h) {
|
|
5722
|
+
const m = await it(r, u, h);
|
|
5719
5723
|
if (!m || m.width === 0 || m.height === 0)
|
|
5720
5724
|
throw new Error("图片无效:尺寸为 0");
|
|
5721
|
-
return await kx(m,
|
|
5725
|
+
return await kx(m, p, t, e);
|
|
5722
5726
|
}
|
|
5723
|
-
function d0(r,
|
|
5727
|
+
function d0(r, p) {
|
|
5724
5728
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5725
|
-
return new OffscreenCanvas(r,
|
|
5729
|
+
return new OffscreenCanvas(r, p);
|
|
5726
5730
|
if (typeof document < "u") {
|
|
5727
5731
|
const t = document.createElement("canvas");
|
|
5728
|
-
return t.width = r, t.height =
|
|
5732
|
+
return t.width = r, t.height = p, t;
|
|
5729
5733
|
} else
|
|
5730
5734
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5731
5735
|
}
|
|
@@ -5733,13 +5737,13 @@ function A0(r) {
|
|
|
5733
5737
|
return r.getContext("2d");
|
|
5734
5738
|
}
|
|
5735
5739
|
function Fe(r) {
|
|
5736
|
-
const
|
|
5737
|
-
if (!
|
|
5740
|
+
const p = A0(r);
|
|
5741
|
+
if (!p)
|
|
5738
5742
|
throw new Error("无法创建 canvas context");
|
|
5739
|
-
return
|
|
5743
|
+
return p;
|
|
5740
5744
|
}
|
|
5741
5745
|
async function Hx(r) {
|
|
5742
|
-
const
|
|
5746
|
+
const p = performance.now(), t = () => {
|
|
5743
5747
|
try {
|
|
5744
5748
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5745
5749
|
} catch {
|
|
@@ -5750,7 +5754,7 @@ async function Hx(r) {
|
|
|
5750
5754
|
}, u = (...c) => {
|
|
5751
5755
|
t();
|
|
5752
5756
|
}, {
|
|
5753
|
-
psdJson:
|
|
5757
|
+
psdJson: h,
|
|
5754
5758
|
materialList: m,
|
|
5755
5759
|
fabricScreenshotList: B,
|
|
5756
5760
|
width: C,
|
|
@@ -5758,8 +5762,8 @@ async function Hx(r) {
|
|
|
5758
5762
|
baseUrl: n
|
|
5759
5763
|
} = r, E = r.maxImageSize;
|
|
5760
5764
|
e("[renderByJson] 接收到的数据:", {
|
|
5761
|
-
psdJsonLayerCount:
|
|
5762
|
-
psdJsonLayers:
|
|
5765
|
+
psdJsonLayerCount: h.layerList?.length || 0,
|
|
5766
|
+
psdJsonLayers: h.layerList?.map((c) => ({
|
|
5763
5767
|
name: c.name,
|
|
5764
5768
|
type: c.type,
|
|
5765
5769
|
id: c.id,
|
|
@@ -5797,10 +5801,10 @@ async function Hx(r) {
|
|
|
5797
5801
|
url: c.url
|
|
5798
5802
|
}), f.set(c.layerName, c.url));
|
|
5799
5803
|
}
|
|
5800
|
-
const
|
|
5804
|
+
const v = /* @__PURE__ */ new Map();
|
|
5801
5805
|
for (const c of B)
|
|
5802
|
-
|
|
5803
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(
|
|
5806
|
+
v.set(c.id, c.url);
|
|
5807
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(v.entries())), e("[renderByJson] psdJson.layerList 结构:", h.layerList?.map((c) => ({
|
|
5804
5808
|
name: c.name,
|
|
5805
5809
|
type: c.type,
|
|
5806
5810
|
id: c.id,
|
|
@@ -5811,28 +5815,28 @@ async function Hx(r) {
|
|
|
5811
5815
|
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5812
5816
|
if (c.type === "Layer") {
|
|
5813
5817
|
if (c.imagePath) {
|
|
5814
|
-
const
|
|
5818
|
+
const I = m.find((P) => {
|
|
5815
5819
|
const L = P.sourceName || P.layerName;
|
|
5816
5820
|
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5817
5821
|
});
|
|
5818
|
-
|
|
5819
|
-
url:
|
|
5822
|
+
I && (s[c.imagePath] = {
|
|
5823
|
+
url: I.url
|
|
5820
5824
|
});
|
|
5821
5825
|
}
|
|
5822
5826
|
if (c.name) {
|
|
5823
5827
|
if (_) {
|
|
5824
|
-
const
|
|
5825
|
-
const
|
|
5826
|
-
return
|
|
5828
|
+
const I = `${_}-${c.name}`, P = m.find((L) => {
|
|
5829
|
+
const W = L.sourceName || L.layerName;
|
|
5830
|
+
return W ? (W.split("/").pop() || W).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5827
5831
|
});
|
|
5828
|
-
P && (s[
|
|
5832
|
+
P && (s[I] = {
|
|
5829
5833
|
url: P.url
|
|
5830
5834
|
});
|
|
5831
5835
|
}
|
|
5832
5836
|
if (c.imagePath && c.name) {
|
|
5833
|
-
const
|
|
5834
|
-
const
|
|
5835
|
-
return
|
|
5837
|
+
const I = c.imagePath.split("/").pop() || c.imagePath, P = m.find((L) => {
|
|
5838
|
+
const W = L.sourceName || L.layerName;
|
|
5839
|
+
return W ? (W.split("/").pop() || W) === I : !1;
|
|
5836
5840
|
});
|
|
5837
5841
|
P && (s[c.imagePath] = {
|
|
5838
5842
|
url: P.url
|
|
@@ -5841,37 +5845,37 @@ async function Hx(r) {
|
|
|
5841
5845
|
}
|
|
5842
5846
|
}
|
|
5843
5847
|
if (c.children)
|
|
5844
|
-
for (const
|
|
5845
|
-
|
|
5848
|
+
for (const I of c.children)
|
|
5849
|
+
I && l(I, _);
|
|
5846
5850
|
}
|
|
5847
5851
|
function g(c, A) {
|
|
5848
5852
|
const _ = c.id ?? A;
|
|
5849
5853
|
if (c.type === "Group" && _)
|
|
5850
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${
|
|
5851
|
-
const
|
|
5852
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${
|
|
5854
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${v.has(_)}`), v.has(_)) {
|
|
5855
|
+
const I = v.get(_);
|
|
5856
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${I.substring(0, 50)}...`), c.children) {
|
|
5853
5857
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5854
5858
|
for (const P of c.children)
|
|
5855
5859
|
if (P && P.isSmartObject === !0) {
|
|
5856
5860
|
const L = P?.name || "";
|
|
5857
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5861
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = I, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${I.substring(0, 50)}...`)) : u("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5858
5862
|
}
|
|
5859
5863
|
} else
|
|
5860
5864
|
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5861
5865
|
} else
|
|
5862
5866
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5863
5867
|
if (c.children)
|
|
5864
|
-
for (const
|
|
5865
|
-
|
|
5868
|
+
for (const I of c.children)
|
|
5869
|
+
I && g(I, _);
|
|
5866
5870
|
}
|
|
5867
|
-
if (
|
|
5868
|
-
for (const c of
|
|
5871
|
+
if (h.layerList)
|
|
5872
|
+
for (const c of h.layerList)
|
|
5869
5873
|
c && l(c);
|
|
5870
|
-
if (
|
|
5871
|
-
for (const c of
|
|
5874
|
+
if (h.layerList)
|
|
5875
|
+
for (const c of h.layerList)
|
|
5872
5876
|
c && g(c);
|
|
5873
5877
|
const o = Ye([{
|
|
5874
|
-
psdJson:
|
|
5878
|
+
psdJson: h,
|
|
5875
5879
|
layerExtrasByName: s
|
|
5876
5880
|
}], {
|
|
5877
5881
|
parts: [],
|
|
@@ -5889,14 +5893,14 @@ async function Hx(r) {
|
|
|
5889
5893
|
const A = c.url.split("/").pop() || c.url;
|
|
5890
5894
|
if (s[A])
|
|
5891
5895
|
return s[A];
|
|
5892
|
-
const _ = m.find((
|
|
5893
|
-
const P =
|
|
5896
|
+
const _ = m.find((I) => {
|
|
5897
|
+
const P = I.sourceName || I.layerName;
|
|
5894
5898
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5895
5899
|
});
|
|
5896
5900
|
if (_) {
|
|
5897
|
-
const
|
|
5898
|
-
if (
|
|
5899
|
-
return s[
|
|
5901
|
+
const I = _.sourceName || _.layerName;
|
|
5902
|
+
if (I)
|
|
5903
|
+
return s[I] || { url: _.url };
|
|
5900
5904
|
}
|
|
5901
5905
|
}
|
|
5902
5906
|
};
|
|
@@ -5907,7 +5911,7 @@ async function Hx(r) {
|
|
|
5907
5911
|
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5908
5912
|
continue;
|
|
5909
5913
|
}
|
|
5910
|
-
const
|
|
5914
|
+
const I = _.url, P = a(I);
|
|
5911
5915
|
if (!P) {
|
|
5912
5916
|
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5913
5917
|
continue;
|
|
@@ -5921,8 +5925,8 @@ async function Hx(r) {
|
|
|
5921
5925
|
} else if (A.type === F0.Group) {
|
|
5922
5926
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5923
5927
|
continue;
|
|
5924
|
-
for (let
|
|
5925
|
-
const P = A.smartObjects[
|
|
5928
|
+
for (let I = 0; I < A.smartObjects.length; I++) {
|
|
5929
|
+
const P = A.smartObjects[I];
|
|
5926
5930
|
if (!P || !P.name)
|
|
5927
5931
|
continue;
|
|
5928
5932
|
let L = s[P.name] ?? _;
|
|
@@ -5938,25 +5942,25 @@ async function Hx(r) {
|
|
|
5938
5942
|
}
|
|
5939
5943
|
if (!L || !L.designImage && !L.url)
|
|
5940
5944
|
continue;
|
|
5941
|
-
let
|
|
5942
|
-
if (!
|
|
5945
|
+
let W = L.designImage ?? L.url;
|
|
5946
|
+
if (!W)
|
|
5943
5947
|
continue;
|
|
5944
|
-
if (typeof
|
|
5945
|
-
/^(https?:)?\/\//i.test(
|
|
5946
|
-
const G = a(
|
|
5948
|
+
if (typeof W == "string") {
|
|
5949
|
+
/^(https?:)?\/\//i.test(W) || W.startsWith("data:") || W.startsWith("blob:") || (W = f.get(W) ?? W);
|
|
5950
|
+
const G = a(W);
|
|
5947
5951
|
if (!G)
|
|
5948
5952
|
continue;
|
|
5949
|
-
|
|
5953
|
+
W = G;
|
|
5950
5954
|
}
|
|
5951
|
-
const Z = (A.partId ?? A.id) * 100 +
|
|
5955
|
+
const Z = (A.partId ?? A.id) * 100 + I, Q = Qe(Ze(P)), o0 = { width: b, height: D };
|
|
5952
5956
|
R.push({
|
|
5953
|
-
index: c +
|
|
5957
|
+
index: c + I * 0.01,
|
|
5954
5958
|
type: "group",
|
|
5955
5959
|
partData: A,
|
|
5956
5960
|
smartObject: P,
|
|
5957
5961
|
maskData: Q,
|
|
5958
5962
|
promise: Sx(
|
|
5959
|
-
|
|
5963
|
+
W,
|
|
5960
5964
|
P,
|
|
5961
5965
|
Z,
|
|
5962
5966
|
o0,
|
|
@@ -5971,75 +5975,75 @@ async function Hx(r) {
|
|
|
5971
5975
|
task: c,
|
|
5972
5976
|
imageBitmap: w[A]
|
|
5973
5977
|
})).sort((c, A) => {
|
|
5974
|
-
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index,
|
|
5975
|
-
return _ -
|
|
5978
|
+
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, I = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
5979
|
+
return _ - I;
|
|
5976
5980
|
});
|
|
5977
|
-
let $ = d0(b, D),
|
|
5981
|
+
let $ = d0(b, D), z = A0($), O = !1, q = "normal";
|
|
5978
5982
|
for (let c = 0; c < H.length; c++) {
|
|
5979
5983
|
const { task: A, imageBitmap: _ } = H[c];
|
|
5980
5984
|
if (!_) {
|
|
5981
5985
|
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5982
5986
|
continue;
|
|
5983
5987
|
}
|
|
5984
|
-
const { partData:
|
|
5988
|
+
const { partData: I } = A, P = I.bounds;
|
|
5985
5989
|
let L;
|
|
5986
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
5987
|
-
let
|
|
5988
|
-
A.type === "group" && A.smartObject ?
|
|
5990
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? I.opacity : L = I.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
5991
|
+
let W;
|
|
5992
|
+
A.type === "group" && A.smartObject ? W = A.smartObject.clipping ?? I.clipping === !0 : W = I.clipping === !0;
|
|
5989
5993
|
const Z = H[c + 1];
|
|
5990
5994
|
let Q = !1;
|
|
5991
5995
|
if (Z) {
|
|
5992
5996
|
const K = Z.task.partData;
|
|
5993
5997
|
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
5994
5998
|
}
|
|
5995
|
-
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
5999
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : I?.name || "未命名图层";
|
|
5996
6000
|
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
5997
6001
|
type: A.type,
|
|
5998
6002
|
bitmapSize: { width: _.width, height: _.height },
|
|
5999
6003
|
bounds: P,
|
|
6000
6004
|
hasMask: !!A.maskData,
|
|
6001
|
-
blendMode:
|
|
6005
|
+
blendMode: I.blendMode,
|
|
6002
6006
|
opacity: L,
|
|
6003
|
-
clipping:
|
|
6004
|
-
}), !
|
|
6005
|
-
if (O = !0, q =
|
|
6006
|
-
if (
|
|
6007
|
+
clipping: W
|
|
6008
|
+
}), !W && Q) {
|
|
6009
|
+
if (O = !0, q = I.blendMode || "normal", z) {
|
|
6010
|
+
if (z.clearRect(0, 0, b, D), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6007
6011
|
if (A.maskData) {
|
|
6008
6012
|
const K = d0(b, D), G = A0(K);
|
|
6009
|
-
G && (G.drawImage(_, 0, 0),
|
|
6013
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6010
6014
|
} else
|
|
6011
|
-
|
|
6012
|
-
else A.type === "layer" && (P ?
|
|
6015
|
+
z.drawImage(_, 0, 0);
|
|
6016
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6013
6017
|
_,
|
|
6014
6018
|
P.left,
|
|
6015
6019
|
P.top,
|
|
6016
6020
|
P.width,
|
|
6017
6021
|
P.height
|
|
6018
|
-
) :
|
|
6019
|
-
|
|
6022
|
+
) : z.drawImage(_, 0, 0));
|
|
6023
|
+
z.globalAlpha = 1;
|
|
6020
6024
|
}
|
|
6021
|
-
} else if (
|
|
6022
|
-
if (
|
|
6023
|
-
if (
|
|
6025
|
+
} else if (W) {
|
|
6026
|
+
if (z) {
|
|
6027
|
+
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6024
6028
|
if (A.maskData) {
|
|
6025
6029
|
const K = d0(b, D), G = A0(K);
|
|
6026
|
-
G && (G.drawImage(_, 0, 0),
|
|
6030
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6027
6031
|
} else
|
|
6028
|
-
|
|
6029
|
-
else A.type === "layer" && (P ?
|
|
6032
|
+
z.drawImage(_, 0, 0);
|
|
6033
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6030
6034
|
_,
|
|
6031
6035
|
P.left,
|
|
6032
6036
|
P.top,
|
|
6033
6037
|
P.width,
|
|
6034
6038
|
P.height
|
|
6035
|
-
) :
|
|
6036
|
-
|
|
6039
|
+
) : z.drawImage(_, 0, 0));
|
|
6040
|
+
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6037
6041
|
}
|
|
6038
6042
|
} else {
|
|
6039
|
-
if (k.globalCompositeOperation =
|
|
6043
|
+
if (k.globalCompositeOperation = Ir(I.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6040
6044
|
if (A.maskData) {
|
|
6041
6045
|
const K = d0(b, D), G = A0(K);
|
|
6042
|
-
G && (G.drawImage(_, 0, 0),
|
|
6046
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6043
6047
|
} else
|
|
6044
6048
|
k.drawImage(_, 0, 0);
|
|
6045
6049
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6051,9 +6055,9 @@ async function Hx(r) {
|
|
|
6051
6055
|
) : k.drawImage(_, 0, 0));
|
|
6052
6056
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6053
6057
|
}
|
|
6054
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6058
|
+
O && !Q && (k.globalCompositeOperation = Ir(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6055
6059
|
}
|
|
6056
|
-
$ = null,
|
|
6060
|
+
$ = null, z = null;
|
|
6057
6061
|
let U = y, T = b, N = D;
|
|
6058
6062
|
if (C !== void 0 || x !== void 0) {
|
|
6059
6063
|
if (C !== void 0 && x !== void 0)
|
|
@@ -6069,7 +6073,7 @@ async function Hx(r) {
|
|
|
6069
6073
|
const c = Fe(U);
|
|
6070
6074
|
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}`);
|
|
6071
6075
|
}
|
|
6072
|
-
const S = performance.now() -
|
|
6076
|
+
const S = performance.now() - p;
|
|
6073
6077
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6074
6078
|
canvas: U,
|
|
6075
6079
|
width: T,
|
|
@@ -6081,9 +6085,9 @@ const $x = async (r) => {
|
|
|
6081
6085
|
return t ? createImageBitmap(t) : null;
|
|
6082
6086
|
};
|
|
6083
6087
|
self.onmessage = async (r) => {
|
|
6084
|
-
const
|
|
6085
|
-
if (
|
|
6086
|
-
const e =
|
|
6088
|
+
const p = r.data;
|
|
6089
|
+
if (p && typeof p == "object" && "type" in p && p.type === "SET_LICENSE") {
|
|
6090
|
+
const e = p;
|
|
6087
6091
|
Dx({
|
|
6088
6092
|
token: e.licenseToken,
|
|
6089
6093
|
apiUrl: e.licenseApiUrl,
|
|
@@ -6092,7 +6096,7 @@ self.onmessage = async (r) => {
|
|
|
6092
6096
|
});
|
|
6093
6097
|
return;
|
|
6094
6098
|
}
|
|
6095
|
-
const t =
|
|
6099
|
+
const t = p;
|
|
6096
6100
|
try {
|
|
6097
6101
|
const e = await $x(t.renderData);
|
|
6098
6102
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|