@jieyin/editor-sdk-test 1.1.157 → 1.1.158
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 +4202 -4195
- package/dist/renderWorker.js +522 -521
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var g0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(g0 || {});
|
|
2
|
-
function
|
|
3
|
-
let
|
|
2
|
+
function Ye(r) {
|
|
3
|
+
let d = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = d;
|
|
6
|
+
return d += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ze(r, d) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,29 +23,29 @@ function Qe(r, u) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? d,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let
|
|
32
|
+
function Qe(r, d, t, e) {
|
|
33
|
+
let u = r.name || "", p = d[u], m = p?.partId ?? (r.type === "Group" ? t.get(u) : void 0);
|
|
34
34
|
if (r.type === "Group" && m === void 0 && (!p || p.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
-
const x = r.children[0].name, n =
|
|
36
|
-
(E !== void 0 || n?.id !== void 0) && (
|
|
35
|
+
const x = r.children[0].name, n = d[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (u = x, p = n, m = E);
|
|
37
37
|
}
|
|
38
38
|
const B = r.id ?? p?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
41
|
id: B,
|
|
42
42
|
partId: m,
|
|
43
|
-
name:
|
|
43
|
+
name: u,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: g0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => Ze(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
@@ -64,12 +64,12 @@ function Ve(r, u, t, e) {
|
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function Ve(r, d) {
|
|
68
|
+
const t = new Map(d.parts.map((u) => [u.name, u.id])), e = Ye(d.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const p =
|
|
70
|
+
parts: d.parts,
|
|
71
|
+
models: r.map((u) => {
|
|
72
|
+
const p = u.layerExtrasByName ?? {}, m = u.psdJson, B = m.layerList || m.layerList || [], C = m.canvasWidth, x = m.canvasHeight;
|
|
73
73
|
if (!C || !x)
|
|
74
74
|
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${C}, canvasHeight=${x}。请确保 jsonurl 中的 canvasWidth 和 canvasHeight 存在`);
|
|
75
75
|
const n = (s) => {
|
|
@@ -94,7 +94,7 @@ function Je(r, u) {
|
|
|
94
94
|
f.push(v);
|
|
95
95
|
return f;
|
|
96
96
|
}, a = n(B).map(
|
|
97
|
-
(s) =>
|
|
97
|
+
(s) => Qe(s, p, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -104,36 +104,36 @@ function Je(r, u) {
|
|
|
104
104
|
})
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Je(r) {
|
|
108
108
|
return r ? r.vectorMask && r.vectorMask.paths && Array.isArray(r.vectorMask.paths) ? { type: "bezier", paths: r.vectorMask.paths } : Array.isArray(r.vectorMask) ? { type: "simple", points: r.vectorMask } : null : null;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function rt(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((d) => ({
|
|
114
|
+
open: !!d.open,
|
|
115
|
+
knots: d.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((d) => ({
|
|
123
|
+
x: d.x,
|
|
124
|
+
y: d.y,
|
|
125
|
+
type: d.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function lr(r,
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function lr(r, d) {
|
|
130
|
+
if (d) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), d.type === "bezier" && Array.isArray(d.paths))
|
|
132
|
+
d.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
135
|
+
const u = e[0];
|
|
136
|
+
r.moveTo(u.points[2], u.points[3]);
|
|
137
137
|
for (let p = 0; p < e.length; p++) {
|
|
138
138
|
const m = e[p];
|
|
139
139
|
let B = (p + 1) % e.length;
|
|
@@ -146,8 +146,8 @@ function lr(r, u) {
|
|
|
146
146
|
}
|
|
147
147
|
t.open || r.closePath();
|
|
148
148
|
});
|
|
149
|
-
else if (
|
|
150
|
-
const t =
|
|
149
|
+
else if (d.type === "simple" && Array.isArray(d.points)) {
|
|
150
|
+
const t = d.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -161,10 +161,10 @@ class v0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(d) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(d);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class v0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(d, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(d, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class v0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(d) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(d), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -251,10 +251,10 @@ class h0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(d) {
|
|
255
255
|
try {
|
|
256
256
|
const t = fr.getOrigin();
|
|
257
|
-
return new URL(
|
|
257
|
+
return new URL(d, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,175 +262,176 @@ class h0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(d, t, e) {
|
|
266
|
+
const u = this.parse(d);
|
|
267
|
+
return !u || u.searchParams.has(t) ? d : (u.searchParams.set(t, e), this.formatUrl(d, 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(d, t) {
|
|
273
|
+
const e = this.parse(d);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? d : (e.searchParams.delete(t), this.formatUrl(d, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(d, t) {
|
|
280
|
+
return this.parse(d)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
287
|
-
return e ? t.toString() :
|
|
285
|
+
static formatUrl(d, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(d), u = d.startsWith("//");
|
|
287
|
+
return e ? t.toString() : u ? t.toString().replace(/^https?:/, "") : `${t.pathname}${t.search}${t.hash}`;
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* 检查是否为数据 URL
|
|
291
291
|
*/
|
|
292
|
-
static isDataUrl(
|
|
293
|
-
return
|
|
292
|
+
static isDataUrl(d) {
|
|
293
|
+
return d?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(d) {
|
|
299
|
+
return d?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
302
|
+
function cr() {
|
|
303
|
+
const r = ["9706784UgQKiV", "addPa", "FileT", "n (fu", "10Ybzkpq", "isBlo", "bind", "toStr", "parse", "now", "/file", "nstru", "isBro", "16KLnVjQ", "9837954WvhLdj", "125539wPCOXy", "913173sXnuZv", "efres", "inclu", "aUrl", "12EJaasS", "code", "isDat", "wser", "file_", "fileT", "1058382HxYQxr", "data", "3875427NplhVV", "proto", "des", "remov", "5lutXGk", "ram", "oken", "ing", "lengt", "20026710TMAPvf", "log"];
|
|
304
|
+
return cr = function() {
|
|
305
|
+
return r;
|
|
306
|
+
}, cr();
|
|
304
307
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
const t = Cr, e = r();
|
|
308
|
+
(function(r, d) {
|
|
309
|
+
const t = r0, e = r();
|
|
308
310
|
for (; ; )
|
|
309
311
|
try {
|
|
310
|
-
if (-parseInt(t(
|
|
312
|
+
if (-parseInt(t(256)) / 1 * (-parseInt(t(261)) / 2) + -parseInt(t(257)) / 3 * (-parseInt(t(254)) / 4) + -parseInt(t(273)) / 5 * (-parseInt(t(267)) / 6) + -parseInt(t(255)) / 7 + -parseInt(t(280)) / 8 + -parseInt(t(269)) / 9 * (parseInt(t(245)) / 10) + parseInt(t(278)) / 11 === d) break;
|
|
311
313
|
e.push(e.shift());
|
|
312
314
|
} catch {
|
|
313
315
|
e.push(e.shift());
|
|
314
316
|
}
|
|
315
|
-
})(cr, -
|
|
317
|
+
})(cr, -657733 * -2 + 425379 * -1 + 28345);
|
|
316
318
|
const A0 = /* @__PURE__ */ (function() {
|
|
317
319
|
let r = !0;
|
|
318
|
-
return function(
|
|
320
|
+
return function(d, t) {
|
|
319
321
|
const e = r ? function() {
|
|
320
322
|
if (t) {
|
|
321
|
-
const
|
|
322
|
-
return t = null,
|
|
323
|
+
const u = t.apply(d, arguments);
|
|
324
|
+
return t = null, u;
|
|
323
325
|
}
|
|
324
326
|
} : function() {
|
|
325
327
|
};
|
|
326
328
|
return r = !1, e;
|
|
327
329
|
};
|
|
328
|
-
})(),
|
|
329
|
-
const r =
|
|
330
|
-
let
|
|
330
|
+
})(), et = A0(void 0, function() {
|
|
331
|
+
const r = r0;
|
|
332
|
+
let d;
|
|
331
333
|
try {
|
|
332
|
-
|
|
334
|
+
d = Function("retur" + r(283) + "nction() " + ("{}.co" + r(252) + 'ctor("return this")( )') + ");")();
|
|
333
335
|
} catch {
|
|
334
|
-
|
|
336
|
+
d = window;
|
|
335
337
|
}
|
|
336
|
-
const t =
|
|
337
|
-
for (let
|
|
338
|
-
const p = A0[r(
|
|
339
|
-
p.__proto__ = A0.bind(A0), p[
|
|
338
|
+
const t = d.console = d.console || {}, e = [r(279), "warn", "info", "error", "exception", "table", "trace"];
|
|
339
|
+
for (let u = 0; u < e[r(277) + "h"]; u++) {
|
|
340
|
+
const p = A0.constructor[r(270) + "type"][r(247)](A0), m = e[u], B = t[m] || p;
|
|
341
|
+
p.__proto__ = A0.bind(A0), p["toStr" + r(276)] = B[r(248) + "ing"].bind(B), t[m] = p;
|
|
340
342
|
}
|
|
341
343
|
});
|
|
342
|
-
|
|
343
|
-
|
|
344
|
+
et();
|
|
345
|
+
function r0(r, d) {
|
|
346
|
+
return r = r - (-739 * 11 + 2989 + -5 * -1077), cr()[r];
|
|
347
|
+
}
|
|
348
|
+
const Cr = "file_token", Er = "file_token_expire_time", tt = 60 * (-10361 + -1623 * -7);
|
|
344
349
|
function pr() {
|
|
345
|
-
return v0.getItem(
|
|
350
|
+
return v0.getItem(Cr);
|
|
346
351
|
}
|
|
347
|
-
function
|
|
348
|
-
const
|
|
352
|
+
function xt(r = tt) {
|
|
353
|
+
const d = r0;
|
|
349
354
|
if (!pr()) return !0;
|
|
350
|
-
const e = v0.getItem(
|
|
355
|
+
const e = v0.getItem(Er);
|
|
351
356
|
if (!e) return !1;
|
|
352
|
-
const
|
|
353
|
-
return Date[
|
|
357
|
+
const u = Number(e);
|
|
358
|
+
return Date[d(250)]() + r > u;
|
|
354
359
|
}
|
|
355
|
-
function
|
|
360
|
+
function nt(r, d) {
|
|
356
361
|
const t = r0;
|
|
357
|
-
if (v0.setItem(
|
|
358
|
-
const e = Date[t(
|
|
359
|
-
v0
|
|
362
|
+
if (v0.setItem(Cr, r), typeof d == "number" && d > 3 * 1531 + 2160 + -2251 * 3) {
|
|
363
|
+
const e = Date[t(250)]() + d * 1e3;
|
|
364
|
+
v0.setItem(Er, String(e));
|
|
360
365
|
}
|
|
361
366
|
}
|
|
362
|
-
function
|
|
367
|
+
function at() {
|
|
363
368
|
const r = r0;
|
|
364
|
-
v0
|
|
365
|
-
}
|
|
366
|
-
async function Wr(r) {
|
|
367
|
-
const u = r0, t = await r(), e = t?.data?.[u(211)];
|
|
368
|
-
return t?.data?.code === -2989 * 2 + -1174 + 3676 * 2 && e?.[u(213) + u(220)] ? (at(e[u(213) + "token"], e[u(193) + "es_in"]), e["file_" + u(220)]) : null;
|
|
369
|
+
v0[r(272) + "eItem"](Cr), v0[r(272) + "eItem"](Er);
|
|
369
370
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return
|
|
371
|
+
async function zr(r) {
|
|
372
|
+
const d = r0, t = await r(), e = t?.data?.[d(268)];
|
|
373
|
+
return t?.[d(268)]?.[d(262)] === 200 && e?.["file_token"] ? (nt(e[d(265) + "token"], e.expires_in), e.file_token) : null;
|
|
373
374
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}, cr();
|
|
375
|
+
let ot = null;
|
|
376
|
+
function Wr() {
|
|
377
|
+
const r = r0;
|
|
378
|
+
return fr[r(253) + r(264)]() ? ot : null;
|
|
379
379
|
}
|
|
380
|
-
async function
|
|
380
|
+
async function De() {
|
|
381
381
|
const r = r0;
|
|
382
|
-
if (!fr
|
|
383
|
-
const
|
|
384
|
-
if (
|
|
382
|
+
if (!fr.isBrowser()) return pr();
|
|
383
|
+
const d = pr();
|
|
384
|
+
if (d && !xt()) return d;
|
|
385
385
|
try {
|
|
386
|
-
const t = await
|
|
387
|
-
if (
|
|
388
|
-
const e = await
|
|
386
|
+
const t = await Wr();
|
|
387
|
+
if (d && t?.["fetchFileTokenR" + r(258) + "h"]) {
|
|
388
|
+
const e = await zr(t["fetch" + r(282) + "okenR" + r(258) + "h"]);
|
|
389
389
|
if (e) return e;
|
|
390
390
|
}
|
|
391
391
|
} catch {
|
|
392
392
|
}
|
|
393
393
|
try {
|
|
394
|
-
const t =
|
|
395
|
-
return t?.["
|
|
394
|
+
const t = Wr();
|
|
395
|
+
return t?.["fetchFileToken"] ? await zr(t.fetchFileToken) : null;
|
|
396
396
|
} catch {
|
|
397
397
|
return null;
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
const
|
|
402
|
-
if (!r || h0[
|
|
403
|
-
const t = h0
|
|
404
|
-
return t ? t.pathname
|
|
400
|
+
function be(r) {
|
|
401
|
+
const d = r0;
|
|
402
|
+
if (!r || h0[d(263) + d(260)](r) || h0[d(246) + "bUrl"](r)) return !1;
|
|
403
|
+
const t = h0[d(249)](r);
|
|
404
|
+
return t ? t.pathname.includes(d(251) + "s/") && !h0["hasPa" + d(274)](r, "fileT" + d(275)) : r.includes("/files/") && !r[d(259) + d(271)]("fileToken=");
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function me(r, d) {
|
|
407
407
|
const t = r0;
|
|
408
|
-
return !
|
|
408
|
+
return !d || !be(r) ? r : h0[t(281) + "ram"](r, t(266) + t(275), d);
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
410
|
+
function it(r) {
|
|
411
|
+
const d = r0;
|
|
412
|
+
return h0[d(272) + "eParam"](r, d(266) + "oken");
|
|
412
413
|
}
|
|
413
|
-
async function
|
|
414
|
-
if (!
|
|
415
|
-
const
|
|
416
|
-
return
|
|
414
|
+
async function st(r) {
|
|
415
|
+
if (!be(r)) return r;
|
|
416
|
+
const d = await De();
|
|
417
|
+
return me(r, d);
|
|
417
418
|
}
|
|
418
|
-
async function
|
|
419
|
-
if (!fr[r0(
|
|
420
|
-
const e =
|
|
421
|
-
if (p.status !==
|
|
422
|
-
|
|
423
|
-
const m = await
|
|
424
|
-
return fetch(B,
|
|
419
|
+
async function _e(r, d) {
|
|
420
|
+
if (!fr["isBro" + r0(264)]()) return fetch(r, d);
|
|
421
|
+
const e = it(r), u = await st(e), p = await fetch(u, d);
|
|
422
|
+
if (p.status !== -2609 + -1 * -7965 + -4955) return p;
|
|
423
|
+
at();
|
|
424
|
+
const m = await De(), B = me(e, m);
|
|
425
|
+
return fetch(B, d);
|
|
425
426
|
}
|
|
426
|
-
const
|
|
427
|
+
const ye = (r, d) => {
|
|
427
428
|
if (!r) return r;
|
|
428
|
-
const t = (
|
|
429
|
+
const t = (d || "").replace(/\/$/, "");
|
|
429
430
|
if (t && r.startsWith(t))
|
|
430
431
|
return r;
|
|
431
432
|
if (typeof window < "u") {
|
|
432
|
-
const
|
|
433
|
-
if (
|
|
433
|
+
const u = window.location.hostname;
|
|
434
|
+
if (u === "localhost" || u === "127.0.0.1")
|
|
434
435
|
try {
|
|
435
436
|
const p = new URL(r);
|
|
436
437
|
if (t)
|
|
@@ -448,32 +449,32 @@ const we = (r, u) => {
|
|
|
448
449
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
449
450
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
450
451
|
return e ? `/oss${e[2]}` : r;
|
|
451
|
-
},
|
|
452
|
+
}, ct = (r, d) => {
|
|
452
453
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
453
|
-
return new OffscreenCanvas(r,
|
|
454
|
+
return new OffscreenCanvas(r, d);
|
|
454
455
|
const t = document.createElement("canvas");
|
|
455
|
-
return t.width = r, t.height =
|
|
456
|
-
}, _0 = async (r,
|
|
457
|
-
if (!
|
|
456
|
+
return t.width = r, t.height = d, t;
|
|
457
|
+
}, _0 = async (r, d) => {
|
|
458
|
+
if (!d || d <= 0) return r;
|
|
458
459
|
const t = Math.max(r.width, r.height);
|
|
459
|
-
if (t <=
|
|
460
|
-
const e =
|
|
461
|
-
return B ? (B.drawImage(r, 0, 0,
|
|
460
|
+
if (t <= d) return r;
|
|
461
|
+
const e = d / t, u = Math.max(1, Math.round(r.width * e)), p = Math.max(1, Math.round(r.height * e)), m = ct(u, p), B = m.getContext("2d");
|
|
462
|
+
return B ? (B.drawImage(r, 0, 0, u, p), r.close?.(), await createImageBitmap(m)) : r;
|
|
462
463
|
};
|
|
463
|
-
async function
|
|
464
|
+
async function ft(r, d, t) {
|
|
464
465
|
if (typeof r == "string")
|
|
465
466
|
try {
|
|
466
|
-
const e =
|
|
467
|
-
if (!
|
|
468
|
-
const m =
|
|
467
|
+
const e = ye(r, t), u = await _e(e);
|
|
468
|
+
if (!u.ok) {
|
|
469
|
+
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
469
470
|
throw new Error(m);
|
|
470
471
|
}
|
|
471
|
-
const p = await
|
|
472
|
+
const p = await u.blob();
|
|
472
473
|
if (!p.type.startsWith("image/") && p.size === 0)
|
|
473
474
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
474
475
|
try {
|
|
475
476
|
const m = await createImageBitmap(p);
|
|
476
|
-
return await _0(m,
|
|
477
|
+
return await _0(m, d);
|
|
477
478
|
} catch (m) {
|
|
478
479
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
479
480
|
}
|
|
@@ -481,13 +482,13 @@ async function dt(r, u, t) {
|
|
|
481
482
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
482
483
|
}
|
|
483
484
|
if (r instanceof HTMLImageElement) {
|
|
484
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
485
|
-
r.onload = e, r.onerror = () =>
|
|
485
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, u) => {
|
|
486
|
+
r.onload = e, r.onerror = () => u(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
486
487
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
487
488
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
488
489
|
try {
|
|
489
490
|
const e = await createImageBitmap(r);
|
|
490
|
-
return await _0(e,
|
|
491
|
+
return await _0(e, d);
|
|
491
492
|
} catch (e) {
|
|
492
493
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
493
494
|
}
|
|
@@ -495,23 +496,23 @@ async function dt(r, u, t) {
|
|
|
495
496
|
if (r instanceof ImageBitmap) {
|
|
496
497
|
if (r.width === 0 || r.height === 0)
|
|
497
498
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
498
|
-
return await _0(r,
|
|
499
|
+
return await _0(r, d);
|
|
499
500
|
}
|
|
500
501
|
throw new Error("不支持的图片类型");
|
|
501
502
|
}
|
|
502
|
-
async function ut(r,
|
|
503
|
+
async function ut(r, d, t) {
|
|
503
504
|
try {
|
|
504
|
-
const e =
|
|
505
|
-
if (!
|
|
506
|
-
const m =
|
|
505
|
+
const e = ye(r, t), u = await _e(e);
|
|
506
|
+
if (!u.ok) {
|
|
507
|
+
const m = u.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${u.status} ${u.statusText}): ${r}`;
|
|
507
508
|
throw new Error(m);
|
|
508
509
|
}
|
|
509
|
-
const p = await
|
|
510
|
+
const p = await u.blob();
|
|
510
511
|
if (!p.type.startsWith("image/") && p.size === 0)
|
|
511
512
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
512
513
|
try {
|
|
513
514
|
const m = await createImageBitmap(p);
|
|
514
|
-
return await _0(m,
|
|
515
|
+
return await _0(m, d);
|
|
515
516
|
} catch (m) {
|
|
516
517
|
throw new Error(`图片解码失败: URL=${r}, 错误=${m instanceof Error ? m.message : m}`);
|
|
517
518
|
}
|
|
@@ -519,9 +520,9 @@ async function ut(r, u, t) {
|
|
|
519
520
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
520
521
|
}
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
+
function Ir(r) {
|
|
523
524
|
if (!r) return "source-over";
|
|
524
|
-
const
|
|
525
|
+
const d = r.trim().toLowerCase();
|
|
525
526
|
return {
|
|
526
527
|
normal: "source-over",
|
|
527
528
|
multiply: "multiply",
|
|
@@ -547,26 +548,26 @@ function Lr(r) {
|
|
|
547
548
|
"linear dodge": "lighter",
|
|
548
549
|
lighter: "lighter",
|
|
549
550
|
"pass-through": "source-over"
|
|
550
|
-
}[
|
|
551
|
+
}[d] || "source-over";
|
|
551
552
|
}
|
|
552
553
|
var hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
553
|
-
function
|
|
554
|
+
function dt(r) {
|
|
554
555
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
555
|
-
var
|
|
556
|
-
if (typeof
|
|
556
|
+
var d = r.default;
|
|
557
|
+
if (typeof d == "function") {
|
|
557
558
|
var t = function e() {
|
|
558
|
-
var
|
|
559
|
+
var u = !1;
|
|
559
560
|
try {
|
|
560
|
-
|
|
561
|
+
u = this instanceof e;
|
|
561
562
|
} catch {
|
|
562
563
|
}
|
|
563
|
-
return
|
|
564
|
+
return u ? Reflect.construct(d, arguments, this.constructor) : d.apply(this, arguments);
|
|
564
565
|
};
|
|
565
|
-
t.prototype =
|
|
566
|
+
t.prototype = d.prototype;
|
|
566
567
|
} else t = {};
|
|
567
568
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
568
|
-
var
|
|
569
|
-
Object.defineProperty(t, e,
|
|
569
|
+
var u = Object.getOwnPropertyDescriptor(r, e);
|
|
570
|
+
Object.defineProperty(t, e, u.get ? u : {
|
|
570
571
|
enumerable: !0,
|
|
571
572
|
get: function() {
|
|
572
573
|
return r[e];
|
|
@@ -575,23 +576,23 @@ function lt(r) {
|
|
|
575
576
|
}), t;
|
|
576
577
|
}
|
|
577
578
|
var y0 = { exports: {} };
|
|
578
|
-
function
|
|
579
|
+
function lt(r) {
|
|
579
580
|
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.');
|
|
580
581
|
}
|
|
581
|
-
var w0 = { exports: {} },
|
|
582
|
+
var w0 = { exports: {} }, ht = {}, vt = /* @__PURE__ */ Object.freeze({
|
|
582
583
|
__proto__: null,
|
|
583
|
-
default:
|
|
584
|
-
}),
|
|
584
|
+
default: ht
|
|
585
|
+
}), pt = /* @__PURE__ */ dt(vt), Bt = w0.exports, Lr;
|
|
585
586
|
function M() {
|
|
586
|
-
return
|
|
587
|
+
return Lr || (Lr = 1, (function(r, d) {
|
|
587
588
|
(function(t, e) {
|
|
588
589
|
r.exports = e();
|
|
589
|
-
})(
|
|
590
|
-
var t = t || (function(e,
|
|
590
|
+
})(Bt, function() {
|
|
591
|
+
var t = t || (function(e, u) {
|
|
591
592
|
var p;
|
|
592
|
-
if (typeof window < "u" && window.crypto && (p = window.crypto), typeof self < "u" && self.crypto && (p = self.crypto), typeof globalThis < "u" && globalThis.crypto && (p = globalThis.crypto), !p && typeof window < "u" && window.msCrypto && (p = window.msCrypto), !p && typeof hr < "u" && hr.crypto && (p = hr.crypto), !p && typeof
|
|
593
|
+
if (typeof window < "u" && window.crypto && (p = window.crypto), typeof self < "u" && self.crypto && (p = self.crypto), typeof globalThis < "u" && globalThis.crypto && (p = globalThis.crypto), !p && typeof window < "u" && window.msCrypto && (p = window.msCrypto), !p && typeof hr < "u" && hr.crypto && (p = hr.crypto), !p && typeof lt == "function")
|
|
593
594
|
try {
|
|
594
|
-
p =
|
|
595
|
+
p = pt;
|
|
595
596
|
} catch {
|
|
596
597
|
}
|
|
597
598
|
var m = function() {
|
|
@@ -714,7 +715,7 @@ function M() {
|
|
|
714
715
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
715
716
|
*/
|
|
716
717
|
init: function(i, o) {
|
|
717
|
-
i = this.words = i || [], o !=
|
|
718
|
+
i = this.words = i || [], o != u ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
718
719
|
},
|
|
719
720
|
/**
|
|
720
721
|
* Converts this word array to a string.
|
|
@@ -1082,14 +1083,14 @@ function M() {
|
|
|
1082
1083
|
});
|
|
1083
1084
|
})(w0)), w0.exports;
|
|
1084
1085
|
}
|
|
1085
|
-
var k0 = { exports: {} },
|
|
1086
|
-
function
|
|
1087
|
-
return
|
|
1086
|
+
var k0 = { exports: {} }, Ct = k0.exports, Or;
|
|
1087
|
+
function ur() {
|
|
1088
|
+
return Or || (Or = 1, (function(r, d) {
|
|
1088
1089
|
(function(t, e) {
|
|
1089
1090
|
r.exports = e(M());
|
|
1090
|
-
})(
|
|
1091
|
+
})(Ct, function(t) {
|
|
1091
1092
|
return (function(e) {
|
|
1092
|
-
var
|
|
1093
|
+
var u = t, p = u.lib, m = p.Base, B = p.WordArray, C = u.x64 = {};
|
|
1093
1094
|
C.Word = m.extend({
|
|
1094
1095
|
/**
|
|
1095
1096
|
* Initializes a newly created 64-bit word.
|
|
@@ -1312,15 +1313,15 @@ function dr() {
|
|
|
1312
1313
|
});
|
|
1313
1314
|
})(k0)), k0.exports;
|
|
1314
1315
|
}
|
|
1315
|
-
var S0 = { exports: {} },
|
|
1316
|
-
function
|
|
1317
|
-
return
|
|
1316
|
+
var S0 = { exports: {} }, Et = S0.exports, qr;
|
|
1317
|
+
function At() {
|
|
1318
|
+
return qr || (qr = 1, (function(r, d) {
|
|
1318
1319
|
(function(t, e) {
|
|
1319
1320
|
r.exports = e(M());
|
|
1320
|
-
})(
|
|
1321
|
+
})(Et, function(t) {
|
|
1321
1322
|
return (function() {
|
|
1322
1323
|
if (typeof ArrayBuffer == "function") {
|
|
1323
|
-
var e = t,
|
|
1324
|
+
var e = t, u = e.lib, p = u.WordArray, m = p.init, B = p.init = function(C) {
|
|
1324
1325
|
if (C instanceof ArrayBuffer && (C = new Uint8Array(C)), (C instanceof Int8Array || typeof Uint8ClampedArray < "u" && C instanceof Uint8ClampedArray || C instanceof Int16Array || C instanceof Uint16Array || C instanceof Int32Array || C instanceof Uint32Array || C instanceof Float32Array || C instanceof Float64Array) && (C = new Uint8Array(C.buffer, C.byteOffset, C.byteLength)), C instanceof Uint8Array) {
|
|
1325
1326
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1326
1327
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
@@ -1334,14 +1335,14 @@ function Ft() {
|
|
|
1334
1335
|
});
|
|
1335
1336
|
})(S0)), S0.exports;
|
|
1336
1337
|
}
|
|
1337
|
-
var H0 = { exports: {} },
|
|
1338
|
-
function
|
|
1339
|
-
return
|
|
1338
|
+
var H0 = { exports: {} }, Ft = H0.exports, Tr;
|
|
1339
|
+
function gt() {
|
|
1340
|
+
return Tr || (Tr = 1, (function(r, d) {
|
|
1340
1341
|
(function(t, e) {
|
|
1341
1342
|
r.exports = e(M());
|
|
1342
|
-
})(
|
|
1343
|
+
})(Ft, function(t) {
|
|
1343
1344
|
return (function() {
|
|
1344
|
-
var e = t,
|
|
1345
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1345
1346
|
m.Utf16 = m.Utf16BE = {
|
|
1346
1347
|
/**
|
|
1347
1348
|
* Converts a word array to a UTF-16 BE string.
|
|
@@ -1428,14 +1429,14 @@ function Dt() {
|
|
|
1428
1429
|
});
|
|
1429
1430
|
})(H0)), H0.exports;
|
|
1430
1431
|
}
|
|
1431
|
-
var $0 = { exports: {} },
|
|
1432
|
+
var $0 = { exports: {} }, Dt = $0.exports, Mr;
|
|
1432
1433
|
function s0() {
|
|
1433
|
-
return
|
|
1434
|
+
return Mr || (Mr = 1, (function(r, d) {
|
|
1434
1435
|
(function(t, e) {
|
|
1435
1436
|
r.exports = e(M());
|
|
1436
|
-
})(
|
|
1437
|
+
})(Dt, function(t) {
|
|
1437
1438
|
return (function() {
|
|
1438
|
-
var e = t,
|
|
1439
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1439
1440
|
m.Base64 = {
|
|
1440
1441
|
/**
|
|
1441
1442
|
* Converts a word array to a Base64 string.
|
|
@@ -1503,14 +1504,14 @@ function s0() {
|
|
|
1503
1504
|
});
|
|
1504
1505
|
})($0)), $0.exports;
|
|
1505
1506
|
}
|
|
1506
|
-
var R0 = { exports: {} },
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1507
|
+
var R0 = { exports: {} }, bt = R0.exports, Nr;
|
|
1508
|
+
function mt() {
|
|
1509
|
+
return Nr || (Nr = 1, (function(r, d) {
|
|
1509
1510
|
(function(t, e) {
|
|
1510
1511
|
r.exports = e(M());
|
|
1511
|
-
})(
|
|
1512
|
+
})(bt, function(t) {
|
|
1512
1513
|
return (function() {
|
|
1513
|
-
var e = t,
|
|
1514
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.enc;
|
|
1514
1515
|
m.Base64url = {
|
|
1515
1516
|
/**
|
|
1516
1517
|
* Converts a word array to a Base64url string.
|
|
@@ -1585,14 +1586,14 @@ function _t() {
|
|
|
1585
1586
|
});
|
|
1586
1587
|
})(R0)), R0.exports;
|
|
1587
1588
|
}
|
|
1588
|
-
var P0 = { exports: {} },
|
|
1589
|
+
var P0 = { exports: {} }, _t = P0.exports, Ur;
|
|
1589
1590
|
function c0() {
|
|
1590
|
-
return
|
|
1591
|
+
return Ur || (Ur = 1, (function(r, d) {
|
|
1591
1592
|
(function(t, e) {
|
|
1592
1593
|
r.exports = e(M());
|
|
1593
|
-
})(
|
|
1594
|
+
})(_t, function(t) {
|
|
1594
1595
|
return (function(e) {
|
|
1595
|
-
var
|
|
1596
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = [];
|
|
1596
1597
|
(function() {
|
|
1597
1598
|
for (var v = 0; v < 64; v++)
|
|
1598
1599
|
x[v] = e.abs(e.sin(v + 1)) * 4294967296 | 0;
|
|
@@ -1646,19 +1647,19 @@ function c0() {
|
|
|
1646
1647
|
var g = v + (D ^ (h | ~i)) + o + b;
|
|
1647
1648
|
return (g << l | g >>> 32 - l) + h;
|
|
1648
1649
|
}
|
|
1649
|
-
|
|
1650
|
+
u.MD5 = B._createHelper(n), u.HmacMD5 = B._createHmacHelper(n);
|
|
1650
1651
|
})(Math), t.MD5;
|
|
1651
1652
|
});
|
|
1652
1653
|
})(P0)), P0.exports;
|
|
1653
1654
|
}
|
|
1654
|
-
var z0 = { exports: {} },
|
|
1655
|
-
function
|
|
1656
|
-
return
|
|
1655
|
+
var z0 = { exports: {} }, yt = z0.exports, jr;
|
|
1656
|
+
function we() {
|
|
1657
|
+
return jr || (jr = 1, (function(r, d) {
|
|
1657
1658
|
(function(t, e) {
|
|
1658
1659
|
r.exports = e(M());
|
|
1659
|
-
})(
|
|
1660
|
+
})(yt, function(t) {
|
|
1660
1661
|
return (function() {
|
|
1661
|
-
var e = t,
|
|
1662
|
+
var e = t, u = e.lib, p = u.WordArray, m = u.Hasher, B = e.algo, C = [], x = B.SHA1 = m.extend({
|
|
1662
1663
|
_doReset: function() {
|
|
1663
1664
|
this._hash = new p.init([
|
|
1664
1665
|
1732584193,
|
|
@@ -1695,14 +1696,14 @@ function ke() {
|
|
|
1695
1696
|
});
|
|
1696
1697
|
})(z0)), z0.exports;
|
|
1697
1698
|
}
|
|
1698
|
-
var W0 = { exports: {} },
|
|
1699
|
-
function
|
|
1700
|
-
return
|
|
1699
|
+
var W0 = { exports: {} }, wt = W0.exports, Gr;
|
|
1700
|
+
function Ar() {
|
|
1701
|
+
return Gr || (Gr = 1, (function(r, d) {
|
|
1701
1702
|
(function(t, e) {
|
|
1702
1703
|
r.exports = e(M());
|
|
1703
|
-
})(
|
|
1704
|
+
})(wt, function(t) {
|
|
1704
1705
|
return (function(e) {
|
|
1705
|
-
var
|
|
1706
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = [], n = [];
|
|
1706
1707
|
(function() {
|
|
1707
1708
|
function s(D) {
|
|
1708
1709
|
for (var i = e.sqrt(D), o = 2; o <= i; o++)
|
|
@@ -1742,19 +1743,19 @@ function Fr() {
|
|
|
1742
1743
|
return s._hash = this._hash.clone(), s;
|
|
1743
1744
|
}
|
|
1744
1745
|
});
|
|
1745
|
-
|
|
1746
|
+
u.SHA256 = B._createHelper(a), u.HmacSHA256 = B._createHmacHelper(a);
|
|
1746
1747
|
})(Math), t.SHA256;
|
|
1747
1748
|
});
|
|
1748
1749
|
})(W0)), W0.exports;
|
|
1749
1750
|
}
|
|
1750
|
-
var I0 = { exports: {} },
|
|
1751
|
-
function
|
|
1752
|
-
return
|
|
1753
|
-
(function(t, e,
|
|
1754
|
-
r.exports = e(M(),
|
|
1755
|
-
})(
|
|
1751
|
+
var I0 = { exports: {} }, kt = I0.exports, Kr;
|
|
1752
|
+
function St() {
|
|
1753
|
+
return Kr || (Kr = 1, (function(r, d) {
|
|
1754
|
+
(function(t, e, u) {
|
|
1755
|
+
r.exports = e(M(), Ar());
|
|
1756
|
+
})(kt, function(t) {
|
|
1756
1757
|
return (function() {
|
|
1757
|
-
var e = t,
|
|
1758
|
+
var e = t, u = e.lib, p = u.WordArray, m = e.algo, B = m.SHA256, C = m.SHA224 = B.extend({
|
|
1758
1759
|
_doReset: function() {
|
|
1759
1760
|
this._hash = new p.init([
|
|
1760
1761
|
3238371032,
|
|
@@ -1777,14 +1778,14 @@ function Ht() {
|
|
|
1777
1778
|
});
|
|
1778
1779
|
})(I0)), I0.exports;
|
|
1779
1780
|
}
|
|
1780
|
-
var L0 = { exports: {} },
|
|
1781
|
-
function
|
|
1782
|
-
return
|
|
1783
|
-
(function(t, e,
|
|
1784
|
-
r.exports = e(M(),
|
|
1785
|
-
})(
|
|
1781
|
+
var L0 = { exports: {} }, Ht = L0.exports, Xr;
|
|
1782
|
+
function ke() {
|
|
1783
|
+
return Xr || (Xr = 1, (function(r, d) {
|
|
1784
|
+
(function(t, e, u) {
|
|
1785
|
+
r.exports = e(M(), ur());
|
|
1786
|
+
})(Ht, function(t) {
|
|
1786
1787
|
return (function() {
|
|
1787
|
-
var e = t,
|
|
1788
|
+
var e = t, u = e.lib, p = u.Hasher, m = e.x64, B = m.Word, C = m.WordArray, x = e.algo;
|
|
1788
1789
|
function n() {
|
|
1789
1790
|
return B.create.apply(B, arguments);
|
|
1790
1791
|
}
|
|
@@ -1888,18 +1889,18 @@ function Se() {
|
|
|
1888
1889
|
]);
|
|
1889
1890
|
},
|
|
1890
1891
|
_doProcessBlock: function(f, v) {
|
|
1891
|
-
for (var h = this._hash.words, D = h[0], i = h[1], o = h[2], l = h[3], b = h[4], g = h[5], y = h[6], k = h[7], R = D.high, F = D.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = l.high, q = l.low, U = b.high, T = b.low, N = g.high, j = g.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, e0 = N, f0 = j, D0 = S, p0 = c,
|
|
1892
|
+
for (var h = this._hash.words, D = h[0], i = h[1], o = h[2], l = h[3], b = h[4], g = h[5], y = h[6], k = h[7], R = D.high, F = D.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = l.high, q = l.low, U = b.high, T = b.low, N = g.high, j = g.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, e0 = N, f0 = j, D0 = S, p0 = c, dr = A, B0 = _, t0 = 0; t0 < 80; t0++) {
|
|
1892
1893
|
var J, x0, b0 = a[t0];
|
|
1893
1894
|
if (t0 < 16)
|
|
1894
1895
|
x0 = b0.high = f[v + t0 * 2] | 0, J = b0.low = f[v + t0 * 2 + 1] | 0;
|
|
1895
1896
|
else {
|
|
1896
|
-
var
|
|
1897
|
-
J =
|
|
1897
|
+
var Dr = a[t0 - 15], u0 = Dr.high, C0 = Dr.low, We = (u0 >>> 1 | C0 << 31) ^ (u0 >>> 8 | C0 << 24) ^ u0 >>> 7, br = (C0 >>> 1 | u0 << 31) ^ (C0 >>> 8 | u0 << 24) ^ (C0 >>> 7 | u0 << 25), mr = a[t0 - 2], d0 = mr.high, E0 = mr.low, Ie = (d0 >>> 19 | E0 << 13) ^ (d0 << 3 | E0 >>> 29) ^ d0 >>> 6, _r = (E0 >>> 19 | d0 << 13) ^ (E0 << 3 | d0 >>> 29) ^ (E0 >>> 6 | d0 << 26), yr = a[t0 - 7], Le = yr.high, Oe = yr.low, wr = a[t0 - 16], qe = wr.high, kr = wr.low;
|
|
1898
|
+
J = br + Oe, x0 = We + Le + (J >>> 0 < br >>> 0 ? 1 : 0), J = J + _r, x0 = x0 + Ie + (J >>> 0 < _r >>> 0 ? 1 : 0), J = J + kr, x0 = x0 + qe + (J >>> 0 < kr >>> 0 ? 1 : 0), b0.high = x0, b0.low = J;
|
|
1898
1899
|
}
|
|
1899
|
-
var
|
|
1900
|
-
|
|
1900
|
+
var Te = G & e0 ^ ~G & D0, Sr = Y & f0 ^ ~Y & p0, Me = W & L ^ W & Z ^ L & Z, Ne = P & I ^ P & Q ^ I & Q, Ue = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), Hr = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), je = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Ge = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), $r = E[t0], Ke = $r.high, Rr = $r.low, V = B0 + Ge, n0 = dr + je + (V >>> 0 < B0 >>> 0 ? 1 : 0), V = V + Sr, n0 = n0 + Te + (V >>> 0 < Sr >>> 0 ? 1 : 0), V = V + Rr, n0 = n0 + Ke + (V >>> 0 < Rr >>> 0 ? 1 : 0), V = V + J, n0 = n0 + x0 + (V >>> 0 < J >>> 0 ? 1 : 0), Pr = Hr + Ne, Xe = Ue + Me + (Pr >>> 0 < Hr >>> 0 ? 1 : 0);
|
|
1901
|
+
dr = D0, B0 = p0, D0 = e0, p0 = f0, e0 = G, f0 = 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 + Pr | 0, W = n0 + Xe + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1901
1902
|
}
|
|
1902
|
-
F = D.low = F + P, D.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 = l.low = q + K, l.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 = g.low = j + f0, g.high = N + e0 + (j >>> 0 < f0 >>> 0 ? 1 : 0), c = y.low = c + p0, y.high = S + D0 + (c >>> 0 < p0 >>> 0 ? 1 : 0), _ = k.low = _ + B0, k.high = A +
|
|
1903
|
+
F = D.low = F + P, D.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 = l.low = q + K, l.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 = g.low = j + f0, g.high = N + e0 + (j >>> 0 < f0 >>> 0 ? 1 : 0), c = y.low = c + p0, y.high = S + D0 + (c >>> 0 < p0 >>> 0 ? 1 : 0), _ = k.low = _ + B0, k.high = A + dr + (_ >>> 0 < B0 >>> 0 ? 1 : 0);
|
|
1903
1904
|
},
|
|
1904
1905
|
_doFinalize: function() {
|
|
1905
1906
|
var f = this._data, v = f.words, h = this._nDataBytes * 8, D = f.sigBytes * 8;
|
|
@@ -1918,14 +1919,14 @@ function Se() {
|
|
|
1918
1919
|
});
|
|
1919
1920
|
})(L0)), L0.exports;
|
|
1920
1921
|
}
|
|
1921
|
-
var O0 = { exports: {} },
|
|
1922
|
-
function
|
|
1923
|
-
return
|
|
1924
|
-
(function(t, e,
|
|
1925
|
-
r.exports = e(M(),
|
|
1926
|
-
})(
|
|
1922
|
+
var O0 = { exports: {} }, $t = O0.exports, Yr;
|
|
1923
|
+
function Rt() {
|
|
1924
|
+
return Yr || (Yr = 1, (function(r, d) {
|
|
1925
|
+
(function(t, e, u) {
|
|
1926
|
+
r.exports = e(M(), ur(), ke());
|
|
1927
|
+
})($t, function(t) {
|
|
1927
1928
|
return (function() {
|
|
1928
|
-
var e = t,
|
|
1929
|
+
var e = t, u = e.x64, p = u.Word, m = u.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1929
1930
|
_doReset: function() {
|
|
1930
1931
|
this._hash = new m.init([
|
|
1931
1932
|
new p.init(3418070365, 3238371032),
|
|
@@ -1948,14 +1949,14 @@ function Pt() {
|
|
|
1948
1949
|
});
|
|
1949
1950
|
})(O0)), O0.exports;
|
|
1950
1951
|
}
|
|
1951
|
-
var q0 = { exports: {} },
|
|
1952
|
-
function
|
|
1953
|
-
return
|
|
1954
|
-
(function(t, e,
|
|
1955
|
-
r.exports = e(M(),
|
|
1956
|
-
})(
|
|
1952
|
+
var q0 = { exports: {} }, Pt = q0.exports, Zr;
|
|
1953
|
+
function zt() {
|
|
1954
|
+
return Zr || (Zr = 1, (function(r, d) {
|
|
1955
|
+
(function(t, e, u) {
|
|
1956
|
+
r.exports = e(M(), ur());
|
|
1957
|
+
})(Pt, function(t) {
|
|
1957
1958
|
return (function(e) {
|
|
1958
|
-
var
|
|
1959
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.x64, x = C.Word, n = u.algo, E = [], a = [], s = [];
|
|
1959
1960
|
(function() {
|
|
1960
1961
|
for (var h = 1, D = 0, i = 0; i < 24; i++) {
|
|
1961
1962
|
E[h + 5 * D] = (i + 1) * (i + 2) / 2 % 64;
|
|
@@ -2053,19 +2054,19 @@ function Wt() {
|
|
|
2053
2054
|
return h;
|
|
2054
2055
|
}
|
|
2055
2056
|
});
|
|
2056
|
-
|
|
2057
|
+
u.SHA3 = B._createHelper(v), u.HmacSHA3 = B._createHmacHelper(v);
|
|
2057
2058
|
})(Math), t.SHA3;
|
|
2058
2059
|
});
|
|
2059
2060
|
})(q0)), q0.exports;
|
|
2060
2061
|
}
|
|
2061
|
-
var T0 = { exports: {} },
|
|
2062
|
-
function
|
|
2063
|
-
return
|
|
2062
|
+
var T0 = { exports: {} }, Wt = T0.exports, Qr;
|
|
2063
|
+
function It() {
|
|
2064
|
+
return Qr || (Qr = 1, (function(r, d) {
|
|
2064
2065
|
(function(t, e) {
|
|
2065
2066
|
r.exports = e(M());
|
|
2066
|
-
})(
|
|
2067
|
+
})(Wt, function(t) {
|
|
2067
2068
|
return (function(e) {
|
|
2068
|
-
var
|
|
2069
|
+
var u = t, p = u.lib, m = p.WordArray, B = p.Hasher, C = u.algo, x = m.create([
|
|
2069
2070
|
0,
|
|
2070
2071
|
1,
|
|
2071
2072
|
2,
|
|
@@ -2436,19 +2437,19 @@ function Lt() {
|
|
|
2436
2437
|
function b(g, y) {
|
|
2437
2438
|
return g << y | g >>> 32 - y;
|
|
2438
2439
|
}
|
|
2439
|
-
|
|
2440
|
+
u.RIPEMD160 = B._createHelper(v), u.HmacRIPEMD160 = B._createHmacHelper(v);
|
|
2440
2441
|
})(), t.RIPEMD160;
|
|
2441
2442
|
});
|
|
2442
2443
|
})(T0)), T0.exports;
|
|
2443
2444
|
}
|
|
2444
|
-
var M0 = { exports: {} },
|
|
2445
|
-
function
|
|
2446
|
-
return
|
|
2445
|
+
var M0 = { exports: {} }, Lt = M0.exports, Vr;
|
|
2446
|
+
function Fr() {
|
|
2447
|
+
return Vr || (Vr = 1, (function(r, d) {
|
|
2447
2448
|
(function(t, e) {
|
|
2448
2449
|
r.exports = e(M());
|
|
2449
|
-
})(
|
|
2450
|
+
})(Lt, function(t) {
|
|
2450
2451
|
(function() {
|
|
2451
|
-
var e = t,
|
|
2452
|
+
var e = t, u = e.lib, p = u.Base, m = e.enc, B = m.Utf8, C = e.algo;
|
|
2452
2453
|
C.HMAC = p.extend({
|
|
2453
2454
|
/**
|
|
2454
2455
|
* Initializes a newly created HMAC.
|
|
@@ -2519,14 +2520,14 @@ function gr() {
|
|
|
2519
2520
|
});
|
|
2520
2521
|
})(M0)), M0.exports;
|
|
2521
2522
|
}
|
|
2522
|
-
var N0 = { exports: {} },
|
|
2523
|
-
function
|
|
2524
|
-
return
|
|
2525
|
-
(function(t, e,
|
|
2526
|
-
r.exports = e(M(),
|
|
2527
|
-
})(
|
|
2523
|
+
var N0 = { exports: {} }, Ot = N0.exports, Jr;
|
|
2524
|
+
function qt() {
|
|
2525
|
+
return Jr || (Jr = 1, (function(r, d) {
|
|
2526
|
+
(function(t, e, u) {
|
|
2527
|
+
r.exports = e(M(), Ar(), Fr());
|
|
2528
|
+
})(Ot, function(t) {
|
|
2528
2529
|
return (function() {
|
|
2529
|
-
var e = t,
|
|
2530
|
+
var e = t, u = e.lib, p = u.Base, m = u.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = p.extend({
|
|
2530
2531
|
/**
|
|
2531
2532
|
* Configuration options.
|
|
2532
2533
|
*
|
|
@@ -2586,14 +2587,14 @@ function Tt() {
|
|
|
2586
2587
|
});
|
|
2587
2588
|
})(N0)), N0.exports;
|
|
2588
2589
|
}
|
|
2589
|
-
var U0 = { exports: {} },
|
|
2590
|
+
var U0 = { exports: {} }, Tt = U0.exports, re;
|
|
2590
2591
|
function a0() {
|
|
2591
|
-
return
|
|
2592
|
-
(function(t, e,
|
|
2593
|
-
r.exports = e(M(),
|
|
2594
|
-
})(
|
|
2592
|
+
return re || (re = 1, (function(r, d) {
|
|
2593
|
+
(function(t, e, u) {
|
|
2594
|
+
r.exports = e(M(), we(), Fr());
|
|
2595
|
+
})(Tt, function(t) {
|
|
2595
2596
|
return (function() {
|
|
2596
|
-
var e = t,
|
|
2597
|
+
var e = t, u = e.lib, p = u.Base, m = u.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = p.extend({
|
|
2597
2598
|
/**
|
|
2598
2599
|
* Configuration options.
|
|
2599
2600
|
*
|
|
@@ -2649,16 +2650,16 @@ function a0() {
|
|
|
2649
2650
|
});
|
|
2650
2651
|
})(U0)), U0.exports;
|
|
2651
2652
|
}
|
|
2652
|
-
var j0 = { exports: {} },
|
|
2653
|
+
var j0 = { exports: {} }, Mt = j0.exports, ee;
|
|
2653
2654
|
function X() {
|
|
2654
|
-
return
|
|
2655
|
-
(function(t, e,
|
|
2655
|
+
return ee || (ee = 1, (function(r, d) {
|
|
2656
|
+
(function(t, e, u) {
|
|
2656
2657
|
r.exports = e(M(), a0());
|
|
2657
|
-
})(
|
|
2658
|
+
})(Mt, function(t) {
|
|
2658
2659
|
t.lib.Cipher || (function(e) {
|
|
2659
|
-
var
|
|
2660
|
+
var u = t, p = u.lib, m = p.Base, B = p.WordArray, C = p.BufferedBlockAlgorithm, x = u.enc;
|
|
2660
2661
|
x.Utf8;
|
|
2661
|
-
var n = x.Base64, E =
|
|
2662
|
+
var n = x.Base64, E = u.algo, a = E.EvpKDF, s = p.Cipher = C.extend({
|
|
2662
2663
|
/**
|
|
2663
2664
|
* Configuration options.
|
|
2664
2665
|
*
|
|
@@ -2797,7 +2798,7 @@ function X() {
|
|
|
2797
2798
|
},
|
|
2798
2799
|
blockSize: 1
|
|
2799
2800
|
});
|
|
2800
|
-
var f =
|
|
2801
|
+
var f = u.mode = {}, v = p.BlockCipherMode = m.extend({
|
|
2801
2802
|
/**
|
|
2802
2803
|
* Creates this mode for encryption.
|
|
2803
2804
|
*
|
|
@@ -2881,7 +2882,7 @@ function X() {
|
|
|
2881
2882
|
H[$ + U] ^= O[U];
|
|
2882
2883
|
}
|
|
2883
2884
|
return F;
|
|
2884
|
-
})(), D =
|
|
2885
|
+
})(), D = u.pad = {}, i = D.Pkcs7 = {
|
|
2885
2886
|
/**
|
|
2886
2887
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2887
2888
|
*
|
|
@@ -2983,7 +2984,7 @@ function X() {
|
|
|
2983
2984
|
toString: function(F) {
|
|
2984
2985
|
return (F || this.formatter).stringify(this);
|
|
2985
2986
|
}
|
|
2986
|
-
}), l =
|
|
2987
|
+
}), l = u.format = {}, b = l.OpenSSL = {
|
|
2987
2988
|
/**
|
|
2988
2989
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
2989
2990
|
*
|
|
@@ -3099,7 +3100,7 @@ function X() {
|
|
|
3099
3100
|
_parse: function(F, w) {
|
|
3100
3101
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3101
3102
|
}
|
|
3102
|
-
}), y =
|
|
3103
|
+
}), y = u.kdf = {}, k = y.OpenSSL = {
|
|
3103
3104
|
/**
|
|
3104
3105
|
* Derives a key and IV from a password.
|
|
3105
3106
|
*
|
|
@@ -3187,26 +3188,26 @@ function X() {
|
|
|
3187
3188
|
});
|
|
3188
3189
|
})(j0)), j0.exports;
|
|
3189
3190
|
}
|
|
3190
|
-
var G0 = { exports: {} },
|
|
3191
|
-
function
|
|
3192
|
-
return
|
|
3193
|
-
(function(t, e,
|
|
3191
|
+
var G0 = { exports: {} }, Nt = G0.exports, te;
|
|
3192
|
+
function Ut() {
|
|
3193
|
+
return te || (te = 1, (function(r, d) {
|
|
3194
|
+
(function(t, e, u) {
|
|
3194
3195
|
r.exports = e(M(), X());
|
|
3195
|
-
})(
|
|
3196
|
+
})(Nt, function(t) {
|
|
3196
3197
|
return t.mode.CFB = (function() {
|
|
3197
3198
|
var e = t.lib.BlockCipherMode.extend();
|
|
3198
3199
|
e.Encryptor = e.extend({
|
|
3199
3200
|
processBlock: function(p, m) {
|
|
3200
3201
|
var B = this._cipher, C = B.blockSize;
|
|
3201
|
-
|
|
3202
|
+
u.call(this, p, m, C, B), this._prevBlock = p.slice(m, m + C);
|
|
3202
3203
|
}
|
|
3203
3204
|
}), e.Decryptor = e.extend({
|
|
3204
3205
|
processBlock: function(p, m) {
|
|
3205
3206
|
var B = this._cipher, C = B.blockSize, x = p.slice(m, m + C);
|
|
3206
|
-
|
|
3207
|
+
u.call(this, p, m, C, B), this._prevBlock = x;
|
|
3207
3208
|
}
|
|
3208
3209
|
});
|
|
3209
|
-
function
|
|
3210
|
+
function u(p, m, B, C) {
|
|
3210
3211
|
var x, n = this._iv;
|
|
3211
3212
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3212
3213
|
for (var E = 0; E < B; E++)
|
|
@@ -3217,14 +3218,14 @@ function jt() {
|
|
|
3217
3218
|
});
|
|
3218
3219
|
})(G0)), G0.exports;
|
|
3219
3220
|
}
|
|
3220
|
-
var K0 = { exports: {} },
|
|
3221
|
-
function
|
|
3222
|
-
return
|
|
3223
|
-
(function(t, e,
|
|
3221
|
+
var K0 = { exports: {} }, jt = K0.exports, xe;
|
|
3222
|
+
function Gt() {
|
|
3223
|
+
return xe || (xe = 1, (function(r, d) {
|
|
3224
|
+
(function(t, e, u) {
|
|
3224
3225
|
r.exports = e(M(), X());
|
|
3225
|
-
})(
|
|
3226
|
+
})(jt, function(t) {
|
|
3226
3227
|
return t.mode.CTR = (function() {
|
|
3227
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3228
|
+
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3228
3229
|
processBlock: function(p, m) {
|
|
3229
3230
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3230
3231
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
@@ -3234,20 +3235,20 @@ function Kt() {
|
|
|
3234
3235
|
p[m + a] ^= E[a];
|
|
3235
3236
|
}
|
|
3236
3237
|
});
|
|
3237
|
-
return e.Decryptor =
|
|
3238
|
+
return e.Decryptor = u, e;
|
|
3238
3239
|
})(), t.mode.CTR;
|
|
3239
3240
|
});
|
|
3240
3241
|
})(K0)), K0.exports;
|
|
3241
3242
|
}
|
|
3242
|
-
var X0 = { exports: {} },
|
|
3243
|
-
function
|
|
3244
|
-
return
|
|
3245
|
-
(function(t, e,
|
|
3243
|
+
var X0 = { exports: {} }, Kt = X0.exports, ne;
|
|
3244
|
+
function Xt() {
|
|
3245
|
+
return ne || (ne = 1, (function(r, d) {
|
|
3246
|
+
(function(t, e, u) {
|
|
3246
3247
|
r.exports = e(M(), X());
|
|
3247
|
-
})(
|
|
3248
|
+
})(Kt, function(t) {
|
|
3248
3249
|
return t.mode.CTRGladman = (function() {
|
|
3249
3250
|
var e = t.lib.BlockCipherMode.extend();
|
|
3250
|
-
function
|
|
3251
|
+
function u(B) {
|
|
3251
3252
|
if ((B >> 24 & 255) === 255) {
|
|
3252
3253
|
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3253
3254
|
C === 255 ? (C = 0, x === 255 ? (x = 0, n === 255 ? n = 0 : ++n) : ++x) : ++C, B = 0, B += C << 16, B += x << 8, B += n;
|
|
@@ -3256,7 +3257,7 @@ function Yt() {
|
|
|
3256
3257
|
return B;
|
|
3257
3258
|
}
|
|
3258
3259
|
function p(B) {
|
|
3259
|
-
return (B[0] =
|
|
3260
|
+
return (B[0] = u(B[0])) === 0 && (B[1] = u(B[1])), B;
|
|
3260
3261
|
}
|
|
3261
3262
|
var m = e.Encryptor = e.extend({
|
|
3262
3263
|
processBlock: function(B, C) {
|
|
@@ -3273,14 +3274,14 @@ function Yt() {
|
|
|
3273
3274
|
});
|
|
3274
3275
|
})(X0)), X0.exports;
|
|
3275
3276
|
}
|
|
3276
|
-
var Y0 = { exports: {} },
|
|
3277
|
-
function
|
|
3278
|
-
return
|
|
3279
|
-
(function(t, e,
|
|
3277
|
+
var Y0 = { exports: {} }, Yt = Y0.exports, ae;
|
|
3278
|
+
function Zt() {
|
|
3279
|
+
return ae || (ae = 1, (function(r, d) {
|
|
3280
|
+
(function(t, e, u) {
|
|
3280
3281
|
r.exports = e(M(), X());
|
|
3281
|
-
})(
|
|
3282
|
+
})(Yt, function(t) {
|
|
3282
3283
|
return t.mode.OFB = (function() {
|
|
3283
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3284
|
+
var e = t.lib.BlockCipherMode.extend(), u = e.Encryptor = e.extend({
|
|
3284
3285
|
processBlock: function(p, m) {
|
|
3285
3286
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3286
3287
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
@@ -3288,79 +3289,79 @@ function Qt() {
|
|
|
3288
3289
|
p[m + E] ^= n[E];
|
|
3289
3290
|
}
|
|
3290
3291
|
});
|
|
3291
|
-
return e.Decryptor =
|
|
3292
|
+
return e.Decryptor = u, e;
|
|
3292
3293
|
})(), t.mode.OFB;
|
|
3293
3294
|
});
|
|
3294
3295
|
})(Y0)), Y0.exports;
|
|
3295
3296
|
}
|
|
3296
|
-
var Z0 = { exports: {} },
|
|
3297
|
-
function
|
|
3298
|
-
return
|
|
3299
|
-
(function(t, e,
|
|
3297
|
+
var Z0 = { exports: {} }, Qt = Z0.exports, oe;
|
|
3298
|
+
function Vt() {
|
|
3299
|
+
return oe || (oe = 1, (function(r, d) {
|
|
3300
|
+
(function(t, e, u) {
|
|
3300
3301
|
r.exports = e(M(), X());
|
|
3301
|
-
})(
|
|
3302
|
+
})(Qt, function(t) {
|
|
3302
3303
|
return t.mode.ECB = (function() {
|
|
3303
3304
|
var e = t.lib.BlockCipherMode.extend();
|
|
3304
3305
|
return e.Encryptor = e.extend({
|
|
3305
|
-
processBlock: function(
|
|
3306
|
-
this._cipher.encryptBlock(
|
|
3306
|
+
processBlock: function(u, p) {
|
|
3307
|
+
this._cipher.encryptBlock(u, p);
|
|
3307
3308
|
}
|
|
3308
3309
|
}), e.Decryptor = e.extend({
|
|
3309
|
-
processBlock: function(
|
|
3310
|
-
this._cipher.decryptBlock(
|
|
3310
|
+
processBlock: function(u, p) {
|
|
3311
|
+
this._cipher.decryptBlock(u, p);
|
|
3311
3312
|
}
|
|
3312
3313
|
}), e;
|
|
3313
3314
|
})(), t.mode.ECB;
|
|
3314
3315
|
});
|
|
3315
3316
|
})(Z0)), Z0.exports;
|
|
3316
3317
|
}
|
|
3317
|
-
var Q0 = { exports: {} },
|
|
3318
|
-
function
|
|
3319
|
-
return
|
|
3320
|
-
(function(t, e,
|
|
3318
|
+
var Q0 = { exports: {} }, Jt = Q0.exports, ie;
|
|
3319
|
+
function rx() {
|
|
3320
|
+
return ie || (ie = 1, (function(r, d) {
|
|
3321
|
+
(function(t, e, u) {
|
|
3321
3322
|
r.exports = e(M(), X());
|
|
3322
|
-
})(
|
|
3323
|
+
})(Jt, function(t) {
|
|
3323
3324
|
return t.pad.AnsiX923 = {
|
|
3324
|
-
pad: function(e,
|
|
3325
|
-
var p = e.sigBytes, m =
|
|
3325
|
+
pad: function(e, u) {
|
|
3326
|
+
var p = e.sigBytes, m = u * 4, B = m - p % m, C = p + B - 1;
|
|
3326
3327
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3327
3328
|
},
|
|
3328
3329
|
unpad: function(e) {
|
|
3329
|
-
var
|
|
3330
|
-
e.sigBytes -=
|
|
3330
|
+
var u = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3331
|
+
e.sigBytes -= u;
|
|
3331
3332
|
}
|
|
3332
3333
|
}, t.pad.Ansix923;
|
|
3333
3334
|
});
|
|
3334
3335
|
})(Q0)), Q0.exports;
|
|
3335
3336
|
}
|
|
3336
|
-
var V0 = { exports: {} },
|
|
3337
|
-
function
|
|
3338
|
-
return
|
|
3339
|
-
(function(t, e,
|
|
3337
|
+
var V0 = { exports: {} }, ex = V0.exports, se;
|
|
3338
|
+
function tx() {
|
|
3339
|
+
return se || (se = 1, (function(r, d) {
|
|
3340
|
+
(function(t, e, u) {
|
|
3340
3341
|
r.exports = e(M(), X());
|
|
3341
|
-
})(
|
|
3342
|
+
})(ex, function(t) {
|
|
3342
3343
|
return t.pad.Iso10126 = {
|
|
3343
|
-
pad: function(e,
|
|
3344
|
-
var p =
|
|
3344
|
+
pad: function(e, u) {
|
|
3345
|
+
var p = u * 4, m = p - e.sigBytes % p;
|
|
3345
3346
|
e.concat(t.lib.WordArray.random(m - 1)).concat(t.lib.WordArray.create([m << 24], 1));
|
|
3346
3347
|
},
|
|
3347
3348
|
unpad: function(e) {
|
|
3348
|
-
var
|
|
3349
|
-
e.sigBytes -=
|
|
3349
|
+
var u = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3350
|
+
e.sigBytes -= u;
|
|
3350
3351
|
}
|
|
3351
3352
|
}, t.pad.Iso10126;
|
|
3352
3353
|
});
|
|
3353
3354
|
})(V0)), V0.exports;
|
|
3354
3355
|
}
|
|
3355
|
-
var J0 = { exports: {} },
|
|
3356
|
-
function
|
|
3357
|
-
return
|
|
3358
|
-
(function(t, e,
|
|
3356
|
+
var J0 = { exports: {} }, xx = J0.exports, ce;
|
|
3357
|
+
function nx() {
|
|
3358
|
+
return ce || (ce = 1, (function(r, d) {
|
|
3359
|
+
(function(t, e, u) {
|
|
3359
3360
|
r.exports = e(M(), X());
|
|
3360
|
-
})(
|
|
3361
|
+
})(xx, function(t) {
|
|
3361
3362
|
return t.pad.Iso97971 = {
|
|
3362
|
-
pad: function(e,
|
|
3363
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3363
|
+
pad: function(e, u) {
|
|
3364
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, u);
|
|
3364
3365
|
},
|
|
3365
3366
|
unpad: function(e) {
|
|
3366
3367
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
@@ -3369,20 +3370,20 @@ function ax() {
|
|
|
3369
3370
|
});
|
|
3370
3371
|
})(J0)), J0.exports;
|
|
3371
3372
|
}
|
|
3372
|
-
var rr = { exports: {} },
|
|
3373
|
-
function
|
|
3374
|
-
return
|
|
3375
|
-
(function(t, e,
|
|
3373
|
+
var rr = { exports: {} }, ax = rr.exports, fe;
|
|
3374
|
+
function ox() {
|
|
3375
|
+
return fe || (fe = 1, (function(r, d) {
|
|
3376
|
+
(function(t, e, u) {
|
|
3376
3377
|
r.exports = e(M(), X());
|
|
3377
|
-
})(
|
|
3378
|
+
})(ax, function(t) {
|
|
3378
3379
|
return t.pad.ZeroPadding = {
|
|
3379
|
-
pad: function(e,
|
|
3380
|
-
var p =
|
|
3380
|
+
pad: function(e, u) {
|
|
3381
|
+
var p = u * 4;
|
|
3381
3382
|
e.clamp(), e.sigBytes += p - (e.sigBytes % p || p);
|
|
3382
3383
|
},
|
|
3383
3384
|
unpad: function(e) {
|
|
3384
|
-
for (var
|
|
3385
|
-
if (
|
|
3385
|
+
for (var u = e.words, p = e.sigBytes - 1, p = e.sigBytes - 1; p >= 0; p--)
|
|
3386
|
+
if (u[p >>> 2] >>> 24 - p % 4 * 8 & 255) {
|
|
3386
3387
|
e.sigBytes = p + 1;
|
|
3387
3388
|
break;
|
|
3388
3389
|
}
|
|
@@ -3391,12 +3392,12 @@ function ix() {
|
|
|
3391
3392
|
});
|
|
3392
3393
|
})(rr)), rr.exports;
|
|
3393
3394
|
}
|
|
3394
|
-
var er = { exports: {} },
|
|
3395
|
-
function
|
|
3396
|
-
return ue || (ue = 1, (function(r,
|
|
3397
|
-
(function(t, e,
|
|
3395
|
+
var er = { exports: {} }, ix = er.exports, ue;
|
|
3396
|
+
function sx() {
|
|
3397
|
+
return ue || (ue = 1, (function(r, d) {
|
|
3398
|
+
(function(t, e, u) {
|
|
3398
3399
|
r.exports = e(M(), X());
|
|
3399
|
-
})(
|
|
3400
|
+
})(ix, function(t) {
|
|
3400
3401
|
return t.pad.NoPadding = {
|
|
3401
3402
|
pad: function() {
|
|
3402
3403
|
},
|
|
@@ -3406,14 +3407,14 @@ function cx() {
|
|
|
3406
3407
|
});
|
|
3407
3408
|
})(er)), er.exports;
|
|
3408
3409
|
}
|
|
3409
|
-
var tr = { exports: {} },
|
|
3410
|
-
function
|
|
3411
|
-
return
|
|
3412
|
-
(function(t, e,
|
|
3410
|
+
var tr = { exports: {} }, cx = tr.exports, de;
|
|
3411
|
+
function fx() {
|
|
3412
|
+
return de || (de = 1, (function(r, d) {
|
|
3413
|
+
(function(t, e, u) {
|
|
3413
3414
|
r.exports = e(M(), X());
|
|
3414
|
-
})(
|
|
3415
|
+
})(cx, function(t) {
|
|
3415
3416
|
return (function(e) {
|
|
3416
|
-
var
|
|
3417
|
+
var u = t, p = u.lib, m = p.CipherParams, B = u.enc, C = B.Hex, x = u.format;
|
|
3417
3418
|
x.Hex = {
|
|
3418
3419
|
/**
|
|
3419
3420
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3453,14 +3454,14 @@ function dx() {
|
|
|
3453
3454
|
});
|
|
3454
3455
|
})(tr)), tr.exports;
|
|
3455
3456
|
}
|
|
3456
|
-
var xr = { exports: {} }, ux = xr.exports,
|
|
3457
|
-
function
|
|
3458
|
-
return
|
|
3459
|
-
(function(t, e,
|
|
3457
|
+
var xr = { exports: {} }, ux = xr.exports, le;
|
|
3458
|
+
function dx() {
|
|
3459
|
+
return le || (le = 1, (function(r, d) {
|
|
3460
|
+
(function(t, e, u) {
|
|
3460
3461
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
3461
3462
|
})(ux, function(t) {
|
|
3462
3463
|
return (function() {
|
|
3463
|
-
var e = t,
|
|
3464
|
+
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], v = [], h = [];
|
|
3464
3465
|
(function() {
|
|
3465
3466
|
for (var o = [], l = 0; l < 256; l++)
|
|
3466
3467
|
l < 128 ? o[l] = l << 1 : o[l] = l << 1 ^ 283;
|
|
@@ -3513,14 +3514,14 @@ function lx() {
|
|
|
3513
3514
|
});
|
|
3514
3515
|
})(xr)), xr.exports;
|
|
3515
3516
|
}
|
|
3516
|
-
var nr = { exports: {} },
|
|
3517
|
-
function
|
|
3518
|
-
return
|
|
3519
|
-
(function(t, e,
|
|
3517
|
+
var nr = { exports: {} }, lx = nr.exports, he;
|
|
3518
|
+
function hx() {
|
|
3519
|
+
return he || (he = 1, (function(r, d) {
|
|
3520
|
+
(function(t, e, u) {
|
|
3520
3521
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
3521
|
-
})(
|
|
3522
|
+
})(lx, function(t) {
|
|
3522
3523
|
return (function() {
|
|
3523
|
-
var e = t,
|
|
3524
|
+
var e = t, u = e.lib, p = u.WordArray, m = u.BlockCipher, B = e.algo, C = [
|
|
3524
3525
|
57,
|
|
3525
3526
|
49,
|
|
3526
3527
|
41,
|
|
@@ -4233,14 +4234,14 @@ function vx() {
|
|
|
4233
4234
|
});
|
|
4234
4235
|
})(nr)), nr.exports;
|
|
4235
4236
|
}
|
|
4236
|
-
var ar = { exports: {} },
|
|
4237
|
-
function
|
|
4238
|
-
return
|
|
4239
|
-
(function(t, e,
|
|
4237
|
+
var ar = { exports: {} }, vx = ar.exports, ve;
|
|
4238
|
+
function px() {
|
|
4239
|
+
return ve || (ve = 1, (function(r, d) {
|
|
4240
|
+
(function(t, e, u) {
|
|
4240
4241
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4241
|
-
})(
|
|
4242
|
+
})(vx, function(t) {
|
|
4242
4243
|
return (function() {
|
|
4243
|
-
var e = t,
|
|
4244
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = m.RC4 = p.extend({
|
|
4244
4245
|
_doReset: function() {
|
|
4245
4246
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4246
4247
|
s[f] = f;
|
|
@@ -4287,14 +4288,14 @@ function Bx() {
|
|
|
4287
4288
|
});
|
|
4288
4289
|
})(ar)), ar.exports;
|
|
4289
4290
|
}
|
|
4290
|
-
var or = { exports: {} },
|
|
4291
|
-
function
|
|
4292
|
-
return
|
|
4293
|
-
(function(t, e,
|
|
4291
|
+
var or = { exports: {} }, Bx = or.exports, pe;
|
|
4292
|
+
function Cx() {
|
|
4293
|
+
return pe || (pe = 1, (function(r, d) {
|
|
4294
|
+
(function(t, e, u) {
|
|
4294
4295
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4295
|
-
})(
|
|
4296
|
+
})(Bx, function(t) {
|
|
4296
4297
|
return (function() {
|
|
4297
|
-
var e = t,
|
|
4298
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.Rabbit = p.extend({
|
|
4298
4299
|
_doReset: function() {
|
|
4299
4300
|
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4300
4301
|
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
@@ -4353,14 +4354,14 @@ function Ex() {
|
|
|
4353
4354
|
});
|
|
4354
4355
|
})(or)), or.exports;
|
|
4355
4356
|
}
|
|
4356
|
-
var ir = { exports: {} },
|
|
4357
|
-
function
|
|
4358
|
-
return
|
|
4359
|
-
(function(t, e,
|
|
4357
|
+
var ir = { exports: {} }, Ex = ir.exports, Be;
|
|
4358
|
+
function Ax() {
|
|
4359
|
+
return Be || (Be = 1, (function(r, d) {
|
|
4360
|
+
(function(t, e, u) {
|
|
4360
4361
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4361
|
-
})(
|
|
4362
|
+
})(Ex, function(t) {
|
|
4362
4363
|
return (function() {
|
|
4363
|
-
var e = t,
|
|
4364
|
+
var e = t, u = e.lib, p = u.StreamCipher, m = e.algo, B = [], C = [], x = [], n = m.RabbitLegacy = p.extend({
|
|
4364
4365
|
_doReset: function() {
|
|
4365
4366
|
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4366
4367
|
a[0],
|
|
@@ -4417,14 +4418,14 @@ function Fx() {
|
|
|
4417
4418
|
});
|
|
4418
4419
|
})(ir)), ir.exports;
|
|
4419
4420
|
}
|
|
4420
|
-
var sr = { exports: {} },
|
|
4421
|
-
function
|
|
4422
|
-
return
|
|
4423
|
-
(function(t, e,
|
|
4421
|
+
var sr = { exports: {} }, Fx = sr.exports, Ce;
|
|
4422
|
+
function gx() {
|
|
4423
|
+
return Ce || (Ce = 1, (function(r, d) {
|
|
4424
|
+
(function(t, e, u) {
|
|
4424
4425
|
r.exports = e(M(), s0(), c0(), a0(), X());
|
|
4425
|
-
})(
|
|
4426
|
+
})(Fx, function(t) {
|
|
4426
4427
|
return (function() {
|
|
4427
|
-
var e = t,
|
|
4428
|
+
var e = t, u = e.lib, p = u.BlockCipher, m = e.algo;
|
|
4428
4429
|
const B = 16, C = [
|
|
4429
4430
|
608135816,
|
|
4430
4431
|
2242054355,
|
|
@@ -5539,59 +5540,59 @@ function Dx() {
|
|
|
5539
5540
|
});
|
|
5540
5541
|
})(sr)), sr.exports;
|
|
5541
5542
|
}
|
|
5542
|
-
var
|
|
5543
|
-
function
|
|
5544
|
-
return
|
|
5545
|
-
(function(t, e,
|
|
5546
|
-
r.exports = e(M(),
|
|
5547
|
-
})(
|
|
5543
|
+
var Dx = y0.exports, Ee;
|
|
5544
|
+
function bx() {
|
|
5545
|
+
return Ee || (Ee = 1, (function(r, d) {
|
|
5546
|
+
(function(t, e, u) {
|
|
5547
|
+
r.exports = e(M(), ur(), At(), gt(), s0(), mt(), c0(), we(), Ar(), St(), ke(), Rt(), zt(), It(), Fr(), qt(), a0(), X(), Ut(), Gt(), Xt(), Zt(), Vt(), rx(), tx(), nx(), ox(), sx(), fx(), dx(), hx(), px(), Cx(), Ax(), gx());
|
|
5548
|
+
})(Dx, function(t) {
|
|
5548
5549
|
return t;
|
|
5549
5550
|
});
|
|
5550
5551
|
})(y0)), y0.exports;
|
|
5551
5552
|
}
|
|
5552
|
-
|
|
5553
|
-
let
|
|
5553
|
+
bx();
|
|
5554
|
+
let Se = null, He = null, $e = null, Re = null;
|
|
5554
5555
|
Math.random().toString(36).substring(7);
|
|
5555
|
-
function
|
|
5556
|
-
|
|
5556
|
+
function mx(r) {
|
|
5557
|
+
Se = r.token, He = r.apiUrl, $e = r.deviceId, Re = r.domain;
|
|
5557
5558
|
}
|
|
5558
|
-
function
|
|
5559
|
+
function _x() {
|
|
5559
5560
|
return {
|
|
5560
|
-
token:
|
|
5561
|
-
apiUrl:
|
|
5562
|
-
deviceId:
|
|
5563
|
-
domain:
|
|
5561
|
+
token: Se,
|
|
5562
|
+
apiUrl: He,
|
|
5563
|
+
deviceId: $e,
|
|
5564
|
+
domain: Re
|
|
5564
5565
|
};
|
|
5565
5566
|
}
|
|
5566
|
-
function
|
|
5567
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5567
|
+
function yx(r) {
|
|
5568
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.158`;
|
|
5568
5569
|
}
|
|
5569
|
-
function
|
|
5570
|
-
const t =
|
|
5571
|
-
return new Worker(t, { type: "module", ...
|
|
5570
|
+
function wx(r, d) {
|
|
5571
|
+
const t = yx(r);
|
|
5572
|
+
return new Worker(t, { type: "module", ...d });
|
|
5572
5573
|
}
|
|
5573
|
-
const
|
|
5574
|
+
const gr = () => {
|
|
5574
5575
|
try {
|
|
5575
5576
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5576
5577
|
} catch {
|
|
5577
5578
|
}
|
|
5578
5579
|
return !1;
|
|
5579
5580
|
}, m0 = (...r) => {
|
|
5580
|
-
|
|
5581
|
-
},
|
|
5582
|
-
|
|
5583
|
-
},
|
|
5584
|
-
let
|
|
5585
|
-
function
|
|
5586
|
-
const
|
|
5587
|
-
if (
|
|
5588
|
-
const t =
|
|
5581
|
+
gr();
|
|
5582
|
+
}, Ae = (...r) => {
|
|
5583
|
+
gr();
|
|
5584
|
+
}, Fe = /* @__PURE__ */ new Map(), Br = /* @__PURE__ */ new Map();
|
|
5585
|
+
let kx = 0;
|
|
5586
|
+
function Sx(r) {
|
|
5587
|
+
const d = Fe.get(r);
|
|
5588
|
+
if (d) return d;
|
|
5589
|
+
const t = wx("./deform.worker.ts");
|
|
5589
5590
|
try {
|
|
5590
|
-
t.postMessage({ type: "SET_DEBUG", debugRender:
|
|
5591
|
+
t.postMessage({ type: "SET_DEBUG", debugRender: gr() });
|
|
5591
5592
|
} catch {
|
|
5592
5593
|
}
|
|
5593
|
-
t.onmessage = (
|
|
5594
|
-
const { id: p, imageBitmap: m, error: B, duration: C } =
|
|
5594
|
+
t.onmessage = (u) => {
|
|
5595
|
+
const { id: p, imageBitmap: m, error: B, duration: C } = u.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5595
5596
|
m0(`[renderService] deform worker 响应 id=${p}${x}`, {
|
|
5596
5597
|
hasImageBitmap: !!m,
|
|
5597
5598
|
width: m?.width,
|
|
@@ -5606,39 +5607,39 @@ function Hx(r) {
|
|
|
5606
5607
|
}
|
|
5607
5608
|
n.resolve(m);
|
|
5608
5609
|
}
|
|
5609
|
-
}, t.onerror = (
|
|
5610
|
+
}, t.onerror = (u) => {
|
|
5610
5611
|
};
|
|
5611
5612
|
const e = () => {
|
|
5612
|
-
const
|
|
5613
|
+
const u = _x();
|
|
5613
5614
|
return m0("🔍 [workerManager] 检查 License Token:", {
|
|
5614
|
-
hasToken: !!
|
|
5615
|
-
tokenPreview:
|
|
5615
|
+
hasToken: !!u.token,
|
|
5616
|
+
tokenPreview: u.token ? u.token.substring(0, 20) + "..." : "undefined",
|
|
5616
5617
|
faceId: r,
|
|
5617
5618
|
source: "licenseStore模块"
|
|
5618
|
-
}),
|
|
5619
|
+
}), u.token ? (m0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5619
5620
|
type: "SET_LICENSE",
|
|
5620
|
-
licenseToken:
|
|
5621
|
-
licenseApiUrl:
|
|
5622
|
-
deviceId:
|
|
5623
|
-
domain:
|
|
5621
|
+
licenseToken: u.token,
|
|
5622
|
+
licenseApiUrl: u.apiUrl,
|
|
5623
|
+
deviceId: u.deviceId,
|
|
5624
|
+
domain: u.domain
|
|
5624
5625
|
}), !0) : !1;
|
|
5625
5626
|
};
|
|
5626
5627
|
return e() || (m0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5627
|
-
e() ||
|
|
5628
|
+
e() || Ae("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5628
5629
|
}, 200), setTimeout(() => {
|
|
5629
|
-
e() ||
|
|
5630
|
-
}, 500)),
|
|
5630
|
+
e() || Ae("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
5631
|
+
}, 500)), Fe.set(r, t), t;
|
|
5631
5632
|
}
|
|
5632
|
-
function
|
|
5633
|
+
function Hx(r) {
|
|
5633
5634
|
return {
|
|
5634
5635
|
name: r.name,
|
|
5635
5636
|
type: r.type,
|
|
5636
5637
|
blendMode: r.blendMode,
|
|
5637
5638
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5638
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5639
|
-
x:
|
|
5640
|
-
y:
|
|
5641
|
-
type:
|
|
5639
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((d) => ({
|
|
5640
|
+
x: d.x,
|
|
5641
|
+
y: d.y,
|
|
5642
|
+
type: d.type
|
|
5642
5643
|
})) : [],
|
|
5643
5644
|
bounds: r.bounds ? {
|
|
5644
5645
|
width: r.bounds.width,
|
|
@@ -5661,30 +5662,30 @@ function $x(r) {
|
|
|
5661
5662
|
layerOrder: r.layerOrder,
|
|
5662
5663
|
imagePath: r.imagePath,
|
|
5663
5664
|
vectorMask: r.vectorMask ? {
|
|
5664
|
-
paths: r.vectorMask.paths?.map((
|
|
5665
|
-
open:
|
|
5666
|
-
knots:
|
|
5665
|
+
paths: r.vectorMask.paths?.map((d) => ({
|
|
5666
|
+
open: d.open,
|
|
5667
|
+
knots: d.knots?.map((t) => ({
|
|
5667
5668
|
linked: t.linked,
|
|
5668
5669
|
points: [...t.points]
|
|
5669
5670
|
})),
|
|
5670
|
-
fillRule:
|
|
5671
|
-
operation:
|
|
5671
|
+
fillRule: d.fillRule,
|
|
5672
|
+
operation: d.operation
|
|
5672
5673
|
})),
|
|
5673
|
-
points: r.vectorMask.points?.map((
|
|
5674
|
-
x:
|
|
5675
|
-
y:
|
|
5676
|
-
type:
|
|
5674
|
+
points: r.vectorMask.points?.map((d) => ({
|
|
5675
|
+
x: d.x,
|
|
5676
|
+
y: d.y,
|
|
5677
|
+
type: d.type
|
|
5677
5678
|
})),
|
|
5678
5679
|
invert: r.vectorMask.invert,
|
|
5679
5680
|
notLink: r.vectorMask.notLink,
|
|
5680
5681
|
disable: r.vectorMask.disable,
|
|
5681
5682
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5682
5683
|
} : void 0,
|
|
5683
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5684
|
-
type:
|
|
5685
|
-
enabled:
|
|
5686
|
-
filter:
|
|
5687
|
-
puppetShapeList:
|
|
5684
|
+
filterList: r.filterList ? r.filterList.map((d) => ({
|
|
5685
|
+
type: d.type,
|
|
5686
|
+
enabled: d.enabled,
|
|
5687
|
+
filter: d.filter ? {
|
|
5688
|
+
puppetShapeList: d.filter.puppetShapeList?.map((t) => ({
|
|
5688
5689
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5689
5690
|
x: e.x,
|
|
5690
5691
|
y: e.y
|
|
@@ -5701,47 +5702,47 @@ function $x(r) {
|
|
|
5701
5702
|
clipping: r.clipping
|
|
5702
5703
|
};
|
|
5703
5704
|
}
|
|
5704
|
-
function
|
|
5705
|
-
const
|
|
5705
|
+
function $x(r, d, t, e) {
|
|
5706
|
+
const u = ++kx, p = Sx(t);
|
|
5706
5707
|
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((m, B) => {
|
|
5707
|
-
Br.set(
|
|
5708
|
+
Br.set(u, {
|
|
5708
5709
|
resolve: (x) => {
|
|
5709
5710
|
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), m(x);
|
|
5710
5711
|
},
|
|
5711
5712
|
reject: B
|
|
5712
5713
|
});
|
|
5713
|
-
const C =
|
|
5714
|
-
p.postMessage({ id:
|
|
5714
|
+
const C = Hx(d);
|
|
5715
|
+
p.postMessage({ id: u, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5715
5716
|
r
|
|
5716
5717
|
]);
|
|
5717
5718
|
});
|
|
5718
5719
|
}
|
|
5719
|
-
async function
|
|
5720
|
-
const m = await
|
|
5720
|
+
async function Rx(r, d, t = 0, e, u, p) {
|
|
5721
|
+
const m = await ft(r, u, p);
|
|
5721
5722
|
if (!m || m.width === 0 || m.height === 0)
|
|
5722
5723
|
throw new Error("图片无效:尺寸为 0");
|
|
5723
|
-
return await
|
|
5724
|
+
return await $x(m, d, t, e);
|
|
5724
5725
|
}
|
|
5725
|
-
function l0(r,
|
|
5726
|
+
function l0(r, d) {
|
|
5726
5727
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5727
|
-
return new OffscreenCanvas(r,
|
|
5728
|
+
return new OffscreenCanvas(r, d);
|
|
5728
5729
|
if (typeof document < "u") {
|
|
5729
5730
|
const t = document.createElement("canvas");
|
|
5730
|
-
return t.width = r, t.height =
|
|
5731
|
+
return t.width = r, t.height = d, t;
|
|
5731
5732
|
} else
|
|
5732
5733
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5733
5734
|
}
|
|
5734
5735
|
function F0(r) {
|
|
5735
5736
|
return r.getContext("2d");
|
|
5736
5737
|
}
|
|
5737
|
-
function
|
|
5738
|
-
const
|
|
5739
|
-
if (!
|
|
5738
|
+
function ge(r) {
|
|
5739
|
+
const d = F0(r);
|
|
5740
|
+
if (!d)
|
|
5740
5741
|
throw new Error("无法创建 canvas context");
|
|
5741
|
-
return
|
|
5742
|
+
return d;
|
|
5742
5743
|
}
|
|
5743
|
-
async function
|
|
5744
|
-
const
|
|
5744
|
+
async function Px(r) {
|
|
5745
|
+
const d = performance.now(), t = () => {
|
|
5745
5746
|
try {
|
|
5746
5747
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5747
5748
|
} catch {
|
|
@@ -5749,7 +5750,7 @@ async function zx(r) {
|
|
|
5749
5750
|
return !1;
|
|
5750
5751
|
}, e = (...c) => {
|
|
5751
5752
|
t();
|
|
5752
|
-
},
|
|
5753
|
+
}, u = (...c) => {
|
|
5753
5754
|
t();
|
|
5754
5755
|
}, {
|
|
5755
5756
|
psdJson: p,
|
|
@@ -5787,7 +5788,7 @@ async function zx(r) {
|
|
|
5787
5788
|
const _ = new URL(c, n).toString();
|
|
5788
5789
|
return !_.includes("http") && !_.startsWith("data:") && !_.startsWith("blob:") ? void 0 : _;
|
|
5789
5790
|
} catch (_) {
|
|
5790
|
-
|
|
5791
|
+
u(`[renderByJson] 解析图片 URL 失败: ${c}`, _);
|
|
5791
5792
|
return;
|
|
5792
5793
|
}
|
|
5793
5794
|
}, s = {}, f = /* @__PURE__ */ new Map();
|
|
@@ -5856,10 +5857,10 @@ async function zx(r) {
|
|
|
5856
5857
|
for (const P of c.children)
|
|
5857
5858
|
if (P && P.isSmartObject === !0) {
|
|
5858
5859
|
const L = P?.name || "";
|
|
5859
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) :
|
|
5860
|
+
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");
|
|
5860
5861
|
}
|
|
5861
5862
|
} else
|
|
5862
|
-
|
|
5863
|
+
u(`[renderByJson] ⚠️ Group id=${_} 没有 children`);
|
|
5863
5864
|
} else
|
|
5864
5865
|
e(`[renderByJson] ⚠️ Group id=${_}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5865
5866
|
if (c.children)
|
|
@@ -5872,7 +5873,7 @@ async function zx(r) {
|
|
|
5872
5873
|
if (p.layerList)
|
|
5873
5874
|
for (const c of p.layerList)
|
|
5874
5875
|
c && D(c);
|
|
5875
|
-
const o =
|
|
5876
|
+
const o = Ve([{
|
|
5876
5877
|
psdJson: p,
|
|
5877
5878
|
layerExtrasByName: s
|
|
5878
5879
|
}], {
|
|
@@ -5884,7 +5885,7 @@ async function zx(r) {
|
|
|
5884
5885
|
const l = o.models[0];
|
|
5885
5886
|
if (!l.psdPartData)
|
|
5886
5887
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5887
|
-
const b = l.width, g = l.height, y = l0(b, g), k =
|
|
5888
|
+
const b = l.width, g = l.height, y = l0(b, g), k = ge(y), R = [], F = (c) => {
|
|
5888
5889
|
if (c.url && s[c.url])
|
|
5889
5890
|
return s[c.url];
|
|
5890
5891
|
if (c.url) {
|
|
@@ -5906,12 +5907,12 @@ async function zx(r) {
|
|
|
5906
5907
|
const A = l.psdPartData[c], _ = F(A);
|
|
5907
5908
|
if (A.type === g0.Layer) {
|
|
5908
5909
|
if (!_ || !_.url) {
|
|
5909
|
-
|
|
5910
|
+
u(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5910
5911
|
continue;
|
|
5911
5912
|
}
|
|
5912
5913
|
const W = _.url, P = a(W);
|
|
5913
5914
|
if (!P) {
|
|
5914
|
-
|
|
5915
|
+
u(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5915
5916
|
continue;
|
|
5916
5917
|
}
|
|
5917
5918
|
R.push({
|
|
@@ -5950,14 +5951,14 @@ async function zx(r) {
|
|
|
5950
5951
|
continue;
|
|
5951
5952
|
I = G;
|
|
5952
5953
|
}
|
|
5953
|
-
const Z = (A.partId ?? A.id) * 100 + W, Q =
|
|
5954
|
+
const Z = (A.partId ?? A.id) * 100 + W, Q = rt(Je(P)), o0 = { width: b, height: g };
|
|
5954
5955
|
R.push({
|
|
5955
5956
|
index: c + W * 0.01,
|
|
5956
5957
|
type: "group",
|
|
5957
5958
|
partData: A,
|
|
5958
5959
|
smartObject: P,
|
|
5959
5960
|
maskData: Q,
|
|
5960
|
-
promise:
|
|
5961
|
+
promise: Rx(
|
|
5961
5962
|
I,
|
|
5962
5963
|
P,
|
|
5963
5964
|
Z,
|
|
@@ -5980,7 +5981,7 @@ async function zx(r) {
|
|
|
5980
5981
|
for (let c = 0; c < H.length; c++) {
|
|
5981
5982
|
const { task: A, imageBitmap: _ } = H[c];
|
|
5982
5983
|
if (!_) {
|
|
5983
|
-
|
|
5984
|
+
u(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5984
5985
|
continue;
|
|
5985
5986
|
}
|
|
5986
5987
|
const { partData: W } = A, P = W.bounds;
|
|
@@ -6038,7 +6039,7 @@ async function zx(r) {
|
|
|
6038
6039
|
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6039
6040
|
}
|
|
6040
6041
|
} else {
|
|
6041
|
-
if (k.globalCompositeOperation =
|
|
6042
|
+
if (k.globalCompositeOperation = Ir(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6042
6043
|
if (A.maskData) {
|
|
6043
6044
|
const K = l0(b, g), G = F0(K);
|
|
6044
6045
|
G && (G.drawImage(_, 0, 0), lr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
@@ -6053,7 +6054,7 @@ async function zx(r) {
|
|
|
6053
6054
|
) : k.drawImage(_, 0, 0));
|
|
6054
6055
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6055
6056
|
}
|
|
6056
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6057
|
+
O && !Q && (k.globalCompositeOperation = Ir(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6057
6058
|
}
|
|
6058
6059
|
$ = null, z = null;
|
|
6059
6060
|
let U = y, T = b, N = g;
|
|
@@ -6068,22 +6069,22 @@ async function zx(r) {
|
|
|
6068
6069
|
T = Math.round(b * A), N = x;
|
|
6069
6070
|
}
|
|
6070
6071
|
U = l0(T, N);
|
|
6071
|
-
const c =
|
|
6072
|
+
const c = ge(U);
|
|
6072
6073
|
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b, g, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${g} -> ${T}x${N}`);
|
|
6073
6074
|
}
|
|
6074
|
-
const S = performance.now() -
|
|
6075
|
+
const S = performance.now() - d;
|
|
6075
6076
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6076
6077
|
canvas: U,
|
|
6077
6078
|
width: T,
|
|
6078
6079
|
height: N
|
|
6079
6080
|
};
|
|
6080
6081
|
}
|
|
6081
|
-
const
|
|
6082
|
-
const t = (await
|
|
6082
|
+
const Pe = async (r) => {
|
|
6083
|
+
const t = (await Px(r)).canvas;
|
|
6083
6084
|
return t ? createImageBitmap(t) : null;
|
|
6084
6085
|
};
|
|
6085
6086
|
let i0 = null, vr = !1;
|
|
6086
|
-
const
|
|
6087
|
+
const ze = async () => {
|
|
6087
6088
|
if (!vr) {
|
|
6088
6089
|
vr = !0;
|
|
6089
6090
|
try {
|
|
@@ -6091,30 +6092,30 @@ const We = async () => {
|
|
|
6091
6092
|
const r = i0;
|
|
6092
6093
|
i0 = null;
|
|
6093
6094
|
try {
|
|
6094
|
-
const
|
|
6095
|
+
const d = await Pe(r.renderData);
|
|
6095
6096
|
if (i0) {
|
|
6096
|
-
|
|
6097
|
+
d?.close?.();
|
|
6097
6098
|
continue;
|
|
6098
6099
|
}
|
|
6099
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6100
|
-
} catch (
|
|
6100
|
+
self.postMessage({ id: r.id, bitmap: d }, d ? [d] : []);
|
|
6101
|
+
} catch (d) {
|
|
6101
6102
|
if (i0) continue;
|
|
6102
6103
|
self.postMessage({
|
|
6103
6104
|
id: r.id,
|
|
6104
|
-
error:
|
|
6105
|
+
error: d instanceof Error ? d.message : String(d)
|
|
6105
6106
|
});
|
|
6106
6107
|
}
|
|
6107
6108
|
}
|
|
6108
6109
|
} finally {
|
|
6109
|
-
vr = !1, i0 &&
|
|
6110
|
+
vr = !1, i0 && ze();
|
|
6110
6111
|
}
|
|
6111
6112
|
}
|
|
6112
6113
|
};
|
|
6113
6114
|
self.onmessage = async (r) => {
|
|
6114
|
-
const
|
|
6115
|
-
if (
|
|
6116
|
-
const e =
|
|
6117
|
-
|
|
6115
|
+
const d = r.data;
|
|
6116
|
+
if (d && typeof d == "object" && "type" in d && d.type === "SET_LICENSE") {
|
|
6117
|
+
const e = d;
|
|
6118
|
+
mx({
|
|
6118
6119
|
token: e.licenseToken,
|
|
6119
6120
|
apiUrl: e.licenseApiUrl,
|
|
6120
6121
|
deviceId: e.deviceId,
|
|
@@ -6122,13 +6123,13 @@ self.onmessage = async (r) => {
|
|
|
6122
6123
|
});
|
|
6123
6124
|
return;
|
|
6124
6125
|
}
|
|
6125
|
-
const t =
|
|
6126
|
+
const t = d;
|
|
6126
6127
|
if (t.coalesce === !0) {
|
|
6127
|
-
i0 = { id: t.id, renderData: t.renderData },
|
|
6128
|
+
i0 = { id: t.id, renderData: t.renderData }, ze();
|
|
6128
6129
|
return;
|
|
6129
6130
|
}
|
|
6130
6131
|
try {
|
|
6131
|
-
const e = await
|
|
6132
|
+
const e = await Pe(t.renderData);
|
|
6132
6133
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|
|
6133
6134
|
} catch (e) {
|
|
6134
6135
|
self.postMessage({
|