提交 f2f0556c 编写于 作者: Cano1997's avatar Cano1997

update: 更新插件

上级 ad854d32
......@@ -1714,9 +1714,9 @@ var ts = function(r, A) {
o = null;
}
}
return r.map(function(Q, E) {
return r.map(function(Q, v) {
var w = Q.color;
return { color: w, stop: Math.max(Math.min(1, s[E] / A), 0) };
return { color: w, stop: Math.max(Math.min(1, s[v] / A), 0) };
});
}, HB = function(r, A, e) {
var t = A / 2, s = e / 2, n = O(r[0], A) - t, i = s - O(r[1], e);
......@@ -4130,15 +4130,15 @@ var pc = 1, kt = 2, _t = 3, us = 4, gs = 5, Ec = 7, ws = 8, Xt = 9, Jt = 10, Qs
var f = l.values.filter(x);
f.length && o.appendChild(a.createTextNode(A.getAttribute(f[0].value) || ""));
} else if (l.name === "counter") {
var g = l.values.filter(ae), Q = g[0], E = g[1];
var g = l.values.filter(ae), Q = g[0], v = g[1];
if (Q && x(Q)) {
var w = n.counters.getCounterValue(Q.value), h = E && x(E) ? wr.parse(n.context, E.value) : 3;
var w = n.counters.getCounterValue(Q.value), h = v && x(v) ? wr.parse(n.context, v.value) : 3;
o.appendChild(a.createTextNode(be(w, h, !1)));
}
} else if (l.name === "counters") {
var v = l.values.filter(ae), Q = v[0], H = v[1], E = v[2];
var E = l.values.filter(ae), Q = E[0], H = E[1], v = E[2];
if (Q && x(Q)) {
var m = n.counters.getCounterValues(Q.value), d = E && x(E) ? wr.parse(n.context, E.value) : 3, L = H && H.type === 0 ? H.value : "", b = m.map(function(y) {
var m = n.counters.getCounterValues(Q.value), d = v && x(v) ? wr.parse(n.context, v.value) : 3, L = H && H.type === 0 ? H.value : "", b = m.map(function(y) {
return be(y, d, !1);
}).join(L);
o.appendChild(a.createTextNode(b));
......@@ -4363,12 +4363,12 @@ var ol = function(r, A) {
/** @class */
function() {
function r(A) {
var e = A.styles, t = A.bounds, s = de(e.borderTopLeftRadius, t.width, t.height), n = s[0], i = s[1], a = de(e.borderTopRightRadius, t.width, t.height), B = a[0], o = a[1], c = de(e.borderBottomRightRadius, t.width, t.height), l = c[0], u = c[1], f = de(e.borderBottomLeftRadius, t.width, t.height), g = f[0], Q = f[1], E = [];
E.push((n + B) / t.width), E.push((g + l) / t.width), E.push((i + Q) / t.height), E.push((o + u) / t.height);
var w = Math.max.apply(Math, E);
var e = A.styles, t = A.bounds, s = de(e.borderTopLeftRadius, t.width, t.height), n = s[0], i = s[1], a = de(e.borderTopRightRadius, t.width, t.height), B = a[0], o = a[1], c = de(e.borderBottomRightRadius, t.width, t.height), l = c[0], u = c[1], f = de(e.borderBottomLeftRadius, t.width, t.height), g = f[0], Q = f[1], v = [];
v.push((n + B) / t.width), v.push((g + l) / t.width), v.push((i + Q) / t.height), v.push((o + u) / t.height);
var w = Math.max.apply(Math, v);
w > 1 && (n /= w, i /= w, B /= w, o /= w, l /= w, u /= w, g /= w, Q /= w);
var h = t.width - B, v = t.height - u, H = t.width - l, m = t.height - Q, d = e.borderTopWidth, L = e.borderRightWidth, b = e.borderBottomWidth, C = e.borderLeftWidth, p = O(e.paddingTop, A.bounds.width), y = O(e.paddingRight, A.bounds.width), D = O(e.paddingBottom, A.bounds.width), I = O(e.paddingLeft, A.bounds.width);
this.topLeftBorderDoubleOuterBox = n > 0 || i > 0 ? R(t.left + C / 3, t.top + d / 3, n - C / 3, i - d / 3, S.TOP_LEFT) : new U(t.left + C / 3, t.top + d / 3), this.topRightBorderDoubleOuterBox = n > 0 || i > 0 ? R(t.left + h, t.top + d / 3, B - L / 3, o - d / 3, S.TOP_RIGHT) : new U(t.left + t.width - L / 3, t.top + d / 3), this.bottomRightBorderDoubleOuterBox = l > 0 || u > 0 ? R(t.left + H, t.top + v, l - L / 3, u - b / 3, S.BOTTOM_RIGHT) : new U(t.left + t.width - L / 3, t.top + t.height - b / 3), this.bottomLeftBorderDoubleOuterBox = g > 0 || Q > 0 ? R(t.left + C / 3, t.top + m, g - C / 3, Q - b / 3, S.BOTTOM_LEFT) : new U(t.left + C / 3, t.top + t.height - b / 3), this.topLeftBorderDoubleInnerBox = n > 0 || i > 0 ? R(t.left + C * 2 / 3, t.top + d * 2 / 3, n - C * 2 / 3, i - d * 2 / 3, S.TOP_LEFT) : new U(t.left + C * 2 / 3, t.top + d * 2 / 3), this.topRightBorderDoubleInnerBox = n > 0 || i > 0 ? R(t.left + h, t.top + d * 2 / 3, B - L * 2 / 3, o - d * 2 / 3, S.TOP_RIGHT) : new U(t.left + t.width - L * 2 / 3, t.top + d * 2 / 3), this.bottomRightBorderDoubleInnerBox = l > 0 || u > 0 ? R(t.left + H, t.top + v, l - L * 2 / 3, u - b * 2 / 3, S.BOTTOM_RIGHT) : new U(t.left + t.width - L * 2 / 3, t.top + t.height - b * 2 / 3), this.bottomLeftBorderDoubleInnerBox = g > 0 || Q > 0 ? R(t.left + C * 2 / 3, t.top + m, g - C * 2 / 3, Q - b * 2 / 3, S.BOTTOM_LEFT) : new U(t.left + C * 2 / 3, t.top + t.height - b * 2 / 3), this.topLeftBorderStroke = n > 0 || i > 0 ? R(t.left + C / 2, t.top + d / 2, n - C / 2, i - d / 2, S.TOP_LEFT) : new U(t.left + C / 2, t.top + d / 2), this.topRightBorderStroke = n > 0 || i > 0 ? R(t.left + h, t.top + d / 2, B - L / 2, o - d / 2, S.TOP_RIGHT) : new U(t.left + t.width - L / 2, t.top + d / 2), this.bottomRightBorderStroke = l > 0 || u > 0 ? R(t.left + H, t.top + v, l - L / 2, u - b / 2, S.BOTTOM_RIGHT) : new U(t.left + t.width - L / 2, t.top + t.height - b / 2), this.bottomLeftBorderStroke = g > 0 || Q > 0 ? R(t.left + C / 2, t.top + m, g - C / 2, Q - b / 2, S.BOTTOM_LEFT) : new U(t.left + C / 2, t.top + t.height - b / 2), this.topLeftBorderBox = n > 0 || i > 0 ? R(t.left, t.top, n, i, S.TOP_LEFT) : new U(t.left, t.top), this.topRightBorderBox = B > 0 || o > 0 ? R(t.left + h, t.top, B, o, S.TOP_RIGHT) : new U(t.left + t.width, t.top), this.bottomRightBorderBox = l > 0 || u > 0 ? R(t.left + H, t.top + v, l, u, S.BOTTOM_RIGHT) : new U(t.left + t.width, t.top + t.height), this.bottomLeftBorderBox = g > 0 || Q > 0 ? R(t.left, t.top + m, g, Q, S.BOTTOM_LEFT) : new U(t.left, t.top + t.height), this.topLeftPaddingBox = n > 0 || i > 0 ? R(t.left + C, t.top + d, Math.max(0, n - C), Math.max(0, i - d), S.TOP_LEFT) : new U(t.left + C, t.top + d), this.topRightPaddingBox = B > 0 || o > 0 ? R(t.left + Math.min(h, t.width - L), t.top + d, h > t.width + L ? 0 : Math.max(0, B - L), Math.max(0, o - d), S.TOP_RIGHT) : new U(t.left + t.width - L, t.top + d), this.bottomRightPaddingBox = l > 0 || u > 0 ? R(t.left + Math.min(H, t.width - C), t.top + Math.min(v, t.height - b), Math.max(0, l - L), Math.max(0, u - b), S.BOTTOM_RIGHT) : new U(t.left + t.width - L, t.top + t.height - b), this.bottomLeftPaddingBox = g > 0 || Q > 0 ? R(t.left + C, t.top + Math.min(m, t.height - b), Math.max(0, g - C), Math.max(0, Q - b), S.BOTTOM_LEFT) : new U(t.left + C, t.top + t.height - b), this.topLeftContentBox = n > 0 || i > 0 ? R(t.left + C + I, t.top + d + p, Math.max(0, n - (C + I)), Math.max(0, i - (d + p)), S.TOP_LEFT) : new U(t.left + C + I, t.top + d + p), this.topRightContentBox = B > 0 || o > 0 ? R(t.left + Math.min(h, t.width + C + I), t.top + d + p, h > t.width + C + I ? 0 : B - C + I, o - (d + p), S.TOP_RIGHT) : new U(t.left + t.width - (L + y), t.top + d + p), this.bottomRightContentBox = l > 0 || u > 0 ? R(t.left + Math.min(H, t.width - (C + I)), t.top + Math.min(v, t.height + d + p), Math.max(0, l - (L + y)), u - (b + D), S.BOTTOM_RIGHT) : new U(t.left + t.width - (L + y), t.top + t.height - (b + D)), this.bottomLeftContentBox = g > 0 || Q > 0 ? R(t.left + C + I, t.top + m, Math.max(0, g - (C + I)), Q - (b + D), S.BOTTOM_LEFT) : new U(t.left + C + I, t.top + t.height - (b + D));
var h = t.width - B, E = t.height - u, H = t.width - l, m = t.height - Q, d = e.borderTopWidth, L = e.borderRightWidth, b = e.borderBottomWidth, C = e.borderLeftWidth, p = O(e.paddingTop, A.bounds.width), y = O(e.paddingRight, A.bounds.width), D = O(e.paddingBottom, A.bounds.width), I = O(e.paddingLeft, A.bounds.width);
this.topLeftBorderDoubleOuterBox = n > 0 || i > 0 ? R(t.left + C / 3, t.top + d / 3, n - C / 3, i - d / 3, S.TOP_LEFT) : new U(t.left + C / 3, t.top + d / 3), this.topRightBorderDoubleOuterBox = n > 0 || i > 0 ? R(t.left + h, t.top + d / 3, B - L / 3, o - d / 3, S.TOP_RIGHT) : new U(t.left + t.width - L / 3, t.top + d / 3), this.bottomRightBorderDoubleOuterBox = l > 0 || u > 0 ? R(t.left + H, t.top + E, l - L / 3, u - b / 3, S.BOTTOM_RIGHT) : new U(t.left + t.width - L / 3, t.top + t.height - b / 3), this.bottomLeftBorderDoubleOuterBox = g > 0 || Q > 0 ? R(t.left + C / 3, t.top + m, g - C / 3, Q - b / 3, S.BOTTOM_LEFT) : new U(t.left + C / 3, t.top + t.height - b / 3), this.topLeftBorderDoubleInnerBox = n > 0 || i > 0 ? R(t.left + C * 2 / 3, t.top + d * 2 / 3, n - C * 2 / 3, i - d * 2 / 3, S.TOP_LEFT) : new U(t.left + C * 2 / 3, t.top + d * 2 / 3), this.topRightBorderDoubleInnerBox = n > 0 || i > 0 ? R(t.left + h, t.top + d * 2 / 3, B - L * 2 / 3, o - d * 2 / 3, S.TOP_RIGHT) : new U(t.left + t.width - L * 2 / 3, t.top + d * 2 / 3), this.bottomRightBorderDoubleInnerBox = l > 0 || u > 0 ? R(t.left + H, t.top + E, l - L * 2 / 3, u - b * 2 / 3, S.BOTTOM_RIGHT) : new U(t.left + t.width - L * 2 / 3, t.top + t.height - b * 2 / 3), this.bottomLeftBorderDoubleInnerBox = g > 0 || Q > 0 ? R(t.left + C * 2 / 3, t.top + m, g - C * 2 / 3, Q - b * 2 / 3, S.BOTTOM_LEFT) : new U(t.left + C * 2 / 3, t.top + t.height - b * 2 / 3), this.topLeftBorderStroke = n > 0 || i > 0 ? R(t.left + C / 2, t.top + d / 2, n - C / 2, i - d / 2, S.TOP_LEFT) : new U(t.left + C / 2, t.top + d / 2), this.topRightBorderStroke = n > 0 || i > 0 ? R(t.left + h, t.top + d / 2, B - L / 2, o - d / 2, S.TOP_RIGHT) : new U(t.left + t.width - L / 2, t.top + d / 2), this.bottomRightBorderStroke = l > 0 || u > 0 ? R(t.left + H, t.top + E, l - L / 2, u - b / 2, S.BOTTOM_RIGHT) : new U(t.left + t.width - L / 2, t.top + t.height - b / 2), this.bottomLeftBorderStroke = g > 0 || Q > 0 ? R(t.left + C / 2, t.top + m, g - C / 2, Q - b / 2, S.BOTTOM_LEFT) : new U(t.left + C / 2, t.top + t.height - b / 2), this.topLeftBorderBox = n > 0 || i > 0 ? R(t.left, t.top, n, i, S.TOP_LEFT) : new U(t.left, t.top), this.topRightBorderBox = B > 0 || o > 0 ? R(t.left + h, t.top, B, o, S.TOP_RIGHT) : new U(t.left + t.width, t.top), this.bottomRightBorderBox = l > 0 || u > 0 ? R(t.left + H, t.top + E, l, u, S.BOTTOM_RIGHT) : new U(t.left + t.width, t.top + t.height), this.bottomLeftBorderBox = g > 0 || Q > 0 ? R(t.left, t.top + m, g, Q, S.BOTTOM_LEFT) : new U(t.left, t.top + t.height), this.topLeftPaddingBox = n > 0 || i > 0 ? R(t.left + C, t.top + d, Math.max(0, n - C), Math.max(0, i - d), S.TOP_LEFT) : new U(t.left + C, t.top + d), this.topRightPaddingBox = B > 0 || o > 0 ? R(t.left + Math.min(h, t.width - L), t.top + d, h > t.width + L ? 0 : Math.max(0, B - L), Math.max(0, o - d), S.TOP_RIGHT) : new U(t.left + t.width - L, t.top + d), this.bottomRightPaddingBox = l > 0 || u > 0 ? R(t.left + Math.min(H, t.width - C), t.top + Math.min(E, t.height - b), Math.max(0, l - L), Math.max(0, u - b), S.BOTTOM_RIGHT) : new U(t.left + t.width - L, t.top + t.height - b), this.bottomLeftPaddingBox = g > 0 || Q > 0 ? R(t.left + C, t.top + Math.min(m, t.height - b), Math.max(0, g - C), Math.max(0, Q - b), S.BOTTOM_LEFT) : new U(t.left + C, t.top + t.height - b), this.topLeftContentBox = n > 0 || i > 0 ? R(t.left + C + I, t.top + d + p, Math.max(0, n - (C + I)), Math.max(0, i - (d + p)), S.TOP_LEFT) : new U(t.left + C + I, t.top + d + p), this.topRightContentBox = B > 0 || o > 0 ? R(t.left + Math.min(h, t.width + C + I), t.top + d + p, h > t.width + C + I ? 0 : B - C + I, o - (d + p), S.TOP_RIGHT) : new U(t.left + t.width - (L + y), t.top + d + p), this.bottomRightContentBox = l > 0 || u > 0 ? R(t.left + Math.min(H, t.width - (C + I)), t.top + Math.min(E, t.height + d + p), Math.max(0, l - (L + y)), u - (b + D), S.BOTTOM_RIGHT) : new U(t.left + t.width - (L + y), t.top + t.height - (b + D)), this.bottomLeftContentBox = g > 0 || Q > 0 ? R(t.left + C + I, t.top + m, Math.max(0, g - (C + I)), Q - (b + D), S.BOTTOM_LEFT) : new U(t.left + C + I, t.top + t.height - (b + D));
}
return r;
}()
......@@ -4668,16 +4668,16 @@ var R = function(r, A, e, t, s) {
var f = c ? t : s * n, g = l ? s : t / n;
return [f, g];
}
var Q = c ? t : e.width, E = l ? s : e.height;
return [Q, E];
var Q = c ? t : e.width, v = l ? s : e.height;
return [Q, v];
}
if (B) {
var w = 0, h = 0;
return P(i) ? w = O(i, e.width) : P(a) && (h = O(a, e.height)), te(i) ? w = h * n : (!a || te(a)) && (h = w / n), [w, h];
}
var v = null, H = null;
if (P(i) ? v = O(i, e.width) : a && P(a) && (H = O(a, e.height)), v !== null && (!a || te(a)) && (H = c && l ? v / t * s : e.height), H !== null && te(i) && (v = c && l ? H / s * t : e.width), v !== null && H !== null)
return [v, H];
var E = null, H = null;
if (P(i) ? E = O(i, e.width) : a && P(a) && (H = O(a, e.height)), E !== null && (!a || te(a)) && (H = c && l ? E / t * s : e.height), H !== null && te(i) && (E = c && l ? H / s * t : e.width), E !== null && H !== null)
return [E, H];
throw new Error("Unable to calculate background-size for element");
}, se = function(r, A) {
var e = r[A];
......@@ -4827,8 +4827,8 @@ var R = function(r, A, e, t, s) {
switch (Q) {
case 0:
u.ctx.fillStyle = X(t.color), u.renderTextWithLetterSpacing(g, t.letterSpacing, o);
var E = t.textShadow;
E.length && g.text.trim().length && (E.slice(0).reverse().forEach(function(w) {
var v = t.textShadow;
v.length && g.text.trim().length && (v.slice(0).reverse().forEach(function(w) {
u.ctx.shadowColor = X(w.color), u.ctx.shadowOffsetX = w.offsetX.number * u.options.scale, u.ctx.shadowOffsetY = w.offsetY.number * u.options.scale, u.ctx.shadowBlur = w.blur.number, u.renderTextWithLetterSpacing(g, t.letterSpacing, o);
}), u.ctx.shadowColor = "", u.ctx.shadowOffsetX = 0, u.ctx.shadowOffsetY = 0, u.ctx.shadowBlur = 0), t.textDecorationLine.length && (u.ctx.fillStyle = X(t.textDecorationColor || t.color), t.textDecorationLine.forEach(function(w) {
switch (w) {
......@@ -4862,7 +4862,7 @@ var R = function(r, A, e, t, s) {
}
}, A.prototype.renderNodeContent = function(e) {
return q(this, void 0, void 0, function() {
var t, s, n, i, a, B, h, h, o, c, l, u, H, f, g, m, Q, E, w, h, v, H, m;
var t, s, n, i, a, B, h, h, o, c, l, u, H, f, g, m, Q, v, w, h, E, H, m;
return Z(this, function(d) {
switch (d.label) {
case 0:
......@@ -4925,12 +4925,12 @@ var R = function(r, A, e, t, s) {
Q += m.width;
break;
}
E = m.add(Q, 0, 0, -m.height / 2 + 1), this.ctx.save(), this.path([
v = m.add(Q, 0, 0, -m.height / 2 + 1), this.ctx.save(), this.path([
new U(m.left, m.top),
new U(m.left + m.width, m.top),
new U(m.left + m.width, m.top + m.height),
new U(m.left, m.top + m.height)
]), this.ctx.clip(), this.renderTextWithLetterSpacing(new me(t.value, E), n.letterSpacing, g), this.ctx.restore(), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = "left";
]), this.ctx.clip(), this.renderTextWithLetterSpacing(new me(t.value, v), n.letterSpacing, g), this.ctx.restore(), this.ctx.textBaseline = "alphabetic", this.ctx.textAlign = "left";
}
if (!k(
t.styles.display,
......@@ -4942,13 +4942,13 @@ var R = function(r, A, e, t, s) {
return [3, 19];
if (w = t.styles.listStyleImage, w.type !== 0)
return [3, 18];
h = void 0, v = w.url, d.label = 15;
h = void 0, E = w.url, d.label = 15;
case 15:
return d.trys.push([15, 17, , 18]), [4, this.context.cache.match(v)];
return d.trys.push([15, 17, , 18]), [4, this.context.cache.match(E)];
case 16:
return h = d.sent(), this.ctx.drawImage(h, t.bounds.left - (h.width + 10), t.bounds.top), [3, 18];
case 17:
return d.sent(), this.context.logger.error("Error loading list-style-image " + v), [3, 18];
return d.sent(), this.context.logger.error("Error loading list-style-image " + E), [3, 18];
case 18:
return [3, 20];
case 19:
......@@ -4963,7 +4963,7 @@ var R = function(r, A, e, t, s) {
});
}, A.prototype.renderStackContent = function(e) {
return q(this, void 0, void 0, function() {
var t, s, w, n, i, w, a, B, w, o, c, w, l, u, w, f, g, w, Q, E, w;
var t, s, w, n, i, w, a, B, w, o, c, w, l, u, w, f, g, w, Q, v, w;
return Z(this, function(h) {
switch (h.label) {
case 0:
......@@ -5025,9 +5025,9 @@ var R = function(r, A, e, t, s) {
case 25:
return f++, [3, 23];
case 26:
Q = 0, E = e.positiveZIndex, h.label = 27;
Q = 0, v = e.positiveZIndex, h.label = 27;
case 27:
return Q < E.length ? (w = E[Q], [4, this.renderStack(w)]) : [3, 30];
return Q < v.length ? (w = v[Q], [4, this.renderStack(w)]) : [3, 30];
case 28:
h.sent(), h.label = 29;
case 29:
......@@ -5067,7 +5067,7 @@ var R = function(r, A, e, t, s) {
switch (o.label) {
case 0:
t = e.styles.backgroundImage.length - 1, s = function(c) {
var l, u, f, p, $, Y, I, G, b, g, p, $, Y, I, G, Q, E, w, h, v, H, m, d, L, b, C, p, y, D, I, G, eA, $, Y, oA, gA, LA, GA, NA, UA, VA, FA;
var l, u, f, p, $, Y, I, G, b, g, p, $, Y, I, G, Q, v, w, h, E, H, m, d, L, b, C, p, y, D, I, G, eA, $, Y, oA, gA, LA, GA, NA, UA, VA, FA;
return Z(this, function(zA) {
switch (zA.label) {
case 0:
......@@ -5087,7 +5087,7 @@ var R = function(r, A, e, t, s) {
l.width / l.height
]), p = f[0], $ = f[1], Y = f[2], I = f[3], G = f[4], b = n.ctx.createPattern(n.resizeImage(l, I, G), "repeat"), n.renderRepeat(p, b, $, Y)), [3, 6];
case 5:
KB(c) ? (g = qt(e, t, [null, null, null]), p = g[0], $ = g[1], Y = g[2], I = g[3], G = g[4], Q = mB(c.angle, I, G), E = Q[0], w = Q[1], h = Q[2], v = Q[3], H = Q[4], m = document.createElement("canvas"), m.width = I, m.height = G, d = m.getContext("2d"), L = d.createLinearGradient(w, v, h, H), rs(c.stops, E).forEach(function(oe) {
KB(c) ? (g = qt(e, t, [null, null, null]), p = g[0], $ = g[1], Y = g[2], I = g[3], G = g[4], Q = mB(c.angle, I, G), v = Q[0], w = Q[1], h = Q[2], E = Q[3], H = Q[4], m = document.createElement("canvas"), m.width = I, m.height = G, d = m.getContext("2d"), L = d.createLinearGradient(w, E, h, H), rs(c.stops, v).forEach(function(oe) {
return L.addColorStop(oe.stop, X(oe.color));
}), d.fillStyle = L, d.fillRect(0, 0, I, G), I > 0 && G > 0 && (b = n.ctx.createPattern(m, "repeat"), n.renderRepeat(p, b, $, Y))) : DB(c) && (C = qt(e, t, [
null,
......@@ -5165,8 +5165,8 @@ var R = function(r, A, e, t, s) {
case 1:
u.sent(), this.ctx.restore(), t.boxShadow.slice(0).reverse().forEach(function(f) {
l.ctx.save();
var g = wt(e.curves), Q = f.inset ? 0 : Xl, E = Tl(g, -Q + (f.inset ? 1 : -1) * f.spread.number, (f.inset ? 1 : -1) * f.spread.number, f.spread.number * (f.inset ? -2 : 2), f.spread.number * (f.inset ? -2 : 2));
f.inset ? (l.path(g), l.ctx.clip(), l.mask(E)) : (l.mask(g), l.ctx.clip(), l.path(E)), l.ctx.shadowOffsetX = f.offsetX.number + Q, l.ctx.shadowOffsetY = f.offsetY.number, l.ctx.shadowColor = X(f.color), l.ctx.shadowBlur = f.blur.number, l.ctx.fillStyle = f.inset ? X(f.color) : "rgba(0,0,0,1)", l.ctx.fill(), l.ctx.restore();
var g = wt(e.curves), Q = f.inset ? 0 : Xl, v = Tl(g, -Q + (f.inset ? 1 : -1) * f.spread.number, (f.inset ? 1 : -1) * f.spread.number, f.spread.number * (f.inset ? -2 : 2), f.spread.number * (f.inset ? -2 : 2));
f.inset ? (l.path(g), l.ctx.clip(), l.mask(v)) : (l.mask(g), l.ctx.clip(), l.path(v)), l.ctx.shadowOffsetX = f.offsetX.number + Q, l.ctx.shadowOffsetY = f.offsetY.number, l.ctx.shadowColor = X(f.color), l.ctx.shadowBlur = f.blur.number, l.ctx.fillStyle = f.inset ? X(f.color) : "rgba(0,0,0,1)", l.ctx.fill(), l.ctx.restore();
}), u.label = 2;
case 2:
a = 0, B = 0, o = n, u.label = 3;
......@@ -5214,9 +5214,9 @@ var R = function(r, A, e, t, s) {
});
}, A.prototype.renderDashedDottedBorder = function(e, t, s, n, i) {
return q(this, void 0, void 0, function() {
var a, B, o, c, l, u, f, g, Q, E, w, h, v, H, m, d, m, d;
var a, B, o, c, l, u, f, g, Q, v, w, h, E, H, m, d, m, d;
return Z(this, function(L) {
return this.ctx.save(), a = Rl(n, s), B = Ts(n, s), i === 2 && (this.path(B), this.ctx.clip()), iA(B[0]) ? (o = B[0].start.x, c = B[0].start.y) : (o = B[0].x, c = B[0].y), iA(B[1]) ? (l = B[1].end.x, u = B[1].end.y) : (l = B[1].x, u = B[1].y), s === 0 || s === 2 ? f = Math.abs(o - l) : f = Math.abs(c - u), this.ctx.beginPath(), i === 3 ? this.formatPath(a) : this.formatPath(B.slice(0, 2)), g = t < 3 ? t * 3 : t * 2, Q = t < 3 ? t * 2 : t, i === 3 && (g = t, Q = t), E = !0, f <= g * 2 ? E = !1 : f <= g * 2 + Q ? (w = f / (2 * g + Q), g *= w, Q *= w) : (h = Math.floor((f + Q) / (g + Q)), v = (f - h * g) / (h - 1), H = (f - (h + 1) * g) / h, Q = H <= 0 || Math.abs(Q - v) < Math.abs(Q - H) ? v : H), E && (i === 3 ? this.ctx.setLineDash([0, g + Q]) : this.ctx.setLineDash([g, Q])), i === 3 ? (this.ctx.lineCap = "round", this.ctx.lineWidth = t) : this.ctx.lineWidth = t * 2 + 1.1, this.ctx.strokeStyle = X(e), this.ctx.stroke(), this.ctx.setLineDash([]), i === 2 && (iA(B[0]) && (m = B[3], d = B[0], this.ctx.beginPath(), this.formatPath([new U(m.end.x, m.end.y), new U(d.start.x, d.start.y)]), this.ctx.stroke()), iA(B[1]) && (m = B[1], d = B[2], this.ctx.beginPath(), this.formatPath([new U(m.end.x, m.end.y), new U(d.start.x, d.start.y)]), this.ctx.stroke())), this.ctx.restore(), [
return this.ctx.save(), a = Rl(n, s), B = Ts(n, s), i === 2 && (this.path(B), this.ctx.clip()), iA(B[0]) ? (o = B[0].start.x, c = B[0].start.y) : (o = B[0].x, c = B[0].y), iA(B[1]) ? (l = B[1].end.x, u = B[1].end.y) : (l = B[1].x, u = B[1].y), s === 0 || s === 2 ? f = Math.abs(o - l) : f = Math.abs(c - u), this.ctx.beginPath(), i === 3 ? this.formatPath(a) : this.formatPath(B.slice(0, 2)), g = t < 3 ? t * 3 : t * 2, Q = t < 3 ? t * 2 : t, i === 3 && (g = t, Q = t), v = !0, f <= g * 2 ? v = !1 : f <= g * 2 + Q ? (w = f / (2 * g + Q), g *= w, Q *= w) : (h = Math.floor((f + Q) / (g + Q)), E = (f - h * g) / (h - 1), H = (f - (h + 1) * g) / h, Q = H <= 0 || Math.abs(Q - E) < Math.abs(Q - H) ? E : H), v && (i === 3 ? this.ctx.setLineDash([0, g + Q]) : this.ctx.setLineDash([g, Q])), i === 3 ? (this.ctx.lineCap = "round", this.ctx.lineWidth = t) : this.ctx.lineWidth = t * 2 + 1.1, this.ctx.strokeStyle = X(e), this.ctx.stroke(), this.ctx.setLineDash([]), i === 2 && (iA(B[0]) && (m = B[3], d = B[0], this.ctx.beginPath(), this.formatPath([new U(m.end.x, m.end.y), new U(d.start.x, d.start.y)]), this.ctx.stroke()), iA(B[1]) && (m = B[1], d = B[2], this.ctx.beginPath(), this.formatPath([new U(m.end.x, m.end.y), new U(d.start.x, d.start.y)]), this.ctx.stroke())), this.ctx.restore(), [
2
/*return*/
];
......@@ -5333,7 +5333,7 @@ var R = function(r, A, e, t, s) {
typeof window < "u" && _n.setContext(window);
var ru = function(r, A) {
return q(void 0, void 0, void 0, function() {
var e, t, s, n, i, a, B, o, c, l, u, f, g, Q, E, w, h, v, H, m, L, d, L, b, C, p, y, D, I, G, eA, $, Y, oA, gA, LA, GA, NA, UA, VA;
var e, t, s, n, i, a, B, o, c, l, u, f, g, Q, v, w, h, E, H, m, L, d, L, b, C, p, y, D, I, G, eA, $, Y, oA, gA, LA, GA, NA, UA, VA;
return Z(this, function(FA) {
switch (FA.label) {
case 0:
......@@ -5361,19 +5361,19 @@ var ru = function(r, A) {
copyStyles: o
}, B.logger.debug("Starting document clone with size " + a.width + "x" + a.height + " scrolled to " + -a.left + "," + -a.top), l = new Ks(B, r, c), u = l.clonedReferenceElement, u ? [4, l.toIFrame(e, a)] : [2, Promise.reject("Unable to find element in cloned iframe")];
case 1:
return f = FA.sent(), g = Sr(u) || sl(u) ? Si(u.ownerDocument) : Ft(B, u), Q = g.width, E = g.height, w = g.left, h = g.top, v = su(B, u, A.backgroundColor), H = {
return f = FA.sent(), g = Sr(u) || sl(u) ? Si(u.ownerDocument) : Ft(B, u), Q = g.width, v = g.height, w = g.left, h = g.top, E = su(B, u, A.backgroundColor), H = {
canvas: A.canvas,
backgroundColor: v,
backgroundColor: E,
scale: (gA = (oA = A.scale) !== null && oA !== void 0 ? oA : t.devicePixelRatio) !== null && gA !== void 0 ? gA : 1,
x: ((LA = A.x) !== null && LA !== void 0 ? LA : 0) + w,
y: ((GA = A.y) !== null && GA !== void 0 ? GA : 0) + h,
width: (NA = A.width) !== null && NA !== void 0 ? NA : Math.ceil(Q),
height: (UA = A.height) !== null && UA !== void 0 ? UA : Math.ceil(E)
height: (UA = A.height) !== null && UA !== void 0 ? UA : Math.ceil(v)
}, o ? (B.logger.debug("Document cloned, using foreign object rendering"), L = new jl(B, H), [4, L.render(u)]) : [3, 3];
case 2:
return m = FA.sent(), [3, 5];
case 3:
return B.logger.debug("Document cloned, element located at " + w + "," + h + " with size " + Q + "x" + E + " using computed rendering"), B.logger.debug("Starting DOM parsing"), d = Mn(B, u), v === d.styles.backgroundColor && (d.styles.backgroundColor = mA.TRANSPARENT), B.logger.debug("Starting renderer for element at " + H.x + "," + H.y + " with size " + H.width + "x" + H.height), L = new Jl(B, H), [4, L.render(d)];
return B.logger.debug("Document cloned, element located at " + w + "," + h + " with size " + Q + "x" + v + " using computed rendering"), B.logger.debug("Starting DOM parsing"), d = Mn(B, u), E === d.styles.backgroundColor && (d.styles.backgroundColor = mA.TRANSPARENT), B.logger.debug("Starting renderer for element at " + H.x + "," + H.y + " with size " + H.width + "x" + H.height), L = new Jl(B, H), [4, L.render(d)];
case 4:
m = FA.sent(), FA.label = 5;
case 5:
......@@ -5583,7 +5583,7 @@ function hu(r, A, e) {
response: { data: p, status: C.status }
// eslint-disable-next-line @typescript-eslint/no-explicit-any
});
}, E = (C) => {
}, v = (C) => {
if (r.disabled)
return;
const p = t.value.findIndex((y) => y.id === C.id);
......@@ -5591,7 +5591,7 @@ function hu(r, A, e) {
}, w = (C) => {
const y = (e.parent.form || e.parent.grid).model.appEntity.deName, D = `${C.id}|${y}|${r.data.srfkey}|${e.context.srfpersonid || e.context.srfuserid}`, I = `${ibiz.env.baseUrl}${ibiz.env.downloadFileUrl}?key=${window.btoa(D)}`;
e.fileDownload({ url: I, name: C.name });
}, h = M(!1), v = M(""), H = M("");
}, h = M(!1), E = M(""), H = M("");
return {
uploadUrl: n,
downloadUrl: i,
......@@ -5599,19 +5599,19 @@ function hu(r, A, e) {
files: t,
onDownload: w,
onError: Q,
onRemove: E,
onRemove: v,
onSuccess: g,
beforeUpload: f,
showModal: h,
modalTitle: v,
modalTitle: E,
iframeUrl: H,
onModalCancel: () => {
h.value = !1, v.value = "", H.value = "";
h.value = !1, E.value = "", H.value = "";
},
previewFile: (C) => {
if (!C.isPreview)
return;
v.value = C.name;
E.value = C.name;
const p = window.Environment.previewFileUrl;
if (p) {
const y = encodeURIComponent(
......@@ -5646,9 +5646,9 @@ const Cu = hA({
modalTitle: f,
iframeUrl: g,
onModalCancel: Q,
previewFile: E
} = hu(r, (h) => {
A("change", h);
previewFile: v
} = hu(r, (E) => {
A("change", E);
}, t), w = Qi(() => t.editorParams.showPreview ? t.editorParams.showPreview === "true" : window.Environment.kkviewon);
return {
ns: e,
......@@ -5665,7 +5665,9 @@ const Cu = hA({
modalTitle: f,
iframeUrl: g,
onModalCancel: Q,
previewFile: E,
onPreview: (E) => {
w.value && v(E);
},
showPreview: w
};
},
......@@ -5762,7 +5764,7 @@ const Cu = hA({
})])])])])]), r("div", {
class: this.ns.b("file-item-right-title"),
on: {
click: () => this.previewFile(A)
click: () => this.onPreview(A)
}
}, [A.name]), r("div", {
class: this.ns.b("file-item-right-action")
......@@ -5811,7 +5813,7 @@ const Cu = hA({
})])])])]), this.showPreview ? r("span", {
class: this.ns.e("icon-preview"),
on: {
click: () => this.previewFile(A)
click: () => this.onPreview(A)
}
}, [r("svg", {
attrs: {
......@@ -6032,7 +6034,7 @@ function qn(r) {
});
}, Q = (p) => {
e.value = e.value.filter((y) => y.status === "finished"), A.value = "done";
}, E = () => {
}, v = () => {
vi({
multiple: r.multiple,
accept: r.accept,
......@@ -6043,16 +6045,16 @@ function qn(r) {
error: g,
finish: Q
});
}, w = M(!1), h = M(""), v = M("");
}, w = M(!1), h = M(""), E = M("");
return {
selectFile: E,
selectFile: v,
fileList: e,
uploadState: A,
showModal: w,
modalTitle: h,
iframeUrl: v,
iframeUrl: E,
onModalCancel: () => {
w.value = !1, h.value = "", v.value = "";
w.value = !1, h.value = "", E.value = "";
},
previewFile: (p) => {
if (!p.isPreview)
......@@ -6067,7 +6069,7 @@ function qn(r) {
)}`
)
);
v.value = `${y}/onlinePreview?url=${D}`, window.open(v.value, "_blank");
E.value = `${y}/onlinePreview?url=${D}`, window.open(E.value, "_blank");
}
}
};
......@@ -6243,8 +6245,8 @@ const Fu = hA({
componentRef: c,
fileList: a,
deleteFile: (Q) => {
const E = a.value.findIndex((w) => w.id === Q.id);
a.value.splice(E, 1), l.value = !0;
const v = a.value.findIndex((w) => w.id === Q.id);
a.value.splice(v, 1), l.value = !0;
},
selectFile: o,
downloadFile: (Q) => {
......@@ -6310,7 +6312,7 @@ const pu = hA({
}), o = M(), c = async () => {
if (!o.value)
throw new ZA("容器元素不存在");
const l = o.value.$el, u = l.offsetHeight, f = ibiz.overlay.createPopover((E) => E(Fu, {
const l = o.value.$el, u = l.offsetHeight, f = ibiz.overlay.createPopover((v) => v(Fu, {
props: {
value: B.value,
uploadUrl: a.value,
......@@ -6336,11 +6338,11 @@ const pu = hA({
resultFiles: Q
} = await f.onWillDismiss();
if (g) {
const E = Q.length > 0 ? JSON.stringify(Q.map((w) => ({
const v = Q.length > 0 ? JSON.stringify(Q.map((w) => ({
name: w.name,
id: w.id
}))) : null;
A("change", E), A("rowSave");
A("change", v), A("rowSave");
}
};
return ui(o, "click", (l) => {
......@@ -6400,8 +6402,8 @@ const vu = hA({
});
const B = async (w) => {
const h = await t.calcFillDataItems(w);
h.length && h.forEach((v) => {
A("change", v.value, v.name);
h.length && h.forEach((E) => {
A("change", E.value, E.name);
}), t.valueItem && A("change", w[t.keyName], t.valueItem), A("change", w[t.textName]);
}, o = async () => {
const w = await t.openPickUpView(r.data);
......@@ -6409,8 +6411,8 @@ const vu = hA({
}, c = async () => {
await t.openLinkView(r.data);
}, l = async (w) => {
var h, v, H;
a.value && (w[t.textName] === s.value && (a.value.currentValue = s.value), (H = (v = (h = a.value.$refs) == null ? void 0 : h.select) == null ? void 0 : v.hideMenu) == null || H.call(v)), await B(w), i.value = !0, A("operate", !1);
var h, E, H;
a.value && (w[t.textName] === s.value && (a.value.currentValue = s.value), (H = (E = (h = a.value.$refs) == null ? void 0 : h.select) == null ? void 0 : E.hideMenu) == null || H.call(E)), await B(w), i.value = !0, A("operate", !1);
}, u = async (w) => {
if (t.model.appDataEntity) {
const h = await t.getServiceData(w, r.data);
......@@ -6419,8 +6421,8 @@ const vu = hA({
}, f = () => {
var h;
const w = (h = t.model.deACMode) == null ? void 0 : h.dataItems;
w != null && w.length && w.forEach((v) => {
A("change", null, v.name);
w != null && w.length && w.forEach((E) => {
A("change", null, E.name);
}), t.valueItem && A("change", null, t.valueItem), A("change", null);
}, g = (w) => {
A("operate", !0);
......@@ -6428,7 +6430,7 @@ const vu = hA({
u(h);
}, Q = () => {
A("operate", !1);
}, E = (t.linkView ? 1 : 0) + (t.pickupView ? 1 : 0);
}, v = (t.linkView ? 1 : 0) + (t.pickupView ? 1 : 0);
return {
ns: e,
c: t,
......@@ -6441,7 +6443,7 @@ const vu = hA({
onSearch: u,
onClear: f,
onFocus: g,
closeCircle: E,
closeCircle: v,
onBlur: Q
};
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册