@jieyin/editor-sdk-test 1.1.141 → 1.1.143
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 +7149 -7082
- package/dist/renderWorker.js +684 -682
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var F0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(F0 || {});
|
|
2
2
|
function Ge(r) {
|
|
3
|
-
let
|
|
3
|
+
let v = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = v;
|
|
6
|
+
return v += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ke(r, v) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,16 +23,16 @@ function Xe(r, p) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? v,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let u = r.name || "", h =
|
|
32
|
+
function Xe(r, v, t, e) {
|
|
33
|
+
let u = r.name || "", h = v[u], m = h?.partId ?? (r.type === "Group" ? t.get(u) : void 0);
|
|
34
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 =
|
|
35
|
+
const x = r.children[0].name, n = v[x], E = n?.partId ?? t.get(x);
|
|
36
36
|
(E !== void 0 || n?.id !== void 0) && (u = x, h = n, m = E);
|
|
37
37
|
}
|
|
38
38
|
const B = r.id ?? h?.id ?? e();
|
|
@@ -45,7 +45,7 @@ function Ke(r, p, t, e) {
|
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: F0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => Ke(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
@@ -64,37 +64,37 @@ function Ke(r, p, t, e) {
|
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function Ye(r, v) {
|
|
68
|
+
const t = new Map(v.parts.map((u) => [u.name, u.id])), e = Ge(v.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
70
|
+
parts: v.parts,
|
|
71
71
|
models: r.map((u) => {
|
|
72
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 = [],
|
|
80
|
-
const b = o.layerOrder ?? 0,
|
|
81
|
-
return b -
|
|
77
|
+
for (const p of s)
|
|
78
|
+
if (p.type === "Group" && p.children) {
|
|
79
|
+
const l = [], D = [], i = [...p.children].sort((o, d) => {
|
|
80
|
+
const b = o.layerOrder ?? 0, g = d.layerOrder ?? 0;
|
|
81
|
+
return b - g;
|
|
82
82
|
});
|
|
83
83
|
for (const o of i)
|
|
84
|
-
o.isSmartObject === !0 ? l.push(o) :
|
|
85
|
-
if (
|
|
86
|
-
const o = n(
|
|
84
|
+
o.isSmartObject === !0 ? l.push(o) : D.push(o);
|
|
85
|
+
if (D.length > 0) {
|
|
86
|
+
const o = n(D);
|
|
87
87
|
f.push(...o);
|
|
88
88
|
}
|
|
89
89
|
l.length > 0 && f.push({
|
|
90
|
-
...
|
|
90
|
+
...p,
|
|
91
91
|
children: l
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
|
-
f.push(
|
|
94
|
+
f.push(p);
|
|
95
95
|
return f;
|
|
96
96
|
}, a = n(B).map(
|
|
97
|
-
(s) =>
|
|
97
|
+
(s) => Xe(s, h, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -104,32 +104,32 @@ function Ze(r, p) {
|
|
|
104
104
|
})
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Ze(r) {
|
|
108
108
|
return r ? r.vectorMask && r.vectorMask.paths && Array.isArray(r.vectorMask.paths) ? { type: "bezier", paths: r.vectorMask.paths } : Array.isArray(r.vectorMask) ? { type: "simple", points: r.vectorMask } : null : null;
|
|
109
109
|
}
|
|
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((v) => ({
|
|
114
|
+
open: !!v.open,
|
|
115
|
+
knots: v.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((v) => ({
|
|
123
|
+
x: v.x,
|
|
124
|
+
y: v.y,
|
|
125
|
+
type: v.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function lr(r,
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function lr(r, v) {
|
|
130
|
+
if (v) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), v.type === "bezier" && Array.isArray(v.paths))
|
|
132
|
+
v.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
135
|
const u = e[0];
|
|
@@ -146,8 +146,8 @@ function lr(r, p) {
|
|
|
146
146
|
}
|
|
147
147
|
t.open || r.closePath();
|
|
148
148
|
});
|
|
149
|
-
else if (
|
|
150
|
-
const t =
|
|
149
|
+
else if (v.type === "simple" && Array.isArray(v.points)) {
|
|
150
|
+
const t = v.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(v) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(v);
|
|
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(v, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(v, 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(v) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(v), !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(v) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
257
|
-
return new URL(
|
|
256
|
+
const t = fr.getOrigin();
|
|
257
|
+
return new URL(v, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,61 +262,61 @@ 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(v, t, e) {
|
|
266
|
+
const u = this.parse(v);
|
|
267
|
+
return !u || u.searchParams.has(t) ? v : (u.searchParams.set(t, e), this.formatUrl(v, 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(v, t) {
|
|
273
|
+
const e = this.parse(v);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? v : (e.searchParams.delete(t), this.formatUrl(v, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(v, t) {
|
|
280
|
+
return this.parse(v)?.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(v, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(v), u = v.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(v) {
|
|
293
|
+
return v?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(v) {
|
|
299
|
+
return v?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
(function(r,
|
|
304
|
-
const t =
|
|
302
|
+
const J = g0;
|
|
303
|
+
(function(r, v) {
|
|
304
|
+
const t = g0, e = r();
|
|
305
305
|
for (; ; )
|
|
306
306
|
try {
|
|
307
|
-
if (parseInt(t(
|
|
307
|
+
if (parseInt(t(504)) / 1 + -parseInt(t(500)) / 2 * (parseInt(t(490)) / 3) + -parseInt(t(480)) / 4 + parseInt(t(498)) / 5 + parseInt(t(469)) / 6 + -parseInt(t(497)) / 7 + -parseInt(t(477)) / 8 * (-parseInt(t(473)) / 9) === v) break;
|
|
308
308
|
e.push(e.shift());
|
|
309
309
|
} catch {
|
|
310
310
|
e.push(e.shift());
|
|
311
311
|
}
|
|
312
|
-
})(
|
|
312
|
+
})(cr, 2 * -37093 + 156194 + 71530);
|
|
313
313
|
const E0 = /* @__PURE__ */ (function() {
|
|
314
314
|
let r = !0;
|
|
315
|
-
return function(
|
|
315
|
+
return function(v, t) {
|
|
316
316
|
const e = r ? function() {
|
|
317
|
-
const u =
|
|
317
|
+
const u = g0;
|
|
318
318
|
if (t) {
|
|
319
|
-
const h = t[u(
|
|
319
|
+
const h = t[u(484)](v, arguments);
|
|
320
320
|
return t = null, h;
|
|
321
321
|
}
|
|
322
322
|
} : function() {
|
|
@@ -324,110 +324,112 @@ const E0 = /* @__PURE__ */ (function() {
|
|
|
324
324
|
return r = !1, e;
|
|
325
325
|
};
|
|
326
326
|
})(), Ve = E0(void 0, function() {
|
|
327
|
-
const r =
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
327
|
+
const r = g0, v = function() {
|
|
328
|
+
const h = g0;
|
|
329
|
+
let m;
|
|
330
|
+
try {
|
|
331
|
+
m = Function("return (functio" + h(494) + ("{}.constructor(" + h(506) + 'rn this")( )') + ");")();
|
|
332
|
+
} catch {
|
|
333
|
+
m = window;
|
|
334
|
+
}
|
|
335
|
+
return m;
|
|
336
|
+
}, t = v(), e = t.console = t.console || {}, u = ["log", "warn", "info", "error", r(478) + "tion", "table", r(488)];
|
|
337
|
+
for (let h = -8064 + 18 * 448; h < u.length; h++) {
|
|
338
|
+
const m = E0["const" + r(495) + "r"].prototype.bind(E0), B = u[h], C = e[B] || m;
|
|
339
|
+
m[r(496) + "to__"] = E0.bind(E0), m.toString = C["toStr" + r(486)].bind(C), e[B] = m;
|
|
338
340
|
}
|
|
339
341
|
});
|
|
340
342
|
Ve();
|
|
341
|
-
const Br = "
|
|
343
|
+
const Br = "file_" + J(483), Cr = J(492) + "token" + J(491) + J(499) + "me", Je = 60 * (269 * -17 + -3985 + 9558);
|
|
342
344
|
function vr() {
|
|
343
345
|
return h0.getItem(Br);
|
|
344
346
|
}
|
|
347
|
+
function g0(r, v) {
|
|
348
|
+
return r = r - (-4070 + -2 * -314 + 1 * 3911), cr()[r];
|
|
349
|
+
}
|
|
345
350
|
function rt(r = Je) {
|
|
346
|
-
const
|
|
351
|
+
const v = J;
|
|
347
352
|
if (!vr()) return !0;
|
|
348
|
-
const e = h0[
|
|
353
|
+
const e = h0[v(485) + "em"](Cr);
|
|
349
354
|
if (!e) return !1;
|
|
350
355
|
const u = Number(e);
|
|
351
356
|
return Date.now() + r > u;
|
|
352
357
|
}
|
|
353
|
-
function et(r,
|
|
354
|
-
const t =
|
|
355
|
-
if (h0.setItem(Br, r), typeof
|
|
356
|
-
const e = Date[t(
|
|
357
|
-
h0
|
|
358
|
+
function et(r, v) {
|
|
359
|
+
const t = J;
|
|
360
|
+
if (h0.setItem(Br, r), typeof v == t(487) + "r" && v > 0) {
|
|
361
|
+
const e = Date[t(476)]() + v * 1e3;
|
|
362
|
+
h0[t(479) + "em"](Cr, String(e));
|
|
358
363
|
}
|
|
359
364
|
}
|
|
360
|
-
function
|
|
361
|
-
const r =
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
function sr() {
|
|
365
|
-
const r = ["FileT", "file_", "5645040wxmRhc", "20280khOwEi", "type", "9608flMuPA", "oken", "9SQXmop", "2455MsnApR", "ame", "data", "811432BtnxQE", "okenR", "ing", "const", "6UFzXQe", "11lbPviU", "now", "remov", "statu", "apply", "retur", 'is")(', "9804vLdCAL", "n() ", "wser", "136716vLONUZ", "efres", '"retu', "token", "fetch", "2190230DIpxJN", "des", "getIt", "6258LbXmmU", "ram", "isBro", "4275QFUCnI"];
|
|
366
|
-
return sr = function() {
|
|
365
|
+
function cr() {
|
|
366
|
+
const r = ["isBro", "token", "apply", "getIt", "ing", "numbe", "trace", "pathn", "39ZFVgQJ", "_expi", "file_", "oken", "n() ", "ructo", "__pro", "1025227dbIUQn", "470630UUqfLg", "re_ti", "42542xqwVIm", "inclu", "remov", "code", "147983sckYzK", "/file", '"retu', "1020936AdlqcR", "wser", "hasPa", "FileT", "976293XXekms", "parse", "data", "now", "24AHlqrk", "excep", "setIt", "644696uuWxhN", "des"];
|
|
367
|
+
return cr = function() {
|
|
367
368
|
return r;
|
|
368
|
-
},
|
|
369
|
+
}, cr();
|
|
370
|
+
}
|
|
371
|
+
function tt() {
|
|
372
|
+
const r = J;
|
|
373
|
+
h0.removeItem(Br), h0[r(502) + "eItem"](Cr);
|
|
369
374
|
}
|
|
370
375
|
async function Pr(r) {
|
|
371
|
-
const
|
|
372
|
-
return t?.
|
|
376
|
+
const v = J, t = await r(), e = t?.data?.data;
|
|
377
|
+
return t?.[v(475)]?.[v(503)] === -9 * -613 + -6720 + 1403 && e?.["file_token"] ? (et(e.file_token, e.expires_in), e["file_" + v(483)]) : null;
|
|
373
378
|
}
|
|
374
379
|
let xt = null;
|
|
375
|
-
function
|
|
376
|
-
return
|
|
380
|
+
function zr() {
|
|
381
|
+
return fr.isBrowser() ? xt : null;
|
|
377
382
|
}
|
|
378
|
-
async function
|
|
379
|
-
const r =
|
|
380
|
-
if (!
|
|
381
|
-
const
|
|
382
|
-
if (
|
|
383
|
+
async function ge() {
|
|
384
|
+
const r = J;
|
|
385
|
+
if (!fr["isBro" + r(470)]()) return vr();
|
|
386
|
+
const v = vr();
|
|
387
|
+
if (v && !rt()) return v;
|
|
383
388
|
try {
|
|
384
|
-
const t = await
|
|
385
|
-
if (
|
|
386
|
-
const e = await Pr(t["
|
|
389
|
+
const t = await zr();
|
|
390
|
+
if (v && t?.["fetch" + r(472) + "okenRefresh"]) {
|
|
391
|
+
const e = await Pr(t["fetch" + r(472) + "okenRefresh"]);
|
|
387
392
|
if (e) return e;
|
|
388
393
|
}
|
|
389
394
|
} catch {
|
|
390
395
|
}
|
|
391
396
|
try {
|
|
392
|
-
const t =
|
|
393
|
-
return t?.[
|
|
397
|
+
const t = zr();
|
|
398
|
+
return t?.["fetchFileToken"] ? await Pr(t.fetchFileToken) : null;
|
|
394
399
|
} catch {
|
|
395
400
|
return null;
|
|
396
401
|
}
|
|
397
402
|
}
|
|
398
|
-
function
|
|
399
|
-
|
|
400
|
-
}
|
|
401
|
-
function ge(r) {
|
|
402
|
-
const p = t0;
|
|
403
|
+
function De(r) {
|
|
404
|
+
const v = J;
|
|
403
405
|
if (!r || l0.isDataUrl(r) || l0.isBlobUrl(r)) return !1;
|
|
404
|
-
const t = l0
|
|
405
|
-
return t ? t["
|
|
406
|
+
const t = l0[v(474)](r);
|
|
407
|
+
return t ? t[v(489) + "ame"][v(501) + "des"](v(505) + "s/") && !l0[v(471) + "ram"](r, "fileToken") : r.includes(v(505) + "s/") && !r[v(501) + v(481)]("fileToken=");
|
|
406
408
|
}
|
|
407
|
-
function be(r,
|
|
408
|
-
const t =
|
|
409
|
-
return !
|
|
409
|
+
function be(r, v) {
|
|
410
|
+
const t = J;
|
|
411
|
+
return !v || !De(r) ? r : l0.addParam(r, "fileT" + t(493), v);
|
|
410
412
|
}
|
|
411
413
|
function nt(r) {
|
|
412
|
-
|
|
414
|
+
const v = J;
|
|
415
|
+
return l0.removeParam(r, "fileT" + v(493));
|
|
413
416
|
}
|
|
414
417
|
async function at(r) {
|
|
415
|
-
if (!
|
|
416
|
-
const
|
|
417
|
-
return be(r,
|
|
418
|
+
if (!De(r)) return r;
|
|
419
|
+
const v = await ge();
|
|
420
|
+
return be(r, v);
|
|
418
421
|
}
|
|
419
|
-
async function me(r,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
if (h[t(153) + "s"] !== 9527 + 26 * -351) return h;
|
|
422
|
+
async function me(r, v) {
|
|
423
|
+
if (!fr[J(482) + "wser"]()) return fetch(r, v);
|
|
424
|
+
const e = nt(r), u = await at(e), h = await fetch(u, v);
|
|
425
|
+
if (h.status !== 401) return h;
|
|
424
426
|
tt();
|
|
425
|
-
const m = await
|
|
426
|
-
return fetch(B,
|
|
427
|
+
const m = await ge(), B = be(e, m);
|
|
428
|
+
return fetch(B, v);
|
|
427
429
|
}
|
|
428
|
-
const _e = (r,
|
|
430
|
+
const _e = (r, v) => {
|
|
429
431
|
if (!r) return r;
|
|
430
|
-
const t = (
|
|
432
|
+
const t = (v || "").replace(/\/$/, "");
|
|
431
433
|
if (t && r.startsWith(t))
|
|
432
434
|
return r;
|
|
433
435
|
if (typeof window < "u") {
|
|
@@ -450,19 +452,19 @@ const _e = (r, p) => {
|
|
|
450
452
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
451
453
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
452
454
|
return e ? `/oss${e[2]}` : r;
|
|
453
|
-
}, ot = (r,
|
|
455
|
+
}, ot = (r, v) => {
|
|
454
456
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
455
|
-
return new OffscreenCanvas(r,
|
|
457
|
+
return new OffscreenCanvas(r, v);
|
|
456
458
|
const t = document.createElement("canvas");
|
|
457
|
-
return t.width = r, t.height =
|
|
458
|
-
},
|
|
459
|
-
if (!
|
|
459
|
+
return t.width = r, t.height = v, t;
|
|
460
|
+
}, _0 = async (r, v) => {
|
|
461
|
+
if (!v || v <= 0) return r;
|
|
460
462
|
const t = Math.max(r.width, r.height);
|
|
461
|
-
if (t <=
|
|
462
|
-
const e =
|
|
463
|
+
if (t <= v) return r;
|
|
464
|
+
const e = v / 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
465
|
return B ? (B.drawImage(r, 0, 0, u, h), r.close?.(), await createImageBitmap(m)) : r;
|
|
464
466
|
};
|
|
465
|
-
async function it(r,
|
|
467
|
+
async function it(r, v, t) {
|
|
466
468
|
if (typeof r == "string")
|
|
467
469
|
try {
|
|
468
470
|
const e = _e(r, t), u = await me(e);
|
|
@@ -475,7 +477,7 @@ async function it(r, p, t) {
|
|
|
475
477
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
476
478
|
try {
|
|
477
479
|
const m = await createImageBitmap(h);
|
|
478
|
-
return await
|
|
480
|
+
return await _0(m, v);
|
|
479
481
|
} catch (m) {
|
|
480
482
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
481
483
|
}
|
|
@@ -489,7 +491,7 @@ async function it(r, p, t) {
|
|
|
489
491
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
490
492
|
try {
|
|
491
493
|
const e = await createImageBitmap(r);
|
|
492
|
-
return await
|
|
494
|
+
return await _0(e, v);
|
|
493
495
|
} catch (e) {
|
|
494
496
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
495
497
|
}
|
|
@@ -497,11 +499,11 @@ async function it(r, p, t) {
|
|
|
497
499
|
if (r instanceof ImageBitmap) {
|
|
498
500
|
if (r.width === 0 || r.height === 0)
|
|
499
501
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
500
|
-
return await
|
|
502
|
+
return await _0(r, v);
|
|
501
503
|
}
|
|
502
504
|
throw new Error("不支持的图片类型");
|
|
503
505
|
}
|
|
504
|
-
async function st(r,
|
|
506
|
+
async function st(r, v, t) {
|
|
505
507
|
try {
|
|
506
508
|
const e = _e(r, t), u = await me(e);
|
|
507
509
|
if (!u.ok) {
|
|
@@ -513,7 +515,7 @@ async function st(r, p, t) {
|
|
|
513
515
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
514
516
|
try {
|
|
515
517
|
const m = await createImageBitmap(h);
|
|
516
|
-
return await
|
|
518
|
+
return await _0(m, v);
|
|
517
519
|
} catch (m) {
|
|
518
520
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
519
521
|
}
|
|
@@ -521,9 +523,9 @@ async function st(r, p, t) {
|
|
|
521
523
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
522
524
|
}
|
|
523
525
|
}
|
|
524
|
-
function
|
|
526
|
+
function Wr(r) {
|
|
525
527
|
if (!r) return "source-over";
|
|
526
|
-
const
|
|
528
|
+
const v = r.trim().toLowerCase();
|
|
527
529
|
return {
|
|
528
530
|
normal: "source-over",
|
|
529
531
|
multiply: "multiply",
|
|
@@ -549,22 +551,22 @@ function zr(r) {
|
|
|
549
551
|
"linear dodge": "lighter",
|
|
550
552
|
lighter: "lighter",
|
|
551
553
|
"pass-through": "source-over"
|
|
552
|
-
}[
|
|
554
|
+
}[v] || "source-over";
|
|
553
555
|
}
|
|
554
556
|
var hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
555
557
|
function ct(r) {
|
|
556
558
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
557
|
-
var
|
|
558
|
-
if (typeof
|
|
559
|
+
var v = r.default;
|
|
560
|
+
if (typeof v == "function") {
|
|
559
561
|
var t = function e() {
|
|
560
562
|
var u = !1;
|
|
561
563
|
try {
|
|
562
564
|
u = this instanceof e;
|
|
563
565
|
} catch {
|
|
564
566
|
}
|
|
565
|
-
return u ? Reflect.construct(
|
|
567
|
+
return u ? Reflect.construct(v, arguments, this.constructor) : v.apply(this, arguments);
|
|
566
568
|
};
|
|
567
|
-
t.prototype =
|
|
569
|
+
t.prototype = v.prototype;
|
|
568
570
|
} else t = {};
|
|
569
571
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
570
572
|
var u = Object.getOwnPropertyDescriptor(r, e);
|
|
@@ -576,16 +578,16 @@ function ct(r) {
|
|
|
576
578
|
});
|
|
577
579
|
}), t;
|
|
578
580
|
}
|
|
579
|
-
var
|
|
581
|
+
var y0 = { exports: {} };
|
|
580
582
|
function ft(r) {
|
|
581
583
|
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.');
|
|
582
584
|
}
|
|
583
|
-
var
|
|
585
|
+
var w0 = { exports: {} }, ut = {}, dt = /* @__PURE__ */ Object.freeze({
|
|
584
586
|
__proto__: null,
|
|
585
587
|
default: ut
|
|
586
|
-
}), lt = /* @__PURE__ */ ct(dt), ht =
|
|
588
|
+
}), lt = /* @__PURE__ */ ct(dt), ht = w0.exports, Ir;
|
|
587
589
|
function M() {
|
|
588
|
-
return
|
|
590
|
+
return Ir || (Ir = 1, (function(r, v) {
|
|
589
591
|
(function(t, e) {
|
|
590
592
|
r.exports = e();
|
|
591
593
|
})(ht, function() {
|
|
@@ -746,16 +748,16 @@ function M() {
|
|
|
746
748
|
* wordArray1.concat(wordArray2);
|
|
747
749
|
*/
|
|
748
750
|
concat: function(i) {
|
|
749
|
-
var o = this.words, d = i.words, b = this.sigBytes,
|
|
751
|
+
var o = this.words, d = i.words, b = this.sigBytes, g = i.sigBytes;
|
|
750
752
|
if (this.clamp(), b % 4)
|
|
751
|
-
for (var y = 0; y <
|
|
753
|
+
for (var y = 0; y < g; y++) {
|
|
752
754
|
var k = d[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
753
755
|
o[b + y >>> 2] |= k << 24 - (b + y) % 4 * 8;
|
|
754
756
|
}
|
|
755
757
|
else
|
|
756
|
-
for (var R = 0; R <
|
|
758
|
+
for (var R = 0; R < g; R += 4)
|
|
757
759
|
o[b + R >>> 2] = d[R >>> 2];
|
|
758
|
-
return this.sigBytes +=
|
|
760
|
+
return this.sigBytes += g, this;
|
|
759
761
|
},
|
|
760
762
|
/**
|
|
761
763
|
* Removes insignificant bits.
|
|
@@ -814,8 +816,8 @@ function M() {
|
|
|
814
816
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
815
817
|
*/
|
|
816
818
|
stringify: function(i) {
|
|
817
|
-
for (var o = i.words, d = i.sigBytes, b = [],
|
|
818
|
-
var y = o[
|
|
819
|
+
for (var o = i.words, d = i.sigBytes, b = [], g = 0; g < d; g++) {
|
|
820
|
+
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
819
821
|
b.push((y >>> 4).toString(16)), b.push((y & 15).toString(16));
|
|
820
822
|
}
|
|
821
823
|
return b.join("");
|
|
@@ -853,8 +855,8 @@ function M() {
|
|
|
853
855
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
854
856
|
*/
|
|
855
857
|
stringify: function(i) {
|
|
856
|
-
for (var o = i.words, d = i.sigBytes, b = [],
|
|
857
|
-
var y = o[
|
|
858
|
+
for (var o = i.words, d = i.sigBytes, b = [], g = 0; g < d; g++) {
|
|
859
|
+
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
858
860
|
b.push(String.fromCharCode(y));
|
|
859
861
|
}
|
|
860
862
|
return b.join("");
|
|
@@ -877,7 +879,7 @@ function M() {
|
|
|
877
879
|
d[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
878
880
|
return new E.init(d, o);
|
|
879
881
|
}
|
|
880
|
-
},
|
|
882
|
+
}, p = a.Utf8 = {
|
|
881
883
|
/**
|
|
882
884
|
* Converts a word array to a UTF-8 string.
|
|
883
885
|
*
|
|
@@ -936,7 +938,7 @@ function M() {
|
|
|
936
938
|
* bufferedBlockAlgorithm._append(wordArray);
|
|
937
939
|
*/
|
|
938
940
|
_append: function(i) {
|
|
939
|
-
typeof i == "string" && (i =
|
|
941
|
+
typeof i == "string" && (i = p.parse(i)), this._data.concat(i), this._nDataBytes += i.sigBytes;
|
|
940
942
|
},
|
|
941
943
|
/**
|
|
942
944
|
* Processes available data blocks.
|
|
@@ -953,9 +955,9 @@ function M() {
|
|
|
953
955
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
954
956
|
*/
|
|
955
957
|
_process: function(i) {
|
|
956
|
-
var o, d = this._data, b = d.words,
|
|
958
|
+
var o, d = this._data, b = d.words, g = d.sigBytes, y = this.blockSize, k = y * 4, R = g / k;
|
|
957
959
|
i ? R = e.ceil(R) : R = e.max((R | 0) - this._minBufferSize, 0);
|
|
958
|
-
var F = R * y, w = e.min(F * 4,
|
|
960
|
+
var F = R * y, w = e.min(F * 4, g);
|
|
959
961
|
if (F) {
|
|
960
962
|
for (var H = 0; H < F; H += y)
|
|
961
963
|
this._doProcessBlock(b, H);
|
|
@@ -1073,20 +1075,20 @@ function M() {
|
|
|
1073
1075
|
*/
|
|
1074
1076
|
_createHmacHelper: function(i) {
|
|
1075
1077
|
return function(o, d) {
|
|
1076
|
-
return new
|
|
1078
|
+
return new D.HMAC.init(i, d).finalize(o);
|
|
1077
1079
|
};
|
|
1078
1080
|
}
|
|
1079
1081
|
});
|
|
1080
|
-
var
|
|
1082
|
+
var D = C.algo = {};
|
|
1081
1083
|
return C;
|
|
1082
1084
|
})(Math);
|
|
1083
1085
|
return t;
|
|
1084
1086
|
});
|
|
1085
|
-
})(
|
|
1087
|
+
})(w0)), w0.exports;
|
|
1086
1088
|
}
|
|
1087
|
-
var
|
|
1089
|
+
var k0 = { exports: {} }, vt = k0.exports, Lr;
|
|
1088
1090
|
function ur() {
|
|
1089
|
-
return Lr || (Lr = 1, (function(r,
|
|
1091
|
+
return Lr || (Lr = 1, (function(r, v) {
|
|
1090
1092
|
(function(t, e) {
|
|
1091
1093
|
r.exports = e(M());
|
|
1092
1094
|
})(vt, function(t) {
|
|
@@ -1312,11 +1314,11 @@ function ur() {
|
|
|
1312
1314
|
});
|
|
1313
1315
|
})(), t;
|
|
1314
1316
|
});
|
|
1315
|
-
})(
|
|
1317
|
+
})(k0)), k0.exports;
|
|
1316
1318
|
}
|
|
1317
|
-
var
|
|
1319
|
+
var S0 = { exports: {} }, pt = S0.exports, Or;
|
|
1318
1320
|
function Bt() {
|
|
1319
|
-
return Or || (Or = 1, (function(r,
|
|
1321
|
+
return Or || (Or = 1, (function(r, v) {
|
|
1320
1322
|
(function(t, e) {
|
|
1321
1323
|
r.exports = e(M());
|
|
1322
1324
|
})(pt, function(t) {
|
|
@@ -1334,11 +1336,11 @@ function Bt() {
|
|
|
1334
1336
|
}
|
|
1335
1337
|
})(), t.lib.WordArray;
|
|
1336
1338
|
});
|
|
1337
|
-
})(
|
|
1339
|
+
})(S0)), S0.exports;
|
|
1338
1340
|
}
|
|
1339
|
-
var
|
|
1341
|
+
var H0 = { exports: {} }, Ct = H0.exports, qr;
|
|
1340
1342
|
function Et() {
|
|
1341
|
-
return qr || (qr = 1, (function(r,
|
|
1343
|
+
return qr || (qr = 1, (function(r, v) {
|
|
1342
1344
|
(function(t, e) {
|
|
1343
1345
|
r.exports = e(M());
|
|
1344
1346
|
})(Ct, function(t) {
|
|
@@ -1428,11 +1430,11 @@ function Et() {
|
|
|
1428
1430
|
}
|
|
1429
1431
|
})(), t.enc.Utf16;
|
|
1430
1432
|
});
|
|
1431
|
-
})(
|
|
1433
|
+
})(H0)), H0.exports;
|
|
1432
1434
|
}
|
|
1433
|
-
var
|
|
1435
|
+
var $0 = { exports: {} }, At = $0.exports, Tr;
|
|
1434
1436
|
function i0() {
|
|
1435
|
-
return Tr || (Tr = 1, (function(r,
|
|
1437
|
+
return Tr || (Tr = 1, (function(r, v) {
|
|
1436
1438
|
(function(t, e) {
|
|
1437
1439
|
r.exports = e(M());
|
|
1438
1440
|
})(At, function(t) {
|
|
@@ -1456,8 +1458,8 @@ function i0() {
|
|
|
1456
1458
|
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1457
1459
|
C.clamp();
|
|
1458
1460
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1459
|
-
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255,
|
|
1460
|
-
a.push(E.charAt(
|
|
1461
|
+
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, l = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, D = f << 16 | p << 8 | l, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1462
|
+
a.push(E.charAt(D >>> 6 * (3 - i) & 63));
|
|
1461
1463
|
var o = E.charAt(64);
|
|
1462
1464
|
if (o)
|
|
1463
1465
|
for (; a.length % 4; )
|
|
@@ -1496,18 +1498,18 @@ function i0() {
|
|
|
1496
1498
|
function B(C, x, n) {
|
|
1497
1499
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1498
1500
|
if (s % 4) {
|
|
1499
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1501
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | p;
|
|
1500
1502
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1501
1503
|
}
|
|
1502
1504
|
return h.create(E, a);
|
|
1503
1505
|
}
|
|
1504
1506
|
})(), t.enc.Base64;
|
|
1505
1507
|
});
|
|
1506
|
-
})(
|
|
1508
|
+
})($0)), $0.exports;
|
|
1507
1509
|
}
|
|
1508
|
-
var
|
|
1509
|
-
function
|
|
1510
|
-
return Mr || (Mr = 1, (function(r,
|
|
1510
|
+
var R0 = { exports: {} }, Ft = R0.exports, Mr;
|
|
1511
|
+
function gt() {
|
|
1512
|
+
return Mr || (Mr = 1, (function(r, v) {
|
|
1511
1513
|
(function(t, e) {
|
|
1512
1514
|
r.exports = e(M());
|
|
1513
1515
|
})(Ft, function(t) {
|
|
@@ -1534,7 +1536,7 @@ function Dt() {
|
|
|
1534
1536
|
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1535
1537
|
C.clamp();
|
|
1536
1538
|
for (var s = [], f = 0; f < E; f += 3)
|
|
1537
|
-
for (var
|
|
1539
|
+
for (var p = n[f >>> 2] >>> 24 - f % 4 * 8 & 255, l = n[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, D = n[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, i = p << 16 | l << 8 | D, o = 0; o < 4 && f + o * 0.75 < E; o++)
|
|
1538
1540
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1539
1541
|
var d = a.charAt(64);
|
|
1540
1542
|
if (d)
|
|
@@ -1567,8 +1569,8 @@ function Dt() {
|
|
|
1567
1569
|
}
|
|
1568
1570
|
var f = E.charAt(64);
|
|
1569
1571
|
if (f) {
|
|
1570
|
-
var
|
|
1571
|
-
|
|
1572
|
+
var p = C.indexOf(f);
|
|
1573
|
+
p !== -1 && (n = p);
|
|
1572
1574
|
}
|
|
1573
1575
|
return B(C, n, a);
|
|
1574
1576
|
},
|
|
@@ -1578,26 +1580,26 @@ function Dt() {
|
|
|
1578
1580
|
function B(C, x, n) {
|
|
1579
1581
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1580
1582
|
if (s % 4) {
|
|
1581
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2,
|
|
1583
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | p;
|
|
1582
1584
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1583
1585
|
}
|
|
1584
1586
|
return h.create(E, a);
|
|
1585
1587
|
}
|
|
1586
1588
|
})(), t.enc.Base64url;
|
|
1587
1589
|
});
|
|
1588
|
-
})(
|
|
1590
|
+
})(R0)), R0.exports;
|
|
1589
1591
|
}
|
|
1590
|
-
var
|
|
1592
|
+
var P0 = { exports: {} }, Dt = P0.exports, Nr;
|
|
1591
1593
|
function s0() {
|
|
1592
|
-
return Nr || (Nr = 1, (function(r,
|
|
1594
|
+
return Nr || (Nr = 1, (function(r, v) {
|
|
1593
1595
|
(function(t, e) {
|
|
1594
1596
|
r.exports = e(M());
|
|
1595
|
-
})(
|
|
1597
|
+
})(Dt, function(t) {
|
|
1596
1598
|
return (function(e) {
|
|
1597
1599
|
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = [];
|
|
1598
1600
|
(function() {
|
|
1599
|
-
for (var
|
|
1600
|
-
x[
|
|
1601
|
+
for (var p = 0; p < 64; p++)
|
|
1602
|
+
x[p] = e.abs(e.sin(p + 1)) * 4294967296 | 0;
|
|
1601
1603
|
})();
|
|
1602
1604
|
var n = C.MD5 = B.extend({
|
|
1603
1605
|
_doReset: function() {
|
|
@@ -1608,54 +1610,54 @@ function s0() {
|
|
|
1608
1610
|
271733878
|
|
1609
1611
|
]);
|
|
1610
1612
|
},
|
|
1611
|
-
_doProcessBlock: function(
|
|
1612
|
-
for (var
|
|
1613
|
-
var i = l +
|
|
1614
|
-
|
|
1613
|
+
_doProcessBlock: function(p, l) {
|
|
1614
|
+
for (var D = 0; D < 16; D++) {
|
|
1615
|
+
var i = l + D, o = p[i];
|
|
1616
|
+
p[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1615
1617
|
}
|
|
1616
|
-
var d = this._hash.words, b =
|
|
1617
|
-
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A,
|
|
1618
|
+
var d = this._hash.words, b = p[l + 0], g = p[l + 1], y = p[l + 2], k = p[l + 3], R = p[l + 4], F = p[l + 5], w = p[l + 6], H = p[l + 7], $ = p[l + 8], z = p[l + 9], O = p[l + 10], q = p[l + 11], U = p[l + 12], T = p[l + 13], N = p[l + 14], j = p[l + 15], S = d[0], c = d[1], A = d[2], _ = d[3];
|
|
1619
|
+
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, g, 12, x[1]), A = E(A, _, S, c, y, 17, x[2]), c = E(c, A, _, S, k, 22, x[3]), S = E(S, c, A, _, R, 7, x[4]), _ = E(_, S, c, A, F, 12, x[5]), A = E(A, _, S, c, w, 17, x[6]), c = E(c, A, _, S, H, 22, x[7]), S = E(S, c, A, _, $, 7, x[8]), _ = E(_, S, c, A, z, 12, x[9]), A = E(A, _, S, c, O, 17, x[10]), c = E(c, A, _, S, q, 22, x[11]), S = E(S, c, A, _, U, 7, x[12]), _ = E(_, S, c, A, T, 12, x[13]), A = E(A, _, S, c, N, 17, x[14]), c = E(c, A, _, S, j, 22, x[15]), S = a(S, c, A, _, g, 5, x[16]), _ = a(_, S, c, A, w, 9, x[17]), A = a(A, _, S, c, q, 14, x[18]), c = a(c, A, _, S, b, 20, x[19]), S = a(S, c, A, _, F, 5, x[20]), _ = a(_, S, c, A, O, 9, x[21]), A = a(A, _, S, c, j, 14, x[22]), c = a(c, A, _, S, R, 20, x[23]), S = a(S, c, A, _, z, 5, x[24]), _ = a(_, S, c, A, N, 9, x[25]), A = a(A, _, S, c, k, 14, x[26]), c = a(c, A, _, S, $, 20, x[27]), S = a(S, c, A, _, T, 5, x[28]), _ = a(_, S, c, A, y, 9, x[29]), A = a(A, _, S, c, H, 14, x[30]), c = a(c, A, _, S, U, 20, x[31]), S = s(S, c, A, _, F, 4, x[32]), _ = s(_, S, c, A, $, 11, x[33]), A = s(A, _, S, c, q, 16, x[34]), c = s(c, A, _, S, N, 23, x[35]), S = s(S, c, A, _, g, 4, x[36]), _ = s(_, S, c, A, R, 11, x[37]), A = s(A, _, S, c, H, 16, x[38]), c = s(c, A, _, S, O, 23, x[39]), S = s(S, c, A, _, T, 4, x[40]), _ = s(_, S, c, A, b, 11, x[41]), A = s(A, _, S, c, k, 16, x[42]), c = s(c, A, _, S, w, 23, x[43]), S = s(S, c, A, _, z, 4, x[44]), _ = s(_, S, c, A, U, 11, x[45]), A = s(A, _, S, c, j, 16, x[46]), c = s(c, A, _, S, y, 23, x[47]), S = f(S, c, A, _, b, 6, x[48]), _ = f(_, S, c, A, H, 10, x[49]), A = f(A, _, S, c, N, 15, x[50]), c = f(c, A, _, S, F, 21, x[51]), S = f(S, c, A, _, U, 6, x[52]), _ = f(_, S, c, A, k, 10, x[53]), A = f(A, _, S, c, O, 15, x[54]), c = f(c, A, _, S, g, 21, x[55]), S = f(S, c, A, _, $, 6, x[56]), _ = f(_, S, c, A, j, 10, x[57]), A = f(A, _, S, c, w, 15, x[58]), c = f(c, A, _, S, T, 21, x[59]), S = f(S, c, A, _, R, 6, x[60]), _ = f(_, S, c, A, q, 10, x[61]), A = f(A, _, S, c, y, 15, x[62]), c = f(c, A, _, S, z, 21, x[63]), d[0] = d[0] + S | 0, d[1] = d[1] + c | 0, d[2] = d[2] + A | 0, d[3] = d[3] + _ | 0;
|
|
1618
1620
|
},
|
|
1619
1621
|
_doFinalize: function() {
|
|
1620
|
-
var
|
|
1622
|
+
var p = this._data, l = p.words, D = this._nDataBytes * 8, i = p.sigBytes * 8;
|
|
1621
1623
|
l[i >>> 5] |= 128 << 24 - i % 32;
|
|
1622
|
-
var o = e.floor(
|
|
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,
|
|
1624
|
-
for (var b = this._hash,
|
|
1625
|
-
var k =
|
|
1626
|
-
|
|
1624
|
+
var o = e.floor(D / 4294967296), d = D;
|
|
1625
|
+
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, p.sigBytes = (l.length + 1) * 4, this._process();
|
|
1626
|
+
for (var b = this._hash, g = b.words, y = 0; y < 4; y++) {
|
|
1627
|
+
var k = g[y];
|
|
1628
|
+
g[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
1627
1629
|
}
|
|
1628
1630
|
return b;
|
|
1629
1631
|
},
|
|
1630
1632
|
clone: function() {
|
|
1631
|
-
var
|
|
1632
|
-
return
|
|
1633
|
+
var p = B.clone.call(this);
|
|
1634
|
+
return p._hash = this._hash.clone(), p;
|
|
1633
1635
|
}
|
|
1634
1636
|
});
|
|
1635
|
-
function E(
|
|
1636
|
-
var
|
|
1637
|
-
return (
|
|
1637
|
+
function E(p, l, D, i, o, d, b) {
|
|
1638
|
+
var g = p + (l & D | ~l & i) + o + b;
|
|
1639
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1638
1640
|
}
|
|
1639
|
-
function a(
|
|
1640
|
-
var
|
|
1641
|
-
return (
|
|
1641
|
+
function a(p, l, D, i, o, d, b) {
|
|
1642
|
+
var g = p + (l & i | D & ~i) + o + b;
|
|
1643
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1642
1644
|
}
|
|
1643
|
-
function s(
|
|
1644
|
-
var
|
|
1645
|
-
return (
|
|
1645
|
+
function s(p, l, D, i, o, d, b) {
|
|
1646
|
+
var g = p + (l ^ D ^ i) + o + b;
|
|
1647
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1646
1648
|
}
|
|
1647
|
-
function f(
|
|
1648
|
-
var
|
|
1649
|
-
return (
|
|
1649
|
+
function f(p, l, D, i, o, d, b) {
|
|
1650
|
+
var g = p + (D ^ (l | ~i)) + o + b;
|
|
1651
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1650
1652
|
}
|
|
1651
1653
|
u.MD5 = B._createHelper(n), u.HmacMD5 = B._createHmacHelper(n);
|
|
1652
1654
|
})(Math), t.MD5;
|
|
1653
1655
|
});
|
|
1654
|
-
})(
|
|
1656
|
+
})(P0)), P0.exports;
|
|
1655
1657
|
}
|
|
1656
|
-
var
|
|
1658
|
+
var z0 = { exports: {} }, bt = z0.exports, Ur;
|
|
1657
1659
|
function ye() {
|
|
1658
|
-
return Ur || (Ur = 1, (function(r,
|
|
1660
|
+
return Ur || (Ur = 1, (function(r, v) {
|
|
1659
1661
|
(function(t, e) {
|
|
1660
1662
|
r.exports = e(M());
|
|
1661
1663
|
})(bt, function(t) {
|
|
@@ -1671,17 +1673,17 @@ function ye() {
|
|
|
1671
1673
|
]);
|
|
1672
1674
|
},
|
|
1673
1675
|
_doProcessBlock: function(n, E) {
|
|
1674
|
-
for (var a = this._hash.words, s = a[0], f = a[1],
|
|
1676
|
+
for (var a = this._hash.words, s = a[0], f = a[1], p = a[2], l = a[3], D = a[4], i = 0; i < 80; i++) {
|
|
1675
1677
|
if (i < 16)
|
|
1676
1678
|
C[i] = n[E + i] | 0;
|
|
1677
1679
|
else {
|
|
1678
1680
|
var o = C[i - 3] ^ C[i - 8] ^ C[i - 14] ^ C[i - 16];
|
|
1679
1681
|
C[i] = o << 1 | o >>> 31;
|
|
1680
1682
|
}
|
|
1681
|
-
var d = (s << 5 | s >>> 27) +
|
|
1682
|
-
i < 20 ? d += (f &
|
|
1683
|
+
var d = (s << 5 | s >>> 27) + D + C[i];
|
|
1684
|
+
i < 20 ? d += (f & p | ~f & l) + 1518500249 : i < 40 ? d += (f ^ p ^ l) + 1859775393 : i < 60 ? d += (f & p | f & l | p & l) - 1894007588 : d += (f ^ p ^ l) - 899497514, D = l, l = p, p = f << 30 | f >>> 2, f = s, s = d;
|
|
1683
1685
|
}
|
|
1684
|
-
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] +
|
|
1686
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] + p | 0, a[3] = a[3] + l | 0, a[4] = a[4] + D | 0;
|
|
1685
1687
|
},
|
|
1686
1688
|
_doFinalize: function() {
|
|
1687
1689
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
@@ -1695,49 +1697,49 @@ function ye() {
|
|
|
1695
1697
|
e.SHA1 = m._createHelper(x), e.HmacSHA1 = m._createHmacHelper(x);
|
|
1696
1698
|
})(), t.SHA1;
|
|
1697
1699
|
});
|
|
1698
|
-
})(
|
|
1700
|
+
})(z0)), z0.exports;
|
|
1699
1701
|
}
|
|
1700
|
-
var
|
|
1702
|
+
var W0 = { exports: {} }, mt = W0.exports, jr;
|
|
1701
1703
|
function Er() {
|
|
1702
|
-
return jr || (jr = 1, (function(r,
|
|
1704
|
+
return jr || (jr = 1, (function(r, v) {
|
|
1703
1705
|
(function(t, e) {
|
|
1704
1706
|
r.exports = e(M());
|
|
1705
1707
|
})(mt, function(t) {
|
|
1706
1708
|
return (function(e) {
|
|
1707
1709
|
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.algo, x = [], n = [];
|
|
1708
1710
|
(function() {
|
|
1709
|
-
function s(
|
|
1710
|
-
for (var i = e.sqrt(
|
|
1711
|
-
if (!(
|
|
1711
|
+
function s(D) {
|
|
1712
|
+
for (var i = e.sqrt(D), o = 2; o <= i; o++)
|
|
1713
|
+
if (!(D % o))
|
|
1712
1714
|
return !1;
|
|
1713
1715
|
return !0;
|
|
1714
1716
|
}
|
|
1715
|
-
function f(
|
|
1716
|
-
return (
|
|
1717
|
+
function f(D) {
|
|
1718
|
+
return (D - (D | 0)) * 4294967296 | 0;
|
|
1717
1719
|
}
|
|
1718
|
-
for (var
|
|
1719
|
-
s(
|
|
1720
|
+
for (var p = 2, l = 0; l < 64; )
|
|
1721
|
+
s(p) && (l < 8 && (x[l] = f(e.pow(p, 1 / 2))), n[l] = f(e.pow(p, 1 / 3)), l++), p++;
|
|
1720
1722
|
})();
|
|
1721
1723
|
var E = [], a = C.SHA256 = B.extend({
|
|
1722
1724
|
_doReset: function() {
|
|
1723
1725
|
this._hash = new m.init(x.slice(0));
|
|
1724
1726
|
},
|
|
1725
1727
|
_doProcessBlock: function(s, f) {
|
|
1726
|
-
for (var
|
|
1728
|
+
for (var p = this._hash.words, l = p[0], D = p[1], i = p[2], o = p[3], d = p[4], b = p[5], g = p[6], y = p[7], k = 0; k < 64; k++) {
|
|
1727
1729
|
if (k < 16)
|
|
1728
1730
|
E[k] = s[f + k] | 0;
|
|
1729
1731
|
else {
|
|
1730
1732
|
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;
|
|
1731
1733
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1732
1734
|
}
|
|
1733
|
-
var $ = d & b ^ ~d &
|
|
1734
|
-
y =
|
|
1735
|
+
var $ = d & b ^ ~d & g, z = l & D ^ l & i ^ D & 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;
|
|
1736
|
+
y = g, g = b, b = d, d = o + U | 0, o = i, i = D, D = l, l = U + T | 0;
|
|
1735
1737
|
}
|
|
1736
|
-
|
|
1738
|
+
p[0] = p[0] + l | 0, p[1] = p[1] + D | 0, p[2] = p[2] + i | 0, p[3] = p[3] + o | 0, p[4] = p[4] + d | 0, p[5] = p[5] + b | 0, p[6] = p[6] + g | 0, p[7] = p[7] + y | 0;
|
|
1737
1739
|
},
|
|
1738
1740
|
_doFinalize: function() {
|
|
1739
|
-
var s = this._data, f = s.words,
|
|
1740
|
-
return f[l >>> 5] |= 128 << 24 - l % 32, f[(l + 64 >>> 9 << 4) + 14] = e.floor(
|
|
1741
|
+
var s = this._data, f = s.words, p = this._nDataBytes * 8, l = s.sigBytes * 8;
|
|
1742
|
+
return f[l >>> 5] |= 128 << 24 - l % 32, f[(l + 64 >>> 9 << 4) + 14] = e.floor(p / 4294967296), f[(l + 64 >>> 9 << 4) + 15] = p, s.sigBytes = f.length * 4, this._process(), this._hash;
|
|
1741
1743
|
},
|
|
1742
1744
|
clone: function() {
|
|
1743
1745
|
var s = B.clone.call(this);
|
|
@@ -1747,11 +1749,11 @@ function Er() {
|
|
|
1747
1749
|
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1748
1750
|
})(Math), t.SHA256;
|
|
1749
1751
|
});
|
|
1750
|
-
})(
|
|
1752
|
+
})(W0)), W0.exports;
|
|
1751
1753
|
}
|
|
1752
|
-
var
|
|
1754
|
+
var I0 = { exports: {} }, _t = I0.exports, Gr;
|
|
1753
1755
|
function yt() {
|
|
1754
|
-
return Gr || (Gr = 1, (function(r,
|
|
1756
|
+
return Gr || (Gr = 1, (function(r, v) {
|
|
1755
1757
|
(function(t, e, u) {
|
|
1756
1758
|
r.exports = e(M(), Er());
|
|
1757
1759
|
})(_t, function(t) {
|
|
@@ -1777,11 +1779,11 @@ function yt() {
|
|
|
1777
1779
|
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1778
1780
|
})(), t.SHA224;
|
|
1779
1781
|
});
|
|
1780
|
-
})(
|
|
1782
|
+
})(I0)), I0.exports;
|
|
1781
1783
|
}
|
|
1782
|
-
var
|
|
1784
|
+
var L0 = { exports: {} }, wt = L0.exports, Kr;
|
|
1783
1785
|
function we() {
|
|
1784
|
-
return
|
|
1786
|
+
return Kr || (Kr = 1, (function(r, v) {
|
|
1785
1787
|
(function(t, e, u) {
|
|
1786
1788
|
r.exports = e(M(), ur());
|
|
1787
1789
|
})(wt, function(t) {
|
|
@@ -1889,23 +1891,23 @@ function we() {
|
|
|
1889
1891
|
new B.init(1541459225, 327033209)
|
|
1890
1892
|
]);
|
|
1891
1893
|
},
|
|
1892
|
-
_doProcessBlock: function(f,
|
|
1893
|
-
for (var l = this._hash.words,
|
|
1894
|
-
var
|
|
1895
|
-
if (
|
|
1896
|
-
x0 =
|
|
1894
|
+
_doProcessBlock: function(f, p) {
|
|
1895
|
+
for (var l = this._hash.words, D = l[0], i = l[1], o = l[2], d = l[3], b = l[4], g = l[5], y = l[6], k = l[7], R = D.high, F = D.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 = g.high, j = g.low, S = y.high, c = y.low, A = k.high, _ = k.low, W = R, P = F, L = w, I = H, Z = $, Q = z, o0 = O, K = q, G = U, Y = T, e0 = N, c0 = j, D0 = S, v0 = c, dr = A, p0 = _, t0 = 0; t0 < 80; t0++) {
|
|
1896
|
+
var r0, x0, b0 = a[t0];
|
|
1897
|
+
if (t0 < 16)
|
|
1898
|
+
x0 = b0.high = f[p + t0 * 2] | 0, r0 = b0.low = f[p + t0 * 2 + 1] | 0;
|
|
1897
1899
|
else {
|
|
1898
|
-
var
|
|
1899
|
-
|
|
1900
|
+
var gr = a[t0 - 15], f0 = gr.high, B0 = gr.low, Re = (f0 >>> 1 | B0 << 31) ^ (f0 >>> 8 | B0 << 24) ^ f0 >>> 7, Dr = (B0 >>> 1 | f0 << 31) ^ (B0 >>> 8 | f0 << 24) ^ (B0 >>> 7 | f0 << 25), br = a[t0 - 2], u0 = br.high, C0 = br.low, Pe = (u0 >>> 19 | C0 << 13) ^ (u0 << 3 | C0 >>> 29) ^ u0 >>> 6, mr = (C0 >>> 19 | u0 << 13) ^ (C0 << 3 | u0 >>> 29) ^ (C0 >>> 6 | u0 << 26), _r = a[t0 - 7], ze = _r.high, We = _r.low, yr = a[t0 - 16], Ie = yr.high, wr = yr.low;
|
|
1901
|
+
r0 = Dr + We, x0 = Re + ze + (r0 >>> 0 < Dr >>> 0 ? 1 : 0), r0 = r0 + mr, x0 = x0 + Pe + (r0 >>> 0 < mr >>> 0 ? 1 : 0), r0 = r0 + wr, x0 = x0 + Ie + (r0 >>> 0 < wr >>> 0 ? 1 : 0), b0.high = x0, b0.low = r0;
|
|
1900
1902
|
}
|
|
1901
|
-
var Le = G &
|
|
1902
|
-
dr = D0, p0 = v0, D0 =
|
|
1903
|
+
var Le = G & e0 ^ ~G & D0, kr = Y & c0 ^ ~Y & v0, Oe = W & L ^ W & Z ^ L & Z, qe = P & I ^ P & Q ^ I & Q, Te = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), Sr = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Me = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Ne = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Hr = E[t0], Ue = Hr.high, $r = Hr.low, V = p0 + Ne, n0 = dr + Me + (V >>> 0 < p0 >>> 0 ? 1 : 0), V = V + kr, n0 = n0 + Le + (V >>> 0 < kr >>> 0 ? 1 : 0), V = V + $r, n0 = n0 + Ue + (V >>> 0 < $r >>> 0 ? 1 : 0), V = V + r0, n0 = n0 + x0 + (V >>> 0 < r0 >>> 0 ? 1 : 0), Rr = Sr + qe, je = Te + Oe + (Rr >>> 0 < Sr >>> 0 ? 1 : 0);
|
|
1904
|
+
dr = D0, p0 = v0, D0 = e0, v0 = c0, e0 = G, c0 = Y, Y = K + V | 0, G = o0 + n0 + (Y >>> 0 < K >>> 0 ? 1 : 0) | 0, o0 = Z, K = Q, Z = L, Q = I, L = W, I = P, P = V + Rr | 0, W = n0 + je + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1903
1905
|
}
|
|
1904
|
-
F =
|
|
1906
|
+
F = D.low = F + P, D.high = R + W + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + I, i.high = w + L + (H >>> 0 < I >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = $ + 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 = g.low = j + c0, g.high = N + e0 + (j >>> 0 < c0 >>> 0 ? 1 : 0), c = y.low = c + v0, y.high = S + D0 + (c >>> 0 < v0 >>> 0 ? 1 : 0), _ = k.low = _ + p0, k.high = A + dr + (_ >>> 0 < p0 >>> 0 ? 1 : 0);
|
|
1905
1907
|
},
|
|
1906
1908
|
_doFinalize: function() {
|
|
1907
|
-
var f = this._data,
|
|
1908
|
-
|
|
1909
|
+
var f = this._data, p = f.words, l = this._nDataBytes * 8, D = f.sigBytes * 8;
|
|
1910
|
+
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(l / 4294967296), p[(D + 128 >>> 10 << 5) + 31] = l, f.sigBytes = p.length * 4, this._process();
|
|
1909
1911
|
var i = this._hash.toX32();
|
|
1910
1912
|
return i;
|
|
1911
1913
|
},
|
|
@@ -1918,11 +1920,11 @@ function we() {
|
|
|
1918
1920
|
e.SHA512 = h._createHelper(s), e.HmacSHA512 = h._createHmacHelper(s);
|
|
1919
1921
|
})(), t.SHA512;
|
|
1920
1922
|
});
|
|
1921
|
-
})(
|
|
1923
|
+
})(L0)), L0.exports;
|
|
1922
1924
|
}
|
|
1923
|
-
var
|
|
1925
|
+
var O0 = { exports: {} }, kt = O0.exports, Xr;
|
|
1924
1926
|
function St() {
|
|
1925
|
-
return
|
|
1927
|
+
return Xr || (Xr = 1, (function(r, v) {
|
|
1926
1928
|
(function(t, e, u) {
|
|
1927
1929
|
r.exports = e(M(), ur(), we());
|
|
1928
1930
|
})(kt, function(t) {
|
|
@@ -1948,26 +1950,26 @@ function St() {
|
|
|
1948
1950
|
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
1949
1951
|
})(), t.SHA384;
|
|
1950
1952
|
});
|
|
1951
|
-
})(
|
|
1953
|
+
})(O0)), O0.exports;
|
|
1952
1954
|
}
|
|
1953
|
-
var
|
|
1955
|
+
var q0 = { exports: {} }, Ht = q0.exports, Yr;
|
|
1954
1956
|
function $t() {
|
|
1955
|
-
return
|
|
1957
|
+
return Yr || (Yr = 1, (function(r, v) {
|
|
1956
1958
|
(function(t, e, u) {
|
|
1957
1959
|
r.exports = e(M(), ur());
|
|
1958
1960
|
})(Ht, function(t) {
|
|
1959
1961
|
return (function(e) {
|
|
1960
1962
|
var u = t, h = u.lib, m = h.WordArray, B = h.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
1961
1963
|
(function() {
|
|
1962
|
-
for (var l = 1,
|
|
1963
|
-
E[l + 5 *
|
|
1964
|
-
var o =
|
|
1965
|
-
l = o,
|
|
1964
|
+
for (var l = 1, D = 0, i = 0; i < 24; i++) {
|
|
1965
|
+
E[l + 5 * D] = (i + 1) * (i + 2) / 2 % 64;
|
|
1966
|
+
var o = D % 5, d = (2 * l + 3 * D) % 5;
|
|
1967
|
+
l = o, D = d;
|
|
1966
1968
|
}
|
|
1967
1969
|
for (var l = 0; l < 5; l++)
|
|
1968
|
-
for (var
|
|
1969
|
-
a[l + 5 *
|
|
1970
|
-
for (var b = 1,
|
|
1970
|
+
for (var D = 0; D < 5; D++)
|
|
1971
|
+
a[l + 5 * D] = D + (2 * l + 3 * D) % 5 * 5;
|
|
1972
|
+
for (var b = 1, g = 0; g < 24; g++) {
|
|
1971
1973
|
for (var y = 0, k = 0, R = 0; R < 7; R++) {
|
|
1972
1974
|
if (b & 1) {
|
|
1973
1975
|
var F = (1 << R) - 1;
|
|
@@ -1975,7 +1977,7 @@ function $t() {
|
|
|
1975
1977
|
}
|
|
1976
1978
|
b & 128 ? b = b << 1 ^ 113 : b <<= 1;
|
|
1977
1979
|
}
|
|
1978
|
-
s[
|
|
1980
|
+
s[g] = x.create(y, k);
|
|
1979
1981
|
}
|
|
1980
1982
|
})();
|
|
1981
1983
|
var f = [];
|
|
@@ -1983,7 +1985,7 @@ function $t() {
|
|
|
1983
1985
|
for (var l = 0; l < 25; l++)
|
|
1984
1986
|
f[l] = x.create();
|
|
1985
1987
|
})();
|
|
1986
|
-
var
|
|
1988
|
+
var p = n.SHA3 = B.extend({
|
|
1987
1989
|
/**
|
|
1988
1990
|
* Configuration options.
|
|
1989
1991
|
*
|
|
@@ -1996,16 +1998,16 @@ function $t() {
|
|
|
1996
1998
|
outputLength: 512
|
|
1997
1999
|
}),
|
|
1998
2000
|
_doReset: function() {
|
|
1999
|
-
for (var l = this._state = [],
|
|
2000
|
-
l[
|
|
2001
|
+
for (var l = this._state = [], D = 0; D < 25; D++)
|
|
2002
|
+
l[D] = new x.init();
|
|
2001
2003
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2002
2004
|
},
|
|
2003
|
-
_doProcessBlock: function(l,
|
|
2005
|
+
_doProcessBlock: function(l, D) {
|
|
2004
2006
|
for (var i = this._state, o = this.blockSize / 2, d = 0; d < o; d++) {
|
|
2005
|
-
var b = l[
|
|
2006
|
-
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360,
|
|
2007
|
+
var b = l[D + 2 * d], g = l[D + 2 * d + 1];
|
|
2008
|
+
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, g = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
|
|
2007
2009
|
var y = i[d];
|
|
2008
|
-
y.high ^=
|
|
2010
|
+
y.high ^= g, y.low ^= b;
|
|
2009
2011
|
}
|
|
2010
2012
|
for (var k = 0; k < 24; k++) {
|
|
2011
2013
|
for (var R = 0; R < 5; R++) {
|
|
@@ -2017,7 +2019,7 @@ function $t() {
|
|
|
2017
2019
|
$.high = F, $.low = w;
|
|
2018
2020
|
}
|
|
2019
2021
|
for (var R = 0; R < 5; R++)
|
|
2020
|
-
for (var
|
|
2022
|
+
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++) {
|
|
2021
2023
|
var y = i[R + 5 * H];
|
|
2022
2024
|
y.high ^= F, y.low ^= w;
|
|
2023
2025
|
}
|
|
@@ -2031,38 +2033,38 @@ function $t() {
|
|
|
2031
2033
|
A.high = _.high, A.low = _.low;
|
|
2032
2034
|
for (var R = 0; R < 5; R++)
|
|
2033
2035
|
for (var H = 0; H < 5; H++) {
|
|
2034
|
-
var T = R + 5 * H, y = i[T],
|
|
2035
|
-
y.high =
|
|
2036
|
+
var T = R + 5 * H, y = i[T], W = f[T], P = f[(R + 1) % 5 + 5 * H], L = f[(R + 2) % 5 + 5 * H];
|
|
2037
|
+
y.high = W.high ^ ~P.high & L.high, y.low = W.low ^ ~P.low & L.low;
|
|
2036
2038
|
}
|
|
2037
|
-
var y = i[0],
|
|
2038
|
-
y.high ^=
|
|
2039
|
+
var y = i[0], I = s[k];
|
|
2040
|
+
y.high ^= I.high, y.low ^= I.low;
|
|
2039
2041
|
}
|
|
2040
2042
|
},
|
|
2041
2043
|
_doFinalize: function() {
|
|
2042
|
-
var l = this._data,
|
|
2044
|
+
var l = this._data, D = l.words;
|
|
2043
2045
|
this._nDataBytes * 8;
|
|
2044
2046
|
var i = l.sigBytes * 8, o = this.blockSize * 32;
|
|
2045
|
-
|
|
2046
|
-
for (var d = this._state, b = this.cfg.outputLength / 8,
|
|
2047
|
+
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, l.sigBytes = D.length * 4, this._process();
|
|
2048
|
+
for (var d = this._state, b = this.cfg.outputLength / 8, g = b / 8, y = [], k = 0; k < g; k++) {
|
|
2047
2049
|
var R = d[k], F = R.high, w = R.low;
|
|
2048
2050
|
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, y.push(w), y.push(F);
|
|
2049
2051
|
}
|
|
2050
2052
|
return new m.init(y, b);
|
|
2051
2053
|
},
|
|
2052
2054
|
clone: function() {
|
|
2053
|
-
for (var l = B.clone.call(this),
|
|
2054
|
-
|
|
2055
|
+
for (var l = B.clone.call(this), D = l._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2056
|
+
D[i] = D[i].clone();
|
|
2055
2057
|
return l;
|
|
2056
2058
|
}
|
|
2057
2059
|
});
|
|
2058
|
-
u.SHA3 = B._createHelper(
|
|
2060
|
+
u.SHA3 = B._createHelper(p), u.HmacSHA3 = B._createHmacHelper(p);
|
|
2059
2061
|
})(Math), t.SHA3;
|
|
2060
2062
|
});
|
|
2061
|
-
})(
|
|
2063
|
+
})(q0)), q0.exports;
|
|
2062
2064
|
}
|
|
2063
|
-
var
|
|
2065
|
+
var T0 = { exports: {} }, Rt = T0.exports, Zr;
|
|
2064
2066
|
function Pt() {
|
|
2065
|
-
return
|
|
2067
|
+
return Zr || (Zr = 1, (function(r, v) {
|
|
2066
2068
|
(function(t, e) {
|
|
2067
2069
|
r.exports = e(M());
|
|
2068
2070
|
})(Rt, function(t) {
|
|
@@ -2391,24 +2393,24 @@ function Pt() {
|
|
|
2391
2393
|
13,
|
|
2392
2394
|
11,
|
|
2393
2395
|
11
|
|
2394
|
-
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
|
|
2396
|
+
]), s = m.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = m.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), p = C.RIPEMD160 = B.extend({
|
|
2395
2397
|
_doReset: function() {
|
|
2396
2398
|
this._hash = m.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2397
2399
|
},
|
|
2398
|
-
_doProcessBlock: function(
|
|
2400
|
+
_doProcessBlock: function(g, y) {
|
|
2399
2401
|
for (var k = 0; k < 16; k++) {
|
|
2400
|
-
var R = y + k, F =
|
|
2401
|
-
|
|
2402
|
+
var R = y + k, F = g[R];
|
|
2403
|
+
g[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2402
2404
|
}
|
|
2403
|
-
var w = this._hash.words, H = s.words, $ = f.words,
|
|
2404
|
-
A = T = w[0], _ = N = w[1],
|
|
2405
|
-
for (var
|
|
2406
|
-
|
|
2407
|
-
|
|
2405
|
+
var w = this._hash.words, H = s.words, $ = f.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _, W, P, L;
|
|
2406
|
+
A = T = w[0], _ = N = w[1], W = j = w[2], P = S = w[3], L = c = w[4];
|
|
2407
|
+
for (var I, k = 0; k < 80; k += 1)
|
|
2408
|
+
I = T + g[y + z[k]] | 0, k < 16 ? I += l(N, j, S) + H[0] : k < 32 ? I += D(N, j, S) + H[1] : k < 48 ? I += i(N, j, S) + H[2] : k < 64 ? I += o(N, j, S) + H[3] : I += d(N, j, S) + H[4], I = I | 0, I = b(I, q[k]), I = I + c | 0, T = c, c = S, S = b(j, 10), j = N, N = I, I = A + g[y + O[k]] | 0, k < 16 ? I += d(_, W, P) + $[0] : k < 32 ? I += o(_, W, P) + $[1] : k < 48 ? I += i(_, W, P) + $[2] : k < 64 ? I += D(_, W, P) + $[3] : I += l(_, W, P) + $[4], I = I | 0, I = b(I, U[k]), I = I + L | 0, A = L, L = P, P = b(W, 10), W = _, _ = I;
|
|
2409
|
+
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + _ | 0, w[4] = w[0] + N + W | 0, w[0] = I;
|
|
2408
2410
|
},
|
|
2409
2411
|
_doFinalize: function() {
|
|
2410
|
-
var
|
|
2411
|
-
y[R >>> 5] |= 128 << 24 - R % 32, y[(R + 64 >>> 9 << 4) + 14] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360,
|
|
2412
|
+
var g = this._data, y = g.words, k = this._nDataBytes * 8, R = g.sigBytes * 8;
|
|
2413
|
+
y[R >>> 5] |= 128 << 24 - R % 32, y[(R + 64 >>> 9 << 4) + 14] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, g.sigBytes = (y.length + 1) * 4, this._process();
|
|
2412
2414
|
for (var F = this._hash, w = F.words, H = 0; H < 5; H++) {
|
|
2413
2415
|
var $ = w[H];
|
|
2414
2416
|
w[H] = ($ << 8 | $ >>> 24) & 16711935 | ($ << 24 | $ >>> 8) & 4278255360;
|
|
@@ -2416,39 +2418,39 @@ function Pt() {
|
|
|
2416
2418
|
return F;
|
|
2417
2419
|
},
|
|
2418
2420
|
clone: function() {
|
|
2419
|
-
var
|
|
2420
|
-
return
|
|
2421
|
+
var g = B.clone.call(this);
|
|
2422
|
+
return g._hash = this._hash.clone(), g;
|
|
2421
2423
|
}
|
|
2422
2424
|
});
|
|
2423
|
-
function l(
|
|
2424
|
-
return
|
|
2425
|
+
function l(g, y, k) {
|
|
2426
|
+
return g ^ y ^ k;
|
|
2425
2427
|
}
|
|
2426
|
-
function g
|
|
2427
|
-
return
|
|
2428
|
+
function D(g, y, k) {
|
|
2429
|
+
return g & y | ~g & k;
|
|
2428
2430
|
}
|
|
2429
|
-
function i(
|
|
2430
|
-
return (
|
|
2431
|
+
function i(g, y, k) {
|
|
2432
|
+
return (g | ~y) ^ k;
|
|
2431
2433
|
}
|
|
2432
|
-
function o(
|
|
2433
|
-
return
|
|
2434
|
+
function o(g, y, k) {
|
|
2435
|
+
return g & k | y & ~k;
|
|
2434
2436
|
}
|
|
2435
|
-
function d(
|
|
2436
|
-
return
|
|
2437
|
+
function d(g, y, k) {
|
|
2438
|
+
return g ^ (y | ~k);
|
|
2437
2439
|
}
|
|
2438
|
-
function b(
|
|
2439
|
-
return
|
|
2440
|
+
function b(g, y) {
|
|
2441
|
+
return g << y | g >>> 32 - y;
|
|
2440
2442
|
}
|
|
2441
|
-
u.RIPEMD160 = B._createHelper(
|
|
2443
|
+
u.RIPEMD160 = B._createHelper(p), u.HmacRIPEMD160 = B._createHmacHelper(p);
|
|
2442
2444
|
})(), t.RIPEMD160;
|
|
2443
2445
|
});
|
|
2444
|
-
})(
|
|
2446
|
+
})(T0)), T0.exports;
|
|
2445
2447
|
}
|
|
2446
|
-
var
|
|
2448
|
+
var M0 = { exports: {} }, zt = M0.exports, Qr;
|
|
2447
2449
|
function Ar() {
|
|
2448
|
-
return Qr || (Qr = 1, (function(r,
|
|
2450
|
+
return Qr || (Qr = 1, (function(r, v) {
|
|
2449
2451
|
(function(t, e) {
|
|
2450
2452
|
r.exports = e(M());
|
|
2451
|
-
})(
|
|
2453
|
+
})(zt, function(t) {
|
|
2452
2454
|
(function() {
|
|
2453
2455
|
var e = t, u = e.lib, h = u.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2454
2456
|
C.HMAC = h.extend({
|
|
@@ -2466,8 +2468,8 @@ function Ar() {
|
|
|
2466
2468
|
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2467
2469
|
var E = x.blockSize, a = E * 4;
|
|
2468
2470
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2469
|
-
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(),
|
|
2470
|
-
|
|
2471
|
+
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), p = s.words, l = f.words, D = 0; D < E; D++)
|
|
2472
|
+
p[D] ^= 1549556828, l[D] ^= 909522486;
|
|
2471
2473
|
s.sigBytes = f.sigBytes = a, this.reset();
|
|
2472
2474
|
},
|
|
2473
2475
|
/**
|
|
@@ -2519,14 +2521,14 @@ function Ar() {
|
|
|
2519
2521
|
});
|
|
2520
2522
|
})();
|
|
2521
2523
|
});
|
|
2522
|
-
})(
|
|
2524
|
+
})(M0)), M0.exports;
|
|
2523
2525
|
}
|
|
2524
|
-
var
|
|
2525
|
-
function
|
|
2526
|
-
return Vr || (Vr = 1, (function(r,
|
|
2526
|
+
var N0 = { exports: {} }, Wt = N0.exports, Vr;
|
|
2527
|
+
function It() {
|
|
2528
|
+
return Vr || (Vr = 1, (function(r, v) {
|
|
2527
2529
|
(function(t, e, u) {
|
|
2528
2530
|
r.exports = e(M(), Er(), Ar());
|
|
2529
|
-
})(
|
|
2531
|
+
})(Wt, function(t) {
|
|
2530
2532
|
return (function() {
|
|
2531
2533
|
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({
|
|
2532
2534
|
/**
|
|
@@ -2568,17 +2570,17 @@ function Wt() {
|
|
|
2568
2570
|
* var key = kdf.compute(password, salt);
|
|
2569
2571
|
*/
|
|
2570
2572
|
compute: function(E, a) {
|
|
2571
|
-
for (var s = this.cfg, f = x.create(s.hasher, E),
|
|
2573
|
+
for (var s = this.cfg, f = x.create(s.hasher, E), p = m.create(), l = m.create([1]), D = p.words, i = l.words, o = s.keySize, d = s.iterations; D.length < o; ) {
|
|
2572
2574
|
var b = f.update(a).finalize(l);
|
|
2573
2575
|
f.reset();
|
|
2574
|
-
for (var
|
|
2576
|
+
for (var g = b.words, y = g.length, k = b, R = 1; R < d; R++) {
|
|
2575
2577
|
k = f.finalize(k), f.reset();
|
|
2576
2578
|
for (var F = k.words, w = 0; w < y; w++)
|
|
2577
|
-
|
|
2579
|
+
g[w] ^= F[w];
|
|
2578
2580
|
}
|
|
2579
|
-
|
|
2581
|
+
p.concat(b), i[0]++;
|
|
2580
2582
|
}
|
|
2581
|
-
return
|
|
2583
|
+
return p.sigBytes = o * 4, p;
|
|
2582
2584
|
}
|
|
2583
2585
|
});
|
|
2584
2586
|
e.PBKDF2 = function(E, a, s) {
|
|
@@ -2586,11 +2588,11 @@ function Wt() {
|
|
|
2586
2588
|
};
|
|
2587
2589
|
})(), t.PBKDF2;
|
|
2588
2590
|
});
|
|
2589
|
-
})(
|
|
2591
|
+
})(N0)), N0.exports;
|
|
2590
2592
|
}
|
|
2591
|
-
var
|
|
2593
|
+
var U0 = { exports: {} }, Lt = U0.exports, Jr;
|
|
2592
2594
|
function a0() {
|
|
2593
|
-
return Jr || (Jr = 1, (function(r,
|
|
2595
|
+
return Jr || (Jr = 1, (function(r, v) {
|
|
2594
2596
|
(function(t, e, u) {
|
|
2595
2597
|
r.exports = e(M(), ye(), Ar());
|
|
2596
2598
|
})(Lt, function(t) {
|
|
@@ -2635,13 +2637,13 @@ function a0() {
|
|
|
2635
2637
|
* var key = kdf.compute(password, salt);
|
|
2636
2638
|
*/
|
|
2637
2639
|
compute: function(n, E) {
|
|
2638
|
-
for (var a, s = this.cfg, f = s.hasher.create(),
|
|
2640
|
+
for (var a, s = this.cfg, f = s.hasher.create(), p = m.create(), l = p.words, D = s.keySize, i = s.iterations; l.length < D; ) {
|
|
2639
2641
|
a && f.update(a), a = f.update(n).finalize(E), f.reset();
|
|
2640
2642
|
for (var o = 1; o < i; o++)
|
|
2641
2643
|
a = f.finalize(a), f.reset();
|
|
2642
|
-
|
|
2644
|
+
p.concat(a);
|
|
2643
2645
|
}
|
|
2644
|
-
return
|
|
2646
|
+
return p.sigBytes = D * 4, p;
|
|
2645
2647
|
}
|
|
2646
2648
|
});
|
|
2647
2649
|
e.EvpKDF = function(n, E, a) {
|
|
@@ -2649,11 +2651,11 @@ function a0() {
|
|
|
2649
2651
|
};
|
|
2650
2652
|
})(), t.EvpKDF;
|
|
2651
2653
|
});
|
|
2652
|
-
})(
|
|
2654
|
+
})(U0)), U0.exports;
|
|
2653
2655
|
}
|
|
2654
|
-
var
|
|
2655
|
-
function
|
|
2656
|
-
return re || (re = 1, (function(r,
|
|
2656
|
+
var j0 = { exports: {} }, Ot = j0.exports, re;
|
|
2657
|
+
function X() {
|
|
2658
|
+
return re || (re = 1, (function(r, v) {
|
|
2657
2659
|
(function(t, e, u) {
|
|
2658
2660
|
r.exports = e(M(), a0());
|
|
2659
2661
|
})(Ot, function(t) {
|
|
@@ -2778,15 +2780,15 @@ function K() {
|
|
|
2778
2780
|
*/
|
|
2779
2781
|
_createHelper: /* @__PURE__ */ (function() {
|
|
2780
2782
|
function F(w) {
|
|
2781
|
-
return typeof w == "string" ? R :
|
|
2783
|
+
return typeof w == "string" ? R : g;
|
|
2782
2784
|
}
|
|
2783
2785
|
return function(w) {
|
|
2784
2786
|
return {
|
|
2785
|
-
encrypt: function(H, $,
|
|
2786
|
-
return F($).encrypt(w, H, $,
|
|
2787
|
+
encrypt: function(H, $, z) {
|
|
2788
|
+
return F($).encrypt(w, H, $, z);
|
|
2787
2789
|
},
|
|
2788
|
-
decrypt: function(H, $,
|
|
2789
|
-
return F($).decrypt(w, H, $,
|
|
2790
|
+
decrypt: function(H, $, z) {
|
|
2791
|
+
return F($).decrypt(w, H, $, z);
|
|
2790
2792
|
}
|
|
2791
2793
|
};
|
|
2792
2794
|
};
|
|
@@ -2799,7 +2801,7 @@ function K() {
|
|
|
2799
2801
|
},
|
|
2800
2802
|
blockSize: 1
|
|
2801
2803
|
});
|
|
2802
|
-
var f = u.mode = {},
|
|
2804
|
+
var f = u.mode = {}, p = h.BlockCipherMode = m.extend({
|
|
2803
2805
|
/**
|
|
2804
2806
|
* Creates this mode for encryption.
|
|
2805
2807
|
*
|
|
@@ -2844,7 +2846,7 @@ function K() {
|
|
|
2844
2846
|
this._cipher = F, this._iv = w;
|
|
2845
2847
|
}
|
|
2846
2848
|
}), l = f.CBC = (function() {
|
|
2847
|
-
var F =
|
|
2849
|
+
var F = p.extend();
|
|
2848
2850
|
F.Encryptor = F.extend({
|
|
2849
2851
|
/**
|
|
2850
2852
|
* Processes the data block at offset.
|
|
@@ -2857,8 +2859,8 @@ function K() {
|
|
|
2857
2859
|
* mode.processBlock(data.words, offset);
|
|
2858
2860
|
*/
|
|
2859
2861
|
processBlock: function(H, $) {
|
|
2860
|
-
var
|
|
2861
|
-
w.call(this, H, $, O),
|
|
2862
|
+
var z = this._cipher, O = z.blockSize;
|
|
2863
|
+
w.call(this, H, $, O), z.encryptBlock(H, $), this._prevBlock = H.slice($, $ + O);
|
|
2862
2864
|
}
|
|
2863
2865
|
}), F.Decryptor = F.extend({
|
|
2864
2866
|
/**
|
|
@@ -2872,18 +2874,18 @@ function K() {
|
|
|
2872
2874
|
* mode.processBlock(data.words, offset);
|
|
2873
2875
|
*/
|
|
2874
2876
|
processBlock: function(H, $) {
|
|
2875
|
-
var
|
|
2876
|
-
|
|
2877
|
+
var z = this._cipher, O = z.blockSize, q = H.slice($, $ + O);
|
|
2878
|
+
z.decryptBlock(H, $), w.call(this, H, $, O), this._prevBlock = q;
|
|
2877
2879
|
}
|
|
2878
2880
|
});
|
|
2879
|
-
function w(H, $,
|
|
2881
|
+
function w(H, $, z) {
|
|
2880
2882
|
var O, q = this._iv;
|
|
2881
2883
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2882
|
-
for (var U = 0; U <
|
|
2884
|
+
for (var U = 0; U < z; U++)
|
|
2883
2885
|
H[$ + U] ^= O[U];
|
|
2884
2886
|
}
|
|
2885
2887
|
return F;
|
|
2886
|
-
})(),
|
|
2888
|
+
})(), D = u.pad = {}, i = D.Pkcs7 = {
|
|
2887
2889
|
/**
|
|
2888
2890
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2889
2891
|
*
|
|
@@ -2897,8 +2899,8 @@ function K() {
|
|
|
2897
2899
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2898
2900
|
*/
|
|
2899
2901
|
pad: function(F, w) {
|
|
2900
|
-
for (var H = w * 4, $ = H - F.sigBytes % H,
|
|
2901
|
-
O.push(
|
|
2902
|
+
for (var H = w * 4, $ = H - F.sigBytes % H, z = $ << 24 | $ << 16 | $ << 8 | $, O = [], q = 0; q < $; q += 4)
|
|
2903
|
+
O.push(z);
|
|
2902
2904
|
var U = B.create(O, $);
|
|
2903
2905
|
F.concat(U);
|
|
2904
2906
|
},
|
|
@@ -3020,7 +3022,7 @@ function K() {
|
|
|
3020
3022
|
var w, H = n.parse(F), $ = H.words;
|
|
3021
3023
|
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3022
3024
|
}
|
|
3023
|
-
},
|
|
3025
|
+
}, g = h.SerializableCipher = m.extend({
|
|
3024
3026
|
/**
|
|
3025
3027
|
* Configuration options.
|
|
3026
3028
|
*
|
|
@@ -3049,7 +3051,7 @@ function K() {
|
|
|
3049
3051
|
*/
|
|
3050
3052
|
encrypt: function(F, w, H, $) {
|
|
3051
3053
|
$ = this.cfg.extend($);
|
|
3052
|
-
var
|
|
3054
|
+
var z = F.createEncryptor(H, $), O = z.finalize(w), q = z.cfg;
|
|
3053
3055
|
return o.create({
|
|
3054
3056
|
ciphertext: O,
|
|
3055
3057
|
key: H,
|
|
@@ -3080,8 +3082,8 @@ function K() {
|
|
|
3080
3082
|
*/
|
|
3081
3083
|
decrypt: function(F, w, H, $) {
|
|
3082
3084
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3083
|
-
var
|
|
3084
|
-
return
|
|
3085
|
+
var z = F.createDecryptor(H, $).finalize(w.ciphertext);
|
|
3086
|
+
return z;
|
|
3085
3087
|
},
|
|
3086
3088
|
/**
|
|
3087
3089
|
* Converts serialized ciphertext to CipherParams,
|
|
@@ -3119,21 +3121,21 @@ function K() {
|
|
|
3119
3121
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3120
3122
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3121
3123
|
*/
|
|
3122
|
-
execute: function(F, w, H, $,
|
|
3123
|
-
if ($ || ($ = B.random(64 / 8)),
|
|
3124
|
-
var O = a.create({ keySize: w + H, hasher:
|
|
3124
|
+
execute: function(F, w, H, $, z) {
|
|
3125
|
+
if ($ || ($ = B.random(64 / 8)), z)
|
|
3126
|
+
var O = a.create({ keySize: w + H, hasher: z }).compute(F, $);
|
|
3125
3127
|
else
|
|
3126
3128
|
var O = a.create({ keySize: w + H }).compute(F, $);
|
|
3127
3129
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3128
3130
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3129
3131
|
}
|
|
3130
|
-
}, R = h.PasswordBasedCipher =
|
|
3132
|
+
}, R = h.PasswordBasedCipher = g.extend({
|
|
3131
3133
|
/**
|
|
3132
3134
|
* Configuration options.
|
|
3133
3135
|
*
|
|
3134
3136
|
* @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
|
|
3135
3137
|
*/
|
|
3136
|
-
cfg:
|
|
3138
|
+
cfg: g.cfg.extend({
|
|
3137
3139
|
kdf: k
|
|
3138
3140
|
}),
|
|
3139
3141
|
/**
|
|
@@ -3155,10 +3157,10 @@ function K() {
|
|
|
3155
3157
|
*/
|
|
3156
3158
|
encrypt: function(F, w, H, $) {
|
|
3157
3159
|
$ = this.cfg.extend($);
|
|
3158
|
-
var
|
|
3159
|
-
$.iv =
|
|
3160
|
-
var O =
|
|
3161
|
-
return O.mixIn(
|
|
3160
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, $.salt, $.hasher);
|
|
3161
|
+
$.iv = z.iv;
|
|
3162
|
+
var O = g.encrypt.call(this, F, w, z.key, $);
|
|
3163
|
+
return O.mixIn(z), O;
|
|
3162
3164
|
},
|
|
3163
3165
|
/**
|
|
3164
3166
|
* Decrypts serialized ciphertext using a password.
|
|
@@ -3179,21 +3181,21 @@ function K() {
|
|
|
3179
3181
|
*/
|
|
3180
3182
|
decrypt: function(F, w, H, $) {
|
|
3181
3183
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3182
|
-
var
|
|
3183
|
-
$.iv =
|
|
3184
|
-
var O =
|
|
3184
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, w.salt, $.hasher);
|
|
3185
|
+
$.iv = z.iv;
|
|
3186
|
+
var O = g.decrypt.call(this, F, w, z.key, $);
|
|
3185
3187
|
return O;
|
|
3186
3188
|
}
|
|
3187
3189
|
});
|
|
3188
3190
|
})();
|
|
3189
3191
|
});
|
|
3190
|
-
})(
|
|
3192
|
+
})(j0)), j0.exports;
|
|
3191
3193
|
}
|
|
3192
|
-
var
|
|
3194
|
+
var G0 = { exports: {} }, qt = G0.exports, ee;
|
|
3193
3195
|
function Tt() {
|
|
3194
|
-
return ee || (ee = 1, (function(r,
|
|
3196
|
+
return ee || (ee = 1, (function(r, v) {
|
|
3195
3197
|
(function(t, e, u) {
|
|
3196
|
-
r.exports = e(M(),
|
|
3198
|
+
r.exports = e(M(), X());
|
|
3197
3199
|
})(qt, function(t) {
|
|
3198
3200
|
return t.mode.CFB = (function() {
|
|
3199
3201
|
var e = t.lib.BlockCipherMode.extend();
|
|
@@ -3217,13 +3219,13 @@ function Tt() {
|
|
|
3217
3219
|
return e;
|
|
3218
3220
|
})(), t.mode.CFB;
|
|
3219
3221
|
});
|
|
3220
|
-
})(
|
|
3222
|
+
})(G0)), G0.exports;
|
|
3221
3223
|
}
|
|
3222
|
-
var
|
|
3224
|
+
var K0 = { exports: {} }, Mt = K0.exports, te;
|
|
3223
3225
|
function Nt() {
|
|
3224
|
-
return te || (te = 1, (function(r,
|
|
3226
|
+
return te || (te = 1, (function(r, v) {
|
|
3225
3227
|
(function(t, e, u) {
|
|
3226
|
-
r.exports = e(M(),
|
|
3228
|
+
r.exports = e(M(), X());
|
|
3227
3229
|
})(Mt, function(t) {
|
|
3228
3230
|
return t.mode.CTR = (function() {
|
|
3229
3231
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
@@ -3239,13 +3241,13 @@ function Nt() {
|
|
|
3239
3241
|
return e.Decryptor = u, e;
|
|
3240
3242
|
})(), t.mode.CTR;
|
|
3241
3243
|
});
|
|
3242
|
-
})(
|
|
3244
|
+
})(K0)), K0.exports;
|
|
3243
3245
|
}
|
|
3244
3246
|
var X0 = { exports: {} }, Ut = X0.exports, xe;
|
|
3245
3247
|
function jt() {
|
|
3246
|
-
return xe || (xe = 1, (function(r,
|
|
3248
|
+
return xe || (xe = 1, (function(r, v) {
|
|
3247
3249
|
(function(t, e, u) {
|
|
3248
|
-
r.exports = e(M(),
|
|
3250
|
+
r.exports = e(M(), X());
|
|
3249
3251
|
})(Ut, function(t) {
|
|
3250
3252
|
return t.mode.CTRGladman = (function() {
|
|
3251
3253
|
var e = t.lib.BlockCipherMode.extend();
|
|
@@ -3275,11 +3277,11 @@ function jt() {
|
|
|
3275
3277
|
});
|
|
3276
3278
|
})(X0)), X0.exports;
|
|
3277
3279
|
}
|
|
3278
|
-
var
|
|
3279
|
-
function
|
|
3280
|
-
return ne || (ne = 1, (function(r,
|
|
3280
|
+
var Y0 = { exports: {} }, Gt = Y0.exports, ne;
|
|
3281
|
+
function Kt() {
|
|
3282
|
+
return ne || (ne = 1, (function(r, v) {
|
|
3281
3283
|
(function(t, e, u) {
|
|
3282
|
-
r.exports = e(M(),
|
|
3284
|
+
r.exports = e(M(), X());
|
|
3283
3285
|
})(Gt, function(t) {
|
|
3284
3286
|
return t.mode.OFB = (function() {
|
|
3285
3287
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
@@ -3293,14 +3295,14 @@ function Xt() {
|
|
|
3293
3295
|
return e.Decryptor = u, e;
|
|
3294
3296
|
})(), t.mode.OFB;
|
|
3295
3297
|
});
|
|
3296
|
-
})(
|
|
3298
|
+
})(Y0)), Y0.exports;
|
|
3297
3299
|
}
|
|
3298
|
-
var Z0 = { exports: {} },
|
|
3299
|
-
function
|
|
3300
|
-
return ae || (ae = 1, (function(r,
|
|
3300
|
+
var Z0 = { exports: {} }, Xt = Z0.exports, ae;
|
|
3301
|
+
function Yt() {
|
|
3302
|
+
return ae || (ae = 1, (function(r, v) {
|
|
3301
3303
|
(function(t, e, u) {
|
|
3302
|
-
r.exports = e(M(),
|
|
3303
|
-
})(
|
|
3304
|
+
r.exports = e(M(), X());
|
|
3305
|
+
})(Xt, function(t) {
|
|
3304
3306
|
return t.mode.ECB = (function() {
|
|
3305
3307
|
var e = t.lib.BlockCipherMode.extend();
|
|
3306
3308
|
return e.Encryptor = e.extend({
|
|
@@ -3316,12 +3318,12 @@ function Zt() {
|
|
|
3316
3318
|
});
|
|
3317
3319
|
})(Z0)), Z0.exports;
|
|
3318
3320
|
}
|
|
3319
|
-
var
|
|
3321
|
+
var Q0 = { exports: {} }, Zt = Q0.exports, oe;
|
|
3320
3322
|
function Qt() {
|
|
3321
|
-
return oe || (oe = 1, (function(r,
|
|
3323
|
+
return oe || (oe = 1, (function(r, v) {
|
|
3322
3324
|
(function(t, e, u) {
|
|
3323
|
-
r.exports = e(M(),
|
|
3324
|
-
})(
|
|
3325
|
+
r.exports = e(M(), X());
|
|
3326
|
+
})(Zt, function(t) {
|
|
3325
3327
|
return t.pad.AnsiX923 = {
|
|
3326
3328
|
pad: function(e, u) {
|
|
3327
3329
|
var h = e.sigBytes, m = u * 4, B = m - h % m, C = h + B - 1;
|
|
@@ -3333,13 +3335,13 @@ function Qt() {
|
|
|
3333
3335
|
}
|
|
3334
3336
|
}, t.pad.Ansix923;
|
|
3335
3337
|
});
|
|
3336
|
-
})(
|
|
3338
|
+
})(Q0)), Q0.exports;
|
|
3337
3339
|
}
|
|
3338
|
-
var
|
|
3340
|
+
var V0 = { exports: {} }, Vt = V0.exports, ie;
|
|
3339
3341
|
function Jt() {
|
|
3340
|
-
return ie || (ie = 1, (function(r,
|
|
3342
|
+
return ie || (ie = 1, (function(r, v) {
|
|
3341
3343
|
(function(t, e, u) {
|
|
3342
|
-
r.exports = e(M(),
|
|
3344
|
+
r.exports = e(M(), X());
|
|
3343
3345
|
})(Vt, function(t) {
|
|
3344
3346
|
return t.pad.Iso10126 = {
|
|
3345
3347
|
pad: function(e, u) {
|
|
@@ -3352,13 +3354,13 @@ function Jt() {
|
|
|
3352
3354
|
}
|
|
3353
3355
|
}, t.pad.Iso10126;
|
|
3354
3356
|
});
|
|
3355
|
-
})(
|
|
3357
|
+
})(V0)), V0.exports;
|
|
3356
3358
|
}
|
|
3357
|
-
var
|
|
3359
|
+
var J0 = { exports: {} }, rx = J0.exports, se;
|
|
3358
3360
|
function ex() {
|
|
3359
|
-
return se || (se = 1, (function(r,
|
|
3361
|
+
return se || (se = 1, (function(r, v) {
|
|
3360
3362
|
(function(t, e, u) {
|
|
3361
|
-
r.exports = e(M(),
|
|
3363
|
+
r.exports = e(M(), X());
|
|
3362
3364
|
})(rx, function(t) {
|
|
3363
3365
|
return t.pad.Iso97971 = {
|
|
3364
3366
|
pad: function(e, u) {
|
|
@@ -3369,13 +3371,13 @@ function ex() {
|
|
|
3369
3371
|
}
|
|
3370
3372
|
}, t.pad.Iso97971;
|
|
3371
3373
|
});
|
|
3372
|
-
})(
|
|
3374
|
+
})(J0)), J0.exports;
|
|
3373
3375
|
}
|
|
3374
|
-
var
|
|
3376
|
+
var rr = { exports: {} }, tx = rr.exports, ce;
|
|
3375
3377
|
function xx() {
|
|
3376
|
-
return ce || (ce = 1, (function(r,
|
|
3378
|
+
return ce || (ce = 1, (function(r, v) {
|
|
3377
3379
|
(function(t, e, u) {
|
|
3378
|
-
r.exports = e(M(),
|
|
3380
|
+
r.exports = e(M(), X());
|
|
3379
3381
|
})(tx, function(t) {
|
|
3380
3382
|
return t.pad.ZeroPadding = {
|
|
3381
3383
|
pad: function(e, u) {
|
|
@@ -3391,13 +3393,13 @@ function xx() {
|
|
|
3391
3393
|
}
|
|
3392
3394
|
}, t.pad.ZeroPadding;
|
|
3393
3395
|
});
|
|
3394
|
-
})(
|
|
3396
|
+
})(rr)), rr.exports;
|
|
3395
3397
|
}
|
|
3396
|
-
var
|
|
3398
|
+
var er = { exports: {} }, nx = er.exports, fe;
|
|
3397
3399
|
function ax() {
|
|
3398
|
-
return fe || (fe = 1, (function(r,
|
|
3400
|
+
return fe || (fe = 1, (function(r, v) {
|
|
3399
3401
|
(function(t, e, u) {
|
|
3400
|
-
r.exports = e(M(),
|
|
3402
|
+
r.exports = e(M(), X());
|
|
3401
3403
|
})(nx, function(t) {
|
|
3402
3404
|
return t.pad.NoPadding = {
|
|
3403
3405
|
pad: function() {
|
|
@@ -3406,13 +3408,13 @@ function ax() {
|
|
|
3406
3408
|
}
|
|
3407
3409
|
}, t.pad.NoPadding;
|
|
3408
3410
|
});
|
|
3409
|
-
})(
|
|
3411
|
+
})(er)), er.exports;
|
|
3410
3412
|
}
|
|
3411
|
-
var
|
|
3413
|
+
var tr = { exports: {} }, ox = tr.exports, ue;
|
|
3412
3414
|
function ix() {
|
|
3413
|
-
return ue || (ue = 1, (function(r,
|
|
3415
|
+
return ue || (ue = 1, (function(r, v) {
|
|
3414
3416
|
(function(t, e, u) {
|
|
3415
|
-
r.exports = e(M(),
|
|
3417
|
+
r.exports = e(M(), X());
|
|
3416
3418
|
})(ox, function(t) {
|
|
3417
3419
|
return (function(e) {
|
|
3418
3420
|
var u = t, h = u.lib, m = h.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
@@ -3453,41 +3455,41 @@ function ix() {
|
|
|
3453
3455
|
};
|
|
3454
3456
|
})(), t.format.Hex;
|
|
3455
3457
|
});
|
|
3456
|
-
})(
|
|
3458
|
+
})(tr)), tr.exports;
|
|
3457
3459
|
}
|
|
3458
|
-
var
|
|
3460
|
+
var xr = { exports: {} }, sx = xr.exports, de;
|
|
3459
3461
|
function cx() {
|
|
3460
|
-
return de || (de = 1, (function(r,
|
|
3462
|
+
return de || (de = 1, (function(r, v) {
|
|
3461
3463
|
(function(t, e, u) {
|
|
3462
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
3464
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3463
3465
|
})(sx, function(t) {
|
|
3464
3466
|
return (function() {
|
|
3465
|
-
var e = t, u = e.lib, h = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [],
|
|
3467
|
+
var e = t, u = e.lib, h = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], p = [], l = [];
|
|
3466
3468
|
(function() {
|
|
3467
3469
|
for (var o = [], d = 0; d < 256; d++)
|
|
3468
3470
|
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
3469
|
-
for (var b = 0,
|
|
3470
|
-
var y =
|
|
3471
|
+
for (var b = 0, g = 0, d = 0; d < 256; d++) {
|
|
3472
|
+
var y = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4;
|
|
3471
3473
|
y = y >>> 8 ^ y & 255 ^ 99, B[b] = y, C[y] = b;
|
|
3472
3474
|
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3473
3475
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3474
3476
|
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3475
|
-
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16,
|
|
3477
|
+
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, p[y] = w << 8 | w >>> 24, l[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], g ^= o[o[g]]) : b = g = 1;
|
|
3476
3478
|
}
|
|
3477
3479
|
})();
|
|
3478
|
-
var
|
|
3480
|
+
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES = h.extend({
|
|
3479
3481
|
_doReset: function() {
|
|
3480
3482
|
var o;
|
|
3481
3483
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3482
|
-
for (var d = this._keyPriorReset = this._key, b = d.words,
|
|
3483
|
-
F <
|
|
3484
|
+
for (var d = this._keyPriorReset = this._key, b = d.words, g = d.sigBytes / 4, y = this._nRounds = g + 6, k = (y + 1) * 4, R = this._keySchedule = [], F = 0; F < k; F++)
|
|
3485
|
+
F < g ? R[F] = b[F] : (o = R[F - 1], F % g ? g > 6 && F % g == 4 && (o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255]) : (o = o << 8 | o >>> 24, o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255], o ^= D[F / g | 0] << 24), R[F] = R[F - g] ^ o);
|
|
3484
3486
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3485
3487
|
var F = k - H;
|
|
3486
3488
|
if (H % 4)
|
|
3487
3489
|
var o = R[F];
|
|
3488
3490
|
else
|
|
3489
3491
|
var o = R[F - 4];
|
|
3490
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^
|
|
3492
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^ p[B[o >>> 8 & 255]] ^ l[B[o & 255]];
|
|
3491
3493
|
}
|
|
3492
3494
|
}
|
|
3493
3495
|
},
|
|
@@ -3496,16 +3498,16 @@ function cx() {
|
|
|
3496
3498
|
},
|
|
3497
3499
|
decryptBlock: function(o, d) {
|
|
3498
3500
|
var b = o[d + 1];
|
|
3499
|
-
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f,
|
|
3501
|
+
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f, p, l, C);
|
|
3500
3502
|
var b = o[d + 1];
|
|
3501
3503
|
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3502
3504
|
},
|
|
3503
|
-
_doCryptBlock: function(o, d, b,
|
|
3504
|
-
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1],
|
|
3505
|
-
var T =
|
|
3506
|
-
H = T, $ = N,
|
|
3505
|
+
_doCryptBlock: function(o, d, b, g, y, k, R, F) {
|
|
3506
|
+
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++) {
|
|
3507
|
+
var T = g[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[z >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = g[$ >>> 24] ^ y[z >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = g[z >>> 24] ^ y[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ R[$ & 255] ^ b[q++], S = g[O >>> 24] ^ y[H >>> 16 & 255] ^ k[$ >>> 8 & 255] ^ R[z & 255] ^ b[q++];
|
|
3508
|
+
H = T, $ = N, z = j, O = S;
|
|
3507
3509
|
}
|
|
3508
|
-
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[
|
|
3510
|
+
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++];
|
|
3509
3511
|
o[d] = T, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3510
3512
|
},
|
|
3511
3513
|
keySize: 256 / 32
|
|
@@ -3513,13 +3515,13 @@ function cx() {
|
|
|
3513
3515
|
e.AES = h._createHelper(i);
|
|
3514
3516
|
})(), t.AES;
|
|
3515
3517
|
});
|
|
3516
|
-
})(
|
|
3518
|
+
})(xr)), xr.exports;
|
|
3517
3519
|
}
|
|
3518
|
-
var
|
|
3520
|
+
var nr = { exports: {} }, fx = nr.exports, le;
|
|
3519
3521
|
function ux() {
|
|
3520
|
-
return le || (le = 1, (function(r,
|
|
3522
|
+
return le || (le = 1, (function(r, v) {
|
|
3521
3523
|
(function(t, e, u) {
|
|
3522
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
3524
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3523
3525
|
})(fx, function(t) {
|
|
3524
3526
|
return (function() {
|
|
3525
3527
|
var e = t, u = e.lib, h = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
@@ -4168,12 +4170,12 @@ function ux() {
|
|
|
4168
4170
|
2147483679
|
|
4169
4171
|
], s = B.DES = m.extend({
|
|
4170
4172
|
_doReset: function() {
|
|
4171
|
-
for (var
|
|
4173
|
+
for (var D = this._key, i = D.words, o = [], d = 0; d < 56; d++) {
|
|
4172
4174
|
var b = C[d] - 1;
|
|
4173
4175
|
o[d] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4174
4176
|
}
|
|
4175
|
-
for (var
|
|
4176
|
-
for (var k =
|
|
4177
|
+
for (var g = this._subKeys = [], y = 0; y < 16; y++) {
|
|
4178
|
+
for (var k = g[y] = [], R = n[y], d = 0; d < 24; d++)
|
|
4177
4179
|
k[d / 6 | 0] |= o[(x[d] - 1 + R) % 28] << 31 - d % 6, k[4 + (d / 6 | 0)] |= o[28 + (x[d + 24] - 1 + R) % 28] << 31 - d % 6;
|
|
4178
4180
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4179
4181
|
for (var d = 1; d < 7; d++)
|
|
@@ -4181,50 +4183,50 @@ function ux() {
|
|
|
4181
4183
|
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
4182
4184
|
}
|
|
4183
4185
|
for (var F = this._invSubKeys = [], d = 0; d < 16; d++)
|
|
4184
|
-
F[d] =
|
|
4186
|
+
F[d] = g[15 - d];
|
|
4185
4187
|
},
|
|
4186
|
-
encryptBlock: function(
|
|
4187
|
-
this._doCryptBlock(
|
|
4188
|
+
encryptBlock: function(D, i) {
|
|
4189
|
+
this._doCryptBlock(D, i, this._subKeys);
|
|
4188
4190
|
},
|
|
4189
|
-
decryptBlock: function(
|
|
4190
|
-
this._doCryptBlock(
|
|
4191
|
+
decryptBlock: function(D, i) {
|
|
4192
|
+
this._doCryptBlock(D, i, this._invSubKeys);
|
|
4191
4193
|
},
|
|
4192
|
-
_doCryptBlock: function(
|
|
4193
|
-
this._lBlock =
|
|
4194
|
+
_doCryptBlock: function(D, i, o) {
|
|
4195
|
+
this._lBlock = D[i], this._rBlock = D[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535), p.call(this, 2, 858993459), p.call(this, 8, 16711935), f.call(this, 1, 1431655765);
|
|
4194
4196
|
for (var d = 0; d < 16; d++) {
|
|
4195
|
-
for (var b = o[d],
|
|
4197
|
+
for (var b = o[d], g = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4196
4198
|
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4197
|
-
this._lBlock = y, this._rBlock =
|
|
4199
|
+
this._lBlock = y, this._rBlock = g ^ k;
|
|
4198
4200
|
}
|
|
4199
4201
|
var F = this._lBlock;
|
|
4200
|
-
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765),
|
|
4202
|
+
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765), p.call(this, 8, 16711935), p.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135), D[i] = this._lBlock, D[i + 1] = this._rBlock;
|
|
4201
4203
|
},
|
|
4202
4204
|
keySize: 64 / 32,
|
|
4203
4205
|
ivSize: 64 / 32,
|
|
4204
4206
|
blockSize: 64 / 32
|
|
4205
4207
|
});
|
|
4206
|
-
function f(
|
|
4207
|
-
var o = (this._lBlock >>>
|
|
4208
|
-
this._rBlock ^= o, this._lBlock ^= o <<
|
|
4208
|
+
function f(D, i) {
|
|
4209
|
+
var o = (this._lBlock >>> D ^ this._rBlock) & i;
|
|
4210
|
+
this._rBlock ^= o, this._lBlock ^= o << D;
|
|
4209
4211
|
}
|
|
4210
|
-
function
|
|
4211
|
-
var o = (this._rBlock >>>
|
|
4212
|
-
this._lBlock ^= o, this._rBlock ^= o <<
|
|
4212
|
+
function p(D, i) {
|
|
4213
|
+
var o = (this._rBlock >>> D ^ this._lBlock) & i;
|
|
4214
|
+
this._lBlock ^= o, this._rBlock ^= o << D;
|
|
4213
4215
|
}
|
|
4214
4216
|
e.DES = m._createHelper(s);
|
|
4215
4217
|
var l = B.TripleDES = m.extend({
|
|
4216
4218
|
_doReset: function() {
|
|
4217
|
-
var
|
|
4219
|
+
var D = this._key, i = D.words;
|
|
4218
4220
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4219
4221
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4220
4222
|
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);
|
|
4221
4223
|
this._des1 = s.createEncryptor(h.create(o)), this._des2 = s.createEncryptor(h.create(d)), this._des3 = s.createEncryptor(h.create(b));
|
|
4222
4224
|
},
|
|
4223
|
-
encryptBlock: function(
|
|
4224
|
-
this._des1.encryptBlock(
|
|
4225
|
+
encryptBlock: function(D, i) {
|
|
4226
|
+
this._des1.encryptBlock(D, i), this._des2.decryptBlock(D, i), this._des3.encryptBlock(D, i);
|
|
4225
4227
|
},
|
|
4226
|
-
decryptBlock: function(
|
|
4227
|
-
this._des3.decryptBlock(
|
|
4228
|
+
decryptBlock: function(D, i) {
|
|
4229
|
+
this._des3.decryptBlock(D, i), this._des2.encryptBlock(D, i), this._des1.decryptBlock(D, i);
|
|
4228
4230
|
},
|
|
4229
4231
|
keySize: 192 / 32,
|
|
4230
4232
|
ivSize: 64 / 32,
|
|
@@ -4233,24 +4235,24 @@ function ux() {
|
|
|
4233
4235
|
e.TripleDES = m._createHelper(l);
|
|
4234
4236
|
})(), t.TripleDES;
|
|
4235
4237
|
});
|
|
4236
|
-
})(
|
|
4238
|
+
})(nr)), nr.exports;
|
|
4237
4239
|
}
|
|
4238
|
-
var
|
|
4240
|
+
var ar = { exports: {} }, dx = ar.exports, he;
|
|
4239
4241
|
function lx() {
|
|
4240
|
-
return he || (he = 1, (function(r,
|
|
4242
|
+
return he || (he = 1, (function(r, v) {
|
|
4241
4243
|
(function(t, e, u) {
|
|
4242
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4244
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4243
4245
|
})(dx, function(t) {
|
|
4244
4246
|
return (function() {
|
|
4245
4247
|
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = m.RC4 = h.extend({
|
|
4246
4248
|
_doReset: function() {
|
|
4247
4249
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4248
4250
|
s[f] = f;
|
|
4249
|
-
for (var f = 0,
|
|
4250
|
-
var l = f % a,
|
|
4251
|
-
|
|
4251
|
+
for (var f = 0, p = 0; f < 256; f++) {
|
|
4252
|
+
var l = f % a, D = E[l >>> 2] >>> 24 - l % 4 * 8 & 255;
|
|
4253
|
+
p = (p + s[f] + D) % 256;
|
|
4252
4254
|
var i = s[f];
|
|
4253
|
-
s[f] = s[
|
|
4255
|
+
s[f] = s[p], s[p] = i;
|
|
4254
4256
|
}
|
|
4255
4257
|
this._i = this._j = 0;
|
|
4256
4258
|
},
|
|
@@ -4263,8 +4265,8 @@ function lx() {
|
|
|
4263
4265
|
function C() {
|
|
4264
4266
|
for (var n = this._S, E = this._i, a = this._j, s = 0, f = 0; f < 4; f++) {
|
|
4265
4267
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4266
|
-
var
|
|
4267
|
-
n[E] = n[a], n[a] =
|
|
4268
|
+
var p = n[E];
|
|
4269
|
+
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 - f * 8;
|
|
4268
4270
|
}
|
|
4269
4271
|
return this._i = E, this._j = a, s;
|
|
4270
4272
|
}
|
|
@@ -4287,20 +4289,20 @@ function lx() {
|
|
|
4287
4289
|
e.RC4Drop = h._createHelper(x);
|
|
4288
4290
|
})(), t.RC4;
|
|
4289
4291
|
});
|
|
4290
|
-
})(
|
|
4292
|
+
})(ar)), ar.exports;
|
|
4291
4293
|
}
|
|
4292
|
-
var
|
|
4294
|
+
var or = { exports: {} }, hx = or.exports, ve;
|
|
4293
4295
|
function vx() {
|
|
4294
|
-
return ve || (ve = 1, (function(r,
|
|
4296
|
+
return ve || (ve = 1, (function(r, v) {
|
|
4295
4297
|
(function(t, e, u) {
|
|
4296
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4298
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4297
4299
|
})(hx, function(t) {
|
|
4298
4300
|
return (function() {
|
|
4299
4301
|
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = h.extend({
|
|
4300
4302
|
_doReset: function() {
|
|
4301
4303
|
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4302
4304
|
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
4303
|
-
var
|
|
4305
|
+
var p = this._X = [
|
|
4304
4306
|
a[0],
|
|
4305
4307
|
a[3] << 16 | a[2] >>> 16,
|
|
4306
4308
|
a[1],
|
|
@@ -4323,10 +4325,10 @@ function vx() {
|
|
|
4323
4325
|
for (var f = 0; f < 4; f++)
|
|
4324
4326
|
E.call(this);
|
|
4325
4327
|
for (var f = 0; f < 8; f++)
|
|
4326
|
-
l[f] ^=
|
|
4328
|
+
l[f] ^= p[f + 4 & 7];
|
|
4327
4329
|
if (s) {
|
|
4328
|
-
var
|
|
4329
|
-
l[0] ^= d, l[1] ^=
|
|
4330
|
+
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4331
|
+
l[0] ^= d, l[1] ^= g, l[2] ^= b, l[3] ^= y, l[4] ^= d, l[5] ^= g, l[6] ^= b, l[7] ^= y;
|
|
4330
4332
|
for (var f = 0; f < 4; f++)
|
|
4331
4333
|
E.call(this);
|
|
4332
4334
|
}
|
|
@@ -4334,8 +4336,8 @@ function vx() {
|
|
|
4334
4336
|
_doProcessBlock: function(a, s) {
|
|
4335
4337
|
var f = this._X;
|
|
4336
4338
|
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;
|
|
4337
|
-
for (var
|
|
4338
|
-
B[
|
|
4339
|
+
for (var p = 0; p < 4; p++)
|
|
4340
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4339
4341
|
},
|
|
4340
4342
|
blockSize: 128 / 32,
|
|
4341
4343
|
ivSize: 64 / 32
|
|
@@ -4345,7 +4347,7 @@ function vx() {
|
|
|
4345
4347
|
C[f] = s[f];
|
|
4346
4348
|
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;
|
|
4347
4349
|
for (var f = 0; f < 8; f++) {
|
|
4348
|
-
var
|
|
4350
|
+
var p = a[f] + s[f], l = p & 65535, D = p >>> 16, i = ((l * l >>> 17) + l * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4349
4351
|
x[f] = i ^ o;
|
|
4350
4352
|
}
|
|
4351
4353
|
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;
|
|
@@ -4353,13 +4355,13 @@ function vx() {
|
|
|
4353
4355
|
e.Rabbit = h._createHelper(n);
|
|
4354
4356
|
})(), t.Rabbit;
|
|
4355
4357
|
});
|
|
4356
|
-
})(
|
|
4358
|
+
})(or)), or.exports;
|
|
4357
4359
|
}
|
|
4358
|
-
var
|
|
4360
|
+
var ir = { exports: {} }, px = ir.exports, pe;
|
|
4359
4361
|
function Bx() {
|
|
4360
|
-
return pe || (pe = 1, (function(r,
|
|
4362
|
+
return pe || (pe = 1, (function(r, v) {
|
|
4361
4363
|
(function(t, e, u) {
|
|
4362
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4364
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4363
4365
|
})(px, function(t) {
|
|
4364
4366
|
return (function() {
|
|
4365
4367
|
var e = t, u = e.lib, h = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = h.extend({
|
|
@@ -4373,7 +4375,7 @@ function Bx() {
|
|
|
4373
4375
|
a[1] << 16 | a[0] >>> 16,
|
|
4374
4376
|
a[3],
|
|
4375
4377
|
a[2] << 16 | a[1] >>> 16
|
|
4376
|
-
],
|
|
4378
|
+
], p = this._C = [
|
|
4377
4379
|
a[2] << 16 | a[2] >>> 16,
|
|
4378
4380
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4379
4381
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4387,10 +4389,10 @@ function Bx() {
|
|
|
4387
4389
|
for (var l = 0; l < 4; l++)
|
|
4388
4390
|
E.call(this);
|
|
4389
4391
|
for (var l = 0; l < 8; l++)
|
|
4390
|
-
|
|
4392
|
+
p[l] ^= f[l + 4 & 7];
|
|
4391
4393
|
if (s) {
|
|
4392
|
-
var
|
|
4393
|
-
|
|
4394
|
+
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4395
|
+
p[0] ^= d, p[1] ^= g, p[2] ^= b, p[3] ^= y, p[4] ^= d, p[5] ^= g, p[6] ^= b, p[7] ^= y;
|
|
4394
4396
|
for (var l = 0; l < 4; l++)
|
|
4395
4397
|
E.call(this);
|
|
4396
4398
|
}
|
|
@@ -4398,8 +4400,8 @@ function Bx() {
|
|
|
4398
4400
|
_doProcessBlock: function(a, s) {
|
|
4399
4401
|
var f = this._X;
|
|
4400
4402
|
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;
|
|
4401
|
-
for (var
|
|
4402
|
-
B[
|
|
4403
|
+
for (var p = 0; p < 4; p++)
|
|
4404
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4403
4405
|
},
|
|
4404
4406
|
blockSize: 128 / 32,
|
|
4405
4407
|
ivSize: 64 / 32
|
|
@@ -4409,7 +4411,7 @@ function Bx() {
|
|
|
4409
4411
|
C[f] = s[f];
|
|
4410
4412
|
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;
|
|
4411
4413
|
for (var f = 0; f < 8; f++) {
|
|
4412
|
-
var
|
|
4414
|
+
var p = a[f] + s[f], l = p & 65535, D = p >>> 16, i = ((l * l >>> 17) + l * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4413
4415
|
x[f] = i ^ o;
|
|
4414
4416
|
}
|
|
4415
4417
|
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;
|
|
@@ -4417,13 +4419,13 @@ function Bx() {
|
|
|
4417
4419
|
e.RabbitLegacy = h._createHelper(n);
|
|
4418
4420
|
})(), t.RabbitLegacy;
|
|
4419
4421
|
});
|
|
4420
|
-
})(
|
|
4422
|
+
})(ir)), ir.exports;
|
|
4421
4423
|
}
|
|
4422
|
-
var
|
|
4424
|
+
var sr = { exports: {} }, Cx = sr.exports, Be;
|
|
4423
4425
|
function Ex() {
|
|
4424
|
-
return Be || (Be = 1, (function(r,
|
|
4426
|
+
return Be || (Be = 1, (function(r, v) {
|
|
4425
4427
|
(function(t, e, u) {
|
|
4426
|
-
r.exports = e(M(), i0(), s0(), a0(),
|
|
4428
|
+
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4427
4429
|
})(Cx, function(t) {
|
|
4428
4430
|
return (function() {
|
|
4429
4431
|
var e = t, u = e.lib, h = u.BlockCipher, m = e.algo;
|
|
@@ -5484,23 +5486,23 @@ function Ex() {
|
|
|
5484
5486
|
pbox: [],
|
|
5485
5487
|
sbox: []
|
|
5486
5488
|
};
|
|
5487
|
-
function E(l,
|
|
5488
|
-
let i =
|
|
5489
|
-
return
|
|
5489
|
+
function E(l, D) {
|
|
5490
|
+
let i = D >> 24 & 255, o = D >> 16 & 255, d = D >> 8 & 255, b = D & 255, g = l.sbox[0][i] + l.sbox[1][o];
|
|
5491
|
+
return g = g ^ l.sbox[2][d], g = g + l.sbox[3][b], g;
|
|
5490
5492
|
}
|
|
5491
|
-
function a(l,
|
|
5492
|
-
let o =
|
|
5493
|
-
for (let
|
|
5494
|
-
o = o ^ l.pbox[
|
|
5493
|
+
function a(l, D, i) {
|
|
5494
|
+
let o = D, d = i, b;
|
|
5495
|
+
for (let g = 0; g < B; ++g)
|
|
5496
|
+
o = o ^ l.pbox[g], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5495
5497
|
return b = o, o = d, d = b, d = d ^ l.pbox[B], o = o ^ l.pbox[B + 1], { left: o, right: d };
|
|
5496
5498
|
}
|
|
5497
|
-
function s(l,
|
|
5498
|
-
let o =
|
|
5499
|
-
for (let
|
|
5500
|
-
o = o ^ l.pbox[
|
|
5499
|
+
function s(l, D, i) {
|
|
5500
|
+
let o = D, d = i, b;
|
|
5501
|
+
for (let g = B + 1; g > 1; --g)
|
|
5502
|
+
o = o ^ l.pbox[g], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5501
5503
|
return b = o, o = d, d = b, d = d ^ l.pbox[1], o = o ^ l.pbox[0], { left: o, right: d };
|
|
5502
5504
|
}
|
|
5503
|
-
function f(l,
|
|
5505
|
+
function f(l, D, i) {
|
|
5504
5506
|
for (let y = 0; y < 4; y++) {
|
|
5505
5507
|
l.sbox[y] = [];
|
|
5506
5508
|
for (let k = 0; k < 256; k++)
|
|
@@ -5508,56 +5510,56 @@ function Ex() {
|
|
|
5508
5510
|
}
|
|
5509
5511
|
let o = 0;
|
|
5510
5512
|
for (let y = 0; y < B + 2; y++)
|
|
5511
|
-
l.pbox[y] = C[y] ^
|
|
5512
|
-
let d = 0, b = 0,
|
|
5513
|
+
l.pbox[y] = C[y] ^ D[o], o++, o >= i && (o = 0);
|
|
5514
|
+
let d = 0, b = 0, g = 0;
|
|
5513
5515
|
for (let y = 0; y < B + 2; y += 2)
|
|
5514
|
-
|
|
5516
|
+
g = a(l, d, b), d = g.left, b = g.right, l.pbox[y] = d, l.pbox[y + 1] = b;
|
|
5515
5517
|
for (let y = 0; y < 4; y++)
|
|
5516
5518
|
for (let k = 0; k < 256; k += 2)
|
|
5517
|
-
|
|
5519
|
+
g = a(l, d, b), d = g.left, b = g.right, l.sbox[y][k] = d, l.sbox[y][k + 1] = b;
|
|
5518
5520
|
return !0;
|
|
5519
5521
|
}
|
|
5520
|
-
var
|
|
5522
|
+
var p = m.Blowfish = h.extend({
|
|
5521
5523
|
_doReset: function() {
|
|
5522
5524
|
if (this._keyPriorReset !== this._key) {
|
|
5523
|
-
var l = this._keyPriorReset = this._key,
|
|
5524
|
-
f(n,
|
|
5525
|
+
var l = this._keyPriorReset = this._key, D = l.words, i = l.sigBytes / 4;
|
|
5526
|
+
f(n, D, i);
|
|
5525
5527
|
}
|
|
5526
5528
|
},
|
|
5527
|
-
encryptBlock: function(l,
|
|
5528
|
-
var i = a(n, l[
|
|
5529
|
-
l[
|
|
5529
|
+
encryptBlock: function(l, D) {
|
|
5530
|
+
var i = a(n, l[D], l[D + 1]);
|
|
5531
|
+
l[D] = i.left, l[D + 1] = i.right;
|
|
5530
5532
|
},
|
|
5531
|
-
decryptBlock: function(l,
|
|
5532
|
-
var i = s(n, l[
|
|
5533
|
-
l[
|
|
5533
|
+
decryptBlock: function(l, D) {
|
|
5534
|
+
var i = s(n, l[D], l[D + 1]);
|
|
5535
|
+
l[D] = i.left, l[D + 1] = i.right;
|
|
5534
5536
|
},
|
|
5535
5537
|
blockSize: 64 / 32,
|
|
5536
5538
|
keySize: 128 / 32,
|
|
5537
5539
|
ivSize: 64 / 32
|
|
5538
5540
|
});
|
|
5539
|
-
e.Blowfish = h._createHelper(
|
|
5541
|
+
e.Blowfish = h._createHelper(p);
|
|
5540
5542
|
})(), t.Blowfish;
|
|
5541
5543
|
});
|
|
5542
|
-
})(
|
|
5544
|
+
})(sr)), sr.exports;
|
|
5543
5545
|
}
|
|
5544
|
-
var Ax =
|
|
5546
|
+
var Ax = y0.exports, Ce;
|
|
5545
5547
|
function Fx() {
|
|
5546
|
-
return Ce || (Ce = 1, (function(r,
|
|
5548
|
+
return Ce || (Ce = 1, (function(r, v) {
|
|
5547
5549
|
(function(t, e, u) {
|
|
5548
|
-
r.exports = e(M(), ur(), Bt(), Et(), i0(),
|
|
5550
|
+
r.exports = e(M(), ur(), Bt(), Et(), i0(), gt(), s0(), ye(), Er(), yt(), we(), St(), $t(), Pt(), Ar(), It(), a0(), X(), Tt(), Nt(), jt(), Kt(), Yt(), Qt(), Jt(), ex(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex());
|
|
5549
5551
|
})(Ax, function(t) {
|
|
5550
5552
|
return t;
|
|
5551
5553
|
});
|
|
5552
|
-
})(
|
|
5554
|
+
})(y0)), y0.exports;
|
|
5553
5555
|
}
|
|
5554
5556
|
Fx();
|
|
5555
5557
|
let ke = null, Se = null, He = null, $e = null;
|
|
5556
5558
|
Math.random().toString(36).substring(7);
|
|
5557
|
-
function
|
|
5559
|
+
function gx(r) {
|
|
5558
5560
|
ke = r.token, Se = r.apiUrl, He = r.deviceId, $e = r.domain;
|
|
5559
5561
|
}
|
|
5560
|
-
function
|
|
5562
|
+
function Dx() {
|
|
5561
5563
|
return {
|
|
5562
5564
|
token: ke,
|
|
5563
5565
|
apiUrl: Se,
|
|
@@ -5566,11 +5568,11 @@ function gx() {
|
|
|
5566
5568
|
};
|
|
5567
5569
|
}
|
|
5568
5570
|
function bx(r) {
|
|
5569
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5571
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.143`;
|
|
5570
5572
|
}
|
|
5571
|
-
function mx(r,
|
|
5573
|
+
function mx(r, v) {
|
|
5572
5574
|
const t = bx(r);
|
|
5573
|
-
return new Worker(t, { type: "module", ...
|
|
5575
|
+
return new Worker(t, { type: "module", ...v });
|
|
5574
5576
|
}
|
|
5575
5577
|
const Fr = () => {
|
|
5576
5578
|
try {
|
|
@@ -5578,15 +5580,15 @@ const Fr = () => {
|
|
|
5578
5580
|
} catch {
|
|
5579
5581
|
}
|
|
5580
5582
|
return !1;
|
|
5581
|
-
},
|
|
5583
|
+
}, m0 = (...r) => {
|
|
5582
5584
|
Fr();
|
|
5583
5585
|
}, Ee = (...r) => {
|
|
5584
5586
|
Fr();
|
|
5585
5587
|
}, Ae = /* @__PURE__ */ new Map(), pr = /* @__PURE__ */ new Map();
|
|
5586
5588
|
let _x = 0;
|
|
5587
5589
|
function yx(r) {
|
|
5588
|
-
const
|
|
5589
|
-
if (
|
|
5590
|
+
const v = Ae.get(r);
|
|
5591
|
+
if (v) return v;
|
|
5590
5592
|
const t = mx("./deform.worker.ts");
|
|
5591
5593
|
try {
|
|
5592
5594
|
t.postMessage({ type: "SET_DEBUG", debugRender: Fr() });
|
|
@@ -5594,7 +5596,7 @@ function yx(r) {
|
|
|
5594
5596
|
}
|
|
5595
5597
|
t.onmessage = (u) => {
|
|
5596
5598
|
const { id: h, imageBitmap: m, error: B, duration: C } = u.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5597
|
-
|
|
5599
|
+
m0(`[renderService] deform worker 响应 id=${h}${x}`, {
|
|
5598
5600
|
hasImageBitmap: !!m,
|
|
5599
5601
|
width: m?.width,
|
|
5600
5602
|
height: m?.height,
|
|
@@ -5611,13 +5613,13 @@ function yx(r) {
|
|
|
5611
5613
|
}, t.onerror = (u) => {
|
|
5612
5614
|
};
|
|
5613
5615
|
const e = () => {
|
|
5614
|
-
const u =
|
|
5615
|
-
return
|
|
5616
|
+
const u = Dx();
|
|
5617
|
+
return m0("🔍 [workerManager] 检查 License Token:", {
|
|
5616
5618
|
hasToken: !!u.token,
|
|
5617
5619
|
tokenPreview: u.token ? u.token.substring(0, 20) + "..." : "undefined",
|
|
5618
5620
|
faceId: r,
|
|
5619
5621
|
source: "licenseStore模块"
|
|
5620
|
-
}), u.token ? (
|
|
5622
|
+
}), u.token ? (m0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5621
5623
|
type: "SET_LICENSE",
|
|
5622
5624
|
licenseToken: u.token,
|
|
5623
5625
|
licenseApiUrl: u.apiUrl,
|
|
@@ -5625,7 +5627,7 @@ function yx(r) {
|
|
|
5625
5627
|
domain: u.domain
|
|
5626
5628
|
}), !0) : !1;
|
|
5627
5629
|
};
|
|
5628
|
-
return e() || (
|
|
5630
|
+
return e() || (m0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5629
5631
|
e() || Ee("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5630
5632
|
}, 200), setTimeout(() => {
|
|
5631
5633
|
e() || Ee("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
@@ -5637,10 +5639,10 @@ function wx(r) {
|
|
|
5637
5639
|
type: r.type,
|
|
5638
5640
|
blendMode: r.blendMode,
|
|
5639
5641
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5640
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5641
|
-
x:
|
|
5642
|
-
y:
|
|
5643
|
-
type:
|
|
5642
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((v) => ({
|
|
5643
|
+
x: v.x,
|
|
5644
|
+
y: v.y,
|
|
5645
|
+
type: v.type
|
|
5644
5646
|
})) : [],
|
|
5645
5647
|
bounds: r.bounds ? {
|
|
5646
5648
|
width: r.bounds.width,
|
|
@@ -5663,30 +5665,30 @@ function wx(r) {
|
|
|
5663
5665
|
layerOrder: r.layerOrder,
|
|
5664
5666
|
imagePath: r.imagePath,
|
|
5665
5667
|
vectorMask: r.vectorMask ? {
|
|
5666
|
-
paths: r.vectorMask.paths?.map((
|
|
5667
|
-
open:
|
|
5668
|
-
knots:
|
|
5668
|
+
paths: r.vectorMask.paths?.map((v) => ({
|
|
5669
|
+
open: v.open,
|
|
5670
|
+
knots: v.knots?.map((t) => ({
|
|
5669
5671
|
linked: t.linked,
|
|
5670
5672
|
points: [...t.points]
|
|
5671
5673
|
})),
|
|
5672
|
-
fillRule:
|
|
5673
|
-
operation:
|
|
5674
|
+
fillRule: v.fillRule,
|
|
5675
|
+
operation: v.operation
|
|
5674
5676
|
})),
|
|
5675
|
-
points: r.vectorMask.points?.map((
|
|
5676
|
-
x:
|
|
5677
|
-
y:
|
|
5678
|
-
type:
|
|
5677
|
+
points: r.vectorMask.points?.map((v) => ({
|
|
5678
|
+
x: v.x,
|
|
5679
|
+
y: v.y,
|
|
5680
|
+
type: v.type
|
|
5679
5681
|
})),
|
|
5680
5682
|
invert: r.vectorMask.invert,
|
|
5681
5683
|
notLink: r.vectorMask.notLink,
|
|
5682
5684
|
disable: r.vectorMask.disable,
|
|
5683
5685
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5684
5686
|
} : void 0,
|
|
5685
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5686
|
-
type:
|
|
5687
|
-
enabled:
|
|
5688
|
-
filter:
|
|
5689
|
-
puppetShapeList:
|
|
5687
|
+
filterList: r.filterList ? r.filterList.map((v) => ({
|
|
5688
|
+
type: v.type,
|
|
5689
|
+
enabled: v.enabled,
|
|
5690
|
+
filter: v.filter ? {
|
|
5691
|
+
puppetShapeList: v.filter.puppetShapeList?.map((t) => ({
|
|
5690
5692
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5691
5693
|
x: e.x,
|
|
5692
5694
|
y: e.y
|
|
@@ -5703,7 +5705,7 @@ function wx(r) {
|
|
|
5703
5705
|
clipping: r.clipping
|
|
5704
5706
|
};
|
|
5705
5707
|
}
|
|
5706
|
-
function kx(r,
|
|
5708
|
+
function kx(r, v, t, e) {
|
|
5707
5709
|
const u = ++_x, h = yx(t);
|
|
5708
5710
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5709
5711
|
pr.set(u, {
|
|
@@ -5712,24 +5714,24 @@ function kx(r, p, t, e) {
|
|
|
5712
5714
|
},
|
|
5713
5715
|
reject: B
|
|
5714
5716
|
});
|
|
5715
|
-
const C = wx(
|
|
5717
|
+
const C = wx(v);
|
|
5716
5718
|
h.postMessage({ id: u, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5717
5719
|
r
|
|
5718
5720
|
]);
|
|
5719
5721
|
});
|
|
5720
5722
|
}
|
|
5721
|
-
async function Sx(r,
|
|
5723
|
+
async function Sx(r, v, t = 0, e, u, h) {
|
|
5722
5724
|
const m = await it(r, u, h);
|
|
5723
5725
|
if (!m || m.width === 0 || m.height === 0)
|
|
5724
5726
|
throw new Error("图片无效:尺寸为 0");
|
|
5725
|
-
return await kx(m,
|
|
5727
|
+
return await kx(m, v, t, e);
|
|
5726
5728
|
}
|
|
5727
|
-
function d0(r,
|
|
5729
|
+
function d0(r, v) {
|
|
5728
5730
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5729
|
-
return new OffscreenCanvas(r,
|
|
5731
|
+
return new OffscreenCanvas(r, v);
|
|
5730
5732
|
if (typeof document < "u") {
|
|
5731
5733
|
const t = document.createElement("canvas");
|
|
5732
|
-
return t.width = r, t.height =
|
|
5734
|
+
return t.width = r, t.height = v, t;
|
|
5733
5735
|
} else
|
|
5734
5736
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5735
5737
|
}
|
|
@@ -5737,13 +5739,13 @@ function A0(r) {
|
|
|
5737
5739
|
return r.getContext("2d");
|
|
5738
5740
|
}
|
|
5739
5741
|
function Fe(r) {
|
|
5740
|
-
const
|
|
5741
|
-
if (!
|
|
5742
|
+
const v = A0(r);
|
|
5743
|
+
if (!v)
|
|
5742
5744
|
throw new Error("无法创建 canvas context");
|
|
5743
|
-
return
|
|
5745
|
+
return v;
|
|
5744
5746
|
}
|
|
5745
5747
|
async function Hx(r) {
|
|
5746
|
-
const
|
|
5748
|
+
const v = performance.now(), t = () => {
|
|
5747
5749
|
try {
|
|
5748
5750
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5749
5751
|
} catch {
|
|
@@ -5801,10 +5803,10 @@ async function Hx(r) {
|
|
|
5801
5803
|
url: c.url
|
|
5802
5804
|
}), f.set(c.layerName, c.url));
|
|
5803
5805
|
}
|
|
5804
|
-
const
|
|
5806
|
+
const p = /* @__PURE__ */ new Map();
|
|
5805
5807
|
for (const c of B)
|
|
5806
|
-
|
|
5807
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(
|
|
5808
|
+
p.set(c.id, c.url);
|
|
5809
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", h.layerList?.map((c) => ({
|
|
5808
5810
|
name: c.name,
|
|
5809
5811
|
type: c.type,
|
|
5810
5812
|
id: c.id,
|
|
@@ -5815,28 +5817,28 @@ async function Hx(r) {
|
|
|
5815
5817
|
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5816
5818
|
if (c.type === "Layer") {
|
|
5817
5819
|
if (c.imagePath) {
|
|
5818
|
-
const
|
|
5820
|
+
const W = m.find((P) => {
|
|
5819
5821
|
const L = P.sourceName || P.layerName;
|
|
5820
5822
|
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5821
5823
|
});
|
|
5822
|
-
|
|
5823
|
-
url:
|
|
5824
|
+
W && (s[c.imagePath] = {
|
|
5825
|
+
url: W.url
|
|
5824
5826
|
});
|
|
5825
5827
|
}
|
|
5826
5828
|
if (c.name) {
|
|
5827
5829
|
if (_) {
|
|
5828
|
-
const
|
|
5829
|
-
const
|
|
5830
|
-
return
|
|
5830
|
+
const W = `${_}-${c.name}`, P = m.find((L) => {
|
|
5831
|
+
const I = L.sourceName || L.layerName;
|
|
5832
|
+
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5831
5833
|
});
|
|
5832
|
-
P && (s[
|
|
5834
|
+
P && (s[W] = {
|
|
5833
5835
|
url: P.url
|
|
5834
5836
|
});
|
|
5835
5837
|
}
|
|
5836
5838
|
if (c.imagePath && c.name) {
|
|
5837
|
-
const
|
|
5838
|
-
const
|
|
5839
|
-
return
|
|
5839
|
+
const W = c.imagePath.split("/").pop() || c.imagePath, P = m.find((L) => {
|
|
5840
|
+
const I = L.sourceName || L.layerName;
|
|
5841
|
+
return I ? (I.split("/").pop() || I) === W : !1;
|
|
5840
5842
|
});
|
|
5841
5843
|
P && (s[c.imagePath] = {
|
|
5842
5844
|
url: P.url
|
|
@@ -5845,36 +5847,36 @@ async function Hx(r) {
|
|
|
5845
5847
|
}
|
|
5846
5848
|
}
|
|
5847
5849
|
if (c.children)
|
|
5848
|
-
for (const
|
|
5849
|
-
|
|
5850
|
+
for (const W of c.children)
|
|
5851
|
+
W && l(W, _);
|
|
5850
5852
|
}
|
|
5851
|
-
function
|
|
5853
|
+
function D(c, A) {
|
|
5852
5854
|
const _ = c.id ?? A;
|
|
5853
5855
|
if (c.type === "Group" && _)
|
|
5854
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${
|
|
5855
|
-
const
|
|
5856
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${
|
|
5856
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${p.has(_)}`), p.has(_)) {
|
|
5857
|
+
const W = p.get(_);
|
|
5858
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${W.substring(0, 50)}...`), c.children) {
|
|
5857
5859
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5858
5860
|
for (const P of c.children)
|
|
5859
5861
|
if (P && P.isSmartObject === !0) {
|
|
5860
5862
|
const L = P?.name || "";
|
|
5861
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5863
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) : u("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5862
5864
|
}
|
|
5863
5865
|
} else
|
|
5864
5866
|
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5865
5867
|
} else
|
|
5866
5868
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5867
5869
|
if (c.children)
|
|
5868
|
-
for (const
|
|
5869
|
-
|
|
5870
|
+
for (const W of c.children)
|
|
5871
|
+
W && D(W, _);
|
|
5870
5872
|
}
|
|
5871
5873
|
if (h.layerList)
|
|
5872
5874
|
for (const c of h.layerList)
|
|
5873
5875
|
c && l(c);
|
|
5874
5876
|
if (h.layerList)
|
|
5875
5877
|
for (const c of h.layerList)
|
|
5876
|
-
c &&
|
|
5877
|
-
const o =
|
|
5878
|
+
c && D(c);
|
|
5879
|
+
const o = Ye([{
|
|
5878
5880
|
psdJson: h,
|
|
5879
5881
|
layerExtrasByName: s
|
|
5880
5882
|
}], {
|
|
@@ -5886,21 +5888,21 @@ async function Hx(r) {
|
|
|
5886
5888
|
const d = o.models[0];
|
|
5887
5889
|
if (!d.psdPartData)
|
|
5888
5890
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5889
|
-
const b = d.width,
|
|
5891
|
+
const b = d.width, g = d.height, y = d0(b, g), k = Fe(y), R = [], F = (c) => {
|
|
5890
5892
|
if (c.url && s[c.url])
|
|
5891
5893
|
return s[c.url];
|
|
5892
5894
|
if (c.url) {
|
|
5893
5895
|
const A = c.url.split("/").pop() || c.url;
|
|
5894
5896
|
if (s[A])
|
|
5895
5897
|
return s[A];
|
|
5896
|
-
const _ = m.find((
|
|
5897
|
-
const P =
|
|
5898
|
+
const _ = m.find((W) => {
|
|
5899
|
+
const P = W.sourceName || W.layerName;
|
|
5898
5900
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5899
5901
|
});
|
|
5900
5902
|
if (_) {
|
|
5901
|
-
const
|
|
5902
|
-
if (
|
|
5903
|
-
return s[
|
|
5903
|
+
const W = _.sourceName || _.layerName;
|
|
5904
|
+
if (W)
|
|
5905
|
+
return s[W] || { url: _.url };
|
|
5904
5906
|
}
|
|
5905
5907
|
}
|
|
5906
5908
|
};
|
|
@@ -5911,7 +5913,7 @@ async function Hx(r) {
|
|
|
5911
5913
|
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5912
5914
|
continue;
|
|
5913
5915
|
}
|
|
5914
|
-
const
|
|
5916
|
+
const W = _.url, P = a(W);
|
|
5915
5917
|
if (!P) {
|
|
5916
5918
|
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5917
5919
|
continue;
|
|
@@ -5925,48 +5927,48 @@ async function Hx(r) {
|
|
|
5925
5927
|
} else if (A.type === F0.Group) {
|
|
5926
5928
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5927
5929
|
continue;
|
|
5928
|
-
for (let
|
|
5929
|
-
const P = A.smartObjects[
|
|
5930
|
+
for (let W = 0; W < A.smartObjects.length; W++) {
|
|
5931
|
+
const P = A.smartObjects[W];
|
|
5930
5932
|
if (!P || !P.name)
|
|
5931
5933
|
continue;
|
|
5932
5934
|
let L = s[P.name] ?? _;
|
|
5933
5935
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5934
|
-
const
|
|
5935
|
-
if (L = s[
|
|
5936
|
-
const G = m.find((
|
|
5937
|
-
const
|
|
5938
|
-
return !
|
|
5936
|
+
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5937
|
+
if (L = s[K], !L) {
|
|
5938
|
+
const G = m.find((Y) => {
|
|
5939
|
+
const e0 = Y.sourceName || Y.layerName;
|
|
5940
|
+
return !e0 || !P.imagePath ? !1 : (e0.split("/").pop() || e0) === K || e0 === P.imagePath || e0.endsWith(P.imagePath) || P.imagePath.endsWith(e0);
|
|
5939
5941
|
});
|
|
5940
5942
|
G && (L = { url: G.url });
|
|
5941
5943
|
}
|
|
5942
5944
|
}
|
|
5943
5945
|
if (!L || !L.designImage && !L.url)
|
|
5944
5946
|
continue;
|
|
5945
|
-
let
|
|
5946
|
-
if (!
|
|
5947
|
+
let I = L.designImage ?? L.url;
|
|
5948
|
+
if (!I)
|
|
5947
5949
|
continue;
|
|
5948
|
-
if (typeof
|
|
5949
|
-
/^(https?:)?\/\//i.test(
|
|
5950
|
-
const G = a(
|
|
5950
|
+
if (typeof I == "string") {
|
|
5951
|
+
/^(https?:)?\/\//i.test(I) || I.startsWith("data:") || I.startsWith("blob:") || (I = f.get(I) ?? I);
|
|
5952
|
+
const G = a(I);
|
|
5951
5953
|
if (!G)
|
|
5952
5954
|
continue;
|
|
5953
|
-
|
|
5955
|
+
I = G;
|
|
5954
5956
|
}
|
|
5955
|
-
const
|
|
5957
|
+
const Z = (A.partId ?? A.id) * 100 + W, Q = Qe(Ze(P)), o0 = { width: b, height: g };
|
|
5956
5958
|
R.push({
|
|
5957
|
-
index: c +
|
|
5959
|
+
index: c + W * 0.01,
|
|
5958
5960
|
type: "group",
|
|
5959
5961
|
partData: A,
|
|
5960
5962
|
smartObject: P,
|
|
5961
5963
|
maskData: Q,
|
|
5962
5964
|
promise: Sx(
|
|
5963
|
-
|
|
5965
|
+
I,
|
|
5964
5966
|
P,
|
|
5965
|
-
|
|
5967
|
+
Z,
|
|
5966
5968
|
o0,
|
|
5967
5969
|
E,
|
|
5968
5970
|
n
|
|
5969
|
-
).catch((
|
|
5971
|
+
).catch((K) => null)
|
|
5970
5972
|
});
|
|
5971
5973
|
}
|
|
5972
5974
|
}
|
|
@@ -5975,75 +5977,75 @@ async function Hx(r) {
|
|
|
5975
5977
|
task: c,
|
|
5976
5978
|
imageBitmap: w[A]
|
|
5977
5979
|
})).sort((c, A) => {
|
|
5978
|
-
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index,
|
|
5979
|
-
return _ -
|
|
5980
|
+
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, W = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
5981
|
+
return _ - W;
|
|
5980
5982
|
});
|
|
5981
|
-
let $ = d0(b,
|
|
5983
|
+
let $ = d0(b, g), z = A0($), O = !1, q = "normal";
|
|
5982
5984
|
for (let c = 0; c < H.length; c++) {
|
|
5983
5985
|
const { task: A, imageBitmap: _ } = H[c];
|
|
5984
5986
|
if (!_) {
|
|
5985
5987
|
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5986
5988
|
continue;
|
|
5987
5989
|
}
|
|
5988
|
-
const { partData:
|
|
5990
|
+
const { partData: W } = A, P = W.bounds;
|
|
5989
5991
|
let L;
|
|
5990
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
5991
|
-
let
|
|
5992
|
-
A.type === "group" && A.smartObject ?
|
|
5993
|
-
const
|
|
5992
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
5993
|
+
let I;
|
|
5994
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? W.clipping === !0 : I = W.clipping === !0;
|
|
5995
|
+
const Z = H[c + 1];
|
|
5994
5996
|
let Q = !1;
|
|
5995
|
-
if (
|
|
5996
|
-
const
|
|
5997
|
-
|
|
5997
|
+
if (Z) {
|
|
5998
|
+
const K = Z.task.partData;
|
|
5999
|
+
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
5998
6000
|
}
|
|
5999
|
-
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
6001
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
6000
6002
|
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
6001
6003
|
type: A.type,
|
|
6002
6004
|
bitmapSize: { width: _.width, height: _.height },
|
|
6003
6005
|
bounds: P,
|
|
6004
6006
|
hasMask: !!A.maskData,
|
|
6005
|
-
blendMode:
|
|
6007
|
+
blendMode: W.blendMode,
|
|
6006
6008
|
opacity: L,
|
|
6007
|
-
clipping:
|
|
6008
|
-
}), !
|
|
6009
|
-
if (O = !0, q =
|
|
6010
|
-
if (
|
|
6009
|
+
clipping: I
|
|
6010
|
+
}), !I && Q) {
|
|
6011
|
+
if (O = !0, q = W.blendMode || "normal", z) {
|
|
6012
|
+
if (z.clearRect(0, 0, b, g), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6011
6013
|
if (A.maskData) {
|
|
6012
|
-
const
|
|
6013
|
-
G && (G.drawImage(_, 0, 0), lr(G, A.maskData),
|
|
6014
|
+
const K = d0(b, g), G = A0(K);
|
|
6015
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6014
6016
|
} else
|
|
6015
|
-
|
|
6016
|
-
else A.type === "layer" && (P ?
|
|
6017
|
+
z.drawImage(_, 0, 0);
|
|
6018
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6017
6019
|
_,
|
|
6018
6020
|
P.left,
|
|
6019
6021
|
P.top,
|
|
6020
6022
|
P.width,
|
|
6021
6023
|
P.height
|
|
6022
|
-
) :
|
|
6023
|
-
|
|
6024
|
+
) : z.drawImage(_, 0, 0));
|
|
6025
|
+
z.globalAlpha = 1;
|
|
6024
6026
|
}
|
|
6025
|
-
} else if (
|
|
6026
|
-
if (
|
|
6027
|
-
if (
|
|
6027
|
+
} else if (I) {
|
|
6028
|
+
if (z) {
|
|
6029
|
+
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6028
6030
|
if (A.maskData) {
|
|
6029
|
-
const
|
|
6030
|
-
G && (G.drawImage(_, 0, 0), lr(G, A.maskData),
|
|
6031
|
+
const K = d0(b, g), G = A0(K);
|
|
6032
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6031
6033
|
} else
|
|
6032
|
-
|
|
6033
|
-
else A.type === "layer" && (P ?
|
|
6034
|
+
z.drawImage(_, 0, 0);
|
|
6035
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6034
6036
|
_,
|
|
6035
6037
|
P.left,
|
|
6036
6038
|
P.top,
|
|
6037
6039
|
P.width,
|
|
6038
6040
|
P.height
|
|
6039
|
-
) :
|
|
6040
|
-
|
|
6041
|
+
) : z.drawImage(_, 0, 0));
|
|
6042
|
+
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6041
6043
|
}
|
|
6042
6044
|
} else {
|
|
6043
|
-
if (k.globalCompositeOperation =
|
|
6045
|
+
if (k.globalCompositeOperation = Wr(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6044
6046
|
if (A.maskData) {
|
|
6045
|
-
const
|
|
6046
|
-
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), k.drawImage(
|
|
6047
|
+
const K = d0(b, g), G = A0(K);
|
|
6048
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6047
6049
|
} else
|
|
6048
6050
|
k.drawImage(_, 0, 0);
|
|
6049
6051
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6055,25 +6057,25 @@ async function Hx(r) {
|
|
|
6055
6057
|
) : k.drawImage(_, 0, 0));
|
|
6056
6058
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6057
6059
|
}
|
|
6058
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6060
|
+
O && !Q && (k.globalCompositeOperation = Wr(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6059
6061
|
}
|
|
6060
|
-
$ = null,
|
|
6061
|
-
let U = y, T = b, N =
|
|
6062
|
+
$ = null, z = null;
|
|
6063
|
+
let U = y, T = b, N = g;
|
|
6062
6064
|
if (C !== void 0 || x !== void 0) {
|
|
6063
6065
|
if (C !== void 0 && x !== void 0)
|
|
6064
6066
|
T = C, N = x;
|
|
6065
6067
|
else if (C !== void 0) {
|
|
6066
6068
|
const A = C / b;
|
|
6067
|
-
T = C, N = Math.round(
|
|
6069
|
+
T = C, N = Math.round(g * A);
|
|
6068
6070
|
} else if (x !== void 0) {
|
|
6069
|
-
const A = x /
|
|
6071
|
+
const A = x / g;
|
|
6070
6072
|
T = Math.round(b * A), N = x;
|
|
6071
6073
|
}
|
|
6072
6074
|
U = d0(T, N);
|
|
6073
6075
|
const c = Fe(U);
|
|
6074
|
-
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b,
|
|
6076
|
+
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b, g, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${g} -> ${T}x${N}`);
|
|
6075
6077
|
}
|
|
6076
|
-
const S = performance.now() -
|
|
6078
|
+
const S = performance.now() - v;
|
|
6077
6079
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6078
6080
|
canvas: U,
|
|
6079
6081
|
width: T,
|
|
@@ -6085,10 +6087,10 @@ const $x = async (r) => {
|
|
|
6085
6087
|
return t ? createImageBitmap(t) : null;
|
|
6086
6088
|
};
|
|
6087
6089
|
self.onmessage = async (r) => {
|
|
6088
|
-
const
|
|
6089
|
-
if (
|
|
6090
|
-
const e =
|
|
6091
|
-
|
|
6090
|
+
const v = r.data;
|
|
6091
|
+
if (v && typeof v == "object" && "type" in v && v.type === "SET_LICENSE") {
|
|
6092
|
+
const e = v;
|
|
6093
|
+
gx({
|
|
6092
6094
|
token: e.licenseToken,
|
|
6093
6095
|
apiUrl: e.licenseApiUrl,
|
|
6094
6096
|
deviceId: e.deviceId,
|
|
@@ -6096,7 +6098,7 @@ self.onmessage = async (r) => {
|
|
|
6096
6098
|
});
|
|
6097
6099
|
return;
|
|
6098
6100
|
}
|
|
6099
|
-
const t =
|
|
6101
|
+
const t = v;
|
|
6100
6102
|
try {
|
|
6101
6103
|
const e = await $x(t.renderData);
|
|
6102
6104
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|