gp-designer 1.0.14 → 1.0.16
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 +685 -671
- package/dist/gp-designer.umd.js +6 -6
- package/dist/style.css +2 -2
- package/dist/{001.html → topic/001.html} +3 -3
- package/dist/{002.html → topic/002.html} +1 -1
- package/dist/{004.html → topic/004.html} +15 -15
- package/dist/topic//344/270/223/351/242/230/346/265/213/350/257/225/346/250/241/346/235/277.txt +0 -0
- package/dist/types/components/Designer.vue.d.ts +18 -0
- package/package.json +1 -1
- package/dist/004.css +0 -790
- package/dist/pageiconfont.css +0 -59
- /package/dist/{001.css → topic/001.css} +0 -0
- /package/dist/{003.html → topic/003.html} +0 -0
- /package/dist/{iconfont.css → topic/iconfont.css} +0 -0
- /package/dist/{images → topic/images}/004/banner.png +0 -0
- /package/dist/{images → topic/images}/004/tip-trimark.png +0 -0
- /package/dist/{template → topic/template}/img/about_us_banners.png +0 -0
package/dist/gp-designer.es.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { defineComponent as Ge, computed as Ke, openBlock as
|
2
|
-
var
|
1
|
+
import { defineComponent as Ge, computed as Ke, openBlock as M, createElementBlock as U, normalizeClass as Da, ref as K, watch as ot, createElementVNode as x, withModifiers as he, Fragment as Ht, renderList as Ks, createBlock as xt, createCommentVNode as $, mergeProps as Zs, toDisplayString as ve, resolveComponent as wu, resolveDynamicComponent as Bu, withCtx as Js, createTextVNode as ti, unref as Ne, createVNode as lt, Transition as Uu, renderSlot as Fu, reactive as Hu, createApp as Yu, h as es, withDirectives as st, vModelSelect as qu, vModelText as pt, normalizeStyle as ts } from "vue";
|
2
|
+
var z;
|
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";
|
5
|
-
})(
|
5
|
+
})(z || (z = {}));
|
6
6
|
function Vu(e) {
|
7
|
-
return e.type ===
|
7
|
+
return e.type === z.Tag || e.type === z.Script || e.type === z.Style;
|
8
8
|
}
|
9
|
-
const Wu =
|
9
|
+
const Wu = z.Root, $u = z.Text, Xu = z.Directive, Gu = z.Comment, Qu = z.Script, ju = z.Style, zu = z.Tag, Ku = z.CDATA, Zu = z.Doctype;
|
10
10
|
let en = class {
|
11
11
|
constructor() {
|
12
12
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
@@ -72,7 +72,7 @@ class Si extends en {
|
|
72
72
|
}
|
73
73
|
class jt extends Si {
|
74
74
|
constructor() {
|
75
|
-
super(...arguments), this.type =
|
75
|
+
super(...arguments), this.type = z.Text;
|
76
76
|
}
|
77
77
|
get nodeType() {
|
78
78
|
return 3;
|
@@ -80,7 +80,7 @@ class jt extends Si {
|
|
80
80
|
}
|
81
81
|
class xi extends Si {
|
82
82
|
constructor() {
|
83
|
-
super(...arguments), this.type =
|
83
|
+
super(...arguments), this.type = z.Comment;
|
84
84
|
}
|
85
85
|
get nodeType() {
|
86
86
|
return 8;
|
@@ -88,7 +88,7 @@ class xi extends Si {
|
|
88
88
|
}
|
89
89
|
class Oi extends Si {
|
90
90
|
constructor(t, a) {
|
91
|
-
super(a), this.name = t, this.type =
|
91
|
+
super(a), this.name = t, this.type = z.Directive;
|
92
92
|
}
|
93
93
|
get nodeType() {
|
94
94
|
return 1;
|
@@ -124,7 +124,7 @@ class Di extends en {
|
|
124
124
|
}
|
125
125
|
class tn extends Di {
|
126
126
|
constructor() {
|
127
|
-
super(...arguments), this.type =
|
127
|
+
super(...arguments), this.type = z.CDATA;
|
128
128
|
}
|
129
129
|
get nodeType() {
|
130
130
|
return 4;
|
@@ -132,7 +132,7 @@ class tn extends Di {
|
|
132
132
|
}
|
133
133
|
class dt extends Di {
|
134
134
|
constructor() {
|
135
|
-
super(...arguments), this.type =
|
135
|
+
super(...arguments), this.type = z.Root;
|
136
136
|
}
|
137
137
|
get nodeType() {
|
138
138
|
return 9;
|
@@ -144,7 +144,7 @@ class Li extends Di {
|
|
144
144
|
* @param attribs Object mapping attribute names to attribute values.
|
145
145
|
* @param children Children of the node.
|
146
146
|
*/
|
147
|
-
constructor(t, a, i = [], s = t === "script" ?
|
147
|
+
constructor(t, a, i = [], s = t === "script" ? z.Script : t === "style" ? z.Style : z.Tag) {
|
148
148
|
super(i), this.name = t, this.attribs = a, this.type = s;
|
149
149
|
}
|
150
150
|
get nodeType() {
|
@@ -173,23 +173,23 @@ class Li extends Di {
|
|
173
173
|
});
|
174
174
|
}
|
175
175
|
}
|
176
|
-
function
|
176
|
+
function w(e) {
|
177
177
|
return Vu(e);
|
178
178
|
}
|
179
179
|
function La(e) {
|
180
|
-
return e.type ===
|
180
|
+
return e.type === z.CDATA;
|
181
181
|
}
|
182
182
|
function He(e) {
|
183
|
-
return e.type ===
|
183
|
+
return e.type === z.Text;
|
184
184
|
}
|
185
185
|
function va(e) {
|
186
|
-
return e.type ===
|
186
|
+
return e.type === z.Comment;
|
187
187
|
}
|
188
188
|
function ai(e) {
|
189
|
-
return e.type ===
|
189
|
+
return e.type === z.Directive;
|
190
190
|
}
|
191
191
|
function at(e) {
|
192
|
-
return e.type ===
|
192
|
+
return e.type === z.Root;
|
193
193
|
}
|
194
194
|
function Te(e) {
|
195
195
|
return Object.prototype.hasOwnProperty.call(e, "children");
|
@@ -200,7 +200,7 @@ function zt(e, t = !1) {
|
|
200
200
|
a = new jt(e.data);
|
201
201
|
else if (va(e))
|
202
202
|
a = new xi(e.data);
|
203
|
-
else if (
|
203
|
+
else if (w(e)) {
|
204
204
|
const i = t ? qa(e.children) : [], s = new Li(e.name, { ...e.attribs }, i);
|
205
205
|
i.forEach((u) => u.parent = s), e.namespace != null && (s.namespace = e.namespace), e["x-attribsNamespace"] && (s["x-attribsNamespace"] = { ...e["x-attribsNamespace"] }), e["x-attribsPrefix"] && (s["x-attribsPrefix"] = { ...e["x-attribsPrefix"] }), a = s;
|
206
206
|
} else if (La(e)) {
|
@@ -256,12 +256,12 @@ class Ju {
|
|
256
256
|
this.options.withEndIndices && (t.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(t);
|
257
257
|
}
|
258
258
|
onopentag(t, a) {
|
259
|
-
const i = this.options.xmlMode ?
|
259
|
+
const i = this.options.xmlMode ? z.Tag : void 0, s = new Li(t, a, void 0, i);
|
260
260
|
this.addNode(s), this.tagStack.push(s);
|
261
261
|
}
|
262
262
|
ontext(t) {
|
263
263
|
const { lastNode: a } = this;
|
264
|
-
if (a && a.type ===
|
264
|
+
if (a && a.type === z.Text)
|
265
265
|
a.data += t, this.options.withEndIndices && (a.endIndex = this.parser.endIndex);
|
266
266
|
else {
|
267
267
|
const i = new jt(t);
|
@@ -269,7 +269,7 @@ class Ju {
|
|
269
269
|
}
|
270
270
|
}
|
271
271
|
oncomment(t) {
|
272
|
-
if (this.lastNode && this.lastNode.type ===
|
272
|
+
if (this.lastNode && this.lastNode.type === z.Comment) {
|
273
273
|
this.lastNode.data += t;
|
274
274
|
return;
|
275
275
|
}
|
@@ -379,7 +379,7 @@ var ke;
|
|
379
379
|
(function(e) {
|
380
380
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
381
381
|
})(ke || (ke = {}));
|
382
|
-
class
|
382
|
+
class yi {
|
383
383
|
constructor(t, a, i) {
|
384
384
|
this.decodeTree = t, this.emitCodePoint = a, this.errors = i, this.state = fe.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = ke.Strict;
|
385
385
|
}
|
@@ -568,7 +568,7 @@ class Ri {
|
|
568
568
|
}
|
569
569
|
function sn(e) {
|
570
570
|
let t = "";
|
571
|
-
const a = new
|
571
|
+
const a = new yi(e, (i) => t += ii(i));
|
572
572
|
return function(s, u) {
|
573
573
|
let r = 0, o = 0;
|
574
574
|
for (; (o = s.indexOf("&", o)) >= 0; ) {
|
@@ -791,7 +791,7 @@ const ss = /* @__PURE__ */ new Set([
|
|
791
791
|
"track",
|
792
792
|
"wbr"
|
793
793
|
]);
|
794
|
-
function
|
794
|
+
function ya(e, t = {}) {
|
795
795
|
const a = "length" in e ? e : [e];
|
796
796
|
let i = "";
|
797
797
|
for (let s = 0; s < a.length; s++)
|
@@ -801,7 +801,7 @@ function Ra(e, t = {}) {
|
|
801
801
|
function Er(e, t) {
|
802
802
|
switch (e.type) {
|
803
803
|
case Wu:
|
804
|
-
return
|
804
|
+
return ya(e.children, t);
|
805
805
|
case Zu:
|
806
806
|
case Xu:
|
807
807
|
return br(e);
|
@@ -839,7 +839,7 @@ function pr(e, t) {
|
|
839
839
|
) : (
|
840
840
|
// User explicitly asked for self-closing tags, even in HTML mode
|
841
841
|
t.selfClosingTags && ss.has(e.name)
|
842
|
-
)) ? (t.xmlMode || (i += " "), i += "/>") : (i += ">", e.children.length > 0 && (i +=
|
842
|
+
)) ? (t.xmlMode || (i += " "), i += "/>") : (i += ">", e.children.length > 0 && (i += ya(e.children, t)), (t.xmlMode || !ss.has(e.name)) && (i += `</${e.name}>`)), i;
|
843
843
|
}
|
844
844
|
function br(e) {
|
845
845
|
return `<${e.data}>`;
|
@@ -856,22 +856,22 @@ function Ar(e) {
|
|
856
856
|
return `<!--${e.data}-->`;
|
857
857
|
}
|
858
858
|
function cn(e, t) {
|
859
|
-
return
|
859
|
+
return ya(e, t);
|
860
860
|
}
|
861
861
|
function Nr(e, t) {
|
862
862
|
return Te(e) ? e.children.map((a) => cn(a, t)).join("") : "";
|
863
863
|
}
|
864
864
|
function Ea(e) {
|
865
|
-
return Array.isArray(e) ? e.map(Ea).join("") :
|
865
|
+
return Array.isArray(e) ? e.map(Ea).join("") : w(e) ? e.name === "br" ? `
|
866
866
|
` : Ea(e.children) : La(e) ? Ea(e.children) : He(e) ? e.data : "";
|
867
867
|
}
|
868
868
|
function Ot(e) {
|
869
869
|
return Array.isArray(e) ? e.map(Ot).join("") : Te(e) && !va(e) ? Ot(e.children) : He(e) ? e.data : "";
|
870
870
|
}
|
871
871
|
function Ta(e) {
|
872
|
-
return Array.isArray(e) ? e.map(Ta).join("") : Te(e) && (e.type ===
|
872
|
+
return Array.isArray(e) ? e.map(Ta).join("") : Te(e) && (e.type === z.Tag || La(e)) ? Ta(e.children) : He(e) ? e.data : "";
|
873
873
|
}
|
874
|
-
function
|
874
|
+
function Ra(e) {
|
875
875
|
return Te(e) ? e.children : [];
|
876
876
|
}
|
877
877
|
function ln(e) {
|
@@ -880,7 +880,7 @@ function ln(e) {
|
|
880
880
|
function hn(e) {
|
881
881
|
const t = ln(e);
|
882
882
|
if (t != null)
|
883
|
-
return
|
883
|
+
return Ra(t);
|
884
884
|
const a = [e];
|
885
885
|
let { prev: i, next: s } = e;
|
886
886
|
for (; i != null; )
|
@@ -899,15 +899,15 @@ function Cr(e, t) {
|
|
899
899
|
function Sr(e) {
|
900
900
|
return e.name;
|
901
901
|
}
|
902
|
-
function
|
902
|
+
function Ri(e) {
|
903
903
|
let { next: t } = e;
|
904
|
-
for (; t !== null && !
|
904
|
+
for (; t !== null && !w(t); )
|
905
905
|
({ next: t } = t);
|
906
906
|
return t;
|
907
907
|
}
|
908
908
|
function Mi(e) {
|
909
909
|
let { prev: t } = e;
|
910
|
-
for (; t !== null && !
|
910
|
+
for (; t !== null && !w(t); )
|
911
911
|
({ prev: t } = t);
|
912
912
|
return t;
|
913
913
|
}
|
@@ -980,23 +980,23 @@ function Pi(e, t, a, i) {
|
|
980
980
|
a && Te(o) && o.children.length > 0 && (r.unshift(0), u.unshift(o.children));
|
981
981
|
}
|
982
982
|
}
|
983
|
-
function
|
983
|
+
function yr(e, t) {
|
984
984
|
return t.find(e);
|
985
985
|
}
|
986
986
|
function ki(e, t, a = !0) {
|
987
987
|
let i = null;
|
988
988
|
for (let s = 0; s < t.length && !i; s++) {
|
989
989
|
const u = t[s];
|
990
|
-
if (
|
990
|
+
if (w(u))
|
991
991
|
e(u) ? i = u : a && u.children.length > 0 && (i = ki(e, u.children, !0));
|
992
992
|
else continue;
|
993
993
|
}
|
994
994
|
return i;
|
995
995
|
}
|
996
996
|
function dn(e, t) {
|
997
|
-
return t.some((a) =>
|
997
|
+
return t.some((a) => w(a) && (e(a) || dn(e, a.children)));
|
998
998
|
}
|
999
|
-
function
|
999
|
+
function Rr(e, t) {
|
1000
1000
|
const a = [], i = [t], s = [0];
|
1001
1001
|
for (; ; ) {
|
1002
1002
|
if (s[0] >= i[0].length) {
|
@@ -1006,12 +1006,12 @@ function yr(e, t) {
|
|
1006
1006
|
continue;
|
1007
1007
|
}
|
1008
1008
|
const u = i[0][s[0]++];
|
1009
|
-
|
1009
|
+
w(u) && (e(u) && a.push(u), u.children.length > 0 && (s.unshift(0), i.unshift(u.children)));
|
1010
1010
|
}
|
1011
1011
|
}
|
1012
1012
|
const pa = {
|
1013
1013
|
tag_name(e) {
|
1014
|
-
return typeof e == "function" ? (t) =>
|
1014
|
+
return typeof e == "function" ? (t) => w(t) && e(t.name) : e === "*" ? w : (t) => w(t) && t.name === e;
|
1015
1015
|
},
|
1016
1016
|
tag_type(e) {
|
1017
1017
|
return typeof e == "function" ? (t) => e(t.type) : (t) => t.type === e;
|
@@ -1021,7 +1021,7 @@ const pa = {
|
|
1021
1021
|
}
|
1022
1022
|
};
|
1023
1023
|
function fn(e, t) {
|
1024
|
-
return typeof t == "function" ? (a) =>
|
1024
|
+
return typeof t == "function" ? (a) => w(a) && t(a.attribs[e]) : (a) => w(a) && a.attribs[e] === t;
|
1025
1025
|
}
|
1026
1026
|
function Mr(e, t) {
|
1027
1027
|
return (a) => e(a) || t(a);
|
@@ -1183,11 +1183,11 @@ const Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1183
1183
|
existsOne: dn,
|
1184
1184
|
filter: Ma,
|
1185
1185
|
find: Pi,
|
1186
|
-
findAll:
|
1186
|
+
findAll: Rr,
|
1187
1187
|
findOne: ki,
|
1188
|
-
findOneChild:
|
1188
|
+
findOneChild: yr,
|
1189
1189
|
getAttributeValue: Ir,
|
1190
|
-
getChildren:
|
1190
|
+
getChildren: Ra,
|
1191
1191
|
getElementById: wr,
|
1192
1192
|
getElements: kr,
|
1193
1193
|
getElementsByTagName: Lt,
|
@@ -1205,9 +1205,9 @@ const Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1205
1205
|
isCDATA: La,
|
1206
1206
|
isComment: va,
|
1207
1207
|
isDocument: at,
|
1208
|
-
isTag:
|
1208
|
+
isTag: w,
|
1209
1209
|
isText: He,
|
1210
|
-
nextElementSibling:
|
1210
|
+
nextElementSibling: Ri,
|
1211
1211
|
prepend: vr,
|
1212
1212
|
prependChild: Lr,
|
1213
1213
|
prevElementSibling: Mi,
|
@@ -1335,7 +1335,7 @@ function ui(e) {
|
|
1335
1335
|
const Zt = Object.prototype.hasOwnProperty, Jt = /\s+/, ri = "data-", wi = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, ao = /^{[^]*}$|^\[[^]*]$/;
|
1336
1336
|
function ga(e, t, a) {
|
1337
1337
|
var i;
|
1338
|
-
if (!(!e || !
|
1338
|
+
if (!(!e || !w(e))) {
|
1339
1339
|
if ((i = e.attribs) !== null && i !== void 0 || (e.attribs = {}), !t)
|
1340
1340
|
return e.attribs;
|
1341
1341
|
if (Zt.call(e.attribs, t))
|
@@ -1355,11 +1355,11 @@ function io(e, t) {
|
|
1355
1355
|
if (typeof e != "string")
|
1356
1356
|
throw new Error("Bad combination of arguments.");
|
1357
1357
|
return re(this, (a, i) => {
|
1358
|
-
|
1358
|
+
w(a) && Nt(a, e, t.call(a, i, a.attribs[e]));
|
1359
1359
|
});
|
1360
1360
|
}
|
1361
1361
|
return re(this, (a) => {
|
1362
|
-
if (
|
1362
|
+
if (w(a))
|
1363
1363
|
if (typeof e == "object")
|
1364
1364
|
for (const i of Object.keys(e)) {
|
1365
1365
|
const s = e[i];
|
@@ -1384,7 +1384,7 @@ function so(e, t) {
|
|
1384
1384
|
var a;
|
1385
1385
|
if (typeof e == "string" && t === void 0) {
|
1386
1386
|
const i = this[0];
|
1387
|
-
if (!i || !
|
1387
|
+
if (!i || !w(i))
|
1388
1388
|
return;
|
1389
1389
|
switch (e) {
|
1390
1390
|
case "style": {
|
@@ -1418,11 +1418,11 @@ function so(e, t) {
|
|
1418
1418
|
if (typeof e == "object")
|
1419
1419
|
throw new TypeError("Bad combination of arguments.");
|
1420
1420
|
return re(this, (i, s) => {
|
1421
|
-
|
1421
|
+
w(i) && Wa(i, e, t.call(i, s, us(i, e, this.options.xmlMode)), this.options.xmlMode);
|
1422
1422
|
});
|
1423
1423
|
}
|
1424
1424
|
return re(this, (i) => {
|
1425
|
-
if (
|
1425
|
+
if (w(i))
|
1426
1426
|
if (typeof e == "object")
|
1427
1427
|
for (const s of Object.keys(e)) {
|
1428
1428
|
const u = e[s];
|
@@ -1473,16 +1473,16 @@ function gn(e) {
|
|
1473
1473
|
function ro(e, t) {
|
1474
1474
|
var a;
|
1475
1475
|
const i = this[0];
|
1476
|
-
if (!i || !
|
1476
|
+
if (!i || !w(i))
|
1477
1477
|
return;
|
1478
1478
|
const s = i;
|
1479
1479
|
return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? no(s) : typeof e == "object" || t !== void 0 ? (re(this, (u) => {
|
1480
|
-
|
1480
|
+
w(u) && (typeof e == "object" ? rs(u, e) : rs(u, e, t));
|
1481
1481
|
}), this) : uo(s, e);
|
1482
1482
|
}
|
1483
1483
|
function oo(e) {
|
1484
1484
|
const t = arguments.length === 0, a = this[0];
|
1485
|
-
if (!a || !
|
1485
|
+
if (!a || !w(a))
|
1486
1486
|
return t ? void 0 : this;
|
1487
1487
|
switch (a.name) {
|
1488
1488
|
case "textarea":
|
@@ -1515,13 +1515,13 @@ function co(e) {
|
|
1515
1515
|
const t = _a(e);
|
1516
1516
|
for (const a of t)
|
1517
1517
|
re(this, (i) => {
|
1518
|
-
|
1518
|
+
w(i) && _n(i, a);
|
1519
1519
|
});
|
1520
1520
|
return this;
|
1521
1521
|
}
|
1522
1522
|
function lo(e) {
|
1523
1523
|
return this.toArray().some((t) => {
|
1524
|
-
const a =
|
1524
|
+
const a = w(t) && t.attribs.class;
|
1525
1525
|
let i = -1;
|
1526
1526
|
if (a && e.length > 0)
|
1527
1527
|
for (; (i = a.indexOf(e, i + 1)) > -1; ) {
|
@@ -1535,7 +1535,7 @@ function lo(e) {
|
|
1535
1535
|
function An(e) {
|
1536
1536
|
if (typeof e == "function")
|
1537
1537
|
return re(this, (i, s) => {
|
1538
|
-
if (
|
1538
|
+
if (w(i)) {
|
1539
1539
|
const u = i.attribs.class || "";
|
1540
1540
|
An.call([i], e.call(i, s, u));
|
1541
1541
|
}
|
@@ -1545,7 +1545,7 @@ function An(e) {
|
|
1545
1545
|
const t = e.split(Jt), a = this.length;
|
1546
1546
|
for (let i = 0; i < a; i++) {
|
1547
1547
|
const s = this[i];
|
1548
|
-
if (!
|
1548
|
+
if (!w(s))
|
1549
1549
|
continue;
|
1550
1550
|
const u = ga(s, "class", !1);
|
1551
1551
|
if (u) {
|
@@ -1563,11 +1563,11 @@ function An(e) {
|
|
1563
1563
|
function Nn(e) {
|
1564
1564
|
if (typeof e == "function")
|
1565
1565
|
return re(this, (s, u) => {
|
1566
|
-
|
1566
|
+
w(s) && Nn.call([s], e.call(s, u, s.attribs.class || ""));
|
1567
1567
|
});
|
1568
1568
|
const t = _a(e), a = t.length, i = arguments.length === 0;
|
1569
1569
|
return re(this, (s) => {
|
1570
|
-
if (
|
1570
|
+
if (w(s))
|
1571
1571
|
if (i)
|
1572
1572
|
s.attribs.class = "";
|
1573
1573
|
else {
|
@@ -1584,14 +1584,14 @@ function Nn(e) {
|
|
1584
1584
|
function In(e, t) {
|
1585
1585
|
if (typeof e == "function")
|
1586
1586
|
return re(this, (r, o) => {
|
1587
|
-
|
1587
|
+
w(r) && In.call([r], e.call(r, o, r.attribs.class || "", t), t);
|
1588
1588
|
});
|
1589
1589
|
if (!e || typeof e != "string")
|
1590
1590
|
return this;
|
1591
1591
|
const a = e.split(Jt), i = a.length, s = typeof t == "boolean" ? t ? 1 : -1 : 0, u = this.length;
|
1592
1592
|
for (let r = 0; r < u; r++) {
|
1593
1593
|
const o = this[r];
|
1594
|
-
if (!
|
1594
|
+
if (!w(o))
|
1595
1595
|
continue;
|
1596
1596
|
const c = _a(o.attribs.class);
|
1597
1597
|
for (let h = 0; h < i; h++) {
|
@@ -1774,44 +1774,44 @@ function Cn(e, t, a) {
|
|
1774
1774
|
let A, I = null;
|
1775
1775
|
t.charCodeAt(a) === 124 ? A = s(1) : t.startsWith("*|", a) ? (I = "*", A = s(2)) : (A = s(0), t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 61 && (I = A, A = s(1))), u(0);
|
1776
1776
|
let L = de.Exists;
|
1777
|
-
const
|
1778
|
-
if (
|
1779
|
-
if (L =
|
1777
|
+
const P = Eo.get(t.charCodeAt(a));
|
1778
|
+
if (P) {
|
1779
|
+
if (L = P, t.charCodeAt(a + 1) !== 61)
|
1780
1780
|
throw new Error("Expected `=`");
|
1781
1781
|
u(2);
|
1782
1782
|
} else t.charCodeAt(a) === 61 && (L = de.Equals, u(1));
|
1783
|
-
let
|
1783
|
+
let G = "", F = null;
|
1784
1784
|
if (L !== "exists") {
|
1785
1785
|
if ($a(t.charCodeAt(a))) {
|
1786
|
-
const
|
1786
|
+
const k = t.charCodeAt(a);
|
1787
1787
|
let g = a + 1;
|
1788
|
-
for (; g < t.length && (t.charCodeAt(g) !==
|
1788
|
+
for (; g < t.length && (t.charCodeAt(g) !== k || o(g)); )
|
1789
1789
|
g += 1;
|
1790
|
-
if (t.charCodeAt(g) !==
|
1790
|
+
if (t.charCodeAt(g) !== k)
|
1791
1791
|
throw new Error("Attribute value didn't end");
|
1792
|
-
|
1792
|
+
G = Mt(t.slice(a + 1, g)), a = g + 1;
|
1793
1793
|
} else {
|
1794
|
-
const
|
1794
|
+
const k = a;
|
1795
1795
|
for (; a < t.length && (!cs(t.charCodeAt(a)) && t.charCodeAt(a) !== 93 || o(a)); )
|
1796
1796
|
a += 1;
|
1797
|
-
|
1797
|
+
G = Mt(t.slice(k, a));
|
1798
1798
|
}
|
1799
1799
|
u(0);
|
1800
|
-
const
|
1801
|
-
|
1800
|
+
const H = t.charCodeAt(a) | 32;
|
1801
|
+
H === 115 ? (F = !1, u(1)) : H === 105 && (F = !0, u(1));
|
1802
1802
|
}
|
1803
1803
|
if (t.charCodeAt(a) !== 93)
|
1804
1804
|
throw new Error("Attribute selector didn't terminate");
|
1805
1805
|
a += 1;
|
1806
|
-
const
|
1806
|
+
const X = {
|
1807
1807
|
type: v.Attribute,
|
1808
1808
|
name: A,
|
1809
1809
|
action: L,
|
1810
|
-
value:
|
1810
|
+
value: G,
|
1811
1811
|
namespace: I,
|
1812
|
-
ignoreCase:
|
1812
|
+
ignoreCase: F
|
1813
1813
|
};
|
1814
|
-
i.push(
|
1814
|
+
i.push(X);
|
1815
1815
|
break;
|
1816
1816
|
}
|
1817
1817
|
case 58: {
|
@@ -1883,7 +1883,7 @@ var Aa = {
|
|
1883
1883
|
return !1;
|
1884
1884
|
}
|
1885
1885
|
};
|
1886
|
-
const
|
1886
|
+
const q = /* @__PURE__ */ bo(Aa), Sn = /* @__PURE__ */ new Map([
|
1887
1887
|
[v.Universal, 50],
|
1888
1888
|
[v.Tag, 30],
|
1889
1889
|
[v.Attribute, 1],
|
@@ -1995,7 +1995,7 @@ const Io = {
|
|
1995
1995
|
element(e, t, a) {
|
1996
1996
|
const { adapter: i } = a, { name: s, value: u } = t;
|
1997
1997
|
if (/\s/.test(u))
|
1998
|
-
return
|
1998
|
+
return q.falseFunc;
|
1999
1999
|
const r = new RegExp(`(?:^|\\s)${ls(u)}(?:$|\\s)`, nt(t, a) ? "i" : "");
|
2000
2000
|
return function(c) {
|
2001
2001
|
const h = i.getAttributeValue(c, s);
|
@@ -2009,7 +2009,7 @@ const Io = {
|
|
2009
2009
|
const { adapter: i } = a, { name: s } = t;
|
2010
2010
|
let { value: u } = t;
|
2011
2011
|
const r = u.length;
|
2012
|
-
return r === 0 ?
|
2012
|
+
return r === 0 ? q.falseFunc : nt(t, a) ? (u = u.toLowerCase(), (o) => {
|
2013
2013
|
const c = i.getAttributeValue(o, s);
|
2014
2014
|
return c != null && c.length >= r && c.substr(0, r).toLowerCase() === u && e(o);
|
2015
2015
|
}) : (o) => {
|
@@ -2021,7 +2021,7 @@ const Io = {
|
|
2021
2021
|
const { adapter: i } = a, { name: s } = t;
|
2022
2022
|
let { value: u } = t;
|
2023
2023
|
const r = -u.length;
|
2024
|
-
return r === 0 ?
|
2024
|
+
return r === 0 ? q.falseFunc : nt(t, a) ? (u = u.toLowerCase(), (o) => {
|
2025
2025
|
var c;
|
2026
2026
|
return ((c = i.getAttributeValue(o, s)) === null || c === void 0 ? void 0 : c.substr(r).toLowerCase()) === u && e(o);
|
2027
2027
|
}) : (o) => {
|
@@ -2032,7 +2032,7 @@ const Io = {
|
|
2032
2032
|
any(e, t, a) {
|
2033
2033
|
const { adapter: i } = a, { name: s, value: u } = t;
|
2034
2034
|
if (u === "")
|
2035
|
-
return
|
2035
|
+
return q.falseFunc;
|
2036
2036
|
if (nt(t, a)) {
|
2037
2037
|
const r = new RegExp(ls(u), "i");
|
2038
2038
|
return function(c) {
|
@@ -2081,13 +2081,13 @@ function xo(e) {
|
|
2081
2081
|
function Oo(e) {
|
2082
2082
|
const t = e[0], a = e[1] - 1;
|
2083
2083
|
if (a < 0 && t <= 0)
|
2084
|
-
return
|
2084
|
+
return q.falseFunc;
|
2085
2085
|
if (t === -1)
|
2086
2086
|
return (u) => u <= a;
|
2087
2087
|
if (t === 0)
|
2088
2088
|
return (u) => u === a;
|
2089
2089
|
if (t === 1)
|
2090
|
-
return a < 0 ?
|
2090
|
+
return a < 0 ? q.trueFunc : (u) => u >= a;
|
2091
2091
|
const i = Math.abs(t), s = (a % i + i) % i;
|
2092
2092
|
return t > 1 ? (u) => u >= a && u % i === s : (u) => u <= a && u % i === s;
|
2093
2093
|
}
|
@@ -2115,7 +2115,7 @@ const oi = {
|
|
2115
2115
|
// Location specific methods
|
2116
2116
|
"nth-child"(e, t, { adapter: a, equals: i }) {
|
2117
2117
|
const s = ra(t);
|
2118
|
-
return s ===
|
2118
|
+
return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
|
2119
2119
|
const o = a.getSiblings(r);
|
2120
2120
|
let c = 0;
|
2121
2121
|
for (let h = 0; h < o.length && !i(r, o[h]); h++)
|
@@ -2125,7 +2125,7 @@ const oi = {
|
|
2125
2125
|
},
|
2126
2126
|
"nth-last-child"(e, t, { adapter: a, equals: i }) {
|
2127
2127
|
const s = ra(t);
|
2128
|
-
return s ===
|
2128
|
+
return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
|
2129
2129
|
const o = a.getSiblings(r);
|
2130
2130
|
let c = 0;
|
2131
2131
|
for (let h = o.length - 1; h >= 0 && !i(r, o[h]); h--)
|
@@ -2135,7 +2135,7 @@ const oi = {
|
|
2135
2135
|
},
|
2136
2136
|
"nth-of-type"(e, t, { adapter: a, equals: i }) {
|
2137
2137
|
const s = ra(t);
|
2138
|
-
return s ===
|
2138
|
+
return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
|
2139
2139
|
const o = a.getSiblings(r);
|
2140
2140
|
let c = 0;
|
2141
2141
|
for (let h = 0; h < o.length; h++) {
|
@@ -2149,7 +2149,7 @@ const oi = {
|
|
2149
2149
|
},
|
2150
2150
|
"nth-last-of-type"(e, t, { adapter: a, equals: i }) {
|
2151
2151
|
const s = ra(t);
|
2152
|
-
return s ===
|
2152
|
+
return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
|
2153
2153
|
const o = a.getSiblings(r);
|
2154
2154
|
let c = 0;
|
2155
2155
|
for (let h = o.length - 1; h >= 0; h--) {
|
@@ -2179,7 +2179,7 @@ const oi = {
|
|
2179
2179
|
function Xa(e) {
|
2180
2180
|
return function(a, i, { adapter: s }) {
|
2181
2181
|
const u = s[e];
|
2182
|
-
return typeof u != "function" ?
|
2182
|
+
return typeof u != "function" ? q.falseFunc : function(o) {
|
2183
2183
|
return u(o) && a(o);
|
2184
2184
|
};
|
2185
2185
|
};
|
@@ -2276,7 +2276,7 @@ const Do = {
|
|
2276
2276
|
text: "input:is(:not([type!='']), [type=text])"
|
2277
2277
|
}, On = {};
|
2278
2278
|
function Lo(e, t) {
|
2279
|
-
return e ===
|
2279
|
+
return e === q.falseFunc ? q.falseFunc : (a) => t.isTag(a) && e(a);
|
2280
2280
|
}
|
2281
2281
|
function Dn(e, t) {
|
2282
2282
|
const a = t.getSiblings(e);
|
@@ -2299,7 +2299,7 @@ function ci(e) {
|
|
2299
2299
|
}
|
2300
2300
|
const Ga = (e, t, a, i, s) => {
|
2301
2301
|
const u = s(t, ci(a), i);
|
2302
|
-
return u ===
|
2302
|
+
return u === q.trueFunc ? e : u === q.falseFunc ? q.falseFunc : (r) => u(r) && e(r);
|
2303
2303
|
}, Qa = {
|
2304
2304
|
is: Ga,
|
2305
2305
|
/**
|
@@ -2309,7 +2309,7 @@ const Ga = (e, t, a, i, s) => {
|
|
2309
2309
|
where: Ga,
|
2310
2310
|
not(e, t, a, i, s) {
|
2311
2311
|
const u = s(t, ci(a), i);
|
2312
|
-
return u ===
|
2312
|
+
return u === q.falseFunc ? e : u === q.trueFunc ? q.falseFunc : (r) => !u(r) && e(r);
|
2313
2313
|
},
|
2314
2314
|
has(e, t, a, i, s) {
|
2315
2315
|
const { adapter: u } = a, r = ci(a);
|
@@ -2318,10 +2318,10 @@ const Ga = (e, t, a, i, s) => {
|
|
2318
2318
|
// Used as a placeholder. Will be replaced with the actual element.
|
2319
2319
|
[On]
|
2320
2320
|
) : void 0, c = s(t, r, o);
|
2321
|
-
if (c ===
|
2322
|
-
return
|
2321
|
+
if (c === q.falseFunc)
|
2322
|
+
return q.falseFunc;
|
2323
2323
|
const h = Lo(c, u);
|
2324
|
-
if (o && c !==
|
2324
|
+
if (o && c !== q.trueFunc) {
|
2325
2325
|
const { shouldTestNextSiblings: f = !1 } = c;
|
2326
2326
|
return (m) => {
|
2327
2327
|
if (!e(m))
|
@@ -2363,7 +2363,7 @@ function ja(e, t) {
|
|
2363
2363
|
const a = t.getParent(e);
|
2364
2364
|
return a && t.isTag(a) ? a : null;
|
2365
2365
|
}
|
2366
|
-
function
|
2366
|
+
function yo(e, t, a, i, s) {
|
2367
2367
|
const { adapter: u, equals: r } = a;
|
2368
2368
|
switch (t.type) {
|
2369
2369
|
case v.PseudoElement:
|
@@ -2461,7 +2461,7 @@ function Ro(e, t, a, i, s) {
|
|
2461
2461
|
function Ln(e) {
|
2462
2462
|
return e.type === v.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(Ln)));
|
2463
2463
|
}
|
2464
|
-
const
|
2464
|
+
const Ro = { type: v.Descendant }, Mo = {
|
2465
2465
|
type: "_flexibleDescendant"
|
2466
2466
|
}, Po = {
|
2467
2467
|
type: v.Pseudo,
|
@@ -2475,7 +2475,7 @@ function ko(e, { adapter: t }, a) {
|
|
2475
2475
|
}));
|
2476
2476
|
for (const s of e) {
|
2477
2477
|
if (!(s.length > 0 && Bi(s[0]) && s[0].type !== v.Descendant)) if (i && !s.some(Ln))
|
2478
|
-
s.unshift(
|
2478
|
+
s.unshift(Ro);
|
2479
2479
|
else
|
2480
2480
|
continue;
|
2481
2481
|
s.unshift(Po);
|
@@ -2496,26 +2496,26 @@ function vn(e, t, a) {
|
|
2496
2496
|
h.type !== v.Pseudo || h.name !== "scope" || (s && f.type === v.Descendant ? c[1] = Mo : (f.type === v.Adjacent || f.type === v.Sibling) && (r = !0));
|
2497
2497
|
}
|
2498
2498
|
return wo(c, t, u);
|
2499
|
-
}).reduce(Bo,
|
2499
|
+
}).reduce(Bo, q.falseFunc);
|
2500
2500
|
return o.shouldTestNextSiblings = r, o;
|
2501
2501
|
}
|
2502
2502
|
function wo(e, t, a) {
|
2503
2503
|
var i;
|
2504
|
-
return e.reduce((s, u) => s ===
|
2504
|
+
return e.reduce((s, u) => s === q.falseFunc ? q.falseFunc : yo(s, u, t, a, vn), (i = t.rootFunc) !== null && i !== void 0 ? i : q.trueFunc);
|
2505
2505
|
}
|
2506
2506
|
function Bo(e, t) {
|
2507
|
-
return t ===
|
2507
|
+
return t === q.falseFunc || e === q.trueFunc ? e : e === q.falseFunc || t === q.trueFunc ? t : function(i) {
|
2508
2508
|
return e(i) || t(i);
|
2509
2509
|
};
|
2510
2510
|
}
|
2511
|
-
const
|
2511
|
+
const yn = (e, t) => e === t, Uo = {
|
2512
2512
|
adapter: Pa,
|
2513
|
-
equals:
|
2513
|
+
equals: yn
|
2514
2514
|
};
|
2515
2515
|
function Fo(e) {
|
2516
2516
|
var t, a, i, s;
|
2517
2517
|
const u = e ?? Uo;
|
2518
|
-
return (t = u.adapter) !== null && t !== void 0 || (u.adapter = Pa), (a = u.equals) !== null && a !== void 0 || (u.equals = (s = (i = u.adapter) === null || i === void 0 ? void 0 : i.equals) !== null && s !== void 0 ? s :
|
2518
|
+
return (t = u.adapter) !== null && t !== void 0 || (u.adapter = Pa), (a = u.equals) !== null && a !== void 0 || (u.equals = (s = (i = u.adapter) === null || i === void 0 ? void 0 : i.equals) !== null && s !== void 0 ? s : yn), u;
|
2519
2519
|
}
|
2520
2520
|
function Ho(e) {
|
2521
2521
|
return function(a, i, s) {
|
@@ -2524,7 +2524,7 @@ function Ho(e) {
|
|
2524
2524
|
};
|
2525
2525
|
}
|
2526
2526
|
const Ui = Ho(vn);
|
2527
|
-
function
|
2527
|
+
function Rn(e, t, a = !1) {
|
2528
2528
|
return a && (e = Yo(e, t)), Array.isArray(e) ? t.removeSubsets(e) : t.getChildren(e);
|
2529
2529
|
}
|
2530
2530
|
function Yo(e, t) {
|
@@ -2636,7 +2636,7 @@ function wn(e, t, a) {
|
|
2636
2636
|
}
|
2637
2637
|
for (let r = 0; r < s.length && (u == null ? void 0 : u.size) !== t.length; r++) {
|
2638
2638
|
const o = s[r];
|
2639
|
-
if ((u ? t.filter((f) =>
|
2639
|
+
if ((u ? t.filter((f) => w(f) && !u.has(f)) : t).length === 0)
|
2640
2640
|
break;
|
2641
2641
|
const h = Bn(o, t, a);
|
2642
2642
|
if (h.length)
|
@@ -2671,7 +2671,7 @@ function Ia(e, t, a, i, s) {
|
|
2671
2671
|
const u = t.findIndex(Na), r = t.slice(0, u), o = t[u], c = t.length - 1 === u ? s : 1 / 0, h = Vo(o.name, o.data, c);
|
2672
2672
|
if (h === 0)
|
2673
2673
|
return [];
|
2674
|
-
const m = (r.length === 0 && !Array.isArray(e) ?
|
2674
|
+
const m = (r.length === 0 && !Array.isArray(e) ? Ra(e).filter(w) : r.length === 0 ? (Array.isArray(e) ? e : [e]).filter(w) : i || r.some(qt) ? li(e, [r], a, h) : hi(e, [r], a)).slice(0, h);
|
2675
2675
|
let T = Go(o.name, m, o.data, a);
|
2676
2676
|
if (T.length === 0 || t.length === u + 1)
|
2677
2677
|
return T;
|
@@ -2679,7 +2679,7 @@ function Ia(e, t, a, i, s) {
|
|
2679
2679
|
if (I) {
|
2680
2680
|
if (qt(A[0])) {
|
2681
2681
|
const { type: L } = A[0];
|
2682
|
-
(L === v.Sibling || L === v.Adjacent) && (T =
|
2682
|
+
(L === v.Sibling || L === v.Adjacent) && (T = Rn(T, Pa, !0)), A.unshift($o);
|
2683
2683
|
}
|
2684
2684
|
a = {
|
2685
2685
|
...a,
|
@@ -2705,11 +2705,11 @@ function li(e, t, a, i) {
|
|
2705
2705
|
return Un(e, s, i);
|
2706
2706
|
}
|
2707
2707
|
function Un(e, t, a = 1 / 0) {
|
2708
|
-
const i =
|
2709
|
-
return Pi((s) =>
|
2708
|
+
const i = Rn(e, Pa, t.shouldTestNextSiblings);
|
2709
|
+
return Pi((s) => w(s) && t(s), i, !0, a);
|
2710
2710
|
}
|
2711
2711
|
function hi(e, t, a) {
|
2712
|
-
const i = (Array.isArray(e) ? e : [e]).filter(
|
2712
|
+
const i = (Array.isArray(e) ? e : [e]).filter(w);
|
2713
2713
|
if (i.length === 0)
|
2714
2714
|
return i;
|
2715
2715
|
const s = Ui(t, a);
|
@@ -2781,10 +2781,10 @@ function qi(e, ...t) {
|
|
2781
2781
|
return a = null, r;
|
2782
2782
|
};
|
2783
2783
|
}
|
2784
|
-
function
|
2784
|
+
function yt(e) {
|
2785
2785
|
return e.length > 1 ? Array.from(new Set(e)) : e;
|
2786
2786
|
}
|
2787
|
-
const Zo = Yi(({ parent: e }) => e && !at(e) ? e : null,
|
2787
|
+
const Zo = Yi(({ parent: e }) => e && !at(e) ? e : null, yt), Jo = ia((e) => {
|
2788
2788
|
const t = [];
|
2789
2789
|
for (; e.parent && !at(e.parent); )
|
2790
2790
|
t.push(e.parent), e = e.parent;
|
@@ -2800,7 +2800,7 @@ function tc(e) {
|
|
2800
2800
|
root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
|
2801
2801
|
}, s = typeof e == "string" ? (u) => Mn(u, e, i) : sa(e);
|
2802
2802
|
return re(this, (u) => {
|
2803
|
-
for (u && !at(u) && !
|
2803
|
+
for (u && !at(u) && !w(u) && (u = u.parent); u && w(u); ) {
|
2804
2804
|
if (s(u, 0)) {
|
2805
2805
|
a.includes(u) || a.push(u);
|
2806
2806
|
break;
|
@@ -2809,17 +2809,17 @@ function tc(e) {
|
|
2809
2809
|
}
|
2810
2810
|
}), this._make(a);
|
2811
2811
|
}
|
2812
|
-
const ac = Yi((e) =>
|
2812
|
+
const ac = Yi((e) => Ri(e)), ic = ia((e) => {
|
2813
2813
|
const t = [];
|
2814
2814
|
for (; e.next; )
|
2815
|
-
e = e.next,
|
2815
|
+
e = e.next, w(e) && t.push(e);
|
2816
2816
|
return t;
|
2817
|
-
},
|
2817
|
+
}, yt), sc = qi((e) => Ri(e), yt), nc = Yi((e) => Mi(e)), uc = ia((e) => {
|
2818
2818
|
const t = [];
|
2819
2819
|
for (; e.prev; )
|
2820
|
-
e = e.prev,
|
2820
|
+
e = e.prev, w(e) && t.push(e);
|
2821
2821
|
return t;
|
2822
|
-
},
|
2822
|
+
}, yt), rc = qi((e) => Mi(e), yt), oc = ia((e) => hn(e).filter((t) => w(t) && t !== e), vt), cc = ia((e) => Ra(e).filter(w), yt);
|
2823
2823
|
function lc() {
|
2824
2824
|
const e = this.toArray().reduce((t, a) => Te(a) ? t.concat(a.children) : t, []);
|
2825
2825
|
return this._make(e);
|
@@ -2853,7 +2853,7 @@ function Vi(e, t, a, i) {
|
|
2853
2853
|
}
|
2854
2854
|
function Ec(e) {
|
2855
2855
|
const t = this.toArray();
|
2856
|
-
return typeof e == "string" ? Pn(t.filter(
|
2856
|
+
return typeof e == "string" ? Pn(t.filter(w), e, this.options) : e ? t.some(sa(e)) : !1;
|
2857
2857
|
}
|
2858
2858
|
function mc(e) {
|
2859
2859
|
let t = this.toArray();
|
@@ -3017,10 +3017,10 @@ function it(e, t, a, i, s) {
|
|
3017
3017
|
function vc(e) {
|
3018
3018
|
return (Xe(e) ? e : this._make(e)).append(this), this;
|
3019
3019
|
}
|
3020
|
-
function
|
3020
|
+
function yc(e) {
|
3021
3021
|
return (Xe(e) ? e : this._make(e)).prepend(this), this;
|
3022
3022
|
}
|
3023
|
-
const
|
3023
|
+
const Rc = Fn((e, t, a) => {
|
3024
3024
|
it(t, t.length, 0, e, a);
|
3025
3025
|
}), Mc = Fn((e, t, a) => {
|
3026
3026
|
it(t, 0, 0, e, a);
|
@@ -3035,7 +3035,7 @@ function Hn(e) {
|
|
3035
3035
|
let c = o, h = 0;
|
3036
3036
|
for (; h < c.children.length; ) {
|
3037
3037
|
const f = c.children[h];
|
3038
|
-
|
3038
|
+
w(f) ? (c = f, h = 0) : h++;
|
3039
3039
|
}
|
3040
3040
|
e(u, c, [o]);
|
3041
3041
|
}
|
@@ -3183,7 +3183,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3183
3183
|
__proto__: null,
|
3184
3184
|
_makeDomArray: Lc,
|
3185
3185
|
after: Uc,
|
3186
|
-
append:
|
3186
|
+
append: Rc,
|
3187
3187
|
appendTo: vc,
|
3188
3188
|
before: Hc,
|
3189
3189
|
clone: Qc,
|
@@ -3192,7 +3192,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3192
3192
|
insertAfter: Fc,
|
3193
3193
|
insertBefore: Yc,
|
3194
3194
|
prepend: Mc,
|
3195
|
-
prependTo:
|
3195
|
+
prependTo: yc,
|
3196
3196
|
remove: qc,
|
3197
3197
|
replaceWith: Vc,
|
3198
3198
|
text: Gc,
|
@@ -3206,7 +3206,7 @@ function zc(e, t) {
|
|
3206
3206
|
if (e != null && t != null || // When `prop` is a "plain" object
|
3207
3207
|
typeof e == "object" && !Array.isArray(e))
|
3208
3208
|
return re(this, (a, i) => {
|
3209
|
-
|
3209
|
+
w(a) && Yn(a, e, t, i);
|
3210
3210
|
});
|
3211
3211
|
if (this.length !== 0)
|
3212
3212
|
return qn(this[0], e);
|
@@ -3224,7 +3224,7 @@ function Yn(e, t, a, i) {
|
|
3224
3224
|
}
|
3225
3225
|
}
|
3226
3226
|
function qn(e, t) {
|
3227
|
-
if (!e || !
|
3227
|
+
if (!e || !w(e))
|
3228
3228
|
return;
|
3229
3229
|
const a = Zc(e.attribs.style);
|
3230
3230
|
if (typeof t == "string")
|
@@ -3265,7 +3265,7 @@ function tl() {
|
|
3265
3265
|
function al() {
|
3266
3266
|
return this.map((e, t) => {
|
3267
3267
|
const a = this._make(t);
|
3268
|
-
return
|
3268
|
+
return w(t) && t.name === "form" ? a.find(Es).toArray() : a.filter(Es).toArray();
|
3269
3269
|
}).filter(
|
3270
3270
|
// Verify elements have a name (`attr.name`) and are not disabled (`:enabled`)
|
3271
3271
|
'[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))'
|
@@ -3354,10 +3354,10 @@ function rl(e, t) {
|
|
3354
3354
|
function h(f, m, T = o, A) {
|
3355
3355
|
if (f && Xe(f))
|
3356
3356
|
return f;
|
3357
|
-
const I = ni(A, r), L = typeof T == "string" ? [e(T, I, !1, null)] : "length" in T ? T : [T],
|
3358
|
-
if (
|
3359
|
-
return new c(void 0,
|
3360
|
-
const
|
3357
|
+
const I = ni(A, r), L = typeof T == "string" ? [e(T, I, !1, null)] : "length" in T ? T : [T], P = Xe(L) ? L : new c(L, null, I);
|
3358
|
+
if (P._root = P, !f)
|
3359
|
+
return new c(void 0, P, I);
|
3360
|
+
const G = typeof f == "string" && ui(f) ? (
|
3361
3361
|
// $(<html>)
|
3362
3362
|
e(f, I, !1, null).children
|
3363
3363
|
) : ol(f) ? (
|
@@ -3366,29 +3366,29 @@ function rl(e, t) {
|
|
3366
3366
|
) : Array.isArray(f) ? (
|
3367
3367
|
// $([dom])
|
3368
3368
|
f
|
3369
|
-
) : void 0,
|
3370
|
-
if (
|
3371
|
-
return
|
3369
|
+
) : void 0, F = new c(G, P, I);
|
3370
|
+
if (G)
|
3371
|
+
return F;
|
3372
3372
|
if (typeof f != "string")
|
3373
3373
|
throw new TypeError("Unexpected type of selector");
|
3374
|
-
let
|
3375
|
-
const
|
3374
|
+
let X = f;
|
3375
|
+
const H = m ? (
|
3376
3376
|
// If we don't have a context, maybe we have a root, from loading
|
3377
3377
|
typeof m == "string" ? ui(m) ? (
|
3378
3378
|
// $('li', '<ul>...</ul>')
|
3379
|
-
new c([e(m, I, !1, null)],
|
3379
|
+
new c([e(m, I, !1, null)], P, I)
|
3380
3380
|
) : (
|
3381
3381
|
// $('li', 'ul')
|
3382
|
-
(
|
3382
|
+
(X = `${m} ${X}`, P)
|
3383
3383
|
) : Xe(m) ? (
|
3384
3384
|
// $('li', $)
|
3385
3385
|
m
|
3386
3386
|
) : (
|
3387
3387
|
// $('li', node), $('li', [nodes])
|
3388
|
-
new c(Array.isArray(m) ? m : [m],
|
3388
|
+
new c(Array.isArray(m) ? m : [m], P, I)
|
3389
3389
|
)
|
3390
|
-
) :
|
3391
|
-
return
|
3390
|
+
) : P;
|
3391
|
+
return H ? H.find(X) : F;
|
3392
3392
|
}
|
3393
3393
|
return Object.assign(h, Jr, {
|
3394
3394
|
load: a,
|
@@ -3440,7 +3440,7 @@ const cl = /* @__PURE__ */ new Set([
|
|
3440
3440
|
1048575,
|
3441
3441
|
1114110,
|
3442
3442
|
1114111
|
3443
|
-
]),
|
3443
|
+
]), te = "�";
|
3444
3444
|
var l;
|
3445
3445
|
(function(e) {
|
3446
3446
|
e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z";
|
@@ -3555,10 +3555,10 @@ class fl {
|
|
3555
3555
|
this.isEol = !1;
|
3556
3556
|
}
|
3557
3557
|
}
|
3558
|
-
var
|
3558
|
+
var j;
|
3559
3559
|
(function(e) {
|
3560
3560
|
e[e.CHARACTER = 0] = "CHARACTER", e[e.NULL_CHARACTER = 1] = "NULL_CHARACTER", e[e.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", e[e.START_TAG = 3] = "START_TAG", e[e.END_TAG = 4] = "END_TAG", e[e.COMMENT = 5] = "COMMENT", e[e.DOCTYPE = 6] = "DOCTYPE", e[e.EOF = 7] = "EOF", e[e.HIBERNATION = 8] = "HIBERNATION";
|
3561
|
-
})(
|
3561
|
+
})(j || (j = {}));
|
3562
3562
|
function Xn(e, t) {
|
3563
3563
|
for (let a = e.attrs.length - 1; a >= 0; a--)
|
3564
3564
|
if (e.attrs[a].name === t)
|
@@ -3856,7 +3856,7 @@ function _l(e) {
|
|
3856
3856
|
}
|
3857
3857
|
let Al = class {
|
3858
3858
|
constructor(t, a) {
|
3859
|
-
this.options = t, this.handler = a, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = d.DATA, this.returnState = d.DATA, this.entityStartPos = 0, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = { name: "", value: "" }, this.preprocessor = new fl(a), this.currentLocation = this.getCurrentLocation(-1), this.entityDecoder = new
|
3859
|
+
this.options = t, this.handler = a, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = d.DATA, this.returnState = d.DATA, this.entityStartPos = 0, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = { name: "", value: "" }, this.preprocessor = new fl(a), this.currentLocation = this.getCurrentLocation(-1), this.entityDecoder = new yi(vi, (i, s) => {
|
3860
3860
|
this.preprocessor.pos = this.entityStartPos + s - 1, this._flushCodePointConsumedAsCharacterReference(i);
|
3861
3861
|
}, a.onParseError ? {
|
3862
3862
|
missingSemicolonAfterCharacterReference: () => {
|
@@ -3931,7 +3931,7 @@ let Al = class {
|
|
3931
3931
|
//Token creation
|
3932
3932
|
_createStartTagToken() {
|
3933
3933
|
this.currentToken = {
|
3934
|
-
type:
|
3934
|
+
type: j.START_TAG,
|
3935
3935
|
tagName: "",
|
3936
3936
|
tagID: n.UNKNOWN,
|
3937
3937
|
selfClosing: !1,
|
@@ -3942,7 +3942,7 @@ let Al = class {
|
|
3942
3942
|
}
|
3943
3943
|
_createEndTagToken() {
|
3944
3944
|
this.currentToken = {
|
3945
|
-
type:
|
3945
|
+
type: j.END_TAG,
|
3946
3946
|
tagName: "",
|
3947
3947
|
tagID: n.UNKNOWN,
|
3948
3948
|
selfClosing: !1,
|
@@ -3953,14 +3953,14 @@ let Al = class {
|
|
3953
3953
|
}
|
3954
3954
|
_createCommentToken(t) {
|
3955
3955
|
this.currentToken = {
|
3956
|
-
type:
|
3956
|
+
type: j.COMMENT,
|
3957
3957
|
data: "",
|
3958
3958
|
location: this.getCurrentLocation(t)
|
3959
3959
|
};
|
3960
3960
|
}
|
3961
3961
|
_createDoctypeToken(t) {
|
3962
3962
|
this.currentToken = {
|
3963
|
-
type:
|
3963
|
+
type: j.DOCTYPE,
|
3964
3964
|
name: t,
|
3965
3965
|
forceQuirks: !1,
|
3966
3966
|
publicId: null,
|
@@ -4002,7 +4002,7 @@ let Al = class {
|
|
4002
4002
|
}
|
4003
4003
|
emitCurrentTagToken() {
|
4004
4004
|
const t = this.currentToken;
|
4005
|
-
this.prepareToken(t), t.tagID = wa(t.tagName), t.type ===
|
4005
|
+
this.prepareToken(t), t.tagID = wa(t.tagName), t.type === j.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(b.endTagWithAttributes), t.selfClosing && this._err(b.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
|
4006
4006
|
}
|
4007
4007
|
emitCurrentComment(t) {
|
4008
4008
|
this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
|
@@ -4013,15 +4013,15 @@ let Al = class {
|
|
4013
4013
|
_emitCurrentCharacterToken(t) {
|
4014
4014
|
if (this.currentCharacterToken) {
|
4015
4015
|
switch (t && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = t.startLine, this.currentCharacterToken.location.endCol = t.startCol, this.currentCharacterToken.location.endOffset = t.startOffset), this.currentCharacterToken.type) {
|
4016
|
-
case
|
4016
|
+
case j.CHARACTER: {
|
4017
4017
|
this.handler.onCharacter(this.currentCharacterToken);
|
4018
4018
|
break;
|
4019
4019
|
}
|
4020
|
-
case
|
4020
|
+
case j.NULL_CHARACTER: {
|
4021
4021
|
this.handler.onNullCharacter(this.currentCharacterToken);
|
4022
4022
|
break;
|
4023
4023
|
}
|
4024
|
-
case
|
4024
|
+
case j.WHITESPACE_CHARACTER: {
|
4025
4025
|
this.handler.onWhitespaceCharacter(this.currentCharacterToken);
|
4026
4026
|
break;
|
4027
4027
|
}
|
@@ -4031,7 +4031,7 @@ let Al = class {
|
|
4031
4031
|
}
|
4032
4032
|
_emitEOFToken() {
|
4033
4033
|
const t = this.getCurrentLocation(0);
|
4034
|
-
t && (t.endLine = t.startLine, t.endCol = t.startCol, t.endOffset = t.startOffset), this._emitCurrentCharacterToken(t), this.handler.onEof({ type:
|
4034
|
+
t && (t.endLine = t.startLine, t.endCol = t.startCol, t.endOffset = t.startOffset), this._emitCurrentCharacterToken(t), this.handler.onEof({ type: j.EOF, location: t }), 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 Al = class {
|
|
4052
4052
|
this._createCharacterToken(t, a);
|
4053
4053
|
}
|
4054
4054
|
_emitCodePoint(t) {
|
4055
|
-
const a = Gn(t) ?
|
4055
|
+
const a = Gn(t) ? j.WHITESPACE_CHARACTER : t === l.NULL ? j.NULL_CHARACTER : j.CHARACTER;
|
4056
4056
|
this._appendCharToCurrentCharacterToken(a, String.fromCodePoint(t));
|
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(t) {
|
4061
|
-
this._appendCharToCurrentCharacterToken(
|
4061
|
+
this._appendCharToCurrentCharacterToken(j.CHARACTER, t);
|
4062
4062
|
}
|
4063
4063
|
// Character reference helpers
|
4064
4064
|
_startCharacterReference() {
|
@@ -4407,7 +4407,7 @@ let Al = class {
|
|
4407
4407
|
break;
|
4408
4408
|
}
|
4409
4409
|
case l.NULL: {
|
4410
|
-
this._err(b.unexpectedNullCharacter), this._emitChars(
|
4410
|
+
this._err(b.unexpectedNullCharacter), this._emitChars(te);
|
4411
4411
|
break;
|
4412
4412
|
}
|
4413
4413
|
case l.EOF: {
|
@@ -4427,7 +4427,7 @@ let Al = class {
|
|
4427
4427
|
break;
|
4428
4428
|
}
|
4429
4429
|
case l.NULL: {
|
4430
|
-
this._err(b.unexpectedNullCharacter), this._emitChars(
|
4430
|
+
this._err(b.unexpectedNullCharacter), this._emitChars(te);
|
4431
4431
|
break;
|
4432
4432
|
}
|
4433
4433
|
case l.EOF: {
|
@@ -4447,7 +4447,7 @@ let Al = class {
|
|
4447
4447
|
break;
|
4448
4448
|
}
|
4449
4449
|
case l.NULL: {
|
4450
|
-
this._err(b.unexpectedNullCharacter), this._emitChars(
|
4450
|
+
this._err(b.unexpectedNullCharacter), this._emitChars(te);
|
4451
4451
|
break;
|
4452
4452
|
}
|
4453
4453
|
case l.EOF: {
|
@@ -4463,7 +4463,7 @@ let Al = class {
|
|
4463
4463
|
_statePlaintext(t) {
|
4464
4464
|
switch (t) {
|
4465
4465
|
case l.NULL: {
|
4466
|
-
this._err(b.unexpectedNullCharacter), this._emitChars(
|
4466
|
+
this._err(b.unexpectedNullCharacter), this._emitChars(te);
|
4467
4467
|
break;
|
4468
4468
|
}
|
4469
4469
|
case l.EOF: {
|
@@ -4541,7 +4541,7 @@ let Al = class {
|
|
4541
4541
|
break;
|
4542
4542
|
}
|
4543
4543
|
case l.NULL: {
|
4544
|
-
this._err(b.unexpectedNullCharacter), a.tagName +=
|
4544
|
+
this._err(b.unexpectedNullCharacter), a.tagName += te;
|
4545
4545
|
break;
|
4546
4546
|
}
|
4547
4547
|
case l.EOF: {
|
@@ -4650,7 +4650,7 @@ let Al = class {
|
|
4650
4650
|
break;
|
4651
4651
|
}
|
4652
4652
|
case l.NULL: {
|
4653
|
-
this._err(b.unexpectedNullCharacter), this._emitChars(
|
4653
|
+
this._err(b.unexpectedNullCharacter), this._emitChars(te);
|
4654
4654
|
break;
|
4655
4655
|
}
|
4656
4656
|
case l.EOF: {
|
@@ -4674,7 +4674,7 @@ let Al = class {
|
|
4674
4674
|
break;
|
4675
4675
|
}
|
4676
4676
|
case l.NULL: {
|
4677
|
-
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(
|
4677
|
+
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(te);
|
4678
4678
|
break;
|
4679
4679
|
}
|
4680
4680
|
case l.EOF: {
|
@@ -4702,7 +4702,7 @@ let Al = class {
|
|
4702
4702
|
break;
|
4703
4703
|
}
|
4704
4704
|
case l.NULL: {
|
4705
|
-
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(
|
4705
|
+
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(te);
|
4706
4706
|
break;
|
4707
4707
|
}
|
4708
4708
|
case l.EOF: {
|
@@ -4751,7 +4751,7 @@ let Al = class {
|
|
4751
4751
|
break;
|
4752
4752
|
}
|
4753
4753
|
case l.NULL: {
|
4754
|
-
this._err(b.unexpectedNullCharacter), this._emitChars(
|
4754
|
+
this._err(b.unexpectedNullCharacter), this._emitChars(te);
|
4755
4755
|
break;
|
4756
4756
|
}
|
4757
4757
|
case l.EOF: {
|
@@ -4775,7 +4775,7 @@ let Al = class {
|
|
4775
4775
|
break;
|
4776
4776
|
}
|
4777
4777
|
case l.NULL: {
|
4778
|
-
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(
|
4778
|
+
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(te);
|
4779
4779
|
break;
|
4780
4780
|
}
|
4781
4781
|
case l.EOF: {
|
@@ -4803,7 +4803,7 @@ let Al = class {
|
|
4803
4803
|
break;
|
4804
4804
|
}
|
4805
4805
|
case l.NULL: {
|
4806
|
-
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(
|
4806
|
+
this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(te);
|
4807
4807
|
break;
|
4808
4808
|
}
|
4809
4809
|
case l.EOF: {
|
@@ -4877,7 +4877,7 @@ let Al = class {
|
|
4877
4877
|
break;
|
4878
4878
|
}
|
4879
4879
|
case l.NULL: {
|
4880
|
-
this._err(b.unexpectedNullCharacter), this.currentAttr.name +=
|
4880
|
+
this._err(b.unexpectedNullCharacter), this.currentAttr.name += te;
|
4881
4881
|
break;
|
4882
4882
|
}
|
4883
4883
|
default:
|
@@ -4951,7 +4951,7 @@ let Al = class {
|
|
4951
4951
|
break;
|
4952
4952
|
}
|
4953
4953
|
case l.NULL: {
|
4954
|
-
this._err(b.unexpectedNullCharacter), this.currentAttr.value +=
|
4954
|
+
this._err(b.unexpectedNullCharacter), this.currentAttr.value += te;
|
4955
4955
|
break;
|
4956
4956
|
}
|
4957
4957
|
case l.EOF: {
|
@@ -4975,7 +4975,7 @@ let Al = class {
|
|
4975
4975
|
break;
|
4976
4976
|
}
|
4977
4977
|
case l.NULL: {
|
4978
|
-
this._err(b.unexpectedNullCharacter), this.currentAttr.value +=
|
4978
|
+
this._err(b.unexpectedNullCharacter), this.currentAttr.value += te;
|
4979
4979
|
break;
|
4980
4980
|
}
|
4981
4981
|
case l.EOF: {
|
@@ -5006,7 +5006,7 @@ let Al = class {
|
|
5006
5006
|
break;
|
5007
5007
|
}
|
5008
5008
|
case l.NULL: {
|
5009
|
-
this._err(b.unexpectedNullCharacter), this.currentAttr.value +=
|
5009
|
+
this._err(b.unexpectedNullCharacter), this.currentAttr.value += te;
|
5010
5010
|
break;
|
5011
5011
|
}
|
5012
5012
|
case l.QUOTATION_MARK:
|
@@ -5083,7 +5083,7 @@ let Al = class {
|
|
5083
5083
|
break;
|
5084
5084
|
}
|
5085
5085
|
case l.NULL: {
|
5086
|
-
this._err(b.unexpectedNullCharacter), a.data +=
|
5086
|
+
this._err(b.unexpectedNullCharacter), a.data += te;
|
5087
5087
|
break;
|
5088
5088
|
}
|
5089
5089
|
default:
|
@@ -5148,7 +5148,7 @@ let Al = class {
|
|
5148
5148
|
break;
|
5149
5149
|
}
|
5150
5150
|
case l.NULL: {
|
5151
|
-
this._err(b.unexpectedNullCharacter), a.data +=
|
5151
|
+
this._err(b.unexpectedNullCharacter), a.data += te;
|
5152
5152
|
break;
|
5153
5153
|
}
|
5154
5154
|
case l.EOF: {
|
@@ -5292,7 +5292,7 @@ let Al = class {
|
|
5292
5292
|
case l.FORM_FEED:
|
5293
5293
|
break;
|
5294
5294
|
case l.NULL: {
|
5295
|
-
this._err(b.unexpectedNullCharacter), this._createDoctypeToken(
|
5295
|
+
this._err(b.unexpectedNullCharacter), this._createDoctypeToken(te), this.state = d.DOCTYPE_NAME;
|
5296
5296
|
break;
|
5297
5297
|
}
|
5298
5298
|
case l.GREATER_THAN_SIGN: {
|
@@ -5328,7 +5328,7 @@ let Al = class {
|
|
5328
5328
|
break;
|
5329
5329
|
}
|
5330
5330
|
case l.NULL: {
|
5331
|
-
this._err(b.unexpectedNullCharacter), a.name +=
|
5331
|
+
this._err(b.unexpectedNullCharacter), a.name += te;
|
5332
5332
|
break;
|
5333
5333
|
}
|
5334
5334
|
case l.EOF: {
|
@@ -5433,7 +5433,7 @@ let Al = class {
|
|
5433
5433
|
break;
|
5434
5434
|
}
|
5435
5435
|
case l.NULL: {
|
5436
|
-
this._err(b.unexpectedNullCharacter), a.publicId +=
|
5436
|
+
this._err(b.unexpectedNullCharacter), a.publicId += te;
|
5437
5437
|
break;
|
5438
5438
|
}
|
5439
5439
|
case l.GREATER_THAN_SIGN: {
|
@@ -5458,7 +5458,7 @@ let Al = class {
|
|
5458
5458
|
break;
|
5459
5459
|
}
|
5460
5460
|
case l.NULL: {
|
5461
|
-
this._err(b.unexpectedNullCharacter), a.publicId +=
|
5461
|
+
this._err(b.unexpectedNullCharacter), a.publicId += te;
|
5462
5462
|
break;
|
5463
5463
|
}
|
5464
5464
|
case l.GREATER_THAN_SIGN: {
|
@@ -5607,7 +5607,7 @@ let Al = class {
|
|
5607
5607
|
break;
|
5608
5608
|
}
|
5609
5609
|
case l.NULL: {
|
5610
|
-
this._err(b.unexpectedNullCharacter), a.systemId +=
|
5610
|
+
this._err(b.unexpectedNullCharacter), a.systemId += te;
|
5611
5611
|
break;
|
5612
5612
|
}
|
5613
5613
|
case l.GREATER_THAN_SIGN: {
|
@@ -5632,7 +5632,7 @@ let Al = class {
|
|
5632
5632
|
break;
|
5633
5633
|
}
|
5634
5634
|
case l.NULL: {
|
5635
|
-
this._err(b.unexpectedNullCharacter), a.systemId +=
|
5635
|
+
this._err(b.unexpectedNullCharacter), a.systemId += te;
|
5636
5636
|
break;
|
5637
5637
|
}
|
5638
5638
|
case l.GREATER_THAN_SIGN: {
|
@@ -6218,7 +6218,7 @@ const $e = {
|
|
6218
6218
|
updateNodeSourceCodeLocation(e, t) {
|
6219
6219
|
e.sourceCodeLocation = { ...e.sourceCodeLocation, ...t };
|
6220
6220
|
}
|
6221
|
-
}, jn = "html", vl = "about:legacy-compat",
|
6221
|
+
}, jn = "html", vl = "about:legacy-compat", yl = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd", zn = [
|
6222
6222
|
"+//silmaril//dtd html pro v0r11 19970101//",
|
6223
6223
|
"-//as//dtd html 3.0 aswedit + extensions//",
|
6224
6224
|
"-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
|
@@ -6274,7 +6274,7 @@ const $e = {
|
|
6274
6274
|
"-//w3o//dtd w3 html 3.0//",
|
6275
6275
|
"-//webtechs//dtd mozilla html 2.0//",
|
6276
6276
|
"-//webtechs//dtd mozilla html//"
|
6277
|
-
],
|
6277
|
+
], Rl = [
|
6278
6278
|
...zn,
|
6279
6279
|
"-//w3c//dtd html 4.01 frameset//",
|
6280
6280
|
"-//w3c//dtd html 4.01 transitional//"
|
@@ -6297,13 +6297,13 @@ function wl(e) {
|
|
6297
6297
|
if (e.name !== jn)
|
6298
6298
|
return Le.QUIRKS;
|
6299
6299
|
const { systemId: t } = e;
|
6300
|
-
if (t && t.toLowerCase() ===
|
6300
|
+
if (t && t.toLowerCase() === yl)
|
6301
6301
|
return Le.QUIRKS;
|
6302
6302
|
let { publicId: a } = e;
|
6303
6303
|
if (a !== null) {
|
6304
6304
|
if (a = a.toLowerCase(), Ml.has(a))
|
6305
6305
|
return Le.QUIRKS;
|
6306
|
-
let i = t === null ?
|
6306
|
+
let i = t === null ? Rl : zn;
|
6307
6307
|
if (Ns(a, i))
|
6308
6308
|
return Le.QUIRKS;
|
6309
6309
|
if (i = t === null ? Kn : Pl, Ns(a, i))
|
@@ -6720,7 +6720,7 @@ let tu = class {
|
|
6720
6720
|
const i = a.location, s = this.treeAdapter.getTagName(t), u = (
|
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
|
-
a.type ===
|
6723
|
+
a.type === j.END_TAG && s === a.tagName ? {
|
6724
6724
|
endTag: { ...i },
|
6725
6725
|
endLine: i.endLine,
|
6726
6726
|
endCol: i.endCol,
|
@@ -6749,35 +6749,35 @@ let tu = class {
|
|
6749
6749
|
/** @protected */
|
6750
6750
|
_processToken(t) {
|
6751
6751
|
switch (t.type) {
|
6752
|
-
case
|
6752
|
+
case j.CHARACTER: {
|
6753
6753
|
this.onCharacter(t);
|
6754
6754
|
break;
|
6755
6755
|
}
|
6756
|
-
case
|
6756
|
+
case j.NULL_CHARACTER: {
|
6757
6757
|
this.onNullCharacter(t);
|
6758
6758
|
break;
|
6759
6759
|
}
|
6760
|
-
case
|
6760
|
+
case j.COMMENT: {
|
6761
6761
|
this.onComment(t);
|
6762
6762
|
break;
|
6763
6763
|
}
|
6764
|
-
case
|
6764
|
+
case j.DOCTYPE: {
|
6765
6765
|
this.onDoctype(t);
|
6766
6766
|
break;
|
6767
6767
|
}
|
6768
|
-
case
|
6768
|
+
case j.START_TAG: {
|
6769
6769
|
this._processStartTag(t);
|
6770
6770
|
break;
|
6771
6771
|
}
|
6772
|
-
case
|
6772
|
+
case j.END_TAG: {
|
6773
6773
|
this.onEndTag(t);
|
6774
6774
|
break;
|
6775
6775
|
}
|
6776
|
-
case
|
6776
|
+
case j.EOF: {
|
6777
6777
|
this.onEof(t);
|
6778
6778
|
break;
|
6779
6779
|
}
|
6780
|
-
case
|
6780
|
+
case j.WHITESPACE_CHARACTER: {
|
6781
6781
|
this.onWhitespaceCharacter(t);
|
6782
6782
|
break;
|
6783
6783
|
}
|
@@ -7652,7 +7652,7 @@ function f0(e, t) {
|
|
7652
7652
|
}
|
7653
7653
|
}
|
7654
7654
|
function Xt(e, t) {
|
7655
|
-
const a = t.type ===
|
7655
|
+
const a = t.type === j.EOF ? b.openElementsLeftAfterEof : b.disallowedContentInNoscriptInHead;
|
7656
7656
|
e._err(t, a), e.openElements.pop(), e.insertionMode = E.IN_HEAD, e._processToken(t);
|
7657
7657
|
}
|
7658
7658
|
function E0(e, t) {
|
@@ -7711,27 +7711,27 @@ function Gt(e, t) {
|
|
7711
7711
|
}
|
7712
7712
|
function Ba(e, t) {
|
7713
7713
|
switch (t.type) {
|
7714
|
-
case
|
7714
|
+
case j.CHARACTER: {
|
7715
7715
|
iu(e, t);
|
7716
7716
|
break;
|
7717
7717
|
}
|
7718
|
-
case
|
7718
|
+
case j.WHITESPACE_CHARACTER: {
|
7719
7719
|
au(e, t);
|
7720
7720
|
break;
|
7721
7721
|
}
|
7722
|
-
case
|
7722
|
+
case j.COMMENT: {
|
7723
7723
|
fi(e, t);
|
7724
7724
|
break;
|
7725
7725
|
}
|
7726
|
-
case
|
7726
|
+
case j.START_TAG: {
|
7727
7727
|
_e(e, t);
|
7728
7728
|
break;
|
7729
7729
|
}
|
7730
|
-
case
|
7730
|
+
case j.END_TAG: {
|
7731
7731
|
Ua(e, t);
|
7732
7732
|
break;
|
7733
7733
|
}
|
7734
|
-
case
|
7734
|
+
case j.EOF: {
|
7735
7735
|
ru(e, t);
|
7736
7736
|
break;
|
7737
7737
|
}
|
@@ -7810,10 +7810,10 @@ function nu(e) {
|
|
7810
7810
|
const t = Xn(e, ht.TYPE);
|
7811
7811
|
return t != null && t.toLowerCase() === Ql;
|
7812
7812
|
}
|
7813
|
-
function
|
7813
|
+
function y0(e, t) {
|
7814
7814
|
e._reconstructActiveFormattingElements(), e._appendElement(t, _.HTML), nu(t) || (e.framesetOk = !1), t.ackSelfClosing = !0;
|
7815
7815
|
}
|
7816
|
-
function
|
7816
|
+
function R0(e, t) {
|
7817
7817
|
e._appendElement(t, _.HTML), t.ackSelfClosing = !0;
|
7818
7818
|
}
|
7819
7819
|
function M0(e, t) {
|
@@ -7992,13 +7992,13 @@ function _e(e, t) {
|
|
7992
7992
|
break;
|
7993
7993
|
}
|
7994
7994
|
case n.INPUT: {
|
7995
|
-
|
7995
|
+
y0(e, t);
|
7996
7996
|
break;
|
7997
7997
|
}
|
7998
7998
|
case n.PARAM:
|
7999
7999
|
case n.TRACK:
|
8000
8000
|
case n.SOURCE: {
|
8001
|
-
|
8001
|
+
R0(e, t);
|
8002
8002
|
break;
|
8003
8003
|
}
|
8004
8004
|
case n.IMAGE: {
|
@@ -8228,11 +8228,11 @@ function th(e, t) {
|
|
8228
8228
|
function Ka(e, t) {
|
8229
8229
|
if (eu.has(e.openElements.currentTagId))
|
8230
8230
|
switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = E.IN_TABLE_TEXT, t.type) {
|
8231
|
-
case
|
8231
|
+
case j.CHARACTER: {
|
8232
8232
|
cu(e, t);
|
8233
8233
|
break;
|
8234
8234
|
}
|
8235
|
-
case
|
8235
|
+
case j.WHITESPACE_CHARACTER: {
|
8236
8236
|
ou(e, t);
|
8237
8237
|
break;
|
8238
8238
|
}
|
@@ -8732,7 +8732,7 @@ function Sh(e, t) {
|
|
8732
8732
|
}
|
8733
8733
|
}
|
8734
8734
|
function xh(e, t) {
|
8735
|
-
t.chars =
|
8735
|
+
t.chars = te, e._insertCharacters(t);
|
8736
8736
|
}
|
8737
8737
|
function Oh(e, t) {
|
8738
8738
|
e._insertCharacters(t), e.framesetOk = !1;
|
@@ -8787,12 +8787,12 @@ const vh = /* @__PURE__ */ new Set([
|
|
8787
8787
|
p.TRACK,
|
8788
8788
|
p.WBR
|
8789
8789
|
]);
|
8790
|
-
function
|
8790
|
+
function yh(e, t) {
|
8791
8791
|
return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === _.HTML && vh.has(t.treeAdapter.getTagName(e));
|
8792
8792
|
}
|
8793
|
-
const
|
8793
|
+
const Rh = { treeAdapter: $e, scriptingEnabled: !0 };
|
8794
8794
|
function Mh(e, t) {
|
8795
|
-
const a = { ...
|
8795
|
+
const a = { ...Rh, ...t };
|
8796
8796
|
return pu(e, a);
|
8797
8797
|
}
|
8798
8798
|
function Ph(e, t) {
|
@@ -8808,7 +8808,7 @@ function pu(e, t) {
|
|
8808
8808
|
}
|
8809
8809
|
function kh(e, t) {
|
8810
8810
|
const a = t.treeAdapter.getTagName(e);
|
8811
|
-
return `<${a}${wh(e, t)}>${
|
8811
|
+
return `<${a}${wh(e, t)}>${yh(e, t) ? "" : `${Ph(e, t)}</${a}>`}`;
|
8812
8812
|
}
|
8813
8813
|
function wh(e, { treeAdapter: t }) {
|
8814
8814
|
let a = "";
|
@@ -8865,7 +8865,7 @@ function qh(e, t, a) {
|
|
8865
8865
|
const ze = {
|
8866
8866
|
// Re-exports from domhandler
|
8867
8867
|
isCommentNode: va,
|
8868
|
-
isElementNode:
|
8868
|
+
isElementNode: w,
|
8869
8869
|
isTextNode: He,
|
8870
8870
|
//Node construction
|
8871
8871
|
createDocument() {
|
@@ -9060,7 +9060,7 @@ const pe = {
|
|
9060
9060
|
};
|
9061
9061
|
class Gh {
|
9062
9062
|
constructor({ xmlMode: t = !1, decodeEntities: a = !0 }, i) {
|
9063
|
-
this.cbs = i, this.state = N.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = N.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = a, this.entityDecoder = new
|
9063
|
+
this.cbs = i, this.state = N.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = N.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = a, this.entityDecoder = new yi(t ? an : vi, (s, u) => this.emitCodePoint(s, u));
|
9064
9064
|
}
|
9065
9065
|
reset() {
|
9066
9066
|
this.state = N.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = N.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
|
@@ -9444,7 +9444,7 @@ const bt = /* @__PURE__ */ new Set([
|
|
9444
9444
|
"source",
|
9445
9445
|
"track",
|
9446
9446
|
"wbr"
|
9447
|
-
]),
|
9447
|
+
]), ys = /* @__PURE__ */ new Set(["math", "svg"]), Rs = /* @__PURE__ */ new Set([
|
9448
9448
|
"mi",
|
9449
9449
|
"mo",
|
9450
9450
|
"mn",
|
@@ -9494,7 +9494,7 @@ class Kh {
|
|
9494
9494
|
const o = this.stack.shift();
|
9495
9495
|
(i = (a = this.cbs).onclosetag) === null || i === void 0 || i.call(a, o, !0);
|
9496
9496
|
}
|
9497
|
-
this.isVoidElement(t) || (this.stack.unshift(t), this.htmlMode && (
|
9497
|
+
this.isVoidElement(t) || (this.stack.unshift(t), this.htmlMode && (ys.has(t) ? this.foreignContext.unshift(!0) : Rs.has(t) && this.foreignContext.unshift(!1))), (u = (s = this.cbs).onopentagname) === null || u === void 0 || u.call(s, t), this.cbs.onopentag && (this.attribs = {});
|
9498
9498
|
}
|
9499
9499
|
endOpenTag(t) {
|
9500
9500
|
var a, i;
|
@@ -9509,7 +9509,7 @@ class Kh {
|
|
9509
9509
|
var i, s, u, r, o, c, h, f;
|
9510
9510
|
this.endIndex = a;
|
9511
9511
|
let m = this.getSlice(t, a);
|
9512
|
-
if (this.lowerCaseTagNames && (m = m.toLowerCase()), this.htmlMode && (
|
9512
|
+
if (this.lowerCaseTagNames && (m = m.toLowerCase()), this.htmlMode && (ys.has(m) || Rs.has(m)) && this.foreignContext.shift(), this.isVoidElement(m))
|
9513
9513
|
this.htmlMode && m === "br" && ((r = (u = this.cbs).onopentagname) === null || r === void 0 || r.call(u, "br"), (c = (o = this.cbs).onopentag) === null || c === void 0 || c.call(o, "br", {}, !0), (f = (h = this.cbs).onclosetag) === null || f === void 0 || f.call(h, "br", !1));
|
9514
9514
|
else {
|
9515
9515
|
const T = this.stack.indexOf(m);
|
@@ -9687,8 +9687,8 @@ function Zh(e, t) {
|
|
9687
9687
|
const a = new Ju(void 0, t);
|
9688
9688
|
return new Kh(a, t).end(e), a.root;
|
9689
9689
|
}
|
9690
|
-
const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), Ms = rl(Jh, (e, t) => t._useHtmlParser2 ?
|
9691
|
-
var
|
9690
|
+
const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), Ms = rl(Jh, (e, t) => t._useHtmlParser2 ? ya(e, t) : $h(e));
|
9691
|
+
var ee = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Image = 2] = "Image", e[e.Video = 3] = "Video", e[e.Icon = 4] = "Icon", e[e.Link = 5] = "Link", e[e.Block = 10] = "Block", e))(ee || {});
|
9692
9692
|
const ed = Ge({
|
9693
9693
|
name: "CustomIcon",
|
9694
9694
|
props: {
|
@@ -9702,18 +9702,18 @@ const ed = Ge({
|
|
9702
9702
|
iconClass: Ke(() => `${e.iconName}`)
|
9703
9703
|
};
|
9704
9704
|
}
|
9705
|
-
}),
|
9705
|
+
}), Rt = (e, t) => {
|
9706
9706
|
const a = e.__vccOpts || e;
|
9707
9707
|
for (const [i, s] of t)
|
9708
9708
|
a[i] = s;
|
9709
9709
|
return a;
|
9710
9710
|
};
|
9711
9711
|
function td(e, t, a, i, s, u) {
|
9712
|
-
return
|
9712
|
+
return M(), U("span", {
|
9713
9713
|
class: Da(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
|
9714
9714
|
}, null, 2);
|
9715
9715
|
}
|
9716
|
-
const ad = /* @__PURE__ */
|
9716
|
+
const ad = /* @__PURE__ */ Rt(ed, [["render", td]]), id = {
|
9717
9717
|
key: 0,
|
9718
9718
|
contenteditable: "false",
|
9719
9719
|
class: /* @__PURE__ */ Da(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])
|
@@ -9728,11 +9728,11 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
|
9728
9728
|
},
|
9729
9729
|
emits: ["ok"],
|
9730
9730
|
setup(e, { expose: t, emit: a }) {
|
9731
|
-
const i = e, s =
|
9731
|
+
const i = e, s = K(i.icons || []);
|
9732
9732
|
ot(() => i.icons, (f) => {
|
9733
9733
|
s.value = f || [];
|
9734
9734
|
}, { immediate: !0 });
|
9735
|
-
const u = a, r =
|
9735
|
+
const u = a, r = K(!1);
|
9736
9736
|
function o() {
|
9737
9737
|
console.log(666), r.value = !0;
|
9738
9738
|
}
|
@@ -9742,17 +9742,17 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
|
9742
9742
|
function h() {
|
9743
9743
|
r.value = !1;
|
9744
9744
|
}
|
9745
|
-
return t({ openModal: o, closeModal: h }), (f, m) => r.value ? (
|
9746
|
-
|
9747
|
-
|
9748
|
-
m[1] || (m[1] =
|
9749
|
-
|
9745
|
+
return t({ openModal: o, closeModal: h }), (f, m) => r.value ? (M(), U("div", id, [
|
9746
|
+
x("div", sd, [
|
9747
|
+
x("div", nd, [
|
9748
|
+
m[1] || (m[1] = x("span", { class: "text-base font-semibold text-[#333]" }, "选择图标", -1)),
|
9749
|
+
x("span", {
|
9750
9750
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
9751
9751
|
onClick: m[0] || (m[0] = he((T) => h(), ["stop"]))
|
9752
9752
|
})
|
9753
9753
|
]),
|
9754
|
-
|
9755
|
-
(
|
9754
|
+
x("div", ud, [
|
9755
|
+
(M(!0), U(Ht, null, Ks(s.value, (T) => (M(), xt(ad, {
|
9756
9756
|
key: T,
|
9757
9757
|
class: "w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",
|
9758
9758
|
iconName: T,
|
@@ -9761,7 +9761,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
|
9761
9761
|
}, null, 8, ["iconName", "onClick", "title"]))), 128))
|
9762
9762
|
])
|
9763
9763
|
])
|
9764
|
-
])) :
|
9764
|
+
])) : $("", !0);
|
9765
9765
|
}
|
9766
9766
|
});
|
9767
9767
|
function Ps(e) {
|
@@ -9784,7 +9784,7 @@ const od = /* @__PURE__ */ Ge({
|
|
9784
9784
|
uploadByImage: {}
|
9785
9785
|
},
|
9786
9786
|
setup(e) {
|
9787
|
-
const t = e, a =
|
9787
|
+
const t = e, a = K(), i = Ke(() => {
|
9788
9788
|
const r = {
|
9789
9789
|
width: t.width,
|
9790
9790
|
height: t.height
|
@@ -9805,7 +9805,7 @@ const od = /* @__PURE__ */ Ge({
|
|
9805
9805
|
success: 0
|
9806
9806
|
};
|
9807
9807
|
}
|
9808
|
-
return (r, o) => (
|
9808
|
+
return (r, o) => (M(), U("div", Zs({
|
9809
9809
|
style: i.value,
|
9810
9810
|
contenteditable: "false",
|
9811
9811
|
class: "bg-background-deep box-border cursor-pointer absolute left-0 top-0",
|
@@ -9814,7 +9814,7 @@ const od = /* @__PURE__ */ Ge({
|
|
9814
9814
|
onClick: o[2] || (o[2] = he(() => {
|
9815
9815
|
}, ["stop"]))
|
9816
9816
|
}), [
|
9817
|
-
|
9817
|
+
x("input", {
|
9818
9818
|
onClick: o[0] || (o[0] = he(() => {
|
9819
9819
|
}, ["stop"])),
|
9820
9820
|
contenteditable: "false",
|
@@ -10058,7 +10058,7 @@ function et(e, t) {
|
|
10058
10058
|
vd.test(s) && W(i) && (i = "".concat(i, "px")), a[s] = i;
|
10059
10059
|
});
|
10060
10060
|
}
|
10061
|
-
function
|
10061
|
+
function yd(e, t) {
|
10062
10062
|
return e.classList ? e.classList.contains(t) : e.className.indexOf(t) > -1;
|
10063
10063
|
}
|
10064
10064
|
function Ee(e, t) {
|
@@ -10103,9 +10103,9 @@ function At(e, t, a) {
|
|
10103
10103
|
a ? Ee(e, t) : Ye(e, t);
|
10104
10104
|
}
|
10105
10105
|
}
|
10106
|
-
var
|
10106
|
+
var Rd = /([a-z\d])([A-Z])/g;
|
10107
10107
|
function Zi(e) {
|
10108
|
-
return e.replace(
|
10108
|
+
return e.replace(Rd, "$1-$2").toLowerCase();
|
10109
10109
|
}
|
10110
10110
|
function Ci(e, t) {
|
10111
10111
|
return Et(e[t]) ? e[t] : e.dataset ? e.dataset[t] : e.getAttribute("data-".concat(Zi(t)));
|
@@ -10183,7 +10183,7 @@ function Ct(e, t, a) {
|
|
10183
10183
|
cancelable: !0
|
10184
10184
|
}) : (i = document.createEvent("CustomEvent"), i.initCustomEvent(t, !0, !0, a)), e.dispatchEvent(i);
|
10185
10185
|
}
|
10186
|
-
function
|
10186
|
+
function yu(e) {
|
10187
10187
|
var t = e.getBoundingClientRect();
|
10188
10188
|
return {
|
10189
10189
|
left: t.left + (window.pageXOffset - document.documentElement.clientLeft),
|
@@ -10266,33 +10266,33 @@ function Bd(e) {
|
|
10266
10266
|
};
|
10267
10267
|
}
|
10268
10268
|
function Ud(e, t, a, i) {
|
10269
|
-
var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, I = a.naturalWidth, L = a.naturalHeight,
|
10269
|
+
var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, I = a.naturalWidth, L = a.naturalHeight, P = i.fillColor, G = P === void 0 ? "transparent" : P, F = i.imageSmoothingEnabled, X = F === void 0 ? !0 : F, H = i.imageSmoothingQuality, k = H === void 0 ? "low" : H, g = i.maxWidth, B = g === void 0 ? 1 / 0 : g, Q = i.maxHeight, oe = Q === void 0 ? 1 / 0 : Q, Ae = i.minWidth, Ie = Ae === void 0 ? 0 : Ae, ye = i.minHeight, be = ye === void 0 ? 0 : ye, ge = document.createElement("canvas"), se = ge.getContext("2d"), Re = tt({
|
10270
10270
|
aspectRatio: A,
|
10271
|
-
width:
|
10271
|
+
width: B,
|
10272
10272
|
height: oe
|
10273
|
-
}),
|
10273
|
+
}), S = tt({
|
10274
10274
|
aspectRatio: A,
|
10275
10275
|
width: Ie,
|
10276
10276
|
height: be
|
10277
|
-
}, "cover"), R = Math.min(
|
10277
|
+
}, "cover"), R = Math.min(Re.width, Math.max(S.width, I)), O = Math.min(Re.height, Math.max(S.height, L)), D = tt({
|
10278
10278
|
aspectRatio: s,
|
10279
|
-
width:
|
10279
|
+
width: B,
|
10280
10280
|
height: oe
|
10281
|
-
}),
|
10281
|
+
}), Y = tt({
|
10282
10282
|
aspectRatio: s,
|
10283
10283
|
width: Ie,
|
10284
10284
|
height: be
|
10285
|
-
}, "cover"),
|
10286
|
-
return ge.width = It(R), ge.height = It(O), se.fillStyle =
|
10285
|
+
}, "cover"), V = Math.min(D.width, Math.max(Y.width, u)), J = Math.min(D.height, Math.max(Y.height, r)), ne = [-V / 2, -J / 2, V, J];
|
10286
|
+
return ge.width = It(R), ge.height = It(O), se.fillStyle = G, se.fillRect(0, 0, R, O), se.save(), se.translate(R / 2, O / 2), se.rotate(c * Math.PI / 180), se.scale(f, T), se.imageSmoothingEnabled = X, se.imageSmoothingQuality = k, se.drawImage.apply(se, [e].concat(_u(ne.map(function(ce) {
|
10287
10287
|
return Math.floor(It(ce));
|
10288
10288
|
})))), se.restore(), ge;
|
10289
10289
|
}
|
10290
|
-
var
|
10290
|
+
var Ru = String.fromCharCode;
|
10291
10291
|
function Fd(e, t, a) {
|
10292
10292
|
var i = "";
|
10293
10293
|
a += t;
|
10294
10294
|
for (var s = t; s < a; s += 1)
|
10295
|
-
i +=
|
10295
|
+
i += Ru(e.getUint8(s));
|
10296
10296
|
return i;
|
10297
10297
|
}
|
10298
10298
|
var Hd = /^data:.*,/;
|
@@ -10304,7 +10304,7 @@ function Yd(e) {
|
|
10304
10304
|
}
|
10305
10305
|
function qd(e, t) {
|
10306
10306
|
for (var a = [], i = 8192, s = new Uint8Array(e); s.length > 0; )
|
10307
|
-
a.push(
|
10307
|
+
a.push(Ru.apply(null, Du(s.subarray(0, i)))), s = s.subarray(i);
|
10308
10308
|
return "data:".concat(t, ";base64,").concat(btoa(a.join("")));
|
10309
10309
|
}
|
10310
10310
|
function Vd(e) {
|
@@ -10515,16 +10515,16 @@ var $d = {
|
|
10515
10515
|
translateX: -c,
|
10516
10516
|
translateY: -h
|
10517
10517
|
}, t)))), le(this.previews, function(f) {
|
10518
|
-
var m = Ci(f, ha), T = m.width, A = m.height, I = T, L = A,
|
10519
|
-
s && (
|
10518
|
+
var m = Ci(f, ha), T = m.width, A = m.height, I = T, L = A, P = 1;
|
10519
|
+
s && (P = T / s, L = u * P), u && L > A && (P = A / u, I = s * P, L = A), et(f, {
|
10520
10520
|
width: I,
|
10521
10521
|
height: L
|
10522
10522
|
}), et(f.getElementsByTagName("img")[0], ie({
|
10523
|
-
width: r *
|
10524
|
-
height: o *
|
10523
|
+
width: r * P,
|
10524
|
+
height: o * P
|
10525
10525
|
}, Qt(ie({
|
10526
|
-
translateX: -c *
|
10527
|
-
translateY: -h *
|
10526
|
+
translateX: -c * P,
|
10527
|
+
translateY: -h * P
|
10528
10528
|
}, t))));
|
10529
10529
|
}));
|
10530
10530
|
}
|
@@ -10558,7 +10558,7 @@ var $d = {
|
|
10558
10558
|
}
|
10559
10559
|
},
|
10560
10560
|
dblclick: function() {
|
10561
|
-
this.disabled || this.options.dragMode === Su || this.setDragMode(
|
10561
|
+
this.disabled || this.options.dragMode === Su || this.setDragMode(yd(this.dragBox, pi) ? Cu : Ki);
|
10562
10562
|
},
|
10563
10563
|
wheel: function(t) {
|
10564
10564
|
var a = this, i = Number(this.options.wheelZoomRatio) || 0.1, s = 1;
|
@@ -10604,24 +10604,24 @@ var $d = {
|
|
10604
10604
|
}
|
10605
10605
|
}, jd = {
|
10606
10606
|
change: function(t) {
|
10607
|
-
var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, h = u.left, f = u.top, m = u.width, T = u.height, A = h + m, I = f + T, L = 0,
|
10608
|
-
!c && t.shiftKey && (c = m && T ? m / T : 1), this.limited && (L = u.minLeft,
|
10609
|
-
var
|
10610
|
-
x:
|
10611
|
-
y:
|
10612
|
-
},
|
10607
|
+
var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, h = u.left, f = u.top, m = u.width, T = u.height, A = h + m, I = f + T, L = 0, P = 0, G = s.width, F = s.height, X = !0, H;
|
10608
|
+
!c && t.shiftKey && (c = m && T ? m / T : 1), this.limited && (L = u.minLeft, P = u.minTop, G = L + Math.min(s.width, i.width, i.left + i.width), F = P + Math.min(s.height, i.height, i.top + i.height));
|
10609
|
+
var k = r[Object.keys(r)[0]], g = {
|
10610
|
+
x: k.endX - k.startX,
|
10611
|
+
y: k.endY - k.startY
|
10612
|
+
}, B = function(oe) {
|
10613
10613
|
switch (oe) {
|
10614
10614
|
case ut:
|
10615
|
-
A + g.x >
|
10615
|
+
A + g.x > G && (g.x = G - A);
|
10616
10616
|
break;
|
10617
10617
|
case rt:
|
10618
10618
|
h + g.x < L && (g.x = L - h);
|
10619
10619
|
break;
|
10620
10620
|
case Qe:
|
10621
|
-
f + g.y <
|
10621
|
+
f + g.y < P && (g.y = P - f);
|
10622
10622
|
break;
|
10623
10623
|
case gt:
|
10624
|
-
I + g.y >
|
10624
|
+
I + g.y > F && (g.y = F - I);
|
10625
10625
|
break;
|
10626
10626
|
}
|
10627
10627
|
};
|
@@ -10630,93 +10630,93 @@ var $d = {
|
|
10630
10630
|
h += g.x, f += g.y;
|
10631
10631
|
break;
|
10632
10632
|
case ut:
|
10633
|
-
if (g.x >= 0 && (A >=
|
10634
|
-
|
10633
|
+
if (g.x >= 0 && (A >= G || c && (f <= P || I >= F))) {
|
10634
|
+
X = !1;
|
10635
10635
|
break;
|
10636
10636
|
}
|
10637
|
-
|
10637
|
+
B(ut), m += g.x, m < 0 && (o = rt, m = -m, h -= m), c && (T = m / c, f += (u.height - T) / 2);
|
10638
10638
|
break;
|
10639
10639
|
case Qe:
|
10640
|
-
if (g.y <= 0 && (f <=
|
10641
|
-
|
10640
|
+
if (g.y <= 0 && (f <= P || c && (h <= L || A >= G))) {
|
10641
|
+
X = !1;
|
10642
10642
|
break;
|
10643
10643
|
}
|
10644
|
-
|
10644
|
+
B(Qe), T -= g.y, f += g.y, T < 0 && (o = gt, T = -T, f -= T), c && (m = T * c, h += (u.width - m) / 2);
|
10645
10645
|
break;
|
10646
10646
|
case rt:
|
10647
|
-
if (g.x <= 0 && (h <= L || c && (f <=
|
10648
|
-
|
10647
|
+
if (g.x <= 0 && (h <= L || c && (f <= P || I >= F))) {
|
10648
|
+
X = !1;
|
10649
10649
|
break;
|
10650
10650
|
}
|
10651
|
-
|
10651
|
+
B(rt), m -= g.x, h += g.x, m < 0 && (o = ut, m = -m, h -= m), c && (T = m / c, f += (u.height - T) / 2);
|
10652
10652
|
break;
|
10653
10653
|
case gt:
|
10654
|
-
if (g.y >= 0 && (I >=
|
10655
|
-
|
10654
|
+
if (g.y >= 0 && (I >= F || c && (h <= L || A >= G))) {
|
10655
|
+
X = !1;
|
10656
10656
|
break;
|
10657
10657
|
}
|
10658
|
-
|
10658
|
+
B(gt), T += g.y, T < 0 && (o = Qe, T = -T, f -= T), c && (m = T * c, h += (u.width - m) / 2);
|
10659
10659
|
break;
|
10660
10660
|
case wt:
|
10661
10661
|
if (c) {
|
10662
|
-
if (g.y <= 0 && (f <=
|
10663
|
-
|
10662
|
+
if (g.y <= 0 && (f <= P || A >= G)) {
|
10663
|
+
X = !1;
|
10664
10664
|
break;
|
10665
10665
|
}
|
10666
|
-
|
10666
|
+
B(Qe), T -= g.y, f += g.y, m = T * c;
|
10667
10667
|
} else
|
10668
|
-
|
10668
|
+
B(Qe), B(ut), g.x >= 0 ? A < G ? m += g.x : g.y <= 0 && f <= P && (X = !1) : m += g.x, g.y <= 0 ? f > P && (T -= g.y, f += g.y) : (T -= g.y, f += g.y);
|
10669
10669
|
m < 0 && T < 0 ? (o = Ft, T = -T, m = -m, f -= T, h -= m) : m < 0 ? (o = Bt, m = -m, h -= m) : T < 0 && (o = Ut, T = -T, f -= T);
|
10670
10670
|
break;
|
10671
10671
|
case Bt:
|
10672
10672
|
if (c) {
|
10673
|
-
if (g.y <= 0 && (f <=
|
10674
|
-
|
10673
|
+
if (g.y <= 0 && (f <= P || h <= L)) {
|
10674
|
+
X = !1;
|
10675
10675
|
break;
|
10676
10676
|
}
|
10677
|
-
|
10677
|
+
B(Qe), T -= g.y, f += g.y, m = T * c, h += u.width - m;
|
10678
10678
|
} else
|
10679
|
-
|
10679
|
+
B(Qe), B(rt), g.x <= 0 ? h > L ? (m -= g.x, h += g.x) : g.y <= 0 && f <= P && (X = !1) : (m -= g.x, h += g.x), g.y <= 0 ? f > P && (T -= g.y, f += g.y) : (T -= g.y, f += g.y);
|
10680
10680
|
m < 0 && T < 0 ? (o = Ut, T = -T, m = -m, f -= T, h -= m) : m < 0 ? (o = wt, m = -m, h -= m) : T < 0 && (o = Ft, T = -T, f -= T);
|
10681
10681
|
break;
|
10682
10682
|
case Ft:
|
10683
10683
|
if (c) {
|
10684
|
-
if (g.x <= 0 && (h <= L || I >=
|
10685
|
-
|
10684
|
+
if (g.x <= 0 && (h <= L || I >= F)) {
|
10685
|
+
X = !1;
|
10686
10686
|
break;
|
10687
10687
|
}
|
10688
|
-
|
10688
|
+
B(rt), m -= g.x, h += g.x, T = m / c;
|
10689
10689
|
} else
|
10690
|
-
|
10690
|
+
B(gt), B(rt), g.x <= 0 ? h > L ? (m -= g.x, h += g.x) : g.y >= 0 && I >= F && (X = !1) : (m -= g.x, h += g.x), g.y >= 0 ? I < F && (T += g.y) : T += g.y;
|
10691
10691
|
m < 0 && T < 0 ? (o = wt, T = -T, m = -m, f -= T, h -= m) : m < 0 ? (o = Ut, m = -m, h -= m) : T < 0 && (o = Bt, T = -T, f -= T);
|
10692
10692
|
break;
|
10693
10693
|
case Ut:
|
10694
10694
|
if (c) {
|
10695
|
-
if (g.x >= 0 && (A >=
|
10696
|
-
|
10695
|
+
if (g.x >= 0 && (A >= G || I >= F)) {
|
10696
|
+
X = !1;
|
10697
10697
|
break;
|
10698
10698
|
}
|
10699
|
-
|
10699
|
+
B(ut), m += g.x, T = m / c;
|
10700
10700
|
} else
|
10701
|
-
|
10701
|
+
B(gt), B(ut), g.x >= 0 ? A < G ? m += g.x : g.y >= 0 && I >= F && (X = !1) : m += g.x, g.y >= 0 ? I < F && (T += g.y) : T += g.y;
|
10702
10702
|
m < 0 && T < 0 ? (o = Bt, T = -T, m = -m, f -= T, h -= m) : m < 0 ? (o = Ft, m = -m, h -= m) : T < 0 && (o = wt, T = -T, f -= T);
|
10703
10703
|
break;
|
10704
10704
|
case Nu:
|
10705
|
-
this.move(g.x, g.y),
|
10705
|
+
this.move(g.x, g.y), X = !1;
|
10706
10706
|
break;
|
10707
10707
|
case Iu:
|
10708
|
-
this.zoom(kd(r), t),
|
10708
|
+
this.zoom(kd(r), t), X = !1;
|
10709
10709
|
break;
|
10710
10710
|
case Au:
|
10711
10711
|
if (!g.x || !g.y) {
|
10712
|
-
|
10712
|
+
X = !1;
|
10713
10713
|
break;
|
10714
10714
|
}
|
10715
|
-
|
10715
|
+
H = yu(this.cropper), h = k.startX - H.left, f = k.startY - H.top, m = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Ut : wt : g.x < 0 && (h -= m, o = g.y > 0 ? Ft : Bt), g.y < 0 && (f -= T), this.cropped || (Ye(this.cropBox, Oe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
|
10716
10716
|
break;
|
10717
10717
|
}
|
10718
|
-
|
10719
|
-
|
10718
|
+
X && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()), le(r, function(Q) {
|
10719
|
+
Q.startX = Q.endX, Q.startY = Q.endY;
|
10720
10720
|
});
|
10721
10721
|
}
|
10722
10722
|
}, zd = {
|
@@ -10813,7 +10813,7 @@ var $d = {
|
|
10813
10813
|
}) === !1)
|
10814
10814
|
return this;
|
10815
10815
|
if (i) {
|
10816
|
-
var T = this.pointers, A =
|
10816
|
+
var T = this.pointers, A = yu(this.cropper), I = T && Object.keys(T).length ? wd(T) : {
|
10817
10817
|
pageX: i.pageX,
|
10818
10818
|
pageY: i.pageY
|
10819
10819
|
};
|
@@ -10995,20 +10995,20 @@ var $d = {
|
|
10995
10995
|
height: t.height || (h !== 1 ? i.height : c)
|
10996
10996
|
}), I = A.width, L = A.height;
|
10997
10997
|
I = Math.min(m.width, Math.max(T.width, I)), L = Math.min(m.height, Math.max(T.height, L));
|
10998
|
-
var
|
10999
|
-
|
11000
|
-
var
|
11001
|
-
|
11002
|
-
var
|
11003
|
-
|
11004
|
-
var se = [
|
10998
|
+
var P = document.createElement("canvas"), G = P.getContext("2d");
|
10999
|
+
P.width = It(I), P.height = It(L), G.fillStyle = t.fillColor || "transparent", G.fillRect(0, 0, I, L);
|
11000
|
+
var F = t.imageSmoothingEnabled, X = F === void 0 ? !0 : F, H = t.imageSmoothingQuality;
|
11001
|
+
G.imageSmoothingEnabled = X, H && (G.imageSmoothingQuality = H);
|
11002
|
+
var k = i.width, g = i.height, B = u, Q = r, oe, Ae, Ie, ye, be, ge;
|
11003
|
+
B <= -o || B > k ? (B = 0, oe = 0, Ie = 0, be = 0) : B <= 0 ? (Ie = -B, B = 0, oe = Math.min(k, o + B), be = oe) : B <= k && (Ie = 0, oe = Math.min(o, k - B), be = oe), oe <= 0 || Q <= -c || Q > g ? (Q = 0, Ae = 0, ye = 0, ge = 0) : Q <= 0 ? (ye = -Q, Q = 0, Ae = Math.min(g, c + Q), ge = Ae) : Q <= g && (ye = 0, Ae = Math.min(c, g - Q), ge = Ae);
|
11004
|
+
var se = [B, Q, oe, Ae];
|
11005
11005
|
if (be > 0 && ge > 0) {
|
11006
|
-
var
|
11007
|
-
se.push(Ie *
|
11006
|
+
var Re = I / o;
|
11007
|
+
se.push(Ie * Re, ye * Re, be * Re, ge * Re);
|
11008
11008
|
}
|
11009
|
-
return
|
11010
|
-
return Math.floor(It(
|
11011
|
-
})))),
|
11009
|
+
return G.drawImage.apply(G, [i].concat(_u(se.map(function(S) {
|
11010
|
+
return Math.floor(It(S));
|
11011
|
+
})))), P;
|
11012
11012
|
},
|
11013
11013
|
/**
|
11014
11014
|
* Change the aspect ratio of the crop box.
|
@@ -11192,7 +11192,7 @@ const Jd = {
|
|
11192
11192
|
__name: "index",
|
11193
11193
|
emits: ["cancel", "ok"],
|
11194
11194
|
setup(e, { expose: t, emit: a }) {
|
11195
|
-
const i = a, s =
|
11195
|
+
const i = a, s = K({
|
11196
11196
|
coverUrl: "",
|
11197
11197
|
// 封面url
|
11198
11198
|
inputValue: "",
|
@@ -11203,7 +11203,7 @@ const Jd = {
|
|
11203
11203
|
// 视频前缀
|
11204
11204
|
videoUrl: ""
|
11205
11205
|
// 视频url
|
11206
|
-
}), u =
|
11206
|
+
}), u = K(), r = K({
|
11207
11207
|
// 允许自裁
|
11208
11208
|
autoCrop: !0,
|
11209
11209
|
// 设置图片是否可以拖拽功能
|
@@ -11239,144 +11239,144 @@ const Jd = {
|
|
11239
11239
|
// crop: (e) => {
|
11240
11240
|
// console.log(e.detail);
|
11241
11241
|
// }
|
11242
|
-
}), o =
|
11242
|
+
}), o = K(!1), c = K({
|
11243
11243
|
// 裁剪后的图片
|
11244
11244
|
afterImg: "",
|
11245
11245
|
// 裁剪前的图片
|
11246
11246
|
image: null,
|
11247
11247
|
myCropper: null
|
11248
|
-
}), h =
|
11249
|
-
console.log(
|
11250
|
-
const
|
11251
|
-
if (
|
11252
|
-
|
11248
|
+
}), h = K("image/jpeg"), f = (H) => {
|
11249
|
+
console.log(H);
|
11250
|
+
const k = H.target.files[0];
|
11251
|
+
if (k) {
|
11252
|
+
k.name && (s.value.inputValue = k.name);
|
11253
11253
|
const g = new FileReader();
|
11254
|
-
g.onload = (
|
11255
|
-
var
|
11256
|
-
console.log("e?.target?.result", (
|
11257
|
-
}, g.readAsDataURL(
|
11254
|
+
g.onload = (B) => {
|
11255
|
+
var Q, oe;
|
11256
|
+
console.log("e?.target?.result", (Q = B == null ? void 0 : B.target) == null ? void 0 : Q.result), m((oe = B == null ? void 0 : B.target) == null ? void 0 : oe.result);
|
11257
|
+
}, g.readAsDataURL(k);
|
11258
11258
|
}
|
11259
11259
|
};
|
11260
|
-
async function m(
|
11261
|
-
if (!
|
11260
|
+
async function m(H) {
|
11261
|
+
if (!H)
|
11262
11262
|
return;
|
11263
|
-
await
|
11264
|
-
const
|
11265
|
-
c.value.image =
|
11263
|
+
await X();
|
11264
|
+
const k = H;
|
11265
|
+
c.value.image = k, c.value.image && T();
|
11266
11266
|
}
|
11267
11267
|
function T() {
|
11268
|
-
const
|
11269
|
-
|
11270
|
-
|
11271
|
-
|
11268
|
+
const H = document.querySelector("#imgId");
|
11269
|
+
H && H.addEventListener("load", () => {
|
11270
|
+
F(), c.value.myCropper = new Mu(
|
11271
|
+
H,
|
11272
11272
|
r.value
|
11273
11273
|
);
|
11274
11274
|
});
|
11275
11275
|
}
|
11276
|
-
const A =
|
11277
|
-
function I(
|
11278
|
-
u.value =
|
11276
|
+
const A = K(!1);
|
11277
|
+
function I(H, k, g) {
|
11278
|
+
u.value = H, H && H.aspectRatio && (r.value.aspectRatio = H.aspectRatio), g && (s.value.inputValue = g), A.value = !0, k && m(k);
|
11279
11279
|
}
|
11280
11280
|
function L() {
|
11281
11281
|
A.value = !1;
|
11282
11282
|
}
|
11283
|
-
const
|
11284
|
-
var
|
11283
|
+
const P = () => {
|
11284
|
+
var k, g;
|
11285
11285
|
if (!c.value.myCropper)
|
11286
11286
|
return;
|
11287
11287
|
o.value = !0, c.value.afterImg = c.value.myCropper.getCroppedCanvas({
|
11288
|
-
height: (
|
11288
|
+
height: (k = u.value) == null ? void 0 : k.height,
|
11289
11289
|
// 高
|
11290
11290
|
imageSmoothingQuality: "high",
|
11291
11291
|
// 图片质量
|
11292
11292
|
width: (g = u.value) == null ? void 0 : g.width
|
11293
11293
|
// 输出图片的宽
|
11294
11294
|
}).toDataURL(h.value);
|
11295
|
-
const
|
11295
|
+
const H = Zd(
|
11296
11296
|
c.value.afterImg,
|
11297
11297
|
s.value.inputValue
|
11298
11298
|
);
|
11299
|
-
i("ok",
|
11299
|
+
i("ok", H), o.value = !1, X(), F(), L();
|
11300
11300
|
};
|
11301
|
-
function
|
11302
|
-
|
11301
|
+
function G() {
|
11302
|
+
X(), F(), L(), i("cancel");
|
11303
11303
|
}
|
11304
|
-
function
|
11304
|
+
function F() {
|
11305
11305
|
c.value.myCropper && c.value.myCropper.destroy();
|
11306
11306
|
}
|
11307
|
-
function
|
11307
|
+
function X() {
|
11308
11308
|
c.value.image = "";
|
11309
11309
|
}
|
11310
|
-
return t({ handleCloseCropper: L, handleOpenCropper: I }), (
|
11311
|
-
var g,
|
11312
|
-
return A.value ? (
|
11313
|
-
|
11314
|
-
|
11315
|
-
|
11316
|
-
|
11310
|
+
return t({ handleCloseCropper: L, handleOpenCropper: I }), (H, k) => {
|
11311
|
+
var g, B, Q;
|
11312
|
+
return A.value ? (M(), U("div", Jd, [
|
11313
|
+
x("div", ef, [
|
11314
|
+
x("div", tf, [
|
11315
|
+
k[1] || (k[1] = x("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
|
11316
|
+
x("span", {
|
11317
11317
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
11318
|
-
onClick: he(
|
11318
|
+
onClick: he(G, ["stop"])
|
11319
11319
|
})
|
11320
11320
|
]),
|
11321
|
-
|
11322
|
-
|
11323
|
-
|
11324
|
-
|
11325
|
-
|
11326
|
-
|
11327
|
-
|
11328
|
-
|
11321
|
+
x("div", af, [
|
11322
|
+
x("div", sf, [
|
11323
|
+
x("div", nf, [
|
11324
|
+
x("div", uf, [
|
11325
|
+
x("div", rf, [
|
11326
|
+
x("div", of, [
|
11327
|
+
x("div", cf, [
|
11328
|
+
x("input", {
|
11329
11329
|
type: "file",
|
11330
11330
|
accept: "image/*",
|
11331
|
-
onClick:
|
11331
|
+
onClick: k[0] || (k[0] = he(() => {
|
11332
11332
|
}, ["stop"])),
|
11333
11333
|
contenteditable: "false",
|
11334
11334
|
ref: "fileInput",
|
11335
11335
|
onChange: f,
|
11336
11336
|
class: "absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"
|
11337
11337
|
}, null, 544),
|
11338
|
-
|
11338
|
+
k[2] || (k[2] = x("span", {
|
11339
11339
|
id: "uploadHandler",
|
11340
11340
|
class: "cursor-pointer"
|
11341
11341
|
}, " 选择/更换图片 ", -1))
|
11342
11342
|
]),
|
11343
|
-
|
11343
|
+
k[3] || (k[3] = x("span", { class: "text-sm text-[#999] ml-3" }, "滚动鼠标放大或缩小图片", -1))
|
11344
11344
|
]),
|
11345
|
-
|
11346
|
-
|
11347
|
-
|
11348
|
-
c.value.image ?
|
11349
|
-
|
11345
|
+
x("div", lf, [
|
11346
|
+
x("div", hf, [
|
11347
|
+
x("div", df, [
|
11348
|
+
c.value.image ? $("", !0) : (M(), U("div", ff, " 请上传图片 ")),
|
11349
|
+
x("img", {
|
11350
11350
|
id: "imgId",
|
11351
11351
|
src: c.value.image,
|
11352
11352
|
style: { width: "300px" }
|
11353
11353
|
}, null, 8, Ef)
|
11354
11354
|
])
|
11355
11355
|
]),
|
11356
|
-
|
11357
|
-
|
11358
|
-
|
11356
|
+
x("div", mf, [
|
11357
|
+
k[4] || (k[4] = x("div", { class: "before w-[270px] h-[200px] pr-[70px] border" }, null, -1)),
|
11358
|
+
x("div", Tf, " 预览画像 " + ve(((g = u.value) == null ? void 0 : g.width) || "") + " " + ve((B = u.value) != null && B.width ? "x" : "") + " " + ve(((Q = u.value) == null ? void 0 : Q.height) || ""), 1)
|
11359
11359
|
])
|
11360
11360
|
])
|
11361
11361
|
])
|
11362
11362
|
])
|
11363
11363
|
])
|
11364
11364
|
]),
|
11365
|
-
|
11366
|
-
|
11365
|
+
x("div", pf, [
|
11366
|
+
x("span", {
|
11367
11367
|
loading: o.value,
|
11368
11368
|
class: "!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",
|
11369
11369
|
type: "primary",
|
11370
|
-
onClick:
|
11370
|
+
onClick: P
|
11371
11371
|
}, " 确认 ", 8, bf),
|
11372
|
-
|
11372
|
+
x("span", {
|
11373
11373
|
class: "!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",
|
11374
|
-
onClick:
|
11374
|
+
onClick: G
|
11375
11375
|
}, "取消")
|
11376
11376
|
])
|
11377
11377
|
])
|
11378
11378
|
])
|
11379
|
-
])) :
|
11379
|
+
])) : $("", !0);
|
11380
11380
|
};
|
11381
11381
|
}
|
11382
11382
|
}), _f = { class: "aidition_left" }, Af = { class: "aidition_right" }, Nf = {
|
@@ -11407,9 +11407,9 @@ const Jd = {
|
|
11407
11407
|
},
|
11408
11408
|
emits: ["selectElement", "hoverElement", "updateText", "contentUpdated", "blockAction", "addIcon", "upload"],
|
11409
11409
|
setup(e, { emit: t }) {
|
11410
|
-
const a = e, i = t, s = Ke(() => a.selectedElement === a.element), u = Ke(() => a.hoveredElement === a.element), r =
|
11410
|
+
const a = e, i = t, s = Ke(() => a.selectedElement === a.element), u = Ke(() => a.hoveredElement === a.element), r = K(!1), o = K(!1), c = K(""), h = Ke(() => a.element.rule.minText || 0), f = Ke(() => a.element.rule.maxText || 1 / 0), m = K();
|
11411
11411
|
function T(O) {
|
11412
|
-
O.xpath != "/div[1]" && (i("selectElement", O), !O.rule.isReadOnly && O.type ===
|
11412
|
+
O.xpath != "/div[1]" && a.mode !== "preview" && (a.mode === "edit" ? O.type === ee.Text && i("selectElement", O) : i("selectElement", O), !O.rule.isReadOnly && O.type === ee.Text && (r.value = !0));
|
11413
11413
|
}
|
11414
11414
|
function A(O) {
|
11415
11415
|
i("selectElement", O);
|
@@ -11420,92 +11420,92 @@ const Jd = {
|
|
11420
11420
|
function L(O) {
|
11421
11421
|
i("hoverElement", O);
|
11422
11422
|
}
|
11423
|
-
function
|
11423
|
+
function P(O) {
|
11424
11424
|
O.currentTarget.contains(O.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
|
11425
11425
|
}
|
11426
|
-
function
|
11427
|
-
r.value = !1, i("contentUpdated",
|
11426
|
+
function G() {
|
11427
|
+
r.value = !1, i("contentUpdated", F());
|
11428
11428
|
}
|
11429
|
-
function
|
11429
|
+
function F() {
|
11430
11430
|
function O(D) {
|
11431
|
-
const
|
11432
|
-
return `${
|
11431
|
+
const Y = Object.entries(D.attrs || {}).map(([ce, Ve]) => `${ce}="${Ve}"`).join(" "), V = `<${D.tag}${Y ? " " + Y : ""}>`, J = `</${D.tag}>`, ne = (D.children || []).map((ce) => O(ce)).join("");
|
11432
|
+
return `${V}${D.editText || D.text || ""}${ne}${J}`;
|
11433
11433
|
}
|
11434
11434
|
return O(a.element);
|
11435
11435
|
}
|
11436
|
-
function
|
11437
|
-
var
|
11436
|
+
function X(O) {
|
11437
|
+
var V;
|
11438
11438
|
O.stopPropagation();
|
11439
|
-
const D = O.target,
|
11440
|
-
if (
|
11439
|
+
const D = O.target, Y = ((V = D.firstChild) == null ? void 0 : V.nodeType) === Node.TEXT_NODE && D.firstChild.nodeValue || "";
|
11440
|
+
if (Y.length < h.value) {
|
11441
11441
|
o.value = !0, c.value = `最少输入 ${h.value} 个字符`;
|
11442
11442
|
return;
|
11443
|
-
} else if (
|
11443
|
+
} else if (Y.length > f.value) {
|
11444
11444
|
o.value = !0, c.value = `最多输入 ${f.value} 个字符`;
|
11445
11445
|
return;
|
11446
11446
|
} else
|
11447
11447
|
o.value = !1, c.value = "";
|
11448
|
-
a.element.editText =
|
11448
|
+
a.element.editText = Y, i("updateText", { element: a.element, newText: Y }), i("contentUpdated", F());
|
11449
11449
|
}
|
11450
|
-
function
|
11451
|
-
i("updateText", O), i("contentUpdated",
|
11450
|
+
function H(O) {
|
11451
|
+
i("updateText", O), i("contentUpdated", F());
|
11452
11452
|
}
|
11453
|
-
function
|
11453
|
+
function k() {
|
11454
11454
|
const O = { ...a.element };
|
11455
11455
|
i("blockAction", { action: "add", element: a.element, newBlock: O });
|
11456
11456
|
}
|
11457
11457
|
function g() {
|
11458
11458
|
i("blockAction", { action: "moveUp", element: a.element });
|
11459
11459
|
}
|
11460
|
-
function
|
11460
|
+
function B() {
|
11461
11461
|
i("blockAction", { action: "moveDown", element: a.element });
|
11462
11462
|
}
|
11463
|
-
function
|
11463
|
+
function Q() {
|
11464
11464
|
i("blockAction", { action: "delete", element: a.element });
|
11465
11465
|
}
|
11466
11466
|
function oe(O) {
|
11467
|
-
i("blockAction", O), i("contentUpdated",
|
11467
|
+
i("blockAction", O), i("contentUpdated", F());
|
11468
11468
|
}
|
11469
11469
|
function Ae() {
|
11470
11470
|
m.value.openModal();
|
11471
11471
|
}
|
11472
11472
|
function Ie(O) {
|
11473
|
-
i("addIcon", O, a.element), i("contentUpdated",
|
11473
|
+
i("addIcon", O, a.element), i("contentUpdated", F());
|
11474
11474
|
}
|
11475
|
-
function
|
11476
|
-
i("addIcon", O, D), i("contentUpdated",
|
11475
|
+
function ye(O, D) {
|
11476
|
+
i("addIcon", O, D), i("contentUpdated", F());
|
11477
11477
|
}
|
11478
11478
|
let be;
|
11479
|
-
const ge =
|
11480
|
-
function
|
11479
|
+
const ge = K(), se = K({});
|
11480
|
+
function Re(O, D) {
|
11481
11481
|
if (D.rule.minImageWidth && D.rule.maxImageHeight ? (se.value.width = D.rule.minImageWidth, se.value.height = D.rule.maxImageHeight, se.value.aspectRatio = D.rule.minImageWidth / D.rule.maxImageHeight) : se.value = {}, O) {
|
11482
11482
|
O.name;
|
11483
|
-
const
|
11484
|
-
|
11483
|
+
const Y = new FileReader();
|
11484
|
+
Y.onload = (V) => {
|
11485
11485
|
var J;
|
11486
|
-
be = (J =
|
11487
|
-
},
|
11486
|
+
be = (J = V == null ? void 0 : V.target) == null ? void 0 : J.result, ge.value.handleOpenCropper(se.value, be, O.name);
|
11487
|
+
}, Y.readAsDataURL(O);
|
11488
11488
|
}
|
11489
11489
|
}
|
11490
|
-
function
|
11490
|
+
function S(O, D) {
|
11491
11491
|
if (console.log(typeof O == "object", O), O)
|
11492
11492
|
if (typeof O == "object") {
|
11493
11493
|
D.attrs.alt = O.name;
|
11494
|
-
const
|
11495
|
-
|
11494
|
+
const Y = new FileReader();
|
11495
|
+
Y.onload = (V) => {
|
11496
11496
|
var ne;
|
11497
|
-
let J = (ne =
|
11498
|
-
D.attrs.src = J, i("upload", J, D), i("contentUpdated",
|
11499
|
-
},
|
11497
|
+
let J = (ne = V == null ? void 0 : V.target) == null ? void 0 : ne.result;
|
11498
|
+
D.attrs.src = J, i("upload", J, D), i("contentUpdated", F());
|
11499
|
+
}, Y.readAsDataURL(O);
|
11500
11500
|
} else
|
11501
|
-
D.attrs.src = O, i("upload", O, D), i("contentUpdated",
|
11501
|
+
D.attrs.src = O, i("upload", O, D), i("contentUpdated", F());
|
11502
11502
|
}
|
11503
11503
|
const R = async (O) => {
|
11504
11504
|
};
|
11505
11505
|
return (O, D) => {
|
11506
|
-
const
|
11507
|
-
return
|
11508
|
-
(
|
11506
|
+
const Y = wu("ElementRenderer", !0);
|
11507
|
+
return M(), U(Ht, null, [
|
11508
|
+
(M(), xt(Bu(a.element.tag), Zs({
|
11509
11509
|
class: [
|
11510
11510
|
" ",
|
11511
11511
|
e.mode === "design" ? "m-2 p-1 border-dashed border-2" : "",
|
@@ -11523,110 +11523,110 @@ const Jd = {
|
|
11523
11523
|
contenteditable: r.value,
|
11524
11524
|
onClick: D[1] || (D[1] = he(() => T(a.element), ["stop"])),
|
11525
11525
|
onMouseenter: D[2] || (D[2] = () => L(a.element)),
|
11526
|
-
onMouseleave:
|
11527
|
-
onBlur:
|
11528
|
-
onInput:
|
11526
|
+
onMouseleave: P,
|
11527
|
+
onBlur: G,
|
11528
|
+
onInput: X
|
11529
11529
|
}), {
|
11530
11530
|
default: Js(() => [
|
11531
11531
|
ti(ve(a.element.editText || a.element.text), 1),
|
11532
|
-
a.element.children && a.element.children.length ? (
|
11533
|
-
a.element.type === Ne(
|
11532
|
+
a.element.children && a.element.children.length ? (M(), U(Ht, { key: 0 }, [
|
11533
|
+
a.element.type === Ne(ee).Block ? (M(), U("div", {
|
11534
11534
|
key: 0,
|
11535
11535
|
"date-action": "1",
|
11536
11536
|
class: Da(["aidition", s.value ? "flex" : ""]),
|
11537
11537
|
contenteditable: "false"
|
11538
11538
|
}, [
|
11539
|
-
|
11540
|
-
|
11541
|
-
|
11539
|
+
x("span", _f, ve(a.element.editText || a.element.text), 1),
|
11540
|
+
x("div", Af, [
|
11541
|
+
x("span", {
|
11542
11542
|
onClick: he(g, ["stop"])
|
11543
11543
|
}, "排前"),
|
11544
|
-
|
11545
|
-
onClick: he(
|
11544
|
+
x("span", {
|
11545
|
+
onClick: he(B, ["stop"])
|
11546
11546
|
}, "排后"),
|
11547
|
-
|
11548
|
-
onClick: he(
|
11547
|
+
x("span", {
|
11548
|
+
onClick: he(Q, ["stop"])
|
11549
11549
|
}, "删除")
|
11550
11550
|
])
|
11551
|
-
], 2)) :
|
11552
|
-
(
|
11551
|
+
], 2)) : $("", !0),
|
11552
|
+
(M(!0), U(Ht, null, Ks(a.element.children, (V, J) => (M(), xt(Y, {
|
11553
11553
|
mode: e.mode,
|
11554
11554
|
icons: e.icons,
|
11555
11555
|
key: J,
|
11556
|
-
element:
|
11556
|
+
element: V,
|
11557
11557
|
selectedElement: a.selectedElement,
|
11558
11558
|
hoveredElement: a.hoveredElement,
|
11559
11559
|
onSelectElement: A,
|
11560
11560
|
onHoverElement: I,
|
11561
|
-
onUpdateText:
|
11561
|
+
onUpdateText: H,
|
11562
11562
|
onBlockAction: oe,
|
11563
|
-
onAddIcon:
|
11564
|
-
onUpload:
|
11563
|
+
onAddIcon: ye,
|
11564
|
+
onUpload: S
|
11565
11565
|
}, null, 8, ["mode", "icons", "element", "selectedElement", "hoveredElement"]))), 128)),
|
11566
|
-
a.element.type === Ne(
|
11567
|
-
|
11566
|
+
a.element.type === Ne(ee).Block ? (M(), U(Ht, { key: 1 }, [
|
11567
|
+
x("span", {
|
11568
11568
|
class: "iconfont icon-a-tianjiaxian icon_gray_add",
|
11569
|
-
onClick: he(
|
11569
|
+
onClick: he(k, ["stop"]),
|
11570
11570
|
contenteditable: "false"
|
11571
11571
|
}),
|
11572
|
-
|
11572
|
+
x("div", {
|
11573
11573
|
class: "cont_aidition",
|
11574
11574
|
contenteditable: "false",
|
11575
11575
|
onClick: D[0] || (D[0] = he(() => {
|
11576
11576
|
}, ["stop"]))
|
11577
11577
|
}, [
|
11578
|
-
|
11578
|
+
x("span", {
|
11579
11579
|
onClick: he(g, ["stop"]),
|
11580
11580
|
class: "iconfont icon-paiqian"
|
11581
11581
|
}),
|
11582
|
-
|
11583
|
-
onClick: he(
|
11582
|
+
x("span", {
|
11583
|
+
onClick: he(B, ["stop"]),
|
11584
11584
|
class: "iconfont icon-paihou"
|
11585
11585
|
}),
|
11586
|
-
|
11587
|
-
onClick: he(
|
11586
|
+
x("span", {
|
11587
|
+
onClick: he(Q, ["stop"]),
|
11588
11588
|
class: "iconfont icon-shanchu"
|
11589
11589
|
}),
|
11590
|
-
|
11591
|
-
onClick: he(
|
11590
|
+
x("span", {
|
11591
|
+
onClick: he(k, ["stop"]),
|
11592
11592
|
class: "iconfont icon-a-tianjiaxian"
|
11593
11593
|
})
|
11594
11594
|
])
|
11595
|
-
], 64)) :
|
11596
|
-
], 64)) :
|
11595
|
+
], 64)) : $("", !0)
|
11596
|
+
], 64)) : $("", !0)
|
11597
11597
|
]),
|
11598
11598
|
_: 1
|
11599
11599
|
}, 16, ["class", "contenteditable"])),
|
11600
|
-
a.element.type == Ne(
|
11601
|
-
a.element.type === Ne(
|
11600
|
+
a.element.type == Ne(ee).Text && o.value ? (M(), U("div", Nf, ve(c.value), 1)) : $("", !0),
|
11601
|
+
a.element.type === Ne(ee).Image ? (M(), U("div", {
|
11602
11602
|
key: 1,
|
11603
11603
|
class: "absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",
|
11604
11604
|
onClick: D[3] || (D[3] = he(() => {
|
11605
11605
|
}, ["stop"]))
|
11606
11606
|
}, [
|
11607
|
-
D[7] || (D[7] =
|
11607
|
+
D[7] || (D[7] = x("span", {
|
11608
11608
|
contenteditable: "false",
|
11609
11609
|
class: "cursor-pointer"
|
11610
11610
|
}, "上传图片", -1)),
|
11611
11611
|
lt(od, {
|
11612
|
-
customUpload: (
|
11612
|
+
customUpload: (V) => Re(V, a.element),
|
11613
11613
|
height: a.element.rule.maxImageHeight,
|
11614
11614
|
width: a.element.rule.minImageWidth,
|
11615
11615
|
uploadByImage: R
|
11616
11616
|
}, null, 8, ["customUpload", "height", "width"])
|
11617
|
-
])) :
|
11618
|
-
a.element.type === Ne(
|
11617
|
+
])) : $("", !0),
|
11618
|
+
a.element.type === Ne(ee).Icon ? (M(), U("div", {
|
11619
11619
|
key: 2,
|
11620
11620
|
class: "absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",
|
11621
11621
|
onClick: D[5] || (D[5] = he(() => {
|
11622
11622
|
}, ["stop"]))
|
11623
11623
|
}, [
|
11624
|
-
|
11625
|
-
onClick: D[4] || (D[4] = he((
|
11624
|
+
x("span", {
|
11625
|
+
onClick: D[4] || (D[4] = he((V) => Ae(), ["stop"])),
|
11626
11626
|
contenteditable: "false",
|
11627
11627
|
class: "cursor-pointer"
|
11628
11628
|
}, "选择图标")
|
11629
|
-
])) :
|
11629
|
+
])) : $("", !0),
|
11630
11630
|
lt(rd, {
|
11631
11631
|
icons: e.icons,
|
11632
11632
|
ref_key: "iconRef",
|
@@ -11636,12 +11636,12 @@ const Jd = {
|
|
11636
11636
|
lt(gf, {
|
11637
11637
|
ref_key: "cropperRef",
|
11638
11638
|
ref: ge,
|
11639
|
-
onOk: D[6] || (D[6] = (
|
11639
|
+
onOk: D[6] || (D[6] = (V) => S(V, a.element))
|
11640
11640
|
}, null, 512)
|
11641
11641
|
], 64);
|
11642
11642
|
};
|
11643
11643
|
}
|
11644
|
-
}), Cf = /* @__PURE__ */
|
11644
|
+
}), Cf = /* @__PURE__ */ Rt(If, [["__scopeId", "data-v-4e2cbd1e"]]), Sf = Ge({
|
11645
11645
|
name: "GpCheckbox",
|
11646
11646
|
props: {
|
11647
11647
|
modelValue: {
|
@@ -11663,20 +11663,20 @@ const Jd = {
|
|
11663
11663
|
}
|
11664
11664
|
}), xf = { class: "form-group" }, Of = { class: "flex items-center space-x-2 cursor-pointer" }, Df = ["checked", "aria-checked"], Lf = { class: "checkbox-label text-sm text-gray-700" };
|
11665
11665
|
function vf(e, t, a, i, s, u) {
|
11666
|
-
return
|
11667
|
-
|
11668
|
-
|
11666
|
+
return M(), U("div", xf, [
|
11667
|
+
x("label", Of, [
|
11668
|
+
x("input", {
|
11669
11669
|
type: "checkbox",
|
11670
11670
|
checked: e.modelValue,
|
11671
11671
|
onChange: t[0] || (t[0] = (...r) => e.updateValue && e.updateValue(...r)),
|
11672
11672
|
class: "custom-checkbox",
|
11673
11673
|
"aria-checked": e.modelValue
|
11674
11674
|
}, null, 40, Df),
|
11675
|
-
|
11675
|
+
x("span", Lf, ve(e.label), 1)
|
11676
11676
|
])
|
11677
11677
|
]);
|
11678
11678
|
}
|
11679
|
-
const fa = /* @__PURE__ */
|
11679
|
+
const fa = /* @__PURE__ */ Rt(Sf, [["render", vf], ["__scopeId", "data-v-68b8f276"]]), yf = Ge({
|
11680
11680
|
name: "GpMessage",
|
11681
11681
|
props: {
|
11682
11682
|
message: {
|
@@ -11705,7 +11705,7 @@ const fa = /* @__PURE__ */ yt(Sf, [["render", vf], ["__scopeId", "data-v-68b8f27
|
|
11705
11705
|
}
|
11706
11706
|
},
|
11707
11707
|
setup(e) {
|
11708
|
-
const t =
|
11708
|
+
const t = K(!1), a = Ke(
|
11709
11709
|
() => ({
|
11710
11710
|
success: "bg-green-100 text-green-800",
|
11711
11711
|
error: "bg-red-100 text-red-800",
|
@@ -11723,7 +11723,7 @@ const fa = /* @__PURE__ */ yt(Sf, [["render", vf], ["__scopeId", "data-v-68b8f27
|
|
11723
11723
|
closeMessage: i
|
11724
11724
|
};
|
11725
11725
|
}
|
11726
|
-
}),
|
11726
|
+
}), Rf = {
|
11727
11727
|
key: 0,
|
11728
11728
|
class: "gp-message"
|
11729
11729
|
}, Mf = {
|
@@ -11743,32 +11743,32 @@ const fa = /* @__PURE__ */ yt(Sf, [["render", vf], ["__scopeId", "data-v-68b8f27
|
|
11743
11743
|
class: "text-yellow-500"
|
11744
11744
|
};
|
11745
11745
|
function Uf(e, t, a, i, s, u) {
|
11746
|
-
return
|
11746
|
+
return M(), xt(Uu, { name: "fade" }, {
|
11747
11747
|
default: Js(() => [
|
11748
|
-
e.visible ? (
|
11749
|
-
|
11748
|
+
e.visible ? (M(), U("div", Rf, [
|
11749
|
+
x("div", {
|
11750
11750
|
class: Da([e.typeClass, "message-content"])
|
11751
11751
|
}, [
|
11752
|
-
e.icon ? (
|
11752
|
+
e.icon ? (M(), U("span", Mf, [
|
11753
11753
|
Fu(e.$slots, "icon", {}, () => [
|
11754
|
-
e.type === "success" ? (
|
11755
|
-
e.type === "error" ? (
|
11756
|
-
e.type === "info" ? (
|
11757
|
-
e.type === "warning" ? (
|
11754
|
+
e.type === "success" ? (M(), U("span", Pf, "✔")) : $("", !0),
|
11755
|
+
e.type === "error" ? (M(), U("span", kf, "✖")) : $("", !0),
|
11756
|
+
e.type === "info" ? (M(), U("span", wf, "ℹ")) : $("", !0),
|
11757
|
+
e.type === "warning" ? (M(), U("span", Bf, "⚠")) : $("", !0)
|
11758
11758
|
], !0)
|
11759
|
-
])) :
|
11760
|
-
|
11761
|
-
|
11759
|
+
])) : $("", !0),
|
11760
|
+
x("span", null, ve(e.message), 1),
|
11761
|
+
x("button", {
|
11762
11762
|
class: "close-btn hover:text-gray-800 font-bold",
|
11763
11763
|
onClick: t[0] || (t[0] = (...r) => e.closeMessage && e.closeMessage(...r))
|
11764
11764
|
}, " × ")
|
11765
11765
|
], 2)
|
11766
|
-
])) :
|
11766
|
+
])) : $("", !0)
|
11767
11767
|
]),
|
11768
11768
|
_: 3
|
11769
11769
|
});
|
11770
11770
|
}
|
11771
|
-
const Ff = /* @__PURE__ */
|
11771
|
+
const Ff = /* @__PURE__ */ Rt(yf, [["render", Uf], ["__scopeId", "data-v-56476f4c"]]), St = Hu([]);
|
11772
11772
|
let ei = null;
|
11773
11773
|
const Hf = () => {
|
11774
11774
|
const e = document.createElement("div");
|
@@ -11863,7 +11863,7 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
11863
11863
|
},
|
11864
11864
|
emits: ["updateElement"],
|
11865
11865
|
setup(e, { emit: t }) {
|
11866
|
-
const a = e, i = t, s =
|
11866
|
+
const a = e, i = t, s = K({ rule: {}, ...a.element });
|
11867
11867
|
ot(
|
11868
11868
|
() => a.element,
|
11869
11869
|
(r) => {
|
@@ -11872,23 +11872,23 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
11872
11872
|
{ immediate: !0 }
|
11873
11873
|
);
|
11874
11874
|
function u() {
|
11875
|
-
if (s.value.type ===
|
11875
|
+
if (s.value.type === ee.Icon && !s.value.attrs.class.includes("iconfont")) {
|
11876
11876
|
ue.error("Icon 支持 iconfont 图标");
|
11877
11877
|
return;
|
11878
11878
|
}
|
11879
|
-
if (s.value.type ===
|
11879
|
+
if (s.value.type === ee.Image && s.value.tag !== "img") {
|
11880
11880
|
ue.error("节点类型错误");
|
11881
11881
|
return;
|
11882
11882
|
}
|
11883
|
-
if (s.value.type ===
|
11883
|
+
if (s.value.type === ee.Video && s.value.tag !== "video") {
|
11884
11884
|
ue.error("节点类型错误");
|
11885
11885
|
return;
|
11886
11886
|
}
|
11887
|
-
if (s.value.type ===
|
11887
|
+
if (s.value.type === ee.Link && s.value.tag !== "a") {
|
11888
11888
|
ue.error("节点类型错误");
|
11889
11889
|
return;
|
11890
11890
|
}
|
11891
|
-
if (s.value.type ===
|
11891
|
+
if (s.value.type === ee.Text) {
|
11892
11892
|
if (s.value.rule.minText > s.value.rule.maxText) {
|
11893
11893
|
ue.error("最小文本长度不能大于最大文本长度");
|
11894
11894
|
return;
|
@@ -11898,7 +11898,7 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
11898
11898
|
return;
|
11899
11899
|
}
|
11900
11900
|
}
|
11901
|
-
if (s.value.type ===
|
11901
|
+
if (s.value.type === ee.Block) {
|
11902
11902
|
if (s.value.rule.minBlock > s.value.rule.maxBlock) {
|
11903
11903
|
ue.error("最小块数量不能大于最大块数量");
|
11904
11904
|
return;
|
@@ -11910,107 +11910,107 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
11910
11910
|
}
|
11911
11911
|
i("updateElement", s.value), ue.success("保存成功");
|
11912
11912
|
}
|
11913
|
-
return (r, o) => (
|
11914
|
-
s.value ? (
|
11915
|
-
s.value.text !== void 0 ? (
|
11916
|
-
o[11] || (o[11] =
|
11917
|
-
|
11918
|
-
])) :
|
11919
|
-
|
11920
|
-
o[12] || (o[12] =
|
11921
|
-
|
11913
|
+
return (r, o) => (M(), U("div", null, [
|
11914
|
+
s.value ? (M(), U("div", Vf, [
|
11915
|
+
s.value.text !== void 0 ? (M(), U("div", Wf, [
|
11916
|
+
o[11] || (o[11] = x("label", { class: "block" }, "内容", -1)),
|
11917
|
+
x("div", $f, ve(s.value.text || "-"), 1)
|
11918
|
+
])) : $("", !0),
|
11919
|
+
x("div", null, [
|
11920
|
+
o[12] || (o[12] = x("label", { class: "block mt-4" }, "节点", -1)),
|
11921
|
+
x("div", Xf, ve(s.value.xpath), 1)
|
11922
11922
|
]),
|
11923
|
-
|
11924
|
-
o[14] || (o[14] =
|
11925
|
-
st(
|
11923
|
+
x("div", null, [
|
11924
|
+
o[14] || (o[14] = x("label", { class: "block mt-4" }, "类型", -1)),
|
11925
|
+
st(x("select", {
|
11926
11926
|
"onUpdate:modelValue": o[0] || (o[0] = (c) => s.value.type = c),
|
11927
11927
|
class: "border rounded p-1 w-full"
|
11928
11928
|
}, o[13] || (o[13] = [
|
11929
|
-
|
11930
|
-
|
11931
|
-
|
11932
|
-
|
11933
|
-
|
11934
|
-
|
11935
|
-
|
11929
|
+
x("option", { value: 0 }, "无", -1),
|
11930
|
+
x("option", { value: 1 }, "文本", -1),
|
11931
|
+
x("option", { value: 2 }, "图片", -1),
|
11932
|
+
x("option", { value: 3 }, "视频", -1),
|
11933
|
+
x("option", { value: 4 }, "图标", -1),
|
11934
|
+
x("option", { value: 5 }, "链接", -1),
|
11935
|
+
x("option", { value: 10 }, "块", -1)
|
11936
11936
|
]), 512), [
|
11937
11937
|
[qu, s.value.type]
|
11938
11938
|
])
|
11939
11939
|
]),
|
11940
|
-
s.value.type == Ne(
|
11941
|
-
o[15] || (o[15] =
|
11942
|
-
st(
|
11940
|
+
s.value.type == Ne(ee).Text ? (M(), U("div", Gf, [
|
11941
|
+
o[15] || (o[15] = x("label", { class: "block mt-4" }, "最小文本长度", -1)),
|
11942
|
+
st(x("input", {
|
11943
11943
|
"onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
|
11944
11944
|
class: "border rounded p-1 w-full"
|
11945
11945
|
}, null, 512), [
|
11946
11946
|
[pt, s.value.rule.minText]
|
11947
11947
|
])
|
11948
|
-
])) :
|
11949
|
-
s.value.type == Ne(
|
11950
|
-
o[16] || (o[16] =
|
11951
|
-
st(
|
11948
|
+
])) : $("", !0),
|
11949
|
+
s.value.type == Ne(ee).Text ? (M(), U("div", Qf, [
|
11950
|
+
o[16] || (o[16] = x("label", { class: "block mt-4" }, "最大文本长度", -1)),
|
11951
|
+
st(x("input", {
|
11952
11952
|
"onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
|
11953
11953
|
class: "border rounded p-1 w-full"
|
11954
11954
|
}, null, 512), [
|
11955
11955
|
[pt, s.value.rule.maxText]
|
11956
11956
|
])
|
11957
|
-
])) :
|
11958
|
-
s.value.type == Ne(
|
11959
|
-
o[17] || (o[17] =
|
11957
|
+
])) : $("", !0),
|
11958
|
+
s.value.type == Ne(ee).Image ? (M(), U("div", jf, [
|
11959
|
+
o[17] || (o[17] = x("label", { class: "block mt-4" }, "是否裁剪", -1)),
|
11960
11960
|
lt(fa, {
|
11961
11961
|
class: "py-2",
|
11962
11962
|
modelValue: s.value.rule.crop,
|
11963
11963
|
"onUpdate:modelValue": o[3] || (o[3] = (c) => s.value.rule.crop = c),
|
11964
11964
|
label: "是"
|
11965
11965
|
}, null, 8, ["modelValue"])
|
11966
|
-
])) :
|
11967
|
-
s.value.type == Ne(
|
11968
|
-
o[18] || (o[18] =
|
11969
|
-
st(
|
11966
|
+
])) : $("", !0),
|
11967
|
+
s.value.type == Ne(ee).Image ? (M(), U("div", zf, [
|
11968
|
+
o[18] || (o[18] = x("label", { class: "block mt-4" }, "图片宽度", -1)),
|
11969
|
+
st(x("input", {
|
11970
11970
|
"onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
|
11971
11971
|
class: "border rounded p-1 w-full"
|
11972
11972
|
}, null, 512), [
|
11973
11973
|
[pt, s.value.rule.minImageWidth]
|
11974
11974
|
])
|
11975
|
-
])) :
|
11976
|
-
s.value.type == Ne(
|
11977
|
-
o[19] || (o[19] =
|
11978
|
-
st(
|
11975
|
+
])) : $("", !0),
|
11976
|
+
s.value.type == Ne(ee).Image ? (M(), U("div", Kf, [
|
11977
|
+
o[19] || (o[19] = x("label", { class: "block mt-4" }, "图片高度", -1)),
|
11978
|
+
st(x("input", {
|
11979
11979
|
"onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
|
11980
11980
|
class: "border rounded p-1 w-full"
|
11981
11981
|
}, null, 512), [
|
11982
11982
|
[pt, s.value.rule.maxImageHeight]
|
11983
11983
|
])
|
11984
|
-
])) :
|
11985
|
-
s.value.type == Ne(
|
11986
|
-
o[20] || (o[20] =
|
11987
|
-
st(
|
11984
|
+
])) : $("", !0),
|
11985
|
+
s.value.type == Ne(ee).Block ? (M(), U("div", Zf, [
|
11986
|
+
o[20] || (o[20] = x("label", { class: "block mt-4" }, "块最小数量", -1)),
|
11987
|
+
st(x("input", {
|
11988
11988
|
"onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
|
11989
11989
|
class: "border rounded p-1 w-full"
|
11990
11990
|
}, null, 512), [
|
11991
11991
|
[pt, s.value.rule.minBlock]
|
11992
11992
|
])
|
11993
|
-
])) :
|
11994
|
-
s.value.type == Ne(
|
11995
|
-
o[21] || (o[21] =
|
11996
|
-
st(
|
11993
|
+
])) : $("", !0),
|
11994
|
+
s.value.type == Ne(ee).Block ? (M(), U("div", Jf, [
|
11995
|
+
o[21] || (o[21] = x("label", { class: "block mt-4" }, "块最大数量", -1)),
|
11996
|
+
st(x("input", {
|
11997
11997
|
"onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
|
11998
11998
|
class: "border rounded p-1 w-full"
|
11999
11999
|
}, null, 512), [
|
12000
12000
|
[pt, s.value.rule.maxBlock]
|
12001
12001
|
])
|
12002
|
-
])) :
|
12003
|
-
s.value.type == Ne(
|
12004
|
-
o[22] || (o[22] =
|
12002
|
+
])) : $("", !0),
|
12003
|
+
s.value.type == Ne(ee).Text || s.value.type == Ne(ee).Icon ? (M(), U("div", e1, [
|
12004
|
+
o[22] || (o[22] = x("label", { class: "block mt-4" }, "主题色", -1)),
|
12005
12005
|
lt(fa, {
|
12006
12006
|
class: "py-2",
|
12007
12007
|
modelValue: s.value.rule.isThemeColor,
|
12008
12008
|
"onUpdate:modelValue": o[8] || (o[8] = (c) => s.value.rule.isThemeColor = c),
|
12009
12009
|
label: "是"
|
12010
12010
|
}, null, 8, ["modelValue"])
|
12011
|
-
])) :
|
12012
|
-
|
12013
|
-
o[23] || (o[23] =
|
12011
|
+
])) : $("", !0),
|
12012
|
+
x("div", null, [
|
12013
|
+
o[23] || (o[23] = x("label", { class: "block mt-4" }, "是否必填", -1)),
|
12014
12014
|
lt(fa, {
|
12015
12015
|
class: "py-2",
|
12016
12016
|
modelValue: s.value.rule.isRequired,
|
@@ -12018,8 +12018,8 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
12018
12018
|
label: "是"
|
12019
12019
|
}, null, 8, ["modelValue"])
|
12020
12020
|
]),
|
12021
|
-
|
12022
|
-
o[24] || (o[24] =
|
12021
|
+
x("div", null, [
|
12022
|
+
o[24] || (o[24] = x("label", { class: "block mt-4" }, "是否只读", -1)),
|
12023
12023
|
lt(fa, {
|
12024
12024
|
class: "py-2",
|
12025
12025
|
modelValue: s.value.rule.isReadOnly,
|
@@ -12027,17 +12027,26 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
12027
12027
|
label: "是"
|
12028
12028
|
}, null, 8, ["modelValue"])
|
12029
12029
|
])
|
12030
|
-
])) :
|
12031
|
-
|
12030
|
+
])) : $("", !0),
|
12031
|
+
x("button", {
|
12032
12032
|
onClick: u,
|
12033
12033
|
class: "mt-4 p-2 bg-green-500 text-white rounded"
|
12034
12034
|
}, " 保存 ")
|
12035
12035
|
]));
|
12036
12036
|
}
|
12037
|
-
}), a1 = /* @__PURE__ */
|
12037
|
+
}), a1 = /* @__PURE__ */ Rt(t1, [["__scopeId", "data-v-1a7da1b9"]]), i1 = { class: "flex" }, s1 = {
|
12038
|
+
key: 0,
|
12039
|
+
class: "text-lg font-bold border-b p-2"
|
12040
|
+
}, n1 = { class: "text-sm font-thin text-gray-500" }, u1 = ["innerHTML"], r1 = ["innerHTML"], o1 = { class: "flex-1" }, c1 = {
|
12041
|
+
key: 0,
|
12042
|
+
class: "text-lg font-bold border-b p-2"
|
12043
|
+
}, l1 = { class: "p-2" }, h1 = {
|
12038
12044
|
key: 0,
|
12039
12045
|
class: "text-red-500 text-xs mt-2"
|
12040
|
-
},
|
12046
|
+
}, d1 = {
|
12047
|
+
key: 0,
|
12048
|
+
class: "text-lg font-bold border-b p-2"
|
12049
|
+
}, f1 = { class: "text-sm font-thin text-gray-500" }, E1 = { class: "p-2" }, m1 = /* @__PURE__ */ Ge({
|
12041
12050
|
__name: "Designer",
|
12042
12051
|
props: {
|
12043
12052
|
mode: { default: "design" },
|
@@ -12046,74 +12055,76 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
12046
12055
|
previewWidth: { default: 375 },
|
12047
12056
|
uploadByFile: {},
|
12048
12057
|
icons: {},
|
12049
|
-
rules: {}
|
12058
|
+
rules: {},
|
12059
|
+
preview: { type: Boolean, default: !0 },
|
12060
|
+
showTitle: { type: Boolean, default: !0 }
|
12050
12061
|
},
|
12051
12062
|
emits: ["update:modelValue", "update:element"],
|
12052
12063
|
setup(e, { emit: t }) {
|
12053
|
-
const a = e, i = t, s =
|
12054
|
-
ot(() => a.template, (
|
12055
|
-
s.value =
|
12056
|
-
}, { immediate: !0 }), ot(() => s.value, (
|
12057
|
-
|
12058
|
-
}, { immediate: !0 }), ot(() => a.css, (
|
12059
|
-
|
12064
|
+
const a = e, i = t, s = K(a.template);
|
12065
|
+
ot(() => a.template, (S) => {
|
12066
|
+
s.value = S;
|
12067
|
+
}, { immediate: !0 }), ot(() => s.value, (S) => {
|
12068
|
+
S && (r.value = G(S));
|
12069
|
+
}, { immediate: !0 }), ot(() => a.css, (S) => {
|
12070
|
+
S.forEach((R) => {
|
12060
12071
|
if (document.querySelector(`link[href="${R}"]`))
|
12061
12072
|
return;
|
12062
12073
|
const O = document.createElement("link");
|
12063
12074
|
O.rel = "stylesheet", O.href = R, document.head.appendChild(O);
|
12064
12075
|
});
|
12065
12076
|
}, { immediate: !0 });
|
12066
|
-
const u =
|
12067
|
-
ot(() => r.value, (
|
12068
|
-
|
12077
|
+
const u = K(a.mode), r = K();
|
12078
|
+
ot(() => r.value, (S) => {
|
12079
|
+
S && i("update:element", S);
|
12069
12080
|
}, { immediate: !0 });
|
12070
|
-
const o =
|
12081
|
+
const o = K("");
|
12071
12082
|
let c = Ms("", {}, !1);
|
12072
|
-
ot(() => o.value, (
|
12073
|
-
i("update:modelValue",
|
12083
|
+
ot(() => o.value, (S) => {
|
12084
|
+
i("update:modelValue", S);
|
12074
12085
|
}, { immediate: !0 });
|
12075
|
-
const h =
|
12076
|
-
function T(
|
12077
|
-
console.log("选择",
|
12086
|
+
const h = K(), f = K(), m = K("");
|
12087
|
+
function T(S) {
|
12088
|
+
console.log("选择", S), h.value = S;
|
12078
12089
|
}
|
12079
|
-
function A(
|
12090
|
+
function A(S, R = "") {
|
12080
12091
|
if (R) {
|
12081
12092
|
const O = I(r.value, R);
|
12082
|
-
O ? f.value = O : f.value =
|
12093
|
+
O ? f.value = O : f.value = S;
|
12083
12094
|
} else
|
12084
|
-
f.value =
|
12095
|
+
f.value = S;
|
12085
12096
|
}
|
12086
|
-
function I(
|
12087
|
-
if (
|
12088
|
-
return
|
12089
|
-
if (
|
12090
|
-
for (const O of
|
12097
|
+
function I(S, R) {
|
12098
|
+
if (S.xpath === R)
|
12099
|
+
return S;
|
12100
|
+
if (S.children && S.children.length)
|
12101
|
+
for (const O of S.children) {
|
12091
12102
|
const D = I(O, R);
|
12092
12103
|
if (D)
|
12093
12104
|
return D;
|
12094
12105
|
}
|
12095
12106
|
}
|
12096
|
-
function L(
|
12097
|
-
var R, O, D,
|
12098
|
-
if (console.log(
|
12099
|
-
if (h.value.rule =
|
12100
|
-
const
|
12101
|
-
|
12107
|
+
function L(S) {
|
12108
|
+
var R, O, D, Y;
|
12109
|
+
if (console.log(S, h.value), h.value)
|
12110
|
+
if (h.value.rule = S.rule, h.value.type = S.type, (R = S.rule) != null && R.isThemeColor ? (S.attrs.class += "theme_color", S.attrs.style && (S.attrs.style = void 0)) : (console.log("e111", (O = S.attrs.class) == null ? void 0 : O.includes("theme_color")), (D = S.attrs.class) != null && D.includes("theme_color") && (S.attrs.class = S.attrs.class.replace("theme_color", " "))), h.value.type === ee.Block) {
|
12111
|
+
const V = I(r.value, h.value.parentxpath || "");
|
12112
|
+
V && V.children && V.children.forEach((J) => {
|
12102
12113
|
var ne;
|
12103
|
-
J.tag === h.value.tag && (J.rule =
|
12114
|
+
J.tag === h.value.tag && (J.rule = S.rule, J.type = S.type, (ne = J.attrs.class) != null && ne.includes(" mb40 relative") || (J.attrs.class += " mb40 relative"));
|
12104
12115
|
});
|
12105
12116
|
} else
|
12106
|
-
(
|
12117
|
+
(Y = h.value.attrs.class) != null && Y.includes(" mb40 relative") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40 relative", " "));
|
12107
12118
|
}
|
12108
|
-
function
|
12109
|
-
o.value =
|
12119
|
+
function P(S) {
|
12120
|
+
o.value = S;
|
12110
12121
|
}
|
12111
|
-
function
|
12112
|
-
c = Ms(
|
12113
|
-
const R = c("body").children().toArray().map((O) =>
|
12122
|
+
function G(S) {
|
12123
|
+
c = Ms(S);
|
12124
|
+
const R = c("body").children().toArray().map((O) => F(c(O)));
|
12114
12125
|
return o.value = c("body").html() || "", R[0];
|
12115
12126
|
}
|
12116
|
-
function
|
12127
|
+
function F(S, R = "") {
|
12117
12128
|
var J;
|
12118
12129
|
function O(ne) {
|
12119
12130
|
if (!ne || !ne[0]) return "";
|
@@ -12125,170 +12136,173 @@ const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf
|
|
12125
12136
|
}
|
12126
12137
|
return "/html/" + ce.join("/");
|
12127
12138
|
}
|
12128
|
-
const D = O(
|
12139
|
+
const D = O(S).replace("/html/body[1]", ""), Y = S.children().toArray().map((ne) => F(c(ne), D)), V = (J = a.rules) == null ? void 0 : J.find((ne) => ne.xpath === D);
|
12129
12140
|
return {
|
12130
|
-
tag:
|
12131
|
-
text:
|
12132
|
-
attrs:
|
12133
|
-
children:
|
12141
|
+
tag: S[0].tagName,
|
12142
|
+
text: S.contents().not(S.children()).text().trim(),
|
12143
|
+
attrs: S[0].attribs,
|
12144
|
+
children: Y,
|
12134
12145
|
xpath: D,
|
12135
12146
|
parentxpath: R,
|
12136
|
-
type: (
|
12137
|
-
rule: (
|
12147
|
+
type: (V == null ? void 0 : V.type) || ee.None,
|
12148
|
+
rule: (V == null ? void 0 : V.rule) || {}
|
12138
12149
|
};
|
12139
12150
|
}
|
12140
|
-
function
|
12141
|
-
console.log("更新子节点的文本",
|
12142
|
-
const R = I(r.value,
|
12143
|
-
R && (R.editText =
|
12151
|
+
function X(S) {
|
12152
|
+
console.log("更新子节点的文本", S);
|
12153
|
+
const R = I(r.value, S.element.xpath);
|
12154
|
+
R && (R.editText = S.newText);
|
12144
12155
|
}
|
12145
|
-
function
|
12146
|
-
function O(D,
|
12156
|
+
function H(S, R = "") {
|
12157
|
+
function O(D, Y) {
|
12147
12158
|
var ne;
|
12148
|
-
const J = (
|
12149
|
-
return `${
|
12159
|
+
const J = (Y ? ((ne = I(r.value, Y)) == null ? void 0 : ne.children) || [] : [r.value]).filter((ce) => ce.tag === D.tag).indexOf(D) + 1;
|
12160
|
+
return `${Y}/${D.tag}[${J}]`;
|
12150
12161
|
}
|
12151
|
-
|
12162
|
+
S.xpath = O(S, R), S.parentxpath = R, (S.children || []).forEach((D) => H(D, S.xpath));
|
12152
12163
|
}
|
12153
|
-
function
|
12154
|
-
console.log("块操作",
|
12164
|
+
function k({ action: S, element: R, newBlock: O }) {
|
12165
|
+
console.log("块操作", S, R, O);
|
12155
12166
|
const D = I(r.value, R.parentxpath || "");
|
12156
12167
|
if (!D || !D.children) return;
|
12157
|
-
const
|
12158
|
-
if (
|
12159
|
-
const
|
12160
|
-
if ((
|
12168
|
+
const Y = D.children.findIndex((ce) => ce === R);
|
12169
|
+
if (Y === -1) return;
|
12170
|
+
const V = D.children.length, { minBlock: J, maxBlock: ne } = R.rule;
|
12171
|
+
if ((S === "add" || S === "copy") && V >= (ne || 1 / 0)) {
|
12161
12172
|
m.value = `无法添加更多块。最大块数量为 ${ne}`, ue.error(m.value);
|
12162
12173
|
return;
|
12163
12174
|
}
|
12164
|
-
switch (
|
12175
|
+
switch (S) {
|
12165
12176
|
case "add":
|
12166
12177
|
if (O) {
|
12167
12178
|
const ce = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
|
12168
|
-
D.children.splice(
|
12179
|
+
D.children.splice(Y + 1, 0, ce);
|
12169
12180
|
}
|
12170
12181
|
break;
|
12171
12182
|
case "copy":
|
12172
12183
|
if (O) {
|
12173
12184
|
const ce = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
|
12174
|
-
D.children.splice(
|
12185
|
+
D.children.splice(Y + 1, 0, ce);
|
12175
12186
|
}
|
12176
12187
|
break;
|
12177
12188
|
case "moveUp":
|
12178
|
-
if (
|
12179
|
-
const [ce] = D.children.splice(
|
12180
|
-
D.children.splice(
|
12189
|
+
if (Y > 0) {
|
12190
|
+
const [ce] = D.children.splice(Y, 1);
|
12191
|
+
D.children.splice(Y - 1, 0, ce);
|
12181
12192
|
}
|
12182
12193
|
break;
|
12183
12194
|
case "moveDown":
|
12184
|
-
if (
|
12185
|
-
const [ce] = D.children.splice(
|
12186
|
-
D.children.splice(
|
12195
|
+
if (Y < D.children.length - 1) {
|
12196
|
+
const [ce] = D.children.splice(Y, 1);
|
12197
|
+
D.children.splice(Y + 1, 0, ce);
|
12187
12198
|
}
|
12188
12199
|
break;
|
12189
12200
|
case "delete":
|
12190
|
-
if (
|
12201
|
+
if (V <= (J || 0)) {
|
12191
12202
|
m.value = `无法删除更多块。最小块数量为 ${J}`, ue.error(m.value);
|
12192
12203
|
return;
|
12193
12204
|
}
|
12194
|
-
D.children.splice(
|
12205
|
+
D.children.splice(Y, 1);
|
12195
12206
|
break;
|
12196
12207
|
}
|
12197
|
-
m.value = "",
|
12208
|
+
m.value = "", H(r.value);
|
12198
12209
|
}
|
12199
|
-
function g(
|
12200
|
-
let O = R.attrs.class.replace(/icon-\S+/g, `icon-${
|
12210
|
+
function g(S, R) {
|
12211
|
+
let O = R.attrs.class.replace(/icon-\S+/g, `icon-${S}`);
|
12201
12212
|
R.attrs.class = O;
|
12202
12213
|
}
|
12203
|
-
function
|
12204
|
-
R.attrs.src =
|
12214
|
+
function B(S, R) {
|
12215
|
+
R.attrs.src = S;
|
12205
12216
|
}
|
12206
|
-
const
|
12207
|
-
let Ae =
|
12208
|
-
function ge(
|
12209
|
-
Ie.value =
|
12217
|
+
const Q = K(a.previewWidth), oe = K(375);
|
12218
|
+
let Ae = K(!1), Ie = K(""), ye = 0, be = 0;
|
12219
|
+
function ge(S) {
|
12220
|
+
Ie.value = S, Ae.value = !0, ye = event.clientX, S === "preview" ? be = Q.value : S === "structure" && (be = oe.value), window.addEventListener("mousemove", se), window.addEventListener("mouseup", Re);
|
12210
12221
|
}
|
12211
|
-
function se(
|
12222
|
+
function se(S) {
|
12212
12223
|
if (!Ae.value) return;
|
12213
|
-
const R =
|
12214
|
-
Ie.value === "preview" ?
|
12224
|
+
const R = S.clientX - ye;
|
12225
|
+
Ie.value === "preview" ? Q.value = Math.max(200, be + R) : Ie.value === "structure" && (oe.value = Math.max(200, be - R));
|
12215
12226
|
}
|
12216
|
-
function
|
12217
|
-
Ae.value = !1, Ie.value = "", window.removeEventListener("mousemove", se), window.removeEventListener("mouseup",
|
12227
|
+
function Re() {
|
12228
|
+
Ae.value = !1, Ie.value = "", window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", Re);
|
12218
12229
|
}
|
12219
|
-
return (
|
12220
|
-
S("div", {
|
12230
|
+
return (S, R) => (M(), U("div", i1, [
|
12231
|
+
S.preview ? (M(), U("div", {
|
12232
|
+
key: 0,
|
12221
12233
|
class: "border-l overflow-auto resize-area",
|
12222
|
-
style: ts({ width:
|
12234
|
+
style: ts({ width: Q.value + "px" })
|
12223
12235
|
}, [
|
12224
|
-
S("h2", s1, [
|
12236
|
+
S.showTitle ? (M(), U("h2", s1, [
|
12225
12237
|
R[2] || (R[2] = ti("实时预览 ")),
|
12226
|
-
|
12227
|
-
]),
|
12228
|
-
|
12229
|
-
o.value ? (
|
12238
|
+
x("span", n1, ve(Q.value) + "px", 1)
|
12239
|
+
])) : $("", !0),
|
12240
|
+
x("div", null, [
|
12241
|
+
o.value ? (M(), U("div", {
|
12230
12242
|
key: 0,
|
12231
12243
|
innerHTML: o.value
|
12232
|
-
}, null, 8, u1)) : (
|
12244
|
+
}, null, 8, u1)) : (M(), U("div", {
|
12233
12245
|
key: 1,
|
12234
12246
|
innerHTML: Ne(c)("body").html()
|
12235
12247
|
}, null, 8, r1))
|
12236
12248
|
])
|
12237
|
-
], 4),
|
12238
|
-
S("div", {
|
12249
|
+
], 4)) : $("", !0),
|
12250
|
+
S.preview ? (M(), U("div", {
|
12251
|
+
key: 1,
|
12239
12252
|
class: "resizer",
|
12240
12253
|
onMousedown: R[0] || (R[0] = (O) => ge("preview"))
|
12241
|
-
}, null, 32),
|
12242
|
-
|
12243
|
-
|
12244
|
-
|
12245
|
-
m.value ? (
|
12246
|
-
r.value ? (
|
12254
|
+
}, null, 32)) : $("", !0),
|
12255
|
+
x("div", o1, [
|
12256
|
+
S.showTitle ? (M(), U("h2", c1, "结构渲染")) : $("", !0),
|
12257
|
+
x("div", l1, [
|
12258
|
+
m.value ? (M(), U("div", h1, ve(m.value), 1)) : $("", !0),
|
12259
|
+
r.value ? (M(), xt(Cf, {
|
12247
12260
|
key: 1,
|
12248
|
-
mode:
|
12249
|
-
icons:
|
12261
|
+
mode: S.mode,
|
12262
|
+
icons: S.icons,
|
12250
12263
|
element: r.value,
|
12251
12264
|
selectedElement: h.value,
|
12252
12265
|
hoveredElement: f.value,
|
12253
12266
|
onSelectElement: T,
|
12254
12267
|
onHoverElement: A,
|
12255
|
-
onContentUpdated:
|
12256
|
-
onUpdateText:
|
12257
|
-
onBlockAction:
|
12268
|
+
onContentUpdated: P,
|
12269
|
+
onUpdateText: X,
|
12270
|
+
onBlockAction: k,
|
12258
12271
|
onAddIcon: g,
|
12259
|
-
onUpload:
|
12260
|
-
}, null, 8, ["mode", "icons", "element", "selectedElement", "hoveredElement"])) :
|
12272
|
+
onUpload: B
|
12273
|
+
}, null, 8, ["mode", "icons", "element", "selectedElement", "hoveredElement"])) : $("", !0)
|
12261
12274
|
])
|
12262
12275
|
]),
|
12263
|
-
|
12276
|
+
u.value == "design" ? (M(), U("div", {
|
12277
|
+
key: 2,
|
12264
12278
|
class: "resizer",
|
12265
12279
|
onMousedown: R[1] || (R[1] = (O) => ge("structure"))
|
12266
|
-
}, null, 32),
|
12267
|
-
u.value == "design" ? (
|
12268
|
-
key:
|
12280
|
+
}, null, 32)) : $("", !0),
|
12281
|
+
u.value == "design" ? (M(), U("div", {
|
12282
|
+
key: 3,
|
12269
12283
|
class: "resize-area overflow-auto",
|
12270
12284
|
style: ts({ width: oe.value + "px" })
|
12271
12285
|
}, [
|
12272
|
-
S("h2",
|
12273
|
-
R[
|
12274
|
-
|
12275
|
-
]),
|
12276
|
-
|
12277
|
-
h.value ? (
|
12286
|
+
S.showTitle ? (M(), U("h2", d1, [
|
12287
|
+
R[3] || (R[3] = ti("节点属性 ")),
|
12288
|
+
x("span", f1, ve(oe.value) + "px", 1)
|
12289
|
+
])) : $("", !0),
|
12290
|
+
x("div", E1, [
|
12291
|
+
h.value ? (M(), xt(a1, {
|
12278
12292
|
key: 0,
|
12279
12293
|
element: h.value,
|
12280
12294
|
onUpdateElement: L
|
12281
|
-
}, null, 8, ["element"])) :
|
12295
|
+
}, null, 8, ["element"])) : $("", !0)
|
12282
12296
|
])
|
12283
|
-
], 4)) :
|
12297
|
+
], 4)) : $("", !0)
|
12284
12298
|
]));
|
12285
12299
|
}
|
12286
|
-
}),
|
12300
|
+
}), T1 = /* @__PURE__ */ Rt(m1, [["__scopeId", "data-v-84392fe5"]]), N1 = {
|
12287
12301
|
install(e) {
|
12288
|
-
e.component("Designer",
|
12302
|
+
e.component("Designer", T1);
|
12289
12303
|
}
|
12290
12304
|
};
|
12291
12305
|
export {
|
12292
|
-
|
12293
|
-
|
12306
|
+
T1 as Designer,
|
12307
|
+
N1 as default
|
12294
12308
|
};
|