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