bi-components-library 1.0.6 → 1.0.8

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,8 +1,8 @@
1
- import $e, { useState as z, useRef as K, useMemo as Re, useCallback as F, useEffect as Z } from "react";
2
- import { Button as de, Card as ve, Modal as Ae, Table as Ne, Flex as we, Spin as Ie, Empty as _e, Select as Ce, Form as me, Input as qe, Space as je, Dropdown as Le, Tooltip as Ve, theme as Oe } from "antd";
3
- import { createFromIconfontCN as Me, LeftOutlined as Pe, SearchOutlined as De, ReloadOutlined as Be, SendOutlined as Ge, PauseCircleOutlined as Fe, PlayCircleOutlined as ze } from "@ant-design/icons";
4
- import { createPortal as He } from "react-dom";
5
- var ye = { exports: {} }, pe = {};
1
+ import Ae, { useState as z, useRef as Y, useMemo as _e, useCallback as F, useEffect as te } from "react";
2
+ import { Button as fe, Card as Ee, Modal as Ie, Table as qe, Flex as ke, Spin as je, Empty as Le, Select as Se, Form as he, Input as $e, Space as Ve, Dropdown as Oe, Tooltip as Me, theme as Pe } from "antd";
3
+ import { createFromIconfontCN as De, LeftOutlined as Be, SearchOutlined as Ge, ReloadOutlined as Fe, SendOutlined as ze, PauseCircleOutlined as He, PlayCircleOutlined as We } from "@ant-design/icons";
4
+ import { createPortal as Xe } from "react-dom";
5
+ var ge = { exports: {} }, me = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -12,29 +12,29 @@ var ye = { exports: {} }, pe = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var Ee;
16
- function We() {
17
- if (Ee) return pe;
18
- Ee = 1;
15
+ var Te;
16
+ function Ke() {
17
+ if (Te) return me;
18
+ Te = 1;
19
19
  var t = Symbol.for("react.transitional.element"), p = Symbol.for("react.fragment");
20
- function u(s, i, m) {
21
- var C = null;
22
- if (m !== void 0 && (C = "" + m), i.key !== void 0 && (C = "" + i.key), "key" in i) {
23
- m = {};
24
- for (var h in i)
25
- h !== "key" && (m[h] = i[h]);
26
- } else m = i;
27
- return i = m.ref, {
20
+ function c(s, l, f) {
21
+ var T = null;
22
+ if (f !== void 0 && (T = "" + f), l.key !== void 0 && (T = "" + l.key), "key" in l) {
23
+ f = {};
24
+ for (var y in l)
25
+ y !== "key" && (f[y] = l[y]);
26
+ } else f = l;
27
+ return l = f.ref, {
28
28
  $$typeof: t,
29
29
  type: s,
30
- key: C,
31
- ref: i !== void 0 ? i : null,
32
- props: m
30
+ key: T,
31
+ ref: l !== void 0 ? l : null,
32
+ props: f
33
33
  };
34
34
  }
35
- return pe.Fragment = p, pe.jsx = u, pe.jsxs = u, pe;
35
+ return me.Fragment = p, me.jsx = c, me.jsxs = c, me;
36
36
  }
37
- var fe = {};
37
+ var ye = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,166 +44,166 @@ var fe = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var ke;
48
- function Xe() {
49
- return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
50
- function t(l) {
51
- if (l == null) return null;
52
- if (typeof l == "function")
53
- return l.$$typeof === G ? null : l.displayName || l.name || null;
54
- if (typeof l == "string") return l;
55
- switch (l) {
56
- case T:
57
- return "Fragment";
47
+ var Ne;
48
+ function Ye() {
49
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
50
+ function t(i) {
51
+ if (i == null) return null;
52
+ if (typeof i == "function")
53
+ return i.$$typeof === W ? null : i.displayName || i.name || null;
54
+ if (typeof i == "string") return i;
55
+ switch (i) {
58
56
  case x:
57
+ return "Fragment";
58
+ case v:
59
59
  return "Profiler";
60
- case g:
60
+ case h:
61
61
  return "StrictMode";
62
- case $:
62
+ case w:
63
63
  return "Suspense";
64
64
  case L:
65
65
  return "SuspenseList";
66
- case O:
66
+ case P:
67
67
  return "Activity";
68
68
  }
69
- if (typeof l == "object")
70
- switch (typeof l.tag == "number" && console.error(
69
+ if (typeof i == "object")
70
+ switch (typeof i.tag == "number" && console.error(
71
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
- ), l.$$typeof) {
73
- case A:
72
+ ), i.$$typeof) {
73
+ case S:
74
74
  return "Portal";
75
- case v:
76
- return (l.displayName || "Context") + ".Provider";
77
- case N:
78
- return (l._context.displayName || "Context") + ".Consumer";
75
+ case g:
76
+ return (i.displayName || "Context") + ".Provider";
77
+ case $:
78
+ return (i._context.displayName || "Context") + ".Consumer";
79
79
  case k:
80
- var j = l.render;
81
- return l = l.displayName, l || (l = j.displayName || j.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
82
- case V:
83
- return j = l.displayName || null, j !== null ? j : t(l.type) || "Memo";
84
- case P:
85
- j = l._payload, l = l._init;
80
+ var I = i.render;
81
+ return i = i.displayName, i || (i = I.displayName || I.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
82
+ case O:
83
+ return I = i.displayName || null, I !== null ? I : t(i.type) || "Memo";
84
+ case M:
85
+ I = i._payload, i = i._init;
86
86
  try {
87
- return t(l(j));
87
+ return t(i(I));
88
88
  } catch {
89
89
  }
90
90
  }
91
91
  return null;
92
92
  }
93
- function p(l) {
94
- return "" + l;
93
+ function p(i) {
94
+ return "" + i;
95
95
  }
96
- function u(l) {
96
+ function c(i) {
97
97
  try {
98
- p(l);
99
- var j = !1;
98
+ p(i);
99
+ var I = !1;
100
100
  } catch {
101
- j = !0;
101
+ I = !0;
102
102
  }
103
- if (j) {
104
- j = console;
105
- var B = j.error, J = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
103
+ if (I) {
104
+ I = console;
105
+ var B = I.error, J = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
106
106
  return B.call(
107
- j,
107
+ I,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
109
  J
110
- ), p(l);
110
+ ), p(i);
111
111
  }
112
112
  }
113
- function s(l) {
114
- if (l === T) return "<>";
115
- if (typeof l == "object" && l !== null && l.$$typeof === P)
113
+ function s(i) {
114
+ if (i === x) return "<>";
115
+ if (typeof i == "object" && i !== null && i.$$typeof === M)
116
116
  return "<...>";
117
117
  try {
118
- var j = t(l);
119
- return j ? "<" + j + ">" : "<...>";
118
+ var I = t(i);
119
+ return I ? "<" + I + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
- function i() {
125
- var l = M.A;
126
- return l === null ? null : l.getOwner();
124
+ function l() {
125
+ var i = D.A;
126
+ return i === null ? null : i.getOwner();
127
127
  }
128
- function m() {
128
+ function f() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
- function C(l) {
132
- if (Y.call(l, "key")) {
133
- var j = Object.getOwnPropertyDescriptor(l, "key").get;
134
- if (j && j.isReactWarning) return !1;
131
+ function T(i) {
132
+ if (X.call(i, "key")) {
133
+ var I = Object.getOwnPropertyDescriptor(i, "key").get;
134
+ if (I && I.isReactWarning) return !1;
135
135
  }
136
- return l.key !== void 0;
136
+ return i.key !== void 0;
137
137
  }
138
- function h(l, j) {
138
+ function y(i, I) {
139
139
  function B() {
140
140
  _ || (_ = !0, console.error(
141
141
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
142
- j
142
+ I
143
143
  ));
144
144
  }
145
- B.isReactWarning = !0, Object.defineProperty(l, "key", {
145
+ B.isReactWarning = !0, Object.defineProperty(i, "key", {
146
146
  get: B,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function e() {
151
- var l = t(this.type);
152
- return W[l] || (W[l] = !0, console.error(
151
+ var i = t(this.type);
152
+ return K[i] || (K[i] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
- )), l = this.props.ref, l !== void 0 ? l : null;
155
- }
156
- function r(l, j, B, J, oe, c, f, o) {
157
- return B = c.ref, l = {
158
- $$typeof: a,
159
- type: l,
160
- key: j,
161
- props: c,
162
- _owner: oe
163
- }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(l, "ref", {
154
+ )), i = this.props.ref, i !== void 0 ? i : null;
155
+ }
156
+ function a(i, I, B, J, se, ee, de, r) {
157
+ return B = ee.ref, i = {
158
+ $$typeof: n,
159
+ type: i,
160
+ key: I,
161
+ props: ee,
162
+ _owner: se
163
+ }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(i, "ref", {
164
164
  enumerable: !1,
165
165
  get: e
166
- }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
166
+ }) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
170
  value: 0
171
- }), Object.defineProperty(l, "_debugInfo", {
171
+ }), Object.defineProperty(i, "_debugInfo", {
172
172
  configurable: !1,
173
173
  enumerable: !1,
174
174
  writable: !0,
175
175
  value: null
176
- }), Object.defineProperty(l, "_debugStack", {
176
+ }), Object.defineProperty(i, "_debugStack", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: f
181
- }), Object.defineProperty(l, "_debugTask", {
180
+ value: de
181
+ }), Object.defineProperty(i, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: o
186
- }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
185
+ value: r
186
+ }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
187
187
  }
188
- function q(l, j, B, J, oe, c, f, o) {
189
- var y = j.children;
190
- if (y !== void 0)
188
+ function N(i, I, B, J, se, ee, de, r) {
189
+ var o = I.children;
190
+ if (o !== void 0)
191
191
  if (J)
192
- if (te(y)) {
193
- for (J = 0; J < y.length; J++)
194
- n(y[J]);
195
- Object.freeze && Object.freeze(y);
192
+ if (Z(o)) {
193
+ for (J = 0; J < o.length; J++)
194
+ d(o[J]);
195
+ Object.freeze && Object.freeze(o);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else n(y);
201
- if (Y.call(j, "key")) {
202
- y = t(l);
203
- var b = Object.keys(j).filter(function(R) {
204
- return R !== "key";
200
+ else d(o);
201
+ if (X.call(I, "key")) {
202
+ o = t(i);
203
+ var m = Object.keys(I).filter(function(b) {
204
+ return b !== "key";
205
205
  });
206
- J = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", le[y + J] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ J = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", ie[o + J] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
@@ -211,85 +211,85 @@ React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
213
  J,
214
- y,
215
- b,
216
- y
217
- ), le[y + J] = !0);
214
+ o,
215
+ m,
216
+ o
217
+ ), ie[o + J] = !0);
218
218
  }
219
- if (y = null, B !== void 0 && (u(B), y = "" + B), C(j) && (u(j.key), y = "" + j.key), "key" in j) {
219
+ if (o = null, B !== void 0 && (c(B), o = "" + B), T(I) && (c(I.key), o = "" + I.key), "key" in I) {
220
220
  B = {};
221
- for (var E in j)
222
- E !== "key" && (B[E] = j[E]);
223
- } else B = j;
224
- return y && h(
221
+ for (var q in I)
222
+ q !== "key" && (B[q] = I[q]);
223
+ } else B = I;
224
+ return o && y(
225
225
  B,
226
- typeof l == "function" ? l.displayName || l.name || "Unknown" : l
227
- ), r(
228
- l,
229
- y,
230
- c,
231
- oe,
232
- i(),
226
+ typeof i == "function" ? i.displayName || i.name || "Unknown" : i
227
+ ), a(
228
+ i,
229
+ o,
230
+ ee,
231
+ se,
232
+ l(),
233
233
  B,
234
- f,
235
- o
234
+ de,
235
+ r
236
236
  );
237
237
  }
238
- function n(l) {
239
- typeof l == "object" && l !== null && l.$$typeof === a && l._store && (l._store.validated = 1);
238
+ function d(i) {
239
+ typeof i == "object" && i !== null && i.$$typeof === n && i._store && (i._store.validated = 1);
240
240
  }
241
- var S = $e, a = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), v = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), V = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), M = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, te = Array.isArray, w = console.createTask ? console.createTask : function() {
241
+ var C = Ae, n = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), g = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), D = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, Z = Array.isArray, E = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- S = {
245
- react_stack_bottom_frame: function(l) {
246
- return l();
244
+ C = {
245
+ react_stack_bottom_frame: function(i) {
246
+ return i();
247
247
  }
248
248
  };
249
- var _, W = {}, U = S.react_stack_bottom_frame.bind(
250
- S,
251
- m
252
- )(), se = w(s(m)), le = {};
253
- fe.Fragment = T, fe.jsx = function(l, j, B, J, oe) {
254
- var c = 1e4 > M.recentlyCreatedOwnerStacks++;
255
- return q(
256
- l,
257
- j,
249
+ var _, K = {}, U = C.react_stack_bottom_frame.bind(
250
+ C,
251
+ f
252
+ )(), le = E(s(f)), ie = {};
253
+ ye.Fragment = x, ye.jsx = function(i, I, B, J, se) {
254
+ var ee = 1e4 > D.recentlyCreatedOwnerStacks++;
255
+ return N(
256
+ i,
257
+ I,
258
258
  B,
259
259
  !1,
260
260
  J,
261
- oe,
262
- c ? Error("react-stack-top-frame") : U,
263
- c ? w(s(l)) : se
261
+ se,
262
+ ee ? Error("react-stack-top-frame") : U,
263
+ ee ? E(s(i)) : le
264
264
  );
265
- }, fe.jsxs = function(l, j, B, J, oe) {
266
- var c = 1e4 > M.recentlyCreatedOwnerStacks++;
267
- return q(
268
- l,
269
- j,
265
+ }, ye.jsxs = function(i, I, B, J, se) {
266
+ var ee = 1e4 > D.recentlyCreatedOwnerStacks++;
267
+ return N(
268
+ i,
269
+ I,
270
270
  B,
271
271
  !0,
272
272
  J,
273
- oe,
274
- c ? Error("react-stack-top-frame") : U,
275
- c ? w(s(l)) : se
273
+ se,
274
+ ee ? Error("react-stack-top-frame") : U,
275
+ ee ? E(s(i)) : le
276
276
  );
277
277
  };
278
- }()), fe;
278
+ }()), ye;
279
279
  }
280
- var Te;
281
- function Ke() {
282
- return Te || (Te = 1, process.env.NODE_ENV === "production" ? ye.exports = We() : ye.exports = Xe()), ye.exports;
280
+ var Ce;
281
+ function Ue() {
282
+ return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? ge.exports = Ke() : ge.exports = Ye()), ge.exports;
283
283
  }
284
- var d = Ke();
285
- const Ye = ({
284
+ var u = Ue();
285
+ const Je = ({
286
286
  variant: t = "primary",
287
287
  loading: p = !1,
288
- children: u,
288
+ children: c,
289
289
  ...s
290
290
  }) => {
291
- const i = (m) => {
292
- switch (m) {
291
+ const l = (f) => {
292
+ switch (f) {
293
293
  case "primary":
294
294
  return "primary";
295
295
  case "ghost":
@@ -304,18 +304,18 @@ const Ye = ({
304
304
  return "primary";
305
305
  }
306
306
  };
307
- return /* @__PURE__ */ d.jsx(
308
- de,
307
+ return /* @__PURE__ */ u.jsx(
308
+ fe,
309
309
  {
310
310
  ...s,
311
- type: i(t),
311
+ type: l(t),
312
312
  loading: p,
313
313
  ghost: t === "ghost",
314
- children: u
314
+ children: c
315
315
  }
316
316
  );
317
317
  };
318
- Ye.__docgenInfo = {
318
+ Je.__docgenInfo = {
319
319
  displayName: "Button",
320
320
  description: "基础按钮,用于触发操作",
321
321
  props: {
@@ -359,25 +359,25 @@ Ye.__docgenInfo = {
359
359
  }
360
360
  }
361
361
  };
362
- const Ue = ({
362
+ const Qe = ({
363
363
  title: t,
364
364
  children: p,
365
- bordered: u = !0,
365
+ bordered: c = !0,
366
366
  hoverable: s = !1,
367
- size: i = "default",
368
- ...m
369
- }) => /* @__PURE__ */ d.jsx(
370
- ve,
367
+ size: l = "default",
368
+ ...f
369
+ }) => /* @__PURE__ */ u.jsx(
370
+ Ee,
371
371
  {
372
- ...m,
372
+ ...f,
373
373
  title: t,
374
- bordered: u,
374
+ bordered: c,
375
375
  hoverable: s,
376
- size: i,
376
+ size: l,
377
377
  children: p
378
378
  }
379
379
  );
380
- Ue.__docgenInfo = {
380
+ Qe.__docgenInfo = {
381
381
  displayName: "Card",
382
382
  description: "卡片容器,用于分组内容",
383
383
  props: {
@@ -428,23 +428,23 @@ Ue.__docgenInfo = {
428
428
  }
429
429
  }
430
430
  };
431
- const Je = ({
431
+ const Ze = ({
432
432
  showDefaultFooter: t = !0,
433
433
  ...p
434
434
  }) => {
435
- const u = p.footer !== void 0 ? p.footer : t ? (s, { OkBtn: i, CancelBtn: m }) => /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
436
- /* @__PURE__ */ d.jsx(i, {}),
437
- /* @__PURE__ */ d.jsx(m, {})
435
+ const c = p.footer !== void 0 ? p.footer : t ? (s, { OkBtn: l, CancelBtn: f }) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
436
+ /* @__PURE__ */ u.jsx(l, {}),
437
+ /* @__PURE__ */ u.jsx(f, {})
438
438
  ] }) : null;
439
- return /* @__PURE__ */ d.jsx(
440
- Ae,
439
+ return /* @__PURE__ */ u.jsx(
440
+ Ie,
441
441
  {
442
442
  ...p,
443
- footer: u
443
+ footer: c
444
444
  }
445
445
  );
446
446
  };
447
- Je.__docgenInfo = {
447
+ Ze.__docgenInfo = {
448
448
  displayName: "AppModal",
449
449
  description: "应用级模态框组件,基于 Ant Design Modal 封装",
450
450
  props: {
@@ -505,13 +505,13 @@ Je.__docgenInfo = {
505
505
  }
506
506
  }
507
507
  };
508
- const Qe = ({
508
+ const et = ({
509
509
  scrollX: t,
510
510
  showPagination: p = !0,
511
- defaultPageSize: u = 10,
511
+ defaultPageSize: c = 10,
512
512
  ...s
513
- }) => /* @__PURE__ */ d.jsx(
514
- Ne,
513
+ }) => /* @__PURE__ */ u.jsx(
514
+ qe,
515
515
  {
516
516
  ...s,
517
517
  scroll: {
@@ -522,12 +522,12 @@ const Qe = ({
522
522
  hideOnSinglePage: !0,
523
523
  showSizeChanger: !0,
524
524
  showQuickJumper: !0,
525
- defaultPageSize: u,
525
+ defaultPageSize: c,
526
526
  ...s.pagination
527
527
  } : !1
528
528
  }
529
529
  );
530
- Qe.__docgenInfo = {
530
+ et.__docgenInfo = {
531
531
  displayName: "PageTable",
532
532
  description: "页面级表格组件,高度铺满容器,自动滚动",
533
533
  props: {
@@ -577,30 +577,30 @@ Qe.__docgenInfo = {
577
577
  }
578
578
  }
579
579
  };
580
- const Ze = Me({
580
+ const tt = De({
581
581
  scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
582
- }), et = ({
582
+ }), nt = ({
583
583
  name: t,
584
584
  size: p,
585
- color: u,
585
+ color: c,
586
586
  style: s,
587
- ...i
587
+ ...l
588
588
  }) => {
589
- const m = {
589
+ const f = {
590
590
  fontSize: p,
591
- color: u,
591
+ color: c,
592
592
  ...s
593
593
  };
594
- return /* @__PURE__ */ d.jsx(
595
- Ze,
594
+ return /* @__PURE__ */ u.jsx(
595
+ tt,
596
596
  {
597
- ...i,
597
+ ...l,
598
598
  type: t,
599
- style: m
599
+ style: f
600
600
  }
601
601
  );
602
602
  };
603
- et.__docgenInfo = {
603
+ nt.__docgenInfo = {
604
604
  displayName: "XcIcon",
605
605
  description: "自定义图标组件,基于 iconfont",
606
606
  props: {
@@ -636,35 +636,35 @@ et.__docgenInfo = {
636
636
  }
637
637
  }
638
638
  };
639
- const tt = ({
639
+ const rt = ({
640
640
  loading: t,
641
641
  description: p = "暂无数据",
642
- className: u,
642
+ className: c,
643
643
  emptyChildren: s,
644
- loadingText: i,
645
- emptyImage: m
646
- }) => t ? /* @__PURE__ */ d.jsxs(
647
- we,
644
+ loadingText: l,
645
+ emptyImage: f
646
+ }) => t ? /* @__PURE__ */ u.jsxs(
647
+ ke,
648
648
  {
649
- className: `pt-10 w-full ${u || ""}`,
649
+ className: `pt-10 w-full ${c || ""}`,
650
650
  align: "center",
651
651
  justify: "center",
652
652
  vertical: !0,
653
653
  children: [
654
- /* @__PURE__ */ d.jsx(Ie, { size: "large" }),
655
- i && /* @__PURE__ */ d.jsx("div", { className: "mt-4 text-gray-500", children: i })
654
+ /* @__PURE__ */ u.jsx(je, { size: "large" }),
655
+ l && /* @__PURE__ */ u.jsx("div", { className: "mt-4 text-gray-500", children: l })
656
656
  ]
657
657
  }
658
- ) : /* @__PURE__ */ d.jsx(
659
- we,
658
+ ) : /* @__PURE__ */ u.jsx(
659
+ ke,
660
660
  {
661
- className: `pt-10 w-full ${u || ""}`,
661
+ className: `pt-10 w-full ${c || ""}`,
662
662
  align: "center",
663
663
  justify: "center",
664
- children: /* @__PURE__ */ d.jsx(
665
- _e,
664
+ children: /* @__PURE__ */ u.jsx(
665
+ Le,
666
666
  {
667
- image: m,
667
+ image: f,
668
668
  description: p,
669
669
  imageStyle: { height: 180 },
670
670
  children: s
@@ -672,7 +672,7 @@ const tt = ({
672
672
  )
673
673
  }
674
674
  );
675
- tt.__docgenInfo = {
675
+ rt.__docgenInfo = {
676
676
  displayName: "EmptyAndSpin",
677
677
  description: "空状态和加载状态组合组件",
678
678
  props: {
@@ -715,24 +715,24 @@ tt.__docgenInfo = {
715
715
  }
716
716
  }
717
717
  };
718
- const nt = ({
718
+ const at = ({
719
719
  onClick: t,
720
720
  showText: p = !1,
721
- className: u,
721
+ className: c,
722
722
  size: s = "small",
723
- type: i = "default"
724
- }) => /* @__PURE__ */ d.jsx(
725
- de,
723
+ type: l = "default"
724
+ }) => /* @__PURE__ */ u.jsx(
725
+ fe,
726
726
  {
727
727
  size: s,
728
- type: i,
729
- icon: /* @__PURE__ */ d.jsx(Pe, {}),
730
- className: `cursor-pointer ${u || ""}`,
728
+ type: l,
729
+ icon: /* @__PURE__ */ u.jsx(Be, {}),
730
+ className: `cursor-pointer ${c || ""}`,
731
731
  onClick: t,
732
732
  children: p && "返回"
733
733
  }
734
734
  );
735
- nt.__docgenInfo = {
735
+ at.__docgenInfo = {
736
736
  displayName: "BackButton",
737
737
  description: "返回按钮组件",
738
738
  props: {
@@ -771,23 +771,23 @@ nt.__docgenInfo = {
771
771
  }
772
772
  }
773
773
  };
774
- const rt = ({
774
+ const ot = ({
775
775
  removePadding: t = !0,
776
776
  className: p,
777
- ...u
777
+ ...c
778
778
  }) => {
779
779
  const s = t ? `px-0 h-auto ${p || ""}` : p;
780
- return /* @__PURE__ */ d.jsx(
781
- de,
780
+ return /* @__PURE__ */ u.jsx(
781
+ fe,
782
782
  {
783
783
  type: "link",
784
- ...u,
784
+ ...c,
785
785
  className: s,
786
- children: u.children
786
+ children: c.children
787
787
  }
788
788
  );
789
789
  };
790
- rt.__docgenInfo = {
790
+ ot.__docgenInfo = {
791
791
  displayName: "LinkButton",
792
792
  description: "链接样式按钮组件,适用于表格操作列",
793
793
  props: {
@@ -824,129 +824,129 @@ rt.__docgenInfo = {
824
824
  }
825
825
  }
826
826
  };
827
- const { Option: at } = Ce, ot = ({
827
+ const { Option: st } = Se, lt = ({
828
828
  columns: t,
829
829
  request: p,
830
- searchFields: u = [],
830
+ searchFields: c = [],
831
831
  showSearch: s = !0,
832
- showRefresh: i = !0,
833
- defaultPageSize: m = 10,
834
- pageSizeOptions: C = ["10", "20", "50", "100"],
835
- autoLoad: h = !0,
832
+ showRefresh: l = !0,
833
+ defaultPageSize: f = 10,
834
+ pageSizeOptions: T = ["10", "20", "50", "100"],
835
+ autoLoad: y = !0,
836
836
  externalParams: e = {},
837
- ...r
837
+ ...a
838
838
  }) => {
839
- const [q, n] = z([]), [S, a] = z(!1), [A, T] = z({
839
+ const [N, d] = z([]), [C, n] = z(!1), [S, x] = z({
840
840
  current: 1,
841
- pageSize: m,
841
+ pageSize: f,
842
842
  total: 0
843
- }), [g, x] = z({}), [N, v] = z({}), [k] = me.useForm(), $ = K(A);
844
- $.current = A;
845
- const L = K(e);
843
+ }), [h, v] = z({}), [$, g] = z({}), [k] = he.useForm(), w = Y(S);
844
+ w.current = S;
845
+ const L = Y(e);
846
846
  L.current = e;
847
- const V = K(!1), P = Re(() => t.map((w) => {
848
- const { sortable: _, render: W, ...U } = w;
847
+ const O = Y(!1), M = _e(() => t.map((E) => {
848
+ const { sortable: _, render: K, ...U } = E;
849
849
  return {
850
850
  ...U,
851
851
  sorter: _ ? !0 : void 0,
852
- render: W || ((se) => se)
852
+ render: K || ((le) => le)
853
853
  };
854
- }), [t]), O = F(async (w = {}) => {
854
+ }), [t]), P = F(async (E = {}) => {
855
855
  if (p) {
856
- a(!0);
856
+ n(!0);
857
857
  try {
858
858
  const _ = {
859
- page: $.current.current,
860
- pageSize: $.current.pageSize,
861
- sortField: N.field,
862
- sortOrder: N.order,
863
- searchParams: { ...g, ...L.current },
864
- ...w
865
- }, W = await p(_);
866
- W.success && (n(W.data), T((U) => ({
859
+ page: w.current.current,
860
+ pageSize: w.current.pageSize,
861
+ sortField: $.field,
862
+ sortOrder: $.order,
863
+ searchParams: { ...h, ...L.current },
864
+ ...E
865
+ }, K = await p(_);
866
+ K.success && (d(K.data), x((U) => ({
867
867
  ...U,
868
- total: W.total,
868
+ total: K.total,
869
869
  current: _.page || U.current
870
870
  })));
871
871
  } catch (_) {
872
872
  console.error("加载数据失败:", _);
873
873
  } finally {
874
- a(!1);
874
+ n(!1);
875
875
  }
876
876
  }
877
- }, [p, N, g]), G = F((w) => {
878
- x(w), T((_) => ({ ..._, current: 1 }));
879
- }, []), M = F(() => {
880
- k.resetFields(), x({}), T((w) => ({ ...w, current: 1 }));
881
- }, [k]), Y = F(() => {
882
- O();
883
- }, [O]), te = F((w, _, W) => {
877
+ }, [p, $, h]), W = F((E) => {
878
+ v(E), x((_) => ({ ..._, current: 1 }));
879
+ }, []), D = F(() => {
880
+ k.resetFields(), v({}), x((E) => ({ ...E, current: 1 }));
881
+ }, [k]), X = F(() => {
882
+ P();
883
+ }, [P]), Z = F((E, _, K) => {
884
884
  const U = {
885
- current: w.current || 1,
886
- pageSize: w.pageSize || m,
887
- total: w.total || 0
888
- }, se = {
889
- field: W?.field,
890
- order: W?.order
885
+ current: E.current || 1,
886
+ pageSize: E.pageSize || f,
887
+ total: E.total || 0
888
+ }, le = {
889
+ field: K?.field,
890
+ order: K?.order
891
891
  };
892
- T(U), v(se);
893
- }, [m]);
894
- return Z(() => {
895
- const w = Object.keys(e).length > 0;
896
- (h && !V.current || w) && (O(), V.current = !0);
897
- }, [h, e, O]), /* @__PURE__ */ d.jsxs("div", { children: [
898
- s && u.length > 0 && /* @__PURE__ */ d.jsx(ve, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ d.jsxs(
899
- me,
892
+ x(U), g(le);
893
+ }, [f]);
894
+ return te(() => {
895
+ const E = Object.keys(e).length > 0;
896
+ (y && !O.current || E) && (P(), O.current = !0);
897
+ }, [y, e, P]), /* @__PURE__ */ u.jsxs("div", { children: [
898
+ s && c.length > 0 && /* @__PURE__ */ u.jsx(Ee, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ u.jsxs(
899
+ he,
900
900
  {
901
901
  form: k,
902
902
  layout: "inline",
903
- onFinish: G,
904
- initialValues: u.reduce((w, _) => (_.defaultValue !== void 0 && (w[_.key] = _.defaultValue), w), {}),
903
+ onFinish: W,
904
+ initialValues: c.reduce((E, _) => (_.defaultValue !== void 0 && (E[_.key] = _.defaultValue), E), {}),
905
905
  children: [
906
- u.map((w) => /* @__PURE__ */ d.jsx(me.Item, { name: w.key, label: w.label, children: w.type === "input" ? /* @__PURE__ */ d.jsx(
907
- qe,
906
+ c.map((E) => /* @__PURE__ */ u.jsx(he.Item, { name: E.key, label: E.label, children: E.type === "input" ? /* @__PURE__ */ u.jsx(
907
+ $e,
908
908
  {
909
- placeholder: w.placeholder || `请输入${w.label}`,
909
+ placeholder: E.placeholder || `请输入${E.label}`,
910
910
  style: { width: 200 }
911
911
  }
912
- ) : /* @__PURE__ */ d.jsx(
913
- Ce,
912
+ ) : /* @__PURE__ */ u.jsx(
913
+ Se,
914
914
  {
915
- placeholder: w.placeholder || `请选择${w.label}`,
915
+ placeholder: E.placeholder || `请选择${E.label}`,
916
916
  style: { width: 200 },
917
917
  allowClear: !0,
918
- children: w.options?.map((_) => /* @__PURE__ */ d.jsx(at, { value: _.value, children: _.label }, _.value))
918
+ children: E.options?.map((_) => /* @__PURE__ */ u.jsx(st, { value: _.value, children: _.label }, _.value))
919
919
  }
920
- ) }, w.key)),
921
- /* @__PURE__ */ d.jsx(me.Item, { children: /* @__PURE__ */ d.jsxs(je, { children: [
922
- /* @__PURE__ */ d.jsx(de, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ d.jsx(De, {}), children: "查询" }),
923
- /* @__PURE__ */ d.jsx(de, { onClick: M, children: "重置" }),
924
- i && /* @__PURE__ */ d.jsx(de, { icon: /* @__PURE__ */ d.jsx(Be, {}), onClick: Y, children: "刷新" })
920
+ ) }, E.key)),
921
+ /* @__PURE__ */ u.jsx(he.Item, { children: /* @__PURE__ */ u.jsxs(Ve, { children: [
922
+ /* @__PURE__ */ u.jsx(fe, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ u.jsx(Ge, {}), children: "查询" }),
923
+ /* @__PURE__ */ u.jsx(fe, { onClick: D, children: "重置" }),
924
+ l && /* @__PURE__ */ u.jsx(fe, { icon: /* @__PURE__ */ u.jsx(Fe, {}), onClick: X, children: "刷新" })
925
925
  ] }) })
926
926
  ]
927
927
  }
928
928
  ) }),
929
- /* @__PURE__ */ d.jsx(
930
- Ne,
929
+ /* @__PURE__ */ u.jsx(
930
+ qe,
931
931
  {
932
- ...r,
933
- columns: P,
934
- dataSource: q,
935
- loading: S,
932
+ ...a,
933
+ columns: M,
934
+ dataSource: N,
935
+ loading: C,
936
936
  pagination: {
937
- ...A,
937
+ ...S,
938
938
  showSizeChanger: !0,
939
939
  showQuickJumper: !0,
940
- showTotal: (w, _) => `第 ${_[0]}-${_[1]} 条/共 ${w} 条`,
941
- pageSizeOptions: C
940
+ showTotal: (E, _) => `第 ${_[0]}-${_[1]} 条/共 ${E} 条`,
941
+ pageSizeOptions: T
942
942
  },
943
- onChange: te,
943
+ onChange: Z,
944
944
  scroll: { x: "max-content", y: "50vh" }
945
945
  }
946
946
  )
947
947
  ] });
948
948
  };
949
- ot.__docgenInfo = {
949
+ lt.__docgenInfo = {
950
950
  displayName: "AdvancedTable",
951
951
  description: "高阶表格组件,支持异步请求、搜索、排序等功能",
952
952
  props: {
@@ -1013,146 +1013,155 @@ ot.__docgenInfo = {
1013
1013
  }
1014
1014
  }
1015
1015
  };
1016
- function be(t, p, u) {
1016
+ function ve(t, p, c) {
1017
1017
  if (!t.current) return;
1018
- const s = /* @__PURE__ */ new Set(), i = {};
1019
- for (const n of p)
1020
- n.exclusionGroup && n.exclusionGroup !== "separator" && (s.add(n.exclusionGroup), i[n.exclusionGroup] || (i[n.exclusionGroup] = []), i[n.exclusionGroup].push({
1021
- type: n.type,
1022
- key: n.key,
1023
- exclusionGroup: n.exclusionGroup
1018
+ const s = /* @__PURE__ */ new Set(), l = {};
1019
+ for (const d of p)
1020
+ d.exclusionGroup && d.exclusionGroup !== "separator" && (s.add(d.exclusionGroup), l[d.exclusionGroup] || (l[d.exclusionGroup] = []), l[d.exclusionGroup].push({
1021
+ type: d.type,
1022
+ key: d.key,
1023
+ exclusionGroup: d.exclusionGroup
1024
1024
  }));
1025
- const m = {};
1026
- for (const n of s) {
1027
- m[n] = !1;
1028
- for (const S of i[n])
1029
- if (S.type === "upload" && S.key) {
1030
- if (u[S.key] !== null && u[S.key] !== void 0) {
1031
- m[n] = !0;
1025
+ const f = {};
1026
+ for (const d of s) {
1027
+ f[d] = !1;
1028
+ for (const C of l[d])
1029
+ if (C.type === "upload" && C.key) {
1030
+ if (c[C.key] !== null && c[C.key] !== void 0) {
1031
+ f[d] = !0;
1032
1032
  break;
1033
1033
  }
1034
- } else if (S.type === "variable" && S.key) {
1035
- const a = t.current.querySelector(
1036
- `[data-type="variable"][data-key="${S.key}"]`
1034
+ } else if (C.type === "variable" && C.key) {
1035
+ const n = t.current.querySelector(
1036
+ `[data-type="variable"][data-key="${C.key}"]`
1037
1037
  );
1038
- if (a && a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1039
- m[n] = !0;
1038
+ if (n && n.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1039
+ f[d] = !0;
1040
1040
  break;
1041
1041
  }
1042
1042
  }
1043
1043
  }
1044
- const C = p.some((n) => n.exclusionGroup === "separator"), e = Object.keys(m).filter(
1045
- (n) => m[n]
1044
+ const T = p.some((d) => d.exclusionGroup === "separator"), e = Object.keys(f).filter(
1045
+ (d) => f[d]
1046
1046
  ).length > 0;
1047
- let r = null;
1048
- if (e && C) {
1049
- for (const n of p)
1050
- if (n.exclusionGroup && n.exclusionGroup !== "separator" && m[n.exclusionGroup]) {
1051
- r = n.exclusionGroup;
1047
+ let a = null;
1048
+ if (e && T) {
1049
+ for (const d of p)
1050
+ if (d.exclusionGroup && d.exclusionGroup !== "separator" && f[d.exclusionGroup]) {
1051
+ a = d.exclusionGroup;
1052
1052
  break;
1053
1053
  }
1054
1054
  }
1055
- for (const n of s) {
1056
- const S = t.current.querySelectorAll(
1057
- `[data-group="${n}"]`
1055
+ for (const d of s) {
1056
+ const C = t.current.querySelectorAll(
1057
+ `[data-group="${d}"]`
1058
1058
  );
1059
- C && e && r ? n === r ? S.forEach((a) => {
1060
- a.classList.contains("required-upload-group") ? a.style.setProperty("display", "inline-flex", "important") : (a.classList.contains("exclusion-wrapper"), a.style.setProperty("display", "inline-block", "important"));
1061
- }) : S.forEach((a) => {
1062
- a.style.display = "none", a.style.setProperty("display", "none", "important");
1063
- }) : S.forEach((a) => {
1064
- a.classList.contains("required-upload-group") ? a.style.setProperty("display", "inline-flex", "important") : (a.classList.contains("exclusion-wrapper"), a.style.setProperty("display", "inline-block", "important"));
1059
+ T && e && a ? d === a ? C.forEach((n) => {
1060
+ n.classList.contains("required-upload-group") ? n.style.setProperty("display", "inline-flex", "important") : (n.classList.contains("exclusion-wrapper"), n.style.setProperty("display", "inline-block", "important"));
1061
+ }) : C.forEach((n) => {
1062
+ n.style.display = "none", n.style.setProperty("display", "none", "important");
1063
+ }) : C.forEach((n) => {
1064
+ n.classList.contains("required-upload-group") ? n.style.setProperty("display", "inline-flex", "important") : (n.classList.contains("exclusion-wrapper"), n.style.setProperty("display", "inline-block", "important"));
1065
1065
  });
1066
1066
  }
1067
1067
  t.current.querySelectorAll(
1068
1068
  '[data-group="separator"]'
1069
- ).forEach((n) => {
1070
- n.style.display = e ? "none" : "inline";
1069
+ ).forEach((d) => {
1070
+ d.style.display = e ? "none" : "inline";
1071
1071
  });
1072
1072
  }
1073
- function xe(t, p, u, s) {
1073
+ function we(t, p, c, s) {
1074
1074
  if (!t.current) {
1075
1075
  s(!1);
1076
1076
  return;
1077
1077
  }
1078
- const i = [];
1078
+ const l = [];
1079
1079
  for (let e = 0; e < p.length; e++) {
1080
- const r = p[e];
1081
- if ((r.type === "variable" || r.type === "upload" || r.type === "multi-variable") && r.required && r.key) {
1082
- i.push({
1083
- exclusionGroup: r.exclusionGroup || "",
1084
- key: r.key,
1085
- type: r.type === "multi-variable" ? "variable" : r.type,
1086
- isMultiVariable: r.type === "multi-variable"
1080
+ const a = p[e];
1081
+ if ((a.type === "variable" || a.type === "upload" || a.type === "multi-variable") && a.required && a.key) {
1082
+ l.push({
1083
+ exclusionGroup: a.exclusionGroup || "",
1084
+ key: a.key,
1085
+ type: a.type === "multi-variable" ? "variable" : a.type,
1086
+ isMultiVariable: a.type === "multi-variable"
1087
1087
  });
1088
1088
  continue;
1089
1089
  }
1090
- if (r.type === "text" && r.className?.includes("rte-text-required") && r.exclusionGroup)
1091
- for (let q = e + 1; q < p.length; q++) {
1092
- const n = p[q];
1093
- if (n.exclusionGroup === r.exclusionGroup && (n.type === "variable" || n.type === "upload") && n.key) {
1094
- i.push({
1095
- exclusionGroup: r.exclusionGroup,
1096
- key: n.key,
1097
- type: n.type
1090
+ if (a.type === "text" && a.className?.includes("rte-text-required") && a.exclusionGroup)
1091
+ for (let N = e + 1; N < p.length; N++) {
1092
+ const d = p[N];
1093
+ if (d.exclusionGroup === a.exclusionGroup && (d.type === "variable" || d.type === "upload") && d.key) {
1094
+ l.push({
1095
+ exclusionGroup: a.exclusionGroup,
1096
+ key: d.key,
1097
+ type: d.type
1098
1098
  });
1099
1099
  break;
1100
1100
  }
1101
1101
  }
1102
1102
  }
1103
- const m = p.some((e) => e.exclusionGroup === "separator");
1104
- let C = !1;
1105
- if (m && i.length > 1) {
1106
- const e = p.findIndex((n) => n.exclusionGroup === "separator"), r = i.filter((n) => p.findIndex(
1107
- (a) => (a.type === "variable" || a.type === "upload") && a.key === n.key && a.exclusionGroup === n.exclusionGroup
1108
- ) < e), q = i.filter((n) => p.findIndex(
1109
- (a) => (a.type === "variable" || a.type === "upload") && a.key === n.key && a.exclusionGroup === n.exclusionGroup
1103
+ const f = p.some((e) => e.exclusionGroup === "separator");
1104
+ let T = !1;
1105
+ if (f && l.length > 1) {
1106
+ const e = p.findIndex((d) => d.exclusionGroup === "separator"), a = l.filter((d) => p.findIndex(
1107
+ (n) => (n.type === "variable" || n.type === "upload") && n.key === d.key && n.exclusionGroup === d.exclusionGroup
1108
+ ) < e), N = l.filter((d) => p.findIndex(
1109
+ (n) => (n.type === "variable" || n.type === "upload") && n.key === d.key && n.exclusionGroup === d.exclusionGroup
1110
1110
  ) > e);
1111
- C = r.length > 0 && q.length > 0;
1111
+ T = a.length > 0 && N.length > 0;
1112
1112
  }
1113
- if (i.length === 0) {
1113
+ if (l.length === 0) {
1114
+ if (p.length === 0) {
1115
+ if (!t.current) {
1116
+ s(!1);
1117
+ return;
1118
+ }
1119
+ const e = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1120
+ s(e.length > 0);
1121
+ return;
1122
+ }
1114
1123
  s(!0);
1115
1124
  return;
1116
1125
  }
1117
- const h = i.filter((e) => {
1126
+ const y = l.filter((e) => {
1118
1127
  if (!t.current) return !1;
1119
- const r = t.current.querySelectorAll(
1128
+ const a = t.current.querySelectorAll(
1120
1129
  `[data-group="${e.exclusionGroup}"]`
1121
1130
  );
1122
- return r.length === 0 ? !1 : r[0].style.display !== "none";
1131
+ return a.length === 0 ? !1 : a[0].style.display !== "none";
1123
1132
  });
1124
- if (h.length === 0) {
1133
+ if (y.length === 0) {
1125
1134
  s(!0);
1126
1135
  return;
1127
1136
  }
1128
- if (C) {
1137
+ if (T) {
1129
1138
  let e = !1;
1130
- for (const r of h)
1131
- if (r.type === "upload" && r.key) {
1132
- if (u[r.key] !== null && u[r.key] !== void 0) {
1139
+ for (const a of y)
1140
+ if (a.type === "upload" && a.key) {
1141
+ if (c[a.key] !== null && c[a.key] !== void 0) {
1133
1142
  e = !0;
1134
1143
  break;
1135
1144
  }
1136
- } else if (r.type === "variable" && r.key)
1137
- if (r.isMultiVariable) {
1138
- const q = t.current.querySelectorAll(
1139
- `[data-type="variable"][data-multi-key="${r.key}"]`
1145
+ } else if (a.type === "variable" && a.key)
1146
+ if (a.isMultiVariable) {
1147
+ const N = t.current.querySelectorAll(
1148
+ `[data-type="variable"][data-multi-key="${a.key}"]`
1140
1149
  );
1141
- let n = !1;
1142
- for (const S of Array.from(q))
1143
- if (S.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1144
- n = !0;
1150
+ let d = !1;
1151
+ for (const C of Array.from(N))
1152
+ if (C.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1153
+ d = !0;
1145
1154
  break;
1146
1155
  }
1147
- if (n) {
1156
+ if (d) {
1148
1157
  e = !0;
1149
1158
  break;
1150
1159
  }
1151
1160
  } else {
1152
- const q = t.current.querySelector(
1153
- `[data-type="variable"][data-key="${r.key}"]`
1161
+ const N = t.current.querySelector(
1162
+ `[data-type="variable"][data-key="${a.key}"]`
1154
1163
  );
1155
- if (q && q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1164
+ if (N && N.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1156
1165
  e = !0;
1157
1166
  break;
1158
1167
  }
@@ -1160,36 +1169,36 @@ function xe(t, p, u, s) {
1160
1169
  s(e);
1161
1170
  } else {
1162
1171
  let e = !0;
1163
- for (const r of h)
1164
- if (r.type === "upload" && r.key) {
1165
- if (u[r.key] === null || u[r.key] === void 0) {
1172
+ for (const a of y)
1173
+ if (a.type === "upload" && a.key) {
1174
+ if (c[a.key] === null || c[a.key] === void 0) {
1166
1175
  e = !1;
1167
1176
  break;
1168
1177
  }
1169
- } else if (r.type === "variable" && r.key)
1170
- if (r.isMultiVariable) {
1171
- const q = t.current.querySelectorAll(
1172
- `[data-type="variable"][data-multi-key="${r.key}"]`
1178
+ } else if (a.type === "variable" && a.key)
1179
+ if (a.isMultiVariable) {
1180
+ const N = t.current.querySelectorAll(
1181
+ `[data-type="variable"][data-multi-key="${a.key}"]`
1173
1182
  );
1174
- let n = !1;
1175
- for (const S of Array.from(q))
1176
- if (S.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1177
- n = !0;
1183
+ let d = !1;
1184
+ for (const C of Array.from(N))
1185
+ if (C.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1186
+ d = !0;
1178
1187
  break;
1179
1188
  }
1180
- if (!n) {
1189
+ if (!d) {
1181
1190
  e = !1;
1182
1191
  break;
1183
1192
  }
1184
1193
  } else {
1185
- const q = t.current.querySelector(
1186
- `[data-type="variable"][data-key="${r.key}"]`
1194
+ const N = t.current.querySelector(
1195
+ `[data-type="variable"][data-key="${a.key}"]`
1187
1196
  );
1188
- if (!q) {
1197
+ if (!N) {
1189
1198
  e = !1;
1190
1199
  break;
1191
1200
  }
1192
- if (q.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1201
+ if (N.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1193
1202
  e = !1;
1194
1203
  break;
1195
1204
  }
@@ -1197,379 +1206,381 @@ function xe(t, p, u, s) {
1197
1206
  s(e);
1198
1207
  }
1199
1208
  }
1200
- function ge(t, p) {
1209
+ function be(t, p) {
1201
1210
  if (!t.current) return;
1202
1211
  t.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
1203
- const i = s.innerText.replace(/\n/g, "");
1204
- i.replace(/\u200B/g, "") ? s.classList.remove("show-placeholder") : (i !== "​" && (s.innerText = "​"), s.classList.add("show-placeholder"));
1212
+ const l = s.innerText.replace(/\n/g, "");
1213
+ l.replace(/\u200B/g, "") ? s.classList.remove("show-placeholder") : (l !== "​" && (s.innerText = "​"), s.classList.add("show-placeholder"));
1205
1214
  });
1206
1215
  }
1207
- function st(t, p, u, s, i, m = {}) {
1216
+ function it(t, p, c, s, l, f = {}) {
1208
1217
  if (!t.current) return;
1209
- let C = "", h = 0;
1210
- for (; h < p.length; ) {
1211
- const e = p[h], r = h + 1 < p.length ? p[h + 1] : null;
1212
- if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && r) {
1213
- const T = r.type === "upload" && r.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === r.exclusionGroup, g = r.type === "variable" && r.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === r.exclusionGroup;
1214
- if (T) {
1215
- const N = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1218
+ let T = "", y = 0;
1219
+ for (; y < p.length; ) {
1220
+ const e = p[y], a = y + 1 < p.length ? p[y + 1] : null;
1221
+ if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && a) {
1222
+ const x = a.type === "upload" && a.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === a.exclusionGroup, h = a.type === "variable" && a.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === a.exclusionGroup;
1223
+ if (x) {
1224
+ const $ = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, g = "</span>";
1216
1225
  let k = "";
1217
1226
  e.className ? k = `<span class="${e.className}">${e.text ?? ""}</span>` : k = e.text ?? "";
1218
- const $ = r, L = u[$.key] !== null && u[$.key] !== void 0, V = L ? u[$.key]?.name : $.text, P = L ? "" : "hidden", O = $.tooltip && !L ? "" : "hidden", G = L ? "has-file" : "", M = L && V ? ` data-file-name="${V.replace(/"/g, "&quot;")}"` : "", Y = `<span contenteditable="false" data-type="upload" data-key="${$.key}" class="upload-chip"><span class="upload-inner-wrapper ${G}"><span class="upload-icon">${L ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${M}>${V || $.text}</span>${$.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${O}" data-upload-key="${$.key}" data-tooltip="${$.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
1219
- C += N + k + Y + v, h += 2;
1227
+ const w = a, L = c[w.key] !== null && c[w.key] !== void 0, O = L ? c[w.key]?.name : w.text, M = L ? "" : "hidden", P = w.tooltip && !L ? "" : "hidden", W = L ? "has-file" : "", D = L && O ? ` data-file-name="${O.replace(/"/g, "&quot;")}"` : "", X = `<span contenteditable="false" data-type="upload" data-key="${w.key}" class="upload-chip"><span class="upload-inner-wrapper ${W}"><span class="upload-icon">${L ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${D}>${O || w.text}</span>${w.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${P}" data-upload-key="${w.key}" data-tooltip="${w.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${M}" title="移除文件">×</span></span></span>`;
1228
+ T += $ + k + X + g, y += 2;
1220
1229
  continue;
1221
1230
  }
1222
- if (g) {
1223
- const N = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1231
+ if (h) {
1232
+ const $ = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, g = "</span>";
1224
1233
  let k = "";
1225
1234
  e.className ? k = `<span class="${e.className}">${e.text ?? ""}</span>` : k = e.text ?? "";
1226
- const $ = r, V = ($.key ? i[$.key] : void 0) || $.text || "", P = !V, O = P ? "​" : V, G = P ? "show-placeholder" : "", M = $.exclusionGroup ? ` data-group="${$.exclusionGroup}"` : "", Y = $.tooltip ? ` data-tooltip="${$.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${$.key || ""}"` : "", te = $.tooltip && P ? "" : "hidden", w = `<span contenteditable="true" data-type="variable" data-key="${$.key}" data-placeholder="${$.placeholder || ""}"${M}${Y} class="variable-chip ${G}">${O}${$.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${te}" data-variable-key="${$.key}" data-tooltip="${$.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1227
- C += N + k + w + v, h += 2;
1235
+ const w = a, O = (w.key ? l[w.key] : void 0) || w.text || "", M = !O, P = M ? "​" : O, W = M ? "show-placeholder" : "", D = w.exclusionGroup ? ` data-group="${w.exclusionGroup}"` : "", X = w.tooltip ? ` data-tooltip="${w.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${w.key || ""}"` : "", Z = w.tooltip && M ? "" : "hidden", E = `<span contenteditable="true" data-type="variable" data-key="${w.key}" data-placeholder="${w.placeholder || ""}"${D}${X} class="variable-chip ${W}">${P}${w.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${Z}" data-variable-key="${w.key}" data-tooltip="${w.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1236
+ T += $ + k + E + g, y += 2;
1228
1237
  continue;
1229
1238
  }
1230
1239
  }
1231
- const n = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", S = e.exclusionGroup ? `<span ${n} class="exclusion-wrapper">` : "", a = e.exclusionGroup ? "</span>" : "";
1232
- let A = "";
1240
+ const d = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", C = e.exclusionGroup ? `<span ${d} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
1241
+ let S = "";
1233
1242
  if (e.type === "tag") {
1234
- const T = s ? "" : '<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>', g = s ? ' data-locked="true"' : "", x = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1235
- A = `<span contenteditable="false" class="tag-node group"${g}${x}><span class="tag-label">${e.text}</span>${T}</span>`;
1243
+ const x = s ? "" : '<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>', h = s ? ' data-locked="true"' : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1244
+ S = `<span contenteditable="false" class="tag-node group"${h}${v}><span class="tag-label">${e.text}</span>${x}</span>`;
1236
1245
  } else if (e.type === "text") {
1237
- const T = s ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
1238
- e.className ? A = `<span class="${e.className}"${T}>${e.text ?? ""}</span>` : A = s ? `<span${T}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
1246
+ const x = s ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
1247
+ e.className ? S = `<span class="${e.className}"${x}>${e.text ?? ""}</span>` : S = s ? `<span${x}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
1239
1248
  } else if (e.type === "variable" && e.key) {
1240
- const g = i[e.key] || e.text || "", x = !g, N = x ? "​" : g, v = x ? "show-placeholder" : "", k = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", $ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", L = e.tooltip && x ? "" : "hidden", V = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${k}${$} class="variable-chip ${v}">${N}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${L}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1241
- e.required ? A = `<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>` : A = V;
1249
+ const h = l[e.key] || e.text || "", v = !h, $ = v ? "​" : h, g = v ? "show-placeholder" : "", k = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", w = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", L = e.tooltip && v ? "" : "hidden", O = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${k}${w} class="variable-chip ${g}">${$}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${L}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1250
+ 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>${O}</span>` : S = O;
1242
1251
  } else if (e.type === "upload" && e.key) {
1243
- const T = u[e.key] !== null && u[e.key] !== void 0, g = T ? u[e.key]?.name : e.text, x = T ? "" : "hidden", N = e.tooltip && !T ? "" : "hidden", v = T ? "has-file" : "", k = T && g ? ` data-file-name="${g.replace(/"/g, "&quot;")}"` : "", $ = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${v}"><span class="upload-icon">${T ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${k}>${g || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${N}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${x}" title="移除文件">×</span></span></span>`;
1244
- e.required ? A = `<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>${$}</span>` : A = $;
1252
+ const x = c[e.key] !== null && c[e.key] !== void 0, h = x ? c[e.key]?.name : e.text, v = x ? "" : "hidden", $ = e.tooltip && !x ? "" : "hidden", g = x ? "has-file" : "", k = x && h ? ` data-file-name="${h.replace(/"/g, "&quot;")}"` : "", w = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${g}"><span class="upload-icon">${x ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${k}>${h || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${$}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
1253
+ 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>${w}</span>` : S = w;
1245
1254
  } else if (e.type === "multi-variable" && e.key) {
1246
- const T = e.maxCount || 9, g = m[e.key] || 1, x = Math.min(g, T);
1247
- let N = "";
1248
- for (let v = 0; v < x; v++) {
1249
- const k = `${e.key}_${v}`, $ = i[k] || "", L = !$, V = L ? "​" : $, P = L ? "show-placeholder" : "", O = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", G = e.tooltip && L ? "" : "hidden", M = `<span contenteditable="true" data-type="variable" data-key="${k}" data-multi-key="${e.key}" data-index="${v}" data-placeholder="${e.placeholder || ""}"${O} class="variable-chip ${P}">${V}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${G}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1250
- N += M;
1255
+ const x = e.maxCount || 9, h = f[e.key] || 1, v = Math.min(h, x);
1256
+ let $ = "";
1257
+ for (let g = 0; g < v; g++) {
1258
+ const k = `${e.key}_${g}`, w = l[k] || "", L = !w, O = L ? "​" : w, M = L ? "show-placeholder" : "", P = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", W = e.tooltip && L ? "" : "hidden", D = `<span contenteditable="true" data-type="variable" data-key="${k}" data-multi-key="${e.key}" data-index="${g}" data-placeholder="${e.placeholder || ""}"${P} class="variable-chip ${M}">${O}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${W}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1259
+ $ += D;
1251
1260
  }
1252
- e.required ? A = `<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>${N}</span>` : A = N;
1261
+ 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>${$}</span>` : S = $;
1253
1262
  }
1254
- C += S + A + a, h++;
1263
+ T += C + S + n, y++;
1255
1264
  }
1256
- t.current && (t.current.innerHTML = C, setTimeout(() => {
1265
+ t.current && (t.current.innerHTML = T, setTimeout(() => {
1257
1266
  if (!t.current) return;
1258
- t.current.querySelectorAll('[data-type="variable"]').forEach((r) => {
1259
- const q = r.innerText.replace(/\n/g, "");
1260
- q.replace(/\u200B/g, "") ? r.classList.remove("show-placeholder") : (q !== "​" && (r.innerText = "​"), r.classList.add("show-placeholder"));
1267
+ t.current.querySelectorAll('[data-type="variable"]').forEach((a) => {
1268
+ const N = a.innerText.replace(/\n/g, "");
1269
+ N.replace(/\u200B/g, "") ? a.classList.remove("show-placeholder") : (N !== "​" && (a.innerText = "​"), a.classList.add("show-placeholder"));
1261
1270
  });
1262
1271
  }, 0));
1263
1272
  }
1264
- function lt(t, p, u, s, i = {}, m, C) {
1265
- const h = F(() => {
1273
+ function ct(t, p, c, s, l = {}, f, T) {
1274
+ const y = F(() => {
1266
1275
  if (!t.current) return;
1267
1276
  if (p.length === 0) {
1268
1277
  t.current.innerHTML = "";
1269
1278
  return;
1270
1279
  }
1271
1280
  let e = {};
1272
- const r = t.current, q = r.__tempVariableValues;
1273
- if (q ? (e = q, delete r.__tempVariableValues) : t.current.querySelectorAll(
1281
+ const a = t.current, N = a.__tempVariableValues;
1282
+ if (N ? (e = N, delete a.__tempVariableValues) : t.current.querySelectorAll(
1274
1283
  '[data-type="variable"]'
1275
- ).forEach((S) => {
1276
- const a = S.dataset.key;
1277
- if (a) {
1278
- const A = S.innerText.replace(/[\u200B\n]/g, "").trim();
1279
- A && (e[a] = A);
1284
+ ).forEach((C) => {
1285
+ const n = C.dataset.key;
1286
+ if (n) {
1287
+ const S = C.innerText.replace(/[\u200B\n]/g, "").trim();
1288
+ S && (e[n] = S);
1280
1289
  }
1281
- }), st(t, p, u, s, e, i), m?.current) {
1282
- const { key: n, offset: S } = m.current;
1290
+ }), it(t, p, c, s, e, l), f?.current) {
1291
+ const { key: d, offset: C } = f.current;
1283
1292
  setTimeout(() => {
1284
1293
  if (!t.current) return;
1285
- const a = t.current.querySelector(
1286
- `[data-type="variable"][data-key="${n}"]`
1294
+ const n = t.current.querySelector(
1295
+ `[data-type="variable"][data-key="${d}"]`
1287
1296
  );
1288
- if (a) {
1297
+ if (n) {
1289
1298
  try {
1290
- const A = document.createRange(), T = document.createTreeWalker(
1291
- a,
1299
+ const S = document.createRange(), x = document.createTreeWalker(
1300
+ n,
1292
1301
  NodeFilter.SHOW_TEXT,
1293
1302
  null
1294
1303
  );
1295
- let g = 0, x = null, N = 0;
1296
- for (; T.nextNode(); ) {
1297
- const v = T.currentNode, k = v.textContent?.length || 0;
1298
- if (g + k >= S) {
1299
- x = v, N = S - g;
1304
+ let h = 0, v = null, $ = 0;
1305
+ for (; x.nextNode(); ) {
1306
+ const g = x.currentNode, k = g.textContent?.length || 0;
1307
+ if (h + k >= C) {
1308
+ v = g, $ = C - h;
1300
1309
  break;
1301
1310
  }
1302
- g += k;
1311
+ h += k;
1303
1312
  }
1304
- if (x) {
1305
- A.setStart(x, Math.min(N, x.textContent?.length || 0)), A.collapse(!0);
1306
- const v = window.getSelection();
1307
- v && (v.removeAllRanges(), v.addRange(A), a.focus());
1313
+ if (v) {
1314
+ S.setStart(v, Math.min($, v.textContent?.length || 0)), S.collapse(!0);
1315
+ const g = window.getSelection();
1316
+ g && (g.removeAllRanges(), g.addRange(S), n.focus());
1308
1317
  } else {
1309
- A.selectNodeContents(a), A.collapse(!1);
1310
- const v = window.getSelection();
1311
- v && (v.removeAllRanges(), v.addRange(A), a.focus());
1318
+ S.selectNodeContents(n), S.collapse(!1);
1319
+ const g = window.getSelection();
1320
+ g && (g.removeAllRanges(), g.addRange(S), n.focus());
1312
1321
  }
1313
1322
  } catch {
1314
- const A = document.createRange();
1315
- A.selectNodeContents(a), A.collapse(!1);
1316
- const T = window.getSelection();
1317
- T && (T.removeAllRanges(), T.addRange(A), a.focus());
1323
+ const S = document.createRange();
1324
+ S.selectNodeContents(n), S.collapse(!1);
1325
+ const x = window.getSelection();
1326
+ x && (x.removeAllRanges(), x.addRange(S), n.focus());
1318
1327
  }
1319
- m.current = null;
1328
+ f.current = null;
1320
1329
  }
1321
1330
  }, 0);
1322
1331
  }
1323
- }, [p, u, s, t, i, m, C]);
1324
- Z(() => {
1325
- h();
1326
- }, [h]);
1332
+ }, [p, c, s, t, l, f, T]);
1333
+ te(() => {
1334
+ y();
1335
+ }, [y]);
1327
1336
  }
1328
- function it(t, p, u, s) {
1329
- Z(() => {
1330
- const i = t.current;
1331
- if (!i) return;
1332
- const m = (h) => {
1333
- const e = h.target?.closest(".upload-info-icon");
1337
+ function ut(t, p, c, s) {
1338
+ te(() => {
1339
+ const l = t.current;
1340
+ if (!l) return;
1341
+ const f = (y) => {
1342
+ const e = y.target?.closest(".upload-info-icon");
1334
1343
  if (e && e.classList.contains("upload-info-icon")) {
1335
- const r = e.dataset.uploadKey;
1336
- r && s({ key: r, anchorEl: e, type: "upload" });
1344
+ const a = e.dataset.uploadKey;
1345
+ a && s({ key: a, anchorEl: e, type: "upload" });
1337
1346
  }
1338
- }, C = (h) => {
1339
- const e = h.target?.closest(".upload-info-icon"), r = h.relatedTarget;
1340
- e && e.classList.contains("upload-info-icon") && (!r || !i.contains(r) ? s(null) : r.closest(".upload-info-icon") || s(null));
1347
+ }, T = (y) => {
1348
+ const e = y.target?.closest(".upload-info-icon"), a = y.relatedTarget;
1349
+ e && e.classList.contains("upload-info-icon") && (!a || !l.contains(a) ? s(null) : a.closest(".upload-info-icon") || s(null));
1341
1350
  };
1342
- return i.addEventListener("mouseover", m, !0), i.addEventListener("mouseout", C, !0), () => {
1343
- i.removeEventListener("mouseover", m, !0), i.removeEventListener("mouseout", C, !0);
1351
+ return l.addEventListener("mouseover", f, !0), l.addEventListener("mouseout", T, !0), () => {
1352
+ l.removeEventListener("mouseover", f, !0), l.removeEventListener("mouseout", T, !0);
1344
1353
  };
1345
- }, [p, u, t, s]);
1354
+ }, [p, c, t, s]);
1346
1355
  }
1347
- function ct(t, p, u) {
1348
- Z(() => {
1356
+ function dt(t, p, c) {
1357
+ te(() => {
1349
1358
  if (!t.current) return;
1350
- const s = (h) => {
1351
- const e = h.currentTarget, r = e.dataset.tooltip, q = e.dataset.tagKey || "";
1352
- r && u({ key: q, anchorEl: e, type: "tag" });
1353
- }, i = () => {
1354
- u(null);
1359
+ const s = (y) => {
1360
+ const e = y.currentTarget, a = e.dataset.tooltip, N = e.dataset.tagKey || "";
1361
+ a && c({ key: N, anchorEl: e, type: "tag" });
1362
+ }, l = () => {
1363
+ c(null);
1355
1364
  };
1356
- let m;
1357
- const C = () => {
1365
+ let f;
1366
+ const T = () => {
1358
1367
  if (!t.current) return;
1359
1368
  t.current.querySelectorAll(
1360
1369
  ".tag-node[data-tooltip]"
1361
1370
  ).forEach((e) => {
1362
- e.addEventListener("mouseenter", s), e.addEventListener("mouseleave", i);
1371
+ e.addEventListener("mouseenter", s), e.addEventListener("mouseleave", l);
1363
1372
  });
1364
1373
  };
1365
- return m = requestAnimationFrame(() => {
1366
- m = requestAnimationFrame(C);
1374
+ return f = requestAnimationFrame(() => {
1375
+ f = requestAnimationFrame(T);
1367
1376
  }), () => {
1368
- cancelAnimationFrame(m), t.current && t.current.querySelectorAll(
1377
+ cancelAnimationFrame(f), t.current && t.current.querySelectorAll(
1369
1378
  ".tag-node[data-tooltip]"
1370
1379
  ).forEach((e) => {
1371
- e.removeEventListener("mouseenter", s), e.removeEventListener("mouseleave", i);
1380
+ e.removeEventListener("mouseenter", s), e.removeEventListener("mouseleave", l);
1372
1381
  });
1373
1382
  };
1374
- }, [p, t, u]);
1383
+ }, [p, t, c]);
1375
1384
  }
1376
- function ut(t, p, u) {
1377
- Z(() => {
1385
+ function pt(t, p, c) {
1386
+ te(() => {
1378
1387
  const s = t.current;
1379
1388
  if (!s) return;
1380
- const i = (C) => {
1381
- const h = C.target?.closest(".variable-info-icon");
1382
- if (h && h.classList.contains("variable-info-icon")) {
1383
- const e = h.dataset.variableKey;
1384
- e && u({ key: e, anchorEl: h, type: "variable" });
1389
+ const l = (T) => {
1390
+ const y = T.target?.closest(".variable-info-icon");
1391
+ if (y && y.classList.contains("variable-info-icon")) {
1392
+ const e = y.dataset.variableKey;
1393
+ e && c({ key: e, anchorEl: y, type: "variable" });
1385
1394
  }
1386
- }, m = (C) => {
1387
- const h = C.target?.closest(".variable-info-icon"), e = C.relatedTarget;
1388
- h && h.classList.contains("variable-info-icon") && (!e || !s.contains(e) ? u(null) : e.closest(".variable-info-icon") || u(null));
1395
+ }, f = (T) => {
1396
+ const y = T.target?.closest(".variable-info-icon"), e = T.relatedTarget;
1397
+ y && y.classList.contains("variable-info-icon") && (!e || !s.contains(e) ? c(null) : e.closest(".variable-info-icon") || c(null));
1389
1398
  };
1390
- return s.addEventListener("mouseover", i, !0), s.addEventListener("mouseout", m, !0), () => {
1391
- s.removeEventListener("mouseover", i, !0), s.removeEventListener("mouseout", m, !0);
1399
+ return s.addEventListener("mouseover", l, !0), s.addEventListener("mouseout", f, !0), () => {
1400
+ s.removeEventListener("mouseover", l, !0), s.removeEventListener("mouseout", f, !0);
1392
1401
  };
1393
- }, [p, t, u]);
1402
+ }, [p, t, c]);
1394
1403
  }
1395
- function dt(t, p, u, s) {
1396
- Z(() => {
1404
+ function ft(t, p, c, s) {
1405
+ te(() => {
1397
1406
  if (!t.current) return;
1398
- const i = (e) => {
1399
- const r = e.currentTarget;
1400
- r.dataset.fileName && s({ key: "", anchorEl: r, type: "upload-label" });
1401
- }, m = () => {
1407
+ const l = (e) => {
1408
+ const a = e.currentTarget;
1409
+ a.dataset.fileName && s({ key: "", anchorEl: a, type: "upload-label" });
1410
+ }, f = () => {
1402
1411
  s(null);
1403
1412
  };
1404
- let C;
1405
- const h = () => {
1413
+ let T;
1414
+ const y = () => {
1406
1415
  if (!t.current) return;
1407
1416
  t.current.querySelectorAll(
1408
1417
  ".upload-label[data-file-name]"
1409
- ).forEach((r) => {
1410
- r.addEventListener("mouseenter", i), r.addEventListener("mouseleave", m);
1418
+ ).forEach((a) => {
1419
+ a.addEventListener("mouseenter", l), a.addEventListener("mouseleave", f);
1411
1420
  });
1412
1421
  };
1413
- return C = requestAnimationFrame(() => {
1414
- C = requestAnimationFrame(h);
1422
+ return T = requestAnimationFrame(() => {
1423
+ T = requestAnimationFrame(y);
1415
1424
  }), () => {
1416
- cancelAnimationFrame(C), t.current && t.current.querySelectorAll(
1425
+ cancelAnimationFrame(T), t.current && t.current.querySelectorAll(
1417
1426
  ".upload-label[data-file-name]"
1418
- ).forEach((r) => {
1419
- r.removeEventListener("mouseenter", i), r.removeEventListener("mouseleave", m);
1427
+ ).forEach((a) => {
1428
+ a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave", f);
1420
1429
  });
1421
1430
  };
1422
- }, [p, u, t, s]);
1431
+ }, [p, c, t, s]);
1423
1432
  }
1424
- function pt(t, p, u, s) {
1425
- Z(() => {
1426
- be(t, p, u), xe(t, p, u, s);
1427
- }, [u, p, t, s]);
1433
+ function mt(t, p, c, s) {
1434
+ te(() => {
1435
+ ve(t, p, c), we(t, p, c, s);
1436
+ }, [c, p, t, s]);
1428
1437
  }
1429
- function ft(t, p) {
1430
- Z(() => {
1438
+ function yt(t, p) {
1439
+ te(() => {
1431
1440
  if (!t.current) return;
1432
- let u = !1, s = 0;
1433
- const i = () => {
1434
- u = !0;
1435
- }, m = () => {
1436
- u = !1, s = Date.now();
1441
+ let c = !1, s = 0;
1442
+ const l = () => {
1443
+ c = !0;
1444
+ }, f = () => {
1445
+ c = !1, s = Date.now();
1437
1446
  };
1438
- let C = !1, h = 0;
1447
+ let T = !1, y = 0;
1439
1448
  const e = () => {
1440
- C = !0;
1441
- }, r = () => {
1442
- C = !1, h = Date.now();
1443
- }, q = () => {
1444
- h = Date.now();
1445
- }, n = () => {
1449
+ T = !0;
1450
+ }, a = () => {
1451
+ T = !1, y = Date.now();
1452
+ }, N = () => {
1453
+ y = Date.now();
1454
+ }, d = () => {
1446
1455
  if (!t.current) return;
1447
- const a = window.getSelection();
1448
- if (!a || a.rangeCount === 0 || p.current || u || C || Date.now() - h < 500)
1456
+ const n = window.getSelection();
1457
+ if (!n || n.rangeCount === 0 || p.current || c || T || Date.now() - y < 500)
1449
1458
  return;
1450
- const A = a.getRangeAt(0);
1451
- if (!A.collapsed) {
1452
- t.current.contains(A.commonAncestorContainer) || a.removeAllRanges();
1459
+ const S = n.getRangeAt(0);
1460
+ if (!S.collapsed) {
1461
+ t.current.contains(S.commonAncestorContainer) || n.removeAllRanges();
1453
1462
  return;
1454
1463
  }
1455
- const T = a.anchorNode;
1456
- if (!T) return;
1457
- if (!t.current.contains(T)) {
1458
- a.removeAllRanges();
1464
+ const x = n.anchorNode;
1465
+ if (!x) return;
1466
+ if (!t.current.contains(x)) {
1467
+ n.removeAllRanges();
1459
1468
  return;
1460
1469
  }
1461
- let g = null;
1462
- if (T.nodeType === Node.ELEMENT_NODE ? g = T.closest('[data-type="variable"]') : T.nodeType === Node.TEXT_NODE && T.parentElement && (g = T.parentElement.closest('[data-type="variable"]')), !g) {
1470
+ let h = null;
1471
+ if (x.nodeType === Node.ELEMENT_NODE ? h = x.closest('[data-type="variable"]') : x.nodeType === Node.TEXT_NODE && x.parentElement && (h = x.parentElement.closest('[data-type="variable"]')), !h) {
1463
1472
  if (Date.now() - s > 500)
1464
1473
  return;
1465
- const x = t.current.querySelectorAll('[data-type="variable"]');
1466
- if (x.length > 0) {
1467
- let N = null;
1468
- for (const v of Array.from(x))
1469
- if (v.style.display !== "none") {
1470
- N = v;
1474
+ const v = t.current.querySelectorAll('[data-type="variable"]');
1475
+ if (v.length > 0) {
1476
+ let $ = null;
1477
+ for (const g of Array.from(v))
1478
+ if (g.style.display !== "none") {
1479
+ $ = g;
1471
1480
  break;
1472
1481
  }
1473
- if (!N && x.length > 0 && (N = x[0]), N) {
1474
- const v = document.createRange();
1475
- v.selectNodeContents(N), v.collapse(!1), a.removeAllRanges(), a.addRange(v), N.focus();
1482
+ if (!$ && v.length > 0 && ($ = v[0]), $) {
1483
+ const g = document.createRange();
1484
+ g.selectNodeContents($), g.collapse(!1), n.removeAllRanges(), n.addRange(g), $.focus();
1476
1485
  } else
1477
- a.removeAllRanges();
1486
+ n.removeAllRanges();
1478
1487
  } else
1479
- a.removeAllRanges();
1488
+ n.removeAllRanges();
1480
1489
  }
1481
- }, S = t.current;
1482
- return S && (S.addEventListener("compositionstart", e), S.addEventListener("compositionend", r), S.addEventListener("input", q)), document.addEventListener("mousedown", i), document.addEventListener("mouseup", m), document.addEventListener("selectionchange", n), () => {
1483
- const a = t.current;
1484
- a && (a.removeEventListener("compositionstart", e), a.removeEventListener("compositionend", r), a.removeEventListener("input", q)), document.removeEventListener("mousedown", i), document.removeEventListener("mouseup", m), document.removeEventListener("selectionchange", n);
1490
+ }, C = t.current;
1491
+ return C && (C.addEventListener("compositionstart", e), C.addEventListener("compositionend", a), C.addEventListener("input", N)), document.addEventListener("mousedown", l), document.addEventListener("mouseup", f), document.addEventListener("selectionchange", d), () => {
1492
+ const n = t.current;
1493
+ n && (n.removeEventListener("compositionstart", e), n.removeEventListener("compositionend", a), n.removeEventListener("input", N)), document.removeEventListener("mousedown", l), document.removeEventListener("mouseup", f), document.removeEventListener("selectionchange", d);
1485
1494
  };
1486
1495
  }, [t, p]);
1487
1496
  }
1488
- const mt = ({
1497
+ const ht = ({
1489
1498
  config: t,
1490
1499
  onSend: p,
1491
- isProcessing: u = !1,
1500
+ isProcessing: c = !1,
1492
1501
  disabled: s = !1,
1493
- width: i,
1494
- lockStructure: m = !1,
1495
- agentOptions: C = [],
1496
- onAgentSelect: h,
1502
+ width: l,
1503
+ lockStructure: f = !1,
1504
+ agentOptions: T = [],
1505
+ onAgentSelect: y,
1497
1506
  onAgentExit: e,
1498
- loading: r = !1,
1499
- placeholder: q
1507
+ loading: a = !1,
1508
+ placeholder: N,
1509
+ border: d,
1510
+ background: C = "transparent"
1500
1511
  }) => {
1501
- const n = K(null), S = K(null), [a, A] = z({}), [T, g] = z(null), [x, N] = z(null), v = K(!1), k = K(null), [$, L] = z(!1), V = K(null), [P, O] = z(!0), [G, M] = z(() => {
1502
- const c = {};
1503
- return t.forEach((f) => {
1504
- f.type === "multi-variable" && f.key && (c[f.key] = 1);
1505
- }), c;
1512
+ const n = Y(null), S = Y(null), [x, h] = z({}), [v, $] = z(null), [g, k] = z(null), w = Y(!1), L = Y(null), [O, M] = z(!1), P = Y(null), [W, D] = z(!0), [X, Z] = z(() => {
1513
+ const r = {};
1514
+ return t.forEach((o) => {
1515
+ o.type === "multi-variable" && o.key && (r[o.key] = 1);
1516
+ }), r;
1506
1517
  });
1507
- Z(() => {
1508
- M((c) => {
1509
- const f = {};
1510
- return t.forEach((o) => {
1511
- o.type === "multi-variable" && o.key && (f[o.key] = c[o.key] || 1);
1512
- }), f;
1518
+ te(() => {
1519
+ Z((r) => {
1520
+ const o = {};
1521
+ return t.forEach((m) => {
1522
+ m.type === "multi-variable" && m.key && (o[m.key] = r[m.key] || 1);
1523
+ }), o;
1513
1524
  });
1514
- }, [t]), lt(n, t, a, m, G, V), it(n, t, a, N), ct(n, t, N), dt(n, t, a, N), ut(n, t, N), pt(n, t, a, L), ft(n, v), Z(() => {
1525
+ }, [t]), ct(n, t, x, f, X, P), ut(n, t, x, k), dt(n, t, k), ft(n, t, x, k), pt(n, t, k), mt(n, t, x, M), yt(n, w), te(() => {
1515
1526
  if (t.length > 0) {
1516
- O(!1);
1527
+ D(!1);
1517
1528
  return;
1518
1529
  }
1519
- const c = () => {
1530
+ const r = () => {
1520
1531
  if (!n.current) {
1521
- O(!0);
1532
+ D(!0);
1522
1533
  return;
1523
1534
  }
1524
- const o = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", y = n.current.querySelectorAll('[data-type="variable"]'), b = n.current.querySelectorAll('[data-type="upload"]');
1525
- let E = !1;
1526
- y.forEach((I) => {
1527
- (I.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (E = !0);
1528
- }), b.forEach((I) => {
1529
- I.querySelector(".upload-inner-wrapper.has-file") && (E = !0);
1535
+ const m = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", q = n.current.querySelectorAll('[data-type="variable"]'), b = n.current.querySelectorAll('[data-type="upload"]');
1536
+ let R = !1;
1537
+ q.forEach((V) => {
1538
+ (V.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (R = !0);
1539
+ }), b.forEach((V) => {
1540
+ V.querySelector(".upload-inner-wrapper.has-file") && (R = !0);
1530
1541
  });
1531
- const R = !o && !E;
1532
- O(R), t.length === 0 && L(!R);
1542
+ const A = !m && !R;
1543
+ D(A), t.length === 0 && M(!A);
1533
1544
  };
1534
- c();
1535
- const f = new MutationObserver(c);
1536
- return n.current && f.observe(n.current, {
1545
+ r();
1546
+ const o = new MutationObserver(r);
1547
+ return n.current && o.observe(n.current, {
1537
1548
  childList: !0,
1538
1549
  subtree: !0,
1539
1550
  characterData: !0
1540
1551
  }), () => {
1541
- f.disconnect();
1552
+ o.disconnect();
1542
1553
  };
1543
1554
  }, [t]);
1544
- const Y = (c) => {
1555
+ const E = (r) => {
1545
1556
  if (s) {
1546
- c.preventDefault();
1557
+ r.preventDefault();
1547
1558
  return;
1548
1559
  }
1549
- c.preventDefault();
1550
- const f = c.clipboardData.getData("text/plain"), o = window.getSelection();
1551
- if (o && o.rangeCount > 0) {
1552
- const y = o.anchorNode;
1553
- if (y) {
1560
+ r.preventDefault();
1561
+ const o = r.clipboardData.getData("text/plain"), m = window.getSelection();
1562
+ if (m && m.rangeCount > 0) {
1563
+ const q = m.anchorNode;
1564
+ if (q) {
1554
1565
  let b = null;
1555
- if (y.nodeType === Node.ELEMENT_NODE ? b = y.closest('[data-type="variable"]') : y.nodeType === Node.TEXT_NODE && y.parentElement && (b = y.parentElement.closest('[data-type="variable"]')), b) {
1556
- const E = b.dataset.multiKey;
1557
- if (E) {
1558
- const R = f.split(/[,\n\r\t]+/).map((I) => I.trim()).filter((I) => I.length > 0);
1559
- if (R.length > 1) {
1560
- const I = parseInt(b.dataset.index || "0", 10), D = t.find((ne) => ne.type === "multi-variable" && ne.key === E)?.maxCount || 9, X = G[E] || 1, ee = Math.min(I + R.length, D);
1561
- ee > X && M((Q) => ({
1566
+ if (q.nodeType === Node.ELEMENT_NODE ? b = q.closest('[data-type="variable"]') : q.nodeType === Node.TEXT_NODE && q.parentElement && (b = q.parentElement.closest('[data-type="variable"]')), b) {
1567
+ const R = b.dataset.multiKey;
1568
+ if (R) {
1569
+ const A = o.split(/[,\n\r\t]+/).map((V) => V.trim()).filter((V) => V.length > 0);
1570
+ if (A.length > 1) {
1571
+ const V = parseInt(b.dataset.index || "0", 10), j = t.find((re) => re.type === "multi-variable" && re.key === R)?.maxCount || 9, G = X[R] || 1, ne = Math.min(V + A.length, j);
1572
+ ne > G && Z((Q) => ({
1562
1573
  ...Q,
1563
- [E]: ee
1574
+ [R]: ne
1564
1575
  })), setTimeout(() => {
1565
- n.current && (R.forEach((Q, ne) => {
1566
- const ae = I + ne;
1567
- if (ae >= D) return;
1568
- const H = `${E}_${ae}`, re = n.current.querySelector(
1576
+ n.current && (A.forEach((Q, re) => {
1577
+ const oe = V + re;
1578
+ if (oe >= j) return;
1579
+ const H = `${R}_${oe}`, ae = n.current.querySelector(
1569
1580
  `[data-type="variable"][data-key="${H}"]`
1570
1581
  );
1571
- re && (re.innerText = Q, re.classList.remove("show-placeholder"));
1572
- }), l());
1582
+ ae && (ae.innerText = Q, ae.classList.remove("show-placeholder"));
1583
+ }), B());
1573
1584
  }, 0);
1574
1585
  return;
1575
1586
  }
@@ -1577,228 +1588,235 @@ const mt = ({
1577
1588
  }
1578
1589
  }
1579
1590
  }
1580
- document.execCommand("insertText", !1, f), l();
1581
- }, te = (c) => {
1582
- if (c.target.files && c.target.files[0] && T) {
1583
- const f = c.target.files[0], o = T;
1584
- A((y) => ({ ...y, [o]: f }));
1585
- }
1586
- c.target && (c.target.value = ""), g(null);
1587
- }, w = (c) => {
1588
- A((f) => {
1589
- const o = { ...f };
1590
- return delete o[c], o;
1591
+ document.execCommand("insertText", !1, o), B();
1592
+ }, _ = (r) => {
1593
+ if (r.target.files && r.target.files[0] && v) {
1594
+ const o = r.target.files[0], m = v;
1595
+ h((q) => ({ ...q, [m]: o }));
1596
+ }
1597
+ r.target && (r.target.value = ""), $(null);
1598
+ }, K = (r) => {
1599
+ h((o) => {
1600
+ const m = { ...o };
1601
+ return delete m[r], m;
1591
1602
  });
1592
- }, _ = (c) => {
1593
- const f = c.target;
1594
- if (f.closest(".tag-close-btn")) {
1595
- if (c.preventDefault(), c.stopPropagation(), m)
1603
+ }, U = (r) => {
1604
+ const o = r.target;
1605
+ if (o.closest(".tag-close-btn")) {
1606
+ if (r.preventDefault(), r.stopPropagation(), f)
1596
1607
  return;
1597
- N(null), e ? e() : n.current && (n.current.innerHTML = "", n.current.focus());
1608
+ k(null), e ? e() : n.current && (n.current.innerHTML = "", n.current.focus());
1598
1609
  return;
1599
1610
  }
1600
- if (m) {
1601
- const b = f.closest(".tag-node"), E = f.closest('[data-type="text"]');
1602
- if (b || E) {
1603
- c.preventDefault(), c.stopPropagation();
1604
- const R = window.getSelection();
1605
- R && R.removeAllRanges();
1611
+ if (f) {
1612
+ const b = o.closest(".tag-node"), R = o.closest('[data-type="text"]');
1613
+ if (b || R) {
1614
+ r.preventDefault(), r.stopPropagation();
1615
+ const A = window.getSelection();
1616
+ A && A.removeAllRanges();
1606
1617
  return;
1607
1618
  }
1608
1619
  }
1609
- f.closest('[data-type="variable"]') || (k.current = { x: c.clientX, y: c.clientY }, v.current = !1, f.closest(".file-remove-btn") && (c.preventDefault(), c.stopPropagation()));
1610
- }, W = (c) => {
1611
- if (!c.target.closest('[data-type="variable"]') && k.current) {
1612
- const y = Math.abs(c.clientX - k.current.x), b = Math.abs(c.clientY - k.current.y);
1613
- (y > 3 || b > 3) && (v.current = !0);
1620
+ o.closest('[data-type="variable"]') || (L.current = { x: r.clientX, y: r.clientY }, w.current = !1, o.closest(".file-remove-btn") && (r.preventDefault(), r.stopPropagation()));
1621
+ }, le = (r) => {
1622
+ if (!r.target.closest('[data-type="variable"]') && L.current) {
1623
+ const q = Math.abs(r.clientX - L.current.x), b = Math.abs(r.clientY - L.current.y);
1624
+ (q > 3 || b > 3) && (w.current = !0);
1614
1625
  }
1615
- }, U = (c) => {
1616
- if (c.target.closest('[data-type="variable"]')) {
1617
- k.current = null, v.current = !1;
1626
+ }, ie = (r) => {
1627
+ if (r.target.closest('[data-type="variable"]')) {
1628
+ L.current = null, w.current = !1;
1618
1629
  return;
1619
1630
  }
1620
- k.current = null, v.current = !1;
1621
- }, se = (c) => {
1631
+ L.current = null, w.current = !1;
1632
+ }, i = (r) => {
1622
1633
  if (s)
1623
1634
  return;
1624
- const f = c.target;
1625
- if (f.closest(".tag-close-btn")) {
1626
- c.preventDefault(), c.stopPropagation();
1635
+ const o = r.target;
1636
+ if (o.closest(".tag-close-btn")) {
1637
+ r.preventDefault(), r.stopPropagation();
1627
1638
  return;
1628
1639
  }
1629
1640
  if (t.length === 0)
1630
1641
  return;
1631
- if (f.closest('[data-type="text"]')) {
1632
- c.preventDefault(), c.stopPropagation();
1633
- const I = window.getSelection();
1634
- I && I.removeAllRanges();
1642
+ if (o.closest('[data-type="text"]')) {
1643
+ r.preventDefault(), r.stopPropagation();
1644
+ const V = window.getSelection();
1645
+ V && V.removeAllRanges();
1635
1646
  return;
1636
1647
  }
1637
- if (m && f.closest(".tag-node")) {
1638
- c.preventDefault(), c.stopPropagation();
1639
- const D = window.getSelection();
1640
- D && D.removeAllRanges();
1648
+ if (f && o.closest(".tag-node")) {
1649
+ r.preventDefault(), r.stopPropagation();
1650
+ const j = window.getSelection();
1651
+ j && j.removeAllRanges();
1641
1652
  return;
1642
1653
  }
1643
- if (f.closest('[data-type="variable"]')) {
1644
- if (v.current)
1654
+ if (o.closest('[data-type="variable"]')) {
1655
+ if (w.current)
1645
1656
  return;
1646
1657
  setTimeout(() => {
1647
- const I = window.getSelection();
1648
- I && !I.isCollapsed || ge(n);
1658
+ const V = window.getSelection();
1659
+ V && !V.isCollapsed || be(n);
1649
1660
  }, 10);
1650
1661
  return;
1651
1662
  }
1652
- const E = f.closest(".file-remove-btn");
1653
- if (E) {
1654
- c.preventDefault(), c.stopPropagation();
1655
- const D = E.closest('[data-type="upload"]')?.dataset.key;
1656
- D && w(D);
1663
+ const R = o.closest(".file-remove-btn");
1664
+ if (R) {
1665
+ r.preventDefault(), r.stopPropagation();
1666
+ const j = R.closest('[data-type="upload"]')?.dataset.key;
1667
+ j && K(j);
1657
1668
  return;
1658
1669
  }
1659
- const R = f.closest('[data-type="upload"]');
1660
- if (R) {
1661
- const I = R.dataset.key;
1662
- I && (g(I), S.current?.click());
1670
+ const A = o.closest('[data-type="upload"]');
1671
+ if (A) {
1672
+ const V = A.dataset.key;
1673
+ V && ($(V), S.current?.click());
1663
1674
  return;
1664
1675
  }
1665
- }, le = (c) => {
1666
- const o = c.target.closest('[data-type="variable"]');
1667
- if (o) {
1668
- const y = window.getSelection();
1669
- if (y) {
1670
- const b = document.createRange(), E = o.textContent || "";
1671
- if (E.replace(/\u200B/g, "")) {
1672
- let I = 0, D = E.length;
1673
- E.startsWith("​") && (I = 1), E.endsWith("​") && E.length > 1 && (D = E.length - 1);
1674
- const X = o.firstChild;
1675
- X && X.nodeType === Node.TEXT_NODE ? (b.setStart(X, I), b.setEnd(X, D)) : b.selectNodeContents(o);
1676
+ }, I = (r) => {
1677
+ const m = r.target.closest('[data-type="variable"]');
1678
+ if (m) {
1679
+ const q = window.getSelection();
1680
+ if (q) {
1681
+ const b = document.createRange(), R = m.textContent || "";
1682
+ if (R.replace(/\u200B/g, "")) {
1683
+ let V = 0, j = R.length;
1684
+ R.startsWith("​") && (V = 1), R.endsWith("​") && R.length > 1 && (j = R.length - 1);
1685
+ const G = m.firstChild;
1686
+ G && G.nodeType === Node.TEXT_NODE ? (b.setStart(G, V), b.setEnd(G, j)) : b.selectNodeContents(m);
1676
1687
  } else
1677
- b.selectNodeContents(o), b.collapse(!0);
1678
- y.removeAllRanges(), y.addRange(b);
1688
+ b.selectNodeContents(m), b.collapse(!0);
1689
+ q.removeAllRanges(), q.addRange(b);
1679
1690
  }
1680
1691
  }
1681
- }, l = () => {
1692
+ }, B = () => {
1682
1693
  if (t.length === 0) {
1683
1694
  if (n.current) {
1684
- const o = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
1685
- O(o), L(!o);
1695
+ const m = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
1696
+ D(m), M(!m);
1686
1697
  }
1687
1698
  return;
1688
1699
  }
1689
- if (ge(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((o) => {
1690
- const y = o.querySelector(".variable-info-icon");
1691
- if (y) {
1700
+ if (be(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((m) => {
1701
+ const q = m.querySelector(".variable-info-icon");
1702
+ if (q) {
1692
1703
  let b = !1;
1693
- const E = document.createTreeWalker(
1694
- o,
1704
+ const R = document.createTreeWalker(
1705
+ m,
1695
1706
  NodeFilter.SHOW_TEXT,
1696
1707
  {
1697
- acceptNode: (R) => y.contains(R) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
1708
+ acceptNode: (A) => q.contains(A) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
1698
1709
  }
1699
1710
  );
1700
- for (; E.nextNode(); )
1701
- if (E.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
1711
+ for (; R.nextNode(); )
1712
+ if (R.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
1702
1713
  b = !0;
1703
1714
  break;
1704
1715
  }
1705
- b ? y.classList.add("hidden") : y.classList.remove("hidden");
1716
+ b ? q.classList.add("hidden") : q.classList.remove("hidden");
1706
1717
  }
1707
- }), be(n, t, a), xe(n, t, a, L), !n.current) return;
1708
- t.filter((f) => f.type === "multi-variable" && f.key).forEach((f) => {
1709
- if (!f.key) return;
1710
- const o = f.maxCount || 9, y = G[f.key] || 1, b = [];
1711
- for (let X = 0; X < y; X++) {
1712
- const ee = `${f.key}_${X}`, Q = n.current.querySelector(
1713
- `[data-type="variable"][data-key="${ee}"][data-multi-key="${f.key}"]`
1718
+ }), ve(n, t, x), we(n, t, x, M), !n.current) return;
1719
+ t.filter((o) => o.type === "multi-variable" && o.key).forEach((o) => {
1720
+ if (!o.key) return;
1721
+ const m = o.maxCount || 9, q = X[o.key] || 1, b = [];
1722
+ for (let G = 0; G < q; G++) {
1723
+ const ne = `${o.key}_${G}`, Q = n.current.querySelector(
1724
+ `[data-type="variable"][data-key="${ne}"][data-multi-key="${o.key}"]`
1714
1725
  );
1715
1726
  if (Q) {
1716
- const ne = Q.innerText.replace(/[\u200B\n]/g, "").trim();
1717
- b.push(ne);
1727
+ const re = Q.innerText.replace(/[\u200B\n]/g, "").trim();
1728
+ b.push(re);
1718
1729
  }
1719
1730
  }
1720
- const R = (b[b.length - 1] || "") === "";
1721
- let I = !1, D = -1;
1722
- for (let X = 0; X < b.length - 1; X++)
1723
- if (b[X] === "") {
1724
- I = !0, D = X;
1731
+ const A = (b[b.length - 1] || "") === "";
1732
+ let V = !1, j = -1;
1733
+ for (let G = 0; G < b.length - 1; G++)
1734
+ if (b[G] === "") {
1735
+ V = !0, j = G;
1725
1736
  break;
1726
1737
  }
1727
- if (I && D >= 0) {
1728
- const X = window.getSelection();
1729
- if (X && X.rangeCount > 0) {
1730
- const H = X.getRangeAt(0), re = H.startContainer, ie = re.nodeType === Node.ELEMENT_NODE ? re.closest('[data-type="variable"][data-multi-key]') : re.parentElement?.closest('[data-type="variable"][data-multi-key]');
1731
- if (ie) {
1732
- const ce = ie.dataset.key;
1733
- if (ce) {
1734
- const ue = document.createRange();
1735
- ue.setStartBefore(ie), ue.setEnd(H.startContainer, H.startOffset);
1736
- const he = ue.toString().length;
1737
- V.current = { key: ce, offset: he };
1738
+ if (V && j >= 0) {
1739
+ const G = window.getSelection();
1740
+ if (G && G.rangeCount > 0) {
1741
+ const H = G.getRangeAt(0), ae = H.startContainer, ce = ae.nodeType === Node.ELEMENT_NODE ? ae.closest('[data-type="variable"][data-multi-key]') : ae.parentElement?.closest('[data-type="variable"][data-multi-key]');
1742
+ if (ce) {
1743
+ const ue = ce.dataset.key;
1744
+ if (ue) {
1745
+ const pe = document.createRange();
1746
+ pe.setStartBefore(ce), pe.setEnd(H.startContainer, H.startOffset);
1747
+ const xe = pe.toString().length;
1748
+ P.current = { key: ue, offset: xe };
1738
1749
  }
1739
1750
  }
1740
1751
  }
1741
- const ee = [...b];
1742
- for (let H = D; H < ee.length - 1; H++)
1743
- ee[H] = ee[H + 1];
1744
- ee.pop();
1752
+ const ne = [...b];
1753
+ for (let H = j; H < ne.length - 1; H++)
1754
+ ne[H] = ne[H + 1];
1755
+ ne.pop();
1745
1756
  const Q = {};
1746
- ee.forEach((H, re) => {
1747
- H && (Q[`${f.key}_${re}`] = H);
1757
+ ne.forEach((H, ae) => {
1758
+ H && (Q[`${o.key}_${ae}`] = H);
1748
1759
  });
1749
- const ne = Math.max(R ? ee.length : ee.length + 1, 1);
1760
+ const re = Math.max(A ? ne.length : ne.length + 1, 1);
1750
1761
  n.current.querySelectorAll(
1751
1762
  '[data-type="variable"]'
1752
1763
  ).forEach((H) => {
1753
- const re = H.dataset.key, ie = H.dataset.multiKey;
1754
- if (re && ie !== f.key) {
1755
- const ce = H.innerText.replace(/[\u200B\n]/g, "").trim();
1756
- ce && (Q[re] = ce);
1764
+ const ae = H.dataset.key, ce = H.dataset.multiKey;
1765
+ if (ae && ce !== o.key) {
1766
+ const ue = H.innerText.replace(/[\u200B\n]/g, "").trim();
1767
+ ue && (Q[ae] = ue);
1757
1768
  }
1758
- }), n.current.__tempVariableValues = Q, M((H) => ({
1769
+ }), n.current.__tempVariableValues = Q, Z((H) => ({
1759
1770
  ...H,
1760
- [f.key]: ne
1771
+ [o.key]: re
1761
1772
  }));
1762
1773
  return;
1763
1774
  }
1764
- if (!R) {
1765
- const X = y - 1, ee = `${f.key}_${X}`, Q = n.current.querySelector(
1766
- `[data-type="variable"][data-key="${ee}"][data-multi-key="${f.key}"]`
1775
+ if (!A) {
1776
+ const G = q - 1, ne = `${o.key}_${G}`, Q = n.current.querySelector(
1777
+ `[data-type="variable"][data-key="${ne}"][data-multi-key="${o.key}"]`
1767
1778
  );
1768
- if (Q && Q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && y < o) {
1769
- const ae = window.getSelection();
1770
- if (ae && ae.rangeCount > 0) {
1771
- const H = ae.getRangeAt(0), re = H.startContainer, ie = re.nodeType === Node.ELEMENT_NODE ? re.closest('[data-type="variable"][data-multi-key]') : re.parentElement?.closest('[data-type="variable"][data-multi-key]');
1772
- if (ie) {
1773
- const ce = ie.dataset.key;
1774
- if (ce) {
1775
- const ue = document.createRange();
1776
- ue.setStartBefore(ie), ue.setEnd(H.startContainer, H.startOffset);
1777
- const he = ue.toString().length;
1778
- V.current = { key: ce, offset: he };
1779
+ if (Q && Q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && q < m) {
1780
+ const oe = window.getSelection();
1781
+ if (oe && oe.rangeCount > 0) {
1782
+ const H = oe.getRangeAt(0), ae = H.startContainer, ce = ae.nodeType === Node.ELEMENT_NODE ? ae.closest('[data-type="variable"][data-multi-key]') : ae.parentElement?.closest('[data-type="variable"][data-multi-key]');
1783
+ if (ce) {
1784
+ const ue = ce.dataset.key;
1785
+ if (ue) {
1786
+ const pe = document.createRange();
1787
+ pe.setStartBefore(ce), pe.setEnd(H.startContainer, H.startOffset);
1788
+ const xe = pe.toString().length;
1789
+ P.current = { key: ue, offset: xe };
1779
1790
  }
1780
1791
  }
1781
1792
  }
1782
- M((H) => ({
1793
+ Z((H) => ({
1783
1794
  ...H,
1784
- [f.key]: y + 1
1795
+ [o.key]: q + 1
1785
1796
  }));
1786
1797
  }
1787
1798
  }
1788
1799
  });
1789
- }, j = () => {
1790
- n.current && (ge(n), be(n, t, a), xe(n, t, a, L));
1791
- }, B = (c) => {
1800
+ }, J = () => {
1801
+ if (n.current) {
1802
+ if (t.length === 0) {
1803
+ const r = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1804
+ M(r.length > 0);
1805
+ return;
1806
+ }
1807
+ be(n), ve(n, t, x), we(n, t, x, M);
1808
+ }
1809
+ }, se = (r) => {
1792
1810
  if (s) {
1793
- c.preventDefault();
1811
+ r.preventDefault();
1794
1812
  return;
1795
1813
  }
1796
- const f = window.getSelection();
1797
- if (f && f.rangeCount > 0) {
1798
- const o = f.anchorNode;
1799
- let y = null;
1800
- if (o && (o.nodeType === Node.ELEMENT_NODE ? y = o.closest('[data-type="text"]') : o.nodeType === Node.TEXT_NODE && o.parentElement && (y = o.parentElement.closest('[data-type="text"]'))), y) {
1801
- if (c.preventDefault(), c.stopPropagation(), n.current) {
1814
+ const o = window.getSelection();
1815
+ if (o && o.rangeCount > 0) {
1816
+ const m = o.anchorNode;
1817
+ let q = null;
1818
+ if (m && (m.nodeType === Node.ELEMENT_NODE ? q = m.closest('[data-type="text"]') : m.nodeType === Node.TEXT_NODE && m.parentElement && (q = m.parentElement.closest('[data-type="text"]'))), q) {
1819
+ if (r.preventDefault(), r.stopPropagation(), n.current) {
1802
1820
  const b = n.current.querySelector(
1803
1821
  '[data-type="variable"], [data-type="upload"]'
1804
1822
  );
@@ -1807,11 +1825,11 @@ const mt = ({
1807
1825
  return;
1808
1826
  }
1809
1827
  }
1810
- if (m && f && f.rangeCount > 0) {
1811
- const o = f.anchorNode;
1812
- let y = null;
1813
- if (o && (o.nodeType === Node.ELEMENT_NODE ? y = o.closest(".tag-node") : o.nodeType === Node.TEXT_NODE && o.parentElement && (y = o.parentElement.closest(".tag-node"))), y) {
1814
- if (c.preventDefault(), c.stopPropagation(), n.current) {
1828
+ if (f && o && o.rangeCount > 0) {
1829
+ const m = o.anchorNode;
1830
+ let q = null;
1831
+ if (m && (m.nodeType === Node.ELEMENT_NODE ? q = m.closest(".tag-node") : m.nodeType === Node.TEXT_NODE && m.parentElement && (q = m.parentElement.closest(".tag-node"))), q) {
1832
+ if (r.preventDefault(), r.stopPropagation(), n.current) {
1815
1833
  const b = n.current.querySelector(
1816
1834
  '[data-type="variable"], [data-type="upload"]'
1817
1835
  );
@@ -1820,211 +1838,219 @@ const mt = ({
1820
1838
  return;
1821
1839
  }
1822
1840
  }
1823
- if (c.key === "Enter" && !c.shiftKey && (c.preventDefault(), J()), c.key === "Escape" && n.current) {
1824
- if (m) {
1825
- c.preventDefault();
1841
+ if (r.key === "Enter" && !r.shiftKey && (r.preventDefault(), ee()), r.key === "Escape" && n.current) {
1842
+ if (f) {
1843
+ r.preventDefault();
1826
1844
  return;
1827
1845
  }
1828
1846
  n.current.innerHTML = "", n.current.focus();
1829
1847
  }
1830
- if (c.key === "Backspace") {
1831
- const o = window.getSelection();
1832
- if (o && o.rangeCount > 0) {
1833
- const y = o.getRangeAt(0), b = o.anchorNode;
1834
- if (m) {
1835
- let R = null, I = null;
1836
- if (b && (b.nodeType === Node.ELEMENT_NODE ? (R = b.closest(".tag-node"), I = b.closest('[data-type="text"]')) : b.nodeType === Node.TEXT_NODE && b.parentElement && (R = b.parentElement.closest(".tag-node"), I = b.parentElement.closest('[data-type="text"]'))), (R || I) && y.collapsed && y.startOffset === 0) {
1837
- c.preventDefault();
1848
+ if (r.key === "Backspace") {
1849
+ const m = window.getSelection();
1850
+ if (m && m.rangeCount > 0) {
1851
+ const q = m.getRangeAt(0), b = m.anchorNode;
1852
+ if (f) {
1853
+ let A = null, V = null;
1854
+ if (b && (b.nodeType === Node.ELEMENT_NODE ? (A = b.closest(".tag-node"), V = b.closest('[data-type="text"]')) : b.nodeType === Node.TEXT_NODE && b.parentElement && (A = b.parentElement.closest(".tag-node"), V = b.parentElement.closest('[data-type="text"]'))), (A || V) && q.collapsed && q.startOffset === 0) {
1855
+ r.preventDefault();
1838
1856
  return;
1839
1857
  }
1840
1858
  }
1841
- let E = null;
1842
- if (b && (b.nodeType === Node.ELEMENT_NODE ? E = b.closest(
1859
+ let R = null;
1860
+ if (b && (b.nodeType === Node.ELEMENT_NODE ? R = b.closest(
1843
1861
  '[data-type="variable"]'
1844
- ) : b.nodeType === Node.TEXT_NODE && b.parentElement && (E = b.parentElement.closest(
1862
+ ) : b.nodeType === Node.TEXT_NODE && b.parentElement && (R = b.parentElement.closest(
1845
1863
  '[data-type="variable"]'
1846
- ))), E) {
1847
- if (!y.collapsed)
1864
+ ))), R) {
1865
+ if (!q.collapsed)
1848
1866
  return;
1849
- const R = E.innerText;
1850
- if (R === "​" || R === "") {
1851
- c.preventDefault();
1867
+ const A = R.innerText;
1868
+ if (A === "​" || A === "") {
1869
+ r.preventDefault();
1852
1870
  return;
1853
1871
  }
1854
- if (y.startOffset === 0) {
1855
- c.preventDefault();
1872
+ if (q.startOffset === 0) {
1873
+ r.preventDefault();
1856
1874
  return;
1857
1875
  }
1858
- if (R.startsWith("​") && y.startOffset === 1) {
1859
- c.preventDefault();
1876
+ if (A.startsWith("​") && q.startOffset === 1) {
1877
+ r.preventDefault();
1860
1878
  return;
1861
1879
  }
1862
1880
  }
1863
1881
  }
1864
1882
  }
1865
- }, J = () => {
1866
- if (u || s || r || !$ || !n.current) return;
1883
+ }, ee = () => {
1884
+ if (c || s || a || !O || !n.current) return;
1867
1885
  if (t.length === 0) {
1868
- const E = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1869
- if (!E) return;
1870
- p(E, E);
1886
+ const R = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1887
+ if (!R) return;
1888
+ p(R, R);
1871
1889
  return;
1872
1890
  }
1873
- const c = n.current;
1874
- let f = "";
1875
- const o = {}, y = (E) => {
1876
- if (!(E.nodeType === Node.ELEMENT_NODE && E.style.display === "none")) {
1877
- if (E.nodeType === Node.TEXT_NODE)
1878
- f += (E.textContent || "").replace(/\u200B/g, "");
1879
- else if (E.nodeType === Node.ELEMENT_NODE) {
1880
- const R = E, I = R.dataset.type, D = R.dataset.key;
1881
- if (I === "variable" && D) {
1882
- let X = "";
1883
- const ee = document.createTreeWalker(
1884
- R,
1891
+ const r = n.current;
1892
+ let o = "";
1893
+ const m = {}, q = (R) => {
1894
+ if (!(R.nodeType === Node.ELEMENT_NODE && R.style.display === "none")) {
1895
+ if (R.nodeType === Node.TEXT_NODE)
1896
+ o += (R.textContent || "").replace(/\u200B/g, "");
1897
+ else if (R.nodeType === Node.ELEMENT_NODE) {
1898
+ const A = R, V = A.dataset.type, j = A.dataset.key;
1899
+ if (V === "variable" && j) {
1900
+ let G = "";
1901
+ const ne = document.createTreeWalker(
1902
+ A,
1885
1903
  NodeFilter.SHOW_TEXT,
1886
1904
  {
1887
- acceptNode: (ne) => {
1888
- const ae = R.querySelector(".variable-info-icon");
1889
- return ae && ae.contains(ne) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
1905
+ acceptNode: (re) => {
1906
+ const oe = A.querySelector(".variable-info-icon");
1907
+ return oe && oe.contains(re) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
1890
1908
  }
1891
1909
  }
1892
1910
  );
1893
- for (; ee.nextNode(); )
1894
- X += ee.currentNode.textContent || "";
1895
- const Q = X.replace(/[\u200B\n]/g, "").trim();
1911
+ for (; ne.nextNode(); )
1912
+ G += ne.currentNode.textContent || "";
1913
+ const Q = G.replace(/[\u200B\n]/g, "").trim();
1896
1914
  if (Q) {
1897
- const ne = R.dataset.multiKey;
1898
- if (ne) {
1899
- o[ne] || (o[ne] = []);
1900
- const ae = o[ne];
1901
- ae.push(Q), ae.length > 1 && (f += " "), f += Q;
1915
+ const re = A.dataset.multiKey;
1916
+ if (re) {
1917
+ m[re] || (m[re] = []);
1918
+ const oe = m[re];
1919
+ oe.push(Q), oe.length > 1 && (o += " "), o += Q;
1902
1920
  } else
1903
- o[D] = Q, f += Q;
1921
+ m[j] = Q, o += Q;
1904
1922
  }
1905
- } else if (I === "upload" && D)
1906
- o[D] = a[D] ?? null, a[D] && (f += ` [附带文件: ${a[D]?.name}] `);
1923
+ } else if (V === "upload" && j)
1924
+ m[j] = x[j] ?? null, x[j] && (o += ` [附带文件: ${x[j]?.name}] `);
1907
1925
  else {
1908
- if (R.classList.contains("tag-close-btn") || R.classList.contains("file-remove-btn")) return;
1909
- R.getAttribute("contenteditable") === "false" && !I && R.classList.contains("tag-node") ? f += R.innerText : R.childNodes.forEach(y);
1926
+ if (A.classList.contains("tag-close-btn") || A.classList.contains("file-remove-btn")) return;
1927
+ A.getAttribute("contenteditable") === "false" && !V && A.classList.contains("tag-node") ? o += A.innerText : A.childNodes.forEach(q);
1910
1928
  }
1911
1929
  }
1912
1930
  }
1913
1931
  };
1914
- if (c.childNodes.forEach(y), f = f.trim(), !f) return;
1932
+ if (r.childNodes.forEach(q), o = o.trim(), !o) return;
1915
1933
  const b = new FormData();
1916
- b.append("fullPrompt", f), Object.keys(o).forEach((E) => {
1917
- const R = o[E];
1918
- R != null && (R instanceof File ? b.append(E, R) : Array.isArray(R) ? R.forEach((I, D) => {
1919
- I != null && (I instanceof File ? b.append(`${E}[${D}]`, I) : typeof I == "string" ? b.append(`${E}[${D}]`, I) : b.append(`${E}[${D}]`, String(I)));
1920
- }) : typeof R == "string" ? b.append(E, R) : b.append(E, String(R)));
1921
- }), p(b, f);
1922
- }, oe = i ? { width: typeof i == "number" ? `${i}px` : i } : {};
1923
- return /* @__PURE__ */ d.jsxs(
1934
+ b.append("fullPrompt", o), Object.keys(m).forEach((R) => {
1935
+ const A = m[R];
1936
+ A != null && (A instanceof File ? b.append(R, A) : Array.isArray(A) ? t.some(
1937
+ (j) => j.type === "multi-variable" && j.key === R
1938
+ ) ? A.forEach((j) => {
1939
+ j != null && j !== "" && b.append(R, String(j));
1940
+ }) : A.forEach((j, G) => {
1941
+ j != null && (j instanceof File ? b.append(`${R}[${G}]`, j) : typeof j == "string" ? b.append(`${R}[${G}]`, j) : b.append(`${R}[${G}]`, String(j)));
1942
+ }) : typeof A == "string" ? b.append(R, A) : b.append(R, String(A)));
1943
+ }), p(b, o);
1944
+ }, de = {
1945
+ ...l ? { width: typeof l == "number" ? `${l}px` : l } : {},
1946
+ ...d ? { border: d } : {},
1947
+ ...C ? { background: C } : {}
1948
+ };
1949
+ return /* @__PURE__ */ u.jsxs(
1924
1950
  "div",
1925
1951
  {
1926
1952
  className: "rich-text-editor",
1927
- style: oe,
1953
+ style: de,
1928
1954
  "data-disabled": s,
1929
1955
  children: [
1930
- /* @__PURE__ */ d.jsx(
1956
+ /* @__PURE__ */ u.jsx(
1931
1957
  "div",
1932
1958
  {
1933
1959
  ref: n,
1934
- className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${P && q ? "rte-editor-empty" : ""}`,
1960
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${W && N ? "rte-editor-empty" : ""}`,
1935
1961
  contentEditable: t.length === 0,
1936
1962
  suppressContentEditableWarning: !0,
1937
- "data-placeholder": q,
1938
- onMouseDown: _,
1939
- onMouseMove: W,
1940
- onMouseUp: U,
1941
- onClick: se,
1942
- onDoubleClick: le,
1943
- onInput: l,
1944
- onKeyDown: B,
1945
- onPaste: Y,
1946
- onBlur: j
1963
+ "data-placeholder": N,
1964
+ onMouseDown: U,
1965
+ onMouseMove: le,
1966
+ onMouseUp: ie,
1967
+ onClick: i,
1968
+ onDoubleClick: I,
1969
+ onInput: B,
1970
+ onKeyDown: se,
1971
+ onPaste: E,
1972
+ onBlur: J
1947
1973
  }
1948
1974
  ),
1949
- /* @__PURE__ */ d.jsx(
1975
+ /* @__PURE__ */ u.jsx(
1950
1976
  "input",
1951
1977
  {
1952
1978
  type: "file",
1953
1979
  ref: S,
1954
1980
  className: "rte-file-input",
1955
1981
  accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
1956
- onChange: te
1982
+ onChange: _
1957
1983
  }
1958
1984
  ),
1959
- /* @__PURE__ */ d.jsxs("div", { className: "rich-text-editor-footer", children: [
1960
- /* @__PURE__ */ d.jsx("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ d.jsxs("div", { className: "rich-text-editor-brand", children: [
1961
- /* @__PURE__ */ d.jsxs("div", { className: "rte-brand-badge", children: [
1962
- /* @__PURE__ */ d.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
1963
- /* @__PURE__ */ d.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
1985
+ /* @__PURE__ */ u.jsxs("div", { className: "rich-text-editor-footer", children: [
1986
+ /* @__PURE__ */ u.jsx("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ u.jsxs("div", { className: "rich-text-editor-brand", children: [
1987
+ /* @__PURE__ */ u.jsxs("div", { className: "rte-brand-badge", children: [
1988
+ /* @__PURE__ */ u.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
1989
+ /* @__PURE__ */ u.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
1964
1990
  ] }),
1965
- /* @__PURE__ */ d.jsx(
1966
- Le,
1991
+ /* @__PURE__ */ u.jsx(
1992
+ Oe,
1967
1993
  {
1968
1994
  placement: "top",
1969
1995
  menu: {
1970
- items: C.map((c) => ({
1971
- key: c.key,
1972
- label: /* @__PURE__ */ d.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1973
- c.icon && /* @__PURE__ */ d.jsx("i", { className: c.icon }),
1974
- /* @__PURE__ */ d.jsx("span", { children: c.label })
1996
+ items: T.map((r) => ({
1997
+ key: r.key,
1998
+ label: /* @__PURE__ */ u.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1999
+ r.icon && /* @__PURE__ */ u.jsx("i", { className: r.icon }),
2000
+ /* @__PURE__ */ u.jsx("span", { children: r.label })
1975
2001
  ] }),
1976
2002
  onClick: () => {
1977
- h?.(c);
2003
+ y?.(r);
1978
2004
  }
1979
2005
  }))
1980
2006
  },
1981
2007
  trigger: ["click"],
1982
- disabled: s || u,
1983
- children: /* @__PURE__ */ d.jsxs("div", { className: "rte-agent-badge", style: { cursor: C.length > 0 ? "pointer" : "default" }, children: [
1984
- /* @__PURE__ */ d.jsx("i", { className: "iconfont icon-zhinengti" }),
1985
- /* @__PURE__ */ d.jsx("span", { className: "rte-agent-text", children: "智能体" })
2008
+ disabled: s || c,
2009
+ children: /* @__PURE__ */ u.jsxs("div", { className: "rte-agent-badge", style: { cursor: T.length > 0 ? "pointer" : "default" }, children: [
2010
+ /* @__PURE__ */ u.jsx("i", { className: "iconfont icon-zhinengti" }),
2011
+ /* @__PURE__ */ u.jsx("span", { className: "rte-agent-text", children: "智能体" })
1986
2012
  ] })
1987
2013
  }
1988
2014
  )
1989
2015
  ] }) }),
1990
- /* @__PURE__ */ d.jsx(
2016
+ /* @__PURE__ */ u.jsx(
1991
2017
  "button",
1992
2018
  {
1993
2019
  type: "button",
1994
- onClick: J,
1995
- disabled: u || s || r || !$,
2020
+ onClick: ee,
2021
+ disabled: c || s || a || !O,
1996
2022
  className: "rich-text-editor-send-button",
1997
- children: u || r ? /* @__PURE__ */ d.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ d.jsx("i", { className: "iconfont icon-fasong" })
2023
+ children: c || a ? /* @__PURE__ */ u.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ u.jsx("i", { className: "iconfont icon-fasong" })
1998
2024
  }
1999
2025
  )
2000
2026
  ] }),
2001
- x?.anchorEl && (() => {
2002
- if (!document.body.contains(x.anchorEl))
2027
+ g?.anchorEl && (() => {
2028
+ if (!document.body.contains(g.anchorEl))
2003
2029
  return null;
2004
- let c = "";
2005
- return x.type === "upload" ? c = t.find(
2006
- (o) => o.type === "upload" && o.key === x.key
2007
- )?.tooltip || "" : x.type === "tag" ? c = x.anchorEl.dataset.tooltip || "" : x.type === "upload-label" ? c = x.anchorEl.dataset.fileName || "" : x.type === "variable" && (c = x.anchorEl.dataset.tooltip || ""), He(
2008
- /* @__PURE__ */ d.jsx(
2009
- Ve,
2030
+ let r = "";
2031
+ return g.type === "upload" ? r = t.find(
2032
+ (m) => m.type === "upload" && m.key === g.key
2033
+ )?.tooltip || "" : g.type === "tag" ? r = g.anchorEl.dataset.tooltip || "" : g.type === "upload-label" ? r = g.anchorEl.dataset.fileName || "" : g.type === "variable" && (r = g.anchorEl.dataset.tooltip || ""), Xe(
2034
+ /* @__PURE__ */ u.jsx(
2035
+ Me,
2010
2036
  {
2011
2037
  arrow: !1,
2012
- title: /* @__PURE__ */ d.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: c }),
2038
+ title: /* @__PURE__ */ u.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: r }),
2013
2039
  open: !0,
2014
2040
  placement: "top",
2015
2041
  getPopupContainer: () => document.body,
2016
2042
  overlayInnerStyle: {
2017
2043
  background: "var(--neutral-800, #262626)"
2018
2044
  },
2019
- children: /* @__PURE__ */ d.jsx(
2045
+ children: /* @__PURE__ */ u.jsx(
2020
2046
  "div",
2021
2047
  {
2022
2048
  style: {
2023
2049
  position: "fixed",
2024
- left: `${x.anchorEl.getBoundingClientRect().left}px`,
2025
- top: `${x.anchorEl.getBoundingClientRect().top}px`,
2026
- width: `${x.anchorEl.offsetWidth}px`,
2027
- height: `${x.anchorEl.offsetHeight}px`,
2050
+ left: `${g.anchorEl.getBoundingClientRect().left}px`,
2051
+ top: `${g.anchorEl.getBoundingClientRect().top}px`,
2052
+ width: `${g.anchorEl.offsetWidth}px`,
2053
+ height: `${g.anchorEl.offsetHeight}px`,
2028
2054
  pointerEvents: "none"
2029
2055
  }
2030
2056
  }
@@ -2038,7 +2064,7 @@ const mt = ({
2038
2064
  }
2039
2065
  );
2040
2066
  };
2041
- mt.__docgenInfo = {
2067
+ ht.__docgenInfo = {
2042
2068
  displayName: "RichTextEditor",
2043
2069
  description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
2044
2070
  props: {
@@ -2066,79 +2092,79 @@ mt.__docgenInfo = {
2066
2092
  }
2067
2093
  }
2068
2094
  };
2069
- const yt = ({
2095
+ const gt = ({
2070
2096
  texts: t = [],
2071
2097
  placeholder: p = "请输入内容",
2072
- animationSpeed: u = 100,
2098
+ animationSpeed: c = 100,
2073
2099
  autoPlay: s = !0,
2074
- value: i,
2075
- onChange: m,
2076
- ...C
2100
+ value: l,
2101
+ onChange: f,
2102
+ ...T
2077
2103
  }) => {
2078
- const [h, e] = z(""), [r, q] = z(0), [n, S] = z(!1), [a, A] = z(!1), [T, g] = z(!1), x = K(void 0), N = K(void 0), v = K(t), k = K(r), $ = K(a), L = K(h);
2079
- Z(() => {
2080
- v.current = t, k.current = r, $.current = a, L.current = h;
2104
+ const [y, e] = z(""), [a, N] = z(0), [d, C] = z(!1), [n, S] = z(!1), [x, h] = z(!1), v = Y(void 0), $ = Y(void 0), g = Y(t), k = Y(a), w = Y(n), L = Y(y);
2105
+ te(() => {
2106
+ g.current = t, k.current = a, w.current = n, L.current = y;
2081
2107
  });
2082
- const V = F((w, _) => {
2083
- let W = 0;
2084
- g(!0);
2108
+ const O = F((E, _) => {
2109
+ let K = 0;
2110
+ h(!0);
2085
2111
  const U = () => {
2086
- W < w.length ? (e(w.slice(0, W + 1)), W++, N.current = window.setTimeout(U, u)) : (g(!1), _?.());
2112
+ K < E.length ? (e(E.slice(0, K + 1)), K++, $.current = window.setTimeout(U, c)) : (h(!1), _?.());
2087
2113
  };
2088
2114
  U();
2089
- }, [u]), P = F((w) => {
2115
+ }, [c]), M = F((E) => {
2090
2116
  let _ = L.current.length;
2091
- const W = () => {
2092
- _ > 0 ? (e(L.current.slice(0, _ - 1)), _--, N.current = window.setTimeout(W, u / 2)) : w?.();
2117
+ const K = () => {
2118
+ _ > 0 ? (e(L.current.slice(0, _ - 1)), _--, $.current = window.setTimeout(K, c / 2)) : E?.();
2093
2119
  };
2094
- W();
2095
- }, [u]), O = F(() => {
2096
- if (v.current.length === 0 || $.current) return;
2097
- S(!0);
2098
- const w = v.current[k.current];
2099
- L.current ? P(() => {
2100
- V(w, () => {
2101
- x.current = window.setTimeout(() => {
2102
- q((_) => (_ + 1) % v.current.length), S(!1);
2120
+ K();
2121
+ }, [c]), P = F(() => {
2122
+ if (g.current.length === 0 || w.current) return;
2123
+ C(!0);
2124
+ const E = g.current[k.current];
2125
+ L.current ? M(() => {
2126
+ O(E, () => {
2127
+ v.current = window.setTimeout(() => {
2128
+ N((_) => (_ + 1) % g.current.length), C(!1);
2103
2129
  }, 2e3);
2104
2130
  });
2105
- }) : V(w, () => {
2106
- x.current = window.setTimeout(() => {
2107
- q((_) => (_ + 1) % v.current.length), S(!1);
2131
+ }) : O(E, () => {
2132
+ v.current = window.setTimeout(() => {
2133
+ N((_) => (_ + 1) % g.current.length), C(!1);
2108
2134
  }, 2e3);
2109
2135
  });
2110
- }, [P, V]);
2111
- Z(() => (s && t.length > 0 && !a && O(), () => {
2112
- x.current && window.clearTimeout(x.current), N.current && window.clearTimeout(N.current);
2113
- }), [r, a, s, t.length, O]), Z(() => {
2114
- !n && s && t.length > 0 && !a && O();
2115
- }, [r, n, s, t.length, a, O]);
2116
- const G = (w) => {
2117
- A(!0), x.current && window.clearTimeout(x.current), N.current && window.clearTimeout(N.current), S(!1), g(!1), C.onFocus?.(w);
2118
- }, M = (w) => {
2119
- A(!1), !i && t.length > 0 && (e(""), q(0)), C.onBlur?.(w);
2120
- }, Y = (w) => {
2121
- m?.(w.target.value), C.onChange?.(w);
2122
- }, te = () => a || i ? p : h || p;
2123
- return /* @__PURE__ */ d.jsxs("div", { style: { position: "relative" }, children: [
2124
- /* @__PURE__ */ d.jsx(
2125
- qe,
2136
+ }, [M, O]);
2137
+ te(() => (s && t.length > 0 && !n && P(), () => {
2138
+ v.current && window.clearTimeout(v.current), $.current && window.clearTimeout($.current);
2139
+ }), [a, n, s, t.length, P]), te(() => {
2140
+ !d && s && t.length > 0 && !n && P();
2141
+ }, [a, d, s, t.length, n, P]);
2142
+ const W = (E) => {
2143
+ S(!0), v.current && window.clearTimeout(v.current), $.current && window.clearTimeout($.current), C(!1), h(!1), T.onFocus?.(E);
2144
+ }, D = (E) => {
2145
+ S(!1), !l && t.length > 0 && (e(""), N(0)), T.onBlur?.(E);
2146
+ }, X = (E) => {
2147
+ f?.(E.target.value), T.onChange?.(E);
2148
+ }, Z = () => n || l ? p : y || p;
2149
+ return /* @__PURE__ */ u.jsxs("div", { style: { position: "relative" }, children: [
2150
+ /* @__PURE__ */ u.jsx(
2151
+ $e,
2126
2152
  {
2127
- ...C,
2128
- value: i,
2129
- onChange: Y,
2130
- onFocus: G,
2131
- onBlur: M,
2132
- placeholder: te(),
2153
+ ...T,
2154
+ value: l,
2155
+ onChange: X,
2156
+ onFocus: W,
2157
+ onBlur: D,
2158
+ placeholder: Z(),
2133
2159
  style: {
2134
2160
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2135
- ...C.style,
2161
+ ...T.style,
2136
2162
  position: "relative",
2137
2163
  zIndex: 1
2138
2164
  }
2139
2165
  }
2140
2166
  ),
2141
- !a && !i && h && /* @__PURE__ */ d.jsxs(
2167
+ !n && !l && y && /* @__PURE__ */ u.jsxs(
2142
2168
  "div",
2143
2169
  {
2144
2170
  style: {
@@ -2158,8 +2184,8 @@ const yt = ({
2158
2184
  fontFamily: "inherit"
2159
2185
  },
2160
2186
  children: [
2161
- /* @__PURE__ */ d.jsx("span", { children: h }),
2162
- T && /* @__PURE__ */ d.jsx(
2187
+ /* @__PURE__ */ u.jsx("span", { children: y }),
2188
+ x && /* @__PURE__ */ u.jsx(
2163
2189
  "span",
2164
2190
  {
2165
2191
  style: {
@@ -2175,7 +2201,7 @@ const yt = ({
2175
2201
  ]
2176
2202
  }
2177
2203
  ),
2178
- /* @__PURE__ */ d.jsx("style", { children: `
2204
+ /* @__PURE__ */ u.jsx("style", { children: `
2179
2205
  @keyframes blink {
2180
2206
  0%, 50% { opacity: 1; }
2181
2207
  51%, 100% { opacity: 0; }
@@ -2183,7 +2209,7 @@ const yt = ({
2183
2209
  ` })
2184
2210
  ] });
2185
2211
  };
2186
- yt.__docgenInfo = {
2212
+ gt.__docgenInfo = {
2187
2213
  displayName: "DynamicInput",
2188
2214
  description: "动态文案输入框组件,支持流式文字动画效果",
2189
2215
  props: {
@@ -2228,109 +2254,109 @@ yt.__docgenInfo = {
2228
2254
  }
2229
2255
  }
2230
2256
  };
2231
- const ht = ({
2257
+ const xt = ({
2232
2258
  texts: t = [],
2233
2259
  // 动态文案数组,默认为空数组
2234
2260
  placeholder: p = "请输入内容",
2235
2261
  // 占位符文本
2236
- animationSpeed: u = 100,
2262
+ animationSpeed: c = 100,
2237
2263
  // 打字机动画速度,毫秒
2238
2264
  autoPlay: s = !0,
2239
2265
  // 是否自动播放动画
2240
- value: i = "",
2266
+ value: l = "",
2241
2267
  // 受控模式的值
2242
- onChange: m,
2268
+ onChange: f,
2243
2269
  // 受控模式的变化回调
2244
- onSubmit: C,
2270
+ onSubmit: T,
2245
2271
  // 提交回调
2246
- maxLength: h = 500,
2272
+ maxLength: y = 500,
2247
2273
  // 最大字符数限制
2248
2274
  showCount: e = !0,
2249
2275
  // 是否显示字数统计
2250
- submitText: r = "发送",
2276
+ submitText: a = "发送",
2251
2277
  // 提交按钮文本
2252
- disabled: q = !1,
2278
+ disabled: N = !1,
2253
2279
  // 是否禁用组件
2254
- rows: n = 4,
2280
+ rows: d = 4,
2255
2281
  // 文本域行数
2256
- style: S,
2282
+ style: C,
2257
2283
  // 自定义样式
2258
- ...a
2284
+ ...n
2259
2285
  // 其他原生属性
2260
2286
  }) => {
2261
- const [A, T] = z(""), [g, x] = z(0), [N, v] = z(!1), [k, $] = z(!1), [L, V] = z(!1), [P, O] = z(i || ""), G = K(void 0), M = K(void 0), Y = K(t), te = K(g), w = K(k), _ = K(A), W = K(null);
2262
- Z(() => {
2263
- Y.current = t, te.current = g, w.current = k, _.current = A;
2287
+ const [S, x] = z(""), [h, v] = z(0), [$, g] = z(!1), [k, w] = z(!1), [L, O] = z(!1), [M, P] = z(l || ""), W = Y(void 0), D = Y(void 0), X = Y(t), Z = Y(h), E = Y(k), _ = Y(S), K = Y(null);
2288
+ te(() => {
2289
+ X.current = t, Z.current = h, E.current = k, _.current = S;
2264
2290
  });
2265
- const U = F((o, y) => {
2266
- let b = 0;
2267
- V(!0);
2268
- const E = () => {
2269
- b < o.length ? (T(o.slice(0, b + 1)), b++, M.current = window.setTimeout(E, u)) : (V(!1), y?.());
2291
+ const U = F((r, o) => {
2292
+ let m = 0;
2293
+ O(!0);
2294
+ const q = () => {
2295
+ m < r.length ? (x(r.slice(0, m + 1)), m++, D.current = window.setTimeout(q, c)) : (O(!1), o?.());
2270
2296
  };
2271
- E();
2272
- }, [u]), se = F((o) => {
2273
- let y = _.current.length;
2274
- const b = () => {
2275
- y > 0 ? (T(_.current.slice(0, y - 1)), y--, M.current = window.setTimeout(b, u / 2)) : o?.();
2297
+ q();
2298
+ }, [c]), le = F((r) => {
2299
+ let o = _.current.length;
2300
+ const m = () => {
2301
+ o > 0 ? (x(_.current.slice(0, o - 1)), o--, D.current = window.setTimeout(m, c / 2)) : r?.();
2276
2302
  };
2277
- b();
2278
- }, [u]), le = F(() => {
2279
- if (Y.current.length === 0 || w.current) return;
2280
- v(!0);
2281
- const o = Y.current[te.current];
2282
- _.current ? se(() => {
2283
- U(o, () => {
2284
- G.current = window.setTimeout(() => {
2285
- x((y) => (y + 1) % Y.current.length), v(!1);
2303
+ m();
2304
+ }, [c]), ie = F(() => {
2305
+ if (X.current.length === 0 || E.current) return;
2306
+ g(!0);
2307
+ const r = X.current[Z.current];
2308
+ _.current ? le(() => {
2309
+ U(r, () => {
2310
+ W.current = window.setTimeout(() => {
2311
+ v((o) => (o + 1) % X.current.length), g(!1);
2286
2312
  }, 2e3);
2287
2313
  });
2288
- }) : U(o, () => {
2289
- G.current = window.setTimeout(() => {
2290
- x((y) => (y + 1) % Y.current.length), v(!1);
2314
+ }) : U(r, () => {
2315
+ W.current = window.setTimeout(() => {
2316
+ v((o) => (o + 1) % X.current.length), g(!1);
2291
2317
  }, 2e3);
2292
2318
  });
2293
- }, [se, U]);
2294
- Z(() => (s && t.length > 0 && !k && le(), () => {
2295
- G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current);
2296
- }), [g, k, s, t.length, le]), Z(() => {
2297
- !N && s && t.length > 0 && !k && le();
2298
- }, [g, N, s, t.length, k, le]);
2299
- const l = (o) => {
2300
- $(!0), G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current), v(!1), V(!1), a.onFocus?.(o);
2301
- }, j = (o) => {
2302
- $(!1), !i && t.length > 0 && (T(""), x(0)), a.onBlur?.(o);
2303
- }, B = (o) => {
2304
- const y = o.target.value;
2305
- h && y.length > h || (m ? m(y) : O(y), a.onChange?.(o));
2319
+ }, [le, U]);
2320
+ te(() => (s && t.length > 0 && !k && ie(), () => {
2321
+ W.current && window.clearTimeout(W.current), D.current && window.clearTimeout(D.current);
2322
+ }), [h, k, s, t.length, ie]), te(() => {
2323
+ !$ && s && t.length > 0 && !k && ie();
2324
+ }, [h, $, s, t.length, k, ie]);
2325
+ const i = (r) => {
2326
+ w(!0), W.current && window.clearTimeout(W.current), D.current && window.clearTimeout(D.current), g(!1), O(!1), n.onFocus?.(r);
2327
+ }, I = (r) => {
2328
+ w(!1), !l && t.length > 0 && (x(""), v(0)), n.onBlur?.(r);
2329
+ }, B = (r) => {
2330
+ const o = r.target.value;
2331
+ y && o.length > y || (f ? f(o) : P(o), n.onChange?.(r));
2306
2332
  }, J = () => {
2307
- const o = m ? i : P;
2308
- o.trim() && !q && (C?.(o), m || O(""));
2309
- }, oe = (o) => {
2310
- (o.ctrlKey || o.metaKey) && o.key === "Enter" && (o.preventDefault(), J()), a.onKeyDown?.(o);
2311
- }, c = m ? i : P, f = q || !c.trim() || (h ? c.length > h : !1);
2312
- return /* @__PURE__ */ d.jsxs("div", { style: { position: "relative", ...S }, children: [
2313
- /* @__PURE__ */ d.jsxs("div", { style: { position: "relative" }, children: [
2314
- /* @__PURE__ */ d.jsx(
2333
+ const r = f ? l : M;
2334
+ r.trim() && !N && (T?.(r), f || P(""));
2335
+ }, se = (r) => {
2336
+ (r.ctrlKey || r.metaKey) && r.key === "Enter" && (r.preventDefault(), J()), n.onKeyDown?.(r);
2337
+ }, ee = f ? l : M, de = N || !ee.trim() || (y ? ee.length > y : !1);
2338
+ return /* @__PURE__ */ u.jsxs("div", { style: { position: "relative", ...C }, children: [
2339
+ /* @__PURE__ */ u.jsxs("div", { style: { position: "relative" }, children: [
2340
+ /* @__PURE__ */ u.jsx(
2315
2341
  "textarea",
2316
2342
  {
2317
- ref: W,
2318
- value: m ? i : P,
2343
+ ref: K,
2344
+ value: f ? l : M,
2319
2345
  onChange: B,
2320
- onFocus: (o) => {
2321
- o.target.style.borderColor = "#1890ff", o.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", l(o);
2346
+ onFocus: (r) => {
2347
+ r.target.style.borderColor = "#1890ff", r.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", i(r);
2322
2348
  },
2323
- onBlur: (o) => {
2324
- o.target.style.borderColor = "#d9d9d9", o.target.style.boxShadow = "none", j(o);
2349
+ onBlur: (r) => {
2350
+ r.target.style.borderColor = "#d9d9d9", r.target.style.boxShadow = "none", I(r);
2325
2351
  },
2326
- onKeyDown: oe,
2327
- placeholder: k || c ? p : "",
2328
- maxLength: h,
2329
- rows: n,
2330
- disabled: q,
2352
+ onKeyDown: se,
2353
+ placeholder: k || ee ? p : "",
2354
+ maxLength: y,
2355
+ rows: d,
2356
+ disabled: N,
2331
2357
  style: {
2332
2358
  width: "100%",
2333
- minHeight: `${n * 24 + 16}px`,
2359
+ minHeight: `${d * 24 + 16}px`,
2334
2360
  padding: "8px 60px 8px 12px",
2335
2361
  // 右侧留出按钮空间
2336
2362
  border: "1px solid #d9d9d9",
@@ -2343,12 +2369,12 @@ const ht = ({
2343
2369
  transition: "border-color 0.3s, box-shadow 0.3s",
2344
2370
  backgroundColor: "#fff",
2345
2371
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2346
- ...a.style
2372
+ ...n.style
2347
2373
  },
2348
- ...a
2374
+ ...n
2349
2375
  }
2350
2376
  ),
2351
- !k && !c && A && /* @__PURE__ */ d.jsxs(
2377
+ !k && !ee && S && /* @__PURE__ */ u.jsxs(
2352
2378
  "div",
2353
2379
  {
2354
2380
  style: {
@@ -2370,8 +2396,8 @@ const ht = ({
2370
2396
  lineHeight: "1.5"
2371
2397
  },
2372
2398
  children: [
2373
- /* @__PURE__ */ d.jsx("span", { children: A }),
2374
- L && /* @__PURE__ */ d.jsx(
2399
+ /* @__PURE__ */ u.jsx("span", { children: S }),
2400
+ L && /* @__PURE__ */ u.jsx(
2375
2401
  "span",
2376
2402
  {
2377
2403
  style: {
@@ -2387,7 +2413,7 @@ const ht = ({
2387
2413
  ]
2388
2414
  }
2389
2415
  ),
2390
- /* @__PURE__ */ d.jsx(
2416
+ /* @__PURE__ */ u.jsx(
2391
2417
  "div",
2392
2418
  {
2393
2419
  style: {
@@ -2396,14 +2422,14 @@ const ht = ({
2396
2422
  right: 8,
2397
2423
  zIndex: 3
2398
2424
  },
2399
- children: /* @__PURE__ */ d.jsx(
2400
- de,
2425
+ children: /* @__PURE__ */ u.jsx(
2426
+ fe,
2401
2427
  {
2402
2428
  type: "primary",
2403
2429
  size: "small",
2404
- icon: /* @__PURE__ */ d.jsx(Ge, {}),
2430
+ icon: /* @__PURE__ */ u.jsx(ze, {}),
2405
2431
  onClick: J,
2406
- disabled: f,
2432
+ disabled: de,
2407
2433
  style: {
2408
2434
  borderRadius: 6,
2409
2435
  minWidth: 32,
@@ -2412,13 +2438,13 @@ const ht = ({
2412
2438
  alignItems: "center",
2413
2439
  justifyContent: "center"
2414
2440
  },
2415
- children: r
2441
+ children: a
2416
2442
  }
2417
2443
  )
2418
2444
  }
2419
2445
  )
2420
2446
  ] }),
2421
- e && /* @__PURE__ */ d.jsxs(
2447
+ e && /* @__PURE__ */ u.jsxs(
2422
2448
  "div",
2423
2449
  {
2424
2450
  style: {
@@ -2428,13 +2454,13 @@ const ht = ({
2428
2454
  color: "#999"
2429
2455
  },
2430
2456
  children: [
2431
- c.length,
2457
+ ee.length,
2432
2458
  "/",
2433
- h
2459
+ y
2434
2460
  ]
2435
2461
  }
2436
2462
  ),
2437
- /* @__PURE__ */ d.jsx("style", { children: `
2463
+ /* @__PURE__ */ u.jsx("style", { children: `
2438
2464
  @keyframes blink {
2439
2465
  0%, 50% { opacity: 1; }
2440
2466
  51%, 100% { opacity: 0; }
@@ -2442,7 +2468,7 @@ const ht = ({
2442
2468
  ` })
2443
2469
  ] });
2444
2470
  };
2445
- ht.__docgenInfo = {
2471
+ xt.__docgenInfo = {
2446
2472
  displayName: "DynamicTextArea",
2447
2473
  description: "动态文案文本域组件,支持流式文字动画效果",
2448
2474
  props: {
@@ -2528,96 +2554,96 @@ ht.__docgenInfo = {
2528
2554
  }
2529
2555
  }
2530
2556
  };
2531
- const Se = ({
2557
+ const Re = ({
2532
2558
  src: t,
2533
2559
  poster: p,
2534
- width: u = 300,
2560
+ width: c = 300,
2535
2561
  height: s,
2536
- videoWidth: i,
2562
+ videoWidth: l,
2537
2563
  // 参数保留但不使用,由CSS控制
2538
- videoHeight: m,
2564
+ videoHeight: f,
2539
2565
  // 参数保留但不使用,由CSS控制
2540
- showPlayButton: C = !0,
2541
- autoPlayOnHover: h = !0,
2566
+ showPlayButton: T = !0,
2567
+ autoPlayOnHover: y = !0,
2542
2568
  onClick: e,
2543
- onVideoLoaded: r,
2544
- onVideoPlay: q,
2545
- onVideoPause: n,
2546
- onVideoEnded: S,
2547
- className: a,
2548
- style: A,
2549
- ...T
2569
+ onVideoLoaded: a,
2570
+ onVideoPlay: N,
2571
+ onVideoPause: d,
2572
+ onVideoEnded: C,
2573
+ className: n,
2574
+ style: S,
2575
+ ...x
2550
2576
  }) => {
2551
- const g = K(null), [x, N] = z(!1), [v, k] = z(!1), [$, L] = z(!1), V = F(() => {
2552
- g.current && (g.current.play(), N(!0), q?.());
2553
- }, [q]), P = F(() => {
2554
- g.current && (g.current.pause(), N(!1), n?.());
2555
- }, [n]), O = F((U) => {
2556
- U.stopPropagation(), x ? P() : V();
2557
- }, [x, V, P]), G = F(() => {
2558
- k(!0), h && !x && V();
2559
- }, [h, x, V]), M = F(() => {
2560
- k(!1), h && x && P();
2561
- }, [h, x, P]), Y = F(() => {
2562
- L(!0), r?.();
2563
- }, [r]), te = F(() => {
2564
- N(!0), q?.();
2565
- }, [q]), w = F(() => {
2566
- N(!1), n?.();
2567
- }, [n]), _ = F(() => {
2568
- N(!1), S?.();
2569
- }, [S]), W = F((U) => {
2577
+ const h = Y(null), [v, $] = z(!1), [g, k] = z(!1), [w, L] = z(!1), O = F(() => {
2578
+ h.current && (h.current.play(), $(!0), N?.());
2579
+ }, [N]), M = F(() => {
2580
+ h.current && (h.current.pause(), $(!1), d?.());
2581
+ }, [d]), P = F((U) => {
2582
+ U.stopPropagation(), v ? M() : O();
2583
+ }, [v, O, M]), W = F(() => {
2584
+ k(!0), y && !v && O();
2585
+ }, [y, v, O]), D = F(() => {
2586
+ k(!1), y && v && M();
2587
+ }, [y, v, M]), X = F(() => {
2588
+ L(!0), a?.();
2589
+ }, [a]), Z = F(() => {
2590
+ $(!0), N?.();
2591
+ }, [N]), E = F(() => {
2592
+ $(!1), d?.();
2593
+ }, [d]), _ = F(() => {
2594
+ $(!1), C?.();
2595
+ }, [C]), K = F((U) => {
2570
2596
  e?.(U);
2571
2597
  }, [e]);
2572
- return /* @__PURE__ */ d.jsx(
2573
- ve,
2598
+ return /* @__PURE__ */ u.jsx(
2599
+ Ee,
2574
2600
  {
2575
- ...T,
2576
- className: `video-card ${a || ""}`,
2601
+ ...x,
2602
+ className: `video-card ${n || ""}`,
2577
2603
  style: {
2578
- width: u,
2604
+ width: c,
2579
2605
  height: s,
2580
2606
  padding: 0,
2581
2607
  overflow: "hidden",
2582
2608
  cursor: e ? "pointer" : "default",
2583
2609
  border: "none",
2584
2610
  borderRadius: 0,
2585
- ...A
2611
+ ...S
2586
2612
  },
2587
2613
  bordered: !1,
2588
- onMouseEnter: G,
2589
- onMouseLeave: M,
2590
- onClick: W,
2591
- children: /* @__PURE__ */ d.jsxs("div", { className: "video-card-container", children: [
2592
- /* @__PURE__ */ d.jsx(
2614
+ onMouseEnter: W,
2615
+ onMouseLeave: D,
2616
+ onClick: K,
2617
+ children: /* @__PURE__ */ u.jsxs("div", { className: "video-card-container", children: [
2618
+ /* @__PURE__ */ u.jsx(
2593
2619
  "video",
2594
2620
  {
2595
- ref: g,
2621
+ ref: h,
2596
2622
  src: t,
2597
2623
  poster: p,
2598
2624
  preload: "metadata",
2599
- onLoadedData: Y,
2600
- onPlay: te,
2601
- onPause: w,
2625
+ onLoadedData: X,
2626
+ onPlay: Z,
2627
+ onPause: E,
2602
2628
  onEnded: _,
2603
2629
  muted: !0,
2604
2630
  loop: !0
2605
2631
  }
2606
2632
  ),
2607
- C && /* @__PURE__ */ d.jsx(
2633
+ T && /* @__PURE__ */ u.jsx(
2608
2634
  "div",
2609
2635
  {
2610
- className: `video-play-button ${v ? "hovered" : ""}`,
2611
- onClick: O,
2612
- children: x ? /* @__PURE__ */ d.jsx(Fe, { className: "play-icon" }) : /* @__PURE__ */ d.jsx(ze, { className: "play-icon" })
2636
+ className: `video-play-button ${g ? "hovered" : ""}`,
2637
+ onClick: P,
2638
+ children: v ? /* @__PURE__ */ u.jsx(He, { className: "play-icon" }) : /* @__PURE__ */ u.jsx(We, { className: "play-icon" })
2613
2639
  }
2614
2640
  ),
2615
- !$ && /* @__PURE__ */ d.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ d.jsx("div", { className: "loading-spinner" }) })
2641
+ !w && /* @__PURE__ */ u.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ u.jsx("div", { className: "loading-spinner" }) })
2616
2642
  ] })
2617
2643
  }
2618
2644
  );
2619
2645
  };
2620
- Se.__docgenInfo = {
2646
+ Re.__docgenInfo = {
2621
2647
  displayName: "VideoCard",
2622
2648
  description: "视频卡片组件,支持鼠标悬浮播放控制",
2623
2649
  props: {
@@ -2718,12 +2744,12 @@ Se.__docgenInfo = {
2718
2744
  }
2719
2745
  }
2720
2746
  };
2721
- const gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((u) => t.toLowerCase().includes(u)), bt = (t) => t.type ? t.type : gt(t.url) ? "video" : "image", xt = ({
2747
+ const bt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((c) => t.toLowerCase().includes(c)), vt = (t) => t.type ? t.type : bt(t.url) ? "video" : "image", wt = ({
2722
2748
  items: t,
2723
2749
  columns: p,
2724
- gap: u = 0,
2750
+ gap: c = 0,
2725
2751
  responsive: s = !0,
2726
- breakpoints: i = {
2752
+ breakpoints: l = {
2727
2753
  xs: 1,
2728
2754
  sm: 2,
2729
2755
  md: 3,
@@ -2731,108 +2757,108 @@ const gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
2731
2757
  xl: 5,
2732
2758
  xxl: 6
2733
2759
  },
2734
- className: m,
2735
- style: C,
2736
- onClick: h
2760
+ className: f,
2761
+ style: T,
2762
+ onClick: y
2737
2763
  }) => {
2738
- const e = K(null), [r, q] = z(p || i.md || 3), n = K(/* @__PURE__ */ new Map()), S = F(() => {
2764
+ const e = Y(null), [a, N] = z(p || l.md || 3), d = Y(/* @__PURE__ */ new Map()), C = F(() => {
2739
2765
  if (!s || p)
2740
- return p || i.md || 3;
2741
- const g = window.innerWidth;
2742
- return g < 576 ? i.xs || 1 : g < 768 ? i.sm || 2 : g < 992 ? i.md || 3 : g < 1200 ? i.lg || 4 : g < 1600 ? i.xl || 5 : i.xxl || 6;
2743
- }, [s, p, i]), a = F(() => {
2766
+ return p || l.md || 3;
2767
+ const h = window.innerWidth;
2768
+ return h < 576 ? l.xs || 1 : h < 768 ? l.sm || 2 : h < 992 ? l.md || 3 : h < 1200 ? l.lg || 4 : h < 1600 ? l.xl || 5 : l.xxl || 6;
2769
+ }, [s, p, l]), n = F(() => {
2744
2770
  if (!e.current) return;
2745
- const g = r, x = e.current, v = (x.offsetWidth - u * (g - 1)) / g, k = new Array(g).fill(0);
2746
- t.forEach((L, V) => {
2747
- const P = L.id || V, O = n.current.get(P);
2748
- if (!O) return;
2749
- const G = Math.min(...k), M = k.indexOf(G), Y = M * (v + u), te = k[M];
2750
- O.style.position = "absolute", O.style.left = `${Y}px`, O.style.top = `${te}px`, O.style.width = `${v}px`, k[M] += O.offsetHeight + u;
2771
+ const h = a, v = e.current, g = (v.offsetWidth - c * (h - 1)) / h, k = new Array(h).fill(0);
2772
+ t.forEach((L, O) => {
2773
+ const M = L.id || O, P = d.current.get(M);
2774
+ if (!P) return;
2775
+ const W = Math.min(...k), D = k.indexOf(W), X = D * (g + c), Z = k[D];
2776
+ P.style.position = "absolute", P.style.left = `${X}px`, P.style.top = `${Z}px`, P.style.width = `${g}px`, k[D] += P.offsetHeight + c;
2751
2777
  });
2752
- const $ = Math.max(...k);
2753
- x.style.height = `${$}px`;
2754
- }, [t, r, u]);
2755
- Z(() => {
2756
- const g = () => {
2757
- const x = S();
2758
- x !== r && q(x);
2778
+ const w = Math.max(...k);
2779
+ v.style.height = `${w}px`;
2780
+ }, [t, a, c]);
2781
+ te(() => {
2782
+ const h = () => {
2783
+ const v = C();
2784
+ v !== a && N(v);
2759
2785
  };
2760
2786
  if (s)
2761
- return window.addEventListener("resize", g), g(), () => window.removeEventListener("resize", g);
2762
- }, [s, S, r]), Z(() => {
2763
- const g = setTimeout(() => {
2764
- a();
2787
+ return window.addEventListener("resize", h), h(), () => window.removeEventListener("resize", h);
2788
+ }, [s, C, a]), te(() => {
2789
+ const h = setTimeout(() => {
2790
+ n();
2765
2791
  }, 100);
2766
- return () => clearTimeout(g);
2767
- }, [t, r, a]);
2768
- const A = F(() => {
2769
- a();
2770
- }, [a]), T = F((g) => {
2771
- h && h(g), g.onClick?.(g);
2772
- }, [h]);
2773
- return /* @__PURE__ */ d.jsx(
2792
+ return () => clearTimeout(h);
2793
+ }, [t, a, n]);
2794
+ const S = F(() => {
2795
+ n();
2796
+ }, [n]), x = F((h) => {
2797
+ y && y(h), h.onClick?.(h);
2798
+ }, [y]);
2799
+ return /* @__PURE__ */ u.jsx(
2774
2800
  "div",
2775
2801
  {
2776
2802
  ref: e,
2777
- className: `waterfall-container ${m || ""}`,
2803
+ className: `waterfall-container ${f || ""}`,
2778
2804
  style: {
2779
2805
  position: "relative",
2780
2806
  width: "100%",
2781
- ...C
2807
+ ...T
2782
2808
  },
2783
- children: t.map((g, x) => {
2784
- const N = g.id || x, v = bt(g);
2785
- return /* @__PURE__ */ d.jsx(
2809
+ children: t.map((h, v) => {
2810
+ const $ = h.id || v, g = vt(h);
2811
+ return /* @__PURE__ */ u.jsx(
2786
2812
  "div",
2787
2813
  {
2788
2814
  ref: (k) => {
2789
- k ? n.current.set(N, k) : n.current.delete(N);
2815
+ k ? d.current.set($, k) : d.current.delete($);
2790
2816
  },
2791
2817
  className: "waterfall-item",
2792
- children: v === "video" ? /* @__PURE__ */ d.jsx("div", { style: {
2818
+ children: g === "video" ? /* @__PURE__ */ u.jsx("div", { style: {
2793
2819
  width: "100%",
2794
2820
  position: "relative",
2795
2821
  paddingBottom: "56.25%",
2796
- cursor: h || g.onClick ? "pointer" : "default"
2797
- }, children: /* @__PURE__ */ d.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ d.jsx(
2798
- Se,
2822
+ cursor: y || h.onClick ? "pointer" : "default"
2823
+ }, children: /* @__PURE__ */ u.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ u.jsx(
2824
+ Re,
2799
2825
  {
2800
- src: g.url,
2801
- poster: g.poster,
2826
+ src: h.url,
2827
+ poster: h.poster,
2802
2828
  width: "100%",
2803
2829
  height: "100%",
2804
- onClick: () => T(g),
2805
- onVideoLoaded: A,
2830
+ onClick: () => x(h),
2831
+ onVideoLoaded: S,
2806
2832
  autoPlayOnHover: !0,
2807
2833
  showPlayButton: !1
2808
2834
  }
2809
- ) }) }) : /* @__PURE__ */ d.jsx(
2835
+ ) }) }) : /* @__PURE__ */ u.jsx(
2810
2836
  "div",
2811
2837
  {
2812
2838
  className: "waterfall-image-wrapper",
2813
- onClick: () => T(g),
2814
- style: { cursor: h || g.onClick ? "pointer" : "default" },
2815
- children: /* @__PURE__ */ d.jsx(
2839
+ onClick: () => x(h),
2840
+ style: { cursor: y || h.onClick ? "pointer" : "default" },
2841
+ children: /* @__PURE__ */ u.jsx(
2816
2842
  "img",
2817
2843
  {
2818
- src: g.url,
2819
- alt: `瀑布流图片 ${x + 1}`,
2844
+ src: h.url,
2845
+ alt: `瀑布流图片 ${v + 1}`,
2820
2846
  className: "waterfall-image",
2821
- onLoad: A,
2822
- onError: A,
2847
+ onLoad: S,
2848
+ onError: S,
2823
2849
  style: { display: "block", width: "100%", height: "auto" }
2824
2850
  }
2825
2851
  )
2826
2852
  }
2827
2853
  )
2828
2854
  },
2829
- N
2855
+ $
2830
2856
  );
2831
2857
  })
2832
2858
  }
2833
2859
  );
2834
2860
  };
2835
- xt.__docgenInfo = {
2861
+ wt.__docgenInfo = {
2836
2862
  displayName: "Waterfall",
2837
2863
  description: "瀑布流布局组件,支持图片和视频混合展示",
2838
2864
  props: {
@@ -2888,8 +2914,8 @@ xt.__docgenInfo = {
2888
2914
  }
2889
2915
  }
2890
2916
  };
2891
- const Tt = {
2892
- algorithm: Oe.defaultAlgorithm,
2917
+ const Ct = {
2918
+ algorithm: Pe.defaultAlgorithm,
2893
2919
  token: {
2894
2920
  // 主色
2895
2921
  colorPrimary: "#3b82f6",
@@ -2955,20 +2981,20 @@ const Tt = {
2955
2981
  }
2956
2982
  };
2957
2983
  export {
2958
- ot as AdvancedTable,
2959
- Je as AppModal,
2960
- nt as BackButton,
2961
- Ye as Button,
2962
- Ue as Card,
2963
- yt as DynamicInput,
2964
- ht as DynamicTextArea,
2965
- tt as EmptyAndSpin,
2966
- rt as LinkButton,
2967
- Qe as PageTable,
2968
- mt as RichTextEditor,
2969
- Se as VideoCard,
2970
- xt as Waterfall,
2971
- et as XcIcon,
2972
- Tt as lightTheme
2984
+ lt as AdvancedTable,
2985
+ Ze as AppModal,
2986
+ at as BackButton,
2987
+ Je as Button,
2988
+ Qe as Card,
2989
+ gt as DynamicInput,
2990
+ xt as DynamicTextArea,
2991
+ rt as EmptyAndSpin,
2992
+ ot as LinkButton,
2993
+ et as PageTable,
2994
+ ht as RichTextEditor,
2995
+ Re as VideoCard,
2996
+ wt as Waterfall,
2997
+ nt as XcIcon,
2998
+ Ct as lightTheme
2973
2999
  };
2974
3000
  //# sourceMappingURL=index.es.js.map