gp-designer 1.0.32 → 1.0.33
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/gp-designer.es.js +277 -263
- package/dist/gp-designer.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gp-designer.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent as
|
1
|
+
import { defineComponent as Ke, computed as At, ref as $, watch as qe, resolveComponent as Qu, openBlock as v, createElementBlock as R, Fragment as Zt, createBlock as Ct, resolveDynamicComponent as ju, mergeProps as zu, withModifiers as ye, withCtx as Ya, createTextVNode as Ei, toDisplayString as Ce, renderList as Fi, unref as de, createElementVNode as x, createCommentVNode as H, toRaw as hn, Transition as Ku, normalizeClass as fn, renderSlot as Jt, reactive as Zu, createApp as Ju, h as Es, withDirectives as at, vModelSelect as er, vModelText as Tt, createVNode as ut, toRefs as tr, normalizeStyle as Ts } from "vue";
|
2
2
|
var K;
|
3
3
|
(function(e) {
|
4
4
|
e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
|
@@ -179,7 +179,7 @@ function B(e) {
|
|
179
179
|
function qa(e) {
|
180
180
|
return e.type === K.CDATA;
|
181
181
|
}
|
182
|
-
function
|
182
|
+
function Qe(e) {
|
183
183
|
return e.type === K.Text;
|
184
184
|
}
|
185
185
|
function Va(e) {
|
@@ -196,7 +196,7 @@ function Te(e) {
|
|
196
196
|
}
|
197
197
|
function oa(e, t = !1) {
|
198
198
|
let a;
|
199
|
-
if (
|
199
|
+
if (Qe(e))
|
200
200
|
a = new ra(e.data);
|
201
201
|
else if (Va(e))
|
202
202
|
a = new Yi(e.data);
|
@@ -863,13 +863,13 @@ function kr(e, t) {
|
|
863
863
|
}
|
864
864
|
function Oa(e) {
|
865
865
|
return Array.isArray(e) ? e.map(Oa).join("") : B(e) ? e.name === "br" ? `
|
866
|
-
` : Oa(e.children) : qa(e) ? Oa(e.children) :
|
866
|
+
` : Oa(e.children) : qa(e) ? Oa(e.children) : Qe(e) ? e.data : "";
|
867
867
|
}
|
868
868
|
function Bt(e) {
|
869
|
-
return Array.isArray(e) ? e.map(Bt).join("") : Te(e) && !Va(e) ? Bt(e.children) :
|
869
|
+
return Array.isArray(e) ? e.map(Bt).join("") : Te(e) && !Va(e) ? Bt(e.children) : Qe(e) ? e.data : "";
|
870
870
|
}
|
871
871
|
function va(e) {
|
872
|
-
return Array.isArray(e) ? e.map(va).join("") : Te(e) && (e.type === K.Tag || qa(e)) ? va(e.children) :
|
872
|
+
return Array.isArray(e) ? e.map(va).join("") : Te(e) && (e.type === K.Tag || qa(e)) ? va(e.children) : Qe(e) ? e.data : "";
|
873
873
|
}
|
874
874
|
function Wa(e) {
|
875
875
|
return Te(e) ? e.children : [];
|
@@ -1017,7 +1017,7 @@ const La = {
|
|
1017
1017
|
return typeof e == "function" ? (t) => e(t.type) : (t) => t.type === e;
|
1018
1018
|
},
|
1019
1019
|
tag_contains(e) {
|
1020
|
-
return typeof e == "function" ? (t) =>
|
1020
|
+
return typeof e == "function" ? (t) => Qe(t) && e(t.data) : (t) => Qe(t) && t.data === e;
|
1021
1021
|
}
|
1022
1022
|
};
|
1023
1023
|
function xn(e, t) {
|
@@ -1206,7 +1206,7 @@ const Xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1206
1206
|
isComment: Va,
|
1207
1207
|
isDocument: dt,
|
1208
1208
|
isTag: B,
|
1209
|
-
isText:
|
1209
|
+
isText: Qe,
|
1210
1210
|
nextElementSibling: Xi,
|
1211
1211
|
prepend: Vr,
|
1212
1212
|
prependChild: qr,
|
@@ -3573,10 +3573,10 @@ var Nt;
|
|
3573
3573
|
(function(e) {
|
3574
3574
|
e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
|
3575
3575
|
})(Nt || (Nt = {}));
|
3576
|
-
var
|
3576
|
+
var Re;
|
3577
3577
|
(function(e) {
|
3578
3578
|
e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
|
3579
|
-
})(
|
3579
|
+
})(Re || (Re = {}));
|
3580
3580
|
var p;
|
3581
3581
|
(function(e) {
|
3582
3582
|
e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SEARCH = "search", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp";
|
@@ -5981,11 +5981,11 @@ class Yl {
|
|
5981
5981
|
}
|
5982
5982
|
}
|
5983
5983
|
const li = 3;
|
5984
|
-
var
|
5984
|
+
var Ge;
|
5985
5985
|
(function(e) {
|
5986
5986
|
e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element";
|
5987
|
-
})(
|
5988
|
-
const ws = { type:
|
5987
|
+
})(Ge || (Ge = {}));
|
5988
|
+
const ws = { type: Ge.Marker };
|
5989
5989
|
class ql {
|
5990
5990
|
constructor(t) {
|
5991
5991
|
this.treeAdapter = t, this.entries = [], this.bookmark = null;
|
@@ -5997,7 +5997,7 @@ class ql {
|
|
5997
5997
|
const i = [], s = a.length, u = this.treeAdapter.getTagName(t), r = this.treeAdapter.getNamespaceURI(t);
|
5998
5998
|
for (let o = 0; o < this.entries.length; o++) {
|
5999
5999
|
const c = this.entries[o];
|
6000
|
-
if (c.type ===
|
6000
|
+
if (c.type === Ge.Marker)
|
6001
6001
|
break;
|
6002
6002
|
const { element: d } = c;
|
6003
6003
|
if (this.treeAdapter.getTagName(d) === u && this.treeAdapter.getNamespaceURI(d) === r) {
|
@@ -6026,7 +6026,7 @@ class ql {
|
|
6026
6026
|
}
|
6027
6027
|
pushElement(t, a) {
|
6028
6028
|
this._ensureNoahArkCondition(t), this.entries.unshift({
|
6029
|
-
type:
|
6029
|
+
type: Ge.Element,
|
6030
6030
|
element: t,
|
6031
6031
|
token: a
|
6032
6032
|
});
|
@@ -6034,7 +6034,7 @@ class ql {
|
|
6034
6034
|
insertElementAfterBookmark(t, a) {
|
6035
6035
|
const i = this.entries.indexOf(this.bookmark);
|
6036
6036
|
this.entries.splice(i, 0, {
|
6037
|
-
type:
|
6037
|
+
type: Ge.Element,
|
6038
6038
|
element: t,
|
6039
6039
|
token: a
|
6040
6040
|
});
|
@@ -6054,19 +6054,19 @@ class ql {
|
|
6054
6054
|
}
|
6055
6055
|
//Search
|
6056
6056
|
getElementEntryInScopeWithTagName(t) {
|
6057
|
-
const a = this.entries.find((i) => i.type ===
|
6058
|
-
return a && a.type ===
|
6057
|
+
const a = this.entries.find((i) => i.type === Ge.Marker || this.treeAdapter.getTagName(i.element) === t);
|
6058
|
+
return a && a.type === Ge.Element ? a : null;
|
6059
6059
|
}
|
6060
6060
|
getElementEntry(t) {
|
6061
|
-
return this.entries.find((a) => a.type ===
|
6061
|
+
return this.entries.find((a) => a.type === Ge.Element && a.element === t);
|
6062
6062
|
}
|
6063
6063
|
}
|
6064
|
-
const
|
6064
|
+
const et = {
|
6065
6065
|
//Node construction
|
6066
6066
|
createDocument() {
|
6067
6067
|
return {
|
6068
6068
|
nodeName: "#document",
|
6069
|
-
mode:
|
6069
|
+
mode: Re.NO_QUIRKS,
|
6070
6070
|
childNodes: []
|
6071
6071
|
};
|
6072
6072
|
},
|
@@ -6126,7 +6126,7 @@ const Je = {
|
|
6126
6126
|
systemId: i,
|
6127
6127
|
parentNode: null
|
6128
6128
|
};
|
6129
|
-
|
6129
|
+
et.appendChild(e, u);
|
6130
6130
|
}
|
6131
6131
|
},
|
6132
6132
|
setDocumentMode(e, t) {
|
@@ -6144,16 +6144,16 @@ const Je = {
|
|
6144
6144
|
insertText(e, t) {
|
6145
6145
|
if (e.childNodes.length > 0) {
|
6146
6146
|
const a = e.childNodes[e.childNodes.length - 1];
|
6147
|
-
if (
|
6147
|
+
if (et.isTextNode(a)) {
|
6148
6148
|
a.value += t;
|
6149
6149
|
return;
|
6150
6150
|
}
|
6151
6151
|
}
|
6152
|
-
|
6152
|
+
et.appendChild(e, et.createTextNode(t));
|
6153
6153
|
},
|
6154
6154
|
insertTextBefore(e, t, a) {
|
6155
6155
|
const i = e.childNodes[e.childNodes.indexOf(a) - 1];
|
6156
|
-
i &&
|
6156
|
+
i && et.isTextNode(i) ? i.value += t : et.insertBefore(e, et.createTextNode(t), a);
|
6157
6157
|
},
|
6158
6158
|
adoptAttributes(e, t) {
|
6159
6159
|
const a = new Set(e.attrs.map((i) => i.name));
|
@@ -6295,21 +6295,21 @@ function Ql(e) {
|
|
6295
6295
|
}
|
6296
6296
|
function jl(e) {
|
6297
6297
|
if (e.name !== ou)
|
6298
|
-
return
|
6298
|
+
return Re.QUIRKS;
|
6299
6299
|
const { systemId: t } = e;
|
6300
6300
|
if (t && t.toLowerCase() === $l)
|
6301
|
-
return
|
6301
|
+
return Re.QUIRKS;
|
6302
6302
|
let { publicId: a } = e;
|
6303
6303
|
if (a !== null) {
|
6304
6304
|
if (a = a.toLowerCase(), Gl.has(a))
|
6305
|
-
return
|
6305
|
+
return Re.QUIRKS;
|
6306
6306
|
let i = t === null ? Wl : cu;
|
6307
6307
|
if (Bs(a, i))
|
6308
|
-
return
|
6308
|
+
return Re.QUIRKS;
|
6309
6309
|
if (i = t === null ? lu : Xl, Bs(a, i))
|
6310
|
-
return
|
6310
|
+
return Re.LIMITED_QUIRKS;
|
6311
6311
|
}
|
6312
|
-
return
|
6312
|
+
return Re.NO_QUIRKS;
|
6313
6313
|
}
|
6314
6314
|
const Us = {
|
6315
6315
|
TEXT_HTML: "text/html",
|
@@ -6526,7 +6526,7 @@ const l0 = {
|
|
6526
6526
|
}, fu = /* @__PURE__ */ new Set([n.TABLE, n.TBODY, n.TFOOT, n.THEAD, n.TR]), Fs = {
|
6527
6527
|
scriptingEnabled: !0,
|
6528
6528
|
sourceCodeLocationInfo: !1,
|
6529
|
-
treeAdapter:
|
6529
|
+
treeAdapter: et,
|
6530
6530
|
onParseError: null
|
6531
6531
|
};
|
6532
6532
|
let mu = class {
|
@@ -6794,7 +6794,7 @@ let mu = class {
|
|
6794
6794
|
_reconstructActiveFormattingElements() {
|
6795
6795
|
const t = this.activeFormattingElements.entries.length;
|
6796
6796
|
if (t) {
|
6797
|
-
const a = this.activeFormattingElements.entries.findIndex((s) => s.type ===
|
6797
|
+
const a = this.activeFormattingElements.entries.findIndex((s) => s.type === Ge.Marker || this.openElements.contains(s.element)), i = a < 0 ? t - 1 : a - 1;
|
6798
6798
|
for (let s = i; s >= 0; s--) {
|
6799
6799
|
const u = this.activeFormattingElements.entries[s];
|
6800
6800
|
this._insertElement(u.token, this.treeAdapter.getNamespaceURI(u.element)), u.element = this.openElements.current;
|
@@ -7147,7 +7147,7 @@ let mu = class {
|
|
7147
7147
|
break;
|
7148
7148
|
}
|
7149
7149
|
case m.IN_HEAD: {
|
7150
|
-
|
7150
|
+
Ve(this, t);
|
7151
7151
|
break;
|
7152
7152
|
}
|
7153
7153
|
case m.IN_HEAD_NO_SCRIPT: {
|
@@ -7507,11 +7507,11 @@ function rs(e, t) {
|
|
7507
7507
|
}
|
7508
7508
|
function g0(e, t) {
|
7509
7509
|
e._setDocumentType(t);
|
7510
|
-
const a = t.forceQuirks ?
|
7510
|
+
const a = t.forceQuirks ? Re.QUIRKS : jl(t);
|
7511
7511
|
Ql(t) || e._err(t, b.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, a), e.insertionMode = m.BEFORE_HTML;
|
7512
7512
|
}
|
7513
7513
|
function $t(e, t) {
|
7514
|
-
e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document,
|
7514
|
+
e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Re.QUIRKS), e.insertionMode = m.BEFORE_HTML, e._processToken(t);
|
7515
7515
|
}
|
7516
7516
|
function _0(e, t) {
|
7517
7517
|
t.tagID === n.HTML ? (e._insertElement(t, N.HTML), e.insertionMode = m.BEFORE_HEAD) : ta(e, t);
|
@@ -7544,7 +7544,7 @@ function C0(e, t) {
|
|
7544
7544
|
function aa(e, t) {
|
7545
7545
|
e._insertFakeElement(p.HEAD, n.HEAD), e.headElement = e.openElements.current, e.insertionMode = m.IN_HEAD, e._processToken(t);
|
7546
7546
|
}
|
7547
|
-
function
|
7547
|
+
function Ve(e, t) {
|
7548
7548
|
switch (t.tagID) {
|
7549
7549
|
case n.HTML: {
|
7550
7550
|
ge(e, t);
|
@@ -7626,7 +7626,7 @@ function S0(e, t) {
|
|
7626
7626
|
case n.META:
|
7627
7627
|
case n.NOFRAMES:
|
7628
7628
|
case n.STYLE: {
|
7629
|
-
|
7629
|
+
Ve(e, t);
|
7630
7630
|
break;
|
7631
7631
|
}
|
7632
7632
|
case n.NOSCRIPT: {
|
@@ -7679,7 +7679,7 @@ function O0(e, t) {
|
|
7679
7679
|
case n.STYLE:
|
7680
7680
|
case n.TEMPLATE:
|
7681
7681
|
case n.TITLE: {
|
7682
|
-
e._err(t, b.abandonedHeadElementChild), e.openElements.push(e.headElement, n.HEAD),
|
7682
|
+
e._err(t, b.abandonedHeadElementChild), e.openElements.push(e.headElement, n.HEAD), Ve(e, t), e.openElements.remove(e.headElement);
|
7683
7683
|
break;
|
7684
7684
|
}
|
7685
7685
|
case n.HEAD: {
|
@@ -7801,7 +7801,7 @@ function q0(e, t) {
|
|
7801
7801
|
e._reconstructActiveFormattingElements(), e._insertElement(t, N.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
|
7802
7802
|
}
|
7803
7803
|
function V0(e, t) {
|
7804
|
-
e.treeAdapter.getDocumentMode(e.document) !==
|
7804
|
+
e.treeAdapter.getDocumentMode(e.document) !== Re.QUIRKS && e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, N.HTML), e.framesetOk = !1, e.insertionMode = m.IN_TABLE;
|
7805
7805
|
}
|
7806
7806
|
function pu(e, t) {
|
7807
7807
|
e._reconstructActiveFormattingElements(), e._appendElement(t, N.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
|
@@ -7968,7 +7968,7 @@ function ge(e, t) {
|
|
7968
7968
|
case n.BGSOUND:
|
7969
7969
|
case n.BASEFONT:
|
7970
7970
|
case n.TEMPLATE: {
|
7971
|
-
|
7971
|
+
Ve(e, t);
|
7972
7972
|
break;
|
7973
7973
|
}
|
7974
7974
|
case n.BODY: {
|
@@ -8275,7 +8275,7 @@ function Ut(e, t) {
|
|
8275
8275
|
case n.STYLE:
|
8276
8276
|
case n.SCRIPT:
|
8277
8277
|
case n.TEMPLATE: {
|
8278
|
-
|
8278
|
+
Ve(e, t);
|
8279
8279
|
break;
|
8280
8280
|
}
|
8281
8281
|
case n.COL: {
|
@@ -8397,7 +8397,7 @@ function os(e, t) {
|
|
8397
8397
|
break;
|
8398
8398
|
}
|
8399
8399
|
case n.TEMPLATE: {
|
8400
|
-
|
8400
|
+
Ve(e, t);
|
8401
8401
|
break;
|
8402
8402
|
}
|
8403
8403
|
default:
|
@@ -8579,7 +8579,7 @@ function Su(e, t) {
|
|
8579
8579
|
}
|
8580
8580
|
case n.SCRIPT:
|
8581
8581
|
case n.TEMPLATE: {
|
8582
|
-
|
8582
|
+
Ve(e, t);
|
8583
8583
|
break;
|
8584
8584
|
}
|
8585
8585
|
}
|
@@ -8624,7 +8624,7 @@ function Ld(e, t) {
|
|
8624
8624
|
case n.STYLE:
|
8625
8625
|
case n.TEMPLATE:
|
8626
8626
|
case n.TITLE: {
|
8627
|
-
|
8627
|
+
Ve(e, t);
|
8628
8628
|
break;
|
8629
8629
|
}
|
8630
8630
|
case n.CAPTION:
|
@@ -8690,7 +8690,7 @@ function Md(e, t) {
|
|
8690
8690
|
break;
|
8691
8691
|
}
|
8692
8692
|
case n.NOFRAMES: {
|
8693
|
-
|
8693
|
+
Ve(e, t);
|
8694
8694
|
break;
|
8695
8695
|
}
|
8696
8696
|
}
|
@@ -8705,7 +8705,7 @@ function kd(e, t) {
|
|
8705
8705
|
break;
|
8706
8706
|
}
|
8707
8707
|
case n.NOFRAMES: {
|
8708
|
-
|
8708
|
+
Ve(e, t);
|
8709
8709
|
break;
|
8710
8710
|
}
|
8711
8711
|
}
|
@@ -8726,7 +8726,7 @@ function Ud(e, t) {
|
|
8726
8726
|
break;
|
8727
8727
|
}
|
8728
8728
|
case n.NOFRAMES: {
|
8729
|
-
|
8729
|
+
Ve(e, t);
|
8730
8730
|
break;
|
8731
8731
|
}
|
8732
8732
|
}
|
@@ -8790,7 +8790,7 @@ const Vd = /* @__PURE__ */ new Set([
|
|
8790
8790
|
function $d(e, t) {
|
8791
8791
|
return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === N.HTML && Vd.has(t.treeAdapter.getTagName(e));
|
8792
8792
|
}
|
8793
|
-
const Wd = { treeAdapter:
|
8793
|
+
const Wd = { treeAdapter: et, scriptingEnabled: !0 };
|
8794
8794
|
function Gd(e, t) {
|
8795
8795
|
const a = { ...Wd, ...t };
|
8796
8796
|
return Lu(e, a);
|
@@ -8866,11 +8866,11 @@ const nt = {
|
|
8866
8866
|
// Re-exports from domhandler
|
8867
8867
|
isCommentNode: Va,
|
8868
8868
|
isElementNode: B,
|
8869
|
-
isTextNode:
|
8869
|
+
isTextNode: Qe,
|
8870
8870
|
//Node construction
|
8871
8871
|
createDocument() {
|
8872
8872
|
const e = new It([]);
|
8873
|
-
return e["x-mode"] =
|
8873
|
+
return e["x-mode"] = Re.NO_QUIRKS, e;
|
8874
8874
|
},
|
8875
8875
|
createDocumentFragment() {
|
8876
8876
|
return new It([]);
|
@@ -8924,11 +8924,11 @@ const nt = {
|
|
8924
8924
|
},
|
8925
8925
|
insertText(e, t) {
|
8926
8926
|
const a = e.children[e.children.length - 1];
|
8927
|
-
a &&
|
8927
|
+
a && Qe(a) ? a.data += t : nt.appendChild(e, nt.createTextNode(t));
|
8928
8928
|
},
|
8929
8929
|
insertTextBefore(e, t, a) {
|
8930
8930
|
const i = e.children[e.children.indexOf(a) - 1];
|
8931
|
-
i &&
|
8931
|
+
i && Qe(i) ? i.data += t : nt.insertBefore(e, nt.createTextNode(t), a);
|
8932
8932
|
},
|
8933
8933
|
adoptAttributes(e, t) {
|
8934
8934
|
for (let a = 0; a < t.length; a++) {
|
@@ -9018,19 +9018,19 @@ var I;
|
|
9018
9018
|
(function(e) {
|
9019
9019
|
e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
|
9020
9020
|
})(I || (I = {}));
|
9021
|
-
function
|
9021
|
+
function Je(e) {
|
9022
9022
|
return e === k.Space || e === k.NewLine || e === k.Tab || e === k.FormFeed || e === k.CarriageReturn;
|
9023
9023
|
}
|
9024
9024
|
function Ia(e) {
|
9025
|
-
return e === k.Slash || e === k.Gt ||
|
9025
|
+
return e === k.Slash || e === k.Gt || Je(e);
|
9026
9026
|
}
|
9027
9027
|
function nh(e) {
|
9028
9028
|
return e >= k.LowerA && e <= k.LowerZ || e >= k.UpperA && e <= k.UpperZ;
|
9029
9029
|
}
|
9030
|
-
var
|
9030
|
+
var Xe;
|
9031
9031
|
(function(e) {
|
9032
9032
|
e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
|
9033
|
-
})(
|
9033
|
+
})(Xe || (Xe = {}));
|
9034
9034
|
const pe = {
|
9035
9035
|
Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
|
9036
9036
|
// CDATA[
|
@@ -9099,7 +9099,7 @@ class uh {
|
|
9099
9099
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
9100
9100
|
stateInSpecialTag(t) {
|
9101
9101
|
if (this.sequenceIndex === this.currentSequence.length) {
|
9102
|
-
if (t === k.Gt ||
|
9102
|
+
if (t === k.Gt || Je(t)) {
|
9103
9103
|
const a = this.index - this.currentSequence.length;
|
9104
9104
|
if (this.sectionStart < a) {
|
9105
9105
|
const i = this.index;
|
@@ -9164,31 +9164,31 @@ class uh {
|
|
9164
9164
|
Ia(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
9165
9165
|
}
|
9166
9166
|
stateBeforeClosingTagName(t) {
|
9167
|
-
|
9167
|
+
Je(t) || (t === k.Gt ? this.state = I.Text : (this.state = this.isTagStartChar(t) ? I.InClosingTagName : I.InSpecialComment, this.sectionStart = this.index));
|
9168
9168
|
}
|
9169
9169
|
stateInClosingTagName(t) {
|
9170
|
-
(t === k.Gt ||
|
9170
|
+
(t === k.Gt || Je(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = I.AfterClosingTagName, this.stateAfterClosingTagName(t));
|
9171
9171
|
}
|
9172
9172
|
stateAfterClosingTagName(t) {
|
9173
9173
|
(t === k.Gt || this.fastForwardTo(k.Gt)) && (this.state = I.Text, this.sectionStart = this.index + 1);
|
9174
9174
|
}
|
9175
9175
|
stateBeforeAttributeName(t) {
|
9176
|
-
t === k.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = I.InSpecialTag, this.sequenceIndex = 0) : this.state = I.Text, this.sectionStart = this.index + 1) : t === k.Slash ? this.state = I.InSelfClosingTag :
|
9176
|
+
t === k.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = I.InSpecialTag, this.sequenceIndex = 0) : this.state = I.Text, this.sectionStart = this.index + 1) : t === k.Slash ? this.state = I.InSelfClosingTag : Je(t) || (this.state = I.InAttributeName, this.sectionStart = this.index);
|
9177
9177
|
}
|
9178
9178
|
stateInSelfClosingTag(t) {
|
9179
|
-
t === k.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = I.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) :
|
9179
|
+
t === k.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = I.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : Je(t) || (this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
9180
9180
|
}
|
9181
9181
|
stateInAttributeName(t) {
|
9182
9182
|
(t === k.Eq || Ia(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = I.AfterAttributeName, this.stateAfterAttributeName(t));
|
9183
9183
|
}
|
9184
9184
|
stateAfterAttributeName(t) {
|
9185
|
-
t === k.Eq ? this.state = I.BeforeAttributeValue : t === k.Slash || t === k.Gt ? (this.cbs.onattribend(
|
9185
|
+
t === k.Eq ? this.state = I.BeforeAttributeValue : t === k.Slash || t === k.Gt ? (this.cbs.onattribend(Xe.NoValue, this.sectionStart), this.sectionStart = -1, this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t)) : Je(t) || (this.cbs.onattribend(Xe.NoValue, this.sectionStart), this.state = I.InAttributeName, this.sectionStart = this.index);
|
9186
9186
|
}
|
9187
9187
|
stateBeforeAttributeValue(t) {
|
9188
|
-
t === k.DoubleQuote ? (this.state = I.InAttributeValueDq, this.sectionStart = this.index + 1) : t === k.SingleQuote ? (this.state = I.InAttributeValueSq, this.sectionStart = this.index + 1) :
|
9188
|
+
t === k.DoubleQuote ? (this.state = I.InAttributeValueDq, this.sectionStart = this.index + 1) : t === k.SingleQuote ? (this.state = I.InAttributeValueSq, this.sectionStart = this.index + 1) : Je(t) || (this.sectionStart = this.index, this.state = I.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
|
9189
9189
|
}
|
9190
9190
|
handleInAttributeValue(t, a) {
|
9191
|
-
t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a === k.DoubleQuote ?
|
9191
|
+
t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a === k.DoubleQuote ? Xe.Double : Xe.Single, this.index + 1), this.state = I.BeforeAttributeName) : this.decodeEntities && t === k.Amp && this.startEntity();
|
9192
9192
|
}
|
9193
9193
|
stateInAttributeValueDoubleQuotes(t) {
|
9194
9194
|
this.handleInAttributeValue(t, k.DoubleQuote);
|
@@ -9197,7 +9197,7 @@ class uh {
|
|
9197
9197
|
this.handleInAttributeValue(t, k.SingleQuote);
|
9198
9198
|
}
|
9199
9199
|
stateInAttributeValueNoQuotes(t) {
|
9200
|
-
|
9200
|
+
Je(t) || t === k.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(Xe.Unquoted, this.index), this.state = I.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === k.Amp && this.startEntity();
|
9201
9201
|
}
|
9202
9202
|
stateBeforeDeclaration(t) {
|
9203
9203
|
t === k.OpeningSquareBracket ? (this.state = I.CDATASequence, this.sequenceIndex = 0) : this.state = t === k.Dash ? I.BeforeComment : I.InDeclaration;
|
@@ -9548,7 +9548,7 @@ class lh {
|
|
9548
9548
|
/** @internal */
|
9549
9549
|
onattribend(t, a) {
|
9550
9550
|
var i, s;
|
9551
|
-
this.endIndex = a, (s = (i = this.cbs).onattribute) === null || s === void 0 || s.call(i, this.attribname, this.attribvalue, t ===
|
9551
|
+
this.endIndex = a, (s = (i = this.cbs).onattribute) === null || s === void 0 || s.call(i, this.attribname, this.attribvalue, t === Xe.Double ? '"' : t === Xe.Single ? "'" : t === Xe.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
|
9552
9552
|
}
|
9553
9553
|
getInstructionName(t) {
|
9554
9554
|
const a = t.search(ch);
|
@@ -9694,7 +9694,7 @@ const fh = {
|
|
9694
9694
|
"date-action": "1",
|
9695
9695
|
contenteditable: "false",
|
9696
9696
|
class: "text-red-500 text-xs mt-1"
|
9697
|
-
}, mh = /* @__PURE__ */
|
9697
|
+
}, mh = /* @__PURE__ */ Ke({
|
9698
9698
|
__name: "ElementRenderer",
|
9699
9699
|
props: {
|
9700
9700
|
/**
|
@@ -9770,42 +9770,42 @@ const fh = {
|
|
9770
9770
|
],
|
9771
9771
|
setup(e, { emit: t }) {
|
9772
9772
|
const a = e, i = t, s = At(() => a.selectedElement === a.element), u = At(() => a.hoveredElement === a.element), r = $(!1), o = $(!1), c = $(""), d = At(() => a.element.rule.minText || 0), f = At(() => a.element.rule.maxText || 1 / 0);
|
9773
|
-
|
9773
|
+
qe(
|
9774
9774
|
() => a.r,
|
9775
9775
|
() => {
|
9776
9776
|
i("contentUpdated", V());
|
9777
9777
|
},
|
9778
9778
|
{ immediate: !0 }
|
9779
9779
|
);
|
9780
|
-
function E(
|
9781
|
-
|
9780
|
+
function E(D) {
|
9781
|
+
D.xpath != "/div[1]" && a.mode !== "preview" && (a.mode === "edit" ? D.type === z.Text && i("selectElement", D) : i("selectElement", D), !D.rule.isReadOnly && D.type === z.Text && (r.value = !0));
|
9782
9782
|
}
|
9783
|
-
function T(
|
9784
|
-
i("selectElement",
|
9783
|
+
function T(D) {
|
9784
|
+
i("selectElement", D);
|
9785
9785
|
}
|
9786
|
-
function g(
|
9787
|
-
i("hoverElement",
|
9786
|
+
function g(D, G) {
|
9787
|
+
i("hoverElement", D, G);
|
9788
9788
|
}
|
9789
|
-
function C(
|
9790
|
-
i("hoverElement",
|
9789
|
+
function C(D) {
|
9790
|
+
i("hoverElement", D);
|
9791
9791
|
}
|
9792
|
-
function L(
|
9793
|
-
|
9792
|
+
function L(D) {
|
9793
|
+
D.currentTarget.contains(D.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
|
9794
9794
|
}
|
9795
9795
|
function y() {
|
9796
9796
|
r.value = !1, i("contentUpdated", V());
|
9797
9797
|
}
|
9798
9798
|
function V() {
|
9799
|
-
function
|
9800
|
-
const
|
9801
|
-
return `${Ie}${ne.editText || ne.text || ""}${mt}${
|
9799
|
+
function D(ne) {
|
9800
|
+
const Ae = Object.entries(ne.attrs || {}).map(([Fe, Et]) => `${Fe}="${Et}"`).join(" "), Ie = `<${ne.tag}${Ae ? " " + Ae : ""}>`, Ze = `</${ne.tag}>`, mt = (ne.children || []).map((Fe) => D(Fe)).join("");
|
9801
|
+
return `${Ie}${ne.editText || ne.text || ""}${mt}${Ze}`;
|
9802
9802
|
}
|
9803
|
-
return
|
9803
|
+
return D(a.element);
|
9804
9804
|
}
|
9805
|
-
function F(
|
9805
|
+
function F(D) {
|
9806
9806
|
var Ie;
|
9807
|
-
|
9808
|
-
const G =
|
9807
|
+
D.stopPropagation();
|
9808
|
+
const G = D.target, ne = ((Ie = G.firstChild) == null ? void 0 : Ie.nodeType) === Node.TEXT_NODE && G.firstChild.nodeValue || "";
|
9809
9809
|
if (ne.length < d.value) {
|
9810
9810
|
o.value = !0, c.value = `最少输入 ${d.value} 个字符`;
|
9811
9811
|
return;
|
@@ -9815,21 +9815,21 @@ const fh = {
|
|
9815
9815
|
} else
|
9816
9816
|
o.value = !1, c.value = "";
|
9817
9817
|
i("updateText", { element: a.element, newText: ne }), i("contentUpdated", V());
|
9818
|
-
const
|
9819
|
-
|
9818
|
+
const Ae = hn(a.element);
|
9819
|
+
Ae.editText = ne;
|
9820
9820
|
}
|
9821
|
-
function Y(
|
9822
|
-
i("updateText",
|
9821
|
+
function Y(D) {
|
9822
|
+
i("updateText", D), i("contentUpdated", V());
|
9823
9823
|
}
|
9824
9824
|
function ee() {
|
9825
|
-
const
|
9826
|
-
i("blockAction", { action: "add", element: a.element, newBlock:
|
9825
|
+
const D = { ...a.element };
|
9826
|
+
i("blockAction", { action: "add", element: a.element, newBlock: D });
|
9827
9827
|
}
|
9828
9828
|
function q() {
|
9829
9829
|
_(a.element), i("blockAction", { action: "moveUp", element: a.element });
|
9830
9830
|
}
|
9831
|
-
function _(
|
9832
|
-
|
9831
|
+
function _(D) {
|
9832
|
+
D.children && D.children.length > 0 && D.children.forEach((G) => {
|
9833
9833
|
G.type == z.Text && (G.text !== G.editText && (G.text = G.editText), _(G));
|
9834
9834
|
});
|
9835
9835
|
}
|
@@ -9839,23 +9839,37 @@ const fh = {
|
|
9839
9839
|
function Q() {
|
9840
9840
|
i("blockAction", { action: "delete", element: a.element });
|
9841
9841
|
}
|
9842
|
-
function se(
|
9843
|
-
i("blockAction",
|
9842
|
+
function se(D) {
|
9843
|
+
i("blockAction", D), i("contentUpdated", V());
|
9844
9844
|
}
|
9845
|
-
function be(
|
9846
|
-
|
9845
|
+
function be(D) {
|
9846
|
+
Le.value.openModal(D);
|
9847
9847
|
}
|
9848
|
-
function Be(
|
9849
|
-
|
9848
|
+
function Be(D) {
|
9849
|
+
_e.value.openModal(D);
|
9850
9850
|
}
|
9851
|
-
function Ue(
|
9852
|
-
i("addIcon",
|
9851
|
+
function Ue(D, G) {
|
9852
|
+
i("addIcon", D, G), i("contentUpdated", V());
|
9853
9853
|
}
|
9854
|
-
const
|
9855
|
-
|
9854
|
+
const Le = $(a.icon);
|
9855
|
+
qe(
|
9856
|
+
() => a.icon,
|
9857
|
+
(D) => {
|
9858
|
+
Le.value = D;
|
9859
|
+
},
|
9860
|
+
{ immediate: !0 }
|
9861
|
+
);
|
9862
|
+
const _e = $(a.upload);
|
9863
|
+
return qe(
|
9864
|
+
() => a.upload,
|
9865
|
+
(D) => {
|
9866
|
+
_e.value = D;
|
9867
|
+
},
|
9868
|
+
{ immediate: !0 }
|
9869
|
+
), (D, G) => {
|
9856
9870
|
const ne = Qu("ElementRenderer", !0);
|
9857
|
-
return
|
9858
|
-
(
|
9871
|
+
return v(), R(Zt, null, [
|
9872
|
+
(v(), Ct(ju(a.element.tag), zu({
|
9859
9873
|
class: [
|
9860
9874
|
"relative",
|
9861
9875
|
// 注意:这里使用了 relative 布局,可能会影响到样式
|
@@ -9872,21 +9886,21 @@ const fh = {
|
|
9872
9886
|
]
|
9873
9887
|
}, a.element.attrs, {
|
9874
9888
|
contenteditable: r.value,
|
9875
|
-
onClick: G[2] || (G[2] =
|
9889
|
+
onClick: G[2] || (G[2] = ye(() => E(a.element), ["stop"])),
|
9876
9890
|
onMouseenter: G[3] || (G[3] = () => C(a.element)),
|
9877
9891
|
onMouseleave: L,
|
9878
9892
|
onBlur: y,
|
9879
9893
|
onInput: F
|
9880
9894
|
}), {
|
9881
9895
|
default: Ya(() => [
|
9882
|
-
Ei(
|
9883
|
-
a.element.children && a.element.children.length ? (
|
9884
|
-
(
|
9896
|
+
Ei(Ce(a.element.text), 1),
|
9897
|
+
a.element.children && a.element.children.length ? (v(), R(Zt, { key: 0 }, [
|
9898
|
+
(v(!0), R(Zt, null, Fi(a.element.children, (Ae, Ie) => (v(), Ct(ne, {
|
9885
9899
|
key: Ie,
|
9886
9900
|
r: e.r,
|
9887
9901
|
mode: e.mode,
|
9888
9902
|
icons: e.icons,
|
9889
|
-
element:
|
9903
|
+
element: Ae,
|
9890
9904
|
selectedElement: a.selectedElement,
|
9891
9905
|
hoveredElement: a.hoveredElement,
|
9892
9906
|
cropper: e.cropper,
|
@@ -9899,52 +9913,52 @@ const fh = {
|
|
9899
9913
|
onBlockAction: se,
|
9900
9914
|
onAddIcon: Ue
|
9901
9915
|
}, null, 8, ["r", "mode", "icons", "element", "selectedElement", "hoveredElement", "cropper", "icon", "upload", "upload-by-file"]))), 128)),
|
9902
|
-
a.element.type === de(z).Block ? (
|
9916
|
+
a.element.type === de(z).Block ? (v(), R("div", {
|
9903
9917
|
key: 0,
|
9904
9918
|
"date-action": "1",
|
9905
9919
|
contenteditable: "false",
|
9906
|
-
onClick: G[0] || (G[0] =
|
9920
|
+
onClick: G[0] || (G[0] = ye(() => {
|
9907
9921
|
}, ["stop"])),
|
9908
9922
|
class: "z-10 flex space-x-1 flex-none flex-nowrap overflow-visible absolute top-2"
|
9909
9923
|
}, [
|
9910
9924
|
x("button", {
|
9911
9925
|
class: "flex-none px-2 py-1 bg-blue-500 text-white rounded",
|
9912
|
-
onClick:
|
9926
|
+
onClick: ye(ee, ["stop"])
|
9913
9927
|
}, " + "),
|
9914
9928
|
x("button", {
|
9915
9929
|
class: "flex-none px-2 py-1 bg-gray-300 text-white rounded",
|
9916
|
-
onClick:
|
9930
|
+
onClick: ye(q, ["stop"])
|
9917
9931
|
}, " ⬅️ "),
|
9918
9932
|
x("button", {
|
9919
9933
|
class: "flex-none px-2 py-1 bg-gray-300 text-white rounded",
|
9920
|
-
onClick:
|
9934
|
+
onClick: ye(w, ["stop"])
|
9921
9935
|
}, " ➡️ "),
|
9922
9936
|
x("button", {
|
9923
9937
|
class: "flex-none px-2 py-1 bg-red-500 text-white rounded",
|
9924
|
-
onClick:
|
9938
|
+
onClick: ye(Q, ["stop"])
|
9925
9939
|
}, " ✖ ")
|
9926
9940
|
])) : H("", !0)
|
9927
9941
|
], 64)) : H("", !0),
|
9928
|
-
a.element.type === de(z).Icon ? (
|
9942
|
+
a.element.type === de(z).Icon ? (v(), R("div", {
|
9929
9943
|
key: 1,
|
9930
9944
|
class: "cursor-pointer rounded-sm w-5 h-5 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",
|
9931
9945
|
contenteditable: "false",
|
9932
|
-
onClick: G[1] || (G[1] =
|
9946
|
+
onClick: G[1] || (G[1] = ye(() => be(a.element), ["stop"]))
|
9933
9947
|
}, " ↑ ")) : H("", !0)
|
9934
9948
|
]),
|
9935
9949
|
_: 1
|
9936
9950
|
}, 16, ["class", "contenteditable"])),
|
9937
|
-
a.element.type == de(z).Text && o.value ? (
|
9938
|
-
a.element.type === de(z).Image ? (
|
9951
|
+
a.element.type == de(z).Text && o.value ? (v(), R("div", fh, Ce(c.value), 1)) : H("", !0),
|
9952
|
+
a.element.type === de(z).Image ? (v(), R("div", {
|
9939
9953
|
key: 1,
|
9940
9954
|
class: "cursor-pointer rounded-sm flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",
|
9941
|
-
onClick: G[5] || (G[5] =
|
9955
|
+
onClick: G[5] || (G[5] = ye(() => {
|
9942
9956
|
}, ["stop"])),
|
9943
9957
|
contenteditable: "false"
|
9944
9958
|
}, [
|
9945
9959
|
x("div", {
|
9946
9960
|
class: "p-2",
|
9947
|
-
onClick: G[4] || (G[4] =
|
9961
|
+
onClick: G[4] || (G[4] = ye(() => Be(a.element), ["stop"]))
|
9948
9962
|
}, "上传")
|
9949
9963
|
])) : H("", !0)
|
9950
9964
|
], 64);
|
@@ -9955,7 +9969,7 @@ const fh = {
|
|
9955
9969
|
for (const [i, s] of t)
|
9956
9970
|
a[i] = s;
|
9957
9971
|
return a;
|
9958
|
-
}, Eh = /* @__PURE__ */ ft(mh, [["__scopeId", "data-v-
|
9972
|
+
}, Eh = /* @__PURE__ */ ft(mh, [["__scopeId", "data-v-a46039f1"]]), Th = Ke({
|
9959
9973
|
name: "GpCheckbox",
|
9960
9974
|
props: {
|
9961
9975
|
modelValue: {
|
@@ -9977,7 +9991,7 @@ const fh = {
|
|
9977
9991
|
}
|
9978
9992
|
}), ph = { class: "form-group" }, bh = { class: "flex items-center space-x-2 cursor-pointer" }, gh = ["checked", "aria-checked"], _h = { class: "checkbox-label text-sm text-gray-700" };
|
9979
9993
|
function Ah(e, t, a, i, s, u) {
|
9980
|
-
return
|
9994
|
+
return v(), R("div", ph, [
|
9981
9995
|
x("label", bh, [
|
9982
9996
|
x("input", {
|
9983
9997
|
type: "checkbox",
|
@@ -9986,11 +10000,11 @@ function Ah(e, t, a, i, s, u) {
|
|
9986
10000
|
class: "custom-checkbox",
|
9987
10001
|
"aria-checked": e.modelValue
|
9988
10002
|
}, null, 40, gh),
|
9989
|
-
x("span", _h,
|
10003
|
+
x("span", _h, Ce(e.label), 1)
|
9990
10004
|
])
|
9991
10005
|
]);
|
9992
10006
|
}
|
9993
|
-
const Gt = /* @__PURE__ */ ft(Th, [["render", Ah], ["__scopeId", "data-v-68b8f276"]]), Nh =
|
10007
|
+
const Gt = /* @__PURE__ */ ft(Th, [["render", Ah], ["__scopeId", "data-v-68b8f276"]]), Nh = Ke({
|
9994
10008
|
name: "GpMessage",
|
9995
10009
|
props: {
|
9996
10010
|
message: {
|
@@ -10057,21 +10071,21 @@ const Gt = /* @__PURE__ */ ft(Th, [["render", Ah], ["__scopeId", "data-v-68b8f27
|
|
10057
10071
|
class: "text-yellow-500"
|
10058
10072
|
};
|
10059
10073
|
function vh(e, t, a, i, s, u) {
|
10060
|
-
return
|
10074
|
+
return v(), Ct(Ku, { name: "fade" }, {
|
10061
10075
|
default: Ya(() => [
|
10062
|
-
e.visible ? (
|
10076
|
+
e.visible ? (v(), R("div", Ch, [
|
10063
10077
|
x("div", {
|
10064
10078
|
class: fn([e.typeClass, "message-content"])
|
10065
10079
|
}, [
|
10066
|
-
e.icon ? (
|
10080
|
+
e.icon ? (v(), R("span", Ih, [
|
10067
10081
|
Jt(e.$slots, "icon", {}, () => [
|
10068
|
-
e.type === "success" ? (
|
10069
|
-
e.type === "error" ? (
|
10070
|
-
e.type === "info" ? (
|
10071
|
-
e.type === "warning" ? (
|
10082
|
+
e.type === "success" ? (v(), R("span", Sh, "✔")) : H("", !0),
|
10083
|
+
e.type === "error" ? (v(), R("span", xh, "✖")) : H("", !0),
|
10084
|
+
e.type === "info" ? (v(), R("span", Oh, "ℹ")) : H("", !0),
|
10085
|
+
e.type === "warning" ? (v(), R("span", Dh, "⚠")) : H("", !0)
|
10072
10086
|
], !0)
|
10073
10087
|
])) : H("", !0),
|
10074
|
-
x("span", null,
|
10088
|
+
x("span", null, Ce(e.message), 1),
|
10075
10089
|
x("button", {
|
10076
10090
|
class: "close-btn hover:text-gray-800 font-bold",
|
10077
10091
|
onClick: t[0] || (t[0] = (...r) => e.closeMessage && e.closeMessage(...r))
|
@@ -10170,7 +10184,7 @@ Z.warning = (e, t = 3e3, a = !0) => {
|
|
10170
10184
|
icon: a
|
10171
10185
|
} : { ...e, type: "warning" });
|
10172
10186
|
};
|
10173
|
-
const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh = { class: "text-gray-500 my-2" }, Uh = { key: 1 }, Fh = { key: 2 }, Hh = { key: 3 }, Yh = { key: 4 }, qh = { key: 5 }, Vh = { key: 6 }, $h = { key: 7 }, Wh = { key: 8 }, Gh = { key: 9 }, Xh = { key: 10 }, Qh = /* @__PURE__ */
|
10187
|
+
const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh = { class: "text-gray-500 my-2" }, Uh = { key: 1 }, Fh = { key: 2 }, Hh = { key: 3 }, Yh = { key: 4 }, qh = { key: 5 }, Vh = { key: 6 }, $h = { key: 7 }, Wh = { key: 8 }, Gh = { key: 9 }, Xh = { key: 10 }, Qh = /* @__PURE__ */ Ke({
|
10174
10188
|
__name: "EditorPanel",
|
10175
10189
|
props: {
|
10176
10190
|
element: Object
|
@@ -10178,7 +10192,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10178
10192
|
emits: ["updateElement"],
|
10179
10193
|
setup(e, { emit: t }) {
|
10180
10194
|
const a = e, i = t, s = $({ rule: {}, ...a.element });
|
10181
|
-
|
10195
|
+
qe(
|
10182
10196
|
() => a.element,
|
10183
10197
|
(r) => {
|
10184
10198
|
s.value = { rule: {}, ...r };
|
@@ -10228,15 +10242,15 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10228
10242
|
}
|
10229
10243
|
i("updateElement", s.value);
|
10230
10244
|
}
|
10231
|
-
return (r, o) => (
|
10232
|
-
s.value ? (
|
10233
|
-
s.value.text !== void 0 ? (
|
10245
|
+
return (r, o) => (v(), R("div", null, [
|
10246
|
+
s.value ? (v(), R("div", Ph, [
|
10247
|
+
s.value.text !== void 0 ? (v(), R("div", kh, [
|
10234
10248
|
o[13] || (o[13] = x("label", { class: "block" }, "内容", -1)),
|
10235
|
-
x("div", wh,
|
10249
|
+
x("div", wh, Ce(s.value.text || "-"), 1)
|
10236
10250
|
])) : H("", !0),
|
10237
10251
|
x("div", null, [
|
10238
10252
|
o[14] || (o[14] = x("label", { class: "block mt-4" }, "节点", -1)),
|
10239
|
-
x("div", Bh,
|
10253
|
+
x("div", Bh, Ce(s.value.xpath), 1)
|
10240
10254
|
]),
|
10241
10255
|
x("div", null, [
|
10242
10256
|
o[16] || (o[16] = x("label", { class: "block mt-4" }, "类型", -1)),
|
@@ -10256,7 +10270,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10256
10270
|
[er, s.value.type]
|
10257
10271
|
])
|
10258
10272
|
]),
|
10259
|
-
s.value.type == de(z).Text ? (
|
10273
|
+
s.value.type == de(z).Text ? (v(), R("div", Uh, [
|
10260
10274
|
o[17] || (o[17] = x("label", { class: "block mt-4" }, "最小文本长度", -1)),
|
10261
10275
|
at(x("input", {
|
10262
10276
|
"onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
|
@@ -10265,7 +10279,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10265
10279
|
[Tt, s.value.rule.minText]
|
10266
10280
|
])
|
10267
10281
|
])) : H("", !0),
|
10268
|
-
s.value.type == de(z).Text ? (
|
10282
|
+
s.value.type == de(z).Text ? (v(), R("div", Fh, [
|
10269
10283
|
o[18] || (o[18] = x("label", { class: "block mt-4" }, "最大文本长度", -1)),
|
10270
10284
|
at(x("input", {
|
10271
10285
|
"onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
|
@@ -10274,7 +10288,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10274
10288
|
[Tt, s.value.rule.maxText]
|
10275
10289
|
])
|
10276
10290
|
])) : H("", !0),
|
10277
|
-
s.value.type == de(z).Image ? (
|
10291
|
+
s.value.type == de(z).Image ? (v(), R("div", Hh, [
|
10278
10292
|
o[19] || (o[19] = x("label", { class: "block mt-4" }, "是否裁剪", -1)),
|
10279
10293
|
ut(Gt, {
|
10280
10294
|
class: "py-2",
|
@@ -10283,7 +10297,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10283
10297
|
label: "是"
|
10284
10298
|
}, null, 8, ["modelValue"])
|
10285
10299
|
])) : H("", !0),
|
10286
|
-
s.value.type == de(z).Image ? (
|
10300
|
+
s.value.type == de(z).Image ? (v(), R("div", Yh, [
|
10287
10301
|
o[20] || (o[20] = x("label", { class: "block mt-4" }, "图片宽度", -1)),
|
10288
10302
|
at(x("input", {
|
10289
10303
|
"onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
|
@@ -10292,7 +10306,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10292
10306
|
[Tt, s.value.rule.minImageWidth]
|
10293
10307
|
])
|
10294
10308
|
])) : H("", !0),
|
10295
|
-
s.value.type == de(z).Image ? (
|
10309
|
+
s.value.type == de(z).Image ? (v(), R("div", qh, [
|
10296
10310
|
o[21] || (o[21] = x("label", { class: "block mt-4" }, "图片高度", -1)),
|
10297
10311
|
at(x("input", {
|
10298
10312
|
"onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
|
@@ -10301,7 +10315,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10301
10315
|
[Tt, s.value.rule.maxImageHeight]
|
10302
10316
|
])
|
10303
10317
|
])) : H("", !0),
|
10304
|
-
s.value.type == de(z).Block ? (
|
10318
|
+
s.value.type == de(z).Block ? (v(), R("div", Vh, [
|
10305
10319
|
o[22] || (o[22] = x("label", { class: "block mt-4" }, "块最小数量", -1)),
|
10306
10320
|
at(x("input", {
|
10307
10321
|
"onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
|
@@ -10310,7 +10324,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10310
10324
|
[Tt, s.value.rule.minBlock]
|
10311
10325
|
])
|
10312
10326
|
])) : H("", !0),
|
10313
|
-
s.value.type == de(z).Block ? (
|
10327
|
+
s.value.type == de(z).Block ? (v(), R("div", $h, [
|
10314
10328
|
o[23] || (o[23] = x("label", { class: "block mt-4" }, "块最大数量", -1)),
|
10315
10329
|
at(x("input", {
|
10316
10330
|
"onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
|
@@ -10319,7 +10333,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10319
10333
|
[Tt, s.value.rule.maxBlock]
|
10320
10334
|
])
|
10321
10335
|
])) : H("", !0),
|
10322
|
-
s.value.type == de(z).Text || s.value.type == de(z).Icon || s.value.type == de(z).Button ? (
|
10336
|
+
s.value.type == de(z).Text || s.value.type == de(z).Icon || s.value.type == de(z).Button ? (v(), R("div", Wh, [
|
10323
10337
|
o[24] || (o[24] = x("label", { class: "block mt-4" }, "主题色", -1)),
|
10324
10338
|
ut(Gt, {
|
10325
10339
|
class: "py-2",
|
@@ -10346,7 +10360,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10346
10360
|
label: "是"
|
10347
10361
|
}, null, 8, ["modelValue"])
|
10348
10362
|
]),
|
10349
|
-
s.value.type == de(z).Link || s.value.type == de(z).Button ? (
|
10363
|
+
s.value.type == de(z).Link || s.value.type == de(z).Button ? (v(), R("div", Gh, [
|
10350
10364
|
o[27] || (o[27] = x("label", { class: "block mt-4" }, "打开美洽", -1)),
|
10351
10365
|
ut(Gt, {
|
10352
10366
|
class: "py-2",
|
@@ -10355,7 +10369,7 @@ const Ph = { key: 0 }, kh = { key: 0 }, wh = { class: "text-gray-500 my-2" }, Bh
|
|
10355
10369
|
label: "是"
|
10356
10370
|
}, null, 8, ["modelValue"])
|
10357
10371
|
])) : H("", !0),
|
10358
|
-
s.value.type == de(z).Link || s.value.type == de(z).Button ? (
|
10372
|
+
s.value.type == de(z).Link || s.value.type == de(z).Button ? (v(), R("div", Xh, [
|
10359
10373
|
o[28] || (o[28] = x("label", { class: "block mt-4" }, "链接", -1)),
|
10360
10374
|
at(x("input", {
|
10361
10375
|
"onUpdate:modelValue": o[12] || (o[12] = (c) => s.value.rule.linkUrl = c),
|
@@ -10473,7 +10487,7 @@ function sf() {
|
|
10473
10487
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
10474
10488
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
10475
10489
|
}
|
10476
|
-
var ei = typeof window < "u" && typeof window.document < "u",
|
10490
|
+
var ei = typeof window < "u" && typeof window.document < "u", ze = ei ? window : {}, cs = ei && ze.document.documentElement ? "ontouchstart" in ze.document.documentElement : !1, ls = ei ? "PointerEvent" in ze : !1, ae = "cropper", ds = "all", ku = "crop", wu = "move", Bu = "zoom", bt = "e", gt = "w", Lt = "s", it = "n", Xt = "ne", Qt = "nw", jt = "se", zt = "sw", yi = "".concat(ae, "-crop"), Ks = "".concat(ae, "-disabled"), De = "".concat(ae, "-hidden"), Zs = "".concat(ae, "-hide"), nf = "".concat(ae, "-invisible"), Ha = "".concat(ae, "-modal"), Ri = "".concat(ae, "-move"), fa = "".concat(ae, "Action"), Sa = "".concat(ae, "Preview"), hs = "crop", Uu = "move", Fu = "none", Mi = "crop", Pi = "cropend", ki = "cropmove", wi = "cropstart", Js = "dblclick", uf = cs ? "touchstart" : "mousedown", rf = cs ? "touchmove" : "mousemove", of = cs ? "touchend touchcancel" : "mouseup", en = ls ? "pointerdown" : uf, tn = ls ? "pointermove" : rf, an = ls ? "pointerup pointercancel" : of, sn = "ready", nn = "resize", un = "wheel", Bi = "zoom", rn = "image/jpeg", cf = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, lf = /^data:/, df = /^data:image\/jpeg;base64,/, hf = /^img|canvas$/i, Hu = 200, Yu = 100, on = {
|
10477
10491
|
// Define the view mode of the cropper
|
10478
10492
|
viewMode: 0,
|
10479
10493
|
// 0, 1, 2, 3
|
@@ -10544,7 +10558,7 @@ var ei = typeof window < "u" && typeof window.document < "u", je = ei ? window :
|
|
10544
10558
|
cropend: null,
|
10545
10559
|
crop: null,
|
10546
10560
|
zoom: null
|
10547
|
-
}, ff = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>', mf = Number.isNaN ||
|
10561
|
+
}, ff = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>', mf = Number.isNaN || ze.isNaN;
|
10548
10562
|
function X(e) {
|
10549
10563
|
return typeof e == "number" && !mf(e);
|
10550
10564
|
}
|
@@ -10621,11 +10635,11 @@ function me(e, t) {
|
|
10621
10635
|
a ? a.indexOf(t) < 0 && (e.className = "".concat(a, " ").concat(t)) : e.className = t;
|
10622
10636
|
}
|
10623
10637
|
}
|
10624
|
-
function
|
10638
|
+
function je(e, t) {
|
10625
10639
|
if (t) {
|
10626
10640
|
if (X(e.length)) {
|
10627
10641
|
ce(e, function(a) {
|
10628
|
-
|
10642
|
+
je(a, t);
|
10629
10643
|
});
|
10630
10644
|
return;
|
10631
10645
|
}
|
@@ -10644,7 +10658,7 @@ function Rt(e, t, a) {
|
|
10644
10658
|
});
|
10645
10659
|
return;
|
10646
10660
|
}
|
10647
|
-
a ? me(e, t) :
|
10661
|
+
a ? me(e, t) : je(e, t);
|
10648
10662
|
}
|
10649
10663
|
}
|
10650
10664
|
var _f = /([a-z\d])([A-Z])/g;
|
@@ -10690,7 +10704,7 @@ var Vu = /\s\s*/, $u = function() {
|
|
10690
10704
|
t = u;
|
10691
10705
|
}
|
10692
10706
|
});
|
10693
|
-
|
10707
|
+
ze.addEventListener("test", a, i), ze.removeEventListener("test", a, i);
|
10694
10708
|
}
|
10695
10709
|
return e;
|
10696
10710
|
}();
|
@@ -10734,7 +10748,7 @@ function Wu(e) {
|
|
10734
10748
|
top: t.top + (window.pageYOffset - document.documentElement.clientTop)
|
10735
10749
|
};
|
10736
10750
|
}
|
10737
|
-
var mi =
|
10751
|
+
var mi = ze.location, Nf = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
|
10738
10752
|
function ln(e) {
|
10739
10753
|
var t = e.match(Nf);
|
10740
10754
|
return t !== null && (t[1] !== mi.protocol || t[2] !== mi.hostname || t[3] !== mi.port);
|
@@ -10810,26 +10824,26 @@ function Sf(e) {
|
|
10810
10824
|
};
|
10811
10825
|
}
|
10812
10826
|
function xf(e, t, a, i) {
|
10813
|
-
var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, d = t.scaleX, f = d === void 0 ? 1 : d, E = t.scaleY, T = E === void 0 ? 1 : E, g = a.aspectRatio, C = a.naturalWidth, L = a.naturalHeight, y = i.fillColor, V = y === void 0 ? "transparent" : y, F = i.imageSmoothingEnabled, Y = F === void 0 ? !0 : F, ee = i.imageSmoothingQuality, q = ee === void 0 ? "low" : ee, _ = i.maxWidth, w = _ === void 0 ? 1 / 0 : _, Q = i.maxHeight, se = Q === void 0 ? 1 / 0 : Q, be = i.minWidth, Be = be === void 0 ? 0 : be, Ue = i.minHeight,
|
10827
|
+
var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, d = t.scaleX, f = d === void 0 ? 1 : d, E = t.scaleY, T = E === void 0 ? 1 : E, g = a.aspectRatio, C = a.naturalWidth, L = a.naturalHeight, y = i.fillColor, V = y === void 0 ? "transparent" : y, F = i.imageSmoothingEnabled, Y = F === void 0 ? !0 : F, ee = i.imageSmoothingQuality, q = ee === void 0 ? "low" : ee, _ = i.maxWidth, w = _ === void 0 ? 1 / 0 : _, Q = i.maxHeight, se = Q === void 0 ? 1 / 0 : Q, be = i.minWidth, Be = be === void 0 ? 0 : be, Ue = i.minHeight, Le = Ue === void 0 ? 0 : Ue, _e = document.createElement("canvas"), D = _e.getContext("2d"), G = lt({
|
10814
10828
|
aspectRatio: g,
|
10815
10829
|
width: w,
|
10816
10830
|
height: se
|
10817
10831
|
}), ne = lt({
|
10818
10832
|
aspectRatio: g,
|
10819
10833
|
width: Be,
|
10820
|
-
height:
|
10821
|
-
}, "cover"),
|
10834
|
+
height: Le
|
10835
|
+
}, "cover"), Ae = Math.min(G.width, Math.max(ne.width, C)), Ie = Math.min(G.height, Math.max(ne.height, L)), Ze = lt({
|
10822
10836
|
aspectRatio: s,
|
10823
10837
|
width: w,
|
10824
10838
|
height: se
|
10825
10839
|
}), mt = lt({
|
10826
10840
|
aspectRatio: s,
|
10827
10841
|
width: Be,
|
10828
|
-
height:
|
10829
|
-
}, "cover"), Fe = Math.min(
|
10830
|
-
return
|
10842
|
+
height: Le
|
10843
|
+
}, "cover"), Fe = Math.min(Ze.width, Math.max(mt.width, u)), Et = Math.min(Ze.height, Math.max(mt.height, r)), ga = [-Fe / 2, -Et / 2, Fe, Et];
|
10844
|
+
return _e.width = kt(Ae), _e.height = kt(Ie), D.fillStyle = V, D.fillRect(0, 0, Ae, Ie), D.save(), D.translate(Ae / 2, Ie / 2), D.rotate(c * Math.PI / 180), D.scale(f, T), D.imageSmoothingEnabled = Y, D.imageSmoothingQuality = q, D.drawImage.apply(D, [e].concat(Pu(ga.map(function(_a) {
|
10831
10845
|
return Math.floor(kt(_a));
|
10832
|
-
})))),
|
10846
|
+
})))), D.restore(), _e;
|
10833
10847
|
}
|
10834
10848
|
var Gu = String.fromCharCode;
|
10835
10849
|
function Of(e, t, a) {
|
@@ -10923,7 +10937,7 @@ var Mf = {
|
|
10923
10937
|
},
|
10924
10938
|
initContainer: function() {
|
10925
10939
|
var t = this.element, a = this.options, i = this.container, s = this.cropper, u = Number(a.minContainerWidth), r = Number(a.minContainerHeight);
|
10926
|
-
me(s, De),
|
10940
|
+
me(s, De), je(t, De);
|
10927
10941
|
var o = {
|
10928
10942
|
width: Math.max(i.offsetWidth, u >= 0 ? u : Hu),
|
10929
10943
|
height: Math.max(i.offsetHeight, r >= 0 ? r : Yu)
|
@@ -10931,7 +10945,7 @@ var Mf = {
|
|
10931
10945
|
this.containerData = o, ct(s, {
|
10932
10946
|
width: o.width,
|
10933
10947
|
height: o.height
|
10934
|
-
}), me(t, De),
|
10948
|
+
}), me(t, De), je(s, De);
|
10935
10949
|
},
|
10936
10950
|
// Canvas (image wrapper)
|
10937
10951
|
initCanvas: function() {
|
@@ -11256,7 +11270,7 @@ var Mf = {
|
|
11256
11270
|
Y = !1;
|
11257
11271
|
break;
|
11258
11272
|
}
|
11259
|
-
ee = Wu(this.cropper), d = q.startX - ee.left, f = q.startY - ee.top, E = u.minWidth, T = u.minHeight, _.x > 0 ? o = _.y > 0 ? jt : Xt : _.x < 0 && (d -= E, o = _.y > 0 ? zt : Qt), _.y < 0 && (f -= T), this.cropped || (
|
11273
|
+
ee = Wu(this.cropper), d = q.startX - ee.left, f = q.startY - ee.top, E = u.minWidth, T = u.minHeight, _.x > 0 ? o = _.y > 0 ? jt : Xt : _.x < 0 && (d -= E, o = _.y > 0 ? zt : Qt), _.y < 0 && (f -= T), this.cropped || (je(this.cropBox, De), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
|
11260
11274
|
break;
|
11261
11275
|
}
|
11262
11276
|
Y && (u.width = E, u.height = T, u.left = d, u.top = f, this.action = o, this.renderCropBox()), ce(r, function(Q) {
|
@@ -11266,7 +11280,7 @@ var Mf = {
|
|
11266
11280
|
}, Uf = {
|
11267
11281
|
// Show the crop box manually
|
11268
11282
|
crop: function() {
|
11269
|
-
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && me(this.dragBox, Ha),
|
11283
|
+
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && me(this.dragBox, Ha), je(this.cropBox, De), this.setCropBoxData(this.initialCropBoxData)), this;
|
11270
11284
|
},
|
11271
11285
|
// Reset the image and crop box to their initial states
|
11272
11286
|
reset: function() {
|
@@ -11279,7 +11293,7 @@ var Mf = {
|
|
11279
11293
|
top: 0,
|
11280
11294
|
width: 0,
|
11281
11295
|
height: 0
|
11282
|
-
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(),
|
11296
|
+
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), je(this.dragBox, Ha), me(this.cropBox, De)), this;
|
11283
11297
|
},
|
11284
11298
|
/**
|
11285
11299
|
* Replace the image's src and rebuild the cropper
|
@@ -11295,7 +11309,7 @@ var Mf = {
|
|
11295
11309
|
},
|
11296
11310
|
// Enable (unfreeze) the cropper
|
11297
11311
|
enable: function() {
|
11298
|
-
return this.ready && this.disabled && (this.disabled = !1,
|
11312
|
+
return this.ready && this.disabled && (this.disabled = !1, je(this.cropper, Ks)), this;
|
11299
11313
|
},
|
11300
11314
|
// Disable (freeze) the cropper
|
11301
11315
|
disable: function() {
|
@@ -11543,14 +11557,14 @@ var Mf = {
|
|
11543
11557
|
y.width = kt(C), y.height = kt(L), V.fillStyle = t.fillColor || "transparent", V.fillRect(0, 0, C, L);
|
11544
11558
|
var F = t.imageSmoothingEnabled, Y = F === void 0 ? !0 : F, ee = t.imageSmoothingQuality;
|
11545
11559
|
V.imageSmoothingEnabled = Y, ee && (V.imageSmoothingQuality = ee);
|
11546
|
-
var q = i.width, _ = i.height, w = u, Q = r, se, be, Be, Ue,
|
11547
|
-
w <= -o || w > q ? (w = 0, se = 0, Be = 0,
|
11548
|
-
var
|
11549
|
-
if (
|
11560
|
+
var q = i.width, _ = i.height, w = u, Q = r, se, be, Be, Ue, Le, _e;
|
11561
|
+
w <= -o || w > q ? (w = 0, se = 0, Be = 0, Le = 0) : w <= 0 ? (Be = -w, w = 0, se = Math.min(q, o + w), Le = se) : w <= q && (Be = 0, se = Math.min(o, q - w), Le = se), se <= 0 || Q <= -c || Q > _ ? (Q = 0, be = 0, Ue = 0, _e = 0) : Q <= 0 ? (Ue = -Q, Q = 0, be = Math.min(_, c + Q), _e = be) : Q <= _ && (Ue = 0, be = Math.min(c, _ - Q), _e = be);
|
11562
|
+
var D = [w, Q, se, be];
|
11563
|
+
if (Le > 0 && _e > 0) {
|
11550
11564
|
var G = C / o;
|
11551
|
-
|
11565
|
+
D.push(Be * G, Ue * G, Le * G, _e * G);
|
11552
11566
|
}
|
11553
|
-
return V.drawImage.apply(V, [i].concat(Pu(
|
11567
|
+
return V.drawImage.apply(V, [i].concat(Pu(D.map(function(ne) {
|
11554
11568
|
return Math.floor(kt(ne));
|
11555
11569
|
})))), y;
|
11556
11570
|
},
|
@@ -11576,7 +11590,7 @@ var Mf = {
|
|
11576
11590
|
}
|
11577
11591
|
return this;
|
11578
11592
|
}
|
11579
|
-
}, Ff =
|
11593
|
+
}, Ff = ze.Cropper, Xu = /* @__PURE__ */ function() {
|
11580
11594
|
function e(t) {
|
11581
11595
|
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
11582
11596
|
if (Kh(this, e), !t || !hf.test(t.tagName))
|
@@ -11645,7 +11659,7 @@ var Mf = {
|
|
11645
11659
|
value: function() {
|
11646
11660
|
var a = this, i = this.image;
|
11647
11661
|
i.onload = null, i.onerror = null, this.sizing = !0;
|
11648
|
-
var s =
|
11662
|
+
var s = ze.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ze.navigator.userAgent), u = function(d, f) {
|
11649
11663
|
ie(a.imageData, {
|
11650
11664
|
naturalWidth: d,
|
11651
11665
|
naturalHeight: f,
|
@@ -11674,7 +11688,7 @@ var Mf = {
|
|
11674
11688
|
var a = this.element, i = this.options, s = this.image, u = a.parentNode, r = document.createElement("div");
|
11675
11689
|
r.innerHTML = ff;
|
11676
11690
|
var o = r.querySelector(".".concat(ae, "-container")), c = o.querySelector(".".concat(ae, "-canvas")), d = o.querySelector(".".concat(ae, "-drag-box")), f = o.querySelector(".".concat(ae, "-crop-box")), E = f.querySelector(".".concat(ae, "-face"));
|
11677
|
-
this.container = u, this.cropper = o, this.canvas = c, this.dragBox = d, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = E, c.appendChild(s), me(a, De), u.insertBefore(o, a.nextSibling),
|
11691
|
+
this.container = u, this.cropper = o, this.canvas = c, this.dragBox = d, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = E, c.appendChild(s), me(a, De), u.insertBefore(o, a.nextSibling), je(s, Zs), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, me(f, De), i.guides || me(f.getElementsByClassName("".concat(ae, "-dashed")), De), i.center || me(f.getElementsByClassName("".concat(ae, "-center")), De), i.background && me(o, "".concat(ae, "-bg")), i.highlight || me(E, nf), i.cropBoxMovable && (me(E, Ri), ma(E, fa, ds)), i.cropBoxResizable || (me(f.getElementsByClassName("".concat(ae, "-line")), De), me(f.getElementsByClassName("".concat(ae, "-point")), De)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), xe(i.ready) && Pe(a, sn, i.ready, {
|
11678
11692
|
once: !0
|
11679
11693
|
}), wt(a, sn);
|
11680
11694
|
}
|
@@ -11685,7 +11699,7 @@ var Mf = {
|
|
11685
11699
|
if (this.ready) {
|
11686
11700
|
this.ready = !1, this.unbind(), this.resetPreview();
|
11687
11701
|
var a = this.cropper.parentNode;
|
11688
|
-
a && a.removeChild(this.cropper),
|
11702
|
+
a && a.removeChild(this.cropper), je(this.element, De);
|
11689
11703
|
}
|
11690
11704
|
}
|
11691
11705
|
}, {
|
@@ -11740,7 +11754,7 @@ const qf = {
|
|
11740
11754
|
}, a1 = ["src"], i1 = {
|
11741
11755
|
class: "flex flex-col items-center",
|
11742
11756
|
style: { width: "300px", height: "300px" }
|
11743
|
-
}, s1 = { class: "text-[#999] mt-05 flex justify-center mt-4" }, n1 = { class: "w-full flex justify-end space-x-5 mt-5 px-6" }, u1 = ["loading"], r1 = /* @__PURE__ */
|
11757
|
+
}, s1 = { class: "text-[#999] mt-05 flex justify-center mt-4" }, n1 = { class: "w-full flex justify-end space-x-5 mt-5 px-6" }, u1 = ["loading"], r1 = /* @__PURE__ */ Ke({
|
11744
11758
|
__name: "index",
|
11745
11759
|
emits: ["cancel", "ok"],
|
11746
11760
|
setup(e, { expose: t, emit: a }) {
|
@@ -11861,13 +11875,13 @@ const qf = {
|
|
11861
11875
|
}
|
11862
11876
|
return t({ handleCloseCropper: y, handleOpenCropper: L }), (q, _) => {
|
11863
11877
|
var w, Q, se;
|
11864
|
-
return g.value ? (
|
11878
|
+
return g.value ? (v(), R("div", qf, [
|
11865
11879
|
x("div", Vf, [
|
11866
11880
|
x("div", $f, [
|
11867
11881
|
_[1] || (_[1] = x("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
|
11868
11882
|
x("span", {
|
11869
11883
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
11870
|
-
onClick:
|
11884
|
+
onClick: ye(F, ["stop"])
|
11871
11885
|
})
|
11872
11886
|
]),
|
11873
11887
|
x("div", Wf, [
|
@@ -11880,7 +11894,7 @@ const qf = {
|
|
11880
11894
|
x("input", {
|
11881
11895
|
type: "file",
|
11882
11896
|
accept: "image/*",
|
11883
|
-
onClick: _[0] || (_[0] =
|
11897
|
+
onClick: _[0] || (_[0] = ye(() => {
|
11884
11898
|
}, ["stop"])),
|
11885
11899
|
contenteditable: "false",
|
11886
11900
|
ref: "fileInput",
|
@@ -11897,7 +11911,7 @@ const qf = {
|
|
11897
11911
|
x("div", Zf, [
|
11898
11912
|
x("div", Jf, [
|
11899
11913
|
x("div", e1, [
|
11900
|
-
c.value.image ? H("", !0) : (
|
11914
|
+
c.value.image ? H("", !0) : (v(), R("div", t1, " 请上传图片 ")),
|
11901
11915
|
x("img", {
|
11902
11916
|
id: "imgId",
|
11903
11917
|
src: c.value.image,
|
@@ -11907,7 +11921,7 @@ const qf = {
|
|
11907
11921
|
]),
|
11908
11922
|
x("div", i1, [
|
11909
11923
|
_[4] || (_[4] = x("div", { class: "before w-[270px] h-[200px] pr-[70px] border" }, null, -1)),
|
11910
|
-
x("div", s1, " 预览画像 " +
|
11924
|
+
x("div", s1, " 预览画像 " + Ce(((w = u.value) == null ? void 0 : w.width) || "") + " " + Ce((Q = u.value) != null && Q.width ? "x" : "") + " " + Ce(((se = u.value) == null ? void 0 : se.height) || ""), 1)
|
11911
11925
|
])
|
11912
11926
|
])
|
11913
11927
|
])
|
@@ -11931,7 +11945,7 @@ const qf = {
|
|
11931
11945
|
])) : H("", !0);
|
11932
11946
|
};
|
11933
11947
|
}
|
11934
|
-
}), o1 =
|
11948
|
+
}), o1 = Ke({
|
11935
11949
|
name: "CustomIcon",
|
11936
11950
|
props: {
|
11937
11951
|
iconName: {
|
@@ -11946,12 +11960,12 @@ const qf = {
|
|
11946
11960
|
}
|
11947
11961
|
});
|
11948
11962
|
function c1(e, t, a, i, s, u) {
|
11949
|
-
return
|
11963
|
+
return v(), R("span", {
|
11950
11964
|
style: { position: "unset", color: "unset", top: "unset", left: "unset", right: "unset", transform: "unset", "font-size": "unset" },
|
11951
11965
|
class: fn(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
|
11952
11966
|
}, null, 2);
|
11953
11967
|
}
|
11954
|
-
const l1 = /* @__PURE__ */ ft(o1, [["render", c1]]), d1 =
|
11968
|
+
const l1 = /* @__PURE__ */ ft(o1, [["render", c1]]), d1 = Ke({
|
11955
11969
|
name: "GpModal",
|
11956
11970
|
props: {
|
11957
11971
|
visible: {
|
@@ -12010,16 +12024,16 @@ const l1 = /* @__PURE__ */ ft(o1, [["render", c1]]), d1 = ze({
|
|
12010
12024
|
class: "p-4 border-t border-gray-200 flex justify-end space-x-2"
|
12011
12025
|
};
|
12012
12026
|
function p1(e, t, a, i, s, u) {
|
12013
|
-
return e.visible ? (
|
12027
|
+
return e.visible ? (v(), R("div", {
|
12014
12028
|
key: 0,
|
12015
12029
|
class: "fixed inset-0 z-[99999] flex items-center justify-center bg-gray-900 bg-opacity-50",
|
12016
|
-
onClick: t[3] || (t[3] =
|
12030
|
+
onClick: t[3] || (t[3] = ye((...r) => e.onClose && e.onClose(...r), ["self"]))
|
12017
12031
|
}, [
|
12018
12032
|
x("div", h1, [
|
12019
12033
|
x("div", f1, [
|
12020
|
-
e.title ? (
|
12034
|
+
e.title ? (v(), R("h3", m1, Ce(e.title), 1)) : H("", !0),
|
12021
12035
|
Jt(e.$slots, "header"),
|
12022
|
-
e.showCloseButton ? (
|
12036
|
+
e.showCloseButton ? (v(), R("button", {
|
12023
12037
|
key: 1,
|
12024
12038
|
class: "text-gray-400 hover:text-gray-600",
|
12025
12039
|
onClick: t[0] || (t[0] = (...r) => e.onClose && e.onClose(...r)),
|
@@ -12042,24 +12056,24 @@ function p1(e, t, a, i, s, u) {
|
|
12042
12056
|
x("div", E1, [
|
12043
12057
|
Jt(e.$slots, "default")
|
12044
12058
|
]),
|
12045
|
-
e.showCancelButton || e.showOkButton ? (
|
12059
|
+
e.showCancelButton || e.showOkButton ? (v(), R("div", T1, [
|
12046
12060
|
Jt(e.$slots, "footer", {}, () => [
|
12047
|
-
e.showCancelButton ? (
|
12061
|
+
e.showCancelButton ? (v(), R("button", {
|
12048
12062
|
key: 0,
|
12049
12063
|
class: "px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded hover:bg-gray-200",
|
12050
12064
|
onClick: t[1] || (t[1] = (...r) => e.onCancel && e.onCancel(...r))
|
12051
|
-
},
|
12052
|
-
e.showOkButton ? (
|
12065
|
+
}, Ce(e.cancelText), 1)) : H("", !0),
|
12066
|
+
e.showOkButton ? (v(), R("button", {
|
12053
12067
|
key: 1,
|
12054
12068
|
class: "px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded hover:bg-blue-700",
|
12055
12069
|
onClick: t[2] || (t[2] = (...r) => e.onOk && e.onOk(...r))
|
12056
|
-
},
|
12070
|
+
}, Ce(e.okText), 1)) : H("", !0)
|
12057
12071
|
])
|
12058
12072
|
])) : H("", !0)
|
12059
12073
|
])
|
12060
12074
|
])) : H("", !0);
|
12061
12075
|
}
|
12062
|
-
const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, _1 = /* @__PURE__ */
|
12076
|
+
const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, _1 = /* @__PURE__ */ Ke({
|
12063
12077
|
__name: "IconModal",
|
12064
12078
|
props: {
|
12065
12079
|
// 图标库
|
@@ -12071,7 +12085,7 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
|
|
12071
12085
|
emits: ["ok"],
|
12072
12086
|
setup(e, { expose: t, emit: a }) {
|
12073
12087
|
const i = e, s = $(i.icons || []);
|
12074
|
-
|
12088
|
+
qe(
|
12075
12089
|
() => i.icons,
|
12076
12090
|
(E) => {
|
12077
12091
|
s.value = E || [];
|
@@ -12088,7 +12102,7 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
|
|
12088
12102
|
function f() {
|
12089
12103
|
r.value = !1;
|
12090
12104
|
}
|
12091
|
-
return t({ openModal: c, closeModal: f }), (E, T) => (
|
12105
|
+
return t({ openModal: c, closeModal: f }), (E, T) => (v(), Ct(b1, {
|
12092
12106
|
visible: r.value,
|
12093
12107
|
"onUpdate:visible": T[0] || (T[0] = (g) => r.value = g),
|
12094
12108
|
title: "选择图标",
|
@@ -12099,11 +12113,11 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
|
|
12099
12113
|
}, {
|
12100
12114
|
default: Ya(() => [
|
12101
12115
|
x("div", g1, [
|
12102
|
-
(
|
12116
|
+
(v(!0), R(Zt, null, Fi(s.value, (g) => (v(), Ct(l1, {
|
12103
12117
|
key: g,
|
12104
12118
|
class: "w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",
|
12105
12119
|
iconName: g,
|
12106
|
-
onClick:
|
12120
|
+
onClick: ye((C) => d(g), ["stop"]),
|
12107
12121
|
title: g
|
12108
12122
|
}, null, 8, ["iconName", "onClick", "title"]))), 128))
|
12109
12123
|
])
|
@@ -12111,7 +12125,7 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
|
|
12111
12125
|
_: 1
|
12112
12126
|
}, 8, ["visible"]));
|
12113
12127
|
}
|
12114
|
-
}), A1 =
|
12128
|
+
}), A1 = Ke({
|
12115
12129
|
name: "GpImageUpload",
|
12116
12130
|
props: {
|
12117
12131
|
accept: {
|
@@ -12142,7 +12156,7 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
|
|
12142
12156
|
},
|
12143
12157
|
setup(e, { emit: t }) {
|
12144
12158
|
const a = $(null), i = $([]), s = $(), u = $(e.show);
|
12145
|
-
|
12159
|
+
qe(
|
12146
12160
|
() => e.show,
|
12147
12161
|
(f) => {
|
12148
12162
|
u.value = f;
|
@@ -12199,8 +12213,8 @@ const b1 = /* @__PURE__ */ ft(d1, [["render", p1]]), g1 = { class: "p-4 flex fle
|
|
12199
12213
|
class: "file-list mt-4"
|
12200
12214
|
}, S1 = { class: "flex items-center space-x-4" }, x1 = ["src"], O1 = ["onClick"];
|
12201
12215
|
function D1(e, t, a, i, s, u) {
|
12202
|
-
return
|
12203
|
-
e.isShow ? (
|
12216
|
+
return v(), R("div", N1, [
|
12217
|
+
e.isShow ? (v(), R("div", {
|
12204
12218
|
key: 0,
|
12205
12219
|
class: "",
|
12206
12220
|
onClick: t[0] || (t[0] = (...r) => e.triggerInput && e.triggerInput(...r))
|
@@ -12219,19 +12233,19 @@ function D1(e, t, a, i, s, u) {
|
|
12219
12233
|
multiple: e.multiple,
|
12220
12234
|
onChange: t[1] || (t[1] = (...r) => e.handleChange && e.handleChange(...r))
|
12221
12235
|
}, null, 40, C1),
|
12222
|
-
e.showList ? (
|
12223
|
-
(
|
12236
|
+
e.showList ? (v(), R("div", I1, [
|
12237
|
+
(v(!0), R(Zt, null, Fi(e.fileList, (r) => (v(), R("div", {
|
12224
12238
|
key: r.uid,
|
12225
12239
|
class: "file-item flex items-center justify-between p-2 border rounded mb-2"
|
12226
12240
|
}, [
|
12227
12241
|
x("div", S1, [
|
12228
|
-
r.thumbUrl ? (
|
12242
|
+
r.thumbUrl ? (v(), R("img", {
|
12229
12243
|
key: 0,
|
12230
12244
|
src: r.thumbUrl,
|
12231
12245
|
alt: "preview",
|
12232
12246
|
class: "w-12 h-12 object-cover rounded"
|
12233
12247
|
}, null, 8, x1)) : H("", !0),
|
12234
|
-
x("span", null,
|
12248
|
+
x("span", null, Ce(r.name), 1)
|
12235
12249
|
]),
|
12236
12250
|
x("div", null, [
|
12237
12251
|
x("button", {
|
@@ -12252,7 +12266,7 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12252
12266
|
}, B1 = { class: "p-2" }, U1 = {
|
12253
12267
|
key: 0,
|
12254
12268
|
class: "text-lg font-bold border-b p-2"
|
12255
|
-
}, F1 = { class: "text-sm font-thin text-gray-500" }, H1 = { class: "p-2" }, Y1 = /* @__PURE__ */
|
12269
|
+
}, F1 = { class: "text-sm font-thin text-gray-500" }, H1 = { class: "p-2" }, Y1 = /* @__PURE__ */ Ke({
|
12256
12270
|
__name: "Designer",
|
12257
12271
|
props: {
|
12258
12272
|
mode: { default: "design" },
|
@@ -12270,19 +12284,19 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12270
12284
|
const a = e, i = t, s = $(a.template), u = $();
|
12271
12285
|
let r = Qs("", {}, !1);
|
12272
12286
|
const o = $("");
|
12273
|
-
|
12287
|
+
qe(
|
12274
12288
|
() => a.template,
|
12275
12289
|
(A) => {
|
12276
12290
|
s.value = A;
|
12277
12291
|
},
|
12278
12292
|
{ immediate: !0 }
|
12279
|
-
),
|
12293
|
+
), qe(
|
12280
12294
|
() => s.value,
|
12281
12295
|
(A) => {
|
12282
12296
|
A && (u.value = _(A));
|
12283
12297
|
},
|
12284
12298
|
{ immediate: !0 }
|
12285
|
-
),
|
12299
|
+
), qe(
|
12286
12300
|
() => a.css,
|
12287
12301
|
(A) => {
|
12288
12302
|
A.forEach((O) => {
|
@@ -12294,7 +12308,7 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12294
12308
|
{ immediate: !0 }
|
12295
12309
|
);
|
12296
12310
|
const c = $(a.mode);
|
12297
|
-
|
12311
|
+
qe(
|
12298
12312
|
() => u.value,
|
12299
12313
|
(A) => {
|
12300
12314
|
A && i("update:element", A);
|
@@ -12302,7 +12316,7 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12302
12316
|
{ immediate: !0 }
|
12303
12317
|
);
|
12304
12318
|
const d = $("");
|
12305
|
-
|
12319
|
+
qe(
|
12306
12320
|
() => o.value,
|
12307
12321
|
(A) => {
|
12308
12322
|
i("update:modelValue", A);
|
@@ -12336,16 +12350,16 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12336
12350
|
((P = A.children) == null ? void 0 : P.length) === ((U = O.children) == null ? void 0 : U.length);
|
12337
12351
|
}
|
12338
12352
|
function ee(A) {
|
12339
|
-
var P, U, ue,
|
12353
|
+
var P, U, ue, Ne, Me, le, oe, $e, qt, ti;
|
12340
12354
|
if (g.value.xpath == A.xpath) {
|
12341
12355
|
if (g.value) {
|
12342
12356
|
if (A.type === z.Block) {
|
12343
12357
|
var O = !0;
|
12344
|
-
const
|
12358
|
+
const We = F(
|
12345
12359
|
u.value,
|
12346
12360
|
g.value.parentxpath || ""
|
12347
12361
|
);
|
12348
|
-
if (
|
12362
|
+
if (We && We.children && We.children.forEach((He) => {
|
12349
12363
|
if (He.tag != g.value.tag || // 检查标签一致
|
12350
12364
|
!Y(He, g.value)) {
|
12351
12365
|
O = !1;
|
@@ -12356,18 +12370,18 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12356
12370
|
return;
|
12357
12371
|
}
|
12358
12372
|
}
|
12359
|
-
if (g.value.rule = A.rule, g.value.type = A.type, (P = A.rule) != null && P.isThemeColor ? (A.type === 1 && ((!A.attrs.class || A.attrs.class && (!((U = A.attrs.class) != null && U.includes("theme_text")) || !((ue = A.attrs.class) != null && ue.includes(" theme_text")))) && (A.attrs.class += " theme_text"), (
|
12360
|
-
const
|
12373
|
+
if (g.value.rule = A.rule, g.value.type = A.type, (P = A.rule) != null && P.isThemeColor ? (A.type === 1 && ((!A.attrs.class || A.attrs.class && (!((U = A.attrs.class) != null && U.includes("theme_text")) || !((ue = A.attrs.class) != null && ue.includes(" theme_text")))) && (A.attrs.class += " theme_text"), (Ne = A.attrs.class) != null && Ne.includes("theme_bg") && (A.attrs.class = A.attrs.class.replace("theme_bg", ""))), A.type === 6 && (!((Me = A.attrs.class) != null && Me.includes("theme_bg")) && !((le = A.attrs.class) != null && le.includes(" theme_bg")) && (A.attrs.class += " theme_bg"), (oe = A.attrs.class) != null && oe.includes("theme_text") && (A.attrs.class = A.attrs.class.replace("theme_text", "")))) : (A.type === 1 && ($e = A.attrs.class) != null && $e.includes("theme_text") && (A.attrs.class = A.attrs.class.replace("theme_text", "")), A.type === 6 && (qt = A.attrs.class) != null && qt.includes("theme_bg") && (A.attrs.class = A.attrs.class.replace("theme_bg", ""))), g.value.type === z.Block) {
|
12374
|
+
const We = F(
|
12361
12375
|
u.value,
|
12362
12376
|
g.value.parentxpath || ""
|
12363
12377
|
);
|
12364
|
-
|
12378
|
+
We && We.children && (We.children.forEach((He) => {
|
12365
12379
|
if (He.tag != g.value.tag || // 检查标签一致
|
12366
12380
|
!Y(He, g.value)) {
|
12367
12381
|
Z.error("同级结构不一致,无法配置为块类型");
|
12368
12382
|
return;
|
12369
12383
|
}
|
12370
|
-
}),
|
12384
|
+
}), We.children.forEach((He) => {
|
12371
12385
|
var ms;
|
12372
12386
|
He.tag === g.value.tag && (He.rule = A.rule, He.type = A.type, (ms = He.attrs.class) != null && ms.includes(" mb40 relative") || (He.attrs.class += " mb40 relative"));
|
12373
12387
|
}));
|
@@ -12390,14 +12404,14 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12390
12404
|
function P(le) {
|
12391
12405
|
if (!le || !le[0]) return "";
|
12392
12406
|
const oe = [];
|
12393
|
-
let
|
12394
|
-
for (;
|
12395
|
-
const qt =
|
12396
|
-
oe.unshift(`${qt}[${
|
12407
|
+
let $e = le;
|
12408
|
+
for (; $e.length && $e[0].tagName !== "html"; ) {
|
12409
|
+
const qt = $e[0].tagName, We = $e.parent().children(qt).index($e) + 1;
|
12410
|
+
oe.unshift(`${qt}[${We}]`), $e = $e.parent();
|
12397
12411
|
}
|
12398
12412
|
return "/html/" + oe.join("/");
|
12399
12413
|
}
|
12400
|
-
const U = P(A).replace("/html/body[1]", ""), ue = A.children().toArray().map((le) => w(r(le), U)),
|
12414
|
+
const U = P(A).replace("/html/body[1]", ""), ue = A.children().toArray().map((le) => w(r(le), U)), Ne = (Me = a.rules) == null ? void 0 : Me.find((le) => le.xpath === U);
|
12401
12415
|
return {
|
12402
12416
|
tag: A[0].tagName,
|
12403
12417
|
text: A.contents().not(A.children()).text().trim(),
|
@@ -12405,8 +12419,8 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12405
12419
|
children: ue,
|
12406
12420
|
xpath: U,
|
12407
12421
|
parentxpath: O,
|
12408
|
-
type: (
|
12409
|
-
rule: (
|
12422
|
+
type: (Ne == null ? void 0 : Ne.type) || z.None,
|
12423
|
+
rule: (Ne == null ? void 0 : Ne.rule) || {}
|
12410
12424
|
};
|
12411
12425
|
}
|
12412
12426
|
function Q(A) {
|
@@ -12442,8 +12456,8 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12442
12456
|
(oe) => oe === O
|
12443
12457
|
);
|
12444
12458
|
if (ue === -1) return;
|
12445
|
-
const
|
12446
|
-
if ((A === "add" || A === "copy") &&
|
12459
|
+
const Ne = U.children.length, { minBlock: Me, maxBlock: le } = O.rule;
|
12460
|
+
if ((A === "add" || A === "copy") && Ne >= (le || 1 / 0)) {
|
12447
12461
|
L.value = `无法添加更多块。最大块数量为 ${le}`, Z.error(L.value);
|
12448
12462
|
return;
|
12449
12463
|
}
|
@@ -12481,7 +12495,7 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12481
12495
|
}
|
12482
12496
|
break;
|
12483
12497
|
case "delete":
|
12484
|
-
if (
|
12498
|
+
if (Ne <= (Me || 0)) {
|
12485
12499
|
L.value = `无法删除更多块。最小块数量为 ${Me}`, Z.error(L.value);
|
12486
12500
|
return;
|
12487
12501
|
}
|
@@ -12506,19 +12520,19 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12506
12520
|
const U = new FileReader();
|
12507
12521
|
U.onload = (ue) => {
|
12508
12522
|
var oe;
|
12509
|
-
let
|
12523
|
+
let Ne = (oe = ue == null ? void 0 : ue.target) == null ? void 0 : oe.result, Me = Hf(Ne), le = URL.createObjectURL(Me);
|
12510
12524
|
console.log("url", le), O.attrs.src = le, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
|
12511
12525
|
}, U.readAsDataURL(P);
|
12512
12526
|
}
|
12513
12527
|
else
|
12514
12528
|
O.attrs.src = P, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
|
12515
12529
|
}
|
12516
|
-
function
|
12530
|
+
function Le(A) {
|
12517
12531
|
const { icon: O } = A, P = F(u.value, A.element.xpath);
|
12518
12532
|
let U = P.attrs.class.replace(/icon-\S+/g, `icon-${O}`);
|
12519
12533
|
P.attrs.class = U, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
|
12520
12534
|
}
|
12521
|
-
const
|
12535
|
+
const _e = (A) => A.type.startsWith("image/") ? !0 : (Z.error("只能上传图片文件"), !1), D = $({});
|
12522
12536
|
function G(A, O) {
|
12523
12537
|
if (!A || A.length === 0)
|
12524
12538
|
return;
|
@@ -12533,11 +12547,11 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12533
12547
|
return;
|
12534
12548
|
}
|
12535
12549
|
}
|
12536
|
-
if (O.rule.minImageWidth && O.rule.maxImageHeight ? (
|
12550
|
+
if (O.rule.minImageWidth && O.rule.maxImageHeight ? (D.value.width = O.rule.minImageWidth, D.value.height = O.rule.maxImageHeight, D.value.aspectRatio = O.rule.minImageWidth / O.rule.maxImageHeight) : D.value = {}, P)
|
12537
12551
|
if (O.rule.crop) {
|
12538
12552
|
const U = P.thumbUrl;
|
12539
12553
|
f.value.handleOpenCropper(
|
12540
|
-
|
12554
|
+
D.value,
|
12541
12555
|
U,
|
12542
12556
|
P.name,
|
12543
12557
|
O
|
@@ -12547,48 +12561,48 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12547
12561
|
U.success && (O.attrs.src = U.file.url, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
|
12548
12562
|
}) : (O.attrs.src = P.thumbUrl, d.value = (/* @__PURE__ */ new Date()).getTime().toString());
|
12549
12563
|
}
|
12550
|
-
const ne = $(a.previewWidth),
|
12551
|
-
let Ie = $(!1),
|
12564
|
+
const ne = $(a.previewWidth), Ae = $(375);
|
12565
|
+
let Ie = $(!1), Ze = $(""), mt = 0, Fe = 0;
|
12552
12566
|
function Et(A) {
|
12553
|
-
|
12567
|
+
Ze.value = A, Ie.value = !0, mt = event.clientX, A === "preview" ? Fe = ne.value : A === "structure" && (Fe = Ae.value), window.addEventListener("mousemove", ga), window.addEventListener("mouseup", _a);
|
12554
12568
|
}
|
12555
12569
|
function ga(A) {
|
12556
12570
|
if (!Ie.value) return;
|
12557
12571
|
const O = A.clientX - mt;
|
12558
|
-
|
12572
|
+
Ze.value === "preview" ? ne.value = Math.max(200, Fe + O) : Ze.value === "structure" && (Ae.value = Math.max(200, Fe - O));
|
12559
12573
|
}
|
12560
12574
|
function _a() {
|
12561
|
-
Ie.value = !1,
|
12575
|
+
Ie.value = !1, Ze.value = "", window.removeEventListener("mousemove", ga), window.removeEventListener("mouseup", _a);
|
12562
12576
|
}
|
12563
|
-
return (A, O) => (
|
12564
|
-
A.preview ? (
|
12577
|
+
return (A, O) => (v(), R("div", L1, [
|
12578
|
+
A.preview ? (v(), R("div", {
|
12565
12579
|
key: 0,
|
12566
12580
|
class: "border-l overflow-auto resize-area",
|
12567
12581
|
style: Ts({ width: ne.value + "px" })
|
12568
12582
|
}, [
|
12569
|
-
A.showTitle ? (
|
12583
|
+
A.showTitle ? (v(), R("h2", y1, [
|
12570
12584
|
O[2] || (O[2] = Ei(" 实时预览 ")),
|
12571
|
-
x("span", R1,
|
12585
|
+
x("span", R1, Ce(ne.value) + "px", 1)
|
12572
12586
|
])) : H("", !0),
|
12573
12587
|
x("div", null, [
|
12574
|
-
o.value ? (
|
12588
|
+
o.value ? (v(), R("div", {
|
12575
12589
|
key: 0,
|
12576
12590
|
innerHTML: o.value
|
12577
|
-
}, null, 8, M1)) : (
|
12591
|
+
}, null, 8, M1)) : (v(), R("div", {
|
12578
12592
|
key: 1,
|
12579
12593
|
innerHTML: de(r)("body").html()
|
12580
12594
|
}, null, 8, P1))
|
12581
12595
|
])
|
12582
12596
|
], 4)) : H("", !0),
|
12583
|
-
A.preview ? (
|
12597
|
+
A.preview ? (v(), R("div", {
|
12584
12598
|
key: 1,
|
12585
12599
|
class: "resizer",
|
12586
12600
|
onMousedown: O[0] || (O[0] = (P) => Et("preview"))
|
12587
12601
|
}, null, 32)) : H("", !0),
|
12588
12602
|
x("div", k1, [
|
12589
|
-
A.showTitle ? (
|
12603
|
+
A.showTitle ? (v(), R("h2", w1, "结构渲染")) : H("", !0),
|
12590
12604
|
x("div", B1, [
|
12591
|
-
u.value ? (
|
12605
|
+
u.value ? (v(), Ct(Eh, {
|
12592
12606
|
key: 0,
|
12593
12607
|
"upload-by-file": A.uploadByFile,
|
12594
12608
|
cropper: f.value,
|
@@ -12609,22 +12623,22 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12609
12623
|
}, null, 8, ["upload-by-file", "cropper", "icon", "upload", "mode", "icons", "r", "element", "selectedElement", "hoveredElement"])) : H("", !0)
|
12610
12624
|
])
|
12611
12625
|
]),
|
12612
|
-
c.value == "design" ? (
|
12626
|
+
c.value == "design" ? (v(), R("div", {
|
12613
12627
|
key: 2,
|
12614
12628
|
class: "resizer",
|
12615
12629
|
onMousedown: O[1] || (O[1] = (P) => Et("structure"))
|
12616
12630
|
}, null, 32)) : H("", !0),
|
12617
|
-
c.value == "design" ? (
|
12631
|
+
c.value == "design" ? (v(), R("div", {
|
12618
12632
|
key: 3,
|
12619
12633
|
class: "resize-area overflow-auto",
|
12620
|
-
style: Ts({ width:
|
12634
|
+
style: Ts({ width: Ae.value + "px" })
|
12621
12635
|
}, [
|
12622
|
-
A.showTitle ? (
|
12636
|
+
A.showTitle ? (v(), R("h2", U1, [
|
12623
12637
|
O[3] || (O[3] = Ei(" 节点属性 ")),
|
12624
|
-
x("span", F1,
|
12638
|
+
x("span", F1, Ce(Ae.value) + "px", 1)
|
12625
12639
|
])) : H("", !0),
|
12626
12640
|
x("div", H1, [
|
12627
|
-
g.value ? (
|
12641
|
+
g.value ? (v(), Ct(jh, {
|
12628
12642
|
key: 0,
|
12629
12643
|
element: g.value,
|
12630
12644
|
onUpdateElement: ee
|
@@ -12640,14 +12654,14 @@ const v1 = /* @__PURE__ */ ft(A1, [["render", D1], ["__scopeId", "data-v-e0428cf
|
|
12640
12654
|
icons: A.icons,
|
12641
12655
|
ref_key: "iconRef",
|
12642
12656
|
ref: E,
|
12643
|
-
onOk:
|
12657
|
+
onOk: Le
|
12644
12658
|
}, null, 8, ["icons"]),
|
12645
12659
|
ut(v1, {
|
12646
12660
|
ref_key: "uploadRef",
|
12647
12661
|
ref: T,
|
12648
12662
|
multiple: !1,
|
12649
12663
|
show: !1,
|
12650
|
-
beforeUpload:
|
12664
|
+
beforeUpload: _e,
|
12651
12665
|
onChange: G
|
12652
12666
|
}, {
|
12653
12667
|
"upload-icon": Ya(() => O[4] || (O[4] = [
|