@jieyin/editor-sdk-test 1.1.157 → 1.1.159
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 +4782 -4770
- package/dist/renderWorker.js +759 -758
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var D0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(D0 || {});
|
|
2
2
|
function Ze(r) {
|
|
3
|
-
let
|
|
3
|
+
let h = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = h;
|
|
6
|
+
return h += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ve(r, h) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,29 +23,29 @@ function Qe(r, u) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? h,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let
|
|
32
|
+
function Qe(r, h, t, e) {
|
|
33
|
+
let u = r.name || "", p = h[u], m = p?.partId ?? (r.type === "Group" ? t.get(u) : void 0);
|
|
34
34
|
if (r.type === "Group" && m === void 0 && (!p || p.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
-
const x = r.children[0].name, n =
|
|
36
|
-
(E !== void 0 || n?.id !== void 0) && (
|
|
35
|
+
const x = r.children[0].name, n = h[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (u = x, p = n, m = E);
|
|
37
37
|
}
|
|
38
38
|
const B = r.id ?? p?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
41
|
id: B,
|
|
42
42
|
partId: m,
|
|
43
|
-
name:
|
|
43
|
+
name: u,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
|
-
type:
|
|
46
|
+
type: D0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => Ve(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
@@ -57,44 +57,44 @@ function Ve(r, u, t, e) {
|
|
|
57
57
|
name: r.name || "",
|
|
58
58
|
blendMode: r.blendMode || "normal",
|
|
59
59
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
60
|
-
type:
|
|
60
|
+
type: D0.Layer,
|
|
61
61
|
url: C,
|
|
62
62
|
opacity: r.opacity,
|
|
63
63
|
clipping: r.clipping,
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function Je(r,
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function Je(r, h) {
|
|
68
|
+
const t = new Map(h.parts.map((u) => [u.name, u.id])), e = Ze(h.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const p =
|
|
70
|
+
parts: h.parts,
|
|
71
|
+
models: r.map((u) => {
|
|
72
|
+
const p = 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
77
|
for (const v of s)
|
|
78
78
|
if (v.type === "Group" && v.children) {
|
|
79
|
-
const
|
|
80
|
-
const b = o.layerOrder ?? 0,
|
|
81
|
-
return b -
|
|
79
|
+
const l = [], g = [], i = [...v.children].sort((o, d) => {
|
|
80
|
+
const b = o.layerOrder ?? 0, D = d.layerOrder ?? 0;
|
|
81
|
+
return b - D;
|
|
82
82
|
});
|
|
83
83
|
for (const o of i)
|
|
84
|
-
o.isSmartObject === !0 ?
|
|
85
|
-
if (
|
|
86
|
-
const o = n(
|
|
84
|
+
o.isSmartObject === !0 ? l.push(o) : g.push(o);
|
|
85
|
+
if (g.length > 0) {
|
|
86
|
+
const o = n(g);
|
|
87
87
|
f.push(...o);
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
l.length > 0 && f.push({
|
|
90
90
|
...v,
|
|
91
|
-
children:
|
|
91
|
+
children: l
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
94
|
f.push(v);
|
|
95
95
|
return f;
|
|
96
96
|
}, a = n(B).map(
|
|
97
|
-
(s) =>
|
|
97
|
+
(s) => Qe(s, p, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -110,30 +110,30 @@ function rt(r) {
|
|
|
110
110
|
function et(r) {
|
|
111
111
|
return r ? r.type === "bezier" ? {
|
|
112
112
|
type: "bezier",
|
|
113
|
-
paths: r.paths.map((
|
|
114
|
-
open: !!
|
|
115
|
-
knots:
|
|
113
|
+
paths: r.paths.map((h) => ({
|
|
114
|
+
open: !!h.open,
|
|
115
|
+
knots: h.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((h) => ({
|
|
123
|
+
x: h.x,
|
|
124
|
+
y: h.y,
|
|
125
|
+
type: h.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, h) {
|
|
130
|
+
if (h) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), h.type === "bezier" && Array.isArray(h.paths))
|
|
132
|
+
h.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
135
|
+
const u = e[0];
|
|
136
|
+
r.moveTo(u.points[2], u.points[3]);
|
|
137
137
|
for (let p = 0; p < e.length; p++) {
|
|
138
138
|
const m = e[p];
|
|
139
139
|
let B = (p + 1) % e.length;
|
|
@@ -146,8 +146,8 @@ function lr(r, u) {
|
|
|
146
146
|
}
|
|
147
147
|
t.open || r.closePath();
|
|
148
148
|
});
|
|
149
|
-
else if (
|
|
150
|
-
const t =
|
|
149
|
+
else if (h.type === "simple" && Array.isArray(h.points)) {
|
|
150
|
+
const t = h.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -161,10 +161,10 @@ class v0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(h) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(h);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class v0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(h, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(h, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class v0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(h) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(h), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -251,10 +251,10 @@ class h0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(h) {
|
|
255
255
|
try {
|
|
256
256
|
const t = fr.getOrigin();
|
|
257
|
-
return new URL(
|
|
257
|
+
return new URL(h, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,175 +262,176 @@ class h0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(h, t, e) {
|
|
266
|
+
const u = this.parse(h);
|
|
267
|
+
return !u || u.searchParams.has(t) ? h : (u.searchParams.set(t, e), this.formatUrl(h, 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(h, t) {
|
|
273
|
+
const e = this.parse(h);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? h : (e.searchParams.delete(t), this.formatUrl(h, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(h, t) {
|
|
280
|
+
return this.parse(h)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
287
|
-
return e ? t.toString() :
|
|
285
|
+
static formatUrl(h, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(h), u = h.startsWith("//");
|
|
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(h) {
|
|
293
|
+
return h?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(h) {
|
|
299
|
+
return h?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
const r0 = Cr;
|
|
306
|
-
(function(r, u) {
|
|
307
|
-
const t = Cr, e = r();
|
|
302
|
+
const t0 = Ar;
|
|
303
|
+
(function(r, h) {
|
|
304
|
+
const t = Ar, e = r();
|
|
308
305
|
for (; ; )
|
|
309
306
|
try {
|
|
310
|
-
if (
|
|
307
|
+
if (parseInt(t(429)) / 1 + -parseInt(t(427)) / 2 * (parseInt(t(414)) / 3) + parseInt(t(413)) / 4 * (-parseInt(t(409)) / 5) + -parseInt(t(408)) / 6 + parseInt(t(404)) / 7 + -parseInt(t(412)) / 8 * (parseInt(t(426)) / 9) + parseInt(t(419)) / 10 === h) break;
|
|
311
308
|
e.push(e.shift());
|
|
312
309
|
} catch {
|
|
313
310
|
e.push(e.shift());
|
|
314
311
|
}
|
|
315
|
-
})(cr, -
|
|
312
|
+
})(cr, -68737 * -7 + 41 * -7046 + -76376 * -1);
|
|
316
313
|
const A0 = /* @__PURE__ */ (function() {
|
|
317
314
|
let r = !0;
|
|
318
|
-
return function(
|
|
315
|
+
return function(h, t) {
|
|
319
316
|
const e = r ? function() {
|
|
320
317
|
if (t) {
|
|
321
|
-
const
|
|
322
|
-
return t = null,
|
|
318
|
+
const u = t.apply(h, arguments);
|
|
319
|
+
return t = null, u;
|
|
323
320
|
}
|
|
324
321
|
} : function() {
|
|
325
322
|
};
|
|
326
323
|
return r = !1, e;
|
|
327
324
|
};
|
|
328
325
|
})(), tt = A0(void 0, function() {
|
|
329
|
-
const r =
|
|
330
|
-
let
|
|
326
|
+
const r = Ar;
|
|
327
|
+
let h;
|
|
331
328
|
try {
|
|
332
|
-
|
|
329
|
+
h = Function(r(430) + "n (functio" + r(416) + '{}.constructor("return this")( ));')();
|
|
333
330
|
} catch {
|
|
334
|
-
|
|
331
|
+
h = window;
|
|
335
332
|
}
|
|
336
|
-
const t =
|
|
337
|
-
for (let
|
|
338
|
-
const p = A0[r(
|
|
339
|
-
p
|
|
333
|
+
const t = h.console = h[r(439) + "le"] || {}, e = ["log", "warn", "info", "error", r(435) + "tion", "table", r(406)];
|
|
334
|
+
for (let u = 8234 + 5 * -1433 + -1069; u < e[r(403) + "h"]; u++) {
|
|
335
|
+
const p = A0[r(425) + "ructor"].prototype.bind(A0), m = e[u], B = t[m] || p;
|
|
336
|
+
p[r(428) + "to__"] = A0.bind(A0), p["toStr" + r(422)] = B.toString.bind(B), t[m] = p;
|
|
340
337
|
}
|
|
341
338
|
});
|
|
342
339
|
tt();
|
|
343
|
-
const
|
|
340
|
+
const Cr = "file_" + t0(415), Er = t0(401) + t0(415) + "_expire_time", xt = (4037 + -3977 * 1) * (-5314 + -641 * 4 + 8878);
|
|
344
341
|
function pr() {
|
|
345
|
-
return v0.getItem(
|
|
342
|
+
return v0.getItem(Cr);
|
|
346
343
|
}
|
|
347
344
|
function nt(r = xt) {
|
|
348
|
-
const u = r0;
|
|
349
345
|
if (!pr()) return !0;
|
|
350
|
-
const
|
|
351
|
-
if (!
|
|
352
|
-
const
|
|
353
|
-
return Date
|
|
346
|
+
const t = v0.getItem(Er);
|
|
347
|
+
if (!t) return !1;
|
|
348
|
+
const e = Number(t);
|
|
349
|
+
return Date.now() + r > e;
|
|
354
350
|
}
|
|
355
|
-
function at(r,
|
|
356
|
-
const t =
|
|
357
|
-
if (v0.setItem(
|
|
358
|
-
const e = Date
|
|
359
|
-
v0[t(
|
|
351
|
+
function at(r, h) {
|
|
352
|
+
const t = t0;
|
|
353
|
+
if (v0.setItem(Cr, r), typeof h == "number" && h > 0) {
|
|
354
|
+
const e = Date.now() + h * 1e3;
|
|
355
|
+
v0[t(431) + "em"](Er, String(e));
|
|
360
356
|
}
|
|
361
357
|
}
|
|
362
358
|
function ot() {
|
|
363
|
-
const r =
|
|
364
|
-
v0.removeItem(
|
|
359
|
+
const r = t0;
|
|
360
|
+
v0.removeItem(Cr), v0["remov" + r(421)](Er);
|
|
365
361
|
}
|
|
366
|
-
async function
|
|
367
|
-
const
|
|
368
|
-
return t?.data?.code ===
|
|
362
|
+
async function zr(r) {
|
|
363
|
+
const h = t0, t = await r(), e = t?.data?.data;
|
|
364
|
+
return t?.data?.code === 409 * -2 + -7165 + 8183 && e?.["file_token"] ? (at(e.file_token, e["expir" + h(434)]), e.file_token) : null;
|
|
369
365
|
}
|
|
370
366
|
let it = null;
|
|
371
|
-
function Ir() {
|
|
372
|
-
return fr["isBro" + r0(225)]() ? it : null;
|
|
373
|
-
}
|
|
374
367
|
function cr() {
|
|
375
|
-
const r = ["
|
|
368
|
+
const r = ["okenR", "wser", "const", "1616931gjCtbh", "16cyjIxu", "__pro", "124159WVLUtN", "retur", "setIt", "remov", "FileT", "es_in", "excep", "oken=", "fetch", "ame", "conso", "file_", "/file", "lengt", "3354029VCSbYf", "oken", "trace", "isDat", "3055014BwDfXh", "40yWowGK", "statu", "hasPa", "8VTbIYZ", "139364UJyGKO", "190167qnofPT", "token", "n() ", "fileT", "bUrl", "11400110ViAqxD", "aUrl", "eItem", "ing"];
|
|
376
369
|
return cr = function() {
|
|
377
370
|
return r;
|
|
378
371
|
}, cr();
|
|
379
372
|
}
|
|
373
|
+
function Ir() {
|
|
374
|
+
return fr.isBrowser() ? it : null;
|
|
375
|
+
}
|
|
380
376
|
async function be() {
|
|
381
|
-
const r =
|
|
382
|
-
if (!fr
|
|
383
|
-
const
|
|
384
|
-
if (
|
|
377
|
+
const r = t0;
|
|
378
|
+
if (!fr.isBrowser()) return pr();
|
|
379
|
+
const h = pr();
|
|
380
|
+
if (h && !nt()) return h;
|
|
385
381
|
try {
|
|
386
382
|
const t = await Ir();
|
|
387
|
-
if (
|
|
388
|
-
const e = await
|
|
383
|
+
if (h && t?.["fetch" + r(433) + "okenRefresh"]) {
|
|
384
|
+
const e = await zr(t["fetchFileT" + r(423) + "efresh"]);
|
|
389
385
|
if (e) return e;
|
|
390
386
|
}
|
|
391
387
|
} catch {
|
|
392
388
|
}
|
|
393
389
|
try {
|
|
394
390
|
const t = Ir();
|
|
395
|
-
return t?.["
|
|
391
|
+
return t?.[r(437) + "FileT" + r(405)] ? await zr(t["fetch" + r(433) + "oken"]) : null;
|
|
396
392
|
} catch {
|
|
397
393
|
return null;
|
|
398
394
|
}
|
|
399
395
|
}
|
|
400
396
|
function me(r) {
|
|
401
|
-
const
|
|
402
|
-
if (!r || h0[
|
|
397
|
+
const h = t0;
|
|
398
|
+
if (!r || h0[h(407) + h(420)](r) || h0["isBlo" + h(418)](r)) return !1;
|
|
403
399
|
const t = h0.parse(r);
|
|
404
|
-
return t ? t
|
|
400
|
+
return t ? t["pathn" + h(438)].includes(h(402) + "s/") && !h0[h(411) + "ram"](r, "fileToken") : r.includes("/files/") && !r.includes("fileT" + h(436));
|
|
401
|
+
}
|
|
402
|
+
function _e(r, h) {
|
|
403
|
+
const t = t0;
|
|
404
|
+
return !h || !me(r) ? r : h0.addParam(r, "fileT" + t(405), h);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
408
|
-
return !u || !me(r) ? r : h0[t(217) + "ram"](r, "fileToken", u);
|
|
406
|
+
function Ar(r, h) {
|
|
407
|
+
return r = r - (-4596 + -1 * -1733 + 3264), cr()[r];
|
|
409
408
|
}
|
|
410
409
|
function st(r) {
|
|
411
|
-
|
|
410
|
+
const h = t0;
|
|
411
|
+
return h0[h(432) + "eParam"](r, h(417) + "oken");
|
|
412
412
|
}
|
|
413
413
|
async function ct(r) {
|
|
414
414
|
if (!me(r)) return r;
|
|
415
|
-
const
|
|
416
|
-
return _e(r,
|
|
415
|
+
const h = await be();
|
|
416
|
+
return _e(r, h);
|
|
417
417
|
}
|
|
418
|
-
async function ye(r,
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
418
|
+
async function ye(r, h) {
|
|
419
|
+
const t = t0;
|
|
420
|
+
if (!fr["isBro" + t(424)]()) return fetch(r, h);
|
|
421
|
+
const e = st(r), u = await ct(e), p = await fetch(u, h);
|
|
422
|
+
if (p[t(410) + "s"] !== -7612 + -8013 * -1) return p;
|
|
422
423
|
ot();
|
|
423
424
|
const m = await be(), B = _e(e, m);
|
|
424
|
-
return fetch(B,
|
|
425
|
+
return fetch(B, h);
|
|
425
426
|
}
|
|
426
|
-
const we = (r,
|
|
427
|
+
const we = (r, h) => {
|
|
427
428
|
if (!r) return r;
|
|
428
|
-
const t = (
|
|
429
|
+
const t = (h || "").replace(/\/$/, "");
|
|
429
430
|
if (t && r.startsWith(t))
|
|
430
431
|
return r;
|
|
431
432
|
if (typeof window < "u") {
|
|
432
|
-
const
|
|
433
|
-
if (
|
|
433
|
+
const u = window.location.hostname;
|
|
434
|
+
if (u === "localhost" || u === "127.0.0.1")
|
|
434
435
|
try {
|
|
435
436
|
const p = new URL(r);
|
|
436
437
|
if (t)
|
|
@@ -448,32 +449,32 @@ const we = (r, u) => {
|
|
|
448
449
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
449
450
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
450
451
|
return e ? `/oss${e[2]}` : r;
|
|
451
|
-
}, ft = (r,
|
|
452
|
+
}, ft = (r, h) => {
|
|
452
453
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
453
|
-
return new OffscreenCanvas(r,
|
|
454
|
+
return new OffscreenCanvas(r, h);
|
|
454
455
|
const t = document.createElement("canvas");
|
|
455
|
-
return t.width = r, t.height =
|
|
456
|
-
}, _0 = async (r,
|
|
457
|
-
if (!
|
|
456
|
+
return t.width = r, t.height = h, t;
|
|
457
|
+
}, _0 = async (r, h) => {
|
|
458
|
+
if (!h || h <= 0) return r;
|
|
458
459
|
const t = Math.max(r.width, r.height);
|
|
459
|
-
if (t <=
|
|
460
|
-
const e =
|
|
461
|
-
return B ? (B.drawImage(r, 0, 0,
|
|
460
|
+
if (t <= h) return r;
|
|
461
|
+
const e = h / t, u = Math.max(1, Math.round(r.width * e)), p = Math.max(1, Math.round(r.height * e)), m = ft(u, p), B = m.getContext("2d");
|
|
462
|
+
return B ? (B.drawImage(r, 0, 0, u, p), r.close?.(), await createImageBitmap(m)) : r;
|
|
462
463
|
};
|
|
463
|
-
async function
|
|
464
|
+
async function ut(r, h, t) {
|
|
464
465
|
if (typeof r == "string")
|
|
465
466
|
try {
|
|
466
|
-
const e = we(r, t),
|
|
467
|
-
if (!
|
|
468
|
-
const m =
|
|
467
|
+
const e = we(r, t), u = await ye(e);
|
|
468
|
+
if (!u.ok) {
|
|
469
|
+
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
469
470
|
throw new Error(m);
|
|
470
471
|
}
|
|
471
|
-
const p = await
|
|
472
|
+
const p = await u.blob();
|
|
472
473
|
if (!p.type.startsWith("image/") && p.size === 0)
|
|
473
474
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
474
475
|
try {
|
|
475
476
|
const m = await createImageBitmap(p);
|
|
476
|
-
return await _0(m,
|
|
477
|
+
return await _0(m, h);
|
|
477
478
|
} catch (m) {
|
|
478
479
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
479
480
|
}
|
|
@@ -481,13 +482,13 @@ async function dt(r, u, t) {
|
|
|
481
482
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
482
483
|
}
|
|
483
484
|
if (r instanceof HTMLImageElement) {
|
|
484
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
485
|
-
r.onload = e, r.onerror = () =>
|
|
485
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, u) => {
|
|
486
|
+
r.onload = e, r.onerror = () => u(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
486
487
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
487
488
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
488
489
|
try {
|
|
489
490
|
const e = await createImageBitmap(r);
|
|
490
|
-
return await _0(e,
|
|
491
|
+
return await _0(e, h);
|
|
491
492
|
} catch (e) {
|
|
492
493
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
493
494
|
}
|
|
@@ -495,23 +496,23 @@ async function dt(r, u, t) {
|
|
|
495
496
|
if (r instanceof ImageBitmap) {
|
|
496
497
|
if (r.width === 0 || r.height === 0)
|
|
497
498
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
498
|
-
return await _0(r,
|
|
499
|
+
return await _0(r, h);
|
|
499
500
|
}
|
|
500
501
|
throw new Error("不支持的图片类型");
|
|
501
502
|
}
|
|
502
|
-
async function
|
|
503
|
+
async function dt(r, h, t) {
|
|
503
504
|
try {
|
|
504
|
-
const e = we(r, t),
|
|
505
|
-
if (!
|
|
506
|
-
const m =
|
|
505
|
+
const e = we(r, t), u = await ye(e);
|
|
506
|
+
if (!u.ok) {
|
|
507
|
+
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
507
508
|
throw new Error(m);
|
|
508
509
|
}
|
|
509
|
-
const p = await
|
|
510
|
+
const p = await u.blob();
|
|
510
511
|
if (!p.type.startsWith("image/") && p.size === 0)
|
|
511
512
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
512
513
|
try {
|
|
513
514
|
const m = await createImageBitmap(p);
|
|
514
|
-
return await _0(m,
|
|
515
|
+
return await _0(m, h);
|
|
515
516
|
} catch (m) {
|
|
516
517
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
517
518
|
}
|
|
@@ -521,7 +522,7 @@ async function ut(r, u, t) {
|
|
|
521
522
|
}
|
|
522
523
|
function Lr(r) {
|
|
523
524
|
if (!r) return "source-over";
|
|
524
|
-
const
|
|
525
|
+
const h = r.trim().toLowerCase();
|
|
525
526
|
return {
|
|
526
527
|
normal: "source-over",
|
|
527
528
|
multiply: "multiply",
|
|
@@ -547,26 +548,26 @@ function Lr(r) {
|
|
|
547
548
|
"linear dodge": "lighter",
|
|
548
549
|
lighter: "lighter",
|
|
549
550
|
"pass-through": "source-over"
|
|
550
|
-
}[
|
|
551
|
+
}[h] || "source-over";
|
|
551
552
|
}
|
|
552
553
|
var hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
553
554
|
function lt(r) {
|
|
554
555
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
555
|
-
var
|
|
556
|
-
if (typeof
|
|
556
|
+
var h = r.default;
|
|
557
|
+
if (typeof h == "function") {
|
|
557
558
|
var t = function e() {
|
|
558
|
-
var
|
|
559
|
+
var u = !1;
|
|
559
560
|
try {
|
|
560
|
-
|
|
561
|
+
u = this instanceof e;
|
|
561
562
|
} catch {
|
|
562
563
|
}
|
|
563
|
-
return
|
|
564
|
+
return u ? Reflect.construct(h, arguments, this.constructor) : h.apply(this, arguments);
|
|
564
565
|
};
|
|
565
|
-
t.prototype =
|
|
566
|
+
t.prototype = h.prototype;
|
|
566
567
|
} else t = {};
|
|
567
568
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
568
|
-
var
|
|
569
|
-
Object.defineProperty(t, e,
|
|
569
|
+
var u = Object.getOwnPropertyDescriptor(r, e);
|
|
570
|
+
Object.defineProperty(t, e, u.get ? u : {
|
|
570
571
|
enumerable: !0,
|
|
571
572
|
get: function() {
|
|
572
573
|
return r[e];
|
|
@@ -583,11 +584,11 @@ var w0 = { exports: {} }, vt = {}, pt = /* @__PURE__ */ Object.freeze({
|
|
|
583
584
|
default: vt
|
|
584
585
|
}), Bt = /* @__PURE__ */ lt(pt), Ct = w0.exports, Or;
|
|
585
586
|
function M() {
|
|
586
|
-
return Or || (Or = 1, (function(r,
|
|
587
|
+
return Or || (Or = 1, (function(r, h) {
|
|
587
588
|
(function(t, e) {
|
|
588
589
|
r.exports = e();
|
|
589
590
|
})(Ct, function() {
|
|
590
|
-
var t = t || (function(e,
|
|
591
|
+
var t = t || (function(e, u) {
|
|
591
592
|
var p;
|
|
592
593
|
if (typeof window < "u" && window.crypto && (p = window.crypto), typeof self < "u" && self.crypto && (p = self.crypto), typeof globalThis < "u" && globalThis.crypto && (p = globalThis.crypto), !p && typeof window < "u" && window.msCrypto && (p = window.msCrypto), !p && typeof hr < "u" && hr.crypto && (p = hr.crypto), !p && typeof ht == "function")
|
|
593
594
|
try {
|
|
@@ -612,8 +613,8 @@ function M() {
|
|
|
612
613
|
function i() {
|
|
613
614
|
}
|
|
614
615
|
return function(o) {
|
|
615
|
-
var
|
|
616
|
-
return i.prototype = o,
|
|
616
|
+
var d;
|
|
617
|
+
return i.prototype = o, d = new i(), i.prototype = null, d;
|
|
617
618
|
};
|
|
618
619
|
})(), C = {}, x = C.lib = {}, n = x.Base = /* @__PURE__ */ (function() {
|
|
619
620
|
return {
|
|
@@ -714,7 +715,7 @@ function M() {
|
|
|
714
715
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
715
716
|
*/
|
|
716
717
|
init: function(i, o) {
|
|
717
|
-
i = this.words = i || [], o !=
|
|
718
|
+
i = this.words = i || [], o != u ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
718
719
|
},
|
|
719
720
|
/**
|
|
720
721
|
* Converts this word array to a string.
|
|
@@ -744,16 +745,16 @@ function M() {
|
|
|
744
745
|
* wordArray1.concat(wordArray2);
|
|
745
746
|
*/
|
|
746
747
|
concat: function(i) {
|
|
747
|
-
var o = this.words,
|
|
748
|
+
var o = this.words, d = i.words, b = this.sigBytes, D = i.sigBytes;
|
|
748
749
|
if (this.clamp(), b % 4)
|
|
749
|
-
for (var y = 0; y <
|
|
750
|
-
var k =
|
|
750
|
+
for (var y = 0; y < D; y++) {
|
|
751
|
+
var k = d[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
751
752
|
o[b + y >>> 2] |= k << 24 - (b + y) % 4 * 8;
|
|
752
753
|
}
|
|
753
754
|
else
|
|
754
|
-
for (var R = 0; R <
|
|
755
|
-
o[b + R >>> 2] =
|
|
756
|
-
return this.sigBytes +=
|
|
755
|
+
for (var R = 0; R < D; R += 4)
|
|
756
|
+
o[b + R >>> 2] = d[R >>> 2];
|
|
757
|
+
return this.sigBytes += D, this;
|
|
757
758
|
},
|
|
758
759
|
/**
|
|
759
760
|
* Removes insignificant bits.
|
|
@@ -793,7 +794,7 @@ function M() {
|
|
|
793
794
|
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
|
794
795
|
*/
|
|
795
796
|
random: function(i) {
|
|
796
|
-
for (var o = [],
|
|
797
|
+
for (var o = [], d = 0; d < i; d += 4)
|
|
797
798
|
o.push(m());
|
|
798
799
|
return new E.init(o, i);
|
|
799
800
|
}
|
|
@@ -812,8 +813,8 @@ function M() {
|
|
|
812
813
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
813
814
|
*/
|
|
814
815
|
stringify: function(i) {
|
|
815
|
-
for (var o = i.words,
|
|
816
|
-
var y = o[
|
|
816
|
+
for (var o = i.words, d = i.sigBytes, b = [], D = 0; D < d; D++) {
|
|
817
|
+
var y = o[D >>> 2] >>> 24 - D % 4 * 8 & 255;
|
|
817
818
|
b.push((y >>> 4).toString(16)), b.push((y & 15).toString(16));
|
|
818
819
|
}
|
|
819
820
|
return b.join("");
|
|
@@ -832,9 +833,9 @@ function M() {
|
|
|
832
833
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
833
834
|
*/
|
|
834
835
|
parse: function(i) {
|
|
835
|
-
for (var o = i.length,
|
|
836
|
-
|
|
837
|
-
return new E.init(
|
|
836
|
+
for (var o = i.length, d = [], b = 0; b < o; b += 2)
|
|
837
|
+
d[b >>> 3] |= parseInt(i.substr(b, 2), 16) << 24 - b % 8 * 4;
|
|
838
|
+
return new E.init(d, o / 2);
|
|
838
839
|
}
|
|
839
840
|
}, f = a.Latin1 = {
|
|
840
841
|
/**
|
|
@@ -851,8 +852,8 @@ function M() {
|
|
|
851
852
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
852
853
|
*/
|
|
853
854
|
stringify: function(i) {
|
|
854
|
-
for (var o = i.words,
|
|
855
|
-
var y = o[
|
|
855
|
+
for (var o = i.words, d = i.sigBytes, b = [], D = 0; D < d; D++) {
|
|
856
|
+
var y = o[D >>> 2] >>> 24 - D % 4 * 8 & 255;
|
|
856
857
|
b.push(String.fromCharCode(y));
|
|
857
858
|
}
|
|
858
859
|
return b.join("");
|
|
@@ -871,9 +872,9 @@ function M() {
|
|
|
871
872
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
872
873
|
*/
|
|
873
874
|
parse: function(i) {
|
|
874
|
-
for (var o = i.length,
|
|
875
|
-
|
|
876
|
-
return new E.init(
|
|
875
|
+
for (var o = i.length, d = [], b = 0; b < o; b++)
|
|
876
|
+
d[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
877
|
+
return new E.init(d, o);
|
|
877
878
|
}
|
|
878
879
|
}, v = a.Utf8 = {
|
|
879
880
|
/**
|
|
@@ -912,7 +913,7 @@ function M() {
|
|
|
912
913
|
parse: function(i) {
|
|
913
914
|
return f.parse(unescape(encodeURIComponent(i)));
|
|
914
915
|
}
|
|
915
|
-
},
|
|
916
|
+
}, l = x.BufferedBlockAlgorithm = n.extend({
|
|
916
917
|
/**
|
|
917
918
|
* Resets this block algorithm's data buffer to its initial state.
|
|
918
919
|
*
|
|
@@ -951,13 +952,13 @@ function M() {
|
|
|
951
952
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
952
953
|
*/
|
|
953
954
|
_process: function(i) {
|
|
954
|
-
var o,
|
|
955
|
+
var o, d = this._data, b = d.words, D = d.sigBytes, y = this.blockSize, k = y * 4, R = D / k;
|
|
955
956
|
i ? R = e.ceil(R) : R = e.max((R | 0) - this._minBufferSize, 0);
|
|
956
|
-
var F = R * y, w = e.min(F * 4,
|
|
957
|
+
var F = R * y, w = e.min(F * 4, D);
|
|
957
958
|
if (F) {
|
|
958
959
|
for (var H = 0; H < F; H += y)
|
|
959
960
|
this._doProcessBlock(b, H);
|
|
960
|
-
o = b.splice(0, F),
|
|
961
|
+
o = b.splice(0, F), d.sigBytes -= w;
|
|
961
962
|
}
|
|
962
963
|
return new E.init(o, w);
|
|
963
964
|
},
|
|
@@ -976,7 +977,7 @@ function M() {
|
|
|
976
977
|
},
|
|
977
978
|
_minBufferSize: 0
|
|
978
979
|
});
|
|
979
|
-
x.Hasher =
|
|
980
|
+
x.Hasher = l.extend({
|
|
980
981
|
/**
|
|
981
982
|
* Configuration options.
|
|
982
983
|
*/
|
|
@@ -1001,7 +1002,7 @@ function M() {
|
|
|
1001
1002
|
* hasher.reset();
|
|
1002
1003
|
*/
|
|
1003
1004
|
reset: function() {
|
|
1004
|
-
|
|
1005
|
+
l.reset.call(this), this._doReset();
|
|
1005
1006
|
},
|
|
1006
1007
|
/**
|
|
1007
1008
|
* Updates this hasher with a message.
|
|
@@ -1052,8 +1053,8 @@ function M() {
|
|
|
1052
1053
|
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
|
1053
1054
|
*/
|
|
1054
1055
|
_createHelper: function(i) {
|
|
1055
|
-
return function(o,
|
|
1056
|
-
return new i.init(
|
|
1056
|
+
return function(o, d) {
|
|
1057
|
+
return new i.init(d).finalize(o);
|
|
1057
1058
|
};
|
|
1058
1059
|
},
|
|
1059
1060
|
/**
|
|
@@ -1070,12 +1071,12 @@ function M() {
|
|
|
1070
1071
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
|
1071
1072
|
*/
|
|
1072
1073
|
_createHmacHelper: function(i) {
|
|
1073
|
-
return function(o,
|
|
1074
|
-
return new
|
|
1074
|
+
return function(o, d) {
|
|
1075
|
+
return new g.HMAC.init(i, d).finalize(o);
|
|
1075
1076
|
};
|
|
1076
1077
|
}
|
|
1077
1078
|
});
|
|
1078
|
-
var
|
|
1079
|
+
var g = C.algo = {};
|
|
1079
1080
|
return C;
|
|
1080
1081
|
})(Math);
|
|
1081
1082
|
return t;
|
|
@@ -1083,13 +1084,13 @@ function M() {
|
|
|
1083
1084
|
})(w0)), w0.exports;
|
|
1084
1085
|
}
|
|
1085
1086
|
var k0 = { exports: {} }, Et = k0.exports, qr;
|
|
1086
|
-
function
|
|
1087
|
-
return qr || (qr = 1, (function(r,
|
|
1087
|
+
function ur() {
|
|
1088
|
+
return qr || (qr = 1, (function(r, h) {
|
|
1088
1089
|
(function(t, e) {
|
|
1089
1090
|
r.exports = e(M());
|
|
1090
1091
|
})(Et, function(t) {
|
|
1091
1092
|
return (function(e) {
|
|
1092
|
-
var
|
|
1093
|
+
var u = t, p = u.lib, m = p.Base, B = p.WordArray, C = u.x64 = {};
|
|
1093
1094
|
C.Word = m.extend({
|
|
1094
1095
|
/**
|
|
1095
1096
|
* Initializes a newly created 64-bit word.
|
|
@@ -1314,13 +1315,13 @@ function dr() {
|
|
|
1314
1315
|
}
|
|
1315
1316
|
var S0 = { exports: {} }, At = S0.exports, Tr;
|
|
1316
1317
|
function Ft() {
|
|
1317
|
-
return Tr || (Tr = 1, (function(r,
|
|
1318
|
+
return Tr || (Tr = 1, (function(r, h) {
|
|
1318
1319
|
(function(t, e) {
|
|
1319
1320
|
r.exports = e(M());
|
|
1320
1321
|
})(At, function(t) {
|
|
1321
1322
|
return (function() {
|
|
1322
1323
|
if (typeof ArrayBuffer == "function") {
|
|
1323
|
-
var e = t,
|
|
1324
|
+
var e = t, u = e.lib, p = u.WordArray, m = p.init, B = p.init = function(C) {
|
|
1324
1325
|
if (C instanceof ArrayBuffer && (C = new Uint8Array(C)), (C instanceof Int8Array || typeof Uint8ClampedArray < "u" && C instanceof Uint8ClampedArray || C instanceof Int16Array || C instanceof Uint16Array || C instanceof Int32Array || C instanceof Uint32Array || C instanceof Float32Array || C instanceof Float64Array) && (C = new Uint8Array(C.buffer, C.byteOffset, C.byteLength)), C instanceof Uint8Array) {
|
|
1325
1326
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1326
1327
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
@@ -1334,14 +1335,14 @@ function Ft() {
|
|
|
1334
1335
|
});
|
|
1335
1336
|
})(S0)), S0.exports;
|
|
1336
1337
|
}
|
|
1337
|
-
var H0 = { exports: {} },
|
|
1338
|
-
function
|
|
1339
|
-
return Mr || (Mr = 1, (function(r,
|
|
1338
|
+
var H0 = { exports: {} }, Dt = H0.exports, Mr;
|
|
1339
|
+
function gt() {
|
|
1340
|
+
return Mr || (Mr = 1, (function(r, h) {
|
|
1340
1341
|
(function(t, e) {
|
|
1341
1342
|
r.exports = e(M());
|
|
1342
|
-
})(
|
|
1343
|
+
})(Dt, function(t) {
|
|
1343
1344
|
return (function() {
|
|
1344
|
-
var e = t,
|
|
1345
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1345
1346
|
m.Utf16 = m.Utf16BE = {
|
|
1346
1347
|
/**
|
|
1347
1348
|
* Converts a word array to a UTF-16 BE string.
|
|
@@ -1430,12 +1431,12 @@ function Dt() {
|
|
|
1430
1431
|
}
|
|
1431
1432
|
var $0 = { exports: {} }, bt = $0.exports, Nr;
|
|
1432
1433
|
function s0() {
|
|
1433
|
-
return Nr || (Nr = 1, (function(r,
|
|
1434
|
+
return Nr || (Nr = 1, (function(r, h) {
|
|
1434
1435
|
(function(t, e) {
|
|
1435
1436
|
r.exports = e(M());
|
|
1436
1437
|
})(bt, function(t) {
|
|
1437
1438
|
return (function() {
|
|
1438
|
-
var e = t,
|
|
1439
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1439
1440
|
m.Base64 = {
|
|
1440
1441
|
/**
|
|
1441
1442
|
* Converts a word array to a Base64 string.
|
|
@@ -1454,8 +1455,8 @@ function s0() {
|
|
|
1454
1455
|
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1455
1456
|
C.clamp();
|
|
1456
1457
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1457
|
-
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, v = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255,
|
|
1458
|
-
a.push(E.charAt(
|
|
1458
|
+
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, v = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, l = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, g = f << 16 | v << 8 | l, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1459
|
+
a.push(E.charAt(g >>> 6 * (3 - i) & 63));
|
|
1459
1460
|
var o = E.charAt(64);
|
|
1460
1461
|
if (o)
|
|
1461
1462
|
for (; a.length % 4; )
|
|
@@ -1494,8 +1495,8 @@ function s0() {
|
|
|
1494
1495
|
function B(C, x, n) {
|
|
1495
1496
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1496
1497
|
if (s % 4) {
|
|
1497
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2,
|
|
1498
|
-
E[a >>> 2] |=
|
|
1498
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1499
|
+
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1499
1500
|
}
|
|
1500
1501
|
return p.create(E, a);
|
|
1501
1502
|
}
|
|
@@ -1505,12 +1506,12 @@ function s0() {
|
|
|
1505
1506
|
}
|
|
1506
1507
|
var R0 = { exports: {} }, mt = R0.exports, Ur;
|
|
1507
1508
|
function _t() {
|
|
1508
|
-
return Ur || (Ur = 1, (function(r,
|
|
1509
|
+
return Ur || (Ur = 1, (function(r, h) {
|
|
1509
1510
|
(function(t, e) {
|
|
1510
1511
|
r.exports = e(M());
|
|
1511
1512
|
})(mt, function(t) {
|
|
1512
1513
|
return (function() {
|
|
1513
|
-
var e = t,
|
|
1514
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1514
1515
|
m.Base64url = {
|
|
1515
1516
|
/**
|
|
1516
1517
|
* Converts a word array to a Base64url string.
|
|
@@ -1532,12 +1533,12 @@ function _t() {
|
|
|
1532
1533
|
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1533
1534
|
C.clamp();
|
|
1534
1535
|
for (var s = [], f = 0; f < E; f += 3)
|
|
1535
|
-
for (var v = n[f >>> 2] >>> 24 - f % 4 * 8 & 255,
|
|
1536
|
+
for (var v = n[f >>> 2] >>> 24 - f % 4 * 8 & 255, l = n[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, g = n[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, i = v << 16 | l << 8 | g, o = 0; o < 4 && f + o * 0.75 < E; o++)
|
|
1536
1537
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1537
|
-
var
|
|
1538
|
-
if (
|
|
1538
|
+
var d = a.charAt(64);
|
|
1539
|
+
if (d)
|
|
1539
1540
|
for (; s.length % 4; )
|
|
1540
|
-
s.push(
|
|
1541
|
+
s.push(d);
|
|
1541
1542
|
return s.join("");
|
|
1542
1543
|
},
|
|
1543
1544
|
/**
|
|
@@ -1576,8 +1577,8 @@ function _t() {
|
|
|
1576
1577
|
function B(C, x, n) {
|
|
1577
1578
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1578
1579
|
if (s % 4) {
|
|
1579
|
-
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2,
|
|
1580
|
-
E[a >>> 2] |=
|
|
1580
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1581
|
+
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1581
1582
|
}
|
|
1582
1583
|
return p.create(E, a);
|
|
1583
1584
|
}
|
|
@@ -1587,12 +1588,12 @@ function _t() {
|
|
|
1587
1588
|
}
|
|
1588
1589
|
var P0 = { exports: {} }, yt = P0.exports, jr;
|
|
1589
1590
|
function c0() {
|
|
1590
|
-
return jr || (jr = 1, (function(r,
|
|
1591
|
+
return jr || (jr = 1, (function(r, h) {
|
|
1591
1592
|
(function(t, e) {
|
|
1592
1593
|
r.exports = e(M());
|
|
1593
1594
|
})(yt, function(t) {
|
|
1594
1595
|
return (function(e) {
|
|
1595
|
-
var
|
|
1596
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = [];
|
|
1596
1597
|
(function() {
|
|
1597
1598
|
for (var v = 0; v < 64; v++)
|
|
1598
1599
|
x[v] = e.abs(e.sin(v + 1)) * 4294967296 | 0;
|
|
@@ -1606,22 +1607,22 @@ function c0() {
|
|
|
1606
1607
|
271733878
|
|
1607
1608
|
]);
|
|
1608
1609
|
},
|
|
1609
|
-
_doProcessBlock: function(v,
|
|
1610
|
-
for (var
|
|
1611
|
-
var i =
|
|
1610
|
+
_doProcessBlock: function(v, l) {
|
|
1611
|
+
for (var g = 0; g < 16; g++) {
|
|
1612
|
+
var i = l + g, o = v[i];
|
|
1612
1613
|
v[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1613
1614
|
}
|
|
1614
|
-
var
|
|
1615
|
-
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A,
|
|
1615
|
+
var d = this._hash.words, b = v[l + 0], D = v[l + 1], y = v[l + 2], k = v[l + 3], R = v[l + 4], F = v[l + 5], w = v[l + 6], H = v[l + 7], $ = v[l + 8], W = v[l + 9], O = v[l + 10], q = v[l + 11], U = v[l + 12], T = v[l + 13], N = v[l + 14], j = v[l + 15], S = d[0], c = d[1], A = d[2], _ = d[3];
|
|
1616
|
+
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, D, 12, x[1]), A = E(A, _, S, c, y, 17, x[2]), c = E(c, A, _, S, k, 22, x[3]), S = E(S, c, A, _, R, 7, x[4]), _ = E(_, S, c, A, F, 12, x[5]), A = E(A, _, S, c, w, 17, x[6]), c = E(c, A, _, S, H, 22, x[7]), S = E(S, c, A, _, $, 7, x[8]), _ = E(_, S, c, A, W, 12, x[9]), A = E(A, _, S, c, O, 17, x[10]), c = E(c, A, _, S, q, 22, x[11]), S = E(S, c, A, _, U, 7, x[12]), _ = E(_, S, c, A, T, 12, x[13]), A = E(A, _, S, c, N, 17, x[14]), c = E(c, A, _, S, j, 22, x[15]), S = a(S, c, A, _, D, 5, x[16]), _ = a(_, S, c, A, w, 9, x[17]), A = a(A, _, S, c, q, 14, x[18]), c = a(c, A, _, S, b, 20, x[19]), S = a(S, c, A, _, F, 5, x[20]), _ = a(_, S, c, A, O, 9, x[21]), A = a(A, _, S, c, j, 14, x[22]), c = a(c, A, _, S, R, 20, x[23]), S = a(S, c, A, _, W, 5, x[24]), _ = a(_, S, c, A, N, 9, x[25]), A = a(A, _, S, c, k, 14, x[26]), c = a(c, A, _, S, $, 20, x[27]), S = a(S, c, A, _, T, 5, x[28]), _ = a(_, S, c, A, y, 9, x[29]), A = a(A, _, S, c, H, 14, x[30]), c = a(c, A, _, S, U, 20, x[31]), S = s(S, c, A, _, F, 4, x[32]), _ = s(_, S, c, A, $, 11, x[33]), A = s(A, _, S, c, q, 16, x[34]), c = s(c, A, _, S, N, 23, x[35]), S = s(S, c, A, _, D, 4, x[36]), _ = s(_, S, c, A, R, 11, x[37]), A = s(A, _, S, c, H, 16, x[38]), c = s(c, A, _, S, O, 23, x[39]), S = s(S, c, A, _, T, 4, x[40]), _ = s(_, S, c, A, b, 11, x[41]), A = s(A, _, S, c, k, 16, x[42]), c = s(c, A, _, S, w, 23, x[43]), S = s(S, c, A, _, W, 4, x[44]), _ = s(_, S, c, A, U, 11, x[45]), A = s(A, _, S, c, j, 16, x[46]), c = s(c, A, _, S, y, 23, x[47]), S = f(S, c, A, _, b, 6, x[48]), _ = f(_, S, c, A, H, 10, x[49]), A = f(A, _, S, c, N, 15, x[50]), c = f(c, A, _, S, F, 21, x[51]), S = f(S, c, A, _, U, 6, x[52]), _ = f(_, S, c, A, k, 10, x[53]), A = f(A, _, S, c, O, 15, x[54]), c = f(c, A, _, S, D, 21, x[55]), S = f(S, c, A, _, $, 6, x[56]), _ = f(_, S, c, A, j, 10, x[57]), A = f(A, _, S, c, w, 15, x[58]), c = f(c, A, _, S, T, 21, x[59]), S = f(S, c, A, _, R, 6, x[60]), _ = f(_, S, c, A, q, 10, x[61]), A = f(A, _, S, c, y, 15, x[62]), c = f(c, A, _, S, W, 21, x[63]), d[0] = d[0] + S | 0, d[1] = d[1] + c | 0, d[2] = d[2] + A | 0, d[3] = d[3] + _ | 0;
|
|
1616
1617
|
},
|
|
1617
1618
|
_doFinalize: function() {
|
|
1618
|
-
var v = this._data,
|
|
1619
|
-
|
|
1620
|
-
var o = e.floor(
|
|
1621
|
-
|
|
1622
|
-
for (var b = this._hash,
|
|
1623
|
-
var k =
|
|
1624
|
-
|
|
1619
|
+
var v = this._data, l = v.words, g = this._nDataBytes * 8, i = v.sigBytes * 8;
|
|
1620
|
+
l[i >>> 5] |= 128 << 24 - i % 32;
|
|
1621
|
+
var o = e.floor(g / 4294967296), d = g;
|
|
1622
|
+
l[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, l[(i + 64 >>> 9 << 4) + 14] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360, v.sigBytes = (l.length + 1) * 4, this._process();
|
|
1623
|
+
for (var b = this._hash, D = b.words, y = 0; y < 4; y++) {
|
|
1624
|
+
var k = D[y];
|
|
1625
|
+
D[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
1625
1626
|
}
|
|
1626
1627
|
return b;
|
|
1627
1628
|
},
|
|
@@ -1630,35 +1631,35 @@ function c0() {
|
|
|
1630
1631
|
return v._hash = this._hash.clone(), v;
|
|
1631
1632
|
}
|
|
1632
1633
|
});
|
|
1633
|
-
function E(v,
|
|
1634
|
-
var
|
|
1635
|
-
return (
|
|
1634
|
+
function E(v, l, g, i, o, d, b) {
|
|
1635
|
+
var D = v + (l & g | ~l & i) + o + b;
|
|
1636
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1636
1637
|
}
|
|
1637
|
-
function a(v,
|
|
1638
|
-
var
|
|
1639
|
-
return (
|
|
1638
|
+
function a(v, l, g, i, o, d, b) {
|
|
1639
|
+
var D = v + (l & i | g & ~i) + o + b;
|
|
1640
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1640
1641
|
}
|
|
1641
|
-
function s(v,
|
|
1642
|
-
var
|
|
1643
|
-
return (
|
|
1642
|
+
function s(v, l, g, i, o, d, b) {
|
|
1643
|
+
var D = v + (l ^ g ^ i) + o + b;
|
|
1644
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1644
1645
|
}
|
|
1645
|
-
function f(v,
|
|
1646
|
-
var
|
|
1647
|
-
return (
|
|
1646
|
+
function f(v, l, g, i, o, d, b) {
|
|
1647
|
+
var D = v + (g ^ (l | ~i)) + o + b;
|
|
1648
|
+
return (D << d | D >>> 32 - d) + l;
|
|
1648
1649
|
}
|
|
1649
|
-
|
|
1650
|
+
u.MD5 = B._createHelper(n), u.HmacMD5 = B._createHmacHelper(n);
|
|
1650
1651
|
})(Math), t.MD5;
|
|
1651
1652
|
});
|
|
1652
1653
|
})(P0)), P0.exports;
|
|
1653
1654
|
}
|
|
1654
|
-
var
|
|
1655
|
+
var W0 = { exports: {} }, wt = W0.exports, Gr;
|
|
1655
1656
|
function ke() {
|
|
1656
|
-
return Gr || (Gr = 1, (function(r,
|
|
1657
|
+
return Gr || (Gr = 1, (function(r, h) {
|
|
1657
1658
|
(function(t, e) {
|
|
1658
1659
|
r.exports = e(M());
|
|
1659
1660
|
})(wt, function(t) {
|
|
1660
1661
|
return (function() {
|
|
1661
|
-
var e = t,
|
|
1662
|
+
var e = t, u = e.lib, p = u.WordArray, m = u.Hasher, B = e.algo, C = [], x = B.SHA1 = m.extend({
|
|
1662
1663
|
_doReset: function() {
|
|
1663
1664
|
this._hash = new p.init([
|
|
1664
1665
|
1732584193,
|
|
@@ -1669,17 +1670,17 @@ function ke() {
|
|
|
1669
1670
|
]);
|
|
1670
1671
|
},
|
|
1671
1672
|
_doProcessBlock: function(n, E) {
|
|
1672
|
-
for (var a = this._hash.words, s = a[0], f = a[1], v = a[2],
|
|
1673
|
+
for (var a = this._hash.words, s = a[0], f = a[1], v = a[2], l = a[3], g = a[4], i = 0; i < 80; i++) {
|
|
1673
1674
|
if (i < 16)
|
|
1674
1675
|
C[i] = n[E + i] | 0;
|
|
1675
1676
|
else {
|
|
1676
1677
|
var o = C[i - 3] ^ C[i - 8] ^ C[i - 14] ^ C[i - 16];
|
|
1677
1678
|
C[i] = o << 1 | o >>> 31;
|
|
1678
1679
|
}
|
|
1679
|
-
var
|
|
1680
|
-
i < 20 ?
|
|
1680
|
+
var d = (s << 5 | s >>> 27) + g + C[i];
|
|
1681
|
+
i < 20 ? d += (f & v | ~f & l) + 1518500249 : i < 40 ? d += (f ^ v ^ l) + 1859775393 : i < 60 ? d += (f & v | f & l | v & l) - 1894007588 : d += (f ^ v ^ l) - 899497514, g = l, l = v, v = f << 30 | f >>> 2, f = s, s = d;
|
|
1681
1682
|
}
|
|
1682
|
-
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] + v | 0, a[3] = a[3] +
|
|
1683
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] + v | 0, a[3] = a[3] + l | 0, a[4] = a[4] + g | 0;
|
|
1683
1684
|
},
|
|
1684
1685
|
_doFinalize: function() {
|
|
1685
1686
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
@@ -1693,68 +1694,68 @@ function ke() {
|
|
|
1693
1694
|
e.SHA1 = m._createHelper(x), e.HmacSHA1 = m._createHmacHelper(x);
|
|
1694
1695
|
})(), t.SHA1;
|
|
1695
1696
|
});
|
|
1696
|
-
})(
|
|
1697
|
+
})(W0)), W0.exports;
|
|
1697
1698
|
}
|
|
1698
|
-
var
|
|
1699
|
+
var z0 = { exports: {} }, kt = z0.exports, Kr;
|
|
1699
1700
|
function Fr() {
|
|
1700
|
-
return Kr || (Kr = 1, (function(r,
|
|
1701
|
+
return Kr || (Kr = 1, (function(r, h) {
|
|
1701
1702
|
(function(t, e) {
|
|
1702
1703
|
r.exports = e(M());
|
|
1703
1704
|
})(kt, function(t) {
|
|
1704
1705
|
return (function(e) {
|
|
1705
|
-
var
|
|
1706
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = [], n = [];
|
|
1706
1707
|
(function() {
|
|
1707
|
-
function s(
|
|
1708
|
-
for (var i = e.sqrt(
|
|
1709
|
-
if (!(
|
|
1708
|
+
function s(g) {
|
|
1709
|
+
for (var i = e.sqrt(g), o = 2; o <= i; o++)
|
|
1710
|
+
if (!(g % o))
|
|
1710
1711
|
return !1;
|
|
1711
1712
|
return !0;
|
|
1712
1713
|
}
|
|
1713
|
-
function f(
|
|
1714
|
-
return (
|
|
1714
|
+
function f(g) {
|
|
1715
|
+
return (g - (g | 0)) * 4294967296 | 0;
|
|
1715
1716
|
}
|
|
1716
|
-
for (var v = 2,
|
|
1717
|
-
s(v) && (
|
|
1717
|
+
for (var v = 2, l = 0; l < 64; )
|
|
1718
|
+
s(v) && (l < 8 && (x[l] = f(e.pow(v, 1 / 2))), n[l] = f(e.pow(v, 1 / 3)), l++), v++;
|
|
1718
1719
|
})();
|
|
1719
1720
|
var E = [], a = C.SHA256 = B.extend({
|
|
1720
1721
|
_doReset: function() {
|
|
1721
1722
|
this._hash = new m.init(x.slice(0));
|
|
1722
1723
|
},
|
|
1723
1724
|
_doProcessBlock: function(s, f) {
|
|
1724
|
-
for (var v = this._hash.words,
|
|
1725
|
+
for (var v = this._hash.words, l = v[0], g = v[1], i = v[2], o = v[3], d = v[4], b = v[5], D = v[6], y = v[7], k = 0; k < 64; k++) {
|
|
1725
1726
|
if (k < 16)
|
|
1726
1727
|
E[k] = s[f + k] | 0;
|
|
1727
1728
|
else {
|
|
1728
1729
|
var R = E[k - 15], F = (R << 25 | R >>> 7) ^ (R << 14 | R >>> 18) ^ R >>> 3, w = E[k - 2], H = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
|
|
1729
1730
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1730
1731
|
}
|
|
1731
|
-
var $ =
|
|
1732
|
-
y =
|
|
1732
|
+
var $ = d & b ^ ~d & D, W = l & g ^ l & i ^ g & i, O = (l << 30 | l >>> 2) ^ (l << 19 | l >>> 13) ^ (l << 10 | l >>> 22), q = (d << 26 | d >>> 6) ^ (d << 21 | d >>> 11) ^ (d << 7 | d >>> 25), U = y + q + $ + n[k] + E[k], T = O + W;
|
|
1733
|
+
y = D, D = b, b = d, d = o + U | 0, o = i, i = g, g = l, l = U + T | 0;
|
|
1733
1734
|
}
|
|
1734
|
-
v[0] = v[0] +
|
|
1735
|
+
v[0] = v[0] + l | 0, v[1] = v[1] + g | 0, v[2] = v[2] + i | 0, v[3] = v[3] + o | 0, v[4] = v[4] + d | 0, v[5] = v[5] + b | 0, v[6] = v[6] + D | 0, v[7] = v[7] + y | 0;
|
|
1735
1736
|
},
|
|
1736
1737
|
_doFinalize: function() {
|
|
1737
|
-
var s = this._data, f = s.words, v = this._nDataBytes * 8,
|
|
1738
|
-
return f[
|
|
1738
|
+
var s = this._data, f = s.words, v = this._nDataBytes * 8, l = s.sigBytes * 8;
|
|
1739
|
+
return f[l >>> 5] |= 128 << 24 - l % 32, f[(l + 64 >>> 9 << 4) + 14] = e.floor(v / 4294967296), f[(l + 64 >>> 9 << 4) + 15] = v, s.sigBytes = f.length * 4, this._process(), this._hash;
|
|
1739
1740
|
},
|
|
1740
1741
|
clone: function() {
|
|
1741
1742
|
var s = B.clone.call(this);
|
|
1742
1743
|
return s._hash = this._hash.clone(), s;
|
|
1743
1744
|
}
|
|
1744
1745
|
});
|
|
1745
|
-
|
|
1746
|
+
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1746
1747
|
})(Math), t.SHA256;
|
|
1747
1748
|
});
|
|
1748
|
-
})(
|
|
1749
|
+
})(z0)), z0.exports;
|
|
1749
1750
|
}
|
|
1750
1751
|
var I0 = { exports: {} }, St = I0.exports, Xr;
|
|
1751
1752
|
function Ht() {
|
|
1752
|
-
return Xr || (Xr = 1, (function(r,
|
|
1753
|
-
(function(t, e,
|
|
1753
|
+
return Xr || (Xr = 1, (function(r, h) {
|
|
1754
|
+
(function(t, e, u) {
|
|
1754
1755
|
r.exports = e(M(), Fr());
|
|
1755
1756
|
})(St, function(t) {
|
|
1756
1757
|
return (function() {
|
|
1757
|
-
var e = t,
|
|
1758
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.algo, B = m.SHA256, C = m.SHA224 = B.extend({
|
|
1758
1759
|
_doReset: function() {
|
|
1759
1760
|
this._hash = new p.init([
|
|
1760
1761
|
3238371032,
|
|
@@ -1779,12 +1780,12 @@ function Ht() {
|
|
|
1779
1780
|
}
|
|
1780
1781
|
var L0 = { exports: {} }, $t = L0.exports, Yr;
|
|
1781
1782
|
function Se() {
|
|
1782
|
-
return Yr || (Yr = 1, (function(r,
|
|
1783
|
-
(function(t, e,
|
|
1784
|
-
r.exports = e(M(),
|
|
1783
|
+
return Yr || (Yr = 1, (function(r, h) {
|
|
1784
|
+
(function(t, e, u) {
|
|
1785
|
+
r.exports = e(M(), ur());
|
|
1785
1786
|
})($t, function(t) {
|
|
1786
1787
|
return (function() {
|
|
1787
|
-
var e = t,
|
|
1788
|
+
var e = t, u = e.lib, p = u.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
1788
1789
|
function n() {
|
|
1789
1790
|
return B.create.apply(B, arguments);
|
|
1790
1791
|
}
|
|
@@ -1888,22 +1889,22 @@ function Se() {
|
|
|
1888
1889
|
]);
|
|
1889
1890
|
},
|
|
1890
1891
|
_doProcessBlock: function(f, v) {
|
|
1891
|
-
for (var
|
|
1892
|
-
var J, x0, b0 = a[
|
|
1893
|
-
if (
|
|
1894
|
-
x0 = b0.high = f[v +
|
|
1892
|
+
for (var l = this._hash.words, g = l[0], i = l[1], o = l[2], d = l[3], b = l[4], D = l[5], y = l[6], k = l[7], R = g.high, F = g.low, w = i.high, H = i.low, $ = o.high, W = o.low, O = d.high, q = d.low, U = b.high, T = b.low, N = D.high, j = D.low, S = y.high, c = y.low, A = k.high, _ = k.low, z = R, P = F, L = w, I = H, Z = $, V = W, o0 = O, K = q, G = U, Y = T, r0 = N, f0 = j, g0 = S, p0 = c, dr = A, B0 = _, e0 = 0; e0 < 80; e0++) {
|
|
1893
|
+
var J, x0, b0 = a[e0];
|
|
1894
|
+
if (e0 < 16)
|
|
1895
|
+
x0 = b0.high = f[v + e0 * 2] | 0, J = b0.low = f[v + e0 * 2 + 1] | 0;
|
|
1895
1896
|
else {
|
|
1896
|
-
var br = a[
|
|
1897
|
+
var br = a[e0 - 15], u0 = br.high, C0 = br.low, Ie = (u0 >>> 1 | C0 << 31) ^ (u0 >>> 8 | C0 << 24) ^ u0 >>> 7, mr = (C0 >>> 1 | u0 << 31) ^ (C0 >>> 8 | u0 << 24) ^ (C0 >>> 7 | u0 << 25), _r = a[e0 - 2], d0 = _r.high, E0 = _r.low, Le = (d0 >>> 19 | E0 << 13) ^ (d0 << 3 | E0 >>> 29) ^ d0 >>> 6, yr = (E0 >>> 19 | d0 << 13) ^ (E0 << 3 | d0 >>> 29) ^ (E0 >>> 6 | d0 << 26), wr = a[e0 - 7], Oe = wr.high, qe = wr.low, kr = a[e0 - 16], Te = kr.high, Sr = kr.low;
|
|
1897
1898
|
J = mr + qe, x0 = Ie + Oe + (J >>> 0 < mr >>> 0 ? 1 : 0), J = J + yr, x0 = x0 + Le + (J >>> 0 < yr >>> 0 ? 1 : 0), J = J + Sr, x0 = x0 + Te + (J >>> 0 < Sr >>> 0 ? 1 : 0), b0.high = x0, b0.low = J;
|
|
1898
1899
|
}
|
|
1899
|
-
var Me = G &
|
|
1900
|
-
|
|
1900
|
+
var Me = G & r0 ^ ~G & g0, Hr = Y & f0 ^ ~Y & p0, Ne = z & L ^ z & Z ^ L & Z, Ue = P & I ^ P & V ^ I & V, je = (z >>> 28 | P << 4) ^ (z << 30 | P >>> 2) ^ (z << 25 | P >>> 7), $r = (P >>> 28 | z << 4) ^ (P << 30 | z >>> 2) ^ (P << 25 | z >>> 7), Ge = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Ke = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Rr = E[e0], Xe = Rr.high, Pr = Rr.low, Q = B0 + Ke, n0 = dr + Ge + (Q >>> 0 < B0 >>> 0 ? 1 : 0), Q = Q + Hr, n0 = n0 + Me + (Q >>> 0 < Hr >>> 0 ? 1 : 0), Q = Q + Pr, n0 = n0 + Xe + (Q >>> 0 < Pr >>> 0 ? 1 : 0), Q = Q + J, n0 = n0 + x0 + (Q >>> 0 < J >>> 0 ? 1 : 0), Wr = $r + Ue, Ye = je + Ne + (Wr >>> 0 < $r >>> 0 ? 1 : 0);
|
|
1901
|
+
dr = g0, B0 = p0, g0 = r0, p0 = f0, r0 = G, f0 = Y, Y = K + Q | 0, G = o0 + n0 + (Y >>> 0 < K >>> 0 ? 1 : 0) | 0, o0 = Z, K = V, Z = L, V = I, L = z, I = P, P = Q + Wr | 0, z = n0 + Ye + (P >>> 0 < Q >>> 0 ? 1 : 0) | 0;
|
|
1901
1902
|
}
|
|
1902
|
-
F =
|
|
1903
|
+
F = g.low = F + P, g.high = R + z + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + I, i.high = w + L + (H >>> 0 < I >>> 0 ? 1 : 0), W = o.low = W + V, o.high = $ + Z + (W >>> 0 < V >>> 0 ? 1 : 0), q = d.low = q + K, d.high = O + o0 + (q >>> 0 < K >>> 0 ? 1 : 0), T = b.low = T + Y, b.high = U + G + (T >>> 0 < Y >>> 0 ? 1 : 0), j = D.low = j + f0, D.high = N + r0 + (j >>> 0 < f0 >>> 0 ? 1 : 0), c = y.low = c + p0, y.high = S + g0 + (c >>> 0 < p0 >>> 0 ? 1 : 0), _ = k.low = _ + B0, k.high = A + dr + (_ >>> 0 < B0 >>> 0 ? 1 : 0);
|
|
1903
1904
|
},
|
|
1904
1905
|
_doFinalize: function() {
|
|
1905
|
-
var f = this._data, v = f.words,
|
|
1906
|
-
v[
|
|
1906
|
+
var f = this._data, v = f.words, l = this._nDataBytes * 8, g = f.sigBytes * 8;
|
|
1907
|
+
v[g >>> 5] |= 128 << 24 - g % 32, v[(g + 128 >>> 10 << 5) + 30] = Math.floor(l / 4294967296), v[(g + 128 >>> 10 << 5) + 31] = l, f.sigBytes = v.length * 4, this._process();
|
|
1907
1908
|
var i = this._hash.toX32();
|
|
1908
1909
|
return i;
|
|
1909
1910
|
},
|
|
@@ -1920,12 +1921,12 @@ function Se() {
|
|
|
1920
1921
|
}
|
|
1921
1922
|
var O0 = { exports: {} }, Rt = O0.exports, Zr;
|
|
1922
1923
|
function Pt() {
|
|
1923
|
-
return Zr || (Zr = 1, (function(r,
|
|
1924
|
-
(function(t, e,
|
|
1925
|
-
r.exports = e(M(),
|
|
1924
|
+
return Zr || (Zr = 1, (function(r, h) {
|
|
1925
|
+
(function(t, e, u) {
|
|
1926
|
+
r.exports = e(M(), ur(), Se());
|
|
1926
1927
|
})(Rt, function(t) {
|
|
1927
1928
|
return (function() {
|
|
1928
|
-
var e = t,
|
|
1929
|
+
var e = t, u = e.x64, p = u.Word, m = u.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1929
1930
|
_doReset: function() {
|
|
1930
1931
|
this._hash = new m.init([
|
|
1931
1932
|
new p.init(3418070365, 3238371032),
|
|
@@ -1948,24 +1949,24 @@ function Pt() {
|
|
|
1948
1949
|
});
|
|
1949
1950
|
})(O0)), O0.exports;
|
|
1950
1951
|
}
|
|
1951
|
-
var q0 = { exports: {} },
|
|
1952
|
-
function
|
|
1953
|
-
return
|
|
1954
|
-
(function(t, e,
|
|
1955
|
-
r.exports = e(M(),
|
|
1956
|
-
})(
|
|
1952
|
+
var q0 = { exports: {} }, Wt = q0.exports, Vr;
|
|
1953
|
+
function zt() {
|
|
1954
|
+
return Vr || (Vr = 1, (function(r, h) {
|
|
1955
|
+
(function(t, e, u) {
|
|
1956
|
+
r.exports = e(M(), ur());
|
|
1957
|
+
})(Wt, function(t) {
|
|
1957
1958
|
return (function(e) {
|
|
1958
|
-
var
|
|
1959
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
1959
1960
|
(function() {
|
|
1960
|
-
for (var
|
|
1961
|
-
E[
|
|
1962
|
-
var o =
|
|
1963
|
-
|
|
1961
|
+
for (var l = 1, g = 0, i = 0; i < 24; i++) {
|
|
1962
|
+
E[l + 5 * g] = (i + 1) * (i + 2) / 2 % 64;
|
|
1963
|
+
var o = g % 5, d = (2 * l + 3 * g) % 5;
|
|
1964
|
+
l = o, g = d;
|
|
1964
1965
|
}
|
|
1965
|
-
for (var
|
|
1966
|
-
for (var
|
|
1967
|
-
a[
|
|
1968
|
-
for (var b = 1,
|
|
1966
|
+
for (var l = 0; l < 5; l++)
|
|
1967
|
+
for (var g = 0; g < 5; g++)
|
|
1968
|
+
a[l + 5 * g] = g + (2 * l + 3 * g) % 5 * 5;
|
|
1969
|
+
for (var b = 1, D = 0; D < 24; D++) {
|
|
1969
1970
|
for (var y = 0, k = 0, R = 0; R < 7; R++) {
|
|
1970
1971
|
if (b & 1) {
|
|
1971
1972
|
var F = (1 << R) - 1;
|
|
@@ -1973,13 +1974,13 @@ function Wt() {
|
|
|
1973
1974
|
}
|
|
1974
1975
|
b & 128 ? b = b << 1 ^ 113 : b <<= 1;
|
|
1975
1976
|
}
|
|
1976
|
-
s[
|
|
1977
|
+
s[D] = x.create(y, k);
|
|
1977
1978
|
}
|
|
1978
1979
|
})();
|
|
1979
1980
|
var f = [];
|
|
1980
1981
|
(function() {
|
|
1981
|
-
for (var
|
|
1982
|
-
f[
|
|
1982
|
+
for (var l = 0; l < 25; l++)
|
|
1983
|
+
f[l] = x.create();
|
|
1983
1984
|
})();
|
|
1984
1985
|
var v = n.SHA3 = B.extend({
|
|
1985
1986
|
/**
|
|
@@ -1994,16 +1995,16 @@ function Wt() {
|
|
|
1994
1995
|
outputLength: 512
|
|
1995
1996
|
}),
|
|
1996
1997
|
_doReset: function() {
|
|
1997
|
-
for (var
|
|
1998
|
-
|
|
1998
|
+
for (var l = this._state = [], g = 0; g < 25; g++)
|
|
1999
|
+
l[g] = new x.init();
|
|
1999
2000
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2000
2001
|
},
|
|
2001
|
-
_doProcessBlock: function(
|
|
2002
|
-
for (var i = this._state, o = this.blockSize / 2,
|
|
2003
|
-
var b =
|
|
2004
|
-
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360,
|
|
2005
|
-
var y = i[
|
|
2006
|
-
y.high ^=
|
|
2002
|
+
_doProcessBlock: function(l, g) {
|
|
2003
|
+
for (var i = this._state, o = this.blockSize / 2, d = 0; d < o; d++) {
|
|
2004
|
+
var b = l[g + 2 * d], D = l[g + 2 * d + 1];
|
|
2005
|
+
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, D = (D << 8 | D >>> 24) & 16711935 | (D << 24 | D >>> 8) & 4278255360;
|
|
2006
|
+
var y = i[d];
|
|
2007
|
+
y.high ^= D, y.low ^= b;
|
|
2007
2008
|
}
|
|
2008
2009
|
for (var k = 0; k < 24; k++) {
|
|
2009
2010
|
for (var R = 0; R < 5; R++) {
|
|
@@ -2015,7 +2016,7 @@ function Wt() {
|
|
|
2015
2016
|
$.high = F, $.low = w;
|
|
2016
2017
|
}
|
|
2017
2018
|
for (var R = 0; R < 5; R++)
|
|
2018
|
-
for (var
|
|
2019
|
+
for (var W = f[(R + 4) % 5], O = f[(R + 1) % 5], q = O.high, U = O.low, F = W.high ^ (q << 1 | U >>> 31), w = W.low ^ (U << 1 | q >>> 31), H = 0; H < 5; H++) {
|
|
2019
2020
|
var y = i[R + 5 * H];
|
|
2020
2021
|
y.high ^= F, y.low ^= w;
|
|
2021
2022
|
}
|
|
@@ -2029,43 +2030,43 @@ function Wt() {
|
|
|
2029
2030
|
A.high = _.high, A.low = _.low;
|
|
2030
2031
|
for (var R = 0; R < 5; R++)
|
|
2031
2032
|
for (var H = 0; H < 5; H++) {
|
|
2032
|
-
var T = R + 5 * H, y = i[T],
|
|
2033
|
-
y.high =
|
|
2033
|
+
var T = R + 5 * H, y = i[T], z = f[T], P = f[(R + 1) % 5 + 5 * H], L = f[(R + 2) % 5 + 5 * H];
|
|
2034
|
+
y.high = z.high ^ ~P.high & L.high, y.low = z.low ^ ~P.low & L.low;
|
|
2034
2035
|
}
|
|
2035
2036
|
var y = i[0], I = s[k];
|
|
2036
2037
|
y.high ^= I.high, y.low ^= I.low;
|
|
2037
2038
|
}
|
|
2038
2039
|
},
|
|
2039
2040
|
_doFinalize: function() {
|
|
2040
|
-
var
|
|
2041
|
+
var l = this._data, g = l.words;
|
|
2041
2042
|
this._nDataBytes * 8;
|
|
2042
|
-
var i =
|
|
2043
|
-
|
|
2044
|
-
for (var
|
|
2045
|
-
var R =
|
|
2043
|
+
var i = l.sigBytes * 8, o = this.blockSize * 32;
|
|
2044
|
+
g[i >>> 5] |= 1 << 24 - i % 32, g[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, l.sigBytes = g.length * 4, this._process();
|
|
2045
|
+
for (var d = this._state, b = this.cfg.outputLength / 8, D = b / 8, y = [], k = 0; k < D; k++) {
|
|
2046
|
+
var R = d[k], F = R.high, w = R.low;
|
|
2046
2047
|
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);
|
|
2047
2048
|
}
|
|
2048
2049
|
return new m.init(y, b);
|
|
2049
2050
|
},
|
|
2050
2051
|
clone: function() {
|
|
2051
|
-
for (var
|
|
2052
|
-
|
|
2053
|
-
return
|
|
2052
|
+
for (var l = B.clone.call(this), g = l._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2053
|
+
g[i] = g[i].clone();
|
|
2054
|
+
return l;
|
|
2054
2055
|
}
|
|
2055
2056
|
});
|
|
2056
|
-
|
|
2057
|
+
u.SHA3 = B._createHelper(v), u.HmacSHA3 = B._createHmacHelper(v);
|
|
2057
2058
|
})(Math), t.SHA3;
|
|
2058
2059
|
});
|
|
2059
2060
|
})(q0)), q0.exports;
|
|
2060
2061
|
}
|
|
2061
|
-
var T0 = { exports: {} }, It = T0.exports,
|
|
2062
|
+
var T0 = { exports: {} }, It = T0.exports, Qr;
|
|
2062
2063
|
function Lt() {
|
|
2063
|
-
return
|
|
2064
|
+
return Qr || (Qr = 1, (function(r, h) {
|
|
2064
2065
|
(function(t, e) {
|
|
2065
2066
|
r.exports = e(M());
|
|
2066
2067
|
})(It, function(t) {
|
|
2067
2068
|
return (function(e) {
|
|
2068
|
-
var
|
|
2069
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = m.create([
|
|
2069
2070
|
0,
|
|
2070
2071
|
1,
|
|
2071
2072
|
2,
|
|
@@ -2393,20 +2394,20 @@ function Lt() {
|
|
|
2393
2394
|
_doReset: function() {
|
|
2394
2395
|
this._hash = m.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2395
2396
|
},
|
|
2396
|
-
_doProcessBlock: function(
|
|
2397
|
+
_doProcessBlock: function(D, y) {
|
|
2397
2398
|
for (var k = 0; k < 16; k++) {
|
|
2398
|
-
var R = y + k, F =
|
|
2399
|
-
|
|
2399
|
+
var R = y + k, F = D[R];
|
|
2400
|
+
D[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2400
2401
|
}
|
|
2401
|
-
var w = this._hash.words, H = s.words, $ = f.words,
|
|
2402
|
-
A = T = w[0], _ = N = w[1],
|
|
2402
|
+
var w = this._hash.words, H = s.words, $ = f.words, W = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _, z, P, L;
|
|
2403
|
+
A = T = w[0], _ = N = w[1], z = j = w[2], P = S = w[3], L = c = w[4];
|
|
2403
2404
|
for (var I, k = 0; k < 80; k += 1)
|
|
2404
|
-
I = T +
|
|
2405
|
-
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + _ | 0, w[4] = w[0] + N +
|
|
2405
|
+
I = T + D[y + W[k]] | 0, k < 16 ? I += l(N, j, S) + H[0] : k < 32 ? I += g(N, j, S) + H[1] : k < 48 ? I += i(N, j, S) + H[2] : k < 64 ? I += o(N, j, S) + H[3] : I += d(N, j, S) + H[4], I = I | 0, I = b(I, q[k]), I = I + c | 0, T = c, c = S, S = b(j, 10), j = N, N = I, I = A + D[y + O[k]] | 0, k < 16 ? I += d(_, z, P) + $[0] : k < 32 ? I += o(_, z, P) + $[1] : k < 48 ? I += i(_, z, P) + $[2] : k < 64 ? I += g(_, z, P) + $[3] : I += l(_, z, P) + $[4], I = I | 0, I = b(I, U[k]), I = I + L | 0, A = L, L = P, P = b(z, 10), z = _, _ = I;
|
|
2406
|
+
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + _ | 0, w[4] = w[0] + N + z | 0, w[0] = I;
|
|
2406
2407
|
},
|
|
2407
2408
|
_doFinalize: function() {
|
|
2408
|
-
var
|
|
2409
|
-
y[R >>> 5] |= 128 << 24 - R % 32, y[(R + 64 >>> 9 << 4) + 14] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360,
|
|
2409
|
+
var D = this._data, y = D.words, k = this._nDataBytes * 8, R = D.sigBytes * 8;
|
|
2410
|
+
y[R >>> 5] |= 128 << 24 - R % 32, y[(R + 64 >>> 9 << 4) + 14] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, D.sigBytes = (y.length + 1) * 4, this._process();
|
|
2410
2411
|
for (var F = this._hash, w = F.words, H = 0; H < 5; H++) {
|
|
2411
2412
|
var $ = w[H];
|
|
2412
2413
|
w[H] = ($ << 8 | $ >>> 24) & 16711935 | ($ << 24 | $ >>> 8) & 4278255360;
|
|
@@ -2414,41 +2415,41 @@ function Lt() {
|
|
|
2414
2415
|
return F;
|
|
2415
2416
|
},
|
|
2416
2417
|
clone: function() {
|
|
2417
|
-
var
|
|
2418
|
-
return
|
|
2418
|
+
var D = B.clone.call(this);
|
|
2419
|
+
return D._hash = this._hash.clone(), D;
|
|
2419
2420
|
}
|
|
2420
2421
|
});
|
|
2421
|
-
function
|
|
2422
|
-
return
|
|
2422
|
+
function l(D, y, k) {
|
|
2423
|
+
return D ^ y ^ k;
|
|
2423
2424
|
}
|
|
2424
|
-
function D
|
|
2425
|
-
return
|
|
2425
|
+
function g(D, y, k) {
|
|
2426
|
+
return D & y | ~D & k;
|
|
2426
2427
|
}
|
|
2427
|
-
function i(
|
|
2428
|
-
return (
|
|
2428
|
+
function i(D, y, k) {
|
|
2429
|
+
return (D | ~y) ^ k;
|
|
2429
2430
|
}
|
|
2430
|
-
function o(
|
|
2431
|
-
return
|
|
2431
|
+
function o(D, y, k) {
|
|
2432
|
+
return D & k | y & ~k;
|
|
2432
2433
|
}
|
|
2433
|
-
function
|
|
2434
|
-
return
|
|
2434
|
+
function d(D, y, k) {
|
|
2435
|
+
return D ^ (y | ~k);
|
|
2435
2436
|
}
|
|
2436
|
-
function b(
|
|
2437
|
-
return
|
|
2437
|
+
function b(D, y) {
|
|
2438
|
+
return D << y | D >>> 32 - y;
|
|
2438
2439
|
}
|
|
2439
|
-
|
|
2440
|
+
u.RIPEMD160 = B._createHelper(v), u.HmacRIPEMD160 = B._createHmacHelper(v);
|
|
2440
2441
|
})(), t.RIPEMD160;
|
|
2441
2442
|
});
|
|
2442
2443
|
})(T0)), T0.exports;
|
|
2443
2444
|
}
|
|
2444
2445
|
var M0 = { exports: {} }, Ot = M0.exports, Jr;
|
|
2445
|
-
function
|
|
2446
|
-
return Jr || (Jr = 1, (function(r,
|
|
2446
|
+
function Dr() {
|
|
2447
|
+
return Jr || (Jr = 1, (function(r, h) {
|
|
2447
2448
|
(function(t, e) {
|
|
2448
2449
|
r.exports = e(M());
|
|
2449
2450
|
})(Ot, function(t) {
|
|
2450
2451
|
(function() {
|
|
2451
|
-
var e = t,
|
|
2452
|
+
var e = t, u = e.lib, p = u.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2452
2453
|
C.HMAC = p.extend({
|
|
2453
2454
|
/**
|
|
2454
2455
|
* Initializes a newly created HMAC.
|
|
@@ -2464,8 +2465,8 @@ function gr() {
|
|
|
2464
2465
|
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2465
2466
|
var E = x.blockSize, a = E * 4;
|
|
2466
2467
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2467
|
-
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), v = s.words,
|
|
2468
|
-
v[
|
|
2468
|
+
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), v = s.words, l = f.words, g = 0; g < E; g++)
|
|
2469
|
+
v[g] ^= 1549556828, l[g] ^= 909522486;
|
|
2469
2470
|
s.sigBytes = f.sigBytes = a, this.reset();
|
|
2470
2471
|
},
|
|
2471
2472
|
/**
|
|
@@ -2521,12 +2522,12 @@ function gr() {
|
|
|
2521
2522
|
}
|
|
2522
2523
|
var N0 = { exports: {} }, qt = N0.exports, re;
|
|
2523
2524
|
function Tt() {
|
|
2524
|
-
return re || (re = 1, (function(r,
|
|
2525
|
-
(function(t, e,
|
|
2526
|
-
r.exports = e(M(), Fr(),
|
|
2525
|
+
return re || (re = 1, (function(r, h) {
|
|
2526
|
+
(function(t, e, u) {
|
|
2527
|
+
r.exports = e(M(), Fr(), Dr());
|
|
2527
2528
|
})(qt, function(t) {
|
|
2528
2529
|
return (function() {
|
|
2529
|
-
var e = t,
|
|
2530
|
+
var e = t, u = e.lib, p = u.Base, m = u.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = p.extend({
|
|
2530
2531
|
/**
|
|
2531
2532
|
* Configuration options.
|
|
2532
2533
|
*
|
|
@@ -2566,13 +2567,13 @@ function Tt() {
|
|
|
2566
2567
|
* var key = kdf.compute(password, salt);
|
|
2567
2568
|
*/
|
|
2568
2569
|
compute: function(E, a) {
|
|
2569
|
-
for (var s = this.cfg, f = x.create(s.hasher, E), v = m.create(),
|
|
2570
|
-
var b = f.update(a).finalize(
|
|
2570
|
+
for (var s = this.cfg, f = x.create(s.hasher, E), v = m.create(), l = m.create([1]), g = v.words, i = l.words, o = s.keySize, d = s.iterations; g.length < o; ) {
|
|
2571
|
+
var b = f.update(a).finalize(l);
|
|
2571
2572
|
f.reset();
|
|
2572
|
-
for (var
|
|
2573
|
+
for (var D = b.words, y = D.length, k = b, R = 1; R < d; R++) {
|
|
2573
2574
|
k = f.finalize(k), f.reset();
|
|
2574
2575
|
for (var F = k.words, w = 0; w < y; w++)
|
|
2575
|
-
|
|
2576
|
+
D[w] ^= F[w];
|
|
2576
2577
|
}
|
|
2577
2578
|
v.concat(b), i[0]++;
|
|
2578
2579
|
}
|
|
@@ -2588,12 +2589,12 @@ function Tt() {
|
|
|
2588
2589
|
}
|
|
2589
2590
|
var U0 = { exports: {} }, Mt = U0.exports, ee;
|
|
2590
2591
|
function a0() {
|
|
2591
|
-
return ee || (ee = 1, (function(r,
|
|
2592
|
-
(function(t, e,
|
|
2593
|
-
r.exports = e(M(), ke(),
|
|
2592
|
+
return ee || (ee = 1, (function(r, h) {
|
|
2593
|
+
(function(t, e, u) {
|
|
2594
|
+
r.exports = e(M(), ke(), Dr());
|
|
2594
2595
|
})(Mt, function(t) {
|
|
2595
2596
|
return (function() {
|
|
2596
|
-
var e = t,
|
|
2597
|
+
var e = t, u = e.lib, p = u.Base, m = u.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = p.extend({
|
|
2597
2598
|
/**
|
|
2598
2599
|
* Configuration options.
|
|
2599
2600
|
*
|
|
@@ -2633,13 +2634,13 @@ function a0() {
|
|
|
2633
2634
|
* var key = kdf.compute(password, salt);
|
|
2634
2635
|
*/
|
|
2635
2636
|
compute: function(n, E) {
|
|
2636
|
-
for (var a, s = this.cfg, f = s.hasher.create(), v = m.create(),
|
|
2637
|
+
for (var a, s = this.cfg, f = s.hasher.create(), v = m.create(), l = v.words, g = s.keySize, i = s.iterations; l.length < g; ) {
|
|
2637
2638
|
a && f.update(a), a = f.update(n).finalize(E), f.reset();
|
|
2638
2639
|
for (var o = 1; o < i; o++)
|
|
2639
2640
|
a = f.finalize(a), f.reset();
|
|
2640
2641
|
v.concat(a);
|
|
2641
2642
|
}
|
|
2642
|
-
return v.sigBytes =
|
|
2643
|
+
return v.sigBytes = g * 4, v;
|
|
2643
2644
|
}
|
|
2644
2645
|
});
|
|
2645
2646
|
e.EvpKDF = function(n, E, a) {
|
|
@@ -2651,14 +2652,14 @@ function a0() {
|
|
|
2651
2652
|
}
|
|
2652
2653
|
var j0 = { exports: {} }, Nt = j0.exports, te;
|
|
2653
2654
|
function X() {
|
|
2654
|
-
return te || (te = 1, (function(r,
|
|
2655
|
-
(function(t, e,
|
|
2655
|
+
return te || (te = 1, (function(r, h) {
|
|
2656
|
+
(function(t, e, u) {
|
|
2656
2657
|
r.exports = e(M(), a0());
|
|
2657
2658
|
})(Nt, function(t) {
|
|
2658
2659
|
t.lib.Cipher || (function(e) {
|
|
2659
|
-
var
|
|
2660
|
+
var u = t, p = u.lib, m = p.Base, B = p.WordArray, C = p.BufferedBlockAlgorithm, x = u.enc;
|
|
2660
2661
|
x.Utf8;
|
|
2661
|
-
var n = x.Base64, E =
|
|
2662
|
+
var n = x.Base64, E = u.algo, a = E.EvpKDF, s = p.Cipher = C.extend({
|
|
2662
2663
|
/**
|
|
2663
2664
|
* Configuration options.
|
|
2664
2665
|
*
|
|
@@ -2776,15 +2777,15 @@ function X() {
|
|
|
2776
2777
|
*/
|
|
2777
2778
|
_createHelper: /* @__PURE__ */ (function() {
|
|
2778
2779
|
function F(w) {
|
|
2779
|
-
return typeof w == "string" ? R :
|
|
2780
|
+
return typeof w == "string" ? R : D;
|
|
2780
2781
|
}
|
|
2781
2782
|
return function(w) {
|
|
2782
2783
|
return {
|
|
2783
|
-
encrypt: function(H, $,
|
|
2784
|
-
return F($).encrypt(w, H, $,
|
|
2784
|
+
encrypt: function(H, $, W) {
|
|
2785
|
+
return F($).encrypt(w, H, $, W);
|
|
2785
2786
|
},
|
|
2786
|
-
decrypt: function(H, $,
|
|
2787
|
-
return F($).decrypt(w, H, $,
|
|
2787
|
+
decrypt: function(H, $, W) {
|
|
2788
|
+
return F($).decrypt(w, H, $, W);
|
|
2788
2789
|
}
|
|
2789
2790
|
};
|
|
2790
2791
|
};
|
|
@@ -2797,7 +2798,7 @@ function X() {
|
|
|
2797
2798
|
},
|
|
2798
2799
|
blockSize: 1
|
|
2799
2800
|
});
|
|
2800
|
-
var f =
|
|
2801
|
+
var f = u.mode = {}, v = p.BlockCipherMode = m.extend({
|
|
2801
2802
|
/**
|
|
2802
2803
|
* Creates this mode for encryption.
|
|
2803
2804
|
*
|
|
@@ -2841,7 +2842,7 @@ function X() {
|
|
|
2841
2842
|
init: function(F, w) {
|
|
2842
2843
|
this._cipher = F, this._iv = w;
|
|
2843
2844
|
}
|
|
2844
|
-
}),
|
|
2845
|
+
}), l = f.CBC = (function() {
|
|
2845
2846
|
var F = v.extend();
|
|
2846
2847
|
F.Encryptor = F.extend({
|
|
2847
2848
|
/**
|
|
@@ -2855,8 +2856,8 @@ function X() {
|
|
|
2855
2856
|
* mode.processBlock(data.words, offset);
|
|
2856
2857
|
*/
|
|
2857
2858
|
processBlock: function(H, $) {
|
|
2858
|
-
var
|
|
2859
|
-
w.call(this, H, $, O),
|
|
2859
|
+
var W = this._cipher, O = W.blockSize;
|
|
2860
|
+
w.call(this, H, $, O), W.encryptBlock(H, $), this._prevBlock = H.slice($, $ + O);
|
|
2860
2861
|
}
|
|
2861
2862
|
}), F.Decryptor = F.extend({
|
|
2862
2863
|
/**
|
|
@@ -2870,18 +2871,18 @@ function X() {
|
|
|
2870
2871
|
* mode.processBlock(data.words, offset);
|
|
2871
2872
|
*/
|
|
2872
2873
|
processBlock: function(H, $) {
|
|
2873
|
-
var
|
|
2874
|
-
|
|
2874
|
+
var W = this._cipher, O = W.blockSize, q = H.slice($, $ + O);
|
|
2875
|
+
W.decryptBlock(H, $), w.call(this, H, $, O), this._prevBlock = q;
|
|
2875
2876
|
}
|
|
2876
2877
|
});
|
|
2877
|
-
function w(H, $,
|
|
2878
|
+
function w(H, $, W) {
|
|
2878
2879
|
var O, q = this._iv;
|
|
2879
2880
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2880
|
-
for (var U = 0; U <
|
|
2881
|
+
for (var U = 0; U < W; U++)
|
|
2881
2882
|
H[$ + U] ^= O[U];
|
|
2882
2883
|
}
|
|
2883
2884
|
return F;
|
|
2884
|
-
})(),
|
|
2885
|
+
})(), g = u.pad = {}, i = g.Pkcs7 = {
|
|
2885
2886
|
/**
|
|
2886
2887
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2887
2888
|
*
|
|
@@ -2895,8 +2896,8 @@ function X() {
|
|
|
2895
2896
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2896
2897
|
*/
|
|
2897
2898
|
pad: function(F, w) {
|
|
2898
|
-
for (var H = w * 4, $ = H - F.sigBytes % H,
|
|
2899
|
-
O.push(
|
|
2899
|
+
for (var H = w * 4, $ = H - F.sigBytes % H, W = $ << 24 | $ << 16 | $ << 8 | $, O = [], q = 0; q < $; q += 4)
|
|
2900
|
+
O.push(W);
|
|
2900
2901
|
var U = B.create(O, $);
|
|
2901
2902
|
F.concat(U);
|
|
2902
2903
|
},
|
|
@@ -2924,7 +2925,7 @@ function X() {
|
|
|
2924
2925
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2925
2926
|
*/
|
|
2926
2927
|
cfg: s.cfg.extend({
|
|
2927
|
-
mode:
|
|
2928
|
+
mode: l,
|
|
2928
2929
|
padding: i
|
|
2929
2930
|
}),
|
|
2930
2931
|
reset: function() {
|
|
@@ -2983,7 +2984,7 @@ function X() {
|
|
|
2983
2984
|
toString: function(F) {
|
|
2984
2985
|
return (F || this.formatter).stringify(this);
|
|
2985
2986
|
}
|
|
2986
|
-
}),
|
|
2987
|
+
}), d = u.format = {}, b = d.OpenSSL = {
|
|
2987
2988
|
/**
|
|
2988
2989
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
2989
2990
|
*
|
|
@@ -3018,7 +3019,7 @@ function X() {
|
|
|
3018
3019
|
var w, H = n.parse(F), $ = H.words;
|
|
3019
3020
|
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3020
3021
|
}
|
|
3021
|
-
},
|
|
3022
|
+
}, D = p.SerializableCipher = m.extend({
|
|
3022
3023
|
/**
|
|
3023
3024
|
* Configuration options.
|
|
3024
3025
|
*
|
|
@@ -3047,7 +3048,7 @@ function X() {
|
|
|
3047
3048
|
*/
|
|
3048
3049
|
encrypt: function(F, w, H, $) {
|
|
3049
3050
|
$ = this.cfg.extend($);
|
|
3050
|
-
var
|
|
3051
|
+
var W = F.createEncryptor(H, $), O = W.finalize(w), q = W.cfg;
|
|
3051
3052
|
return o.create({
|
|
3052
3053
|
ciphertext: O,
|
|
3053
3054
|
key: H,
|
|
@@ -3078,8 +3079,8 @@ function X() {
|
|
|
3078
3079
|
*/
|
|
3079
3080
|
decrypt: function(F, w, H, $) {
|
|
3080
3081
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3081
|
-
var
|
|
3082
|
-
return
|
|
3082
|
+
var W = F.createDecryptor(H, $).finalize(w.ciphertext);
|
|
3083
|
+
return W;
|
|
3083
3084
|
},
|
|
3084
3085
|
/**
|
|
3085
3086
|
* Converts serialized ciphertext to CipherParams,
|
|
@@ -3099,7 +3100,7 @@ function X() {
|
|
|
3099
3100
|
_parse: function(F, w) {
|
|
3100
3101
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3101
3102
|
}
|
|
3102
|
-
}), y =
|
|
3103
|
+
}), y = u.kdf = {}, k = y.OpenSSL = {
|
|
3103
3104
|
/**
|
|
3104
3105
|
* Derives a key and IV from a password.
|
|
3105
3106
|
*
|
|
@@ -3117,21 +3118,21 @@ function X() {
|
|
|
3117
3118
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3118
3119
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3119
3120
|
*/
|
|
3120
|
-
execute: function(F, w, H, $,
|
|
3121
|
-
if ($ || ($ = B.random(64 / 8)),
|
|
3122
|
-
var O = a.create({ keySize: w + H, hasher:
|
|
3121
|
+
execute: function(F, w, H, $, W) {
|
|
3122
|
+
if ($ || ($ = B.random(64 / 8)), W)
|
|
3123
|
+
var O = a.create({ keySize: w + H, hasher: W }).compute(F, $);
|
|
3123
3124
|
else
|
|
3124
3125
|
var O = a.create({ keySize: w + H }).compute(F, $);
|
|
3125
3126
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3126
3127
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3127
3128
|
}
|
|
3128
|
-
}, R = p.PasswordBasedCipher =
|
|
3129
|
+
}, R = p.PasswordBasedCipher = D.extend({
|
|
3129
3130
|
/**
|
|
3130
3131
|
* Configuration options.
|
|
3131
3132
|
*
|
|
3132
3133
|
* @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
|
|
3133
3134
|
*/
|
|
3134
|
-
cfg:
|
|
3135
|
+
cfg: D.cfg.extend({
|
|
3135
3136
|
kdf: k
|
|
3136
3137
|
}),
|
|
3137
3138
|
/**
|
|
@@ -3153,10 +3154,10 @@ function X() {
|
|
|
3153
3154
|
*/
|
|
3154
3155
|
encrypt: function(F, w, H, $) {
|
|
3155
3156
|
$ = this.cfg.extend($);
|
|
3156
|
-
var
|
|
3157
|
-
$.iv =
|
|
3158
|
-
var O =
|
|
3159
|
-
return O.mixIn(
|
|
3157
|
+
var W = $.kdf.execute(H, F.keySize, F.ivSize, $.salt, $.hasher);
|
|
3158
|
+
$.iv = W.iv;
|
|
3159
|
+
var O = D.encrypt.call(this, F, w, W.key, $);
|
|
3160
|
+
return O.mixIn(W), O;
|
|
3160
3161
|
},
|
|
3161
3162
|
/**
|
|
3162
3163
|
* Decrypts serialized ciphertext using a password.
|
|
@@ -3177,9 +3178,9 @@ function X() {
|
|
|
3177
3178
|
*/
|
|
3178
3179
|
decrypt: function(F, w, H, $) {
|
|
3179
3180
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3180
|
-
var
|
|
3181
|
-
$.iv =
|
|
3182
|
-
var O =
|
|
3181
|
+
var W = $.kdf.execute(H, F.keySize, F.ivSize, w.salt, $.hasher);
|
|
3182
|
+
$.iv = W.iv;
|
|
3183
|
+
var O = D.decrypt.call(this, F, w, W.key, $);
|
|
3183
3184
|
return O;
|
|
3184
3185
|
}
|
|
3185
3186
|
});
|
|
@@ -3189,8 +3190,8 @@ function X() {
|
|
|
3189
3190
|
}
|
|
3190
3191
|
var G0 = { exports: {} }, Ut = G0.exports, xe;
|
|
3191
3192
|
function jt() {
|
|
3192
|
-
return xe || (xe = 1, (function(r,
|
|
3193
|
-
(function(t, e,
|
|
3193
|
+
return xe || (xe = 1, (function(r, h) {
|
|
3194
|
+
(function(t, e, u) {
|
|
3194
3195
|
r.exports = e(M(), X());
|
|
3195
3196
|
})(Ut, function(t) {
|
|
3196
3197
|
return t.mode.CFB = (function() {
|
|
@@ -3198,15 +3199,15 @@ function jt() {
|
|
|
3198
3199
|
e.Encryptor = e.extend({
|
|
3199
3200
|
processBlock: function(p, m) {
|
|
3200
3201
|
var B = this._cipher, C = B.blockSize;
|
|
3201
|
-
|
|
3202
|
+
u.call(this, p, m, C, B), this._prevBlock = p.slice(m, m + C);
|
|
3202
3203
|
}
|
|
3203
3204
|
}), e.Decryptor = e.extend({
|
|
3204
3205
|
processBlock: function(p, m) {
|
|
3205
3206
|
var B = this._cipher, C = B.blockSize, x = p.slice(m, m + C);
|
|
3206
|
-
|
|
3207
|
+
u.call(this, p, m, C, B), this._prevBlock = x;
|
|
3207
3208
|
}
|
|
3208
3209
|
});
|
|
3209
|
-
function
|
|
3210
|
+
function u(p, m, B, C) {
|
|
3210
3211
|
var x, n = this._iv;
|
|
3211
3212
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3212
3213
|
for (var E = 0; E < B; E++)
|
|
@@ -3219,12 +3220,12 @@ function jt() {
|
|
|
3219
3220
|
}
|
|
3220
3221
|
var K0 = { exports: {} }, Gt = K0.exports, ne;
|
|
3221
3222
|
function Kt() {
|
|
3222
|
-
return ne || (ne = 1, (function(r,
|
|
3223
|
-
(function(t, e,
|
|
3223
|
+
return ne || (ne = 1, (function(r, h) {
|
|
3224
|
+
(function(t, e, u) {
|
|
3224
3225
|
r.exports = e(M(), X());
|
|
3225
3226
|
})(Gt, function(t) {
|
|
3226
3227
|
return t.mode.CTR = (function() {
|
|
3227
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3228
|
+
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3228
3229
|
processBlock: function(p, m) {
|
|
3229
3230
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3230
3231
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
@@ -3234,20 +3235,20 @@ function Kt() {
|
|
|
3234
3235
|
p[m + a] ^= E[a];
|
|
3235
3236
|
}
|
|
3236
3237
|
});
|
|
3237
|
-
return e.Decryptor =
|
|
3238
|
+
return e.Decryptor = u, e;
|
|
3238
3239
|
})(), t.mode.CTR;
|
|
3239
3240
|
});
|
|
3240
3241
|
})(K0)), K0.exports;
|
|
3241
3242
|
}
|
|
3242
3243
|
var X0 = { exports: {} }, Xt = X0.exports, ae;
|
|
3243
3244
|
function Yt() {
|
|
3244
|
-
return ae || (ae = 1, (function(r,
|
|
3245
|
-
(function(t, e,
|
|
3245
|
+
return ae || (ae = 1, (function(r, h) {
|
|
3246
|
+
(function(t, e, u) {
|
|
3246
3247
|
r.exports = e(M(), X());
|
|
3247
3248
|
})(Xt, function(t) {
|
|
3248
3249
|
return t.mode.CTRGladman = (function() {
|
|
3249
3250
|
var e = t.lib.BlockCipherMode.extend();
|
|
3250
|
-
function
|
|
3251
|
+
function u(B) {
|
|
3251
3252
|
if ((B >> 24 & 255) === 255) {
|
|
3252
3253
|
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3253
3254
|
C === 255 ? (C = 0, x === 255 ? (x = 0, n === 255 ? n = 0 : ++n) : ++x) : ++C, B = 0, B += C << 16, B += x << 8, B += n;
|
|
@@ -3256,7 +3257,7 @@ function Yt() {
|
|
|
3256
3257
|
return B;
|
|
3257
3258
|
}
|
|
3258
3259
|
function p(B) {
|
|
3259
|
-
return (B[0] =
|
|
3260
|
+
return (B[0] = u(B[0])) === 0 && (B[1] = u(B[1])), B;
|
|
3260
3261
|
}
|
|
3261
3262
|
var m = e.Encryptor = e.extend({
|
|
3262
3263
|
processBlock: function(B, C) {
|
|
@@ -3274,13 +3275,13 @@ function Yt() {
|
|
|
3274
3275
|
})(X0)), X0.exports;
|
|
3275
3276
|
}
|
|
3276
3277
|
var Y0 = { exports: {} }, Zt = Y0.exports, oe;
|
|
3277
|
-
function
|
|
3278
|
-
return oe || (oe = 1, (function(r,
|
|
3279
|
-
(function(t, e,
|
|
3278
|
+
function Vt() {
|
|
3279
|
+
return oe || (oe = 1, (function(r, h) {
|
|
3280
|
+
(function(t, e, u) {
|
|
3280
3281
|
r.exports = e(M(), X());
|
|
3281
3282
|
})(Zt, function(t) {
|
|
3282
3283
|
return t.mode.OFB = (function() {
|
|
3283
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3284
|
+
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3284
3285
|
processBlock: function(p, m) {
|
|
3285
3286
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3286
3287
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
@@ -3288,79 +3289,79 @@ function Qt() {
|
|
|
3288
3289
|
p[m + E] ^= n[E];
|
|
3289
3290
|
}
|
|
3290
3291
|
});
|
|
3291
|
-
return e.Decryptor =
|
|
3292
|
+
return e.Decryptor = u, e;
|
|
3292
3293
|
})(), t.mode.OFB;
|
|
3293
3294
|
});
|
|
3294
3295
|
})(Y0)), Y0.exports;
|
|
3295
3296
|
}
|
|
3296
|
-
var Z0 = { exports: {} },
|
|
3297
|
+
var Z0 = { exports: {} }, Qt = Z0.exports, ie;
|
|
3297
3298
|
function Jt() {
|
|
3298
|
-
return ie || (ie = 1, (function(r,
|
|
3299
|
-
(function(t, e,
|
|
3299
|
+
return ie || (ie = 1, (function(r, h) {
|
|
3300
|
+
(function(t, e, u) {
|
|
3300
3301
|
r.exports = e(M(), X());
|
|
3301
|
-
})(
|
|
3302
|
+
})(Qt, function(t) {
|
|
3302
3303
|
return t.mode.ECB = (function() {
|
|
3303
3304
|
var e = t.lib.BlockCipherMode.extend();
|
|
3304
3305
|
return e.Encryptor = e.extend({
|
|
3305
|
-
processBlock: function(
|
|
3306
|
-
this._cipher.encryptBlock(
|
|
3306
|
+
processBlock: function(u, p) {
|
|
3307
|
+
this._cipher.encryptBlock(u, p);
|
|
3307
3308
|
}
|
|
3308
3309
|
}), e.Decryptor = e.extend({
|
|
3309
|
-
processBlock: function(
|
|
3310
|
-
this._cipher.decryptBlock(
|
|
3310
|
+
processBlock: function(u, p) {
|
|
3311
|
+
this._cipher.decryptBlock(u, p);
|
|
3311
3312
|
}
|
|
3312
3313
|
}), e;
|
|
3313
3314
|
})(), t.mode.ECB;
|
|
3314
3315
|
});
|
|
3315
3316
|
})(Z0)), Z0.exports;
|
|
3316
3317
|
}
|
|
3317
|
-
var
|
|
3318
|
+
var V0 = { exports: {} }, rx = V0.exports, se;
|
|
3318
3319
|
function ex() {
|
|
3319
|
-
return se || (se = 1, (function(r,
|
|
3320
|
-
(function(t, e,
|
|
3320
|
+
return se || (se = 1, (function(r, h) {
|
|
3321
|
+
(function(t, e, u) {
|
|
3321
3322
|
r.exports = e(M(), X());
|
|
3322
3323
|
})(rx, function(t) {
|
|
3323
3324
|
return t.pad.AnsiX923 = {
|
|
3324
|
-
pad: function(e,
|
|
3325
|
-
var p = e.sigBytes, m =
|
|
3325
|
+
pad: function(e, u) {
|
|
3326
|
+
var p = e.sigBytes, m = u * 4, B = m - p % m, C = p + B - 1;
|
|
3326
3327
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3327
3328
|
},
|
|
3328
3329
|
unpad: function(e) {
|
|
3329
|
-
var
|
|
3330
|
-
e.sigBytes -=
|
|
3330
|
+
var u = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3331
|
+
e.sigBytes -= u;
|
|
3331
3332
|
}
|
|
3332
3333
|
}, t.pad.Ansix923;
|
|
3333
3334
|
});
|
|
3334
|
-
})(
|
|
3335
|
+
})(V0)), V0.exports;
|
|
3335
3336
|
}
|
|
3336
|
-
var
|
|
3337
|
+
var Q0 = { exports: {} }, tx = Q0.exports, ce;
|
|
3337
3338
|
function xx() {
|
|
3338
|
-
return ce || (ce = 1, (function(r,
|
|
3339
|
-
(function(t, e,
|
|
3339
|
+
return ce || (ce = 1, (function(r, h) {
|
|
3340
|
+
(function(t, e, u) {
|
|
3340
3341
|
r.exports = e(M(), X());
|
|
3341
3342
|
})(tx, function(t) {
|
|
3342
3343
|
return t.pad.Iso10126 = {
|
|
3343
|
-
pad: function(e,
|
|
3344
|
-
var p =
|
|
3344
|
+
pad: function(e, u) {
|
|
3345
|
+
var p = u * 4, m = p - e.sigBytes % p;
|
|
3345
3346
|
e.concat(t.lib.WordArray.random(m - 1)).concat(t.lib.WordArray.create([m << 24], 1));
|
|
3346
3347
|
},
|
|
3347
3348
|
unpad: function(e) {
|
|
3348
|
-
var
|
|
3349
|
-
e.sigBytes -=
|
|
3349
|
+
var u = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3350
|
+
e.sigBytes -= u;
|
|
3350
3351
|
}
|
|
3351
3352
|
}, t.pad.Iso10126;
|
|
3352
3353
|
});
|
|
3353
|
-
})(
|
|
3354
|
+
})(Q0)), Q0.exports;
|
|
3354
3355
|
}
|
|
3355
3356
|
var J0 = { exports: {} }, nx = J0.exports, fe;
|
|
3356
3357
|
function ax() {
|
|
3357
|
-
return fe || (fe = 1, (function(r,
|
|
3358
|
-
(function(t, e,
|
|
3358
|
+
return fe || (fe = 1, (function(r, h) {
|
|
3359
|
+
(function(t, e, u) {
|
|
3359
3360
|
r.exports = e(M(), X());
|
|
3360
3361
|
})(nx, function(t) {
|
|
3361
3362
|
return t.pad.Iso97971 = {
|
|
3362
|
-
pad: function(e,
|
|
3363
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3363
|
+
pad: function(e, u) {
|
|
3364
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, u);
|
|
3364
3365
|
},
|
|
3365
3366
|
unpad: function(e) {
|
|
3366
3367
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
@@ -3369,20 +3370,20 @@ function ax() {
|
|
|
3369
3370
|
});
|
|
3370
3371
|
})(J0)), J0.exports;
|
|
3371
3372
|
}
|
|
3372
|
-
var rr = { exports: {} }, ox = rr.exports,
|
|
3373
|
+
var rr = { exports: {} }, ox = rr.exports, ue;
|
|
3373
3374
|
function ix() {
|
|
3374
|
-
return
|
|
3375
|
-
(function(t, e,
|
|
3375
|
+
return ue || (ue = 1, (function(r, h) {
|
|
3376
|
+
(function(t, e, u) {
|
|
3376
3377
|
r.exports = e(M(), X());
|
|
3377
3378
|
})(ox, function(t) {
|
|
3378
3379
|
return t.pad.ZeroPadding = {
|
|
3379
|
-
pad: function(e,
|
|
3380
|
-
var p =
|
|
3380
|
+
pad: function(e, u) {
|
|
3381
|
+
var p = u * 4;
|
|
3381
3382
|
e.clamp(), e.sigBytes += p - (e.sigBytes % p || p);
|
|
3382
3383
|
},
|
|
3383
3384
|
unpad: function(e) {
|
|
3384
|
-
for (var
|
|
3385
|
-
if (
|
|
3385
|
+
for (var u = e.words, p = e.sigBytes - 1, p = e.sigBytes - 1; p >= 0; p--)
|
|
3386
|
+
if (u[p >>> 2] >>> 24 - p % 4 * 8 & 255) {
|
|
3386
3387
|
e.sigBytes = p + 1;
|
|
3387
3388
|
break;
|
|
3388
3389
|
}
|
|
@@ -3391,10 +3392,10 @@ function ix() {
|
|
|
3391
3392
|
});
|
|
3392
3393
|
})(rr)), rr.exports;
|
|
3393
3394
|
}
|
|
3394
|
-
var er = { exports: {} }, sx = er.exports,
|
|
3395
|
+
var er = { exports: {} }, sx = er.exports, de;
|
|
3395
3396
|
function cx() {
|
|
3396
|
-
return
|
|
3397
|
-
(function(t, e,
|
|
3397
|
+
return de || (de = 1, (function(r, h) {
|
|
3398
|
+
(function(t, e, u) {
|
|
3398
3399
|
r.exports = e(M(), X());
|
|
3399
3400
|
})(sx, function(t) {
|
|
3400
3401
|
return t.pad.NoPadding = {
|
|
@@ -3407,13 +3408,13 @@ function cx() {
|
|
|
3407
3408
|
})(er)), er.exports;
|
|
3408
3409
|
}
|
|
3409
3410
|
var tr = { exports: {} }, fx = tr.exports, le;
|
|
3410
|
-
function
|
|
3411
|
-
return le || (le = 1, (function(r,
|
|
3412
|
-
(function(t, e,
|
|
3411
|
+
function ux() {
|
|
3412
|
+
return le || (le = 1, (function(r, h) {
|
|
3413
|
+
(function(t, e, u) {
|
|
3413
3414
|
r.exports = e(M(), X());
|
|
3414
3415
|
})(fx, function(t) {
|
|
3415
3416
|
return (function(e) {
|
|
3416
|
-
var
|
|
3417
|
+
var u = t, p = u.lib, m = p.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
3417
3418
|
x.Hex = {
|
|
3418
3419
|
/**
|
|
3419
3420
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3453,58 +3454,58 @@ function dx() {
|
|
|
3453
3454
|
});
|
|
3454
3455
|
})(tr)), tr.exports;
|
|
3455
3456
|
}
|
|
3456
|
-
var xr = { exports: {} },
|
|
3457
|
+
var xr = { exports: {} }, dx = xr.exports, he;
|
|
3457
3458
|
function lx() {
|
|
3458
|
-
return he || (he = 1, (function(r,
|
|
3459
|
-
(function(t, e,
|
|
3459
|
+
return he || (he = 1, (function(r, h) {
|
|
3460
|
+
(function(t, e, u) {
|
|
3460
3461
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
3461
|
-
})(
|
|
3462
|
+
})(dx, function(t) {
|
|
3462
3463
|
return (function() {
|
|
3463
|
-
var e = t,
|
|
3464
|
+
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], v = [], l = [];
|
|
3464
3465
|
(function() {
|
|
3465
|
-
for (var o = [],
|
|
3466
|
-
|
|
3467
|
-
for (var b = 0,
|
|
3468
|
-
var y =
|
|
3466
|
+
for (var o = [], d = 0; d < 256; d++)
|
|
3467
|
+
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
3468
|
+
for (var b = 0, D = 0, d = 0; d < 256; d++) {
|
|
3469
|
+
var y = D ^ D << 1 ^ D << 2 ^ D << 3 ^ D << 4;
|
|
3469
3470
|
y = y >>> 8 ^ y & 255 ^ 99, B[b] = y, C[y] = b;
|
|
3470
3471
|
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3471
3472
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3472
3473
|
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3473
|
-
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, v[y] = w << 8 | w >>> 24,
|
|
3474
|
+
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, v[y] = w << 8 | w >>> 24, l[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], D ^= o[o[D]]) : b = D = 1;
|
|
3474
3475
|
}
|
|
3475
3476
|
})();
|
|
3476
|
-
var
|
|
3477
|
+
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES = p.extend({
|
|
3477
3478
|
_doReset: function() {
|
|
3478
3479
|
var o;
|
|
3479
3480
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3480
|
-
for (var
|
|
3481
|
-
F <
|
|
3481
|
+
for (var d = this._keyPriorReset = this._key, b = d.words, D = d.sigBytes / 4, y = this._nRounds = D + 6, k = (y + 1) * 4, R = this._keySchedule = [], F = 0; F < k; F++)
|
|
3482
|
+
F < D ? R[F] = b[F] : (o = R[F - 1], F % D ? D > 6 && F % D == 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 ^= g[F / D | 0] << 24), R[F] = R[F - D] ^ o);
|
|
3482
3483
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3483
3484
|
var F = k - H;
|
|
3484
3485
|
if (H % 4)
|
|
3485
3486
|
var o = R[F];
|
|
3486
3487
|
else
|
|
3487
3488
|
var o = R[F - 4];
|
|
3488
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^ v[B[o >>> 8 & 255]] ^
|
|
3489
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^ v[B[o >>> 8 & 255]] ^ l[B[o & 255]];
|
|
3489
3490
|
}
|
|
3490
3491
|
}
|
|
3491
3492
|
},
|
|
3492
|
-
encryptBlock: function(o,
|
|
3493
|
-
this._doCryptBlock(o,
|
|
3493
|
+
encryptBlock: function(o, d) {
|
|
3494
|
+
this._doCryptBlock(o, d, this._keySchedule, x, n, E, a, B);
|
|
3494
3495
|
},
|
|
3495
|
-
decryptBlock: function(o,
|
|
3496
|
-
var b = o[
|
|
3497
|
-
o[
|
|
3498
|
-
var b = o[
|
|
3499
|
-
o[
|
|
3496
|
+
decryptBlock: function(o, d) {
|
|
3497
|
+
var b = o[d + 1];
|
|
3498
|
+
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, f, v, l, C);
|
|
3499
|
+
var b = o[d + 1];
|
|
3500
|
+
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3500
3501
|
},
|
|
3501
|
-
_doCryptBlock: function(o,
|
|
3502
|
-
for (var w = this._nRounds, H = o[
|
|
3503
|
-
var T =
|
|
3504
|
-
H = T, $ = N,
|
|
3502
|
+
_doCryptBlock: function(o, d, b, D, y, k, R, F) {
|
|
3503
|
+
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1], W = o[d + 2] ^ b[2], O = o[d + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3504
|
+
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[W >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = D[$ >>> 24] ^ y[W >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = D[W >>> 24] ^ y[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ R[$ & 255] ^ b[q++], S = D[O >>> 24] ^ y[H >>> 16 & 255] ^ k[$ >>> 8 & 255] ^ R[W & 255] ^ b[q++];
|
|
3505
|
+
H = T, $ = N, W = j, O = S;
|
|
3505
3506
|
}
|
|
3506
|
-
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[
|
|
3507
|
-
o[
|
|
3507
|
+
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[W >>> 8 & 255] << 8 | F[O & 255]) ^ b[q++], N = (F[$ >>> 24] << 24 | F[W >>> 16 & 255] << 16 | F[O >>> 8 & 255] << 8 | F[H & 255]) ^ b[q++], j = (F[W >>> 24] << 24 | F[O >>> 16 & 255] << 16 | F[H >>> 8 & 255] << 8 | F[$ & 255]) ^ b[q++], S = (F[O >>> 24] << 24 | F[H >>> 16 & 255] << 16 | F[$ >>> 8 & 255] << 8 | F[W & 255]) ^ b[q++];
|
|
3508
|
+
o[d] = T, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3508
3509
|
},
|
|
3509
3510
|
keySize: 256 / 32
|
|
3510
3511
|
});
|
|
@@ -3515,12 +3516,12 @@ function lx() {
|
|
|
3515
3516
|
}
|
|
3516
3517
|
var nr = { exports: {} }, hx = nr.exports, ve;
|
|
3517
3518
|
function vx() {
|
|
3518
|
-
return ve || (ve = 1, (function(r,
|
|
3519
|
-
(function(t, e,
|
|
3519
|
+
return ve || (ve = 1, (function(r, h) {
|
|
3520
|
+
(function(t, e, u) {
|
|
3520
3521
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
3521
3522
|
})(hx, function(t) {
|
|
3522
3523
|
return (function() {
|
|
3523
|
-
var e = t,
|
|
3524
|
+
var e = t, u = e.lib, p = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
3524
3525
|
57,
|
|
3525
3526
|
49,
|
|
3526
3527
|
41,
|
|
@@ -4166,87 +4167,87 @@ function vx() {
|
|
|
4166
4167
|
2147483679
|
|
4167
4168
|
], s = B.DES = m.extend({
|
|
4168
4169
|
_doReset: function() {
|
|
4169
|
-
for (var
|
|
4170
|
-
var b = C[
|
|
4171
|
-
o[
|
|
4170
|
+
for (var g = this._key, i = g.words, o = [], d = 0; d < 56; d++) {
|
|
4171
|
+
var b = C[d] - 1;
|
|
4172
|
+
o[d] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4172
4173
|
}
|
|
4173
|
-
for (var
|
|
4174
|
-
for (var k =
|
|
4175
|
-
k[
|
|
4174
|
+
for (var D = this._subKeys = [], y = 0; y < 16; y++) {
|
|
4175
|
+
for (var k = D[y] = [], R = n[y], d = 0; d < 24; d++)
|
|
4176
|
+
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;
|
|
4176
4177
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4177
|
-
for (var
|
|
4178
|
-
k[
|
|
4178
|
+
for (var d = 1; d < 7; d++)
|
|
4179
|
+
k[d] = k[d] >>> (d - 1) * 4 + 3;
|
|
4179
4180
|
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
4180
4181
|
}
|
|
4181
|
-
for (var F = this._invSubKeys = [],
|
|
4182
|
-
F[
|
|
4182
|
+
for (var F = this._invSubKeys = [], d = 0; d < 16; d++)
|
|
4183
|
+
F[d] = D[15 - d];
|
|
4183
4184
|
},
|
|
4184
|
-
encryptBlock: function(
|
|
4185
|
-
this._doCryptBlock(
|
|
4185
|
+
encryptBlock: function(g, i) {
|
|
4186
|
+
this._doCryptBlock(g, i, this._subKeys);
|
|
4186
4187
|
},
|
|
4187
|
-
decryptBlock: function(
|
|
4188
|
-
this._doCryptBlock(
|
|
4188
|
+
decryptBlock: function(g, i) {
|
|
4189
|
+
this._doCryptBlock(g, i, this._invSubKeys);
|
|
4189
4190
|
},
|
|
4190
|
-
_doCryptBlock: function(
|
|
4191
|
-
this._lBlock =
|
|
4192
|
-
for (var
|
|
4193
|
-
for (var b = o[
|
|
4191
|
+
_doCryptBlock: function(g, i, o) {
|
|
4192
|
+
this._lBlock = g[i], this._rBlock = g[i + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535), v.call(this, 2, 858993459), v.call(this, 8, 16711935), f.call(this, 1, 1431655765);
|
|
4193
|
+
for (var d = 0; d < 16; d++) {
|
|
4194
|
+
for (var b = o[d], D = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4194
4195
|
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4195
|
-
this._lBlock = y, this._rBlock =
|
|
4196
|
+
this._lBlock = y, this._rBlock = D ^ k;
|
|
4196
4197
|
}
|
|
4197
4198
|
var F = this._lBlock;
|
|
4198
|
-
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765), v.call(this, 8, 16711935), v.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135),
|
|
4199
|
+
this._lBlock = this._rBlock, this._rBlock = F, f.call(this, 1, 1431655765), v.call(this, 8, 16711935), v.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135), g[i] = this._lBlock, g[i + 1] = this._rBlock;
|
|
4199
4200
|
},
|
|
4200
4201
|
keySize: 64 / 32,
|
|
4201
4202
|
ivSize: 64 / 32,
|
|
4202
4203
|
blockSize: 64 / 32
|
|
4203
4204
|
});
|
|
4204
|
-
function f(
|
|
4205
|
-
var o = (this._lBlock >>>
|
|
4206
|
-
this._rBlock ^= o, this._lBlock ^= o <<
|
|
4205
|
+
function f(g, i) {
|
|
4206
|
+
var o = (this._lBlock >>> g ^ this._rBlock) & i;
|
|
4207
|
+
this._rBlock ^= o, this._lBlock ^= o << g;
|
|
4207
4208
|
}
|
|
4208
|
-
function v(
|
|
4209
|
-
var o = (this._rBlock >>>
|
|
4210
|
-
this._lBlock ^= o, this._rBlock ^= o <<
|
|
4209
|
+
function v(g, i) {
|
|
4210
|
+
var o = (this._rBlock >>> g ^ this._lBlock) & i;
|
|
4211
|
+
this._lBlock ^= o, this._rBlock ^= o << g;
|
|
4211
4212
|
}
|
|
4212
4213
|
e.DES = m._createHelper(s);
|
|
4213
|
-
var
|
|
4214
|
+
var l = B.TripleDES = m.extend({
|
|
4214
4215
|
_doReset: function() {
|
|
4215
|
-
var
|
|
4216
|
+
var g = this._key, i = g.words;
|
|
4216
4217
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4217
4218
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4218
|
-
var o = i.slice(0, 2),
|
|
4219
|
-
this._des1 = s.createEncryptor(p.create(o)), this._des2 = s.createEncryptor(p.create(
|
|
4219
|
+
var o = i.slice(0, 2), d = i.length < 4 ? i.slice(0, 2) : i.slice(2, 4), b = i.length < 6 ? i.slice(0, 2) : i.slice(4, 6);
|
|
4220
|
+
this._des1 = s.createEncryptor(p.create(o)), this._des2 = s.createEncryptor(p.create(d)), this._des3 = s.createEncryptor(p.create(b));
|
|
4220
4221
|
},
|
|
4221
|
-
encryptBlock: function(
|
|
4222
|
-
this._des1.encryptBlock(
|
|
4222
|
+
encryptBlock: function(g, i) {
|
|
4223
|
+
this._des1.encryptBlock(g, i), this._des2.decryptBlock(g, i), this._des3.encryptBlock(g, i);
|
|
4223
4224
|
},
|
|
4224
|
-
decryptBlock: function(
|
|
4225
|
-
this._des3.decryptBlock(
|
|
4225
|
+
decryptBlock: function(g, i) {
|
|
4226
|
+
this._des3.decryptBlock(g, i), this._des2.encryptBlock(g, i), this._des1.decryptBlock(g, i);
|
|
4226
4227
|
},
|
|
4227
4228
|
keySize: 192 / 32,
|
|
4228
4229
|
ivSize: 64 / 32,
|
|
4229
4230
|
blockSize: 64 / 32
|
|
4230
4231
|
});
|
|
4231
|
-
e.TripleDES = m._createHelper(
|
|
4232
|
+
e.TripleDES = m._createHelper(l);
|
|
4232
4233
|
})(), t.TripleDES;
|
|
4233
4234
|
});
|
|
4234
4235
|
})(nr)), nr.exports;
|
|
4235
4236
|
}
|
|
4236
4237
|
var ar = { exports: {} }, px = ar.exports, pe;
|
|
4237
4238
|
function Bx() {
|
|
4238
|
-
return pe || (pe = 1, (function(r,
|
|
4239
|
-
(function(t, e,
|
|
4239
|
+
return pe || (pe = 1, (function(r, h) {
|
|
4240
|
+
(function(t, e, u) {
|
|
4240
4241
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4241
4242
|
})(px, function(t) {
|
|
4242
4243
|
return (function() {
|
|
4243
|
-
var e = t,
|
|
4244
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = m.RC4 = p.extend({
|
|
4244
4245
|
_doReset: function() {
|
|
4245
4246
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4246
4247
|
s[f] = f;
|
|
4247
4248
|
for (var f = 0, v = 0; f < 256; f++) {
|
|
4248
|
-
var
|
|
4249
|
-
v = (v + s[f] +
|
|
4249
|
+
var l = f % a, g = E[l >>> 2] >>> 24 - l % 4 * 8 & 255;
|
|
4250
|
+
v = (v + s[f] + g) % 256;
|
|
4250
4251
|
var i = s[f];
|
|
4251
4252
|
s[f] = s[v], s[v] = i;
|
|
4252
4253
|
}
|
|
@@ -4289,12 +4290,12 @@ function Bx() {
|
|
|
4289
4290
|
}
|
|
4290
4291
|
var or = { exports: {} }, Cx = or.exports, Be;
|
|
4291
4292
|
function Ex() {
|
|
4292
|
-
return Be || (Be = 1, (function(r,
|
|
4293
|
-
(function(t, e,
|
|
4293
|
+
return Be || (Be = 1, (function(r, h) {
|
|
4294
|
+
(function(t, e, u) {
|
|
4294
4295
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4295
4296
|
})(Cx, function(t) {
|
|
4296
4297
|
return (function() {
|
|
4297
|
-
var e = t,
|
|
4298
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = p.extend({
|
|
4298
4299
|
_doReset: function() {
|
|
4299
4300
|
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4300
4301
|
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
@@ -4307,7 +4308,7 @@ function Ex() {
|
|
|
4307
4308
|
a[1] << 16 | a[0] >>> 16,
|
|
4308
4309
|
a[3],
|
|
4309
4310
|
a[2] << 16 | a[1] >>> 16
|
|
4310
|
-
],
|
|
4311
|
+
], l = this._C = [
|
|
4311
4312
|
a[2] << 16 | a[2] >>> 16,
|
|
4312
4313
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4313
4314
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4321,10 +4322,10 @@ function Ex() {
|
|
|
4321
4322
|
for (var f = 0; f < 4; f++)
|
|
4322
4323
|
E.call(this);
|
|
4323
4324
|
for (var f = 0; f < 8; f++)
|
|
4324
|
-
|
|
4325
|
+
l[f] ^= v[f + 4 & 7];
|
|
4325
4326
|
if (s) {
|
|
4326
|
-
var
|
|
4327
|
-
|
|
4327
|
+
var g = s.words, i = g[0], o = g[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4328
|
+
l[0] ^= d, l[1] ^= D, l[2] ^= b, l[3] ^= y, l[4] ^= d, l[5] ^= D, l[6] ^= b, l[7] ^= y;
|
|
4328
4329
|
for (var f = 0; f < 4; f++)
|
|
4329
4330
|
E.call(this);
|
|
4330
4331
|
}
|
|
@@ -4343,7 +4344,7 @@ function Ex() {
|
|
|
4343
4344
|
C[f] = s[f];
|
|
4344
4345
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4345
4346
|
for (var f = 0; f < 8; f++) {
|
|
4346
|
-
var v = a[f] + s[f],
|
|
4347
|
+
var v = a[f] + s[f], l = v & 65535, g = v >>> 16, i = ((l * l >>> 17) + l * g >>> 15) + g * g, o = ((v & 4294901760) * v | 0) + ((v & 65535) * v | 0);
|
|
4347
4348
|
x[f] = i ^ o;
|
|
4348
4349
|
}
|
|
4349
4350
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
@@ -4355,12 +4356,12 @@ function Ex() {
|
|
|
4355
4356
|
}
|
|
4356
4357
|
var ir = { exports: {} }, Ax = ir.exports, Ce;
|
|
4357
4358
|
function Fx() {
|
|
4358
|
-
return Ce || (Ce = 1, (function(r,
|
|
4359
|
-
(function(t, e,
|
|
4359
|
+
return Ce || (Ce = 1, (function(r, h) {
|
|
4360
|
+
(function(t, e, u) {
|
|
4360
4361
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4361
4362
|
})(Ax, function(t) {
|
|
4362
4363
|
return (function() {
|
|
4363
|
-
var e = t,
|
|
4364
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = p.extend({
|
|
4364
4365
|
_doReset: function() {
|
|
4365
4366
|
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4366
4367
|
a[0],
|
|
@@ -4382,14 +4383,14 @@ function Fx() {
|
|
|
4382
4383
|
a[3] & 4294901760 | a[0] & 65535
|
|
4383
4384
|
];
|
|
4384
4385
|
this._b = 0;
|
|
4385
|
-
for (var
|
|
4386
|
+
for (var l = 0; l < 4; l++)
|
|
4386
4387
|
E.call(this);
|
|
4387
|
-
for (var
|
|
4388
|
-
v[
|
|
4388
|
+
for (var l = 0; l < 8; l++)
|
|
4389
|
+
v[l] ^= f[l + 4 & 7];
|
|
4389
4390
|
if (s) {
|
|
4390
|
-
var
|
|
4391
|
-
v[0] ^=
|
|
4392
|
-
for (var
|
|
4391
|
+
var g = s.words, i = g[0], o = g[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4392
|
+
v[0] ^= d, v[1] ^= D, v[2] ^= b, v[3] ^= y, v[4] ^= d, v[5] ^= D, v[6] ^= b, v[7] ^= y;
|
|
4393
|
+
for (var l = 0; l < 4; l++)
|
|
4393
4394
|
E.call(this);
|
|
4394
4395
|
}
|
|
4395
4396
|
},
|
|
@@ -4407,7 +4408,7 @@ function Fx() {
|
|
|
4407
4408
|
C[f] = s[f];
|
|
4408
4409
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4409
4410
|
for (var f = 0; f < 8; f++) {
|
|
4410
|
-
var v = a[f] + s[f],
|
|
4411
|
+
var v = a[f] + s[f], l = v & 65535, g = v >>> 16, i = ((l * l >>> 17) + l * g >>> 15) + g * g, o = ((v & 4294901760) * v | 0) + ((v & 65535) * v | 0);
|
|
4411
4412
|
x[f] = i ^ o;
|
|
4412
4413
|
}
|
|
4413
4414
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
@@ -4417,14 +4418,14 @@ function Fx() {
|
|
|
4417
4418
|
});
|
|
4418
4419
|
})(ir)), ir.exports;
|
|
4419
4420
|
}
|
|
4420
|
-
var sr = { exports: {} },
|
|
4421
|
-
function
|
|
4422
|
-
return Ee || (Ee = 1, (function(r,
|
|
4423
|
-
(function(t, e,
|
|
4421
|
+
var sr = { exports: {} }, Dx = sr.exports, Ee;
|
|
4422
|
+
function gx() {
|
|
4423
|
+
return Ee || (Ee = 1, (function(r, h) {
|
|
4424
|
+
(function(t, e, u) {
|
|
4424
4425
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4425
|
-
})(
|
|
4426
|
+
})(Dx, function(t) {
|
|
4426
4427
|
return (function() {
|
|
4427
|
-
var e = t,
|
|
4428
|
+
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo;
|
|
4428
4429
|
const B = 16, C = [
|
|
4429
4430
|
608135816,
|
|
4430
4431
|
2242054355,
|
|
@@ -5482,53 +5483,53 @@ function Dx() {
|
|
|
5482
5483
|
pbox: [],
|
|
5483
5484
|
sbox: []
|
|
5484
5485
|
};
|
|
5485
|
-
function E(
|
|
5486
|
-
let i =
|
|
5487
|
-
return
|
|
5486
|
+
function E(l, g) {
|
|
5487
|
+
let i = g >> 24 & 255, o = g >> 16 & 255, d = g >> 8 & 255, b = g & 255, D = l.sbox[0][i] + l.sbox[1][o];
|
|
5488
|
+
return D = D ^ l.sbox[2][d], D = D + l.sbox[3][b], D;
|
|
5488
5489
|
}
|
|
5489
|
-
function a(
|
|
5490
|
-
let o =
|
|
5491
|
-
for (let
|
|
5492
|
-
o = o ^
|
|
5493
|
-
return b = o, o =
|
|
5490
|
+
function a(l, g, i) {
|
|
5491
|
+
let o = g, d = i, b;
|
|
5492
|
+
for (let D = 0; D < B; ++D)
|
|
5493
|
+
o = o ^ l.pbox[D], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5494
|
+
return b = o, o = d, d = b, d = d ^ l.pbox[B], o = o ^ l.pbox[B + 1], { left: o, right: d };
|
|
5494
5495
|
}
|
|
5495
|
-
function s(
|
|
5496
|
-
let o =
|
|
5497
|
-
for (let
|
|
5498
|
-
o = o ^
|
|
5499
|
-
return b = o, o =
|
|
5496
|
+
function s(l, g, i) {
|
|
5497
|
+
let o = g, d = i, b;
|
|
5498
|
+
for (let D = B + 1; D > 1; --D)
|
|
5499
|
+
o = o ^ l.pbox[D], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5500
|
+
return b = o, o = d, d = b, d = d ^ l.pbox[1], o = o ^ l.pbox[0], { left: o, right: d };
|
|
5500
5501
|
}
|
|
5501
|
-
function f(
|
|
5502
|
+
function f(l, g, i) {
|
|
5502
5503
|
for (let y = 0; y < 4; y++) {
|
|
5503
|
-
|
|
5504
|
+
l.sbox[y] = [];
|
|
5504
5505
|
for (let k = 0; k < 256; k++)
|
|
5505
|
-
|
|
5506
|
+
l.sbox[y][k] = x[y][k];
|
|
5506
5507
|
}
|
|
5507
5508
|
let o = 0;
|
|
5508
5509
|
for (let y = 0; y < B + 2; y++)
|
|
5509
|
-
|
|
5510
|
-
let
|
|
5510
|
+
l.pbox[y] = C[y] ^ g[o], o++, o >= i && (o = 0);
|
|
5511
|
+
let d = 0, b = 0, D = 0;
|
|
5511
5512
|
for (let y = 0; y < B + 2; y += 2)
|
|
5512
|
-
|
|
5513
|
+
D = a(l, d, b), d = D.left, b = D.right, l.pbox[y] = d, l.pbox[y + 1] = b;
|
|
5513
5514
|
for (let y = 0; y < 4; y++)
|
|
5514
5515
|
for (let k = 0; k < 256; k += 2)
|
|
5515
|
-
|
|
5516
|
+
D = a(l, d, b), d = D.left, b = D.right, l.sbox[y][k] = d, l.sbox[y][k + 1] = b;
|
|
5516
5517
|
return !0;
|
|
5517
5518
|
}
|
|
5518
5519
|
var v = m.Blowfish = p.extend({
|
|
5519
5520
|
_doReset: function() {
|
|
5520
5521
|
if (this._keyPriorReset !== this._key) {
|
|
5521
|
-
var
|
|
5522
|
-
f(n,
|
|
5522
|
+
var l = this._keyPriorReset = this._key, g = l.words, i = l.sigBytes / 4;
|
|
5523
|
+
f(n, g, i);
|
|
5523
5524
|
}
|
|
5524
5525
|
},
|
|
5525
|
-
encryptBlock: function(
|
|
5526
|
-
var i = a(n,
|
|
5527
|
-
|
|
5526
|
+
encryptBlock: function(l, g) {
|
|
5527
|
+
var i = a(n, l[g], l[g + 1]);
|
|
5528
|
+
l[g] = i.left, l[g + 1] = i.right;
|
|
5528
5529
|
},
|
|
5529
|
-
decryptBlock: function(
|
|
5530
|
-
var i = s(n,
|
|
5531
|
-
|
|
5530
|
+
decryptBlock: function(l, g) {
|
|
5531
|
+
var i = s(n, l[g], l[g + 1]);
|
|
5532
|
+
l[g] = i.left, l[g + 1] = i.right;
|
|
5532
5533
|
},
|
|
5533
5534
|
blockSize: 64 / 32,
|
|
5534
5535
|
keySize: 128 / 32,
|
|
@@ -5541,9 +5542,9 @@ function Dx() {
|
|
|
5541
5542
|
}
|
|
5542
5543
|
var bx = y0.exports, Ae;
|
|
5543
5544
|
function mx() {
|
|
5544
|
-
return Ae || (Ae = 1, (function(r,
|
|
5545
|
-
(function(t, e,
|
|
5546
|
-
r.exports = e(M(),
|
|
5545
|
+
return Ae || (Ae = 1, (function(r, h) {
|
|
5546
|
+
(function(t, e, u) {
|
|
5547
|
+
r.exports = e(M(), ur(), Ft(), gt(), s0(), _t(), c0(), ke(), Fr(), Ht(), Se(), Pt(), zt(), Lt(), Dr(), Tt(), a0(), X(), jt(), Kt(), Yt(), Vt(), Jt(), ex(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex(), Fx(), gx());
|
|
5547
5548
|
})(bx, function(t) {
|
|
5548
5549
|
return t;
|
|
5549
5550
|
});
|
|
@@ -5564,34 +5565,34 @@ function yx() {
|
|
|
5564
5565
|
};
|
|
5565
5566
|
}
|
|
5566
5567
|
function wx(r) {
|
|
5567
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5568
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.159`;
|
|
5568
5569
|
}
|
|
5569
|
-
function kx(r,
|
|
5570
|
+
function kx(r, h) {
|
|
5570
5571
|
const t = wx(r);
|
|
5571
|
-
return new Worker(t, { type: "module", ...
|
|
5572
|
+
return new Worker(t, { type: "module", ...h });
|
|
5572
5573
|
}
|
|
5573
|
-
const
|
|
5574
|
+
const gr = () => {
|
|
5574
5575
|
try {
|
|
5575
5576
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5576
5577
|
} catch {
|
|
5577
5578
|
}
|
|
5578
5579
|
return !1;
|
|
5579
5580
|
}, m0 = (...r) => {
|
|
5580
|
-
|
|
5581
|
+
gr();
|
|
5581
5582
|
}, Fe = (...r) => {
|
|
5582
|
-
|
|
5583
|
-
},
|
|
5583
|
+
gr();
|
|
5584
|
+
}, De = /* @__PURE__ */ new Map(), Br = /* @__PURE__ */ new Map();
|
|
5584
5585
|
let Sx = 0;
|
|
5585
5586
|
function Hx(r) {
|
|
5586
|
-
const
|
|
5587
|
-
if (
|
|
5587
|
+
const h = De.get(r);
|
|
5588
|
+
if (h) return h;
|
|
5588
5589
|
const t = kx("./deform.worker.ts");
|
|
5589
5590
|
try {
|
|
5590
|
-
t.postMessage({ type: "SET_DEBUG", debugRender:
|
|
5591
|
+
t.postMessage({ type: "SET_DEBUG", debugRender: gr() });
|
|
5591
5592
|
} catch {
|
|
5592
5593
|
}
|
|
5593
|
-
t.onmessage = (
|
|
5594
|
-
const { id: p, imageBitmap: m, error: B, duration: C } =
|
|
5594
|
+
t.onmessage = (u) => {
|
|
5595
|
+
const { id: p, imageBitmap: m, error: B, duration: C } = u.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5595
5596
|
m0(`[renderService] deform worker 响应 id=${p}${x}`, {
|
|
5596
5597
|
hasImageBitmap: !!m,
|
|
5597
5598
|
width: m?.width,
|
|
@@ -5606,28 +5607,28 @@ function Hx(r) {
|
|
|
5606
5607
|
}
|
|
5607
5608
|
n.resolve(m);
|
|
5608
5609
|
}
|
|
5609
|
-
}, t.onerror = (
|
|
5610
|
+
}, t.onerror = (u) => {
|
|
5610
5611
|
};
|
|
5611
5612
|
const e = () => {
|
|
5612
|
-
const
|
|
5613
|
+
const u = yx();
|
|
5613
5614
|
return m0("🔍 [workerManager] 检查 License Token:", {
|
|
5614
|
-
hasToken: !!
|
|
5615
|
-
tokenPreview:
|
|
5615
|
+
hasToken: !!u.token,
|
|
5616
|
+
tokenPreview: u.token ? u.token.substring(0, 20) + "..." : "undefined",
|
|
5616
5617
|
faceId: r,
|
|
5617
5618
|
source: "licenseStore模块"
|
|
5618
|
-
}),
|
|
5619
|
+
}), u.token ? (m0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5619
5620
|
type: "SET_LICENSE",
|
|
5620
|
-
licenseToken:
|
|
5621
|
-
licenseApiUrl:
|
|
5622
|
-
deviceId:
|
|
5623
|
-
domain:
|
|
5621
|
+
licenseToken: u.token,
|
|
5622
|
+
licenseApiUrl: u.apiUrl,
|
|
5623
|
+
deviceId: u.deviceId,
|
|
5624
|
+
domain: u.domain
|
|
5624
5625
|
}), !0) : !1;
|
|
5625
5626
|
};
|
|
5626
5627
|
return e() || (m0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5627
5628
|
e() || Fe("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5628
5629
|
}, 200), setTimeout(() => {
|
|
5629
5630
|
e() || Fe("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
5630
|
-
}, 500)),
|
|
5631
|
+
}, 500)), De.set(r, t), t;
|
|
5631
5632
|
}
|
|
5632
5633
|
function $x(r) {
|
|
5633
5634
|
return {
|
|
@@ -5635,10 +5636,10 @@ function $x(r) {
|
|
|
5635
5636
|
type: r.type,
|
|
5636
5637
|
blendMode: r.blendMode,
|
|
5637
5638
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5638
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5639
|
-
x:
|
|
5640
|
-
y:
|
|
5641
|
-
type:
|
|
5639
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((h) => ({
|
|
5640
|
+
x: h.x,
|
|
5641
|
+
y: h.y,
|
|
5642
|
+
type: h.type
|
|
5642
5643
|
})) : [],
|
|
5643
5644
|
bounds: r.bounds ? {
|
|
5644
5645
|
width: r.bounds.width,
|
|
@@ -5661,30 +5662,30 @@ function $x(r) {
|
|
|
5661
5662
|
layerOrder: r.layerOrder,
|
|
5662
5663
|
imagePath: r.imagePath,
|
|
5663
5664
|
vectorMask: r.vectorMask ? {
|
|
5664
|
-
paths: r.vectorMask.paths?.map((
|
|
5665
|
-
open:
|
|
5666
|
-
knots:
|
|
5665
|
+
paths: r.vectorMask.paths?.map((h) => ({
|
|
5666
|
+
open: h.open,
|
|
5667
|
+
knots: h.knots?.map((t) => ({
|
|
5667
5668
|
linked: t.linked,
|
|
5668
5669
|
points: [...t.points]
|
|
5669
5670
|
})),
|
|
5670
|
-
fillRule:
|
|
5671
|
-
operation:
|
|
5671
|
+
fillRule: h.fillRule,
|
|
5672
|
+
operation: h.operation
|
|
5672
5673
|
})),
|
|
5673
|
-
points: r.vectorMask.points?.map((
|
|
5674
|
-
x:
|
|
5675
|
-
y:
|
|
5676
|
-
type:
|
|
5674
|
+
points: r.vectorMask.points?.map((h) => ({
|
|
5675
|
+
x: h.x,
|
|
5676
|
+
y: h.y,
|
|
5677
|
+
type: h.type
|
|
5677
5678
|
})),
|
|
5678
5679
|
invert: r.vectorMask.invert,
|
|
5679
5680
|
notLink: r.vectorMask.notLink,
|
|
5680
5681
|
disable: r.vectorMask.disable,
|
|
5681
5682
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5682
5683
|
} : void 0,
|
|
5683
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5684
|
-
type:
|
|
5685
|
-
enabled:
|
|
5686
|
-
filter:
|
|
5687
|
-
puppetShapeList:
|
|
5684
|
+
filterList: r.filterList ? r.filterList.map((h) => ({
|
|
5685
|
+
type: h.type,
|
|
5686
|
+
enabled: h.enabled,
|
|
5687
|
+
filter: h.filter ? {
|
|
5688
|
+
puppetShapeList: h.filter.puppetShapeList?.map((t) => ({
|
|
5688
5689
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5689
5690
|
x: e.x,
|
|
5690
5691
|
y: e.y
|
|
@@ -5701,47 +5702,47 @@ function $x(r) {
|
|
|
5701
5702
|
clipping: r.clipping
|
|
5702
5703
|
};
|
|
5703
5704
|
}
|
|
5704
|
-
function Rx(r,
|
|
5705
|
-
const
|
|
5705
|
+
function Rx(r, h, t, e) {
|
|
5706
|
+
const u = ++Sx, p = Hx(t);
|
|
5706
5707
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5707
|
-
Br.set(
|
|
5708
|
+
Br.set(u, {
|
|
5708
5709
|
resolve: (x) => {
|
|
5709
5710
|
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5710
5711
|
},
|
|
5711
5712
|
reject: B
|
|
5712
5713
|
});
|
|
5713
|
-
const C = $x(
|
|
5714
|
-
p.postMessage({ id:
|
|
5714
|
+
const C = $x(h);
|
|
5715
|
+
p.postMessage({ id: u, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5715
5716
|
r
|
|
5716
5717
|
]);
|
|
5717
5718
|
});
|
|
5718
5719
|
}
|
|
5719
|
-
async function Px(r,
|
|
5720
|
-
const m = await
|
|
5720
|
+
async function Px(r, h, t = 0, e, u, p) {
|
|
5721
|
+
const m = await ut(r, u, p);
|
|
5721
5722
|
if (!m || m.width === 0 || m.height === 0)
|
|
5722
5723
|
throw new Error("图片无效:尺寸为 0");
|
|
5723
|
-
return await Rx(m,
|
|
5724
|
+
return await Rx(m, h, t, e);
|
|
5724
5725
|
}
|
|
5725
|
-
function l0(r,
|
|
5726
|
+
function l0(r, h) {
|
|
5726
5727
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5727
|
-
return new OffscreenCanvas(r,
|
|
5728
|
+
return new OffscreenCanvas(r, h);
|
|
5728
5729
|
if (typeof document < "u") {
|
|
5729
5730
|
const t = document.createElement("canvas");
|
|
5730
|
-
return t.width = r, t.height =
|
|
5731
|
+
return t.width = r, t.height = h, t;
|
|
5731
5732
|
} else
|
|
5732
5733
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5733
5734
|
}
|
|
5734
5735
|
function F0(r) {
|
|
5735
5736
|
return r.getContext("2d");
|
|
5736
5737
|
}
|
|
5737
|
-
function
|
|
5738
|
-
const
|
|
5739
|
-
if (!
|
|
5738
|
+
function ge(r) {
|
|
5739
|
+
const h = F0(r);
|
|
5740
|
+
if (!h)
|
|
5740
5741
|
throw new Error("无法创建 canvas context");
|
|
5741
|
-
return
|
|
5742
|
+
return h;
|
|
5742
5743
|
}
|
|
5743
|
-
async function
|
|
5744
|
-
const
|
|
5744
|
+
async function Wx(r) {
|
|
5745
|
+
const h = performance.now(), t = () => {
|
|
5745
5746
|
try {
|
|
5746
5747
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5747
5748
|
} catch {
|
|
@@ -5749,7 +5750,7 @@ async function zx(r) {
|
|
|
5749
5750
|
return !1;
|
|
5750
5751
|
}, e = (...c) => {
|
|
5751
5752
|
t();
|
|
5752
|
-
},
|
|
5753
|
+
}, u = (...c) => {
|
|
5753
5754
|
t();
|
|
5754
5755
|
}, {
|
|
5755
5756
|
psdJson: p,
|
|
@@ -5787,7 +5788,7 @@ async function zx(r) {
|
|
|
5787
5788
|
const _ = new URL(c, n).toString();
|
|
5788
5789
|
return !_.includes("http") && !_.startsWith("data:") && !_.startsWith("blob:") ? void 0 : _;
|
|
5789
5790
|
} catch (_) {
|
|
5790
|
-
|
|
5791
|
+
u(`[renderByJson] 解析图片 URL 失败: ${c}`, _);
|
|
5791
5792
|
return;
|
|
5792
5793
|
}
|
|
5793
5794
|
}, s = {}, f = /* @__PURE__ */ new Map();
|
|
@@ -5809,32 +5810,32 @@ async function zx(r) {
|
|
|
5809
5810
|
hasChildren: !!c.children,
|
|
5810
5811
|
childrenCount: c.children?.length || 0
|
|
5811
5812
|
})));
|
|
5812
|
-
function
|
|
5813
|
+
function l(c, A) {
|
|
5813
5814
|
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5814
5815
|
if (c.type === "Layer") {
|
|
5815
5816
|
if (c.imagePath) {
|
|
5816
|
-
const
|
|
5817
|
+
const z = m.find((P) => {
|
|
5817
5818
|
const L = P.sourceName || P.layerName;
|
|
5818
5819
|
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5819
5820
|
});
|
|
5820
|
-
|
|
5821
|
-
url:
|
|
5821
|
+
z && (s[c.imagePath] = {
|
|
5822
|
+
url: z.url
|
|
5822
5823
|
});
|
|
5823
5824
|
}
|
|
5824
5825
|
if (c.name) {
|
|
5825
5826
|
if (_) {
|
|
5826
|
-
const
|
|
5827
|
+
const z = `${_}-${c.name}`, P = m.find((L) => {
|
|
5827
5828
|
const I = L.sourceName || L.layerName;
|
|
5828
5829
|
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5829
5830
|
});
|
|
5830
|
-
P && (s[
|
|
5831
|
+
P && (s[z] = {
|
|
5831
5832
|
url: P.url
|
|
5832
5833
|
});
|
|
5833
5834
|
}
|
|
5834
5835
|
if (c.imagePath && c.name) {
|
|
5835
|
-
const
|
|
5836
|
+
const z = c.imagePath.split("/").pop() || c.imagePath, P = m.find((L) => {
|
|
5836
5837
|
const I = L.sourceName || L.layerName;
|
|
5837
|
-
return I ? (I.split("/").pop() || I) ===
|
|
5838
|
+
return I ? (I.split("/").pop() || I) === z : !1;
|
|
5838
5839
|
});
|
|
5839
5840
|
P && (s[c.imagePath] = {
|
|
5840
5841
|
url: P.url
|
|
@@ -5843,35 +5844,35 @@ async function zx(r) {
|
|
|
5843
5844
|
}
|
|
5844
5845
|
}
|
|
5845
5846
|
if (c.children)
|
|
5846
|
-
for (const
|
|
5847
|
-
|
|
5847
|
+
for (const z of c.children)
|
|
5848
|
+
z && l(z, _);
|
|
5848
5849
|
}
|
|
5849
|
-
function
|
|
5850
|
+
function g(c, A) {
|
|
5850
5851
|
const _ = c.id ?? A;
|
|
5851
5852
|
if (c.type === "Group" && _)
|
|
5852
5853
|
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${v.has(_)}`), v.has(_)) {
|
|
5853
|
-
const
|
|
5854
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${
|
|
5854
|
+
const z = v.get(_);
|
|
5855
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${z.substring(0, 50)}...`), c.children) {
|
|
5855
5856
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5856
5857
|
for (const P of c.children)
|
|
5857
5858
|
if (P && P.isSmartObject === !0) {
|
|
5858
5859
|
const L = P?.name || "";
|
|
5859
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5860
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = z, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${z.substring(0, 50)}...`)) : u("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5860
5861
|
}
|
|
5861
5862
|
} else
|
|
5862
|
-
|
|
5863
|
+
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5863
5864
|
} else
|
|
5864
5865
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5865
5866
|
if (c.children)
|
|
5866
|
-
for (const
|
|
5867
|
-
|
|
5867
|
+
for (const z of c.children)
|
|
5868
|
+
z && g(z, _);
|
|
5868
5869
|
}
|
|
5869
5870
|
if (p.layerList)
|
|
5870
5871
|
for (const c of p.layerList)
|
|
5871
|
-
c &&
|
|
5872
|
+
c && l(c);
|
|
5872
5873
|
if (p.layerList)
|
|
5873
5874
|
for (const c of p.layerList)
|
|
5874
|
-
c &&
|
|
5875
|
+
c && g(c);
|
|
5875
5876
|
const o = Je([{
|
|
5876
5877
|
psdJson: p,
|
|
5877
5878
|
layerExtrasByName: s
|
|
@@ -5881,50 +5882,50 @@ async function zx(r) {
|
|
|
5881
5882
|
});
|
|
5882
5883
|
if (!o.models || o.models.length === 0)
|
|
5883
5884
|
throw new Error("无法解析 JSON 数据");
|
|
5884
|
-
const
|
|
5885
|
-
if (!
|
|
5885
|
+
const d = o.models[0];
|
|
5886
|
+
if (!d.psdPartData)
|
|
5886
5887
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5887
|
-
const b =
|
|
5888
|
+
const b = d.width, D = d.height, y = l0(b, D), k = ge(y), R = [], F = (c) => {
|
|
5888
5889
|
if (c.url && s[c.url])
|
|
5889
5890
|
return s[c.url];
|
|
5890
5891
|
if (c.url) {
|
|
5891
5892
|
const A = c.url.split("/").pop() || c.url;
|
|
5892
5893
|
if (s[A])
|
|
5893
5894
|
return s[A];
|
|
5894
|
-
const _ = m.find((
|
|
5895
|
-
const P =
|
|
5895
|
+
const _ = m.find((z) => {
|
|
5896
|
+
const P = z.sourceName || z.layerName;
|
|
5896
5897
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5897
5898
|
});
|
|
5898
5899
|
if (_) {
|
|
5899
|
-
const
|
|
5900
|
-
if (
|
|
5901
|
-
return s[
|
|
5900
|
+
const z = _.sourceName || _.layerName;
|
|
5901
|
+
if (z)
|
|
5902
|
+
return s[z] || { url: _.url };
|
|
5902
5903
|
}
|
|
5903
5904
|
}
|
|
5904
5905
|
};
|
|
5905
|
-
for (let c = 0; c <
|
|
5906
|
-
const A =
|
|
5907
|
-
if (A.type ===
|
|
5906
|
+
for (let c = 0; c < d.psdPartData.length; c++) {
|
|
5907
|
+
const A = d.psdPartData[c], _ = F(A);
|
|
5908
|
+
if (A.type === D0.Layer) {
|
|
5908
5909
|
if (!_ || !_.url) {
|
|
5909
|
-
|
|
5910
|
+
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5910
5911
|
continue;
|
|
5911
5912
|
}
|
|
5912
|
-
const
|
|
5913
|
+
const z = _.url, P = a(z);
|
|
5913
5914
|
if (!P) {
|
|
5914
|
-
|
|
5915
|
+
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5915
5916
|
continue;
|
|
5916
5917
|
}
|
|
5917
5918
|
R.push({
|
|
5918
5919
|
index: c,
|
|
5919
5920
|
type: "layer",
|
|
5920
5921
|
partData: A,
|
|
5921
|
-
promise:
|
|
5922
|
+
promise: dt(P, E, n).catch((L) => null)
|
|
5922
5923
|
});
|
|
5923
|
-
} else if (A.type ===
|
|
5924
|
+
} else if (A.type === D0.Group) {
|
|
5924
5925
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5925
5926
|
continue;
|
|
5926
|
-
for (let
|
|
5927
|
-
const P = A.smartObjects[
|
|
5927
|
+
for (let z = 0; z < A.smartObjects.length; z++) {
|
|
5928
|
+
const P = A.smartObjects[z];
|
|
5928
5929
|
if (!P || !P.name)
|
|
5929
5930
|
continue;
|
|
5930
5931
|
let L = s[P.name] ?? _;
|
|
@@ -5932,8 +5933,8 @@ async function zx(r) {
|
|
|
5932
5933
|
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5933
5934
|
if (L = s[K], !L) {
|
|
5934
5935
|
const G = m.find((Y) => {
|
|
5935
|
-
const
|
|
5936
|
-
return !
|
|
5936
|
+
const r0 = Y.sourceName || Y.layerName;
|
|
5937
|
+
return !r0 || !P.imagePath ? !1 : (r0.split("/").pop() || r0) === K || r0 === P.imagePath || r0.endsWith(P.imagePath) || P.imagePath.endsWith(r0);
|
|
5937
5938
|
});
|
|
5938
5939
|
G && (L = { url: G.url });
|
|
5939
5940
|
}
|
|
@@ -5950,13 +5951,13 @@ async function zx(r) {
|
|
|
5950
5951
|
continue;
|
|
5951
5952
|
I = G;
|
|
5952
5953
|
}
|
|
5953
|
-
const Z = (A.partId ?? A.id) * 100 +
|
|
5954
|
+
const Z = (A.partId ?? A.id) * 100 + z, V = et(rt(P)), o0 = { width: b, height: D };
|
|
5954
5955
|
R.push({
|
|
5955
|
-
index: c +
|
|
5956
|
+
index: c + z * 0.01,
|
|
5956
5957
|
type: "group",
|
|
5957
5958
|
partData: A,
|
|
5958
5959
|
smartObject: P,
|
|
5959
|
-
maskData:
|
|
5960
|
+
maskData: V,
|
|
5960
5961
|
promise: Px(
|
|
5961
5962
|
I,
|
|
5962
5963
|
P,
|
|
@@ -5973,74 +5974,74 @@ async function zx(r) {
|
|
|
5973
5974
|
task: c,
|
|
5974
5975
|
imageBitmap: w[A]
|
|
5975
5976
|
})).sort((c, A) => {
|
|
5976
|
-
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index,
|
|
5977
|
-
return _ -
|
|
5977
|
+
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, z = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
5978
|
+
return _ - z;
|
|
5978
5979
|
});
|
|
5979
|
-
let $ = l0(b,
|
|
5980
|
+
let $ = l0(b, D), W = F0($), O = !1, q = "normal";
|
|
5980
5981
|
for (let c = 0; c < H.length; c++) {
|
|
5981
5982
|
const { task: A, imageBitmap: _ } = H[c];
|
|
5982
5983
|
if (!_) {
|
|
5983
|
-
|
|
5984
|
+
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5984
5985
|
continue;
|
|
5985
5986
|
}
|
|
5986
|
-
const { partData:
|
|
5987
|
+
const { partData: z } = A, P = z.bounds;
|
|
5987
5988
|
let L;
|
|
5988
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
5989
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? z.opacity : L = z.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
5989
5990
|
let I;
|
|
5990
|
-
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ??
|
|
5991
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? z.clipping === !0 : I = z.clipping === !0;
|
|
5991
5992
|
const Z = H[c + 1];
|
|
5992
|
-
let
|
|
5993
|
+
let V = !1;
|
|
5993
5994
|
if (Z) {
|
|
5994
5995
|
const K = Z.task.partData;
|
|
5995
|
-
Z.task.type === "group" && Z.task.smartObject ?
|
|
5996
|
+
Z.task.type === "group" && Z.task.smartObject ? V = Z.task.smartObject.clipping ?? K.clipping === !0 : V = K.clipping === !0;
|
|
5996
5997
|
}
|
|
5997
|
-
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
5998
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : z?.name || "未命名图层";
|
|
5998
5999
|
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
5999
6000
|
type: A.type,
|
|
6000
6001
|
bitmapSize: { width: _.width, height: _.height },
|
|
6001
6002
|
bounds: P,
|
|
6002
6003
|
hasMask: !!A.maskData,
|
|
6003
|
-
blendMode:
|
|
6004
|
+
blendMode: z.blendMode,
|
|
6004
6005
|
opacity: L,
|
|
6005
6006
|
clipping: I
|
|
6006
|
-
}), !I &&
|
|
6007
|
-
if (O = !0, q =
|
|
6008
|
-
if (
|
|
6007
|
+
}), !I && V) {
|
|
6008
|
+
if (O = !0, q = z.blendMode || "normal", W) {
|
|
6009
|
+
if (W.clearRect(0, 0, b, D), W.globalCompositeOperation = "source-over", W.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6009
6010
|
if (A.maskData) {
|
|
6010
|
-
const K = l0(b,
|
|
6011
|
-
G && (G.drawImage(_, 0, 0), lr(G, A.maskData),
|
|
6011
|
+
const K = l0(b, D), G = F0(K);
|
|
6012
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), W.drawImage(K, 0, 0));
|
|
6012
6013
|
} else
|
|
6013
|
-
|
|
6014
|
-
else A.type === "layer" && (P ?
|
|
6014
|
+
W.drawImage(_, 0, 0);
|
|
6015
|
+
else A.type === "layer" && (P ? W.drawImage(
|
|
6015
6016
|
_,
|
|
6016
6017
|
P.left,
|
|
6017
6018
|
P.top,
|
|
6018
6019
|
P.width,
|
|
6019
6020
|
P.height
|
|
6020
|
-
) :
|
|
6021
|
-
|
|
6021
|
+
) : W.drawImage(_, 0, 0));
|
|
6022
|
+
W.globalAlpha = 1;
|
|
6022
6023
|
}
|
|
6023
6024
|
} else if (I) {
|
|
6024
|
-
if (
|
|
6025
|
-
if (
|
|
6025
|
+
if (W) {
|
|
6026
|
+
if (W.globalCompositeOperation = "source-atop", W.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6026
6027
|
if (A.maskData) {
|
|
6027
|
-
const K = l0(b,
|
|
6028
|
-
G && (G.drawImage(_, 0, 0), lr(G, A.maskData),
|
|
6028
|
+
const K = l0(b, D), G = F0(K);
|
|
6029
|
+
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), W.drawImage(K, 0, 0));
|
|
6029
6030
|
} else
|
|
6030
|
-
|
|
6031
|
-
else A.type === "layer" && (P ?
|
|
6031
|
+
W.drawImage(_, 0, 0);
|
|
6032
|
+
else A.type === "layer" && (P ? W.drawImage(
|
|
6032
6033
|
_,
|
|
6033
6034
|
P.left,
|
|
6034
6035
|
P.top,
|
|
6035
6036
|
P.width,
|
|
6036
6037
|
P.height
|
|
6037
|
-
) :
|
|
6038
|
-
|
|
6038
|
+
) : W.drawImage(_, 0, 0));
|
|
6039
|
+
W.globalAlpha = 1, W.globalCompositeOperation = "source-over";
|
|
6039
6040
|
}
|
|
6040
6041
|
} else {
|
|
6041
|
-
if (k.globalCompositeOperation = Lr(
|
|
6042
|
+
if (k.globalCompositeOperation = Lr(z.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6042
6043
|
if (A.maskData) {
|
|
6043
|
-
const K = l0(b,
|
|
6044
|
+
const K = l0(b, D), G = F0(K);
|
|
6044
6045
|
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6045
6046
|
} else
|
|
6046
6047
|
k.drawImage(_, 0, 0);
|
|
@@ -6053,37 +6054,37 @@ async function zx(r) {
|
|
|
6053
6054
|
) : k.drawImage(_, 0, 0));
|
|
6054
6055
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6055
6056
|
}
|
|
6056
|
-
O && !
|
|
6057
|
+
O && !V && (k.globalCompositeOperation = Lr(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6057
6058
|
}
|
|
6058
|
-
$ = null,
|
|
6059
|
-
let U = y, T = b, N =
|
|
6059
|
+
$ = null, W = null;
|
|
6060
|
+
let U = y, T = b, N = D;
|
|
6060
6061
|
if (C !== void 0 || x !== void 0) {
|
|
6061
6062
|
if (C !== void 0 && x !== void 0)
|
|
6062
6063
|
T = C, N = x;
|
|
6063
6064
|
else if (C !== void 0) {
|
|
6064
6065
|
const A = C / b;
|
|
6065
|
-
T = C, N = Math.round(
|
|
6066
|
+
T = C, N = Math.round(D * A);
|
|
6066
6067
|
} else if (x !== void 0) {
|
|
6067
|
-
const A = x /
|
|
6068
|
+
const A = x / D;
|
|
6068
6069
|
T = Math.round(b * A), N = x;
|
|
6069
6070
|
}
|
|
6070
6071
|
U = l0(T, N);
|
|
6071
|
-
const c =
|
|
6072
|
-
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b,
|
|
6072
|
+
const c = ge(U);
|
|
6073
|
+
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b, D, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${D} -> ${T}x${N}`);
|
|
6073
6074
|
}
|
|
6074
|
-
const S = performance.now() -
|
|
6075
|
+
const S = performance.now() - h;
|
|
6075
6076
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6076
6077
|
canvas: U,
|
|
6077
6078
|
width: T,
|
|
6078
6079
|
height: N
|
|
6079
6080
|
};
|
|
6080
6081
|
}
|
|
6081
|
-
const
|
|
6082
|
-
const t = (await
|
|
6082
|
+
const We = async (r) => {
|
|
6083
|
+
const t = (await Wx(r)).canvas;
|
|
6083
6084
|
return t ? createImageBitmap(t) : null;
|
|
6084
6085
|
};
|
|
6085
6086
|
let i0 = null, vr = !1;
|
|
6086
|
-
const
|
|
6087
|
+
const ze = async () => {
|
|
6087
6088
|
if (!vr) {
|
|
6088
6089
|
vr = !0;
|
|
6089
6090
|
try {
|
|
@@ -6091,29 +6092,29 @@ const We = async () => {
|
|
|
6091
6092
|
const r = i0;
|
|
6092
6093
|
i0 = null;
|
|
6093
6094
|
try {
|
|
6094
|
-
const
|
|
6095
|
+
const h = await We(r.renderData);
|
|
6095
6096
|
if (i0) {
|
|
6096
|
-
|
|
6097
|
+
h?.close?.();
|
|
6097
6098
|
continue;
|
|
6098
6099
|
}
|
|
6099
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6100
|
-
} catch (
|
|
6100
|
+
self.postMessage({ id: r.id, bitmap: h }, h ? [h] : []);
|
|
6101
|
+
} catch (h) {
|
|
6101
6102
|
if (i0) continue;
|
|
6102
6103
|
self.postMessage({
|
|
6103
6104
|
id: r.id,
|
|
6104
|
-
error:
|
|
6105
|
+
error: h instanceof Error ? h.message : String(h)
|
|
6105
6106
|
});
|
|
6106
6107
|
}
|
|
6107
6108
|
}
|
|
6108
6109
|
} finally {
|
|
6109
|
-
vr = !1, i0 &&
|
|
6110
|
+
vr = !1, i0 && ze();
|
|
6110
6111
|
}
|
|
6111
6112
|
}
|
|
6112
6113
|
};
|
|
6113
6114
|
self.onmessage = async (r) => {
|
|
6114
|
-
const
|
|
6115
|
-
if (
|
|
6116
|
-
const e =
|
|
6115
|
+
const h = r.data;
|
|
6116
|
+
if (h && typeof h == "object" && "type" in h && h.type === "SET_LICENSE") {
|
|
6117
|
+
const e = h;
|
|
6117
6118
|
_x({
|
|
6118
6119
|
token: e.licenseToken,
|
|
6119
6120
|
apiUrl: e.licenseApiUrl,
|
|
@@ -6122,13 +6123,13 @@ self.onmessage = async (r) => {
|
|
|
6122
6123
|
});
|
|
6123
6124
|
return;
|
|
6124
6125
|
}
|
|
6125
|
-
const t =
|
|
6126
|
+
const t = h;
|
|
6126
6127
|
if (t.coalesce === !0) {
|
|
6127
|
-
i0 = { id: t.id, renderData: t.renderData },
|
|
6128
|
+
i0 = { id: t.id, renderData: t.renderData }, ze();
|
|
6128
6129
|
return;
|
|
6129
6130
|
}
|
|
6130
6131
|
try {
|
|
6131
|
-
const e = await
|
|
6132
|
+
const e = await We(t.renderData);
|
|
6132
6133
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|
|
6133
6134
|
} catch (e) {
|
|
6134
6135
|
self.postMessage({
|