bi-components-library 1.0.29 → 1.0.30

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
@@ -1,19 +1,19 @@
1
- import { jsx as E, jsxs as Z, Fragment as Ze } from "react/jsx-runtime";
2
- import { useState as ne, useRef as Q, useMemo as Ye, useCallback as ae, useEffect as de, useLayoutEffect as ze } from "react";
3
- import { Button as $e, Card as Oe, Modal as et, Table as Re, Flex as We, Spin as tt, Empty as nt, Select as Ge, Form as _e, Input as Ke, Space as at, DatePicker as rt, Dropdown as ot, Tooltip as st, Progress as it, Pagination as lt, theme as ct } from "antd";
4
- import { createFromIconfontCN as ut, LeftOutlined as dt, SearchOutlined as pt, ReloadOutlined as ft, InfoCircleOutlined as yt, SendOutlined as mt, PauseCircleOutlined as ht, PlayCircleOutlined as gt } from "@ant-design/icons";
5
- import { createPortal as Xe } from "react-dom";
6
- const vt = ({
1
+ import { jsx as $, jsxs as Z, Fragment as st } from "react/jsx-runtime";
2
+ import { useState as ne, useRef as Q, useMemo as Ze, useCallback as ae, useEffect as de, useLayoutEffect as je } from "react";
3
+ import { Button as $e, Card as Re, Modal as lt, Table as Ge, Flex as We, Spin as it, Empty as ct, Select as Fe, Form as De, Input as et, Space as ut, DatePicker as dt, Dropdown as pt, Tooltip as ft, Progress as yt, Pagination as mt, theme as ht } from "antd";
4
+ import { createFromIconfontCN as gt, LeftOutlined as vt, SearchOutlined as bt, ReloadOutlined as xt, InfoCircleOutlined as kt, SendOutlined as wt, PauseCircleOutlined as Et, PlayCircleOutlined as $t } from "@ant-design/icons";
5
+ import { createPortal as tt } from "react-dom";
6
+ const Ct = ({
7
7
  variant: t = "primary",
8
- loading: x = !1,
9
- children: d,
10
- ...i
11
- }) => /* @__PURE__ */ E(
8
+ loading: c = !1,
9
+ children: l,
10
+ ...s
11
+ }) => /* @__PURE__ */ $(
12
12
  $e,
13
13
  {
14
- ...i,
15
- type: ((T) => {
16
- switch (T) {
14
+ ...s,
15
+ type: ((C) => {
16
+ switch (C) {
17
17
  case "primary":
18
18
  return "primary";
19
19
  case "ghost":
@@ -28,12 +28,12 @@ const vt = ({
28
28
  return "primary";
29
29
  }
30
30
  })(t),
31
- loading: x,
31
+ loading: c,
32
32
  ghost: t === "ghost",
33
- children: d
33
+ children: l
34
34
  }
35
35
  );
36
- vt.__docgenInfo = {
36
+ Ct.__docgenInfo = {
37
37
  displayName: "Button",
38
38
  description: "基础按钮,用于触发操作",
39
39
  props: {
@@ -77,25 +77,25 @@ vt.__docgenInfo = {
77
77
  }
78
78
  }
79
79
  };
80
- const bt = ({
80
+ const St = ({
81
81
  title: t,
82
- children: x,
83
- bordered: d = !0,
84
- hoverable: i = !1,
82
+ children: c,
83
+ bordered: l = !0,
84
+ hoverable: s = !1,
85
85
  size: u = "default",
86
- ...T
87
- }) => /* @__PURE__ */ E(
88
- Oe,
86
+ ...C
87
+ }) => /* @__PURE__ */ $(
88
+ Re,
89
89
  {
90
- ...T,
90
+ ...C,
91
91
  title: t,
92
- bordered: d,
93
- hoverable: i,
92
+ bordered: l,
93
+ hoverable: s,
94
94
  size: u,
95
- children: x
95
+ children: c
96
96
  }
97
97
  );
98
- bt.__docgenInfo = {
98
+ St.__docgenInfo = {
99
99
  displayName: "Card",
100
100
  description: "卡片容器,用于分组内容",
101
101
  props: {
@@ -146,23 +146,23 @@ bt.__docgenInfo = {
146
146
  }
147
147
  }
148
148
  };
149
- const xt = ({
149
+ const Tt = ({
150
150
  showDefaultFooter: t = !0,
151
- ...x
151
+ ...c
152
152
  }) => {
153
- const d = x.footer !== void 0 ? x.footer : t ? (i, { OkBtn: u, CancelBtn: T }) => /* @__PURE__ */ Z(Ze, { children: [
154
- /* @__PURE__ */ E(u, {}),
155
- /* @__PURE__ */ E(T, {})
153
+ const l = c.footer !== void 0 ? c.footer : t ? (s, { OkBtn: u, CancelBtn: C }) => /* @__PURE__ */ Z(st, { children: [
154
+ /* @__PURE__ */ $(u, {}),
155
+ /* @__PURE__ */ $(C, {})
156
156
  ] }) : null;
157
- return /* @__PURE__ */ E(
158
- et,
157
+ return /* @__PURE__ */ $(
158
+ lt,
159
159
  {
160
- ...x,
161
- footer: d
160
+ ...c,
161
+ footer: l
162
162
  }
163
163
  );
164
164
  };
165
- xt.__docgenInfo = {
165
+ Tt.__docgenInfo = {
166
166
  displayName: "AppModal",
167
167
  description: "应用级模态框组件,基于 Ant Design Modal 封装",
168
168
  props: {
@@ -223,29 +223,29 @@ xt.__docgenInfo = {
223
223
  }
224
224
  }
225
225
  };
226
- const kt = ({
226
+ const qt = ({
227
227
  scrollX: t,
228
- showPagination: x = !0,
229
- defaultPageSize: d = 10,
230
- ...i
231
- }) => /* @__PURE__ */ E(
232
- Re,
228
+ showPagination: c = !0,
229
+ defaultPageSize: l = 10,
230
+ ...s
231
+ }) => /* @__PURE__ */ $(
232
+ Ge,
233
233
  {
234
- ...i,
234
+ ...s,
235
235
  scroll: {
236
236
  x: t || "max-content",
237
237
  y: "50vh"
238
238
  },
239
- pagination: x ? {
239
+ pagination: c ? {
240
240
  hideOnSinglePage: !0,
241
241
  showSizeChanger: !0,
242
242
  showQuickJumper: !0,
243
- defaultPageSize: d,
244
- ...i.pagination
243
+ defaultPageSize: l,
244
+ ...s.pagination
245
245
  } : !1
246
246
  }
247
247
  );
248
- kt.__docgenInfo = {
248
+ qt.__docgenInfo = {
249
249
  displayName: "PageTable",
250
250
  description: "页面级表格组件,高度铺满容器,自动滚动",
251
251
  props: {
@@ -295,30 +295,30 @@ kt.__docgenInfo = {
295
295
  }
296
296
  }
297
297
  };
298
- const wt = ut({
298
+ const Nt = gt({
299
299
  scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
300
- }), Et = ({
300
+ }), At = ({
301
301
  name: t,
302
- size: x,
303
- color: d,
304
- style: i,
302
+ size: c,
303
+ color: l,
304
+ style: s,
305
305
  ...u
306
306
  }) => {
307
- const T = {
308
- fontSize: x,
309
- color: d,
310
- ...i
307
+ const C = {
308
+ fontSize: c,
309
+ color: l,
310
+ ...s
311
311
  };
312
- return /* @__PURE__ */ E(
313
- wt,
312
+ return /* @__PURE__ */ $(
313
+ Nt,
314
314
  {
315
315
  ...u,
316
316
  type: t,
317
- style: T
317
+ style: C
318
318
  }
319
319
  );
320
320
  };
321
- Et.__docgenInfo = {
321
+ At.__docgenInfo = {
322
322
  displayName: "XcIcon",
323
323
  description: "自定义图标组件,基于 iconfont",
324
324
  props: {
@@ -354,43 +354,43 @@ Et.__docgenInfo = {
354
354
  }
355
355
  }
356
356
  };
357
- const $t = ({
357
+ const _t = ({
358
358
  loading: t,
359
- description: x = "暂无数据",
360
- className: d,
361
- emptyChildren: i,
359
+ description: c = "暂无数据",
360
+ className: l,
361
+ emptyChildren: s,
362
362
  loadingText: u,
363
- emptyImage: T
363
+ emptyImage: C
364
364
  }) => t ? /* @__PURE__ */ Z(
365
365
  We,
366
366
  {
367
- className: `pt-10 w-full ${d || ""}`,
367
+ className: `pt-10 w-full ${l || ""}`,
368
368
  align: "center",
369
369
  justify: "center",
370
370
  vertical: !0,
371
371
  children: [
372
- /* @__PURE__ */ E(tt, { size: "large" }),
373
- u && /* @__PURE__ */ E("div", { className: "mt-4 text-gray-500", children: u })
372
+ /* @__PURE__ */ $(it, { size: "large" }),
373
+ u && /* @__PURE__ */ $("div", { className: "mt-4 text-gray-500", children: u })
374
374
  ]
375
375
  }
376
- ) : /* @__PURE__ */ E(
376
+ ) : /* @__PURE__ */ $(
377
377
  We,
378
378
  {
379
- className: `pt-10 w-full ${d || ""}`,
379
+ className: `pt-10 w-full ${l || ""}`,
380
380
  align: "center",
381
381
  justify: "center",
382
- children: /* @__PURE__ */ E(
383
- nt,
382
+ children: /* @__PURE__ */ $(
383
+ ct,
384
384
  {
385
- image: T,
386
- description: x,
385
+ image: C,
386
+ description: c,
387
387
  imageStyle: { height: 180 },
388
- children: i
388
+ children: s
389
389
  }
390
390
  )
391
391
  }
392
392
  );
393
- $t.__docgenInfo = {
393
+ _t.__docgenInfo = {
394
394
  displayName: "EmptyAndSpin",
395
395
  description: "空状态和加载状态组合组件",
396
396
  props: {
@@ -433,24 +433,24 @@ $t.__docgenInfo = {
433
433
  }
434
434
  }
435
435
  };
436
- const Ct = ({
436
+ const Lt = ({
437
437
  onClick: t,
438
- showText: x = !1,
439
- className: d,
440
- size: i = "small",
438
+ showText: c = !1,
439
+ className: l,
440
+ size: s = "small",
441
441
  type: u = "default"
442
- }) => /* @__PURE__ */ E(
442
+ }) => /* @__PURE__ */ $(
443
443
  $e,
444
444
  {
445
- size: i,
445
+ size: s,
446
446
  type: u,
447
- icon: /* @__PURE__ */ E(dt, {}),
448
- className: `cursor-pointer ${d || ""}`,
447
+ icon: /* @__PURE__ */ $(vt, {}),
448
+ className: `cursor-pointer ${l || ""}`,
449
449
  onClick: t,
450
- children: x && "返回"
450
+ children: c && "返回"
451
451
  }
452
452
  );
453
- Ct.__docgenInfo = {
453
+ Lt.__docgenInfo = {
454
454
  displayName: "BackButton",
455
455
  description: "返回按钮组件",
456
456
  props: {
@@ -489,23 +489,23 @@ Ct.__docgenInfo = {
489
489
  }
490
490
  }
491
491
  };
492
- const Tt = ({
492
+ const Dt = ({
493
493
  removePadding: t = !0,
494
- className: x,
495
- ...d
494
+ className: c,
495
+ ...l
496
496
  }) => {
497
- const i = t ? `px-0 h-auto ${x || ""}` : x;
498
- return /* @__PURE__ */ E(
497
+ const s = t ? `px-0 h-auto ${c || ""}` : c;
498
+ return /* @__PURE__ */ $(
499
499
  $e,
500
500
  {
501
501
  type: "link",
502
- ...d,
503
- className: i,
504
- children: d.children
502
+ ...l,
503
+ className: s,
504
+ children: l.children
505
505
  }
506
506
  );
507
507
  };
508
- Tt.__docgenInfo = {
508
+ Dt.__docgenInfo = {
509
509
  displayName: "LinkButton",
510
510
  description: "链接样式按钮组件,适用于表格操作列",
511
511
  props: {
@@ -542,121 +542,121 @@ Tt.__docgenInfo = {
542
542
  }
543
543
  }
544
544
  };
545
- const { Option: qt } = Ge, Nt = ({
545
+ const { Option: Mt } = Fe, It = ({
546
546
  columns: t,
547
- request: x,
548
- searchFields: d = [],
549
- showSearch: i = !0,
547
+ request: c,
548
+ searchFields: l = [],
549
+ showSearch: s = !0,
550
550
  showRefresh: u = !0,
551
- defaultPageSize: T = 10,
552
- pageSizeOptions: I = ["10", "20", "50", "100"],
553
- autoLoad: $ = !0,
554
- externalParams: w = {},
551
+ defaultPageSize: C = 10,
552
+ pageSizeOptions: T = ["10", "20", "50", "100"],
553
+ autoLoad: w = !0,
554
+ externalParams: k = {},
555
555
  ...e
556
556
  }) => {
557
- const [q, f] = ne([]), [s, r] = ne(!1), [n, o] = ne({
557
+ const [q, y] = ne([]), [i, r] = ne(!1), [n, o] = ne({
558
558
  current: 1,
559
- pageSize: T,
559
+ pageSize: C,
560
560
  total: 0
561
- }), [a, p] = ne({}), [y, g] = ne({}), [b] = _e.useForm(), V = Q(n);
561
+ }), [a, f] = ne({}), [m, v] = ne({}), [x] = De.useForm(), V = Q(n);
562
562
  V.current = n;
563
- const k = Q(w);
564
- k.current = w;
565
- const P = Q(!1), H = Ye(() => t.map((l) => {
566
- const { sortable: c, render: v, ...L } = l;
563
+ const E = Q(k);
564
+ E.current = k;
565
+ const B = Q(!1), G = Ze(() => t.map((d) => {
566
+ const { sortable: p, render: b, ...L } = d;
567
567
  return {
568
568
  ...L,
569
- sorter: c ? !0 : void 0,
570
- render: v || ((N) => N)
569
+ sorter: p ? !0 : void 0,
570
+ render: b || ((N) => N)
571
571
  };
572
- }), [t]), F = ae(async (l = {}) => {
573
- if (x) {
572
+ }), [t]), F = ae(async (d = {}) => {
573
+ if (c) {
574
574
  r(!0);
575
575
  try {
576
- const c = {
576
+ const p = {
577
577
  page: V.current.current,
578
578
  pageSize: V.current.pageSize,
579
- sortField: y.field,
580
- sortOrder: y.order,
581
- searchParams: { ...a, ...k.current },
582
- ...l
583
- }, v = await x(c);
584
- v.success && (f(v.data), o((L) => ({
579
+ sortField: m.field,
580
+ sortOrder: m.order,
581
+ searchParams: { ...a, ...E.current },
582
+ ...d
583
+ }, b = await c(p);
584
+ b.success && (y(b.data), o((L) => ({
585
585
  ...L,
586
- total: v.total,
587
- current: c.page || L.current
586
+ total: b.total,
587
+ current: p.page || L.current
588
588
  })));
589
- } catch (c) {
590
- console.error("加载数据失败:", c);
589
+ } catch (p) {
590
+ console.error("加载数据失败:", p);
591
591
  } finally {
592
592
  r(!1);
593
593
  }
594
594
  }
595
- }, [x, y, a]), U = ae((l) => {
596
- p(l), o((c) => ({ ...c, current: 1 }));
597
- }, []), R = ae(() => {
598
- b.resetFields(), p({}), o((l) => ({ ...l, current: 1 }));
599
- }, [b]), ee = ae(() => {
595
+ }, [c, m, a]), W = ae((d) => {
596
+ f(d), o((p) => ({ ...p, current: 1 }));
597
+ }, []), H = ae(() => {
598
+ x.resetFields(), f({}), o((d) => ({ ...d, current: 1 }));
599
+ }, [x]), ee = ae(() => {
600
600
  F();
601
- }, [F]), re = ae((l, c, v) => {
601
+ }, [F]), re = ae((d, p, b) => {
602
602
  const L = {
603
- current: l.current || 1,
604
- pageSize: l.pageSize || T,
605
- total: l.total || 0
603
+ current: d.current || 1,
604
+ pageSize: d.pageSize || C,
605
+ total: d.total || 0
606
606
  }, N = {
607
- field: v?.field,
608
- order: v?.order
607
+ field: b?.field,
608
+ order: b?.order
609
609
  };
610
- o(L), g(N);
611
- }, [T]);
610
+ o(L), v(N);
611
+ }, [C]);
612
612
  return de(() => {
613
- const l = Object.keys(w).length > 0;
614
- ($ && !P.current || l) && (F(), P.current = !0);
615
- }, [$, w, F]), /* @__PURE__ */ Z("div", { children: [
616
- i && d.length > 0 && /* @__PURE__ */ E(Oe, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ Z(
617
- _e,
613
+ const d = Object.keys(k).length > 0;
614
+ (w && !B.current || d) && (F(), B.current = !0);
615
+ }, [w, k, F]), /* @__PURE__ */ Z("div", { children: [
616
+ s && l.length > 0 && /* @__PURE__ */ $(Re, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ Z(
617
+ De,
618
618
  {
619
- form: b,
619
+ form: x,
620
620
  layout: "inline",
621
- onFinish: U,
622
- initialValues: d.reduce((l, c) => (c.defaultValue !== void 0 && (l[c.key] = c.defaultValue), l), {}),
621
+ onFinish: W,
622
+ initialValues: l.reduce((d, p) => (p.defaultValue !== void 0 && (d[p.key] = p.defaultValue), d), {}),
623
623
  children: [
624
- d.map((l) => /* @__PURE__ */ E(_e.Item, { name: l.key, label: l.label, children: l.type === "input" ? /* @__PURE__ */ E(
625
- Ke,
624
+ l.map((d) => /* @__PURE__ */ $(De.Item, { name: d.key, label: d.label, children: d.type === "input" ? /* @__PURE__ */ $(
625
+ et,
626
626
  {
627
- placeholder: l.placeholder || `请输入${l.label}`,
627
+ placeholder: d.placeholder || `请输入${d.label}`,
628
628
  style: { width: 200 }
629
629
  }
630
- ) : /* @__PURE__ */ E(
631
- Ge,
630
+ ) : /* @__PURE__ */ $(
631
+ Fe,
632
632
  {
633
- placeholder: l.placeholder || `请选择${l.label}`,
633
+ placeholder: d.placeholder || `请选择${d.label}`,
634
634
  style: { width: 200 },
635
635
  allowClear: !0,
636
- children: l.options?.map((c) => /* @__PURE__ */ E(qt, { value: c.value, children: c.label }, c.value))
636
+ children: d.options?.map((p) => /* @__PURE__ */ $(Mt, { value: p.value, children: p.label }, p.value))
637
637
  }
638
- ) }, l.key)),
639
- /* @__PURE__ */ E(_e.Item, { children: /* @__PURE__ */ Z(at, { children: [
640
- /* @__PURE__ */ E($e, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ E(pt, {}), children: "查询" }),
641
- /* @__PURE__ */ E($e, { onClick: R, children: "重置" }),
642
- u && /* @__PURE__ */ E($e, { icon: /* @__PURE__ */ E(ft, {}), onClick: ee, children: "刷新" })
638
+ ) }, d.key)),
639
+ /* @__PURE__ */ $(De.Item, { children: /* @__PURE__ */ Z(ut, { children: [
640
+ /* @__PURE__ */ $($e, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ $(bt, {}), children: "查询" }),
641
+ /* @__PURE__ */ $($e, { onClick: H, children: "重置" }),
642
+ u && /* @__PURE__ */ $($e, { icon: /* @__PURE__ */ $(xt, {}), onClick: ee, children: "刷新" })
643
643
  ] }) })
644
644
  ]
645
645
  }
646
646
  ) }),
647
- /* @__PURE__ */ E(
648
- Re,
647
+ /* @__PURE__ */ $(
648
+ Ge,
649
649
  {
650
650
  ...e,
651
- columns: H,
651
+ columns: G,
652
652
  dataSource: q,
653
- loading: s,
653
+ loading: i,
654
654
  pagination: {
655
655
  ...n,
656
656
  showSizeChanger: !0,
657
657
  showQuickJumper: !0,
658
- showTotal: (l, c) => `第 ${c[0]}-${c[1]} 条/共 ${l} 条`,
659
- pageSizeOptions: I
658
+ showTotal: (d, p) => `第 ${p[0]}-${p[1]} 条/共 ${d} 条`,
659
+ pageSizeOptions: T
660
660
  },
661
661
  onChange: re,
662
662
  scroll: { x: "max-content", y: "50vh" }
@@ -664,7 +664,7 @@ const { Option: qt } = Ge, Nt = ({
664
664
  )
665
665
  ] });
666
666
  };
667
- Nt.__docgenInfo = {
667
+ It.__docgenInfo = {
668
668
  displayName: "AdvancedTable",
669
669
  description: "高阶表格组件,支持异步请求、搜索、排序等功能",
670
670
  props: {
@@ -731,71 +731,71 @@ Nt.__docgenInfo = {
731
731
  }
732
732
  }
733
733
  };
734
- function Be(t, x, d) {
734
+ function Oe(t, c, l) {
735
735
  if (!t.current) return;
736
- const i = /* @__PURE__ */ new Set(), u = {};
737
- for (const f of x)
738
- f.exclusionGroup && f.exclusionGroup !== "separator" && (i.add(f.exclusionGroup), u[f.exclusionGroup] || (u[f.exclusionGroup] = []), u[f.exclusionGroup].push({
739
- type: f.type,
740
- key: f.key,
741
- exclusionGroup: f.exclusionGroup
736
+ const s = /* @__PURE__ */ new Set(), u = {};
737
+ for (const y of c)
738
+ y.exclusionGroup && y.exclusionGroup !== "separator" && (s.add(y.exclusionGroup), u[y.exclusionGroup] || (u[y.exclusionGroup] = []), u[y.exclusionGroup].push({
739
+ type: y.type,
740
+ key: y.key,
741
+ exclusionGroup: y.exclusionGroup
742
742
  }));
743
- const T = {};
744
- for (const f of i) {
745
- T[f] = !1;
746
- for (const s of u[f])
747
- if (s.type === "upload" && s.key) {
748
- if (d[s.key] !== null && d[s.key] !== void 0) {
749
- T[f] = !0;
743
+ const C = {};
744
+ for (const y of s) {
745
+ C[y] = !1;
746
+ for (const i of u[y])
747
+ if (i.type === "upload" && i.key) {
748
+ if (l[i.key] !== null && l[i.key] !== void 0) {
749
+ C[y] = !0;
750
750
  break;
751
751
  }
752
- } else if (s.type === "variable" && s.key) {
752
+ } else if (i.type === "variable" && i.key) {
753
753
  const r = t.current.querySelector(
754
- `[data-type="variable"][data-key="${s.key}"]`
754
+ `[data-type="variable"][data-key="${i.key}"]`
755
755
  );
756
756
  if (r && r.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
757
- T[f] = !0;
757
+ C[y] = !0;
758
758
  break;
759
759
  }
760
760
  }
761
761
  }
762
- const I = x.some((f) => f.exclusionGroup === "separator"), w = Object.keys(T).filter(
763
- (f) => T[f]
762
+ const T = c.some((y) => y.exclusionGroup === "separator"), k = Object.keys(C).filter(
763
+ (y) => C[y]
764
764
  ).length > 0;
765
765
  let e = null;
766
- if (w && I) {
767
- for (const f of x)
768
- if (f.exclusionGroup && f.exclusionGroup !== "separator" && T[f.exclusionGroup]) {
769
- e = f.exclusionGroup;
766
+ if (k && T) {
767
+ for (const y of c)
768
+ if (y.exclusionGroup && y.exclusionGroup !== "separator" && C[y.exclusionGroup]) {
769
+ e = y.exclusionGroup;
770
770
  break;
771
771
  }
772
772
  }
773
- for (const f of i) {
774
- const s = t.current.querySelectorAll(
775
- `[data-group="${f}"]`
773
+ for (const y of s) {
774
+ const i = t.current.querySelectorAll(
775
+ `[data-group="${y}"]`
776
776
  );
777
- I && w && e ? f === e ? s.forEach((r) => {
777
+ T && k && e ? y === e ? i.forEach((r) => {
778
778
  r.classList.contains("required-upload-group") ? r.style.setProperty("display", "inline-flex", "important") : (r.classList.contains("exclusion-wrapper"), r.style.setProperty("display", "inline-block", "important"));
779
- }) : s.forEach((r) => {
779
+ }) : i.forEach((r) => {
780
780
  r.style.display = "none", r.style.setProperty("display", "none", "important");
781
- }) : s.forEach((r) => {
781
+ }) : i.forEach((r) => {
782
782
  r.classList.contains("required-upload-group") ? r.style.setProperty("display", "inline-flex", "important") : (r.classList.contains("exclusion-wrapper"), r.style.setProperty("display", "inline-block", "important"));
783
783
  });
784
784
  }
785
785
  t.current.querySelectorAll(
786
786
  '[data-group="separator"]'
787
- ).forEach((f) => {
788
- f.style.display = w ? "none" : "inline";
787
+ ).forEach((y) => {
788
+ y.style.display = k ? "none" : "inline";
789
789
  });
790
790
  }
791
- function Pe(t, x, d, i) {
791
+ function He(t, c, l, s) {
792
792
  if (!t.current) {
793
- i(!1);
793
+ s(!1);
794
794
  return;
795
795
  }
796
796
  const u = [];
797
- for (let s = 0; s < x.length; s++) {
798
- const r = x[s];
797
+ for (let i = 0; i < c.length; i++) {
798
+ const r = c[i];
799
799
  if ((r.type === "variable" || r.type === "upload" || r.type === "multi-variable" || r.type === "select" || r.type === "textarea" || r.type === "richtext" || r.type === "datepicker") && r.required && r.key) {
800
800
  u.push({
801
801
  exclusionGroup: r.exclusionGroup || "",
@@ -803,14 +803,14 @@ function Pe(t, x, d, i) {
803
803
  type: r.type === "multi-variable" ? "variable" : r.type,
804
804
  isMultiVariable: r.type === "multi-variable",
805
805
  minCount: r.type === "multi-variable" ? r.minCount : void 0,
806
- __index: s
806
+ __index: i
807
807
  });
808
808
  continue;
809
809
  }
810
810
  if (r.type === "text" && r.className?.includes("rte-text-required"))
811
811
  if (r.exclusionGroup)
812
- for (let n = s + 1; n < x.length; n++) {
813
- const o = x[n];
812
+ for (let n = i + 1; n < c.length; n++) {
813
+ const o = c[n];
814
814
  if (o.exclusionGroup === r.exclusionGroup && (o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
815
815
  u.push({
816
816
  exclusionGroup: r.exclusionGroup,
@@ -822,8 +822,8 @@ function Pe(t, x, d, i) {
822
822
  }
823
823
  }
824
824
  else
825
- for (let n = s + 1; n < x.length; n++) {
826
- const o = x[n];
825
+ for (let n = i + 1; n < c.length; n++) {
826
+ const o = c[n];
827
827
  if ((o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
828
828
  u.push({
829
829
  exclusionGroup: o.exclusionGroup || "",
@@ -835,51 +835,51 @@ function Pe(t, x, d, i) {
835
835
  }
836
836
  }
837
837
  }
838
- const T = x.some((s) => s.exclusionGroup === "separator"), I = [];
839
- if (T && u.length > 1) {
840
- const s = [];
841
- x.forEach((r, n) => {
842
- r.exclusionGroup === "separator" && s.push(n);
838
+ const C = c.some((i) => i.exclusionGroup === "separator"), T = [];
839
+ if (C && u.length > 1) {
840
+ const i = [];
841
+ c.forEach((r, n) => {
842
+ r.exclusionGroup === "separator" && i.push(n);
843
843
  });
844
- for (const r of s) {
845
- const o = u.filter((y) => typeof y.__index == "number" && y.__index < r).sort((y, g) => (g.__index ?? 0) - (y.__index ?? 0))[0], p = u.filter((y) => typeof y.__index == "number" && y.__index > r).sort((y, g) => (y.__index ?? 0) - (g.__index ?? 0))[0];
846
- o && p && I.push([o, p]);
844
+ for (const r of i) {
845
+ const o = u.filter((m) => typeof m.__index == "number" && m.__index < r).sort((m, v) => (v.__index ?? 0) - (m.__index ?? 0))[0], f = u.filter((m) => typeof m.__index == "number" && m.__index > r).sort((m, v) => (m.__index ?? 0) - (v.__index ?? 0))[0];
846
+ o && f && T.push([o, f]);
847
847
  }
848
848
  }
849
849
  if (u.length === 0) {
850
- if (x.length === 0) {
850
+ if (c.length === 0) {
851
851
  if (!t.current) {
852
- i(!1);
852
+ s(!1);
853
853
  return;
854
854
  }
855
- const s = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
856
- i(s.length > 0);
855
+ const i = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
856
+ s(i.length > 0);
857
857
  return;
858
858
  }
859
- i(!0);
859
+ s(!0);
860
860
  return;
861
861
  }
862
- const $ = u.filter((s) => {
862
+ const w = u.filter((i) => {
863
863
  if (!t.current) return !1;
864
- if (s.exclusionGroup) {
864
+ if (i.exclusionGroup) {
865
865
  const r = t.current.querySelectorAll(
866
- `[data-group="${s.exclusionGroup}"]`
866
+ `[data-group="${i.exclusionGroup}"]`
867
867
  );
868
868
  if (r.length > 0)
869
869
  return r[0].style.display !== "none";
870
870
  }
871
- if (s.type === "upload" && s.key) {
871
+ if (i.type === "upload" && i.key) {
872
872
  const r = t.current.querySelector(
873
- `[data-type="upload"][data-key="${s.key}"]`
873
+ `[data-type="upload"][data-key="${i.key}"]`
874
874
  );
875
875
  if (r) {
876
876
  const n = r.closest("[data-group]") || r.parentElement;
877
877
  return n ? n.style.display !== "none" : !0;
878
878
  }
879
- } else if (s.type === "variable" && s.key)
880
- if (s.isMultiVariable) {
879
+ } else if (i.type === "variable" && i.key)
880
+ if (i.isMultiVariable) {
881
881
  const r = t.current.querySelectorAll(
882
- `[data-type="variable"][data-multi-key="${s.key}"]`
882
+ `[data-type="variable"][data-multi-key="${i.key}"]`
883
883
  );
884
884
  if (r.length > 0) {
885
885
  const n = r[0], o = n.closest("[data-group]") || n.parentElement;
@@ -887,40 +887,40 @@ function Pe(t, x, d, i) {
887
887
  }
888
888
  } else {
889
889
  const r = t.current.querySelector(
890
- `[data-type="variable"][data-key="${s.key}"]`
890
+ `[data-type="variable"][data-key="${i.key}"]`
891
891
  );
892
892
  if (r) {
893
893
  const n = r.closest("[data-group]") || r.parentElement;
894
894
  return n ? n.style.display !== "none" : !0;
895
895
  }
896
896
  }
897
- else if (s.type === "select" && s.key) {
897
+ else if (i.type === "select" && i.key) {
898
898
  const r = t.current.querySelector(
899
- `[data-type="select"][data-key="${s.key}"]`
899
+ `[data-type="select"][data-key="${i.key}"]`
900
900
  );
901
901
  if (r) {
902
902
  const n = r.closest("[data-group]") || r.parentElement;
903
903
  return n ? n.style.display !== "none" : !0;
904
904
  }
905
- } else if (s.type === "textarea" && s.key) {
905
+ } else if (i.type === "textarea" && i.key) {
906
906
  const r = t.current.querySelector(
907
- `[data-type="textarea"][data-key="${s.key}"]`
907
+ `[data-type="textarea"][data-key="${i.key}"]`
908
908
  );
909
909
  if (r) {
910
910
  const n = r.closest("[data-group]") || r.parentElement;
911
911
  return n ? n.style.display !== "none" : !0;
912
912
  }
913
- } else if (s.type === "richtext" && s.key) {
913
+ } else if (i.type === "richtext" && i.key) {
914
914
  const r = t.current.querySelector(
915
- `[data-type="richtext"][data-key="${s.key}"]`
915
+ `[data-type="richtext"][data-key="${i.key}"]`
916
916
  );
917
917
  if (r) {
918
918
  const n = r.closest("[data-group]") || r.parentElement;
919
919
  return n ? n.style.display !== "none" : !0;
920
920
  }
921
- } else if (s.type === "datepicker" && s.key) {
921
+ } else if (i.type === "datepicker" && i.key) {
922
922
  const r = t.current.querySelector(
923
- `[data-type="datepicker"][data-key="${s.key}"]`
923
+ `[data-type="datepicker"][data-key="${i.key}"]`
924
924
  );
925
925
  if (r) {
926
926
  const n = r.closest("[data-group]") || r.parentElement;
@@ -929,22 +929,22 @@ function Pe(t, x, d, i) {
929
929
  }
930
930
  return !1;
931
931
  });
932
- if ($.length === 0) {
933
- i(!0);
932
+ if (w.length === 0) {
933
+ s(!0);
934
934
  return;
935
935
  }
936
- const w = /* @__PURE__ */ new Set();
937
- I.forEach((s) => {
938
- s.forEach((r) => {
939
- r.key && w.add(r.key);
936
+ const k = /* @__PURE__ */ new Set();
937
+ T.forEach((i) => {
938
+ i.forEach((r) => {
939
+ r.key && k.add(r.key);
940
940
  });
941
941
  });
942
- const e = $.filter(
943
- (s) => !s.key || !w.has(s.key)
942
+ const e = w.filter(
943
+ (i) => !i.key || !k.has(i.key)
944
944
  );
945
- let q = (I.length === 0, !0);
946
- for (const s of I) {
947
- const r = s.filter((o) => {
945
+ let q = (T.length === 0, !0);
946
+ for (const i of T) {
947
+ const r = i.filter((o) => {
948
948
  if (!t.current) return !1;
949
949
  if (o.exclusionGroup) {
950
950
  const a = t.current.querySelectorAll(
@@ -960,7 +960,7 @@ function Pe(t, x, d, i) {
960
960
  let n = !1;
961
961
  for (const o of r)
962
962
  if (o.type === "upload" && o.key) {
963
- if (d[o.key] !== null && d[o.key] !== void 0) {
963
+ if (l[o.key] !== null && l[o.key] !== void 0) {
964
964
  n = !0;
965
965
  break;
966
966
  }
@@ -969,14 +969,14 @@ function Pe(t, x, d, i) {
969
969
  const a = t.current.querySelectorAll(
970
970
  `[data-type="variable"][data-multi-key="${o.key}"]`
971
971
  );
972
- let p = 0;
973
- for (const g of Array.from(a)) {
974
- if (g.classList.contains("show-placeholder"))
972
+ let f = 0;
973
+ for (const v of Array.from(a)) {
974
+ if (v.classList.contains("show-placeholder"))
975
975
  continue;
976
- g.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (p += 1);
976
+ v.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (f += 1);
977
977
  }
978
- const y = o.minCount && o.minCount > 0 ? o.minCount : 1;
979
- if (p >= y) {
978
+ const m = o.minCount && o.minCount > 0 ? o.minCount : 1;
979
+ if (f >= m) {
980
980
  n = !0;
981
981
  break;
982
982
  }
@@ -1031,17 +1031,17 @@ function Pe(t, x, d, i) {
1031
1031
  break;
1032
1032
  }
1033
1033
  }
1034
- let f = !0;
1035
- for (const s of e)
1036
- if (s.type === "upload" && s.key) {
1037
- if (d[s.key] === null || d[s.key] === void 0) {
1038
- f = !1;
1034
+ let y = !0;
1035
+ for (const i of e)
1036
+ if (i.type === "upload" && i.key) {
1037
+ if (l[i.key] === null || l[i.key] === void 0) {
1038
+ y = !1;
1039
1039
  break;
1040
1040
  }
1041
- } else if (s.type === "variable" && s.key)
1042
- if (s.isMultiVariable) {
1041
+ } else if (i.type === "variable" && i.key)
1042
+ if (i.isMultiVariable) {
1043
1043
  const r = t.current.querySelectorAll(
1044
- `[data-type="variable"][data-multi-key="${s.key}"]`
1044
+ `[data-type="variable"][data-multi-key="${i.key}"]`
1045
1045
  );
1046
1046
  let n = 0;
1047
1047
  for (const a of Array.from(r)) {
@@ -1049,208 +1049,208 @@ function Pe(t, x, d, i) {
1049
1049
  continue;
1050
1050
  a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (n += 1);
1051
1051
  }
1052
- const o = s.minCount && s.minCount > 0 ? s.minCount : 1;
1052
+ const o = i.minCount && i.minCount > 0 ? i.minCount : 1;
1053
1053
  if (n < o) {
1054
- f = !1;
1054
+ y = !1;
1055
1055
  break;
1056
1056
  }
1057
1057
  } else {
1058
1058
  const r = t.current.querySelector(
1059
- `[data-type="variable"][data-key="${s.key}"]`
1059
+ `[data-type="variable"][data-key="${i.key}"]`
1060
1060
  );
1061
1061
  if (!r) {
1062
- f = !1;
1062
+ y = !1;
1063
1063
  break;
1064
1064
  }
1065
1065
  if (r.classList.contains("show-placeholder")) {
1066
- f = !1;
1066
+ y = !1;
1067
1067
  break;
1068
1068
  }
1069
1069
  if (r.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1070
- f = !1;
1070
+ y = !1;
1071
1071
  break;
1072
1072
  }
1073
1073
  }
1074
- else if (s.type === "select" && s.key) {
1074
+ else if (i.type === "select" && i.key) {
1075
1075
  const r = t.current.querySelector(
1076
- `[data-type="select"][data-key="${s.key}"]`
1076
+ `[data-type="select"][data-key="${i.key}"]`
1077
1077
  );
1078
1078
  if (!r || (r.value || "").trim().length === 0) {
1079
- f = !1;
1079
+ y = !1;
1080
1080
  break;
1081
1081
  }
1082
- } else if (s.type === "textarea" && s.key) {
1082
+ } else if (i.type === "textarea" && i.key) {
1083
1083
  const r = t.current.querySelector(
1084
- `[data-type="textarea"][data-key="${s.key}"]`
1084
+ `[data-type="textarea"][data-key="${i.key}"]`
1085
1085
  );
1086
1086
  if (!r || (r.value || "").trim().length === 0) {
1087
- f = !1;
1087
+ y = !1;
1088
1088
  break;
1089
1089
  }
1090
- } else if (s.type === "richtext" && s.key) {
1090
+ } else if (i.type === "richtext" && i.key) {
1091
1091
  const r = t.current.querySelector(
1092
- `[data-type="richtext"][data-key="${s.key}"]`
1092
+ `[data-type="richtext"][data-key="${i.key}"]`
1093
1093
  );
1094
1094
  if (!r || (r.textContent || "").replace(/[\u200B]/g, "").trim().length === 0) {
1095
- f = !1;
1095
+ y = !1;
1096
1096
  break;
1097
1097
  }
1098
- } else if (s.type === "datepicker" && s.key) {
1098
+ } else if (i.type === "datepicker" && i.key) {
1099
1099
  const r = t.current.querySelector(
1100
- `[data-type="datepicker"][data-key="${s.key}"]`
1100
+ `[data-type="datepicker"][data-key="${i.key}"]`
1101
1101
  );
1102
1102
  if (!r || (r.getAttribute("data-value") || "").trim().length === 0) {
1103
- f = !1;
1103
+ y = !1;
1104
1104
  break;
1105
1105
  }
1106
1106
  }
1107
- i(q && f);
1107
+ s(q && y);
1108
1108
  }
1109
- function Me(t, x) {
1109
+ function Be(t, c) {
1110
1110
  if (!t.current) return;
1111
- t.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
1112
- const u = i.innerText.replace(/\n/g, "");
1113
- u.replace(/\u200B/g, "") ? i.classList.remove("show-placeholder") : (u !== "​" && (i.innerText = "​"), i.classList.add("show-placeholder"));
1111
+ t.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
1112
+ const u = s.innerText.replace(/\n/g, "");
1113
+ u.replace(/\u200B/g, "") ? s.classList.remove("show-placeholder") : (u !== "​" && (s.innerText = "​"), s.classList.add("show-placeholder"));
1114
1114
  });
1115
1115
  }
1116
- function St(t, x, d, i, u, T = {}, I) {
1116
+ function Vt(t, c, l, s, u, C = {}, T) {
1117
1117
  if (!t.current) return;
1118
- let $ = "", w = 0;
1119
- for (; w < x.length; ) {
1120
- const e = x[w], q = w + 1 < x.length ? x[w + 1] : null;
1118
+ let w = "", k = 0;
1119
+ for (; k < c.length; ) {
1120
+ const e = c[k], q = k + 1 < c.length ? c[k + 1] : null;
1121
1121
  if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && q) {
1122
- const a = q.type === "upload" && q.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === q.exclusionGroup, p = q.type === "variable" && q.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === q.exclusionGroup;
1122
+ const a = q.type === "upload" && q.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === q.exclusionGroup, f = q.type === "variable" && q.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === q.exclusionGroup;
1123
1123
  if (a) {
1124
- const g = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
1124
+ const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
1125
1125
  let V = "";
1126
1126
  e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
1127
- const k = q, P = d[k.key] !== null && d[k.key] !== void 0, H = P ? d[k.key] : null, F = P ? d[k.key]?.name : k.text, U = P ? "" : "hidden", R = k.tooltip && !P ? "" : "hidden", ee = P ? "has-file" : "", re = P && F ? ` data-file-name="${F.replace(/"/g, "&quot;")}"` : "";
1128
- let l = "";
1129
- P && H && (H.type?.startsWith("image/") ? l = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(H)}" alt="preview" />` : l = "<i class='iconfont icon-exlwenjian'></i>");
1130
- const c = `<span contenteditable="false" data-type="upload" data-key="${k.key}" class="upload-chip"><span class="upload-inner-wrapper ${ee}"><span class="upload-icon">${l}</span><span class="upload-label"${re}>${F || k.text}</span>${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${R}" data-upload-key="${k.key}" data-tooltip="${k.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${U}" title="移除文件">×</span></span></span>`;
1131
- $ += g + V + c + b, w += 2;
1127
+ const E = q, B = l[E.key] !== null && l[E.key] !== void 0, G = B ? l[E.key] : null, F = B ? l[E.key]?.name : E.text, W = B ? "" : "hidden", H = E.tooltip && !B ? "" : "hidden", ee = B ? "has-file" : "", re = B && F ? ` data-file-name="${F.replace(/"/g, "&quot;")}"` : "";
1128
+ let d = "";
1129
+ B && G && (G.type?.startsWith("image/") ? d = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(G)}" alt="preview" />` : d = "<i class='iconfont icon-exlwenjian'></i>");
1130
+ const p = `<span contenteditable="false" data-type="upload" data-key="${E.key}" class="upload-chip"><span class="upload-inner-wrapper ${ee}"><span class="upload-icon">${d}</span><span class="upload-label"${re}>${F || E.text}</span>${E.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${H}" data-upload-key="${E.key}" data-tooltip="${E.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${W}" title="移除文件">×</span></span></span>`;
1131
+ w += v + V + p + x, k += 2;
1132
1132
  continue;
1133
1133
  }
1134
- if (p) {
1135
- const g = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
1134
+ if (f) {
1135
+ const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
1136
1136
  let V = "";
1137
1137
  e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
1138
- const k = q, H = (k.key ? u[k.key] : void 0) || k.text || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = k.exclusionGroup ? ` data-group="${k.exclusionGroup}"` : "", re = k.tooltip ? ` data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${k.key || ""}"` : "", l = k.tooltip && F ? "" : "hidden", c = `<span contenteditable="true" data-type="variable" data-key="${k.key}" data-placeholder="${k.placeholder || ""}"${ee}${re} class="variable-chip ${R}">${U}${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${l}" data-variable-key="${k.key}" data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1139
- $ += g + V + c + b, w += 2;
1138
+ const E = q, G = (E.key ? u[E.key] : void 0) || E.text || "", F = !G, W = F ? "​" : G, H = F ? "show-placeholder" : "", ee = E.exclusionGroup ? ` data-group="${E.exclusionGroup}"` : "", re = E.tooltip ? ` data-tooltip="${E.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${E.key || ""}"` : "", d = E.tooltip && F ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${E.key}" data-placeholder="${E.placeholder || ""}"${ee}${re} class="variable-chip ${H}">${W}${E.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${d}" data-variable-key="${E.key}" data-tooltip="${E.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1139
+ w += v + V + p + x, k += 2;
1140
1140
  continue;
1141
1141
  }
1142
1142
  }
1143
- const s = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", r = e.exclusionGroup ? `<span ${s} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
1143
+ const i = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", r = e.exclusionGroup ? `<span ${i} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
1144
1144
  let o = "";
1145
1145
  if (e.type === "tag") {
1146
- const p = i || I === "hideTagClose" ? "" : '<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>', y = i ? ' data-locked="true"' : "", g = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1147
- o = `<span contenteditable="false" class="tag-node group"${y}${g}><span class="tag-label">${e.text}</span>${p}</span>`;
1146
+ const f = s || T === "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>', m = s ? ' data-locked="true"' : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1147
+ o = `<span contenteditable="false" class="tag-node group"${m}${v}><span class="tag-label">${e.text}</span>${f}</span>`;
1148
1148
  } else if (e.type === "text") {
1149
- const a = i ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', y = (e.text ?? "").replace(/\n/g, "<br/>");
1150
- e.className ? o = `<span class="${e.className}"${a}>${y}</span>` : o = i ? `<span${a}>${y}</span>` : `<span contenteditable="false">${y}</span>`;
1149
+ const a = s ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', m = (e.text ?? "").replace(/\n/g, "<br/>");
1150
+ e.className ? o = `<span class="${e.className}"${a}>${m}</span>` : o = s ? `<span${a}>${m}</span>` : `<span contenteditable="false">${m}</span>`;
1151
1151
  } else if (e.type === "variable" && e.key) {
1152
- const p = u[e.key] || e.text || "", y = !p, g = y ? "​" : p, b = y ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", k = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && y ? "" : "hidden", H = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${k} class="variable-chip ${b}">${g}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1153
- e.required ? o = `<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>${H}</span>` : o = H;
1152
+ const f = u[e.key] || e.text || "", m = !f, v = m ? "​" : f, x = m ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", E = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", B = e.tooltip && m ? "" : "hidden", G = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${E} class="variable-chip ${x}">${v}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${B}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1153
+ e.required ? o = `<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>${G}</span>` : o = G;
1154
1154
  } else if (e.type === "upload" && e.key) {
1155
- const a = d[e.key] !== null && d[e.key] !== void 0, p = a ? d[e.key] : null, y = a ? d[e.key]?.name : e.text, g = a ? "" : "hidden", b = e.tooltip && !a ? "" : "hidden", V = a ? "has-file" : "", k = a && y ? ` data-file-name="${y.replace(/"/g, "&quot;")}"` : "";
1156
- let P = "";
1157
- a && p && (p.type?.startsWith("image/") ? P = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(p)}" alt="preview" />` : P = "<i class='iconfont icon-exlwenjian'></i>");
1158
- const H = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${V}"><span class="upload-icon">${P}</span><span class="upload-label"${k}>${y || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${b}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${g}" title="移除文件">×</span></span></span>`;
1159
- e.required ? o = `<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>${H}</span>` : o = H;
1155
+ const a = l[e.key] !== null && l[e.key] !== void 0, f = a ? l[e.key] : null, m = a ? l[e.key]?.name : e.text, v = a ? "" : "hidden", x = e.tooltip && !a ? "" : "hidden", V = a ? "has-file" : "", E = a && m ? ` data-file-name="${m.replace(/"/g, "&quot;")}"` : "";
1156
+ let B = "";
1157
+ a && f && (f.type?.startsWith("image/") ? B = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(f)}" alt="preview" />` : B = "<i class='iconfont icon-exlwenjian'></i>");
1158
+ const G = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${V}"><span class="upload-icon">${B}</span><span class="upload-label"${E}>${m || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${x}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
1159
+ e.required ? o = `<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>${G}</span>` : o = G;
1160
1160
  } else if (e.type === "select" && e.key) {
1161
- const a = u[e.key] || e.defaultValue || "", p = (e.options || []).map((b) => {
1162
- const V = a === b.value ? "selected" : "";
1163
- return `<option value="${b.value}" ${V}>${b.label}</option>`;
1164
- }).join(""), y = e.placeholder ? `<option value="" ${a ? "" : "selected"} disabled hidden>${e.placeholder}</option>` : "", g = `<select data-type="select" data-key="${e.key}" class="rte-select">${y}${p}</select>`;
1165
- e.required ? o = `<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>${g}</span>` : o = g;
1161
+ const a = u[e.key] || e.defaultValue || "", f = (e.options || []).map((x) => {
1162
+ const V = a === x.value ? "selected" : "";
1163
+ return `<option value="${x.value}" ${V}>${x.label}</option>`;
1164
+ }).join(""), m = e.placeholder ? `<option value="" ${a ? "" : "selected"} disabled hidden>${e.placeholder}</option>` : "", v = `<select data-type="select" data-key="${e.key}" class="rte-select">${m}${f}</select>`;
1165
+ e.required ? o = `<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>` : o = v;
1166
1166
  } else if (e.type === "textarea" && e.key) {
1167
- const a = u[e.key] || "", p = e.maxHeight || 252, y = e.expandable !== !1, g = e.placeholder ? ` placeholder="${e.placeholder}"` : "", b = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${p}" style="max-height:${p}px;"${g}>${a}</textarea>`, V = y ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", k = `<div class="rte-textarea-wrapper" data-key="${e.key}">${b}${V}</div>`;
1168
- e.required ? o = `<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>${k}</span>` : o = k;
1167
+ const a = u[e.key] || "", f = e.maxHeight || 252, m = e.expandable !== !1, v = e.placeholder ? ` placeholder="${e.placeholder}"` : "", x = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${f}" style="max-height:${f}px;"${v}>${a}</textarea>`, V = m ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", E = `<div class="rte-textarea-wrapper" data-key="${e.key}">${x}${V}</div>`;
1168
+ e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${E}</span>` : o = E;
1169
1169
  } else if (e.type === "richtext" && e.key) {
1170
- const a = u[e.key] || e.text || "", p = e.minHeight || 140, y = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", g = e.expandable !== !1, b = a, V = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${y} style="min-height:${p}px;">${b}</div>`, k = g ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", P = `<div class="rte-richtext-wrapper" data-key="${e.key}">${V}${k}</div>`, H = `<div class="rte-richtext-container" data-key="${e.key}">${P}</div>`;
1171
- e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${H}</div>` : o = H;
1170
+ const a = u[e.key] || e.text || "", f = e.minHeight || 140, m = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", v = e.expandable !== !1, x = a, V = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${m} style="min-height:${f}px;">${x}</div>`, E = v ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", B = `<div class="rte-richtext-wrapper" data-key="${e.key}">${V}${E}</div>`, G = `<div class="rte-richtext-container" data-key="${e.key}">${B}</div>`;
1171
+ e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${G}</div>` : o = G;
1172
1172
  } else if (e.type === "datepicker" && e.key) {
1173
- const a = u[e.key] || "", p = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", y = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", g = e.disableFuture ? ' data-disable-future="true"' : "", b = `<div data-type="datepicker" data-key="${e.key}" data-value="${a}" class="rte-datepicker-host"${p}${y}${g}></div>`;
1174
- e.required ? o = `<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>${b}</span>` : o = b;
1173
+ const a = u[e.key] || "", f = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", m = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", v = e.disableFuture ? ' data-disable-future="true"' : "", x = `<div data-type="datepicker" data-key="${e.key}" data-value="${a}" class="rte-datepicker-host"${f}${m}${v}></div>`;
1174
+ e.required ? o = `<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>` : o = x;
1175
1175
  } else if (e.type === "multi-variable" && e.key) {
1176
- const a = e.maxCount || 9, p = T[e.key] || 1, y = Math.min(p, a);
1176
+ const a = e.maxCount || 9, f = C[e.key] || 1, m = Math.min(f, a);
1177
1177
  if (e.required) {
1178
- const g = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, b = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1178
+ const v = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, x = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1179
1179
  let V = "";
1180
- for (let k = 0; k < y; k++) {
1181
- const P = `${e.key}_${k}`, H = u[P] || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", re = e.tooltip && F ? "" : "hidden", l = `<span contenteditable="true" data-type="variable" data-key="${P}" data-multi-key="${e.key}" data-index="${k}" data-placeholder="${e.placeholder || ""}"${ee} class="variable-chip ${R}">${U}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${re}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1182
- k === 0 ? V += `<span ${b} class="exclusion-wrapper required-upload-group required-multi-first">${g}${l}</span>` : V += l;
1180
+ for (let E = 0; E < m; E++) {
1181
+ const B = `${e.key}_${E}`, G = u[B] || "", F = !G, W = F ? "​" : G, H = F ? "show-placeholder" : "", ee = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", re = e.tooltip && F ? "" : "hidden", d = `<span contenteditable="true" data-type="variable" data-key="${B}" data-multi-key="${e.key}" data-index="${E}" data-placeholder="${e.placeholder || ""}"${ee} class="variable-chip ${H}">${W}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${re}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1182
+ E === 0 ? V += `<span ${x} class="exclusion-wrapper required-upload-group required-multi-first">${v}${d}</span>` : V += d;
1183
1183
  }
1184
1184
  o = V;
1185
1185
  } else {
1186
- let g = "";
1187
- for (let b = 0; b < y; b++) {
1188
- const V = `${e.key}_${b}`, k = u[V] || "", P = !k, H = P ? "​" : k, F = P ? "show-placeholder" : "", U = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", R = e.tooltip && P ? "" : "hidden", ee = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${b}" data-placeholder="${e.placeholder || ""}"${U} class="variable-chip ${F}">${H}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${R}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1189
- g += ee;
1186
+ let v = "";
1187
+ for (let x = 0; x < m; x++) {
1188
+ const V = `${e.key}_${x}`, E = u[V] || "", B = !E, G = B ? "​" : E, F = B ? "show-placeholder" : "", W = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", H = e.tooltip && B ? "" : "hidden", ee = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${x}" data-placeholder="${e.placeholder || ""}"${W} class="variable-chip ${F}">${G}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${H}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1189
+ v += ee;
1190
1190
  }
1191
- o = g;
1191
+ o = v;
1192
1192
  }
1193
1193
  }
1194
- $ += r + o + n, w++;
1194
+ w += r + o + n, k++;
1195
1195
  }
1196
- t.current && (t.current.innerHTML = $, setTimeout(() => {
1196
+ t.current && (t.current.innerHTML = w, setTimeout(() => {
1197
1197
  if (!t.current) return;
1198
1198
  t.current.querySelectorAll('[data-type="variable"]').forEach((q) => {
1199
- const f = q.innerText.replace(/\n/g, "");
1200
- f.replace(/\u200B/g, "") ? q.classList.remove("show-placeholder") : (f !== "​" && (q.innerText = "​"), q.classList.add("show-placeholder"));
1199
+ const y = q.innerText.replace(/\n/g, "");
1200
+ y.replace(/\u200B/g, "") ? q.classList.remove("show-placeholder") : (y !== "​" && (q.innerText = "​"), q.classList.add("show-placeholder"));
1201
1201
  });
1202
1202
  }, 0));
1203
1203
  }
1204
- function At(t, x, d, i, u = {}, T, I, $) {
1205
- const w = ae(() => {
1204
+ function Pt(t, c, l, s, u = {}, C, T, w) {
1205
+ const k = ae(() => {
1206
1206
  if (!t.current) return;
1207
- if (x.length === 0) {
1207
+ if (c.length === 0) {
1208
1208
  t.current.innerHTML = "";
1209
1209
  return;
1210
1210
  }
1211
1211
  let e = {};
1212
- const f = t.current.__tempVariableValues;
1213
- if (f ? (e = f, setTimeout(() => {
1212
+ const y = t.current.__tempVariableValues;
1213
+ if (y ? (e = y, setTimeout(() => {
1214
1214
  if (t.current) {
1215
- const s = t.current;
1216
- s.__tempVariableValues === f && delete s.__tempVariableValues;
1217
- }
1218
- }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((p) => {
1219
- const y = p.dataset.key;
1220
- if (y) {
1221
- const g = p.innerText.replace(/[\u200B\n]/g, "").trim();
1222
- g && (e[y] = g);
1223
- }
1224
- }), t.current.querySelectorAll('[data-type="select"]').forEach((p) => {
1225
- const y = p.dataset.key;
1226
- if (y) {
1227
- const g = p.value.trim();
1228
- g && (e[y] = g);
1229
- }
1230
- }), t.current.querySelectorAll('[data-type="textarea"]').forEach((p) => {
1231
- const y = p.dataset.key;
1232
- if (y) {
1233
- const g = p.value.replace(/[\u200B]/g, "").trim();
1234
- g && (e[y] = g);
1235
- }
1236
- }), t.current.querySelectorAll('[data-type="richtext"]').forEach((p) => {
1237
- const y = p.dataset.key;
1238
- if (y) {
1239
- const g = (p.textContent || "").replace(/[\u200B]/g, "").trim();
1240
- g && (e[y] = g);
1241
- }
1242
- }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((p) => {
1243
- const y = p.dataset.key;
1244
- if (y) {
1245
- const g = (p.getAttribute("data-value") || "").trim();
1246
- g && (e[y] = g);
1247
- }
1248
- })), St(t, x, d, i, e, u, $), T?.current) {
1249
- const { key: s, offset: r } = T.current;
1215
+ const i = t.current;
1216
+ i.__tempVariableValues === y && delete i.__tempVariableValues;
1217
+ }
1218
+ }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((f) => {
1219
+ const m = f.dataset.key;
1220
+ if (m) {
1221
+ const v = f.innerText.replace(/[\u200B\n]/g, "").trim();
1222
+ v && (e[m] = v);
1223
+ }
1224
+ }), t.current.querySelectorAll('[data-type="select"]').forEach((f) => {
1225
+ const m = f.dataset.key;
1226
+ if (m) {
1227
+ const v = f.value.trim();
1228
+ v && (e[m] = v);
1229
+ }
1230
+ }), t.current.querySelectorAll('[data-type="textarea"]').forEach((f) => {
1231
+ const m = f.dataset.key;
1232
+ if (m) {
1233
+ const v = f.value.replace(/[\u200B]/g, "").trim();
1234
+ v && (e[m] = v);
1235
+ }
1236
+ }), t.current.querySelectorAll('[data-type="richtext"]').forEach((f) => {
1237
+ const m = f.dataset.key;
1238
+ if (m) {
1239
+ const v = (f.textContent || "").replace(/[\u200B]/g, "").trim();
1240
+ v && (e[m] = v);
1241
+ }
1242
+ }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((f) => {
1243
+ const m = f.dataset.key;
1244
+ if (m) {
1245
+ const v = (f.getAttribute("data-value") || "").trim();
1246
+ v && (e[m] = v);
1247
+ }
1248
+ })), Vt(t, c, l, s, e, u, w), C?.current) {
1249
+ const { key: i, offset: r } = C.current;
1250
1250
  setTimeout(() => {
1251
1251
  if (!t.current) return;
1252
1252
  const n = t.current.querySelector(
1253
- `[data-type="variable"][data-key="${s}"]`
1253
+ `[data-type="variable"][data-key="${i}"]`
1254
1254
  );
1255
1255
  if (n) {
1256
1256
  try {
@@ -1259,23 +1259,23 @@ function At(t, x, d, i, u = {}, T, I, $) {
1259
1259
  NodeFilter.SHOW_TEXT,
1260
1260
  null
1261
1261
  );
1262
- let p = 0, y = null, g = 0;
1262
+ let f = 0, m = null, v = 0;
1263
1263
  for (; a.nextNode(); ) {
1264
- const b = a.currentNode, V = b.textContent?.length || 0;
1265
- if (p + V >= r) {
1266
- y = b, g = r - p;
1264
+ const x = a.currentNode, V = x.textContent?.length || 0;
1265
+ if (f + V >= r) {
1266
+ m = x, v = r - f;
1267
1267
  break;
1268
1268
  }
1269
- p += V;
1269
+ f += V;
1270
1270
  }
1271
- if (y) {
1272
- o.setStart(y, Math.min(g, y.textContent?.length || 0)), o.collapse(!0);
1273
- const b = window.getSelection();
1274
- b && (b.removeAllRanges(), b.addRange(o), n.focus());
1271
+ if (m) {
1272
+ o.setStart(m, Math.min(v, m.textContent?.length || 0)), o.collapse(!0);
1273
+ const x = window.getSelection();
1274
+ x && (x.removeAllRanges(), x.addRange(o), n.focus());
1275
1275
  } else {
1276
1276
  o.selectNodeContents(n), o.collapse(!1);
1277
- const b = window.getSelection();
1278
- b && (b.removeAllRanges(), b.addRange(o), n.focus());
1277
+ const x = window.getSelection();
1278
+ x && (x.removeAllRanges(), x.addRange(o), n.focus());
1279
1279
  }
1280
1280
  } catch {
1281
1281
  const o = document.createRange();
@@ -1283,161 +1283,161 @@ function At(t, x, d, i, u = {}, T, I, $) {
1283
1283
  const a = window.getSelection();
1284
1284
  a && (a.removeAllRanges(), a.addRange(o), n.focus());
1285
1285
  }
1286
- T.current = null;
1286
+ C.current = null;
1287
1287
  }
1288
1288
  }, 0);
1289
1289
  }
1290
- }, [x, d, i, t, u, T, I, $]);
1290
+ }, [c, l, s, t, u, C, T, w]);
1291
1291
  de(() => {
1292
- w();
1293
- }, [w]);
1292
+ k();
1293
+ }, [k]);
1294
1294
  }
1295
- function Lt(t, x, d, i) {
1295
+ function Bt(t, c, l, s) {
1296
1296
  de(() => {
1297
1297
  const u = t.current;
1298
1298
  if (!u) return;
1299
- const T = ($) => {
1300
- const w = $.target?.closest(".upload-info-icon");
1301
- if (w && w.classList.contains("upload-info-icon")) {
1302
- const q = w.dataset.uploadKey;
1303
- q && i({ key: q, anchorEl: w, type: "upload" });
1299
+ const C = (w) => {
1300
+ const k = w.target?.closest(".upload-info-icon");
1301
+ if (k && k.classList.contains("upload-info-icon")) {
1302
+ const q = k.dataset.uploadKey;
1303
+ q && s({ key: q, anchorEl: k, type: "upload" });
1304
1304
  return;
1305
1305
  }
1306
- const e = $.target?.closest('[data-type="upload"]');
1306
+ const e = w.target?.closest('[data-type="upload"]');
1307
1307
  if (e) {
1308
1308
  const q = e.dataset.key;
1309
1309
  if (q) {
1310
- const f = d[q];
1311
- f && f.type && f.type.startsWith("image/") && i({ key: q, anchorEl: e, type: "upload-preview" });
1310
+ const y = l[q];
1311
+ y && y.type && y.type.startsWith("image/") && s({ key: q, anchorEl: e, type: "upload-preview" });
1312
1312
  }
1313
1313
  }
1314
- }, I = ($) => {
1315
- const w = $.target?.closest(".upload-info-icon"), e = $.relatedTarget;
1316
- if (w && w.classList.contains("upload-info-icon")) {
1317
- !e || !u.contains(e) ? i(null) : e.closest(".upload-info-icon") || i(null);
1314
+ }, T = (w) => {
1315
+ const k = w.target?.closest(".upload-info-icon"), e = w.relatedTarget;
1316
+ if (k && k.classList.contains("upload-info-icon")) {
1317
+ !e || !u.contains(e) ? s(null) : e.closest(".upload-info-icon") || s(null);
1318
1318
  return;
1319
1319
  }
1320
- const q = $.target?.closest('[data-type="upload"]');
1320
+ const q = w.target?.closest('[data-type="upload"]');
1321
1321
  if (q) {
1322
- const f = e;
1323
- if (f && q.contains(f))
1322
+ const y = e;
1323
+ if (y && q.contains(y))
1324
1324
  return;
1325
- i(null);
1325
+ s(null);
1326
1326
  }
1327
1327
  };
1328
- return u.addEventListener("mouseover", T, !0), u.addEventListener("mouseout", I, !0), () => {
1329
- u.removeEventListener("mouseover", T, !0), u.removeEventListener("mouseout", I, !0);
1328
+ return u.addEventListener("mouseover", C, !0), u.addEventListener("mouseout", T, !0), () => {
1329
+ u.removeEventListener("mouseover", C, !0), u.removeEventListener("mouseout", T, !0);
1330
1330
  };
1331
- }, [x, d, t, i]);
1331
+ }, [c, l, t, s]);
1332
1332
  }
1333
- function _t(t, x, d, i) {
1333
+ function Ot(t, c, l, s) {
1334
1334
  de(() => {
1335
1335
  if (!t.current) return;
1336
- const u = (w) => {
1337
- if (i === "hideTagClose")
1336
+ const u = (k) => {
1337
+ if (s === "hideTagClose")
1338
1338
  return;
1339
- const e = w.currentTarget, q = e.dataset.tooltip, f = e.dataset.tagKey || "";
1340
- q && d({ key: f, anchorEl: e, type: "tag" });
1341
- }, T = () => {
1342
- d(null);
1339
+ const e = k.currentTarget, q = e.dataset.tooltip, y = e.dataset.tagKey || "";
1340
+ q && l({ key: y, anchorEl: e, type: "tag" });
1341
+ }, C = () => {
1342
+ l(null);
1343
1343
  };
1344
- let I;
1345
- const $ = () => {
1344
+ let T;
1345
+ const w = () => {
1346
1346
  if (!t.current) return;
1347
1347
  t.current.querySelectorAll(
1348
1348
  ".tag-node[data-tooltip]"
1349
1349
  ).forEach((e) => {
1350
- e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", T);
1350
+ e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", C);
1351
1351
  });
1352
1352
  };
1353
- return I = requestAnimationFrame(() => {
1354
- I = requestAnimationFrame($);
1353
+ return T = requestAnimationFrame(() => {
1354
+ T = requestAnimationFrame(w);
1355
1355
  }), () => {
1356
- cancelAnimationFrame(I), t.current && t.current.querySelectorAll(
1356
+ cancelAnimationFrame(T), t.current && t.current.querySelectorAll(
1357
1357
  ".tag-node[data-tooltip]"
1358
1358
  ).forEach((e) => {
1359
- e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", T);
1359
+ e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", C);
1360
1360
  });
1361
1361
  };
1362
- }, [x, t, d, i]);
1362
+ }, [c, t, l, s]);
1363
1363
  }
1364
- function Dt(t, x, d) {
1364
+ function Ht(t, c, l) {
1365
1365
  de(() => {
1366
- const i = t.current;
1367
- if (!i) return;
1368
- const u = (I) => {
1369
- const $ = I.target?.closest(".variable-info-icon");
1370
- if ($ && $.classList.contains("variable-info-icon")) {
1371
- const w = $.dataset.variableKey;
1372
- w && d({ key: w, anchorEl: $, type: "variable" });
1373
- }
1374
- }, T = (I) => {
1375
- const $ = I.target?.closest(".variable-info-icon"), w = I.relatedTarget;
1376
- $ && $.classList.contains("variable-info-icon") && (!w || !i.contains(w) ? d(null) : w.closest(".variable-info-icon") || d(null));
1366
+ const s = t.current;
1367
+ if (!s) return;
1368
+ const u = (T) => {
1369
+ const w = T.target?.closest(".variable-info-icon");
1370
+ if (w && w.classList.contains("variable-info-icon")) {
1371
+ const k = w.dataset.variableKey;
1372
+ k && l({ key: k, anchorEl: w, type: "variable" });
1373
+ }
1374
+ }, C = (T) => {
1375
+ const w = T.target?.closest(".variable-info-icon"), k = T.relatedTarget;
1376
+ w && w.classList.contains("variable-info-icon") && (!k || !s.contains(k) ? l(null) : k.closest(".variable-info-icon") || l(null));
1377
1377
  };
1378
- return i.addEventListener("mouseover", u, !0), i.addEventListener("mouseout", T, !0), () => {
1379
- i.removeEventListener("mouseover", u, !0), i.removeEventListener("mouseout", T, !0);
1378
+ return s.addEventListener("mouseover", u, !0), s.addEventListener("mouseout", C, !0), () => {
1379
+ s.removeEventListener("mouseover", u, !0), s.removeEventListener("mouseout", C, !0);
1380
1380
  };
1381
- }, [x, t, d]);
1381
+ }, [c, t, l]);
1382
1382
  }
1383
- function It(t, x, d, i) {
1383
+ function Rt(t, c, l, s) {
1384
1384
  de(() => {
1385
1385
  if (!t.current) return;
1386
- const u = (w) => {
1387
- const e = w.currentTarget;
1388
- e.dataset.fileName && i({ key: "", anchorEl: e, type: "upload-label" });
1389
- }, T = () => {
1390
- i(null);
1386
+ const u = (k) => {
1387
+ const e = k.currentTarget;
1388
+ e.dataset.fileName && s({ key: "", anchorEl: e, type: "upload-label" });
1389
+ }, C = () => {
1390
+ s(null);
1391
1391
  };
1392
- let I;
1393
- const $ = () => {
1392
+ let T;
1393
+ const w = () => {
1394
1394
  if (!t.current) return;
1395
1395
  t.current.querySelectorAll(
1396
1396
  ".upload-label[data-file-name]"
1397
1397
  ).forEach((e) => {
1398
- e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", T);
1398
+ e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", C);
1399
1399
  });
1400
1400
  };
1401
- return I = requestAnimationFrame(() => {
1402
- I = requestAnimationFrame($);
1401
+ return T = requestAnimationFrame(() => {
1402
+ T = requestAnimationFrame(w);
1403
1403
  }), () => {
1404
- cancelAnimationFrame(I), t.current && t.current.querySelectorAll(
1404
+ cancelAnimationFrame(T), t.current && t.current.querySelectorAll(
1405
1405
  ".upload-label[data-file-name]"
1406
1406
  ).forEach((e) => {
1407
- e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", T);
1407
+ e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", C);
1408
1408
  });
1409
1409
  };
1410
- }, [x, d, t, i]);
1410
+ }, [c, l, t, s]);
1411
1411
  }
1412
- function Mt(t, x, d, i) {
1412
+ function Gt(t, c, l, s) {
1413
1413
  de(() => {
1414
1414
  const u = setTimeout(() => {
1415
- Be(t, x, d), Pe(t, x, d, i);
1415
+ Oe(t, c, l), He(t, c, l, s);
1416
1416
  }, 0);
1417
1417
  return () => clearTimeout(u);
1418
- }, [d, x, t, i]);
1418
+ }, [l, c, t, s]);
1419
1419
  }
1420
- function Vt(t, x) {
1421
- const d = Q(0);
1420
+ function Ft(t, c) {
1421
+ const l = Q(0);
1422
1422
  de(() => {
1423
1423
  if (!t.current) return;
1424
- let i = !1, u = 0;
1425
- const T = (a) => a instanceof HTMLElement ? !!(a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host") || a.closest(".ant-picker") || a.closest(".ant-picker-dropdown")) : !1, I = (a) => {
1426
- i = !0, T(a.target) && (d.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target"));
1427
- }, $ = () => {
1428
- i = !1, u = Date.now();
1424
+ let s = !1, u = 0;
1425
+ const C = (a) => a instanceof HTMLElement ? !!(a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host") || a.closest(".ant-picker") || a.closest(".ant-picker-dropdown")) : !1, T = (a) => {
1426
+ s = !0, C(a.target) && (l.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target"));
1427
+ }, w = () => {
1428
+ s = !1, u = Date.now();
1429
1429
  };
1430
- let w = !1, e = 0;
1430
+ let k = !1, e = 0;
1431
1431
  const q = () => {
1432
- w = !0;
1433
- }, f = () => {
1434
- w = !1, e = Date.now();
1435
- }, s = () => {
1432
+ k = !0;
1433
+ }, y = () => {
1434
+ k = !1, e = Date.now();
1435
+ }, i = () => {
1436
1436
  e = Date.now();
1437
1437
  }, r = (a) => {
1438
- T(a.target) && (d.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target"));
1438
+ C(a.target) && (l.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target"));
1439
1439
  }, n = () => {
1440
- if (Date.now() - d.current < 800) {
1440
+ if (Date.now() - l.current < 800) {
1441
1441
  console.log("[SelectionCtrl] skip selectionchange due to recent datepicker interaction");
1442
1442
  return;
1443
1443
  }
@@ -1448,222 +1448,222 @@ function Vt(t, x) {
1448
1448
  return;
1449
1449
  }
1450
1450
  if (!t.current) return;
1451
- const p = window.getSelection();
1452
- if (!p || p.rangeCount === 0 || x.current || i || w || Date.now() - e < 500)
1451
+ const f = window.getSelection();
1452
+ if (!f || f.rangeCount === 0 || c.current || s || k || Date.now() - e < 500)
1453
1453
  return;
1454
- const y = p.getRangeAt(0);
1455
- if (!y.collapsed)
1456
- return t.current.contains(y.commonAncestorContainer), void 0;
1457
- const g = p.anchorNode;
1458
- if (!g || !t.current.contains(g))
1454
+ const m = f.getRangeAt(0);
1455
+ if (!m.collapsed)
1456
+ return t.current.contains(m.commonAncestorContainer), void 0;
1457
+ const v = f.anchorNode;
1458
+ if (!v || !t.current.contains(v))
1459
1459
  return;
1460
- let b = !1;
1461
- if (g.nodeType === Node.ELEMENT_NODE) {
1462
- const k = g;
1463
- (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (b = !0);
1464
- } else if (g.parentElement) {
1465
- const k = g.parentElement;
1466
- (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (b = !0);
1467
- }
1468
- if (b)
1460
+ let x = !1;
1461
+ if (v.nodeType === Node.ELEMENT_NODE) {
1462
+ const E = v;
1463
+ (E.closest('[data-type="datepicker"]') || E.closest(".rte-datepicker-wrapper") || E.closest(".rte-datepicker-host")) && (x = !0);
1464
+ } else if (v.parentElement) {
1465
+ const E = v.parentElement;
1466
+ (E.closest('[data-type="datepicker"]') || E.closest(".rte-datepicker-wrapper") || E.closest(".rte-datepicker-host")) && (x = !0);
1467
+ }
1468
+ if (x)
1469
1469
  return;
1470
1470
  let V = null;
1471
- if (g.nodeType === Node.ELEMENT_NODE ? V = g.closest('[data-type="variable"]') : g.nodeType === Node.TEXT_NODE && g.parentElement && (V = g.parentElement.closest('[data-type="variable"]')), !V) {
1471
+ if (v.nodeType === Node.ELEMENT_NODE ? V = v.closest('[data-type="variable"]') : v.nodeType === Node.TEXT_NODE && v.parentElement && (V = v.parentElement.closest('[data-type="variable"]')), !V) {
1472
1472
  if (Date.now() - u > 500)
1473
1473
  return;
1474
- const k = t.current.querySelectorAll('[data-type="variable"]');
1475
- if (k.length > 0) {
1476
- let P = null;
1477
- for (const H of Array.from(k))
1478
- if (H.style.display !== "none") {
1479
- P = H;
1474
+ const E = t.current.querySelectorAll('[data-type="variable"]');
1475
+ if (E.length > 0) {
1476
+ let B = null;
1477
+ for (const G of Array.from(E))
1478
+ if (G.style.display !== "none") {
1479
+ B = G;
1480
1480
  break;
1481
1481
  }
1482
- if (!P && k.length > 0 && (P = k[0]), P) {
1483
- const H = document.createRange();
1484
- H.selectNodeContents(P), H.collapse(!1), p.removeAllRanges(), p.addRange(H), P.focus();
1482
+ if (!B && E.length > 0 && (B = E[0]), B) {
1483
+ const G = document.createRange();
1484
+ G.selectNodeContents(B), G.collapse(!1), f.removeAllRanges(), f.addRange(G), B.focus();
1485
1485
  } else
1486
- p.removeAllRanges();
1486
+ f.removeAllRanges();
1487
1487
  } else
1488
- p.removeAllRanges();
1488
+ f.removeAllRanges();
1489
1489
  }
1490
1490
  }, o = t.current;
1491
- return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend", f), o.addEventListener("input", s)), document.addEventListener("mousedown", I), document.addEventListener("mouseup", $), document.addEventListener("focusin", r), document.addEventListener("selectionchange", n), () => {
1491
+ return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend", y), o.addEventListener("input", i)), document.addEventListener("mousedown", T), document.addEventListener("mouseup", w), document.addEventListener("focusin", r), document.addEventListener("selectionchange", n), () => {
1492
1492
  const a = t.current;
1493
- a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend", f), a.removeEventListener("input", s)), document.removeEventListener("mousedown", I), document.removeEventListener("mouseup", $), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", n);
1493
+ a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend", y), a.removeEventListener("input", i)), document.removeEventListener("mousedown", T), document.removeEventListener("mouseup", w), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", n);
1494
1494
  };
1495
- }, [t, x]);
1495
+ }, [t, c]);
1496
1496
  }
1497
- function Bt(t) {
1497
+ function Yt(t) {
1498
1498
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1499
1499
  }
1500
- var De = { exports: {} }, Pt = De.exports, je;
1501
- function Ot() {
1502
- return je || (je = 1, function(t, x) {
1503
- (function(d, i) {
1504
- t.exports = i();
1505
- })(Pt, function() {
1506
- var d = 1e3, i = 6e4, u = 36e5, T = "millisecond", I = "second", $ = "minute", w = "hour", e = "day", q = "week", f = "month", s = "quarter", r = "year", n = "date", o = "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(l) {
1507
- var c = ["th", "st", "nd", "rd"], v = l % 100;
1508
- return "[" + l + (c[(v - 20) % 10] || c[v] || c[0]) + "]";
1509
- } }, g = function(l, c, v) {
1510
- var L = String(l);
1511
- return !L || L.length >= c ? l : "" + Array(c + 1 - L.length).join(v) + l;
1512
- }, b = { s: g, z: function(l) {
1513
- var c = -l.utcOffset(), v = Math.abs(c), L = Math.floor(v / 60), N = v % 60;
1514
- return (c <= 0 ? "+" : "-") + g(L, 2, "0") + ":" + g(N, 2, "0");
1515
- }, m: function l(c, v) {
1516
- if (c.date() < v.date()) return -l(v, c);
1517
- var L = 12 * (v.year() - c.year()) + (v.month() - c.month()), N = c.clone().add(L, f), W = v - N < 0, z = c.clone().add(L + (W ? -1 : 1), f);
1518
- return +(-(L + (v - N) / (W ? N - z : z - N)) || 0);
1519
- }, a: function(l) {
1520
- return l < 0 ? Math.ceil(l) || 0 : Math.floor(l);
1521
- }, p: function(l) {
1522
- return { M: f, y: r, w: q, d: e, D: n, h: w, m: $, s: I, ms: T, Q: s }[l] || String(l || "").toLowerCase().replace(/s$/, "");
1523
- }, u: function(l) {
1524
- return l === void 0;
1525
- } }, V = "en", k = {};
1526
- k[V] = y;
1527
- var P = "$isDayjsObject", H = function(l) {
1528
- return l instanceof ee || !(!l || !l[P]);
1529
- }, F = function l(c, v, L) {
1500
+ var Me = { exports: {} }, zt = Me.exports, Ue;
1501
+ function nt() {
1502
+ return Ue || (Ue = 1, function(t, c) {
1503
+ (function(l, s) {
1504
+ t.exports = s();
1505
+ })(zt, function() {
1506
+ var l = 1e3, s = 6e4, u = 36e5, C = "millisecond", T = "second", w = "minute", k = "hour", e = "day", q = "week", y = "month", i = "quarter", r = "year", n = "date", o = "Invalid Date", a = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, f = /\[([^\]]+)]|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, m = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(d) {
1507
+ var p = ["th", "st", "nd", "rd"], b = d % 100;
1508
+ return "[" + d + (p[(b - 20) % 10] || p[b] || p[0]) + "]";
1509
+ } }, v = function(d, p, b) {
1510
+ var L = String(d);
1511
+ return !L || L.length >= p ? d : "" + Array(p + 1 - L.length).join(b) + d;
1512
+ }, x = { s: v, z: function(d) {
1513
+ var p = -d.utcOffset(), b = Math.abs(p), L = Math.floor(b / 60), N = b % 60;
1514
+ return (p <= 0 ? "+" : "-") + v(L, 2, "0") + ":" + v(N, 2, "0");
1515
+ }, m: function d(p, b) {
1516
+ if (p.date() < b.date()) return -d(b, p);
1517
+ var L = 12 * (b.year() - p.year()) + (b.month() - p.month()), N = p.clone().add(L, y), z = b - N < 0, Y = p.clone().add(L + (z ? -1 : 1), y);
1518
+ return +(-(L + (b - N) / (z ? N - Y : Y - N)) || 0);
1519
+ }, a: function(d) {
1520
+ return d < 0 ? Math.ceil(d) || 0 : Math.floor(d);
1521
+ }, p: function(d) {
1522
+ return { M: y, y: r, w: q, d: e, D: n, h: k, m: w, s: T, ms: C, Q: i }[d] || String(d || "").toLowerCase().replace(/s$/, "");
1523
+ }, u: function(d) {
1524
+ return d === void 0;
1525
+ } }, V = "en", E = {};
1526
+ E[V] = m;
1527
+ var B = "$isDayjsObject", G = function(d) {
1528
+ return d instanceof ee || !(!d || !d[B]);
1529
+ }, F = function d(p, b, L) {
1530
1530
  var N;
1531
- if (!c) return V;
1532
- if (typeof c == "string") {
1533
- var W = c.toLowerCase();
1534
- k[W] && (N = W), v && (k[W] = v, N = W);
1535
- var z = c.split("-");
1536
- if (!N && z.length > 1) return l(z[0]);
1531
+ if (!p) return V;
1532
+ if (typeof p == "string") {
1533
+ var z = p.toLowerCase();
1534
+ E[z] && (N = z), b && (E[z] = b, N = z);
1535
+ var Y = p.split("-");
1536
+ if (!N && Y.length > 1) return d(Y[0]);
1537
1537
  } else {
1538
- var te = c.name;
1539
- k[te] = c, N = te;
1538
+ var te = p.name;
1539
+ E[te] = p, N = te;
1540
1540
  }
1541
1541
  return !L && N && (V = N), N || !L && V;
1542
- }, U = function(l, c) {
1543
- if (H(l)) return l.clone();
1544
- var v = typeof c == "object" ? c : {};
1545
- return v.date = l, v.args = arguments, new ee(v);
1546
- }, R = b;
1547
- R.l = F, R.i = H, R.w = function(l, c) {
1548
- return U(l, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1542
+ }, W = function(d, p) {
1543
+ if (G(d)) return d.clone();
1544
+ var b = typeof p == "object" ? p : {};
1545
+ return b.date = d, b.args = arguments, new ee(b);
1546
+ }, H = x;
1547
+ H.l = F, H.i = G, H.w = function(d, p) {
1548
+ return W(d, { locale: p.$L, utc: p.$u, x: p.$x, $offset: p.$offset });
1549
1549
  };
1550
1550
  var ee = function() {
1551
- function l(v) {
1552
- this.$L = F(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[P] = !0;
1551
+ function d(b) {
1552
+ this.$L = F(b.locale, null, !0), this.parse(b), this.$x = this.$x || b.x || {}, this[B] = !0;
1553
1553
  }
1554
- var c = l.prototype;
1555
- return c.parse = function(v) {
1554
+ var p = d.prototype;
1555
+ return p.parse = function(b) {
1556
1556
  this.$d = function(L) {
1557
- var N = L.date, W = L.utc;
1557
+ var N = L.date, z = L.utc;
1558
1558
  if (N === null) return /* @__PURE__ */ new Date(NaN);
1559
- if (R.u(N)) return /* @__PURE__ */ new Date();
1559
+ if (H.u(N)) return /* @__PURE__ */ new Date();
1560
1560
  if (N instanceof Date) return new Date(N);
1561
1561
  if (typeof N == "string" && !/Z$/i.test(N)) {
1562
- var z = N.match(a);
1563
- if (z) {
1564
- var te = z[2] - 1 || 0, se = (z[7] || "0").substring(0, 3);
1565
- return W ? new Date(Date.UTC(z[1], te, z[3] || 1, z[4] || 0, z[5] || 0, z[6] || 0, se)) : new Date(z[1], te, z[3] || 1, z[4] || 0, z[5] || 0, z[6] || 0, se);
1562
+ var Y = N.match(a);
1563
+ if (Y) {
1564
+ var te = Y[2] - 1 || 0, se = (Y[7] || "0").substring(0, 3);
1565
+ return z ? new Date(Date.UTC(Y[1], te, Y[3] || 1, Y[4] || 0, Y[5] || 0, Y[6] || 0, se)) : new Date(Y[1], te, Y[3] || 1, Y[4] || 0, Y[5] || 0, Y[6] || 0, se);
1566
1566
  }
1567
1567
  }
1568
1568
  return new Date(N);
1569
- }(v), this.init();
1570
- }, c.init = function() {
1571
- var v = this.$d;
1572
- 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();
1573
- }, c.$utils = function() {
1574
- return R;
1575
- }, c.isValid = function() {
1569
+ }(b), this.init();
1570
+ }, p.init = function() {
1571
+ var b = this.$d;
1572
+ this.$y = b.getFullYear(), this.$M = b.getMonth(), this.$D = b.getDate(), this.$W = b.getDay(), this.$H = b.getHours(), this.$m = b.getMinutes(), this.$s = b.getSeconds(), this.$ms = b.getMilliseconds();
1573
+ }, p.$utils = function() {
1574
+ return H;
1575
+ }, p.isValid = function() {
1576
1576
  return this.$d.toString() !== o;
1577
- }, c.isSame = function(v, L) {
1578
- var N = U(v);
1577
+ }, p.isSame = function(b, L) {
1578
+ var N = W(b);
1579
1579
  return this.startOf(L) <= N && N <= this.endOf(L);
1580
- }, c.isAfter = function(v, L) {
1581
- return U(v) < this.startOf(L);
1582
- }, c.isBefore = function(v, L) {
1583
- return this.endOf(L) < U(v);
1584
- }, c.$g = function(v, L, N) {
1585
- return R.u(v) ? this[L] : this.set(N, v);
1586
- }, c.unix = function() {
1580
+ }, p.isAfter = function(b, L) {
1581
+ return W(b) < this.startOf(L);
1582
+ }, p.isBefore = function(b, L) {
1583
+ return this.endOf(L) < W(b);
1584
+ }, p.$g = function(b, L, N) {
1585
+ return H.u(b) ? this[L] : this.set(N, b);
1586
+ }, p.unix = function() {
1587
1587
  return Math.floor(this.valueOf() / 1e3);
1588
- }, c.valueOf = function() {
1588
+ }, p.valueOf = function() {
1589
1589
  return this.$d.getTime();
1590
- }, c.startOf = function(v, L) {
1591
- var N = this, W = !!R.u(L) || L, z = R.p(v), te = function(he, ye) {
1592
- var xe = R.w(N.$u ? Date.UTC(N.$y, ye, he) : new Date(N.$y, ye, he), N);
1593
- return W ? xe : xe.endOf(e);
1590
+ }, p.startOf = function(b, L) {
1591
+ var N = this, z = !!H.u(L) || L, Y = H.p(b), te = function(he, ye) {
1592
+ var xe = H.w(N.$u ? Date.UTC(N.$y, ye, he) : new Date(N.$y, ye, he), N);
1593
+ return z ? xe : xe.endOf(e);
1594
1594
  }, se = function(he, ye) {
1595
- return R.w(N.toDate()[he].apply(N.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), N);
1595
+ return H.w(N.toDate()[he].apply(N.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), N);
1596
1596
  }, ce = this.$W, pe = this.$M, fe = this.$D, be = "set" + (this.$u ? "UTC" : "");
1597
- switch (z) {
1597
+ switch (Y) {
1598
1598
  case r:
1599
- return W ? te(1, 0) : te(31, 11);
1600
- case f:
1601
- return W ? te(1, pe) : te(0, pe + 1);
1599
+ return z ? te(1, 0) : te(31, 11);
1600
+ case y:
1601
+ return z ? te(1, pe) : te(0, pe + 1);
1602
1602
  case q:
1603
1603
  var X = this.$locale().weekStart || 0, ue = (ce < X ? ce + 7 : ce) - X;
1604
- return te(W ? fe - ue : fe + (6 - ue), pe);
1604
+ return te(z ? fe - ue : fe + (6 - ue), pe);
1605
1605
  case e:
1606
1606
  case n:
1607
1607
  return se(be + "Hours", 0);
1608
- case w:
1608
+ case k:
1609
1609
  return se(be + "Minutes", 1);
1610
- case $:
1610
+ case w:
1611
1611
  return se(be + "Seconds", 2);
1612
- case I:
1612
+ case T:
1613
1613
  return se(be + "Milliseconds", 3);
1614
1614
  default:
1615
1615
  return this.clone();
1616
1616
  }
1617
- }, c.endOf = function(v) {
1618
- return this.startOf(v, !1);
1619
- }, c.$set = function(v, L) {
1620
- var N, W = R.p(v), z = "set" + (this.$u ? "UTC" : ""), te = (N = {}, N[e] = z + "Date", N[n] = z + "Date", N[f] = z + "Month", N[r] = z + "FullYear", N[w] = z + "Hours", N[$] = z + "Minutes", N[I] = z + "Seconds", N[T] = z + "Milliseconds", N)[W], se = W === e ? this.$D + (L - this.$W) : L;
1621
- if (W === f || W === r) {
1617
+ }, p.endOf = function(b) {
1618
+ return this.startOf(b, !1);
1619
+ }, p.$set = function(b, L) {
1620
+ var N, z = H.p(b), Y = "set" + (this.$u ? "UTC" : ""), te = (N = {}, N[e] = Y + "Date", N[n] = Y + "Date", N[y] = Y + "Month", N[r] = Y + "FullYear", N[k] = Y + "Hours", N[w] = Y + "Minutes", N[T] = Y + "Seconds", N[C] = Y + "Milliseconds", N)[z], se = z === e ? this.$D + (L - this.$W) : L;
1621
+ if (z === y || z === r) {
1622
1622
  var ce = this.clone().set(n, 1);
1623
1623
  ce.$d[te](se), ce.init(), this.$d = ce.set(n, Math.min(this.$D, ce.daysInMonth())).$d;
1624
1624
  } else te && this.$d[te](se);
1625
1625
  return this.init(), this;
1626
- }, c.set = function(v, L) {
1627
- return this.clone().$set(v, L);
1628
- }, c.get = function(v) {
1629
- return this[R.p(v)]();
1630
- }, c.add = function(v, L) {
1631
- var N, W = this;
1632
- v = Number(v);
1633
- var z = R.p(L), te = function(pe) {
1634
- var fe = U(W);
1635
- return R.w(fe.date(fe.date() + Math.round(pe * v)), W);
1626
+ }, p.set = function(b, L) {
1627
+ return this.clone().$set(b, L);
1628
+ }, p.get = function(b) {
1629
+ return this[H.p(b)]();
1630
+ }, p.add = function(b, L) {
1631
+ var N, z = this;
1632
+ b = Number(b);
1633
+ var Y = H.p(L), te = function(pe) {
1634
+ var fe = W(z);
1635
+ return H.w(fe.date(fe.date() + Math.round(pe * b)), z);
1636
1636
  };
1637
- if (z === f) return this.set(f, this.$M + v);
1638
- if (z === r) return this.set(r, this.$y + v);
1639
- if (z === e) return te(1);
1640
- if (z === q) return te(7);
1641
- var se = (N = {}, N[$] = i, N[w] = u, N[I] = d, N)[z] || 1, ce = this.$d.getTime() + v * se;
1642
- return R.w(ce, this);
1643
- }, c.subtract = function(v, L) {
1644
- return this.add(-1 * v, L);
1645
- }, c.format = function(v) {
1637
+ if (Y === y) return this.set(y, this.$M + b);
1638
+ if (Y === r) return this.set(r, this.$y + b);
1639
+ if (Y === e) return te(1);
1640
+ if (Y === q) return te(7);
1641
+ var se = (N = {}, N[w] = s, N[k] = u, N[T] = l, N)[Y] || 1, ce = this.$d.getTime() + b * se;
1642
+ return H.w(ce, this);
1643
+ }, p.subtract = function(b, L) {
1644
+ return this.add(-1 * b, L);
1645
+ }, p.format = function(b) {
1646
1646
  var L = this, N = this.$locale();
1647
1647
  if (!this.isValid()) return N.invalidDate || o;
1648
- var W = v || "YYYY-MM-DDTHH:mm:ssZ", z = R.z(this), te = this.$H, se = this.$m, ce = this.$M, pe = N.weekdays, fe = N.months, be = N.meridiem, X = function(ye, xe, we, Ce) {
1649
- return ye && (ye[xe] || ye(L, W)) || we[xe].slice(0, Ce);
1648
+ var z = b || "YYYY-MM-DDTHH:mm:ssZ", Y = H.z(this), te = this.$H, se = this.$m, ce = this.$M, pe = N.weekdays, fe = N.months, be = N.meridiem, X = function(ye, xe, we, Ce) {
1649
+ return ye && (ye[xe] || ye(L, z)) || we[xe].slice(0, Ce);
1650
1650
  }, ue = function(ye) {
1651
- return R.s(te % 12 || 12, ye, "0");
1651
+ return H.s(te % 12 || 12, ye, "0");
1652
1652
  }, he = be || function(ye, xe, we) {
1653
1653
  var Ce = ye < 12 ? "AM" : "PM";
1654
1654
  return we ? Ce.toLowerCase() : Ce;
1655
1655
  };
1656
- return W.replace(p, function(ye, xe) {
1656
+ return z.replace(f, function(ye, xe) {
1657
1657
  return xe || function(we) {
1658
1658
  switch (we) {
1659
1659
  case "YY":
1660
1660
  return String(L.$y).slice(-2);
1661
1661
  case "YYYY":
1662
- return R.s(L.$y, 4, "0");
1662
+ return H.s(L.$y, 4, "0");
1663
1663
  case "M":
1664
1664
  return ce + 1;
1665
1665
  case "MM":
1666
- return R.s(ce + 1, 2, "0");
1666
+ return H.s(ce + 1, 2, "0");
1667
1667
  case "MMM":
1668
1668
  return X(N.monthsShort, ce, fe, 3);
1669
1669
  case "MMMM":
@@ -1671,7 +1671,7 @@ function Ot() {
1671
1671
  case "D":
1672
1672
  return L.$D;
1673
1673
  case "DD":
1674
- return R.s(L.$D, 2, "0");
1674
+ return H.s(L.$D, 2, "0");
1675
1675
  case "d":
1676
1676
  return String(L.$W);
1677
1677
  case "dd":
@@ -1683,7 +1683,7 @@ function Ot() {
1683
1683
  case "H":
1684
1684
  return String(te);
1685
1685
  case "HH":
1686
- return R.s(te, 2, "0");
1686
+ return H.s(te, 2, "0");
1687
1687
  case "h":
1688
1688
  return ue(1);
1689
1689
  case "hh":
@@ -1695,136 +1695,262 @@ function Ot() {
1695
1695
  case "m":
1696
1696
  return String(se);
1697
1697
  case "mm":
1698
- return R.s(se, 2, "0");
1698
+ return H.s(se, 2, "0");
1699
1699
  case "s":
1700
1700
  return String(L.$s);
1701
1701
  case "ss":
1702
- return R.s(L.$s, 2, "0");
1702
+ return H.s(L.$s, 2, "0");
1703
1703
  case "SSS":
1704
- return R.s(L.$ms, 3, "0");
1704
+ return H.s(L.$ms, 3, "0");
1705
1705
  case "Z":
1706
- return z;
1706
+ return Y;
1707
1707
  }
1708
1708
  return null;
1709
- }(ye) || z.replace(":", "");
1709
+ }(ye) || Y.replace(":", "");
1710
1710
  });
1711
- }, c.utcOffset = function() {
1711
+ }, p.utcOffset = function() {
1712
1712
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1713
- }, c.diff = function(v, L, N) {
1714
- var W, z = this, te = R.p(L), se = U(v), ce = (se.utcOffset() - this.utcOffset()) * i, pe = this - se, fe = function() {
1715
- return R.m(z, se);
1713
+ }, p.diff = function(b, L, N) {
1714
+ var z, Y = this, te = H.p(L), se = W(b), ce = (se.utcOffset() - this.utcOffset()) * s, pe = this - se, fe = function() {
1715
+ return H.m(Y, se);
1716
1716
  };
1717
1717
  switch (te) {
1718
1718
  case r:
1719
- W = fe() / 12;
1719
+ z = fe() / 12;
1720
1720
  break;
1721
- case f:
1722
- W = fe();
1721
+ case y:
1722
+ z = fe();
1723
1723
  break;
1724
- case s:
1725
- W = fe() / 3;
1724
+ case i:
1725
+ z = fe() / 3;
1726
1726
  break;
1727
1727
  case q:
1728
- W = (pe - ce) / 6048e5;
1728
+ z = (pe - ce) / 6048e5;
1729
1729
  break;
1730
1730
  case e:
1731
- W = (pe - ce) / 864e5;
1731
+ z = (pe - ce) / 864e5;
1732
1732
  break;
1733
- case w:
1734
- W = pe / u;
1733
+ case k:
1734
+ z = pe / u;
1735
1735
  break;
1736
- case $:
1737
- W = pe / i;
1736
+ case w:
1737
+ z = pe / s;
1738
1738
  break;
1739
- case I:
1740
- W = pe / d;
1739
+ case T:
1740
+ z = pe / l;
1741
1741
  break;
1742
1742
  default:
1743
- W = pe;
1743
+ z = pe;
1744
1744
  }
1745
- return N ? W : R.a(W);
1746
- }, c.daysInMonth = function() {
1747
- return this.endOf(f).$D;
1748
- }, c.$locale = function() {
1749
- return k[this.$L];
1750
- }, c.locale = function(v, L) {
1751
- if (!v) return this.$L;
1752
- var N = this.clone(), W = F(v, L, !0);
1753
- return W && (N.$L = W), N;
1754
- }, c.clone = function() {
1755
- return R.w(this.$d, this);
1756
- }, c.toDate = function() {
1745
+ return N ? z : H.a(z);
1746
+ }, p.daysInMonth = function() {
1747
+ return this.endOf(y).$D;
1748
+ }, p.$locale = function() {
1749
+ return E[this.$L];
1750
+ }, p.locale = function(b, L) {
1751
+ if (!b) return this.$L;
1752
+ var N = this.clone(), z = F(b, L, !0);
1753
+ return z && (N.$L = z), N;
1754
+ }, p.clone = function() {
1755
+ return H.w(this.$d, this);
1756
+ }, p.toDate = function() {
1757
1757
  return new Date(this.valueOf());
1758
- }, c.toJSON = function() {
1758
+ }, p.toJSON = function() {
1759
1759
  return this.isValid() ? this.toISOString() : null;
1760
- }, c.toISOString = function() {
1760
+ }, p.toISOString = function() {
1761
1761
  return this.$d.toISOString();
1762
- }, c.toString = function() {
1762
+ }, p.toString = function() {
1763
1763
  return this.$d.toUTCString();
1764
- }, l;
1764
+ }, d;
1765
1765
  }(), re = ee.prototype;
1766
- return U.prototype = re, [["$ms", T], ["$s", I], ["$m", $], ["$H", w], ["$W", e], ["$M", f], ["$y", r], ["$D", n]].forEach(function(l) {
1767
- re[l[1]] = function(c) {
1768
- return this.$g(c, l[0], l[1]);
1766
+ return W.prototype = re, [["$ms", C], ["$s", T], ["$m", w], ["$H", k], ["$W", e], ["$M", y], ["$y", r], ["$D", n]].forEach(function(d) {
1767
+ re[d[1]] = function(p) {
1768
+ return this.$g(p, d[0], d[1]);
1769
1769
  };
1770
- }), U.extend = function(l, c) {
1771
- return l.$i || (l(c, ee, U), l.$i = !0), U;
1772
- }, U.locale = F, U.isDayjs = H, U.unix = function(l) {
1773
- return U(1e3 * l);
1774
- }, U.en = k[V], U.Ls = k, U.p = {}, U;
1770
+ }), W.extend = function(d, p) {
1771
+ return d.$i || (d(p, ee, W), d.$i = !0), W;
1772
+ }, W.locale = F, W.isDayjs = G, W.unix = function(d) {
1773
+ return W(1e3 * d);
1774
+ }, W.en = E[V], W.Ls = E, W.p = {}, W;
1775
+ });
1776
+ }(Me)), Me.exports;
1777
+ }
1778
+ var jt = nt();
1779
+ const Ie = /* @__PURE__ */ Yt(jt);
1780
+ var Ve = { exports: {} }, Wt = Ve.exports, Ke;
1781
+ function Ut() {
1782
+ return Ke || (Ke = 1, function(t, c) {
1783
+ (function(l, s) {
1784
+ t.exports = s(nt());
1785
+ })(Wt, function(l) {
1786
+ function s(T) {
1787
+ return T && typeof T == "object" && "default" in T ? T : { default: T };
1788
+ }
1789
+ var u = s(l), C = { 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(T, w) {
1790
+ return w === "W" ? T + "周" : T + "日";
1791
+ }, 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(T, w) {
1792
+ var k = 100 * T + w;
1793
+ return k < 600 ? "凌晨" : k < 900 ? "早上" : k < 1100 ? "上午" : k < 1300 ? "中午" : k < 1800 ? "下午" : "晚上";
1794
+ } };
1795
+ return u.default.locale(C, null, !0), C;
1796
+ });
1797
+ }(Ve)), Ve.exports;
1798
+ }
1799
+ Ut();
1800
+ function qe(t) {
1801
+ "@babel/helpers - typeof";
1802
+ return qe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(c) {
1803
+ return typeof c;
1804
+ } : function(c) {
1805
+ return c && typeof Symbol == "function" && c.constructor === Symbol && c !== Symbol.prototype ? "symbol" : typeof c;
1806
+ }, qe(t);
1807
+ }
1808
+ function Kt(t, c) {
1809
+ if (qe(t) != "object" || !t) return t;
1810
+ var l = t[Symbol.toPrimitive];
1811
+ if (l !== void 0) {
1812
+ var s = l.call(t, c);
1813
+ if (qe(s) != "object") return s;
1814
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1815
+ }
1816
+ return (c === "string" ? String : Number)(t);
1817
+ }
1818
+ function Xt(t) {
1819
+ var c = Kt(t, "string");
1820
+ return qe(c) == "symbol" ? c : c + "";
1821
+ }
1822
+ function Jt(t, c, l) {
1823
+ return (c = Xt(c)) in t ? Object.defineProperty(t, c, {
1824
+ value: l,
1825
+ enumerable: !0,
1826
+ configurable: !0,
1827
+ writable: !0
1828
+ }) : t[c] = l, t;
1829
+ }
1830
+ function Xe(t, c) {
1831
+ var l = Object.keys(t);
1832
+ if (Object.getOwnPropertySymbols) {
1833
+ var s = Object.getOwnPropertySymbols(t);
1834
+ c && (s = s.filter(function(u) {
1835
+ return Object.getOwnPropertyDescriptor(t, u).enumerable;
1836
+ })), l.push.apply(l, s);
1837
+ }
1838
+ return l;
1839
+ }
1840
+ function Je(t) {
1841
+ for (var c = 1; c < arguments.length; c++) {
1842
+ var l = arguments[c] != null ? arguments[c] : {};
1843
+ c % 2 ? Xe(Object(l), !0).forEach(function(s) {
1844
+ Jt(t, s, l[s]);
1845
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(l)) : Xe(Object(l)).forEach(function(s) {
1846
+ Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(l, s));
1775
1847
  });
1776
- }(De)), De.exports;
1848
+ }
1849
+ return t;
1777
1850
  }
1778
- var Rt = Ot();
1779
- const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, onChange: x }) => {
1780
- const d = t.dataset.key, i = t.dataset.value, u = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, I = t.dataset.disableFuture === "true", [$, w] = ne(() => {
1781
- if (!i) return null;
1782
- const o = i.split(",");
1783
- return o.length === 2 && o[0] && o[1] ? [Ve(o[0]), Ve(o[1])] : null;
1851
+ var Qt = {
1852
+ yearFormat: "YYYY",
1853
+ dayFormat: "D",
1854
+ cellMeridiemFormat: "A",
1855
+ monthBeforeYear: !0
1856
+ }, Zt = Je(Je({}, Qt), {}, {
1857
+ locale: "zh_CN",
1858
+ today: "今天",
1859
+ now: "此刻",
1860
+ backToToday: "返回今天",
1861
+ ok: "确定",
1862
+ timeSelect: "选择时间",
1863
+ dateSelect: "选择日期",
1864
+ weekSelect: "选择周",
1865
+ clear: "清除",
1866
+ week: "周",
1867
+ month: "月",
1868
+ year: "年",
1869
+ previousMonth: "上个月 (翻页上键)",
1870
+ nextMonth: "下个月 (翻页下键)",
1871
+ monthSelect: "选择月份",
1872
+ yearSelect: "选择年份",
1873
+ decadeSelect: "选择年代",
1874
+ previousYear: "上一年 (Control键加左方向键)",
1875
+ nextYear: "下一年 (Control键加右方向键)",
1876
+ previousDecade: "上一年代",
1877
+ nextDecade: "下一年代",
1878
+ previousCentury: "上一世纪",
1879
+ nextCentury: "下一世纪",
1880
+ yearFormat: "YYYY年",
1881
+ cellDateFormat: "D",
1882
+ monthBeforeYear: !1
1883
+ });
1884
+ const en = {
1885
+ placeholder: "请选择时间",
1886
+ rangePlaceholder: ["开始时间", "结束时间"]
1887
+ }, at = {
1888
+ lang: Object.assign({
1889
+ placeholder: "请选择日期",
1890
+ yearPlaceholder: "请选择年份",
1891
+ quarterPlaceholder: "请选择季度",
1892
+ monthPlaceholder: "请选择月份",
1893
+ weekPlaceholder: "请选择周",
1894
+ rangePlaceholder: ["开始日期", "结束日期"],
1895
+ rangeYearPlaceholder: ["开始年份", "结束年份"],
1896
+ rangeMonthPlaceholder: ["开始月份", "结束月份"],
1897
+ rangeQuarterPlaceholder: ["开始季度", "结束季度"],
1898
+ rangeWeekPlaceholder: ["开始周", "结束周"]
1899
+ }, Zt),
1900
+ timePickerLocale: Object.assign({}, en)
1901
+ };
1902
+ at.lang.ok = "确定";
1903
+ Ie.locale("zh-cn");
1904
+ const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
1905
+ const l = t.dataset.key, s = t.dataset.value, u = t.dataset.placeholder, C = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, T = t.dataset.disableFuture === "true", [w, k] = ne(() => {
1906
+ if (!s) return null;
1907
+ const o = s.split(",");
1908
+ return o.length === 2 && o[0] && o[1] ? [Ie(o[0]), Ie(o[1])] : null;
1784
1909
  }), [e, q] = ne(null);
1785
- return Xe(
1786
- /* @__PURE__ */ E("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "240px" }, children: /* @__PURE__ */ E(
1787
- Gt,
1910
+ return tt(
1911
+ /* @__PURE__ */ $("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "240px" }, children: /* @__PURE__ */ $(
1912
+ tn,
1788
1913
  {
1789
- value: $,
1790
- disabledDate: (o) => o ? I && o.isAfter(Ve(), "day") ? !0 : !T || !e || !e[0] ? !1 : Math.abs(o.diff(e[0], "days")) > T : !1,
1914
+ value: w,
1915
+ disabledDate: (o) => o ? T && o.isAfter(Ie(), "day") ? !0 : !C || !e || !e[0] ? !1 : Math.abs(o.diff(e[0], "days")) > C : !1,
1791
1916
  onCalendarChange: (o) => {
1792
1917
  console.log("[DatePicker] onCalendarChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), q(o);
1793
1918
  },
1794
1919
  onChange: (o) => {
1795
- if (console.log("[DatePicker] onChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), w(o), q(null), o && o[0] && o[1]) {
1920
+ if (console.log("[DatePicker] onChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), k(o), q(null), o && o[0] && o[1]) {
1796
1921
  const a = `${o[0].format("YYYY-MM-DD")},${o[1].format("YYYY-MM-DD")}`;
1797
- t.setAttribute("data-value", a), x(d, a);
1922
+ t.setAttribute("data-value", a), c(l, a);
1798
1923
  } else
1799
- t.setAttribute("data-value", ""), x(d, "");
1924
+ t.setAttribute("data-value", ""), c(l, "");
1800
1925
  },
1801
1926
  onOpenChange: (o) => {
1802
- console.log("[DatePicker] onOpenChange", o), q(o ? $ : null);
1927
+ console.log("[DatePicker] onOpenChange", o), q(o ? w : null);
1803
1928
  },
1804
1929
  placeholder: [u || "开始日期", u || "结束日期"],
1805
1930
  style: { width: "100%" },
1806
1931
  size: "small",
1807
1932
  allowClear: !0,
1933
+ locale: at,
1808
1934
  getPopupContainer: () => document.body,
1809
1935
  popupClassName: "rte-datepicker-dropdown"
1810
1936
  }
1811
1937
  ) }),
1812
1938
  t
1813
1939
  );
1814
- }, Ft = (t) => {
1815
- const [x, d] = ne([]);
1940
+ }, an = (t) => {
1941
+ const [c, l] = ne([]);
1816
1942
  return de(() => {
1817
- const i = t.current;
1818
- if (!i) return;
1943
+ const s = t.current;
1944
+ if (!s) return;
1819
1945
  const u = () => {
1820
- const I = i.querySelectorAll(".rte-datepicker-host"), $ = [];
1821
- I.forEach((w) => {
1822
- const e = w.getAttribute("data-key");
1823
- e && $.push(
1824
- /* @__PURE__ */ E(
1825
- Ht,
1946
+ const T = s.querySelectorAll(".rte-datepicker-host"), w = [];
1947
+ T.forEach((k) => {
1948
+ const e = k.getAttribute("data-key");
1949
+ e && w.push(
1950
+ /* @__PURE__ */ $(
1951
+ nn,
1826
1952
  {
1827
- host: w,
1953
+ host: k,
1828
1954
  onChange: () => {
1829
1955
  if (t.current) {
1830
1956
  const q = new Event("input", { bubbles: !0 });
@@ -1835,278 +1961,278 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
1835
1961
  `datepicker-${e}`
1836
1962
  )
1837
1963
  );
1838
- }), d($);
1964
+ }), l(w);
1839
1965
  };
1840
1966
  u();
1841
- const T = new MutationObserver((I) => {
1842
- let $ = !1;
1843
- for (const w of I)
1844
- if (w.type === "childList") {
1967
+ const C = new MutationObserver((T) => {
1968
+ let w = !1;
1969
+ for (const k of T)
1970
+ if (k.type === "childList") {
1845
1971
  let e = !1;
1846
- if (w.addedNodes.forEach((q) => {
1972
+ if (k.addedNodes.forEach((q) => {
1847
1973
  if (q.nodeType === Node.ELEMENT_NODE) {
1848
- const f = q;
1849
- (f.classList?.contains("rte-datepicker-host") || f.querySelector?.(".rte-datepicker-host")) && (e = !0);
1974
+ const y = q;
1975
+ (y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
1850
1976
  }
1851
- }), w.removedNodes.forEach((q) => {
1977
+ }), k.removedNodes.forEach((q) => {
1852
1978
  if (q.nodeType === Node.ELEMENT_NODE) {
1853
- const f = q;
1854
- (f.classList?.contains("rte-datepicker-host") || f.querySelector?.(".rte-datepicker-host")) && (e = !0);
1979
+ const y = q;
1980
+ (y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
1855
1981
  }
1856
1982
  }), e) {
1857
- $ = !0;
1983
+ w = !0;
1858
1984
  break;
1859
1985
  }
1860
1986
  }
1861
- $ && u();
1987
+ w && u();
1862
1988
  });
1863
- return T.observe(i, { childList: !0, subtree: !0 }), () => T.disconnect();
1864
- }, [t]), x;
1865
- }, zt = ({
1989
+ return C.observe(s, { childList: !0, subtree: !0 }), () => C.disconnect();
1990
+ }, [t]), c;
1991
+ }, rn = ({
1866
1992
  config: t,
1867
- onSend: x,
1868
- isProcessing: d = !1,
1869
- disabled: i = !1,
1993
+ onSend: c,
1994
+ isProcessing: l = !1,
1995
+ disabled: s = !1,
1870
1996
  width: u,
1871
- lockStructure: T = !1,
1872
- agentOptions: I = [],
1873
- onAgentSelect: $,
1874
- onAgentExit: w,
1997
+ lockStructure: C = !1,
1998
+ agentOptions: T = [],
1999
+ onAgentSelect: w,
2000
+ onAgentExit: k,
1875
2001
  loading: e = !1,
1876
2002
  placeholder: q,
1877
- border: f,
1878
- background: s = "transparent",
2003
+ border: y,
2004
+ background: i = "transparent",
1879
2005
  hideButtons: r
1880
2006
  }) => {
1881
- const n = Q(null), o = Q(null), [a, p] = ne({}), [y, g] = ne(null), [b, V] = ne(null), k = Q(!1), P = Q(null), [H, F] = ne(!1), U = Q(null), [R, ee] = ne(!0), [re, l] = ne(() => {
1882
- const h = {};
1883
- return t.forEach((m) => {
1884
- m.type === "multi-variable" && m.key && (h[m.key] = 1);
1885
- }), h;
1886
- }), c = Q({}), v = Q({}), L = Q({});
2007
+ const n = Q(null), o = Q(null), [a, f] = ne({}), [m, v] = ne(null), [x, V] = ne(null), E = Q(!1), B = Q(null), [G, F] = ne(!1), W = Q(null), [H, ee] = ne(!0), [re, d] = ne(() => {
2008
+ const g = {};
2009
+ return t.forEach((h) => {
2010
+ h.type === "multi-variable" && h.key && (g[h.key] = 1);
2011
+ }), g;
2012
+ }), p = Q({}), b = Q({}), L = Q({});
1887
2013
  de(() => {
1888
- v.current = a;
2014
+ b.current = a;
1889
2015
  }, [a]), de(() => {
1890
2016
  L.current = re;
1891
2017
  }, [re]);
1892
- const N = ae((h) => h.find((C) => C.type === "tag")?.text || null, []), W = Q(t), z = Q(null);
2018
+ const N = ae((g) => g.find((S) => S.type === "tag")?.text || null, []), z = Q(t), Y = Q(null);
1893
2019
  de(() => {
1894
- const h = N(W.current), m = N(t);
1895
- if (h && h !== m && n.current) {
1896
- const C = {};
1897
- n.current.querySelectorAll('[data-type="variable"]').forEach((A) => {
1898
- const G = A.dataset.key;
1899
- if (G) {
1900
- const D = A.innerText.replace(/[\u200B\n]/g, "").trim();
1901
- D && (C[G] = D);
2020
+ const g = N(z.current), h = N(t);
2021
+ if (g && g !== h && n.current) {
2022
+ const S = {};
2023
+ n.current.querySelectorAll('[data-type="variable"]').forEach((_) => {
2024
+ const R = _.dataset.key;
2025
+ if (R) {
2026
+ const M = _.innerText.replace(/[\u200B\n]/g, "").trim();
2027
+ M && (S[R] = M);
1902
2028
  }
1903
- }), n.current.querySelectorAll('[data-type="select"]').forEach((A) => {
1904
- const G = A.dataset.key;
1905
- if (G) {
1906
- const D = A.value.trim();
1907
- D && (C[G] = D);
2029
+ }), n.current.querySelectorAll('[data-type="select"]').forEach((_) => {
2030
+ const R = _.dataset.key;
2031
+ if (R) {
2032
+ const M = _.value.trim();
2033
+ M && (S[R] = M);
1908
2034
  }
1909
- }), n.current.querySelectorAll('[data-type="textarea"]').forEach((A) => {
1910
- const G = A.dataset.key;
1911
- if (G) {
1912
- const D = A.value.replace(/[\u200B]/g, "").trim();
1913
- D && (C[G] = D);
2035
+ }), n.current.querySelectorAll('[data-type="textarea"]').forEach((_) => {
2036
+ const R = _.dataset.key;
2037
+ if (R) {
2038
+ const M = _.value.replace(/[\u200B]/g, "").trim();
2039
+ M && (S[R] = M);
1914
2040
  }
1915
- }), c.current[h] = {
1916
- variableValues: C,
1917
- files: { ...v.current },
2041
+ }), p.current[g] = {
2042
+ variableValues: S,
2043
+ files: { ...b.current },
1918
2044
  multiVariableCounts: { ...L.current }
1919
2045
  };
1920
2046
  }
1921
- if (m && c.current[m]) {
1922
- const C = c.current[m];
1923
- z.current = C, p(C.files), l(C.multiVariableCounts);
1924
- } else if (m) {
1925
- z.current = null;
1926
- const C = {};
1927
- t.forEach((M) => {
1928
- M.type === "multi-variable" && M.key && (C[M.key] = 1);
1929
- }), l(C), p({});
2047
+ if (h && p.current[h]) {
2048
+ const S = p.current[h];
2049
+ Y.current = S, f(S.files), d(S.multiVariableCounts);
2050
+ } else if (h) {
2051
+ Y.current = null;
2052
+ const S = {};
2053
+ t.forEach((I) => {
2054
+ I.type === "multi-variable" && I.key && (S[I.key] = 1);
2055
+ }), d(S), f({});
1930
2056
  } else
1931
- z.current = null, l({}), p({});
1932
- W.current = t;
1933
- }, [t, N]), ze(() => {
1934
- z.current && n.current && (n.current.__tempVariableValues = z.current.variableValues, setTimeout(() => {
1935
- z.current && (z.current = null);
2057
+ Y.current = null, d({}), f({});
2058
+ z.current = t;
2059
+ }, [t, N]), je(() => {
2060
+ Y.current && n.current && (n.current.__tempVariableValues = Y.current.variableValues, setTimeout(() => {
2061
+ Y.current && (Y.current = null);
1936
2062
  }, 0));
1937
- }), At(n, t, a, T, re, U, void 0, r), Lt(n, t, a, V), _t(n, t, V, r), It(n, t, a, V), Dt(n, t, V), Mt(n, t, a, F), Vt(n, k);
1938
- const te = Ft(n);
2063
+ }), Pt(n, t, a, C, re, W, void 0, r), Bt(n, t, a, V), Ot(n, t, V, r), Rt(n, t, a, V), Ht(n, t, V), Gt(n, t, a, F), Ft(n, E);
2064
+ const te = an(n);
1939
2065
  de(() => {
1940
2066
  if (t.length > 0) {
1941
2067
  ee(!1);
1942
2068
  return;
1943
2069
  }
1944
- const h = () => {
2070
+ const g = () => {
1945
2071
  if (!n.current) {
1946
2072
  ee(!0);
1947
2073
  return;
1948
2074
  }
1949
- const C = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", M = n.current.querySelectorAll('[data-type="variable"]'), S = n.current.querySelectorAll('[data-type="upload"]');
1950
- let _ = !1;
1951
- M.forEach((G) => {
1952
- (G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (_ = !0);
1953
- }), S.forEach((G) => {
1954
- G.querySelector(".upload-inner-wrapper.has-file") && (_ = !0);
2075
+ const S = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", I = n.current.querySelectorAll('[data-type="variable"]'), A = n.current.querySelectorAll('[data-type="upload"]');
2076
+ let D = !1;
2077
+ I.forEach((R) => {
2078
+ (R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (D = !0);
2079
+ }), A.forEach((R) => {
2080
+ R.querySelector(".upload-inner-wrapper.has-file") && (D = !0);
1955
2081
  });
1956
- const A = !C && !_;
1957
- ee(A), t.length === 0 && F(!A);
2082
+ const _ = !S && !D;
2083
+ ee(_), t.length === 0 && F(!_);
1958
2084
  };
1959
- h();
1960
- const m = new MutationObserver(h);
1961
- return n.current && m.observe(n.current, {
2085
+ g();
2086
+ const h = new MutationObserver(g);
2087
+ return n.current && h.observe(n.current, {
1962
2088
  childList: !0,
1963
2089
  subtree: !0,
1964
2090
  characterData: !0
1965
2091
  }), () => {
1966
- m.disconnect();
2092
+ h.disconnect();
1967
2093
  };
1968
2094
  }, [t]);
1969
- const se = (h) => {
1970
- if (i) {
1971
- h.preventDefault();
2095
+ const se = (g) => {
2096
+ if (s) {
2097
+ g.preventDefault();
1972
2098
  return;
1973
2099
  }
1974
- h.preventDefault();
1975
- const m = h.clipboardData.getData("text/plain"), C = window.getSelection();
1976
- if (C && C.rangeCount > 0) {
1977
- const M = C.anchorNode;
1978
- if (M) {
1979
- let S = null;
1980
- if (M.nodeType === Node.ELEMENT_NODE ? S = M.closest('[data-type="variable"]') : M.nodeType === Node.TEXT_NODE && M.parentElement && (S = M.parentElement.closest('[data-type="variable"]')), S) {
1981
- const _ = S.dataset.multiKey;
1982
- if (_) {
1983
- const A = /[、,,\s\n\r\t]+/, G = m.split(A).map((D) => D.trim()).filter((D) => D.length > 0);
1984
- if (console.log("[Paste Event] 粘贴的内容:", m), console.log("[Paste Event] 拆分后的值:", G), G.length > 1) {
1985
- const D = parseInt(S.dataset.index || "0", 10), j = t.find((le) => le.type === "multi-variable" && le.key === _)?.maxCount || 9, Y = re[_] || 1, B = Math.min(D + G.length, j);
1986
- B > Y && l((J) => ({
2100
+ g.preventDefault();
2101
+ const h = g.clipboardData.getData("text/plain"), S = window.getSelection();
2102
+ if (S && S.rangeCount > 0) {
2103
+ const I = S.anchorNode;
2104
+ if (I) {
2105
+ let A = null;
2106
+ if (I.nodeType === Node.ELEMENT_NODE ? A = I.closest('[data-type="variable"]') : I.nodeType === Node.TEXT_NODE && I.parentElement && (A = I.parentElement.closest('[data-type="variable"]')), A) {
2107
+ const D = A.dataset.multiKey;
2108
+ if (D) {
2109
+ const _ = /[、,,\s\n\r\t]+/, R = h.split(_).map((M) => M.trim()).filter((M) => M.length > 0);
2110
+ if (console.log("[Paste Event] 粘贴的内容:", h), console.log("[Paste Event] 拆分后的值:", R), R.length > 1) {
2111
+ const M = parseInt(A.dataset.index || "0", 10), j = t.find((ie) => ie.type === "multi-variable" && ie.key === D)?.maxCount || 9, U = re[D] || 1, P = Math.min(M + R.length, j);
2112
+ P > U && d((J) => ({
1987
2113
  ...J,
1988
- [_]: B
2114
+ [D]: P
1989
2115
  }));
1990
2116
  const K = [];
1991
- for (let J = 0; J < Y; J++) {
1992
- const le = `${_}_${J}`, ge = n.current.querySelector(
1993
- `[data-type="variable"][data-key="${le}"][data-multi-key="${_}"]`
2117
+ for (let J = 0; J < U; J++) {
2118
+ const ie = `${D}_${J}`, ge = n.current.querySelector(
2119
+ `[data-type="variable"][data-key="${ie}"][data-multi-key="${D}"]`
1994
2120
  );
1995
2121
  if (ge) {
1996
2122
  const ke = ge.innerText.replace(/[\u200B\n]/g, "").trim();
1997
2123
  K.push(ke);
1998
2124
  }
1999
2125
  }
2000
- K.splice(D, 1, ...G.slice(0, j - D));
2126
+ K.splice(M, 1, ...R.slice(0, j - M));
2001
2127
  const oe = K.slice(0, j);
2002
2128
  oe.length > 0 && oe[oe.length - 1] !== "" && oe.length < j && oe.push("");
2003
- const O = Math.max(oe.length, 1), ie = {};
2004
- oe.forEach((J, le) => {
2005
- J && (ie[`${_}_${le}`] = J);
2129
+ const O = Math.max(oe.length, 1), le = {};
2130
+ oe.forEach((J, ie) => {
2131
+ J && (le[`${D}_${ie}`] = J);
2006
2132
  }), n.current.querySelectorAll(
2007
2133
  '[data-type="variable"]'
2008
2134
  ).forEach((J) => {
2009
- const le = J.dataset.key, ge = J.dataset.multiKey;
2010
- if (le && ge !== _) {
2135
+ const ie = J.dataset.key, ge = J.dataset.multiKey;
2136
+ if (ie && ge !== D) {
2011
2137
  const ke = J.innerText.replace(/[\u200B\n]/g, "").trim();
2012
- ke && (ie[le] = ke);
2138
+ ke && (le[ie] = ke);
2013
2139
  }
2014
- }), n.current.__tempVariableValues = ie, l((J) => ({
2140
+ }), n.current.__tempVariableValues = le, d((J) => ({
2015
2141
  ...J,
2016
- [_]: O
2142
+ [D]: O
2017
2143
  })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", oe);
2018
2144
  return;
2019
- } else G.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2145
+ } else R.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2020
2146
  }
2021
2147
  }
2022
2148
  }
2023
2149
  }
2024
- document.execCommand("insertText", !1, m), ye(), setTimeout(() => {
2025
- const M = window.getSelection();
2026
- if (M && M.rangeCount > 0) {
2027
- const S = M.anchorNode;
2028
- if (S) {
2029
- let _ = null;
2030
- if (S.nodeType === Node.ELEMENT_NODE ? _ = S.closest('[data-type="variable"][data-multi-key]') : S.nodeType === Node.TEXT_NODE && S.parentElement && (_ = S.parentElement.closest('[data-type="variable"][data-multi-key]')), _) {
2031
- const A = _.innerText.replace(/[\u200B\n]/g, "").trim();
2032
- /[、,,\s]+/.test(A) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", A), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
2150
+ document.execCommand("insertText", !1, h), ye(), setTimeout(() => {
2151
+ const I = window.getSelection();
2152
+ if (I && I.rangeCount > 0) {
2153
+ const A = I.anchorNode;
2154
+ if (A) {
2155
+ let D = null;
2156
+ if (A.nodeType === Node.ELEMENT_NODE ? D = A.closest('[data-type="variable"][data-multi-key]') : A.nodeType === Node.TEXT_NODE && A.parentElement && (D = A.parentElement.closest('[data-type="variable"][data-multi-key]')), D) {
2157
+ const _ = D.innerText.replace(/[\u200B\n]/g, "").trim();
2158
+ /[、,,\s]+/.test(_) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", _), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
2033
2159
  }
2034
2160
  }
2035
2161
  }
2036
2162
  }, 0);
2037
- }, ce = (h) => {
2038
- if (h.target.files && h.target.files[0] && y) {
2039
- const m = h.target.files[0], C = y;
2040
- p((M) => ({ ...M, [C]: m }));
2163
+ }, ce = (g) => {
2164
+ if (g.target.files && g.target.files[0] && m) {
2165
+ const h = g.target.files[0], S = m;
2166
+ f((I) => ({ ...I, [S]: h }));
2041
2167
  }
2042
- h.target && (h.target.value = ""), g(null);
2043
- }, pe = (h) => {
2044
- p((m) => {
2045
- const C = { ...m };
2046
- return delete C[h], C;
2168
+ g.target && (g.target.value = ""), v(null);
2169
+ }, pe = (g) => {
2170
+ f((h) => {
2171
+ const S = { ...h };
2172
+ return delete S[g], S;
2047
2173
  });
2048
- }, fe = (h) => {
2049
- const m = h.target;
2050
- if (m.closest(".rte-datepicker-wrapper") || m.closest(".rte-datepicker-host"))
2174
+ }, fe = (g) => {
2175
+ const h = g.target;
2176
+ if (h.closest(".rte-datepicker-wrapper") || h.closest(".rte-datepicker-host"))
2051
2177
  return;
2052
- if (m.closest(".tag-close-btn")) {
2053
- if (h.preventDefault(), h.stopPropagation(), T)
2178
+ if (h.closest(".tag-close-btn")) {
2179
+ if (g.preventDefault(), g.stopPropagation(), C)
2054
2180
  return;
2055
- V(null), w ? w() : n.current && (n.current.innerHTML = "", n.current.focus());
2181
+ V(null), k ? k() : n.current && (n.current.innerHTML = "", n.current.focus());
2056
2182
  return;
2057
2183
  }
2058
- if (T) {
2059
- const S = m.closest(".tag-node"), _ = m.closest('[data-type="text"]');
2060
- if (S || _) {
2061
- h.preventDefault(), h.stopPropagation();
2062
- const A = window.getSelection();
2063
- A && A.removeAllRanges();
2184
+ if (C) {
2185
+ const A = h.closest(".tag-node"), D = h.closest('[data-type="text"]');
2186
+ if (A || D) {
2187
+ g.preventDefault(), g.stopPropagation();
2188
+ const _ = window.getSelection();
2189
+ _ && _.removeAllRanges();
2064
2190
  return;
2065
2191
  }
2066
2192
  }
2067
- m.closest('[data-type="variable"]') || (P.current = { x: h.clientX, y: h.clientY }, k.current = !1, m.closest(".file-remove-btn") && (h.preventDefault(), h.stopPropagation()));
2068
- }, be = (h) => {
2069
- if (!h.target.closest('[data-type="variable"]') && P.current) {
2070
- const M = Math.abs(h.clientX - P.current.x), S = Math.abs(h.clientY - P.current.y);
2071
- (M > 3 || S > 3) && (k.current = !0);
2193
+ h.closest('[data-type="variable"]') || (B.current = { x: g.clientX, y: g.clientY }, E.current = !1, h.closest(".file-remove-btn") && (g.preventDefault(), g.stopPropagation()));
2194
+ }, be = (g) => {
2195
+ if (!g.target.closest('[data-type="variable"]') && B.current) {
2196
+ const I = Math.abs(g.clientX - B.current.x), A = Math.abs(g.clientY - B.current.y);
2197
+ (I > 3 || A > 3) && (E.current = !0);
2072
2198
  }
2073
- }, X = (h) => {
2074
- if (h.target.closest('[data-type="variable"]')) {
2075
- P.current = null, k.current = !1;
2199
+ }, X = (g) => {
2200
+ if (g.target.closest('[data-type="variable"]')) {
2201
+ B.current = null, E.current = !1;
2076
2202
  return;
2077
2203
  }
2078
- P.current = null, k.current = !1;
2079
- }, ue = (h) => {
2080
- if (i)
2204
+ B.current = null, E.current = !1;
2205
+ }, ue = (g) => {
2206
+ if (s)
2081
2207
  return;
2082
- const m = h.target;
2083
- if (m.closest('[data-type="datepicker"]'))
2208
+ const h = g.target;
2209
+ if (h.closest('[data-type="datepicker"]'))
2084
2210
  return;
2085
- if (m.closest(".tag-close-btn")) {
2086
- h.preventDefault(), h.stopPropagation();
2211
+ if (h.closest(".tag-close-btn")) {
2212
+ g.preventDefault(), g.stopPropagation();
2087
2213
  return;
2088
2214
  }
2089
2215
  if (t.length === 0)
2090
2216
  return;
2091
- const S = (B, K) => {
2217
+ const A = (P, K) => {
2092
2218
  if (!n.current) return;
2093
2219
  Array.from(n.current.children).forEach((O) => {
2094
- if (O !== B)
2220
+ if (O !== P)
2095
2221
  if (K)
2096
2222
  O.dataset.prevDisplay === void 0 && (O.dataset.prevDisplay = O.style.display || ""), O.style.setProperty("display", "none", "important");
2097
2223
  else if (O.dataset.prevDisplay !== void 0) {
2098
- const ie = O.dataset.prevDisplay;
2099
- ie ? O.style.display = ie : O.style.removeProperty("display"), delete O.dataset.prevDisplay;
2224
+ const le = O.dataset.prevDisplay;
2225
+ le ? O.style.display = le : O.style.removeProperty("display"), delete O.dataset.prevDisplay;
2100
2226
  } else
2101
2227
  O.style.removeProperty("display");
2102
2228
  });
2103
- }, _ = m.closest(".rte-textarea-toggle");
2104
- if (_) {
2105
- h.preventDefault(), h.stopPropagation();
2106
- const B = _.closest(".rte-textarea-wrapper"), K = B?.querySelector('[data-type="textarea"]'), O = !(_.getAttribute("data-expanded") === "true");
2107
- _.setAttribute("data-expanded", String(O)), _.textContent = O ? "收起" : "展开", B && B.classList.toggle("rte-textarea-expanded", O);
2108
- const ie = B?.closest(".rte-textarea-required");
2109
- if (ie ? ie.classList.toggle("rte-textarea-overlay", O) : B && B.classList.toggle("rte-textarea-overlay", O), K)
2229
+ }, D = h.closest(".rte-textarea-toggle");
2230
+ if (D) {
2231
+ g.preventDefault(), g.stopPropagation();
2232
+ const P = D.closest(".rte-textarea-wrapper"), K = P?.querySelector('[data-type="textarea"]'), O = !(D.getAttribute("data-expanded") === "true");
2233
+ D.setAttribute("data-expanded", String(O)), D.textContent = O ? "收起" : "展开", P && P.classList.toggle("rte-textarea-expanded", O);
2234
+ const le = P?.closest(".rte-textarea-required");
2235
+ if (le ? le.classList.toggle("rte-textarea-overlay", O) : P && P.classList.toggle("rte-textarea-overlay", O), K)
2110
2236
  if (O)
2111
2237
  K.classList.add("rte-textarea-expanded"), K.style.maxHeight = "none", K.style.height = "100%";
2112
2238
  else {
@@ -2117,452 +2243,452 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2117
2243
  n.current && (O ? n.current.classList.add("rte-overlay-active") : n.current.classList.remove("rte-overlay-active"));
2118
2244
  return;
2119
2245
  }
2120
- const A = m.closest(".rte-richtext-toggle");
2121
- if (A) {
2122
- h.preventDefault(), h.stopPropagation();
2123
- const B = A.closest(".rte-richtext-wrapper"), K = B?.querySelector('[data-type="richtext"]'), O = !(A.getAttribute("data-expanded") === "true");
2124
- ((le, ge) => {
2125
- le.setAttribute("data-expanded", String(ge)), le.innerHTML = ge ? '<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>';
2126
- })(A, O);
2127
- const me = B?.closest(".rte-richtext-required");
2128
- me ? me.classList.toggle("rte-richtext-expanded", O) : B && B.classList.toggle("rte-richtext-expanded", O);
2129
- const J = B?.closest(".exclusion-wrapper") || B?.parentElement;
2130
- K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), J && (J.classList.toggle("rte-richtext-host-expanded", O), S(J, O)), n.current && n.current.classList.toggle("rte-richtext-fullscreen-active", O);
2246
+ const _ = h.closest(".rte-richtext-toggle");
2247
+ if (_) {
2248
+ g.preventDefault(), g.stopPropagation();
2249
+ const P = _.closest(".rte-richtext-wrapper"), K = P?.querySelector('[data-type="richtext"]'), O = !(_.getAttribute("data-expanded") === "true");
2250
+ ((ie, ge) => {
2251
+ ie.setAttribute("data-expanded", String(ge)), ie.innerHTML = ge ? '<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>';
2252
+ })(_, O);
2253
+ const me = P?.closest(".rte-richtext-required");
2254
+ me ? me.classList.toggle("rte-richtext-expanded", O) : P && P.classList.toggle("rte-richtext-expanded", O);
2255
+ const J = P?.closest(".exclusion-wrapper") || P?.parentElement;
2256
+ K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), J && (J.classList.toggle("rte-richtext-host-expanded", O), A(J, O)), n.current && n.current.classList.toggle("rte-richtext-fullscreen-active", O);
2131
2257
  return;
2132
2258
  }
2133
- if (m.closest('[data-type="text"]')) {
2134
- h.preventDefault(), h.stopPropagation();
2135
- const B = window.getSelection();
2136
- B && B.removeAllRanges();
2259
+ if (h.closest('[data-type="text"]')) {
2260
+ g.preventDefault(), g.stopPropagation();
2261
+ const P = window.getSelection();
2262
+ P && P.removeAllRanges();
2137
2263
  return;
2138
2264
  }
2139
- if (T && m.closest(".tag-node")) {
2140
- h.preventDefault(), h.stopPropagation();
2265
+ if (C && h.closest(".tag-node")) {
2266
+ g.preventDefault(), g.stopPropagation();
2141
2267
  const K = window.getSelection();
2142
2268
  K && K.removeAllRanges();
2143
2269
  return;
2144
2270
  }
2145
- if (m.closest('[data-type="variable"]')) {
2146
- if (k.current)
2271
+ if (h.closest('[data-type="variable"]')) {
2272
+ if (E.current)
2147
2273
  return;
2148
2274
  setTimeout(() => {
2149
- const B = window.getSelection();
2150
- B && !B.isCollapsed || Me(n);
2275
+ const P = window.getSelection();
2276
+ P && !P.isCollapsed || Be(n);
2151
2277
  }, 10);
2152
2278
  return;
2153
2279
  }
2154
- const j = m.closest(".file-remove-btn");
2280
+ const j = h.closest(".file-remove-btn");
2155
2281
  if (j) {
2156
- h.preventDefault(), h.stopPropagation();
2282
+ g.preventDefault(), g.stopPropagation();
2157
2283
  const K = j.closest('[data-type="upload"]')?.dataset.key;
2158
2284
  K && pe(K);
2159
2285
  return;
2160
2286
  }
2161
- const Y = m.closest('[data-type="upload"]');
2162
- if (Y) {
2163
- const B = Y.dataset.key;
2164
- B && (g(B), o.current?.click());
2287
+ const U = h.closest('[data-type="upload"]');
2288
+ if (U) {
2289
+ const P = U.dataset.key;
2290
+ P && (v(P), o.current?.click());
2165
2291
  return;
2166
2292
  }
2167
- }, he = (h) => {
2168
- const C = h.target.closest('[data-type="variable"]');
2169
- if (C) {
2170
- const M = window.getSelection();
2171
- if (M) {
2172
- const S = document.createRange(), _ = C.textContent || "";
2173
- if (_.replace(/\u200B/g, "")) {
2174
- let G = 0, D = _.length;
2175
- _.startsWith("​") && (G = 1), _.endsWith("​") && _.length > 1 && (D = _.length - 1);
2176
- const j = C.firstChild;
2177
- j && j.nodeType === Node.TEXT_NODE ? (S.setStart(j, G), S.setEnd(j, D)) : S.selectNodeContents(C);
2293
+ }, he = (g) => {
2294
+ const S = g.target.closest('[data-type="variable"]');
2295
+ if (S) {
2296
+ const I = window.getSelection();
2297
+ if (I) {
2298
+ const A = document.createRange(), D = S.textContent || "";
2299
+ if (D.replace(/\u200B/g, "")) {
2300
+ let R = 0, M = D.length;
2301
+ D.startsWith("​") && (R = 1), D.endsWith("​") && D.length > 1 && (M = D.length - 1);
2302
+ const j = S.firstChild;
2303
+ j && j.nodeType === Node.TEXT_NODE ? (A.setStart(j, R), A.setEnd(j, M)) : A.selectNodeContents(S);
2178
2304
  } else
2179
- S.selectNodeContents(C), S.collapse(!0);
2180
- M.removeAllRanges(), M.addRange(S);
2305
+ A.selectNodeContents(S), A.collapse(!0);
2306
+ I.removeAllRanges(), I.addRange(A);
2181
2307
  }
2182
2308
  }
2183
2309
  }, ye = () => {
2184
2310
  if (t.length === 0) {
2185
2311
  if (n.current) {
2186
- const C = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2187
- ee(C), F(!C);
2312
+ const S = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2313
+ ee(S), F(!S);
2188
2314
  }
2189
2315
  return;
2190
2316
  }
2191
- if (Me(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((C) => {
2192
- const M = C.querySelector(".variable-info-icon");
2193
- if (M) {
2194
- let S = !1;
2195
- const _ = document.createTreeWalker(
2196
- C,
2317
+ if (Be(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((S) => {
2318
+ const I = S.querySelector(".variable-info-icon");
2319
+ if (I) {
2320
+ let A = !1;
2321
+ const D = document.createTreeWalker(
2322
+ S,
2197
2323
  NodeFilter.SHOW_TEXT,
2198
2324
  {
2199
- acceptNode: (A) => M.contains(A) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2325
+ acceptNode: (_) => I.contains(_) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2200
2326
  }
2201
2327
  );
2202
- for (; _.nextNode(); )
2203
- if (_.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
2204
- S = !0;
2328
+ for (; D.nextNode(); )
2329
+ if (D.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
2330
+ A = !0;
2205
2331
  break;
2206
2332
  }
2207
- S ? M.classList.add("hidden") : M.classList.remove("hidden");
2208
- }
2209
- }), Be(n, t, a), Pe(n, t, a, F), !n.current) return;
2210
- t.filter((m) => m.type === "multi-variable" && m.key).forEach((m) => {
2211
- if (!m.key) return;
2212
- const C = m.maxCount || 9, M = re[m.key] || 1, S = [];
2213
- for (let j = 0; j < M; j++) {
2214
- const Y = `${m.key}_${j}`, B = n.current.querySelector(
2215
- `[data-type="variable"][data-key="${Y}"][data-multi-key="${m.key}"]`
2333
+ A ? I.classList.add("hidden") : I.classList.remove("hidden");
2334
+ }
2335
+ }), Oe(n, t, a), He(n, t, a, F), !n.current) return;
2336
+ t.filter((h) => h.type === "multi-variable" && h.key).forEach((h) => {
2337
+ if (!h.key) return;
2338
+ const S = h.maxCount || 9, I = re[h.key] || 1, A = [];
2339
+ for (let j = 0; j < I; j++) {
2340
+ const U = `${h.key}_${j}`, P = n.current.querySelector(
2341
+ `[data-type="variable"][data-key="${U}"][data-multi-key="${h.key}"]`
2216
2342
  );
2217
- if (B) {
2218
- const K = B.innerText.replace(/[\u200B\n]/g, "").trim();
2219
- S.push(K);
2343
+ if (P) {
2344
+ const K = P.innerText.replace(/[\u200B\n]/g, "").trim();
2345
+ A.push(K);
2220
2346
  }
2221
2347
  }
2222
- const A = (S[S.length - 1] || "") === "";
2223
- let G = !1, D = -1;
2224
- for (let j = 0; j < S.length - 1; j++)
2225
- if (S[j] === "") {
2226
- G = !0, D = j;
2348
+ const _ = (A[A.length - 1] || "") === "";
2349
+ let R = !1, M = -1;
2350
+ for (let j = 0; j < A.length - 1; j++)
2351
+ if (A[j] === "") {
2352
+ R = !0, M = j;
2227
2353
  break;
2228
2354
  }
2229
- if (G && D >= 0) {
2355
+ if (R && M >= 0) {
2230
2356
  const j = window.getSelection();
2231
2357
  if (j && j.rangeCount > 0) {
2232
- const O = j.getRangeAt(0), ie = O.startContainer, me = ie.nodeType === Node.ELEMENT_NODE ? ie.closest('[data-type="variable"][data-multi-key]') : ie.parentElement?.closest('[data-type="variable"][data-multi-key]');
2358
+ const O = j.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
2233
2359
  if (me) {
2234
2360
  const J = me.dataset.key;
2235
2361
  if (J) {
2236
- const le = document.createRange();
2237
- le.setStartBefore(me), le.setEnd(O.startContainer, O.startOffset);
2238
- const ge = le.toString().length;
2239
- U.current = { key: J, offset: ge };
2362
+ const ie = document.createRange();
2363
+ ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
2364
+ const ge = ie.toString().length;
2365
+ W.current = { key: J, offset: ge };
2240
2366
  }
2241
2367
  }
2242
2368
  }
2243
- const Y = [...S];
2244
- for (let O = D; O < Y.length - 1; O++)
2245
- Y[O] = Y[O + 1];
2246
- Y.pop();
2247
- const B = {};
2248
- Y.forEach((O, ie) => {
2249
- O && (B[`${m.key}_${ie}`] = O);
2369
+ const U = [...A];
2370
+ for (let O = M; O < U.length - 1; O++)
2371
+ U[O] = U[O + 1];
2372
+ U.pop();
2373
+ const P = {};
2374
+ U.forEach((O, le) => {
2375
+ O && (P[`${h.key}_${le}`] = O);
2250
2376
  });
2251
- const K = Math.max(A ? Y.length : Y.length + 1, 1);
2377
+ const K = Math.max(_ ? U.length : U.length + 1, 1);
2252
2378
  n.current.querySelectorAll(
2253
2379
  '[data-type="variable"]'
2254
2380
  ).forEach((O) => {
2255
- const ie = O.dataset.key, me = O.dataset.multiKey;
2256
- if (ie && me !== m.key) {
2381
+ const le = O.dataset.key, me = O.dataset.multiKey;
2382
+ if (le && me !== h.key) {
2257
2383
  const J = O.innerText.replace(/[\u200B\n]/g, "").trim();
2258
- J && (B[ie] = J);
2384
+ J && (P[le] = J);
2259
2385
  }
2260
- }), n.current.__tempVariableValues = B, l((O) => ({
2386
+ }), n.current.__tempVariableValues = P, d((O) => ({
2261
2387
  ...O,
2262
- [m.key]: K
2388
+ [h.key]: K
2263
2389
  }));
2264
2390
  return;
2265
2391
  }
2266
- if (!A) {
2267
- const j = M - 1, Y = `${m.key}_${j}`, B = n.current.querySelector(
2268
- `[data-type="variable"][data-key="${Y}"][data-multi-key="${m.key}"]`
2392
+ if (!_) {
2393
+ const j = I - 1, U = `${h.key}_${j}`, P = n.current.querySelector(
2394
+ `[data-type="variable"][data-key="${U}"][data-multi-key="${h.key}"]`
2269
2395
  );
2270
- if (B && B.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && M < C) {
2396
+ if (P && P.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && I < S) {
2271
2397
  const oe = window.getSelection();
2272
2398
  if (oe && oe.rangeCount > 0) {
2273
- const O = oe.getRangeAt(0), ie = O.startContainer, me = ie.nodeType === Node.ELEMENT_NODE ? ie.closest('[data-type="variable"][data-multi-key]') : ie.parentElement?.closest('[data-type="variable"][data-multi-key]');
2399
+ const O = oe.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
2274
2400
  if (me) {
2275
2401
  const J = me.dataset.key;
2276
2402
  if (J) {
2277
- const le = document.createRange();
2278
- le.setStartBefore(me), le.setEnd(O.startContainer, O.startOffset);
2279
- const ge = le.toString().length;
2280
- U.current = { key: J, offset: ge };
2403
+ const ie = document.createRange();
2404
+ ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
2405
+ const ge = ie.toString().length;
2406
+ W.current = { key: J, offset: ge };
2281
2407
  }
2282
2408
  }
2283
2409
  }
2284
- l((O) => ({
2410
+ d((O) => ({
2285
2411
  ...O,
2286
- [m.key]: M + 1
2412
+ [h.key]: I + 1
2287
2413
  }));
2288
2414
  }
2289
2415
  }
2290
2416
  });
2291
2417
  };
2292
- ze(() => {
2293
- const h = n.current;
2294
- if (!h) return;
2295
- const m = /* @__PURE__ */ new Map(), C = (_) => {
2296
- const A = _.target, G = _.relatedTarget;
2297
- !A || !n.current || !n.current.contains(A) || G && n.current.contains(G) || setTimeout(() => {
2418
+ je(() => {
2419
+ const g = n.current;
2420
+ if (!g) return;
2421
+ const h = /* @__PURE__ */ new Map(), S = (D) => {
2422
+ const _ = D.target, R = D.relatedTarget;
2423
+ !_ || !n.current || !n.current.contains(_) || R && n.current.contains(R) || setTimeout(() => {
2298
2424
  if (n.current) {
2299
2425
  if (t.length === 0) {
2300
- const D = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2301
- F(D.length > 0);
2426
+ const M = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2427
+ F(M.length > 0);
2302
2428
  return;
2303
2429
  }
2304
- Me(n), Be(n, t, a), Pe(n, t, a, F);
2430
+ Be(n), Oe(n, t, a), He(n, t, a, F);
2305
2431
  }
2306
2432
  }, 0);
2307
2433
  };
2308
- h.addEventListener("blur", C, !0);
2309
- const M = () => {
2434
+ g.addEventListener("blur", S, !0);
2435
+ const I = () => {
2310
2436
  if (!n.current) return;
2311
- m.forEach((G, D) => {
2312
- D.removeEventListener("blur", G, !1);
2313
- }), m.clear();
2314
- const _ = n.current.querySelectorAll(
2437
+ h.forEach((R, M) => {
2438
+ M.removeEventListener("blur", R, !1);
2439
+ }), h.clear();
2440
+ const D = n.current.querySelectorAll(
2315
2441
  '[data-type="variable"][data-multi-key]'
2316
- ), A = (G) => {
2317
- G.stopPropagation(), G.stopImmediatePropagation();
2318
- const D = G.target;
2319
- if (!D || !n.current || !n.current.contains(D))
2442
+ ), _ = (R) => {
2443
+ R.stopPropagation(), R.stopImmediatePropagation();
2444
+ const M = R.target;
2445
+ if (!M || !n.current || !n.current.contains(M))
2320
2446
  return;
2321
- const j = D.closest('[data-type="variable"][data-multi-key]');
2447
+ const j = M.closest('[data-type="variable"][data-multi-key]');
2322
2448
  if (!j || !n.current.contains(j))
2323
2449
  return;
2324
- let Y = !1;
2325
- if (m.forEach((le, ge) => {
2326
- (ge === j || ge.contains(D)) && (Y = !0);
2327
- }), !Y)
2450
+ let U = !1;
2451
+ if (h.forEach((ie, ge) => {
2452
+ (ge === j || ge.contains(M)) && (U = !0);
2453
+ }), !U)
2328
2454
  return;
2329
- const B = j.dataset.multiKey, K = j.dataset.key, oe = j.dataset.index;
2330
- if (!B || !K || oe === void 0) return;
2331
- const O = G.relatedTarget;
2455
+ const P = j.dataset.multiKey, K = j.dataset.key, oe = j.dataset.index;
2456
+ if (!P || !K || oe === void 0) return;
2457
+ const O = R.relatedTarget;
2332
2458
  if (!(!O || !n.current.contains(O)))
2333
2459
  return;
2334
2460
  const me = j.innerText.replace(/[\u200B\n]/g, "").trim();
2335
2461
  console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
2336
- multiKey: B,
2462
+ multiKey: P,
2337
2463
  currentKey: K,
2338
2464
  index: oe,
2339
2465
  content: me
2340
2466
  });
2341
2467
  const J = /[、,,\s]+/;
2342
2468
  if (J.test(me)) {
2343
- const le = me.split(J).map((Te) => Te.trim()).filter((Te) => Te.length > 0);
2344
- console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:", le);
2345
- const ke = le.slice(0, 9);
2469
+ const ie = me.split(J).map((Se) => Se.trim()).filter((Se) => Se.length > 0);
2470
+ console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:", ie);
2471
+ const ke = ie.slice(0, 9);
2346
2472
  if (console.log("[Blur Event] 有效的部分(最多9个):", ke), ke.length > 1) {
2347
- const Te = t.find((Ne) => Ne.type === "multi-variable" && Ne.key === B);
2348
- if (Te) {
2349
- const Ne = re[B] || 1, He = parseInt(oe, 10), Fe = Te.maxCount || 9, Se = [];
2473
+ const Se = t.find((Ne) => Ne.type === "multi-variable" && Ne.key === P);
2474
+ if (Se) {
2475
+ const Ne = re[P] || 1, Ye = parseInt(oe, 10), ze = Se.maxCount || 9, Ae = [];
2350
2476
  for (let ve = 0; ve < Ne; ve++) {
2351
- const qe = `${B}_${ve}`, Ae = n.current.querySelector(
2352
- `[data-type="variable"][data-key="${qe}"][data-multi-key="${B}"]`
2477
+ const Te = `${P}_${ve}`, _e = n.current.querySelector(
2478
+ `[data-type="variable"][data-key="${Te}"][data-multi-key="${P}"]`
2353
2479
  );
2354
- if (Ae) {
2355
- const Le = Ae.innerText.replace(/[\u200B\n]/g, "").trim();
2356
- Se.push(Le);
2480
+ if (_e) {
2481
+ const Le = _e.innerText.replace(/[\u200B\n]/g, "").trim();
2482
+ Ae.push(Le);
2357
2483
  }
2358
2484
  }
2359
- console.log("[Blur Event] 拆分前的所有值:", Se), console.log("[Blur Event] 当前索引:", He), console.log("[Blur Event] 要插入的值:", ke), Se.splice(He, 1, ...ke);
2360
- const Ee = Se.slice(0, Fe);
2361
- console.log("[Blur Event] 拆分后的所有值:", Ee), Ee.length > 0 && Ee[Ee.length - 1] !== "" && Ee.length < Fe && Ee.push("");
2362
- const Qe = Math.max(Ee.length, 1), Ie = {};
2363
- Ee.forEach((ve, qe) => {
2364
- ve && (Ie[`${B}_${qe}`] = ve);
2485
+ console.log("[Blur Event] 拆分前的所有值:", Ae), console.log("[Blur Event] 当前索引:", Ye), console.log("[Blur Event] 要插入的值:", ke), Ae.splice(Ye, 1, ...ke);
2486
+ const Ee = Ae.slice(0, ze);
2487
+ console.log("[Blur Event] 拆分后的所有值:", Ee), Ee.length > 0 && Ee[Ee.length - 1] !== "" && Ee.length < ze && Ee.push("");
2488
+ const ot = Math.max(Ee.length, 1), Pe = {};
2489
+ Ee.forEach((ve, Te) => {
2490
+ ve && (Pe[`${P}_${Te}`] = ve);
2365
2491
  }), n.current.querySelectorAll(
2366
2492
  '[data-type="variable"]'
2367
2493
  ).forEach((ve) => {
2368
- const qe = ve.dataset.key, Ae = ve.dataset.multiKey;
2369
- if (qe && Ae !== B) {
2494
+ const Te = ve.dataset.key, _e = ve.dataset.multiKey;
2495
+ if (Te && _e !== P) {
2370
2496
  const Le = ve.innerText.replace(/[\u200B\n]/g, "").trim();
2371
- Le && (Ie[qe] = Le);
2497
+ Le && (Pe[Te] = Le);
2372
2498
  }
2373
- }), n.current.__tempVariableValues = Ie, l((ve) => ({
2499
+ }), n.current.__tempVariableValues = Pe, d((ve) => ({
2374
2500
  ...ve,
2375
- [B]: Qe
2501
+ [P]: ot
2376
2502
  }));
2377
2503
  }
2378
2504
  }
2379
2505
  }
2380
2506
  };
2381
- _.forEach((G) => {
2382
- G.addEventListener("blur", A, !1), m.set(G, A);
2507
+ D.forEach((R) => {
2508
+ R.addEventListener("blur", _, !1), h.set(R, _);
2383
2509
  });
2384
- }, S = setTimeout(() => {
2385
- M();
2510
+ }, A = setTimeout(() => {
2511
+ I();
2386
2512
  }, 0);
2387
2513
  return () => {
2388
- clearTimeout(S), h.removeEventListener("blur", C, !0), m.forEach((_, A) => {
2389
- A.removeEventListener("blur", _, !1);
2390
- }), m.clear();
2514
+ clearTimeout(A), g.removeEventListener("blur", S, !0), h.forEach((D, _) => {
2515
+ _.removeEventListener("blur", D, !1);
2516
+ }), h.clear();
2391
2517
  };
2392
2518
  }, [t, re, a]);
2393
- const xe = (h) => {
2394
- if (i) {
2395
- h.preventDefault();
2519
+ const xe = (g) => {
2520
+ if (s) {
2521
+ g.preventDefault();
2396
2522
  return;
2397
2523
  }
2398
- const m = window.getSelection();
2399
- if (m && m.rangeCount > 0) {
2400
- const C = m.anchorNode;
2401
- let M = null;
2402
- if (C && (C.nodeType === Node.ELEMENT_NODE ? M = C.closest('[data-type="text"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (M = C.parentElement.closest('[data-type="text"]'))), M) {
2403
- if (h.preventDefault(), h.stopPropagation(), n.current) {
2404
- const S = n.current.querySelector(
2524
+ const h = window.getSelection();
2525
+ if (h && h.rangeCount > 0) {
2526
+ const S = h.anchorNode;
2527
+ let I = null;
2528
+ if (S && (S.nodeType === Node.ELEMENT_NODE ? I = S.closest('[data-type="text"]') : S.nodeType === Node.TEXT_NODE && S.parentElement && (I = S.parentElement.closest('[data-type="text"]'))), I) {
2529
+ if (g.preventDefault(), g.stopPropagation(), n.current) {
2530
+ const A = n.current.querySelector(
2405
2531
  '[data-type="variable"], [data-type="upload"]'
2406
2532
  );
2407
- S && S.focus();
2533
+ A && A.focus();
2408
2534
  }
2409
2535
  return;
2410
2536
  }
2411
2537
  }
2412
- if (T && m && m.rangeCount > 0) {
2413
- const C = m.anchorNode;
2414
- let M = null;
2415
- if (C && (C.nodeType === Node.ELEMENT_NODE ? M = C.closest(".tag-node") : C.nodeType === Node.TEXT_NODE && C.parentElement && (M = C.parentElement.closest(".tag-node"))), M) {
2416
- if (h.preventDefault(), h.stopPropagation(), n.current) {
2417
- const S = n.current.querySelector(
2538
+ if (C && h && h.rangeCount > 0) {
2539
+ const S = h.anchorNode;
2540
+ let I = null;
2541
+ if (S && (S.nodeType === Node.ELEMENT_NODE ? I = S.closest(".tag-node") : S.nodeType === Node.TEXT_NODE && S.parentElement && (I = S.parentElement.closest(".tag-node"))), I) {
2542
+ if (g.preventDefault(), g.stopPropagation(), n.current) {
2543
+ const A = n.current.querySelector(
2418
2544
  '[data-type="variable"], [data-type="upload"]'
2419
2545
  );
2420
- S && S.focus();
2546
+ A && A.focus();
2421
2547
  }
2422
2548
  return;
2423
2549
  }
2424
2550
  }
2425
- if (h.key === "Enter" && !h.shiftKey && (h.preventDefault(), we()), h.key === "Escape" && n.current) {
2426
- if (T) {
2427
- h.preventDefault();
2551
+ if (g.key === "Enter" && !g.shiftKey && (g.preventDefault(), we()), g.key === "Escape" && n.current) {
2552
+ if (C) {
2553
+ g.preventDefault();
2428
2554
  return;
2429
2555
  }
2430
2556
  n.current.innerHTML = "", n.current.focus();
2431
2557
  }
2432
- if (h.key === "Backspace") {
2433
- const C = window.getSelection();
2434
- if (C && C.rangeCount > 0) {
2435
- const M = C.getRangeAt(0), S = C.anchorNode;
2436
- if (T) {
2437
- let A = null, G = null;
2438
- if (S && (S.nodeType === Node.ELEMENT_NODE ? (A = S.closest(".tag-node"), G = S.closest('[data-type="text"]')) : S.nodeType === Node.TEXT_NODE && S.parentElement && (A = S.parentElement.closest(".tag-node"), G = S.parentElement.closest('[data-type="text"]'))), (A || G) && M.collapsed && M.startOffset === 0) {
2439
- h.preventDefault();
2558
+ if (g.key === "Backspace") {
2559
+ const S = window.getSelection();
2560
+ if (S && S.rangeCount > 0) {
2561
+ const I = S.getRangeAt(0), A = S.anchorNode;
2562
+ if (C) {
2563
+ let _ = null, R = null;
2564
+ if (A && (A.nodeType === Node.ELEMENT_NODE ? (_ = A.closest(".tag-node"), R = A.closest('[data-type="text"]')) : A.nodeType === Node.TEXT_NODE && A.parentElement && (_ = A.parentElement.closest(".tag-node"), R = A.parentElement.closest('[data-type="text"]'))), (_ || R) && I.collapsed && I.startOffset === 0) {
2565
+ g.preventDefault();
2440
2566
  return;
2441
2567
  }
2442
2568
  }
2443
- let _ = null;
2444
- if (S && (S.nodeType === Node.ELEMENT_NODE ? _ = S.closest(
2569
+ let D = null;
2570
+ if (A && (A.nodeType === Node.ELEMENT_NODE ? D = A.closest(
2445
2571
  '[data-type="variable"]'
2446
- ) : S.nodeType === Node.TEXT_NODE && S.parentElement && (_ = S.parentElement.closest(
2572
+ ) : A.nodeType === Node.TEXT_NODE && A.parentElement && (D = A.parentElement.closest(
2447
2573
  '[data-type="variable"]'
2448
- ))), _) {
2449
- if (!M.collapsed)
2574
+ ))), D) {
2575
+ if (!I.collapsed)
2450
2576
  return;
2451
- const A = _.innerText;
2452
- if (A === "​" || A === "") {
2453
- h.preventDefault();
2577
+ const _ = D.innerText;
2578
+ if (_ === "​" || _ === "") {
2579
+ g.preventDefault();
2454
2580
  return;
2455
2581
  }
2456
- if (M.startOffset === 0) {
2457
- h.preventDefault();
2582
+ if (I.startOffset === 0) {
2583
+ g.preventDefault();
2458
2584
  return;
2459
2585
  }
2460
- if (A.startsWith("​") && M.startOffset === 1) {
2461
- h.preventDefault();
2586
+ if (_.startsWith("​") && I.startOffset === 1) {
2587
+ g.preventDefault();
2462
2588
  return;
2463
2589
  }
2464
2590
  }
2465
2591
  }
2466
2592
  }
2467
2593
  }, we = () => {
2468
- if (d || i || e || !H || !n.current) return;
2594
+ if (l || s || e || !G || !n.current) return;
2469
2595
  if (t.length === 0) {
2470
- const _ = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2471
- if (!_) return;
2472
- x(_, _);
2596
+ const D = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2597
+ if (!D) return;
2598
+ c(D, D);
2473
2599
  return;
2474
2600
  }
2475
- const h = n.current;
2476
- let m = "";
2477
- const C = {}, M = (_) => {
2478
- if (!(_.nodeType === Node.ELEMENT_NODE && _.style.display === "none")) {
2479
- if (_.nodeType === Node.TEXT_NODE)
2480
- m += (_.textContent || "").replace(/\u200B/g, "");
2481
- else if (_.nodeType === Node.ELEMENT_NODE) {
2482
- const A = _, G = A.dataset.type, D = A.dataset.key;
2483
- if (G === "variable" && D) {
2601
+ const g = n.current;
2602
+ let h = "";
2603
+ const S = {}, I = (D) => {
2604
+ if (!(D.nodeType === Node.ELEMENT_NODE && D.style.display === "none")) {
2605
+ if (D.nodeType === Node.TEXT_NODE)
2606
+ h += (D.textContent || "").replace(/\u200B/g, "");
2607
+ else if (D.nodeType === Node.ELEMENT_NODE) {
2608
+ const _ = D, R = _.dataset.type, M = _.dataset.key;
2609
+ if (R === "variable" && M) {
2484
2610
  let j = "";
2485
- const Y = document.createTreeWalker(
2486
- A,
2611
+ const U = document.createTreeWalker(
2612
+ _,
2487
2613
  NodeFilter.SHOW_TEXT,
2488
2614
  {
2489
2615
  acceptNode: (K) => {
2490
- const oe = A.querySelector(".variable-info-icon");
2616
+ const oe = _.querySelector(".variable-info-icon");
2491
2617
  return oe && oe.contains(K) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
2492
2618
  }
2493
2619
  }
2494
2620
  );
2495
- for (; Y.nextNode(); )
2496
- j += Y.currentNode.textContent || "";
2497
- const B = j.replace(/[\u200B\n]/g, "").trim();
2498
- if (B) {
2499
- const K = A.dataset.multiKey;
2621
+ for (; U.nextNode(); )
2622
+ j += U.currentNode.textContent || "";
2623
+ const P = j.replace(/[\u200B\n]/g, "").trim();
2624
+ if (P) {
2625
+ const K = _.dataset.multiKey;
2500
2626
  if (K) {
2501
- (!C[K] || !Array.isArray(C[K])) && (C[K] = []);
2502
- const oe = C[K];
2503
- oe.push(B), oe.length > 1 && (m += " "), m += B;
2627
+ (!S[K] || !Array.isArray(S[K])) && (S[K] = []);
2628
+ const oe = S[K];
2629
+ oe.push(P), oe.length > 1 && (h += " "), h += P;
2504
2630
  } else
2505
- C[D] = B, m += B;
2631
+ S[M] = P, h += P;
2506
2632
  }
2507
- } else if (G === "select" && D) {
2508
- const j = A, Y = (j.value || "").trim();
2509
- if (Y) {
2510
- C[D] = Y;
2511
- const B = j.selectedOptions?.[0];
2512
- m += B?.textContent || Y;
2633
+ } else if (R === "select" && M) {
2634
+ const j = _, U = (j.value || "").trim();
2635
+ if (U) {
2636
+ S[M] = U;
2637
+ const P = j.selectedOptions?.[0];
2638
+ h += P?.textContent || U;
2513
2639
  }
2514
- } else if (G === "textarea" && D) {
2515
- const Y = (A.value || "").replace(/\u200B/g, "").trim();
2516
- Y && (C[D] = Y, m += Y);
2517
- } else if (G === "richtext" && D) {
2518
- const Y = (A.textContent || "").replace(/\u200B/g, "").trim();
2519
- Y && (C[D] = Y, m += Y);
2520
- } else if (G === "datepicker" && D) {
2521
- const Y = (A.getAttribute("data-value") || "").trim();
2522
- if (Y)
2523
- if (Y.includes(",")) {
2524
- const B = Y.split(",");
2525
- B.length === 2 ? (C[D] = B, m += `[${B[0]}, ${B[1]}]`) : (C[D] = Y, m += Y);
2640
+ } else if (R === "textarea" && M) {
2641
+ const U = (_.value || "").replace(/\u200B/g, "").trim();
2642
+ U && (S[M] = U, h += U);
2643
+ } else if (R === "richtext" && M) {
2644
+ const U = (_.textContent || "").replace(/\u200B/g, "").trim();
2645
+ U && (S[M] = U, h += U);
2646
+ } else if (R === "datepicker" && M) {
2647
+ const U = (_.getAttribute("data-value") || "").trim();
2648
+ if (U)
2649
+ if (U.includes(",")) {
2650
+ const P = U.split(",");
2651
+ P.length === 2 ? (S[M] = P, h += `[${P[0]}, ${P[1]}]`) : (S[M] = U, h += U);
2526
2652
  } else
2527
- C[D] = Y, m += Y;
2528
- } else if (G === "upload" && D)
2529
- C[D] = a[D] ?? null, a[D] && (m += ` [附带文件: ${a[D]?.name}] `);
2653
+ S[M] = U, h += U;
2654
+ } else if (R === "upload" && M)
2655
+ S[M] = a[M] ?? null, a[M] && (h += ` [附带文件: ${a[M]?.name}] `);
2530
2656
  else {
2531
- if (A.classList.contains("tag-close-btn") || A.classList.contains("file-remove-btn")) return;
2532
- A.getAttribute("contenteditable") === "false" && !G && A.classList.contains("tag-node") ? m += A.innerText : A.childNodes.forEach(M);
2657
+ if (_.classList.contains("tag-close-btn") || _.classList.contains("file-remove-btn")) return;
2658
+ _.getAttribute("contenteditable") === "false" && !R && _.classList.contains("tag-node") ? h += _.innerText : _.childNodes.forEach(I);
2533
2659
  }
2534
2660
  }
2535
2661
  }
2536
2662
  };
2537
- if (h.childNodes.forEach(M), m = m.trim(), !m) return;
2538
- const S = new FormData();
2539
- S.append("fullPrompt", m), Object.keys(C).forEach((_) => {
2540
- const A = C[_];
2541
- A != null && (A instanceof File ? S.append(_, A) : Array.isArray(A) ? t.some(
2542
- (D) => D.type === "multi-variable" && D.key === _
2543
- ) ? A.forEach((D) => {
2544
- D != null && D !== "" && S.append(_, String(D));
2545
- }) : A.forEach((D, j) => {
2546
- D != null && (D instanceof File ? S.append(`${_}[${j}]`, D) : typeof D == "string" ? S.append(`${_}[${j}]`, D) : S.append(`${_}[${j}]`, String(D)));
2547
- }) : typeof A == "string" ? S.append(_, A) : S.append(_, String(A)));
2548
- }), x(S, m);
2663
+ if (g.childNodes.forEach(I), h = h.trim(), !h) return;
2664
+ const A = new FormData();
2665
+ A.append("fullPrompt", h), Object.keys(S).forEach((D) => {
2666
+ const _ = S[D];
2667
+ _ != null && (_ instanceof File ? A.append(D, _) : Array.isArray(_) ? t.some(
2668
+ (M) => M.type === "multi-variable" && M.key === D
2669
+ ) ? _.forEach((M) => {
2670
+ M != null && M !== "" && A.append(D, String(M));
2671
+ }) : _.forEach((M, j) => {
2672
+ M != null && (M instanceof File ? A.append(`${D}[${j}]`, M) : typeof M == "string" ? A.append(`${D}[${j}]`, M) : A.append(`${D}[${j}]`, String(M)));
2673
+ }) : typeof _ == "string" ? A.append(D, _) : A.append(D, String(_)));
2674
+ }), c(A, h);
2549
2675
  }, Ce = {
2550
2676
  ...u ? { width: typeof u == "number" ? `${u}px` : u } : {},
2551
- ...f ? { border: f } : {},
2552
- ...s ? { background: s } : {}
2677
+ ...y ? { border: y } : {},
2678
+ ...i ? { background: i } : {}
2553
2679
  };
2554
2680
  return /* @__PURE__ */ Z(
2555
2681
  "div",
2556
2682
  {
2557
2683
  className: "rich-text-editor",
2558
2684
  style: Ce,
2559
- "data-disabled": i,
2685
+ "data-disabled": s,
2560
2686
  children: [
2561
- /* @__PURE__ */ E(
2687
+ /* @__PURE__ */ $(
2562
2688
  "div",
2563
2689
  {
2564
2690
  ref: n,
2565
- className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${R && q ? "rte-editor-empty" : ""}`,
2691
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${H && q ? "rte-editor-empty" : ""}`,
2566
2692
  contentEditable: t.length === 0,
2567
2693
  suppressContentEditableWarning: !0,
2568
2694
  "data-placeholder": q,
@@ -2576,7 +2702,7 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2576
2702
  onPaste: se
2577
2703
  }
2578
2704
  ),
2579
- /* @__PURE__ */ E(
2705
+ /* @__PURE__ */ $(
2580
2706
  "input",
2581
2707
  {
2582
2708
  type: "file",
@@ -2587,109 +2713,109 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2587
2713
  }
2588
2714
  ),
2589
2715
  /* @__PURE__ */ Z("div", { className: "rich-text-editor-footer", children: [
2590
- /* @__PURE__ */ E("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ Z("div", { className: "rich-text-editor-brand", children: [
2716
+ /* @__PURE__ */ $("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ Z("div", { className: "rich-text-editor-brand", children: [
2591
2717
  /* @__PURE__ */ Z("div", { className: "rte-brand-badge", children: [
2592
- /* @__PURE__ */ E("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
2593
- /* @__PURE__ */ E("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
2718
+ /* @__PURE__ */ $("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
2719
+ /* @__PURE__ */ $("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
2594
2720
  ] }),
2595
- r !== "hideAgent" && /* @__PURE__ */ E(
2596
- ot,
2721
+ r !== "hideAgent" && /* @__PURE__ */ $(
2722
+ pt,
2597
2723
  {
2598
2724
  placement: "top",
2599
2725
  menu: {
2600
- items: I.map((h) => ({
2601
- key: h.key,
2726
+ items: T.map((g) => ({
2727
+ key: g.key,
2602
2728
  label: /* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2603
- h.icon && /* @__PURE__ */ E("i", { className: h.icon }),
2604
- /* @__PURE__ */ E("span", { children: h.label })
2729
+ g.icon && /* @__PURE__ */ $("i", { className: g.icon }),
2730
+ /* @__PURE__ */ $("span", { children: g.label })
2605
2731
  ] }),
2606
2732
  onClick: () => {
2607
- $?.(h);
2733
+ w?.(g);
2608
2734
  }
2609
2735
  }))
2610
2736
  },
2611
2737
  trigger: ["click"],
2612
- disabled: i || d,
2613
- children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor: I.length > 0 ? "pointer" : "default" }, children: [
2614
- /* @__PURE__ */ E("i", { className: "iconfont icon-zhinengti" }),
2615
- /* @__PURE__ */ E("span", { className: "rte-agent-text", children: "智能体" })
2738
+ disabled: s || l,
2739
+ children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor: T.length > 0 ? "pointer" : "default" }, children: [
2740
+ /* @__PURE__ */ $("i", { className: "iconfont icon-zhinengti" }),
2741
+ /* @__PURE__ */ $("span", { className: "rte-agent-text", children: "智能体" })
2616
2742
  ] })
2617
2743
  }
2618
2744
  )
2619
2745
  ] }) }),
2620
2746
  /* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2621
2747
  (() => {
2622
- const h = t.find((C) => C.type === "tag");
2623
- if (!h || !h.text) return null;
2624
- const m = I.find((C) => C.label === h.text);
2625
- return !m || m.points === void 0 || m.points === null ? null : /* @__PURE__ */ Z("div", { className: "rte-points-badge", children: [
2626
- /* @__PURE__ */ E("i", { className: "iconfont icon-jifen", style: { marginRight: "4px" } }),
2748
+ const g = t.find((S) => S.type === "tag");
2749
+ if (!g || !g.text) return null;
2750
+ const h = T.find((S) => S.label === g.text);
2751
+ return !h || h.points === void 0 || h.points === null ? null : /* @__PURE__ */ Z("div", { className: "rte-points-badge", children: [
2752
+ /* @__PURE__ */ $("i", { className: "iconfont icon-jifen", style: { marginRight: "4px" } }),
2627
2753
  /* @__PURE__ */ Z("span", { style: { fontSize: "16px" }, children: [
2628
2754
  "-",
2629
- String(m.points)
2755
+ String(h.points)
2630
2756
  ] })
2631
2757
  ] });
2632
2758
  })(),
2633
- /* @__PURE__ */ E(
2759
+ /* @__PURE__ */ $(
2634
2760
  "button",
2635
2761
  {
2636
2762
  type: "button",
2637
2763
  onClick: we,
2638
- disabled: d || i || e || !H,
2764
+ disabled: l || s || e || !G,
2639
2765
  className: "rich-text-editor-send-button",
2640
- children: d || e ? /* @__PURE__ */ E("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ E("i", { className: "iconfont icon-fasong" })
2766
+ children: l || e ? /* @__PURE__ */ $("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ $("i", { className: "iconfont icon-fasong" })
2641
2767
  }
2642
2768
  )
2643
2769
  ] })
2644
2770
  ] }),
2645
- b?.anchorEl && (() => {
2646
- if (!document.body.contains(b.anchorEl))
2771
+ x?.anchorEl && (() => {
2772
+ if (!document.body.contains(x.anchorEl))
2647
2773
  return null;
2648
- let h = "", m = {
2774
+ let g = "", h = {
2649
2775
  background: "var(--neutral-800, #262626)"
2650
2776
  };
2651
- if (b.type === "upload")
2652
- h = t.find(
2653
- (S) => S.type === "upload" && S.key === b.key
2777
+ if (x.type === "upload")
2778
+ g = t.find(
2779
+ (A) => A.type === "upload" && A.key === x.key
2654
2780
  )?.tooltip || "";
2655
- else if (b.type === "tag")
2656
- h = b.anchorEl.dataset.tooltip || "";
2657
- else if (b.type === "upload-label")
2658
- h = b.anchorEl.dataset.fileName || "";
2659
- else if (b.type === "variable")
2660
- h = b.anchorEl.dataset.tooltip || "";
2661
- else if (b.type === "upload-preview") {
2662
- const M = a[b.key];
2663
- if (M && M.type && M.type.startsWith("image/")) {
2664
- const S = URL.createObjectURL(M);
2665
- h = /* @__PURE__ */ E("div", { style: { width: 120, height: 120, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ E("img", { src: S, style: { maxWidth: 120, maxHeight: 120, objectFit: "contain" } }) }), m = {
2781
+ else if (x.type === "tag")
2782
+ g = x.anchorEl.dataset.tooltip || "";
2783
+ else if (x.type === "upload-label")
2784
+ g = x.anchorEl.dataset.fileName || "";
2785
+ else if (x.type === "variable")
2786
+ g = x.anchorEl.dataset.tooltip || "";
2787
+ else if (x.type === "upload-preview") {
2788
+ const I = a[x.key];
2789
+ if (I && I.type && I.type.startsWith("image/")) {
2790
+ const A = URL.createObjectURL(I);
2791
+ g = /* @__PURE__ */ $("div", { style: { width: 120, height: 120, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ $("img", { src: A, style: { maxWidth: 120, maxHeight: 120, objectFit: "contain" } }) }), h = {
2666
2792
  background: "#fff",
2667
2793
  padding: 4
2668
- }, setTimeout(() => URL.revokeObjectURL(S), 1e3);
2794
+ }, setTimeout(() => URL.revokeObjectURL(A), 1e3);
2669
2795
  } else
2670
- h = "";
2796
+ g = "";
2671
2797
  }
2672
- if (!h) return null;
2673
- const C = b.type === "upload-preview" ? "#0A0A0A" : "#fff";
2674
- return Xe(
2675
- /* @__PURE__ */ E(
2676
- st,
2798
+ if (!g) return null;
2799
+ const S = x.type === "upload-preview" ? "#0A0A0A" : "#fff";
2800
+ return tt(
2801
+ /* @__PURE__ */ $(
2802
+ ft,
2677
2803
  {
2678
2804
  arrow: !1,
2679
- title: /* @__PURE__ */ E("div", { style: { maxWidth: "200px", fontSize: "12px", color: C }, children: h }),
2805
+ title: /* @__PURE__ */ $("div", { style: { maxWidth: "200px", fontSize: "12px", color: S }, children: g }),
2680
2806
  open: !0,
2681
2807
  placement: "top",
2682
2808
  getPopupContainer: () => document.body,
2683
- overlayInnerStyle: m,
2684
- children: /* @__PURE__ */ E(
2809
+ overlayInnerStyle: h,
2810
+ children: /* @__PURE__ */ $(
2685
2811
  "div",
2686
2812
  {
2687
2813
  style: {
2688
2814
  position: "fixed",
2689
- left: `${b.anchorEl.getBoundingClientRect().left}px`,
2690
- top: `${b.anchorEl.getBoundingClientRect().top}px`,
2691
- width: `${b.anchorEl.offsetWidth}px`,
2692
- height: `${b.anchorEl.offsetHeight}px`,
2815
+ left: `${x.anchorEl.getBoundingClientRect().left}px`,
2816
+ top: `${x.anchorEl.getBoundingClientRect().top}px`,
2817
+ width: `${x.anchorEl.offsetWidth}px`,
2818
+ height: `${x.anchorEl.offsetHeight}px`,
2693
2819
  pointerEvents: "none"
2694
2820
  }
2695
2821
  }
@@ -2704,7 +2830,7 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2704
2830
  }
2705
2831
  );
2706
2832
  };
2707
- zt.__docgenInfo = {
2833
+ rn.__docgenInfo = {
2708
2834
  displayName: "RichTextEditor",
2709
2835
  description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
2710
2836
  props: {
@@ -2732,43 +2858,43 @@ zt.__docgenInfo = {
2732
2858
  }
2733
2859
  }
2734
2860
  };
2735
- const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", Wt = [
2861
+ const Qe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", on = [
2736
2862
  { label: "5页", value: 5 },
2737
2863
  { label: "10页", value: 10 },
2738
2864
  { label: "15页", value: 15 },
2739
2865
  { label: "30页", value: 30 }
2740
- ], jt = ({
2866
+ ], sn = ({
2741
2867
  autoLoading: t,
2742
- batchSize: x,
2743
- loadingProgress: d,
2744
- loadIcon: i,
2868
+ batchSize: c,
2869
+ loadingProgress: l,
2870
+ loadIcon: s,
2745
2871
  onBatchSizeChange: u,
2746
- onLoadNextPage: T,
2747
- onStartAutoLoad: I,
2748
- onStopLoad: $
2749
- }) => t && d ? /* @__PURE__ */ Z("div", { className: "auto_load_progress", children: [
2750
- i || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2872
+ onLoadNextPage: C,
2873
+ onStartAutoLoad: T,
2874
+ onStopLoad: w
2875
+ }) => t && l ? /* @__PURE__ */ Z("div", { className: "auto_load_progress", children: [
2876
+ s || /* @__PURE__ */ $("img", { src: Qe, alt: "自动加载", width: 14, height: 14 }),
2751
2877
  /* @__PURE__ */ Z("span", { children: [
2752
2878
  "正在加载第",
2753
- d.currentPage,
2879
+ l.currentPage,
2754
2880
  "/",
2755
- d.totalPages,
2881
+ l.totalPages,
2756
2882
  "页"
2757
2883
  ] }),
2758
- /* @__PURE__ */ E(
2759
- it,
2884
+ /* @__PURE__ */ $(
2885
+ yt,
2760
2886
  {
2761
- percent: d.percentage,
2887
+ percent: l.percentage,
2762
2888
  type: "line",
2763
2889
  size: [160, 8]
2764
2890
  }
2765
2891
  ),
2766
- /* @__PURE__ */ E("span", { onClick: $, className: "auto_load_stop_btn", children: "停止加载" })
2892
+ /* @__PURE__ */ $("span", { onClick: w, className: "auto_load_stop_btn", children: "停止加载" })
2767
2893
  ] }) : /* @__PURE__ */ Z("div", { className: "auto_load_container", children: [
2768
- /* @__PURE__ */ E(
2894
+ /* @__PURE__ */ $(
2769
2895
  "div",
2770
2896
  {
2771
- onClick: T,
2897
+ onClick: C,
2772
2898
  className: "auto_load_next_btn",
2773
2899
  style: {
2774
2900
  backgroundColor: t ? "#f5f5f5" : "#2563eb"
@@ -2788,19 +2914,19 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2788
2914
  "div",
2789
2915
  {
2790
2916
  className: "auto_load_btn",
2791
- onClick: t ? void 0 : I,
2917
+ onClick: t ? void 0 : T,
2792
2918
  children: [
2793
- i || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2794
- /* @__PURE__ */ E("span", { children: "自动加载" })
2919
+ s || /* @__PURE__ */ $("img", { src: Qe, alt: "自动加载", width: 14, height: 14 }),
2920
+ /* @__PURE__ */ $("span", { children: "自动加载" })
2795
2921
  ]
2796
2922
  }
2797
2923
  ),
2798
- /* @__PURE__ */ E(
2799
- Ge,
2924
+ /* @__PURE__ */ $(
2925
+ Fe,
2800
2926
  {
2801
- value: x,
2927
+ value: c,
2802
2928
  onChange: u,
2803
- options: Wt,
2929
+ options: on,
2804
2930
  disabled: t,
2805
2931
  size: "small",
2806
2932
  className: "auto_load_select",
@@ -2810,80 +2936,80 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2810
2936
  ]
2811
2937
  }
2812
2938
  )
2813
- ] }), Ut = ({
2939
+ ] }), ln = ({
2814
2940
  current: t,
2815
- loadIcon: x,
2816
- pageSize: d,
2817
- total: i,
2941
+ loadIcon: c,
2942
+ pageSize: l,
2943
+ total: s,
2818
2944
  cachedPages: u,
2819
- loadedCount: T,
2820
- autoLoading: I = !1,
2821
- loadingProgress: $,
2822
- onChange: w,
2945
+ loadedCount: C,
2946
+ autoLoading: T = !1,
2947
+ loadingProgress: w,
2948
+ onChange: k,
2823
2949
  onLoadNextPage: e,
2824
2950
  onStartAutoLoad: q,
2825
- onStopLoading: f
2951
+ onStopLoading: y
2826
2952
  }) => {
2827
- const [s, r] = ne(5), n = Math.ceil(i / d), o = Ye(() => u.length >= n, [u, n]), a = () => Array.from(
2953
+ const [i, r] = ne(5), n = Math.ceil(s / l), o = Ze(() => u.length >= n, [u, n]), a = () => Array.from(
2828
2954
  { length: n },
2829
- (g, b) => b + 1
2830
- ).filter((g) => !u.includes(g)).slice(0, s);
2955
+ (v, x) => x + 1
2956
+ ).filter((v) => !u.includes(v)).slice(0, i);
2831
2957
  return /* @__PURE__ */ Z("div", { className: "pagination_footer", children: [
2832
2958
  /* @__PURE__ */ Z("div", { className: "pagination_leftWrap", children: [
2833
2959
  /* @__PURE__ */ Z("span", { className: "pagination_total", children: [
2834
- /* @__PURE__ */ E(
2835
- yt,
2960
+ /* @__PURE__ */ $(
2961
+ kt,
2836
2962
  {
2837
2963
  style: { color: "#2563EB", marginRight: "4px" }
2838
2964
  }
2839
2965
  ),
2840
2966
  "已加载: ",
2841
- T,
2967
+ C,
2842
2968
  "/",
2843
- i,
2969
+ s,
2844
2970
  "条数据"
2845
2971
  ] }),
2846
- !o && /* @__PURE__ */ E(
2847
- jt,
2972
+ !o && /* @__PURE__ */ $(
2973
+ sn,
2848
2974
  {
2849
- loadIcon: x || void 0,
2850
- autoLoading: I,
2851
- batchSize: s,
2852
- loadingProgress: $,
2975
+ loadIcon: c || void 0,
2976
+ autoLoading: T,
2977
+ batchSize: i,
2978
+ loadingProgress: w,
2853
2979
  disabled: !e || !q,
2854
2980
  onBatchSizeChange: r,
2855
2981
  onLoadNextPage: () => e?.(),
2856
2982
  onStartAutoLoad: () => {
2857
- const y = a();
2858
- q?.(y);
2983
+ const m = a();
2984
+ q?.(m);
2859
2985
  },
2860
- onStopLoad: () => f?.()
2986
+ onStopLoad: () => y?.()
2861
2987
  }
2862
2988
  )
2863
2989
  ] }),
2864
- /* @__PURE__ */ E(
2865
- lt,
2990
+ /* @__PURE__ */ $(
2991
+ mt,
2866
2992
  {
2867
2993
  current: t,
2868
- pageSize: d,
2869
- total: i,
2870
- onChange: (y) => w(y),
2994
+ pageSize: l,
2995
+ total: s,
2996
+ onChange: (m) => k(m),
2871
2997
  showSizeChanger: !1,
2872
2998
  showQuickJumper: !1,
2873
- showTotal: (y, g) => "",
2874
- itemRender: (y, g, b) => {
2875
- const V = u.includes(y);
2876
- return g === "prev" || g === "next" || g === "jump-prev" || g === "jump-next" ? /* @__PURE__ */ E("div", { className: "pageBox", children: b }) : /* @__PURE__ */ Z(
2999
+ showTotal: (m, v) => "",
3000
+ itemRender: (m, v, x) => {
3001
+ const V = u.includes(m);
3002
+ return v === "prev" || v === "next" || v === "jump-prev" || v === "jump-next" ? /* @__PURE__ */ $("div", { className: "pageBox", children: x }) : /* @__PURE__ */ Z(
2877
3003
  "div",
2878
3004
  {
2879
3005
  className: "pageBox",
2880
3006
  style: {
2881
- backgroundColor: t === y ? "#2563EB" : "#f5f5f5",
2882
- color: t === y ? "#fff" : V ? "#171717" : "#a3a3a3"
3007
+ backgroundColor: t === m ? "#2563EB" : "#f5f5f5",
3008
+ color: t === m ? "#fff" : V ? "#171717" : "#a3a3a3"
2883
3009
  },
2884
3010
  children: [
2885
- y,
2886
- !V && /* @__PURE__ */ E("span", { className: "unload_spot" })
3011
+ m,
3012
+ !V && /* @__PURE__ */ $("span", { className: "unload_spot" })
2887
3013
  ]
2888
3014
  }
2889
3015
  );
@@ -2891,62 +3017,62 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2891
3017
  }
2892
3018
  )
2893
3019
  ] });
2894
- }, Yt = (t) => {
3020
+ }, cn = (t) => {
2895
3021
  const {
2896
- loading: x,
2897
- autoLoading: d,
2898
- loadingProgress: i,
3022
+ loading: c,
3023
+ autoLoading: l,
3024
+ loadingProgress: s,
2899
3025
  columns: u = [],
2900
- dataSource: T = [],
2901
- total: I,
2902
- current: $,
2903
- pageSize: w,
3026
+ dataSource: C = [],
3027
+ total: T,
3028
+ current: w,
3029
+ pageSize: k,
2904
3030
  cachedPages: e,
2905
3031
  onChangePage: q,
2906
- onLoadNextPage: f,
2907
- onStartAutoLoad: s,
3032
+ onLoadNextPage: y,
3033
+ onStartAutoLoad: i,
2908
3034
  onStopLoading: r,
2909
3035
  ...n
2910
3036
  } = t, o = Q(null), a = ae(
2911
- (p) => {
2912
- q(p), e.includes(p) && o.current?.scrollTo({
2913
- key: `${(p - 1) * w + 1}`
3037
+ (f) => {
3038
+ q(f), e.includes(f) && o.current?.scrollTo({
3039
+ key: `${(f - 1) * k + 1}`
2914
3040
  });
2915
3041
  },
2916
- [$]
3042
+ [w]
2917
3043
  );
2918
3044
  return /* @__PURE__ */ Z("div", { className: "flex flex-col", children: [
2919
- /* @__PURE__ */ E(
2920
- Re,
3045
+ /* @__PURE__ */ $(
3046
+ Ge,
2921
3047
  {
2922
3048
  ref: o,
2923
3049
  ...n,
2924
3050
  columns: u,
2925
- dataSource: T,
3051
+ dataSource: C,
2926
3052
  pagination: !1,
2927
3053
  virtual: !0
2928
3054
  }
2929
3055
  ),
2930
- /* @__PURE__ */ E(
2931
- Ut,
3056
+ /* @__PURE__ */ $(
3057
+ ln,
2932
3058
  {
2933
- loading: x,
2934
- autoLoading: d,
2935
- loadingProgress: i,
2936
- current: $,
2937
- pageSize: w,
2938
- total: I,
2939
- loadedCount: T.length,
3059
+ loading: c,
3060
+ autoLoading: l,
3061
+ loadingProgress: s,
3062
+ current: w,
3063
+ pageSize: k,
3064
+ total: T,
3065
+ loadedCount: C.length,
2940
3066
  cachedPages: e,
2941
3067
  onChange: a,
2942
- onLoadNextPage: f,
2943
- onStartAutoLoad: s,
3068
+ onLoadNextPage: y,
3069
+ onStartAutoLoad: i,
2944
3070
  onStopLoading: r
2945
3071
  }
2946
3072
  )
2947
3073
  ] });
2948
3074
  };
2949
- Yt.__docgenInfo = {
3075
+ cn.__docgenInfo = {
2950
3076
  displayName: "VirtualTable",
2951
3077
  description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
2952
3078
  props: {
@@ -3053,77 +3179,77 @@ Yt.__docgenInfo = {
3053
3179
  }
3054
3180
  }
3055
3181
  };
3056
- const Kt = ({
3182
+ const un = ({
3057
3183
  texts: t = [],
3058
- placeholder: x = "请输入内容",
3059
- animationSpeed: d = 100,
3060
- autoPlay: i = !0,
3184
+ placeholder: c = "请输入内容",
3185
+ animationSpeed: l = 100,
3186
+ autoPlay: s = !0,
3061
3187
  value: u,
3062
- onChange: T,
3063
- ...I
3188
+ onChange: C,
3189
+ ...T
3064
3190
  }) => {
3065
- const [$, w] = ne(""), [e, q] = ne(0), [f, s] = ne(!1), [r, n] = ne(!1), [o, a] = ne(!1), p = Q(void 0), y = Q(void 0), g = Q(t), b = Q(e), V = Q(r), k = Q($);
3191
+ const [w, k] = ne(""), [e, q] = ne(0), [y, i] = ne(!1), [r, n] = ne(!1), [o, a] = ne(!1), f = Q(void 0), m = Q(void 0), v = Q(t), x = Q(e), V = Q(r), E = Q(w);
3066
3192
  de(() => {
3067
- g.current = t, b.current = e, V.current = r, k.current = $;
3193
+ v.current = t, x.current = e, V.current = r, E.current = w;
3068
3194
  });
3069
- const P = ae((l, c) => {
3070
- let v = 0;
3195
+ const B = ae((d, p) => {
3196
+ let b = 0;
3071
3197
  a(!0);
3072
3198
  const L = () => {
3073
- v < l.length ? (w(l.slice(0, v + 1)), v++, y.current = window.setTimeout(L, d)) : (a(!1), c?.());
3199
+ b < d.length ? (k(d.slice(0, b + 1)), b++, m.current = window.setTimeout(L, l)) : (a(!1), p?.());
3074
3200
  };
3075
3201
  L();
3076
- }, [d]), H = ae((l) => {
3077
- let c = k.current.length;
3078
- const v = () => {
3079
- c > 0 ? (w(k.current.slice(0, c - 1)), c--, y.current = window.setTimeout(v, d / 2)) : l?.();
3202
+ }, [l]), G = ae((d) => {
3203
+ let p = E.current.length;
3204
+ const b = () => {
3205
+ p > 0 ? (k(E.current.slice(0, p - 1)), p--, m.current = window.setTimeout(b, l / 2)) : d?.();
3080
3206
  };
3081
- v();
3082
- }, [d]), F = ae(() => {
3083
- if (g.current.length === 0 || V.current) return;
3084
- s(!0);
3085
- const l = g.current[b.current];
3086
- k.current ? H(() => {
3087
- P(l, () => {
3088
- p.current = window.setTimeout(() => {
3089
- q((c) => (c + 1) % g.current.length), s(!1);
3207
+ b();
3208
+ }, [l]), F = ae(() => {
3209
+ if (v.current.length === 0 || V.current) return;
3210
+ i(!0);
3211
+ const d = v.current[x.current];
3212
+ E.current ? G(() => {
3213
+ B(d, () => {
3214
+ f.current = window.setTimeout(() => {
3215
+ q((p) => (p + 1) % v.current.length), i(!1);
3090
3216
  }, 2e3);
3091
3217
  });
3092
- }) : P(l, () => {
3093
- p.current = window.setTimeout(() => {
3094
- q((c) => (c + 1) % g.current.length), s(!1);
3218
+ }) : B(d, () => {
3219
+ f.current = window.setTimeout(() => {
3220
+ q((p) => (p + 1) % v.current.length), i(!1);
3095
3221
  }, 2e3);
3096
3222
  });
3097
- }, [H, P]);
3098
- return de(() => (i && t.length > 0 && !r && F(), () => {
3099
- p.current && window.clearTimeout(p.current), y.current && window.clearTimeout(y.current);
3100
- }), [e, r, i, t.length, F]), de(() => {
3101
- !f && i && t.length > 0 && !r && F();
3102
- }, [e, f, i, t.length, r, F]), /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3103
- /* @__PURE__ */ E(
3104
- Ke,
3223
+ }, [G, B]);
3224
+ return de(() => (s && t.length > 0 && !r && F(), () => {
3225
+ f.current && window.clearTimeout(f.current), m.current && window.clearTimeout(m.current);
3226
+ }), [e, r, s, t.length, F]), de(() => {
3227
+ !y && s && t.length > 0 && !r && F();
3228
+ }, [e, y, s, t.length, r, F]), /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3229
+ /* @__PURE__ */ $(
3230
+ et,
3105
3231
  {
3106
- ...I,
3232
+ ...T,
3107
3233
  value: u,
3108
- onChange: (l) => {
3109
- T?.(l.target.value), I.onChange?.(l);
3234
+ onChange: (d) => {
3235
+ C?.(d.target.value), T.onChange?.(d);
3110
3236
  },
3111
- onFocus: (l) => {
3112
- n(!0), p.current && window.clearTimeout(p.current), y.current && window.clearTimeout(y.current), s(!1), a(!1), I.onFocus?.(l);
3237
+ onFocus: (d) => {
3238
+ n(!0), f.current && window.clearTimeout(f.current), m.current && window.clearTimeout(m.current), i(!1), a(!1), T.onFocus?.(d);
3113
3239
  },
3114
- onBlur: (l) => {
3115
- n(!1), !u && t.length > 0 && (w(""), q(0)), I.onBlur?.(l);
3240
+ onBlur: (d) => {
3241
+ n(!1), !u && t.length > 0 && (k(""), q(0)), T.onBlur?.(d);
3116
3242
  },
3117
- placeholder: r || u ? x : $ || x,
3243
+ placeholder: r || u ? c : w || c,
3118
3244
  style: {
3119
3245
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3120
- ...I.style,
3246
+ ...T.style,
3121
3247
  position: "relative",
3122
3248
  zIndex: 1
3123
3249
  }
3124
3250
  }
3125
3251
  ),
3126
- !r && !u && $ && /* @__PURE__ */ Z(
3252
+ !r && !u && w && /* @__PURE__ */ Z(
3127
3253
  "div",
3128
3254
  {
3129
3255
  style: {
@@ -3143,8 +3269,8 @@ const Kt = ({
3143
3269
  fontFamily: "inherit"
3144
3270
  },
3145
3271
  children: [
3146
- /* @__PURE__ */ E("span", { children: $ }),
3147
- o && /* @__PURE__ */ E(
3272
+ /* @__PURE__ */ $("span", { children: w }),
3273
+ o && /* @__PURE__ */ $(
3148
3274
  "span",
3149
3275
  {
3150
3276
  style: {
@@ -3160,7 +3286,7 @@ const Kt = ({
3160
3286
  ]
3161
3287
  }
3162
3288
  ),
3163
- /* @__PURE__ */ E("style", { children: `
3289
+ /* @__PURE__ */ $("style", { children: `
3164
3290
  @keyframes blink {
3165
3291
  0%, 50% { opacity: 1; }
3166
3292
  51%, 100% { opacity: 0; }
@@ -3168,7 +3294,7 @@ const Kt = ({
3168
3294
  ` })
3169
3295
  ] });
3170
3296
  };
3171
- Kt.__docgenInfo = {
3297
+ un.__docgenInfo = {
3172
3298
  displayName: "DynamicInput",
3173
3299
  description: "动态文案输入框组件,支持流式文字动画效果",
3174
3300
  props: {
@@ -3213,109 +3339,109 @@ Kt.__docgenInfo = {
3213
3339
  }
3214
3340
  }
3215
3341
  };
3216
- const Xt = ({
3342
+ const dn = ({
3217
3343
  texts: t = [],
3218
3344
  // 动态文案数组,默认为空数组
3219
- placeholder: x = "请输入内容",
3345
+ placeholder: c = "请输入内容",
3220
3346
  // 占位符文本
3221
- animationSpeed: d = 100,
3347
+ animationSpeed: l = 100,
3222
3348
  // 打字机动画速度,毫秒
3223
- autoPlay: i = !0,
3349
+ autoPlay: s = !0,
3224
3350
  // 是否自动播放动画
3225
3351
  value: u = "",
3226
3352
  // 受控模式的值
3227
- onChange: T,
3353
+ onChange: C,
3228
3354
  // 受控模式的变化回调
3229
- onSubmit: I,
3355
+ onSubmit: T,
3230
3356
  // 提交回调
3231
- maxLength: $ = 500,
3357
+ maxLength: w = 500,
3232
3358
  // 最大字符数限制
3233
- showCount: w = !0,
3359
+ showCount: k = !0,
3234
3360
  // 是否显示字数统计
3235
3361
  submitText: e = "发送",
3236
3362
  // 提交按钮文本
3237
3363
  disabled: q = !1,
3238
3364
  // 是否禁用组件
3239
- rows: f = 4,
3365
+ rows: y = 4,
3240
3366
  // 文本域行数
3241
- style: s,
3367
+ style: i,
3242
3368
  // 自定义样式
3243
3369
  ...r
3244
3370
  // 其他原生属性
3245
3371
  }) => {
3246
- const [n, o] = ne(""), [a, p] = ne(0), [y, g] = ne(!1), [b, V] = ne(!1), [k, P] = ne(!1), [H, F] = ne(u || ""), U = Q(void 0), R = Q(void 0), ee = Q(t), re = Q(a), l = Q(b), c = Q(n), v = Q(null);
3372
+ const [n, o] = ne(""), [a, f] = ne(0), [m, v] = ne(!1), [x, V] = ne(!1), [E, B] = ne(!1), [G, F] = ne(u || ""), W = Q(void 0), H = Q(void 0), ee = Q(t), re = Q(a), d = Q(x), p = Q(n), b = Q(null);
3247
3373
  de(() => {
3248
- ee.current = t, re.current = a, l.current = b, c.current = n;
3374
+ ee.current = t, re.current = a, d.current = x, p.current = n;
3249
3375
  });
3250
3376
  const L = ae((X, ue) => {
3251
3377
  let he = 0;
3252
- P(!0);
3378
+ B(!0);
3253
3379
  const ye = () => {
3254
- he < X.length ? (o(X.slice(0, he + 1)), he++, R.current = window.setTimeout(ye, d)) : (P(!1), ue?.());
3380
+ he < X.length ? (o(X.slice(0, he + 1)), he++, H.current = window.setTimeout(ye, l)) : (B(!1), ue?.());
3255
3381
  };
3256
3382
  ye();
3257
- }, [d]), N = ae((X) => {
3258
- let ue = c.current.length;
3383
+ }, [l]), N = ae((X) => {
3384
+ let ue = p.current.length;
3259
3385
  const he = () => {
3260
- ue > 0 ? (o(c.current.slice(0, ue - 1)), ue--, R.current = window.setTimeout(he, d / 2)) : X?.();
3386
+ ue > 0 ? (o(p.current.slice(0, ue - 1)), ue--, H.current = window.setTimeout(he, l / 2)) : X?.();
3261
3387
  };
3262
3388
  he();
3263
- }, [d]), W = ae(() => {
3264
- if (ee.current.length === 0 || l.current) return;
3265
- g(!0);
3389
+ }, [l]), z = ae(() => {
3390
+ if (ee.current.length === 0 || d.current) return;
3391
+ v(!0);
3266
3392
  const X = ee.current[re.current];
3267
- c.current ? N(() => {
3393
+ p.current ? N(() => {
3268
3394
  L(X, () => {
3269
- U.current = window.setTimeout(() => {
3270
- p((ue) => (ue + 1) % ee.current.length), g(!1);
3395
+ W.current = window.setTimeout(() => {
3396
+ f((ue) => (ue + 1) % ee.current.length), v(!1);
3271
3397
  }, 2e3);
3272
3398
  });
3273
3399
  }) : L(X, () => {
3274
- U.current = window.setTimeout(() => {
3275
- p((ue) => (ue + 1) % ee.current.length), g(!1);
3400
+ W.current = window.setTimeout(() => {
3401
+ f((ue) => (ue + 1) % ee.current.length), v(!1);
3276
3402
  }, 2e3);
3277
3403
  });
3278
3404
  }, [N, L]);
3279
- de(() => (i && t.length > 0 && !b && W(), () => {
3280
- U.current && window.clearTimeout(U.current), R.current && window.clearTimeout(R.current);
3281
- }), [a, b, i, t.length, W]), de(() => {
3282
- !y && i && t.length > 0 && !b && W();
3283
- }, [a, y, i, t.length, b, W]);
3284
- const z = (X) => {
3285
- V(!0), U.current && window.clearTimeout(U.current), R.current && window.clearTimeout(R.current), g(!1), P(!1), r.onFocus?.(X);
3405
+ de(() => (s && t.length > 0 && !x && z(), () => {
3406
+ W.current && window.clearTimeout(W.current), H.current && window.clearTimeout(H.current);
3407
+ }), [a, x, s, t.length, z]), de(() => {
3408
+ !m && s && t.length > 0 && !x && z();
3409
+ }, [a, m, s, t.length, x, z]);
3410
+ const Y = (X) => {
3411
+ V(!0), W.current && window.clearTimeout(W.current), H.current && window.clearTimeout(H.current), v(!1), B(!1), r.onFocus?.(X);
3286
3412
  }, te = (X) => {
3287
- V(!1), !u && t.length > 0 && (o(""), p(0)), r.onBlur?.(X);
3413
+ V(!1), !u && t.length > 0 && (o(""), f(0)), r.onBlur?.(X);
3288
3414
  }, se = (X) => {
3289
3415
  const ue = X.target.value;
3290
- $ && ue.length > $ || (T ? T(ue) : F(ue), r.onChange?.(X));
3416
+ w && ue.length > w || (C ? C(ue) : F(ue), r.onChange?.(X));
3291
3417
  }, ce = () => {
3292
- const X = T ? u : H;
3293
- X.trim() && !q && (I?.(X), T || F(""));
3418
+ const X = C ? u : G;
3419
+ X.trim() && !q && (T?.(X), C || F(""));
3294
3420
  }, pe = (X) => {
3295
3421
  (X.ctrlKey || X.metaKey) && X.key === "Enter" && (X.preventDefault(), ce()), r.onKeyDown?.(X);
3296
- }, fe = T ? u : H, be = q || !fe.trim() || ($ ? fe.length > $ : !1);
3297
- return /* @__PURE__ */ Z("div", { style: { position: "relative", ...s }, children: [
3422
+ }, fe = C ? u : G, be = q || !fe.trim() || (w ? fe.length > w : !1);
3423
+ return /* @__PURE__ */ Z("div", { style: { position: "relative", ...i }, children: [
3298
3424
  /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3299
- /* @__PURE__ */ E(
3425
+ /* @__PURE__ */ $(
3300
3426
  "textarea",
3301
3427
  {
3302
- ref: v,
3303
- value: T ? u : H,
3428
+ ref: b,
3429
+ value: C ? u : G,
3304
3430
  onChange: se,
3305
3431
  onFocus: (X) => {
3306
- X.target.style.borderColor = "#1890ff", X.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", z(X);
3432
+ X.target.style.borderColor = "#1890ff", X.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", Y(X);
3307
3433
  },
3308
3434
  onBlur: (X) => {
3309
3435
  X.target.style.borderColor = "#d9d9d9", X.target.style.boxShadow = "none", te(X);
3310
3436
  },
3311
3437
  onKeyDown: pe,
3312
- placeholder: b || fe ? x : "",
3313
- maxLength: $,
3314
- rows: f,
3438
+ placeholder: x || fe ? c : "",
3439
+ maxLength: w,
3440
+ rows: y,
3315
3441
  disabled: q,
3316
3442
  style: {
3317
3443
  width: "100%",
3318
- minHeight: `${f * 24 + 16}px`,
3444
+ minHeight: `${y * 24 + 16}px`,
3319
3445
  padding: "8px 60px 8px 12px",
3320
3446
  // 右侧留出按钮空间
3321
3447
  border: "1px solid #d9d9d9",
@@ -3333,7 +3459,7 @@ const Xt = ({
3333
3459
  ...r
3334
3460
  }
3335
3461
  ),
3336
- !b && !fe && n && /* @__PURE__ */ Z(
3462
+ !x && !fe && n && /* @__PURE__ */ Z(
3337
3463
  "div",
3338
3464
  {
3339
3465
  style: {
@@ -3355,8 +3481,8 @@ const Xt = ({
3355
3481
  lineHeight: "1.5"
3356
3482
  },
3357
3483
  children: [
3358
- /* @__PURE__ */ E("span", { children: n }),
3359
- k && /* @__PURE__ */ E(
3484
+ /* @__PURE__ */ $("span", { children: n }),
3485
+ E && /* @__PURE__ */ $(
3360
3486
  "span",
3361
3487
  {
3362
3488
  style: {
@@ -3372,7 +3498,7 @@ const Xt = ({
3372
3498
  ]
3373
3499
  }
3374
3500
  ),
3375
- /* @__PURE__ */ E(
3501
+ /* @__PURE__ */ $(
3376
3502
  "div",
3377
3503
  {
3378
3504
  style: {
@@ -3381,12 +3507,12 @@ const Xt = ({
3381
3507
  right: 8,
3382
3508
  zIndex: 3
3383
3509
  },
3384
- children: /* @__PURE__ */ E(
3510
+ children: /* @__PURE__ */ $(
3385
3511
  $e,
3386
3512
  {
3387
3513
  type: "primary",
3388
3514
  size: "small",
3389
- icon: /* @__PURE__ */ E(mt, {}),
3515
+ icon: /* @__PURE__ */ $(wt, {}),
3390
3516
  onClick: ce,
3391
3517
  disabled: be,
3392
3518
  style: {
@@ -3403,7 +3529,7 @@ const Xt = ({
3403
3529
  }
3404
3530
  )
3405
3531
  ] }),
3406
- w && /* @__PURE__ */ Z(
3532
+ k && /* @__PURE__ */ Z(
3407
3533
  "div",
3408
3534
  {
3409
3535
  style: {
@@ -3415,11 +3541,11 @@ const Xt = ({
3415
3541
  children: [
3416
3542
  fe.length,
3417
3543
  "/",
3418
- $
3544
+ w
3419
3545
  ]
3420
3546
  }
3421
3547
  ),
3422
- /* @__PURE__ */ E("style", { children: `
3548
+ /* @__PURE__ */ $("style", { children: `
3423
3549
  @keyframes blink {
3424
3550
  0%, 50% { opacity: 1; }
3425
3551
  51%, 100% { opacity: 0; }
@@ -3427,7 +3553,7 @@ const Xt = ({
3427
3553
  ` })
3428
3554
  ] });
3429
3555
  };
3430
- Xt.__docgenInfo = {
3556
+ dn.__docgenInfo = {
3431
3557
  displayName: "DynamicTextArea",
3432
3558
  description: "动态文案文本域组件,支持流式文字动画效果",
3433
3559
  props: {
@@ -3513,96 +3639,96 @@ Xt.__docgenInfo = {
3513
3639
  }
3514
3640
  }
3515
3641
  };
3516
- const Je = ({
3642
+ const rt = ({
3517
3643
  src: t,
3518
- poster: x,
3519
- width: d = 300,
3520
- height: i,
3644
+ poster: c,
3645
+ width: l = 300,
3646
+ height: s,
3521
3647
  videoWidth: u,
3522
3648
  // 参数保留但不使用,由CSS控制
3523
- videoHeight: T,
3649
+ videoHeight: C,
3524
3650
  // 参数保留但不使用,由CSS控制
3525
- showPlayButton: I = !0,
3526
- autoPlayOnHover: $ = !0,
3527
- onClick: w,
3651
+ showPlayButton: T = !0,
3652
+ autoPlayOnHover: w = !0,
3653
+ onClick: k,
3528
3654
  onVideoLoaded: e,
3529
3655
  onVideoPlay: q,
3530
- onVideoPause: f,
3531
- onVideoEnded: s,
3656
+ onVideoPause: y,
3657
+ onVideoEnded: i,
3532
3658
  className: r,
3533
3659
  style: n,
3534
3660
  ...o
3535
3661
  }) => {
3536
- const a = Q(null), [p, y] = ne(!1), [g, b] = ne(!1), [V, k] = ne(!1), P = ae(() => {
3537
- a.current && (a.current.play(), y(!0), q?.());
3538
- }, [q]), H = ae(() => {
3539
- a.current && (a.current.pause(), y(!1), f?.());
3540
- }, [f]), F = ae((L) => {
3541
- L.stopPropagation(), p ? H() : P();
3542
- }, [p, P, H]), U = ae(() => {
3543
- b(!0), $ && !p && P();
3544
- }, [$, p, P]), R = ae(() => {
3545
- b(!1), $ && p && H();
3546
- }, [$, p, H]), ee = ae(() => {
3547
- k(!0), e?.();
3662
+ const a = Q(null), [f, m] = ne(!1), [v, x] = ne(!1), [V, E] = ne(!1), B = ae(() => {
3663
+ a.current && (a.current.play(), m(!0), q?.());
3664
+ }, [q]), G = ae(() => {
3665
+ a.current && (a.current.pause(), m(!1), y?.());
3666
+ }, [y]), F = ae((L) => {
3667
+ L.stopPropagation(), f ? G() : B();
3668
+ }, [f, B, G]), W = ae(() => {
3669
+ x(!0), w && !f && B();
3670
+ }, [w, f, B]), H = ae(() => {
3671
+ x(!1), w && f && G();
3672
+ }, [w, f, G]), ee = ae(() => {
3673
+ E(!0), e?.();
3548
3674
  }, [e]), re = ae(() => {
3549
- y(!0), q?.();
3550
- }, [q]), l = ae(() => {
3551
- y(!1), f?.();
3552
- }, [f]), c = ae(() => {
3553
- y(!1), s?.();
3554
- }, [s]), v = ae((L) => {
3555
- w?.(L);
3556
- }, [w]);
3557
- return /* @__PURE__ */ E(
3558
- Oe,
3675
+ m(!0), q?.();
3676
+ }, [q]), d = ae(() => {
3677
+ m(!1), y?.();
3678
+ }, [y]), p = ae(() => {
3679
+ m(!1), i?.();
3680
+ }, [i]), b = ae((L) => {
3681
+ k?.(L);
3682
+ }, [k]);
3683
+ return /* @__PURE__ */ $(
3684
+ Re,
3559
3685
  {
3560
3686
  ...o,
3561
3687
  className: `video-card ${r || ""}`,
3562
3688
  style: {
3563
- width: d,
3564
- height: i,
3689
+ width: l,
3690
+ height: s,
3565
3691
  padding: 0,
3566
3692
  overflow: "hidden",
3567
- cursor: w ? "pointer" : "default",
3693
+ cursor: k ? "pointer" : "default",
3568
3694
  border: "none",
3569
3695
  borderRadius: 0,
3570
3696
  ...n
3571
3697
  },
3572
3698
  bordered: !1,
3573
- onMouseEnter: U,
3574
- onMouseLeave: R,
3575
- onClick: v,
3699
+ onMouseEnter: W,
3700
+ onMouseLeave: H,
3701
+ onClick: b,
3576
3702
  children: /* @__PURE__ */ Z("div", { className: "video-card-container", children: [
3577
- /* @__PURE__ */ E(
3703
+ /* @__PURE__ */ $(
3578
3704
  "video",
3579
3705
  {
3580
3706
  ref: a,
3581
3707
  src: t,
3582
- poster: x,
3708
+ poster: c,
3583
3709
  preload: "metadata",
3584
3710
  onLoadedData: ee,
3585
3711
  onPlay: re,
3586
- onPause: l,
3587
- onEnded: c,
3712
+ onPause: d,
3713
+ onEnded: p,
3588
3714
  muted: !0,
3589
3715
  loop: !0
3590
3716
  }
3591
3717
  ),
3592
- I && /* @__PURE__ */ E(
3718
+ T && /* @__PURE__ */ $(
3593
3719
  "div",
3594
3720
  {
3595
- className: `video-play-button ${g ? "hovered" : ""}`,
3721
+ className: `video-play-button ${v ? "hovered" : ""}`,
3596
3722
  onClick: F,
3597
- children: p ? /* @__PURE__ */ E(ht, { className: "play-icon" }) : /* @__PURE__ */ E(gt, { className: "play-icon" })
3723
+ children: f ? /* @__PURE__ */ $(Et, { className: "play-icon" }) : /* @__PURE__ */ $($t, { className: "play-icon" })
3598
3724
  }
3599
3725
  ),
3600
- !V && /* @__PURE__ */ E("div", { className: "video-loading-mask", children: /* @__PURE__ */ E("div", { className: "loading-spinner" }) })
3726
+ !V && /* @__PURE__ */ $("div", { className: "video-loading-mask", children: /* @__PURE__ */ $("div", { className: "loading-spinner" }) })
3601
3727
  ] })
3602
3728
  }
3603
3729
  );
3604
3730
  };
3605
- Je.__docgenInfo = {
3731
+ rt.__docgenInfo = {
3606
3732
  displayName: "VideoCard",
3607
3733
  description: "视频卡片组件,支持鼠标悬浮播放控制",
3608
3734
  props: {
@@ -3703,11 +3829,11 @@ Je.__docgenInfo = {
3703
3829
  }
3704
3830
  }
3705
3831
  };
3706
- const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((d) => t.toLowerCase().includes(d)), Qt = (t) => t.type ? t.type : Jt(t.url) ? "video" : "image", Zt = ({
3832
+ const pn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((l) => t.toLowerCase().includes(l)), fn = (t) => t.type ? t.type : pn(t.url) ? "video" : "image", yn = ({
3707
3833
  items: t,
3708
- columns: x,
3709
- gap: d = 0,
3710
- responsive: i = !0,
3834
+ columns: c,
3835
+ gap: l = 0,
3836
+ responsive: s = !0,
3711
3837
  breakpoints: u = {
3712
3838
  xs: 1,
3713
3839
  sm: 2,
@@ -3716,35 +3842,35 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3716
3842
  xl: 5,
3717
3843
  xxl: 6
3718
3844
  },
3719
- className: T,
3720
- style: I,
3721
- onClick: $
3845
+ className: C,
3846
+ style: T,
3847
+ onClick: w
3722
3848
  }) => {
3723
- const w = Q(null), [e, q] = ne(x || u.md || 3), f = Q(/* @__PURE__ */ new Map()), s = ae(() => {
3724
- if (!i || x)
3725
- return x || u.md || 3;
3849
+ const k = Q(null), [e, q] = ne(c || u.md || 3), y = Q(/* @__PURE__ */ new Map()), i = ae(() => {
3850
+ if (!s || c)
3851
+ return c || u.md || 3;
3726
3852
  const a = window.innerWidth;
3727
3853
  return a < 576 ? u.xs || 1 : a < 768 ? u.sm || 2 : a < 992 ? u.md || 3 : a < 1200 ? u.lg || 4 : a < 1600 ? u.xl || 5 : u.xxl || 6;
3728
- }, [i, x, u]), r = ae(() => {
3729
- if (!w.current) return;
3730
- const a = e, p = w.current, g = (p.offsetWidth - d * (a - 1)) / a, b = new Array(a).fill(0);
3731
- t.forEach((k, P) => {
3732
- const H = k.id || P, F = f.current.get(H);
3854
+ }, [s, c, u]), r = ae(() => {
3855
+ if (!k.current) return;
3856
+ const a = e, f = k.current, v = (f.offsetWidth - l * (a - 1)) / a, x = new Array(a).fill(0);
3857
+ t.forEach((E, B) => {
3858
+ const G = E.id || B, F = y.current.get(G);
3733
3859
  if (!F) return;
3734
- const U = Math.min(...b), R = b.indexOf(U), ee = R * (g + d), re = b[R];
3735
- F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${g}px`, b[R] += F.offsetHeight + d;
3860
+ const W = Math.min(...x), H = x.indexOf(W), ee = H * (v + l), re = x[H];
3861
+ F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${v}px`, x[H] += F.offsetHeight + l;
3736
3862
  });
3737
- const V = Math.max(...b);
3738
- p.style.height = `${V}px`;
3739
- }, [t, e, d]);
3863
+ const V = Math.max(...x);
3864
+ f.style.height = `${V}px`;
3865
+ }, [t, e, l]);
3740
3866
  de(() => {
3741
3867
  const a = () => {
3742
- const p = s();
3743
- p !== e && q(p);
3868
+ const f = i();
3869
+ f !== e && q(f);
3744
3870
  };
3745
- if (i)
3871
+ if (s)
3746
3872
  return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
3747
- }, [i, s, e]), de(() => {
3873
+ }, [s, i, e]), de(() => {
3748
3874
  const a = setTimeout(() => {
3749
3875
  r();
3750
3876
  }, 100);
@@ -3753,34 +3879,34 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3753
3879
  const n = ae(() => {
3754
3880
  r();
3755
3881
  }, [r]), o = ae((a) => {
3756
- $ && $(a), a.onClick?.(a);
3757
- }, [$]);
3758
- return /* @__PURE__ */ E(
3882
+ w && w(a), a.onClick?.(a);
3883
+ }, [w]);
3884
+ return /* @__PURE__ */ $(
3759
3885
  "div",
3760
3886
  {
3761
- ref: w,
3762
- className: `waterfall-container ${T || ""}`,
3887
+ ref: k,
3888
+ className: `waterfall-container ${C || ""}`,
3763
3889
  style: {
3764
3890
  position: "relative",
3765
3891
  width: "100%",
3766
- ...I
3892
+ ...T
3767
3893
  },
3768
- children: t.map((a, p) => {
3769
- const y = a.id || p, g = Qt(a);
3770
- return /* @__PURE__ */ E(
3894
+ children: t.map((a, f) => {
3895
+ const m = a.id || f, v = fn(a);
3896
+ return /* @__PURE__ */ $(
3771
3897
  "div",
3772
3898
  {
3773
- ref: (b) => {
3774
- b ? f.current.set(y, b) : f.current.delete(y);
3899
+ ref: (x) => {
3900
+ x ? y.current.set(m, x) : y.current.delete(m);
3775
3901
  },
3776
3902
  className: "waterfall-item",
3777
- children: g === "video" ? /* @__PURE__ */ E("div", { style: {
3903
+ children: v === "video" ? /* @__PURE__ */ $("div", { style: {
3778
3904
  width: "100%",
3779
3905
  position: "relative",
3780
3906
  paddingBottom: "56.25%",
3781
- cursor: $ || a.onClick ? "pointer" : "default"
3782
- }, children: /* @__PURE__ */ E("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ E(
3783
- Je,
3907
+ cursor: w || a.onClick ? "pointer" : "default"
3908
+ }, children: /* @__PURE__ */ $("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ $(
3909
+ rt,
3784
3910
  {
3785
3911
  src: a.url,
3786
3912
  poster: a.poster,
@@ -3791,17 +3917,17 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3791
3917
  autoPlayOnHover: !0,
3792
3918
  showPlayButton: !1
3793
3919
  }
3794
- ) }) }) : /* @__PURE__ */ E(
3920
+ ) }) }) : /* @__PURE__ */ $(
3795
3921
  "div",
3796
3922
  {
3797
3923
  className: "waterfall-image-wrapper",
3798
3924
  onClick: () => o(a),
3799
- style: { cursor: $ || a.onClick ? "pointer" : "default" },
3800
- children: /* @__PURE__ */ E(
3925
+ style: { cursor: w || a.onClick ? "pointer" : "default" },
3926
+ children: /* @__PURE__ */ $(
3801
3927
  "img",
3802
3928
  {
3803
3929
  src: a.url,
3804
- alt: `瀑布流图片 ${p + 1}`,
3930
+ alt: `瀑布流图片 ${f + 1}`,
3805
3931
  className: "waterfall-image",
3806
3932
  onLoad: n,
3807
3933
  onError: n,
@@ -3811,13 +3937,13 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3811
3937
  }
3812
3938
  )
3813
3939
  },
3814
- y
3940
+ m
3815
3941
  );
3816
3942
  })
3817
3943
  }
3818
3944
  );
3819
3945
  };
3820
- Zt.__docgenInfo = {
3946
+ yn.__docgenInfo = {
3821
3947
  displayName: "Waterfall",
3822
3948
  description: "瀑布流布局组件,支持图片和视频混合展示",
3823
3949
  props: {
@@ -3873,8 +3999,8 @@ Zt.__docgenInfo = {
3873
3999
  }
3874
4000
  }
3875
4001
  };
3876
- const sn = {
3877
- algorithm: ct.defaultAlgorithm,
4002
+ const kn = {
4003
+ algorithm: ht.defaultAlgorithm,
3878
4004
  token: {
3879
4005
  // 主色
3880
4006
  colorPrimary: "#3b82f6",
@@ -3940,21 +4066,21 @@ const sn = {
3940
4066
  }
3941
4067
  };
3942
4068
  export {
3943
- Nt as AdvancedTable,
3944
- xt as AppModal,
3945
- Ct as BackButton,
3946
- vt as Button,
3947
- bt as Card,
3948
- Kt as DynamicInput,
3949
- Xt as DynamicTextArea,
3950
- $t as EmptyAndSpin,
3951
- Tt as LinkButton,
3952
- kt as PageTable,
3953
- zt as RichTextEditor,
3954
- Je as VideoCard,
3955
- Yt as VirtualTable,
3956
- Zt as Waterfall,
3957
- Et as XcIcon,
3958
- sn as lightTheme
4069
+ It as AdvancedTable,
4070
+ Tt as AppModal,
4071
+ Lt as BackButton,
4072
+ Ct as Button,
4073
+ St as Card,
4074
+ un as DynamicInput,
4075
+ dn as DynamicTextArea,
4076
+ _t as EmptyAndSpin,
4077
+ Dt as LinkButton,
4078
+ qt as PageTable,
4079
+ rn as RichTextEditor,
4080
+ rt as VideoCard,
4081
+ cn as VirtualTable,
4082
+ yn as Waterfall,
4083
+ At as XcIcon,
4084
+ kn as lightTheme
3959
4085
  };
3960
4086
  //# sourceMappingURL=index.es.js.map