bi-components-library 1.0.87 → 1.0.89

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,8 +5,8 @@ import { createFromIconfontCN as Zt, LeftOutlined as en, SearchOutlined as tn, R
5
5
  import { createPortal as at } from "react-dom";
6
6
  const ln = ({
7
7
  variant: t = "primary",
8
- loading: y = !1,
9
- children: i,
8
+ loading: m = !1,
9
+ children: c,
10
10
  ...l
11
11
  }) => /* @__PURE__ */ M(
12
12
  Ae,
@@ -28,9 +28,9 @@ const ln = ({
28
28
  return "primary";
29
29
  }
30
30
  })(t),
31
- loading: y,
31
+ loading: m,
32
32
  ghost: t === "ghost",
33
- children: i
33
+ children: c
34
34
  }
35
35
  );
36
36
  ln.__docgenInfo = {
@@ -79,8 +79,8 @@ ln.__docgenInfo = {
79
79
  };
80
80
  const cn = ({
81
81
  title: t,
82
- children: y,
83
- bordered: i = !0,
82
+ children: m,
83
+ bordered: c = !0,
84
84
  hoverable: l = !1,
85
85
  size: h = "default",
86
86
  ...q
@@ -89,10 +89,10 @@ const cn = ({
89
89
  {
90
90
  ...q,
91
91
  title: t,
92
- bordered: i,
92
+ bordered: c,
93
93
  hoverable: l,
94
94
  size: h,
95
- children: y
95
+ children: m
96
96
  }
97
97
  );
98
98
  cn.__docgenInfo = {
@@ -148,17 +148,17 @@ cn.__docgenInfo = {
148
148
  };
149
149
  const un = ({
150
150
  showDefaultFooter: t = !0,
151
- ...y
151
+ ...m
152
152
  }) => {
153
- const i = y.footer !== void 0 ? y.footer : t ? (l, { OkBtn: h, CancelBtn: q }) => /* @__PURE__ */ ie(Ot, { children: [
153
+ const c = m.footer !== void 0 ? m.footer : t ? (l, { OkBtn: h, CancelBtn: q }) => /* @__PURE__ */ ie(Ot, { children: [
154
154
  /* @__PURE__ */ M(h, {}),
155
155
  /* @__PURE__ */ M(q, {})
156
156
  ] }) : null;
157
157
  return /* @__PURE__ */ M(
158
158
  Rt,
159
159
  {
160
- ...y,
161
- footer: i
160
+ ...m,
161
+ footer: c
162
162
  }
163
163
  );
164
164
  };
@@ -225,8 +225,8 @@ un.__docgenInfo = {
225
225
  };
226
226
  const dn = ({
227
227
  scrollX: t,
228
- showPagination: y = !0,
229
- defaultPageSize: i = 10,
228
+ showPagination: m = !0,
229
+ defaultPageSize: c = 10,
230
230
  ...l
231
231
  }) => /* @__PURE__ */ M(
232
232
  rt,
@@ -236,11 +236,11 @@ const dn = ({
236
236
  x: t || "max-content",
237
237
  y: "50vh"
238
238
  },
239
- pagination: y ? {
239
+ pagination: m ? {
240
240
  hideOnSinglePage: !0,
241
241
  showSizeChanger: !0,
242
242
  showQuickJumper: !0,
243
- defaultPageSize: i,
243
+ defaultPageSize: c,
244
244
  ...l.pagination
245
245
  } : !1
246
246
  }
@@ -299,14 +299,14 @@ const pn = Zt({
299
299
  scriptUrl: ["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]
300
300
  }), fn = ({
301
301
  name: t,
302
- size: y,
303
- color: i,
302
+ size: m,
303
+ color: c,
304
304
  style: l,
305
305
  ...h
306
306
  }) => {
307
307
  const q = {
308
- fontSize: y,
309
- color: i,
308
+ fontSize: m,
309
+ color: c,
310
310
  ...l
311
311
  };
312
312
  return /* @__PURE__ */ M(
@@ -354,17 +354,17 @@ fn.__docgenInfo = {
354
354
  }
355
355
  }
356
356
  };
357
- const mn = ({
357
+ const yn = ({
358
358
  loading: t,
359
- description: y = "暂无数据",
360
- className: i,
359
+ description: m = "暂无数据",
360
+ className: c,
361
361
  emptyChildren: l,
362
362
  loadingText: h,
363
363
  emptyImage: q
364
364
  }) => t ? /* @__PURE__ */ ie(
365
365
  ht,
366
366
  {
367
- className: `pt-10 w-full ${i || ""}`,
367
+ className: `pt-10 w-full ${c || ""}`,
368
368
  align: "center",
369
369
  justify: "center",
370
370
  vertical: !0,
@@ -376,21 +376,21 @@ const mn = ({
376
376
  ) : /* @__PURE__ */ M(
377
377
  ht,
378
378
  {
379
- className: `pt-10 w-full ${i || ""}`,
379
+ className: `pt-10 w-full ${c || ""}`,
380
380
  align: "center",
381
381
  justify: "center",
382
382
  children: /* @__PURE__ */ M(
383
383
  zt,
384
384
  {
385
385
  image: q,
386
- description: y,
386
+ description: m,
387
387
  imageStyle: { height: 180 },
388
388
  children: l
389
389
  }
390
390
  )
391
391
  }
392
392
  );
393
- mn.__docgenInfo = {
393
+ yn.__docgenInfo = {
394
394
  displayName: "EmptyAndSpin",
395
395
  description: "空状态和加载状态组合组件",
396
396
  props: {
@@ -433,10 +433,10 @@ mn.__docgenInfo = {
433
433
  }
434
434
  }
435
435
  };
436
- const yn = ({
436
+ const mn = ({
437
437
  onClick: t,
438
- showText: y = !1,
439
- className: i,
438
+ showText: m = !1,
439
+ className: c,
440
440
  size: l = "small",
441
441
  type: h = "default"
442
442
  }) => /* @__PURE__ */ M(
@@ -445,12 +445,12 @@ const yn = ({
445
445
  size: l,
446
446
  type: h,
447
447
  icon: /* @__PURE__ */ M(en, {}),
448
- className: `cursor-pointer ${i || ""}`,
448
+ className: `cursor-pointer ${c || ""}`,
449
449
  onClick: t,
450
- children: y && "返回"
450
+ children: m && "返回"
451
451
  }
452
452
  );
453
- yn.__docgenInfo = {
453
+ mn.__docgenInfo = {
454
454
  displayName: "BackButton",
455
455
  description: "返回按钮组件",
456
456
  props: {
@@ -491,17 +491,17 @@ yn.__docgenInfo = {
491
491
  };
492
492
  const hn = ({
493
493
  removePadding: t = !0,
494
- className: y,
495
- ...i
494
+ className: m,
495
+ ...c
496
496
  }) => {
497
- const l = t ? `px-0 h-auto ${y || ""}` : y;
497
+ const l = t ? `px-0 h-auto ${m || ""}` : m;
498
498
  return /* @__PURE__ */ M(
499
499
  Ae,
500
500
  {
501
501
  type: "link",
502
- ...i,
502
+ ...c,
503
503
  className: l,
504
- children: i.children
504
+ children: c.children
505
505
  }
506
506
  );
507
507
  };
@@ -544,47 +544,47 @@ hn.__docgenInfo = {
544
544
  };
545
545
  const { Option: gn } = ze, vn = ({
546
546
  columns: t,
547
- request: y,
548
- searchFields: i = [],
547
+ request: m,
548
+ searchFields: c = [],
549
549
  showSearch: l = !0,
550
550
  showRefresh: h = !0,
551
551
  defaultPageSize: q = 10,
552
552
  pageSizeOptions: D = ["10", "20", "50", "100"],
553
553
  autoLoad: I = !0,
554
554
  externalParams: S = {},
555
- ...w
555
+ ...$
556
556
  }) => {
557
- const [N, b] = ae([]), [P, C] = ae(!1), [e, r] = ae({
557
+ const [N, x] = ae([]), [P, C] = ae(!1), [e, r] = ae({
558
558
  current: 1,
559
559
  pageSize: q,
560
560
  total: 0
561
- }), [a, p] = ae({}), [f, _] = ae({}), [T] = He.useForm(), z = re(e);
561
+ }), [a, p] = ae({}), [y, A] = ae({}), [T] = He.useForm(), z = re(e);
562
562
  z.current = e;
563
563
  const Y = re(S);
564
564
  Y.current = S;
565
565
  const j = re(!1), F = tt(() => t.map((u) => {
566
- const { sortable: d, render: g, ...k } = u;
566
+ const { sortable: d, render: v, ...E } = u;
567
567
  return {
568
- ...k,
568
+ ...E,
569
569
  sorter: d ? !0 : void 0,
570
- render: g || ((L) => L)
570
+ render: v || ((L) => L)
571
571
  };
572
572
  }), [t]), n = se(async (u = {}) => {
573
- if (y) {
573
+ if (m) {
574
574
  C(!0);
575
575
  try {
576
576
  const d = {
577
577
  page: z.current.current,
578
578
  pageSize: z.current.pageSize,
579
- sortField: f.field,
580
- sortOrder: f.order,
579
+ sortField: y.field,
580
+ sortOrder: y.order,
581
581
  searchParams: { ...a, ...Y.current },
582
582
  ...u
583
- }, g = await y(d);
584
- g.success && (b(g.data), r((k) => ({
585
- ...k,
586
- total: g.total,
587
- current: d.page || k.current
583
+ }, v = await m(d);
584
+ v.success && (x(v.data), r((E) => ({
585
+ ...E,
586
+ total: v.total,
587
+ current: d.page || E.current
588
588
  })));
589
589
  } catch (d) {
590
590
  console.error("加载数据失败:", d);
@@ -592,36 +592,36 @@ const { Option: gn } = ze, vn = ({
592
592
  C(!1);
593
593
  }
594
594
  }
595
- }, [y, f, a]), V = se((u) => {
595
+ }, [m, y, a]), V = se((u) => {
596
596
  p(u), r((d) => ({ ...d, current: 1 }));
597
- }, []), x = se(() => {
597
+ }, []), w = se(() => {
598
598
  T.resetFields(), p({}), r((u) => ({ ...u, current: 1 }));
599
599
  }, [T]), B = se(() => {
600
600
  n();
601
- }, [n]), X = se((u, d, g) => {
602
- const k = {
601
+ }, [n]), X = se((u, d, v) => {
602
+ const E = {
603
603
  current: u.current || 1,
604
604
  pageSize: u.pageSize || q,
605
605
  total: u.total || 0
606
606
  }, L = {
607
- field: g?.field,
608
- order: g?.order
607
+ field: v?.field,
608
+ order: v?.order
609
609
  };
610
- r(k), _(L);
610
+ r(E), A(L);
611
611
  }, [q]);
612
612
  return de(() => {
613
613
  const u = Object.keys(S).length > 0;
614
614
  (I && !j.current || u) && (n(), j.current = !0);
615
615
  }, [I, S, n]), /* @__PURE__ */ ie("div", { children: [
616
- l && i.length > 0 && /* @__PURE__ */ M(nt, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ ie(
616
+ l && c.length > 0 && /* @__PURE__ */ M(nt, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ ie(
617
617
  He,
618
618
  {
619
619
  form: T,
620
620
  layout: "inline",
621
621
  onFinish: V,
622
- initialValues: i.reduce((u, d) => (d.defaultValue !== void 0 && (u[d.key] = d.defaultValue), u), {}),
622
+ initialValues: c.reduce((u, d) => (d.defaultValue !== void 0 && (u[d.key] = d.defaultValue), u), {}),
623
623
  children: [
624
- i.map((u) => /* @__PURE__ */ M(He.Item, { name: u.key, label: u.label, children: u.type === "input" ? /* @__PURE__ */ M(
624
+ c.map((u) => /* @__PURE__ */ M(He.Item, { name: u.key, label: u.label, children: u.type === "input" ? /* @__PURE__ */ M(
625
625
  kt,
626
626
  {
627
627
  placeholder: u.placeholder || `请输入${u.label}`,
@@ -638,7 +638,7 @@ const { Option: gn } = ze, vn = ({
638
638
  ) }, u.key)),
639
639
  /* @__PURE__ */ M(He.Item, { children: /* @__PURE__ */ ie(Yt, { children: [
640
640
  /* @__PURE__ */ M(Ae, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ M(tn, {}), children: "查询" }),
641
- /* @__PURE__ */ M(Ae, { onClick: x, children: "重置" }),
641
+ /* @__PURE__ */ M(Ae, { onClick: w, children: "重置" }),
642
642
  h && /* @__PURE__ */ M(Ae, { icon: /* @__PURE__ */ M(nn, {}), onClick: B, children: "刷新" })
643
643
  ] }) })
644
644
  ]
@@ -647,7 +647,7 @@ const { Option: gn } = ze, vn = ({
647
647
  /* @__PURE__ */ M(
648
648
  rt,
649
649
  {
650
- ...w,
650
+ ...$,
651
651
  columns: F,
652
652
  dataSource: N,
653
653
  loading: P,
@@ -731,22 +731,22 @@ vn.__docgenInfo = {
731
731
  }
732
732
  }
733
733
  };
734
- function Ze(t, y, i) {
734
+ function Ze(t, m, c) {
735
735
  if (!t.current) return;
736
736
  const l = /* @__PURE__ */ new Set(), h = {};
737
- for (const b of y)
738
- b.exclusionGroup && b.exclusionGroup !== "separator" && (l.add(b.exclusionGroup), h[b.exclusionGroup] || (h[b.exclusionGroup] = []), h[b.exclusionGroup].push({
739
- type: b.type,
740
- key: b.key,
741
- exclusionGroup: b.exclusionGroup
737
+ for (const x of m)
738
+ x.exclusionGroup && x.exclusionGroup !== "separator" && (l.add(x.exclusionGroup), h[x.exclusionGroup] || (h[x.exclusionGroup] = []), h[x.exclusionGroup].push({
739
+ type: x.type,
740
+ key: x.key,
741
+ exclusionGroup: x.exclusionGroup
742
742
  }));
743
743
  const q = {};
744
- for (const b of l) {
745
- q[b] = !1;
746
- for (const P of h[b])
744
+ for (const x of l) {
745
+ q[x] = !1;
746
+ for (const P of h[x])
747
747
  if (P.type === "upload" && P.key) {
748
- if (i[P.key] !== null && i[P.key] !== void 0) {
749
- q[b] = !0;
748
+ if (c[P.key] !== null && c[P.key] !== void 0) {
749
+ q[x] = !0;
750
750
  break;
751
751
  }
752
752
  } else if ((P.type === "variable" || P.type === "multi-variable") && P.key) {
@@ -757,29 +757,29 @@ function Ze(t, y, i) {
757
757
  )].filter(Boolean);
758
758
  for (const e of C)
759
759
  if (!e.classList.contains("show-placeholder") && e.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
760
- q[b] = !0;
760
+ q[x] = !0;
761
761
  break;
762
762
  }
763
- if (q[b])
763
+ if (q[x])
764
764
  break;
765
765
  }
766
766
  }
767
- const D = y.some((b) => b.exclusionGroup === "separator"), S = Object.keys(q).filter(
768
- (b) => q[b]
767
+ const D = m.some((x) => x.exclusionGroup === "separator"), S = Object.keys(q).filter(
768
+ (x) => q[x]
769
769
  ).length > 0;
770
- let w = null;
770
+ let $ = null;
771
771
  if (S && D) {
772
- for (const b of y)
773
- if (b.exclusionGroup && b.exclusionGroup !== "separator" && q[b.exclusionGroup]) {
774
- w = b.exclusionGroup;
772
+ for (const x of m)
773
+ if (x.exclusionGroup && x.exclusionGroup !== "separator" && q[x.exclusionGroup]) {
774
+ $ = x.exclusionGroup;
775
775
  break;
776
776
  }
777
777
  }
778
- for (const b of l) {
778
+ for (const x of l) {
779
779
  const P = t.current.querySelectorAll(
780
- `[data-group="${b}"]`
780
+ `[data-group="${x}"]`
781
781
  );
782
- D && S && w ? b === w ? P.forEach((C) => {
782
+ D && S && $ ? x === $ ? P.forEach((C) => {
783
783
  C.closest('[data-rte-force-hidden="1"]') || (C.classList.contains("required-upload-group") ? C.style.setProperty("display", "inline-flex", "important") : (C.classList.contains("exclusion-wrapper"), C.style.setProperty("display", "inline-block", "important")));
784
784
  }) : P.forEach((C) => {
785
785
  C.closest('[data-rte-force-hidden="1"]') || (C.style.display = "none", C.style.setProperty("display", "none", "important"));
@@ -789,11 +789,11 @@ function Ze(t, y, i) {
789
789
  }
790
790
  t.current.querySelectorAll(
791
791
  '[data-group="separator"]'
792
- ).forEach((b) => {
793
- b.style.display = S ? "none" : "inline";
792
+ ).forEach((x) => {
793
+ x.style.display = S ? "none" : "inline";
794
794
  });
795
795
  }
796
- function et(t, y, i, l) {
796
+ function et(t, m, c, l) {
797
797
  if (!t.current) {
798
798
  l(!1);
799
799
  return;
@@ -804,17 +804,17 @@ function et(t, y, i, l) {
804
804
  const a = (e.textContent || "").replace(/[\u200B]/g, "").trim(), p = Array.from(e.querySelectorAll(":scope > div"));
805
805
  if (p.length === 0)
806
806
  return a;
807
- let f = -1;
807
+ let y = -1;
808
808
  for (let z = 0; z < p.length; z++)
809
809
  if ((p[z].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
810
- f = z;
810
+ y = z;
811
811
  break;
812
812
  }
813
- return p.filter((z, Y) => Y !== f).map((z) => (z.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
813
+ return p.filter((z, Y) => Y !== y).map((z) => (z.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
814
814
  `).trim() || a;
815
815
  }, q = (e) => e ? !!e.closest('[data-rte-force-hidden="1"]') : !1, D = [];
816
- for (let e = 0; e < y.length; e++) {
817
- const r = y[e];
816
+ for (let e = 0; e < m.length; e++) {
817
+ const r = m[e];
818
818
  if ((r.type === "variable" || r.type === "report-url" || r.type === "upload" || r.type === "multi-variable" || r.type === "select" || r.type === "textarea" || r.type === "richtext" || r.type === "report-module" || r.type === "datepicker") && r.required && r.key) {
819
819
  D.push({
820
820
  exclusionGroup: r.exclusionGroup || "",
@@ -828,8 +828,8 @@ function et(t, y, i, l) {
828
828
  }
829
829
  if (r.type === "text" && r.className?.includes("rte-text-required"))
830
830
  if (r.exclusionGroup)
831
- for (let a = e + 1; a < y.length; a++) {
832
- const p = y[a];
831
+ for (let a = e + 1; a < m.length; a++) {
832
+ const p = m[a];
833
833
  if (p.exclusionGroup === r.exclusionGroup && (p.type === "variable" || p.type === "upload" || p.type === "select" || p.type === "textarea" || p.type === "richtext" || p.type === "datepicker") && p.key) {
834
834
  D.push({
835
835
  exclusionGroup: r.exclusionGroup,
@@ -841,8 +841,8 @@ function et(t, y, i, l) {
841
841
  }
842
842
  }
843
843
  else
844
- for (let a = e + 1; a < y.length; a++) {
845
- const p = y[a];
844
+ for (let a = e + 1; a < m.length; a++) {
845
+ const p = m[a];
846
846
  if ((p.type === "variable" || p.type === "upload" || p.type === "select" || p.type === "textarea" || p.type === "richtext" || p.type === "datepicker") && p.key) {
847
847
  D.push({
848
848
  exclusionGroup: p.exclusionGroup || "",
@@ -854,19 +854,19 @@ function et(t, y, i, l) {
854
854
  }
855
855
  }
856
856
  }
857
- const I = y.some((e) => e.exclusionGroup === "separator"), S = [];
857
+ const I = m.some((e) => e.exclusionGroup === "separator"), S = [];
858
858
  if (I && D.length > 1) {
859
859
  const e = [];
860
- y.forEach((r, a) => {
860
+ m.forEach((r, a) => {
861
861
  r.exclusionGroup === "separator" && e.push(a);
862
862
  });
863
863
  for (const r of e) {
864
- const p = D.filter((T) => typeof T.__index == "number" && T.__index < r).sort((T, z) => (z.__index ?? 0) - (T.__index ?? 0))[0], _ = D.filter((T) => typeof T.__index == "number" && T.__index > r).sort((T, z) => (T.__index ?? 0) - (z.__index ?? 0))[0];
865
- p && _ && S.push([p, _]);
864
+ const p = D.filter((T) => typeof T.__index == "number" && T.__index < r).sort((T, z) => (z.__index ?? 0) - (T.__index ?? 0))[0], A = D.filter((T) => typeof T.__index == "number" && T.__index > r).sort((T, z) => (T.__index ?? 0) - (z.__index ?? 0))[0];
865
+ p && A && S.push([p, A]);
866
866
  }
867
867
  }
868
868
  if (D.length === 0) {
869
- if (y.length === 0) {
869
+ if (m.length === 0) {
870
870
  if (!t.current) {
871
871
  l(!1);
872
872
  return;
@@ -878,7 +878,7 @@ function et(t, y, i, l) {
878
878
  l(!0);
879
879
  return;
880
880
  }
881
- const w = D.filter((e) => {
881
+ const $ = D.filter((e) => {
882
882
  if (!t.current) return !1;
883
883
  if (e.exclusionGroup) {
884
884
  const r = t.current.querySelectorAll(
@@ -948,7 +948,7 @@ function et(t, y, i, l) {
948
948
  }
949
949
  return !1;
950
950
  });
951
- if (w.length === 0) {
951
+ if ($.length === 0) {
952
952
  l(!0);
953
953
  return;
954
954
  }
@@ -958,7 +958,7 @@ function et(t, y, i, l) {
958
958
  r.key && N.add(r.key);
959
959
  });
960
960
  });
961
- const b = w.filter(
961
+ const x = $.filter(
962
962
  (e) => !e.key || !N.has(e.key)
963
963
  );
964
964
  let P = (S.length === 0, !0);
@@ -966,12 +966,12 @@ function et(t, y, i, l) {
966
966
  const r = e.filter((p) => {
967
967
  if (!t.current) return !1;
968
968
  if (p.exclusionGroup) {
969
- const f = t.current.querySelectorAll(
969
+ const y = t.current.querySelectorAll(
970
970
  `[data-group="${p.exclusionGroup}"]`
971
971
  );
972
- if (f.length > 0) {
973
- const _ = f[0];
974
- return q(_) ? !0 : _.style.display !== "none";
972
+ if (y.length > 0) {
973
+ const A = y[0];
974
+ return q(A) ? !0 : A.style.display !== "none";
975
975
  }
976
976
  }
977
977
  return !0;
@@ -982,82 +982,82 @@ function et(t, y, i, l) {
982
982
  for (const p of r)
983
983
  if (p.type === "upload" && p.key) {
984
984
  if (p.minCount && p.minCount > 0) {
985
- let f = 0;
986
- const _ = t.current.querySelectorAll(
985
+ let y = 0;
986
+ const A = t.current.querySelectorAll(
987
987
  `[data-type="upload"][data-batch-key="${p.key}"]`
988
988
  );
989
- if (_.length === 0)
989
+ if (A.length === 0)
990
990
  continue;
991
- for (let T = 0; T < _.length; T++) {
992
- const Y = _[T].dataset.key;
993
- Y && i[Y] != null && (f += 1);
991
+ for (let T = 0; T < A.length; T++) {
992
+ const Y = A[T].dataset.key;
993
+ Y && c[Y] != null && (y += 1);
994
994
  }
995
- if (f >= p.minCount) {
995
+ if (y >= p.minCount) {
996
996
  a = !0;
997
997
  break;
998
998
  }
999
- } else if (i[p.key] !== null && i[p.key] !== void 0) {
999
+ } else if (c[p.key] !== null && c[p.key] !== void 0) {
1000
1000
  a = !0;
1001
1001
  break;
1002
1002
  }
1003
1003
  } else if (p.type === "variable" && p.key)
1004
1004
  if (p.isMultiVariable) {
1005
- const f = t.current.querySelectorAll(
1005
+ const y = t.current.querySelectorAll(
1006
1006
  `[data-type="variable"][data-multi-key="${p.key}"]`
1007
1007
  );
1008
- let _ = 0;
1009
- for (const z of Array.from(f)) {
1008
+ let A = 0;
1009
+ for (const z of Array.from(y)) {
1010
1010
  if (z.classList.contains("show-placeholder"))
1011
1011
  continue;
1012
- z.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (_ += 1);
1012
+ z.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (A += 1);
1013
1013
  }
1014
1014
  const T = p.minCount && p.minCount > 0 ? p.minCount : 1;
1015
- if (_ >= T) {
1015
+ if (A >= T) {
1016
1016
  a = !0;
1017
1017
  break;
1018
1018
  }
1019
1019
  } else {
1020
- const f = t.current.querySelector(
1020
+ const y = t.current.querySelector(
1021
1021
  `[data-type="variable"][data-key="${p.key}"]`
1022
1022
  );
1023
- if (f) {
1024
- if (f.classList.contains("show-placeholder"))
1023
+ if (y) {
1024
+ if (y.classList.contains("show-placeholder"))
1025
1025
  continue;
1026
- if (f.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1026
+ if (y.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1027
1027
  a = !0;
1028
1028
  break;
1029
1029
  }
1030
1030
  }
1031
1031
  }
1032
1032
  else if (p.type === "select" && p.key) {
1033
- const f = t.current.querySelector(
1033
+ const y = t.current.querySelector(
1034
1034
  `[data-type="select"][data-key="${p.key}"]`
1035
1035
  );
1036
- if (f && (f.getAttribute("data-value") || "").trim().length > 0) {
1036
+ if (y && (y.getAttribute("data-value") || "").trim().length > 0) {
1037
1037
  a = !0;
1038
1038
  break;
1039
1039
  }
1040
1040
  } else if (p.type === "textarea" && p.key) {
1041
- const f = t.current.querySelector(
1041
+ const y = t.current.querySelector(
1042
1042
  `[data-type="textarea"][data-key="${p.key}"]`
1043
1043
  );
1044
- if (f && (f.value || "").trim().length > 0) {
1044
+ if (y && (y.value || "").trim().length > 0) {
1045
1045
  a = !0;
1046
1046
  break;
1047
1047
  }
1048
1048
  } else if (p.type === "richtext" && p.key) {
1049
- const f = t.current.querySelector(
1049
+ const y = t.current.querySelector(
1050
1050
  `[data-type="richtext"][data-key="${p.key}"]`
1051
1051
  );
1052
- if (f && h(f).length > 0) {
1052
+ if (y && h(y).length > 0) {
1053
1053
  a = !0;
1054
1054
  break;
1055
1055
  }
1056
1056
  } else if (p.type === "datepicker" && p.key) {
1057
- const f = t.current.querySelector(
1057
+ const y = t.current.querySelector(
1058
1058
  `[data-type="datepicker"][data-key="${p.key}"]`
1059
1059
  );
1060
- if (f && (f.getAttribute("data-value") || "").trim().length > 0) {
1060
+ if (y && (y.getAttribute("data-value") || "").trim().length > 0) {
1061
1061
  a = !0;
1062
1062
  break;
1063
1063
  }
@@ -1068,7 +1068,7 @@ function et(t, y, i, l) {
1068
1068
  }
1069
1069
  }
1070
1070
  let C = !0;
1071
- for (const e of b)
1071
+ for (const e of x)
1072
1072
  if (e.type === "upload" && e.key) {
1073
1073
  if (e.minCount && e.minCount > 0) {
1074
1074
  let r = 0;
@@ -1080,14 +1080,14 @@ function et(t, y, i, l) {
1080
1080
  break;
1081
1081
  }
1082
1082
  for (let p = 0; p < a.length; p++) {
1083
- const _ = a[p].dataset.key;
1084
- _ && i[_] != null && (r += 1);
1083
+ const A = a[p].dataset.key;
1084
+ A && c[A] != null && (r += 1);
1085
1085
  }
1086
1086
  if (r < e.minCount) {
1087
1087
  C = !1;
1088
1088
  break;
1089
1089
  }
1090
- } else if (i[e.key] === null || i[e.key] === void 0) {
1090
+ } else if (c[e.key] === null || c[e.key] === void 0) {
1091
1091
  C = !1;
1092
1092
  break;
1093
1093
  }
@@ -1097,10 +1097,10 @@ function et(t, y, i, l) {
1097
1097
  `[data-type="variable"][data-multi-key="${e.key}"]`
1098
1098
  );
1099
1099
  let a = 0;
1100
- for (const f of Array.from(r)) {
1101
- if (f.classList.contains("show-placeholder"))
1100
+ for (const y of Array.from(r)) {
1101
+ if (y.classList.contains("show-placeholder"))
1102
1102
  continue;
1103
- f.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (a += 1);
1103
+ y.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (a += 1);
1104
1104
  }
1105
1105
  const p = e.minCount && e.minCount > 0 ? e.minCount : 1;
1106
1106
  if (a < p) {
@@ -1159,25 +1159,25 @@ function et(t, y, i, l) {
1159
1159
  }
1160
1160
  l(P && C);
1161
1161
  }
1162
- function Qe(t, y) {
1162
+ function Qe(t, m) {
1163
1163
  if (!t.current) return;
1164
1164
  t.current.querySelectorAll('[data-type="variable"]').forEach((l) => {
1165
1165
  const h = l.innerText;
1166
1166
  h.replace(/\u200B/g, "").trim().length === 0 ? (h !== "​" && (l.innerText = "​"), l.classList.add("show-placeholder")) : l.classList.remove("show-placeholder");
1167
1167
  });
1168
1168
  }
1169
- const bn = ({ host: t, onChange: y }) => {
1170
- const i = t.dataset.key, l = t.dataset.placeholder, h = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", q = t.dataset.required === "true", D = t.dataset.value || "", I = Gt.useMemo(() => {
1169
+ const bn = ({ host: t, onChange: m }) => {
1170
+ const c = t.dataset.key, l = t.dataset.placeholder, h = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", q = t.dataset.required === "true", D = t.dataset.value || "", I = Gt.useMemo(() => {
1171
1171
  try {
1172
1172
  return JSON.parse(h);
1173
1173
  } catch {
1174
1174
  return [];
1175
1175
  }
1176
- }, [h]), [S, w] = ae(D || void 0), N = (b) => {
1177
- w(b), t.setAttribute("data-value", b), y(i, b);
1176
+ }, [h]), [S, $] = ae(D || void 0), N = (x) => {
1177
+ $(x), t.setAttribute("data-value", x), m(c, x);
1178
1178
  };
1179
1179
  return de(() => {
1180
- w(D || void 0);
1180
+ $(D || void 0);
1181
1181
  }, [D]), at(
1182
1182
  /* @__PURE__ */ M(
1183
1183
  "div",
@@ -1206,15 +1206,15 @@ const bn = ({ host: t, onChange: y }) => {
1206
1206
  t
1207
1207
  );
1208
1208
  }, xn = (t) => {
1209
- const [y, i] = ae([]);
1209
+ const [m, c] = ae([]);
1210
1210
  return de(() => {
1211
1211
  const l = t.current;
1212
1212
  if (!l) return;
1213
1213
  const h = () => {
1214
1214
  const D = l.querySelectorAll(".rte-select-host"), I = [];
1215
1215
  D.forEach((S) => {
1216
- const w = S.getAttribute("data-key");
1217
- w && I.push(
1216
+ const $ = S.getAttribute("data-key");
1217
+ $ && I.push(
1218
1218
  /* @__PURE__ */ M(
1219
1219
  bn,
1220
1220
  {
@@ -1226,28 +1226,28 @@ const bn = ({ host: t, onChange: y }) => {
1226
1226
  }
1227
1227
  }
1228
1228
  },
1229
- `select-${w}`
1229
+ `select-${$}`
1230
1230
  )
1231
1231
  );
1232
- }), i(I);
1232
+ }), c(I);
1233
1233
  };
1234
1234
  h();
1235
1235
  const q = new MutationObserver((D) => {
1236
1236
  let I = !1;
1237
1237
  for (const S of D)
1238
1238
  if (S.type === "childList") {
1239
- let w = !1;
1239
+ let $ = !1;
1240
1240
  if (S.addedNodes.forEach((N) => {
1241
1241
  if (N.nodeType === Node.ELEMENT_NODE) {
1242
- const b = N;
1243
- (b.classList?.contains("rte-select-host") || b.querySelector?.(".rte-select-host")) && (w = !0);
1242
+ const x = N;
1243
+ (x.classList?.contains("rte-select-host") || x.querySelector?.(".rte-select-host")) && ($ = !0);
1244
1244
  }
1245
1245
  }), S.removedNodes.forEach((N) => {
1246
1246
  if (N.nodeType === Node.ELEMENT_NODE) {
1247
- const b = N;
1248
- (b.classList?.contains("rte-select-host") || b.querySelector?.(".rte-select-host")) && (w = !0);
1247
+ const x = N;
1248
+ (x.classList?.contains("rte-select-host") || x.querySelector?.(".rte-select-host")) && ($ = !0);
1249
1249
  }
1250
- }), w) {
1250
+ }), $) {
1251
1251
  I = !0;
1252
1252
  break;
1253
1253
  }
@@ -1255,45 +1255,45 @@ const bn = ({ host: t, onChange: y }) => {
1255
1255
  I && h();
1256
1256
  });
1257
1257
  return q.observe(l, { childList: !0, subtree: !0 }), () => q.disconnect();
1258
- }, [t]), y;
1258
+ }, [t]), m;
1259
1259
  }, Oe = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1260
- function wn(t, y, i, l, h, q = {}, D, I) {
1260
+ function wn(t, m, c, l, h, q = {}, D, I) {
1261
1261
  if (!t.current) return;
1262
- const S = /[;;,,。.!!??::、]/, w = (e) => {
1262
+ const S = /[;;,,。.!!??::、]/, $ = (e) => {
1263
1263
  const r = (e ?? "").trim();
1264
1264
  return r.length === 1 && S.test(r);
1265
1265
  }, N = (e) => {
1266
1266
  const r = e ?? "", a = r.match(new RegExp(`^\\s*(${S.source})`));
1267
1267
  if (!a) return null;
1268
- const p = a[1], f = r.replace(new RegExp(`^\\s*${S.source}`), "");
1269
- return { punct: p, rest: f };
1270
- }, b = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, P = [];
1268
+ const p = a[1], y = r.replace(new RegExp(`^\\s*${S.source}`), "");
1269
+ return { punct: p, rest: y };
1270
+ }, x = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, P = [];
1271
1271
  let C = 0;
1272
- for (; C < y.length; ) {
1273
- const e = y[C], r = C + 1 < y.length ? y[C + 1] : null;
1272
+ for (; C < m.length; ) {
1273
+ const e = m[C], r = C + 1 < m.length ? m[C + 1] : null;
1274
1274
  if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && r) {
1275
1275
  const Y = r.type === "upload" && r.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === r.exclusionGroup, j = r.type === "variable" && r.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === r.exclusionGroup;
1276
1276
  if (Y) {
1277
1277
  const F = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", n = `<span ${F} class="exclusion-wrapper required-upload-group">`, V = "</span>";
1278
- let x = "";
1279
- e.className ? x = `<span class="${e.className}">${e.text ?? ""}</span>` : x = e.text ?? "";
1280
- const B = r, X = i[B.key] !== null && i[B.key] !== void 0, u = X ? i[B.key] : null, d = X ? i[B.key]?.name : B.text, g = X ? "" : "hidden", k = B.tooltip && !X ? "" : "hidden", L = X ? "has-file" : "", W = X && d ? ` data-file-name="${d.replace(/"/g, "&quot;")}"` : "";
1278
+ let w = "";
1279
+ e.className ? w = `<span class="${e.className}">${e.text ?? ""}</span>` : w = e.text ?? "";
1280
+ const B = r, X = c[B.key] !== null && c[B.key] !== void 0, u = X ? c[B.key] : null, d = X ? c[B.key]?.name : B.text, v = X ? "" : "hidden", E = B.tooltip && !X ? "" : "hidden", L = X ? "has-file" : "", W = X && d ? ` data-file-name="${d.replace(/"/g, "&quot;")}"` : "";
1281
1281
  let U = "";
1282
1282
  X && u ? u.type?.startsWith("image/") ? U = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(u)}" alt="preview" />` : U = "<i class='iconfont icon-exlwenjian'></i>" : U = "<i class='iconfont icon-shangchuan1'></i>";
1283
- const Q = (B.text || "").trim(), ue = X && Q.length >= 12 ? `<span ${F} contenteditable="false" class="exclusion-wrapper upload-hint">${Q}</span>` : "", me = `<span contenteditable="false" data-type="upload" data-key="${B.key}" class="upload-chip"><span class="upload-inner-wrapper ${L}"><span class="upload-icon">${U}</span><span class="upload-label"${W}>${d || B.text}</span>${B.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${k}" data-upload-key="${B.key}" data-tooltip="${B.tooltip}"></i>` : ""}<span class="file-remove-btn ${g}" title="移除文件">×</span></span></span>`;
1284
- P.push(n + x + me + V + ue), C += 2;
1283
+ const Z = (B.text || "").trim(), ue = X && Z.length >= 12 ? `<span ${F} contenteditable="false" class="exclusion-wrapper upload-hint">${Z}</span>` : "", ye = `<span contenteditable="false" data-type="upload" data-key="${B.key}" class="upload-chip"><span class="upload-inner-wrapper ${L}"><span class="upload-icon">${U}</span><span class="upload-label"${W}>${d || B.text}</span>${B.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${E}" data-upload-key="${B.key}" data-tooltip="${B.tooltip}"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
1284
+ P.push(n + w + ye + V + ue), C += 2;
1285
1285
  continue;
1286
1286
  }
1287
1287
  if (j) {
1288
1288
  const n = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, V = "</span>";
1289
- let x = "";
1290
- e.className ? x = `<span class="${e.className}">${e.text ?? ""}</span>` : x = e.text ?? "";
1291
- const B = r, u = (B.key ? h[B.key] : void 0) || B.text || "", d = !u, g = d ? "​" : u, k = d ? "show-placeholder" : "", L = B.exclusionGroup ? ` data-group="${B.exclusionGroup}"` : "", W = B.tooltip ? ` data-tooltip="${B.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${B.key || ""}"` : "", U = B.tooltip && d ? "" : "hidden", Q = `<span contenteditable="true" data-type="variable" data-key="${B.key}" data-placeholder="${B.placeholder || ""}"${L}${W} class="variable-chip ${k}">${g}${B.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${U}" data-variable-key="${B.key}" data-tooltip="${B.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1292
- P.push(n + x + Q + V), C += 2;
1289
+ let w = "";
1290
+ e.className ? w = `<span class="${e.className}">${e.text ?? ""}</span>` : w = e.text ?? "";
1291
+ const B = r, u = (B.key ? h[B.key] : void 0) || B.text || "", d = !u, v = d ? "​" : u, E = d ? "show-placeholder" : "", L = B.exclusionGroup ? ` data-group="${B.exclusionGroup}"` : "", W = B.tooltip ? ` data-tooltip="${B.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${B.key || ""}"` : "", U = B.tooltip && d ? "" : "hidden", Z = `<span contenteditable="true" data-type="variable" data-key="${B.key}" data-placeholder="${B.placeholder || ""}"${L}${W} class="variable-chip ${E}">${v}${B.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${U}" data-variable-key="${B.key}" data-tooltip="${B.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1292
+ P.push(n + w + Z + V), C += 2;
1293
1293
  continue;
1294
1294
  }
1295
1295
  }
1296
- const p = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", f = e.exclusionGroup ? `<span ${p} class="exclusion-wrapper">` : "", _ = e.exclusionGroup ? "</span>" : "";
1296
+ const p = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", y = e.exclusionGroup ? `<span ${p} class="exclusion-wrapper">` : "", A = e.exclusionGroup ? "</span>" : "";
1297
1297
  let T = "";
1298
1298
  if (e.type === "tag") {
1299
1299
  const j = l || D === "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>', F = l ? ' data-locked="true"' : "", n = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
@@ -1302,10 +1302,10 @@ function wn(t, y, i, l, h, q = {}, D, I) {
1302
1302
  const Y = l ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', F = (e.text ?? "").replace(/\n/g, "<br/>");
1303
1303
  e.className ? T = `<span data-type="text" class="${e.className}"${Y}>${F}</span>` : T = l ? `<span data-type="text"${Y}>${F}</span>` : `<span data-type="text" contenteditable="false">${F}</span>`;
1304
1304
  } else if (e.type === "variable" && e.key) {
1305
- const j = h[e.key] || e.text || "", F = !j, n = F ? "​" : j, V = F ? "show-placeholder" : "", x = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", B = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && F ? "" : "hidden", u = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${x}${B} class="variable-chip ${V}">${n}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1305
+ const j = h[e.key] || e.text || "", F = !j, n = F ? "​" : j, V = F ? "show-placeholder" : "", w = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", B = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && F ? "" : "hidden", u = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${w}${B} class="variable-chip ${V}">${n}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1306
1306
  e.required ? T = `<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>` : T = u;
1307
1307
  } else if (e.type === "report-url" && e.key) {
1308
- const j = h[e.key] || e.text || "", F = !j, n = F ? "​" : j, V = F ? "show-placeholder" : "", x = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", B = e.tooltip ? ` data-tooltip="${Oe(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && F ? "" : "hidden", u = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${Oe(e.placeholder || "")}"${x}${B} class="variable-chip rte-report-url ${V}">${n}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${Oe(e.tooltip)}" ></i>` : ""}</span>`;
1308
+ const j = h[e.key] || e.text || "", F = !j, n = F ? "​" : j, V = F ? "show-placeholder" : "", w = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", B = e.tooltip ? ` data-tooltip="${Oe(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && F ? "" : "hidden", u = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${Oe(e.placeholder || "")}"${w}${B} class="variable-chip rte-report-url ${V}">${n}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${Oe(e.tooltip)}" ></i>` : ""}</span>`;
1309
1309
  e.required ? T = `<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>` : T = u;
1310
1310
  } else if (e.type === "upload" && e.key)
1311
1311
  if (typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
@@ -1313,39 +1313,39 @@ function wn(t, y, i, l, h, q = {}, D, I) {
1313
1313
  let n = 0;
1314
1314
  for (let B = 0; B < F; B++) {
1315
1315
  const X = `${e.key}-${B}`;
1316
- i[X] != null && (n += 1);
1316
+ c[X] != null && (n += 1);
1317
1317
  }
1318
1318
  const V = Math.min(
1319
1319
  F,
1320
1320
  Math.max(j, n + (n < F ? 1 : 0))
1321
1321
  );
1322
- let x = "";
1322
+ let w = "";
1323
1323
  for (let B = 0; B < V; B++) {
1324
- const X = `${e.key}-${B}`, u = i[X] !== null && i[X] !== void 0, d = u ? i[X] : null, g = u ? i[X]?.name : e.text, k = u ? "" : "hidden", L = e.tooltip && !u ? "" : "hidden", W = u ? "has-file" : "", U = u && g ? ` data-file-name="${g.replace(/"/g, "&quot;")}"` : "";
1325
- let Q = "";
1326
- u && d ? d.type?.startsWith("image/") ? Q = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(d)}" alt="preview" />` : Q = "<i class='iconfont icon-exlwenjian'></i>" : Q = "<i class='iconfont icon-shangchuan1'></i>";
1327
- const oe = ` data-batch-key="${e.key}"`, ue = ` data-batch-index="${B}"`, me = `<span contenteditable="false" data-type="upload" data-key="${X}"${oe}${ue} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${W}"><span class="upload-icon">${Q}</span><span class="upload-label"${U}>${g || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${L}" data-upload-key="${X}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${k}" title="移除文件">×</span></span></span>`;
1328
- x += me;
1324
+ const X = `${e.key}-${B}`, u = c[X] !== null && c[X] !== void 0, d = u ? c[X] : null, v = u ? c[X]?.name : e.text, E = u ? "" : "hidden", L = e.tooltip && !u ? "" : "hidden", W = u ? "has-file" : "", U = u && v ? ` data-file-name="${v.replace(/"/g, "&quot;")}"` : "";
1325
+ let Z = "";
1326
+ u && d ? d.type?.startsWith("image/") ? Z = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(d)}" alt="preview" />` : Z = "<i class='iconfont icon-exlwenjian'></i>" : Z = "<i class='iconfont icon-shangchuan1'></i>";
1327
+ const oe = ` data-batch-key="${e.key}"`, ue = ` data-batch-index="${B}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${X}"${oe}${ue} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${W}"><span class="upload-icon">${Z}</span><span class="upload-label"${U}>${v || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${L}" data-upload-key="${X}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${E}" title="移除文件">×</span></span></span>`;
1328
+ w += ye;
1329
1329
  }
1330
- e.required ? T = `<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">${x}</span></span>` : T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${x}</span>`;
1330
+ e.required ? T = `<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">${w}</span></span>` : T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${w}</span>`;
1331
1331
  } else {
1332
- const j = i[e.key] !== null && i[e.key] !== void 0, F = j ? i[e.key] : null, n = j ? i[e.key]?.name : e.text, V = j ? "" : "hidden", x = e.tooltip && !j ? "" : "hidden", B = j ? "has-file" : "", X = j && n ? ` data-file-name="${n.replace(/"/g, "&quot;")}"` : "";
1332
+ const j = c[e.key] !== null && c[e.key] !== void 0, F = j ? c[e.key] : null, n = j ? c[e.key]?.name : e.text, V = j ? "" : "hidden", w = e.tooltip && !j ? "" : "hidden", B = j ? "has-file" : "", X = j && n ? ` data-file-name="${n.replace(/"/g, "&quot;")}"` : "";
1333
1333
  let u = "";
1334
1334
  j && F ? F.type?.startsWith("image/") ? u = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(F)}" alt="preview" />` : u = "<i class='iconfont icon-exlwenjian'></i>" : u = "<i class='iconfont icon-shangchuan1'></i>";
1335
- const d = (e.text || "").trim(), k = j && e.showHint === !0 && d.length >= 12 ? `<span ${p} contenteditable="false" class="exclusion-wrapper upload-hint">${d}</span>` : "", L = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${B}"><span class="upload-icon">${u}</span><span class="upload-label"${X}>${n || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${x}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${V}" title="移除文件">×</span></span></span>`;
1336
- e.required ? T = `<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>${L}</span>${k}` : T = L + k;
1335
+ const d = (e.text || "").trim(), E = j && e.showHint === !0 && d.length >= 12 ? `<span ${p} contenteditable="false" class="exclusion-wrapper upload-hint">${d}</span>` : "", L = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${B}"><span class="upload-icon">${u}</span><span class="upload-label"${X}>${n || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${w}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${V}" title="移除文件">×</span></span></span>`;
1336
+ e.required ? T = `<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>${L}</span>${E}` : T = L + E;
1337
1337
  }
1338
1338
  else if (e.type === "select" && e.key) {
1339
- const Y = h[e.key] || e.defaultValue || "", j = encodeURIComponent(JSON.stringify(e.options || [])), F = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", n = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", V = e.required ? ' data-required="true"' : "", x = `<div data-type="select" data-key="${e.key}" data-value="${Y}" data-options="${j}"${F}${n}${V} class="rte-select-host"></div>`;
1340
- e.required ? T = `<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>${x}</span>` : T = x;
1339
+ const Y = h[e.key] || e.defaultValue || "", j = encodeURIComponent(JSON.stringify(e.options || [])), F = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", n = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", V = e.required ? ' data-required="true"' : "", w = `<div data-type="select" data-key="${e.key}" data-value="${Y}" data-options="${j}"${F}${n}${V} class="rte-select-host"></div>`;
1340
+ e.required ? T = `<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>` : T = w;
1341
1341
  } else if (e.type === "textarea" && e.key) {
1342
1342
  const Y = h[e.key] || "", j = typeof e.maxHeight == "number" ? e.maxHeight : 252, F = e.placeholder ? ` placeholder="${e.placeholder}"` : "", n = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${j}px;"${F}>${Y}</textarea>`, V = `<div class="rte-textarea-wrapper" data-key="${e.key}">${n}</div>`;
1343
1343
  e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${V}</span>` : T = V;
1344
1344
  } else if (e.type === "richtext" && e.key) {
1345
- const Y = h[e.key] || e.text || "", j = typeof e.minHeight == "number" ? e.minHeight : 40, F = typeof e.maxHeight == "number" ? e.maxHeight : 160, n = Math.max(F, j), V = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", x = e.expandable !== !1, B = Y, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${V} style="min-height:${j}px;max-height:${n}px;overflow:auto;">${B}</div>`, u = x ? `<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>` : "", d = `<div class="rte-richtext-wrapper${x ? " rte-richtext-toggleable" : ""}" data-key="${e.key}">${X}${u}</div>`, g = `<div class="rte-richtext-container" data-key="${e.key}">${d}</div>`;
1346
- e.required ? T = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${g}</div>` : T = g;
1345
+ const Y = h[e.key] || e.text || "", j = typeof e.minHeight == "number" ? e.minHeight : 40, F = typeof e.maxHeight == "number" ? e.maxHeight : 160, n = Math.max(F, j), V = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", w = e.expandable !== !1, B = Y, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${V} style="min-height:${j}px;max-height:${n}px;overflow:auto;">${B}</div>`, u = 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>` : "", d = `<div class="rte-richtext-wrapper${w ? " rte-richtext-toggleable" : ""}" data-key="${e.key}">${X}${u}</div>`, v = `<div class="rte-richtext-container" data-key="${e.key}">${d}</div>`;
1346
+ e.required ? T = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${v}</div>` : T = v;
1347
1347
  } else if (e.type === "report-module" && e.key) {
1348
- const j = Object.prototype.hasOwnProperty.call(h, e.key) ? h[e.key] : e.text || "", F = typeof e.minHeight == "number" ? e.minHeight : 80, n = typeof e.maxHeight == "number" ? e.maxHeight : 240, V = Math.max(n, F), x = e.placeholder ? ` data-placeholder="${Oe(e.placeholder)}"` : "", B = j, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" class="rte-richtext rte-report-module"${x} style="min-height:${F}px;max-height:${V}px;overflow:auto;">${B}</div>`, u = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${X}</div>`, d = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${u}</div>`;
1348
+ const j = Object.prototype.hasOwnProperty.call(h, e.key) ? h[e.key] : e.text || "", F = typeof e.minHeight == "number" ? e.minHeight : 80, n = typeof e.maxHeight == "number" ? e.maxHeight : 240, V = Math.max(n, F), w = e.placeholder ? ` data-placeholder="${Oe(e.placeholder)}"` : "", B = j, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" class="rte-richtext rte-report-module"${w} style="min-height:${F}px;max-height:${V}px;overflow:auto;">${B}</div>`, u = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${X}</div>`, d = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${u}</div>`;
1349
1349
  e.required ? T = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${d}</div>` : T = d;
1350
1350
  } else if (e.type === "datepicker" && e.key) {
1351
1351
  const Y = h[e.key] || "", j = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", F = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", n = e.disableFuture ? ' data-disable-future="true"' : "", V = `<div data-type="datepicker" data-key="${e.key}" data-value="${Y}" class="rte-datepicker-host"${j}${F}${n}></div>`;
@@ -1354,32 +1354,32 @@ function wn(t, y, i, l, h, q = {}, D, I) {
1354
1354
  const Y = e.maxCount || 9, j = q[e.key] || 1, F = Math.min(j, Y);
1355
1355
  if (e.required) {
1356
1356
  const n = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, V = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1357
- let x = "";
1357
+ let w = "";
1358
1358
  for (let B = 0; B < F; B++) {
1359
- const X = `${e.key}_${B}`, u = h[X] || "", d = !u, g = d ? "​" : u, k = d ? "show-placeholder" : "", L = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", W = e.tooltip && d ? "" : "hidden", U = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", Q = `<span contenteditable="true" data-type="variable" data-key="${X}" data-multi-key="${e.key}" data-index="${B}" data-placeholder="${e.placeholder || ""}"${U}${L} class="variable-chip ${k}">${g}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${W}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1360
- B === 0 ? x += `<span ${V} class="exclusion-wrapper required-upload-group required-multi-first">${n}${Q}</span>` : x += Q;
1359
+ const X = `${e.key}_${B}`, u = h[X] || "", d = !u, v = d ? "​" : u, E = d ? "show-placeholder" : "", L = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", W = e.tooltip && d ? "" : "hidden", U = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", Z = `<span contenteditable="true" data-type="variable" data-key="${X}" data-multi-key="${e.key}" data-index="${B}" data-placeholder="${e.placeholder || ""}"${U}${L} class="variable-chip ${E}">${v}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${W}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1360
+ B === 0 ? w += `<span ${V} class="exclusion-wrapper required-upload-group required-multi-first">${n}${Z}</span>` : w += Z;
1361
1361
  }
1362
- T = x;
1362
+ T = w;
1363
1363
  } else {
1364
1364
  let n = "";
1365
1365
  for (let V = 0; V < F; V++) {
1366
- const x = `${e.key}_${V}`, B = h[x] || "", X = !B, u = X ? "​" : B, d = X ? "show-placeholder" : "", g = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", k = e.tooltip && X ? "" : "hidden", L = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", W = `<span contenteditable="true" data-type="variable" data-key="${x}" data-multi-key="${e.key}" data-index="${V}" data-placeholder="${e.placeholder || ""}"${L}${g} class="variable-chip ${d}">${u}${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>`;
1366
+ const w = `${e.key}_${V}`, B = h[w] || "", X = !B, u = X ? "​" : B, d = X ? "show-placeholder" : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", E = e.tooltip && X ? "" : "hidden", L = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", W = `<span contenteditable="true" data-type="variable" data-key="${w}" data-multi-key="${e.key}" data-index="${V}" data-placeholder="${e.placeholder || ""}"${L}${v} class="variable-chip ${d}">${u}${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>`;
1367
1367
  n += W;
1368
1368
  }
1369
1369
  T = n;
1370
1370
  }
1371
1371
  }
1372
- const z = f + T + _;
1372
+ const z = y + T + A;
1373
1373
  if (e.type === "text" && !e.className && !e.exclusionGroup) {
1374
- if (w(e.text) && P.length > 0) {
1374
+ if ($(e.text) && P.length > 0) {
1375
1375
  const j = P[P.length - 1], F = (e.text ?? "").trim();
1376
- P[P.length - 1] = `<span class="rte-inline-group">${j}${b(F)}</span>`, C++;
1376
+ P[P.length - 1] = `<span class="rte-inline-group">${j}${x(F)}</span>`, C++;
1377
1377
  continue;
1378
1378
  }
1379
1379
  const Y = N(e.text);
1380
1380
  if (Y && P.length > 0) {
1381
1381
  const j = P[P.length - 1];
1382
- P[P.length - 1] = `<span class="rte-inline-group">${j}${b(Y.punct)}</span>`;
1382
+ P[P.length - 1] = `<span class="rte-inline-group">${j}${x(Y.punct)}</span>`;
1383
1383
  const F = Y.rest;
1384
1384
  if (F) {
1385
1385
  const n = F.replace(/\n/g, "<br/>");
@@ -1399,10 +1399,10 @@ function wn(t, y, i, l, h, q = {}, D, I) {
1399
1399
  });
1400
1400
  }, 0));
1401
1401
  }
1402
- function kn(t, y, i, l, h = {}, q, D, I, S) {
1403
- const w = se(() => {
1402
+ function kn(t, m, c, l, h = {}, q, D, I, S) {
1403
+ const $ = se(() => {
1404
1404
  if (!t.current) return;
1405
- if (y.length === 0) {
1405
+ if (m.length === 0) {
1406
1406
  t.current.innerHTML = "";
1407
1407
  return;
1408
1408
  }
@@ -1413,40 +1413,40 @@ function kn(t, y, i, l, h = {}, q, D, I, S) {
1413
1413
  const C = t.current;
1414
1414
  C.__tempVariableValues === P && delete C.__tempVariableValues;
1415
1415
  }
1416
- }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((f) => {
1417
- const _ = f.dataset.key;
1418
- if (_) {
1419
- const T = f.innerText.replace(/[\u200B\n]/g, "").trim();
1420
- T && (N[_] = T);
1416
+ }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((y) => {
1417
+ const A = y.dataset.key;
1418
+ if (A) {
1419
+ const T = y.innerText.replace(/[\u200B\n]/g, "").trim();
1420
+ T && (N[A] = T);
1421
1421
  }
1422
- }), t.current.querySelectorAll('[data-type="select"]').forEach((f) => {
1423
- const _ = f.dataset.key;
1424
- if (_) {
1425
- const T = (f.getAttribute("data-value") || "").trim();
1426
- T && (N[_] = T);
1422
+ }), t.current.querySelectorAll('[data-type="select"]').forEach((y) => {
1423
+ const A = y.dataset.key;
1424
+ if (A) {
1425
+ const T = (y.getAttribute("data-value") || "").trim();
1426
+ T && (N[A] = T);
1427
1427
  }
1428
- }), t.current.querySelectorAll('[data-type="textarea"]').forEach((f) => {
1429
- const _ = f.dataset.key;
1430
- if (_) {
1431
- const T = f.value.replace(/[\u200B]/g, "").trim();
1432
- T && (N[_] = T);
1428
+ }), t.current.querySelectorAll('[data-type="textarea"]').forEach((y) => {
1429
+ const A = y.dataset.key;
1430
+ if (A) {
1431
+ const T = y.value.replace(/[\u200B]/g, "").trim();
1432
+ T && (N[A] = T);
1433
1433
  }
1434
- }), t.current.querySelectorAll('[data-type="richtext"]').forEach((f) => {
1435
- const _ = f.dataset.key;
1436
- if (_) {
1437
- const T = f.getAttribute("data-node-type") || "", z = T === "report-module" ? (f.innerHTML || "").replace(/[\u200B]/g, "").trim() : (f.textContent || "").replace(/[\u200B]/g, "").trim();
1438
- (T === "report-module" || z) && (N[_] = z);
1434
+ }), t.current.querySelectorAll('[data-type="richtext"]').forEach((y) => {
1435
+ const A = y.dataset.key;
1436
+ if (A) {
1437
+ const T = y.getAttribute("data-node-type") || "", z = T === "report-module" ? (y.innerHTML || "").replace(/[\u200B]/g, "").trim() : (y.textContent || "").replace(/[\u200B]/g, "").trim();
1438
+ (T === "report-module" || z) && (N[A] = z);
1439
1439
  }
1440
- }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((f) => {
1441
- const _ = f.dataset.key;
1442
- if (_) {
1443
- const T = (f.getAttribute("data-value") || "").trim();
1444
- T && (N[_] = T);
1440
+ }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((y) => {
1441
+ const A = y.dataset.key;
1442
+ if (A) {
1443
+ const T = (y.getAttribute("data-value") || "").trim();
1444
+ T && (N[A] = T);
1445
1445
  }
1446
1446
  })), wn(
1447
1447
  t,
1448
- y,
1449
- i,
1448
+ m,
1449
+ c,
1450
1450
  l,
1451
1451
  N,
1452
1452
  h,
@@ -1465,17 +1465,17 @@ function kn(t, y, i, l, h = {}, q, D, I, S) {
1465
1465
  NodeFilter.SHOW_TEXT,
1466
1466
  null
1467
1467
  );
1468
- let f = 0, _ = null, T = 0;
1468
+ let y = 0, A = null, T = 0;
1469
1469
  for (; p.nextNode(); ) {
1470
1470
  const z = p.currentNode, Y = z.textContent?.length || 0;
1471
- if (f + Y >= e) {
1472
- _ = z, T = e - f;
1471
+ if (y + Y >= e) {
1472
+ A = z, T = e - y;
1473
1473
  break;
1474
1474
  }
1475
- f += Y;
1475
+ y += Y;
1476
1476
  }
1477
- if (_) {
1478
- a.setStart(_, Math.min(T, _.textContent?.length || 0)), a.collapse(!0);
1477
+ if (A) {
1478
+ a.setStart(A, Math.min(T, A.textContent?.length || 0)), a.collapse(!0);
1479
1479
  const z = window.getSelection();
1480
1480
  z && (z.removeAllRanges(), z.addRange(a), r.focus());
1481
1481
  } else {
@@ -1493,37 +1493,37 @@ function kn(t, y, i, l, h = {}, q, D, I, S) {
1493
1493
  }
1494
1494
  }, 0);
1495
1495
  }
1496
- }, [y, i, l, t, h, q, D, I, S]);
1496
+ }, [m, c, l, t, h, q, D, I, S]);
1497
1497
  de(() => {
1498
- w();
1499
- }, [w]);
1498
+ $();
1499
+ }, [$]);
1500
1500
  }
1501
- function $n(t, y, i, l) {
1501
+ function $n(t, m, c, l) {
1502
1502
  de(() => {
1503
1503
  const h = t.current;
1504
1504
  if (!h) return;
1505
1505
  const q = (S) => S.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(S.name || ""), D = (S) => {
1506
- const w = S.target?.closest(".upload-info-icon");
1507
- if (w && w.classList.contains("upload-info-icon")) {
1508
- const b = w.dataset.uploadKey;
1509
- if (b) {
1510
- const P = w.closest('[data-type="upload"]');
1511
- l(P ? { key: b, anchorEl: P, type: "upload" } : { key: b, anchorEl: w, type: "upload" });
1506
+ const $ = S.target?.closest(".upload-info-icon");
1507
+ if ($ && $.classList.contains("upload-info-icon")) {
1508
+ const x = $.dataset.uploadKey;
1509
+ if (x) {
1510
+ const P = $.closest('[data-type="upload"]');
1511
+ l(P ? { key: x, anchorEl: P, type: "upload" } : { key: x, anchorEl: $, type: "upload" });
1512
1512
  }
1513
1513
  return;
1514
1514
  }
1515
1515
  const N = S.target?.closest('[data-type="upload"]');
1516
1516
  if (N) {
1517
- const b = N.dataset.key;
1518
- if (b) {
1519
- const P = i[b];
1520
- P && q(P) && l({ key: b, anchorEl: N, type: "upload-preview" });
1517
+ const x = N.dataset.key;
1518
+ if (x) {
1519
+ const P = c[x];
1520
+ P && q(P) && l({ key: x, anchorEl: N, type: "upload-preview" });
1521
1521
  }
1522
1522
  }
1523
1523
  }, I = (S) => {
1524
- const w = S.target?.closest(".upload-info-icon"), N = S.relatedTarget;
1525
- if (w && w.classList.contains("upload-info-icon")) {
1526
- const P = w.closest('[data-type="upload"]');
1524
+ const $ = S.target?.closest(".upload-info-icon"), N = S.relatedTarget;
1525
+ if ($ && $.classList.contains("upload-info-icon")) {
1526
+ const P = $.closest('[data-type="upload"]');
1527
1527
  if (N && P && P.contains(N))
1528
1528
  return;
1529
1529
  if (!N || !h.contains(N))
@@ -1534,10 +1534,10 @@ function $n(t, y, i, l) {
1534
1534
  }
1535
1535
  return;
1536
1536
  }
1537
- const b = S.target?.closest('[data-type="upload"]');
1538
- if (b) {
1537
+ const x = S.target?.closest('[data-type="upload"]');
1538
+ if (x) {
1539
1539
  const P = N;
1540
- if (P && b.contains(P))
1540
+ if (P && x.contains(P))
1541
1541
  return;
1542
1542
  l(null);
1543
1543
  }
@@ -1545,26 +1545,26 @@ function $n(t, y, i, l) {
1545
1545
  return h.addEventListener("mouseover", D, !0), h.addEventListener("mouseout", I, !0), () => {
1546
1546
  h.removeEventListener("mouseover", D, !0), h.removeEventListener("mouseout", I, !0);
1547
1547
  };
1548
- }, [y, i, t, l]);
1548
+ }, [m, c, t, l]);
1549
1549
  }
1550
- function En(t, y, i, l) {
1550
+ function En(t, m, c, l) {
1551
1551
  de(() => {
1552
1552
  if (!t.current) return;
1553
1553
  const h = (S) => {
1554
1554
  if (l === "hideTagClose")
1555
1555
  return;
1556
- const w = S.currentTarget, N = w.dataset.tooltip, b = w.dataset.tagKey || "";
1557
- N && i({ key: b, anchorEl: w, type: "tag" });
1556
+ const $ = S.currentTarget, N = $.dataset.tooltip, x = $.dataset.tagKey || "";
1557
+ N && c({ key: x, anchorEl: $, type: "tag" });
1558
1558
  }, q = () => {
1559
- i(null);
1559
+ c(null);
1560
1560
  };
1561
1561
  let D;
1562
1562
  const I = () => {
1563
1563
  if (!t.current) return;
1564
1564
  t.current.querySelectorAll(
1565
1565
  ".tag-node[data-tooltip]"
1566
- ).forEach((w) => {
1567
- w.addEventListener("mouseenter", h), w.addEventListener("mouseleave", q);
1566
+ ).forEach(($) => {
1567
+ $.addEventListener("mouseenter", h), $.addEventListener("mouseleave", q);
1568
1568
  });
1569
1569
  };
1570
1570
  return D = requestAnimationFrame(() => {
@@ -1572,60 +1572,60 @@ function En(t, y, i, l) {
1572
1572
  }), () => {
1573
1573
  cancelAnimationFrame(D), t.current && t.current.querySelectorAll(
1574
1574
  ".tag-node[data-tooltip]"
1575
- ).forEach((w) => {
1576
- w.removeEventListener("mouseenter", h), w.removeEventListener("mouseleave", q);
1575
+ ).forEach(($) => {
1576
+ $.removeEventListener("mouseenter", h), $.removeEventListener("mouseleave", q);
1577
1577
  });
1578
1578
  };
1579
- }, [y, t, i, l]);
1579
+ }, [m, t, c, l]);
1580
1580
  }
1581
- function Cn(t, y, i) {
1581
+ function Cn(t, m, c) {
1582
1582
  de(() => {
1583
1583
  const l = t.current;
1584
1584
  if (!l) return;
1585
1585
  const h = (D) => {
1586
1586
  const I = D.target?.closest(".variable-info-icon");
1587
1587
  if (I && I.classList.contains("variable-info-icon")) {
1588
- const w = I.dataset.variableKey;
1589
- w && i({ key: w, anchorEl: I, type: "variable" });
1588
+ const $ = I.dataset.variableKey;
1589
+ $ && c({ key: $, anchorEl: I, type: "variable" });
1590
1590
  return;
1591
1591
  }
1592
1592
  const S = D.target?.closest(
1593
1593
  '[data-type="variable"][data-node-type="report-url"][data-tooltip]'
1594
1594
  );
1595
1595
  if (S) {
1596
- const w = S.dataset.key;
1597
- w && i({ key: w, anchorEl: S, type: "variable" });
1596
+ const $ = S.dataset.key;
1597
+ $ && c({ key: $, anchorEl: S, type: "variable" });
1598
1598
  }
1599
1599
  }, q = (D) => {
1600
- const I = D.target, S = D.relatedTarget, w = I?.closest?.(".variable-info-icon"), N = I?.closest?.(
1600
+ const I = D.target, S = D.relatedTarget, $ = I?.closest?.(".variable-info-icon"), N = I?.closest?.(
1601
1601
  '[data-type="variable"][data-node-type="report-url"][data-tooltip]'
1602
1602
  );
1603
- if (w || N) {
1603
+ if ($ || N) {
1604
1604
  if (!S || !l.contains(S)) {
1605
- i(null);
1605
+ c(null);
1606
1606
  return;
1607
1607
  }
1608
- const b = !!S.closest?.(".variable-info-icon"), P = !!S.closest?.(
1608
+ const x = !!S.closest?.(".variable-info-icon"), P = !!S.closest?.(
1609
1609
  '[data-type="variable"][data-node-type="report-url"][data-tooltip]'
1610
1610
  );
1611
- !b && !P && i(null);
1611
+ !x && !P && c(null);
1612
1612
  }
1613
1613
  };
1614
1614
  return l.addEventListener("mouseover", h, !0), l.addEventListener("mouseout", q, !0), () => {
1615
1615
  l.removeEventListener("mouseover", h, !0), l.removeEventListener("mouseout", q, !0);
1616
1616
  };
1617
- }, [y, t, i]);
1617
+ }, [m, t, c]);
1618
1618
  }
1619
- function Sn(t, y, i, l) {
1619
+ function Sn(t, m, c, l) {
1620
1620
  de(() => {
1621
1621
  if (!t.current) return;
1622
- const h = (w) => w.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(w.name || ""), q = (w) => {
1623
- const N = w.currentTarget, b = N.dataset.fileName, P = N.closest('[data-type="upload"]'), C = P?.dataset.key || "", e = C ? i[C] : null;
1622
+ const h = ($) => $.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test($.name || ""), q = ($) => {
1623
+ const N = $.currentTarget, x = N.dataset.fileName, P = N.closest('[data-type="upload"]'), C = P?.dataset.key || "", e = C ? c[C] : null;
1624
1624
  if (e && h(e)) {
1625
1625
  l({ key: C, anchorEl: P || N, type: "upload-preview" });
1626
1626
  return;
1627
1627
  }
1628
- b && l({ key: C, anchorEl: P || N, type: "upload-label" });
1628
+ x && l({ key: C, anchorEl: P || N, type: "upload-label" });
1629
1629
  }, D = () => {
1630
1630
  l(null);
1631
1631
  };
@@ -1647,54 +1647,54 @@ function Sn(t, y, i, l) {
1647
1647
  N.removeEventListener("mouseenter", q), N.removeEventListener("mouseleave", D);
1648
1648
  });
1649
1649
  };
1650
- }, [y, i, t, l]);
1650
+ }, [m, c, t, l]);
1651
1651
  }
1652
- function Tn(t, y, i, l) {
1652
+ function Tn(t, m, c, l) {
1653
1653
  de(() => {
1654
1654
  const h = setTimeout(() => {
1655
- Ze(t, y, i), et(t, y, i, l);
1655
+ Ze(t, m, c), et(t, m, c, l);
1656
1656
  }, 0);
1657
1657
  return () => clearTimeout(h);
1658
- }, [i, y, t, l]);
1658
+ }, [c, m, t, l]);
1659
1659
  }
1660
- function qn(t, y) {
1661
- const i = re(0), l = re(0);
1660
+ function qn(t, m) {
1661
+ const c = re(0), l = re(0);
1662
1662
  de(() => {
1663
1663
  if (!t.current) return;
1664
1664
  let h = !1, q = 0;
1665
- const D = (f) => f instanceof HTMLElement ? !!(f.closest(".rte-datepicker-wrapper") || f.closest(".rte-datepicker-host") || f.closest(".ant-picker") || f.closest(".ant-picker-dropdown")) : !1, I = (f) => f instanceof HTMLElement ? !!(f.closest(".rte-select-wrapper") || f.closest(".rte-select-host") || f.closest(".ant-select") || f.closest(".ant-select-dropdown")) : !1, S = (f) => {
1666
- h = !0, D(f.target) && (i.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), I(f.target) && (l.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
1667
- }, w = () => {
1665
+ const D = (y) => y instanceof HTMLElement ? !!(y.closest(".rte-datepicker-wrapper") || y.closest(".rte-datepicker-host") || y.closest(".ant-picker") || y.closest(".ant-picker-dropdown")) : !1, I = (y) => y instanceof HTMLElement ? !!(y.closest(".rte-select-wrapper") || y.closest(".rte-select-host") || y.closest(".ant-select") || y.closest(".ant-select-dropdown")) : !1, S = (y) => {
1666
+ h = !0, D(y.target) && (c.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), I(y.target) && (l.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
1667
+ }, $ = () => {
1668
1668
  h = !1, q = Date.now();
1669
1669
  };
1670
- let N = !1, b = 0;
1670
+ let N = !1, x = 0;
1671
1671
  const P = () => {
1672
1672
  N = !0;
1673
1673
  }, C = () => {
1674
- N = !1, b = Date.now();
1674
+ N = !1, x = Date.now();
1675
1675
  }, e = () => {
1676
- b = Date.now();
1677
- }, r = (f) => {
1678
- D(f.target) && (i.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), I(f.target) && (l.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
1676
+ x = Date.now();
1677
+ }, r = (y) => {
1678
+ D(y.target) && (c.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), I(y.target) && (l.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
1679
1679
  }, a = () => {
1680
- if (Date.now() - i.current < 800 || Date.now() - l.current < 800) {
1680
+ if (Date.now() - c.current < 800 || Date.now() - l.current < 800) {
1681
1681
  console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");
1682
1682
  return;
1683
1683
  }
1684
- const f = document.activeElement;
1685
- if (f && (f.closest(".rte-datepicker-wrapper") || f.closest(".rte-datepicker-host") || f.closest(".ant-picker-dropdown") || // Antd dropdown
1686
- f.tagName === "INPUT" && f.closest(".ant-picker") || f.closest(".rte-select-wrapper") || f.closest(".rte-select-host") || f.closest(".ant-select") || f.closest(".ant-select-dropdown"))) {
1684
+ const y = document.activeElement;
1685
+ if (y && (y.closest(".rte-datepicker-wrapper") || y.closest(".rte-datepicker-host") || y.closest(".ant-picker-dropdown") || // Antd dropdown
1686
+ y.tagName === "INPUT" && y.closest(".ant-picker") || y.closest(".rte-select-wrapper") || y.closest(".rte-select-host") || y.closest(".ant-select") || y.closest(".ant-select-dropdown"))) {
1687
1687
  console.log("[SelectionCtrl] activeElement is picker/select; skip");
1688
1688
  return;
1689
1689
  }
1690
1690
  if (!t.current) return;
1691
- const _ = window.getSelection();
1692
- if (!_ || _.rangeCount === 0 || y.current || h || N || Date.now() - b < 500)
1691
+ const A = window.getSelection();
1692
+ if (!A || A.rangeCount === 0 || m.current || h || N || Date.now() - x < 500)
1693
1693
  return;
1694
- const T = _.getRangeAt(0);
1694
+ const T = A.getRangeAt(0);
1695
1695
  if (!T.collapsed)
1696
1696
  return t.current.contains(T.commonAncestorContainer), void 0;
1697
- const z = _.anchorNode;
1697
+ const z = A.anchorNode;
1698
1698
  if (!z || !t.current.contains(z))
1699
1699
  return;
1700
1700
  let Y = !1, j = !1;
@@ -1714,135 +1714,135 @@ function qn(t, y) {
1714
1714
  const n = t.current.querySelectorAll('[data-type="variable"]');
1715
1715
  if (n.length > 0) {
1716
1716
  let V = null;
1717
- for (const x of Array.from(n))
1718
- if (x.style.display !== "none") {
1719
- V = x;
1717
+ for (const w of Array.from(n))
1718
+ if (w.style.display !== "none") {
1719
+ V = w;
1720
1720
  break;
1721
1721
  }
1722
1722
  if (!V && n.length > 0 && (V = n[0]), V) {
1723
- const x = document.createRange();
1724
- x.selectNodeContents(V), x.collapse(!1), _.removeAllRanges(), _.addRange(x), V.focus();
1723
+ const w = document.createRange();
1724
+ w.selectNodeContents(V), w.collapse(!1), A.removeAllRanges(), A.addRange(w), V.focus();
1725
1725
  } else
1726
- _.removeAllRanges();
1726
+ A.removeAllRanges();
1727
1727
  } else
1728
- _.removeAllRanges();
1728
+ A.removeAllRanges();
1729
1729
  }
1730
1730
  }, p = t.current;
1731
- return p && (p.addEventListener("compositionstart", P), p.addEventListener("compositionend", C), p.addEventListener("input", e)), document.addEventListener("mousedown", S), document.addEventListener("mouseup", w), document.addEventListener("focusin", r), document.addEventListener("selectionchange", a), () => {
1732
- const f = t.current;
1733
- f && (f.removeEventListener("compositionstart", P), f.removeEventListener("compositionend", C), f.removeEventListener("input", e)), document.removeEventListener("mousedown", S), document.removeEventListener("mouseup", w), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", a);
1731
+ return p && (p.addEventListener("compositionstart", P), p.addEventListener("compositionend", C), p.addEventListener("input", e)), document.addEventListener("mousedown", S), document.addEventListener("mouseup", $), document.addEventListener("focusin", r), document.addEventListener("selectionchange", a), () => {
1732
+ const y = t.current;
1733
+ y && (y.removeEventListener("compositionstart", P), y.removeEventListener("compositionend", C), y.removeEventListener("input", e)), document.removeEventListener("mousedown", S), document.removeEventListener("mouseup", $), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", a);
1734
1734
  };
1735
- }, [t, y]);
1735
+ }, [t, m]);
1736
1736
  }
1737
1737
  function Nn(t) {
1738
1738
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1739
1739
  }
1740
1740
  var Ge = { exports: {} }, An = Ge.exports, gt;
1741
1741
  function $t() {
1742
- return gt || (gt = 1, function(t, y) {
1743
- (function(i, l) {
1742
+ return gt || (gt = 1, function(t, m) {
1743
+ (function(c, l) {
1744
1744
  t.exports = l();
1745
1745
  })(An, function() {
1746
- var i = 1e3, l = 6e4, h = 36e5, q = "millisecond", D = "second", I = "minute", S = "hour", w = "day", N = "week", b = "month", P = "quarter", C = "year", e = "date", r = "Invalid Date", a = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, p = /\[([^\]]+)]|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, f = { 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(u) {
1747
- var d = ["th", "st", "nd", "rd"], g = u % 100;
1748
- return "[" + u + (d[(g - 20) % 10] || d[g] || d[0]) + "]";
1749
- } }, _ = function(u, d, g) {
1750
- var k = String(u);
1751
- return !k || k.length >= d ? u : "" + Array(d + 1 - k.length).join(g) + u;
1752
- }, T = { s: _, z: function(u) {
1753
- var d = -u.utcOffset(), g = Math.abs(d), k = Math.floor(g / 60), L = g % 60;
1754
- return (d <= 0 ? "+" : "-") + _(k, 2, "0") + ":" + _(L, 2, "0");
1755
- }, m: function u(d, g) {
1756
- if (d.date() < g.date()) return -u(g, d);
1757
- var k = 12 * (g.year() - d.year()) + (g.month() - d.month()), L = d.clone().add(k, b), W = g - L < 0, U = d.clone().add(k + (W ? -1 : 1), b);
1758
- return +(-(k + (g - L) / (W ? L - U : U - L)) || 0);
1746
+ var c = 1e3, l = 6e4, h = 36e5, q = "millisecond", D = "second", I = "minute", S = "hour", $ = "day", N = "week", x = "month", P = "quarter", C = "year", e = "date", r = "Invalid Date", a = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, p = /\[([^\]]+)]|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, y = { 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(u) {
1747
+ var d = ["th", "st", "nd", "rd"], v = u % 100;
1748
+ return "[" + u + (d[(v - 20) % 10] || d[v] || d[0]) + "]";
1749
+ } }, A = function(u, d, v) {
1750
+ var E = String(u);
1751
+ return !E || E.length >= d ? u : "" + Array(d + 1 - E.length).join(v) + u;
1752
+ }, T = { s: A, z: function(u) {
1753
+ var d = -u.utcOffset(), v = Math.abs(d), E = Math.floor(v / 60), L = v % 60;
1754
+ return (d <= 0 ? "+" : "-") + A(E, 2, "0") + ":" + A(L, 2, "0");
1755
+ }, m: function u(d, v) {
1756
+ if (d.date() < v.date()) return -u(v, d);
1757
+ var E = 12 * (v.year() - d.year()) + (v.month() - d.month()), L = d.clone().add(E, x), W = v - L < 0, U = d.clone().add(E + (W ? -1 : 1), x);
1758
+ return +(-(E + (v - L) / (W ? L - U : U - L)) || 0);
1759
1759
  }, a: function(u) {
1760
1760
  return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
1761
1761
  }, p: function(u) {
1762
- return { M: b, y: C, w: N, d: w, D: e, h: S, m: I, s: D, ms: q, Q: P }[u] || String(u || "").toLowerCase().replace(/s$/, "");
1762
+ return { M: x, y: C, w: N, d: $, D: e, h: S, m: I, s: D, ms: q, Q: P }[u] || String(u || "").toLowerCase().replace(/s$/, "");
1763
1763
  }, u: function(u) {
1764
1764
  return u === void 0;
1765
1765
  } }, z = "en", Y = {};
1766
- Y[z] = f;
1766
+ Y[z] = y;
1767
1767
  var j = "$isDayjsObject", F = function(u) {
1768
1768
  return u instanceof B || !(!u || !u[j]);
1769
- }, n = function u(d, g, k) {
1769
+ }, n = function u(d, v, E) {
1770
1770
  var L;
1771
1771
  if (!d) return z;
1772
1772
  if (typeof d == "string") {
1773
1773
  var W = d.toLowerCase();
1774
- Y[W] && (L = W), g && (Y[W] = g, L = W);
1774
+ Y[W] && (L = W), v && (Y[W] = v, L = W);
1775
1775
  var U = d.split("-");
1776
1776
  if (!L && U.length > 1) return u(U[0]);
1777
1777
  } else {
1778
- var Q = d.name;
1779
- Y[Q] = d, L = Q;
1778
+ var Z = d.name;
1779
+ Y[Z] = d, L = Z;
1780
1780
  }
1781
- return !k && L && (z = L), L || !k && z;
1781
+ return !E && L && (z = L), L || !E && z;
1782
1782
  }, V = function(u, d) {
1783
1783
  if (F(u)) return u.clone();
1784
- var g = typeof d == "object" ? d : {};
1785
- return g.date = u, g.args = arguments, new B(g);
1786
- }, x = T;
1787
- x.l = n, x.i = F, x.w = function(u, d) {
1784
+ var v = typeof d == "object" ? d : {};
1785
+ return v.date = u, v.args = arguments, new B(v);
1786
+ }, w = T;
1787
+ w.l = n, w.i = F, w.w = function(u, d) {
1788
1788
  return V(u, { locale: d.$L, utc: d.$u, x: d.$x, $offset: d.$offset });
1789
1789
  };
1790
1790
  var B = function() {
1791
- function u(g) {
1792
- this.$L = n(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[j] = !0;
1791
+ function u(v) {
1792
+ this.$L = n(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[j] = !0;
1793
1793
  }
1794
1794
  var d = u.prototype;
1795
- return d.parse = function(g) {
1796
- this.$d = function(k) {
1797
- var L = k.date, W = k.utc;
1795
+ return d.parse = function(v) {
1796
+ this.$d = function(E) {
1797
+ var L = E.date, W = E.utc;
1798
1798
  if (L === null) return /* @__PURE__ */ new Date(NaN);
1799
- if (x.u(L)) return /* @__PURE__ */ new Date();
1799
+ if (w.u(L)) return /* @__PURE__ */ new Date();
1800
1800
  if (L instanceof Date) return new Date(L);
1801
1801
  if (typeof L == "string" && !/Z$/i.test(L)) {
1802
1802
  var U = L.match(a);
1803
1803
  if (U) {
1804
- var Q = U[2] - 1 || 0, oe = (U[7] || "0").substring(0, 3);
1805
- return W ? new Date(Date.UTC(U[1], Q, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, oe)) : new Date(U[1], Q, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, oe);
1804
+ var Z = U[2] - 1 || 0, oe = (U[7] || "0").substring(0, 3);
1805
+ return W ? new Date(Date.UTC(U[1], Z, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, oe)) : new Date(U[1], Z, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, oe);
1806
1806
  }
1807
1807
  }
1808
1808
  return new Date(L);
1809
- }(g), this.init();
1809
+ }(v), this.init();
1810
1810
  }, d.init = function() {
1811
- var g = this.$d;
1812
- this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
1811
+ var v = this.$d;
1812
+ this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
1813
1813
  }, d.$utils = function() {
1814
- return x;
1814
+ return w;
1815
1815
  }, d.isValid = function() {
1816
1816
  return this.$d.toString() !== r;
1817
- }, d.isSame = function(g, k) {
1818
- var L = V(g);
1819
- return this.startOf(k) <= L && L <= this.endOf(k);
1820
- }, d.isAfter = function(g, k) {
1821
- return V(g) < this.startOf(k);
1822
- }, d.isBefore = function(g, k) {
1823
- return this.endOf(k) < V(g);
1824
- }, d.$g = function(g, k, L) {
1825
- return x.u(g) ? this[k] : this.set(L, g);
1817
+ }, d.isSame = function(v, E) {
1818
+ var L = V(v);
1819
+ return this.startOf(E) <= L && L <= this.endOf(E);
1820
+ }, d.isAfter = function(v, E) {
1821
+ return V(v) < this.startOf(E);
1822
+ }, d.isBefore = function(v, E) {
1823
+ return this.endOf(E) < V(v);
1824
+ }, d.$g = function(v, E, L) {
1825
+ return w.u(v) ? this[E] : this.set(L, v);
1826
1826
  }, d.unix = function() {
1827
1827
  return Math.floor(this.valueOf() / 1e3);
1828
1828
  }, d.valueOf = function() {
1829
1829
  return this.$d.getTime();
1830
- }, d.startOf = function(g, k) {
1831
- var L = this, W = !!x.u(k) || k, U = x.p(g), Q = function(ge, he) {
1832
- var ke = x.w(L.$u ? Date.UTC(L.$y, he, ge) : new Date(L.$y, he, ge), L);
1833
- return W ? ke : ke.endOf(w);
1830
+ }, d.startOf = function(v, E) {
1831
+ var L = this, W = !!w.u(E) || E, U = w.p(v), Z = function(ge, he) {
1832
+ var ke = w.w(L.$u ? Date.UTC(L.$y, he, ge) : new Date(L.$y, he, ge), L);
1833
+ return W ? ke : ke.endOf($);
1834
1834
  }, oe = function(ge, he) {
1835
- return x.w(L.toDate()[ge].apply(L.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(he)), L);
1836
- }, ue = this.$W, me = this.$M, pe = this.$D, we = "set" + (this.$u ? "UTC" : "");
1835
+ return w.w(L.toDate()[ge].apply(L.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(he)), L);
1836
+ }, ue = this.$W, ye = this.$M, pe = this.$D, we = "set" + (this.$u ? "UTC" : "");
1837
1837
  switch (U) {
1838
1838
  case C:
1839
- return W ? Q(1, 0) : Q(31, 11);
1840
- case b:
1841
- return W ? Q(1, me) : Q(0, me + 1);
1839
+ return W ? Z(1, 0) : Z(31, 11);
1840
+ case x:
1841
+ return W ? Z(1, ye) : Z(0, ye + 1);
1842
1842
  case N:
1843
- var ee = this.$locale().weekStart || 0, ye = (ue < ee ? ue + 7 : ue) - ee;
1844
- return Q(W ? pe - ye : pe + (6 - ye), me);
1845
- case w:
1843
+ var ee = this.$locale().weekStart || 0, me = (ue < ee ? ue + 7 : ue) - ee;
1844
+ return Z(W ? pe - me : pe + (6 - me), ye);
1845
+ case $:
1846
1846
  case e:
1847
1847
  return oe(we + "Hours", 0);
1848
1848
  case S:
@@ -1854,41 +1854,41 @@ function $t() {
1854
1854
  default:
1855
1855
  return this.clone();
1856
1856
  }
1857
- }, d.endOf = function(g) {
1858
- return this.startOf(g, !1);
1859
- }, d.$set = function(g, k) {
1860
- var L, W = x.p(g), U = "set" + (this.$u ? "UTC" : ""), Q = (L = {}, L[w] = U + "Date", L[e] = U + "Date", L[b] = U + "Month", L[C] = U + "FullYear", L[S] = U + "Hours", L[I] = U + "Minutes", L[D] = U + "Seconds", L[q] = U + "Milliseconds", L)[W], oe = W === w ? this.$D + (k - this.$W) : k;
1861
- if (W === b || W === C) {
1857
+ }, d.endOf = function(v) {
1858
+ return this.startOf(v, !1);
1859
+ }, d.$set = function(v, E) {
1860
+ var L, W = w.p(v), U = "set" + (this.$u ? "UTC" : ""), Z = (L = {}, L[$] = U + "Date", L[e] = U + "Date", L[x] = U + "Month", L[C] = U + "FullYear", L[S] = U + "Hours", L[I] = U + "Minutes", L[D] = U + "Seconds", L[q] = U + "Milliseconds", L)[W], oe = W === $ ? this.$D + (E - this.$W) : E;
1861
+ if (W === x || W === C) {
1862
1862
  var ue = this.clone().set(e, 1);
1863
- ue.$d[Q](oe), ue.init(), this.$d = ue.set(e, Math.min(this.$D, ue.daysInMonth())).$d;
1864
- } else Q && this.$d[Q](oe);
1863
+ ue.$d[Z](oe), ue.init(), this.$d = ue.set(e, Math.min(this.$D, ue.daysInMonth())).$d;
1864
+ } else Z && this.$d[Z](oe);
1865
1865
  return this.init(), this;
1866
- }, d.set = function(g, k) {
1867
- return this.clone().$set(g, k);
1868
- }, d.get = function(g) {
1869
- return this[x.p(g)]();
1870
- }, d.add = function(g, k) {
1866
+ }, d.set = function(v, E) {
1867
+ return this.clone().$set(v, E);
1868
+ }, d.get = function(v) {
1869
+ return this[w.p(v)]();
1870
+ }, d.add = function(v, E) {
1871
1871
  var L, W = this;
1872
- g = Number(g);
1873
- var U = x.p(k), Q = function(me) {
1872
+ v = Number(v);
1873
+ var U = w.p(E), Z = function(ye) {
1874
1874
  var pe = V(W);
1875
- return x.w(pe.date(pe.date() + Math.round(me * g)), W);
1875
+ return w.w(pe.date(pe.date() + Math.round(ye * v)), W);
1876
1876
  };
1877
- if (U === b) return this.set(b, this.$M + g);
1878
- if (U === C) return this.set(C, this.$y + g);
1879
- if (U === w) return Q(1);
1880
- if (U === N) return Q(7);
1881
- var oe = (L = {}, L[I] = l, L[S] = h, L[D] = i, L)[U] || 1, ue = this.$d.getTime() + g * oe;
1882
- return x.w(ue, this);
1883
- }, d.subtract = function(g, k) {
1884
- return this.add(-1 * g, k);
1885
- }, d.format = function(g) {
1886
- var k = this, L = this.$locale();
1877
+ if (U === x) return this.set(x, this.$M + v);
1878
+ if (U === C) return this.set(C, this.$y + v);
1879
+ if (U === $) return Z(1);
1880
+ if (U === N) return Z(7);
1881
+ var oe = (L = {}, L[I] = l, L[S] = h, L[D] = c, L)[U] || 1, ue = this.$d.getTime() + v * oe;
1882
+ return w.w(ue, this);
1883
+ }, d.subtract = function(v, E) {
1884
+ return this.add(-1 * v, E);
1885
+ }, d.format = function(v) {
1886
+ var E = this, L = this.$locale();
1887
1887
  if (!this.isValid()) return L.invalidDate || r;
1888
- var W = g || "YYYY-MM-DDTHH:mm:ssZ", U = x.z(this), Q = this.$H, oe = this.$m, ue = this.$M, me = L.weekdays, pe = L.months, we = L.meridiem, ee = function(he, ke, $e, Ee) {
1889
- return he && (he[ke] || he(k, W)) || $e[ke].slice(0, Ee);
1890
- }, ye = function(he) {
1891
- return x.s(Q % 12 || 12, he, "0");
1888
+ var W = v || "YYYY-MM-DDTHH:mm:ssZ", U = w.z(this), Z = this.$H, oe = this.$m, ue = this.$M, ye = L.weekdays, pe = L.months, we = L.meridiem, ee = function(he, ke, $e, Ee) {
1889
+ return he && (he[ke] || he(E, W)) || $e[ke].slice(0, Ee);
1890
+ }, me = function(he) {
1891
+ return w.s(Z % 12 || 12, he, "0");
1892
1892
  }, ge = we || function(he, ke, $e) {
1893
1893
  var Ee = he < 12 ? "AM" : "PM";
1894
1894
  return $e ? Ee.toLowerCase() : Ee;
@@ -1897,51 +1897,51 @@ function $t() {
1897
1897
  return ke || function($e) {
1898
1898
  switch ($e) {
1899
1899
  case "YY":
1900
- return String(k.$y).slice(-2);
1900
+ return String(E.$y).slice(-2);
1901
1901
  case "YYYY":
1902
- return x.s(k.$y, 4, "0");
1902
+ return w.s(E.$y, 4, "0");
1903
1903
  case "M":
1904
1904
  return ue + 1;
1905
1905
  case "MM":
1906
- return x.s(ue + 1, 2, "0");
1906
+ return w.s(ue + 1, 2, "0");
1907
1907
  case "MMM":
1908
1908
  return ee(L.monthsShort, ue, pe, 3);
1909
1909
  case "MMMM":
1910
1910
  return ee(pe, ue);
1911
1911
  case "D":
1912
- return k.$D;
1912
+ return E.$D;
1913
1913
  case "DD":
1914
- return x.s(k.$D, 2, "0");
1914
+ return w.s(E.$D, 2, "0");
1915
1915
  case "d":
1916
- return String(k.$W);
1916
+ return String(E.$W);
1917
1917
  case "dd":
1918
- return ee(L.weekdaysMin, k.$W, me, 2);
1918
+ return ee(L.weekdaysMin, E.$W, ye, 2);
1919
1919
  case "ddd":
1920
- return ee(L.weekdaysShort, k.$W, me, 3);
1920
+ return ee(L.weekdaysShort, E.$W, ye, 3);
1921
1921
  case "dddd":
1922
- return me[k.$W];
1922
+ return ye[E.$W];
1923
1923
  case "H":
1924
- return String(Q);
1924
+ return String(Z);
1925
1925
  case "HH":
1926
- return x.s(Q, 2, "0");
1926
+ return w.s(Z, 2, "0");
1927
1927
  case "h":
1928
- return ye(1);
1928
+ return me(1);
1929
1929
  case "hh":
1930
- return ye(2);
1930
+ return me(2);
1931
1931
  case "a":
1932
- return ge(Q, oe, !0);
1932
+ return ge(Z, oe, !0);
1933
1933
  case "A":
1934
- return ge(Q, oe, !1);
1934
+ return ge(Z, oe, !1);
1935
1935
  case "m":
1936
1936
  return String(oe);
1937
1937
  case "mm":
1938
- return x.s(oe, 2, "0");
1938
+ return w.s(oe, 2, "0");
1939
1939
  case "s":
1940
- return String(k.$s);
1940
+ return String(E.$s);
1941
1941
  case "ss":
1942
- return x.s(k.$s, 2, "0");
1942
+ return w.s(E.$s, 2, "0");
1943
1943
  case "SSS":
1944
- return x.s(k.$ms, 3, "0");
1944
+ return w.s(E.$ms, 3, "0");
1945
1945
  case "Z":
1946
1946
  return U;
1947
1947
  }
@@ -1950,49 +1950,49 @@ function $t() {
1950
1950
  });
1951
1951
  }, d.utcOffset = function() {
1952
1952
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1953
- }, d.diff = function(g, k, L) {
1954
- var W, U = this, Q = x.p(k), oe = V(g), ue = (oe.utcOffset() - this.utcOffset()) * l, me = this - oe, pe = function() {
1955
- return x.m(U, oe);
1953
+ }, d.diff = function(v, E, L) {
1954
+ var W, U = this, Z = w.p(E), oe = V(v), ue = (oe.utcOffset() - this.utcOffset()) * l, ye = this - oe, pe = function() {
1955
+ return w.m(U, oe);
1956
1956
  };
1957
- switch (Q) {
1957
+ switch (Z) {
1958
1958
  case C:
1959
1959
  W = pe() / 12;
1960
1960
  break;
1961
- case b:
1961
+ case x:
1962
1962
  W = pe();
1963
1963
  break;
1964
1964
  case P:
1965
1965
  W = pe() / 3;
1966
1966
  break;
1967
1967
  case N:
1968
- W = (me - ue) / 6048e5;
1968
+ W = (ye - ue) / 6048e5;
1969
1969
  break;
1970
- case w:
1971
- W = (me - ue) / 864e5;
1970
+ case $:
1971
+ W = (ye - ue) / 864e5;
1972
1972
  break;
1973
1973
  case S:
1974
- W = me / h;
1974
+ W = ye / h;
1975
1975
  break;
1976
1976
  case I:
1977
- W = me / l;
1977
+ W = ye / l;
1978
1978
  break;
1979
1979
  case D:
1980
- W = me / i;
1980
+ W = ye / c;
1981
1981
  break;
1982
1982
  default:
1983
- W = me;
1983
+ W = ye;
1984
1984
  }
1985
- return L ? W : x.a(W);
1985
+ return L ? W : w.a(W);
1986
1986
  }, d.daysInMonth = function() {
1987
- return this.endOf(b).$D;
1987
+ return this.endOf(x).$D;
1988
1988
  }, d.$locale = function() {
1989
1989
  return Y[this.$L];
1990
- }, d.locale = function(g, k) {
1991
- if (!g) return this.$L;
1992
- var L = this.clone(), W = n(g, k, !0);
1990
+ }, d.locale = function(v, E) {
1991
+ if (!v) return this.$L;
1992
+ var L = this.clone(), W = n(v, E, !0);
1993
1993
  return W && (L.$L = W), L;
1994
1994
  }, d.clone = function() {
1995
- return x.w(this.$d, this);
1995
+ return w.w(this.$d, this);
1996
1996
  }, d.toDate = function() {
1997
1997
  return new Date(this.valueOf());
1998
1998
  }, d.toJSON = function() {
@@ -2003,7 +2003,7 @@ function $t() {
2003
2003
  return this.$d.toUTCString();
2004
2004
  }, u;
2005
2005
  }(), X = B.prototype;
2006
- return V.prototype = X, [["$ms", q], ["$s", D], ["$m", I], ["$H", S], ["$W", w], ["$M", b], ["$y", C], ["$D", e]].forEach(function(u) {
2006
+ return V.prototype = X, [["$ms", q], ["$s", D], ["$m", I], ["$H", S], ["$W", $], ["$M", x], ["$y", C], ["$D", e]].forEach(function(u) {
2007
2007
  X[u[1]] = function(d) {
2008
2008
  return this.$g(d, u[0], u[1]);
2009
2009
  };
@@ -2019,14 +2019,14 @@ var _n = $t();
2019
2019
  const Re = /* @__PURE__ */ Nn(_n);
2020
2020
  var Fe = { exports: {} }, Ln = Fe.exports, vt;
2021
2021
  function Mn() {
2022
- return vt || (vt = 1, function(t, y) {
2023
- (function(i, l) {
2022
+ return vt || (vt = 1, function(t, m) {
2023
+ (function(c, l) {
2024
2024
  t.exports = l($t());
2025
- })(Ln, function(i) {
2025
+ })(Ln, function(c) {
2026
2026
  function l(D) {
2027
2027
  return D && typeof D == "object" && "default" in D ? D : { default: D };
2028
2028
  }
2029
- var h = l(i), q = { 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(D, I) {
2029
+ var h = l(c), q = { 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(D, I) {
2030
2030
  return I === "W" ? D + "周" : D + "日";
2031
2031
  }, 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(D, I) {
2032
2032
  var S = 100 * D + I;
@@ -2037,53 +2037,53 @@ function Mn() {
2037
2037
  }(Fe)), Fe.exports;
2038
2038
  }
2039
2039
  Mn();
2040
- function Le(t) {
2040
+ function Me(t) {
2041
2041
  "@babel/helpers - typeof";
2042
- return Le = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
2043
- return typeof y;
2044
- } : function(y) {
2045
- return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
2046
- }, Le(t);
2042
+ return Me = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(m) {
2043
+ return typeof m;
2044
+ } : function(m) {
2045
+ return m && typeof Symbol == "function" && m.constructor === Symbol && m !== Symbol.prototype ? "symbol" : typeof m;
2046
+ }, Me(t);
2047
2047
  }
2048
- function Dn(t, y) {
2049
- if (Le(t) != "object" || !t) return t;
2050
- var i = t[Symbol.toPrimitive];
2051
- if (i !== void 0) {
2052
- var l = i.call(t, y);
2053
- if (Le(l) != "object") return l;
2048
+ function Dn(t, m) {
2049
+ if (Me(t) != "object" || !t) return t;
2050
+ var c = t[Symbol.toPrimitive];
2051
+ if (c !== void 0) {
2052
+ var l = c.call(t, m);
2053
+ if (Me(l) != "object") return l;
2054
2054
  throw new TypeError("@@toPrimitive must return a primitive value.");
2055
2055
  }
2056
- return (y === "string" ? String : Number)(t);
2056
+ return (m === "string" ? String : Number)(t);
2057
2057
  }
2058
2058
  function In(t) {
2059
- var y = Dn(t, "string");
2060
- return Le(y) == "symbol" ? y : y + "";
2059
+ var m = Dn(t, "string");
2060
+ return Me(m) == "symbol" ? m : m + "";
2061
2061
  }
2062
- function Pn(t, y, i) {
2063
- return (y = In(y)) in t ? Object.defineProperty(t, y, {
2064
- value: i,
2062
+ function Pn(t, m, c) {
2063
+ return (m = In(m)) in t ? Object.defineProperty(t, m, {
2064
+ value: c,
2065
2065
  enumerable: !0,
2066
2066
  configurable: !0,
2067
2067
  writable: !0
2068
- }) : t[y] = i, t;
2068
+ }) : t[m] = c, t;
2069
2069
  }
2070
- function bt(t, y) {
2071
- var i = Object.keys(t);
2070
+ function bt(t, m) {
2071
+ var c = Object.keys(t);
2072
2072
  if (Object.getOwnPropertySymbols) {
2073
2073
  var l = Object.getOwnPropertySymbols(t);
2074
- y && (l = l.filter(function(h) {
2074
+ m && (l = l.filter(function(h) {
2075
2075
  return Object.getOwnPropertyDescriptor(t, h).enumerable;
2076
- })), i.push.apply(i, l);
2076
+ })), c.push.apply(c, l);
2077
2077
  }
2078
- return i;
2078
+ return c;
2079
2079
  }
2080
2080
  function xt(t) {
2081
- for (var y = 1; y < arguments.length; y++) {
2082
- var i = arguments[y] != null ? arguments[y] : {};
2083
- y % 2 ? bt(Object(i), !0).forEach(function(l) {
2084
- Pn(t, l, i[l]);
2085
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : bt(Object(i)).forEach(function(l) {
2086
- Object.defineProperty(t, l, Object.getOwnPropertyDescriptor(i, l));
2081
+ for (var m = 1; m < arguments.length; m++) {
2082
+ var c = arguments[m] != null ? arguments[m] : {};
2083
+ m % 2 ? bt(Object(c), !0).forEach(function(l) {
2084
+ Pn(t, l, c[l]);
2085
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(c)) : bt(Object(c)).forEach(function(l) {
2086
+ Object.defineProperty(t, l, Object.getOwnPropertyDescriptor(c, l));
2087
2087
  });
2088
2088
  }
2089
2089
  return t;
@@ -2141,27 +2141,27 @@ const Hn = {
2141
2141
  };
2142
2142
  Et.lang.ok = "确定";
2143
2143
  Re.locale("zh-cn");
2144
- const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2145
- const i = t.dataset.key, l = t.dataset.value, h = t.dataset.placeholder, q = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, D = t.dataset.disableFuture === "true", [I, S] = ae(() => {
2144
+ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: m }) => {
2145
+ const c = t.dataset.key, l = t.dataset.value, h = t.dataset.placeholder, q = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, D = t.dataset.disableFuture === "true", [I, S] = ae(() => {
2146
2146
  if (!l) return null;
2147
2147
  const r = l.split(",");
2148
2148
  return r.length === 2 && r[0] && r[1] ? [Re(r[0]), Re(r[1])] : null;
2149
- }), [w, N] = ae(null);
2149
+ }), [$, N] = ae(null);
2150
2150
  return at(
2151
2151
  /* @__PURE__ */ M("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__ */ M(
2152
2152
  On,
2153
2153
  {
2154
2154
  value: I,
2155
- disabledDate: (r) => r ? D && r.isAfter(Re(), "day") ? !0 : !q || !w || !w[0] ? !1 : Math.abs(r.diff(w[0], "days")) > q : !1,
2155
+ disabledDate: (r) => r ? D && r.isAfter(Re(), "day") ? !0 : !q || !$ || !$[0] ? !1 : Math.abs(r.diff($[0], "days")) > q : !1,
2156
2156
  onCalendarChange: (r) => {
2157
2157
  console.log("[DatePicker] onCalendarChange", r?.map((a) => a?.format("YYYY-MM-DD") || null)), N(r);
2158
2158
  },
2159
2159
  onChange: (r) => {
2160
2160
  if (console.log("[DatePicker] onChange", r?.map((a) => a?.format("YYYY-MM-DD") || null)), S(r), N(null), r && r[0] && r[1]) {
2161
2161
  const a = `${r[0].format("YYYY-MM-DD")},${r[1].format("YYYY-MM-DD")}`;
2162
- t.setAttribute("data-value", a), y(i, a);
2162
+ t.setAttribute("data-value", a), m(c, a);
2163
2163
  } else
2164
- t.setAttribute("data-value", ""), y(i, "");
2164
+ t.setAttribute("data-value", ""), m(c, "");
2165
2165
  },
2166
2166
  onOpenChange: (r) => {
2167
2167
  console.log("[DatePicker] onOpenChange", r), N(r ? I : null);
@@ -2178,15 +2178,15 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2178
2178
  t
2179
2179
  );
2180
2180
  }, Rn = (t) => {
2181
- const [y, i] = ae([]);
2181
+ const [m, c] = ae([]);
2182
2182
  return de(() => {
2183
2183
  const l = t.current;
2184
2184
  if (!l) return;
2185
2185
  const h = () => {
2186
2186
  const D = l.querySelectorAll(".rte-datepicker-host"), I = [];
2187
2187
  D.forEach((S) => {
2188
- const w = S.getAttribute("data-key");
2189
- w && I.push(
2188
+ const $ = S.getAttribute("data-key");
2189
+ $ && I.push(
2190
2190
  /* @__PURE__ */ M(
2191
2191
  Gn,
2192
2192
  {
@@ -2198,28 +2198,28 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2198
2198
  }
2199
2199
  }
2200
2200
  },
2201
- `datepicker-${w}`
2201
+ `datepicker-${$}`
2202
2202
  )
2203
2203
  );
2204
- }), i(I);
2204
+ }), c(I);
2205
2205
  };
2206
2206
  h();
2207
2207
  const q = new MutationObserver((D) => {
2208
2208
  let I = !1;
2209
2209
  for (const S of D)
2210
2210
  if (S.type === "childList") {
2211
- let w = !1;
2211
+ let $ = !1;
2212
2212
  if (S.addedNodes.forEach((N) => {
2213
2213
  if (N.nodeType === Node.ELEMENT_NODE) {
2214
- const b = N;
2215
- (b.classList?.contains("rte-datepicker-host") || b.querySelector?.(".rte-datepicker-host")) && (w = !0);
2214
+ const x = N;
2215
+ (x.classList?.contains("rte-datepicker-host") || x.querySelector?.(".rte-datepicker-host")) && ($ = !0);
2216
2216
  }
2217
2217
  }), S.removedNodes.forEach((N) => {
2218
2218
  if (N.nodeType === Node.ELEMENT_NODE) {
2219
- const b = N;
2220
- (b.classList?.contains("rte-datepicker-host") || b.querySelector?.(".rte-datepicker-host")) && (w = !0);
2219
+ const x = N;
2220
+ (x.classList?.contains("rte-datepicker-host") || x.querySelector?.(".rte-datepicker-host")) && ($ = !0);
2221
2221
  }
2222
- }), w) {
2222
+ }), $) {
2223
2223
  I = !0;
2224
2224
  break;
2225
2225
  }
@@ -2227,30 +2227,30 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2227
2227
  I && h();
2228
2228
  });
2229
2229
  return q.observe(l, { childList: !0, subtree: !0 }), () => q.disconnect();
2230
- }, [t]), y;
2230
+ }, [t]), m;
2231
2231
  }, Fn = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), zn = ({
2232
2232
  config: t,
2233
- onSend: y,
2234
- isProcessing: i = !1,
2233
+ onSend: m,
2234
+ isProcessing: c = !1,
2235
2235
  disabled: l = !1,
2236
2236
  width: h,
2237
2237
  lockStructure: q = !1,
2238
2238
  agentOptions: D = [],
2239
2239
  onAgentSelect: I,
2240
2240
  onAgentExit: S,
2241
- loading: w = !1,
2241
+ loading: $ = !1,
2242
2242
  placeholder: N,
2243
- border: b,
2243
+ border: x,
2244
2244
  background: P = "transparent",
2245
2245
  hideButtons: C,
2246
2246
  maxHeight: e,
2247
2247
  minHeight: r,
2248
2248
  collapsed: a = !1,
2249
2249
  reportAnalyze: p,
2250
- onCollapsedChange: f,
2251
- collapseTransitionMs: _ = 260
2250
+ onCollapsedChange: y,
2251
+ collapseTransitionMs: A = 260
2252
2252
  }) => {
2253
- const [T, z] = Wt.useMessage(), Y = re(null), j = re(null), F = re(null), n = re(null), V = re(null), [x, B] = ae({}), [X, u] = ae(null), [d, g] = ae(null), [k, L] = ae(null), W = re(!1), U = re(null), [Q, oe] = ae(!1), ue = re(null), [me, pe] = ae(!0), we = re(0), [ee, ye] = ae(58), [ge, he] = ae(58), [ke, $e] = ae(!1), [Ee, Me] = ae({}), Ye = re(() => {
2253
+ const [T, z] = Wt.useMessage(), Y = re(null), j = re(null), F = re(null), n = re(null), V = re(null), [w, B] = ae({}), [X, u] = ae(null), [d, v] = ae(null), [E, L] = ae(null), W = re(!1), U = re(null), [Z, oe] = ae(!1), ue = re(null), [ye, pe] = ae(!0), we = re(0), [ee, me] = ae(58), [ge, he] = ae(58), [ke, $e] = ae(!1), [Ee, Le] = ae({}), Ye = re(() => {
2254
2254
  }), [Ce, Te] = ae(() => {
2255
2255
  const o = {};
2256
2256
  return t.forEach((s) => {
@@ -2258,48 +2258,48 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2258
2258
  }), o;
2259
2259
  }), je = re({}), ot = re({}), st = re({});
2260
2260
  de(() => {
2261
- ot.current = x;
2262
- }, [x]), de(() => {
2261
+ ot.current = w;
2262
+ }, [w]), de(() => {
2263
2263
  st.current = Ce;
2264
2264
  }, [Ce]);
2265
- const We = se((o) => o.find((c) => c.type === "tag")?.text || null, []), lt = re(t), Ne = re(null);
2265
+ const We = se((o) => o.find((i) => i.type === "tag")?.text || null, []), lt = re(t), Ne = re(null);
2266
2266
  de(() => {
2267
2267
  const o = We(lt.current), s = We(t);
2268
2268
  if (o && o !== s && n.current) {
2269
- const c = {};
2270
- n.current.querySelectorAll('[data-type="variable"]').forEach((v) => {
2271
- const G = v.dataset.key;
2269
+ const i = {};
2270
+ n.current.querySelectorAll('[data-type="variable"]').forEach((g) => {
2271
+ const G = g.dataset.key;
2272
2272
  if (G) {
2273
- const A = v.innerText.replace(/[\u200B\n]/g, "").trim();
2274
- A && (c[G] = A);
2273
+ const _ = g.innerText.replace(/[\u200B\n]/g, "").trim();
2274
+ _ && (i[G] = _);
2275
2275
  }
2276
- }), n.current.querySelectorAll('[data-type="select"]').forEach((v) => {
2277
- const G = v.dataset.key;
2276
+ }), n.current.querySelectorAll('[data-type="select"]').forEach((g) => {
2277
+ const G = g.dataset.key;
2278
2278
  if (G) {
2279
- const A = (v.getAttribute("data-value") || "").trim();
2280
- A && (c[G] = A);
2279
+ const _ = (g.getAttribute("data-value") || "").trim();
2280
+ _ && (i[G] = _);
2281
2281
  }
2282
- }), n.current.querySelectorAll('[data-type="textarea"]').forEach((v) => {
2283
- const G = v.dataset.key;
2282
+ }), n.current.querySelectorAll('[data-type="textarea"]').forEach((g) => {
2283
+ const G = g.dataset.key;
2284
2284
  if (G) {
2285
- const A = v.value.replace(/[\u200B]/g, "").trim();
2286
- A && (c[G] = A);
2285
+ const _ = g.value.replace(/[\u200B]/g, "").trim();
2286
+ _ && (i[G] = _);
2287
2287
  }
2288
2288
  }), je.current[o] = {
2289
- variableValues: c,
2289
+ variableValues: i,
2290
2290
  files: { ...ot.current },
2291
2291
  multiVariableCounts: { ...st.current }
2292
2292
  };
2293
2293
  }
2294
2294
  if (s && je.current[s]) {
2295
- const c = je.current[s];
2296
- Ne.current = c, B(c.files), Te(c.multiVariableCounts);
2295
+ const i = je.current[s];
2296
+ Ne.current = i, B(i.files), Te(i.multiVariableCounts);
2297
2297
  } else if (s) {
2298
2298
  Ne.current = null;
2299
- const c = {};
2300
- t.forEach(($) => {
2301
- $.type === "multi-variable" && $.key && (c[$.key] = 1);
2302
- }), Te(c), B({});
2299
+ const i = {};
2300
+ t.forEach((b) => {
2301
+ b.type === "multi-variable" && b.key && (i[b.key] = 1);
2302
+ }), Te(i), B({});
2303
2303
  } else
2304
2304
  Ne.current = null, Te({}), B({});
2305
2305
  lt.current = t;
@@ -2313,26 +2313,27 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2313
2313
  const o = [];
2314
2314
  for (const s of t) {
2315
2315
  if (o.push(s), s.type !== "report-url" || !s.key) continue;
2316
- const c = Ee[s.key], $ = c?.status ?? "idle", m = c?.modules ?? [];
2317
- $ === "loading" && o.push({
2316
+ const i = Ee[s.key], b = i?.status ?? "idle", f = i?.modules ?? [];
2317
+ b === "loading" && o.push({
2318
2318
  type: "text",
2319
2319
  className: "rte-report-parsing",
2320
2320
  text: `解析中...
2321
2321
  `
2322
- }), $ === "error" && c?.error && o.push({
2322
+ }), b === "error" && i?.error && o.push({
2323
2323
  type: "text",
2324
2324
  className: "rte-report-error",
2325
- text: `解析失败:${Fn(c.error)}
2325
+ text: `解析失败:${Fn(i.error)}
2326
2326
  `
2327
- }), m.length > 0 && (m.forEach((E, v) => {
2327
+ }), f.length > 0 && (f.forEach((k) => {
2328
2328
  o.push({
2329
2329
  type: "report-module",
2330
- key: `${s.key}__module_${v}`,
2330
+ key: s.key,
2331
+ // 所有模块使用同一个 key(数据收集时会合并为数组)
2331
2332
  placeholder: "可编辑,内容不能为空",
2332
2333
  required: !0,
2333
2334
  minHeight: 80,
2334
2335
  maxHeight: 260,
2335
- text: E.content
2336
+ text: k.content
2336
2337
  });
2337
2338
  }), o.push({ type: "text", text: `
2338
2339
  ` }));
@@ -2341,106 +2342,106 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2341
2342
  }, [t, Ee]), it = se((o) => {
2342
2343
  const s = o.trim();
2343
2344
  if (!s) return { url: "" };
2344
- let c = null;
2345
+ let i = null;
2345
2346
  try {
2346
- c = new URL(s);
2347
+ i = new URL(s);
2347
2348
  } catch {
2348
2349
  try {
2349
- c = new URL(`https://${s}`);
2350
+ i = new URL(`https://${s}`);
2350
2351
  } catch {
2351
2352
  return { url: s };
2352
2353
  }
2353
2354
  }
2354
- const $ = c.pathname.split("/").filter(Boolean), m = $.findIndex((A) => A === "report"), E = m >= 0 ? $[m + 1] : void 0, v = $[0] && $[0].length <= 5 ? $[0] : void 0, G = c.searchParams.get("agentId") || void 0;
2355
- return { url: s, reportId: E, agentId: G, lang: v };
2355
+ const b = i.pathname.split("/").filter(Boolean), f = b.findIndex((_) => _ === "report"), k = f >= 0 ? b[f + 1] : void 0, g = b[0] && b[0].length <= 5 ? b[0] : void 0, G = i.searchParams.get("agentId") || void 0;
2356
+ return { url: s, reportId: k, agentId: G, lang: g };
2356
2357
  }, []), ct = se(() => {
2357
2358
  const o = {};
2358
2359
  if (!n.current) return o;
2359
2360
  const s = n.current;
2360
- return s.querySelectorAll('[data-type="variable"]').forEach((c) => {
2361
- const $ = c.dataset.key;
2362
- if (!$) return;
2363
- const m = c.innerText.replace(/[\u200B\n]/g, "").trim();
2364
- m && (o[$] = m);
2365
- }), s.querySelectorAll('[data-type="select"]').forEach((c) => {
2366
- const $ = c.dataset.key;
2367
- if (!$) return;
2368
- const m = (c.getAttribute("data-value") || "").trim();
2369
- m && (o[$] = m);
2370
- }), s.querySelectorAll('[data-type="textarea"]').forEach((c) => {
2371
- const $ = c.dataset.key;
2372
- if (!$) return;
2373
- const m = c.value.replace(/[\u200B]/g, "").trim();
2374
- m && (o[$] = m);
2375
- }), s.querySelectorAll('[data-type="richtext"]').forEach((c) => {
2376
- const $ = c.dataset.key;
2377
- if (!$) return;
2378
- const m = (c.textContent || "").replace(/[\u200B]/g, "").trim();
2379
- m && (o[$] = m);
2380
- }), s.querySelectorAll('[data-type="datepicker"]').forEach((c) => {
2381
- const $ = c.dataset.key;
2382
- if (!$) return;
2383
- const m = (c.getAttribute("data-value") || "").trim();
2384
- m && (o[$] = m);
2361
+ return s.querySelectorAll('[data-type="variable"]').forEach((i) => {
2362
+ const b = i.dataset.key;
2363
+ if (!b) return;
2364
+ const f = i.innerText.replace(/[\u200B\n]/g, "").trim();
2365
+ f && (o[b] = f);
2366
+ }), s.querySelectorAll('[data-type="select"]').forEach((i) => {
2367
+ const b = i.dataset.key;
2368
+ if (!b) return;
2369
+ const f = (i.getAttribute("data-value") || "").trim();
2370
+ f && (o[b] = f);
2371
+ }), s.querySelectorAll('[data-type="textarea"]').forEach((i) => {
2372
+ const b = i.dataset.key;
2373
+ if (!b) return;
2374
+ const f = i.value.replace(/[\u200B]/g, "").trim();
2375
+ f && (o[b] = f);
2376
+ }), s.querySelectorAll('[data-type="richtext"]').forEach((i) => {
2377
+ const b = i.dataset.key;
2378
+ if (!b) return;
2379
+ const f = (i.textContent || "").replace(/[\u200B]/g, "").trim();
2380
+ f && (o[b] = f);
2381
+ }), s.querySelectorAll('[data-type="datepicker"]').forEach((i) => {
2382
+ const b = i.dataset.key;
2383
+ if (!b) return;
2384
+ const f = (i.getAttribute("data-value") || "").trim();
2385
+ f && (o[b] = f);
2385
2386
  }), o;
2386
- }, []), ut = se((o) => (o?.modules || []).map((s, c) => {
2387
- const $ = (s?.title || `模块${c + 1}`).trim() || `模块${c + 1}`, m = (s?.content || "").trim();
2387
+ }, []), ut = se((o) => (o?.modules || []).map((s, i) => {
2388
+ const b = (s?.title || `模块${i + 1}`).trim() || `模块${i + 1}`, f = (s?.content || "").trim();
2388
2389
  return {
2389
- title: $,
2390
- content: m.length > 0 ? m : `请补充:${$}`
2390
+ title: b,
2391
+ content: f.length > 0 ? f : `请补充:${b}`
2391
2392
  };
2392
2393
  }), []), dt = se(
2393
2394
  (o, s) => {
2394
- const c = (s || "").trim();
2395
+ const i = (s || "").trim();
2395
2396
  if (!o) return;
2396
- if (!c) {
2397
- Me((v) => ({
2398
- ...v,
2397
+ if (!i) {
2398
+ Le((g) => ({
2399
+ ...g,
2399
2400
  [o]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
2400
2401
  }));
2401
2402
  return;
2402
2403
  }
2403
- const $ = Ee[o];
2404
- if ($?.lastParsedUrl && $.lastParsedUrl === c && $.status === "loading")
2404
+ const b = Ee[o];
2405
+ if (b?.lastParsedUrl && b.lastParsedUrl === i && b.status === "loading")
2405
2406
  return;
2406
- Me((v) => ({
2407
- ...v,
2408
- [o]: { ...v[o], status: "loading", error: void 0, lastParsedUrl: c }
2407
+ Le((g) => ({
2408
+ ...g,
2409
+ [o]: { ...g[o], status: "loading", error: void 0, lastParsedUrl: i }
2409
2410
  }));
2410
- const m = it(c);
2411
- (p || (async (v) => ({
2411
+ const f = it(i);
2412
+ (p || (async (g) => ({
2412
2413
  modules: [
2413
2414
  {
2414
2415
  title: "第1张:人群+场景直击图",
2415
2416
  content: `视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
2416
- (reportId=${v.reportId || "unknown"}, agentId=${v.agentId || "1"})`
2417
+ (reportId=${g.reportId || "unknown"}, agentId=${g.agentId || "1"})`
2417
2418
  },
2418
2419
  {
2419
2420
  title: "第2张:痛点放大对比图",
2420
2421
  content: "左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"
2421
2422
  }
2422
2423
  ]
2423
- })))(m).then((v) => {
2424
- const G = ut(v);
2424
+ })))(f).then((g) => {
2425
+ const G = ut(g);
2425
2426
  if (n.current) {
2426
- const A = ct();
2427
+ const _ = ct();
2427
2428
  G.forEach((R, J) => {
2428
- A[`${o}__module_${J}`] = R.content;
2429
- }), n.current.__tempVariableValues = A;
2429
+ _[`${o}_${J}`] = R.content;
2430
+ }), n.current.__tempVariableValues = _;
2430
2431
  }
2431
- Me((A) => ({
2432
- ...A,
2433
- [o]: { status: "success", error: void 0, lastParsedUrl: c, modules: G }
2432
+ Le((_) => ({
2433
+ ..._,
2434
+ [o]: { status: "success", error: void 0, lastParsedUrl: i, modules: G }
2434
2435
  }));
2435
- }).catch((v) => {
2436
- const G = v instanceof Error ? v.message : String(v);
2437
- Me((A) => ({
2438
- ...A,
2436
+ }).catch((g) => {
2437
+ const G = g instanceof Error ? g.message : String(g);
2438
+ Le((_) => ({
2439
+ ..._,
2439
2440
  [o]: {
2440
- ...A[o] || { modules: [] },
2441
+ ..._[o] || { modules: [] },
2441
2442
  status: "error",
2442
2443
  error: G || "解析失败",
2443
- lastParsedUrl: c,
2444
+ lastParsedUrl: i,
2444
2445
  modules: []
2445
2446
  }
2446
2447
  }));
@@ -2454,41 +2455,41 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2454
2455
  if (!n.current) return;
2455
2456
  const o = /* @__PURE__ */ new Map(), s = window.setTimeout(() => {
2456
2457
  if (!n.current) return;
2457
- o.forEach((m, E) => E.removeEventListener("blur", m, !1)), o.clear();
2458
- const c = n.current.querySelectorAll(
2458
+ o.forEach((f, k) => k.removeEventListener("blur", f, !1)), o.clear();
2459
+ const i = n.current.querySelectorAll(
2459
2460
  '[data-type="variable"][data-node-type="report-url"]'
2460
- ), $ = (m) => {
2461
- m.stopPropagation(), m.stopImmediatePropagation();
2462
- const E = m.target?.closest(
2461
+ ), b = (f) => {
2462
+ f.stopPropagation(), f.stopImmediatePropagation();
2463
+ const k = f.target?.closest(
2463
2464
  '[data-type="variable"][data-node-type="report-url"]'
2464
2465
  );
2465
- if (!E || !n.current || !n.current.contains(E)) return;
2466
- const v = E.dataset.key;
2467
- if (!v) return;
2468
- const G = E.innerText.replace(/[\u200B\n]/g, "").trim();
2469
- Ye.current(v, G);
2466
+ if (!k || !n.current || !n.current.contains(k)) return;
2467
+ const g = k.dataset.key;
2468
+ if (!g) return;
2469
+ const G = k.innerText.replace(/[\u200B\n]/g, "").trim();
2470
+ Ye.current(g, G);
2470
2471
  };
2471
- c.forEach((m) => {
2472
- m.addEventListener("blur", $, !1), o.set(m, $);
2472
+ i.forEach((f) => {
2473
+ f.addEventListener("blur", b, !1), o.set(f, b);
2473
2474
  });
2474
2475
  }, 0);
2475
2476
  return () => {
2476
- window.clearTimeout(s), o.forEach((c, $) => $.removeEventListener("blur", c, !1)), o.clear();
2477
+ window.clearTimeout(s), o.forEach((i, b) => b.removeEventListener("blur", i, !1)), o.clear();
2477
2478
  };
2478
- }, [ve]), kn(n, ve, x, q, Ce, ue, void 0, C), $n(n, ve, x, L), En(n, ve, L, C), Sn(n, ve, x, L), Cn(n, ve, L), Tn(n, ve, x, oe), qn(n, W);
2479
+ }, [ve]), kn(n, ve, w, q, Ce, ue, void 0, C), $n(n, ve, w, L), En(n, ve, L, C), Sn(n, ve, w, L), Cn(n, ve, L), Tn(n, ve, w, oe), qn(n, W);
2479
2480
  const Ue = xn(n);
2480
2481
  de(() => {
2481
2482
  if (!n.current) return;
2482
2483
  n.current.querySelectorAll(".rte-richtext-toggle").forEach((s) => {
2483
- const c = s.getAttribute("data-expanded") === "true";
2484
- s.innerHTML = c ? '<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>';
2484
+ const i = s.getAttribute("data-expanded") === "true";
2485
+ s.innerHTML = i ? '<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>';
2485
2486
  });
2486
2487
  }, [ve, n]);
2487
2488
  const Ke = Rn(n), Xe = se(() => {
2488
2489
  const o = F.current;
2489
2490
  if (!o) return;
2490
2491
  const s = Math.max(0, Math.ceil(o.scrollHeight || 0));
2491
- !Number.isFinite(s) || s <= 0 || he((c) => c === s ? c : s);
2492
+ !Number.isFinite(s) || s <= 0 || he((i) => i === s ? i : s);
2492
2493
  }, []);
2493
2494
  Ve(() => {
2494
2495
  if (!a) return;
@@ -2496,26 +2497,26 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2496
2497
  if (!(!o || !s)) {
2497
2498
  o.scrollTop = 0, o.scrollLeft = 0;
2498
2499
  try {
2499
- const c = s.getBoundingClientRect(), $ = document.createRange();
2500
- $.selectNodeContents(s);
2501
- const m = Array.from($.getClientRects());
2502
- let E = 58;
2503
- if (m.length > 0) {
2504
- const v = Math.min(...m.map((R) => R.top)), G = 2;
2505
- let A = 0;
2506
- for (const R of m)
2507
- Math.abs(R.top - v) <= G && (A = Math.max(A, R.bottom));
2508
- A > 0 && (E = Math.max(0, Math.ceil(A - c.top)));
2500
+ const i = s.getBoundingClientRect(), b = document.createRange();
2501
+ b.selectNodeContents(s);
2502
+ const f = Array.from(b.getClientRects());
2503
+ let k = 58;
2504
+ if (f.length > 0) {
2505
+ const g = Math.min(...f.map((R) => R.top)), G = 2;
2506
+ let _ = 0;
2507
+ for (const R of f)
2508
+ Math.abs(R.top - g) <= G && (_ = Math.max(_, R.bottom));
2509
+ _ > 0 && (k = Math.max(0, Math.ceil(_ - i.top)));
2509
2510
  } else {
2510
- const v = window.getComputedStyle(s), G = Number.parseFloat(v.minHeight) || 0, A = Number.parseFloat(v.paddingTop) || 0, R = Number.parseFloat(v.lineHeight) || 34;
2511
- E = Math.max(0, Math.ceil(Math.max(G, A + R)));
2511
+ const g = window.getComputedStyle(s), G = Number.parseFloat(g.minHeight) || 0, _ = Number.parseFloat(g.paddingTop) || 0, R = Number.parseFloat(g.lineHeight) || 34;
2512
+ k = Math.max(0, Math.ceil(Math.max(G, _ + R)));
2512
2513
  }
2513
- if (!Number.isFinite(E) || E <= 0) return;
2514
- ye((v) => v === E ? v : E);
2514
+ if (!Number.isFinite(k) || k <= 0) return;
2515
+ me((g) => g === k ? g : k);
2515
2516
  } catch {
2516
2517
  }
2517
2518
  }
2518
- }, [a, ve, x, Ce, Ue.length, Ke.length]), de(() => {
2519
+ }, [a, ve, w, Ce, Ue.length, Ke.length]), de(() => {
2519
2520
  if (a) return;
2520
2521
  let o = 0;
2521
2522
  return o = window.requestAnimationFrame(() => {
@@ -2524,13 +2525,13 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2524
2525
  }, [
2525
2526
  a,
2526
2527
  ve,
2527
- x,
2528
+ w,
2528
2529
  Ce,
2529
2530
  Ue.length,
2530
2531
  Ke.length,
2531
2532
  Xe
2532
2533
  ]), de(() => {
2533
- const o = typeof _ == "number" && Number.isFinite(_) && _ >= 0 ? _ : 260;
2534
+ const o = typeof A == "number" && Number.isFinite(A) && A >= 0 ? A : 260;
2534
2535
  if (o <= 0) {
2535
2536
  $e(!1);
2536
2537
  return;
@@ -2538,7 +2539,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2538
2539
  $e(!0);
2539
2540
  const s = window.setTimeout(() => $e(!1), o);
2540
2541
  return () => window.clearTimeout(s);
2541
- }, [a, _]), de(() => {
2542
+ }, [a, A]), de(() => {
2542
2543
  if (t.length > 0) {
2543
2544
  pe(!1);
2544
2545
  return;
@@ -2548,15 +2549,15 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2548
2549
  pe(!0);
2549
2550
  return;
2550
2551
  }
2551
- const c = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", $ = n.current.querySelectorAll('[data-type="variable"]'), m = n.current.querySelectorAll('[data-type="upload"]');
2552
- let E = !1;
2553
- $.forEach((G) => {
2554
- (G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (E = !0);
2555
- }), m.forEach((G) => {
2556
- G.querySelector(".upload-inner-wrapper.has-file") && (E = !0);
2552
+ const i = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", b = n.current.querySelectorAll('[data-type="variable"]'), f = n.current.querySelectorAll('[data-type="upload"]');
2553
+ let k = !1;
2554
+ b.forEach((G) => {
2555
+ (G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (k = !0);
2556
+ }), f.forEach((G) => {
2557
+ G.querySelector(".upload-inner-wrapper.has-file") && (k = !0);
2557
2558
  });
2558
- const v = !c && !E;
2559
- pe(v), t.length === 0 && oe(!v);
2559
+ const g = !i && !k;
2560
+ pe(g), t.length === 0 && oe(!g);
2560
2561
  };
2561
2562
  o();
2562
2563
  const s = new MutationObserver(o);
@@ -2574,49 +2575,49 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2574
2575
  return;
2575
2576
  }
2576
2577
  o.preventDefault();
2577
- const s = o.clipboardData.getData("text/plain"), c = window.getSelection();
2578
- if (c && c.rangeCount > 0) {
2579
- const $ = c.anchorNode;
2580
- if ($) {
2581
- let m = null;
2582
- if ($.nodeType === Node.ELEMENT_NODE ? m = $.closest('[data-type="variable"]') : $.nodeType === Node.TEXT_NODE && $.parentElement && (m = $.parentElement.closest('[data-type="variable"]')), m) {
2583
- const E = m.dataset.multiKey;
2584
- if (E) {
2585
- const v = /[、,,\s\n\r\t]+/, G = s.split(v).map((A) => A.trim()).filter((A) => A.length > 0);
2578
+ const s = o.clipboardData.getData("text/plain"), i = window.getSelection();
2579
+ if (i && i.rangeCount > 0) {
2580
+ const b = i.anchorNode;
2581
+ if (b) {
2582
+ let f = null;
2583
+ if (b.nodeType === Node.ELEMENT_NODE ? f = b.closest('[data-type="variable"]') : b.nodeType === Node.TEXT_NODE && b.parentElement && (f = b.parentElement.closest('[data-type="variable"]')), f) {
2584
+ const k = f.dataset.multiKey;
2585
+ if (k) {
2586
+ const g = /[、,,\s\n\r\t]+/, G = s.split(g).map((_) => _.trim()).filter((_) => _.length > 0);
2586
2587
  if (console.log("[Paste Event] 粘贴的内容:", s), console.log("[Paste Event] 拆分后的值:", G), G.length > 1) {
2587
- const A = parseInt(m.dataset.index || "0", 10), R = t.find((le) => le.type === "multi-variable" && le.key === E)?.maxCount || 9, J = Ce[E] || 1, O = Math.min(A + G.length, R);
2588
- O > J && Te((ne) => ({
2588
+ const _ = parseInt(f.dataset.index || "0", 10), R = t.find((le) => le.type === "multi-variable" && le.key === k)?.maxCount || 9, J = Ce[k] || 1, H = Math.min(_ + G.length, R);
2589
+ H > J && Te((ne) => ({
2589
2590
  ...ne,
2590
- [E]: O
2591
+ [k]: H
2591
2592
  }));
2592
2593
  const K = [];
2593
2594
  for (let ne = 0; ne < J; ne++) {
2594
- const le = `${E}_${ne}`, fe = n.current.querySelector(
2595
- `[data-type="variable"][data-key="${le}"][data-multi-key="${E}"]`
2595
+ const le = `${k}_${ne}`, fe = n.current.querySelector(
2596
+ `[data-type="variable"][data-key="${le}"][data-multi-key="${k}"]`
2596
2597
  );
2597
2598
  if (fe) {
2598
2599
  const be = fe.innerText.replace(/[\u200B\n]/g, "").trim();
2599
2600
  K.push(be);
2600
2601
  }
2601
2602
  }
2602
- K.splice(A, 1, ...G.slice(0, R - A));
2603
- const te = K.slice(0, R);
2604
- te.length > 0 && te[te.length - 1] !== "" && te.length < R && te.push("");
2605
- const H = Math.max(te.length, 1), Z = {};
2606
- te.forEach((ne, le) => {
2607
- ne && (Z[`${E}_${le}`] = ne);
2603
+ K.splice(_, 1, ...G.slice(0, R - _));
2604
+ const Q = K.slice(0, R);
2605
+ Q.length > 0 && Q[Q.length - 1] !== "" && Q.length < R && Q.push("");
2606
+ const O = Math.max(Q.length, 1), te = {};
2607
+ Q.forEach((ne, le) => {
2608
+ ne && (te[`${k}_${le}`] = ne);
2608
2609
  }), n.current.querySelectorAll(
2609
2610
  '[data-type="variable"]'
2610
2611
  ).forEach((ne) => {
2611
2612
  const le = ne.dataset.key, fe = ne.dataset.multiKey;
2612
- if (le && fe !== E) {
2613
+ if (le && fe !== k) {
2613
2614
  const be = ne.innerText.replace(/[\u200B\n]/g, "").trim();
2614
- be && (Z[le] = be);
2615
+ be && (te[le] = be);
2615
2616
  }
2616
- }), n.current.__tempVariableValues = Z, Te((ne) => ({
2617
+ }), n.current.__tempVariableValues = te, Te((ne) => ({
2617
2618
  ...ne,
2618
- [E]: H
2619
- })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", te);
2619
+ [k]: O
2620
+ })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", Q);
2620
2621
  return;
2621
2622
  } else G.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2622
2623
  }
@@ -2624,18 +2625,18 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2624
2625
  }
2625
2626
  }
2626
2627
  document.execCommand("insertText", !1, s), ft(), setTimeout(() => {
2627
- const $ = window.getSelection();
2628
- if ($ && $.rangeCount > 0) {
2629
- const m = $.anchorNode;
2630
- if (m) {
2631
- let E = null;
2632
- if (m.nodeType === Node.ELEMENT_NODE ? E = m.closest('[data-type="variable"]') : m.nodeType === Node.TEXT_NODE && m.parentElement && (E = m.parentElement.closest('[data-type="variable"]')), E) {
2633
- if ((E.getAttribute("data-node-type") || "") === "report-url") {
2634
- const G = E.dataset.key, A = E.innerText.replace(/[\u200B\n]/g, "").trim();
2635
- G && Ye.current(G, A);
2628
+ const b = window.getSelection();
2629
+ if (b && b.rangeCount > 0) {
2630
+ const f = b.anchorNode;
2631
+ if (f) {
2632
+ let k = null;
2633
+ if (f.nodeType === Node.ELEMENT_NODE ? k = f.closest('[data-type="variable"]') : f.nodeType === Node.TEXT_NODE && f.parentElement && (k = f.parentElement.closest('[data-type="variable"]')), k) {
2634
+ if ((k.getAttribute("data-node-type") || "") === "report-url") {
2635
+ const G = k.dataset.key, _ = k.innerText.replace(/[\u200B\n]/g, "").trim();
2636
+ G && Ye.current(G, _);
2636
2637
  }
2637
- if (E.dataset.multiKey) {
2638
- const G = E.innerText.replace(/[\u200B\n]/g, "").trim();
2638
+ if (k.dataset.multiKey) {
2639
+ const G = k.innerText.replace(/[\u200B\n]/g, "").trim();
2639
2640
  /[、,,\s]+/.test(G) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", G), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
2640
2641
  }
2641
2642
  }
@@ -2644,36 +2645,36 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2644
2645
  }, 0);
2645
2646
  }, Tt = (o) => {
2646
2647
  if (!o.target.files) {
2647
- o.target && (o.target.value = ""), u(null), g(null);
2648
+ o.target && (o.target.value = ""), u(null), v(null);
2648
2649
  return;
2649
2650
  }
2650
- const s = 10 * 1024 * 1024, c = (m) => m.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(m.name || ""), $ = (m) => c(m) && m.size > s;
2651
+ const s = 10 * 1024 * 1024, i = (f) => f.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(f.name || ""), b = (f) => i(f) && f.size > s;
2651
2652
  if (d && o.target.files && o.target.files.length > 0) {
2652
- const m = d, E = t.find((R) => R.type === "upload" && R.key === m), v = Array.from(o.target.files), G = v.filter((R) => !$(R)), A = v.length - G.length;
2653
- if (A > 0 && T.error(`已自动过滤 ${A} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), E && typeof E.maxCount == "number" && typeof E.minCount == "number") {
2654
- const R = E.maxCount;
2653
+ const f = d, k = t.find((R) => R.type === "upload" && R.key === f), g = Array.from(o.target.files), G = g.filter((R) => !b(R)), _ = g.length - G.length;
2654
+ if (_ > 0 && T.error(`已自动过滤 ${_} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), k && typeof k.maxCount == "number" && typeof k.minCount == "number") {
2655
+ const R = k.maxCount;
2655
2656
  let J = 0;
2656
- B((O) => {
2657
- for (let Z = 0; Z < R; Z++) {
2658
- const ce = `${m}-${Z}`;
2659
- O[ce] && (J = Z + 1);
2657
+ B((H) => {
2658
+ for (let te = 0; te < R; te++) {
2659
+ const ce = `${f}-${te}`;
2660
+ H[ce] && (J = te + 1);
2660
2661
  }
2661
- const K = R - J, te = G.slice(0, K), H = { ...O };
2662
- return te.forEach((Z, ce) => {
2663
- const ne = `${m}-${J + ce}`;
2664
- H[ne] = Z;
2665
- }), H;
2662
+ const K = R - J, Q = G.slice(0, K), O = { ...H };
2663
+ return Q.forEach((te, ce) => {
2664
+ const ne = `${f}-${J + ce}`;
2665
+ O[ne] = te;
2666
+ }), O;
2666
2667
  });
2667
2668
  }
2668
2669
  } else if (X && o.target.files[0]) {
2669
- const m = o.target.files[0], E = X;
2670
- $(m) ? T.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : B((v) => ({ ...v, [E]: m }));
2670
+ const f = o.target.files[0], k = X;
2671
+ b(f) ? T.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : B((g) => ({ ...g, [k]: f }));
2671
2672
  }
2672
- o.target && (o.target.value = ""), u(null), g(null);
2673
+ o.target && (o.target.value = ""), u(null), v(null);
2673
2674
  }, pt = (o) => {
2674
2675
  B((s) => {
2675
- const c = { ...s };
2676
- return delete c[o], c;
2676
+ const i = { ...s };
2677
+ return delete i[o], i;
2677
2678
  });
2678
2679
  }, qt = (o) => {
2679
2680
  const s = o.target;
@@ -2686,19 +2687,19 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2686
2687
  return;
2687
2688
  }
2688
2689
  if (q) {
2689
- const m = s.closest(".tag-node"), E = s.closest('[data-type="text"]');
2690
- if (m || E) {
2690
+ const f = s.closest(".tag-node"), k = s.closest('[data-type="text"]');
2691
+ if (f || k) {
2691
2692
  o.preventDefault(), o.stopPropagation();
2692
- const v = window.getSelection();
2693
- v && v.removeAllRanges();
2693
+ const g = window.getSelection();
2694
+ g && g.removeAllRanges();
2694
2695
  return;
2695
2696
  }
2696
2697
  }
2697
2698
  s.closest('[data-type="variable"]') || (U.current = { x: o.clientX, y: o.clientY }, W.current = !1, s.closest(".file-remove-btn") && (o.preventDefault(), o.stopPropagation()));
2698
2699
  }, Nt = (o) => {
2699
2700
  if (!o.target.closest('[data-type="variable"]') && U.current) {
2700
- const $ = Math.abs(o.clientX - U.current.x), m = Math.abs(o.clientY - U.current.y);
2701
- ($ > 3 || m > 3) && (W.current = !0);
2701
+ const b = Math.abs(o.clientX - U.current.x), f = Math.abs(o.clientY - U.current.y);
2702
+ (b > 3 || f > 3) && (W.current = !0);
2702
2703
  }
2703
2704
  }, At = (o) => {
2704
2705
  if (o.target.closest('[data-type="variable"]')) {
@@ -2709,7 +2710,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2709
2710
  }, _t = (o) => {
2710
2711
  if (l)
2711
2712
  return;
2712
- a && f?.(!1);
2713
+ a && y?.(!1);
2713
2714
  const s = o.target;
2714
2715
  if (s.closest('[data-type="datepicker"]'))
2715
2716
  return;
@@ -2719,56 +2720,56 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2719
2720
  }
2720
2721
  if (t.length === 0)
2721
2722
  return;
2722
- const m = (O, K) => {
2723
+ const f = (H, K) => {
2723
2724
  if (!n.current) return;
2724
- Array.from(n.current.children).forEach((H) => {
2725
- if (H !== O)
2725
+ Array.from(n.current.children).forEach((O) => {
2726
+ if (O !== H)
2726
2727
  if (K)
2727
- H.dataset.prevDisplay === void 0 && (H.dataset.prevDisplay = H.style.display || ""), H.dataset.rteForceHidden = "1", H.style.setProperty("display", "none", "important");
2728
+ O.dataset.prevDisplay === void 0 && (O.dataset.prevDisplay = O.style.display || ""), O.dataset.rteForceHidden = "1", O.style.setProperty("display", "none", "important");
2728
2729
  else {
2729
- if (H.dataset.prevDisplay !== void 0) {
2730
- const Z = H.dataset.prevDisplay;
2731
- Z ? H.style.display = Z : H.style.removeProperty("display"), delete H.dataset.prevDisplay;
2730
+ if (O.dataset.prevDisplay !== void 0) {
2731
+ const te = O.dataset.prevDisplay;
2732
+ te ? O.style.display = te : O.style.removeProperty("display"), delete O.dataset.prevDisplay;
2732
2733
  } else
2733
- H.style.removeProperty("display");
2734
- delete H.dataset.rteForceHidden;
2734
+ O.style.removeProperty("display");
2735
+ delete O.dataset.rteForceHidden;
2735
2736
  }
2736
2737
  });
2737
- }, E = s.closest(".rte-textarea-toggle");
2738
- if (E) {
2738
+ }, k = s.closest(".rte-textarea-toggle");
2739
+ if (k) {
2739
2740
  o.preventDefault(), o.stopPropagation();
2740
- const O = E.closest(".rte-textarea-wrapper"), K = O?.querySelector('[data-type="textarea"]'), H = !(E.getAttribute("data-expanded") === "true");
2741
- E.setAttribute("data-expanded", String(H)), E.textContent = H ? "收起" : "展开", O && O.classList.toggle("rte-textarea-expanded", H);
2742
- const Z = O?.closest(".rte-textarea-required");
2743
- if (Z ? Z.classList.toggle("rte-textarea-overlay", H) : O && O.classList.toggle("rte-textarea-overlay", H), K)
2744
- if (H)
2741
+ const H = k.closest(".rte-textarea-wrapper"), K = H?.querySelector('[data-type="textarea"]'), O = !(k.getAttribute("data-expanded") === "true");
2742
+ k.setAttribute("data-expanded", String(O)), k.textContent = O ? "收起" : "展开", H && H.classList.toggle("rte-textarea-expanded", O);
2743
+ const te = H?.closest(".rte-textarea-required");
2744
+ if (te ? te.classList.toggle("rte-textarea-overlay", O) : H && H.classList.toggle("rte-textarea-overlay", O), K)
2745
+ if (O)
2745
2746
  K.classList.add("rte-textarea-expanded"), K.style.maxHeight = "none", K.style.height = "100%";
2746
2747
  else {
2747
2748
  K.classList.remove("rte-textarea-expanded");
2748
2749
  const ce = K.dataset.maxHeight || "252";
2749
2750
  K.style.maxHeight = `${ce}px`, K.style.height = "auto";
2750
2751
  }
2751
- n.current && (H ? n.current.classList.add("rte-overlay-active") : n.current.classList.remove("rte-overlay-active"));
2752
+ n.current && (O ? n.current.classList.add("rte-overlay-active") : n.current.classList.remove("rte-overlay-active"));
2752
2753
  return;
2753
2754
  }
2754
- const v = s.closest(".rte-richtext-toggle");
2755
- if (v) {
2755
+ const g = s.closest(".rte-richtext-toggle");
2756
+ if (g) {
2756
2757
  o.preventDefault(), o.stopPropagation();
2757
- const O = v.closest(".rte-richtext-wrapper"), K = O?.querySelector('[data-type="richtext"]'), H = !(v.getAttribute("data-expanded") === "true");
2758
+ const H = g.closest(".rte-richtext-wrapper"), K = H?.querySelector('[data-type="richtext"]'), O = !(g.getAttribute("data-expanded") === "true");
2758
2759
  ((le, fe) => {
2759
2760
  le.setAttribute("data-expanded", String(fe)), le.innerHTML = fe ? '<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>';
2760
- })(v, H);
2761
- const ce = O?.closest(".rte-richtext-required");
2762
- ce ? ce.classList.toggle("rte-richtext-expanded", H) : O && O.classList.toggle("rte-richtext-expanded", H);
2763
- const ne = O?.closest(".exclusion-wrapper") || O?.parentElement;
2764
- if (K && (H ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), ne && (ne.classList.toggle("rte-richtext-host-expanded", H), m(ne, H)), n.current) {
2765
- if (n.current.classList.toggle("rte-richtext-fullscreen-active", H), Y.current?.classList.toggle("rte-richtext-container-expanded", H), Y.current)
2766
- if (H) {
2761
+ })(g, O);
2762
+ const ce = H?.closest(".rte-richtext-required");
2763
+ ce ? ce.classList.toggle("rte-richtext-expanded", O) : H && H.classList.toggle("rte-richtext-expanded", O);
2764
+ const ne = H?.closest(".exclusion-wrapper") || H?.parentElement;
2765
+ if (K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), ne && (ne.classList.toggle("rte-richtext-host-expanded", O), f(ne, O)), n.current) {
2766
+ if (n.current.classList.toggle("rte-richtext-fullscreen-active", O), Y.current?.classList.toggle("rte-richtext-container-expanded", O), Y.current)
2767
+ if (O) {
2767
2768
  const le = Math.ceil(Y.current.getBoundingClientRect().height || 0);
2768
2769
  le > 0 && Y.current.style.setProperty("--rte-richtext-fullscreen-height", `${le}px`);
2769
2770
  } else
2770
2771
  Y.current.style.removeProperty("--rte-richtext-fullscreen-height");
2771
- if (H)
2772
+ if (O)
2772
2773
  we.current = n.current.scrollTop || 0, setTimeout(() => {
2773
2774
  n.current && (n.current.scrollTop = 0, n.current.scrollLeft = 0);
2774
2775
  }, 0);
@@ -2783,8 +2784,8 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2783
2784
  }
2784
2785
  if (s.closest('[data-type="text"]')) {
2785
2786
  o.preventDefault(), o.stopPropagation();
2786
- const O = window.getSelection();
2787
- O && O.removeAllRanges();
2787
+ const H = window.getSelection();
2788
+ H && H.removeAllRanges();
2788
2789
  return;
2789
2790
  }
2790
2791
  if (q && s.closest(".tag-node")) {
@@ -2797,30 +2798,30 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2797
2798
  if (W.current)
2798
2799
  return;
2799
2800
  setTimeout(() => {
2800
- const O = window.getSelection();
2801
- O && !O.isCollapsed || Qe(n);
2801
+ const H = window.getSelection();
2802
+ H && !H.isCollapsed || Qe(n);
2802
2803
  }, 10);
2803
2804
  return;
2804
2805
  }
2805
2806
  const R = s.closest(".file-remove-btn");
2806
2807
  if (R) {
2807
2808
  o.preventDefault(), o.stopPropagation();
2808
- const O = R.closest('[data-type="upload"]'), K = O?.dataset.key, te = O?.dataset.batchKey;
2809
+ const H = R.closest('[data-type="upload"]'), K = H?.dataset.key, Q = H?.dataset.batchKey;
2809
2810
  if (K)
2810
- if (te) {
2811
- const H = t.find((Z) => Z.type === "upload" && Z.key === te);
2812
- if (H && typeof H.maxCount == "number" && typeof H.minCount == "number") {
2813
- const Z = H.maxCount;
2811
+ if (Q) {
2812
+ const O = t.find((te) => te.type === "upload" && te.key === Q);
2813
+ if (O && typeof O.maxCount == "number" && typeof O.minCount == "number") {
2814
+ const te = O.maxCount;
2814
2815
  B((ce) => {
2815
2816
  const ne = { ...ce }, le = [];
2816
- for (let fe = 0; fe < Z; fe++) {
2817
- const be = `${te}-${fe}`, Se = ne[be];
2817
+ for (let fe = 0; fe < te; fe++) {
2818
+ const be = `${Q}-${fe}`, Se = ne[be];
2818
2819
  Se != null && be !== K && le.push(Se);
2819
2820
  }
2820
- for (let fe = 0; fe < Z; fe++)
2821
- delete ne[`${te}-${fe}`];
2821
+ for (let fe = 0; fe < te; fe++)
2822
+ delete ne[`${Q}-${fe}`];
2822
2823
  return le.forEach((fe, be) => {
2823
- ne[`${te}-${be}`] = fe;
2824
+ ne[`${Q}-${be}`] = fe;
2824
2825
  }), ne;
2825
2826
  });
2826
2827
  } else
@@ -2831,144 +2832,156 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2831
2832
  }
2832
2833
  const J = s.closest('[data-type="upload"]');
2833
2834
  if (J) {
2834
- const O = J.dataset.key, K = J.dataset.batchKey;
2835
- if (O)
2835
+ const H = J.dataset.key, K = J.dataset.batchKey;
2836
+ if (H)
2836
2837
  if (K) {
2837
- const te = t.find((H) => H.type === "upload" && H.key === K);
2838
- if (te && typeof te.maxCount == "number" && typeof te.minCount == "number") {
2839
- const H = te.maxCount;
2840
- let Z = 0;
2841
- for (let ce = 0; ce < H; ce++)
2842
- x[`${K}-${ce}`] != null && (Z += 1);
2843
- Z < H && V.current ? (V.current.multiple = !0, g(K), V.current.click()) : (V.current && (V.current.multiple = !1), u(O), V.current?.click());
2838
+ const Q = t.find((O) => O.type === "upload" && O.key === K);
2839
+ if (Q && typeof Q.maxCount == "number" && typeof Q.minCount == "number") {
2840
+ const O = Q.maxCount;
2841
+ let te = 0;
2842
+ for (let ce = 0; ce < O; ce++)
2843
+ w[`${K}-${ce}`] != null && (te += 1);
2844
+ te < O && V.current ? (V.current.multiple = !0, v(K), V.current.click()) : (V.current && (V.current.multiple = !1), u(H), V.current?.click());
2844
2845
  } else
2845
- V.current && (V.current.multiple = !1), u(O), V.current?.click();
2846
+ V.current && (V.current.multiple = !1), u(H), V.current?.click();
2846
2847
  } else
2847
- V.current && (V.current.multiple = !1), u(O), V.current?.click();
2848
+ V.current && (V.current.multiple = !1), u(H), V.current?.click();
2848
2849
  return;
2849
2850
  }
2850
2851
  }, Lt = (o) => {
2851
- const c = o.target.closest('[data-type="variable"]');
2852
- if (c) {
2853
- const $ = window.getSelection();
2854
- if ($) {
2855
- const m = document.createRange(), E = c.textContent || "";
2856
- if (E.replace(/\u200B/g, "")) {
2857
- let G = 0, A = E.length;
2858
- E.startsWith("​") && (G = 1), E.endsWith("​") && E.length > 1 && (A = E.length - 1);
2859
- const R = c.firstChild;
2860
- R && R.nodeType === Node.TEXT_NODE ? (m.setStart(R, G), m.setEnd(R, A)) : m.selectNodeContents(c);
2852
+ const i = o.target.closest('[data-type="variable"]');
2853
+ if (i) {
2854
+ const b = window.getSelection();
2855
+ if (b) {
2856
+ const f = document.createRange(), k = i.textContent || "";
2857
+ if (k.replace(/\u200B/g, "")) {
2858
+ let G = 0, _ = k.length;
2859
+ k.startsWith("​") && (G = 1), k.endsWith("​") && k.length > 1 && (_ = k.length - 1);
2860
+ const R = i.firstChild;
2861
+ R && R.nodeType === Node.TEXT_NODE ? (f.setStart(R, G), f.setEnd(R, _)) : f.selectNodeContents(i);
2861
2862
  } else
2862
- m.selectNodeContents(c), m.collapse(!0);
2863
- $.removeAllRanges(), $.addRange(m);
2863
+ f.selectNodeContents(i), f.collapse(!0);
2864
+ b.removeAllRanges(), b.addRange(f);
2864
2865
  }
2865
2866
  }
2866
2867
  }, ft = () => {
2867
2868
  if (t.length === 0) {
2868
2869
  if (n.current) {
2869
- const c = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2870
- pe(c), oe(!c);
2870
+ const i = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2871
+ pe(i), oe(!i);
2871
2872
  }
2872
2873
  return;
2873
2874
  }
2874
- if (Qe(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((c) => {
2875
- const $ = c.querySelector(".variable-info-icon");
2876
- if ($) {
2877
- let m = !1;
2878
- const E = document.createTreeWalker(
2879
- c,
2875
+ if (Qe(n), n.current && n.current.querySelectorAll(
2876
+ '[data-type="variable"][data-node-type="report-url"]'
2877
+ ).forEach((i) => {
2878
+ const b = i.dataset.key;
2879
+ if (!b) return;
2880
+ i.innerText.replace(/[\u200B\n]/g, "").trim() || Le((k) => {
2881
+ const g = k[b];
2882
+ return !g || g.status === "idle" && (!g.modules || g.modules.length === 0) ? k : {
2883
+ ...k,
2884
+ [b]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
2885
+ };
2886
+ });
2887
+ }), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
2888
+ const b = i.querySelector(".variable-info-icon");
2889
+ if (b) {
2890
+ let f = !1;
2891
+ const k = document.createTreeWalker(
2892
+ i,
2880
2893
  NodeFilter.SHOW_TEXT,
2881
2894
  {
2882
- acceptNode: (v) => $.contains(v) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2895
+ acceptNode: (g) => b.contains(g) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2883
2896
  }
2884
2897
  );
2885
- for (; E.nextNode(); )
2886
- if (E.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
2887
- m = !0;
2898
+ for (; k.nextNode(); )
2899
+ if (k.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
2900
+ f = !0;
2888
2901
  break;
2889
2902
  }
2890
- m ? $.classList.add("hidden") : $.classList.remove("hidden");
2903
+ f ? b.classList.add("hidden") : b.classList.remove("hidden");
2891
2904
  }
2892
2905
  }), a || window.requestAnimationFrame(() => {
2893
2906
  Xe();
2894
- }), Ze(n, ve, x), et(n, ve, x, oe), !n.current) return;
2907
+ }), Ze(n, ve, w), et(n, ve, w, oe), !n.current) return;
2895
2908
  t.filter((s) => s.type === "multi-variable" && s.key).forEach((s) => {
2896
2909
  if (!s.key) return;
2897
- const c = s.maxCount || 9, $ = Ce[s.key] || 1, m = [];
2898
- for (let R = 0; R < $; R++) {
2899
- const J = `${s.key}_${R}`, O = n.current.querySelector(
2910
+ const i = s.maxCount || 9, b = Ce[s.key] || 1, f = [];
2911
+ for (let R = 0; R < b; R++) {
2912
+ const J = `${s.key}_${R}`, H = n.current.querySelector(
2900
2913
  `[data-type="variable"][data-key="${J}"][data-multi-key="${s.key}"]`
2901
2914
  );
2902
- if (O) {
2903
- const K = O.innerText.replace(/[\u200B\n]/g, "").trim();
2904
- m.push(K);
2915
+ if (H) {
2916
+ const K = H.innerText.replace(/[\u200B\n]/g, "").trim();
2917
+ f.push(K);
2905
2918
  }
2906
2919
  }
2907
- const v = (m[m.length - 1] || "") === "";
2908
- let G = !1, A = -1;
2909
- for (let R = 0; R < m.length - 1; R++)
2910
- if (m[R] === "") {
2911
- G = !0, A = R;
2920
+ const g = (f[f.length - 1] || "") === "";
2921
+ let G = !1, _ = -1;
2922
+ for (let R = 0; R < f.length - 1; R++)
2923
+ if (f[R] === "") {
2924
+ G = !0, _ = R;
2912
2925
  break;
2913
2926
  }
2914
- if (G && A >= 0) {
2927
+ if (G && _ >= 0) {
2915
2928
  const R = window.getSelection();
2916
2929
  if (R && R.rangeCount > 0) {
2917
- const H = R.getRangeAt(0), Z = H.startContainer, ce = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
2930
+ const O = R.getRangeAt(0), te = O.startContainer, ce = te.nodeType === Node.ELEMENT_NODE ? te.closest('[data-type="variable"][data-multi-key]') : te.parentElement?.closest('[data-type="variable"][data-multi-key]');
2918
2931
  if (ce) {
2919
2932
  const ne = ce.dataset.key;
2920
2933
  if (ne) {
2921
2934
  const le = document.createRange();
2922
- le.setStartBefore(ce), le.setEnd(H.startContainer, H.startOffset);
2935
+ le.setStartBefore(ce), le.setEnd(O.startContainer, O.startOffset);
2923
2936
  const fe = le.toString().length;
2924
2937
  ue.current = { key: ne, offset: fe };
2925
2938
  }
2926
2939
  }
2927
2940
  }
2928
- const J = [...m];
2929
- for (let H = A; H < J.length - 1; H++)
2930
- J[H] = J[H + 1];
2941
+ const J = [...f];
2942
+ for (let O = _; O < J.length - 1; O++)
2943
+ J[O] = J[O + 1];
2931
2944
  J.pop();
2932
- const O = {};
2933
- J.forEach((H, Z) => {
2934
- H && (O[`${s.key}_${Z}`] = H);
2945
+ const H = {};
2946
+ J.forEach((O, te) => {
2947
+ O && (H[`${s.key}_${te}`] = O);
2935
2948
  });
2936
- const K = Math.max(v ? J.length : J.length + 1, 1);
2949
+ const K = Math.max(g ? J.length : J.length + 1, 1);
2937
2950
  n.current.querySelectorAll(
2938
2951
  '[data-type="variable"]'
2939
- ).forEach((H) => {
2940
- const Z = H.dataset.key, ce = H.dataset.multiKey;
2941
- if (Z && ce !== s.key) {
2942
- const ne = H.innerText.replace(/[\u200B\n]/g, "").trim();
2943
- ne && (O[Z] = ne);
2952
+ ).forEach((O) => {
2953
+ const te = O.dataset.key, ce = O.dataset.multiKey;
2954
+ if (te && ce !== s.key) {
2955
+ const ne = O.innerText.replace(/[\u200B\n]/g, "").trim();
2956
+ ne && (H[te] = ne);
2944
2957
  }
2945
- }), n.current.__tempVariableValues = O, Te((H) => ({
2946
- ...H,
2958
+ }), n.current.__tempVariableValues = H, Te((O) => ({
2959
+ ...O,
2947
2960
  [s.key]: K
2948
2961
  }));
2949
2962
  return;
2950
2963
  }
2951
- if (!v) {
2952
- const R = $ - 1, J = `${s.key}_${R}`, O = n.current.querySelector(
2964
+ if (!g) {
2965
+ const R = b - 1, J = `${s.key}_${R}`, H = n.current.querySelector(
2953
2966
  `[data-type="variable"][data-key="${J}"][data-multi-key="${s.key}"]`
2954
2967
  );
2955
- if (O && O.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && $ < c) {
2956
- const te = window.getSelection();
2957
- if (te && te.rangeCount > 0) {
2958
- const H = te.getRangeAt(0), Z = H.startContainer, ce = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
2968
+ if (H && H.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && b < i) {
2969
+ const Q = window.getSelection();
2970
+ if (Q && Q.rangeCount > 0) {
2971
+ const O = Q.getRangeAt(0), te = O.startContainer, ce = te.nodeType === Node.ELEMENT_NODE ? te.closest('[data-type="variable"][data-multi-key]') : te.parentElement?.closest('[data-type="variable"][data-multi-key]');
2959
2972
  if (ce) {
2960
2973
  const ne = ce.dataset.key;
2961
2974
  if (ne) {
2962
2975
  const le = document.createRange();
2963
- le.setStartBefore(ce), le.setEnd(H.startContainer, H.startOffset);
2976
+ le.setStartBefore(ce), le.setEnd(O.startContainer, O.startOffset);
2964
2977
  const fe = le.toString().length;
2965
2978
  ue.current = { key: ne, offset: fe };
2966
2979
  }
2967
2980
  }
2968
2981
  }
2969
- Te((H) => ({
2970
- ...H,
2971
- [s.key]: $ + 1
2982
+ Te((O) => ({
2983
+ ...O,
2984
+ [s.key]: b + 1
2972
2985
  }));
2973
2986
  }
2974
2987
  }
@@ -2977,50 +2990,50 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
2977
2990
  Ve(() => {
2978
2991
  const o = n.current;
2979
2992
  if (!o) return;
2980
- const s = /* @__PURE__ */ new Map(), c = (E) => {
2981
- const v = E.target, G = E.relatedTarget;
2982
- !v || !n.current || !n.current.contains(v) || G && n.current.contains(G) || setTimeout(() => {
2993
+ const s = /* @__PURE__ */ new Map(), i = (k) => {
2994
+ const g = k.target, G = k.relatedTarget;
2995
+ !g || !n.current || !n.current.contains(g) || G && n.current.contains(G) || setTimeout(() => {
2983
2996
  if (n.current) {
2984
2997
  if (t.length === 0) {
2985
- const A = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2986
- oe(A.length > 0);
2998
+ const _ = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2999
+ oe(_.length > 0);
2987
3000
  return;
2988
3001
  }
2989
- Qe(n), Ze(n, ve, x), et(n, ve, x, oe);
3002
+ Qe(n), Ze(n, ve, w), et(n, ve, w, oe);
2990
3003
  }
2991
3004
  }, 0);
2992
3005
  };
2993
- o.addEventListener("blur", c, !0);
2994
- const $ = () => {
3006
+ o.addEventListener("blur", i, !0);
3007
+ const b = () => {
2995
3008
  if (!n.current) return;
2996
- s.forEach((G, A) => {
2997
- A.removeEventListener("blur", G, !1);
3009
+ s.forEach((G, _) => {
3010
+ _.removeEventListener("blur", G, !1);
2998
3011
  }), s.clear();
2999
- const E = n.current.querySelectorAll(
3012
+ const k = n.current.querySelectorAll(
3000
3013
  '[data-type="variable"][data-multi-key]'
3001
- ), v = (G) => {
3014
+ ), g = (G) => {
3002
3015
  G.stopPropagation(), G.stopImmediatePropagation();
3003
- const A = G.target;
3004
- if (!A || !n.current || !n.current.contains(A))
3016
+ const _ = G.target;
3017
+ if (!_ || !n.current || !n.current.contains(_))
3005
3018
  return;
3006
- const R = A.closest('[data-type="variable"][data-multi-key]');
3019
+ const R = _.closest('[data-type="variable"][data-multi-key]');
3007
3020
  if (!R || !n.current.contains(R))
3008
3021
  return;
3009
3022
  let J = !1;
3010
3023
  if (s.forEach((le, fe) => {
3011
- (fe === R || fe.contains(A)) && (J = !0);
3024
+ (fe === R || fe.contains(_)) && (J = !0);
3012
3025
  }), !J)
3013
3026
  return;
3014
- const O = R.dataset.multiKey, K = R.dataset.key, te = R.dataset.index;
3015
- if (!O || !K || te === void 0) return;
3016
- const H = G.relatedTarget;
3017
- if (!(!H || !n.current.contains(H)))
3027
+ const H = R.dataset.multiKey, K = R.dataset.key, Q = R.dataset.index;
3028
+ if (!H || !K || Q === void 0) return;
3029
+ const O = G.relatedTarget;
3030
+ if (!(!O || !n.current.contains(O)))
3018
3031
  return;
3019
3032
  const ce = R.innerText.replace(/[\u200B\n]/g, "").trim();
3020
3033
  console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
3021
- multiKey: O,
3034
+ multiKey: H,
3022
3035
  currentKey: K,
3023
- index: te,
3036
+ index: Q,
3024
3037
  content: ce
3025
3038
  });
3026
3039
  const ne = /[、,,\s]+/;
@@ -3029,52 +3042,52 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3029
3042
  console.log("[Blur Event] 拆分前的内容:", ce), console.log("[Blur Event] 拆分后的部分:", le);
3030
3043
  const be = le.slice(0, 9);
3031
3044
  if (console.log("[Blur Event] 有效的部分(最多9个):", be), be.length > 1) {
3032
- const Se = t.find((De) => De.type === "multi-variable" && De.key === O);
3045
+ const Se = t.find((De) => De.type === "multi-variable" && De.key === H);
3033
3046
  if (Se) {
3034
- const De = Ce[O] || 1, mt = parseInt(te, 10), yt = Se.maxCount || 9, Ie = [];
3047
+ const De = Ce[H] || 1, yt = parseInt(Q, 10), mt = Se.maxCount || 9, Ie = [];
3035
3048
  for (let xe = 0; xe < De; xe++) {
3036
- const _e = `${O}_${xe}`, Pe = n.current.querySelector(
3037
- `[data-type="variable"][data-key="${_e}"][data-multi-key="${O}"]`
3049
+ const _e = `${H}_${xe}`, Pe = n.current.querySelector(
3050
+ `[data-type="variable"][data-key="${_e}"][data-multi-key="${H}"]`
3038
3051
  );
3039
3052
  if (Pe) {
3040
3053
  const Be = Pe.innerText.replace(/[\u200B\n]/g, "").trim();
3041
3054
  Ie.push(Be);
3042
3055
  }
3043
3056
  }
3044
- console.log("[Blur Event] 拆分前的所有值:", Ie), console.log("[Blur Event] 当前索引:", mt), console.log("[Blur Event] 要插入的值:", be), Ie.splice(mt, 1, ...be);
3045
- const qe = Ie.slice(0, yt);
3046
- console.log("[Blur Event] 拆分后的所有值:", qe), qe.length > 0 && qe[qe.length - 1] !== "" && qe.length < yt && qe.push("");
3057
+ console.log("[Blur Event] 拆分前的所有值:", Ie), console.log("[Blur Event] 当前索引:", yt), console.log("[Blur Event] 要插入的值:", be), Ie.splice(yt, 1, ...be);
3058
+ const qe = Ie.slice(0, mt);
3059
+ console.log("[Blur Event] 拆分后的所有值:", qe), qe.length > 0 && qe[qe.length - 1] !== "" && qe.length < mt && qe.push("");
3047
3060
  const Ht = Math.max(qe.length, 1), Je = {};
3048
3061
  qe.forEach((xe, _e) => {
3049
- xe && (Je[`${O}_${_e}`] = xe);
3062
+ xe && (Je[`${H}_${_e}`] = xe);
3050
3063
  }), n.current.querySelectorAll(
3051
3064
  '[data-type="variable"]'
3052
3065
  ).forEach((xe) => {
3053
3066
  const _e = xe.dataset.key, Pe = xe.dataset.multiKey;
3054
- if (_e && Pe !== O) {
3067
+ if (_e && Pe !== H) {
3055
3068
  const Be = xe.innerText.replace(/[\u200B\n]/g, "").trim();
3056
3069
  Be && (Je[_e] = Be);
3057
3070
  }
3058
3071
  }), n.current.__tempVariableValues = Je, Te((xe) => ({
3059
3072
  ...xe,
3060
- [O]: Ht
3073
+ [H]: Ht
3061
3074
  }));
3062
3075
  }
3063
3076
  }
3064
3077
  }
3065
3078
  };
3066
- E.forEach((G) => {
3067
- G.addEventListener("blur", v, !1), s.set(G, v);
3079
+ k.forEach((G) => {
3080
+ G.addEventListener("blur", g, !1), s.set(G, g);
3068
3081
  });
3069
- }, m = setTimeout(() => {
3070
- $();
3082
+ }, f = setTimeout(() => {
3083
+ b();
3071
3084
  }, 0);
3072
3085
  return () => {
3073
- clearTimeout(m), o.removeEventListener("blur", c, !0), s.forEach((E, v) => {
3074
- v.removeEventListener("blur", E, !1);
3086
+ clearTimeout(f), o.removeEventListener("blur", i, !0), s.forEach((k, g) => {
3087
+ g.removeEventListener("blur", k, !1);
3075
3088
  }), s.clear();
3076
3089
  };
3077
- }, [t, ve, Ce, x]);
3090
+ }, [t, ve, Ce, w]);
3078
3091
  const Mt = (o) => {
3079
3092
  if (l) {
3080
3093
  o.preventDefault();
@@ -3086,27 +3099,27 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3086
3099
  }
3087
3100
  const s = window.getSelection();
3088
3101
  if (s && s.rangeCount > 0) {
3089
- const c = s.anchorNode;
3090
- let $ = null;
3091
- if (c && (c.nodeType === Node.ELEMENT_NODE ? $ = c.closest('[data-type="text"]') : c.nodeType === Node.TEXT_NODE && c.parentElement && ($ = c.parentElement.closest('[data-type="text"]'))), $) {
3102
+ const i = s.anchorNode;
3103
+ let b = null;
3104
+ if (i && (i.nodeType === Node.ELEMENT_NODE ? b = i.closest('[data-type="text"]') : i.nodeType === Node.TEXT_NODE && i.parentElement && (b = i.parentElement.closest('[data-type="text"]'))), b) {
3092
3105
  if (o.preventDefault(), o.stopPropagation(), n.current) {
3093
- const m = n.current.querySelector(
3106
+ const f = n.current.querySelector(
3094
3107
  '[data-type="variable"], [data-type="upload"]'
3095
3108
  );
3096
- m && m.focus();
3109
+ f && f.focus();
3097
3110
  }
3098
3111
  return;
3099
3112
  }
3100
3113
  }
3101
3114
  if (q && s && s.rangeCount > 0) {
3102
- const c = s.anchorNode;
3103
- let $ = null;
3104
- if (c && (c.nodeType === Node.ELEMENT_NODE ? $ = c.closest(".tag-node") : c.nodeType === Node.TEXT_NODE && c.parentElement && ($ = c.parentElement.closest(".tag-node"))), $) {
3115
+ const i = s.anchorNode;
3116
+ let b = null;
3117
+ if (i && (i.nodeType === Node.ELEMENT_NODE ? b = i.closest(".tag-node") : i.nodeType === Node.TEXT_NODE && i.parentElement && (b = i.parentElement.closest(".tag-node"))), b) {
3105
3118
  if (o.preventDefault(), o.stopPropagation(), n.current) {
3106
- const m = n.current.querySelector(
3119
+ const f = n.current.querySelector(
3107
3120
  '[data-type="variable"], [data-type="upload"]'
3108
3121
  );
3109
- m && m.focus();
3122
+ f && f.focus();
3110
3123
  }
3111
3124
  return;
3112
3125
  }
@@ -3119,34 +3132,34 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3119
3132
  n.current.innerHTML = "", n.current.focus();
3120
3133
  }
3121
3134
  if (o.key === "Backspace") {
3122
- const c = window.getSelection();
3123
- if (c && c.rangeCount > 0) {
3124
- const $ = c.getRangeAt(0), m = c.anchorNode;
3135
+ const i = window.getSelection();
3136
+ if (i && i.rangeCount > 0) {
3137
+ const b = i.getRangeAt(0), f = i.anchorNode;
3125
3138
  if (q) {
3126
- let v = null, G = null;
3127
- if (m && (m.nodeType === Node.ELEMENT_NODE ? (v = m.closest(".tag-node"), G = m.closest('[data-type="text"]')) : m.nodeType === Node.TEXT_NODE && m.parentElement && (v = m.parentElement.closest(".tag-node"), G = m.parentElement.closest('[data-type="text"]'))), (v || G) && $.collapsed && $.startOffset === 0) {
3139
+ let g = null, G = null;
3140
+ if (f && (f.nodeType === Node.ELEMENT_NODE ? (g = f.closest(".tag-node"), G = f.closest('[data-type="text"]')) : f.nodeType === Node.TEXT_NODE && f.parentElement && (g = f.parentElement.closest(".tag-node"), G = f.parentElement.closest('[data-type="text"]'))), (g || G) && b.collapsed && b.startOffset === 0) {
3128
3141
  o.preventDefault();
3129
3142
  return;
3130
3143
  }
3131
3144
  }
3132
- let E = null;
3133
- if (m && (m.nodeType === Node.ELEMENT_NODE ? E = m.closest(
3145
+ let k = null;
3146
+ if (f && (f.nodeType === Node.ELEMENT_NODE ? k = f.closest(
3134
3147
  '[data-type="variable"]'
3135
- ) : m.nodeType === Node.TEXT_NODE && m.parentElement && (E = m.parentElement.closest(
3148
+ ) : f.nodeType === Node.TEXT_NODE && f.parentElement && (k = f.parentElement.closest(
3136
3149
  '[data-type="variable"]'
3137
- ))), E) {
3138
- if (!$.collapsed)
3150
+ ))), k) {
3151
+ if (!b.collapsed)
3139
3152
  return;
3140
- const v = E.innerText;
3141
- if (v === "​" || v === "") {
3153
+ const g = k.innerText;
3154
+ if (g === "​" || g === "") {
3142
3155
  o.preventDefault();
3143
3156
  return;
3144
3157
  }
3145
- if ($.startOffset === 0) {
3158
+ if (b.startOffset === 0) {
3146
3159
  o.preventDefault();
3147
3160
  return;
3148
3161
  }
3149
- if (v.startsWith("​") && $.startOffset === 1) {
3162
+ if (g.startsWith("​") && b.startOffset === 1) {
3150
3163
  o.preventDefault();
3151
3164
  return;
3152
3165
  }
@@ -3154,116 +3167,117 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3154
3167
  }
3155
3168
  }
3156
3169
  }, Dt = () => {
3157
- if (i || l || w || !Q || !n.current) return;
3170
+ if (c || l || $ || !Z || !n.current) return;
3158
3171
  if (t.length === 0) {
3159
- const E = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3160
- if (!E) return;
3161
- if (y(E, E), n.current) {
3172
+ const k = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3173
+ if (!k) return;
3174
+ if (m(k, k), n.current) {
3162
3175
  n.current.textContent = "";
3163
- const v = new Event("input", { bubbles: !0 });
3164
- n.current.dispatchEvent(v);
3176
+ const g = new Event("input", { bubbles: !0 });
3177
+ n.current.dispatchEvent(g);
3165
3178
  }
3166
3179
  return;
3167
3180
  }
3168
3181
  const o = n.current;
3169
3182
  let s = "";
3170
- const c = {}, $ = (E) => {
3171
- if (!(E.nodeType === Node.ELEMENT_NODE && E.style.display === "none")) {
3172
- if (E.nodeType === Node.TEXT_NODE)
3173
- s += (E.textContent || "").replace(/\u200B/g, "");
3174
- else if (E.nodeType === Node.ELEMENT_NODE) {
3175
- const v = E, G = v.dataset.type, A = v.dataset.key;
3176
- if (G === "variable" && A) {
3183
+ const i = {}, b = (k) => {
3184
+ if (!(k.nodeType === Node.ELEMENT_NODE && k.style.display === "none")) {
3185
+ if (k.nodeType === Node.TEXT_NODE)
3186
+ s += (k.textContent || "").replace(/\u200B/g, "");
3187
+ else if (k.nodeType === Node.ELEMENT_NODE) {
3188
+ const g = k, G = g.dataset.type, _ = g.dataset.key;
3189
+ if (G === "variable" && _) {
3177
3190
  let R = "";
3178
3191
  const J = document.createTreeWalker(
3179
- v,
3192
+ g,
3180
3193
  NodeFilter.SHOW_TEXT,
3181
3194
  {
3182
3195
  acceptNode: (K) => {
3183
- const te = v.querySelector(".variable-info-icon");
3184
- return te && te.contains(K) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3196
+ const Q = g.querySelector(".variable-info-icon");
3197
+ return Q && Q.contains(K) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3185
3198
  }
3186
3199
  }
3187
3200
  );
3188
3201
  for (; J.nextNode(); )
3189
3202
  R += J.currentNode.textContent || "";
3190
- const O = R.replace(/[\u200B\n]/g, "").trim();
3191
- if (O) {
3192
- const K = v.dataset.multiKey;
3203
+ const H = R.replace(/[\u200B\n]/g, "").trim();
3204
+ if (H) {
3205
+ const K = g.dataset.multiKey;
3193
3206
  if (K) {
3194
- (!c[K] || !Array.isArray(c[K])) && (c[K] = []);
3195
- const te = c[K];
3196
- te.push(O), te.length > 1 && (s += " "), s += O;
3207
+ (!i[K] || !Array.isArray(i[K])) && (i[K] = []);
3208
+ const Q = i[K];
3209
+ Q.push(H), Q.length > 1 && (s += " "), s += H;
3197
3210
  } else
3198
- c[A] = O, s += O;
3199
- if (v.dataset.nodeType === "report-url") {
3200
- const H = t.find(
3201
- (Z) => Z.type === "report-url" && Z.key === A
3202
- )?.sourceUrlKey || `${A}__sourceUrl`;
3203
- H && c[H] === void 0 && (c[H] = O);
3204
- }
3211
+ i[_] = H, s += H;
3212
+ if (g.dataset.nodeType === "report-url")
3213
+ if (i.url === void 0)
3214
+ i.url = H;
3215
+ else {
3216
+ const Q = i.url;
3217
+ Array.isArray(Q) ? Q.push(H) : i.url = [String(Q), H];
3218
+ }
3205
3219
  }
3206
- } else if (G === "select" && A) {
3207
- const R = (v.getAttribute("data-value") || "").trim();
3208
- R && (c[A] = R, s += R);
3209
- } else if (G === "textarea" && A) {
3210
- const J = (v.value || "").replace(/\u200B/g, "").trim();
3211
- J && (c[A] = J, s += J);
3212
- } else if (G === "richtext" && A) {
3213
- const J = (v.textContent || "").replace(/\u200B/g, "").trim();
3214
- J && (c[A] = J, s += J);
3215
- } else if (G === "datepicker" && A) {
3216
- const J = (v.getAttribute("data-value") || "").trim();
3220
+ } else if (G === "select" && _) {
3221
+ const R = (g.getAttribute("data-value") || "").trim();
3222
+ R && (i[_] = R, s += R);
3223
+ } else if (G === "textarea" && _) {
3224
+ const J = (g.value || "").replace(/\u200B/g, "").trim();
3225
+ J && (i[_] = J, s += J);
3226
+ } else if (G === "richtext" && _) {
3227
+ const J = (g.textContent || "").replace(/\u200B/g, "").trim();
3228
+ J && (i[_] = J, s += J);
3229
+ } else if (G === "datepicker" && _) {
3230
+ const J = (g.getAttribute("data-value") || "").trim();
3217
3231
  if (J)
3218
3232
  if (J.includes(",")) {
3219
- const O = J.split(",");
3220
- O.length === 2 ? (c[A] = O, s += `[${O[0]}, ${O[1]}]`) : (c[A] = J, s += J);
3233
+ const H = J.split(",");
3234
+ H.length === 2 ? (i[_] = H, s += `[${H[0]}, ${H[1]}]`) : (i[_] = J, s += J);
3221
3235
  } else
3222
- c[A] = J, s += J;
3223
- } else if (G === "upload" && A) {
3224
- const R = v.dataset.batchKey;
3236
+ i[_] = J, s += J;
3237
+ } else if (G === "upload" && _) {
3238
+ const R = g.dataset.batchKey;
3225
3239
  if (R) {
3226
- const J = t.find((O) => O.type === "upload" && O.key === R);
3240
+ const J = t.find((H) => H.type === "upload" && H.key === R);
3227
3241
  if (J && typeof J.maxCount == "number" && typeof J.minCount == "number") {
3228
- const O = [];
3242
+ const H = [];
3229
3243
  for (let K = 0; K < J.maxCount; K++) {
3230
- const te = `${R}-${K}`, H = x[te];
3231
- H && O.push(H);
3244
+ const Q = `${R}-${K}`, O = w[Q];
3245
+ O && H.push(O);
3232
3246
  }
3233
- c[R] || (c[R] = O.length > 0 ? O : null, O.length > 0 && (s += ` [附带${O.length}个文件: ${O.map((K) => K.name).join(", ")}] `));
3247
+ i[R] || (i[R] = H.length > 0 ? H : null, H.length > 0 && (s += ` [附带${H.length}个文件: ${H.map((K) => K.name).join(", ")}] `));
3234
3248
  } else
3235
- c[A] = x[A] ?? null, x[A] && (s += ` [附带文件: ${x[A]?.name}] `);
3249
+ i[_] = w[_] ?? null, w[_] && (s += ` [附带文件: ${w[_]?.name}] `);
3236
3250
  } else
3237
- c[A] = x[A] ?? null, x[A] && (s += ` [附带文件: ${x[A]?.name}] `);
3251
+ i[_] = w[_] ?? null, w[_] && (s += ` [附带文件: ${w[_]?.name}] `);
3238
3252
  } else {
3239
- if (v.classList.contains("tag-close-btn") || v.classList.contains("file-remove-btn")) return;
3240
- v.getAttribute("contenteditable") === "false" && !G && v.classList.contains("tag-node") ? s += v.innerText : v.childNodes.forEach($);
3253
+ if (g.classList.contains("tag-close-btn") || g.classList.contains("file-remove-btn")) return;
3254
+ g.getAttribute("contenteditable") === "false" && !G && g.classList.contains("tag-node") ? s += g.innerText : g.childNodes.forEach(b);
3241
3255
  }
3242
3256
  }
3243
3257
  }
3244
3258
  };
3245
- if (o.childNodes.forEach($), s = s.trim(), !s) return;
3246
- const m = new FormData();
3247
- m.append("fullPrompt", s), Object.keys(c).forEach((E) => {
3248
- const v = c[E];
3249
- v != null && (v instanceof File ? m.append(E, v) : Array.isArray(v) ? t.some(
3250
- (A) => A.type === "multi-variable" && A.key === E
3251
- ) ? v.forEach((A) => {
3252
- A != null && A !== "" && m.append(E, String(A));
3253
- }) : v.forEach((A, R) => {
3254
- A != null && (A instanceof File ? m.append(`${E}[${R}]`, A) : typeof A == "string" ? m.append(`${E}[${R}]`, A) : m.append(`${E}[${R}]`, String(A)));
3255
- }) : typeof v == "string" ? m.append(E, v) : m.append(E, String(v)));
3256
- }), y(m, s);
3259
+ if (o.childNodes.forEach(b), s = s.trim(), !s) return;
3260
+ const f = new FormData();
3261
+ f.append("fullPrompt", s), Object.keys(i).forEach((k) => {
3262
+ const g = i[k];
3263
+ g != null && (g instanceof File ? f.append(k, g) : Array.isArray(g) ? t.some(
3264
+ (_) => _.type === "multi-variable" && _.key === k
3265
+ ) ? g.forEach((_) => {
3266
+ _ != null && _ !== "" && f.append(k, String(_));
3267
+ }) : g.forEach((_, R) => {
3268
+ _ != null && (_ instanceof File ? f.append(`${k}[${R}]`, _) : typeof _ == "string" ? f.append(`${k}[${R}]`, _) : f.append(`${k}[${R}]`, String(_)));
3269
+ }) : typeof g == "string" ? f.append(k, g) : f.append(k, String(g)));
3270
+ }), m(f, s);
3257
3271
  }, It = {
3258
3272
  ...h ? { width: typeof h == "number" ? `${h}px` : h } : {},
3259
- ...b ? { border: b } : {},
3273
+ ...x ? { border: x } : {},
3260
3274
  ...P ? { background: P } : {},
3261
3275
  ...e ? { maxHeight: typeof e == "number" ? `${e}px` : e } : {},
3262
3276
  ...r ? { minHeight: typeof r == "number" ? `${r}px` : r } : {},
3263
3277
  ...e ? {
3264
3278
  "--rte-richtext-fullscreen-height": typeof e == "number" ? `${e}px` : e
3265
3279
  } : {}
3266
- }, Pt = typeof _ == "number" && Number.isFinite(_) && _ >= 0 ? _ : 260, Bt = {
3280
+ }, Pt = typeof A == "number" && Number.isFinite(A) && A >= 0 ? A : 260, Bt = {
3267
3281
  overflow: a || ke ? "hidden" : void 0
3268
3282
  }, Vt = {
3269
3283
  maxHeight: a ? `${ee}px` : `${Math.max(ge, ee)}px`,
@@ -3291,7 +3305,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3291
3305
  "div",
3292
3306
  {
3293
3307
  ref: n,
3294
- className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${me && N ? "rte-editor-empty" : ""}`,
3308
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${ye && N ? "rte-editor-empty" : ""}`,
3295
3309
  contentEditable: t.length === 0,
3296
3310
  suppressContentEditableWarning: !0,
3297
3311
  "data-placeholder": N,
@@ -3341,7 +3355,7 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3341
3355
  }))
3342
3356
  },
3343
3357
  trigger: ["click"],
3344
- disabled: l || i,
3358
+ disabled: l || c,
3345
3359
  overlayClassName: "rte-agent-dropdown",
3346
3360
  children: /* @__PURE__ */ ie("div", { className: "rte-agent-badge", style: { cursor: D.length > 0 ? "pointer" : "default" }, children: [
3347
3361
  /* @__PURE__ */ M("i", { className: "iconfont icon-zhinengti", style: { fontSize: "16px" } }),
@@ -3352,9 +3366,9 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3352
3366
  ] }) }),
3353
3367
  /* @__PURE__ */ ie("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
3354
3368
  (() => {
3355
- const o = t.find((c) => c.type === "tag");
3369
+ const o = t.find((i) => i.type === "tag");
3356
3370
  if (!o || !o.text) return null;
3357
- const s = D.find((c) => c.label === o.text);
3371
+ const s = D.find((i) => i.label === o.text);
3358
3372
  return !s || s.points === void 0 || s.points === null ? null : /* @__PURE__ */ ie("div", { className: "rte-points-badge", children: [
3359
3373
  /* @__PURE__ */ M("i", { className: "iconfont icon-jifen", style: { marginRight: "4px", fontSize: "16px" } }),
3360
3374
  /* @__PURE__ */ ie("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
@@ -3368,52 +3382,52 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3368
3382
  {
3369
3383
  type: "button",
3370
3384
  onClick: Dt,
3371
- disabled: i || l || w || !Q,
3385
+ disabled: c || l || $ || !Z,
3372
3386
  className: "rich-text-editor-send-button",
3373
- children: i || w ? /* @__PURE__ */ M("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ M("i", { className: "iconfont icon-fasong" })
3387
+ children: c || $ ? /* @__PURE__ */ M("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ M("i", { className: "iconfont icon-fasong" })
3374
3388
  }
3375
3389
  )
3376
3390
  ] })
3377
3391
  ] }),
3378
- k?.anchorEl && (() => {
3379
- if (!document.body.contains(k.anchorEl))
3392
+ E?.anchorEl && (() => {
3393
+ if (!document.body.contains(E.anchorEl))
3380
3394
  return null;
3381
3395
  let o = "", s = {
3382
3396
  background: "var(--neutral-800, #262626)"
3383
3397
  };
3384
- if (k.type === "upload")
3398
+ if (E.type === "upload")
3385
3399
  o = t.find(
3386
- (m) => m.type === "upload" && m.key === k.key
3400
+ (f) => f.type === "upload" && f.key === E.key
3387
3401
  )?.tooltip || "";
3388
- else if (k.type === "tag")
3389
- o = k.anchorEl.dataset.tooltip || "";
3390
- else if (k.type === "upload-label")
3391
- o = k.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName || k.anchorEl.dataset.fileName || "";
3392
- else if (k.type === "variable")
3393
- o = k.anchorEl.dataset.tooltip || "";
3394
- else if (k.type === "upload-preview") {
3395
- const $ = x[k.key], m = !!$ && ($.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test($.name || ""));
3396
- if ($ && m) {
3397
- const E = URL.createObjectURL($);
3398
- o = /* @__PURE__ */ M("div", { className: "rte-upload-preview", children: /* @__PURE__ */ M("img", { className: "rte-upload-preview-img", src: E, alt: $.name }) }), s = {
3402
+ else if (E.type === "tag")
3403
+ o = E.anchorEl.dataset.tooltip || "";
3404
+ else if (E.type === "upload-label")
3405
+ o = E.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName || E.anchorEl.dataset.fileName || "";
3406
+ else if (E.type === "variable")
3407
+ o = E.anchorEl.dataset.tooltip || "";
3408
+ else if (E.type === "upload-preview") {
3409
+ const b = w[E.key], f = !!b && (b.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(b.name || ""));
3410
+ if (b && f) {
3411
+ const k = URL.createObjectURL(b);
3412
+ o = /* @__PURE__ */ M("div", { className: "rte-upload-preview", children: /* @__PURE__ */ M("img", { className: "rte-upload-preview-img", src: k, alt: b.name }) }), s = {
3399
3413
  background: "#fff",
3400
3414
  padding: 0,
3401
3415
  borderRadius: 4,
3402
3416
  boxShadow: "0 2px 12px 0 rgba(153, 153, 153, 0.25)"
3403
- }, setTimeout(() => URL.revokeObjectURL(E), 1e3);
3417
+ }, setTimeout(() => URL.revokeObjectURL(k), 1e3);
3404
3418
  } else
3405
3419
  o = "";
3406
3420
  }
3407
3421
  if (!o) return null;
3408
- const c = k.type === "upload-preview" ? "#0A0A0A" : "#fff";
3422
+ const i = E.type === "upload-preview" ? "#0A0A0A" : "#fff";
3409
3423
  return at(
3410
3424
  /* @__PURE__ */ M(
3411
3425
  Kt,
3412
3426
  {
3413
3427
  arrow: !1,
3414
- title: k.type === "upload-preview" ? o : /* @__PURE__ */ M("div", { style: { maxWidth: "200px", fontSize: "12px", color: c }, children: o }),
3428
+ title: E.type === "upload-preview" ? o : /* @__PURE__ */ M("div", { style: { maxWidth: "200px", fontSize: "12px", color: i }, children: o }),
3415
3429
  open: !0,
3416
- placement: k.type === "upload-preview" ? "topLeft" : "top",
3430
+ placement: E.type === "upload-preview" ? "topLeft" : "top",
3417
3431
  getPopupContainer: () => document.body,
3418
3432
  overlayInnerStyle: s,
3419
3433
  children: /* @__PURE__ */ M(
@@ -3421,11 +3435,11 @@ const { RangePicker: On } = jt, Gn = ({ host: t, onChange: y }) => {
3421
3435
  {
3422
3436
  style: {
3423
3437
  position: "fixed",
3424
- left: `${k.anchorEl.getBoundingClientRect().left}px`,
3438
+ left: `${E.anchorEl.getBoundingClientRect().left}px`,
3425
3439
  // 对于 upload-label 类型的 tooltip,向上移动 6px 以增加间距
3426
- top: `${k.anchorEl.getBoundingClientRect().top - (k.type === "upload-label" ? 4 : 0)}px`,
3427
- width: `${k.anchorEl.offsetWidth}px`,
3428
- height: `${k.anchorEl.offsetHeight}px`,
3440
+ top: `${E.anchorEl.getBoundingClientRect().top - (E.type === "upload-label" ? 4 : 0)}px`,
3441
+ width: `${E.anchorEl.offsetWidth}px`,
3442
+ height: `${E.anchorEl.offsetHeight}px`,
3429
3443
  pointerEvents: "none"
3430
3444
  }
3431
3445
  }
@@ -3476,26 +3490,26 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3476
3490
  { label: "30页", value: 30 }
3477
3491
  ], jn = ({
3478
3492
  autoLoading: t,
3479
- batchSize: y,
3480
- loadingProgress: i,
3493
+ batchSize: m,
3494
+ loadingProgress: c,
3481
3495
  loadIcon: l,
3482
3496
  onBatchSizeChange: h,
3483
3497
  onLoadNextPage: q,
3484
3498
  onStartAutoLoad: D,
3485
3499
  onStopLoad: I
3486
- }) => t && i ? /* @__PURE__ */ ie("div", { className: "auto_load_progress", children: [
3500
+ }) => t && c ? /* @__PURE__ */ ie("div", { className: "auto_load_progress", children: [
3487
3501
  l || /* @__PURE__ */ M("img", { src: wt, alt: "自动加载", width: 14, height: 14 }),
3488
3502
  /* @__PURE__ */ ie("span", { children: [
3489
3503
  "正在加载第",
3490
- i.currentPage,
3504
+ c.currentPage,
3491
3505
  "/",
3492
- i.totalPages,
3506
+ c.totalPages,
3493
3507
  "页"
3494
3508
  ] }),
3495
3509
  /* @__PURE__ */ M(
3496
3510
  Xt,
3497
3511
  {
3498
- percent: i.percentage,
3512
+ percent: c.percentage,
3499
3513
  type: "line",
3500
3514
  size: [160, 8]
3501
3515
  }
@@ -3535,7 +3549,7 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3535
3549
  /* @__PURE__ */ M(
3536
3550
  ze,
3537
3551
  {
3538
- value: y,
3552
+ value: m,
3539
3553
  onChange: h,
3540
3554
  options: Yn,
3541
3555
  disabled: t,
@@ -3549,22 +3563,22 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3549
3563
  )
3550
3564
  ] }), Wn = ({
3551
3565
  current: t,
3552
- loadIcon: y,
3553
- pageSize: i,
3566
+ loadIcon: m,
3567
+ pageSize: c,
3554
3568
  total: l,
3555
3569
  cachedPages: h,
3556
3570
  loadedCount: q,
3557
3571
  autoLoading: D = !1,
3558
3572
  loadingProgress: I,
3559
3573
  onChange: S,
3560
- onLoadNextPage: w,
3574
+ onLoadNextPage: $,
3561
3575
  onStartAutoLoad: N,
3562
- onStopLoading: b
3576
+ onStopLoading: x
3563
3577
  }) => {
3564
- const [P, C] = ae(5), e = Math.ceil(l / i), r = tt(() => h.length >= e, [h, e]), a = () => Array.from(
3578
+ const [P, C] = ae(5), e = Math.ceil(l / c), r = tt(() => h.length >= e, [h, e]), a = () => Array.from(
3565
3579
  { length: e },
3566
- (_, T) => T + 1
3567
- ).filter((_) => !h.includes(_)).slice(0, P);
3580
+ (A, T) => T + 1
3581
+ ).filter((A) => !h.includes(A)).slice(0, P);
3568
3582
  return /* @__PURE__ */ ie("div", { className: "pagination_footer", children: [
3569
3583
  /* @__PURE__ */ ie("div", { className: "pagination_leftWrap", children: [
3570
3584
  /* @__PURE__ */ ie("span", { className: "pagination_total", children: [
@@ -3583,18 +3597,18 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3583
3597
  !r && /* @__PURE__ */ M(
3584
3598
  jn,
3585
3599
  {
3586
- loadIcon: y || void 0,
3600
+ loadIcon: m || void 0,
3587
3601
  autoLoading: D,
3588
3602
  batchSize: P,
3589
3603
  loadingProgress: I,
3590
- disabled: !w || !N,
3604
+ disabled: !$ || !N,
3591
3605
  onBatchSizeChange: C,
3592
- onLoadNextPage: () => w?.(),
3606
+ onLoadNextPage: () => $?.(),
3593
3607
  onStartAutoLoad: () => {
3594
- const f = a();
3595
- N?.(f);
3608
+ const y = a();
3609
+ N?.(y);
3596
3610
  },
3597
- onStopLoad: () => b?.()
3611
+ onStopLoad: () => x?.()
3598
3612
  }
3599
3613
  )
3600
3614
  ] }),
@@ -3602,24 +3616,24 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3602
3616
  Jt,
3603
3617
  {
3604
3618
  current: t,
3605
- pageSize: i,
3619
+ pageSize: c,
3606
3620
  total: l,
3607
- onChange: (f) => S(f),
3621
+ onChange: (y) => S(y),
3608
3622
  showSizeChanger: !1,
3609
3623
  showQuickJumper: !1,
3610
3624
  showTotal: () => "",
3611
- itemRender: (f, _, T) => {
3612
- const z = h.includes(f);
3613
- return _ === "prev" || _ === "next" || _ === "jump-prev" || _ === "jump-next" ? /* @__PURE__ */ M("div", { className: "pageBox", children: T }) : /* @__PURE__ */ ie(
3625
+ itemRender: (y, A, T) => {
3626
+ const z = h.includes(y);
3627
+ return A === "prev" || A === "next" || A === "jump-prev" || A === "jump-next" ? /* @__PURE__ */ M("div", { className: "pageBox", children: T }) : /* @__PURE__ */ ie(
3614
3628
  "div",
3615
3629
  {
3616
3630
  className: "pageBox",
3617
3631
  style: {
3618
- backgroundColor: t === f ? "#2563EB" : "#f5f5f5",
3619
- color: t === f ? "#fff" : z ? "#171717" : "#a3a3a3"
3632
+ backgroundColor: t === y ? "#2563EB" : "#f5f5f5",
3633
+ color: t === y ? "#fff" : z ? "#171717" : "#a3a3a3"
3620
3634
  },
3621
3635
  children: [
3622
- f,
3636
+ y,
3623
3637
  !z && /* @__PURE__ */ M("span", { className: "unload_spot" })
3624
3638
  ]
3625
3639
  }
@@ -3630,27 +3644,27 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3630
3644
  ] });
3631
3645
  }, Un = (t) => {
3632
3646
  const {
3633
- loading: y,
3634
- autoLoading: i,
3647
+ loading: m,
3648
+ autoLoading: c,
3635
3649
  loadingProgress: l,
3636
3650
  columns: h = [],
3637
3651
  dataSource: q = [],
3638
3652
  total: D,
3639
3653
  current: I,
3640
3654
  pageSize: S,
3641
- cachedPages: w,
3655
+ cachedPages: $,
3642
3656
  onChangePage: N,
3643
- onLoadNextPage: b,
3657
+ onLoadNextPage: x,
3644
3658
  onStartAutoLoad: P,
3645
3659
  onStopLoading: C,
3646
3660
  ...e
3647
3661
  } = t, r = re(null), a = se(
3648
3662
  (p) => {
3649
- N(p), w.includes(p) && r.current?.scrollTo({
3663
+ N(p), $.includes(p) && r.current?.scrollTo({
3650
3664
  key: `${(p - 1) * S + 1}`
3651
3665
  });
3652
3666
  },
3653
- [w, N, S]
3667
+ [$, N, S]
3654
3668
  );
3655
3669
  return /* @__PURE__ */ ie("div", { className: "flex flex-col", children: [
3656
3670
  /* @__PURE__ */ M(
@@ -3667,16 +3681,16 @@ const wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3667
3681
  /* @__PURE__ */ M(
3668
3682
  Wn,
3669
3683
  {
3670
- loading: y,
3671
- autoLoading: i,
3684
+ loading: m,
3685
+ autoLoading: c,
3672
3686
  loadingProgress: l,
3673
3687
  current: I,
3674
3688
  pageSize: S,
3675
3689
  total: D,
3676
3690
  loadedCount: q.length,
3677
- cachedPages: w,
3691
+ cachedPages: $,
3678
3692
  onChange: a,
3679
- onLoadNextPage: b,
3693
+ onLoadNextPage: x,
3680
3694
  onStartAutoLoad: P,
3681
3695
  onStopLoading: C
3682
3696
  }
@@ -3792,51 +3806,51 @@ Un.__docgenInfo = {
3792
3806
  };
3793
3807
  const Kn = ({
3794
3808
  texts: t = [],
3795
- placeholder: y = "请输入内容",
3796
- animationSpeed: i = 100,
3809
+ placeholder: m = "请输入内容",
3810
+ animationSpeed: c = 100,
3797
3811
  autoPlay: l = !0,
3798
3812
  value: h,
3799
3813
  onChange: q,
3800
3814
  ...D
3801
3815
  }) => {
3802
- const [I, S] = ae(""), [w, N] = ae(0), [b, P] = ae(!1), [C, e] = ae(!1), [r, a] = ae(!1), p = re(void 0), f = re(void 0), _ = re(t), T = re(w), z = re(C), Y = re(I);
3816
+ const [I, S] = ae(""), [$, N] = ae(0), [x, P] = ae(!1), [C, e] = ae(!1), [r, a] = ae(!1), p = re(void 0), y = re(void 0), A = re(t), T = re($), z = re(C), Y = re(I);
3803
3817
  de(() => {
3804
- _.current = t, T.current = w, z.current = C, Y.current = I;
3818
+ A.current = t, T.current = $, z.current = C, Y.current = I;
3805
3819
  });
3806
3820
  const j = se((u, d) => {
3807
- let g = 0;
3821
+ let v = 0;
3808
3822
  a(!0);
3809
- const k = () => {
3810
- g < u.length ? (S(u.slice(0, g + 1)), g++, f.current = window.setTimeout(k, i)) : (a(!1), d?.());
3823
+ const E = () => {
3824
+ v < u.length ? (S(u.slice(0, v + 1)), v++, y.current = window.setTimeout(E, c)) : (a(!1), d?.());
3811
3825
  };
3812
- k();
3813
- }, [i]), F = se((u) => {
3826
+ E();
3827
+ }, [c]), F = se((u) => {
3814
3828
  let d = Y.current.length;
3815
- const g = () => {
3816
- d > 0 ? (S(Y.current.slice(0, d - 1)), d--, f.current = window.setTimeout(g, i / 2)) : u?.();
3829
+ const v = () => {
3830
+ d > 0 ? (S(Y.current.slice(0, d - 1)), d--, y.current = window.setTimeout(v, c / 2)) : u?.();
3817
3831
  };
3818
- g();
3819
- }, [i]), n = se(() => {
3820
- if (_.current.length === 0 || z.current) return;
3832
+ v();
3833
+ }, [c]), n = se(() => {
3834
+ if (A.current.length === 0 || z.current) return;
3821
3835
  P(!0);
3822
- const u = _.current[T.current];
3836
+ const u = A.current[T.current];
3823
3837
  Y.current ? F(() => {
3824
3838
  j(u, () => {
3825
3839
  p.current = window.setTimeout(() => {
3826
- N((d) => (d + 1) % _.current.length), P(!1);
3840
+ N((d) => (d + 1) % A.current.length), P(!1);
3827
3841
  }, 2e3);
3828
3842
  });
3829
3843
  }) : j(u, () => {
3830
3844
  p.current = window.setTimeout(() => {
3831
- N((d) => (d + 1) % _.current.length), P(!1);
3845
+ N((d) => (d + 1) % A.current.length), P(!1);
3832
3846
  }, 2e3);
3833
3847
  });
3834
3848
  }, [F, j]);
3835
3849
  return de(() => (l && t.length > 0 && !C && n(), () => {
3836
- p.current && window.clearTimeout(p.current), f.current && window.clearTimeout(f.current);
3837
- }), [w, C, l, t.length, n]), de(() => {
3838
- !b && l && t.length > 0 && !C && n();
3839
- }, [w, b, l, t.length, C, n]), /* @__PURE__ */ ie("div", { style: { position: "relative" }, children: [
3850
+ p.current && window.clearTimeout(p.current), y.current && window.clearTimeout(y.current);
3851
+ }), [$, C, l, t.length, n]), de(() => {
3852
+ !x && l && t.length > 0 && !C && n();
3853
+ }, [$, x, l, t.length, C, n]), /* @__PURE__ */ ie("div", { style: { position: "relative" }, children: [
3840
3854
  /* @__PURE__ */ M(
3841
3855
  kt,
3842
3856
  {
@@ -3846,12 +3860,12 @@ const Kn = ({
3846
3860
  q?.(u.target.value), D.onChange?.(u);
3847
3861
  },
3848
3862
  onFocus: (u) => {
3849
- e(!0), p.current && window.clearTimeout(p.current), f.current && window.clearTimeout(f.current), P(!1), a(!1), D.onFocus?.(u);
3863
+ e(!0), p.current && window.clearTimeout(p.current), y.current && window.clearTimeout(y.current), P(!1), a(!1), D.onFocus?.(u);
3850
3864
  },
3851
3865
  onBlur: (u) => {
3852
3866
  e(!1), !h && t.length > 0 && (S(""), N(0)), D.onBlur?.(u);
3853
3867
  },
3854
- placeholder: C || h ? y : I || y,
3868
+ placeholder: C || h ? m : I || m,
3855
3869
  style: {
3856
3870
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3857
3871
  ...D.style,
@@ -3953,9 +3967,9 @@ Kn.__docgenInfo = {
3953
3967
  const Xn = ({
3954
3968
  texts: t = [],
3955
3969
  // 动态文案数组,默认为空数组
3956
- placeholder: y = "请输入内容",
3970
+ placeholder: m = "请输入内容",
3957
3971
  // 占位符文本
3958
- animationSpeed: i = 100,
3972
+ animationSpeed: c = 100,
3959
3973
  // 打字机动画速度,毫秒
3960
3974
  autoPlay: l = !0,
3961
3975
  // 是否自动播放动画
@@ -3969,66 +3983,66 @@ const Xn = ({
3969
3983
  // 最大字符数限制
3970
3984
  showCount: S = !0,
3971
3985
  // 是否显示字数统计
3972
- submitText: w = "发送",
3986
+ submitText: $ = "发送",
3973
3987
  // 提交按钮文本
3974
3988
  disabled: N = !1,
3975
3989
  // 是否禁用组件
3976
- rows: b = 4,
3990
+ rows: x = 4,
3977
3991
  // 文本域行数
3978
3992
  style: P,
3979
3993
  // 自定义样式
3980
3994
  ...C
3981
3995
  // 其他原生属性
3982
3996
  }) => {
3983
- const [e, r] = ae(""), [a, p] = ae(0), [f, _] = ae(!1), [T, z] = ae(!1), [Y, j] = ae(!1), [F, n] = ae(h || ""), V = re(void 0), x = re(void 0), B = re(t), X = re(a), u = re(T), d = re(e), g = re(null);
3997
+ const [e, r] = ae(""), [a, p] = ae(0), [y, A] = ae(!1), [T, z] = ae(!1), [Y, j] = ae(!1), [F, n] = ae(h || ""), V = re(void 0), w = re(void 0), B = re(t), X = re(a), u = re(T), d = re(e), v = re(null);
3984
3998
  de(() => {
3985
3999
  B.current = t, X.current = a, u.current = T, d.current = e;
3986
4000
  });
3987
- const k = se((ee, ye) => {
4001
+ const E = se((ee, me) => {
3988
4002
  let ge = 0;
3989
4003
  j(!0);
3990
4004
  const he = () => {
3991
- ge < ee.length ? (r(ee.slice(0, ge + 1)), ge++, x.current = window.setTimeout(he, i)) : (j(!1), ye?.());
4005
+ ge < ee.length ? (r(ee.slice(0, ge + 1)), ge++, w.current = window.setTimeout(he, c)) : (j(!1), me?.());
3992
4006
  };
3993
4007
  he();
3994
- }, [i]), L = se((ee) => {
3995
- let ye = d.current.length;
4008
+ }, [c]), L = se((ee) => {
4009
+ let me = d.current.length;
3996
4010
  const ge = () => {
3997
- ye > 0 ? (r(d.current.slice(0, ye - 1)), ye--, x.current = window.setTimeout(ge, i / 2)) : ee?.();
4011
+ me > 0 ? (r(d.current.slice(0, me - 1)), me--, w.current = window.setTimeout(ge, c / 2)) : ee?.();
3998
4012
  };
3999
4013
  ge();
4000
- }, [i]), W = se(() => {
4014
+ }, [c]), W = se(() => {
4001
4015
  if (B.current.length === 0 || u.current) return;
4002
- _(!0);
4016
+ A(!0);
4003
4017
  const ee = B.current[X.current];
4004
4018
  d.current ? L(() => {
4005
- k(ee, () => {
4019
+ E(ee, () => {
4006
4020
  V.current = window.setTimeout(() => {
4007
- p((ye) => (ye + 1) % B.current.length), _(!1);
4021
+ p((me) => (me + 1) % B.current.length), A(!1);
4008
4022
  }, 2e3);
4009
4023
  });
4010
- }) : k(ee, () => {
4024
+ }) : E(ee, () => {
4011
4025
  V.current = window.setTimeout(() => {
4012
- p((ye) => (ye + 1) % B.current.length), _(!1);
4026
+ p((me) => (me + 1) % B.current.length), A(!1);
4013
4027
  }, 2e3);
4014
4028
  });
4015
- }, [L, k]);
4029
+ }, [L, E]);
4016
4030
  de(() => (l && t.length > 0 && !T && W(), () => {
4017
- V.current && window.clearTimeout(V.current), x.current && window.clearTimeout(x.current);
4031
+ V.current && window.clearTimeout(V.current), w.current && window.clearTimeout(w.current);
4018
4032
  }), [a, T, l, t.length, W]), de(() => {
4019
- !f && l && t.length > 0 && !T && W();
4020
- }, [a, f, l, t.length, T, W]);
4033
+ !y && l && t.length > 0 && !T && W();
4034
+ }, [a, y, l, t.length, T, W]);
4021
4035
  const U = (ee) => {
4022
- z(!0), V.current && window.clearTimeout(V.current), x.current && window.clearTimeout(x.current), _(!1), j(!1), C.onFocus?.(ee);
4023
- }, Q = (ee) => {
4036
+ z(!0), V.current && window.clearTimeout(V.current), w.current && window.clearTimeout(w.current), A(!1), j(!1), C.onFocus?.(ee);
4037
+ }, Z = (ee) => {
4024
4038
  z(!1), !h && t.length > 0 && (r(""), p(0)), C.onBlur?.(ee);
4025
4039
  }, oe = (ee) => {
4026
- const ye = ee.target.value;
4027
- I && ye.length > I || (q ? q(ye) : n(ye), C.onChange?.(ee));
4040
+ const me = ee.target.value;
4041
+ I && me.length > I || (q ? q(me) : n(me), C.onChange?.(ee));
4028
4042
  }, ue = () => {
4029
4043
  const ee = q ? h : F;
4030
4044
  ee.trim() && !N && (D?.(ee), q || n(""));
4031
- }, me = (ee) => {
4045
+ }, ye = (ee) => {
4032
4046
  (ee.ctrlKey || ee.metaKey) && ee.key === "Enter" && (ee.preventDefault(), ue()), C.onKeyDown?.(ee);
4033
4047
  }, pe = q ? h : F, we = N || !pe.trim() || (I ? pe.length > I : !1);
4034
4048
  return /* @__PURE__ */ ie("div", { style: { position: "relative", ...P }, children: [
@@ -4036,23 +4050,23 @@ const Xn = ({
4036
4050
  /* @__PURE__ */ M(
4037
4051
  "textarea",
4038
4052
  {
4039
- ref: g,
4053
+ ref: v,
4040
4054
  value: q ? h : F,
4041
4055
  onChange: oe,
4042
4056
  onFocus: (ee) => {
4043
4057
  ee.target.style.borderColor = "#1890ff", ee.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", U(ee);
4044
4058
  },
4045
4059
  onBlur: (ee) => {
4046
- ee.target.style.borderColor = "#d9d9d9", ee.target.style.boxShadow = "none", Q(ee);
4060
+ ee.target.style.borderColor = "#d9d9d9", ee.target.style.boxShadow = "none", Z(ee);
4047
4061
  },
4048
- onKeyDown: me,
4049
- placeholder: T || pe ? y : "",
4062
+ onKeyDown: ye,
4063
+ placeholder: T || pe ? m : "",
4050
4064
  maxLength: I,
4051
- rows: b,
4065
+ rows: x,
4052
4066
  disabled: N,
4053
4067
  style: {
4054
4068
  width: "100%",
4055
- minHeight: `${b * 24 + 16}px`,
4069
+ minHeight: `${x * 24 + 16}px`,
4056
4070
  padding: "8px 60px 8px 12px",
4057
4071
  // 右侧留出按钮空间
4058
4072
  border: "1px solid #d9d9d9",
@@ -4134,7 +4148,7 @@ const Xn = ({
4134
4148
  alignItems: "center",
4135
4149
  justifyContent: "center"
4136
4150
  },
4137
- children: w
4151
+ children: $
4138
4152
  }
4139
4153
  )
4140
4154
  }
@@ -4252,8 +4266,8 @@ Xn.__docgenInfo = {
4252
4266
  };
4253
4267
  const Ct = ({
4254
4268
  src: t,
4255
- poster: y,
4256
- width: i = 300,
4269
+ poster: m,
4270
+ width: c = 300,
4257
4271
  height: l,
4258
4272
  videoWidth: h,
4259
4273
  // 参数保留但不使用,由CSS控制
@@ -4262,34 +4276,34 @@ const Ct = ({
4262
4276
  showPlayButton: D = !0,
4263
4277
  autoPlayOnHover: I = !0,
4264
4278
  onClick: S,
4265
- onVideoLoaded: w,
4279
+ onVideoLoaded: $,
4266
4280
  onVideoPlay: N,
4267
- onVideoPause: b,
4281
+ onVideoPause: x,
4268
4282
  onVideoEnded: P,
4269
4283
  className: C,
4270
4284
  style: e,
4271
4285
  ...r
4272
4286
  }) => {
4273
- const a = re(null), [p, f] = ae(!1), [_, T] = ae(!1), [z, Y] = ae(!1), j = se(() => {
4274
- a.current && (a.current.play(), f(!0), N?.());
4287
+ const a = re(null), [p, y] = ae(!1), [A, T] = ae(!1), [z, Y] = ae(!1), j = se(() => {
4288
+ a.current && (a.current.play(), y(!0), N?.());
4275
4289
  }, [N]), F = se(() => {
4276
- a.current && (a.current.pause(), f(!1), b?.());
4277
- }, [b]), n = se((k) => {
4278
- k.stopPropagation(), p ? F() : j();
4290
+ a.current && (a.current.pause(), y(!1), x?.());
4291
+ }, [x]), n = se((E) => {
4292
+ E.stopPropagation(), p ? F() : j();
4279
4293
  }, [p, j, F]), V = se(() => {
4280
4294
  T(!0), I && !p && j();
4281
- }, [I, p, j]), x = se(() => {
4295
+ }, [I, p, j]), w = se(() => {
4282
4296
  T(!1), I && p && F();
4283
4297
  }, [I, p, F]), B = se(() => {
4284
- Y(!0), w?.();
4285
- }, [w]), X = se(() => {
4286
- f(!0), N?.();
4298
+ Y(!0), $?.();
4299
+ }, [$]), X = se(() => {
4300
+ y(!0), N?.();
4287
4301
  }, [N]), u = se(() => {
4288
- f(!1), b?.();
4289
- }, [b]), d = se(() => {
4290
- f(!1), P?.();
4291
- }, [P]), g = se((k) => {
4292
- S?.(k);
4302
+ y(!1), x?.();
4303
+ }, [x]), d = se(() => {
4304
+ y(!1), P?.();
4305
+ }, [P]), v = se((E) => {
4306
+ S?.(E);
4293
4307
  }, [S]);
4294
4308
  return /* @__PURE__ */ M(
4295
4309
  nt,
@@ -4297,7 +4311,7 @@ const Ct = ({
4297
4311
  ...r,
4298
4312
  className: `video-card ${C || ""}`,
4299
4313
  style: {
4300
- width: i,
4314
+ width: c,
4301
4315
  height: l,
4302
4316
  padding: 0,
4303
4317
  overflow: "hidden",
@@ -4308,15 +4322,15 @@ const Ct = ({
4308
4322
  },
4309
4323
  bordered: !1,
4310
4324
  onMouseEnter: V,
4311
- onMouseLeave: x,
4312
- onClick: g,
4325
+ onMouseLeave: w,
4326
+ onClick: v,
4313
4327
  children: /* @__PURE__ */ ie("div", { className: "video-card-container", children: [
4314
4328
  /* @__PURE__ */ M(
4315
4329
  "video",
4316
4330
  {
4317
4331
  ref: a,
4318
4332
  src: t,
4319
- poster: y,
4333
+ poster: m,
4320
4334
  preload: "metadata",
4321
4335
  onLoadedData: B,
4322
4336
  onPlay: X,
@@ -4329,7 +4343,7 @@ const Ct = ({
4329
4343
  D && /* @__PURE__ */ M(
4330
4344
  "div",
4331
4345
  {
4332
- className: `video-play-button ${_ ? "hovered" : ""}`,
4346
+ className: `video-play-button ${A ? "hovered" : ""}`,
4333
4347
  onClick: n,
4334
4348
  children: p ? /* @__PURE__ */ M(on, { className: "play-icon" }) : /* @__PURE__ */ M(sn, { className: "play-icon" })
4335
4349
  }
@@ -4440,10 +4454,10 @@ Ct.__docgenInfo = {
4440
4454
  }
4441
4455
  }
4442
4456
  };
4443
- const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((i) => t.toLowerCase().includes(i)), Qn = (t) => t.type ? t.type : Jn(t.url) ? "video" : "image", Zn = ({
4457
+ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((c) => t.toLowerCase().includes(c)), Qn = (t) => t.type ? t.type : Jn(t.url) ? "video" : "image", Zn = ({
4444
4458
  items: t,
4445
- columns: y,
4446
- gap: i = 0,
4459
+ columns: m,
4460
+ gap: c = 0,
4447
4461
  responsive: l = !0,
4448
4462
  breakpoints: h = {
4449
4463
  xs: 1,
@@ -4457,36 +4471,36 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4457
4471
  style: D,
4458
4472
  onClick: I
4459
4473
  }) => {
4460
- const S = re(null), [w, N] = ae(y || h.md || 3), b = re(/* @__PURE__ */ new Map()), P = se(() => {
4461
- if (!l || y)
4462
- return y || h.md || 3;
4474
+ const S = re(null), [$, N] = ae(m || h.md || 3), x = re(/* @__PURE__ */ new Map()), P = se(() => {
4475
+ if (!l || m)
4476
+ return m || h.md || 3;
4463
4477
  const a = window.innerWidth;
4464
4478
  return a < 576 ? h.xs || 1 : a < 768 ? h.sm || 2 : a < 992 ? h.md || 3 : a < 1200 ? h.lg || 4 : a < 1600 ? h.xl || 5 : h.xxl || 6;
4465
- }, [l, y, h]), C = se(() => {
4479
+ }, [l, m, h]), C = se(() => {
4466
4480
  if (!S.current) return;
4467
- const a = w, p = S.current, _ = (p.offsetWidth - i * (a - 1)) / a, T = new Array(a).fill(0);
4481
+ const a = $, p = S.current, A = (p.offsetWidth - c * (a - 1)) / a, T = new Array(a).fill(0);
4468
4482
  t.forEach((Y, j) => {
4469
- const F = Y.id || j, n = b.current.get(F);
4483
+ const F = Y.id || j, n = x.current.get(F);
4470
4484
  if (!n) return;
4471
- const V = Math.min(...T), x = T.indexOf(V), B = x * (_ + i), X = T[x];
4472
- n.style.position = "absolute", n.style.left = `${B}px`, n.style.top = `${X}px`, n.style.width = `${_}px`, T[x] += n.offsetHeight + i;
4485
+ const V = Math.min(...T), w = T.indexOf(V), B = w * (A + c), X = T[w];
4486
+ n.style.position = "absolute", n.style.left = `${B}px`, n.style.top = `${X}px`, n.style.width = `${A}px`, T[w] += n.offsetHeight + c;
4473
4487
  });
4474
4488
  const z = Math.max(...T);
4475
4489
  p.style.height = `${z}px`;
4476
- }, [t, w, i]);
4490
+ }, [t, $, c]);
4477
4491
  de(() => {
4478
4492
  const a = () => {
4479
4493
  const p = P();
4480
- p !== w && N(p);
4494
+ p !== $ && N(p);
4481
4495
  };
4482
4496
  if (l)
4483
4497
  return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
4484
- }, [l, P, w]), de(() => {
4498
+ }, [l, P, $]), de(() => {
4485
4499
  const a = setTimeout(() => {
4486
4500
  C();
4487
4501
  }, 100);
4488
4502
  return () => clearTimeout(a);
4489
- }, [t, w, C]);
4503
+ }, [t, $, C]);
4490
4504
  const e = se(() => {
4491
4505
  C();
4492
4506
  }, [C]), r = se((a) => {
@@ -4503,15 +4517,15 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4503
4517
  ...D
4504
4518
  },
4505
4519
  children: t.map((a, p) => {
4506
- const f = a.id || p, _ = Qn(a);
4520
+ const y = a.id || p, A = Qn(a);
4507
4521
  return /* @__PURE__ */ M(
4508
4522
  "div",
4509
4523
  {
4510
4524
  ref: (T) => {
4511
- T ? b.current.set(f, T) : b.current.delete(f);
4525
+ T ? x.current.set(y, T) : x.current.delete(y);
4512
4526
  },
4513
4527
  className: "waterfall-item",
4514
- children: _ === "video" ? /* @__PURE__ */ M("div", { style: {
4528
+ children: A === "video" ? /* @__PURE__ */ M("div", { style: {
4515
4529
  width: "100%",
4516
4530
  position: "relative",
4517
4531
  paddingBottom: "56.25%",
@@ -4548,7 +4562,7 @@ const Jn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4548
4562
  }
4549
4563
  )
4550
4564
  },
4551
- f
4565
+ y
4552
4566
  );
4553
4567
  })
4554
4568
  }
@@ -4679,12 +4693,12 @@ const sr = {
4679
4693
  export {
4680
4694
  vn as AdvancedTable,
4681
4695
  un as AppModal,
4682
- yn as BackButton,
4696
+ mn as BackButton,
4683
4697
  ln as Button,
4684
4698
  cn as Card,
4685
4699
  Kn as DynamicInput,
4686
4700
  Xn as DynamicTextArea,
4687
- mn as EmptyAndSpin,
4701
+ yn as EmptyAndSpin,
4688
4702
  hn as LinkButton,
4689
4703
  dn as PageTable,
4690
4704
  zn as RichTextEditor,