bi-components-library 1.0.8 → 1.0.10

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