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