bi-components-library 1.0.97 → 1.0.98
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 +903 -895
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as I, jsxs as ie, Fragment as Ot } from "react/jsx-runtime";
|
|
2
2
|
import Rt, { useState as oe, useRef as ae, useMemo as tt, useCallback as se, useEffect as pe, useLayoutEffect as Me } from "react";
|
|
3
3
|
import { Button as Ae, Card as nt, Modal as Gt, Table as rt, Flex as ht, Spin as Ft, Empty as zt, Select as ze, Form as He, Input as kt, Space as Yt, DatePicker as jt, message as Wt, Dropdown as Ut, Tooltip as Kt, Progress as Xt, Pagination as Jt, theme as Qt } from "antd";
|
|
4
4
|
import { createFromIconfontCN as Zt, LeftOutlined as en, SearchOutlined as tn, ReloadOutlined as nn, InfoCircleOutlined as rn, SendOutlined as an, PauseCircleOutlined as on, PlayCircleOutlined as sn } from "@ant-design/icons";
|
|
@@ -8,12 +8,12 @@ const ln = ({
|
|
|
8
8
|
loading: h = !1,
|
|
9
9
|
children: u,
|
|
10
10
|
...i
|
|
11
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ I(
|
|
12
12
|
Ae,
|
|
13
13
|
{
|
|
14
14
|
...i,
|
|
15
|
-
type: ((
|
|
16
|
-
switch (
|
|
15
|
+
type: ((A) => {
|
|
16
|
+
switch (A) {
|
|
17
17
|
case "primary":
|
|
18
18
|
return "primary";
|
|
19
19
|
case "ghost":
|
|
@@ -83,11 +83,11 @@ const cn = ({
|
|
|
83
83
|
bordered: u = !0,
|
|
84
84
|
hoverable: i = !1,
|
|
85
85
|
size: b = "default",
|
|
86
|
-
...
|
|
87
|
-
}) => /* @__PURE__ */
|
|
86
|
+
...A
|
|
87
|
+
}) => /* @__PURE__ */ I(
|
|
88
88
|
nt,
|
|
89
89
|
{
|
|
90
|
-
...
|
|
90
|
+
...A,
|
|
91
91
|
title: t,
|
|
92
92
|
bordered: u,
|
|
93
93
|
hoverable: i,
|
|
@@ -150,11 +150,11 @@ const un = ({
|
|
|
150
150
|
showDefaultFooter: t = !0,
|
|
151
151
|
...h
|
|
152
152
|
}) => {
|
|
153
|
-
const u = h.footer !== void 0 ? h.footer : t ? (i, { OkBtn: b, CancelBtn:
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
153
|
+
const u = h.footer !== void 0 ? h.footer : t ? (i, { OkBtn: b, CancelBtn: A }) => /* @__PURE__ */ ie(Ot, { children: [
|
|
154
|
+
/* @__PURE__ */ I(b, {}),
|
|
155
|
+
/* @__PURE__ */ I(A, {})
|
|
156
156
|
] }) : null;
|
|
157
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ I(
|
|
158
158
|
Gt,
|
|
159
159
|
{
|
|
160
160
|
...h,
|
|
@@ -228,7 +228,7 @@ const dn = ({
|
|
|
228
228
|
showPagination: h = !0,
|
|
229
229
|
defaultPageSize: u = 10,
|
|
230
230
|
...i
|
|
231
|
-
}) => /* @__PURE__ */
|
|
231
|
+
}) => /* @__PURE__ */ I(
|
|
232
232
|
rt,
|
|
233
233
|
{
|
|
234
234
|
...i,
|
|
@@ -304,17 +304,17 @@ const pn = Zt({
|
|
|
304
304
|
style: i,
|
|
305
305
|
...b
|
|
306
306
|
}) => {
|
|
307
|
-
const
|
|
307
|
+
const A = {
|
|
308
308
|
fontSize: h,
|
|
309
309
|
color: u,
|
|
310
310
|
...i
|
|
311
311
|
};
|
|
312
|
-
return /* @__PURE__ */
|
|
312
|
+
return /* @__PURE__ */ I(
|
|
313
313
|
pn,
|
|
314
314
|
{
|
|
315
315
|
...b,
|
|
316
316
|
type: t,
|
|
317
|
-
style:
|
|
317
|
+
style: A
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
};
|
|
@@ -360,7 +360,7 @@ const mn = ({
|
|
|
360
360
|
className: u,
|
|
361
361
|
emptyChildren: i,
|
|
362
362
|
loadingText: b,
|
|
363
|
-
emptyImage:
|
|
363
|
+
emptyImage: A
|
|
364
364
|
}) => t ? /* @__PURE__ */ ie(
|
|
365
365
|
ht,
|
|
366
366
|
{
|
|
@@ -369,20 +369,20 @@ const mn = ({
|
|
|
369
369
|
justify: "center",
|
|
370
370
|
vertical: !0,
|
|
371
371
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
b && /* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ I(Ft, { size: "large" }),
|
|
373
|
+
b && /* @__PURE__ */ I("div", { className: "mt-4 text-gray-500", children: b })
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
|
-
) : /* @__PURE__ */
|
|
376
|
+
) : /* @__PURE__ */ I(
|
|
377
377
|
ht,
|
|
378
378
|
{
|
|
379
379
|
className: `pt-10 w-full ${u || ""}`,
|
|
380
380
|
align: "center",
|
|
381
381
|
justify: "center",
|
|
382
|
-
children: /* @__PURE__ */
|
|
382
|
+
children: /* @__PURE__ */ I(
|
|
383
383
|
zt,
|
|
384
384
|
{
|
|
385
|
-
image:
|
|
385
|
+
image: A,
|
|
386
386
|
description: h,
|
|
387
387
|
imageStyle: { height: 180 },
|
|
388
388
|
children: i
|
|
@@ -439,12 +439,12 @@ const yn = ({
|
|
|
439
439
|
className: u,
|
|
440
440
|
size: i = "small",
|
|
441
441
|
type: b = "default"
|
|
442
|
-
}) => /* @__PURE__ */
|
|
442
|
+
}) => /* @__PURE__ */ I(
|
|
443
443
|
Ae,
|
|
444
444
|
{
|
|
445
445
|
size: i,
|
|
446
446
|
type: b,
|
|
447
|
-
icon: /* @__PURE__ */
|
|
447
|
+
icon: /* @__PURE__ */ I(en, {}),
|
|
448
448
|
className: `cursor-pointer ${u || ""}`,
|
|
449
449
|
onClick: t,
|
|
450
450
|
children: h && "返回"
|
|
@@ -495,7 +495,7 @@ const hn = ({
|
|
|
495
495
|
...u
|
|
496
496
|
}) => {
|
|
497
497
|
const i = t ? `px-0 h-auto ${h || ""}` : h;
|
|
498
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ I(
|
|
499
499
|
Ae,
|
|
500
500
|
{
|
|
501
501
|
type: "link",
|
|
@@ -548,21 +548,21 @@ const { Option: gn } = ze, xn = ({
|
|
|
548
548
|
searchFields: u = [],
|
|
549
549
|
showSearch: i = !0,
|
|
550
550
|
showRefresh: b = !0,
|
|
551
|
-
defaultPageSize:
|
|
552
|
-
pageSizeOptions:
|
|
553
|
-
autoLoad:
|
|
554
|
-
externalParams:
|
|
551
|
+
defaultPageSize: A = 10,
|
|
552
|
+
pageSizeOptions: _ = ["10", "20", "50", "100"],
|
|
553
|
+
autoLoad: M = !0,
|
|
554
|
+
externalParams: N = {},
|
|
555
555
|
...E
|
|
556
556
|
}) => {
|
|
557
|
-
const [S, H] = oe([]), [
|
|
557
|
+
const [S, H] = oe([]), [k, q] = oe(!1), [e, n] = oe({
|
|
558
558
|
current: 1,
|
|
559
|
-
pageSize:
|
|
559
|
+
pageSize: A,
|
|
560
560
|
total: 0
|
|
561
|
-
}), [a, d] = oe({}), [p, T] = oe({}), [V] = He.useForm(),
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
const
|
|
561
|
+
}), [a, d] = oe({}), [p, T] = oe({}), [V] = He.useForm(), L = ae(e);
|
|
562
|
+
L.current = e;
|
|
563
|
+
const J = ae(N);
|
|
564
|
+
J.current = N;
|
|
565
|
+
const K = ae(!1), X = tt(() => t.map((f) => {
|
|
566
566
|
const { sortable: c, render: m, ...g } = f;
|
|
567
567
|
return {
|
|
568
568
|
...g,
|
|
@@ -574,11 +574,11 @@ const { Option: gn } = ze, xn = ({
|
|
|
574
574
|
q(!0);
|
|
575
575
|
try {
|
|
576
576
|
const c = {
|
|
577
|
-
page:
|
|
578
|
-
pageSize:
|
|
577
|
+
page: L.current.current,
|
|
578
|
+
pageSize: L.current.pageSize,
|
|
579
579
|
sortField: p.field,
|
|
580
580
|
sortOrder: p.order,
|
|
581
|
-
searchParams: { ...a, ...
|
|
581
|
+
searchParams: { ...a, ...J.current },
|
|
582
582
|
...f
|
|
583
583
|
}, m = await h(c);
|
|
584
584
|
m.success && (H(m.data), n((g) => ({
|
|
@@ -601,19 +601,19 @@ const { Option: gn } = ze, xn = ({
|
|
|
601
601
|
}, [r]), G = se((f, c, m) => {
|
|
602
602
|
const g = {
|
|
603
603
|
current: f.current || 1,
|
|
604
|
-
pageSize: f.pageSize ||
|
|
604
|
+
pageSize: f.pageSize || A,
|
|
605
605
|
total: f.total || 0
|
|
606
606
|
}, C = {
|
|
607
607
|
field: m?.field,
|
|
608
608
|
order: m?.order
|
|
609
609
|
};
|
|
610
610
|
n(g), T(C);
|
|
611
|
-
}, [
|
|
611
|
+
}, [A]);
|
|
612
612
|
return pe(() => {
|
|
613
|
-
const f = Object.keys(
|
|
614
|
-
(
|
|
615
|
-
}, [
|
|
616
|
-
i && u.length > 0 && /* @__PURE__ */
|
|
613
|
+
const f = Object.keys(N).length > 0;
|
|
614
|
+
(M && !K.current || f) && (r(), K.current = !0);
|
|
615
|
+
}, [M, N, r]), /* @__PURE__ */ ie("div", { children: [
|
|
616
|
+
i && u.length > 0 && /* @__PURE__ */ I(nt, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ ie(
|
|
617
617
|
He,
|
|
618
618
|
{
|
|
619
619
|
form: V,
|
|
@@ -621,42 +621,42 @@ const { Option: gn } = ze, xn = ({
|
|
|
621
621
|
onFinish: B,
|
|
622
622
|
initialValues: u.reduce((f, c) => (c.defaultValue !== void 0 && (f[c.key] = c.defaultValue), f), {}),
|
|
623
623
|
children: [
|
|
624
|
-
u.map((f) => /* @__PURE__ */
|
|
624
|
+
u.map((f) => /* @__PURE__ */ I(He.Item, { name: f.key, label: f.label, children: f.type === "input" ? /* @__PURE__ */ I(
|
|
625
625
|
kt,
|
|
626
626
|
{
|
|
627
627
|
placeholder: f.placeholder || `请输入${f.label}`,
|
|
628
628
|
style: { width: 200 }
|
|
629
629
|
}
|
|
630
|
-
) : /* @__PURE__ */
|
|
630
|
+
) : /* @__PURE__ */ I(
|
|
631
631
|
ze,
|
|
632
632
|
{
|
|
633
633
|
placeholder: f.placeholder || `请选择${f.label}`,
|
|
634
634
|
style: { width: 200 },
|
|
635
635
|
allowClear: !0,
|
|
636
|
-
children: f.options?.map((c) => /* @__PURE__ */
|
|
636
|
+
children: f.options?.map((c) => /* @__PURE__ */ I(gn, { value: c.value, children: c.label }, c.value))
|
|
637
637
|
}
|
|
638
638
|
) }, f.key)),
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
b && /* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ I(He.Item, { children: /* @__PURE__ */ ie(Yt, { children: [
|
|
640
|
+
/* @__PURE__ */ I(Ae, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ I(tn, {}), children: "查询" }),
|
|
641
|
+
/* @__PURE__ */ I(Ae, { onClick: v, children: "重置" }),
|
|
642
|
+
b && /* @__PURE__ */ I(Ae, { icon: /* @__PURE__ */ I(nn, {}), onClick: Y, children: "刷新" })
|
|
643
643
|
] }) })
|
|
644
644
|
]
|
|
645
645
|
}
|
|
646
646
|
) }),
|
|
647
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ I(
|
|
648
648
|
rt,
|
|
649
649
|
{
|
|
650
650
|
...E,
|
|
651
|
-
columns:
|
|
651
|
+
columns: X,
|
|
652
652
|
dataSource: S,
|
|
653
|
-
loading:
|
|
653
|
+
loading: k,
|
|
654
654
|
pagination: {
|
|
655
655
|
...e,
|
|
656
656
|
showSizeChanger: !0,
|
|
657
657
|
showQuickJumper: !0,
|
|
658
658
|
showTotal: (f, c) => `第 ${c[0]}-${c[1]} 条/共 ${f} 条`,
|
|
659
|
-
pageSizeOptions:
|
|
659
|
+
pageSizeOptions: _
|
|
660
660
|
},
|
|
661
661
|
onChange: G,
|
|
662
662
|
scroll: { x: "max-content", y: "50vh" }
|
|
@@ -733,22 +733,22 @@ xn.__docgenInfo = {
|
|
|
733
733
|
};
|
|
734
734
|
function Ze(t, h, u) {
|
|
735
735
|
if (!t.current) return;
|
|
736
|
-
const i = (
|
|
737
|
-
|
|
738
|
-
}, b = /* @__PURE__ */ new Set(),
|
|
739
|
-
for (const
|
|
740
|
-
|
|
741
|
-
type:
|
|
742
|
-
key:
|
|
743
|
-
exclusionGroup:
|
|
736
|
+
const i = (k) => {
|
|
737
|
+
k.classList.contains("rte-richtext-host-expanded") && (k.style.setProperty("display", "flex", "important"), k.style.setProperty("flex-direction", "column", "important"), k.style.setProperty("flex", "1 1 auto", "important"), k.style.setProperty("min-height", "0", "important"), k.style.setProperty("width", "100%", "important"), k.style.setProperty("align-self", "stretch", "important"));
|
|
738
|
+
}, b = /* @__PURE__ */ new Set(), A = {};
|
|
739
|
+
for (const k of h)
|
|
740
|
+
k.exclusionGroup && k.exclusionGroup !== "separator" && (b.add(k.exclusionGroup), A[k.exclusionGroup] || (A[k.exclusionGroup] = []), A[k.exclusionGroup].push({
|
|
741
|
+
type: k.type,
|
|
742
|
+
key: k.key,
|
|
743
|
+
exclusionGroup: k.exclusionGroup
|
|
744
744
|
}));
|
|
745
|
-
const
|
|
746
|
-
for (const
|
|
747
|
-
|
|
748
|
-
for (const q of
|
|
745
|
+
const _ = {};
|
|
746
|
+
for (const k of b) {
|
|
747
|
+
_[k] = !1;
|
|
748
|
+
for (const q of A[k])
|
|
749
749
|
if (q.type === "upload" && q.key) {
|
|
750
750
|
if (u[q.key] !== null && u[q.key] !== void 0) {
|
|
751
|
-
|
|
751
|
+
_[k] = !0;
|
|
752
752
|
break;
|
|
753
753
|
}
|
|
754
754
|
} else if ((q.type === "variable" || q.type === "multi-variable") && q.key) {
|
|
@@ -759,29 +759,29 @@ function Ze(t, h, u) {
|
|
|
759
759
|
)].filter(Boolean);
|
|
760
760
|
for (const n of e)
|
|
761
761
|
if (!n.classList.contains("show-placeholder") && n.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
762
|
-
|
|
762
|
+
_[k] = !0;
|
|
763
763
|
break;
|
|
764
764
|
}
|
|
765
|
-
if (
|
|
765
|
+
if (_[k])
|
|
766
766
|
break;
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
const
|
|
770
|
-
(
|
|
769
|
+
const M = h.some((k) => k.exclusionGroup === "separator"), E = Object.keys(_).filter(
|
|
770
|
+
(k) => _[k]
|
|
771
771
|
).length > 0;
|
|
772
772
|
let S = null;
|
|
773
|
-
if (E &&
|
|
774
|
-
for (const
|
|
775
|
-
if (
|
|
776
|
-
S =
|
|
773
|
+
if (E && M) {
|
|
774
|
+
for (const k of h)
|
|
775
|
+
if (k.exclusionGroup && k.exclusionGroup !== "separator" && _[k.exclusionGroup]) {
|
|
776
|
+
S = k.exclusionGroup;
|
|
777
777
|
break;
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
for (const
|
|
780
|
+
for (const k of b) {
|
|
781
781
|
const q = t.current.querySelectorAll(
|
|
782
|
-
`[data-group="${
|
|
782
|
+
`[data-group="${k}"]`
|
|
783
783
|
);
|
|
784
|
-
|
|
784
|
+
M && E && S ? k === S ? q.forEach((e) => {
|
|
785
785
|
if (!e.closest('[data-rte-force-hidden="1"]')) {
|
|
786
786
|
if (e.classList.contains("rte-richtext-host-expanded")) {
|
|
787
787
|
i(e);
|
|
@@ -803,8 +803,8 @@ function Ze(t, h, u) {
|
|
|
803
803
|
}
|
|
804
804
|
t.current.querySelectorAll(
|
|
805
805
|
'[data-group="separator"]'
|
|
806
|
-
).forEach((
|
|
807
|
-
|
|
806
|
+
).forEach((k) => {
|
|
807
|
+
k.style.display = E ? "none" : "inline";
|
|
808
808
|
});
|
|
809
809
|
}
|
|
810
810
|
function et(t, h, u, i) {
|
|
@@ -819,18 +819,18 @@ function et(t, h, u, i) {
|
|
|
819
819
|
if (d.length === 0)
|
|
820
820
|
return a;
|
|
821
821
|
let p = -1;
|
|
822
|
-
for (let
|
|
823
|
-
if ((d[
|
|
824
|
-
p =
|
|
822
|
+
for (let L = 0; L < d.length; L++)
|
|
823
|
+
if ((d[L].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
|
|
824
|
+
p = L;
|
|
825
825
|
break;
|
|
826
826
|
}
|
|
827
|
-
return d.filter((
|
|
827
|
+
return d.filter((L, J) => J !== p).map((L) => (L.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
|
|
828
828
|
`).trim() || a;
|
|
829
|
-
},
|
|
829
|
+
}, A = (e) => e ? !!e.closest('[data-rte-force-hidden="1"]') : !1, _ = [];
|
|
830
830
|
for (let e = 0; e < h.length; e++) {
|
|
831
831
|
const n = h[e];
|
|
832
832
|
if ((n.type === "variable" || n.type === "report-url" || n.type === "upload" || n.type === "multi-variable" || n.type === "select" || n.type === "textarea" || n.type === "richtext" || n.type === "report-module" || n.type === "datepicker") && n.required && n.key) {
|
|
833
|
-
|
|
833
|
+
_.push({
|
|
834
834
|
exclusionGroup: n.exclusionGroup || "",
|
|
835
835
|
key: n.key,
|
|
836
836
|
type: n.type === "multi-variable" || n.type === "report-url" ? "variable" : n.type === "report-module" ? "richtext" : n.type,
|
|
@@ -846,7 +846,7 @@ function et(t, h, u, i) {
|
|
|
846
846
|
for (let a = e + 1; a < h.length; a++) {
|
|
847
847
|
const d = h[a];
|
|
848
848
|
if (d.exclusionGroup === n.exclusionGroup && (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key) {
|
|
849
|
-
|
|
849
|
+
_.push({
|
|
850
850
|
exclusionGroup: n.exclusionGroup,
|
|
851
851
|
key: d.key,
|
|
852
852
|
type: d.type,
|
|
@@ -859,7 +859,7 @@ function et(t, h, u, i) {
|
|
|
859
859
|
for (let a = e + 1; a < h.length; a++) {
|
|
860
860
|
const d = h[a];
|
|
861
861
|
if ((d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key) {
|
|
862
|
-
|
|
862
|
+
_.push({
|
|
863
863
|
exclusionGroup: d.exclusionGroup || "",
|
|
864
864
|
key: d.key,
|
|
865
865
|
type: d.type,
|
|
@@ -869,18 +869,18 @@ function et(t, h, u, i) {
|
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
|
-
const
|
|
873
|
-
if (
|
|
872
|
+
const M = h.some((e) => e.exclusionGroup === "separator"), N = [];
|
|
873
|
+
if (M && _.length > 1) {
|
|
874
874
|
const e = [];
|
|
875
875
|
h.forEach((n, a) => {
|
|
876
876
|
n.exclusionGroup === "separator" && e.push(a);
|
|
877
877
|
});
|
|
878
878
|
for (const n of e) {
|
|
879
|
-
const d =
|
|
880
|
-
d && T &&
|
|
879
|
+
const d = _.filter((V) => typeof V.__index == "number" && V.__index < n).sort((V, L) => (L.__index ?? 0) - (V.__index ?? 0))[0], T = _.filter((V) => typeof V.__index == "number" && V.__index > n).sort((V, L) => (V.__index ?? 0) - (L.__index ?? 0))[0];
|
|
880
|
+
d && T && N.push([d, T]);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
if (
|
|
883
|
+
if (_.length === 0) {
|
|
884
884
|
if (h.length === 0) {
|
|
885
885
|
if (!t.current) {
|
|
886
886
|
i(!1);
|
|
@@ -893,7 +893,7 @@ function et(t, h, u, i) {
|
|
|
893
893
|
i(!0);
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
const E =
|
|
896
|
+
const E = _.filter((e) => {
|
|
897
897
|
if (!t.current) return !1;
|
|
898
898
|
if (e.exclusionGroup) {
|
|
899
899
|
const n = t.current.querySelectorAll(
|
|
@@ -901,14 +901,14 @@ function et(t, h, u, i) {
|
|
|
901
901
|
);
|
|
902
902
|
if (n.length > 0) {
|
|
903
903
|
const a = n[0];
|
|
904
|
-
return
|
|
904
|
+
return A(a) ? !0 : a.style.display !== "none";
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
if (e.type === "upload" && e.key) {
|
|
908
908
|
const n = t.current.querySelector(`[data-type="upload"][data-key="${e.key}"]`) || t.current.querySelector(`[data-type="upload"][data-batch-key="${e.key}"]`);
|
|
909
909
|
if (n) {
|
|
910
910
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
911
|
-
return
|
|
911
|
+
return A(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
912
912
|
}
|
|
913
913
|
} else if (e.type === "variable" && e.key)
|
|
914
914
|
if (e.isMultiVariable) {
|
|
@@ -917,7 +917,7 @@ function et(t, h, u, i) {
|
|
|
917
917
|
);
|
|
918
918
|
if (n.length > 0) {
|
|
919
919
|
const a = n[0], d = a.closest("[data-group]") || a.parentElement;
|
|
920
|
-
return
|
|
920
|
+
return A(d) ? !0 : d ? d.style.display !== "none" : !0;
|
|
921
921
|
}
|
|
922
922
|
} else {
|
|
923
923
|
const n = t.current.querySelector(
|
|
@@ -925,7 +925,7 @@ function et(t, h, u, i) {
|
|
|
925
925
|
);
|
|
926
926
|
if (n) {
|
|
927
927
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
928
|
-
return
|
|
928
|
+
return A(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
else if (e.type === "select" && e.key) {
|
|
@@ -934,7 +934,7 @@ function et(t, h, u, i) {
|
|
|
934
934
|
);
|
|
935
935
|
if (n) {
|
|
936
936
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
937
|
-
return
|
|
937
|
+
return A(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
938
938
|
}
|
|
939
939
|
} else if (e.type === "textarea" && e.key) {
|
|
940
940
|
const n = t.current.querySelector(
|
|
@@ -942,13 +942,13 @@ function et(t, h, u, i) {
|
|
|
942
942
|
);
|
|
943
943
|
if (n) {
|
|
944
944
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
945
|
-
return
|
|
945
|
+
return A(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
946
946
|
}
|
|
947
947
|
} else if (e.type === "richtext" && e.key) {
|
|
948
948
|
const n = typeof e.moduleIndex == "number" ? `[data-type="richtext"][data-node-type="report-module"][data-key="${e.key}"][data-module-index="${e.moduleIndex}"]` : `[data-type="richtext"][data-key="${e.key}"]`, a = t.current.querySelector(n);
|
|
949
949
|
if (a) {
|
|
950
950
|
const d = a.closest("[data-group]") || a.parentElement;
|
|
951
|
-
return
|
|
951
|
+
return A(d) ? !0 : d ? d.style.display !== "none" : !0;
|
|
952
952
|
}
|
|
953
953
|
} else if (e.type === "datepicker" && e.key) {
|
|
954
954
|
const n = t.current.querySelector(
|
|
@@ -956,7 +956,7 @@ function et(t, h, u, i) {
|
|
|
956
956
|
);
|
|
957
957
|
if (n) {
|
|
958
958
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
959
|
-
return
|
|
959
|
+
return A(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
return !1;
|
|
@@ -966,7 +966,7 @@ function et(t, h, u, i) {
|
|
|
966
966
|
return;
|
|
967
967
|
}
|
|
968
968
|
const S = /* @__PURE__ */ new Set();
|
|
969
|
-
|
|
969
|
+
N.forEach((e) => {
|
|
970
970
|
e.forEach((n) => {
|
|
971
971
|
n.key && S.add(n.key);
|
|
972
972
|
});
|
|
@@ -974,8 +974,8 @@ function et(t, h, u, i) {
|
|
|
974
974
|
const H = E.filter(
|
|
975
975
|
(e) => !e.key || !S.has(e.key)
|
|
976
976
|
);
|
|
977
|
-
let
|
|
978
|
-
for (const e of
|
|
977
|
+
let k = (N.length === 0, !0);
|
|
978
|
+
for (const e of N) {
|
|
979
979
|
const n = e.filter((d) => {
|
|
980
980
|
if (!t.current) return !1;
|
|
981
981
|
if (d.exclusionGroup) {
|
|
@@ -984,7 +984,7 @@ function et(t, h, u, i) {
|
|
|
984
984
|
);
|
|
985
985
|
if (p.length > 0) {
|
|
986
986
|
const T = p[0];
|
|
987
|
-
return
|
|
987
|
+
return A(T) ? !0 : T.style.display !== "none";
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
990
|
return !0;
|
|
@@ -1002,8 +1002,8 @@ function et(t, h, u, i) {
|
|
|
1002
1002
|
if (T.length === 0)
|
|
1003
1003
|
continue;
|
|
1004
1004
|
for (let V = 0; V < T.length; V++) {
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1005
|
+
const J = T[V].dataset.key;
|
|
1006
|
+
J && u[J] != null && (p += 1);
|
|
1007
1007
|
}
|
|
1008
1008
|
if (p >= d.minCount) {
|
|
1009
1009
|
a = !0;
|
|
@@ -1019,10 +1019,10 @@ function et(t, h, u, i) {
|
|
|
1019
1019
|
`[data-type="variable"][data-multi-key="${d.key}"]`
|
|
1020
1020
|
);
|
|
1021
1021
|
let T = 0;
|
|
1022
|
-
for (const
|
|
1023
|
-
if (
|
|
1022
|
+
for (const L of Array.from(p)) {
|
|
1023
|
+
if (L.classList.contains("show-placeholder"))
|
|
1024
1024
|
continue;
|
|
1025
|
-
|
|
1025
|
+
L.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (T += 1);
|
|
1026
1026
|
}
|
|
1027
1027
|
const V = d.minCount && d.minCount > 0 ? d.minCount : 1;
|
|
1028
1028
|
if (T >= V) {
|
|
@@ -1074,7 +1074,7 @@ function et(t, h, u, i) {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
1076
|
if (!a) {
|
|
1077
|
-
|
|
1077
|
+
k = !1;
|
|
1078
1078
|
break;
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
@@ -1166,7 +1166,7 @@ function et(t, h, u, i) {
|
|
|
1166
1166
|
break;
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
i(
|
|
1169
|
+
i(k && q);
|
|
1170
1170
|
}
|
|
1171
1171
|
function Qe(t, h) {
|
|
1172
1172
|
if (!t.current) return;
|
|
@@ -1176,30 +1176,30 @@ function Qe(t, h) {
|
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
1178
1178
|
const bn = ({ host: t, onChange: h }) => {
|
|
1179
|
-
const u = t.dataset.key, i = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]",
|
|
1179
|
+
const u = t.dataset.key, i = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", A = t.dataset.required === "true", _ = t.dataset.value || "", M = Rt.useMemo(() => {
|
|
1180
1180
|
try {
|
|
1181
1181
|
return JSON.parse(b);
|
|
1182
1182
|
} catch {
|
|
1183
1183
|
return [];
|
|
1184
1184
|
}
|
|
1185
|
-
}, [b]), [
|
|
1185
|
+
}, [b]), [N, E] = oe(_ || void 0), [S, H] = oe(64), k = ae(null), q = (e) => {
|
|
1186
1186
|
E(e), t.setAttribute("data-value", e), h(u, e);
|
|
1187
1187
|
};
|
|
1188
1188
|
return pe(() => {
|
|
1189
|
-
E(
|
|
1190
|
-
}, [
|
|
1189
|
+
E(_ || void 0);
|
|
1190
|
+
}, [_]), Me(() => {
|
|
1191
1191
|
const e = window.requestAnimationFrame(() => {
|
|
1192
|
-
const n =
|
|
1192
|
+
const n = k.current;
|
|
1193
1193
|
if (!n) return;
|
|
1194
1194
|
const a = n.querySelector(".ant-select-selection-item"), d = n.querySelector(".ant-select-selection-placeholder"), p = a || d;
|
|
1195
1195
|
if (!p) return;
|
|
1196
|
-
const T = p.textContent || "", V = window.getComputedStyle(p).font,
|
|
1197
|
-
if (!
|
|
1198
|
-
V && (
|
|
1199
|
-
const
|
|
1196
|
+
const T = p.textContent || "", V = window.getComputedStyle(p).font, J = document.createElement("canvas").getContext("2d");
|
|
1197
|
+
if (!J) return;
|
|
1198
|
+
V && (J.font = V);
|
|
1199
|
+
const K = Math.ceil(J.measureText(T).width || 0), X = n.querySelector(".ant-select-selector");
|
|
1200
1200
|
let r = 0;
|
|
1201
|
-
if (
|
|
1202
|
-
const c = window.getComputedStyle(
|
|
1201
|
+
if (X) {
|
|
1202
|
+
const c = window.getComputedStyle(X);
|
|
1203
1203
|
r = (Number.parseFloat(c.paddingLeft) || 0) + (Number.parseFloat(c.paddingRight) || 0);
|
|
1204
1204
|
}
|
|
1205
1205
|
const B = n.querySelector(".ant-select-arrow"), v = B ? Math.ceil(B.getBoundingClientRect().width) : 0, Y = n.querySelector(".ant-select-clear");
|
|
@@ -1208,32 +1208,32 @@ const bn = ({ host: t, onChange: h }) => {
|
|
|
1208
1208
|
const c = window.getComputedStyle(Y);
|
|
1209
1209
|
c.display !== "none" && c.visibility !== "hidden" && (G = Math.ceil(Y.getBoundingClientRect().width));
|
|
1210
1210
|
}
|
|
1211
|
-
const f = Math.max(36,
|
|
1211
|
+
const f = Math.max(36, K + r + v + G + 6);
|
|
1212
1212
|
H((c) => c === f ? c : f);
|
|
1213
1213
|
});
|
|
1214
1214
|
return () => window.cancelAnimationFrame(e);
|
|
1215
|
-
}, [
|
|
1216
|
-
/* @__PURE__ */
|
|
1215
|
+
}, [N, M, i, A]), at(
|
|
1216
|
+
/* @__PURE__ */ I(
|
|
1217
1217
|
"div",
|
|
1218
1218
|
{
|
|
1219
1219
|
className: "rte-select-wrapper",
|
|
1220
1220
|
contentEditable: !1,
|
|
1221
|
-
ref:
|
|
1221
|
+
ref: k,
|
|
1222
1222
|
style: { display: "inline-block", width: S },
|
|
1223
|
-
children: /* @__PURE__ */
|
|
1223
|
+
children: /* @__PURE__ */ I(
|
|
1224
1224
|
ze,
|
|
1225
1225
|
{
|
|
1226
|
-
value:
|
|
1226
|
+
value: N,
|
|
1227
1227
|
onChange: q,
|
|
1228
1228
|
placeholder: i || "请选择",
|
|
1229
1229
|
style: { width: "100%" },
|
|
1230
|
-
options:
|
|
1231
|
-
allowClear: !
|
|
1230
|
+
options: M,
|
|
1231
|
+
allowClear: !A,
|
|
1232
1232
|
size: "small",
|
|
1233
1233
|
dropdownClassName: "rte-select-dropdown",
|
|
1234
1234
|
getPopupContainer: () => document.body,
|
|
1235
1235
|
dropdownMatchSelectWidth: !1,
|
|
1236
|
-
suffixIcon: /* @__PURE__ */
|
|
1236
|
+
suffixIcon: /* @__PURE__ */ I("i", { className: "iconfont icon-qiehuan-xiayizhang", style: { fontSize: "10px", color: "#7C3AED" } })
|
|
1237
1237
|
}
|
|
1238
1238
|
)
|
|
1239
1239
|
}
|
|
@@ -1246,14 +1246,14 @@ const bn = ({ host: t, onChange: h }) => {
|
|
|
1246
1246
|
const i = t.current;
|
|
1247
1247
|
if (!i) return;
|
|
1248
1248
|
const b = () => {
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
const E =
|
|
1252
|
-
E &&
|
|
1253
|
-
/* @__PURE__ */
|
|
1249
|
+
const _ = i.querySelectorAll(".rte-select-host"), M = [];
|
|
1250
|
+
_.forEach((N) => {
|
|
1251
|
+
const E = N.getAttribute("data-key");
|
|
1252
|
+
E && M.push(
|
|
1253
|
+
/* @__PURE__ */ I(
|
|
1254
1254
|
bn,
|
|
1255
1255
|
{
|
|
1256
|
-
host:
|
|
1256
|
+
host: N,
|
|
1257
1257
|
onChange: () => {
|
|
1258
1258
|
if (t.current) {
|
|
1259
1259
|
const S = new Event("input", { bubbles: !0 });
|
|
@@ -1264,88 +1264,88 @@ const bn = ({ host: t, onChange: h }) => {
|
|
|
1264
1264
|
`select-${E}`
|
|
1265
1265
|
)
|
|
1266
1266
|
);
|
|
1267
|
-
}), u(
|
|
1267
|
+
}), u(M);
|
|
1268
1268
|
};
|
|
1269
1269
|
b();
|
|
1270
|
-
const
|
|
1271
|
-
let
|
|
1272
|
-
for (const
|
|
1273
|
-
if (
|
|
1270
|
+
const A = new MutationObserver((_) => {
|
|
1271
|
+
let M = !1;
|
|
1272
|
+
for (const N of _)
|
|
1273
|
+
if (N.type === "childList") {
|
|
1274
1274
|
let E = !1;
|
|
1275
|
-
if (
|
|
1275
|
+
if (N.addedNodes.forEach((S) => {
|
|
1276
1276
|
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
1277
1277
|
const H = S;
|
|
1278
1278
|
(H.classList?.contains("rte-select-host") || H.querySelector?.(".rte-select-host")) && (E = !0);
|
|
1279
1279
|
}
|
|
1280
|
-
}),
|
|
1280
|
+
}), N.removedNodes.forEach((S) => {
|
|
1281
1281
|
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
1282
1282
|
const H = S;
|
|
1283
1283
|
(H.classList?.contains("rte-select-host") || H.querySelector?.(".rte-select-host")) && (E = !0);
|
|
1284
1284
|
}
|
|
1285
1285
|
}), E) {
|
|
1286
|
-
|
|
1286
|
+
M = !0;
|
|
1287
1287
|
break;
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
|
|
1290
|
+
M && b();
|
|
1291
1291
|
});
|
|
1292
|
-
return
|
|
1292
|
+
return A.observe(i, { childList: !0, subtree: !0 }), () => A.disconnect();
|
|
1293
1293
|
}, [t]), h;
|
|
1294
1294
|
}, Oe = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1295
|
-
function wn(t, h, u, i, b,
|
|
1295
|
+
function wn(t, h, u, i, b, A = {}, _, M) {
|
|
1296
1296
|
if (!t.current) return;
|
|
1297
|
-
const
|
|
1297
|
+
const N = /[;;,,。.!!??::、]/, E = (e) => {
|
|
1298
1298
|
const n = (e ?? "").trim();
|
|
1299
|
-
return n.length === 1 &&
|
|
1299
|
+
return n.length === 1 && N.test(n);
|
|
1300
1300
|
}, S = (e) => {
|
|
1301
|
-
const n = e ?? "", a = n.match(new RegExp(`^\\s*(${
|
|
1301
|
+
const n = e ?? "", a = n.match(new RegExp(`^\\s*(${N.source})`));
|
|
1302
1302
|
if (!a) return null;
|
|
1303
|
-
const d = a[1], p = n.replace(new RegExp(`^\\s*${
|
|
1303
|
+
const d = a[1], p = n.replace(new RegExp(`^\\s*${N.source}`), "");
|
|
1304
1304
|
return { punct: d, rest: p };
|
|
1305
|
-
}, H = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`,
|
|
1305
|
+
}, H = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, k = [];
|
|
1306
1306
|
let q = 0;
|
|
1307
1307
|
for (; q < h.length; ) {
|
|
1308
1308
|
const e = h[q], n = q + 1 < h.length ? h[q + 1] : null;
|
|
1309
1309
|
let a = !1;
|
|
1310
1310
|
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && n) {
|
|
1311
|
-
const
|
|
1312
|
-
if (
|
|
1311
|
+
const K = n.type === "upload" && n.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === n.exclusionGroup, X = n.type === "variable" && n.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === n.exclusionGroup;
|
|
1312
|
+
if (K) {
|
|
1313
1313
|
const r = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", B = `<span ${r} class="exclusion-wrapper required-upload-group">`, v = "</span>";
|
|
1314
1314
|
let Y = "";
|
|
1315
1315
|
e.className ? Y = `<span class="${e.className}">${e.text ?? ""}</span>` : Y = e.text ?? "";
|
|
1316
|
-
const G = n, f = u[G.key] !== null && u[G.key] !== void 0, c = f ? u[G.key] : null, m = f ? u[G.key]?.name : G.text, g = f ? "" : "hidden", C = G.tooltip && !f ? "" : "hidden", z = f ? "has-file" : "",
|
|
1316
|
+
const G = n, f = u[G.key] !== null && u[G.key] !== void 0, c = f ? u[G.key] : null, m = f ? u[G.key]?.name : G.text, g = f ? "" : "hidden", C = G.tooltip && !f ? "" : "hidden", z = f ? "has-file" : "", W = f && m ? ` data-file-name="${m.replace(/"/g, """)}"` : "";
|
|
1317
1317
|
let Q = "";
|
|
1318
1318
|
f && c ? c.type?.startsWith("image/") ? Q = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(c)}" alt="preview" />` : Q = "<i class='iconfont icon-exlwenjian'></i>" : Q = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1319
|
-
const te = (G.text || "").trim(), fe = f && te.length >= 12 ? `<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${te}</span>` : "", ue = `<span contenteditable="false" data-type="upload" data-key="${G.key}" class="upload-chip"><span class="upload-inner-wrapper ${z}"><span class="upload-icon">${Q}</span><span class="upload-label"${
|
|
1320
|
-
|
|
1319
|
+
const te = (G.text || "").trim(), fe = f && te.length >= 12 ? `<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${te}</span>` : "", ue = `<span contenteditable="false" data-type="upload" data-key="${G.key}" class="upload-chip"><span class="upload-inner-wrapper ${z}"><span class="upload-icon">${Q}</span><span class="upload-label"${W}>${m || G.text}</span>${G.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${C}" data-upload-key="${G.key}" data-tooltip="${G.tooltip}"></i>` : ""}<span class="file-remove-btn ${g}" title="移除文件">×</span></span></span>`;
|
|
1320
|
+
k.push(B + Y + ue + v + fe), q += 2;
|
|
1321
1321
|
continue;
|
|
1322
1322
|
}
|
|
1323
|
-
if (
|
|
1323
|
+
if (X) {
|
|
1324
1324
|
const B = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
|
|
1325
1325
|
let Y = "";
|
|
1326
1326
|
e.className ? Y = `<span class="${e.className}">${e.text ?? ""}</span>` : Y = e.text ?? "";
|
|
1327
|
-
const G = n, c = (G.key ? b[G.key] : void 0) || G.text || "", m = !c, g = m ? "" : c, C = m ? "show-placeholder" : "", z = G.exclusionGroup ? ` data-group="${G.exclusionGroup}"` : "",
|
|
1328
|
-
|
|
1327
|
+
const G = n, c = (G.key ? b[G.key] : void 0) || G.text || "", m = !c, g = m ? "" : c, C = m ? "show-placeholder" : "", z = G.exclusionGroup ? ` data-group="${G.exclusionGroup}"` : "", W = G.tooltip ? ` data-tooltip="${G.tooltip.replace(/"/g, """)}" data-variable-key="${G.key || ""}"` : "", Q = G.tooltip && m ? "" : "hidden", te = `<span contenteditable="true" data-type="variable" data-key="${G.key}" data-placeholder="${G.placeholder || ""}"${z}${W} class="variable-chip ${C}">${g}${G.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${Q}" data-variable-key="${G.key}" data-tooltip="${G.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1328
|
+
k.push(B + Y + te + v), q += 2;
|
|
1329
1329
|
continue;
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
const p = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", T = e.exclusionGroup ? `<span ${p} class="exclusion-wrapper">` : "", V = e.exclusionGroup ? "</span>" : "";
|
|
1333
|
-
let
|
|
1333
|
+
let L = "";
|
|
1334
1334
|
if (e.type === "tag") {
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1335
|
+
const X = i || _ === "hideTagClose" ? "" : '<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>', r = i ? ' data-locked="true"' : "", B = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-tag-key="${e.key || ""}"` : "";
|
|
1336
|
+
L = `<span contenteditable="false" class="tag-node group"${r}${B}><span class="tag-label">${e.text}</span>${X}</span>`;
|
|
1337
1337
|
} else if (e.type === "text") {
|
|
1338
|
-
const
|
|
1339
|
-
e.className ?
|
|
1338
|
+
const K = i ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', r = (e.text ?? "").replace(/\n/g, "<br/>");
|
|
1339
|
+
e.className ? L = `<span data-type="text" class="${e.className}"${K}>${r}</span>` : L = i ? `<span data-type="text"${K}>${r}</span>` : `<span data-type="text" contenteditable="false">${r}</span>`;
|
|
1340
1340
|
} else if (e.type === "variable" && e.key) {
|
|
1341
|
-
const
|
|
1342
|
-
e.required ?
|
|
1341
|
+
const X = b[e.key] || e.text || "", r = !X, B = r ? "" : X, v = r ? "show-placeholder" : "", Y = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", G = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", f = e.tooltip && r ? "" : "hidden", c = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${Y}${G} class="variable-chip ${v}">${B}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${f}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1342
|
+
e.required ? L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${c}</span>` : L = c;
|
|
1343
1343
|
} else if (e.type === "report-url" && e.key) {
|
|
1344
|
-
const
|
|
1345
|
-
e.required ?
|
|
1344
|
+
const K = `${e.key}__url`, r = Object.prototype.hasOwnProperty.call(b, K) ? b[K] : void 0, B = b[e.key], v = r ?? B ?? e.text ?? "", Y = !v, G = Y ? "" : v, f = Y ? "show-placeholder" : "", c = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", m = e.tooltip ? ` data-tooltip="${Oe(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", g = e.tooltip && Y ? "" : "hidden", C = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${Oe(e.placeholder || "")}"${c}${m} class="variable-chip rte-report-url ${f}">${G}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${g}" data-variable-key="${e.key}" data-tooltip="${Oe(e.tooltip)}" ></i>` : ""}</span>`;
|
|
1345
|
+
e.required ? L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${C}</span>` : L = C;
|
|
1346
1346
|
} else if (e.type === "upload" && e.key) {
|
|
1347
|
-
const
|
|
1348
|
-
if (
|
|
1347
|
+
const K = !!n && n.type === "text" && !n.className && !n.exclusionGroup && E(n.text), X = K ? (n.text ?? "").trim() : "", r = X ? H(X) : "";
|
|
1348
|
+
if (K && (a = !0), typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
|
|
1349
1349
|
const v = e.minCount || 1, Y = e.maxCount || 3;
|
|
1350
1350
|
let G = 0;
|
|
1351
1351
|
for (let m = 0; m < Y; m++) {
|
|
@@ -1358,77 +1358,77 @@ function wn(t, h, u, i, b, _ = {}, L, I) {
|
|
|
1358
1358
|
);
|
|
1359
1359
|
let c = "";
|
|
1360
1360
|
for (let m = 0; m < f; m++) {
|
|
1361
|
-
const g = `${e.key}-${m}`, C = u[g] !== null && u[g] !== void 0, z = C ? u[g] : null,
|
|
1361
|
+
const g = `${e.key}-${m}`, C = u[g] !== null && u[g] !== void 0, z = C ? u[g] : null, W = C ? u[g]?.name : e.text, Q = C ? "" : "hidden", te = e.tooltip && !C ? "" : "hidden", ce = C ? "has-file" : "", fe = C && W ? ` data-file-name="${W.replace(/"/g, """)}"` : "";
|
|
1362
1362
|
let ue = "";
|
|
1363
1363
|
C && z ? z.type?.startsWith("image/") ? ue = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(z)}" alt="preview" />` : ue = "<i class='iconfont icon-exlwenjian'></i>" : ue = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1364
|
-
const be = ` data-batch-key="${e.key}"`, ee = ` data-batch-index="${m}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${g}"${be}${ee} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${ce}"><span class="upload-icon">${ue}</span><span class="upload-label"${fe}>${
|
|
1364
|
+
const be = ` data-batch-key="${e.key}"`, ee = ` data-batch-index="${m}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${g}"${be}${ee} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${ce}"><span class="upload-icon">${ue}</span><span class="upload-label"${fe}>${W || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${te}" data-upload-key="${g}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${Q}" title="移除文件">×</span></span></span>`;
|
|
1365
1365
|
c += ye;
|
|
1366
1366
|
}
|
|
1367
|
-
e.required ?
|
|
1367
|
+
e.required ? L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-required-upload-batch"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span><span class="rte-upload-batch-chips">${c}${r}</span></span>` : L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${c}${r}</span>`;
|
|
1368
1368
|
} else {
|
|
1369
1369
|
const v = u[e.key] !== null && u[e.key] !== void 0, Y = v ? u[e.key] : null, G = v ? u[e.key]?.name : e.text, f = v ? "" : "hidden", c = e.tooltip && !v ? "" : "hidden", m = v ? "has-file" : "", g = v && G ? ` data-file-name="${G.replace(/"/g, """)}"` : "";
|
|
1370
1370
|
let C = "";
|
|
1371
1371
|
v && Y ? Y.type?.startsWith("image/") ? C = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(Y)}" alt="preview" />` : C = "<i class='iconfont icon-exlwenjian'></i>" : C = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1372
1372
|
const z = (e.text || "").trim(), Q = v && e.showHint === !0 && z.length >= 12 ? `<span ${p} contenteditable="false" class="exclusion-wrapper upload-hint">${z}</span>` : "", te = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${m}"><span class="upload-icon">${C}</span><span class="upload-label"${g}>${G || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${c}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${f}" title="移除文件">×</span></span></span>`;
|
|
1373
|
-
e.required ?
|
|
1373
|
+
e.required ? L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${te}${r}</span>${Q}` : L = te + r + Q;
|
|
1374
1374
|
}
|
|
1375
1375
|
} else if (e.type === "select" && e.key) {
|
|
1376
|
-
const
|
|
1377
|
-
e.required ?
|
|
1376
|
+
const K = b[e.key] || e.defaultValue || "", X = encodeURIComponent(JSON.stringify(e.options || [])), r = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", B = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", v = e.required ? ' data-required="true"' : "", Y = `<div data-type="select" data-key="${e.key}" data-value="${K}" data-options="${X}"${r}${B}${v} class="rte-select-host"></div>`;
|
|
1377
|
+
e.required ? L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${Y}</span>` : L = Y;
|
|
1378
1378
|
} else if (e.type === "textarea" && e.key) {
|
|
1379
|
-
const
|
|
1380
|
-
e.required ?
|
|
1379
|
+
const K = b[e.key] || "", X = typeof e.maxHeight == "number" ? e.maxHeight : 252, r = e.placeholder ? ` placeholder="${e.placeholder}"` : "", B = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${X}px;"${r}>${K}</textarea>`, v = `<div class="rte-textarea-wrapper" data-key="${e.key}">${B}</div>`;
|
|
1380
|
+
e.required ? L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${v}</span>` : L = v;
|
|
1381
1381
|
} else if (e.type === "richtext" && e.key) {
|
|
1382
|
-
const
|
|
1383
|
-
e.required ?
|
|
1382
|
+
const K = b[e.key] || e.text || "", X = typeof e.minHeight == "number" ? e.minHeight : 40, r = typeof e.maxHeight == "number" ? e.maxHeight : 160, B = Math.max(r, X), v = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", Y = e.expandable !== !1, G = K, f = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${v} style="min-height:${X}px;max-height:${B}px;overflow:auto;">${G}</div>`, c = Y ? `<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>` : "", m = `<div class="rte-richtext-wrapper${Y ? " rte-richtext-toggleable" : ""}" data-key="${e.key}">${f}${c}</div>`, g = `<div class="rte-richtext-container" data-key="${e.key}">${m}</div>`;
|
|
1383
|
+
e.required ? L = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${g}</div>` : L = g;
|
|
1384
1384
|
} else if (e.type === "report-module" && e.key) {
|
|
1385
|
-
const
|
|
1386
|
-
e.required ?
|
|
1385
|
+
const K = typeof e.moduleIndex == "number" ? e.moduleIndex : 0, X = `${e.key}__module_${K}`, B = Object.prototype.hasOwnProperty.call(b, X) ? b[X] : e.text || "", v = typeof e.minHeight == "number" ? e.minHeight : 80, Y = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(Y, v), f = e.placeholder ? ` data-placeholder="${Oe(e.placeholder)}"` : "", c = B, m = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${K}" class="rte-richtext rte-report-module"${f} style="min-height:${v}px;max-height:${G}px;overflow:auto;">${c}</div>`, g = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${m}</div>`, C = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${g}</div>`;
|
|
1386
|
+
e.required ? L = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${C}</div>` : L = C;
|
|
1387
1387
|
} else if (e.type === "datepicker" && e.key) {
|
|
1388
|
-
const
|
|
1389
|
-
e.required ?
|
|
1388
|
+
const K = b[e.key] || "", X = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", r = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", B = e.disableFuture ? ' data-disable-future="true"' : "", v = `<div data-type="datepicker" data-key="${e.key}" data-value="${K}" class="rte-datepicker-host"${X}${r}${B}></div>`;
|
|
1389
|
+
e.required ? L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${v}</span>` : L = v;
|
|
1390
1390
|
} else if (e.type === "multi-variable" && e.key) {
|
|
1391
|
-
const
|
|
1391
|
+
const K = e.maxCount || 9, X = A[e.key] || 1, r = Math.min(X, K);
|
|
1392
1392
|
if (e.required) {
|
|
1393
1393
|
const B = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, v = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
|
|
1394
1394
|
let Y = "";
|
|
1395
1395
|
for (let G = 0; G < r; G++) {
|
|
1396
|
-
const f = `${e.key}_${G}`, c = b[f] || "", m = !c, g = m ? "" : c, C = m ? "show-placeholder" : "", z = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "",
|
|
1396
|
+
const f = `${e.key}_${G}`, c = b[f] || "", m = !c, g = m ? "" : c, C = m ? "show-placeholder" : "", z = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", W = e.tooltip && m ? "" : "hidden", Q = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", te = `<span contenteditable="true" data-type="variable" data-key="${f}" data-multi-key="${e.key}" data-index="${G}" data-placeholder="${e.placeholder || ""}"${Q}${z} class="variable-chip ${C}">${g}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${W}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1397
1397
|
G === 0 ? Y += `<span ${v} class="exclusion-wrapper required-upload-group required-multi-first">${B}${te}</span>` : Y += te;
|
|
1398
1398
|
}
|
|
1399
|
-
|
|
1399
|
+
L = Y;
|
|
1400
1400
|
} else {
|
|
1401
1401
|
let B = "";
|
|
1402
1402
|
for (let v = 0; v < r; v++) {
|
|
1403
|
-
const Y = `${e.key}_${v}`, G = b[Y] || "", f = !G, c = f ? "" : G, m = f ? "show-placeholder" : "", g = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", C = e.tooltip && f ? "" : "hidden", z = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "",
|
|
1404
|
-
B +=
|
|
1403
|
+
const Y = `${e.key}_${v}`, G = b[Y] || "", f = !G, c = f ? "" : G, m = f ? "show-placeholder" : "", g = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", C = e.tooltip && f ? "" : "hidden", z = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", W = `<span contenteditable="true" data-type="variable" data-key="${Y}" data-multi-key="${e.key}" data-index="${v}" data-placeholder="${e.placeholder || ""}"${z}${g} class="variable-chip ${m}">${c}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${C}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1404
|
+
B += W;
|
|
1405
1405
|
}
|
|
1406
|
-
|
|
1406
|
+
L = B;
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
const
|
|
1409
|
+
const J = T + L + V;
|
|
1410
1410
|
if (e.type === "text" && !e.className && !e.exclusionGroup) {
|
|
1411
|
-
if (E(e.text) &&
|
|
1412
|
-
const
|
|
1413
|
-
|
|
1411
|
+
if (E(e.text) && k.length > 0) {
|
|
1412
|
+
const X = k[k.length - 1], r = (e.text ?? "").trim();
|
|
1413
|
+
k[k.length - 1] = `<span class="rte-inline-group">${X}${H(r)}</span>`, q++;
|
|
1414
1414
|
continue;
|
|
1415
1415
|
}
|
|
1416
|
-
const
|
|
1417
|
-
if (
|
|
1418
|
-
const
|
|
1419
|
-
|
|
1420
|
-
const r =
|
|
1416
|
+
const K = S(e.text);
|
|
1417
|
+
if (K && k.length > 0) {
|
|
1418
|
+
const X = k[k.length - 1];
|
|
1419
|
+
k[k.length - 1] = `<span class="rte-inline-group">${X}${H(K.punct)}</span>`;
|
|
1420
|
+
const r = K.rest;
|
|
1421
1421
|
if (r) {
|
|
1422
1422
|
const B = r.replace(/\n/g, "<br/>");
|
|
1423
|
-
|
|
1423
|
+
k.push(`<span data-type="text" contenteditable="false">${B}</span>`);
|
|
1424
1424
|
}
|
|
1425
1425
|
q++;
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1429
|
+
k.push(J), q += a ? 2 : 1;
|
|
1430
1430
|
}
|
|
1431
|
-
t.current && (t.current.innerHTML =
|
|
1431
|
+
t.current && (t.current.innerHTML = k.join(""), setTimeout(() => {
|
|
1432
1432
|
if (!t.current) return;
|
|
1433
1433
|
t.current.querySelectorAll('[data-type="variable"]').forEach((n) => {
|
|
1434
1434
|
const a = n.innerText.replace(/\n/g, "");
|
|
@@ -1436,7 +1436,7 @@ function wn(t, h, u, i, b, _ = {}, L, I) {
|
|
|
1436
1436
|
});
|
|
1437
1437
|
}, 0));
|
|
1438
1438
|
}
|
|
1439
|
-
function kn(t, h, u, i, b = {},
|
|
1439
|
+
function kn(t, h, u, i, b = {}, A, _, M, N) {
|
|
1440
1440
|
const E = se(() => {
|
|
1441
1441
|
if (!t.current) return;
|
|
1442
1442
|
if (h.length === 0) {
|
|
@@ -1444,11 +1444,11 @@ function kn(t, h, u, i, b = {}, _, L, I, A) {
|
|
|
1444
1444
|
return;
|
|
1445
1445
|
}
|
|
1446
1446
|
let S = {};
|
|
1447
|
-
const
|
|
1448
|
-
if (
|
|
1447
|
+
const k = t.current.__tempVariableValues;
|
|
1448
|
+
if (k ? (S = k, setTimeout(() => {
|
|
1449
1449
|
if (t.current) {
|
|
1450
1450
|
const q = t.current;
|
|
1451
|
-
q.__tempVariableValues ===
|
|
1451
|
+
q.__tempVariableValues === k && delete q.__tempVariableValues;
|
|
1452
1452
|
}
|
|
1453
1453
|
}, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((p) => {
|
|
1454
1454
|
const T = p.dataset.key;
|
|
@@ -1471,11 +1471,11 @@ function kn(t, h, u, i, b = {}, _, L, I, A) {
|
|
|
1471
1471
|
}), t.current.querySelectorAll('[data-type="richtext"]').forEach((p) => {
|
|
1472
1472
|
const T = p.dataset.key;
|
|
1473
1473
|
if (T) {
|
|
1474
|
-
const V = p.getAttribute("data-node-type") || "",
|
|
1474
|
+
const V = p.getAttribute("data-node-type") || "", L = V === "report-module" ? (p.innerHTML || "").replace(/[\u200B]/g, "").trim() : (p.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
1475
1475
|
if (V === "report-module") {
|
|
1476
|
-
const
|
|
1477
|
-
S[`${T}__module_${Number.isFinite(
|
|
1478
|
-
} else
|
|
1476
|
+
const J = Number.parseInt(p.getAttribute("data-module-index") || "0", 10);
|
|
1477
|
+
S[`${T}__module_${Number.isFinite(J) ? J : 0}`] = L;
|
|
1478
|
+
} else L && (S[T] = L);
|
|
1479
1479
|
}
|
|
1480
1480
|
}), t.current.querySelectorAll('[data-type="datepicker"]').forEach((p) => {
|
|
1481
1481
|
const T = p.dataset.key;
|
|
@@ -1490,9 +1490,9 @@ function kn(t, h, u, i, b = {}, _, L, I, A) {
|
|
|
1490
1490
|
i,
|
|
1491
1491
|
S,
|
|
1492
1492
|
b,
|
|
1493
|
-
|
|
1494
|
-
),
|
|
1495
|
-
const { key: q, offset: e } =
|
|
1493
|
+
M
|
|
1494
|
+
), A?.current) {
|
|
1495
|
+
const { key: q, offset: e } = A.current;
|
|
1496
1496
|
setTimeout(() => {
|
|
1497
1497
|
if (!t.current) return;
|
|
1498
1498
|
const n = t.current.querySelector(
|
|
@@ -1507,21 +1507,21 @@ function kn(t, h, u, i, b = {}, _, L, I, A) {
|
|
|
1507
1507
|
);
|
|
1508
1508
|
let p = 0, T = null, V = 0;
|
|
1509
1509
|
for (; d.nextNode(); ) {
|
|
1510
|
-
const
|
|
1511
|
-
if (p +
|
|
1512
|
-
T =
|
|
1510
|
+
const L = d.currentNode, J = L.textContent?.length || 0;
|
|
1511
|
+
if (p + J >= e) {
|
|
1512
|
+
T = L, V = e - p;
|
|
1513
1513
|
break;
|
|
1514
1514
|
}
|
|
1515
|
-
p +=
|
|
1515
|
+
p += J;
|
|
1516
1516
|
}
|
|
1517
1517
|
if (T) {
|
|
1518
1518
|
a.setStart(T, Math.min(V, T.textContent?.length || 0)), a.collapse(!0);
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1519
|
+
const L = window.getSelection();
|
|
1520
|
+
L && (L.removeAllRanges(), L.addRange(a), n.focus());
|
|
1521
1521
|
} else {
|
|
1522
1522
|
a.selectNodeContents(n), a.collapse(!1);
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1523
|
+
const L = window.getSelection();
|
|
1524
|
+
L && (L.removeAllRanges(), L.addRange(a), n.focus());
|
|
1525
1525
|
}
|
|
1526
1526
|
} catch {
|
|
1527
1527
|
const a = document.createRange();
|
|
@@ -1529,11 +1529,11 @@ function kn(t, h, u, i, b = {}, _, L, I, A) {
|
|
|
1529
1529
|
const d = window.getSelection();
|
|
1530
1530
|
d && (d.removeAllRanges(), d.addRange(a), n.focus());
|
|
1531
1531
|
}
|
|
1532
|
-
|
|
1532
|
+
A.current = null;
|
|
1533
1533
|
}
|
|
1534
1534
|
}, 0);
|
|
1535
1535
|
}
|
|
1536
|
-
}, [h, u, i, t, b,
|
|
1536
|
+
}, [h, u, i, t, b, A, _, M, N]);
|
|
1537
1537
|
pe(() => {
|
|
1538
1538
|
E();
|
|
1539
1539
|
}, [E]);
|
|
@@ -1542,78 +1542,78 @@ function $n(t, h, u, i) {
|
|
|
1542
1542
|
pe(() => {
|
|
1543
1543
|
const b = t.current;
|
|
1544
1544
|
if (!b) return;
|
|
1545
|
-
const
|
|
1546
|
-
const E =
|
|
1545
|
+
const A = (N) => N.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(N.name || ""), _ = (N) => {
|
|
1546
|
+
const E = N.target?.closest(".upload-info-icon");
|
|
1547
1547
|
if (E && E.classList.contains("upload-info-icon")) {
|
|
1548
1548
|
const H = E.dataset.uploadKey;
|
|
1549
1549
|
if (H) {
|
|
1550
|
-
const
|
|
1551
|
-
i(
|
|
1550
|
+
const k = E.closest('[data-type="upload"]');
|
|
1551
|
+
i(k ? { key: H, anchorEl: k, type: "upload" } : { key: H, anchorEl: E, type: "upload" });
|
|
1552
1552
|
}
|
|
1553
1553
|
return;
|
|
1554
1554
|
}
|
|
1555
|
-
const S =
|
|
1555
|
+
const S = N.target?.closest('[data-type="upload"]');
|
|
1556
1556
|
if (S) {
|
|
1557
1557
|
const H = S.dataset.key;
|
|
1558
1558
|
if (H) {
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1559
|
+
const k = u[H];
|
|
1560
|
+
k && A(k) && i({ key: H, anchorEl: S, type: "upload-preview" });
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
|
-
},
|
|
1564
|
-
const E =
|
|
1563
|
+
}, M = (N) => {
|
|
1564
|
+
const E = N.target?.closest(".upload-info-icon"), S = N.relatedTarget;
|
|
1565
1565
|
if (E && E.classList.contains("upload-info-icon")) {
|
|
1566
|
-
const
|
|
1567
|
-
if (S &&
|
|
1566
|
+
const k = E.closest('[data-type="upload"]');
|
|
1567
|
+
if (S && k && k.contains(S))
|
|
1568
1568
|
return;
|
|
1569
1569
|
if (!S || !b.contains(S))
|
|
1570
1570
|
i(null);
|
|
1571
1571
|
else {
|
|
1572
1572
|
const q = S.closest('[data-type="upload"]');
|
|
1573
|
-
(!q || q !==
|
|
1573
|
+
(!q || q !== k) && i(null);
|
|
1574
1574
|
}
|
|
1575
1575
|
return;
|
|
1576
1576
|
}
|
|
1577
|
-
const H =
|
|
1577
|
+
const H = N.target?.closest('[data-type="upload"]');
|
|
1578
1578
|
if (H) {
|
|
1579
|
-
const
|
|
1580
|
-
if (
|
|
1579
|
+
const k = S;
|
|
1580
|
+
if (k && H.contains(k))
|
|
1581
1581
|
return;
|
|
1582
1582
|
i(null);
|
|
1583
1583
|
}
|
|
1584
1584
|
};
|
|
1585
|
-
return b.addEventListener("mouseover",
|
|
1586
|
-
b.removeEventListener("mouseover",
|
|
1585
|
+
return b.addEventListener("mouseover", _, !0), b.addEventListener("mouseout", M, !0), () => {
|
|
1586
|
+
b.removeEventListener("mouseover", _, !0), b.removeEventListener("mouseout", M, !0);
|
|
1587
1587
|
};
|
|
1588
1588
|
}, [h, u, t, i]);
|
|
1589
1589
|
}
|
|
1590
1590
|
function En(t, h, u, i) {
|
|
1591
1591
|
pe(() => {
|
|
1592
1592
|
if (!t.current) return;
|
|
1593
|
-
const b = (
|
|
1593
|
+
const b = (N) => {
|
|
1594
1594
|
if (i === "hideTagClose")
|
|
1595
1595
|
return;
|
|
1596
|
-
const E =
|
|
1596
|
+
const E = N.currentTarget, S = E.dataset.tooltip, H = E.dataset.tagKey || "";
|
|
1597
1597
|
S && u({ key: H, anchorEl: E, type: "tag" });
|
|
1598
|
-
},
|
|
1598
|
+
}, A = () => {
|
|
1599
1599
|
u(null);
|
|
1600
1600
|
};
|
|
1601
|
-
let
|
|
1602
|
-
const
|
|
1601
|
+
let _;
|
|
1602
|
+
const M = () => {
|
|
1603
1603
|
if (!t.current) return;
|
|
1604
1604
|
t.current.querySelectorAll(
|
|
1605
1605
|
".tag-node[data-tooltip]"
|
|
1606
1606
|
).forEach((E) => {
|
|
1607
|
-
E.addEventListener("mouseenter", b), E.addEventListener("mouseleave",
|
|
1607
|
+
E.addEventListener("mouseenter", b), E.addEventListener("mouseleave", A);
|
|
1608
1608
|
});
|
|
1609
1609
|
};
|
|
1610
|
-
return
|
|
1611
|
-
|
|
1610
|
+
return _ = requestAnimationFrame(() => {
|
|
1611
|
+
_ = requestAnimationFrame(M);
|
|
1612
1612
|
}), () => {
|
|
1613
|
-
cancelAnimationFrame(
|
|
1613
|
+
cancelAnimationFrame(_), t.current && t.current.querySelectorAll(
|
|
1614
1614
|
".tag-node[data-tooltip]"
|
|
1615
1615
|
).forEach((E) => {
|
|
1616
|
-
E.removeEventListener("mouseenter", b), E.removeEventListener("mouseleave",
|
|
1616
|
+
E.removeEventListener("mouseenter", b), E.removeEventListener("mouseleave", A);
|
|
1617
1617
|
});
|
|
1618
1618
|
};
|
|
1619
1619
|
}, [h, t, u, i]);
|
|
@@ -1622,69 +1622,69 @@ function Cn(t, h, u) {
|
|
|
1622
1622
|
pe(() => {
|
|
1623
1623
|
const i = t.current;
|
|
1624
1624
|
if (!i) return;
|
|
1625
|
-
const b = (
|
|
1626
|
-
const
|
|
1627
|
-
if (
|
|
1628
|
-
const E =
|
|
1629
|
-
E && u({ key: E, anchorEl:
|
|
1625
|
+
const b = (_) => {
|
|
1626
|
+
const M = _.target?.closest(".variable-info-icon");
|
|
1627
|
+
if (M && M.classList.contains("variable-info-icon")) {
|
|
1628
|
+
const E = M.dataset.variableKey;
|
|
1629
|
+
E && u({ key: E, anchorEl: M, type: "variable" });
|
|
1630
1630
|
return;
|
|
1631
1631
|
}
|
|
1632
|
-
const
|
|
1632
|
+
const N = _.target?.closest(
|
|
1633
1633
|
'[data-type="variable"][data-node-type="report-url"][data-tooltip]'
|
|
1634
1634
|
);
|
|
1635
|
-
if (
|
|
1636
|
-
const E =
|
|
1637
|
-
E && u({ key: E, anchorEl:
|
|
1635
|
+
if (N) {
|
|
1636
|
+
const E = N.dataset.key;
|
|
1637
|
+
E && u({ key: E, anchorEl: N, type: "variable" });
|
|
1638
1638
|
}
|
|
1639
|
-
},
|
|
1640
|
-
const
|
|
1639
|
+
}, A = (_) => {
|
|
1640
|
+
const M = _.target, N = _.relatedTarget, E = M?.closest?.(".variable-info-icon"), S = M?.closest?.(
|
|
1641
1641
|
'[data-type="variable"][data-node-type="report-url"][data-tooltip]'
|
|
1642
1642
|
);
|
|
1643
1643
|
if (E || S) {
|
|
1644
|
-
if (!
|
|
1644
|
+
if (!N || !i.contains(N)) {
|
|
1645
1645
|
u(null);
|
|
1646
1646
|
return;
|
|
1647
1647
|
}
|
|
1648
|
-
const H = !!
|
|
1648
|
+
const H = !!N.closest?.(".variable-info-icon"), k = !!N.closest?.(
|
|
1649
1649
|
'[data-type="variable"][data-node-type="report-url"][data-tooltip]'
|
|
1650
1650
|
);
|
|
1651
|
-
!H && !
|
|
1651
|
+
!H && !k && u(null);
|
|
1652
1652
|
}
|
|
1653
1653
|
};
|
|
1654
|
-
return i.addEventListener("mouseover", b, !0), i.addEventListener("mouseout",
|
|
1655
|
-
i.removeEventListener("mouseover", b, !0), i.removeEventListener("mouseout",
|
|
1654
|
+
return i.addEventListener("mouseover", b, !0), i.addEventListener("mouseout", A, !0), () => {
|
|
1655
|
+
i.removeEventListener("mouseover", b, !0), i.removeEventListener("mouseout", A, !0);
|
|
1656
1656
|
};
|
|
1657
1657
|
}, [h, t, u]);
|
|
1658
1658
|
}
|
|
1659
1659
|
function Sn(t, h, u, i) {
|
|
1660
1660
|
pe(() => {
|
|
1661
1661
|
if (!t.current) return;
|
|
1662
|
-
const b = (E) => E.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(E.name || ""),
|
|
1663
|
-
const S = E.currentTarget, H = S.dataset.fileName,
|
|
1662
|
+
const b = (E) => E.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(E.name || ""), A = (E) => {
|
|
1663
|
+
const S = E.currentTarget, H = S.dataset.fileName, k = S.closest('[data-type="upload"]'), q = k?.dataset.key || "", e = q ? u[q] : null;
|
|
1664
1664
|
if (e && b(e)) {
|
|
1665
|
-
i({ key: q, anchorEl:
|
|
1665
|
+
i({ key: q, anchorEl: k || S, type: "upload-preview" });
|
|
1666
1666
|
return;
|
|
1667
1667
|
}
|
|
1668
|
-
H && i({ key: q, anchorEl:
|
|
1669
|
-
},
|
|
1668
|
+
H && i({ key: q, anchorEl: k || S, type: "upload-label" });
|
|
1669
|
+
}, _ = () => {
|
|
1670
1670
|
i(null);
|
|
1671
1671
|
};
|
|
1672
|
-
let
|
|
1673
|
-
const
|
|
1672
|
+
let M;
|
|
1673
|
+
const N = () => {
|
|
1674
1674
|
if (!t.current) return;
|
|
1675
1675
|
t.current.querySelectorAll(
|
|
1676
1676
|
".upload-label[data-file-name]"
|
|
1677
1677
|
).forEach((S) => {
|
|
1678
|
-
S.addEventListener("mouseenter",
|
|
1678
|
+
S.addEventListener("mouseenter", A), S.addEventListener("mouseleave", _);
|
|
1679
1679
|
});
|
|
1680
1680
|
};
|
|
1681
|
-
return
|
|
1682
|
-
|
|
1681
|
+
return M = requestAnimationFrame(() => {
|
|
1682
|
+
M = requestAnimationFrame(N);
|
|
1683
1683
|
}), () => {
|
|
1684
|
-
cancelAnimationFrame(
|
|
1684
|
+
cancelAnimationFrame(M), t.current && t.current.querySelectorAll(
|
|
1685
1685
|
".upload-label[data-file-name]"
|
|
1686
1686
|
).forEach((S) => {
|
|
1687
|
-
S.removeEventListener("mouseenter",
|
|
1687
|
+
S.removeEventListener("mouseenter", A), S.removeEventListener("mouseleave", _);
|
|
1688
1688
|
});
|
|
1689
1689
|
};
|
|
1690
1690
|
}, [h, u, t, i]);
|
|
@@ -1701,21 +1701,21 @@ function qn(t, h) {
|
|
|
1701
1701
|
const u = ae(0), i = ae(0);
|
|
1702
1702
|
pe(() => {
|
|
1703
1703
|
if (!t.current) return;
|
|
1704
|
-
let b = !1,
|
|
1705
|
-
const
|
|
1706
|
-
b = !0,
|
|
1704
|
+
let b = !1, A = 0;
|
|
1705
|
+
const _ = (p) => p instanceof HTMLElement ? !!(p.closest(".rte-datepicker-wrapper") || p.closest(".rte-datepicker-host") || p.closest(".ant-picker") || p.closest(".ant-picker-dropdown")) : !1, M = (p) => p instanceof HTMLElement ? !!(p.closest(".rte-select-wrapper") || p.closest(".rte-select-host") || p.closest(".ant-select") || p.closest(".ant-select-dropdown")) : !1, N = (p) => {
|
|
1706
|
+
b = !0, _(p.target) && (u.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), M(p.target) && (i.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
|
|
1707
1707
|
}, E = () => {
|
|
1708
|
-
b = !1,
|
|
1708
|
+
b = !1, A = Date.now();
|
|
1709
1709
|
};
|
|
1710
1710
|
let S = !1, H = 0;
|
|
1711
|
-
const
|
|
1711
|
+
const k = () => {
|
|
1712
1712
|
S = !0;
|
|
1713
1713
|
}, q = () => {
|
|
1714
1714
|
S = !1, H = Date.now();
|
|
1715
1715
|
}, e = () => {
|
|
1716
1716
|
H = Date.now();
|
|
1717
1717
|
}, n = (p) => {
|
|
1718
|
-
|
|
1718
|
+
_(p.target) && (u.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), M(p.target) && (i.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
|
|
1719
1719
|
}, a = () => {
|
|
1720
1720
|
if (Date.now() - u.current < 800 || Date.now() - i.current < 800) {
|
|
1721
1721
|
console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");
|
|
@@ -1734,22 +1734,22 @@ function qn(t, h) {
|
|
|
1734
1734
|
const V = T.getRangeAt(0);
|
|
1735
1735
|
if (!V.collapsed)
|
|
1736
1736
|
return t.current.contains(V.commonAncestorContainer), void 0;
|
|
1737
|
-
const
|
|
1738
|
-
if (!
|
|
1737
|
+
const L = T.anchorNode;
|
|
1738
|
+
if (!L || !t.current.contains(L))
|
|
1739
1739
|
return;
|
|
1740
|
-
let
|
|
1741
|
-
if (
|
|
1742
|
-
const r =
|
|
1743
|
-
(r.closest('[data-type="datepicker"]') || r.closest(".rte-datepicker-wrapper") || r.closest(".rte-datepicker-host")) && (
|
|
1744
|
-
} else if (
|
|
1745
|
-
const r =
|
|
1746
|
-
(r.closest('[data-type="datepicker"]') || r.closest(".rte-datepicker-wrapper") || r.closest(".rte-datepicker-host")) && (
|
|
1740
|
+
let J = !1, K = !1;
|
|
1741
|
+
if (L.nodeType === Node.ELEMENT_NODE) {
|
|
1742
|
+
const r = L;
|
|
1743
|
+
(r.closest('[data-type="datepicker"]') || r.closest(".rte-datepicker-wrapper") || r.closest(".rte-datepicker-host")) && (J = !0), (r.closest('[data-type="select"]') || r.closest(".rte-select-wrapper") || r.closest(".rte-select-host")) && (K = !0);
|
|
1744
|
+
} else if (L.parentElement) {
|
|
1745
|
+
const r = L.parentElement;
|
|
1746
|
+
(r.closest('[data-type="datepicker"]') || r.closest(".rte-datepicker-wrapper") || r.closest(".rte-datepicker-host")) && (J = !0), (r.closest('[data-type="select"]') || r.closest(".rte-select-wrapper") || r.closest(".rte-select-host")) && (K = !0);
|
|
1747
1747
|
}
|
|
1748
|
-
if (
|
|
1748
|
+
if (J || K)
|
|
1749
1749
|
return;
|
|
1750
|
-
let
|
|
1751
|
-
if (
|
|
1752
|
-
if (Date.now() -
|
|
1750
|
+
let X = null;
|
|
1751
|
+
if (L.nodeType === Node.ELEMENT_NODE ? X = L.closest('[data-type="variable"]') : L.nodeType === Node.TEXT_NODE && L.parentElement && (X = L.parentElement.closest('[data-type="variable"]')), !X) {
|
|
1752
|
+
if (Date.now() - A > 500)
|
|
1753
1753
|
return;
|
|
1754
1754
|
const r = t.current.querySelectorAll('[data-type="variable"]');
|
|
1755
1755
|
if (r.length > 0) {
|
|
@@ -1768,9 +1768,9 @@ function qn(t, h) {
|
|
|
1768
1768
|
T.removeAllRanges();
|
|
1769
1769
|
}
|
|
1770
1770
|
}, d = t.current;
|
|
1771
|
-
return d && (d.addEventListener("compositionstart",
|
|
1771
|
+
return d && (d.addEventListener("compositionstart", k), d.addEventListener("compositionend", q), d.addEventListener("input", e)), document.addEventListener("mousedown", N), document.addEventListener("mouseup", E), document.addEventListener("focusin", n), document.addEventListener("selectionchange", a), () => {
|
|
1772
1772
|
const p = t.current;
|
|
1773
|
-
p && (p.removeEventListener("compositionstart",
|
|
1773
|
+
p && (p.removeEventListener("compositionstart", k), p.removeEventListener("compositionend", q), p.removeEventListener("input", e)), document.removeEventListener("mousedown", N), document.removeEventListener("mouseup", E), document.removeEventListener("focusin", n), document.removeEventListener("selectionchange", a);
|
|
1774
1774
|
};
|
|
1775
1775
|
}, [t, h]);
|
|
1776
1776
|
}
|
|
@@ -1783,7 +1783,7 @@ function $t() {
|
|
|
1783
1783
|
(function(u, i) {
|
|
1784
1784
|
t.exports = i();
|
|
1785
1785
|
})(An, function() {
|
|
1786
|
-
var u = 1e3, i = 6e4, b = 36e5,
|
|
1786
|
+
var u = 1e3, i = 6e4, b = 36e5, A = "millisecond", _ = "second", M = "minute", N = "hour", E = "day", S = "week", H = "month", k = "quarter", q = "year", e = "date", n = "Invalid Date", a = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, d = /\[([^\]]+)]|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, p = { 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(f) {
|
|
1787
1787
|
var c = ["th", "st", "nd", "rd"], m = f % 100;
|
|
1788
1788
|
return "[" + f + (c[(m - 20) % 10] || c[m] || c[0]) + "]";
|
|
1789
1789
|
} }, T = function(f, c, m) {
|
|
@@ -1794,42 +1794,42 @@ function $t() {
|
|
|
1794
1794
|
return (c <= 0 ? "+" : "-") + T(g, 2, "0") + ":" + T(C, 2, "0");
|
|
1795
1795
|
}, m: function f(c, m) {
|
|
1796
1796
|
if (c.date() < m.date()) return -f(m, c);
|
|
1797
|
-
var g = 12 * (m.year() - c.year()) + (m.month() - c.month()), C = c.clone().add(g, H), z = m - C < 0,
|
|
1798
|
-
return +(-(g + (m - C) / (z ? C -
|
|
1797
|
+
var g = 12 * (m.year() - c.year()) + (m.month() - c.month()), C = c.clone().add(g, H), z = m - C < 0, W = c.clone().add(g + (z ? -1 : 1), H);
|
|
1798
|
+
return +(-(g + (m - C) / (z ? C - W : W - C)) || 0);
|
|
1799
1799
|
}, a: function(f) {
|
|
1800
1800
|
return f < 0 ? Math.ceil(f) || 0 : Math.floor(f);
|
|
1801
1801
|
}, p: function(f) {
|
|
1802
|
-
return { M: H, y: q, w: S, d: E, D: e, h:
|
|
1802
|
+
return { M: H, y: q, w: S, d: E, D: e, h: N, m: M, s: _, ms: A, Q: k }[f] || String(f || "").toLowerCase().replace(/s$/, "");
|
|
1803
1803
|
}, u: function(f) {
|
|
1804
1804
|
return f === void 0;
|
|
1805
|
-
} },
|
|
1806
|
-
|
|
1807
|
-
var
|
|
1808
|
-
return f instanceof Y || !(!f || !f[
|
|
1805
|
+
} }, L = "en", J = {};
|
|
1806
|
+
J[L] = p;
|
|
1807
|
+
var K = "$isDayjsObject", X = function(f) {
|
|
1808
|
+
return f instanceof Y || !(!f || !f[K]);
|
|
1809
1809
|
}, r = function f(c, m, g) {
|
|
1810
1810
|
var C;
|
|
1811
|
-
if (!c) return
|
|
1811
|
+
if (!c) return L;
|
|
1812
1812
|
if (typeof c == "string") {
|
|
1813
1813
|
var z = c.toLowerCase();
|
|
1814
|
-
|
|
1815
|
-
var
|
|
1816
|
-
if (!C &&
|
|
1814
|
+
J[z] && (C = z), m && (J[z] = m, C = z);
|
|
1815
|
+
var W = c.split("-");
|
|
1816
|
+
if (!C && W.length > 1) return f(W[0]);
|
|
1817
1817
|
} else {
|
|
1818
1818
|
var Q = c.name;
|
|
1819
|
-
|
|
1819
|
+
J[Q] = c, C = Q;
|
|
1820
1820
|
}
|
|
1821
|
-
return !g && C && (
|
|
1821
|
+
return !g && C && (L = C), C || !g && L;
|
|
1822
1822
|
}, B = function(f, c) {
|
|
1823
|
-
if (
|
|
1823
|
+
if (X(f)) return f.clone();
|
|
1824
1824
|
var m = typeof c == "object" ? c : {};
|
|
1825
1825
|
return m.date = f, m.args = arguments, new Y(m);
|
|
1826
1826
|
}, v = V;
|
|
1827
|
-
v.l = r, v.i =
|
|
1827
|
+
v.l = r, v.i = X, v.w = function(f, c) {
|
|
1828
1828
|
return B(f, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
|
|
1829
1829
|
};
|
|
1830
1830
|
var Y = function() {
|
|
1831
1831
|
function f(m) {
|
|
1832
|
-
this.$L = r(m.locale, null, !0), this.parse(m), this.$x = this.$x || m.x || {}, this[
|
|
1832
|
+
this.$L = r(m.locale, null, !0), this.parse(m), this.$x = this.$x || m.x || {}, this[K] = !0;
|
|
1833
1833
|
}
|
|
1834
1834
|
var c = f.prototype;
|
|
1835
1835
|
return c.parse = function(m) {
|
|
@@ -1839,10 +1839,10 @@ function $t() {
|
|
|
1839
1839
|
if (v.u(C)) return /* @__PURE__ */ new Date();
|
|
1840
1840
|
if (C instanceof Date) return new Date(C);
|
|
1841
1841
|
if (typeof C == "string" && !/Z$/i.test(C)) {
|
|
1842
|
-
var
|
|
1843
|
-
if (
|
|
1844
|
-
var Q =
|
|
1845
|
-
return z ? new Date(Date.UTC(
|
|
1842
|
+
var W = C.match(a);
|
|
1843
|
+
if (W) {
|
|
1844
|
+
var Q = W[2] - 1 || 0, te = (W[7] || "0").substring(0, 3);
|
|
1845
|
+
return z ? new Date(Date.UTC(W[1], Q, W[3] || 1, W[4] || 0, W[5] || 0, W[6] || 0, te)) : new Date(W[1], Q, W[3] || 1, W[4] || 0, W[5] || 0, W[6] || 0, te);
|
|
1846
1846
|
}
|
|
1847
1847
|
}
|
|
1848
1848
|
return new Date(C);
|
|
@@ -1868,13 +1868,13 @@ function $t() {
|
|
|
1868
1868
|
}, c.valueOf = function() {
|
|
1869
1869
|
return this.$d.getTime();
|
|
1870
1870
|
}, c.startOf = function(m, g) {
|
|
1871
|
-
var C = this, z = !!v.u(g) || g,
|
|
1871
|
+
var C = this, z = !!v.u(g) || g, W = v.p(m), Q = function(ge, he) {
|
|
1872
1872
|
var ke = v.w(C.$u ? Date.UTC(C.$y, he, ge) : new Date(C.$y, he, ge), C);
|
|
1873
1873
|
return z ? ke : ke.endOf(E);
|
|
1874
1874
|
}, te = function(ge, he) {
|
|
1875
1875
|
return v.w(C.toDate()[ge].apply(C.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(he)), C);
|
|
1876
1876
|
}, ce = this.$W, fe = this.$M, ue = this.$D, be = "set" + (this.$u ? "UTC" : "");
|
|
1877
|
-
switch (
|
|
1877
|
+
switch (W) {
|
|
1878
1878
|
case q:
|
|
1879
1879
|
return z ? Q(1, 0) : Q(31, 11);
|
|
1880
1880
|
case H:
|
|
@@ -1885,11 +1885,11 @@ function $t() {
|
|
|
1885
1885
|
case E:
|
|
1886
1886
|
case e:
|
|
1887
1887
|
return te(be + "Hours", 0);
|
|
1888
|
-
case
|
|
1888
|
+
case N:
|
|
1889
1889
|
return te(be + "Minutes", 1);
|
|
1890
|
-
case
|
|
1890
|
+
case M:
|
|
1891
1891
|
return te(be + "Seconds", 2);
|
|
1892
|
-
case
|
|
1892
|
+
case _:
|
|
1893
1893
|
return te(be + "Milliseconds", 3);
|
|
1894
1894
|
default:
|
|
1895
1895
|
return this.clone();
|
|
@@ -1897,7 +1897,7 @@ function $t() {
|
|
|
1897
1897
|
}, c.endOf = function(m) {
|
|
1898
1898
|
return this.startOf(m, !1);
|
|
1899
1899
|
}, c.$set = function(m, g) {
|
|
1900
|
-
var C, z = v.p(m),
|
|
1900
|
+
var C, z = v.p(m), W = "set" + (this.$u ? "UTC" : ""), Q = (C = {}, C[E] = W + "Date", C[e] = W + "Date", C[H] = W + "Month", C[q] = W + "FullYear", C[N] = W + "Hours", C[M] = W + "Minutes", C[_] = W + "Seconds", C[A] = W + "Milliseconds", C)[z], te = z === E ? this.$D + (g - this.$W) : g;
|
|
1901
1901
|
if (z === H || z === q) {
|
|
1902
1902
|
var ce = this.clone().set(e, 1);
|
|
1903
1903
|
ce.$d[Q](te), ce.init(), this.$d = ce.set(e, Math.min(this.$D, ce.daysInMonth())).$d;
|
|
@@ -1910,22 +1910,22 @@ function $t() {
|
|
|
1910
1910
|
}, c.add = function(m, g) {
|
|
1911
1911
|
var C, z = this;
|
|
1912
1912
|
m = Number(m);
|
|
1913
|
-
var
|
|
1913
|
+
var W = v.p(g), Q = function(fe) {
|
|
1914
1914
|
var ue = B(z);
|
|
1915
1915
|
return v.w(ue.date(ue.date() + Math.round(fe * m)), z);
|
|
1916
1916
|
};
|
|
1917
|
-
if (
|
|
1918
|
-
if (
|
|
1919
|
-
if (
|
|
1920
|
-
if (
|
|
1921
|
-
var te = (C = {}, C[
|
|
1917
|
+
if (W === H) return this.set(H, this.$M + m);
|
|
1918
|
+
if (W === q) return this.set(q, this.$y + m);
|
|
1919
|
+
if (W === E) return Q(1);
|
|
1920
|
+
if (W === S) return Q(7);
|
|
1921
|
+
var te = (C = {}, C[M] = i, C[N] = b, C[_] = u, C)[W] || 1, ce = this.$d.getTime() + m * te;
|
|
1922
1922
|
return v.w(ce, this);
|
|
1923
1923
|
}, c.subtract = function(m, g) {
|
|
1924
1924
|
return this.add(-1 * m, g);
|
|
1925
1925
|
}, c.format = function(m) {
|
|
1926
1926
|
var g = this, C = this.$locale();
|
|
1927
1927
|
if (!this.isValid()) return C.invalidDate || n;
|
|
1928
|
-
var z = m || "YYYY-MM-DDTHH:mm:ssZ",
|
|
1928
|
+
var z = m || "YYYY-MM-DDTHH:mm:ssZ", W = v.z(this), Q = this.$H, te = this.$m, ce = this.$M, fe = C.weekdays, ue = C.months, be = C.meridiem, ee = function(he, ke, $e, Ee) {
|
|
1929
1929
|
return he && (he[ke] || he(g, z)) || $e[ke].slice(0, Ee);
|
|
1930
1930
|
}, ye = function(he) {
|
|
1931
1931
|
return v.s(Q % 12 || 12, he, "0");
|
|
@@ -1983,16 +1983,16 @@ function $t() {
|
|
|
1983
1983
|
case "SSS":
|
|
1984
1984
|
return v.s(g.$ms, 3, "0");
|
|
1985
1985
|
case "Z":
|
|
1986
|
-
return
|
|
1986
|
+
return W;
|
|
1987
1987
|
}
|
|
1988
1988
|
return null;
|
|
1989
|
-
}(he) ||
|
|
1989
|
+
}(he) || W.replace(":", "");
|
|
1990
1990
|
});
|
|
1991
1991
|
}, c.utcOffset = function() {
|
|
1992
1992
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1993
1993
|
}, c.diff = function(m, g, C) {
|
|
1994
|
-
var z,
|
|
1995
|
-
return v.m(
|
|
1994
|
+
var z, W = this, Q = v.p(g), te = B(m), ce = (te.utcOffset() - this.utcOffset()) * i, fe = this - te, ue = function() {
|
|
1995
|
+
return v.m(W, te);
|
|
1996
1996
|
};
|
|
1997
1997
|
switch (Q) {
|
|
1998
1998
|
case q:
|
|
@@ -2001,7 +2001,7 @@ function $t() {
|
|
|
2001
2001
|
case H:
|
|
2002
2002
|
z = ue();
|
|
2003
2003
|
break;
|
|
2004
|
-
case
|
|
2004
|
+
case k:
|
|
2005
2005
|
z = ue() / 3;
|
|
2006
2006
|
break;
|
|
2007
2007
|
case S:
|
|
@@ -2010,13 +2010,13 @@ function $t() {
|
|
|
2010
2010
|
case E:
|
|
2011
2011
|
z = (fe - ce) / 864e5;
|
|
2012
2012
|
break;
|
|
2013
|
-
case
|
|
2013
|
+
case N:
|
|
2014
2014
|
z = fe / b;
|
|
2015
2015
|
break;
|
|
2016
|
-
case
|
|
2016
|
+
case M:
|
|
2017
2017
|
z = fe / i;
|
|
2018
2018
|
break;
|
|
2019
|
-
case
|
|
2019
|
+
case _:
|
|
2020
2020
|
z = fe / u;
|
|
2021
2021
|
break;
|
|
2022
2022
|
default:
|
|
@@ -2026,7 +2026,7 @@ function $t() {
|
|
|
2026
2026
|
}, c.daysInMonth = function() {
|
|
2027
2027
|
return this.endOf(H).$D;
|
|
2028
2028
|
}, c.$locale = function() {
|
|
2029
|
-
return
|
|
2029
|
+
return J[this.$L];
|
|
2030
2030
|
}, c.locale = function(m, g) {
|
|
2031
2031
|
if (!m) return this.$L;
|
|
2032
2032
|
var C = this.clone(), z = r(m, g, !0);
|
|
@@ -2043,15 +2043,15 @@ function $t() {
|
|
|
2043
2043
|
return this.$d.toUTCString();
|
|
2044
2044
|
}, f;
|
|
2045
2045
|
}(), G = Y.prototype;
|
|
2046
|
-
return B.prototype = G, [["$ms",
|
|
2046
|
+
return B.prototype = G, [["$ms", A], ["$s", _], ["$m", M], ["$H", N], ["$W", E], ["$M", H], ["$y", q], ["$D", e]].forEach(function(f) {
|
|
2047
2047
|
G[f[1]] = function(c) {
|
|
2048
2048
|
return this.$g(c, f[0], f[1]);
|
|
2049
2049
|
};
|
|
2050
2050
|
}), B.extend = function(f, c) {
|
|
2051
2051
|
return f.$i || (f(c, Y, B), f.$i = !0), B;
|
|
2052
|
-
}, B.locale = r, B.isDayjs =
|
|
2052
|
+
}, B.locale = r, B.isDayjs = X, B.unix = function(f) {
|
|
2053
2053
|
return B(1e3 * f);
|
|
2054
|
-
}, B.en =
|
|
2054
|
+
}, B.en = J[L], B.Ls = J, B.p = {}, B;
|
|
2055
2055
|
});
|
|
2056
2056
|
}(Re)), Re.exports;
|
|
2057
2057
|
}
|
|
@@ -2063,16 +2063,16 @@ function Mn() {
|
|
|
2063
2063
|
(function(u, i) {
|
|
2064
2064
|
t.exports = i($t());
|
|
2065
2065
|
})(Ln, function(u) {
|
|
2066
|
-
function i(
|
|
2067
|
-
return
|
|
2066
|
+
function i(_) {
|
|
2067
|
+
return _ && typeof _ == "object" && "default" in _ ? _ : { default: _ };
|
|
2068
2068
|
}
|
|
2069
|
-
var b = i(u),
|
|
2070
|
-
return
|
|
2071
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(
|
|
2072
|
-
var
|
|
2073
|
-
return
|
|
2069
|
+
var b = i(u), A = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(_, M) {
|
|
2070
|
+
return M === "W" ? _ + "周" : _ + "日";
|
|
2071
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(_, M) {
|
|
2072
|
+
var N = 100 * _ + M;
|
|
2073
|
+
return N < 600 ? "凌晨" : N < 900 ? "早上" : N < 1100 ? "上午" : N < 1300 ? "中午" : N < 1800 ? "下午" : "晚上";
|
|
2074
2074
|
} };
|
|
2075
|
-
return b.default.locale(
|
|
2075
|
+
return b.default.locale(A, null, !0), A;
|
|
2076
2076
|
});
|
|
2077
2077
|
}(Fe)), Fe.exports;
|
|
2078
2078
|
}
|
|
@@ -2182,29 +2182,29 @@ const Hn = {
|
|
|
2182
2182
|
Et.lang.ok = "确定";
|
|
2183
2183
|
Ge.locale("zh-cn");
|
|
2184
2184
|
const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
2185
|
-
const u = t.dataset.key, i = t.dataset.value, b = t.dataset.placeholder,
|
|
2185
|
+
const u = t.dataset.key, i = t.dataset.value, b = t.dataset.placeholder, A = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, _ = t.dataset.disableFuture === "true", [M, N] = oe(() => {
|
|
2186
2186
|
if (!i) return null;
|
|
2187
2187
|
const n = i.split(",");
|
|
2188
2188
|
return n.length === 2 && n[0] && n[1] ? [Ge(n[0]), Ge(n[1])] : null;
|
|
2189
2189
|
}), [E, S] = oe(null);
|
|
2190
2190
|
return at(
|
|
2191
|
-
/* @__PURE__ */
|
|
2191
|
+
/* @__PURE__ */ I("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "260px", marginLeft: "4px", marginRight: "4px", fontSize: "16px", height: "30px", lineHeight: "30px" }, children: /* @__PURE__ */ I(
|
|
2192
2192
|
On,
|
|
2193
2193
|
{
|
|
2194
|
-
value:
|
|
2195
|
-
disabledDate: (n) => n ?
|
|
2194
|
+
value: M,
|
|
2195
|
+
disabledDate: (n) => n ? _ && n.isAfter(Ge(), "day") ? !0 : !A || !E || !E[0] ? !1 : Math.abs(n.diff(E[0], "days")) > A : !1,
|
|
2196
2196
|
onCalendarChange: (n) => {
|
|
2197
2197
|
console.log("[DatePicker] onCalendarChange", n?.map((a) => a?.format("YYYY-MM-DD") || null)), S(n);
|
|
2198
2198
|
},
|
|
2199
2199
|
onChange: (n) => {
|
|
2200
|
-
if (console.log("[DatePicker] onChange", n?.map((a) => a?.format("YYYY-MM-DD") || null)),
|
|
2200
|
+
if (console.log("[DatePicker] onChange", n?.map((a) => a?.format("YYYY-MM-DD") || null)), N(n), S(null), n && n[0] && n[1]) {
|
|
2201
2201
|
const a = `${n[0].format("YYYY-MM-DD")},${n[1].format("YYYY-MM-DD")}`;
|
|
2202
2202
|
t.setAttribute("data-value", a), h(u, a);
|
|
2203
2203
|
} else
|
|
2204
2204
|
t.setAttribute("data-value", ""), h(u, "");
|
|
2205
2205
|
},
|
|
2206
2206
|
onOpenChange: (n) => {
|
|
2207
|
-
console.log("[DatePicker] onOpenChange", n), S(n ?
|
|
2207
|
+
console.log("[DatePicker] onOpenChange", n), S(n ? M : null);
|
|
2208
2208
|
},
|
|
2209
2209
|
placeholder: [b || "开始日期", b || "结束日期"],
|
|
2210
2210
|
style: { width: "100%" },
|
|
@@ -2223,14 +2223,14 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2223
2223
|
const i = t.current;
|
|
2224
2224
|
if (!i) return;
|
|
2225
2225
|
const b = () => {
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2228
|
-
const E =
|
|
2229
|
-
E &&
|
|
2230
|
-
/* @__PURE__ */
|
|
2226
|
+
const _ = i.querySelectorAll(".rte-datepicker-host"), M = [];
|
|
2227
|
+
_.forEach((N) => {
|
|
2228
|
+
const E = N.getAttribute("data-key");
|
|
2229
|
+
E && M.push(
|
|
2230
|
+
/* @__PURE__ */ I(
|
|
2231
2231
|
Rn,
|
|
2232
2232
|
{
|
|
2233
|
-
host:
|
|
2233
|
+
host: N,
|
|
2234
2234
|
onChange: () => {
|
|
2235
2235
|
if (t.current) {
|
|
2236
2236
|
const S = new Event("input", { bubbles: !0 });
|
|
@@ -2241,32 +2241,32 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2241
2241
|
`datepicker-${E}`
|
|
2242
2242
|
)
|
|
2243
2243
|
);
|
|
2244
|
-
}), u(
|
|
2244
|
+
}), u(M);
|
|
2245
2245
|
};
|
|
2246
2246
|
b();
|
|
2247
|
-
const
|
|
2248
|
-
let
|
|
2249
|
-
for (const
|
|
2250
|
-
if (
|
|
2247
|
+
const A = new MutationObserver((_) => {
|
|
2248
|
+
let M = !1;
|
|
2249
|
+
for (const N of _)
|
|
2250
|
+
if (N.type === "childList") {
|
|
2251
2251
|
let E = !1;
|
|
2252
|
-
if (
|
|
2252
|
+
if (N.addedNodes.forEach((S) => {
|
|
2253
2253
|
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
2254
2254
|
const H = S;
|
|
2255
2255
|
(H.classList?.contains("rte-datepicker-host") || H.querySelector?.(".rte-datepicker-host")) && (E = !0);
|
|
2256
2256
|
}
|
|
2257
|
-
}),
|
|
2257
|
+
}), N.removedNodes.forEach((S) => {
|
|
2258
2258
|
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
2259
2259
|
const H = S;
|
|
2260
2260
|
(H.classList?.contains("rte-datepicker-host") || H.querySelector?.(".rte-datepicker-host")) && (E = !0);
|
|
2261
2261
|
}
|
|
2262
2262
|
}), E) {
|
|
2263
|
-
|
|
2263
|
+
M = !0;
|
|
2264
2264
|
break;
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
|
-
|
|
2267
|
+
M && b();
|
|
2268
2268
|
});
|
|
2269
|
-
return
|
|
2269
|
+
return A.observe(i, { childList: !0, subtree: !0 }), () => A.disconnect();
|
|
2270
2270
|
}, [t]), h;
|
|
2271
2271
|
}, Fn = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), zn = ({
|
|
2272
2272
|
config: t,
|
|
@@ -2274,14 +2274,14 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2274
2274
|
isProcessing: u = !1,
|
|
2275
2275
|
disabled: i = !1,
|
|
2276
2276
|
width: b,
|
|
2277
|
-
lockStructure:
|
|
2278
|
-
agentOptions:
|
|
2279
|
-
onAgentSelect:
|
|
2280
|
-
onAgentExit:
|
|
2277
|
+
lockStructure: A = !1,
|
|
2278
|
+
agentOptions: _ = [],
|
|
2279
|
+
onAgentSelect: M,
|
|
2280
|
+
onAgentExit: N,
|
|
2281
2281
|
loading: E = !1,
|
|
2282
2282
|
placeholder: S,
|
|
2283
2283
|
border: H,
|
|
2284
|
-
background:
|
|
2284
|
+
background: k = "transparent",
|
|
2285
2285
|
hideButtons: q,
|
|
2286
2286
|
maxHeight: e,
|
|
2287
2287
|
minHeight: n,
|
|
@@ -2290,7 +2290,7 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2290
2290
|
onCollapsedChange: p,
|
|
2291
2291
|
collapseTransitionMs: T = 260
|
|
2292
2292
|
}) => {
|
|
2293
|
-
const [V,
|
|
2293
|
+
const [V, L] = Wt.useMessage(), J = ae(null), K = ae(null), X = ae(null), r = ae(null), B = ae(null), [v, Y] = oe({}), [G, f] = oe(null), [c, m] = oe(null), [g, C] = oe(null), z = ae(!1), W = ae(null), [Q, te] = oe(!1), ce = ae(null), [fe, ue] = oe(!0), be = ae(0), [ee, ye] = oe(58), [ge, he] = oe(58), [ke, $e] = oe(!1), [Ee, Le] = oe({}), Ye = ae(() => {
|
|
2294
2294
|
}), [Ce, Te] = oe(() => {
|
|
2295
2295
|
const o = {};
|
|
2296
2296
|
return t.forEach((l) => {
|
|
@@ -2310,20 +2310,20 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2310
2310
|
r.current.querySelectorAll('[data-type="variable"]').forEach((x) => {
|
|
2311
2311
|
const R = x.dataset.key;
|
|
2312
2312
|
if (R) {
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2313
|
+
const P = x.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2314
|
+
P && (s[R] = P);
|
|
2315
2315
|
}
|
|
2316
2316
|
}), r.current.querySelectorAll('[data-type="select"]').forEach((x) => {
|
|
2317
2317
|
const R = x.dataset.key;
|
|
2318
2318
|
if (R) {
|
|
2319
|
-
const
|
|
2320
|
-
|
|
2319
|
+
const P = (x.getAttribute("data-value") || "").trim();
|
|
2320
|
+
P && (s[R] = P);
|
|
2321
2321
|
}
|
|
2322
2322
|
}), r.current.querySelectorAll('[data-type="textarea"]').forEach((x) => {
|
|
2323
2323
|
const R = x.dataset.key;
|
|
2324
2324
|
if (R) {
|
|
2325
|
-
const
|
|
2326
|
-
|
|
2325
|
+
const P = x.value.replace(/[\u200B]/g, "").trim();
|
|
2326
|
+
P && (s[R] = P);
|
|
2327
2327
|
}
|
|
2328
2328
|
}), je.current[o] = {
|
|
2329
2329
|
variableValues: s,
|
|
@@ -2337,8 +2337,8 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2337
2337
|
} else if (l) {
|
|
2338
2338
|
Ne.current = null;
|
|
2339
2339
|
const s = {};
|
|
2340
|
-
t.forEach((
|
|
2341
|
-
|
|
2340
|
+
t.forEach(($) => {
|
|
2341
|
+
$.type === "multi-variable" && $.key && (s[$.key] = 1);
|
|
2342
2342
|
}), Te(s), Y({});
|
|
2343
2343
|
} else
|
|
2344
2344
|
Ne.current = null, Te({}), Y({});
|
|
@@ -2353,18 +2353,18 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2353
2353
|
const o = [];
|
|
2354
2354
|
for (const l of t) {
|
|
2355
2355
|
if (o.push(l), l.type !== "report-url" || !l.key) continue;
|
|
2356
|
-
const s = Ee[l.key],
|
|
2357
|
-
|
|
2356
|
+
const s = Ee[l.key], $ = s?.status ?? "idle", y = s?.modules ?? [];
|
|
2357
|
+
$ === "loading" && o.push({
|
|
2358
2358
|
type: "text",
|
|
2359
2359
|
className: "rte-report-parsing",
|
|
2360
2360
|
text: `解析中...
|
|
2361
2361
|
`
|
|
2362
|
-
}),
|
|
2362
|
+
}), $ === "error" && s?.error && o.push({
|
|
2363
2363
|
type: "text",
|
|
2364
2364
|
className: "rte-report-error",
|
|
2365
2365
|
text: `解析失败:${Fn(s.error)}
|
|
2366
2366
|
`
|
|
2367
|
-
}), y.length > 0 && (y.forEach((
|
|
2367
|
+
}), y.length > 0 && (y.forEach((w, x) => {
|
|
2368
2368
|
o.push({
|
|
2369
2369
|
type: "report-module",
|
|
2370
2370
|
key: l.key,
|
|
@@ -2374,7 +2374,7 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2374
2374
|
required: !0,
|
|
2375
2375
|
minHeight: 80,
|
|
2376
2376
|
maxHeight: 260,
|
|
2377
|
-
text:
|
|
2377
|
+
text: w.content
|
|
2378
2378
|
});
|
|
2379
2379
|
}), o.push({ type: "text", text: `
|
|
2380
2380
|
` }));
|
|
@@ -2393,48 +2393,48 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2393
2393
|
return { url: l };
|
|
2394
2394
|
}
|
|
2395
2395
|
}
|
|
2396
|
-
const
|
|
2397
|
-
return { url: l, reportId:
|
|
2396
|
+
const $ = s.pathname.split("/").filter(Boolean), y = $.findIndex((P) => P === "report"), w = y >= 0 ? $[y + 1] : void 0, x = $[0] && $[0].length <= 5 ? $[0] : void 0, R = s.searchParams.get("agentId") || void 0;
|
|
2397
|
+
return { url: l, reportId: w, agentId: R, lang: x };
|
|
2398
2398
|
}, []), ct = se(() => {
|
|
2399
2399
|
const o = {};
|
|
2400
2400
|
if (!r.current) return o;
|
|
2401
2401
|
const l = r.current;
|
|
2402
2402
|
return l.querySelectorAll('[data-type="variable"]').forEach((s) => {
|
|
2403
|
-
const
|
|
2404
|
-
if (
|
|
2403
|
+
const $ = s.dataset.key;
|
|
2404
|
+
if (!$) return;
|
|
2405
2405
|
const y = s.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2406
|
-
y && (o[
|
|
2406
|
+
y && (o[$] = y);
|
|
2407
2407
|
}), l.querySelectorAll('[data-type="select"]').forEach((s) => {
|
|
2408
|
-
const
|
|
2409
|
-
if (
|
|
2408
|
+
const $ = s.dataset.key;
|
|
2409
|
+
if (!$) return;
|
|
2410
2410
|
const y = (s.getAttribute("data-value") || "").trim();
|
|
2411
|
-
y && (o[
|
|
2411
|
+
y && (o[$] = y);
|
|
2412
2412
|
}), l.querySelectorAll('[data-type="textarea"]').forEach((s) => {
|
|
2413
|
-
const
|
|
2414
|
-
if (
|
|
2413
|
+
const $ = s.dataset.key;
|
|
2414
|
+
if (!$) return;
|
|
2415
2415
|
const y = s.value.replace(/[\u200B]/g, "").trim();
|
|
2416
|
-
y && (o[
|
|
2416
|
+
y && (o[$] = y);
|
|
2417
2417
|
}), l.querySelectorAll('[data-type="richtext"]').forEach((s) => {
|
|
2418
|
-
const
|
|
2419
|
-
if (
|
|
2418
|
+
const $ = s.dataset.key;
|
|
2419
|
+
if (!$) return;
|
|
2420
2420
|
if ((s.getAttribute("data-node-type") || "") === "report-module") {
|
|
2421
2421
|
const x = Number.parseInt(s.getAttribute("data-module-index") || "0", 10), R = (s.innerHTML || "").replace(/[\u200B]/g, "").trim();
|
|
2422
|
-
o[`${
|
|
2422
|
+
o[`${$}__module_${Number.isFinite(x) ? x : 0}`] = R;
|
|
2423
2423
|
return;
|
|
2424
2424
|
}
|
|
2425
|
-
const
|
|
2426
|
-
|
|
2425
|
+
const w = (s.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
2426
|
+
w && (o[$] = w);
|
|
2427
2427
|
}), l.querySelectorAll('[data-type="datepicker"]').forEach((s) => {
|
|
2428
|
-
const
|
|
2429
|
-
if (
|
|
2428
|
+
const $ = s.dataset.key;
|
|
2429
|
+
if (!$) return;
|
|
2430
2430
|
const y = (s.getAttribute("data-value") || "").trim();
|
|
2431
|
-
y && (o[
|
|
2431
|
+
y && (o[$] = y);
|
|
2432
2432
|
}), o;
|
|
2433
2433
|
}, []), ut = se((o) => (o?.modules || []).map((l, s) => {
|
|
2434
|
-
const
|
|
2434
|
+
const $ = (l?.title || `模块${s + 1}`).trim() || `模块${s + 1}`, y = (l?.content || "").trim();
|
|
2435
2435
|
return {
|
|
2436
|
-
title:
|
|
2437
|
-
content: y.length > 0 ? y : `请补充:${
|
|
2436
|
+
title: $,
|
|
2437
|
+
content: y.length > 0 ? y : `请补充:${$}`
|
|
2438
2438
|
};
|
|
2439
2439
|
}), []), dt = se(
|
|
2440
2440
|
(o, l) => {
|
|
@@ -2447,8 +2447,8 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2447
2447
|
}));
|
|
2448
2448
|
return;
|
|
2449
2449
|
}
|
|
2450
|
-
const
|
|
2451
|
-
if (
|
|
2450
|
+
const $ = Ee[o];
|
|
2451
|
+
if ($?.lastParsedUrl && $.lastParsedUrl === s && $.status === "loading")
|
|
2452
2452
|
return;
|
|
2453
2453
|
Le((x) => ({
|
|
2454
2454
|
...x,
|
|
@@ -2470,21 +2470,21 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2470
2470
|
})))(y).then((x) => {
|
|
2471
2471
|
const R = ut(x);
|
|
2472
2472
|
if (r.current) {
|
|
2473
|
-
const
|
|
2474
|
-
R.forEach((F,
|
|
2475
|
-
|
|
2476
|
-
}), r.current.__tempVariableValues =
|
|
2473
|
+
const P = ct();
|
|
2474
|
+
R.forEach((F, j) => {
|
|
2475
|
+
P[`${o}__module_${j}`] = F.content;
|
|
2476
|
+
}), r.current.__tempVariableValues = P;
|
|
2477
2477
|
}
|
|
2478
|
-
Le((
|
|
2479
|
-
...
|
|
2478
|
+
Le((P) => ({
|
|
2479
|
+
...P,
|
|
2480
2480
|
[o]: { status: "success", error: void 0, lastParsedUrl: s, modules: R }
|
|
2481
2481
|
}));
|
|
2482
2482
|
}).catch((x) => {
|
|
2483
2483
|
const R = x instanceof Error ? x.message : String(x);
|
|
2484
|
-
Le((
|
|
2485
|
-
...
|
|
2484
|
+
Le((P) => ({
|
|
2485
|
+
...P,
|
|
2486
2486
|
[o]: {
|
|
2487
|
-
...
|
|
2487
|
+
...P[o] || { modules: [] },
|
|
2488
2488
|
status: "error",
|
|
2489
2489
|
error: R || "解析失败",
|
|
2490
2490
|
lastParsedUrl: s,
|
|
@@ -2501,28 +2501,28 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2501
2501
|
if (!r.current) return;
|
|
2502
2502
|
const o = /* @__PURE__ */ new Map(), l = window.setTimeout(() => {
|
|
2503
2503
|
if (!r.current) return;
|
|
2504
|
-
o.forEach((y,
|
|
2504
|
+
o.forEach((y, w) => w.removeEventListener("blur", y, !1)), o.clear();
|
|
2505
2505
|
const s = r.current.querySelectorAll(
|
|
2506
2506
|
'[data-type="variable"][data-node-type="report-url"]'
|
|
2507
|
-
),
|
|
2507
|
+
), $ = (y) => {
|
|
2508
2508
|
y.stopPropagation(), y.stopImmediatePropagation();
|
|
2509
|
-
const
|
|
2509
|
+
const w = y.target?.closest(
|
|
2510
2510
|
'[data-type="variable"][data-node-type="report-url"]'
|
|
2511
2511
|
);
|
|
2512
|
-
if (
|
|
2513
|
-
const x =
|
|
2512
|
+
if (!w || !r.current || !r.current.contains(w)) return;
|
|
2513
|
+
const x = w.dataset.key;
|
|
2514
2514
|
if (!x) return;
|
|
2515
|
-
const R =
|
|
2515
|
+
const R = w.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2516
2516
|
Ye.current(x, R);
|
|
2517
2517
|
};
|
|
2518
2518
|
s.forEach((y) => {
|
|
2519
|
-
y.addEventListener("blur",
|
|
2519
|
+
y.addEventListener("blur", $, !1), o.set(y, $);
|
|
2520
2520
|
});
|
|
2521
2521
|
}, 0);
|
|
2522
2522
|
return () => {
|
|
2523
|
-
window.clearTimeout(l), o.forEach((s,
|
|
2523
|
+
window.clearTimeout(l), o.forEach((s, $) => $.removeEventListener("blur", s, !1)), o.clear();
|
|
2524
2524
|
};
|
|
2525
|
-
}, [xe]), kn(r, xe, v,
|
|
2525
|
+
}, [xe]), kn(r, xe, v, A, Ce, ce, void 0, q), $n(r, xe, v, C), En(r, xe, C, q), Sn(r, xe, v, C), Cn(r, xe, C), Tn(r, xe, v, te), qn(r, z);
|
|
2526
2526
|
const Ue = vn(r);
|
|
2527
2527
|
pe(() => {
|
|
2528
2528
|
if (!r.current) return;
|
|
@@ -2532,33 +2532,33 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2532
2532
|
});
|
|
2533
2533
|
}, [xe, r]);
|
|
2534
2534
|
const Ke = Gn(r), Xe = se(() => {
|
|
2535
|
-
const o =
|
|
2535
|
+
const o = X.current;
|
|
2536
2536
|
if (!o) return;
|
|
2537
2537
|
const l = Math.max(0, Math.ceil(o.scrollHeight || 0));
|
|
2538
2538
|
!Number.isFinite(l) || l <= 0 || he((s) => s === l ? s : l);
|
|
2539
2539
|
}, []);
|
|
2540
2540
|
Me(() => {
|
|
2541
2541
|
if (!a) return;
|
|
2542
|
-
const o =
|
|
2542
|
+
const o = K.current, l = r.current;
|
|
2543
2543
|
if (!(!o || !l)) {
|
|
2544
2544
|
o.scrollTop = 0, o.scrollLeft = 0;
|
|
2545
2545
|
try {
|
|
2546
|
-
const s = l.getBoundingClientRect(),
|
|
2547
|
-
|
|
2548
|
-
const y = Array.from(
|
|
2549
|
-
let
|
|
2546
|
+
const s = l.getBoundingClientRect(), $ = document.createRange();
|
|
2547
|
+
$.selectNodeContents(l);
|
|
2548
|
+
const y = Array.from($.getClientRects());
|
|
2549
|
+
let w = 58;
|
|
2550
2550
|
if (y.length > 0) {
|
|
2551
2551
|
const x = Math.min(...y.map((F) => F.top)), R = 2;
|
|
2552
|
-
let
|
|
2552
|
+
let P = 0;
|
|
2553
2553
|
for (const F of y)
|
|
2554
|
-
Math.abs(F.top - x) <= R && (
|
|
2555
|
-
|
|
2554
|
+
Math.abs(F.top - x) <= R && (P = Math.max(P, F.bottom));
|
|
2555
|
+
P > 0 && (w = Math.max(0, Math.ceil(P - s.top)));
|
|
2556
2556
|
} else {
|
|
2557
|
-
const x = window.getComputedStyle(l), R = Number.parseFloat(x.minHeight) || 0,
|
|
2558
|
-
|
|
2557
|
+
const x = window.getComputedStyle(l), R = Number.parseFloat(x.minHeight) || 0, P = Number.parseFloat(x.paddingTop) || 0, F = Number.parseFloat(x.lineHeight) || 34;
|
|
2558
|
+
w = Math.max(0, Math.ceil(Math.max(R, P + F)));
|
|
2559
2559
|
}
|
|
2560
|
-
if (!Number.isFinite(
|
|
2561
|
-
ye((x) => x ===
|
|
2560
|
+
if (!Number.isFinite(w) || w <= 0) return;
|
|
2561
|
+
ye((x) => x === w ? x : w);
|
|
2562
2562
|
} catch {
|
|
2563
2563
|
}
|
|
2564
2564
|
}
|
|
@@ -2595,14 +2595,14 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2595
2595
|
ue(!0);
|
|
2596
2596
|
return;
|
|
2597
2597
|
}
|
|
2598
|
-
const s = r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "",
|
|
2599
|
-
let
|
|
2600
|
-
|
|
2601
|
-
(R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (
|
|
2598
|
+
const s = r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", $ = r.current.querySelectorAll('[data-type="variable"]'), y = r.current.querySelectorAll('[data-type="upload"]');
|
|
2599
|
+
let w = !1;
|
|
2600
|
+
$.forEach((R) => {
|
|
2601
|
+
(R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (w = !0);
|
|
2602
2602
|
}), y.forEach((R) => {
|
|
2603
|
-
R.querySelector(".upload-inner-wrapper.has-file") && (
|
|
2603
|
+
R.querySelector(".upload-inner-wrapper.has-file") && (w = !0);
|
|
2604
2604
|
});
|
|
2605
|
-
const x = !s &&
|
|
2605
|
+
const x = !s && !w;
|
|
2606
2606
|
ue(x), t.length === 0 && te(!x);
|
|
2607
2607
|
};
|
|
2608
2608
|
o();
|
|
@@ -2623,46 +2623,46 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2623
2623
|
o.preventDefault();
|
|
2624
2624
|
const l = o.clipboardData.getData("text/plain"), s = window.getSelection();
|
|
2625
2625
|
if (s && s.rangeCount > 0) {
|
|
2626
|
-
const
|
|
2627
|
-
if (
|
|
2626
|
+
const $ = s.anchorNode;
|
|
2627
|
+
if ($) {
|
|
2628
2628
|
let y = null;
|
|
2629
|
-
if (
|
|
2630
|
-
const
|
|
2631
|
-
if (
|
|
2632
|
-
const x = /[、,,\s\n\r\t]+/, R = l.split(x).map((
|
|
2629
|
+
if ($.nodeType === Node.ELEMENT_NODE ? y = $.closest('[data-type="variable"]') : $.nodeType === Node.TEXT_NODE && $.parentElement && (y = $.parentElement.closest('[data-type="variable"]')), y) {
|
|
2630
|
+
const w = y.dataset.multiKey;
|
|
2631
|
+
if (w) {
|
|
2632
|
+
const x = /[、,,\s\n\r\t]+/, R = l.split(x).map((P) => P.trim()).filter((P) => P.length > 0);
|
|
2633
2633
|
if (console.log("[Paste Event] 粘贴的内容:", l), console.log("[Paste Event] 拆分后的值:", R), R.length > 1) {
|
|
2634
|
-
const
|
|
2635
|
-
|
|
2634
|
+
const P = parseInt(y.dataset.index || "0", 10), F = t.find((le) => le.type === "multi-variable" && le.key === w)?.maxCount || 9, j = Ce[w] || 1, D = Math.min(P + R.length, F);
|
|
2635
|
+
D > j && Te((re) => ({
|
|
2636
2636
|
...re,
|
|
2637
|
-
[
|
|
2637
|
+
[w]: D
|
|
2638
2638
|
}));
|
|
2639
|
-
const
|
|
2640
|
-
for (let re = 0; re <
|
|
2641
|
-
const le = `${
|
|
2642
|
-
`[data-type="variable"][data-key="${le}"][data-multi-key="${
|
|
2639
|
+
const U = [];
|
|
2640
|
+
for (let re = 0; re < j; re++) {
|
|
2641
|
+
const le = `${w}_${re}`, me = r.current.querySelector(
|
|
2642
|
+
`[data-type="variable"][data-key="${le}"][data-multi-key="${w}"]`
|
|
2643
2643
|
);
|
|
2644
2644
|
if (me) {
|
|
2645
2645
|
const ve = me.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2646
|
-
|
|
2646
|
+
U.push(ve);
|
|
2647
2647
|
}
|
|
2648
2648
|
}
|
|
2649
|
-
|
|
2650
|
-
const Z =
|
|
2649
|
+
U.splice(P, 1, ...R.slice(0, F - P));
|
|
2650
|
+
const Z = U.slice(0, F);
|
|
2651
2651
|
Z.length > 0 && Z[Z.length - 1] !== "" && Z.length < F && Z.push("");
|
|
2652
2652
|
const O = Math.max(Z.length, 1), ne = {};
|
|
2653
2653
|
Z.forEach((re, le) => {
|
|
2654
|
-
re && (ne[`${
|
|
2654
|
+
re && (ne[`${w}_${le}`] = re);
|
|
2655
2655
|
}), r.current.querySelectorAll(
|
|
2656
2656
|
'[data-type="variable"]'
|
|
2657
2657
|
).forEach((re) => {
|
|
2658
2658
|
const le = re.dataset.key, me = re.dataset.multiKey;
|
|
2659
|
-
if (le && me !==
|
|
2659
|
+
if (le && me !== w) {
|
|
2660
2660
|
const ve = re.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2661
2661
|
ve && (ne[le] = ve);
|
|
2662
2662
|
}
|
|
2663
2663
|
}), r.current.__tempVariableValues = ne, Te((re) => ({
|
|
2664
2664
|
...re,
|
|
2665
|
-
[
|
|
2665
|
+
[w]: O
|
|
2666
2666
|
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", Z);
|
|
2667
2667
|
return;
|
|
2668
2668
|
} else R.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
|
|
@@ -2671,18 +2671,18 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2671
2671
|
}
|
|
2672
2672
|
}
|
|
2673
2673
|
document.execCommand("insertText", !1, l), ft(), setTimeout(() => {
|
|
2674
|
-
const
|
|
2675
|
-
if (
|
|
2676
|
-
const y =
|
|
2674
|
+
const $ = window.getSelection();
|
|
2675
|
+
if ($ && $.rangeCount > 0) {
|
|
2676
|
+
const y = $.anchorNode;
|
|
2677
2677
|
if (y) {
|
|
2678
|
-
let
|
|
2679
|
-
if (y.nodeType === Node.ELEMENT_NODE ?
|
|
2680
|
-
if ((
|
|
2681
|
-
const R =
|
|
2682
|
-
R && Ye.current(R,
|
|
2678
|
+
let w = null;
|
|
2679
|
+
if (y.nodeType === Node.ELEMENT_NODE ? w = y.closest('[data-type="variable"]') : y.nodeType === Node.TEXT_NODE && y.parentElement && (w = y.parentElement.closest('[data-type="variable"]')), w) {
|
|
2680
|
+
if ((w.getAttribute("data-node-type") || "") === "report-url") {
|
|
2681
|
+
const R = w.dataset.key, P = w.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2682
|
+
R && Ye.current(R, P);
|
|
2683
2683
|
}
|
|
2684
|
-
if (
|
|
2685
|
-
const R =
|
|
2684
|
+
if (w.dataset.multiKey) {
|
|
2685
|
+
const R = w.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2686
2686
|
/[、,,\s]+/.test(R) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", R), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
@@ -2694,27 +2694,27 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2694
2694
|
o.target && (o.target.value = ""), f(null), m(null);
|
|
2695
2695
|
return;
|
|
2696
2696
|
}
|
|
2697
|
-
const l = 10 * 1024 * 1024, s = (y) => y.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(y.name || ""),
|
|
2697
|
+
const l = 10 * 1024 * 1024, s = (y) => y.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(y.name || ""), $ = (y) => s(y) && y.size > l;
|
|
2698
2698
|
if (c && o.target.files && o.target.files.length > 0) {
|
|
2699
|
-
const y = c,
|
|
2700
|
-
if (
|
|
2701
|
-
const F =
|
|
2702
|
-
let
|
|
2703
|
-
Y((
|
|
2699
|
+
const y = c, w = t.find((F) => F.type === "upload" && F.key === y), x = Array.from(o.target.files), R = x.filter((F) => !$(F)), P = x.length - R.length;
|
|
2700
|
+
if (P > 0 && V.error(`已自动过滤 ${P} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), w && typeof w.maxCount == "number" && typeof w.minCount == "number") {
|
|
2701
|
+
const F = w.maxCount;
|
|
2702
|
+
let j = 0;
|
|
2703
|
+
Y((D) => {
|
|
2704
2704
|
for (let ne = 0; ne < F; ne++) {
|
|
2705
2705
|
const de = `${y}-${ne}`;
|
|
2706
|
-
|
|
2706
|
+
D[de] && (j = ne + 1);
|
|
2707
2707
|
}
|
|
2708
|
-
const
|
|
2708
|
+
const U = F - j, Z = R.slice(0, U), O = { ...D };
|
|
2709
2709
|
return Z.forEach((ne, de) => {
|
|
2710
|
-
const re = `${y}-${
|
|
2710
|
+
const re = `${y}-${j + de}`;
|
|
2711
2711
|
O[re] = ne;
|
|
2712
2712
|
}), O;
|
|
2713
2713
|
});
|
|
2714
2714
|
}
|
|
2715
2715
|
} else if (G && o.target.files[0]) {
|
|
2716
|
-
const y = o.target.files[0],
|
|
2717
|
-
|
|
2716
|
+
const y = o.target.files[0], w = G;
|
|
2717
|
+
$(y) ? V.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : Y((x) => ({ ...x, [w]: y }));
|
|
2718
2718
|
}
|
|
2719
2719
|
o.target && (o.target.value = ""), f(null), m(null);
|
|
2720
2720
|
}, pt = (o) => {
|
|
@@ -2727,32 +2727,32 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2727
2727
|
if (l.closest(".rte-datepicker-wrapper") || l.closest(".rte-datepicker-host") || l.closest(".rte-select-wrapper") || l.closest(".rte-select-host") || l.closest(".ant-select-dropdown"))
|
|
2728
2728
|
return;
|
|
2729
2729
|
if (l.closest(".tag-close-btn")) {
|
|
2730
|
-
if (o.preventDefault(), o.stopPropagation(),
|
|
2730
|
+
if (o.preventDefault(), o.stopPropagation(), A)
|
|
2731
2731
|
return;
|
|
2732
|
-
C(null),
|
|
2732
|
+
C(null), N ? N() : r.current && (r.current.innerHTML = "", r.current.focus());
|
|
2733
2733
|
return;
|
|
2734
2734
|
}
|
|
2735
|
-
if (
|
|
2736
|
-
const y = l.closest(".tag-node"),
|
|
2737
|
-
if (y ||
|
|
2735
|
+
if (A) {
|
|
2736
|
+
const y = l.closest(".tag-node"), w = l.closest('[data-type="text"]');
|
|
2737
|
+
if (y || w) {
|
|
2738
2738
|
o.preventDefault(), o.stopPropagation();
|
|
2739
2739
|
const x = window.getSelection();
|
|
2740
2740
|
x && x.removeAllRanges();
|
|
2741
2741
|
return;
|
|
2742
2742
|
}
|
|
2743
2743
|
}
|
|
2744
|
-
l.closest('[data-type="variable"]') || (
|
|
2744
|
+
l.closest('[data-type="variable"]') || (W.current = { x: o.clientX, y: o.clientY }, z.current = !1, l.closest(".file-remove-btn") && (o.preventDefault(), o.stopPropagation()));
|
|
2745
2745
|
}, Nt = (o) => {
|
|
2746
|
-
if (!o.target.closest('[data-type="variable"]') &&
|
|
2747
|
-
const
|
|
2748
|
-
(
|
|
2746
|
+
if (!o.target.closest('[data-type="variable"]') && W.current) {
|
|
2747
|
+
const $ = Math.abs(o.clientX - W.current.x), y = Math.abs(o.clientY - W.current.y);
|
|
2748
|
+
($ > 3 || y > 3) && (z.current = !0);
|
|
2749
2749
|
}
|
|
2750
2750
|
}, At = (o) => {
|
|
2751
2751
|
if (o.target.closest('[data-type="variable"]')) {
|
|
2752
|
-
|
|
2752
|
+
W.current = null, z.current = !1;
|
|
2753
2753
|
return;
|
|
2754
2754
|
}
|
|
2755
|
-
|
|
2755
|
+
W.current = null, z.current = !1;
|
|
2756
2756
|
}, _t = (o) => {
|
|
2757
2757
|
if (i)
|
|
2758
2758
|
return;
|
|
@@ -2766,11 +2766,11 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
if (t.length === 0)
|
|
2768
2768
|
return;
|
|
2769
|
-
const y = (
|
|
2769
|
+
const y = (D, U) => {
|
|
2770
2770
|
if (!r.current) return;
|
|
2771
2771
|
Array.from(r.current.children).forEach((O) => {
|
|
2772
|
-
if (O !==
|
|
2773
|
-
if (
|
|
2772
|
+
if (O !== D)
|
|
2773
|
+
if (U)
|
|
2774
2774
|
O.dataset.prevDisplay === void 0 && (O.dataset.prevDisplay = O.style.display || ""), O.dataset.rteForceHidden = "1", O.style.setProperty("display", "none", "important");
|
|
2775
2775
|
else {
|
|
2776
2776
|
if (O.dataset.prevDisplay !== void 0) {
|
|
@@ -2781,19 +2781,19 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2781
2781
|
delete O.dataset.rteForceHidden;
|
|
2782
2782
|
}
|
|
2783
2783
|
});
|
|
2784
|
-
},
|
|
2785
|
-
if (
|
|
2784
|
+
}, w = l.closest(".rte-textarea-toggle");
|
|
2785
|
+
if (w) {
|
|
2786
2786
|
o.preventDefault(), o.stopPropagation();
|
|
2787
|
-
const
|
|
2788
|
-
|
|
2789
|
-
const ne =
|
|
2790
|
-
if (ne ? ne.classList.toggle("rte-textarea-overlay", O) :
|
|
2787
|
+
const D = w.closest(".rte-textarea-wrapper"), U = D?.querySelector('[data-type="textarea"]'), O = !(w.getAttribute("data-expanded") === "true");
|
|
2788
|
+
w.setAttribute("data-expanded", String(O)), w.textContent = O ? "收起" : "展开", D && D.classList.toggle("rte-textarea-expanded", O);
|
|
2789
|
+
const ne = D?.closest(".rte-textarea-required");
|
|
2790
|
+
if (ne ? ne.classList.toggle("rte-textarea-overlay", O) : D && D.classList.toggle("rte-textarea-overlay", O), U)
|
|
2791
2791
|
if (O)
|
|
2792
|
-
|
|
2792
|
+
U.classList.add("rte-textarea-expanded"), U.style.maxHeight = "none", U.style.height = "100%";
|
|
2793
2793
|
else {
|
|
2794
|
-
|
|
2795
|
-
const de =
|
|
2796
|
-
|
|
2794
|
+
U.classList.remove("rte-textarea-expanded");
|
|
2795
|
+
const de = U.dataset.maxHeight || "252";
|
|
2796
|
+
U.style.maxHeight = `${de}px`, U.style.height = "auto";
|
|
2797
2797
|
}
|
|
2798
2798
|
r.current && (O ? r.current.classList.add("rte-overlay-active") : r.current.classList.remove("rte-overlay-active"));
|
|
2799
2799
|
return;
|
|
@@ -2801,20 +2801,20 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2801
2801
|
const x = l.closest(".rte-richtext-toggle");
|
|
2802
2802
|
if (x) {
|
|
2803
2803
|
o.preventDefault(), o.stopPropagation();
|
|
2804
|
-
const
|
|
2804
|
+
const D = x.closest(".rte-richtext-wrapper"), U = D?.querySelector('[data-type="richtext"]'), O = !(x.getAttribute("data-expanded") === "true");
|
|
2805
2805
|
((le, me) => {
|
|
2806
2806
|
le.setAttribute("data-expanded", String(me)), le.innerHTML = me ? '<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>' : '<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>';
|
|
2807
2807
|
})(x, O);
|
|
2808
|
-
const de =
|
|
2809
|
-
de ? de.classList.toggle("rte-richtext-expanded", O) :
|
|
2810
|
-
const re =
|
|
2811
|
-
if (
|
|
2812
|
-
if (r.current.classList.toggle("rte-richtext-fullscreen-active", O),
|
|
2808
|
+
const de = D?.closest(".rte-richtext-required");
|
|
2809
|
+
de ? de.classList.toggle("rte-richtext-expanded", O) : D && D.classList.toggle("rte-richtext-expanded", O);
|
|
2810
|
+
const re = D?.closest(".exclusion-wrapper") || D?.parentElement;
|
|
2811
|
+
if (U && (O ? (U.style.height = "100%", U.style.overflow = "auto") : (U.style.height = "", U.style.overflow = "")), re && (re.classList.toggle("rte-richtext-host-expanded", O), y(re, O)), r.current) {
|
|
2812
|
+
if (r.current.classList.toggle("rte-richtext-fullscreen-active", O), J.current?.classList.toggle("rte-richtext-container-expanded", O), J.current)
|
|
2813
2813
|
if (O) {
|
|
2814
|
-
const le = Math.ceil(
|
|
2815
|
-
le > 0 &&
|
|
2814
|
+
const le = Math.ceil(J.current.getBoundingClientRect().height || 0);
|
|
2815
|
+
le > 0 && J.current.style.setProperty("--rte-richtext-fullscreen-height", `${le}px`);
|
|
2816
2816
|
} else
|
|
2817
|
-
|
|
2817
|
+
J.current.style.removeProperty("--rte-richtext-fullscreen-height");
|
|
2818
2818
|
if (O)
|
|
2819
2819
|
be.current = r.current.scrollTop || 0, setTimeout(() => {
|
|
2820
2820
|
r.current && (r.current.scrollTop = 0, r.current.scrollLeft = 0);
|
|
@@ -2830,30 +2830,30 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
if (l.closest('[data-type="text"]')) {
|
|
2832
2832
|
o.preventDefault(), o.stopPropagation();
|
|
2833
|
-
const
|
|
2834
|
-
|
|
2833
|
+
const D = window.getSelection();
|
|
2834
|
+
D && D.removeAllRanges();
|
|
2835
2835
|
return;
|
|
2836
2836
|
}
|
|
2837
|
-
if (
|
|
2837
|
+
if (A && l.closest(".tag-node")) {
|
|
2838
2838
|
o.preventDefault(), o.stopPropagation();
|
|
2839
|
-
const
|
|
2840
|
-
|
|
2839
|
+
const U = window.getSelection();
|
|
2840
|
+
U && U.removeAllRanges();
|
|
2841
2841
|
return;
|
|
2842
2842
|
}
|
|
2843
2843
|
if (l.closest('[data-type="variable"]')) {
|
|
2844
2844
|
if (z.current)
|
|
2845
2845
|
return;
|
|
2846
2846
|
setTimeout(() => {
|
|
2847
|
-
const
|
|
2848
|
-
|
|
2847
|
+
const D = window.getSelection();
|
|
2848
|
+
D && !D.isCollapsed || Qe(r);
|
|
2849
2849
|
}, 10);
|
|
2850
2850
|
return;
|
|
2851
2851
|
}
|
|
2852
2852
|
const F = l.closest(".file-remove-btn");
|
|
2853
2853
|
if (F) {
|
|
2854
2854
|
o.preventDefault(), o.stopPropagation();
|
|
2855
|
-
const
|
|
2856
|
-
if (
|
|
2855
|
+
const D = F.closest('[data-type="upload"]'), U = D?.dataset.key, Z = D?.dataset.batchKey;
|
|
2856
|
+
if (U)
|
|
2857
2857
|
if (Z) {
|
|
2858
2858
|
const O = t.find((ne) => ne.type === "upload" && ne.key === Z);
|
|
2859
2859
|
if (O && typeof O.maxCount == "number" && typeof O.minCount == "number") {
|
|
@@ -2862,7 +2862,7 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2862
2862
|
const re = { ...de }, le = [];
|
|
2863
2863
|
for (let me = 0; me < ne; me++) {
|
|
2864
2864
|
const ve = `${Z}-${me}`, Se = re[ve];
|
|
2865
|
-
Se != null && ve !==
|
|
2865
|
+
Se != null && ve !== U && le.push(Se);
|
|
2866
2866
|
}
|
|
2867
2867
|
for (let me = 0; me < ne; me++)
|
|
2868
2868
|
delete re[`${Z}-${me}`];
|
|
@@ -2871,43 +2871,43 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2871
2871
|
}), re;
|
|
2872
2872
|
});
|
|
2873
2873
|
} else
|
|
2874
|
-
pt(
|
|
2874
|
+
pt(U);
|
|
2875
2875
|
} else
|
|
2876
|
-
pt(
|
|
2876
|
+
pt(U);
|
|
2877
2877
|
return;
|
|
2878
2878
|
}
|
|
2879
|
-
const
|
|
2880
|
-
if (
|
|
2881
|
-
const
|
|
2882
|
-
if (
|
|
2883
|
-
if (
|
|
2884
|
-
const Z = t.find((O) => O.type === "upload" && O.key ===
|
|
2879
|
+
const j = l.closest('[data-type="upload"]');
|
|
2880
|
+
if (j) {
|
|
2881
|
+
const D = j.dataset.key, U = j.dataset.batchKey;
|
|
2882
|
+
if (D)
|
|
2883
|
+
if (U) {
|
|
2884
|
+
const Z = t.find((O) => O.type === "upload" && O.key === U);
|
|
2885
2885
|
if (Z && typeof Z.maxCount == "number" && typeof Z.minCount == "number") {
|
|
2886
2886
|
const O = Z.maxCount;
|
|
2887
2887
|
let ne = 0;
|
|
2888
2888
|
for (let de = 0; de < O; de++)
|
|
2889
|
-
v[`${
|
|
2890
|
-
ne < O && B.current ? (B.current.multiple = !0, m(
|
|
2889
|
+
v[`${U}-${de}`] != null && (ne += 1);
|
|
2890
|
+
ne < O && B.current ? (B.current.multiple = !0, m(U), B.current.click()) : (B.current && (B.current.multiple = !1), f(D), B.current?.click());
|
|
2891
2891
|
} else
|
|
2892
|
-
B.current && (B.current.multiple = !1), f(
|
|
2892
|
+
B.current && (B.current.multiple = !1), f(D), B.current?.click();
|
|
2893
2893
|
} else
|
|
2894
|
-
B.current && (B.current.multiple = !1), f(
|
|
2894
|
+
B.current && (B.current.multiple = !1), f(D), B.current?.click();
|
|
2895
2895
|
return;
|
|
2896
2896
|
}
|
|
2897
2897
|
}, Lt = (o) => {
|
|
2898
2898
|
const s = o.target.closest('[data-type="variable"]');
|
|
2899
2899
|
if (s) {
|
|
2900
|
-
const
|
|
2901
|
-
if (
|
|
2902
|
-
const y = document.createRange(),
|
|
2903
|
-
if (
|
|
2904
|
-
let R = 0,
|
|
2905
|
-
|
|
2900
|
+
const $ = window.getSelection();
|
|
2901
|
+
if ($) {
|
|
2902
|
+
const y = document.createRange(), w = s.textContent || "";
|
|
2903
|
+
if (w.replace(/\u200B/g, "")) {
|
|
2904
|
+
let R = 0, P = w.length;
|
|
2905
|
+
w.startsWith("") && (R = 1), w.endsWith("") && w.length > 1 && (P = w.length - 1);
|
|
2906
2906
|
const F = s.firstChild;
|
|
2907
|
-
F && F.nodeType === Node.TEXT_NODE ? (y.setStart(F, R), y.setEnd(F,
|
|
2907
|
+
F && F.nodeType === Node.TEXT_NODE ? (y.setStart(F, R), y.setEnd(F, P)) : y.selectNodeContents(s);
|
|
2908
2908
|
} else
|
|
2909
2909
|
y.selectNodeContents(s), y.collapse(!0);
|
|
2910
|
-
|
|
2910
|
+
$.removeAllRanges(), $.addRange(y);
|
|
2911
2911
|
}
|
|
2912
2912
|
}
|
|
2913
2913
|
}, ft = () => {
|
|
@@ -2921,56 +2921,56 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2921
2921
|
if (Qe(r), r.current && r.current.querySelectorAll(
|
|
2922
2922
|
'[data-type="variable"][data-node-type="report-url"]'
|
|
2923
2923
|
).forEach((s) => {
|
|
2924
|
-
const
|
|
2925
|
-
if (
|
|
2926
|
-
s.innerText.replace(/[\u200B\n]/g, "").trim() || Le((
|
|
2927
|
-
const x = $
|
|
2928
|
-
return !x || x.status === "idle" && (!x.modules || x.modules.length === 0) ?
|
|
2929
|
-
|
|
2930
|
-
[
|
|
2924
|
+
const $ = s.dataset.key;
|
|
2925
|
+
if (!$) return;
|
|
2926
|
+
s.innerText.replace(/[\u200B\n]/g, "").trim() || Le((w) => {
|
|
2927
|
+
const x = w[$];
|
|
2928
|
+
return !x || x.status === "idle" && (!x.modules || x.modules.length === 0) ? w : {
|
|
2929
|
+
...w,
|
|
2930
|
+
[$]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
|
|
2931
2931
|
};
|
|
2932
2932
|
});
|
|
2933
2933
|
}), r.current && r.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
|
|
2934
|
-
const
|
|
2935
|
-
if (
|
|
2934
|
+
const $ = s.querySelector(".variable-info-icon");
|
|
2935
|
+
if ($) {
|
|
2936
2936
|
let y = !1;
|
|
2937
|
-
const
|
|
2937
|
+
const w = document.createTreeWalker(
|
|
2938
2938
|
s,
|
|
2939
2939
|
NodeFilter.SHOW_TEXT,
|
|
2940
2940
|
{
|
|
2941
|
-
acceptNode: (x) =>
|
|
2941
|
+
acceptNode: (x) => $.contains(x) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
2942
2942
|
}
|
|
2943
2943
|
);
|
|
2944
|
-
for (;
|
|
2945
|
-
if (
|
|
2944
|
+
for (; w.nextNode(); )
|
|
2945
|
+
if (w.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
|
|
2946
2946
|
y = !0;
|
|
2947
2947
|
break;
|
|
2948
2948
|
}
|
|
2949
|
-
y ?
|
|
2949
|
+
y ? $.classList.add("hidden") : $.classList.remove("hidden");
|
|
2950
2950
|
}
|
|
2951
2951
|
}), a || window.requestAnimationFrame(() => {
|
|
2952
2952
|
Xe();
|
|
2953
2953
|
}), Ze(r, xe, v), et(r, xe, v, te), !r.current) return;
|
|
2954
2954
|
t.filter((l) => l.type === "multi-variable" && l.key).forEach((l) => {
|
|
2955
2955
|
if (!l.key) return;
|
|
2956
|
-
const s = l.maxCount || 9,
|
|
2957
|
-
for (let F = 0; F <
|
|
2958
|
-
const
|
|
2959
|
-
`[data-type="variable"][data-key="${
|
|
2956
|
+
const s = l.maxCount || 9, $ = Ce[l.key] || 1, y = [];
|
|
2957
|
+
for (let F = 0; F < $; F++) {
|
|
2958
|
+
const j = `${l.key}_${F}`, D = r.current.querySelector(
|
|
2959
|
+
`[data-type="variable"][data-key="${j}"][data-multi-key="${l.key}"]`
|
|
2960
2960
|
);
|
|
2961
|
-
if (
|
|
2962
|
-
const
|
|
2963
|
-
y.push(
|
|
2961
|
+
if (D) {
|
|
2962
|
+
const U = D.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2963
|
+
y.push(U);
|
|
2964
2964
|
}
|
|
2965
2965
|
}
|
|
2966
2966
|
const x = (y[y.length - 1] || "") === "";
|
|
2967
|
-
let R = !1,
|
|
2967
|
+
let R = !1, P = -1;
|
|
2968
2968
|
for (let F = 0; F < y.length - 1; F++)
|
|
2969
2969
|
if (y[F] === "") {
|
|
2970
|
-
R = !0,
|
|
2970
|
+
R = !0, P = F;
|
|
2971
2971
|
break;
|
|
2972
2972
|
}
|
|
2973
|
-
if (R &&
|
|
2973
|
+
if (R && P >= 0) {
|
|
2974
2974
|
const F = window.getSelection();
|
|
2975
2975
|
if (F && F.rangeCount > 0) {
|
|
2976
2976
|
const O = F.getRangeAt(0), ne = O.startContainer, de = ne.nodeType === Node.ELEMENT_NODE ? ne.closest('[data-type="variable"][data-multi-key]') : ne.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
@@ -2984,34 +2984,34 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
2987
|
-
const
|
|
2988
|
-
for (let O =
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
const
|
|
2992
|
-
|
|
2993
|
-
O && (
|
|
2987
|
+
const j = [...y];
|
|
2988
|
+
for (let O = P; O < j.length - 1; O++)
|
|
2989
|
+
j[O] = j[O + 1];
|
|
2990
|
+
j.pop();
|
|
2991
|
+
const D = {};
|
|
2992
|
+
j.forEach((O, ne) => {
|
|
2993
|
+
O && (D[`${l.key}_${ne}`] = O);
|
|
2994
2994
|
});
|
|
2995
|
-
const
|
|
2995
|
+
const U = Math.max(x ? j.length : j.length + 1, 1);
|
|
2996
2996
|
r.current.querySelectorAll(
|
|
2997
2997
|
'[data-type="variable"]'
|
|
2998
2998
|
).forEach((O) => {
|
|
2999
2999
|
const ne = O.dataset.key, de = O.dataset.multiKey;
|
|
3000
3000
|
if (ne && de !== l.key) {
|
|
3001
3001
|
const re = O.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3002
|
-
re && (
|
|
3002
|
+
re && (D[ne] = re);
|
|
3003
3003
|
}
|
|
3004
|
-
}), r.current.__tempVariableValues =
|
|
3004
|
+
}), r.current.__tempVariableValues = D, Te((O) => ({
|
|
3005
3005
|
...O,
|
|
3006
|
-
[l.key]:
|
|
3006
|
+
[l.key]: U
|
|
3007
3007
|
}));
|
|
3008
3008
|
return;
|
|
3009
3009
|
}
|
|
3010
3010
|
if (!x) {
|
|
3011
|
-
const F =
|
|
3012
|
-
`[data-type="variable"][data-key="${
|
|
3011
|
+
const F = $ - 1, j = `${l.key}_${F}`, D = r.current.querySelector(
|
|
3012
|
+
`[data-type="variable"][data-key="${j}"][data-multi-key="${l.key}"]`
|
|
3013
3013
|
);
|
|
3014
|
-
if (
|
|
3014
|
+
if (D && D.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && $ < s) {
|
|
3015
3015
|
const Z = window.getSelection();
|
|
3016
3016
|
if (Z && Z.rangeCount > 0) {
|
|
3017
3017
|
const O = Z.getRangeAt(0), ne = O.startContainer, de = ne.nodeType === Node.ELEMENT_NODE ? ne.closest('[data-type="variable"][data-multi-key]') : ne.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
@@ -3027,7 +3027,7 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3027
3027
|
}
|
|
3028
3028
|
Te((O) => ({
|
|
3029
3029
|
...O,
|
|
3030
|
-
[l.key]:
|
|
3030
|
+
[l.key]: $ + 1
|
|
3031
3031
|
}));
|
|
3032
3032
|
}
|
|
3033
3033
|
}
|
|
@@ -3036,13 +3036,13 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3036
3036
|
Me(() => {
|
|
3037
3037
|
const o = r.current;
|
|
3038
3038
|
if (!o) return;
|
|
3039
|
-
const l = /* @__PURE__ */ new Map(), s = (
|
|
3040
|
-
const x =
|
|
3039
|
+
const l = /* @__PURE__ */ new Map(), s = (w) => {
|
|
3040
|
+
const x = w.target, R = w.relatedTarget;
|
|
3041
3041
|
!x || !r.current || !r.current.contains(x) || R && r.current.contains(R) || setTimeout(() => {
|
|
3042
3042
|
if (r.current) {
|
|
3043
3043
|
if (t.length === 0) {
|
|
3044
|
-
const
|
|
3045
|
-
te(
|
|
3044
|
+
const P = r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
3045
|
+
te(P.length > 0);
|
|
3046
3046
|
return;
|
|
3047
3047
|
}
|
|
3048
3048
|
Qe(r), Ze(r, xe, v), et(r, xe, v, te);
|
|
@@ -3050,35 +3050,35 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3050
3050
|
}, 0);
|
|
3051
3051
|
};
|
|
3052
3052
|
o.addEventListener("blur", s, !0);
|
|
3053
|
-
const
|
|
3053
|
+
const $ = () => {
|
|
3054
3054
|
if (!r.current) return;
|
|
3055
|
-
l.forEach((R,
|
|
3056
|
-
|
|
3055
|
+
l.forEach((R, P) => {
|
|
3056
|
+
P.removeEventListener("blur", R, !1);
|
|
3057
3057
|
}), l.clear();
|
|
3058
|
-
const
|
|
3058
|
+
const w = r.current.querySelectorAll(
|
|
3059
3059
|
'[data-type="variable"][data-multi-key]'
|
|
3060
3060
|
), x = (R) => {
|
|
3061
3061
|
R.stopPropagation(), R.stopImmediatePropagation();
|
|
3062
|
-
const
|
|
3063
|
-
if (!
|
|
3062
|
+
const P = R.target;
|
|
3063
|
+
if (!P || !r.current || !r.current.contains(P))
|
|
3064
3064
|
return;
|
|
3065
|
-
const F =
|
|
3065
|
+
const F = P.closest('[data-type="variable"][data-multi-key]');
|
|
3066
3066
|
if (!F || !r.current.contains(F))
|
|
3067
3067
|
return;
|
|
3068
|
-
let
|
|
3068
|
+
let j = !1;
|
|
3069
3069
|
if (l.forEach((le, me) => {
|
|
3070
|
-
(me === F || me.contains(
|
|
3071
|
-
}), !
|
|
3070
|
+
(me === F || me.contains(P)) && (j = !0);
|
|
3071
|
+
}), !j)
|
|
3072
3072
|
return;
|
|
3073
|
-
const
|
|
3074
|
-
if (!
|
|
3073
|
+
const D = F.dataset.multiKey, U = F.dataset.key, Z = F.dataset.index;
|
|
3074
|
+
if (!D || !U || Z === void 0) return;
|
|
3075
3075
|
const O = R.relatedTarget;
|
|
3076
3076
|
if (!(!O || !r.current.contains(O)))
|
|
3077
3077
|
return;
|
|
3078
3078
|
const de = F.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3079
3079
|
console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
|
|
3080
|
-
multiKey:
|
|
3081
|
-
currentKey:
|
|
3080
|
+
multiKey: D,
|
|
3081
|
+
currentKey: U,
|
|
3082
3082
|
index: Z,
|
|
3083
3083
|
content: de
|
|
3084
3084
|
});
|
|
@@ -3088,12 +3088,12 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3088
3088
|
console.log("[Blur Event] 拆分前的内容:", de), console.log("[Blur Event] 拆分后的部分:", le);
|
|
3089
3089
|
const ve = le.slice(0, 9);
|
|
3090
3090
|
if (console.log("[Blur Event] 有效的部分(最多9个):", ve), ve.length > 1) {
|
|
3091
|
-
const Se = t.find((De) => De.type === "multi-variable" && De.key ===
|
|
3091
|
+
const Se = t.find((De) => De.type === "multi-variable" && De.key === D);
|
|
3092
3092
|
if (Se) {
|
|
3093
|
-
const De = Ce[
|
|
3093
|
+
const De = Ce[D] || 1, mt = parseInt(Z, 10), yt = Se.maxCount || 9, Pe = [];
|
|
3094
3094
|
for (let we = 0; we < De; we++) {
|
|
3095
|
-
const _e = `${
|
|
3096
|
-
`[data-type="variable"][data-key="${_e}"][data-multi-key="${
|
|
3095
|
+
const _e = `${D}_${we}`, Be = r.current.querySelector(
|
|
3096
|
+
`[data-type="variable"][data-key="${_e}"][data-multi-key="${D}"]`
|
|
3097
3097
|
);
|
|
3098
3098
|
if (Be) {
|
|
3099
3099
|
const Ve = Be.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
@@ -3105,32 +3105,32 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3105
3105
|
console.log("[Blur Event] 拆分后的所有值:", qe), qe.length > 0 && qe[qe.length - 1] !== "" && qe.length < yt && qe.push("");
|
|
3106
3106
|
const Ht = Math.max(qe.length, 1), Je = {};
|
|
3107
3107
|
qe.forEach((we, _e) => {
|
|
3108
|
-
we && (Je[`${
|
|
3108
|
+
we && (Je[`${D}_${_e}`] = we);
|
|
3109
3109
|
}), r.current.querySelectorAll(
|
|
3110
3110
|
'[data-type="variable"]'
|
|
3111
3111
|
).forEach((we) => {
|
|
3112
3112
|
const _e = we.dataset.key, Be = we.dataset.multiKey;
|
|
3113
|
-
if (_e && Be !==
|
|
3113
|
+
if (_e && Be !== D) {
|
|
3114
3114
|
const Ve = we.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3115
3115
|
Ve && (Je[_e] = Ve);
|
|
3116
3116
|
}
|
|
3117
3117
|
}), r.current.__tempVariableValues = Je, Te((we) => ({
|
|
3118
3118
|
...we,
|
|
3119
|
-
[
|
|
3119
|
+
[D]: Ht
|
|
3120
3120
|
}));
|
|
3121
3121
|
}
|
|
3122
3122
|
}
|
|
3123
3123
|
}
|
|
3124
3124
|
};
|
|
3125
|
-
|
|
3125
|
+
w.forEach((R) => {
|
|
3126
3126
|
R.addEventListener("blur", x, !1), l.set(R, x);
|
|
3127
3127
|
});
|
|
3128
3128
|
}, y = setTimeout(() => {
|
|
3129
|
-
|
|
3129
|
+
$();
|
|
3130
3130
|
}, 0);
|
|
3131
3131
|
return () => {
|
|
3132
|
-
clearTimeout(y), o.removeEventListener("blur", s, !0), l.forEach((
|
|
3133
|
-
x.removeEventListener("blur",
|
|
3132
|
+
clearTimeout(y), o.removeEventListener("blur", s, !0), l.forEach((w, x) => {
|
|
3133
|
+
x.removeEventListener("blur", w, !1);
|
|
3134
3134
|
}), l.clear();
|
|
3135
3135
|
};
|
|
3136
3136
|
}, [t, xe, Ce, v]);
|
|
@@ -3146,8 +3146,8 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3146
3146
|
const l = window.getSelection();
|
|
3147
3147
|
if (l && l.rangeCount > 0) {
|
|
3148
3148
|
const s = l.anchorNode;
|
|
3149
|
-
let
|
|
3150
|
-
if (s && (s.nodeType === Node.ELEMENT_NODE ?
|
|
3149
|
+
let $ = null;
|
|
3150
|
+
if (s && (s.nodeType === Node.ELEMENT_NODE ? $ = s.closest('[data-type="text"]') : s.nodeType === Node.TEXT_NODE && s.parentElement && ($ = s.parentElement.closest('[data-type="text"]'))), $) {
|
|
3151
3151
|
if (o.preventDefault(), o.stopPropagation(), r.current) {
|
|
3152
3152
|
const y = r.current.querySelector(
|
|
3153
3153
|
'[data-type="variable"], [data-type="upload"]'
|
|
@@ -3157,10 +3157,10 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3157
3157
|
return;
|
|
3158
3158
|
}
|
|
3159
3159
|
}
|
|
3160
|
-
if (
|
|
3160
|
+
if (A && l && l.rangeCount > 0) {
|
|
3161
3161
|
const s = l.anchorNode;
|
|
3162
|
-
let
|
|
3163
|
-
if (s && (s.nodeType === Node.ELEMENT_NODE ?
|
|
3162
|
+
let $ = null;
|
|
3163
|
+
if (s && (s.nodeType === Node.ELEMENT_NODE ? $ = s.closest(".tag-node") : s.nodeType === Node.TEXT_NODE && s.parentElement && ($ = s.parentElement.closest(".tag-node"))), $) {
|
|
3164
3164
|
if (o.preventDefault(), o.stopPropagation(), r.current) {
|
|
3165
3165
|
const y = r.current.querySelector(
|
|
3166
3166
|
'[data-type="variable"], [data-type="upload"]'
|
|
@@ -3171,7 +3171,7 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3171
3171
|
}
|
|
3172
3172
|
}
|
|
3173
3173
|
if (o.key === "Escape" && r.current) {
|
|
3174
|
-
if (
|
|
3174
|
+
if (A) {
|
|
3175
3175
|
o.preventDefault();
|
|
3176
3176
|
return;
|
|
3177
3177
|
}
|
|
@@ -3180,32 +3180,32 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3180
3180
|
if (o.key === "Backspace") {
|
|
3181
3181
|
const s = window.getSelection();
|
|
3182
3182
|
if (s && s.rangeCount > 0) {
|
|
3183
|
-
const
|
|
3184
|
-
if (
|
|
3183
|
+
const $ = s.getRangeAt(0), y = s.anchorNode;
|
|
3184
|
+
if (A) {
|
|
3185
3185
|
let x = null, R = null;
|
|
3186
|
-
if (y && (y.nodeType === Node.ELEMENT_NODE ? (x = y.closest(".tag-node"), R = y.closest('[data-type="text"]')) : y.nodeType === Node.TEXT_NODE && y.parentElement && (x = y.parentElement.closest(".tag-node"), R = y.parentElement.closest('[data-type="text"]'))), (x || R) &&
|
|
3186
|
+
if (y && (y.nodeType === Node.ELEMENT_NODE ? (x = y.closest(".tag-node"), R = y.closest('[data-type="text"]')) : y.nodeType === Node.TEXT_NODE && y.parentElement && (x = y.parentElement.closest(".tag-node"), R = y.parentElement.closest('[data-type="text"]'))), (x || R) && $.collapsed && $.startOffset === 0) {
|
|
3187
3187
|
o.preventDefault();
|
|
3188
3188
|
return;
|
|
3189
3189
|
}
|
|
3190
3190
|
}
|
|
3191
|
-
let
|
|
3192
|
-
if (y && (y.nodeType === Node.ELEMENT_NODE ?
|
|
3191
|
+
let w = null;
|
|
3192
|
+
if (y && (y.nodeType === Node.ELEMENT_NODE ? w = y.closest(
|
|
3193
3193
|
'[data-type="variable"]'
|
|
3194
|
-
) : y.nodeType === Node.TEXT_NODE && y.parentElement && (
|
|
3194
|
+
) : y.nodeType === Node.TEXT_NODE && y.parentElement && (w = y.parentElement.closest(
|
|
3195
3195
|
'[data-type="variable"]'
|
|
3196
|
-
))),
|
|
3197
|
-
if (
|
|
3196
|
+
))), w) {
|
|
3197
|
+
if (!$.collapsed)
|
|
3198
3198
|
return;
|
|
3199
|
-
const x =
|
|
3199
|
+
const x = w.innerText;
|
|
3200
3200
|
if (x === "" || x === "") {
|
|
3201
3201
|
o.preventDefault();
|
|
3202
3202
|
return;
|
|
3203
3203
|
}
|
|
3204
|
-
if (
|
|
3204
|
+
if ($.startOffset === 0) {
|
|
3205
3205
|
o.preventDefault();
|
|
3206
3206
|
return;
|
|
3207
3207
|
}
|
|
3208
|
-
if (x.startsWith("") &&
|
|
3208
|
+
if (x.startsWith("") && $.startOffset === 1) {
|
|
3209
3209
|
o.preventDefault();
|
|
3210
3210
|
return;
|
|
3211
3211
|
}
|
|
@@ -3215,9 +3215,9 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3215
3215
|
}, It = () => {
|
|
3216
3216
|
if (u || i || E || !Q || !r.current) return;
|
|
3217
3217
|
if (t.length === 0) {
|
|
3218
|
-
const
|
|
3219
|
-
if (
|
|
3220
|
-
if (h(
|
|
3218
|
+
const w = r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
3219
|
+
if (!w) return;
|
|
3220
|
+
if (h(w, w), r.current) {
|
|
3221
3221
|
r.current.textContent = "";
|
|
3222
3222
|
const x = new Event("input", { bubbles: !0 });
|
|
3223
3223
|
r.current.dispatchEvent(x);
|
|
@@ -3226,104 +3226,112 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3226
3226
|
}
|
|
3227
3227
|
const o = r.current;
|
|
3228
3228
|
let l = "";
|
|
3229
|
-
const s = {},
|
|
3230
|
-
if (!(
|
|
3231
|
-
if (
|
|
3232
|
-
l += (
|
|
3233
|
-
else if (
|
|
3234
|
-
const x =
|
|
3235
|
-
if (R === "variable" &&
|
|
3229
|
+
const s = {}, $ = (w) => {
|
|
3230
|
+
if (!(w.nodeType === Node.ELEMENT_NODE && w.style.display === "none")) {
|
|
3231
|
+
if (w.nodeType === Node.TEXT_NODE)
|
|
3232
|
+
l += (w.textContent || "").replace(/\u200B/g, "");
|
|
3233
|
+
else if (w.nodeType === Node.ELEMENT_NODE) {
|
|
3234
|
+
const x = w, R = x.dataset.type, P = x.dataset.key;
|
|
3235
|
+
if (R === "variable" && P) {
|
|
3236
3236
|
let F = "";
|
|
3237
|
-
const
|
|
3237
|
+
const j = document.createTreeWalker(
|
|
3238
3238
|
x,
|
|
3239
3239
|
NodeFilter.SHOW_TEXT,
|
|
3240
3240
|
{
|
|
3241
|
-
acceptNode: (
|
|
3241
|
+
acceptNode: (U) => {
|
|
3242
3242
|
const Z = x.querySelector(".variable-info-icon");
|
|
3243
|
-
return Z && Z.contains(
|
|
3243
|
+
return Z && Z.contains(U) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
3244
3244
|
}
|
|
3245
3245
|
}
|
|
3246
3246
|
);
|
|
3247
|
-
for (;
|
|
3248
|
-
F +=
|
|
3249
|
-
const
|
|
3250
|
-
if (
|
|
3251
|
-
const
|
|
3252
|
-
if (
|
|
3253
|
-
(!s[
|
|
3254
|
-
const Z = s[
|
|
3255
|
-
Z.push(
|
|
3247
|
+
for (; j.nextNode(); )
|
|
3248
|
+
F += j.currentNode.textContent || "";
|
|
3249
|
+
const D = F.replace(/[\u200B\n]/g, "").trim();
|
|
3250
|
+
if (D) {
|
|
3251
|
+
const U = x.dataset.multiKey;
|
|
3252
|
+
if (U) {
|
|
3253
|
+
(!s[U] || !Array.isArray(s[U])) && (s[U] = []);
|
|
3254
|
+
const Z = s[U];
|
|
3255
|
+
Z.push(D), Z.length > 1 && (l += " "), l += D;
|
|
3256
3256
|
} else
|
|
3257
|
-
s[
|
|
3257
|
+
s[P] = D, l += D;
|
|
3258
3258
|
if (x.dataset.nodeType === "report-url")
|
|
3259
3259
|
if (s.url === void 0)
|
|
3260
|
-
s.url =
|
|
3260
|
+
s.url = D;
|
|
3261
3261
|
else {
|
|
3262
3262
|
const Z = s.url;
|
|
3263
|
-
Array.isArray(Z) ? Z.push(
|
|
3263
|
+
Array.isArray(Z) ? Z.push(D) : s.url = [String(Z), D];
|
|
3264
3264
|
}
|
|
3265
3265
|
}
|
|
3266
|
-
} else if (R === "select" &&
|
|
3266
|
+
} else if (R === "select" && P) {
|
|
3267
3267
|
const F = (x.getAttribute("data-value") || "").trim();
|
|
3268
|
-
F && (s[
|
|
3269
|
-
} else if (R === "textarea" &&
|
|
3270
|
-
const
|
|
3271
|
-
|
|
3272
|
-
} else if (R === "richtext" &&
|
|
3273
|
-
const F = x,
|
|
3274
|
-
if (
|
|
3275
|
-
if (
|
|
3276
|
-
(!s[
|
|
3277
|
-
const
|
|
3278
|
-
|
|
3268
|
+
F && (s[P] = F, l += F);
|
|
3269
|
+
} else if (R === "textarea" && P) {
|
|
3270
|
+
const j = (x.value || "").replace(/\u200B/g, "").trim();
|
|
3271
|
+
j && (s[P] = j, l += j);
|
|
3272
|
+
} else if (R === "richtext" && P) {
|
|
3273
|
+
const F = x, j = F.dataset.nodeType, D = (F.textContent || "").replace(/\u200B/g, "").trim();
|
|
3274
|
+
if (D)
|
|
3275
|
+
if (j === "report-module") {
|
|
3276
|
+
(!s[P] || !Array.isArray(s[P])) && (s[P] = []);
|
|
3277
|
+
const U = s[P];
|
|
3278
|
+
U.push(D), U.length > 1 && (l += " "), l += D;
|
|
3279
3279
|
} else
|
|
3280
|
-
s[
|
|
3281
|
-
} else if (R === "datepicker" &&
|
|
3282
|
-
const
|
|
3283
|
-
if (
|
|
3284
|
-
if (
|
|
3285
|
-
const
|
|
3286
|
-
|
|
3280
|
+
s[P] = D, l += D;
|
|
3281
|
+
} else if (R === "datepicker" && P) {
|
|
3282
|
+
const j = (x.getAttribute("data-value") || "").trim();
|
|
3283
|
+
if (j)
|
|
3284
|
+
if (j.includes(",")) {
|
|
3285
|
+
const D = j.split(",");
|
|
3286
|
+
D.length === 2 ? (s[P] = D, l += `[${D[0]}, ${D[1]}]`) : (s[P] = j, l += j);
|
|
3287
3287
|
} else
|
|
3288
|
-
s[
|
|
3289
|
-
} else if (R === "upload" &&
|
|
3288
|
+
s[P] = j, l += j;
|
|
3289
|
+
} else if (R === "upload" && P) {
|
|
3290
3290
|
const F = x.dataset.batchKey;
|
|
3291
3291
|
if (F) {
|
|
3292
|
-
const
|
|
3293
|
-
if (
|
|
3294
|
-
const
|
|
3295
|
-
for (let
|
|
3296
|
-
const Z = `${F}-${
|
|
3297
|
-
O &&
|
|
3292
|
+
const j = t.find((D) => D.type === "upload" && D.key === F);
|
|
3293
|
+
if (j && typeof j.maxCount == "number" && typeof j.minCount == "number") {
|
|
3294
|
+
const D = [];
|
|
3295
|
+
for (let U = 0; U < j.maxCount; U++) {
|
|
3296
|
+
const Z = `${F}-${U}`, O = v[Z];
|
|
3297
|
+
O && D.push(O);
|
|
3298
3298
|
}
|
|
3299
|
-
s[F] || (s[F] =
|
|
3299
|
+
s[F] || (s[F] = D.length > 0 ? D : null, D.length > 0 && (l += ` [附带${D.length}个文件: ${D.map((U) => U.name).join(", ")}] `));
|
|
3300
3300
|
} else
|
|
3301
|
-
s[
|
|
3301
|
+
s[P] = v[P] ?? null, v[P] && (l += ` [附带文件: ${v[P]?.name}] `);
|
|
3302
3302
|
} else
|
|
3303
|
-
s[
|
|
3303
|
+
s[P] = v[P] ?? null, v[P] && (l += ` [附带文件: ${v[P]?.name}] `);
|
|
3304
3304
|
} else {
|
|
3305
3305
|
if (x.classList.contains("tag-close-btn") || x.classList.contains("file-remove-btn")) return;
|
|
3306
|
-
x.getAttribute("contenteditable") === "false" && !R && x.classList.contains("tag-node") ? l += x.innerText : x.childNodes.forEach(
|
|
3306
|
+
x.getAttribute("contenteditable") === "false" && !R && x.classList.contains("tag-node") ? l += x.innerText : x.childNodes.forEach($);
|
|
3307
3307
|
}
|
|
3308
3308
|
}
|
|
3309
3309
|
}
|
|
3310
3310
|
};
|
|
3311
|
-
if (o.childNodes.forEach(
|
|
3311
|
+
if (o.childNodes.forEach($), l = l.trim(), !l) return;
|
|
3312
3312
|
const y = new FormData();
|
|
3313
|
-
y.append("fullPrompt", l), Object.keys(s).forEach((
|
|
3314
|
-
const x = s[
|
|
3315
|
-
x != null
|
|
3316
|
-
(
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3313
|
+
y.append("fullPrompt", l), Object.keys(s).forEach((w) => {
|
|
3314
|
+
const x = s[w];
|
|
3315
|
+
if (x != null)
|
|
3316
|
+
if (x instanceof File)
|
|
3317
|
+
y.append(w, x);
|
|
3318
|
+
else if (Array.isArray(x)) {
|
|
3319
|
+
const R = t.some(
|
|
3320
|
+
(j) => j.type === "multi-variable" && j.key === w
|
|
3321
|
+
), P = t.some(
|
|
3322
|
+
(j) => j.type === "report-url" && j.key === w
|
|
3323
|
+
);
|
|
3324
|
+
R || P || w === "url" ? x.forEach((j) => {
|
|
3325
|
+
j != null && j !== "" && y.append(w, String(j));
|
|
3326
|
+
}) : x.forEach((j, D) => {
|
|
3327
|
+
j != null && (j instanceof File ? y.append(`${w}[${D}]`, j) : typeof j == "string" ? y.append(`${w}[${D}]`, j) : y.append(`${w}[${D}]`, String(j)));
|
|
3328
|
+
});
|
|
3329
|
+
} else typeof x == "string" ? y.append(w, x) : y.append(w, String(x));
|
|
3322
3330
|
}), h(y, l);
|
|
3323
3331
|
}, Dt = {
|
|
3324
3332
|
...b ? { width: typeof b == "number" ? `${b}px` : b } : {},
|
|
3325
3333
|
...H ? { border: H } : {},
|
|
3326
|
-
...
|
|
3334
|
+
...k ? { background: k } : {},
|
|
3327
3335
|
...e ? { maxHeight: typeof e == "number" ? `${e}px` : e } : {},
|
|
3328
3336
|
...n ? { minHeight: typeof n == "number" ? `${n}px` : n } : {},
|
|
3329
3337
|
...e ? {
|
|
@@ -3343,23 +3351,23 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3343
3351
|
className: "rich-text-editor",
|
|
3344
3352
|
style: Dt,
|
|
3345
3353
|
"data-disabled": i,
|
|
3346
|
-
ref:
|
|
3354
|
+
ref: J,
|
|
3347
3355
|
children: [
|
|
3348
|
-
|
|
3349
|
-
/* @__PURE__ */
|
|
3356
|
+
L,
|
|
3357
|
+
/* @__PURE__ */ I(
|
|
3350
3358
|
"div",
|
|
3351
3359
|
{
|
|
3352
3360
|
className: "rich-text-editor-content",
|
|
3353
|
-
ref:
|
|
3361
|
+
ref: K,
|
|
3354
3362
|
style: Bt,
|
|
3355
3363
|
children: /* @__PURE__ */ ie(
|
|
3356
3364
|
"div",
|
|
3357
3365
|
{
|
|
3358
|
-
ref:
|
|
3366
|
+
ref: X,
|
|
3359
3367
|
className: "rich-text-editor-content-body",
|
|
3360
3368
|
style: Vt,
|
|
3361
3369
|
children: [
|
|
3362
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ I(
|
|
3363
3371
|
"div",
|
|
3364
3372
|
{
|
|
3365
3373
|
ref: r,
|
|
@@ -3377,7 +3385,7 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3377
3385
|
onPaste: St
|
|
3378
3386
|
}
|
|
3379
3387
|
),
|
|
3380
|
-
/* @__PURE__ */
|
|
3388
|
+
/* @__PURE__ */ I(
|
|
3381
3389
|
"input",
|
|
3382
3390
|
{
|
|
3383
3391
|
type: "file",
|
|
@@ -3393,33 +3401,33 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3393
3401
|
}
|
|
3394
3402
|
),
|
|
3395
3403
|
/* @__PURE__ */ ie("div", { className: "rich-text-editor-footer", children: [
|
|
3396
|
-
/* @__PURE__ */
|
|
3404
|
+
/* @__PURE__ */ I("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ ie("div", { className: "rich-text-editor-brand", children: [
|
|
3397
3405
|
/* @__PURE__ */ ie("div", { className: "rte-brand-badge", children: [
|
|
3398
|
-
/* @__PURE__ */
|
|
3399
|
-
/* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ I("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
|
|
3407
|
+
/* @__PURE__ */ I("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
|
|
3400
3408
|
] }),
|
|
3401
|
-
q !== "hideAgent" && /* @__PURE__ */
|
|
3409
|
+
q !== "hideAgent" && /* @__PURE__ */ I(
|
|
3402
3410
|
Ut,
|
|
3403
3411
|
{
|
|
3404
3412
|
placement: "topLeft",
|
|
3405
3413
|
menu: {
|
|
3406
|
-
items:
|
|
3414
|
+
items: _.filter((o) => o.isShowNew !== 1).map((o) => ({
|
|
3407
3415
|
key: o.key,
|
|
3408
3416
|
label: /* @__PURE__ */ ie("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3409
|
-
o.icon && /* @__PURE__ */
|
|
3410
|
-
/* @__PURE__ */
|
|
3417
|
+
o.icon && /* @__PURE__ */ I("i", { className: o.icon }),
|
|
3418
|
+
/* @__PURE__ */ I("span", { children: o.label })
|
|
3411
3419
|
] }),
|
|
3412
3420
|
onClick: () => {
|
|
3413
|
-
|
|
3421
|
+
M?.(o);
|
|
3414
3422
|
}
|
|
3415
3423
|
}))
|
|
3416
3424
|
},
|
|
3417
3425
|
trigger: ["click"],
|
|
3418
3426
|
disabled: i || u,
|
|
3419
3427
|
overlayClassName: "rte-agent-dropdown",
|
|
3420
|
-
children: /* @__PURE__ */ ie("div", { className: "rte-agent-badge", style: { cursor:
|
|
3421
|
-
/* @__PURE__ */
|
|
3422
|
-
/* @__PURE__ */
|
|
3428
|
+
children: /* @__PURE__ */ ie("div", { className: "rte-agent-badge", style: { cursor: _.length > 0 ? "pointer" : "default" }, children: [
|
|
3429
|
+
/* @__PURE__ */ I("i", { className: "iconfont icon-zhinengti", style: { fontSize: "16px" } }),
|
|
3430
|
+
/* @__PURE__ */ I("span", { className: "rte-agent-text", children: "智能体" })
|
|
3423
3431
|
] })
|
|
3424
3432
|
}
|
|
3425
3433
|
)
|
|
@@ -3428,23 +3436,23 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3428
3436
|
(() => {
|
|
3429
3437
|
const o = t.find((s) => s.type === "tag");
|
|
3430
3438
|
if (!o || !o.text) return null;
|
|
3431
|
-
const l =
|
|
3439
|
+
const l = _.find((s) => s.label === o.text);
|
|
3432
3440
|
return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */ ie("div", { className: "rte-points-badge", children: [
|
|
3433
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ I("i", { className: "iconfont icon-jifen", style: { marginRight: "4px", fontSize: "16px" } }),
|
|
3434
3442
|
/* @__PURE__ */ ie("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
|
|
3435
3443
|
"-",
|
|
3436
3444
|
String(l.points)
|
|
3437
3445
|
] })
|
|
3438
3446
|
] });
|
|
3439
3447
|
})(),
|
|
3440
|
-
/* @__PURE__ */
|
|
3448
|
+
/* @__PURE__ */ I(
|
|
3441
3449
|
"button",
|
|
3442
3450
|
{
|
|
3443
3451
|
type: "button",
|
|
3444
3452
|
onClick: It,
|
|
3445
3453
|
disabled: u || i || E || !Q,
|
|
3446
3454
|
className: "rich-text-editor-send-button",
|
|
3447
|
-
children: u || E ? /* @__PURE__ */
|
|
3455
|
+
children: u || E ? /* @__PURE__ */ I("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ I("i", { className: "iconfont icon-fasong" })
|
|
3448
3456
|
}
|
|
3449
3457
|
)
|
|
3450
3458
|
] })
|
|
@@ -3466,31 +3474,31 @@ const { RangePicker: On } = jt, Rn = ({ host: t, onChange: h }) => {
|
|
|
3466
3474
|
else if (g.type === "variable")
|
|
3467
3475
|
o = g.anchorEl.dataset.tooltip || "";
|
|
3468
3476
|
else if (g.type === "upload-preview") {
|
|
3469
|
-
const
|
|
3470
|
-
if (
|
|
3471
|
-
const
|
|
3472
|
-
o = /* @__PURE__ */
|
|
3477
|
+
const $ = v[g.key], y = !!$ && ($.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test($.name || ""));
|
|
3478
|
+
if ($ && y) {
|
|
3479
|
+
const w = URL.createObjectURL($);
|
|
3480
|
+
o = /* @__PURE__ */ I("div", { className: "rte-upload-preview", children: /* @__PURE__ */ I("img", { className: "rte-upload-preview-img", src: w, alt: $.name }) }), l = {
|
|
3473
3481
|
background: "#fff",
|
|
3474
3482
|
padding: 0,
|
|
3475
3483
|
borderRadius: 4,
|
|
3476
3484
|
boxShadow: "0 2px 12px 0 rgba(153, 153, 153, 0.25)"
|
|
3477
|
-
}, setTimeout(() => URL.revokeObjectURL(
|
|
3485
|
+
}, setTimeout(() => URL.revokeObjectURL(w), 1e3);
|
|
3478
3486
|
} else
|
|
3479
3487
|
o = "";
|
|
3480
3488
|
}
|
|
3481
3489
|
if (!o) return null;
|
|
3482
3490
|
const s = g.type === "upload-preview" ? "#0A0A0A" : "#fff";
|
|
3483
3491
|
return at(
|
|
3484
|
-
/* @__PURE__ */
|
|
3492
|
+
/* @__PURE__ */ I(
|
|
3485
3493
|
Kt,
|
|
3486
3494
|
{
|
|
3487
3495
|
arrow: !1,
|
|
3488
|
-
title: g.type === "upload-preview" ? o : /* @__PURE__ */
|
|
3496
|
+
title: g.type === "upload-preview" ? o : /* @__PURE__ */ I("div", { style: { maxWidth: "200px", fontSize: "12px", color: s }, children: o }),
|
|
3489
3497
|
open: !0,
|
|
3490
3498
|
placement: g.type === "upload-preview" ? "topLeft" : "top",
|
|
3491
3499
|
getPopupContainer: () => document.body,
|
|
3492
3500
|
overlayInnerStyle: l,
|
|
3493
|
-
children: /* @__PURE__ */
|
|
3501
|
+
children: /* @__PURE__ */ I(
|
|
3494
3502
|
"div",
|
|
3495
3503
|
{
|
|
3496
3504
|
style: {
|
|
@@ -3554,11 +3562,11 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3554
3562
|
loadingProgress: u,
|
|
3555
3563
|
loadIcon: i,
|
|
3556
3564
|
onBatchSizeChange: b,
|
|
3557
|
-
onLoadNextPage:
|
|
3558
|
-
onStartAutoLoad:
|
|
3559
|
-
onStopLoad:
|
|
3565
|
+
onLoadNextPage: A,
|
|
3566
|
+
onStartAutoLoad: _,
|
|
3567
|
+
onStopLoad: M
|
|
3560
3568
|
}) => t && u ? /* @__PURE__ */ ie("div", { className: "auto_load_progress", children: [
|
|
3561
|
-
i || /* @__PURE__ */
|
|
3569
|
+
i || /* @__PURE__ */ I("img", { src: wt, alt: "自动加载", width: 14, height: 14 }),
|
|
3562
3570
|
/* @__PURE__ */ ie("span", { children: [
|
|
3563
3571
|
"正在加载第",
|
|
3564
3572
|
u.currentPage,
|
|
@@ -3566,7 +3574,7 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3566
3574
|
u.totalPages,
|
|
3567
3575
|
"页"
|
|
3568
3576
|
] }),
|
|
3569
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ I(
|
|
3570
3578
|
Xt,
|
|
3571
3579
|
{
|
|
3572
3580
|
percent: u.percentage,
|
|
@@ -3574,12 +3582,12 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3574
3582
|
size: [160, 8]
|
|
3575
3583
|
}
|
|
3576
3584
|
),
|
|
3577
|
-
/* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ I("span", { onClick: M, className: "auto_load_stop_btn", children: "停止加载" })
|
|
3578
3586
|
] }) : /* @__PURE__ */ ie("div", { className: "auto_load_container", children: [
|
|
3579
|
-
/* @__PURE__ */
|
|
3587
|
+
/* @__PURE__ */ I(
|
|
3580
3588
|
"div",
|
|
3581
3589
|
{
|
|
3582
|
-
onClick:
|
|
3590
|
+
onClick: A,
|
|
3583
3591
|
className: "auto_load_next_btn",
|
|
3584
3592
|
style: {
|
|
3585
3593
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
@@ -3599,14 +3607,14 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3599
3607
|
"div",
|
|
3600
3608
|
{
|
|
3601
3609
|
className: "auto_load_btn",
|
|
3602
|
-
onClick: t ? void 0 :
|
|
3610
|
+
onClick: t ? void 0 : _,
|
|
3603
3611
|
children: [
|
|
3604
|
-
i || /* @__PURE__ */
|
|
3605
|
-
/* @__PURE__ */
|
|
3612
|
+
i || /* @__PURE__ */ I("img", { src: wt, alt: "自动加载", width: 14, height: 14 }),
|
|
3613
|
+
/* @__PURE__ */ I("span", { children: "自动加载" })
|
|
3606
3614
|
]
|
|
3607
3615
|
}
|
|
3608
3616
|
),
|
|
3609
|
-
/* @__PURE__ */
|
|
3617
|
+
/* @__PURE__ */ I(
|
|
3610
3618
|
ze,
|
|
3611
3619
|
{
|
|
3612
3620
|
value: h,
|
|
@@ -3627,40 +3635,40 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3627
3635
|
pageSize: u,
|
|
3628
3636
|
total: i,
|
|
3629
3637
|
cachedPages: b,
|
|
3630
|
-
loadedCount:
|
|
3631
|
-
autoLoading:
|
|
3632
|
-
loadingProgress:
|
|
3633
|
-
onChange:
|
|
3638
|
+
loadedCount: A,
|
|
3639
|
+
autoLoading: _ = !1,
|
|
3640
|
+
loadingProgress: M,
|
|
3641
|
+
onChange: N,
|
|
3634
3642
|
onLoadNextPage: E,
|
|
3635
3643
|
onStartAutoLoad: S,
|
|
3636
3644
|
onStopLoading: H
|
|
3637
3645
|
}) => {
|
|
3638
|
-
const [
|
|
3646
|
+
const [k, q] = oe(5), e = Math.ceil(i / u), n = tt(() => b.length >= e, [b, e]), a = () => Array.from(
|
|
3639
3647
|
{ length: e },
|
|
3640
3648
|
(T, V) => V + 1
|
|
3641
|
-
).filter((T) => !b.includes(T)).slice(0,
|
|
3649
|
+
).filter((T) => !b.includes(T)).slice(0, k);
|
|
3642
3650
|
return /* @__PURE__ */ ie("div", { className: "pagination_footer", children: [
|
|
3643
3651
|
/* @__PURE__ */ ie("div", { className: "pagination_leftWrap", children: [
|
|
3644
3652
|
/* @__PURE__ */ ie("span", { className: "pagination_total", children: [
|
|
3645
|
-
/* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ I(
|
|
3646
3654
|
rn,
|
|
3647
3655
|
{
|
|
3648
3656
|
style: { color: "#2563EB", marginRight: "4px" }
|
|
3649
3657
|
}
|
|
3650
3658
|
),
|
|
3651
3659
|
"已加载: ",
|
|
3652
|
-
|
|
3660
|
+
A,
|
|
3653
3661
|
"/",
|
|
3654
3662
|
i,
|
|
3655
3663
|
"条数据"
|
|
3656
3664
|
] }),
|
|
3657
|
-
!n && /* @__PURE__ */
|
|
3665
|
+
!n && /* @__PURE__ */ I(
|
|
3658
3666
|
jn,
|
|
3659
3667
|
{
|
|
3660
3668
|
loadIcon: h || void 0,
|
|
3661
|
-
autoLoading:
|
|
3662
|
-
batchSize:
|
|
3663
|
-
loadingProgress:
|
|
3669
|
+
autoLoading: _,
|
|
3670
|
+
batchSize: k,
|
|
3671
|
+
loadingProgress: M,
|
|
3664
3672
|
disabled: !E || !S,
|
|
3665
3673
|
onBatchSizeChange: q,
|
|
3666
3674
|
onLoadNextPage: () => E?.(),
|
|
@@ -3672,29 +3680,29 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3672
3680
|
}
|
|
3673
3681
|
)
|
|
3674
3682
|
] }),
|
|
3675
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ I(
|
|
3676
3684
|
Jt,
|
|
3677
3685
|
{
|
|
3678
3686
|
current: t,
|
|
3679
3687
|
pageSize: u,
|
|
3680
3688
|
total: i,
|
|
3681
|
-
onChange: (p) =>
|
|
3689
|
+
onChange: (p) => N(p),
|
|
3682
3690
|
showSizeChanger: !1,
|
|
3683
3691
|
showQuickJumper: !1,
|
|
3684
3692
|
showTotal: () => "",
|
|
3685
3693
|
itemRender: (p, T, V) => {
|
|
3686
|
-
const
|
|
3687
|
-
return T === "prev" || T === "next" || T === "jump-prev" || T === "jump-next" ? /* @__PURE__ */
|
|
3694
|
+
const L = b.includes(p);
|
|
3695
|
+
return T === "prev" || T === "next" || T === "jump-prev" || T === "jump-next" ? /* @__PURE__ */ I("div", { className: "pageBox", children: V }) : /* @__PURE__ */ ie(
|
|
3688
3696
|
"div",
|
|
3689
3697
|
{
|
|
3690
3698
|
className: "pageBox",
|
|
3691
3699
|
style: {
|
|
3692
3700
|
backgroundColor: t === p ? "#2563EB" : "#f5f5f5",
|
|
3693
|
-
color: t === p ? "#fff" :
|
|
3701
|
+
color: t === p ? "#fff" : L ? "#171717" : "#a3a3a3"
|
|
3694
3702
|
},
|
|
3695
3703
|
children: [
|
|
3696
3704
|
p,
|
|
3697
|
-
!
|
|
3705
|
+
!L && /* @__PURE__ */ I("span", { className: "unload_spot" })
|
|
3698
3706
|
]
|
|
3699
3707
|
}
|
|
3700
3708
|
);
|
|
@@ -3708,50 +3716,50 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3708
3716
|
autoLoading: u,
|
|
3709
3717
|
loadingProgress: i,
|
|
3710
3718
|
columns: b = [],
|
|
3711
|
-
dataSource:
|
|
3712
|
-
total:
|
|
3713
|
-
current:
|
|
3714
|
-
pageSize:
|
|
3719
|
+
dataSource: A = [],
|
|
3720
|
+
total: _,
|
|
3721
|
+
current: M,
|
|
3722
|
+
pageSize: N,
|
|
3715
3723
|
cachedPages: E,
|
|
3716
3724
|
onChangePage: S,
|
|
3717
3725
|
onLoadNextPage: H,
|
|
3718
|
-
onStartAutoLoad:
|
|
3726
|
+
onStartAutoLoad: k,
|
|
3719
3727
|
onStopLoading: q,
|
|
3720
3728
|
...e
|
|
3721
3729
|
} = t, n = ae(null), a = se(
|
|
3722
3730
|
(d) => {
|
|
3723
3731
|
S(d), E.includes(d) && n.current?.scrollTo({
|
|
3724
|
-
key: `${(d - 1) *
|
|
3732
|
+
key: `${(d - 1) * N + 1}`
|
|
3725
3733
|
});
|
|
3726
3734
|
},
|
|
3727
|
-
[E, S,
|
|
3735
|
+
[E, S, N]
|
|
3728
3736
|
);
|
|
3729
3737
|
return /* @__PURE__ */ ie("div", { className: "flex flex-col", children: [
|
|
3730
|
-
/* @__PURE__ */
|
|
3738
|
+
/* @__PURE__ */ I(
|
|
3731
3739
|
rt,
|
|
3732
3740
|
{
|
|
3733
3741
|
ref: n,
|
|
3734
3742
|
...e,
|
|
3735
3743
|
columns: b,
|
|
3736
|
-
dataSource:
|
|
3744
|
+
dataSource: A,
|
|
3737
3745
|
pagination: !1,
|
|
3738
3746
|
virtual: !0
|
|
3739
3747
|
}
|
|
3740
3748
|
),
|
|
3741
|
-
/* @__PURE__ */
|
|
3749
|
+
/* @__PURE__ */ I(
|
|
3742
3750
|
Wn,
|
|
3743
3751
|
{
|
|
3744
3752
|
loading: h,
|
|
3745
3753
|
autoLoading: u,
|
|
3746
3754
|
loadingProgress: i,
|
|
3747
|
-
current:
|
|
3748
|
-
pageSize:
|
|
3749
|
-
total:
|
|
3750
|
-
loadedCount:
|
|
3755
|
+
current: M,
|
|
3756
|
+
pageSize: N,
|
|
3757
|
+
total: _,
|
|
3758
|
+
loadedCount: A.length,
|
|
3751
3759
|
cachedPages: E,
|
|
3752
3760
|
onChange: a,
|
|
3753
3761
|
onLoadNextPage: H,
|
|
3754
|
-
onStartAutoLoad:
|
|
3762
|
+
onStartAutoLoad: k,
|
|
3755
3763
|
onStopLoading: q
|
|
3756
3764
|
}
|
|
3757
3765
|
)
|
|
@@ -3870,71 +3878,71 @@ const Kn = ({
|
|
|
3870
3878
|
animationSpeed: u = 100,
|
|
3871
3879
|
autoPlay: i = !0,
|
|
3872
3880
|
value: b,
|
|
3873
|
-
onChange:
|
|
3874
|
-
...
|
|
3881
|
+
onChange: A,
|
|
3882
|
+
..._
|
|
3875
3883
|
}) => {
|
|
3876
|
-
const [
|
|
3884
|
+
const [M, N] = oe(""), [E, S] = oe(0), [H, k] = oe(!1), [q, e] = oe(!1), [n, a] = oe(!1), d = ae(void 0), p = ae(void 0), T = ae(t), V = ae(E), L = ae(q), J = ae(M);
|
|
3877
3885
|
pe(() => {
|
|
3878
|
-
T.current = t, V.current = E,
|
|
3886
|
+
T.current = t, V.current = E, L.current = q, J.current = M;
|
|
3879
3887
|
});
|
|
3880
|
-
const
|
|
3888
|
+
const K = se((f, c) => {
|
|
3881
3889
|
let m = 0;
|
|
3882
3890
|
a(!0);
|
|
3883
3891
|
const g = () => {
|
|
3884
|
-
m < f.length ? (
|
|
3892
|
+
m < f.length ? (N(f.slice(0, m + 1)), m++, p.current = window.setTimeout(g, u)) : (a(!1), c?.());
|
|
3885
3893
|
};
|
|
3886
3894
|
g();
|
|
3887
|
-
}, [u]),
|
|
3888
|
-
let c =
|
|
3895
|
+
}, [u]), X = se((f) => {
|
|
3896
|
+
let c = J.current.length;
|
|
3889
3897
|
const m = () => {
|
|
3890
|
-
c > 0 ? (
|
|
3898
|
+
c > 0 ? (N(J.current.slice(0, c - 1)), c--, p.current = window.setTimeout(m, u / 2)) : f?.();
|
|
3891
3899
|
};
|
|
3892
3900
|
m();
|
|
3893
3901
|
}, [u]), r = se(() => {
|
|
3894
|
-
if (T.current.length === 0 ||
|
|
3895
|
-
|
|
3902
|
+
if (T.current.length === 0 || L.current) return;
|
|
3903
|
+
k(!0);
|
|
3896
3904
|
const f = T.current[V.current];
|
|
3897
|
-
|
|
3898
|
-
|
|
3905
|
+
J.current ? X(() => {
|
|
3906
|
+
K(f, () => {
|
|
3899
3907
|
d.current = window.setTimeout(() => {
|
|
3900
|
-
S((c) => (c + 1) % T.current.length),
|
|
3908
|
+
S((c) => (c + 1) % T.current.length), k(!1);
|
|
3901
3909
|
}, 2e3);
|
|
3902
3910
|
});
|
|
3903
|
-
}) :
|
|
3911
|
+
}) : K(f, () => {
|
|
3904
3912
|
d.current = window.setTimeout(() => {
|
|
3905
|
-
S((c) => (c + 1) % T.current.length),
|
|
3913
|
+
S((c) => (c + 1) % T.current.length), k(!1);
|
|
3906
3914
|
}, 2e3);
|
|
3907
3915
|
});
|
|
3908
|
-
}, [
|
|
3916
|
+
}, [X, K]);
|
|
3909
3917
|
return pe(() => (i && t.length > 0 && !q && r(), () => {
|
|
3910
3918
|
d.current && window.clearTimeout(d.current), p.current && window.clearTimeout(p.current);
|
|
3911
3919
|
}), [E, q, i, t.length, r]), pe(() => {
|
|
3912
3920
|
!H && i && t.length > 0 && !q && r();
|
|
3913
3921
|
}, [E, H, i, t.length, q, r]), /* @__PURE__ */ ie("div", { style: { position: "relative" }, children: [
|
|
3914
|
-
/* @__PURE__ */
|
|
3922
|
+
/* @__PURE__ */ I(
|
|
3915
3923
|
kt,
|
|
3916
3924
|
{
|
|
3917
|
-
...
|
|
3925
|
+
..._,
|
|
3918
3926
|
value: b,
|
|
3919
3927
|
onChange: (f) => {
|
|
3920
|
-
|
|
3928
|
+
A?.(f.target.value), _.onChange?.(f);
|
|
3921
3929
|
},
|
|
3922
3930
|
onFocus: (f) => {
|
|
3923
|
-
e(!0), d.current && window.clearTimeout(d.current), p.current && window.clearTimeout(p.current),
|
|
3931
|
+
e(!0), d.current && window.clearTimeout(d.current), p.current && window.clearTimeout(p.current), k(!1), a(!1), _.onFocus?.(f);
|
|
3924
3932
|
},
|
|
3925
3933
|
onBlur: (f) => {
|
|
3926
|
-
e(!1), !b && t.length > 0 && (
|
|
3934
|
+
e(!1), !b && t.length > 0 && (N(""), S(0)), _.onBlur?.(f);
|
|
3927
3935
|
},
|
|
3928
|
-
placeholder: q || b ? h :
|
|
3936
|
+
placeholder: q || b ? h : M || h,
|
|
3929
3937
|
style: {
|
|
3930
3938
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3931
|
-
...
|
|
3939
|
+
..._.style,
|
|
3932
3940
|
position: "relative",
|
|
3933
3941
|
zIndex: 1
|
|
3934
3942
|
}
|
|
3935
3943
|
}
|
|
3936
3944
|
),
|
|
3937
|
-
!q && !b &&
|
|
3945
|
+
!q && !b && M && /* @__PURE__ */ ie(
|
|
3938
3946
|
"div",
|
|
3939
3947
|
{
|
|
3940
3948
|
style: {
|
|
@@ -3954,8 +3962,8 @@ const Kn = ({
|
|
|
3954
3962
|
fontFamily: "inherit"
|
|
3955
3963
|
},
|
|
3956
3964
|
children: [
|
|
3957
|
-
/* @__PURE__ */
|
|
3958
|
-
n && /* @__PURE__ */
|
|
3965
|
+
/* @__PURE__ */ I("span", { children: M }),
|
|
3966
|
+
n && /* @__PURE__ */ I(
|
|
3959
3967
|
"span",
|
|
3960
3968
|
{
|
|
3961
3969
|
style: {
|
|
@@ -3971,7 +3979,7 @@ const Kn = ({
|
|
|
3971
3979
|
]
|
|
3972
3980
|
}
|
|
3973
3981
|
),
|
|
3974
|
-
/* @__PURE__ */
|
|
3982
|
+
/* @__PURE__ */ I("style", { children: `
|
|
3975
3983
|
@keyframes blink {
|
|
3976
3984
|
0%, 50% { opacity: 1; }
|
|
3977
3985
|
51%, 100% { opacity: 0; }
|
|
@@ -4035,13 +4043,13 @@ const Xn = ({
|
|
|
4035
4043
|
// 是否自动播放动画
|
|
4036
4044
|
value: b = "",
|
|
4037
4045
|
// 受控模式的值
|
|
4038
|
-
onChange:
|
|
4046
|
+
onChange: A,
|
|
4039
4047
|
// 受控模式的变化回调
|
|
4040
|
-
onSubmit:
|
|
4048
|
+
onSubmit: _,
|
|
4041
4049
|
// 提交回调
|
|
4042
|
-
maxLength:
|
|
4050
|
+
maxLength: M = 500,
|
|
4043
4051
|
// 最大字符数限制
|
|
4044
|
-
showCount:
|
|
4052
|
+
showCount: N = !0,
|
|
4045
4053
|
// 是否显示字数统计
|
|
4046
4054
|
submitText: E = "发送",
|
|
4047
4055
|
// 提交按钮文本
|
|
@@ -4049,20 +4057,20 @@ const Xn = ({
|
|
|
4049
4057
|
// 是否禁用组件
|
|
4050
4058
|
rows: H = 4,
|
|
4051
4059
|
// 文本域行数
|
|
4052
|
-
style:
|
|
4060
|
+
style: k,
|
|
4053
4061
|
// 自定义样式
|
|
4054
4062
|
...q
|
|
4055
4063
|
// 其他原生属性
|
|
4056
4064
|
}) => {
|
|
4057
|
-
const [e, n] = oe(""), [a, d] = oe(0), [p, T] = oe(!1), [V,
|
|
4065
|
+
const [e, n] = oe(""), [a, d] = oe(0), [p, T] = oe(!1), [V, L] = oe(!1), [J, K] = oe(!1), [X, r] = oe(b || ""), B = ae(void 0), v = ae(void 0), Y = ae(t), G = ae(a), f = ae(V), c = ae(e), m = ae(null);
|
|
4058
4066
|
pe(() => {
|
|
4059
4067
|
Y.current = t, G.current = a, f.current = V, c.current = e;
|
|
4060
4068
|
});
|
|
4061
4069
|
const g = se((ee, ye) => {
|
|
4062
4070
|
let ge = 0;
|
|
4063
|
-
|
|
4071
|
+
K(!0);
|
|
4064
4072
|
const he = () => {
|
|
4065
|
-
ge < ee.length ? (n(ee.slice(0, ge + 1)), ge++, v.current = window.setTimeout(he, u)) : (
|
|
4073
|
+
ge < ee.length ? (n(ee.slice(0, ge + 1)), ge++, v.current = window.setTimeout(he, u)) : (K(!1), ye?.());
|
|
4066
4074
|
};
|
|
4067
4075
|
he();
|
|
4068
4076
|
}, [u]), C = se((ee) => {
|
|
@@ -4092,36 +4100,36 @@ const Xn = ({
|
|
|
4092
4100
|
}), [a, V, i, t.length, z]), pe(() => {
|
|
4093
4101
|
!p && i && t.length > 0 && !V && z();
|
|
4094
4102
|
}, [a, p, i, t.length, V, z]);
|
|
4095
|
-
const
|
|
4096
|
-
|
|
4103
|
+
const W = (ee) => {
|
|
4104
|
+
L(!0), B.current && window.clearTimeout(B.current), v.current && window.clearTimeout(v.current), T(!1), K(!1), q.onFocus?.(ee);
|
|
4097
4105
|
}, Q = (ee) => {
|
|
4098
|
-
|
|
4106
|
+
L(!1), !b && t.length > 0 && (n(""), d(0)), q.onBlur?.(ee);
|
|
4099
4107
|
}, te = (ee) => {
|
|
4100
4108
|
const ye = ee.target.value;
|
|
4101
|
-
|
|
4109
|
+
M && ye.length > M || (A ? A(ye) : r(ye), q.onChange?.(ee));
|
|
4102
4110
|
}, ce = () => {
|
|
4103
|
-
const ee =
|
|
4104
|
-
ee.trim() && !S && (
|
|
4111
|
+
const ee = A ? b : X;
|
|
4112
|
+
ee.trim() && !S && (_?.(ee), A || r(""));
|
|
4105
4113
|
}, fe = (ee) => {
|
|
4106
4114
|
(ee.ctrlKey || ee.metaKey) && ee.key === "Enter" && (ee.preventDefault(), ce()), q.onKeyDown?.(ee);
|
|
4107
|
-
}, ue =
|
|
4108
|
-
return /* @__PURE__ */ ie("div", { style: { position: "relative", ...
|
|
4115
|
+
}, ue = A ? b : X, be = S || !ue.trim() || (M ? ue.length > M : !1);
|
|
4116
|
+
return /* @__PURE__ */ ie("div", { style: { position: "relative", ...k }, children: [
|
|
4109
4117
|
/* @__PURE__ */ ie("div", { style: { position: "relative" }, children: [
|
|
4110
|
-
/* @__PURE__ */
|
|
4118
|
+
/* @__PURE__ */ I(
|
|
4111
4119
|
"textarea",
|
|
4112
4120
|
{
|
|
4113
4121
|
ref: m,
|
|
4114
|
-
value:
|
|
4122
|
+
value: A ? b : X,
|
|
4115
4123
|
onChange: te,
|
|
4116
4124
|
onFocus: (ee) => {
|
|
4117
|
-
ee.target.style.borderColor = "#1890ff", ee.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)",
|
|
4125
|
+
ee.target.style.borderColor = "#1890ff", ee.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", W(ee);
|
|
4118
4126
|
},
|
|
4119
4127
|
onBlur: (ee) => {
|
|
4120
4128
|
ee.target.style.borderColor = "#d9d9d9", ee.target.style.boxShadow = "none", Q(ee);
|
|
4121
4129
|
},
|
|
4122
4130
|
onKeyDown: fe,
|
|
4123
4131
|
placeholder: V || ue ? h : "",
|
|
4124
|
-
maxLength:
|
|
4132
|
+
maxLength: M,
|
|
4125
4133
|
rows: H,
|
|
4126
4134
|
disabled: S,
|
|
4127
4135
|
style: {
|
|
@@ -4166,8 +4174,8 @@ const Xn = ({
|
|
|
4166
4174
|
lineHeight: "1.5"
|
|
4167
4175
|
},
|
|
4168
4176
|
children: [
|
|
4169
|
-
/* @__PURE__ */
|
|
4170
|
-
|
|
4177
|
+
/* @__PURE__ */ I("span", { children: e }),
|
|
4178
|
+
J && /* @__PURE__ */ I(
|
|
4171
4179
|
"span",
|
|
4172
4180
|
{
|
|
4173
4181
|
style: {
|
|
@@ -4183,7 +4191,7 @@ const Xn = ({
|
|
|
4183
4191
|
]
|
|
4184
4192
|
}
|
|
4185
4193
|
),
|
|
4186
|
-
/* @__PURE__ */
|
|
4194
|
+
/* @__PURE__ */ I(
|
|
4187
4195
|
"div",
|
|
4188
4196
|
{
|
|
4189
4197
|
style: {
|
|
@@ -4192,12 +4200,12 @@ const Xn = ({
|
|
|
4192
4200
|
right: 8,
|
|
4193
4201
|
zIndex: 3
|
|
4194
4202
|
},
|
|
4195
|
-
children: /* @__PURE__ */
|
|
4203
|
+
children: /* @__PURE__ */ I(
|
|
4196
4204
|
Ae,
|
|
4197
4205
|
{
|
|
4198
4206
|
type: "primary",
|
|
4199
4207
|
size: "small",
|
|
4200
|
-
icon: /* @__PURE__ */
|
|
4208
|
+
icon: /* @__PURE__ */ I(an, {}),
|
|
4201
4209
|
onClick: ce,
|
|
4202
4210
|
disabled: be,
|
|
4203
4211
|
style: {
|
|
@@ -4214,7 +4222,7 @@ const Xn = ({
|
|
|
4214
4222
|
}
|
|
4215
4223
|
)
|
|
4216
4224
|
] }),
|
|
4217
|
-
|
|
4225
|
+
N && /* @__PURE__ */ ie(
|
|
4218
4226
|
"div",
|
|
4219
4227
|
{
|
|
4220
4228
|
style: {
|
|
@@ -4226,11 +4234,11 @@ const Xn = ({
|
|
|
4226
4234
|
children: [
|
|
4227
4235
|
ue.length,
|
|
4228
4236
|
"/",
|
|
4229
|
-
|
|
4237
|
+
M
|
|
4230
4238
|
]
|
|
4231
4239
|
}
|
|
4232
4240
|
),
|
|
4233
|
-
/* @__PURE__ */
|
|
4241
|
+
/* @__PURE__ */ I("style", { children: `
|
|
4234
4242
|
@keyframes blink {
|
|
4235
4243
|
0%, 50% { opacity: 1; }
|
|
4236
4244
|
51%, 100% { opacity: 0; }
|
|
@@ -4331,41 +4339,41 @@ const Ct = ({
|
|
|
4331
4339
|
height: i,
|
|
4332
4340
|
videoWidth: b,
|
|
4333
4341
|
// 参数保留但不使用,由CSS控制
|
|
4334
|
-
videoHeight:
|
|
4342
|
+
videoHeight: A,
|
|
4335
4343
|
// 参数保留但不使用,由CSS控制
|
|
4336
|
-
showPlayButton:
|
|
4337
|
-
autoPlayOnHover:
|
|
4338
|
-
onClick:
|
|
4344
|
+
showPlayButton: _ = !0,
|
|
4345
|
+
autoPlayOnHover: M = !0,
|
|
4346
|
+
onClick: N,
|
|
4339
4347
|
onVideoLoaded: E,
|
|
4340
4348
|
onVideoPlay: S,
|
|
4341
4349
|
onVideoPause: H,
|
|
4342
|
-
onVideoEnded:
|
|
4350
|
+
onVideoEnded: k,
|
|
4343
4351
|
className: q,
|
|
4344
4352
|
style: e,
|
|
4345
4353
|
...n
|
|
4346
4354
|
}) => {
|
|
4347
|
-
const a = ae(null), [d, p] = oe(!1), [T, V] = oe(!1), [
|
|
4355
|
+
const a = ae(null), [d, p] = oe(!1), [T, V] = oe(!1), [L, J] = oe(!1), K = se(() => {
|
|
4348
4356
|
a.current && (a.current.play(), p(!0), S?.());
|
|
4349
|
-
}, [S]),
|
|
4357
|
+
}, [S]), X = se(() => {
|
|
4350
4358
|
a.current && (a.current.pause(), p(!1), H?.());
|
|
4351
4359
|
}, [H]), r = se((g) => {
|
|
4352
|
-
g.stopPropagation(), d ?
|
|
4353
|
-
}, [d,
|
|
4354
|
-
V(!0),
|
|
4355
|
-
}, [
|
|
4356
|
-
V(!1),
|
|
4357
|
-
}, [
|
|
4358
|
-
|
|
4360
|
+
g.stopPropagation(), d ? X() : K();
|
|
4361
|
+
}, [d, K, X]), B = se(() => {
|
|
4362
|
+
V(!0), M && !d && K();
|
|
4363
|
+
}, [M, d, K]), v = se(() => {
|
|
4364
|
+
V(!1), M && d && X();
|
|
4365
|
+
}, [M, d, X]), Y = se(() => {
|
|
4366
|
+
J(!0), E?.();
|
|
4359
4367
|
}, [E]), G = se(() => {
|
|
4360
4368
|
p(!0), S?.();
|
|
4361
4369
|
}, [S]), f = se(() => {
|
|
4362
4370
|
p(!1), H?.();
|
|
4363
4371
|
}, [H]), c = se(() => {
|
|
4364
|
-
p(!1),
|
|
4365
|
-
}, [
|
|
4366
|
-
|
|
4367
|
-
}, [
|
|
4368
|
-
return /* @__PURE__ */
|
|
4372
|
+
p(!1), k?.();
|
|
4373
|
+
}, [k]), m = se((g) => {
|
|
4374
|
+
N?.(g);
|
|
4375
|
+
}, [N]);
|
|
4376
|
+
return /* @__PURE__ */ I(
|
|
4369
4377
|
nt,
|
|
4370
4378
|
{
|
|
4371
4379
|
...n,
|
|
@@ -4375,7 +4383,7 @@ const Ct = ({
|
|
|
4375
4383
|
height: i,
|
|
4376
4384
|
padding: 0,
|
|
4377
4385
|
overflow: "hidden",
|
|
4378
|
-
cursor:
|
|
4386
|
+
cursor: N ? "pointer" : "default",
|
|
4379
4387
|
border: "none",
|
|
4380
4388
|
borderRadius: 0,
|
|
4381
4389
|
...e
|
|
@@ -4385,7 +4393,7 @@ const Ct = ({
|
|
|
4385
4393
|
onMouseLeave: v,
|
|
4386
4394
|
onClick: m,
|
|
4387
4395
|
children: /* @__PURE__ */ ie("div", { className: "video-card-container", children: [
|
|
4388
|
-
/* @__PURE__ */
|
|
4396
|
+
/* @__PURE__ */ I(
|
|
4389
4397
|
"video",
|
|
4390
4398
|
{
|
|
4391
4399
|
ref: a,
|
|
@@ -4400,15 +4408,15 @@ const Ct = ({
|
|
|
4400
4408
|
loop: !0
|
|
4401
4409
|
}
|
|
4402
4410
|
),
|
|
4403
|
-
|
|
4411
|
+
_ && /* @__PURE__ */ I(
|
|
4404
4412
|
"div",
|
|
4405
4413
|
{
|
|
4406
4414
|
className: `video-play-button ${T ? "hovered" : ""}`,
|
|
4407
4415
|
onClick: r,
|
|
4408
|
-
children: d ? /* @__PURE__ */
|
|
4416
|
+
children: d ? /* @__PURE__ */ I(on, { className: "play-icon" }) : /* @__PURE__ */ I(sn, { className: "play-icon" })
|
|
4409
4417
|
}
|
|
4410
4418
|
),
|
|
4411
|
-
!
|
|
4419
|
+
!L && /* @__PURE__ */ I("div", { className: "video-loading-mask", children: /* @__PURE__ */ I("div", { className: "loading-spinner" }) })
|
|
4412
4420
|
] })
|
|
4413
4421
|
}
|
|
4414
4422
|
);
|
|
@@ -4527,35 +4535,35 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4527
4535
|
xl: 5,
|
|
4528
4536
|
xxl: 6
|
|
4529
4537
|
},
|
|
4530
|
-
className:
|
|
4531
|
-
style:
|
|
4532
|
-
onClick:
|
|
4538
|
+
className: A,
|
|
4539
|
+
style: _,
|
|
4540
|
+
onClick: M
|
|
4533
4541
|
}) => {
|
|
4534
|
-
const
|
|
4542
|
+
const N = ae(null), [E, S] = oe(h || b.md || 3), H = ae(/* @__PURE__ */ new Map()), k = se(() => {
|
|
4535
4543
|
if (!i || h)
|
|
4536
4544
|
return h || b.md || 3;
|
|
4537
4545
|
const a = window.innerWidth;
|
|
4538
4546
|
return a < 576 ? b.xs || 1 : a < 768 ? b.sm || 2 : a < 992 ? b.md || 3 : a < 1200 ? b.lg || 4 : a < 1600 ? b.xl || 5 : b.xxl || 6;
|
|
4539
4547
|
}, [i, h, b]), q = se(() => {
|
|
4540
|
-
if (!
|
|
4541
|
-
const a = E, d =
|
|
4542
|
-
t.forEach((
|
|
4543
|
-
const
|
|
4548
|
+
if (!N.current) return;
|
|
4549
|
+
const a = E, d = N.current, T = (d.offsetWidth - u * (a - 1)) / a, V = new Array(a).fill(0);
|
|
4550
|
+
t.forEach((J, K) => {
|
|
4551
|
+
const X = J.id || K, r = H.current.get(X);
|
|
4544
4552
|
if (!r) return;
|
|
4545
4553
|
const B = Math.min(...V), v = V.indexOf(B), Y = v * (T + u), G = V[v];
|
|
4546
4554
|
r.style.position = "absolute", r.style.left = `${Y}px`, r.style.top = `${G}px`, r.style.width = `${T}px`, V[v] += r.offsetHeight + u;
|
|
4547
4555
|
});
|
|
4548
|
-
const
|
|
4549
|
-
d.style.height = `${
|
|
4556
|
+
const L = Math.max(...V);
|
|
4557
|
+
d.style.height = `${L}px`;
|
|
4550
4558
|
}, [t, E, u]);
|
|
4551
4559
|
pe(() => {
|
|
4552
4560
|
const a = () => {
|
|
4553
|
-
const d =
|
|
4561
|
+
const d = k();
|
|
4554
4562
|
d !== E && S(d);
|
|
4555
4563
|
};
|
|
4556
4564
|
if (i)
|
|
4557
4565
|
return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
|
|
4558
|
-
}, [i,
|
|
4566
|
+
}, [i, k, E]), pe(() => {
|
|
4559
4567
|
const a = setTimeout(() => {
|
|
4560
4568
|
q();
|
|
4561
4569
|
}, 100);
|
|
@@ -4564,33 +4572,33 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4564
4572
|
const e = se(() => {
|
|
4565
4573
|
q();
|
|
4566
4574
|
}, [q]), n = se((a) => {
|
|
4567
|
-
|
|
4568
|
-
}, [
|
|
4569
|
-
return /* @__PURE__ */
|
|
4575
|
+
M && M(a), a.onClick?.(a);
|
|
4576
|
+
}, [M]);
|
|
4577
|
+
return /* @__PURE__ */ I(
|
|
4570
4578
|
"div",
|
|
4571
4579
|
{
|
|
4572
|
-
ref:
|
|
4573
|
-
className: `waterfall-container ${
|
|
4580
|
+
ref: N,
|
|
4581
|
+
className: `waterfall-container ${A || ""}`,
|
|
4574
4582
|
style: {
|
|
4575
4583
|
position: "relative",
|
|
4576
4584
|
width: "100%",
|
|
4577
|
-
...
|
|
4585
|
+
..._
|
|
4578
4586
|
},
|
|
4579
4587
|
children: t.map((a, d) => {
|
|
4580
4588
|
const p = a.id || d, T = Qn(a);
|
|
4581
|
-
return /* @__PURE__ */
|
|
4589
|
+
return /* @__PURE__ */ I(
|
|
4582
4590
|
"div",
|
|
4583
4591
|
{
|
|
4584
4592
|
ref: (V) => {
|
|
4585
4593
|
V ? H.current.set(p, V) : H.current.delete(p);
|
|
4586
4594
|
},
|
|
4587
4595
|
className: "waterfall-item",
|
|
4588
|
-
children: T === "video" ? /* @__PURE__ */
|
|
4596
|
+
children: T === "video" ? /* @__PURE__ */ I("div", { style: {
|
|
4589
4597
|
width: "100%",
|
|
4590
4598
|
position: "relative",
|
|
4591
4599
|
paddingBottom: "56.25%",
|
|
4592
|
-
cursor:
|
|
4593
|
-
}, children: /* @__PURE__ */
|
|
4600
|
+
cursor: M || a.onClick ? "pointer" : "default"
|
|
4601
|
+
}, children: /* @__PURE__ */ I("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ I(
|
|
4594
4602
|
Ct,
|
|
4595
4603
|
{
|
|
4596
4604
|
src: a.url,
|
|
@@ -4602,13 +4610,13 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4602
4610
|
autoPlayOnHover: !0,
|
|
4603
4611
|
showPlayButton: !1
|
|
4604
4612
|
}
|
|
4605
|
-
) }) }) : /* @__PURE__ */
|
|
4613
|
+
) }) }) : /* @__PURE__ */ I(
|
|
4606
4614
|
"div",
|
|
4607
4615
|
{
|
|
4608
4616
|
className: "waterfall-image-wrapper",
|
|
4609
4617
|
onClick: () => n(a),
|
|
4610
|
-
style: { cursor:
|
|
4611
|
-
children: /* @__PURE__ */
|
|
4618
|
+
style: { cursor: M || a.onClick ? "pointer" : "default" },
|
|
4619
|
+
children: /* @__PURE__ */ I(
|
|
4612
4620
|
"img",
|
|
4613
4621
|
{
|
|
4614
4622
|
src: a.url,
|