@jieyin/editor-sdk-test 1.1.148 → 1.1.149
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 +3611 -3615
- package/dist/renderWorker.js +499 -501
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var F0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(F0 || {});
|
|
2
2
|
function Ge(r) {
|
|
3
|
-
let
|
|
3
|
+
let h = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = h;
|
|
6
|
+
return h += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function Ke(r,
|
|
9
|
+
function Ke(r, h) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,19 +23,19 @@ function Ke(r, p) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? h,
|
|
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, h, t, e) {
|
|
33
|
+
let u = r.name || "", p = h[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 = h[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (u = x, p = n, m = E);
|
|
37
37
|
}
|
|
38
|
-
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, p, 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,12 +64,12 @@ function Xe(r, p, t, e) {
|
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function Ye(r,
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function Ye(r, h) {
|
|
68
|
+
const t = new Map(h.parts.map((u) => [u.name, u.id])), e = Ge(h.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
70
|
+
parts: h.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) => {
|
|
@@ -94,7 +94,7 @@ function Ye(r, p) {
|
|
|
94
94
|
f.push(v);
|
|
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((h) => ({
|
|
114
|
+
open: !!h.open,
|
|
115
|
+
knots: h.knots.map((t) => ({
|
|
116
116
|
linked: !!t.linked,
|
|
117
117
|
points: Array.isArray(t.points) ? [...t.points] : []
|
|
118
118
|
}))
|
|
119
119
|
}))
|
|
120
120
|
} : r.type === "simple" ? {
|
|
121
121
|
type: "simple",
|
|
122
|
-
points: r.points.map((
|
|
123
|
-
x:
|
|
124
|
-
y:
|
|
125
|
-
type:
|
|
122
|
+
points: r.points.map((h) => ({
|
|
123
|
+
x: h.x,
|
|
124
|
+
y: h.y,
|
|
125
|
+
type: h.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function dr(r, h) {
|
|
130
|
+
if (h) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), h.type === "bezier" && Array.isArray(h.paths))
|
|
132
|
+
h.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
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 (h.type === "simple" && Array.isArray(h.points)) {
|
|
150
|
+
const t = h.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -161,10 +161,10 @@ class h0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(h) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(h);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class h0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(h, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(h, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class h0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(h) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(h), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -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(h) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
257
|
-
return new URL(
|
|
256
|
+
const t = cr.getOrigin();
|
|
257
|
+
return new URL(h, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,207 +262,205 @@ 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(h, t, e) {
|
|
266
|
+
const u = this.parse(h);
|
|
267
|
+
return !u || u.searchParams.has(t) ? h : (u.searchParams.set(t, e), this.formatUrl(h, u));
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* 移除查询参数
|
|
271
271
|
*/
|
|
272
|
-
static removeParam(
|
|
273
|
-
const e = this.parse(
|
|
274
|
-
return !e || !e.searchParams.has(t) ?
|
|
272
|
+
static removeParam(h, t) {
|
|
273
|
+
const e = this.parse(h);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? h : (e.searchParams.delete(t), this.formatUrl(h, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(h, t) {
|
|
280
|
+
return this.parse(h)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
285
|
+
static formatUrl(h, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(h), u = h.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(h) {
|
|
293
|
+
return h?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(h) {
|
|
299
|
+
return h?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
function sr() {
|
|
303
|
+
const r = ["des", "n (fu", "info", "bind", "inclu", "10563gmqCpx", "/file", "wser", "now", "fileT", "conso", "7206795QPcpeo", "11lJUeKG", "file_", "excep", "isBro", "setIt", "4XClCRU", "4960028HsuhGY", "aUrl", "fetch", "481947EVGHlx", "1726685osJUWP", "oken", "47643620mDMeaC", "data", "pathn", "oken=", '"retu', "es_in", "re_ti", "okenR", "hasPa", "6EYSlad", "1383678zaLuKM", "trace", "addPa", "3184PKDSSv", "isBlo", "warn", "token"];
|
|
304
|
+
return sr = function() {
|
|
305
|
+
return r;
|
|
306
|
+
}, sr();
|
|
307
|
+
}
|
|
308
|
+
const t0 = Cr;
|
|
309
|
+
(function(r, h) {
|
|
310
|
+
const t = Cr, e = r();
|
|
305
311
|
for (; ; )
|
|
306
312
|
try {
|
|
307
|
-
if (-parseInt(t(
|
|
313
|
+
if (-parseInt(t(504)) / 1 + -parseInt(t(487)) / 2 * (-parseInt(t(491)) / 3) + -parseInt(t(488)) / 4 + parseInt(t(492)) / 5 * (-parseInt(t(503)) / 6) + -parseInt(t(516)) / 7 * (parseInt(t(507)) / 8) + -parseInt(t(522)) / 9 + -parseInt(t(494)) / 10 * (-parseInt(t(523)) / 11) === h) break;
|
|
308
314
|
e.push(e.shift());
|
|
309
315
|
} catch {
|
|
310
316
|
e.push(e.shift());
|
|
311
317
|
}
|
|
312
|
-
})(
|
|
313
|
-
function D0(r, p) {
|
|
314
|
-
return r = r - (-2093 + 2 * -507 + -1 * -3589), cr()[r];
|
|
315
|
-
}
|
|
318
|
+
})(sr, 771058 + 136484 * 7 + -1011145);
|
|
316
319
|
const E0 = /* @__PURE__ */ (function() {
|
|
317
320
|
let r = !0;
|
|
318
|
-
return function(
|
|
321
|
+
return function(h, t) {
|
|
319
322
|
const e = r ? function() {
|
|
320
|
-
const u = D0;
|
|
321
323
|
if (t) {
|
|
322
|
-
const
|
|
323
|
-
return t = null,
|
|
324
|
+
const u = t.apply(h, arguments);
|
|
325
|
+
return t = null, u;
|
|
324
326
|
}
|
|
325
327
|
} : function() {
|
|
326
328
|
};
|
|
327
329
|
return r = !1, e;
|
|
328
330
|
};
|
|
329
331
|
})(), Ve = E0(void 0, function() {
|
|
330
|
-
const r =
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
const m = E0[r(507) + "ructor"].prototype[r(501)](E0), B = u[h], C = e[B] || m;
|
|
342
|
-
m["__pro" + r(496)] = E0.bind(E0), m.toString = C[r(499) + "ing"].bind(C), e[B] = m;
|
|
332
|
+
const r = Cr;
|
|
333
|
+
let h;
|
|
334
|
+
try {
|
|
335
|
+
h = Function("retur" + r(512) + "nction() " + ("{}.constructor(" + r(498) + 'rn this")( )') + ");")();
|
|
336
|
+
} catch {
|
|
337
|
+
h = window;
|
|
338
|
+
}
|
|
339
|
+
const t = h[r(521) + "le"] = h.console || {}, e = ["log", r(509), r(513), "error", r(484) + "tion", "table", r(505)];
|
|
340
|
+
for (let u = -3 * 545 + 1 * -8011 + 9646; u < e.length; u++) {
|
|
341
|
+
const p = E0.constructor.prototype.bind(E0), m = e[u], B = t[m] || p;
|
|
342
|
+
p.__proto__ = E0.bind(E0), p.toString = B.toString[r(514)](B), t[m] = p;
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
Ve();
|
|
346
|
-
const Br = "file_" +
|
|
347
|
-
function
|
|
348
|
-
return h0.getItem(
|
|
346
|
+
const pr = "file_token", Br = "file_" + t0(510) + "_expi" + t0(500) + "me", Je = (-3226 + -3286 * -1) * (8591 + 7 * 1138 + -15557 * 1);
|
|
347
|
+
function hr() {
|
|
348
|
+
return h0.getItem(pr);
|
|
349
349
|
}
|
|
350
350
|
function rt(r = Je) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
return Date.now() + 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;
|
|
357
356
|
}
|
|
358
|
-
function et(r,
|
|
359
|
-
const t =
|
|
360
|
-
if (h0
|
|
361
|
-
const e = Date[t(519)]() +
|
|
362
|
-
h0.setItem(
|
|
357
|
+
function et(r, h) {
|
|
358
|
+
const t = t0;
|
|
359
|
+
if (h0[t(486) + "em"](pr, r), typeof h == "number" && h > 448 + -4687 * 2 + 8926) {
|
|
360
|
+
const e = Date[t(519)]() + h * 1e3;
|
|
361
|
+
h0.setItem(Br, String(e));
|
|
363
362
|
}
|
|
364
363
|
}
|
|
365
364
|
function tt() {
|
|
366
|
-
|
|
367
|
-
h0.removeItem(Br), h0[r(504) + "eItem"](Cr);
|
|
365
|
+
h0.removeItem(pr), h0.removeItem(Br);
|
|
368
366
|
}
|
|
369
367
|
async function Pr(r) {
|
|
370
|
-
const
|
|
371
|
-
return t?.
|
|
368
|
+
const h = t0, t = await r(), e = t?.[h(495)]?.data;
|
|
369
|
+
return t?.[h(495)]?.code === 1 * -1493 + 3616 + 641 * -3 && e?.["file_" + h(510)] ? (et(e[h(483) + "token"], e["expir" + h(499)]), e[h(483) + "token"]) : null;
|
|
372
370
|
}
|
|
373
371
|
let xt = null;
|
|
374
372
|
function zr() {
|
|
375
|
-
return
|
|
376
|
-
}
|
|
377
|
-
function cr() {
|
|
378
|
-
const r = ["oken", "2561orGXul", "6226985OwNmqy", "1130017pbjzuE", "30uIrxsC", "726NDYOSF", "parse", "nstru", "table", "code", "52344oQeLIZ", "oken=", "4BNkoBO", "es_in", "143grCwwf", "to__", "674737zQKfdB", "ram", "toStr", "info", "bind", "639DsoYMf", "des", "remov", "numbe", "fetch", "const", "token", "getIt", "warn", "apply", "4046HJEbYx", "isBlo", "efres", 'is")(', "lengt", "isBro", "data", "now", "585160VxKvLg", "122616pGgRHx"];
|
|
379
|
-
return cr = function() {
|
|
380
|
-
return r;
|
|
381
|
-
}, cr();
|
|
373
|
+
return cr.isBrowser() ? xt : null;
|
|
382
374
|
}
|
|
383
375
|
async function De() {
|
|
384
|
-
const r =
|
|
385
|
-
if (!
|
|
386
|
-
const
|
|
387
|
-
if (
|
|
376
|
+
const r = t0;
|
|
377
|
+
if (!cr.isBrowser()) return hr();
|
|
378
|
+
const h = hr();
|
|
379
|
+
if (h && !rt()) return h;
|
|
388
380
|
try {
|
|
389
381
|
const t = await zr();
|
|
390
|
-
if (
|
|
391
|
-
const e = await Pr(t["
|
|
382
|
+
if (h && t?.[r(490) + "FileTokenRefresh"]) {
|
|
383
|
+
const e = await Pr(t["fetchFileT" + r(501) + "efresh"]);
|
|
392
384
|
if (e) return e;
|
|
393
385
|
}
|
|
394
386
|
} catch {
|
|
395
387
|
}
|
|
396
388
|
try {
|
|
397
389
|
const t = zr();
|
|
398
|
-
return t?.[
|
|
390
|
+
return t?.["fetchFileToken"] ? await Pr(t.fetchFileToken) : null;
|
|
399
391
|
} catch {
|
|
400
392
|
return null;
|
|
401
393
|
}
|
|
402
394
|
}
|
|
403
395
|
function ge(r) {
|
|
404
|
-
const
|
|
405
|
-
if (!r || l0
|
|
406
|
-
const t = l0
|
|
407
|
-
return t ? t
|
|
396
|
+
const h = t0;
|
|
397
|
+
if (!r || l0["isDat" + h(489)](r) || l0[h(508) + "bUrl"](r)) return !1;
|
|
398
|
+
const t = l0.parse(r);
|
|
399
|
+
return t ? t[h(496) + "ame"]["inclu" + h(511)]("/files/") && !l0[h(502) + "ram"](r, h(520) + "oken") : r[h(515) + "des"](h(517) + "s/") && !r[h(515) + "des"]("fileT" + h(497));
|
|
400
|
+
}
|
|
401
|
+
function be(r, h) {
|
|
402
|
+
const t = t0;
|
|
403
|
+
return !h || !ge(r) ? r : l0[t(506) + "ram"](r, "fileT" + t(493), h);
|
|
408
404
|
}
|
|
409
|
-
function
|
|
410
|
-
return
|
|
405
|
+
function Cr(r, h) {
|
|
406
|
+
return r = r - (1534 + -1 * 2929 + 1878), sr()[r];
|
|
411
407
|
}
|
|
412
408
|
function nt(r) {
|
|
413
|
-
|
|
409
|
+
const h = t0;
|
|
410
|
+
return l0.removeParam(r, h(520) + "oken");
|
|
414
411
|
}
|
|
415
412
|
async function at(r) {
|
|
416
413
|
if (!ge(r)) return r;
|
|
417
|
-
const
|
|
418
|
-
return be(r,
|
|
414
|
+
const h = await De();
|
|
415
|
+
return be(r, h);
|
|
419
416
|
}
|
|
420
|
-
async function me(r,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
417
|
+
async function me(r, h) {
|
|
418
|
+
const t = t0;
|
|
419
|
+
if (!cr[t(485) + t(518)]()) return fetch(r, h);
|
|
420
|
+
const e = nt(r), u = await at(e), p = await fetch(u, h);
|
|
421
|
+
if (p.status !== -3642 + 13 * 311) return p;
|
|
424
422
|
tt();
|
|
425
423
|
const m = await De(), B = be(e, m);
|
|
426
|
-
return fetch(B,
|
|
424
|
+
return fetch(B, h);
|
|
427
425
|
}
|
|
428
|
-
const _e = (r,
|
|
426
|
+
const _e = (r, h) => {
|
|
429
427
|
if (!r) return r;
|
|
430
|
-
const t = (
|
|
428
|
+
const t = (h || "").replace(/\/$/, "");
|
|
431
429
|
if (t && r.startsWith(t))
|
|
432
430
|
return r;
|
|
433
431
|
if (typeof window < "u") {
|
|
434
432
|
const u = window.location.hostname;
|
|
435
433
|
if (u === "localhost" || u === "127.0.0.1")
|
|
436
434
|
try {
|
|
437
|
-
const
|
|
435
|
+
const p = new URL(r);
|
|
438
436
|
if (t)
|
|
439
437
|
try {
|
|
440
438
|
const m = new URL(t).origin;
|
|
441
|
-
if (
|
|
439
|
+
if (p.origin === m)
|
|
442
440
|
return r;
|
|
443
441
|
} catch {
|
|
444
442
|
}
|
|
445
|
-
if (
|
|
446
|
-
return t ? `${t}${
|
|
443
|
+
if (p.pathname.startsWith("/files/"))
|
|
444
|
+
return t ? `${t}${p.pathname}${p.search}${p.hash}` : `${p.pathname}${p.search}${p.hash}`;
|
|
447
445
|
} catch {
|
|
448
446
|
}
|
|
449
447
|
}
|
|
450
448
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
451
449
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
452
450
|
return e ? `/oss${e[2]}` : r;
|
|
453
|
-
}, ot = (r,
|
|
451
|
+
}, ot = (r, h) => {
|
|
454
452
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
455
|
-
return new OffscreenCanvas(r,
|
|
453
|
+
return new OffscreenCanvas(r, h);
|
|
456
454
|
const t = document.createElement("canvas");
|
|
457
|
-
return t.width = r, t.height =
|
|
458
|
-
},
|
|
459
|
-
if (!
|
|
455
|
+
return t.width = r, t.height = h, t;
|
|
456
|
+
}, m0 = async (r, h) => {
|
|
457
|
+
if (!h || h <= 0) return r;
|
|
460
458
|
const t = Math.max(r.width, r.height);
|
|
461
|
-
if (t <=
|
|
462
|
-
const e =
|
|
463
|
-
return B ? (B.drawImage(r, 0, 0, u,
|
|
459
|
+
if (t <= h) return r;
|
|
460
|
+
const e = h / 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");
|
|
461
|
+
return B ? (B.drawImage(r, 0, 0, u, p), r.close?.(), await createImageBitmap(m)) : r;
|
|
464
462
|
};
|
|
465
|
-
async function it(r,
|
|
463
|
+
async function it(r, h, t) {
|
|
466
464
|
if (typeof r == "string")
|
|
467
465
|
try {
|
|
468
466
|
const e = _e(r, t), u = await me(e);
|
|
@@ -470,12 +468,12 @@ async function it(r, p, t) {
|
|
|
470
468
|
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
471
469
|
throw new Error(m);
|
|
472
470
|
}
|
|
473
|
-
const
|
|
474
|
-
if (!
|
|
471
|
+
const p = await u.blob();
|
|
472
|
+
if (!p.type.startsWith("image/") && p.size === 0)
|
|
475
473
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
476
474
|
try {
|
|
477
|
-
const m = await createImageBitmap(
|
|
478
|
-
return await
|
|
475
|
+
const m = await createImageBitmap(p);
|
|
476
|
+
return await m0(m, h);
|
|
479
477
|
} catch (m) {
|
|
480
478
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
481
479
|
}
|
|
@@ -489,7 +487,7 @@ async function it(r, p, t) {
|
|
|
489
487
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
490
488
|
try {
|
|
491
489
|
const e = await createImageBitmap(r);
|
|
492
|
-
return await
|
|
490
|
+
return await m0(e, h);
|
|
493
491
|
} catch (e) {
|
|
494
492
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
495
493
|
}
|
|
@@ -497,23 +495,23 @@ async function it(r, p, t) {
|
|
|
497
495
|
if (r instanceof ImageBitmap) {
|
|
498
496
|
if (r.width === 0 || r.height === 0)
|
|
499
497
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
500
|
-
return await
|
|
498
|
+
return await m0(r, h);
|
|
501
499
|
}
|
|
502
500
|
throw new Error("不支持的图片类型");
|
|
503
501
|
}
|
|
504
|
-
async function st(r,
|
|
502
|
+
async function st(r, h, t) {
|
|
505
503
|
try {
|
|
506
504
|
const e = _e(r, t), u = await me(e);
|
|
507
505
|
if (!u.ok) {
|
|
508
506
|
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
509
507
|
throw new Error(m);
|
|
510
508
|
}
|
|
511
|
-
const
|
|
512
|
-
if (!
|
|
509
|
+
const p = await u.blob();
|
|
510
|
+
if (!p.type.startsWith("image/") && p.size === 0)
|
|
513
511
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
514
512
|
try {
|
|
515
|
-
const m = await createImageBitmap(
|
|
516
|
-
return await
|
|
513
|
+
const m = await createImageBitmap(p);
|
|
514
|
+
return await m0(m, h);
|
|
517
515
|
} catch (m) {
|
|
518
516
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
519
517
|
}
|
|
@@ -521,9 +519,9 @@ async function st(r, p, t) {
|
|
|
521
519
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
522
520
|
}
|
|
523
521
|
}
|
|
524
|
-
function
|
|
522
|
+
function Wr(r) {
|
|
525
523
|
if (!r) return "source-over";
|
|
526
|
-
const
|
|
524
|
+
const h = r.trim().toLowerCase();
|
|
527
525
|
return {
|
|
528
526
|
normal: "source-over",
|
|
529
527
|
multiply: "multiply",
|
|
@@ -549,22 +547,22 @@ function Ir(r) {
|
|
|
549
547
|
"linear dodge": "lighter",
|
|
550
548
|
lighter: "lighter",
|
|
551
549
|
"pass-through": "source-over"
|
|
552
|
-
}[
|
|
550
|
+
}[h] || "source-over";
|
|
553
551
|
}
|
|
554
|
-
var
|
|
552
|
+
var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
555
553
|
function ct(r) {
|
|
556
554
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
557
|
-
var
|
|
558
|
-
if (typeof
|
|
555
|
+
var h = r.default;
|
|
556
|
+
if (typeof h == "function") {
|
|
559
557
|
var t = function e() {
|
|
560
558
|
var u = !1;
|
|
561
559
|
try {
|
|
562
560
|
u = this instanceof e;
|
|
563
561
|
} catch {
|
|
564
562
|
}
|
|
565
|
-
return u ? Reflect.construct(
|
|
563
|
+
return u ? Reflect.construct(h, arguments, this.constructor) : h.apply(this, arguments);
|
|
566
564
|
};
|
|
567
|
-
t.prototype =
|
|
565
|
+
t.prototype = h.prototype;
|
|
568
566
|
} else t = {};
|
|
569
567
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
570
568
|
var u = Object.getOwnPropertyDescriptor(r, e);
|
|
@@ -576,36 +574,36 @@ function ct(r) {
|
|
|
576
574
|
});
|
|
577
575
|
}), t;
|
|
578
576
|
}
|
|
579
|
-
var
|
|
577
|
+
var _0 = { exports: {} };
|
|
580
578
|
function ft(r) {
|
|
581
579
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
582
580
|
}
|
|
583
|
-
var
|
|
581
|
+
var y0 = { exports: {} }, ut = {}, dt = /* @__PURE__ */ Object.freeze({
|
|
584
582
|
__proto__: null,
|
|
585
583
|
default: ut
|
|
586
|
-
}), lt = /* @__PURE__ */ ct(dt), ht =
|
|
584
|
+
}), lt = /* @__PURE__ */ ct(dt), ht = y0.exports, Ir;
|
|
587
585
|
function M() {
|
|
588
|
-
return
|
|
586
|
+
return Ir || (Ir = 1, (function(r, h) {
|
|
589
587
|
(function(t, e) {
|
|
590
588
|
r.exports = e();
|
|
591
589
|
})(ht, function() {
|
|
592
590
|
var t = t || (function(e, u) {
|
|
593
|
-
var
|
|
594
|
-
if (typeof window < "u" && window.crypto && (
|
|
591
|
+
var p;
|
|
592
|
+
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")
|
|
595
593
|
try {
|
|
596
|
-
|
|
594
|
+
p = lt;
|
|
597
595
|
} catch {
|
|
598
596
|
}
|
|
599
597
|
var m = function() {
|
|
600
|
-
if (
|
|
601
|
-
if (typeof
|
|
598
|
+
if (p) {
|
|
599
|
+
if (typeof p.getRandomValues == "function")
|
|
602
600
|
try {
|
|
603
|
-
return
|
|
601
|
+
return p.getRandomValues(new Uint32Array(1))[0];
|
|
604
602
|
} catch {
|
|
605
603
|
}
|
|
606
|
-
if (typeof
|
|
604
|
+
if (typeof p.randomBytes == "function")
|
|
607
605
|
try {
|
|
608
|
-
return
|
|
606
|
+
return p.randomBytes(4).readInt32LE();
|
|
609
607
|
} catch {
|
|
610
608
|
}
|
|
611
609
|
}
|
|
@@ -1082,16 +1080,16 @@ function M() {
|
|
|
1082
1080
|
})(Math);
|
|
1083
1081
|
return t;
|
|
1084
1082
|
});
|
|
1085
|
-
})(
|
|
1083
|
+
})(y0)), y0.exports;
|
|
1086
1084
|
}
|
|
1087
|
-
var
|
|
1088
|
-
function
|
|
1089
|
-
return Lr || (Lr = 1, (function(r,
|
|
1085
|
+
var w0 = { exports: {} }, vt = w0.exports, Lr;
|
|
1086
|
+
function fr() {
|
|
1087
|
+
return Lr || (Lr = 1, (function(r, h) {
|
|
1090
1088
|
(function(t, e) {
|
|
1091
1089
|
r.exports = e(M());
|
|
1092
1090
|
})(vt, function(t) {
|
|
1093
1091
|
return (function(e) {
|
|
1094
|
-
var u = t,
|
|
1092
|
+
var u = t, p = u.lib, m = p.Base, B = p.WordArray, C = u.x64 = {};
|
|
1095
1093
|
C.Word = m.extend({
|
|
1096
1094
|
/**
|
|
1097
1095
|
* Initializes a newly created 64-bit word.
|
|
@@ -1312,17 +1310,17 @@ function ur() {
|
|
|
1312
1310
|
});
|
|
1313
1311
|
})(), t;
|
|
1314
1312
|
});
|
|
1315
|
-
})(
|
|
1313
|
+
})(w0)), w0.exports;
|
|
1316
1314
|
}
|
|
1317
|
-
var
|
|
1315
|
+
var k0 = { exports: {} }, pt = k0.exports, Or;
|
|
1318
1316
|
function Bt() {
|
|
1319
|
-
return Or || (Or = 1, (function(r,
|
|
1317
|
+
return Or || (Or = 1, (function(r, h) {
|
|
1320
1318
|
(function(t, e) {
|
|
1321
1319
|
r.exports = e(M());
|
|
1322
1320
|
})(pt, function(t) {
|
|
1323
1321
|
return (function() {
|
|
1324
1322
|
if (typeof ArrayBuffer == "function") {
|
|
1325
|
-
var e = t, u = e.lib,
|
|
1323
|
+
var e = t, u = e.lib, p = u.WordArray, m = p.init, B = p.init = function(C) {
|
|
1326
1324
|
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) {
|
|
1327
1325
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1328
1326
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
@@ -1330,20 +1328,20 @@ function Bt() {
|
|
|
1330
1328
|
} else
|
|
1331
1329
|
m.apply(this, arguments);
|
|
1332
1330
|
};
|
|
1333
|
-
B.prototype =
|
|
1331
|
+
B.prototype = p;
|
|
1334
1332
|
}
|
|
1335
1333
|
})(), t.lib.WordArray;
|
|
1336
1334
|
});
|
|
1337
|
-
})(
|
|
1335
|
+
})(k0)), k0.exports;
|
|
1338
1336
|
}
|
|
1339
|
-
var
|
|
1337
|
+
var S0 = { exports: {} }, Ct = S0.exports, qr;
|
|
1340
1338
|
function Et() {
|
|
1341
|
-
return qr || (qr = 1, (function(r,
|
|
1339
|
+
return qr || (qr = 1, (function(r, h) {
|
|
1342
1340
|
(function(t, e) {
|
|
1343
1341
|
r.exports = e(M());
|
|
1344
1342
|
})(Ct, function(t) {
|
|
1345
1343
|
return (function() {
|
|
1346
|
-
var e = t, u = e.lib,
|
|
1344
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1347
1345
|
m.Utf16 = m.Utf16BE = {
|
|
1348
1346
|
/**
|
|
1349
1347
|
* Converts a word array to a UTF-16 BE string.
|
|
@@ -1381,7 +1379,7 @@ function Et() {
|
|
|
1381
1379
|
parse: function(C) {
|
|
1382
1380
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1383
1381
|
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1384
|
-
return
|
|
1382
|
+
return p.create(n, x * 2);
|
|
1385
1383
|
}
|
|
1386
1384
|
}, m.Utf16LE = {
|
|
1387
1385
|
/**
|
|
@@ -1420,7 +1418,7 @@ function Et() {
|
|
|
1420
1418
|
parse: function(C) {
|
|
1421
1419
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1422
1420
|
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1423
|
-
return
|
|
1421
|
+
return p.create(n, x * 2);
|
|
1424
1422
|
}
|
|
1425
1423
|
};
|
|
1426
1424
|
function B(C) {
|
|
@@ -1428,16 +1426,16 @@ function Et() {
|
|
|
1428
1426
|
}
|
|
1429
1427
|
})(), t.enc.Utf16;
|
|
1430
1428
|
});
|
|
1431
|
-
})(
|
|
1429
|
+
})(S0)), S0.exports;
|
|
1432
1430
|
}
|
|
1433
|
-
var
|
|
1431
|
+
var H0 = { exports: {} }, At = H0.exports, Tr;
|
|
1434
1432
|
function i0() {
|
|
1435
|
-
return Tr || (Tr = 1, (function(r,
|
|
1433
|
+
return Tr || (Tr = 1, (function(r, h) {
|
|
1436
1434
|
(function(t, e) {
|
|
1437
1435
|
r.exports = e(M());
|
|
1438
1436
|
})(At, function(t) {
|
|
1439
1437
|
return (function() {
|
|
1440
|
-
var e = t, u = e.lib,
|
|
1438
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1441
1439
|
m.Base64 = {
|
|
1442
1440
|
/**
|
|
1443
1441
|
* Converts a word array to a Base64 string.
|
|
@@ -1499,20 +1497,20 @@ function i0() {
|
|
|
1499
1497
|
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1500
1498
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1501
1499
|
}
|
|
1502
|
-
return
|
|
1500
|
+
return p.create(E, a);
|
|
1503
1501
|
}
|
|
1504
1502
|
})(), t.enc.Base64;
|
|
1505
1503
|
});
|
|
1506
|
-
})(
|
|
1504
|
+
})(H0)), H0.exports;
|
|
1507
1505
|
}
|
|
1508
|
-
var
|
|
1506
|
+
var $0 = { exports: {} }, Ft = $0.exports, Mr;
|
|
1509
1507
|
function Dt() {
|
|
1510
|
-
return Mr || (Mr = 1, (function(r,
|
|
1508
|
+
return Mr || (Mr = 1, (function(r, h) {
|
|
1511
1509
|
(function(t, e) {
|
|
1512
1510
|
r.exports = e(M());
|
|
1513
1511
|
})(Ft, function(t) {
|
|
1514
1512
|
return (function() {
|
|
1515
|
-
var e = t, u = e.lib,
|
|
1513
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1516
1514
|
m.Base64url = {
|
|
1517
1515
|
/**
|
|
1518
1516
|
* Converts a word array to a Base64url string.
|
|
@@ -1581,20 +1579,20 @@ function Dt() {
|
|
|
1581
1579
|
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, v = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = f | v;
|
|
1582
1580
|
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1583
1581
|
}
|
|
1584
|
-
return
|
|
1582
|
+
return p.create(E, a);
|
|
1585
1583
|
}
|
|
1586
1584
|
})(), t.enc.Base64url;
|
|
1587
1585
|
});
|
|
1588
|
-
})(
|
|
1586
|
+
})($0)), $0.exports;
|
|
1589
1587
|
}
|
|
1590
|
-
var
|
|
1588
|
+
var R0 = { exports: {} }, gt = R0.exports, Nr;
|
|
1591
1589
|
function s0() {
|
|
1592
|
-
return Nr || (Nr = 1, (function(r,
|
|
1590
|
+
return Nr || (Nr = 1, (function(r, h) {
|
|
1593
1591
|
(function(t, e) {
|
|
1594
1592
|
r.exports = e(M());
|
|
1595
1593
|
})(gt, function(t) {
|
|
1596
1594
|
return (function(e) {
|
|
1597
|
-
var u = t,
|
|
1595
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = [];
|
|
1598
1596
|
(function() {
|
|
1599
1597
|
for (var v = 0; v < 64; v++)
|
|
1600
1598
|
x[v] = e.abs(e.sin(v + 1)) * 4294967296 | 0;
|
|
@@ -1651,18 +1649,18 @@ function s0() {
|
|
|
1651
1649
|
u.MD5 = B._createHelper(n), u.HmacMD5 = B._createHmacHelper(n);
|
|
1652
1650
|
})(Math), t.MD5;
|
|
1653
1651
|
});
|
|
1654
|
-
})(
|
|
1652
|
+
})(R0)), R0.exports;
|
|
1655
1653
|
}
|
|
1656
|
-
var
|
|
1654
|
+
var P0 = { exports: {} }, bt = P0.exports, Ur;
|
|
1657
1655
|
function ye() {
|
|
1658
|
-
return Ur || (Ur = 1, (function(r,
|
|
1656
|
+
return Ur || (Ur = 1, (function(r, h) {
|
|
1659
1657
|
(function(t, e) {
|
|
1660
1658
|
r.exports = e(M());
|
|
1661
1659
|
})(bt, function(t) {
|
|
1662
1660
|
return (function() {
|
|
1663
|
-
var e = t, u = e.lib,
|
|
1661
|
+
var e = t, u = e.lib, p = u.WordArray, m = u.Hasher, B = e.algo, C = [], x = B.SHA1 = m.extend({
|
|
1664
1662
|
_doReset: function() {
|
|
1665
|
-
this._hash = new
|
|
1663
|
+
this._hash = new p.init([
|
|
1666
1664
|
1732584193,
|
|
1667
1665
|
4023233417,
|
|
1668
1666
|
2562383102,
|
|
@@ -1695,16 +1693,16 @@ function ye() {
|
|
|
1695
1693
|
e.SHA1 = m._createHelper(x), e.HmacSHA1 = m._createHmacHelper(x);
|
|
1696
1694
|
})(), t.SHA1;
|
|
1697
1695
|
});
|
|
1698
|
-
})(
|
|
1696
|
+
})(P0)), P0.exports;
|
|
1699
1697
|
}
|
|
1700
|
-
var
|
|
1698
|
+
var z0 = { exports: {} }, mt = z0.exports, jr;
|
|
1701
1699
|
function Er() {
|
|
1702
|
-
return jr || (jr = 1, (function(r,
|
|
1700
|
+
return jr || (jr = 1, (function(r, h) {
|
|
1703
1701
|
(function(t, e) {
|
|
1704
1702
|
r.exports = e(M());
|
|
1705
1703
|
})(mt, function(t) {
|
|
1706
1704
|
return (function(e) {
|
|
1707
|
-
var u = t,
|
|
1705
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = [], n = [];
|
|
1708
1706
|
(function() {
|
|
1709
1707
|
function s(g) {
|
|
1710
1708
|
for (var i = e.sqrt(g), o = 2; o <= i; o++)
|
|
@@ -1747,18 +1745,18 @@ function Er() {
|
|
|
1747
1745
|
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1748
1746
|
})(Math), t.SHA256;
|
|
1749
1747
|
});
|
|
1750
|
-
})(
|
|
1748
|
+
})(z0)), z0.exports;
|
|
1751
1749
|
}
|
|
1752
1750
|
var W0 = { exports: {} }, _t = W0.exports, Gr;
|
|
1753
1751
|
function yt() {
|
|
1754
|
-
return Gr || (Gr = 1, (function(r,
|
|
1752
|
+
return Gr || (Gr = 1, (function(r, h) {
|
|
1755
1753
|
(function(t, e, u) {
|
|
1756
1754
|
r.exports = e(M(), Er());
|
|
1757
1755
|
})(_t, function(t) {
|
|
1758
1756
|
return (function() {
|
|
1759
|
-
var e = t, u = e.lib,
|
|
1757
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.algo, B = m.SHA256, C = m.SHA224 = B.extend({
|
|
1760
1758
|
_doReset: function() {
|
|
1761
|
-
this._hash = new
|
|
1759
|
+
this._hash = new p.init([
|
|
1762
1760
|
3238371032,
|
|
1763
1761
|
914150663,
|
|
1764
1762
|
812702999,
|
|
@@ -1779,14 +1777,14 @@ function yt() {
|
|
|
1779
1777
|
});
|
|
1780
1778
|
})(W0)), W0.exports;
|
|
1781
1779
|
}
|
|
1782
|
-
var
|
|
1780
|
+
var I0 = { exports: {} }, wt = I0.exports, Kr;
|
|
1783
1781
|
function we() {
|
|
1784
|
-
return Kr || (Kr = 1, (function(r,
|
|
1782
|
+
return Kr || (Kr = 1, (function(r, h) {
|
|
1785
1783
|
(function(t, e, u) {
|
|
1786
|
-
r.exports = e(M(),
|
|
1784
|
+
r.exports = e(M(), fr());
|
|
1787
1785
|
})(wt, function(t) {
|
|
1788
1786
|
return (function() {
|
|
1789
|
-
var e = t, u = e.lib,
|
|
1787
|
+
var e = t, u = e.lib, p = u.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
1790
1788
|
function n() {
|
|
1791
1789
|
return B.create.apply(B, arguments);
|
|
1792
1790
|
}
|
|
@@ -1876,7 +1874,7 @@ function we() {
|
|
|
1876
1874
|
for (var f = 0; f < 80; f++)
|
|
1877
1875
|
a[f] = n();
|
|
1878
1876
|
})();
|
|
1879
|
-
var s = x.SHA512 =
|
|
1877
|
+
var s = x.SHA512 = p.extend({
|
|
1880
1878
|
_doReset: function() {
|
|
1881
1879
|
this._hash = new C.init([
|
|
1882
1880
|
new B.init(1779033703, 4089235720),
|
|
@@ -1890,18 +1888,18 @@ function we() {
|
|
|
1890
1888
|
]);
|
|
1891
1889
|
},
|
|
1892
1890
|
_doProcessBlock: function(f, v) {
|
|
1893
|
-
for (var l = this._hash.words, g = l[0], i = l[1], o = l[2], d = l[3], b = l[4], D = l[5], y = l[6], k = l[7], R = g.high, F = g.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = d.high, q = d.low, U = b.high, T = b.low, N = D.high, j = D.low, S = y.high, c = y.low, A = k.high, _ = k.low,
|
|
1894
|
-
var J,
|
|
1891
|
+
for (var l = this._hash.words, g = l[0], i = l[1], o = l[2], d = l[3], b = l[4], D = l[5], y = l[6], k = l[7], R = g.high, F = g.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = d.high, q = d.low, U = b.high, T = b.low, N = D.high, j = D.low, S = y.high, c = y.low, A = k.high, _ = k.low, W = R, P = F, L = w, I = H, Z = $, Q = z, o0 = O, K = q, G = U, Y = T, r0 = N, c0 = j, D0 = S, v0 = c, ur = A, p0 = _, e0 = 0; e0 < 80; e0++) {
|
|
1892
|
+
var J, x0, g0 = a[e0];
|
|
1895
1893
|
if (e0 < 16)
|
|
1896
|
-
|
|
1894
|
+
x0 = g0.high = f[v + e0 * 2] | 0, J = g0.low = f[v + e0 * 2 + 1] | 0;
|
|
1897
1895
|
else {
|
|
1898
|
-
var Dr = a[e0 - 15], f0 = Dr.high, B0 = Dr.low, Re = (f0 >>> 1 | B0 << 31) ^ (f0 >>> 8 | B0 << 24) ^ f0 >>> 7, gr = (B0 >>> 1 | f0 << 31) ^ (B0 >>> 8 | f0 << 24) ^ (B0 >>> 7 | f0 << 25), br = a[e0 - 2], u0 = br.high, C0 = br.low, Pe = (u0 >>> 19 | C0 << 13) ^ (u0 << 3 | C0 >>> 29) ^ u0 >>> 6, mr = (C0 >>> 19 | u0 << 13) ^ (C0 << 3 | u0 >>> 29) ^ (C0 >>> 6 | u0 << 26), _r = a[e0 - 7], ze = _r.high,
|
|
1899
|
-
J = gr +
|
|
1896
|
+
var Dr = a[e0 - 15], f0 = Dr.high, B0 = Dr.low, Re = (f0 >>> 1 | B0 << 31) ^ (f0 >>> 8 | B0 << 24) ^ f0 >>> 7, gr = (B0 >>> 1 | f0 << 31) ^ (B0 >>> 8 | f0 << 24) ^ (B0 >>> 7 | f0 << 25), br = a[e0 - 2], u0 = br.high, C0 = br.low, Pe = (u0 >>> 19 | C0 << 13) ^ (u0 << 3 | C0 >>> 29) ^ u0 >>> 6, mr = (C0 >>> 19 | u0 << 13) ^ (C0 << 3 | u0 >>> 29) ^ (C0 >>> 6 | u0 << 26), _r = a[e0 - 7], ze = _r.high, We = _r.low, yr = a[e0 - 16], Ie = yr.high, wr = yr.low;
|
|
1897
|
+
J = gr + We, x0 = Re + ze + (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;
|
|
1900
1898
|
}
|
|
1901
|
-
var Le = G & r0 ^ ~G &
|
|
1902
|
-
|
|
1899
|
+
var Le = G & r0 ^ ~G & D0, kr = Y & c0 ^ ~Y & v0, Oe = W & L ^ W & Z ^ L & Z, qe = P & I ^ P & Q ^ I & Q, Te = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), Sr = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Me = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Ne = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Hr = E[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);
|
|
1900
|
+
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 = W, I = P, P = V + Rr | 0, W = n0 + je + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1903
1901
|
}
|
|
1904
|
-
F = g.low = F + P, g.high = R +
|
|
1902
|
+
F = g.low = F + P, g.high = R + W + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + I, i.high = w + L + (H >>> 0 < I >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = $ + Z + (z >>> 0 < Q >>> 0 ? 1 : 0), q = d.low = q + K, d.high = O + o0 + (q >>> 0 < K >>> 0 ? 1 : 0), T = b.low = T + Y, b.high = U + G + (T >>> 0 < Y >>> 0 ? 1 : 0), j = 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);
|
|
1905
1903
|
},
|
|
1906
1904
|
_doFinalize: function() {
|
|
1907
1905
|
var f = this._data, v = f.words, l = this._nDataBytes * 8, g = f.sigBytes * 8;
|
|
@@ -1910,34 +1908,34 @@ function we() {
|
|
|
1910
1908
|
return i;
|
|
1911
1909
|
},
|
|
1912
1910
|
clone: function() {
|
|
1913
|
-
var f =
|
|
1911
|
+
var f = p.clone.call(this);
|
|
1914
1912
|
return f._hash = this._hash.clone(), f;
|
|
1915
1913
|
},
|
|
1916
1914
|
blockSize: 1024 / 32
|
|
1917
1915
|
});
|
|
1918
|
-
e.SHA512 =
|
|
1916
|
+
e.SHA512 = p._createHelper(s), e.HmacSHA512 = p._createHmacHelper(s);
|
|
1919
1917
|
})(), t.SHA512;
|
|
1920
1918
|
});
|
|
1921
|
-
})(
|
|
1919
|
+
})(I0)), I0.exports;
|
|
1922
1920
|
}
|
|
1923
|
-
var
|
|
1921
|
+
var L0 = { exports: {} }, kt = L0.exports, Xr;
|
|
1924
1922
|
function St() {
|
|
1925
|
-
return Xr || (Xr = 1, (function(r,
|
|
1923
|
+
return Xr || (Xr = 1, (function(r, h) {
|
|
1926
1924
|
(function(t, e, u) {
|
|
1927
|
-
r.exports = e(M(),
|
|
1925
|
+
r.exports = e(M(), fr(), we());
|
|
1928
1926
|
})(kt, function(t) {
|
|
1929
1927
|
return (function() {
|
|
1930
|
-
var e = t, u = e.x64,
|
|
1928
|
+
var e = t, u = e.x64, p = u.Word, m = u.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1931
1929
|
_doReset: function() {
|
|
1932
1930
|
this._hash = new m.init([
|
|
1933
|
-
new
|
|
1934
|
-
new
|
|
1935
|
-
new
|
|
1936
|
-
new
|
|
1937
|
-
new
|
|
1938
|
-
new
|
|
1939
|
-
new
|
|
1940
|
-
new
|
|
1931
|
+
new p.init(3418070365, 3238371032),
|
|
1932
|
+
new p.init(1654270250, 914150663),
|
|
1933
|
+
new p.init(2438529370, 812702999),
|
|
1934
|
+
new p.init(355462360, 4144912697),
|
|
1935
|
+
new p.init(1731405415, 4290775857),
|
|
1936
|
+
new p.init(2394180231, 1750603025),
|
|
1937
|
+
new p.init(3675008525, 1694076839),
|
|
1938
|
+
new p.init(1203062813, 3204075428)
|
|
1941
1939
|
]);
|
|
1942
1940
|
},
|
|
1943
1941
|
_doFinalize: function() {
|
|
@@ -1948,16 +1946,16 @@ function St() {
|
|
|
1948
1946
|
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
1949
1947
|
})(), t.SHA384;
|
|
1950
1948
|
});
|
|
1951
|
-
})(
|
|
1949
|
+
})(L0)), L0.exports;
|
|
1952
1950
|
}
|
|
1953
|
-
var
|
|
1951
|
+
var O0 = { exports: {} }, Ht = O0.exports, Yr;
|
|
1954
1952
|
function $t() {
|
|
1955
|
-
return Yr || (Yr = 1, (function(r,
|
|
1953
|
+
return Yr || (Yr = 1, (function(r, h) {
|
|
1956
1954
|
(function(t, e, u) {
|
|
1957
|
-
r.exports = e(M(),
|
|
1955
|
+
r.exports = e(M(), fr());
|
|
1958
1956
|
})(Ht, function(t) {
|
|
1959
1957
|
return (function(e) {
|
|
1960
|
-
var u = t,
|
|
1958
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
1961
1959
|
(function() {
|
|
1962
1960
|
for (var l = 1, g = 0, i = 0; i < 24; i++) {
|
|
1963
1961
|
E[l + 5 * g] = (i + 1) * (i + 2) / 2 % 64;
|
|
@@ -2031,11 +2029,11 @@ function $t() {
|
|
|
2031
2029
|
A.high = _.high, A.low = _.low;
|
|
2032
2030
|
for (var R = 0; R < 5; R++)
|
|
2033
2031
|
for (var H = 0; H < 5; H++) {
|
|
2034
|
-
var T = R + 5 * H, y = i[T],
|
|
2035
|
-
y.high =
|
|
2032
|
+
var T = R + 5 * H, y = i[T], W = f[T], P = f[(R + 1) % 5 + 5 * H], L = f[(R + 2) % 5 + 5 * H];
|
|
2033
|
+
y.high = W.high ^ ~P.high & L.high, y.low = W.low ^ ~P.low & L.low;
|
|
2036
2034
|
}
|
|
2037
|
-
var y = i[0],
|
|
2038
|
-
y.high ^=
|
|
2035
|
+
var y = i[0], I = s[k];
|
|
2036
|
+
y.high ^= I.high, y.low ^= I.low;
|
|
2039
2037
|
}
|
|
2040
2038
|
},
|
|
2041
2039
|
_doFinalize: function() {
|
|
@@ -2058,16 +2056,16 @@ function $t() {
|
|
|
2058
2056
|
u.SHA3 = B._createHelper(v), u.HmacSHA3 = B._createHmacHelper(v);
|
|
2059
2057
|
})(Math), t.SHA3;
|
|
2060
2058
|
});
|
|
2061
|
-
})(
|
|
2059
|
+
})(O0)), O0.exports;
|
|
2062
2060
|
}
|
|
2063
|
-
var
|
|
2061
|
+
var q0 = { exports: {} }, Rt = q0.exports, Zr;
|
|
2064
2062
|
function Pt() {
|
|
2065
|
-
return Zr || (Zr = 1, (function(r,
|
|
2063
|
+
return Zr || (Zr = 1, (function(r, h) {
|
|
2066
2064
|
(function(t, e) {
|
|
2067
2065
|
r.exports = e(M());
|
|
2068
2066
|
})(Rt, function(t) {
|
|
2069
2067
|
return (function(e) {
|
|
2070
|
-
var u = t,
|
|
2068
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = m.create([
|
|
2071
2069
|
0,
|
|
2072
2070
|
1,
|
|
2073
2071
|
2,
|
|
@@ -2400,11 +2398,11 @@ function Pt() {
|
|
|
2400
2398
|
var R = y + k, F = D[R];
|
|
2401
2399
|
D[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2402
2400
|
}
|
|
2403
|
-
var w = this._hash.words, H = s.words, $ = f.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _,
|
|
2404
|
-
A = T = w[0], _ = N = w[1],
|
|
2405
|
-
for (var
|
|
2406
|
-
|
|
2407
|
-
|
|
2401
|
+
var w = this._hash.words, H = s.words, $ = f.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, c, A, _, W, P, L;
|
|
2402
|
+
A = T = w[0], _ = N = w[1], W = j = w[2], P = S = w[3], L = c = w[4];
|
|
2403
|
+
for (var I, k = 0; k < 80; k += 1)
|
|
2404
|
+
I = T + D[y + z[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(_, W, P) + $[0] : k < 32 ? I += o(_, W, P) + $[1] : k < 48 ? I += i(_, W, P) + $[2] : k < 64 ? I += g(_, W, P) + $[3] : I += l(_, W, P) + $[4], I = I | 0, I = b(I, U[k]), I = I + L | 0, A = L, L = P, P = b(W, 10), W = _, _ = I;
|
|
2405
|
+
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + _ | 0, w[4] = w[0] + N + W | 0, w[0] = I;
|
|
2408
2406
|
},
|
|
2409
2407
|
_doFinalize: function() {
|
|
2410
2408
|
var D = this._data, y = D.words, k = this._nDataBytes * 8, R = D.sigBytes * 8;
|
|
@@ -2441,17 +2439,17 @@ function Pt() {
|
|
|
2441
2439
|
u.RIPEMD160 = B._createHelper(v), u.HmacRIPEMD160 = B._createHmacHelper(v);
|
|
2442
2440
|
})(), t.RIPEMD160;
|
|
2443
2441
|
});
|
|
2444
|
-
})(
|
|
2442
|
+
})(q0)), q0.exports;
|
|
2445
2443
|
}
|
|
2446
|
-
var
|
|
2444
|
+
var T0 = { exports: {} }, zt = T0.exports, Qr;
|
|
2447
2445
|
function Ar() {
|
|
2448
|
-
return Qr || (Qr = 1, (function(r,
|
|
2446
|
+
return Qr || (Qr = 1, (function(r, h) {
|
|
2449
2447
|
(function(t, e) {
|
|
2450
2448
|
r.exports = e(M());
|
|
2451
2449
|
})(zt, function(t) {
|
|
2452
2450
|
(function() {
|
|
2453
|
-
var e = t, u = e.lib,
|
|
2454
|
-
C.HMAC =
|
|
2451
|
+
var e = t, u = e.lib, p = u.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2452
|
+
C.HMAC = p.extend({
|
|
2455
2453
|
/**
|
|
2456
2454
|
* Initializes a newly created HMAC.
|
|
2457
2455
|
*
|
|
@@ -2519,16 +2517,16 @@ function Ar() {
|
|
|
2519
2517
|
});
|
|
2520
2518
|
})();
|
|
2521
2519
|
});
|
|
2522
|
-
})(
|
|
2520
|
+
})(T0)), T0.exports;
|
|
2523
2521
|
}
|
|
2524
|
-
var
|
|
2525
|
-
function
|
|
2526
|
-
return Vr || (Vr = 1, (function(r,
|
|
2522
|
+
var M0 = { exports: {} }, Wt = M0.exports, Vr;
|
|
2523
|
+
function It() {
|
|
2524
|
+
return Vr || (Vr = 1, (function(r, h) {
|
|
2527
2525
|
(function(t, e, u) {
|
|
2528
2526
|
r.exports = e(M(), Er(), Ar());
|
|
2529
|
-
})(
|
|
2527
|
+
})(Wt, function(t) {
|
|
2530
2528
|
return (function() {
|
|
2531
|
-
var e = t, u = e.lib,
|
|
2529
|
+
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({
|
|
2532
2530
|
/**
|
|
2533
2531
|
* Configuration options.
|
|
2534
2532
|
*
|
|
@@ -2536,7 +2534,7 @@ function Wt() {
|
|
|
2536
2534
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2537
2535
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2538
2536
|
*/
|
|
2539
|
-
cfg:
|
|
2537
|
+
cfg: p.extend({
|
|
2540
2538
|
keySize: 128 / 32,
|
|
2541
2539
|
hasher: C,
|
|
2542
2540
|
iterations: 25e4
|
|
@@ -2586,16 +2584,16 @@ function Wt() {
|
|
|
2586
2584
|
};
|
|
2587
2585
|
})(), t.PBKDF2;
|
|
2588
2586
|
});
|
|
2589
|
-
})(
|
|
2587
|
+
})(M0)), M0.exports;
|
|
2590
2588
|
}
|
|
2591
|
-
var
|
|
2589
|
+
var N0 = { exports: {} }, Lt = N0.exports, Jr;
|
|
2592
2590
|
function a0() {
|
|
2593
|
-
return Jr || (Jr = 1, (function(r,
|
|
2591
|
+
return Jr || (Jr = 1, (function(r, h) {
|
|
2594
2592
|
(function(t, e, u) {
|
|
2595
2593
|
r.exports = e(M(), ye(), Ar());
|
|
2596
2594
|
})(Lt, function(t) {
|
|
2597
2595
|
return (function() {
|
|
2598
|
-
var e = t, u = e.lib,
|
|
2596
|
+
var e = t, u = e.lib, p = u.Base, m = u.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = p.extend({
|
|
2599
2597
|
/**
|
|
2600
2598
|
* Configuration options.
|
|
2601
2599
|
*
|
|
@@ -2603,7 +2601,7 @@ function a0() {
|
|
|
2603
2601
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2604
2602
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2605
2603
|
*/
|
|
2606
|
-
cfg:
|
|
2604
|
+
cfg: p.extend({
|
|
2607
2605
|
keySize: 128 / 32,
|
|
2608
2606
|
hasher: C,
|
|
2609
2607
|
iterations: 1
|
|
@@ -2649,18 +2647,18 @@ function a0() {
|
|
|
2649
2647
|
};
|
|
2650
2648
|
})(), t.EvpKDF;
|
|
2651
2649
|
});
|
|
2652
|
-
})(
|
|
2650
|
+
})(N0)), N0.exports;
|
|
2653
2651
|
}
|
|
2654
|
-
var
|
|
2652
|
+
var U0 = { exports: {} }, Ot = U0.exports, re;
|
|
2655
2653
|
function X() {
|
|
2656
|
-
return re || (re = 1, (function(r,
|
|
2654
|
+
return re || (re = 1, (function(r, h) {
|
|
2657
2655
|
(function(t, e, u) {
|
|
2658
2656
|
r.exports = e(M(), a0());
|
|
2659
2657
|
})(Ot, function(t) {
|
|
2660
2658
|
t.lib.Cipher || (function(e) {
|
|
2661
|
-
var u = t,
|
|
2659
|
+
var u = t, p = u.lib, m = p.Base, B = p.WordArray, C = p.BufferedBlockAlgorithm, x = u.enc;
|
|
2662
2660
|
x.Utf8;
|
|
2663
|
-
var n = x.Base64, E = u.algo, a = E.EvpKDF, s =
|
|
2661
|
+
var n = x.Base64, E = u.algo, a = E.EvpKDF, s = p.Cipher = C.extend({
|
|
2664
2662
|
/**
|
|
2665
2663
|
* Configuration options.
|
|
2666
2664
|
*
|
|
@@ -2792,14 +2790,14 @@ function X() {
|
|
|
2792
2790
|
};
|
|
2793
2791
|
})()
|
|
2794
2792
|
});
|
|
2795
|
-
|
|
2793
|
+
p.StreamCipher = s.extend({
|
|
2796
2794
|
_doFinalize: function() {
|
|
2797
2795
|
var F = this._process(!0);
|
|
2798
2796
|
return F;
|
|
2799
2797
|
},
|
|
2800
2798
|
blockSize: 1
|
|
2801
2799
|
});
|
|
2802
|
-
var f = u.mode = {}, v =
|
|
2800
|
+
var f = u.mode = {}, v = p.BlockCipherMode = m.extend({
|
|
2803
2801
|
/**
|
|
2804
2802
|
* Creates this mode for encryption.
|
|
2805
2803
|
*
|
|
@@ -2918,7 +2916,7 @@ function X() {
|
|
|
2918
2916
|
F.sigBytes -= w;
|
|
2919
2917
|
}
|
|
2920
2918
|
};
|
|
2921
|
-
|
|
2919
|
+
p.BlockCipher = s.extend({
|
|
2922
2920
|
/**
|
|
2923
2921
|
* Configuration options.
|
|
2924
2922
|
*
|
|
@@ -2944,7 +2942,7 @@ function X() {
|
|
|
2944
2942
|
},
|
|
2945
2943
|
blockSize: 128 / 32
|
|
2946
2944
|
});
|
|
2947
|
-
var o =
|
|
2945
|
+
var o = p.CipherParams = m.extend({
|
|
2948
2946
|
/**
|
|
2949
2947
|
* Initializes a newly created cipher params object.
|
|
2950
2948
|
*
|
|
@@ -3020,7 +3018,7 @@ function X() {
|
|
|
3020
3018
|
var w, H = n.parse(F), $ = H.words;
|
|
3021
3019
|
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3022
3020
|
}
|
|
3023
|
-
}, D =
|
|
3021
|
+
}, D = p.SerializableCipher = m.extend({
|
|
3024
3022
|
/**
|
|
3025
3023
|
* Configuration options.
|
|
3026
3024
|
*
|
|
@@ -3127,7 +3125,7 @@ function X() {
|
|
|
3127
3125
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3128
3126
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3129
3127
|
}
|
|
3130
|
-
}, R =
|
|
3128
|
+
}, R = p.PasswordBasedCipher = D.extend({
|
|
3131
3129
|
/**
|
|
3132
3130
|
* Configuration options.
|
|
3133
3131
|
*
|
|
@@ -3187,63 +3185,63 @@ function X() {
|
|
|
3187
3185
|
});
|
|
3188
3186
|
})();
|
|
3189
3187
|
});
|
|
3190
|
-
})(
|
|
3188
|
+
})(U0)), U0.exports;
|
|
3191
3189
|
}
|
|
3192
|
-
var
|
|
3190
|
+
var j0 = { exports: {} }, qt = j0.exports, ee;
|
|
3193
3191
|
function Tt() {
|
|
3194
|
-
return ee || (ee = 1, (function(r,
|
|
3192
|
+
return ee || (ee = 1, (function(r, h) {
|
|
3195
3193
|
(function(t, e, u) {
|
|
3196
3194
|
r.exports = e(M(), X());
|
|
3197
3195
|
})(qt, function(t) {
|
|
3198
3196
|
return t.mode.CFB = (function() {
|
|
3199
3197
|
var e = t.lib.BlockCipherMode.extend();
|
|
3200
3198
|
e.Encryptor = e.extend({
|
|
3201
|
-
processBlock: function(
|
|
3199
|
+
processBlock: function(p, m) {
|
|
3202
3200
|
var B = this._cipher, C = B.blockSize;
|
|
3203
|
-
u.call(this,
|
|
3201
|
+
u.call(this, p, m, C, B), this._prevBlock = p.slice(m, m + C);
|
|
3204
3202
|
}
|
|
3205
3203
|
}), e.Decryptor = e.extend({
|
|
3206
|
-
processBlock: function(
|
|
3207
|
-
var B = this._cipher, C = B.blockSize, x =
|
|
3208
|
-
u.call(this,
|
|
3204
|
+
processBlock: function(p, m) {
|
|
3205
|
+
var B = this._cipher, C = B.blockSize, x = p.slice(m, m + C);
|
|
3206
|
+
u.call(this, p, m, C, B), this._prevBlock = x;
|
|
3209
3207
|
}
|
|
3210
3208
|
});
|
|
3211
|
-
function u(
|
|
3209
|
+
function u(p, m, B, C) {
|
|
3212
3210
|
var x, n = this._iv;
|
|
3213
3211
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3214
3212
|
for (var E = 0; E < B; E++)
|
|
3215
|
-
|
|
3213
|
+
p[m + E] ^= x[E];
|
|
3216
3214
|
}
|
|
3217
3215
|
return e;
|
|
3218
3216
|
})(), t.mode.CFB;
|
|
3219
3217
|
});
|
|
3220
|
-
})(
|
|
3218
|
+
})(j0)), j0.exports;
|
|
3221
3219
|
}
|
|
3222
|
-
var
|
|
3220
|
+
var G0 = { exports: {} }, Mt = G0.exports, te;
|
|
3223
3221
|
function Nt() {
|
|
3224
|
-
return te || (te = 1, (function(r,
|
|
3222
|
+
return te || (te = 1, (function(r, h) {
|
|
3225
3223
|
(function(t, e, u) {
|
|
3226
3224
|
r.exports = e(M(), X());
|
|
3227
3225
|
})(Mt, function(t) {
|
|
3228
3226
|
return t.mode.CTR = (function() {
|
|
3229
3227
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3230
|
-
processBlock: function(
|
|
3228
|
+
processBlock: function(p, m) {
|
|
3231
3229
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3232
3230
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3233
3231
|
var E = n.slice(0);
|
|
3234
3232
|
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3235
3233
|
for (var a = 0; a < C; a++)
|
|
3236
|
-
|
|
3234
|
+
p[m + a] ^= E[a];
|
|
3237
3235
|
}
|
|
3238
3236
|
});
|
|
3239
3237
|
return e.Decryptor = u, e;
|
|
3240
3238
|
})(), t.mode.CTR;
|
|
3241
3239
|
});
|
|
3242
|
-
})(
|
|
3240
|
+
})(G0)), G0.exports;
|
|
3243
3241
|
}
|
|
3244
|
-
var
|
|
3242
|
+
var K0 = { exports: {} }, Ut = K0.exports, xe;
|
|
3245
3243
|
function jt() {
|
|
3246
|
-
return xe || (xe = 1, (function(r,
|
|
3244
|
+
return xe || (xe = 1, (function(r, h) {
|
|
3247
3245
|
(function(t, e, u) {
|
|
3248
3246
|
r.exports = e(M(), X());
|
|
3249
3247
|
})(Ut, function(t) {
|
|
@@ -3257,13 +3255,13 @@ function jt() {
|
|
|
3257
3255
|
B += 1 << 24;
|
|
3258
3256
|
return B;
|
|
3259
3257
|
}
|
|
3260
|
-
function
|
|
3258
|
+
function p(B) {
|
|
3261
3259
|
return (B[0] = u(B[0])) === 0 && (B[1] = u(B[1])), B;
|
|
3262
3260
|
}
|
|
3263
3261
|
var m = e.Encryptor = e.extend({
|
|
3264
3262
|
processBlock: function(B, C) {
|
|
3265
3263
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3266
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3264
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), p(a);
|
|
3267
3265
|
var s = a.slice(0);
|
|
3268
3266
|
x.encryptBlock(s, 0);
|
|
3269
3267
|
for (var f = 0; f < n; f++)
|
|
@@ -3273,58 +3271,58 @@ function jt() {
|
|
|
3273
3271
|
return e.Decryptor = m, e;
|
|
3274
3272
|
})(), t.mode.CTRGladman;
|
|
3275
3273
|
});
|
|
3276
|
-
})(
|
|
3274
|
+
})(K0)), K0.exports;
|
|
3277
3275
|
}
|
|
3278
|
-
var
|
|
3276
|
+
var X0 = { exports: {} }, Gt = X0.exports, ne;
|
|
3279
3277
|
function Kt() {
|
|
3280
|
-
return ne || (ne = 1, (function(r,
|
|
3278
|
+
return ne || (ne = 1, (function(r, h) {
|
|
3281
3279
|
(function(t, e, u) {
|
|
3282
3280
|
r.exports = e(M(), X());
|
|
3283
3281
|
})(Gt, function(t) {
|
|
3284
3282
|
return t.mode.OFB = (function() {
|
|
3285
3283
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3286
|
-
processBlock: function(
|
|
3284
|
+
processBlock: function(p, m) {
|
|
3287
3285
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3288
3286
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3289
3287
|
for (var E = 0; E < C; E++)
|
|
3290
|
-
|
|
3288
|
+
p[m + E] ^= n[E];
|
|
3291
3289
|
}
|
|
3292
3290
|
});
|
|
3293
3291
|
return e.Decryptor = u, e;
|
|
3294
3292
|
})(), t.mode.OFB;
|
|
3295
3293
|
});
|
|
3296
|
-
})(
|
|
3294
|
+
})(X0)), X0.exports;
|
|
3297
3295
|
}
|
|
3298
|
-
var
|
|
3296
|
+
var Y0 = { exports: {} }, Xt = Y0.exports, ae;
|
|
3299
3297
|
function Yt() {
|
|
3300
|
-
return ae || (ae = 1, (function(r,
|
|
3298
|
+
return ae || (ae = 1, (function(r, h) {
|
|
3301
3299
|
(function(t, e, u) {
|
|
3302
3300
|
r.exports = e(M(), X());
|
|
3303
3301
|
})(Xt, function(t) {
|
|
3304
3302
|
return t.mode.ECB = (function() {
|
|
3305
3303
|
var e = t.lib.BlockCipherMode.extend();
|
|
3306
3304
|
return e.Encryptor = e.extend({
|
|
3307
|
-
processBlock: function(u,
|
|
3308
|
-
this._cipher.encryptBlock(u,
|
|
3305
|
+
processBlock: function(u, p) {
|
|
3306
|
+
this._cipher.encryptBlock(u, p);
|
|
3309
3307
|
}
|
|
3310
3308
|
}), e.Decryptor = e.extend({
|
|
3311
|
-
processBlock: function(u,
|
|
3312
|
-
this._cipher.decryptBlock(u,
|
|
3309
|
+
processBlock: function(u, p) {
|
|
3310
|
+
this._cipher.decryptBlock(u, p);
|
|
3313
3311
|
}
|
|
3314
3312
|
}), e;
|
|
3315
3313
|
})(), t.mode.ECB;
|
|
3316
3314
|
});
|
|
3317
|
-
})(
|
|
3315
|
+
})(Y0)), Y0.exports;
|
|
3318
3316
|
}
|
|
3319
|
-
var
|
|
3317
|
+
var Z0 = { exports: {} }, Zt = Z0.exports, oe;
|
|
3320
3318
|
function Qt() {
|
|
3321
|
-
return oe || (oe = 1, (function(r,
|
|
3319
|
+
return oe || (oe = 1, (function(r, h) {
|
|
3322
3320
|
(function(t, e, u) {
|
|
3323
3321
|
r.exports = e(M(), X());
|
|
3324
3322
|
})(Zt, function(t) {
|
|
3325
3323
|
return t.pad.AnsiX923 = {
|
|
3326
3324
|
pad: function(e, u) {
|
|
3327
|
-
var
|
|
3325
|
+
var p = e.sigBytes, m = u * 4, B = m - p % m, C = p + B - 1;
|
|
3328
3326
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3329
3327
|
},
|
|
3330
3328
|
unpad: function(e) {
|
|
@@ -3333,17 +3331,17 @@ function Qt() {
|
|
|
3333
3331
|
}
|
|
3334
3332
|
}, t.pad.Ansix923;
|
|
3335
3333
|
});
|
|
3336
|
-
})(
|
|
3334
|
+
})(Z0)), Z0.exports;
|
|
3337
3335
|
}
|
|
3338
|
-
var
|
|
3336
|
+
var Q0 = { exports: {} }, Vt = Q0.exports, ie;
|
|
3339
3337
|
function Jt() {
|
|
3340
|
-
return ie || (ie = 1, (function(r,
|
|
3338
|
+
return ie || (ie = 1, (function(r, h) {
|
|
3341
3339
|
(function(t, e, u) {
|
|
3342
3340
|
r.exports = e(M(), X());
|
|
3343
3341
|
})(Vt, function(t) {
|
|
3344
3342
|
return t.pad.Iso10126 = {
|
|
3345
3343
|
pad: function(e, u) {
|
|
3346
|
-
var
|
|
3344
|
+
var p = u * 4, m = p - e.sigBytes % p;
|
|
3347
3345
|
e.concat(t.lib.WordArray.random(m - 1)).concat(t.lib.WordArray.create([m << 24], 1));
|
|
3348
3346
|
},
|
|
3349
3347
|
unpad: function(e) {
|
|
@@ -3352,11 +3350,11 @@ function Jt() {
|
|
|
3352
3350
|
}
|
|
3353
3351
|
}, t.pad.Iso10126;
|
|
3354
3352
|
});
|
|
3355
|
-
})(
|
|
3353
|
+
})(Q0)), Q0.exports;
|
|
3356
3354
|
}
|
|
3357
|
-
var
|
|
3355
|
+
var V0 = { exports: {} }, rx = V0.exports, se;
|
|
3358
3356
|
function ex() {
|
|
3359
|
-
return se || (se = 1, (function(r,
|
|
3357
|
+
return se || (se = 1, (function(r, h) {
|
|
3360
3358
|
(function(t, e, u) {
|
|
3361
3359
|
r.exports = e(M(), X());
|
|
3362
3360
|
})(rx, function(t) {
|
|
@@ -3369,33 +3367,33 @@ function ex() {
|
|
|
3369
3367
|
}
|
|
3370
3368
|
}, t.pad.Iso97971;
|
|
3371
3369
|
});
|
|
3372
|
-
})(
|
|
3370
|
+
})(V0)), V0.exports;
|
|
3373
3371
|
}
|
|
3374
|
-
var
|
|
3372
|
+
var J0 = { exports: {} }, tx = J0.exports, ce;
|
|
3375
3373
|
function xx() {
|
|
3376
|
-
return ce || (ce = 1, (function(r,
|
|
3374
|
+
return ce || (ce = 1, (function(r, h) {
|
|
3377
3375
|
(function(t, e, u) {
|
|
3378
3376
|
r.exports = e(M(), X());
|
|
3379
3377
|
})(tx, function(t) {
|
|
3380
3378
|
return t.pad.ZeroPadding = {
|
|
3381
3379
|
pad: function(e, u) {
|
|
3382
|
-
var
|
|
3383
|
-
e.clamp(), e.sigBytes +=
|
|
3380
|
+
var p = u * 4;
|
|
3381
|
+
e.clamp(), e.sigBytes += p - (e.sigBytes % p || p);
|
|
3384
3382
|
},
|
|
3385
3383
|
unpad: function(e) {
|
|
3386
|
-
for (var u = e.words,
|
|
3387
|
-
if (u[
|
|
3388
|
-
e.sigBytes =
|
|
3384
|
+
for (var u = e.words, p = e.sigBytes - 1, p = e.sigBytes - 1; p >= 0; p--)
|
|
3385
|
+
if (u[p >>> 2] >>> 24 - p % 4 * 8 & 255) {
|
|
3386
|
+
e.sigBytes = p + 1;
|
|
3389
3387
|
break;
|
|
3390
3388
|
}
|
|
3391
3389
|
}
|
|
3392
3390
|
}, t.pad.ZeroPadding;
|
|
3393
3391
|
});
|
|
3394
|
-
})(
|
|
3392
|
+
})(J0)), J0.exports;
|
|
3395
3393
|
}
|
|
3396
|
-
var
|
|
3394
|
+
var rr = { exports: {} }, nx = rr.exports, fe;
|
|
3397
3395
|
function ax() {
|
|
3398
|
-
return fe || (fe = 1, (function(r,
|
|
3396
|
+
return fe || (fe = 1, (function(r, h) {
|
|
3399
3397
|
(function(t, e, u) {
|
|
3400
3398
|
r.exports = e(M(), X());
|
|
3401
3399
|
})(nx, function(t) {
|
|
@@ -3406,16 +3404,16 @@ function ax() {
|
|
|
3406
3404
|
}
|
|
3407
3405
|
}, t.pad.NoPadding;
|
|
3408
3406
|
});
|
|
3409
|
-
})(
|
|
3407
|
+
})(rr)), rr.exports;
|
|
3410
3408
|
}
|
|
3411
|
-
var
|
|
3409
|
+
var er = { exports: {} }, ox = er.exports, ue;
|
|
3412
3410
|
function ix() {
|
|
3413
|
-
return ue || (ue = 1, (function(r,
|
|
3411
|
+
return ue || (ue = 1, (function(r, h) {
|
|
3414
3412
|
(function(t, e, u) {
|
|
3415
3413
|
r.exports = e(M(), X());
|
|
3416
3414
|
})(ox, function(t) {
|
|
3417
3415
|
return (function(e) {
|
|
3418
|
-
var u = t,
|
|
3416
|
+
var u = t, p = u.lib, m = p.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
3419
3417
|
x.Hex = {
|
|
3420
3418
|
/**
|
|
3421
3419
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3453,16 +3451,16 @@ function ix() {
|
|
|
3453
3451
|
};
|
|
3454
3452
|
})(), t.format.Hex;
|
|
3455
3453
|
});
|
|
3456
|
-
})(
|
|
3454
|
+
})(er)), er.exports;
|
|
3457
3455
|
}
|
|
3458
|
-
var
|
|
3456
|
+
var tr = { exports: {} }, sx = tr.exports, de;
|
|
3459
3457
|
function cx() {
|
|
3460
|
-
return de || (de = 1, (function(r,
|
|
3458
|
+
return de || (de = 1, (function(r, h) {
|
|
3461
3459
|
(function(t, e, u) {
|
|
3462
3460
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3463
3461
|
})(sx, function(t) {
|
|
3464
3462
|
return (function() {
|
|
3465
|
-
var e = t, u = e.lib,
|
|
3463
|
+
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], v = [], l = [];
|
|
3466
3464
|
(function() {
|
|
3467
3465
|
for (var o = [], d = 0; d < 256; d++)
|
|
3468
3466
|
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
@@ -3475,7 +3473,7 @@ function cx() {
|
|
|
3475
3473
|
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, v[y] = w << 8 | w >>> 24, l[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], D ^= o[o[D]]) : b = D = 1;
|
|
3476
3474
|
}
|
|
3477
3475
|
})();
|
|
3478
|
-
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES =
|
|
3476
|
+
var g = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = m.AES = p.extend({
|
|
3479
3477
|
_doReset: function() {
|
|
3480
3478
|
var o;
|
|
3481
3479
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
@@ -3510,19 +3508,19 @@ function cx() {
|
|
|
3510
3508
|
},
|
|
3511
3509
|
keySize: 256 / 32
|
|
3512
3510
|
});
|
|
3513
|
-
e.AES =
|
|
3511
|
+
e.AES = p._createHelper(i);
|
|
3514
3512
|
})(), t.AES;
|
|
3515
3513
|
});
|
|
3516
|
-
})(
|
|
3514
|
+
})(tr)), tr.exports;
|
|
3517
3515
|
}
|
|
3518
|
-
var
|
|
3516
|
+
var xr = { exports: {} }, fx = xr.exports, le;
|
|
3519
3517
|
function ux() {
|
|
3520
|
-
return le || (le = 1, (function(r,
|
|
3518
|
+
return le || (le = 1, (function(r, h) {
|
|
3521
3519
|
(function(t, e, u) {
|
|
3522
3520
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
3523
3521
|
})(fx, function(t) {
|
|
3524
3522
|
return (function() {
|
|
3525
|
-
var e = t, u = e.lib,
|
|
3523
|
+
var e = t, u = e.lib, p = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
3526
3524
|
57,
|
|
3527
3525
|
49,
|
|
3528
3526
|
41,
|
|
@@ -4218,7 +4216,7 @@ function ux() {
|
|
|
4218
4216
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4219
4217
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4220
4218
|
var o = i.slice(0, 2), d = i.length < 4 ? i.slice(0, 2) : i.slice(2, 4), b = i.length < 6 ? i.slice(0, 2) : i.slice(4, 6);
|
|
4221
|
-
this._des1 = s.createEncryptor(
|
|
4219
|
+
this._des1 = s.createEncryptor(p.create(o)), this._des2 = s.createEncryptor(p.create(d)), this._des3 = s.createEncryptor(p.create(b));
|
|
4222
4220
|
},
|
|
4223
4221
|
encryptBlock: function(g, i) {
|
|
4224
4222
|
this._des1.encryptBlock(g, i), this._des2.decryptBlock(g, i), this._des3.encryptBlock(g, i);
|
|
@@ -4233,16 +4231,16 @@ function ux() {
|
|
|
4233
4231
|
e.TripleDES = m._createHelper(l);
|
|
4234
4232
|
})(), t.TripleDES;
|
|
4235
4233
|
});
|
|
4236
|
-
})(
|
|
4234
|
+
})(xr)), xr.exports;
|
|
4237
4235
|
}
|
|
4238
|
-
var
|
|
4236
|
+
var nr = { exports: {} }, dx = nr.exports, he;
|
|
4239
4237
|
function lx() {
|
|
4240
|
-
return he || (he = 1, (function(r,
|
|
4238
|
+
return he || (he = 1, (function(r, h) {
|
|
4241
4239
|
(function(t, e, u) {
|
|
4242
4240
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4243
4241
|
})(dx, function(t) {
|
|
4244
4242
|
return (function() {
|
|
4245
|
-
var e = t, u = e.lib,
|
|
4243
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = m.RC4 = p.extend({
|
|
4246
4244
|
_doReset: function() {
|
|
4247
4245
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4248
4246
|
s[f] = f;
|
|
@@ -4268,7 +4266,7 @@ function lx() {
|
|
|
4268
4266
|
}
|
|
4269
4267
|
return this._i = E, this._j = a, s;
|
|
4270
4268
|
}
|
|
4271
|
-
e.RC4 =
|
|
4269
|
+
e.RC4 = p._createHelper(B);
|
|
4272
4270
|
var x = m.RC4Drop = B.extend({
|
|
4273
4271
|
/**
|
|
4274
4272
|
* Configuration options.
|
|
@@ -4284,19 +4282,19 @@ function lx() {
|
|
|
4284
4282
|
C.call(this);
|
|
4285
4283
|
}
|
|
4286
4284
|
});
|
|
4287
|
-
e.RC4Drop =
|
|
4285
|
+
e.RC4Drop = p._createHelper(x);
|
|
4288
4286
|
})(), t.RC4;
|
|
4289
4287
|
});
|
|
4290
|
-
})(
|
|
4288
|
+
})(nr)), nr.exports;
|
|
4291
4289
|
}
|
|
4292
|
-
var
|
|
4290
|
+
var ar = { exports: {} }, hx = ar.exports, ve;
|
|
4293
4291
|
function vx() {
|
|
4294
|
-
return ve || (ve = 1, (function(r,
|
|
4292
|
+
return ve || (ve = 1, (function(r, h) {
|
|
4295
4293
|
(function(t, e, u) {
|
|
4296
4294
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4297
4295
|
})(hx, function(t) {
|
|
4298
4296
|
return (function() {
|
|
4299
|
-
var e = t, u = e.lib,
|
|
4297
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = p.extend({
|
|
4300
4298
|
_doReset: function() {
|
|
4301
4299
|
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4302
4300
|
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
@@ -4350,19 +4348,19 @@ function vx() {
|
|
|
4350
4348
|
}
|
|
4351
4349
|
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;
|
|
4352
4350
|
}
|
|
4353
|
-
e.Rabbit =
|
|
4351
|
+
e.Rabbit = p._createHelper(n);
|
|
4354
4352
|
})(), t.Rabbit;
|
|
4355
4353
|
});
|
|
4356
|
-
})(
|
|
4354
|
+
})(ar)), ar.exports;
|
|
4357
4355
|
}
|
|
4358
|
-
var
|
|
4356
|
+
var or = { exports: {} }, px = or.exports, pe;
|
|
4359
4357
|
function Bx() {
|
|
4360
|
-
return pe || (pe = 1, (function(r,
|
|
4358
|
+
return pe || (pe = 1, (function(r, h) {
|
|
4361
4359
|
(function(t, e, u) {
|
|
4362
4360
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4363
4361
|
})(px, function(t) {
|
|
4364
4362
|
return (function() {
|
|
4365
|
-
var e = t, u = e.lib,
|
|
4363
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = p.extend({
|
|
4366
4364
|
_doReset: function() {
|
|
4367
4365
|
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4368
4366
|
a[0],
|
|
@@ -4414,19 +4412,19 @@ function Bx() {
|
|
|
4414
4412
|
}
|
|
4415
4413
|
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;
|
|
4416
4414
|
}
|
|
4417
|
-
e.RabbitLegacy =
|
|
4415
|
+
e.RabbitLegacy = p._createHelper(n);
|
|
4418
4416
|
})(), t.RabbitLegacy;
|
|
4419
4417
|
});
|
|
4420
|
-
})(
|
|
4418
|
+
})(or)), or.exports;
|
|
4421
4419
|
}
|
|
4422
|
-
var
|
|
4420
|
+
var ir = { exports: {} }, Cx = ir.exports, Be;
|
|
4423
4421
|
function Ex() {
|
|
4424
|
-
return Be || (Be = 1, (function(r,
|
|
4422
|
+
return Be || (Be = 1, (function(r, h) {
|
|
4425
4423
|
(function(t, e, u) {
|
|
4426
4424
|
r.exports = e(M(), i0(), s0(), a0(), X());
|
|
4427
4425
|
})(Cx, function(t) {
|
|
4428
4426
|
return (function() {
|
|
4429
|
-
var e = t, u = e.lib,
|
|
4427
|
+
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo;
|
|
4430
4428
|
const B = 16, C = [
|
|
4431
4429
|
608135816,
|
|
4432
4430
|
2242054355,
|
|
@@ -5517,7 +5515,7 @@ function Ex() {
|
|
|
5517
5515
|
D = a(l, d, b), d = D.left, b = D.right, l.sbox[y][k] = d, l.sbox[y][k + 1] = b;
|
|
5518
5516
|
return !0;
|
|
5519
5517
|
}
|
|
5520
|
-
var v = m.Blowfish =
|
|
5518
|
+
var v = m.Blowfish = p.extend({
|
|
5521
5519
|
_doReset: function() {
|
|
5522
5520
|
if (this._keyPriorReset !== this._key) {
|
|
5523
5521
|
var l = this._keyPriorReset = this._key, g = l.words, i = l.sigBytes / 4;
|
|
@@ -5536,20 +5534,20 @@ function Ex() {
|
|
|
5536
5534
|
keySize: 128 / 32,
|
|
5537
5535
|
ivSize: 64 / 32
|
|
5538
5536
|
});
|
|
5539
|
-
e.Blowfish =
|
|
5537
|
+
e.Blowfish = p._createHelper(v);
|
|
5540
5538
|
})(), t.Blowfish;
|
|
5541
5539
|
});
|
|
5542
|
-
})(
|
|
5540
|
+
})(ir)), ir.exports;
|
|
5543
5541
|
}
|
|
5544
|
-
var Ax =
|
|
5542
|
+
var Ax = _0.exports, Ce;
|
|
5545
5543
|
function Fx() {
|
|
5546
|
-
return Ce || (Ce = 1, (function(r,
|
|
5544
|
+
return Ce || (Ce = 1, (function(r, h) {
|
|
5547
5545
|
(function(t, e, u) {
|
|
5548
|
-
r.exports = e(M(),
|
|
5546
|
+
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());
|
|
5549
5547
|
})(Ax, function(t) {
|
|
5550
5548
|
return t;
|
|
5551
5549
|
});
|
|
5552
|
-
})(
|
|
5550
|
+
})(_0)), _0.exports;
|
|
5553
5551
|
}
|
|
5554
5552
|
Fx();
|
|
5555
5553
|
let ke = null, Se = null, He = null, $e = null;
|
|
@@ -5566,11 +5564,11 @@ function gx() {
|
|
|
5566
5564
|
};
|
|
5567
5565
|
}
|
|
5568
5566
|
function bx(r) {
|
|
5569
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5567
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.149`;
|
|
5570
5568
|
}
|
|
5571
|
-
function mx(r,
|
|
5569
|
+
function mx(r, h) {
|
|
5572
5570
|
const t = bx(r);
|
|
5573
|
-
return new Worker(t, { type: "module", ...
|
|
5571
|
+
return new Worker(t, { type: "module", ...h });
|
|
5574
5572
|
}
|
|
5575
5573
|
const Fr = () => {
|
|
5576
5574
|
try {
|
|
@@ -5578,31 +5576,31 @@ const Fr = () => {
|
|
|
5578
5576
|
} catch {
|
|
5579
5577
|
}
|
|
5580
5578
|
return !1;
|
|
5581
|
-
},
|
|
5579
|
+
}, b0 = (...r) => {
|
|
5582
5580
|
Fr();
|
|
5583
5581
|
}, Ee = (...r) => {
|
|
5584
5582
|
Fr();
|
|
5585
|
-
}, Ae = /* @__PURE__ */ new Map(),
|
|
5583
|
+
}, Ae = /* @__PURE__ */ new Map(), vr = /* @__PURE__ */ new Map();
|
|
5586
5584
|
let _x = 0;
|
|
5587
5585
|
function yx(r) {
|
|
5588
|
-
const
|
|
5589
|
-
if (
|
|
5586
|
+
const h = Ae.get(r);
|
|
5587
|
+
if (h) return h;
|
|
5590
5588
|
const t = mx("./deform.worker.ts");
|
|
5591
5589
|
try {
|
|
5592
5590
|
t.postMessage({ type: "SET_DEBUG", debugRender: Fr() });
|
|
5593
5591
|
} catch {
|
|
5594
5592
|
}
|
|
5595
5593
|
t.onmessage = (u) => {
|
|
5596
|
-
const { id:
|
|
5597
|
-
|
|
5594
|
+
const { id: p, imageBitmap: m, error: B, duration: C } = u.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5595
|
+
b0(`[renderService] deform worker 响应 id=${p}${x}`, {
|
|
5598
5596
|
hasImageBitmap: !!m,
|
|
5599
5597
|
width: m?.width,
|
|
5600
5598
|
height: m?.height,
|
|
5601
5599
|
error: B
|
|
5602
5600
|
});
|
|
5603
|
-
const n =
|
|
5601
|
+
const n = vr.get(p);
|
|
5604
5602
|
if (n) {
|
|
5605
|
-
if (
|
|
5603
|
+
if (vr.delete(p), B) {
|
|
5606
5604
|
n.reject(new Error(B));
|
|
5607
5605
|
return;
|
|
5608
5606
|
}
|
|
@@ -5612,12 +5610,12 @@ function yx(r) {
|
|
|
5612
5610
|
};
|
|
5613
5611
|
const e = () => {
|
|
5614
5612
|
const u = gx();
|
|
5615
|
-
return
|
|
5613
|
+
return b0("🔍 [workerManager] 检查 License Token:", {
|
|
5616
5614
|
hasToken: !!u.token,
|
|
5617
5615
|
tokenPreview: u.token ? u.token.substring(0, 20) + "..." : "undefined",
|
|
5618
5616
|
faceId: r,
|
|
5619
5617
|
source: "licenseStore模块"
|
|
5620
|
-
}), u.token ? (
|
|
5618
|
+
}), u.token ? (b0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5621
5619
|
type: "SET_LICENSE",
|
|
5622
5620
|
licenseToken: u.token,
|
|
5623
5621
|
licenseApiUrl: u.apiUrl,
|
|
@@ -5625,7 +5623,7 @@ function yx(r) {
|
|
|
5625
5623
|
domain: u.domain
|
|
5626
5624
|
}), !0) : !1;
|
|
5627
5625
|
};
|
|
5628
|
-
return e() || (
|
|
5626
|
+
return e() || (b0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5629
5627
|
e() || Ee("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5630
5628
|
}, 200), setTimeout(() => {
|
|
5631
5629
|
e() || Ee("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
@@ -5637,10 +5635,10 @@ function wx(r) {
|
|
|
5637
5635
|
type: r.type,
|
|
5638
5636
|
blendMode: r.blendMode,
|
|
5639
5637
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5640
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5641
|
-
x:
|
|
5642
|
-
y:
|
|
5643
|
-
type:
|
|
5638
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((h) => ({
|
|
5639
|
+
x: h.x,
|
|
5640
|
+
y: h.y,
|
|
5641
|
+
type: h.type
|
|
5644
5642
|
})) : [],
|
|
5645
5643
|
bounds: r.bounds ? {
|
|
5646
5644
|
width: r.bounds.width,
|
|
@@ -5663,30 +5661,30 @@ function wx(r) {
|
|
|
5663
5661
|
layerOrder: r.layerOrder,
|
|
5664
5662
|
imagePath: r.imagePath,
|
|
5665
5663
|
vectorMask: r.vectorMask ? {
|
|
5666
|
-
paths: r.vectorMask.paths?.map((
|
|
5667
|
-
open:
|
|
5668
|
-
knots:
|
|
5664
|
+
paths: r.vectorMask.paths?.map((h) => ({
|
|
5665
|
+
open: h.open,
|
|
5666
|
+
knots: h.knots?.map((t) => ({
|
|
5669
5667
|
linked: t.linked,
|
|
5670
5668
|
points: [...t.points]
|
|
5671
5669
|
})),
|
|
5672
|
-
fillRule:
|
|
5673
|
-
operation:
|
|
5670
|
+
fillRule: h.fillRule,
|
|
5671
|
+
operation: h.operation
|
|
5674
5672
|
})),
|
|
5675
|
-
points: r.vectorMask.points?.map((
|
|
5676
|
-
x:
|
|
5677
|
-
y:
|
|
5678
|
-
type:
|
|
5673
|
+
points: r.vectorMask.points?.map((h) => ({
|
|
5674
|
+
x: h.x,
|
|
5675
|
+
y: h.y,
|
|
5676
|
+
type: h.type
|
|
5679
5677
|
})),
|
|
5680
5678
|
invert: r.vectorMask.invert,
|
|
5681
5679
|
notLink: r.vectorMask.notLink,
|
|
5682
5680
|
disable: r.vectorMask.disable,
|
|
5683
5681
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5684
5682
|
} : void 0,
|
|
5685
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5686
|
-
type:
|
|
5687
|
-
enabled:
|
|
5688
|
-
filter:
|
|
5689
|
-
puppetShapeList:
|
|
5683
|
+
filterList: r.filterList ? r.filterList.map((h) => ({
|
|
5684
|
+
type: h.type,
|
|
5685
|
+
enabled: h.enabled,
|
|
5686
|
+
filter: h.filter ? {
|
|
5687
|
+
puppetShapeList: h.filter.puppetShapeList?.map((t) => ({
|
|
5690
5688
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5691
5689
|
x: e.x,
|
|
5692
5690
|
y: e.y
|
|
@@ -5703,33 +5701,33 @@ function wx(r) {
|
|
|
5703
5701
|
clipping: r.clipping
|
|
5704
5702
|
};
|
|
5705
5703
|
}
|
|
5706
|
-
function kx(r,
|
|
5707
|
-
const u = ++_x,
|
|
5704
|
+
function kx(r, h, t, e) {
|
|
5705
|
+
const u = ++_x, p = yx(t);
|
|
5708
5706
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5709
|
-
|
|
5707
|
+
vr.set(u, {
|
|
5710
5708
|
resolve: (x) => {
|
|
5711
5709
|
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5712
5710
|
},
|
|
5713
5711
|
reject: B
|
|
5714
5712
|
});
|
|
5715
|
-
const C = wx(
|
|
5716
|
-
|
|
5713
|
+
const C = wx(h);
|
|
5714
|
+
p.postMessage({ id: u, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5717
5715
|
r
|
|
5718
5716
|
]);
|
|
5719
5717
|
});
|
|
5720
5718
|
}
|
|
5721
|
-
async function Sx(r,
|
|
5722
|
-
const m = await it(r, u,
|
|
5719
|
+
async function Sx(r, h, t = 0, e, u, p) {
|
|
5720
|
+
const m = await it(r, u, p);
|
|
5723
5721
|
if (!m || m.width === 0 || m.height === 0)
|
|
5724
5722
|
throw new Error("图片无效:尺寸为 0");
|
|
5725
|
-
return await kx(m,
|
|
5723
|
+
return await kx(m, h, t, e);
|
|
5726
5724
|
}
|
|
5727
|
-
function d0(r,
|
|
5725
|
+
function d0(r, h) {
|
|
5728
5726
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5729
|
-
return new OffscreenCanvas(r,
|
|
5727
|
+
return new OffscreenCanvas(r, h);
|
|
5730
5728
|
if (typeof document < "u") {
|
|
5731
5729
|
const t = document.createElement("canvas");
|
|
5732
|
-
return t.width = r, t.height =
|
|
5730
|
+
return t.width = r, t.height = h, t;
|
|
5733
5731
|
} else
|
|
5734
5732
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5735
5733
|
}
|
|
@@ -5737,13 +5735,13 @@ function A0(r) {
|
|
|
5737
5735
|
return r.getContext("2d");
|
|
5738
5736
|
}
|
|
5739
5737
|
function Fe(r) {
|
|
5740
|
-
const
|
|
5741
|
-
if (!
|
|
5738
|
+
const h = A0(r);
|
|
5739
|
+
if (!h)
|
|
5742
5740
|
throw new Error("无法创建 canvas context");
|
|
5743
|
-
return
|
|
5741
|
+
return h;
|
|
5744
5742
|
}
|
|
5745
5743
|
async function Hx(r) {
|
|
5746
|
-
const
|
|
5744
|
+
const h = performance.now(), t = () => {
|
|
5747
5745
|
try {
|
|
5748
5746
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5749
5747
|
} catch {
|
|
@@ -5754,7 +5752,7 @@ async function Hx(r) {
|
|
|
5754
5752
|
}, u = (...c) => {
|
|
5755
5753
|
t();
|
|
5756
5754
|
}, {
|
|
5757
|
-
psdJson:
|
|
5755
|
+
psdJson: p,
|
|
5758
5756
|
materialList: m,
|
|
5759
5757
|
fabricScreenshotList: B,
|
|
5760
5758
|
width: C,
|
|
@@ -5762,8 +5760,8 @@ async function Hx(r) {
|
|
|
5762
5760
|
baseUrl: n
|
|
5763
5761
|
} = r, E = r.maxImageSize;
|
|
5764
5762
|
e("[renderByJson] 接收到的数据:", {
|
|
5765
|
-
psdJsonLayerCount:
|
|
5766
|
-
psdJsonLayers:
|
|
5763
|
+
psdJsonLayerCount: p.layerList?.length || 0,
|
|
5764
|
+
psdJsonLayers: p.layerList?.map((c) => ({
|
|
5767
5765
|
name: c.name,
|
|
5768
5766
|
type: c.type,
|
|
5769
5767
|
id: c.id,
|
|
@@ -5804,7 +5802,7 @@ async function Hx(r) {
|
|
|
5804
5802
|
const v = /* @__PURE__ */ new Map();
|
|
5805
5803
|
for (const c of B)
|
|
5806
5804
|
v.set(c.id, c.url);
|
|
5807
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(v.entries())), e("[renderByJson] psdJson.layerList 结构:",
|
|
5805
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(v.entries())), e("[renderByJson] psdJson.layerList 结构:", p.layerList?.map((c) => ({
|
|
5808
5806
|
name: c.name,
|
|
5809
5807
|
type: c.type,
|
|
5810
5808
|
id: c.id,
|
|
@@ -5815,28 +5813,28 @@ async function Hx(r) {
|
|
|
5815
5813
|
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5816
5814
|
if (c.type === "Layer") {
|
|
5817
5815
|
if (c.imagePath) {
|
|
5818
|
-
const
|
|
5816
|
+
const W = m.find((P) => {
|
|
5819
5817
|
const L = P.sourceName || P.layerName;
|
|
5820
5818
|
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5821
5819
|
});
|
|
5822
|
-
|
|
5823
|
-
url:
|
|
5820
|
+
W && (s[c.imagePath] = {
|
|
5821
|
+
url: W.url
|
|
5824
5822
|
});
|
|
5825
5823
|
}
|
|
5826
5824
|
if (c.name) {
|
|
5827
5825
|
if (_) {
|
|
5828
|
-
const
|
|
5829
|
-
const
|
|
5830
|
-
return
|
|
5826
|
+
const W = `${_}-${c.name}`, P = m.find((L) => {
|
|
5827
|
+
const I = L.sourceName || L.layerName;
|
|
5828
|
+
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5831
5829
|
});
|
|
5832
|
-
P && (s[
|
|
5830
|
+
P && (s[W] = {
|
|
5833
5831
|
url: P.url
|
|
5834
5832
|
});
|
|
5835
5833
|
}
|
|
5836
5834
|
if (c.imagePath && c.name) {
|
|
5837
|
-
const
|
|
5838
|
-
const
|
|
5839
|
-
return
|
|
5835
|
+
const W = c.imagePath.split("/").pop() || c.imagePath, P = m.find((L) => {
|
|
5836
|
+
const I = L.sourceName || L.layerName;
|
|
5837
|
+
return I ? (I.split("/").pop() || I) === W : !1;
|
|
5840
5838
|
});
|
|
5841
5839
|
P && (s[c.imagePath] = {
|
|
5842
5840
|
url: P.url
|
|
@@ -5845,37 +5843,37 @@ async function Hx(r) {
|
|
|
5845
5843
|
}
|
|
5846
5844
|
}
|
|
5847
5845
|
if (c.children)
|
|
5848
|
-
for (const
|
|
5849
|
-
|
|
5846
|
+
for (const W of c.children)
|
|
5847
|
+
W && l(W, _);
|
|
5850
5848
|
}
|
|
5851
5849
|
function g(c, A) {
|
|
5852
5850
|
const _ = c.id ?? A;
|
|
5853
5851
|
if (c.type === "Group" && _)
|
|
5854
5852
|
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${v.has(_)}`), v.has(_)) {
|
|
5855
|
-
const
|
|
5856
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${
|
|
5853
|
+
const W = v.get(_);
|
|
5854
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${W.substring(0, 50)}...`), c.children) {
|
|
5857
5855
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5858
5856
|
for (const P of c.children)
|
|
5859
5857
|
if (P && P.isSmartObject === !0) {
|
|
5860
5858
|
const L = P?.name || "";
|
|
5861
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5859
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) : u("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5862
5860
|
}
|
|
5863
5861
|
} else
|
|
5864
5862
|
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5865
5863
|
} else
|
|
5866
5864
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5867
5865
|
if (c.children)
|
|
5868
|
-
for (const
|
|
5869
|
-
|
|
5866
|
+
for (const W of c.children)
|
|
5867
|
+
W && g(W, _);
|
|
5870
5868
|
}
|
|
5871
|
-
if (
|
|
5872
|
-
for (const c of
|
|
5869
|
+
if (p.layerList)
|
|
5870
|
+
for (const c of p.layerList)
|
|
5873
5871
|
c && l(c);
|
|
5874
|
-
if (
|
|
5875
|
-
for (const c of
|
|
5872
|
+
if (p.layerList)
|
|
5873
|
+
for (const c of p.layerList)
|
|
5876
5874
|
c && g(c);
|
|
5877
5875
|
const o = Ye([{
|
|
5878
|
-
psdJson:
|
|
5876
|
+
psdJson: p,
|
|
5879
5877
|
layerExtrasByName: s
|
|
5880
5878
|
}], {
|
|
5881
5879
|
parts: [],
|
|
@@ -5893,14 +5891,14 @@ async function Hx(r) {
|
|
|
5893
5891
|
const A = c.url.split("/").pop() || c.url;
|
|
5894
5892
|
if (s[A])
|
|
5895
5893
|
return s[A];
|
|
5896
|
-
const _ = m.find((
|
|
5897
|
-
const P =
|
|
5894
|
+
const _ = m.find((W) => {
|
|
5895
|
+
const P = W.sourceName || W.layerName;
|
|
5898
5896
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5899
5897
|
});
|
|
5900
5898
|
if (_) {
|
|
5901
|
-
const
|
|
5902
|
-
if (
|
|
5903
|
-
return s[
|
|
5899
|
+
const W = _.sourceName || _.layerName;
|
|
5900
|
+
if (W)
|
|
5901
|
+
return s[W] || { url: _.url };
|
|
5904
5902
|
}
|
|
5905
5903
|
}
|
|
5906
5904
|
};
|
|
@@ -5911,7 +5909,7 @@ async function Hx(r) {
|
|
|
5911
5909
|
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5912
5910
|
continue;
|
|
5913
5911
|
}
|
|
5914
|
-
const
|
|
5912
|
+
const W = _.url, P = a(W);
|
|
5915
5913
|
if (!P) {
|
|
5916
5914
|
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5917
5915
|
continue;
|
|
@@ -5925,8 +5923,8 @@ async function Hx(r) {
|
|
|
5925
5923
|
} else if (A.type === F0.Group) {
|
|
5926
5924
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5927
5925
|
continue;
|
|
5928
|
-
for (let
|
|
5929
|
-
const P = A.smartObjects[
|
|
5926
|
+
for (let W = 0; W < A.smartObjects.length; W++) {
|
|
5927
|
+
const P = A.smartObjects[W];
|
|
5930
5928
|
if (!P || !P.name)
|
|
5931
5929
|
continue;
|
|
5932
5930
|
let L = s[P.name] ?? _;
|
|
@@ -5942,25 +5940,25 @@ async function Hx(r) {
|
|
|
5942
5940
|
}
|
|
5943
5941
|
if (!L || !L.designImage && !L.url)
|
|
5944
5942
|
continue;
|
|
5945
|
-
let
|
|
5946
|
-
if (!
|
|
5943
|
+
let I = L.designImage ?? L.url;
|
|
5944
|
+
if (!I)
|
|
5947
5945
|
continue;
|
|
5948
|
-
if (typeof
|
|
5949
|
-
/^(https?:)?\/\//i.test(
|
|
5950
|
-
const G = a(
|
|
5946
|
+
if (typeof I == "string") {
|
|
5947
|
+
/^(https?:)?\/\//i.test(I) || I.startsWith("data:") || I.startsWith("blob:") || (I = f.get(I) ?? I);
|
|
5948
|
+
const G = a(I);
|
|
5951
5949
|
if (!G)
|
|
5952
5950
|
continue;
|
|
5953
|
-
|
|
5951
|
+
I = G;
|
|
5954
5952
|
}
|
|
5955
|
-
const Z = (A.partId ?? A.id) * 100 +
|
|
5953
|
+
const Z = (A.partId ?? A.id) * 100 + W, Q = Qe(Ze(P)), o0 = { width: b, height: D };
|
|
5956
5954
|
R.push({
|
|
5957
|
-
index: c +
|
|
5955
|
+
index: c + W * 0.01,
|
|
5958
5956
|
type: "group",
|
|
5959
5957
|
partData: A,
|
|
5960
5958
|
smartObject: P,
|
|
5961
5959
|
maskData: Q,
|
|
5962
5960
|
promise: Sx(
|
|
5963
|
-
|
|
5961
|
+
I,
|
|
5964
5962
|
P,
|
|
5965
5963
|
Z,
|
|
5966
5964
|
o0,
|
|
@@ -5975,8 +5973,8 @@ async function Hx(r) {
|
|
|
5975
5973
|
task: c,
|
|
5976
5974
|
imageBitmap: w[A]
|
|
5977
5975
|
})).sort((c, A) => {
|
|
5978
|
-
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index,
|
|
5979
|
-
return _ -
|
|
5976
|
+
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, W = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
5977
|
+
return _ - W;
|
|
5980
5978
|
});
|
|
5981
5979
|
let $ = d0(b, D), z = A0($), O = !1, q = "normal";
|
|
5982
5980
|
for (let c = 0; c < H.length; c++) {
|
|
@@ -5985,32 +5983,32 @@ async function Hx(r) {
|
|
|
5985
5983
|
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5986
5984
|
continue;
|
|
5987
5985
|
}
|
|
5988
|
-
const { partData:
|
|
5986
|
+
const { partData: W } = A, P = W.bounds;
|
|
5989
5987
|
let L;
|
|
5990
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
5991
|
-
let
|
|
5992
|
-
A.type === "group" && A.smartObject ?
|
|
5988
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
5989
|
+
let I;
|
|
5990
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? W.clipping === !0 : I = W.clipping === !0;
|
|
5993
5991
|
const Z = H[c + 1];
|
|
5994
5992
|
let Q = !1;
|
|
5995
5993
|
if (Z) {
|
|
5996
5994
|
const K = Z.task.partData;
|
|
5997
5995
|
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
5998
5996
|
}
|
|
5999
|
-
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
5997
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
6000
5998
|
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
6001
5999
|
type: A.type,
|
|
6002
6000
|
bitmapSize: { width: _.width, height: _.height },
|
|
6003
6001
|
bounds: P,
|
|
6004
6002
|
hasMask: !!A.maskData,
|
|
6005
|
-
blendMode:
|
|
6003
|
+
blendMode: W.blendMode,
|
|
6006
6004
|
opacity: L,
|
|
6007
|
-
clipping:
|
|
6008
|
-
}), !
|
|
6009
|
-
if (O = !0, q =
|
|
6005
|
+
clipping: I
|
|
6006
|
+
}), !I && Q) {
|
|
6007
|
+
if (O = !0, q = W.blendMode || "normal", z) {
|
|
6010
6008
|
if (z.clearRect(0, 0, b, D), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6011
6009
|
if (A.maskData) {
|
|
6012
6010
|
const K = d0(b, D), G = A0(K);
|
|
6013
|
-
G && (G.drawImage(_, 0, 0),
|
|
6011
|
+
G && (G.drawImage(_, 0, 0), dr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6014
6012
|
} else
|
|
6015
6013
|
z.drawImage(_, 0, 0);
|
|
6016
6014
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6022,12 +6020,12 @@ async function Hx(r) {
|
|
|
6022
6020
|
) : z.drawImage(_, 0, 0));
|
|
6023
6021
|
z.globalAlpha = 1;
|
|
6024
6022
|
}
|
|
6025
|
-
} else if (
|
|
6023
|
+
} else if (I) {
|
|
6026
6024
|
if (z) {
|
|
6027
6025
|
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6028
6026
|
if (A.maskData) {
|
|
6029
6027
|
const K = d0(b, D), G = A0(K);
|
|
6030
|
-
G && (G.drawImage(_, 0, 0),
|
|
6028
|
+
G && (G.drawImage(_, 0, 0), dr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6031
6029
|
} else
|
|
6032
6030
|
z.drawImage(_, 0, 0);
|
|
6033
6031
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6040,10 +6038,10 @@ async function Hx(r) {
|
|
|
6040
6038
|
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6041
6039
|
}
|
|
6042
6040
|
} else {
|
|
6043
|
-
if (k.globalCompositeOperation =
|
|
6041
|
+
if (k.globalCompositeOperation = Wr(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6044
6042
|
if (A.maskData) {
|
|
6045
6043
|
const K = d0(b, D), G = A0(K);
|
|
6046
|
-
G && (G.drawImage(_, 0, 0),
|
|
6044
|
+
G && (G.drawImage(_, 0, 0), dr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6047
6045
|
} else
|
|
6048
6046
|
k.drawImage(_, 0, 0);
|
|
6049
6047
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6055,7 +6053,7 @@ async function Hx(r) {
|
|
|
6055
6053
|
) : k.drawImage(_, 0, 0));
|
|
6056
6054
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6057
6055
|
}
|
|
6058
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6056
|
+
O && !Q && (k.globalCompositeOperation = Wr(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6059
6057
|
}
|
|
6060
6058
|
$ = null, z = null;
|
|
6061
6059
|
let U = y, T = b, N = D;
|
|
@@ -6073,7 +6071,7 @@ async function Hx(r) {
|
|
|
6073
6071
|
const c = Fe(U);
|
|
6074
6072
|
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}`);
|
|
6075
6073
|
}
|
|
6076
|
-
const S = performance.now() -
|
|
6074
|
+
const S = performance.now() - h;
|
|
6077
6075
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6078
6076
|
canvas: U,
|
|
6079
6077
|
width: T,
|
|
@@ -6085,9 +6083,9 @@ const $x = async (r) => {
|
|
|
6085
6083
|
return t ? createImageBitmap(t) : null;
|
|
6086
6084
|
};
|
|
6087
6085
|
self.onmessage = async (r) => {
|
|
6088
|
-
const
|
|
6089
|
-
if (
|
|
6090
|
-
const e =
|
|
6086
|
+
const h = r.data;
|
|
6087
|
+
if (h && typeof h == "object" && "type" in h && h.type === "SET_LICENSE") {
|
|
6088
|
+
const e = h;
|
|
6091
6089
|
Dx({
|
|
6092
6090
|
token: e.licenseToken,
|
|
6093
6091
|
apiUrl: e.licenseApiUrl,
|
|
@@ -6096,7 +6094,7 @@ self.onmessage = async (r) => {
|
|
|
6096
6094
|
});
|
|
6097
6095
|
return;
|
|
6098
6096
|
}
|
|
6099
|
-
const t =
|
|
6097
|
+
const t = h;
|
|
6100
6098
|
try {
|
|
6101
6099
|
const e = await $x(t.renderData);
|
|
6102
6100
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|