@jieyin/editor-sdk-test 1.1.167 → 1.1.168
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 +6162 -6156
- package/dist/renderWorker.js +1010 -1003
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var D0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(D0 || {});
|
|
2
|
-
function
|
|
3
|
-
let
|
|
2
|
+
function rt(r) {
|
|
3
|
+
let h = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = h;
|
|
6
|
+
return h += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function et(r, h) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,29 +23,29 @@ function tt(r, l) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? h,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
if (r.type === "Group" &&
|
|
35
|
-
const x = r.children[0].name, n =
|
|
36
|
-
(E !== void 0 || n?.id !== void 0) && (
|
|
32
|
+
function tt(r, h, t, e) {
|
|
33
|
+
let f = r.name || "", v = h[f], _ = v?.partId ?? (r.type === "Group" ? t.get(f) : void 0);
|
|
34
|
+
if (r.type === "Group" && _ === void 0 && (!v || v.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
+
const x = r.children[0].name, n = h[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (f = x, v = n, _ = E);
|
|
37
37
|
}
|
|
38
38
|
const B = r.id ?? v?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
41
|
id: B,
|
|
42
|
-
partId:
|
|
43
|
-
name:
|
|
42
|
+
partId: _,
|
|
43
|
+
name: f,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
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) => et(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
@@ -64,37 +64,37 @@ function xt(r, l, t, e) {
|
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function xt(r, h) {
|
|
68
|
+
const t = new Map(h.parts.map((f) => [f.name, f.id])), e = rt(h.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const v =
|
|
70
|
+
parts: h.parts,
|
|
71
|
+
models: r.map((f) => {
|
|
72
|
+
const v = f.layerExtrasByName ?? {}, _ = f.psdJson, B = _.layerList || _.layerList || [], C = _.canvasWidth, x = _.canvasHeight;
|
|
73
73
|
if (!C || !x)
|
|
74
74
|
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${C}, canvasHeight=${x}。请确保 jsonurl 中的 canvasWidth 和 canvasHeight 存在`);
|
|
75
75
|
const n = (s) => {
|
|
76
76
|
const u = [];
|
|
77
77
|
for (const p of s)
|
|
78
78
|
if (p.type === "Group" && p.children) {
|
|
79
|
-
const
|
|
79
|
+
const l = [], D = [], i = [...p.children].sort((o, d) => {
|
|
80
80
|
const b = o.layerOrder ?? 0, g = d.layerOrder ?? 0;
|
|
81
81
|
return b - g;
|
|
82
82
|
});
|
|
83
83
|
for (const o of i)
|
|
84
|
-
o.isSmartObject === !0 ?
|
|
84
|
+
o.isSmartObject === !0 ? l.push(o) : D.push(o);
|
|
85
85
|
if (D.length > 0) {
|
|
86
86
|
const o = n(D);
|
|
87
87
|
u.push(...o);
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
l.length > 0 && u.push({
|
|
90
90
|
...p,
|
|
91
|
-
children:
|
|
91
|
+
children: l
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
94
|
u.push(p);
|
|
95
95
|
return u;
|
|
96
96
|
}, a = n(B).map(
|
|
97
|
-
(s) =>
|
|
97
|
+
(s) => tt(s, v, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -104,50 +104,50 @@ function nt(r, l) {
|
|
|
104
104
|
})
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function nt(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 at(r) {
|
|
111
111
|
return r ? r.type === "bezier" ? {
|
|
112
112
|
type: "bezier",
|
|
113
|
-
paths: r.paths.map((
|
|
114
|
-
open: !!
|
|
115
|
-
knots:
|
|
113
|
+
paths: r.paths.map((h) => ({
|
|
114
|
+
open: !!h.open,
|
|
115
|
+
knots: h.knots.map((t) => ({
|
|
116
116
|
linked: !!t.linked,
|
|
117
117
|
points: Array.isArray(t.points) ? [...t.points] : []
|
|
118
118
|
}))
|
|
119
119
|
}))
|
|
120
120
|
} : r.type === "simple" ? {
|
|
121
121
|
type: "simple",
|
|
122
|
-
points: r.points.map((
|
|
123
|
-
x:
|
|
124
|
-
y:
|
|
125
|
-
type:
|
|
122
|
+
points: r.points.map((h) => ({
|
|
123
|
+
x: h.x,
|
|
124
|
+
y: h.y,
|
|
125
|
+
type: h.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function pr(r, h) {
|
|
130
|
+
if (h) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), h.type === "bezier" && Array.isArray(h.paths))
|
|
132
|
+
h.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
135
|
+
const f = e[0];
|
|
136
|
+
r.moveTo(f.points[2], f.points[3]);
|
|
137
137
|
for (let v = 0; v < e.length; v++) {
|
|
138
|
-
const
|
|
138
|
+
const _ = e[v];
|
|
139
139
|
let B = (v + 1) % e.length;
|
|
140
140
|
if (!t.open && v === e.length - 1)
|
|
141
141
|
B = 0;
|
|
142
142
|
else if (t.open && v === e.length - 1)
|
|
143
143
|
break;
|
|
144
|
-
const C = e[B], x =
|
|
144
|
+
const C = e[B], x = _.points[4], n = _.points[5], E = C.points[0], a = C.points[1], s = C.points[2], u = C.points[3];
|
|
145
145
|
r.bezierCurveTo(x, n, E, a, s, u);
|
|
146
146
|
}
|
|
147
147
|
t.open || r.closePath();
|
|
148
148
|
});
|
|
149
|
-
else if (
|
|
150
|
-
const t =
|
|
149
|
+
else if (h.type === "simple" && Array.isArray(h.points)) {
|
|
150
|
+
const t = h.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -161,10 +161,10 @@ class p0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(h) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(h);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class p0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(h, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(h, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class p0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(h) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(h), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -251,10 +251,10 @@ class v0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(h) {
|
|
255
255
|
try {
|
|
256
256
|
const t = dr.getOrigin();
|
|
257
|
-
return new URL(
|
|
257
|
+
return new URL(h, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,232 +262,239 @@ class v0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(h, t, e) {
|
|
266
|
+
const f = this.parse(h);
|
|
267
|
+
return !f || f.searchParams.has(t) ? h : (f.searchParams.set(t, e), this.formatUrl(h, f));
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* 移除查询参数
|
|
271
271
|
*/
|
|
272
|
-
static removeParam(
|
|
273
|
-
const e = this.parse(
|
|
274
|
-
return !e || !e.searchParams.has(t) ?
|
|
272
|
+
static removeParam(h, t) {
|
|
273
|
+
const e = this.parse(h);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? h : (e.searchParams.delete(t), this.formatUrl(h, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(h, t) {
|
|
280
|
+
return this.parse(h)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
287
|
-
return e ? t.toString() :
|
|
285
|
+
static formatUrl(h, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(h), f = h.startsWith("//");
|
|
287
|
+
return e ? t.toString() : f ? t.toString().replace(/^https?:/, "") : `${t.pathname}${t.search}${t.hash}`;
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* 检查是否为数据 URL
|
|
291
291
|
*/
|
|
292
|
-
static isDataUrl(
|
|
293
|
-
return
|
|
292
|
+
static isDataUrl(h) {
|
|
293
|
+
return h?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(h) {
|
|
299
|
+
return h?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
return r;
|
|
306
|
-
}, ur();
|
|
302
|
+
const ot = /* @__PURE__ */ new Map(), it = /* @__PURE__ */ new Map();
|
|
303
|
+
function st() {
|
|
304
|
+
ot.clear(), it.clear();
|
|
307
305
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
const t = lr, e = r();
|
|
306
|
+
(function(r, h) {
|
|
307
|
+
const t = J, e = r();
|
|
311
308
|
for (; ; )
|
|
312
309
|
try {
|
|
313
|
-
if (
|
|
310
|
+
if (parseInt(t(368)) / 1 + -parseInt(t(332)) / 2 + -parseInt(t(344)) / 3 + parseInt(t(357)) / 4 + parseInt(t(338)) / 5 * (parseInt(t(339)) / 6) + parseInt(t(361)) / 7 * (parseInt(t(353)) / 8) + parseInt(t(350)) / 9 === h) break;
|
|
314
311
|
e.push(e.shift());
|
|
315
312
|
} catch {
|
|
316
313
|
e.push(e.shift());
|
|
317
314
|
}
|
|
318
|
-
})(ur,
|
|
315
|
+
})(ur, 19241 * 31 + 37 * -16797 + 16278 * 27);
|
|
319
316
|
const F0 = /* @__PURE__ */ (function() {
|
|
320
317
|
let r = !0;
|
|
321
|
-
return function(
|
|
318
|
+
return function(h, t) {
|
|
322
319
|
const e = r ? function() {
|
|
323
|
-
const c = lr;
|
|
324
320
|
if (t) {
|
|
325
|
-
const
|
|
326
|
-
return t = null,
|
|
321
|
+
const f = t.apply(h, arguments);
|
|
322
|
+
return t = null, f;
|
|
327
323
|
}
|
|
328
324
|
} : function() {
|
|
329
325
|
};
|
|
330
326
|
return r = !1, e;
|
|
331
327
|
};
|
|
332
|
-
})(),
|
|
333
|
-
const r =
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
328
|
+
})(), ct = F0(void 0, function() {
|
|
329
|
+
const r = J, h = function() {
|
|
330
|
+
const v = J;
|
|
331
|
+
let _;
|
|
332
|
+
try {
|
|
333
|
+
_ = Function("return (function() " + ("{}.constru" + v(336) + v(351) + 'rn this")( )') + ");")();
|
|
334
|
+
} catch {
|
|
335
|
+
_ = window;
|
|
336
|
+
}
|
|
337
|
+
return _;
|
|
338
|
+
}, t = h(), e = t[r(354) + "le"] = t.console || {}, f = ["log", r(335), r(356), "error", "excep" + r(345), "table", "trace"];
|
|
339
|
+
for (let v = 15898 + 1 * -15898; v < f[r(346) + "h"]; v++) {
|
|
340
|
+
const _ = F0.constructor[r(367) + "type"].bind(F0), B = f[v], C = e[B] || _;
|
|
341
|
+
_["__pro" + r(333)] = F0.bind(F0), _[r(365) + "ing"] = C.toString[r(334)](C), e[B] = _;
|
|
344
342
|
}
|
|
345
343
|
});
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
function
|
|
349
|
-
return p0
|
|
344
|
+
ct();
|
|
345
|
+
const gr = "file_token", Dr = "file_token_expire_time", ft = (-35 + -11 * 786 + 8741) * (4907 + 1 * -3907);
|
|
346
|
+
function Ar() {
|
|
347
|
+
return p0[J(364) + "em"](gr);
|
|
350
348
|
}
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
349
|
+
function ut(r = ft) {
|
|
350
|
+
const h = J;
|
|
351
|
+
if (!Ar()) return !0;
|
|
352
|
+
const e = p0.getItem(Dr);
|
|
353
|
+
if (!e) return !1;
|
|
354
|
+
const f = Number(e);
|
|
355
|
+
return Date[h(362)]() + r > f;
|
|
357
356
|
}
|
|
358
|
-
function
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
function dt(r, h) {
|
|
358
|
+
const t = J;
|
|
359
|
+
if (p0.setItem(gr, r), typeof h == t(359) + "r" && h > -4424 + -2 * -2212) {
|
|
360
|
+
const e = Date[t(362)]() + h * 1e3;
|
|
361
|
+
p0[t(337) + "em"](Dr, String(e));
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
function ut() {
|
|
368
|
-
const r = x0;
|
|
369
|
-
p0.removeItem(Dr), p0[r(294) + r(301)](br), Ft();
|
|
364
|
+
function lt() {
|
|
365
|
+
const r = J;
|
|
366
|
+
p0[r(341) + "eItem"](gr), p0[r(341) + "eItem"](Dr), Dt(), st();
|
|
370
367
|
}
|
|
371
|
-
async function
|
|
372
|
-
const
|
|
373
|
-
return t?.data?.code ===
|
|
368
|
+
async function Or(r) {
|
|
369
|
+
const h = J, t = await r(), e = t?.data?.data;
|
|
370
|
+
return t?.data?.code === -2 * -3851 + -9160 + 1658 && e?.[h(370) + "token"] ? (dt(e.file_token, e.expires_in), e[h(370) + h(347)]) : null;
|
|
374
371
|
}
|
|
375
|
-
let
|
|
376
|
-
function
|
|
377
|
-
return dr
|
|
372
|
+
let ht = null;
|
|
373
|
+
function qr() {
|
|
374
|
+
return dr[J(363) + "wser"]() ? ht : null;
|
|
378
375
|
}
|
|
379
|
-
async function
|
|
380
|
-
const r =
|
|
381
|
-
if (!dr
|
|
382
|
-
const
|
|
383
|
-
if (
|
|
376
|
+
async function ye() {
|
|
377
|
+
const r = J;
|
|
378
|
+
if (!dr.isBrowser()) return Ar();
|
|
379
|
+
const h = Ar();
|
|
380
|
+
if (h && !ut()) return h;
|
|
384
381
|
try {
|
|
385
|
-
const t = await
|
|
386
|
-
if (
|
|
387
|
-
const e = await
|
|
382
|
+
const t = await qr();
|
|
383
|
+
if (h && t?.["fetchFileTokenRefresh"]) {
|
|
384
|
+
const e = await Or(t[r(352) + "FileT" + r(343) + "efresh"]);
|
|
388
385
|
if (e) return e;
|
|
389
386
|
}
|
|
390
387
|
} catch {
|
|
391
388
|
}
|
|
392
389
|
try {
|
|
393
|
-
const t =
|
|
394
|
-
return t?.[
|
|
390
|
+
const t = qr();
|
|
391
|
+
return t?.["fetchFileT" + r(355)] ? await Or(t.fetchFileToken) : null;
|
|
395
392
|
} catch {
|
|
396
393
|
return null;
|
|
397
394
|
}
|
|
398
395
|
}
|
|
399
|
-
function
|
|
400
|
-
const
|
|
401
|
-
if (!r || v0
|
|
396
|
+
function we(r) {
|
|
397
|
+
const h = J;
|
|
398
|
+
if (!r || v0.isDataUrl(r) || v0.isBlobUrl(r)) return !1;
|
|
402
399
|
const t = v0.parse(r);
|
|
403
|
-
return t ? t.
|
|
400
|
+
return t ? t["pathn" + h(349)].includes("/files/") && !v0.hasParam(r, "fileToken") : r.includes(h(348) + "s/") && !r["inclu" + h(340)]("fileToken=");
|
|
404
401
|
}
|
|
405
|
-
function
|
|
406
|
-
return !
|
|
402
|
+
function ke(r, h) {
|
|
403
|
+
return !h || !we(r) ? r : v0.addParam(r, "fileToken", h);
|
|
407
404
|
}
|
|
408
|
-
function
|
|
405
|
+
function Se(r) {
|
|
409
406
|
return v0.removeParam(r, "fileToken");
|
|
410
407
|
}
|
|
411
|
-
async function
|
|
412
|
-
if (!
|
|
413
|
-
const
|
|
414
|
-
return
|
|
408
|
+
async function vt(r) {
|
|
409
|
+
if (!we(r)) return r;
|
|
410
|
+
const h = await ye();
|
|
411
|
+
return ke(r, h);
|
|
415
412
|
}
|
|
416
|
-
const
|
|
417
|
-
function
|
|
418
|
-
|
|
413
|
+
const Br = /* @__PURE__ */ new Map();
|
|
414
|
+
function ur() {
|
|
415
|
+
const r = ["to__", "bind", "warn", "ctor(", "setIt", "5165ldgKFw", "612mFJCQC", "des", "remov", "clone", "okenR", "550218tLEciM", "tion", "lengt", "token", "/file", "ame", "44019XEWRiD", '"retu', "fetch", "36568OIbizt", "conso", "oken", "info", "754860GMMFmV", "delet", "numbe", "statu", "224kNdCXk", "now", "isBro", "getIt", "toStr", "erCas", "proto", "501817ZmBHaI", "set", "file_", "get", "698334kNNeYF"];
|
|
416
|
+
return ur = function() {
|
|
417
|
+
return r;
|
|
418
|
+
}, ur();
|
|
419
419
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
420
|
+
function J(r, h) {
|
|
421
|
+
return r = r - (13068 + -8 * 1592), ur()[r];
|
|
422
|
+
}
|
|
423
|
+
function pt(r, h) {
|
|
424
|
+
return "GET"["toUpp" + J(366) + "e"]() + "\0" + r;
|
|
425
|
+
}
|
|
426
|
+
async function Bt(r, h) {
|
|
427
|
+
const t = J;
|
|
428
|
+
if (!dr.isBrowser()) return fetch(r, h);
|
|
429
|
+
const e = Se(r), f = pt(e);
|
|
430
|
+
let v = Br[t(371)](f);
|
|
425
431
|
return !v && (v = (async () => {
|
|
432
|
+
const B = t;
|
|
426
433
|
try {
|
|
427
|
-
const
|
|
428
|
-
let
|
|
429
|
-
if (
|
|
430
|
-
|
|
431
|
-
const
|
|
432
|
-
return
|
|
434
|
+
const C = await vt(e);
|
|
435
|
+
let x = await fetch(C, h);
|
|
436
|
+
if (x[B(360) + "s"] !== 32 + 1 * -5381 + 5750) return x;
|
|
437
|
+
lt();
|
|
438
|
+
const n = await ye(), E = ke(e, n);
|
|
439
|
+
return x = await fetch(E, h), x;
|
|
433
440
|
} finally {
|
|
434
|
-
|
|
441
|
+
Br[B(358) + "e"](f);
|
|
435
442
|
}
|
|
436
|
-
})(),
|
|
443
|
+
})(), Br[t(369)](f, v)), (await v)[t(342)]();
|
|
437
444
|
}
|
|
438
|
-
const
|
|
439
|
-
let
|
|
445
|
+
const Ct = 96, Et = 200 * 1024 * 1024, x0 = /* @__PURE__ */ new Map();
|
|
446
|
+
let lr = 0;
|
|
440
447
|
const y0 = /* @__PURE__ */ new Map();
|
|
441
|
-
function
|
|
442
|
-
return `${"GET".toUpperCase()}\0${
|
|
448
|
+
function At(r, h) {
|
|
449
|
+
return `${"GET".toUpperCase()}\0${Se(r)}`;
|
|
443
450
|
}
|
|
444
|
-
function
|
|
445
|
-
const r =
|
|
451
|
+
function Ft() {
|
|
452
|
+
const r = x0.keys().next().value;
|
|
446
453
|
if (r === void 0) return;
|
|
447
|
-
const
|
|
448
|
-
|
|
454
|
+
const h = x0.get(r);
|
|
455
|
+
x0.delete(r), h && (lr -= h.size);
|
|
449
456
|
}
|
|
450
|
-
function
|
|
451
|
-
for (;
|
|
452
|
-
const
|
|
453
|
-
if (!
|
|
454
|
-
|
|
457
|
+
function gt(r) {
|
|
458
|
+
for (; x0.size > 0; ) {
|
|
459
|
+
const h = x0.size >= Ct, t = lr + r > Et;
|
|
460
|
+
if (!h && !t) break;
|
|
461
|
+
Ft();
|
|
455
462
|
}
|
|
456
463
|
}
|
|
457
|
-
async function
|
|
458
|
-
const t =
|
|
464
|
+
async function He(r, h) {
|
|
465
|
+
const t = At(r), e = x0.get(t);
|
|
459
466
|
if (e)
|
|
460
|
-
return
|
|
461
|
-
let
|
|
462
|
-
return
|
|
467
|
+
return x0.delete(t), x0.set(t, e), e;
|
|
468
|
+
let f = y0.get(t);
|
|
469
|
+
return f || (f = (async () => {
|
|
463
470
|
try {
|
|
464
|
-
const v = await
|
|
471
|
+
const v = await Bt(r, h);
|
|
465
472
|
if (!v.ok)
|
|
466
473
|
throw new Error(`fetch failed: ${v.status} ${v.statusText}`);
|
|
467
|
-
const
|
|
468
|
-
return
|
|
474
|
+
const _ = await v.blob();
|
|
475
|
+
return gt(_.size), x0.set(t, _), lr += _.size, _;
|
|
469
476
|
} finally {
|
|
470
477
|
y0.delete(t);
|
|
471
478
|
}
|
|
472
|
-
})(), y0.set(t,
|
|
479
|
+
})(), y0.set(t, f), f);
|
|
473
480
|
}
|
|
474
|
-
function
|
|
475
|
-
|
|
481
|
+
function Dt() {
|
|
482
|
+
x0.clear(), y0.clear(), lr = 0;
|
|
476
483
|
}
|
|
477
|
-
const $e = (r,
|
|
484
|
+
const $e = (r, h) => {
|
|
478
485
|
if (!r) return r;
|
|
479
|
-
const t = (
|
|
486
|
+
const t = (h || "").replace(/\/$/, "");
|
|
480
487
|
if (t && r.startsWith(t))
|
|
481
488
|
return r;
|
|
482
489
|
if (typeof window < "u") {
|
|
483
|
-
const
|
|
484
|
-
if (
|
|
490
|
+
const f = window.location.hostname;
|
|
491
|
+
if (f === "localhost" || f === "127.0.0.1")
|
|
485
492
|
try {
|
|
486
493
|
const v = new URL(r);
|
|
487
494
|
if (t)
|
|
488
495
|
try {
|
|
489
|
-
const
|
|
490
|
-
if (v.origin ===
|
|
496
|
+
const _ = new URL(t).origin;
|
|
497
|
+
if (v.origin === _)
|
|
491
498
|
return r;
|
|
492
499
|
} catch {
|
|
493
500
|
}
|
|
@@ -499,33 +506,33 @@ const $e = (r, l) => {
|
|
|
499
506
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
500
507
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
501
508
|
return e ? `/oss${e[2]}` : r;
|
|
502
|
-
},
|
|
509
|
+
}, bt = (r, h) => {
|
|
503
510
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
504
|
-
return new OffscreenCanvas(r,
|
|
511
|
+
return new OffscreenCanvas(r, h);
|
|
505
512
|
const t = document.createElement("canvas");
|
|
506
|
-
return t.width = r, t.height =
|
|
507
|
-
}, w0 = async (r,
|
|
508
|
-
if (!
|
|
513
|
+
return t.width = r, t.height = h, t;
|
|
514
|
+
}, w0 = async (r, h) => {
|
|
515
|
+
if (!h || h <= 0) return r;
|
|
509
516
|
const t = Math.max(r.width, r.height);
|
|
510
|
-
if (t <=
|
|
511
|
-
const e =
|
|
512
|
-
return B ? (B.drawImage(r, 0, 0,
|
|
517
|
+
if (t <= h) return r;
|
|
518
|
+
const e = h / t, f = Math.max(1, Math.round(r.width * e)), v = Math.max(1, Math.round(r.height * e)), _ = bt(f, v), B = _.getContext("2d");
|
|
519
|
+
return B ? (B.drawImage(r, 0, 0, f, v), r.close?.(), await createImageBitmap(_)) : r;
|
|
513
520
|
};
|
|
514
|
-
async function
|
|
521
|
+
async function mt(r, h, t) {
|
|
515
522
|
if (typeof r == "string")
|
|
516
523
|
try {
|
|
517
524
|
const e = $e(r, t);
|
|
518
|
-
let
|
|
525
|
+
let f;
|
|
519
526
|
try {
|
|
520
|
-
|
|
527
|
+
f = await He(e);
|
|
521
528
|
} catch {
|
|
522
529
|
throw new Error(`加载图片失败: ${r}`);
|
|
523
530
|
}
|
|
524
|
-
if (!
|
|
531
|
+
if (!f.type.startsWith("image/") && f.size === 0)
|
|
525
532
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
526
533
|
try {
|
|
527
|
-
const v = await createImageBitmap(
|
|
528
|
-
return await w0(v,
|
|
534
|
+
const v = await createImageBitmap(f);
|
|
535
|
+
return await w0(v, h);
|
|
529
536
|
} catch (v) {
|
|
530
537
|
throw new Error(`图片解码失败: URL=${r}, 错误=${v instanceof Error ? v.message : v}`);
|
|
531
538
|
}
|
|
@@ -533,13 +540,13 @@ async function Dt(r, l, t) {
|
|
|
533
540
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
534
541
|
}
|
|
535
542
|
if (r instanceof HTMLImageElement) {
|
|
536
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
537
|
-
r.onload = e, r.onerror = () =>
|
|
543
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, f) => {
|
|
544
|
+
r.onload = e, r.onerror = () => f(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
538
545
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
539
546
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
540
547
|
try {
|
|
541
548
|
const e = await createImageBitmap(r);
|
|
542
|
-
return await w0(e,
|
|
549
|
+
return await w0(e, h);
|
|
543
550
|
} catch (e) {
|
|
544
551
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
545
552
|
}
|
|
@@ -547,24 +554,24 @@ async function Dt(r, l, t) {
|
|
|
547
554
|
if (r instanceof ImageBitmap) {
|
|
548
555
|
if (r.width === 0 || r.height === 0)
|
|
549
556
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
550
|
-
return await w0(r,
|
|
557
|
+
return await w0(r, h);
|
|
551
558
|
}
|
|
552
559
|
throw new Error("不支持的图片类型");
|
|
553
560
|
}
|
|
554
|
-
async function
|
|
561
|
+
async function _t(r, h, t) {
|
|
555
562
|
try {
|
|
556
563
|
const e = $e(r, t);
|
|
557
|
-
let
|
|
564
|
+
let f;
|
|
558
565
|
try {
|
|
559
|
-
|
|
566
|
+
f = await He(e);
|
|
560
567
|
} catch {
|
|
561
568
|
throw new Error(`加载图片失败: ${r}`);
|
|
562
569
|
}
|
|
563
|
-
if (!
|
|
570
|
+
if (!f.type.startsWith("image/") && f.size === 0)
|
|
564
571
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
565
572
|
try {
|
|
566
|
-
const v = await createImageBitmap(
|
|
567
|
-
return await w0(v,
|
|
573
|
+
const v = await createImageBitmap(f);
|
|
574
|
+
return await w0(v, h);
|
|
568
575
|
} catch (v) {
|
|
569
576
|
throw new Error(`图片解码失败: URL=${r}, 错误=${v instanceof Error ? v.message : v}`);
|
|
570
577
|
}
|
|
@@ -574,7 +581,7 @@ async function bt(r, l, t) {
|
|
|
574
581
|
}
|
|
575
582
|
function Mr(r) {
|
|
576
583
|
if (!r) return "source-over";
|
|
577
|
-
const
|
|
584
|
+
const h = r.trim().toLowerCase();
|
|
578
585
|
return {
|
|
579
586
|
normal: "source-over",
|
|
580
587
|
multiply: "multiply",
|
|
@@ -600,26 +607,26 @@ function Mr(r) {
|
|
|
600
607
|
"linear dodge": "lighter",
|
|
601
608
|
lighter: "lighter",
|
|
602
609
|
"pass-through": "source-over"
|
|
603
|
-
}[
|
|
610
|
+
}[h] || "source-over";
|
|
604
611
|
}
|
|
605
|
-
var
|
|
606
|
-
function
|
|
612
|
+
var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
613
|
+
function yt(r) {
|
|
607
614
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
608
|
-
var
|
|
609
|
-
if (typeof
|
|
615
|
+
var h = r.default;
|
|
616
|
+
if (typeof h == "function") {
|
|
610
617
|
var t = function e() {
|
|
611
|
-
var
|
|
618
|
+
var f = !1;
|
|
612
619
|
try {
|
|
613
|
-
|
|
620
|
+
f = this instanceof e;
|
|
614
621
|
} catch {
|
|
615
622
|
}
|
|
616
|
-
return
|
|
623
|
+
return f ? Reflect.construct(h, arguments, this.constructor) : h.apply(this, arguments);
|
|
617
624
|
};
|
|
618
|
-
t.prototype =
|
|
625
|
+
t.prototype = h.prototype;
|
|
619
626
|
} else t = {};
|
|
620
627
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
621
|
-
var
|
|
622
|
-
Object.defineProperty(t, e,
|
|
628
|
+
var f = Object.getOwnPropertyDescriptor(r, e);
|
|
629
|
+
Object.defineProperty(t, e, f.get ? f : {
|
|
623
630
|
enumerable: !0,
|
|
624
631
|
get: function() {
|
|
625
632
|
return r[e];
|
|
@@ -628,26 +635,26 @@ function mt(r) {
|
|
|
628
635
|
}), t;
|
|
629
636
|
}
|
|
630
637
|
var k0 = { exports: {} };
|
|
631
|
-
function
|
|
638
|
+
function wt(r) {
|
|
632
639
|
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.');
|
|
633
640
|
}
|
|
634
|
-
var S0 = { exports: {} },
|
|
641
|
+
var S0 = { exports: {} }, kt = {}, St = /* @__PURE__ */ Object.freeze({
|
|
635
642
|
__proto__: null,
|
|
636
|
-
default:
|
|
637
|
-
}),
|
|
638
|
-
function
|
|
639
|
-
return
|
|
643
|
+
default: kt
|
|
644
|
+
}), Ht = /* @__PURE__ */ yt(St), $t = S0.exports, Tr;
|
|
645
|
+
function T() {
|
|
646
|
+
return Tr || (Tr = 1, (function(r, h) {
|
|
640
647
|
(function(t, e) {
|
|
641
648
|
r.exports = e();
|
|
642
|
-
})(
|
|
643
|
-
var t = t || (function(e,
|
|
649
|
+
})($t, function() {
|
|
650
|
+
var t = t || (function(e, f) {
|
|
644
651
|
var v;
|
|
645
|
-
if (typeof window < "u" && window.crypto && (v = window.crypto), typeof self < "u" && self.crypto && (v = self.crypto), typeof globalThis < "u" && globalThis.crypto && (v = globalThis.crypto), !v && typeof window < "u" && window.msCrypto && (v = window.msCrypto), !v && typeof
|
|
652
|
+
if (typeof window < "u" && window.crypto && (v = window.crypto), typeof self < "u" && self.crypto && (v = self.crypto), typeof globalThis < "u" && globalThis.crypto && (v = globalThis.crypto), !v && typeof window < "u" && window.msCrypto && (v = window.msCrypto), !v && typeof Cr < "u" && Cr.crypto && (v = Cr.crypto), !v && typeof wt == "function")
|
|
646
653
|
try {
|
|
647
|
-
v =
|
|
654
|
+
v = Ht;
|
|
648
655
|
} catch {
|
|
649
656
|
}
|
|
650
|
-
var
|
|
657
|
+
var _ = function() {
|
|
651
658
|
if (v) {
|
|
652
659
|
if (typeof v.getRandomValues == "function")
|
|
653
660
|
try {
|
|
@@ -767,7 +774,7 @@ function M() {
|
|
|
767
774
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
768
775
|
*/
|
|
769
776
|
init: function(i, o) {
|
|
770
|
-
i = this.words = i || [], o !=
|
|
777
|
+
i = this.words = i || [], o != f ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
771
778
|
},
|
|
772
779
|
/**
|
|
773
780
|
* Converts this word array to a string.
|
|
@@ -799,13 +806,13 @@ function M() {
|
|
|
799
806
|
concat: function(i) {
|
|
800
807
|
var o = this.words, d = i.words, b = this.sigBytes, g = i.sigBytes;
|
|
801
808
|
if (this.clamp(), b % 4)
|
|
802
|
-
for (var
|
|
803
|
-
var k = d[
|
|
804
|
-
o[b +
|
|
809
|
+
for (var y = 0; y < g; y++) {
|
|
810
|
+
var k = d[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
811
|
+
o[b + y >>> 2] |= k << 24 - (b + y) % 4 * 8;
|
|
805
812
|
}
|
|
806
813
|
else
|
|
807
|
-
for (var
|
|
808
|
-
o[b +
|
|
814
|
+
for (var R = 0; R < g; R += 4)
|
|
815
|
+
o[b + R >>> 2] = d[R >>> 2];
|
|
809
816
|
return this.sigBytes += g, this;
|
|
810
817
|
},
|
|
811
818
|
/**
|
|
@@ -847,7 +854,7 @@ function M() {
|
|
|
847
854
|
*/
|
|
848
855
|
random: function(i) {
|
|
849
856
|
for (var o = [], d = 0; d < i; d += 4)
|
|
850
|
-
o.push(
|
|
857
|
+
o.push(_());
|
|
851
858
|
return new E.init(o, i);
|
|
852
859
|
}
|
|
853
860
|
}), a = C.enc = {}, s = a.Hex = {
|
|
@@ -866,8 +873,8 @@ function M() {
|
|
|
866
873
|
*/
|
|
867
874
|
stringify: function(i) {
|
|
868
875
|
for (var o = i.words, d = i.sigBytes, b = [], g = 0; g < d; g++) {
|
|
869
|
-
var
|
|
870
|
-
b.push((
|
|
876
|
+
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
877
|
+
b.push((y >>> 4).toString(16)), b.push((y & 15).toString(16));
|
|
871
878
|
}
|
|
872
879
|
return b.join("");
|
|
873
880
|
},
|
|
@@ -905,8 +912,8 @@ function M() {
|
|
|
905
912
|
*/
|
|
906
913
|
stringify: function(i) {
|
|
907
914
|
for (var o = i.words, d = i.sigBytes, b = [], g = 0; g < d; g++) {
|
|
908
|
-
var
|
|
909
|
-
b.push(String.fromCharCode(
|
|
915
|
+
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
916
|
+
b.push(String.fromCharCode(y));
|
|
910
917
|
}
|
|
911
918
|
return b.join("");
|
|
912
919
|
},
|
|
@@ -965,7 +972,7 @@ function M() {
|
|
|
965
972
|
parse: function(i) {
|
|
966
973
|
return u.parse(unescape(encodeURIComponent(i)));
|
|
967
974
|
}
|
|
968
|
-
},
|
|
975
|
+
}, l = x.BufferedBlockAlgorithm = n.extend({
|
|
969
976
|
/**
|
|
970
977
|
* Resets this block algorithm's data buffer to its initial state.
|
|
971
978
|
*
|
|
@@ -1004,11 +1011,11 @@ function M() {
|
|
|
1004
1011
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
1005
1012
|
*/
|
|
1006
1013
|
_process: function(i) {
|
|
1007
|
-
var o, d = this._data, b = d.words, g = d.sigBytes,
|
|
1008
|
-
i ?
|
|
1009
|
-
var F =
|
|
1014
|
+
var o, d = this._data, b = d.words, g = d.sigBytes, y = this.blockSize, k = y * 4, R = g / k;
|
|
1015
|
+
i ? R = e.ceil(R) : R = e.max((R | 0) - this._minBufferSize, 0);
|
|
1016
|
+
var F = R * y, w = e.min(F * 4, g);
|
|
1010
1017
|
if (F) {
|
|
1011
|
-
for (var H = 0; H < F; H +=
|
|
1018
|
+
for (var H = 0; H < F; H += y)
|
|
1012
1019
|
this._doProcessBlock(b, H);
|
|
1013
1020
|
o = b.splice(0, F), d.sigBytes -= w;
|
|
1014
1021
|
}
|
|
@@ -1029,7 +1036,7 @@ function M() {
|
|
|
1029
1036
|
},
|
|
1030
1037
|
_minBufferSize: 0
|
|
1031
1038
|
});
|
|
1032
|
-
x.Hasher =
|
|
1039
|
+
x.Hasher = l.extend({
|
|
1033
1040
|
/**
|
|
1034
1041
|
* Configuration options.
|
|
1035
1042
|
*/
|
|
@@ -1054,7 +1061,7 @@ function M() {
|
|
|
1054
1061
|
* hasher.reset();
|
|
1055
1062
|
*/
|
|
1056
1063
|
reset: function() {
|
|
1057
|
-
|
|
1064
|
+
l.reset.call(this), this._doReset();
|
|
1058
1065
|
},
|
|
1059
1066
|
/**
|
|
1060
1067
|
* Updates this hasher with a message.
|
|
@@ -1135,15 +1142,15 @@ function M() {
|
|
|
1135
1142
|
});
|
|
1136
1143
|
})(S0)), S0.exports;
|
|
1137
1144
|
}
|
|
1138
|
-
var H0 = { exports: {} },
|
|
1139
|
-
function
|
|
1140
|
-
return
|
|
1145
|
+
var H0 = { exports: {} }, Rt = H0.exports, Nr;
|
|
1146
|
+
function hr() {
|
|
1147
|
+
return Nr || (Nr = 1, (function(r, h) {
|
|
1141
1148
|
(function(t, e) {
|
|
1142
|
-
r.exports = e(
|
|
1143
|
-
})(
|
|
1149
|
+
r.exports = e(T());
|
|
1150
|
+
})(Rt, function(t) {
|
|
1144
1151
|
return (function(e) {
|
|
1145
|
-
var
|
|
1146
|
-
C.Word =
|
|
1152
|
+
var f = t, v = f.lib, _ = v.Base, B = v.WordArray, C = f.x64 = {};
|
|
1153
|
+
C.Word = _.extend({
|
|
1147
1154
|
/**
|
|
1148
1155
|
* Initializes a newly created 64-bit word.
|
|
1149
1156
|
*
|
|
@@ -1306,7 +1313,7 @@ function vr() {
|
|
|
1306
1313
|
// var high = (this.high + word.high + carry) | 0;
|
|
1307
1314
|
// return X64Word.create(high, low);
|
|
1308
1315
|
// }
|
|
1309
|
-
}), C.WordArray =
|
|
1316
|
+
}), C.WordArray = _.extend({
|
|
1310
1317
|
/**
|
|
1311
1318
|
* Initializes a newly created word array.
|
|
1312
1319
|
*
|
|
@@ -1356,7 +1363,7 @@ function vr() {
|
|
|
1356
1363
|
* var clone = x64WordArray.clone();
|
|
1357
1364
|
*/
|
|
1358
1365
|
clone: function() {
|
|
1359
|
-
for (var x =
|
|
1366
|
+
for (var x = _.clone.call(this), n = x.words = this.words.slice(0), E = n.length, a = 0; a < E; a++)
|
|
1360
1367
|
n[a] = n[a].clone();
|
|
1361
1368
|
return x;
|
|
1362
1369
|
}
|
|
@@ -1365,37 +1372,37 @@ function vr() {
|
|
|
1365
1372
|
});
|
|
1366
1373
|
})(H0)), H0.exports;
|
|
1367
1374
|
}
|
|
1368
|
-
var
|
|
1369
|
-
function
|
|
1370
|
-
return
|
|
1375
|
+
var $0 = { exports: {} }, Pt = $0.exports, Ur;
|
|
1376
|
+
function zt() {
|
|
1377
|
+
return Ur || (Ur = 1, (function(r, h) {
|
|
1371
1378
|
(function(t, e) {
|
|
1372
|
-
r.exports = e(
|
|
1373
|
-
})(
|
|
1379
|
+
r.exports = e(T());
|
|
1380
|
+
})(Pt, function(t) {
|
|
1374
1381
|
return (function() {
|
|
1375
1382
|
if (typeof ArrayBuffer == "function") {
|
|
1376
|
-
var e = t,
|
|
1383
|
+
var e = t, f = e.lib, v = f.WordArray, _ = v.init, B = v.init = function(C) {
|
|
1377
1384
|
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) {
|
|
1378
1385
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1379
1386
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
1380
|
-
|
|
1387
|
+
_.call(this, n, x);
|
|
1381
1388
|
} else
|
|
1382
|
-
|
|
1389
|
+
_.apply(this, arguments);
|
|
1383
1390
|
};
|
|
1384
1391
|
B.prototype = v;
|
|
1385
1392
|
}
|
|
1386
1393
|
})(), t.lib.WordArray;
|
|
1387
1394
|
});
|
|
1388
|
-
})(
|
|
1395
|
+
})($0)), $0.exports;
|
|
1389
1396
|
}
|
|
1390
|
-
var
|
|
1391
|
-
function
|
|
1392
|
-
return
|
|
1397
|
+
var R0 = { exports: {} }, Wt = R0.exports, jr;
|
|
1398
|
+
function It() {
|
|
1399
|
+
return jr || (jr = 1, (function(r, h) {
|
|
1393
1400
|
(function(t, e) {
|
|
1394
|
-
r.exports = e(
|
|
1395
|
-
})(
|
|
1401
|
+
r.exports = e(T());
|
|
1402
|
+
})(Wt, function(t) {
|
|
1396
1403
|
return (function() {
|
|
1397
|
-
var e = t,
|
|
1398
|
-
|
|
1404
|
+
var e = t, f = e.lib, v = f.WordArray, _ = e.enc;
|
|
1405
|
+
_.Utf16 = _.Utf16BE = {
|
|
1399
1406
|
/**
|
|
1400
1407
|
* Converts a word array to a UTF-16 BE string.
|
|
1401
1408
|
*
|
|
@@ -1434,7 +1441,7 @@ function zt() {
|
|
|
1434
1441
|
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1435
1442
|
return v.create(n, x * 2);
|
|
1436
1443
|
}
|
|
1437
|
-
},
|
|
1444
|
+
}, _.Utf16LE = {
|
|
1438
1445
|
/**
|
|
1439
1446
|
* Converts a word array to a UTF-16 LE string.
|
|
1440
1447
|
*
|
|
@@ -1479,17 +1486,17 @@ function zt() {
|
|
|
1479
1486
|
}
|
|
1480
1487
|
})(), t.enc.Utf16;
|
|
1481
1488
|
});
|
|
1482
|
-
})(
|
|
1489
|
+
})(R0)), R0.exports;
|
|
1483
1490
|
}
|
|
1484
|
-
var P0 = { exports: {} },
|
|
1491
|
+
var P0 = { exports: {} }, Lt = P0.exports, Gr;
|
|
1485
1492
|
function c0() {
|
|
1486
|
-
return
|
|
1493
|
+
return Gr || (Gr = 1, (function(r, h) {
|
|
1487
1494
|
(function(t, e) {
|
|
1488
|
-
r.exports = e(
|
|
1489
|
-
})(
|
|
1495
|
+
r.exports = e(T());
|
|
1496
|
+
})(Lt, function(t) {
|
|
1490
1497
|
return (function() {
|
|
1491
|
-
var e = t,
|
|
1492
|
-
|
|
1498
|
+
var e = t, f = e.lib, v = f.WordArray, _ = e.enc;
|
|
1499
|
+
_.Base64 = {
|
|
1493
1500
|
/**
|
|
1494
1501
|
* Converts a word array to a Base64 string.
|
|
1495
1502
|
*
|
|
@@ -1507,7 +1514,7 @@ function c0() {
|
|
|
1507
1514
|
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1508
1515
|
C.clamp();
|
|
1509
1516
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1510
|
-
for (var u = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255,
|
|
1517
|
+
for (var u = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, l = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, D = u << 16 | p << 8 | l, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1511
1518
|
a.push(E.charAt(D >>> 6 * (3 - i) & 63));
|
|
1512
1519
|
var o = E.charAt(64);
|
|
1513
1520
|
if (o)
|
|
@@ -1547,8 +1554,8 @@ function c0() {
|
|
|
1547
1554
|
function B(C, x, n) {
|
|
1548
1555
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1549
1556
|
if (s % 4) {
|
|
1550
|
-
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2,
|
|
1551
|
-
E[a >>> 2] |=
|
|
1557
|
+
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = u | p;
|
|
1558
|
+
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1552
1559
|
}
|
|
1553
1560
|
return v.create(E, a);
|
|
1554
1561
|
}
|
|
@@ -1556,15 +1563,15 @@ function c0() {
|
|
|
1556
1563
|
});
|
|
1557
1564
|
})(P0)), P0.exports;
|
|
1558
1565
|
}
|
|
1559
|
-
var z0 = { exports: {} },
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
1566
|
+
var z0 = { exports: {} }, Ot = z0.exports, Kr;
|
|
1567
|
+
function qt() {
|
|
1568
|
+
return Kr || (Kr = 1, (function(r, h) {
|
|
1562
1569
|
(function(t, e) {
|
|
1563
|
-
r.exports = e(
|
|
1564
|
-
})(
|
|
1570
|
+
r.exports = e(T());
|
|
1571
|
+
})(Ot, function(t) {
|
|
1565
1572
|
return (function() {
|
|
1566
|
-
var e = t,
|
|
1567
|
-
|
|
1573
|
+
var e = t, f = e.lib, v = f.WordArray, _ = e.enc;
|
|
1574
|
+
_.Base64url = {
|
|
1568
1575
|
/**
|
|
1569
1576
|
* Converts a word array to a Base64url string.
|
|
1570
1577
|
*
|
|
@@ -1585,7 +1592,7 @@ function Lt() {
|
|
|
1585
1592
|
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1586
1593
|
C.clamp();
|
|
1587
1594
|
for (var s = [], u = 0; u < E; u += 3)
|
|
1588
|
-
for (var p = n[u >>> 2] >>> 24 - u % 4 * 8 & 255,
|
|
1595
|
+
for (var p = n[u >>> 2] >>> 24 - u % 4 * 8 & 255, l = n[u + 1 >>> 2] >>> 24 - (u + 1) % 4 * 8 & 255, D = n[u + 2 >>> 2] >>> 24 - (u + 2) % 4 * 8 & 255, i = p << 16 | l << 8 | D, o = 0; o < 4 && u + o * 0.75 < E; o++)
|
|
1589
1596
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1590
1597
|
var d = a.charAt(64);
|
|
1591
1598
|
if (d)
|
|
@@ -1629,8 +1636,8 @@ function Lt() {
|
|
|
1629
1636
|
function B(C, x, n) {
|
|
1630
1637
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1631
1638
|
if (s % 4) {
|
|
1632
|
-
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2,
|
|
1633
|
-
E[a >>> 2] |=
|
|
1639
|
+
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, l = u | p;
|
|
1640
|
+
E[a >>> 2] |= l << 24 - a % 4 * 8, a++;
|
|
1634
1641
|
}
|
|
1635
1642
|
return v.create(E, a);
|
|
1636
1643
|
}
|
|
@@ -1638,43 +1645,43 @@ function Lt() {
|
|
|
1638
1645
|
});
|
|
1639
1646
|
})(z0)), z0.exports;
|
|
1640
1647
|
}
|
|
1641
|
-
var W0 = { exports: {} },
|
|
1648
|
+
var W0 = { exports: {} }, Mt = W0.exports, Xr;
|
|
1642
1649
|
function f0() {
|
|
1643
|
-
return
|
|
1650
|
+
return Xr || (Xr = 1, (function(r, h) {
|
|
1644
1651
|
(function(t, e) {
|
|
1645
|
-
r.exports = e(
|
|
1646
|
-
})(
|
|
1652
|
+
r.exports = e(T());
|
|
1653
|
+
})(Mt, function(t) {
|
|
1647
1654
|
return (function(e) {
|
|
1648
|
-
var
|
|
1655
|
+
var f = t, v = f.lib, _ = v.WordArray, B = v.Hasher, C = f.algo, x = [];
|
|
1649
1656
|
(function() {
|
|
1650
1657
|
for (var p = 0; p < 64; p++)
|
|
1651
1658
|
x[p] = e.abs(e.sin(p + 1)) * 4294967296 | 0;
|
|
1652
1659
|
})();
|
|
1653
1660
|
var n = C.MD5 = B.extend({
|
|
1654
1661
|
_doReset: function() {
|
|
1655
|
-
this._hash = new
|
|
1662
|
+
this._hash = new _.init([
|
|
1656
1663
|
1732584193,
|
|
1657
1664
|
4023233417,
|
|
1658
1665
|
2562383102,
|
|
1659
1666
|
271733878
|
|
1660
1667
|
]);
|
|
1661
1668
|
},
|
|
1662
|
-
_doProcessBlock: function(p,
|
|
1669
|
+
_doProcessBlock: function(p, l) {
|
|
1663
1670
|
for (var D = 0; D < 16; D++) {
|
|
1664
|
-
var i =
|
|
1671
|
+
var i = l + D, o = p[i];
|
|
1665
1672
|
p[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1666
1673
|
}
|
|
1667
|
-
var d = this._hash.words, b = p[
|
|
1668
|
-
S = E(S,
|
|
1674
|
+
var d = this._hash.words, b = p[l + 0], g = p[l + 1], y = p[l + 2], k = p[l + 3], R = p[l + 4], F = p[l + 5], w = p[l + 6], H = p[l + 7], $ = p[l + 8], z = p[l + 9], O = p[l + 10], q = p[l + 11], U = p[l + 12], M = p[l + 13], N = p[l + 14], j = p[l + 15], S = d[0], c = d[1], A = d[2], m = d[3];
|
|
1675
|
+
S = E(S, c, A, m, b, 7, x[0]), m = E(m, S, c, A, g, 12, x[1]), A = E(A, m, S, c, y, 17, x[2]), c = E(c, A, m, S, k, 22, x[3]), S = E(S, c, A, m, R, 7, x[4]), m = E(m, S, c, A, F, 12, x[5]), A = E(A, m, S, c, w, 17, x[6]), c = E(c, A, m, S, H, 22, x[7]), S = E(S, c, A, m, $, 7, x[8]), m = E(m, S, c, A, z, 12, x[9]), A = E(A, m, S, c, O, 17, x[10]), c = E(c, A, m, S, q, 22, x[11]), S = E(S, c, A, m, U, 7, x[12]), m = E(m, S, c, A, M, 12, x[13]), A = E(A, m, S, c, N, 17, x[14]), c = E(c, A, m, S, j, 22, x[15]), S = a(S, c, A, m, g, 5, x[16]), m = a(m, S, c, A, w, 9, x[17]), A = a(A, m, S, c, q, 14, x[18]), c = a(c, A, m, S, b, 20, x[19]), S = a(S, c, A, m, F, 5, x[20]), m = a(m, S, c, A, O, 9, x[21]), A = a(A, m, S, c, j, 14, x[22]), c = a(c, A, m, S, R, 20, x[23]), S = a(S, c, A, m, z, 5, x[24]), m = a(m, S, c, A, N, 9, x[25]), A = a(A, m, S, c, k, 14, x[26]), c = a(c, A, m, S, $, 20, x[27]), S = a(S, c, A, m, M, 5, x[28]), m = a(m, S, c, A, y, 9, x[29]), A = a(A, m, S, c, H, 14, x[30]), c = a(c, A, m, S, U, 20, x[31]), S = s(S, c, A, m, F, 4, x[32]), m = s(m, S, c, A, $, 11, x[33]), A = s(A, m, S, c, q, 16, x[34]), c = s(c, A, m, S, N, 23, x[35]), S = s(S, c, A, m, g, 4, x[36]), m = s(m, S, c, A, R, 11, x[37]), A = s(A, m, S, c, H, 16, x[38]), c = s(c, A, m, S, O, 23, x[39]), S = s(S, c, A, m, M, 4, x[40]), m = s(m, S, c, A, b, 11, x[41]), A = s(A, m, S, c, k, 16, x[42]), c = s(c, A, m, S, w, 23, x[43]), S = s(S, c, A, m, z, 4, x[44]), m = s(m, S, c, A, U, 11, x[45]), A = s(A, m, S, c, j, 16, x[46]), c = s(c, A, m, S, y, 23, x[47]), S = u(S, c, A, m, b, 6, x[48]), m = u(m, S, c, A, H, 10, x[49]), A = u(A, m, S, c, N, 15, x[50]), c = u(c, A, m, S, F, 21, x[51]), S = u(S, c, A, m, U, 6, x[52]), m = u(m, S, c, A, k, 10, x[53]), A = u(A, m, S, c, O, 15, x[54]), c = u(c, A, m, S, g, 21, x[55]), S = u(S, c, A, m, $, 6, x[56]), m = u(m, S, c, A, j, 10, x[57]), A = u(A, m, S, c, w, 15, x[58]), c = u(c, A, m, S, M, 21, x[59]), S = u(S, c, A, m, R, 6, x[60]), m = u(m, S, c, A, q, 10, x[61]), A = u(A, m, S, c, y, 15, x[62]), c = u(c, A, m, 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] + m | 0;
|
|
1669
1676
|
},
|
|
1670
1677
|
_doFinalize: function() {
|
|
1671
|
-
var p = this._data,
|
|
1672
|
-
|
|
1678
|
+
var p = this._data, l = p.words, D = this._nDataBytes * 8, i = p.sigBytes * 8;
|
|
1679
|
+
l[i >>> 5] |= 128 << 24 - i % 32;
|
|
1673
1680
|
var o = e.floor(D / 4294967296), d = D;
|
|
1674
|
-
|
|
1675
|
-
for (var b = this._hash, g = b.words,
|
|
1676
|
-
var k = g[
|
|
1677
|
-
g[
|
|
1681
|
+
l[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, l[(i + 64 >>> 9 << 4) + 14] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360, p.sigBytes = (l.length + 1) * 4, this._process();
|
|
1682
|
+
for (var b = this._hash, g = b.words, y = 0; y < 4; y++) {
|
|
1683
|
+
var k = g[y];
|
|
1684
|
+
g[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
1678
1685
|
}
|
|
1679
1686
|
return b;
|
|
1680
1687
|
},
|
|
@@ -1683,35 +1690,35 @@ function f0() {
|
|
|
1683
1690
|
return p._hash = this._hash.clone(), p;
|
|
1684
1691
|
}
|
|
1685
1692
|
});
|
|
1686
|
-
function E(p,
|
|
1687
|
-
var g = p + (
|
|
1688
|
-
return (g << d | g >>> 32 - d) +
|
|
1693
|
+
function E(p, l, D, i, o, d, b) {
|
|
1694
|
+
var g = p + (l & D | ~l & i) + o + b;
|
|
1695
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1689
1696
|
}
|
|
1690
|
-
function a(p,
|
|
1691
|
-
var g = p + (
|
|
1692
|
-
return (g << d | g >>> 32 - d) +
|
|
1697
|
+
function a(p, l, D, i, o, d, b) {
|
|
1698
|
+
var g = p + (l & i | D & ~i) + o + b;
|
|
1699
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1693
1700
|
}
|
|
1694
|
-
function s(p,
|
|
1695
|
-
var g = p + (
|
|
1696
|
-
return (g << d | g >>> 32 - d) +
|
|
1701
|
+
function s(p, l, D, i, o, d, b) {
|
|
1702
|
+
var g = p + (l ^ D ^ i) + o + b;
|
|
1703
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1697
1704
|
}
|
|
1698
|
-
function u(p,
|
|
1699
|
-
var g = p + (D ^ (
|
|
1700
|
-
return (g << d | g >>> 32 - d) +
|
|
1705
|
+
function u(p, l, D, i, o, d, b) {
|
|
1706
|
+
var g = p + (D ^ (l | ~i)) + o + b;
|
|
1707
|
+
return (g << d | g >>> 32 - d) + l;
|
|
1701
1708
|
}
|
|
1702
|
-
|
|
1709
|
+
f.MD5 = B._createHelper(n), f.HmacMD5 = B._createHmacHelper(n);
|
|
1703
1710
|
})(Math), t.MD5;
|
|
1704
1711
|
});
|
|
1705
1712
|
})(W0)), W0.exports;
|
|
1706
1713
|
}
|
|
1707
|
-
var I0 = { exports: {} },
|
|
1708
|
-
function
|
|
1709
|
-
return Yr || (Yr = 1, (function(r,
|
|
1714
|
+
var I0 = { exports: {} }, Tt = I0.exports, Yr;
|
|
1715
|
+
function Re() {
|
|
1716
|
+
return Yr || (Yr = 1, (function(r, h) {
|
|
1710
1717
|
(function(t, e) {
|
|
1711
|
-
r.exports = e(
|
|
1712
|
-
})(
|
|
1718
|
+
r.exports = e(T());
|
|
1719
|
+
})(Tt, function(t) {
|
|
1713
1720
|
return (function() {
|
|
1714
|
-
var e = t,
|
|
1721
|
+
var e = t, f = e.lib, v = f.WordArray, _ = f.Hasher, B = e.algo, C = [], x = B.SHA1 = _.extend({
|
|
1715
1722
|
_doReset: function() {
|
|
1716
1723
|
this._hash = new v.init([
|
|
1717
1724
|
1732584193,
|
|
@@ -1722,7 +1729,7 @@ function Pe() {
|
|
|
1722
1729
|
]);
|
|
1723
1730
|
},
|
|
1724
1731
|
_doProcessBlock: function(n, E) {
|
|
1725
|
-
for (var a = this._hash.words, s = a[0], u = a[1], p = a[2],
|
|
1732
|
+
for (var a = this._hash.words, s = a[0], u = a[1], p = a[2], l = a[3], D = a[4], i = 0; i < 80; i++) {
|
|
1726
1733
|
if (i < 16)
|
|
1727
1734
|
C[i] = n[E + i] | 0;
|
|
1728
1735
|
else {
|
|
@@ -1730,32 +1737,32 @@ function Pe() {
|
|
|
1730
1737
|
C[i] = o << 1 | o >>> 31;
|
|
1731
1738
|
}
|
|
1732
1739
|
var d = (s << 5 | s >>> 27) + D + C[i];
|
|
1733
|
-
i < 20 ? d += (u & p | ~u &
|
|
1740
|
+
i < 20 ? d += (u & p | ~u & l) + 1518500249 : i < 40 ? d += (u ^ p ^ l) + 1859775393 : i < 60 ? d += (u & p | u & l | p & l) - 1894007588 : d += (u ^ p ^ l) - 899497514, D = l, l = p, p = u << 30 | u >>> 2, u = s, s = d;
|
|
1734
1741
|
}
|
|
1735
|
-
a[0] = a[0] + s | 0, a[1] = a[1] + u | 0, a[2] = a[2] + p | 0, a[3] = a[3] +
|
|
1742
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + u | 0, a[2] = a[2] + p | 0, a[3] = a[3] + l | 0, a[4] = a[4] + D | 0;
|
|
1736
1743
|
},
|
|
1737
1744
|
_doFinalize: function() {
|
|
1738
1745
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
1739
1746
|
return E[s >>> 5] |= 128 << 24 - s % 32, E[(s + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296), E[(s + 64 >>> 9 << 4) + 15] = a, n.sigBytes = E.length * 4, this._process(), this._hash;
|
|
1740
1747
|
},
|
|
1741
1748
|
clone: function() {
|
|
1742
|
-
var n =
|
|
1749
|
+
var n = _.clone.call(this);
|
|
1743
1750
|
return n._hash = this._hash.clone(), n;
|
|
1744
1751
|
}
|
|
1745
1752
|
});
|
|
1746
|
-
e.SHA1 =
|
|
1753
|
+
e.SHA1 = _._createHelper(x), e.HmacSHA1 = _._createHmacHelper(x);
|
|
1747
1754
|
})(), t.SHA1;
|
|
1748
1755
|
});
|
|
1749
1756
|
})(I0)), I0.exports;
|
|
1750
1757
|
}
|
|
1751
|
-
var L0 = { exports: {} },
|
|
1752
|
-
function
|
|
1753
|
-
return
|
|
1758
|
+
var L0 = { exports: {} }, Nt = L0.exports, Zr;
|
|
1759
|
+
function br() {
|
|
1760
|
+
return Zr || (Zr = 1, (function(r, h) {
|
|
1754
1761
|
(function(t, e) {
|
|
1755
|
-
r.exports = e(
|
|
1756
|
-
})(
|
|
1762
|
+
r.exports = e(T());
|
|
1763
|
+
})(Nt, function(t) {
|
|
1757
1764
|
return (function(e) {
|
|
1758
|
-
var
|
|
1765
|
+
var f = t, v = f.lib, _ = v.WordArray, B = v.Hasher, C = f.algo, x = [], n = [];
|
|
1759
1766
|
(function() {
|
|
1760
1767
|
function s(D) {
|
|
1761
1768
|
for (var i = e.sqrt(D), o = 2; o <= i; o++)
|
|
@@ -1766,48 +1773,48 @@ function mr() {
|
|
|
1766
1773
|
function u(D) {
|
|
1767
1774
|
return (D - (D | 0)) * 4294967296 | 0;
|
|
1768
1775
|
}
|
|
1769
|
-
for (var p = 2,
|
|
1770
|
-
s(p) && (
|
|
1776
|
+
for (var p = 2, l = 0; l < 64; )
|
|
1777
|
+
s(p) && (l < 8 && (x[l] = u(e.pow(p, 1 / 2))), n[l] = u(e.pow(p, 1 / 3)), l++), p++;
|
|
1771
1778
|
})();
|
|
1772
1779
|
var E = [], a = C.SHA256 = B.extend({
|
|
1773
1780
|
_doReset: function() {
|
|
1774
|
-
this._hash = new
|
|
1781
|
+
this._hash = new _.init(x.slice(0));
|
|
1775
1782
|
},
|
|
1776
1783
|
_doProcessBlock: function(s, u) {
|
|
1777
|
-
for (var p = this._hash.words,
|
|
1784
|
+
for (var p = this._hash.words, l = p[0], D = p[1], i = p[2], o = p[3], d = p[4], b = p[5], g = p[6], y = p[7], k = 0; k < 64; k++) {
|
|
1778
1785
|
if (k < 16)
|
|
1779
1786
|
E[k] = s[u + k] | 0;
|
|
1780
1787
|
else {
|
|
1781
|
-
var
|
|
1788
|
+
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;
|
|
1782
1789
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1783
1790
|
}
|
|
1784
|
-
var
|
|
1785
|
-
|
|
1791
|
+
var $ = d & b ^ ~d & g, z = l & D ^ l & i ^ D & 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], M = O + z;
|
|
1792
|
+
y = g, g = b, b = d, d = o + U | 0, o = i, i = D, D = l, l = U + M | 0;
|
|
1786
1793
|
}
|
|
1787
|
-
p[0] = p[0] +
|
|
1794
|
+
p[0] = p[0] + l | 0, p[1] = p[1] + D | 0, p[2] = p[2] + i | 0, p[3] = p[3] + o | 0, p[4] = p[4] + d | 0, p[5] = p[5] + b | 0, p[6] = p[6] + g | 0, p[7] = p[7] + y | 0;
|
|
1788
1795
|
},
|
|
1789
1796
|
_doFinalize: function() {
|
|
1790
|
-
var s = this._data, u = s.words, p = this._nDataBytes * 8,
|
|
1791
|
-
return u[
|
|
1797
|
+
var s = this._data, u = s.words, p = this._nDataBytes * 8, l = s.sigBytes * 8;
|
|
1798
|
+
return u[l >>> 5] |= 128 << 24 - l % 32, u[(l + 64 >>> 9 << 4) + 14] = e.floor(p / 4294967296), u[(l + 64 >>> 9 << 4) + 15] = p, s.sigBytes = u.length * 4, this._process(), this._hash;
|
|
1792
1799
|
},
|
|
1793
1800
|
clone: function() {
|
|
1794
1801
|
var s = B.clone.call(this);
|
|
1795
1802
|
return s._hash = this._hash.clone(), s;
|
|
1796
1803
|
}
|
|
1797
1804
|
});
|
|
1798
|
-
|
|
1805
|
+
f.SHA256 = B._createHelper(a), f.HmacSHA256 = B._createHmacHelper(a);
|
|
1799
1806
|
})(Math), t.SHA256;
|
|
1800
1807
|
});
|
|
1801
1808
|
})(L0)), L0.exports;
|
|
1802
1809
|
}
|
|
1803
|
-
var O0 = { exports: {} },
|
|
1804
|
-
function
|
|
1805
|
-
return
|
|
1806
|
-
(function(t, e,
|
|
1807
|
-
r.exports = e(
|
|
1808
|
-
})(
|
|
1810
|
+
var O0 = { exports: {} }, Ut = O0.exports, Qr;
|
|
1811
|
+
function jt() {
|
|
1812
|
+
return Qr || (Qr = 1, (function(r, h) {
|
|
1813
|
+
(function(t, e, f) {
|
|
1814
|
+
r.exports = e(T(), br());
|
|
1815
|
+
})(Ut, function(t) {
|
|
1809
1816
|
return (function() {
|
|
1810
|
-
var e = t,
|
|
1817
|
+
var e = t, f = e.lib, v = f.WordArray, _ = e.algo, B = _.SHA256, C = _.SHA224 = B.extend({
|
|
1811
1818
|
_doReset: function() {
|
|
1812
1819
|
this._hash = new v.init([
|
|
1813
1820
|
3238371032,
|
|
@@ -1830,14 +1837,14 @@ function Nt() {
|
|
|
1830
1837
|
});
|
|
1831
1838
|
})(O0)), O0.exports;
|
|
1832
1839
|
}
|
|
1833
|
-
var q0 = { exports: {} },
|
|
1834
|
-
function
|
|
1835
|
-
return
|
|
1836
|
-
(function(t, e,
|
|
1837
|
-
r.exports = e(
|
|
1838
|
-
})(
|
|
1840
|
+
var q0 = { exports: {} }, Gt = q0.exports, Vr;
|
|
1841
|
+
function Pe() {
|
|
1842
|
+
return Vr || (Vr = 1, (function(r, h) {
|
|
1843
|
+
(function(t, e, f) {
|
|
1844
|
+
r.exports = e(T(), hr());
|
|
1845
|
+
})(Gt, function(t) {
|
|
1839
1846
|
return (function() {
|
|
1840
|
-
var e = t,
|
|
1847
|
+
var e = t, f = e.lib, v = f.Hasher, _ = e.x64, B = _.Word, C = _.WordArray, x = e.algo;
|
|
1841
1848
|
function n() {
|
|
1842
1849
|
return B.create.apply(B, arguments);
|
|
1843
1850
|
}
|
|
@@ -1941,22 +1948,22 @@ function ze() {
|
|
|
1941
1948
|
]);
|
|
1942
1949
|
},
|
|
1943
1950
|
_doProcessBlock: function(u, p) {
|
|
1944
|
-
for (var
|
|
1945
|
-
var
|
|
1946
|
-
if (
|
|
1947
|
-
n0 = m0.high = u[p +
|
|
1951
|
+
for (var l = this._hash.words, D = l[0], i = l[1], o = l[2], d = l[3], b = l[4], g = l[5], y = l[6], k = l[7], R = D.high, F = D.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = d.high, q = d.low, U = b.high, M = b.low, N = g.high, j = g.low, S = y.high, c = y.low, A = k.high, m = k.low, W = R, P = F, L = w, I = H, Z = $, Q = z, i0 = O, K = q, G = U, Y = M, e0 = N, u0 = j, b0 = S, B0 = c, vr = A, C0 = m, t0 = 0; t0 < 80; t0++) {
|
|
1952
|
+
var r0, n0, m0 = a[t0];
|
|
1953
|
+
if (t0 < 16)
|
|
1954
|
+
n0 = m0.high = u[p + t0 * 2] | 0, r0 = m0.low = u[p + t0 * 2 + 1] | 0;
|
|
1948
1955
|
else {
|
|
1949
|
-
var
|
|
1950
|
-
|
|
1956
|
+
var yr = a[t0 - 15], d0 = yr.high, E0 = yr.low, Me = (d0 >>> 1 | E0 << 31) ^ (d0 >>> 8 | E0 << 24) ^ d0 >>> 7, wr = (E0 >>> 1 | d0 << 31) ^ (E0 >>> 8 | d0 << 24) ^ (E0 >>> 7 | d0 << 25), kr = a[t0 - 2], l0 = kr.high, A0 = kr.low, Te = (l0 >>> 19 | A0 << 13) ^ (l0 << 3 | A0 >>> 29) ^ l0 >>> 6, Sr = (A0 >>> 19 | l0 << 13) ^ (A0 << 3 | l0 >>> 29) ^ (A0 >>> 6 | l0 << 26), Hr = a[t0 - 7], Ne = Hr.high, Ue = Hr.low, $r = a[t0 - 16], je = $r.high, Rr = $r.low;
|
|
1957
|
+
r0 = wr + Ue, n0 = Me + Ne + (r0 >>> 0 < wr >>> 0 ? 1 : 0), r0 = r0 + Sr, n0 = n0 + Te + (r0 >>> 0 < Sr >>> 0 ? 1 : 0), r0 = r0 + Rr, n0 = n0 + je + (r0 >>> 0 < Rr >>> 0 ? 1 : 0), m0.high = n0, m0.low = r0;
|
|
1951
1958
|
}
|
|
1952
|
-
var
|
|
1953
|
-
|
|
1959
|
+
var Ge = G & e0 ^ ~G & b0, Pr = Y & u0 ^ ~Y & B0, Ke = W & L ^ W & Z ^ L & Z, Xe = P & I ^ P & Q ^ I & Q, Ye = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), zr = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Ze = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Qe = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Wr = E[t0], Ve = Wr.high, Ir = Wr.low, V = C0 + Qe, a0 = vr + Ze + (V >>> 0 < C0 >>> 0 ? 1 : 0), V = V + Pr, a0 = a0 + Ge + (V >>> 0 < Pr >>> 0 ? 1 : 0), V = V + Ir, a0 = a0 + Ve + (V >>> 0 < Ir >>> 0 ? 1 : 0), V = V + r0, a0 = a0 + n0 + (V >>> 0 < r0 >>> 0 ? 1 : 0), Lr = zr + Xe, Je = Ye + Ke + (Lr >>> 0 < zr >>> 0 ? 1 : 0);
|
|
1960
|
+
vr = b0, C0 = B0, b0 = e0, B0 = u0, e0 = G, u0 = Y, Y = K + V | 0, G = i0 + a0 + (Y >>> 0 < K >>> 0 ? 1 : 0) | 0, i0 = Z, K = Q, Z = L, Q = I, L = W, I = P, P = V + Lr | 0, W = a0 + Je + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1954
1961
|
}
|
|
1955
|
-
F = D.low = F + P, D.high =
|
|
1962
|
+
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 = d.low = q + K, d.high = O + i0 + (q >>> 0 < K >>> 0 ? 1 : 0), M = b.low = M + Y, b.high = U + G + (M >>> 0 < Y >>> 0 ? 1 : 0), j = g.low = j + u0, g.high = N + e0 + (j >>> 0 < u0 >>> 0 ? 1 : 0), c = y.low = c + B0, y.high = S + b0 + (c >>> 0 < B0 >>> 0 ? 1 : 0), m = k.low = m + C0, k.high = A + vr + (m >>> 0 < C0 >>> 0 ? 1 : 0);
|
|
1956
1963
|
},
|
|
1957
1964
|
_doFinalize: function() {
|
|
1958
|
-
var u = this._data, p = u.words,
|
|
1959
|
-
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(
|
|
1965
|
+
var u = this._data, p = u.words, l = this._nDataBytes * 8, D = u.sigBytes * 8;
|
|
1966
|
+
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(l / 4294967296), p[(D + 128 >>> 10 << 5) + 31] = l, u.sigBytes = p.length * 4, this._process();
|
|
1960
1967
|
var i = this._hash.toX32();
|
|
1961
1968
|
return i;
|
|
1962
1969
|
},
|
|
@@ -1971,16 +1978,16 @@ function ze() {
|
|
|
1971
1978
|
});
|
|
1972
1979
|
})(q0)), q0.exports;
|
|
1973
1980
|
}
|
|
1974
|
-
var
|
|
1975
|
-
function
|
|
1976
|
-
return
|
|
1977
|
-
(function(t, e,
|
|
1978
|
-
r.exports = e(
|
|
1979
|
-
})(
|
|
1981
|
+
var M0 = { exports: {} }, Kt = M0.exports, Jr;
|
|
1982
|
+
function Xt() {
|
|
1983
|
+
return Jr || (Jr = 1, (function(r, h) {
|
|
1984
|
+
(function(t, e, f) {
|
|
1985
|
+
r.exports = e(T(), hr(), Pe());
|
|
1986
|
+
})(Kt, function(t) {
|
|
1980
1987
|
return (function() {
|
|
1981
|
-
var e = t,
|
|
1988
|
+
var e = t, f = e.x64, v = f.Word, _ = f.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1982
1989
|
_doReset: function() {
|
|
1983
|
-
this._hash = new
|
|
1990
|
+
this._hash = new _.init([
|
|
1984
1991
|
new v.init(3418070365, 3238371032),
|
|
1985
1992
|
new v.init(1654270250, 914150663),
|
|
1986
1993
|
new v.init(2438529370, 812702999),
|
|
@@ -1999,40 +2006,40 @@ function Gt() {
|
|
|
1999
2006
|
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
2000
2007
|
})(), t.SHA384;
|
|
2001
2008
|
});
|
|
2002
|
-
})(
|
|
2009
|
+
})(M0)), M0.exports;
|
|
2003
2010
|
}
|
|
2004
|
-
var
|
|
2005
|
-
function
|
|
2006
|
-
return
|
|
2007
|
-
(function(t, e,
|
|
2008
|
-
r.exports = e(
|
|
2009
|
-
})(
|
|
2011
|
+
var T0 = { exports: {} }, Yt = T0.exports, re;
|
|
2012
|
+
function Zt() {
|
|
2013
|
+
return re || (re = 1, (function(r, h) {
|
|
2014
|
+
(function(t, e, f) {
|
|
2015
|
+
r.exports = e(T(), hr());
|
|
2016
|
+
})(Yt, function(t) {
|
|
2010
2017
|
return (function(e) {
|
|
2011
|
-
var
|
|
2018
|
+
var f = t, v = f.lib, _ = v.WordArray, B = v.Hasher, C = f.x64, x = C.Word, n = f.algo, E = [], a = [], s = [];
|
|
2012
2019
|
(function() {
|
|
2013
|
-
for (var
|
|
2014
|
-
E[
|
|
2015
|
-
var o = D % 5, d = (2 *
|
|
2016
|
-
|
|
2020
|
+
for (var l = 1, D = 0, i = 0; i < 24; i++) {
|
|
2021
|
+
E[l + 5 * D] = (i + 1) * (i + 2) / 2 % 64;
|
|
2022
|
+
var o = D % 5, d = (2 * l + 3 * D) % 5;
|
|
2023
|
+
l = o, D = d;
|
|
2017
2024
|
}
|
|
2018
|
-
for (var
|
|
2025
|
+
for (var l = 0; l < 5; l++)
|
|
2019
2026
|
for (var D = 0; D < 5; D++)
|
|
2020
|
-
a[
|
|
2027
|
+
a[l + 5 * D] = D + (2 * l + 3 * D) % 5 * 5;
|
|
2021
2028
|
for (var b = 1, g = 0; g < 24; g++) {
|
|
2022
|
-
for (var
|
|
2029
|
+
for (var y = 0, k = 0, R = 0; R < 7; R++) {
|
|
2023
2030
|
if (b & 1) {
|
|
2024
|
-
var F = (1 <<
|
|
2025
|
-
F < 32 ? k ^= 1 << F :
|
|
2031
|
+
var F = (1 << R) - 1;
|
|
2032
|
+
F < 32 ? k ^= 1 << F : y ^= 1 << F - 32;
|
|
2026
2033
|
}
|
|
2027
2034
|
b & 128 ? b = b << 1 ^ 113 : b <<= 1;
|
|
2028
2035
|
}
|
|
2029
|
-
s[g] = x.create(
|
|
2036
|
+
s[g] = x.create(y, k);
|
|
2030
2037
|
}
|
|
2031
2038
|
})();
|
|
2032
2039
|
var u = [];
|
|
2033
2040
|
(function() {
|
|
2034
|
-
for (var
|
|
2035
|
-
u[
|
|
2041
|
+
for (var l = 0; l < 25; l++)
|
|
2042
|
+
u[l] = x.create();
|
|
2036
2043
|
})();
|
|
2037
2044
|
var p = n.SHA3 = B.extend({
|
|
2038
2045
|
/**
|
|
@@ -2047,78 +2054,78 @@ function Xt() {
|
|
|
2047
2054
|
outputLength: 512
|
|
2048
2055
|
}),
|
|
2049
2056
|
_doReset: function() {
|
|
2050
|
-
for (var
|
|
2051
|
-
|
|
2057
|
+
for (var l = this._state = [], D = 0; D < 25; D++)
|
|
2058
|
+
l[D] = new x.init();
|
|
2052
2059
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2053
2060
|
},
|
|
2054
|
-
_doProcessBlock: function(
|
|
2061
|
+
_doProcessBlock: function(l, D) {
|
|
2055
2062
|
for (var i = this._state, o = this.blockSize / 2, d = 0; d < o; d++) {
|
|
2056
|
-
var b =
|
|
2063
|
+
var b = l[D + 2 * d], g = l[D + 2 * d + 1];
|
|
2057
2064
|
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, g = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
|
|
2058
|
-
var
|
|
2059
|
-
|
|
2065
|
+
var y = i[d];
|
|
2066
|
+
y.high ^= g, y.low ^= b;
|
|
2060
2067
|
}
|
|
2061
2068
|
for (var k = 0; k < 24; k++) {
|
|
2062
|
-
for (var
|
|
2069
|
+
for (var R = 0; R < 5; R++) {
|
|
2063
2070
|
for (var F = 0, w = 0, H = 0; H < 5; H++) {
|
|
2064
|
-
var
|
|
2065
|
-
F ^=
|
|
2071
|
+
var y = i[R + 5 * H];
|
|
2072
|
+
F ^= y.high, w ^= y.low;
|
|
2066
2073
|
}
|
|
2067
|
-
var
|
|
2068
|
-
|
|
2074
|
+
var $ = u[R];
|
|
2075
|
+
$.high = F, $.low = w;
|
|
2069
2076
|
}
|
|
2070
|
-
for (var
|
|
2071
|
-
for (var z = u[(
|
|
2072
|
-
var
|
|
2073
|
-
|
|
2077
|
+
for (var R = 0; R < 5; R++)
|
|
2078
|
+
for (var z = u[(R + 4) % 5], O = u[(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++) {
|
|
2079
|
+
var y = i[R + 5 * H];
|
|
2080
|
+
y.high ^= F, y.low ^= w;
|
|
2074
2081
|
}
|
|
2075
|
-
for (var
|
|
2076
|
-
var F, w,
|
|
2082
|
+
for (var M = 1; M < 25; M++) {
|
|
2083
|
+
var F, w, y = i[M], N = y.high, j = y.low, S = E[M];
|
|
2077
2084
|
S < 32 ? (F = N << S | j >>> 32 - S, w = j << S | N >>> 32 - S) : (F = j << S - 32 | N >>> 64 - S, w = N << S - 32 | j >>> 64 - S);
|
|
2078
|
-
var
|
|
2079
|
-
|
|
2085
|
+
var c = u[a[M]];
|
|
2086
|
+
c.high = F, c.low = w;
|
|
2080
2087
|
}
|
|
2081
2088
|
var A = u[0], m = i[0];
|
|
2082
2089
|
A.high = m.high, A.low = m.low;
|
|
2083
|
-
for (var
|
|
2090
|
+
for (var R = 0; R < 5; R++)
|
|
2084
2091
|
for (var H = 0; H < 5; H++) {
|
|
2085
|
-
var
|
|
2086
|
-
|
|
2092
|
+
var M = R + 5 * H, y = i[M], W = u[M], P = u[(R + 1) % 5 + 5 * H], L = u[(R + 2) % 5 + 5 * H];
|
|
2093
|
+
y.high = W.high ^ ~P.high & L.high, y.low = W.low ^ ~P.low & L.low;
|
|
2087
2094
|
}
|
|
2088
|
-
var
|
|
2089
|
-
|
|
2095
|
+
var y = i[0], I = s[k];
|
|
2096
|
+
y.high ^= I.high, y.low ^= I.low;
|
|
2090
2097
|
}
|
|
2091
2098
|
},
|
|
2092
2099
|
_doFinalize: function() {
|
|
2093
|
-
var
|
|
2100
|
+
var l = this._data, D = l.words;
|
|
2094
2101
|
this._nDataBytes * 8;
|
|
2095
|
-
var i =
|
|
2096
|
-
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128,
|
|
2097
|
-
for (var d = this._state, b = this.cfg.outputLength / 8, g = b / 8,
|
|
2098
|
-
var
|
|
2099
|
-
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360,
|
|
2102
|
+
var i = l.sigBytes * 8, o = this.blockSize * 32;
|
|
2103
|
+
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, l.sigBytes = D.length * 4, this._process();
|
|
2104
|
+
for (var d = this._state, b = this.cfg.outputLength / 8, g = b / 8, y = [], k = 0; k < g; k++) {
|
|
2105
|
+
var R = d[k], F = R.high, w = R.low;
|
|
2106
|
+
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, y.push(w), y.push(F);
|
|
2100
2107
|
}
|
|
2101
|
-
return new
|
|
2108
|
+
return new _.init(y, b);
|
|
2102
2109
|
},
|
|
2103
2110
|
clone: function() {
|
|
2104
|
-
for (var
|
|
2111
|
+
for (var l = B.clone.call(this), D = l._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2105
2112
|
D[i] = D[i].clone();
|
|
2106
|
-
return
|
|
2113
|
+
return l;
|
|
2107
2114
|
}
|
|
2108
2115
|
});
|
|
2109
|
-
|
|
2116
|
+
f.SHA3 = B._createHelper(p), f.HmacSHA3 = B._createHmacHelper(p);
|
|
2110
2117
|
})(Math), t.SHA3;
|
|
2111
2118
|
});
|
|
2112
|
-
})(
|
|
2119
|
+
})(T0)), T0.exports;
|
|
2113
2120
|
}
|
|
2114
|
-
var N0 = { exports: {} },
|
|
2115
|
-
function
|
|
2116
|
-
return
|
|
2121
|
+
var N0 = { exports: {} }, Qt = N0.exports, ee;
|
|
2122
|
+
function Vt() {
|
|
2123
|
+
return ee || (ee = 1, (function(r, h) {
|
|
2117
2124
|
(function(t, e) {
|
|
2118
|
-
r.exports = e(
|
|
2119
|
-
})(
|
|
2125
|
+
r.exports = e(T());
|
|
2126
|
+
})(Qt, function(t) {
|
|
2120
2127
|
return (function(e) {
|
|
2121
|
-
var
|
|
2128
|
+
var f = t, v = f.lib, _ = v.WordArray, B = v.Hasher, C = f.algo, x = _.create([
|
|
2122
2129
|
0,
|
|
2123
2130
|
1,
|
|
2124
2131
|
2,
|
|
@@ -2199,7 +2206,7 @@ function Yt() {
|
|
|
2199
2206
|
6,
|
|
2200
2207
|
15,
|
|
2201
2208
|
13
|
|
2202
|
-
]), n =
|
|
2209
|
+
]), n = _.create([
|
|
2203
2210
|
5,
|
|
2204
2211
|
14,
|
|
2205
2212
|
7,
|
|
@@ -2280,7 +2287,7 @@ function Yt() {
|
|
|
2280
2287
|
3,
|
|
2281
2288
|
9,
|
|
2282
2289
|
11
|
|
2283
|
-
]), E =
|
|
2290
|
+
]), E = _.create([
|
|
2284
2291
|
11,
|
|
2285
2292
|
14,
|
|
2286
2293
|
15,
|
|
@@ -2361,7 +2368,7 @@ function Yt() {
|
|
|
2361
2368
|
8,
|
|
2362
2369
|
5,
|
|
2363
2370
|
6
|
|
2364
|
-
]), a =
|
|
2371
|
+
]), a = _.create([
|
|
2365
2372
|
8,
|
|
2366
2373
|
9,
|
|
2367
2374
|
9,
|
|
@@ -2442,27 +2449,27 @@ function Yt() {
|
|
|
2442
2449
|
13,
|
|
2443
2450
|
11,
|
|
2444
2451
|
11
|
|
2445
|
-
]), s =
|
|
2452
|
+
]), s = _.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), u = _.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), p = C.RIPEMD160 = B.extend({
|
|
2446
2453
|
_doReset: function() {
|
|
2447
|
-
this._hash =
|
|
2454
|
+
this._hash = _.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2448
2455
|
},
|
|
2449
|
-
_doProcessBlock: function(g,
|
|
2456
|
+
_doProcessBlock: function(g, y) {
|
|
2450
2457
|
for (var k = 0; k < 16; k++) {
|
|
2451
|
-
var
|
|
2452
|
-
g[
|
|
2458
|
+
var R = y + k, F = g[R];
|
|
2459
|
+
g[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2453
2460
|
}
|
|
2454
|
-
var w = this._hash.words, H = s.words,
|
|
2455
|
-
A =
|
|
2461
|
+
var w = this._hash.words, H = s.words, $ = u.words, z = x.words, O = n.words, q = E.words, U = a.words, M, N, j, S, c, A, m, W, P, L;
|
|
2462
|
+
A = M = w[0], m = N = w[1], W = j = w[2], P = S = w[3], L = c = w[4];
|
|
2456
2463
|
for (var I, k = 0; k < 80; k += 1)
|
|
2457
|
-
I =
|
|
2458
|
-
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] +
|
|
2464
|
+
I = M + g[y + z[k]] | 0, k < 16 ? I += l(N, j, S) + H[0] : k < 32 ? I += D(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, M = c, c = S, S = b(j, 10), j = N, N = I, I = A + g[y + O[k]] | 0, k < 16 ? I += d(m, W, P) + $[0] : k < 32 ? I += o(m, W, P) + $[1] : k < 48 ? I += i(m, W, P) + $[2] : k < 64 ? I += D(m, W, P) + $[3] : I += l(m, W, P) + $[4], I = I | 0, I = b(I, U[k]), I = I + L | 0, A = L, L = P, P = b(W, 10), W = m, m = I;
|
|
2465
|
+
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + M + m | 0, w[4] = w[0] + N + W | 0, w[0] = I;
|
|
2459
2466
|
},
|
|
2460
2467
|
_doFinalize: function() {
|
|
2461
|
-
var g = this._data,
|
|
2462
|
-
|
|
2468
|
+
var g = this._data, y = g.words, k = this._nDataBytes * 8, R = g.sigBytes * 8;
|
|
2469
|
+
y[R >>> 5] |= 128 << 24 - R % 32, y[(R + 64 >>> 9 << 4) + 14] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, g.sigBytes = (y.length + 1) * 4, this._process();
|
|
2463
2470
|
for (var F = this._hash, w = F.words, H = 0; H < 5; H++) {
|
|
2464
|
-
var
|
|
2465
|
-
w[H] = (
|
|
2471
|
+
var $ = w[H];
|
|
2472
|
+
w[H] = ($ << 8 | $ >>> 24) & 16711935 | ($ << 24 | $ >>> 8) & 4278255360;
|
|
2466
2473
|
}
|
|
2467
2474
|
return F;
|
|
2468
2475
|
},
|
|
@@ -2471,37 +2478,37 @@ function Yt() {
|
|
|
2471
2478
|
return g._hash = this._hash.clone(), g;
|
|
2472
2479
|
}
|
|
2473
2480
|
});
|
|
2474
|
-
function
|
|
2475
|
-
return g ^
|
|
2481
|
+
function l(g, y, k) {
|
|
2482
|
+
return g ^ y ^ k;
|
|
2476
2483
|
}
|
|
2477
|
-
function D(g,
|
|
2478
|
-
return g &
|
|
2484
|
+
function D(g, y, k) {
|
|
2485
|
+
return g & y | ~g & k;
|
|
2479
2486
|
}
|
|
2480
|
-
function i(g,
|
|
2481
|
-
return (g | ~
|
|
2487
|
+
function i(g, y, k) {
|
|
2488
|
+
return (g | ~y) ^ k;
|
|
2482
2489
|
}
|
|
2483
|
-
function o(g,
|
|
2484
|
-
return g & k |
|
|
2490
|
+
function o(g, y, k) {
|
|
2491
|
+
return g & k | y & ~k;
|
|
2485
2492
|
}
|
|
2486
|
-
function d(g,
|
|
2487
|
-
return g ^ (
|
|
2493
|
+
function d(g, y, k) {
|
|
2494
|
+
return g ^ (y | ~k);
|
|
2488
2495
|
}
|
|
2489
|
-
function b(g,
|
|
2490
|
-
return g <<
|
|
2496
|
+
function b(g, y) {
|
|
2497
|
+
return g << y | g >>> 32 - y;
|
|
2491
2498
|
}
|
|
2492
|
-
|
|
2499
|
+
f.RIPEMD160 = B._createHelper(p), f.HmacRIPEMD160 = B._createHmacHelper(p);
|
|
2493
2500
|
})(), t.RIPEMD160;
|
|
2494
2501
|
});
|
|
2495
2502
|
})(N0)), N0.exports;
|
|
2496
2503
|
}
|
|
2497
|
-
var U0 = { exports: {} },
|
|
2498
|
-
function
|
|
2499
|
-
return
|
|
2504
|
+
var U0 = { exports: {} }, Jt = U0.exports, te;
|
|
2505
|
+
function mr() {
|
|
2506
|
+
return te || (te = 1, (function(r, h) {
|
|
2500
2507
|
(function(t, e) {
|
|
2501
|
-
r.exports = e(
|
|
2502
|
-
})(
|
|
2508
|
+
r.exports = e(T());
|
|
2509
|
+
})(Jt, function(t) {
|
|
2503
2510
|
(function() {
|
|
2504
|
-
var e = t,
|
|
2511
|
+
var e = t, f = e.lib, v = f.Base, _ = e.enc, B = _.Utf8, C = e.algo;
|
|
2505
2512
|
C.HMAC = v.extend({
|
|
2506
2513
|
/**
|
|
2507
2514
|
* Initializes a newly created HMAC.
|
|
@@ -2517,8 +2524,8 @@ function _r() {
|
|
|
2517
2524
|
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2518
2525
|
var E = x.blockSize, a = E * 4;
|
|
2519
2526
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2520
|
-
for (var s = this._oKey = n.clone(), u = this._iKey = n.clone(), p = s.words,
|
|
2521
|
-
p[D] ^= 1549556828,
|
|
2527
|
+
for (var s = this._oKey = n.clone(), u = this._iKey = n.clone(), p = s.words, l = u.words, D = 0; D < E; D++)
|
|
2528
|
+
p[D] ^= 1549556828, l[D] ^= 909522486;
|
|
2522
2529
|
s.sigBytes = u.sigBytes = a, this.reset();
|
|
2523
2530
|
},
|
|
2524
2531
|
/**
|
|
@@ -2572,14 +2579,14 @@ function _r() {
|
|
|
2572
2579
|
});
|
|
2573
2580
|
})(U0)), U0.exports;
|
|
2574
2581
|
}
|
|
2575
|
-
var j0 = { exports: {} },
|
|
2576
|
-
function
|
|
2577
|
-
return
|
|
2578
|
-
(function(t, e,
|
|
2579
|
-
r.exports = e(
|
|
2580
|
-
})(
|
|
2582
|
+
var j0 = { exports: {} }, rx = j0.exports, xe;
|
|
2583
|
+
function ex() {
|
|
2584
|
+
return xe || (xe = 1, (function(r, h) {
|
|
2585
|
+
(function(t, e, f) {
|
|
2586
|
+
r.exports = e(T(), br(), mr());
|
|
2587
|
+
})(rx, function(t) {
|
|
2581
2588
|
return (function() {
|
|
2582
|
-
var e = t,
|
|
2589
|
+
var e = t, f = e.lib, v = f.Base, _ = f.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = v.extend({
|
|
2583
2590
|
/**
|
|
2584
2591
|
* Configuration options.
|
|
2585
2592
|
*
|
|
@@ -2619,12 +2626,12 @@ function Jt() {
|
|
|
2619
2626
|
* var key = kdf.compute(password, salt);
|
|
2620
2627
|
*/
|
|
2621
2628
|
compute: function(E, a) {
|
|
2622
|
-
for (var s = this.cfg, u = x.create(s.hasher, E), p =
|
|
2623
|
-
var b = u.update(a).finalize(
|
|
2629
|
+
for (var s = this.cfg, u = x.create(s.hasher, E), p = _.create(), l = _.create([1]), D = p.words, i = l.words, o = s.keySize, d = s.iterations; D.length < o; ) {
|
|
2630
|
+
var b = u.update(a).finalize(l);
|
|
2624
2631
|
u.reset();
|
|
2625
|
-
for (var g = b.words,
|
|
2632
|
+
for (var g = b.words, y = g.length, k = b, R = 1; R < d; R++) {
|
|
2626
2633
|
k = u.finalize(k), u.reset();
|
|
2627
|
-
for (var F = k.words, w = 0; w <
|
|
2634
|
+
for (var F = k.words, w = 0; w < y; w++)
|
|
2628
2635
|
g[w] ^= F[w];
|
|
2629
2636
|
}
|
|
2630
2637
|
p.concat(b), i[0]++;
|
|
@@ -2639,14 +2646,14 @@ function Jt() {
|
|
|
2639
2646
|
});
|
|
2640
2647
|
})(j0)), j0.exports;
|
|
2641
2648
|
}
|
|
2642
|
-
var G0 = { exports: {} },
|
|
2649
|
+
var G0 = { exports: {} }, tx = G0.exports, ne;
|
|
2643
2650
|
function o0() {
|
|
2644
|
-
return
|
|
2645
|
-
(function(t, e,
|
|
2646
|
-
r.exports = e(
|
|
2647
|
-
})(
|
|
2651
|
+
return ne || (ne = 1, (function(r, h) {
|
|
2652
|
+
(function(t, e, f) {
|
|
2653
|
+
r.exports = e(T(), Re(), mr());
|
|
2654
|
+
})(tx, function(t) {
|
|
2648
2655
|
return (function() {
|
|
2649
|
-
var e = t,
|
|
2656
|
+
var e = t, f = e.lib, v = f.Base, _ = f.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = v.extend({
|
|
2650
2657
|
/**
|
|
2651
2658
|
* Configuration options.
|
|
2652
2659
|
*
|
|
@@ -2686,7 +2693,7 @@ function o0() {
|
|
|
2686
2693
|
* var key = kdf.compute(password, salt);
|
|
2687
2694
|
*/
|
|
2688
2695
|
compute: function(n, E) {
|
|
2689
|
-
for (var a, s = this.cfg, u = s.hasher.create(), p =
|
|
2696
|
+
for (var a, s = this.cfg, u = s.hasher.create(), p = _.create(), l = p.words, D = s.keySize, i = s.iterations; l.length < D; ) {
|
|
2690
2697
|
a && u.update(a), a = u.update(n).finalize(E), u.reset();
|
|
2691
2698
|
for (var o = 1; o < i; o++)
|
|
2692
2699
|
a = u.finalize(a), u.reset();
|
|
@@ -2702,22 +2709,22 @@ function o0() {
|
|
|
2702
2709
|
});
|
|
2703
2710
|
})(G0)), G0.exports;
|
|
2704
2711
|
}
|
|
2705
|
-
var K0 = { exports: {} },
|
|
2712
|
+
var K0 = { exports: {} }, xx = K0.exports, ae;
|
|
2706
2713
|
function X() {
|
|
2707
|
-
return
|
|
2708
|
-
(function(t, e,
|
|
2709
|
-
r.exports = e(
|
|
2710
|
-
})(
|
|
2714
|
+
return ae || (ae = 1, (function(r, h) {
|
|
2715
|
+
(function(t, e, f) {
|
|
2716
|
+
r.exports = e(T(), o0());
|
|
2717
|
+
})(xx, function(t) {
|
|
2711
2718
|
t.lib.Cipher || (function(e) {
|
|
2712
|
-
var
|
|
2719
|
+
var f = t, v = f.lib, _ = v.Base, B = v.WordArray, C = v.BufferedBlockAlgorithm, x = f.enc;
|
|
2713
2720
|
x.Utf8;
|
|
2714
|
-
var n = x.Base64, E =
|
|
2721
|
+
var n = x.Base64, E = f.algo, a = E.EvpKDF, s = v.Cipher = C.extend({
|
|
2715
2722
|
/**
|
|
2716
2723
|
* Configuration options.
|
|
2717
2724
|
*
|
|
2718
2725
|
* @property {WordArray} iv The IV to use for this operation.
|
|
2719
2726
|
*/
|
|
2720
|
-
cfg:
|
|
2727
|
+
cfg: _.extend(),
|
|
2721
2728
|
/**
|
|
2722
2729
|
* Creates this cipher in encryption mode.
|
|
2723
2730
|
*
|
|
@@ -2829,15 +2836,15 @@ function X() {
|
|
|
2829
2836
|
*/
|
|
2830
2837
|
_createHelper: /* @__PURE__ */ (function() {
|
|
2831
2838
|
function F(w) {
|
|
2832
|
-
return typeof w == "string" ?
|
|
2839
|
+
return typeof w == "string" ? R : g;
|
|
2833
2840
|
}
|
|
2834
2841
|
return function(w) {
|
|
2835
2842
|
return {
|
|
2836
|
-
encrypt: function(H,
|
|
2837
|
-
return F(
|
|
2843
|
+
encrypt: function(H, $, z) {
|
|
2844
|
+
return F($).encrypt(w, H, $, z);
|
|
2838
2845
|
},
|
|
2839
|
-
decrypt: function(H,
|
|
2840
|
-
return F(
|
|
2846
|
+
decrypt: function(H, $, z) {
|
|
2847
|
+
return F($).decrypt(w, H, $, z);
|
|
2841
2848
|
}
|
|
2842
2849
|
};
|
|
2843
2850
|
};
|
|
@@ -2850,7 +2857,7 @@ function X() {
|
|
|
2850
2857
|
},
|
|
2851
2858
|
blockSize: 1
|
|
2852
2859
|
});
|
|
2853
|
-
var u =
|
|
2860
|
+
var u = f.mode = {}, p = v.BlockCipherMode = _.extend({
|
|
2854
2861
|
/**
|
|
2855
2862
|
* Creates this mode for encryption.
|
|
2856
2863
|
*
|
|
@@ -2894,7 +2901,7 @@ function X() {
|
|
|
2894
2901
|
init: function(F, w) {
|
|
2895
2902
|
this._cipher = F, this._iv = w;
|
|
2896
2903
|
}
|
|
2897
|
-
}),
|
|
2904
|
+
}), l = u.CBC = (function() {
|
|
2898
2905
|
var F = p.extend();
|
|
2899
2906
|
F.Encryptor = F.extend({
|
|
2900
2907
|
/**
|
|
@@ -2907,9 +2914,9 @@ function X() {
|
|
|
2907
2914
|
*
|
|
2908
2915
|
* mode.processBlock(data.words, offset);
|
|
2909
2916
|
*/
|
|
2910
|
-
processBlock: function(H,
|
|
2917
|
+
processBlock: function(H, $) {
|
|
2911
2918
|
var z = this._cipher, O = z.blockSize;
|
|
2912
|
-
w.call(this, H,
|
|
2919
|
+
w.call(this, H, $, O), z.encryptBlock(H, $), this._prevBlock = H.slice($, $ + O);
|
|
2913
2920
|
}
|
|
2914
2921
|
}), F.Decryptor = F.extend({
|
|
2915
2922
|
/**
|
|
@@ -2922,19 +2929,19 @@ function X() {
|
|
|
2922
2929
|
*
|
|
2923
2930
|
* mode.processBlock(data.words, offset);
|
|
2924
2931
|
*/
|
|
2925
|
-
processBlock: function(H,
|
|
2926
|
-
var z = this._cipher, O = z.blockSize, q = H.slice(
|
|
2927
|
-
z.decryptBlock(H,
|
|
2932
|
+
processBlock: function(H, $) {
|
|
2933
|
+
var z = this._cipher, O = z.blockSize, q = H.slice($, $ + O);
|
|
2934
|
+
z.decryptBlock(H, $), w.call(this, H, $, O), this._prevBlock = q;
|
|
2928
2935
|
}
|
|
2929
2936
|
});
|
|
2930
|
-
function w(H,
|
|
2937
|
+
function w(H, $, z) {
|
|
2931
2938
|
var O, q = this._iv;
|
|
2932
2939
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2933
2940
|
for (var U = 0; U < z; U++)
|
|
2934
|
-
H[
|
|
2941
|
+
H[$ + U] ^= O[U];
|
|
2935
2942
|
}
|
|
2936
2943
|
return F;
|
|
2937
|
-
})(), D =
|
|
2944
|
+
})(), D = f.pad = {}, i = D.Pkcs7 = {
|
|
2938
2945
|
/**
|
|
2939
2946
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2940
2947
|
*
|
|
@@ -2948,9 +2955,9 @@ function X() {
|
|
|
2948
2955
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2949
2956
|
*/
|
|
2950
2957
|
pad: function(F, w) {
|
|
2951
|
-
for (var H = w * 4,
|
|
2958
|
+
for (var H = w * 4, $ = H - F.sigBytes % H, z = $ << 24 | $ << 16 | $ << 8 | $, O = [], q = 0; q < $; q += 4)
|
|
2952
2959
|
O.push(z);
|
|
2953
|
-
var U = B.create(O,
|
|
2960
|
+
var U = B.create(O, $);
|
|
2954
2961
|
F.concat(U);
|
|
2955
2962
|
},
|
|
2956
2963
|
/**
|
|
@@ -2977,14 +2984,14 @@ function X() {
|
|
|
2977
2984
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2978
2985
|
*/
|
|
2979
2986
|
cfg: s.cfg.extend({
|
|
2980
|
-
mode:
|
|
2987
|
+
mode: l,
|
|
2981
2988
|
padding: i
|
|
2982
2989
|
}),
|
|
2983
2990
|
reset: function() {
|
|
2984
2991
|
var F;
|
|
2985
2992
|
s.reset.call(this);
|
|
2986
|
-
var w = this.cfg, H = w.iv,
|
|
2987
|
-
this._xformMode == this._ENC_XFORM_MODE ? F =
|
|
2993
|
+
var w = this.cfg, H = w.iv, $ = w.mode;
|
|
2994
|
+
this._xformMode == this._ENC_XFORM_MODE ? F = $.createEncryptor : (F = $.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == F ? this._mode.init(this, H && H.words) : (this._mode = F.call($, this, H && H.words), this._mode.__creator = F);
|
|
2988
2995
|
},
|
|
2989
2996
|
_doProcessBlock: function(F, w) {
|
|
2990
2997
|
this._mode.processBlock(F, w);
|
|
@@ -2995,7 +3002,7 @@ function X() {
|
|
|
2995
3002
|
},
|
|
2996
3003
|
blockSize: 128 / 32
|
|
2997
3004
|
});
|
|
2998
|
-
var o = v.CipherParams =
|
|
3005
|
+
var o = v.CipherParams = _.extend({
|
|
2999
3006
|
/**
|
|
3000
3007
|
* Initializes a newly created cipher params object.
|
|
3001
3008
|
*
|
|
@@ -3036,7 +3043,7 @@ function X() {
|
|
|
3036
3043
|
toString: function(F) {
|
|
3037
3044
|
return (F || this.formatter).stringify(this);
|
|
3038
3045
|
}
|
|
3039
|
-
}), d =
|
|
3046
|
+
}), d = f.format = {}, b = d.OpenSSL = {
|
|
3040
3047
|
/**
|
|
3041
3048
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
3042
3049
|
*
|
|
@@ -3051,8 +3058,8 @@ function X() {
|
|
|
3051
3058
|
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
|
|
3052
3059
|
*/
|
|
3053
3060
|
stringify: function(F) {
|
|
3054
|
-
var w, H = F.ciphertext,
|
|
3055
|
-
return
|
|
3061
|
+
var w, H = F.ciphertext, $ = F.salt;
|
|
3062
|
+
return $ ? w = B.create([1398893684, 1701076831]).concat($).concat(H) : w = H, w.toString(n);
|
|
3056
3063
|
},
|
|
3057
3064
|
/**
|
|
3058
3065
|
* Converts an OpenSSL-compatible string to a cipher params object.
|
|
@@ -3068,16 +3075,16 @@ function X() {
|
|
|
3068
3075
|
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
|
|
3069
3076
|
*/
|
|
3070
3077
|
parse: function(F) {
|
|
3071
|
-
var w, H = n.parse(F),
|
|
3072
|
-
return
|
|
3078
|
+
var w, H = n.parse(F), $ = H.words;
|
|
3079
|
+
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3073
3080
|
}
|
|
3074
|
-
}, g = v.SerializableCipher =
|
|
3081
|
+
}, g = v.SerializableCipher = _.extend({
|
|
3075
3082
|
/**
|
|
3076
3083
|
* Configuration options.
|
|
3077
3084
|
*
|
|
3078
3085
|
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
|
|
3079
3086
|
*/
|
|
3080
|
-
cfg:
|
|
3087
|
+
cfg: _.extend({
|
|
3081
3088
|
format: b
|
|
3082
3089
|
}),
|
|
3083
3090
|
/**
|
|
@@ -3098,9 +3105,9 @@ function X() {
|
|
|
3098
3105
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
|
|
3099
3106
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3100
3107
|
*/
|
|
3101
|
-
encrypt: function(F, w, H,
|
|
3102
|
-
|
|
3103
|
-
var z = F.createEncryptor(H,
|
|
3108
|
+
encrypt: function(F, w, H, $) {
|
|
3109
|
+
$ = this.cfg.extend($);
|
|
3110
|
+
var z = F.createEncryptor(H, $), O = z.finalize(w), q = z.cfg;
|
|
3104
3111
|
return o.create({
|
|
3105
3112
|
ciphertext: O,
|
|
3106
3113
|
key: H,
|
|
@@ -3109,7 +3116,7 @@ function X() {
|
|
|
3109
3116
|
mode: q.mode,
|
|
3110
3117
|
padding: q.padding,
|
|
3111
3118
|
blockSize: F.blockSize,
|
|
3112
|
-
formatter:
|
|
3119
|
+
formatter: $.format
|
|
3113
3120
|
});
|
|
3114
3121
|
},
|
|
3115
3122
|
/**
|
|
@@ -3129,9 +3136,9 @@ function X() {
|
|
|
3129
3136
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3130
3137
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3131
3138
|
*/
|
|
3132
|
-
decrypt: function(F, w, H,
|
|
3133
|
-
|
|
3134
|
-
var z = F.createDecryptor(H,
|
|
3139
|
+
decrypt: function(F, w, H, $) {
|
|
3140
|
+
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3141
|
+
var z = F.createDecryptor(H, $).finalize(w.ciphertext);
|
|
3135
3142
|
return z;
|
|
3136
3143
|
},
|
|
3137
3144
|
/**
|
|
@@ -3152,7 +3159,7 @@ function X() {
|
|
|
3152
3159
|
_parse: function(F, w) {
|
|
3153
3160
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3154
3161
|
}
|
|
3155
|
-
}),
|
|
3162
|
+
}), y = f.kdf = {}, k = y.OpenSSL = {
|
|
3156
3163
|
/**
|
|
3157
3164
|
* Derives a key and IV from a password.
|
|
3158
3165
|
*
|
|
@@ -3170,15 +3177,15 @@ function X() {
|
|
|
3170
3177
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3171
3178
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3172
3179
|
*/
|
|
3173
|
-
execute: function(F, w, H,
|
|
3174
|
-
if (
|
|
3175
|
-
var O = a.create({ keySize: w + H, hasher: z }).compute(F,
|
|
3180
|
+
execute: function(F, w, H, $, z) {
|
|
3181
|
+
if ($ || ($ = B.random(64 / 8)), z)
|
|
3182
|
+
var O = a.create({ keySize: w + H, hasher: z }).compute(F, $);
|
|
3176
3183
|
else
|
|
3177
|
-
var O = a.create({ keySize: w + H }).compute(F,
|
|
3184
|
+
var O = a.create({ keySize: w + H }).compute(F, $);
|
|
3178
3185
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3179
|
-
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt:
|
|
3186
|
+
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3180
3187
|
}
|
|
3181
|
-
},
|
|
3188
|
+
}, R = v.PasswordBasedCipher = g.extend({
|
|
3182
3189
|
/**
|
|
3183
3190
|
* Configuration options.
|
|
3184
3191
|
*
|
|
@@ -3204,11 +3211,11 @@ function X() {
|
|
|
3204
3211
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
|
|
3205
3212
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3206
3213
|
*/
|
|
3207
|
-
encrypt: function(F, w, H,
|
|
3208
|
-
|
|
3209
|
-
var z =
|
|
3210
|
-
|
|
3211
|
-
var O = g.encrypt.call(this, F, w, z.key,
|
|
3214
|
+
encrypt: function(F, w, H, $) {
|
|
3215
|
+
$ = this.cfg.extend($);
|
|
3216
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, $.salt, $.hasher);
|
|
3217
|
+
$.iv = z.iv;
|
|
3218
|
+
var O = g.encrypt.call(this, F, w, z.key, $);
|
|
3212
3219
|
return O.mixIn(z), O;
|
|
3213
3220
|
},
|
|
3214
3221
|
/**
|
|
@@ -3228,11 +3235,11 @@ function X() {
|
|
|
3228
3235
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3229
3236
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3230
3237
|
*/
|
|
3231
|
-
decrypt: function(F, w, H,
|
|
3232
|
-
|
|
3233
|
-
var z =
|
|
3234
|
-
|
|
3235
|
-
var O = g.decrypt.call(this, F, w, z.key,
|
|
3238
|
+
decrypt: function(F, w, H, $) {
|
|
3239
|
+
$ = this.cfg.extend($), w = this._parse(w, $.format);
|
|
3240
|
+
var z = $.kdf.execute(H, F.keySize, F.ivSize, w.salt, $.hasher);
|
|
3241
|
+
$.iv = z.iv;
|
|
3242
|
+
var O = g.decrypt.call(this, F, w, z.key, $);
|
|
3236
3243
|
return O;
|
|
3237
3244
|
}
|
|
3238
3245
|
});
|
|
@@ -3240,67 +3247,67 @@ function X() {
|
|
|
3240
3247
|
});
|
|
3241
3248
|
})(K0)), K0.exports;
|
|
3242
3249
|
}
|
|
3243
|
-
var X0 = { exports: {} },
|
|
3244
|
-
function
|
|
3245
|
-
return
|
|
3246
|
-
(function(t, e,
|
|
3247
|
-
r.exports = e(
|
|
3248
|
-
})(
|
|
3250
|
+
var X0 = { exports: {} }, nx = X0.exports, oe;
|
|
3251
|
+
function ax() {
|
|
3252
|
+
return oe || (oe = 1, (function(r, h) {
|
|
3253
|
+
(function(t, e, f) {
|
|
3254
|
+
r.exports = e(T(), X());
|
|
3255
|
+
})(nx, function(t) {
|
|
3249
3256
|
return t.mode.CFB = (function() {
|
|
3250
3257
|
var e = t.lib.BlockCipherMode.extend();
|
|
3251
3258
|
e.Encryptor = e.extend({
|
|
3252
|
-
processBlock: function(v,
|
|
3259
|
+
processBlock: function(v, _) {
|
|
3253
3260
|
var B = this._cipher, C = B.blockSize;
|
|
3254
|
-
|
|
3261
|
+
f.call(this, v, _, C, B), this._prevBlock = v.slice(_, _ + C);
|
|
3255
3262
|
}
|
|
3256
3263
|
}), e.Decryptor = e.extend({
|
|
3257
|
-
processBlock: function(v,
|
|
3258
|
-
var B = this._cipher, C = B.blockSize, x = v.slice(
|
|
3259
|
-
|
|
3264
|
+
processBlock: function(v, _) {
|
|
3265
|
+
var B = this._cipher, C = B.blockSize, x = v.slice(_, _ + C);
|
|
3266
|
+
f.call(this, v, _, C, B), this._prevBlock = x;
|
|
3260
3267
|
}
|
|
3261
3268
|
});
|
|
3262
|
-
function
|
|
3269
|
+
function f(v, _, B, C) {
|
|
3263
3270
|
var x, n = this._iv;
|
|
3264
3271
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3265
3272
|
for (var E = 0; E < B; E++)
|
|
3266
|
-
v[
|
|
3273
|
+
v[_ + E] ^= x[E];
|
|
3267
3274
|
}
|
|
3268
3275
|
return e;
|
|
3269
3276
|
})(), t.mode.CFB;
|
|
3270
3277
|
});
|
|
3271
3278
|
})(X0)), X0.exports;
|
|
3272
3279
|
}
|
|
3273
|
-
var
|
|
3274
|
-
function
|
|
3275
|
-
return
|
|
3276
|
-
(function(t, e,
|
|
3277
|
-
r.exports = e(
|
|
3278
|
-
})(
|
|
3280
|
+
var Y0 = { exports: {} }, ox = Y0.exports, ie;
|
|
3281
|
+
function ix() {
|
|
3282
|
+
return ie || (ie = 1, (function(r, h) {
|
|
3283
|
+
(function(t, e, f) {
|
|
3284
|
+
r.exports = e(T(), X());
|
|
3285
|
+
})(ox, function(t) {
|
|
3279
3286
|
return t.mode.CTR = (function() {
|
|
3280
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3281
|
-
processBlock: function(v,
|
|
3287
|
+
var e = t.lib.BlockCipherMode.extend(), f = e.Encryptor = e.extend({
|
|
3288
|
+
processBlock: function(v, _) {
|
|
3282
3289
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3283
3290
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3284
3291
|
var E = n.slice(0);
|
|
3285
3292
|
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3286
3293
|
for (var a = 0; a < C; a++)
|
|
3287
|
-
v[
|
|
3294
|
+
v[_ + a] ^= E[a];
|
|
3288
3295
|
}
|
|
3289
3296
|
});
|
|
3290
|
-
return e.Decryptor =
|
|
3297
|
+
return e.Decryptor = f, e;
|
|
3291
3298
|
})(), t.mode.CTR;
|
|
3292
3299
|
});
|
|
3293
|
-
})(
|
|
3300
|
+
})(Y0)), Y0.exports;
|
|
3294
3301
|
}
|
|
3295
|
-
var
|
|
3296
|
-
function
|
|
3297
|
-
return
|
|
3298
|
-
(function(t, e,
|
|
3299
|
-
r.exports = e(
|
|
3300
|
-
})(
|
|
3302
|
+
var Z0 = { exports: {} }, sx = Z0.exports, se;
|
|
3303
|
+
function cx() {
|
|
3304
|
+
return se || (se = 1, (function(r, h) {
|
|
3305
|
+
(function(t, e, f) {
|
|
3306
|
+
r.exports = e(T(), X());
|
|
3307
|
+
})(sx, function(t) {
|
|
3301
3308
|
return t.mode.CTRGladman = (function() {
|
|
3302
3309
|
var e = t.lib.BlockCipherMode.extend();
|
|
3303
|
-
function
|
|
3310
|
+
function f(B) {
|
|
3304
3311
|
if ((B >> 24 & 255) === 255) {
|
|
3305
3312
|
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3306
3313
|
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;
|
|
@@ -3309,9 +3316,9 @@ function ix() {
|
|
|
3309
3316
|
return B;
|
|
3310
3317
|
}
|
|
3311
3318
|
function v(B) {
|
|
3312
|
-
return (B[0] =
|
|
3319
|
+
return (B[0] = f(B[0])) === 0 && (B[1] = f(B[1])), B;
|
|
3313
3320
|
}
|
|
3314
|
-
var
|
|
3321
|
+
var _ = e.Encryptor = e.extend({
|
|
3315
3322
|
processBlock: function(B, C) {
|
|
3316
3323
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3317
3324
|
E && (a = this._counter = E.slice(0), this._iv = void 0), v(a);
|
|
@@ -3321,99 +3328,99 @@ function ix() {
|
|
|
3321
3328
|
B[C + u] ^= s[u];
|
|
3322
3329
|
}
|
|
3323
3330
|
});
|
|
3324
|
-
return e.Decryptor =
|
|
3331
|
+
return e.Decryptor = _, e;
|
|
3325
3332
|
})(), t.mode.CTRGladman;
|
|
3326
3333
|
});
|
|
3327
|
-
})(
|
|
3334
|
+
})(Z0)), Z0.exports;
|
|
3328
3335
|
}
|
|
3329
|
-
var Q0 = { exports: {} },
|
|
3330
|
-
function
|
|
3331
|
-
return
|
|
3332
|
-
(function(t, e,
|
|
3333
|
-
r.exports = e(
|
|
3334
|
-
})(
|
|
3336
|
+
var Q0 = { exports: {} }, fx = Q0.exports, ce;
|
|
3337
|
+
function ux() {
|
|
3338
|
+
return ce || (ce = 1, (function(r, h) {
|
|
3339
|
+
(function(t, e, f) {
|
|
3340
|
+
r.exports = e(T(), X());
|
|
3341
|
+
})(fx, function(t) {
|
|
3335
3342
|
return t.mode.OFB = (function() {
|
|
3336
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3337
|
-
processBlock: function(v,
|
|
3343
|
+
var e = t.lib.BlockCipherMode.extend(), f = e.Encryptor = e.extend({
|
|
3344
|
+
processBlock: function(v, _) {
|
|
3338
3345
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3339
3346
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3340
3347
|
for (var E = 0; E < C; E++)
|
|
3341
|
-
v[
|
|
3348
|
+
v[_ + E] ^= n[E];
|
|
3342
3349
|
}
|
|
3343
3350
|
});
|
|
3344
|
-
return e.Decryptor =
|
|
3351
|
+
return e.Decryptor = f, e;
|
|
3345
3352
|
})(), t.mode.OFB;
|
|
3346
3353
|
});
|
|
3347
3354
|
})(Q0)), Q0.exports;
|
|
3348
3355
|
}
|
|
3349
|
-
var V0 = { exports: {} },
|
|
3350
|
-
function
|
|
3351
|
-
return
|
|
3352
|
-
(function(t, e,
|
|
3353
|
-
r.exports = e(
|
|
3354
|
-
})(
|
|
3356
|
+
var V0 = { exports: {} }, dx = V0.exports, fe;
|
|
3357
|
+
function lx() {
|
|
3358
|
+
return fe || (fe = 1, (function(r, h) {
|
|
3359
|
+
(function(t, e, f) {
|
|
3360
|
+
r.exports = e(T(), X());
|
|
3361
|
+
})(dx, function(t) {
|
|
3355
3362
|
return t.mode.ECB = (function() {
|
|
3356
3363
|
var e = t.lib.BlockCipherMode.extend();
|
|
3357
3364
|
return e.Encryptor = e.extend({
|
|
3358
|
-
processBlock: function(
|
|
3359
|
-
this._cipher.encryptBlock(
|
|
3365
|
+
processBlock: function(f, v) {
|
|
3366
|
+
this._cipher.encryptBlock(f, v);
|
|
3360
3367
|
}
|
|
3361
3368
|
}), e.Decryptor = e.extend({
|
|
3362
|
-
processBlock: function(
|
|
3363
|
-
this._cipher.decryptBlock(
|
|
3369
|
+
processBlock: function(f, v) {
|
|
3370
|
+
this._cipher.decryptBlock(f, v);
|
|
3364
3371
|
}
|
|
3365
3372
|
}), e;
|
|
3366
3373
|
})(), t.mode.ECB;
|
|
3367
3374
|
});
|
|
3368
3375
|
})(V0)), V0.exports;
|
|
3369
3376
|
}
|
|
3370
|
-
var J0 = { exports: {} },
|
|
3371
|
-
function
|
|
3372
|
-
return
|
|
3373
|
-
(function(t, e,
|
|
3374
|
-
r.exports = e(
|
|
3375
|
-
})(
|
|
3377
|
+
var J0 = { exports: {} }, hx = J0.exports, ue;
|
|
3378
|
+
function vx() {
|
|
3379
|
+
return ue || (ue = 1, (function(r, h) {
|
|
3380
|
+
(function(t, e, f) {
|
|
3381
|
+
r.exports = e(T(), X());
|
|
3382
|
+
})(hx, function(t) {
|
|
3376
3383
|
return t.pad.AnsiX923 = {
|
|
3377
|
-
pad: function(e,
|
|
3378
|
-
var v = e.sigBytes,
|
|
3384
|
+
pad: function(e, f) {
|
|
3385
|
+
var v = e.sigBytes, _ = f * 4, B = _ - v % _, C = v + B - 1;
|
|
3379
3386
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3380
3387
|
},
|
|
3381
3388
|
unpad: function(e) {
|
|
3382
|
-
var
|
|
3383
|
-
e.sigBytes -=
|
|
3389
|
+
var f = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3390
|
+
e.sigBytes -= f;
|
|
3384
3391
|
}
|
|
3385
3392
|
}, t.pad.Ansix923;
|
|
3386
3393
|
});
|
|
3387
3394
|
})(J0)), J0.exports;
|
|
3388
3395
|
}
|
|
3389
|
-
var rr = { exports: {} },
|
|
3390
|
-
function
|
|
3391
|
-
return
|
|
3392
|
-
(function(t, e,
|
|
3393
|
-
r.exports = e(
|
|
3394
|
-
})(
|
|
3396
|
+
var rr = { exports: {} }, px = rr.exports, de;
|
|
3397
|
+
function Bx() {
|
|
3398
|
+
return de || (de = 1, (function(r, h) {
|
|
3399
|
+
(function(t, e, f) {
|
|
3400
|
+
r.exports = e(T(), X());
|
|
3401
|
+
})(px, function(t) {
|
|
3395
3402
|
return t.pad.Iso10126 = {
|
|
3396
|
-
pad: function(e,
|
|
3397
|
-
var v =
|
|
3398
|
-
e.concat(t.lib.WordArray.random(
|
|
3403
|
+
pad: function(e, f) {
|
|
3404
|
+
var v = f * 4, _ = v - e.sigBytes % v;
|
|
3405
|
+
e.concat(t.lib.WordArray.random(_ - 1)).concat(t.lib.WordArray.create([_ << 24], 1));
|
|
3399
3406
|
},
|
|
3400
3407
|
unpad: function(e) {
|
|
3401
|
-
var
|
|
3402
|
-
e.sigBytes -=
|
|
3408
|
+
var f = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3409
|
+
e.sigBytes -= f;
|
|
3403
3410
|
}
|
|
3404
3411
|
}, t.pad.Iso10126;
|
|
3405
3412
|
});
|
|
3406
3413
|
})(rr)), rr.exports;
|
|
3407
3414
|
}
|
|
3408
|
-
var er = { exports: {} },
|
|
3409
|
-
function
|
|
3410
|
-
return
|
|
3411
|
-
(function(t, e,
|
|
3412
|
-
r.exports = e(
|
|
3413
|
-
})(
|
|
3415
|
+
var er = { exports: {} }, Cx = er.exports, le;
|
|
3416
|
+
function Ex() {
|
|
3417
|
+
return le || (le = 1, (function(r, h) {
|
|
3418
|
+
(function(t, e, f) {
|
|
3419
|
+
r.exports = e(T(), X());
|
|
3420
|
+
})(Cx, function(t) {
|
|
3414
3421
|
return t.pad.Iso97971 = {
|
|
3415
|
-
pad: function(e,
|
|
3416
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3422
|
+
pad: function(e, f) {
|
|
3423
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, f);
|
|
3417
3424
|
},
|
|
3418
3425
|
unpad: function(e) {
|
|
3419
3426
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
@@ -3422,20 +3429,20 @@ function Bx() {
|
|
|
3422
3429
|
});
|
|
3423
3430
|
})(er)), er.exports;
|
|
3424
3431
|
}
|
|
3425
|
-
var tr = { exports: {} },
|
|
3426
|
-
function
|
|
3427
|
-
return
|
|
3428
|
-
(function(t, e,
|
|
3429
|
-
r.exports = e(
|
|
3430
|
-
})(
|
|
3432
|
+
var tr = { exports: {} }, Ax = tr.exports, he;
|
|
3433
|
+
function Fx() {
|
|
3434
|
+
return he || (he = 1, (function(r, h) {
|
|
3435
|
+
(function(t, e, f) {
|
|
3436
|
+
r.exports = e(T(), X());
|
|
3437
|
+
})(Ax, function(t) {
|
|
3431
3438
|
return t.pad.ZeroPadding = {
|
|
3432
|
-
pad: function(e,
|
|
3433
|
-
var v =
|
|
3439
|
+
pad: function(e, f) {
|
|
3440
|
+
var v = f * 4;
|
|
3434
3441
|
e.clamp(), e.sigBytes += v - (e.sigBytes % v || v);
|
|
3435
3442
|
},
|
|
3436
3443
|
unpad: function(e) {
|
|
3437
|
-
for (var
|
|
3438
|
-
if (
|
|
3444
|
+
for (var f = e.words, v = e.sigBytes - 1, v = e.sigBytes - 1; v >= 0; v--)
|
|
3445
|
+
if (f[v >>> 2] >>> 24 - v % 4 * 8 & 255) {
|
|
3439
3446
|
e.sigBytes = v + 1;
|
|
3440
3447
|
break;
|
|
3441
3448
|
}
|
|
@@ -3444,12 +3451,12 @@ function Ex() {
|
|
|
3444
3451
|
});
|
|
3445
3452
|
})(tr)), tr.exports;
|
|
3446
3453
|
}
|
|
3447
|
-
var xr = { exports: {} },
|
|
3448
|
-
function
|
|
3449
|
-
return
|
|
3450
|
-
(function(t, e,
|
|
3451
|
-
r.exports = e(
|
|
3452
|
-
})(
|
|
3454
|
+
var xr = { exports: {} }, gx = xr.exports, ve;
|
|
3455
|
+
function Dx() {
|
|
3456
|
+
return ve || (ve = 1, (function(r, h) {
|
|
3457
|
+
(function(t, e, f) {
|
|
3458
|
+
r.exports = e(T(), X());
|
|
3459
|
+
})(gx, function(t) {
|
|
3453
3460
|
return t.pad.NoPadding = {
|
|
3454
3461
|
pad: function() {
|
|
3455
3462
|
},
|
|
@@ -3459,14 +3466,14 @@ function Fx() {
|
|
|
3459
3466
|
});
|
|
3460
3467
|
})(xr)), xr.exports;
|
|
3461
3468
|
}
|
|
3462
|
-
var nr = { exports: {} },
|
|
3463
|
-
function
|
|
3464
|
-
return
|
|
3465
|
-
(function(t, e,
|
|
3466
|
-
r.exports = e(
|
|
3467
|
-
})(
|
|
3469
|
+
var nr = { exports: {} }, bx = nr.exports, pe;
|
|
3470
|
+
function mx() {
|
|
3471
|
+
return pe || (pe = 1, (function(r, h) {
|
|
3472
|
+
(function(t, e, f) {
|
|
3473
|
+
r.exports = e(T(), X());
|
|
3474
|
+
})(bx, function(t) {
|
|
3468
3475
|
return (function(e) {
|
|
3469
|
-
var
|
|
3476
|
+
var f = t, v = f.lib, _ = v.CipherParams, B = f.enc, C = B.Hex, x = f.format;
|
|
3470
3477
|
x.Hex = {
|
|
3471
3478
|
/**
|
|
3472
3479
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3499,46 +3506,46 @@ function Dx() {
|
|
|
3499
3506
|
*/
|
|
3500
3507
|
parse: function(n) {
|
|
3501
3508
|
var E = C.parse(n);
|
|
3502
|
-
return
|
|
3509
|
+
return _.create({ ciphertext: E });
|
|
3503
3510
|
}
|
|
3504
3511
|
};
|
|
3505
3512
|
})(), t.format.Hex;
|
|
3506
3513
|
});
|
|
3507
3514
|
})(nr)), nr.exports;
|
|
3508
3515
|
}
|
|
3509
|
-
var ar = { exports: {} },
|
|
3510
|
-
function
|
|
3511
|
-
return
|
|
3512
|
-
(function(t, e,
|
|
3513
|
-
r.exports = e(
|
|
3514
|
-
})(
|
|
3516
|
+
var ar = { exports: {} }, _x = ar.exports, Be;
|
|
3517
|
+
function yx() {
|
|
3518
|
+
return Be || (Be = 1, (function(r, h) {
|
|
3519
|
+
(function(t, e, f) {
|
|
3520
|
+
r.exports = e(T(), c0(), f0(), o0(), X());
|
|
3521
|
+
})(_x, function(t) {
|
|
3515
3522
|
return (function() {
|
|
3516
|
-
var e = t,
|
|
3523
|
+
var e = t, f = e.lib, v = f.BlockCipher, _ = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], u = [], p = [], l = [];
|
|
3517
3524
|
(function() {
|
|
3518
3525
|
for (var o = [], d = 0; d < 256; d++)
|
|
3519
3526
|
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
3520
3527
|
for (var b = 0, g = 0, d = 0; d < 256; d++) {
|
|
3521
|
-
var
|
|
3522
|
-
|
|
3523
|
-
var k = o[b],
|
|
3528
|
+
var y = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4;
|
|
3529
|
+
y = y >>> 8 ^ y & 255 ^ 99, B[b] = y, C[y] = b;
|
|
3530
|
+
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3524
3531
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3525
|
-
var w = F * 16843009 ^
|
|
3526
|
-
s[
|
|
3532
|
+
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3533
|
+
s[y] = w << 24 | w >>> 8, u[y] = w << 16 | w >>> 16, p[y] = w << 8 | w >>> 24, l[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], g ^= o[o[g]]) : b = g = 1;
|
|
3527
3534
|
}
|
|
3528
3535
|
})();
|
|
3529
|
-
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i =
|
|
3536
|
+
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = _.AES = v.extend({
|
|
3530
3537
|
_doReset: function() {
|
|
3531
3538
|
var o;
|
|
3532
3539
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3533
|
-
for (var d = this._keyPriorReset = this._key, b = d.words, g = d.sigBytes / 4,
|
|
3534
|
-
F < g ?
|
|
3540
|
+
for (var d = this._keyPriorReset = this._key, b = d.words, g = d.sigBytes / 4, y = this._nRounds = g + 6, k = (y + 1) * 4, R = this._keySchedule = [], F = 0; F < k; F++)
|
|
3541
|
+
F < g ? R[F] = b[F] : (o = R[F - 1], F % g ? g > 6 && F % g == 4 && (o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255]) : (o = o << 8 | o >>> 24, o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255], o ^= D[F / g | 0] << 24), R[F] = R[F - g] ^ o);
|
|
3535
3542
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3536
3543
|
var F = k - H;
|
|
3537
3544
|
if (H % 4)
|
|
3538
|
-
var o =
|
|
3545
|
+
var o = R[F];
|
|
3539
3546
|
else
|
|
3540
|
-
var o =
|
|
3541
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ u[B[o >>> 16 & 255]] ^ p[B[o >>> 8 & 255]] ^
|
|
3547
|
+
var o = R[F - 4];
|
|
3548
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ u[B[o >>> 16 & 255]] ^ p[B[o >>> 8 & 255]] ^ l[B[o & 255]];
|
|
3542
3549
|
}
|
|
3543
3550
|
}
|
|
3544
3551
|
},
|
|
@@ -3547,17 +3554,17 @@ function mx() {
|
|
|
3547
3554
|
},
|
|
3548
3555
|
decryptBlock: function(o, d) {
|
|
3549
3556
|
var b = o[d + 1];
|
|
3550
|
-
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, u, p,
|
|
3557
|
+
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, u, p, l, C);
|
|
3551
3558
|
var b = o[d + 1];
|
|
3552
3559
|
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3553
3560
|
},
|
|
3554
|
-
_doCryptBlock: function(o, d, b, g,
|
|
3555
|
-
for (var w = this._nRounds, H = o[d] ^ b[0],
|
|
3556
|
-
var
|
|
3557
|
-
H =
|
|
3561
|
+
_doCryptBlock: function(o, d, b, g, y, k, R, F) {
|
|
3562
|
+
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++) {
|
|
3563
|
+
var M = g[H >>> 24] ^ y[$ >>> 16 & 255] ^ k[z >>> 8 & 255] ^ R[O & 255] ^ b[q++], N = g[$ >>> 24] ^ y[z >>> 16 & 255] ^ k[O >>> 8 & 255] ^ R[H & 255] ^ b[q++], j = g[z >>> 24] ^ y[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ R[$ & 255] ^ b[q++], S = g[O >>> 24] ^ y[H >>> 16 & 255] ^ k[$ >>> 8 & 255] ^ R[z & 255] ^ b[q++];
|
|
3564
|
+
H = M, $ = N, z = j, O = S;
|
|
3558
3565
|
}
|
|
3559
|
-
var
|
|
3560
|
-
o[d] =
|
|
3566
|
+
var M = (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++];
|
|
3567
|
+
o[d] = M, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3561
3568
|
},
|
|
3562
3569
|
keySize: 256 / 32
|
|
3563
3570
|
});
|
|
@@ -3566,14 +3573,14 @@ function mx() {
|
|
|
3566
3573
|
});
|
|
3567
3574
|
})(ar)), ar.exports;
|
|
3568
3575
|
}
|
|
3569
|
-
var or = { exports: {} },
|
|
3570
|
-
function
|
|
3571
|
-
return
|
|
3572
|
-
(function(t, e,
|
|
3573
|
-
r.exports = e(
|
|
3574
|
-
})(
|
|
3576
|
+
var or = { exports: {} }, wx = or.exports, Ce;
|
|
3577
|
+
function kx() {
|
|
3578
|
+
return Ce || (Ce = 1, (function(r, h) {
|
|
3579
|
+
(function(t, e, f) {
|
|
3580
|
+
r.exports = e(T(), c0(), f0(), o0(), X());
|
|
3581
|
+
})(wx, function(t) {
|
|
3575
3582
|
return (function() {
|
|
3576
|
-
var e = t,
|
|
3583
|
+
var e = t, f = e.lib, v = f.WordArray, _ = f.BlockCipher, B = e.algo, C = [
|
|
3577
3584
|
57,
|
|
3578
3585
|
49,
|
|
3579
3586
|
41,
|
|
@@ -4217,15 +4224,15 @@ function yx() {
|
|
|
4217
4224
|
8064,
|
|
4218
4225
|
504,
|
|
4219
4226
|
2147483679
|
|
4220
|
-
], s = B.DES =
|
|
4227
|
+
], s = B.DES = _.extend({
|
|
4221
4228
|
_doReset: function() {
|
|
4222
4229
|
for (var D = this._key, i = D.words, o = [], d = 0; d < 56; d++) {
|
|
4223
4230
|
var b = C[d] - 1;
|
|
4224
4231
|
o[d] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4225
4232
|
}
|
|
4226
|
-
for (var g = this._subKeys = [],
|
|
4227
|
-
for (var k = g[
|
|
4228
|
-
k[d / 6 | 0] |= o[(x[d] - 1 +
|
|
4233
|
+
for (var g = this._subKeys = [], y = 0; y < 16; y++) {
|
|
4234
|
+
for (var k = g[y] = [], R = n[y], d = 0; d < 24; d++)
|
|
4235
|
+
k[d / 6 | 0] |= o[(x[d] - 1 + R) % 28] << 31 - d % 6, k[4 + (d / 6 | 0)] |= o[28 + (x[d + 24] - 1 + R) % 28] << 31 - d % 6;
|
|
4229
4236
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4230
4237
|
for (var d = 1; d < 7; d++)
|
|
4231
4238
|
k[d] = k[d] >>> (d - 1) * 4 + 3;
|
|
@@ -4243,9 +4250,9 @@ function yx() {
|
|
|
4243
4250
|
_doCryptBlock: function(D, i, o) {
|
|
4244
4251
|
this._lBlock = D[i], this._rBlock = D[i + 1], u.call(this, 4, 252645135), u.call(this, 16, 65535), p.call(this, 2, 858993459), p.call(this, 8, 16711935), u.call(this, 1, 1431655765);
|
|
4245
4252
|
for (var d = 0; d < 16; d++) {
|
|
4246
|
-
for (var b = o[d], g = this._lBlock,
|
|
4247
|
-
k |= E[
|
|
4248
|
-
this._lBlock =
|
|
4253
|
+
for (var b = o[d], g = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4254
|
+
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4255
|
+
this._lBlock = y, this._rBlock = g ^ k;
|
|
4249
4256
|
}
|
|
4250
4257
|
var F = this._lBlock;
|
|
4251
4258
|
this._lBlock = this._rBlock, this._rBlock = F, u.call(this, 1, 1431655765), p.call(this, 8, 16711935), p.call(this, 2, 858993459), u.call(this, 16, 65535), u.call(this, 4, 252645135), D[i] = this._lBlock, D[i + 1] = this._rBlock;
|
|
@@ -4262,8 +4269,8 @@ function yx() {
|
|
|
4262
4269
|
var o = (this._rBlock >>> D ^ this._lBlock) & i;
|
|
4263
4270
|
this._lBlock ^= o, this._rBlock ^= o << D;
|
|
4264
4271
|
}
|
|
4265
|
-
e.DES =
|
|
4266
|
-
var
|
|
4272
|
+
e.DES = _._createHelper(s);
|
|
4273
|
+
var l = B.TripleDES = _.extend({
|
|
4267
4274
|
_doReset: function() {
|
|
4268
4275
|
var D = this._key, i = D.words;
|
|
4269
4276
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
@@ -4281,24 +4288,24 @@ function yx() {
|
|
|
4281
4288
|
ivSize: 64 / 32,
|
|
4282
4289
|
blockSize: 64 / 32
|
|
4283
4290
|
});
|
|
4284
|
-
e.TripleDES =
|
|
4291
|
+
e.TripleDES = _._createHelper(l);
|
|
4285
4292
|
})(), t.TripleDES;
|
|
4286
4293
|
});
|
|
4287
4294
|
})(or)), or.exports;
|
|
4288
4295
|
}
|
|
4289
|
-
var ir = { exports: {} },
|
|
4290
|
-
function
|
|
4291
|
-
return
|
|
4292
|
-
(function(t, e,
|
|
4293
|
-
r.exports = e(
|
|
4294
|
-
})(
|
|
4296
|
+
var ir = { exports: {} }, Sx = ir.exports, Ee;
|
|
4297
|
+
function Hx() {
|
|
4298
|
+
return Ee || (Ee = 1, (function(r, h) {
|
|
4299
|
+
(function(t, e, f) {
|
|
4300
|
+
r.exports = e(T(), c0(), f0(), o0(), X());
|
|
4301
|
+
})(Sx, function(t) {
|
|
4295
4302
|
return (function() {
|
|
4296
|
-
var e = t,
|
|
4303
|
+
var e = t, f = e.lib, v = f.StreamCipher, _ = e.algo, B = _.RC4 = v.extend({
|
|
4297
4304
|
_doReset: function() {
|
|
4298
4305
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], u = 0; u < 256; u++)
|
|
4299
4306
|
s[u] = u;
|
|
4300
4307
|
for (var u = 0, p = 0; u < 256; u++) {
|
|
4301
|
-
var
|
|
4308
|
+
var l = u % a, D = E[l >>> 2] >>> 24 - l % 4 * 8 & 255;
|
|
4302
4309
|
p = (p + s[u] + D) % 256;
|
|
4303
4310
|
var i = s[u];
|
|
4304
4311
|
s[u] = s[p], s[p] = i;
|
|
@@ -4320,7 +4327,7 @@ function kx() {
|
|
|
4320
4327
|
return this._i = E, this._j = a, s;
|
|
4321
4328
|
}
|
|
4322
4329
|
e.RC4 = v._createHelper(B);
|
|
4323
|
-
var x =
|
|
4330
|
+
var x = _.RC4Drop = B.extend({
|
|
4324
4331
|
/**
|
|
4325
4332
|
* Configuration options.
|
|
4326
4333
|
*
|
|
@@ -4340,14 +4347,14 @@ function kx() {
|
|
|
4340
4347
|
});
|
|
4341
4348
|
})(ir)), ir.exports;
|
|
4342
4349
|
}
|
|
4343
|
-
var sr = { exports: {} },
|
|
4344
|
-
function
|
|
4345
|
-
return
|
|
4346
|
-
(function(t, e,
|
|
4347
|
-
r.exports = e(
|
|
4348
|
-
})(
|
|
4350
|
+
var sr = { exports: {} }, $x = sr.exports, Ae;
|
|
4351
|
+
function Rx() {
|
|
4352
|
+
return Ae || (Ae = 1, (function(r, h) {
|
|
4353
|
+
(function(t, e, f) {
|
|
4354
|
+
r.exports = e(T(), c0(), f0(), o0(), X());
|
|
4355
|
+
})($x, function(t) {
|
|
4349
4356
|
return (function() {
|
|
4350
|
-
var e = t,
|
|
4357
|
+
var e = t, f = e.lib, v = f.StreamCipher, _ = e.algo, B = [], C = [], x = [], n = _.Rabbit = v.extend({
|
|
4351
4358
|
_doReset: function() {
|
|
4352
4359
|
for (var a = this._key.words, s = this.cfg.iv, u = 0; u < 4; u++)
|
|
4353
4360
|
a[u] = (a[u] << 8 | a[u] >>> 24) & 16711935 | (a[u] << 24 | a[u] >>> 8) & 4278255360;
|
|
@@ -4360,7 +4367,7 @@ function Hx() {
|
|
|
4360
4367
|
a[1] << 16 | a[0] >>> 16,
|
|
4361
4368
|
a[3],
|
|
4362
4369
|
a[2] << 16 | a[1] >>> 16
|
|
4363
|
-
],
|
|
4370
|
+
], l = this._C = [
|
|
4364
4371
|
a[2] << 16 | a[2] >>> 16,
|
|
4365
4372
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4366
4373
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4374,10 +4381,10 @@ function Hx() {
|
|
|
4374
4381
|
for (var u = 0; u < 4; u++)
|
|
4375
4382
|
E.call(this);
|
|
4376
4383
|
for (var u = 0; u < 8; u++)
|
|
4377
|
-
|
|
4384
|
+
l[u] ^= p[u + 4 & 7];
|
|
4378
4385
|
if (s) {
|
|
4379
|
-
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760,
|
|
4380
|
-
|
|
4386
|
+
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4387
|
+
l[0] ^= d, l[1] ^= g, l[2] ^= b, l[3] ^= y, l[4] ^= d, l[5] ^= g, l[6] ^= b, l[7] ^= y;
|
|
4381
4388
|
for (var u = 0; u < 4; u++)
|
|
4382
4389
|
E.call(this);
|
|
4383
4390
|
}
|
|
@@ -4396,7 +4403,7 @@ function Hx() {
|
|
|
4396
4403
|
C[u] = s[u];
|
|
4397
4404
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4398
4405
|
for (var u = 0; u < 8; u++) {
|
|
4399
|
-
var p = a[u] + s[u],
|
|
4406
|
+
var p = a[u] + s[u], l = p & 65535, D = p >>> 16, i = ((l * l >>> 17) + l * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4400
4407
|
x[u] = i ^ o;
|
|
4401
4408
|
}
|
|
4402
4409
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
@@ -4406,14 +4413,14 @@ function Hx() {
|
|
|
4406
4413
|
});
|
|
4407
4414
|
})(sr)), sr.exports;
|
|
4408
4415
|
}
|
|
4409
|
-
var cr = { exports: {} },
|
|
4410
|
-
function
|
|
4411
|
-
return
|
|
4412
|
-
(function(t, e,
|
|
4413
|
-
r.exports = e(
|
|
4414
|
-
})(
|
|
4416
|
+
var cr = { exports: {} }, Px = cr.exports, Fe;
|
|
4417
|
+
function zx() {
|
|
4418
|
+
return Fe || (Fe = 1, (function(r, h) {
|
|
4419
|
+
(function(t, e, f) {
|
|
4420
|
+
r.exports = e(T(), c0(), f0(), o0(), X());
|
|
4421
|
+
})(Px, function(t) {
|
|
4415
4422
|
return (function() {
|
|
4416
|
-
var e = t,
|
|
4423
|
+
var e = t, f = e.lib, v = f.StreamCipher, _ = e.algo, B = [], C = [], x = [], n = _.RabbitLegacy = v.extend({
|
|
4417
4424
|
_doReset: function() {
|
|
4418
4425
|
var a = this._key.words, s = this.cfg.iv, u = this._X = [
|
|
4419
4426
|
a[0],
|
|
@@ -4435,14 +4442,14 @@ function $x() {
|
|
|
4435
4442
|
a[3] & 4294901760 | a[0] & 65535
|
|
4436
4443
|
];
|
|
4437
4444
|
this._b = 0;
|
|
4438
|
-
for (var
|
|
4445
|
+
for (var l = 0; l < 4; l++)
|
|
4439
4446
|
E.call(this);
|
|
4440
|
-
for (var
|
|
4441
|
-
p[
|
|
4447
|
+
for (var l = 0; l < 8; l++)
|
|
4448
|
+
p[l] ^= u[l + 4 & 7];
|
|
4442
4449
|
if (s) {
|
|
4443
|
-
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760,
|
|
4444
|
-
p[0] ^= d, p[1] ^= g, p[2] ^= b, p[3] ^=
|
|
4445
|
-
for (var
|
|
4450
|
+
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760, y = b << 16 | d & 65535;
|
|
4451
|
+
p[0] ^= d, p[1] ^= g, p[2] ^= b, p[3] ^= y, p[4] ^= d, p[5] ^= g, p[6] ^= b, p[7] ^= y;
|
|
4452
|
+
for (var l = 0; l < 4; l++)
|
|
4446
4453
|
E.call(this);
|
|
4447
4454
|
}
|
|
4448
4455
|
},
|
|
@@ -4460,7 +4467,7 @@ function $x() {
|
|
|
4460
4467
|
C[u] = s[u];
|
|
4461
4468
|
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4462
4469
|
for (var u = 0; u < 8; u++) {
|
|
4463
|
-
var p = a[u] + s[u],
|
|
4470
|
+
var p = a[u] + s[u], l = p & 65535, D = p >>> 16, i = ((l * l >>> 17) + l * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4464
4471
|
x[u] = i ^ o;
|
|
4465
4472
|
}
|
|
4466
4473
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
@@ -4470,14 +4477,14 @@ function $x() {
|
|
|
4470
4477
|
});
|
|
4471
4478
|
})(cr)), cr.exports;
|
|
4472
4479
|
}
|
|
4473
|
-
var fr = { exports: {} },
|
|
4474
|
-
function
|
|
4475
|
-
return
|
|
4476
|
-
(function(t, e,
|
|
4477
|
-
r.exports = e(
|
|
4478
|
-
})(
|
|
4480
|
+
var fr = { exports: {} }, Wx = fr.exports, ge;
|
|
4481
|
+
function Ix() {
|
|
4482
|
+
return ge || (ge = 1, (function(r, h) {
|
|
4483
|
+
(function(t, e, f) {
|
|
4484
|
+
r.exports = e(T(), c0(), f0(), o0(), X());
|
|
4485
|
+
})(Wx, function(t) {
|
|
4479
4486
|
return (function() {
|
|
4480
|
-
var e = t,
|
|
4487
|
+
var e = t, f = e.lib, v = f.BlockCipher, _ = e.algo;
|
|
4481
4488
|
const B = 16, C = [
|
|
4482
4489
|
608135816,
|
|
4483
4490
|
2242054355,
|
|
@@ -5535,53 +5542,53 @@ function zx() {
|
|
|
5535
5542
|
pbox: [],
|
|
5536
5543
|
sbox: []
|
|
5537
5544
|
};
|
|
5538
|
-
function E(
|
|
5539
|
-
let i = D >> 24 & 255, o = D >> 16 & 255, d = D >> 8 & 255, b = D & 255, g =
|
|
5540
|
-
return g = g ^
|
|
5545
|
+
function E(l, D) {
|
|
5546
|
+
let i = D >> 24 & 255, o = D >> 16 & 255, d = D >> 8 & 255, b = D & 255, g = l.sbox[0][i] + l.sbox[1][o];
|
|
5547
|
+
return g = g ^ l.sbox[2][d], g = g + l.sbox[3][b], g;
|
|
5541
5548
|
}
|
|
5542
|
-
function a(
|
|
5549
|
+
function a(l, D, i) {
|
|
5543
5550
|
let o = D, d = i, b;
|
|
5544
5551
|
for (let g = 0; g < B; ++g)
|
|
5545
|
-
o = o ^
|
|
5546
|
-
return b = o, o = d, d = b, d = d ^
|
|
5552
|
+
o = o ^ l.pbox[g], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5553
|
+
return b = o, o = d, d = b, d = d ^ l.pbox[B], o = o ^ l.pbox[B + 1], { left: o, right: d };
|
|
5547
5554
|
}
|
|
5548
|
-
function s(
|
|
5555
|
+
function s(l, D, i) {
|
|
5549
5556
|
let o = D, d = i, b;
|
|
5550
5557
|
for (let g = B + 1; g > 1; --g)
|
|
5551
|
-
o = o ^
|
|
5552
|
-
return b = o, o = d, d = b, d = d ^
|
|
5558
|
+
o = o ^ l.pbox[g], d = E(l, o) ^ d, b = o, o = d, d = b;
|
|
5559
|
+
return b = o, o = d, d = b, d = d ^ l.pbox[1], o = o ^ l.pbox[0], { left: o, right: d };
|
|
5553
5560
|
}
|
|
5554
|
-
function u(
|
|
5555
|
-
for (let
|
|
5556
|
-
|
|
5561
|
+
function u(l, D, i) {
|
|
5562
|
+
for (let y = 0; y < 4; y++) {
|
|
5563
|
+
l.sbox[y] = [];
|
|
5557
5564
|
for (let k = 0; k < 256; k++)
|
|
5558
|
-
|
|
5565
|
+
l.sbox[y][k] = x[y][k];
|
|
5559
5566
|
}
|
|
5560
5567
|
let o = 0;
|
|
5561
|
-
for (let
|
|
5562
|
-
|
|
5568
|
+
for (let y = 0; y < B + 2; y++)
|
|
5569
|
+
l.pbox[y] = C[y] ^ D[o], o++, o >= i && (o = 0);
|
|
5563
5570
|
let d = 0, b = 0, g = 0;
|
|
5564
|
-
for (let
|
|
5565
|
-
g = a(
|
|
5566
|
-
for (let
|
|
5571
|
+
for (let y = 0; y < B + 2; y += 2)
|
|
5572
|
+
g = a(l, d, b), d = g.left, b = g.right, l.pbox[y] = d, l.pbox[y + 1] = b;
|
|
5573
|
+
for (let y = 0; y < 4; y++)
|
|
5567
5574
|
for (let k = 0; k < 256; k += 2)
|
|
5568
|
-
g = a(
|
|
5575
|
+
g = a(l, d, b), d = g.left, b = g.right, l.sbox[y][k] = d, l.sbox[y][k + 1] = b;
|
|
5569
5576
|
return !0;
|
|
5570
5577
|
}
|
|
5571
|
-
var p =
|
|
5578
|
+
var p = _.Blowfish = v.extend({
|
|
5572
5579
|
_doReset: function() {
|
|
5573
5580
|
if (this._keyPriorReset !== this._key) {
|
|
5574
|
-
var
|
|
5581
|
+
var l = this._keyPriorReset = this._key, D = l.words, i = l.sigBytes / 4;
|
|
5575
5582
|
u(n, D, i);
|
|
5576
5583
|
}
|
|
5577
5584
|
},
|
|
5578
|
-
encryptBlock: function(
|
|
5579
|
-
var i = a(n,
|
|
5580
|
-
|
|
5585
|
+
encryptBlock: function(l, D) {
|
|
5586
|
+
var i = a(n, l[D], l[D + 1]);
|
|
5587
|
+
l[D] = i.left, l[D + 1] = i.right;
|
|
5581
5588
|
},
|
|
5582
|
-
decryptBlock: function(
|
|
5583
|
-
var i = s(n,
|
|
5584
|
-
|
|
5589
|
+
decryptBlock: function(l, D) {
|
|
5590
|
+
var i = s(n, l[D], l[D + 1]);
|
|
5591
|
+
l[D] = i.left, l[D + 1] = i.right;
|
|
5585
5592
|
},
|
|
5586
5593
|
blockSize: 64 / 32,
|
|
5587
5594
|
keySize: 128 / 32,
|
|
@@ -5592,106 +5599,106 @@ function zx() {
|
|
|
5592
5599
|
});
|
|
5593
5600
|
})(fr)), fr.exports;
|
|
5594
5601
|
}
|
|
5595
|
-
var
|
|
5596
|
-
function
|
|
5597
|
-
return
|
|
5598
|
-
(function(t, e,
|
|
5599
|
-
r.exports = e(
|
|
5600
|
-
})(
|
|
5602
|
+
var Lx = k0.exports, De;
|
|
5603
|
+
function Ox() {
|
|
5604
|
+
return De || (De = 1, (function(r, h) {
|
|
5605
|
+
(function(t, e, f) {
|
|
5606
|
+
r.exports = e(T(), hr(), zt(), It(), c0(), qt(), f0(), Re(), br(), jt(), Pe(), Xt(), Zt(), Vt(), mr(), ex(), o0(), X(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex(), Fx(), Dx(), mx(), yx(), kx(), Hx(), Rx(), zx(), Ix());
|
|
5607
|
+
})(Lx, function(t) {
|
|
5601
5608
|
return t;
|
|
5602
5609
|
});
|
|
5603
5610
|
})(k0)), k0.exports;
|
|
5604
5611
|
}
|
|
5605
|
-
|
|
5606
|
-
let
|
|
5612
|
+
Ox();
|
|
5613
|
+
let ze = null, We = null, Ie = null, Le = null;
|
|
5607
5614
|
Math.random().toString(36).substring(7);
|
|
5608
|
-
function
|
|
5609
|
-
|
|
5615
|
+
function qx(r) {
|
|
5616
|
+
ze = r.token, We = r.apiUrl, Ie = r.deviceId, Le = r.domain;
|
|
5610
5617
|
}
|
|
5611
|
-
function
|
|
5618
|
+
function Mx() {
|
|
5612
5619
|
return {
|
|
5613
|
-
token:
|
|
5614
|
-
apiUrl:
|
|
5615
|
-
deviceId:
|
|
5616
|
-
domain:
|
|
5620
|
+
token: ze,
|
|
5621
|
+
apiUrl: We,
|
|
5622
|
+
deviceId: Ie,
|
|
5623
|
+
domain: Le
|
|
5617
5624
|
};
|
|
5618
5625
|
}
|
|
5619
|
-
function
|
|
5620
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5626
|
+
function Tx(r) {
|
|
5627
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.168`;
|
|
5621
5628
|
}
|
|
5622
|
-
function
|
|
5623
|
-
const t =
|
|
5624
|
-
return new Worker(t, { type: "module", ...
|
|
5629
|
+
function Nx(r, h) {
|
|
5630
|
+
const t = Tx(r);
|
|
5631
|
+
return new Worker(t, { type: "module", ...h });
|
|
5625
5632
|
}
|
|
5626
|
-
const
|
|
5633
|
+
const _r = () => {
|
|
5627
5634
|
try {
|
|
5628
5635
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5629
5636
|
} catch {
|
|
5630
5637
|
}
|
|
5631
5638
|
return !1;
|
|
5632
5639
|
}, _0 = (...r) => {
|
|
5633
|
-
|
|
5634
|
-
},
|
|
5635
|
-
|
|
5636
|
-
},
|
|
5637
|
-
let
|
|
5638
|
-
function
|
|
5639
|
-
const
|
|
5640
|
-
if (
|
|
5641
|
-
const t =
|
|
5640
|
+
_r();
|
|
5641
|
+
}, be = (...r) => {
|
|
5642
|
+
_r();
|
|
5643
|
+
}, me = /* @__PURE__ */ new Map(), Fr = /* @__PURE__ */ new Map();
|
|
5644
|
+
let Ux = 0;
|
|
5645
|
+
function jx(r) {
|
|
5646
|
+
const h = me.get(r);
|
|
5647
|
+
if (h) return h;
|
|
5648
|
+
const t = Nx("./deform.worker.ts");
|
|
5642
5649
|
try {
|
|
5643
|
-
t.postMessage({ type: "SET_DEBUG", debugRender:
|
|
5650
|
+
t.postMessage({ type: "SET_DEBUG", debugRender: _r() });
|
|
5644
5651
|
} catch {
|
|
5645
5652
|
}
|
|
5646
|
-
t.onmessage = (
|
|
5647
|
-
const { id: v, imageBitmap:
|
|
5653
|
+
t.onmessage = (f) => {
|
|
5654
|
+
const { id: v, imageBitmap: _, error: B, duration: C } = f.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5648
5655
|
_0(`[renderService] deform worker 响应 id=${v}${x}`, {
|
|
5649
|
-
hasImageBitmap: !!
|
|
5650
|
-
width:
|
|
5651
|
-
height:
|
|
5656
|
+
hasImageBitmap: !!_,
|
|
5657
|
+
width: _?.width,
|
|
5658
|
+
height: _?.height,
|
|
5652
5659
|
error: B
|
|
5653
5660
|
});
|
|
5654
|
-
const n =
|
|
5661
|
+
const n = Fr.get(v);
|
|
5655
5662
|
if (n) {
|
|
5656
|
-
if (
|
|
5663
|
+
if (Fr.delete(v), B) {
|
|
5657
5664
|
n.reject(new Error(B));
|
|
5658
5665
|
return;
|
|
5659
5666
|
}
|
|
5660
|
-
n.resolve(
|
|
5667
|
+
n.resolve(_);
|
|
5661
5668
|
}
|
|
5662
|
-
}, t.onerror = (
|
|
5669
|
+
}, t.onerror = (f) => {
|
|
5663
5670
|
};
|
|
5664
5671
|
const e = () => {
|
|
5665
|
-
const
|
|
5672
|
+
const f = Mx();
|
|
5666
5673
|
return _0("🔍 [workerManager] 检查 License Token:", {
|
|
5667
|
-
hasToken: !!
|
|
5668
|
-
tokenPreview:
|
|
5674
|
+
hasToken: !!f.token,
|
|
5675
|
+
tokenPreview: f.token ? f.token.substring(0, 20) + "..." : "undefined",
|
|
5669
5676
|
faceId: r,
|
|
5670
5677
|
source: "licenseStore模块"
|
|
5671
|
-
}),
|
|
5678
|
+
}), f.token ? (_0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5672
5679
|
type: "SET_LICENSE",
|
|
5673
|
-
licenseToken:
|
|
5674
|
-
licenseApiUrl:
|
|
5675
|
-
deviceId:
|
|
5676
|
-
domain:
|
|
5680
|
+
licenseToken: f.token,
|
|
5681
|
+
licenseApiUrl: f.apiUrl,
|
|
5682
|
+
deviceId: f.deviceId,
|
|
5683
|
+
domain: f.domain
|
|
5677
5684
|
}), !0) : !1;
|
|
5678
5685
|
};
|
|
5679
5686
|
return e() || (_0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5680
|
-
e() ||
|
|
5687
|
+
e() || be("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5681
5688
|
}, 200), setTimeout(() => {
|
|
5682
|
-
e() ||
|
|
5683
|
-
}, 500)),
|
|
5689
|
+
e() || be("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
5690
|
+
}, 500)), me.set(r, t), t;
|
|
5684
5691
|
}
|
|
5685
|
-
function
|
|
5692
|
+
function Gx(r) {
|
|
5686
5693
|
return {
|
|
5687
5694
|
name: r.name,
|
|
5688
5695
|
type: r.type,
|
|
5689
5696
|
blendMode: r.blendMode,
|
|
5690
5697
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5691
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5692
|
-
x:
|
|
5693
|
-
y:
|
|
5694
|
-
type:
|
|
5698
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((h) => ({
|
|
5699
|
+
x: h.x,
|
|
5700
|
+
y: h.y,
|
|
5701
|
+
type: h.type
|
|
5695
5702
|
})) : [],
|
|
5696
5703
|
bounds: r.bounds ? {
|
|
5697
5704
|
width: r.bounds.width,
|
|
@@ -5714,30 +5721,30 @@ function Ux(r) {
|
|
|
5714
5721
|
layerOrder: r.layerOrder,
|
|
5715
5722
|
imagePath: r.imagePath,
|
|
5716
5723
|
vectorMask: r.vectorMask ? {
|
|
5717
|
-
paths: r.vectorMask.paths?.map((
|
|
5718
|
-
open:
|
|
5719
|
-
knots:
|
|
5724
|
+
paths: r.vectorMask.paths?.map((h) => ({
|
|
5725
|
+
open: h.open,
|
|
5726
|
+
knots: h.knots?.map((t) => ({
|
|
5720
5727
|
linked: t.linked,
|
|
5721
5728
|
points: [...t.points]
|
|
5722
5729
|
})),
|
|
5723
|
-
fillRule:
|
|
5724
|
-
operation:
|
|
5730
|
+
fillRule: h.fillRule,
|
|
5731
|
+
operation: h.operation
|
|
5725
5732
|
})),
|
|
5726
|
-
points: r.vectorMask.points?.map((
|
|
5727
|
-
x:
|
|
5728
|
-
y:
|
|
5729
|
-
type:
|
|
5733
|
+
points: r.vectorMask.points?.map((h) => ({
|
|
5734
|
+
x: h.x,
|
|
5735
|
+
y: h.y,
|
|
5736
|
+
type: h.type
|
|
5730
5737
|
})),
|
|
5731
5738
|
invert: r.vectorMask.invert,
|
|
5732
5739
|
notLink: r.vectorMask.notLink,
|
|
5733
5740
|
disable: r.vectorMask.disable,
|
|
5734
5741
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5735
5742
|
} : void 0,
|
|
5736
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5737
|
-
type:
|
|
5738
|
-
enabled:
|
|
5739
|
-
filter:
|
|
5740
|
-
puppetShapeList:
|
|
5743
|
+
filterList: r.filterList ? r.filterList.map((h) => ({
|
|
5744
|
+
type: h.type,
|
|
5745
|
+
enabled: h.enabled,
|
|
5746
|
+
filter: h.filter ? {
|
|
5747
|
+
puppetShapeList: h.filter.puppetShapeList?.map((t) => ({
|
|
5741
5748
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5742
5749
|
x: e.x,
|
|
5743
5750
|
y: e.y
|
|
@@ -5754,59 +5761,59 @@ function Ux(r) {
|
|
|
5754
5761
|
clipping: r.clipping
|
|
5755
5762
|
};
|
|
5756
5763
|
}
|
|
5757
|
-
function
|
|
5758
|
-
const
|
|
5759
|
-
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((
|
|
5760
|
-
|
|
5764
|
+
function Kx(r, h, t, e) {
|
|
5765
|
+
const f = ++Ux, v = jx(t);
|
|
5766
|
+
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((_, B) => {
|
|
5767
|
+
Fr.set(f, {
|
|
5761
5768
|
resolve: (x) => {
|
|
5762
|
-
performance.now(), (/* @__PURE__ */ new Date()).toISOString(),
|
|
5769
|
+
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), _(x);
|
|
5763
5770
|
},
|
|
5764
5771
|
reject: B
|
|
5765
5772
|
});
|
|
5766
|
-
const C =
|
|
5767
|
-
v.postMessage({ id:
|
|
5773
|
+
const C = Gx(h);
|
|
5774
|
+
v.postMessage({ id: f, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5768
5775
|
r
|
|
5769
5776
|
]);
|
|
5770
5777
|
});
|
|
5771
5778
|
}
|
|
5772
|
-
async function
|
|
5773
|
-
const
|
|
5774
|
-
if (!
|
|
5779
|
+
async function Xx(r, h, t = 0, e, f, v) {
|
|
5780
|
+
const _ = await mt(r, f, v);
|
|
5781
|
+
if (!_ || _.width === 0 || _.height === 0)
|
|
5775
5782
|
throw new Error("图片无效:尺寸为 0");
|
|
5776
|
-
return await
|
|
5783
|
+
return await Kx(_, h, t, e);
|
|
5777
5784
|
}
|
|
5778
|
-
function h0(r,
|
|
5785
|
+
function h0(r, h) {
|
|
5779
5786
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5780
|
-
return new OffscreenCanvas(r,
|
|
5787
|
+
return new OffscreenCanvas(r, h);
|
|
5781
5788
|
if (typeof document < "u") {
|
|
5782
5789
|
const t = document.createElement("canvas");
|
|
5783
|
-
return t.width = r, t.height =
|
|
5790
|
+
return t.width = r, t.height = h, t;
|
|
5784
5791
|
} else
|
|
5785
5792
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5786
5793
|
}
|
|
5787
5794
|
function g0(r) {
|
|
5788
5795
|
return r.getContext("2d");
|
|
5789
5796
|
}
|
|
5790
|
-
function
|
|
5791
|
-
const
|
|
5792
|
-
if (!
|
|
5797
|
+
function _e(r) {
|
|
5798
|
+
const h = g0(r);
|
|
5799
|
+
if (!h)
|
|
5793
5800
|
throw new Error("无法创建 canvas context");
|
|
5794
|
-
return
|
|
5801
|
+
return h;
|
|
5795
5802
|
}
|
|
5796
|
-
async function
|
|
5797
|
-
const
|
|
5803
|
+
async function Yx(r) {
|
|
5804
|
+
const h = performance.now(), t = () => {
|
|
5798
5805
|
try {
|
|
5799
5806
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5800
5807
|
} catch {
|
|
5801
5808
|
}
|
|
5802
5809
|
return !1;
|
|
5803
|
-
}, e = (...
|
|
5810
|
+
}, e = (...c) => {
|
|
5804
5811
|
t();
|
|
5805
|
-
},
|
|
5812
|
+
}, f = (...c) => {
|
|
5806
5813
|
t();
|
|
5807
5814
|
}, {
|
|
5808
5815
|
psdJson: v,
|
|
5809
|
-
materialList:
|
|
5816
|
+
materialList: _,
|
|
5810
5817
|
fabricScreenshotList: B,
|
|
5811
5818
|
width: C,
|
|
5812
5819
|
height: x,
|
|
@@ -5814,13 +5821,13 @@ async function Kx(r) {
|
|
|
5814
5821
|
} = r, E = r.maxImageSize;
|
|
5815
5822
|
e("[renderByJson] 接收到的数据:", {
|
|
5816
5823
|
psdJsonLayerCount: v.layerList?.length || 0,
|
|
5817
|
-
psdJsonLayers: v.layerList?.map((
|
|
5818
|
-
name:
|
|
5819
|
-
type:
|
|
5820
|
-
id:
|
|
5821
|
-
hasChildren: !!
|
|
5822
|
-
childrenCount:
|
|
5823
|
-
children:
|
|
5824
|
+
psdJsonLayers: v.layerList?.map((c) => ({
|
|
5825
|
+
name: c.name,
|
|
5826
|
+
type: c.type,
|
|
5827
|
+
id: c.id,
|
|
5828
|
+
hasChildren: !!c.children,
|
|
5829
|
+
childrenCount: c.children?.length || 0,
|
|
5830
|
+
children: c.children?.map((A) => ({
|
|
5824
5831
|
name: A.name,
|
|
5825
5832
|
type: A.type,
|
|
5826
5833
|
isSmartObject: A.isSmartObject,
|
|
@@ -5828,104 +5835,104 @@ async function Kx(r) {
|
|
|
5828
5835
|
}))
|
|
5829
5836
|
})),
|
|
5830
5837
|
fabricScreenshotListCount: B.length,
|
|
5831
|
-
fabricScreenshotList: B.map((
|
|
5838
|
+
fabricScreenshotList: B.map((c) => ({ id: c.id, url: c.url.substring(0, 50) + "..." }))
|
|
5832
5839
|
});
|
|
5833
|
-
const a = (
|
|
5834
|
-
if (!
|
|
5835
|
-
if (/^(https?:)?\/\//i.test(
|
|
5836
|
-
return
|
|
5840
|
+
const a = (c) => {
|
|
5841
|
+
if (!c || typeof c != "string" || !c.includes("http")) return;
|
|
5842
|
+
if (/^(https?:)?\/\//i.test(c) || c.startsWith("data:") || c.startsWith("blob:"))
|
|
5843
|
+
return c;
|
|
5837
5844
|
if (!n)
|
|
5838
|
-
return !
|
|
5845
|
+
return !c.includes("http") && !c.startsWith("data:") && !c.startsWith("blob:") ? void 0 : c;
|
|
5839
5846
|
try {
|
|
5840
|
-
const m = new URL(
|
|
5847
|
+
const m = new URL(c, n).toString();
|
|
5841
5848
|
return !m.includes("http") && !m.startsWith("data:") && !m.startsWith("blob:") ? void 0 : m;
|
|
5842
5849
|
} catch (m) {
|
|
5843
|
-
|
|
5850
|
+
f(`[renderByJson] 解析图片 URL 失败: ${c}`, m);
|
|
5844
5851
|
return;
|
|
5845
5852
|
}
|
|
5846
5853
|
}, s = {}, u = /* @__PURE__ */ new Map();
|
|
5847
|
-
for (const
|
|
5848
|
-
const A =
|
|
5854
|
+
for (const c of _) {
|
|
5855
|
+
const A = c.sourceName || c.layerName;
|
|
5849
5856
|
A && (s[A] = {
|
|
5850
|
-
url:
|
|
5851
|
-
}, u.set(A,
|
|
5852
|
-
url:
|
|
5853
|
-
}), u.set(
|
|
5857
|
+
url: c.url
|
|
5858
|
+
}, u.set(A, c.url)), c.layerName && c.layerName !== A && (s[c.layerName] || (s[c.layerName] = {
|
|
5859
|
+
url: c.url
|
|
5860
|
+
}), u.set(c.layerName, c.url));
|
|
5854
5861
|
}
|
|
5855
5862
|
const p = /* @__PURE__ */ new Map();
|
|
5856
|
-
for (const
|
|
5857
|
-
p.set(
|
|
5858
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", v.layerList?.map((
|
|
5859
|
-
name:
|
|
5860
|
-
type:
|
|
5861
|
-
id:
|
|
5862
|
-
hasChildren: !!
|
|
5863
|
-
childrenCount:
|
|
5863
|
+
for (const c of B)
|
|
5864
|
+
p.set(c.id, c.url);
|
|
5865
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", v.layerList?.map((c) => ({
|
|
5866
|
+
name: c.name,
|
|
5867
|
+
type: c.type,
|
|
5868
|
+
id: c.id,
|
|
5869
|
+
hasChildren: !!c.children,
|
|
5870
|
+
childrenCount: c.children?.length || 0
|
|
5864
5871
|
})));
|
|
5865
|
-
function
|
|
5866
|
-
const m =
|
|
5867
|
-
if (
|
|
5868
|
-
if (
|
|
5869
|
-
const W =
|
|
5872
|
+
function l(c, A) {
|
|
5873
|
+
const m = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5874
|
+
if (c.type === "Layer") {
|
|
5875
|
+
if (c.imagePath) {
|
|
5876
|
+
const W = _.find((P) => {
|
|
5870
5877
|
const L = P.sourceName || P.layerName;
|
|
5871
|
-
return !L || !
|
|
5878
|
+
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5872
5879
|
});
|
|
5873
|
-
W && (s[
|
|
5880
|
+
W && (s[c.imagePath] = {
|
|
5874
5881
|
url: W.url
|
|
5875
5882
|
});
|
|
5876
5883
|
}
|
|
5877
|
-
if (
|
|
5884
|
+
if (c.name) {
|
|
5878
5885
|
if (m) {
|
|
5879
|
-
const W = `${m}-${
|
|
5886
|
+
const W = `${m}-${c.name}`, P = _.find((L) => {
|
|
5880
5887
|
const I = L.sourceName || L.layerName;
|
|
5881
|
-
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${m}-${
|
|
5888
|
+
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${m}-${c.name}`) : !1;
|
|
5882
5889
|
});
|
|
5883
5890
|
P && (s[W] = {
|
|
5884
5891
|
url: P.url
|
|
5885
5892
|
});
|
|
5886
5893
|
}
|
|
5887
|
-
if (
|
|
5888
|
-
const W =
|
|
5894
|
+
if (c.imagePath && c.name) {
|
|
5895
|
+
const W = c.imagePath.split("/").pop() || c.imagePath, P = _.find((L) => {
|
|
5889
5896
|
const I = L.sourceName || L.layerName;
|
|
5890
5897
|
return I ? (I.split("/").pop() || I) === W : !1;
|
|
5891
5898
|
});
|
|
5892
|
-
P && (s[
|
|
5899
|
+
P && (s[c.imagePath] = {
|
|
5893
5900
|
url: P.url
|
|
5894
5901
|
});
|
|
5895
5902
|
}
|
|
5896
5903
|
}
|
|
5897
5904
|
}
|
|
5898
|
-
if (
|
|
5899
|
-
for (const W of
|
|
5900
|
-
W &&
|
|
5905
|
+
if (c.children)
|
|
5906
|
+
for (const W of c.children)
|
|
5907
|
+
W && l(W, m);
|
|
5901
5908
|
}
|
|
5902
|
-
function D(
|
|
5903
|
-
const m =
|
|
5904
|
-
if (
|
|
5905
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${
|
|
5909
|
+
function D(c, A) {
|
|
5910
|
+
const m = c.id ?? A;
|
|
5911
|
+
if (c.type === "Group" && m)
|
|
5912
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${m}, hasFabricScreenshot=${p.has(m)}`), p.has(m)) {
|
|
5906
5913
|
const W = p.get(m);
|
|
5907
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${m}, name="${
|
|
5908
|
-
e(`[renderByJson] Group "${
|
|
5909
|
-
for (const P of
|
|
5914
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${m}, name="${c.name}", url=${W.substring(0, 50)}...`), c.children) {
|
|
5915
|
+
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5916
|
+
for (const P of c.children)
|
|
5910
5917
|
if (P && P.isSmartObject === !0) {
|
|
5911
5918
|
const L = P?.name || "";
|
|
5912
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) :
|
|
5919
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) : f("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5913
5920
|
}
|
|
5914
5921
|
} else
|
|
5915
|
-
|
|
5922
|
+
f(`[renderByJson] ⚠️ Group id=${m} 没有 children`);
|
|
5916
5923
|
} else
|
|
5917
|
-
e(`[renderByJson] ⚠️ Group id=${m}, name="${
|
|
5918
|
-
if (
|
|
5919
|
-
for (const W of
|
|
5924
|
+
e(`[renderByJson] ⚠️ Group id=${m}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5925
|
+
if (c.children)
|
|
5926
|
+
for (const W of c.children)
|
|
5920
5927
|
W && D(W, m);
|
|
5921
5928
|
}
|
|
5922
5929
|
if (v.layerList)
|
|
5923
|
-
for (const
|
|
5924
|
-
|
|
5930
|
+
for (const c of v.layerList)
|
|
5931
|
+
c && l(c);
|
|
5925
5932
|
if (v.layerList)
|
|
5926
|
-
for (const
|
|
5927
|
-
|
|
5928
|
-
const o =
|
|
5933
|
+
for (const c of v.layerList)
|
|
5934
|
+
c && D(c);
|
|
5935
|
+
const o = xt([{
|
|
5929
5936
|
psdJson: v,
|
|
5930
5937
|
layerExtrasByName: s
|
|
5931
5938
|
}], {
|
|
@@ -5937,16 +5944,16 @@ async function Kx(r) {
|
|
|
5937
5944
|
const d = o.models[0];
|
|
5938
5945
|
if (!d.psdPartData)
|
|
5939
5946
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5940
|
-
const b = d.width, g = d.height,
|
|
5941
|
-
if (
|
|
5942
|
-
return s[
|
|
5943
|
-
if (
|
|
5944
|
-
const A =
|
|
5947
|
+
const b = d.width, g = d.height, y = h0(b, g), k = _e(y), R = [], F = (c) => {
|
|
5948
|
+
if (c.url && s[c.url])
|
|
5949
|
+
return s[c.url];
|
|
5950
|
+
if (c.url) {
|
|
5951
|
+
const A = c.url.split("/").pop() || c.url;
|
|
5945
5952
|
if (s[A])
|
|
5946
5953
|
return s[A];
|
|
5947
|
-
const m =
|
|
5954
|
+
const m = _.find((W) => {
|
|
5948
5955
|
const P = W.sourceName || W.layerName;
|
|
5949
|
-
return !P || !
|
|
5956
|
+
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5950
5957
|
});
|
|
5951
5958
|
if (m) {
|
|
5952
5959
|
const W = m.sourceName || m.layerName;
|
|
@@ -5955,23 +5962,23 @@ async function Kx(r) {
|
|
|
5955
5962
|
}
|
|
5956
5963
|
}
|
|
5957
5964
|
};
|
|
5958
|
-
for (let
|
|
5959
|
-
const A = d.psdPartData[
|
|
5965
|
+
for (let c = 0; c < d.psdPartData.length; c++) {
|
|
5966
|
+
const A = d.psdPartData[c], m = F(A);
|
|
5960
5967
|
if (A.type === D0.Layer) {
|
|
5961
5968
|
if (!m || !m.url) {
|
|
5962
|
-
|
|
5969
|
+
f(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5963
5970
|
continue;
|
|
5964
5971
|
}
|
|
5965
5972
|
const W = m.url, P = a(W);
|
|
5966
5973
|
if (!P) {
|
|
5967
|
-
|
|
5974
|
+
f(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5968
5975
|
continue;
|
|
5969
5976
|
}
|
|
5970
|
-
|
|
5971
|
-
index:
|
|
5977
|
+
R.push({
|
|
5978
|
+
index: c,
|
|
5972
5979
|
type: "layer",
|
|
5973
5980
|
partData: A,
|
|
5974
|
-
promise:
|
|
5981
|
+
promise: _t(P, E, n).catch((L) => null)
|
|
5975
5982
|
});
|
|
5976
5983
|
} else if (A.type === D0.Group) {
|
|
5977
5984
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
@@ -5984,9 +5991,9 @@ async function Kx(r) {
|
|
|
5984
5991
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5985
5992
|
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5986
5993
|
if (L = s[K], !L) {
|
|
5987
|
-
const G =
|
|
5988
|
-
const
|
|
5989
|
-
return !
|
|
5994
|
+
const G = _.find((Y) => {
|
|
5995
|
+
const e0 = Y.sourceName || Y.layerName;
|
|
5996
|
+
return !e0 || !P.imagePath ? !1 : (e0.split("/").pop() || e0) === K || e0 === P.imagePath || e0.endsWith(P.imagePath) || P.imagePath.endsWith(e0);
|
|
5990
5997
|
});
|
|
5991
5998
|
G && (L = { url: G.url });
|
|
5992
5999
|
}
|
|
@@ -6003,17 +6010,17 @@ async function Kx(r) {
|
|
|
6003
6010
|
continue;
|
|
6004
6011
|
I = G;
|
|
6005
6012
|
}
|
|
6006
|
-
const
|
|
6007
|
-
|
|
6008
|
-
index:
|
|
6013
|
+
const Z = (A.partId ?? A.id) * 100 + W, Q = at(nt(P)), i0 = { width: b, height: g };
|
|
6014
|
+
R.push({
|
|
6015
|
+
index: c + W * 0.01,
|
|
6009
6016
|
type: "group",
|
|
6010
6017
|
partData: A,
|
|
6011
6018
|
smartObject: P,
|
|
6012
6019
|
maskData: Q,
|
|
6013
|
-
promise:
|
|
6020
|
+
promise: Xx(
|
|
6014
6021
|
I,
|
|
6015
6022
|
P,
|
|
6016
|
-
|
|
6023
|
+
Z,
|
|
6017
6024
|
i0,
|
|
6018
6025
|
E,
|
|
6019
6026
|
n
|
|
@@ -6022,18 +6029,18 @@ async function Kx(r) {
|
|
|
6022
6029
|
}
|
|
6023
6030
|
}
|
|
6024
6031
|
}
|
|
6025
|
-
const w = await Promise.all(
|
|
6026
|
-
task:
|
|
6032
|
+
const w = await Promise.all(R.map((c) => c.promise)), H = R.map((c, A) => ({
|
|
6033
|
+
task: c,
|
|
6027
6034
|
imageBitmap: w[A]
|
|
6028
|
-
})).sort((
|
|
6029
|
-
const m =
|
|
6035
|
+
})).sort((c, A) => {
|
|
6036
|
+
const m = 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;
|
|
6030
6037
|
return m - W;
|
|
6031
6038
|
});
|
|
6032
|
-
let
|
|
6033
|
-
for (let
|
|
6034
|
-
const { task: A, imageBitmap: m } = H[
|
|
6039
|
+
let $ = h0(b, g), z = g0($), O = !1, q = "normal";
|
|
6040
|
+
for (let c = 0; c < H.length; c++) {
|
|
6041
|
+
const { task: A, imageBitmap: m } = H[c];
|
|
6035
6042
|
if (!m) {
|
|
6036
|
-
|
|
6043
|
+
f(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
6037
6044
|
continue;
|
|
6038
6045
|
}
|
|
6039
6046
|
const { partData: W } = A, P = W.bounds;
|
|
@@ -6041,11 +6048,11 @@ async function Kx(r) {
|
|
|
6041
6048
|
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
6042
6049
|
let I;
|
|
6043
6050
|
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? W.clipping === !0 : I = W.clipping === !0;
|
|
6044
|
-
const
|
|
6051
|
+
const Z = H[c + 1];
|
|
6045
6052
|
let Q = !1;
|
|
6046
|
-
if (
|
|
6047
|
-
const K =
|
|
6048
|
-
|
|
6053
|
+
if (Z) {
|
|
6054
|
+
const K = Z.task.partData;
|
|
6055
|
+
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
6049
6056
|
}
|
|
6050
6057
|
const i0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
6051
6058
|
if (e(`[renderByJson] 绘制图层 "${i0}"`, {
|
|
@@ -6061,7 +6068,7 @@ async function Kx(r) {
|
|
|
6061
6068
|
if (z.clearRect(0, 0, b, g), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6062
6069
|
if (A.maskData) {
|
|
6063
6070
|
const K = h0(b, g), G = g0(K);
|
|
6064
|
-
G && (G.drawImage(m, 0, 0),
|
|
6071
|
+
G && (G.drawImage(m, 0, 0), pr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6065
6072
|
} else
|
|
6066
6073
|
z.drawImage(m, 0, 0);
|
|
6067
6074
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6078,7 +6085,7 @@ async function Kx(r) {
|
|
|
6078
6085
|
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6079
6086
|
if (A.maskData) {
|
|
6080
6087
|
const K = h0(b, g), G = g0(K);
|
|
6081
|
-
G && (G.drawImage(m, 0, 0),
|
|
6088
|
+
G && (G.drawImage(m, 0, 0), pr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6082
6089
|
} else
|
|
6083
6090
|
z.drawImage(m, 0, 0);
|
|
6084
6091
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6094,7 +6101,7 @@ async function Kx(r) {
|
|
|
6094
6101
|
if (k.globalCompositeOperation = Mr(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6095
6102
|
if (A.maskData) {
|
|
6096
6103
|
const K = h0(b, g), G = g0(K);
|
|
6097
|
-
G && (G.drawImage(m, 0, 0),
|
|
6104
|
+
G && (G.drawImage(m, 0, 0), pr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6098
6105
|
} else
|
|
6099
6106
|
k.drawImage(m, 0, 0);
|
|
6100
6107
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6106,68 +6113,68 @@ async function Kx(r) {
|
|
|
6106
6113
|
) : k.drawImage(m, 0, 0));
|
|
6107
6114
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6108
6115
|
}
|
|
6109
|
-
O && !Q && (k.globalCompositeOperation = Mr(q), k.drawImage(
|
|
6116
|
+
O && !Q && (k.globalCompositeOperation = Mr(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6110
6117
|
}
|
|
6111
|
-
|
|
6112
|
-
let U =
|
|
6118
|
+
$ = null, z = null;
|
|
6119
|
+
let U = y, M = b, N = g;
|
|
6113
6120
|
if (C !== void 0 || x !== void 0) {
|
|
6114
6121
|
if (C !== void 0 && x !== void 0)
|
|
6115
|
-
|
|
6122
|
+
M = C, N = x;
|
|
6116
6123
|
else if (C !== void 0) {
|
|
6117
6124
|
const A = C / b;
|
|
6118
|
-
|
|
6125
|
+
M = C, N = Math.round(g * A);
|
|
6119
6126
|
} else if (x !== void 0) {
|
|
6120
6127
|
const A = x / g;
|
|
6121
|
-
|
|
6128
|
+
M = Math.round(b * A), N = x;
|
|
6122
6129
|
}
|
|
6123
|
-
U = h0(
|
|
6124
|
-
const
|
|
6125
|
-
|
|
6130
|
+
U = h0(M, N);
|
|
6131
|
+
const c = _e(U);
|
|
6132
|
+
c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(y, 0, 0, b, g, 0, 0, M, N), e(`[renderByJson] 已缩放结果: ${b}x${g} -> ${M}x${N}`);
|
|
6126
6133
|
}
|
|
6127
|
-
const S = performance.now() -
|
|
6134
|
+
const S = performance.now() - h;
|
|
6128
6135
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6129
6136
|
canvas: U,
|
|
6130
|
-
width:
|
|
6137
|
+
width: M,
|
|
6131
6138
|
height: N
|
|
6132
6139
|
};
|
|
6133
6140
|
}
|
|
6134
|
-
const
|
|
6135
|
-
const t = (await
|
|
6141
|
+
const Oe = async (r) => {
|
|
6142
|
+
const t = (await Yx(r)).canvas;
|
|
6136
6143
|
return t ? createImageBitmap(t) : null;
|
|
6137
6144
|
};
|
|
6138
|
-
let s0 = null,
|
|
6139
|
-
const
|
|
6140
|
-
if (!
|
|
6141
|
-
|
|
6145
|
+
let s0 = null, Er = !1;
|
|
6146
|
+
const qe = async () => {
|
|
6147
|
+
if (!Er) {
|
|
6148
|
+
Er = !0;
|
|
6142
6149
|
try {
|
|
6143
6150
|
for (; s0; ) {
|
|
6144
6151
|
const r = s0;
|
|
6145
6152
|
s0 = null;
|
|
6146
6153
|
try {
|
|
6147
|
-
const
|
|
6154
|
+
const h = await Oe(r.renderData);
|
|
6148
6155
|
if (s0) {
|
|
6149
|
-
|
|
6156
|
+
h?.close?.();
|
|
6150
6157
|
continue;
|
|
6151
6158
|
}
|
|
6152
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6153
|
-
} catch (
|
|
6159
|
+
self.postMessage({ id: r.id, bitmap: h }, h ? [h] : []);
|
|
6160
|
+
} catch (h) {
|
|
6154
6161
|
if (s0) continue;
|
|
6155
6162
|
self.postMessage({
|
|
6156
6163
|
id: r.id,
|
|
6157
|
-
error:
|
|
6164
|
+
error: h instanceof Error ? h.message : String(h)
|
|
6158
6165
|
});
|
|
6159
6166
|
}
|
|
6160
6167
|
}
|
|
6161
6168
|
} finally {
|
|
6162
|
-
|
|
6169
|
+
Er = !1, s0 && qe();
|
|
6163
6170
|
}
|
|
6164
6171
|
}
|
|
6165
6172
|
};
|
|
6166
6173
|
self.onmessage = async (r) => {
|
|
6167
|
-
const
|
|
6168
|
-
if (
|
|
6169
|
-
const e =
|
|
6170
|
-
|
|
6174
|
+
const h = r.data;
|
|
6175
|
+
if (h && typeof h == "object" && "type" in h && h.type === "SET_LICENSE") {
|
|
6176
|
+
const e = h;
|
|
6177
|
+
qx({
|
|
6171
6178
|
token: e.licenseToken,
|
|
6172
6179
|
apiUrl: e.licenseApiUrl,
|
|
6173
6180
|
deviceId: e.deviceId,
|
|
@@ -6175,13 +6182,13 @@ self.onmessage = async (r) => {
|
|
|
6175
6182
|
});
|
|
6176
6183
|
return;
|
|
6177
6184
|
}
|
|
6178
|
-
const t =
|
|
6185
|
+
const t = h;
|
|
6179
6186
|
if (t.coalesce === !0) {
|
|
6180
|
-
s0 = { id: t.id, renderData: t.renderData },
|
|
6187
|
+
s0 = { id: t.id, renderData: t.renderData }, qe();
|
|
6181
6188
|
return;
|
|
6182
6189
|
}
|
|
6183
6190
|
try {
|
|
6184
|
-
const e = await
|
|
6191
|
+
const e = await Oe(t.renderData);
|
|
6185
6192
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|
|
6186
6193
|
} catch (e) {
|
|
6187
6194
|
self.postMessage({
|