template-designer 0.6.8 → 0.7.0
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/{index-331ba253.mjs → index-dc50656d.mjs} +211 -196
- package/dist/{index.es-2968db9e.mjs → index.es-8a02aa05.mjs} +1 -1
- package/dist/{lodop-82221e6f.mjs → lodop-f01641a4.mjs} +1 -1
- package/dist/{rfid-b374a8c1.mjs → rfid-8660387a.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/template-designer.es.js +1 -1
- package/dist/template-designer.umd.js +42 -42
- package/package.json +1 -1
|
@@ -6678,7 +6678,7 @@ function Nh(e) {
|
|
|
6678
6678
|
}));
|
|
6679
6679
|
};
|
|
6680
6680
|
}
|
|
6681
|
-
function
|
|
6681
|
+
function UA(e, A = ct.CALCULATION.PRECISION) {
|
|
6682
6682
|
const t = Math.pow(10, A);
|
|
6683
6683
|
return Math.round(e * t) / t;
|
|
6684
6684
|
}
|
|
@@ -7073,9 +7073,9 @@ const ub = /* @__PURE__ */ Lt(sb, [["render", cb]]), Kg = [
|
|
|
7073
7073
|
], _g = Kg.flatMap((e) => e.components);
|
|
7074
7074
|
async function fb(e) {
|
|
7075
7075
|
try {
|
|
7076
|
-
return (await Bm(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-
|
|
7076
|
+
return (await Bm(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-f01641a4.mjs"), "./props/rfid.js": () => import("./rfid-8660387a.mjs") }), `./props/${e}.js`)).default;
|
|
7077
7077
|
} catch {
|
|
7078
|
-
return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-
|
|
7078
|
+
return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-f01641a4.mjs")).default;
|
|
7079
7079
|
}
|
|
7080
7080
|
}
|
|
7081
7081
|
function hb(e = {}, A = {}) {
|
|
@@ -7790,10 +7790,10 @@ function Gg(e) {
|
|
|
7790
7790
|
function zi(e, A, t, n, r) {
|
|
7791
7791
|
if (e = parseFloat(e) || 0, A = parseFloat(A) || 0, t = parseFloat(t) || 0, n = parseFloat(n) || 0, r = parseFloat(r) || 0, !r || r === 0)
|
|
7792
7792
|
return [
|
|
7793
|
-
{ x:
|
|
7794
|
-
{ x:
|
|
7795
|
-
{ x:
|
|
7796
|
-
{ x:
|
|
7793
|
+
{ x: UA(e, 3), y: UA(A, 3) },
|
|
7794
|
+
{ x: UA(e + t, 3), y: UA(A, 3) },
|
|
7795
|
+
{ x: UA(e + t, 3), y: UA(A + n, 3) },
|
|
7796
|
+
{ x: UA(e, 3), y: UA(A + n, 3) }
|
|
7797
7797
|
];
|
|
7798
7798
|
const { cos: i, sin: a } = Gg(r), o = e + t / 2, l = A + n / 2;
|
|
7799
7799
|
return [
|
|
@@ -7802,8 +7802,8 @@ function zi(e, A, t, n, r) {
|
|
|
7802
7802
|
{ x: t / 2, y: n / 2 },
|
|
7803
7803
|
{ x: -t / 2, y: n / 2 }
|
|
7804
7804
|
].map((f) => ({
|
|
7805
|
-
x:
|
|
7806
|
-
y:
|
|
7805
|
+
x: UA(o + f.x * i - f.y * a, 3),
|
|
7806
|
+
y: UA(l + f.x * a + f.y * i, 3)
|
|
7807
7807
|
}));
|
|
7808
7808
|
}
|
|
7809
7809
|
function Ws(e) {
|
|
@@ -7867,7 +7867,7 @@ function Kb(e = {}) {
|
|
|
7867
7867
|
}
|
|
7868
7868
|
}
|
|
7869
7869
|
}
|
|
7870
|
-
O =
|
|
7870
|
+
O = UA(O), Q = UA(Q), (Pa(f.value.props.x, O) || Pa(f.value.props.y, Q)) && (f.value.props.x = O, f.value.props.y = Q, typeof o == "function" && o());
|
|
7871
7871
|
}
|
|
7872
7872
|
const w = Nh(B);
|
|
7873
7873
|
function S() {
|
|
@@ -7929,23 +7929,23 @@ function _b(e, A, t, n, r) {
|
|
|
7929
7929
|
return K[1];
|
|
7930
7930
|
case "top":
|
|
7931
7931
|
return {
|
|
7932
|
-
x:
|
|
7933
|
-
y:
|
|
7932
|
+
x: UA((K[2].x + K[3].x) / 2),
|
|
7933
|
+
y: UA((K[2].y + K[3].y) / 2)
|
|
7934
7934
|
};
|
|
7935
7935
|
case "bottom":
|
|
7936
7936
|
return {
|
|
7937
|
-
x:
|
|
7938
|
-
y:
|
|
7937
|
+
x: UA((K[0].x + K[1].x) / 2),
|
|
7938
|
+
y: UA((K[0].y + K[1].y) / 2)
|
|
7939
7939
|
};
|
|
7940
7940
|
case "left":
|
|
7941
7941
|
return {
|
|
7942
|
-
x:
|
|
7943
|
-
y:
|
|
7942
|
+
x: UA((K[1].x + K[2].x) / 2),
|
|
7943
|
+
y: UA((K[1].y + K[2].y) / 2)
|
|
7944
7944
|
};
|
|
7945
7945
|
case "right":
|
|
7946
7946
|
return {
|
|
7947
|
-
x:
|
|
7948
|
-
y:
|
|
7947
|
+
x: UA((K[0].x + K[3].x) / 2),
|
|
7948
|
+
y: UA((K[0].y + K[3].y) / 2)
|
|
7949
7949
|
};
|
|
7950
7950
|
default:
|
|
7951
7951
|
return K[0];
|
|
@@ -8001,7 +8001,7 @@ function _b(e, A, t, n, r) {
|
|
|
8001
8001
|
cA,
|
|
8002
8002
|
C
|
|
8003
8003
|
), xA = d.value.x - VA.x, DA = d.value.y - VA.y;
|
|
8004
|
-
let TA =
|
|
8004
|
+
let TA = UA(q + xA), YA = UA(X + DA);
|
|
8005
8005
|
const gA = e.value || 0, G = A.value || 0;
|
|
8006
8006
|
if (a.value.type === "line") {
|
|
8007
8007
|
const NA = parseFloat(a.value.props.LineWidth || "0.5") * 0.264583, IA = w(TA, YA, eA, NA, C, gA, G);
|
|
@@ -8062,7 +8062,7 @@ function _b(e, A, t, n, r) {
|
|
|
8062
8062
|
}
|
|
8063
8063
|
}
|
|
8064
8064
|
}
|
|
8065
|
-
eA =
|
|
8065
|
+
eA = UA(eA), cA = UA(cA), TA = UA(TA), YA = UA(YA), (Pa(a.value.props.width, eA) || Pa(a.value.props.height, cA) || Pa(a.value.props.x, TA) || Pa(a.value.props.y, YA)) && (a.value.props.x = TA, a.value.props.y = YA, a.value.props.width = eA, a.value.props.height = cA, r && r());
|
|
8066
8066
|
}
|
|
8067
8067
|
const L = Nh(W);
|
|
8068
8068
|
function V() {
|
|
@@ -8179,23 +8179,23 @@ function t1(e, A, t, n, r, i) {
|
|
|
8179
8179
|
return a[3];
|
|
8180
8180
|
case "top":
|
|
8181
8181
|
return {
|
|
8182
|
-
x:
|
|
8183
|
-
y:
|
|
8182
|
+
x: UA((a[2].x + a[3].x) / 2, 3),
|
|
8183
|
+
y: UA((a[2].y + a[3].y) / 2, 3)
|
|
8184
8184
|
};
|
|
8185
8185
|
case "bottom":
|
|
8186
8186
|
return {
|
|
8187
|
-
x:
|
|
8188
|
-
y:
|
|
8187
|
+
x: UA((a[0].x + a[1].x) / 2, 3),
|
|
8188
|
+
y: UA((a[0].y + a[1].y) / 2, 3)
|
|
8189
8189
|
};
|
|
8190
8190
|
case "left":
|
|
8191
8191
|
return {
|
|
8192
|
-
x:
|
|
8193
|
-
y:
|
|
8192
|
+
x: UA((a[1].x + a[2].x) / 2, 3),
|
|
8193
|
+
y: UA((a[1].y + a[2].y) / 2, 3)
|
|
8194
8194
|
};
|
|
8195
8195
|
case "right":
|
|
8196
8196
|
return {
|
|
8197
|
-
x:
|
|
8198
|
-
y:
|
|
8197
|
+
x: UA((a[0].x + a[3].x) / 2, 3),
|
|
8198
|
+
y: UA((a[0].y + a[3].y) / 2, 3)
|
|
8199
8199
|
};
|
|
8200
8200
|
default:
|
|
8201
8201
|
return a[0];
|
|
@@ -8343,13 +8343,13 @@ function A3(e, A, t) {
|
|
|
8343
8343
|
O,
|
|
8344
8344
|
w
|
|
8345
8345
|
), C = V.x - Q.x, k = V.y - Q.y;
|
|
8346
|
-
let H =
|
|
8346
|
+
let H = UA(S + C, 2), K = UA(I + k, 2);
|
|
8347
8347
|
const z = (A == null ? void 0 : A.value) || 0, q = (t == null ? void 0 : t.value) || 0;
|
|
8348
8348
|
if (z > 0 && q > 0) {
|
|
8349
8349
|
const X = n1(H, K, J, O, w, z, q);
|
|
8350
8350
|
if (X.isOutOfBounds) {
|
|
8351
8351
|
let eA = 0, cA = 0;
|
|
8352
|
-
X.minX < -0.1 ? eA = -X.minX + 0.1 : X.maxX > z + 0.1 && (eA = z - X.maxX + 0.1), X.minY < -0.1 ? cA = -X.minY + 0.1 : X.maxY > q + 0.1 && (cA = q - X.maxY + 0.1), H =
|
|
8352
|
+
X.minX < -0.1 ? eA = -X.minX + 0.1 : X.maxX > z + 0.1 && (eA = z - X.maxX + 0.1), X.minY < -0.1 ? cA = -X.minY + 0.1 : X.maxY > q + 0.1 && (cA = q - X.maxY + 0.1), H = UA(H + eA, 2), K = UA(K + cA, 2);
|
|
8353
8353
|
const E = n1(H, K, J, O, w, z, q);
|
|
8354
8354
|
if (E.isOutOfBounds) {
|
|
8355
8355
|
const Z = E.maxX - E.minX, j = E.maxY - E.minY;
|
|
@@ -8364,7 +8364,7 @@ function A3(e, A, t) {
|
|
|
8364
8364
|
}
|
|
8365
8365
|
}
|
|
8366
8366
|
}
|
|
8367
|
-
if (U.props.x = H, U.props.y = K, U.props.width =
|
|
8367
|
+
if (U.props.x = H, U.props.y = K, U.props.width = UA(J, 2), U.props.height = UA(O, 2), U.props.height > 0 && (n.value = U.props.width / U.props.height), U.type === "line" && m === "height") {
|
|
8368
8368
|
const nA = O * 3.78;
|
|
8369
8369
|
Math.abs(parseFloat(U.props.LineWidth || "0.5") - nA) > 0.01 && (U.props.LineWidth = Number(nA.toFixed(2)));
|
|
8370
8370
|
}
|
|
@@ -8383,20 +8383,20 @@ function A3(e, A, t) {
|
|
|
8383
8383
|
return I.map((V) => {
|
|
8384
8384
|
const J = V.x - x, O = V.y - W, Q = J * Math.cos(S) - O * Math.sin(S), C = J * Math.sin(S) + O * Math.cos(S);
|
|
8385
8385
|
return {
|
|
8386
|
-
x:
|
|
8387
|
-
y:
|
|
8386
|
+
x: UA(Q + x + U, 3),
|
|
8387
|
+
y: UA(C + W + m, 3)
|
|
8388
8388
|
};
|
|
8389
8389
|
});
|
|
8390
8390
|
}
|
|
8391
8391
|
function o(U, m, F, B, w) {
|
|
8392
|
-
const S = a(U, m, F, B, w), I = S.map((O) => O.x), x = S.map((O) => O.y), W =
|
|
8392
|
+
const S = a(U, m, F, B, w), I = S.map((O) => O.x), x = S.map((O) => O.y), W = UA(Math.min(...I), 3), L = UA(Math.max(...I), 3), V = UA(Math.min(...x), 3), J = UA(Math.max(...x), 3);
|
|
8393
8393
|
return {
|
|
8394
8394
|
minX: W,
|
|
8395
8395
|
maxX: L,
|
|
8396
8396
|
minY: V,
|
|
8397
8397
|
maxY: J,
|
|
8398
|
-
width:
|
|
8399
|
-
height:
|
|
8398
|
+
width: UA(L - W, 3),
|
|
8399
|
+
height: UA(J - V, 3)
|
|
8400
8400
|
};
|
|
8401
8401
|
}
|
|
8402
8402
|
function l(U, m) {
|
|
@@ -8454,14 +8454,14 @@ function A3(e, A, t) {
|
|
|
8454
8454
|
z > H && (X = H / z), q > K && (nA = K / q);
|
|
8455
8455
|
const eA = Math.min(X, nA);
|
|
8456
8456
|
if (eA < 1) {
|
|
8457
|
-
x =
|
|
8457
|
+
x = UA(x * eA, 2), W = UA(W * eA, 2);
|
|
8458
8458
|
const cA = o(Q, C, x, W, m), E = (cA.minX + cA.maxX) / 2, Z = (cA.minY + cA.maxY) / 2, j = Q - (E - F / 2), Y = C - (Z - B / 2), tA = o(j, Y, x, W, m);
|
|
8459
8459
|
let oA = j, fA = Y;
|
|
8460
|
-
tA.minX < -w && (oA = -tA.minX + w), tA.maxX > F + w && (oA = F - tA.maxX - w), tA.minY < -w && (fA = -tA.minY + w), tA.maxY > B + w && (fA = B - tA.maxY - w), U.props.width = x, U.props.height = W, U.props.x =
|
|
8460
|
+
tA.minX < -w && (oA = -tA.minX + w), tA.maxX > F + w && (oA = F - tA.maxX - w), tA.minY < -w && (fA = -tA.minY + w), tA.maxY > B + w && (fA = B - tA.maxY - w), U.props.width = x, U.props.height = W, U.props.x = UA(oA, 2), U.props.y = UA(fA, 2);
|
|
8461
8461
|
} else
|
|
8462
|
-
U.props.x =
|
|
8462
|
+
U.props.x = UA(Q, 2), U.props.y = UA(C, 2);
|
|
8463
8463
|
} else
|
|
8464
|
-
U.props.x =
|
|
8464
|
+
U.props.x = UA(Q, 2), U.props.y = UA(C, 2);
|
|
8465
8465
|
}
|
|
8466
8466
|
function v(U) {
|
|
8467
8467
|
if (e.value.length === 0)
|
|
@@ -8507,15 +8507,15 @@ function e3(e, A, t, n, r) {
|
|
|
8507
8507
|
], F = p / 2, B = v / 2, w = m.map((x) => {
|
|
8508
8508
|
const W = x.x - F, L = x.y - B, V = W * Math.cos(U) - L * Math.sin(U), J = W * Math.sin(U) + L * Math.cos(U);
|
|
8509
8509
|
return {
|
|
8510
|
-
x:
|
|
8511
|
-
y:
|
|
8510
|
+
x: UA(V + F + u, 3),
|
|
8511
|
+
y: UA(J + B + f, 3)
|
|
8512
8512
|
};
|
|
8513
8513
|
}), S = w.map((x) => x.x), I = w.map((x) => x.y);
|
|
8514
8514
|
return {
|
|
8515
|
-
minX:
|
|
8516
|
-
maxX:
|
|
8517
|
-
minY:
|
|
8518
|
-
maxY:
|
|
8515
|
+
minX: UA(Math.min(...S), 3),
|
|
8516
|
+
maxX: UA(Math.max(...S), 3),
|
|
8517
|
+
minY: UA(Math.min(...I), 3),
|
|
8518
|
+
maxY: UA(Math.max(...I), 3)
|
|
8519
8519
|
};
|
|
8520
8520
|
}
|
|
8521
8521
|
function o(u) {
|
|
@@ -8534,7 +8534,7 @@ function e3(e, A, t, n, r) {
|
|
|
8534
8534
|
if (U !== 0) {
|
|
8535
8535
|
const B = a(v, d, m, F, U), w = t.value, S = n.value, I = 2;
|
|
8536
8536
|
let x = v, W = d;
|
|
8537
|
-
B.minX < -I && (x = v - B.minX + I), B.maxX > w + I && (x = v - (B.maxX - w) - I), B.minY < -I && (W = d - B.minY + I), B.maxY > S + I && (W = d - (B.maxY - S) - I), x !== v && (x = v - 5 * 2), W !== d && (W = d - 5 * 2), p.props.x =
|
|
8537
|
+
B.minX < -I && (x = v - B.minX + I), B.maxX > w + I && (x = v - (B.maxX - w) - I), B.minY < -I && (W = d - B.minY + I), B.maxY > S + I && (W = d - (B.maxY - S) - I), x !== v && (x = v - 5 * 2), W !== d && (W = d - 5 * 2), p.props.x = UA(x, 2), p.props.y = UA(W, 2);
|
|
8538
8538
|
const L = a(x, W, m, F, U);
|
|
8539
8539
|
(L.minX < -I || L.maxX > w + I || L.minY < -I || L.maxY > S + I) && r && r(p, U);
|
|
8540
8540
|
} else {
|
|
@@ -8559,35 +8559,35 @@ function t3(e = {}) {
|
|
|
8559
8559
|
return Math.abs(C % 90) < 0.1;
|
|
8560
8560
|
}
|
|
8561
8561
|
function U(O) {
|
|
8562
|
-
const Q = `${O.id}_${
|
|
8562
|
+
const Q = `${O.id}_${UA(O.props.x, 1)}_${UA(O.props.y, 1)}_${UA(O.props.width, 1)}_${UA(O.props.height, 1)}`;
|
|
8563
8563
|
if (f.has(Q))
|
|
8564
8564
|
return f.get(Q);
|
|
8565
8565
|
const C = Number(O.props.x) || 0, k = Number(O.props.y) || 0, H = Number(O.props.width) || 0, K = Number(O.props.height) || 0, z = {
|
|
8566
|
-
centerX:
|
|
8567
|
-
centerY:
|
|
8566
|
+
centerX: UA(C + H / 2, 3),
|
|
8567
|
+
centerY: UA(k + K / 2, 3)
|
|
8568
8568
|
};
|
|
8569
8569
|
return f.set(Q, z), z;
|
|
8570
8570
|
}
|
|
8571
8571
|
function m(O) {
|
|
8572
|
-
const C = ((Number(O.props.rotation) || 0) % 360 + 360) % 360, k = `${O.id}_${
|
|
8572
|
+
const C = ((Number(O.props.rotation) || 0) % 360 + 360) % 360, k = `${O.id}_${UA(O.props.x, 1)}_${UA(O.props.y, 1)}_${UA(O.props.width, 1)}_${UA(O.props.height, 1)}_${C}`;
|
|
8573
8573
|
if (p.has(k))
|
|
8574
8574
|
return p.get(k);
|
|
8575
8575
|
const H = Number(O.props.x) || 0, K = Number(O.props.y) || 0, z = Number(O.props.width) || 0, q = Number(O.props.height) || 0;
|
|
8576
8576
|
let X;
|
|
8577
8577
|
if (Math.abs(C) < 1)
|
|
8578
8578
|
X = {
|
|
8579
|
-
left:
|
|
8580
|
-
right:
|
|
8581
|
-
top:
|
|
8582
|
-
bottom:
|
|
8579
|
+
left: UA(H, 3),
|
|
8580
|
+
right: UA(H + z, 3),
|
|
8581
|
+
top: UA(K, 3),
|
|
8582
|
+
bottom: UA(K + q, 3)
|
|
8583
8583
|
};
|
|
8584
8584
|
else {
|
|
8585
8585
|
const nA = zi(H, K, z, q, C), eA = Ws(nA);
|
|
8586
8586
|
X = {
|
|
8587
|
-
left:
|
|
8588
|
-
right:
|
|
8589
|
-
top:
|
|
8590
|
-
bottom:
|
|
8587
|
+
left: UA(eA.minX, 3),
|
|
8588
|
+
right: UA(eA.maxX, 3),
|
|
8589
|
+
top: UA(eA.minY, 3),
|
|
8590
|
+
bottom: UA(eA.maxY, 3)
|
|
8591
8591
|
};
|
|
8592
8592
|
}
|
|
8593
8593
|
return p.set(k, X), X;
|
|
@@ -8595,13 +8595,13 @@ function t3(e = {}) {
|
|
|
8595
8595
|
function F(O, Q) {
|
|
8596
8596
|
const C = [], k = [], H = /* @__PURE__ */ new Set(), K = /* @__PURE__ */ new Set(), z = U(O);
|
|
8597
8597
|
return Q.forEach((q) => {
|
|
8598
|
-
const X = U(q), nA = Math.abs(z.centerY - X.centerY), eA =
|
|
8598
|
+
const X = U(q), nA = Math.abs(z.centerY - X.centerY), eA = UA(z.centerY, 2);
|
|
8599
8599
|
nA <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !H.has(eA) && (C.push({
|
|
8600
8600
|
y: eA,
|
|
8601
8601
|
visible: !0,
|
|
8602
8602
|
type: "center"
|
|
8603
8603
|
}), H.add(eA));
|
|
8604
|
-
const cA = Math.abs(z.centerX - X.centerX), E =
|
|
8604
|
+
const cA = Math.abs(z.centerX - X.centerX), E = UA(z.centerX, 2);
|
|
8605
8605
|
cA <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !K.has(E) && (k.push({
|
|
8606
8606
|
x: E,
|
|
8607
8607
|
visible: !0,
|
|
@@ -8622,7 +8622,7 @@ function t3(e = {}) {
|
|
|
8622
8622
|
let E, Z;
|
|
8623
8623
|
const Y = ((Number(O.props.rotation) || 0) % 360 + 360) % 360;
|
|
8624
8624
|
Math.abs(Y - 90) < 1 ? C.includes("bottom") ? (E = q.left, Z = [cA.left]) : C.includes("top") ? (E = q.right, Z = [cA.right]) : C.includes("left") ? (E = q.top, Z = [cA.top]) : C.includes("right") && (E = q.bottom, Z = [cA.bottom]) : Math.abs(Y - 180) < 1 ? C.includes("bottom") ? (E = q.top, Z = [cA.top]) : C.includes("top") ? (E = q.bottom, Z = [cA.bottom]) : C.includes("left") ? (E = q.right, Z = [cA.right]) : C.includes("right") && (E = q.left, Z = [cA.left]) : Math.abs(Y - 270) < 1 ? C.includes("bottom") ? (E = q.right, Z = [cA.right]) : C.includes("top") ? (E = q.left, Z = [cA.left]) : C.includes("left") ? (E = q.bottom, Z = [cA.bottom]) : C.includes("right") && (E = q.top, Z = [cA.top]) : C.includes("left") || C.includes("right") ? (E = C.includes("left") ? q.left : q.right, Z = C.includes("left") ? [cA.left] : [cA.right]) : (C.includes("top") || C.includes("bottom")) && (E = C.includes("top") ? q.left : q.right, Z = C.includes("top") ? [cA.left] : [cA.right]), E !== void 0 && Z && Z.forEach((tA) => {
|
|
8625
|
-
const oA = Math.abs(E - tA), fA =
|
|
8625
|
+
const oA = Math.abs(E - tA), fA = UA(E, 2);
|
|
8626
8626
|
oA <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !z.has(fA) && (H.push({
|
|
8627
8627
|
x: fA,
|
|
8628
8628
|
visible: !0,
|
|
@@ -8634,7 +8634,7 @@ function t3(e = {}) {
|
|
|
8634
8634
|
let E, Z;
|
|
8635
8635
|
const Y = ((Number(O.props.rotation) || 0) % 360 + 360) % 360;
|
|
8636
8636
|
Math.abs(Y - 90) < 1 ? C.includes("bottom") ? (E = q.left, Z = [cA.left]) : C.includes("top") ? (E = q.right, Z = [cA.right]) : C.includes("left") ? (E = q.top, Z = [cA.top]) : C.includes("right") && (E = q.bottom, Z = [cA.bottom]) : Math.abs(Y - 180) < 1 ? C.includes("bottom") ? (E = q.top, Z = [cA.top]) : C.includes("top") ? (E = q.bottom, Z = [cA.bottom]) : C.includes("left") ? (E = q.right, Z = [cA.right]) : C.includes("right") && (E = q.left, Z = [cA.left]) : Math.abs(Y - 270) < 1 ? C.includes("bottom") ? (E = q.right, Z = [cA.right]) : C.includes("top") ? (E = q.left, Z = [cA.left]) : C.includes("left") ? (E = q.bottom, Z = [cA.bottom]) : C.includes("right") && (E = q.top, Z = [cA.top]) : C.includes("top") || C.includes("bottom") ? (E = C.includes("top") ? q.top : q.bottom, Z = C.includes("top") ? [cA.top] : [cA.bottom]) : (C.includes("left") || C.includes("right")) && (E = C.includes("left") ? q.left : q.right, Z = C.includes("left") ? [cA.left] : [cA.right]), E !== void 0 && Z && Z.forEach((tA) => {
|
|
8637
|
-
const oA = Math.abs(E - tA), fA =
|
|
8637
|
+
const oA = Math.abs(E - tA), fA = UA(E, 2);
|
|
8638
8638
|
oA <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !K.has(fA) && (k.push({
|
|
8639
8639
|
y: fA,
|
|
8640
8640
|
visible: !0,
|
|
@@ -8648,12 +8648,12 @@ function t3(e = {}) {
|
|
|
8648
8648
|
const C = [], k = [], H = /* @__PURE__ */ new Set(), K = /* @__PURE__ */ new Set(), z = m(O);
|
|
8649
8649
|
return Q.forEach((q) => {
|
|
8650
8650
|
const X = m(q);
|
|
8651
|
-
if (Math.abs(z.top - X.top) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !H.has(
|
|
8652
|
-
y:
|
|
8651
|
+
if (Math.abs(z.top - X.top) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !H.has(UA(z.top, 2)) && (C.push({
|
|
8652
|
+
y: UA(z.top, 2),
|
|
8653
8653
|
visible: !0,
|
|
8654
8654
|
type: "boundary"
|
|
8655
|
-
}), H.add(
|
|
8656
|
-
const oA =
|
|
8655
|
+
}), H.add(UA(z.top, 2))), Math.abs(z.top - X.bottom) <= ct.CALCULATION.ALIGNMENT_THRESHOLD) {
|
|
8656
|
+
const oA = UA(z.top, 2);
|
|
8657
8657
|
H.has(oA) || (C.push({
|
|
8658
8658
|
y: oA,
|
|
8659
8659
|
visible: !0,
|
|
@@ -8661,23 +8661,23 @@ function t3(e = {}) {
|
|
|
8661
8661
|
}), H.add(oA));
|
|
8662
8662
|
}
|
|
8663
8663
|
if (Math.abs(z.bottom - X.top) <= ct.CALCULATION.ALIGNMENT_THRESHOLD) {
|
|
8664
|
-
const oA =
|
|
8664
|
+
const oA = UA(z.bottom, 2);
|
|
8665
8665
|
H.has(oA) || (C.push({
|
|
8666
8666
|
y: oA,
|
|
8667
8667
|
visible: !0,
|
|
8668
8668
|
type: "boundary"
|
|
8669
8669
|
}), H.add(oA));
|
|
8670
8670
|
}
|
|
8671
|
-
if (Math.abs(z.bottom - X.bottom) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !H.has(
|
|
8672
|
-
y:
|
|
8671
|
+
if (Math.abs(z.bottom - X.bottom) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !H.has(UA(z.bottom, 2)) && (C.push({
|
|
8672
|
+
y: UA(z.bottom, 2),
|
|
8673
8673
|
visible: !0,
|
|
8674
8674
|
type: "boundary"
|
|
8675
|
-
}), H.add(
|
|
8676
|
-
x:
|
|
8675
|
+
}), H.add(UA(z.bottom, 2))), Math.abs(z.left - X.left) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !K.has(UA(z.left, 2)) && (k.push({
|
|
8676
|
+
x: UA(z.left, 2),
|
|
8677
8677
|
visible: !0,
|
|
8678
8678
|
type: "boundary"
|
|
8679
|
-
}), K.add(
|
|
8680
|
-
const oA =
|
|
8679
|
+
}), K.add(UA(z.left, 2))), Math.abs(z.left - X.right) <= ct.CALCULATION.ALIGNMENT_THRESHOLD) {
|
|
8680
|
+
const oA = UA(z.left, 2);
|
|
8681
8681
|
K.has(oA) || (k.push({
|
|
8682
8682
|
x: oA,
|
|
8683
8683
|
visible: !0,
|
|
@@ -8685,18 +8685,18 @@ function t3(e = {}) {
|
|
|
8685
8685
|
}), K.add(oA));
|
|
8686
8686
|
}
|
|
8687
8687
|
if (Math.abs(z.right - X.left) <= ct.CALCULATION.ALIGNMENT_THRESHOLD) {
|
|
8688
|
-
const oA =
|
|
8688
|
+
const oA = UA(z.right, 2);
|
|
8689
8689
|
K.has(oA) || (k.push({
|
|
8690
8690
|
x: oA,
|
|
8691
8691
|
visible: !0,
|
|
8692
8692
|
type: "boundary"
|
|
8693
8693
|
}), K.add(oA));
|
|
8694
8694
|
}
|
|
8695
|
-
Math.abs(z.right - X.right) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !K.has(
|
|
8696
|
-
x:
|
|
8695
|
+
Math.abs(z.right - X.right) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && !K.has(UA(z.right, 2)) && (k.push({
|
|
8696
|
+
x: UA(z.right, 2),
|
|
8697
8697
|
visible: !0,
|
|
8698
8698
|
type: "boundary"
|
|
8699
|
-
}), K.add(
|
|
8699
|
+
}), K.add(UA(z.right, 2)));
|
|
8700
8700
|
}), { horizontalLines: C, verticalLines: k };
|
|
8701
8701
|
}
|
|
8702
8702
|
function I(O) {
|
|
@@ -8705,11 +8705,11 @@ function t3(e = {}) {
|
|
|
8705
8705
|
return { horizontalLines: Q, verticalLines: C };
|
|
8706
8706
|
const k = U(O), H = o.value / 2, K = l.value / 2;
|
|
8707
8707
|
return Math.abs(k.centerY - K) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && Q.push({
|
|
8708
|
-
y:
|
|
8708
|
+
y: UA(K, 2),
|
|
8709
8709
|
visible: !0,
|
|
8710
8710
|
type: "canvas-center"
|
|
8711
8711
|
}), Math.abs(k.centerX - H) <= ct.CALCULATION.ALIGNMENT_THRESHOLD && C.push({
|
|
8712
|
-
x:
|
|
8712
|
+
x: UA(H, 2),
|
|
8713
8713
|
visible: !0,
|
|
8714
8714
|
type: "canvas-center"
|
|
8715
8715
|
}), { horizontalLines: Q, verticalLines: C };
|
|
@@ -13813,7 +13813,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
13813
13813
|
var BA;
|
|
13814
13814
|
(!$ || Number($) <= 0 && (AA === "width" || AA === "height")) && ue((BA = w()) == null ? void 0 : BA.id);
|
|
13815
13815
|
}, eA = (AA) => {
|
|
13816
|
-
const $ = `${AA.id}_${
|
|
13816
|
+
const $ = `${AA.id}_${UA(AA.props.x, 1)}_${UA(AA.props.y, 1)}_${AA.props.width}_${AA.props.height}_${AA.props.rotation}`;
|
|
13817
13817
|
if (U.has($))
|
|
13818
13818
|
return U.get($);
|
|
13819
13819
|
const BA = zi(
|
|
@@ -13827,33 +13827,33 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
13827
13827
|
}, cA = (AA) => {
|
|
13828
13828
|
const $ = eA(AA), BA = Ws($);
|
|
13829
13829
|
return {
|
|
13830
|
-
minX:
|
|
13831
|
-
maxX:
|
|
13832
|
-
minY:
|
|
13833
|
-
maxY:
|
|
13834
|
-
width:
|
|
13835
|
-
height:
|
|
13836
|
-
centerX:
|
|
13837
|
-
centerY:
|
|
13830
|
+
minX: UA(BA.minX, 3),
|
|
13831
|
+
maxX: UA(BA.maxX, 3),
|
|
13832
|
+
minY: UA(BA.minY, 3),
|
|
13833
|
+
maxY: UA(BA.maxY, 3),
|
|
13834
|
+
width: UA(BA.maxX - BA.minX, 3),
|
|
13835
|
+
height: UA(BA.maxY - BA.minY, 3),
|
|
13836
|
+
centerX: UA((BA.minX + BA.maxX) / 2, 3),
|
|
13837
|
+
centerY: UA((BA.minY + BA.maxY) / 2, 3)
|
|
13838
13838
|
};
|
|
13839
13839
|
}, E = (AA, $) => {
|
|
13840
13840
|
const BA = cA(AA), ie = ((ce) => ce.type === "rectangle" ? parseFloat(ce.props.LineWidth || "0.5") / 3.78 : 0)(AA), ee = (ce, SA, ae) => (ae === "rectangle" && ie > 0, ce);
|
|
13841
13841
|
switch ($) {
|
|
13842
13842
|
case "left":
|
|
13843
13843
|
return {
|
|
13844
|
-
left:
|
|
13844
|
+
left: UA(ee(BA.minX, $, AA.type), 3) + "mm"
|
|
13845
13845
|
};
|
|
13846
13846
|
case "right":
|
|
13847
13847
|
return {
|
|
13848
|
-
left:
|
|
13848
|
+
left: UA(ee(BA.maxX, $, AA.type), 3) + "mm"
|
|
13849
13849
|
};
|
|
13850
13850
|
case "top":
|
|
13851
13851
|
return {
|
|
13852
|
-
top:
|
|
13852
|
+
top: UA(ee(BA.minY, $, AA.type), 3) + "mm"
|
|
13853
13853
|
};
|
|
13854
13854
|
case "bottom":
|
|
13855
13855
|
return {
|
|
13856
|
-
top:
|
|
13856
|
+
top: UA(ee(BA.maxY, $, AA.type), 3) + "mm"
|
|
13857
13857
|
};
|
|
13858
13858
|
default:
|
|
13859
13859
|
return {};
|
|
@@ -13863,11 +13863,11 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
13863
13863
|
const AA = document.querySelector(".canvas-container");
|
|
13864
13864
|
if (!AA || !u.value || !f.value)
|
|
13865
13865
|
return;
|
|
13866
|
-
const $ = AA.getBoundingClientRect(), BA = ro(u.value), XA = ro(f.value), ie = 16, ee = 21, ce = 21, SA = 20, ae = 24, JA = 24,
|
|
13867
|
-
let jA =
|
|
13866
|
+
const $ = AA.getBoundingClientRect(), BA = ro(u.value), XA = ro(f.value), ie = 16, ee = 21, ce = 21, SA = 20, ae = 24, JA = 24, yA = $.width - ie * 2 - ee - JA, me = $.height - ie - ce - SA - ae;
|
|
13867
|
+
let jA = yA / BA, ge = me / XA, ot = Math.min(jA, ge);
|
|
13868
13868
|
ot = ot * 0.95;
|
|
13869
13869
|
const be = Math.min(4, ot);
|
|
13870
|
-
l = Math.max(0.8, Math.min(be, ot)), o.value = j(l, 1), setTimeout(() => {
|
|
13870
|
+
l = Math.max(0.8, Math.min(be, ot)), l = Math.min(3, l), o.value = j(l, 1), setTimeout(() => {
|
|
13871
13871
|
r.value = 1, i.value = !1;
|
|
13872
13872
|
}, 500);
|
|
13873
13873
|
});
|
|
@@ -13884,7 +13884,22 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
13884
13884
|
const ee = {
|
|
13885
13885
|
width: AA.props.width + "mm",
|
|
13886
13886
|
height: AA.props.height + "mm",
|
|
13887
|
-
|
|
13887
|
+
"--item-width": AA.props.width + "mm",
|
|
13888
|
+
"--item-height": AA.props.height + "mm",
|
|
13889
|
+
transform: `translate3d(${AA.props.x}mm, ${AA.props.y}mm, 0) rotate(${AA.props.rotation}deg)`,
|
|
13890
|
+
// 优化文本渲染质量
|
|
13891
|
+
textRendering: "geometricPrecision",
|
|
13892
|
+
WebkitTextRendering: "geometricPrecision",
|
|
13893
|
+
// 字体平滑
|
|
13894
|
+
WebkitFontSmoothing: "antialiased",
|
|
13895
|
+
MozOsxFontSmoothing: "grayscale",
|
|
13896
|
+
// 硬件加速
|
|
13897
|
+
backfaceVisibility: "hidden",
|
|
13898
|
+
WebkitBackfaceVisibility: "hidden",
|
|
13899
|
+
// 优化渲染
|
|
13900
|
+
willChange: "transform",
|
|
13901
|
+
transformOrigin: "center center",
|
|
13902
|
+
WebkitTransformOrigin: "center center"
|
|
13888
13903
|
};
|
|
13889
13904
|
if (XA)
|
|
13890
13905
|
BA ? ee.zIndex = 1e3 : ee.zIndex = 999;
|
|
@@ -13987,14 +14002,14 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
13987
14002
|
return;
|
|
13988
14003
|
const XA = document.querySelector("#design").getBoundingClientRect(), ie = (AA.clientX - XA.left) / o.value, ee = (AA.clientY - XA.top) / o.value, ce = kA.value[BA] || {};
|
|
13989
14004
|
let SA = Ra(ie), ae = Ra(ee);
|
|
13990
|
-
const JA = ce.width,
|
|
14005
|
+
const JA = ce.width, yA = ce.height;
|
|
13991
14006
|
if (!ce.rotation || ce.rotation === 0) {
|
|
13992
|
-
const je = u.value - JA, ut = f.value -
|
|
14007
|
+
const je = u.value - JA, ut = f.value - yA;
|
|
13993
14008
|
SA = Math.max(0, Math.min(SA, je)), ae = Math.max(0, Math.min(ae, ut));
|
|
13994
14009
|
} else
|
|
13995
14010
|
SA = Math.max(0, SA), ae = Math.max(0, ae);
|
|
13996
14011
|
const { propertyPanel: me, ...jA } = ce;
|
|
13997
|
-
let ge = { ...jA, x:
|
|
14012
|
+
let ge = { ...jA, x: UA(SA), y: UA(ae), width: UA(JA), height: UA(yA) };
|
|
13998
14013
|
if ((Zt = kA.value[BA]) != null && Zt.propertyPanel) {
|
|
13999
14014
|
const je = Aa(kA.value[BA].propertyPanel) || {};
|
|
14000
14015
|
if (ge = {
|
|
@@ -14002,7 +14017,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14002
14017
|
...je
|
|
14003
14018
|
}, BA === "line" && je.LineWidth) {
|
|
14004
14019
|
const gt = parseFloat(je.LineWidth) * 0.3528;
|
|
14005
|
-
ge.height =
|
|
14020
|
+
ge.height = UA(gt, 3);
|
|
14006
14021
|
}
|
|
14007
14022
|
}
|
|
14008
14023
|
const We = ((je, ut) => {
|
|
@@ -14012,16 +14027,16 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14012
14027
|
let Ui = !1;
|
|
14013
14028
|
if (gt > yr && (Rn = yr, Ui = !0), _n > Or && (xn = Or, Ui = !0), Hr && Ui) {
|
|
14014
14029
|
const Dr = yr / gt, ta = Or / _n, na = Math.min(Dr, ta);
|
|
14015
|
-
Rn =
|
|
14030
|
+
Rn = UA(gt * na, 2), xn = UA(_n * na, 2), Rn = Math.min(Rn, yr), xn = Math.min(xn, Or);
|
|
14016
14031
|
}
|
|
14017
14032
|
return {
|
|
14018
14033
|
width: Rn,
|
|
14019
14034
|
height: xn
|
|
14020
14035
|
};
|
|
14021
14036
|
})(ge);
|
|
14022
|
-
if (ge.width = We.width, ge.height = We.height, We.width !== JA || We.height !==
|
|
14037
|
+
if (ge.width = We.width, ge.height = We.height, We.width !== JA || We.height !== yA) {
|
|
14023
14038
|
const je = u.value - We.width, ut = f.value - We.height;
|
|
14024
|
-
SA = Math.max(0, Math.min(SA, je)), ae = Math.max(0, Math.min(ae, ut)), ge.x =
|
|
14039
|
+
SA = Math.max(0, Math.min(SA, je)), ae = Math.max(0, Math.min(ae, ut)), ge.x = UA(SA), ge.y = UA(ae);
|
|
14025
14040
|
}
|
|
14026
14041
|
const be = {
|
|
14027
14042
|
id: An(),
|
|
@@ -14080,10 +14095,10 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14080
14095
|
}
|
|
14081
14096
|
const ie = document.querySelector("#design");
|
|
14082
14097
|
if (ie && ie.contains(AA.target)) {
|
|
14083
|
-
const ee = ie.getBoundingClientRect(), ce = o.value, SA = (AA.clientX - ee.left) / ce, ae = (AA.clientY - ee.top) / ce, JA = Ra(SA),
|
|
14098
|
+
const ee = ie.getBoundingClientRect(), ce = o.value, SA = (AA.clientX - ee.left) / ce, ae = (AA.clientY - ee.top) / ce, JA = Ra(SA), yA = Ra(ae);
|
|
14084
14099
|
for (let me = a.value.length - 1; me >= 0; me--) {
|
|
14085
14100
|
const jA = a.value[me], ge = parseFloat(jA.props.x || 0), ot = parseFloat(jA.props.y || 0), We = parseFloat(jA.props.width || 0), be = parseFloat(jA.props.height || 0), He = 1;
|
|
14086
|
-
if (JA >= ge - He && JA <= ge + We + He &&
|
|
14101
|
+
if (JA >= ge - He && JA <= ge + We + He && yA >= ot - He && yA <= ot + be + He) {
|
|
14087
14102
|
B(jA);
|
|
14088
14103
|
return;
|
|
14089
14104
|
}
|
|
@@ -14097,21 +14112,21 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14097
14112
|
return null;
|
|
14098
14113
|
const XA = BA.getBoundingClientRect(), ie = o.value, ee = (AA - XA.left) / ie, ce = ($ - XA.top) / ie, SA = Ra(ee), ae = Ra(ce);
|
|
14099
14114
|
for (let JA = a.value.length - 1; JA >= 0; JA--) {
|
|
14100
|
-
const
|
|
14101
|
-
if (LA(SA, ae,
|
|
14102
|
-
if (
|
|
14115
|
+
const yA = a.value[JA];
|
|
14116
|
+
if (LA(SA, ae, yA)) {
|
|
14117
|
+
if (yA.type === "rectangle")
|
|
14103
14118
|
for (let jA = JA - 1; jA >= 0; jA--) {
|
|
14104
14119
|
const ge = a.value[jA];
|
|
14105
14120
|
if (LA(SA, ae, ge))
|
|
14106
14121
|
return ge;
|
|
14107
14122
|
}
|
|
14108
|
-
return
|
|
14123
|
+
return yA;
|
|
14109
14124
|
}
|
|
14110
14125
|
}
|
|
14111
14126
|
for (let JA = 0; JA < a.value.length; JA++) {
|
|
14112
|
-
const
|
|
14113
|
-
if (LA(SA, ae,
|
|
14114
|
-
return
|
|
14127
|
+
const yA = a.value[JA];
|
|
14128
|
+
if (LA(SA, ae, yA))
|
|
14129
|
+
return yA;
|
|
14115
14130
|
}
|
|
14116
14131
|
return null;
|
|
14117
14132
|
}
|
|
@@ -14225,12 +14240,12 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14225
14240
|
S();
|
|
14226
14241
|
const XA = JSON.parse(JSON.stringify(a.value)), ie = ((BA = t.config) == null ? void 0 : BA.textDisplayPriority) || "text";
|
|
14227
14242
|
XA == null || XA.forEach((ae) => {
|
|
14228
|
-
var JA,
|
|
14243
|
+
var JA, yA, me, jA, ge, ot;
|
|
14229
14244
|
if (ae.type == "text") {
|
|
14230
14245
|
let We = "";
|
|
14231
14246
|
const be = ((JA = ae == null ? void 0 : ae.props) == null ? void 0 : JA.FieldName) || [];
|
|
14232
14247
|
if (Array.isArray(be)) {
|
|
14233
|
-
const He = ((
|
|
14248
|
+
const He = ((yA = ae == null ? void 0 : ae.props) == null ? void 0 : yA.FieldConnector) || " ";
|
|
14234
14249
|
We = ((me = be.map((st) => {
|
|
14235
14250
|
var Zt, je, ut;
|
|
14236
14251
|
return (ut = (je = (Zt = t.options) == null ? void 0 : Zt.fields) == null ? void 0 : je.find((gt) => gt.value == st)) == null ? void 0 : ut.label;
|
|
@@ -14246,8 +14261,8 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14246
14261
|
const ee = await it(XA), ce = [...a.value];
|
|
14247
14262
|
a.value = ee;
|
|
14248
14263
|
const SA = () => {
|
|
14249
|
-
var
|
|
14250
|
-
const ae = ((
|
|
14264
|
+
var yA;
|
|
14265
|
+
const ae = ((yA = document.querySelector("#design")) == null ? void 0 : yA.querySelectorAll("img")) || [], JA = Array.from(ae).map((me) => me.complete ? Promise.resolve() : new Promise((jA) => {
|
|
14251
14266
|
me.onload = me.onerror = jA;
|
|
14252
14267
|
}));
|
|
14253
14268
|
return Promise.all(JA);
|
|
@@ -14261,7 +14276,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14261
14276
|
$(new Error("找不到要转换的DOM元素"));
|
|
14262
14277
|
return;
|
|
14263
14278
|
}
|
|
14264
|
-
const
|
|
14279
|
+
const yA = o.value;
|
|
14265
14280
|
SA().then(() => {
|
|
14266
14281
|
$2(JA, {
|
|
14267
14282
|
// 调整scale参数来补偿界面缩放,确保图片质量
|
|
@@ -14415,100 +14430,100 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14415
14430
|
}, null, 4)
|
|
14416
14431
|
])) : ke("", !0),
|
|
14417
14432
|
MA(C) ? (bA(), OA("div", OT, [
|
|
14418
|
-
(bA(!0), OA(Dt, null, ui(MA(Q).horizontal, (
|
|
14433
|
+
(bA(!0), OA(Dt, null, ui(MA(Q).horizontal, (yA, me) => (bA(), OA("div", {
|
|
14419
14434
|
key: `h-${me}`,
|
|
14420
|
-
class: sn(["alignment-guide horizontal", `guide-${
|
|
14435
|
+
class: sn(["alignment-guide horizontal", `guide-${yA.type}`]),
|
|
14421
14436
|
style: Re({
|
|
14422
|
-
top: `${
|
|
14437
|
+
top: `${yA.y}mm`,
|
|
14423
14438
|
left: "0",
|
|
14424
14439
|
right: "0"
|
|
14425
14440
|
})
|
|
14426
14441
|
}, null, 6))), 128)),
|
|
14427
|
-
(bA(!0), OA(Dt, null, ui(MA(Q).vertical, (
|
|
14442
|
+
(bA(!0), OA(Dt, null, ui(MA(Q).vertical, (yA, me) => (bA(), OA("div", {
|
|
14428
14443
|
key: `v-${me}`,
|
|
14429
|
-
class: sn(["alignment-guide vertical", `guide-${
|
|
14444
|
+
class: sn(["alignment-guide vertical", `guide-${yA.type}`]),
|
|
14430
14445
|
style: Re({
|
|
14431
|
-
left: `${
|
|
14446
|
+
left: `${yA.x}mm`,
|
|
14432
14447
|
top: "0",
|
|
14433
14448
|
bottom: "0"
|
|
14434
14449
|
})
|
|
14435
14450
|
}, null, 6))), 128))
|
|
14436
14451
|
])) : ke("", !0),
|
|
14437
|
-
(bA(!0), OA(Dt, null, ui(a.value, (
|
|
14452
|
+
(bA(!0), OA(Dt, null, ui(a.value, (yA) => {
|
|
14438
14453
|
var me;
|
|
14439
14454
|
return bA(), OA("div", {
|
|
14440
|
-
key:
|
|
14441
|
-
class: sn(["canvas-item", oA(
|
|
14442
|
-
style: Re(tA(
|
|
14443
|
-
"data-item-id":
|
|
14444
|
-
onMousedown: (jA) => le(jA,
|
|
14455
|
+
key: yA.id,
|
|
14456
|
+
class: sn(["canvas-item", oA(yA)]),
|
|
14457
|
+
style: Re(tA(yA)),
|
|
14458
|
+
"data-item-id": yA.id,
|
|
14459
|
+
onMousedown: (jA) => le(jA, yA)
|
|
14445
14460
|
}, [
|
|
14446
|
-
MA(w)() ===
|
|
14447
|
-
|
|
14448
|
-
|
|
14461
|
+
MA(w)() === yA ? (bA(), OA(Dt, { key: 0 }, [
|
|
14462
|
+
yA.props.lockAspectRatio ? ke("", !0) : (bA(), OA(Dt, { key: 0 }, [
|
|
14463
|
+
yA.type !== "line" ? (bA(), OA("div", {
|
|
14449
14464
|
key: 0,
|
|
14450
14465
|
class: "resize-handle top",
|
|
14451
|
-
style: Re(fA(
|
|
14452
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14466
|
+
style: Re(fA(yA, "top")),
|
|
14467
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "top"), ["stop"])
|
|
14453
14468
|
}, null, 44, WT)) : ke("", !0),
|
|
14454
|
-
|
|
14469
|
+
yA.type !== "line" ? (bA(), OA("div", {
|
|
14455
14470
|
key: 1,
|
|
14456
14471
|
class: "resize-handle right",
|
|
14457
|
-
style: Re(fA(
|
|
14458
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14472
|
+
style: Re(fA(yA, "right")),
|
|
14473
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "right"), ["stop"])
|
|
14459
14474
|
}, null, 44, ZT)) : ke("", !0),
|
|
14460
|
-
|
|
14475
|
+
yA.type !== "line" ? (bA(), OA("div", {
|
|
14461
14476
|
key: 2,
|
|
14462
14477
|
class: "resize-handle bottom",
|
|
14463
|
-
style: Re(fA(
|
|
14464
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14478
|
+
style: Re(fA(yA, "bottom")),
|
|
14479
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "bottom"), ["stop"])
|
|
14465
14480
|
}, null, 44, JT)) : ke("", !0),
|
|
14466
|
-
|
|
14481
|
+
yA.type !== "verline" ? (bA(), OA("div", {
|
|
14467
14482
|
key: 3,
|
|
14468
|
-
class: sn(["resize-handle left", { "line-anchor":
|
|
14469
|
-
style: Re(fA(
|
|
14470
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14483
|
+
class: sn(["resize-handle left", { "line-anchor": yA.type === "line" }]),
|
|
14484
|
+
style: Re(fA(yA, "left")),
|
|
14485
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "left"), ["stop"])
|
|
14471
14486
|
}, null, 46, PT)) : ke("", !0),
|
|
14472
|
-
|
|
14487
|
+
yA.type === "line" ? (bA(), OA("div", {
|
|
14473
14488
|
key: 4,
|
|
14474
14489
|
class: "resize-handle right line-anchor",
|
|
14475
|
-
style: Re(fA(
|
|
14476
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14490
|
+
style: Re(fA(yA, "right")),
|
|
14491
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "right"), ["stop"])
|
|
14477
14492
|
}, null, 44, jT)) : ke("", !0)
|
|
14478
14493
|
], 64)),
|
|
14479
|
-
|
|
14494
|
+
yA.type !== "line" && yA.type !== "verline" ? (bA(), OA("div", {
|
|
14480
14495
|
key: 1,
|
|
14481
14496
|
class: "resize-handle top-left",
|
|
14482
|
-
style: Re(fA(
|
|
14483
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14497
|
+
style: Re(fA(yA, "top-left")),
|
|
14498
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "top-left"), ["stop"])
|
|
14484
14499
|
}, null, 44, KT)) : ke("", !0),
|
|
14485
|
-
|
|
14500
|
+
yA.type !== "line" && yA.type !== "verline" ? (bA(), OA("div", {
|
|
14486
14501
|
key: 2,
|
|
14487
14502
|
class: "resize-handle top-right",
|
|
14488
|
-
style: Re(fA(
|
|
14489
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14503
|
+
style: Re(fA(yA, "top-right")),
|
|
14504
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "top-right"), ["stop"])
|
|
14490
14505
|
}, null, 44, _T)) : ke("", !0),
|
|
14491
|
-
|
|
14506
|
+
yA.type !== "line" && yA.type !== "verline" ? (bA(), OA("div", {
|
|
14492
14507
|
key: 3,
|
|
14493
14508
|
class: "resize-handle bottom-right",
|
|
14494
|
-
style: Re(fA(
|
|
14495
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14509
|
+
style: Re(fA(yA, "bottom-right")),
|
|
14510
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "bottom-right"), ["stop"])
|
|
14496
14511
|
}, null, 44, GT)) : ke("", !0),
|
|
14497
|
-
|
|
14512
|
+
yA.type !== "line" && yA.type !== "verline" ? (bA(), OA("div", {
|
|
14498
14513
|
key: 4,
|
|
14499
14514
|
class: "resize-handle bottom-left",
|
|
14500
|
-
style: Re(fA(
|
|
14501
|
-
onMousedown: Se((jA) => MA(L)(jA,
|
|
14515
|
+
style: Re(fA(yA, "bottom-left")),
|
|
14516
|
+
onMousedown: Se((jA) => MA(L)(jA, yA, "bottom-left"), ["stop"])
|
|
14502
14517
|
}, null, 44, zT)) : ke("", !0)
|
|
14503
14518
|
], 64)) : ke("", !0),
|
|
14504
|
-
|
|
14505
|
-
key: `${
|
|
14506
|
-
modelValue: { ...
|
|
14519
|
+
yA.props && et.value ? (bA(), pt(ys(((me = Y(yA.type)) == null ? void 0 : me.component) || null), {
|
|
14520
|
+
key: `${yA.id}-${yA.type}`,
|
|
14521
|
+
modelValue: { ...yA.props, __selected: MA(w)() === yA, options: t.options },
|
|
14507
14522
|
propsConfig: kA.value,
|
|
14508
14523
|
"onUpdate:modelValue": (jA) => {
|
|
14509
14524
|
const { __selected: ge, options: ot, ...We } = jA;
|
|
14510
14525
|
Object.keys(We).forEach((be) => {
|
|
14511
|
-
We[be] !== void 0 && (
|
|
14526
|
+
We[be] !== void 0 && (yA.props[be] = We[be]);
|
|
14512
14527
|
});
|
|
14513
14528
|
}
|
|
14514
14529
|
}, null, 8, ["modelValue", "propsConfig", "onUpdate:modelValue"])) : ke("", !0)
|
|
@@ -14523,7 +14538,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14523
14538
|
vA("div", XT, [
|
|
14524
14539
|
te(BA, {
|
|
14525
14540
|
type: "danger",
|
|
14526
|
-
onClick: $[2] || ($[2] = (
|
|
14541
|
+
onClick: $[2] || ($[2] = (yA) => ue(MA(w)().id))
|
|
14527
14542
|
}, {
|
|
14528
14543
|
default: he(() => [...$[35] || ($[35] = [
|
|
14529
14544
|
dr("删除", -1)
|
|
@@ -14561,12 +14576,12 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14561
14576
|
vA("label", null, Zn(MA(w)().type === "line" ? "起点X:" : "X坐标:"), 1),
|
|
14562
14577
|
vA("div", tI, [
|
|
14563
14578
|
vA("button", {
|
|
14564
|
-
onClick: $[3] || ($[3] = Se((
|
|
14579
|
+
onClick: $[3] || ($[3] = Se((yA) => MA(K)(yA, "x", -0.5), ["stop"]))
|
|
14565
14580
|
}, "-"),
|
|
14566
14581
|
vA("input", {
|
|
14567
14582
|
type: "number",
|
|
14568
14583
|
value: xA(),
|
|
14569
|
-
onInput: $[4] || ($[4] = (
|
|
14584
|
+
onInput: $[4] || ($[4] = (yA) => gA("x", yA.target.value)),
|
|
14570
14585
|
onClick: $[5] || ($[5] = Se(() => {
|
|
14571
14586
|
}, ["stop"])),
|
|
14572
14587
|
onMousedown: $[6] || ($[6] = Se(() => {
|
|
@@ -14575,7 +14590,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14575
14590
|
}, ["prevent"]))
|
|
14576
14591
|
}, null, 40, nI),
|
|
14577
14592
|
vA("button", {
|
|
14578
|
-
onClick: $[8] || ($[8] = Se((
|
|
14593
|
+
onClick: $[8] || ($[8] = Se((yA) => MA(K)(yA, "x", 0.5), ["stop"]))
|
|
14579
14594
|
}, "+")
|
|
14580
14595
|
])
|
|
14581
14596
|
]),
|
|
@@ -14583,12 +14598,12 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14583
14598
|
vA("label", null, Zn(MA(w)().type === "line" ? "起点Y:" : "Y坐标:"), 1),
|
|
14584
14599
|
vA("div", iI, [
|
|
14585
14600
|
vA("button", {
|
|
14586
|
-
onClick: $[9] || ($[9] = Se((
|
|
14601
|
+
onClick: $[9] || ($[9] = Se((yA) => MA(K)(yA, "y", -0.5), ["stop"]))
|
|
14587
14602
|
}, "-"),
|
|
14588
14603
|
vA("input", {
|
|
14589
14604
|
type: "number",
|
|
14590
14605
|
value: DA(),
|
|
14591
|
-
onInput: $[10] || ($[10] = (
|
|
14606
|
+
onInput: $[10] || ($[10] = (yA) => gA("y", yA.target.value)),
|
|
14592
14607
|
onClick: $[11] || ($[11] = Se(() => {
|
|
14593
14608
|
}, ["stop"])),
|
|
14594
14609
|
onMousedown: $[12] || ($[12] = Se(() => {
|
|
@@ -14597,7 +14612,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14597
14612
|
}, ["prevent"]))
|
|
14598
14613
|
}, null, 40, aI),
|
|
14599
14614
|
vA("button", {
|
|
14600
|
-
onClick: $[14] || ($[14] = Se((
|
|
14615
|
+
onClick: $[14] || ($[14] = Se((yA) => MA(K)(yA, "y", 0.5), ["stop"]))
|
|
14601
14616
|
}, "+")
|
|
14602
14617
|
])
|
|
14603
14618
|
]),
|
|
@@ -14605,22 +14620,22 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14605
14620
|
$[37] || ($[37] = vA("label", null, "宽度:", -1)),
|
|
14606
14621
|
vA("div", sI, [
|
|
14607
14622
|
vA("button", {
|
|
14608
|
-
onClick: $[15] || ($[15] = Se((
|
|
14623
|
+
onClick: $[15] || ($[15] = Se((yA) => MA(K)(yA, "width", -0.5, 1), ["stop"]))
|
|
14609
14624
|
}, "-"),
|
|
14610
14625
|
vA("input", {
|
|
14611
14626
|
type: "number",
|
|
14612
14627
|
value: TA(),
|
|
14613
|
-
onInput: $[16] || ($[16] = (
|
|
14628
|
+
onInput: $[16] || ($[16] = (yA) => gA("width", yA.target.value)),
|
|
14614
14629
|
onClick: $[17] || ($[17] = Se(() => {
|
|
14615
14630
|
}, ["stop"])),
|
|
14616
14631
|
onMousedown: $[18] || ($[18] = Se(() => {
|
|
14617
14632
|
}, ["stop"])),
|
|
14618
|
-
onBlur: $[19] || ($[19] = (
|
|
14633
|
+
onBlur: $[19] || ($[19] = (yA) => nA("width", yA.target.value)),
|
|
14619
14634
|
onWheel: $[20] || ($[20] = Se(() => {
|
|
14620
14635
|
}, ["prevent"]))
|
|
14621
14636
|
}, null, 40, lI),
|
|
14622
14637
|
vA("button", {
|
|
14623
|
-
onClick: $[21] || ($[21] = Se((
|
|
14638
|
+
onClick: $[21] || ($[21] = Se((yA) => MA(K)(yA, "width", 0.5, 1), ["stop"]))
|
|
14624
14639
|
}, "+")
|
|
14625
14640
|
])
|
|
14626
14641
|
])) : ke("", !0),
|
|
@@ -14628,22 +14643,22 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14628
14643
|
$[38] || ($[38] = vA("label", null, "高度:", -1)),
|
|
14629
14644
|
vA("div", uI, [
|
|
14630
14645
|
vA("button", {
|
|
14631
|
-
onClick: $[22] || ($[22] = Se((
|
|
14646
|
+
onClick: $[22] || ($[22] = Se((yA) => MA(K)(yA, "height", -0.5, 1), ["stop"]))
|
|
14632
14647
|
}, "-"),
|
|
14633
14648
|
vA("input", {
|
|
14634
14649
|
type: "number",
|
|
14635
14650
|
value: YA(),
|
|
14636
|
-
onInput: $[23] || ($[23] = (
|
|
14651
|
+
onInput: $[23] || ($[23] = (yA) => gA("height", yA.target.value)),
|
|
14637
14652
|
onClick: $[24] || ($[24] = Se(() => {
|
|
14638
14653
|
}, ["stop"])),
|
|
14639
14654
|
onMousedown: $[25] || ($[25] = Se(() => {
|
|
14640
14655
|
}, ["stop"])),
|
|
14641
|
-
onBlur: $[26] || ($[26] = (
|
|
14656
|
+
onBlur: $[26] || ($[26] = (yA) => nA("height", yA.target.value)),
|
|
14642
14657
|
onWheel: $[27] || ($[27] = Se(() => {
|
|
14643
14658
|
}, ["prevent"]))
|
|
14644
14659
|
}, null, 40, fI),
|
|
14645
14660
|
vA("button", {
|
|
14646
|
-
onClick: $[28] || ($[28] = Se((
|
|
14661
|
+
onClick: $[28] || ($[28] = Se((yA) => MA(K)(yA, "height", 0.5, 1), ["stop"]))
|
|
14647
14662
|
}, "+")
|
|
14648
14663
|
])
|
|
14649
14664
|
])) : ke("", !0),
|
|
@@ -14651,11 +14666,11 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14651
14666
|
$[39] || ($[39] = vA("label", null, "旋转:", -1)),
|
|
14652
14667
|
vA("div", dI, [
|
|
14653
14668
|
vA("button", {
|
|
14654
|
-
onClick: $[29] || ($[29] = Se((
|
|
14669
|
+
onClick: $[29] || ($[29] = Se((yA) => MA(z)(-1), ["stop"]))
|
|
14655
14670
|
}, "-"),
|
|
14656
14671
|
vA("span", pI, Zn(MA(w)().props.rotation) + "°", 1),
|
|
14657
14672
|
vA("button", {
|
|
14658
|
-
onClick: $[30] || ($[30] = Se((
|
|
14673
|
+
onClick: $[30] || ($[30] = Se((yA) => MA(z)(1), ["stop"]))
|
|
14659
14674
|
}, "+")
|
|
14660
14675
|
])
|
|
14661
14676
|
])) : ke("", !0),
|
|
@@ -14664,7 +14679,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14664
14679
|
vA("div", BI, [
|
|
14665
14680
|
te(ce, {
|
|
14666
14681
|
modelValue: MA(w)().props.lockAspectRatio,
|
|
14667
|
-
"onUpdate:modelValue": $[31] || ($[31] = (
|
|
14682
|
+
"onUpdate:modelValue": $[31] || ($[31] = (yA) => MA(w)().props.lockAspectRatio = yA),
|
|
14668
14683
|
"active-value": !0,
|
|
14669
14684
|
"inactive-value": !1
|
|
14670
14685
|
}, null, 8, ["modelValue"])
|
|
@@ -14673,7 +14688,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14673
14688
|
]),
|
|
14674
14689
|
(bA(), pt(ys(((JA = Y(MA(w)().type)) == null ? void 0 : JA.propertyPanel) || null), {
|
|
14675
14690
|
modelValue: MA(w)().props,
|
|
14676
|
-
"onUpdate:modelValue": $[32] || ($[32] = (
|
|
14691
|
+
"onUpdate:modelValue": $[32] || ($[32] = (yA) => MA(w)().props = yA),
|
|
14677
14692
|
options: e.options,
|
|
14678
14693
|
"props-config": Ie(MA(w)().type),
|
|
14679
14694
|
onRotationChange: Ce
|
|
@@ -14683,7 +14698,7 @@ const NT = { class: "label-designer" }, ST = { class: "toolbar" }, RT = { class:
|
|
|
14683
14698
|
]);
|
|
14684
14699
|
};
|
|
14685
14700
|
}
|
|
14686
|
-
}, wI = /* @__PURE__ */ Lt(mI, [["__scopeId", "data-v-
|
|
14701
|
+
}, wI = /* @__PURE__ */ Lt(mI, [["__scopeId", "data-v-4168c0e7"]]);
|
|
14687
14702
|
const vI = {
|
|
14688
14703
|
__name: "index",
|
|
14689
14704
|
props: {
|
|
@@ -15914,19 +15929,19 @@ function de(e) {
|
|
|
15914
15929
|
return N.multiply(h);
|
|
15915
15930
|
}, JA = new SA(1, 0, 0, 1, 0, 0);
|
|
15916
15931
|
d.unitMatrix = d.identityMatrix = JA;
|
|
15917
|
-
var
|
|
15932
|
+
var yA = function(h, N) {
|
|
15918
15933
|
if (!or[h]) {
|
|
15919
15934
|
var _ = (N instanceof Li ? "Sh" : "P") + (Object.keys(Ve).length + 1).toString(10);
|
|
15920
15935
|
N.id = _, or[h] = _, Ve[_] = N, BA.publish("addPattern", N);
|
|
15921
15936
|
}
|
|
15922
15937
|
};
|
|
15923
15938
|
d.ShadingPattern = Li, d.TilingPattern = Ka, d.addShadingPattern = function(h, N) {
|
|
15924
|
-
return V("addShadingPattern()"),
|
|
15939
|
+
return V("addShadingPattern()"), yA(h, N), this;
|
|
15925
15940
|
}, d.beginTilingPattern = function(h) {
|
|
15926
15941
|
V("beginTilingPattern()"), al(h.boundingBox[0], h.boundingBox[1], h.boundingBox[2] - h.boundingBox[0], h.boundingBox[3] - h.boundingBox[1], h.matrix);
|
|
15927
15942
|
}, d.endTilingPattern = function(h, N) {
|
|
15928
15943
|
V("endTilingPattern()"), N.stream = xA[Z].join(`
|
|
15929
|
-
`),
|
|
15944
|
+
`), yA(h, N), BA.publish("endTilingPattern", N), ce.pop().restore();
|
|
15930
15945
|
};
|
|
15931
15946
|
var me = d.__private__.newObject = function() {
|
|
15932
15947
|
var h = jA();
|
|
@@ -16654,7 +16669,7 @@ T* `) : h.join(` Tj
|
|
|
16654
16669
|
var wA = new Ka(N || this.boundingBox, _ || this.xStep, rA || this.yStep, this.gState, uA || this.matrix);
|
|
16655
16670
|
wA.stream = this.stream;
|
|
16656
16671
|
var RA = h + "$$" + this.cloneIndex++ + "$$";
|
|
16657
|
-
return
|
|
16672
|
+
return yA(RA, wA), wA;
|
|
16658
16673
|
}
|
|
16659
16674
|
var Su = function(h, N) {
|
|
16660
16675
|
var _ = or[h.key], rA = Ve[_];
|
|
@@ -20158,7 +20173,7 @@ function Pf(e) {
|
|
|
20158
20173
|
}
|
|
20159
20174
|
for (kA = 0, re = 0; re < 8; ++re) {
|
|
20160
20175
|
HA = NA[kA], LA = NA[kA + 8], PA = NA[kA + 16], le = NA[kA + 24], ue = NA[kA + 32], oe = NA[kA + 40], Ce = NA[kA + 48];
|
|
20161
|
-
var ae = HA + (Qe = NA[kA + 56]), JA = HA - Qe,
|
|
20176
|
+
var ae = HA + (Qe = NA[kA + 56]), JA = HA - Qe, yA = LA + Ce, me = LA - Ce, jA = PA + oe, ge = PA - oe, ot = le + ue, We = le - ue, be = ae + ot, He = ae - ot, st = yA + jA, Zt = yA - jA;
|
|
20162
20177
|
NA[kA] = be + st, NA[kA + 32] = be - st;
|
|
20163
20178
|
var je = 0.707106781 * (Zt + He);
|
|
20164
20179
|
NA[kA + 16] = He + je, NA[kA + 48] = He - je;
|
|
@@ -20663,7 +20678,7 @@ function Up(e) {
|
|
|
20663
20678
|
return 120 < c ? c - 120 : 1 <= (g = ((g = QB[c - 1]) >> 4) * s + (8 - (15 & g))) ? g : 1;
|
|
20664
20679
|
var g;
|
|
20665
20680
|
}
|
|
20666
|
-
function
|
|
20681
|
+
function yA(s, c, g) {
|
|
20667
20682
|
var y = Z(g), b = s[c += 255 & y].g - 8;
|
|
20668
20683
|
return 0 < b && (Y(g, g.u + 8), y = Z(g), c += s[c].value, c += y & (1 << b) - 1), Y(g, g.u + s[c].g), s[c].value;
|
|
20669
20684
|
}
|
|
@@ -20825,7 +20840,7 @@ function Up(e) {
|
|
|
20825
20840
|
var WA = hA, fe = FA.pd[Z(CA) & kt - 1];
|
|
20826
20841
|
A(FA.jc), 256 > fe.g ? (Y(CA, CA.u + fe.g), qA[WA] = fe.value, CA = 0) : (Y(CA, CA.u + fe.g - 256), A(256 <= fe.value), CA = fe.value), CA == 0 && (QA = !0);
|
|
20827
20842
|
} else
|
|
20828
|
-
CA =
|
|
20843
|
+
CA = yA(FA.G[0], FA.H[0], P);
|
|
20829
20844
|
if (P.h)
|
|
20830
20845
|
break;
|
|
20831
20846
|
if (QA || 256 > CA) {
|
|
@@ -20833,7 +20848,7 @@ function Up(e) {
|
|
|
20833
20848
|
if (FA.nd)
|
|
20834
20849
|
c[hA] = (FA.qb | CA << 8) >>> 0;
|
|
20835
20850
|
else {
|
|
20836
|
-
if (tA(P), QA =
|
|
20851
|
+
if (tA(P), QA = yA(FA.G[1], FA.H[1], P), tA(P), qA = yA(FA.G[2], FA.H[2], P), WA = yA(FA.G[3], FA.H[3], P), P.h)
|
|
20837
20852
|
break;
|
|
20838
20853
|
c[hA] = (WA << 24 | QA << 16 | CA << 8 | qA) >>> 0;
|
|
20839
20854
|
}
|
|
@@ -20841,7 +20856,7 @@ function Up(e) {
|
|
|
20841
20856
|
for (; dA < hA; )
|
|
20842
20857
|
CA = c[dA++], aA.X[(506832829 * CA & 4294967295) >>> aA.Mb] = CA;
|
|
20843
20858
|
} else if (280 > CA) {
|
|
20844
|
-
if (CA = ae(CA - 256, P), qA =
|
|
20859
|
+
if (CA = ae(CA - 256, P), qA = yA(FA.G[4], FA.H[4], P), tA(P), qA = JA(y, qA = ae(qA, P)), P.h)
|
|
20845
20860
|
break;
|
|
20846
20861
|
if (hA - g < qA || b - hA < CA)
|
|
20847
20862
|
break A;
|
|
@@ -21769,7 +21784,7 @@ function Up(e) {
|
|
|
21769
21784
|
e:
|
|
21770
21785
|
for (; ; ) {
|
|
21771
21786
|
for (; !iA.h && aA < FA; ) {
|
|
21772
|
-
if (P & QA || (CA = jA(hA, P, D)), A(CA != null), tA(iA), 256 > (mA =
|
|
21787
|
+
if (P & QA || (CA = jA(hA, P, D)), A(CA != null), tA(iA), 256 > (mA = yA(CA.G[0], CA.H[0], iA)))
|
|
21773
21788
|
M[dA + aA] = mA, ++aA, ++P >= lA && (P = 0, ++D <= c && !(D % 16) && He(T, D));
|
|
21774
21789
|
else {
|
|
21775
21790
|
if (!(280 > mA)) {
|
|
@@ -21777,7 +21792,7 @@ function Up(e) {
|
|
|
21777
21792
|
break e;
|
|
21778
21793
|
}
|
|
21779
21794
|
mA = ae(mA - 256, iA);
|
|
21780
|
-
var qA, WA =
|
|
21795
|
+
var qA, WA = yA(CA.G[4], CA.H[4], iA);
|
|
21781
21796
|
if (tA(iA), !(aA >= (WA = JA(lA, WA = ae(WA, iA))) && sA - aA >= mA)) {
|
|
21782
21797
|
EA = 0;
|
|
21783
21798
|
break e;
|
|
@@ -22792,7 +22807,7 @@ function(e) {
|
|
|
22792
22807
|
*/
|
|
22793
22808
|
function(e) {
|
|
22794
22809
|
function A() {
|
|
22795
|
-
return (pe.canvg ? Promise.resolve(pe.canvg) : import("./index.es-
|
|
22810
|
+
return (pe.canvg ? Promise.resolve(pe.canvg) : import("./index.es-8a02aa05.mjs")).catch(function(t) {
|
|
22796
22811
|
return Promise.reject(new Error("Could not load canvg: " + t));
|
|
22797
22812
|
}).then(function(t) {
|
|
22798
22813
|
return t.default ? t.default : t;
|