gp-designer 1.0.11 → 1.0.13
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 +932 -904
- package/dist/gp-designer.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gp-designer.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent as Ge, computed as Ke, openBlock as B, createElementBlock as V, normalizeClass as
|
1
|
+
import { defineComponent as Ge, computed as Ke, openBlock as B, createElementBlock as V, normalizeClass as Da, ref as z, watch as ot, createElementVNode as S, withModifiers as he, Fragment as Ht, renderList as js, createBlock as xt, createCommentVNode as K, mergeProps as zs, toDisplayString as we, resolveComponent as Pu, resolveDynamicComponent as ku, withCtx as Ks, createTextVNode as wu, unref as Ne, createVNode as lt, Transition as Bu, renderSlot as Uu, reactive as Fu, createApp as Hu, h as Ji, withDirectives as st, vModelSelect as Yu, vModelText as pt, normalizeStyle as qu } from "vue";
|
2
2
|
var j;
|
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";
|
@@ -52,7 +52,7 @@ let Zs = class {
|
|
52
52
|
return zt(this, t);
|
53
53
|
}
|
54
54
|
};
|
55
|
-
class
|
55
|
+
class Ci extends Zs {
|
56
56
|
/**
|
57
57
|
* @param data The content of the data node
|
58
58
|
*/
|
@@ -70,7 +70,7 @@ class Ii extends Zs {
|
|
70
70
|
this.data = t;
|
71
71
|
}
|
72
72
|
}
|
73
|
-
class jt extends
|
73
|
+
class jt extends Ci {
|
74
74
|
constructor() {
|
75
75
|
super(...arguments), this.type = j.Text;
|
76
76
|
}
|
@@ -78,7 +78,7 @@ class jt extends Ii {
|
|
78
78
|
return 3;
|
79
79
|
}
|
80
80
|
}
|
81
|
-
class Si extends
|
81
|
+
class Si extends Ci {
|
82
82
|
constructor() {
|
83
83
|
super(...arguments), this.type = j.Comment;
|
84
84
|
}
|
@@ -86,7 +86,7 @@ class Si extends Ii {
|
|
86
86
|
return 8;
|
87
87
|
}
|
88
88
|
}
|
89
|
-
class xi extends
|
89
|
+
class xi extends Ci {
|
90
90
|
constructor(t, a) {
|
91
91
|
super(a), this.name = t, this.type = j.Directive;
|
92
92
|
}
|
@@ -176,47 +176,47 @@ class Di extends Oi {
|
|
176
176
|
function k(e) {
|
177
177
|
return Vu(e);
|
178
178
|
}
|
179
|
-
function
|
179
|
+
function La(e) {
|
180
180
|
return e.type === j.CDATA;
|
181
181
|
}
|
182
182
|
function He(e) {
|
183
183
|
return e.type === j.Text;
|
184
184
|
}
|
185
|
-
function
|
185
|
+
function va(e) {
|
186
186
|
return e.type === j.Comment;
|
187
187
|
}
|
188
|
-
function
|
188
|
+
function ti(e) {
|
189
189
|
return e.type === j.Directive;
|
190
190
|
}
|
191
191
|
function at(e) {
|
192
192
|
return e.type === j.Root;
|
193
193
|
}
|
194
|
-
function
|
194
|
+
function Te(e) {
|
195
195
|
return Object.prototype.hasOwnProperty.call(e, "children");
|
196
196
|
}
|
197
197
|
function zt(e, t = !1) {
|
198
198
|
let a;
|
199
199
|
if (He(e))
|
200
200
|
a = new jt(e.data);
|
201
|
-
else if (
|
201
|
+
else if (va(e))
|
202
202
|
a = new Si(e.data);
|
203
203
|
else if (k(e)) {
|
204
|
-
const i = t ?
|
204
|
+
const i = t ? qa(e.children) : [], s = new Di(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
|
-
} else if (
|
207
|
-
const i = t ?
|
206
|
+
} else if (La(e)) {
|
207
|
+
const i = t ? qa(e.children) : [], s = new Js(i);
|
208
208
|
i.forEach((u) => u.parent = s), a = s;
|
209
209
|
} else if (at(e)) {
|
210
|
-
const i = t ?
|
210
|
+
const i = t ? qa(e.children) : [], s = new dt(i);
|
211
211
|
i.forEach((u) => u.parent = s), e["x-mode"] && (s["x-mode"] = e["x-mode"]), a = s;
|
212
|
-
} else if (
|
212
|
+
} else if (ti(e)) {
|
213
213
|
const i = new xi(e.name, e.data);
|
214
214
|
e["x-name"] != null && (i["x-name"] = e["x-name"], i["x-publicId"] = e["x-publicId"], i["x-systemId"] = e["x-systemId"]), a = i;
|
215
215
|
} else
|
216
216
|
throw new Error(`Not implemented yet: ${e.type}`);
|
217
217
|
return a.startIndex = e.startIndex, a.endIndex = e.endIndex, e.sourceCodeLocation != null && (a.sourceCodeLocation = e.sourceCodeLocation), a;
|
218
218
|
}
|
219
|
-
function
|
219
|
+
function qa(e) {
|
220
220
|
const t = e.map((a) => zt(a, !0));
|
221
221
|
for (let a = 1; a < t.length; a++)
|
222
222
|
t[a].prev = t[a - 1], t[a - 1].next = t[a];
|
@@ -308,7 +308,7 @@ const Li = new Uint16Array(
|
|
308
308
|
// prettier-ignore
|
309
309
|
"Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e) => e.charCodeAt(0))
|
310
310
|
);
|
311
|
-
var
|
311
|
+
var Va;
|
312
312
|
const er = /* @__PURE__ */ new Map([
|
313
313
|
[0, 65533],
|
314
314
|
// C1 Unicode control character reference replacements
|
@@ -339,9 +339,9 @@ const er = /* @__PURE__ */ new Map([
|
|
339
339
|
[156, 339],
|
340
340
|
[158, 382],
|
341
341
|
[159, 376]
|
342
|
-
]),
|
342
|
+
]), ai = (
|
343
343
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
|
344
|
-
(
|
344
|
+
(Va = String.fromCodePoint) !== null && Va !== void 0 ? Va : function(e) {
|
345
345
|
let t = "";
|
346
346
|
return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | e & 1023), t += String.fromCharCode(e), t;
|
347
347
|
}
|
@@ -350,42 +350,42 @@ function tr(e) {
|
|
350
350
|
var t;
|
351
351
|
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = er.get(e)) !== null && t !== void 0 ? t : e;
|
352
352
|
}
|
353
|
-
var
|
353
|
+
var me;
|
354
354
|
(function(e) {
|
355
355
|
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
|
356
|
-
})(
|
356
|
+
})(me || (me = {}));
|
357
357
|
const ar = 32;
|
358
358
|
var Ze;
|
359
359
|
(function(e) {
|
360
360
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
361
361
|
})(Ze || (Ze = {}));
|
362
|
-
function
|
363
|
-
return e >=
|
362
|
+
function ii(e) {
|
363
|
+
return e >= me.ZERO && e <= me.NINE;
|
364
364
|
}
|
365
365
|
function ir(e) {
|
366
|
-
return e >=
|
366
|
+
return e >= me.UPPER_A && e <= me.UPPER_F || e >= me.LOWER_A && e <= me.LOWER_F;
|
367
367
|
}
|
368
368
|
function sr(e) {
|
369
|
-
return e >=
|
369
|
+
return e >= me.UPPER_A && e <= me.UPPER_Z || e >= me.LOWER_A && e <= me.LOWER_Z || ii(e);
|
370
370
|
}
|
371
371
|
function nr(e) {
|
372
|
-
return e ===
|
372
|
+
return e === me.EQUALS || sr(e);
|
373
373
|
}
|
374
|
-
var
|
374
|
+
var fe;
|
375
375
|
(function(e) {
|
376
376
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
377
|
-
})(
|
377
|
+
})(fe || (fe = {}));
|
378
378
|
var Pe;
|
379
379
|
(function(e) {
|
380
380
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
381
381
|
})(Pe || (Pe = {}));
|
382
|
-
class
|
382
|
+
class vi {
|
383
383
|
constructor(t, a, i) {
|
384
|
-
this.decodeTree = t, this.emitCodePoint = a, this.errors = i, this.state =
|
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 = Pe.Strict;
|
385
385
|
}
|
386
386
|
/** Resets the instance to make it reusable. */
|
387
387
|
startEntity(t) {
|
388
|
-
this.decodeMode = t, this.state =
|
388
|
+
this.decodeMode = t, this.state = fe.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
389
389
|
}
|
390
390
|
/**
|
391
391
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
@@ -400,15 +400,15 @@ class Ri {
|
|
400
400
|
*/
|
401
401
|
write(t, a) {
|
402
402
|
switch (this.state) {
|
403
|
-
case
|
404
|
-
return t.charCodeAt(a) ===
|
405
|
-
case
|
403
|
+
case fe.EntityStart:
|
404
|
+
return t.charCodeAt(a) === me.NUM ? (this.state = fe.NumericStart, this.consumed += 1, this.stateNumericStart(t, a + 1)) : (this.state = fe.NamedEntity, this.stateNamedEntity(t, a));
|
405
|
+
case fe.NumericStart:
|
406
406
|
return this.stateNumericStart(t, a);
|
407
|
-
case
|
407
|
+
case fe.NumericDecimal:
|
408
408
|
return this.stateNumericDecimal(t, a);
|
409
|
-
case
|
409
|
+
case fe.NumericHex:
|
410
410
|
return this.stateNumericHex(t, a);
|
411
|
-
case
|
411
|
+
case fe.NamedEntity:
|
412
412
|
return this.stateNamedEntity(t, a);
|
413
413
|
}
|
414
414
|
}
|
@@ -422,7 +422,7 @@ class Ri {
|
|
422
422
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
423
423
|
*/
|
424
424
|
stateNumericStart(t, a) {
|
425
|
-
return a >= t.length ? -1 : (t.charCodeAt(a) | ar) ===
|
425
|
+
return a >= t.length ? -1 : (t.charCodeAt(a) | ar) === me.LOWER_X ? (this.state = fe.NumericHex, this.consumed += 1, this.stateNumericHex(t, a + 1)) : (this.state = fe.NumericDecimal, this.stateNumericDecimal(t, a));
|
426
426
|
}
|
427
427
|
addToNumericResult(t, a, i, s) {
|
428
428
|
if (a !== i) {
|
@@ -443,7 +443,7 @@ class Ri {
|
|
443
443
|
const i = a;
|
444
444
|
for (; a < t.length; ) {
|
445
445
|
const s = t.charCodeAt(a);
|
446
|
-
if (
|
446
|
+
if (ii(s) || ir(s))
|
447
447
|
a += 1;
|
448
448
|
else
|
449
449
|
return this.addToNumericResult(t, i, a, 16), this.emitNumericEntity(s, 3);
|
@@ -463,7 +463,7 @@ class Ri {
|
|
463
463
|
const i = a;
|
464
464
|
for (; a < t.length; ) {
|
465
465
|
const s = t.charCodeAt(a);
|
466
|
-
if (
|
466
|
+
if (ii(s))
|
467
467
|
a += 1;
|
468
468
|
else
|
469
469
|
return this.addToNumericResult(t, i, a, 10), this.emitNumericEntity(s, 2);
|
@@ -487,11 +487,11 @@ class Ri {
|
|
487
487
|
var i;
|
488
488
|
if (this.consumed <= a)
|
489
489
|
return (i = this.errors) === null || i === void 0 || i.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
490
|
-
if (t ===
|
490
|
+
if (t === me.SEMI)
|
491
491
|
this.consumed += 1;
|
492
492
|
else if (this.decodeMode === Pe.Strict)
|
493
493
|
return 0;
|
494
|
-
return this.emitCodePoint(tr(this.result), this.consumed), this.errors && (t !==
|
494
|
+
return this.emitCodePoint(tr(this.result), this.consumed), this.errors && (t !== me.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
495
495
|
}
|
496
496
|
/**
|
497
497
|
* Parses a named entity.
|
@@ -513,7 +513,7 @@ class Ri {
|
|
513
513
|
(u === 0 || // And there should be no invalid characters.
|
514
514
|
nr(r)) ? 0 : this.emitNotTerminatedNamedEntity();
|
515
515
|
if (s = i[this.treeIndex], u = (s & Ze.VALUE_LENGTH) >> 14, u !== 0) {
|
516
|
-
if (r ===
|
516
|
+
if (r === me.SEMI)
|
517
517
|
return this.emitNamedEntityData(this.treeIndex, u, this.consumed + this.excess);
|
518
518
|
this.decodeMode !== Pe.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
519
519
|
}
|
@@ -553,22 +553,22 @@ class Ri {
|
|
553
553
|
end() {
|
554
554
|
var t;
|
555
555
|
switch (this.state) {
|
556
|
-
case
|
556
|
+
case fe.NamedEntity:
|
557
557
|
return this.result !== 0 && (this.decodeMode !== Pe.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
558
|
-
case
|
558
|
+
case fe.NumericDecimal:
|
559
559
|
return this.emitNumericEntity(0, 2);
|
560
|
-
case
|
560
|
+
case fe.NumericHex:
|
561
561
|
return this.emitNumericEntity(0, 3);
|
562
|
-
case
|
562
|
+
case fe.NumericStart:
|
563
563
|
return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
564
|
-
case
|
564
|
+
case fe.EntityStart:
|
565
565
|
return 0;
|
566
566
|
}
|
567
567
|
}
|
568
568
|
}
|
569
569
|
function tn(e) {
|
570
570
|
let t = "";
|
571
|
-
const a = new
|
571
|
+
const a = new vi(e, (i) => t += ai(i));
|
572
572
|
return function(s, u) {
|
573
573
|
let r = 0, o = 0;
|
574
574
|
for (; (o = s.indexOf("&", o)) >= 0; ) {
|
@@ -859,20 +859,20 @@ function rn(e, t) {
|
|
859
859
|
return Ra(e, t);
|
860
860
|
}
|
861
861
|
function Nr(e, t) {
|
862
|
-
return
|
862
|
+
return Te(e) ? e.children.map((a) => rn(a, t)).join("") : "";
|
863
863
|
}
|
864
864
|
function Ea(e) {
|
865
865
|
return Array.isArray(e) ? e.map(Ea).join("") : k(e) ? e.name === "br" ? `
|
866
|
-
` : Ea(e.children) :
|
866
|
+
` : Ea(e.children) : La(e) ? Ea(e.children) : He(e) ? e.data : "";
|
867
867
|
}
|
868
868
|
function Ot(e) {
|
869
|
-
return Array.isArray(e) ? e.map(Ot).join("") :
|
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("") :
|
872
|
+
return Array.isArray(e) ? e.map(Ta).join("") : Te(e) && (e.type === j.Tag || La(e)) ? Ta(e.children) : He(e) ? e.data : "";
|
873
873
|
}
|
874
|
-
function
|
875
|
-
return
|
874
|
+
function ya(e) {
|
875
|
+
return Te(e) ? e.children : [];
|
876
876
|
}
|
877
877
|
function on(e) {
|
878
878
|
return e.parent || null;
|
@@ -880,7 +880,7 @@ function on(e) {
|
|
880
880
|
function cn(e) {
|
881
881
|
const t = on(e);
|
882
882
|
if (t != null)
|
883
|
-
return
|
883
|
+
return ya(t);
|
884
884
|
const a = [e];
|
885
885
|
let { prev: i, next: s } = e;
|
886
886
|
for (; i != null; )
|
@@ -889,17 +889,17 @@ function cn(e) {
|
|
889
889
|
a.push(s), { next: s } = s;
|
890
890
|
return a;
|
891
891
|
}
|
892
|
-
function
|
892
|
+
function Ir(e, t) {
|
893
893
|
var a;
|
894
894
|
return (a = e.attribs) === null || a === void 0 ? void 0 : a[t];
|
895
895
|
}
|
896
|
-
function
|
896
|
+
function Cr(e, t) {
|
897
897
|
return e.attribs != null && Object.prototype.hasOwnProperty.call(e.attribs, t) && e.attribs[t] != null;
|
898
898
|
}
|
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
904
|
for (; t !== null && !k(t); )
|
905
905
|
({ next: t } = t);
|
@@ -953,7 +953,7 @@ function Lr(e, t) {
|
|
953
953
|
} else
|
954
954
|
t.next = null;
|
955
955
|
}
|
956
|
-
function
|
956
|
+
function vr(e, t) {
|
957
957
|
mt(t);
|
958
958
|
const { parent: a } = e;
|
959
959
|
if (a) {
|
@@ -962,7 +962,7 @@ function Rr(e, t) {
|
|
962
962
|
}
|
963
963
|
e.prev && (e.prev.next = t), t.parent = a, t.prev = e.prev, t.next = e, e.prev = t;
|
964
964
|
}
|
965
|
-
function
|
965
|
+
function Ma(e, t, a = !0, i = 1 / 0) {
|
966
966
|
return Mi(e, Array.isArray(t) ? t : [t], a, i);
|
967
967
|
}
|
968
968
|
function Mi(e, t, a, i) {
|
@@ -977,10 +977,10 @@ function Mi(e, t, a, i) {
|
|
977
977
|
const o = u[0][r[0]++];
|
978
978
|
if (e(o) && (s.push(o), --i <= 0))
|
979
979
|
return s;
|
980
|
-
a &&
|
980
|
+
a && Te(o) && o.children.length > 0 && (r.unshift(0), u.unshift(o.children));
|
981
981
|
}
|
982
982
|
}
|
983
|
-
function
|
983
|
+
function Rr(e, t) {
|
984
984
|
return t.find(e);
|
985
985
|
}
|
986
986
|
function Pi(e, t, a = !0) {
|
@@ -1039,16 +1039,16 @@ function Pr(e, t) {
|
|
1039
1039
|
}
|
1040
1040
|
function kr(e, t, a, i = 1 / 0) {
|
1041
1041
|
const s = dn(e);
|
1042
|
-
return s ?
|
1042
|
+
return s ? Ma(s, t, a, i) : [];
|
1043
1043
|
}
|
1044
1044
|
function wr(e, t, a = !0) {
|
1045
1045
|
return Array.isArray(t) || (t = [t]), Pi(hn("id", e), t, a);
|
1046
1046
|
}
|
1047
1047
|
function Lt(e, t, a = !0, i = 1 / 0) {
|
1048
|
-
return
|
1048
|
+
return Ma(pa.tag_name(e), t, a, i);
|
1049
1049
|
}
|
1050
1050
|
function Br(e, t, a = !0, i = 1 / 0) {
|
1051
|
-
return
|
1051
|
+
return Ma(pa.tag_type(e), t, a, i);
|
1052
1052
|
}
|
1053
1053
|
function Ur(e) {
|
1054
1054
|
let t = e.length;
|
@@ -1074,10 +1074,10 @@ function fn(e, t) {
|
|
1074
1074
|
const a = [], i = [];
|
1075
1075
|
if (e === t)
|
1076
1076
|
return 0;
|
1077
|
-
let s =
|
1077
|
+
let s = Te(e) ? e : e.parent;
|
1078
1078
|
for (; s; )
|
1079
1079
|
a.unshift(s), s = s.parent;
|
1080
|
-
for (s =
|
1080
|
+
for (s = Te(t) ? t : t.parent; s; )
|
1081
1081
|
i.unshift(s), s = s.parent;
|
1082
1082
|
const u = Math.min(a.length, i.length);
|
1083
1083
|
let r = 0;
|
@@ -1088,7 +1088,7 @@ function fn(e, t) {
|
|
1088
1088
|
const o = a[r - 1], c = o.children, h = a[r], f = i[r];
|
1089
1089
|
return c.indexOf(h) > c.indexOf(f) ? o === t ? Me.FOLLOWING | Me.CONTAINED_BY : Me.FOLLOWING : o === e ? Me.PRECEDING | Me.CONTAINS : Me.PRECEDING;
|
1090
1090
|
}
|
1091
|
-
function
|
1091
|
+
function vt(e) {
|
1092
1092
|
return e = e.filter((t, a, i) => !i.includes(t, a + 1)), e.sort((t, a) => {
|
1093
1093
|
const i = fn(t, a);
|
1094
1094
|
return i & Me.PRECEDING ? -1 : i & Me.FOLLOWING ? 1 : 0;
|
@@ -1105,7 +1105,7 @@ function Hr(e) {
|
|
1105
1105
|
items: Lt("entry", a).map((r) => {
|
1106
1106
|
var o;
|
1107
1107
|
const { children: c } = r, h = { media: En(c) };
|
1108
|
-
|
1108
|
+
xe(h, "id", "id", c), xe(h, "title", "title", c);
|
1109
1109
|
const f = (o = ba("link", c)) === null || o === void 0 ? void 0 : o.attribs.href;
|
1110
1110
|
f && (h.link = f);
|
1111
1111
|
const m = Je("summary", c) || Je("content", c);
|
@@ -1114,11 +1114,11 @@ function Hr(e) {
|
|
1114
1114
|
return T && (h.pubDate = new Date(T)), h;
|
1115
1115
|
})
|
1116
1116
|
};
|
1117
|
-
|
1117
|
+
xe(i, "id", "id", a), xe(i, "title", "title", a);
|
1118
1118
|
const s = (t = ba("link", a)) === null || t === void 0 ? void 0 : t.attribs.href;
|
1119
|
-
s && (i.link = s),
|
1119
|
+
s && (i.link = s), xe(i, "description", "subtitle", a);
|
1120
1120
|
const u = Je("updated", a);
|
1121
|
-
return u && (i.updated = new Date(u)),
|
1121
|
+
return u && (i.updated = new Date(u)), xe(i, "author", "email", a, !0), i;
|
1122
1122
|
}
|
1123
1123
|
function Yr(e) {
|
1124
1124
|
var t, a;
|
@@ -1127,14 +1127,14 @@ function Yr(e) {
|
|
1127
1127
|
id: "",
|
1128
1128
|
items: Lt("item", e.children).map((r) => {
|
1129
1129
|
const { children: o } = r, c = { media: En(o) };
|
1130
|
-
|
1130
|
+
xe(c, "id", "guid", o), xe(c, "title", "title", o), xe(c, "link", "link", o), xe(c, "description", "description", o);
|
1131
1131
|
const h = Je("pubDate", o) || Je("dc:date", o);
|
1132
1132
|
return h && (c.pubDate = new Date(h)), c;
|
1133
1133
|
})
|
1134
1134
|
};
|
1135
|
-
|
1135
|
+
xe(s, "title", "title", i), xe(s, "link", "link", i), xe(s, "description", "description", i);
|
1136
1136
|
const u = Je("lastBuildDate", i);
|
1137
|
-
return u && (s.updated = new Date(u)),
|
1137
|
+
return u && (s.updated = new Date(u)), xe(s, "author", "managingEditor", i, !0), s;
|
1138
1138
|
}
|
1139
1139
|
const qr = ["url", "type", "lang"], Vr = [
|
1140
1140
|
"fileSize",
|
@@ -1165,14 +1165,14 @@ function ba(e, t) {
|
|
1165
1165
|
function Je(e, t, a = !1) {
|
1166
1166
|
return Ot(Lt(e, t, a, 1)).trim();
|
1167
1167
|
}
|
1168
|
-
function
|
1168
|
+
function xe(e, t, a, i, s = !1) {
|
1169
1169
|
const u = Je(a, i, s);
|
1170
1170
|
u && (e[t] = u);
|
1171
1171
|
}
|
1172
1172
|
function Wr(e) {
|
1173
1173
|
return e === "rss" || e === "feed" || e === "rdf:RDF";
|
1174
1174
|
}
|
1175
|
-
const
|
1175
|
+
const Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1176
1176
|
__proto__: null,
|
1177
1177
|
get DocumentPosition() {
|
1178
1178
|
return Me;
|
@@ -1181,13 +1181,13 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1181
1181
|
appendChild: Or,
|
1182
1182
|
compareDocumentPosition: fn,
|
1183
1183
|
existsOne: ln,
|
1184
|
-
filter:
|
1184
|
+
filter: Ma,
|
1185
1185
|
find: Mi,
|
1186
1186
|
findAll: yr,
|
1187
1187
|
findOne: Pi,
|
1188
|
-
findOneChild:
|
1189
|
-
getAttributeValue:
|
1190
|
-
getChildren:
|
1188
|
+
findOneChild: Rr,
|
1189
|
+
getAttributeValue: Ir,
|
1190
|
+
getChildren: ya,
|
1191
1191
|
getElementById: wr,
|
1192
1192
|
getElements: kr,
|
1193
1193
|
getElementsByTagName: Lt,
|
@@ -1199,16 +1199,16 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1199
1199
|
getParent: on,
|
1200
1200
|
getSiblings: cn,
|
1201
1201
|
getText: Ea,
|
1202
|
-
hasAttrib:
|
1203
|
-
hasChildren:
|
1202
|
+
hasAttrib: Cr,
|
1203
|
+
hasChildren: Te,
|
1204
1204
|
innerText: Ta,
|
1205
|
-
isCDATA:
|
1206
|
-
isComment:
|
1205
|
+
isCDATA: La,
|
1206
|
+
isComment: va,
|
1207
1207
|
isDocument: at,
|
1208
1208
|
isTag: k,
|
1209
1209
|
isText: He,
|
1210
|
-
nextElementSibling:
|
1211
|
-
prepend:
|
1210
|
+
nextElementSibling: Ri,
|
1211
|
+
prepend: vr,
|
1212
1212
|
prependChild: Lr,
|
1213
1213
|
prevElementSibling: yi,
|
1214
1214
|
removeElement: mt,
|
@@ -1216,11 +1216,11 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1216
1216
|
replaceElement: xr,
|
1217
1217
|
testElement: Pr,
|
1218
1218
|
textContent: Ot,
|
1219
|
-
uniqueSort:
|
1219
|
+
uniqueSort: vt
|
1220
1220
|
}, Symbol.toStringTag, { value: "Module" })), $r = {
|
1221
1221
|
_useHtmlParser2: !1
|
1222
1222
|
};
|
1223
|
-
function
|
1223
|
+
function si(e, t) {
|
1224
1224
|
if (!e)
|
1225
1225
|
return t ?? $r;
|
1226
1226
|
const a = {
|
@@ -1239,7 +1239,7 @@ function Xr(e, t) {
|
|
1239
1239
|
function Gr(e, t) {
|
1240
1240
|
const a = Xr(e) ? (t = e, void 0) : e, i = {
|
1241
1241
|
...this === null || this === void 0 ? void 0 : this._options,
|
1242
|
-
...
|
1242
|
+
...si(t)
|
1243
1243
|
};
|
1244
1244
|
return mn(this, a, i);
|
1245
1245
|
}
|
@@ -1315,7 +1315,7 @@ function eo(e) {
|
|
1315
1315
|
function to(e) {
|
1316
1316
|
return e.replace(/[A-Z]/g, "-$&").toLowerCase();
|
1317
1317
|
}
|
1318
|
-
function
|
1318
|
+
function re(e, t) {
|
1319
1319
|
const a = e.length;
|
1320
1320
|
for (let i = 0; i < a; i++)
|
1321
1321
|
t(e[i], i);
|
@@ -1325,14 +1325,14 @@ var ct;
|
|
1325
1325
|
(function(e) {
|
1326
1326
|
e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation";
|
1327
1327
|
})(ct || (ct = {}));
|
1328
|
-
function
|
1328
|
+
function ni(e) {
|
1329
1329
|
const t = e.indexOf("<");
|
1330
1330
|
if (t < 0 || t > e.length - 3)
|
1331
1331
|
return !1;
|
1332
1332
|
const a = e.charCodeAt(t + 1);
|
1333
1333
|
return (a >= ct.LowerA && a <= ct.LowerZ || a >= ct.UpperA && a <= ct.UpperZ || a === ct.Exclamation) && e.includes(">", t + 2);
|
1334
1334
|
}
|
1335
|
-
const Zt = Object.prototype.hasOwnProperty, Jt = /\s+/,
|
1335
|
+
const Zt = Object.prototype.hasOwnProperty, Jt = /\s+/, ui = "data-", ki = /^(?: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
1338
|
if (!(!e || !k(e))) {
|
@@ -1354,11 +1354,11 @@ function io(e, t) {
|
|
1354
1354
|
if (typeof t == "function") {
|
1355
1355
|
if (typeof e != "string")
|
1356
1356
|
throw new Error("Bad combination of arguments.");
|
1357
|
-
return
|
1357
|
+
return re(this, (a, i) => {
|
1358
1358
|
k(a) && Nt(a, e, t.call(a, i, a.attribs[e]));
|
1359
1359
|
});
|
1360
1360
|
}
|
1361
|
-
return
|
1361
|
+
return re(this, (a) => {
|
1362
1362
|
if (k(a))
|
1363
1363
|
if (typeof e == "object")
|
1364
1364
|
for (const i of Object.keys(e)) {
|
@@ -1377,7 +1377,7 @@ function ss(e, t, a) {
|
|
1377
1377
|
e[t]
|
1378
1378
|
) : !a && ki.test(t) ? ga(e, t, !1) !== void 0 : ga(e, t, a);
|
1379
1379
|
}
|
1380
|
-
function
|
1380
|
+
function Wa(e, t, a, i) {
|
1381
1381
|
t in e ? e[t] = a : Nt(e, t, !i && ki.test(t) ? a ? "" : null : `${a}`);
|
1382
1382
|
}
|
1383
1383
|
function so(e, t) {
|
@@ -1417,19 +1417,19 @@ function so(e, t) {
|
|
1417
1417
|
if (typeof t == "function") {
|
1418
1418
|
if (typeof e == "object")
|
1419
1419
|
throw new TypeError("Bad combination of arguments.");
|
1420
|
-
return
|
1421
|
-
k(i) &&
|
1420
|
+
return re(this, (i, s) => {
|
1421
|
+
k(i) && Wa(i, e, t.call(i, s, ss(i, e, this.options.xmlMode)), this.options.xmlMode);
|
1422
1422
|
});
|
1423
1423
|
}
|
1424
|
-
return
|
1424
|
+
return re(this, (i) => {
|
1425
1425
|
if (k(i))
|
1426
1426
|
if (typeof e == "object")
|
1427
1427
|
for (const s of Object.keys(e)) {
|
1428
1428
|
const u = e[s];
|
1429
|
-
|
1429
|
+
Wa(i, s, u, this.options.xmlMode);
|
1430
1430
|
}
|
1431
1431
|
else
|
1432
|
-
|
1432
|
+
Wa(i, e, t, this.options.xmlMode);
|
1433
1433
|
});
|
1434
1434
|
}
|
1435
1435
|
}
|
@@ -1439,15 +1439,15 @@ function ns(e, t, a) {
|
|
1439
1439
|
}
|
1440
1440
|
function no(e) {
|
1441
1441
|
for (const t of Object.keys(e.attribs)) {
|
1442
|
-
if (!t.startsWith(
|
1442
|
+
if (!t.startsWith(ui))
|
1443
1443
|
continue;
|
1444
|
-
const a = eo(t.slice(
|
1444
|
+
const a = eo(t.slice(ui.length));
|
1445
1445
|
Zt.call(e.data, a) || (e.data[a] = pn(e.attribs[t]));
|
1446
1446
|
}
|
1447
1447
|
return e.data;
|
1448
1448
|
}
|
1449
1449
|
function uo(e, t) {
|
1450
|
-
const a =
|
1450
|
+
const a = ui + to(t), i = e.data;
|
1451
1451
|
if (Zt.call(i, t))
|
1452
1452
|
return i[t];
|
1453
1453
|
if (Zt.call(e.attribs, a))
|
@@ -1476,7 +1476,7 @@ function ro(e, t) {
|
|
1476
1476
|
if (!i || !k(i))
|
1477
1477
|
return;
|
1478
1478
|
const s = i;
|
1479
|
-
return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? no(s) : typeof e == "object" || t !== void 0 ? (
|
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
|
k(u) && (typeof e == "object" ? ns(u, e) : ns(u, e, t));
|
1481
1481
|
}), this) : uo(s, e);
|
1482
1482
|
}
|
@@ -1514,7 +1514,7 @@ function _a(e) {
|
|
1514
1514
|
function co(e) {
|
1515
1515
|
const t = _a(e);
|
1516
1516
|
for (const a of t)
|
1517
|
-
|
1517
|
+
re(this, (i) => {
|
1518
1518
|
k(i) && bn(i, a);
|
1519
1519
|
});
|
1520
1520
|
return this;
|
@@ -1534,7 +1534,7 @@ function lo(e) {
|
|
1534
1534
|
}
|
1535
1535
|
function gn(e) {
|
1536
1536
|
if (typeof e == "function")
|
1537
|
-
return
|
1537
|
+
return re(this, (i, s) => {
|
1538
1538
|
if (k(i)) {
|
1539
1539
|
const u = i.attribs.class || "";
|
1540
1540
|
gn.call([i], e.call(i, s, u));
|
@@ -1562,11 +1562,11 @@ function gn(e) {
|
|
1562
1562
|
}
|
1563
1563
|
function _n(e) {
|
1564
1564
|
if (typeof e == "function")
|
1565
|
-
return
|
1565
|
+
return re(this, (s, u) => {
|
1566
1566
|
k(s) && _n.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
|
-
return
|
1569
|
+
return re(this, (s) => {
|
1570
1570
|
if (k(s))
|
1571
1571
|
if (i)
|
1572
1572
|
s.attribs.class = "";
|
@@ -1583,7 +1583,7 @@ function _n(e) {
|
|
1583
1583
|
}
|
1584
1584
|
function An(e, t) {
|
1585
1585
|
if (typeof e == "function")
|
1586
|
-
return
|
1586
|
+
return re(this, (r, o) => {
|
1587
1587
|
k(r) && An.call([r], e.call(r, o, r.attribs.class || "", t), t);
|
1588
1588
|
});
|
1589
1589
|
if (!e || typeof e != "string")
|
@@ -1614,21 +1614,21 @@ const ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1614
1614
|
toggleClass: An,
|
1615
1615
|
val: oo
|
1616
1616
|
}, Symbol.toStringTag, { value: "Module" }));
|
1617
|
-
var
|
1617
|
+
var v;
|
1618
1618
|
(function(e) {
|
1619
1619
|
e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator";
|
1620
|
-
})(
|
1621
|
-
var
|
1620
|
+
})(v || (v = {}));
|
1621
|
+
var de;
|
1622
1622
|
(function(e) {
|
1623
1623
|
e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start";
|
1624
|
-
})(
|
1624
|
+
})(de || (de = {}));
|
1625
1625
|
const us = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, fo = /\\([\da-f]{1,6}\s?|(\s)|.)/gi, Eo = /* @__PURE__ */ new Map([
|
1626
|
-
[126,
|
1627
|
-
[94,
|
1628
|
-
[36,
|
1629
|
-
[42,
|
1630
|
-
[33,
|
1631
|
-
[124,
|
1626
|
+
[126, de.Element],
|
1627
|
+
[94, de.Start],
|
1628
|
+
[36, de.End],
|
1629
|
+
[42, de.Any],
|
1630
|
+
[33, de.Not],
|
1631
|
+
[124, de.Hyphen]
|
1632
1632
|
]), mo = /* @__PURE__ */ new Set([
|
1633
1633
|
"has",
|
1634
1634
|
"not",
|
@@ -1640,12 +1640,12 @@ const us = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, fo = /\\(
|
|
1640
1640
|
]);
|
1641
1641
|
function qt(e) {
|
1642
1642
|
switch (e.type) {
|
1643
|
-
case
|
1644
|
-
case
|
1645
|
-
case
|
1646
|
-
case
|
1647
|
-
case
|
1648
|
-
case
|
1643
|
+
case v.Adjacent:
|
1644
|
+
case v.Child:
|
1645
|
+
case v.Descendant:
|
1646
|
+
case v.Parent:
|
1647
|
+
case v.Sibling:
|
1648
|
+
case v.ColumnCombinator:
|
1649
1649
|
return !0;
|
1650
1650
|
default:
|
1651
1651
|
return !1;
|
@@ -1665,13 +1665,13 @@ function po(e, t, a) {
|
|
1665
1665
|
function Mt(e) {
|
1666
1666
|
return e.replace(fo, po);
|
1667
1667
|
}
|
1668
|
-
function
|
1668
|
+
function $a(e) {
|
1669
1669
|
return e === 39 || e === 34;
|
1670
1670
|
}
|
1671
1671
|
function rs(e) {
|
1672
1672
|
return e === 32 || e === 9 || e === 10 || e === 12 || e === 13;
|
1673
1673
|
}
|
1674
|
-
function
|
1674
|
+
function ka(e) {
|
1675
1675
|
const t = [], a = Nn(t, `${e}`, 0);
|
1676
1676
|
if (a < e.length)
|
1677
1677
|
throw new Error(`Unmatched selector: ${e.slice(a)}`);
|
@@ -1683,8 +1683,8 @@ function Nn(e, t, a) {
|
|
1683
1683
|
const A = t.slice(a + T).match(us);
|
1684
1684
|
if (!A)
|
1685
1685
|
throw new Error(`Expected name, found ${t.slice(a)}`);
|
1686
|
-
const [
|
1687
|
-
return a += T +
|
1686
|
+
const [I] = A;
|
1687
|
+
return a += T + I.length, Mt(I);
|
1688
1688
|
}
|
1689
1689
|
function u(T) {
|
1690
1690
|
for (a += T; a < t.length && rs(t.charCodeAt(a)); )
|
@@ -1711,7 +1711,7 @@ function Nn(e, t, a) {
|
|
1711
1711
|
throw new Error("Did not expect successive traversals.");
|
1712
1712
|
}
|
1713
1713
|
function h(T) {
|
1714
|
-
if (i.length > 0 && i[i.length - 1].type ===
|
1714
|
+
if (i.length > 0 && i[i.length - 1].type === v.Descendant) {
|
1715
1715
|
i[i.length - 1].type = T;
|
1716
1716
|
return;
|
1717
1717
|
}
|
@@ -1719,7 +1719,7 @@ function Nn(e, t, a) {
|
|
1719
1719
|
}
|
1720
1720
|
function f(T, A) {
|
1721
1721
|
i.push({
|
1722
|
-
type:
|
1722
|
+
type: v.Attribute,
|
1723
1723
|
name: T,
|
1724
1724
|
action: A,
|
1725
1725
|
value: s(1),
|
@@ -1728,7 +1728,7 @@ function Nn(e, t, a) {
|
|
1728
1728
|
});
|
1729
1729
|
}
|
1730
1730
|
function m() {
|
1731
|
-
if (i.length && i[i.length - 1].type ===
|
1731
|
+
if (i.length && i[i.length - 1].type === v.Descendant && i.pop(), i.length === 0)
|
1732
1732
|
throw new Error("Empty sub-selector");
|
1733
1733
|
e.push(i);
|
1734
1734
|
}
|
@@ -1742,47 +1742,47 @@ function Nn(e, t, a) {
|
|
1742
1742
|
case 10:
|
1743
1743
|
case 12:
|
1744
1744
|
case 13: {
|
1745
|
-
(i.length === 0 || i[0].type !==
|
1745
|
+
(i.length === 0 || i[0].type !== v.Descendant) && (c(), i.push({ type: v.Descendant })), u(1);
|
1746
1746
|
break;
|
1747
1747
|
}
|
1748
1748
|
case 62: {
|
1749
|
-
h(
|
1749
|
+
h(v.Child), u(1);
|
1750
1750
|
break;
|
1751
1751
|
}
|
1752
1752
|
case 60: {
|
1753
|
-
h(
|
1753
|
+
h(v.Parent), u(1);
|
1754
1754
|
break;
|
1755
1755
|
}
|
1756
1756
|
case 126: {
|
1757
|
-
h(
|
1757
|
+
h(v.Sibling), u(1);
|
1758
1758
|
break;
|
1759
1759
|
}
|
1760
1760
|
case 43: {
|
1761
|
-
h(
|
1761
|
+
h(v.Adjacent), u(1);
|
1762
1762
|
break;
|
1763
1763
|
}
|
1764
1764
|
case 46: {
|
1765
|
-
f("class",
|
1765
|
+
f("class", de.Element);
|
1766
1766
|
break;
|
1767
1767
|
}
|
1768
1768
|
case 35: {
|
1769
|
-
f("id",
|
1769
|
+
f("id", de.Equals);
|
1770
1770
|
break;
|
1771
1771
|
}
|
1772
1772
|
case 91: {
|
1773
1773
|
u(1);
|
1774
|
-
let A,
|
1775
|
-
t.charCodeAt(a) === 124 ? A = s(1) : t.startsWith("*|", a) ? (
|
1776
|
-
let L =
|
1774
|
+
let A, I = null;
|
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
|
+
let L = de.Exists;
|
1777
1777
|
const M = Eo.get(t.charCodeAt(a));
|
1778
1778
|
if (M) {
|
1779
1779
|
if (L = M, t.charCodeAt(a + 1) !== 61)
|
1780
1780
|
throw new Error("Expected `=`");
|
1781
1781
|
u(2);
|
1782
|
-
} else t.charCodeAt(a) === 61 && (L =
|
1782
|
+
} else t.charCodeAt(a) === 61 && (L = de.Equals, u(1));
|
1783
1783
|
let X = "", U = null;
|
1784
1784
|
if (L !== "exists") {
|
1785
|
-
if (
|
1785
|
+
if ($a(t.charCodeAt(a))) {
|
1786
1786
|
const P = t.charCodeAt(a);
|
1787
1787
|
let g = a + 1;
|
1788
1788
|
for (; g < t.length && (t.charCodeAt(g) !== P || o(g)); )
|
@@ -1804,11 +1804,11 @@ function Nn(e, t, a) {
|
|
1804
1804
|
throw new Error("Attribute selector didn't terminate");
|
1805
1805
|
a += 1;
|
1806
1806
|
const $ = {
|
1807
|
-
type:
|
1807
|
+
type: v.Attribute,
|
1808
1808
|
name: A,
|
1809
1809
|
action: L,
|
1810
1810
|
value: X,
|
1811
|
-
namespace:
|
1811
|
+
namespace: I,
|
1812
1812
|
ignoreCase: U
|
1813
1813
|
};
|
1814
1814
|
i.push($);
|
@@ -1817,29 +1817,29 @@ function Nn(e, t, a) {
|
|
1817
1817
|
case 58: {
|
1818
1818
|
if (t.charCodeAt(a + 1) === 58) {
|
1819
1819
|
i.push({
|
1820
|
-
type:
|
1820
|
+
type: v.PseudoElement,
|
1821
1821
|
name: s(2).toLowerCase(),
|
1822
1822
|
data: t.charCodeAt(a) === 40 ? r() : null
|
1823
1823
|
});
|
1824
1824
|
continue;
|
1825
1825
|
}
|
1826
1826
|
const A = s(1).toLowerCase();
|
1827
|
-
let
|
1827
|
+
let I = null;
|
1828
1828
|
if (t.charCodeAt(a) === 40)
|
1829
1829
|
if (mo.has(A)) {
|
1830
|
-
if (
|
1830
|
+
if ($a(t.charCodeAt(a + 1)))
|
1831
1831
|
throw new Error(`Pseudo-selector ${A} cannot be quoted`);
|
1832
|
-
if (
|
1832
|
+
if (I = [], a = Nn(I, t, a + 1), t.charCodeAt(a) !== 41)
|
1833
1833
|
throw new Error(`Missing closing parenthesis in :${A} (${t})`);
|
1834
1834
|
a += 1;
|
1835
1835
|
} else {
|
1836
|
-
if (
|
1837
|
-
const L =
|
1838
|
-
L ===
|
1836
|
+
if (I = r(), To.has(A)) {
|
1837
|
+
const L = I.charCodeAt(0);
|
1838
|
+
L === I.charCodeAt(I.length - 1) && $a(L) && (I = I.slice(1, -1));
|
1839
1839
|
}
|
1840
|
-
|
1840
|
+
I = Mt(I);
|
1841
1841
|
}
|
1842
|
-
i.push({ type:
|
1842
|
+
i.push({ type: v.Pseudo, name: A, data: I });
|
1843
1843
|
break;
|
1844
1844
|
}
|
1845
1845
|
case 44: {
|
@@ -1854,19 +1854,19 @@ function Nn(e, t, a) {
|
|
1854
1854
|
a = L + 2, i.length === 0 && u(0);
|
1855
1855
|
break;
|
1856
1856
|
}
|
1857
|
-
let A = null,
|
1857
|
+
let A = null, I;
|
1858
1858
|
if (T === 42)
|
1859
|
-
a += 1,
|
1859
|
+
a += 1, I = "*";
|
1860
1860
|
else if (T === 124) {
|
1861
|
-
if (
|
1862
|
-
h(
|
1861
|
+
if (I = "", t.charCodeAt(a + 1) === 124) {
|
1862
|
+
h(v.ColumnCombinator), u(2);
|
1863
1863
|
break;
|
1864
1864
|
}
|
1865
1865
|
} else if (us.test(t.slice(a)))
|
1866
|
-
|
1866
|
+
I = s(0);
|
1867
1867
|
else
|
1868
1868
|
break e;
|
1869
|
-
t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 124 && (A =
|
1869
|
+
t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 124 && (A = I, t.charCodeAt(a + 1) === 42 ? (I = "*", a += 2) : I = s(1)), i.push(I === "*" ? { type: v.Universal, namespace: A } : { type: v.Tag, name: I, namespace: A });
|
1870
1870
|
}
|
1871
1871
|
}
|
1872
1872
|
}
|
@@ -1883,25 +1883,25 @@ var Aa = {
|
|
1883
1883
|
return !1;
|
1884
1884
|
}
|
1885
1885
|
};
|
1886
|
-
const Y = /* @__PURE__ */ bo(Aa),
|
1887
|
-
[
|
1888
|
-
[
|
1889
|
-
[
|
1890
|
-
[
|
1886
|
+
const Y = /* @__PURE__ */ bo(Aa), In = /* @__PURE__ */ new Map([
|
1887
|
+
[v.Universal, 50],
|
1888
|
+
[v.Tag, 30],
|
1889
|
+
[v.Attribute, 1],
|
1890
|
+
[v.Pseudo, 0]
|
1891
1891
|
]);
|
1892
1892
|
function wi(e) {
|
1893
|
-
return !
|
1893
|
+
return !In.has(e.type);
|
1894
1894
|
}
|
1895
1895
|
const go = /* @__PURE__ */ new Map([
|
1896
|
-
[
|
1897
|
-
[
|
1898
|
-
[
|
1899
|
-
[
|
1900
|
-
[
|
1901
|
-
[
|
1896
|
+
[de.Exists, 10],
|
1897
|
+
[de.Equals, 8],
|
1898
|
+
[de.Not, 7],
|
1899
|
+
[de.Start, 6],
|
1900
|
+
[de.End, 6],
|
1901
|
+
[de.Any, 5]
|
1902
1902
|
]);
|
1903
1903
|
function _o(e) {
|
1904
|
-
const t = e.map(
|
1904
|
+
const t = e.map(Cn);
|
1905
1905
|
for (let a = 1; a < e.length; a++) {
|
1906
1906
|
const i = t[a];
|
1907
1907
|
if (!(i < 0))
|
@@ -1911,10 +1911,10 @@ function _o(e) {
|
|
1911
1911
|
}
|
1912
1912
|
}
|
1913
1913
|
}
|
1914
|
-
function
|
1914
|
+
function Cn(e) {
|
1915
1915
|
var t, a;
|
1916
|
-
let i = (t =
|
1917
|
-
return e.type ===
|
1916
|
+
let i = (t = In.get(e.type)) !== null && t !== void 0 ? t : -1;
|
1917
|
+
return e.type === v.Attribute ? (i = (a = go.get(e.action)) !== null && a !== void 0 ? a : 4, e.action === de.Equals && e.name === "id" && (i = 9), e.ignoreCase && (i >>= 1)) : e.type === v.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? i = 0 : Array.isArray(e.data) ? (i = Math.min(...e.data.map((s) => Math.min(...s.map(Cn)))), i < 0 && (i = 0)) : i = 2 : i = 3), i;
|
1918
1918
|
}
|
1919
1919
|
const Ao = /[-[\]{}()*+?.,\\^$|#\s]/g;
|
1920
1920
|
function os(e) {
|
@@ -1971,7 +1971,7 @@ const No = /* @__PURE__ */ new Set([
|
|
1971
1971
|
function nt(e, t) {
|
1972
1972
|
return typeof e.ignoreCase == "boolean" ? e.ignoreCase : e.ignoreCase === "quirks" ? !!t.quirksMode : !t.xmlMode && No.has(e.name);
|
1973
1973
|
}
|
1974
|
-
const
|
1974
|
+
const Io = {
|
1975
1975
|
equals(e, t, a) {
|
1976
1976
|
const { adapter: i } = a, { name: s } = t;
|
1977
1977
|
let { value: u } = t;
|
@@ -2053,7 +2053,7 @@ const Co = {
|
|
2053
2053
|
return (o == null || o.length !== u.length || o.toLowerCase() !== u) && e(r);
|
2054
2054
|
}) : (r) => i.getAttributeValue(r, s) !== u && e(r);
|
2055
2055
|
}
|
2056
|
-
},
|
2056
|
+
}, Co = /* @__PURE__ */ new Set([9, 10, 12, 13, 32]), cs = 48, So = 57;
|
2057
2057
|
function xo(e) {
|
2058
2058
|
if (e = e.trim().toLowerCase(), e === "even")
|
2059
2059
|
return [2, 0];
|
@@ -2074,7 +2074,7 @@ function xo(e) {
|
|
2074
2074
|
return t === c ? null : h;
|
2075
2075
|
}
|
2076
2076
|
function o() {
|
2077
|
-
for (; t < e.length &&
|
2077
|
+
for (; t < e.length && Co.has(e.charCodeAt(t)); )
|
2078
2078
|
t++;
|
2079
2079
|
}
|
2080
2080
|
}
|
@@ -2100,7 +2100,7 @@ function oa(e, t) {
|
|
2100
2100
|
return i != null && t.isTag(i) && e(a);
|
2101
2101
|
};
|
2102
2102
|
}
|
2103
|
-
const
|
2103
|
+
const ri = {
|
2104
2104
|
contains(e, t, { adapter: a }) {
|
2105
2105
|
return function(s) {
|
2106
2106
|
return e(s) && a.getText(s).includes(t);
|
@@ -2170,13 +2170,13 @@ const ui = {
|
|
2170
2170
|
},
|
2171
2171
|
scope(e, t, a, i) {
|
2172
2172
|
const { equals: s } = a;
|
2173
|
-
return !i || i.length === 0 ?
|
2173
|
+
return !i || i.length === 0 ? ri.root(e, t, a) : i.length === 1 ? (u) => s(i[0], u) && e(u) : (u) => i.includes(u) && e(u);
|
2174
2174
|
},
|
2175
|
-
hover:
|
2176
|
-
visited:
|
2177
|
-
active:
|
2175
|
+
hover: Xa("isHovered"),
|
2176
|
+
visited: Xa("isVisited"),
|
2177
|
+
active: Xa("isActive")
|
2178
2178
|
};
|
2179
|
-
function
|
2179
|
+
function Xa(e) {
|
2180
2180
|
return function(a, i, { adapter: s }) {
|
2181
2181
|
const u = s[e];
|
2182
2182
|
return typeof u != "function" ? Y.falseFunc : function(o) {
|
@@ -2285,7 +2285,7 @@ function xn(e, t) {
|
|
2285
2285
|
const i = a.indexOf(e);
|
2286
2286
|
return i < 0 || i === a.length - 1 ? [] : a.slice(i + 1).filter(t.isTag);
|
2287
2287
|
}
|
2288
|
-
function
|
2288
|
+
function oi(e) {
|
2289
2289
|
return {
|
2290
2290
|
xmlMode: !!e.xmlMode,
|
2291
2291
|
lowerCaseAttributeNames: !!e.lowerCaseAttributeNames,
|
@@ -2297,22 +2297,22 @@ function ri(e) {
|
|
2297
2297
|
equals: e.equals
|
2298
2298
|
};
|
2299
2299
|
}
|
2300
|
-
const
|
2301
|
-
const u = s(t,
|
2300
|
+
const Ga = (e, t, a, i, s) => {
|
2301
|
+
const u = s(t, oi(a), i);
|
2302
2302
|
return u === Y.trueFunc ? e : u === Y.falseFunc ? Y.falseFunc : (r) => u(r) && e(r);
|
2303
|
-
},
|
2304
|
-
is:
|
2303
|
+
}, Qa = {
|
2304
|
+
is: Ga,
|
2305
2305
|
/**
|
2306
2306
|
* `:matches` and `:where` are aliases for `:is`.
|
2307
2307
|
*/
|
2308
|
-
matches:
|
2309
|
-
where:
|
2308
|
+
matches: Ga,
|
2309
|
+
where: Ga,
|
2310
2310
|
not(e, t, a, i, s) {
|
2311
|
-
const u = s(t,
|
2311
|
+
const u = s(t, oi(a), i);
|
2312
2312
|
return u === Y.falseFunc ? e : u === Y.trueFunc ? Y.falseFunc : (r) => !u(r) && e(r);
|
2313
2313
|
},
|
2314
2314
|
has(e, t, a, i, s) {
|
2315
|
-
const { adapter: u } = a, r =
|
2315
|
+
const { adapter: u } = a, r = oi(a);
|
2316
2316
|
r.relativeSelector = !0;
|
2317
2317
|
const o = t.some((f) => f.some(wi)) ? (
|
2318
2318
|
// Used as a placeholder. Will be replaced with the actual element.
|
@@ -2334,50 +2334,50 @@ const Xa = (e, t, a, i, s) => {
|
|
2334
2334
|
return (f) => e(f) && u.existsOne(h, u.getChildren(f));
|
2335
2335
|
}
|
2336
2336
|
};
|
2337
|
-
function
|
2337
|
+
function vo(e, t, a, i, s) {
|
2338
2338
|
var u;
|
2339
2339
|
const { name: r, data: o } = t;
|
2340
2340
|
if (Array.isArray(o)) {
|
2341
|
-
if (!(r in
|
2341
|
+
if (!(r in Qa))
|
2342
2342
|
throw new Error(`Unknown pseudo-class :${r}(${o})`);
|
2343
|
-
return
|
2343
|
+
return Qa[r](e, o, a, i, s);
|
2344
2344
|
}
|
2345
2345
|
const c = (u = a.pseudos) === null || u === void 0 ? void 0 : u[r], h = typeof c == "string" ? c : Do[r];
|
2346
2346
|
if (typeof h == "string") {
|
2347
2347
|
if (o != null)
|
2348
2348
|
throw new Error(`Pseudo ${r} doesn't have any arguments`);
|
2349
|
-
const f =
|
2350
|
-
return
|
2349
|
+
const f = ka(h);
|
2350
|
+
return Qa.is(e, f, a, i, s);
|
2351
2351
|
}
|
2352
2352
|
if (typeof c == "function")
|
2353
2353
|
return hs(c, r, o, 1), (f) => c(f, o) && e(f);
|
2354
|
-
if (r in
|
2355
|
-
return
|
2354
|
+
if (r in ri)
|
2355
|
+
return ri[r](e, o, a, i);
|
2356
2356
|
if (r in ls) {
|
2357
2357
|
const f = ls[r];
|
2358
2358
|
return hs(f, r, o, 2), (m) => f(m, a, o) && e(m);
|
2359
2359
|
}
|
2360
2360
|
throw new Error(`Unknown pseudo-class :${r}`);
|
2361
2361
|
}
|
2362
|
-
function
|
2362
|
+
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 Ro(e, t, a, i, s) {
|
2367
2367
|
const { adapter: u, equals: r } = a;
|
2368
2368
|
switch (t.type) {
|
2369
|
-
case
|
2369
|
+
case v.PseudoElement:
|
2370
2370
|
throw new Error("Pseudo-elements are not supported by css-select");
|
2371
|
-
case
|
2371
|
+
case v.ColumnCombinator:
|
2372
2372
|
throw new Error("Column combinators are not yet supported by css-select");
|
2373
|
-
case
|
2373
|
+
case v.Attribute: {
|
2374
2374
|
if (t.namespace != null)
|
2375
2375
|
throw new Error("Namespaced attributes are not yet supported by css-select");
|
2376
|
-
return (!a.xmlMode || a.lowerCaseAttributeNames) && (t.name = t.name.toLowerCase()),
|
2376
|
+
return (!a.xmlMode || a.lowerCaseAttributeNames) && (t.name = t.name.toLowerCase()), Io[t.action](e, t, a);
|
2377
2377
|
}
|
2378
|
-
case
|
2379
|
-
return
|
2380
|
-
case
|
2378
|
+
case v.Pseudo:
|
2379
|
+
return vo(e, t, a, i, s);
|
2380
|
+
case v.Tag: {
|
2381
2381
|
if (t.namespace != null)
|
2382
2382
|
throw new Error("Namespaced tag names are not yet supported by css-select");
|
2383
2383
|
let { name: o } = t;
|
@@ -2385,11 +2385,11 @@ function vo(e, t, a, i, s) {
|
|
2385
2385
|
return u.getName(h) === o && e(h);
|
2386
2386
|
};
|
2387
2387
|
}
|
2388
|
-
case
|
2388
|
+
case v.Descendant: {
|
2389
2389
|
if (a.cacheResults === !1 || typeof WeakSet > "u")
|
2390
2390
|
return function(h) {
|
2391
2391
|
let f = h;
|
2392
|
-
for (; f =
|
2392
|
+
for (; f = ja(f, u); )
|
2393
2393
|
if (e(f))
|
2394
2394
|
return !0;
|
2395
2395
|
return !1;
|
@@ -2397,7 +2397,7 @@ function vo(e, t, a, i, s) {
|
|
2397
2397
|
const o = /* @__PURE__ */ new WeakSet();
|
2398
2398
|
return function(h) {
|
2399
2399
|
let f = h;
|
2400
|
-
for (; f =
|
2400
|
+
for (; f = ja(f, u); )
|
2401
2401
|
if (!o.has(f)) {
|
2402
2402
|
if (u.isTag(f) && e(f))
|
2403
2403
|
return !0;
|
@@ -2412,19 +2412,19 @@ function vo(e, t, a, i, s) {
|
|
2412
2412
|
do
|
2413
2413
|
if (e(h))
|
2414
2414
|
return !0;
|
2415
|
-
while (h =
|
2415
|
+
while (h = ja(h, u));
|
2416
2416
|
return !1;
|
2417
2417
|
};
|
2418
|
-
case
|
2418
|
+
case v.Parent:
|
2419
2419
|
return function(c) {
|
2420
2420
|
return u.getChildren(c).some((h) => u.isTag(h) && e(h));
|
2421
2421
|
};
|
2422
|
-
case
|
2422
|
+
case v.Child:
|
2423
2423
|
return function(c) {
|
2424
2424
|
const h = u.getParent(c);
|
2425
2425
|
return h != null && u.isTag(h) && e(h);
|
2426
2426
|
};
|
2427
|
-
case
|
2427
|
+
case v.Sibling:
|
2428
2428
|
return function(c) {
|
2429
2429
|
const h = u.getSiblings(c);
|
2430
2430
|
for (let f = 0; f < h.length; f++) {
|
@@ -2436,7 +2436,7 @@ function vo(e, t, a, i, s) {
|
|
2436
2436
|
}
|
2437
2437
|
return !1;
|
2438
2438
|
};
|
2439
|
-
case
|
2439
|
+
case v.Adjacent:
|
2440
2440
|
return u.prevElementSibling ? function(c) {
|
2441
2441
|
const h = u.prevElementSibling(c);
|
2442
2442
|
return h != null && e(h);
|
@@ -2451,7 +2451,7 @@ function vo(e, t, a, i, s) {
|
|
2451
2451
|
}
|
2452
2452
|
return !!f && e(f);
|
2453
2453
|
};
|
2454
|
-
case
|
2454
|
+
case v.Universal: {
|
2455
2455
|
if (t.namespace != null && t.namespace !== "*")
|
2456
2456
|
throw new Error("Namespaced universal selectors are not yet supported by css-select");
|
2457
2457
|
return e;
|
@@ -2459,12 +2459,12 @@ function vo(e, t, a, i, s) {
|
|
2459
2459
|
}
|
2460
2460
|
}
|
2461
2461
|
function On(e) {
|
2462
|
-
return e.type ===
|
2462
|
+
return e.type === v.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(On)));
|
2463
2463
|
}
|
2464
|
-
const yo = { type:
|
2464
|
+
const yo = { type: v.Descendant }, Mo = {
|
2465
2465
|
type: "_flexibleDescendant"
|
2466
2466
|
}, Po = {
|
2467
|
-
type:
|
2467
|
+
type: v.Pseudo,
|
2468
2468
|
name: "scope",
|
2469
2469
|
data: null
|
2470
2470
|
};
|
@@ -2474,7 +2474,7 @@ function ko(e, { adapter: t }, a) {
|
|
2474
2474
|
return s === Sn || u && t.isTag(u);
|
2475
2475
|
}));
|
2476
2476
|
for (const s of e) {
|
2477
|
-
if (!(s.length > 0 && wi(s[0]) && s[0].type !==
|
2477
|
+
if (!(s.length > 0 && wi(s[0]) && s[0].type !== v.Descendant)) if (i && !s.some(On))
|
2478
2478
|
s.unshift(yo);
|
2479
2479
|
else
|
2480
2480
|
continue;
|
@@ -2493,7 +2493,7 @@ function Dn(e, t, a) {
|
|
2493
2493
|
const o = e.map((c) => {
|
2494
2494
|
if (c.length >= 2) {
|
2495
2495
|
const [h, f] = c;
|
2496
|
-
h.type !==
|
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
2499
|
}).reduce(Bo, Y.falseFunc);
|
@@ -2501,7 +2501,7 @@ function Dn(e, t, a) {
|
|
2501
2501
|
}
|
2502
2502
|
function wo(e, t, a) {
|
2503
2503
|
var i;
|
2504
|
-
return e.reduce((s, u) => s === Y.falseFunc ? Y.falseFunc :
|
2504
|
+
return e.reduce((s, u) => s === Y.falseFunc ? Y.falseFunc : Ro(s, u, t, a, Dn), (i = t.rootFunc) !== null && i !== void 0 ? i : Y.trueFunc);
|
2505
2505
|
}
|
2506
2506
|
function Bo(e, t) {
|
2507
2507
|
return t === Y.falseFunc || e === Y.trueFunc ? e : e === Y.falseFunc || t === Y.trueFunc ? t : function(i) {
|
@@ -2509,13 +2509,13 @@ function Bo(e, t) {
|
|
2509
2509
|
};
|
2510
2510
|
}
|
2511
2511
|
const Ln = (e, t) => e === t, Uo = {
|
2512
|
-
adapter:
|
2512
|
+
adapter: Pa,
|
2513
2513
|
equals: Ln
|
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 =
|
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 : Ln), 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 Bi = Ho(Dn);
|
2527
|
-
function
|
2527
|
+
function vn(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) {
|
@@ -2581,20 +2581,20 @@ function Ui(e) {
|
|
2581
2581
|
return [a, t];
|
2582
2582
|
}
|
2583
2583
|
const $o = {
|
2584
|
-
type:
|
2584
|
+
type: v.Universal,
|
2585
2585
|
namespace: null
|
2586
2586
|
}, Xo = {
|
2587
|
-
type:
|
2587
|
+
type: v.Pseudo,
|
2588
2588
|
name: "scope",
|
2589
2589
|
data: null
|
2590
2590
|
};
|
2591
|
-
function
|
2591
|
+
function Rn(e, t, a = {}) {
|
2592
2592
|
return yn([e], t, a);
|
2593
2593
|
}
|
2594
2594
|
function yn(e, t, a = {}) {
|
2595
2595
|
if (typeof t == "function")
|
2596
2596
|
return e.some(t);
|
2597
|
-
const [i, s] = Ui(
|
2597
|
+
const [i, s] = Ui(ka(t));
|
2598
2598
|
return i.length > 0 && e.some(Bi(i, a)) || s.some((u) => kn(u, e, a).length > 0);
|
2599
2599
|
}
|
2600
2600
|
function Go(e, t, a, i) {
|
@@ -2621,7 +2621,7 @@ function Go(e, t, a, i) {
|
|
2621
2621
|
}
|
2622
2622
|
}
|
2623
2623
|
function Mn(e, t, a = {}) {
|
2624
|
-
return Pn(
|
2624
|
+
return Pn(ka(e), t, a);
|
2625
2625
|
}
|
2626
2626
|
function Pn(e, t, a) {
|
2627
2627
|
if (t.length === 0)
|
@@ -2629,7 +2629,7 @@ function Pn(e, t, a) {
|
|
2629
2629
|
const [i, s] = Ui(e);
|
2630
2630
|
let u;
|
2631
2631
|
if (i.length) {
|
2632
|
-
const r =
|
2632
|
+
const r = li(t, i, a);
|
2633
2633
|
if (s.length === 0)
|
2634
2634
|
return r;
|
2635
2635
|
r.length && (u = new Set(r));
|
@@ -2657,29 +2657,29 @@ function kn(e, t, a) {
|
|
2657
2657
|
var i;
|
2658
2658
|
if (e.some(qt)) {
|
2659
2659
|
const s = (i = a.root) !== null && i !== void 0 ? i : Wo(t[0]), u = { ...a, context: t, relativeSelector: !1 };
|
2660
|
-
return e.push(Xo),
|
2660
|
+
return e.push(Xo), Ia(s, e, u, !0, t.length);
|
2661
2661
|
}
|
2662
|
-
return
|
2662
|
+
return Ia(t, e, a, !1, t.length);
|
2663
2663
|
}
|
2664
2664
|
function Qo(e, t, a = {}, i = 1 / 0) {
|
2665
2665
|
if (typeof e == "function")
|
2666
2666
|
return wn(t, e);
|
2667
|
-
const [s, u] = Ui(
|
2668
|
-
return s.length && r.push(
|
2667
|
+
const [s, u] = Ui(ka(e)), r = u.map((o) => Ia(t, o, a, !0, i));
|
2668
|
+
return s.length && r.push(ci(t, s, a, i)), r.length === 0 ? [] : r.length === 1 ? r[0] : vt(r.reduce((o, c) => [...o, ...c]));
|
2669
2669
|
}
|
2670
|
-
function
|
2670
|
+
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) ? ya(e).filter(k) : r.length === 0 ? (Array.isArray(e) ? e : [e]).filter(k) : i || r.some(qt) ? ci(e, [r], a, h) : li(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;
|
2678
|
-
const A = t.slice(u + 1),
|
2679
|
-
if (
|
2678
|
+
const A = t.slice(u + 1), I = A.some(qt);
|
2679
|
+
if (I) {
|
2680
2680
|
if (qt(A[0])) {
|
2681
2681
|
const { type: L } = A[0];
|
2682
|
-
(L ===
|
2682
|
+
(L === v.Sibling || L === v.Adjacent) && (T = vn(T, Pa, !0)), A.unshift($o);
|
2683
2683
|
}
|
2684
2684
|
a = {
|
2685
2685
|
...a,
|
@@ -2692,23 +2692,23 @@ function Ca(e, t, a, i, s) {
|
|
2692
2692
|
rootFunc: (L) => T.includes(L)
|
2693
2693
|
};
|
2694
2694
|
} else a.rootFunc && a.rootFunc !== Aa.trueFunc && (a = { ...a, rootFunc: Aa.trueFunc });
|
2695
|
-
return A.some(Na) ?
|
2695
|
+
return A.some(Na) ? Ia(T, A, a, !1, s) : I ? (
|
2696
2696
|
// Query existing elements to resolve traversal.
|
2697
|
-
|
2697
|
+
ci(T, [A], a, s)
|
2698
2698
|
) : (
|
2699
2699
|
// If we don't have any more traversals, simply filter elements.
|
2700
|
-
|
2700
|
+
li(T, [A], a)
|
2701
2701
|
);
|
2702
2702
|
}
|
2703
|
-
function
|
2703
|
+
function ci(e, t, a, i) {
|
2704
2704
|
const s = Bi(t, a, e);
|
2705
2705
|
return wn(e, s, i);
|
2706
2706
|
}
|
2707
2707
|
function wn(e, t, a = 1 / 0) {
|
2708
|
-
const i =
|
2708
|
+
const i = vn(e, Pa, t.shouldTestNextSiblings);
|
2709
2709
|
return Mi((s) => k(s) && t(s), i, !0, a);
|
2710
2710
|
}
|
2711
|
-
function
|
2711
|
+
function li(e, t, a) {
|
2712
2712
|
const i = (Array.isArray(e) ? e : [e]).filter(k);
|
2713
2713
|
if (i.length === 0)
|
2714
2714
|
return i;
|
@@ -2770,26 +2770,26 @@ function Yi(e, ...t) {
|
|
2770
2770
|
let a = null;
|
2771
2771
|
const i = Fi((s, u) => {
|
2772
2772
|
const r = [];
|
2773
|
-
return
|
2773
|
+
return re(u, (o) => {
|
2774
2774
|
for (let c; (c = s(o)) && !(a != null && a(c, r.length)); o = c)
|
2775
2775
|
r.push(c);
|
2776
2776
|
}), r;
|
2777
2777
|
})(e, ...t);
|
2778
2778
|
return function(s, u) {
|
2779
|
-
a = typeof s == "string" ? (o) =>
|
2779
|
+
a = typeof s == "string" ? (o) => Rn(o, s, this.options) : s ? sa(s) : null;
|
2780
2780
|
const r = i.call(this, u);
|
2781
2781
|
return a = null, r;
|
2782
2782
|
};
|
2783
2783
|
}
|
2784
|
-
function
|
2784
|
+
function Rt(e) {
|
2785
2785
|
return e.length > 1 ? Array.from(new Set(e)) : e;
|
2786
2786
|
}
|
2787
|
-
const Zo = Hi(({ parent: e }) => e && !at(e) ? e : null,
|
2787
|
+
const Zo = Hi(({ parent: e }) => e && !at(e) ? e : null, Rt), Jo = ia((e) => {
|
2788
2788
|
const t = [];
|
2789
2789
|
for (; e.parent && !at(e.parent); )
|
2790
2790
|
t.push(e.parent), e = e.parent;
|
2791
2791
|
return t;
|
2792
|
-
},
|
2792
|
+
}, vt, (e) => e.reverse()), ec = Yi(({ parent: e }) => e && !at(e) ? e : null, vt, (e) => e.reverse());
|
2793
2793
|
function tc(e) {
|
2794
2794
|
var t;
|
2795
2795
|
const a = [];
|
@@ -2798,8 +2798,8 @@ function tc(e) {
|
|
2798
2798
|
const i = {
|
2799
2799
|
xmlMode: this.options.xmlMode,
|
2800
2800
|
root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
|
2801
|
-
}, s = typeof e == "string" ? (u) =>
|
2802
|
-
return
|
2801
|
+
}, s = typeof e == "string" ? (u) => Rn(u, e, i) : sa(e);
|
2802
|
+
return re(this, (u) => {
|
2803
2803
|
for (u && !at(u) && !k(u) && (u = u.parent); u && k(u); ) {
|
2804
2804
|
if (s(u, 0)) {
|
2805
2805
|
a.includes(u) || a.push(u);
|
@@ -2809,19 +2809,19 @@ function tc(e) {
|
|
2809
2809
|
}
|
2810
2810
|
}), this._make(a);
|
2811
2811
|
}
|
2812
|
-
const ac = Hi((e) =>
|
2812
|
+
const ac = Hi((e) => Ri(e)), ic = ia((e) => {
|
2813
2813
|
const t = [];
|
2814
2814
|
for (; e.next; )
|
2815
2815
|
e = e.next, k(e) && t.push(e);
|
2816
2816
|
return t;
|
2817
|
-
},
|
2817
|
+
}, Rt), sc = Yi((e) => Ri(e), Rt), nc = Hi((e) => yi(e)), uc = ia((e) => {
|
2818
2818
|
const t = [];
|
2819
2819
|
for (; e.prev; )
|
2820
2820
|
e = e.prev, k(e) && t.push(e);
|
2821
2821
|
return t;
|
2822
|
-
},
|
2822
|
+
}, Rt), rc = Yi((e) => yi(e), Rt), oc = ia((e) => cn(e).filter((t) => k(t) && t !== e), vt), cc = ia((e) => ya(e).filter(k), Rt);
|
2823
2823
|
function lc() {
|
2824
|
-
const e = this.toArray().reduce((t, a) =>
|
2824
|
+
const e = this.toArray().reduce((t, a) => Te(a) ? t.concat(a.children) : t, []);
|
2825
2825
|
return this._make(e);
|
2826
2826
|
}
|
2827
2827
|
function hc(e) {
|
@@ -2892,15 +2892,15 @@ function Nc(e) {
|
|
2892
2892
|
let t, a;
|
2893
2893
|
return e == null ? (t = this.parent().children(), a = this[0]) : typeof e == "string" ? (t = this._make(e), a = this[0]) : (t = this, a = Xe(e) ? e[0] : e), Array.prototype.indexOf.call(t, a);
|
2894
2894
|
}
|
2895
|
-
function
|
2895
|
+
function Ic(e, t) {
|
2896
2896
|
return this._make(Array.prototype.slice.call(this, e, t));
|
2897
2897
|
}
|
2898
|
-
function
|
2898
|
+
function Cc() {
|
2899
2899
|
var e;
|
2900
2900
|
return (e = this.prevObject) !== null && e !== void 0 ? e : this._make([]);
|
2901
2901
|
}
|
2902
2902
|
function Sc(e, t) {
|
2903
|
-
const a = this._make(e, t), i =
|
2903
|
+
const a = this._make(e, t), i = vt([...this.get(), ...a.get()]);
|
2904
2904
|
return this._make(i);
|
2905
2905
|
}
|
2906
2906
|
function xc(e) {
|
@@ -2915,7 +2915,7 @@ const Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2915
2915
|
closest: tc,
|
2916
2916
|
contents: lc,
|
2917
2917
|
each: hc,
|
2918
|
-
end:
|
2918
|
+
end: Cc,
|
2919
2919
|
eq: gc,
|
2920
2920
|
filter: fc,
|
2921
2921
|
filterArray: qi,
|
@@ -2938,7 +2938,7 @@ const Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2938
2938
|
prevAll: uc,
|
2939
2939
|
prevUntil: rc,
|
2940
2940
|
siblings: oc,
|
2941
|
-
slice:
|
2941
|
+
slice: Ic,
|
2942
2942
|
toArray: Ac
|
2943
2943
|
}, Symbol.toStringTag, { value: "Module" }));
|
2944
2944
|
function Dc(e) {
|
@@ -2989,8 +2989,8 @@ function Lc(e, t) {
|
|
2989
2989
|
function Bn(e) {
|
2990
2990
|
return function(...t) {
|
2991
2991
|
const a = this.length - 1;
|
2992
|
-
return
|
2993
|
-
if (!
|
2992
|
+
return re(this, (i, s) => {
|
2993
|
+
if (!Te(i))
|
2994
2994
|
return;
|
2995
2995
|
const u = typeof t[0] == "function" ? t[0].call(i, s, this._render(i.children)) : t, r = this._makeDomArray(u, s < a);
|
2996
2996
|
e(r, i.children, i);
|
@@ -3007,17 +3007,17 @@ function it(e, t, a, i, s) {
|
|
3007
3007
|
for (let f = 0; f < i.length; ++f) {
|
3008
3008
|
const m = i[f], T = m.parent;
|
3009
3009
|
if (T) {
|
3010
|
-
const
|
3011
|
-
|
3010
|
+
const I = T.children.indexOf(m);
|
3011
|
+
I > -1 && (T.children.splice(I, 1), s === T && t > I && o[0]--);
|
3012
3012
|
}
|
3013
3013
|
m.parent = s, m.prev && (m.prev.next = (u = m.next) !== null && u !== void 0 ? u : null), m.next && (m.next.prev = (r = m.prev) !== null && r !== void 0 ? r : null), m.prev = f === 0 ? c : i[f - 1], m.next = f === i.length - 1 ? h : i[f + 1];
|
3014
3014
|
}
|
3015
3015
|
return c && (c.next = i[0]), h && (h.prev = i[i.length - 1]), e.splice(...o);
|
3016
3016
|
}
|
3017
|
-
function
|
3017
|
+
function vc(e) {
|
3018
3018
|
return (Xe(e) ? e : this._make(e)).append(this), this;
|
3019
3019
|
}
|
3020
|
-
function
|
3020
|
+
function Rc(e) {
|
3021
3021
|
return (Xe(e) ? e : this._make(e)).prepend(this), this;
|
3022
3022
|
}
|
3023
3023
|
const yc = Bn((e, t, a) => {
|
@@ -3029,8 +3029,8 @@ function Un(e) {
|
|
3029
3029
|
return function(t) {
|
3030
3030
|
const a = this.length - 1, i = this.parents().last();
|
3031
3031
|
for (let s = 0; s < this.length; s++) {
|
3032
|
-
const u = this[s], r = typeof t == "function" ? t.call(u, s, u) : typeof t == "string" && !
|
3033
|
-
if (!o || !
|
3032
|
+
const u = this[s], r = typeof t == "function" ? t.call(u, s, u) : typeof t == "string" && !ni(t) ? i.find(t).clone() : t, [o] = this._makeDomArray(r, s < a);
|
3033
|
+
if (!o || !Te(o))
|
3034
3034
|
continue;
|
3035
3035
|
let c = o, h = 0;
|
3036
3036
|
for (; h < c.children.length; ) {
|
@@ -3049,7 +3049,7 @@ const Pc = Un((e, t, a) => {
|
|
3049
3049
|
const s = i.children, u = s.indexOf(e);
|
3050
3050
|
ft([e], t), it(s, u, 0, a, i);
|
3051
3051
|
}), kc = Un((e, t, a) => {
|
3052
|
-
|
3052
|
+
Te(e) && (ft(e.children, t), ft(a, e));
|
3053
3053
|
});
|
3054
3054
|
function wc(e) {
|
3055
3055
|
return this.parent(e).not("body").each((t, a) => {
|
@@ -3074,8 +3074,8 @@ function Bc(e) {
|
|
3074
3074
|
}
|
3075
3075
|
function Uc(...e) {
|
3076
3076
|
const t = this.length - 1;
|
3077
|
-
return
|
3078
|
-
if (!
|
3077
|
+
return re(this, (a, i) => {
|
3078
|
+
if (!Te(a) || !a.parent)
|
3079
3079
|
return;
|
3080
3080
|
const s = a.parent.children, u = s.indexOf(a);
|
3081
3081
|
if (u < 0)
|
@@ -3098,8 +3098,8 @@ function Fc(e) {
|
|
3098
3098
|
}
|
3099
3099
|
function Hc(...e) {
|
3100
3100
|
const t = this.length - 1;
|
3101
|
-
return
|
3102
|
-
if (!
|
3101
|
+
return re(this, (a, i) => {
|
3102
|
+
if (!Te(a) || !a.parent)
|
3103
3103
|
return;
|
3104
3104
|
const s = a.parent.children, u = s.indexOf(a);
|
3105
3105
|
if (u < 0)
|
@@ -3112,7 +3112,7 @@ function Yc(e) {
|
|
3112
3112
|
const t = this._make(e);
|
3113
3113
|
this.remove();
|
3114
3114
|
const a = [];
|
3115
|
-
return
|
3115
|
+
return re(t, (i) => {
|
3116
3116
|
const s = this.clone().toArray(), { parent: u } = i;
|
3117
3117
|
if (!u)
|
3118
3118
|
return;
|
@@ -3122,12 +3122,12 @@ function Yc(e) {
|
|
3122
3122
|
}
|
3123
3123
|
function qc(e) {
|
3124
3124
|
const t = e ? this.filter(e) : this;
|
3125
|
-
return
|
3125
|
+
return re(t, (a) => {
|
3126
3126
|
mt(a), a.prev = a.next = a.parent = null;
|
3127
3127
|
}), this;
|
3128
3128
|
}
|
3129
3129
|
function Vc(e) {
|
3130
|
-
return
|
3130
|
+
return re(this, (t, a) => {
|
3131
3131
|
const { parent: i } = t;
|
3132
3132
|
if (!i)
|
3133
3133
|
return;
|
@@ -3138,8 +3138,8 @@ function Vc(e) {
|
|
3138
3138
|
});
|
3139
3139
|
}
|
3140
3140
|
function Wc() {
|
3141
|
-
return
|
3142
|
-
if (
|
3141
|
+
return re(this, (e) => {
|
3142
|
+
if (Te(e)) {
|
3143
3143
|
for (const t of e.children)
|
3144
3144
|
t.next = t.prev = t.parent = null;
|
3145
3145
|
e.children.length = 0;
|
@@ -3149,10 +3149,10 @@ function Wc() {
|
|
3149
3149
|
function $c(e) {
|
3150
3150
|
if (e === void 0) {
|
3151
3151
|
const t = this[0];
|
3152
|
-
return !t || !
|
3152
|
+
return !t || !Te(t) ? null : this._render(t.children);
|
3153
3153
|
}
|
3154
|
-
return
|
3155
|
-
if (!
|
3154
|
+
return re(this, (t) => {
|
3155
|
+
if (!Te(t))
|
3156
3156
|
return;
|
3157
3157
|
for (const i of t.children)
|
3158
3158
|
i.next = i.prev = i.parent = null;
|
@@ -3164,8 +3164,8 @@ function Xc() {
|
|
3164
3164
|
return this._render(this);
|
3165
3165
|
}
|
3166
3166
|
function Gc(e) {
|
3167
|
-
return e === void 0 ? Kt(this) : typeof e == "function" ?
|
3168
|
-
if (!
|
3167
|
+
return e === void 0 ? Kt(this) : typeof e == "function" ? re(this, (t, a) => this._make(t).text(e.call(t, a, Kt([t])))) : re(this, (t) => {
|
3168
|
+
if (!Te(t))
|
3169
3169
|
return;
|
3170
3170
|
for (const i of t.children)
|
3171
3171
|
i.next = i.prev = i.parent = null;
|
@@ -3184,7 +3184,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3184
3184
|
_makeDomArray: Lc,
|
3185
3185
|
after: Uc,
|
3186
3186
|
append: yc,
|
3187
|
-
appendTo:
|
3187
|
+
appendTo: vc,
|
3188
3188
|
before: Hc,
|
3189
3189
|
clone: Qc,
|
3190
3190
|
empty: Wc,
|
@@ -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: Rc,
|
3196
3196
|
remove: qc,
|
3197
3197
|
replaceWith: Vc,
|
3198
3198
|
text: Gc,
|
@@ -3205,7 +3205,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3205
3205
|
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
|
-
return
|
3208
|
+
return re(this, (a, i) => {
|
3209
3209
|
k(a) && Fn(a, e, t, i);
|
3210
3210
|
});
|
3211
3211
|
if (this.length !== 0)
|
@@ -3338,14 +3338,14 @@ function rl(e, t) {
|
|
3338
3338
|
return function a(i, s, u = !0) {
|
3339
3339
|
if (i == null)
|
3340
3340
|
throw new Error("cheerio.load() expects a string");
|
3341
|
-
const r =
|
3341
|
+
const r = si(s), o = e(i, r, u, null);
|
3342
3342
|
class c extends na {
|
3343
3343
|
_make(m, T) {
|
3344
3344
|
const A = h(m, T);
|
3345
3345
|
return A.prevObject = this, A;
|
3346
3346
|
}
|
3347
|
-
_parse(m, T, A,
|
3348
|
-
return e(m, T, A,
|
3347
|
+
_parse(m, T, A, I) {
|
3348
|
+
return e(m, T, A, I);
|
3349
3349
|
}
|
3350
3350
|
_render(m) {
|
3351
3351
|
return t(m, this.options);
|
@@ -3354,19 +3354,19 @@ 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
|
3357
|
+
const I = si(A, r), L = typeof T == "string" ? [e(T, I, !1, null)] : "length" in T ? T : [T], M = Xe(L) ? L : new c(L, null, I);
|
3358
3358
|
if (M._root = M, !f)
|
3359
|
-
return new c(void 0, M,
|
3360
|
-
const X = typeof f == "string" &&
|
3359
|
+
return new c(void 0, M, I);
|
3360
|
+
const X = typeof f == "string" && ni(f) ? (
|
3361
3361
|
// $(<html>)
|
3362
|
-
e(f,
|
3362
|
+
e(f, I, !1, null).children
|
3363
3363
|
) : ol(f) ? (
|
3364
3364
|
// $(dom)
|
3365
3365
|
[f]
|
3366
3366
|
) : Array.isArray(f) ? (
|
3367
3367
|
// $([dom])
|
3368
3368
|
f
|
3369
|
-
) : void 0, U = new c(X, M,
|
3369
|
+
) : void 0, U = new c(X, M, I);
|
3370
3370
|
if (X)
|
3371
3371
|
return U;
|
3372
3372
|
if (typeof f != "string")
|
@@ -3374,9 +3374,9 @@ function rl(e, t) {
|
|
3374
3374
|
let $ = f;
|
3375
3375
|
const F = m ? (
|
3376
3376
|
// If we don't have a context, maybe we have a root, from loading
|
3377
|
-
typeof m == "string" ?
|
3377
|
+
typeof m == "string" ? ni(m) ? (
|
3378
3378
|
// $('li', '<ul>...</ul>')
|
3379
|
-
new c([e(m,
|
3379
|
+
new c([e(m, I, !1, null)], M, I)
|
3380
3380
|
) : (
|
3381
3381
|
// $('li', 'ul')
|
3382
3382
|
($ = `${m} ${$}`, M)
|
@@ -3385,7 +3385,7 @@ function rl(e, t) {
|
|
3385
3385
|
m
|
3386
3386
|
) : (
|
3387
3387
|
// $('li', node), $('li', [nodes])
|
3388
|
-
new c(Array.isArray(m) ? m : [m], M,
|
3388
|
+
new c(Array.isArray(m) ? m : [m], M, I)
|
3389
3389
|
)
|
3390
3390
|
) : M;
|
3391
3391
|
return F ? F.find($) : U;
|
@@ -3573,10 +3573,10 @@ var ht;
|
|
3573
3573
|
(function(e) {
|
3574
3574
|
e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
|
3575
3575
|
})(ht || (ht = {}));
|
3576
|
-
var
|
3576
|
+
var Le;
|
3577
3577
|
(function(e) {
|
3578
3578
|
e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
|
3579
|
-
})(
|
3579
|
+
})(Le || (Le = {}));
|
3580
3580
|
var p;
|
3581
3581
|
(function(e) {
|
3582
3582
|
e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SEARCH = "search", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp";
|
@@ -3710,100 +3710,100 @@ const El = /* @__PURE__ */ new Map([
|
|
3710
3710
|
[p.WBR, n.WBR],
|
3711
3711
|
[p.XMP, n.XMP]
|
3712
3712
|
]);
|
3713
|
-
function
|
3713
|
+
function wa(e) {
|
3714
3714
|
var t;
|
3715
3715
|
return (t = El.get(e)) !== null && t !== void 0 ? t : n.UNKNOWN;
|
3716
3716
|
}
|
3717
|
-
const
|
3717
|
+
const C = n, ml = {
|
3718
3718
|
[_.HTML]: /* @__PURE__ */ new Set([
|
3719
|
-
|
3720
|
-
|
3721
|
-
|
3722
|
-
|
3723
|
-
|
3724
|
-
|
3725
|
-
|
3726
|
-
|
3727
|
-
|
3728
|
-
|
3729
|
-
|
3730
|
-
|
3731
|
-
|
3732
|
-
|
3733
|
-
|
3734
|
-
|
3735
|
-
|
3736
|
-
|
3737
|
-
|
3738
|
-
|
3739
|
-
|
3740
|
-
|
3741
|
-
|
3742
|
-
|
3743
|
-
|
3744
|
-
|
3745
|
-
|
3746
|
-
|
3747
|
-
|
3748
|
-
|
3749
|
-
|
3750
|
-
|
3751
|
-
|
3752
|
-
|
3753
|
-
|
3754
|
-
|
3755
|
-
|
3756
|
-
|
3757
|
-
|
3758
|
-
|
3759
|
-
|
3760
|
-
|
3761
|
-
|
3762
|
-
|
3763
|
-
|
3764
|
-
|
3765
|
-
|
3766
|
-
|
3767
|
-
|
3768
|
-
|
3769
|
-
|
3770
|
-
|
3771
|
-
|
3772
|
-
|
3773
|
-
|
3774
|
-
|
3775
|
-
|
3776
|
-
|
3777
|
-
|
3778
|
-
|
3779
|
-
|
3780
|
-
|
3781
|
-
|
3782
|
-
|
3783
|
-
|
3784
|
-
|
3785
|
-
|
3786
|
-
|
3787
|
-
|
3788
|
-
|
3789
|
-
|
3790
|
-
|
3791
|
-
|
3792
|
-
|
3793
|
-
|
3794
|
-
|
3795
|
-
|
3796
|
-
|
3797
|
-
|
3798
|
-
|
3799
|
-
|
3719
|
+
C.ADDRESS,
|
3720
|
+
C.APPLET,
|
3721
|
+
C.AREA,
|
3722
|
+
C.ARTICLE,
|
3723
|
+
C.ASIDE,
|
3724
|
+
C.BASE,
|
3725
|
+
C.BASEFONT,
|
3726
|
+
C.BGSOUND,
|
3727
|
+
C.BLOCKQUOTE,
|
3728
|
+
C.BODY,
|
3729
|
+
C.BR,
|
3730
|
+
C.BUTTON,
|
3731
|
+
C.CAPTION,
|
3732
|
+
C.CENTER,
|
3733
|
+
C.COL,
|
3734
|
+
C.COLGROUP,
|
3735
|
+
C.DD,
|
3736
|
+
C.DETAILS,
|
3737
|
+
C.DIR,
|
3738
|
+
C.DIV,
|
3739
|
+
C.DL,
|
3740
|
+
C.DT,
|
3741
|
+
C.EMBED,
|
3742
|
+
C.FIELDSET,
|
3743
|
+
C.FIGCAPTION,
|
3744
|
+
C.FIGURE,
|
3745
|
+
C.FOOTER,
|
3746
|
+
C.FORM,
|
3747
|
+
C.FRAME,
|
3748
|
+
C.FRAMESET,
|
3749
|
+
C.H1,
|
3750
|
+
C.H2,
|
3751
|
+
C.H3,
|
3752
|
+
C.H4,
|
3753
|
+
C.H5,
|
3754
|
+
C.H6,
|
3755
|
+
C.HEAD,
|
3756
|
+
C.HEADER,
|
3757
|
+
C.HGROUP,
|
3758
|
+
C.HR,
|
3759
|
+
C.HTML,
|
3760
|
+
C.IFRAME,
|
3761
|
+
C.IMG,
|
3762
|
+
C.INPUT,
|
3763
|
+
C.LI,
|
3764
|
+
C.LINK,
|
3765
|
+
C.LISTING,
|
3766
|
+
C.MAIN,
|
3767
|
+
C.MARQUEE,
|
3768
|
+
C.MENU,
|
3769
|
+
C.META,
|
3770
|
+
C.NAV,
|
3771
|
+
C.NOEMBED,
|
3772
|
+
C.NOFRAMES,
|
3773
|
+
C.NOSCRIPT,
|
3774
|
+
C.OBJECT,
|
3775
|
+
C.OL,
|
3776
|
+
C.P,
|
3777
|
+
C.PARAM,
|
3778
|
+
C.PLAINTEXT,
|
3779
|
+
C.PRE,
|
3780
|
+
C.SCRIPT,
|
3781
|
+
C.SECTION,
|
3782
|
+
C.SELECT,
|
3783
|
+
C.SOURCE,
|
3784
|
+
C.STYLE,
|
3785
|
+
C.SUMMARY,
|
3786
|
+
C.TABLE,
|
3787
|
+
C.TBODY,
|
3788
|
+
C.TD,
|
3789
|
+
C.TEMPLATE,
|
3790
|
+
C.TEXTAREA,
|
3791
|
+
C.TFOOT,
|
3792
|
+
C.TH,
|
3793
|
+
C.THEAD,
|
3794
|
+
C.TITLE,
|
3795
|
+
C.TR,
|
3796
|
+
C.TRACK,
|
3797
|
+
C.UL,
|
3798
|
+
C.WBR,
|
3799
|
+
C.XMP
|
3800
3800
|
]),
|
3801
|
-
[_.MATHML]: /* @__PURE__ */ new Set([
|
3802
|
-
[_.SVG]: /* @__PURE__ */ new Set([
|
3801
|
+
[_.MATHML]: /* @__PURE__ */ new Set([C.MI, C.MO, C.MN, C.MS, C.MTEXT, C.ANNOTATION_XML]),
|
3802
|
+
[_.SVG]: /* @__PURE__ */ new Set([C.TITLE, C.FOREIGN_OBJECT, C.DESC]),
|
3803
3803
|
[_.XLINK]: /* @__PURE__ */ new Set(),
|
3804
3804
|
[_.XML]: /* @__PURE__ */ new Set(),
|
3805
3805
|
[_.XMLNS]: /* @__PURE__ */ new Set()
|
3806
|
-
},
|
3806
|
+
}, hi = /* @__PURE__ */ new Set([C.H1, C.H2, C.H3, C.H4, C.H5, C.H6]), Tl = /* @__PURE__ */ new Set([
|
3807
3807
|
p.STYLE,
|
3808
3808
|
p.SCRIPT,
|
3809
3809
|
p.XMP,
|
@@ -3819,7 +3819,7 @@ var d;
|
|
3819
3819
|
(function(e) {
|
3820
3820
|
e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 72] = "AMBIGUOUS_AMPERSAND";
|
3821
3821
|
})(d || (d = {}));
|
3822
|
-
const
|
3822
|
+
const De = {
|
3823
3823
|
DATA: d.DATA,
|
3824
3824
|
RCDATA: d.RCDATA,
|
3825
3825
|
RAWTEXT: d.RAWTEXT,
|
@@ -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 vi(Li, (i, s) => {
|
3860
3860
|
this.preprocessor.pos = this.entityStartPos + s - 1, this._flushCodePointConsumedAsCharacterReference(i);
|
3861
3861
|
}, a.onParseError ? {
|
3862
3862
|
missingSemicolonAfterCharacterReference: () => {
|
@@ -4002,7 +4002,7 @@ let Al = class {
|
|
4002
4002
|
}
|
4003
4003
|
emitCurrentTagToken() {
|
4004
4004
|
const t = this.currentToken;
|
4005
|
-
this.prepareToken(t), t.tagID =
|
4005
|
+
this.prepareToken(t), t.tagID = wa(t.tagName), t.type === G.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();
|
@@ -5754,7 +5754,7 @@ const Xn = /* @__PURE__ */ new Set([n.DD, n.DT, n.LI, n.OPTGROUP, n.OPTION, n.P,
|
|
5754
5754
|
n.TH,
|
5755
5755
|
n.THEAD,
|
5756
5756
|
n.TR
|
5757
|
-
]),
|
5757
|
+
]), Ca = /* @__PURE__ */ new Set([
|
5758
5758
|
n.APPLET,
|
5759
5759
|
n.CAPTION,
|
5760
5760
|
n.HTML,
|
@@ -5764,7 +5764,7 @@ const Xn = /* @__PURE__ */ new Set([n.DD, n.DT, n.LI, n.OPTGROUP, n.OPTION, n.P,
|
|
5764
5764
|
n.TD,
|
5765
5765
|
n.TEMPLATE,
|
5766
5766
|
n.TH
|
5767
|
-
]), Nl = /* @__PURE__ */ new Set([...
|
5767
|
+
]), Nl = /* @__PURE__ */ new Set([...Ca, n.OL, n.UL]), Il = /* @__PURE__ */ new Set([...Ca, n.BUTTON]), ps = /* @__PURE__ */ new Set([n.ANNOTATION_XML, n.MI, n.MN, n.MO, n.MS, n.MTEXT]), bs = /* @__PURE__ */ new Set([n.DESC, n.FOREIGN_OBJECT, n.TITLE]), Cl = /* @__PURE__ */ new Set([n.TR, n.TEMPLATE, n.HTML]), Sl = /* @__PURE__ */ new Set([n.TBODY, n.TFOOT, n.THEAD, n.TEMPLATE, n.HTML]), xl = /* @__PURE__ */ new Set([n.TABLE, n.TEMPLATE, n.HTML]), Ol = /* @__PURE__ */ new Set([n.TD, n.TH]);
|
5768
5768
|
class Dl {
|
5769
5769
|
get currentTmplContentOrNode() {
|
5770
5770
|
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
|
@@ -5821,7 +5821,7 @@ class Dl {
|
|
5821
5821
|
this.shortenToLength(i < 0 ? 0 : i);
|
5822
5822
|
}
|
5823
5823
|
popUntilNumberedHeaderPopped() {
|
5824
|
-
this.popUntilPopped(
|
5824
|
+
this.popUntilPopped(hi, _.HTML);
|
5825
5825
|
}
|
5826
5826
|
popUntilTableCellPopped() {
|
5827
5827
|
this.popUntilPopped(Ol, _.HTML);
|
@@ -5846,7 +5846,7 @@ class Dl {
|
|
5846
5846
|
this.clearBackTo(Sl, _.HTML);
|
5847
5847
|
}
|
5848
5848
|
clearBackToTableRowContext() {
|
5849
|
-
this.clearBackTo(
|
5849
|
+
this.clearBackTo(Cl, _.HTML);
|
5850
5850
|
}
|
5851
5851
|
remove(t) {
|
5852
5852
|
const a = this._indexOf(t);
|
@@ -5893,22 +5893,22 @@ class Dl {
|
|
5893
5893
|
return !0;
|
5894
5894
|
}
|
5895
5895
|
hasInScope(t) {
|
5896
|
-
return this.hasInDynamicScope(t,
|
5896
|
+
return this.hasInDynamicScope(t, Ca);
|
5897
5897
|
}
|
5898
5898
|
hasInListItemScope(t) {
|
5899
5899
|
return this.hasInDynamicScope(t, Nl);
|
5900
5900
|
}
|
5901
5901
|
hasInButtonScope(t) {
|
5902
|
-
return this.hasInDynamicScope(t,
|
5902
|
+
return this.hasInDynamicScope(t, Il);
|
5903
5903
|
}
|
5904
5904
|
hasNumberedHeaderInScope() {
|
5905
5905
|
for (let t = this.stackTop; t >= 0; t--) {
|
5906
5906
|
const a = this.tagIDs[t];
|
5907
5907
|
switch (this.treeAdapter.getNamespaceURI(this.items[t])) {
|
5908
5908
|
case _.HTML: {
|
5909
|
-
if (
|
5909
|
+
if (hi.has(a))
|
5910
5910
|
return !0;
|
5911
|
-
if (
|
5911
|
+
if (Ca.has(a))
|
5912
5912
|
return !1;
|
5913
5913
|
break;
|
5914
5914
|
}
|
@@ -5980,7 +5980,7 @@ class Dl {
|
|
5980
5980
|
this.pop();
|
5981
5981
|
}
|
5982
5982
|
}
|
5983
|
-
const
|
5983
|
+
const za = 3;
|
5984
5984
|
var Ue;
|
5985
5985
|
(function(e) {
|
5986
5986
|
e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element";
|
@@ -6008,16 +6008,16 @@ class Ll {
|
|
6008
6008
|
return i;
|
6009
6009
|
}
|
6010
6010
|
_ensureNoahArkCondition(t) {
|
6011
|
-
if (this.entries.length <
|
6011
|
+
if (this.entries.length < za)
|
6012
6012
|
return;
|
6013
6013
|
const a = this.treeAdapter.getAttrList(t), i = this._getNoahArkConditionCandidates(t, a);
|
6014
|
-
if (i.length <
|
6014
|
+
if (i.length < za)
|
6015
6015
|
return;
|
6016
6016
|
const s = new Map(a.map((r) => [r.name, r.value]));
|
6017
6017
|
let u = 0;
|
6018
6018
|
for (let r = 0; r < i.length; r++) {
|
6019
6019
|
const o = i[r];
|
6020
|
-
o.attrs.every((c) => s.get(c.name) === c.value) && (u += 1, u >=
|
6020
|
+
o.attrs.every((c) => s.get(c.name) === c.value) && (u += 1, u >= za && this.entries.splice(o.idx, 1));
|
6021
6021
|
}
|
6022
6022
|
}
|
6023
6023
|
//Mutations
|
@@ -6066,7 +6066,7 @@ const $e = {
|
|
6066
6066
|
createDocument() {
|
6067
6067
|
return {
|
6068
6068
|
nodeName: "#document",
|
6069
|
-
mode:
|
6069
|
+
mode: Le.NO_QUIRKS,
|
6070
6070
|
childNodes: []
|
6071
6071
|
};
|
6072
6072
|
},
|
@@ -6218,7 +6218,7 @@ const $e = {
|
|
6218
6218
|
updateNodeSourceCodeLocation(e, t) {
|
6219
6219
|
e.sourceCodeLocation = { ...e.sourceCodeLocation, ...t };
|
6220
6220
|
}
|
6221
|
-
}, Gn = "html",
|
6221
|
+
}, Gn = "html", vl = "about:legacy-compat", Rl = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd", Qn = [
|
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//",
|
@@ -6291,25 +6291,25 @@ function _s(e, t) {
|
|
6291
6291
|
return t.some((a) => e.startsWith(a));
|
6292
6292
|
}
|
6293
6293
|
function kl(e) {
|
6294
|
-
return e.name === Gn && e.publicId === null && (e.systemId === null || e.systemId ===
|
6294
|
+
return e.name === Gn && e.publicId === null && (e.systemId === null || e.systemId === vl);
|
6295
6295
|
}
|
6296
6296
|
function wl(e) {
|
6297
6297
|
if (e.name !== Gn)
|
6298
|
-
return
|
6298
|
+
return Le.QUIRKS;
|
6299
6299
|
const { systemId: t } = e;
|
6300
|
-
if (t && t.toLowerCase() ===
|
6301
|
-
return
|
6300
|
+
if (t && t.toLowerCase() === Rl)
|
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
|
-
return
|
6305
|
+
return Le.QUIRKS;
|
6306
6306
|
let i = t === null ? yl : Qn;
|
6307
6307
|
if (_s(a, i))
|
6308
|
-
return
|
6308
|
+
return Le.QUIRKS;
|
6309
6309
|
if (i = t === null ? jn : Pl, _s(a, i))
|
6310
|
-
return
|
6310
|
+
return Le.LIMITED_QUIRKS;
|
6311
6311
|
}
|
6312
|
-
return
|
6312
|
+
return Le.NO_QUIRKS;
|
6313
6313
|
}
|
6314
6314
|
const As = {
|
6315
6315
|
TEXT_HTML: "text/html",
|
@@ -6493,7 +6493,7 @@ function Vi(e) {
|
|
6493
6493
|
}
|
6494
6494
|
function Wl(e) {
|
6495
6495
|
const t = Yl.get(e.tagName);
|
6496
|
-
t != null && (e.tagName = t, e.tagID =
|
6496
|
+
t != null && (e.tagName = t, e.tagID = wa(e.tagName));
|
6497
6497
|
}
|
6498
6498
|
function $l(e, t) {
|
6499
6499
|
return t === _.MATHML && (e === n.MI || e === n.MO || e === n.MN || e === n.MS || e === n.MTEXT);
|
@@ -6534,7 +6534,7 @@ let Jn = class {
|
|
6534
6534
|
this.fragmentContext = i, this.scriptHandler = s, this.currentToken = null, this.stopped = !1, this.insertionMode = E.INITIAL, this.originalInsertionMode = E.INITIAL, this.headElement = null, this.formElement = null, this.currentNotInHTML = !1, this.tmplInsertionModeStack = [], this.pendingCharacterTokens = [], this.hasNonWhitespacePendingCharacterToken = !1, this.framesetOk = !0, this.skipNextNewLine = !1, this.fosterParentingEnabled = !1, this.options = {
|
6535
6535
|
...Ns,
|
6536
6536
|
...t
|
6537
|
-
}, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = a ?? this.treeAdapter.createDocument(), this.tokenizer = new Al(this.options, this), this.activeFormattingElements = new Ll(this.treeAdapter), this.fragmentContextID = i ?
|
6537
|
+
}, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = a ?? this.treeAdapter.createDocument(), this.tokenizer = new Al(this.options, this), this.activeFormattingElements = new Ll(this.treeAdapter), this.fragmentContextID = i ? wa(this.treeAdapter.getTagName(i)) : n.UNKNOWN, this._setContextModes(i ?? this.document, this.fragmentContextID), this.openElements = new Dl(this.document, this.treeAdapter, this);
|
6538
6538
|
}
|
6539
6539
|
// API
|
6540
6540
|
static parse(t, a) {
|
@@ -6594,7 +6594,7 @@ let Jn = class {
|
|
6594
6594
|
this._insertElement(t, _.HTML), this.tokenizer.state = a, this.originalInsertionMode = this.insertionMode, this.insertionMode = E.TEXT;
|
6595
6595
|
}
|
6596
6596
|
switchToPlaintextParsing() {
|
6597
|
-
this.insertionMode = E.TEXT, this.originalInsertionMode = E.IN_BODY, this.tokenizer.state =
|
6597
|
+
this.insertionMode = E.TEXT, this.originalInsertionMode = E.IN_BODY, this.tokenizer.state = De.PLAINTEXT;
|
6598
6598
|
}
|
6599
6599
|
//Fragment parsing
|
6600
6600
|
/** @protected */
|
@@ -6617,7 +6617,7 @@ let Jn = class {
|
|
6617
6617
|
switch (this.fragmentContextID) {
|
6618
6618
|
case n.TITLE:
|
6619
6619
|
case n.TEXTAREA: {
|
6620
|
-
this.tokenizer.state =
|
6620
|
+
this.tokenizer.state = De.RCDATA;
|
6621
6621
|
break;
|
6622
6622
|
}
|
6623
6623
|
case n.STYLE:
|
@@ -6626,15 +6626,15 @@ let Jn = class {
|
|
6626
6626
|
case n.NOEMBED:
|
6627
6627
|
case n.NOFRAMES:
|
6628
6628
|
case n.NOSCRIPT: {
|
6629
|
-
this.tokenizer.state =
|
6629
|
+
this.tokenizer.state = De.RAWTEXT;
|
6630
6630
|
break;
|
6631
6631
|
}
|
6632
6632
|
case n.SCRIPT: {
|
6633
|
-
this.tokenizer.state =
|
6633
|
+
this.tokenizer.state = De.SCRIPT_DATA;
|
6634
6634
|
break;
|
6635
6635
|
}
|
6636
6636
|
case n.PLAINTEXT: {
|
6637
|
-
this.tokenizer.state =
|
6637
|
+
this.tokenizer.state = De.PLAINTEXT;
|
6638
6638
|
break;
|
6639
6639
|
}
|
6640
6640
|
}
|
@@ -6974,7 +6974,7 @@ let Jn = class {
|
|
6974
6974
|
case E.IN_TABLE:
|
6975
6975
|
case E.IN_TABLE_BODY:
|
6976
6976
|
case E.IN_ROW: {
|
6977
|
-
|
6977
|
+
Ka(this, t);
|
6978
6978
|
break;
|
6979
6979
|
}
|
6980
6980
|
case E.IN_TABLE_TEXT: {
|
@@ -7033,7 +7033,7 @@ let Jn = class {
|
|
7033
7033
|
case E.IN_TABLE:
|
7034
7034
|
case E.IN_TABLE_BODY:
|
7035
7035
|
case E.IN_ROW: {
|
7036
|
-
|
7036
|
+
Ka(this, t);
|
7037
7037
|
break;
|
7038
7038
|
}
|
7039
7039
|
case E.IN_COLUMN_GROUP: {
|
@@ -7053,7 +7053,7 @@ let Jn = class {
|
|
7053
7053
|
/** @internal */
|
7054
7054
|
onComment(t) {
|
7055
7055
|
if (this.skipNextNewLine = !1, this.currentNotInHTML) {
|
7056
|
-
|
7056
|
+
di(this, t);
|
7057
7057
|
return;
|
7058
7058
|
}
|
7059
7059
|
switch (this.insertionMode) {
|
@@ -7075,7 +7075,7 @@ let Jn = class {
|
|
7075
7075
|
case E.IN_TEMPLATE:
|
7076
7076
|
case E.IN_FRAMESET:
|
7077
7077
|
case E.AFTER_FRAMESET: {
|
7078
|
-
|
7078
|
+
di(this, t);
|
7079
7079
|
break;
|
7080
7080
|
}
|
7081
7081
|
case E.IN_TABLE_TEXT: {
|
@@ -7159,7 +7159,7 @@ let Jn = class {
|
|
7159
7159
|
break;
|
7160
7160
|
}
|
7161
7161
|
case E.IN_BODY: {
|
7162
|
-
|
7162
|
+
be(this, t);
|
7163
7163
|
break;
|
7164
7164
|
}
|
7165
7165
|
case E.IN_TABLE: {
|
@@ -7179,11 +7179,11 @@ let Jn = class {
|
|
7179
7179
|
break;
|
7180
7180
|
}
|
7181
7181
|
case E.IN_TABLE_BODY: {
|
7182
|
-
|
7182
|
+
Fa(this, t);
|
7183
7183
|
break;
|
7184
7184
|
}
|
7185
7185
|
case E.IN_ROW: {
|
7186
|
-
|
7186
|
+
Ha(this, t);
|
7187
7187
|
break;
|
7188
7188
|
}
|
7189
7189
|
case E.IN_CELL: {
|
@@ -7215,7 +7215,7 @@ let Jn = class {
|
|
7215
7215
|
break;
|
7216
7216
|
}
|
7217
7217
|
case E.AFTER_AFTER_BODY: {
|
7218
|
-
|
7218
|
+
Ch(this, t);
|
7219
7219
|
break;
|
7220
7220
|
}
|
7221
7221
|
case E.AFTER_AFTER_FRAMESET: {
|
@@ -7256,7 +7256,7 @@ let Jn = class {
|
|
7256
7256
|
break;
|
7257
7257
|
}
|
7258
7258
|
case E.IN_BODY: {
|
7259
|
-
|
7259
|
+
Ua(this, t);
|
7260
7260
|
break;
|
7261
7261
|
}
|
7262
7262
|
case E.TEXT: {
|
@@ -7280,7 +7280,7 @@ let Jn = class {
|
|
7280
7280
|
break;
|
7281
7281
|
}
|
7282
7282
|
case E.IN_TABLE_BODY: {
|
7283
|
-
|
7283
|
+
fi(this, t);
|
7284
7284
|
break;
|
7285
7285
|
}
|
7286
7286
|
case E.IN_ROW: {
|
@@ -7312,7 +7312,7 @@ let Jn = class {
|
|
7312
7312
|
break;
|
7313
7313
|
}
|
7314
7314
|
case E.AFTER_FRAMESET: {
|
7315
|
-
|
7315
|
+
Ih(this, t);
|
7316
7316
|
break;
|
7317
7317
|
}
|
7318
7318
|
case E.AFTER_AFTER_BODY: {
|
@@ -7419,7 +7419,7 @@ let Jn = class {
|
|
7419
7419
|
case E.IN_TABLE:
|
7420
7420
|
case E.IN_TABLE_BODY:
|
7421
7421
|
case E.IN_ROW: {
|
7422
|
-
|
7422
|
+
Ka(this, t);
|
7423
7423
|
break;
|
7424
7424
|
}
|
7425
7425
|
case E.IN_TABLE_TEXT: {
|
@@ -7457,7 +7457,7 @@ function t0(e, t) {
|
|
7457
7457
|
return e.openElements.replace(t.element, i), t.element = i, i;
|
7458
7458
|
}
|
7459
7459
|
function a0(e, t, a) {
|
7460
|
-
const i = e.treeAdapter.getTagName(t), s =
|
7460
|
+
const i = e.treeAdapter.getTagName(t), s = wa(i);
|
7461
7461
|
if (e._isElementCausesFosterParenting(s))
|
7462
7462
|
e._fosterParentElement(a);
|
7463
7463
|
else {
|
@@ -7482,7 +7482,7 @@ function Wi(e, t) {
|
|
7482
7482
|
e.treeAdapter.detachNode(u), r && a0(e, r, u), i0(e, s, i);
|
7483
7483
|
}
|
7484
7484
|
}
|
7485
|
-
function
|
7485
|
+
function di(e, t) {
|
7486
7486
|
e._appendCommentNode(t, e.openElements.currentTmplContentOrNode);
|
7487
7487
|
}
|
7488
7488
|
function s0(e, t) {
|
@@ -7507,11 +7507,11 @@ function $i(e, t) {
|
|
7507
7507
|
}
|
7508
7508
|
function u0(e, t) {
|
7509
7509
|
e._setDocumentType(t);
|
7510
|
-
const a = t.forceQuirks ?
|
7510
|
+
const a = t.forceQuirks ? Le.QUIRKS : wl(t);
|
7511
7511
|
kl(t) || e._err(t, b.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, a), e.insertionMode = E.BEFORE_HTML;
|
7512
7512
|
}
|
7513
7513
|
function Pt(e, t) {
|
7514
|
-
e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document,
|
7514
|
+
e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Le.QUIRKS), e.insertionMode = E.BEFORE_HTML, e._processToken(t);
|
7515
7515
|
}
|
7516
7516
|
function r0(e, t) {
|
7517
7517
|
t.tagID === n.HTML ? (e._insertElement(t, _.HTML), e.insertionMode = E.BEFORE_HEAD) : Vt(e, t);
|
@@ -7526,7 +7526,7 @@ function Vt(e, t) {
|
|
7526
7526
|
function c0(e, t) {
|
7527
7527
|
switch (t.tagID) {
|
7528
7528
|
case n.HTML: {
|
7529
|
-
|
7529
|
+
be(e, t);
|
7530
7530
|
break;
|
7531
7531
|
}
|
7532
7532
|
case n.HEAD: {
|
@@ -7547,7 +7547,7 @@ function Wt(e, t) {
|
|
7547
7547
|
function Be(e, t) {
|
7548
7548
|
switch (t.tagID) {
|
7549
7549
|
case n.HTML: {
|
7550
|
-
|
7550
|
+
be(e, t);
|
7551
7551
|
break;
|
7552
7552
|
}
|
7553
7553
|
case n.BASE:
|
@@ -7559,20 +7559,20 @@ function Be(e, t) {
|
|
7559
7559
|
break;
|
7560
7560
|
}
|
7561
7561
|
case n.TITLE: {
|
7562
|
-
e._switchToTextParsing(t,
|
7562
|
+
e._switchToTextParsing(t, De.RCDATA);
|
7563
7563
|
break;
|
7564
7564
|
}
|
7565
7565
|
case n.NOSCRIPT: {
|
7566
|
-
e.options.scriptingEnabled ? e._switchToTextParsing(t,
|
7566
|
+
e.options.scriptingEnabled ? e._switchToTextParsing(t, De.RAWTEXT) : (e._insertElement(t, _.HTML), e.insertionMode = E.IN_HEAD_NO_SCRIPT);
|
7567
7567
|
break;
|
7568
7568
|
}
|
7569
7569
|
case n.NOFRAMES:
|
7570
7570
|
case n.STYLE: {
|
7571
|
-
e._switchToTextParsing(t,
|
7571
|
+
e._switchToTextParsing(t, De.RAWTEXT);
|
7572
7572
|
break;
|
7573
7573
|
}
|
7574
7574
|
case n.SCRIPT: {
|
7575
|
-
e._switchToTextParsing(t,
|
7575
|
+
e._switchToTextParsing(t, De.SCRIPT_DATA);
|
7576
7576
|
break;
|
7577
7577
|
}
|
7578
7578
|
case n.TEMPLATE: {
|
@@ -7616,7 +7616,7 @@ function $t(e, t) {
|
|
7616
7616
|
function d0(e, t) {
|
7617
7617
|
switch (t.tagID) {
|
7618
7618
|
case n.HTML: {
|
7619
|
-
|
7619
|
+
be(e, t);
|
7620
7620
|
break;
|
7621
7621
|
}
|
7622
7622
|
case n.BASEFONT:
|
@@ -7658,7 +7658,7 @@ function Xt(e, t) {
|
|
7658
7658
|
function E0(e, t) {
|
7659
7659
|
switch (t.tagID) {
|
7660
7660
|
case n.HTML: {
|
7661
|
-
|
7661
|
+
be(e, t);
|
7662
7662
|
break;
|
7663
7663
|
}
|
7664
7664
|
case n.BODY: {
|
@@ -7707,9 +7707,9 @@ function m0(e, t) {
|
|
7707
7707
|
}
|
7708
7708
|
}
|
7709
7709
|
function Gt(e, t) {
|
7710
|
-
e._insertFakeElement(p.BODY, n.BODY), e.insertionMode = E.IN_BODY,
|
7710
|
+
e._insertFakeElement(p.BODY, n.BODY), e.insertionMode = E.IN_BODY, Ba(e, t);
|
7711
7711
|
}
|
7712
|
-
function
|
7712
|
+
function Ba(e, t) {
|
7713
7713
|
switch (t.type) {
|
7714
7714
|
case G.CHARACTER: {
|
7715
7715
|
tu(e, t);
|
@@ -7720,15 +7720,15 @@ function wa(e, t) {
|
|
7720
7720
|
break;
|
7721
7721
|
}
|
7722
7722
|
case G.COMMENT: {
|
7723
|
-
|
7723
|
+
di(e, t);
|
7724
7724
|
break;
|
7725
7725
|
}
|
7726
7726
|
case G.START_TAG: {
|
7727
|
-
|
7727
|
+
be(e, t);
|
7728
7728
|
break;
|
7729
7729
|
}
|
7730
7730
|
case G.END_TAG: {
|
7731
|
-
|
7731
|
+
Ua(e, t);
|
7732
7732
|
break;
|
7733
7733
|
}
|
7734
7734
|
case G.EOF: {
|
@@ -7758,7 +7758,7 @@ function g0(e, t) {
|
|
7758
7758
|
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML);
|
7759
7759
|
}
|
7760
7760
|
function _0(e, t) {
|
7761
|
-
e.openElements.hasInButtonScope(n.P) && e._closePElement(),
|
7761
|
+
e.openElements.hasInButtonScope(n.P) && e._closePElement(), hi.has(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, _.HTML);
|
7762
7762
|
}
|
7763
7763
|
function A0(e, t) {
|
7764
7764
|
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.framesetOk = !1;
|
@@ -7767,7 +7767,7 @@ function N0(e, t) {
|
|
7767
7767
|
const a = e.openElements.tmplCount > 0;
|
7768
7768
|
(!e.formElement || a) && (e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), a || (e.formElement = e.openElements.current));
|
7769
7769
|
}
|
7770
|
-
function
|
7770
|
+
function I0(e, t) {
|
7771
7771
|
e.framesetOk = !1;
|
7772
7772
|
const a = t.tagID;
|
7773
7773
|
for (let i = e.openElements.stackTop; i >= 0; i--) {
|
@@ -7781,8 +7781,8 @@ function C0(e, t) {
|
|
7781
7781
|
}
|
7782
7782
|
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML);
|
7783
7783
|
}
|
7784
|
-
function
|
7785
|
-
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.tokenizer.state =
|
7784
|
+
function C0(e, t) {
|
7785
|
+
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.tokenizer.state = De.PLAINTEXT;
|
7786
7786
|
}
|
7787
7787
|
function S0(e, t) {
|
7788
7788
|
e.openElements.hasInScope(n.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.framesetOk = !1;
|
@@ -7800,8 +7800,8 @@ function D0(e, t) {
|
|
7800
7800
|
function L0(e, t) {
|
7801
7801
|
e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
|
7802
7802
|
}
|
7803
|
-
function
|
7804
|
-
e.treeAdapter.getDocumentMode(e.document) !==
|
7803
|
+
function v0(e, t) {
|
7804
|
+
e.treeAdapter.getDocumentMode(e.document) !== Le.QUIRKS && e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = E.IN_TABLE;
|
7805
7805
|
}
|
7806
7806
|
function au(e, t) {
|
7807
7807
|
e._reconstructActiveFormattingElements(), e._appendElement(t, _.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
|
@@ -7810,7 +7810,7 @@ function iu(e) {
|
|
7810
7810
|
const t = Wn(e, ht.TYPE);
|
7811
7811
|
return t != null && t.toLowerCase() === Ql;
|
7812
7812
|
}
|
7813
|
-
function
|
7813
|
+
function R0(e, t) {
|
7814
7814
|
e._reconstructActiveFormattingElements(), e._appendElement(t, _.HTML), iu(t) || (e.framesetOk = !1), t.ackSelfClosing = !0;
|
7815
7815
|
}
|
7816
7816
|
function y0(e, t) {
|
@@ -7823,16 +7823,16 @@ function P0(e, t) {
|
|
7823
7823
|
t.tagName = p.IMG, t.tagID = n.IMG, au(e, t);
|
7824
7824
|
}
|
7825
7825
|
function k0(e, t) {
|
7826
|
-
e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.tokenizer.state =
|
7826
|
+
e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.tokenizer.state = De.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = E.TEXT;
|
7827
7827
|
}
|
7828
7828
|
function w0(e, t) {
|
7829
|
-
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t,
|
7829
|
+
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, De.RAWTEXT);
|
7830
7830
|
}
|
7831
7831
|
function B0(e, t) {
|
7832
|
-
e.framesetOk = !1, e._switchToTextParsing(t,
|
7832
|
+
e.framesetOk = !1, e._switchToTextParsing(t, De.RAWTEXT);
|
7833
7833
|
}
|
7834
|
-
function
|
7835
|
-
e._switchToTextParsing(t,
|
7834
|
+
function Is(e, t) {
|
7835
|
+
e._switchToTextParsing(t, De.RAWTEXT);
|
7836
7836
|
}
|
7837
7837
|
function U0(e, t) {
|
7838
7838
|
e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === E.IN_TABLE || e.insertionMode === E.IN_CAPTION || e.insertionMode === E.IN_TABLE_BODY || e.insertionMode === E.IN_ROW || e.insertionMode === E.IN_CELL ? E.IN_SELECT_IN_TABLE : E.IN_SELECT;
|
@@ -7852,10 +7852,10 @@ function q0(e, t) {
|
|
7852
7852
|
function V0(e, t) {
|
7853
7853
|
e._reconstructActiveFormattingElements(), Kn(t), Vi(t), t.selfClosing ? e._appendElement(t, _.SVG) : e._insertElement(t, _.SVG), t.ackSelfClosing = !0;
|
7854
7854
|
}
|
7855
|
-
function
|
7855
|
+
function Cs(e, t) {
|
7856
7856
|
e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML);
|
7857
7857
|
}
|
7858
|
-
function
|
7858
|
+
function be(e, t) {
|
7859
7859
|
switch (t.tagID) {
|
7860
7860
|
case n.I:
|
7861
7861
|
case n.S:
|
@@ -7916,7 +7916,7 @@ function pe(e, t) {
|
|
7916
7916
|
case n.LI:
|
7917
7917
|
case n.DD:
|
7918
7918
|
case n.DT: {
|
7919
|
-
|
7919
|
+
I0(e, t);
|
7920
7920
|
break;
|
7921
7921
|
}
|
7922
7922
|
case n.BR:
|
@@ -7988,11 +7988,11 @@ function pe(e, t) {
|
|
7988
7988
|
break;
|
7989
7989
|
}
|
7990
7990
|
case n.TABLE: {
|
7991
|
-
|
7991
|
+
v0(e, t);
|
7992
7992
|
break;
|
7993
7993
|
}
|
7994
7994
|
case n.INPUT: {
|
7995
|
-
|
7995
|
+
R0(e, t);
|
7996
7996
|
break;
|
7997
7997
|
}
|
7998
7998
|
case n.PARAM:
|
@@ -8030,7 +8030,7 @@ function pe(e, t) {
|
|
8030
8030
|
}
|
8031
8031
|
case n.NOEMBED:
|
8032
8032
|
case n.NOFRAMES: {
|
8033
|
-
|
8033
|
+
Is(e, t);
|
8034
8034
|
break;
|
8035
8035
|
}
|
8036
8036
|
case n.FRAMESET: {
|
@@ -8042,11 +8042,11 @@ function pe(e, t) {
|
|
8042
8042
|
break;
|
8043
8043
|
}
|
8044
8044
|
case n.NOSCRIPT: {
|
8045
|
-
e.options.scriptingEnabled ?
|
8045
|
+
e.options.scriptingEnabled ? Is(e, t) : Cs(e, t);
|
8046
8046
|
break;
|
8047
8047
|
}
|
8048
8048
|
case n.PLAINTEXT: {
|
8049
|
-
|
8049
|
+
C0(e, t);
|
8050
8050
|
break;
|
8051
8051
|
}
|
8052
8052
|
case n.COL:
|
@@ -8062,7 +8062,7 @@ function pe(e, t) {
|
|
8062
8062
|
case n.COLGROUP:
|
8063
8063
|
break;
|
8064
8064
|
default:
|
8065
|
-
|
8065
|
+
Cs(e, t);
|
8066
8066
|
}
|
8067
8067
|
}
|
8068
8068
|
function W0(e, t) {
|
@@ -8114,7 +8114,7 @@ function su(e, t) {
|
|
8114
8114
|
break;
|
8115
8115
|
}
|
8116
8116
|
}
|
8117
|
-
function
|
8117
|
+
function Ua(e, t) {
|
8118
8118
|
switch (t.tagID) {
|
8119
8119
|
case n.A:
|
8120
8120
|
case n.B:
|
@@ -8225,7 +8225,7 @@ function eh(e, t) {
|
|
8225
8225
|
function th(e, t) {
|
8226
8226
|
e._err(t, b.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
|
8227
8227
|
}
|
8228
|
-
function
|
8228
|
+
function Ka(e, t) {
|
8229
8229
|
if (Zn.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
8231
|
case G.CHARACTER: {
|
@@ -8253,7 +8253,7 @@ function nh(e, t) {
|
|
8253
8253
|
e.openElements.clearBackToTableContext(), e._insertElement(t, _.HTML), e.insertionMode = E.IN_TABLE_BODY;
|
8254
8254
|
}
|
8255
8255
|
function uh(e, t) {
|
8256
|
-
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, n.TBODY), e.insertionMode = E.IN_TABLE_BODY,
|
8256
|
+
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, n.TBODY), e.insertionMode = E.IN_TABLE_BODY, Fa(e, t);
|
8257
8257
|
}
|
8258
8258
|
function rh(e, t) {
|
8259
8259
|
e.openElements.hasInTableScope(n.TABLE) && (e.openElements.popUntilTagNamePopped(n.TABLE), e._resetInsertionMode(), e._processStartTag(t));
|
@@ -8340,7 +8340,7 @@ function ea(e, t) {
|
|
8340
8340
|
}
|
8341
8341
|
function ua(e, t) {
|
8342
8342
|
const a = e.fosterParentingEnabled;
|
8343
|
-
e.fosterParentingEnabled = !0,
|
8343
|
+
e.fosterParentingEnabled = !0, Ba(e, t), e.fosterParentingEnabled = a;
|
8344
8344
|
}
|
8345
8345
|
function uu(e, t) {
|
8346
8346
|
e.pendingCharacterTokens.push(t);
|
@@ -8361,7 +8361,7 @@ function kt(e, t) {
|
|
8361
8361
|
const ou = /* @__PURE__ */ new Set([n.CAPTION, n.COL, n.COLGROUP, n.TBODY, n.TD, n.TFOOT, n.TH, n.THEAD, n.TR]);
|
8362
8362
|
function lh(e, t) {
|
8363
8363
|
const a = t.tagID;
|
8364
|
-
ou.has(a) ? e.openElements.hasInTableScope(n.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = E.IN_TABLE, Dt(e, t)) :
|
8364
|
+
ou.has(a) ? e.openElements.hasInTableScope(n.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = E.IN_TABLE, Dt(e, t)) : be(e, t);
|
8365
8365
|
}
|
8366
8366
|
function hh(e, t) {
|
8367
8367
|
const a = t.tagID;
|
@@ -8383,13 +8383,13 @@ function hh(e, t) {
|
|
8383
8383
|
case n.TR:
|
8384
8384
|
break;
|
8385
8385
|
default:
|
8386
|
-
|
8386
|
+
Ua(e, t);
|
8387
8387
|
}
|
8388
8388
|
}
|
8389
8389
|
function Xi(e, t) {
|
8390
8390
|
switch (t.tagID) {
|
8391
8391
|
case n.HTML: {
|
8392
|
-
|
8392
|
+
be(e, t);
|
8393
8393
|
break;
|
8394
8394
|
}
|
8395
8395
|
case n.COL: {
|
@@ -8423,7 +8423,7 @@ function dh(e, t) {
|
|
8423
8423
|
function Sa(e, t) {
|
8424
8424
|
e.openElements.currentTagId === n.COLGROUP && (e.openElements.pop(), e.insertionMode = E.IN_TABLE, e._processToken(t));
|
8425
8425
|
}
|
8426
|
-
function
|
8426
|
+
function Fa(e, t) {
|
8427
8427
|
switch (t.tagID) {
|
8428
8428
|
case n.TR: {
|
8429
8429
|
e.openElements.clearBackToTableBodyContext(), e._insertElement(t, _.HTML), e.insertionMode = E.IN_ROW;
|
@@ -8431,7 +8431,7 @@ function Ua(e, t) {
|
|
8431
8431
|
}
|
8432
8432
|
case n.TH:
|
8433
8433
|
case n.TD: {
|
8434
|
-
e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(p.TR, n.TR), e.insertionMode = E.IN_ROW,
|
8434
|
+
e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(p.TR, n.TR), e.insertionMode = E.IN_ROW, Ha(e, t);
|
8435
8435
|
break;
|
8436
8436
|
}
|
8437
8437
|
case n.CAPTION:
|
@@ -8447,7 +8447,7 @@ function Ua(e, t) {
|
|
8447
8447
|
Dt(e, t);
|
8448
8448
|
}
|
8449
8449
|
}
|
8450
|
-
function
|
8450
|
+
function fi(e, t) {
|
8451
8451
|
const a = t.tagID;
|
8452
8452
|
switch (t.tagID) {
|
8453
8453
|
case n.TBODY:
|
@@ -8473,7 +8473,7 @@ function di(e, t) {
|
|
8473
8473
|
ea(e, t);
|
8474
8474
|
}
|
8475
8475
|
}
|
8476
|
-
function
|
8476
|
+
function Ha(e, t) {
|
8477
8477
|
switch (t.tagID) {
|
8478
8478
|
case n.TH:
|
8479
8479
|
case n.TD: {
|
@@ -8487,7 +8487,7 @@ function Fa(e, t) {
|
|
8487
8487
|
case n.TFOOT:
|
8488
8488
|
case n.THEAD:
|
8489
8489
|
case n.TR: {
|
8490
|
-
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY,
|
8490
|
+
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY, Fa(e, t));
|
8491
8491
|
break;
|
8492
8492
|
}
|
8493
8493
|
default:
|
@@ -8501,13 +8501,13 @@ function cu(e, t) {
|
|
8501
8501
|
break;
|
8502
8502
|
}
|
8503
8503
|
case n.TABLE: {
|
8504
|
-
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY,
|
8504
|
+
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY, fi(e, t));
|
8505
8505
|
break;
|
8506
8506
|
}
|
8507
8507
|
case n.TBODY:
|
8508
8508
|
case n.TFOOT:
|
8509
8509
|
case n.THEAD: {
|
8510
|
-
(e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(n.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY,
|
8510
|
+
(e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(n.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY, fi(e, t));
|
8511
8511
|
break;
|
8512
8512
|
}
|
8513
8513
|
case n.BODY:
|
@@ -8524,7 +8524,7 @@ function cu(e, t) {
|
|
8524
8524
|
}
|
8525
8525
|
function fh(e, t) {
|
8526
8526
|
const a = t.tagID;
|
8527
|
-
ou.has(a) ? (e.openElements.hasInTableScope(n.TD) || e.openElements.hasInTableScope(n.TH)) && (e._closeTableCell(),
|
8527
|
+
ou.has(a) ? (e.openElements.hasInTableScope(n.TD) || e.openElements.hasInTableScope(n.TH)) && (e._closeTableCell(), Ha(e, t)) : be(e, t);
|
8528
8528
|
}
|
8529
8529
|
function Eh(e, t) {
|
8530
8530
|
const a = t.tagID;
|
@@ -8549,13 +8549,13 @@ function Eh(e, t) {
|
|
8549
8549
|
case n.HTML:
|
8550
8550
|
break;
|
8551
8551
|
default:
|
8552
|
-
|
8552
|
+
Ua(e, t);
|
8553
8553
|
}
|
8554
8554
|
}
|
8555
8555
|
function lu(e, t) {
|
8556
8556
|
switch (t.tagID) {
|
8557
8557
|
case n.HTML: {
|
8558
|
-
|
8558
|
+
be(e, t);
|
8559
8559
|
break;
|
8560
8560
|
}
|
8561
8561
|
case n.OPTION: {
|
@@ -8640,16 +8640,16 @@ function ph(e, t) {
|
|
8640
8640
|
break;
|
8641
8641
|
}
|
8642
8642
|
case n.TR: {
|
8643
|
-
e.tmplInsertionModeStack[0] = E.IN_TABLE_BODY, e.insertionMode = E.IN_TABLE_BODY,
|
8643
|
+
e.tmplInsertionModeStack[0] = E.IN_TABLE_BODY, e.insertionMode = E.IN_TABLE_BODY, Fa(e, t);
|
8644
8644
|
break;
|
8645
8645
|
}
|
8646
8646
|
case n.TD:
|
8647
8647
|
case n.TH: {
|
8648
|
-
e.tmplInsertionModeStack[0] = E.IN_ROW, e.insertionMode = E.IN_ROW,
|
8648
|
+
e.tmplInsertionModeStack[0] = E.IN_ROW, e.insertionMode = E.IN_ROW, Ha(e, t);
|
8649
8649
|
break;
|
8650
8650
|
}
|
8651
8651
|
default:
|
8652
|
-
e.tmplInsertionModeStack[0] = E.IN_BODY, e.insertionMode = E.IN_BODY,
|
8652
|
+
e.tmplInsertionModeStack[0] = E.IN_BODY, e.insertionMode = E.IN_BODY, be(e, t);
|
8653
8653
|
}
|
8654
8654
|
}
|
8655
8655
|
function bh(e, t) {
|
@@ -8659,7 +8659,7 @@ function du(e, t) {
|
|
8659
8659
|
e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(n.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : $i(e, t);
|
8660
8660
|
}
|
8661
8661
|
function gh(e, t) {
|
8662
|
-
t.tagID === n.HTML ?
|
8662
|
+
t.tagID === n.HTML ? be(e, t) : xa(e, t);
|
8663
8663
|
}
|
8664
8664
|
function fu(e, t) {
|
8665
8665
|
var a;
|
@@ -8673,12 +8673,12 @@ function fu(e, t) {
|
|
8673
8673
|
xa(e, t);
|
8674
8674
|
}
|
8675
8675
|
function xa(e, t) {
|
8676
|
-
e.insertionMode = E.IN_BODY,
|
8676
|
+
e.insertionMode = E.IN_BODY, Ba(e, t);
|
8677
8677
|
}
|
8678
8678
|
function _h(e, t) {
|
8679
8679
|
switch (t.tagID) {
|
8680
8680
|
case n.HTML: {
|
8681
|
-
|
8681
|
+
be(e, t);
|
8682
8682
|
break;
|
8683
8683
|
}
|
8684
8684
|
case n.FRAMESET: {
|
@@ -8701,7 +8701,7 @@ function Ah(e, t) {
|
|
8701
8701
|
function Nh(e, t) {
|
8702
8702
|
switch (t.tagID) {
|
8703
8703
|
case n.HTML: {
|
8704
|
-
|
8704
|
+
be(e, t);
|
8705
8705
|
break;
|
8706
8706
|
}
|
8707
8707
|
case n.NOFRAMES: {
|
@@ -8710,19 +8710,19 @@ function Nh(e, t) {
|
|
8710
8710
|
}
|
8711
8711
|
}
|
8712
8712
|
}
|
8713
|
-
function
|
8713
|
+
function Ih(e, t) {
|
8714
8714
|
t.tagID === n.HTML && (e.insertionMode = E.AFTER_AFTER_FRAMESET);
|
8715
8715
|
}
|
8716
|
-
function
|
8717
|
-
t.tagID === n.HTML ?
|
8716
|
+
function Ch(e, t) {
|
8717
|
+
t.tagID === n.HTML ? be(e, t) : ma(e, t);
|
8718
8718
|
}
|
8719
8719
|
function ma(e, t) {
|
8720
|
-
e.insertionMode = E.IN_BODY,
|
8720
|
+
e.insertionMode = E.IN_BODY, Ba(e, t);
|
8721
8721
|
}
|
8722
8722
|
function Sh(e, t) {
|
8723
8723
|
switch (t.tagID) {
|
8724
8724
|
case n.HTML: {
|
8725
|
-
|
8725
|
+
be(e, t);
|
8726
8726
|
break;
|
8727
8727
|
}
|
8728
8728
|
case n.NOFRAMES: {
|
@@ -8767,7 +8767,7 @@ function Lh(e, t) {
|
|
8767
8767
|
}
|
8768
8768
|
}
|
8769
8769
|
}
|
8770
|
-
const
|
8770
|
+
const vh = /* @__PURE__ */ new Set([
|
8771
8771
|
p.AREA,
|
8772
8772
|
p.BASE,
|
8773
8773
|
p.BASEFONT,
|
@@ -8787,8 +8787,8 @@ const Rh = /* @__PURE__ */ new Set([
|
|
8787
8787
|
p.TRACK,
|
8788
8788
|
p.WBR
|
8789
8789
|
]);
|
8790
|
-
function
|
8791
|
-
return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === _.HTML &&
|
8790
|
+
function Rh(e, t) {
|
8791
|
+
return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === _.HTML && vh.has(t.treeAdapter.getTagName(e));
|
8792
8792
|
}
|
8793
8793
|
const yh = { treeAdapter: $e, scriptingEnabled: !0 };
|
8794
8794
|
function Mh(e, t) {
|
@@ -8808,7 +8808,7 @@ function mu(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)}>${Rh(e, t) ? "" : `${Ph(e, t)}</${a}>`}`;
|
8812
8812
|
}
|
8813
8813
|
function wh(e, { treeAdapter: t }) {
|
8814
8814
|
let a = "";
|
@@ -8864,13 +8864,13 @@ function qh(e, t, a) {
|
|
8864
8864
|
}
|
8865
8865
|
const ze = {
|
8866
8866
|
// Re-exports from domhandler
|
8867
|
-
isCommentNode:
|
8867
|
+
isCommentNode: va,
|
8868
8868
|
isElementNode: k,
|
8869
8869
|
isTextNode: He,
|
8870
8870
|
//Node construction
|
8871
8871
|
createDocument() {
|
8872
8872
|
const e = new dt([]);
|
8873
|
-
return e["x-mode"] =
|
8873
|
+
return e["x-mode"] = Le.NO_QUIRKS, e;
|
8874
8874
|
},
|
8875
8875
|
createDocumentFragment() {
|
8876
8876
|
return new dt([]);
|
@@ -8907,7 +8907,7 @@ const ze = {
|
|
8907
8907
|
},
|
8908
8908
|
setDocumentType(e, t, a, i) {
|
8909
8909
|
const s = qh(t, a, i);
|
8910
|
-
let u = e.children.find((r) =>
|
8910
|
+
let u = e.children.find((r) => ti(r) && r.name === "!doctype");
|
8911
8911
|
u ? u.data = s ?? null : (u = new xi("!doctype", s), ze.appendChild(e, u)), u["x-name"] = t, u["x-publicId"] = a, u["x-systemId"] = i;
|
8912
8912
|
},
|
8913
8913
|
setDocumentMode(e, t) {
|
@@ -8976,7 +8976,7 @@ const ze = {
|
|
8976
8976
|
},
|
8977
8977
|
//Node types
|
8978
8978
|
isDocumentTypeNode(e) {
|
8979
|
-
return
|
8979
|
+
return ti(e) && e.name === "!doctype";
|
8980
8980
|
},
|
8981
8981
|
// Source code location
|
8982
8982
|
setNodeSourceCodeLocation(e, t) {
|
@@ -9010,28 +9010,28 @@ function $h(e) {
|
|
9010
9010
|
}
|
9011
9011
|
return a;
|
9012
9012
|
}
|
9013
|
-
var
|
9013
|
+
var R;
|
9014
9014
|
(function(e) {
|
9015
9015
|
e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
|
9016
|
-
})(
|
9016
|
+
})(R || (R = {}));
|
9017
9017
|
var N;
|
9018
9018
|
(function(e) {
|
9019
9019
|
e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
|
9020
9020
|
})(N || (N = {}));
|
9021
9021
|
function We(e) {
|
9022
|
-
return e ===
|
9022
|
+
return e === R.Space || e === R.NewLine || e === R.Tab || e === R.FormFeed || e === R.CarriageReturn;
|
9023
9023
|
}
|
9024
9024
|
function la(e) {
|
9025
|
-
return e ===
|
9025
|
+
return e === R.Slash || e === R.Gt || We(e);
|
9026
9026
|
}
|
9027
9027
|
function Xh(e) {
|
9028
|
-
return e >=
|
9028
|
+
return e >= R.LowerA && e <= R.LowerZ || e >= R.UpperA && e <= R.UpperZ;
|
9029
9029
|
}
|
9030
9030
|
var Fe;
|
9031
9031
|
(function(e) {
|
9032
9032
|
e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
|
9033
9033
|
})(Fe || (Fe = {}));
|
9034
|
-
const
|
9034
|
+
const pe = {
|
9035
9035
|
Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
|
9036
9036
|
// CDATA[
|
9037
9037
|
CdataEnd: new Uint8Array([93, 93, 62]),
|
@@ -9060,7 +9060,7 @@ const Te = {
|
|
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 vi(t ? en : Li, (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;
|
@@ -9078,7 +9078,7 @@ class Gh {
|
|
9078
9078
|
this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
|
9079
9079
|
}
|
9080
9080
|
stateText(t) {
|
9081
|
-
t ===
|
9081
|
+
t === R.Lt || !this.decodeEntities && this.fastForwardTo(R.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = N.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === R.Amp && this.startEntity();
|
9082
9082
|
}
|
9083
9083
|
stateSpecialStartSequence(t) {
|
9084
9084
|
const a = this.sequenceIndex === this.currentSequence.length;
|
@@ -9099,7 +9099,7 @@ class Gh {
|
|
9099
9099
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
9100
9100
|
stateInSpecialTag(t) {
|
9101
9101
|
if (this.sequenceIndex === this.currentSequence.length) {
|
9102
|
-
if (t ===
|
9102
|
+
if (t === R.Gt || We(t)) {
|
9103
9103
|
const a = this.index - this.currentSequence.length;
|
9104
9104
|
if (this.sectionStart < a) {
|
9105
9105
|
const i = this.index;
|
@@ -9110,10 +9110,10 @@ class Gh {
|
|
9110
9110
|
}
|
9111
9111
|
this.sequenceIndex = 0;
|
9112
9112
|
}
|
9113
|
-
(t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence ===
|
9113
|
+
(t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === pe.TitleEnd ? this.decodeEntities && t === R.Amp && this.startEntity() : this.fastForwardTo(R.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === R.Lt);
|
9114
9114
|
}
|
9115
9115
|
stateCDATASequence(t) {
|
9116
|
-
t ===
|
9116
|
+
t === pe.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === pe.Cdata.length && (this.state = N.InCommentLike, this.currentSequence = pe.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = N.InDeclaration, this.stateInDeclaration(t));
|
9117
9117
|
}
|
9118
9118
|
/**
|
9119
9119
|
* When we wait for one specific character, we can speed things up
|
@@ -9136,7 +9136,7 @@ class Gh {
|
|
9136
9136
|
* - All characters but the start character of the sequence can be skipped.
|
9137
9137
|
*/
|
9138
9138
|
stateInCommentLike(t) {
|
9139
|
-
t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence ===
|
9139
|
+
t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === pe.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = N.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
|
9140
9140
|
}
|
9141
9141
|
/**
|
9142
9142
|
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
|
@@ -9151,76 +9151,76 @@ class Gh {
|
|
9151
9151
|
this.isSpecial = !0, this.currentSequence = t, this.sequenceIndex = a, this.state = N.SpecialStartSequence;
|
9152
9152
|
}
|
9153
9153
|
stateBeforeTagName(t) {
|
9154
|
-
if (t ===
|
9154
|
+
if (t === R.ExclamationMark)
|
9155
9155
|
this.state = N.BeforeDeclaration, this.sectionStart = this.index + 1;
|
9156
|
-
else if (t ===
|
9156
|
+
else if (t === R.Questionmark)
|
9157
9157
|
this.state = N.InProcessingInstruction, this.sectionStart = this.index + 1;
|
9158
9158
|
else if (this.isTagStartChar(t)) {
|
9159
9159
|
const a = t | 32;
|
9160
|
-
this.sectionStart = this.index, this.xmlMode ? this.state = N.InTagName : a ===
|
9161
|
-
} else t ===
|
9160
|
+
this.sectionStart = this.index, this.xmlMode ? this.state = N.InTagName : a === pe.ScriptEnd[2] ? this.state = N.BeforeSpecialS : a === pe.TitleEnd[2] ? this.state = N.BeforeSpecialT : this.state = N.InTagName;
|
9161
|
+
} else t === R.Slash ? this.state = N.BeforeClosingTagName : (this.state = N.Text, this.stateText(t));
|
9162
9162
|
}
|
9163
9163
|
stateInTagName(t) {
|
9164
9164
|
la(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
9165
9165
|
}
|
9166
9166
|
stateBeforeClosingTagName(t) {
|
9167
|
-
We(t) || (t ===
|
9167
|
+
We(t) || (t === R.Gt ? this.state = N.Text : (this.state = this.isTagStartChar(t) ? N.InClosingTagName : N.InSpecialComment, this.sectionStart = this.index));
|
9168
9168
|
}
|
9169
9169
|
stateInClosingTagName(t) {
|
9170
|
-
(t ===
|
9170
|
+
(t === R.Gt || We(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = N.AfterClosingTagName, this.stateAfterClosingTagName(t));
|
9171
9171
|
}
|
9172
9172
|
stateAfterClosingTagName(t) {
|
9173
|
-
(t ===
|
9173
|
+
(t === R.Gt || this.fastForwardTo(R.Gt)) && (this.state = N.Text, this.sectionStart = this.index + 1);
|
9174
9174
|
}
|
9175
9175
|
stateBeforeAttributeName(t) {
|
9176
|
-
t ===
|
9176
|
+
t === R.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = N.InSpecialTag, this.sequenceIndex = 0) : this.state = N.Text, this.sectionStart = this.index + 1) : t === R.Slash ? this.state = N.InSelfClosingTag : We(t) || (this.state = N.InAttributeName, this.sectionStart = this.index);
|
9177
9177
|
}
|
9178
9178
|
stateInSelfClosingTag(t) {
|
9179
|
-
t ===
|
9179
|
+
t === R.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = N.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : We(t) || (this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
9180
9180
|
}
|
9181
9181
|
stateInAttributeName(t) {
|
9182
|
-
(t ===
|
9182
|
+
(t === R.Eq || la(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = N.AfterAttributeName, this.stateAfterAttributeName(t));
|
9183
9183
|
}
|
9184
9184
|
stateAfterAttributeName(t) {
|
9185
|
-
t ===
|
9185
|
+
t === R.Eq ? this.state = N.BeforeAttributeValue : t === R.Slash || t === R.Gt ? (this.cbs.onattribend(Fe.NoValue, this.sectionStart), this.sectionStart = -1, this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t)) : We(t) || (this.cbs.onattribend(Fe.NoValue, this.sectionStart), this.state = N.InAttributeName, this.sectionStart = this.index);
|
9186
9186
|
}
|
9187
9187
|
stateBeforeAttributeValue(t) {
|
9188
|
-
t ===
|
9188
|
+
t === R.DoubleQuote ? (this.state = N.InAttributeValueDq, this.sectionStart = this.index + 1) : t === R.SingleQuote ? (this.state = N.InAttributeValueSq, this.sectionStart = this.index + 1) : We(t) || (this.sectionStart = this.index, this.state = N.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
|
9189
9189
|
}
|
9190
9190
|
handleInAttributeValue(t, a) {
|
9191
|
-
t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a ===
|
9191
|
+
t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a === R.DoubleQuote ? Fe.Double : Fe.Single, this.index + 1), this.state = N.BeforeAttributeName) : this.decodeEntities && t === R.Amp && this.startEntity();
|
9192
9192
|
}
|
9193
9193
|
stateInAttributeValueDoubleQuotes(t) {
|
9194
|
-
this.handleInAttributeValue(t,
|
9194
|
+
this.handleInAttributeValue(t, R.DoubleQuote);
|
9195
9195
|
}
|
9196
9196
|
stateInAttributeValueSingleQuotes(t) {
|
9197
|
-
this.handleInAttributeValue(t,
|
9197
|
+
this.handleInAttributeValue(t, R.SingleQuote);
|
9198
9198
|
}
|
9199
9199
|
stateInAttributeValueNoQuotes(t) {
|
9200
|
-
We(t) || t ===
|
9200
|
+
We(t) || t === R.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(Fe.Unquoted, this.index), this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === R.Amp && this.startEntity();
|
9201
9201
|
}
|
9202
9202
|
stateBeforeDeclaration(t) {
|
9203
|
-
t ===
|
9203
|
+
t === R.OpeningSquareBracket ? (this.state = N.CDATASequence, this.sequenceIndex = 0) : this.state = t === R.Dash ? N.BeforeComment : N.InDeclaration;
|
9204
9204
|
}
|
9205
9205
|
stateInDeclaration(t) {
|
9206
|
-
(t ===
|
9206
|
+
(t === R.Gt || this.fastForwardTo(R.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = N.Text, this.sectionStart = this.index + 1);
|
9207
9207
|
}
|
9208
9208
|
stateInProcessingInstruction(t) {
|
9209
|
-
(t ===
|
9209
|
+
(t === R.Gt || this.fastForwardTo(R.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = N.Text, this.sectionStart = this.index + 1);
|
9210
9210
|
}
|
9211
9211
|
stateBeforeComment(t) {
|
9212
|
-
t ===
|
9212
|
+
t === R.Dash ? (this.state = N.InCommentLike, this.currentSequence = pe.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = N.InDeclaration;
|
9213
9213
|
}
|
9214
9214
|
stateInSpecialComment(t) {
|
9215
|
-
(t ===
|
9215
|
+
(t === R.Gt || this.fastForwardTo(R.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = N.Text, this.sectionStart = this.index + 1);
|
9216
9216
|
}
|
9217
9217
|
stateBeforeSpecialS(t) {
|
9218
9218
|
const a = t | 32;
|
9219
|
-
a ===
|
9219
|
+
a === pe.ScriptEnd[3] ? this.startSpecial(pe.ScriptEnd, 4) : a === pe.StyleEnd[3] ? this.startSpecial(pe.StyleEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
|
9220
9220
|
}
|
9221
9221
|
stateBeforeSpecialT(t) {
|
9222
9222
|
const a = t | 32;
|
9223
|
-
a ===
|
9223
|
+
a === pe.TitleEnd[3] ? this.startSpecial(pe.TitleEnd, 4) : a === pe.TextareaEnd[3] ? this.startSpecial(pe.TextareaEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
|
9224
9224
|
}
|
9225
9225
|
startEntity() {
|
9226
9226
|
this.baseState = this.state, this.state = N.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? Pe.Strict : this.baseState === N.Text || this.baseState === N.InSpecialTag ? Pe.Legacy : Pe.Attribute);
|
@@ -9362,7 +9362,7 @@ class Gh {
|
|
9362
9362
|
/** Handle any trailing data. */
|
9363
9363
|
handleTrailingData() {
|
9364
9364
|
const t = this.buffer.length + this.offset;
|
9365
|
-
this.sectionStart >= t || (this.state === N.InCommentLike ? this.currentSequence ===
|
9365
|
+
this.sectionStart >= t || (this.state === N.InCommentLike ? this.currentSequence === pe.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === N.InTagName || this.state === N.BeforeAttributeName || this.state === N.BeforeAttributeValue || this.state === N.AfterAttributeName || this.state === N.InAttributeName || this.state === N.InAttributeValueSq || this.state === N.InAttributeValueDq || this.state === N.InAttributeValueNq || this.state === N.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
|
9366
9366
|
}
|
9367
9367
|
emitCodePoint(t, a) {
|
9368
9368
|
this.baseState !== N.Text && this.baseState !== N.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + a, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + a, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
|
@@ -9444,7 +9444,7 @@ const bt = /* @__PURE__ */ new Set([
|
|
9444
9444
|
"source",
|
9445
9445
|
"track",
|
9446
9446
|
"wbr"
|
9447
|
-
]), Ls = /* @__PURE__ */ new Set(["math", "svg"]),
|
9447
|
+
]), Ls = /* @__PURE__ */ new Set(["math", "svg"]), vs = /* @__PURE__ */ new Set([
|
9448
9448
|
"mi",
|
9449
9449
|
"mo",
|
9450
9450
|
"mn",
|
@@ -9470,7 +9470,7 @@ class Kh {
|
|
9470
9470
|
/** @internal */
|
9471
9471
|
ontextentity(t, a) {
|
9472
9472
|
var i, s;
|
9473
|
-
this.endIndex = a - 1, (s = (i = this.cbs).ontext) === null || s === void 0 || s.call(i,
|
9473
|
+
this.endIndex = a - 1, (s = (i = this.cbs).ontext) === null || s === void 0 || s.call(i, ai(t)), this.startIndex = a;
|
9474
9474
|
}
|
9475
9475
|
/**
|
9476
9476
|
* Checks if the current tag is a void element. Override this if you want
|
@@ -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 && (Ls.has(t) ? this.foreignContext.unshift(!0) :
|
9497
|
+
this.isVoidElement(t) || (this.stack.unshift(t), this.htmlMode && (Ls.has(t) ? this.foreignContext.unshift(!0) : vs.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,14 +9509,14 @@ 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 && (Ls.has(m) ||
|
9512
|
+
if (this.lowerCaseTagNames && (m = m.toLowerCase()), this.htmlMode && (Ls.has(m) || vs.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);
|
9516
9516
|
if (T !== -1)
|
9517
9517
|
for (let A = 0; A <= T; A++) {
|
9518
|
-
const
|
9519
|
-
(s = (i = this.cbs).onclosetag) === null || s === void 0 || s.call(i,
|
9518
|
+
const I = this.stack.shift();
|
9519
|
+
(s = (i = this.cbs).onclosetag) === null || s === void 0 || s.call(i, I, A !== T);
|
9520
9520
|
}
|
9521
9521
|
else this.htmlMode && m === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
|
9522
9522
|
}
|
@@ -9543,7 +9543,7 @@ class Kh {
|
|
9543
9543
|
}
|
9544
9544
|
/** @internal */
|
9545
9545
|
onattribentity(t) {
|
9546
|
-
this.attribvalue +=
|
9546
|
+
this.attribvalue += ai(t);
|
9547
9547
|
}
|
9548
9548
|
/** @internal */
|
9549
9549
|
onattribend(t, a) {
|
@@ -9584,8 +9584,8 @@ class Kh {
|
|
9584
9584
|
oncdata(t, a, i) {
|
9585
9585
|
var s, u, r, o, c, h, f, m, T, A;
|
9586
9586
|
this.endIndex = a;
|
9587
|
-
const
|
9588
|
-
!this.htmlMode || this.options.recognizeCDATA ? ((u = (s = this.cbs).oncdatastart) === null || u === void 0 || u.call(s), (o = (r = this.cbs).ontext) === null || o === void 0 || o.call(r,
|
9587
|
+
const I = this.getSlice(t, a - i);
|
9588
|
+
!this.htmlMode || this.options.recognizeCDATA ? ((u = (s = this.cbs).oncdatastart) === null || u === void 0 || u.call(s), (o = (r = this.cbs).ontext) === null || o === void 0 || o.call(r, I), (h = (c = this.cbs).oncdataend) === null || h === void 0 || h.call(c)) : ((m = (f = this.cbs).oncomment) === null || m === void 0 || m.call(f, `[CDATA[${I}]]`), (A = (T = this.cbs).oncommentend) === null || A === void 0 || A.call(T)), this.startIndex = a + 1;
|
9589
9589
|
}
|
9590
9590
|
/** @internal */
|
9591
9591
|
onend() {
|
@@ -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)),
|
9691
|
-
var
|
9690
|
+
const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), Rs = rl(Jh, (e, t) => t._useHtmlParser2 ? Ra(e, t) : $h(e));
|
9691
|
+
var te = /* @__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))(te || {});
|
9692
9692
|
const ed = Ge({
|
9693
9693
|
name: "CustomIcon",
|
9694
9694
|
props: {
|
@@ -9710,13 +9710,13 @@ const ed = Ge({
|
|
9710
9710
|
};
|
9711
9711
|
function td(e, t, a, i, s, u) {
|
9712
9712
|
return B(), V("span", {
|
9713
|
-
class:
|
9713
|
+
class: Da(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
|
9714
9714
|
}, null, 2);
|
9715
9715
|
}
|
9716
9716
|
const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
9717
9717
|
key: 0,
|
9718
9718
|
contenteditable: "false",
|
9719
|
-
class: /* @__PURE__ */
|
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"])
|
9720
9720
|
}, sd = { class: "flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden" }, nd = { class: "flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]" }, ud = { class: "p-8 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, rd = /* @__PURE__ */ Ge({
|
9721
9721
|
__name: "IconModal",
|
9722
9722
|
props: {
|
@@ -9748,7 +9748,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
|
9748
9748
|
m[1] || (m[1] = S("span", { class: "text-base font-semibold text-[#333]" }, "选择图标", -1)),
|
9749
9749
|
S("span", {
|
9750
9750
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
9751
|
-
onClick: m[0] || (m[0] =
|
9751
|
+
onClick: m[0] || (m[0] = he((T) => h(), ["stop"]))
|
9752
9752
|
})
|
9753
9753
|
]),
|
9754
9754
|
S("div", ud, [
|
@@ -9756,7 +9756,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
|
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,
|
9759
|
-
onClick:
|
9759
|
+
onClick: he((A) => c(T), ["stop"]),
|
9760
9760
|
title: T
|
9761
9761
|
}, null, 8, ["iconName", "onClick", "title"]))), 128))
|
9762
9762
|
])
|
@@ -9811,11 +9811,11 @@ const od = /* @__PURE__ */ Ge({
|
|
9811
9811
|
class: "bg-background-deep box-border cursor-pointer absolute left-0 top-0",
|
9812
9812
|
title: "点击上传"
|
9813
9813
|
}, r.$attrs, {
|
9814
|
-
onClick: o[2] || (o[2] =
|
9814
|
+
onClick: o[2] || (o[2] = he(() => {
|
9815
9815
|
}, ["stop"]))
|
9816
9816
|
}), [
|
9817
9817
|
S("input", {
|
9818
|
-
onClick: o[0] || (o[0] =
|
9818
|
+
onClick: o[0] || (o[0] = he(() => {
|
9819
9819
|
}, ["stop"])),
|
9820
9820
|
contenteditable: "false",
|
9821
9821
|
class: "cursor-pointer w-16 opacity-0",
|
@@ -9872,13 +9872,13 @@ function pu(e) {
|
|
9872
9872
|
var t = cd(e, "string");
|
9873
9873
|
return typeof t == "symbol" ? t : t + "";
|
9874
9874
|
}
|
9875
|
-
function
|
9875
|
+
function Ei(e) {
|
9876
9876
|
"@babel/helpers - typeof";
|
9877
|
-
return
|
9877
|
+
return Ei = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
9878
9878
|
return typeof t;
|
9879
9879
|
} : function(t) {
|
9880
9880
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
9881
|
-
},
|
9881
|
+
}, Ei(e);
|
9882
9882
|
}
|
9883
9883
|
function ld(e, t) {
|
9884
9884
|
if (!(e instanceof t))
|
@@ -9907,20 +9907,20 @@ function bu(e) {
|
|
9907
9907
|
return fd(e) || Ed(e) || md(e) || Td();
|
9908
9908
|
}
|
9909
9909
|
function fd(e) {
|
9910
|
-
if (Array.isArray(e)) return
|
9910
|
+
if (Array.isArray(e)) return mi(e);
|
9911
9911
|
}
|
9912
9912
|
function Ed(e) {
|
9913
9913
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
9914
9914
|
}
|
9915
9915
|
function md(e, t) {
|
9916
9916
|
if (e) {
|
9917
|
-
if (typeof e == "string") return
|
9917
|
+
if (typeof e == "string") return mi(e, t);
|
9918
9918
|
var a = Object.prototype.toString.call(e).slice(8, -1);
|
9919
9919
|
if (a === "Object" && e.constructor && (a = e.constructor.name), a === "Map" || a === "Set") return Array.from(e);
|
9920
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return
|
9920
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return mi(e, t);
|
9921
9921
|
}
|
9922
9922
|
}
|
9923
|
-
function
|
9923
|
+
function mi(e, t) {
|
9924
9924
|
(t == null || t > e.length) && (t = e.length);
|
9925
9925
|
for (var a = 0, i = new Array(t); a < t; a++) i[a] = e[a];
|
9926
9926
|
return i;
|
@@ -9929,7 +9929,7 @@ function Td() {
|
|
9929
9929
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
9930
9930
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
9931
9931
|
}
|
9932
|
-
var
|
9932
|
+
var Ya = typeof window < "u" && typeof window.document < "u", qe = Ya ? window : {}, Gi = Ya && qe.document.documentElement ? "ontouchstart" in qe.document.documentElement : !1, Qi = Ya ? "PointerEvent" in qe : !1, ae = "cropper", ji = "all", gu = "crop", _u = "move", Au = "zoom", ut = "e", rt = "w", gt = "s", Qe = "n", wt = "ne", Bt = "nw", Ut = "se", Ft = "sw", Ti = "".concat(ae, "-crop"), ks = "".concat(ae, "-disabled"), Oe = "".concat(ae, "-hidden"), ws = "".concat(ae, "-hide"), pd = "".concat(ae, "-invisible"), Oa = "".concat(ae, "-modal"), pi = "".concat(ae, "-move"), ta = "".concat(ae, "Action"), ha = "".concat(ae, "Preview"), zi = "crop", Nu = "move", Iu = "none", bi = "crop", gi = "cropend", _i = "cropmove", Ai = "cropstart", Bs = "dblclick", bd = Gi ? "touchstart" : "mousedown", gd = Gi ? "touchmove" : "mousemove", _d = Gi ? "touchend touchcancel" : "mouseup", Us = Qi ? "pointerdown" : bd, Fs = Qi ? "pointermove" : gd, Hs = Qi ? "pointerup pointercancel" : _d, Ys = "ready", qs = "resize", Vs = "wheel", Ni = "zoom", Ws = "image/jpeg", Ad = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Nd = /^data:/, Id = /^data:image\/jpeg;base64,/, Cd = /^img|canvas$/i, Cu = 200, Su = 100, $s = {
|
9933
9933
|
// Define the view mode of the cropper
|
9934
9934
|
viewMode: 0,
|
9935
9935
|
// 0, 1, 2, 3
|
@@ -9991,7 +9991,7 @@ var Ha = typeof window < "u" && typeof window.document < "u", qe = Ha ? window :
|
|
9991
9991
|
minCanvasHeight: 0,
|
9992
9992
|
minCropBoxWidth: 0,
|
9993
9993
|
minCropBoxHeight: 0,
|
9994
|
-
minContainerWidth:
|
9994
|
+
minContainerWidth: Cu,
|
9995
9995
|
minContainerHeight: Su,
|
9996
9996
|
// Shortcuts of events
|
9997
9997
|
ready: null,
|
@@ -10007,11 +10007,11 @@ function W(e) {
|
|
10007
10007
|
var Xs = function(t) {
|
10008
10008
|
return t > 0 && t < 1 / 0;
|
10009
10009
|
};
|
10010
|
-
function
|
10010
|
+
function Za(e) {
|
10011
10011
|
return typeof e > "u";
|
10012
10012
|
}
|
10013
10013
|
function Et(e) {
|
10014
|
-
return
|
10014
|
+
return Ei(e) === "object" && e !== null;
|
10015
10015
|
}
|
10016
10016
|
var Od = Object.prototype.hasOwnProperty;
|
10017
10017
|
function _t(e) {
|
@@ -10024,21 +10024,21 @@ function _t(e) {
|
|
10024
10024
|
return !1;
|
10025
10025
|
}
|
10026
10026
|
}
|
10027
|
-
function
|
10027
|
+
function Se(e) {
|
10028
10028
|
return typeof e == "function";
|
10029
10029
|
}
|
10030
10030
|
var Dd = Array.prototype.slice;
|
10031
10031
|
function xu(e) {
|
10032
10032
|
return Array.from ? Array.from(e) : Dd.call(e);
|
10033
10033
|
}
|
10034
|
-
function
|
10035
|
-
return e &&
|
10034
|
+
function ce(e, t) {
|
10035
|
+
return e && Se(t) && (Array.isArray(e) || W(e.length) ? xu(e).forEach(function(a, i) {
|
10036
10036
|
t.call(e, a, i, e);
|
10037
10037
|
}) : Et(e) && Object.keys(e).forEach(function(a) {
|
10038
10038
|
t.call(e, e[a], a, e);
|
10039
10039
|
})), e;
|
10040
10040
|
}
|
10041
|
-
var
|
10041
|
+
var ie = Object.assign || function(t) {
|
10042
10042
|
for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
|
10043
10043
|
i[s - 1] = arguments[s];
|
10044
10044
|
return Et(t) && i.length > 0 && i.forEach(function(u) {
|
@@ -10047,25 +10047,25 @@ var ae = Object.assign || function(t) {
|
|
10047
10047
|
});
|
10048
10048
|
}), t;
|
10049
10049
|
}, Ld = /\.\d*(?:0|9){12}\d*$/;
|
10050
|
-
function
|
10050
|
+
function It(e) {
|
10051
10051
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
|
10052
10052
|
return Ld.test(e) ? Math.round(e * t) / t : e;
|
10053
10053
|
}
|
10054
|
-
var
|
10054
|
+
var vd = /^width|height|left|top|marginLeft|marginTop$/;
|
10055
10055
|
function et(e, t) {
|
10056
10056
|
var a = e.style;
|
10057
|
-
|
10058
|
-
|
10057
|
+
ce(t, function(i, s) {
|
10058
|
+
vd.test(s) && W(i) && (i = "".concat(i, "px")), a[s] = i;
|
10059
10059
|
});
|
10060
10060
|
}
|
10061
|
-
function
|
10061
|
+
function Rd(e, t) {
|
10062
10062
|
return e.classList ? e.classList.contains(t) : e.className.indexOf(t) > -1;
|
10063
10063
|
}
|
10064
|
-
function
|
10064
|
+
function Ee(e, t) {
|
10065
10065
|
if (t) {
|
10066
10066
|
if (W(e.length)) {
|
10067
|
-
|
10068
|
-
|
10067
|
+
ce(e, function(i) {
|
10068
|
+
Ee(i, t);
|
10069
10069
|
});
|
10070
10070
|
return;
|
10071
10071
|
}
|
@@ -10080,7 +10080,7 @@ function de(e, t) {
|
|
10080
10080
|
function Ye(e, t) {
|
10081
10081
|
if (t) {
|
10082
10082
|
if (W(e.length)) {
|
10083
|
-
|
10083
|
+
ce(e, function(a) {
|
10084
10084
|
Ye(a, t);
|
10085
10085
|
});
|
10086
10086
|
return;
|
@@ -10095,19 +10095,19 @@ function Ye(e, t) {
|
|
10095
10095
|
function At(e, t, a) {
|
10096
10096
|
if (t) {
|
10097
10097
|
if (W(e.length)) {
|
10098
|
-
|
10098
|
+
ce(e, function(i) {
|
10099
10099
|
At(i, t, a);
|
10100
10100
|
});
|
10101
10101
|
return;
|
10102
10102
|
}
|
10103
|
-
a ?
|
10103
|
+
a ? Ee(e, t) : Ye(e, t);
|
10104
10104
|
}
|
10105
10105
|
}
|
10106
10106
|
var yd = /([a-z\d])([A-Z])/g;
|
10107
10107
|
function Ki(e) {
|
10108
10108
|
return e.replace(yd, "$1-$2").toLowerCase();
|
10109
10109
|
}
|
10110
|
-
function
|
10110
|
+
function Ii(e, t) {
|
10111
10111
|
return Et(e[t]) ? e[t] : e.dataset ? e.dataset[t] : e.getAttribute("data-".concat(Ki(t)));
|
10112
10112
|
}
|
10113
10113
|
function aa(e, t, a) {
|
@@ -10131,7 +10131,7 @@ function Md(e, t) {
|
|
10131
10131
|
}
|
10132
10132
|
var Ou = /\s\s*/, Du = function() {
|
10133
10133
|
var e = !1;
|
10134
|
-
if (
|
10134
|
+
if (Ya) {
|
10135
10135
|
var t = !1, a = function() {
|
10136
10136
|
}, i = Object.defineProperty({}, "once", {
|
10137
10137
|
get: function() {
|
@@ -10175,9 +10175,9 @@ function ye(e, t, a) {
|
|
10175
10175
|
e.addEventListener(u, s, i);
|
10176
10176
|
});
|
10177
10177
|
}
|
10178
|
-
function
|
10178
|
+
function Ct(e, t, a) {
|
10179
10179
|
var i;
|
10180
|
-
return
|
10180
|
+
return Se(Event) && Se(CustomEvent) ? i = new CustomEvent(t, {
|
10181
10181
|
detail: a,
|
10182
10182
|
bubbles: !0,
|
10183
10183
|
cancelable: !0
|
@@ -10190,10 +10190,10 @@ function Lu(e) {
|
|
10190
10190
|
top: t.top + (window.pageYOffset - document.documentElement.clientTop)
|
10191
10191
|
};
|
10192
10192
|
}
|
10193
|
-
var
|
10193
|
+
var Ja = qe.location, Pd = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
|
10194
10194
|
function Gs(e) {
|
10195
10195
|
var t = e.match(Pd);
|
10196
|
-
return t !== null && (t[1] !==
|
10196
|
+
return t !== null && (t[1] !== Ja.protocol || t[2] !== Ja.hostname || t[3] !== Ja.port);
|
10197
10197
|
}
|
10198
10198
|
function Qs(e) {
|
10199
10199
|
var t = "timestamp=".concat((/* @__PURE__ */ new Date()).getTime());
|
@@ -10211,8 +10211,8 @@ function Qt(e) {
|
|
10211
10211
|
}
|
10212
10212
|
function kd(e) {
|
10213
10213
|
var t = Tu({}, e), a = 0;
|
10214
|
-
return
|
10215
|
-
delete t[s],
|
10214
|
+
return ce(e, function(i, s) {
|
10215
|
+
delete t[s], ce(t, function(u) {
|
10216
10216
|
var r = Math.abs(i.startX - u.startX), o = Math.abs(i.startY - u.startY), c = Math.abs(i.endX - u.endX), h = Math.abs(i.endY - u.endY), f = Math.sqrt(r * r + o * o), m = Math.sqrt(c * c + h * h), T = (m - f) / f;
|
10217
10217
|
Math.abs(T) > Math.abs(a) && (a = T);
|
10218
10218
|
});
|
@@ -10230,7 +10230,7 @@ function da(e, t) {
|
|
10230
10230
|
}
|
10231
10231
|
function wd(e) {
|
10232
10232
|
var t = 0, a = 0, i = 0;
|
10233
|
-
return
|
10233
|
+
return ce(e, function(s) {
|
10234
10234
|
var u = s.startX, r = s.startY;
|
10235
10235
|
t += u, a += r, i += 1;
|
10236
10236
|
}), t /= i, a /= i, {
|
@@ -10266,45 +10266,45 @@ 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,
|
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, M = i.fillColor, X = M === void 0 ? "transparent" : M, U = i.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = i.imageSmoothingQuality, P = F === void 0 ? "low" : F, g = i.maxWidth, w = g === void 0 ? 1 / 0 : g, Q = i.maxHeight, le = Q === void 0 ? 1 / 0 : Q, ge = i.minWidth, Ie = ge === void 0 ? 0 : ge, ve = i.minHeight, _e = ve === void 0 ? 0 : ve, Ae = document.createElement("canvas"), se = Ae.getContext("2d"), Re = tt({
|
10270
10270
|
aspectRatio: A,
|
10271
10271
|
width: w,
|
10272
|
-
height:
|
10272
|
+
height: le
|
10273
10273
|
}), x = tt({
|
10274
10274
|
aspectRatio: A,
|
10275
|
-
width:
|
10276
|
-
height:
|
10277
|
-
}, "cover"), y = Math.min(
|
10275
|
+
width: Ie,
|
10276
|
+
height: _e
|
10277
|
+
}, "cover"), y = Math.min(Re.width, Math.max(x.width, I)), O = Math.min(Re.height, Math.max(x.height, L)), D = tt({
|
10278
10278
|
aspectRatio: s,
|
10279
10279
|
width: w,
|
10280
|
-
height:
|
10280
|
+
height: le
|
10281
10281
|
}), H = tt({
|
10282
10282
|
aspectRatio: s,
|
10283
|
-
width:
|
10284
|
-
height:
|
10285
|
-
}, "cover"), q = Math.min(D.width, Math.max(H.width, u)), J = Math.min(D.height, Math.max(H.height, r)),
|
10286
|
-
return
|
10287
|
-
return Math.floor(
|
10288
|
-
})))),
|
10289
|
-
}
|
10290
|
-
var
|
10283
|
+
width: Ie,
|
10284
|
+
height: _e
|
10285
|
+
}, "cover"), q = Math.min(D.width, Math.max(H.width, u)), J = Math.min(D.height, Math.max(H.height, r)), ne = [-q / 2, -J / 2, q, J];
|
10286
|
+
return Ae.width = It(y), Ae.height = It(O), se.fillStyle = X, se.fillRect(0, 0, y, O), se.save(), se.translate(y / 2, O / 2), se.rotate(c * Math.PI / 180), se.scale(f, T), se.imageSmoothingEnabled = $, se.imageSmoothingQuality = P, se.drawImage.apply(se, [e].concat(bu(ne.map(function(oe) {
|
10287
|
+
return Math.floor(It(oe));
|
10288
|
+
})))), se.restore(), Ae;
|
10289
|
+
}
|
10290
|
+
var vu = 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 += vu(e.getUint8(s));
|
10296
10296
|
return i;
|
10297
10297
|
}
|
10298
10298
|
var Hd = /^data:.*,/;
|
10299
10299
|
function Yd(e) {
|
10300
10300
|
var t = e.replace(Hd, ""), a = atob(t), i = new ArrayBuffer(a.length), s = new Uint8Array(i);
|
10301
|
-
return
|
10301
|
+
return ce(s, function(u, r) {
|
10302
10302
|
s[r] = a.charCodeAt(r);
|
10303
10303
|
}), i;
|
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(vu.apply(null, xu(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) {
|
@@ -10330,9 +10330,9 @@ function Vd(e) {
|
|
10330
10330
|
}
|
10331
10331
|
}
|
10332
10332
|
if (u) {
|
10333
|
-
var T = t.getUint16(u, i), A,
|
10334
|
-
for (
|
10335
|
-
if (A = u +
|
10333
|
+
var T = t.getUint16(u, i), A, I;
|
10334
|
+
for (I = 0; I < T; I += 1)
|
10335
|
+
if (A = u + I * 12 + 2, t.getUint16(A, i) === 274) {
|
10336
10336
|
A += 8, a = t.getUint16(A, i), t.setUint16(A, 1, i);
|
10337
10337
|
break;
|
10338
10338
|
}
|
@@ -10379,15 +10379,15 @@ var $d = {
|
|
10379
10379
|
},
|
10380
10380
|
initContainer: function() {
|
10381
10381
|
var t = this.element, a = this.options, i = this.container, s = this.cropper, u = Number(a.minContainerWidth), r = Number(a.minContainerHeight);
|
10382
|
-
|
10382
|
+
Ee(s, Oe), Ye(t, Oe);
|
10383
10383
|
var o = {
|
10384
|
-
width: Math.max(i.offsetWidth, u >= 0 ? u :
|
10384
|
+
width: Math.max(i.offsetWidth, u >= 0 ? u : Cu),
|
10385
10385
|
height: Math.max(i.offsetHeight, r >= 0 ? r : Su)
|
10386
10386
|
};
|
10387
10387
|
this.containerData = o, et(s, {
|
10388
10388
|
width: o.width,
|
10389
10389
|
height: o.height
|
10390
|
-
}),
|
10390
|
+
}), Ee(t, Oe), Ye(s, Oe);
|
10391
10391
|
},
|
10392
10392
|
// Canvas (image wrapper)
|
10393
10393
|
initCanvas: function() {
|
@@ -10400,7 +10400,7 @@ var $d = {
|
|
10400
10400
|
width: c,
|
10401
10401
|
height: h
|
10402
10402
|
};
|
10403
|
-
this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData =
|
10403
|
+
this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = ie({}, f);
|
10404
10404
|
},
|
10405
10405
|
limitCanvas: function(t, a) {
|
10406
10406
|
var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = i.viewMode, c = u.aspectRatio, h = this.cropped && r;
|
@@ -10416,8 +10416,8 @@ var $d = {
|
|
10416
10416
|
}
|
10417
10417
|
if (a)
|
10418
10418
|
if (o > (h ? 0 : 1)) {
|
10419
|
-
var A = s.width - u.width,
|
10420
|
-
u.minLeft = Math.min(0, A), u.minTop = Math.min(0,
|
10419
|
+
var A = s.width - u.width, I = s.height - u.height;
|
10420
|
+
u.minLeft = Math.min(0, A), u.minTop = Math.min(0, I), u.maxLeft = Math.max(0, A), u.maxTop = Math.max(0, I), h && this.limited && (u.minLeft = Math.min(r.left, r.left + (r.width - u.width)), u.minTop = Math.min(r.top, r.top + (r.height - u.height)), u.maxLeft = r.left, u.maxTop = r.top, o === 2 && (u.width >= s.width && (u.minLeft = Math.min(0, A), u.maxLeft = Math.max(0, A)), u.height >= s.height && (u.minTop = Math.min(0, I), u.maxTop = Math.max(0, I))));
|
10421
10421
|
} else
|
10422
10422
|
u.minLeft = -u.width, u.minTop = -u.height, u.maxLeft = s.width, u.maxTop = s.height;
|
10423
10423
|
},
|
@@ -10431,7 +10431,7 @@ var $d = {
|
|
10431
10431
|
}), r = u.width, o = u.height, c = i.width * (r / i.naturalWidth), h = i.height * (o / i.naturalHeight);
|
10432
10432
|
i.left -= (c - i.width) / 2, i.top -= (h - i.height) / 2, i.width = c, i.height = h, i.aspectRatio = r / o, i.naturalWidth = r, i.naturalHeight = o, this.limitCanvas(!0, !1);
|
10433
10433
|
}
|
10434
|
-
(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, et(this.canvas,
|
10434
|
+
(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, et(this.canvas, ie({
|
10435
10435
|
width: i.width,
|
10436
10436
|
height: i.height
|
10437
10437
|
}, Qt({
|
@@ -10441,15 +10441,15 @@ var $d = {
|
|
10441
10441
|
},
|
10442
10442
|
renderImage: function(t) {
|
10443
10443
|
var a = this.canvasData, i = this.imageData, s = i.naturalWidth * (a.width / a.naturalWidth), u = i.naturalHeight * (a.height / a.naturalHeight);
|
10444
|
-
|
10444
|
+
ie(i, {
|
10445
10445
|
width: s,
|
10446
10446
|
height: u,
|
10447
10447
|
left: (a.width - s) / 2,
|
10448
10448
|
top: (a.height - u) / 2
|
10449
|
-
}), et(this.image,
|
10449
|
+
}), et(this.image, ie({
|
10450
10450
|
width: i.width,
|
10451
10451
|
height: i.height
|
10452
|
-
}, Qt(
|
10452
|
+
}, Qt(ie({
|
10453
10453
|
translateX: i.left,
|
10454
10454
|
translateY: i.top
|
10455
10455
|
}, i)))), t && this.output();
|
@@ -10459,7 +10459,7 @@ var $d = {
|
|
10459
10459
|
width: a.width,
|
10460
10460
|
height: a.height
|
10461
10461
|
};
|
10462
|
-
i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData =
|
10462
|
+
i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData = ie({}, u);
|
10463
10463
|
},
|
10464
10464
|
limitCropBox: function(t, a) {
|
10465
10465
|
var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = this.limited, c = i.aspectRatio;
|
@@ -10471,7 +10471,7 @@ var $d = {
|
|
10471
10471
|
},
|
10472
10472
|
renderCropBox: function() {
|
10473
10473
|
var t = this.options, a = this.containerData, i = this.cropBoxData;
|
10474
|
-
(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && aa(this.face, ta, i.width >= a.width && i.height >= a.height ? _u : ji), et(this.cropBox,
|
10474
|
+
(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && aa(this.face, ta, i.width >= a.width && i.height >= a.height ? _u : ji), et(this.cropBox, ie({
|
10475
10475
|
width: i.width,
|
10476
10476
|
height: i.height
|
10477
10477
|
}, Qt({
|
@@ -10480,14 +10480,14 @@ var $d = {
|
|
10480
10480
|
}))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output();
|
10481
10481
|
},
|
10482
10482
|
output: function() {
|
10483
|
-
this.preview(),
|
10483
|
+
this.preview(), Ct(this.element, bi, this.getData());
|
10484
10484
|
}
|
10485
10485
|
}, Xd = {
|
10486
10486
|
initPreview: function() {
|
10487
10487
|
var t = this.element, a = this.crossOrigin, i = this.options.preview, s = a ? this.crossOriginUrl : this.url, u = t.alt || "The image to preview", r = document.createElement("img");
|
10488
10488
|
if (a && (r.crossOrigin = a), r.src = s, r.alt = u, this.viewBox.appendChild(r), this.viewBoxImage = r, !!i) {
|
10489
10489
|
var o = i;
|
10490
|
-
typeof i == "string" ? o = t.ownerDocument.querySelectorAll(i) : i.querySelector && (o = [i]), this.previews = o,
|
10490
|
+
typeof i == "string" ? o = t.ownerDocument.querySelectorAll(i) : i.querySelector && (o = [i]), this.previews = o, ce(o, function(c) {
|
10491
10491
|
var h = document.createElement("img");
|
10492
10492
|
aa(c, ha, {
|
10493
10493
|
width: c.offsetWidth,
|
@@ -10498,8 +10498,8 @@ var $d = {
|
|
10498
10498
|
}
|
10499
10499
|
},
|
10500
10500
|
resetPreview: function() {
|
10501
|
-
|
10502
|
-
var a =
|
10501
|
+
ce(this.previews, function(t) {
|
10502
|
+
var a = Ii(t, ha);
|
10503
10503
|
et(t, {
|
10504
10504
|
width: a.width,
|
10505
10505
|
height: a.height
|
@@ -10508,21 +10508,21 @@ var $d = {
|
|
10508
10508
|
},
|
10509
10509
|
preview: function() {
|
10510
10510
|
var t = this.imageData, a = this.canvasData, i = this.cropBoxData, s = i.width, u = i.height, r = t.width, o = t.height, c = i.left - a.left - t.left, h = i.top - a.top - t.top;
|
10511
|
-
!this.cropped || this.disabled || (et(this.viewBoxImage,
|
10511
|
+
!this.cropped || this.disabled || (et(this.viewBoxImage, ie({
|
10512
10512
|
width: r,
|
10513
10513
|
height: o
|
10514
|
-
}, Qt(
|
10514
|
+
}, Qt(ie({
|
10515
10515
|
translateX: -c,
|
10516
10516
|
translateY: -h
|
10517
|
-
}, t)))),
|
10518
|
-
var m =
|
10519
|
-
s && (M = T / s, L = u * M), u && L > A && (M = A / u,
|
10520
|
-
width:
|
10517
|
+
}, t)))), ce(this.previews, function(f) {
|
10518
|
+
var m = Ii(f, ha), T = m.width, A = m.height, I = T, L = A, M = 1;
|
10519
|
+
s && (M = T / s, L = u * M), u && L > A && (M = A / u, I = s * M, L = A), et(f, {
|
10520
|
+
width: I,
|
10521
10521
|
height: L
|
10522
|
-
}), et(f.getElementsByTagName("img")[0],
|
10522
|
+
}), et(f.getElementsByTagName("img")[0], ie({
|
10523
10523
|
width: r * M,
|
10524
10524
|
height: o * M
|
10525
|
-
}, Qt(
|
10525
|
+
}, Qt(ie({
|
10526
10526
|
translateX: -c * M,
|
10527
10527
|
translateY: -h * M
|
10528
10528
|
}, t))));
|
@@ -10531,14 +10531,14 @@ var $d = {
|
|
10531
10531
|
}, Gd = {
|
10532
10532
|
bind: function() {
|
10533
10533
|
var t = this.element, a = this.options, i = this.cropper;
|
10534
|
-
|
10534
|
+
Se(a.cropstart) && ye(t, Ai, a.cropstart), Se(a.cropmove) && ye(t, _i, a.cropmove), Se(a.cropend) && ye(t, gi, a.cropend), Se(a.crop) && ye(t, bi, a.crop), Se(a.zoom) && ye(t, Ni, a.zoom), ye(i, Us, this.onCropStart = this.cropStart.bind(this)), a.zoomable && a.zoomOnWheel && ye(i, Vs, this.onWheel = this.wheel.bind(this), {
|
10535
10535
|
passive: !1,
|
10536
10536
|
capture: !0
|
10537
10537
|
}), a.toggleDragModeOnDblclick && ye(i, Bs, this.onDblclick = this.dblclick.bind(this)), ye(t.ownerDocument, Fs, this.onCropMove = this.cropMove.bind(this)), ye(t.ownerDocument, Hs, this.onCropEnd = this.cropEnd.bind(this)), a.responsive && ye(window, qs, this.onResize = this.resize.bind(this));
|
10538
10538
|
},
|
10539
10539
|
unbind: function() {
|
10540
10540
|
var t = this.element, a = this.options, i = this.cropper;
|
10541
|
-
|
10541
|
+
Se(a.cropstart) && ke(t, Ai, a.cropstart), Se(a.cropmove) && ke(t, _i, a.cropmove), Se(a.cropend) && ke(t, gi, a.cropend), Se(a.crop) && ke(t, bi, a.crop), Se(a.zoom) && ke(t, Ni, a.zoom), ke(i, Us, this.onCropStart), a.zoomable && a.zoomOnWheel && ke(i, Vs, this.onWheel, {
|
10542
10542
|
passive: !1,
|
10543
10543
|
capture: !0
|
10544
10544
|
}), a.toggleDragModeOnDblclick && ke(i, Bs, this.onDblclick), ke(t.ownerDocument, Fs, this.onCropMove), ke(t.ownerDocument, Hs, this.onCropEnd), a.responsive && ke(window, qs, this.onResize);
|
@@ -10549,16 +10549,16 @@ var $d = {
|
|
10549
10549
|
var t = this.options, a = this.container, i = this.containerData, s = a.offsetWidth / i.width, u = a.offsetHeight / i.height, r = Math.abs(s - 1) > Math.abs(u - 1) ? s : u;
|
10550
10550
|
if (r !== 1) {
|
10551
10551
|
var o, c;
|
10552
|
-
t.restore && (o = this.getCanvasData(), c = this.getCropBoxData()), this.render(), t.restore && (this.setCanvasData(
|
10552
|
+
t.restore && (o = this.getCanvasData(), c = this.getCropBoxData()), this.render(), t.restore && (this.setCanvasData(ce(o, function(h, f) {
|
10553
10553
|
o[f] = h * r;
|
10554
|
-
})), this.setCropBoxData(
|
10554
|
+
})), this.setCropBoxData(ce(c, function(h, f) {
|
10555
10555
|
c[f] = h * r;
|
10556
10556
|
})));
|
10557
10557
|
}
|
10558
10558
|
}
|
10559
10559
|
},
|
10560
10560
|
dblclick: function() {
|
10561
|
-
this.disabled || this.options.dragMode ===
|
10561
|
+
this.disabled || this.options.dragMode === Iu || this.setDragMode(Rd(this.dragBox, Ti) ? Nu : zi);
|
10562
10562
|
},
|
10563
10563
|
wheel: function(t) {
|
10564
10564
|
var a = this, i = Number(this.options.wheelZoomRatio) || 0.1, s = 1;
|
@@ -10571,32 +10571,32 @@ var $d = {
|
|
10571
10571
|
if (!(this.disabled || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
|
10572
10572
|
(W(a) && a !== 1 || W(i) && i !== 0 || t.ctrlKey))) {
|
10573
10573
|
var s = this.options, u = this.pointers, r;
|
10574
|
-
t.changedTouches ?
|
10574
|
+
t.changedTouches ? ce(t.changedTouches, function(o) {
|
10575
10575
|
u[o.identifier] = da(o);
|
10576
|
-
}) : u[t.pointerId || 0] = da(t), Object.keys(u).length > 1 && s.zoomable && s.zoomOnTouch ? r = Au : r =
|
10576
|
+
}) : u[t.pointerId || 0] = da(t), Object.keys(u).length > 1 && s.zoomable && s.zoomOnTouch ? r = Au : r = Ii(t.target, ta), Ad.test(r) && Ct(this.element, Ai, {
|
10577
10577
|
originalEvent: t,
|
10578
10578
|
action: r
|
10579
|
-
}) !== !1 && (t.preventDefault(), this.action = r, this.cropping = !1, r === gu && (this.cropping = !0,
|
10579
|
+
}) !== !1 && (t.preventDefault(), this.action = r, this.cropping = !1, r === gu && (this.cropping = !0, Ee(this.dragBox, Oa)));
|
10580
10580
|
}
|
10581
10581
|
},
|
10582
10582
|
cropMove: function(t) {
|
10583
10583
|
var a = this.action;
|
10584
10584
|
if (!(this.disabled || !a)) {
|
10585
10585
|
var i = this.pointers;
|
10586
|
-
t.preventDefault(),
|
10586
|
+
t.preventDefault(), Ct(this.element, _i, {
|
10587
10587
|
originalEvent: t,
|
10588
10588
|
action: a
|
10589
|
-
}) !== !1 && (t.changedTouches ?
|
10590
|
-
|
10591
|
-
}) :
|
10589
|
+
}) !== !1 && (t.changedTouches ? ce(t.changedTouches, function(s) {
|
10590
|
+
ie(i[s.identifier] || {}, da(s, !0));
|
10591
|
+
}) : ie(i[t.pointerId || 0] || {}, da(t, !0)), this.change(t));
|
10592
10592
|
}
|
10593
10593
|
},
|
10594
10594
|
cropEnd: function(t) {
|
10595
10595
|
if (!this.disabled) {
|
10596
10596
|
var a = this.action, i = this.pointers;
|
10597
|
-
t.changedTouches ?
|
10597
|
+
t.changedTouches ? ce(t.changedTouches, function(s) {
|
10598
10598
|
delete i[s.identifier];
|
10599
|
-
}) : delete i[t.pointerId || 0], a && (t.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, At(this.dragBox, Oa, this.cropped && this.options.modal)),
|
10599
|
+
}) : delete i[t.pointerId || 0], a && (t.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, At(this.dragBox, Oa, this.cropped && this.options.modal)), Ct(this.element, gi, {
|
10600
10600
|
originalEvent: t,
|
10601
10601
|
action: a
|
10602
10602
|
}));
|
@@ -10604,13 +10604,13 @@ 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,
|
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, M = 0, X = s.width, U = s.height, $ = !0, F;
|
10608
10608
|
!c && t.shiftKey && (c = m && T ? m / T : 1), this.limited && (L = u.minLeft, M = u.minTop, X = L + Math.min(s.width, i.width, i.left + i.width), U = M + Math.min(s.height, i.height, i.top + i.height));
|
10609
10609
|
var P = r[Object.keys(r)[0]], g = {
|
10610
10610
|
x: P.endX - P.startX,
|
10611
10611
|
y: P.endY - P.startY
|
10612
|
-
}, w = function(
|
10613
|
-
switch (
|
10612
|
+
}, w = function(le) {
|
10613
|
+
switch (le) {
|
10614
10614
|
case ut:
|
10615
10615
|
A + g.x > X && (g.x = X - A);
|
10616
10616
|
break;
|
@@ -10621,7 +10621,7 @@ var $d = {
|
|
10621
10621
|
f + g.y < M && (g.y = M - f);
|
10622
10622
|
break;
|
10623
10623
|
case gt:
|
10624
|
-
|
10624
|
+
I + g.y > U && (g.y = U - I);
|
10625
10625
|
break;
|
10626
10626
|
}
|
10627
10627
|
};
|
@@ -10630,7 +10630,7 @@ var $d = {
|
|
10630
10630
|
h += g.x, f += g.y;
|
10631
10631
|
break;
|
10632
10632
|
case ut:
|
10633
|
-
if (g.x >= 0 && (A >= X || c && (f <= M ||
|
10633
|
+
if (g.x >= 0 && (A >= X || c && (f <= M || I >= U))) {
|
10634
10634
|
$ = !1;
|
10635
10635
|
break;
|
10636
10636
|
}
|
@@ -10644,14 +10644,14 @@ var $d = {
|
|
10644
10644
|
w(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 <= M ||
|
10647
|
+
if (g.x <= 0 && (h <= L || c && (f <= M || I >= U))) {
|
10648
10648
|
$ = !1;
|
10649
10649
|
break;
|
10650
10650
|
}
|
10651
10651
|
w(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 && (
|
10654
|
+
if (g.y >= 0 && (I >= U || c && (h <= L || A >= X))) {
|
10655
10655
|
$ = !1;
|
10656
10656
|
break;
|
10657
10657
|
}
|
@@ -10681,24 +10681,24 @@ var $d = {
|
|
10681
10681
|
break;
|
10682
10682
|
case Ft:
|
10683
10683
|
if (c) {
|
10684
|
-
if (g.x <= 0 && (h <= L ||
|
10684
|
+
if (g.x <= 0 && (h <= L || I >= U)) {
|
10685
10685
|
$ = !1;
|
10686
10686
|
break;
|
10687
10687
|
}
|
10688
10688
|
w(rt), m -= g.x, h += g.x, T = m / c;
|
10689
10689
|
} else
|
10690
|
-
w(gt), w(rt), g.x <= 0 ? h > L ? (m -= g.x, h += g.x) : g.y >= 0 &&
|
10690
|
+
w(gt), w(rt), g.x <= 0 ? h > L ? (m -= g.x, h += g.x) : g.y >= 0 && I >= U && ($ = !1) : (m -= g.x, h += g.x), g.y >= 0 ? I < U && (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 >= X ||
|
10695
|
+
if (g.x >= 0 && (A >= X || I >= U)) {
|
10696
10696
|
$ = !1;
|
10697
10697
|
break;
|
10698
10698
|
}
|
10699
10699
|
w(ut), m += g.x, T = m / c;
|
10700
10700
|
} else
|
10701
|
-
w(gt), w(ut), g.x >= 0 ? A < X ? m += g.x : g.y >= 0 &&
|
10701
|
+
w(gt), w(ut), g.x >= 0 ? A < X ? m += g.x : g.y >= 0 && I >= U && ($ = !1) : m += g.x, g.y >= 0 ? I < U && (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 _u:
|
@@ -10712,30 +10712,30 @@ var $d = {
|
|
10712
10712
|
$ = !1;
|
10713
10713
|
break;
|
10714
10714
|
}
|
10715
|
-
F = Lu(this.cropper), h = P.startX - F.left, f = P.startY - F.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,
|
10715
|
+
F = Lu(this.cropper), h = P.startX - F.left, f = P.startY - F.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
|
-
$ && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()),
|
10718
|
+
$ && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()), ce(r, function(Q) {
|
10719
10719
|
Q.startX = Q.endX, Q.startY = Q.endY;
|
10720
10720
|
});
|
10721
10721
|
}
|
10722
10722
|
}, zd = {
|
10723
10723
|
// Show the crop box manually
|
10724
10724
|
crop: function() {
|
10725
|
-
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal &&
|
10725
|
+
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && Ee(this.dragBox, Oa), Ye(this.cropBox, Oe), this.setCropBoxData(this.initialCropBoxData)), this;
|
10726
10726
|
},
|
10727
10727
|
// Reset the image and crop box to their initial states
|
10728
10728
|
reset: function() {
|
10729
|
-
return this.ready && !this.disabled && (this.imageData =
|
10729
|
+
return this.ready && !this.disabled && (this.imageData = ie({}, this.initialImageData), this.canvasData = ie({}, this.initialCanvasData), this.cropBoxData = ie({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
|
10730
10730
|
},
|
10731
10731
|
// Clear the crop box
|
10732
10732
|
clear: function() {
|
10733
|
-
return this.cropped && !this.disabled && (
|
10733
|
+
return this.cropped && !this.disabled && (ie(this.cropBoxData, {
|
10734
10734
|
left: 0,
|
10735
10735
|
top: 0,
|
10736
10736
|
width: 0,
|
10737
10737
|
height: 0
|
10738
|
-
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Ye(this.dragBox, Oa),
|
10738
|
+
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Ye(this.dragBox, Oa), Ee(this.cropBox, Oe)), this;
|
10739
10739
|
},
|
10740
10740
|
/**
|
10741
10741
|
* Replace the image's src and rebuild the cropper
|
@@ -10745,7 +10745,7 @@ var $d = {
|
|
10745
10745
|
*/
|
10746
10746
|
replace: function(t) {
|
10747
10747
|
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
10748
|
-
return !this.disabled && t && (this.isImg && (this.element.src = t), a ? (this.url = t, this.image.src = t, this.ready && (this.viewBoxImage.src = t,
|
10748
|
+
return !this.disabled && t && (this.isImg && (this.element.src = t), a ? (this.url = t, this.image.src = t, this.ready && (this.viewBoxImage.src = t, ce(this.previews, function(i) {
|
10749
10749
|
i.getElementsByTagName("img")[0].src = t;
|
10750
10750
|
}))) : (this.isImg && (this.replaced = !0), this.options.data = null, this.uncreate(), this.load(t))), this;
|
10751
10751
|
},
|
@@ -10755,7 +10755,7 @@ var $d = {
|
|
10755
10755
|
},
|
10756
10756
|
// Disable (freeze) the cropper
|
10757
10757
|
disable: function() {
|
10758
|
-
return this.ready && !this.disabled && (this.disabled = !0,
|
10758
|
+
return this.ready && !this.disabled && (this.disabled = !0, Ee(this.cropper, ks)), this;
|
10759
10759
|
},
|
10760
10760
|
/**
|
10761
10761
|
* Destroy the cropper and remove the instance from the image
|
@@ -10763,7 +10763,7 @@ var $d = {
|
|
10763
10763
|
*/
|
10764
10764
|
destroy: function() {
|
10765
10765
|
var t = this.element;
|
10766
|
-
return t[
|
10766
|
+
return t[ae] ? (t[ae] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
|
10767
10767
|
},
|
10768
10768
|
/**
|
10769
10769
|
* Move the canvas with relative offsets
|
@@ -10773,7 +10773,7 @@ var $d = {
|
|
10773
10773
|
*/
|
10774
10774
|
move: function(t) {
|
10775
10775
|
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, i = this.canvasData, s = i.left, u = i.top;
|
10776
|
-
return this.moveTo(
|
10776
|
+
return this.moveTo(Za(t) ? t : s + Number(t), Za(a) ? a : u + Number(a));
|
10777
10777
|
},
|
10778
10778
|
/**
|
10779
10779
|
* Move the canvas to an absolute point
|
@@ -10806,18 +10806,18 @@ var $d = {
|
|
10806
10806
|
var s = this.options, u = this.canvasData, r = u.width, o = u.height, c = u.naturalWidth, h = u.naturalHeight;
|
10807
10807
|
if (t = Number(t), t >= 0 && this.ready && !this.disabled && s.zoomable) {
|
10808
10808
|
var f = c * t, m = h * t;
|
10809
|
-
if (
|
10809
|
+
if (Ct(this.element, Ni, {
|
10810
10810
|
ratio: t,
|
10811
10811
|
oldRatio: r / c,
|
10812
10812
|
originalEvent: i
|
10813
10813
|
}) === !1)
|
10814
10814
|
return this;
|
10815
10815
|
if (i) {
|
10816
|
-
var T = this.pointers, A = Lu(this.cropper),
|
10816
|
+
var T = this.pointers, A = Lu(this.cropper), I = T && Object.keys(T).length ? wd(T) : {
|
10817
10817
|
pageX: i.pageX,
|
10818
10818
|
pageY: i.pageY
|
10819
10819
|
};
|
10820
|
-
u.left -= (f - r) * ((
|
10820
|
+
u.left -= (f - r) * ((I.pageX - A.left - u.left) / r), u.top -= (m - o) * ((I.pageY - A.top - u.top) / o);
|
10821
10821
|
} else _t(a) && W(a.x) && W(a.y) ? (u.left -= (f - r) * ((a.x - u.left) / r), u.top -= (m - o) * ((a.y - u.top) / o)) : (u.left -= (f - r) / 2, u.top -= (m - o) / 2);
|
10822
10822
|
u.width = f, u.height = m, this.renderCanvas(!0);
|
10823
10823
|
}
|
@@ -10882,7 +10882,7 @@ var $d = {
|
|
10882
10882
|
height: u.height
|
10883
10883
|
};
|
10884
10884
|
var o = i.width / i.naturalWidth;
|
10885
|
-
if (
|
10885
|
+
if (ce(r, function(f, m) {
|
10886
10886
|
r[m] = f / o;
|
10887
10887
|
}), t) {
|
10888
10888
|
var c = Math.round(r.y + r.height), h = Math.round(r.x + r.width);
|
@@ -10917,14 +10917,14 @@ var $d = {
|
|
10917
10917
|
* @returns {Object} The result container data.
|
10918
10918
|
*/
|
10919
10919
|
getContainerData: function() {
|
10920
|
-
return this.ready ?
|
10920
|
+
return this.ready ? ie({}, this.containerData) : {};
|
10921
10921
|
},
|
10922
10922
|
/**
|
10923
10923
|
* Get the image position and size data.
|
10924
10924
|
* @returns {Object} The result image data.
|
10925
10925
|
*/
|
10926
10926
|
getImageData: function() {
|
10927
|
-
return this.sized ?
|
10927
|
+
return this.sized ? ie({}, this.imageData) : {};
|
10928
10928
|
},
|
10929
10929
|
/**
|
10930
10930
|
* Get the canvas position and size data.
|
@@ -10932,7 +10932,7 @@ var $d = {
|
|
10932
10932
|
*/
|
10933
10933
|
getCanvasData: function() {
|
10934
10934
|
var t = this.canvasData, a = {};
|
10935
|
-
return this.ready &&
|
10935
|
+
return this.ready && ce(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(i) {
|
10936
10936
|
a[i] = t[i];
|
10937
10937
|
}), a;
|
10938
10938
|
},
|
@@ -10993,21 +10993,21 @@ var $d = {
|
|
10993
10993
|
aspectRatio: f,
|
10994
10994
|
width: t.width || (h !== 1 ? i.width : o),
|
10995
10995
|
height: t.height || (h !== 1 ? i.height : c)
|
10996
|
-
}),
|
10997
|
-
|
10996
|
+
}), I = A.width, L = A.height;
|
10997
|
+
I = Math.min(m.width, Math.max(T.width, I)), L = Math.min(m.height, Math.max(T.height, L));
|
10998
10998
|
var M = document.createElement("canvas"), X = M.getContext("2d");
|
10999
|
-
M.width =
|
10999
|
+
M.width = It(I), M.height = It(L), X.fillStyle = t.fillColor || "transparent", X.fillRect(0, 0, I, L);
|
11000
11000
|
var U = t.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = t.imageSmoothingQuality;
|
11001
11001
|
X.imageSmoothingEnabled = $, F && (X.imageSmoothingQuality = F);
|
11002
|
-
var P = i.width, g = i.height, w = u, Q = r,
|
11003
|
-
w <= -o || w > P ? (w = 0,
|
11004
|
-
var
|
11005
|
-
if (
|
11006
|
-
var
|
11007
|
-
|
11008
|
-
}
|
11009
|
-
return X.drawImage.apply(X, [i].concat(bu(
|
11010
|
-
return Math.floor(
|
11002
|
+
var P = i.width, g = i.height, w = u, Q = r, le, ge, Ie, ve, _e, Ae;
|
11003
|
+
w <= -o || w > P ? (w = 0, le = 0, Ie = 0, _e = 0) : w <= 0 ? (Ie = -w, w = 0, le = Math.min(P, o + w), _e = le) : w <= P && (Ie = 0, le = Math.min(o, P - w), _e = le), le <= 0 || Q <= -c || Q > g ? (Q = 0, ge = 0, ve = 0, Ae = 0) : Q <= 0 ? (ve = -Q, Q = 0, ge = Math.min(g, c + Q), Ae = ge) : Q <= g && (ve = 0, ge = Math.min(c, g - Q), Ae = ge);
|
11004
|
+
var se = [w, Q, le, ge];
|
11005
|
+
if (_e > 0 && Ae > 0) {
|
11006
|
+
var Re = I / o;
|
11007
|
+
se.push(Ie * Re, ve * Re, _e * Re, Ae * Re);
|
11008
|
+
}
|
11009
|
+
return X.drawImage.apply(X, [i].concat(bu(se.map(function(x) {
|
11010
|
+
return Math.floor(It(x));
|
11011
11011
|
})))), M;
|
11012
11012
|
},
|
11013
11013
|
/**
|
@@ -11017,7 +11017,7 @@ var $d = {
|
|
11017
11017
|
*/
|
11018
11018
|
setAspectRatio: function(t) {
|
11019
11019
|
var a = this.options;
|
11020
|
-
return !this.disabled && !
|
11020
|
+
return !this.disabled && !Za(t) && (a.aspectRatio = Math.max(0, t) || NaN, this.ready && (this.initCropBox(), this.cropped && this.renderCropBox())), this;
|
11021
11021
|
},
|
11022
11022
|
/**
|
11023
11023
|
* Change the drag mode.
|
@@ -11028,23 +11028,23 @@ var $d = {
|
|
11028
11028
|
var a = this.options, i = this.dragBox, s = this.face;
|
11029
11029
|
if (this.ready && !this.disabled) {
|
11030
11030
|
var u = t === zi, r = a.movable && t === Nu;
|
11031
|
-
t = u || r ? t :
|
11031
|
+
t = u || r ? t : Iu, a.dragMode = t, aa(i, ta, t), At(i, Ti, u), At(i, pi, r), a.cropBoxMovable || (aa(s, ta, t), At(s, Ti, u), At(s, pi, r));
|
11032
11032
|
}
|
11033
11033
|
return this;
|
11034
11034
|
}
|
11035
|
-
}, Kd = qe.Cropper,
|
11035
|
+
}, Kd = qe.Cropper, Ru = /* @__PURE__ */ function() {
|
11036
11036
|
function e(t) {
|
11037
11037
|
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
11038
|
-
if (ld(this, e), !t || !
|
11038
|
+
if (ld(this, e), !t || !Cd.test(t.tagName))
|
11039
11039
|
throw new Error("The first argument is required and must be an <img> or <canvas> element.");
|
11040
|
-
this.element = t, this.options =
|
11040
|
+
this.element = t, this.options = ie({}, $s, _t(a) && a), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
|
11041
11041
|
}
|
11042
11042
|
return hd(e, [{
|
11043
11043
|
key: "init",
|
11044
11044
|
value: function() {
|
11045
11045
|
var a = this.element, i = a.tagName.toLowerCase(), s;
|
11046
|
-
if (!a[
|
11047
|
-
if (a[
|
11046
|
+
if (!a[ae]) {
|
11047
|
+
if (a[ae] = this, i === "img") {
|
11048
11048
|
if (this.isImg = !0, s = a.getAttribute("src") || "", this.originalUrl = s, !s)
|
11049
11049
|
return;
|
11050
11050
|
s = a.src;
|
@@ -11064,7 +11064,7 @@ var $d = {
|
|
11064
11064
|
return;
|
11065
11065
|
}
|
11066
11066
|
if (Nd.test(a)) {
|
11067
|
-
|
11067
|
+
Id.test(a) ? this.read(Yd(a)) : this.clone();
|
11068
11068
|
return;
|
11069
11069
|
}
|
11070
11070
|
var r = new XMLHttpRequest(), o = this.clone.bind(this);
|
@@ -11094,7 +11094,7 @@ var $d = {
|
|
11094
11094
|
var a = this.element, i = this.url, s = a.crossOrigin, u = i;
|
11095
11095
|
this.options.checkCrossOrigin && Gs(i) && (s || (s = "anonymous"), u = Qs(i)), this.crossOrigin = s, this.crossOriginUrl = u;
|
11096
11096
|
var r = document.createElement("img");
|
11097
|
-
s && (r.crossOrigin = s), r.src = u || i, r.alt = a.alt || "The image to crop", this.image = r, r.onload = this.start.bind(this), r.onerror = this.stop.bind(this),
|
11097
|
+
s && (r.crossOrigin = s), r.src = u || i, r.alt = a.alt || "The image to crop", this.image = r, r.onload = this.start.bind(this), r.onerror = this.stop.bind(this), Ee(r, ws), a.parentNode.insertBefore(r, a.nextSibling);
|
11098
11098
|
}
|
11099
11099
|
}, {
|
11100
11100
|
key: "start",
|
@@ -11102,11 +11102,11 @@ var $d = {
|
|
11102
11102
|
var a = this, i = this.image;
|
11103
11103
|
i.onload = null, i.onerror = null, this.sizing = !0;
|
11104
11104
|
var s = qe.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(qe.navigator.userAgent), u = function(h, f) {
|
11105
|
-
|
11105
|
+
ie(a.imageData, {
|
11106
11106
|
naturalWidth: h,
|
11107
11107
|
naturalHeight: f,
|
11108
11108
|
aspectRatio: h / f
|
11109
|
-
}), a.initialImageData =
|
11109
|
+
}), a.initialImageData = ie({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
|
11110
11110
|
};
|
11111
11111
|
if (i.naturalWidth && !s) {
|
11112
11112
|
u(i.naturalWidth, i.naturalHeight);
|
@@ -11129,10 +11129,10 @@ var $d = {
|
|
11129
11129
|
if (!(!this.sized || this.ready)) {
|
11130
11130
|
var a = this.element, i = this.options, s = this.image, u = a.parentNode, r = document.createElement("div");
|
11131
11131
|
r.innerHTML = Sd;
|
11132
|
-
var o = r.querySelector(".".concat(
|
11133
|
-
this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(
|
11132
|
+
var o = r.querySelector(".".concat(ae, "-container")), c = o.querySelector(".".concat(ae, "-canvas")), h = o.querySelector(".".concat(ae, "-drag-box")), f = o.querySelector(".".concat(ae, "-crop-box")), m = f.querySelector(".".concat(ae, "-face"));
|
11133
|
+
this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = m, c.appendChild(s), Ee(a, Oe), u.insertBefore(o, a.nextSibling), Ye(s, ws), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, Ee(f, Oe), i.guides || Ee(f.getElementsByClassName("".concat(ae, "-dashed")), Oe), i.center || Ee(f.getElementsByClassName("".concat(ae, "-center")), Oe), i.background && Ee(o, "".concat(ae, "-bg")), i.highlight || Ee(m, pd), i.cropBoxMovable && (Ee(m, pi), aa(m, ta, ji)), i.cropBoxResizable || (Ee(f.getElementsByClassName("".concat(ae, "-line")), Oe), Ee(f.getElementsByClassName("".concat(ae, "-point")), Oe)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), Se(i.ready) && ye(a, Ys, i.ready, {
|
11134
11134
|
once: !0
|
11135
|
-
}),
|
11135
|
+
}), Ct(a, Ys);
|
11136
11136
|
}
|
11137
11137
|
}
|
11138
11138
|
}, {
|
@@ -11141,7 +11141,7 @@ var $d = {
|
|
11141
11141
|
if (this.ready) {
|
11142
11142
|
this.ready = !1, this.unbind(), this.resetPreview();
|
11143
11143
|
var a = this.cropper.parentNode;
|
11144
|
-
a && a.removeChild(this.cropper), Ye(this.element,
|
11144
|
+
a && a.removeChild(this.cropper), Ye(this.element, Oe);
|
11145
11145
|
}
|
11146
11146
|
}
|
11147
11147
|
}, {
|
@@ -11165,11 +11165,11 @@ var $d = {
|
|
11165
11165
|
}, {
|
11166
11166
|
key: "setDefaults",
|
11167
11167
|
value: function(a) {
|
11168
|
-
|
11168
|
+
ie($s, _t(a) && a);
|
11169
11169
|
}
|
11170
11170
|
}]);
|
11171
11171
|
}();
|
11172
|
-
|
11172
|
+
ie(Ru.prototype, $d, Xd, Gd, Qd, jd, zd);
|
11173
11173
|
function Zd(e, t) {
|
11174
11174
|
const a = e.split(",") || [], i = a[0].match(/:(.*?);/)[1], s = a[1] && atob(a[1]);
|
11175
11175
|
let u = s && s.length;
|
@@ -11252,8 +11252,8 @@ const Jd = {
|
|
11252
11252
|
P.name && (s.value.inputValue = P.name);
|
11253
11253
|
const g = new FileReader();
|
11254
11254
|
g.onload = (w) => {
|
11255
|
-
var Q,
|
11256
|
-
console.log("e?.target?.result", (Q = w == null ? void 0 : w.target) == null ? void 0 : Q.result), m((
|
11255
|
+
var Q, le;
|
11256
|
+
console.log("e?.target?.result", (Q = w == null ? void 0 : w.target) == null ? void 0 : Q.result), m((le = w == null ? void 0 : w.target) == null ? void 0 : le.result);
|
11257
11257
|
}, g.readAsDataURL(P);
|
11258
11258
|
}
|
11259
11259
|
};
|
@@ -11267,14 +11267,14 @@ const Jd = {
|
|
11267
11267
|
function T() {
|
11268
11268
|
const F = document.querySelector("#imgId");
|
11269
11269
|
F && F.addEventListener("load", () => {
|
11270
|
-
U(), c.value.myCropper = new
|
11270
|
+
U(), c.value.myCropper = new Ru(
|
11271
11271
|
F,
|
11272
11272
|
r.value
|
11273
11273
|
);
|
11274
11274
|
});
|
11275
11275
|
}
|
11276
11276
|
const A = z(!1);
|
11277
|
-
function
|
11277
|
+
function I(F, P, g) {
|
11278
11278
|
u.value = F, F && F.aspectRatio && (r.value.aspectRatio = F.aspectRatio), g && (s.value.inputValue = g), A.value = !0, P && m(P);
|
11279
11279
|
}
|
11280
11280
|
function L() {
|
@@ -11307,7 +11307,7 @@ const Jd = {
|
|
11307
11307
|
function $() {
|
11308
11308
|
c.value.image = "";
|
11309
11309
|
}
|
11310
|
-
return t({ handleCloseCropper: L, handleOpenCropper:
|
11310
|
+
return t({ handleCloseCropper: L, handleOpenCropper: I }), (F, P) => {
|
11311
11311
|
var g, w, Q;
|
11312
11312
|
return A.value ? (B(), V("div", Jd, [
|
11313
11313
|
S("div", ef, [
|
@@ -11315,7 +11315,7 @@ const Jd = {
|
|
11315
11315
|
P[1] || (P[1] = S("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
|
11316
11316
|
S("span", {
|
11317
11317
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
11318
|
-
onClick:
|
11318
|
+
onClick: he(X, ["stop"])
|
11319
11319
|
})
|
11320
11320
|
]),
|
11321
11321
|
S("div", af, [
|
@@ -11328,7 +11328,7 @@ const Jd = {
|
|
11328
11328
|
S("input", {
|
11329
11329
|
type: "file",
|
11330
11330
|
accept: "image/*",
|
11331
|
-
onClick: P[0] || (P[0] =
|
11331
|
+
onClick: P[0] || (P[0] = he(() => {
|
11332
11332
|
}, ["stop"])),
|
11333
11333
|
contenteditable: "false",
|
11334
11334
|
ref: "fileInput",
|
@@ -11379,12 +11379,7 @@ const Jd = {
|
|
11379
11379
|
])) : K("", !0);
|
11380
11380
|
};
|
11381
11381
|
}
|
11382
|
-
}), _f = {
|
11383
|
-
key: 0,
|
11384
|
-
"date-action": "1",
|
11385
|
-
class: "aidition",
|
11386
|
-
contenteditable: "false"
|
11387
|
-
}, Af = { class: "aidition_left" }, Nf = { class: "aidition_right" }, Cf = {
|
11382
|
+
}), _f = { class: "aidition_left" }, Af = { class: "aidition_right" }, Nf = {
|
11388
11383
|
key: 0,
|
11389
11384
|
"date-action": "1",
|
11390
11385
|
class: "text-red-500 text-xs mt-1"
|
@@ -11407,12 +11402,12 @@ const Jd = {
|
|
11407
11402
|
setup(e, { emit: t }) {
|
11408
11403
|
const a = e, i = t, s = Ke(() => a.selectedElement === a.element), u = Ke(() => a.hoveredElement === a.element), r = z(!1), o = z(!1), c = z(""), h = Ke(() => a.element.rule.minText || 0), f = Ke(() => a.element.rule.maxText || 1 / 0), m = z();
|
11409
11404
|
function T(O) {
|
11410
|
-
O.xpath != "/div[1]" && (i("selectElement", O), !O.rule.isReadOnly && O.type ===
|
11405
|
+
O.xpath != "/div[1]" && (i("selectElement", O), !O.rule.isReadOnly && O.type === te.Text && (r.value = !0));
|
11411
11406
|
}
|
11412
11407
|
function A(O) {
|
11413
11408
|
i("selectElement", O);
|
11414
11409
|
}
|
11415
|
-
function
|
11410
|
+
function I(O, D) {
|
11416
11411
|
i("hoverElement", O, D);
|
11417
11412
|
}
|
11418
11413
|
function L(O) {
|
@@ -11426,8 +11421,8 @@ const Jd = {
|
|
11426
11421
|
}
|
11427
11422
|
function U() {
|
11428
11423
|
function O(D) {
|
11429
|
-
const H = Object.entries(D.attrs || {}).map(([
|
11430
|
-
return `${q}${D.editText || D.text || ""}${
|
11424
|
+
const H = Object.entries(D.attrs || {}).map(([oe, Ve]) => `${oe}="${Ve}"`).join(" "), q = `<${D.tag}${H ? " " + H : ""}>`, J = `</${D.tag}>`, ne = (D.children || []).map((oe) => O(oe)).join("");
|
11425
|
+
return `${q}${D.editText || D.text || ""}${ne}${J}`;
|
11431
11426
|
}
|
11432
11427
|
return O(a.element);
|
11433
11428
|
}
|
@@ -11461,27 +11456,27 @@ const Jd = {
|
|
11461
11456
|
function Q() {
|
11462
11457
|
i("blockAction", { action: "delete", element: a.element });
|
11463
11458
|
}
|
11464
|
-
function
|
11459
|
+
function le(O) {
|
11465
11460
|
i("blockAction", O), i("contentUpdated", U());
|
11466
11461
|
}
|
11467
|
-
function
|
11462
|
+
function ge() {
|
11468
11463
|
m.value.openModal();
|
11469
11464
|
}
|
11470
|
-
function
|
11465
|
+
function Ie(O) {
|
11471
11466
|
i("addIcon", O, a.element), i("contentUpdated", U());
|
11472
11467
|
}
|
11473
|
-
function
|
11468
|
+
function ve(O, D) {
|
11474
11469
|
i("addIcon", O, D), i("contentUpdated", U());
|
11475
11470
|
}
|
11476
|
-
let
|
11477
|
-
const
|
11478
|
-
function
|
11479
|
-
if (D.rule.minImageWidth && D.rule.maxImageHeight ? (
|
11471
|
+
let _e;
|
11472
|
+
const Ae = z(), se = z({});
|
11473
|
+
function Re(O, D) {
|
11474
|
+
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) {
|
11480
11475
|
O.name;
|
11481
11476
|
const H = new FileReader();
|
11482
11477
|
H.onload = (q) => {
|
11483
11478
|
var J;
|
11484
|
-
|
11479
|
+
_e = (J = q == null ? void 0 : q.target) == null ? void 0 : J.result, Ae.value.handleOpenCropper(se.value, _e, O.name);
|
11485
11480
|
}, H.readAsDataURL(O);
|
11486
11481
|
}
|
11487
11482
|
}
|
@@ -11491,8 +11486,8 @@ const Jd = {
|
|
11491
11486
|
D.attrs.alt = O.name;
|
11492
11487
|
const H = new FileReader();
|
11493
11488
|
H.onload = (q) => {
|
11494
|
-
var
|
11495
|
-
let J = (
|
11489
|
+
var ne;
|
11490
|
+
let J = (ne = q == null ? void 0 : q.target) == null ? void 0 : ne.result;
|
11496
11491
|
D.attrs.src = J, i("upload", J, D), i("contentUpdated", U());
|
11497
11492
|
}, H.readAsDataURL(O);
|
11498
11493
|
} else
|
@@ -11505,9 +11500,9 @@ const Jd = {
|
|
11505
11500
|
return B(), V(Ht, null, [
|
11506
11501
|
(B(), xt(ku(a.element.tag), zs({
|
11507
11502
|
class: [
|
11508
|
-
" ",
|
11503
|
+
"m-2 p-1 border-dashed border",
|
11509
11504
|
u.value ? "border-dashed border-[1px] border-blue-500" : "",
|
11510
|
-
s.value ? "border-dashed border-[1px] border-green-500 z-10" : "",
|
11505
|
+
s.value ? "border-dashed border-[1px] border-green-500 z-10 " : "",
|
11511
11506
|
o.value ? "border-dashed border-[1px] border-red-500" : "",
|
11512
11507
|
// 超出文字限制时显示红色边框
|
11513
11508
|
(!u.value && !s.value && !o.value, ""),
|
@@ -11517,7 +11512,7 @@ const Jd = {
|
|
11517
11512
|
]
|
11518
11513
|
}, a.element.attrs, {
|
11519
11514
|
contenteditable: r.value,
|
11520
|
-
onClick: D[1] || (D[1] =
|
11515
|
+
onClick: D[1] || (D[1] = he(() => T(a.element), ["stop"])),
|
11521
11516
|
onMouseenter: D[2] || (D[2] = () => L(a.element)),
|
11522
11517
|
onMouseleave: M,
|
11523
11518
|
onBlur: X,
|
@@ -11526,20 +11521,25 @@ const Jd = {
|
|
11526
11521
|
default: Ks(() => [
|
11527
11522
|
wu(we(a.element.editText || a.element.text), 1),
|
11528
11523
|
a.element.children && a.element.children.length ? (B(), V(Ht, { key: 0 }, [
|
11529
|
-
a.element.type ===
|
11530
|
-
|
11531
|
-
|
11524
|
+
a.element.type === Ne(te).Block ? (B(), V("div", {
|
11525
|
+
key: 0,
|
11526
|
+
"date-action": "1",
|
11527
|
+
class: Da(["aidition", s.value ? "flex" : ""]),
|
11528
|
+
contenteditable: "false"
|
11529
|
+
}, [
|
11530
|
+
S("span", _f, we(a.element.editText || a.element.text), 1),
|
11531
|
+
S("div", Af, [
|
11532
11532
|
S("span", {
|
11533
|
-
onClick:
|
11533
|
+
onClick: he(g, ["stop"])
|
11534
11534
|
}, "排前"),
|
11535
11535
|
S("span", {
|
11536
|
-
onClick:
|
11536
|
+
onClick: he(w, ["stop"])
|
11537
11537
|
}, "排后"),
|
11538
11538
|
S("span", {
|
11539
|
-
onClick:
|
11539
|
+
onClick: he(Q, ["stop"])
|
11540
11540
|
}, "删除")
|
11541
11541
|
])
|
11542
|
-
])) : K("", !0),
|
11542
|
+
], 2)) : K("", !0),
|
11543
11543
|
(B(!0), V(Ht, null, js(a.element.children, (q, J) => (B(), xt(H, {
|
11544
11544
|
icons: e.icons,
|
11545
11545
|
key: J,
|
@@ -11547,46 +11547,38 @@ const Jd = {
|
|
11547
11547
|
selectedElement: a.selectedElement,
|
11548
11548
|
hoveredElement: a.hoveredElement,
|
11549
11549
|
onSelectElement: A,
|
11550
|
-
onHoverElement:
|
11550
|
+
onHoverElement: I,
|
11551
11551
|
onUpdateText: F,
|
11552
|
-
onBlockAction:
|
11553
|
-
onAddIcon:
|
11552
|
+
onBlockAction: le,
|
11553
|
+
onAddIcon: ve,
|
11554
11554
|
onUpload: x
|
11555
11555
|
}, null, 8, ["icons", "element", "selectedElement", "hoveredElement"]))), 128)),
|
11556
|
-
a.element.type ===
|
11556
|
+
a.element.type === Ne(te).Block ? (B(), V(Ht, { key: 1 }, [
|
11557
11557
|
S("span", {
|
11558
11558
|
class: "iconfont icon-a-tianjiaxian icon_gray_add",
|
11559
|
-
onClick:
|
11559
|
+
onClick: he(P, ["stop"]),
|
11560
11560
|
contenteditable: "false"
|
11561
11561
|
}),
|
11562
|
-
S("div", {
|
11563
|
-
class: "add_modules",
|
11564
|
-
onClick: re(P, ["stop"]),
|
11565
|
-
contenteditable: "false"
|
11566
|
-
}, D[7] || (D[7] = [
|
11567
|
-
S("span", { class: "iconfont icon-a-tianjiamian" }, null, -1),
|
11568
|
-
S("span", null, "添加模块", -1)
|
11569
|
-
])),
|
11570
11562
|
S("div", {
|
11571
11563
|
class: "cont_aidition",
|
11572
11564
|
contenteditable: "false",
|
11573
|
-
onClick: D[0] || (D[0] =
|
11565
|
+
onClick: D[0] || (D[0] = he(() => {
|
11574
11566
|
}, ["stop"]))
|
11575
11567
|
}, [
|
11576
11568
|
S("span", {
|
11577
|
-
onClick:
|
11569
|
+
onClick: he(g, ["stop"]),
|
11578
11570
|
class: "iconfont icon-paiqian"
|
11579
11571
|
}),
|
11580
11572
|
S("span", {
|
11581
|
-
onClick:
|
11573
|
+
onClick: he(w, ["stop"]),
|
11582
11574
|
class: "iconfont icon-paihou"
|
11583
11575
|
}),
|
11584
11576
|
S("span", {
|
11585
|
-
onClick:
|
11577
|
+
onClick: he(Q, ["stop"]),
|
11586
11578
|
class: "iconfont icon-shanchu"
|
11587
11579
|
}),
|
11588
11580
|
S("span", {
|
11589
|
-
onClick:
|
11581
|
+
onClick: he(P, ["stop"]),
|
11590
11582
|
class: "iconfont icon-a-tianjiaxian"
|
11591
11583
|
})
|
11592
11584
|
])
|
@@ -11595,32 +11587,32 @@ const Jd = {
|
|
11595
11587
|
]),
|
11596
11588
|
_: 1
|
11597
11589
|
}, 16, ["class", "contenteditable"])),
|
11598
|
-
a.element.type ==
|
11599
|
-
a.element.type ===
|
11590
|
+
a.element.type == Ne(te).Text && o.value ? (B(), V("div", Nf, we(c.value), 1)) : K("", !0),
|
11591
|
+
a.element.type === Ne(te).Image ? (B(), V("div", {
|
11600
11592
|
key: 1,
|
11601
11593
|
class: "absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",
|
11602
|
-
onClick: D[3] || (D[3] =
|
11594
|
+
onClick: D[3] || (D[3] = he(() => {
|
11603
11595
|
}, ["stop"]))
|
11604
11596
|
}, [
|
11605
|
-
D[
|
11597
|
+
D[7] || (D[7] = S("span", {
|
11606
11598
|
contenteditable: "false",
|
11607
11599
|
class: "cursor-pointer"
|
11608
11600
|
}, "上传图片", -1)),
|
11609
11601
|
lt(od, {
|
11610
|
-
customUpload: (q) =>
|
11602
|
+
customUpload: (q) => Re(q, a.element),
|
11611
11603
|
height: a.element.rule.maxImageHeight,
|
11612
11604
|
width: a.element.rule.minImageWidth,
|
11613
11605
|
uploadByImage: y
|
11614
11606
|
}, null, 8, ["customUpload", "height", "width"])
|
11615
11607
|
])) : K("", !0),
|
11616
|
-
a.element.type ===
|
11608
|
+
a.element.type === Ne(te).Icon ? (B(), V("div", {
|
11617
11609
|
key: 2,
|
11618
11610
|
class: "absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",
|
11619
|
-
onClick: D[5] || (D[5] =
|
11611
|
+
onClick: D[5] || (D[5] = he(() => {
|
11620
11612
|
}, ["stop"]))
|
11621
11613
|
}, [
|
11622
11614
|
S("span", {
|
11623
|
-
onClick: D[4] || (D[4] =
|
11615
|
+
onClick: D[4] || (D[4] = he((q) => ge(), ["stop"])),
|
11624
11616
|
contenteditable: "false",
|
11625
11617
|
class: "cursor-pointer"
|
11626
11618
|
}, "选择图标")
|
@@ -11629,17 +11621,17 @@ const Jd = {
|
|
11629
11621
|
icons: e.icons,
|
11630
11622
|
ref_key: "iconRef",
|
11631
11623
|
ref: m,
|
11632
|
-
onOk:
|
11624
|
+
onOk: Ie
|
11633
11625
|
}, null, 8, ["icons"]),
|
11634
11626
|
lt(gf, {
|
11635
11627
|
ref_key: "cropperRef",
|
11636
|
-
ref:
|
11628
|
+
ref: Ae,
|
11637
11629
|
onOk: D[6] || (D[6] = (q) => x(q, a.element))
|
11638
11630
|
}, null, 512)
|
11639
11631
|
], 64);
|
11640
11632
|
};
|
11641
11633
|
}
|
11642
|
-
}),
|
11634
|
+
}), Cf = /* @__PURE__ */ yt(If, [["__scopeId", "data-v-072a458e"]]), Sf = Ge({
|
11643
11635
|
name: "GpCheckbox",
|
11644
11636
|
props: {
|
11645
11637
|
modelValue: {
|
@@ -11659,22 +11651,22 @@ const Jd = {
|
|
11659
11651
|
}
|
11660
11652
|
};
|
11661
11653
|
}
|
11662
|
-
}),
|
11654
|
+
}), 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" };
|
11663
11655
|
function vf(e, t, a, i, s, u) {
|
11664
|
-
return B(), V("div",
|
11665
|
-
S("label",
|
11656
|
+
return B(), V("div", xf, [
|
11657
|
+
S("label", Of, [
|
11666
11658
|
S("input", {
|
11667
11659
|
type: "checkbox",
|
11668
11660
|
checked: e.modelValue,
|
11669
11661
|
onChange: t[0] || (t[0] = (...r) => e.updateValue && e.updateValue(...r)),
|
11670
11662
|
class: "custom-checkbox",
|
11671
11663
|
"aria-checked": e.modelValue
|
11672
|
-
}, null, 40,
|
11673
|
-
S("span",
|
11664
|
+
}, null, 40, Df),
|
11665
|
+
S("span", Lf, we(e.label), 1)
|
11674
11666
|
])
|
11675
11667
|
]);
|
11676
11668
|
}
|
11677
|
-
const fa = /* @__PURE__ */ yt(
|
11669
|
+
const fa = /* @__PURE__ */ yt(Sf, [["render", vf], ["__scopeId", "data-v-68b8f276"]]), Rf = Ge({
|
11678
11670
|
name: "GpMessage",
|
11679
11671
|
props: {
|
11680
11672
|
message: {
|
@@ -11721,38 +11713,38 @@ const fa = /* @__PURE__ */ yt(xf, [["render", vf], ["__scopeId", "data-v-68b8f27
|
|
11721
11713
|
closeMessage: i
|
11722
11714
|
};
|
11723
11715
|
}
|
11724
|
-
}),
|
11716
|
+
}), yf = {
|
11725
11717
|
key: 0,
|
11726
11718
|
class: "gp-message"
|
11727
|
-
},
|
11719
|
+
}, Mf = {
|
11728
11720
|
key: 0,
|
11729
11721
|
class: "mr-2"
|
11730
|
-
},
|
11722
|
+
}, Pf = {
|
11731
11723
|
key: 0,
|
11732
11724
|
class: "text-green-500"
|
11733
|
-
},
|
11725
|
+
}, kf = {
|
11734
11726
|
key: 1,
|
11735
11727
|
class: "text-red-500"
|
11736
|
-
},
|
11728
|
+
}, wf = {
|
11737
11729
|
key: 2,
|
11738
11730
|
class: "text-blue-500"
|
11739
|
-
},
|
11731
|
+
}, Bf = {
|
11740
11732
|
key: 3,
|
11741
11733
|
class: "text-yellow-500"
|
11742
11734
|
};
|
11743
|
-
function
|
11735
|
+
function Uf(e, t, a, i, s, u) {
|
11744
11736
|
return B(), xt(Bu, { name: "fade" }, {
|
11745
11737
|
default: Ks(() => [
|
11746
|
-
e.visible ? (B(), V("div",
|
11738
|
+
e.visible ? (B(), V("div", yf, [
|
11747
11739
|
S("div", {
|
11748
|
-
class:
|
11740
|
+
class: Da([e.typeClass, "message-content"])
|
11749
11741
|
}, [
|
11750
|
-
e.icon ? (B(), V("span",
|
11742
|
+
e.icon ? (B(), V("span", Mf, [
|
11751
11743
|
Uu(e.$slots, "icon", {}, () => [
|
11752
|
-
e.type === "success" ? (B(), V("span",
|
11753
|
-
e.type === "error" ? (B(), V("span",
|
11754
|
-
e.type === "info" ? (B(), V("span",
|
11755
|
-
e.type === "warning" ? (B(), V("span",
|
11744
|
+
e.type === "success" ? (B(), V("span", Pf, "✔")) : K("", !0),
|
11745
|
+
e.type === "error" ? (B(), V("span", kf, "✖")) : K("", !0),
|
11746
|
+
e.type === "info" ? (B(), V("span", wf, "ℹ")) : K("", !0),
|
11747
|
+
e.type === "warning" ? (B(), V("span", Bf, "⚠")) : K("", !0)
|
11756
11748
|
], !0)
|
11757
11749
|
])) : K("", !0),
|
11758
11750
|
S("span", null, we(e.message), 1),
|
@@ -11766,15 +11758,15 @@ function Ff(e, t, a, i, s, u) {
|
|
11766
11758
|
_: 3
|
11767
11759
|
});
|
11768
11760
|
}
|
11769
|
-
const
|
11770
|
-
let
|
11771
|
-
const
|
11761
|
+
const Ff = /* @__PURE__ */ yt(Rf, [["render", Uf], ["__scopeId", "data-v-56476f4c"]]), St = Fu([]);
|
11762
|
+
let ei = null;
|
11763
|
+
const Hf = () => {
|
11772
11764
|
const e = document.createElement("div");
|
11773
11765
|
return e.id = "global-message-container", document.body.appendChild(e), e;
|
11774
|
-
},
|
11775
|
-
if (
|
11776
|
-
const e =
|
11777
|
-
|
11766
|
+
}, Yf = () => {
|
11767
|
+
if (ei) return;
|
11768
|
+
const e = Hf();
|
11769
|
+
ei = Hu({
|
11778
11770
|
setup() {
|
11779
11771
|
return {
|
11780
11772
|
messageQueue: St
|
@@ -11790,7 +11782,7 @@ const Yf = () => {
|
|
11790
11782
|
"bottom-right": "bottom-4 right-4",
|
11791
11783
|
"top-center": "top-4 left-1/2 transform -translate-x-1/2",
|
11792
11784
|
"bottom-center": "bottom-4 left-1/2 transform -translate-x-1/2"
|
11793
|
-
}[((i = St[0]) == null ? void 0 : i.options.position) || "top-
|
11785
|
+
}[((i = St[0]) == null ? void 0 : i.options.position) || "top-right"];
|
11794
11786
|
});
|
11795
11787
|
return Ji(
|
11796
11788
|
"div",
|
@@ -11798,7 +11790,7 @@ const Yf = () => {
|
|
11798
11790
|
class: `fixed flex flex-col gap-2 ${t.value}`
|
11799
11791
|
},
|
11800
11792
|
St.map(
|
11801
|
-
(a) => Ji(
|
11793
|
+
(a) => Ji(Ff, {
|
11802
11794
|
key: a.id,
|
11803
11795
|
...a.options,
|
11804
11796
|
onClose: () => yu(a.id)
|
@@ -11806,15 +11798,15 @@ const Yf = () => {
|
|
11806
11798
|
)
|
11807
11799
|
);
|
11808
11800
|
}
|
11809
|
-
}),
|
11801
|
+
}), ei.mount(e);
|
11810
11802
|
}, yu = (e) => {
|
11811
11803
|
const t = St.findIndex((a) => a.id === e);
|
11812
11804
|
t !== -1 && St.splice(t, 1);
|
11813
11805
|
};
|
11814
|
-
let
|
11815
|
-
const
|
11816
|
-
|
11817
|
-
const t =
|
11806
|
+
let qf = 0;
|
11807
|
+
const ue = (e) => {
|
11808
|
+
Yf();
|
11809
|
+
const t = qf++;
|
11818
11810
|
St.push({
|
11819
11811
|
id: t,
|
11820
11812
|
options: e
|
@@ -11822,39 +11814,39 @@ const Le = (e) => {
|
|
11822
11814
|
yu(t);
|
11823
11815
|
}, e.duration || 3e3);
|
11824
11816
|
};
|
11825
|
-
|
11826
|
-
|
11817
|
+
ue.success = (e, t = 3e3, a = !0) => {
|
11818
|
+
ue(typeof e == "string" ? {
|
11827
11819
|
message: e,
|
11828
11820
|
type: "success",
|
11829
11821
|
duration: t,
|
11830
11822
|
icon: a
|
11831
11823
|
} : { ...e, type: "success" });
|
11832
11824
|
};
|
11833
|
-
|
11834
|
-
|
11825
|
+
ue.error = (e, t = 3e3, a = !0) => {
|
11826
|
+
ue(typeof e == "string" ? {
|
11835
11827
|
message: e,
|
11836
11828
|
type: "error",
|
11837
11829
|
duration: t,
|
11838
11830
|
icon: a
|
11839
11831
|
} : { ...e, type: "error" });
|
11840
11832
|
};
|
11841
|
-
|
11842
|
-
|
11833
|
+
ue.info = (e, t = 3e3, a = !0) => {
|
11834
|
+
ue(typeof e == "string" ? {
|
11843
11835
|
message: e,
|
11844
11836
|
type: "info",
|
11845
11837
|
duration: t,
|
11846
11838
|
icon: a
|
11847
11839
|
} : { ...e, type: "info" });
|
11848
11840
|
};
|
11849
|
-
|
11850
|
-
|
11841
|
+
ue.warning = (e, t = 3e3, a = !0) => {
|
11842
|
+
ue(typeof e == "string" ? {
|
11851
11843
|
message: e,
|
11852
11844
|
type: "warning",
|
11853
11845
|
duration: t,
|
11854
11846
|
icon: a
|
11855
11847
|
} : { ...e, type: "warning" });
|
11856
11848
|
};
|
11857
|
-
const
|
11849
|
+
const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf = { class: "text-gray-500 my-2" }, Gf = { key: 1 }, Qf = { key: 2 }, jf = { key: 3 }, zf = { key: 4 }, Kf = { key: 5 }, Zf = { key: 6 }, Jf = { key: 7 }, e1 = { key: 8 }, t1 = /* @__PURE__ */ Ge({
|
11858
11850
|
__name: "EditorPanel",
|
11859
11851
|
props: {
|
11860
11852
|
element: Object
|
@@ -11870,17 +11862,53 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11870
11862
|
{ immediate: !0 }
|
11871
11863
|
);
|
11872
11864
|
function u() {
|
11873
|
-
|
11865
|
+
if (s.value.type === te.Icon && !s.value.attrs.class.includes("iconfont")) {
|
11866
|
+
ue.error("Icon 支持 iconfont 图标");
|
11867
|
+
return;
|
11868
|
+
}
|
11869
|
+
if (s.value.type === te.Image && s.value.tag !== "img") {
|
11870
|
+
ue.error("节点类型错误");
|
11871
|
+
return;
|
11872
|
+
}
|
11873
|
+
if (s.value.type === te.Video && s.value.tag !== "video") {
|
11874
|
+
ue.error("节点类型错误");
|
11875
|
+
return;
|
11876
|
+
}
|
11877
|
+
if (s.value.type === te.Link && s.value.tag !== "a") {
|
11878
|
+
ue.error("节点类型错误");
|
11879
|
+
return;
|
11880
|
+
}
|
11881
|
+
if (s.value.type === te.Text) {
|
11882
|
+
if (s.value.rule.minText > s.value.rule.maxText) {
|
11883
|
+
ue.error("最小文本长度不能大于最大文本长度");
|
11884
|
+
return;
|
11885
|
+
}
|
11886
|
+
if (s.value.tag !== "p" && s.value.tag !== "div" && s.value.tag !== "span" && s.value.tag !== "h1" && s.value.tag !== "h2" && s.value.tag !== "h3" && s.value.tag !== "h4" && s.value.tag !== "h5" && s.value.tag !== "h6") {
|
11887
|
+
ue.error("节点类型错误");
|
11888
|
+
return;
|
11889
|
+
}
|
11890
|
+
}
|
11891
|
+
if (s.value.type === te.Block) {
|
11892
|
+
if (s.value.rule.minBlock > s.value.rule.maxBlock) {
|
11893
|
+
ue.error("最小块数量不能大于最大块数量");
|
11894
|
+
return;
|
11895
|
+
}
|
11896
|
+
if (s.value.tag !== "div" && s.value.tag !== "section" && s.value.tag !== "article" && s.value.tag !== "nav" && s.value.tag !== "header" && s.value.tag !== "footer" && s.value.tag !== "span" && s.value.tag !== "p" && s.value.tag !== "img") {
|
11897
|
+
ue.error("节点类型错误");
|
11898
|
+
return;
|
11899
|
+
}
|
11900
|
+
}
|
11901
|
+
i("updateElement", s.value), ue.success("保存成功");
|
11874
11902
|
}
|
11875
11903
|
return (r, o) => (B(), V("div", null, [
|
11876
|
-
s.value ? (B(), V("div",
|
11877
|
-
s.value.text !== void 0 ? (B(), V("div",
|
11904
|
+
s.value ? (B(), V("div", Vf, [
|
11905
|
+
s.value.text !== void 0 ? (B(), V("div", Wf, [
|
11878
11906
|
o[11] || (o[11] = S("label", { class: "block mt-4" }, "内容", -1)),
|
11879
|
-
S("div",
|
11907
|
+
S("div", $f, we(s.value.text || "-"), 1)
|
11880
11908
|
])) : K("", !0),
|
11881
11909
|
S("div", null, [
|
11882
11910
|
o[12] || (o[12] = S("label", { class: "block mt-4" }, "节点", -1)),
|
11883
|
-
S("div",
|
11911
|
+
S("div", Xf, we(s.value.xpath), 1)
|
11884
11912
|
]),
|
11885
11913
|
S("div", null, [
|
11886
11914
|
o[14] || (o[14] = S("label", { class: "block mt-4" }, "类型", -1)),
|
@@ -11899,7 +11927,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11899
11927
|
[Yu, s.value.type]
|
11900
11928
|
])
|
11901
11929
|
]),
|
11902
|
-
s.value.type ==
|
11930
|
+
s.value.type == Ne(te).Text ? (B(), V("div", Gf, [
|
11903
11931
|
o[15] || (o[15] = S("label", { class: "block mt-4" }, "最小文本长度", -1)),
|
11904
11932
|
st(S("input", {
|
11905
11933
|
"onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
|
@@ -11908,7 +11936,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11908
11936
|
[pt, s.value.rule.minText]
|
11909
11937
|
])
|
11910
11938
|
])) : K("", !0),
|
11911
|
-
s.value.type ==
|
11939
|
+
s.value.type == Ne(te).Text ? (B(), V("div", Qf, [
|
11912
11940
|
o[16] || (o[16] = S("label", { class: "block mt-4" }, "最大文本长度", -1)),
|
11913
11941
|
st(S("input", {
|
11914
11942
|
"onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
|
@@ -11917,7 +11945,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11917
11945
|
[pt, s.value.rule.maxText]
|
11918
11946
|
])
|
11919
11947
|
])) : K("", !0),
|
11920
|
-
s.value.type ==
|
11948
|
+
s.value.type == Ne(te).Image ? (B(), V("div", jf, [
|
11921
11949
|
o[17] || (o[17] = S("label", { class: "block mt-4" }, "是否裁剪", -1)),
|
11922
11950
|
lt(fa, {
|
11923
11951
|
class: "py-2",
|
@@ -11926,7 +11954,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11926
11954
|
label: "是"
|
11927
11955
|
}, null, 8, ["modelValue"])
|
11928
11956
|
])) : K("", !0),
|
11929
|
-
s.value.type ==
|
11957
|
+
s.value.type == Ne(te).Image ? (B(), V("div", zf, [
|
11930
11958
|
o[18] || (o[18] = S("label", { class: "block mt-4" }, "图片宽度", -1)),
|
11931
11959
|
st(S("input", {
|
11932
11960
|
"onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
|
@@ -11935,7 +11963,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11935
11963
|
[pt, s.value.rule.minImageWidth]
|
11936
11964
|
])
|
11937
11965
|
])) : K("", !0),
|
11938
|
-
s.value.type ==
|
11966
|
+
s.value.type == Ne(te).Image ? (B(), V("div", Kf, [
|
11939
11967
|
o[19] || (o[19] = S("label", { class: "block mt-4" }, "图片高度", -1)),
|
11940
11968
|
st(S("input", {
|
11941
11969
|
"onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
|
@@ -11944,7 +11972,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11944
11972
|
[pt, s.value.rule.maxImageHeight]
|
11945
11973
|
])
|
11946
11974
|
])) : K("", !0),
|
11947
|
-
s.value.type ==
|
11975
|
+
s.value.type == Ne(te).Block ? (B(), V("div", Zf, [
|
11948
11976
|
o[20] || (o[20] = S("label", { class: "block mt-4" }, "块最小数量", -1)),
|
11949
11977
|
st(S("input", {
|
11950
11978
|
"onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
|
@@ -11953,7 +11981,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11953
11981
|
[pt, s.value.rule.minBlock]
|
11954
11982
|
])
|
11955
11983
|
])) : K("", !0),
|
11956
|
-
s.value.type ==
|
11984
|
+
s.value.type == Ne(te).Block ? (B(), V("div", Jf, [
|
11957
11985
|
o[21] || (o[21] = S("label", { class: "block mt-4" }, "块最大数量", -1)),
|
11958
11986
|
st(S("input", {
|
11959
11987
|
"onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
|
@@ -11962,7 +11990,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11962
11990
|
[pt, s.value.rule.maxBlock]
|
11963
11991
|
])
|
11964
11992
|
])) : K("", !0),
|
11965
|
-
s.value.type ==
|
11993
|
+
s.value.type == Ne(te).Text || s.value.type == Ne(te).Icon ? (B(), V("div", e1, [
|
11966
11994
|
o[22] || (o[22] = S("label", { class: "block mt-4" }, "主题色", -1)),
|
11967
11995
|
lt(fa, {
|
11968
11996
|
class: "py-2",
|
@@ -11992,17 +12020,17 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11992
12020
|
])) : K("", !0),
|
11993
12021
|
S("button", {
|
11994
12022
|
onClick: u,
|
11995
|
-
class: "mt-4 p-2 bg-
|
12023
|
+
class: "mt-4 p-2 bg-green-500 text-white rounded"
|
11996
12024
|
}, " 保存 ")
|
11997
12025
|
]));
|
11998
12026
|
}
|
11999
|
-
}),
|
12027
|
+
}), a1 = /* @__PURE__ */ yt(t1, [["__scopeId", "data-v-34a23ef6"]]), i1 = { class: "flex h-screen" }, s1 = { class: "goodschool_mobile" }, n1 = ["innerHTML"], u1 = ["innerHTML"], r1 = { class: "flex-1 bg-gray-100 overflow-auto" }, o1 = { class: "p-4" }, c1 = {
|
12000
12028
|
key: 0,
|
12001
12029
|
class: "text-red-500 text-xs mt-2"
|
12002
|
-
},
|
12030
|
+
}, l1 = {
|
12003
12031
|
key: 0,
|
12004
12032
|
class: "resize-area border-l overflow-auto w-[375px]"
|
12005
|
-
},
|
12033
|
+
}, h1 = { class: "p-4" }, d1 = /* @__PURE__ */ Ge({
|
12006
12034
|
__name: "Designer",
|
12007
12035
|
props: {
|
12008
12036
|
mode: { default: "design" },
|
@@ -12033,7 +12061,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12033
12061
|
x && i("update:element", x);
|
12034
12062
|
}, { immediate: !0 });
|
12035
12063
|
const o = z("");
|
12036
|
-
let c =
|
12064
|
+
let c = Rs("", {}, !1);
|
12037
12065
|
ot(() => o.value, (x) => {
|
12038
12066
|
i("update:modelValue", x);
|
12039
12067
|
}, { immediate: !0 });
|
@@ -12043,17 +12071,17 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12043
12071
|
}
|
12044
12072
|
function A(x, y = "") {
|
12045
12073
|
if (y) {
|
12046
|
-
const O =
|
12074
|
+
const O = I(r.value, y);
|
12047
12075
|
O ? f.value = O : f.value = x;
|
12048
12076
|
} else
|
12049
12077
|
f.value = x;
|
12050
12078
|
}
|
12051
|
-
function
|
12079
|
+
function I(x, y) {
|
12052
12080
|
if (x.xpath === y)
|
12053
12081
|
return x;
|
12054
12082
|
if (x.children && x.children.length)
|
12055
12083
|
for (const O of x.children) {
|
12056
|
-
const D =
|
12084
|
+
const D = I(O, y);
|
12057
12085
|
if (D)
|
12058
12086
|
return D;
|
12059
12087
|
}
|
@@ -12061,36 +12089,36 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12061
12089
|
function L(x) {
|
12062
12090
|
var y, O, D, H;
|
12063
12091
|
if (console.log(x, h.value), h.value)
|
12064
|
-
if (h.value.rule = x.rule, h.value.type = x.type, (y = x.rule) != null && y.isThemeColor ? (x.attrs.class += "theme_color", x.attrs.style && (x.attrs.style = void 0)) : (console.log("e111", (O = x.attrs.class) == null ? void 0 : O.includes("theme_color")), (D = x.attrs.class) != null && D.includes("theme_color") && (x.attrs.class = x.attrs.class.replace("theme_color", " "))), h.value.type ===
|
12065
|
-
const q =
|
12092
|
+
if (h.value.rule = x.rule, h.value.type = x.type, (y = x.rule) != null && y.isThemeColor ? (x.attrs.class += "theme_color", x.attrs.style && (x.attrs.style = void 0)) : (console.log("e111", (O = x.attrs.class) == null ? void 0 : O.includes("theme_color")), (D = x.attrs.class) != null && D.includes("theme_color") && (x.attrs.class = x.attrs.class.replace("theme_color", " "))), h.value.type === te.Block) {
|
12093
|
+
const q = I(r.value, h.value.parentxpath || "");
|
12066
12094
|
q && q.children && q.children.forEach((J) => {
|
12067
|
-
var
|
12068
|
-
J.tag === h.value.tag && (J.rule = x.rule, J.type = x.type, (
|
12095
|
+
var ne;
|
12096
|
+
J.tag === h.value.tag && (J.rule = x.rule, J.type = x.type, (ne = J.attrs.class) != null && ne.includes(" mb40 relative") || (J.attrs.class += " mb40 relative"));
|
12069
12097
|
});
|
12070
12098
|
} else
|
12071
|
-
(H = h.value.attrs.class) != null && H.includes(" mb40") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40", " "));
|
12099
|
+
(H = h.value.attrs.class) != null && H.includes(" mb40 relative") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40 relative", " "));
|
12072
12100
|
}
|
12073
12101
|
function M(x) {
|
12074
12102
|
o.value = x;
|
12075
12103
|
}
|
12076
12104
|
function X(x) {
|
12077
|
-
c =
|
12105
|
+
c = Rs(x);
|
12078
12106
|
const y = c("body").children().toArray().map((O) => U(c(O)));
|
12079
12107
|
return o.value = c("body").html() || "", y[0];
|
12080
12108
|
}
|
12081
12109
|
function U(x, y = "") {
|
12082
12110
|
var J;
|
12083
|
-
function O(
|
12084
|
-
if (!
|
12085
|
-
const
|
12086
|
-
let Ve =
|
12111
|
+
function O(ne) {
|
12112
|
+
if (!ne || !ne[0]) return "";
|
12113
|
+
const oe = [];
|
12114
|
+
let Ve = ne;
|
12087
12115
|
for (; Ve.length && Ve[0].tagName !== "html"; ) {
|
12088
12116
|
const Zi = Ve[0].tagName, Mu = Ve.parent().children(Zi).index(Ve) + 1;
|
12089
|
-
|
12117
|
+
oe.unshift(`${Zi}[${Mu}]`), Ve = Ve.parent();
|
12090
12118
|
}
|
12091
|
-
return "/html/" +
|
12119
|
+
return "/html/" + oe.join("/");
|
12092
12120
|
}
|
12093
|
-
const D = O(x).replace("/html/body[1]", ""), H = x.children().toArray().map((
|
12121
|
+
const D = O(x).replace("/html/body[1]", ""), H = x.children().toArray().map((ne) => U(c(ne), D)), q = (J = a.rules) == null ? void 0 : J.find((ne) => ne.xpath === D);
|
12094
12122
|
return {
|
12095
12123
|
tag: x[0].tagName,
|
12096
12124
|
text: x.contents().not(x.children()).text().trim(),
|
@@ -12098,62 +12126,62 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12098
12126
|
children: H,
|
12099
12127
|
xpath: D,
|
12100
12128
|
parentxpath: y,
|
12101
|
-
type: (q == null ? void 0 : q.type) ||
|
12129
|
+
type: (q == null ? void 0 : q.type) || te.None,
|
12102
12130
|
rule: (q == null ? void 0 : q.rule) || {}
|
12103
12131
|
};
|
12104
12132
|
}
|
12105
12133
|
function $(x) {
|
12106
12134
|
console.log("更新子节点的文本", x);
|
12107
|
-
const y =
|
12135
|
+
const y = I(r.value, x.element.xpath);
|
12108
12136
|
y && (y.editText = x.newText);
|
12109
12137
|
}
|
12110
12138
|
function F(x, y = "") {
|
12111
12139
|
function O(D, H) {
|
12112
|
-
var
|
12113
|
-
const J = (H ? ((
|
12140
|
+
var ne;
|
12141
|
+
const J = (H ? ((ne = I(r.value, H)) == null ? void 0 : ne.children) || [] : [r.value]).filter((oe) => oe.tag === D.tag).indexOf(D) + 1;
|
12114
12142
|
return `${H}/${D.tag}[${J}]`;
|
12115
12143
|
}
|
12116
12144
|
x.xpath = O(x, y), x.parentxpath = y, (x.children || []).forEach((D) => F(D, x.xpath));
|
12117
12145
|
}
|
12118
12146
|
function P({ action: x, element: y, newBlock: O }) {
|
12119
12147
|
console.log("块操作", x, y, O);
|
12120
|
-
const D =
|
12148
|
+
const D = I(r.value, y.parentxpath || "");
|
12121
12149
|
if (!D || !D.children) return;
|
12122
|
-
const H = D.children.findIndex((
|
12150
|
+
const H = D.children.findIndex((oe) => oe === y);
|
12123
12151
|
if (H === -1) return;
|
12124
|
-
const q = D.children.length, { minBlock: J, maxBlock:
|
12125
|
-
if ((x === "add" || x === "copy") && q >= (
|
12126
|
-
m.value = `无法添加更多块。最大块数量为 ${
|
12152
|
+
const q = D.children.length, { minBlock: J, maxBlock: ne } = y.rule;
|
12153
|
+
if ((x === "add" || x === "copy") && q >= (ne || 1 / 0)) {
|
12154
|
+
m.value = `无法添加更多块。最大块数量为 ${ne}`, ue.error(m.value);
|
12127
12155
|
return;
|
12128
12156
|
}
|
12129
12157
|
switch (x) {
|
12130
12158
|
case "add":
|
12131
12159
|
if (O) {
|
12132
|
-
const
|
12133
|
-
D.children.splice(H + 1, 0,
|
12160
|
+
const oe = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
|
12161
|
+
D.children.splice(H + 1, 0, oe);
|
12134
12162
|
}
|
12135
12163
|
break;
|
12136
12164
|
case "copy":
|
12137
12165
|
if (O) {
|
12138
|
-
const
|
12139
|
-
D.children.splice(H + 1, 0,
|
12166
|
+
const oe = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
|
12167
|
+
D.children.splice(H + 1, 0, oe);
|
12140
12168
|
}
|
12141
12169
|
break;
|
12142
12170
|
case "moveUp":
|
12143
12171
|
if (H > 0) {
|
12144
|
-
const [
|
12145
|
-
D.children.splice(H - 1, 0,
|
12172
|
+
const [oe] = D.children.splice(H, 1);
|
12173
|
+
D.children.splice(H - 1, 0, oe);
|
12146
12174
|
}
|
12147
12175
|
break;
|
12148
12176
|
case "moveDown":
|
12149
12177
|
if (H < D.children.length - 1) {
|
12150
|
-
const [
|
12151
|
-
D.children.splice(H + 1, 0,
|
12178
|
+
const [oe] = D.children.splice(H, 1);
|
12179
|
+
D.children.splice(H + 1, 0, oe);
|
12152
12180
|
}
|
12153
12181
|
break;
|
12154
12182
|
case "delete":
|
12155
12183
|
if (q <= (J || 0)) {
|
12156
|
-
m.value = `无法删除更多块。最小块数量为 ${J}
|
12184
|
+
m.value = `无法删除更多块。最小块数量为 ${J}`, ue.error(m.value);
|
12157
12185
|
return;
|
12158
12186
|
}
|
12159
12187
|
D.children.splice(H, 1);
|
@@ -12168,46 +12196,46 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12168
12196
|
function w(x, y) {
|
12169
12197
|
y.attrs.src = x;
|
12170
12198
|
}
|
12171
|
-
const Q = z(a.previewWidth),
|
12172
|
-
let
|
12173
|
-
function
|
12174
|
-
|
12199
|
+
const Q = z(a.previewWidth), le = z(375);
|
12200
|
+
let ge = z(!1), Ie = z(""), ve = 0, _e = 0;
|
12201
|
+
function Ae(x) {
|
12202
|
+
Ie.value = x, ge.value = !0, ve = event.clientX, _e = Q.value, window.addEventListener("mousemove", se), window.addEventListener("mouseup", Re);
|
12175
12203
|
}
|
12176
|
-
function
|
12177
|
-
if (!
|
12178
|
-
const y = x.clientX -
|
12179
|
-
|
12204
|
+
function se(x) {
|
12205
|
+
if (!ge.value) return;
|
12206
|
+
const y = x.clientX - ve;
|
12207
|
+
Ie.value === "preview" ? Q.value = Math.max(200, _e + y) : Ie.value === "structure" && (le.value = Math.max(200, _e - y));
|
12180
12208
|
}
|
12181
|
-
function
|
12182
|
-
|
12209
|
+
function Re() {
|
12210
|
+
ge.value = !1, Ie.value = "", window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", Re);
|
12183
12211
|
}
|
12184
|
-
return (x, y) => (B(), V("div",
|
12212
|
+
return (x, y) => (B(), V("div", i1, [
|
12185
12213
|
S("div", {
|
12186
12214
|
class: "border-l overflow-auto resize-area",
|
12187
12215
|
style: qu({ width: Q.value + "px" })
|
12188
12216
|
}, [
|
12189
|
-
S("div",
|
12217
|
+
S("div", s1, [
|
12190
12218
|
y[1] || (y[1] = S("h2", { class: "text-lg font-bold" }, "实时预览", -1)),
|
12191
12219
|
o.value ? (B(), V("div", {
|
12192
12220
|
key: 0,
|
12193
12221
|
innerHTML: o.value
|
12194
|
-
}, null, 8,
|
12222
|
+
}, null, 8, n1)) : (B(), V("div", {
|
12195
12223
|
key: 1,
|
12196
|
-
innerHTML:
|
12197
|
-
}, null, 8,
|
12224
|
+
innerHTML: Ne(c)("body").html()
|
12225
|
+
}, null, 8, u1))
|
12198
12226
|
])
|
12199
12227
|
], 4),
|
12200
12228
|
S("div", {
|
12201
12229
|
class: "resizer",
|
12202
|
-
onMousedown: y[0] || (y[0] = (O) =>
|
12230
|
+
onMousedown: y[0] || (y[0] = (O) => Ae("preview"))
|
12203
12231
|
}, null, 32),
|
12204
|
-
S("div",
|
12205
|
-
S("div",
|
12232
|
+
S("div", r1, [
|
12233
|
+
S("div", o1, [
|
12206
12234
|
y[2] || (y[2] = S("div", { class: "flex justify-between" }, [
|
12207
12235
|
S("h2", { class: "text-lg font-bold" }, "结构渲染")
|
12208
12236
|
], -1)),
|
12209
|
-
m.value ? (B(), V("div",
|
12210
|
-
r.value ? (B(), xt(
|
12237
|
+
m.value ? (B(), V("div", c1, we(m.value), 1)) : K("", !0),
|
12238
|
+
r.value ? (B(), xt(Cf, {
|
12211
12239
|
key: 1,
|
12212
12240
|
icons: x.icons,
|
12213
12241
|
element: r.value,
|
@@ -12223,10 +12251,10 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12223
12251
|
}, null, 8, ["icons", "element", "selectedElement", "hoveredElement"])) : K("", !0)
|
12224
12252
|
])
|
12225
12253
|
]),
|
12226
|
-
u.value == "design" ? (B(), V("div",
|
12227
|
-
S("div",
|
12254
|
+
u.value == "design" ? (B(), V("div", l1, [
|
12255
|
+
S("div", h1, [
|
12228
12256
|
y[3] || (y[3] = S("h2", { class: "text-lg font-bold" }, "节点属性", -1)),
|
12229
|
-
h.value ? (B(), xt(
|
12257
|
+
h.value ? (B(), xt(a1, {
|
12230
12258
|
key: 0,
|
12231
12259
|
element: h.value,
|
12232
12260
|
onUpdateElement: L
|
@@ -12235,12 +12263,12 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12235
12263
|
])) : K("", !0)
|
12236
12264
|
]));
|
12237
12265
|
}
|
12238
|
-
}),
|
12266
|
+
}), f1 = /* @__PURE__ */ yt(d1, [["__scopeId", "data-v-b3574918"]]), g1 = {
|
12239
12267
|
install(e) {
|
12240
|
-
e.component("Designer",
|
12268
|
+
e.component("Designer", f1);
|
12241
12269
|
}
|
12242
12270
|
};
|
12243
12271
|
export {
|
12244
|
-
|
12245
|
-
|
12272
|
+
f1 as Designer,
|
12273
|
+
g1 as default
|
12246
12274
|
};
|