bi-components-library 1.0.26 → 1.0.28

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