gp-designer 1.0.77 → 1.0.78
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/gp-designer.es.js +205 -204
- package/dist/gp-designer.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gp-designer.es.js
CHANGED
@@ -1780,7 +1780,7 @@ function oc(A, e, t) {
|
|
1780
1780
|
throw new Error("Expected `=`");
|
1781
1781
|
s(2);
|
1782
1782
|
} else e.charCodeAt(t) === 61 && (w = HA.Equals, s(1));
|
1783
|
-
let y = "",
|
1783
|
+
let y = "", v = null;
|
1784
1784
|
if (w !== "exists") {
|
1785
1785
|
if (xs(e.charCodeAt(t))) {
|
1786
1786
|
const H = e.charCodeAt(t);
|
@@ -1798,7 +1798,7 @@ function oc(A, e, t) {
|
|
1798
1798
|
}
|
1799
1799
|
s(0);
|
1800
1800
|
const P = e.charCodeAt(t) | 32;
|
1801
|
-
P === 115 ? (
|
1801
|
+
P === 115 ? (v = !1, s(1)) : P === 105 && (v = !0, s(1));
|
1802
1802
|
}
|
1803
1803
|
if (e.charCodeAt(t) !== 93)
|
1804
1804
|
throw new Error("Attribute selector didn't terminate");
|
@@ -1809,7 +1809,7 @@ function oc(A, e, t) {
|
|
1809
1809
|
action: w,
|
1810
1810
|
value: y,
|
1811
1811
|
namespace: p,
|
1812
|
-
ignoreCase:
|
1812
|
+
ignoreCase: v
|
1813
1813
|
};
|
1814
1814
|
r.push(D);
|
1815
1815
|
break;
|
@@ -3366,9 +3366,9 @@ function jd(A, e) {
|
|
3366
3366
|
) : Array.isArray(l) ? (
|
3367
3367
|
// $([dom])
|
3368
3368
|
l
|
3369
|
-
) : void 0,
|
3369
|
+
) : void 0, v = new o(y, U, p);
|
3370
3370
|
if (y)
|
3371
|
-
return
|
3371
|
+
return v;
|
3372
3372
|
if (typeof l != "string")
|
3373
3373
|
throw new TypeError("Unexpected type of selector");
|
3374
3374
|
let D = l;
|
@@ -3388,7 +3388,7 @@ function jd(A, e) {
|
|
3388
3388
|
new o(Array.isArray(f) ? f : [f], U, p)
|
3389
3389
|
)
|
3390
3390
|
) : U;
|
3391
|
-
return P ? P.find(D) :
|
3391
|
+
return P ? P.find(D) : v;
|
3392
3392
|
}
|
3393
3393
|
return Object.assign(c, Gf, {
|
3394
3394
|
load: t,
|
@@ -3555,10 +3555,10 @@ class tB {
|
|
3555
3555
|
this.isEol = !1;
|
3556
3556
|
}
|
3557
3557
|
}
|
3558
|
-
var
|
3558
|
+
var sA;
|
3559
3559
|
(function(A) {
|
3560
3560
|
A[A.CHARACTER = 0] = "CHARACTER", A[A.NULL_CHARACTER = 1] = "NULL_CHARACTER", A[A.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", A[A.START_TAG = 3] = "START_TAG", A[A.END_TAG = 4] = "END_TAG", A[A.COMMENT = 5] = "COMMENT", A[A.DOCTYPE = 6] = "DOCTYPE", A[A.EOF = 7] = "EOF", A[A.HIBERNATION = 8] = "HIBERNATION";
|
3561
|
-
})(
|
3561
|
+
})(sA || (sA = {}));
|
3562
3562
|
function Sc(A, e) {
|
3563
3563
|
for (let t = A.attrs.length - 1; t >= 0; t--)
|
3564
3564
|
if (A.attrs[t].name === e)
|
@@ -3931,7 +3931,7 @@ let cB = class {
|
|
3931
3931
|
//Token creation
|
3932
3932
|
_createStartTagToken() {
|
3933
3933
|
this.currentToken = {
|
3934
|
-
type:
|
3934
|
+
type: sA.START_TAG,
|
3935
3935
|
tagName: "",
|
3936
3936
|
tagID: i.UNKNOWN,
|
3937
3937
|
selfClosing: !1,
|
@@ -3942,7 +3942,7 @@ let cB = class {
|
|
3942
3942
|
}
|
3943
3943
|
_createEndTagToken() {
|
3944
3944
|
this.currentToken = {
|
3945
|
-
type:
|
3945
|
+
type: sA.END_TAG,
|
3946
3946
|
tagName: "",
|
3947
3947
|
tagID: i.UNKNOWN,
|
3948
3948
|
selfClosing: !1,
|
@@ -3953,14 +3953,14 @@ let cB = class {
|
|
3953
3953
|
}
|
3954
3954
|
_createCommentToken(e) {
|
3955
3955
|
this.currentToken = {
|
3956
|
-
type:
|
3956
|
+
type: sA.COMMENT,
|
3957
3957
|
data: "",
|
3958
3958
|
location: this.getCurrentLocation(e)
|
3959
3959
|
};
|
3960
3960
|
}
|
3961
3961
|
_createDoctypeToken(e) {
|
3962
3962
|
this.currentToken = {
|
3963
|
-
type:
|
3963
|
+
type: sA.DOCTYPE,
|
3964
3964
|
name: e,
|
3965
3965
|
forceQuirks: !1,
|
3966
3966
|
publicId: null,
|
@@ -4002,7 +4002,7 @@ let cB = class {
|
|
4002
4002
|
}
|
4003
4003
|
emitCurrentTagToken() {
|
4004
4004
|
const e = this.currentToken;
|
4005
|
-
this.prepareToken(e), e.tagID = fs(e.tagName), e.type ===
|
4005
|
+
this.prepareToken(e), e.tagID = fs(e.tagName), e.type === sA.START_TAG ? (this.lastStartTagName = e.tagName, this.handler.onStartTag(e)) : (e.attrs.length > 0 && this._err(b.endTagWithAttributes), e.selfClosing && this._err(b.endTagWithTrailingSolidus), this.handler.onEndTag(e)), this.preprocessor.dropParsedChunk();
|
4006
4006
|
}
|
4007
4007
|
emitCurrentComment(e) {
|
4008
4008
|
this.prepareToken(e), this.handler.onComment(e), this.preprocessor.dropParsedChunk();
|
@@ -4013,15 +4013,15 @@ let cB = class {
|
|
4013
4013
|
_emitCurrentCharacterToken(e) {
|
4014
4014
|
if (this.currentCharacterToken) {
|
4015
4015
|
switch (e && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = e.startLine, this.currentCharacterToken.location.endCol = e.startCol, this.currentCharacterToken.location.endOffset = e.startOffset), this.currentCharacterToken.type) {
|
4016
|
-
case
|
4016
|
+
case sA.CHARACTER: {
|
4017
4017
|
this.handler.onCharacter(this.currentCharacterToken);
|
4018
4018
|
break;
|
4019
4019
|
}
|
4020
|
-
case
|
4020
|
+
case sA.NULL_CHARACTER: {
|
4021
4021
|
this.handler.onNullCharacter(this.currentCharacterToken);
|
4022
4022
|
break;
|
4023
4023
|
}
|
4024
|
-
case
|
4024
|
+
case sA.WHITESPACE_CHARACTER: {
|
4025
4025
|
this.handler.onWhitespaceCharacter(this.currentCharacterToken);
|
4026
4026
|
break;
|
4027
4027
|
}
|
@@ -4031,7 +4031,7 @@ let cB = class {
|
|
4031
4031
|
}
|
4032
4032
|
_emitEOFToken() {
|
4033
4033
|
const e = this.getCurrentLocation(0);
|
4034
|
-
e && (e.endLine = e.startLine, e.endCol = e.startCol, e.endOffset = e.startOffset), this._emitCurrentCharacterToken(e), this.handler.onEof({ type:
|
4034
|
+
e && (e.endLine = e.startLine, e.endCol = e.startCol, e.endOffset = e.startOffset), this._emitCurrentCharacterToken(e), this.handler.onEof({ type: sA.EOF, location: e }), this.active = !1;
|
4035
4035
|
}
|
4036
4036
|
//Characters emission
|
4037
4037
|
//OPTIMIZATION: The specification uses only one type of character token (one token per character).
|
@@ -4052,13 +4052,13 @@ let cB = class {
|
|
4052
4052
|
this._createCharacterToken(e, t);
|
4053
4053
|
}
|
4054
4054
|
_emitCodePoint(e) {
|
4055
|
-
const t = Lc(e) ?
|
4055
|
+
const t = Lc(e) ? sA.WHITESPACE_CHARACTER : e === d.NULL ? sA.NULL_CHARACTER : sA.CHARACTER;
|
4056
4056
|
this._appendCharToCurrentCharacterToken(t, String.fromCodePoint(e));
|
4057
4057
|
}
|
4058
4058
|
//NOTE: used when we emit characters explicitly.
|
4059
4059
|
//This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.
|
4060
4060
|
_emitChars(e) {
|
4061
|
-
this._appendCharToCurrentCharacterToken(
|
4061
|
+
this._appendCharToCurrentCharacterToken(sA.CHARACTER, e);
|
4062
4062
|
}
|
4063
4063
|
// Character reference helpers
|
4064
4064
|
_startCharacterReference() {
|
@@ -6720,7 +6720,7 @@ let kc = class {
|
|
6720
6720
|
const r = t.location, n = this.treeAdapter.getTagName(e), s = (
|
6721
6721
|
// NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
|
6722
6722
|
// tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
|
6723
|
-
t.type ===
|
6723
|
+
t.type === sA.END_TAG && n === t.tagName ? {
|
6724
6724
|
endTag: { ...r },
|
6725
6725
|
endLine: r.endLine,
|
6726
6726
|
endCol: r.endCol,
|
@@ -6749,35 +6749,35 @@ let kc = class {
|
|
6749
6749
|
/** @protected */
|
6750
6750
|
_processToken(e) {
|
6751
6751
|
switch (e.type) {
|
6752
|
-
case
|
6752
|
+
case sA.CHARACTER: {
|
6753
6753
|
this.onCharacter(e);
|
6754
6754
|
break;
|
6755
6755
|
}
|
6756
|
-
case
|
6756
|
+
case sA.NULL_CHARACTER: {
|
6757
6757
|
this.onNullCharacter(e);
|
6758
6758
|
break;
|
6759
6759
|
}
|
6760
|
-
case
|
6760
|
+
case sA.COMMENT: {
|
6761
6761
|
this.onComment(e);
|
6762
6762
|
break;
|
6763
6763
|
}
|
6764
|
-
case
|
6764
|
+
case sA.DOCTYPE: {
|
6765
6765
|
this.onDoctype(e);
|
6766
6766
|
break;
|
6767
6767
|
}
|
6768
|
-
case
|
6768
|
+
case sA.START_TAG: {
|
6769
6769
|
this._processStartTag(e);
|
6770
6770
|
break;
|
6771
6771
|
}
|
6772
|
-
case
|
6772
|
+
case sA.END_TAG: {
|
6773
6773
|
this.onEndTag(e);
|
6774
6774
|
break;
|
6775
6775
|
}
|
6776
|
-
case
|
6776
|
+
case sA.EOF: {
|
6777
6777
|
this.onEof(e);
|
6778
6778
|
break;
|
6779
6779
|
}
|
6780
|
-
case
|
6780
|
+
case sA.WHITESPACE_CHARACTER: {
|
6781
6781
|
this.onWhitespaceCharacter(e);
|
6782
6782
|
break;
|
6783
6783
|
}
|
@@ -7652,7 +7652,7 @@ function tg(A, e) {
|
|
7652
7652
|
}
|
7653
7653
|
}
|
7654
7654
|
function Ir(A, e) {
|
7655
|
-
const t = e.type ===
|
7655
|
+
const t = e.type === sA.EOF ? b.openElementsLeftAfterEof : b.disallowedContentInNoscriptInHead;
|
7656
7656
|
A._err(e, t), A.openElements.pop(), A.insertionMode = g.IN_HEAD, A._processToken(e);
|
7657
7657
|
}
|
7658
7658
|
function rg(A, e) {
|
@@ -7711,27 +7711,27 @@ function vr(A, e) {
|
|
7711
7711
|
}
|
7712
7712
|
function hs(A, e) {
|
7713
7713
|
switch (e.type) {
|
7714
|
-
case
|
7714
|
+
case sA.CHARACTER: {
|
7715
7715
|
Kc(A, e);
|
7716
7716
|
break;
|
7717
7717
|
}
|
7718
|
-
case
|
7718
|
+
case sA.WHITESPACE_CHARACTER: {
|
7719
7719
|
Pc(A, e);
|
7720
7720
|
break;
|
7721
7721
|
}
|
7722
|
-
case
|
7722
|
+
case sA.COMMENT: {
|
7723
7723
|
ba(A, e);
|
7724
7724
|
break;
|
7725
7725
|
}
|
7726
|
-
case
|
7726
|
+
case sA.START_TAG: {
|
7727
7727
|
$A(A, e);
|
7728
7728
|
break;
|
7729
7729
|
}
|
7730
|
-
case
|
7730
|
+
case sA.END_TAG: {
|
7731
7731
|
ds(A, e);
|
7732
7732
|
break;
|
7733
7733
|
}
|
7734
|
-
case
|
7734
|
+
case sA.EOF: {
|
7735
7735
|
Xc(A, e);
|
7736
7736
|
break;
|
7737
7737
|
}
|
@@ -8228,11 +8228,11 @@ function Vg(A, e) {
|
|
8228
8228
|
function Ms(A, e) {
|
8229
8229
|
if (Mc.has(A.openElements.currentTagId))
|
8230
8230
|
switch (A.pendingCharacterTokens.length = 0, A.hasNonWhitespacePendingCharacterToken = !1, A.originalInsertionMode = A.insertionMode, A.insertionMode = g.IN_TABLE_TEXT, e.type) {
|
8231
|
-
case
|
8231
|
+
case sA.CHARACTER: {
|
8232
8232
|
Jc(A, e);
|
8233
8233
|
break;
|
8234
8234
|
}
|
8235
|
-
case
|
8235
|
+
case sA.WHITESPACE_CHARACTER: {
|
8236
8236
|
Wc(A, e);
|
8237
8237
|
break;
|
8238
8238
|
}
|
@@ -9966,21 +9966,22 @@ const ep = ["onClick"], tp = {
|
|
9966
9966
|
],
|
9967
9967
|
setup(A, { emit: e }) {
|
9968
9968
|
const t = A, r = e, n = Re(() => {
|
9969
|
-
var _
|
9970
|
-
|
9971
|
-
|
9969
|
+
var _;
|
9970
|
+
const I = t.element.editText || t.element.text;
|
9971
|
+
return t.element.rule && t.element.rule.allowWrap ? (_ = I == null ? void 0 : I.replace(/\n/g, "<br>")) == null ? void 0 : _.replace(/ /g, " ") : I;
|
9972
|
+
}), s = Re(() => t.selectedElement === t.element), a = Re(() => t.hoveredElement === t.element), u = $(!1), o = $(!1), c = $(""), l = Re(() => t.element.rule.minText || 0), f = Re(() => t.element.rule.maxText || 1 / 0), h = (I) => {
|
9972
9973
|
let _ = "";
|
9973
|
-
if (
|
9974
|
-
const Z =
|
9975
|
-
Math.min(Z,
|
9974
|
+
if (I.children && I.children.length && I.children[0].type === J.Block) {
|
9975
|
+
const Z = I.children[0].rule.flexColumn || I.children[0].rule.mobileFlexColumn;
|
9976
|
+
Math.min(Z, I.children.length) && (_ += " flex pc:justify-center flex-wrap ", I.children[0].rule.mobileFlexColumn ? _ += " justify-center " : _ += " gp-designer-m-swiper swiper-wrapper justify-normal ");
|
9976
9977
|
}
|
9977
|
-
if (
|
9978
|
-
const Z =
|
9978
|
+
if (I.type === J.Block) {
|
9979
|
+
const Z = I.rule.flexColumn, QA = I.rule.mobileFlexColumn;
|
9979
9980
|
(QA || Z) && (_ += " box-border "), QA > 1 && QA <= 12 ? _ += ` basis-1/${QA} ` : QA == 1 ? _ += " basis-full " : QA || (_ += " gp-designer-m-swiper-slide swiper-slide "), Z > 1 && Z <= 12 ? _ += ` pc:basis-1/${Z} ` : Z == 1 && (_ += " pc:basis-full ");
|
9980
9981
|
}
|
9981
|
-
if ((
|
9982
|
-
var
|
9983
|
-
|
9982
|
+
if ((I.type == J.Button || I.type == J.Link) && I.rule.openMeiqia && (_ += " gp-designer-meiqia "), I.rule.isThemeColor && t.element.type === J.Text ? _ += " " + Te.THEME_TEXT_COLOR_CLASS + " " : I.rule.isThemeColor && t.element.type === J.Button ? _ += " " + Te.THEME_BUTTON_COLOR_CLASS + " " : I.rule.isThemeColor && t.element.type === J.Icon && (_ += " " + Te.THEME_ICON_COLOR_CLASS + " "), I.attrs.class) {
|
9983
|
+
var iA = I.attrs.class.split(" ").filter((Z) => Z);
|
9984
|
+
iA.length && (_ = _.split(" ").filter((Z) => !iA.includes(Z)).join(" "));
|
9984
9985
|
}
|
9985
9986
|
return _;
|
9986
9987
|
};
|
@@ -9991,28 +9992,28 @@ const ep = ["onClick"], tp = {
|
|
9991
9992
|
},
|
9992
9993
|
{ immediate: !0 }
|
9993
9994
|
);
|
9994
|
-
function C(
|
9995
|
-
|
9995
|
+
function C(I) {
|
9996
|
+
I.xpath != "/div[1]" && t.mode !== "preview" && (t.mode === "edit" ? I.type === J.Text && r("selectElement", I) : r("selectElement", I), !I.rule.isReadOnly && I.type === J.Text && (u.value = !0));
|
9996
9997
|
}
|
9997
|
-
function p(
|
9998
|
-
r("selectElement",
|
9998
|
+
function p(I) {
|
9999
|
+
r("selectElement", I);
|
9999
10000
|
}
|
10000
|
-
function w(
|
10001
|
-
r("hoverElement",
|
10001
|
+
function w(I, _) {
|
10002
|
+
r("hoverElement", I, _);
|
10002
10003
|
}
|
10003
|
-
function U(
|
10004
|
-
r("hoverElement",
|
10004
|
+
function U(I) {
|
10005
|
+
r("hoverElement", I);
|
10005
10006
|
}
|
10006
|
-
function y(
|
10007
|
-
|
10007
|
+
function y(I) {
|
10008
|
+
I.currentTarget.contains(I.relatedTarget) ? r("hoverElement", null) : t.hoveredElement ? r("hoverElement", null, t.hoveredElement.parentxpath) : r("hoverElement", null);
|
10008
10009
|
}
|
10009
|
-
function
|
10010
|
+
function v() {
|
10010
10011
|
u.value = !1, r("contentUpdated", D());
|
10011
10012
|
}
|
10012
10013
|
function D() {
|
10013
|
-
function
|
10014
|
+
function I(iA) {
|
10014
10015
|
var FA;
|
10015
|
-
const Z =
|
10016
|
+
const Z = iA;
|
10016
10017
|
if (Z.tag === "br")
|
10017
10018
|
return "<br>";
|
10018
10019
|
const QA = Z.rule.isThemeColor && Z.type == J.Text ? Te.THEME_TEXT_COLOR_CLASS : Z.rule.isThemeColor && Z.type == J.Button ? Te.THEME_BUTTON_COLOR_CLASS : Z.rule.isThemeColor && Z.type == J.Icon ? Te.THEME_ICON_COLOR_CLASS : "";
|
@@ -10027,58 +10028,58 @@ const ep = ["onClick"], tp = {
|
|
10027
10028
|
class: Z.attrs.class || ""
|
10028
10029
|
}, tr = h(Z);
|
10029
10030
|
tr && (Ve.class += " " + tr);
|
10030
|
-
let Ye = Object.entries(
|
10031
|
+
let Ye = Object.entries(iA.attrs || {}).filter(([DA, le]) => DA !== "class").map(([DA, le]) => `${DA}="${le}"`).join(" ");
|
10031
10032
|
const ht = Object.entries(Ve || {}).map(([DA, le]) => `${DA}="${le.trim()}"`).join(" ");
|
10032
10033
|
Ye += ht;
|
10033
|
-
const vs = `<${
|
10034
|
-
let O =
|
10034
|
+
const vs = `<${iA.tag}${Ye ? " " + Ye : ""}>`, Q = `</${iA.tag}>`, x = (iA.children || []).map((DA) => I(DA)).join("");
|
10035
|
+
let O = iA.editText || iA.text || "";
|
10035
10036
|
return O = O.replace(/\r\n/g, `
|
10036
10037
|
`).replace(/\n/g, "<br>"), `${vs}${O}${x}${Q}`;
|
10037
10038
|
}
|
10038
|
-
return
|
10039
|
+
return I(t.element);
|
10039
10040
|
}
|
10040
|
-
function P(
|
10041
|
+
function P(I) {
|
10041
10042
|
var QA, Ve;
|
10042
|
-
|
10043
|
-
let _ = ((QA =
|
10043
|
+
I.preventDefault(), I.stopPropagation();
|
10044
|
+
let _ = ((QA = I.clipboardData) == null ? void 0 : QA.getData("text/plain")) || "";
|
10044
10045
|
(Ve = t.element.rule) != null && Ve.allowWrap ? (_ = _ == null ? void 0 : _.replace(/\n/g, "<br>"), document.execCommand("insertHTML", !1, _)) : (_ = _ == null ? void 0 : _.replace(/\n/g, " "), document.execCommand("insertText", !1, _));
|
10045
|
-
const
|
10046
|
+
const iA = I.target, Z = iA.innerText || iA.textContent || "";
|
10046
10047
|
N(Z);
|
10047
10048
|
}
|
10048
|
-
function H(
|
10049
|
+
function H(I) {
|
10049
10050
|
var _;
|
10050
|
-
|
10051
|
+
I.key === "Enter" && (I.preventDefault(), I.stopPropagation(), (_ = t.element.rule) != null && _.allowWrap ? document.execCommand("insertLineBreak") : AA.error("当前节点不允许换行"));
|
10051
10052
|
}
|
10052
|
-
function E(
|
10053
|
-
|
10054
|
-
const _ =
|
10055
|
-
N(
|
10053
|
+
function E(I) {
|
10054
|
+
I.stopPropagation();
|
10055
|
+
const _ = I.target, iA = _.innerText || _.textContent || "";
|
10056
|
+
N(iA);
|
10056
10057
|
}
|
10057
|
-
function N(
|
10058
|
-
if (
|
10058
|
+
function N(I) {
|
10059
|
+
if (I.length < l.value) {
|
10059
10060
|
o.value = !0, c.value = `最少输入 ${l.value} 个字符`;
|
10060
10061
|
return;
|
10061
|
-
} else if (
|
10062
|
+
} else if (I.length > f.value) {
|
10062
10063
|
o.value = !0, c.value = `最多输入 ${f.value} 个字符`;
|
10063
10064
|
return;
|
10064
10065
|
} else
|
10065
10066
|
o.value = !1, c.value = "";
|
10066
|
-
r("updateText", { element: t.element, newText:
|
10067
|
+
r("updateText", { element: t.element, newText: I }), r("contentUpdated", D());
|
10067
10068
|
const _ = Mo(t.element);
|
10068
|
-
_.editText =
|
10069
|
+
_.editText = I;
|
10069
10070
|
}
|
10070
|
-
function G(
|
10071
|
-
r("updateText",
|
10071
|
+
function G(I) {
|
10072
|
+
r("updateText", I), r("contentUpdated", D());
|
10072
10073
|
}
|
10073
10074
|
function M() {
|
10074
|
-
const
|
10075
|
-
r("blockAction", { action: "add", element: t.element, newBlock:
|
10075
|
+
const I = { ...t.element };
|
10076
|
+
r("blockAction", { action: "add", element: t.element, newBlock: I });
|
10076
10077
|
}
|
10077
|
-
function
|
10078
|
+
function nA() {
|
10078
10079
|
cA(t.element), r("blockAction", { action: "moveUp", element: t.element });
|
10079
10080
|
}
|
10080
|
-
function cA(
|
10081
|
-
|
10081
|
+
function cA(I) {
|
10082
|
+
I.children && I.children.length > 0 && I.children.forEach((_) => {
|
10082
10083
|
_.type == J.Text && (_.text !== _.editText && (_.text = _.editText), cA(_));
|
10083
10084
|
});
|
10084
10085
|
}
|
@@ -10088,57 +10089,57 @@ const ep = ["onClick"], tp = {
|
|
10088
10089
|
function z() {
|
10089
10090
|
r("blockAction", { action: "delete", element: t.element });
|
10090
10091
|
}
|
10091
|
-
function
|
10092
|
-
r("blockAction",
|
10092
|
+
function aA(I) {
|
10093
|
+
r("blockAction", I), r("contentUpdated", D());
|
10093
10094
|
}
|
10094
|
-
function lA(
|
10095
|
-
LA.value.openModal(
|
10095
|
+
function lA(I) {
|
10096
|
+
LA.value.openModal(I);
|
10096
10097
|
}
|
10097
|
-
function gA(
|
10098
|
-
WA.value.openModal(
|
10098
|
+
function gA(I) {
|
10099
|
+
WA.value.openModal(I);
|
10099
10100
|
}
|
10100
|
-
function bA(
|
10101
|
-
r("addIcon",
|
10101
|
+
function bA(I, _) {
|
10102
|
+
r("addIcon", I, _), r("contentUpdated", D());
|
10102
10103
|
}
|
10103
|
-
function ZA(
|
10104
|
-
r("updateElementRule",
|
10104
|
+
function ZA(I) {
|
10105
|
+
r("updateElementRule", I);
|
10105
10106
|
}
|
10106
10107
|
const LA = $(t.icon);
|
10107
10108
|
Ae(
|
10108
10109
|
() => t.icon,
|
10109
|
-
(
|
10110
|
-
LA.value =
|
10110
|
+
(I) => {
|
10111
|
+
LA.value = I;
|
10111
10112
|
},
|
10112
10113
|
{ immediate: !0 }
|
10113
10114
|
);
|
10114
10115
|
const WA = $(t.upload);
|
10115
10116
|
Ae(
|
10116
10117
|
() => t.upload,
|
10117
|
-
(
|
10118
|
-
WA.value =
|
10118
|
+
(I) => {
|
10119
|
+
WA.value = I;
|
10119
10120
|
},
|
10120
10121
|
{ immediate: !0 }
|
10121
10122
|
);
|
10122
10123
|
const xA = Re(() => {
|
10123
|
-
const
|
10124
|
-
return t.element.css =
|
10125
|
-
}), ee = (
|
10126
|
-
_.children && _.children.length && _.children[0].type === J.Block && _.children.map((
|
10127
|
-
|
10124
|
+
const I = h(t.element);
|
10125
|
+
return t.element.css = I, I;
|
10126
|
+
}), ee = (I, _) => {
|
10127
|
+
_.children && _.children.length && _.children[0].type === J.Block && _.children.map((iA) => {
|
10128
|
+
iA.rule.flexColumn = I;
|
10128
10129
|
}), r("updateElementRule", _);
|
10129
10130
|
}, _A = Re(() => {
|
10130
|
-
let
|
10131
|
+
let I = "";
|
10131
10132
|
if (t.mode === "design") {
|
10132
10133
|
const _ = t.element;
|
10133
10134
|
if (_.type === J.Block) {
|
10134
|
-
const
|
10135
|
-
|
10135
|
+
const iA = _.rule.flexColumn;
|
10136
|
+
iA > 1 && iA <= 12 && (I += `flex-basis: calc(100% / ${iA} - 10px);`);
|
10136
10137
|
}
|
10137
10138
|
}
|
10138
|
-
return
|
10139
|
+
return I;
|
10139
10140
|
}), GA = $(null);
|
10140
|
-
return (
|
10141
|
-
const
|
10141
|
+
return (I, _) => {
|
10142
|
+
const iA = v0("ElementRenderer", !0);
|
10142
10143
|
return K(), V(kt, null, [
|
10143
10144
|
t.element.type == pA(J).Text ? (K(), ke(Pi(t.element.tag), Ki({
|
10144
10145
|
key: 0,
|
@@ -10165,7 +10166,7 @@ const ep = ["onClick"], tp = {
|
|
10165
10166
|
onClick: _[0] || (_[0] = MA(() => C(t.element), ["stop"])),
|
10166
10167
|
onMouseenter: _[1] || (_[1] = () => U(t.element)),
|
10167
10168
|
onMouseleave: y,
|
10168
|
-
onBlur:
|
10169
|
+
onBlur: v,
|
10169
10170
|
onInput: E,
|
10170
10171
|
onPaste: P,
|
10171
10172
|
onKeydown: MA(H, ["stop"]),
|
@@ -10197,7 +10198,7 @@ const ep = ["onClick"], tp = {
|
|
10197
10198
|
onClick: _[5] || (_[5] = MA(() => C(t.element), ["stop"])),
|
10198
10199
|
onMouseenter: _[6] || (_[6] = () => U(t.element)),
|
10199
10200
|
onMouseleave: y,
|
10200
|
-
onBlur:
|
10201
|
+
onBlur: v,
|
10201
10202
|
onInput: E,
|
10202
10203
|
onPaste: P,
|
10203
10204
|
onKeydown: MA(H, ["stop"]),
|
@@ -10207,7 +10208,7 @@ const ep = ["onClick"], tp = {
|
|
10207
10208
|
default: Nr(() => [
|
10208
10209
|
ca(jA(n.value) + " ", 1),
|
10209
10210
|
t.element.children && t.element.children.length ? (K(), V(kt, { key: 0 }, [
|
10210
|
-
(K(!0), V(kt, null, Dn(t.element.children, (Z, QA) => (K(), ke(
|
10211
|
+
(K(!0), V(kt, null, Dn(t.element.children, (Z, QA) => (K(), ke(iA, {
|
10211
10212
|
"show-margin": A.showMargin,
|
10212
10213
|
key: QA,
|
10213
10214
|
r: A.r,
|
@@ -10223,7 +10224,7 @@ const ep = ["onClick"], tp = {
|
|
10223
10224
|
onSelectElement: p,
|
10224
10225
|
onHoverElement: w,
|
10225
10226
|
onUpdateText: G,
|
10226
|
-
onBlockAction:
|
10227
|
+
onBlockAction: aA,
|
10227
10228
|
onAddIcon: bA,
|
10228
10229
|
onUpdateElementRule: () => ZA(Z)
|
10229
10230
|
}, null, 8, ["show-margin", "r", "mode", "icons", "element", "selectedElement", "hoveredElement", "cropper", "icon", "upload", "upload-by-file", "onUpdateElementRule"]))), 128)),
|
@@ -10269,7 +10270,7 @@ const ep = ["onClick"], tp = {
|
|
10269
10270
|
])),
|
10270
10271
|
T("button", {
|
10271
10272
|
class: "flex-none content-center items-center p-1 bg-blue-500/80 text-white rounded hover:bg-blue-500",
|
10272
|
-
onClick: MA(
|
10273
|
+
onClick: MA(nA, ["stop"])
|
10273
10274
|
}, _[10] || (_[10] = [
|
10274
10275
|
T("svg", {
|
10275
10276
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -10418,7 +10419,7 @@ const ep = ["onClick"], tp = {
|
|
10418
10419
|
], 64);
|
10419
10420
|
};
|
10420
10421
|
}
|
10421
|
-
}), np = /* @__PURE__ */ ft(rp, [["__scopeId", "data-v-
|
10422
|
+
}), np = /* @__PURE__ */ ft(rp, [["__scopeId", "data-v-2a6431d8"]]), sp = Le({
|
10422
10423
|
name: "GpCheckbox",
|
10423
10424
|
props: {
|
10424
10425
|
modelValue: {
|
@@ -11146,7 +11147,7 @@ function sC(A) {
|
|
11146
11147
|
};
|
11147
11148
|
}
|
11148
11149
|
function aC(A, e, t, r) {
|
11149
|
-
var n = e.aspectRatio, s = e.naturalWidth, a = e.naturalHeight, u = e.rotate, o = u === void 0 ? 0 : u, c = e.scaleX, l = c === void 0 ? 1 : c, f = e.scaleY, h = f === void 0 ? 1 : f, C = t.aspectRatio, p = t.naturalWidth, w = t.naturalHeight, U = r.fillColor, y = U === void 0 ? "transparent" : U,
|
11150
|
+
var n = e.aspectRatio, s = e.naturalWidth, a = e.naturalHeight, u = e.rotate, o = u === void 0 ? 0 : u, c = e.scaleX, l = c === void 0 ? 1 : c, f = e.scaleY, h = f === void 0 ? 1 : f, C = t.aspectRatio, p = t.naturalWidth, w = t.naturalHeight, U = r.fillColor, y = U === void 0 ? "transparent" : U, v = r.imageSmoothingEnabled, D = v === void 0 ? !0 : v, P = r.imageSmoothingQuality, H = P === void 0 ? "low" : P, E = r.maxWidth, N = E === void 0 ? 1 / 0 : E, G = r.maxHeight, M = G === void 0 ? 1 / 0 : G, nA = r.minWidth, cA = nA === void 0 ? 0 : nA, BA = r.minHeight, z = BA === void 0 ? 0 : BA, aA = document.createElement("canvas"), lA = aA.getContext("2d"), gA = rt({
|
11150
11151
|
aspectRatio: C,
|
11151
11152
|
width: N,
|
11152
11153
|
height: M
|
@@ -11163,9 +11164,9 @@ function aC(A, e, t, r) {
|
|
11163
11164
|
width: cA,
|
11164
11165
|
height: z
|
11165
11166
|
}, "cover"), ee = Math.min(WA.width, Math.max(xA.width, s)), _A = Math.min(WA.height, Math.max(xA.height, a)), GA = [-ee / 2, -_A / 2, ee, _A];
|
11166
|
-
return
|
11167
|
-
return Math.floor(Xt(
|
11168
|
-
})))), lA.restore(),
|
11167
|
+
return aA.width = Xt(ZA), aA.height = Xt(LA), lA.fillStyle = y, lA.fillRect(0, 0, ZA, LA), lA.save(), lA.translate(ZA / 2, LA / 2), lA.rotate(o * Math.PI / 180), lA.scale(l, h), lA.imageSmoothingEnabled = D, lA.imageSmoothingQuality = H, lA.drawImage.apply(lA, [A].concat(al(GA.map(function(I) {
|
11168
|
+
return Math.floor(Xt(I));
|
11169
|
+
})))), lA.restore(), aA;
|
11169
11170
|
}
|
11170
11171
|
var pl = String.fromCharCode;
|
11171
11172
|
function iC(A, e, t) {
|
@@ -11484,8 +11485,8 @@ var hC = {
|
|
11484
11485
|
}
|
11485
11486
|
}, EC = {
|
11486
11487
|
change: function(e) {
|
11487
|
-
var t = this.options, r = this.canvasData, n = this.containerData, s = this.cropBoxData, a = this.pointers, u = this.action, o = t.aspectRatio, c = s.left, l = s.top, f = s.width, h = s.height, C = c + f, p = l + h, w = 0, U = 0, y = n.width,
|
11488
|
-
!o && e.shiftKey && (o = f && h ? f / h : 1), this.limited && (w = s.minLeft, U = s.minTop, y = w + Math.min(n.width, r.width, r.left + r.width),
|
11488
|
+
var t = this.options, r = this.canvasData, n = this.containerData, s = this.cropBoxData, a = this.pointers, u = this.action, o = t.aspectRatio, c = s.left, l = s.top, f = s.width, h = s.height, C = c + f, p = l + h, w = 0, U = 0, y = n.width, v = n.height, D = !0, P;
|
11489
|
+
!o && e.shiftKey && (o = f && h ? f / h : 1), this.limited && (w = s.minLeft, U = s.minTop, y = w + Math.min(n.width, r.width, r.left + r.width), v = U + Math.min(n.height, r.height, r.top + r.height));
|
11489
11490
|
var H = a[Object.keys(a)[0]], E = {
|
11490
11491
|
x: H.endX - H.startX,
|
11491
11492
|
y: H.endY - H.startY
|
@@ -11501,7 +11502,7 @@ var hC = {
|
|
11501
11502
|
l + E.y < U && (E.y = U - l);
|
11502
11503
|
break;
|
11503
11504
|
case St:
|
11504
|
-
p + E.y >
|
11505
|
+
p + E.y > v && (E.y = v - p);
|
11505
11506
|
break;
|
11506
11507
|
}
|
11507
11508
|
};
|
@@ -11510,7 +11511,7 @@ var hC = {
|
|
11510
11511
|
c += E.x, l += E.y;
|
11511
11512
|
break;
|
11512
11513
|
case Bt:
|
11513
|
-
if (E.x >= 0 && (C >= y || o && (l <= U || p >=
|
11514
|
+
if (E.x >= 0 && (C >= y || o && (l <= U || p >= v))) {
|
11514
11515
|
D = !1;
|
11515
11516
|
break;
|
11516
11517
|
}
|
@@ -11524,14 +11525,14 @@ var hC = {
|
|
11524
11525
|
N(We), h -= E.y, l += E.y, h < 0 && (u = St, h = -h, l -= h), o && (f = h * o, c += (s.width - f) / 2);
|
11525
11526
|
break;
|
11526
11527
|
case gt:
|
11527
|
-
if (E.x <= 0 && (c <= w || o && (l <= U || p >=
|
11528
|
+
if (E.x <= 0 && (c <= w || o && (l <= U || p >= v))) {
|
11528
11529
|
D = !1;
|
11529
11530
|
break;
|
11530
11531
|
}
|
11531
11532
|
N(gt), f -= E.x, c += E.x, f < 0 && (u = Bt, f = -f, c -= f), o && (h = f / o, l += (s.height - h) / 2);
|
11532
11533
|
break;
|
11533
11534
|
case St:
|
11534
|
-
if (E.y >= 0 && (p >=
|
11535
|
+
if (E.y >= 0 && (p >= v || o && (c <= w || C >= y))) {
|
11535
11536
|
D = !1;
|
11536
11537
|
break;
|
11537
11538
|
}
|
@@ -11561,24 +11562,24 @@ var hC = {
|
|
11561
11562
|
break;
|
11562
11563
|
case or:
|
11563
11564
|
if (o) {
|
11564
|
-
if (E.x <= 0 && (c <= w || p >=
|
11565
|
+
if (E.x <= 0 && (c <= w || p >= v)) {
|
11565
11566
|
D = !1;
|
11566
11567
|
break;
|
11567
11568
|
}
|
11568
11569
|
N(gt), f -= E.x, c += E.x, h = f / o;
|
11569
11570
|
} else
|
11570
|
-
N(St), N(gt), E.x <= 0 ? c > w ? (f -= E.x, c += E.x) : E.y >= 0 && p >=
|
11571
|
+
N(St), N(gt), E.x <= 0 ? c > w ? (f -= E.x, c += E.x) : E.y >= 0 && p >= v && (D = !1) : (f -= E.x, c += E.x), E.y >= 0 ? p < v && (h += E.y) : h += E.y;
|
11571
11572
|
f < 0 && h < 0 ? (u = ar, h = -h, f = -f, l -= h, c -= f) : f < 0 ? (u = ur, f = -f, c -= f) : h < 0 && (u = ir, h = -h, l -= h);
|
11572
11573
|
break;
|
11573
11574
|
case ur:
|
11574
11575
|
if (o) {
|
11575
|
-
if (E.x >= 0 && (C >= y || p >=
|
11576
|
+
if (E.x >= 0 && (C >= y || p >= v)) {
|
11576
11577
|
D = !1;
|
11577
11578
|
break;
|
11578
11579
|
}
|
11579
11580
|
N(Bt), f += E.x, h = f / o;
|
11580
11581
|
} else
|
11581
|
-
N(St), N(Bt), E.x >= 0 ? C < y ? f += E.x : E.y >= 0 && p >=
|
11582
|
+
N(St), N(Bt), E.x >= 0 ? C < y ? f += E.x : E.y >= 0 && p >= v && (D = !1) : f += E.x, E.y >= 0 ? p < v && (h += E.y) : h += E.y;
|
11582
11583
|
f < 0 && h < 0 ? (u = ir, h = -h, f = -f, l -= h, c -= f) : f < 0 ? (u = or, f = -f, c -= f) : h < 0 && (u = ar, h = -h, l -= h);
|
11583
11584
|
break;
|
11584
11585
|
case ul:
|
@@ -11877,14 +11878,14 @@ var hC = {
|
|
11877
11878
|
p = Math.min(f.width, Math.max(h.width, p)), w = Math.min(f.height, Math.max(h.height, w));
|
11878
11879
|
var U = document.createElement("canvas"), y = U.getContext("2d");
|
11879
11880
|
U.width = Xt(p), U.height = Xt(w), y.fillStyle = e.fillColor || "transparent", y.fillRect(0, 0, p, w);
|
11880
|
-
var
|
11881
|
+
var v = e.imageSmoothingEnabled, D = v === void 0 ? !0 : v, P = e.imageSmoothingQuality;
|
11881
11882
|
y.imageSmoothingEnabled = D, P && (y.imageSmoothingQuality = P);
|
11882
|
-
var H = r.width, E = r.height, N = s, G = a, M,
|
11883
|
-
N <= -u || N > H ? (N = 0, M = 0, cA = 0, z = 0) : N <= 0 ? (cA = -N, N = 0, M = Math.min(H, u + N), z = M) : N <= H && (cA = 0, M = Math.min(u, H - N), z = M), M <= 0 || G <= -o || G > E ? (G = 0,
|
11884
|
-
var lA = [N, G, M,
|
11885
|
-
if (z > 0 &&
|
11883
|
+
var H = r.width, E = r.height, N = s, G = a, M, nA, cA, BA, z, aA;
|
11884
|
+
N <= -u || N > H ? (N = 0, M = 0, cA = 0, z = 0) : N <= 0 ? (cA = -N, N = 0, M = Math.min(H, u + N), z = M) : N <= H && (cA = 0, M = Math.min(u, H - N), z = M), M <= 0 || G <= -o || G > E ? (G = 0, nA = 0, BA = 0, aA = 0) : G <= 0 ? (BA = -G, G = 0, nA = Math.min(E, o + G), aA = nA) : G <= E && (BA = 0, nA = Math.min(o, E - G), aA = nA);
|
11885
|
+
var lA = [N, G, M, nA];
|
11886
|
+
if (z > 0 && aA > 0) {
|
11886
11887
|
var gA = p / u;
|
11887
|
-
lA.push(cA * gA, BA * gA, z * gA,
|
11888
|
+
lA.push(cA * gA, BA * gA, z * gA, aA * gA);
|
11888
11889
|
}
|
11889
11890
|
return y.drawImage.apply(y, [r].concat(al(lA.map(function(bA) {
|
11890
11891
|
return Math.floor(Xt(bA));
|
@@ -12169,7 +12170,7 @@ const wC = {
|
|
12169
12170
|
);
|
12170
12171
|
r("ok", { file: N, element: p.value }), u.value = !1, P(), D(), U();
|
12171
12172
|
};
|
12172
|
-
function
|
12173
|
+
function v() {
|
12173
12174
|
P(), D(), U(), r("cancel");
|
12174
12175
|
}
|
12175
12176
|
function D() {
|
@@ -12186,7 +12187,7 @@ const wC = {
|
|
12186
12187
|
E[1] || (E[1] = T("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
|
12187
12188
|
T("span", {
|
12188
12189
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
12189
|
-
onClick: MA(
|
12190
|
+
onClick: MA(v, ["stop"])
|
12190
12191
|
})
|
12191
12192
|
]),
|
12192
12193
|
T("div", UC, [
|
@@ -12242,7 +12243,7 @@ const wC = {
|
|
12242
12243
|
}, " 确认 ", 8, MC),
|
12243
12244
|
T("span", {
|
12244
12245
|
class: "!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",
|
12245
|
-
onClick:
|
12246
|
+
onClick: v
|
12246
12247
|
}, "取消")
|
12247
12248
|
])
|
12248
12249
|
])
|
@@ -12469,8 +12470,8 @@ const ml = /* @__PURE__ */ ft(PC, [["render", WC]]), JC = { class: "p-4 flex fle
|
|
12469
12470
|
const U = h[w];
|
12470
12471
|
if (A.beforeUpload && await A.beforeUpload(U) === !1)
|
12471
12472
|
continue;
|
12472
|
-
const y = `${Date.now()}-${U.name}`,
|
12473
|
-
D.src =
|
12473
|
+
const y = `${Date.now()}-${U.name}`, v = URL.createObjectURL(U), D = document.createElement("img");
|
12474
|
+
D.src = v, document.body.appendChild(D), await new Promise((E) => {
|
12474
12475
|
D.onload = E;
|
12475
12476
|
});
|
12476
12477
|
const P = D.width, H = D.height;
|
@@ -12478,7 +12479,7 @@ const ml = /* @__PURE__ */ ft(PC, [["render", WC]]), JC = { class: "p-4 flex fle
|
|
12478
12479
|
uid: y,
|
12479
12480
|
name: U.name,
|
12480
12481
|
status: "uploading",
|
12481
|
-
thumbUrl:
|
12482
|
+
thumbUrl: v,
|
12482
12483
|
file: U,
|
12483
12484
|
width: P,
|
12484
12485
|
height: H
|
@@ -16172,8 +16173,8 @@ var JT = 1, zs = 2, Aa = 3, ho = 4, Bo = 5, qT = 7, go = 8, ea = 9, ta = 10, Eo
|
|
16172
16173
|
} else if (f.name === "counter") {
|
16173
16174
|
var p = f.values.filter($t), w = p[0], U = p[1];
|
16174
16175
|
if (w && hA(w)) {
|
16175
|
-
var y = s.counters.getCounterValue(w.value),
|
16176
|
-
c.appendChild(u.createTextNode(Xr(y,
|
16176
|
+
var y = s.counters.getCounterValue(w.value), v = U && hA(U) ? qa.parse(s.context, U.value) : 3;
|
16177
|
+
c.appendChild(u.createTextNode(Xr(y, v, !1)));
|
16177
16178
|
}
|
16178
16179
|
} else if (f.name === "counters") {
|
16179
16180
|
var D = f.values.filter($t), w = D[0], P = D[1], U = D[2];
|
@@ -16407,8 +16408,8 @@ var Nb = function(A, e) {
|
|
16407
16408
|
U.push((s + o) / r.width), U.push((p + f) / r.width), U.push((a + w) / r.height), U.push((c + h) / r.height);
|
16408
16409
|
var y = Math.max.apply(Math, U);
|
16409
16410
|
y > 1 && (s /= y, a /= y, o /= y, c /= y, f /= y, h /= y, p /= y, w /= y);
|
16410
|
-
var
|
16411
|
-
this.topLeftBorderDoubleOuterBox = s > 0 || a > 0 ? CA(r.left + M / 3, r.top + E / 3, s - M / 3, a - E / 3, oA.TOP_LEFT) : new R(r.left + M / 3, r.top + E / 3), this.topRightBorderDoubleOuterBox = s > 0 || a > 0 ? CA(r.left +
|
16411
|
+
var v = r.width - o, D = r.height - h, P = r.width - f, H = r.height - w, E = t.borderTopWidth, N = t.borderRightWidth, G = t.borderBottomWidth, M = t.borderLeftWidth, nA = EA(t.paddingTop, e.bounds.width), cA = EA(t.paddingRight, e.bounds.width), BA = EA(t.paddingBottom, e.bounds.width), z = EA(t.paddingLeft, e.bounds.width);
|
16412
|
+
this.topLeftBorderDoubleOuterBox = s > 0 || a > 0 ? CA(r.left + M / 3, r.top + E / 3, s - M / 3, a - E / 3, oA.TOP_LEFT) : new R(r.left + M / 3, r.top + E / 3), this.topRightBorderDoubleOuterBox = s > 0 || a > 0 ? CA(r.left + v, r.top + E / 3, o - N / 3, c - E / 3, oA.TOP_RIGHT) : new R(r.left + r.width - N / 3, r.top + E / 3), this.bottomRightBorderDoubleOuterBox = f > 0 || h > 0 ? CA(r.left + P, r.top + D, f - N / 3, h - G / 3, oA.BOTTOM_RIGHT) : new R(r.left + r.width - N / 3, r.top + r.height - G / 3), this.bottomLeftBorderDoubleOuterBox = p > 0 || w > 0 ? CA(r.left + M / 3, r.top + H, p - M / 3, w - G / 3, oA.BOTTOM_LEFT) : new R(r.left + M / 3, r.top + r.height - G / 3), this.topLeftBorderDoubleInnerBox = s > 0 || a > 0 ? CA(r.left + M * 2 / 3, r.top + E * 2 / 3, s - M * 2 / 3, a - E * 2 / 3, oA.TOP_LEFT) : new R(r.left + M * 2 / 3, r.top + E * 2 / 3), this.topRightBorderDoubleInnerBox = s > 0 || a > 0 ? CA(r.left + v, r.top + E * 2 / 3, o - N * 2 / 3, c - E * 2 / 3, oA.TOP_RIGHT) : new R(r.left + r.width - N * 2 / 3, r.top + E * 2 / 3), this.bottomRightBorderDoubleInnerBox = f > 0 || h > 0 ? CA(r.left + P, r.top + D, f - N * 2 / 3, h - G * 2 / 3, oA.BOTTOM_RIGHT) : new R(r.left + r.width - N * 2 / 3, r.top + r.height - G * 2 / 3), this.bottomLeftBorderDoubleInnerBox = p > 0 || w > 0 ? CA(r.left + M * 2 / 3, r.top + H, p - M * 2 / 3, w - G * 2 / 3, oA.BOTTOM_LEFT) : new R(r.left + M * 2 / 3, r.top + r.height - G * 2 / 3), this.topLeftBorderStroke = s > 0 || a > 0 ? CA(r.left + M / 2, r.top + E / 2, s - M / 2, a - E / 2, oA.TOP_LEFT) : new R(r.left + M / 2, r.top + E / 2), this.topRightBorderStroke = s > 0 || a > 0 ? CA(r.left + v, r.top + E / 2, o - N / 2, c - E / 2, oA.TOP_RIGHT) : new R(r.left + r.width - N / 2, r.top + E / 2), this.bottomRightBorderStroke = f > 0 || h > 0 ? CA(r.left + P, r.top + D, f - N / 2, h - G / 2, oA.BOTTOM_RIGHT) : new R(r.left + r.width - N / 2, r.top + r.height - G / 2), this.bottomLeftBorderStroke = p > 0 || w > 0 ? CA(r.left + M / 2, r.top + H, p - M / 2, w - G / 2, oA.BOTTOM_LEFT) : new R(r.left + M / 2, r.top + r.height - G / 2), this.topLeftBorderBox = s > 0 || a > 0 ? CA(r.left, r.top, s, a, oA.TOP_LEFT) : new R(r.left, r.top), this.topRightBorderBox = o > 0 || c > 0 ? CA(r.left + v, r.top, o, c, oA.TOP_RIGHT) : new R(r.left + r.width, r.top), this.bottomRightBorderBox = f > 0 || h > 0 ? CA(r.left + P, r.top + D, f, h, oA.BOTTOM_RIGHT) : new R(r.left + r.width, r.top + r.height), this.bottomLeftBorderBox = p > 0 || w > 0 ? CA(r.left, r.top + H, p, w, oA.BOTTOM_LEFT) : new R(r.left, r.top + r.height), this.topLeftPaddingBox = s > 0 || a > 0 ? CA(r.left + M, r.top + E, Math.max(0, s - M), Math.max(0, a - E), oA.TOP_LEFT) : new R(r.left + M, r.top + E), this.topRightPaddingBox = o > 0 || c > 0 ? CA(r.left + Math.min(v, r.width - N), r.top + E, v > r.width + N ? 0 : Math.max(0, o - N), Math.max(0, c - E), oA.TOP_RIGHT) : new R(r.left + r.width - N, r.top + E), this.bottomRightPaddingBox = f > 0 || h > 0 ? CA(r.left + Math.min(P, r.width - M), r.top + Math.min(D, r.height - G), Math.max(0, f - N), Math.max(0, h - G), oA.BOTTOM_RIGHT) : new R(r.left + r.width - N, r.top + r.height - G), this.bottomLeftPaddingBox = p > 0 || w > 0 ? CA(r.left + M, r.top + Math.min(H, r.height - G), Math.max(0, p - M), Math.max(0, w - G), oA.BOTTOM_LEFT) : new R(r.left + M, r.top + r.height - G), this.topLeftContentBox = s > 0 || a > 0 ? CA(r.left + M + z, r.top + E + nA, Math.max(0, s - (M + z)), Math.max(0, a - (E + nA)), oA.TOP_LEFT) : new R(r.left + M + z, r.top + E + nA), this.topRightContentBox = o > 0 || c > 0 ? CA(r.left + Math.min(v, r.width + M + z), r.top + E + nA, v > r.width + M + z ? 0 : o - M + z, c - (E + nA), oA.TOP_RIGHT) : new R(r.left + r.width - (N + cA), r.top + E + nA), this.bottomRightContentBox = f > 0 || h > 0 ? CA(r.left + Math.min(P, r.width - (M + z)), r.top + Math.min(D, r.height + E + nA), Math.max(0, f - (N + cA)), h - (G + BA), oA.BOTTOM_RIGHT) : new R(r.left + r.width - (N + cA), r.top + r.height - (G + BA)), this.bottomLeftContentBox = p > 0 || w > 0 ? CA(r.left + M + z, r.top + H, Math.max(0, p - (M + z)), w - (G + BA), oA.BOTTOM_LEFT) : new R(r.left + M + z, r.top + r.height - (G + BA));
|
16412
16413
|
}
|
16413
16414
|
return A;
|
16414
16415
|
}()
|
@@ -16712,8 +16713,8 @@ var CA = function(A, e, t, r, n) {
|
|
16712
16713
|
return [w, U];
|
16713
16714
|
}
|
16714
16715
|
if (o) {
|
16715
|
-
var y = 0,
|
16716
|
-
return yA(a) ? y = EA(a, t.width) : yA(u) && (
|
16716
|
+
var y = 0, v = 0;
|
16717
|
+
return yA(a) ? y = EA(a, t.width) : yA(u) && (v = EA(u, t.height)), Ot(a) ? y = v * s : (!u || Ot(u)) && (v = y / s), [y, v];
|
16717
16718
|
}
|
16718
16719
|
var D = null, P = null;
|
16719
16720
|
if (yA(a) ? D = EA(a, t.width) : u && yA(u) && (P = EA(u, t.height)), D !== null && (!u || Ot(u)) && (P = l && f ? D / r * n : t.height), P !== null && Ot(a) && (D = l && f ? P / n * r : t.width), D !== null && P !== null)
|
@@ -16902,7 +16903,7 @@ var CA = function(A, e, t, r, n) {
|
|
16902
16903
|
}
|
16903
16904
|
}, e.prototype.renderNodeContent = function(t) {
|
16904
16905
|
return zA(this, void 0, void 0, function() {
|
16905
|
-
var r, n, s, a, u, o,
|
16906
|
+
var r, n, s, a, u, o, v, v, c, l, f, h, P, C, p, H, w, U, y, v, D, P, H;
|
16906
16907
|
return JA(this, function(E) {
|
16907
16908
|
switch (E.label) {
|
16908
16909
|
case 0:
|
@@ -16922,7 +16923,7 @@ var CA = function(A, e, t, r, n) {
|
|
16922
16923
|
case 5:
|
16923
16924
|
return E.trys.push([5, 7, , 8]), [4, this.context.cache.match(r.src)];
|
16924
16925
|
case 6:
|
16925
|
-
return
|
16926
|
+
return v = E.sent(), this.renderReplacedElement(r, n, v), [3, 8];
|
16926
16927
|
case 7:
|
16927
16928
|
return E.sent(), this.context.logger.error("Error loading image " + r.src), [3, 8];
|
16928
16929
|
case 8:
|
@@ -16931,7 +16932,7 @@ var CA = function(A, e, t, r, n) {
|
|
16931
16932
|
case 9:
|
16932
16933
|
return E.trys.push([9, 11, , 12]), [4, this.context.cache.match(r.svg)];
|
16933
16934
|
case 10:
|
16934
|
-
return
|
16935
|
+
return v = E.sent(), this.renderReplacedElement(r, n, v), [3, 12];
|
16935
16936
|
case 11:
|
16936
16937
|
return E.sent(), this.context.logger.error("Error loading svg " + r.svg.substring(0, 255)), [3, 12];
|
16937
16938
|
case 12:
|
@@ -16977,11 +16978,11 @@ var CA = function(A, e, t, r, n) {
|
|
16977
16978
|
)) return [3, 20];
|
16978
16979
|
if (r.styles.listStyleImage === null) return [3, 19];
|
16979
16980
|
if (y = r.styles.listStyleImage, y.type !== 0) return [3, 18];
|
16980
|
-
|
16981
|
+
v = void 0, D = y.url, E.label = 15;
|
16981
16982
|
case 15:
|
16982
16983
|
return E.trys.push([15, 17, , 18]), [4, this.context.cache.match(D)];
|
16983
16984
|
case 16:
|
16984
|
-
return
|
16985
|
+
return v = E.sent(), this.ctx.drawImage(v, r.bounds.left - (v.width + 10), r.bounds.top), [3, 18];
|
16985
16986
|
case 17:
|
16986
16987
|
return E.sent(), this.context.logger.error("Error loading list-style-image " + D), [3, 18];
|
16987
16988
|
case 18:
|
@@ -16999,8 +17000,8 @@ var CA = function(A, e, t, r, n) {
|
|
16999
17000
|
}, e.prototype.renderStackContent = function(t) {
|
17000
17001
|
return zA(this, void 0, void 0, function() {
|
17001
17002
|
var r, n, y, s, a, y, u, o, y, c, l, y, f, h, y, C, p, y, w, U, y;
|
17002
|
-
return JA(this, function(
|
17003
|
-
switch (
|
17003
|
+
return JA(this, function(v) {
|
17004
|
+
switch (v.label) {
|
17004
17005
|
case 0:
|
17005
17006
|
if (NA(
|
17006
17007
|
t.element.container.flags,
|
@@ -17010,61 +17011,61 @@ var CA = function(A, e, t, r, n) {
|
|
17010
17011
|
debugger;
|
17011
17012
|
return [4, this.renderNodeBackgroundAndBorders(t.element)];
|
17012
17013
|
case 1:
|
17013
|
-
|
17014
|
+
v.sent(), r = 0, n = t.negativeZIndex, v.label = 2;
|
17014
17015
|
case 2:
|
17015
17016
|
return r < n.length ? (y = n[r], [4, this.renderStack(y)]) : [3, 5];
|
17016
17017
|
case 3:
|
17017
|
-
|
17018
|
+
v.sent(), v.label = 4;
|
17018
17019
|
case 4:
|
17019
17020
|
return r++, [3, 2];
|
17020
17021
|
case 5:
|
17021
17022
|
return [4, this.renderNodeContent(t.element)];
|
17022
17023
|
case 6:
|
17023
|
-
|
17024
|
+
v.sent(), s = 0, a = t.nonInlineLevel, v.label = 7;
|
17024
17025
|
case 7:
|
17025
17026
|
return s < a.length ? (y = a[s], [4, this.renderNode(y)]) : [3, 10];
|
17026
17027
|
case 8:
|
17027
|
-
|
17028
|
+
v.sent(), v.label = 9;
|
17028
17029
|
case 9:
|
17029
17030
|
return s++, [3, 7];
|
17030
17031
|
case 10:
|
17031
|
-
u = 0, o = t.nonPositionedFloats,
|
17032
|
+
u = 0, o = t.nonPositionedFloats, v.label = 11;
|
17032
17033
|
case 11:
|
17033
17034
|
return u < o.length ? (y = o[u], [4, this.renderStack(y)]) : [3, 14];
|
17034
17035
|
case 12:
|
17035
|
-
|
17036
|
+
v.sent(), v.label = 13;
|
17036
17037
|
case 13:
|
17037
17038
|
return u++, [3, 11];
|
17038
17039
|
case 14:
|
17039
|
-
c = 0, l = t.nonPositionedInlineLevel,
|
17040
|
+
c = 0, l = t.nonPositionedInlineLevel, v.label = 15;
|
17040
17041
|
case 15:
|
17041
17042
|
return c < l.length ? (y = l[c], [4, this.renderStack(y)]) : [3, 18];
|
17042
17043
|
case 16:
|
17043
|
-
|
17044
|
+
v.sent(), v.label = 17;
|
17044
17045
|
case 17:
|
17045
17046
|
return c++, [3, 15];
|
17046
17047
|
case 18:
|
17047
|
-
f = 0, h = t.inlineLevel,
|
17048
|
+
f = 0, h = t.inlineLevel, v.label = 19;
|
17048
17049
|
case 19:
|
17049
17050
|
return f < h.length ? (y = h[f], [4, this.renderNode(y)]) : [3, 22];
|
17050
17051
|
case 20:
|
17051
|
-
|
17052
|
+
v.sent(), v.label = 21;
|
17052
17053
|
case 21:
|
17053
17054
|
return f++, [3, 19];
|
17054
17055
|
case 22:
|
17055
|
-
C = 0, p = t.zeroOrAutoZIndexOrTransformedOrOpacity,
|
17056
|
+
C = 0, p = t.zeroOrAutoZIndexOrTransformedOrOpacity, v.label = 23;
|
17056
17057
|
case 23:
|
17057
17058
|
return C < p.length ? (y = p[C], [4, this.renderStack(y)]) : [3, 26];
|
17058
17059
|
case 24:
|
17059
|
-
|
17060
|
+
v.sent(), v.label = 25;
|
17060
17061
|
case 25:
|
17061
17062
|
return C++, [3, 23];
|
17062
17063
|
case 26:
|
17063
|
-
w = 0, U = t.positiveZIndex,
|
17064
|
+
w = 0, U = t.positiveZIndex, v.label = 27;
|
17064
17065
|
case 27:
|
17065
17066
|
return w < U.length ? (y = U[w], [4, this.renderStack(y)]) : [3, 30];
|
17066
17067
|
case 28:
|
17067
|
-
|
17068
|
+
v.sent(), v.label = 29;
|
17068
17069
|
case 29:
|
17069
17070
|
return w++, [3, 27];
|
17070
17071
|
case 30:
|
@@ -17102,7 +17103,7 @@ var CA = function(A, e, t, r, n) {
|
|
17102
17103
|
switch (c.label) {
|
17103
17104
|
case 0:
|
17104
17105
|
r = t.styles.backgroundImage.length - 1, n = function(l) {
|
17105
|
-
var f, h, C,
|
17106
|
+
var f, h, C, nA, gA, bA, z, aA, G, p, nA, gA, bA, z, aA, w, U, y, v, D, P, H, E, N, G, M, nA, cA, BA, z, aA, lA, gA, bA, ZA, LA, WA, xA, ee, _A, GA, I;
|
17106
17107
|
return JA(this, function(_) {
|
17107
17108
|
switch (_.label) {
|
17108
17109
|
case 0:
|
@@ -17119,17 +17120,17 @@ var CA = function(A, e, t, r, n) {
|
|
17119
17120
|
f.width,
|
17120
17121
|
f.height,
|
17121
17122
|
f.width / f.height
|
17122
|
-
]),
|
17123
|
+
]), nA = C[0], gA = C[1], bA = C[2], z = C[3], aA = C[4], G = s.ctx.createPattern(s.resizeImage(f, z, aA), "repeat"), s.renderRepeat(nA, G, gA, bA)), [3, 6];
|
17123
17124
|
case 5:
|
17124
|
-
nw(l) ? (p = oa(t, r, [null, null, null]),
|
17125
|
-
return N.addColorStop(
|
17126
|
-
}), E.fillStyle = N, E.fillRect(0, 0, z,
|
17125
|
+
nw(l) ? (p = oa(t, r, [null, null, null]), nA = p[0], gA = p[1], bA = p[2], z = p[3], aA = p[4], w = z1(l.angle, z, aA), U = w[0], y = w[1], v = w[2], D = w[3], P = w[4], H = document.createElement("canvas"), H.width = z, H.height = aA, E = H.getContext("2d"), N = E.createLinearGradient(y, D, v, P), no(l.stops, U).forEach(function(iA) {
|
17126
|
+
return N.addColorStop(iA.stop, OA(iA.color));
|
17127
|
+
}), E.fillStyle = N, E.fillRect(0, 0, z, aA), z > 0 && aA > 0 && (G = s.ctx.createPattern(H, "repeat"), s.renderRepeat(nA, G, gA, bA))) : sw(l) && (M = oa(t, r, [
|
17127
17128
|
null,
|
17128
17129
|
null,
|
17129
17130
|
null
|
17130
|
-
]),
|
17131
|
-
return xA.addColorStop(
|
17132
|
-
}), s.path(
|
17131
|
+
]), nA = M[0], cA = M[1], BA = M[2], z = M[3], aA = M[4], lA = l.position.length === 0 ? [Hi] : l.position, gA = EA(lA[0], z), bA = EA(lA[lA.length - 1], aA), ZA = Aw(l, gA, bA, z, aA), LA = ZA[0], WA = ZA[1], LA > 0 && WA > 0 && (xA = s.ctx.createRadialGradient(cA + gA, BA + bA, 0, cA + gA, BA + bA, LA), no(l.stops, LA * 2).forEach(function(iA) {
|
17132
|
+
return xA.addColorStop(iA.stop, OA(iA.color));
|
17133
|
+
}), s.path(nA), s.ctx.fillStyle = xA, LA !== WA ? (ee = t.bounds.left + 0.5 * t.bounds.width, _A = t.bounds.top + 0.5 * t.bounds.height, GA = WA / LA, I = 1 / GA, s.ctx.save(), s.ctx.translate(ee, _A), s.ctx.transform(1, 0, 0, GA, 0, 0), s.ctx.translate(-ee, -_A), s.ctx.fillRect(cA, I * (BA - _A) + _A, z, aA * I), s.ctx.restore()) : s.ctx.fill())), _.label = 6;
|
17133
17134
|
case 6:
|
17134
17135
|
return r--, [
|
17135
17136
|
2
|
@@ -17248,9 +17249,9 @@ var CA = function(A, e, t, r, n) {
|
|
17248
17249
|
});
|
17249
17250
|
}, e.prototype.renderDashedDottedBorder = function(t, r, n, s, a) {
|
17250
17251
|
return zA(this, void 0, void 0, function() {
|
17251
|
-
var u, o, c, l, f, h, C, p, w, U, y,
|
17252
|
+
var u, o, c, l, f, h, C, p, w, U, y, v, D, P, H, E, H, E;
|
17252
17253
|
return JA(this, function(N) {
|
17253
|
-
return this.ctx.save(), u = cU(s, n), o = Do(s, n), a === 2 && (this.path(o), this.ctx.clip()), ge(o[0]) ? (c = o[0].start.x, l = o[0].start.y) : (c = o[0].x, l = o[0].y), ge(o[1]) ? (f = o[1].end.x, h = o[1].end.y) : (f = o[1].x, h = o[1].y), n === 0 || n === 2 ? C = Math.abs(c - f) : C = Math.abs(l - h), this.ctx.beginPath(), a === 3 ? this.formatPath(u) : this.formatPath(o.slice(0, 2)), p = r < 3 ? r * 3 : r * 2, w = r < 3 ? r * 2 : r, a === 3 && (p = r, w = r), U = !0, C <= p * 2 ? U = !1 : C <= p * 2 + w ? (y = C / (2 * p + w), p *= y, w *= y) : (
|
17254
|
+
return this.ctx.save(), u = cU(s, n), o = Do(s, n), a === 2 && (this.path(o), this.ctx.clip()), ge(o[0]) ? (c = o[0].start.x, l = o[0].start.y) : (c = o[0].x, l = o[0].y), ge(o[1]) ? (f = o[1].end.x, h = o[1].end.y) : (f = o[1].x, h = o[1].y), n === 0 || n === 2 ? C = Math.abs(c - f) : C = Math.abs(l - h), this.ctx.beginPath(), a === 3 ? this.formatPath(u) : this.formatPath(o.slice(0, 2)), p = r < 3 ? r * 3 : r * 2, w = r < 3 ? r * 2 : r, a === 3 && (p = r, w = r), U = !0, C <= p * 2 ? U = !1 : C <= p * 2 + w ? (y = C / (2 * p + w), p *= y, w *= y) : (v = Math.floor((C + w) / (p + w)), D = (C - v * p) / (v - 1), P = (C - (v + 1) * p) / v, w = P <= 0 || Math.abs(w - D) < Math.abs(w - P) ? D : P), U && (a === 3 ? this.ctx.setLineDash([0, p + w]) : this.ctx.setLineDash([p, w])), a === 3 ? (this.ctx.lineCap = "round", this.ctx.lineWidth = r) : this.ctx.lineWidth = r * 2 + 1.1, this.ctx.strokeStyle = OA(t), this.ctx.stroke(), this.ctx.setLineDash([]), a === 2 && (ge(o[0]) && (H = o[3], E = o[0], this.ctx.beginPath(), this.formatPath([new R(H.end.x, H.end.y), new R(E.start.x, E.start.y)]), this.ctx.stroke()), ge(o[1]) && (H = o[1], E = o[2], this.ctx.beginPath(), this.formatPath([new R(H.end.x, H.end.y), new R(E.start.x, E.start.y)]), this.ctx.stroke())), this.ctx.restore(), [
|
17254
17255
|
2
|
17255
17256
|
/*return*/
|
17256
17257
|
];
|
@@ -17367,9 +17368,9 @@ var CA = function(A, e, t, r, n) {
|
|
17367
17368
|
typeof window < "u" && E0.setContext(window);
|
17368
17369
|
var _U = function(A, e) {
|
17369
17370
|
return zA(void 0, void 0, void 0, function() {
|
17370
|
-
var t, r, n, s, a, u, o, c, l, f, h, C, p, w, U, y,
|
17371
|
-
return JA(this, function(
|
17372
|
-
switch (
|
17371
|
+
var t, r, n, s, a, u, o, c, l, f, h, C, p, w, U, y, v, D, P, H, N, E, N, G, M, nA, cA, BA, z, aA, lA, gA, bA, ZA, LA, WA, xA, ee, _A, GA;
|
17372
|
+
return JA(this, function(I) {
|
17373
|
+
switch (I.label) {
|
17373
17374
|
case 0:
|
17374
17375
|
if (!A || typeof A != "object")
|
17375
17376
|
return [2, Promise.reject("Invalid element provided as first argument")];
|
@@ -17381,11 +17382,11 @@ var _U = function(A, e) {
|
|
17381
17382
|
allowTaint: (G = e.allowTaint) !== null && G !== void 0 ? G : !1,
|
17382
17383
|
imageTimeout: (M = e.imageTimeout) !== null && M !== void 0 ? M : 15e3,
|
17383
17384
|
proxy: e.proxy,
|
17384
|
-
useCORS: (
|
17385
|
+
useCORS: (nA = e.useCORS) !== null && nA !== void 0 ? nA : !1
|
17385
17386
|
}, s = Da({ logging: (cA = e.logging) !== null && cA !== void 0 ? cA : !0, cache: e.cache }, n), a = {
|
17386
17387
|
windowWidth: (BA = e.windowWidth) !== null && BA !== void 0 ? BA : r.innerWidth,
|
17387
17388
|
windowHeight: (z = e.windowHeight) !== null && z !== void 0 ? z : r.innerHeight,
|
17388
|
-
scrollX: (
|
17389
|
+
scrollX: (aA = e.scrollX) !== null && aA !== void 0 ? aA : r.pageXOffset,
|
17389
17390
|
scrollY: (lA = e.scrollY) !== null && lA !== void 0 ? lA : r.pageYOffset
|
17390
17391
|
}, u = new Ge(a.scrollX, a.scrollY, a.windowWidth, a.windowHeight), o = new IU(s, u), c = (gA = e.foreignObjectRendering) !== null && gA !== void 0 ? gA : !1, l = {
|
17391
17392
|
allowTaint: (bA = e.allowTaint) !== null && bA !== void 0 ? bA : !1,
|
@@ -17395,21 +17396,21 @@ var _U = function(A, e) {
|
|
17395
17396
|
copyStyles: c
|
17396
17397
|
}, o.logger.debug("Starting document clone with size " + u.width + "x" + u.height + " scrolled to " + -u.left + "," + -u.top), f = new xo(o, A, l), h = f.clonedReferenceElement, h ? [4, f.toIFrame(t, u)] : [2, Promise.reject("Unable to find element in cloned iframe")];
|
17397
17398
|
case 1:
|
17398
|
-
return C =
|
17399
|
+
return C = I.sent(), p = Mi(h) || yb(h) ? am(h.ownerDocument) : ps(o, h), w = p.width, U = p.height, y = p.left, v = p.top, D = yU(o, h, e.backgroundColor), P = {
|
17399
17400
|
canvas: e.canvas,
|
17400
17401
|
backgroundColor: D,
|
17401
17402
|
scale: (LA = (ZA = e.scale) !== null && ZA !== void 0 ? ZA : r.devicePixelRatio) !== null && LA !== void 0 ? LA : 1,
|
17402
17403
|
x: ((WA = e.x) !== null && WA !== void 0 ? WA : 0) + y,
|
17403
|
-
y: ((xA = e.y) !== null && xA !== void 0 ? xA : 0) +
|
17404
|
+
y: ((xA = e.y) !== null && xA !== void 0 ? xA : 0) + v,
|
17404
17405
|
width: (ee = e.width) !== null && ee !== void 0 ? ee : Math.ceil(w),
|
17405
17406
|
height: (_A = e.height) !== null && _A !== void 0 ? _A : Math.ceil(U)
|
17406
17407
|
}, c ? (o.logger.debug("Document cloned, using foreign object rendering"), N = new UU(o, P), [4, N.render(h)]) : [3, 3];
|
17407
17408
|
case 2:
|
17408
|
-
return H =
|
17409
|
+
return H = I.sent(), [3, 5];
|
17409
17410
|
case 3:
|
17410
|
-
return o.logger.debug("Document cloned, element located at " + y + "," +
|
17411
|
+
return o.logger.debug("Document cloned, element located at " + y + "," + v + " with size " + w + "x" + U + " using computed rendering"), o.logger.debug("Starting DOM parsing"), E = o0(o, h), D === E.styles.backgroundColor && (E.styles.backgroundColor = Ke.TRANSPARENT), o.logger.debug("Starting renderer for element at " + P.x + "," + P.y + " with size " + P.width + "x" + P.height), N = new pU(o, P), [4, N.render(E)];
|
17411
17412
|
case 4:
|
17412
|
-
H =
|
17413
|
+
H = I.sent(), I.label = 5;
|
17413
17414
|
case 5:
|
17414
17415
|
return (!((GA = e.removeContainer) !== null && GA !== void 0) || GA) && (xo.destroy(C) || o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")), o.logger.debug("Finished rendering"), [2, H];
|
17415
17416
|
}
|
@@ -17612,7 +17613,7 @@ const Ro = /* @__PURE__ */ ft(SU, [["render", LU], ["__scopeId", "data-v-e181518
|
|
17612
17613
|
},
|
17613
17614
|
{ immediate: !0 }
|
17614
17615
|
);
|
17615
|
-
const h = $(), C = $(), p = $(), w = $(), U = $(), y = $(),
|
17616
|
+
const h = $(), C = $(), p = $(), w = $(), U = $(), y = $(), v = $(""), D = $(r.mode === "design");
|
17616
17617
|
Ae(
|
17617
17618
|
() => r.rules,
|
17618
17619
|
(Q) => {
|
@@ -17687,7 +17688,7 @@ const Ro = /* @__PURE__ */ ft(SU, [["render", LU], ["__scopeId", "data-v-e181518
|
|
17687
17688
|
f.value = (/* @__PURE__ */ new Date()).getTime().toString(), AA.success("保存成功"), n("update:element", u.value);
|
17688
17689
|
}
|
17689
17690
|
}
|
17690
|
-
function
|
17691
|
+
function nA(Q) {
|
17691
17692
|
const x = N(u.value, Q.xpath || "");
|
17692
17693
|
x && (x.rule = Q.rule, x.type = Q.type, x.children && Q.children && x.children.forEach((O) => {
|
17693
17694
|
const Y = Q.children.find((FA) => FA.xpath === O.xpath);
|
@@ -17726,7 +17727,7 @@ const Ro = /* @__PURE__ */ ft(SU, [["render", LU], ["__scopeId", "data-v-e181518
|
|
17726
17727
|
rule: (DA == null ? void 0 : DA.rule) || {}
|
17727
17728
|
};
|
17728
17729
|
}
|
17729
|
-
function
|
17730
|
+
function aA(Q) {
|
17730
17731
|
const x = N(u.value, Q.element.xpath);
|
17731
17732
|
if (x) {
|
17732
17733
|
const O = Mo(x);
|
@@ -17763,7 +17764,7 @@ const Ro = /* @__PURE__ */ ft(SU, [["render", LU], ["__scopeId", "data-v-e181518
|
|
17763
17764
|
}
|
17764
17765
|
const DA = Y.children.length, { minBlock: le, maxBlock: ue } = x.rule;
|
17765
17766
|
if ((Q === "add" || Q === "copy") && DA >= (ue || 1 / 0)) {
|
17766
|
-
|
17767
|
+
v.value = `无法添加更多块。最大块数量为 ${ue}`, AA.error(v.value);
|
17767
17768
|
return;
|
17768
17769
|
}
|
17769
17770
|
function Xe(dA) {
|
@@ -17806,13 +17807,13 @@ const Ro = /* @__PURE__ */ ft(SU, [["render", LU], ["__scopeId", "data-v-e181518
|
|
17806
17807
|
break;
|
17807
17808
|
case "delete":
|
17808
17809
|
if (DA <= (le || 0)) {
|
17809
|
-
|
17810
|
+
v.value = `无法删除更多块。最小块数量为 ${le}`, AA.error(v.value);
|
17810
17811
|
return;
|
17811
17812
|
}
|
17812
17813
|
Y.children.splice(FA, 1), AA.success("删除成功");
|
17813
17814
|
break;
|
17814
17815
|
}
|
17815
|
-
|
17816
|
+
v.value = "", lA(u.value);
|
17816
17817
|
}
|
17817
17818
|
function bA(Q, x) {
|
17818
17819
|
let O = x.attrs.class.replace(/icon-\S+/g, `icon-${Q}`);
|
@@ -17860,17 +17861,17 @@ const Ro = /* @__PURE__ */ ft(SU, [["render", LU], ["__scopeId", "data-v-e181518
|
|
17860
17861
|
}) : (x.attrs.src = O.thumbUrl, f.value = (/* @__PURE__ */ new Date()).getTime().toString()));
|
17861
17862
|
}
|
17862
17863
|
const _A = $(r.previewWidth), GA = $(360);
|
17863
|
-
let
|
17864
|
+
let I = $(!1), _ = $(""), iA = 0, Z = 0;
|
17864
17865
|
function QA(Q) {
|
17865
|
-
_.value = Q,
|
17866
|
+
_.value = Q, I.value = !0, iA = event.clientX, Q === "preview" ? Z = _A.value : Q === "structure" && (Z = GA.value), window.addEventListener("mousemove", Ve), window.addEventListener("mouseup", tr);
|
17866
17867
|
}
|
17867
17868
|
function Ve(Q) {
|
17868
|
-
if (!
|
17869
|
-
const x = Q.clientX -
|
17869
|
+
if (!I.value) return;
|
17870
|
+
const x = Q.clientX - iA;
|
17870
17871
|
_.value === "preview" ? _A.value = Math.max(200, Z + x) : _.value === "structure" && (GA.value = Math.max(200, Z - x));
|
17871
17872
|
}
|
17872
17873
|
function tr() {
|
17873
|
-
|
17874
|
+
I.value = !1, _.value = "", window.removeEventListener("mousemove", Ve), window.removeEventListener("mouseup", tr);
|
17874
17875
|
}
|
17875
17876
|
const Ye = $(!1), ht = $("");
|
17876
17877
|
function vs() {
|
@@ -17951,10 +17952,10 @@ const Ro = /* @__PURE__ */ ft(SU, [["render", LU], ["__scopeId", "data-v-e181518
|
|
17951
17952
|
onSelectElement: H,
|
17952
17953
|
onHoverElement: E,
|
17953
17954
|
onContentUpdated: cA,
|
17954
|
-
onUpdateText:
|
17955
|
+
onUpdateText: aA,
|
17955
17956
|
onBlockAction: gA,
|
17956
17957
|
onAddIcon: bA,
|
17957
|
-
onUpdateElementRule:
|
17958
|
+
onUpdateElementRule: nA
|
17958
17959
|
}, null, 8, ["upload-by-file", "cropper", "icon", "upload", "mode", "icons", "r", "show-margin", "element", "selectedElement", "hoveredElement"])) : q("", !0)
|
17959
17960
|
])
|
17960
17961
|
]),
|