bi-components-library 1.1.4 → 1.1.5

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 CHANGED
@@ -5,7 +5,7 @@ import { createFromIconfontCN as Zt, LeftOutlined as en, SearchOutlined as tn, R
5
5
  import { createPortal as ot } from "react-dom";
6
6
  const ln = ({
7
7
  variant: t = "primary",
8
- loading: g = !1,
8
+ loading: h = !1,
9
9
  children: u,
10
10
  ...c
11
11
  }) => /* @__PURE__ */ H(
@@ -28,7 +28,7 @@ const ln = ({
28
28
  return "primary";
29
29
  }
30
30
  })(t),
31
- loading: g,
31
+ loading: h,
32
32
  ghost: t === "ghost",
33
33
  children: u
34
34
  }
@@ -79,7 +79,7 @@ ln.__docgenInfo = {
79
79
  };
80
80
  const cn = ({
81
81
  title: t,
82
- children: g,
82
+ children: h,
83
83
  bordered: u = !0,
84
84
  hoverable: c = !1,
85
85
  size: v = "default",
@@ -92,7 +92,7 @@ const cn = ({
92
92
  bordered: u,
93
93
  hoverable: c,
94
94
  size: v,
95
- children: g
95
+ children: h
96
96
  }
97
97
  );
98
98
  cn.__docgenInfo = {
@@ -148,16 +148,16 @@ cn.__docgenInfo = {
148
148
  };
149
149
  const un = ({
150
150
  showDefaultFooter: t = !0,
151
- ...g
151
+ ...h
152
152
  }) => {
153
- const u = g.footer !== void 0 ? g.footer : t ? (c, { OkBtn: v, CancelBtn: D }) => /* @__PURE__ */ ce(Gt, { children: [
153
+ const u = h.footer !== void 0 ? h.footer : t ? (c, { OkBtn: v, CancelBtn: D }) => /* @__PURE__ */ ce(Gt, { children: [
154
154
  /* @__PURE__ */ H(v, {}),
155
155
  /* @__PURE__ */ H(D, {})
156
156
  ] }) : null;
157
157
  return /* @__PURE__ */ H(
158
158
  Rt,
159
159
  {
160
- ...g,
160
+ ...h,
161
161
  footer: u
162
162
  }
163
163
  );
@@ -225,7 +225,7 @@ un.__docgenInfo = {
225
225
  };
226
226
  const dn = ({
227
227
  scrollX: t,
228
- showPagination: g = !0,
228
+ showPagination: h = !0,
229
229
  defaultPageSize: u = 10,
230
230
  ...c
231
231
  }) => /* @__PURE__ */ H(
@@ -236,7 +236,7 @@ const dn = ({
236
236
  x: t || "max-content",
237
237
  y: "50vh"
238
238
  },
239
- pagination: g ? {
239
+ pagination: h ? {
240
240
  hideOnSinglePage: !0,
241
241
  showSizeChanger: !0,
242
242
  showQuickJumper: !0,
@@ -299,13 +299,13 @@ const pn = Zt({
299
299
  scriptUrl: ["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]
300
300
  }), fn = ({
301
301
  name: t,
302
- size: g,
302
+ size: h,
303
303
  color: u,
304
304
  style: c,
305
305
  ...v
306
306
  }) => {
307
307
  const D = {
308
- fontSize: g,
308
+ fontSize: h,
309
309
  color: u,
310
310
  ...c
311
311
  };
@@ -356,7 +356,7 @@ fn.__docgenInfo = {
356
356
  };
357
357
  const mn = ({
358
358
  loading: t,
359
- description: g = "暂无数据",
359
+ description: h = "暂无数据",
360
360
  className: u,
361
361
  emptyChildren: c,
362
362
  loadingText: v,
@@ -383,7 +383,7 @@ const mn = ({
383
383
  zt,
384
384
  {
385
385
  image: D,
386
- description: g,
386
+ description: h,
387
387
  imageStyle: { height: 180 },
388
388
  children: c
389
389
  }
@@ -435,7 +435,7 @@ mn.__docgenInfo = {
435
435
  };
436
436
  const yn = ({
437
437
  onClick: t,
438
- showText: g = !1,
438
+ showText: h = !1,
439
439
  className: u,
440
440
  size: c = "small",
441
441
  type: v = "default"
@@ -447,7 +447,7 @@ const yn = ({
447
447
  icon: /* @__PURE__ */ H(en, {}),
448
448
  className: `cursor-pointer ${u || ""}`,
449
449
  onClick: t,
450
- children: g && "返回"
450
+ children: h && "返回"
451
451
  }
452
452
  );
453
453
  yn.__docgenInfo = {
@@ -491,10 +491,10 @@ yn.__docgenInfo = {
491
491
  };
492
492
  const hn = ({
493
493
  removePadding: t = !0,
494
- className: g,
494
+ className: h,
495
495
  ...u
496
496
  }) => {
497
- const c = t ? `px-0 h-auto ${g || ""}` : g;
497
+ const c = t ? `px-0 h-auto ${h || ""}` : h;
498
498
  return /* @__PURE__ */ H(
499
499
  Ae,
500
500
  {
@@ -544,82 +544,82 @@ hn.__docgenInfo = {
544
544
  };
545
545
  const { Option: gn } = ze, xn = ({
546
546
  columns: t,
547
- request: g,
547
+ request: h,
548
548
  searchFields: u = [],
549
549
  showSearch: c = !0,
550
550
  showRefresh: v = !0,
551
551
  defaultPageSize: D = 10,
552
- pageSizeOptions: I = ["10", "20", "50", "100"],
552
+ pageSizeOptions: M = ["10", "20", "50", "100"],
553
553
  autoLoad: P = !0,
554
- externalParams: T = {},
555
- ...S
554
+ externalParams: N = {},
555
+ ...T
556
556
  }) => {
557
- const [L, R] = oe([]), [$, A] = oe(!1), [e, n] = oe({
557
+ const [_, R] = oe([]), [$, L] = oe(!1), [e, n] = oe({
558
558
  current: 1,
559
559
  pageSize: D,
560
560
  total: 0
561
- }), [r, i] = oe({}), [p, q] = oe({}), [G] = Ve.useForm(), M = ae(e);
562
- M.current = e;
563
- const Q = ae(T);
564
- Q.current = T;
565
- const K = ae(!1), X = nt(() => t.map((d) => {
566
- const { sortable: f, render: m, ...h } = d;
561
+ }), [r, i] = oe({}), [x, q] = oe({}), [O] = Ve.useForm(), C = ae(e);
562
+ C.current = e;
563
+ const Q = ae(N);
564
+ Q.current = N;
565
+ const W = ae(!1), X = nt(() => t.map((d) => {
566
+ const { sortable: p, render: f, ...y } = d;
567
567
  return {
568
- ...h,
569
- sorter: f ? !0 : void 0,
570
- render: m || ((E) => E)
568
+ ...y,
569
+ sorter: p ? !0 : void 0,
570
+ render: f || ((E) => E)
571
571
  };
572
572
  }), [t]), a = ie(async (d = {}) => {
573
- if (g) {
574
- A(!0);
573
+ if (h) {
574
+ L(!0);
575
575
  try {
576
- const f = {
577
- page: M.current.current,
578
- pageSize: M.current.pageSize,
579
- sortField: p.field,
580
- sortOrder: p.order,
576
+ const p = {
577
+ page: C.current.current,
578
+ pageSize: C.current.pageSize,
579
+ sortField: x.field,
580
+ sortOrder: x.order,
581
581
  searchParams: { ...r, ...Q.current },
582
582
  ...d
583
- }, m = await g(f);
584
- m.success && (R(m.data), n((h) => ({
585
- ...h,
586
- total: m.total,
587
- current: f.page || h.current
583
+ }, f = await h(p);
584
+ f.success && (R(f.data), n((y) => ({
585
+ ...y,
586
+ total: f.total,
587
+ current: p.page || y.current
588
588
  })));
589
- } catch (f) {
590
- console.error("加载数据失败:", f);
589
+ } catch (p) {
590
+ console.error("加载数据失败:", p);
591
591
  } finally {
592
- A(!1);
592
+ L(!1);
593
593
  }
594
594
  }
595
- }, [g, p, r]), V = ie((d) => {
596
- i(d), n((f) => ({ ...f, current: 1 }));
595
+ }, [h, x, r]), V = ie((d) => {
596
+ i(d), n((p) => ({ ...p, current: 1 }));
597
597
  }, []), w = ie(() => {
598
- G.resetFields(), i({}), n((d) => ({ ...d, current: 1 }));
599
- }, [G]), W = ie(() => {
598
+ O.resetFields(), i({}), n((d) => ({ ...d, current: 1 }));
599
+ }, [O]), U = ie(() => {
600
600
  a();
601
- }, [a]), z = ie((d, f, m) => {
602
- const h = {
601
+ }, [a]), z = ie((d, p, f) => {
602
+ const y = {
603
603
  current: d.current || 1,
604
604
  pageSize: d.pageSize || D,
605
605
  total: d.total || 0
606
606
  }, E = {
607
- field: m?.field,
608
- order: m?.order
607
+ field: f?.field,
608
+ order: f?.order
609
609
  };
610
- n(h), q(E);
610
+ n(y), q(E);
611
611
  }, [D]);
612
612
  return pe(() => {
613
- const d = Object.keys(T).length > 0;
614
- (P && !K.current || d) && (a(), K.current = !0);
615
- }, [P, T, a]), /* @__PURE__ */ ce("div", { children: [
613
+ const d = Object.keys(N).length > 0;
614
+ (P && !W.current || d) && (a(), W.current = !0);
615
+ }, [P, N, a]), /* @__PURE__ */ ce("div", { children: [
616
616
  c && u.length > 0 && /* @__PURE__ */ H(rt, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ ce(
617
617
  Ve,
618
618
  {
619
- form: G,
619
+ form: O,
620
620
  layout: "inline",
621
621
  onFinish: V,
622
- initialValues: u.reduce((d, f) => (f.defaultValue !== void 0 && (d[f.key] = f.defaultValue), d), {}),
622
+ initialValues: u.reduce((d, p) => (p.defaultValue !== void 0 && (d[p.key] = p.defaultValue), d), {}),
623
623
  children: [
624
624
  u.map((d) => /* @__PURE__ */ H(Ve.Item, { name: d.key, label: d.label, children: d.type === "input" ? /* @__PURE__ */ H(
625
625
  $t,
@@ -633,13 +633,13 @@ const { Option: gn } = ze, xn = ({
633
633
  placeholder: d.placeholder || `请选择${d.label}`,
634
634
  style: { width: 200 },
635
635
  allowClear: !0,
636
- children: d.options?.map((f) => /* @__PURE__ */ H(gn, { value: f.value, children: f.label }, f.value))
636
+ children: d.options?.map((p) => /* @__PURE__ */ H(gn, { value: p.value, children: p.label }, p.value))
637
637
  }
638
638
  ) }, d.key)),
639
639
  /* @__PURE__ */ H(Ve.Item, { children: /* @__PURE__ */ ce(Yt, { children: [
640
640
  /* @__PURE__ */ H(Ae, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ H(tn, {}), children: "查询" }),
641
641
  /* @__PURE__ */ H(Ae, { onClick: w, children: "重置" }),
642
- v && /* @__PURE__ */ H(Ae, { icon: /* @__PURE__ */ H(nn, {}), onClick: W, children: "刷新" })
642
+ v && /* @__PURE__ */ H(Ae, { icon: /* @__PURE__ */ H(nn, {}), onClick: U, children: "刷新" })
643
643
  ] }) })
644
644
  ]
645
645
  }
@@ -647,16 +647,16 @@ const { Option: gn } = ze, xn = ({
647
647
  /* @__PURE__ */ H(
648
648
  at,
649
649
  {
650
- ...S,
650
+ ...T,
651
651
  columns: X,
652
- dataSource: L,
652
+ dataSource: _,
653
653
  loading: $,
654
654
  pagination: {
655
655
  ...e,
656
656
  showSizeChanger: !0,
657
657
  showQuickJumper: !0,
658
- showTotal: (d, f) => `第 ${f[0]}-${f[1]} 条/共 ${d} 条`,
659
- pageSizeOptions: I
658
+ showTotal: (d, p) => `第 ${p[0]}-${p[1]} 条/共 ${d} 条`,
659
+ pageSizeOptions: M
660
660
  },
661
661
  onChange: z,
662
662
  scroll: { x: "max-content", y: "50vh" }
@@ -731,68 +731,68 @@ xn.__docgenInfo = {
731
731
  }
732
732
  }
733
733
  };
734
- function et(t, g, u) {
734
+ function et(t, h, u) {
735
735
  if (!t.current) return;
736
736
  const c = ($) => {
737
737
  $.classList.contains("rte-richtext-host-expanded") && ($.style.setProperty("display", "flex", "important"), $.style.setProperty("flex-direction", "column", "important"), $.style.setProperty("flex", "1 1 auto", "important"), $.style.setProperty("min-height", "0", "important"), $.style.setProperty("width", "100%", "important"), $.style.setProperty("align-self", "stretch", "important"));
738
738
  }, v = /* @__PURE__ */ new Set(), D = {};
739
- for (const $ of g)
739
+ for (const $ of h)
740
740
  $.exclusionGroup && $.exclusionGroup !== "separator" && (v.add($.exclusionGroup), D[$.exclusionGroup] || (D[$.exclusionGroup] = []), D[$.exclusionGroup].push({
741
741
  type: $.type,
742
742
  key: $.key,
743
743
  exclusionGroup: $.exclusionGroup
744
744
  }));
745
- const I = {};
745
+ const M = {};
746
746
  for (const $ of v) {
747
- I[$] = !1;
748
- for (const A of D[$])
749
- if (A.type === "upload" && A.key) {
750
- if (u[A.key] !== null && u[A.key] !== void 0) {
751
- I[$] = !0;
747
+ M[$] = !1;
748
+ for (const L of D[$])
749
+ if (L.type === "upload" && L.key) {
750
+ if (u[L.key] !== null && u[L.key] !== void 0) {
751
+ M[$] = !0;
752
752
  break;
753
753
  }
754
- const e = g.find((n) => n.type === "upload" && n.key === A.key);
754
+ const e = h.find((n) => n.type === "upload" && n.key === L.key);
755
755
  if (e && typeof e.maxCount == "number")
756
756
  for (let n = 0; n < e.maxCount; n++) {
757
- const r = `${A.key}-${n}`;
757
+ const r = `${L.key}-${n}`;
758
758
  if (u[r] !== null && u[r] !== void 0) {
759
- I[$] = !0;
759
+ M[$] = !0;
760
760
  break;
761
761
  }
762
762
  }
763
- if (I[$])
763
+ if (M[$])
764
764
  break;
765
- } else if ((A.type === "variable" || A.type === "multi-variable") && A.key) {
766
- const e = A.type === "multi-variable" ? t.current.querySelectorAll(
767
- `[data-type="variable"][data-multi-key="${A.key}"]`
765
+ } else if ((L.type === "variable" || L.type === "multi-variable") && L.key) {
766
+ const e = L.type === "multi-variable" ? t.current.querySelectorAll(
767
+ `[data-type="variable"][data-multi-key="${L.key}"]`
768
768
  ) : [t.current.querySelector(
769
- `[data-type="variable"][data-key="${A.key}"]`
769
+ `[data-type="variable"][data-key="${L.key}"]`
770
770
  )].filter(Boolean);
771
771
  for (const n of e)
772
772
  if (!n.classList.contains("show-placeholder") && n.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
773
- I[$] = !0;
773
+ M[$] = !0;
774
774
  break;
775
775
  }
776
- if (I[$])
776
+ if (M[$])
777
777
  break;
778
778
  }
779
779
  }
780
- const P = g.some(($) => $.exclusionGroup === "separator"), S = Object.keys(I).filter(
781
- ($) => I[$]
780
+ const P = h.some(($) => $.exclusionGroup === "separator"), T = Object.keys(M).filter(
781
+ ($) => M[$]
782
782
  ).length > 0;
783
- let L = null;
784
- if (S && P) {
785
- for (const $ of g)
786
- if ($.exclusionGroup && $.exclusionGroup !== "separator" && I[$.exclusionGroup]) {
787
- L = $.exclusionGroup;
783
+ let _ = null;
784
+ if (T && P) {
785
+ for (const $ of h)
786
+ if ($.exclusionGroup && $.exclusionGroup !== "separator" && M[$.exclusionGroup]) {
787
+ _ = $.exclusionGroup;
788
788
  break;
789
789
  }
790
790
  }
791
791
  for (const $ of v) {
792
- const A = t.current.querySelectorAll(
792
+ const L = t.current.querySelectorAll(
793
793
  `[data-group="${$}"]`
794
794
  );
795
- P && S && L ? $ === L ? A.forEach((e) => {
795
+ P && T && _ ? $ === _ ? L.forEach((e) => {
796
796
  if (!e.closest('[data-rte-force-hidden="1"]')) {
797
797
  if (e.classList.contains("rte-richtext-host-expanded")) {
798
798
  c(e);
@@ -800,9 +800,9 @@ function et(t, g, u) {
800
800
  }
801
801
  e.classList.contains("required-upload-group") ? e.style.setProperty("display", "inline-flex", "important") : (e.classList.contains("exclusion-wrapper"), e.style.setProperty("display", "inline-block", "important"));
802
802
  }
803
- }) : A.forEach((e) => {
803
+ }) : L.forEach((e) => {
804
804
  e.closest('[data-rte-force-hidden="1"]') || (e.style.display = "none", e.style.setProperty("display", "none", "important"));
805
- }) : A.forEach((e) => {
805
+ }) : L.forEach((e) => {
806
806
  if (!e.closest('[data-rte-force-hidden="1"]')) {
807
807
  if (e.classList.contains("rte-richtext-host-expanded")) {
808
808
  c(e);
@@ -815,10 +815,10 @@ function et(t, g, u) {
815
815
  t.current.querySelectorAll(
816
816
  '[data-group="separator"]'
817
817
  ).forEach(($) => {
818
- $.style.display = S ? "none" : "inline";
818
+ $.style.display = T ? "none" : "inline";
819
819
  });
820
820
  }
821
- function tt(t, g, u, c) {
821
+ function tt(t, h, u, c) {
822
822
  if (!t.current) {
823
823
  c(!1);
824
824
  return;
@@ -829,19 +829,19 @@ function tt(t, g, u, c) {
829
829
  const r = (e.textContent || "").replace(/[\u200B]/g, "").trim(), i = Array.from(e.querySelectorAll(":scope > div"));
830
830
  if (i.length === 0)
831
831
  return r;
832
- let p = -1;
833
- for (let M = 0; M < i.length; M++)
834
- if ((i[M].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
835
- p = M;
832
+ let x = -1;
833
+ for (let C = 0; C < i.length; C++)
834
+ if ((i[C].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
835
+ x = C;
836
836
  break;
837
837
  }
838
- return i.filter((M, Q) => Q !== p).map((M) => (M.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
838
+ return i.filter((C, Q) => Q !== x).map((C) => (C.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
839
839
  `).trim() || r;
840
- }, D = (e) => e ? !!e.closest('[data-rte-force-hidden="1"]') : !1, I = [];
841
- for (let e = 0; e < g.length; e++) {
842
- const n = g[e];
840
+ }, D = (e) => e ? !!e.closest('[data-rte-force-hidden="1"]') : !1, M = [];
841
+ for (let e = 0; e < h.length; e++) {
842
+ const n = h[e];
843
843
  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.type === "number-input") && n.required && n.key) {
844
- I.push({
844
+ M.push({
845
845
  exclusionGroup: n.exclusionGroup || "",
846
846
  key: n.key,
847
847
  type: n.type === "multi-variable" || n.type === "report-url" ? "variable" : n.type === "report-module" ? "richtext" : n.type,
@@ -854,10 +854,10 @@ function tt(t, g, u, c) {
854
854
  }
855
855
  if (n.type === "text" && n.className?.includes("rte-text-required"))
856
856
  if (n.exclusionGroup)
857
- for (let r = e + 1; r < g.length; r++) {
858
- const i = g[r];
857
+ for (let r = e + 1; r < h.length; r++) {
858
+ const i = h[r];
859
859
  if (i.exclusionGroup === n.exclusionGroup && (i.type === "variable" || i.type === "upload" || i.type === "select" || i.type === "textarea" || i.type === "richtext" || i.type === "datepicker" || i.type === "number-input") && i.key) {
860
- I.push({
860
+ M.push({
861
861
  exclusionGroup: n.exclusionGroup,
862
862
  key: i.key,
863
863
  type: i.type,
@@ -867,10 +867,10 @@ function tt(t, g, u, c) {
867
867
  }
868
868
  }
869
869
  else
870
- for (let r = e + 1; r < g.length; r++) {
871
- const i = g[r];
870
+ for (let r = e + 1; r < h.length; r++) {
871
+ const i = h[r];
872
872
  if ((i.type === "variable" || i.type === "upload" || i.type === "select" || i.type === "textarea" || i.type === "richtext" || i.type === "datepicker" || i.type === "number-input") && i.key) {
873
- I.push({
873
+ M.push({
874
874
  exclusionGroup: i.exclusionGroup || "",
875
875
  key: i.key,
876
876
  type: i.type,
@@ -880,19 +880,19 @@ function tt(t, g, u, c) {
880
880
  }
881
881
  }
882
882
  }
883
- const P = g.some((e) => e.exclusionGroup === "separator"), T = [];
884
- if (P && I.length > 1) {
883
+ const P = h.some((e) => e.exclusionGroup === "separator"), N = [];
884
+ if (P && M.length > 1) {
885
885
  const e = [];
886
- g.forEach((n, r) => {
886
+ h.forEach((n, r) => {
887
887
  n.exclusionGroup === "separator" && e.push(r);
888
888
  });
889
889
  for (const n of e) {
890
- const i = I.filter((G) => typeof G.__index == "number" && G.__index < n).sort((G, M) => (M.__index ?? 0) - (G.__index ?? 0))[0], q = I.filter((G) => typeof G.__index == "number" && G.__index > n).sort((G, M) => (G.__index ?? 0) - (M.__index ?? 0))[0];
891
- i && q && T.push([i, q]);
890
+ const i = M.filter((O) => typeof O.__index == "number" && O.__index < n).sort((O, C) => (C.__index ?? 0) - (O.__index ?? 0))[0], q = M.filter((O) => typeof O.__index == "number" && O.__index > n).sort((O, C) => (O.__index ?? 0) - (C.__index ?? 0))[0];
891
+ i && q && N.push([i, q]);
892
892
  }
893
893
  }
894
- if (I.length === 0) {
895
- if (g.length === 0) {
894
+ if (M.length === 0) {
895
+ if (h.length === 0) {
896
896
  if (!t.current) {
897
897
  c(!1);
898
898
  return;
@@ -904,7 +904,7 @@ function tt(t, g, u, c) {
904
904
  c(!0);
905
905
  return;
906
906
  }
907
- const S = I.filter((e) => {
907
+ const T = M.filter((e) => {
908
908
  if (!t.current) return !1;
909
909
  if (e.exclusionGroup) {
910
910
  const n = t.current.querySelectorAll(
@@ -980,29 +980,29 @@ function tt(t, g, u, c) {
980
980
  }
981
981
  return !1;
982
982
  });
983
- if (S.length === 0) {
983
+ if (T.length === 0) {
984
984
  c(!0);
985
985
  return;
986
986
  }
987
- const L = /* @__PURE__ */ new Set();
988
- T.forEach((e) => {
987
+ const _ = /* @__PURE__ */ new Set();
988
+ N.forEach((e) => {
989
989
  e.forEach((n) => {
990
- n.key && L.add(n.key);
990
+ n.key && _.add(n.key);
991
991
  });
992
992
  });
993
- const R = S.filter(
994
- (e) => !e.key || !L.has(e.key)
993
+ const R = T.filter(
994
+ (e) => !e.key || !_.has(e.key)
995
995
  );
996
- let $ = (T.length === 0, !0);
997
- for (const e of T) {
996
+ let $ = (N.length === 0, !0);
997
+ for (const e of N) {
998
998
  const n = e.filter((i) => {
999
999
  if (!t.current) return !1;
1000
1000
  if (i.exclusionGroup) {
1001
- const p = t.current.querySelectorAll(
1001
+ const x = t.current.querySelectorAll(
1002
1002
  `[data-group="${i.exclusionGroup}"]`
1003
1003
  );
1004
- if (p.length > 0) {
1005
- const q = p[0];
1004
+ if (x.length > 0) {
1005
+ const q = x[0];
1006
1006
  return D(q) ? !0 : q.style.display !== "none";
1007
1007
  }
1008
1008
  }
@@ -1014,17 +1014,17 @@ function tt(t, g, u, c) {
1014
1014
  for (const i of n)
1015
1015
  if (i.type === "upload" && i.key) {
1016
1016
  if (i.minCount && i.minCount > 0) {
1017
- let p = 0;
1017
+ let x = 0;
1018
1018
  const q = t.current.querySelectorAll(
1019
1019
  `[data-type="upload"][data-batch-key="${i.key}"]`
1020
1020
  );
1021
1021
  if (q.length === 0)
1022
1022
  continue;
1023
- for (let G = 0; G < q.length; G++) {
1024
- const Q = q[G].dataset.key;
1025
- Q && u[Q] != null && (p += 1);
1023
+ for (let O = 0; O < q.length; O++) {
1024
+ const Q = q[O].dataset.key;
1025
+ Q && u[Q] != null && (x += 1);
1026
1026
  }
1027
- if (p >= i.minCount) {
1027
+ if (x >= i.minCount) {
1028
1028
  r = !0;
1029
1029
  break;
1030
1030
  }
@@ -1034,68 +1034,68 @@ function tt(t, g, u, c) {
1034
1034
  }
1035
1035
  } else if (i.type === "variable" && i.key)
1036
1036
  if (i.isMultiVariable) {
1037
- const p = t.current.querySelectorAll(
1037
+ const x = t.current.querySelectorAll(
1038
1038
  `[data-type="variable"][data-multi-key="${i.key}"]`
1039
1039
  );
1040
1040
  let q = 0;
1041
- for (const M of Array.from(p)) {
1042
- if (M.classList.contains("show-placeholder"))
1041
+ for (const C of Array.from(x)) {
1042
+ if (C.classList.contains("show-placeholder"))
1043
1043
  continue;
1044
- M.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (q += 1);
1044
+ C.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (q += 1);
1045
1045
  }
1046
- const G = i.minCount && i.minCount > 0 ? i.minCount : 1;
1047
- if (q >= G) {
1046
+ const O = i.minCount && i.minCount > 0 ? i.minCount : 1;
1047
+ if (q >= O) {
1048
1048
  r = !0;
1049
1049
  break;
1050
1050
  }
1051
1051
  } else {
1052
- const p = t.current.querySelector(
1052
+ const x = t.current.querySelector(
1053
1053
  `[data-type="variable"][data-key="${i.key}"]`
1054
1054
  );
1055
- if (p) {
1056
- if (p.classList.contains("show-placeholder"))
1055
+ if (x) {
1056
+ if (x.classList.contains("show-placeholder"))
1057
1057
  continue;
1058
- if (p.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1058
+ if (x.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1059
1059
  r = !0;
1060
1060
  break;
1061
1061
  }
1062
1062
  }
1063
1063
  }
1064
1064
  else if (i.type === "select" && i.key) {
1065
- const p = t.current.querySelector(
1065
+ const x = t.current.querySelector(
1066
1066
  `[data-type="select"][data-key="${i.key}"]`
1067
1067
  );
1068
- if (p && (p.getAttribute("data-value") || "").trim().length > 0) {
1068
+ if (x && (x.getAttribute("data-value") || "").trim().length > 0) {
1069
1069
  r = !0;
1070
1070
  break;
1071
1071
  }
1072
1072
  } else if (i.type === "textarea" && i.key) {
1073
- const p = t.current.querySelector(
1073
+ const x = t.current.querySelector(
1074
1074
  `[data-type="textarea"][data-key="${i.key}"]`
1075
1075
  );
1076
- if (p && (p.value || "").trim().length > 0) {
1076
+ if (x && (x.value || "").trim().length > 0) {
1077
1077
  r = !0;
1078
1078
  break;
1079
1079
  }
1080
1080
  } else if (i.type === "richtext" && i.key) {
1081
- const p = typeof i.moduleIndex == "number" ? `[data-type="richtext"][data-node-type="report-module"][data-key="${i.key}"][data-module-index="${i.moduleIndex}"]` : `[data-type="richtext"][data-key="${i.key}"]`, q = t.current.querySelector(p);
1081
+ const x = typeof i.moduleIndex == "number" ? `[data-type="richtext"][data-node-type="report-module"][data-key="${i.key}"][data-module-index="${i.moduleIndex}"]` : `[data-type="richtext"][data-key="${i.key}"]`, q = t.current.querySelector(x);
1082
1082
  if (q && v(q).length > 0) {
1083
1083
  r = !0;
1084
1084
  break;
1085
1085
  }
1086
1086
  } else if (i.type === "datepicker" && i.key) {
1087
- const p = t.current.querySelector(
1087
+ const x = t.current.querySelector(
1088
1088
  `[data-type="datepicker"][data-key="${i.key}"]`
1089
1089
  );
1090
- if (p && (p.getAttribute("data-value") || "").trim().length > 0) {
1090
+ if (x && (x.getAttribute("data-value") || "").trim().length > 0) {
1091
1091
  r = !0;
1092
1092
  break;
1093
1093
  }
1094
1094
  } else if (i.type === "number-input" && i.key) {
1095
- const p = t.current.querySelector(
1095
+ const x = t.current.querySelector(
1096
1096
  `[data-type="number-input"][data-key="${i.key}"]`
1097
1097
  );
1098
- if (p && (p.value || "").trim().length > 0) {
1098
+ if (x && (x.value || "").trim().length > 0) {
1099
1099
  r = !0;
1100
1100
  break;
1101
1101
  }
@@ -1105,7 +1105,7 @@ function tt(t, g, u, c) {
1105
1105
  break;
1106
1106
  }
1107
1107
  }
1108
- let A = !0;
1108
+ let L = !0;
1109
1109
  for (const e of R)
1110
1110
  if (e.type === "upload" && e.key) {
1111
1111
  if (e.minCount && e.minCount > 0) {
@@ -1114,7 +1114,7 @@ function tt(t, g, u, c) {
1114
1114
  `[data-type="upload"][data-batch-key="${e.key}"]`
1115
1115
  );
1116
1116
  if (r.length === 0) {
1117
- A = !1;
1117
+ L = !1;
1118
1118
  break;
1119
1119
  }
1120
1120
  for (let i = 0; i < r.length; i++) {
@@ -1122,11 +1122,11 @@ function tt(t, g, u, c) {
1122
1122
  q && u[q] != null && (n += 1);
1123
1123
  }
1124
1124
  if (n < e.minCount) {
1125
- A = !1;
1125
+ L = !1;
1126
1126
  break;
1127
1127
  }
1128
1128
  } else if (u[e.key] === null || u[e.key] === void 0) {
1129
- A = !1;
1129
+ L = !1;
1130
1130
  break;
1131
1131
  }
1132
1132
  } else if (e.type === "variable" && e.key)
@@ -1135,14 +1135,14 @@ function tt(t, g, u, c) {
1135
1135
  `[data-type="variable"][data-multi-key="${e.key}"]`
1136
1136
  );
1137
1137
  let r = 0;
1138
- for (const p of Array.from(n)) {
1139
- if (p.classList.contains("show-placeholder"))
1138
+ for (const x of Array.from(n)) {
1139
+ if (x.classList.contains("show-placeholder"))
1140
1140
  continue;
1141
- p.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (r += 1);
1141
+ x.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (r += 1);
1142
1142
  }
1143
1143
  const i = e.minCount && e.minCount > 0 ? e.minCount : 1;
1144
1144
  if (r < i) {
1145
- A = !1;
1145
+ L = !1;
1146
1146
  break;
1147
1147
  }
1148
1148
  } else {
@@ -1150,15 +1150,15 @@ function tt(t, g, u, c) {
1150
1150
  `[data-type="variable"][data-key="${e.key}"]`
1151
1151
  );
1152
1152
  if (!n) {
1153
- A = !1;
1153
+ L = !1;
1154
1154
  break;
1155
1155
  }
1156
1156
  if (n.classList.contains("show-placeholder")) {
1157
- A = !1;
1157
+ L = !1;
1158
1158
  break;
1159
1159
  }
1160
1160
  if (n.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1161
- A = !1;
1161
+ L = !1;
1162
1162
  break;
1163
1163
  }
1164
1164
  }
@@ -1167,7 +1167,7 @@ function tt(t, g, u, c) {
1167
1167
  `[data-type="select"][data-key="${e.key}"]`
1168
1168
  );
1169
1169
  if (!n || (n.getAttribute("data-value") || "").trim().length === 0) {
1170
- A = !1;
1170
+ L = !1;
1171
1171
  break;
1172
1172
  }
1173
1173
  } else if (e.type === "textarea" && e.key) {
@@ -1175,13 +1175,13 @@ function tt(t, g, u, c) {
1175
1175
  `[data-type="textarea"][data-key="${e.key}"]`
1176
1176
  );
1177
1177
  if (!n || (n.value || "").trim().length === 0) {
1178
- A = !1;
1178
+ L = !1;
1179
1179
  break;
1180
1180
  }
1181
1181
  } else if (e.type === "richtext" && e.key) {
1182
1182
  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}"]`, r = t.current.querySelector(n);
1183
1183
  if (!r || v(r).length === 0) {
1184
- A = !1;
1184
+ L = !1;
1185
1185
  break;
1186
1186
  }
1187
1187
  } else if (e.type === "datepicker" && e.key) {
@@ -1189,7 +1189,7 @@ function tt(t, g, u, c) {
1189
1189
  `[data-type="datepicker"][data-key="${e.key}"]`
1190
1190
  );
1191
1191
  if (!n || (n.getAttribute("data-value") || "").trim().length === 0) {
1192
- A = !1;
1192
+ L = !1;
1193
1193
  break;
1194
1194
  }
1195
1195
  } else if (e.type === "number-input" && e.key) {
@@ -1197,54 +1197,54 @@ function tt(t, g, u, c) {
1197
1197
  `[data-type="number-input"][data-key="${e.key}"]`
1198
1198
  );
1199
1199
  if (!n || (n.value || "").trim().length === 0) {
1200
- A = !1;
1200
+ L = !1;
1201
1201
  break;
1202
1202
  }
1203
1203
  }
1204
- c($ && A);
1204
+ c($ && L);
1205
1205
  }
1206
- function Ze(t, g) {
1206
+ function Ze(t, h) {
1207
1207
  if (!t.current) return;
1208
1208
  t.current.querySelectorAll('[data-type="variable"]').forEach((c) => {
1209
1209
  const v = c.innerText;
1210
1210
  v.replace(/\u200B/g, "").trim().length === 0 ? (v !== "​" && (c.innerText = "​"), c.classList.add("show-placeholder")) : c.classList.remove("show-placeholder");
1211
1211
  });
1212
1212
  }
1213
- const bn = ({ host: t, onChange: g }) => {
1214
- const u = t.dataset.key, c = t.dataset.placeholder, v = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", D = t.dataset.required === "true", I = t.dataset.value || "", P = Qe.useMemo(() => {
1213
+ const bn = ({ host: t, onChange: h }) => {
1214
+ const u = t.dataset.key, c = t.dataset.placeholder, v = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", D = t.dataset.required === "true", M = t.dataset.value || "", P = Qe.useMemo(() => {
1215
1215
  try {
1216
1216
  return JSON.parse(v);
1217
1217
  } catch {
1218
1218
  return [];
1219
1219
  }
1220
- }, [v]), [T, S] = oe(I || void 0), [L, R] = oe(64), $ = ae(null), A = (r) => {
1221
- S(r), t.setAttribute("data-value", r), g(u, r);
1220
+ }, [v]), [N, T] = oe(M || void 0), [_, R] = oe(64), $ = ae(null), L = (r) => {
1221
+ T(r), t.setAttribute("data-value", r), h(u, r);
1222
1222
  };
1223
1223
  pe(() => {
1224
- S(I || void 0);
1225
- }, [I]);
1224
+ T(M || void 0);
1225
+ }, [M]);
1226
1226
  const e = Qe.useCallback(() => {
1227
- if (T != null && T !== "") {
1228
- const r = P.find((i) => String(i.value) === String(T));
1229
- return r ? typeof r.label == "string" ? r.label : String(r.label ?? T) : String(T);
1227
+ if (N != null && N !== "") {
1228
+ const r = P.find((i) => String(i.value) === String(N));
1229
+ return r ? typeof r.label == "string" ? r.label : String(r.label ?? N) : String(N);
1230
1230
  }
1231
1231
  return c || "请选择";
1232
- }, [T, P, c]), n = Qe.useCallback(() => {
1232
+ }, [N, P, c]), n = Qe.useCallback(() => {
1233
1233
  const r = $.current;
1234
1234
  if (!r) return;
1235
- const i = r.querySelector(".ant-select-selection-item"), p = r.querySelector(".ant-select-selection-placeholder"), q = i || p, G = (q?.textContent || "").trim() || e(), M = r.querySelector(".ant-select-selector"), Q = q || M || r, K = window.getComputedStyle(Q), X = q ? K.fontSize : "16px", a = K.fontFamily || "sans-serif", V = K.fontWeight || "400", W = `${K.fontStyle || "normal"} ${V} ${X} ${a}`, d = document.createElement("canvas").getContext("2d"), f = d ? Math.ceil((d.font = W, d.measureText(G).width || 0)) : 0;
1236
- let m = 0;
1237
- if (M) {
1238
- const J = window.getComputedStyle(M);
1239
- m = (Number.parseFloat(J.paddingLeft) || 0) + (Number.parseFloat(J.paddingRight) || 0);
1235
+ const i = r.querySelector(".ant-select-selection-item"), x = r.querySelector(".ant-select-selection-placeholder"), q = i || x, O = (q?.textContent || "").trim() || e(), C = r.querySelector(".ant-select-selector"), Q = q || C || r, W = window.getComputedStyle(Q), X = q ? W.fontSize : "16px", a = W.fontFamily || "sans-serif", V = W.fontWeight || "400", U = `${W.fontStyle || "normal"} ${V} ${X} ${a}`, d = document.createElement("canvas").getContext("2d"), p = d ? Math.ceil((d.font = U, d.measureText(O).width || 0)) : 0;
1236
+ let f = 0;
1237
+ if (C) {
1238
+ const J = window.getComputedStyle(C);
1239
+ f = (Number.parseFloat(J.paddingLeft) || 0) + (Number.parseFloat(J.paddingRight) || 0);
1240
1240
  }
1241
- const h = r.querySelector(".ant-select-arrow"), E = h ? Math.ceil(h.getBoundingClientRect().width) : 12, Y = r.querySelector(".ant-select-clear");
1242
- let U = 0;
1241
+ const y = r.querySelector(".ant-select-arrow"), E = y ? Math.ceil(y.getBoundingClientRect().width) : 12, Y = r.querySelector(".ant-select-clear");
1242
+ let K = 0;
1243
1243
  if (Y) {
1244
1244
  const J = window.getComputedStyle(Y);
1245
- J.display !== "none" && J.visibility !== "hidden" && (U = Math.ceil(Y.getBoundingClientRect().width));
1245
+ J.display !== "none" && J.visibility !== "hidden" && (K = Math.ceil(Y.getBoundingClientRect().width));
1246
1246
  }
1247
- const Z = Math.max(36, f + m + E + U + 6);
1247
+ const Z = Math.max(36, p + f + E + K + 6);
1248
1248
  R((J) => J === Z ? J : Z);
1249
1249
  }, [e]);
1250
1250
  return Le(() => {
@@ -1273,12 +1273,12 @@ const bn = ({ host: t, onChange: g }) => {
1273
1273
  className: "rte-select-wrapper",
1274
1274
  contentEditable: !1,
1275
1275
  ref: $,
1276
- style: { display: "inline-block", width: L },
1276
+ style: { display: "inline-block", width: _ },
1277
1277
  children: /* @__PURE__ */ H(
1278
1278
  ze,
1279
1279
  {
1280
- value: T,
1281
- onChange: A,
1280
+ value: N,
1281
+ onChange: L,
1282
1282
  placeholder: c || "请选择",
1283
1283
  style: { width: "100%" },
1284
1284
  options: P,
@@ -1295,48 +1295,48 @@ const bn = ({ host: t, onChange: g }) => {
1295
1295
  t
1296
1296
  );
1297
1297
  }, vn = (t) => {
1298
- const [g, u] = oe([]);
1298
+ const [h, u] = oe([]);
1299
1299
  return pe(() => {
1300
1300
  const c = t.current;
1301
1301
  if (!c) return;
1302
1302
  const v = () => {
1303
- const I = c.querySelectorAll(".rte-select-host"), P = [];
1304
- I.forEach((T) => {
1305
- const S = T.getAttribute("data-key");
1306
- S && P.push(
1303
+ const M = c.querySelectorAll(".rte-select-host"), P = [];
1304
+ M.forEach((N) => {
1305
+ const T = N.getAttribute("data-key");
1306
+ T && P.push(
1307
1307
  /* @__PURE__ */ H(
1308
1308
  bn,
1309
1309
  {
1310
- host: T,
1310
+ host: N,
1311
1311
  onChange: () => {
1312
1312
  if (t.current) {
1313
- const L = new Event("input", { bubbles: !0 });
1314
- t.current.dispatchEvent(L);
1313
+ const _ = new Event("input", { bubbles: !0 });
1314
+ t.current.dispatchEvent(_);
1315
1315
  }
1316
1316
  }
1317
1317
  },
1318
- `select-${S}`
1318
+ `select-${T}`
1319
1319
  )
1320
1320
  );
1321
1321
  }), u(P);
1322
1322
  };
1323
1323
  v();
1324
- const D = new MutationObserver((I) => {
1324
+ const D = new MutationObserver((M) => {
1325
1325
  let P = !1;
1326
- for (const T of I)
1327
- if (T.type === "childList") {
1328
- let S = !1;
1329
- if (T.addedNodes.forEach((L) => {
1330
- if (L.nodeType === Node.ELEMENT_NODE) {
1331
- const R = L;
1332
- (R.classList?.contains("rte-select-host") || R.querySelector?.(".rte-select-host")) && (S = !0);
1326
+ for (const N of M)
1327
+ if (N.type === "childList") {
1328
+ let T = !1;
1329
+ if (N.addedNodes.forEach((_) => {
1330
+ if (_.nodeType === Node.ELEMENT_NODE) {
1331
+ const R = _;
1332
+ (R.classList?.contains("rte-select-host") || R.querySelector?.(".rte-select-host")) && (T = !0);
1333
1333
  }
1334
- }), T.removedNodes.forEach((L) => {
1335
- if (L.nodeType === Node.ELEMENT_NODE) {
1336
- const R = L;
1337
- (R.classList?.contains("rte-select-host") || R.querySelector?.(".rte-select-host")) && (S = !0);
1334
+ }), N.removedNodes.forEach((_) => {
1335
+ if (_.nodeType === Node.ELEMENT_NODE) {
1336
+ const R = _;
1337
+ (R.classList?.contains("rte-select-host") || R.querySelector?.(".rte-select-host")) && (T = !0);
1338
1338
  }
1339
- }), S) {
1339
+ }), T) {
1340
1340
  P = !0;
1341
1341
  break;
1342
1342
  }
@@ -1344,152 +1344,152 @@ const bn = ({ host: t, onChange: g }) => {
1344
1344
  P && v();
1345
1345
  });
1346
1346
  return D.observe(c, { childList: !0, subtree: !0 }), () => D.disconnect();
1347
- }, [t]), g;
1347
+ }, [t]), h;
1348
1348
  }, Oe = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1349
- function wn(t, g, u, c, v, D = {}, I, P) {
1349
+ function wn(t, h, u, c, v, D = {}, M, P) {
1350
1350
  if (!t.current) return;
1351
- const T = /[;;,,。.!!??::、]/, S = (e) => {
1351
+ const N = /[;;,,。.!!??::、]/, T = (e) => {
1352
1352
  const n = (e ?? "").trim();
1353
- return n.length === 1 && T.test(n);
1354
- }, L = (e) => {
1355
- const n = e ?? "", r = n.match(new RegExp(`^\\s*(${T.source})`));
1353
+ return n.length === 1 && N.test(n);
1354
+ }, _ = (e) => {
1355
+ const n = e ?? "", r = n.match(new RegExp(`^\\s*(${N.source})`));
1356
1356
  if (!r) return null;
1357
- const i = r[1], p = n.replace(new RegExp(`^\\s*${T.source}`), "");
1358
- return { punct: i, rest: p };
1357
+ const i = r[1], x = n.replace(new RegExp(`^\\s*${N.source}`), "");
1358
+ return { punct: i, rest: x };
1359
1359
  }, R = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, $ = [];
1360
- let A = 0;
1361
- for (; A < g.length; ) {
1362
- const e = g[A], n = A + 1 < g.length ? g[A + 1] : null;
1360
+ let L = 0;
1361
+ for (; L < h.length; ) {
1362
+ const e = h[L], n = L + 1 < h.length ? h[L + 1] : null;
1363
1363
  let r = !1;
1364
1364
  if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && n) {
1365
- 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;
1366
- if (K) {
1365
+ const W = 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;
1366
+ if (W) {
1367
1367
  const a = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", V = `<span ${a} class="exclusion-wrapper required-upload-group">`, w = "</span>";
1368
- let W = "";
1369
- e.className ? W = `<span class="${e.className}">${e.text ?? ""}</span>` : W = e.text ?? "";
1370
- const z = n, d = u[z.key] !== null && u[z.key] !== void 0, f = d ? u[z.key] : null, m = d ? u[z.key]?.name : z.text, h = d ? "" : "hidden", E = z.tooltip && !d ? "" : "hidden", Y = d ? "has-file" : "", U = d && m ? ` data-file-name="${m.replace(/"/g, "&quot;")}"` : "";
1368
+ let U = "";
1369
+ e.className ? U = `<span class="${e.className}">${e.text ?? ""}</span>` : U = e.text ?? "";
1370
+ const z = n, d = u[z.key] !== null && u[z.key] !== void 0, p = d ? u[z.key] : null, f = d ? u[z.key]?.name : z.text, y = d ? "" : "hidden", E = z.tooltip && !d ? "" : "hidden", Y = d ? "has-file" : "", K = d && f ? ` data-file-name="${f.replace(/"/g, "&quot;")}"` : "";
1371
1371
  let Z = "";
1372
- d && f ? f.type?.startsWith("image/") ? Z = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(f)}" alt="preview" />` : Z = "<i class='iconfont icon-exlwenjian'></i>" : Z = "<i class='iconfont icon-shangchuan1'></i>";
1373
- const J = (z.text || "").trim(), fe = d && J.length >= 12 ? `<span ${a} contenteditable="false" class="exclusion-wrapper upload-hint">${J}</span>` : "", de = `<span contenteditable="false" data-type="upload" data-key="${z.key}" class="upload-chip"><span class="upload-inner-wrapper ${Y}"><span class="upload-icon">${Z}</span><span class="upload-label"${U}>${m || z.text}</span>${z.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${E}" data-upload-key="${z.key}" data-tooltip="${z.tooltip}"></i>` : ""}<span class="file-remove-btn ${h}" title="移除文件">×</span></span></span>`;
1374
- $.push(V + W + de + w + fe), A += 2;
1372
+ d && p ? p.type?.startsWith("image/") ? Z = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(p)}" alt="preview" />` : Z = "<i class='iconfont icon-exlwenjian'></i>" : Z = "<i class='iconfont icon-shangchuan1'></i>";
1373
+ const J = (z.text || "").trim(), fe = d && J.length >= 12 ? `<span ${a} contenteditable="false" class="exclusion-wrapper upload-hint">${J}</span>` : "", de = `<span contenteditable="false" data-type="upload" data-key="${z.key}" class="upload-chip"><span class="upload-inner-wrapper ${Y}"><span class="upload-icon">${Z}</span><span class="upload-label"${K}>${f || z.text}</span>${z.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${E}" data-upload-key="${z.key}" data-tooltip="${z.tooltip}"></i>` : ""}<span class="file-remove-btn ${y}" title="移除文件">×</span></span></span>`;
1374
+ $.push(V + U + de + w + fe), L += 2;
1375
1375
  continue;
1376
1376
  }
1377
1377
  if (X) {
1378
1378
  const V = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, w = "</span>";
1379
- let W = "";
1380
- e.className ? W = `<span class="${e.className}">${e.text ?? ""}</span>` : W = e.text ?? "";
1381
- const z = n, f = (z.key ? v[z.key] : void 0) || z.text || "", m = !f, h = m ? "​" : f, E = m ? "show-placeholder" : "", Y = z.exclusionGroup ? ` data-group="${z.exclusionGroup}"` : "", U = z.tooltip ? ` data-tooltip="${z.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${z.key || ""}"` : "", Z = z.tooltip && m ? "" : "hidden", J = `<span contenteditable="true" data-type="variable" data-key="${z.key}" data-placeholder="${z.placeholder || ""}"${Y}${U} class="variable-chip ${E}">${h}${z.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${Z}" data-variable-key="${z.key}" data-tooltip="${z.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1382
- $.push(V + W + J + w), A += 2;
1379
+ let U = "";
1380
+ e.className ? U = `<span class="${e.className}">${e.text ?? ""}</span>` : U = e.text ?? "";
1381
+ const z = n, p = (z.key ? v[z.key] : void 0) || z.text || "", f = !p, y = f ? "​" : p, E = f ? "show-placeholder" : "", Y = z.exclusionGroup ? ` data-group="${z.exclusionGroup}"` : "", K = z.tooltip ? ` data-tooltip="${z.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${z.key || ""}"` : "", Z = z.tooltip && f ? "" : "hidden", J = `<span contenteditable="true" data-type="variable" data-key="${z.key}" data-placeholder="${z.placeholder || ""}"${Y}${K} class="variable-chip ${E}">${y}${z.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${Z}" data-variable-key="${z.key}" data-tooltip="${z.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1382
+ $.push(V + U + J + w), L += 2;
1383
1383
  continue;
1384
1384
  }
1385
1385
  }
1386
- const p = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", q = e.exclusionGroup ? `<span ${p} class="exclusion-wrapper">` : "", G = e.exclusionGroup ? "</span>" : "";
1387
- let M = "";
1386
+ const x = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", q = e.exclusionGroup ? `<span ${x} class="exclusion-wrapper">` : "", O = e.exclusionGroup ? "</span>" : "";
1387
+ let C = "";
1388
1388
  if (e.type === "tag") {
1389
- const X = c || 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>', a = c ? ' data-locked="true"' : "", V = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1390
- M = `<span contenteditable="false" class="tag-node group"${a}${V}><span class="tag-label">${e.text}</span>${X}</span>`;
1389
+ const X = c || M === "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>', a = c ? ' data-locked="true"' : "", V = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1390
+ C = `<span contenteditable="false" class="tag-node group"${a}${V}><span class="tag-label">${e.text}</span>${X}</span>`;
1391
1391
  } else if (e.type === "text") {
1392
- const K = c ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', a = (e.text ?? "").replace(/\n/g, "<br/>");
1393
- e.className ? M = `<span data-type="text" class="${e.className}"${K}>${a}</span>` : M = c ? `<span data-type="text"${K}>${a}</span>` : `<span data-type="text" contenteditable="false">${a}</span>`;
1392
+ const W = c ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', a = (e.text ?? "").replace(/\n/g, "<br/>");
1393
+ e.className ? C = `<span data-type="text" class="${e.className}"${W}>${a}</span>` : C = c ? `<span data-type="text"${W}>${a}</span>` : `<span data-type="text" contenteditable="false">${a}</span>`;
1394
1394
  } else if (e.type === "variable" && e.key) {
1395
- const X = v[e.key] || e.text || "", a = !X, V = a ? "​" : X, w = a ? "show-placeholder" : "", W = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", z = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", d = e.tooltip && a ? "" : "hidden", f = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${W}${z} class="variable-chip ${w}">${V}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${d}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1396
- e.required ? M = `<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>${f}</span>` : M = f;
1395
+ const X = v[e.key] || e.text || "", a = !X, V = a ? "​" : X, w = a ? "show-placeholder" : "", U = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", z = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", d = e.tooltip && a ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${U}${z} class="variable-chip ${w}">${V}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${d}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1396
+ e.required ? C = `<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>${p}</span>` : C = p;
1397
1397
  } else if (e.type === "report-url" && e.key) {
1398
- const K = `${e.key}__url`, a = Object.prototype.hasOwnProperty.call(v, K) ? v[K] : void 0, V = v[e.key], w = a ?? V ?? e.text ?? "", W = !w, z = W ? "​" : w, d = W ? "show-placeholder" : "", f = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", m = e.tooltip ? ` data-tooltip="${Oe(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", h = e.tooltip && W ? "" : "hidden", E = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${Oe(e.placeholder || "")}"${f}${m} class="variable-chip rte-report-url ${d}">${z}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${h}" data-variable-key="${e.key}" data-tooltip="${Oe(e.tooltip)}" ></i>` : ""}</span>`;
1399
- e.required ? M = `<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>${E}</span>` : M = E;
1398
+ const W = `${e.key}__url`, a = Object.prototype.hasOwnProperty.call(v, W) ? v[W] : void 0, V = v[e.key], w = a ?? V ?? e.text ?? "", U = !w, z = U ? "​" : w, d = U ? "show-placeholder" : "", p = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", f = e.tooltip ? ` data-tooltip="${Oe(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", y = e.tooltip && U ? "" : "hidden", E = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${Oe(e.placeholder || "")}"${p}${f} class="variable-chip rte-report-url ${d}">${z}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${Oe(e.tooltip)}" ></i>` : ""}</span>`;
1399
+ e.required ? C = `<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>${E}</span>` : C = E;
1400
1400
  } else if (e.type === "upload" && e.key) {
1401
- const K = !!n && n.type === "text" && !n.className && !n.exclusionGroup && S(n.text), X = K ? (n.text ?? "").trim() : "", a = X ? R(X) : "";
1402
- if (K && (r = !0), typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
1403
- const w = e.minCount || 1, W = e.maxCount || 3;
1401
+ const W = !!n && n.type === "text" && !n.className && !n.exclusionGroup && T(n.text), X = W ? (n.text ?? "").trim() : "", a = X ? R(X) : "";
1402
+ if (W && (r = !0), typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
1403
+ const w = e.minCount || 1, U = e.maxCount || 3;
1404
1404
  let z = 0;
1405
- for (let m = 0; m < W; m++) {
1406
- const h = `${e.key}-${m}`;
1407
- u[h] != null && (z += 1);
1405
+ for (let f = 0; f < U; f++) {
1406
+ const y = `${e.key}-${f}`;
1407
+ u[y] != null && (z += 1);
1408
1408
  }
1409
1409
  const d = Math.min(
1410
- W,
1411
- Math.max(w, z + (z < W ? 1 : 0))
1410
+ U,
1411
+ Math.max(w, z + (z < U ? 1 : 0))
1412
1412
  );
1413
- let f = "";
1414
- for (let m = 0; m < d; m++) {
1415
- const h = `${e.key}-${m}`, E = u[h] !== null && u[h] !== void 0, Y = E ? u[h] : null, U = E ? u[h]?.name : e.text, Z = E ? "" : "hidden", J = e.tooltip && !E ? "" : "hidden", ue = E ? "has-file" : "", fe = E && U ? ` data-file-name="${U.replace(/"/g, "&quot;")}"` : "";
1413
+ let p = "";
1414
+ for (let f = 0; f < d; f++) {
1415
+ const y = `${e.key}-${f}`, E = u[y] !== null && u[y] !== void 0, Y = E ? u[y] : null, K = E ? u[y]?.name : e.text, Z = E ? "" : "hidden", J = e.tooltip && !E ? "" : "hidden", ue = E ? "has-file" : "", fe = E && K ? ` data-file-name="${K.replace(/"/g, "&quot;")}"` : "";
1416
1416
  let de = "";
1417
1417
  E && Y ? Y.type?.startsWith("image/") ? de = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(Y)}" alt="preview" />` : de = "<i class='iconfont icon-exlwenjian'></i>" : de = "<i class='iconfont icon-shangchuan1'></i>";
1418
- const be = ` data-batch-key="${e.key}"`, ne = ` data-batch-index="${m}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${h}"${be}${ne} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${ue}"><span class="upload-icon">${de}</span><span class="upload-label"${fe}>${U || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${J}" data-upload-key="${h}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${Z}" title="移除文件">×</span></span></span>`;
1419
- f += ye;
1418
+ const be = ` data-batch-key="${e.key}"`, ne = ` data-batch-index="${f}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${y}"${be}${ne} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${ue}"><span class="upload-icon">${de}</span><span class="upload-label"${fe}>${K || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${J}" data-upload-key="${y}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${Z}" title="移除文件">×</span></span></span>`;
1419
+ p += ye;
1420
1420
  }
1421
- e.required ? M = `<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">${f}${a}</span></span>` : M = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${f}${a}</span>`;
1421
+ e.required ? C = `<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">${p}${a}</span></span>` : C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${p}${a}</span>`;
1422
1422
  } else {
1423
- const w = u[e.key] !== null && u[e.key] !== void 0, W = w ? u[e.key] : null, z = w ? u[e.key]?.name : e.text, d = w ? "" : "hidden", f = e.tooltip && !w ? "" : "hidden", m = w ? "has-file" : "", h = w && z ? ` data-file-name="${z.replace(/"/g, "&quot;")}"` : "";
1423
+ const w = u[e.key] !== null && u[e.key] !== void 0, U = w ? u[e.key] : null, z = w ? u[e.key]?.name : e.text, d = w ? "" : "hidden", p = e.tooltip && !w ? "" : "hidden", f = w ? "has-file" : "", y = w && z ? ` data-file-name="${z.replace(/"/g, "&quot;")}"` : "";
1424
1424
  let E = "";
1425
- w && W ? W.type?.startsWith("image/") ? E = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(W)}" alt="preview" />` : E = "<i class='iconfont icon-exlwenjian'></i>" : E = "<i class='iconfont icon-shangchuan1'></i>";
1426
- const Y = (e.text || "").trim(), Z = w && e.showHint === !0 && Y.length >= 12 ? `<span ${p} contenteditable="false" class="exclusion-wrapper upload-hint">${Y}</span>` : "", J = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${m}"><span class="upload-icon">${E}</span><span class="upload-label"${h}>${z || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${f}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${d}" title="移除文件">×</span></span></span>`;
1427
- e.required ? M = `<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>${J}${a}</span>${Z}` : M = J + a + Z;
1425
+ w && U ? U.type?.startsWith("image/") ? E = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(U)}" alt="preview" />` : E = "<i class='iconfont icon-exlwenjian'></i>" : E = "<i class='iconfont icon-shangchuan1'></i>";
1426
+ const Y = (e.text || "").trim(), Z = w && e.showHint === !0 && Y.length >= 12 ? `<span ${x} contenteditable="false" class="exclusion-wrapper upload-hint">${Y}</span>` : "", J = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${f}"><span class="upload-icon">${E}</span><span class="upload-label"${y}>${z || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${p}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${d}" title="移除文件">×</span></span></span>`;
1427
+ e.required ? C = `<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>${J}${a}</span>${Z}` : C = J + a + Z;
1428
1428
  }
1429
1429
  } else if (e.type === "select" && e.key) {
1430
- const K = v[e.key] || e.defaultValue || "", X = encodeURIComponent(JSON.stringify(e.options || [])), a = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", w = e.required ? ' data-required="true"' : "", W = `<div data-type="select" data-key="${e.key}" data-value="${K}" data-options="${X}"${a}${V}${w} class="rte-select-host"></div>`;
1431
- e.required ? M = `<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>${W}</span>` : M = W;
1430
+ const W = v[e.key] || e.defaultValue || "", X = encodeURIComponent(JSON.stringify(e.options || [])), a = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", w = e.required ? ' data-required="true"' : "", U = `<div data-type="select" data-key="${e.key}" data-value="${W}" data-options="${X}"${a}${V}${w} class="rte-select-host"></div>`;
1431
+ e.required ? C = `<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>${U}</span>` : C = U;
1432
1432
  } else if (e.type === "textarea" && e.key) {
1433
- const K = v[e.key] || "", X = typeof e.maxHeight == "number" ? e.maxHeight : 252, a = e.placeholder ? ` placeholder="${e.placeholder}"` : "", V = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${X}px;"${a}>${K}</textarea>`, w = `<div class="rte-textarea-wrapper" data-key="${e.key}">${V}</div>`;
1434
- e.required ? M = `<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>${w}</span>` : M = w;
1433
+ const W = v[e.key] || "", X = typeof e.maxHeight == "number" ? e.maxHeight : 252, a = e.placeholder ? ` placeholder="${e.placeholder}"` : "", V = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${X}px;"${a}>${W}</textarea>`, w = `<div class="rte-textarea-wrapper" data-key="${e.key}">${V}</div>`;
1434
+ e.required ? C = `<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>${w}</span>` : C = w;
1435
1435
  } else if (e.type === "richtext" && e.key) {
1436
- const K = v[e.key] || e.text || "", X = typeof e.minHeight == "number" ? e.minHeight : 40, a = typeof e.maxHeight == "number" ? e.maxHeight : 160, V = Math.max(a, X), w = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", W = e.expandable !== !1, z = K, d = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${w} style="min-height:${X}px;max-height:${V}px;overflow:auto;">${z}</div>`, f = W ? `<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${W ? " rte-richtext-toggleable" : ""}" data-key="${e.key}">${d}${f}</div>`, h = `<div class="rte-richtext-container" data-key="${e.key}">${m}</div>`;
1437
- e.required ? M = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${h}</div>` : M = h;
1436
+ const W = v[e.key] || e.text || "", X = typeof e.minHeight == "number" ? e.minHeight : 40, a = typeof e.maxHeight == "number" ? e.maxHeight : 160, V = Math.max(a, X), w = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", U = e.expandable !== !1, z = W, d = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${w} style="min-height:${X}px;max-height:${V}px;overflow:auto;">${z}</div>`, p = U ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>` : "", f = `<div class="rte-richtext-wrapper${U ? " rte-richtext-toggleable" : ""}" data-key="${e.key}">${d}${p}</div>`, y = `<div class="rte-richtext-container" data-key="${e.key}">${f}</div>`;
1437
+ e.required ? C = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${y}</div>` : C = y;
1438
1438
  } else if (e.type === "report-module" && e.key) {
1439
- const K = typeof e.moduleIndex == "number" ? e.moduleIndex : 0, X = `${e.key}__module_${K}`, V = Object.prototype.hasOwnProperty.call(v, X) ? v[X] : e.text || "", w = typeof e.minHeight == "number" ? e.minHeight : 80, W = typeof e.maxHeight == "number" ? e.maxHeight : 240, z = Math.max(W, w), d = e.placeholder ? ` data-placeholder="${Oe(e.placeholder)}"` : "", f = V, 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"${d} style="min-height:${w}px;max-height:${z}px;overflow:auto;">${f}</div>`, h = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${m}</div>`, E = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${h}</div>`;
1440
- e.required ? M = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${E}</div>` : M = E;
1439
+ const W = typeof e.moduleIndex == "number" ? e.moduleIndex : 0, X = `${e.key}__module_${W}`, V = Object.prototype.hasOwnProperty.call(v, X) ? v[X] : e.text || "", w = typeof e.minHeight == "number" ? e.minHeight : 80, U = typeof e.maxHeight == "number" ? e.maxHeight : 240, z = Math.max(U, w), d = e.placeholder ? ` data-placeholder="${Oe(e.placeholder)}"` : "", p = V, f = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${W}" class="rte-richtext rte-report-module"${d} style="min-height:${w}px;max-height:${z}px;overflow:auto;">${p}</div>`, y = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${f}</div>`, E = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${y}</div>`;
1440
+ e.required ? C = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${E}</div>` : C = E;
1441
1441
  } else if (e.type === "datepicker" && e.key) {
1442
- const K = v[e.key] || "", X = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", a = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", V = e.disableFuture ? ' data-disable-future="true"' : "", w = `<div data-type="datepicker" data-key="${e.key}" data-value="${K}" class="rte-datepicker-host"${X}${a}${V}></div>`;
1443
- e.required ? M = `<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>${w}</span>` : M = w;
1442
+ const W = v[e.key] || "", X = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", a = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", V = e.disableFuture ? ' data-disable-future="true"' : "", w = `<div data-type="datepicker" data-key="${e.key}" data-value="${W}" class="rte-datepicker-host"${X}${a}${V}></div>`;
1443
+ e.required ? C = `<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>${w}</span>` : C = w;
1444
1444
  } else if (e.type === "number-input" && e.key) {
1445
- const K = v[e.key] || "", X = typeof e.min == "number" ? ` min="${e.min}"` : "", a = typeof e.max == "number" ? ` max="${e.max}"` : "", V = e.placeholder ? ` placeholder="${e.placeholder}"` : "", w = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", W = ' step="1"', z = K || e.placeholder || "";
1445
+ const W = v[e.key] || "", X = typeof e.min == "number" ? ` min="${e.min}"` : "", a = typeof e.max == "number" ? ` max="${e.max}"` : "", V = e.placeholder ? ` placeholder="${e.placeholder}"` : "", w = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", U = ' step="1"', z = W || e.placeholder || "";
1446
1446
  let d = 0;
1447
- for (let h = 0; h < z.length; h++) {
1448
- const E = z.charCodeAt(h);
1447
+ for (let y = 0; y < z.length; y++) {
1448
+ const E = z.charCodeAt(y);
1449
1449
  E > 19968 || E >= 65280 && E <= 65519 ? d += 16 : d += 8;
1450
1450
  }
1451
- const f = Math.max(60, Math.min(600, d + 32)), m = `<input type="number" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${K}" style="width: ${f}px;"${X}${a}${W}${V}${w} />`;
1452
- e.required ? M = `<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>${m}</span>` : M = m;
1451
+ const p = Math.max(60, Math.min(600, d + 32)), f = `<input type="number" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${W}" style="width: ${p}px;"${X}${a}${U}${V}${w} />`;
1452
+ e.required ? C = `<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>${f}</span>` : C = f;
1453
1453
  } else if (e.type === "multi-variable" && e.key) {
1454
- const K = e.maxCount || 9, X = D[e.key] || 1, a = Math.min(X, K);
1454
+ const W = e.maxCount || 9, X = D[e.key] || 1, a = Math.min(X, W);
1455
1455
  if (e.required) {
1456
1456
  const V = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, w = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1457
- let W = "";
1457
+ let U = "";
1458
1458
  for (let z = 0; z < a; z++) {
1459
- const d = `${e.key}_${z}`, f = v[d] || "", m = !f, h = m ? "​" : f, E = m ? "show-placeholder" : "", Y = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", U = e.tooltip && m ? "" : "hidden", Z = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", J = `<span contenteditable="true" data-type="variable" data-key="${d}" data-multi-key="${e.key}" data-index="${z}" data-placeholder="${e.placeholder || ""}"${Z}${Y} class="variable-chip ${E}">${h}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${U}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1460
- z === 0 ? W += `<span ${w} class="exclusion-wrapper required-upload-group required-multi-first">${V}${J}</span>` : W += J;
1459
+ const d = `${e.key}_${z}`, p = v[d] || "", f = !p, y = f ? "​" : p, E = f ? "show-placeholder" : "", Y = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", K = e.tooltip && f ? "" : "hidden", Z = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", J = `<span contenteditable="true" data-type="variable" data-key="${d}" data-multi-key="${e.key}" data-index="${z}" data-placeholder="${e.placeholder || ""}"${Z}${Y} class="variable-chip ${E}">${y}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${K}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1460
+ z === 0 ? U += `<span ${w} class="exclusion-wrapper required-upload-group required-multi-first">${V}${J}</span>` : U += J;
1461
1461
  }
1462
- M = W;
1462
+ C = U;
1463
1463
  } else {
1464
1464
  let V = "";
1465
1465
  for (let w = 0; w < a; w++) {
1466
- const W = `${e.key}_${w}`, z = v[W] || "", d = !z, f = d ? "​" : z, m = d ? "show-placeholder" : "", h = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", E = e.tooltip && d ? "" : "hidden", Y = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", U = `<span contenteditable="true" data-type="variable" data-key="${W}" data-multi-key="${e.key}" data-index="${w}" data-placeholder="${e.placeholder || ""}"${Y}${h} class="variable-chip ${m}">${f}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${E}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1467
- V += U;
1466
+ const U = `${e.key}_${w}`, z = v[U] || "", d = !z, p = d ? "​" : z, f = d ? "show-placeholder" : "", y = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", E = e.tooltip && d ? "" : "hidden", Y = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", K = `<span contenteditable="true" data-type="variable" data-key="${U}" data-multi-key="${e.key}" data-index="${w}" data-placeholder="${e.placeholder || ""}"${Y}${y} class="variable-chip ${f}">${p}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${E}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1467
+ V += K;
1468
1468
  }
1469
- M = V;
1469
+ C = V;
1470
1470
  }
1471
1471
  }
1472
- const Q = q + M + G;
1472
+ const Q = q + C + O;
1473
1473
  if (e.type === "text" && !e.className && !e.exclusionGroup) {
1474
- if (S(e.text) && $.length > 0) {
1474
+ if (T(e.text) && $.length > 0) {
1475
1475
  const X = $[$.length - 1], a = (e.text ?? "").trim();
1476
- $[$.length - 1] = `<span class="rte-inline-group">${X}${R(a)}</span>`, A++;
1476
+ $[$.length - 1] = `<span class="rte-inline-group">${X}${R(a)}</span>`, L++;
1477
1477
  continue;
1478
1478
  }
1479
- const K = L(e.text);
1480
- if (K && $.length > 0) {
1479
+ const W = _(e.text);
1480
+ if (W && $.length > 0) {
1481
1481
  const X = $[$.length - 1];
1482
- $[$.length - 1] = `<span class="rte-inline-group">${X}${R(K.punct)}</span>`;
1483
- const a = K.rest;
1482
+ $[$.length - 1] = `<span class="rte-inline-group">${X}${R(W.punct)}</span>`;
1483
+ const a = W.rest;
1484
1484
  if (a) {
1485
1485
  const V = a.replace(/\n/g, "<br/>");
1486
1486
  $.push(`<span data-type="text" contenteditable="false">${V}</span>`);
1487
1487
  }
1488
- A++;
1488
+ L++;
1489
1489
  continue;
1490
1490
  }
1491
1491
  }
1492
- $.push(Q), A += r ? 2 : 1;
1492
+ $.push(Q), L += r ? 2 : 1;
1493
1493
  }
1494
1494
  t.current && (t.current.innerHTML = $.join(""), setTimeout(() => {
1495
1495
  if (!t.current) return;
@@ -1499,67 +1499,73 @@ function wn(t, g, u, c, v, D = {}, I, P) {
1499
1499
  });
1500
1500
  }, 0));
1501
1501
  }
1502
- function kn(t, g, u, c, v = {}, D, I, P, T) {
1503
- const S = ie(() => {
1502
+ function kn(t, h, u, c, v = {}, D, M, P, N) {
1503
+ const T = ie(() => {
1504
1504
  if (!t.current) return;
1505
- if (g.length === 0) {
1505
+ if (h.length === 0) {
1506
1506
  t.current.innerHTML = "";
1507
1507
  return;
1508
1508
  }
1509
- let L = {};
1509
+ let _ = {};
1510
1510
  const $ = t.current.__tempVariableValues;
1511
- if ($ ? (L = $, setTimeout(() => {
1511
+ if ($ ? (_ = $, setTimeout(() => {
1512
1512
  if (t.current) {
1513
- const A = t.current;
1514
- A.__tempVariableValues === $ && delete A.__tempVariableValues;
1513
+ const L = t.current;
1514
+ L.__tempVariableValues === $ && delete L.__tempVariableValues;
1515
+ }
1516
+ }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((q) => {
1517
+ const O = q.dataset.key;
1518
+ if (O) {
1519
+ const C = q.innerText.replace(/[\u200B\n]/g, "").trim();
1520
+ C && (q.getAttribute("data-node-type") === "report-url" ? _[`${O}__url`] = C : _[O] = C);
1515
1521
  }
1516
- }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((p) => {
1517
- const q = p.dataset.key;
1518
- if (q) {
1519
- const G = p.innerText.replace(/[\u200B\n]/g, "").trim();
1520
- G && (p.getAttribute("data-node-type") === "report-url" ? L[`${q}__url`] = G : L[q] = G);
1522
+ }), t.current.querySelectorAll('[data-type="select"]').forEach((q) => {
1523
+ const O = q.dataset.key;
1524
+ if (O) {
1525
+ const C = (q.getAttribute("data-value") || "").trim();
1526
+ C && (_[O] = C);
1521
1527
  }
1522
- }), t.current.querySelectorAll('[data-type="select"]').forEach((p) => {
1523
- const q = p.dataset.key;
1524
- if (q) {
1525
- const G = (p.getAttribute("data-value") || "").trim();
1526
- G && (L[q] = G);
1528
+ }), t.current.querySelectorAll('[data-type="textarea"]').forEach((q) => {
1529
+ const O = q.dataset.key;
1530
+ if (O) {
1531
+ const C = q.value.replace(/[\u200B]/g, "").trim();
1532
+ C && (_[O] = C);
1527
1533
  }
1528
- }), t.current.querySelectorAll('[data-type="textarea"]').forEach((p) => {
1529
- const q = p.dataset.key;
1530
- if (q) {
1531
- const G = p.value.replace(/[\u200B]/g, "").trim();
1532
- G && (L[q] = G);
1534
+ }), t.current.querySelectorAll('[data-type="richtext"]').forEach((q) => {
1535
+ const O = q.dataset.key;
1536
+ if (O) {
1537
+ const C = q.getAttribute("data-node-type") || "", Q = C === "report-module" ? (q.innerHTML || "").replace(/[\u200B]/g, "").trim() : (q.textContent || "").replace(/[\u200B]/g, "").trim();
1538
+ if (C === "report-module") {
1539
+ const W = Number.parseInt(q.getAttribute("data-module-index") || "0", 10);
1540
+ _[`${O}__module_${Number.isFinite(W) ? W : 0}`] = Q;
1541
+ } else Q && (_[O] = Q);
1533
1542
  }
1534
- }), t.current.querySelectorAll('[data-type="richtext"]').forEach((p) => {
1535
- const q = p.dataset.key;
1536
- if (q) {
1537
- const G = p.getAttribute("data-node-type") || "", M = G === "report-module" ? (p.innerHTML || "").replace(/[\u200B]/g, "").trim() : (p.textContent || "").replace(/[\u200B]/g, "").trim();
1538
- if (G === "report-module") {
1539
- const Q = Number.parseInt(p.getAttribute("data-module-index") || "0", 10);
1540
- L[`${q}__module_${Number.isFinite(Q) ? Q : 0}`] = M;
1541
- } else M && (L[q] = M);
1543
+ }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((q) => {
1544
+ const O = q.dataset.key;
1545
+ if (O) {
1546
+ const C = (q.getAttribute("data-value") || "").trim();
1547
+ C && (_[O] = C);
1542
1548
  }
1543
- }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((p) => {
1544
- const q = p.dataset.key;
1545
- if (q) {
1546
- const G = (p.getAttribute("data-value") || "").trim();
1547
- G && (L[q] = G);
1549
+ }), t.current.querySelectorAll('[data-type="number-input"]').forEach((q) => {
1550
+ const O = q.dataset.key;
1551
+ if (O) {
1552
+ const C = (q.value || "").trim();
1553
+ C && (_[O] = C);
1548
1554
  }
1549
1555
  })), wn(
1550
1556
  t,
1551
- g,
1557
+ h,
1552
1558
  u,
1553
1559
  c,
1554
- L,
1560
+ _,
1555
1561
  v,
1556
1562
  P
1557
1563
  ), D?.current) {
1558
- const { key: A, offset: e } = D.current;
1564
+ const { key: L, offset: e } = D.current;
1559
1565
  setTimeout(() => {
1560
1566
  if (!t.current) return;
1561
1567
  const n = t.current.querySelector(
1562
- `[data-type="variable"][data-key="${A}"]`
1568
+ `[data-type="variable"][data-key="${L}"]`
1563
1569
  );
1564
1570
  if (n) {
1565
1571
  try {
@@ -1568,23 +1574,23 @@ function kn(t, g, u, c, v = {}, D, I, P, T) {
1568
1574
  NodeFilter.SHOW_TEXT,
1569
1575
  null
1570
1576
  );
1571
- let p = 0, q = null, G = 0;
1577
+ let x = 0, q = null, O = 0;
1572
1578
  for (; i.nextNode(); ) {
1573
- const M = i.currentNode, Q = M.textContent?.length || 0;
1574
- if (p + Q >= e) {
1575
- q = M, G = e - p;
1579
+ const C = i.currentNode, Q = C.textContent?.length || 0;
1580
+ if (x + Q >= e) {
1581
+ q = C, O = e - x;
1576
1582
  break;
1577
1583
  }
1578
- p += Q;
1584
+ x += Q;
1579
1585
  }
1580
1586
  if (q) {
1581
- r.setStart(q, Math.min(G, q.textContent?.length || 0)), r.collapse(!0);
1582
- const M = window.getSelection();
1583
- M && (M.removeAllRanges(), M.addRange(r), n.focus());
1587
+ r.setStart(q, Math.min(O, q.textContent?.length || 0)), r.collapse(!0);
1588
+ const C = window.getSelection();
1589
+ C && (C.removeAllRanges(), C.addRange(r), n.focus());
1584
1590
  } else {
1585
1591
  r.selectNodeContents(n), r.collapse(!1);
1586
- const M = window.getSelection();
1587
- M && (M.removeAllRanges(), M.addRange(r), n.focus());
1592
+ const C = window.getSelection();
1593
+ C && (C.removeAllRanges(), C.addRange(r), n.focus());
1588
1594
  }
1589
1595
  } catch {
1590
1596
  const r = document.createRange();
@@ -1596,119 +1602,119 @@ function kn(t, g, u, c, v = {}, D, I, P, T) {
1596
1602
  }
1597
1603
  }, 0);
1598
1604
  }
1599
- }, [g, u, c, t, v, D, I, P, T]);
1605
+ }, [h, u, c, t, v, D, M, P, N]);
1600
1606
  pe(() => {
1601
- S();
1602
- }, [S]);
1607
+ T();
1608
+ }, [T]);
1603
1609
  }
1604
- function $n(t, g, u, c) {
1610
+ function $n(t, h, u, c) {
1605
1611
  pe(() => {
1606
1612
  const v = t.current;
1607
1613
  if (!v) return;
1608
- const D = (T) => T.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(T.name || ""), I = (T) => {
1609
- const S = T.target?.closest(".upload-info-icon");
1610
- if (S && S.classList.contains("upload-info-icon")) {
1611
- const R = S.dataset.uploadKey;
1614
+ const D = (N) => N.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(N.name || ""), M = (N) => {
1615
+ const T = N.target?.closest(".upload-info-icon");
1616
+ if (T && T.classList.contains("upload-info-icon")) {
1617
+ const R = T.dataset.uploadKey;
1612
1618
  if (R) {
1613
- const $ = S.closest('[data-type="upload"]');
1614
- c($ ? { key: R, anchorEl: $, type: "upload" } : { key: R, anchorEl: S, type: "upload" });
1619
+ const $ = T.closest('[data-type="upload"]');
1620
+ c($ ? { key: R, anchorEl: $, type: "upload" } : { key: R, anchorEl: T, type: "upload" });
1615
1621
  }
1616
1622
  return;
1617
1623
  }
1618
- const L = T.target?.closest('[data-type="upload"]');
1619
- if (L) {
1620
- const R = L.dataset.key;
1624
+ const _ = N.target?.closest('[data-type="upload"]');
1625
+ if (_) {
1626
+ const R = _.dataset.key;
1621
1627
  if (R) {
1622
1628
  const $ = u[R];
1623
- $ && D($) && c({ key: R, anchorEl: L, type: "upload-preview" });
1629
+ $ && D($) && c({ key: R, anchorEl: _, type: "upload-preview" });
1624
1630
  }
1625
1631
  }
1626
- }, P = (T) => {
1627
- const S = T.target?.closest(".upload-info-icon"), L = T.relatedTarget;
1628
- if (S && S.classList.contains("upload-info-icon")) {
1629
- const $ = S.closest('[data-type="upload"]');
1630
- if (L && $ && $.contains(L))
1632
+ }, P = (N) => {
1633
+ const T = N.target?.closest(".upload-info-icon"), _ = N.relatedTarget;
1634
+ if (T && T.classList.contains("upload-info-icon")) {
1635
+ const $ = T.closest('[data-type="upload"]');
1636
+ if (_ && $ && $.contains(_))
1631
1637
  return;
1632
- if (!L || !v.contains(L))
1638
+ if (!_ || !v.contains(_))
1633
1639
  c(null);
1634
1640
  else {
1635
- const A = L.closest('[data-type="upload"]');
1636
- (!A || A !== $) && c(null);
1641
+ const L = _.closest('[data-type="upload"]');
1642
+ (!L || L !== $) && c(null);
1637
1643
  }
1638
1644
  return;
1639
1645
  }
1640
- const R = T.target?.closest('[data-type="upload"]');
1646
+ const R = N.target?.closest('[data-type="upload"]');
1641
1647
  if (R) {
1642
- const $ = L;
1648
+ const $ = _;
1643
1649
  if ($ && R.contains($))
1644
1650
  return;
1645
1651
  c(null);
1646
1652
  }
1647
1653
  };
1648
- return v.addEventListener("mouseover", I, !0), v.addEventListener("mouseout", P, !0), () => {
1649
- v.removeEventListener("mouseover", I, !0), v.removeEventListener("mouseout", P, !0);
1654
+ return v.addEventListener("mouseover", M, !0), v.addEventListener("mouseout", P, !0), () => {
1655
+ v.removeEventListener("mouseover", M, !0), v.removeEventListener("mouseout", P, !0);
1650
1656
  };
1651
- }, [g, u, t, c]);
1657
+ }, [h, u, t, c]);
1652
1658
  }
1653
- function En(t, g, u, c) {
1659
+ function En(t, h, u, c) {
1654
1660
  pe(() => {
1655
1661
  if (!t.current) return;
1656
- const v = (T) => {
1662
+ const v = (N) => {
1657
1663
  if (c === "hideTagClose")
1658
1664
  return;
1659
- const S = T.currentTarget, L = S.dataset.tooltip, R = S.dataset.tagKey || "";
1660
- L && u({ key: R, anchorEl: S, type: "tag" });
1665
+ const T = N.currentTarget, _ = T.dataset.tooltip, R = T.dataset.tagKey || "";
1666
+ _ && u({ key: R, anchorEl: T, type: "tag" });
1661
1667
  }, D = () => {
1662
1668
  u(null);
1663
1669
  };
1664
- let I;
1670
+ let M;
1665
1671
  const P = () => {
1666
1672
  if (!t.current) return;
1667
1673
  t.current.querySelectorAll(
1668
1674
  ".tag-node[data-tooltip]"
1669
- ).forEach((S) => {
1670
- S.addEventListener("mouseenter", v), S.addEventListener("mouseleave", D);
1675
+ ).forEach((T) => {
1676
+ T.addEventListener("mouseenter", v), T.addEventListener("mouseleave", D);
1671
1677
  });
1672
1678
  };
1673
- return I = requestAnimationFrame(() => {
1674
- I = requestAnimationFrame(P);
1679
+ return M = requestAnimationFrame(() => {
1680
+ M = requestAnimationFrame(P);
1675
1681
  }), () => {
1676
- cancelAnimationFrame(I), t.current && t.current.querySelectorAll(
1682
+ cancelAnimationFrame(M), t.current && t.current.querySelectorAll(
1677
1683
  ".tag-node[data-tooltip]"
1678
- ).forEach((S) => {
1679
- S.removeEventListener("mouseenter", v), S.removeEventListener("mouseleave", D);
1684
+ ).forEach((T) => {
1685
+ T.removeEventListener("mouseenter", v), T.removeEventListener("mouseleave", D);
1680
1686
  });
1681
1687
  };
1682
- }, [g, t, u, c]);
1688
+ }, [h, t, u, c]);
1683
1689
  }
1684
- function Cn(t, g, u) {
1690
+ function Cn(t, h, u) {
1685
1691
  pe(() => {
1686
1692
  const c = t.current;
1687
1693
  if (!c) return;
1688
- const v = (I) => {
1689
- const P = I.target?.closest(".variable-info-icon");
1694
+ const v = (M) => {
1695
+ const P = M.target?.closest(".variable-info-icon");
1690
1696
  if (P && P.classList.contains("variable-info-icon")) {
1691
- const S = P.dataset.variableKey;
1692
- S && u({ key: S, anchorEl: P, type: "variable" });
1697
+ const T = P.dataset.variableKey;
1698
+ T && u({ key: T, anchorEl: P, type: "variable" });
1693
1699
  return;
1694
1700
  }
1695
- const T = I.target?.closest(
1701
+ const N = M.target?.closest(
1696
1702
  '[data-type="variable"][data-node-type="report-url"][data-tooltip]'
1697
1703
  );
1698
- if (T) {
1699
- const S = T.dataset.key;
1700
- S && u({ key: S, anchorEl: T, type: "variable" });
1704
+ if (N) {
1705
+ const T = N.dataset.key;
1706
+ T && u({ key: T, anchorEl: N, type: "variable" });
1701
1707
  }
1702
- }, D = (I) => {
1703
- const P = I.target, T = I.relatedTarget, S = P?.closest?.(".variable-info-icon"), L = P?.closest?.(
1708
+ }, D = (M) => {
1709
+ const P = M.target, N = M.relatedTarget, T = P?.closest?.(".variable-info-icon"), _ = P?.closest?.(
1704
1710
  '[data-type="variable"][data-node-type="report-url"][data-tooltip]'
1705
1711
  );
1706
- if (S || L) {
1707
- if (!T || !c.contains(T)) {
1712
+ if (T || _) {
1713
+ if (!N || !c.contains(N)) {
1708
1714
  u(null);
1709
1715
  return;
1710
1716
  }
1711
- const R = !!T.closest?.(".variable-info-icon"), $ = !!T.closest?.(
1717
+ const R = !!N.closest?.(".variable-info-icon"), $ = !!N.closest?.(
1712
1718
  '[data-type="variable"][data-node-type="report-url"][data-tooltip]'
1713
1719
  );
1714
1720
  !R && !$ && u(null);
@@ -1717,101 +1723,101 @@ function Cn(t, g, u) {
1717
1723
  return c.addEventListener("mouseover", v, !0), c.addEventListener("mouseout", D, !0), () => {
1718
1724
  c.removeEventListener("mouseover", v, !0), c.removeEventListener("mouseout", D, !0);
1719
1725
  };
1720
- }, [g, t, u]);
1726
+ }, [h, t, u]);
1721
1727
  }
1722
- function Sn(t, g, u, c) {
1728
+ function Sn(t, h, u, c) {
1723
1729
  pe(() => {
1724
1730
  if (!t.current) return;
1725
- const v = (S) => S.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(S.name || ""), D = (S) => {
1726
- const L = S.currentTarget, R = L.dataset.fileName, $ = L.closest('[data-type="upload"]'), A = $?.dataset.key || "", e = A ? u[A] : null;
1731
+ const v = (T) => T.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(T.name || ""), D = (T) => {
1732
+ const _ = T.currentTarget, R = _.dataset.fileName, $ = _.closest('[data-type="upload"]'), L = $?.dataset.key || "", e = L ? u[L] : null;
1727
1733
  if (e && v(e)) {
1728
- c({ key: A, anchorEl: $ || L, type: "upload-preview" });
1734
+ c({ key: L, anchorEl: $ || _, type: "upload-preview" });
1729
1735
  return;
1730
1736
  }
1731
- R && c({ key: A, anchorEl: $ || L, type: "upload-label" });
1732
- }, I = () => {
1737
+ R && c({ key: L, anchorEl: $ || _, type: "upload-label" });
1738
+ }, M = () => {
1733
1739
  c(null);
1734
1740
  };
1735
1741
  let P;
1736
- const T = () => {
1742
+ const N = () => {
1737
1743
  if (!t.current) return;
1738
1744
  t.current.querySelectorAll(
1739
1745
  ".upload-label[data-file-name]"
1740
- ).forEach((L) => {
1741
- L.addEventListener("mouseenter", D), L.addEventListener("mouseleave", I);
1746
+ ).forEach((_) => {
1747
+ _.addEventListener("mouseenter", D), _.addEventListener("mouseleave", M);
1742
1748
  });
1743
1749
  };
1744
1750
  return P = requestAnimationFrame(() => {
1745
- P = requestAnimationFrame(T);
1751
+ P = requestAnimationFrame(N);
1746
1752
  }), () => {
1747
1753
  cancelAnimationFrame(P), t.current && t.current.querySelectorAll(
1748
1754
  ".upload-label[data-file-name]"
1749
- ).forEach((L) => {
1750
- L.removeEventListener("mouseenter", D), L.removeEventListener("mouseleave", I);
1755
+ ).forEach((_) => {
1756
+ _.removeEventListener("mouseenter", D), _.removeEventListener("mouseleave", M);
1751
1757
  });
1752
1758
  };
1753
- }, [g, u, t, c]);
1759
+ }, [h, u, t, c]);
1754
1760
  }
1755
- function Tn(t, g, u, c) {
1761
+ function Tn(t, h, u, c) {
1756
1762
  pe(() => {
1757
1763
  const v = setTimeout(() => {
1758
- et(t, g, u), tt(t, g, u, c);
1764
+ et(t, h, u), tt(t, h, u, c);
1759
1765
  }, 0);
1760
1766
  return () => clearTimeout(v);
1761
- }, [u, g, t, c]);
1767
+ }, [u, h, t, c]);
1762
1768
  }
1763
- function qn(t, g) {
1769
+ function qn(t, h) {
1764
1770
  const u = ae(0), c = ae(0);
1765
1771
  pe(() => {
1766
1772
  if (!t.current) return;
1767
1773
  let v = !1, D = 0;
1768
- const I = (p) => p instanceof HTMLElement ? !!(p.closest(".rte-datepicker-wrapper") || p.closest(".rte-datepicker-host") || p.closest(".ant-picker") || p.closest(".ant-picker-dropdown")) : !1, P = (p) => p instanceof HTMLElement ? !!(p.closest(".rte-select-wrapper") || p.closest(".rte-select-host") || p.closest(".ant-select") || p.closest(".ant-select-dropdown")) : !1, T = (p) => {
1769
- v = !0, I(p.target) && (u.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), P(p.target) && (c.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
1770
- }, S = () => {
1774
+ const M = (x) => x instanceof HTMLElement ? !!(x.closest(".rte-datepicker-wrapper") || x.closest(".rte-datepicker-host") || x.closest(".ant-picker") || x.closest(".ant-picker-dropdown")) : !1, P = (x) => x instanceof HTMLElement ? !!(x.closest(".rte-select-wrapper") || x.closest(".rte-select-host") || x.closest(".ant-select") || x.closest(".ant-select-dropdown")) : !1, N = (x) => {
1775
+ v = !0, M(x.target) && (u.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), P(x.target) && (c.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
1776
+ }, T = () => {
1771
1777
  v = !1, D = Date.now();
1772
1778
  };
1773
- let L = !1, R = 0;
1779
+ let _ = !1, R = 0;
1774
1780
  const $ = () => {
1775
- L = !0;
1776
- }, A = () => {
1777
- L = !1, R = Date.now();
1781
+ _ = !0;
1782
+ }, L = () => {
1783
+ _ = !1, R = Date.now();
1778
1784
  }, e = () => {
1779
1785
  R = Date.now();
1780
- }, n = (p) => {
1781
- I(p.target) && (u.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), P(p.target) && (c.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
1786
+ }, n = (x) => {
1787
+ M(x.target) && (u.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), P(x.target) && (c.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
1782
1788
  }, r = () => {
1783
1789
  if (Date.now() - u.current < 800 || Date.now() - c.current < 800) {
1784
1790
  console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");
1785
1791
  return;
1786
1792
  }
1787
- const p = document.activeElement;
1788
- if (p && (p.closest(".rte-datepicker-wrapper") || p.closest(".rte-datepicker-host") || p.closest(".ant-picker-dropdown") || // Antd dropdown
1789
- p.tagName === "INPUT" && p.closest(".ant-picker") || p.closest(".rte-select-wrapper") || p.closest(".rte-select-host") || p.closest(".ant-select") || p.closest(".ant-select-dropdown"))) {
1793
+ const x = document.activeElement;
1794
+ if (x && (x.closest(".rte-datepicker-wrapper") || x.closest(".rte-datepicker-host") || x.closest(".ant-picker-dropdown") || // Antd dropdown
1795
+ x.tagName === "INPUT" && x.closest(".ant-picker") || x.closest(".rte-select-wrapper") || x.closest(".rte-select-host") || x.closest(".ant-select") || x.closest(".ant-select-dropdown"))) {
1790
1796
  console.log("[SelectionCtrl] activeElement is picker/select; skip");
1791
1797
  return;
1792
1798
  }
1793
1799
  if (!t.current) return;
1794
1800
  const q = window.getSelection();
1795
- if (!q || q.rangeCount === 0 || g.current || v || L || Date.now() - R < 500)
1801
+ if (!q || q.rangeCount === 0 || h.current || v || _ || Date.now() - R < 500)
1796
1802
  return;
1797
- const G = q.getRangeAt(0);
1798
- if (!G.collapsed)
1799
- return t.current.contains(G.commonAncestorContainer), void 0;
1800
- const M = q.anchorNode;
1801
- if (!M || !t.current.contains(M))
1803
+ const O = q.getRangeAt(0);
1804
+ if (!O.collapsed)
1805
+ return t.current.contains(O.commonAncestorContainer), void 0;
1806
+ const C = q.anchorNode;
1807
+ if (!C || !t.current.contains(C))
1802
1808
  return;
1803
- let Q = !1, K = !1;
1804
- if (M.nodeType === Node.ELEMENT_NODE) {
1805
- const a = M;
1806
- (a.closest('[data-type="datepicker"]') || a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host")) && (Q = !0), (a.closest('[data-type="select"]') || a.closest(".rte-select-wrapper") || a.closest(".rte-select-host")) && (K = !0);
1807
- } else if (M.parentElement) {
1808
- const a = M.parentElement;
1809
- (a.closest('[data-type="datepicker"]') || a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host")) && (Q = !0), (a.closest('[data-type="select"]') || a.closest(".rte-select-wrapper") || a.closest(".rte-select-host")) && (K = !0);
1809
+ let Q = !1, W = !1;
1810
+ if (C.nodeType === Node.ELEMENT_NODE) {
1811
+ const a = C;
1812
+ (a.closest('[data-type="datepicker"]') || a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host")) && (Q = !0), (a.closest('[data-type="select"]') || a.closest(".rte-select-wrapper") || a.closest(".rte-select-host")) && (W = !0);
1813
+ } else if (C.parentElement) {
1814
+ const a = C.parentElement;
1815
+ (a.closest('[data-type="datepicker"]') || a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host")) && (Q = !0), (a.closest('[data-type="select"]') || a.closest(".rte-select-wrapper") || a.closest(".rte-select-host")) && (W = !0);
1810
1816
  }
1811
- if (Q || K)
1817
+ if (Q || W)
1812
1818
  return;
1813
1819
  let X = null;
1814
- if (M.nodeType === Node.ELEMENT_NODE ? X = M.closest('[data-type="variable"]') : M.nodeType === Node.TEXT_NODE && M.parentElement && (X = M.parentElement.closest('[data-type="variable"]')), !X) {
1820
+ if (C.nodeType === Node.ELEMENT_NODE ? X = C.closest('[data-type="variable"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (X = C.parentElement.closest('[data-type="variable"]')), !X) {
1815
1821
  if (Date.now() - D > 500)
1816
1822
  return;
1817
1823
  const a = t.current.querySelectorAll('[data-type="variable"]');
@@ -1831,165 +1837,165 @@ function qn(t, g) {
1831
1837
  q.removeAllRanges();
1832
1838
  }
1833
1839
  }, i = t.current;
1834
- return i && (i.addEventListener("compositionstart", $), i.addEventListener("compositionend", A), i.addEventListener("input", e)), document.addEventListener("mousedown", T), document.addEventListener("mouseup", S), document.addEventListener("focusin", n), document.addEventListener("selectionchange", r), () => {
1835
- const p = t.current;
1836
- p && (p.removeEventListener("compositionstart", $), p.removeEventListener("compositionend", A), p.removeEventListener("input", e)), document.removeEventListener("mousedown", T), document.removeEventListener("mouseup", S), document.removeEventListener("focusin", n), document.removeEventListener("selectionchange", r);
1840
+ return i && (i.addEventListener("compositionstart", $), i.addEventListener("compositionend", L), i.addEventListener("input", e)), document.addEventListener("mousedown", N), document.addEventListener("mouseup", T), document.addEventListener("focusin", n), document.addEventListener("selectionchange", r), () => {
1841
+ const x = t.current;
1842
+ x && (x.removeEventListener("compositionstart", $), x.removeEventListener("compositionend", L), x.removeEventListener("input", e)), document.removeEventListener("mousedown", N), document.removeEventListener("mouseup", T), document.removeEventListener("focusin", n), document.removeEventListener("selectionchange", r);
1837
1843
  };
1838
- }, [t, g]);
1844
+ }, [t, h]);
1839
1845
  }
1840
1846
  function Nn(t) {
1841
1847
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1842
1848
  }
1843
1849
  var Ge = { exports: {} }, An = Ge.exports, xt;
1844
1850
  function Et() {
1845
- return xt || (xt = 1, function(t, g) {
1851
+ return xt || (xt = 1, function(t, h) {
1846
1852
  (function(u, c) {
1847
1853
  t.exports = c();
1848
1854
  })(An, function() {
1849
- var u = 1e3, c = 6e4, v = 36e5, D = "millisecond", I = "second", P = "minute", T = "hour", S = "day", L = "week", R = "month", $ = "quarter", A = "year", e = "date", n = "Invalid Date", r = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, i = /\[([^\]]+)]|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(d) {
1850
- var f = ["th", "st", "nd", "rd"], m = d % 100;
1851
- return "[" + d + (f[(m - 20) % 10] || f[m] || f[0]) + "]";
1852
- } }, q = function(d, f, m) {
1853
- var h = String(d);
1854
- return !h || h.length >= f ? d : "" + Array(f + 1 - h.length).join(m) + d;
1855
- }, G = { s: q, z: function(d) {
1856
- var f = -d.utcOffset(), m = Math.abs(f), h = Math.floor(m / 60), E = m % 60;
1857
- return (f <= 0 ? "+" : "-") + q(h, 2, "0") + ":" + q(E, 2, "0");
1858
- }, m: function d(f, m) {
1859
- if (f.date() < m.date()) return -d(m, f);
1860
- var h = 12 * (m.year() - f.year()) + (m.month() - f.month()), E = f.clone().add(h, R), Y = m - E < 0, U = f.clone().add(h + (Y ? -1 : 1), R);
1861
- return +(-(h + (m - E) / (Y ? E - U : U - E)) || 0);
1855
+ var u = 1e3, c = 6e4, v = 36e5, D = "millisecond", M = "second", P = "minute", N = "hour", T = "day", _ = "week", R = "month", $ = "quarter", L = "year", e = "date", n = "Invalid Date", r = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, i = /\[([^\]]+)]|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, x = { 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(d) {
1856
+ var p = ["th", "st", "nd", "rd"], f = d % 100;
1857
+ return "[" + d + (p[(f - 20) % 10] || p[f] || p[0]) + "]";
1858
+ } }, q = function(d, p, f) {
1859
+ var y = String(d);
1860
+ return !y || y.length >= p ? d : "" + Array(p + 1 - y.length).join(f) + d;
1861
+ }, O = { s: q, z: function(d) {
1862
+ var p = -d.utcOffset(), f = Math.abs(p), y = Math.floor(f / 60), E = f % 60;
1863
+ return (p <= 0 ? "+" : "-") + q(y, 2, "0") + ":" + q(E, 2, "0");
1864
+ }, m: function d(p, f) {
1865
+ if (p.date() < f.date()) return -d(f, p);
1866
+ var y = 12 * (f.year() - p.year()) + (f.month() - p.month()), E = p.clone().add(y, R), Y = f - E < 0, K = p.clone().add(y + (Y ? -1 : 1), R);
1867
+ return +(-(y + (f - E) / (Y ? E - K : K - E)) || 0);
1862
1868
  }, a: function(d) {
1863
1869
  return d < 0 ? Math.ceil(d) || 0 : Math.floor(d);
1864
1870
  }, p: function(d) {
1865
- return { M: R, y: A, w: L, d: S, D: e, h: T, m: P, s: I, ms: D, Q: $ }[d] || String(d || "").toLowerCase().replace(/s$/, "");
1871
+ return { M: R, y: L, w: _, d: T, D: e, h: N, m: P, s: M, ms: D, Q: $ }[d] || String(d || "").toLowerCase().replace(/s$/, "");
1866
1872
  }, u: function(d) {
1867
1873
  return d === void 0;
1868
- } }, M = "en", Q = {};
1869
- Q[M] = p;
1870
- var K = "$isDayjsObject", X = function(d) {
1871
- return d instanceof W || !(!d || !d[K]);
1872
- }, a = function d(f, m, h) {
1874
+ } }, C = "en", Q = {};
1875
+ Q[C] = x;
1876
+ var W = "$isDayjsObject", X = function(d) {
1877
+ return d instanceof U || !(!d || !d[W]);
1878
+ }, a = function d(p, f, y) {
1873
1879
  var E;
1874
- if (!f) return M;
1875
- if (typeof f == "string") {
1876
- var Y = f.toLowerCase();
1877
- Q[Y] && (E = Y), m && (Q[Y] = m, E = Y);
1878
- var U = f.split("-");
1879
- if (!E && U.length > 1) return d(U[0]);
1880
+ if (!p) return C;
1881
+ if (typeof p == "string") {
1882
+ var Y = p.toLowerCase();
1883
+ Q[Y] && (E = Y), f && (Q[Y] = f, E = Y);
1884
+ var K = p.split("-");
1885
+ if (!E && K.length > 1) return d(K[0]);
1880
1886
  } else {
1881
- var Z = f.name;
1882
- Q[Z] = f, E = Z;
1887
+ var Z = p.name;
1888
+ Q[Z] = p, E = Z;
1883
1889
  }
1884
- return !h && E && (M = E), E || !h && M;
1885
- }, V = function(d, f) {
1890
+ return !y && E && (C = E), E || !y && C;
1891
+ }, V = function(d, p) {
1886
1892
  if (X(d)) return d.clone();
1887
- var m = typeof f == "object" ? f : {};
1888
- return m.date = d, m.args = arguments, new W(m);
1889
- }, w = G;
1890
- w.l = a, w.i = X, w.w = function(d, f) {
1891
- return V(d, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
1893
+ var f = typeof p == "object" ? p : {};
1894
+ return f.date = d, f.args = arguments, new U(f);
1895
+ }, w = O;
1896
+ w.l = a, w.i = X, w.w = function(d, p) {
1897
+ return V(d, { locale: p.$L, utc: p.$u, x: p.$x, $offset: p.$offset });
1892
1898
  };
1893
- var W = function() {
1894
- function d(m) {
1895
- this.$L = a(m.locale, null, !0), this.parse(m), this.$x = this.$x || m.x || {}, this[K] = !0;
1899
+ var U = function() {
1900
+ function d(f) {
1901
+ this.$L = a(f.locale, null, !0), this.parse(f), this.$x = this.$x || f.x || {}, this[W] = !0;
1896
1902
  }
1897
- var f = d.prototype;
1898
- return f.parse = function(m) {
1899
- this.$d = function(h) {
1900
- var E = h.date, Y = h.utc;
1903
+ var p = d.prototype;
1904
+ return p.parse = function(f) {
1905
+ this.$d = function(y) {
1906
+ var E = y.date, Y = y.utc;
1901
1907
  if (E === null) return /* @__PURE__ */ new Date(NaN);
1902
1908
  if (w.u(E)) return /* @__PURE__ */ new Date();
1903
1909
  if (E instanceof Date) return new Date(E);
1904
1910
  if (typeof E == "string" && !/Z$/i.test(E)) {
1905
- var U = E.match(r);
1906
- if (U) {
1907
- var Z = U[2] - 1 || 0, J = (U[7] || "0").substring(0, 3);
1908
- return Y ? new Date(Date.UTC(U[1], Z, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, J)) : new Date(U[1], Z, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, J);
1911
+ var K = E.match(r);
1912
+ if (K) {
1913
+ var Z = K[2] - 1 || 0, J = (K[7] || "0").substring(0, 3);
1914
+ return Y ? new Date(Date.UTC(K[1], Z, K[3] || 1, K[4] || 0, K[5] || 0, K[6] || 0, J)) : new Date(K[1], Z, K[3] || 1, K[4] || 0, K[5] || 0, K[6] || 0, J);
1909
1915
  }
1910
1916
  }
1911
1917
  return new Date(E);
1912
- }(m), this.init();
1913
- }, f.init = function() {
1914
- var m = this.$d;
1915
- this.$y = m.getFullYear(), this.$M = m.getMonth(), this.$D = m.getDate(), this.$W = m.getDay(), this.$H = m.getHours(), this.$m = m.getMinutes(), this.$s = m.getSeconds(), this.$ms = m.getMilliseconds();
1916
- }, f.$utils = function() {
1918
+ }(f), this.init();
1919
+ }, p.init = function() {
1920
+ var f = this.$d;
1921
+ this.$y = f.getFullYear(), this.$M = f.getMonth(), this.$D = f.getDate(), this.$W = f.getDay(), this.$H = f.getHours(), this.$m = f.getMinutes(), this.$s = f.getSeconds(), this.$ms = f.getMilliseconds();
1922
+ }, p.$utils = function() {
1917
1923
  return w;
1918
- }, f.isValid = function() {
1924
+ }, p.isValid = function() {
1919
1925
  return this.$d.toString() !== n;
1920
- }, f.isSame = function(m, h) {
1921
- var E = V(m);
1922
- return this.startOf(h) <= E && E <= this.endOf(h);
1923
- }, f.isAfter = function(m, h) {
1924
- return V(m) < this.startOf(h);
1925
- }, f.isBefore = function(m, h) {
1926
- return this.endOf(h) < V(m);
1927
- }, f.$g = function(m, h, E) {
1928
- return w.u(m) ? this[h] : this.set(E, m);
1929
- }, f.unix = function() {
1926
+ }, p.isSame = function(f, y) {
1927
+ var E = V(f);
1928
+ return this.startOf(y) <= E && E <= this.endOf(y);
1929
+ }, p.isAfter = function(f, y) {
1930
+ return V(f) < this.startOf(y);
1931
+ }, p.isBefore = function(f, y) {
1932
+ return this.endOf(y) < V(f);
1933
+ }, p.$g = function(f, y, E) {
1934
+ return w.u(f) ? this[y] : this.set(E, f);
1935
+ }, p.unix = function() {
1930
1936
  return Math.floor(this.valueOf() / 1e3);
1931
- }, f.valueOf = function() {
1937
+ }, p.valueOf = function() {
1932
1938
  return this.$d.getTime();
1933
- }, f.startOf = function(m, h) {
1934
- var E = this, Y = !!w.u(h) || h, U = w.p(m), Z = function(ge, he) {
1939
+ }, p.startOf = function(f, y) {
1940
+ var E = this, Y = !!w.u(y) || y, K = w.p(f), Z = function(ge, he) {
1935
1941
  var ke = w.w(E.$u ? Date.UTC(E.$y, he, ge) : new Date(E.$y, he, ge), E);
1936
- return Y ? ke : ke.endOf(S);
1942
+ return Y ? ke : ke.endOf(T);
1937
1943
  }, J = function(ge, he) {
1938
1944
  return w.w(E.toDate()[ge].apply(E.toDate("s"), (Y ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(he)), E);
1939
1945
  }, ue = this.$W, fe = this.$M, de = this.$D, be = "set" + (this.$u ? "UTC" : "");
1940
- switch (U) {
1941
- case A:
1946
+ switch (K) {
1947
+ case L:
1942
1948
  return Y ? Z(1, 0) : Z(31, 11);
1943
1949
  case R:
1944
1950
  return Y ? Z(1, fe) : Z(0, fe + 1);
1945
- case L:
1951
+ case _:
1946
1952
  var ne = this.$locale().weekStart || 0, ye = (ue < ne ? ue + 7 : ue) - ne;
1947
1953
  return Z(Y ? de - ye : de + (6 - ye), fe);
1948
- case S:
1954
+ case T:
1949
1955
  case e:
1950
1956
  return J(be + "Hours", 0);
1951
- case T:
1957
+ case N:
1952
1958
  return J(be + "Minutes", 1);
1953
1959
  case P:
1954
1960
  return J(be + "Seconds", 2);
1955
- case I:
1961
+ case M:
1956
1962
  return J(be + "Milliseconds", 3);
1957
1963
  default:
1958
1964
  return this.clone();
1959
1965
  }
1960
- }, f.endOf = function(m) {
1961
- return this.startOf(m, !1);
1962
- }, f.$set = function(m, h) {
1963
- var E, Y = w.p(m), U = "set" + (this.$u ? "UTC" : ""), Z = (E = {}, E[S] = U + "Date", E[e] = U + "Date", E[R] = U + "Month", E[A] = U + "FullYear", E[T] = U + "Hours", E[P] = U + "Minutes", E[I] = U + "Seconds", E[D] = U + "Milliseconds", E)[Y], J = Y === S ? this.$D + (h - this.$W) : h;
1964
- if (Y === R || Y === A) {
1966
+ }, p.endOf = function(f) {
1967
+ return this.startOf(f, !1);
1968
+ }, p.$set = function(f, y) {
1969
+ var E, Y = w.p(f), K = "set" + (this.$u ? "UTC" : ""), Z = (E = {}, E[T] = K + "Date", E[e] = K + "Date", E[R] = K + "Month", E[L] = K + "FullYear", E[N] = K + "Hours", E[P] = K + "Minutes", E[M] = K + "Seconds", E[D] = K + "Milliseconds", E)[Y], J = Y === T ? this.$D + (y - this.$W) : y;
1970
+ if (Y === R || Y === L) {
1965
1971
  var ue = this.clone().set(e, 1);
1966
1972
  ue.$d[Z](J), ue.init(), this.$d = ue.set(e, Math.min(this.$D, ue.daysInMonth())).$d;
1967
1973
  } else Z && this.$d[Z](J);
1968
1974
  return this.init(), this;
1969
- }, f.set = function(m, h) {
1970
- return this.clone().$set(m, h);
1971
- }, f.get = function(m) {
1972
- return this[w.p(m)]();
1973
- }, f.add = function(m, h) {
1975
+ }, p.set = function(f, y) {
1976
+ return this.clone().$set(f, y);
1977
+ }, p.get = function(f) {
1978
+ return this[w.p(f)]();
1979
+ }, p.add = function(f, y) {
1974
1980
  var E, Y = this;
1975
- m = Number(m);
1976
- var U = w.p(h), Z = function(fe) {
1981
+ f = Number(f);
1982
+ var K = w.p(y), Z = function(fe) {
1977
1983
  var de = V(Y);
1978
- return w.w(de.date(de.date() + Math.round(fe * m)), Y);
1984
+ return w.w(de.date(de.date() + Math.round(fe * f)), Y);
1979
1985
  };
1980
- if (U === R) return this.set(R, this.$M + m);
1981
- if (U === A) return this.set(A, this.$y + m);
1982
- if (U === S) return Z(1);
1983
- if (U === L) return Z(7);
1984
- var J = (E = {}, E[P] = c, E[T] = v, E[I] = u, E)[U] || 1, ue = this.$d.getTime() + m * J;
1986
+ if (K === R) return this.set(R, this.$M + f);
1987
+ if (K === L) return this.set(L, this.$y + f);
1988
+ if (K === T) return Z(1);
1989
+ if (K === _) return Z(7);
1990
+ var J = (E = {}, E[P] = c, E[N] = v, E[M] = u, E)[K] || 1, ue = this.$d.getTime() + f * J;
1985
1991
  return w.w(ue, this);
1986
- }, f.subtract = function(m, h) {
1987
- return this.add(-1 * m, h);
1988
- }, f.format = function(m) {
1989
- var h = this, E = this.$locale();
1992
+ }, p.subtract = function(f, y) {
1993
+ return this.add(-1 * f, y);
1994
+ }, p.format = function(f) {
1995
+ var y = this, E = this.$locale();
1990
1996
  if (!this.isValid()) return E.invalidDate || n;
1991
- var Y = m || "YYYY-MM-DDTHH:mm:ssZ", U = w.z(this), Z = this.$H, J = this.$m, ue = this.$M, fe = E.weekdays, de = E.months, be = E.meridiem, ne = function(he, ke, $e, Ee) {
1992
- return he && (he[ke] || he(h, Y)) || $e[ke].slice(0, Ee);
1997
+ var Y = f || "YYYY-MM-DDTHH:mm:ssZ", K = w.z(this), Z = this.$H, J = this.$m, ue = this.$M, fe = E.weekdays, de = E.months, be = E.meridiem, ne = function(he, ke, $e, Ee) {
1998
+ return he && (he[ke] || he(y, Y)) || $e[ke].slice(0, Ee);
1993
1999
  }, ye = function(he) {
1994
2000
  return w.s(Z % 12 || 12, he, "0");
1995
2001
  }, ge = be || function(he, ke, $e) {
@@ -2000,9 +2006,9 @@ function Et() {
2000
2006
  return ke || function($e) {
2001
2007
  switch ($e) {
2002
2008
  case "YY":
2003
- return String(h.$y).slice(-2);
2009
+ return String(y.$y).slice(-2);
2004
2010
  case "YYYY":
2005
- return w.s(h.$y, 4, "0");
2011
+ return w.s(y.$y, 4, "0");
2006
2012
  case "M":
2007
2013
  return ue + 1;
2008
2014
  case "MM":
@@ -2012,17 +2018,17 @@ function Et() {
2012
2018
  case "MMMM":
2013
2019
  return ne(de, ue);
2014
2020
  case "D":
2015
- return h.$D;
2021
+ return y.$D;
2016
2022
  case "DD":
2017
- return w.s(h.$D, 2, "0");
2023
+ return w.s(y.$D, 2, "0");
2018
2024
  case "d":
2019
- return String(h.$W);
2025
+ return String(y.$W);
2020
2026
  case "dd":
2021
- return ne(E.weekdaysMin, h.$W, fe, 2);
2027
+ return ne(E.weekdaysMin, y.$W, fe, 2);
2022
2028
  case "ddd":
2023
- return ne(E.weekdaysShort, h.$W, fe, 3);
2029
+ return ne(E.weekdaysShort, y.$W, fe, 3);
2024
2030
  case "dddd":
2025
- return fe[h.$W];
2031
+ return fe[y.$W];
2026
2032
  case "H":
2027
2033
  return String(Z);
2028
2034
  case "HH":
@@ -2040,25 +2046,25 @@ function Et() {
2040
2046
  case "mm":
2041
2047
  return w.s(J, 2, "0");
2042
2048
  case "s":
2043
- return String(h.$s);
2049
+ return String(y.$s);
2044
2050
  case "ss":
2045
- return w.s(h.$s, 2, "0");
2051
+ return w.s(y.$s, 2, "0");
2046
2052
  case "SSS":
2047
- return w.s(h.$ms, 3, "0");
2053
+ return w.s(y.$ms, 3, "0");
2048
2054
  case "Z":
2049
- return U;
2055
+ return K;
2050
2056
  }
2051
2057
  return null;
2052
- }(he) || U.replace(":", "");
2058
+ }(he) || K.replace(":", "");
2053
2059
  });
2054
- }, f.utcOffset = function() {
2060
+ }, p.utcOffset = function() {
2055
2061
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
2056
- }, f.diff = function(m, h, E) {
2057
- var Y, U = this, Z = w.p(h), J = V(m), ue = (J.utcOffset() - this.utcOffset()) * c, fe = this - J, de = function() {
2058
- return w.m(U, J);
2062
+ }, p.diff = function(f, y, E) {
2063
+ var Y, K = this, Z = w.p(y), J = V(f), ue = (J.utcOffset() - this.utcOffset()) * c, fe = this - J, de = function() {
2064
+ return w.m(K, J);
2059
2065
  };
2060
2066
  switch (Z) {
2061
- case A:
2067
+ case L:
2062
2068
  Y = de() / 12;
2063
2069
  break;
2064
2070
  case R:
@@ -2067,123 +2073,123 @@ function Et() {
2067
2073
  case $:
2068
2074
  Y = de() / 3;
2069
2075
  break;
2070
- case L:
2076
+ case _:
2071
2077
  Y = (fe - ue) / 6048e5;
2072
2078
  break;
2073
- case S:
2079
+ case T:
2074
2080
  Y = (fe - ue) / 864e5;
2075
2081
  break;
2076
- case T:
2082
+ case N:
2077
2083
  Y = fe / v;
2078
2084
  break;
2079
2085
  case P:
2080
2086
  Y = fe / c;
2081
2087
  break;
2082
- case I:
2088
+ case M:
2083
2089
  Y = fe / u;
2084
2090
  break;
2085
2091
  default:
2086
2092
  Y = fe;
2087
2093
  }
2088
2094
  return E ? Y : w.a(Y);
2089
- }, f.daysInMonth = function() {
2095
+ }, p.daysInMonth = function() {
2090
2096
  return this.endOf(R).$D;
2091
- }, f.$locale = function() {
2097
+ }, p.$locale = function() {
2092
2098
  return Q[this.$L];
2093
- }, f.locale = function(m, h) {
2094
- if (!m) return this.$L;
2095
- var E = this.clone(), Y = a(m, h, !0);
2099
+ }, p.locale = function(f, y) {
2100
+ if (!f) return this.$L;
2101
+ var E = this.clone(), Y = a(f, y, !0);
2096
2102
  return Y && (E.$L = Y), E;
2097
- }, f.clone = function() {
2103
+ }, p.clone = function() {
2098
2104
  return w.w(this.$d, this);
2099
- }, f.toDate = function() {
2105
+ }, p.toDate = function() {
2100
2106
  return new Date(this.valueOf());
2101
- }, f.toJSON = function() {
2107
+ }, p.toJSON = function() {
2102
2108
  return this.isValid() ? this.toISOString() : null;
2103
- }, f.toISOString = function() {
2109
+ }, p.toISOString = function() {
2104
2110
  return this.$d.toISOString();
2105
- }, f.toString = function() {
2111
+ }, p.toString = function() {
2106
2112
  return this.$d.toUTCString();
2107
2113
  }, d;
2108
- }(), z = W.prototype;
2109
- return V.prototype = z, [["$ms", D], ["$s", I], ["$m", P], ["$H", T], ["$W", S], ["$M", R], ["$y", A], ["$D", e]].forEach(function(d) {
2110
- z[d[1]] = function(f) {
2111
- return this.$g(f, d[0], d[1]);
2114
+ }(), z = U.prototype;
2115
+ return V.prototype = z, [["$ms", D], ["$s", M], ["$m", P], ["$H", N], ["$W", T], ["$M", R], ["$y", L], ["$D", e]].forEach(function(d) {
2116
+ z[d[1]] = function(p) {
2117
+ return this.$g(p, d[0], d[1]);
2112
2118
  };
2113
- }), V.extend = function(d, f) {
2114
- return d.$i || (d(f, W, V), d.$i = !0), V;
2119
+ }), V.extend = function(d, p) {
2120
+ return d.$i || (d(p, U, V), d.$i = !0), V;
2115
2121
  }, V.locale = a, V.isDayjs = X, V.unix = function(d) {
2116
2122
  return V(1e3 * d);
2117
- }, V.en = Q[M], V.Ls = Q, V.p = {}, V;
2123
+ }, V.en = Q[C], V.Ls = Q, V.p = {}, V;
2118
2124
  });
2119
2125
  }(Ge)), Ge.exports;
2120
2126
  }
2121
2127
  var _n = Et();
2122
2128
  const Re = /* @__PURE__ */ Nn(_n);
2123
2129
  var Fe = { exports: {} }, Ln = Fe.exports, bt;
2124
- function Mn() {
2125
- return bt || (bt = 1, function(t, g) {
2130
+ function In() {
2131
+ return bt || (bt = 1, function(t, h) {
2126
2132
  (function(u, c) {
2127
2133
  t.exports = c(Et());
2128
2134
  })(Ln, function(u) {
2129
- function c(I) {
2130
- return I && typeof I == "object" && "default" in I ? I : { default: I };
2135
+ function c(M) {
2136
+ return M && typeof M == "object" && "default" in M ? M : { default: M };
2131
2137
  }
2132
- var v = c(u), D = { 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(I, P) {
2133
- return P === "W" ? I + "周" : I + "日";
2134
- }, 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(I, P) {
2135
- var T = 100 * I + P;
2136
- return T < 600 ? "凌晨" : T < 900 ? "早上" : T < 1100 ? "上午" : T < 1300 ? "中午" : T < 1800 ? "下午" : "晚上";
2138
+ var v = c(u), D = { 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, P) {
2139
+ return P === "W" ? M + "周" : M + "日";
2140
+ }, 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, P) {
2141
+ var N = 100 * M + P;
2142
+ return N < 600 ? "凌晨" : N < 900 ? "早上" : N < 1100 ? "上午" : N < 1300 ? "中午" : N < 1800 ? "下午" : "晚上";
2137
2143
  } };
2138
2144
  return v.default.locale(D, null, !0), D;
2139
2145
  });
2140
2146
  }(Fe)), Fe.exports;
2141
2147
  }
2142
- Mn();
2143
- function Ie(t) {
2148
+ In();
2149
+ function Me(t) {
2144
2150
  "@babel/helpers - typeof";
2145
- return Ie = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(g) {
2146
- return typeof g;
2147
- } : function(g) {
2148
- return g && typeof Symbol == "function" && g.constructor === Symbol && g !== Symbol.prototype ? "symbol" : typeof g;
2149
- }, Ie(t);
2151
+ return Me = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(h) {
2152
+ return typeof h;
2153
+ } : function(h) {
2154
+ return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h;
2155
+ }, Me(t);
2150
2156
  }
2151
- function In(t, g) {
2152
- if (Ie(t) != "object" || !t) return t;
2157
+ function Mn(t, h) {
2158
+ if (Me(t) != "object" || !t) return t;
2153
2159
  var u = t[Symbol.toPrimitive];
2154
2160
  if (u !== void 0) {
2155
- var c = u.call(t, g);
2156
- if (Ie(c) != "object") return c;
2161
+ var c = u.call(t, h);
2162
+ if (Me(c) != "object") return c;
2157
2163
  throw new TypeError("@@toPrimitive must return a primitive value.");
2158
2164
  }
2159
- return (g === "string" ? String : Number)(t);
2165
+ return (h === "string" ? String : Number)(t);
2160
2166
  }
2161
2167
  function Dn(t) {
2162
- var g = In(t, "string");
2163
- return Ie(g) == "symbol" ? g : g + "";
2168
+ var h = Mn(t, "string");
2169
+ return Me(h) == "symbol" ? h : h + "";
2164
2170
  }
2165
- function Pn(t, g, u) {
2166
- return (g = Dn(g)) in t ? Object.defineProperty(t, g, {
2171
+ function Pn(t, h, u) {
2172
+ return (h = Dn(h)) in t ? Object.defineProperty(t, h, {
2167
2173
  value: u,
2168
2174
  enumerable: !0,
2169
2175
  configurable: !0,
2170
2176
  writable: !0
2171
- }) : t[g] = u, t;
2177
+ }) : t[h] = u, t;
2172
2178
  }
2173
- function vt(t, g) {
2179
+ function vt(t, h) {
2174
2180
  var u = Object.keys(t);
2175
2181
  if (Object.getOwnPropertySymbols) {
2176
2182
  var c = Object.getOwnPropertySymbols(t);
2177
- g && (c = c.filter(function(v) {
2183
+ h && (c = c.filter(function(v) {
2178
2184
  return Object.getOwnPropertyDescriptor(t, v).enumerable;
2179
2185
  })), u.push.apply(u, c);
2180
2186
  }
2181
2187
  return u;
2182
2188
  }
2183
2189
  function wt(t) {
2184
- for (var g = 1; g < arguments.length; g++) {
2185
- var u = arguments[g] != null ? arguments[g] : {};
2186
- g % 2 ? vt(Object(u), !0).forEach(function(c) {
2190
+ for (var h = 1; h < arguments.length; h++) {
2191
+ var u = arguments[h] != null ? arguments[h] : {};
2192
+ h % 2 ? vt(Object(u), !0).forEach(function(c) {
2187
2193
  Pn(t, c, u[c]);
2188
2194
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(u)) : vt(Object(u)).forEach(function(c) {
2189
2195
  Object.defineProperty(t, c, Object.getOwnPropertyDescriptor(u, c));
@@ -2244,30 +2250,30 @@ const Vn = {
2244
2250
  };
2245
2251
  Ct.lang.ok = "确定";
2246
2252
  Re.locale("zh-cn");
2247
- const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2248
- const u = t.dataset.key, c = t.dataset.value, v = t.dataset.placeholder, D = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, I = t.dataset.disableFuture === "true", [P, T] = oe(() => {
2253
+ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: h }) => {
2254
+ const u = t.dataset.key, c = t.dataset.value, v = t.dataset.placeholder, D = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, M = t.dataset.disableFuture === "true", [P, N] = oe(() => {
2249
2255
  if (!c) return null;
2250
2256
  const n = c.split(",");
2251
2257
  return n.length === 2 && n[0] && n[1] ? [Re(n[0]), Re(n[1])] : null;
2252
- }), [S, L] = oe(null);
2258
+ }), [T, _] = oe(null);
2253
2259
  return ot(
2254
2260
  /* @__PURE__ */ H("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__ */ H(
2255
2261
  On,
2256
2262
  {
2257
2263
  value: P,
2258
- disabledDate: (n) => n ? I && n.isAfter(Re(), "day") ? !0 : !D || !S || !S[0] ? !1 : Math.abs(n.diff(S[0], "days")) > D : !1,
2264
+ disabledDate: (n) => n ? M && n.isAfter(Re(), "day") ? !0 : !D || !T || !T[0] ? !1 : Math.abs(n.diff(T[0], "days")) > D : !1,
2259
2265
  onCalendarChange: (n) => {
2260
- console.log("[DatePicker] onCalendarChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), L(n);
2266
+ console.log("[DatePicker] onCalendarChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), _(n);
2261
2267
  },
2262
2268
  onChange: (n) => {
2263
- if (console.log("[DatePicker] onChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), T(n), L(null), n && n[0] && n[1]) {
2269
+ if (console.log("[DatePicker] onChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), N(n), _(null), n && n[0] && n[1]) {
2264
2270
  const r = `${n[0].format("YYYY-MM-DD")},${n[1].format("YYYY-MM-DD")}`;
2265
- t.setAttribute("data-value", r), g(u, r);
2271
+ t.setAttribute("data-value", r), h(u, r);
2266
2272
  } else
2267
- t.setAttribute("data-value", ""), g(u, "");
2273
+ t.setAttribute("data-value", ""), h(u, "");
2268
2274
  },
2269
2275
  onOpenChange: (n) => {
2270
- console.log("[DatePicker] onOpenChange", n), L(n ? P : null);
2276
+ console.log("[DatePicker] onOpenChange", n), _(n ? P : null);
2271
2277
  },
2272
2278
  placeholder: [v || "开始日期", v || "结束日期"],
2273
2279
  style: { width: "100%" },
@@ -2281,48 +2287,48 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2281
2287
  t
2282
2288
  );
2283
2289
  }, Rn = (t) => {
2284
- const [g, u] = oe([]);
2290
+ const [h, u] = oe([]);
2285
2291
  return pe(() => {
2286
2292
  const c = t.current;
2287
2293
  if (!c) return;
2288
2294
  const v = () => {
2289
- const I = c.querySelectorAll(".rte-datepicker-host"), P = [];
2290
- I.forEach((T) => {
2291
- const S = T.getAttribute("data-key");
2292
- S && P.push(
2295
+ const M = c.querySelectorAll(".rte-datepicker-host"), P = [];
2296
+ M.forEach((N) => {
2297
+ const T = N.getAttribute("data-key");
2298
+ T && P.push(
2293
2299
  /* @__PURE__ */ H(
2294
2300
  Gn,
2295
2301
  {
2296
- host: T,
2302
+ host: N,
2297
2303
  onChange: () => {
2298
2304
  if (t.current) {
2299
- const L = new Event("input", { bubbles: !0 });
2300
- t.current.dispatchEvent(L);
2305
+ const _ = new Event("input", { bubbles: !0 });
2306
+ t.current.dispatchEvent(_);
2301
2307
  }
2302
2308
  }
2303
2309
  },
2304
- `datepicker-${S}`
2310
+ `datepicker-${T}`
2305
2311
  )
2306
2312
  );
2307
2313
  }), u(P);
2308
2314
  };
2309
2315
  v();
2310
- const D = new MutationObserver((I) => {
2316
+ const D = new MutationObserver((M) => {
2311
2317
  let P = !1;
2312
- for (const T of I)
2313
- if (T.type === "childList") {
2314
- let S = !1;
2315
- if (T.addedNodes.forEach((L) => {
2316
- if (L.nodeType === Node.ELEMENT_NODE) {
2317
- const R = L;
2318
- (R.classList?.contains("rte-datepicker-host") || R.querySelector?.(".rte-datepicker-host")) && (S = !0);
2318
+ for (const N of M)
2319
+ if (N.type === "childList") {
2320
+ let T = !1;
2321
+ if (N.addedNodes.forEach((_) => {
2322
+ if (_.nodeType === Node.ELEMENT_NODE) {
2323
+ const R = _;
2324
+ (R.classList?.contains("rte-datepicker-host") || R.querySelector?.(".rte-datepicker-host")) && (T = !0);
2319
2325
  }
2320
- }), T.removedNodes.forEach((L) => {
2321
- if (L.nodeType === Node.ELEMENT_NODE) {
2322
- const R = L;
2323
- (R.classList?.contains("rte-datepicker-host") || R.querySelector?.(".rte-datepicker-host")) && (S = !0);
2326
+ }), N.removedNodes.forEach((_) => {
2327
+ if (_.nodeType === Node.ELEMENT_NODE) {
2328
+ const R = _;
2329
+ (R.classList?.contains("rte-datepicker-host") || R.querySelector?.(".rte-datepicker-host")) && (T = !0);
2324
2330
  }
2325
- }), S) {
2331
+ }), T) {
2326
2332
  P = !0;
2327
2333
  break;
2328
2334
  }
@@ -2330,30 +2336,30 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2330
2336
  P && v();
2331
2337
  });
2332
2338
  return D.observe(c, { childList: !0, subtree: !0 }), () => D.disconnect();
2333
- }, [t]), g;
2339
+ }, [t]), h;
2334
2340
  }, Fn = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), zn = ({
2335
2341
  config: t,
2336
- onSend: g,
2342
+ onSend: h,
2337
2343
  isProcessing: u = !1,
2338
2344
  disabled: c = !1,
2339
2345
  width: v,
2340
2346
  lockStructure: D = !1,
2341
- agentOptions: I = [],
2347
+ agentOptions: M = [],
2342
2348
  onAgentSelect: P,
2343
- onAgentExit: T,
2344
- loading: S = !1,
2345
- placeholder: L,
2349
+ onAgentExit: N,
2350
+ loading: T = !1,
2351
+ placeholder: _,
2346
2352
  border: R,
2347
2353
  background: $ = "transparent",
2348
- hideButtons: A,
2354
+ hideButtons: L,
2349
2355
  maxHeight: e,
2350
2356
  minHeight: n,
2351
2357
  collapsed: r = !1,
2352
2358
  reportAnalyze: i,
2353
- onCollapsedChange: p,
2359
+ onCollapsedChange: x,
2354
2360
  collapseTransitionMs: q = 260
2355
2361
  }) => {
2356
- const [G, M] = Wt.useMessage(), Q = ae(null), K = ae(null), X = ae(null), a = ae(null), V = ae(null), [w, W] = oe({}), [z, d] = oe(null), [f, m] = oe(null), [h, E] = oe(null), Y = ae(!1), U = ae(null), [Z, J] = oe(!1), ue = ae(null), [fe, de] = oe(!0), be = ae(0), [ne, ye] = oe(58), [ge, he] = oe(58), [ke, $e] = oe(!1), [Ee, Me] = oe({}), Ye = ae(() => {
2362
+ const [O, C] = Wt.useMessage(), Q = ae(null), W = ae(null), X = ae(null), a = ae(null), V = ae(null), [w, U] = oe({}), [z, d] = oe(null), [p, f] = oe(null), [y, E] = oe(null), Y = ae(!1), K = ae(null), [Z, J] = oe(!1), ue = ae(null), [fe, de] = oe(!0), be = ae(0), [ne, ye] = oe(58), [ge, he] = oe(58), [ke, $e] = oe(!1), [Ee, Ie] = oe({}), Ye = ae(() => {
2357
2363
  }), [Ce, Te] = oe(() => {
2358
2364
  const o = {};
2359
2365
  return t.forEach((l) => {
@@ -2370,23 +2376,23 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2370
2376
  const o = We(it.current), l = We(t);
2371
2377
  if (o && o !== l && a.current) {
2372
2378
  const s = {};
2373
- a.current.querySelectorAll('[data-type="variable"]').forEach((x) => {
2374
- const O = x.dataset.key;
2375
- if (O) {
2376
- const _ = x.innerText.replace(/[\u200B\n]/g, "").trim();
2377
- _ && (s[O] = _);
2379
+ a.current.querySelectorAll('[data-type="variable"]').forEach((g) => {
2380
+ const G = g.dataset.key;
2381
+ if (G) {
2382
+ const I = g.innerText.replace(/[\u200B\n]/g, "").trim();
2383
+ I && (s[G] = I);
2378
2384
  }
2379
- }), a.current.querySelectorAll('[data-type="select"]').forEach((x) => {
2380
- const O = x.dataset.key;
2381
- if (O) {
2382
- const _ = (x.getAttribute("data-value") || "").trim();
2383
- _ && (s[O] = _);
2385
+ }), a.current.querySelectorAll('[data-type="select"]').forEach((g) => {
2386
+ const G = g.dataset.key;
2387
+ if (G) {
2388
+ const I = (g.getAttribute("data-value") || "").trim();
2389
+ I && (s[G] = I);
2384
2390
  }
2385
- }), a.current.querySelectorAll('[data-type="textarea"]').forEach((x) => {
2386
- const O = x.dataset.key;
2387
- if (O) {
2388
- const _ = x.value.replace(/[\u200B]/g, "").trim();
2389
- _ && (s[O] = _);
2391
+ }), a.current.querySelectorAll('[data-type="textarea"]').forEach((g) => {
2392
+ const G = g.dataset.key;
2393
+ if (G) {
2394
+ const I = g.value.replace(/[\u200B]/g, "").trim();
2395
+ I && (s[G] = I);
2390
2396
  }
2391
2397
  }), je.current[o] = {
2392
2398
  variableValues: s,
@@ -2396,15 +2402,15 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2396
2402
  }
2397
2403
  if (l && je.current[l]) {
2398
2404
  const s = je.current[l];
2399
- Ne.current = s, W(s.files), Te(s.multiVariableCounts);
2405
+ Ne.current = s, U(s.files), Te(s.multiVariableCounts);
2400
2406
  } else if (l) {
2401
2407
  Ne.current = null;
2402
2408
  const s = {};
2403
2409
  t.forEach((b) => {
2404
2410
  b.type === "multi-variable" && b.key && (s[b.key] = 1);
2405
- }), Te(s), W({});
2411
+ }), Te(s), U({});
2406
2412
  } else
2407
- Ne.current = null, Te({}), W({});
2413
+ Ne.current = null, Te({}), U({});
2408
2414
  it.current = t;
2409
2415
  }, [t, We]), Le(() => {
2410
2416
  Ne.current && a.current && (a.current.__tempVariableValues = Ne.current.variableValues, setTimeout(() => {
@@ -2416,7 +2422,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2416
2422
  const o = [];
2417
2423
  for (const l of t) {
2418
2424
  if (o.push(l), l.type !== "report-url" || !l.key) continue;
2419
- const s = Ee[l.key], b = s?.status ?? "idle", y = s?.modules ?? [];
2425
+ const s = Ee[l.key], b = s?.status ?? "idle", m = s?.modules ?? [];
2420
2426
  b === "loading" && o.push({
2421
2427
  type: "text",
2422
2428
  className: "rte-report-parsing",
@@ -2427,12 +2433,12 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2427
2433
  className: "rte-report-error",
2428
2434
  text: `解析失败:${Fn(s.error)}
2429
2435
  `
2430
- }), y.length > 0 && (y.forEach((k, x) => {
2436
+ }), m.length > 0 && (m.forEach((k, g) => {
2431
2437
  o.push({
2432
2438
  type: "report-module",
2433
2439
  key: l.key,
2434
2440
  // 所有模块使用同一个 key(数据收集时会合并为数组)
2435
- moduleIndex: x,
2441
+ moduleIndex: g,
2436
2442
  placeholder: "可编辑,内容不能为空",
2437
2443
  required: !0,
2438
2444
  minHeight: 80,
@@ -2456,8 +2462,8 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2456
2462
  return { url: l };
2457
2463
  }
2458
2464
  }
2459
- const b = s.pathname.split("/").filter(Boolean), y = b.findIndex((_) => _ === "report"), k = y >= 0 ? b[y + 1] : void 0, x = b[0] && b[0].length <= 5 ? b[0] : void 0, O = s.searchParams.get("agentId") || void 0;
2460
- return { url: l, reportId: k, agentId: O, lang: x };
2465
+ const b = s.pathname.split("/").filter(Boolean), m = b.findIndex((I) => I === "report"), k = m >= 0 ? b[m + 1] : void 0, g = b[0] && b[0].length <= 5 ? b[0] : void 0, G = s.searchParams.get("agentId") || void 0;
2466
+ return { url: l, reportId: k, agentId: G, lang: g };
2461
2467
  }, []), ut = ie(() => {
2462
2468
  const o = {};
2463
2469
  if (!a.current) return o;
@@ -2465,24 +2471,24 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2465
2471
  return l.querySelectorAll('[data-type="variable"]').forEach((s) => {
2466
2472
  const b = s.dataset.key;
2467
2473
  if (!b) return;
2468
- const y = s.innerText.replace(/[\u200B\n]/g, "").trim();
2469
- y && (o[b] = y);
2474
+ const m = s.innerText.replace(/[\u200B\n]/g, "").trim();
2475
+ m && (o[b] = m);
2470
2476
  }), l.querySelectorAll('[data-type="select"]').forEach((s) => {
2471
2477
  const b = s.dataset.key;
2472
2478
  if (!b) return;
2473
- const y = (s.getAttribute("data-value") || "").trim();
2474
- y && (o[b] = y);
2479
+ const m = (s.getAttribute("data-value") || "").trim();
2480
+ m && (o[b] = m);
2475
2481
  }), l.querySelectorAll('[data-type="textarea"]').forEach((s) => {
2476
2482
  const b = s.dataset.key;
2477
2483
  if (!b) return;
2478
- const y = s.value.replace(/[\u200B]/g, "").trim();
2479
- y && (o[b] = y);
2484
+ const m = s.value.replace(/[\u200B]/g, "").trim();
2485
+ m && (o[b] = m);
2480
2486
  }), l.querySelectorAll('[data-type="richtext"]').forEach((s) => {
2481
2487
  const b = s.dataset.key;
2482
2488
  if (!b) return;
2483
2489
  if ((s.getAttribute("data-node-type") || "") === "report-module") {
2484
- const x = Number.parseInt(s.getAttribute("data-module-index") || "0", 10), O = (s.innerHTML || "").replace(/[\u200B]/g, "").trim();
2485
- o[`${b}__module_${Number.isFinite(x) ? x : 0}`] = O;
2490
+ const g = Number.parseInt(s.getAttribute("data-module-index") || "0", 10), G = (s.innerHTML || "").replace(/[\u200B]/g, "").trim();
2491
+ o[`${b}__module_${Number.isFinite(g) ? g : 0}`] = G;
2486
2492
  return;
2487
2493
  }
2488
2494
  const k = (s.textContent || "").replace(/[\u200B]/g, "").trim();
@@ -2490,27 +2496,27 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2490
2496
  }), l.querySelectorAll('[data-type="datepicker"]').forEach((s) => {
2491
2497
  const b = s.dataset.key;
2492
2498
  if (!b) return;
2493
- const y = (s.getAttribute("data-value") || "").trim();
2494
- y && (o[b] = y);
2499
+ const m = (s.getAttribute("data-value") || "").trim();
2500
+ m && (o[b] = m);
2495
2501
  }), l.querySelectorAll('[data-type="number-input"]').forEach((s) => {
2496
2502
  const b = s.dataset.key;
2497
2503
  if (!b) return;
2498
- const y = (s.value || "").trim();
2499
- y && (o[b] = y);
2504
+ const m = (s.value || "").trim();
2505
+ m && (o[b] = m);
2500
2506
  }), o;
2501
2507
  }, []), dt = ie((o) => (o?.modules || []).map((l, s) => {
2502
- const b = (l?.title || `模块${s + 1}`).trim() || `模块${s + 1}`, y = (l?.content || "").trim();
2508
+ const b = (l?.title || `模块${s + 1}`).trim() || `模块${s + 1}`, m = (l?.content || "").trim();
2503
2509
  return {
2504
2510
  title: b,
2505
- content: y.length > 0 ? y : `请补充:${b}`
2511
+ content: m.length > 0 ? m : `请补充:${b}`
2506
2512
  };
2507
2513
  }), []), pt = ie(
2508
2514
  (o, l) => {
2509
2515
  const s = (l || "").trim();
2510
2516
  if (!o) return;
2511
2517
  if (!s) {
2512
- Me((x) => ({
2513
- ...x,
2518
+ Ie((g) => ({
2519
+ ...g,
2514
2520
  [o]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
2515
2521
  }));
2516
2522
  return;
@@ -2518,43 +2524,43 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2518
2524
  const b = Ee[o];
2519
2525
  if (b?.lastParsedUrl && b.lastParsedUrl === s && b.status === "loading")
2520
2526
  return;
2521
- Me((x) => ({
2522
- ...x,
2523
- [o]: { ...x[o], status: "loading", error: void 0, lastParsedUrl: s }
2527
+ Ie((g) => ({
2528
+ ...g,
2529
+ [o]: { ...g[o], status: "loading", error: void 0, lastParsedUrl: s }
2524
2530
  }));
2525
- const y = ct(s);
2526
- (i || (async (x) => ({
2531
+ const m = ct(s);
2532
+ (i || (async (g) => ({
2527
2533
  modules: [
2528
2534
  {
2529
2535
  title: "第1张:人群+场景直击图",
2530
2536
  content: `视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
2531
- (reportId=${x.reportId || "unknown"}, agentId=${x.agentId || "1"})`
2537
+ (reportId=${g.reportId || "unknown"}, agentId=${g.agentId || "1"})`
2532
2538
  },
2533
2539
  {
2534
2540
  title: "第2张:痛点放大对比图",
2535
2541
  content: "左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"
2536
2542
  }
2537
2543
  ]
2538
- })))(y).then((x) => {
2539
- const O = dt(x);
2544
+ })))(m).then((g) => {
2545
+ const G = dt(g);
2540
2546
  if (a.current) {
2541
- const _ = ut();
2542
- O.forEach((C, B) => {
2543
- _[`${o}__module_${B}`] = C.content;
2544
- }), a.current.__tempVariableValues = _;
2547
+ const I = ut();
2548
+ G.forEach((S, B) => {
2549
+ I[`${o}__module_${B}`] = S.content;
2550
+ }), a.current.__tempVariableValues = I;
2545
2551
  }
2546
- Me((_) => ({
2547
- ..._,
2548
- [o]: { status: "success", error: void 0, lastParsedUrl: s, modules: O }
2552
+ Ie((I) => ({
2553
+ ...I,
2554
+ [o]: { status: "success", error: void 0, lastParsedUrl: s, modules: G }
2549
2555
  }));
2550
- }).catch((x) => {
2551
- const O = x instanceof Error ? x.message : String(x);
2552
- Me((_) => ({
2553
- ..._,
2556
+ }).catch((g) => {
2557
+ const G = g instanceof Error ? g.message : String(g);
2558
+ Ie((I) => ({
2559
+ ...I,
2554
2560
  [o]: {
2555
- ..._[o] || { modules: [] },
2561
+ ...I[o] || { modules: [] },
2556
2562
  status: "error",
2557
- error: O || "解析失败",
2563
+ error: G || "解析失败",
2558
2564
  lastParsedUrl: s,
2559
2565
  modules: []
2560
2566
  }
@@ -2569,22 +2575,22 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2569
2575
  if (!a.current) return;
2570
2576
  const o = /* @__PURE__ */ new Map(), l = window.setTimeout(() => {
2571
2577
  if (!a.current) return;
2572
- o.forEach((y, k) => k.removeEventListener("blur", y, !1)), o.clear();
2578
+ o.forEach((m, k) => k.removeEventListener("blur", m, !1)), o.clear();
2573
2579
  const s = a.current.querySelectorAll(
2574
2580
  '[data-type="variable"][data-node-type="report-url"]'
2575
- ), b = (y) => {
2576
- y.stopPropagation(), y.stopImmediatePropagation();
2577
- const k = y.target?.closest(
2581
+ ), b = (m) => {
2582
+ m.stopPropagation(), m.stopImmediatePropagation();
2583
+ const k = m.target?.closest(
2578
2584
  '[data-type="variable"][data-node-type="report-url"]'
2579
2585
  );
2580
2586
  if (!k || !a.current || !a.current.contains(k)) return;
2581
- const x = k.dataset.key;
2582
- if (!x) return;
2583
- const O = k.innerText.replace(/[\u200B\n]/g, "").trim();
2584
- Ye.current(x, O);
2587
+ const g = k.dataset.key;
2588
+ if (!g) return;
2589
+ const G = k.innerText.replace(/[\u200B\n]/g, "").trim();
2590
+ Ye.current(g, G);
2585
2591
  };
2586
- s.forEach((y) => {
2587
- y.addEventListener("blur", b, !1), o.set(y, b);
2592
+ s.forEach((m) => {
2593
+ m.addEventListener("blur", b, !1), o.set(m, b);
2588
2594
  });
2589
2595
  }, 0);
2590
2596
  return () => {
@@ -2592,8 +2598,8 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2592
2598
  };
2593
2599
  }, [xe]), Le(() => {
2594
2600
  if (!a.current) return;
2595
- const o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), s = (_) => {
2596
- const C = _.value || _.placeholder || "", B = document.createElement("span");
2601
+ const o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), s = (I) => {
2602
+ const S = I.value || I.placeholder || "", B = document.createElement("span");
2597
2603
  B.style.cssText = `
2598
2604
  position: absolute;
2599
2605
  visibility: hidden;
@@ -2601,61 +2607,61 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2601
2607
  font-size: 16px;
2602
2608
  font-family: inherit;
2603
2609
  padding: 0 8px;
2604
- `, B.textContent = C || "0", document.body.appendChild(B);
2605
- const N = Math.max(60, Math.min(600, B.offsetWidth + 32));
2606
- return document.body.removeChild(B), N;
2607
- }, b = (_) => {
2608
- const C = _.target;
2609
- if (!C) return;
2610
- let B = C.value;
2610
+ `, B.textContent = S || "0", document.body.appendChild(B);
2611
+ const A = Math.max(60, Math.min(600, B.offsetWidth + 32));
2612
+ return document.body.removeChild(B), A;
2613
+ }, b = (I) => {
2614
+ const S = I.target;
2615
+ if (!S) return;
2616
+ let B = S.value;
2611
2617
  if (B = B.replace(/[^\d]/g, ""), B !== "" && B !== "0") {
2612
- const N = parseInt(B, 10);
2613
- if (Number.isNaN(N))
2614
- C.value = "";
2618
+ const A = parseInt(B, 10);
2619
+ if (Number.isNaN(A))
2620
+ S.value = "";
2615
2621
  else {
2616
- const j = C.getAttribute("min"), te = C.getAttribute("max"), F = j !== null ? parseInt(j, 10) : 0, ee = te !== null ? parseInt(te, 10) : 1 / 0, le = Math.min(Math.max(N, F), ee);
2617
- C.value = String(le);
2622
+ const j = S.getAttribute("min"), te = S.getAttribute("max"), F = j !== null ? parseInt(j, 10) : 0, ee = te !== null ? parseInt(te, 10) : 1 / 0, le = Math.min(Math.max(A, F), ee);
2623
+ S.value = String(le);
2618
2624
  }
2619
2625
  } else if (B === "0") {
2620
- const N = C.getAttribute("min");
2621
- 0 < (N !== null ? parseInt(N, 10) : 0) ? C.value = "" : C.value = "0";
2626
+ const A = S.getAttribute("min");
2627
+ 0 < (A !== null ? parseInt(A, 10) : 0) ? S.value = "" : S.value = "0";
2622
2628
  }
2623
- C.style.width = `${s(C)}px`;
2624
- }, y = (_) => {
2625
- const C = _.key;
2626
- (C === "-" || C === "." || C === "," || C === "e" || C === "E" || C === "+" || C === "=" || C === " ") && _.preventDefault();
2629
+ S.style.width = `${s(S)}px`;
2630
+ }, m = (I) => {
2631
+ const S = I.key;
2632
+ (S === "-" || S === "." || S === "," || S === "e" || S === "E" || S === "+" || S === "=" || S === " ") && I.preventDefault();
2627
2633
  }, k = () => {
2628
2634
  if (!a.current) return;
2629
2635
  a.current.querySelectorAll(
2630
2636
  '[data-type="number-input"]'
2631
- ).forEach((C) => {
2632
- const B = C.style.width, N = `${s(C)}px`;
2633
- (!B || B === "0px" || parseInt(B) < 60) && (C.style.width = N), o.has(C) || (C.addEventListener("input", b, !1), C.addEventListener("keydown", y, !1), o.set(C, b), l.set(C, y));
2637
+ ).forEach((S) => {
2638
+ const B = S.style.width, A = `${s(S)}px`;
2639
+ (!B || B === "0px" || parseInt(B) < 60) && (S.style.width = A), o.has(S) || (S.addEventListener("input", b, !1), S.addEventListener("keydown", m, !1), o.set(S, b), l.set(S, m));
2634
2640
  });
2635
- }, x = window.setTimeout(() => {
2641
+ }, g = window.setTimeout(() => {
2636
2642
  k();
2637
- }, 0), O = new MutationObserver((_) => {
2638
- let C = !1;
2639
- _.forEach((B) => {
2640
- B.type === "childList" && B.addedNodes.forEach((N) => {
2641
- if (N.nodeType === Node.ELEMENT_NODE) {
2642
- const j = N;
2643
- j.matches && (j.matches('[data-type="number-input"]') || j.querySelector('[data-type="number-input"]')) && (C = !0);
2643
+ }, 0), G = new MutationObserver((I) => {
2644
+ let S = !1;
2645
+ I.forEach((B) => {
2646
+ B.type === "childList" && B.addedNodes.forEach((A) => {
2647
+ if (A.nodeType === Node.ELEMENT_NODE) {
2648
+ const j = A;
2649
+ j.matches && (j.matches('[data-type="number-input"]') || j.querySelector('[data-type="number-input"]')) && (S = !0);
2644
2650
  }
2645
2651
  });
2646
- }), C && setTimeout(k, 10);
2652
+ }), S && setTimeout(k, 10);
2647
2653
  });
2648
- return a.current && O.observe(a.current, {
2654
+ return a.current && G.observe(a.current, {
2649
2655
  childList: !0,
2650
2656
  subtree: !0
2651
2657
  }), () => {
2652
- window.clearTimeout(x), O.disconnect(), o.forEach((_, C) => {
2653
- C.removeEventListener("input", _, !1);
2654
- }), o.clear(), l.forEach((_, C) => {
2655
- C.removeEventListener("keydown", _, !1);
2658
+ window.clearTimeout(g), G.disconnect(), o.forEach((I, S) => {
2659
+ S.removeEventListener("input", I, !1);
2660
+ }), o.clear(), l.forEach((I, S) => {
2661
+ S.removeEventListener("keydown", I, !1);
2656
2662
  }), l.clear();
2657
2663
  };
2658
- }, [xe]), kn(a, xe, w, D, Ce, ue, void 0, A), $n(a, xe, w, E), En(a, xe, E, A), Sn(a, xe, w, E), Cn(a, xe, E), Tn(a, xe, w, J), qn(a, Y);
2664
+ }, [xe]), kn(a, xe, w, D, Ce, ue, void 0, L), $n(a, xe, w, E), En(a, xe, E, L), Sn(a, xe, w, E), Cn(a, xe, E), Tn(a, xe, w, J), qn(a, Y);
2659
2665
  const Ue = vn(a);
2660
2666
  pe(() => {
2661
2667
  if (!a.current) return;
@@ -2672,26 +2678,26 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2672
2678
  }, []);
2673
2679
  Le(() => {
2674
2680
  if (!r) return;
2675
- const o = K.current, l = a.current;
2681
+ const o = W.current, l = a.current;
2676
2682
  if (!(!o || !l)) {
2677
2683
  o.scrollTop = 0, o.scrollLeft = 0;
2678
2684
  try {
2679
2685
  const s = l.getBoundingClientRect(), b = document.createRange();
2680
2686
  b.selectNodeContents(l);
2681
- const y = Array.from(b.getClientRects());
2687
+ const m = Array.from(b.getClientRects());
2682
2688
  let k = 58;
2683
- if (y.length > 0) {
2684
- const x = Math.min(...y.map((C) => C.top)), O = 2;
2685
- let _ = 0;
2686
- for (const C of y)
2687
- Math.abs(C.top - x) <= O && (_ = Math.max(_, C.bottom));
2688
- _ > 0 && (k = Math.max(0, Math.ceil(_ - s.top)));
2689
+ if (m.length > 0) {
2690
+ const g = Math.min(...m.map((S) => S.top)), G = 2;
2691
+ let I = 0;
2692
+ for (const S of m)
2693
+ Math.abs(S.top - g) <= G && (I = Math.max(I, S.bottom));
2694
+ I > 0 && (k = Math.max(0, Math.ceil(I - s.top)));
2689
2695
  } else {
2690
- const x = window.getComputedStyle(l), O = Number.parseFloat(x.minHeight) || 0, _ = Number.parseFloat(x.paddingTop) || 0, C = Number.parseFloat(x.lineHeight) || 34;
2691
- k = Math.max(0, Math.ceil(Math.max(O, _ + C)));
2696
+ const g = window.getComputedStyle(l), G = Number.parseFloat(g.minHeight) || 0, I = Number.parseFloat(g.paddingTop) || 0, S = Number.parseFloat(g.lineHeight) || 34;
2697
+ k = Math.max(0, Math.ceil(Math.max(G, I + S)));
2692
2698
  }
2693
2699
  if (!Number.isFinite(k) || k <= 0) return;
2694
- ye((x) => x === k ? x : k);
2700
+ ye((g) => g === k ? g : k);
2695
2701
  } catch {
2696
2702
  }
2697
2703
  }
@@ -2728,15 +2734,15 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2728
2734
  de(!0);
2729
2735
  return;
2730
2736
  }
2731
- const s = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", b = a.current.querySelectorAll('[data-type="variable"]'), y = a.current.querySelectorAll('[data-type="upload"]');
2737
+ const s = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", b = a.current.querySelectorAll('[data-type="variable"]'), m = a.current.querySelectorAll('[data-type="upload"]');
2732
2738
  let k = !1;
2733
- b.forEach((O) => {
2734
- (O.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (k = !0);
2735
- }), y.forEach((O) => {
2736
- O.querySelector(".upload-inner-wrapper.has-file") && (k = !0);
2739
+ b.forEach((G) => {
2740
+ (G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (k = !0);
2741
+ }), m.forEach((G) => {
2742
+ G.querySelector(".upload-inner-wrapper.has-file") && (k = !0);
2737
2743
  });
2738
- const x = !s && !k;
2739
- de(x), t.length === 0 && J(!x);
2744
+ const g = !s && !k;
2745
+ de(g), t.length === 0 && J(!g);
2740
2746
  };
2741
2747
  o();
2742
2748
  const l = new MutationObserver(o);
@@ -2758,16 +2764,16 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2758
2764
  if (s && s.rangeCount > 0) {
2759
2765
  const b = s.anchorNode;
2760
2766
  if (b) {
2761
- let y = null;
2762
- if (b.nodeType === Node.ELEMENT_NODE ? y = b.closest('[data-type="variable"]') : b.nodeType === Node.TEXT_NODE && b.parentElement && (y = b.parentElement.closest('[data-type="variable"]')), y) {
2763
- const k = y.dataset.multiKey;
2767
+ let m = null;
2768
+ if (b.nodeType === Node.ELEMENT_NODE ? m = b.closest('[data-type="variable"]') : b.nodeType === Node.TEXT_NODE && b.parentElement && (m = b.parentElement.closest('[data-type="variable"]')), m) {
2769
+ const k = m.dataset.multiKey;
2764
2770
  if (k) {
2765
- const x = /[、,,\s\n\r\t]+/, O = l.split(x).map((_) => _.trim()).filter((_) => _.length > 0);
2766
- if (console.log("[Paste Event] 粘贴的内容:", l), console.log("[Paste Event] 拆分后的值:", O), O.length > 1) {
2767
- const _ = parseInt(y.dataset.index || "0", 10), C = t.find((se) => se.type === "multi-variable" && se.key === k)?.maxCount || 9, B = Ce[k] || 1, N = Math.min(_ + O.length, C);
2768
- N > B && Te((re) => ({
2771
+ const g = /[、,,\s\n\r\t]+/, G = l.split(g).map((I) => I.trim()).filter((I) => I.length > 0);
2772
+ if (console.log("[Paste Event] 粘贴的内容:", l), console.log("[Paste Event] 拆分后的值:", G), G.length > 1) {
2773
+ const I = parseInt(m.dataset.index || "0", 10), S = t.find((se) => se.type === "multi-variable" && se.key === k)?.maxCount || 9, B = Ce[k] || 1, A = Math.min(I + G.length, S);
2774
+ A > B && Te((re) => ({
2769
2775
  ...re,
2770
- [k]: N
2776
+ [k]: A
2771
2777
  }));
2772
2778
  const j = [];
2773
2779
  for (let re = 0; re < B; re++) {
@@ -2779,9 +2785,9 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2779
2785
  j.push(ve);
2780
2786
  }
2781
2787
  }
2782
- j.splice(_, 1, ...O.slice(0, C - _));
2783
- const te = j.slice(0, C);
2784
- te.length > 0 && te[te.length - 1] !== "" && te.length < C && te.push("");
2788
+ j.splice(I, 1, ...G.slice(0, S - I));
2789
+ const te = j.slice(0, S);
2790
+ te.length > 0 && te[te.length - 1] !== "" && te.length < S && te.push("");
2785
2791
  const F = Math.max(te.length, 1), ee = {};
2786
2792
  te.forEach((re, se) => {
2787
2793
  re && (ee[`${k}_${se}`] = re);
@@ -2798,7 +2804,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2798
2804
  [k]: F
2799
2805
  })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", te);
2800
2806
  return;
2801
- } else O.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2807
+ } else G.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2802
2808
  }
2803
2809
  }
2804
2810
  }
@@ -2806,17 +2812,17 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2806
2812
  document.execCommand("insertText", !1, l), mt(), setTimeout(() => {
2807
2813
  const b = window.getSelection();
2808
2814
  if (b && b.rangeCount > 0) {
2809
- const y = b.anchorNode;
2810
- if (y) {
2815
+ const m = b.anchorNode;
2816
+ if (m) {
2811
2817
  let k = null;
2812
- if (y.nodeType === Node.ELEMENT_NODE ? k = y.closest('[data-type="variable"]') : y.nodeType === Node.TEXT_NODE && y.parentElement && (k = y.parentElement.closest('[data-type="variable"]')), k) {
2818
+ if (m.nodeType === Node.ELEMENT_NODE ? k = m.closest('[data-type="variable"]') : m.nodeType === Node.TEXT_NODE && m.parentElement && (k = m.parentElement.closest('[data-type="variable"]')), k) {
2813
2819
  if ((k.getAttribute("data-node-type") || "") === "report-url") {
2814
- const O = k.dataset.key, _ = k.innerText.replace(/[\u200B\n]/g, "").trim();
2815
- O && Ye.current(O, _);
2820
+ const G = k.dataset.key, I = k.innerText.replace(/[\u200B\n]/g, "").trim();
2821
+ G && Ye.current(G, I);
2816
2822
  }
2817
2823
  if (k.dataset.multiKey) {
2818
- const O = k.innerText.replace(/[\u200B\n]/g, "").trim();
2819
- /[、,,\s]+/.test(O) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", O), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
2824
+ const G = k.innerText.replace(/[\u200B\n]/g, "").trim();
2825
+ /[、,,\s]+/.test(G) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", G), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
2820
2826
  }
2821
2827
  }
2822
2828
  }
@@ -2824,34 +2830,34 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2824
2830
  }, 0);
2825
2831
  }, qt = (o) => {
2826
2832
  if (!o.target.files) {
2827
- o.target && (o.target.value = ""), d(null), m(null);
2833
+ o.target && (o.target.value = ""), d(null), f(null);
2828
2834
  return;
2829
2835
  }
2830
- const l = 10 * 1024 * 1024, s = (y) => y.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(y.name || ""), b = (y) => s(y) && y.size > l;
2831
- if (f && o.target.files && o.target.files.length > 0) {
2832
- const y = f, k = t.find((C) => C.type === "upload" && C.key === y), x = Array.from(o.target.files), O = x.filter((C) => !b(C)), _ = x.length - O.length;
2833
- if (_ > 0 && G.error(`已自动过滤 ${_} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), k && typeof k.maxCount == "number" && typeof k.minCount == "number") {
2834
- const C = k.maxCount;
2836
+ const l = 10 * 1024 * 1024, s = (m) => m.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(m.name || ""), b = (m) => s(m) && m.size > l;
2837
+ if (p && o.target.files && o.target.files.length > 0) {
2838
+ const m = p, k = t.find((S) => S.type === "upload" && S.key === m), g = Array.from(o.target.files), G = g.filter((S) => !b(S)), I = g.length - G.length;
2839
+ if (I > 0 && O.error(`已自动过滤 ${I} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), k && typeof k.maxCount == "number" && typeof k.minCount == "number") {
2840
+ const S = k.maxCount;
2835
2841
  let B = 0;
2836
- W((N) => {
2837
- for (let ee = 0; ee < C; ee++) {
2838
- const le = `${y}-${ee}`;
2839
- N[le] && (B = ee + 1);
2842
+ U((A) => {
2843
+ for (let ee = 0; ee < S; ee++) {
2844
+ const le = `${m}-${ee}`;
2845
+ A[le] && (B = ee + 1);
2840
2846
  }
2841
- const j = C - B, te = O.slice(0, j), F = { ...N };
2847
+ const j = S - B, te = G.slice(0, j), F = { ...A };
2842
2848
  return te.forEach((ee, le) => {
2843
- const re = `${y}-${B + le}`;
2849
+ const re = `${m}-${B + le}`;
2844
2850
  F[re] = ee;
2845
2851
  }), F;
2846
2852
  });
2847
2853
  }
2848
2854
  } else if (z && o.target.files[0]) {
2849
- const y = o.target.files[0], k = z;
2850
- b(y) ? G.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : W((x) => ({ ...x, [k]: y }));
2855
+ const m = o.target.files[0], k = z;
2856
+ b(m) ? O.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : U((g) => ({ ...g, [k]: m }));
2851
2857
  }
2852
- o.target && (o.target.value = ""), d(null), m(null);
2858
+ o.target && (o.target.value = ""), d(null), f(null);
2853
2859
  }, ft = (o) => {
2854
- W((l) => {
2860
+ U((l) => {
2855
2861
  const s = { ...l };
2856
2862
  return delete s[o], s;
2857
2863
  });
@@ -2862,34 +2868,34 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2862
2868
  if (l.closest(".tag-close-btn")) {
2863
2869
  if (o.preventDefault(), o.stopPropagation(), D)
2864
2870
  return;
2865
- E(null), T ? T() : a.current && (a.current.innerHTML = "", a.current.focus());
2871
+ E(null), N ? N() : a.current && (a.current.innerHTML = "", a.current.focus());
2866
2872
  return;
2867
2873
  }
2868
2874
  if (D) {
2869
- const y = l.closest(".tag-node"), k = l.closest('[data-type="text"]');
2870
- if (y || k) {
2875
+ const m = l.closest(".tag-node"), k = l.closest('[data-type="text"]');
2876
+ if (m || k) {
2871
2877
  o.preventDefault(), o.stopPropagation();
2872
- const x = window.getSelection();
2873
- x && x.removeAllRanges();
2878
+ const g = window.getSelection();
2879
+ g && g.removeAllRanges();
2874
2880
  return;
2875
2881
  }
2876
2882
  }
2877
- l.closest('[data-type="variable"]') || (U.current = { x: o.clientX, y: o.clientY }, Y.current = !1, l.closest(".file-remove-btn") && (o.preventDefault(), o.stopPropagation()));
2883
+ l.closest('[data-type="variable"]') || (K.current = { x: o.clientX, y: o.clientY }, Y.current = !1, l.closest(".file-remove-btn") && (o.preventDefault(), o.stopPropagation()));
2878
2884
  }, At = (o) => {
2879
- if (!o.target.closest('[data-type="variable"]') && U.current) {
2880
- const b = Math.abs(o.clientX - U.current.x), y = Math.abs(o.clientY - U.current.y);
2881
- (b > 3 || y > 3) && (Y.current = !0);
2885
+ if (!o.target.closest('[data-type="variable"]') && K.current) {
2886
+ const b = Math.abs(o.clientX - K.current.x), m = Math.abs(o.clientY - K.current.y);
2887
+ (b > 3 || m > 3) && (Y.current = !0);
2882
2888
  }
2883
2889
  }, _t = (o) => {
2884
2890
  if (o.target.closest('[data-type="variable"]')) {
2885
- U.current = null, Y.current = !1;
2891
+ K.current = null, Y.current = !1;
2886
2892
  return;
2887
2893
  }
2888
- U.current = null, Y.current = !1;
2894
+ K.current = null, Y.current = !1;
2889
2895
  }, Lt = (o) => {
2890
2896
  if (c)
2891
2897
  return;
2892
- r && p?.(!1);
2898
+ r && x?.(!1);
2893
2899
  const l = o.target;
2894
2900
  if (l.closest('[data-type="datepicker"]'))
2895
2901
  return;
@@ -2899,10 +2905,10 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2899
2905
  }
2900
2906
  if (t.length === 0)
2901
2907
  return;
2902
- const y = (N, j) => {
2908
+ const m = (A, j) => {
2903
2909
  if (!a.current) return;
2904
2910
  Array.from(a.current.children).forEach((F) => {
2905
- if (F !== N)
2911
+ if (F !== A)
2906
2912
  if (j)
2907
2913
  F.dataset.prevDisplay === void 0 && (F.dataset.prevDisplay = F.style.display || ""), F.dataset.rteForceHidden = "1", F.style.setProperty("display", "none", "important");
2908
2914
  else {
@@ -2917,10 +2923,10 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2917
2923
  }, k = l.closest(".rte-textarea-toggle");
2918
2924
  if (k) {
2919
2925
  o.preventDefault(), o.stopPropagation();
2920
- const N = k.closest(".rte-textarea-wrapper"), j = N?.querySelector('[data-type="textarea"]'), F = !(k.getAttribute("data-expanded") === "true");
2921
- k.setAttribute("data-expanded", String(F)), k.textContent = F ? "收起" : "展开", N && N.classList.toggle("rte-textarea-expanded", F);
2922
- const ee = N?.closest(".rte-textarea-required");
2923
- if (ee ? ee.classList.toggle("rte-textarea-overlay", F) : N && N.classList.toggle("rte-textarea-overlay", F), j)
2926
+ const A = k.closest(".rte-textarea-wrapper"), j = A?.querySelector('[data-type="textarea"]'), F = !(k.getAttribute("data-expanded") === "true");
2927
+ k.setAttribute("data-expanded", String(F)), k.textContent = F ? "收起" : "展开", A && A.classList.toggle("rte-textarea-expanded", F);
2928
+ const ee = A?.closest(".rte-textarea-required");
2929
+ if (ee ? ee.classList.toggle("rte-textarea-overlay", F) : A && A.classList.toggle("rte-textarea-overlay", F), j)
2924
2930
  if (F)
2925
2931
  j.classList.add("rte-textarea-expanded"), j.style.maxHeight = "none", j.style.height = "100%";
2926
2932
  else {
@@ -2931,17 +2937,17 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2931
2937
  a.current && (F ? a.current.classList.add("rte-overlay-active") : a.current.classList.remove("rte-overlay-active"));
2932
2938
  return;
2933
2939
  }
2934
- const x = l.closest(".rte-richtext-toggle");
2935
- if (x) {
2940
+ const g = l.closest(".rte-richtext-toggle");
2941
+ if (g) {
2936
2942
  o.preventDefault(), o.stopPropagation();
2937
- const N = x.closest(".rte-richtext-wrapper"), j = N?.querySelector('[data-type="richtext"]'), F = !(x.getAttribute("data-expanded") === "true");
2943
+ const A = g.closest(".rte-richtext-wrapper"), j = A?.querySelector('[data-type="richtext"]'), F = !(g.getAttribute("data-expanded") === "true");
2938
2944
  ((se, me) => {
2939
2945
  se.setAttribute("data-expanded", String(me)), se.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>';
2940
- })(x, F);
2941
- const le = N?.closest(".rte-richtext-required");
2942
- le ? le.classList.toggle("rte-richtext-expanded", F) : N && N.classList.toggle("rte-richtext-expanded", F);
2943
- const re = N?.closest(".exclusion-wrapper") || N?.parentElement;
2944
- if (j && (F ? (j.style.height = "100%", j.style.overflow = "auto") : (j.style.height = "", j.style.overflow = "")), re && (re.classList.toggle("rte-richtext-host-expanded", F), y(re, F)), a.current) {
2946
+ })(g, F);
2947
+ const le = A?.closest(".rte-richtext-required");
2948
+ le ? le.classList.toggle("rte-richtext-expanded", F) : A && A.classList.toggle("rte-richtext-expanded", F);
2949
+ const re = A?.closest(".exclusion-wrapper") || A?.parentElement;
2950
+ if (j && (F ? (j.style.height = "100%", j.style.overflow = "auto") : (j.style.height = "", j.style.overflow = "")), re && (re.classList.toggle("rte-richtext-host-expanded", F), m(re, F)), a.current) {
2945
2951
  if (a.current.classList.toggle("rte-richtext-fullscreen-active", F), Q.current?.classList.toggle("rte-richtext-container-expanded", F), Q.current)
2946
2952
  if (F) {
2947
2953
  const se = Math.ceil(Q.current.getBoundingClientRect().height || 0);
@@ -2963,8 +2969,8 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2963
2969
  }
2964
2970
  if (l.closest('[data-type="text"]')) {
2965
2971
  o.preventDefault(), o.stopPropagation();
2966
- const N = window.getSelection();
2967
- N && N.removeAllRanges();
2972
+ const A = window.getSelection();
2973
+ A && A.removeAllRanges();
2968
2974
  return;
2969
2975
  }
2970
2976
  if (D && l.closest(".tag-node")) {
@@ -2977,21 +2983,21 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
2977
2983
  if (Y.current)
2978
2984
  return;
2979
2985
  setTimeout(() => {
2980
- const N = window.getSelection();
2981
- N && !N.isCollapsed || Ze(a);
2986
+ const A = window.getSelection();
2987
+ A && !A.isCollapsed || Ze(a);
2982
2988
  }, 10);
2983
2989
  return;
2984
2990
  }
2985
- const C = l.closest(".file-remove-btn");
2986
- if (C) {
2991
+ const S = l.closest(".file-remove-btn");
2992
+ if (S) {
2987
2993
  o.preventDefault(), o.stopPropagation();
2988
- const N = C.closest('[data-type="upload"]'), j = N?.dataset.key, te = N?.dataset.batchKey;
2994
+ const A = S.closest('[data-type="upload"]'), j = A?.dataset.key, te = A?.dataset.batchKey;
2989
2995
  if (j)
2990
2996
  if (te) {
2991
2997
  const F = t.find((ee) => ee.type === "upload" && ee.key === te);
2992
2998
  if (F && typeof F.maxCount == "number" && typeof F.minCount == "number") {
2993
2999
  const ee = F.maxCount;
2994
- W((le) => {
3000
+ U((le) => {
2995
3001
  const re = { ...le }, se = [];
2996
3002
  for (let me = 0; me < ee; me++) {
2997
3003
  const ve = `${te}-${me}`, Se = re[ve];
@@ -3011,9 +3017,9 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3011
3017
  }
3012
3018
  const B = l.closest('[data-type="upload"]');
3013
3019
  if (B) {
3014
- const N = B.dataset.key, j = B.dataset.batchKey;
3015
- if (N) {
3016
- const te = j || N, F = t.find((ee) => ee.type === "upload" && ee.key === te);
3020
+ const A = B.dataset.key, j = B.dataset.batchKey;
3021
+ if (A) {
3022
+ const te = j || A, F = t.find((ee) => ee.type === "upload" && ee.key === te);
3017
3023
  if (V.current && (F?.accept ? V.current.accept = F.accept : F?.acceptType === "image" ? V.current.accept = "image/*" : F?.acceptType === "file" ? V.current.accept = ".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json" : V.current.accept = ""), j) {
3018
3024
  const ee = t.find((le) => le.type === "upload" && le.key === j);
3019
3025
  if (ee && typeof ee.maxCount == "number" && typeof ee.minCount == "number") {
@@ -3021,28 +3027,28 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3021
3027
  let re = 0;
3022
3028
  for (let se = 0; se < le; se++)
3023
3029
  w[`${j}-${se}`] != null && (re += 1);
3024
- re < le && V.current ? (V.current.multiple = !0, m(j), V.current.click()) : (V.current && (V.current.multiple = !1), d(N), V.current?.click());
3030
+ re < le && V.current ? (V.current.multiple = !0, f(j), V.current.click()) : (V.current && (V.current.multiple = !1), d(A), V.current?.click());
3025
3031
  } else
3026
- V.current && (V.current.multiple = !1), d(N), V.current?.click();
3032
+ V.current && (V.current.multiple = !1), d(A), V.current?.click();
3027
3033
  } else
3028
- V.current && (V.current.multiple = !1), d(N), V.current?.click();
3034
+ V.current && (V.current.multiple = !1), d(A), V.current?.click();
3029
3035
  }
3030
3036
  return;
3031
3037
  }
3032
- }, Mt = (o) => {
3038
+ }, It = (o) => {
3033
3039
  const s = o.target.closest('[data-type="variable"]');
3034
3040
  if (s) {
3035
3041
  const b = window.getSelection();
3036
3042
  if (b) {
3037
- const y = document.createRange(), k = s.textContent || "";
3043
+ const m = document.createRange(), k = s.textContent || "";
3038
3044
  if (k.replace(/\u200B/g, "")) {
3039
- let O = 0, _ = k.length;
3040
- k.startsWith("​") && (O = 1), k.endsWith("​") && k.length > 1 && (_ = k.length - 1);
3041
- const C = s.firstChild;
3042
- C && C.nodeType === Node.TEXT_NODE ? (y.setStart(C, O), y.setEnd(C, _)) : y.selectNodeContents(s);
3045
+ let G = 0, I = k.length;
3046
+ k.startsWith("​") && (G = 1), k.endsWith("​") && k.length > 1 && (I = k.length - 1);
3047
+ const S = s.firstChild;
3048
+ S && S.nodeType === Node.TEXT_NODE ? (m.setStart(S, G), m.setEnd(S, I)) : m.selectNodeContents(s);
3043
3049
  } else
3044
- y.selectNodeContents(s), y.collapse(!0);
3045
- b.removeAllRanges(), b.addRange(y);
3050
+ m.selectNodeContents(s), m.collapse(!0);
3051
+ b.removeAllRanges(), b.addRange(m);
3046
3052
  }
3047
3053
  }
3048
3054
  }, mt = () => {
@@ -3058,9 +3064,9 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3058
3064
  ).forEach((s) => {
3059
3065
  const b = s.dataset.key;
3060
3066
  if (!b) return;
3061
- s.innerText.replace(/[\u200B\n]/g, "").trim() || Me((k) => {
3062
- const x = k[b];
3063
- return !x || x.status === "idle" && (!x.modules || x.modules.length === 0) ? k : {
3067
+ s.innerText.replace(/[\u200B\n]/g, "").trim() || Ie((k) => {
3068
+ const g = k[b];
3069
+ return !g || g.status === "idle" && (!g.modules || g.modules.length === 0) ? k : {
3064
3070
  ...k,
3065
3071
  [b]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
3066
3072
  };
@@ -3068,47 +3074,47 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3068
3074
  }), a.current && a.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
3069
3075
  const b = s.querySelector(".variable-info-icon");
3070
3076
  if (b) {
3071
- let y = !1;
3077
+ let m = !1;
3072
3078
  const k = document.createTreeWalker(
3073
3079
  s,
3074
3080
  NodeFilter.SHOW_TEXT,
3075
3081
  {
3076
- acceptNode: (x) => b.contains(x) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
3082
+ acceptNode: (g) => b.contains(g) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
3077
3083
  }
3078
3084
  );
3079
3085
  for (; k.nextNode(); )
3080
3086
  if (k.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
3081
- y = !0;
3087
+ m = !0;
3082
3088
  break;
3083
3089
  }
3084
- y ? b.classList.add("hidden") : b.classList.remove("hidden");
3090
+ m ? b.classList.add("hidden") : b.classList.remove("hidden");
3085
3091
  }
3086
3092
  }), r || window.requestAnimationFrame(() => {
3087
3093
  Xe();
3088
3094
  }), et(a, xe, w), tt(a, xe, w, J), !a.current) return;
3089
3095
  t.filter((l) => l.type === "multi-variable" && l.key).forEach((l) => {
3090
3096
  if (!l.key) return;
3091
- const s = l.maxCount || 9, b = Ce[l.key] || 1, y = [];
3092
- for (let C = 0; C < b; C++) {
3093
- const B = `${l.key}_${C}`, N = a.current.querySelector(
3097
+ const s = l.maxCount || 9, b = Ce[l.key] || 1, m = [];
3098
+ for (let S = 0; S < b; S++) {
3099
+ const B = `${l.key}_${S}`, A = a.current.querySelector(
3094
3100
  `[data-type="variable"][data-key="${B}"][data-multi-key="${l.key}"]`
3095
3101
  );
3096
- if (N) {
3097
- const j = N.innerText.replace(/[\u200B\n]/g, "").trim();
3098
- y.push(j);
3102
+ if (A) {
3103
+ const j = A.innerText.replace(/[\u200B\n]/g, "").trim();
3104
+ m.push(j);
3099
3105
  }
3100
3106
  }
3101
- const x = (y[y.length - 1] || "") === "";
3102
- let O = !1, _ = -1;
3103
- for (let C = 0; C < y.length - 1; C++)
3104
- if (y[C] === "") {
3105
- O = !0, _ = C;
3107
+ const g = (m[m.length - 1] || "") === "";
3108
+ let G = !1, I = -1;
3109
+ for (let S = 0; S < m.length - 1; S++)
3110
+ if (m[S] === "") {
3111
+ G = !0, I = S;
3106
3112
  break;
3107
3113
  }
3108
- if (O && _ >= 0) {
3109
- const C = window.getSelection();
3110
- if (C && C.rangeCount > 0) {
3111
- const F = C.getRangeAt(0), ee = F.startContainer, le = ee.nodeType === Node.ELEMENT_NODE ? ee.closest('[data-type="variable"][data-multi-key]') : ee.parentElement?.closest('[data-type="variable"][data-multi-key]');
3114
+ if (G && I >= 0) {
3115
+ const S = window.getSelection();
3116
+ if (S && S.rangeCount > 0) {
3117
+ const F = S.getRangeAt(0), ee = F.startContainer, le = ee.nodeType === Node.ELEMENT_NODE ? ee.closest('[data-type="variable"][data-multi-key]') : ee.parentElement?.closest('[data-type="variable"][data-multi-key]');
3112
3118
  if (le) {
3113
3119
  const re = le.dataset.key;
3114
3120
  if (re) {
@@ -3119,34 +3125,34 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3119
3125
  }
3120
3126
  }
3121
3127
  }
3122
- const B = [...y];
3123
- for (let F = _; F < B.length - 1; F++)
3128
+ const B = [...m];
3129
+ for (let F = I; F < B.length - 1; F++)
3124
3130
  B[F] = B[F + 1];
3125
3131
  B.pop();
3126
- const N = {};
3132
+ const A = {};
3127
3133
  B.forEach((F, ee) => {
3128
- F && (N[`${l.key}_${ee}`] = F);
3134
+ F && (A[`${l.key}_${ee}`] = F);
3129
3135
  });
3130
- const j = Math.max(x ? B.length : B.length + 1, 1);
3136
+ const j = Math.max(g ? B.length : B.length + 1, 1);
3131
3137
  a.current.querySelectorAll(
3132
3138
  '[data-type="variable"]'
3133
3139
  ).forEach((F) => {
3134
3140
  const ee = F.dataset.key, le = F.dataset.multiKey;
3135
3141
  if (ee && le !== l.key) {
3136
3142
  const re = F.innerText.replace(/[\u200B\n]/g, "").trim();
3137
- re && (N[ee] = re);
3143
+ re && (A[ee] = re);
3138
3144
  }
3139
- }), a.current.__tempVariableValues = N, Te((F) => ({
3145
+ }), a.current.__tempVariableValues = A, Te((F) => ({
3140
3146
  ...F,
3141
3147
  [l.key]: j
3142
3148
  }));
3143
3149
  return;
3144
3150
  }
3145
- if (!x) {
3146
- const C = b - 1, B = `${l.key}_${C}`, N = a.current.querySelector(
3151
+ if (!g) {
3152
+ const S = b - 1, B = `${l.key}_${S}`, A = a.current.querySelector(
3147
3153
  `[data-type="variable"][data-key="${B}"][data-multi-key="${l.key}"]`
3148
3154
  );
3149
- if (N && N.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && b < s) {
3155
+ if (A && A.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && b < s) {
3150
3156
  const te = window.getSelection();
3151
3157
  if (te && te.rangeCount > 0) {
3152
3158
  const F = te.getRangeAt(0), ee = F.startContainer, le = ee.nodeType === Node.ELEMENT_NODE ? ee.closest('[data-type="variable"][data-multi-key]') : ee.parentElement?.closest('[data-type="variable"][data-multi-key]');
@@ -3172,12 +3178,12 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3172
3178
  const o = a.current;
3173
3179
  if (!o) return;
3174
3180
  const l = /* @__PURE__ */ new Map(), s = (k) => {
3175
- const x = k.target, O = k.relatedTarget;
3176
- !x || !a.current || !a.current.contains(x) || O && a.current.contains(O) || setTimeout(() => {
3181
+ const g = k.target, G = k.relatedTarget;
3182
+ !g || !a.current || !a.current.contains(g) || G && a.current.contains(G) || setTimeout(() => {
3177
3183
  if (a.current) {
3178
3184
  if (t.length === 0) {
3179
- const _ = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3180
- J(_.length > 0);
3185
+ const I = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3186
+ J(I.length > 0);
3181
3187
  return;
3182
3188
  }
3183
3189
  Ze(a), et(a, xe, w), tt(a, xe, w, J);
@@ -3187,32 +3193,32 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3187
3193
  o.addEventListener("blur", s, !0);
3188
3194
  const b = () => {
3189
3195
  if (!a.current) return;
3190
- l.forEach((O, _) => {
3191
- _.removeEventListener("blur", O, !1);
3196
+ l.forEach((G, I) => {
3197
+ I.removeEventListener("blur", G, !1);
3192
3198
  }), l.clear();
3193
3199
  const k = a.current.querySelectorAll(
3194
3200
  '[data-type="variable"][data-multi-key]'
3195
- ), x = (O) => {
3196
- O.stopPropagation(), O.stopImmediatePropagation();
3197
- const _ = O.target;
3198
- if (!_ || !a.current || !a.current.contains(_))
3201
+ ), g = (G) => {
3202
+ G.stopPropagation(), G.stopImmediatePropagation();
3203
+ const I = G.target;
3204
+ if (!I || !a.current || !a.current.contains(I))
3199
3205
  return;
3200
- const C = _.closest('[data-type="variable"][data-multi-key]');
3201
- if (!C || !a.current.contains(C))
3206
+ const S = I.closest('[data-type="variable"][data-multi-key]');
3207
+ if (!S || !a.current.contains(S))
3202
3208
  return;
3203
3209
  let B = !1;
3204
3210
  if (l.forEach((se, me) => {
3205
- (me === C || me.contains(_)) && (B = !0);
3211
+ (me === S || me.contains(I)) && (B = !0);
3206
3212
  }), !B)
3207
3213
  return;
3208
- const N = C.dataset.multiKey, j = C.dataset.key, te = C.dataset.index;
3209
- if (!N || !j || te === void 0) return;
3210
- const F = O.relatedTarget;
3214
+ const A = S.dataset.multiKey, j = S.dataset.key, te = S.dataset.index;
3215
+ if (!A || !j || te === void 0) return;
3216
+ const F = G.relatedTarget;
3211
3217
  if (!(!F || !a.current.contains(F)))
3212
3218
  return;
3213
- const le = C.innerText.replace(/[\u200B\n]/g, "").trim();
3219
+ const le = S.innerText.replace(/[\u200B\n]/g, "").trim();
3214
3220
  console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
3215
- multiKey: N,
3221
+ multiKey: A,
3216
3222
  currentKey: j,
3217
3223
  index: te,
3218
3224
  content: le
@@ -3223,12 +3229,12 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3223
3229
  console.log("[Blur Event] 拆分前的内容:", le), console.log("[Blur Event] 拆分后的部分:", se);
3224
3230
  const ve = se.slice(0, 9);
3225
3231
  if (console.log("[Blur Event] 有效的部分(最多9个):", ve), ve.length > 1) {
3226
- const Se = t.find((De) => De.type === "multi-variable" && De.key === N);
3232
+ const Se = t.find((De) => De.type === "multi-variable" && De.key === A);
3227
3233
  if (Se) {
3228
- const De = Ce[N] || 1, yt = parseInt(te, 10), ht = Se.maxCount || 9, Pe = [];
3234
+ const De = Ce[A] || 1, yt = parseInt(te, 10), ht = Se.maxCount || 9, Pe = [];
3229
3235
  for (let we = 0; we < De; we++) {
3230
- const _e = `${N}_${we}`, Be = a.current.querySelector(
3231
- `[data-type="variable"][data-key="${_e}"][data-multi-key="${N}"]`
3236
+ const _e = `${A}_${we}`, Be = a.current.querySelector(
3237
+ `[data-type="variable"][data-key="${_e}"][data-multi-key="${A}"]`
3232
3238
  );
3233
3239
  if (Be) {
3234
3240
  const He = Be.innerText.replace(/[\u200B\n]/g, "").trim();
@@ -3240,36 +3246,36 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3240
3246
  console.log("[Blur Event] 拆分后的所有值:", qe), qe.length > 0 && qe[qe.length - 1] !== "" && qe.length < ht && qe.push("");
3241
3247
  const Ot = Math.max(qe.length, 1), Je = {};
3242
3248
  qe.forEach((we, _e) => {
3243
- we && (Je[`${N}_${_e}`] = we);
3249
+ we && (Je[`${A}_${_e}`] = we);
3244
3250
  }), a.current.querySelectorAll(
3245
3251
  '[data-type="variable"]'
3246
3252
  ).forEach((we) => {
3247
3253
  const _e = we.dataset.key, Be = we.dataset.multiKey;
3248
- if (_e && Be !== N) {
3254
+ if (_e && Be !== A) {
3249
3255
  const He = we.innerText.replace(/[\u200B\n]/g, "").trim();
3250
3256
  He && (Je[_e] = He);
3251
3257
  }
3252
3258
  }), a.current.__tempVariableValues = Je, Te((we) => ({
3253
3259
  ...we,
3254
- [N]: Ot
3260
+ [A]: Ot
3255
3261
  }));
3256
3262
  }
3257
3263
  }
3258
3264
  }
3259
3265
  };
3260
- k.forEach((O) => {
3261
- O.addEventListener("blur", x, !1), l.set(O, x);
3266
+ k.forEach((G) => {
3267
+ G.addEventListener("blur", g, !1), l.set(G, g);
3262
3268
  });
3263
- }, y = setTimeout(() => {
3269
+ }, m = setTimeout(() => {
3264
3270
  b();
3265
3271
  }, 0);
3266
3272
  return () => {
3267
- clearTimeout(y), o.removeEventListener("blur", s, !0), l.forEach((k, x) => {
3268
- x.removeEventListener("blur", k, !1);
3273
+ clearTimeout(m), o.removeEventListener("blur", s, !0), l.forEach((k, g) => {
3274
+ g.removeEventListener("blur", k, !1);
3269
3275
  }), l.clear();
3270
3276
  };
3271
3277
  }, [t, xe, Ce, w]);
3272
- const It = (o) => {
3278
+ const Mt = (o) => {
3273
3279
  if (c) {
3274
3280
  o.preventDefault();
3275
3281
  return;
@@ -3284,10 +3290,10 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3284
3290
  let b = null;
3285
3291
  if (s && (s.nodeType === Node.ELEMENT_NODE ? b = s.closest('[data-type="text"]') : s.nodeType === Node.TEXT_NODE && s.parentElement && (b = s.parentElement.closest('[data-type="text"]'))), b) {
3286
3292
  if (o.preventDefault(), o.stopPropagation(), a.current) {
3287
- const y = a.current.querySelector(
3293
+ const m = a.current.querySelector(
3288
3294
  '[data-type="variable"], [data-type="upload"]'
3289
3295
  );
3290
- y && y.focus();
3296
+ m && m.focus();
3291
3297
  }
3292
3298
  return;
3293
3299
  }
@@ -3297,10 +3303,10 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3297
3303
  let b = null;
3298
3304
  if (s && (s.nodeType === Node.ELEMENT_NODE ? b = s.closest(".tag-node") : s.nodeType === Node.TEXT_NODE && s.parentElement && (b = s.parentElement.closest(".tag-node"))), b) {
3299
3305
  if (o.preventDefault(), o.stopPropagation(), a.current) {
3300
- const y = a.current.querySelector(
3306
+ const m = a.current.querySelector(
3301
3307
  '[data-type="variable"], [data-type="upload"]'
3302
3308
  );
3303
- y && y.focus();
3309
+ m && m.focus();
3304
3310
  }
3305
3311
  return;
3306
3312
  }
@@ -3315,24 +3321,24 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3315
3321
  if (o.key === "Backspace") {
3316
3322
  const s = window.getSelection();
3317
3323
  if (s && s.rangeCount > 0) {
3318
- const b = s.getRangeAt(0), y = s.anchorNode;
3324
+ const b = s.getRangeAt(0), m = s.anchorNode;
3319
3325
  if (D) {
3320
- let x = null, O = null;
3321
- if (y && (y.nodeType === Node.ELEMENT_NODE ? (x = y.closest(".tag-node"), O = y.closest('[data-type="text"]')) : y.nodeType === Node.TEXT_NODE && y.parentElement && (x = y.parentElement.closest(".tag-node"), O = y.parentElement.closest('[data-type="text"]'))), (x || O) && b.collapsed && b.startOffset === 0) {
3326
+ let g = null, G = null;
3327
+ if (m && (m.nodeType === Node.ELEMENT_NODE ? (g = m.closest(".tag-node"), G = m.closest('[data-type="text"]')) : m.nodeType === Node.TEXT_NODE && m.parentElement && (g = m.parentElement.closest(".tag-node"), G = m.parentElement.closest('[data-type="text"]'))), (g || G) && b.collapsed && b.startOffset === 0) {
3322
3328
  o.preventDefault();
3323
3329
  return;
3324
3330
  }
3325
3331
  }
3326
3332
  let k = null;
3327
- if (y && (y.nodeType === Node.ELEMENT_NODE ? k = y.closest(
3333
+ if (m && (m.nodeType === Node.ELEMENT_NODE ? k = m.closest(
3328
3334
  '[data-type="variable"]'
3329
- ) : y.nodeType === Node.TEXT_NODE && y.parentElement && (k = y.parentElement.closest(
3335
+ ) : m.nodeType === Node.TEXT_NODE && m.parentElement && (k = m.parentElement.closest(
3330
3336
  '[data-type="variable"]'
3331
3337
  ))), k) {
3332
3338
  if (!b.collapsed)
3333
3339
  return;
3334
- const x = k.innerText;
3335
- if (x === "​" || x === "") {
3340
+ const g = k.innerText;
3341
+ if (g === "​" || g === "") {
3336
3342
  o.preventDefault();
3337
3343
  return;
3338
3344
  }
@@ -3340,7 +3346,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3340
3346
  o.preventDefault();
3341
3347
  return;
3342
3348
  }
3343
- if (x.startsWith("​") && b.startOffset === 1) {
3349
+ if (g.startsWith("​") && b.startOffset === 1) {
3344
3350
  o.preventDefault();
3345
3351
  return;
3346
3352
  }
@@ -3348,14 +3354,14 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3348
3354
  }
3349
3355
  }
3350
3356
  }, Dt = () => {
3351
- if (u || c || S || !Z || !a.current) return;
3357
+ if (u || c || T || !Z || !a.current) return;
3352
3358
  if (t.length === 0) {
3353
3359
  const k = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3354
3360
  if (!k) return;
3355
- if (g(k, k), a.current) {
3361
+ if (h(k, k), a.current) {
3356
3362
  a.current.textContent = "";
3357
- const x = new Event("input", { bubbles: !0 });
3358
- a.current.dispatchEvent(x);
3363
+ const g = new Event("input", { bubbles: !0 });
3364
+ a.current.dispatchEvent(g);
3359
3365
  }
3360
3366
  return;
3361
3367
  }
@@ -3366,106 +3372,106 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3366
3372
  if (k.nodeType === Node.TEXT_NODE)
3367
3373
  l += (k.textContent || "").replace(/\u200B/g, "");
3368
3374
  else if (k.nodeType === Node.ELEMENT_NODE) {
3369
- const x = k, O = x.dataset.type, _ = x.dataset.key;
3370
- if (O === "variable" && _) {
3371
- let C = "";
3375
+ const g = k, G = g.dataset.type, I = g.dataset.key;
3376
+ if (G === "variable" && I) {
3377
+ let S = "";
3372
3378
  const B = document.createTreeWalker(
3373
- x,
3379
+ g,
3374
3380
  NodeFilter.SHOW_TEXT,
3375
3381
  {
3376
3382
  acceptNode: (j) => {
3377
- const te = x.querySelector(".variable-info-icon");
3383
+ const te = g.querySelector(".variable-info-icon");
3378
3384
  return te && te.contains(j) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3379
3385
  }
3380
3386
  }
3381
3387
  );
3382
3388
  for (; B.nextNode(); )
3383
- C += B.currentNode.textContent || "";
3384
- const N = C.replace(/[\u200B\n]/g, "").trim();
3385
- if (N) {
3386
- const j = x.dataset.multiKey;
3389
+ S += B.currentNode.textContent || "";
3390
+ const A = S.replace(/[\u200B\n]/g, "").trim();
3391
+ if (A) {
3392
+ const j = g.dataset.multiKey;
3387
3393
  if (j) {
3388
3394
  (!s[j] || !Array.isArray(s[j])) && (s[j] = []);
3389
3395
  const te = s[j];
3390
- te.push(N), te.length > 1 && (l += " "), l += N;
3396
+ te.push(A), te.length > 1 && (l += " "), l += A;
3391
3397
  } else
3392
- s[_] = N, l += N;
3393
- if (x.dataset.nodeType === "report-url")
3398
+ s[I] = A, l += A;
3399
+ if (g.dataset.nodeType === "report-url")
3394
3400
  if (s.url === void 0)
3395
- s.url = N;
3401
+ s.url = A;
3396
3402
  else {
3397
3403
  const te = s.url;
3398
- Array.isArray(te) ? te.push(N) : s.url = [String(te), N];
3404
+ Array.isArray(te) ? te.push(A) : s.url = [String(te), A];
3399
3405
  }
3400
3406
  }
3401
- } else if (O === "select" && _) {
3402
- const C = (x.getAttribute("data-value") || "").trim();
3403
- C && (s[_] = C, l += C);
3404
- } else if (O === "textarea" && _) {
3405
- const B = (x.value || "").replace(/\u200B/g, "").trim();
3406
- B && (s[_] = B, l += B);
3407
- } else if (O === "richtext" && _) {
3408
- const C = x, B = C.dataset.nodeType, N = (C.textContent || "").replace(/\u200B/g, "").trim();
3409
- if (N)
3407
+ } else if (G === "select" && I) {
3408
+ const S = (g.getAttribute("data-value") || "").trim();
3409
+ S && (s[I] = S, l += S);
3410
+ } else if (G === "textarea" && I) {
3411
+ const B = (g.value || "").replace(/\u200B/g, "").trim();
3412
+ B && (s[I] = B, l += B);
3413
+ } else if (G === "richtext" && I) {
3414
+ const S = g, B = S.dataset.nodeType, A = (S.textContent || "").replace(/\u200B/g, "").trim();
3415
+ if (A)
3410
3416
  if (B === "report-module") {
3411
- (!s[_] || !Array.isArray(s[_])) && (s[_] = []);
3412
- const j = s[_];
3413
- j.push(N), j.length > 1 && (l += " "), l += N;
3417
+ (!s[I] || !Array.isArray(s[I])) && (s[I] = []);
3418
+ const j = s[I];
3419
+ j.push(A), j.length > 1 && (l += " "), l += A;
3414
3420
  } else
3415
- s[_] = N, l += N;
3416
- } else if (O === "datepicker" && _) {
3417
- const B = (x.getAttribute("data-value") || "").trim();
3421
+ s[I] = A, l += A;
3422
+ } else if (G === "datepicker" && I) {
3423
+ const B = (g.getAttribute("data-value") || "").trim();
3418
3424
  if (B)
3419
3425
  if (B.includes(",")) {
3420
- const N = B.split(",");
3421
- N.length === 2 ? (s[_] = N, l += `[${N[0]}, ${N[1]}]`) : (s[_] = B, l += B);
3426
+ const A = B.split(",");
3427
+ A.length === 2 ? (s[I] = A, l += `[${A[0]}, ${A[1]}]`) : (s[I] = B, l += B);
3422
3428
  } else
3423
- s[_] = B, l += B;
3424
- } else if (O === "number-input" && _) {
3425
- const B = (x.value || "").trim();
3426
- B && (s[_] = B, l += B);
3427
- } else if (O === "upload" && _) {
3428
- const C = x.dataset.batchKey;
3429
- if (C) {
3430
- const B = t.find((N) => N.type === "upload" && N.key === C);
3429
+ s[I] = B, l += B;
3430
+ } else if (G === "number-input" && I) {
3431
+ const B = (g.value || "").trim();
3432
+ B && (s[I] = B, l += B);
3433
+ } else if (G === "upload" && I) {
3434
+ const S = g.dataset.batchKey;
3435
+ if (S) {
3436
+ const B = t.find((A) => A.type === "upload" && A.key === S);
3431
3437
  if (B && typeof B.maxCount == "number" && typeof B.minCount == "number") {
3432
- const N = [];
3438
+ const A = [];
3433
3439
  for (let j = 0; j < B.maxCount; j++) {
3434
- const te = `${C}-${j}`, F = w[te];
3435
- F && N.push(F);
3440
+ const te = `${S}-${j}`, F = w[te];
3441
+ F && A.push(F);
3436
3442
  }
3437
- s[C] || (s[C] = N.length > 0 ? N : null, N.length > 0 && (l += ` [附带${N.length}个文件: ${N.map((j) => j.name).join(", ")}] `));
3443
+ s[S] || (s[S] = A.length > 0 ? A : null, A.length > 0 && (l += ` [附带${A.length}个文件: ${A.map((j) => j.name).join(", ")}] `));
3438
3444
  } else
3439
- s[_] = w[_] ?? null, w[_] && (l += ` [附带文件: ${w[_]?.name}] `);
3445
+ s[I] = w[I] ?? null, w[I] && (l += ` [附带文件: ${w[I]?.name}] `);
3440
3446
  } else
3441
- s[_] = w[_] ?? null, w[_] && (l += ` [附带文件: ${w[_]?.name}] `);
3447
+ s[I] = w[I] ?? null, w[I] && (l += ` [附带文件: ${w[I]?.name}] `);
3442
3448
  } else {
3443
- if (x.classList.contains("tag-close-btn") || x.classList.contains("file-remove-btn")) return;
3444
- x.getAttribute("contenteditable") === "false" && !O && x.classList.contains("tag-node") ? l += x.innerText : x.childNodes.forEach(b);
3449
+ if (g.classList.contains("tag-close-btn") || g.classList.contains("file-remove-btn")) return;
3450
+ g.getAttribute("contenteditable") === "false" && !G && g.classList.contains("tag-node") ? l += g.innerText : g.childNodes.forEach(b);
3445
3451
  }
3446
3452
  }
3447
3453
  }
3448
3454
  };
3449
3455
  if (o.childNodes.forEach(b), l = l.trim(), !l) return;
3450
- const y = new FormData();
3451
- y.append("fullPrompt", l), Object.keys(s).forEach((k) => {
3452
- const x = s[k];
3453
- if (x != null)
3454
- if (x instanceof File)
3455
- y.append(k, x);
3456
- else if (Array.isArray(x)) {
3457
- const O = t.some(
3456
+ const m = new FormData();
3457
+ m.append("fullPrompt", l), Object.keys(s).forEach((k) => {
3458
+ const g = s[k];
3459
+ if (g != null)
3460
+ if (g instanceof File)
3461
+ m.append(k, g);
3462
+ else if (Array.isArray(g)) {
3463
+ const G = t.some(
3458
3464
  (B) => B.type === "multi-variable" && B.key === k
3459
- ), _ = t.some(
3465
+ ), I = t.some(
3460
3466
  (B) => B.type === "report-url" && B.key === k
3461
3467
  );
3462
- O || _ || k === "url" ? x.forEach((B) => {
3463
- B != null && B !== "" && y.append(k, String(B));
3464
- }) : x.forEach((B, N) => {
3465
- B != null && (B instanceof File ? y.append(`${k}[${N}]`, B) : typeof B == "string" ? y.append(`${k}[${N}]`, B) : y.append(`${k}[${N}]`, String(B)));
3468
+ G || I || k === "url" ? g.forEach((B) => {
3469
+ B != null && B !== "" && m.append(k, String(B));
3470
+ }) : g.forEach((B, A) => {
3471
+ B != null && (B instanceof File ? m.append(`${k}[${A}]`, B) : typeof B == "string" ? m.append(`${k}[${A}]`, B) : m.append(`${k}[${A}]`, String(B)));
3466
3472
  });
3467
- } else typeof x == "string" ? y.append(k, x) : y.append(k, String(x));
3468
- }), g(y, l);
3473
+ } else typeof g == "string" ? m.append(k, g) : m.append(k, String(g));
3474
+ }), h(m, l);
3469
3475
  }, Pt = {
3470
3476
  ...v ? { width: typeof v == "number" ? `${v}px` : v } : {},
3471
3477
  ...R ? { border: R } : {},
@@ -3491,12 +3497,12 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3491
3497
  "data-disabled": c,
3492
3498
  ref: Q,
3493
3499
  children: [
3494
- M,
3500
+ C,
3495
3501
  /* @__PURE__ */ H(
3496
3502
  "div",
3497
3503
  {
3498
3504
  className: "rich-text-editor-content",
3499
- ref: K,
3505
+ ref: W,
3500
3506
  style: Ht,
3501
3507
  children: /* @__PURE__ */ ce(
3502
3508
  "div",
@@ -3509,17 +3515,17 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3509
3515
  "div",
3510
3516
  {
3511
3517
  ref: a,
3512
- className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${fe && L ? "rte-editor-empty" : ""}`,
3518
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${fe && _ ? "rte-editor-empty" : ""}`,
3513
3519
  contentEditable: t.length === 0,
3514
3520
  suppressContentEditableWarning: !0,
3515
- "data-placeholder": L,
3521
+ "data-placeholder": _,
3516
3522
  onMouseDown: Nt,
3517
3523
  onMouseMove: At,
3518
3524
  onMouseUp: _t,
3519
3525
  onClick: Lt,
3520
- onDoubleClick: Mt,
3526
+ onDoubleClick: It,
3521
3527
  onInput: mt,
3522
- onKeyDown: It,
3528
+ onKeyDown: Mt,
3523
3529
  onPaste: Tt
3524
3530
  }
3525
3531
  ),
@@ -3544,12 +3550,12 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3544
3550
  /* @__PURE__ */ H("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
3545
3551
  /* @__PURE__ */ H("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
3546
3552
  ] }),
3547
- A !== "hideAgent" && /* @__PURE__ */ H(
3553
+ L !== "hideAgent" && /* @__PURE__ */ H(
3548
3554
  Ut,
3549
3555
  {
3550
3556
  placement: "topLeft",
3551
3557
  menu: {
3552
- items: I.filter((o) => o.isShowNew !== 1).map((o) => ({
3558
+ items: M.filter((o) => o.isShowNew !== 1).map((o) => ({
3553
3559
  key: o.key,
3554
3560
  label: /* @__PURE__ */ ce("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
3555
3561
  o.icon && /* @__PURE__ */ H("i", { className: o.icon }),
@@ -3563,7 +3569,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3563
3569
  trigger: ["click"],
3564
3570
  disabled: c || u,
3565
3571
  overlayClassName: "rte-agent-dropdown",
3566
- children: /* @__PURE__ */ ce("div", { className: "rte-agent-badge", style: { cursor: I.length > 0 ? "pointer" : "default" }, children: [
3572
+ children: /* @__PURE__ */ ce("div", { className: "rte-agent-badge", style: { cursor: M.length > 0 ? "pointer" : "default" }, children: [
3567
3573
  /* @__PURE__ */ H("i", { className: "iconfont icon-zhinengti", style: { fontSize: "16px" } }),
3568
3574
  /* @__PURE__ */ H("span", { className: "rte-agent-text", children: "智能体" })
3569
3575
  ] })
@@ -3574,7 +3580,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3574
3580
  (() => {
3575
3581
  const o = t.find((s) => s.type === "tag");
3576
3582
  if (!o || !o.text) return null;
3577
- const l = I.find((s) => s.label === o.text);
3583
+ const l = M.find((s) => s.label === o.text);
3578
3584
  return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */ ce("div", { className: "rte-points-badge", children: [
3579
3585
  /* @__PURE__ */ H("i", { className: "iconfont icon-jifen", style: { marginRight: "4px", fontSize: "16px" } }),
3580
3586
  /* @__PURE__ */ ce("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
@@ -3588,32 +3594,32 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3588
3594
  {
3589
3595
  type: "button",
3590
3596
  onClick: Dt,
3591
- disabled: u || c || S || !Z,
3597
+ disabled: u || c || T || !Z,
3592
3598
  className: "rich-text-editor-send-button",
3593
- children: u || S ? /* @__PURE__ */ H("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ H("i", { className: "iconfont icon-fasong" })
3599
+ children: u || T ? /* @__PURE__ */ H("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ H("i", { className: "iconfont icon-fasong" })
3594
3600
  }
3595
3601
  )
3596
3602
  ] })
3597
3603
  ] }),
3598
- h?.anchorEl && (() => {
3599
- if (!document.body.contains(h.anchorEl))
3604
+ y?.anchorEl && (() => {
3605
+ if (!document.body.contains(y.anchorEl))
3600
3606
  return null;
3601
3607
  let o = "", l = {
3602
3608
  background: "var(--neutral-800, #262626)"
3603
3609
  };
3604
- if (h.type === "upload")
3610
+ if (y.type === "upload")
3605
3611
  o = t.find(
3606
- (y) => y.type === "upload" && y.key === h.key
3612
+ (m) => m.type === "upload" && m.key === y.key
3607
3613
  )?.tooltip || "";
3608
- else if (h.type === "tag")
3609
- o = h.anchorEl.dataset.tooltip || "";
3610
- else if (h.type === "upload-label")
3611
- o = h.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName || h.anchorEl.dataset.fileName || "";
3612
- else if (h.type === "variable")
3613
- o = h.anchorEl.dataset.tooltip || "";
3614
- else if (h.type === "upload-preview") {
3615
- const b = w[h.key], y = !!b && (b.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(b.name || ""));
3616
- if (b && y) {
3614
+ else if (y.type === "tag")
3615
+ o = y.anchorEl.dataset.tooltip || "";
3616
+ else if (y.type === "upload-label")
3617
+ o = y.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName || y.anchorEl.dataset.fileName || "";
3618
+ else if (y.type === "variable")
3619
+ o = y.anchorEl.dataset.tooltip || "";
3620
+ else if (y.type === "upload-preview") {
3621
+ const b = w[y.key], m = !!b && (b.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(b.name || ""));
3622
+ if (b && m) {
3617
3623
  const k = URL.createObjectURL(b);
3618
3624
  o = /* @__PURE__ */ H("div", { className: "rte-upload-preview", children: /* @__PURE__ */ H("img", { className: "rte-upload-preview-img", src: k, alt: b.name }) }), l = {
3619
3625
  background: "#fff",
@@ -3625,15 +3631,15 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3625
3631
  o = "";
3626
3632
  }
3627
3633
  if (!o) return null;
3628
- const s = h.type === "upload-preview" ? "#0A0A0A" : "#fff";
3634
+ const s = y.type === "upload-preview" ? "#0A0A0A" : "#fff";
3629
3635
  return ot(
3630
3636
  /* @__PURE__ */ H(
3631
3637
  Kt,
3632
3638
  {
3633
3639
  arrow: !1,
3634
- title: h.type === "upload-preview" ? o : /* @__PURE__ */ H("div", { style: { maxWidth: "200px", fontSize: "12px", color: s }, children: o }),
3640
+ title: y.type === "upload-preview" ? o : /* @__PURE__ */ H("div", { style: { maxWidth: "200px", fontSize: "12px", color: s }, children: o }),
3635
3641
  open: !0,
3636
- placement: h.type === "upload-preview" ? "topLeft" : "top",
3642
+ placement: y.type === "upload-preview" ? "topLeft" : "top",
3637
3643
  getPopupContainer: () => document.body,
3638
3644
  overlayInnerStyle: l,
3639
3645
  children: /* @__PURE__ */ H(
@@ -3641,11 +3647,11 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: g }) => {
3641
3647
  {
3642
3648
  style: {
3643
3649
  position: "fixed",
3644
- left: `${h.anchorEl.getBoundingClientRect().left}px`,
3650
+ left: `${y.anchorEl.getBoundingClientRect().left}px`,
3645
3651
  // 对于 upload-label 类型的 tooltip,向上移动 6px 以增加间距
3646
- top: `${h.anchorEl.getBoundingClientRect().top - (h.type === "upload-label" ? 4 : 0)}px`,
3647
- width: `${h.anchorEl.offsetWidth}px`,
3648
- height: `${h.anchorEl.offsetHeight}px`,
3652
+ top: `${y.anchorEl.getBoundingClientRect().top - (y.type === "upload-label" ? 4 : 0)}px`,
3653
+ width: `${y.anchorEl.offsetWidth}px`,
3654
+ height: `${y.anchorEl.offsetHeight}px`,
3649
3655
  pointerEvents: "none"
3650
3656
  }
3651
3657
  }
@@ -3696,12 +3702,12 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3696
3702
  { label: "30页", value: 30 }
3697
3703
  ], jn = ({
3698
3704
  autoLoading: t,
3699
- batchSize: g,
3705
+ batchSize: h,
3700
3706
  loadingProgress: u,
3701
3707
  loadIcon: c,
3702
3708
  onBatchSizeChange: v,
3703
3709
  onLoadNextPage: D,
3704
- onStartAutoLoad: I,
3710
+ onStartAutoLoad: M,
3705
3711
  onStopLoad: P
3706
3712
  }) => t && u ? /* @__PURE__ */ ce("div", { className: "auto_load_progress", children: [
3707
3713
  c || /* @__PURE__ */ H("img", { src: kt, alt: "自动加载", width: 14, height: 14 }),
@@ -3745,7 +3751,7 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3745
3751
  "div",
3746
3752
  {
3747
3753
  className: "auto_load_btn",
3748
- onClick: t ? void 0 : I,
3754
+ onClick: t ? void 0 : M,
3749
3755
  children: [
3750
3756
  c || /* @__PURE__ */ H("img", { src: kt, alt: "自动加载", width: 14, height: 14 }),
3751
3757
  /* @__PURE__ */ H("span", { children: "自动加载" })
@@ -3755,7 +3761,7 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3755
3761
  /* @__PURE__ */ H(
3756
3762
  ze,
3757
3763
  {
3758
- value: g,
3764
+ value: h,
3759
3765
  onChange: v,
3760
3766
  options: Yn,
3761
3767
  disabled: t,
@@ -3769,21 +3775,21 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3769
3775
  )
3770
3776
  ] }), Wn = ({
3771
3777
  current: t,
3772
- loadIcon: g,
3778
+ loadIcon: h,
3773
3779
  pageSize: u,
3774
3780
  total: c,
3775
3781
  cachedPages: v,
3776
3782
  loadedCount: D,
3777
- autoLoading: I = !1,
3783
+ autoLoading: M = !1,
3778
3784
  loadingProgress: P,
3779
- onChange: T,
3780
- onLoadNextPage: S,
3781
- onStartAutoLoad: L,
3785
+ onChange: N,
3786
+ onLoadNextPage: T,
3787
+ onStartAutoLoad: _,
3782
3788
  onStopLoading: R
3783
3789
  }) => {
3784
- const [$, A] = oe(5), e = Math.ceil(c / u), n = nt(() => v.length >= e, [v, e]), r = () => Array.from(
3790
+ const [$, L] = oe(5), e = Math.ceil(c / u), n = nt(() => v.length >= e, [v, e]), r = () => Array.from(
3785
3791
  { length: e },
3786
- (q, G) => G + 1
3792
+ (q, O) => O + 1
3787
3793
  ).filter((q) => !v.includes(q)).slice(0, $);
3788
3794
  return /* @__PURE__ */ ce("div", { className: "pagination_footer", children: [
3789
3795
  /* @__PURE__ */ ce("div", { className: "pagination_leftWrap", children: [
@@ -3803,16 +3809,16 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3803
3809
  !n && /* @__PURE__ */ H(
3804
3810
  jn,
3805
3811
  {
3806
- loadIcon: g || void 0,
3807
- autoLoading: I,
3812
+ loadIcon: h || void 0,
3813
+ autoLoading: M,
3808
3814
  batchSize: $,
3809
3815
  loadingProgress: P,
3810
- disabled: !S || !L,
3811
- onBatchSizeChange: A,
3812
- onLoadNextPage: () => S?.(),
3816
+ disabled: !T || !_,
3817
+ onBatchSizeChange: L,
3818
+ onLoadNextPage: () => T?.(),
3813
3819
  onStartAutoLoad: () => {
3814
- const p = r();
3815
- L?.(p);
3820
+ const x = r();
3821
+ _?.(x);
3816
3822
  },
3817
3823
  onStopLoad: () => R?.()
3818
3824
  }
@@ -3824,23 +3830,23 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3824
3830
  current: t,
3825
3831
  pageSize: u,
3826
3832
  total: c,
3827
- onChange: (p) => T(p),
3833
+ onChange: (x) => N(x),
3828
3834
  showSizeChanger: !1,
3829
3835
  showQuickJumper: !1,
3830
3836
  showTotal: () => "",
3831
- itemRender: (p, q, G) => {
3832
- const M = v.includes(p);
3833
- return q === "prev" || q === "next" || q === "jump-prev" || q === "jump-next" ? /* @__PURE__ */ H("div", { className: "pageBox", children: G }) : /* @__PURE__ */ ce(
3837
+ itemRender: (x, q, O) => {
3838
+ const C = v.includes(x);
3839
+ return q === "prev" || q === "next" || q === "jump-prev" || q === "jump-next" ? /* @__PURE__ */ H("div", { className: "pageBox", children: O }) : /* @__PURE__ */ ce(
3834
3840
  "div",
3835
3841
  {
3836
3842
  className: "pageBox",
3837
3843
  style: {
3838
- backgroundColor: t === p ? "#2563EB" : "#f5f5f5",
3839
- color: t === p ? "#fff" : M ? "#171717" : "#a3a3a3"
3844
+ backgroundColor: t === x ? "#2563EB" : "#f5f5f5",
3845
+ color: t === x ? "#fff" : C ? "#171717" : "#a3a3a3"
3840
3846
  },
3841
3847
  children: [
3842
- p,
3843
- !M && /* @__PURE__ */ H("span", { className: "unload_spot" })
3848
+ x,
3849
+ !C && /* @__PURE__ */ H("span", { className: "unload_spot" })
3844
3850
  ]
3845
3851
  }
3846
3852
  );
@@ -3850,27 +3856,27 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3850
3856
  ] });
3851
3857
  }, Un = (t) => {
3852
3858
  const {
3853
- loading: g,
3859
+ loading: h,
3854
3860
  autoLoading: u,
3855
3861
  loadingProgress: c,
3856
3862
  columns: v = [],
3857
3863
  dataSource: D = [],
3858
- total: I,
3864
+ total: M,
3859
3865
  current: P,
3860
- pageSize: T,
3861
- cachedPages: S,
3862
- onChangePage: L,
3866
+ pageSize: N,
3867
+ cachedPages: T,
3868
+ onChangePage: _,
3863
3869
  onLoadNextPage: R,
3864
3870
  onStartAutoLoad: $,
3865
- onStopLoading: A,
3871
+ onStopLoading: L,
3866
3872
  ...e
3867
3873
  } = t, n = ae(null), r = ie(
3868
3874
  (i) => {
3869
- L(i), S.includes(i) && n.current?.scrollTo({
3870
- key: `${(i - 1) * T + 1}`
3875
+ _(i), T.includes(i) && n.current?.scrollTo({
3876
+ key: `${(i - 1) * N + 1}`
3871
3877
  });
3872
3878
  },
3873
- [S, L, T]
3879
+ [T, _, N]
3874
3880
  );
3875
3881
  return /* @__PURE__ */ ce("div", { className: "flex flex-col", children: [
3876
3882
  /* @__PURE__ */ H(
@@ -3887,18 +3893,18 @@ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3887
3893
  /* @__PURE__ */ H(
3888
3894
  Wn,
3889
3895
  {
3890
- loading: g,
3896
+ loading: h,
3891
3897
  autoLoading: u,
3892
3898
  loadingProgress: c,
3893
3899
  current: P,
3894
- pageSize: T,
3895
- total: I,
3900
+ pageSize: N,
3901
+ total: M,
3896
3902
  loadedCount: D.length,
3897
- cachedPages: S,
3903
+ cachedPages: T,
3898
3904
  onChange: r,
3899
3905
  onLoadNextPage: R,
3900
3906
  onStartAutoLoad: $,
3901
- onStopLoading: A
3907
+ onStopLoading: L
3902
3908
  }
3903
3909
  )
3904
3910
  ] });
@@ -4012,75 +4018,75 @@ Un.__docgenInfo = {
4012
4018
  };
4013
4019
  const Kn = ({
4014
4020
  texts: t = [],
4015
- placeholder: g = "请输入内容",
4021
+ placeholder: h = "请输入内容",
4016
4022
  animationSpeed: u = 100,
4017
4023
  autoPlay: c = !0,
4018
4024
  value: v,
4019
4025
  onChange: D,
4020
- ...I
4026
+ ...M
4021
4027
  }) => {
4022
- const [P, T] = oe(""), [S, L] = oe(0), [R, $] = oe(!1), [A, e] = oe(!1), [n, r] = oe(!1), i = ae(void 0), p = ae(void 0), q = ae(t), G = ae(S), M = ae(A), Q = ae(P);
4028
+ const [P, N] = oe(""), [T, _] = oe(0), [R, $] = oe(!1), [L, e] = oe(!1), [n, r] = oe(!1), i = ae(void 0), x = ae(void 0), q = ae(t), O = ae(T), C = ae(L), Q = ae(P);
4023
4029
  pe(() => {
4024
- q.current = t, G.current = S, M.current = A, Q.current = P;
4030
+ q.current = t, O.current = T, C.current = L, Q.current = P;
4025
4031
  });
4026
- const K = ie((d, f) => {
4027
- let m = 0;
4032
+ const W = ie((d, p) => {
4033
+ let f = 0;
4028
4034
  r(!0);
4029
- const h = () => {
4030
- m < d.length ? (T(d.slice(0, m + 1)), m++, p.current = window.setTimeout(h, u)) : (r(!1), f?.());
4035
+ const y = () => {
4036
+ f < d.length ? (N(d.slice(0, f + 1)), f++, x.current = window.setTimeout(y, u)) : (r(!1), p?.());
4031
4037
  };
4032
- h();
4038
+ y();
4033
4039
  }, [u]), X = ie((d) => {
4034
- let f = Q.current.length;
4035
- const m = () => {
4036
- f > 0 ? (T(Q.current.slice(0, f - 1)), f--, p.current = window.setTimeout(m, u / 2)) : d?.();
4040
+ let p = Q.current.length;
4041
+ const f = () => {
4042
+ p > 0 ? (N(Q.current.slice(0, p - 1)), p--, x.current = window.setTimeout(f, u / 2)) : d?.();
4037
4043
  };
4038
- m();
4044
+ f();
4039
4045
  }, [u]), a = ie(() => {
4040
- if (q.current.length === 0 || M.current) return;
4046
+ if (q.current.length === 0 || C.current) return;
4041
4047
  $(!0);
4042
- const d = q.current[G.current];
4048
+ const d = q.current[O.current];
4043
4049
  Q.current ? X(() => {
4044
- K(d, () => {
4050
+ W(d, () => {
4045
4051
  i.current = window.setTimeout(() => {
4046
- L((f) => (f + 1) % q.current.length), $(!1);
4052
+ _((p) => (p + 1) % q.current.length), $(!1);
4047
4053
  }, 2e3);
4048
4054
  });
4049
- }) : K(d, () => {
4055
+ }) : W(d, () => {
4050
4056
  i.current = window.setTimeout(() => {
4051
- L((f) => (f + 1) % q.current.length), $(!1);
4057
+ _((p) => (p + 1) % q.current.length), $(!1);
4052
4058
  }, 2e3);
4053
4059
  });
4054
- }, [X, K]);
4055
- return pe(() => (c && t.length > 0 && !A && a(), () => {
4056
- i.current && window.clearTimeout(i.current), p.current && window.clearTimeout(p.current);
4057
- }), [S, A, c, t.length, a]), pe(() => {
4058
- !R && c && t.length > 0 && !A && a();
4059
- }, [S, R, c, t.length, A, a]), /* @__PURE__ */ ce("div", { style: { position: "relative" }, children: [
4060
+ }, [X, W]);
4061
+ return pe(() => (c && t.length > 0 && !L && a(), () => {
4062
+ i.current && window.clearTimeout(i.current), x.current && window.clearTimeout(x.current);
4063
+ }), [T, L, c, t.length, a]), pe(() => {
4064
+ !R && c && t.length > 0 && !L && a();
4065
+ }, [T, R, c, t.length, L, a]), /* @__PURE__ */ ce("div", { style: { position: "relative" }, children: [
4060
4066
  /* @__PURE__ */ H(
4061
4067
  $t,
4062
4068
  {
4063
- ...I,
4069
+ ...M,
4064
4070
  value: v,
4065
4071
  onChange: (d) => {
4066
- D?.(d.target.value), I.onChange?.(d);
4072
+ D?.(d.target.value), M.onChange?.(d);
4067
4073
  },
4068
4074
  onFocus: (d) => {
4069
- e(!0), i.current && window.clearTimeout(i.current), p.current && window.clearTimeout(p.current), $(!1), r(!1), I.onFocus?.(d);
4075
+ e(!0), i.current && window.clearTimeout(i.current), x.current && window.clearTimeout(x.current), $(!1), r(!1), M.onFocus?.(d);
4070
4076
  },
4071
4077
  onBlur: (d) => {
4072
- e(!1), !v && t.length > 0 && (T(""), L(0)), I.onBlur?.(d);
4078
+ e(!1), !v && t.length > 0 && (N(""), _(0)), M.onBlur?.(d);
4073
4079
  },
4074
- placeholder: A || v ? g : P || g,
4080
+ placeholder: L || v ? h : P || h,
4075
4081
  style: {
4076
4082
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4077
- ...I.style,
4083
+ ...M.style,
4078
4084
  position: "relative",
4079
4085
  zIndex: 1
4080
4086
  }
4081
4087
  }
4082
4088
  ),
4083
- !A && !v && P && /* @__PURE__ */ ce(
4089
+ !L && !v && P && /* @__PURE__ */ ce(
4084
4090
  "div",
4085
4091
  {
4086
4092
  style: {
@@ -4173,7 +4179,7 @@ Kn.__docgenInfo = {
4173
4179
  const Xn = ({
4174
4180
  texts: t = [],
4175
4181
  // 动态文案数组,默认为空数组
4176
- placeholder: g = "请输入内容",
4182
+ placeholder: h = "请输入内容",
4177
4183
  // 占位符文本
4178
4184
  animationSpeed: u = 100,
4179
4185
  // 打字机动画速度,毫秒
@@ -4183,93 +4189,93 @@ const Xn = ({
4183
4189
  // 受控模式的值
4184
4190
  onChange: D,
4185
4191
  // 受控模式的变化回调
4186
- onSubmit: I,
4192
+ onSubmit: M,
4187
4193
  // 提交回调
4188
4194
  maxLength: P = 500,
4189
4195
  // 最大字符数限制
4190
- showCount: T = !0,
4196
+ showCount: N = !0,
4191
4197
  // 是否显示字数统计
4192
- submitText: S = "发送",
4198
+ submitText: T = "发送",
4193
4199
  // 提交按钮文本
4194
- disabled: L = !1,
4200
+ disabled: _ = !1,
4195
4201
  // 是否禁用组件
4196
4202
  rows: R = 4,
4197
4203
  // 文本域行数
4198
4204
  style: $,
4199
4205
  // 自定义样式
4200
- ...A
4206
+ ...L
4201
4207
  // 其他原生属性
4202
4208
  }) => {
4203
- const [e, n] = oe(""), [r, i] = oe(0), [p, q] = oe(!1), [G, M] = oe(!1), [Q, K] = oe(!1), [X, a] = oe(v || ""), V = ae(void 0), w = ae(void 0), W = ae(t), z = ae(r), d = ae(G), f = ae(e), m = ae(null);
4209
+ const [e, n] = oe(""), [r, i] = oe(0), [x, q] = oe(!1), [O, C] = oe(!1), [Q, W] = oe(!1), [X, a] = oe(v || ""), V = ae(void 0), w = ae(void 0), U = ae(t), z = ae(r), d = ae(O), p = ae(e), f = ae(null);
4204
4210
  pe(() => {
4205
- W.current = t, z.current = r, d.current = G, f.current = e;
4211
+ U.current = t, z.current = r, d.current = O, p.current = e;
4206
4212
  });
4207
- const h = ie((ne, ye) => {
4213
+ const y = ie((ne, ye) => {
4208
4214
  let ge = 0;
4209
- K(!0);
4215
+ W(!0);
4210
4216
  const he = () => {
4211
- ge < ne.length ? (n(ne.slice(0, ge + 1)), ge++, w.current = window.setTimeout(he, u)) : (K(!1), ye?.());
4217
+ ge < ne.length ? (n(ne.slice(0, ge + 1)), ge++, w.current = window.setTimeout(he, u)) : (W(!1), ye?.());
4212
4218
  };
4213
4219
  he();
4214
4220
  }, [u]), E = ie((ne) => {
4215
- let ye = f.current.length;
4221
+ let ye = p.current.length;
4216
4222
  const ge = () => {
4217
- ye > 0 ? (n(f.current.slice(0, ye - 1)), ye--, w.current = window.setTimeout(ge, u / 2)) : ne?.();
4223
+ ye > 0 ? (n(p.current.slice(0, ye - 1)), ye--, w.current = window.setTimeout(ge, u / 2)) : ne?.();
4218
4224
  };
4219
4225
  ge();
4220
4226
  }, [u]), Y = ie(() => {
4221
- if (W.current.length === 0 || d.current) return;
4227
+ if (U.current.length === 0 || d.current) return;
4222
4228
  q(!0);
4223
- const ne = W.current[z.current];
4224
- f.current ? E(() => {
4225
- h(ne, () => {
4229
+ const ne = U.current[z.current];
4230
+ p.current ? E(() => {
4231
+ y(ne, () => {
4226
4232
  V.current = window.setTimeout(() => {
4227
- i((ye) => (ye + 1) % W.current.length), q(!1);
4233
+ i((ye) => (ye + 1) % U.current.length), q(!1);
4228
4234
  }, 2e3);
4229
4235
  });
4230
- }) : h(ne, () => {
4236
+ }) : y(ne, () => {
4231
4237
  V.current = window.setTimeout(() => {
4232
- i((ye) => (ye + 1) % W.current.length), q(!1);
4238
+ i((ye) => (ye + 1) % U.current.length), q(!1);
4233
4239
  }, 2e3);
4234
4240
  });
4235
- }, [E, h]);
4236
- pe(() => (c && t.length > 0 && !G && Y(), () => {
4241
+ }, [E, y]);
4242
+ pe(() => (c && t.length > 0 && !O && Y(), () => {
4237
4243
  V.current && window.clearTimeout(V.current), w.current && window.clearTimeout(w.current);
4238
- }), [r, G, c, t.length, Y]), pe(() => {
4239
- !p && c && t.length > 0 && !G && Y();
4240
- }, [r, p, c, t.length, G, Y]);
4241
- const U = (ne) => {
4242
- M(!0), V.current && window.clearTimeout(V.current), w.current && window.clearTimeout(w.current), q(!1), K(!1), A.onFocus?.(ne);
4244
+ }), [r, O, c, t.length, Y]), pe(() => {
4245
+ !x && c && t.length > 0 && !O && Y();
4246
+ }, [r, x, c, t.length, O, Y]);
4247
+ const K = (ne) => {
4248
+ C(!0), V.current && window.clearTimeout(V.current), w.current && window.clearTimeout(w.current), q(!1), W(!1), L.onFocus?.(ne);
4243
4249
  }, Z = (ne) => {
4244
- M(!1), !v && t.length > 0 && (n(""), i(0)), A.onBlur?.(ne);
4250
+ C(!1), !v && t.length > 0 && (n(""), i(0)), L.onBlur?.(ne);
4245
4251
  }, J = (ne) => {
4246
4252
  const ye = ne.target.value;
4247
- P && ye.length > P || (D ? D(ye) : a(ye), A.onChange?.(ne));
4253
+ P && ye.length > P || (D ? D(ye) : a(ye), L.onChange?.(ne));
4248
4254
  }, ue = () => {
4249
4255
  const ne = D ? v : X;
4250
- ne.trim() && !L && (I?.(ne), D || a(""));
4256
+ ne.trim() && !_ && (M?.(ne), D || a(""));
4251
4257
  }, fe = (ne) => {
4252
- (ne.ctrlKey || ne.metaKey) && ne.key === "Enter" && (ne.preventDefault(), ue()), A.onKeyDown?.(ne);
4253
- }, de = D ? v : X, be = L || !de.trim() || (P ? de.length > P : !1);
4258
+ (ne.ctrlKey || ne.metaKey) && ne.key === "Enter" && (ne.preventDefault(), ue()), L.onKeyDown?.(ne);
4259
+ }, de = D ? v : X, be = _ || !de.trim() || (P ? de.length > P : !1);
4254
4260
  return /* @__PURE__ */ ce("div", { style: { position: "relative", ...$ }, children: [
4255
4261
  /* @__PURE__ */ ce("div", { style: { position: "relative" }, children: [
4256
4262
  /* @__PURE__ */ H(
4257
4263
  "textarea",
4258
4264
  {
4259
- ref: m,
4265
+ ref: f,
4260
4266
  value: D ? v : X,
4261
4267
  onChange: J,
4262
4268
  onFocus: (ne) => {
4263
- ne.target.style.borderColor = "#1890ff", ne.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", U(ne);
4269
+ ne.target.style.borderColor = "#1890ff", ne.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", K(ne);
4264
4270
  },
4265
4271
  onBlur: (ne) => {
4266
4272
  ne.target.style.borderColor = "#d9d9d9", ne.target.style.boxShadow = "none", Z(ne);
4267
4273
  },
4268
4274
  onKeyDown: fe,
4269
- placeholder: G || de ? g : "",
4275
+ placeholder: O || de ? h : "",
4270
4276
  maxLength: P,
4271
4277
  rows: R,
4272
- disabled: L,
4278
+ disabled: _,
4273
4279
  style: {
4274
4280
  width: "100%",
4275
4281
  minHeight: `${R * 24 + 16}px`,
@@ -4285,12 +4291,12 @@ const Xn = ({
4285
4291
  transition: "border-color 0.3s, box-shadow 0.3s",
4286
4292
  backgroundColor: "#fff",
4287
4293
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4288
- ...A.style
4294
+ ...L.style
4289
4295
  },
4290
- ...A
4296
+ ...L
4291
4297
  }
4292
4298
  ),
4293
- !G && !de && e && /* @__PURE__ */ ce(
4299
+ !O && !de && e && /* @__PURE__ */ ce(
4294
4300
  "div",
4295
4301
  {
4296
4302
  style: {
@@ -4354,13 +4360,13 @@ const Xn = ({
4354
4360
  alignItems: "center",
4355
4361
  justifyContent: "center"
4356
4362
  },
4357
- children: S
4363
+ children: T
4358
4364
  }
4359
4365
  )
4360
4366
  }
4361
4367
  )
4362
4368
  ] }),
4363
- T && /* @__PURE__ */ ce(
4369
+ N && /* @__PURE__ */ ce(
4364
4370
  "div",
4365
4371
  {
4366
4372
  style: {
@@ -4472,56 +4478,56 @@ Xn.__docgenInfo = {
4472
4478
  };
4473
4479
  const St = ({
4474
4480
  src: t,
4475
- poster: g,
4481
+ poster: h,
4476
4482
  width: u = 300,
4477
4483
  height: c,
4478
4484
  videoWidth: v,
4479
4485
  // 参数保留但不使用,由CSS控制
4480
4486
  videoHeight: D,
4481
4487
  // 参数保留但不使用,由CSS控制
4482
- showPlayButton: I = !0,
4488
+ showPlayButton: M = !0,
4483
4489
  autoPlayOnHover: P = !0,
4484
- onClick: T,
4485
- onVideoLoaded: S,
4486
- onVideoPlay: L,
4490
+ onClick: N,
4491
+ onVideoLoaded: T,
4492
+ onVideoPlay: _,
4487
4493
  onVideoPause: R,
4488
4494
  onVideoEnded: $,
4489
- className: A,
4495
+ className: L,
4490
4496
  style: e,
4491
4497
  ...n
4492
4498
  }) => {
4493
- const r = ae(null), [i, p] = oe(!1), [q, G] = oe(!1), [M, Q] = oe(!1), K = ie(() => {
4494
- r.current && (r.current.play(), p(!0), L?.());
4495
- }, [L]), X = ie(() => {
4496
- r.current && (r.current.pause(), p(!1), R?.());
4497
- }, [R]), a = ie((h) => {
4498
- h.stopPropagation(), i ? X() : K();
4499
- }, [i, K, X]), V = ie(() => {
4500
- G(!0), P && !i && K();
4501
- }, [P, i, K]), w = ie(() => {
4502
- G(!1), P && i && X();
4503
- }, [P, i, X]), W = ie(() => {
4504
- Q(!0), S?.();
4505
- }, [S]), z = ie(() => {
4506
- p(!0), L?.();
4507
- }, [L]), d = ie(() => {
4508
- p(!1), R?.();
4509
- }, [R]), f = ie(() => {
4510
- p(!1), $?.();
4511
- }, [$]), m = ie((h) => {
4512
- T?.(h);
4513
- }, [T]);
4499
+ const r = ae(null), [i, x] = oe(!1), [q, O] = oe(!1), [C, Q] = oe(!1), W = ie(() => {
4500
+ r.current && (r.current.play(), x(!0), _?.());
4501
+ }, [_]), X = ie(() => {
4502
+ r.current && (r.current.pause(), x(!1), R?.());
4503
+ }, [R]), a = ie((y) => {
4504
+ y.stopPropagation(), i ? X() : W();
4505
+ }, [i, W, X]), V = ie(() => {
4506
+ O(!0), P && !i && W();
4507
+ }, [P, i, W]), w = ie(() => {
4508
+ O(!1), P && i && X();
4509
+ }, [P, i, X]), U = ie(() => {
4510
+ Q(!0), T?.();
4511
+ }, [T]), z = ie(() => {
4512
+ x(!0), _?.();
4513
+ }, [_]), d = ie(() => {
4514
+ x(!1), R?.();
4515
+ }, [R]), p = ie(() => {
4516
+ x(!1), $?.();
4517
+ }, [$]), f = ie((y) => {
4518
+ N?.(y);
4519
+ }, [N]);
4514
4520
  return /* @__PURE__ */ H(
4515
4521
  rt,
4516
4522
  {
4517
4523
  ...n,
4518
- className: `video-card ${A || ""}`,
4524
+ className: `video-card ${L || ""}`,
4519
4525
  style: {
4520
4526
  width: u,
4521
4527
  height: c,
4522
4528
  padding: 0,
4523
4529
  overflow: "hidden",
4524
- cursor: T ? "pointer" : "default",
4530
+ cursor: N ? "pointer" : "default",
4525
4531
  border: "none",
4526
4532
  borderRadius: 0,
4527
4533
  ...e
@@ -4529,24 +4535,24 @@ const St = ({
4529
4535
  bordered: !1,
4530
4536
  onMouseEnter: V,
4531
4537
  onMouseLeave: w,
4532
- onClick: m,
4538
+ onClick: f,
4533
4539
  children: /* @__PURE__ */ ce("div", { className: "video-card-container", children: [
4534
4540
  /* @__PURE__ */ H(
4535
4541
  "video",
4536
4542
  {
4537
4543
  ref: r,
4538
4544
  src: t,
4539
- poster: g,
4545
+ poster: h,
4540
4546
  preload: "metadata",
4541
- onLoadedData: W,
4547
+ onLoadedData: U,
4542
4548
  onPlay: z,
4543
4549
  onPause: d,
4544
- onEnded: f,
4550
+ onEnded: p,
4545
4551
  muted: !0,
4546
4552
  loop: !0
4547
4553
  }
4548
4554
  ),
4549
- I && /* @__PURE__ */ H(
4555
+ M && /* @__PURE__ */ H(
4550
4556
  "div",
4551
4557
  {
4552
4558
  className: `video-play-button ${q ? "hovered" : ""}`,
@@ -4554,7 +4560,7 @@ const St = ({
4554
4560
  children: i ? /* @__PURE__ */ H(on, { className: "play-icon" }) : /* @__PURE__ */ H(sn, { className: "play-icon" })
4555
4561
  }
4556
4562
  ),
4557
- !M && /* @__PURE__ */ H("div", { className: "video-loading-mask", children: /* @__PURE__ */ H("div", { className: "loading-spinner" }) })
4563
+ !C && /* @__PURE__ */ H("div", { className: "video-loading-mask", children: /* @__PURE__ */ H("div", { className: "loading-spinner" }) })
4558
4564
  ] })
4559
4565
  }
4560
4566
  );
@@ -4662,7 +4668,7 @@ St.__docgenInfo = {
4662
4668
  };
4663
4669
  const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((u) => t.toLowerCase().includes(u)), Qn = (t) => t.type ? t.type : Jn(t.url) ? "video" : "image", Zn = ({
4664
4670
  items: t,
4665
- columns: g,
4671
+ columns: h,
4666
4672
  gap: u = 0,
4667
4673
  responsive: c = !0,
4668
4674
  breakpoints: v = {
@@ -4674,61 +4680,61 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4674
4680
  xxl: 6
4675
4681
  },
4676
4682
  className: D,
4677
- style: I,
4683
+ style: M,
4678
4684
  onClick: P
4679
4685
  }) => {
4680
- const T = ae(null), [S, L] = oe(g || v.md || 3), R = ae(/* @__PURE__ */ new Map()), $ = ie(() => {
4681
- if (!c || g)
4682
- return g || v.md || 3;
4686
+ const N = ae(null), [T, _] = oe(h || v.md || 3), R = ae(/* @__PURE__ */ new Map()), $ = ie(() => {
4687
+ if (!c || h)
4688
+ return h || v.md || 3;
4683
4689
  const r = window.innerWidth;
4684
4690
  return r < 576 ? v.xs || 1 : r < 768 ? v.sm || 2 : r < 992 ? v.md || 3 : r < 1200 ? v.lg || 4 : r < 1600 ? v.xl || 5 : v.xxl || 6;
4685
- }, [c, g, v]), A = ie(() => {
4686
- if (!T.current) return;
4687
- const r = S, i = T.current, q = (i.offsetWidth - u * (r - 1)) / r, G = new Array(r).fill(0);
4688
- t.forEach((Q, K) => {
4689
- const X = Q.id || K, a = R.current.get(X);
4691
+ }, [c, h, v]), L = ie(() => {
4692
+ if (!N.current) return;
4693
+ const r = T, i = N.current, q = (i.offsetWidth - u * (r - 1)) / r, O = new Array(r).fill(0);
4694
+ t.forEach((Q, W) => {
4695
+ const X = Q.id || W, a = R.current.get(X);
4690
4696
  if (!a) return;
4691
- const V = Math.min(...G), w = G.indexOf(V), W = w * (q + u), z = G[w];
4692
- a.style.position = "absolute", a.style.left = `${W}px`, a.style.top = `${z}px`, a.style.width = `${q}px`, G[w] += a.offsetHeight + u;
4697
+ const V = Math.min(...O), w = O.indexOf(V), U = w * (q + u), z = O[w];
4698
+ a.style.position = "absolute", a.style.left = `${U}px`, a.style.top = `${z}px`, a.style.width = `${q}px`, O[w] += a.offsetHeight + u;
4693
4699
  });
4694
- const M = Math.max(...G);
4695
- i.style.height = `${M}px`;
4696
- }, [t, S, u]);
4700
+ const C = Math.max(...O);
4701
+ i.style.height = `${C}px`;
4702
+ }, [t, T, u]);
4697
4703
  pe(() => {
4698
4704
  const r = () => {
4699
4705
  const i = $();
4700
- i !== S && L(i);
4706
+ i !== T && _(i);
4701
4707
  };
4702
4708
  if (c)
4703
4709
  return window.addEventListener("resize", r), r(), () => window.removeEventListener("resize", r);
4704
- }, [c, $, S]), pe(() => {
4710
+ }, [c, $, T]), pe(() => {
4705
4711
  const r = setTimeout(() => {
4706
- A();
4712
+ L();
4707
4713
  }, 100);
4708
4714
  return () => clearTimeout(r);
4709
- }, [t, S, A]);
4715
+ }, [t, T, L]);
4710
4716
  const e = ie(() => {
4711
- A();
4712
- }, [A]), n = ie((r) => {
4717
+ L();
4718
+ }, [L]), n = ie((r) => {
4713
4719
  P && P(r), r.onClick?.(r);
4714
4720
  }, [P]);
4715
4721
  return /* @__PURE__ */ H(
4716
4722
  "div",
4717
4723
  {
4718
- ref: T,
4724
+ ref: N,
4719
4725
  className: `waterfall-container ${D || ""}`,
4720
4726
  style: {
4721
4727
  position: "relative",
4722
4728
  width: "100%",
4723
- ...I
4729
+ ...M
4724
4730
  },
4725
4731
  children: t.map((r, i) => {
4726
- const p = r.id || i, q = Qn(r);
4732
+ const x = r.id || i, q = Qn(r);
4727
4733
  return /* @__PURE__ */ H(
4728
4734
  "div",
4729
4735
  {
4730
- ref: (G) => {
4731
- G ? R.current.set(p, G) : R.current.delete(p);
4736
+ ref: (O) => {
4737
+ O ? R.current.set(x, O) : R.current.delete(x);
4732
4738
  },
4733
4739
  className: "waterfall-item",
4734
4740
  children: q === "video" ? /* @__PURE__ */ H("div", { style: {
@@ -4768,7 +4774,7 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4768
4774
  }
4769
4775
  )
4770
4776
  },
4771
- p
4777
+ x
4772
4778
  );
4773
4779
  })
4774
4780
  }