@harbor-design/proform 1.3.18 → 1.3.20

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 (2) hide show
  1. package/dist/index.js +487 -471
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Te = Object.defineProperty;
2
- var ze = (t, e, r) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var u = (t, e, r) => (ze(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { ref as z, readonly as Pe, nextTick as O, isRef as F, watch as g, isReactive as U, toRaw as E, reactive as K, createVNode as b, mergeProps as q, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as He } from "vue";
2
+ var ze = (r, e, t) => e in r ? Te(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var u = (r, e, t) => (ze(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { ref as z, readonly as Pe, nextTick as j, isRef as O, watch as g, isReactive as F, toRaw as R, reactive as K, createVNode as b, mergeProps as U, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as He } from "vue";
5
5
  class o {
6
6
  static typeChecker(e) {
7
7
  return {}.toString.call(e);
@@ -50,17 +50,17 @@ class o {
50
50
  return !1;
51
51
  if (this.isObjectEmpty(e))
52
52
  return !0;
53
- for (const r in e) {
54
- if (r === "componentProps")
53
+ for (const t in e) {
54
+ if (t === "componentProps")
55
55
  return !1;
56
- if (e.hasOwnProperty(r) && this.isProcessInprogress(e[r]))
56
+ if (e.hasOwnProperty(t) && this.isProcessInprogress(e[t]))
57
57
  return !0;
58
58
  }
59
59
  } else if (this.isArray(e)) {
60
60
  if (this.isArrayEmpty(e))
61
61
  return !0;
62
- for (const r of e)
63
- if (this.isProcessInprogress(r))
62
+ for (const t of e)
63
+ if (this.isProcessInprogress(t))
64
64
  return !0;
65
65
  }
66
66
  return !1;
@@ -69,20 +69,20 @@ class o {
69
69
  return !!e.__proform_raw_object;
70
70
  }
71
71
  }
72
- function h(t, ...e) {
73
- return e.forEach((r) => {
74
- if (Array.isArray(r))
75
- Array.isArray(t) || (t = []), r.forEach((i, s) => {
76
- typeof i == "object" && i !== null ? t[s] = h(Array.isArray(i) ? [] : {}, i) : t[s] = i;
72
+ function h(r, ...e) {
73
+ return e.forEach((t) => {
74
+ if (Array.isArray(t))
75
+ Array.isArray(r) || (r = []), t.forEach((i, s) => {
76
+ typeof i == "object" && i !== null ? r[s] = h(Array.isArray(i) ? [] : {}, i) : r[s] = i;
77
77
  });
78
78
  else
79
- for (const i in r)
80
- r.hasOwnProperty(i) && (typeof r[i] == "object" && r[i] !== null ? t[i] = h(t[i] || {}, r[i]) : t[i] = r[i]);
81
- }), t;
79
+ for (const i in t)
80
+ t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = h(r[i] || {}, t[i]) : r[i] = t[i]);
81
+ }), r;
82
82
  }
83
- function P(t) {
83
+ function P(r) {
84
84
  const e = /* @__PURE__ */ new WeakMap();
85
- function r(i) {
85
+ function t(i) {
86
86
  if (i === null || typeof i != "object")
87
87
  return i;
88
88
  if (i instanceof Date)
@@ -92,13 +92,13 @@ function P(t) {
92
92
  if (i instanceof Map) {
93
93
  const n = /* @__PURE__ */ new Map();
94
94
  for (const [a, l] of i)
95
- n.set(r(a), r(l));
95
+ n.set(t(a), t(l));
96
96
  return n;
97
97
  }
98
98
  if (i instanceof Set) {
99
99
  const n = /* @__PURE__ */ new Set();
100
100
  for (const a of i)
101
- n.add(r(a));
101
+ n.add(t(a));
102
102
  return n;
103
103
  }
104
104
  if (e.has(i))
@@ -107,19 +107,19 @@ function P(t) {
107
107
  const n = [];
108
108
  e.set(i, n);
109
109
  for (let a = 0; a < i.length; a++)
110
- n[a] = r(i[a]);
110
+ n[a] = t(i[a]);
111
111
  return n;
112
112
  }
113
113
  const s = Object.create(Object.getPrototypeOf(i));
114
114
  e.set(i, s);
115
115
  for (const n in i)
116
- i.hasOwnProperty(n) && (s[n] = r(i[n]));
116
+ i.hasOwnProperty(n) && (s[n] = t(i[n]));
117
117
  return s;
118
118
  }
119
- return r(t);
119
+ return t(r);
120
120
  }
121
- function Y(t, e) {
122
- return t.replace(/undefined/g, e);
121
+ function Y(r, e) {
122
+ return r.replace(/undefined/g, e);
123
123
  }
124
124
  class Ke {
125
125
  constructor(e) {
@@ -129,8 +129,8 @@ class Ke {
129
129
  }
130
130
  // happy path, 后续可以完善更多的 fallback 处理,fallback 处理是为了不卡住异步时的首次渲染做的优化
131
131
  cleanFallbackFields(e) {
132
- return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((r) => {
133
- this.cleanFallbackFields(r);
132
+ return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((t) => {
133
+ this.cleanFallbackFields(t);
134
134
  })), e;
135
135
  }
136
136
  setup(e) {
@@ -138,14 +138,14 @@ class Ke {
138
138
  }
139
139
  submit() {
140
140
  var i;
141
- const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r = C.adapters[c.getUI(this.runtimeCore.ui)];
142
- return (e == null ? void 0 : e.validateForm(this)) ?? (r == null ? void 0 : r.validateForm(this));
141
+ const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.runtimeCore.ui)];
142
+ return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
143
143
  }
144
144
  hydrate(e) {
145
- O(() => {
145
+ j(() => {
146
146
  this.runtimeCore.hydrateEffect.trackEffect(
147
147
  () => {
148
- F(e) ? g(
148
+ O(e) ? g(
149
149
  () => e.value,
150
150
  () => {
151
151
  h(this.runtimeCore.model.value, e.value);
@@ -154,7 +154,7 @@ class Ke {
154
154
  deep: !0,
155
155
  immediate: !0
156
156
  }
157
- ) : U(e) ? g(
157
+ ) : F(e) ? g(
158
158
  () => e,
159
159
  () => {
160
160
  h(this.runtimeCore.model.value, e);
@@ -172,8 +172,8 @@ class Ke {
172
172
  });
173
173
  }
174
174
  share(e) {
175
- O(() => {
176
- F(e) ? g(
175
+ j(() => {
176
+ O(e) ? g(
177
177
  () => e.value,
178
178
  () => {
179
179
  h(this.runtimeCore.shared, e.value);
@@ -182,23 +182,32 @@ class Ke {
182
182
  deep: !0,
183
183
  immediate: !0
184
184
  }
185
- ) : Object.keys(e).forEach((r) => {
186
- F(e[r]) ? g(
187
- () => e[r].value,
185
+ ) : F(e) ? g(
186
+ () => e,
187
+ () => {
188
+ h(this.runtimeCore.shared, e);
189
+ },
190
+ {
191
+ deep: !0,
192
+ immediate: !0
193
+ }
194
+ ) : Object.keys(e).forEach((t) => {
195
+ O(e[t]) ? g(
196
+ () => e[t].value,
188
197
  () => {
189
198
  h(this.runtimeCore.shared, {
190
- [r]: e[r].value
199
+ [t]: e[t].value
191
200
  });
192
201
  },
193
202
  {
194
203
  deep: !0,
195
204
  immediate: !0
196
205
  }
197
- ) : U(e[r]) ? g(
198
- () => e[r],
206
+ ) : F(e[t]) ? g(
207
+ () => e[t],
199
208
  () => {
200
209
  h(this.runtimeCore.shared, {
201
- [r]: e[r]
210
+ [t]: e[t]
202
211
  });
203
212
  },
204
213
  {
@@ -206,20 +215,20 @@ class Ke {
206
215
  immediate: !0
207
216
  }
208
217
  ) : h(this.runtimeCore.shared, {
209
- [r]: e[r]
218
+ [t]: e[t]
210
219
  });
211
220
  });
212
221
  });
213
222
  }
214
223
  subscribeModel(e) {
215
- O(() => {
216
- const r = g(
224
+ j(() => {
225
+ const t = g(
217
226
  () => this.readonlyReactiveModel.value,
218
227
  (i) => {
219
228
  e(i, {
220
229
  stopSubscribe() {
221
- O(() => {
222
- r();
230
+ j(() => {
231
+ t();
223
232
  });
224
233
  }
225
234
  });
@@ -251,325 +260,325 @@ class Z {
251
260
  triggerEffects() {
252
261
  Array.from(this.effects).forEach((e) => e());
253
262
  }
254
- trackEffect(e, r = {
263
+ trackEffect(e, t = {
255
264
  lazy: !0
256
265
  }) {
257
- return !r.lazy && e(), r.identifier ? this.identifierMap.get(r.identifier) || (this.effects.add(e), this.identifierMap.set(r.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
266
+ return !t.lazy && e(), t.identifier ? this.identifierMap.get(t.identifier) || (this.effects.add(e), this.identifierMap.set(t.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
258
267
  }
259
268
  }
260
- var We = typeof global == "object" && global && global.Object === Object && global, Xe = typeof self == "object" && self && self.Object === Object && self, Q = We || Xe || Function("return this")(), R = Q.Symbol, je = Object.prototype, Ye = je.hasOwnProperty, Ze = je.toString, N = R ? R.toStringTag : void 0;
261
- function Je(t) {
262
- var e = Ye.call(t, N), r = t[N];
269
+ var We = typeof global == "object" && global && global.Object === Object && global, Xe = typeof self == "object" && self && self.Object === Object && self, Q = We || Xe || Function("return this")(), $ = Q.Symbol, je = Object.prototype, Ye = je.hasOwnProperty, Ze = je.toString, q = $ ? $.toStringTag : void 0;
270
+ function Je(r) {
271
+ var e = Ye.call(r, q), t = r[q];
263
272
  try {
264
- t[N] = void 0;
273
+ r[q] = void 0;
265
274
  var i = !0;
266
275
  } catch {
267
276
  }
268
- var s = Ze.call(t);
269
- return i && (e ? t[N] = r : delete t[N]), s;
277
+ var s = Ze.call(r);
278
+ return i && (e ? r[q] = t : delete r[q]), s;
270
279
  }
271
280
  var Qe = Object.prototype, ke = Qe.toString;
272
- function Ae(t) {
273
- return ke.call(t);
281
+ function Ae(r) {
282
+ return ke.call(r);
274
283
  }
275
- var et = "[object Null]", tt = "[object Undefined]", Ce = R ? R.toStringTag : void 0;
276
- function we(t) {
277
- return t == null ? t === void 0 ? tt : et : Ce && Ce in Object(t) ? Je(t) : Ae(t);
284
+ var et = "[object Null]", tt = "[object Undefined]", Ce = $ ? $.toStringTag : void 0;
285
+ function we(r) {
286
+ return r == null ? r === void 0 ? tt : et : Ce && Ce in Object(r) ? Je(r) : Ae(r);
278
287
  }
279
- function rt(t) {
280
- return t != null && typeof t == "object";
288
+ function rt(r) {
289
+ return r != null && typeof r == "object";
281
290
  }
282
291
  var it = "[object Symbol]";
283
- function k(t) {
284
- return typeof t == "symbol" || rt(t) && we(t) == it;
292
+ function k(r) {
293
+ return typeof r == "symbol" || rt(r) && we(r) == it;
285
294
  }
286
- function st(t, e) {
287
- for (var r = -1, i = t == null ? 0 : t.length, s = Array(i); ++r < i; )
288
- s[r] = e(t[r], r, t);
295
+ function st(r, e) {
296
+ for (var t = -1, i = r == null ? 0 : r.length, s = Array(i); ++t < i; )
297
+ s[t] = e(r[t], t, r);
289
298
  return s;
290
299
  }
291
- var A = Array.isArray, nt = 1 / 0, Ie = R ? R.prototype : void 0, Se = Ie ? Ie.toString : void 0;
292
- function Me(t) {
293
- if (typeof t == "string")
294
- return t;
295
- if (A(t))
296
- return st(t, Me) + "";
297
- if (k(t))
298
- return Se ? Se.call(t) : "";
299
- var e = t + "";
300
- return e == "0" && 1 / t == -nt ? "-0" : e;
300
+ var A = Array.isArray, nt = 1 / 0, Ie = $ ? $.prototype : void 0, Se = Ie ? Ie.toString : void 0;
301
+ function Me(r) {
302
+ if (typeof r == "string")
303
+ return r;
304
+ if (A(r))
305
+ return st(r, Me) + "";
306
+ if (k(r))
307
+ return Se ? Se.call(r) : "";
308
+ var e = r + "";
309
+ return e == "0" && 1 / r == -nt ? "-0" : e;
301
310
  }
302
- function G(t) {
303
- var e = typeof t;
304
- return t != null && (e == "object" || e == "function");
311
+ function G(r) {
312
+ var e = typeof r;
313
+ return r != null && (e == "object" || e == "function");
305
314
  }
306
315
  var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object GeneratorFunction]", ut = "[object Proxy]";
307
- function ft(t) {
308
- if (!G(t))
316
+ function ft(r) {
317
+ if (!G(r))
309
318
  return !1;
310
- var e = we(t);
319
+ var e = we(r);
311
320
  return e == at || e == lt || e == ot || e == ut;
312
321
  }
313
322
  var W = Q["__core-js_shared__"], Oe = function() {
314
- var t = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
315
- return t ? "Symbol(src)_1." + t : "";
323
+ var r = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
324
+ return r ? "Symbol(src)_1." + r : "";
316
325
  }();
317
- function ct(t) {
318
- return !!Oe && Oe in t;
326
+ function ct(r) {
327
+ return !!Oe && Oe in r;
319
328
  }
320
329
  var dt = Function.prototype, pt = dt.toString;
321
- function ht(t) {
322
- if (t != null) {
330
+ function ht(r) {
331
+ if (r != null) {
323
332
  try {
324
- return pt.call(t);
333
+ return pt.call(r);
325
334
  } catch {
326
335
  }
327
336
  try {
328
- return t + "";
337
+ return r + "";
329
338
  } catch {
330
339
  }
331
340
  }
332
341
  return "";
333
342
  }
334
- var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, vt = Function.prototype, gt = Object.prototype, yt = vt.toString, _t = gt.hasOwnProperty, Pt = RegExp(
343
+ var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, gt = Function.prototype, vt = Object.prototype, yt = gt.toString, _t = vt.hasOwnProperty, Pt = RegExp(
335
344
  "^" + yt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
336
345
  );
337
- function Ct(t) {
338
- if (!G(t) || ct(t))
346
+ function Ct(r) {
347
+ if (!G(r) || ct(r))
339
348
  return !1;
340
- var e = ft(t) ? Pt : bt;
341
- return e.test(ht(t));
349
+ var e = ft(r) ? Pt : bt;
350
+ return e.test(ht(r));
342
351
  }
343
- function It(t, e) {
344
- return t == null ? void 0 : t[e];
352
+ function It(r, e) {
353
+ return r == null ? void 0 : r[e];
345
354
  }
346
- function ee(t, e) {
347
- var r = It(t, e);
348
- return Ct(r) ? r : void 0;
355
+ function ee(r, e) {
356
+ var t = It(r, e);
357
+ return Ct(t) ? t : void 0;
349
358
  }
350
359
  var Fe = function() {
351
360
  try {
352
- var t = ee(Object, "defineProperty");
353
- return t({}, "", {}), t;
361
+ var r = ee(Object, "defineProperty");
362
+ return r({}, "", {}), r;
354
363
  } catch {
355
364
  }
356
365
  }(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
357
- function Ft(t, e) {
358
- var r = typeof t;
359
- return e = e ?? St, !!e && (r == "number" || r != "symbol" && Ot.test(t)) && t > -1 && t % 1 == 0 && t < e;
366
+ function Ft(r, e) {
367
+ var t = typeof r;
368
+ return e = e ?? St, !!e && (t == "number" || t != "symbol" && Ot.test(r)) && r > -1 && r % 1 == 0 && r < e;
360
369
  }
361
- function jt(t, e, r) {
362
- e == "__proto__" && Fe ? Fe(t, e, {
370
+ function jt(r, e, t) {
371
+ e == "__proto__" && Fe ? Fe(r, e, {
363
372
  configurable: !0,
364
373
  enumerable: !0,
365
- value: r,
374
+ value: t,
366
375
  writable: !0
367
- }) : t[e] = r;
376
+ }) : r[e] = t;
368
377
  }
369
- function xe(t, e) {
370
- return t === e || t !== t && e !== e;
378
+ function xe(r, e) {
379
+ return r === e || r !== r && e !== e;
371
380
  }
372
381
  var wt = Object.prototype, Mt = wt.hasOwnProperty;
373
- function xt(t, e, r) {
374
- var i = t[e];
375
- (!(Mt.call(t, e) && xe(i, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
382
+ function xt(r, e, t) {
383
+ var i = r[e];
384
+ (!(Mt.call(r, e) && xe(i, t)) || t === void 0 && !(e in r)) && jt(r, e, t);
376
385
  }
377
386
  var Et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
378
- function $t(t, e) {
379
- if (A(t))
387
+ function $t(r, e) {
388
+ if (A(r))
380
389
  return !1;
381
- var r = typeof t;
382
- return r == "number" || r == "symbol" || r == "boolean" || t == null || k(t) ? !0 : Rt.test(t) || !Et.test(t) || e != null && t in Object(e);
390
+ var t = typeof r;
391
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || k(r) ? !0 : Rt.test(r) || !Et.test(r) || e != null && r in Object(e);
383
392
  }
384
393
  var T = ee(Object, "create");
385
394
  function Vt() {
386
395
  this.__data__ = T ? T(null) : {}, this.size = 0;
387
396
  }
388
- function Nt(t) {
389
- var e = this.has(t) && delete this.__data__[t];
397
+ function Nt(r) {
398
+ var e = this.has(r) && delete this.__data__[r];
390
399
  return this.size -= e ? 1 : 0, e;
391
400
  }
392
401
  var qt = "__lodash_hash_undefined__", Ut = Object.prototype, Tt = Ut.hasOwnProperty;
393
- function zt(t) {
402
+ function zt(r) {
394
403
  var e = this.__data__;
395
404
  if (T) {
396
- var r = e[t];
397
- return r === qt ? void 0 : r;
405
+ var t = e[r];
406
+ return t === qt ? void 0 : t;
398
407
  }
399
- return Tt.call(e, t) ? e[t] : void 0;
408
+ return Tt.call(e, r) ? e[r] : void 0;
400
409
  }
401
410
  var Lt = Object.prototype, Dt = Lt.hasOwnProperty;
402
- function Gt(t) {
411
+ function Gt(r) {
403
412
  var e = this.__data__;
404
- return T ? e[t] !== void 0 : Dt.call(e, t);
413
+ return T ? e[r] !== void 0 : Dt.call(e, r);
405
414
  }
406
415
  var Bt = "__lodash_hash_undefined__";
407
- function Ht(t, e) {
408
- var r = this.__data__;
409
- return this.size += this.has(t) ? 0 : 1, r[t] = T && e === void 0 ? Bt : e, this;
410
- }
411
- function j(t) {
412
- var e = -1, r = t == null ? 0 : t.length;
413
- for (this.clear(); ++e < r; ) {
414
- var i = t[e];
416
+ function Ht(r, e) {
417
+ var t = this.__data__;
418
+ return this.size += this.has(r) ? 0 : 1, t[r] = T && e === void 0 ? Bt : e, this;
419
+ }
420
+ function w(r) {
421
+ var e = -1, t = r == null ? 0 : r.length;
422
+ for (this.clear(); ++e < t; ) {
423
+ var i = r[e];
415
424
  this.set(i[0], i[1]);
416
425
  }
417
426
  }
418
- j.prototype.clear = Vt;
419
- j.prototype.delete = Nt;
420
- j.prototype.get = zt;
421
- j.prototype.has = Gt;
422
- j.prototype.set = Ht;
427
+ w.prototype.clear = Vt;
428
+ w.prototype.delete = Nt;
429
+ w.prototype.get = zt;
430
+ w.prototype.has = Gt;
431
+ w.prototype.set = Ht;
423
432
  function Kt() {
424
433
  this.__data__ = [], this.size = 0;
425
434
  }
426
- function B(t, e) {
427
- for (var r = t.length; r--; )
428
- if (xe(t[r][0], e))
429
- return r;
435
+ function B(r, e) {
436
+ for (var t = r.length; t--; )
437
+ if (xe(r[t][0], e))
438
+ return t;
430
439
  return -1;
431
440
  }
432
441
  var Wt = Array.prototype, Xt = Wt.splice;
433
- function Yt(t) {
434
- var e = this.__data__, r = B(e, t);
435
- if (r < 0)
442
+ function Yt(r) {
443
+ var e = this.__data__, t = B(e, r);
444
+ if (t < 0)
436
445
  return !1;
437
446
  var i = e.length - 1;
438
- return r == i ? e.pop() : Xt.call(e, r, 1), --this.size, !0;
447
+ return t == i ? e.pop() : Xt.call(e, t, 1), --this.size, !0;
439
448
  }
440
- function Zt(t) {
441
- var e = this.__data__, r = B(e, t);
442
- return r < 0 ? void 0 : e[r][1];
449
+ function Zt(r) {
450
+ var e = this.__data__, t = B(e, r);
451
+ return t < 0 ? void 0 : e[t][1];
443
452
  }
444
- function Jt(t) {
445
- return B(this.__data__, t) > -1;
453
+ function Jt(r) {
454
+ return B(this.__data__, r) > -1;
446
455
  }
447
- function Qt(t, e) {
448
- var r = this.__data__, i = B(r, t);
449
- return i < 0 ? (++this.size, r.push([t, e])) : r[i][1] = e, this;
456
+ function Qt(r, e) {
457
+ var t = this.__data__, i = B(t, r);
458
+ return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
450
459
  }
451
- function $(t) {
452
- var e = -1, r = t == null ? 0 : t.length;
453
- for (this.clear(); ++e < r; ) {
454
- var i = t[e];
460
+ function V(r) {
461
+ var e = -1, t = r == null ? 0 : r.length;
462
+ for (this.clear(); ++e < t; ) {
463
+ var i = r[e];
455
464
  this.set(i[0], i[1]);
456
465
  }
457
466
  }
458
- $.prototype.clear = Kt;
459
- $.prototype.delete = Yt;
460
- $.prototype.get = Zt;
461
- $.prototype.has = Jt;
462
- $.prototype.set = Qt;
467
+ V.prototype.clear = Kt;
468
+ V.prototype.delete = Yt;
469
+ V.prototype.get = Zt;
470
+ V.prototype.has = Jt;
471
+ V.prototype.set = Qt;
463
472
  var kt = ee(Q, "Map");
464
473
  function At() {
465
474
  this.size = 0, this.__data__ = {
466
- hash: new j(),
467
- map: new (kt || $)(),
468
- string: new j()
475
+ hash: new w(),
476
+ map: new (kt || V)(),
477
+ string: new w()
469
478
  };
470
479
  }
471
- function er(t) {
472
- var e = typeof t;
473
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
480
+ function er(r) {
481
+ var e = typeof r;
482
+ return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
474
483
  }
475
- function H(t, e) {
476
- var r = t.__data__;
477
- return er(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
484
+ function H(r, e) {
485
+ var t = r.__data__;
486
+ return er(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
478
487
  }
479
- function tr(t) {
480
- var e = H(this, t).delete(t);
488
+ function tr(r) {
489
+ var e = H(this, r).delete(r);
481
490
  return this.size -= e ? 1 : 0, e;
482
491
  }
483
- function rr(t) {
484
- return H(this, t).get(t);
492
+ function rr(r) {
493
+ return H(this, r).get(r);
485
494
  }
486
- function ir(t) {
487
- return H(this, t).has(t);
495
+ function ir(r) {
496
+ return H(this, r).has(r);
488
497
  }
489
- function sr(t, e) {
490
- var r = H(this, t), i = r.size;
491
- return r.set(t, e), this.size += r.size == i ? 0 : 1, this;
498
+ function sr(r, e) {
499
+ var t = H(this, r), i = t.size;
500
+ return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
492
501
  }
493
- function w(t) {
494
- var e = -1, r = t == null ? 0 : t.length;
495
- for (this.clear(); ++e < r; ) {
496
- var i = t[e];
502
+ function M(r) {
503
+ var e = -1, t = r == null ? 0 : r.length;
504
+ for (this.clear(); ++e < t; ) {
505
+ var i = r[e];
497
506
  this.set(i[0], i[1]);
498
507
  }
499
508
  }
500
- w.prototype.clear = At;
501
- w.prototype.delete = tr;
502
- w.prototype.get = rr;
503
- w.prototype.has = ir;
504
- w.prototype.set = sr;
509
+ M.prototype.clear = At;
510
+ M.prototype.delete = tr;
511
+ M.prototype.get = rr;
512
+ M.prototype.has = ir;
513
+ M.prototype.set = sr;
505
514
  var nr = "Expected a function";
506
- function te(t, e) {
507
- if (typeof t != "function" || e != null && typeof e != "function")
515
+ function te(r, e) {
516
+ if (typeof r != "function" || e != null && typeof e != "function")
508
517
  throw new TypeError(nr);
509
- var r = function() {
510
- var i = arguments, s = e ? e.apply(this, i) : i[0], n = r.cache;
518
+ var t = function() {
519
+ var i = arguments, s = e ? e.apply(this, i) : i[0], n = t.cache;
511
520
  if (n.has(s))
512
521
  return n.get(s);
513
- var a = t.apply(this, i);
514
- return r.cache = n.set(s, a) || n, a;
522
+ var a = r.apply(this, i);
523
+ return t.cache = n.set(s, a) || n, a;
515
524
  };
516
- return r.cache = new (te.Cache || w)(), r;
525
+ return t.cache = new (te.Cache || M)(), t;
517
526
  }
518
- te.Cache = w;
527
+ te.Cache = M;
519
528
  var or = 500;
520
- function ar(t) {
521
- var e = te(t, function(i) {
522
- return r.size === or && r.clear(), i;
523
- }), r = e.cache;
529
+ function ar(r) {
530
+ var e = te(r, function(i) {
531
+ return t.size === or && t.clear(), i;
532
+ }), t = e.cache;
524
533
  return e;
525
534
  }
526
- var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, fr = ar(function(t) {
535
+ var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, fr = ar(function(r) {
527
536
  var e = [];
528
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, i, s, n) {
529
- e.push(s ? n.replace(ur, "$1") : i || r);
537
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(lr, function(t, i, s, n) {
538
+ e.push(s ? n.replace(ur, "$1") : i || t);
530
539
  }), e;
531
540
  });
532
- function cr(t) {
533
- return t == null ? "" : Me(t);
541
+ function cr(r) {
542
+ return r == null ? "" : Me(r);
534
543
  }
535
- function Ee(t, e) {
536
- return A(t) ? t : $t(t, e) ? [t] : fr(cr(t));
544
+ function Ee(r, e) {
545
+ return A(r) ? r : $t(r, e) ? [r] : fr(cr(r));
537
546
  }
538
547
  var dr = 1 / 0;
539
- function Re(t) {
540
- if (typeof t == "string" || k(t))
541
- return t;
542
- var e = t + "";
543
- return e == "0" && 1 / t == -dr ? "-0" : e;
548
+ function Re(r) {
549
+ if (typeof r == "string" || k(r))
550
+ return r;
551
+ var e = r + "";
552
+ return e == "0" && 1 / r == -dr ? "-0" : e;
544
553
  }
545
- function pr(t, e) {
546
- e = Ee(e, t);
547
- for (var r = 0, i = e.length; t != null && r < i; )
548
- t = t[Re(e[r++])];
549
- return r && r == i ? t : void 0;
554
+ function pr(r, e) {
555
+ e = Ee(e, r);
556
+ for (var t = 0, i = e.length; r != null && t < i; )
557
+ r = r[Re(e[t++])];
558
+ return t && t == i ? r : void 0;
550
559
  }
551
- function L(t, e, r) {
552
- var i = t == null ? void 0 : pr(t, e);
553
- return i === void 0 ? r : i;
560
+ function L(r, e, t) {
561
+ var i = r == null ? void 0 : pr(r, e);
562
+ return i === void 0 ? t : i;
554
563
  }
555
- function hr(t, e, r, i) {
556
- if (!G(t))
557
- return t;
558
- e = Ee(e, t);
559
- for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
560
- var f = Re(e[s]), d = r;
564
+ function hr(r, e, t, i) {
565
+ if (!G(r))
566
+ return r;
567
+ e = Ee(e, r);
568
+ for (var s = -1, n = e.length, a = n - 1, l = r; l != null && ++s < n; ) {
569
+ var f = Re(e[s]), d = t;
561
570
  if (f === "__proto__" || f === "constructor" || f === "prototype")
562
- return t;
571
+ return r;
563
572
  if (s != a) {
564
573
  var p = l[f];
565
574
  d = i ? i(p, f, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
566
575
  }
567
576
  xt(l, f, d), l = l[f];
568
577
  }
569
- return t;
578
+ return r;
570
579
  }
571
- function D(t, e, r) {
572
- return t == null ? t : hr(t, e, r);
580
+ function D(r, e, t) {
581
+ return r == null ? r : hr(r, e, t);
573
582
  }
574
583
  class mr {
575
584
  constructor(e) {
@@ -599,59 +608,59 @@ class mr {
599
608
  );
600
609
  }
601
610
  // 核心处理过程,接收一个初始的代理数据结构,由其衍生的有 parseSchema
602
- parse(e, r) {
611
+ parse(e, t) {
603
612
  e.forEach((i, s) => {
604
- this.parseItem(i, s, r);
613
+ this.parseItem(i, s, t);
605
614
  });
606
615
  }
607
616
  // 初始化空数据结构,避免后续复杂的 if else
608
617
  initSchemas(e) {
609
- return e.map((r) => {
618
+ return e.map((t) => {
610
619
  const i = {};
611
- return r.children && (i.children = this.initSchemas(r.children)), i;
620
+ return t.children && (i.children = this.initSchemas(t.children)), i;
612
621
  });
613
622
  }
614
623
  countFunctionDefaultValues(e) {
615
- let r = 0;
624
+ let t = 0;
616
625
  const i = /* @__PURE__ */ new Set();
617
626
  function s(n) {
618
627
  if (!i.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
619
628
  i.add(n);
620
629
  for (const a in n)
621
- n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && r++, s(n[a]));
630
+ n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && t++, s(n[a]));
622
631
  }
623
632
  }
624
- return s(e), r;
633
+ return s(e), t;
625
634
  }
626
635
  // 派生过程,用于外部应用
627
- parseSchemas(e, r) {
636
+ parseSchemas(e, t) {
628
637
  o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
629
638
  P(e)
630
- ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, r);
639
+ ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
631
640
  }
632
641
  parseStable(e) {
633
- const r = {};
642
+ const t = {};
634
643
  if (!o.isUndefined(e.stable))
635
- r[e.key] = this.parseStable(e.stable);
644
+ t[e.key] = this.parseStable(e.stable);
636
645
  else
637
646
  return e;
638
- return r;
647
+ return t;
639
648
  }
640
649
  // 对于稳定初始化更新的抽象
641
650
  stableUpdater(e = []) {
642
651
  if (e.every(Boolean)) {
643
- const r = E(this.processedSchemas.value);
644
- !o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
645
- length: r.length
646
- }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
652
+ const t = R(this.processedSchemas.value);
653
+ !o.isProcessInprogress(t) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
654
+ length: t.length
655
+ }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(t));
647
656
  }
648
657
  }
649
658
  // 核心单 schema 处理过程,接收一个对象键值对的数据结构
650
- parseItem(e, r, i) {
659
+ parseItem(e, t, i) {
651
660
  const s = this, n = Array.from({
652
661
  length: Object.keys(e).filter((l) => l !== "children").length
653
662
  }).fill(!1);
654
- this.objectParser({ data: e, index: r, updater: a, parentMeta: i });
663
+ this.objectParser({ data: e, index: t, updater: a, parentMeta: i });
655
664
  function a(l) {
656
665
  const f = l.index, d = l.key, p = l.keyIndex;
657
666
  if (o.isUndefined(l.stable))
@@ -669,11 +678,11 @@ class mr {
669
678
  }
670
679
  // 只做基本的对象 parser
671
680
  objectParser(e) {
672
- const r = e.data;
673
- Object.keys(r).forEach((s, n) => {
681
+ const t = e.data;
682
+ Object.keys(t).forEach((s, n) => {
674
683
  var a, l;
675
684
  if (s === "children")
676
- this.parseSchemas(r[s], {
685
+ this.parseSchemas(t[s], {
677
686
  ...e,
678
687
  key: s,
679
688
  keyIndex: n
@@ -687,16 +696,16 @@ class mr {
687
696
  stable: d
688
697
  });
689
698
  };
690
- o.isFunction(r[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
699
+ o.isFunction(t[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
691
700
  () => {
692
701
  if (s === "component") {
693
- const d = r[s](this.getRuntimeMeta());
702
+ const d = t[s](this.getRuntimeMeta());
694
703
  this.promiseFieldParser(d, f, !1, {
695
704
  rootIndex: e.index,
696
705
  parentMeta: e.parentMeta
697
706
  });
698
707
  } else
699
- this.fieldParser(r[s], f, {
708
+ this.fieldParser(t[s], f, {
700
709
  rootIndex: e.index,
701
710
  parentMeta: e.parentMeta
702
711
  });
@@ -709,17 +718,17 @@ class mr {
709
718
  () => {
710
719
  const d = this.schemaEffect.trackEffect(
711
720
  () => {
712
- /\{\s*model\s*\}/.test(r[s].toString()) ? this.fieldParser(
713
- r[s],
721
+ /\{\s*model\s*\}/.test(t[s].toString()) ? this.fieldParser(
722
+ t[s],
714
723
  (p) => {
715
724
  if (!p)
716
725
  return f(p);
717
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
726
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
718
727
  this.defaultValueInprogressMap.values()
719
728
  ).every((m) => {
720
729
  var y;
721
730
  return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
722
- }) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
731
+ }) ? (f(p), this.defaultValueEffect.clearEffects(), j(() => {
723
732
  d();
724
733
  })) : f(p);
725
734
  },
@@ -728,14 +737,14 @@ class mr {
728
737
  parentMeta: e.parentMeta
729
738
  }
730
739
  ) : this.fieldParser(
731
- r[s],
740
+ t[s],
732
741
  (p) => {
733
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
742
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
734
743
  this.defaultValueInprogressMap.values()
735
744
  ).every((m) => {
736
745
  var y;
737
746
  return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
738
- }) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
747
+ }) ? (f(p), this.defaultValueEffect.clearEffects(), j(() => {
739
748
  d();
740
749
  })) : f(p);
741
750
  },
@@ -753,74 +762,74 @@ class mr {
753
762
  {
754
763
  lazy: !1
755
764
  }
756
- ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(r[s], f, !1, {
765
+ ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(t[s], f, !1, {
757
766
  rootIndex: e.index,
758
767
  parentMeta: e.parentMeta
759
- }) : this.fieldParser(r[s], f, {
768
+ }) : this.fieldParser(t[s], f, {
760
769
  rootIndex: e.index,
761
770
  parentMeta: e.parentMeta
762
771
  });
763
772
  }
764
773
  });
765
774
  }
766
- promiseFieldParser(e, r, i, s) {
775
+ promiseFieldParser(e, t, i, s) {
767
776
  o.isPromise(e) ? e.then((n) => {
768
777
  o.isString(n) && (n = Y(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
769
778
  data: n,
770
- updater: r,
779
+ updater: t,
771
780
  index: s.rootIndex,
772
781
  parentMeta: s.parentMeta
773
- }) : r(n);
782
+ }) : t(n);
774
783
  }) : (o.isString(e) && (e = Y(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
775
784
  data: e,
776
- updater: r,
785
+ updater: t,
777
786
  index: s.rootIndex,
778
787
  parentMeta: s.parentMeta
779
- }) : r(e));
788
+ }) : t(e));
780
789
  }
781
790
  // 对任意对象中单个字段的 parse: 做基本处理
782
- fieldParser(e, r, i, s = !0) {
791
+ fieldParser(e, t, i, s = !0) {
783
792
  if (o.isFunction(e))
784
793
  if (e.name.startsWith("__proform_raw_"))
785
- r(
794
+ t(
786
795
  (...n) => e({
787
796
  rawArgs: n,
788
797
  ...this.getRuntimeMeta()
789
798
  })
790
799
  );
791
800
  else if (e.name.startsWith("__proform_structured_path_parsing_mark_"))
792
- r(e);
801
+ t(e);
793
802
  else if (e.__proform_cached_result) {
794
803
  const n = e.__proform_cached_result;
795
- this.promiseFieldParser(n, r, s, i);
804
+ this.promiseFieldParser(n, t, s, i);
796
805
  } else {
797
806
  const n = e(this.getRuntimeMeta());
798
- e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, r, s, i);
807
+ e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
799
808
  }
800
809
  else
801
- F(e) ? g(
810
+ O(e) ? g(
802
811
  () => e.value,
803
812
  () => {
804
813
  o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
805
814
  data: e.value,
806
- updater: r,
815
+ updater: t,
807
816
  index: i.rootIndex,
808
817
  parentMeta: i.parentMeta
809
- }) : r(e.value));
818
+ }) : t(e.value));
810
819
  },
811
820
  {
812
821
  immediate: !0,
813
822
  deep: !0
814
823
  }
815
- ) : U(e) ? g(
824
+ ) : F(e) ? g(
816
825
  () => e,
817
826
  () => {
818
827
  o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
819
828
  data: e,
820
- updater: r,
829
+ updater: t,
821
830
  index: i.rootIndex,
822
831
  parentMeta: i.parentMeta
823
- }) : r(e));
832
+ }) : t(e));
824
833
  },
825
834
  {
826
835
  immediate: !0,
@@ -828,37 +837,37 @@ class mr {
828
837
  }
829
838
  ) : s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
830
839
  data: e,
831
- updater: r,
840
+ updater: t,
832
841
  index: i.rootIndex,
833
842
  parentMeta: i.parentMeta
834
- }) : r(e);
843
+ }) : t(e);
835
844
  }
836
845
  modelProcessor(e) {
837
846
  e.map(
838
- (r) => this.createModel(r, this.processedModel.value)
847
+ (t) => this.createModel(t, this.processedModel.value)
839
848
  ), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel = P(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects());
840
849
  }
841
- setModel(e, r, i) {
842
- o.isFunction(r) ? D(e, r(), i) : e[r] = i;
850
+ setModel(e, t, i) {
851
+ o.isFunction(t) ? D(e, t(), i) : e[t] = i;
843
852
  }
844
- createModel(e, r) {
845
- if (o.isListSchema(e) && (r[e.field] || this.setModel(r, e.field, [{}]), e.children.forEach((i) => {
846
- this.createModel(i, r[e.field][0]);
853
+ createModel(e, t) {
854
+ if (o.isListSchema(e) && (t[e.field] || this.setModel(t, e.field, [{}]), e.children.forEach((i) => {
855
+ this.createModel(i, t[e.field][0]);
847
856
  })), o.isGroupSchema(e) && e.children.forEach((i) => {
848
- this.createModel(i, r);
857
+ this.createModel(i, t);
849
858
  }), o.isItemSchema(e))
850
859
  if ("defaultValue" in e)
851
- this.setModel(r, e.field, e.defaultValue);
860
+ this.setModel(t, e.field, e.defaultValue);
852
861
  else {
853
- if (o.isFunction(e.field) && L(r, e.field()))
862
+ if (o.isFunction(e.field) && L(t, e.field()))
854
863
  return;
855
- if (o.isString(e.field) && r[e.field])
864
+ if (o.isString(e.field) && t[e.field])
856
865
  return;
857
- this.setModel(r, e.field, void 0);
866
+ this.setModel(t, e.field, void 0);
858
867
  }
859
868
  }
860
869
  }
861
- class M {
870
+ class x {
862
871
  static getFormContainer({ ui: e } = {}) {
863
872
  return c.presets.uiPresets[e ?? c.presets.ui].container.Form;
864
873
  }
@@ -883,39 +892,39 @@ class br {
883
892
  this.ui = e;
884
893
  }
885
894
  getRuntimeNative() {
886
- var r;
887
- return (r = c.presets.uiPresets[this.ui]) == null ? void 0 : r.native;
895
+ var t;
896
+ return (t = c.presets.uiPresets[this.ui]) == null ? void 0 : t.native;
888
897
  }
889
898
  getRuntimeField(e) {
890
899
  var s;
891
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
892
- return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
900
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
901
+ return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
893
902
  }
894
903
  getRuntimeRequired(e) {
895
904
  var s;
896
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
897
- return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
905
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
906
+ return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
898
907
  }
899
908
  getFormModelPropName() {
900
909
  var i;
901
- const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r = C.adapters[c.getUI(this.ui)];
902
- return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
910
+ const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.ui)];
911
+ return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
903
912
  }
904
913
  formComponentRenderer(e) {
905
914
  var s;
906
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
907
- return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
915
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
916
+ return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
908
917
  }
909
918
  clearValidate(e) {
910
919
  var s;
911
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
912
- return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
920
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
921
+ return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
913
922
  }
914
923
  }
915
- function vr(t) {
916
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Be(t);
924
+ function gr(r) {
925
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Be(r);
917
926
  }
918
- class gr {
927
+ class vr {
919
928
  constructor(e) {
920
929
  u(this, "schemas", z([]));
921
930
  u(this, "model", z({}));
@@ -941,64 +950,71 @@ class gr {
941
950
  }));
942
951
  u(this, "shared", K({}));
943
952
  this.setup = e, this.processor = new mr(this);
944
- const r = this.setup(this);
945
- if (this.ui = r.ui ?? c.presets.ui, this.runtimeAdapter = new br(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), F(r.schemas))
953
+ const t = this.setup(this);
954
+ if (this.ui = t.ui ?? c.presets.ui, this.runtimeAdapter = new br(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), O(t.schemas))
946
955
  g(
947
956
  // @ts-expect-error
948
- () => r.schemas.value,
957
+ () => t.schemas.value,
949
958
  () => {
950
- this.processor.parseSchemas(r.schemas.value);
959
+ this.processor.parseSchemas(t.schemas.value);
951
960
  },
952
961
  {
953
962
  deep: !0
954
963
  }
955
964
  );
956
- else if (U(r.schemas)) {
957
- const i = g(() => r.schemas, () => {
958
- this.processor.parseSchemas(r.schemas), O(() => {
965
+ else if (F(t.schemas)) {
966
+ const i = g(() => t.schemas, () => {
967
+ this.processor.parseSchemas(t.schemas), j(() => {
959
968
  i();
960
969
  });
961
970
  }, {
962
971
  deep: !0
963
972
  });
964
973
  } else
965
- this.processor.parseSchemas(r.schemas);
974
+ this.processor.parseSchemas(t.schemas);
966
975
  }
967
976
  getRuntimeMeta() {
968
977
  return {
969
- model: E(P(this.model.value)),
978
+ model: R(P(this.model.value)),
970
979
  reactiveModel: this.model.value,
971
980
  shared: this.shared,
972
981
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
973
- share: (r) => {
974
- F(r) ? g(() => r.value, () => {
975
- h(this.shared, r.value);
982
+ share: (t) => {
983
+ O(t) ? g(() => t.value, () => {
984
+ h(this.shared, t.value);
976
985
  }, {
977
986
  deep: !0,
978
987
  immediate: !0
979
- }) : U(r) ? g(() => r, () => {
980
- h(this.shared, r);
988
+ }) : F(t) ? g(() => t, () => {
989
+ h(this.shared, t);
981
990
  }, {
982
991
  deep: !0,
983
992
  immediate: !0
984
- }) : Object.keys(r).forEach((i) => {
985
- F(r[i]) ? g(() => r[i].value, () => {
993
+ }) : Object.keys(t).forEach((i) => {
994
+ console.log(i, O(i), F(i)), O(t[i]) ? g(() => t[i].value, () => {
995
+ h(this.shared, {
996
+ [i]: t[i].value
997
+ });
998
+ }, {
999
+ deep: !0,
1000
+ immediate: !0
1001
+ }) : F(t[i]) ? g(() => t[i], () => {
986
1002
  h(this.shared, {
987
- [i]: r[i].value
1003
+ [i]: t[i]
988
1004
  });
989
1005
  }, {
990
1006
  deep: !0,
991
1007
  immediate: !0
992
1008
  }) : h(this.shared, {
993
- [i]: r[i]
1009
+ [i]: t[i]
994
1010
  });
995
1011
  });
996
1012
  }
997
1013
  };
998
1014
  }
999
- runtimeItemProcessor(e, r, i = this.model.value, s) {
1000
- var ie, se, ne, oe, ae, le, ue, fe, ce, de, pe, he, me, be, ve, ge, ye;
1001
- const n = E(e.component);
1015
+ runtimeItemProcessor(e, t, i = this.model.value, s) {
1016
+ var ie, se, ne, oe, ae, le, ue, fe, ce, de, pe, he, me, be, ge, ve, ye;
1017
+ const n = R(e.component);
1002
1018
  if (!n)
1003
1019
  return;
1004
1020
  (se = (ie = e.native) == null ? void 0 : ie.props) != null && se.Form && h(this.globalNativeFormOverride.props.Form, (oe = (ne = e.native) == null ? void 0 : ne.props) == null ? void 0 : oe.Form), (le = (ae = e.native) == null ? void 0 : ae.slots) != null && le.Form && h(this.globalNativeFormOverride.slots.Form, (fe = (ue = e.native) == null ? void 0 : ue.slots) == null ? void 0 : fe.Form);
@@ -1006,32 +1022,32 @@ class gr {
1006
1022
  display: "grid",
1007
1023
  gridColumn: "1 / -1",
1008
1024
  ...e.grid
1009
- }, f = h(P((be = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : be.FormItem) ?? {}, (ge = (ve = e.native) == null ? void 0 : ve.props) == null ? void 0 : ge.FormItem), d = this.runtimeAdapter.getRuntimeField({
1025
+ }, f = h(P((be = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : be.FormItem) ?? {}, (ve = (ge = e.native) == null ? void 0 : ge.props) == null ? void 0 : ve.FormItem), d = this.runtimeAdapter.getRuntimeField({
1010
1026
  schema: e,
1011
1027
  parentSchema: s,
1012
- index: r
1028
+ index: t
1013
1029
  }), p = n.name, m = e.componentProps ?? {}, y = C.placeholderPresetByComponentName;
1014
1030
  let I = e.placeholder, _ = e.show;
1015
1031
  _ === void 0 && (_ = !0);
1016
1032
  let v = e.label ?? "", S;
1017
- if (e.runtime ? S = e.runtime : S = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(S) && (v = Y((ye = S == null ? void 0 : S.customizeListItemLabel) == null ? void 0 : ye.call(S, e.label ?? "", r + 1), "")), !I) {
1018
- let V = "请输入";
1019
- o.isUndefined(p) ? I = `${V}${v}` : /* @ts-expect-error */ y[p.toLowerCase()] ? (V = // @ts-expect-error
1020
- y[p.toLowerCase()], I = `${V}${v}`) : (Object.keys(y).forEach((_e) => {
1021
- p.toLowerCase().includes(_e.toLowerCase()) && (V = y[_e]);
1022
- }), I = `${V}${v}`);
1033
+ if (e.runtime ? S = e.runtime : S = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(S) && (v = Y((ye = S == null ? void 0 : S.customizeListItemLabel) == null ? void 0 : ye.call(S, e.label ?? "", t + 1), "")), !I) {
1034
+ let N = "请输入";
1035
+ o.isUndefined(p) ? I = `${N}${v}` : /* @ts-expect-error */ y[p.toLowerCase()] ? (N = // @ts-expect-error
1036
+ y[p.toLowerCase()], I = `${N}${v}`) : (Object.keys(y).forEach((_e) => {
1037
+ p.toLowerCase().includes(_e.toLowerCase()) && (N = y[_e]);
1038
+ }), I = `${N}${v}`);
1023
1039
  }
1024
1040
  const $e = this.runtimeAdapter.getRuntimeRequired({
1025
1041
  ...e,
1026
1042
  label: v
1027
- }), Ve = M.getItemContainer(this), Ne = M.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1043
+ }), Ve = x.getItemContainer(this), Ne = x.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1028
1044
  return b("div", {
1029
1045
  style: l
1030
1046
  }, [b(Ve, {
1031
1047
  show: _
1032
1048
  }, {
1033
1049
  default() {
1034
- return _ && b(Ne, q(f, {
1050
+ return _ && b(Ne, U(f, {
1035
1051
  label: `${v ? `${v}:` : ""}`
1036
1052
  }, d, $e), {
1037
1053
  default() {
@@ -1050,35 +1066,35 @@ class gr {
1050
1066
  })]);
1051
1067
  }
1052
1068
  runtimeGroupProcessor(e) {
1053
- let r;
1069
+ let t;
1054
1070
  const i = {
1055
1071
  display: "grid",
1056
1072
  gridColumn: "1 / -1",
1057
1073
  ...e.grid
1058
- }, s = M.getGroupContainer(this);
1074
+ }, s = x.getGroupContainer(this);
1059
1075
  let n = e.show;
1060
1076
  return n === void 0 && (n = !0), b("div", {
1061
1077
  style: i
1062
1078
  }, [n && b(s, {
1063
1079
  schema: e
1064
- }, vr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
1065
- default: () => [r]
1080
+ }, gr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
1081
+ default: () => [t]
1066
1082
  })]);
1067
1083
  }
1068
1084
  addListItem(e) {
1069
- var r, i;
1070
- if (!((r = this.processor.stableModel[e.field]) != null && r[0]))
1085
+ var t, i;
1086
+ if (!((t = this.processor.stableModel[e.field]) != null && t[0]))
1071
1087
  return Promise.reject({
1072
1088
  code: "0001",
1073
1089
  message: "异步默认值数据正在处理中,请您耐心等待... "
1074
1090
  });
1075
1091
  (i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(P(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1076
1092
  }
1077
- deleteListItem(e, r) {
1078
- this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
1093
+ deleteListItem(e, t) {
1094
+ this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
1079
1095
  }
1080
1096
  runtimeListProcessor(e) {
1081
- const r = {
1097
+ const t = {
1082
1098
  display: "grid",
1083
1099
  gridColumn: "1 / -1",
1084
1100
  ...e.grid
@@ -1086,9 +1102,9 @@ class gr {
1086
1102
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1087
1103
  let s = e.show;
1088
1104
  s === void 0 && (s = !0);
1089
- const n = M.getListContainer(this), a = M.getListItemContainer(this);
1105
+ const n = x.getListContainer(this), a = x.getListItemContainer(this);
1090
1106
  return b("div", {
1091
- style: r
1107
+ style: t
1092
1108
  }, [s && b(n, {
1093
1109
  schema: e
1094
1110
  }, {
@@ -1119,7 +1135,7 @@ class gr {
1119
1135
  })]);
1120
1136
  }
1121
1137
  runtimeProcessor(e) {
1122
- return e.map((r) => (r.type || (r.type = "item"), this.processorBySchemaType[r.type](r)));
1138
+ return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
1123
1139
  }
1124
1140
  exec() {
1125
1141
  var l, f, d, p;
@@ -1128,8 +1144,8 @@ class gr {
1128
1144
  gridColumn: "1 / -1",
1129
1145
  gridAutoColumns: "1fr",
1130
1146
  ...this.grid
1131
- }, r = this, i = h(this.globalNativeFormOverride.props.Form, P((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, P((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = M.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1132
- return b(n, q(i, {
1147
+ }, t = this, i = h(this.globalNativeFormOverride.props.Form, P((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, P((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = x.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1148
+ return b(n, U(i, {
1133
1149
  ref: this.formRef
1134
1150
  }, {
1135
1151
  [a]: this.model.value
@@ -1137,7 +1153,7 @@ class gr {
1137
1153
  default() {
1138
1154
  return b("div", {
1139
1155
  style: e
1140
- }, [r.runtimeProcessor(r.schemas.value)]);
1156
+ }, [t.runtimeProcessor(t.schemas.value)]);
1141
1157
  },
1142
1158
  ...s
1143
1159
  });
@@ -1145,247 +1161,247 @@ class gr {
1145
1161
  }
1146
1162
  class c {
1147
1163
  static getPreset(e) {
1148
- var r, i, s;
1149
- return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
1164
+ var t, i, s;
1165
+ return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
1150
1166
  }
1151
1167
  static getUI(e) {
1152
- var r, i, s;
1153
- return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
1168
+ var t, i, s;
1169
+ return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
1154
1170
  }
1155
1171
  }
1156
1172
  u(c, "presets");
1157
1173
  function X({
1158
- parentSchema: t,
1174
+ parentSchema: r,
1159
1175
  schema: e,
1160
- index: r
1176
+ index: t
1161
1177
  }) {
1162
- return t ? `${t.field}.${r}.${e.field}` : e.field;
1178
+ return r ? `${r.field}.${t}.${e.field}` : e.field;
1163
1179
  }
1164
1180
  const yr = {
1165
1181
  ArcoVue: {
1166
- getRuntimeField(t) {
1167
- const e = X(t);
1182
+ getRuntimeField(r) {
1183
+ const e = X(r);
1168
1184
  return o.isFunction(e) ? {
1169
1185
  field: e()
1170
1186
  } : {
1171
1187
  field: e
1172
1188
  };
1173
1189
  },
1174
- getRuntimeRequired(t) {
1190
+ getRuntimeRequired(r) {
1175
1191
  var e;
1176
- if (t.required)
1177
- if (!t.rules)
1178
- t.rules = [], t.rules.push({
1192
+ if (r.required)
1193
+ if (!r.rules)
1194
+ r.rules = [], r.rules.push({
1179
1195
  required: !0,
1180
- message: `${t.label}是必填项`
1196
+ message: `${r.label}是必填项`
1181
1197
  });
1182
1198
  else {
1183
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1184
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1199
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1200
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1185
1201
  required: !0,
1186
- message: `${t.label}是必填项`
1202
+ message: `${r.label}是必填项`
1187
1203
  });
1188
1204
  }
1189
- else if (t.rules) {
1190
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1191
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1205
+ else if (r.rules) {
1206
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1207
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1192
1208
  required: !0,
1193
- message: `${t.label}是必填项`
1209
+ message: `${r.label}是必填项`
1194
1210
  });
1195
1211
  }
1196
1212
  return {
1197
- rules: t.rules
1213
+ rules: r.rules
1198
1214
  };
1199
1215
  },
1200
1216
  getFormModelPropName() {
1201
1217
  return "model";
1202
1218
  },
1203
1219
  formComponentRenderer({
1204
- Component: t,
1220
+ Component: r,
1205
1221
  baseModel: e,
1206
- schema: r,
1222
+ schema: t,
1207
1223
  placeholder: i,
1208
1224
  componentSlots: s,
1209
1225
  props: n
1210
1226
  }) {
1211
1227
  let a;
1212
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], b(t, q({
1228
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1213
1229
  modelValue: a,
1214
1230
  "onUpdate:modelValue": (l) => {
1215
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1231
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1216
1232
  },
1217
1233
  placeholder: i
1218
1234
  }, n), {
1219
1235
  ...s
1220
1236
  });
1221
1237
  },
1222
- validateForm(t) {
1223
- return new Promise((e, r) => {
1224
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1238
+ validateForm(r) {
1239
+ return new Promise((e, t) => {
1240
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1225
1241
  });
1226
1242
  },
1227
- clearValidate(t) {
1228
- var e, r;
1229
- (r = (e = t.formRef.value) == null ? void 0 : e.clearValidate) == null || r.call(e);
1243
+ clearValidate(r) {
1244
+ var e, t;
1245
+ (t = (e = r.formRef.value) == null ? void 0 : e.clearValidate) == null || t.call(e);
1230
1246
  }
1231
1247
  },
1232
1248
  NutUI: {
1233
- getRuntimeField(t) {
1234
- const e = X(t);
1249
+ getRuntimeField(r) {
1250
+ const e = X(r);
1235
1251
  return o.isFunction(e) ? {
1236
1252
  prop: e()
1237
1253
  } : {
1238
1254
  prop: e
1239
1255
  };
1240
1256
  },
1241
- getRuntimeRequired(t) {
1257
+ getRuntimeRequired(r) {
1242
1258
  var e;
1243
- if (t.required)
1244
- if (!t.rules)
1245
- t.rules = [], t.rules.push({
1259
+ if (r.required)
1260
+ if (!r.rules)
1261
+ r.rules = [], r.rules.push({
1246
1262
  required: !0,
1247
- message: `${t.label}是必填项`
1263
+ message: `${r.label}是必填项`
1248
1264
  });
1249
1265
  else {
1250
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1251
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1266
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1267
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1252
1268
  required: !0,
1253
- message: `${t.label}是必填项`
1269
+ message: `${r.label}是必填项`
1254
1270
  });
1255
1271
  }
1256
- else if (t.rules) {
1257
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1258
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1272
+ else if (r.rules) {
1273
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1274
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1259
1275
  required: !0,
1260
- message: `${t.label}是必填项`
1276
+ message: `${r.label}是必填项`
1261
1277
  });
1262
1278
  }
1263
1279
  return {
1264
- rules: t.rules,
1265
- required: t.required
1280
+ rules: r.rules,
1281
+ required: r.required
1266
1282
  };
1267
1283
  },
1268
1284
  getFormModelPropName() {
1269
1285
  return "modelValue";
1270
1286
  },
1271
1287
  formComponentRenderer({
1272
- Component: t,
1288
+ Component: r,
1273
1289
  baseModel: e,
1274
- schema: r,
1290
+ schema: t,
1275
1291
  placeholder: i,
1276
1292
  componentSlots: s,
1277
1293
  props: n
1278
1294
  }) {
1279
1295
  let a;
1280
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], b(t, q({
1296
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1281
1297
  modelValue: a,
1282
1298
  "onUpdate:modelValue": (l) => {
1283
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1299
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1284
1300
  },
1285
1301
  placeholder: i
1286
1302
  }, n), {
1287
1303
  ...s
1288
1304
  });
1289
1305
  },
1290
- validateForm(t) {
1291
- return new Promise((e, r) => {
1292
- t.runtimeCore.formRef.value.validate().then(({
1306
+ validateForm(r) {
1307
+ return new Promise((e, t) => {
1308
+ r.runtimeCore.formRef.value.validate().then(({
1293
1309
  valid: i,
1294
1310
  errors: s
1295
1311
  }) => {
1296
- i ? e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))) : r(s);
1312
+ i ? e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))) : t(s);
1297
1313
  });
1298
1314
  });
1299
1315
  },
1300
- clearValidate(t) {
1301
- var e, r;
1302
- (r = (e = t.formRef.value) == null ? void 0 : e.reset) == null || r.call(e);
1316
+ clearValidate(r) {
1317
+ var e, t;
1318
+ (t = (e = r.formRef.value) == null ? void 0 : e.reset) == null || t.call(e);
1303
1319
  }
1304
1320
  },
1305
1321
  NaiveUI: {
1306
- getRuntimeField(t) {
1307
- const e = X(t);
1322
+ getRuntimeField(r) {
1323
+ const e = X(r);
1308
1324
  return o.isFunction(e) ? {
1309
1325
  path: e()
1310
1326
  } : {
1311
1327
  path: e
1312
1328
  };
1313
1329
  },
1314
- getRuntimeRequired(t) {
1330
+ getRuntimeRequired(r) {
1315
1331
  var e;
1316
- if (t.required)
1317
- if (!t.rules)
1318
- t.rules = [], t.rules.push({
1332
+ if (r.required)
1333
+ if (!r.rules)
1334
+ r.rules = [], r.rules.push({
1319
1335
  required: !0,
1320
- message: `${t.label}是必填项`,
1336
+ message: `${r.label}是必填项`,
1321
1337
  trigger: ["input", "blur"]
1322
1338
  });
1323
1339
  else {
1324
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1325
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1340
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1341
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1326
1342
  required: !0,
1327
- message: `${t.label}是必填项`,
1343
+ message: `${r.label}是必填项`,
1328
1344
  trigger: ["input", "blur"]
1329
1345
  });
1330
1346
  }
1331
- else if (t.rules) {
1332
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1333
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1347
+ else if (r.rules) {
1348
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1349
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1334
1350
  required: !0,
1335
- message: `${t.label}是必填项`,
1351
+ message: `${r.label}是必填项`,
1336
1352
  trigger: ["input", "blur"]
1337
1353
  });
1338
1354
  }
1339
1355
  return {
1340
- rule: t.rules
1356
+ rule: r.rules
1341
1357
  };
1342
1358
  },
1343
1359
  getFormModelPropName() {
1344
1360
  return "model";
1345
1361
  },
1346
1362
  formComponentRenderer({
1347
- Component: t,
1363
+ Component: r,
1348
1364
  baseModel: e,
1349
- schema: r,
1365
+ schema: t,
1350
1366
  placeholder: i,
1351
1367
  componentSlots: s,
1352
1368
  props: n
1353
1369
  }) {
1354
1370
  let a;
1355
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], b(t, q({
1371
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1356
1372
  value: a,
1357
1373
  "onUpdate:value": (l) => {
1358
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1374
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1359
1375
  },
1360
1376
  placeholder: i
1361
1377
  }, n), {
1362
1378
  ...s
1363
1379
  });
1364
1380
  },
1365
- validateForm(t) {
1366
- return new Promise((e, r) => {
1367
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1381
+ validateForm(r) {
1382
+ return new Promise((e, t) => {
1383
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1368
1384
  });
1369
1385
  },
1370
- clearValidate(t) {
1371
- var e, r;
1372
- (r = (e = t.formRef.value) == null ? void 0 : e.restoreValidation) == null || r.call(e);
1386
+ clearValidate(r) {
1387
+ var e, t;
1388
+ (t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
1373
1389
  }
1374
1390
  }
1375
- }, x = class x {
1391
+ }, E = class E {
1376
1392
  static getPlaceholderPrefixPresetByComponentName() {
1377
1393
  const e = {
1378
1394
  请选择: ["select", "tree"],
1379
1395
  请输入: ["input"]
1380
- }, r = {};
1396
+ }, t = {};
1381
1397
  for (const i in e)
1382
1398
  e[i].forEach((s) => {
1383
- r[s] = i;
1399
+ t[s] = i;
1384
1400
  });
1385
- return r;
1401
+ return t;
1386
1402
  }
1387
1403
  };
1388
- u(x, "schemaPreset", {
1404
+ u(E, "schemaPreset", {
1389
1405
  type: {
1390
1406
  defaultValue: "item"
1391
1407
  },
@@ -1431,13 +1447,13 @@ u(x, "schemaPreset", {
1431
1447
  runtime: {
1432
1448
  default: void 0
1433
1449
  }
1434
- }), u(x, "componentPropsPreset", {
1450
+ }), u(E, "componentPropsPreset", {
1435
1451
  options: {
1436
1452
  defaultValue: []
1437
1453
  }
1438
1454
  }), // 基于基本功能提出基本预设
1439
- u(x, "placeholderPresetByComponentName", x.getPlaceholderPrefixPresetByComponentName());
1440
- let J = x;
1455
+ u(E, "placeholderPresetByComponentName", E.getPlaceholderPrefixPresetByComponentName());
1456
+ let J = E;
1441
1457
  const C = {
1442
1458
  ...J,
1443
1459
  adapters: {
@@ -1450,13 +1466,13 @@ const C = {
1450
1466
  required: !0
1451
1467
  }
1452
1468
  },
1453
- setup(t) {
1454
- const e = new gr(t.setup);
1469
+ setup(r) {
1470
+ const e = new vr(r.setup);
1455
1471
  return () => e.exec();
1456
1472
  }
1457
1473
  });
1458
- function Ir(t) {
1459
- const e = new Ke(t);
1474
+ function Ir(r) {
1475
+ const e = new Ke(r);
1460
1476
  return [
1461
1477
  e.setup.bind(e),
1462
1478
  {
@@ -1468,33 +1484,33 @@ function Ir(t) {
1468
1484
  }
1469
1485
  ];
1470
1486
  }
1471
- function Sr(t) {
1472
- c.presets = t;
1487
+ function Sr(r) {
1488
+ c.presets = r;
1473
1489
  }
1474
- function re(t, e) {
1475
- return e === "native" && Object.defineProperty(t, "name", {
1476
- value: `__proform_raw_${t.name}`,
1490
+ function re(r, e) {
1491
+ return e === "native" && Object.defineProperty(r, "name", {
1492
+ value: `__proform_raw_${r.name}`,
1477
1493
  writable: !0
1478
- }), e === "structured_path_parsing_mark" && Object.defineProperty(t, "name", {
1479
- value: `__proform_structured_path_parsing_mark_${t.name}`,
1494
+ }), e === "structured_path_parsing_mark" && Object.defineProperty(r, "name", {
1495
+ value: `__proform_structured_path_parsing_mark_${r.name}`,
1480
1496
  writable: !0
1481
- }), e === "onetime" && Object.defineProperty(t, "name", {
1482
- value: `__proform_onetime_${t.name}`,
1497
+ }), e === "onetime" && Object.defineProperty(r, "name", {
1498
+ value: `__proform_onetime_${r.name}`,
1483
1499
  writable: !0
1484
- }), t;
1500
+ }), r;
1485
1501
  }
1486
- function Or(t) {
1487
- return re(t, "native");
1502
+ function Or(r) {
1503
+ return re(r, "native");
1488
1504
  }
1489
- function Fr(t) {
1490
- return t.__proform_raw_object = !0, t;
1505
+ function Fr(r) {
1506
+ return r.__proform_raw_object = !0, r;
1491
1507
  }
1492
- function jr(t) {
1493
- return re(t, "onetime");
1508
+ function jr(r) {
1509
+ return re(r, "onetime");
1494
1510
  }
1495
- function wr(t) {
1511
+ function wr(r) {
1496
1512
  function e() {
1497
- return t;
1513
+ return r;
1498
1514
  }
1499
1515
  return re(
1500
1516
  e,