bi-components-library 1.1.85 → 1.1.86
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/index.es.js +836 -834
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +31 -31
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -554,11 +554,11 @@ const { Option: Yl } = br, Wl = ({
|
|
|
554
554
|
externalParams: u = {},
|
|
555
555
|
...l
|
|
556
556
|
}) => {
|
|
557
|
-
const [f, p] = ie([]), [
|
|
557
|
+
const [f, p] = ie([]), [E, c] = ie(!1), [y, h] = ie({
|
|
558
558
|
current: 1,
|
|
559
559
|
pageSize: i,
|
|
560
560
|
total: 0
|
|
561
|
-
}), [m,
|
|
561
|
+
}), [m, g] = ie({}), [b, T] = ie({}), [C] = Wn.useForm(), S = Z(y);
|
|
562
562
|
S.current = y;
|
|
563
563
|
const A = Z(u);
|
|
564
564
|
A.current = u;
|
|
@@ -593,9 +593,9 @@ const { Option: Yl } = br, Wl = ({
|
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
}, [t, b, m]), k = oe((I) => {
|
|
596
|
-
|
|
596
|
+
g(I), h((x) => ({ ...x, current: 1 }));
|
|
597
597
|
}, []), N = oe(() => {
|
|
598
|
-
C.resetFields(),
|
|
598
|
+
C.resetFields(), g({}), h((I) => ({ ...I, current: 1 }));
|
|
599
599
|
}, [C]), O = oe(() => {
|
|
600
600
|
v();
|
|
601
601
|
}, [v]), R = oe((I, x, F) => {
|
|
@@ -650,7 +650,7 @@ const { Option: Yl } = br, Wl = ({
|
|
|
650
650
|
...l,
|
|
651
651
|
columns: _,
|
|
652
652
|
dataSource: f,
|
|
653
|
-
loading:
|
|
653
|
+
loading: E,
|
|
654
654
|
pagination: {
|
|
655
655
|
...y,
|
|
656
656
|
showSizeChanger: !0,
|
|
@@ -738,7 +738,7 @@ const jl = ({ host: e, onChange: t }) => {
|
|
|
738
738
|
} catch {
|
|
739
739
|
return [];
|
|
740
740
|
}
|
|
741
|
-
}, [a]), [u, l] = ie(s || void 0), [f, p] = ie(64),
|
|
741
|
+
}, [a]), [u, l] = ie(s || void 0), [f, p] = ie(64), E = Z(null), c = (m) => {
|
|
742
742
|
l(m), e.setAttribute("data-value", m), t(n, m);
|
|
743
743
|
};
|
|
744
744
|
se(() => {
|
|
@@ -746,14 +746,14 @@ const jl = ({ host: e, onChange: t }) => {
|
|
|
746
746
|
}, [s]);
|
|
747
747
|
const y = Ne.useCallback(() => {
|
|
748
748
|
if (u != null && u !== "") {
|
|
749
|
-
const m = o.find((
|
|
749
|
+
const m = o.find((g) => String(g.value) === String(u));
|
|
750
750
|
return m ? typeof m.label == "string" ? m.label : String(m.label ?? u) : String(u);
|
|
751
751
|
}
|
|
752
752
|
return r || "请选择";
|
|
753
753
|
}, [u, o, r]), h = Ne.useCallback(() => {
|
|
754
|
-
const m =
|
|
754
|
+
const m = E.current;
|
|
755
755
|
if (!m) return;
|
|
756
|
-
const
|
|
756
|
+
const g = m.querySelector(".ant-select-selection-item"), b = m.querySelector(".ant-select-selection-placeholder"), T = g || b, C = (T?.textContent || "").trim() || y(), S = m.querySelector(".ant-select-selector"), A = T || S || m, L = window.getComputedStyle(A), _ = T ? L.fontSize : "16px", v = L.fontFamily || "sans-serif", k = L.fontWeight || "400", O = `${L.fontStyle || "normal"} ${k} ${_} ${v}`, I = document.createElement("canvas").getContext("2d"), x = I ? Math.ceil((I.font = O, I.measureText(C).width || 0)) : 0;
|
|
757
757
|
let F = 0;
|
|
758
758
|
if (S) {
|
|
759
759
|
const K = window.getComputedStyle(S);
|
|
@@ -771,18 +771,18 @@ const jl = ({ host: e, onChange: t }) => {
|
|
|
771
771
|
return tt(() => {
|
|
772
772
|
const m = window.requestAnimationFrame(() => {
|
|
773
773
|
h();
|
|
774
|
-
}),
|
|
774
|
+
}), g = window.setTimeout(() => {
|
|
775
775
|
h();
|
|
776
776
|
}, 60);
|
|
777
777
|
return () => {
|
|
778
|
-
window.cancelAnimationFrame(m), window.clearTimeout(
|
|
778
|
+
window.cancelAnimationFrame(m), window.clearTimeout(g);
|
|
779
779
|
};
|
|
780
780
|
}, [h]), se(() => {
|
|
781
781
|
if (!("fonts" in document)) return;
|
|
782
782
|
let m = !1;
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
785
|
-
return
|
|
783
|
+
const g = document.fonts;
|
|
784
|
+
if (g?.ready)
|
|
785
|
+
return g.ready.then(() => {
|
|
786
786
|
m || h();
|
|
787
787
|
}), () => {
|
|
788
788
|
m = !0;
|
|
@@ -793,7 +793,7 @@ const jl = ({ host: e, onChange: t }) => {
|
|
|
793
793
|
{
|
|
794
794
|
className: "rte-select-wrapper",
|
|
795
795
|
contentEditable: !1,
|
|
796
|
-
ref:
|
|
796
|
+
ref: E,
|
|
797
797
|
style: { display: "inline-block", width: f },
|
|
798
798
|
children: /* @__PURE__ */ Y(
|
|
799
799
|
br,
|
|
@@ -894,14 +894,14 @@ function Jl(e, t, n, r, a) {
|
|
|
894
894
|
const y = s.measureText(c || " ").width || 0;
|
|
895
895
|
u = Math.max(u, y);
|
|
896
896
|
}
|
|
897
|
-
const l = Number.parseFloat(n), f = Number.isFinite(l) ? l : 0, p = o.reduce((c, y) => c.length >= y.length ? c : y, ""),
|
|
898
|
-
return Math.ceil(u +
|
|
897
|
+
const l = Number.parseFloat(n), f = Number.isFinite(l) ? l : 0, p = o.reduce((c, y) => c.length >= y.length ? c : y, ""), E = f > 0 ? f * Math.max(0, (p || "").length - 1) : 0;
|
|
898
|
+
return Math.ceil(u + E + r + a);
|
|
899
899
|
}
|
|
900
900
|
const Zl = ({ host: e, onChange: t }) => {
|
|
901
901
|
const n = e.dataset.key || "", r = e.dataset.placeholder || "", a = e.dataset.tooltip || "", i = e.dataset.allowNewline !== "0", s = Sn(() => Kl(e.dataset.value || ""), [e]), [o, u] = ie(s), l = Z(s), f = Sn(() => {
|
|
902
902
|
const C = Number.parseFloat(e.dataset.estimatedWidth || "");
|
|
903
903
|
return Number.isFinite(C) && C > 0 ? C : 64;
|
|
904
|
-
}, [e]), [p,
|
|
904
|
+
}, [e]), [p, E] = ie(f), c = Z(null), y = (o || "").trim().length > 0, h = !!a && !y, m = (o || "").includes(`
|
|
905
905
|
`);
|
|
906
906
|
se(() => {
|
|
907
907
|
u(s), l.current = s;
|
|
@@ -910,13 +910,13 @@ const Zl = ({ host: e, onChange: t }) => {
|
|
|
910
910
|
}, [o]), se(() => {
|
|
911
911
|
e.classList.toggle("rte-variable-multiline", m);
|
|
912
912
|
}, [e, m]);
|
|
913
|
-
const
|
|
913
|
+
const g = Ne.useCallback(() => {
|
|
914
914
|
const C = c.current;
|
|
915
915
|
if (!C) return;
|
|
916
916
|
const S = C.querySelector("textarea");
|
|
917
917
|
if (!S) return;
|
|
918
918
|
const A = window.getComputedStyle(S), L = A.fontStyle || "normal", _ = A.fontWeight || "400", v = A.fontSize || "16px", k = A.fontFamily || "sans-serif", N = `${L} ${_} ${v} ${k}`, O = Number.parseFloat(A.paddingLeft) || 0, R = Number.parseFloat(A.paddingRight) || 0, I = (o && o.length > 0 ? o : r) || " ", x = Jl(I, N, A.letterSpacing || "0", O, R), $ = Math.max(24, Math.min(600, x + 2));
|
|
919
|
-
|
|
919
|
+
E((H) => H === $ ? H : $);
|
|
920
920
|
}, [r, o]);
|
|
921
921
|
se(() => {
|
|
922
922
|
const C = c.current;
|
|
@@ -932,22 +932,22 @@ const Zl = ({ host: e, onChange: t }) => {
|
|
|
932
932
|
};
|
|
933
933
|
}, [n, t]), tt(() => {
|
|
934
934
|
const C = window.requestAnimationFrame(() => {
|
|
935
|
-
|
|
935
|
+
g();
|
|
936
936
|
});
|
|
937
937
|
return () => {
|
|
938
938
|
window.cancelAnimationFrame(C);
|
|
939
939
|
};
|
|
940
|
-
}, [
|
|
940
|
+
}, [g]), se(() => {
|
|
941
941
|
if (!("fonts" in document)) return;
|
|
942
942
|
let C = !1;
|
|
943
943
|
const S = document.fonts;
|
|
944
944
|
if (S?.ready)
|
|
945
945
|
return S.ready.then(() => {
|
|
946
|
-
C ||
|
|
946
|
+
C || g();
|
|
947
947
|
}), () => {
|
|
948
948
|
C = !0;
|
|
949
949
|
};
|
|
950
|
-
}, [
|
|
950
|
+
}, [g]);
|
|
951
951
|
const b = (C) => {
|
|
952
952
|
const S = C.target.value ?? "";
|
|
953
953
|
u(S), e.setAttribute("data-value", Ql(S)), t(n, S);
|
|
@@ -1027,8 +1027,8 @@ const Zl = ({ host: e, onChange: t }) => {
|
|
|
1027
1027
|
const l = (f) => {
|
|
1028
1028
|
f.forEach((p) => {
|
|
1029
1029
|
if (p.nodeType !== Node.ELEMENT_NODE) return;
|
|
1030
|
-
const
|
|
1031
|
-
(
|
|
1030
|
+
const E = p;
|
|
1031
|
+
(E.matches?.('[data-variable-render="antd-textarea"]') || E.querySelector?.('[data-variable-render="antd-textarea"]')) && (o = !0);
|
|
1032
1032
|
});
|
|
1033
1033
|
};
|
|
1034
1034
|
if (l(u.addedNodes), l(u.removedNodes), o) break;
|
|
@@ -1042,7 +1042,7 @@ function tc(e, t = []) {
|
|
|
1042
1042
|
tt(() => {
|
|
1043
1043
|
if (!e.current) return;
|
|
1044
1044
|
const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), a = (p) => {
|
|
1045
|
-
const
|
|
1045
|
+
const E = p.value || p.placeholder || "", c = window.getComputedStyle(p), y = Number.parseFloat(c.paddingLeft) || 0, h = Number.parseFloat(c.paddingRight) || 0, m = document.createElement("span");
|
|
1046
1046
|
m.style.cssText = `
|
|
1047
1047
|
position: absolute;
|
|
1048
1048
|
visibility: hidden;
|
|
@@ -1053,38 +1053,38 @@ function tc(e, t = []) {
|
|
|
1053
1053
|
letter-spacing: ${c.letterSpacing || "normal"};
|
|
1054
1054
|
padding-left: ${y}px;
|
|
1055
1055
|
padding-right: ${h}px;
|
|
1056
|
-
`, m.textContent =
|
|
1056
|
+
`, m.textContent = E || "0", document.body.appendChild(m);
|
|
1057
1057
|
const b = Math.max(24, Math.min(600, Math.ceil(m.offsetWidth) + 2));
|
|
1058
1058
|
return document.body.removeChild(m), b;
|
|
1059
1059
|
}, i = (p) => {
|
|
1060
|
-
const
|
|
1061
|
-
if (!
|
|
1062
|
-
let c =
|
|
1060
|
+
const E = p.target;
|
|
1061
|
+
if (!E) return;
|
|
1062
|
+
let c = E.value;
|
|
1063
1063
|
if (c = c.replace(/[^\d]/g, ""), c !== "" && c !== "0") {
|
|
1064
1064
|
const h = parseInt(c, 10);
|
|
1065
1065
|
if (Number.isNaN(h))
|
|
1066
|
-
|
|
1066
|
+
E.value = "";
|
|
1067
1067
|
else {
|
|
1068
|
-
const m =
|
|
1069
|
-
|
|
1068
|
+
const m = E.getAttribute("min"), g = E.getAttribute("max"), b = m !== null ? parseInt(m, 10) : 0, T = g !== null ? parseInt(g, 10) : 1 / 0, C = Math.min(Math.max(h, b), T);
|
|
1069
|
+
E.value = String(C);
|
|
1070
1070
|
}
|
|
1071
1071
|
} else if (c === "0") {
|
|
1072
|
-
const h =
|
|
1073
|
-
0 < (h !== null ? parseInt(h, 10) : 0) ?
|
|
1072
|
+
const h = E.getAttribute("min");
|
|
1073
|
+
0 < (h !== null ? parseInt(h, 10) : 0) ? E.value = "" : E.value = "0";
|
|
1074
1074
|
}
|
|
1075
|
-
|
|
1076
|
-
const y =
|
|
1077
|
-
y && (y.dataset.hasValue =
|
|
1075
|
+
E.style.width = `${a(E)}px`;
|
|
1076
|
+
const y = E.closest(".rte-number-input-wrap");
|
|
1077
|
+
y && (y.dataset.hasValue = E.value ? "1" : "0");
|
|
1078
1078
|
}, s = (p) => {
|
|
1079
|
-
const
|
|
1080
|
-
(
|
|
1079
|
+
const E = p.key;
|
|
1080
|
+
(E === "-" || E === "." || E === "," || E === "e" || E === "E" || E === "+" || E === "=" || E === " ") && p.preventDefault();
|
|
1081
1081
|
}, o = () => {
|
|
1082
1082
|
if (!e.current) return;
|
|
1083
|
-
e.current.querySelectorAll('[data-type="number-input"]').forEach((
|
|
1084
|
-
const c =
|
|
1085
|
-
c && (c.dataset.hasValue =
|
|
1086
|
-
const y = document.activeElement ===
|
|
1087
|
-
|
|
1083
|
+
e.current.querySelectorAll('[data-type="number-input"]').forEach((E) => {
|
|
1084
|
+
const c = E.closest(".rte-number-input-wrap");
|
|
1085
|
+
c && (c.dataset.hasValue = E.value ? "1" : "0", c.dataset.placeholder === void 0 && (c.dataset.placeholder = E.placeholder || ""));
|
|
1086
|
+
const y = document.activeElement === E, h = a(E), m = Number.parseFloat(E.style.width || ""), g = Number.isFinite(m), b = g ? Math.abs(m - h) : 1 / 0;
|
|
1087
|
+
E.dataset.rteWidthInited === "1" ? !y && (!g || b > 8) && (E.style.width = `${h}px`) : (E.dataset.rteWidthInited = "1", !y && (!g || b > 2) && (E.style.width = `${h}px`)), n.has(E) || (E.addEventListener("input", i, !1), E.addEventListener("keydown", s, !1), n.set(E, i), r.set(E, s));
|
|
1088
1088
|
});
|
|
1089
1089
|
};
|
|
1090
1090
|
o();
|
|
@@ -1094,24 +1094,24 @@ function tc(e, t = []) {
|
|
|
1094
1094
|
u = !1, o();
|
|
1095
1095
|
}));
|
|
1096
1096
|
}, f = new MutationObserver((p) => {
|
|
1097
|
-
let
|
|
1097
|
+
let E = !1;
|
|
1098
1098
|
p.forEach((c) => {
|
|
1099
1099
|
c.type === "childList" && c.addedNodes.forEach((y) => {
|
|
1100
1100
|
if (y.nodeType === Node.ELEMENT_NODE) {
|
|
1101
1101
|
const h = y;
|
|
1102
|
-
h.matches && (h.matches('[data-type="number-input"]') || h.querySelector('[data-type="number-input"]')) && (
|
|
1102
|
+
h.matches && (h.matches('[data-type="number-input"]') || h.querySelector('[data-type="number-input"]')) && (E = !0);
|
|
1103
1103
|
}
|
|
1104
1104
|
});
|
|
1105
|
-
}),
|
|
1105
|
+
}), E && l();
|
|
1106
1106
|
});
|
|
1107
1107
|
return e.current && f.observe(e.current, {
|
|
1108
1108
|
childList: !0,
|
|
1109
1109
|
subtree: !0
|
|
1110
1110
|
}), () => {
|
|
1111
|
-
u = !1, f.disconnect(), n.forEach((p,
|
|
1112
|
-
|
|
1113
|
-
}), n.clear(), r.forEach((p,
|
|
1114
|
-
|
|
1111
|
+
u = !1, f.disconnect(), n.forEach((p, E) => {
|
|
1112
|
+
E.removeEventListener("input", p, !1);
|
|
1113
|
+
}), n.clear(), r.forEach((p, E) => {
|
|
1114
|
+
E.removeEventListener("keydown", p, !1);
|
|
1115
1115
|
}), r.clear();
|
|
1116
1116
|
};
|
|
1117
1117
|
}, [e, ...t]);
|
|
@@ -1231,9 +1231,9 @@ ${(e || "").replace(/\r\n/g, `
|
|
|
1231
1231
|
p.target && (p.target.value = ""), i(null), s(null), o(null);
|
|
1232
1232
|
return;
|
|
1233
1233
|
}
|
|
1234
|
-
const
|
|
1234
|
+
const E = 10 * 1024 * 1024, c = (h) => h.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(h.name || ""), y = (h) => c(h) && h.size > E;
|
|
1235
1235
|
if (n && p.target.files && p.target.files.length > 0) {
|
|
1236
|
-
const h = n, m = e.find((C) => C.type === "upload" && C.key === h),
|
|
1236
|
+
const h = n, m = e.find((C) => C.type === "upload" && C.key === h), g = Array.from(p.target.files), b = g.filter((C) => !y(C)), T = g.length - b.length;
|
|
1237
1237
|
if (T > 0 && t.error(
|
|
1238
1238
|
`已自动过滤 ${T} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`
|
|
1239
1239
|
), m && typeof m.maxCount == "number" && typeof m.minCount == "number") {
|
|
@@ -1252,7 +1252,7 @@ ${(e || "").replace(/\r\n/g, `
|
|
|
1252
1252
|
}
|
|
1253
1253
|
} else if (r && p.target.files[0]) {
|
|
1254
1254
|
const h = p.target.files[0], m = r;
|
|
1255
|
-
y(h) ? t.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : u((
|
|
1255
|
+
y(h) ? t.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : u((g) => ({ ...g, [m]: h }));
|
|
1256
1256
|
}
|
|
1257
1257
|
p.target && (p.target.value = ""), i(null), s(null), o(null);
|
|
1258
1258
|
},
|
|
@@ -1268,8 +1268,8 @@ ${(e || "").replace(/\r\n/g, `
|
|
|
1268
1268
|
u
|
|
1269
1269
|
]
|
|
1270
1270
|
), f = oe((p) => {
|
|
1271
|
-
u((
|
|
1272
|
-
const c = { ...
|
|
1271
|
+
u((E) => {
|
|
1272
|
+
const c = { ...E };
|
|
1273
1273
|
return delete c[p], c;
|
|
1274
1274
|
});
|
|
1275
1275
|
}, [u]);
|
|
@@ -1345,47 +1345,49 @@ function cc(e, t, n, r, a = []) {
|
|
|
1345
1345
|
async (o, u) => {
|
|
1346
1346
|
if (!t || !u.trim()) return;
|
|
1347
1347
|
const l = oc(u);
|
|
1348
|
-
r((
|
|
1349
|
-
...
|
|
1348
|
+
r((c) => ({
|
|
1349
|
+
...c,
|
|
1350
1350
|
[o]: { status: "loading", progress: 0 }
|
|
1351
1351
|
}));
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1352
|
+
const f = 2 * Math.PI * 6.5;
|
|
1353
|
+
let p = 0;
|
|
1354
|
+
const E = setInterval(() => {
|
|
1355
|
+
p = Math.min(p + Math.random() * 15 + 5, 90);
|
|
1356
|
+
const c = e.current?.querySelector(
|
|
1357
|
+
`[data-type="video-url"][data-key="${o}"] .video-upload-progress-ring circle:last-child`
|
|
1358
|
+
);
|
|
1359
|
+
c && c.setAttribute("stroke-dashoffset", String(f * (1 - p / 100)));
|
|
1358
1360
|
}, 400);
|
|
1359
1361
|
try {
|
|
1360
|
-
const
|
|
1361
|
-
if (clearInterval(
|
|
1362
|
-
...
|
|
1362
|
+
const c = await t({ url: l });
|
|
1363
|
+
if (clearInterval(E), r((y) => ({
|
|
1364
|
+
...y,
|
|
1363
1365
|
[o]: {
|
|
1364
1366
|
status: "success",
|
|
1365
|
-
videoUrl:
|
|
1366
|
-
thumbnail:
|
|
1367
|
+
videoUrl: c.videoUrl,
|
|
1368
|
+
thumbnail: c.thumbnail || "",
|
|
1367
1369
|
fileName: l
|
|
1368
1370
|
}
|
|
1369
|
-
})), !
|
|
1370
|
-
const
|
|
1371
|
-
lc(
|
|
1372
|
-
|
|
1373
|
-
const
|
|
1374
|
-
return !
|
|
1371
|
+
})), !c.thumbnail && c.videoUrl) {
|
|
1372
|
+
const y = `/api/download-report-pdf?url=${encodeURIComponent(c.videoUrl)}`;
|
|
1373
|
+
lc(y).then((h) => {
|
|
1374
|
+
h && r((m) => {
|
|
1375
|
+
const g = m[o];
|
|
1376
|
+
return !g || g.status !== "success" ? m : { ...m, [o]: { ...g, thumbnail: h } };
|
|
1375
1377
|
});
|
|
1376
1378
|
});
|
|
1377
1379
|
}
|
|
1378
|
-
} catch (
|
|
1379
|
-
clearInterval(
|
|
1380
|
-
...
|
|
1380
|
+
} catch (c) {
|
|
1381
|
+
clearInterval(E), r((y) => ({
|
|
1382
|
+
...y,
|
|
1381
1383
|
[o]: {
|
|
1382
1384
|
status: "error",
|
|
1383
|
-
errorMsg:
|
|
1385
|
+
errorMsg: c instanceof Error ? c.message : "解析失败"
|
|
1384
1386
|
}
|
|
1385
1387
|
}));
|
|
1386
1388
|
}
|
|
1387
1389
|
},
|
|
1388
|
-
[t, r]
|
|
1390
|
+
[t, r, e]
|
|
1389
1391
|
);
|
|
1390
1392
|
se(() => {
|
|
1391
1393
|
const o = e.current;
|
|
@@ -1395,22 +1397,22 @@ function cc(e, t, n, r, a = []) {
|
|
|
1395
1397
|
'[data-node-type="video-url"]'
|
|
1396
1398
|
);
|
|
1397
1399
|
if (!p) return;
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
+
const E = p.dataset.key;
|
|
1401
|
+
E && setTimeout(() => {
|
|
1400
1402
|
const c = (p.innerText || "").replace(/\u200B/g, "").trim();
|
|
1401
|
-
c && s(
|
|
1403
|
+
c && s(E, c);
|
|
1402
1404
|
}, 0);
|
|
1403
1405
|
}, l = (f) => {
|
|
1404
1406
|
const p = f.target?.closest?.(
|
|
1405
1407
|
'[data-node-type="video-url"]'
|
|
1406
1408
|
);
|
|
1407
1409
|
if (!p) return;
|
|
1408
|
-
const
|
|
1409
|
-
if (!
|
|
1410
|
-
const c = i.current[
|
|
1410
|
+
const E = p.dataset.key;
|
|
1411
|
+
if (!E) return;
|
|
1412
|
+
const c = i.current[E];
|
|
1411
1413
|
if (c?.status === "success" || c?.status === "loading") return;
|
|
1412
1414
|
const y = (p.innerText || "").replace(/\u200B/g, "").trim();
|
|
1413
|
-
y && s(
|
|
1415
|
+
y && s(E, y);
|
|
1414
1416
|
};
|
|
1415
1417
|
return o.addEventListener("paste", u, !0), o.addEventListener("focusout", l, !0), () => {
|
|
1416
1418
|
o.removeEventListener("paste", u, !0), o.removeEventListener("focusout", l, !0);
|
|
@@ -1526,14 +1528,14 @@ const pc = (e) => {
|
|
|
1526
1528
|
multiVariableCounts: a,
|
|
1527
1529
|
setMultiVariableCounts: i
|
|
1528
1530
|
}) => {
|
|
1529
|
-
const s = Z({}), o = Z({}), u = Z({}), l = oe((
|
|
1531
|
+
const s = Z({}), o = Z({}), u = Z({}), l = oe((E) => E.find((y) => y.type === "tag")?.text || null, []), f = Z(e), p = Z(null);
|
|
1530
1532
|
se(() => {
|
|
1531
1533
|
o.current = n;
|
|
1532
1534
|
}, [n]), se(() => {
|
|
1533
1535
|
u.current = a;
|
|
1534
1536
|
}, [a]), se(() => {
|
|
1535
|
-
const
|
|
1536
|
-
if (
|
|
1537
|
+
const E = l(f.current), c = l(e);
|
|
1538
|
+
if (E && E !== c && t.current) {
|
|
1537
1539
|
const y = {};
|
|
1538
1540
|
t.current.querySelectorAll('[data-type="variable"]').forEach((b) => {
|
|
1539
1541
|
const T = b.dataset.key;
|
|
@@ -1553,7 +1555,7 @@ const pc = (e) => {
|
|
|
1553
1555
|
const C = b.value.replace(/[\u200B]/g, "").trim();
|
|
1554
1556
|
C && (y[T] = C);
|
|
1555
1557
|
}
|
|
1556
|
-
}), s.current[
|
|
1558
|
+
}), s.current[E] = {
|
|
1557
1559
|
variableValues: y,
|
|
1558
1560
|
files: { ...o.current },
|
|
1559
1561
|
multiVariableCounts: { ...u.current }
|
|
@@ -1645,7 +1647,7 @@ const pc = (e) => {
|
|
|
1645
1647
|
editorRef: l,
|
|
1646
1648
|
reportAnalyzeRef: f,
|
|
1647
1649
|
markdownAnalyzeRef: p,
|
|
1648
|
-
markdownNameAnalyzeRef:
|
|
1650
|
+
markdownNameAnalyzeRef: E,
|
|
1649
1651
|
markdownAnalyzeStateRef: c,
|
|
1650
1652
|
markdownNameAnalyzeStateRef: y
|
|
1651
1653
|
}) => {
|
|
@@ -1707,7 +1709,7 @@ const pc = (e) => {
|
|
|
1707
1709
|
});
|
|
1708
1710
|
},
|
|
1709
1711
|
[h, l, e, r, a]
|
|
1710
|
-
),
|
|
1712
|
+
), g = oe(
|
|
1711
1713
|
(A, L) => {
|
|
1712
1714
|
const _ = (L || "").trim();
|
|
1713
1715
|
if (!A) return;
|
|
@@ -1839,17 +1841,17 @@ const pc = (e) => {
|
|
|
1839
1841
|
se(() => {
|
|
1840
1842
|
f.current = m;
|
|
1841
1843
|
}, [f, m]), se(() => {
|
|
1842
|
-
p.current =
|
|
1843
|
-
}, [p,
|
|
1844
|
-
|
|
1845
|
-
}, [
|
|
1844
|
+
p.current = g;
|
|
1845
|
+
}, [p, g]), tt(() => {
|
|
1846
|
+
E.current = b;
|
|
1847
|
+
}, [E, b]);
|
|
1846
1848
|
const T = oe((A, L) => {
|
|
1847
1849
|
f.current(A, L);
|
|
1848
1850
|
}, [f]), C = oe((A, L) => {
|
|
1849
1851
|
p.current(A, L);
|
|
1850
1852
|
}, [p]), S = oe((A, L) => {
|
|
1851
|
-
|
|
1852
|
-
}, [
|
|
1853
|
+
E.current(A, L);
|
|
1854
|
+
}, [E]);
|
|
1853
1855
|
return { handleReportUrlBlur: T, handleMarkdownBlur: C, handleMarkdownNameBlur: S };
|
|
1854
1856
|
}, bc = ({
|
|
1855
1857
|
collapsed: e,
|
|
@@ -1864,7 +1866,7 @@ const pc = (e) => {
|
|
|
1864
1866
|
effectiveConfig: l,
|
|
1865
1867
|
files: f,
|
|
1866
1868
|
multiVariableCounts: p,
|
|
1867
|
-
selectPortalsLength:
|
|
1869
|
+
selectPortalsLength: E,
|
|
1868
1870
|
datePickerPortalsLength: c,
|
|
1869
1871
|
variablePortalsLength: y
|
|
1870
1872
|
}) => {
|
|
@@ -1907,18 +1909,18 @@ const pc = (e) => {
|
|
|
1907
1909
|
l,
|
|
1908
1910
|
f,
|
|
1909
1911
|
p,
|
|
1910
|
-
|
|
1912
|
+
E,
|
|
1911
1913
|
c,
|
|
1912
1914
|
y,
|
|
1913
1915
|
s
|
|
1914
1916
|
]);
|
|
1915
|
-
const
|
|
1917
|
+
const g = Z({ ts: 0, contentScrollTop: 0, bodyScrollTop: 0, editorScrollTop: 0 });
|
|
1916
1918
|
se(() => {
|
|
1917
1919
|
if (e) return;
|
|
1918
1920
|
const T = n.current, C = r.current, S = a.current;
|
|
1919
1921
|
if (!T) return;
|
|
1920
1922
|
const A = () => {
|
|
1921
|
-
|
|
1923
|
+
g.current = {
|
|
1922
1924
|
ts: Date.now(),
|
|
1923
1925
|
contentScrollTop: T.scrollTop || 0,
|
|
1924
1926
|
bodyScrollTop: C?.scrollTop || 0,
|
|
@@ -2032,7 +2034,7 @@ const pc = (e) => {
|
|
|
2032
2034
|
l,
|
|
2033
2035
|
f,
|
|
2034
2036
|
p,
|
|
2035
|
-
|
|
2037
|
+
E,
|
|
2036
2038
|
c,
|
|
2037
2039
|
y,
|
|
2038
2040
|
m
|
|
@@ -2133,7 +2135,7 @@ const pc = (e) => {
|
|
|
2133
2135
|
else if (u === "success" && l.length > 0) {
|
|
2134
2136
|
const p = a[a.length - 1];
|
|
2135
2137
|
p?.type === "text" && p.text?.endsWith(`
|
|
2136
|
-
`) && (a[a.length - 1] = { ...p, text: p.text.slice(0, -1) }), l.forEach((
|
|
2138
|
+
`) && (a[a.length - 1] = { ...p, text: p.text.slice(0, -1) }), l.forEach((E, c) => {
|
|
2137
2139
|
a.push({
|
|
2138
2140
|
type: "markdown-module",
|
|
2139
2141
|
key: s.key,
|
|
@@ -2142,7 +2144,7 @@ const pc = (e) => {
|
|
|
2142
2144
|
required: !0,
|
|
2143
2145
|
minHeight: 80,
|
|
2144
2146
|
maxHeight: 260,
|
|
2145
|
-
text:
|
|
2147
|
+
text: E.content,
|
|
2146
2148
|
// 保留原始 markdown 节点的 exclusionGroup,确保互斥逻辑正常工作
|
|
2147
2149
|
exclusionGroup: s.exclusionGroup
|
|
2148
2150
|
});
|
|
@@ -2165,11 +2167,11 @@ const pc = (e) => {
|
|
|
2165
2167
|
className: "rte-markdown-error",
|
|
2166
2168
|
text: `解析失败:${ue(o.error)}
|
|
2167
2169
|
`
|
|
2168
|
-
}), l.length > 0 && u !== "loading" && l.forEach((p,
|
|
2170
|
+
}), l.length > 0 && u !== "loading" && l.forEach((p, E) => {
|
|
2169
2171
|
a.push({
|
|
2170
2172
|
type: "markdown-module",
|
|
2171
2173
|
key: s.key,
|
|
2172
|
-
moduleIndex:
|
|
2174
|
+
moduleIndex: E,
|
|
2173
2175
|
placeholder: "可编辑,内容不能为空",
|
|
2174
2176
|
required: !0,
|
|
2175
2177
|
minHeight: 80,
|
|
@@ -2220,7 +2222,7 @@ function xc(e, t) {
|
|
|
2220
2222
|
const h = r.measureText(y || " ").width || 0;
|
|
2221
2223
|
p = Math.max(p, h);
|
|
2222
2224
|
}
|
|
2223
|
-
const
|
|
2225
|
+
const E = Number.parseFloat(a.letterSpacing || ""), c = Number.isFinite(E) ? E : 0;
|
|
2224
2226
|
if (c > 0) {
|
|
2225
2227
|
const y = f.reduce((h, m) => h.length >= m.length ? h : m, "");
|
|
2226
2228
|
p += c * Math.max(0, y.length - 1);
|
|
@@ -2286,8 +2288,8 @@ function yr(e, t) {
|
|
|
2286
2288
|
f && f.classList.toggle("rte-inline-group-force-block", l);
|
|
2287
2289
|
const p = r.closest(".required-upload-group, .required-multi-first");
|
|
2288
2290
|
p && p.classList.toggle("rte-required-group-force-block", l);
|
|
2289
|
-
const
|
|
2290
|
-
|
|
2291
|
+
const E = p ? p.parentElement?.closest(".exclusion-wrapper") : r.closest(".exclusion-wrapper");
|
|
2292
|
+
E && E !== p && E.classList.toggle("rte-exclusion-force-block", l);
|
|
2291
2293
|
});
|
|
2292
2294
|
}
|
|
2293
2295
|
function Ga(e, t, n, r) {
|
|
@@ -2324,7 +2326,7 @@ function Ga(e, t, n, r) {
|
|
|
2324
2326
|
!v.exclusionGroup || v.exclusionGroup === "separator" || (v.type === "upload" && v.key ? m.push({ type: "upload", key: v.key }) : (v.type === "video-url" || v.type === "video-upload") && v.key ? m.push({ type: v.type, key: v.key }) : (v.type === "variable" || v.type === "multi-variable" || v.type === "markdown" || v.type === "markdown-name" || v.type === "markdown-module") && v.key ? m.push({ type: v.type === "multi-variable" ? "multi-variable" : "variable", key: v.key }) : m.push({ type: "other", nodeType: v.type }));
|
|
2325
2327
|
}
|
|
2326
2328
|
m.length && h.push(m);
|
|
2327
|
-
const
|
|
2329
|
+
const g = (v) => {
|
|
2328
2330
|
const k = t.find((N) => N.type === "upload" && N.key === v);
|
|
2329
2331
|
return k ? typeof k.maxCount == "number" && k.maxCount > 1 ? k.maxCount : 1 : 0;
|
|
2330
2332
|
}, b = h.map((v) => {
|
|
@@ -2344,7 +2346,7 @@ function Ga(e, t, n, r) {
|
|
|
2344
2346
|
}
|
|
2345
2347
|
if (k.type === "upload") {
|
|
2346
2348
|
if (n[k.key] !== null && n[k.key] !== void 0) return !0;
|
|
2347
|
-
const N =
|
|
2349
|
+
const N = g(k.key);
|
|
2348
2350
|
for (let O = 0; O < N; O++) {
|
|
2349
2351
|
const R = `${k.key}-${O}`;
|
|
2350
2352
|
if (n[R] !== null && n[R] !== void 0) return !0;
|
|
@@ -2478,8 +2480,8 @@ function Ga(e, t, n, r) {
|
|
|
2478
2480
|
f[h] = !1;
|
|
2479
2481
|
for (const m of l[h])
|
|
2480
2482
|
if ((m.type === "video-url" || m.type === "video-upload") && m.key) {
|
|
2481
|
-
const
|
|
2482
|
-
if (
|
|
2483
|
+
const g = r?.[m.key];
|
|
2484
|
+
if (g?.status === "success" && g.videoUrl || g?.status === "loading") {
|
|
2483
2485
|
f[h] = !0;
|
|
2484
2486
|
break;
|
|
2485
2487
|
}
|
|
@@ -2497,9 +2499,9 @@ function Ga(e, t, n, r) {
|
|
|
2497
2499
|
f[h] = !0;
|
|
2498
2500
|
break;
|
|
2499
2501
|
}
|
|
2500
|
-
const
|
|
2501
|
-
if (
|
|
2502
|
-
for (let b = 0; b <
|
|
2502
|
+
const g = t.find((b) => b.type === "upload" && b.key === m.key);
|
|
2503
|
+
if (g && typeof g.maxCount == "number")
|
|
2504
|
+
for (let b = 0; b < g.maxCount; b++) {
|
|
2503
2505
|
const T = `${m.key}-${b}`;
|
|
2504
2506
|
if (n[T] !== null && n[T] !== void 0) {
|
|
2505
2507
|
f[h] = !0;
|
|
@@ -2544,9 +2546,9 @@ function Ga(e, t, n, r) {
|
|
|
2544
2546
|
break;
|
|
2545
2547
|
}
|
|
2546
2548
|
}
|
|
2547
|
-
const
|
|
2549
|
+
const E = Object.keys(f).filter((h) => f[h]).length > 0;
|
|
2548
2550
|
let c = null;
|
|
2549
|
-
if (
|
|
2551
|
+
if (E && o) {
|
|
2550
2552
|
for (const h of t)
|
|
2551
2553
|
if (h.exclusionGroup && h.exclusionGroup !== "separator" && f[h.exclusionGroup]) {
|
|
2552
2554
|
c = h.exclusionGroup;
|
|
@@ -2555,10 +2557,10 @@ function Ga(e, t, n, r) {
|
|
|
2555
2557
|
}
|
|
2556
2558
|
for (const h of u) {
|
|
2557
2559
|
const m = e.current.querySelectorAll(`[data-group="${h}"]`);
|
|
2558
|
-
o &&
|
|
2560
|
+
o && E && c ? h === c ? m.forEach(i) : m.forEach(s) : m.forEach(i);
|
|
2559
2561
|
}
|
|
2560
2562
|
e.current.querySelectorAll('[data-group="separator"]').forEach((h) => {
|
|
2561
|
-
h.closest('[data-rte-force-hidden="1"]') || (
|
|
2563
|
+
h.closest('[data-rte-force-hidden="1"]') || (E ? s(h) : h.style.setProperty("display", "inline-flex", "important"));
|
|
2562
2564
|
});
|
|
2563
2565
|
}
|
|
2564
2566
|
function Ya(e, t, n, r, a) {
|
|
@@ -2570,9 +2572,9 @@ function Ya(e, t, n, r, a) {
|
|
|
2570
2572
|
const m = h.getAttribute("data-node-type") || "";
|
|
2571
2573
|
if (m !== "report-module" && m !== "markdown-module")
|
|
2572
2574
|
return (h.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
2573
|
-
const
|
|
2575
|
+
const g = (h.textContent || "").replace(/[\u200B]/g, "").trim(), b = Array.from(h.querySelectorAll(":scope > div"));
|
|
2574
2576
|
if (b.length === 0)
|
|
2575
|
-
return
|
|
2577
|
+
return g;
|
|
2576
2578
|
let T = -1;
|
|
2577
2579
|
for (let A = 0; A < b.length; A++)
|
|
2578
2580
|
if ((b[A].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
|
|
@@ -2580,7 +2582,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2580
2582
|
break;
|
|
2581
2583
|
}
|
|
2582
2584
|
return b.filter((A, L) => L !== T).map((A) => (A.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
|
|
2583
|
-
`).trim() ||
|
|
2585
|
+
`).trim() || g;
|
|
2584
2586
|
}, s = (h) => h ? !!h.closest('[data-rte-force-hidden="1"]') : !1, o = [];
|
|
2585
2587
|
for (let h = 0; h < t.length; h++) {
|
|
2586
2588
|
const m = t[h];
|
|
@@ -2598,27 +2600,27 @@ function Ya(e, t, n, r, a) {
|
|
|
2598
2600
|
}
|
|
2599
2601
|
if (m.type === "text" && m.className?.includes("rte-text-required"))
|
|
2600
2602
|
if (m.exclusionGroup)
|
|
2601
|
-
for (let
|
|
2602
|
-
const b = t[
|
|
2603
|
+
for (let g = h + 1; g < t.length; g++) {
|
|
2604
|
+
const b = t[g];
|
|
2603
2605
|
if (b.exclusionGroup === m.exclusionGroup && (b.type === "variable" || b.type === "markdown" || b.type === "upload" || b.type === "select" || b.type === "textarea" || b.type === "richtext" || b.type === "datepicker" || b.type === "number-input") && b.key) {
|
|
2604
2606
|
o.push({
|
|
2605
2607
|
exclusionGroup: m.exclusionGroup,
|
|
2606
2608
|
key: b.key,
|
|
2607
2609
|
type: b.type === "markdown" ? "variable" : b.type,
|
|
2608
|
-
__index:
|
|
2610
|
+
__index: g
|
|
2609
2611
|
});
|
|
2610
2612
|
break;
|
|
2611
2613
|
}
|
|
2612
2614
|
}
|
|
2613
2615
|
else
|
|
2614
|
-
for (let
|
|
2615
|
-
const b = t[
|
|
2616
|
+
for (let g = h + 1; g < t.length; g++) {
|
|
2617
|
+
const b = t[g];
|
|
2616
2618
|
if ((b.type === "variable" || b.type === "markdown" || b.type === "upload" || b.type === "select" || b.type === "textarea" || b.type === "richtext" || b.type === "datepicker" || b.type === "number-input") && b.key) {
|
|
2617
2619
|
o.push({
|
|
2618
2620
|
exclusionGroup: b.exclusionGroup || "",
|
|
2619
2621
|
key: b.key,
|
|
2620
2622
|
type: b.type === "markdown" ? "variable" : b.type,
|
|
2621
|
-
__index:
|
|
2623
|
+
__index: g
|
|
2622
2624
|
});
|
|
2623
2625
|
break;
|
|
2624
2626
|
}
|
|
@@ -2627,8 +2629,8 @@ function Ya(e, t, n, r, a) {
|
|
|
2627
2629
|
const u = t.some((h) => h.exclusionGroup === "separator"), l = [];
|
|
2628
2630
|
if (u && o.length > 1) {
|
|
2629
2631
|
const h = [];
|
|
2630
|
-
t.forEach((m,
|
|
2631
|
-
m.exclusionGroup === "separator" && h.push(
|
|
2632
|
+
t.forEach((m, g) => {
|
|
2633
|
+
m.exclusionGroup === "separator" && h.push(g);
|
|
2632
2634
|
});
|
|
2633
2635
|
for (const m of h) {
|
|
2634
2636
|
const b = o.filter((S) => typeof S.__index == "number" && S.__index < m).sort((S, A) => (A.__index ?? 0) - (S.__index ?? 0))[0], C = o.filter((S) => typeof S.__index == "number" && S.__index > m).sort((S, A) => (S.__index ?? 0) - (A.__index ?? 0))[0];
|
|
@@ -2655,15 +2657,15 @@ function Ya(e, t, n, r, a) {
|
|
|
2655
2657
|
`[data-group="${h.exclusionGroup}"]`
|
|
2656
2658
|
);
|
|
2657
2659
|
if (m.length > 0) {
|
|
2658
|
-
const
|
|
2659
|
-
return s(
|
|
2660
|
+
const g = m[0];
|
|
2661
|
+
return s(g) ? !0 : g.style.display !== "none";
|
|
2660
2662
|
}
|
|
2661
2663
|
}
|
|
2662
2664
|
if (h.type === "upload" && h.key) {
|
|
2663
2665
|
const m = e.current.querySelector(`[data-type="upload"][data-key="${h.key}"]`) || e.current.querySelector(`[data-type="upload"][data-batch-key="${h.key}"]`);
|
|
2664
2666
|
if (m) {
|
|
2665
|
-
const
|
|
2666
|
-
return s(
|
|
2667
|
+
const g = m.closest("[data-group]") || m.parentElement;
|
|
2668
|
+
return s(g) ? !0 : g ? g.style.display !== "none" : !0;
|
|
2667
2669
|
}
|
|
2668
2670
|
} else if (h.type === "variable" && h.key)
|
|
2669
2671
|
if (h.isMultiVariable) {
|
|
@@ -2671,7 +2673,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2671
2673
|
`[data-type="variable"][data-multi-key="${h.key}"]`
|
|
2672
2674
|
);
|
|
2673
2675
|
if (m.length > 0) {
|
|
2674
|
-
const
|
|
2676
|
+
const g = m[0], b = g.closest("[data-group]") || g.parentElement;
|
|
2675
2677
|
return s(b) ? !0 : b ? b.style.display !== "none" : !0;
|
|
2676
2678
|
}
|
|
2677
2679
|
} else {
|
|
@@ -2679,28 +2681,28 @@ function Ya(e, t, n, r, a) {
|
|
|
2679
2681
|
`[data-type="variable"][data-key="${h.key}"]`
|
|
2680
2682
|
);
|
|
2681
2683
|
if (m) {
|
|
2682
|
-
const
|
|
2683
|
-
return s(
|
|
2684
|
+
const g = m.closest("[data-group]") || m.parentElement;
|
|
2685
|
+
return s(g) ? !0 : g ? g.style.display !== "none" : !0;
|
|
2684
2686
|
}
|
|
2685
2687
|
}
|
|
2686
2688
|
else if (h.type === "select" && h.key) {
|
|
2687
2689
|
const m = e.current.querySelector(`[data-type="select"][data-key="${h.key}"]`);
|
|
2688
2690
|
if (m) {
|
|
2689
|
-
const
|
|
2690
|
-
return s(
|
|
2691
|
+
const g = m.closest("[data-group]") || m.parentElement;
|
|
2692
|
+
return s(g) ? !0 : g ? g.style.display !== "none" : !0;
|
|
2691
2693
|
}
|
|
2692
2694
|
} else if (h.type === "textarea" && h.key) {
|
|
2693
2695
|
const m = e.current.querySelector(
|
|
2694
2696
|
`[data-type="textarea"][data-key="${h.key}"]`
|
|
2695
2697
|
);
|
|
2696
2698
|
if (m) {
|
|
2697
|
-
const
|
|
2698
|
-
return s(
|
|
2699
|
+
const g = m.closest("[data-group]") || m.parentElement;
|
|
2700
|
+
return s(g) ? !0 : g ? g.style.display !== "none" : !0;
|
|
2699
2701
|
}
|
|
2700
2702
|
} else if (h.type === "richtext" && h.key) {
|
|
2701
|
-
const m = typeof h.moduleIndex == "number" ? `[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]` : `[data-type="richtext"][data-key="${h.key}"]`,
|
|
2702
|
-
if (
|
|
2703
|
-
const b =
|
|
2703
|
+
const m = typeof h.moduleIndex == "number" ? `[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]` : `[data-type="richtext"][data-key="${h.key}"]`, g = e.current.querySelector(m);
|
|
2704
|
+
if (g) {
|
|
2705
|
+
const b = g.closest("[data-group]") || g.parentElement;
|
|
2704
2706
|
return s(b) ? !0 : b ? b.style.display !== "none" : !0;
|
|
2705
2707
|
}
|
|
2706
2708
|
} else if (h.type === "datepicker" && h.key) {
|
|
@@ -2708,24 +2710,24 @@ function Ya(e, t, n, r, a) {
|
|
|
2708
2710
|
`[data-type="datepicker"][data-key="${h.key}"]`
|
|
2709
2711
|
);
|
|
2710
2712
|
if (m) {
|
|
2711
|
-
const
|
|
2712
|
-
return s(
|
|
2713
|
+
const g = m.closest("[data-group]") || m.parentElement;
|
|
2714
|
+
return s(g) ? !0 : g ? g.style.display !== "none" : !0;
|
|
2713
2715
|
}
|
|
2714
2716
|
} else if (h.type === "number-input" && h.key) {
|
|
2715
2717
|
const m = e.current.querySelector(
|
|
2716
2718
|
`[data-type="number-input"][data-key="${h.key}"]`
|
|
2717
2719
|
);
|
|
2718
2720
|
if (m) {
|
|
2719
|
-
const
|
|
2720
|
-
return s(
|
|
2721
|
+
const g = m.closest("[data-group]") || m.parentElement;
|
|
2722
|
+
return s(g) ? !0 : g ? g.style.display !== "none" : !0;
|
|
2721
2723
|
}
|
|
2722
2724
|
} else if ((h.type === "video-url" || h.type === "video-upload") && h.key) {
|
|
2723
2725
|
const m = e.current.querySelector(
|
|
2724
2726
|
`[data-type="${h.type}"][data-key="${h.key}"], [data-type="variable"][data-key="${h.key}"][data-node-type="video-url"]`
|
|
2725
2727
|
);
|
|
2726
2728
|
if (m) {
|
|
2727
|
-
const
|
|
2728
|
-
return s(
|
|
2729
|
+
const g = m.closest("[data-group]") || m.parentElement;
|
|
2730
|
+
return s(g) ? !0 : g ? g.style.display !== "none" : !0;
|
|
2729
2731
|
}
|
|
2730
2732
|
}
|
|
2731
2733
|
return !1;
|
|
@@ -2740,7 +2742,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2740
2742
|
m.key && p.add(m.key);
|
|
2741
2743
|
});
|
|
2742
2744
|
});
|
|
2743
|
-
const
|
|
2745
|
+
const E = f.filter(
|
|
2744
2746
|
(h) => !h.key || !p.has(h.key)
|
|
2745
2747
|
);
|
|
2746
2748
|
let c = (l.length === 0, !0);
|
|
@@ -2760,7 +2762,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2760
2762
|
});
|
|
2761
2763
|
if (m.length === 0)
|
|
2762
2764
|
continue;
|
|
2763
|
-
let
|
|
2765
|
+
let g = !1;
|
|
2764
2766
|
for (const b of m)
|
|
2765
2767
|
if (b.type === "upload" && b.key) {
|
|
2766
2768
|
if (b.minCount && b.minCount > 0) {
|
|
@@ -2775,11 +2777,11 @@ function Ya(e, t, n, r, a) {
|
|
|
2775
2777
|
L && n[L] != null && (T += 1);
|
|
2776
2778
|
}
|
|
2777
2779
|
if (T >= b.minCount) {
|
|
2778
|
-
|
|
2780
|
+
g = !0;
|
|
2779
2781
|
break;
|
|
2780
2782
|
}
|
|
2781
2783
|
} else if (n[b.key] !== null && n[b.key] !== void 0) {
|
|
2782
|
-
|
|
2784
|
+
g = !0;
|
|
2783
2785
|
break;
|
|
2784
2786
|
}
|
|
2785
2787
|
} else if (b.type === "variable" && b.key)
|
|
@@ -2795,7 +2797,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2795
2797
|
}
|
|
2796
2798
|
const S = b.minCount && b.minCount > 0 ? b.minCount : 1;
|
|
2797
2799
|
if (C >= S) {
|
|
2798
|
-
|
|
2800
|
+
g = !0;
|
|
2799
2801
|
break;
|
|
2800
2802
|
}
|
|
2801
2803
|
} else {
|
|
@@ -2811,7 +2813,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2811
2813
|
`[data-node-type="markdown-module"][data-key="${b.key}"]`
|
|
2812
2814
|
))
|
|
2813
2815
|
continue;
|
|
2814
|
-
|
|
2816
|
+
g = !0;
|
|
2815
2817
|
break;
|
|
2816
2818
|
}
|
|
2817
2819
|
}
|
|
@@ -2819,7 +2821,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2819
2821
|
else if (b.type === "select" && b.key) {
|
|
2820
2822
|
const T = e.current.querySelector(`[data-type="select"][data-key="${b.key}"]`);
|
|
2821
2823
|
if (T && (T.getAttribute("data-value") || "").trim().length > 0) {
|
|
2822
|
-
|
|
2824
|
+
g = !0;
|
|
2823
2825
|
break;
|
|
2824
2826
|
}
|
|
2825
2827
|
} else if (b.type === "textarea" && b.key) {
|
|
@@ -2827,7 +2829,7 @@ function Ya(e, t, n, r, a) {
|
|
|
2827
2829
|
`[data-type="textarea"][data-key="${b.key}"]`
|
|
2828
2830
|
);
|
|
2829
2831
|
if (T && (T.value || "").trim().length > 0) {
|
|
2830
|
-
|
|
2832
|
+
g = !0;
|
|
2831
2833
|
break;
|
|
2832
2834
|
}
|
|
2833
2835
|
} else if (b.type === "richtext" && b.key) {
|
|
@@ -2836,14 +2838,14 @@ function Ya(e, t, n, r, a) {
|
|
|
2836
2838
|
if (C.getAttribute("data-is-placeholder") === "true")
|
|
2837
2839
|
continue;
|
|
2838
2840
|
if (i(C).length > 0) {
|
|
2839
|
-
|
|
2841
|
+
g = !0;
|
|
2840
2842
|
break;
|
|
2841
2843
|
}
|
|
2842
2844
|
}
|
|
2843
2845
|
} else if (b.type === "datepicker" && b.key) {
|
|
2844
2846
|
const T = e.current.querySelector(`[data-type="datepicker"][data-key="${b.key}"]`);
|
|
2845
2847
|
if (T && (T.getAttribute("data-value") || "").trim().length > 0) {
|
|
2846
|
-
|
|
2848
|
+
g = !0;
|
|
2847
2849
|
break;
|
|
2848
2850
|
}
|
|
2849
2851
|
} else if (b.type === "number-input" && b.key) {
|
|
@@ -2851,32 +2853,32 @@ function Ya(e, t, n, r, a) {
|
|
|
2851
2853
|
`[data-type="number-input"][data-key="${b.key}"]`
|
|
2852
2854
|
);
|
|
2853
2855
|
if (T && (T.value || "").trim().length > 0) {
|
|
2854
|
-
|
|
2856
|
+
g = !0;
|
|
2855
2857
|
break;
|
|
2856
2858
|
}
|
|
2857
2859
|
} else if ((b.type === "video-url" || b.type === "video-upload") && b.key && a?.[b.key]?.status === "success") {
|
|
2858
|
-
|
|
2860
|
+
g = !0;
|
|
2859
2861
|
break;
|
|
2860
2862
|
}
|
|
2861
|
-
if (!
|
|
2863
|
+
if (!g) {
|
|
2862
2864
|
c = !1;
|
|
2863
2865
|
break;
|
|
2864
2866
|
}
|
|
2865
2867
|
}
|
|
2866
2868
|
let y = !0;
|
|
2867
|
-
for (const h of
|
|
2869
|
+
for (const h of E)
|
|
2868
2870
|
if (h.type === "upload" && h.key) {
|
|
2869
2871
|
if (h.minCount && h.minCount > 0) {
|
|
2870
2872
|
let m = 0;
|
|
2871
|
-
const
|
|
2873
|
+
const g = e.current.querySelectorAll(
|
|
2872
2874
|
`[data-type="upload"][data-batch-key="${h.key}"]`
|
|
2873
2875
|
);
|
|
2874
|
-
if (
|
|
2876
|
+
if (g.length === 0) {
|
|
2875
2877
|
y = !1;
|
|
2876
2878
|
break;
|
|
2877
2879
|
}
|
|
2878
|
-
for (let b = 0; b <
|
|
2879
|
-
const C =
|
|
2880
|
+
for (let b = 0; b < g.length; b++) {
|
|
2881
|
+
const C = g[b].dataset.key;
|
|
2880
2882
|
C && n[C] != null && (m += 1);
|
|
2881
2883
|
}
|
|
2882
2884
|
if (m < h.minCount) {
|
|
@@ -2892,14 +2894,14 @@ function Ya(e, t, n, r, a) {
|
|
|
2892
2894
|
const m = e.current.querySelectorAll(
|
|
2893
2895
|
`[data-type="variable"][data-multi-key="${h.key}"]`
|
|
2894
2896
|
);
|
|
2895
|
-
let
|
|
2897
|
+
let g = 0;
|
|
2896
2898
|
for (const T of Array.from(m)) {
|
|
2897
2899
|
if (T.classList.contains("show-placeholder"))
|
|
2898
2900
|
continue;
|
|
2899
|
-
T.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (
|
|
2901
|
+
T.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (g += 1);
|
|
2900
2902
|
}
|
|
2901
2903
|
const b = h.minCount && h.minCount > 0 ? h.minCount : 1;
|
|
2902
|
-
if (
|
|
2904
|
+
if (g < b) {
|
|
2903
2905
|
y = !1;
|
|
2904
2906
|
break;
|
|
2905
2907
|
}
|
|
@@ -2940,12 +2942,12 @@ function Ya(e, t, n, r, a) {
|
|
|
2940
2942
|
break;
|
|
2941
2943
|
}
|
|
2942
2944
|
} else if (h.type === "richtext" && h.key) {
|
|
2943
|
-
const m = typeof h.moduleIndex == "number" ? `[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]` : `[data-type="richtext"][data-key="${h.key}"]`,
|
|
2944
|
-
if (
|
|
2945
|
+
const m = typeof h.moduleIndex == "number" ? `[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]` : `[data-type="richtext"][data-key="${h.key}"]`, g = e.current.querySelector(m);
|
|
2946
|
+
if (g && g.getAttribute("data-is-placeholder") === "true") {
|
|
2945
2947
|
y = !1;
|
|
2946
2948
|
break;
|
|
2947
2949
|
}
|
|
2948
|
-
if (!
|
|
2950
|
+
if (!g || i(g).length === 0) {
|
|
2949
2951
|
y = !1;
|
|
2950
2952
|
break;
|
|
2951
2953
|
}
|
|
@@ -3008,22 +3010,22 @@ const Cc = ({
|
|
|
3008
3010
|
const m = h.target;
|
|
3009
3011
|
if (!m || !r.current || !r.current.contains(m))
|
|
3010
3012
|
return;
|
|
3011
|
-
const
|
|
3013
|
+
const g = m.closest(
|
|
3012
3014
|
'[data-type="variable"][data-multi-key]'
|
|
3013
3015
|
);
|
|
3014
|
-
if (!
|
|
3016
|
+
if (!g || !r.current.contains(g))
|
|
3015
3017
|
return;
|
|
3016
3018
|
let b = !1;
|
|
3017
3019
|
if (l.forEach((k, N) => {
|
|
3018
|
-
(N ===
|
|
3020
|
+
(N === g || N.contains(m)) && (b = !0);
|
|
3019
3021
|
}), !b)
|
|
3020
3022
|
return;
|
|
3021
|
-
const T =
|
|
3023
|
+
const T = g.dataset.multiKey, C = g.dataset.key, S = g.dataset.index;
|
|
3022
3024
|
if (!T || !C || S === void 0) return;
|
|
3023
3025
|
const A = h.relatedTarget;
|
|
3024
3026
|
if (!(!A || !r.current.contains(A)))
|
|
3025
3027
|
return;
|
|
3026
|
-
const _ =
|
|
3028
|
+
const _ = g.innerText.replace(/[\u200B\n]/g, "").trim(), v = /[、,,\s]+/;
|
|
3027
3029
|
if (v.test(_)) {
|
|
3028
3030
|
const O = _.split(v).map((R) => R.trim()).filter((R) => R.length > 0).slice(0, 9);
|
|
3029
3031
|
if (O.length > 1) {
|
|
@@ -3064,11 +3066,11 @@ const Cc = ({
|
|
|
3064
3066
|
c.forEach((h) => {
|
|
3065
3067
|
h.addEventListener("blur", y, !1), l.set(h, y);
|
|
3066
3068
|
});
|
|
3067
|
-
},
|
|
3069
|
+
}, E = setTimeout(() => {
|
|
3068
3070
|
p();
|
|
3069
3071
|
}, 0);
|
|
3070
3072
|
return () => {
|
|
3071
|
-
clearTimeout(
|
|
3073
|
+
clearTimeout(E), u.removeEventListener("blur", f, !0), l.forEach((c, y) => {
|
|
3072
3074
|
y.removeEventListener("blur", c, !1);
|
|
3073
3075
|
}), l.clear();
|
|
3074
3076
|
};
|
|
@@ -3094,12 +3096,12 @@ const Cc = ({
|
|
|
3094
3096
|
files: l,
|
|
3095
3097
|
setFiles: f,
|
|
3096
3098
|
handleRemoveFile: p,
|
|
3097
|
-
setActiveBatchKey:
|
|
3099
|
+
setActiveBatchKey: E,
|
|
3098
3100
|
setActiveBatchStartIndex: c,
|
|
3099
3101
|
setActiveFileKey: y,
|
|
3100
3102
|
isDraggingRef: h,
|
|
3101
3103
|
richtextPrevScrollTopRef: m,
|
|
3102
|
-
videoState:
|
|
3104
|
+
videoState: g,
|
|
3103
3105
|
setVideoState: b,
|
|
3104
3106
|
videoFileInputRef: T,
|
|
3105
3107
|
activeVideoKeyRef: C
|
|
@@ -3309,17 +3311,17 @@ const Cc = ({
|
|
|
3309
3311
|
if (ae && typeof ae.maxCount == "number" && typeof ae.minCount == "number") {
|
|
3310
3312
|
const ne = ae.maxCount, Q = l[w] != null, re = K != null ? Number.parseInt(K, 10) : NaN;
|
|
3311
3313
|
if (Q) {
|
|
3312
|
-
o.current && (o.current.multiple = !1),
|
|
3314
|
+
o.current && (o.current.multiple = !1), E(null), c(null), y(w), u?.(), o.current?.click();
|
|
3313
3315
|
return;
|
|
3314
3316
|
}
|
|
3315
3317
|
let ge = 0;
|
|
3316
3318
|
for (let Ee = 0; Ee < ne; Ee++)
|
|
3317
3319
|
l[`${V}-${Ee}`] != null && (ge += 1);
|
|
3318
|
-
ge < ne && o.current ? (o.current.multiple = !0,
|
|
3320
|
+
ge < ne && o.current ? (o.current.multiple = !0, E(V), c(Number.isFinite(re) ? re : null), y(null), u?.(), o.current.click()) : (o.current && (o.current.multiple = !1), E(null), c(null), y(w), u?.(), o.current?.click());
|
|
3319
3321
|
} else
|
|
3320
|
-
o.current && (o.current.multiple = !1),
|
|
3322
|
+
o.current && (o.current.multiple = !1), E(null), c(null), y(w), u?.(), o.current?.click();
|
|
3321
3323
|
} else
|
|
3322
|
-
o.current && (o.current.multiple = !1),
|
|
3324
|
+
o.current && (o.current.multiple = !1), E(null), c(null), y(w), u?.(), o.current?.click();
|
|
3323
3325
|
}
|
|
3324
3326
|
return;
|
|
3325
3327
|
}
|
|
@@ -3338,7 +3340,7 @@ const Cc = ({
|
|
|
3338
3340
|
a,
|
|
3339
3341
|
n,
|
|
3340
3342
|
m,
|
|
3341
|
-
|
|
3343
|
+
E,
|
|
3342
3344
|
c,
|
|
3343
3345
|
y,
|
|
3344
3346
|
f,
|
|
@@ -3360,23 +3362,23 @@ const Cc = ({
|
|
|
3360
3362
|
effectiveConfig: l,
|
|
3361
3363
|
files: f,
|
|
3362
3364
|
multiVariableCounts: p,
|
|
3363
|
-
setMultiVariableCounts:
|
|
3365
|
+
setMultiVariableCounts: E,
|
|
3364
3366
|
savedCursorRef: c,
|
|
3365
3367
|
videoState: y
|
|
3366
3368
|
}) => oe(() => {
|
|
3367
3369
|
if (e.length === 0) {
|
|
3368
3370
|
if (t.current) {
|
|
3369
|
-
const
|
|
3370
|
-
n(
|
|
3371
|
+
const g = !(t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
|
|
3372
|
+
n(g), r(!g);
|
|
3371
3373
|
}
|
|
3372
3374
|
return;
|
|
3373
3375
|
}
|
|
3374
3376
|
if (yr(t), t.current && t.current.querySelectorAll(
|
|
3375
3377
|
'[data-type="variable"][data-node-type="report-url"]'
|
|
3376
|
-
).forEach((
|
|
3377
|
-
const b =
|
|
3378
|
+
).forEach((g) => {
|
|
3379
|
+
const b = g.dataset.key;
|
|
3378
3380
|
if (!b) return;
|
|
3379
|
-
|
|
3381
|
+
g.innerText.replace(/[\u200B\n]/g, "").trim() || a((C) => {
|
|
3380
3382
|
const S = C[b];
|
|
3381
3383
|
return !S || S.status === "idle" && (!S.modules || S.modules.length === 0) ? C : {
|
|
3382
3384
|
...C,
|
|
@@ -3385,10 +3387,10 @@ const Cc = ({
|
|
|
3385
3387
|
});
|
|
3386
3388
|
}), t.current && t.current.querySelectorAll(
|
|
3387
3389
|
'[data-type="variable"][data-node-type="markdown"]'
|
|
3388
|
-
).forEach((
|
|
3389
|
-
const b =
|
|
3390
|
+
).forEach((g) => {
|
|
3391
|
+
const b = g.dataset.key;
|
|
3390
3392
|
if (!b) return;
|
|
3391
|
-
|
|
3393
|
+
g.innerText.replace(/[\u200B\n]/g, "").trim() || i((C) => {
|
|
3392
3394
|
const S = C[b];
|
|
3393
3395
|
return !S || S.status === "idle" && (!S.modules || S.modules.length === 0) ? C : {
|
|
3394
3396
|
...C,
|
|
@@ -3397,10 +3399,10 @@ const Cc = ({
|
|
|
3397
3399
|
});
|
|
3398
3400
|
}), t.current && t.current.querySelectorAll(
|
|
3399
3401
|
'[data-type="variable"][data-node-type="markdown-name"]'
|
|
3400
|
-
).forEach((
|
|
3401
|
-
const b =
|
|
3402
|
+
).forEach((g) => {
|
|
3403
|
+
const b = g.dataset.key;
|
|
3402
3404
|
if (!b) return;
|
|
3403
|
-
|
|
3405
|
+
g.innerText.replace(/[\u200B\n]/g, "").trim() || s((C) => {
|
|
3404
3406
|
const S = C[b];
|
|
3405
3407
|
return !S || S.status === "idle" && (!S.modules || S.modules.length === 0) ? C : {
|
|
3406
3408
|
...C,
|
|
@@ -3409,11 +3411,11 @@ const Cc = ({
|
|
|
3409
3411
|
});
|
|
3410
3412
|
}), t.current && t.current.querySelectorAll(
|
|
3411
3413
|
'[data-type="richtext"][data-node-type="markdown-module"]'
|
|
3412
|
-
).forEach((
|
|
3413
|
-
const b =
|
|
3414
|
+
).forEach((g) => {
|
|
3415
|
+
const b = g.dataset.key;
|
|
3414
3416
|
if (!b) return;
|
|
3415
|
-
const T =
|
|
3416
|
-
|
|
3417
|
+
const T = g.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3418
|
+
g.getAttribute("data-is-placeholder") === "true" && T && !T.startsWith("请补充:") && g.removeAttribute("data-is-placeholder"), T || (i((C) => {
|
|
3417
3419
|
const S = C[b];
|
|
3418
3420
|
return !S || S.status === "idle" ? C : {
|
|
3419
3421
|
...C,
|
|
@@ -3426,20 +3428,20 @@ const Cc = ({
|
|
|
3426
3428
|
[b]: { status: "idle", modules: [], lastParsedText: void 0, error: void 0 }
|
|
3427
3429
|
};
|
|
3428
3430
|
}));
|
|
3429
|
-
}), t.current && t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
3430
|
-
if (
|
|
3431
|
+
}), t.current && t.current.querySelectorAll('[data-type="variable"]').forEach((g) => {
|
|
3432
|
+
if (g.dataset.variableRender === "antd-textarea")
|
|
3431
3433
|
return;
|
|
3432
|
-
const b =
|
|
3433
|
-
`), C =
|
|
3434
|
-
|
|
3435
|
-
const L =
|
|
3434
|
+
const b = g.innerText || "", T = !!g.querySelector("br") || b.includes(`
|
|
3435
|
+
`), C = g.offsetHeight > 32, A = b.replace(/\u200B/g, "").trim().length > 0 && (T || C);
|
|
3436
|
+
g.classList.toggle("rte-variable-multiline", A), g.classList.toggle("rte-variable-force-block", A);
|
|
3437
|
+
const L = g.closest(".rte-inline-group");
|
|
3436
3438
|
L && L.classList.toggle("rte-inline-group-force-block", A);
|
|
3437
|
-
const _ =
|
|
3439
|
+
const _ = g.closest(".required-upload-group, .required-multi-first");
|
|
3438
3440
|
_ && _.classList.toggle("rte-required-group-force-block", A);
|
|
3439
|
-
const v =
|
|
3441
|
+
const v = g.querySelector(".variable-info-icon");
|
|
3440
3442
|
if (v) {
|
|
3441
3443
|
let k = !1;
|
|
3442
|
-
const N = document.createTreeWalker(
|
|
3444
|
+
const N = document.createTreeWalker(g, NodeFilter.SHOW_TEXT, {
|
|
3443
3445
|
acceptNode: (O) => v.contains(O) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
3444
3446
|
});
|
|
3445
3447
|
for (; N.nextNode(); )
|
|
@@ -3447,14 +3449,14 @@ const Cc = ({
|
|
|
3447
3449
|
k = !0;
|
|
3448
3450
|
break;
|
|
3449
3451
|
}
|
|
3450
|
-
k ? v.classList.add("hidden") : v.classList.remove("hidden"),
|
|
3452
|
+
k ? v.classList.add("hidden") : v.classList.remove("hidden"), g.classList.toggle("rte-variable-with-icon", !v.classList.contains("hidden"));
|
|
3451
3453
|
}
|
|
3452
3454
|
}), o || window.requestAnimationFrame(() => {
|
|
3453
3455
|
u();
|
|
3454
3456
|
}), Ga(t, l, f, y), Ya(t, l, f, r, y), !t.current) return;
|
|
3455
3457
|
e.filter((m) => m.type === "multi-variable" && m.key).forEach((m) => {
|
|
3456
3458
|
if (!m.key) return;
|
|
3457
|
-
const
|
|
3459
|
+
const g = m.maxCount || 9, b = p[m.key] || 1, T = [];
|
|
3458
3460
|
for (let _ = 0; _ < b; _++) {
|
|
3459
3461
|
const v = `${m.key}_${_}`, k = t.current.querySelector(
|
|
3460
3462
|
`[data-type="variable"][data-key="${v}"][data-multi-key="${m.key}"]`
|
|
@@ -3502,7 +3504,7 @@ const Cc = ({
|
|
|
3502
3504
|
`).trim();
|
|
3503
3505
|
F && (k[I] = F);
|
|
3504
3506
|
}
|
|
3505
|
-
}), t.current.__tempVariableValues = k,
|
|
3507
|
+
}), t.current.__tempVariableValues = k, E((R) => ({
|
|
3506
3508
|
...R,
|
|
3507
3509
|
[m.key]: N
|
|
3508
3510
|
}));
|
|
@@ -3513,7 +3515,7 @@ const Cc = ({
|
|
|
3513
3515
|
`[data-type="variable"][data-key="${v}"][data-multi-key="${m.key}"]`
|
|
3514
3516
|
);
|
|
3515
3517
|
if (k && (k.innerText || "").replace(/\u200B/g, "").replace(/\r\n/g, `
|
|
3516
|
-
`).trim().length > 0 && b <
|
|
3518
|
+
`).trim().length > 0 && b < g) {
|
|
3517
3519
|
const O = window.getSelection();
|
|
3518
3520
|
if (O && O.rangeCount > 0) {
|
|
3519
3521
|
const R = O.getRangeAt(0), I = R.startContainer, x = I.nodeType === Node.ELEMENT_NODE ? I.closest('[data-type="variable"][data-multi-key]') : I.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
@@ -3527,7 +3529,7 @@ const Cc = ({
|
|
|
3527
3529
|
}
|
|
3528
3530
|
}
|
|
3529
3531
|
}
|
|
3530
|
-
|
|
3532
|
+
E((R) => ({
|
|
3531
3533
|
...R,
|
|
3532
3534
|
[m.key]: b + 1
|
|
3533
3535
|
}));
|
|
@@ -3547,7 +3549,7 @@ const Cc = ({
|
|
|
3547
3549
|
r,
|
|
3548
3550
|
i,
|
|
3549
3551
|
s,
|
|
3550
|
-
|
|
3552
|
+
E,
|
|
3551
3553
|
a
|
|
3552
3554
|
]), _c = ({
|
|
3553
3555
|
disabled: e,
|
|
@@ -3567,8 +3569,8 @@ const Cc = ({
|
|
|
3567
3569
|
if (i.key === "Enter") {
|
|
3568
3570
|
const u = i.target, l = u?.closest?.('[data-type="variable"]'), f = !!u?.closest?.('[data-type="richtext"]'), p = u?.tagName === "TEXTAREA" || !!u?.closest?.('[data-type="textarea"]');
|
|
3569
3571
|
if (l) {
|
|
3570
|
-
const
|
|
3571
|
-
if (
|
|
3572
|
+
const E = l.getAttribute("data-node-type") || "";
|
|
3573
|
+
if (E === "report-url" || E === "markdown" || E === "markdown-name") {
|
|
3572
3574
|
i.preventDefault();
|
|
3573
3575
|
return;
|
|
3574
3576
|
}
|
|
@@ -3589,8 +3591,8 @@ const Cc = ({
|
|
|
3589
3591
|
h.deleteContents();
|
|
3590
3592
|
const m = document.createElement("br");
|
|
3591
3593
|
h.insertNode(m);
|
|
3592
|
-
const
|
|
3593
|
-
m.parentNode?.insertBefore(
|
|
3594
|
+
const g = document.createTextNode("");
|
|
3595
|
+
m.parentNode?.insertBefore(g, m.nextSibling), h.setStart(g, 0), h.collapse(!0), y.removeAllRanges(), y.addRange(h);
|
|
3594
3596
|
}
|
|
3595
3597
|
a();
|
|
3596
3598
|
return;
|
|
@@ -3639,8 +3641,8 @@ const Cc = ({
|
|
|
3639
3641
|
if (u && u.rangeCount > 0) {
|
|
3640
3642
|
const l = u.getRangeAt(0), f = u.anchorNode;
|
|
3641
3643
|
if (t) {
|
|
3642
|
-
let
|
|
3643
|
-
if (f && (f.nodeType === Node.ELEMENT_NODE ? (
|
|
3644
|
+
let E = null, c = null;
|
|
3645
|
+
if (f && (f.nodeType === Node.ELEMENT_NODE ? (E = f.closest(".tag-node"), c = f.closest('[data-type="text"]')) : f.nodeType === Node.TEXT_NODE && f.parentElement && (E = f.parentElement.closest(".tag-node"), c = f.parentElement.closest('[data-type="text"]'))), (E || c) && l.collapsed && l.startOffset === 0) {
|
|
3644
3646
|
i.preventDefault();
|
|
3645
3647
|
return;
|
|
3646
3648
|
}
|
|
@@ -3649,8 +3651,8 @@ const Cc = ({
|
|
|
3649
3651
|
if (f && (f.nodeType === Node.ELEMENT_NODE ? p = f.closest('[data-type="variable"]') : f.nodeType === Node.TEXT_NODE && f.parentElement && (p = f.parentElement.closest('[data-type="variable"]'))), p) {
|
|
3650
3652
|
if (!l.collapsed)
|
|
3651
3653
|
return;
|
|
3652
|
-
const
|
|
3653
|
-
if (
|
|
3654
|
+
const E = p.innerText;
|
|
3655
|
+
if (E === "" || E === "") {
|
|
3654
3656
|
i.preventDefault();
|
|
3655
3657
|
return;
|
|
3656
3658
|
}
|
|
@@ -3658,9 +3660,9 @@ const Cc = ({
|
|
|
3658
3660
|
try {
|
|
3659
3661
|
const h = document.createRange();
|
|
3660
3662
|
h.selectNodeContents(p), h.setEnd(l.startContainer, l.startOffset);
|
|
3661
|
-
const m = h.cloneContents(),
|
|
3662
|
-
for (;
|
|
3663
|
-
const b =
|
|
3663
|
+
const m = h.cloneContents(), g = document.createTreeWalker(m, NodeFilter.SHOW_ALL);
|
|
3664
|
+
for (; g.nextNode(); ) {
|
|
3665
|
+
const b = g.currentNode;
|
|
3664
3666
|
if (b.nodeType === Node.ELEMENT_NODE) {
|
|
3665
3667
|
if (b.tagName === "BR") return !1;
|
|
3666
3668
|
} else if (b.nodeType === Node.TEXT_NODE && (b.textContent || "").replace(/\u200B/g, "").trim().length > 0)
|
|
@@ -3674,7 +3676,7 @@ const Cc = ({
|
|
|
3674
3676
|
i.preventDefault();
|
|
3675
3677
|
return;
|
|
3676
3678
|
}
|
|
3677
|
-
if (
|
|
3679
|
+
if (E.startsWith("") && l.startOffset === 1) {
|
|
3678
3680
|
i.preventDefault();
|
|
3679
3681
|
return;
|
|
3680
3682
|
}
|
|
@@ -3691,13 +3693,13 @@ const Cc = ({
|
|
|
3691
3693
|
isDraggingRef: a,
|
|
3692
3694
|
mouseDownPosRef: i
|
|
3693
3695
|
}) => {
|
|
3694
|
-
const s = (...
|
|
3695
|
-
}, o = (
|
|
3696
|
+
const s = (...E) => {
|
|
3697
|
+
}, o = (E) => {
|
|
3696
3698
|
try {
|
|
3697
3699
|
const c = window.getSelection();
|
|
3698
|
-
if (!c) return s(
|
|
3700
|
+
if (!c) return s(E, "no selection");
|
|
3699
3701
|
const y = c.rangeCount > 0 ? c.getRangeAt(0) : null;
|
|
3700
|
-
s(
|
|
3702
|
+
s(E, {
|
|
3701
3703
|
rangeCount: c.rangeCount,
|
|
3702
3704
|
isCollapsed: c.isCollapsed,
|
|
3703
3705
|
anchorNode: c.anchorNode?.nodeType === Node.TEXT_NODE ? "TEXT" : c.anchorNode?.nodeName,
|
|
@@ -3713,23 +3715,23 @@ const Cc = ({
|
|
|
3713
3715
|
});
|
|
3714
3716
|
} catch {
|
|
3715
3717
|
}
|
|
3716
|
-
}, u = oe((
|
|
3717
|
-
const c =
|
|
3718
|
+
}, u = oe((E) => {
|
|
3719
|
+
const c = E.target;
|
|
3718
3720
|
if (s("mousedown", {
|
|
3719
3721
|
tag: c.tagName,
|
|
3720
3722
|
cls: c.className
|
|
3721
3723
|
}), o("before mousedown"), c.closest(".rte-datepicker-wrapper") || c.closest(".rte-datepicker-host") || c.closest(".rte-select-wrapper") || c.closest(".rte-select-host") || c.closest(".ant-select-dropdown"))
|
|
3722
3724
|
return;
|
|
3723
3725
|
if (c.closest(".tag-close-btn")) {
|
|
3724
|
-
if (
|
|
3726
|
+
if (E.preventDefault(), E.stopPropagation(), e)
|
|
3725
3727
|
return;
|
|
3726
3728
|
r(null), t ? t() : n.current && (n.current.innerHTML = "", n.current.focus());
|
|
3727
3729
|
return;
|
|
3728
3730
|
}
|
|
3729
3731
|
if (e) {
|
|
3730
|
-
const m = c.closest(".tag-node"),
|
|
3731
|
-
if (m ||
|
|
3732
|
-
|
|
3732
|
+
const m = c.closest(".tag-node"), g = c.closest('[data-type="text"]');
|
|
3733
|
+
if (m || g) {
|
|
3734
|
+
E.preventDefault(), E.stopPropagation();
|
|
3733
3735
|
const b = window.getSelection();
|
|
3734
3736
|
b && b.removeAllRanges();
|
|
3735
3737
|
return;
|
|
@@ -3745,9 +3747,9 @@ const Cc = ({
|
|
|
3745
3747
|
classes: h.className
|
|
3746
3748
|
}), h.dataset.variableRender === "antd-textarea")
|
|
3747
3749
|
return;
|
|
3748
|
-
const m = !!c.closest(".variable-info-icon"),
|
|
3749
|
-
if (s("v1 variable mousedown", { isPlaceholder:
|
|
3750
|
-
|
|
3750
|
+
const m = !!c.closest(".variable-info-icon"), g = h.classList.contains("show-placeholder") || (h.innerText || "").replace(/[\u200B\n]/g, "").trim().length === 0;
|
|
3751
|
+
if (s("v1 variable mousedown", { isPlaceholder: g, isOnIcon: m, innerText: h.innerText }), g && !m) {
|
|
3752
|
+
E.preventDefault(), window.requestAnimationFrame(() => {
|
|
3751
3753
|
o("raf before setRange (mousedown)");
|
|
3752
3754
|
const b = window.getSelection();
|
|
3753
3755
|
if (!b) return;
|
|
@@ -3760,14 +3762,14 @@ const Cc = ({
|
|
|
3760
3762
|
}
|
|
3761
3763
|
return;
|
|
3762
3764
|
}
|
|
3763
|
-
i.current = { x:
|
|
3764
|
-
}, [n, a, e, i, t, r]), l = oe((
|
|
3765
|
-
if (!
|
|
3766
|
-
const h = Math.abs(
|
|
3765
|
+
i.current = { x: E.clientX, y: E.clientY }, a.current = !1, c.closest(".file-remove-btn") && (E.preventDefault(), E.stopPropagation());
|
|
3766
|
+
}, [n, a, e, i, t, r]), l = oe((E) => {
|
|
3767
|
+
if (!E.target.closest('[data-type="variable"]') && i.current) {
|
|
3768
|
+
const h = Math.abs(E.clientX - i.current.x), m = Math.abs(E.clientY - i.current.y);
|
|
3767
3769
|
(h > 3 || m > 3) && (a.current = !0);
|
|
3768
3770
|
}
|
|
3769
|
-
}, [a, i]), f = oe((
|
|
3770
|
-
const c =
|
|
3771
|
+
}, [a, i]), f = oe((E) => {
|
|
3772
|
+
const c = E.target;
|
|
3771
3773
|
s("mouseup", { tag: c.tagName, cls: c.className }), o("before mouseup");
|
|
3772
3774
|
const y = c.closest('[data-type="variable"]');
|
|
3773
3775
|
if (y) {
|
|
@@ -3778,29 +3780,29 @@ const Cc = ({
|
|
|
3778
3780
|
isPlaceholder: m,
|
|
3779
3781
|
isOnIcon: h,
|
|
3780
3782
|
classes: y.className
|
|
3781
|
-
}), m && !h && (
|
|
3783
|
+
}), m && !h && (E.preventDefault(), window.requestAnimationFrame(() => {
|
|
3782
3784
|
o("raf before setRange (mouseup)");
|
|
3783
|
-
const
|
|
3784
|
-
if (!
|
|
3785
|
+
const g = window.getSelection();
|
|
3786
|
+
if (!g) return;
|
|
3785
3787
|
const b = y;
|
|
3786
3788
|
b.focus();
|
|
3787
3789
|
const T = document.createTreeWalker(b, NodeFilter.SHOW_TEXT), C = T.nextNode() ? T.currentNode : null, S = document.createRange();
|
|
3788
|
-
C ? (S.setStart(C, 0), S.collapse(!0)) : (S.selectNodeContents(b), S.collapse(!0)),
|
|
3790
|
+
C ? (S.setStart(C, 0), S.collapse(!0)) : (S.selectNodeContents(b), S.collapse(!0)), g.removeAllRanges(), g.addRange(S), o("raf after setRange (mouseup)");
|
|
3789
3791
|
}));
|
|
3790
3792
|
}
|
|
3791
3793
|
i.current = null, a.current = !1;
|
|
3792
3794
|
return;
|
|
3793
3795
|
}
|
|
3794
3796
|
i.current = null, a.current = !1;
|
|
3795
|
-
}, [a, i]), p = oe((
|
|
3796
|
-
const y =
|
|
3797
|
+
}, [a, i]), p = oe((E) => {
|
|
3798
|
+
const y = E.target.closest('[data-type="variable"]');
|
|
3797
3799
|
if (y) {
|
|
3798
3800
|
const h = window.getSelection();
|
|
3799
3801
|
if (h) {
|
|
3800
|
-
const m = document.createRange(),
|
|
3801
|
-
if (
|
|
3802
|
-
let T = 0, C =
|
|
3803
|
-
|
|
3802
|
+
const m = document.createRange(), g = y.textContent || "";
|
|
3803
|
+
if (g.replace(/\u200B/g, "")) {
|
|
3804
|
+
let T = 0, C = g.length;
|
|
3805
|
+
g.startsWith("") && (T = 1), g.endsWith("") && g.length > 1 && (C = g.length - 1);
|
|
3804
3806
|
const S = y.firstChild;
|
|
3805
3807
|
S && S.nodeType === Node.TEXT_NODE ? (m.setStart(S, T), m.setEnd(S, C)) : m.selectNodeContents(y);
|
|
3806
3808
|
} else
|
|
@@ -3824,16 +3826,16 @@ const Cc = ({
|
|
|
3824
3826
|
markdownRawTextRef: f,
|
|
3825
3827
|
setMarkdownAnalyzeState: p
|
|
3826
3828
|
}) => oe(
|
|
3827
|
-
(
|
|
3828
|
-
const c =
|
|
3829
|
+
(E) => {
|
|
3830
|
+
const c = E.target;
|
|
3829
3831
|
if (c && (c.tagName === "TEXTAREA" || c.tagName === "INPUT") && c.closest?.('[data-variable-render="antd-textarea"]'))
|
|
3830
3832
|
return;
|
|
3831
3833
|
if (e) {
|
|
3832
|
-
|
|
3834
|
+
E.preventDefault();
|
|
3833
3835
|
return;
|
|
3834
3836
|
}
|
|
3835
|
-
|
|
3836
|
-
const h = (
|
|
3837
|
+
E.preventDefault();
|
|
3838
|
+
const h = (E.clipboardData.getData("text/plain") || "").replace(/\r\n/g, `
|
|
3837
3839
|
`).replace(/\n+$/g, ""), m = window.getSelection();
|
|
3838
3840
|
if (m && m.rangeCount > 0) {
|
|
3839
3841
|
const C = m.anchorNode;
|
|
@@ -3916,7 +3918,7 @@ const Cc = ({
|
|
|
3916
3918
|
}
|
|
3917
3919
|
}
|
|
3918
3920
|
}
|
|
3919
|
-
let
|
|
3921
|
+
let g = !1, b = "";
|
|
3920
3922
|
const T = window.getSelection();
|
|
3921
3923
|
if (T && T.rangeCount > 0) {
|
|
3922
3924
|
const C = T.anchorNode;
|
|
@@ -3925,7 +3927,7 @@ const Cc = ({
|
|
|
3925
3927
|
if (C.nodeType === Node.ELEMENT_NODE ? S = C.closest('[data-type="variable"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (S = C.parentElement.closest('[data-type="variable"]')), S) {
|
|
3926
3928
|
const A = S.getAttribute("data-node-type") || "", L = S.dataset.key;
|
|
3927
3929
|
if (A === "markdown" && L && /20\d{2}-\d{2}-\d{2}/.test(h))
|
|
3928
|
-
|
|
3930
|
+
g = !0, b = L, f.current[L] = h, p((_) => ({
|
|
3929
3931
|
..._,
|
|
3930
3932
|
[L]: { ..._[L], status: "loading", error: void 0 }
|
|
3931
3933
|
}));
|
|
@@ -3945,7 +3947,7 @@ const Cc = ({
|
|
|
3945
3947
|
}
|
|
3946
3948
|
}
|
|
3947
3949
|
}
|
|
3948
|
-
if (
|
|
3950
|
+
if (g && b) {
|
|
3949
3951
|
setTimeout(() => {
|
|
3950
3952
|
s.current(b, h);
|
|
3951
3953
|
}, 0);
|
|
@@ -4005,27 +4007,27 @@ const Nc = ({
|
|
|
4005
4007
|
if (!m) return;
|
|
4006
4008
|
if (n(m, m), o.current) {
|
|
4007
4009
|
o.current.textContent = "";
|
|
4008
|
-
const
|
|
4009
|
-
o.current.dispatchEvent(
|
|
4010
|
+
const g = new Event("input", { bubbles: !0 });
|
|
4011
|
+
o.current.dispatchEvent(g);
|
|
4010
4012
|
}
|
|
4011
4013
|
return;
|
|
4012
4014
|
}
|
|
4013
4015
|
const p = o.current;
|
|
4014
|
-
let
|
|
4016
|
+
let E = "";
|
|
4015
4017
|
const c = {}, y = (m) => {
|
|
4016
4018
|
if (!(m.nodeType === Node.ELEMENT_NODE && m.style.display === "none")) {
|
|
4017
4019
|
if (m.nodeType === Node.TEXT_NODE)
|
|
4018
|
-
|
|
4020
|
+
E += (m.textContent || "").replace(/\u200B/g, "");
|
|
4019
4021
|
else if (m.nodeType === Node.ELEMENT_NODE) {
|
|
4020
|
-
const
|
|
4022
|
+
const g = m, b = g.dataset.type, T = g.dataset.key;
|
|
4021
4023
|
if (b === "variable" && T) {
|
|
4022
4024
|
let C = "";
|
|
4023
4025
|
const S = document.createTreeWalker(
|
|
4024
|
-
|
|
4026
|
+
g,
|
|
4025
4027
|
NodeFilter.SHOW_TEXT,
|
|
4026
4028
|
{
|
|
4027
4029
|
acceptNode: (L) => {
|
|
4028
|
-
const _ =
|
|
4030
|
+
const _ = g.querySelector(".variable-info-icon");
|
|
4029
4031
|
return _ && _.contains(L) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
4030
4032
|
}
|
|
4031
4033
|
}
|
|
@@ -4034,26 +4036,26 @@ const Nc = ({
|
|
|
4034
4036
|
C += S.currentNode.textContent || "";
|
|
4035
4037
|
const A = C.replace(/[\u200B\n]/g, "").trim();
|
|
4036
4038
|
if (A) {
|
|
4037
|
-
const L =
|
|
4039
|
+
const L = g.dataset.multiKey;
|
|
4038
4040
|
if (L) {
|
|
4039
4041
|
(!c[L] || !Array.isArray(c[L])) && (c[L] = []);
|
|
4040
4042
|
const _ = c[L];
|
|
4041
|
-
_.push(A), _.length > 1 && (
|
|
4043
|
+
_.push(A), _.length > 1 && (E += " "), E += A;
|
|
4042
4044
|
} else
|
|
4043
|
-
c[T] = A,
|
|
4044
|
-
if (
|
|
4045
|
+
c[T] = A, E += A;
|
|
4046
|
+
if (g.dataset.nodeType === "report-url")
|
|
4045
4047
|
if (c.url === void 0)
|
|
4046
4048
|
c.url = A;
|
|
4047
4049
|
else {
|
|
4048
4050
|
const _ = c.url;
|
|
4049
4051
|
Array.isArray(_) ? _.push(A) : c.url = [String(_), A];
|
|
4050
4052
|
}
|
|
4051
|
-
if (
|
|
4053
|
+
if (g.dataset.nodeType === "markdown-name") {
|
|
4052
4054
|
const _ = `${T}__sourceText`;
|
|
4053
4055
|
c[_] === void 0 && (c[_] = A);
|
|
4054
4056
|
}
|
|
4055
|
-
if (
|
|
4056
|
-
const _ =
|
|
4057
|
+
if (g.dataset.nodeType === "markdown") {
|
|
4058
|
+
const _ = g.dataset.sourceTextKey || `${T}__sourceText`;
|
|
4057
4059
|
if (c[_] === void 0)
|
|
4058
4060
|
c[_] = A;
|
|
4059
4061
|
else {
|
|
@@ -4065,33 +4067,33 @@ const Nc = ({
|
|
|
4065
4067
|
}
|
|
4066
4068
|
}
|
|
4067
4069
|
} else if (b === "select" && T) {
|
|
4068
|
-
const C = (
|
|
4069
|
-
C && (c[T] = C,
|
|
4070
|
+
const C = (g.getAttribute("data-value") || "").trim();
|
|
4071
|
+
C && (c[T] = C, E += C);
|
|
4070
4072
|
} else if (b === "textarea" && T) {
|
|
4071
|
-
const S = (
|
|
4072
|
-
S && (c[T] = S,
|
|
4073
|
+
const S = (g.value || "").replace(/\u200B/g, "").trim();
|
|
4074
|
+
S && (c[T] = S, E += S);
|
|
4073
4075
|
} else if (b === "richtext" && T) {
|
|
4074
|
-
const C =
|
|
4076
|
+
const C = g, S = C.dataset.nodeType, A = (C.textContent || "").replace(/\u200B/g, "").trim();
|
|
4075
4077
|
if (A)
|
|
4076
4078
|
if (S === "report-module" || S === "markdown-module") {
|
|
4077
4079
|
(!c[T] || !Array.isArray(c[T])) && (c[T] = []);
|
|
4078
4080
|
const L = c[T];
|
|
4079
|
-
L.push(A), L.length > 1 && (
|
|
4081
|
+
L.push(A), L.length > 1 && (E += " "), E += A;
|
|
4080
4082
|
} else
|
|
4081
|
-
c[T] = A,
|
|
4083
|
+
c[T] = A, E += A;
|
|
4082
4084
|
} else if (b === "datepicker" && T) {
|
|
4083
|
-
const S = (
|
|
4085
|
+
const S = (g.getAttribute("data-value") || "").trim();
|
|
4084
4086
|
if (S)
|
|
4085
4087
|
if (S.includes(",")) {
|
|
4086
4088
|
const A = S.split(",");
|
|
4087
|
-
A.length === 2 ? (c[T] = A,
|
|
4089
|
+
A.length === 2 ? (c[T] = A, E += `[${A[0]}, ${A[1]}]`) : (c[T] = S, E += S);
|
|
4088
4090
|
} else
|
|
4089
|
-
c[T] = S,
|
|
4091
|
+
c[T] = S, E += S;
|
|
4090
4092
|
} else if (b === "number-input" && T) {
|
|
4091
|
-
const S = (
|
|
4092
|
-
S && (c[T] = S,
|
|
4093
|
+
const S = (g.value || "").trim();
|
|
4094
|
+
S && (c[T] = S, E += S);
|
|
4093
4095
|
} else if (b === "upload" && T) {
|
|
4094
|
-
const C =
|
|
4096
|
+
const C = g.dataset.batchKey;
|
|
4095
4097
|
if (C) {
|
|
4096
4098
|
const S = e.find((A) => A.type === "upload" && A.key === C);
|
|
4097
4099
|
if (S && typeof S.maxCount == "number" && typeof S.minCount == "number") {
|
|
@@ -4100,49 +4102,49 @@ const Nc = ({
|
|
|
4100
4102
|
const _ = `${C}-${L}`, v = t[_];
|
|
4101
4103
|
v && A.push(v);
|
|
4102
4104
|
}
|
|
4103
|
-
c[C] || (c[C] = A.length > 0 ? A : null, A.length > 0 && (
|
|
4105
|
+
c[C] || (c[C] = A.length > 0 ? A : null, A.length > 0 && (E += ` [附带${A.length}个文件: ${A.map((L) => typeof L == "string" ? L.split("/").pop() || "file" : L.name).join(", ")}] `));
|
|
4104
4106
|
} else if (c[T] = t[T] ?? null, t[T]) {
|
|
4105
4107
|
const A = t[T];
|
|
4106
|
-
|
|
4108
|
+
E += ` [附带文件: ${typeof A == "string" ? A.split("/").pop() || "file" : A.name}] `;
|
|
4107
4109
|
}
|
|
4108
4110
|
} else if (c[T] = t[T] ?? null, t[T]) {
|
|
4109
4111
|
const S = t[T];
|
|
4110
|
-
|
|
4112
|
+
E += ` [附带文件: ${typeof S == "string" ? S.split("/").pop() || "file" : S.name}] `;
|
|
4111
4113
|
}
|
|
4112
4114
|
} else if ((b === "video-url" || b === "video-upload") && T) {
|
|
4113
4115
|
const C = f?.[T];
|
|
4114
4116
|
if (C?.status === "success" && C.videoUrl) {
|
|
4115
4117
|
c[T] = C.videoUrl, C.file && (c[`${T}__file`] = C.file);
|
|
4116
4118
|
const S = C.fileName || "视频";
|
|
4117
|
-
|
|
4119
|
+
E += ` [附带视频: ${S}] `;
|
|
4118
4120
|
}
|
|
4119
4121
|
} else {
|
|
4120
|
-
if (
|
|
4121
|
-
|
|
4122
|
+
if (g.classList.contains("tag-close-btn") || g.classList.contains("file-remove-btn") || g.classList.contains("video-remove-btn")) return;
|
|
4123
|
+
g.getAttribute("contenteditable") === "false" && !b && g.classList.contains("tag-node") ? E += g.innerText : g.childNodes.forEach(y);
|
|
4122
4124
|
}
|
|
4123
4125
|
}
|
|
4124
4126
|
}
|
|
4125
4127
|
};
|
|
4126
|
-
if (p.childNodes.forEach(y),
|
|
4128
|
+
if (p.childNodes.forEach(y), E = E.trim(), !E) return;
|
|
4127
4129
|
Object.keys(u).forEach((m) => {
|
|
4128
|
-
const
|
|
4129
|
-
if (!
|
|
4130
|
-
const b =
|
|
4130
|
+
const g = u[m];
|
|
4131
|
+
if (!g || !g.modules || g.modules.length === 0) return;
|
|
4132
|
+
const b = g.modules.map((T) => (T?.markdown || "").trim()).filter((T) => T.length > 0);
|
|
4131
4133
|
b.length !== 0 && (c[`${m}__markdown`] = b);
|
|
4132
4134
|
}), Object.keys(l).forEach((m) => {
|
|
4133
|
-
const
|
|
4134
|
-
if (!
|
|
4135
|
-
const b =
|
|
4135
|
+
const g = l[m];
|
|
4136
|
+
if (!g || !g.modules || g.modules.length === 0) return;
|
|
4137
|
+
const b = g.modules.map((T) => (T?.markdown || "").trim()).filter((T) => T.length > 0);
|
|
4136
4138
|
b.length !== 0 && (c[`${m}__markdown`] = b);
|
|
4137
4139
|
}), (async () => {
|
|
4138
|
-
for (const
|
|
4139
|
-
const b = c[
|
|
4140
|
+
for (const g of Object.keys(c)) {
|
|
4141
|
+
const b = c[g];
|
|
4140
4142
|
if (typeof b == "string" && b.startsWith("http")) {
|
|
4141
|
-
if (e.find((C) => C.type === "upload" && C.key ===
|
|
4143
|
+
if (e.find((C) => C.type === "upload" && C.key === g)) {
|
|
4142
4144
|
const C = await Oi(b);
|
|
4143
|
-
C && (c[
|
|
4145
|
+
C && (c[g] = C);
|
|
4144
4146
|
}
|
|
4145
|
-
} else if (Array.isArray(b) && e.find((C) => C.type === "upload" && C.key ===
|
|
4147
|
+
} else if (Array.isArray(b) && e.find((C) => C.type === "upload" && C.key === g)) {
|
|
4146
4148
|
for (let C = 0; C < b.length; C++)
|
|
4147
4149
|
if (typeof b[C] == "string" && b[C].startsWith("http")) {
|
|
4148
4150
|
const S = await Oi(b[C]);
|
|
@@ -4151,24 +4153,24 @@ const Nc = ({
|
|
|
4151
4153
|
}
|
|
4152
4154
|
}
|
|
4153
4155
|
const m = new FormData();
|
|
4154
|
-
m.append("fullPrompt",
|
|
4155
|
-
const b = c[
|
|
4156
|
+
m.append("fullPrompt", E), Object.keys(c).forEach((g) => {
|
|
4157
|
+
const b = c[g];
|
|
4156
4158
|
if (b != null)
|
|
4157
4159
|
if (b instanceof File)
|
|
4158
|
-
m.append(
|
|
4160
|
+
m.append(g, b);
|
|
4159
4161
|
else if (Array.isArray(b)) {
|
|
4160
4162
|
const T = e.some(
|
|
4161
|
-
(L) => L.type === "multi-variable" && L.key ===
|
|
4163
|
+
(L) => L.type === "multi-variable" && L.key === g
|
|
4162
4164
|
), C = e.some(
|
|
4163
|
-
(L) => L.type === "report-url" && L.key ===
|
|
4164
|
-
), S =
|
|
4165
|
-
T || C || S ||
|
|
4166
|
-
L != null && L !== "" && m.append(
|
|
4165
|
+
(L) => L.type === "report-url" && L.key === g
|
|
4166
|
+
), S = g.endsWith("__markdown");
|
|
4167
|
+
T || C || S || g === "url" ? b.forEach((L) => {
|
|
4168
|
+
L != null && L !== "" && m.append(g, String(L));
|
|
4167
4169
|
}) : b.forEach((L, _) => {
|
|
4168
|
-
L != null && (L instanceof File ? m.append(`${
|
|
4170
|
+
L != null && (L instanceof File ? m.append(`${g}[${_}]`, L) : typeof L == "string" ? m.append(`${g}[${_}]`, L) : m.append(`${g}[${_}]`, String(L)));
|
|
4169
4171
|
});
|
|
4170
|
-
} else typeof b == "string" ? m.append(
|
|
4171
|
-
}), n(m,
|
|
4172
|
+
} else typeof b == "string" ? m.append(g, b) : m.append(g, String(b));
|
|
4173
|
+
}), n(m, E);
|
|
4172
4174
|
})();
|
|
4173
4175
|
}, [
|
|
4174
4176
|
e,
|
|
@@ -4378,10 +4380,10 @@ function fo({
|
|
|
4378
4380
|
let i = null, s;
|
|
4379
4381
|
const o = e.params.speed;
|
|
4380
4382
|
e.wrapperEl.style.scrollSnapType = "none", r.cancelAnimationFrame(e.cssModeFrameID);
|
|
4381
|
-
const u = t > a ? "next" : "prev", l = (p,
|
|
4383
|
+
const u = t > a ? "next" : "prev", l = (p, E) => u === "next" && p >= E || u === "prev" && p <= E, f = () => {
|
|
4382
4384
|
s = (/* @__PURE__ */ new Date()).getTime(), i === null && (i = s);
|
|
4383
|
-
const p = Math.max(Math.min((s - i) / o, 1), 0),
|
|
4384
|
-
let c = a +
|
|
4385
|
+
const p = Math.max(Math.min((s - i) / o, 1), 0), E = 0.5 - Math.cos(p * Math.PI) / 2;
|
|
4386
|
+
let c = a + E * (t - a);
|
|
4385
4387
|
if (l(c, t) && (c = t), e.wrapperEl.scrollTo({
|
|
4386
4388
|
[n]: c
|
|
4387
4389
|
}), l(c, t)) {
|
|
@@ -4491,10 +4493,10 @@ function $c({
|
|
|
4491
4493
|
android: !1
|
|
4492
4494
|
}, s = n.screen.width, o = n.screen.height, u = a.match(/(Android);?[\s\/]+([\d.]+)?/);
|
|
4493
4495
|
let l = a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);
|
|
4494
|
-
const f = a.match(/(iPod)(.*OS\s([\d_]+))?/), p = !l && a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),
|
|
4496
|
+
const f = a.match(/(iPod)(.*OS\s([\d_]+))?/), p = !l && a.match(/(iPhone\sOS|iOS)\s([\d_]+)/), E = r === "Win32";
|
|
4495
4497
|
let c = r === "MacIntel";
|
|
4496
4498
|
const y = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
|
|
4497
|
-
return !l && c && t.touch && y.indexOf(`${s}x${o}`) >= 0 && (l = a.match(/(Version)\/([\d.]+)/), l || (l = [0, 1, "13_0_0"]), c = !1), u && !
|
|
4499
|
+
return !l && c && t.touch && y.indexOf(`${s}x${o}`) >= 0 && (l = a.match(/(Version)\/([\d.]+)/), l || (l = [0, 1, "13_0_0"]), c = !1), u && !E && (i.os = "android", i.android = !0), (l || p || f) && (i.os = "ios", i.ios = !0), i;
|
|
4498
4500
|
}
|
|
4499
4501
|
function mo(e = {}) {
|
|
4500
4502
|
return qr || (qr = $c(e)), qr;
|
|
@@ -4539,16 +4541,16 @@ function qc({
|
|
|
4539
4541
|
i = r.requestAnimationFrame(() => {
|
|
4540
4542
|
const {
|
|
4541
4543
|
width: p,
|
|
4542
|
-
height:
|
|
4544
|
+
height: E
|
|
4543
4545
|
} = e;
|
|
4544
|
-
let c = p, y =
|
|
4546
|
+
let c = p, y = E;
|
|
4545
4547
|
f.forEach(({
|
|
4546
4548
|
contentBoxSize: h,
|
|
4547
4549
|
contentRect: m,
|
|
4548
|
-
target:
|
|
4550
|
+
target: g
|
|
4549
4551
|
}) => {
|
|
4550
|
-
|
|
4551
|
-
}), (c !== p || y !==
|
|
4552
|
+
g && g !== e.el || (c = m ? m.width : (h[0] || h).inlineSize, y = m ? m.height : (h[0] || h).blockSize);
|
|
4553
|
+
}), (c !== p || y !== E) && s();
|
|
4552
4554
|
});
|
|
4553
4555
|
}), a.observe(e.el));
|
|
4554
4556
|
}, u = () => {
|
|
@@ -4573,7 +4575,7 @@ function zc({
|
|
|
4573
4575
|
emit: r
|
|
4574
4576
|
}) {
|
|
4575
4577
|
const a = [], i = Ue(), s = (l, f = {}) => {
|
|
4576
|
-
const p = i.MutationObserver || i.WebkitMutationObserver,
|
|
4578
|
+
const p = i.MutationObserver || i.WebkitMutationObserver, E = new p((c) => {
|
|
4577
4579
|
if (e.__preventObserver__) return;
|
|
4578
4580
|
if (c.length === 1) {
|
|
4579
4581
|
r("observerUpdate", c[0]);
|
|
@@ -4584,11 +4586,11 @@ function zc({
|
|
|
4584
4586
|
};
|
|
4585
4587
|
i.requestAnimationFrame ? i.requestAnimationFrame(y) : i.setTimeout(y, 0);
|
|
4586
4588
|
});
|
|
4587
|
-
|
|
4589
|
+
E.observe(l, {
|
|
4588
4590
|
attributes: typeof f.attributes > "u" ? !0 : f.attributes,
|
|
4589
4591
|
childList: e.isElement || (typeof f.childList > "u" ? !0 : f).childList,
|
|
4590
4592
|
characterData: typeof f.characterData > "u" ? !0 : f.characterData
|
|
4591
|
-
}), a.push(
|
|
4593
|
+
}), a.push(E);
|
|
4592
4594
|
}, o = () => {
|
|
4593
4595
|
if (e.params.observer) {
|
|
4594
4596
|
if (e.params.observeParents) {
|
|
@@ -4685,12 +4687,12 @@ function Yc() {
|
|
|
4685
4687
|
wrongRTL: s
|
|
4686
4688
|
} = e, o = e.virtual && n.virtual.enabled, u = o ? e.virtual.slides.length : e.slides.length, l = ct(a, `.${e.params.slideClass}, swiper-slide`), f = o ? e.virtual.slides.length : l.length;
|
|
4687
4689
|
let p = [];
|
|
4688
|
-
const
|
|
4690
|
+
const E = [], c = [];
|
|
4689
4691
|
let y = n.slidesOffsetBefore;
|
|
4690
4692
|
typeof y == "function" && (y = n.slidesOffsetBefore.call(e));
|
|
4691
4693
|
let h = n.slidesOffsetAfter;
|
|
4692
4694
|
typeof h == "function" && (h = n.slidesOffsetAfter.call(e));
|
|
4693
|
-
const m = e.snapGrid.length,
|
|
4695
|
+
const m = e.snapGrid.length, g = e.slidesGrid.length, b = e.size - y - h;
|
|
4694
4696
|
let T = n.spaceBetween, C = -y, S = 0, A = 0;
|
|
4695
4697
|
if (typeof b > "u")
|
|
4696
4698
|
return;
|
|
@@ -4727,7 +4729,7 @@ function Yc() {
|
|
|
4727
4729
|
R && (N.style.transform = R), I && (N.style.webkitTransform = I), n.roundLengths && (_ = Math.floor(_));
|
|
4728
4730
|
} else
|
|
4729
4731
|
_ = (b - (n.slidesPerView - 1) * T) / n.slidesPerView, n.roundLengths && (_ = Math.floor(_)), N && (N.style[e.getDirectionLabel("width")] = `${_}px`);
|
|
4730
|
-
N && (N.swiperSlideSize = _), c.push(_), n.centeredSlides ? (C = C + _ / 2 + S / 2 + T, S === 0 && k !== 0 && (C = C - b / 2 - T), k === 0 && (C = C - b / 2 - T), Math.abs(C) < 1 / 1e3 && (C = 0), n.roundLengths && (C = Math.floor(C)), A % n.slidesPerGroup === 0 && p.push(C),
|
|
4732
|
+
N && (N.swiperSlideSize = _), c.push(_), n.centeredSlides ? (C = C + _ / 2 + S / 2 + T, S === 0 && k !== 0 && (C = C - b / 2 - T), k === 0 && (C = C - b / 2 - T), Math.abs(C) < 1 / 1e3 && (C = 0), n.roundLengths && (C = Math.floor(C)), A % n.slidesPerGroup === 0 && p.push(C), E.push(C)) : (n.roundLengths && (C = Math.floor(C)), (A - Math.min(e.params.slidesPerGroupSkip, A)) % e.params.slidesPerGroup === 0 && p.push(C), E.push(C), C = C + _ + T), e.virtualSize += _ + T, S = _, A += 1;
|
|
4731
4733
|
}
|
|
4732
4734
|
}
|
|
4733
4735
|
if (e.virtualSize = Math.max(e.virtualSize, b) + h, i && s && (n.effect === "slide" || n.effect === "coverflow") && (r.style.width = `${e.virtualSize + T}px`), n.setWrapperSize && (r.style[e.getDirectionLabel("width")] = `${e.virtualSize + T}px`), L && e.grid.updateWrapperSize(_, p), !n.centeredSlides) {
|
|
@@ -4759,7 +4761,7 @@ function Yc() {
|
|
|
4759
4761
|
p.push(p[p.length - 1] + O);
|
|
4760
4762
|
}
|
|
4761
4763
|
for (let N = 0; N < e.virtual.slidesBefore + e.virtual.slidesAfter; N += 1)
|
|
4762
|
-
n.slidesPerGroup === 1 && p.push(p[p.length - 1] + k),
|
|
4764
|
+
n.slidesPerGroup === 1 && p.push(p[p.length - 1] + k), E.push(E[E.length - 1] + k), e.virtualSize += k;
|
|
4763
4765
|
}
|
|
4764
4766
|
if (p.length === 0 && (p = [0]), T !== 0) {
|
|
4765
4767
|
const k = e.isHorizontal() && i ? "marginLeft" : e.getDirectionLabel("marginRight");
|
|
@@ -4785,22 +4787,22 @@ function Yc() {
|
|
|
4785
4787
|
const O = (b - k - N) / 2;
|
|
4786
4788
|
p.forEach((R, I) => {
|
|
4787
4789
|
p[I] = R - O;
|
|
4788
|
-
}),
|
|
4789
|
-
|
|
4790
|
+
}), E.forEach((R, I) => {
|
|
4791
|
+
E[I] = R + O;
|
|
4790
4792
|
});
|
|
4791
4793
|
}
|
|
4792
4794
|
}
|
|
4793
4795
|
if (Object.assign(e, {
|
|
4794
4796
|
slides: l,
|
|
4795
4797
|
snapGrid: p,
|
|
4796
|
-
slidesGrid:
|
|
4798
|
+
slidesGrid: E,
|
|
4797
4799
|
slidesSizesGrid: c
|
|
4798
4800
|
}), n.centeredSlides && n.cssMode && !n.centeredSlidesBounds) {
|
|
4799
4801
|
Ut(r, "--swiper-centered-offset-before", `${-p[0]}px`), Ut(r, "--swiper-centered-offset-after", `${e.size / 2 - c[c.length - 1] / 2}px`);
|
|
4800
4802
|
const k = -e.snapGrid[0], N = -e.slidesGrid[0];
|
|
4801
4803
|
e.snapGrid = e.snapGrid.map((O) => O + k), e.slidesGrid = e.slidesGrid.map((O) => O + N);
|
|
4802
4804
|
}
|
|
4803
|
-
if (f !== u && e.emit("slidesLengthChange"), p.length !== m && (e.params.watchOverflow && e.checkOverflow(), e.emit("snapGridLengthChange")),
|
|
4805
|
+
if (f !== u && e.emit("slidesLengthChange"), p.length !== m && (e.params.watchOverflow && e.checkOverflow(), e.emit("snapGridLengthChange")), E.length !== g && e.emit("slidesGridLengthChange"), n.watchSlidesProgress && e.updateSlidesOffset(), e.emit("slidesUpdated"), !o && !n.cssMode && (n.effect === "slide" || n.effect === "fade")) {
|
|
4804
4806
|
const k = `${n.containerModifierClass}backface-hidden`, N = e.el.classList.contains(k);
|
|
4805
4807
|
f <= n.maxBackfaceHiddenSlides ? N || e.el.classList.add(k) : N && e.el.classList.remove(k);
|
|
4806
4808
|
}
|
|
@@ -4854,8 +4856,8 @@ function Xc(e = this && this.translate || 0) {
|
|
|
4854
4856
|
const l = r[u];
|
|
4855
4857
|
let f = l.swiperSlideOffset;
|
|
4856
4858
|
n.cssMode && n.centeredSlides && (f -= r[0].swiperSlideOffset);
|
|
4857
|
-
const p = (s + (n.centeredSlides ? t.minTranslate() : 0) - f) / (l.swiperSlideSize + o),
|
|
4858
|
-
m && (t.visibleSlides.push(l), t.visibleSlidesIndexes.push(u)), Pi(l, m, n.slideVisibleClass), Pi(l, h, n.slideFullyVisibleClass), l.progress = a ? -p : p, l.originalProgress = a ? -
|
|
4859
|
+
const p = (s + (n.centeredSlides ? t.minTranslate() : 0) - f) / (l.swiperSlideSize + o), E = (s - i[0] + (n.centeredSlides ? t.minTranslate() : 0) - f) / (l.swiperSlideSize + o), c = -(s - f), y = c + t.slidesSizesGrid[u], h = c >= 0 && c <= t.size - t.slidesSizesGrid[u], m = c >= 0 && c < t.size - 1 || y > 1 && y <= t.size || c <= 0 && y >= t.size;
|
|
4860
|
+
m && (t.visibleSlides.push(l), t.visibleSlidesIndexes.push(u)), Pi(l, m, n.slideVisibleClass), Pi(l, h, n.slideFullyVisibleClass), l.progress = a ? -p : p, l.originalProgress = a ? -E : E;
|
|
4859
4861
|
}
|
|
4860
4862
|
}
|
|
4861
4863
|
function Kc(e) {
|
|
@@ -4880,8 +4882,8 @@ function Kc(e) {
|
|
|
4880
4882
|
i = f || a <= 0, s = p || a >= 1, f && (a = 0), p && (a = 1);
|
|
4881
4883
|
}
|
|
4882
4884
|
if (n.loop) {
|
|
4883
|
-
const f = t.getSlideIndexByData(0), p = t.getSlideIndexByData(t.slides.length - 1),
|
|
4884
|
-
h >=
|
|
4885
|
+
const f = t.getSlideIndexByData(0), p = t.getSlideIndexByData(t.slides.length - 1), E = t.slidesGrid[f], c = t.slidesGrid[p], y = t.slidesGrid[t.slidesGrid.length - 1], h = Math.abs(e);
|
|
4886
|
+
h >= E ? o = (h - E) / y : o = (h + y - c) / y, o > 1 && (o -= 1);
|
|
4885
4887
|
}
|
|
4886
4888
|
Object.assign(t, {
|
|
4887
4889
|
progress: a,
|
|
@@ -4990,26 +4992,26 @@ function Zc(e) {
|
|
|
4990
4992
|
return;
|
|
4991
4993
|
}
|
|
4992
4994
|
const p = t.grid && a.grid && a.grid.rows > 1;
|
|
4993
|
-
let
|
|
4995
|
+
let E;
|
|
4994
4996
|
if (t.virtual && a.virtual.enabled)
|
|
4995
|
-
a.loop ?
|
|
4997
|
+
a.loop ? E = f(u) : E = u;
|
|
4996
4998
|
else if (p) {
|
|
4997
4999
|
const c = t.slides.find((h) => h.column === u);
|
|
4998
5000
|
let y = parseInt(c.getAttribute("data-swiper-slide-index"), 10);
|
|
4999
|
-
Number.isNaN(y) && (y = Math.max(t.slides.indexOf(c), 0)),
|
|
5001
|
+
Number.isNaN(y) && (y = Math.max(t.slides.indexOf(c), 0)), E = Math.floor(y / a.grid.rows);
|
|
5000
5002
|
} else if (t.slides[u]) {
|
|
5001
5003
|
const c = t.slides[u].getAttribute("data-swiper-slide-index");
|
|
5002
|
-
c ?
|
|
5004
|
+
c ? E = parseInt(c, 10) : E = u;
|
|
5003
5005
|
} else
|
|
5004
|
-
|
|
5006
|
+
E = u;
|
|
5005
5007
|
Object.assign(t, {
|
|
5006
5008
|
previousSnapIndex: o,
|
|
5007
5009
|
snapIndex: l,
|
|
5008
5010
|
previousRealIndex: s,
|
|
5009
|
-
realIndex:
|
|
5011
|
+
realIndex: E,
|
|
5010
5012
|
previousIndex: i,
|
|
5011
5013
|
activeIndex: u
|
|
5012
|
-
}), t.initialized && Sa(t), t.emit("activeIndexChange"), t.emit("snapIndexChange"), (t.initialized || t.params.runCallbacksOnInit) && (s !==
|
|
5014
|
+
}), t.initialized && Sa(t), t.emit("activeIndexChange"), t.emit("snapIndexChange"), (t.initialized || t.params.runCallbacksOnInit) && (s !== E && t.emit("realIndexChange"), t.emit("slideChange"));
|
|
5013
5015
|
}
|
|
5014
5016
|
function ed(e, t) {
|
|
5015
5017
|
const n = this, r = n.params;
|
|
@@ -5105,8 +5107,8 @@ function sd(e = 0, t = this.params.speed, n = !0, r = !0, a) {
|
|
|
5105
5107
|
}
|
|
5106
5108
|
return !0;
|
|
5107
5109
|
}
|
|
5108
|
-
return t === 0 ? (i.setTransition(0), i.setTranslate(f), n && (i.emit("beforeTransitionStart", t, a), i.emit("transitionEnd"))) : (i.setTransition(t), i.setTranslate(f), n && (i.emit("beforeTransitionStart", t, a), i.emit("transitionStart")), i.animating || (i.animating = !0, i.onTranslateToWrapperTransitionEnd || (i.onTranslateToWrapperTransitionEnd = function(
|
|
5109
|
-
!i || i.destroyed ||
|
|
5110
|
+
return t === 0 ? (i.setTransition(0), i.setTranslate(f), n && (i.emit("beforeTransitionStart", t, a), i.emit("transitionEnd"))) : (i.setTransition(t), i.setTranslate(f), n && (i.emit("beforeTransitionStart", t, a), i.emit("transitionStart")), i.animating || (i.animating = !0, i.onTranslateToWrapperTransitionEnd || (i.onTranslateToWrapperTransitionEnd = function(E) {
|
|
5111
|
+
!i || i.destroyed || E.target === this && (i.wrapperEl.removeEventListener("transitionend", i.onTranslateToWrapperTransitionEnd), i.onTranslateToWrapperTransitionEnd = null, delete i.onTranslateToWrapperTransitionEnd, i.animating = !1, n && i.emit("transitionEnd"));
|
|
5110
5112
|
}), i.wrapperEl.addEventListener("transitionend", i.onTranslateToWrapperTransitionEnd))), !0;
|
|
5111
5113
|
}
|
|
5112
5114
|
var od = {
|
|
@@ -5171,7 +5173,7 @@ function fd(e = 0, t, n = !0, r, a) {
|
|
|
5171
5173
|
slidesGrid: l,
|
|
5172
5174
|
previousIndex: f,
|
|
5173
5175
|
activeIndex: p,
|
|
5174
|
-
rtlTranslate:
|
|
5176
|
+
rtlTranslate: E,
|
|
5175
5177
|
wrapperEl: c,
|
|
5176
5178
|
enabled: y
|
|
5177
5179
|
} = i;
|
|
@@ -5181,22 +5183,22 @@ function fd(e = 0, t, n = !0, r, a) {
|
|
|
5181
5183
|
const h = Math.min(i.params.slidesPerGroupSkip, s);
|
|
5182
5184
|
let m = h + Math.floor((s - h) / i.params.slidesPerGroup);
|
|
5183
5185
|
m >= u.length && (m = u.length - 1);
|
|
5184
|
-
const
|
|
5186
|
+
const g = -u[m];
|
|
5185
5187
|
if (o.normalizeSlideIndex)
|
|
5186
5188
|
for (let L = 0; L < l.length; L += 1) {
|
|
5187
|
-
const _ = -Math.floor(
|
|
5189
|
+
const _ = -Math.floor(g * 100), v = Math.floor(l[L] * 100), k = Math.floor(l[L + 1] * 100);
|
|
5188
5190
|
typeof l[L + 1] < "u" ? _ >= v && _ < k - (k - v) / 2 ? s = L : _ >= v && _ < k && (s = L + 1) : _ >= v && (s = L);
|
|
5189
5191
|
}
|
|
5190
|
-
if (i.initialized && s !== p && (!i.allowSlideNext && (
|
|
5192
|
+
if (i.initialized && s !== p && (!i.allowSlideNext && (E ? g > i.translate && g > i.minTranslate() : g < i.translate && g < i.minTranslate()) || !i.allowSlidePrev && g > i.translate && g > i.maxTranslate() && (p || 0) !== s))
|
|
5191
5193
|
return !1;
|
|
5192
|
-
s !== (f || 0) && n && i.emit("beforeSlideChangeStart"), i.updateProgress(
|
|
5194
|
+
s !== (f || 0) && n && i.emit("beforeSlideChangeStart"), i.updateProgress(g);
|
|
5193
5195
|
let b;
|
|
5194
5196
|
s > p ? b = "next" : s < p ? b = "prev" : b = "reset";
|
|
5195
5197
|
const T = i.virtual && i.params.virtual.enabled;
|
|
5196
|
-
if (!(T && a) && (
|
|
5197
|
-
return i.updateActiveIndex(s), o.autoHeight && i.updateAutoHeight(), i.updateSlidesClasses(), o.effect !== "slide" && i.setTranslate(
|
|
5198
|
+
if (!(T && a) && (E && -g === i.translate || !E && g === i.translate))
|
|
5199
|
+
return i.updateActiveIndex(s), o.autoHeight && i.updateAutoHeight(), i.updateSlidesClasses(), o.effect !== "slide" && i.setTranslate(g), b !== "reset" && (i.transitionStart(n, b), i.transitionEnd(n, b)), !1;
|
|
5198
5200
|
if (o.cssMode) {
|
|
5199
|
-
const L = i.isHorizontal(), _ =
|
|
5201
|
+
const L = i.isHorizontal(), _ = E ? g : -g;
|
|
5200
5202
|
if (t === 0)
|
|
5201
5203
|
T && (i.wrapperEl.style.scrollSnapType = "none", i._immediateVirtual = !0), T && !i._cssModeVirtualInitialSet && i.params.initialSlide > 0 ? (i._cssModeVirtualInitialSet = !0, requestAnimationFrame(() => {
|
|
5202
5204
|
c[L ? "scrollLeft" : "scrollTop"] = _;
|
|
@@ -5218,7 +5220,7 @@ function fd(e = 0, t, n = !0, r, a) {
|
|
|
5218
5220
|
return !0;
|
|
5219
5221
|
}
|
|
5220
5222
|
const A = go().isSafari;
|
|
5221
|
-
return T && !a && A && i.isElement && i.virtual.update(!1, !1, s), i.setTransition(t), i.setTranslate(
|
|
5223
|
+
return T && !a && A && i.isElement && i.virtual.update(!1, !1, s), i.setTransition(t), i.setTranslate(g), i.updateActiveIndex(s), i.updateSlidesClasses(), i.emit("beforeTransitionStart", t, r), i.transitionStart(n, b), t === 0 ? i.transitionEnd(n, b) : i.animating || (i.animating = !0, i.onSlideToWrapperTransitionEnd || (i.onSlideToWrapperTransitionEnd = function(_) {
|
|
5222
5224
|
!i || i.destroyed || _.target === this && (i.wrapperEl.removeEventListener("transitionend", i.onSlideToWrapperTransitionEnd), i.onSlideToWrapperTransitionEnd = null, delete i.onSlideToWrapperTransitionEnd, i.transitionEnd(n, b));
|
|
5223
5225
|
}), i.wrapperEl.addEventListener("transitionend", i.onSlideToWrapperTransitionEnd)), !0;
|
|
5224
5226
|
}
|
|
@@ -5243,12 +5245,12 @@ function pd(e = 0, t, n = !0, r) {
|
|
|
5243
5245
|
centeredSlides: l,
|
|
5244
5246
|
slidesOffsetBefore: f,
|
|
5245
5247
|
slidesOffsetAfter: p
|
|
5246
|
-
} = a.params,
|
|
5248
|
+
} = a.params, E = l || !!f || !!p;
|
|
5247
5249
|
let c = a.params.slidesPerView;
|
|
5248
|
-
c === "auto" ? c = a.slidesPerViewDynamic() : (c = Math.ceil(parseFloat(a.params.slidesPerView, 10)),
|
|
5250
|
+
c === "auto" ? c = a.slidesPerViewDynamic() : (c = Math.ceil(parseFloat(a.params.slidesPerView, 10)), E && c % 2 === 0 && (c = c + 1));
|
|
5249
5251
|
let y = u - o < c;
|
|
5250
|
-
if (
|
|
5251
|
-
const h =
|
|
5252
|
+
if (E && (y = y || o < Math.ceil(c / 2)), r && E && a.params.slidesPerView !== "auto" && !i && (y = !1), y) {
|
|
5253
|
+
const h = E ? o < a.activeIndex ? "prev" : "next" : o - a.activeIndex - 1 < a.params.slidesPerView ? "next" : "prev";
|
|
5252
5254
|
a.loopFix({
|
|
5253
5255
|
direction: h,
|
|
5254
5256
|
slideTo: !0,
|
|
@@ -5307,10 +5309,10 @@ function md(e, t = !0, n) {
|
|
|
5307
5309
|
}), r._clientLeft = r.wrapperEl.clientLeft;
|
|
5308
5310
|
}
|
|
5309
5311
|
const p = o ? r.translate : -r.translate;
|
|
5310
|
-
function
|
|
5312
|
+
function E(b) {
|
|
5311
5313
|
return b < 0 ? -Math.floor(Math.abs(b)) : Math.floor(b);
|
|
5312
5314
|
}
|
|
5313
|
-
const c =
|
|
5315
|
+
const c = E(p), y = i.map((b) => E(b)), h = a.freeMode && a.freeMode.enabled;
|
|
5314
5316
|
let m = i[y.indexOf(c) - 1];
|
|
5315
5317
|
if (typeof m > "u" && (a.cssMode || h)) {
|
|
5316
5318
|
let b;
|
|
@@ -5318,15 +5320,15 @@ function md(e, t = !0, n) {
|
|
|
5318
5320
|
c >= T && (b = C);
|
|
5319
5321
|
}), typeof b < "u" && (m = h ? i[b] : i[b > 0 ? b - 1 : b]);
|
|
5320
5322
|
}
|
|
5321
|
-
let
|
|
5322
|
-
if (typeof m < "u" && (
|
|
5323
|
+
let g = 0;
|
|
5324
|
+
if (typeof m < "u" && (g = s.indexOf(m), g < 0 && (g = r.activeIndex - 1), a.slidesPerView === "auto" && a.slidesPerGroup === 1 && a.slidesPerGroupAuto && (g = g - r.slidesPerViewDynamic("previous", !0) + 1, g = Math.max(g, 0))), a.rewind && r.isBeginning) {
|
|
5323
5325
|
const b = r.params.virtual && r.params.virtual.enabled && r.virtual ? r.virtual.slides.length - 1 : r.slides.length - 1;
|
|
5324
5326
|
return r.slideTo(b, e, t, n);
|
|
5325
5327
|
} else if (a.loop && r.activeIndex === 0 && a.cssMode)
|
|
5326
5328
|
return requestAnimationFrame(() => {
|
|
5327
|
-
r.slideTo(
|
|
5329
|
+
r.slideTo(g, e, t, n);
|
|
5328
5330
|
}), !0;
|
|
5329
|
-
return r.slideTo(
|
|
5331
|
+
return r.slideTo(g, e, t, n);
|
|
5330
5332
|
}
|
|
5331
5333
|
function gd(e, t = !0, n) {
|
|
5332
5334
|
const r = this;
|
|
@@ -5413,10 +5415,10 @@ function yd(e, t) {
|
|
|
5413
5415
|
i();
|
|
5414
5416
|
} else
|
|
5415
5417
|
i();
|
|
5416
|
-
const
|
|
5418
|
+
const E = r.centeredSlides || !!r.slidesOffsetBefore || !!r.slidesOffsetAfter;
|
|
5417
5419
|
n.loopFix({
|
|
5418
5420
|
slideRealIndex: e,
|
|
5419
|
-
direction:
|
|
5421
|
+
direction: E ? void 0 : "next",
|
|
5420
5422
|
initial: t
|
|
5421
5423
|
});
|
|
5422
5424
|
}
|
|
@@ -5437,13 +5439,13 @@ function xd({
|
|
|
5437
5439
|
slides: l,
|
|
5438
5440
|
allowSlidePrev: f,
|
|
5439
5441
|
allowSlideNext: p,
|
|
5440
|
-
slidesEl:
|
|
5442
|
+
slidesEl: E,
|
|
5441
5443
|
params: c
|
|
5442
5444
|
} = u, {
|
|
5443
5445
|
centeredSlides: y,
|
|
5444
5446
|
slidesOffsetBefore: h,
|
|
5445
5447
|
slidesOffsetAfter: m,
|
|
5446
|
-
initialSlide:
|
|
5448
|
+
initialSlide: g
|
|
5447
5449
|
} = c, b = y || !!h || !!m;
|
|
5448
5450
|
if (u.allowSlidePrev = !0, u.allowSlideNext = !0, u.virtual && c.virtual.enabled) {
|
|
5449
5451
|
t && (!b && u.snapIndex === 0 ? u.slideTo(u.virtual.slides.length, 0, !1, !0) : b && u.snapIndex < c.slidesPerView ? u.slideTo(u.virtual.slides.length + u.snapIndex, 0, !1, !0) : u.snapIndex === u.snapGrid.length - 1 && u.slideTo(u.virtual.slidesBefore, 0, !1, !0)), u.allowSlidePrev = f, u.allowSlideNext = p, u.emit("loopFix");
|
|
@@ -5456,8 +5458,8 @@ function xd({
|
|
|
5456
5458
|
S % C !== 0 && (S += C - S % C), S += c.loopAdditionalSlides, u.loopedSlides = S;
|
|
5457
5459
|
const A = u.grid && c.grid && c.grid.rows > 1;
|
|
5458
5460
|
l.length < T + S || u.params.effect === "cards" && l.length < T + S * 2 ? cr("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") : A && c.grid.fill === "row" && cr("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
|
|
5459
|
-
const L = [], _ = [], v = A ? Math.ceil(l.length / c.grid.rows) : l.length, k = i && v -
|
|
5460
|
-
let N = k ?
|
|
5461
|
+
const L = [], _ = [], v = A ? Math.ceil(l.length / c.grid.rows) : l.length, k = i && v - g < T && !b;
|
|
5462
|
+
let N = k ? g : u.activeIndex;
|
|
5461
5463
|
typeof a > "u" ? a = u.getSlideIndex(l.find((H) => H.classList.contains(c.slideActiveClass))) : N = a;
|
|
5462
5464
|
const O = n === "next" || !n, R = n === "prev" || !n;
|
|
5463
5465
|
let I = 0, x = 0;
|
|
@@ -5474,7 +5476,7 @@ function xd({
|
|
|
5474
5476
|
L.push(v - q - 1);
|
|
5475
5477
|
}
|
|
5476
5478
|
} else if ($ + T > v - S) {
|
|
5477
|
-
x = Math.max($ - (v - S * 2), C), k && (x = Math.max(x, T - v +
|
|
5479
|
+
x = Math.max($ - (v - S * 2), C), k && (x = Math.max(x, T - v + g + 1));
|
|
5478
5480
|
for (let H = 0; H < x; H += 1) {
|
|
5479
5481
|
const q = H - Math.floor(H / v) * v;
|
|
5480
5482
|
A ? l.forEach((w, V) => {
|
|
@@ -5485,9 +5487,9 @@ function xd({
|
|
|
5485
5487
|
if (u.__preventObserver__ = !0, requestAnimationFrame(() => {
|
|
5486
5488
|
u.__preventObserver__ = !1;
|
|
5487
5489
|
}), u.params.effect === "cards" && l.length < T + S * 2 && (_.includes(a) && _.splice(_.indexOf(a), 1), L.includes(a) && L.splice(L.indexOf(a), 1)), R && L.forEach((H) => {
|
|
5488
|
-
l[H].swiperLoopMoveDOM = !0,
|
|
5490
|
+
l[H].swiperLoopMoveDOM = !0, E.prepend(l[H]), l[H].swiperLoopMoveDOM = !1;
|
|
5489
5491
|
}), O && _.forEach((H) => {
|
|
5490
|
-
l[H].swiperLoopMoveDOM = !0,
|
|
5492
|
+
l[H].swiperLoopMoveDOM = !0, E.append(l[H]), l[H].swiperLoopMoveDOM = !1;
|
|
5491
5493
|
}), u.recalcSlides(), c.slidesPerView === "auto" ? u.updateSlides() : A && (L.length > 0 && R || _.length > 0 && O) && u.slides.forEach((H, q) => {
|
|
5492
5494
|
u.grid.updateSlide(q, H, u.slides);
|
|
5493
5495
|
}), c.watchSlidesProgress && u.updateSlidesOffset(), t) {
|
|
@@ -5609,8 +5611,8 @@ function Nd(e) {
|
|
|
5609
5611
|
if (i.touchEventsTarget === "wrapper" && !Rc(u, t.wrapperEl) || "which" in r && r.which === 3 || "button" in r && r.button > 0 || a.isTouched && a.isMoved) return;
|
|
5610
5612
|
const l = !!i.noSwipingClass && i.noSwipingClass !== "", f = r.composedPath ? r.composedPath() : r.path;
|
|
5611
5613
|
l && r.target && r.target.shadowRoot && f && (u = f[0]);
|
|
5612
|
-
const p = i.noSwipingSelector ? i.noSwipingSelector : `.${i.noSwipingClass}`,
|
|
5613
|
-
if (i.noSwiping && (
|
|
5614
|
+
const p = i.noSwipingSelector ? i.noSwipingSelector : `.${i.noSwipingClass}`, E = !!(r.target && r.target.shadowRoot);
|
|
5615
|
+
if (i.noSwiping && (E ? wd(p, u) : u.closest(p))) {
|
|
5614
5616
|
t.allowClick = !0;
|
|
5615
5617
|
return;
|
|
5616
5618
|
}
|
|
@@ -5683,11 +5685,11 @@ function kd(e) {
|
|
|
5683
5685
|
return;
|
|
5684
5686
|
}
|
|
5685
5687
|
r.allowTouchCallbacks && n.emit("touchMove", u), i.previousX = i.currentX, i.previousY = i.currentY, i.currentX = f, i.currentY = p;
|
|
5686
|
-
const
|
|
5687
|
-
if (n.params.threshold && Math.sqrt(
|
|
5688
|
+
const E = i.currentX - i.startX, c = i.currentY - i.startY;
|
|
5689
|
+
if (n.params.threshold && Math.sqrt(E ** 2 + c ** 2) < n.params.threshold) return;
|
|
5688
5690
|
if (typeof r.isScrolling > "u") {
|
|
5689
5691
|
let S;
|
|
5690
|
-
n.isHorizontal() && i.currentY === i.startY || n.isVertical() && i.currentX === i.startX ? r.isScrolling = !1 :
|
|
5692
|
+
n.isHorizontal() && i.currentY === i.startY || n.isVertical() && i.currentX === i.startX ? r.isScrolling = !1 : E * E + c * c >= 25 && (S = Math.atan2(Math.abs(c), Math.abs(E)) * 180 / Math.PI, r.isScrolling = n.isHorizontal() ? S > a.touchAngle : 90 - S > a.touchAngle);
|
|
5691
5693
|
}
|
|
5692
5694
|
if (r.isScrolling && n.emit("touchMoveOpposite", u), typeof r.startMoving > "u" && (i.currentX !== i.startX || i.currentY !== i.startY) && (r.startMoving = !0), r.isScrolling || u.type === "touchmove" && r.preventTouchMoveFromPointerMove) {
|
|
5693
5695
|
r.isTouched = !1;
|
|
@@ -5696,13 +5698,13 @@ function kd(e) {
|
|
|
5696
5698
|
if (!r.startMoving)
|
|
5697
5699
|
return;
|
|
5698
5700
|
n.allowClick = !1, !a.cssMode && u.cancelable && u.preventDefault(), a.touchMoveStopPropagation && !a.nested && u.stopPropagation();
|
|
5699
|
-
let y = n.isHorizontal() ?
|
|
5701
|
+
let y = n.isHorizontal() ? E : c, h = n.isHorizontal() ? i.currentX - i.previousX : i.currentY - i.previousY;
|
|
5700
5702
|
a.oneWayMovement && (y = Math.abs(y) * (s ? 1 : -1), h = Math.abs(h) * (s ? 1 : -1)), i.diff = y, y *= a.touchRatio, s && (y = -y, h = -h);
|
|
5701
5703
|
const m = n.touchesDirection;
|
|
5702
5704
|
n.swipeDirection = y > 0 ? "prev" : "next", n.touchesDirection = h > 0 ? "prev" : "next";
|
|
5703
|
-
const
|
|
5705
|
+
const g = n.params.loop && !a.cssMode, b = n.touchesDirection === "next" && n.allowSlideNext || n.touchesDirection === "prev" && n.allowSlidePrev;
|
|
5704
5706
|
if (!r.isMoved) {
|
|
5705
|
-
if (
|
|
5707
|
+
if (g && b && n.loopFix({
|
|
5706
5708
|
direction: n.swipeDirection
|
|
5707
5709
|
}), r.startTranslate = n.getTranslate(), n.setTransition(0), n.animating) {
|
|
5708
5710
|
const S = new window.CustomEvent("transitionend", {
|
|
@@ -5716,7 +5718,7 @@ function kd(e) {
|
|
|
5716
5718
|
}
|
|
5717
5719
|
r.allowMomentumBounce = !1, a.grabCursor && (n.allowSlideNext === !0 || n.allowSlidePrev === !0) && n.setGrabCursor(!0), n.emit("sliderFirstMove", u);
|
|
5718
5720
|
}
|
|
5719
|
-
if ((/* @__PURE__ */ new Date()).getTime(), a._loopSwapReset !== !1 && r.isMoved && r.allowThresholdMove && m !== n.touchesDirection &&
|
|
5721
|
+
if ((/* @__PURE__ */ new Date()).getTime(), a._loopSwapReset !== !1 && r.isMoved && r.allowThresholdMove && m !== n.touchesDirection && g && b && Math.abs(y) >= 1) {
|
|
5720
5722
|
Object.assign(i, {
|
|
5721
5723
|
startX: f,
|
|
5722
5724
|
startY: p,
|
|
@@ -5728,11 +5730,11 @@ function kd(e) {
|
|
|
5728
5730
|
}
|
|
5729
5731
|
n.emit("sliderMove", u), r.isMoved = !0, r.currentTranslate = y + r.startTranslate;
|
|
5730
5732
|
let T = !0, C = a.resistanceRatio;
|
|
5731
|
-
if (a.touchReleaseOnEdges && (C = 0), y > 0 ? (
|
|
5733
|
+
if (a.touchReleaseOnEdges && (C = 0), y > 0 ? (g && b && r.allowThresholdMove && r.currentTranslate > (a.centeredSlides ? n.minTranslate() - n.slidesSizesGrid[n.activeIndex + 1] - (a.slidesPerView !== "auto" && n.slides.length - a.slidesPerView >= 2 ? n.slidesSizesGrid[n.activeIndex + 1] + n.params.spaceBetween : 0) - n.params.spaceBetween : n.minTranslate()) && n.loopFix({
|
|
5732
5734
|
direction: "prev",
|
|
5733
5735
|
setTranslate: !0,
|
|
5734
5736
|
activeSlideIndex: 0
|
|
5735
|
-
}), r.currentTranslate > n.minTranslate() && (T = !1, a.resistance && (r.currentTranslate = n.minTranslate() - 1 + (-n.minTranslate() + r.startTranslate + y) ** C))) : y < 0 && (
|
|
5737
|
+
}), r.currentTranslate > n.minTranslate() && (T = !1, a.resistance && (r.currentTranslate = n.minTranslate() - 1 + (-n.minTranslate() + r.startTranslate + y) ** C))) : y < 0 && (g && b && r.allowThresholdMove && r.currentTranslate < (a.centeredSlides ? n.maxTranslate() + n.slidesSizesGrid[n.slidesSizesGrid.length - 1] + n.params.spaceBetween + (a.slidesPerView !== "auto" && n.slides.length - a.slidesPerView >= 2 ? n.slidesSizesGrid[n.slidesSizesGrid.length - 1] + n.params.spaceBetween : 0) : n.maxTranslate()) && n.loopFix({
|
|
5736
5738
|
direction: "next",
|
|
5737
5739
|
setTranslate: !0,
|
|
5738
5740
|
activeSlideIndex: n.slides.length - (a.slidesPerView === "auto" ? n.slidesPerViewDynamic() : Math.ceil(parseFloat(a.slidesPerView, 10)))
|
|
@@ -5775,10 +5777,10 @@ function Id(e) {
|
|
|
5775
5777
|
return;
|
|
5776
5778
|
}
|
|
5777
5779
|
s.grabCursor && n.isMoved && n.isTouched && (t.allowSlideNext === !0 || t.allowSlidePrev === !0) && t.setGrabCursor(!1);
|
|
5778
|
-
const p = lr(),
|
|
5780
|
+
const p = lr(), E = p - n.touchStartTime;
|
|
5779
5781
|
if (t.allowClick) {
|
|
5780
5782
|
const S = r.path || r.composedPath && r.composedPath();
|
|
5781
|
-
t.updateClickedSlide(S && S[0] || r.target, S), t.emit("tap click", r),
|
|
5783
|
+
t.updateClickedSlide(S && S[0] || r.target, S), t.emit("tap click", r), E < 300 && p - n.lastClickTime < 300 && t.emit("doubleTap doubleClick", r);
|
|
5782
5784
|
}
|
|
5783
5785
|
if (n.lastClickTime = lr(), co(() => {
|
|
5784
5786
|
t.destroyed || (t.allowClick = !0);
|
|
@@ -5802,21 +5804,21 @@ function Id(e) {
|
|
|
5802
5804
|
const A = S < s.slidesPerGroupSkip - 1 ? 1 : s.slidesPerGroup;
|
|
5803
5805
|
typeof l[S + A] < "u" ? (y || c >= l[S] && c < l[S + A]) && (h = S, m = l[S + A] - l[S]) : (y || c >= l[S]) && (h = S, m = l[l.length - 1] - l[l.length - 2]);
|
|
5804
5806
|
}
|
|
5805
|
-
let
|
|
5806
|
-
s.rewind && (t.isBeginning ? b = s.virtual && s.virtual.enabled && t.virtual ? t.virtual.slides.length - 1 : t.slides.length - 1 : t.isEnd && (
|
|
5807
|
+
let g = null, b = null;
|
|
5808
|
+
s.rewind && (t.isBeginning ? b = s.virtual && s.virtual.enabled && t.virtual ? t.virtual.slides.length - 1 : t.slides.length - 1 : t.isEnd && (g = 0));
|
|
5807
5809
|
const T = (c - l[h]) / m, C = h < s.slidesPerGroupSkip - 1 ? 1 : s.slidesPerGroup;
|
|
5808
|
-
if (
|
|
5810
|
+
if (E > s.longSwipesMs) {
|
|
5809
5811
|
if (!s.longSwipes) {
|
|
5810
5812
|
t.slideTo(t.activeIndex);
|
|
5811
5813
|
return;
|
|
5812
5814
|
}
|
|
5813
|
-
t.swipeDirection === "next" && (T >= s.longSwipesRatio ? t.slideTo(s.rewind && t.isEnd ?
|
|
5815
|
+
t.swipeDirection === "next" && (T >= s.longSwipesRatio ? t.slideTo(s.rewind && t.isEnd ? g : h + C) : t.slideTo(h)), t.swipeDirection === "prev" && (T > 1 - s.longSwipesRatio ? t.slideTo(h + C) : b !== null && T < 0 && Math.abs(T) > s.longSwipesRatio ? t.slideTo(b) : t.slideTo(h));
|
|
5814
5816
|
} else {
|
|
5815
5817
|
if (!s.shortSwipes) {
|
|
5816
5818
|
t.slideTo(t.activeIndex);
|
|
5817
5819
|
return;
|
|
5818
5820
|
}
|
|
5819
|
-
t.navigation && (r.target === t.navigation.nextEl || r.target === t.navigation.prevEl) ? r.target === t.navigation.nextEl ? t.slideTo(h + C) : t.slideTo(h) : (t.swipeDirection === "next" && t.slideTo(
|
|
5821
|
+
t.navigation && (r.target === t.navigation.nextEl || r.target === t.navigation.prevEl) ? r.target === t.navigation.nextEl ? t.slideTo(h + C) : t.slideTo(h) : (t.swipeDirection === "next" && t.slideTo(g !== null ? g : h + C), t.swipeDirection === "prev" && t.slideTo(b !== null ? b : h));
|
|
5820
5822
|
}
|
|
5821
5823
|
}
|
|
5822
5824
|
function Ri() {
|
|
@@ -5923,14 +5925,14 @@ function Fd() {
|
|
|
5923
5925
|
if (!i || i && Object.keys(i).length === 0) return;
|
|
5924
5926
|
const s = Pt(), o = r.breakpointsBase === "window" || !r.breakpointsBase ? r.breakpointsBase : "container", u = ["window", "container"].includes(r.breakpointsBase) || !r.breakpointsBase ? e.el : s.querySelector(r.breakpointsBase), l = e.getBreakpoint(i, o, u);
|
|
5925
5927
|
if (!l || e.currentBreakpoint === l) return;
|
|
5926
|
-
const p = (l in i ? i[l] : void 0) || e.originalParams,
|
|
5927
|
-
|
|
5928
|
+
const p = (l in i ? i[l] : void 0) || e.originalParams, E = Bi(e, r), c = Bi(e, p), y = e.params.grabCursor, h = p.grabCursor, m = r.enabled;
|
|
5929
|
+
E && !c ? (a.classList.remove(`${r.containerModifierClass}grid`, `${r.containerModifierClass}grid-column`), e.emitContainerClasses()) : !E && c && (a.classList.add(`${r.containerModifierClass}grid`), (p.grid.fill && p.grid.fill === "column" || !p.grid.fill && r.grid.fill === "column") && a.classList.add(`${r.containerModifierClass}grid-column`), e.emitContainerClasses()), y && !h ? e.unsetGrabCursor() : !y && h && e.setGrabCursor(), ["navigation", "pagination", "scrollbar"].forEach((A) => {
|
|
5928
5930
|
if (typeof p[A] > "u") return;
|
|
5929
5931
|
const L = r[A] && r[A].enabled, _ = p[A] && p[A].enabled;
|
|
5930
5932
|
L && !_ && e[A].disable(), !L && _ && e[A].enable();
|
|
5931
5933
|
});
|
|
5932
|
-
const
|
|
5933
|
-
|
|
5934
|
+
const g = p.direction && p.direction !== r.direction, b = r.loop && (p.slidesPerView !== r.slidesPerView || g), T = r.loop;
|
|
5935
|
+
g && n && e.changeDirection(), Xe(e.params, p);
|
|
5934
5936
|
const C = e.params.enabled, S = e.params.loop;
|
|
5935
5937
|
Object.assign(e, {
|
|
5936
5938
|
allowTouchMove: e.params.allowTouchMove,
|
|
@@ -6372,11 +6374,11 @@ let ja = class mt {
|
|
|
6372
6374
|
let f = 1;
|
|
6373
6375
|
if (typeof a.slidesPerView == "number") return a.slidesPerView;
|
|
6374
6376
|
if (a.centeredSlides) {
|
|
6375
|
-
let p = i[l] ? Math.ceil(i[l].swiperSlideSize) : 0,
|
|
6377
|
+
let p = i[l] ? Math.ceil(i[l].swiperSlideSize) : 0, E;
|
|
6376
6378
|
for (let c = l + 1; c < i.length; c += 1)
|
|
6377
|
-
i[c] && !
|
|
6379
|
+
i[c] && !E && (p += Math.ceil(i[c].swiperSlideSize), f += 1, p > u && (E = !0));
|
|
6378
6380
|
for (let c = l - 1; c >= 0; c -= 1)
|
|
6379
|
-
i[c] && !
|
|
6381
|
+
i[c] && !E && (p += i[c].swiperSlideSize, f += 1, p > u && (E = !0));
|
|
6380
6382
|
} else if (t === "current")
|
|
6381
6383
|
for (let p = l + 1; p < i.length; p += 1)
|
|
6382
6384
|
(n ? s[p] + o[p] - s[l] < u : s[p] - s[l] < u) && (f += 1);
|
|
@@ -6654,12 +6656,12 @@ function Xd({
|
|
|
6654
6656
|
params: l,
|
|
6655
6657
|
pagination: f,
|
|
6656
6658
|
navigation: p,
|
|
6657
|
-
scrollbar:
|
|
6659
|
+
scrollbar: E,
|
|
6658
6660
|
virtual: c,
|
|
6659
6661
|
thumbs: y
|
|
6660
6662
|
} = e;
|
|
6661
|
-
let h, m,
|
|
6662
|
-
r.includes("thumbs") && n.thumbs && n.thumbs.swiper && !n.thumbs.swiper.destroyed && l.thumbs && (!l.thumbs.swiper || l.thumbs.swiper.destroyed) && (h = !0), r.includes("controller") && n.controller && n.controller.control && l.controller && !l.controller.control && (m = !0), r.includes("pagination") && n.pagination && (n.pagination.el || o) && (l.pagination || l.pagination === !1) && f && !f.el && (
|
|
6663
|
+
let h, m, g, b, T, C, S, A;
|
|
6664
|
+
r.includes("thumbs") && n.thumbs && n.thumbs.swiper && !n.thumbs.swiper.destroyed && l.thumbs && (!l.thumbs.swiper || l.thumbs.swiper.destroyed) && (h = !0), r.includes("controller") && n.controller && n.controller.control && l.controller && !l.controller.control && (m = !0), r.includes("pagination") && n.pagination && (n.pagination.el || o) && (l.pagination || l.pagination === !1) && f && !f.el && (g = !0), r.includes("scrollbar") && n.scrollbar && (n.scrollbar.el || s) && (l.scrollbar || l.scrollbar === !1) && E && !E.el && (b = !0), r.includes("navigation") && n.navigation && (n.navigation.prevEl || i) && (n.navigation.nextEl || a) && (l.navigation || l.navigation === !1) && p && !p.prevEl && !p.nextEl && (T = !0);
|
|
6663
6665
|
const L = (_) => {
|
|
6664
6666
|
e[_] && (e[_].destroy(), _ === "navigation" ? (e.isElement && (e[_].prevEl.remove(), e[_].nextEl.remove()), l[_].prevEl = void 0, l[_].nextEl = void 0, e[_].prevEl = void 0, e[_].nextEl = void 0) : (e.isElement && e[_].el.remove(), l[_].el = void 0, e[_].el = void 0));
|
|
6665
6667
|
};
|
|
@@ -6670,7 +6672,7 @@ function Xd({
|
|
|
6670
6672
|
const v = n[_];
|
|
6671
6673
|
(v === !0 || v === !1) && (_ === "navigation" || _ === "pagination" || _ === "scrollbar") ? v === !1 && L(_) : l[_] = n[_];
|
|
6672
6674
|
}
|
|
6673
|
-
}), u.includes("controller") && !m && e.controller && e.controller.control && l.controller && l.controller.control && (e.controller.control = l.controller.control), r.includes("children") && t && c && l.virtual.enabled ? (c.slides = t, c.update(!0)) : r.includes("virtual") && c && l.virtual.enabled && (t && (c.slides = t), c.update(!0)), r.includes("children") && t && l.loop && (A = !0), h && y.init() && y.update(!0), m && (e.controller.control = l.controller.control),
|
|
6675
|
+
}), u.includes("controller") && !m && e.controller && e.controller.control && l.controller && l.controller.control && (e.controller.control = l.controller.control), r.includes("children") && t && c && l.virtual.enabled ? (c.slides = t, c.update(!0)) : r.includes("virtual") && c && l.virtual.enabled && (t && (c.slides = t), c.update(!0)), r.includes("children") && t && l.loop && (A = !0), h && y.init() && y.update(!0), m && (e.controller.control = l.controller.control), g && (e.isElement && (!o || typeof o == "string") && (o = document.createElement("div"), o.classList.add("swiper-pagination"), o.part.add("pagination"), e.el.appendChild(o)), o && (l.pagination.el = o), f.init(), f.render(), f.update()), b && (e.isElement && (!s || typeof s == "string") && (s = document.createElement("div"), s.classList.add("swiper-scrollbar"), s.part.add("scrollbar"), e.el.appendChild(s)), s && (l.scrollbar.el = s), E.init(), E.updateSize(), E.setTranslate()), T && (e.isElement && ((!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-button-next"), _n(a, e.navigation.arrowSvg), a.part.add("button-next"), e.el.appendChild(a)), (!i || typeof i == "string") && (i = document.createElement("div"), i.classList.add("swiper-button-prev"), _n(i, e.navigation.arrowSvg), i.part.add("button-prev"), e.el.appendChild(i))), a && (l.navigation.nextEl = a), i && (l.navigation.prevEl = i), p.init(), p.update()), r.includes("allowSlideNext") && (e.allowSlideNext = n.allowSlideNext), r.includes("allowSlidePrev") && (e.allowSlidePrev = n.allowSlidePrev), r.includes("direction") && e.changeDirection(n.direction, !1), (C || A) && e.loopDestroy(), (S || A) && e.loopCreate(), e.update();
|
|
6674
6676
|
}
|
|
6675
6677
|
function Kd(e = {}, t = !0) {
|
|
6676
6678
|
const n = {
|
|
@@ -6798,7 +6800,7 @@ const Fi = /* @__PURE__ */ so(null), nf = /* @__PURE__ */ so(null), vo = /* @__P
|
|
|
6798
6800
|
...i
|
|
6799
6801
|
} = {}, s) => {
|
|
6800
6802
|
let o = !1;
|
|
6801
|
-
const [u, l] = ie("swiper"), [f, p] = ie(null), [
|
|
6803
|
+
const [u, l] = ie("swiper"), [f, p] = ie(null), [E, c] = ie(!1), y = Z(!1), h = Z(null), m = Z(null), g = Z(null), b = Z(null), T = Z(null), C = Z(null), S = Z(null), A = Z(null), {
|
|
6802
6804
|
params: L,
|
|
6803
6805
|
passedParams: _,
|
|
6804
6806
|
rest: v,
|
|
@@ -6807,7 +6809,7 @@ const Fi = /* @__PURE__ */ so(null), nf = /* @__PURE__ */ so(null), vo = /* @__P
|
|
|
6807
6809
|
slides: N,
|
|
6808
6810
|
slots: O
|
|
6809
6811
|
} = ef(r), R = () => {
|
|
6810
|
-
c(!
|
|
6812
|
+
c(!E);
|
|
6811
6813
|
};
|
|
6812
6814
|
Object.assign(L.on, {
|
|
6813
6815
|
_containerClasses(H, q) {
|
|
@@ -6858,8 +6860,8 @@ const Fi = /* @__PURE__ */ so(null), nf = /* @__PURE__ */ so(null), vo = /* @__P
|
|
|
6858
6860
|
};
|
|
6859
6861
|
}, []), mn(() => {
|
|
6860
6862
|
x();
|
|
6861
|
-
const H = Jd(_,
|
|
6862
|
-
return
|
|
6863
|
+
const H = Jd(_, g.current, N, b.current, (q) => q.key);
|
|
6864
|
+
return g.current = _, b.current = N, H.length && m.current && !m.current.destroyed && Xd({
|
|
6863
6865
|
swiper: m.current,
|
|
6864
6866
|
slides: N,
|
|
6865
6867
|
passedParams: _,
|
|
@@ -6913,14 +6915,14 @@ const wo = /* @__PURE__ */ io(({
|
|
|
6913
6915
|
swiperSlideIndex: o,
|
|
6914
6916
|
...u
|
|
6915
6917
|
} = {}, l) => {
|
|
6916
|
-
const f = Z(null), [p,
|
|
6918
|
+
const f = Z(null), [p, E] = ie("swiper-slide"), [c, y] = ie(!1);
|
|
6917
6919
|
function h(T, C, S) {
|
|
6918
|
-
C === f.current &&
|
|
6920
|
+
C === f.current && E(S);
|
|
6919
6921
|
}
|
|
6920
6922
|
mn(() => {
|
|
6921
6923
|
if (typeof o < "u" && (f.current.swiperSlideIndex = o), l && (l.current = f.current), !(!f.current || !r)) {
|
|
6922
6924
|
if (r.destroyed) {
|
|
6923
|
-
p !== "swiper-slide" &&
|
|
6925
|
+
p !== "swiper-slide" && E("swiper-slide");
|
|
6924
6926
|
return;
|
|
6925
6927
|
}
|
|
6926
6928
|
return r.on("_slideClass", h), () => {
|
|
@@ -6928,14 +6930,14 @@ const wo = /* @__PURE__ */ io(({
|
|
|
6928
6930
|
};
|
|
6929
6931
|
}
|
|
6930
6932
|
}), mn(() => {
|
|
6931
|
-
r && f.current && !r.destroyed &&
|
|
6933
|
+
r && f.current && !r.destroyed && E(r.getSlideClasses(f.current));
|
|
6932
6934
|
}, [r]);
|
|
6933
6935
|
const m = {
|
|
6934
6936
|
isActive: p.indexOf("swiper-slide-active") >= 0,
|
|
6935
6937
|
isVisible: p.indexOf("swiper-slide-visible") >= 0,
|
|
6936
6938
|
isPrev: p.indexOf("swiper-slide-prev") >= 0,
|
|
6937
6939
|
isNext: p.indexOf("swiper-slide-next") >= 0
|
|
6938
|
-
},
|
|
6940
|
+
}, g = () => typeof t == "function" ? t(m) : t, b = () => {
|
|
6939
6941
|
y(!0);
|
|
6940
6942
|
};
|
|
6941
6943
|
return /* @__PURE__ */ Ne.createElement(e, pr({
|
|
@@ -6948,14 +6950,14 @@ const wo = /* @__PURE__ */ io(({
|
|
|
6948
6950
|
}, /* @__PURE__ */ Ne.createElement("div", {
|
|
6949
6951
|
className: "swiper-zoom-container",
|
|
6950
6952
|
"data-swiper-zoom": typeof a == "number" ? a : void 0
|
|
6951
|
-
},
|
|
6953
|
+
}, g(), i && !c && /* @__PURE__ */ Ne.createElement("div", {
|
|
6952
6954
|
className: "swiper-lazy-preloader",
|
|
6953
6955
|
ref: (T) => {
|
|
6954
6956
|
T && (T.lazyPreloaderManaged = !0);
|
|
6955
6957
|
}
|
|
6956
6958
|
}))), !a && /* @__PURE__ */ Ne.createElement(Fi.Provider, {
|
|
6957
6959
|
value: m
|
|
6958
|
-
},
|
|
6960
|
+
}, g(), i && !c && /* @__PURE__ */ Ne.createElement("div", {
|
|
6959
6961
|
className: "swiper-lazy-preloader",
|
|
6960
6962
|
ref: (T) => {
|
|
6961
6963
|
T && (T.lazyPreloaderManaged = !0);
|
|
@@ -7032,17 +7034,17 @@ function rf({
|
|
|
7032
7034
|
nextEl: y,
|
|
7033
7035
|
prevEl: h
|
|
7034
7036
|
}), y = Re(y), h = Re(h);
|
|
7035
|
-
const m = (
|
|
7036
|
-
if (
|
|
7037
|
-
if (c.addIcons &&
|
|
7037
|
+
const m = (g, b) => {
|
|
7038
|
+
if (g) {
|
|
7039
|
+
if (c.addIcons && g.matches(".swiper-button-next,.swiper-button-prev") && !g.querySelector("svg")) {
|
|
7038
7040
|
const T = document.createElement("div");
|
|
7039
|
-
_n(T, Hi),
|
|
7041
|
+
_n(T, Hi), g.appendChild(T.querySelector("svg")), T.remove();
|
|
7040
7042
|
}
|
|
7041
|
-
|
|
7043
|
+
g.addEventListener("click", b === "next" ? u : o);
|
|
7042
7044
|
}
|
|
7043
|
-
!e.enabled &&
|
|
7045
|
+
!e.enabled && g && g.classList.add(...c.lockClass.split(" "));
|
|
7044
7046
|
};
|
|
7045
|
-
y.forEach((
|
|
7047
|
+
y.forEach((g) => m(g, "next")), h.forEach((g) => m(g, "prev"));
|
|
7046
7048
|
}
|
|
7047
7049
|
function f() {
|
|
7048
7050
|
let {
|
|
@@ -7050,13 +7052,13 @@ function rf({
|
|
|
7050
7052
|
prevEl: y
|
|
7051
7053
|
} = e.navigation;
|
|
7052
7054
|
c = Re(c), y = Re(y);
|
|
7053
|
-
const h = (m,
|
|
7054
|
-
m.removeEventListener("click",
|
|
7055
|
+
const h = (m, g) => {
|
|
7056
|
+
m.removeEventListener("click", g === "next" ? u : o), m.classList.remove(...e.params.navigation.disabledClass.split(" "));
|
|
7055
7057
|
};
|
|
7056
7058
|
c.forEach((m) => h(m, "next")), y.forEach((m) => h(m, "prev"));
|
|
7057
7059
|
}
|
|
7058
7060
|
n("init", () => {
|
|
7059
|
-
e.params.navigation.enabled === !1 ?
|
|
7061
|
+
e.params.navigation.enabled === !1 ? E() : (l(), s());
|
|
7060
7062
|
}), n("toEdge fromEdge lock unlock", () => {
|
|
7061
7063
|
s();
|
|
7062
7064
|
}), n("destroy", () => {
|
|
@@ -7077,26 +7079,26 @@ function rf({
|
|
|
7077
7079
|
prevEl: m
|
|
7078
7080
|
} = e.navigation;
|
|
7079
7081
|
h = Re(h), m = Re(m);
|
|
7080
|
-
const
|
|
7081
|
-
let b = m.includes(
|
|
7082
|
+
const g = y.target;
|
|
7083
|
+
let b = m.includes(g) || h.includes(g);
|
|
7082
7084
|
if (e.isElement && !b) {
|
|
7083
7085
|
const T = y.path || y.composedPath && y.composedPath();
|
|
7084
7086
|
T && (b = T.find((C) => h.includes(C) || m.includes(C)));
|
|
7085
7087
|
}
|
|
7086
7088
|
if (e.params.navigation.hideOnClick && !b) {
|
|
7087
|
-
if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el ===
|
|
7089
|
+
if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === g || e.pagination.el.contains(g))) return;
|
|
7088
7090
|
let T;
|
|
7089
7091
|
h.length ? T = h[0].classList.contains(e.params.navigation.hiddenClass) : m.length && (T = m[0].classList.contains(e.params.navigation.hiddenClass)), r(T === !0 ? "navigationShow" : "navigationHide"), [...h, ...m].filter((C) => !!C).forEach((C) => C.classList.toggle(e.params.navigation.hiddenClass));
|
|
7090
7092
|
}
|
|
7091
7093
|
});
|
|
7092
7094
|
const p = () => {
|
|
7093
7095
|
e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), l(), s();
|
|
7094
|
-
},
|
|
7096
|
+
}, E = () => {
|
|
7095
7097
|
e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), f();
|
|
7096
7098
|
};
|
|
7097
7099
|
Object.assign(e.navigation, {
|
|
7098
7100
|
enable: p,
|
|
7099
|
-
disable:
|
|
7101
|
+
disable: E,
|
|
7100
7102
|
update: s,
|
|
7101
7103
|
init: l,
|
|
7102
7104
|
destroy: f
|
|
@@ -7127,8 +7129,8 @@ function af({
|
|
|
7127
7129
|
// 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
|
7128
7130
|
dynamicBullets: !1,
|
|
7129
7131
|
dynamicMainBullets: 1,
|
|
7130
|
-
formatFractionCurrent: (
|
|
7131
|
-
formatFractionTotal: (
|
|
7132
|
+
formatFractionCurrent: (g) => g,
|
|
7133
|
+
formatFractionTotal: (g) => g,
|
|
7132
7134
|
bulletClass: `${a}-bullet`,
|
|
7133
7135
|
bulletActiveClass: `${a}-bullet-active`,
|
|
7134
7136
|
modifierClass: `${a}-`,
|
|
@@ -7151,23 +7153,23 @@ function af({
|
|
|
7151
7153
|
function o() {
|
|
7152
7154
|
return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
|
|
7153
7155
|
}
|
|
7154
|
-
function u(
|
|
7156
|
+
function u(g, b) {
|
|
7155
7157
|
const {
|
|
7156
7158
|
bulletActiveClass: T
|
|
7157
7159
|
} = e.params.pagination;
|
|
7158
|
-
|
|
7160
|
+
g && (g = g[`${b === "prev" ? "previous" : "next"}ElementSibling`], g && (g.classList.add(`${T}-${b}`), g = g[`${b === "prev" ? "previous" : "next"}ElementSibling`], g && g.classList.add(`${T}-${b}-${b}`)));
|
|
7159
7161
|
}
|
|
7160
|
-
function l(
|
|
7161
|
-
if (
|
|
7162
|
+
function l(g, b, T) {
|
|
7163
|
+
if (g = g % T, b = b % T, b === g + 1)
|
|
7162
7164
|
return "next";
|
|
7163
|
-
if (b ===
|
|
7165
|
+
if (b === g - 1)
|
|
7164
7166
|
return "previous";
|
|
7165
7167
|
}
|
|
7166
|
-
function f(
|
|
7167
|
-
const b =
|
|
7168
|
+
function f(g) {
|
|
7169
|
+
const b = g.target.closest(sn(e.params.pagination.bulletClass));
|
|
7168
7170
|
if (!b)
|
|
7169
7171
|
return;
|
|
7170
|
-
|
|
7172
|
+
g.preventDefault();
|
|
7171
7173
|
const T = fr(b) * e.params.slidesPerGroup;
|
|
7172
7174
|
if (e.params.loop) {
|
|
7173
7175
|
if (e.realIndex === T) return;
|
|
@@ -7177,7 +7179,7 @@ function af({
|
|
|
7177
7179
|
e.slideTo(T);
|
|
7178
7180
|
}
|
|
7179
7181
|
function p() {
|
|
7180
|
-
const
|
|
7182
|
+
const g = e.rtl, b = e.params.pagination;
|
|
7181
7183
|
if (o()) return;
|
|
7182
7184
|
let T = e.pagination.el;
|
|
7183
7185
|
T = Re(T);
|
|
@@ -7208,7 +7210,7 @@ function af({
|
|
|
7208
7210
|
}
|
|
7209
7211
|
}
|
|
7210
7212
|
if (b.dynamicBullets) {
|
|
7211
|
-
const O = Math.min(_.length, b.dynamicMainBullets + 4), R = (i * O - i) / 2 - N * i, I =
|
|
7213
|
+
const O = Math.min(_.length, b.dynamicMainBullets + 4), R = (i * O - i) / 2 - N * i, I = g ? "right" : "left";
|
|
7212
7214
|
_.forEach((x) => {
|
|
7213
7215
|
x.style[e.isHorizontal() ? I : "top"] = `${R}px`;
|
|
7214
7216
|
});
|
|
@@ -7231,71 +7233,71 @@ function af({
|
|
|
7231
7233
|
b.type === "custom" && b.renderCustom ? (_n(_, b.renderCustom(e, C + 1, L)), v === 0 && r("paginationRender", _)) : (v === 0 && r("paginationRender", _), r("paginationUpdate", _)), e.params.watchOverflow && e.enabled && _.classList[e.isLocked ? "add" : "remove"](b.lockClass);
|
|
7232
7234
|
});
|
|
7233
7235
|
}
|
|
7234
|
-
function
|
|
7235
|
-
const
|
|
7236
|
+
function E() {
|
|
7237
|
+
const g = e.params.pagination;
|
|
7236
7238
|
if (o()) return;
|
|
7237
7239
|
const b = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
|
|
7238
7240
|
let T = e.pagination.el;
|
|
7239
7241
|
T = Re(T);
|
|
7240
7242
|
let C = "";
|
|
7241
|
-
if (
|
|
7243
|
+
if (g.type === "bullets") {
|
|
7242
7244
|
let S = e.params.loop ? Math.ceil(b / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
7243
7245
|
e.params.freeMode && e.params.freeMode.enabled && S > b && (S = b);
|
|
7244
7246
|
for (let A = 0; A < S; A += 1)
|
|
7245
|
-
|
|
7247
|
+
g.renderBullet ? C += g.renderBullet.call(e, A, g.bulletClass) : C += `<${g.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${g.bulletClass}"></${g.bulletElement}>`;
|
|
7246
7248
|
}
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
}),
|
|
7249
|
+
g.type === "fraction" && (g.renderFraction ? C = g.renderFraction.call(e, g.currentClass, g.totalClass) : C = `<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`), g.type === "progressbar" && (g.renderProgressbar ? C = g.renderProgressbar.call(e, g.progressbarFillClass) : C = `<span class="${g.progressbarFillClass}"></span>`), e.pagination.bullets = [], T.forEach((S) => {
|
|
7250
|
+
g.type !== "custom" && _n(S, C || ""), g.type === "bullets" && e.pagination.bullets.push(...S.querySelectorAll(sn(g.bulletClass)));
|
|
7251
|
+
}), g.type !== "custom" && r("paginationRender", T[0]);
|
|
7250
7252
|
}
|
|
7251
7253
|
function c() {
|
|
7252
7254
|
e.params.pagination = No(e, e.originalParams.pagination, e.params.pagination, {
|
|
7253
7255
|
el: "swiper-pagination"
|
|
7254
7256
|
});
|
|
7255
|
-
const
|
|
7256
|
-
if (!
|
|
7257
|
+
const g = e.params.pagination;
|
|
7258
|
+
if (!g.el) return;
|
|
7257
7259
|
let b;
|
|
7258
|
-
typeof
|
|
7260
|
+
typeof g.el == "string" && e.isElement && (b = e.el.querySelector(g.el)), !b && typeof g.el == "string" && (b = [...document.querySelectorAll(g.el)]), b || (b = g.el), !(!b || b.length === 0) && (e.params.uniqueNavElements && typeof g.el == "string" && Array.isArray(b) && b.length > 1 && (b = [...e.el.querySelectorAll(g.el)], b.length > 1 && (b = b.find((T) => po(T, ".swiper")[0] === e.el))), Array.isArray(b) && b.length === 1 && (b = b[0]), Object.assign(e.pagination, {
|
|
7259
7261
|
el: b
|
|
7260
7262
|
}), b = Re(b), b.forEach((T) => {
|
|
7261
|
-
|
|
7263
|
+
g.type === "bullets" && g.clickable && T.classList.add(...(g.clickableClass || "").split(" ")), T.classList.add(g.modifierClass + g.type), T.classList.add(e.isHorizontal() ? g.horizontalClass : g.verticalClass), g.type === "bullets" && g.dynamicBullets && (T.classList.add(`${g.modifierClass}${g.type}-dynamic`), s = 0, g.dynamicMainBullets < 1 && (g.dynamicMainBullets = 1)), g.type === "progressbar" && g.progressbarOpposite && T.classList.add(g.progressbarOppositeClass), g.clickable && T.addEventListener("click", f), e.enabled || T.classList.add(g.lockClass);
|
|
7262
7264
|
}));
|
|
7263
7265
|
}
|
|
7264
7266
|
function y() {
|
|
7265
|
-
const
|
|
7267
|
+
const g = e.params.pagination;
|
|
7266
7268
|
if (o()) return;
|
|
7267
7269
|
let b = e.pagination.el;
|
|
7268
7270
|
b && (b = Re(b), b.forEach((T) => {
|
|
7269
|
-
T.classList.remove(
|
|
7270
|
-
})), e.pagination.bullets && e.pagination.bullets.forEach((T) => T.classList.remove(...
|
|
7271
|
+
T.classList.remove(g.hiddenClass), T.classList.remove(g.modifierClass + g.type), T.classList.remove(e.isHorizontal() ? g.horizontalClass : g.verticalClass), g.clickable && (T.classList.remove(...(g.clickableClass || "").split(" ")), T.removeEventListener("click", f));
|
|
7272
|
+
})), e.pagination.bullets && e.pagination.bullets.forEach((T) => T.classList.remove(...g.bulletActiveClass.split(" ")));
|
|
7271
7273
|
}
|
|
7272
7274
|
n("changeDirection", () => {
|
|
7273
7275
|
if (!e.pagination || !e.pagination.el) return;
|
|
7274
|
-
const
|
|
7276
|
+
const g = e.params.pagination;
|
|
7275
7277
|
let {
|
|
7276
7278
|
el: b
|
|
7277
7279
|
} = e.pagination;
|
|
7278
7280
|
b = Re(b), b.forEach((T) => {
|
|
7279
|
-
T.classList.remove(
|
|
7281
|
+
T.classList.remove(g.horizontalClass, g.verticalClass), T.classList.add(e.isHorizontal() ? g.horizontalClass : g.verticalClass);
|
|
7280
7282
|
});
|
|
7281
7283
|
}), n("init", () => {
|
|
7282
|
-
e.params.pagination.enabled === !1 ? m() : (c(),
|
|
7284
|
+
e.params.pagination.enabled === !1 ? m() : (c(), E(), p());
|
|
7283
7285
|
}), n("activeIndexChange", () => {
|
|
7284
7286
|
typeof e.snapIndex > "u" && p();
|
|
7285
7287
|
}), n("snapIndexChange", () => {
|
|
7286
7288
|
p();
|
|
7287
7289
|
}), n("snapGridLengthChange", () => {
|
|
7288
|
-
|
|
7290
|
+
E(), p();
|
|
7289
7291
|
}), n("destroy", () => {
|
|
7290
7292
|
y();
|
|
7291
7293
|
}), n("enable disable", () => {
|
|
7292
7294
|
let {
|
|
7293
|
-
el:
|
|
7295
|
+
el: g
|
|
7294
7296
|
} = e.pagination;
|
|
7295
|
-
|
|
7297
|
+
g && (g = Re(g), g.forEach((b) => b.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
|
|
7296
7298
|
}), n("lock unlock", () => {
|
|
7297
7299
|
p();
|
|
7298
|
-
}), n("click", (
|
|
7300
|
+
}), n("click", (g, b) => {
|
|
7299
7301
|
const T = b.target, C = Re(e.pagination.el);
|
|
7300
7302
|
if (e.params.pagination.el && e.params.pagination.hideOnClick && C && C.length > 0 && !T.classList.contains(e.params.pagination.bulletClass)) {
|
|
7301
7303
|
if (e.navigation && (e.navigation.nextEl && T === e.navigation.nextEl || e.navigation.prevEl && T === e.navigation.prevEl)) return;
|
|
@@ -7306,20 +7308,20 @@ function af({
|
|
|
7306
7308
|
const h = () => {
|
|
7307
7309
|
e.el.classList.remove(e.params.pagination.paginationDisabledClass);
|
|
7308
7310
|
let {
|
|
7309
|
-
el:
|
|
7311
|
+
el: g
|
|
7310
7312
|
} = e.pagination;
|
|
7311
|
-
|
|
7313
|
+
g && (g = Re(g), g.forEach((b) => b.classList.remove(e.params.pagination.paginationDisabledClass))), c(), E(), p();
|
|
7312
7314
|
}, m = () => {
|
|
7313
7315
|
e.el.classList.add(e.params.pagination.paginationDisabledClass);
|
|
7314
7316
|
let {
|
|
7315
|
-
el:
|
|
7317
|
+
el: g
|
|
7316
7318
|
} = e.pagination;
|
|
7317
|
-
|
|
7319
|
+
g && (g = Re(g), g.forEach((b) => b.classList.add(e.params.pagination.paginationDisabledClass))), y();
|
|
7318
7320
|
};
|
|
7319
7321
|
Object.assign(e.pagination, {
|
|
7320
7322
|
enable: h,
|
|
7321
7323
|
disable: m,
|
|
7322
|
-
render:
|
|
7324
|
+
render: E,
|
|
7323
7325
|
update: p,
|
|
7324
7326
|
init: c,
|
|
7325
7327
|
destroy: y
|
|
@@ -8530,12 +8532,12 @@ function Tf() {
|
|
|
8530
8532
|
if (Yi) return Xr;
|
|
8531
8533
|
Yi = 1;
|
|
8532
8534
|
var e = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, t = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, a = /^:\s*/, i = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, s = /^[;\s]*/, o = /^\s+|\s+$/g, u = `
|
|
8533
|
-
`, l = "/", f = "*", p = "",
|
|
8534
|
-
function y(m,
|
|
8535
|
+
`, l = "/", f = "*", p = "", E = "comment", c = "declaration";
|
|
8536
|
+
function y(m, g) {
|
|
8535
8537
|
if (typeof m != "string")
|
|
8536
8538
|
throw new TypeError("First argument must be a string");
|
|
8537
8539
|
if (!m) return [];
|
|
8538
|
-
|
|
8540
|
+
g = g || {};
|
|
8539
8541
|
var b = 1, T = 1;
|
|
8540
8542
|
function C(I) {
|
|
8541
8543
|
var x = I.match(t);
|
|
@@ -8550,14 +8552,14 @@ function Tf() {
|
|
|
8550
8552
|
};
|
|
8551
8553
|
}
|
|
8552
8554
|
function A(I) {
|
|
8553
|
-
this.start = I, this.end = { line: b, column: T }, this.source =
|
|
8555
|
+
this.start = I, this.end = { line: b, column: T }, this.source = g.source;
|
|
8554
8556
|
}
|
|
8555
8557
|
A.prototype.content = m;
|
|
8556
8558
|
function L(I) {
|
|
8557
8559
|
var x = new Error(
|
|
8558
|
-
|
|
8560
|
+
g.source + ":" + b + ":" + T + ": " + I
|
|
8559
8561
|
);
|
|
8560
|
-
if (x.reason = I, x.filename =
|
|
8562
|
+
if (x.reason = I, x.filename = g.source, x.line = b, x.column = T, x.source = m, !g.silent) throw x;
|
|
8561
8563
|
}
|
|
8562
8564
|
function _(I) {
|
|
8563
8565
|
var x = I.exec(m);
|
|
@@ -8584,7 +8586,7 @@ function Tf() {
|
|
|
8584
8586
|
return L("End of comment missing");
|
|
8585
8587
|
var F = m.slice(2, x - 2);
|
|
8586
8588
|
return T += 2, C(F), m = m.slice(x), T += 2, I({
|
|
8587
|
-
type:
|
|
8589
|
+
type: E,
|
|
8588
8590
|
comment: F
|
|
8589
8591
|
});
|
|
8590
8592
|
}
|
|
@@ -9302,7 +9304,7 @@ function rp(e) {
|
|
|
9302
9304
|
A = t.events[S][1].end;
|
|
9303
9305
|
break;
|
|
9304
9306
|
}
|
|
9305
|
-
|
|
9307
|
+
g(r);
|
|
9306
9308
|
let L = C;
|
|
9307
9309
|
for (; L < t.events.length; )
|
|
9308
9310
|
t.events[L][1].end = {
|
|
@@ -9315,7 +9317,7 @@ function rp(e) {
|
|
|
9315
9317
|
function l(T) {
|
|
9316
9318
|
if (r === n.length) {
|
|
9317
9319
|
if (!a)
|
|
9318
|
-
return
|
|
9320
|
+
return E(T);
|
|
9319
9321
|
if (a.currentConstruct && a.currentConstruct.concrete)
|
|
9320
9322
|
return y(T);
|
|
9321
9323
|
t.interrupt = !!(a.currentConstruct && !a._gfmTableDynamicInterruptHack);
|
|
@@ -9323,20 +9325,20 @@ function rp(e) {
|
|
|
9323
9325
|
return t.containerState = {}, e.check(ts, f, p)(T);
|
|
9324
9326
|
}
|
|
9325
9327
|
function f(T) {
|
|
9326
|
-
return a && b(),
|
|
9328
|
+
return a && b(), g(r), E(T);
|
|
9327
9329
|
}
|
|
9328
9330
|
function p(T) {
|
|
9329
9331
|
return t.parser.lazy[t.now().line] = r !== n.length, s = t.now().offset, y(T);
|
|
9330
9332
|
}
|
|
9331
|
-
function
|
|
9333
|
+
function E(T) {
|
|
9332
9334
|
return t.containerState = {}, e.attempt(ts, c, y)(T);
|
|
9333
9335
|
}
|
|
9334
9336
|
function c(T) {
|
|
9335
|
-
return r++, n.push([t.currentConstruct, t.containerState]),
|
|
9337
|
+
return r++, n.push([t.currentConstruct, t.containerState]), E(T);
|
|
9336
9338
|
}
|
|
9337
9339
|
function y(T) {
|
|
9338
9340
|
if (T === null) {
|
|
9339
|
-
a && b(),
|
|
9341
|
+
a && b(), g(0), e.consume(T);
|
|
9340
9342
|
return;
|
|
9341
9343
|
}
|
|
9342
9344
|
return a = a || t.parser.flow(t.now()), e.enter("chunkFlow", {
|
|
@@ -9347,7 +9349,7 @@ function rp(e) {
|
|
|
9347
9349
|
}
|
|
9348
9350
|
function h(T) {
|
|
9349
9351
|
if (T === null) {
|
|
9350
|
-
m(e.exit("chunkFlow"), !0),
|
|
9352
|
+
m(e.exit("chunkFlow"), !0), g(0), e.consume(T);
|
|
9351
9353
|
return;
|
|
9352
9354
|
}
|
|
9353
9355
|
return te(T) ? (e.consume(T), m(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, o) : (e.consume(T), h);
|
|
@@ -9374,14 +9376,14 @@ function rp(e) {
|
|
|
9374
9376
|
}
|
|
9375
9377
|
v = !0;
|
|
9376
9378
|
}
|
|
9377
|
-
for (
|
|
9379
|
+
for (g(r), A = L; A < t.events.length; )
|
|
9378
9380
|
t.events[A][1].end = {
|
|
9379
9381
|
...k
|
|
9380
9382
|
}, A++;
|
|
9381
9383
|
dt(t.events, _ + 1, 0, t.events.slice(L)), t.events.length = A;
|
|
9382
9384
|
}
|
|
9383
9385
|
}
|
|
9384
|
-
function
|
|
9386
|
+
function g(T) {
|
|
9385
9387
|
let C = n.length;
|
|
9386
9388
|
for (; C-- > T; ) {
|
|
9387
9389
|
const S = n[C];
|
|
@@ -9428,10 +9430,10 @@ function ip(e, t) {
|
|
|
9428
9430
|
u = e[r][1].end.offset - e[r][1].start.offset > 1 && e[n][1].end.offset - e[n][1].start.offset > 1 ? 2 : 1;
|
|
9429
9431
|
const p = {
|
|
9430
9432
|
...e[r][1].end
|
|
9431
|
-
},
|
|
9433
|
+
}, E = {
|
|
9432
9434
|
...e[n][1].start
|
|
9433
9435
|
};
|
|
9434
|
-
rs(p, -u), rs(
|
|
9436
|
+
rs(p, -u), rs(E, u), s = {
|
|
9435
9437
|
type: u > 1 ? "strongSequence" : "emphasisSequence",
|
|
9436
9438
|
start: p,
|
|
9437
9439
|
end: {
|
|
@@ -9442,7 +9444,7 @@ function ip(e, t) {
|
|
|
9442
9444
|
start: {
|
|
9443
9445
|
...e[n][1].start
|
|
9444
9446
|
},
|
|
9445
|
-
end:
|
|
9447
|
+
end: E
|
|
9446
9448
|
}, i = {
|
|
9447
9449
|
type: u > 1 ? "strongText" : "emphasisText",
|
|
9448
9450
|
start: {
|
|
@@ -9481,8 +9483,8 @@ function sp(e, t) {
|
|
|
9481
9483
|
function o(u) {
|
|
9482
9484
|
if (u === i)
|
|
9483
9485
|
return e.consume(u), o;
|
|
9484
|
-
const l = e.exit("attentionSequence"), f = ns(u), p = !f || f === 2 && a || n.includes(u),
|
|
9485
|
-
return l._open = !!(i === 42 ? p : p && (a || !
|
|
9486
|
+
const l = e.exit("attentionSequence"), f = ns(u), p = !f || f === 2 && a || n.includes(u), E = !a || a === 2 && f || n.includes(r);
|
|
9487
|
+
return l._open = !!(i === 42 ? p : p && (a || !E)), l._close = !!(i === 42 ? E : E && (f || !p)), t(u);
|
|
9486
9488
|
}
|
|
9487
9489
|
}
|
|
9488
9490
|
function rs(e, t) {
|
|
@@ -9517,11 +9519,11 @@ function up(e, t, n) {
|
|
|
9517
9519
|
return Ke(c) ? p(c) : n(c);
|
|
9518
9520
|
}
|
|
9519
9521
|
function p(c) {
|
|
9520
|
-
return c === 46 ? (e.consume(c), r = 0, f) : c === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(c), e.exit("autolinkMarker"), e.exit("autolink"), t) :
|
|
9522
|
+
return c === 46 ? (e.consume(c), r = 0, f) : c === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(c), e.exit("autolinkMarker"), e.exit("autolink"), t) : E(c);
|
|
9521
9523
|
}
|
|
9522
|
-
function
|
|
9524
|
+
function E(c) {
|
|
9523
9525
|
if ((c === 45 || Ke(c)) && r++ < 63) {
|
|
9524
|
-
const y = c === 45 ?
|
|
9526
|
+
const y = c === 45 ? E : p;
|
|
9525
9527
|
return e.consume(c), y;
|
|
9526
9528
|
}
|
|
9527
9529
|
return n(c);
|
|
@@ -9609,8 +9611,8 @@ function hp(e, t, n) {
|
|
|
9609
9611
|
}
|
|
9610
9612
|
function f(p) {
|
|
9611
9613
|
if (p === 59 && a) {
|
|
9612
|
-
const
|
|
9613
|
-
return s === Ke && !Nn(r.sliceSerialize(
|
|
9614
|
+
const E = e.exit("characterReferenceValue");
|
|
9615
|
+
return s === Ke && !Nn(r.sliceSerialize(E)) ? n(p) : (e.enter("characterReferenceMarker"), e.consume(p), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
|
|
9614
9616
|
}
|
|
9615
9617
|
return s(p) && a++ < i ? (e.consume(p), f) : n(p);
|
|
9616
9618
|
}
|
|
@@ -9643,10 +9645,10 @@ function mp(e, t, n) {
|
|
|
9643
9645
|
function p(A) {
|
|
9644
9646
|
return A === null || te(A) ? (e.exit("codeFencedFence"), r.interrupt ? t(A) : e.check(as, h, C)(A)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
9645
9647
|
contentType: "string"
|
|
9646
|
-
}),
|
|
9648
|
+
}), E(A));
|
|
9647
9649
|
}
|
|
9648
|
-
function
|
|
9649
|
-
return A === null || te(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), p(A)) : be(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Te(e, c, "whitespace")(A)) : A === 96 && A === o ? n(A) : (e.consume(A),
|
|
9650
|
+
function E(A) {
|
|
9651
|
+
return A === null || te(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), p(A)) : be(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Te(e, c, "whitespace")(A)) : A === 96 && A === o ? n(A) : (e.consume(A), E);
|
|
9650
9652
|
}
|
|
9651
9653
|
function c(A) {
|
|
9652
9654
|
return A === null || te(A) ? p(A) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
|
|
@@ -9660,9 +9662,9 @@ function mp(e, t, n) {
|
|
|
9660
9662
|
return e.attempt(a, C, m)(A);
|
|
9661
9663
|
}
|
|
9662
9664
|
function m(A) {
|
|
9663
|
-
return e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"),
|
|
9665
|
+
return e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), g;
|
|
9664
9666
|
}
|
|
9665
|
-
function
|
|
9667
|
+
function g(A) {
|
|
9666
9668
|
return i > 0 && be(A) ? Te(e, b, "linePrefix", i + 1)(A) : b(A);
|
|
9667
9669
|
}
|
|
9668
9670
|
function b(A) {
|
|
@@ -9986,22 +9988,22 @@ function _p(e, t) {
|
|
|
9986
9988
|
let s = n._tokenizer;
|
|
9987
9989
|
s || (s = r.parser[n.contentType](n.start), n._contentTypeTextTrailing && (s._contentTypeTextTrailing = !0));
|
|
9988
9990
|
const o = s.events, u = [], l = {};
|
|
9989
|
-
let f, p,
|
|
9991
|
+
let f, p, E = -1, c = n, y = 0, h = 0;
|
|
9990
9992
|
const m = [h];
|
|
9991
9993
|
for (; c; ) {
|
|
9992
9994
|
for (; e.get(++a)[1] !== c; )
|
|
9993
9995
|
;
|
|
9994
9996
|
i.push(a), c._tokenizer || (f = r.sliceStream(c), c.next || f.push(null), p && s.defineSkip(c.start), c._isInFirstContentOfListItem && (s._gfmTasklistFirstContentOfListItem = !0), s.write(f), c._isInFirstContentOfListItem && (s._gfmTasklistFirstContentOfListItem = void 0)), p = c, c = c.next;
|
|
9995
9997
|
}
|
|
9996
|
-
for (c = n; ++
|
|
9998
|
+
for (c = n; ++E < o.length; )
|
|
9997
9999
|
// Find a void token that includes a break.
|
|
9998
|
-
o[
|
|
9999
|
-
for (s.events = [], c ? (c._tokenizer = void 0, c.previous = void 0) : m.pop(),
|
|
10000
|
-
const
|
|
10001
|
-
u.push([b, b +
|
|
10000
|
+
o[E][0] === "exit" && o[E - 1][0] === "enter" && o[E][1].type === o[E - 1][1].type && o[E][1].start.line !== o[E][1].end.line && (h = E + 1, m.push(h), c._tokenizer = void 0, c.previous = void 0, c = c.next);
|
|
10001
|
+
for (s.events = [], c ? (c._tokenizer = void 0, c.previous = void 0) : m.pop(), E = m.length; E--; ) {
|
|
10002
|
+
const g = o.slice(m[E], m[E + 1]), b = i.pop();
|
|
10003
|
+
u.push([b, b + g.length - 1]), e.splice(b, 2, g);
|
|
10002
10004
|
}
|
|
10003
|
-
for (u.reverse(),
|
|
10004
|
-
l[y + u[
|
|
10005
|
+
for (u.reverse(), E = -1; ++E < u.length; )
|
|
10006
|
+
l[y + u[E][0]] = y + u[E][1], y += u[E][1] - u[E][0] - 1;
|
|
10005
10007
|
return l;
|
|
10006
10008
|
}
|
|
10007
10009
|
const vp = {
|
|
@@ -10052,27 +10054,27 @@ function Ko(e, t, n, r, a, i, s, o, u) {
|
|
|
10052
10054
|
const l = u || Number.POSITIVE_INFINITY;
|
|
10053
10055
|
let f = 0;
|
|
10054
10056
|
return p;
|
|
10055
|
-
function p(
|
|
10056
|
-
return
|
|
10057
|
+
function p(g) {
|
|
10058
|
+
return g === 60 ? (e.enter(r), e.enter(a), e.enter(i), e.consume(g), e.exit(i), E) : g === null || g === 32 || g === 41 || ka(g) ? n(g) : (e.enter(r), e.enter(s), e.enter(o), e.enter("chunkString", {
|
|
10057
10059
|
contentType: "string"
|
|
10058
|
-
}), h(
|
|
10060
|
+
}), h(g));
|
|
10059
10061
|
}
|
|
10060
|
-
function g
|
|
10061
|
-
return
|
|
10062
|
+
function E(g) {
|
|
10063
|
+
return g === 62 ? (e.enter(i), e.consume(g), e.exit(i), e.exit(a), e.exit(r), t) : (e.enter(o), e.enter("chunkString", {
|
|
10062
10064
|
contentType: "string"
|
|
10063
|
-
}), c(
|
|
10065
|
+
}), c(g));
|
|
10064
10066
|
}
|
|
10065
|
-
function c(
|
|
10066
|
-
return
|
|
10067
|
+
function c(g) {
|
|
10068
|
+
return g === 62 ? (e.exit("chunkString"), e.exit(o), E(g)) : g === null || g === 60 || te(g) ? n(g) : (e.consume(g), g === 92 ? y : c);
|
|
10067
10069
|
}
|
|
10068
|
-
function y(
|
|
10069
|
-
return
|
|
10070
|
+
function y(g) {
|
|
10071
|
+
return g === 60 || g === 62 || g === 92 ? (e.consume(g), c) : c(g);
|
|
10070
10072
|
}
|
|
10071
|
-
function h(
|
|
10072
|
-
return !f && (
|
|
10073
|
+
function h(g) {
|
|
10074
|
+
return !f && (g === null || g === 41 || Le(g)) ? (e.exit("chunkString"), e.exit(o), e.exit(s), e.exit(r), t(g)) : f < l && g === 40 ? (e.consume(g), f++, h) : g === 41 ? (e.consume(g), f--, h) : g === null || g === 32 || g === 40 || ka(g) ? n(g) : (e.consume(g), g === 92 ? m : h);
|
|
10073
10075
|
}
|
|
10074
|
-
function m(
|
|
10075
|
-
return
|
|
10076
|
+
function m(g) {
|
|
10077
|
+
return g === 40 || g === 41 || g === 92 ? (e.consume(g), h) : h(g);
|
|
10076
10078
|
}
|
|
10077
10079
|
}
|
|
10078
10080
|
function Qo(e, t, n, r, a, i) {
|
|
@@ -10093,31 +10095,31 @@ function Qo(e, t, n, r, a, i) {
|
|
|
10093
10095
|
}), p(c));
|
|
10094
10096
|
}
|
|
10095
10097
|
function p(c) {
|
|
10096
|
-
return c === null || c === 91 || c === 93 || te(c) || o++ > 999 ? (e.exit("chunkString"), f(c)) : (e.consume(c), u || (u = !be(c)), c === 92 ?
|
|
10098
|
+
return c === null || c === 91 || c === 93 || te(c) || o++ > 999 ? (e.exit("chunkString"), f(c)) : (e.consume(c), u || (u = !be(c)), c === 92 ? E : p);
|
|
10097
10099
|
}
|
|
10098
|
-
function
|
|
10100
|
+
function E(c) {
|
|
10099
10101
|
return c === 91 || c === 92 || c === 93 ? (e.consume(c), o++, p) : p(c);
|
|
10100
10102
|
}
|
|
10101
10103
|
}
|
|
10102
10104
|
function Jo(e, t, n, r, a, i) {
|
|
10103
10105
|
let s;
|
|
10104
10106
|
return o;
|
|
10105
|
-
function o(
|
|
10106
|
-
return
|
|
10107
|
+
function o(E) {
|
|
10108
|
+
return E === 34 || E === 39 || E === 40 ? (e.enter(r), e.enter(a), e.consume(E), e.exit(a), s = E === 40 ? 41 : E, u) : n(E);
|
|
10107
10109
|
}
|
|
10108
|
-
function u(
|
|
10109
|
-
return
|
|
10110
|
+
function u(E) {
|
|
10111
|
+
return E === s ? (e.enter(a), e.consume(E), e.exit(a), e.exit(r), t) : (e.enter(i), l(E));
|
|
10110
10112
|
}
|
|
10111
|
-
function l(
|
|
10112
|
-
return
|
|
10113
|
+
function l(E) {
|
|
10114
|
+
return E === s ? (e.exit(i), u(s)) : E === null ? n(E) : te(E) ? (e.enter("lineEnding"), e.consume(E), e.exit("lineEnding"), Te(e, l, "linePrefix")) : (e.enter("chunkString", {
|
|
10113
10115
|
contentType: "string"
|
|
10114
|
-
}), f(
|
|
10116
|
+
}), f(E));
|
|
10115
10117
|
}
|
|
10116
|
-
function f(
|
|
10117
|
-
return
|
|
10118
|
+
function f(E) {
|
|
10119
|
+
return E === s || E === null || te(E) ? (e.exit("chunkString"), l(E)) : (e.consume(E), E === 92 ? p : f);
|
|
10118
10120
|
}
|
|
10119
|
-
function p(
|
|
10120
|
-
return
|
|
10121
|
+
function p(E) {
|
|
10122
|
+
return E === s || E === 92 ? (e.consume(E), f) : f(E);
|
|
10121
10123
|
}
|
|
10122
10124
|
}
|
|
10123
10125
|
function Et(e, t) {
|
|
@@ -10176,9 +10178,9 @@ function Dp(e, t, n) {
|
|
|
10176
10178
|
return e.attempt(Op, p, p)(c);
|
|
10177
10179
|
}
|
|
10178
10180
|
function p(c) {
|
|
10179
|
-
return be(c) ? Te(e,
|
|
10181
|
+
return be(c) ? Te(e, E, "whitespace")(c) : E(c);
|
|
10180
10182
|
}
|
|
10181
|
-
function
|
|
10183
|
+
function E(c) {
|
|
10182
10184
|
return c === null || te(c) ? (e.exit("definition"), r.parser.defined.push(a), t(c)) : n(c);
|
|
10183
10185
|
}
|
|
10184
10186
|
}
|
|
@@ -10342,9 +10344,9 @@ function Gp(e, t, n) {
|
|
|
10342
10344
|
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(P), p;
|
|
10343
10345
|
}
|
|
10344
10346
|
function p(P) {
|
|
10345
|
-
return P === 33 ? (e.consume(P),
|
|
10347
|
+
return P === 33 ? (e.consume(P), E) : P === 47 ? (e.consume(P), i = !0, h) : P === 63 ? (e.consume(P), a = 3, r.interrupt ? t : w) : lt(P) ? (e.consume(P), s = String.fromCharCode(P), m) : n(P);
|
|
10346
10348
|
}
|
|
10347
|
-
function
|
|
10349
|
+
function E(P) {
|
|
10348
10350
|
return P === 45 ? (e.consume(P), a = 2, c) : P === 91 ? (e.consume(P), a = 5, o = 0, y) : lt(P) ? (e.consume(P), a = 4, r.interrupt ? t : w) : n(P);
|
|
10349
10351
|
}
|
|
10350
10352
|
function c(P) {
|
|
@@ -10360,11 +10362,11 @@ function Gp(e, t, n) {
|
|
|
10360
10362
|
function m(P) {
|
|
10361
10363
|
if (P === null || P === 47 || P === 62 || Le(P)) {
|
|
10362
10364
|
const ee = P === 47, ae = s.toLowerCase();
|
|
10363
|
-
return !ee && !i && ss.includes(ae) ? (a = 1, r.interrupt ? t(P) : O(P)) : $p.includes(s.toLowerCase()) ? (a = 6, ee ? (e.consume(P),
|
|
10365
|
+
return !ee && !i && ss.includes(ae) ? (a = 1, r.interrupt ? t(P) : O(P)) : $p.includes(s.toLowerCase()) ? (a = 6, ee ? (e.consume(P), g) : r.interrupt ? t(P) : O(P)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(P) : i ? b(P) : T(P));
|
|
10364
10366
|
}
|
|
10365
10367
|
return P === 45 || Ke(P) ? (e.consume(P), s += String.fromCharCode(P), m) : n(P);
|
|
10366
10368
|
}
|
|
10367
|
-
function
|
|
10369
|
+
function g(P) {
|
|
10368
10370
|
return P === 62 ? (e.consume(P), r.interrupt ? t : O) : n(P);
|
|
10369
10371
|
}
|
|
10370
10372
|
function b(P) {
|
|
@@ -10472,13 +10474,13 @@ function Xp(e, t, n) {
|
|
|
10472
10474
|
return w === 45 ? (e.consume(w), c) : n(w);
|
|
10473
10475
|
}
|
|
10474
10476
|
function p(w) {
|
|
10475
|
-
return w === null ? n(w) : w === 45 ? (e.consume(w),
|
|
10477
|
+
return w === null ? n(w) : w === 45 ? (e.consume(w), E) : te(w) ? (s = p, $(w)) : (e.consume(w), p);
|
|
10476
10478
|
}
|
|
10477
|
-
function
|
|
10479
|
+
function E(w) {
|
|
10478
10480
|
return w === 45 ? (e.consume(w), c) : p(w);
|
|
10479
10481
|
}
|
|
10480
10482
|
function c(w) {
|
|
10481
|
-
return w === 62 ? F(w) : w === 45 ?
|
|
10483
|
+
return w === 62 ? F(w) : w === 45 ? E(w) : p(w);
|
|
10482
10484
|
}
|
|
10483
10485
|
function y(w) {
|
|
10484
10486
|
const V = "CDATA[";
|
|
@@ -10488,10 +10490,10 @@ function Xp(e, t, n) {
|
|
|
10488
10490
|
return w === null ? n(w) : w === 93 ? (e.consume(w), m) : te(w) ? (s = h, $(w)) : (e.consume(w), h);
|
|
10489
10491
|
}
|
|
10490
10492
|
function m(w) {
|
|
10491
|
-
return w === 93 ? (e.consume(w),
|
|
10493
|
+
return w === 93 ? (e.consume(w), g) : h(w);
|
|
10492
10494
|
}
|
|
10493
|
-
function
|
|
10494
|
-
return w === 62 ? F(w) : w === 93 ? (e.consume(w),
|
|
10495
|
+
function g(w) {
|
|
10496
|
+
return w === 62 ? F(w) : w === 93 ? (e.consume(w), g) : h(w);
|
|
10495
10497
|
}
|
|
10496
10498
|
function b(w) {
|
|
10497
10499
|
return w === null || w === 62 ? F(w) : te(w) ? (s = b, $(w)) : (e.consume(w), b);
|
|
@@ -10621,23 +10623,23 @@ function th(e, t, n) {
|
|
|
10621
10623
|
break;
|
|
10622
10624
|
}
|
|
10623
10625
|
return o;
|
|
10624
|
-
function o(
|
|
10625
|
-
return i ? i._inactive ? p(
|
|
10626
|
+
function o(E) {
|
|
10627
|
+
return i ? i._inactive ? p(E) : (s = r.parser.defined.includes(jt(r.sliceSerialize({
|
|
10626
10628
|
start: i.end,
|
|
10627
10629
|
end: r.now()
|
|
10628
|
-
}))), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(
|
|
10630
|
+
}))), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(E), e.exit("labelMarker"), e.exit("labelEnd"), u) : n(E);
|
|
10629
10631
|
}
|
|
10630
|
-
function u(
|
|
10631
|
-
return
|
|
10632
|
+
function u(E) {
|
|
10633
|
+
return E === 40 ? e.attempt(Kp, f, s ? f : p)(E) : E === 91 ? e.attempt(Qp, f, s ? l : p)(E) : s ? f(E) : p(E);
|
|
10632
10634
|
}
|
|
10633
|
-
function l(
|
|
10634
|
-
return e.attempt(Jp, f, p)(
|
|
10635
|
+
function l(E) {
|
|
10636
|
+
return e.attempt(Jp, f, p)(E);
|
|
10635
10637
|
}
|
|
10636
|
-
function f(
|
|
10637
|
-
return t(
|
|
10638
|
+
function f(E) {
|
|
10639
|
+
return t(E);
|
|
10638
10640
|
}
|
|
10639
|
-
function p(
|
|
10640
|
-
return i._balanced = !0, n(
|
|
10641
|
+
function p(E) {
|
|
10642
|
+
return i._balanced = !0, n(E);
|
|
10641
10643
|
}
|
|
10642
10644
|
}
|
|
10643
10645
|
function nh(e, t, n) {
|
|
@@ -10790,16 +10792,16 @@ function ph(e, t, n) {
|
|
|
10790
10792
|
Ar,
|
|
10791
10793
|
// Can’t be empty when interrupting.
|
|
10792
10794
|
r.interrupt ? n : f,
|
|
10793
|
-
e.attempt(dh,
|
|
10795
|
+
e.attempt(dh, E, p)
|
|
10794
10796
|
);
|
|
10795
10797
|
}
|
|
10796
10798
|
function f(c) {
|
|
10797
|
-
return r.containerState.initialBlankLine = !0, i++,
|
|
10799
|
+
return r.containerState.initialBlankLine = !0, i++, E(c);
|
|
10798
10800
|
}
|
|
10799
10801
|
function p(c) {
|
|
10800
|
-
return be(c) ? (e.enter("listItemPrefixWhitespace"), e.consume(c), e.exit("listItemPrefixWhitespace"),
|
|
10802
|
+
return be(c) ? (e.enter("listItemPrefixWhitespace"), e.consume(c), e.exit("listItemPrefixWhitespace"), E) : n(c);
|
|
10801
10803
|
}
|
|
10802
|
-
function
|
|
10804
|
+
function E(c) {
|
|
10803
10805
|
return r.containerState.size = i + r.sliceSerialize(e.exit("listItemPrefix"), !0).length, t(c);
|
|
10804
10806
|
}
|
|
10805
10807
|
}
|
|
@@ -10942,10 +10944,10 @@ function Zo(e) {
|
|
|
10942
10944
|
if (f === null)
|
|
10943
10945
|
return !0;
|
|
10944
10946
|
const p = a[f];
|
|
10945
|
-
let
|
|
10947
|
+
let E = -1;
|
|
10946
10948
|
if (p)
|
|
10947
|
-
for (; ++
|
|
10948
|
-
const c = p[
|
|
10949
|
+
for (; ++E < p.length; ) {
|
|
10950
|
+
const c = p[E];
|
|
10949
10951
|
if (!c.previous || c.previous.call(r, r.previous))
|
|
10950
10952
|
return !0;
|
|
10951
10953
|
}
|
|
@@ -11095,7 +11097,7 @@ function Rh(e, t, n) {
|
|
|
11095
11097
|
now: y,
|
|
11096
11098
|
parser: e,
|
|
11097
11099
|
previous: null,
|
|
11098
|
-
sliceSerialize:
|
|
11100
|
+
sliceSerialize: E,
|
|
11099
11101
|
sliceStream: c,
|
|
11100
11102
|
write: p
|
|
11101
11103
|
};
|
|
@@ -11104,7 +11106,7 @@ function Rh(e, t, n) {
|
|
|
11104
11106
|
function p(N) {
|
|
11105
11107
|
return s = Ze(s, N), m(), s[s.length - 1] !== null ? [] : (_(t, 0), l.events = ei(i, l.events, l), l.events);
|
|
11106
11108
|
}
|
|
11107
|
-
function
|
|
11109
|
+
function E(N, O) {
|
|
11108
11110
|
return Fh(c(N), O);
|
|
11109
11111
|
}
|
|
11110
11112
|
function c(N) {
|
|
@@ -11135,12 +11137,12 @@ function Rh(e, t, n) {
|
|
|
11135
11137
|
const O = s[r._index];
|
|
11136
11138
|
if (typeof O == "string")
|
|
11137
11139
|
for (N = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === N && r._bufferIndex < O.length; )
|
|
11138
|
-
|
|
11140
|
+
g(O.charCodeAt(r._bufferIndex));
|
|
11139
11141
|
else
|
|
11140
|
-
|
|
11142
|
+
g(O);
|
|
11141
11143
|
}
|
|
11142
11144
|
}
|
|
11143
|
-
function
|
|
11145
|
+
function g(N) {
|
|
11144
11146
|
f = f(N);
|
|
11145
11147
|
}
|
|
11146
11148
|
function b(N) {
|
|
@@ -11318,16 +11320,16 @@ function Uh() {
|
|
|
11318
11320
|
return a;
|
|
11319
11321
|
function a(i, s, o) {
|
|
11320
11322
|
const u = [];
|
|
11321
|
-
let l, f, p,
|
|
11323
|
+
let l, f, p, E, c;
|
|
11322
11324
|
for (i = t + (typeof i == "string" ? i.toString() : new TextDecoder(s || void 0).decode(i)), p = 0, t = "", n && (i.charCodeAt(0) === 65279 && p++, n = void 0); p < i.length; ) {
|
|
11323
|
-
if (us.lastIndex = p, l = us.exec(i),
|
|
11325
|
+
if (us.lastIndex = p, l = us.exec(i), E = l && l.index !== void 0 ? l.index : i.length, c = i.charCodeAt(E), !l) {
|
|
11324
11326
|
t = i.slice(p);
|
|
11325
11327
|
break;
|
|
11326
11328
|
}
|
|
11327
|
-
if (c === 10 && p ===
|
|
11329
|
+
if (c === 10 && p === E && r)
|
|
11328
11330
|
u.push(-3), r = void 0;
|
|
11329
11331
|
else
|
|
11330
|
-
switch (r && (u.push(-5), r = void 0), p <
|
|
11332
|
+
switch (r && (u.push(-5), r = void 0), p < E && (u.push(i.slice(p, E)), e += E - p), c) {
|
|
11331
11333
|
case 0: {
|
|
11332
11334
|
u.push(65533), e++;
|
|
11333
11335
|
break;
|
|
@@ -11343,7 +11345,7 @@ function Uh() {
|
|
|
11343
11345
|
default:
|
|
11344
11346
|
r = !0, e = 1;
|
|
11345
11347
|
}
|
|
11346
|
-
p =
|
|
11348
|
+
p = E + 1;
|
|
11347
11349
|
}
|
|
11348
11350
|
return o && (r && u.push(-5), t && u.push(t), u.push(null)), u;
|
|
11349
11351
|
}
|
|
@@ -11400,7 +11402,7 @@ function Yh(e) {
|
|
|
11400
11402
|
label: s,
|
|
11401
11403
|
link: i(qn),
|
|
11402
11404
|
listItem: i(Bt),
|
|
11403
|
-
listItemValue:
|
|
11405
|
+
listItemValue: E,
|
|
11404
11406
|
listOrdered: i(nn, p),
|
|
11405
11407
|
listUnordered: i(nn),
|
|
11406
11408
|
paragraph: i(zn),
|
|
@@ -11429,7 +11431,7 @@ function Yh(e) {
|
|
|
11429
11431
|
codeFencedFenceInfo: c,
|
|
11430
11432
|
codeFencedFenceMeta: y,
|
|
11431
11433
|
codeFlowValue: k,
|
|
11432
|
-
codeIndented: u(
|
|
11434
|
+
codeIndented: u(g),
|
|
11433
11435
|
codeText: u(x),
|
|
11434
11436
|
codeTextData: k,
|
|
11435
11437
|
data: k,
|
|
@@ -11607,7 +11609,7 @@ function Yh(e) {
|
|
|
11607
11609
|
function p() {
|
|
11608
11610
|
this.data.expectingFirstListItemValue = !0;
|
|
11609
11611
|
}
|
|
11610
|
-
function
|
|
11612
|
+
function E(G) {
|
|
11611
11613
|
if (this.data.expectingFirstListItemValue) {
|
|
11612
11614
|
const J = this.stack[this.stack.length - 2];
|
|
11613
11615
|
J.start = Number.parseInt(this.sliceSerialize(G), 10), this.data.expectingFirstListItemValue = void 0;
|
|
@@ -11628,7 +11630,7 @@ function Yh(e) {
|
|
|
11628
11630
|
const G = this.resume(), J = this.stack[this.stack.length - 1];
|
|
11629
11631
|
J.value = G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
|
|
11630
11632
|
}
|
|
11631
|
-
function
|
|
11633
|
+
function g() {
|
|
11632
11634
|
const G = this.resume(), J = this.stack[this.stack.length - 1];
|
|
11633
11635
|
J.value = G.replace(/(\r?\n|\r)$/g, "");
|
|
11634
11636
|
}
|
|
@@ -12201,9 +12203,9 @@ function m0(e, t, n) {
|
|
|
12201
12203
|
let u = -1;
|
|
12202
12204
|
const l = [];
|
|
12203
12205
|
for (; ++u < o; ) {
|
|
12204
|
-
const p = t.children[u],
|
|
12205
|
-
c && (
|
|
12206
|
-
let y = { type: "element", tagName: i, properties:
|
|
12206
|
+
const p = t.children[u], E = {}, c = s ? s[u] : void 0;
|
|
12207
|
+
c && (E.align = c);
|
|
12208
|
+
let y = { type: "element", tagName: i, properties: E, children: [] };
|
|
12207
12209
|
p && (y.children = e.all(p), e.patch(p, y), y = e.applyData(p, y)), l.push(y);
|
|
12208
12210
|
}
|
|
12209
12211
|
const f = {
|
|
@@ -12402,12 +12404,12 @@ const iu = -1, Sr = 0, En = 1, hr = 2, ni = 3, ri = 4, ai = 5, ii = 6, su = 7, o
|
|
|
12402
12404
|
}
|
|
12403
12405
|
case En: {
|
|
12404
12406
|
if (u) {
|
|
12405
|
-
let
|
|
12406
|
-
return u === "DataView" ?
|
|
12407
|
+
let E = s;
|
|
12408
|
+
return u === "DataView" ? E = new Uint8Array(s.buffer) : u === "ArrayBuffer" && (E = new Uint8Array(s)), a([u, [...E]], s);
|
|
12407
12409
|
}
|
|
12408
12410
|
const f = [], p = a([o, f], s);
|
|
12409
|
-
for (const
|
|
12410
|
-
f.push(i(
|
|
12411
|
+
for (const E of s)
|
|
12412
|
+
f.push(i(E));
|
|
12411
12413
|
return p;
|
|
12412
12414
|
}
|
|
12413
12415
|
case hr: {
|
|
@@ -12423,8 +12425,8 @@ const iu = -1, Sr = 0, En = 1, hr = 2, ni = 3, ri = 4, ai = 5, ii = 6, su = 7, o
|
|
|
12423
12425
|
if (t && "toJSON" in s)
|
|
12424
12426
|
return i(s.toJSON());
|
|
12425
12427
|
const f = [], p = a([o, f], s);
|
|
12426
|
-
for (const
|
|
12427
|
-
(e || !Kn(cn(s[
|
|
12428
|
+
for (const E of A0(s))
|
|
12429
|
+
(e || !Kn(cn(s[E]))) && f.push([i(E), i(s[E])]);
|
|
12428
12430
|
return p;
|
|
12429
12431
|
}
|
|
12430
12432
|
case ni:
|
|
@@ -12435,14 +12437,14 @@ const iu = -1, Sr = 0, En = 1, hr = 2, ni = 3, ri = 4, ai = 5, ii = 6, su = 7, o
|
|
|
12435
12437
|
}
|
|
12436
12438
|
case ai: {
|
|
12437
12439
|
const f = [], p = a([o, f], s);
|
|
12438
|
-
for (const [
|
|
12439
|
-
(e || !(Kn(cn(
|
|
12440
|
+
for (const [E, c] of s)
|
|
12441
|
+
(e || !(Kn(cn(E)) || Kn(cn(c)))) && f.push([i(E), i(c)]);
|
|
12440
12442
|
return p;
|
|
12441
12443
|
}
|
|
12442
12444
|
case ii: {
|
|
12443
12445
|
const f = [], p = a([o, f], s);
|
|
12444
|
-
for (const
|
|
12445
|
-
(e || !Kn(cn(
|
|
12446
|
+
for (const E of s)
|
|
12447
|
+
(e || !Kn(cn(E))) && f.push(i(E));
|
|
12446
12448
|
return p;
|
|
12447
12449
|
}
|
|
12448
12450
|
}
|
|
@@ -12480,7 +12482,7 @@ function w0(e) {
|
|
|
12480
12482
|
);
|
|
12481
12483
|
if (!l)
|
|
12482
12484
|
continue;
|
|
12483
|
-
const f = e.all(l), p = String(l.identifier).toUpperCase(),
|
|
12485
|
+
const f = e.all(l), p = String(l.identifier).toUpperCase(), E = Qt(p.toLowerCase());
|
|
12484
12486
|
let c = 0;
|
|
12485
12487
|
const y = [], h = e.footnoteCounts.get(p);
|
|
12486
12488
|
for (; h !== void 0 && ++c <= h; ) {
|
|
@@ -12490,7 +12492,7 @@ function w0(e) {
|
|
|
12490
12492
|
type: "element",
|
|
12491
12493
|
tagName: "a",
|
|
12492
12494
|
properties: {
|
|
12493
|
-
href: "#" + t + "fnref-" +
|
|
12495
|
+
href: "#" + t + "fnref-" + E + (c > 1 ? "-" + c : ""),
|
|
12494
12496
|
dataFootnoteBackref: "",
|
|
12495
12497
|
ariaLabel: typeof r == "string" ? r : r(u, c),
|
|
12496
12498
|
className: ["data-footnote-backref"]
|
|
@@ -12504,13 +12506,13 @@ function w0(e) {
|
|
|
12504
12506
|
b && b.type === "text" ? b.value += " " : m.children.push({ type: "text", value: " " }), m.children.push(...y);
|
|
12505
12507
|
} else
|
|
12506
12508
|
f.push(...y);
|
|
12507
|
-
const
|
|
12509
|
+
const g = {
|
|
12508
12510
|
type: "element",
|
|
12509
12511
|
tagName: "li",
|
|
12510
|
-
properties: { id: t + "fn-" +
|
|
12512
|
+
properties: { id: t + "fn-" + E },
|
|
12511
12513
|
children: e.wrap(f, !0)
|
|
12512
12514
|
};
|
|
12513
|
-
e.patch(l,
|
|
12515
|
+
e.patch(l, g), o.push(g);
|
|
12514
12516
|
}
|
|
12515
12517
|
if (o.length !== 0)
|
|
12516
12518
|
return {
|
|
@@ -12647,23 +12649,23 @@ function cu(e, t, n, r) {
|
|
|
12647
12649
|
typeof p.name == "string" ? p.name : void 0
|
|
12648
12650
|
)
|
|
12649
12651
|
);
|
|
12650
|
-
Object.defineProperty(
|
|
12652
|
+
Object.defineProperty(E, "name", {
|
|
12651
12653
|
value: "node (" + (u.type + (c ? "<" + c + ">" : "")) + ")"
|
|
12652
12654
|
});
|
|
12653
12655
|
}
|
|
12654
|
-
return
|
|
12655
|
-
function
|
|
12656
|
+
return E;
|
|
12657
|
+
function E() {
|
|
12656
12658
|
let c = lu, y, h, m;
|
|
12657
12659
|
if ((!t || i(u, l, f[f.length - 1] || void 0)) && (c = M0(n(u, f)), c[0] === gs))
|
|
12658
12660
|
return c;
|
|
12659
12661
|
if ("children" in u && u.children) {
|
|
12660
|
-
const
|
|
12662
|
+
const g = (
|
|
12661
12663
|
/** @type {UnistParent} */
|
|
12662
12664
|
u
|
|
12663
12665
|
);
|
|
12664
|
-
if (
|
|
12665
|
-
for (h = (r ?
|
|
12666
|
-
const b =
|
|
12666
|
+
if (g.children && c[0] !== P0)
|
|
12667
|
+
for (h = (r ? g.children.length : -1) + s, m = f.concat(g); h > -1 && h < g.children.length; ) {
|
|
12668
|
+
const b = g.children[h];
|
|
12667
12669
|
if (y = o(b, h, m)(), y[0] === gs)
|
|
12668
12670
|
return y;
|
|
12669
12671
|
h = typeof y[1] == "number" ? y[1] : h + s;
|
|
@@ -12701,18 +12703,18 @@ function B0(e, t) {
|
|
|
12701
12703
|
};
|
|
12702
12704
|
return vr(e, function(f) {
|
|
12703
12705
|
if (f.type === "definition" || f.type === "footnoteDefinition") {
|
|
12704
|
-
const p = f.type === "definition" ? r : a,
|
|
12705
|
-
p.has(
|
|
12706
|
+
const p = f.type === "definition" ? r : a, E = String(f.identifier).toUpperCase();
|
|
12707
|
+
p.has(E) || p.set(E, f);
|
|
12706
12708
|
}
|
|
12707
12709
|
}), o;
|
|
12708
12710
|
function u(f, p) {
|
|
12709
|
-
const
|
|
12710
|
-
if (Oa.call(o.handlers,
|
|
12711
|
+
const E = f.type, c = o.handlers[E];
|
|
12712
|
+
if (Oa.call(o.handlers, E) && c)
|
|
12711
12713
|
return c(o, f, p);
|
|
12712
|
-
if (o.options.passThrough && o.options.passThrough.includes(
|
|
12714
|
+
if (o.options.passThrough && o.options.passThrough.includes(E)) {
|
|
12713
12715
|
if ("children" in f) {
|
|
12714
|
-
const { children: h, ...m } = f,
|
|
12715
|
-
return
|
|
12716
|
+
const { children: h, ...m } = f, g = Dt(m);
|
|
12717
|
+
return g.children = o.all(f), g;
|
|
12716
12718
|
}
|
|
12717
12719
|
return Dt(f);
|
|
12718
12720
|
}
|
|
@@ -12721,12 +12723,12 @@ function B0(e, t) {
|
|
|
12721
12723
|
function l(f) {
|
|
12722
12724
|
const p = [];
|
|
12723
12725
|
if ("children" in f) {
|
|
12724
|
-
const
|
|
12726
|
+
const E = f.children;
|
|
12725
12727
|
let c = -1;
|
|
12726
|
-
for (; ++c <
|
|
12727
|
-
const y = o.one(
|
|
12728
|
+
for (; ++c < E.length; ) {
|
|
12729
|
+
const y = o.one(E[c], f);
|
|
12728
12730
|
if (y) {
|
|
12729
|
-
if (c &&
|
|
12731
|
+
if (c && E[c - 1].type === "break" && (!Array.isArray(y) && y.type === "text" && (y.value = Es(y.value)), !Array.isArray(y) && y.type === "element")) {
|
|
12730
12732
|
const h = y.children[0];
|
|
12731
12733
|
h && h.type === "text" && (h.value = Es(h.value));
|
|
12732
12734
|
}
|
|
@@ -12815,10 +12817,10 @@ function z0() {
|
|
|
12815
12817
|
var f = e.call(l, "constructor"), p = l.constructor && l.constructor.prototype && e.call(l.constructor.prototype, "isPrototypeOf");
|
|
12816
12818
|
if (l.constructor && !f && !p)
|
|
12817
12819
|
return !1;
|
|
12818
|
-
var
|
|
12819
|
-
for (
|
|
12820
|
+
var E;
|
|
12821
|
+
for (E in l)
|
|
12820
12822
|
;
|
|
12821
|
-
return typeof
|
|
12823
|
+
return typeof E > "u" || e.call(l, E);
|
|
12822
12824
|
}, s = function(l, f) {
|
|
12823
12825
|
n && f.name === "__proto__" ? n(l, f.name, {
|
|
12824
12826
|
enumerable: !0,
|
|
@@ -12835,11 +12837,11 @@ function z0() {
|
|
|
12835
12837
|
return l[f];
|
|
12836
12838
|
};
|
|
12837
12839
|
return Zr = function u() {
|
|
12838
|
-
var l, f, p,
|
|
12839
|
-
for (typeof h == "boolean" && (b = h, h = arguments[1] || {}, m = 2), (h == null || typeof h != "object" && typeof h != "function") && (h = {}); m <
|
|
12840
|
+
var l, f, p, E, c, y, h = arguments[0], m = 1, g = arguments.length, b = !1;
|
|
12841
|
+
for (typeof h == "boolean" && (b = h, h = arguments[1] || {}, m = 2), (h == null || typeof h != "object" && typeof h != "function") && (h = {}); m < g; ++m)
|
|
12840
12842
|
if (l = arguments[m], l != null)
|
|
12841
12843
|
for (f in l)
|
|
12842
|
-
p = o(h, f),
|
|
12844
|
+
p = o(h, f), E = o(l, f), h !== E && (b && E && (i(E) || (c = a(E))) ? (c ? (c = !1, y = p && a(p) ? p : []) : y = p && i(p) ? p : {}, s(h, { name: f, newValue: u(b, y, E) })) : typeof E < "u" && s(h, { name: f, newValue: E }));
|
|
12843
12845
|
return h;
|
|
12844
12846
|
}, Zr;
|
|
12845
12847
|
}
|
|
@@ -13677,18 +13679,18 @@ class si extends am {
|
|
|
13677
13679
|
/** @type {unknown} */
|
|
13678
13680
|
r.parse(o)
|
|
13679
13681
|
);
|
|
13680
|
-
r.run(u, o, function(f, p,
|
|
13681
|
-
if (f || !p || !
|
|
13682
|
+
r.run(u, o, function(f, p, E) {
|
|
13683
|
+
if (f || !p || !E)
|
|
13682
13684
|
return l(f);
|
|
13683
13685
|
const c = (
|
|
13684
13686
|
/** @type {CompileTree extends undefined ? Node : CompileTree} */
|
|
13685
13687
|
/** @type {unknown} */
|
|
13686
13688
|
p
|
|
13687
|
-
), y = r.stringify(c,
|
|
13688
|
-
um(y) ?
|
|
13689
|
+
), y = r.stringify(c, E);
|
|
13690
|
+
um(y) ? E.value = y : E.result = y, l(
|
|
13689
13691
|
f,
|
|
13690
13692
|
/** @type {VFileWithOutput<CompileResult>} */
|
|
13691
|
-
|
|
13693
|
+
E
|
|
13692
13694
|
);
|
|
13693
13695
|
});
|
|
13694
13696
|
function l(f, p) {
|
|
@@ -13779,12 +13781,12 @@ class si extends am {
|
|
|
13779
13781
|
function i(s, o) {
|
|
13780
13782
|
const u = Qn(n);
|
|
13781
13783
|
a.run(t, u, l);
|
|
13782
|
-
function l(f, p,
|
|
13784
|
+
function l(f, p, E) {
|
|
13783
13785
|
const c = (
|
|
13784
13786
|
/** @type {TailTree extends undefined ? Node : TailTree} */
|
|
13785
13787
|
p || t
|
|
13786
13788
|
);
|
|
13787
|
-
f ? o(f) : s ? s(c) : r(void 0, c,
|
|
13789
|
+
f ? o(f) : s ? s(c) : r(void 0, c, E);
|
|
13788
13790
|
}
|
|
13789
13791
|
}
|
|
13790
13792
|
}
|
|
@@ -13945,18 +13947,18 @@ class si extends am {
|
|
|
13945
13947
|
throw new TypeError("Expected a list of plugins, not `" + l + "`");
|
|
13946
13948
|
}
|
|
13947
13949
|
function u(l, f) {
|
|
13948
|
-
let p = -1,
|
|
13950
|
+
let p = -1, E = -1;
|
|
13949
13951
|
for (; ++p < r.length; )
|
|
13950
13952
|
if (r[p][0] === l) {
|
|
13951
|
-
|
|
13953
|
+
E = p;
|
|
13952
13954
|
break;
|
|
13953
13955
|
}
|
|
13954
|
-
if (
|
|
13956
|
+
if (E === -1)
|
|
13955
13957
|
r.push([l, ...f]);
|
|
13956
13958
|
else if (f.length > 0) {
|
|
13957
13959
|
let [c, ...y] = f;
|
|
13958
|
-
const h = r[
|
|
13959
|
-
Da(h) && Da(c) && (c = ea(!0, h, c)), r[
|
|
13960
|
+
const h = r[E][1];
|
|
13961
|
+
Da(h) && Da(c) && (c = ea(!0, h, c)), r[E] = [l, c, ...y];
|
|
13960
13962
|
}
|
|
13961
13963
|
}
|
|
13962
13964
|
}
|
|
@@ -14057,9 +14059,9 @@ function mm(e, t) {
|
|
|
14057
14059
|
passKeys: !0,
|
|
14058
14060
|
passNode: !0
|
|
14059
14061
|
});
|
|
14060
|
-
function l(f, p,
|
|
14061
|
-
if (f.type === "raw" &&
|
|
14062
|
-
return s ?
|
|
14062
|
+
function l(f, p, E) {
|
|
14063
|
+
if (f.type === "raw" && E && typeof p == "number")
|
|
14064
|
+
return s ? E.children.splice(p, 1) : E.children[p] = { type: "text", value: f.value }, p;
|
|
14063
14065
|
if (f.type === "element") {
|
|
14064
14066
|
let c;
|
|
14065
14067
|
for (c in Kr)
|
|
@@ -14070,8 +14072,8 @@ function mm(e, t) {
|
|
|
14070
14072
|
}
|
|
14071
14073
|
if (f.type === "element") {
|
|
14072
14074
|
let c = n ? !n.includes(f.tagName) : i ? i.includes(f.tagName) : !1;
|
|
14073
|
-
if (!c && r && typeof p == "number" && (c = !r(f, p,
|
|
14074
|
-
return o && f.children ?
|
|
14075
|
+
if (!c && r && typeof p == "number" && (c = !r(f, p, E)), c && E && typeof p == "number")
|
|
14076
|
+
return o && f.children ? E.children.splice(p, 1, ...f.children) : E.children.splice(p, 1), p;
|
|
14075
14077
|
}
|
|
14076
14078
|
}
|
|
14077
14079
|
}
|
|
@@ -14118,8 +14120,8 @@ function fu(e, t, n) {
|
|
|
14118
14120
|
if (u.tagName = f || l, bm(s))
|
|
14119
14121
|
o.unshift(s);
|
|
14120
14122
|
else
|
|
14121
|
-
for (const [p,
|
|
14122
|
-
Tm(e, u.properties, p,
|
|
14123
|
+
for (const [p, E] of Object.entries(s))
|
|
14124
|
+
Tm(e, u.properties, p, E);
|
|
14123
14125
|
}
|
|
14124
14126
|
for (const l of o)
|
|
14125
14127
|
Ma(u.children, l);
|
|
@@ -20977,17 +20979,17 @@ function pi(e, t) {
|
|
|
20977
20979
|
const n = t || {}, r = typeof n.additional == "string" ? n.additional.charCodeAt(0) : n.additional, a = [];
|
|
20978
20980
|
let i = 0, s = -1, o = "", u, l;
|
|
20979
20981
|
n.position && ("start" in n.position || "indent" in n.position ? (l = n.position.indent, u = n.position.start) : u = n.position);
|
|
20980
|
-
let f = (u ? u.line : 0) || 1, p = (u ? u.column : 0) || 1,
|
|
20982
|
+
let f = (u ? u.line : 0) || 1, p = (u ? u.column : 0) || 1, E = y(), c;
|
|
20981
20983
|
for (i--; ++i <= e.length; )
|
|
20982
20984
|
if (c === 10 && (p = (l ? l[s] : 0) || 1), c = e.charCodeAt(i), c === 38) {
|
|
20983
|
-
const
|
|
20984
|
-
if (
|
|
20985
|
+
const g = e.charCodeAt(i + 1);
|
|
20986
|
+
if (g === 9 || g === 10 || g === 12 || g === 32 || g === 38 || g === 60 || Number.isNaN(g) || r && g === r) {
|
|
20985
20987
|
o += String.fromCharCode(c), p++;
|
|
20986
20988
|
continue;
|
|
20987
20989
|
}
|
|
20988
20990
|
const b = i + 1;
|
|
20989
20991
|
let T = b, C = b, S;
|
|
20990
|
-
if (
|
|
20992
|
+
if (g === 35) {
|
|
20991
20993
|
C = ++T;
|
|
20992
20994
|
const R = e.charCodeAt(C);
|
|
20993
20995
|
R === 88 || R === 120 ? (S = "hexadecimal", C = ++T) : S = "decimal";
|
|
@@ -21040,14 +21042,14 @@ function pi(e, t) {
|
|
|
21040
21042
|
}
|
|
21041
21043
|
}
|
|
21042
21044
|
if (O) {
|
|
21043
|
-
m(),
|
|
21045
|
+
m(), E = y(), i = C - 1, p += C - b + 1, a.push(O);
|
|
21044
21046
|
const R = y();
|
|
21045
21047
|
R.offset++, n.reference && n.reference.call(
|
|
21046
21048
|
n.referenceContext || void 0,
|
|
21047
21049
|
O,
|
|
21048
|
-
{ start:
|
|
21050
|
+
{ start: E, end: R },
|
|
21049
21051
|
e.slice(b - 1, C)
|
|
21050
|
-
),
|
|
21052
|
+
), E = R;
|
|
21051
21053
|
} else
|
|
21052
21054
|
_ = e.slice(b - 1, C), o += _, p += _.length, i = C - 1;
|
|
21053
21055
|
} else
|
|
@@ -21060,18 +21062,18 @@ function pi(e, t) {
|
|
|
21060
21062
|
offset: i + ((u ? u.offset : 0) || 0)
|
|
21061
21063
|
};
|
|
21062
21064
|
}
|
|
21063
|
-
function h(
|
|
21065
|
+
function h(g, b) {
|
|
21064
21066
|
let T;
|
|
21065
21067
|
n.warning && (T = y(), T.column += b, T.offset += b, n.warning.call(
|
|
21066
21068
|
n.warningContext || void 0,
|
|
21067
|
-
$E[
|
|
21069
|
+
$E[g],
|
|
21068
21070
|
T,
|
|
21069
|
-
|
|
21071
|
+
g
|
|
21070
21072
|
));
|
|
21071
21073
|
}
|
|
21072
21074
|
function m() {
|
|
21073
21075
|
o && (a.push(o), n.text && n.text.call(n.textContext || void 0, o, {
|
|
21074
|
-
start:
|
|
21076
|
+
start: E,
|
|
21075
21077
|
end: y()
|
|
21076
21078
|
}), o = "");
|
|
21077
21079
|
}
|
|
@@ -21197,7 +21199,7 @@ function nb(e) {
|
|
|
21197
21199
|
};
|
|
21198
21200
|
function n(i, s, o, u) {
|
|
21199
21201
|
const l = o.createTracker(u), f = lb(i), p = o.enter(i.type);
|
|
21200
|
-
let
|
|
21202
|
+
let E = l.move(f + (i.name || "")), c;
|
|
21201
21203
|
if (i.type === "containerDirective") {
|
|
21202
21204
|
const y = (i.children || [])[0];
|
|
21203
21205
|
c = Qs(y) ? y : void 0;
|
|
@@ -21205,39 +21207,39 @@ function nb(e) {
|
|
|
21205
21207
|
c = i;
|
|
21206
21208
|
if (c && c.children && c.children.length > 0) {
|
|
21207
21209
|
const y = o.enter("label"), h = `${i.type}Label`, m = o.enter(h);
|
|
21208
|
-
|
|
21210
|
+
E += l.move("["), E += l.move(
|
|
21209
21211
|
o.containerPhrasing(c, {
|
|
21210
21212
|
...l.current(),
|
|
21211
|
-
before:
|
|
21213
|
+
before: E,
|
|
21212
21214
|
after: "]"
|
|
21213
21215
|
})
|
|
21214
|
-
),
|
|
21216
|
+
), E += l.move("]"), m(), y();
|
|
21215
21217
|
}
|
|
21216
|
-
if (
|
|
21218
|
+
if (E += l.move(r(i, o)), i.type === "containerDirective") {
|
|
21217
21219
|
const y = (i.children || [])[0];
|
|
21218
21220
|
let h = i;
|
|
21219
|
-
Qs(y) && (h = Object.assign({}, i, { children: i.children.slice(1) })), h && h.children && h.children.length > 0 && (
|
|
21220
|
-
`),
|
|
21221
|
+
Qs(y) && (h = Object.assign({}, i, { children: i.children.slice(1) })), h && h.children && h.children.length > 0 && (E += l.move(`
|
|
21222
|
+
`), E += l.move(o.containerFlow(h, l.current()))), E += l.move(`
|
|
21221
21223
|
` + f);
|
|
21222
21224
|
}
|
|
21223
|
-
return p(),
|
|
21225
|
+
return p(), E;
|
|
21224
21226
|
}
|
|
21225
21227
|
function r(i, s) {
|
|
21226
21228
|
const o = i.attributes || {}, u = [];
|
|
21227
|
-
let l, f, p,
|
|
21228
|
-
for (
|
|
21229
|
-
if (JE.call(o,
|
|
21230
|
-
const c = String(o[
|
|
21231
|
-
if (
|
|
21229
|
+
let l, f, p, E;
|
|
21230
|
+
for (E in o)
|
|
21231
|
+
if (JE.call(o, E) && o[E] !== void 0 && o[E] !== null) {
|
|
21232
|
+
const c = String(o[E]);
|
|
21233
|
+
if (E === "id")
|
|
21232
21234
|
p = t.preferShortcut !== !1 && Ks.test(c) ? "#" + c : a("id", c, i, s);
|
|
21233
|
-
else if (
|
|
21235
|
+
else if (E === "class") {
|
|
21234
21236
|
const y = c.split(/[\t\n\r ]+/g), h = [], m = [];
|
|
21235
|
-
let
|
|
21236
|
-
for (; ++
|
|
21237
|
-
(t.preferShortcut !== !1 && Ks.test(y[
|
|
21237
|
+
let g = -1;
|
|
21238
|
+
for (; ++g < y.length; )
|
|
21239
|
+
(t.preferShortcut !== !1 && Ks.test(y[g]) ? m : h).push(y[g]);
|
|
21238
21240
|
l = h.length > 0 ? a("class", h.join(" "), i, s) : "", f = m.length > 0 ? "." + m.join(".") : "";
|
|
21239
21241
|
} else
|
|
21240
|
-
u.push(a(
|
|
21242
|
+
u.push(a(E, c, i, s));
|
|
21241
21243
|
}
|
|
21242
21244
|
return l && u.unshift(l), f && u.unshift(f), p && u.unshift(p), u.length > 0 ? "{" + u.join(" ") + "}" : "";
|
|
21243
21245
|
}
|
|
@@ -21245,9 +21247,9 @@ function nb(e) {
|
|
|
21245
21247
|
if (t.collapseEmptyAttributes !== !1 && !s) return i;
|
|
21246
21248
|
if (t.preferUnquoted && eb.test(s))
|
|
21247
21249
|
return i + "=" + s;
|
|
21248
|
-
const l = t.quote || u.options.quote || '"', f = l === '"' ? "'" : '"', p = t.quoteSmart && Ys(s, l) > Ys(s, f) ? f : l,
|
|
21250
|
+
const l = t.quote || u.options.quote || '"', f = l === '"' ? "'" : '"', p = t.quoteSmart && Ys(s, l) > Ys(s, f) ? f : l, E = o.type === "textDirective" ? [p] : [p, `
|
|
21249
21251
|
`, "\r"];
|
|
21250
|
-
return i + "=" + p + QE(s, { subset:
|
|
21252
|
+
return i + "=" + p + QE(s, { subset: E }) + p;
|
|
21251
21253
|
}
|
|
21252
21254
|
}
|
|
21253
21255
|
function rb(e) {
|
|
@@ -21330,10 +21332,10 @@ function lb(e) {
|
|
|
21330
21332
|
}
|
|
21331
21333
|
}), t += 3) : e.type === "leafDirective" ? t = 2 : t = 1, ":".repeat(t);
|
|
21332
21334
|
}
|
|
21333
|
-
function mi(e, t, n, r, a, i, s, o, u, l, f, p,
|
|
21335
|
+
function mi(e, t, n, r, a, i, s, o, u, l, f, p, E, c, y) {
|
|
21334
21336
|
let h, m;
|
|
21335
|
-
return
|
|
21336
|
-
function
|
|
21337
|
+
return g;
|
|
21338
|
+
function g(x) {
|
|
21337
21339
|
return e.enter(r), e.enter(a), e.consume(x), e.exit(a), b;
|
|
21338
21340
|
}
|
|
21339
21341
|
function b(x) {
|
|
@@ -21374,13 +21376,13 @@ function mi(e, t, n, r, a, i, s, o, u, l, f, p, g, c, y) {
|
|
|
21374
21376
|
return x === 61 ? (e.enter(l), e.consume(x), e.exit(l), _) : (e.exit(i), b(x));
|
|
21375
21377
|
}
|
|
21376
21378
|
function _(x) {
|
|
21377
|
-
return x === null || x === 60 || x === 61 || x === 62 || x === 96 || x === 125 || y && te(x) ? n(x) : x === 34 || x === 39 ? (e.enter(f), e.enter(
|
|
21379
|
+
return x === null || x === 60 || x === 61 || x === 62 || x === 96 || x === 125 || y && te(x) ? n(x) : x === 34 || x === 39 ? (e.enter(f), e.enter(E), e.consume(x), e.exit(E), m = x, k) : y && be(x) ? Te(e, _, "whitespace")(x) : !y && Le(x) ? Et(e, _)(x) : (e.enter(p), e.enter(c), e.consume(x), m = void 0, v);
|
|
21378
21380
|
}
|
|
21379
21381
|
function v(x) {
|
|
21380
21382
|
return x === null || x === 34 || x === 39 || x === 60 || x === 61 || x === 62 || x === 96 ? n(x) : x === 125 || Le(x) ? (e.exit(c), e.exit(p), e.exit(i), b(x)) : (e.consume(x), v);
|
|
21381
21383
|
}
|
|
21382
21384
|
function k(x) {
|
|
21383
|
-
return x === m ? (e.enter(
|
|
21385
|
+
return x === m ? (e.enter(E), e.consume(x), e.exit(E), e.exit(f), e.exit(i), R) : (e.enter(p), N(x));
|
|
21384
21386
|
}
|
|
21385
21387
|
function N(x) {
|
|
21386
21388
|
return x === m ? (e.exit(p), k(x)) : x === null ? n(x) : te(x) ? y ? n(x) : Et(e, N)(x) : (e.enter(c), e.consume(x), O);
|
|
@@ -21402,20 +21404,20 @@ function gi(e, t, n, r, a, i, s) {
|
|
|
21402
21404
|
return e.enter(r), e.enter(a), e.consume(m), e.exit(a), p;
|
|
21403
21405
|
}
|
|
21404
21406
|
function p(m) {
|
|
21405
|
-
return m === 93 ? (e.enter(a), e.consume(m), e.exit(a), e.exit(r), t) : (e.enter(i),
|
|
21407
|
+
return m === 93 ? (e.enter(a), e.consume(m), e.exit(a), e.exit(r), t) : (e.enter(i), E(m));
|
|
21406
21408
|
}
|
|
21407
|
-
function
|
|
21409
|
+
function E(m) {
|
|
21408
21410
|
if (m === 93 && !u)
|
|
21409
21411
|
return h(m);
|
|
21410
|
-
const
|
|
21412
|
+
const g = e.enter("chunkText", {
|
|
21411
21413
|
_contentTypeTextTrailing: !0,
|
|
21412
21414
|
contentType: "text",
|
|
21413
21415
|
previous: l
|
|
21414
21416
|
});
|
|
21415
|
-
return l && (l.next =
|
|
21417
|
+
return l && (l.next = g), l = g, c(m);
|
|
21416
21418
|
}
|
|
21417
21419
|
function c(m) {
|
|
21418
|
-
return m === null || o > 999 || m === 91 && ++u > 32 ? n(m) : m === 93 && !u-- ? (e.exit("chunkText"), h(m)) : te(m) ? s ? n(m) : (e.consume(m), e.exit("chunkText"),
|
|
21420
|
+
return m === null || o > 999 || m === 91 && ++u > 32 ? n(m) : m === 93 && !u-- ? (e.exit("chunkText"), h(m)) : te(m) ? s ? n(m) : (e.consume(m), e.exit("chunkText"), E) : (e.consume(m), m === 92 ? y : c);
|
|
21419
21421
|
}
|
|
21420
21422
|
function y(m) {
|
|
21421
21423
|
return m === 91 || m === 92 || m === 93 ? (e.consume(m), o++, c) : c(m);
|
|
@@ -21461,9 +21463,9 @@ function pb(e, t, n) {
|
|
|
21461
21463
|
return v === 91 ? e.attempt(db, p, p)(v) : p(v);
|
|
21462
21464
|
}
|
|
21463
21465
|
function p(v) {
|
|
21464
|
-
return v === 123 ? e.attempt(fb,
|
|
21466
|
+
return v === 123 ? e.attempt(fb, E, E)(v) : E(v);
|
|
21465
21467
|
}
|
|
21466
|
-
function
|
|
21468
|
+
function E(v) {
|
|
21467
21469
|
return Te(e, c, "whitespace")(v);
|
|
21468
21470
|
}
|
|
21469
21471
|
function c(v) {
|
|
@@ -21481,19 +21483,19 @@ function pb(e, t, n) {
|
|
|
21481
21483
|
function m(v) {
|
|
21482
21484
|
return v === null ? A(v) : te(v) ? e.check(Zn, b, A)(v) : b(v);
|
|
21483
21485
|
}
|
|
21484
|
-
function
|
|
21486
|
+
function g(v) {
|
|
21485
21487
|
if (v === null) {
|
|
21486
21488
|
const k = e.exit("chunkDocument");
|
|
21487
21489
|
return r.parser.lazy[k.start.line] = !1, A(v);
|
|
21488
21490
|
}
|
|
21489
|
-
return te(v) ? e.check(Zn, C, S)(v) : (e.consume(v),
|
|
21491
|
+
return te(v) ? e.check(Zn, C, S)(v) : (e.consume(v), g);
|
|
21490
21492
|
}
|
|
21491
21493
|
function b(v) {
|
|
21492
21494
|
const k = e.enter("chunkDocument", {
|
|
21493
21495
|
contentType: "document",
|
|
21494
21496
|
previous: o
|
|
21495
21497
|
});
|
|
21496
|
-
return o && (o.next = k), o = k,
|
|
21498
|
+
return o && (o.next = k), o = k, g(v);
|
|
21497
21499
|
}
|
|
21498
21500
|
function T(v) {
|
|
21499
21501
|
return e.enter("directiveContainerContent"), h(v);
|
|
@@ -21671,7 +21673,7 @@ const xa = {
|
|
|
21671
21673
|
debugTooltipSticky: n = !1,
|
|
21672
21674
|
videoState: r
|
|
21673
21675
|
}) => {
|
|
21674
|
-
const [a, i] = ie(null), [s, o] = ie(!1), u = Z(null), l = Z(null), f = Z(null), p = 200,
|
|
21676
|
+
const [a, i] = ie(null), [s, o] = ie(!1), u = Z(null), l = Z(null), f = Z(null), p = 200, E = 200, c = oe(() => {
|
|
21675
21677
|
u.current && (window.clearTimeout(u.current), u.current = null), l.current && (window.clearTimeout(l.current), l.current = null), f.current !== null && (window.cancelAnimationFrame(f.current), f.current = null);
|
|
21676
21678
|
}, []), y = oe(() => {
|
|
21677
21679
|
c(), o(!0);
|
|
@@ -21686,7 +21688,7 @@ const xa = {
|
|
|
21686
21688
|
u.current = window.setTimeout(() => {
|
|
21687
21689
|
u.current = null, o(!1), l.current = window.setTimeout(() => {
|
|
21688
21690
|
i(null), l.current = null;
|
|
21689
|
-
},
|
|
21691
|
+
}, E);
|
|
21690
21692
|
}, p);
|
|
21691
21693
|
},
|
|
21692
21694
|
[c]
|
|
@@ -21694,9 +21696,9 @@ const xa = {
|
|
|
21694
21696
|
se(() => () => {
|
|
21695
21697
|
c();
|
|
21696
21698
|
}, [c]);
|
|
21697
|
-
const [m,
|
|
21699
|
+
const [m, g] = ie(0), b = Z(null), [T, C] = ie(!1), S = Z(/* @__PURE__ */ new Map()), [A, L] = ie(357), [_, v] = ie("bottom");
|
|
21698
21700
|
return se(() => {
|
|
21699
|
-
|
|
21701
|
+
g(0), C(!1), v("bottom");
|
|
21700
21702
|
}, [a?.key, a?.type]), se(() => {
|
|
21701
21703
|
const N = S.current, O = /* @__PURE__ */ new Set(), R = (I) => {
|
|
21702
21704
|
if (!I || O.has(I) || N.has(I)) return;
|
|
@@ -21826,7 +21828,7 @@ const xa = {
|
|
|
21826
21828
|
onVisibleChange: (Q) => C(Q),
|
|
21827
21829
|
onChange: (Q) => {
|
|
21828
21830
|
const re = Math.min(Math.max(Q, 0), w - 1);
|
|
21829
|
-
|
|
21831
|
+
g(re), b.current?.slideTo(re);
|
|
21830
21832
|
}
|
|
21831
21833
|
},
|
|
21832
21834
|
children: /* @__PURE__ */ Y(
|
|
@@ -21840,7 +21842,7 @@ const xa = {
|
|
|
21840
21842
|
onSwiper: (Q) => {
|
|
21841
21843
|
b.current = Q;
|
|
21842
21844
|
},
|
|
21843
|
-
onSlideChange: (Q) =>
|
|
21845
|
+
onSlideChange: (Q) => g(Q.activeIndex),
|
|
21844
21846
|
children: q.images.map((Q, re) => /* @__PURE__ */ Y(wo, { children: /* @__PURE__ */ Y(
|
|
21845
21847
|
Li,
|
|
21846
21848
|
{
|
|
@@ -21857,7 +21859,7 @@ const xa = {
|
|
|
21857
21859
|
},
|
|
21858
21860
|
preview: { mask: null },
|
|
21859
21861
|
onClick: () => {
|
|
21860
|
-
|
|
21862
|
+
g(re), b.current?.slideTo(re), C(!0);
|
|
21861
21863
|
}
|
|
21862
21864
|
}
|
|
21863
21865
|
) }, `${Q}-${re}`))
|
|
@@ -22028,8 +22030,8 @@ const xa = {
|
|
|
22028
22030
|
}, Mb = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, Ju = (e, t) => {
|
|
22029
22031
|
const r = (e.key ? t[e.key] : void 0) || e.text || "", a = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", i = nt(e.tooltip), s = i ? ` data-tooltip="${ue(i)}" data-variable-key="${e.key || ""}"` : "";
|
|
22030
22032
|
if (e.useAntd === !0) {
|
|
22031
|
-
const
|
|
22032
|
-
return `<span contenteditable="false" data-type="variable" data-variable-render="antd-textarea" data-key="${e.key}" data-value="${
|
|
22033
|
+
const E = r ? encodeURIComponent(r) : "", c = ue(e.placeholder || ""), y = e.allowNewline === !1 ? ' data-allow-newline="0"' : ' data-allow-newline="1"', h = ur(r || e.placeholder || ""), m = i && !r ? 18 : 0;
|
|
22034
|
+
return `<span contenteditable="false" data-type="variable" data-variable-render="antd-textarea" data-key="${e.key}" data-value="${E}" data-placeholder="${c}" data-estimated-width="${Math.min(
|
|
22033
22035
|
600,
|
|
22034
22036
|
h + m
|
|
22035
22037
|
)}"${y}${a}${s} class="rte-variable-host-v2"></span>`;
|
|
@@ -22051,7 +22053,7 @@ function $a(e, t) {
|
|
|
22051
22053
|
return { hasFile: !0, fileName: e.name, uploadIcon: n };
|
|
22052
22054
|
}
|
|
22053
22055
|
const Fb = (e, t) => {
|
|
22054
|
-
const n = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", r = nt(e.tooltip), a = r ? ` data-tooltip="${ue(r)}"` : "", { hasFile: i, fileName: s, uploadIcon: o } = $a(t[e.key], e.text), u = i ? "" : "hidden", l = r && !i ? "" : "hidden", f = i ? "has-file" : "", p = i && s ? ` data-file-name="${s.replace(/"/g, """)}"` : "",
|
|
22056
|
+
const n = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", r = nt(e.tooltip), a = r ? ` data-tooltip="${ue(r)}"` : "", { hasFile: i, fileName: s, uploadIcon: o } = $a(t[e.key], e.text), u = i ? "" : "hidden", l = r && !i ? "" : "hidden", f = i ? "has-file" : "", p = i && s ? ` data-file-name="${s.replace(/"/g, """)}"` : "", E = (e.text || "").trim(), y = i && E.length >= 12 ? `<span ${n} contenteditable="false" class="exclusion-wrapper upload-hint">${E}</span>` : "";
|
|
22055
22057
|
return { uploadHtml: `<span contenteditable="false" data-type="upload" data-key="${e.key}"${a} class="upload-chip"><span class="upload-inner-wrapper ${f}"><span class="upload-icon">${o}</span><span class="upload-label"${p}>${s || e.text}</span>${r ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${l}" data-upload-key="${e.key}" data-tooltip="${ue(r)}" ></i>` : ""}<span class="file-remove-btn ${u}" title="移除文件">×</span></span></span>`, hintHtml: y };
|
|
22056
22058
|
}, Hb = (e, t, n) => {
|
|
22057
22059
|
const r = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "";
|
|
@@ -22070,8 +22072,8 @@ const Fb = (e, t) => {
|
|
|
22070
22072
|
}
|
|
22071
22073
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${Js}<span class="rte-upload-batch-chips">${_}${n}</span></span>` : `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${_}${n}</span>`;
|
|
22072
22074
|
}
|
|
22073
|
-
const i = nt(e.tooltip), s = i ? ` data-tooltip="${ue(i)}"` : "", { hasFile: o, fileName: u, uploadIcon: l } = $a(t[e.key], e.text), f = o ? "" : "hidden", p = i && !o ? "" : "hidden",
|
|
22074
|
-
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Js}${
|
|
22075
|
+
const i = nt(e.tooltip), s = i ? ` data-tooltip="${ue(i)}"` : "", { hasFile: o, fileName: u, uploadIcon: l } = $a(t[e.key], e.text), f = o ? "" : "hidden", p = i && !o ? "" : "hidden", E = o ? "has-file" : "", c = o && u ? ` data-file-name="${u.replace(/"/g, """)}"` : "", y = (e.text || "").trim(), m = o && e.showHint === !0 && y.length >= 12 ? `<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${y}</span>` : "", g = `<span contenteditable="false" data-type="upload" data-key="${e.key}"${s} class="upload-chip"><span class="upload-inner-wrapper ${E}"><span class="upload-icon">${l}</span><span class="upload-label"${c}>${u || e.text}</span>${i ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${p}" data-upload-key="${e.key}" data-tooltip="${ue(i)}" ></i>` : ""}<span class="file-remove-btn ${f}" title="移除文件">×</span></span></span>`;
|
|
22076
|
+
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Js}${g}${n}</span>${m}` : g + n + m;
|
|
22075
22077
|
}, $b = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, Ub = (e, t) => {
|
|
22076
22078
|
const n = t[e.key] || e.defaultValue || "", r = encodeURIComponent(JSON.stringify(e.options || [])), a = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", i = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", s = e.required ? ' data-required="true"' : "", o = `<div data-type="select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-select-host"></div>`;
|
|
22077
22079
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${$b}${o}</span>` : o;
|
|
@@ -22079,42 +22081,42 @@ const Fb = (e, t) => {
|
|
|
22079
22081
|
const r = t[e.key] || "", a = typeof e.maxHeight == "number" ? e.maxHeight : 252, i = e.placeholder ? ` placeholder="${e.placeholder}"` : "", s = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${a}px;"${i}>${r}</textarea>`, o = `<div class="rte-textarea-wrapper" data-key="${e.key}">${s}</div>`;
|
|
22080
22082
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${qb}${o}</span>` : o;
|
|
22081
22083
|
}, Vb = (e, t, n) => {
|
|
22082
|
-
const r = t[e.key] || e.text || "", a = typeof e.minHeight == "number" ? e.minHeight : 40, i = typeof e.maxHeight == "number" ? e.maxHeight : 160, s = Math.max(i, a), o = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", u = e.expandable !== !1, l = r, f = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${o} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`, p = u ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>` : "",
|
|
22084
|
+
const r = t[e.key] || e.text || "", a = typeof e.minHeight == "number" ? e.minHeight : 40, i = typeof e.maxHeight == "number" ? e.maxHeight : 160, s = Math.max(i, a), o = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", u = e.expandable !== !1, l = r, f = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${o} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`, p = u ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>` : "", E = `<div class="rte-richtext-wrapper${u ? " rte-richtext-toggleable" : ""}" data-key="${e.key}">${f}${p}</div>`, c = `<div class="rte-richtext-container" data-key="${e.key}">${E}</div>`;
|
|
22083
22085
|
return e.required ? `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${c}</div>` : c;
|
|
22084
22086
|
}, Gb = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, Yb = (e, t) => {
|
|
22085
|
-
const n = `${e.key}__url`, a = Object.prototype.hasOwnProperty.call(t, n) ? t[n] : void 0, i = e.key ? t[e.key] : void 0, s = a ?? i ?? e.text ?? "", o = !s, u = o ? "" : s, l = o ? "show-placeholder" : "", f = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", p = nt(e.tooltip),
|
|
22087
|
+
const n = `${e.key}__url`, a = Object.prototype.hasOwnProperty.call(t, n) ? t[n] : void 0, i = e.key ? t[e.key] : void 0, s = a ?? i ?? e.text ?? "", o = !s, u = o ? "" : s, l = o ? "show-placeholder" : "", f = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", p = nt(e.tooltip), E = p ? ` data-tooltip="${ue(p)}" data-variable-key="${e.key || ""}"` : "", c = p && o ? "rte-variable-with-icon" : "", y = p && o ? "" : "hidden", h = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${ue(
|
|
22086
22088
|
e.placeholder || ""
|
|
22087
|
-
)}"${f}${
|
|
22089
|
+
)}"${f}${E} class="variable-chip rte-report-url ${l}${c ? ` ${c}` : ""}">${u}${p ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${ue(p)}" ></i>` : ""}</span>`;
|
|
22088
22090
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Gb}${h}</span>` : h;
|
|
22089
22091
|
}, Wb = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, jb = (e, t) => {
|
|
22090
|
-
const n = `${e.key}__name`, a = Object.prototype.hasOwnProperty.call(t, n) ? t[n] : void 0, i = e.key ? t[e.key] : void 0, s = a ?? i ?? e.text ?? "", o = !s, u = o ? "" : s, l = o ? "show-placeholder" : "", f = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", p = nt(e.tooltip),
|
|
22092
|
+
const n = `${e.key}__name`, a = Object.prototype.hasOwnProperty.call(t, n) ? t[n] : void 0, i = e.key ? t[e.key] : void 0, s = a ?? i ?? e.text ?? "", o = !s, u = o ? "" : s, l = o ? "show-placeholder" : "", f = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", p = nt(e.tooltip), E = p ? ` data-tooltip="${ue(p)}" data-variable-key="${e.key || ""}"` : "", c = p && o ? "rte-variable-with-icon" : "", y = p && o ? "" : "hidden", h = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown-name" data-placeholder="${ue(
|
|
22091
22093
|
e.placeholder || ""
|
|
22092
|
-
)}"${f}${
|
|
22094
|
+
)}"${f}${E} class="variable-chip rte-markdown-name ${l}${c ? ` ${c}` : ""}">${u}${p ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${ue(p)}" ></i>` : ""}</span>`;
|
|
22093
22095
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Wb}${h}</span>` : h;
|
|
22094
22096
|
}, Xb = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, Kb = (e, t) => {
|
|
22095
|
-
const n = e.sourceTextKey || `${e.key}__sourceText`, a = Object.prototype.hasOwnProperty.call(t, n) ? t[n] : void 0, i = e.key ? t[e.key] : void 0, s = a ?? i ?? e.text ?? "", o = !s, u = o ? "" : s, l = o ? "show-placeholder" : "", f = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", p = e.sourceTextKey ? ` data-source-text-key="${ue(e.sourceTextKey)}"` : "",
|
|
22097
|
+
const n = e.sourceTextKey || `${e.key}__sourceText`, a = Object.prototype.hasOwnProperty.call(t, n) ? t[n] : void 0, i = e.key ? t[e.key] : void 0, s = a ?? i ?? e.text ?? "", o = !s, u = o ? "" : s, l = o ? "show-placeholder" : "", f = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", p = e.sourceTextKey ? ` data-source-text-key="${ue(e.sourceTextKey)}"` : "", E = nt(e.tooltip), c = E ? ` data-tooltip="${ue(E)}" data-variable-key="${e.key || ""}"` : "", y = E && o ? "rte-variable-with-icon" : "", h = E && o ? "" : "hidden", m = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown" data-placeholder="${ue(
|
|
22096
22098
|
e.placeholder || ""
|
|
22097
|
-
)}"${f}${p}${c} class="variable-chip rte-markdown-input ${l}${y ? ` ${y}` : ""}">${u}${
|
|
22099
|
+
)}"${f}${p}${c} class="variable-chip rte-markdown-input ${l}${y ? ` ${y}` : ""}">${u}${E ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${h}" data-variable-key="${e.key}" data-tooltip="${ue(E)}" ></i>` : ""}</span>`;
|
|
22098
22100
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Xb}${m}</span>` : m;
|
|
22099
22101
|
}, Qb = (e, t) => {
|
|
22100
|
-
const n = typeof e.moduleIndex == "number" ? e.moduleIndex : 0, r = `${e.key}__module_${n}`, i = Object.prototype.hasOwnProperty.call(t, r) ? t[r] : e.text || "", s = typeof e.minHeight == "number" ? e.minHeight : 80, o = typeof e.maxHeight == "number" ? e.maxHeight : 240, u = Math.max(o, s), l = e.placeholder ? ` data-placeholder="${ue(e.placeholder)}"` : "", f = i, p = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${n}" class="rte-richtext rte-report-module"${l} style="min-height:${s}px;max-height:${u}px;overflow:auto;">${f}</div>`,
|
|
22102
|
+
const n = typeof e.moduleIndex == "number" ? e.moduleIndex : 0, r = `${e.key}__module_${n}`, i = Object.prototype.hasOwnProperty.call(t, r) ? t[r] : e.text || "", s = typeof e.minHeight == "number" ? e.minHeight : 80, o = typeof e.maxHeight == "number" ? e.maxHeight : 240, u = Math.max(o, s), l = e.placeholder ? ` data-placeholder="${ue(e.placeholder)}"` : "", f = i, p = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${n}" class="rte-richtext rte-report-module"${l} style="min-height:${s}px;max-height:${u}px;overflow:auto;">${f}</div>`, E = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${p}</div>`, c = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${E}</div>`;
|
|
22101
22103
|
return e.required ? `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${c}</div>` : c;
|
|
22102
22104
|
}, Jb = (e, t) => {
|
|
22103
|
-
const n = typeof e.moduleIndex == "number" ? e.moduleIndex : 0, r = `${e.key}__module_${n}`, i = Object.prototype.hasOwnProperty.call(t, r) ? t[r] : e.text || "", s = typeof e.minHeight == "number" ? e.minHeight : 80, o = typeof e.maxHeight == "number" ? e.maxHeight : 240, u = Math.max(o, s), l = e.placeholder ? ` data-placeholder="${ue(e.placeholder)}"` : "", f = i,
|
|
22105
|
+
const n = typeof e.moduleIndex == "number" ? e.moduleIndex : 0, r = `${e.key}__module_${n}`, i = Object.prototype.hasOwnProperty.call(t, r) ? t[r] : e.text || "", s = typeof e.minHeight == "number" ? e.minHeight : 80, o = typeof e.maxHeight == "number" ? e.maxHeight : 240, u = Math.max(o, s), l = e.placeholder ? ` data-placeholder="${ue(e.placeholder)}"` : "", f = i, E = typeof f == "string" && f.startsWith("请补充:") ? ' data-is-placeholder="true"' : "", c = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="markdown-module" data-module-index="${n}" class="rte-richtext rte-markdown-module"${l}${E} style="min-height:${s}px;max-height:${u}px;overflow:auto;">${f}</div>`, y = `<div class="rte-richtext-wrapper rte-markdown-module-wrapper" data-key="${e.key}">${c}</div>`, h = `<div class="rte-richtext-container rte-markdown-module-container" data-key="${e.key}">${y}</div>`;
|
|
22104
22106
|
return e.required ? `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${h}</div>` : h;
|
|
22105
22107
|
}, Zb = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, eT = (e, t) => {
|
|
22106
22108
|
const n = t[e.key] || "", r = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", a = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", i = e.disableFuture ? ' data-disable-future="true"' : "", s = `<div data-type="datepicker" data-key="${e.key}" data-value="${n}" class="rte-datepicker-host"${r}${a}${i}></div>`;
|
|
22107
22109
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Zb}${s}</span>` : s;
|
|
22108
22110
|
}, tT = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, nT = (e, t) => {
|
|
22109
|
-
const n = t[e.key] || (typeof e.defaultNumber == "number" ? String(e.defaultNumber) : ""), r = typeof e.min == "number" ? ` min="${e.min}"` : "", a = typeof e.max == "number" ? ` max="${e.max}"` : "", i = e.placeholder ? ue(e.placeholder) : "", s = i ? ` placeholder="${i}"` : "", o = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", u = n || e.placeholder || "", l = ur(u), f = `<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${ue(n)}" style="width: ${l}px;"${r}${a}${s}${o} />`,
|
|
22110
|
-
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${tT}${
|
|
22111
|
+
const n = t[e.key] || (typeof e.defaultNumber == "number" ? String(e.defaultNumber) : ""), r = typeof e.min == "number" ? ` min="${e.min}"` : "", a = typeof e.max == "number" ? ` max="${e.max}"` : "", i = e.placeholder ? ue(e.placeholder) : "", s = i ? ` placeholder="${i}"` : "", o = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", u = n || e.placeholder || "", l = ur(u), f = `<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${ue(n)}" style="width: ${l}px;"${r}${a}${s}${o} />`, E = `<span class="rte-number-input-wrap" data-placeholder="${i}" data-has-value="${n ? "1" : "0"}">${f}</span>`;
|
|
22112
|
+
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${tT}${E}</span>` : E;
|
|
22111
22113
|
}, rT = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, aT = (e, t, n) => {
|
|
22112
22114
|
const r = e.maxCount || 9, a = n[e.key] || 1, i = Math.min(a, r);
|
|
22113
22115
|
if (e.required) {
|
|
22114
22116
|
const u = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", l = nt(e.tooltip);
|
|
22115
22117
|
let f = "";
|
|
22116
22118
|
for (let p = 0; p < i; p++) {
|
|
22117
|
-
const
|
|
22119
|
+
const E = `${e.key}_${p}`, c = t[E] || "", y = !c, h = y ? "" : ue(c).replace(/\n/g, "<br/>"), m = y ? "show-placeholder" : "", g = l && y ? "rte-variable-with-icon" : "", b = l ? ` data-tooltip="${ue(l)}" data-variable-key="${e.key || ""}"` : "", T = l && y ? "" : "hidden", C = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", S = `<span contenteditable="true" data-type="variable" data-key="${E}" data-multi-key="${e.key}" data-index="${p}" data-placeholder="${e.placeholder || ""}"${C}${b} class="variable-chip ${m}${g ? ` ${g}` : ""}">${h}${l ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${T}" data-variable-key="${e.key}" data-tooltip="${ue(l)}" ></i>` : ""}</span>`;
|
|
22118
22120
|
p === 0 ? f += `<span ${u} class="exclusion-wrapper required-upload-group required-multi-first">${rT}${S}</span>` : f += S;
|
|
22119
22121
|
}
|
|
22120
22122
|
return f;
|
|
@@ -22122,7 +22124,7 @@ const Fb = (e, t) => {
|
|
|
22122
22124
|
const s = nt(e.tooltip);
|
|
22123
22125
|
let o = "";
|
|
22124
22126
|
for (let u = 0; u < i; u++) {
|
|
22125
|
-
const l = `${e.key}_${u}`, f = t[l] || "", p = !f,
|
|
22127
|
+
const l = `${e.key}_${u}`, f = t[l] || "", p = !f, E = p ? "" : ue(f).replace(/\n/g, "<br/>"), c = p ? "show-placeholder" : "", y = s && p ? "rte-variable-with-icon" : "", h = s ? ` data-tooltip="${ue(s)}" data-variable-key="${e.key || ""}"` : "", m = s && p ? "" : "hidden", g = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", b = `<span contenteditable="true" data-type="variable" data-key="${l}" data-multi-key="${e.key}" data-index="${u}" data-placeholder="${e.placeholder || ""}"${g}${h} class="variable-chip ${c}${y ? ` ${y}` : ""}">${E}${s ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${m}" data-variable-key="${e.key}" data-tooltip="${ue(s)}" ></i>` : ""}</span>`;
|
|
22126
22128
|
o += b;
|
|
22127
22129
|
}
|
|
22128
22130
|
return o;
|
|
@@ -22130,14 +22132,14 @@ const Fb = (e, t) => {
|
|
|
22130
22132
|
const n = e.key, r = t[n], a = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", i = nt(e.tooltip), s = i ? ` data-tooltip="${ue(i)}"` : "";
|
|
22131
22133
|
let o;
|
|
22132
22134
|
if (r?.status === "loading") {
|
|
22133
|
-
const l = typeof r.progress == "number" ? Math.min(Math.max(r.progress, 0), 100) : 0, f = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Crect fill='%23999' width='1' height='1'/%3E%3C/svg%3E", p = 2 * Math.PI * 6.5,
|
|
22135
|
+
const l = typeof r.progress == "number" ? Math.min(Math.max(r.progress, 0), 100) : 0, f = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Crect fill='%23999' width='1' height='1'/%3E%3C/svg%3E", p = 2 * Math.PI * 6.5, E = p * (1 - l / 100), c = `<svg class="video-upload-progress-ring" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="6.5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><circle cx="8" cy="8" r="6.5" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="${p}" stroke-dashoffset="${E}" transform="rotate(-90 8 8)"/></svg>`;
|
|
22134
22136
|
o = `<span class="video-inner-wrapper video-upload-inner video-uploading"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${f}" alt="thumbnail" /><span class="video-thumbnail-overlay"></span>${c}</span><span class="video-label">解析中...</span></span>`;
|
|
22135
22137
|
} else if (r?.status === "success" && r.videoUrl) {
|
|
22136
22138
|
const l = r.fileName || "视频", f = '<svg class="video-play-icon" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="rgba(0,0,0,0.5)"/><polygon points="6.5,4.5 6.5,11.5 12,8" fill="#fff"/></svg>';
|
|
22137
22139
|
o = `<span class="video-inner-wrapper video-url-inner has-video">${r.thumbnail ? `<span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ue(r.thumbnail)}" alt="thumbnail" />${f}</span>` : `<span class="video-thumbnail-wrapper"><span class="video-thumbnail video-thumbnail-placeholder"><i class="iconfont icon-shipin" style="font-size:20px;color:#8c8c8c;"></i></span>${f}</span>`}<span class="video-label" data-file-name="${ue(l)}">${ue(l)}</span><span class="video-remove-btn" title="移除视频">×</span></span>`;
|
|
22138
22140
|
} else {
|
|
22139
|
-
const l = e.placeholder || "请粘贴想要分析的抖音视频链接", f = i ? "rte-variable-with-icon" : "", p = i ? "" : "hidden",
|
|
22140
|
-
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Ua}${
|
|
22141
|
+
const l = e.placeholder || "请粘贴想要分析的抖音视频链接", f = i ? "rte-variable-with-icon" : "", p = i ? "" : "hidden", E = `<span contenteditable="true" data-type="variable" data-key="${n}" data-node-type="video-url" data-placeholder="${ue(l)}"${a}${s} class="variable-chip rte-video-url show-placeholder${f ? ` ${f}` : ""}">${i ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${n}" data-tooltip="${ue(i)}" ></i>` : ""}</span>`;
|
|
22142
|
+
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Ua}${E}</span>` : E;
|
|
22141
22143
|
}
|
|
22142
22144
|
const u = `<span contenteditable="false" data-type="video-url" data-key="${n}"${s}${a} class="video-chip">${o}</span>`;
|
|
22143
22145
|
return e.required ? `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">${Ua}${u}</span>` : u;
|
|
@@ -22145,7 +22147,7 @@ const Fb = (e, t) => {
|
|
|
22145
22147
|
const n = e.key, r = t[n], a = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", i = nt(e.tooltip), s = i ? ` data-tooltip="${ue(i)}"` : "";
|
|
22146
22148
|
let o;
|
|
22147
22149
|
if (r?.status === "loading") {
|
|
22148
|
-
const l = typeof r.progress == "number" ? Math.min(Math.max(r.progress, 0), 100) : 0, f = r.fileName || "上传中...", p = r.thumbnail || "",
|
|
22150
|
+
const l = typeof r.progress == "number" ? Math.min(Math.max(r.progress, 0), 100) : 0, f = r.fileName || "上传中...", p = r.thumbnail || "", E = 2 * Math.PI * 6.5, c = E * (1 - l / 100), y = `<svg class="video-upload-progress-ring" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="6.5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><circle cx="8" cy="8" r="6.5" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="${E}" stroke-dashoffset="${c}" transform="rotate(-90 8 8)"/></svg>`;
|
|
22149
22151
|
o = `<span class="video-inner-wrapper video-upload-inner video-uploading"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ue(p)}" alt="thumbnail" /><span class="video-thumbnail-overlay"></span>${y}</span><span class="video-label">${ue(f)}</span></span>`;
|
|
22150
22152
|
} else if (r?.status === "success" && r.thumbnail && r.videoUrl) {
|
|
22151
22153
|
const l = r.fileName || "视频文件";
|
|
@@ -22163,15 +22165,15 @@ function oT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22163
22165
|
const m = (h ?? "").trim();
|
|
22164
22166
|
return m.length === 1 && l.test(m);
|
|
22165
22167
|
}, p = (h) => {
|
|
22166
|
-
const m = h ?? "",
|
|
22167
|
-
if (!
|
|
22168
|
-
const b =
|
|
22168
|
+
const m = h ?? "", g = m.match(new RegExp(`^\\s*(${l.source})`));
|
|
22169
|
+
if (!g) return null;
|
|
22170
|
+
const b = g[1], T = m.replace(new RegExp(`^\\s*${l.source}`), "");
|
|
22169
22171
|
return { punct: b, rest: T };
|
|
22170
|
-
},
|
|
22172
|
+
}, E = (h) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${h}</span>`, c = [];
|
|
22171
22173
|
let y = 0;
|
|
22172
22174
|
for (; y < t.length; ) {
|
|
22173
22175
|
const h = t[y], m = y + 1 < t.length ? t[y + 1] : null;
|
|
22174
|
-
let
|
|
22176
|
+
let g = !1;
|
|
22175
22177
|
if (h.type === "text" && (h.text?.includes("icon-bitian") || h.className === "rte-text-required") && m) {
|
|
22176
22178
|
const _ = m.type === "upload" && m.exclusionGroup === "fileInput" && h.exclusionGroup === "fileInput" && h.exclusionGroup === m.exclusionGroup, v = m.type === "variable" && m.exclusionGroup === "textInput" && h.exclusionGroup === "textInput" && h.exclusionGroup === m.exclusionGroup;
|
|
22177
22179
|
if (_) {
|
|
@@ -22206,20 +22208,20 @@ function oT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22206
22208
|
else if (h.type === "markdown" && h.key)
|
|
22207
22209
|
A = Kb(h, a);
|
|
22208
22210
|
else if (h.type === "upload" && h.key) {
|
|
22209
|
-
const _ = !!m && m.type === "text" && !m.className && !m.exclusionGroup && f(m.text), v = _ ? (m.text ?? "").trim() : "", k = v ?
|
|
22210
|
-
_ && (
|
|
22211
|
+
const _ = !!m && m.type === "text" && !m.className && !m.exclusionGroup && f(m.text), v = _ ? (m.text ?? "").trim() : "", k = v ? E(v) : "";
|
|
22212
|
+
_ && (g = !0), A = Hb(h, n, k);
|
|
22211
22213
|
} else h.type === "select" && h.key ? A = Ub(h, a) : h.type === "textarea" && h.key ? A = zb(h, a) : h.type === "richtext" && h.key ? A = Vb(h, a) : h.type === "report-module" && h.key ? A = Qb(h, a) : h.type === "markdown-module" && h.key ? A = Jb(h, a) : h.type === "datepicker" && h.key ? A = eT(h, a) : h.type === "number-input" && h.key ? A = nT(h, a) : h.type === "multi-variable" && h.key ? A = aT(h, a, i) : h.type === "video-url" && h.key ? A = iT(h, u || {}) : h.type === "video-upload" && h.key && (A = sT(h, u || {}));
|
|
22212
22214
|
const L = C + A + S;
|
|
22213
22215
|
if (h.type === "text" && !h.className && !h.exclusionGroup) {
|
|
22214
22216
|
if (f(h.text) && c.length > 0) {
|
|
22215
22217
|
const v = c[c.length - 1], k = (h.text ?? "").trim();
|
|
22216
|
-
c[c.length - 1] = `<span class="rte-inline-group">${v}${
|
|
22218
|
+
c[c.length - 1] = `<span class="rte-inline-group">${v}${E(k)}</span>`, y++;
|
|
22217
22219
|
continue;
|
|
22218
22220
|
}
|
|
22219
22221
|
const _ = p(h.text);
|
|
22220
22222
|
if (_ && c.length > 0) {
|
|
22221
22223
|
const v = c[c.length - 1];
|
|
22222
|
-
c[c.length - 1] = `<span class="rte-inline-group">${v}${
|
|
22224
|
+
c[c.length - 1] = `<span class="rte-inline-group">${v}${E(_.punct)}</span>`;
|
|
22223
22225
|
const k = _.rest;
|
|
22224
22226
|
if (k) {
|
|
22225
22227
|
const N = k.replace(/\n/g, "<br/>");
|
|
@@ -22229,7 +22231,7 @@ function oT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22229
22231
|
continue;
|
|
22230
22232
|
}
|
|
22231
22233
|
}
|
|
22232
|
-
c.push(L), y +=
|
|
22234
|
+
c.push(L), y += g ? 2 : 1;
|
|
22233
22235
|
}
|
|
22234
22236
|
e.current && (e.current.innerHTML = c.join(""), setTimeout(() => {
|
|
22235
22237
|
if (!e.current) return;
|
|
@@ -22253,18 +22255,18 @@ function oT(e, t, n, r, a, i = {}, s, o, u) {
|
|
|
22253
22255
|
}, 0));
|
|
22254
22256
|
}
|
|
22255
22257
|
function uT(e, t, n, r, a = {}, i, s, o, u, l, f) {
|
|
22256
|
-
const p = Z(/* @__PURE__ */ new Set()),
|
|
22258
|
+
const p = Z(/* @__PURE__ */ new Set()), E = Z(""), c = Z(!1), y = Z(l), h = oe(() => {
|
|
22257
22259
|
if (!e.current) return;
|
|
22258
22260
|
if (t.length === 0) {
|
|
22259
22261
|
e.current.innerHTML = "";
|
|
22260
22262
|
return;
|
|
22261
22263
|
}
|
|
22262
22264
|
const m = t.filter((A) => A.key && A.type !== "report-module" && A.type !== "markdown-module").map((A) => `${A.type}:${A.key}`).join("|");
|
|
22263
|
-
|
|
22264
|
-
const
|
|
22265
|
+
E.current !== m && (E.current = m, p.current = /* @__PURE__ */ new Set(), c.current = !0);
|
|
22266
|
+
const g = c.current;
|
|
22265
22267
|
let b = {};
|
|
22266
22268
|
const T = /* @__PURE__ */ new Set();
|
|
22267
|
-
e.current && !
|
|
22269
|
+
e.current && !g && e.current.querySelectorAll('[data-type="variable"]').forEach((L) => {
|
|
22268
22270
|
const _ = L.dataset.key;
|
|
22269
22271
|
if (!_) return;
|
|
22270
22272
|
let v = "";
|
|
@@ -22295,7 +22297,7 @@ function uT(e, t, n, r, a = {}, i, s, o, u, l, f) {
|
|
|
22295
22297
|
const A = e.current;
|
|
22296
22298
|
A.__tempVariableValues === S && delete A.__tempVariableValues;
|
|
22297
22299
|
}
|
|
22298
|
-
}, 100)) :
|
|
22300
|
+
}, 100)) : g || (e.current.querySelectorAll('[data-type="variable"]').forEach((O) => {
|
|
22299
22301
|
const R = O.dataset.key;
|
|
22300
22302
|
if (R) {
|
|
22301
22303
|
const x = (() => {
|
|
@@ -22352,7 +22354,7 @@ function uT(e, t, n, r, a = {}, i, s, o, u, l, f) {
|
|
|
22352
22354
|
const A = new Set(
|
|
22353
22355
|
t.filter((v) => v.type === "upload" && v.key).map((v) => v.key)
|
|
22354
22356
|
), L = {};
|
|
22355
|
-
|
|
22357
|
+
g || Object.entries(l).forEach(([v, k]) => {
|
|
22356
22358
|
if (!Array.isArray(k)) return;
|
|
22357
22359
|
let N = 0;
|
|
22358
22360
|
for (let R = 0; R < k.length; R++)
|
|
@@ -22384,7 +22386,7 @@ function uT(e, t, n, r, a = {}, i, s, o, u, l, f) {
|
|
|
22384
22386
|
o,
|
|
22385
22387
|
u,
|
|
22386
22388
|
f
|
|
22387
|
-
),
|
|
22389
|
+
), g && (c.current = !1), setTimeout(() => {
|
|
22388
22390
|
yr(e);
|
|
22389
22391
|
}, 0), i?.current) {
|
|
22390
22392
|
const { key: A, offset: L } = i.current;
|
|
@@ -22453,8 +22455,8 @@ function lT(e, t, n, r, a) {
|
|
|
22453
22455
|
const s = (l) => typeof l == "string" ? /\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(l) : l.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(l.name || ""), o = (l) => {
|
|
22454
22456
|
const f = l.target?.closest(".upload-info-icon");
|
|
22455
22457
|
if (f && f.classList.contains("upload-info-icon")) {
|
|
22456
|
-
const
|
|
22457
|
-
if (
|
|
22458
|
+
const E = f.dataset.uploadKey;
|
|
22459
|
+
if (E) {
|
|
22458
22460
|
const c = f.dataset.tooltip || "";
|
|
22459
22461
|
let y = !1;
|
|
22460
22462
|
try {
|
|
@@ -22464,20 +22466,20 @@ function lT(e, t, n, r, a) {
|
|
|
22464
22466
|
}
|
|
22465
22467
|
if (y) {
|
|
22466
22468
|
const h = f.closest('[data-type="upload"], [data-type="video-upload"]');
|
|
22467
|
-
r({ key:
|
|
22469
|
+
r({ key: E, anchorEl: h || f, type: "upload" });
|
|
22468
22470
|
} else {
|
|
22469
22471
|
const h = f.closest('[data-type="upload"], [data-type="video-upload"]');
|
|
22470
|
-
r({ key:
|
|
22472
|
+
r({ key: E, anchorEl: h || f, type: "upload" });
|
|
22471
22473
|
}
|
|
22472
22474
|
}
|
|
22473
22475
|
return;
|
|
22474
22476
|
}
|
|
22475
22477
|
const p = l.target?.closest('[data-type="upload"]');
|
|
22476
22478
|
if (p) {
|
|
22477
|
-
const
|
|
22478
|
-
if (
|
|
22479
|
-
const c = n[
|
|
22480
|
-
c && s(c) && r({ key:
|
|
22479
|
+
const E = p.dataset.key;
|
|
22480
|
+
if (E) {
|
|
22481
|
+
const c = n[E];
|
|
22482
|
+
c && s(c) && r({ key: E, anchorEl: p, type: "upload-preview" });
|
|
22481
22483
|
}
|
|
22482
22484
|
}
|
|
22483
22485
|
}, u = (l) => {
|
|
@@ -22497,10 +22499,10 @@ function lT(e, t, n, r, a) {
|
|
|
22497
22499
|
}
|
|
22498
22500
|
return;
|
|
22499
22501
|
}
|
|
22500
|
-
const
|
|
22501
|
-
if (
|
|
22502
|
+
const E = l.target?.closest('[data-type="upload"], [data-type="video-upload"]');
|
|
22503
|
+
if (E) {
|
|
22502
22504
|
const c = p;
|
|
22503
|
-
if (c?.closest?.(".rte-tooltip-overlay") || c &&
|
|
22505
|
+
if (c?.closest?.(".rte-tooltip-overlay") || c && E.contains(c))
|
|
22504
22506
|
return;
|
|
22505
22507
|
r(null);
|
|
22506
22508
|
}
|
|
@@ -22517,8 +22519,8 @@ function cT(e, t, n, r, a) {
|
|
|
22517
22519
|
const s = (f) => {
|
|
22518
22520
|
if (r === "hideTagClose")
|
|
22519
22521
|
return;
|
|
22520
|
-
const p = f.currentTarget,
|
|
22521
|
-
|
|
22522
|
+
const p = f.currentTarget, E = p.dataset.tooltip, c = p.dataset.tagKey || "";
|
|
22523
|
+
E && n({ key: c, anchorEl: p, type: "tag" });
|
|
22522
22524
|
}, o = (f) => {
|
|
22523
22525
|
a || f.relatedTarget?.closest?.(".rte-tooltip-overlay") || n(null);
|
|
22524
22526
|
};
|
|
@@ -22570,10 +22572,10 @@ function dT(e, t, n, r) {
|
|
|
22570
22572
|
n(null);
|
|
22571
22573
|
return;
|
|
22572
22574
|
}
|
|
22573
|
-
const
|
|
22575
|
+
const E = !!l.closest?.(".variable-info-icon"), c = !!l.closest?.(
|
|
22574
22576
|
'[data-type="variable"][data-node-type="report-url"][data-tooltip]'
|
|
22575
22577
|
);
|
|
22576
|
-
!
|
|
22578
|
+
!E && !c && n(null);
|
|
22577
22579
|
}
|
|
22578
22580
|
};
|
|
22579
22581
|
return a.addEventListener("mouseover", i, !0), a.addEventListener("mouseout", s, !0), () => {
|
|
@@ -22586,12 +22588,12 @@ function fT(e, t, n, r, a) {
|
|
|
22586
22588
|
const i = e.current;
|
|
22587
22589
|
if (!i) return;
|
|
22588
22590
|
const s = (p) => typeof p == "string" ? /\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(p) : p.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(p.name || ""), o = (p) => {
|
|
22589
|
-
const
|
|
22591
|
+
const E = p.currentTarget, c = E.dataset.fileName, y = E.closest('[data-type="upload"]'), h = y?.dataset.key || "", m = h ? n[h] : null;
|
|
22590
22592
|
if (m && s(m)) {
|
|
22591
|
-
r({ key: h, anchorEl: y ||
|
|
22593
|
+
r({ key: h, anchorEl: y || E, type: "upload-preview" });
|
|
22592
22594
|
return;
|
|
22593
22595
|
}
|
|
22594
|
-
c && r({ key: h, anchorEl: y ||
|
|
22596
|
+
c && r({ key: h, anchorEl: y || E, type: "upload-label" });
|
|
22595
22597
|
}, u = (p) => {
|
|
22596
22598
|
a || p.relatedTarget?.closest?.(".rte-tooltip-overlay") || r(null);
|
|
22597
22599
|
};
|
|
@@ -22599,15 +22601,15 @@ function fT(e, t, n, r, a) {
|
|
|
22599
22601
|
const f = () => {
|
|
22600
22602
|
i.querySelectorAll(
|
|
22601
22603
|
".upload-label[data-file-name]"
|
|
22602
|
-
).forEach((
|
|
22603
|
-
|
|
22604
|
+
).forEach((E) => {
|
|
22605
|
+
E.addEventListener("mouseenter", o), E.addEventListener("mouseleave", u);
|
|
22604
22606
|
});
|
|
22605
22607
|
};
|
|
22606
22608
|
return l = requestAnimationFrame(() => {
|
|
22607
22609
|
l = requestAnimationFrame(f);
|
|
22608
22610
|
}), () => {
|
|
22609
|
-
cancelAnimationFrame(l), i.querySelectorAll(".upload-label[data-file-name]").forEach((
|
|
22610
|
-
|
|
22611
|
+
cancelAnimationFrame(l), i.querySelectorAll(".upload-label[data-file-name]").forEach((E) => {
|
|
22612
|
+
E.removeEventListener("mouseenter", o), E.removeEventListener("mouseleave", u);
|
|
22611
22613
|
});
|
|
22612
22614
|
};
|
|
22613
22615
|
}, [t, n, e, r, a]);
|
|
@@ -22631,7 +22633,7 @@ function hT(e, t) {
|
|
|
22631
22633
|
a = !1, i = Date.now();
|
|
22632
22634
|
};
|
|
22633
22635
|
let f = !1, p = 0;
|
|
22634
|
-
const
|
|
22636
|
+
const E = () => {
|
|
22635
22637
|
f = !0;
|
|
22636
22638
|
}, c = () => {
|
|
22637
22639
|
f = !1, p = Date.now();
|
|
@@ -22684,9 +22686,9 @@ function hT(e, t) {
|
|
|
22684
22686
|
} else
|
|
22685
22687
|
T.removeAllRanges();
|
|
22686
22688
|
}
|
|
22687
|
-
},
|
|
22688
|
-
return
|
|
22689
|
-
|
|
22689
|
+
}, g = e.current;
|
|
22690
|
+
return g && (g.addEventListener("compositionstart", E), g.addEventListener("compositionend", c), g.addEventListener("input", y)), document.addEventListener("mousedown", u), document.addEventListener("mouseup", l), document.addEventListener("focusin", h), document.addEventListener("selectionchange", m), () => {
|
|
22691
|
+
g && (g.removeEventListener("compositionstart", E), g.removeEventListener("compositionend", c), g.removeEventListener("input", y)), document.removeEventListener("mousedown", u), document.removeEventListener("mouseup", l), document.removeEventListener("focusin", h), document.removeEventListener("selectionchange", m);
|
|
22690
22692
|
};
|
|
22691
22693
|
}, [e, t]);
|
|
22692
22694
|
}
|
|
@@ -22696,7 +22698,7 @@ function Zu() {
|
|
|
22696
22698
|
(function(n, r) {
|
|
22697
22699
|
e.exports = r();
|
|
22698
22700
|
})(mT, function() {
|
|
22699
|
-
var n = 1e3, r = 6e4, a = 36e5, i = "millisecond", s = "second", o = "minute", u = "hour", l = "day", f = "week", p = "month",
|
|
22701
|
+
var n = 1e3, r = 6e4, a = 36e5, i = "millisecond", s = "second", o = "minute", u = "hour", l = "day", f = "week", p = "month", E = "quarter", c = "year", y = "date", h = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, g = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, b = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
|
|
22700
22702
|
var x = ["th", "st", "nd", "rd"], F = I % 100;
|
|
22701
22703
|
return "[" + I + (x[(F - 20) % 10] || x[F] || x[0]) + "]";
|
|
22702
22704
|
} }, T = function(I, x, F) {
|
|
@@ -22712,7 +22714,7 @@ function Zu() {
|
|
|
22712
22714
|
}, a: function(I) {
|
|
22713
22715
|
return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
|
|
22714
22716
|
}, p: function(I) {
|
|
22715
|
-
return { M: p, y: c, w: f, d: l, D: y, h: u, m: o, s, ms: i, Q:
|
|
22717
|
+
return { M: p, y: c, w: f, d: l, D: y, h: u, m: o, s, ms: i, Q: E }[I] || String(I || "").toLowerCase().replace(/s$/, "");
|
|
22716
22718
|
}, u: function(I) {
|
|
22717
22719
|
return I === void 0;
|
|
22718
22720
|
} }, S = "en", A = {};
|
|
@@ -22846,7 +22848,7 @@ function Zu() {
|
|
|
22846
22848
|
var bt = Ee < 12 ? "AM" : "PM";
|
|
22847
22849
|
return pt ? bt.toLowerCase() : bt;
|
|
22848
22850
|
};
|
|
22849
|
-
return q.replace(
|
|
22851
|
+
return q.replace(g, function(Ee, ke) {
|
|
22850
22852
|
return ke || function(pt) {
|
|
22851
22853
|
switch (pt) {
|
|
22852
22854
|
case "YY":
|
|
@@ -22914,7 +22916,7 @@ function Zu() {
|
|
|
22914
22916
|
case p:
|
|
22915
22917
|
q = ae();
|
|
22916
22918
|
break;
|
|
22917
|
-
case
|
|
22919
|
+
case E:
|
|
22918
22920
|
q = ae() / 3;
|
|
22919
22921
|
break;
|
|
22920
22922
|
case f:
|
|
@@ -23211,12 +23213,12 @@ const { RangePicker: _T } = Al, vT = ({ host: e, onChange: t }) => {
|
|
|
23211
23213
|
loading: l = !1,
|
|
23212
23214
|
placeholder: f,
|
|
23213
23215
|
border: p,
|
|
23214
|
-
background:
|
|
23216
|
+
background: E = "transparent",
|
|
23215
23217
|
hideButtons: c,
|
|
23216
23218
|
maxHeight: y,
|
|
23217
23219
|
minHeight: h,
|
|
23218
23220
|
collapsed: m = !1,
|
|
23219
|
-
reportAnalyze:
|
|
23221
|
+
reportAnalyze: g,
|
|
23220
23222
|
markdownAnalyze: b,
|
|
23221
23223
|
markdownNameAnalyze: T,
|
|
23222
23224
|
onCollapsedChange: C,
|
|
@@ -23301,7 +23303,7 @@ const { RangePicker: _T } = Al, vT = ({ host: e, onChange: t }) => {
|
|
|
23301
23303
|
markdownAnalyzeState: Ft,
|
|
23302
23304
|
markdownNameAnalyzeState: Ht
|
|
23303
23305
|
}), { handleReportUrlBlur: rl, handleMarkdownBlur: al, handleMarkdownNameBlur: il } = Ec({
|
|
23304
|
-
reportAnalyze:
|
|
23306
|
+
reportAnalyze: g,
|
|
23305
23307
|
markdownAnalyze: b,
|
|
23306
23308
|
markdownNameAnalyze: T,
|
|
23307
23309
|
reportAnalyzeState: ht,
|
|
@@ -23553,7 +23555,7 @@ const { RangePicker: _T } = Al, vT = ({ host: e, onChange: t }) => {
|
|
|
23553
23555
|
}), fl = {
|
|
23554
23556
|
...a ? { width: typeof a == "number" ? `${a}px` : a } : {},
|
|
23555
23557
|
...p ? { border: p } : {},
|
|
23556
|
-
...
|
|
23558
|
+
...E ? { background: E } : {},
|
|
23557
23559
|
...y ? { maxHeight: typeof y == "number" ? `${y}px` : y } : {},
|
|
23558
23560
|
...h ? { minHeight: typeof h == "number" ? `${h}px` : h } : {},
|
|
23559
23561
|
...y ? {
|
|
@@ -23824,10 +23826,10 @@ const ro = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
23824
23826
|
onStartAutoLoad: f,
|
|
23825
23827
|
onStopLoading: p
|
|
23826
23828
|
}) => {
|
|
23827
|
-
const [
|
|
23829
|
+
const [E, c] = ie(5), y = Math.ceil(r / n), h = Sn(() => a.length >= y, [a, y]), m = () => Array.from(
|
|
23828
23830
|
{ length: y },
|
|
23829
23831
|
(T, C) => C + 1
|
|
23830
|
-
).filter((T) => !a.includes(T)).slice(0,
|
|
23832
|
+
).filter((T) => !a.includes(T)).slice(0, E);
|
|
23831
23833
|
return /* @__PURE__ */ he("div", { className: "pagination_footer", children: [
|
|
23832
23834
|
/* @__PURE__ */ he("div", { className: "pagination_leftWrap", children: [
|
|
23833
23835
|
/* @__PURE__ */ he("span", { className: "pagination_total", children: [
|
|
@@ -23848,7 +23850,7 @@ const ro = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
23848
23850
|
{
|
|
23849
23851
|
loadIcon: t || void 0,
|
|
23850
23852
|
autoLoading: s,
|
|
23851
|
-
batchSize:
|
|
23853
|
+
batchSize: E,
|
|
23852
23854
|
loadingProgress: o,
|
|
23853
23855
|
disabled: !l || !f,
|
|
23854
23856
|
onBatchSizeChange: c,
|
|
@@ -23904,13 +23906,13 @@ const ro = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
23904
23906
|
cachedPages: l,
|
|
23905
23907
|
onChangePage: f,
|
|
23906
23908
|
onLoadNextPage: p,
|
|
23907
|
-
onStartAutoLoad:
|
|
23909
|
+
onStartAutoLoad: E,
|
|
23908
23910
|
onStopLoading: c,
|
|
23909
23911
|
...y
|
|
23910
23912
|
} = e, h = Z(null), m = oe(
|
|
23911
|
-
(
|
|
23912
|
-
f(
|
|
23913
|
-
key: `${(
|
|
23913
|
+
(g) => {
|
|
23914
|
+
f(g), l.includes(g) && h.current?.scrollTo({
|
|
23915
|
+
key: `${(g - 1) * u + 1}`
|
|
23914
23916
|
});
|
|
23915
23917
|
},
|
|
23916
23918
|
[l, f, u]
|
|
@@ -23940,7 +23942,7 @@ const ro = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
23940
23942
|
cachedPages: l,
|
|
23941
23943
|
onChange: m,
|
|
23942
23944
|
onLoadNextPage: p,
|
|
23943
|
-
onStartAutoLoad:
|
|
23945
|
+
onStartAutoLoad: E,
|
|
23944
23946
|
onStopLoading: c
|
|
23945
23947
|
}
|
|
23946
23948
|
)
|
|
@@ -24062,7 +24064,7 @@ const DT = ({
|
|
|
24062
24064
|
onChange: i,
|
|
24063
24065
|
...s
|
|
24064
24066
|
}) => {
|
|
24065
|
-
const [o, u] = ie(""), [l, f] = ie(0), [p,
|
|
24067
|
+
const [o, u] = ie(""), [l, f] = ie(0), [p, E] = ie(!1), [c, y] = ie(!1), [h, m] = ie(!1), g = Z(void 0), b = Z(void 0), T = Z(e), C = Z(l), S = Z(c), A = Z(o);
|
|
24066
24068
|
se(() => {
|
|
24067
24069
|
T.current = e, C.current = l, S.current = c, A.current = o;
|
|
24068
24070
|
});
|
|
@@ -24081,22 +24083,22 @@ const DT = ({
|
|
|
24081
24083
|
F();
|
|
24082
24084
|
}, [n]), v = oe(() => {
|
|
24083
24085
|
if (T.current.length === 0 || S.current) return;
|
|
24084
|
-
|
|
24086
|
+
E(!0);
|
|
24085
24087
|
const I = T.current[C.current];
|
|
24086
24088
|
A.current ? _(() => {
|
|
24087
24089
|
L(I, () => {
|
|
24088
|
-
|
|
24089
|
-
f((x) => (x + 1) % T.current.length),
|
|
24090
|
+
g.current = window.setTimeout(() => {
|
|
24091
|
+
f((x) => (x + 1) % T.current.length), E(!1);
|
|
24090
24092
|
}, 2e3);
|
|
24091
24093
|
});
|
|
24092
24094
|
}) : L(I, () => {
|
|
24093
|
-
|
|
24094
|
-
f((x) => (x + 1) % T.current.length),
|
|
24095
|
+
g.current = window.setTimeout(() => {
|
|
24096
|
+
f((x) => (x + 1) % T.current.length), E(!1);
|
|
24095
24097
|
}, 2e3);
|
|
24096
24098
|
});
|
|
24097
24099
|
}, [_, L]);
|
|
24098
24100
|
return se(() => (r && e.length > 0 && !c && v(), () => {
|
|
24099
|
-
|
|
24101
|
+
g.current && window.clearTimeout(g.current), b.current && window.clearTimeout(b.current);
|
|
24100
24102
|
}), [l, c, r, e.length, v]), se(() => {
|
|
24101
24103
|
!p && r && e.length > 0 && !c && v();
|
|
24102
24104
|
}, [l, p, r, e.length, c, v]), /* @__PURE__ */ he("div", { style: { position: "relative" }, children: [
|
|
@@ -24109,7 +24111,7 @@ const DT = ({
|
|
|
24109
24111
|
i?.(I.target.value), s.onChange?.(I);
|
|
24110
24112
|
},
|
|
24111
24113
|
onFocus: (I) => {
|
|
24112
|
-
y(!0),
|
|
24114
|
+
y(!0), g.current && window.clearTimeout(g.current), b.current && window.clearTimeout(b.current), E(!1), m(!1), s.onFocus?.(I);
|
|
24113
24115
|
},
|
|
24114
24116
|
onBlur: (I) => {
|
|
24115
24117
|
y(!1), !a && e.length > 0 && (u(""), f(0)), s.onBlur?.(I);
|
|
@@ -24238,12 +24240,12 @@ const PT = ({
|
|
|
24238
24240
|
// 是否禁用组件
|
|
24239
24241
|
rows: p = 4,
|
|
24240
24242
|
// 文本域行数
|
|
24241
|
-
style:
|
|
24243
|
+
style: E,
|
|
24242
24244
|
// 自定义样式
|
|
24243
24245
|
...c
|
|
24244
24246
|
// 其他原生属性
|
|
24245
24247
|
}) => {
|
|
24246
|
-
const [y, h] = ie(""), [m,
|
|
24248
|
+
const [y, h] = ie(""), [m, g] = ie(0), [b, T] = ie(!1), [C, S] = ie(!1), [A, L] = ie(!1), [_, v] = ie(a || ""), k = Z(void 0), N = Z(void 0), O = Z(e), R = Z(m), I = Z(C), x = Z(y), F = Z(null);
|
|
24247
24249
|
se(() => {
|
|
24248
24250
|
O.current = e, R.current = m, I.current = C, x.current = y;
|
|
24249
24251
|
});
|
|
@@ -24267,12 +24269,12 @@ const PT = ({
|
|
|
24267
24269
|
x.current ? H(() => {
|
|
24268
24270
|
$(Q, () => {
|
|
24269
24271
|
k.current = window.setTimeout(() => {
|
|
24270
|
-
|
|
24272
|
+
g((re) => (re + 1) % O.current.length), T(!1);
|
|
24271
24273
|
}, 2e3);
|
|
24272
24274
|
});
|
|
24273
24275
|
}) : $(Q, () => {
|
|
24274
24276
|
k.current = window.setTimeout(() => {
|
|
24275
|
-
|
|
24277
|
+
g((re) => (re + 1) % O.current.length), T(!1);
|
|
24276
24278
|
}, 2e3);
|
|
24277
24279
|
});
|
|
24278
24280
|
}, [H, $]);
|
|
@@ -24284,7 +24286,7 @@ const PT = ({
|
|
|
24284
24286
|
const w = (Q) => {
|
|
24285
24287
|
S(!0), k.current && window.clearTimeout(k.current), N.current && window.clearTimeout(N.current), T(!1), L(!1), c.onFocus?.(Q);
|
|
24286
24288
|
}, V = (Q) => {
|
|
24287
|
-
S(!1), !a && e.length > 0 && (h(""),
|
|
24289
|
+
S(!1), !a && e.length > 0 && (h(""), g(0)), c.onBlur?.(Q);
|
|
24288
24290
|
}, K = (Q) => {
|
|
24289
24291
|
const re = Q.target.value;
|
|
24290
24292
|
o && re.length > o || (i ? i(re) : v(re), c.onChange?.(Q));
|
|
@@ -24294,7 +24296,7 @@ const PT = ({
|
|
|
24294
24296
|
}, ee = (Q) => {
|
|
24295
24297
|
(Q.ctrlKey || Q.metaKey) && Q.key === "Enter" && (Q.preventDefault(), P()), c.onKeyDown?.(Q);
|
|
24296
24298
|
}, ae = i ? a : _, ne = f || !ae.trim() || (o ? ae.length > o : !1);
|
|
24297
|
-
return /* @__PURE__ */ he("div", { style: { position: "relative", ...
|
|
24299
|
+
return /* @__PURE__ */ he("div", { style: { position: "relative", ...E }, children: [
|
|
24298
24300
|
/* @__PURE__ */ he("div", { style: { position: "relative" }, children: [
|
|
24299
24301
|
/* @__PURE__ */ Y(
|
|
24300
24302
|
"textarea",
|
|
@@ -24528,30 +24530,30 @@ const tl = ({
|
|
|
24528
24530
|
onVideoLoaded: l,
|
|
24529
24531
|
onVideoPlay: f,
|
|
24530
24532
|
onVideoPause: p,
|
|
24531
|
-
onVideoEnded:
|
|
24533
|
+
onVideoEnded: E,
|
|
24532
24534
|
className: c,
|
|
24533
24535
|
style: y,
|
|
24534
24536
|
...h
|
|
24535
24537
|
}) => {
|
|
24536
|
-
const m = Z(null), [
|
|
24538
|
+
const m = Z(null), [g, b] = ie(!1), [T, C] = ie(!1), [S, A] = ie(!1), L = oe(() => {
|
|
24537
24539
|
m.current && (m.current.play(), b(!0), f?.());
|
|
24538
24540
|
}, [f]), _ = oe(() => {
|
|
24539
24541
|
m.current && (m.current.pause(), b(!1), p?.());
|
|
24540
24542
|
}, [p]), v = oe(($) => {
|
|
24541
|
-
$.stopPropagation(),
|
|
24542
|
-
}, [
|
|
24543
|
-
C(!0), o && !
|
|
24544
|
-
}, [o,
|
|
24545
|
-
C(!1), o &&
|
|
24546
|
-
}, [o,
|
|
24543
|
+
$.stopPropagation(), g ? _() : L();
|
|
24544
|
+
}, [g, L, _]), k = oe(() => {
|
|
24545
|
+
C(!0), o && !g && L();
|
|
24546
|
+
}, [o, g, L]), N = oe(() => {
|
|
24547
|
+
C(!1), o && g && _();
|
|
24548
|
+
}, [o, g, _]), O = oe(() => {
|
|
24547
24549
|
A(!0), l?.();
|
|
24548
24550
|
}, [l]), R = oe(() => {
|
|
24549
24551
|
b(!0), f?.();
|
|
24550
24552
|
}, [f]), I = oe(() => {
|
|
24551
24553
|
b(!1), p?.();
|
|
24552
24554
|
}, [p]), x = oe(() => {
|
|
24553
|
-
b(!1),
|
|
24554
|
-
}, [
|
|
24555
|
+
b(!1), E?.();
|
|
24556
|
+
}, [E]), F = oe(($) => {
|
|
24555
24557
|
u?.($);
|
|
24556
24558
|
}, [u]);
|
|
24557
24559
|
return /* @__PURE__ */ Y(
|
|
@@ -24594,7 +24596,7 @@ const tl = ({
|
|
|
24594
24596
|
{
|
|
24595
24597
|
className: `video-play-button ${T ? "hovered" : ""}`,
|
|
24596
24598
|
onClick: v,
|
|
24597
|
-
children:
|
|
24599
|
+
children: g ? /* @__PURE__ */ Y(Ml, { className: "play-icon" }) : /* @__PURE__ */ Y(Rl, { className: "play-icon" })
|
|
24598
24600
|
}
|
|
24599
24601
|
),
|
|
24600
24602
|
!S && /* @__PURE__ */ Y("div", { className: "video-loading-mask", children: /* @__PURE__ */ Y("div", { className: "loading-spinner" }) })
|
|
@@ -24720,14 +24722,14 @@ const MT = (e) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
24720
24722
|
style: s,
|
|
24721
24723
|
onClick: o
|
|
24722
24724
|
}) => {
|
|
24723
|
-
const u = Z(null), [l, f] = ie(t || a.md || 3), p = Z(/* @__PURE__ */ new Map()),
|
|
24725
|
+
const u = Z(null), [l, f] = ie(t || a.md || 3), p = Z(/* @__PURE__ */ new Map()), E = oe(() => {
|
|
24724
24726
|
if (!r || t)
|
|
24725
24727
|
return t || a.md || 3;
|
|
24726
24728
|
const m = window.innerWidth;
|
|
24727
24729
|
return m < 576 ? a.xs || 1 : m < 768 ? a.sm || 2 : m < 992 ? a.md || 3 : m < 1200 ? a.lg || 4 : m < 1600 ? a.xl || 5 : a.xxl || 6;
|
|
24728
24730
|
}, [r, t, a]), c = oe(() => {
|
|
24729
24731
|
if (!u.current) return;
|
|
24730
|
-
const m = l,
|
|
24732
|
+
const m = l, g = u.current, T = (g.offsetWidth - n * (m - 1)) / m, C = new Array(m).fill(0);
|
|
24731
24733
|
e.forEach((A, L) => {
|
|
24732
24734
|
const _ = A.id || L, v = p.current.get(_);
|
|
24733
24735
|
if (!v) return;
|
|
@@ -24735,16 +24737,16 @@ const MT = (e) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
24735
24737
|
v.style.position = "absolute", v.style.left = `${O}px`, v.style.top = `${R}px`, v.style.width = `${T}px`, C[N] += v.offsetHeight + n;
|
|
24736
24738
|
});
|
|
24737
24739
|
const S = Math.max(...C);
|
|
24738
|
-
|
|
24740
|
+
g.style.height = `${S}px`;
|
|
24739
24741
|
}, [e, l, n]);
|
|
24740
24742
|
se(() => {
|
|
24741
24743
|
const m = () => {
|
|
24742
|
-
const
|
|
24743
|
-
|
|
24744
|
+
const g = E();
|
|
24745
|
+
g !== l && f(g);
|
|
24744
24746
|
};
|
|
24745
24747
|
if (r)
|
|
24746
24748
|
return window.addEventListener("resize", m), m(), () => window.removeEventListener("resize", m);
|
|
24747
|
-
}, [r,
|
|
24749
|
+
}, [r, E, l]), se(() => {
|
|
24748
24750
|
const m = setTimeout(() => {
|
|
24749
24751
|
c();
|
|
24750
24752
|
}, 100);
|
|
@@ -24765,8 +24767,8 @@ const MT = (e) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
24765
24767
|
width: "100%",
|
|
24766
24768
|
...s
|
|
24767
24769
|
},
|
|
24768
|
-
children: e.map((m,
|
|
24769
|
-
const b = m.id ||
|
|
24770
|
+
children: e.map((m, g) => {
|
|
24771
|
+
const b = m.id || g, T = RT(m);
|
|
24770
24772
|
return /* @__PURE__ */ Y(
|
|
24771
24773
|
"div",
|
|
24772
24774
|
{
|
|
@@ -24801,7 +24803,7 @@ const MT = (e) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
24801
24803
|
"img",
|
|
24802
24804
|
{
|
|
24803
24805
|
src: m.url,
|
|
24804
|
-
alt: `瀑布流图片 ${
|
|
24806
|
+
alt: `瀑布流图片 ${g + 1}`,
|
|
24805
24807
|
className: "waterfall-image",
|
|
24806
24808
|
onLoad: y,
|
|
24807
24809
|
onError: y,
|
|
@@ -25024,28 +25026,28 @@ const er = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
25024
25026
|
const t = (e || "").replace(/[\u00a0\u3000]/g, " "), n = /20\d{2}-\d{2}-\d{2}/g, r = t.match(n) || [];
|
|
25025
25027
|
if (r.length === 0)
|
|
25026
25028
|
return { markdown: "", jsonData: [] };
|
|
25027
|
-
const a = t.split(n).filter((
|
|
25028
|
-
r.forEach((
|
|
25029
|
+
const a = t.split(n).filter((g) => g.trim() !== ""), i = a.length > 0 ? $T(a[0]) : [], s = i.length >= 2, o = s ? i : FT, u = s || a.length > 0 && a[0].includes("展现量") ? 1 : 0, l = o.filter((g) => g !== "日期"), f = l.length, p = [];
|
|
25030
|
+
r.forEach((g, b) => {
|
|
25029
25031
|
const T = b + u;
|
|
25030
25032
|
if (T >= a.length) return;
|
|
25031
25033
|
const C = a[T];
|
|
25032
25034
|
let S = C.split(/[\r\n]+/).map((_) => _.trim()).filter((_) => _ !== "");
|
|
25033
25035
|
S.length < f && (S = qT(C));
|
|
25034
25036
|
const A = (_) => S.length === f * 2 ? S[_ * 2] ?? "" : S[_] ?? "", L = {};
|
|
25035
|
-
L[hn("日期")] =
|
|
25037
|
+
L[hn("日期")] = g, l.forEach((_, v) => {
|
|
25036
25038
|
const k = A(v), N = UT(k), O = hn(_);
|
|
25037
25039
|
L[O] = N;
|
|
25038
25040
|
}), p.push(L);
|
|
25039
25041
|
});
|
|
25040
|
-
const
|
|
25041
|
-
const b = hn(
|
|
25042
|
+
const E = o.filter((g) => {
|
|
25043
|
+
const b = hn(g);
|
|
25042
25044
|
return p.some((T) => {
|
|
25043
25045
|
const C = T[b];
|
|
25044
25046
|
return C !== void 0 && String(C).trim() !== "";
|
|
25045
25047
|
});
|
|
25046
|
-
}), c = `| ${
|
|
25048
|
+
}), c = `| ${E.join(" | ")} |`, y = `| ${E.map(() => "---").join(" | ")} |`, h = p.map((g) => `| ${E.map((T) => {
|
|
25047
25049
|
const C = hn(T);
|
|
25048
|
-
return
|
|
25050
|
+
return g[C] ?? "-";
|
|
25049
25051
|
}).join(" | ")} |`);
|
|
25050
25052
|
return {
|
|
25051
25053
|
markdown: [c, y, ...h].join(`
|
|
@@ -25062,12 +25064,12 @@ const er = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
25062
25064
|
const n = t[1], a = /^\|[\s-|]+\|$/.test(n.trim());
|
|
25063
25065
|
if (!n || !a)
|
|
25064
25066
|
return er(e);
|
|
25065
|
-
const s = t[0].split("|").map((p) => p.trim()).filter((p) => p !== ""), o = t.slice(2).map((p) => p.split("|").map((
|
|
25067
|
+
const s = t[0].split("|").map((p) => p.trim()).filter((p) => p !== ""), o = t.slice(2).map((p) => p.split("|").map((E) => E.trim()).filter((E, c, y) => c > 0 && c < y.length)), u = "border:1px solid #d9d9d9;padding:8px 12px;background-color:#fafafa;font-weight:600;text-align:left;white-space:nowrap;", l = "border:1px solid #d9d9d9;padding:6px 12px;text-align:left;white-space:nowrap;";
|
|
25066
25068
|
let f = '<div style="overflow-x:auto;max-width:100%;">';
|
|
25067
25069
|
return f += '<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">', f += "<thead><tr>", s.forEach((p) => {
|
|
25068
25070
|
f += `<th style="${u}">${er(p)}</th>`;
|
|
25069
25071
|
}), f += "</tr></thead>", f += "<tbody>", o.forEach((p) => {
|
|
25070
|
-
f += "<tr>", s.forEach((
|
|
25072
|
+
f += "<tr>", s.forEach((E, c) => {
|
|
25071
25073
|
const y = p[c] || "-";
|
|
25072
25074
|
f += `<td style="${l}">${er(y)}</td>`;
|
|
25073
25075
|
}), f += "</tr>";
|
|
@@ -25083,8 +25085,8 @@ const er = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
25083
25085
|
i.querySelectorAll("td").forEach((u, l) => {
|
|
25084
25086
|
const f = r[l];
|
|
25085
25087
|
if (f == null) return;
|
|
25086
|
-
const p = hn(f),
|
|
25087
|
-
s[p] =
|
|
25088
|
+
const p = hn(f), E = u.textContent?.trim() || "";
|
|
25089
|
+
s[p] = E === "-" ? "" : E;
|
|
25088
25090
|
}), Object.keys(s).length > 0 && t.push(s);
|
|
25089
25091
|
}), t;
|
|
25090
25092
|
}, JT = (e) => async (t) => {
|