@jieyin/editor-sdk-test 1.1.159 → 1.1.160
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 +4262 -4230
- package/dist/renderWorker.js +227 -226
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -6,7 +6,7 @@ function Ze(r) {
|
|
|
6
6
|
return h += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Qe(r, h) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -29,7 +29,7 @@ function Ve(r, h) {
|
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Ve(r, h, t, e) {
|
|
33
33
|
let u = r.name || "", p = h[u], m = p?.partId ?? (r.type === "Group" ? t.get(u) : void 0);
|
|
34
34
|
if (r.type === "Group" && m === void 0 && (!p || p.id === void 0) && r.children && r.children.length === 1) {
|
|
35
35
|
const x = r.children[0].name, n = h[x], E = n?.partId ?? t.get(x);
|
|
@@ -45,7 +45,7 @@ function Qe(r, h, t, e) {
|
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: D0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => Qe(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
@@ -94,7 +94,7 @@ function Je(r, h) {
|
|
|
94
94
|
f.push(v);
|
|
95
95
|
return f;
|
|
96
96
|
}, a = n(B).map(
|
|
97
|
-
(s) =>
|
|
97
|
+
(s) => Ve(s, p, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -126,7 +126,7 @@ function et(r) {
|
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function hr(r, h) {
|
|
130
130
|
if (h) {
|
|
131
131
|
if (r.globalCompositeOperation = "destination-in", r.beginPath(), h.type === "bezier" && Array.isArray(h.paths))
|
|
132
132
|
h.paths.forEach((t) => {
|
|
@@ -209,7 +209,7 @@ class v0 {
|
|
|
209
209
|
return this.hasStorage;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class ur {
|
|
213
213
|
/**
|
|
214
214
|
* 是否在浏览器环境
|
|
215
215
|
*/
|
|
@@ -253,7 +253,7 @@ class h0 {
|
|
|
253
253
|
*/
|
|
254
254
|
static parse(h) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
256
|
+
const t = ur.getOrigin();
|
|
257
257
|
return new URL(h, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
@@ -299,17 +299,17 @@ class h0 {
|
|
|
299
299
|
return h?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
const t0 =
|
|
302
|
+
const t0 = fr;
|
|
303
303
|
(function(r, h) {
|
|
304
|
-
const t =
|
|
304
|
+
const t = fr, e = r();
|
|
305
305
|
for (; ; )
|
|
306
306
|
try {
|
|
307
|
-
if (parseInt(t(
|
|
307
|
+
if (-parseInt(t(129)) / 1 * (parseInt(t(151)) / 2) + -parseInt(t(123)) / 3 * (parseInt(t(130)) / 4) + -parseInt(t(137)) / 5 + -parseInt(t(135)) / 6 * (-parseInt(t(121)) / 7) + parseInt(t(122)) / 8 * (-parseInt(t(148)) / 9) + -parseInt(t(150)) / 10 + parseInt(t(141)) / 11 === h) break;
|
|
308
308
|
e.push(e.shift());
|
|
309
309
|
} catch {
|
|
310
310
|
e.push(e.shift());
|
|
311
311
|
}
|
|
312
|
-
})(cr, -
|
|
312
|
+
})(cr, -139 * 1991 + 1094890 + 53982);
|
|
313
313
|
const A0 = /* @__PURE__ */ (function() {
|
|
314
314
|
let r = !0;
|
|
315
315
|
return function(h, t) {
|
|
@@ -323,92 +323,93 @@ const A0 = /* @__PURE__ */ (function() {
|
|
|
323
323
|
return r = !1, e;
|
|
324
324
|
};
|
|
325
325
|
})(), tt = A0(void 0, function() {
|
|
326
|
-
const r =
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
326
|
+
const r = fr, h = function() {
|
|
327
|
+
const p = fr;
|
|
328
|
+
let m;
|
|
329
|
+
try {
|
|
330
|
+
m = Function("return (function() " + ("{}.co" + p(132) + 'ctor("return this")( )') + ");")();
|
|
331
|
+
} catch {
|
|
332
|
+
m = window;
|
|
333
|
+
}
|
|
334
|
+
return m;
|
|
335
|
+
}, t = h(), e = t.console = t.console || {}, u = ["log", "warn", r(153), "error", "exception", "table", "trace"];
|
|
336
|
+
for (let p = -6561 + -719 * -7 + 1528; p < u.length; p++) {
|
|
337
|
+
const m = A0.constructor[r(128) + r(127)].bind(A0), B = u[p], C = e[B] || m;
|
|
338
|
+
m.__proto__ = A0[r(131)](A0), m.toString = C.toString.bind(C), e[B] = m;
|
|
337
339
|
}
|
|
338
340
|
});
|
|
339
341
|
tt();
|
|
340
|
-
const
|
|
341
|
-
function
|
|
342
|
-
return v0.getItem(
|
|
342
|
+
const Er = t0(143) + "token", Ar = "file_token_expire_time", xt = 60 * (-1861 * 4 + 7012 + 1432);
|
|
343
|
+
function Br() {
|
|
344
|
+
return v0.getItem(Er);
|
|
343
345
|
}
|
|
344
346
|
function nt(r = xt) {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
const h = t0;
|
|
348
|
+
if (!Br()) return !0;
|
|
349
|
+
const e = v0.getItem(Ar);
|
|
350
|
+
if (!e) return !1;
|
|
351
|
+
const u = Number(e);
|
|
352
|
+
return Date[h(139)]() + r > u;
|
|
350
353
|
}
|
|
351
354
|
function at(r, h) {
|
|
352
355
|
const t = t0;
|
|
353
|
-
if (v0.setItem(
|
|
356
|
+
if (v0.setItem(Er, r), typeof h == t(140) + "r" && h > 0) {
|
|
354
357
|
const e = Date.now() + h * 1e3;
|
|
355
|
-
v0
|
|
358
|
+
v0.setItem(Ar, String(e));
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
function ot() {
|
|
359
|
-
|
|
360
|
-
v0.removeItem(Cr), v0["remov" + r(421)](Er);
|
|
362
|
+
v0["remov" + t0(146)](Er), v0.removeItem(Ar);
|
|
361
363
|
}
|
|
362
|
-
async function
|
|
364
|
+
async function Wr(r) {
|
|
363
365
|
const h = t0, t = await r(), e = t?.data?.data;
|
|
364
|
-
return t?.data?.code ===
|
|
366
|
+
return t?.data?.code === -1 * -8089 + -317 * -13 + -10 * 1201 && e?.["file_" + h(124)] ? (at(e.file_token, e.expires_in), e[h(143) + h(124)]) : null;
|
|
365
367
|
}
|
|
366
368
|
let it = null;
|
|
367
369
|
function cr() {
|
|
368
|
-
const r = ["
|
|
370
|
+
const r = ["file_", "FileT", "parse", "eItem", "remov", "3167316CrSBuk", "statu", "306530NnyONj", "2bmczqJ", "ram", "info", "oken", "196rlHcWD", "24nbzDju", "9yYnmnJ", "token", "pathn", "wser", "type", "proto", "416089XFkiJC", "1155524nzebBO", "bind", "nstru", "inclu", "isDat", "178698acMxqO", "des", "81925NIjlmQ", "aUrl", "now", "numbe", "26661151qXzcfw", "fileT"];
|
|
369
371
|
return cr = function() {
|
|
370
372
|
return r;
|
|
371
373
|
}, cr();
|
|
372
374
|
}
|
|
373
375
|
function Ir() {
|
|
374
|
-
return
|
|
376
|
+
return ur.isBrowser() ? it : null;
|
|
375
377
|
}
|
|
376
378
|
async function be() {
|
|
377
379
|
const r = t0;
|
|
378
|
-
if (!
|
|
379
|
-
const h =
|
|
380
|
+
if (!ur.isBrowser()) return Br();
|
|
381
|
+
const h = Br();
|
|
380
382
|
if (h && !nt()) return h;
|
|
381
383
|
try {
|
|
382
384
|
const t = await Ir();
|
|
383
|
-
if (h && t?.["fetch" + r(
|
|
384
|
-
const e = await
|
|
385
|
+
if (h && t?.["fetch" + r(144) + "okenRefresh"]) {
|
|
386
|
+
const e = await Wr(t.fetchFileTokenRefresh);
|
|
385
387
|
if (e) return e;
|
|
386
388
|
}
|
|
387
389
|
} catch {
|
|
388
390
|
}
|
|
389
391
|
try {
|
|
390
392
|
const t = Ir();
|
|
391
|
-
return t?.[
|
|
393
|
+
return t?.["fetchFileToken"] ? await Wr(t["fetch" + r(144) + r(154)]) : null;
|
|
392
394
|
} catch {
|
|
393
395
|
return null;
|
|
394
396
|
}
|
|
395
397
|
}
|
|
396
398
|
function me(r) {
|
|
397
399
|
const h = t0;
|
|
398
|
-
if (!r || h0[h(
|
|
399
|
-
const t = h0
|
|
400
|
-
return t ? t["
|
|
400
|
+
if (!r || h0[h(134) + h(138)](r) || h0.isBlobUrl(r)) return !1;
|
|
401
|
+
const t = h0[h(145)](r);
|
|
402
|
+
return t ? t[h(125) + "ame"][h(133) + h(136)]("/files/") && !h0["hasPa" + h(152)](r, "fileToken") : r.includes("/files/") && !r.includes("fileToken=");
|
|
403
|
+
}
|
|
404
|
+
function fr(r, h) {
|
|
405
|
+
return r = r - (-2 * 4017 + 1818 + 1 * 6337), cr()[r];
|
|
401
406
|
}
|
|
402
407
|
function _e(r, h) {
|
|
403
408
|
const t = t0;
|
|
404
|
-
return !h || !me(r) ? r : h0
|
|
405
|
-
}
|
|
406
|
-
function Ar(r, h) {
|
|
407
|
-
return r = r - (-4596 + -1 * -1733 + 3264), cr()[r];
|
|
409
|
+
return !h || !me(r) ? r : h0["addPa" + t(152)](r, t(142) + t(154), h);
|
|
408
410
|
}
|
|
409
411
|
function st(r) {
|
|
410
|
-
|
|
411
|
-
return h0[h(432) + "eParam"](r, h(417) + "oken");
|
|
412
|
+
return h0[t0(147) + "eParam"](r, "fileToken");
|
|
412
413
|
}
|
|
413
414
|
async function ct(r) {
|
|
414
415
|
if (!me(r)) return r;
|
|
@@ -417,9 +418,9 @@ async function ct(r) {
|
|
|
417
418
|
}
|
|
418
419
|
async function ye(r, h) {
|
|
419
420
|
const t = t0;
|
|
420
|
-
if (!
|
|
421
|
+
if (!ur["isBro" + t(126)]()) return fetch(r, h);
|
|
421
422
|
const e = st(r), u = await ct(e), p = await fetch(u, h);
|
|
422
|
-
if (p[t(
|
|
423
|
+
if (p[t(149) + "s"] !== -479 * -4 + -1 * 1879 + 364) return p;
|
|
423
424
|
ot();
|
|
424
425
|
const m = await be(), B = _e(e, m);
|
|
425
426
|
return fetch(B, h);
|
|
@@ -550,7 +551,7 @@ function Lr(r) {
|
|
|
550
551
|
"pass-through": "source-over"
|
|
551
552
|
}[h] || "source-over";
|
|
552
553
|
}
|
|
553
|
-
var
|
|
554
|
+
var vr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
554
555
|
function lt(r) {
|
|
555
556
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
556
557
|
var h = r.default;
|
|
@@ -590,7 +591,7 @@ function M() {
|
|
|
590
591
|
})(Ct, function() {
|
|
591
592
|
var t = t || (function(e, u) {
|
|
592
593
|
var p;
|
|
593
|
-
if (typeof window < "u" && window.crypto && (p = window.crypto), typeof self < "u" && self.crypto && (p = self.crypto), typeof globalThis < "u" && globalThis.crypto && (p = globalThis.crypto), !p && typeof window < "u" && window.msCrypto && (p = window.msCrypto), !p && typeof
|
|
594
|
+
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 vr < "u" && vr.crypto && (p = vr.crypto), !p && typeof ht == "function")
|
|
594
595
|
try {
|
|
595
596
|
p = Bt;
|
|
596
597
|
} catch {
|
|
@@ -1084,7 +1085,7 @@ function M() {
|
|
|
1084
1085
|
})(w0)), w0.exports;
|
|
1085
1086
|
}
|
|
1086
1087
|
var k0 = { exports: {} }, Et = k0.exports, qr;
|
|
1087
|
-
function
|
|
1088
|
+
function dr() {
|
|
1088
1089
|
return qr || (qr = 1, (function(r, h) {
|
|
1089
1090
|
(function(t, e) {
|
|
1090
1091
|
r.exports = e(M());
|
|
@@ -1612,8 +1613,8 @@ function c0() {
|
|
|
1612
1613
|
var i = l + g, o = v[i];
|
|
1613
1614
|
v[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1614
1615
|
}
|
|
1615
|
-
var d = this._hash.words, b = v[l + 0], D = v[l + 1], y = v[l + 2], k = v[l + 3], R = v[l + 4], F = v[l + 5], w = v[l + 6], H = v[l + 7], $ = v[l + 8],
|
|
1616
|
-
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, D, 12, x[1]), A = E(A, _, S, c, y, 17, x[2]), c = E(c, A, _, S, k, 22, x[3]), S = E(S, c, A, _, R, 7, x[4]), _ = E(_, S, c, A, F, 12, x[5]), A = E(A, _, S, c, w, 17, x[6]), c = E(c, A, _, S, H, 22, x[7]), S = E(S, c, A, _, $, 7, x[8]), _ = E(_, S, c, A,
|
|
1616
|
+
var d = this._hash.words, b = v[l + 0], D = v[l + 1], y = v[l + 2], k = v[l + 3], R = v[l + 4], F = v[l + 5], w = v[l + 6], H = v[l + 7], $ = v[l + 8], z = v[l + 9], O = v[l + 10], q = v[l + 11], U = v[l + 12], T = v[l + 13], N = v[l + 14], j = v[l + 15], S = d[0], c = d[1], A = d[2], _ = d[3];
|
|
1617
|
+
S = E(S, c, A, _, b, 7, x[0]), _ = E(_, S, c, A, D, 12, x[1]), A = E(A, _, S, c, y, 17, x[2]), c = E(c, A, _, S, k, 22, x[3]), S = E(S, c, A, _, R, 7, x[4]), _ = E(_, S, c, A, F, 12, x[5]), A = E(A, _, S, c, w, 17, x[6]), c = E(c, A, _, S, H, 22, x[7]), S = E(S, c, A, _, $, 7, x[8]), _ = E(_, S, c, A, z, 12, x[9]), A = E(A, _, S, c, O, 17, x[10]), c = E(c, A, _, S, q, 22, x[11]), S = E(S, c, A, _, U, 7, x[12]), _ = E(_, S, c, A, T, 12, x[13]), A = E(A, _, S, c, N, 17, x[14]), c = E(c, A, _, S, j, 22, x[15]), S = a(S, c, A, _, D, 5, x[16]), _ = a(_, S, c, A, w, 9, x[17]), A = a(A, _, S, c, q, 14, x[18]), c = a(c, A, _, S, b, 20, x[19]), S = a(S, c, A, _, F, 5, x[20]), _ = a(_, S, c, A, O, 9, x[21]), A = a(A, _, S, c, j, 14, x[22]), c = a(c, A, _, S, R, 20, x[23]), S = a(S, c, A, _, z, 5, x[24]), _ = a(_, S, c, A, N, 9, x[25]), A = a(A, _, S, c, k, 14, x[26]), c = a(c, A, _, S, $, 20, x[27]), S = a(S, c, A, _, T, 5, x[28]), _ = a(_, S, c, A, y, 9, x[29]), A = a(A, _, S, c, H, 14, x[30]), c = a(c, A, _, S, U, 20, x[31]), S = s(S, c, A, _, F, 4, x[32]), _ = s(_, S, c, A, $, 11, x[33]), A = s(A, _, S, c, q, 16, x[34]), c = s(c, A, _, S, N, 23, x[35]), S = s(S, c, A, _, D, 4, x[36]), _ = s(_, S, c, A, R, 11, x[37]), A = s(A, _, S, c, H, 16, x[38]), c = s(c, A, _, S, O, 23, x[39]), S = s(S, c, A, _, T, 4, x[40]), _ = s(_, S, c, A, b, 11, x[41]), A = s(A, _, S, c, k, 16, x[42]), c = s(c, A, _, S, w, 23, x[43]), S = s(S, c, A, _, z, 4, x[44]), _ = s(_, S, c, A, U, 11, x[45]), A = s(A, _, S, c, j, 16, x[46]), c = s(c, A, _, S, y, 23, x[47]), S = f(S, c, A, _, b, 6, x[48]), _ = f(_, S, c, A, H, 10, x[49]), A = f(A, _, S, c, N, 15, x[50]), c = f(c, A, _, S, F, 21, x[51]), S = f(S, c, A, _, U, 6, x[52]), _ = f(_, S, c, A, k, 10, x[53]), A = f(A, _, S, c, O, 15, x[54]), c = f(c, A, _, S, D, 21, x[55]), S = f(S, c, A, _, $, 6, x[56]), _ = f(_, S, c, A, j, 10, x[57]), A = f(A, _, S, c, w, 15, x[58]), c = f(c, A, _, S, T, 21, x[59]), S = f(S, c, A, _, R, 6, x[60]), _ = f(_, S, c, A, q, 10, x[61]), A = f(A, _, S, c, y, 15, x[62]), c = f(c, A, _, S, z, 21, x[63]), d[0] = d[0] + S | 0, d[1] = d[1] + c | 0, d[2] = d[2] + A | 0, d[3] = d[3] + _ | 0;
|
|
1617
1618
|
},
|
|
1618
1619
|
_doFinalize: function() {
|
|
1619
1620
|
var v = this._data, l = v.words, g = this._nDataBytes * 8, i = v.sigBytes * 8;
|
|
@@ -1652,7 +1653,7 @@ function c0() {
|
|
|
1652
1653
|
});
|
|
1653
1654
|
})(P0)), P0.exports;
|
|
1654
1655
|
}
|
|
1655
|
-
var
|
|
1656
|
+
var z0 = { exports: {} }, wt = z0.exports, Gr;
|
|
1656
1657
|
function ke() {
|
|
1657
1658
|
return Gr || (Gr = 1, (function(r, h) {
|
|
1658
1659
|
(function(t, e) {
|
|
@@ -1694,11 +1695,11 @@ function ke() {
|
|
|
1694
1695
|
e.SHA1 = m._createHelper(x), e.HmacSHA1 = m._createHmacHelper(x);
|
|
1695
1696
|
})(), t.SHA1;
|
|
1696
1697
|
});
|
|
1697
|
-
})(
|
|
1698
|
+
})(z0)), z0.exports;
|
|
1698
1699
|
}
|
|
1699
|
-
var
|
|
1700
|
+
var W0 = { exports: {} }, kt = W0.exports, Xr;
|
|
1700
1701
|
function Fr() {
|
|
1701
|
-
return
|
|
1702
|
+
return Xr || (Xr = 1, (function(r, h) {
|
|
1702
1703
|
(function(t, e) {
|
|
1703
1704
|
r.exports = e(M());
|
|
1704
1705
|
})(kt, function(t) {
|
|
@@ -1729,7 +1730,7 @@ function Fr() {
|
|
|
1729
1730
|
var R = E[k - 15], F = (R << 25 | R >>> 7) ^ (R << 14 | R >>> 18) ^ R >>> 3, w = E[k - 2], H = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
|
|
1730
1731
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1731
1732
|
}
|
|
1732
|
-
var $ = d & b ^ ~d & D,
|
|
1733
|
+
var $ = d & b ^ ~d & D, z = l & g ^ l & i ^ g & i, O = (l << 30 | l >>> 2) ^ (l << 19 | l >>> 13) ^ (l << 10 | l >>> 22), q = (d << 26 | d >>> 6) ^ (d << 21 | d >>> 11) ^ (d << 7 | d >>> 25), U = y + q + $ + n[k] + E[k], T = O + z;
|
|
1733
1734
|
y = D, D = b, b = d, d = o + U | 0, o = i, i = g, g = l, l = U + T | 0;
|
|
1734
1735
|
}
|
|
1735
1736
|
v[0] = v[0] + l | 0, v[1] = v[1] + g | 0, v[2] = v[2] + i | 0, v[3] = v[3] + o | 0, v[4] = v[4] + d | 0, v[5] = v[5] + b | 0, v[6] = v[6] + D | 0, v[7] = v[7] + y | 0;
|
|
@@ -1746,11 +1747,11 @@ function Fr() {
|
|
|
1746
1747
|
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1747
1748
|
})(Math), t.SHA256;
|
|
1748
1749
|
});
|
|
1749
|
-
})(
|
|
1750
|
+
})(W0)), W0.exports;
|
|
1750
1751
|
}
|
|
1751
|
-
var I0 = { exports: {} }, St = I0.exports,
|
|
1752
|
+
var I0 = { exports: {} }, St = I0.exports, Kr;
|
|
1752
1753
|
function Ht() {
|
|
1753
|
-
return
|
|
1754
|
+
return Kr || (Kr = 1, (function(r, h) {
|
|
1754
1755
|
(function(t, e, u) {
|
|
1755
1756
|
r.exports = e(M(), Fr());
|
|
1756
1757
|
})(St, function(t) {
|
|
@@ -1782,7 +1783,7 @@ var L0 = { exports: {} }, $t = L0.exports, Yr;
|
|
|
1782
1783
|
function Se() {
|
|
1783
1784
|
return Yr || (Yr = 1, (function(r, h) {
|
|
1784
1785
|
(function(t, e, u) {
|
|
1785
|
-
r.exports = e(M(),
|
|
1786
|
+
r.exports = e(M(), dr());
|
|
1786
1787
|
})($t, function(t) {
|
|
1787
1788
|
return (function() {
|
|
1788
1789
|
var e = t, u = e.lib, p = u.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
@@ -1889,7 +1890,7 @@ function Se() {
|
|
|
1889
1890
|
]);
|
|
1890
1891
|
},
|
|
1891
1892
|
_doProcessBlock: function(f, v) {
|
|
1892
|
-
for (var l = this._hash.words, g = l[0], i = l[1], o = l[2], d = l[3], b = l[4], D = l[5], y = l[6], k = l[7], R = g.high, F = g.low, w = i.high, H = i.low, $ = o.high,
|
|
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, W = R, P = F, L = w, I = H, Z = $, Q = z, o0 = O, X = q, G = U, Y = T, r0 = N, f0 = j, g0 = S, p0 = c, lr = A, B0 = _, e0 = 0; e0 < 80; e0++) {
|
|
1893
1894
|
var J, x0, b0 = a[e0];
|
|
1894
1895
|
if (e0 < 16)
|
|
1895
1896
|
x0 = b0.high = f[v + e0 * 2] | 0, J = b0.low = f[v + e0 * 2 + 1] | 0;
|
|
@@ -1897,10 +1898,10 @@ function Se() {
|
|
|
1897
1898
|
var br = a[e0 - 15], u0 = br.high, C0 = br.low, Ie = (u0 >>> 1 | C0 << 31) ^ (u0 >>> 8 | C0 << 24) ^ u0 >>> 7, mr = (C0 >>> 1 | u0 << 31) ^ (C0 >>> 8 | u0 << 24) ^ (C0 >>> 7 | u0 << 25), _r = a[e0 - 2], d0 = _r.high, E0 = _r.low, Le = (d0 >>> 19 | E0 << 13) ^ (d0 << 3 | E0 >>> 29) ^ d0 >>> 6, yr = (E0 >>> 19 | d0 << 13) ^ (E0 << 3 | d0 >>> 29) ^ (E0 >>> 6 | d0 << 26), wr = a[e0 - 7], Oe = wr.high, qe = wr.low, kr = a[e0 - 16], Te = kr.high, Sr = kr.low;
|
|
1898
1899
|
J = mr + qe, x0 = Ie + Oe + (J >>> 0 < mr >>> 0 ? 1 : 0), J = J + yr, x0 = x0 + Le + (J >>> 0 < yr >>> 0 ? 1 : 0), J = J + Sr, x0 = x0 + Te + (J >>> 0 < Sr >>> 0 ? 1 : 0), b0.high = x0, b0.low = J;
|
|
1899
1900
|
}
|
|
1900
|
-
var Me = G & r0 ^ ~G & g0, Hr = Y & f0 ^ ~Y & p0, Ne =
|
|
1901
|
-
|
|
1901
|
+
var Me = G & r0 ^ ~G & g0, Hr = Y & f0 ^ ~Y & p0, Ne = W & L ^ W & Z ^ L & Z, Ue = P & I ^ P & Q ^ I & Q, je = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), $r = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Ge = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Xe = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Rr = E[e0], Ke = Rr.high, Pr = Rr.low, V = B0 + Xe, n0 = lr + Ge + (V >>> 0 < B0 >>> 0 ? 1 : 0), V = V + Hr, n0 = n0 + Me + (V >>> 0 < Hr >>> 0 ? 1 : 0), V = V + Pr, n0 = n0 + Ke + (V >>> 0 < Pr >>> 0 ? 1 : 0), V = V + J, n0 = n0 + x0 + (V >>> 0 < J >>> 0 ? 1 : 0), zr = $r + Ue, Ye = je + Ne + (zr >>> 0 < $r >>> 0 ? 1 : 0);
|
|
1902
|
+
lr = g0, B0 = p0, g0 = r0, p0 = f0, r0 = G, f0 = Y, Y = X + V | 0, G = o0 + n0 + (Y >>> 0 < X >>> 0 ? 1 : 0) | 0, o0 = Z, X = Q, Z = L, Q = I, L = W, I = P, P = V + zr | 0, W = n0 + Ye + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1902
1903
|
}
|
|
1903
|
-
F = g.low = F + P, g.high = R +
|
|
1904
|
+
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 + X, d.high = O + o0 + (q >>> 0 < X >>> 0 ? 1 : 0), T = b.low = T + Y, b.high = U + G + (T >>> 0 < Y >>> 0 ? 1 : 0), j = D.low = j + f0, D.high = N + r0 + (j >>> 0 < f0 >>> 0 ? 1 : 0), c = y.low = c + p0, y.high = S + g0 + (c >>> 0 < p0 >>> 0 ? 1 : 0), _ = k.low = _ + B0, k.high = A + lr + (_ >>> 0 < B0 >>> 0 ? 1 : 0);
|
|
1904
1905
|
},
|
|
1905
1906
|
_doFinalize: function() {
|
|
1906
1907
|
var f = this._data, v = f.words, l = this._nDataBytes * 8, g = f.sigBytes * 8;
|
|
@@ -1923,7 +1924,7 @@ var O0 = { exports: {} }, Rt = O0.exports, Zr;
|
|
|
1923
1924
|
function Pt() {
|
|
1924
1925
|
return Zr || (Zr = 1, (function(r, h) {
|
|
1925
1926
|
(function(t, e, u) {
|
|
1926
|
-
r.exports = e(M(),
|
|
1927
|
+
r.exports = e(M(), dr(), Se());
|
|
1927
1928
|
})(Rt, function(t) {
|
|
1928
1929
|
return (function() {
|
|
1929
1930
|
var e = t, u = e.x64, p = u.Word, m = u.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
@@ -1949,12 +1950,12 @@ function Pt() {
|
|
|
1949
1950
|
});
|
|
1950
1951
|
})(O0)), O0.exports;
|
|
1951
1952
|
}
|
|
1952
|
-
var q0 = { exports: {} },
|
|
1953
|
-
function
|
|
1954
|
-
return
|
|
1953
|
+
var q0 = { exports: {} }, zt = q0.exports, Qr;
|
|
1954
|
+
function Wt() {
|
|
1955
|
+
return Qr || (Qr = 1, (function(r, h) {
|
|
1955
1956
|
(function(t, e, u) {
|
|
1956
|
-
r.exports = e(M(),
|
|
1957
|
-
})(
|
|
1957
|
+
r.exports = e(M(), dr());
|
|
1958
|
+
})(zt, function(t) {
|
|
1958
1959
|
return (function(e) {
|
|
1959
1960
|
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
1960
1961
|
(function() {
|
|
@@ -2016,7 +2017,7 @@ function zt() {
|
|
|
2016
2017
|
$.high = F, $.low = w;
|
|
2017
2018
|
}
|
|
2018
2019
|
for (var R = 0; R < 5; R++)
|
|
2019
|
-
for (var
|
|
2020
|
+
for (var z = f[(R + 4) % 5], O = f[(R + 1) % 5], q = O.high, U = O.low, F = z.high ^ (q << 1 | U >>> 31), w = z.low ^ (U << 1 | q >>> 31), H = 0; H < 5; H++) {
|
|
2020
2021
|
var y = i[R + 5 * H];
|
|
2021
2022
|
y.high ^= F, y.low ^= w;
|
|
2022
2023
|
}
|
|
@@ -2030,8 +2031,8 @@ function zt() {
|
|
|
2030
2031
|
A.high = _.high, A.low = _.low;
|
|
2031
2032
|
for (var R = 0; R < 5; R++)
|
|
2032
2033
|
for (var H = 0; H < 5; H++) {
|
|
2033
|
-
var T = R + 5 * H, y = i[T],
|
|
2034
|
-
y.high =
|
|
2034
|
+
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];
|
|
2035
|
+
y.high = W.high ^ ~P.high & L.high, y.low = W.low ^ ~P.low & L.low;
|
|
2035
2036
|
}
|
|
2036
2037
|
var y = i[0], I = s[k];
|
|
2037
2038
|
y.high ^= I.high, y.low ^= I.low;
|
|
@@ -2059,9 +2060,9 @@ function zt() {
|
|
|
2059
2060
|
});
|
|
2060
2061
|
})(q0)), q0.exports;
|
|
2061
2062
|
}
|
|
2062
|
-
var T0 = { exports: {} }, It = T0.exports,
|
|
2063
|
+
var T0 = { exports: {} }, It = T0.exports, Vr;
|
|
2063
2064
|
function Lt() {
|
|
2064
|
-
return
|
|
2065
|
+
return Vr || (Vr = 1, (function(r, h) {
|
|
2065
2066
|
(function(t, e) {
|
|
2066
2067
|
r.exports = e(M());
|
|
2067
2068
|
})(It, function(t) {
|
|
@@ -2399,11 +2400,11 @@ function Lt() {
|
|
|
2399
2400
|
var R = y + k, F = D[R];
|
|
2400
2401
|
D[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2401
2402
|
}
|
|
2402
|
-
var w = this._hash.words, H = s.words, $ = f.words,
|
|
2403
|
-
A = T = w[0], _ = N = w[1],
|
|
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, _, W, P, L;
|
|
2404
|
+
A = T = w[0], _ = N = w[1], W = j = w[2], P = S = w[3], L = c = w[4];
|
|
2404
2405
|
for (var I, k = 0; k < 80; k += 1)
|
|
2405
|
-
I = T + D[y +
|
|
2406
|
-
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + _ | 0, w[4] = w[0] + N +
|
|
2406
|
+
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;
|
|
2407
|
+
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;
|
|
2407
2408
|
},
|
|
2408
2409
|
_doFinalize: function() {
|
|
2409
2410
|
var D = this._data, y = D.words, k = this._nDataBytes * 8, R = D.sigBytes * 8;
|
|
@@ -2651,7 +2652,7 @@ function a0() {
|
|
|
2651
2652
|
})(U0)), U0.exports;
|
|
2652
2653
|
}
|
|
2653
2654
|
var j0 = { exports: {} }, Nt = j0.exports, te;
|
|
2654
|
-
function
|
|
2655
|
+
function K() {
|
|
2655
2656
|
return te || (te = 1, (function(r, h) {
|
|
2656
2657
|
(function(t, e, u) {
|
|
2657
2658
|
r.exports = e(M(), a0());
|
|
@@ -2781,11 +2782,11 @@ function X() {
|
|
|
2781
2782
|
}
|
|
2782
2783
|
return function(w) {
|
|
2783
2784
|
return {
|
|
2784
|
-
encrypt: function(H, $,
|
|
2785
|
-
return F($).encrypt(w, H, $,
|
|
2785
|
+
encrypt: function(H, $, z) {
|
|
2786
|
+
return F($).encrypt(w, H, $, z);
|
|
2786
2787
|
},
|
|
2787
|
-
decrypt: function(H, $,
|
|
2788
|
-
return F($).decrypt(w, H, $,
|
|
2788
|
+
decrypt: function(H, $, z) {
|
|
2789
|
+
return F($).decrypt(w, H, $, z);
|
|
2789
2790
|
}
|
|
2790
2791
|
};
|
|
2791
2792
|
};
|
|
@@ -2856,8 +2857,8 @@ function X() {
|
|
|
2856
2857
|
* mode.processBlock(data.words, offset);
|
|
2857
2858
|
*/
|
|
2858
2859
|
processBlock: function(H, $) {
|
|
2859
|
-
var
|
|
2860
|
-
w.call(this, H, $, O),
|
|
2860
|
+
var z = this._cipher, O = z.blockSize;
|
|
2861
|
+
w.call(this, H, $, O), z.encryptBlock(H, $), this._prevBlock = H.slice($, $ + O);
|
|
2861
2862
|
}
|
|
2862
2863
|
}), F.Decryptor = F.extend({
|
|
2863
2864
|
/**
|
|
@@ -2871,14 +2872,14 @@ function X() {
|
|
|
2871
2872
|
* mode.processBlock(data.words, offset);
|
|
2872
2873
|
*/
|
|
2873
2874
|
processBlock: function(H, $) {
|
|
2874
|
-
var
|
|
2875
|
-
|
|
2875
|
+
var z = this._cipher, O = z.blockSize, q = H.slice($, $ + O);
|
|
2876
|
+
z.decryptBlock(H, $), w.call(this, H, $, O), this._prevBlock = q;
|
|
2876
2877
|
}
|
|
2877
2878
|
});
|
|
2878
|
-
function w(H, $,
|
|
2879
|
+
function w(H, $, z) {
|
|
2879
2880
|
var O, q = this._iv;
|
|
2880
2881
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2881
|
-
for (var U = 0; U <
|
|
2882
|
+
for (var U = 0; U < z; U++)
|
|
2882
2883
|
H[$ + U] ^= O[U];
|
|
2883
2884
|
}
|
|
2884
2885
|
return F;
|
|
@@ -2896,8 +2897,8 @@ function X() {
|
|
|
2896
2897
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2897
2898
|
*/
|
|
2898
2899
|
pad: function(F, w) {
|
|
2899
|
-
for (var H = w * 4, $ = H - F.sigBytes % H,
|
|
2900
|
-
O.push(
|
|
2900
|
+
for (var H = w * 4, $ = H - F.sigBytes % H, z = $ << 24 | $ << 16 | $ << 8 | $, O = [], q = 0; q < $; q += 4)
|
|
2901
|
+
O.push(z);
|
|
2901
2902
|
var U = B.create(O, $);
|
|
2902
2903
|
F.concat(U);
|
|
2903
2904
|
},
|
|
@@ -3048,7 +3049,7 @@ function X() {
|
|
|
3048
3049
|
*/
|
|
3049
3050
|
encrypt: function(F, w, H, $) {
|
|
3050
3051
|
$ = this.cfg.extend($);
|
|
3051
|
-
var
|
|
3052
|
+
var z = F.createEncryptor(H, $), O = z.finalize(w), q = z.cfg;
|
|
3052
3053
|
return o.create({
|
|
3053
3054
|
ciphertext: O,
|
|
3054
3055
|
key: H,
|
|
@@ -3079,8 +3080,8 @@ function X() {
|
|
|
3079
3080
|
*/
|
|
3080
3081
|
decrypt: function(F, w, H, $) {
|
|
3081
3082
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3082
|
-
var
|
|
3083
|
-
return
|
|
3083
|
+
var z = F.createDecryptor(H, $).finalize(w.ciphertext);
|
|
3084
|
+
return z;
|
|
3084
3085
|
},
|
|
3085
3086
|
/**
|
|
3086
3087
|
* Converts serialized ciphertext to CipherParams,
|
|
@@ -3118,9 +3119,9 @@ function X() {
|
|
|
3118
3119
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3119
3120
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3120
3121
|
*/
|
|
3121
|
-
execute: function(F, w, H, $,
|
|
3122
|
-
if ($ || ($ = B.random(64 / 8)),
|
|
3123
|
-
var O = a.create({ keySize: w + H, hasher:
|
|
3122
|
+
execute: function(F, w, H, $, z) {
|
|
3123
|
+
if ($ || ($ = B.random(64 / 8)), z)
|
|
3124
|
+
var O = a.create({ keySize: w + H, hasher: z }).compute(F, $);
|
|
3124
3125
|
else
|
|
3125
3126
|
var O = a.create({ keySize: w + H }).compute(F, $);
|
|
3126
3127
|
var q = B.create(O.words.slice(w), H * 4);
|
|
@@ -3154,10 +3155,10 @@ function X() {
|
|
|
3154
3155
|
*/
|
|
3155
3156
|
encrypt: function(F, w, H, $) {
|
|
3156
3157
|
$ = this.cfg.extend($);
|
|
3157
|
-
var
|
|
3158
|
-
$.iv =
|
|
3159
|
-
var O = D.encrypt.call(this, F, w,
|
|
3160
|
-
return O.mixIn(
|
|
3158
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, $.salt, $.hasher);
|
|
3159
|
+
$.iv = z.iv;
|
|
3160
|
+
var O = D.encrypt.call(this, F, w, z.key, $);
|
|
3161
|
+
return O.mixIn(z), O;
|
|
3161
3162
|
},
|
|
3162
3163
|
/**
|
|
3163
3164
|
* Decrypts serialized ciphertext using a password.
|
|
@@ -3178,9 +3179,9 @@ function X() {
|
|
|
3178
3179
|
*/
|
|
3179
3180
|
decrypt: function(F, w, H, $) {
|
|
3180
3181
|
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3181
|
-
var
|
|
3182
|
-
$.iv =
|
|
3183
|
-
var O = D.decrypt.call(this, F, w,
|
|
3182
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, w.salt, $.hasher);
|
|
3183
|
+
$.iv = z.iv;
|
|
3184
|
+
var O = D.decrypt.call(this, F, w, z.key, $);
|
|
3184
3185
|
return O;
|
|
3185
3186
|
}
|
|
3186
3187
|
});
|
|
@@ -3192,7 +3193,7 @@ var G0 = { exports: {} }, Ut = G0.exports, xe;
|
|
|
3192
3193
|
function jt() {
|
|
3193
3194
|
return xe || (xe = 1, (function(r, h) {
|
|
3194
3195
|
(function(t, e, u) {
|
|
3195
|
-
r.exports = e(M(),
|
|
3196
|
+
r.exports = e(M(), K());
|
|
3196
3197
|
})(Ut, function(t) {
|
|
3197
3198
|
return t.mode.CFB = (function() {
|
|
3198
3199
|
var e = t.lib.BlockCipherMode.extend();
|
|
@@ -3218,11 +3219,11 @@ function jt() {
|
|
|
3218
3219
|
});
|
|
3219
3220
|
})(G0)), G0.exports;
|
|
3220
3221
|
}
|
|
3221
|
-
var
|
|
3222
|
-
function
|
|
3222
|
+
var X0 = { exports: {} }, Gt = X0.exports, ne;
|
|
3223
|
+
function Xt() {
|
|
3223
3224
|
return ne || (ne = 1, (function(r, h) {
|
|
3224
3225
|
(function(t, e, u) {
|
|
3225
|
-
r.exports = e(M(),
|
|
3226
|
+
r.exports = e(M(), K());
|
|
3226
3227
|
})(Gt, function(t) {
|
|
3227
3228
|
return t.mode.CTR = (function() {
|
|
3228
3229
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
@@ -3238,14 +3239,14 @@ function Kt() {
|
|
|
3238
3239
|
return e.Decryptor = u, e;
|
|
3239
3240
|
})(), t.mode.CTR;
|
|
3240
3241
|
});
|
|
3241
|
-
})(
|
|
3242
|
+
})(X0)), X0.exports;
|
|
3242
3243
|
}
|
|
3243
|
-
var
|
|
3244
|
+
var K0 = { exports: {} }, Kt = K0.exports, ae;
|
|
3244
3245
|
function Yt() {
|
|
3245
3246
|
return ae || (ae = 1, (function(r, h) {
|
|
3246
3247
|
(function(t, e, u) {
|
|
3247
|
-
r.exports = e(M(),
|
|
3248
|
-
})(
|
|
3248
|
+
r.exports = e(M(), K());
|
|
3249
|
+
})(Kt, function(t) {
|
|
3249
3250
|
return t.mode.CTRGladman = (function() {
|
|
3250
3251
|
var e = t.lib.BlockCipherMode.extend();
|
|
3251
3252
|
function u(B) {
|
|
@@ -3272,13 +3273,13 @@ function Yt() {
|
|
|
3272
3273
|
return e.Decryptor = m, e;
|
|
3273
3274
|
})(), t.mode.CTRGladman;
|
|
3274
3275
|
});
|
|
3275
|
-
})(
|
|
3276
|
+
})(K0)), K0.exports;
|
|
3276
3277
|
}
|
|
3277
3278
|
var Y0 = { exports: {} }, Zt = Y0.exports, oe;
|
|
3278
|
-
function
|
|
3279
|
+
function Qt() {
|
|
3279
3280
|
return oe || (oe = 1, (function(r, h) {
|
|
3280
3281
|
(function(t, e, u) {
|
|
3281
|
-
r.exports = e(M(),
|
|
3282
|
+
r.exports = e(M(), K());
|
|
3282
3283
|
})(Zt, function(t) {
|
|
3283
3284
|
return t.mode.OFB = (function() {
|
|
3284
3285
|
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
@@ -3294,12 +3295,12 @@ function Vt() {
|
|
|
3294
3295
|
});
|
|
3295
3296
|
})(Y0)), Y0.exports;
|
|
3296
3297
|
}
|
|
3297
|
-
var Z0 = { exports: {} },
|
|
3298
|
+
var Z0 = { exports: {} }, Vt = Z0.exports, ie;
|
|
3298
3299
|
function Jt() {
|
|
3299
3300
|
return ie || (ie = 1, (function(r, h) {
|
|
3300
3301
|
(function(t, e, u) {
|
|
3301
|
-
r.exports = e(M(),
|
|
3302
|
-
})(
|
|
3302
|
+
r.exports = e(M(), K());
|
|
3303
|
+
})(Vt, function(t) {
|
|
3303
3304
|
return t.mode.ECB = (function() {
|
|
3304
3305
|
var e = t.lib.BlockCipherMode.extend();
|
|
3305
3306
|
return e.Encryptor = e.extend({
|
|
@@ -3315,11 +3316,11 @@ function Jt() {
|
|
|
3315
3316
|
});
|
|
3316
3317
|
})(Z0)), Z0.exports;
|
|
3317
3318
|
}
|
|
3318
|
-
var
|
|
3319
|
+
var Q0 = { exports: {} }, rx = Q0.exports, se;
|
|
3319
3320
|
function ex() {
|
|
3320
3321
|
return se || (se = 1, (function(r, h) {
|
|
3321
3322
|
(function(t, e, u) {
|
|
3322
|
-
r.exports = e(M(),
|
|
3323
|
+
r.exports = e(M(), K());
|
|
3323
3324
|
})(rx, function(t) {
|
|
3324
3325
|
return t.pad.AnsiX923 = {
|
|
3325
3326
|
pad: function(e, u) {
|
|
@@ -3332,13 +3333,13 @@ function ex() {
|
|
|
3332
3333
|
}
|
|
3333
3334
|
}, t.pad.Ansix923;
|
|
3334
3335
|
});
|
|
3335
|
-
})(
|
|
3336
|
+
})(Q0)), Q0.exports;
|
|
3336
3337
|
}
|
|
3337
|
-
var
|
|
3338
|
+
var V0 = { exports: {} }, tx = V0.exports, ce;
|
|
3338
3339
|
function xx() {
|
|
3339
3340
|
return ce || (ce = 1, (function(r, h) {
|
|
3340
3341
|
(function(t, e, u) {
|
|
3341
|
-
r.exports = e(M(),
|
|
3342
|
+
r.exports = e(M(), K());
|
|
3342
3343
|
})(tx, function(t) {
|
|
3343
3344
|
return t.pad.Iso10126 = {
|
|
3344
3345
|
pad: function(e, u) {
|
|
@@ -3351,13 +3352,13 @@ function xx() {
|
|
|
3351
3352
|
}
|
|
3352
3353
|
}, t.pad.Iso10126;
|
|
3353
3354
|
});
|
|
3354
|
-
})(
|
|
3355
|
+
})(V0)), V0.exports;
|
|
3355
3356
|
}
|
|
3356
3357
|
var J0 = { exports: {} }, nx = J0.exports, fe;
|
|
3357
3358
|
function ax() {
|
|
3358
3359
|
return fe || (fe = 1, (function(r, h) {
|
|
3359
3360
|
(function(t, e, u) {
|
|
3360
|
-
r.exports = e(M(),
|
|
3361
|
+
r.exports = e(M(), K());
|
|
3361
3362
|
})(nx, function(t) {
|
|
3362
3363
|
return t.pad.Iso97971 = {
|
|
3363
3364
|
pad: function(e, u) {
|
|
@@ -3374,7 +3375,7 @@ var rr = { exports: {} }, ox = rr.exports, ue;
|
|
|
3374
3375
|
function ix() {
|
|
3375
3376
|
return ue || (ue = 1, (function(r, h) {
|
|
3376
3377
|
(function(t, e, u) {
|
|
3377
|
-
r.exports = e(M(),
|
|
3378
|
+
r.exports = e(M(), K());
|
|
3378
3379
|
})(ox, function(t) {
|
|
3379
3380
|
return t.pad.ZeroPadding = {
|
|
3380
3381
|
pad: function(e, u) {
|
|
@@ -3396,7 +3397,7 @@ var er = { exports: {} }, sx = er.exports, de;
|
|
|
3396
3397
|
function cx() {
|
|
3397
3398
|
return de || (de = 1, (function(r, h) {
|
|
3398
3399
|
(function(t, e, u) {
|
|
3399
|
-
r.exports = e(M(),
|
|
3400
|
+
r.exports = e(M(), K());
|
|
3400
3401
|
})(sx, function(t) {
|
|
3401
3402
|
return t.pad.NoPadding = {
|
|
3402
3403
|
pad: function() {
|
|
@@ -3411,7 +3412,7 @@ var tr = { exports: {} }, fx = tr.exports, le;
|
|
|
3411
3412
|
function ux() {
|
|
3412
3413
|
return le || (le = 1, (function(r, h) {
|
|
3413
3414
|
(function(t, e, u) {
|
|
3414
|
-
r.exports = e(M(),
|
|
3415
|
+
r.exports = e(M(), K());
|
|
3415
3416
|
})(fx, function(t) {
|
|
3416
3417
|
return (function(e) {
|
|
3417
3418
|
var u = t, p = u.lib, m = p.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
@@ -3458,7 +3459,7 @@ var xr = { exports: {} }, dx = xr.exports, he;
|
|
|
3458
3459
|
function lx() {
|
|
3459
3460
|
return he || (he = 1, (function(r, h) {
|
|
3460
3461
|
(function(t, e, u) {
|
|
3461
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
3462
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
3462
3463
|
})(dx, function(t) {
|
|
3463
3464
|
return (function() {
|
|
3464
3465
|
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], v = [], l = [];
|
|
@@ -3500,11 +3501,11 @@ function lx() {
|
|
|
3500
3501
|
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3501
3502
|
},
|
|
3502
3503
|
_doCryptBlock: function(o, d, b, D, y, k, R, F) {
|
|
3503
|
-
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1],
|
|
3504
|
-
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[
|
|
3505
|
-
H = T, $ = N,
|
|
3504
|
+
for (var w = this._nRounds, H = o[d] ^ b[0], $ = o[d + 1] ^ b[1], z = o[d + 2] ^ b[2], O = o[d + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3505
|
+
var T = D[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[z >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = D[$ >>> 24] ^ y[z >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = D[z >>> 24] ^ y[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ R[$ & 255] ^ b[q++], S = D[O >>> 24] ^ y[H >>> 16 & 255] ^ k[$ >>> 8 & 255] ^ R[z & 255] ^ b[q++];
|
|
3506
|
+
H = T, $ = N, z = j, O = S;
|
|
3506
3507
|
}
|
|
3507
|
-
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[
|
|
3508
|
+
var T = (F[H >>> 24] << 24 | F[$ >>> 16 & 255] << 16 | F[z >>> 8 & 255] << 8 | F[O & 255]) ^ b[q++], N = (F[$ >>> 24] << 24 | F[z >>> 16 & 255] << 16 | F[O >>> 8 & 255] << 8 | F[H & 255]) ^ b[q++], j = (F[z >>> 24] << 24 | F[O >>> 16 & 255] << 16 | F[H >>> 8 & 255] << 8 | F[$ & 255]) ^ b[q++], S = (F[O >>> 24] << 24 | F[H >>> 16 & 255] << 16 | F[$ >>> 8 & 255] << 8 | F[z & 255]) ^ b[q++];
|
|
3508
3509
|
o[d] = T, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3509
3510
|
},
|
|
3510
3511
|
keySize: 256 / 32
|
|
@@ -3518,7 +3519,7 @@ var nr = { exports: {} }, hx = nr.exports, ve;
|
|
|
3518
3519
|
function vx() {
|
|
3519
3520
|
return ve || (ve = 1, (function(r, h) {
|
|
3520
3521
|
(function(t, e, u) {
|
|
3521
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
3522
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
3522
3523
|
})(hx, function(t) {
|
|
3523
3524
|
return (function() {
|
|
3524
3525
|
var e = t, u = e.lib, p = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
@@ -4238,7 +4239,7 @@ var ar = { exports: {} }, px = ar.exports, pe;
|
|
|
4238
4239
|
function Bx() {
|
|
4239
4240
|
return pe || (pe = 1, (function(r, h) {
|
|
4240
4241
|
(function(t, e, u) {
|
|
4241
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4242
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4242
4243
|
})(px, function(t) {
|
|
4243
4244
|
return (function() {
|
|
4244
4245
|
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = m.RC4 = p.extend({
|
|
@@ -4292,7 +4293,7 @@ var or = { exports: {} }, Cx = or.exports, Be;
|
|
|
4292
4293
|
function Ex() {
|
|
4293
4294
|
return Be || (Be = 1, (function(r, h) {
|
|
4294
4295
|
(function(t, e, u) {
|
|
4295
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4296
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4296
4297
|
})(Cx, function(t) {
|
|
4297
4298
|
return (function() {
|
|
4298
4299
|
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = p.extend({
|
|
@@ -4358,7 +4359,7 @@ var ir = { exports: {} }, Ax = ir.exports, Ce;
|
|
|
4358
4359
|
function Fx() {
|
|
4359
4360
|
return Ce || (Ce = 1, (function(r, h) {
|
|
4360
4361
|
(function(t, e, u) {
|
|
4361
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4362
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4362
4363
|
})(Ax, function(t) {
|
|
4363
4364
|
return (function() {
|
|
4364
4365
|
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = p.extend({
|
|
@@ -4422,7 +4423,7 @@ var sr = { exports: {} }, Dx = sr.exports, Ee;
|
|
|
4422
4423
|
function gx() {
|
|
4423
4424
|
return Ee || (Ee = 1, (function(r, h) {
|
|
4424
4425
|
(function(t, e, u) {
|
|
4425
|
-
r.exports = e(M(), s0(), c0(), a0(),
|
|
4426
|
+
r.exports = e(M(), s0(), c0(), a0(), K());
|
|
4426
4427
|
})(Dx, function(t) {
|
|
4427
4428
|
return (function() {
|
|
4428
4429
|
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo;
|
|
@@ -5544,7 +5545,7 @@ var bx = y0.exports, Ae;
|
|
|
5544
5545
|
function mx() {
|
|
5545
5546
|
return Ae || (Ae = 1, (function(r, h) {
|
|
5546
5547
|
(function(t, e, u) {
|
|
5547
|
-
r.exports = e(M(),
|
|
5548
|
+
r.exports = e(M(), dr(), Ft(), gt(), s0(), _t(), c0(), ke(), Fr(), Ht(), Se(), Pt(), Wt(), Lt(), Dr(), Tt(), a0(), K(), jt(), Xt(), Yt(), Qt(), Jt(), ex(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex(), Fx(), gx());
|
|
5548
5549
|
})(bx, function(t) {
|
|
5549
5550
|
return t;
|
|
5550
5551
|
});
|
|
@@ -5565,7 +5566,7 @@ function yx() {
|
|
|
5565
5566
|
};
|
|
5566
5567
|
}
|
|
5567
5568
|
function wx(r) {
|
|
5568
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5569
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.160`;
|
|
5569
5570
|
}
|
|
5570
5571
|
function kx(r, h) {
|
|
5571
5572
|
const t = wx(r);
|
|
@@ -5581,7 +5582,7 @@ const gr = () => {
|
|
|
5581
5582
|
gr();
|
|
5582
5583
|
}, Fe = (...r) => {
|
|
5583
5584
|
gr();
|
|
5584
|
-
}, De = /* @__PURE__ */ new Map(),
|
|
5585
|
+
}, De = /* @__PURE__ */ new Map(), Cr = /* @__PURE__ */ new Map();
|
|
5585
5586
|
let Sx = 0;
|
|
5586
5587
|
function Hx(r) {
|
|
5587
5588
|
const h = De.get(r);
|
|
@@ -5599,9 +5600,9 @@ function Hx(r) {
|
|
|
5599
5600
|
height: m?.height,
|
|
5600
5601
|
error: B
|
|
5601
5602
|
});
|
|
5602
|
-
const n =
|
|
5603
|
+
const n = Cr.get(p);
|
|
5603
5604
|
if (n) {
|
|
5604
|
-
if (
|
|
5605
|
+
if (Cr.delete(p), B) {
|
|
5605
5606
|
n.reject(new Error(B));
|
|
5606
5607
|
return;
|
|
5607
5608
|
}
|
|
@@ -5705,7 +5706,7 @@ function $x(r) {
|
|
|
5705
5706
|
function Rx(r, h, t, e) {
|
|
5706
5707
|
const u = ++Sx, p = Hx(t);
|
|
5707
5708
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5708
|
-
|
|
5709
|
+
Cr.set(u, {
|
|
5709
5710
|
resolve: (x) => {
|
|
5710
5711
|
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5711
5712
|
},
|
|
@@ -5741,7 +5742,7 @@ function ge(r) {
|
|
|
5741
5742
|
throw new Error("无法创建 canvas context");
|
|
5742
5743
|
return h;
|
|
5743
5744
|
}
|
|
5744
|
-
async function
|
|
5745
|
+
async function zx(r) {
|
|
5745
5746
|
const h = performance.now(), t = () => {
|
|
5746
5747
|
try {
|
|
5747
5748
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
@@ -5814,28 +5815,28 @@ async function Wx(r) {
|
|
|
5814
5815
|
const _ = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5815
5816
|
if (c.type === "Layer") {
|
|
5816
5817
|
if (c.imagePath) {
|
|
5817
|
-
const
|
|
5818
|
+
const W = m.find((P) => {
|
|
5818
5819
|
const L = P.sourceName || P.layerName;
|
|
5819
5820
|
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5820
5821
|
});
|
|
5821
|
-
|
|
5822
|
-
url:
|
|
5822
|
+
W && (s[c.imagePath] = {
|
|
5823
|
+
url: W.url
|
|
5823
5824
|
});
|
|
5824
5825
|
}
|
|
5825
5826
|
if (c.name) {
|
|
5826
5827
|
if (_) {
|
|
5827
|
-
const
|
|
5828
|
+
const W = `${_}-${c.name}`, P = m.find((L) => {
|
|
5828
5829
|
const I = L.sourceName || L.layerName;
|
|
5829
5830
|
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${_}-${c.name}`) : !1;
|
|
5830
5831
|
});
|
|
5831
|
-
P && (s[
|
|
5832
|
+
P && (s[W] = {
|
|
5832
5833
|
url: P.url
|
|
5833
5834
|
});
|
|
5834
5835
|
}
|
|
5835
5836
|
if (c.imagePath && c.name) {
|
|
5836
|
-
const
|
|
5837
|
+
const W = c.imagePath.split("/").pop() || c.imagePath, P = m.find((L) => {
|
|
5837
5838
|
const I = L.sourceName || L.layerName;
|
|
5838
|
-
return I ? (I.split("/").pop() || I) ===
|
|
5839
|
+
return I ? (I.split("/").pop() || I) === W : !1;
|
|
5839
5840
|
});
|
|
5840
5841
|
P && (s[c.imagePath] = {
|
|
5841
5842
|
url: P.url
|
|
@@ -5844,28 +5845,28 @@ async function Wx(r) {
|
|
|
5844
5845
|
}
|
|
5845
5846
|
}
|
|
5846
5847
|
if (c.children)
|
|
5847
|
-
for (const
|
|
5848
|
-
|
|
5848
|
+
for (const W of c.children)
|
|
5849
|
+
W && l(W, _);
|
|
5849
5850
|
}
|
|
5850
5851
|
function g(c, A) {
|
|
5851
5852
|
const _ = c.id ?? A;
|
|
5852
5853
|
if (c.type === "Group" && _)
|
|
5853
5854
|
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${_}, hasFabricScreenshot=${v.has(_)}`), v.has(_)) {
|
|
5854
|
-
const
|
|
5855
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${
|
|
5855
|
+
const W = v.get(_);
|
|
5856
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${_}, name="${c.name}", url=${W.substring(0, 50)}...`), c.children) {
|
|
5856
5857
|
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5857
5858
|
for (const P of c.children)
|
|
5858
5859
|
if (P && P.isSmartObject === !0) {
|
|
5859
5860
|
const L = P?.name || "";
|
|
5860
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5861
|
+
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");
|
|
5861
5862
|
}
|
|
5862
5863
|
} else
|
|
5863
5864
|
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5864
5865
|
} else
|
|
5865
5866
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5866
5867
|
if (c.children)
|
|
5867
|
-
for (const
|
|
5868
|
-
|
|
5868
|
+
for (const W of c.children)
|
|
5869
|
+
W && g(W, _);
|
|
5869
5870
|
}
|
|
5870
5871
|
if (p.layerList)
|
|
5871
5872
|
for (const c of p.layerList)
|
|
@@ -5892,14 +5893,14 @@ async function Wx(r) {
|
|
|
5892
5893
|
const A = c.url.split("/").pop() || c.url;
|
|
5893
5894
|
if (s[A])
|
|
5894
5895
|
return s[A];
|
|
5895
|
-
const _ = m.find((
|
|
5896
|
-
const P =
|
|
5896
|
+
const _ = m.find((W) => {
|
|
5897
|
+
const P = W.sourceName || W.layerName;
|
|
5897
5898
|
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5898
5899
|
});
|
|
5899
5900
|
if (_) {
|
|
5900
|
-
const
|
|
5901
|
-
if (
|
|
5902
|
-
return s[
|
|
5901
|
+
const W = _.sourceName || _.layerName;
|
|
5902
|
+
if (W)
|
|
5903
|
+
return s[W] || { url: _.url };
|
|
5903
5904
|
}
|
|
5904
5905
|
}
|
|
5905
5906
|
};
|
|
@@ -5910,7 +5911,7 @@ async function Wx(r) {
|
|
|
5910
5911
|
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5911
5912
|
continue;
|
|
5912
5913
|
}
|
|
5913
|
-
const
|
|
5914
|
+
const W = _.url, P = a(W);
|
|
5914
5915
|
if (!P) {
|
|
5915
5916
|
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5916
5917
|
continue;
|
|
@@ -5924,17 +5925,17 @@ async function Wx(r) {
|
|
|
5924
5925
|
} else if (A.type === D0.Group) {
|
|
5925
5926
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5926
5927
|
continue;
|
|
5927
|
-
for (let
|
|
5928
|
-
const P = A.smartObjects[
|
|
5928
|
+
for (let W = 0; W < A.smartObjects.length; W++) {
|
|
5929
|
+
const P = A.smartObjects[W];
|
|
5929
5930
|
if (!P || !P.name)
|
|
5930
5931
|
continue;
|
|
5931
5932
|
let L = s[P.name] ?? _;
|
|
5932
5933
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5933
|
-
const
|
|
5934
|
-
if (L = s[
|
|
5934
|
+
const X = P.imagePath.split("/").pop() || P.imagePath;
|
|
5935
|
+
if (L = s[X], !L) {
|
|
5935
5936
|
const G = m.find((Y) => {
|
|
5936
5937
|
const r0 = Y.sourceName || Y.layerName;
|
|
5937
|
-
return !r0 || !P.imagePath ? !1 : (r0.split("/").pop() || r0) ===
|
|
5938
|
+
return !r0 || !P.imagePath ? !1 : (r0.split("/").pop() || r0) === X || r0 === P.imagePath || r0.endsWith(P.imagePath) || P.imagePath.endsWith(r0);
|
|
5938
5939
|
});
|
|
5939
5940
|
G && (L = { url: G.url });
|
|
5940
5941
|
}
|
|
@@ -5951,13 +5952,13 @@ async function Wx(r) {
|
|
|
5951
5952
|
continue;
|
|
5952
5953
|
I = G;
|
|
5953
5954
|
}
|
|
5954
|
-
const Z = (A.partId ?? A.id) * 100 +
|
|
5955
|
+
const Z = (A.partId ?? A.id) * 100 + W, Q = et(rt(P)), o0 = { width: b, height: D };
|
|
5955
5956
|
R.push({
|
|
5956
|
-
index: c +
|
|
5957
|
+
index: c + W * 0.01,
|
|
5957
5958
|
type: "group",
|
|
5958
5959
|
partData: A,
|
|
5959
5960
|
smartObject: P,
|
|
5960
|
-
maskData:
|
|
5961
|
+
maskData: Q,
|
|
5961
5962
|
promise: Px(
|
|
5962
5963
|
I,
|
|
5963
5964
|
P,
|
|
@@ -5965,7 +5966,7 @@ async function Wx(r) {
|
|
|
5965
5966
|
o0,
|
|
5966
5967
|
E,
|
|
5967
5968
|
n
|
|
5968
|
-
).catch((
|
|
5969
|
+
).catch((X) => null)
|
|
5969
5970
|
});
|
|
5970
5971
|
}
|
|
5971
5972
|
}
|
|
@@ -5974,75 +5975,75 @@ async function Wx(r) {
|
|
|
5974
5975
|
task: c,
|
|
5975
5976
|
imageBitmap: w[A]
|
|
5976
5977
|
})).sort((c, A) => {
|
|
5977
|
-
const _ = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index,
|
|
5978
|
-
return _ -
|
|
5978
|
+
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;
|
|
5979
|
+
return _ - W;
|
|
5979
5980
|
});
|
|
5980
|
-
let $ = l0(b, D),
|
|
5981
|
+
let $ = l0(b, D), z = F0($), O = !1, q = "normal";
|
|
5981
5982
|
for (let c = 0; c < H.length; c++) {
|
|
5982
5983
|
const { task: A, imageBitmap: _ } = H[c];
|
|
5983
5984
|
if (!_) {
|
|
5984
5985
|
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5985
5986
|
continue;
|
|
5986
5987
|
}
|
|
5987
|
-
const { partData:
|
|
5988
|
+
const { partData: W } = A, P = W.bounds;
|
|
5988
5989
|
let L;
|
|
5989
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
5990
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
5990
5991
|
let I;
|
|
5991
|
-
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ??
|
|
5992
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? W.clipping === !0 : I = W.clipping === !0;
|
|
5992
5993
|
const Z = H[c + 1];
|
|
5993
|
-
let
|
|
5994
|
+
let Q = !1;
|
|
5994
5995
|
if (Z) {
|
|
5995
|
-
const
|
|
5996
|
-
Z.task.type === "group" && Z.task.smartObject ?
|
|
5996
|
+
const X = Z.task.partData;
|
|
5997
|
+
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? X.clipping === !0 : Q = X.clipping === !0;
|
|
5997
5998
|
}
|
|
5998
|
-
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
5999
|
+
const o0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
5999
6000
|
if (e(`[renderByJson] 绘制图层 "${o0}"`, {
|
|
6000
6001
|
type: A.type,
|
|
6001
6002
|
bitmapSize: { width: _.width, height: _.height },
|
|
6002
6003
|
bounds: P,
|
|
6003
6004
|
hasMask: !!A.maskData,
|
|
6004
|
-
blendMode:
|
|
6005
|
+
blendMode: W.blendMode,
|
|
6005
6006
|
opacity: L,
|
|
6006
6007
|
clipping: I
|
|
6007
|
-
}), !I &&
|
|
6008
|
-
if (O = !0, q =
|
|
6009
|
-
if (
|
|
6008
|
+
}), !I && Q) {
|
|
6009
|
+
if (O = !0, q = W.blendMode || "normal", z) {
|
|
6010
|
+
if (z.clearRect(0, 0, b, D), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6010
6011
|
if (A.maskData) {
|
|
6011
|
-
const
|
|
6012
|
-
G && (G.drawImage(_, 0, 0),
|
|
6012
|
+
const X = l0(b, D), G = F0(X);
|
|
6013
|
+
G && (G.drawImage(_, 0, 0), hr(G, A.maskData), z.drawImage(X, 0, 0));
|
|
6013
6014
|
} else
|
|
6014
|
-
|
|
6015
|
-
else A.type === "layer" && (P ?
|
|
6015
|
+
z.drawImage(_, 0, 0);
|
|
6016
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6016
6017
|
_,
|
|
6017
6018
|
P.left,
|
|
6018
6019
|
P.top,
|
|
6019
6020
|
P.width,
|
|
6020
6021
|
P.height
|
|
6021
|
-
) :
|
|
6022
|
-
|
|
6022
|
+
) : z.drawImage(_, 0, 0));
|
|
6023
|
+
z.globalAlpha = 1;
|
|
6023
6024
|
}
|
|
6024
6025
|
} else if (I) {
|
|
6025
|
-
if (
|
|
6026
|
-
if (
|
|
6026
|
+
if (z) {
|
|
6027
|
+
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6027
6028
|
if (A.maskData) {
|
|
6028
|
-
const
|
|
6029
|
-
G && (G.drawImage(_, 0, 0),
|
|
6029
|
+
const X = l0(b, D), G = F0(X);
|
|
6030
|
+
G && (G.drawImage(_, 0, 0), hr(G, A.maskData), z.drawImage(X, 0, 0));
|
|
6030
6031
|
} else
|
|
6031
|
-
|
|
6032
|
-
else A.type === "layer" && (P ?
|
|
6032
|
+
z.drawImage(_, 0, 0);
|
|
6033
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6033
6034
|
_,
|
|
6034
6035
|
P.left,
|
|
6035
6036
|
P.top,
|
|
6036
6037
|
P.width,
|
|
6037
6038
|
P.height
|
|
6038
|
-
) :
|
|
6039
|
-
|
|
6039
|
+
) : z.drawImage(_, 0, 0));
|
|
6040
|
+
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6040
6041
|
}
|
|
6041
6042
|
} else {
|
|
6042
|
-
if (k.globalCompositeOperation = Lr(
|
|
6043
|
+
if (k.globalCompositeOperation = Lr(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6043
6044
|
if (A.maskData) {
|
|
6044
|
-
const
|
|
6045
|
-
G && (G.drawImage(_, 0, 0),
|
|
6045
|
+
const X = l0(b, D), G = F0(X);
|
|
6046
|
+
G && (G.drawImage(_, 0, 0), hr(G, A.maskData), k.drawImage(X, 0, 0));
|
|
6046
6047
|
} else
|
|
6047
6048
|
k.drawImage(_, 0, 0);
|
|
6048
6049
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6054,9 +6055,9 @@ async function Wx(r) {
|
|
|
6054
6055
|
) : k.drawImage(_, 0, 0));
|
|
6055
6056
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6056
6057
|
}
|
|
6057
|
-
O && !
|
|
6058
|
+
O && !Q && (k.globalCompositeOperation = Lr(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6058
6059
|
}
|
|
6059
|
-
$ = null,
|
|
6060
|
+
$ = null, z = null;
|
|
6060
6061
|
let U = y, T = b, N = D;
|
|
6061
6062
|
if (C !== void 0 || x !== void 0) {
|
|
6062
6063
|
if (C !== void 0 && x !== void 0)
|
|
@@ -6079,20 +6080,20 @@ async function Wx(r) {
|
|
|
6079
6080
|
height: N
|
|
6080
6081
|
};
|
|
6081
6082
|
}
|
|
6082
|
-
const
|
|
6083
|
-
const t = (await
|
|
6083
|
+
const ze = async (r) => {
|
|
6084
|
+
const t = (await zx(r)).canvas;
|
|
6084
6085
|
return t ? createImageBitmap(t) : null;
|
|
6085
6086
|
};
|
|
6086
|
-
let i0 = null,
|
|
6087
|
-
const
|
|
6088
|
-
if (!
|
|
6089
|
-
|
|
6087
|
+
let i0 = null, pr = !1;
|
|
6088
|
+
const We = async () => {
|
|
6089
|
+
if (!pr) {
|
|
6090
|
+
pr = !0;
|
|
6090
6091
|
try {
|
|
6091
6092
|
for (; i0; ) {
|
|
6092
6093
|
const r = i0;
|
|
6093
6094
|
i0 = null;
|
|
6094
6095
|
try {
|
|
6095
|
-
const h = await
|
|
6096
|
+
const h = await ze(r.renderData);
|
|
6096
6097
|
if (i0) {
|
|
6097
6098
|
h?.close?.();
|
|
6098
6099
|
continue;
|
|
@@ -6107,7 +6108,7 @@ const ze = async () => {
|
|
|
6107
6108
|
}
|
|
6108
6109
|
}
|
|
6109
6110
|
} finally {
|
|
6110
|
-
|
|
6111
|
+
pr = !1, i0 && We();
|
|
6111
6112
|
}
|
|
6112
6113
|
}
|
|
6113
6114
|
};
|
|
@@ -6125,11 +6126,11 @@ self.onmessage = async (r) => {
|
|
|
6125
6126
|
}
|
|
6126
6127
|
const t = h;
|
|
6127
6128
|
if (t.coalesce === !0) {
|
|
6128
|
-
i0 = { id: t.id, renderData: t.renderData },
|
|
6129
|
+
i0 = { id: t.id, renderData: t.renderData }, We();
|
|
6129
6130
|
return;
|
|
6130
6131
|
}
|
|
6131
6132
|
try {
|
|
6132
|
-
const e = await
|
|
6133
|
+
const e = await ze(t.renderData);
|
|
6133
6134
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|
|
6134
6135
|
} catch (e) {
|
|
6135
6136
|
self.postMessage({
|