@iswangh/element-plus-kit-form 0.1.4 → 0.2.0

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.
Files changed (45) hide show
  1. package/README.md +20 -20
  2. package/dist/FormAction.vue.d.ts +3 -3
  3. package/dist/FormAction.vue.d.ts.map +1 -1
  4. package/dist/FormItem.vue.d.ts +4 -18
  5. package/dist/FormItem.vue.d.ts.map +1 -1
  6. package/dist/composables/index.d.ts +1 -0
  7. package/dist/composables/index.d.ts.map +1 -1
  8. package/dist/composables/useChangeEventState.d.ts +5 -27
  9. package/dist/composables/useChangeEventState.d.ts.map +1 -1
  10. package/dist/composables/useClearState.d.ts +17 -0
  11. package/dist/composables/useClearState.d.ts.map +1 -0
  12. package/dist/config/action.d.ts +19 -14
  13. package/dist/config/action.d.ts.map +1 -1
  14. package/dist/config/{component.d.ts → comp.d.ts} +16 -6
  15. package/dist/config/comp.d.ts.map +1 -0
  16. package/dist/config/form.d.ts +1 -1
  17. package/dist/config/index.d.ts +1 -1
  18. package/dist/config/index.d.ts.map +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +1091 -506
  22. package/dist/style.css +1 -1
  23. package/dist/types/action.d.ts +13 -12
  24. package/dist/types/common.d.ts +5 -4
  25. package/dist/types/comp.d.ts +93 -0
  26. package/dist/types/el.d.ts +8 -8
  27. package/dist/types/form-item.d.ts +31 -92
  28. package/dist/types/index.d.ts +3 -0
  29. package/dist/types/index.d.ts.map +1 -1
  30. package/dist/types/layout.d.ts +6 -0
  31. package/dist/types/options.d.ts +15 -31
  32. package/dist/types/scope.d.ts +34 -0
  33. package/dist/utils/action.d.ts +2 -2
  34. package/dist/utils/action.d.ts.map +1 -1
  35. package/dist/utils/index.d.ts +1 -1
  36. package/dist/utils/index.d.ts.map +1 -1
  37. package/dist/utils/lodash.d.ts +6 -0
  38. package/dist/utils/lodash.d.ts.map +1 -0
  39. package/dist/utils/options.d.ts.map +1 -1
  40. package/dist/utils/value.d.ts +13 -19
  41. package/dist/utils/value.d.ts.map +1 -1
  42. package/package.json +5 -3
  43. package/dist/config/component.d.ts.map +0 -1
  44. package/dist/utils/debounce.d.ts +0 -25
  45. package/dist/utils/debounce.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,218 +1,214 @@
1
- import { onBeforeUnmount as ye, nextTick as q, defineComponent as L, createElementBlock as M, openBlock as v, createElementVNode as ae, computed as p, withDirectives as ne, createCommentVNode as Ae, createBlock as y, unref as S, withCtx as w, Fragment as $, renderSlot as ce, renderList as j, mergeProps as _, normalizeClass as we, createVNode as X, createTextVNode as Oe, toDisplayString as Se, resolveDynamicComponent as D, vShow as oe, mergeModels as J, useModel as fe, ref as Y, watch as Q, watchEffect as be, normalizeProps as me, guardReactiveProps as de, createSlots as le, useAttrs as Te, useSlots as ke, onMounted as Fe, withModifiers as Me, TransitionGroup as _e } from "vue";
2
- import { checkCondition as Z } from "@iswangh/element-plus-kit-core";
3
- import { ElTreeSelect as De, ElTransfer as Ve, ElTimeSelect as Be, ElTimePicker as Pe, ElSwitch as Re, ElSlider as Le, ElSelectV2 as Ne, ElSelect as Ue, ElRate as $e, ElRadioGroup as je, ElMention as ze, ElInputTag as He, ElInputNumber as Ge, ElInput as We, ElDatePicker as Ke, ElDatePickerPanel as Xe, ElColorPicker as qe, ElColorPickerPanel as Je, ElCheckboxGroup as Ye, ElCascader as Qe, ElAutocomplete as Ze, ElFormItem as pe, ElButton as et, ElIcon as tt, ElCol as nt, ElRow as ot, ElForm as rt } from "element-plus";
4
- function at(e, s, t) {
5
- let i = !1, r = null, g = null;
6
- function x() {
7
- r && (clearTimeout(r), r = null), g && (clearTimeout(g), g = null);
8
- }
9
- function k() {
10
- !s.value || i || (r && clearTimeout(r), r = setTimeout(() => {
11
- !e.value && !i && t(!0);
1
+ import { onBeforeUnmount as Lt, nextTick as le, defineComponent as re, createElementBlock as R, openBlock as x, createElementVNode as Be, computed as O, withDirectives as gt, createCommentVNode as ht, createBlock as A, unref as k, withCtx as B, Fragment as fe, renderSlot as zt, renderList as _e, mergeProps as de, normalizeClass as Gt, createVNode as ve, createTextVNode as Ht, toDisplayString as Wt, resolveDynamicComponent as H, vShow as vt, mergeModels as je, useModel as yt, ref as xe, watch as Oe, watchEffect as Kt, normalizeProps as ue, guardReactiveProps as ye, createSlots as Ne, useAttrs as qt, useSlots as Xt, onMounted as Yt, withModifiers as Jt, TransitionGroup as Zt } from "vue";
2
+ import { checkCondition as Le } from "@iswangh/element-plus-kit-core";
3
+ import { ElTreeSelect as Qt, ElTransfer as er, ElTimeSelect as tr, ElTimePicker as rr, ElSwitch as nr, ElSlider as or, ElSelectV2 as ar, ElSelect as ir, ElRate as sr, ElRadioGroup as cr, ElMention as ur, ElInputTag as lr, ElInputNumber as fr, ElInput as pr, ElDatePicker as dr, ElDatePickerPanel as mr, ElColorPicker as gr, ElColorPickerPanel as hr, ElCheckboxGroup as vr, ElCascader as yr, ElAutocomplete as br, ElFormItem as bt, ElButton as Tr, ElIcon as _r, ElCol as jr, ElRow as xr, ElForm as Or } from "element-plus";
4
+ function wr(e, t, r) {
5
+ let n = !1, o = null, i = null;
6
+ function u() {
7
+ o && (clearTimeout(o), o = null), i && (clearTimeout(i), i = null);
8
+ }
9
+ function v() {
10
+ !t.value || n || (o && clearTimeout(o), o = setTimeout(() => {
11
+ !e.value && !n && r(!0);
12
12
  }, 500));
13
13
  }
14
- function E() {
15
- r && (clearTimeout(r), r = null), g && clearTimeout(g), q(() => {
16
- g = setTimeout(() => {
17
- i = !1, g = null;
14
+ function m() {
15
+ o && (clearTimeout(o), o = null), i && clearTimeout(i), le(() => {
16
+ i = setTimeout(() => {
17
+ n = !1, i = null;
18
18
  }, 100);
19
19
  });
20
20
  }
21
- function I() {
22
- s.value && (i = !0, x());
21
+ function d() {
22
+ t.value && (n = !0, u());
23
23
  }
24
- return ye(x), {
25
- onMouseEnter: k,
26
- onMouseLeave: E,
27
- recordManualToggle: I
24
+ return Lt(u), {
25
+ onMouseEnter: v,
26
+ onMouseLeave: m,
27
+ recordManualToggle: d
28
28
  };
29
29
  }
30
- function lt() {
31
- let e = !1, s = !1, t = null, i = !1;
30
+ function Er() {
31
+ let e = !1;
32
32
  return {
33
- /** 是否正在清理 */
34
- get isClearing() {
33
+ /** 是否用户交互 */
34
+ get isUser() {
35
35
  return e;
36
36
  },
37
- /** 是否用户交互 */
38
- get isUserInteraction() {
39
- return s;
37
+ /** 开始用户交互 */
38
+ start() {
39
+ e = !0;
40
40
  },
41
- /**
42
- * 开始清理操作
43
- * @param value - 清理前的值
44
- */
45
- startClearing(r) {
46
- e = !0, t = r, i = !0;
41
+ /** 结束用户交互(在 nextTick 中调用) */
42
+ end() {
43
+ e = !1;
44
+ }
45
+ };
46
+ }
47
+ function Ir() {
48
+ let e = !1, t = !1;
49
+ return {
50
+ /** 是否正在处理依赖变更 */
51
+ get changing() {
52
+ return e;
47
53
  },
48
- /**
49
- * 结束清理操作(在 nextTick 中调用)
50
- */
51
- endClearing() {
52
- e = !1, t = null, i = !1;
54
+ /** 用户是否在 change 事件中设置了值 */
55
+ get hasUserValue() {
56
+ return t;
53
57
  },
54
- /**
55
- * 开始用户交互
56
- */
57
- startUserInteraction() {
58
- s = !0;
58
+ /** 开始依赖变更处理 */
59
+ start() {
60
+ e = !0, t = !1;
59
61
  },
60
- /**
61
- * 结束用户交互(在 nextTick 中调用)
62
- */
63
- endUserInteraction() {
64
- s = !1;
62
+ /** 结束依赖变更处理 */
63
+ end() {
64
+ e = !1, t = !1;
65
65
  },
66
- /**
67
- * 判断是否是清理操作
68
- * @param oldValue - 旧值
69
- * @param newValue - 新值
70
- * @param isEmpty - 检查值是否为空的函数
71
- */
72
- isClearingOperation(r, g, x) {
73
- return !!(e || i || !x(r) && x(g) && r === t);
66
+ /** 标记用户在 change 事件中设置了值 */
67
+ markValue() {
68
+ t = !0;
74
69
  }
75
70
  };
76
71
  }
77
- var it = /* @__PURE__ */ L({
72
+ var $r = /* @__PURE__ */ re({
78
73
  name: "ArrowDown",
79
74
  __name: "arrow-down",
80
75
  setup(e) {
81
- return (s, t) => (v(), M("svg", {
76
+ return (t, r) => (x(), R("svg", {
82
77
  xmlns: "http://www.w3.org/2000/svg",
83
78
  viewBox: "0 0 1024 1024"
84
79
  }, [
85
- ae("path", {
80
+ Be("path", {
86
81
  fill: "currentColor",
87
82
  d: "M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"
88
83
  })
89
84
  ]));
90
85
  }
91
- }), st = it, ut = /* @__PURE__ */ L({
86
+ }), Ar = $r, Cr = /* @__PURE__ */ re({
92
87
  name: "Refresh",
93
88
  __name: "refresh",
94
89
  setup(e) {
95
- return (s, t) => (v(), M("svg", {
90
+ return (t, r) => (x(), R("svg", {
96
91
  xmlns: "http://www.w3.org/2000/svg",
97
92
  viewBox: "0 0 1024 1024"
98
93
  }, [
99
- ae("path", {
94
+ Be("path", {
100
95
  fill: "currentColor",
101
96
  d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
102
97
  })
103
98
  ]));
104
99
  }
105
- }), ct = ut, ft = /* @__PURE__ */ L({
100
+ }), Sr = Cr, Pr = /* @__PURE__ */ re({
106
101
  name: "Search",
107
102
  __name: "search",
108
103
  setup(e) {
109
- return (s, t) => (v(), M("svg", {
104
+ return (t, r) => (x(), R("svg", {
110
105
  xmlns: "http://www.w3.org/2000/svg",
111
106
  viewBox: "0 0 1024 1024"
112
107
  }, [
113
- ae("path", {
108
+ Be("path", {
114
109
  fill: "currentColor",
115
110
  d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
116
111
  })
117
112
  ]));
118
113
  }
119
- }), mt = ft;
120
- const ve = {
121
- behavior: "smooth",
122
- // 平滑滚动
123
- block: "center",
124
- // 垂直居中,让错误项在视窗中间
125
- inline: "nearest"
126
- // 水平方向保持最近位置
127
- }, dt = {
128
- search: { label: "搜索", icon: mt, type: "primary" },
129
- reset: { label: "重置", icon: ct },
114
+ }), Mr = Pr;
115
+ const Fr = {
116
+ search: { label: "搜索", icon: Mr, type: "primary" },
117
+ reset: { label: "重置", icon: Sr },
130
118
  submit: { label: "确认", type: "primary" },
131
119
  cancel: { label: "取消" },
132
120
  expand: { type: "text" }
133
- }, pt = ve, vt = {
134
- getDefaults(e, s) {
135
- return {
136
- ...this.buildActionAttrs(e),
137
- ...s
138
- };
121
+ }, Dr = {
122
+ /**
123
+ * 获取动作默认属性
124
+ */
125
+ getDefaults(e, t) {
126
+ return { ...this.buildActionProps(e), ...t };
139
127
  },
140
- generateActionButtons(e) {
128
+ /**
129
+ * 获取动作按钮列表
130
+ */
131
+ getActionButtons(e) {
141
132
  return e ? ["search", "reset"] : ["submit", "cancel"];
142
133
  },
143
- buildActionAttrs(e) {
134
+ /**
135
+ * 构建动作属性
136
+ */
137
+ buildActionProps(e) {
144
138
  return {
145
- buttons: this.generateActionButtons(e),
139
+ buttons: this.getActionButtons(e),
146
140
  vIf: e,
147
141
  autoExpandOnError: !0,
148
142
  vShow: !0
149
143
  };
150
144
  }
151
- }, gt = ["comp", "compAttrs", "vIf", "vShow"], ht = {
152
- custom: "div"
153
- }, xt = {
154
- autocomplete: Ze,
155
- cascader: Qe,
156
- checkbox: Ye,
157
- "color-picker-panel": Je,
158
- "color-picker": qe,
159
- "date-picker-panel": Xe,
160
- "date-picker": Ke,
161
- input: We,
162
- "input-number": Ge,
163
- "input-tag": He,
164
- mention: ze,
165
- radio: je,
166
- rate: $e,
167
- select: Ue,
168
- "select-v2": Ne,
169
- slider: Le,
170
- switch: Re,
171
- "time-picker": Pe,
172
- "time-select": Be,
173
- transfer: Ve,
174
- "tree-select": De
175
- }, It = {
176
- ...xt,
177
- ...ht
178
- }, Et = {
145
+ }, Br = ["compType", "compProps", "vIf", "vShow"], Vr = { custom: "div" }, kr = {
146
+ autocomplete: br,
147
+ cascader: yr,
148
+ checkbox: vr,
149
+ "color-picker-panel": hr,
150
+ "color-picker": gr,
151
+ "date-picker-panel": mr,
152
+ "date-picker": dr,
153
+ input: pr,
154
+ "input-number": fr,
155
+ "input-tag": lr,
156
+ mention: ur,
157
+ radio: cr,
158
+ rate: sr,
159
+ select: ir,
160
+ "select-v2": ar,
161
+ slider: or,
162
+ switch: nr,
163
+ "time-picker": rr,
164
+ "time-select": tr,
165
+ transfer: er,
166
+ "tree-select": Qt
167
+ }, Rr = { ...kr, ...Vr }, ze = {
179
168
  /**
180
169
  * 获取组件默认属性
181
170
  */
182
171
  getDefaults(e) {
183
- const { comp: s, compAttrs: t = {} } = e, i = this.getComponentType(s);
172
+ const { compType: t, compProps: r = {} } = e, n = this.getCompType(t);
184
173
  return {
185
- ...this.buildComponentAttrs(e, i),
186
- ...t
174
+ ...this.buildCompProps(e, n),
175
+ ...r
187
176
  // 用户配置最后合并,优先级最高
188
177
  };
189
178
  },
190
179
  /**
191
180
  * 判断组件类型
192
181
  */
193
- getComponentType(e) {
194
- const s = ["autocomplete", "input", "input-number", "input-tag", "mention"], t = ["cascader", "select", "select-v2", "tree-select"], i = ["date-picker", "time-select", "time-picker"];
195
- return s.includes(e) ? "input" : t.includes(e) ? "select" : i.includes(e) ? "picker" : "other";
182
+ getCompType(e) {
183
+ const t = ["autocomplete", "input", "input-number", "input-tag", "mention"], r = ["cascader", "select", "select-v2", "tree-select"], n = ["date-picker", "time-select", "time-picker"];
184
+ return t.includes(e) ? "input" : r.includes(e) ? "select" : n.includes(e) ? "picker" : "other";
196
185
  },
197
186
  /**
198
187
  * 动态生成 placeholder
199
188
  */
200
- generatePlaceholder(e, s) {
201
- const { label: t, comp: i } = e, r = t ? `${t}` : "";
202
- return s === "input" ? i === "input-number" ? "请输入" : `请输入${r}` : ["select", "picker"].includes(s) ? `请选择${r}` : "";
189
+ generatePlaceholder(e, t) {
190
+ const { label: r, compType: n } = e, o = r ? `${r}` : "";
191
+ return t === "input" ? n === "input-number" ? "请输入" : `请输入${o}` : ["select", "picker"].includes(t) ? `请选择${o}` : "";
203
192
  },
204
193
  /**
205
194
  * 构建组件属性
206
195
  */
207
- buildComponentAttrs(e, s) {
208
- const t = {};
209
- return ["input", "select", "picker"].includes(s) && (t.placeholder = this.generatePlaceholder(e, s), t.clearable = !0), ["select"].includes(s) && (t.filterable = !0), t;
196
+ buildCompProps(e, t) {
197
+ const r = {};
198
+ return ["input", "select", "picker"].includes(t) && (r.placeholder = this.generatePlaceholder(e, t), r.clearable = !0), ["select"].includes(t) && (r.filterable = !0), r;
210
199
  }
211
- }, Ct = {
200
+ }, Tt = {
201
+ behavior: "smooth",
202
+ // 平滑滚动
203
+ block: "center",
204
+ // 垂直居中,让错误项在视窗中间
205
+ inline: "nearest"
206
+ // 水平方向保持最近位置
207
+ }, Ur = {
212
208
  showMessage: !0,
213
209
  scrollToError: !0,
214
- scrollIntoViewOptions: ve
215
- }, yt = /* @__PURE__ */ L({
210
+ scrollIntoViewOptions: Tt
211
+ }, Nr = /* @__PURE__ */ re({
216
212
  name: "ElementPlusKitFormItemAction",
217
213
  __name: "FormAction",
218
214
  props: {
@@ -225,308 +221,922 @@ const ve = {
225
221
  onMouseLeave: {}
226
222
  },
227
223
  emits: ["action"],
228
- setup(e, { emit: s }) {
229
- const t = e, i = s, r = p(() => ({
230
- ...t,
231
- config: { ...vt.getDefaults(t.inline, t.config) }
232
- })), g = p(() => {
233
- const { buttons: f } = r.value.config;
234
- return f.map((m) => {
235
- if (typeof m != "string")
236
- return m;
237
- const h = dt[m];
238
- return h ? { ...h, eventName: m } : { label: m.toUpperCase(), eventName: m };
224
+ setup(e, { emit: t }) {
225
+ const r = e, n = t, o = O(() => ({
226
+ ...r,
227
+ config: { ...Dr.getDefaults(r.inline, r.config) }
228
+ })), i = O(() => {
229
+ const { buttons: g } = o.value.config;
230
+ return g.map((_) => {
231
+ if (typeof _ != "string")
232
+ return _;
233
+ const f = Fr[_];
234
+ return f ? { ...f, eventName: _ } : { label: _.toUpperCase(), eventName: _ };
239
235
  });
240
236
  });
241
- function x(f) {
242
- return f.eventName === "expand";
237
+ function u(g) {
238
+ return g.eventName === "expand";
243
239
  }
244
- function k(f) {
245
- const { label: m, eventName: h, ...F } = f;
246
- if (x(f)) {
247
- const d = t.expanded ? "收起" : "展开";
240
+ function v(g) {
241
+ const { label: _, eventName: f, ...w } = g;
242
+ if (u(g)) {
243
+ const j = r.expanded ? "收起" : "展开";
248
244
  return {
249
- ...F,
250
- title: d,
251
- "aria-label": d,
252
- "aria-expanded": t.expanded
245
+ ...w,
246
+ title: j,
247
+ "aria-label": j,
248
+ "aria-expanded": r.expanded
253
249
  };
254
250
  }
255
- return F;
251
+ return w;
256
252
  }
257
- function E(f) {
258
- const m = f.eventName, h = x(f) ? t.expanded : void 0;
259
- i("action", { eventName: m, data: h });
253
+ function m(g) {
254
+ const _ = g.eventName, f = u(g) ? r.expanded : void 0;
255
+ n("action", { eventName: _, data: f });
260
256
  }
261
- function I(f) {
262
- x(f) && t.autoExpandOnHover && t.onMouseEnter?.();
257
+ function d(g) {
258
+ u(g) && r.autoExpandOnHover && r.onMouseEnter?.();
263
259
  }
264
- function A(f) {
265
- x(f) && t.autoExpandOnHover && t.onMouseLeave?.();
260
+ function I(g) {
261
+ u(g) && r.autoExpandOnHover && r.onMouseLeave?.();
266
262
  }
267
- return (f, m) => r.value.config.vIf ? ne((v(), y(S(pe), {
263
+ return (g, _) => o.value.config.vIf ? gt((x(), A(k(bt), {
268
264
  key: 0,
269
265
  prop: "action"
270
266
  }, {
271
- default: w(() => [
272
- e.actionSlot ? (v(), y(D(e.actionSlot), {
267
+ default: B(() => [
268
+ e.actionSlot ? (x(), A(H(e.actionSlot), {
273
269
  key: 1,
274
270
  prop: "action"
275
- })) : (v(), M($, { key: 0 }, [
276
- (v(!0), M($, null, j(g.value, (h, F) => (v(), y(S(et), _({
277
- key: `${h.eventName}-${F}`
278
- }, { ref_for: !0 }, k(h), {
279
- onMouseenter: (d) => I(h),
280
- onMouseleave: (d) => A(h),
281
- onClick: (d) => E(h)
271
+ })) : (x(), R(fe, { key: 0 }, [
272
+ (x(!0), R(fe, null, _e(i.value, (f, w) => (x(), A(k(Tr), de({
273
+ key: `${f.eventName}-${w}`
274
+ }, { ref_for: !0 }, v(f), {
275
+ onMouseenter: (j) => d(f),
276
+ onMouseleave: (j) => I(f),
277
+ onClick: (j) => m(f)
282
278
  }), {
283
- default: w(() => [
284
- x(h) && e.inline ? (v(), y(S(tt), {
279
+ default: B(() => [
280
+ u(f) && e.inline ? (x(), A(k(_r), {
285
281
  key: 0,
286
- class: we(["expand-toggle-icon", { "is-expanded": e.expanded }])
282
+ class: Gt(["expand-toggle-icon", { "is-expanded": e.expanded }])
287
283
  }, {
288
- default: w(() => [
289
- X(S(st))
284
+ default: B(() => [
285
+ ve(k(Ar))
290
286
  ]),
291
287
  _: 1
292
- }, 8, ["class"])) : (v(), M($, { key: 1 }, [
293
- Oe(Se(h.label ?? ""), 1)
288
+ }, 8, ["class"])) : (x(), R(fe, { key: 1 }, [
289
+ Ht(Wt(f.label ?? ""), 1)
294
290
  ], 64))
295
291
  ]),
296
292
  _: 2
297
293
  }, 1040, ["onMouseenter", "onMouseleave", "onClick"]))), 128)),
298
- ce(f.$slots, "default", {}, void 0, !0)
294
+ zt(g.$slots, "default", {}, void 0, !0)
299
295
  ], 64))
300
296
  ]),
301
297
  _: 3
302
298
  }, 512)), [
303
- [oe, r.value.config.vShow]
304
- ]) : Ae("", !0);
299
+ [vt, o.value.config.vShow]
300
+ ]) : ht("", !0);
301
+ }
302
+ }), _t = (e, t) => {
303
+ const r = e.__vccOpts || e;
304
+ for (const [n, o] of t)
305
+ r[n] = o;
306
+ return r;
307
+ }, Lr = /* @__PURE__ */ _t(Nr, [["__scopeId", "data-v-3e763e14"]]);
308
+ function zr(e, t) {
309
+ return e ? e.some((r) => typeof r == "string" ? r === t : r.eventName === t) : !1;
310
+ }
311
+ var jt = typeof global == "object" && global && global.Object === Object && global, Gr = typeof self == "object" && self && self.Object === Object && self, M = jt || Gr || Function("return this")(), ee = M.Symbol, xt = Object.prototype, Hr = xt.hasOwnProperty, Wr = xt.toString, ce = ee ? ee.toStringTag : void 0;
312
+ function Kr(e) {
313
+ var t = Hr.call(e, ce), r = e[ce];
314
+ try {
315
+ e[ce] = void 0;
316
+ var n = !0;
317
+ } catch {
305
318
  }
306
- }), ge = (e, s) => {
307
- const t = e.__vccOpts || e;
308
- for (const [i, r] of s)
309
- t[i] = r;
319
+ var o = Wr.call(e);
320
+ return n && (t ? e[ce] = r : delete e[ce]), o;
321
+ }
322
+ var qr = Object.prototype, Xr = qr.toString;
323
+ function Yr(e) {
324
+ return Xr.call(e);
325
+ }
326
+ var Jr = "[object Null]", Zr = "[object Undefined]", Ge = ee ? ee.toStringTag : void 0;
327
+ function ne(e) {
328
+ return e == null ? e === void 0 ? Zr : Jr : Ge && Ge in Object(e) ? Kr(e) : Yr(e);
329
+ }
330
+ function oe(e) {
331
+ return e != null && typeof e == "object";
332
+ }
333
+ var Qr = "[object Symbol]";
334
+ function en(e) {
335
+ return typeof e == "symbol" || oe(e) && ne(e) == Qr;
336
+ }
337
+ var we = Array.isArray, tn = /\s/;
338
+ function rn(e) {
339
+ for (var t = e.length; t-- && tn.test(e.charAt(t)); )
340
+ ;
310
341
  return t;
311
- }, At = /* @__PURE__ */ ge(yt, [["__scopeId", "data-v-dd21a872"]]);
312
- function wt(e, s) {
313
- return e ? e.some((t) => typeof t == "string" ? t === s : t.eventName === s) : !1;
314
- }
315
- function Ot(e, s = 100) {
316
- let t = null;
317
- return function(...i) {
318
- t && clearTimeout(t), t = setTimeout(() => {
319
- e.apply(this, i), t = null;
320
- }, s);
342
+ }
343
+ var nn = /^\s+/;
344
+ function on(e) {
345
+ return e && e.slice(0, rn(e) + 1).replace(nn, "");
346
+ }
347
+ function q(e) {
348
+ var t = typeof e;
349
+ return e != null && (t == "object" || t == "function");
350
+ }
351
+ var He = NaN, an = /^[-+]0x[0-9a-f]+$/i, sn = /^0b[01]+$/i, cn = /^0o[0-7]+$/i, un = parseInt;
352
+ function We(e) {
353
+ if (typeof e == "number")
354
+ return e;
355
+ if (en(e))
356
+ return He;
357
+ if (q(e)) {
358
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
359
+ e = q(t) ? t + "" : t;
360
+ }
361
+ if (typeof e != "string")
362
+ return e === 0 ? e : +e;
363
+ e = on(e);
364
+ var r = sn.test(e);
365
+ return r || cn.test(e) ? un(e.slice(2), r ? 2 : 8) : an.test(e) ? He : +e;
366
+ }
367
+ var ln = "[object AsyncFunction]", fn = "[object Function]", pn = "[object GeneratorFunction]", dn = "[object Proxy]";
368
+ function Ot(e) {
369
+ if (!q(e))
370
+ return !1;
371
+ var t = ne(e);
372
+ return t == fn || t == pn || t == ln || t == dn;
373
+ }
374
+ var Ae = M["__core-js_shared__"], Ke = (function() {
375
+ var e = /[^.]+$/.exec(Ae && Ae.keys && Ae.keys.IE_PROTO || "");
376
+ return e ? "Symbol(src)_1." + e : "";
377
+ })();
378
+ function mn(e) {
379
+ return !!Ke && Ke in e;
380
+ }
381
+ var gn = Function.prototype, hn = gn.toString;
382
+ function Y(e) {
383
+ if (e != null) {
384
+ try {
385
+ return hn.call(e);
386
+ } catch {
387
+ }
388
+ try {
389
+ return e + "";
390
+ } catch {
391
+ }
392
+ }
393
+ return "";
394
+ }
395
+ var vn = /[\\^$.*+?()[\]{}|]/g, yn = /^\[object .+?Constructor\]$/, bn = Function.prototype, Tn = Object.prototype, _n = bn.toString, jn = Tn.hasOwnProperty, xn = RegExp(
396
+ "^" + _n.call(jn).replace(vn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
397
+ );
398
+ function On(e) {
399
+ if (!q(e) || mn(e))
400
+ return !1;
401
+ var t = Ot(e) ? xn : yn;
402
+ return t.test(Y(e));
403
+ }
404
+ function wn(e, t) {
405
+ return e?.[t];
406
+ }
407
+ function J(e, t) {
408
+ var r = wn(e, t);
409
+ return On(r) ? r : void 0;
410
+ }
411
+ var Pe = J(M, "WeakMap"), qe = Object.create, En = /* @__PURE__ */ (function() {
412
+ function e() {
413
+ }
414
+ return function(t) {
415
+ if (!q(t))
416
+ return {};
417
+ if (qe)
418
+ return qe(t);
419
+ e.prototype = t;
420
+ var r = new e();
421
+ return e.prototype = void 0, r;
422
+ };
423
+ })(), Xe = (function() {
424
+ try {
425
+ var e = J(Object, "defineProperty");
426
+ return e({}, "", {}), e;
427
+ } catch {
428
+ }
429
+ })();
430
+ function In(e, t) {
431
+ for (var r = -1, n = e == null ? 0 : e.length; ++r < n && t(e[r], r, e) !== !1; )
432
+ ;
433
+ return e;
434
+ }
435
+ var $n = 9007199254740991, An = /^(?:0|[1-9]\d*)$/;
436
+ function Cn(e, t) {
437
+ var r = typeof e;
438
+ return t = t ?? $n, !!t && (r == "number" || r != "symbol" && An.test(e)) && e > -1 && e % 1 == 0 && e < t;
439
+ }
440
+ function Sn(e, t, r) {
441
+ t == "__proto__" && Xe ? Xe(e, t, {
442
+ configurable: !0,
443
+ enumerable: !0,
444
+ value: r,
445
+ writable: !0
446
+ }) : e[t] = r;
447
+ }
448
+ function wt(e, t) {
449
+ return e === t || e !== e && t !== t;
450
+ }
451
+ var Pn = Object.prototype, Mn = Pn.hasOwnProperty;
452
+ function Fn(e, t, r) {
453
+ var n = e[t];
454
+ (!(Mn.call(e, t) && wt(n, r)) || r === void 0 && !(t in e)) && Sn(e, t, r);
455
+ }
456
+ var Dn = 9007199254740991;
457
+ function Et(e) {
458
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Dn;
459
+ }
460
+ function It(e) {
461
+ return e != null && Et(e.length) && !Ot(e);
462
+ }
463
+ var Bn = Object.prototype;
464
+ function Ve(e) {
465
+ var t = e && e.constructor, r = typeof t == "function" && t.prototype || Bn;
466
+ return e === r;
467
+ }
468
+ function Vn(e, t) {
469
+ for (var r = -1, n = Array(e); ++r < e; )
470
+ n[r] = t(r);
471
+ return n;
472
+ }
473
+ var kn = "[object Arguments]";
474
+ function Ye(e) {
475
+ return oe(e) && ne(e) == kn;
476
+ }
477
+ var $t = Object.prototype, Rn = $t.hasOwnProperty, Un = $t.propertyIsEnumerable, At = Ye(/* @__PURE__ */ (function() {
478
+ return arguments;
479
+ })()) ? Ye : function(e) {
480
+ return oe(e) && Rn.call(e, "callee") && !Un.call(e, "callee");
481
+ };
482
+ function Nn() {
483
+ return !1;
484
+ }
485
+ var Ct = typeof exports == "object" && exports && !exports.nodeType && exports, Je = Ct && typeof module == "object" && module && !module.nodeType && module, Ln = Je && Je.exports === Ct, Ze = Ln ? M.Buffer : void 0, zn = Ze ? Ze.isBuffer : void 0, ke = zn || Nn, Gn = "[object Arguments]", Hn = "[object Array]", Wn = "[object Boolean]", Kn = "[object Date]", qn = "[object Error]", Xn = "[object Function]", Yn = "[object Map]", Jn = "[object Number]", Zn = "[object Object]", Qn = "[object RegExp]", eo = "[object Set]", to = "[object String]", ro = "[object WeakMap]", no = "[object ArrayBuffer]", oo = "[object DataView]", ao = "[object Float32Array]", io = "[object Float64Array]", so = "[object Int8Array]", co = "[object Int16Array]", uo = "[object Int32Array]", lo = "[object Uint8Array]", fo = "[object Uint8ClampedArray]", po = "[object Uint16Array]", mo = "[object Uint32Array]", T = {};
486
+ T[ao] = T[io] = T[so] = T[co] = T[uo] = T[lo] = T[fo] = T[po] = T[mo] = !0;
487
+ T[Gn] = T[Hn] = T[no] = T[Wn] = T[oo] = T[Kn] = T[qn] = T[Xn] = T[Yn] = T[Jn] = T[Zn] = T[Qn] = T[eo] = T[to] = T[ro] = !1;
488
+ function go(e) {
489
+ return oe(e) && Et(e.length) && !!T[ne(e)];
490
+ }
491
+ function Re(e) {
492
+ return function(t) {
493
+ return e(t);
321
494
  };
322
495
  }
323
- function he(e, s) {
496
+ var St = typeof exports == "object" && exports && !exports.nodeType && exports, pe = St && typeof module == "object" && module && !module.nodeType && module, ho = pe && pe.exports === St, Ce = ho && jt.process, te = (function() {
497
+ try {
498
+ var e = pe && pe.require && pe.require("util").types;
499
+ return e || Ce && Ce.binding && Ce.binding("util");
500
+ } catch {
501
+ }
502
+ })(), Qe = te && te.isTypedArray, Pt = Qe ? Re(Qe) : go, vo = Object.prototype, yo = vo.hasOwnProperty;
503
+ function bo(e, t) {
504
+ var r = we(e), n = !r && At(e), o = !r && !n && ke(e), i = !r && !n && !o && Pt(e), u = r || n || o || i, v = u ? Vn(e.length, String) : [], m = v.length;
505
+ for (var d in e)
506
+ yo.call(e, d) && !(u && // Safari 9 has enumerable `arguments.length` in strict mode.
507
+ (d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
508
+ o && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
509
+ i && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
510
+ Cn(d, m))) && v.push(d);
511
+ return v;
512
+ }
513
+ function Mt(e, t) {
514
+ return function(r) {
515
+ return e(t(r));
516
+ };
517
+ }
518
+ var To = Mt(Object.keys, Object), _o = Object.prototype, jo = _o.hasOwnProperty;
519
+ function Ft(e) {
520
+ if (!Ve(e))
521
+ return To(e);
522
+ var t = [];
523
+ for (var r in Object(e))
524
+ jo.call(e, r) && r != "constructor" && t.push(r);
525
+ return t;
526
+ }
527
+ function xo(e) {
528
+ return It(e) ? bo(e) : Ft(e);
529
+ }
530
+ var me = J(Object, "create");
531
+ function Oo() {
532
+ this.__data__ = me ? me(null) : {}, this.size = 0;
533
+ }
534
+ function wo(e) {
535
+ var t = this.has(e) && delete this.__data__[e];
536
+ return this.size -= t ? 1 : 0, t;
537
+ }
538
+ var Eo = "__lodash_hash_undefined__", Io = Object.prototype, $o = Io.hasOwnProperty;
539
+ function Ao(e) {
540
+ var t = this.__data__;
541
+ if (me) {
542
+ var r = t[e];
543
+ return r === Eo ? void 0 : r;
544
+ }
545
+ return $o.call(t, e) ? t[e] : void 0;
546
+ }
547
+ var Co = Object.prototype, So = Co.hasOwnProperty;
548
+ function Po(e) {
549
+ var t = this.__data__;
550
+ return me ? t[e] !== void 0 : So.call(t, e);
551
+ }
552
+ var Mo = "__lodash_hash_undefined__";
553
+ function Fo(e, t) {
554
+ var r = this.__data__;
555
+ return this.size += this.has(e) ? 0 : 1, r[e] = me && t === void 0 ? Mo : t, this;
556
+ }
557
+ function X(e) {
558
+ var t = -1, r = e == null ? 0 : e.length;
559
+ for (this.clear(); ++t < r; ) {
560
+ var n = e[t];
561
+ this.set(n[0], n[1]);
562
+ }
563
+ }
564
+ X.prototype.clear = Oo;
565
+ X.prototype.delete = wo;
566
+ X.prototype.get = Ao;
567
+ X.prototype.has = Po;
568
+ X.prototype.set = Fo;
569
+ function Do() {
570
+ this.__data__ = [], this.size = 0;
571
+ }
572
+ function Ee(e, t) {
573
+ for (var r = e.length; r--; )
574
+ if (wt(e[r][0], t))
575
+ return r;
576
+ return -1;
577
+ }
578
+ var Bo = Array.prototype, Vo = Bo.splice;
579
+ function ko(e) {
580
+ var t = this.__data__, r = Ee(t, e);
581
+ if (r < 0)
582
+ return !1;
583
+ var n = t.length - 1;
584
+ return r == n ? t.pop() : Vo.call(t, r, 1), --this.size, !0;
585
+ }
586
+ function Ro(e) {
587
+ var t = this.__data__, r = Ee(t, e);
588
+ return r < 0 ? void 0 : t[r][1];
589
+ }
590
+ function Uo(e) {
591
+ return Ee(this.__data__, e) > -1;
592
+ }
593
+ function No(e, t) {
594
+ var r = this.__data__, n = Ee(r, e);
595
+ return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this;
596
+ }
597
+ function U(e) {
598
+ var t = -1, r = e == null ? 0 : e.length;
599
+ for (this.clear(); ++t < r; ) {
600
+ var n = e[t];
601
+ this.set(n[0], n[1]);
602
+ }
603
+ }
604
+ U.prototype.clear = Do;
605
+ U.prototype.delete = ko;
606
+ U.prototype.get = Ro;
607
+ U.prototype.has = Uo;
608
+ U.prototype.set = No;
609
+ var ge = J(M, "Map");
610
+ function Lo() {
611
+ this.size = 0, this.__data__ = {
612
+ hash: new X(),
613
+ map: new (ge || U)(),
614
+ string: new X()
615
+ };
616
+ }
617
+ function zo(e) {
618
+ var t = typeof e;
619
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
620
+ }
621
+ function Ie(e, t) {
622
+ var r = e.__data__;
623
+ return zo(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
624
+ }
625
+ function Go(e) {
626
+ var t = Ie(this, e).delete(e);
627
+ return this.size -= t ? 1 : 0, t;
628
+ }
629
+ function Ho(e) {
630
+ return Ie(this, e).get(e);
631
+ }
632
+ function Wo(e) {
633
+ return Ie(this, e).has(e);
634
+ }
635
+ function Ko(e, t) {
636
+ var r = Ie(this, e), n = r.size;
637
+ return r.set(e, t), this.size += r.size == n ? 0 : 1, this;
638
+ }
639
+ function ae(e) {
640
+ var t = -1, r = e == null ? 0 : e.length;
641
+ for (this.clear(); ++t < r; ) {
642
+ var n = e[t];
643
+ this.set(n[0], n[1]);
644
+ }
645
+ }
646
+ ae.prototype.clear = Lo;
647
+ ae.prototype.delete = Go;
648
+ ae.prototype.get = Ho;
649
+ ae.prototype.has = Wo;
650
+ ae.prototype.set = Ko;
651
+ function qo(e, t) {
652
+ for (var r = -1, n = t.length, o = e.length; ++r < n; )
653
+ e[o + r] = t[r];
654
+ return e;
655
+ }
656
+ var Xo = Mt(Object.getPrototypeOf, Object);
657
+ function Yo() {
658
+ this.__data__ = new U(), this.size = 0;
659
+ }
660
+ function Jo(e) {
661
+ var t = this.__data__, r = t.delete(e);
662
+ return this.size = t.size, r;
663
+ }
664
+ function Zo(e) {
665
+ return this.__data__.get(e);
666
+ }
667
+ function Qo(e) {
668
+ return this.__data__.has(e);
669
+ }
670
+ var ea = 200;
671
+ function ta(e, t) {
672
+ var r = this.__data__;
673
+ if (r instanceof U) {
674
+ var n = r.__data__;
675
+ if (!ge || n.length < ea - 1)
676
+ return n.push([e, t]), this.size = ++r.size, this;
677
+ r = this.__data__ = new ae(n);
678
+ }
679
+ return r.set(e, t), this.size = r.size, this;
680
+ }
681
+ function ie(e) {
682
+ var t = this.__data__ = new U(e);
683
+ this.size = t.size;
684
+ }
685
+ ie.prototype.clear = Yo;
686
+ ie.prototype.delete = Jo;
687
+ ie.prototype.get = Zo;
688
+ ie.prototype.has = Qo;
689
+ ie.prototype.set = ta;
690
+ var Dt = typeof exports == "object" && exports && !exports.nodeType && exports, et = Dt && typeof module == "object" && module && !module.nodeType && module, ra = et && et.exports === Dt, tt = ra ? M.Buffer : void 0;
691
+ tt && tt.allocUnsafe;
692
+ function na(e, t) {
693
+ return e.slice();
694
+ }
695
+ function oa(e, t) {
696
+ for (var r = -1, n = e == null ? 0 : e.length, o = 0, i = []; ++r < n; ) {
697
+ var u = e[r];
698
+ t(u, r, e) && (i[o++] = u);
699
+ }
700
+ return i;
701
+ }
702
+ function aa() {
703
+ return [];
704
+ }
705
+ var ia = Object.prototype, sa = ia.propertyIsEnumerable, rt = Object.getOwnPropertySymbols, ca = rt ? function(e) {
706
+ return e == null ? [] : (e = Object(e), oa(rt(e), function(t) {
707
+ return sa.call(e, t);
708
+ }));
709
+ } : aa;
710
+ function ua(e, t, r) {
711
+ var n = t(e);
712
+ return we(e) ? n : qo(n, r(e));
713
+ }
714
+ function la(e) {
715
+ return ua(e, xo, ca);
716
+ }
717
+ var Me = J(M, "DataView"), Fe = J(M, "Promise"), De = J(M, "Set"), nt = "[object Map]", fa = "[object Object]", ot = "[object Promise]", at = "[object Set]", it = "[object WeakMap]", st = "[object DataView]", pa = Y(Me), da = Y(ge), ma = Y(Fe), ga = Y(De), ha = Y(Pe), D = ne;
718
+ (Me && D(new Me(new ArrayBuffer(1))) != st || ge && D(new ge()) != nt || Fe && D(Fe.resolve()) != ot || De && D(new De()) != at || Pe && D(new Pe()) != it) && (D = function(e) {
719
+ var t = ne(e), r = t == fa ? e.constructor : void 0, n = r ? Y(r) : "";
720
+ if (n)
721
+ switch (n) {
722
+ case pa:
723
+ return st;
724
+ case da:
725
+ return nt;
726
+ case ma:
727
+ return ot;
728
+ case ga:
729
+ return at;
730
+ case ha:
731
+ return it;
732
+ }
733
+ return t;
734
+ });
735
+ var va = Object.prototype, ya = va.hasOwnProperty;
736
+ function ba(e) {
737
+ var t = e.length, r = new e.constructor(t);
738
+ return t && typeof e[0] == "string" && ya.call(e, "index") && (r.index = e.index, r.input = e.input), r;
739
+ }
740
+ var ct = M.Uint8Array;
741
+ function Ue(e) {
742
+ var t = new e.constructor(e.byteLength);
743
+ return new ct(t).set(new ct(e)), t;
744
+ }
745
+ function Ta(e, t) {
746
+ var r = Ue(e.buffer);
747
+ return new e.constructor(r, e.byteOffset, e.byteLength);
748
+ }
749
+ var _a = /\w*$/;
750
+ function ja(e) {
751
+ var t = new e.constructor(e.source, _a.exec(e));
752
+ return t.lastIndex = e.lastIndex, t;
753
+ }
754
+ var ut = ee ? ee.prototype : void 0, lt = ut ? ut.valueOf : void 0;
755
+ function xa(e) {
756
+ return lt ? Object(lt.call(e)) : {};
757
+ }
758
+ function Oa(e, t) {
759
+ var r = Ue(e.buffer);
760
+ return new e.constructor(r, e.byteOffset, e.length);
761
+ }
762
+ var wa = "[object Boolean]", Ea = "[object Date]", Ia = "[object Map]", $a = "[object Number]", Aa = "[object RegExp]", Ca = "[object Set]", Sa = "[object String]", Pa = "[object Symbol]", Ma = "[object ArrayBuffer]", Fa = "[object DataView]", Da = "[object Float32Array]", Ba = "[object Float64Array]", Va = "[object Int8Array]", ka = "[object Int16Array]", Ra = "[object Int32Array]", Ua = "[object Uint8Array]", Na = "[object Uint8ClampedArray]", La = "[object Uint16Array]", za = "[object Uint32Array]";
763
+ function Ga(e, t, r) {
764
+ var n = e.constructor;
765
+ switch (t) {
766
+ case Ma:
767
+ return Ue(e);
768
+ case wa:
769
+ case Ea:
770
+ return new n(+e);
771
+ case Fa:
772
+ return Ta(e);
773
+ case Da:
774
+ case Ba:
775
+ case Va:
776
+ case ka:
777
+ case Ra:
778
+ case Ua:
779
+ case Na:
780
+ case La:
781
+ case za:
782
+ return Oa(e);
783
+ case Ia:
784
+ return new n();
785
+ case $a:
786
+ case Sa:
787
+ return new n(e);
788
+ case Aa:
789
+ return ja(e);
790
+ case Ca:
791
+ return new n();
792
+ case Pa:
793
+ return xa(e);
794
+ }
795
+ }
796
+ function Ha(e) {
797
+ return typeof e.constructor == "function" && !Ve(e) ? En(Xo(e)) : {};
798
+ }
799
+ var Wa = "[object Map]";
800
+ function Ka(e) {
801
+ return oe(e) && D(e) == Wa;
802
+ }
803
+ var ft = te && te.isMap, qa = ft ? Re(ft) : Ka, Xa = "[object Set]";
804
+ function Ya(e) {
805
+ return oe(e) && D(e) == Xa;
806
+ }
807
+ var pt = te && te.isSet, Ja = pt ? Re(pt) : Ya, Bt = "[object Arguments]", Za = "[object Array]", Qa = "[object Boolean]", ei = "[object Date]", ti = "[object Error]", Vt = "[object Function]", ri = "[object GeneratorFunction]", ni = "[object Map]", oi = "[object Number]", kt = "[object Object]", ai = "[object RegExp]", ii = "[object Set]", si = "[object String]", ci = "[object Symbol]", ui = "[object WeakMap]", li = "[object ArrayBuffer]", fi = "[object DataView]", pi = "[object Float32Array]", di = "[object Float64Array]", mi = "[object Int8Array]", gi = "[object Int16Array]", hi = "[object Int32Array]", vi = "[object Uint8Array]", yi = "[object Uint8ClampedArray]", bi = "[object Uint16Array]", Ti = "[object Uint32Array]", b = {};
808
+ b[Bt] = b[Za] = b[li] = b[fi] = b[Qa] = b[ei] = b[pi] = b[di] = b[mi] = b[gi] = b[hi] = b[ni] = b[oi] = b[kt] = b[ai] = b[ii] = b[si] = b[ci] = b[vi] = b[yi] = b[bi] = b[Ti] = !0;
809
+ b[ti] = b[Vt] = b[ui] = !1;
810
+ function be(e, t, r, n, o, i) {
811
+ var u;
812
+ if (u !== void 0)
813
+ return u;
814
+ if (!q(e))
815
+ return e;
816
+ var v = we(e);
817
+ if (v)
818
+ u = ba(e);
819
+ else {
820
+ var m = D(e), d = m == Vt || m == ri;
821
+ if (ke(e))
822
+ return na(e);
823
+ if (m == kt || m == Bt || d && !o)
824
+ u = d ? {} : Ha(e);
825
+ else {
826
+ if (!b[m])
827
+ return o ? e : {};
828
+ u = Ga(e, m);
829
+ }
830
+ }
831
+ i || (i = new ie());
832
+ var I = i.get(e);
833
+ if (I)
834
+ return I;
835
+ i.set(e, u), Ja(e) ? e.forEach(function(f) {
836
+ u.add(be(f, t, r, f, e, i));
837
+ }) : qa(e) && e.forEach(function(f, w) {
838
+ u.set(w, be(f, t, r, w, e, i));
839
+ });
840
+ var g = la, _ = v ? void 0 : g(e);
841
+ return In(_ || e, function(f, w) {
842
+ _ && (w = f, f = e[w]), Fn(u, w, be(f, t, r, w, e, i));
843
+ }), u;
844
+ }
845
+ var _i = 1, ji = 4;
846
+ function dt(e) {
847
+ return be(e, _i | ji);
848
+ }
849
+ var Se = function() {
850
+ return M.Date.now();
851
+ }, xi = "Expected a function", Oi = Math.max, wi = Math.min;
852
+ function Ei(e, t, r) {
853
+ var n, o, i, u, v, m, d = 0, I = !1, g = !1, _ = !0;
854
+ if (typeof e != "function")
855
+ throw new TypeError(xi);
856
+ t = We(t) || 0, q(r) && (I = !!r.leading, g = "maxWait" in r, i = g ? Oi(We(r.maxWait) || 0, t) : i, _ = "trailing" in r ? !!r.trailing : _);
857
+ function f(y) {
858
+ var $ = n, F = o;
859
+ return n = o = void 0, d = y, u = e.apply(F, $), u;
860
+ }
861
+ function w(y) {
862
+ return d = y, v = setTimeout(P, t), I ? f(y) : u;
863
+ }
864
+ function j(y) {
865
+ var $ = y - m, F = y - d, Z = t - $;
866
+ return g ? wi(Z, i - F) : Z;
867
+ }
868
+ function W(y) {
869
+ var $ = y - m, F = y - d;
870
+ return m === void 0 || $ >= t || $ < 0 || g && F >= i;
871
+ }
872
+ function P() {
873
+ var y = Se();
874
+ if (W(y))
875
+ return K(y);
876
+ v = setTimeout(P, j(y));
877
+ }
878
+ function K(y) {
879
+ return v = void 0, _ && n ? f(y) : (n = o = void 0, u);
880
+ }
881
+ function N() {
882
+ v !== void 0 && clearTimeout(v), d = 0, n = m = o = v = void 0;
883
+ }
884
+ function V() {
885
+ return v === void 0 ? u : K(Se());
886
+ }
887
+ function L() {
888
+ var y = Se(), $ = W(y);
889
+ if (n = arguments, o = this, m = y, $) {
890
+ if (v === void 0)
891
+ return w(m);
892
+ if (g)
893
+ return clearTimeout(v), v = setTimeout(P, t), f(m);
894
+ }
895
+ return v === void 0 && (v = setTimeout(P, t)), u;
896
+ }
897
+ return L.cancel = N, L.flush = V, L;
898
+ }
899
+ var Ii = "[object Map]", $i = "[object Set]", Ai = Object.prototype, Ci = Ai.hasOwnProperty;
900
+ function Te(e) {
901
+ if (e == null)
902
+ return !0;
903
+ if (It(e) && (we(e) || typeof e == "string" || typeof e.splice == "function" || ke(e) || Pt(e) || At(e)))
904
+ return !e.length;
905
+ var t = D(e);
906
+ if (t == Ii || t == $i)
907
+ return !e.size;
908
+ if (Ve(e))
909
+ return !Ft(e).length;
910
+ for (var r in e)
911
+ if (Ci.call(e, r))
912
+ return !1;
913
+ return !0;
914
+ }
915
+ function Rt(e, t) {
324
916
  if (!e || e.length === 0)
325
917
  return [];
326
- const t = Array.from(new Set(e));
327
- return s ? t.filter((i) => i !== s) : t;
918
+ const r = Array.from(new Set(e));
919
+ return t ? r.filter((n) => n !== t) : r;
328
920
  }
329
- function ie(e, s, t) {
330
- const i = he(e, t), r = {};
331
- for (const g of i)
332
- r[g] = s[g];
333
- return r;
921
+ function mt(e, t, r) {
922
+ const n = Rt(e, r);
923
+ return Object.fromEntries(n.map((o) => [o, t[o]]));
334
924
  }
335
- function ee(e) {
925
+ function he(e) {
336
926
  return e && typeof e == "object" && typeof e.loader == "function";
337
927
  }
338
- function re(e) {
339
- return e == null || e === "";
340
- }
341
- function te(e, s) {
342
- return s.length === 0 ? !1 : re(e) ? !0 : s.some((t) => (typeof t == "object" && t !== null ? t.value : t) === e);
928
+ function Ut(e, t) {
929
+ if (e.length === 0)
930
+ return !0;
931
+ const [r, ...n] = e, o = t.find((i) => (typeof i == "object" && i !== null ? i.value : i) === r);
932
+ if (!o)
933
+ return !1;
934
+ if (n.length > 0) {
935
+ const i = typeof o == "object" && o !== null ? o.children : void 0;
936
+ return !Array.isArray(i) || i.length === 0 ? !1 : Ut(n, i);
937
+ }
938
+ return !0;
343
939
  }
344
- function se(e) {
345
- return e == null ? e : typeof e == "object" ? JSON.parse(JSON.stringify(e)) : e;
940
+ function Si(e) {
941
+ const { modelValue: t, options: r, formItem: n } = e;
942
+ if (r.length === 0)
943
+ return !1;
944
+ if (Te(t))
945
+ return !0;
946
+ if (n.compType === "cascader" && Array.isArray(t))
947
+ return t.length === 0 ? !0 : Ut(t, r);
948
+ const o = r.map((i) => typeof i == "object" && i !== null ? i.value : i);
949
+ return Array.isArray(t) ? t.length === 0 ? !0 : t.every((i) => o.includes(i)) : o.includes(t);
346
950
  }
347
- const ue = /* @__PURE__ */ L({
951
+ const Pi = {
952
+ key: 0,
953
+ class: "form-item-slot-wrapper"
954
+ }, Mi = /* @__PURE__ */ re({
348
955
  name: "ElementPlusKitFormItem",
349
956
  __name: "FormItem",
350
- props: /* @__PURE__ */ J({
957
+ props: /* @__PURE__ */ je({
351
958
  formItem: {},
352
959
  index: {},
353
960
  formData: { default: () => ({}) },
354
961
  dynamicCompEvents: {},
355
- formSlots: { default: () => ({ formItemSlots: [], dynamicComponentSlots: /* @__PURE__ */ new Map() }) }
962
+ formSlots: { default: () => ({ formItemSlots: [], dynamicComponentSlots: /* @__PURE__ */ new Map(), customComponentSlots: /* @__PURE__ */ new Map() }) }
356
963
  }, {
357
964
  modelValue: {},
358
965
  modelModifiers: {}
359
966
  }),
360
- emits: /* @__PURE__ */ J(["change"], ["update:modelValue"]),
361
- setup(e, { emit: s }) {
362
- const t = e, i = s, r = fe(e, "modelValue"), g = p(() => {
363
- const a = new Set(gt);
364
- return Object.fromEntries(
365
- Object.entries(t.formItem).filter(([u]) => !a.has(u))
366
- );
367
- }), x = p(() => t.formSlots.formItemSlots), k = p(() => It[t.formItem.comp] || "div"), E = p(() => ({ prop: t.formItem.prop, formItem: t.formItem, index: t.index })), I = p(() => Object.fromEntries(
368
- Object.entries(t.dynamicCompEvents).map(([a, u]) => [
369
- a,
370
- (...c) => u(E.value, ...c)
967
+ emits: /* @__PURE__ */ je(["change"], ["update:modelValue"]),
968
+ setup(e, { emit: t }) {
969
+ const r = e, n = t, o = yt(e, "modelValue"), i = O(() => Object.fromEntries(
970
+ Object.entries(r.formItem).filter(([s]) => !Br.includes(s))
971
+ )), u = O(() => r.formSlots.formItemSlots), v = O(() => Rr[r.formItem.compType] || "div"), m = O(() => ({ prop: r.formItem.prop, formItem: r.formItem, index: r.index })), d = O(() => Object.fromEntries(
972
+ Object.entries(r.dynamicCompEvents).map(([s, l]) => [
973
+ s,
974
+ (...h) => l(m.value, ...h)
371
975
  ])
372
- )), A = Y([]), f = Y(!1), m = lt();
373
- function h() {
374
- if (!re(r.value)) {
375
- if (m.isClearing)
376
- return;
377
- m.startClearing(r.value), r.value = void 0, i("change", E.value, void 0), q(() => {
378
- m.endClearing();
379
- });
380
- }
381
- }
382
- function F(a) {
383
- m.isClearing || (m.startUserInteraction(), i("change", E.value, a), q(() => {
384
- m.endUserInteraction();
385
- }));
976
+ )), I = xe([]), g = xe(!1), _ = Er(), f = Ir();
977
+ function w(s) {
978
+ _.start(), n("change", m.value, s), le(() => {
979
+ _.end();
980
+ });
386
981
  }
387
- const d = p(() => {
388
- const a = Et.getDefaults(t.formItem), u = t.formItem.compAttrs ?? {}, c = "options" in u;
982
+ const j = O(() => {
983
+ const s = ze.getDefaults(r.formItem), l = r.formItem.compProps ?? {}, h = "options" in l, C = l.options, { options: S, ...z } = l, se = Array.isArray(C), a = typeof C == "function" || he(C);
389
984
  return {
390
- ...a,
391
- ...u,
392
- ...I.value,
393
- ...c && {
394
- options: A.value,
395
- loading: f.value
985
+ ...s,
986
+ ...z,
987
+ ...d.value,
988
+ ...h && {
989
+ // 静态数组直接使用原始数组,动态选项使用 resolvedOptions.value
990
+ options: se ? C : I.value,
991
+ // 只有动态选项才需要 loading 状态
992
+ ...a && { loading: g.value }
396
993
  }
397
994
  };
398
995
  });
399
- function z(a) {
400
- return t.formSlots.dynamicComponentSlots.get(a);
996
+ function W(s) {
997
+ return r.formSlots.dynamicComponentSlots.get(s);
998
+ }
999
+ function P(s) {
1000
+ const l = r.formSlots.customComponentSlots.get(s);
1001
+ return l && l.length > 0 && l[0] ? l[0].slotFn : void 0;
401
1002
  }
402
- async function V(a, u) {
1003
+ async function K(s, l) {
403
1004
  try {
404
- const c = await a(u);
405
- return Array.isArray(c) ? c : [];
406
- } catch (c) {
407
- return console.error(`[FormItem] 加载字段 "${t.formItem.prop}" 的选项失败:`, c), [];
1005
+ const h = await s(l);
1006
+ return Array.isArray(h) ? h : [];
1007
+ } catch {
1008
+ return [];
408
1009
  }
409
1010
  }
410
- function B() {
411
- const a = t.formItem.compAttrs?.options;
412
- return ee(a) ? a : null;
1011
+ function N() {
1012
+ const s = r.formItem.compProps?.options;
1013
+ return he(s) ? s : null;
1014
+ }
1015
+ function V() {
1016
+ if (Te(o.value))
1017
+ return;
1018
+ const s = o.value;
1019
+ le(() => {
1020
+ f.changing && f.hasUserValue || o.value === s && (o.value = void 0);
1021
+ });
1022
+ }
1023
+ function L(s) {
1024
+ const { formItem: l } = r;
1025
+ ze.getCompType(l.compType) !== "input" && (Si({ modelValue: o.value, options: s, formItem: l }) || V());
413
1026
  }
414
- async function P() {
415
- const a = t.formItem.compAttrs?.options;
416
- if (a && !Array.isArray(a)) {
417
- f.value = !0;
1027
+ async function y(s = !1) {
1028
+ const l = r.formItem.compProps?.options;
1029
+ if (!(!l || Array.isArray(l))) {
1030
+ s && (f.start(), V(), await le()), g.value = !0;
418
1031
  try {
419
- if (typeof a == "function") {
420
- const u = await V(a, t.formData ?? {});
421
- A.value = u, te(r.value, u) || h();
422
- } else if (ee(a)) {
423
- const { loader: u, deps: c = [] } = a, b = t.formData ?? {}, O = ie(c, b, t.formItem.prop), R = await V(u, { ...b, ...O });
424
- A.value = R, te(r.value, R) || h();
425
- }
1032
+ let h;
1033
+ if (typeof l == "function")
1034
+ h = await K(l, r.formData ?? {});
1035
+ else if (he(l)) {
1036
+ const { loader: C, deps: S = [] } = l, z = r.formData ?? {}, se = mt(S, z, r.formItem.prop);
1037
+ h = await K(C, { ...z, ...se });
1038
+ } else
1039
+ return;
1040
+ I.value = h, s || L(h);
426
1041
  } finally {
427
- f.value = !1;
1042
+ g.value = !1, s && f.end();
428
1043
  }
429
1044
  }
430
1045
  }
431
- function H(a) {
432
- A.value = a, te(r.value, a) || h();
1046
+ function $() {
1047
+ y();
433
1048
  }
434
- function G() {
435
- P();
436
- }
437
- function W(a) {
438
- const { immediate: u = !1, deps: c = [], loader: b } = a;
439
- if (c.length > 0) {
440
- const O = t.formData ?? {}, R = ie(c, O, t.formItem.prop);
1049
+ function F(s) {
1050
+ const { immediate: l = !1, deps: h = [], loader: C } = s;
1051
+ if (h.length > 0) {
1052
+ const S = r.formData ?? {}, z = mt(h, S, r.formItem.prop);
441
1053
  try {
442
- b({ ...O, ...R });
1054
+ C({ ...S, ...z });
443
1055
  } catch {
444
1056
  }
445
- u && P();
1057
+ l && y();
446
1058
  return;
447
1059
  }
448
- u && P();
1060
+ l && y();
449
1061
  }
450
- const K = p(() => {
451
- const a = B();
452
- return a ? he(a.deps ?? [], t.formItem.prop) : [];
453
- }), N = p(() => {
454
- const a = B();
455
- return a ? a.immediate ?? !1 : !1;
1062
+ const Z = O(() => {
1063
+ const s = N();
1064
+ return s ? Rt(s.deps ?? [], r.formItem.prop) : [];
1065
+ }), Q = O(() => {
1066
+ const s = N();
1067
+ return s ? s.immediate ?? !1 : !1;
456
1068
  });
457
- return Q(
1069
+ return Oe(
458
1070
  () => {
459
- const a = K.value, u = {};
460
- for (const c of a)
461
- u[c] = t.formData?.[c];
462
- return u;
1071
+ const s = Z.value;
1072
+ return Object.fromEntries(s.map((l) => [l, r.formData?.[l]]));
463
1073
  },
464
1074
  () => {
465
- B() && P();
1075
+ N() && y(!0);
466
1076
  },
467
- { deep: !0, immediate: N.value }
468
- ), be(() => {
469
- const a = t.formItem.compAttrs?.options;
470
- if (a) {
471
- if (Array.isArray(a)) {
472
- H(a);
473
- return;
474
- }
475
- if (typeof a == "function") {
476
- G();
477
- return;
478
- }
479
- ee(a) && W(a);
1077
+ { deep: !0, immediate: Q.value }
1078
+ ), Kt(() => {
1079
+ const s = r.formItem.compProps?.options;
1080
+ if (!(!s || Array.isArray(s))) {
1081
+ if (typeof s == "function")
1082
+ return $();
1083
+ he(s) && F(s);
480
1084
  }
481
- }), Q(
482
- () => r.value,
483
- (a, u) => {
484
- m.isClearingOperation(u, a, re) || m.isUserInteraction || a !== u && i("change", E.value, a);
1085
+ }), Oe(
1086
+ () => o.value,
1087
+ (s, l) => {
1088
+ if (!_.isUser) {
1089
+ if (f.changing) {
1090
+ if (Te(s)) {
1091
+ !Te(l) && !f.hasUserValue && n("change", m.value, void 0);
1092
+ return;
1093
+ }
1094
+ f.markValue(), n("change", m.value, s);
1095
+ return;
1096
+ }
1097
+ s !== l && n("change", m.value, s);
1098
+ }
485
1099
  }
486
- ), (a, u) => (v(), y(S(pe), me(de(g.value)), le({
487
- default: w(() => [
488
- e.formItem.comp !== "custom" ? (v(), y(D(k.value), _({ key: 0 }, d.value, {
489
- modelValue: r.value,
490
- "onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
491
- onChange: F
492
- }), le({ _: 2 }, [
493
- j(z(e.formItem.prop) ?? [], (c, b) => ({
494
- name: c.slotName,
495
- fn: w((O) => [
496
- (v(), y(D(c.slotFn), _({
497
- value: r.value,
498
- form: e.formData,
499
- "form-item": e.formItem
500
- }, O), null, 16, ["value", "form", "form-item"]))
1100
+ ), (s, l) => (x(), A(k(bt), ue(ye(i.value)), Ne({
1101
+ default: B(() => [
1102
+ e.formItem.compType !== "custom" ? (x(), A(H(v.value), de({ key: 0 }, j.value, {
1103
+ modelValue: o.value,
1104
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => o.value = h),
1105
+ onChange: w
1106
+ }), Ne({ _: 2 }, [
1107
+ _e(W(e.formItem.prop) ?? [], (h, C) => ({
1108
+ name: h.slotName,
1109
+ fn: B((S) => [
1110
+ (x(), A(H(h.slotFn), ue(ye({ value: o.value, form: e.formData, formItem: e.formItem, ...S })), null, 16))
501
1111
  ])
502
1112
  }))
503
- ]), 1040, ["modelValue"])) : ce(a.$slots, e.formItem.prop, {
504
- key: 1,
505
- value: r.value,
506
- form: e.formData,
507
- formItem: e.formItem
508
- })
1113
+ ]), 1040, ["modelValue"])) : (x(), R(fe, { key: 1 }, [
1114
+ P(e.formItem.prop) ? (x(), A(H(P(e.formItem.prop)), {
1115
+ key: 0,
1116
+ value: o.value,
1117
+ form: e.formData,
1118
+ "form-item": e.formItem
1119
+ }, null, 8, ["value", "form", "form-item"])) : ht("", !0)
1120
+ ], 64))
509
1121
  ]),
510
1122
  _: 2
511
1123
  }, [
512
- j(x.value, (c, b) => ({
513
- name: c.slotName,
514
- fn: w((O) => [
515
- (v(), y(D(c.slotFn), _({
516
- value: r.value,
517
- form: e.formData,
518
- "form-item": e.formItem
519
- }, O), null, 16, ["value", "form", "form-item"]))
1124
+ _e(u.value, (h, C) => ({
1125
+ name: h.slotName,
1126
+ fn: B((S) => [
1127
+ h.slotName === "error" ? (x(), R("span", Pi, [
1128
+ (x(), A(H(h.slotFn), ue(ye({ value: o.value, form: e.formData, formItem: e.formItem, ...S })), null, 16))
1129
+ ])) : (x(), A(H(h.slotFn), ue(de({ key: 1 }, { value: o.value, form: e.formData, formItem: e.formItem, ...S })), null, 16))
520
1130
  ])
521
1131
  }))
522
1132
  ]), 1040));
523
1133
  }
524
- }), St = /* @__PURE__ */ L({
1134
+ }), Fi = /* @__PURE__ */ re({
525
1135
  name: "WForm",
526
1136
  __name: "Form",
527
- props: /* @__PURE__ */ J({
1137
+ props: /* @__PURE__ */ je({
528
1138
  formItems: {},
529
- rowAttrs: { default: () => ({}) },
1139
+ rowProps: { default: () => ({}) },
530
1140
  actionConfig: { default: () => ({}) },
531
1141
  model: { default: () => ({}) },
532
1142
  rules: {},
@@ -547,218 +1157,193 @@ const ue = /* @__PURE__ */ L({
547
1157
  expanded: { type: Boolean, default: !1 },
548
1158
  expandedModifiers: {}
549
1159
  }),
550
- emits: /* @__PURE__ */ J(["validate", "change", "action", "search", "reset", "submit", "cancel", "expand"], ["update:expanded"]),
551
- setup(e, { expose: s, emit: t }) {
552
- const i = e, r = t, g = Te();
553
- function x(n, o) {
554
- return n.startsWith("on") && typeof o == "function";
1160
+ emits: /* @__PURE__ */ je(["validate", "change", "action", "search", "reset", "submit", "cancel", "expand"], ["update:expanded"]),
1161
+ setup(e, { expose: t, emit: r }) {
1162
+ const n = e, o = r, i = qt();
1163
+ function u(a, c) {
1164
+ return a.startsWith("on") && typeof c == "function";
555
1165
  }
556
- const k = p(() => Object.fromEntries(
557
- Object.entries(g).filter(([n, o]) => x(n, o))
558
- )), E = p(() => {
559
- const { formItems: n, actionConfig: o, rowAttrs: l, ...C } = i, T = Object.fromEntries(
560
- Object.entries(g).filter(([U, Ce]) => !x(U, Ce))
1166
+ const v = O(() => Object.fromEntries(
1167
+ Object.entries(i).filter(([a, c]) => u(a, c))
1168
+ )), m = O(() => {
1169
+ const { formItems: a, actionConfig: c, rowProps: p, ...E } = n, G = Object.fromEntries(
1170
+ Object.entries(i).filter(([$e, Nt]) => !u($e, Nt))
561
1171
  );
562
- return { ...C, ...Ct, ...T };
563
- }), I = fe(e, "expanded");
564
- Q(
565
- I,
566
- (n) => {
567
- r("expand", n);
1172
+ return { ...E, ...Ur, ...G };
1173
+ }), d = yt(e, "expanded");
1174
+ Oe(
1175
+ d,
1176
+ (a) => {
1177
+ o("expand", a);
568
1178
  }
569
1179
  );
570
- const A = p(() => E.value.inline ? wt(i.actionConfig?.buttons, "expand") : !1), f = p(() => {
571
- if (!A.value)
1180
+ const I = O(() => m.value.inline ? zr(n.actionConfig?.buttons, "expand") : !1), g = O(() => {
1181
+ if (!I.value)
572
1182
  return !1;
573
- const n = i.actionConfig?.expand;
574
- return n ? n.autoExpandOnHover === !0 : !1;
575
- }), { onMouseEnter: m, onMouseLeave: h, recordManualToggle: F } = at(
576
- I,
577
- f,
578
- (n) => {
579
- I.value = n;
1183
+ const a = n.actionConfig?.expand;
1184
+ return a ? a.autoExpandOnHover === !0 : !1;
1185
+ }), { onMouseEnter: _, onMouseLeave: f, recordManualToggle: w } = wr(
1186
+ d,
1187
+ g,
1188
+ (a) => {
1189
+ d.value = a;
580
1190
  }
581
- ), d = Y();
582
- function z(n) {
583
- const o = n ?? !I.value;
584
- I.value = o, F();
585
- const l = i.actionConfig?.expand;
586
- l?.scrollOnToggle && q(() => {
587
- setTimeout(() => d.value?.$el?.scrollIntoView?.(l.scrollIntoViewOptions ?? pt), 250);
1191
+ ), j = xe();
1192
+ function W(a) {
1193
+ const c = a ?? !d.value;
1194
+ d.value = c, w();
1195
+ const p = n.actionConfig?.expand;
1196
+ p?.scrollOnToggle && le(() => {
1197
+ setTimeout(() => j.value?.$el?.scrollIntoView?.(p.scrollIntoViewOptions ?? Tt), 250);
588
1198
  });
589
1199
  }
590
- const V = p(() => {
591
- const { span: n } = i.rowAttrs;
592
- return i.formItems.filter((o) => Z({ condition: o.vIf, data: i.model, defaultValue: !0 })).map((o) => {
593
- const { colAttrs: l = {} } = o ?? {};
594
- return { ...o, colAttrs: { ...l, span: l.span ?? n } };
1200
+ const P = O(() => {
1201
+ const { span: a } = n.rowProps;
1202
+ return n.formItems.filter((c) => Le({ condition: c.vIf, data: n.model, defaultValue: !0 })).map((c) => {
1203
+ const { colProps: p = {} } = c ?? {};
1204
+ return { ...c, colProps: { ...p, span: p.span ?? a } };
595
1205
  });
596
- }), B = p(() => V.value.map((n, o) => ({ ...n, _originalIndex: o })).filter((n) => {
597
- const o = n._originalIndex;
598
- return A.value ? !P(n, o) : !0;
599
- }));
600
- function P(n, o) {
601
- if (!A.value || I.value)
1206
+ }), K = O(() => {
1207
+ const a = P.value.map((c, p) => ({ ...c, _originalIndex: p }));
1208
+ return I.value ? a.filter((c) => !N(c, c._originalIndex)) : a;
1209
+ });
1210
+ function N(a, c) {
1211
+ if (!I.value || d.value)
602
1212
  return !1;
603
- const l = i.actionConfig?.expand;
604
- return l ? !!("exclude" in l && l.exclude.length > 0 && l.exclude.includes(n.prop) || "include" in l && l.include.length > 0 && !l.include.includes(n.prop) || "count" in l && o >= l.count) : !1;
1213
+ const p = n.actionConfig?.expand;
1214
+ return p ? !!("exclude" in p && p.exclude.length > 0 && p.exclude.includes(a.prop) || "include" in p && p.include.length > 0 && !p.include.includes(a.prop) || "count" in p && c >= p.count) : !1;
605
1215
  }
606
- const H = ke();
607
- function G(n) {
608
- return Object.keys(H).filter((o) => o.startsWith(n)).map((o) => ({
609
- rawSlotName: o,
610
- slotName: o.replace(n, ""),
611
- slotFn: H[o]
1216
+ const V = Xt();
1217
+ function L(a) {
1218
+ return Object.keys(V).filter((c) => c.startsWith(a)).map((c) => ({
1219
+ rawSlotName: c,
1220
+ slotName: c.replace(a, ""),
1221
+ slotFn: V[c]
612
1222
  }));
613
1223
  }
614
- const W = p(() => {
615
- const n = G("form-item-"), o = /* @__PURE__ */ new Map();
616
- for (const l of V.value) {
617
- const C = G(`${l.prop}-`);
618
- C.length > 0 && o.set(l.prop, C);
619
- }
620
- return { formItemSlots: n, dynamicComponentSlots: o };
621
- }), K = p(() => Object.keys(i.rowAttrs ?? {}).length > 0), N = p(() => ({
622
- row: E.value.inline || K.value ? ot : "div",
623
- col: K.value ? nt : "div"
624
- })), a = p(() => i.formItems.map((n) => n.prop)), u = p(() => {
625
- if (!A.value)
626
- return [];
627
- const n = i.actionConfig?.expand;
628
- return n ? V.value.map((o, l) => ({ field: o, index: l })).filter(({ field: o, index: l }) => !!("exclude" in n && n.exclude.includes(o.prop) || "include" in n && !n.include.includes(o.prop) || "count" in n && l >= n.count)).map(({ field: o }) => o.prop) : [];
629
- }), c = Y({});
630
- function b() {
631
- c.value = {};
632
- for (const n of u.value) {
633
- const o = i.model[n];
634
- c.value[n] = se(o);
1224
+ const y = O(() => {
1225
+ const a = L("form-item-"), c = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
1226
+ for (const E of P.value) {
1227
+ const G = L(`${E.prop}-`);
1228
+ G.length > 0 && c.set(E.prop, G), E.compType === "custom" && V[E.prop] && p.set(E.prop, [{
1229
+ rawSlotName: E.prop,
1230
+ slotName: E.prop,
1231
+ slotFn: V[E.prop]
1232
+ }]);
635
1233
  }
1234
+ return { formItemSlots: a, dynamicComponentSlots: c, customComponentSlots: p };
1235
+ }), $ = O(() => Object.keys(n.rowProps ?? {}).length > 0), F = O(() => ({
1236
+ row: m.value.inline || $.value ? xr : "div",
1237
+ col: $.value ? jr : "div"
1238
+ })), Z = O(() => n.formItems.map((a) => a.prop)), Q = O(() => I.value ? n.actionConfig?.expand ? P.value.filter((c, p) => N(c, p)).map((c) => c.prop) : [] : []), s = xe({});
1239
+ function l() {
1240
+ s.value = Object.fromEntries(
1241
+ Q.value.map((a) => [a, dt(n.model[a])])
1242
+ );
636
1243
  }
637
- const O = Ot(b, 100);
638
- function R() {
639
- const n = {};
640
- for (const o of u.value) {
641
- const l = c.value[o];
642
- n[o] = l != null ? se(l) : void 0;
643
- }
644
- return n;
1244
+ function h() {
1245
+ return Object.fromEntries(
1246
+ Q.value.map((a) => {
1247
+ const c = s.value[a];
1248
+ return [a, c != null ? dt(c) : void 0];
1249
+ })
1250
+ );
645
1251
  }
646
- function xe() {
647
- d.value?.clearValidate?.(u.value);
648
- const n = a.value.filter((o) => !u.value.includes(o));
649
- n.length > 0 && d.value?.resetFields?.(n);
1252
+ function C() {
1253
+ j.value?.clearValidate?.(Q.value);
1254
+ const a = Z.value.filter((c) => !Q.value.includes(c));
1255
+ a.length > 0 && j.value?.resetFields?.(a);
650
1256
  }
651
- async function Ie({ eventName: n }) {
652
- const o = ["submit", "search"], l = ["cancel", "reset"];
653
- if (n === "expand") {
654
- z(), r("action", n, I.value);
1257
+ async function S({ eventName: a }) {
1258
+ const c = ["submit", "search"], p = ["cancel", "reset"];
1259
+ if (a === "expand") {
1260
+ W(), o("action", a, d.value);
655
1261
  return;
656
1262
  }
657
- if (o.includes(n) && await d.value?.validate?.(), l.includes(n)) {
658
- if (n === "reset") {
659
- const C = R();
660
- xe(), r("reset", C), r("action", n, C);
1263
+ if (c.includes(a) && await j.value?.validate?.(), p.includes(a)) {
1264
+ if (a === "reset") {
1265
+ const E = h();
1266
+ C(), o("reset", E), o("action", a, E);
661
1267
  return;
662
1268
  }
663
- d.value?.resetFields?.();
1269
+ j.value?.resetFields?.();
664
1270
  }
665
- r(n), r("action", n);
1271
+ o(a), o("action", a);
666
1272
  }
667
- function Ee(n, o, l) {
668
- r("validate", n, o, l);
1273
+ function z(a, c, p) {
1274
+ o("validate", a, c, p);
669
1275
  }
670
- return s({
1276
+ t({
671
1277
  // element-plus form exposes
672
1278
  get fields() {
673
- return d.value?.fields;
1279
+ return j.value?.fields;
674
1280
  },
675
- getField: (n) => d.value?.getField?.(n),
676
- validate: () => d.value?.validate?.(),
677
- validateField: (n) => d.value?.validateField?.(n),
678
- resetFields: (n) => d.value?.resetFields?.(n),
679
- clearValidate: (n) => d.value?.clearValidate?.(n),
680
- scrollToField: (n) => d.value?.scrollToField?.(n),
1281
+ getField: (a) => j.value?.getField?.(a),
1282
+ validate: () => j.value?.validate?.(),
1283
+ validateField: (a) => j.value?.validateField?.(a),
1284
+ resetFields: (a) => j.value?.resetFields?.(a),
1285
+ clearValidate: (a) => j.value?.clearValidate?.(a),
1286
+ scrollToField: (a) => j.value?.scrollToField?.(a),
681
1287
  // 展开/折叠控制方法
682
1288
  get expanded() {
683
- return I.value;
684
- },
685
- toggleExpand: z
686
- }), Fe(() => {
687
- b();
688
- }), Q(
689
- [() => i.formItems, () => i.actionConfig?.expand],
690
- () => {
691
- O();
1289
+ return d.value;
692
1290
  },
1291
+ toggleExpand: W
1292
+ });
1293
+ const se = Ei(l, 100);
1294
+ return Yt(() => l()), Oe(
1295
+ [() => n.formItems, () => n.actionConfig?.expand],
1296
+ se,
693
1297
  { deep: !0 }
694
- ), (n, o) => (v(), y(S(rt), _({
1298
+ ), (a, c) => (x(), A(k(Or), de({
695
1299
  ref_key: "formRef",
696
- ref: d
697
- }, E.value, {
1300
+ ref: j
1301
+ }, m.value, {
698
1302
  model: e.model,
699
- onValidate: Ee,
700
- onSubmit: o[2] || (o[2] = Me(() => {
1303
+ onValidate: z,
1304
+ onSubmit: c[1] || (c[1] = Jt(() => {
701
1305
  }, ["prevent"]))
702
1306
  }), {
703
- default: w(() => [
704
- (v(), y(D(N.value.row), me(de(e.rowAttrs)), {
705
- default: w(() => [
706
- A.value ? (v(), y(_e, {
707
- key: 0,
1307
+ default: B(() => [
1308
+ (x(), A(H(F.value.row), ue(ye(e.rowProps)), {
1309
+ default: B(() => [
1310
+ ve(Zt, {
708
1311
  name: "form-item",
709
1312
  tag: "div",
710
1313
  class: "form-items-transition"
711
1314
  }, {
712
- default: w(() => [
713
- (v(!0), M($, null, j(B.value, (l, C) => ne((v(), y(D(N.value.col), _({
714
- key: `${l.prop}-${l._originalIndex ?? C}`
715
- }, { ref_for: !0 }, l.colAttrs), {
716
- default: w(() => [
717
- X(ue, {
718
- modelValue: e.model[l.prop],
719
- "onUpdate:modelValue": (T) => e.model[l.prop] = T,
720
- "form-item": l,
1315
+ default: B(() => [
1316
+ (x(!0), R(fe, null, _e(K.value, (p, E) => gt((x(), A(H(F.value.col), de({
1317
+ key: `${p.prop}-${p._originalIndex ?? E}`
1318
+ }, { ref_for: !0 }, p.colProps), {
1319
+ default: B(() => [
1320
+ ve(Mi, {
1321
+ modelValue: e.model[p.prop],
1322
+ "onUpdate:modelValue": (G) => e.model[p.prop] = G,
1323
+ "form-item": p,
721
1324
  "form-data": e.model,
722
- "dynamic-comp-events": k.value,
723
- "form-slots": W.value,
724
- index: l._originalIndex ?? C,
725
- onChange: o[0] || (o[0] = (T, U) => r("change", T, U))
1325
+ "dynamic-comp-events": v.value,
1326
+ "form-slots": y.value,
1327
+ index: p._originalIndex ?? E,
1328
+ onChange: c[0] || (c[0] = (G, $e) => o("change", G, $e))
726
1329
  }, null, 8, ["modelValue", "onUpdate:modelValue", "form-item", "form-data", "dynamic-comp-events", "form-slots", "index"])
727
1330
  ]),
728
1331
  _: 2
729
1332
  }, 1040)), [
730
- [oe, S(Z)({ condition: l.vShow, data: i.model, defaultValue: !0 })]
1333
+ [vt, k(Le)({ condition: p.vShow, data: n.model, defaultValue: !0 })]
731
1334
  ])), 128))
732
1335
  ]),
733
1336
  _: 1
734
- })) : (v(!0), M($, { key: 1 }, j(B.value, (l, C) => ne((v(), y(D(N.value.col), _({
735
- key: `${l.prop}-${l._originalIndex ?? C}`
736
- }, { ref_for: !0 }, l.colAttrs), {
737
- default: w(() => [
738
- X(ue, {
739
- modelValue: e.model[l.prop],
740
- "onUpdate:modelValue": (T) => e.model[l.prop] = T,
741
- "form-item": l,
742
- "form-data": e.model,
743
- "dynamic-comp-events": k.value,
744
- "form-slots": W.value,
745
- index: l._originalIndex ?? C,
746
- onChange: o[1] || (o[1] = (T, U) => r("change", T, U))
747
- }, null, 8, ["modelValue", "onUpdate:modelValue", "form-item", "form-data", "dynamic-comp-events", "form-slots", "index"])
748
- ]),
749
- _: 2
750
- }, 1040)), [
751
- [oe, S(Z)({ condition: l.vShow, data: i.model, defaultValue: !0 })]
752
- ])), 128)),
753
- X(At, {
754
- inline: E.value.inline,
755
- "action-slot": n.$slots.action,
1337
+ }),
1338
+ ve(Lr, {
1339
+ inline: m.value.inline,
1340
+ "action-slot": a.$slots.action,
756
1341
  config: e.actionConfig,
757
- expanded: I.value,
758
- "auto-expand-on-hover": f.value,
759
- "on-mouse-enter": S(m),
760
- "on-mouse-leave": S(h),
761
- onAction: Ie
1342
+ expanded: d.value,
1343
+ "auto-expand-on-hover": g.value,
1344
+ "on-mouse-enter": k(_),
1345
+ "on-mouse-leave": k(f),
1346
+ onAction: S
762
1347
  }, null, 8, ["inline", "action-slot", "config", "expanded", "auto-expand-on-hover", "on-mouse-enter", "on-mouse-leave"])
763
1348
  ]),
764
1349
  _: 1
@@ -767,8 +1352,8 @@ const ue = /* @__PURE__ */ L({
767
1352
  _: 1
768
1353
  }, 16, ["model"]));
769
1354
  }
770
- }), Ft = /* @__PURE__ */ ge(St, [["__scopeId", "data-v-b241f6ca"]]);
1355
+ }), ki = /* @__PURE__ */ _t(Fi, [["__scopeId", "data-v-0341daa6"]]);
771
1356
  export {
772
- Ft as WForm,
773
- Ft as default
1357
+ ki as WForm,
1358
+ ki as default
774
1359
  };