@form-create/element-ui 2.7.3 → 2.7.5

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * FormCreate 低代码表单渲染器
3
- * @form-create/element-ui v2.7.3
3
+ * @form-create/element-ui v2.7.5
4
4
  * (c) 2018-2025 xaboy
5
5
  * Github https://github.com/xaboy/form-create
6
6
  * Site https://form-create.com/
@@ -19,20 +19,20 @@ var at = (t, e, r) => e in t ? tr(t, e, { enumerable: !0, configurable: !0, writ
19
19
  sr.call(e, r) && at(t, r, e[r]);
20
20
  return t;
21
21
  }, q = (t, e) => rr(t, ir(e));
22
- import ge, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ie, onBeforeMount as ur, watch as L, onMounted as fr, onBeforeUnmount as cr, onUpdated as hr, nextTick as T, markRaw as pe, computed as me, toRef as De, ref as dr } from "vue";
22
+ import $e, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ne, onBeforeMount as ur, watch as L, onMounted as cr, onBeforeUnmount as fr, onUpdated as hr, nextTick as I, markRaw as ge, computed as ye, toRef as je, ref as dr } from "vue";
23
23
  function pr(t) {
24
24
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
25
  }
26
- function He() {
27
- return He = Object.assign ? Object.assign.bind() : function(t) {
26
+ function Ge() {
27
+ return Ge = Object.assign ? Object.assign.bind() : function(t) {
28
28
  for (var e, r = 1; r < arguments.length; r++) for (var i in e = arguments[r], e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
29
29
  return t;
30
- }, He.apply(this, arguments);
30
+ }, Ge.apply(this, arguments);
31
31
  }
32
32
  var mr = ["attrs", "props", "domProps"], gr = ["class", "style", "directives"], yr = ["on", "nativeOn"], $r = function(t) {
33
33
  return t.reduce(function(e, r) {
34
34
  for (var i in r) if (!e[i]) e[i] = r[i];
35
- else if (mr.indexOf(i) !== -1) e[i] = He({}, e[i], r[i]);
35
+ else if (mr.indexOf(i) !== -1) e[i] = Ge({}, e[i], r[i]);
36
36
  else if (gr.indexOf(i) !== -1) {
37
37
  var s = e[i] instanceof Array ? e[i] : [e[i]], n = r[i] instanceof Array ? r[i] : [r[i]];
38
38
  e[i] = [].concat(s, n);
@@ -51,7 +51,7 @@ var mr = ["attrs", "props", "domProps"], gr = ["class", "style", "directives"],
51
51
  };
52
52
  }, br = $r;
53
53
  const V = /* @__PURE__ */ pr(br);
54
- function Qe(t, e) {
54
+ function Ze(t, e) {
55
55
  return Object.keys(t).reduce((r, i) => (r.push(t[i]), r), []);
56
56
  }
57
57
  const _r = "fcCheckbox", Cr = {
@@ -117,7 +117,7 @@ const _r = "fcCheckbox", Cr = {
117
117
  }, {
118
118
  key: s + r + "-" + e.value
119
119
  }]));
120
- }), Qe(this.$slots)]);
120
+ }), Ze(this.$slots)]);
121
121
  },
122
122
  mounted() {
123
123
  this.$emit("fc.el", this.$refs.el);
@@ -126,7 +126,7 @@ const _r = "fcCheckbox", Cr = {
126
126
  function H(t) {
127
127
  return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
128
128
  }
129
- const wr = "fcFrame", Or = {
129
+ const wr = "fcFrame", Fr = {
130
130
  name: wr,
131
131
  props: {
132
132
  formCreateInject: {
@@ -496,8 +496,8 @@ const wr = "fcFrame", Or = {
496
496
  mounted() {
497
497
  this.$on("fc.closeModal", this.closeModal);
498
498
  }
499
- }, Fr = "fcRadio", Rr = {
500
- name: Fr,
499
+ }, Or = "fcRadio", Sr = {
500
+ name: Or,
501
501
  props: {
502
502
  formCreateInject: {
503
503
  type: Object,
@@ -556,7 +556,7 @@ const wr = "fcFrame", Or = {
556
556
  }, {
557
557
  key: s + r + "-" + e.value
558
558
  }]));
559
- }), Qe(this.$slots)]);
559
+ }), Ze(this.$slots)]);
560
560
  },
561
561
  mounted() {
562
562
  this.$emit("fc.el", this.$refs.el);
@@ -591,10 +591,10 @@ const wr = "fcFrame", Or = {
591
591
  return h.type(e, t);
592
592
  };
593
593
  });
594
- function S(t, e) {
594
+ function D(t, e) {
595
595
  return {}.hasOwnProperty.call(t, e);
596
596
  }
597
- const Er = "fcSelect", Sr = {
597
+ const Er = "fcSelect", Rr = {
598
598
  name: Er,
599
599
  functional: !0,
600
600
  props: {
@@ -621,7 +621,7 @@ const Er = "fcSelect", Sr = {
621
621
  }, [h.trueArray(n.options) && n.options.map((a, l) => r(a, l))]), s = e.props.formCreateInject.options;
622
622
  return t("ElSelect", V([{}, e.data, {
623
623
  ref: "el"
624
- }]), [(Array.isArray(s) ? s : []).map((n, o) => S(n || "", "options") ? i(n, o) : r(n, o)), e.children]);
624
+ }]), [(Array.isArray(s) ? s : []).map((n, o) => D(n || "", "options") ? i(n, o) : r(n, o)), e.children]);
625
625
  },
626
626
  mounted() {
627
627
  this.$emit("fc.el", this.$refs.el);
@@ -677,7 +677,7 @@ const Er = "fcSelect", Sr = {
677
677
  check: () => this.updateValue(),
678
678
  "node-click": () => this.updateValue()
679
679
  }
680
- }]), [Qe(this.$slots)]);
680
+ }]), [Ze(this.$slots)]);
681
681
  },
682
682
  mounted() {
683
683
  this.setValue(), this.$emit("fc.el", this.$refs.tree);
@@ -691,7 +691,7 @@ function ut(t, e) {
691
691
  uid: e
692
692
  };
693
693
  }
694
- function ft(t) {
694
+ function ct(t) {
695
695
  return q(b({}, t), {
696
696
  file: t,
697
697
  value: t
@@ -749,11 +749,11 @@ const Ar = "fcUpload", Vr = {
749
749
  };
750
750
  },
751
751
  created() {
752
- this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ut).map(ft);
752
+ this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ut).map(ct);
753
753
  },
754
754
  watch: {
755
755
  value(t) {
756
- this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ut).map(ft), this.uploadList = this.$refs.upload.uploadFiles);
756
+ this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ut).map(ct), this.uploadList = this.$refs.upload.uploadFiles);
757
757
  },
758
758
  limit(t, e) {
759
759
  (e === 1 || t === 1) && this.update();
@@ -911,13 +911,13 @@ const Ar = "fcUpload", Vr = {
911
911
  }), this.$emit("fc.el", this.$refs.upload);
912
912
  }
913
913
  };
914
- function R(t, e, r) {
915
- ge.set(t, e, r);
914
+ function E(t, e, r) {
915
+ $e.set(t, e, r);
916
916
  }
917
- function re(t, e) {
918
- (ge.del || ge.delete)(t, e);
917
+ function ie(t, e) {
918
+ ($e.del || $e.delete)(t, e);
919
919
  }
920
- function ve(t, e = {}, r) {
920
+ function Ce(t, e = {}, r) {
921
921
  let i = !1;
922
922
  for (let s in e)
923
923
  if (Object.prototype.hasOwnProperty.call(e, s)) {
@@ -925,35 +925,35 @@ function ve(t, e = {}, r) {
925
925
  if ((i = Array.isArray(n)) || h.Object(n)) {
926
926
  let o = t[s] === void 0;
927
927
  if (i)
928
- i = !1, o && R(t, s, []);
928
+ i = !1, o && E(t, s, []);
929
929
  else if (n._clone && r !== void 0)
930
930
  if (r)
931
- n = n.getRule(), o && R(t, s, {});
931
+ n = n.getRule(), o && E(t, s, {});
932
932
  else {
933
- R(t, s, n._clone());
933
+ E(t, s, n._clone());
934
934
  continue;
935
935
  }
936
936
  else
937
- o && R(t, s, {});
938
- t[s] = ve(t[s], n, r);
937
+ o && E(t, s, {});
938
+ t[s] = Ce(t[s], n, r);
939
939
  } else
940
- R(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
940
+ E(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
941
941
  }
942
942
  return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
943
943
  }
944
944
  function W(t) {
945
- return ve({}, { value: t }).value;
945
+ return Ce({}, { value: t }).value;
946
946
  }
947
947
  const Ir = Object.assign || function(t) {
948
948
  for (let e, r = 1; r < arguments.length; r++)
949
949
  for (let i in e = arguments[r], e)
950
- Object.prototype.hasOwnProperty.call(e, i) && R(t, i, e[i]);
950
+ Object.prototype.hasOwnProperty.call(e, i) && E(t, i, e[i]);
951
951
  return t;
952
952
  };
953
953
  function _() {
954
954
  return Ir.apply(this, arguments);
955
955
  }
956
- function Ge(t) {
956
+ function Je(t) {
957
957
  return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : b({}, t);
958
958
  }
959
959
  const Pr = "fcGroup", Tr = {
@@ -1038,7 +1038,7 @@ const Pr = "fcGroup", Tr = {
1038
1038
  const s = i.$f.formData();
1039
1039
  if (t === e)
1040
1040
  i.$f.deferSyncValue(() => {
1041
- ve(i.rule, t), i.$f.setValue(s);
1041
+ Ce(i.rule, t), i.$f.setValue(s);
1042
1042
  }, !0);
1043
1043
  else {
1044
1044
  const n = i.$f.formData();
@@ -1078,7 +1078,7 @@ const Pr = "fcGroup", Tr = {
1078
1078
  },
1079
1079
  methods: {
1080
1080
  _value(t) {
1081
- return t && S(t, this.field) ? t[this.field] : t;
1081
+ return t && D(t, this.field) ? t[this.field] : t;
1082
1082
  },
1083
1083
  cache(t, e) {
1084
1084
  this.cacheValue[t] = JSON.stringify(e);
@@ -1133,7 +1133,10 @@ const Pr = "fcGroup", Tr = {
1133
1133
  this.$delete(this.cacheRule, t), this.$delete(this.cacheValue, t), e && this.$nextTick(() => this.$emit("remove", r));
1134
1134
  },
1135
1135
  add(t) {
1136
- this.disabled || this.onBeforeAdd(this.value) === !1 || this.addRule(t, !0);
1136
+ if (this.disabled || this.onBeforeAdd(this.value) === !1)
1137
+ return;
1138
+ const e = [...this.value];
1139
+ e.push(this.defaultValue ? W(this.defaultValue) : this.field ? null : {}), this.input(e);
1137
1140
  },
1138
1141
  del(t, e) {
1139
1142
  if (this.disabled || this.onBeforeRemove(this.value, t) === !1)
@@ -1224,7 +1227,7 @@ const Pr = "fcGroup", Tr = {
1224
1227
  const {
1225
1228
  rule: l,
1226
1229
  options: u
1227
- } = this.cacheRule[o], f = r && !s ? this.makeIcon(e.length, a, o) : [];
1230
+ } = this.cacheRule[o], c = r && !s ? this.makeIcon(e.length, a, o) : [];
1228
1231
  return t("div", {
1229
1232
  class: "_fc-group-container",
1230
1233
  key: o
@@ -1232,9 +1235,9 @@ const Pr = "fcGroup", Tr = {
1232
1235
  key: o
1233
1236
  }, {
1234
1237
  on: {
1235
- "update:value": (d) => this.formData(o, d),
1236
- "emit-event": (d, ...g) => this.emitEvent(d, g, a, o),
1237
- input: (d) => this.add$f(a, o, d)
1238
+ "update:value": (p) => this.formData(o, p),
1239
+ "emit-event": (p, ...m) => this.emitEvent(p, m, a, o),
1240
+ input: (p) => this.add$f(a, o, p)
1238
1241
  }
1239
1242
  }, {}, {
1240
1243
  props: {
@@ -1249,9 +1252,9 @@ const Pr = "fcGroup", Tr = {
1249
1252
  }
1250
1253
  }])), t("div", {
1251
1254
  class: "_fc-group-idx"
1252
- }, [a + 1]), f.length ? t("div", {
1255
+ }, [a + 1]), c.length ? t("div", {
1253
1256
  class: "_fc-group-handle fc-clock"
1254
- }, [f]) : null]);
1257
+ }, [c]) : null]);
1255
1258
  });
1256
1259
  return t("div", {
1257
1260
  key: "con",
@@ -1344,254 +1347,92 @@ const Pr = "fcGroup", Tr = {
1344
1347
  }
1345
1348
  }, Mr = [
1346
1349
  Cr,
1347
- Or,
1348
- Rr,
1350
+ Fr,
1349
1351
  Sr,
1352
+ Rr,
1350
1353
  Dr,
1351
1354
  Vr,
1352
1355
  Tr,
1353
1356
  Lr
1354
1357
  ];
1355
- function ce(t, e) {
1358
+ function se(t, e) {
1356
1359
  var r = null;
1357
1360
  return function(...i) {
1358
1361
  r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
1359
1362
  };
1360
1363
  }
1361
- function $e(t) {
1364
+ function be(t) {
1362
1365
  let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
1363
1366
  return e.indexOf("-") === 0 && (e = e.substr(1)), e;
1364
1367
  }
1365
- const Se = (t, e) => {
1366
- if (!(!t || t === e || !t.$props)) {
1367
- if (t.$props.formCreateInject)
1368
- return t.$props.formCreateInject;
1369
- if (t.$parent)
1370
- return Se(t.$parent, e);
1371
- }
1372
- };
1373
- function Nr(t, e, r) {
1374
- const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1375
- return {
1376
- name: i,
1377
- componentName: i,
1378
- model: {
1379
- prop: "api"
1380
- },
1381
- components: e,
1382
- directives: r,
1383
- provide() {
1384
- return {
1385
- $pfc: this
1386
- };
1387
- },
1388
- inject: { $pfc: { default: null } },
1389
- props: {
1390
- rule: {
1391
- type: Array,
1392
- required: !0,
1393
- default: () => []
1394
- },
1395
- option: {
1396
- type: Object,
1397
- default: () => ({})
1398
- },
1399
- extendOption: Boolean,
1400
- driver: [String, Object],
1401
- value: Object,
1402
- disabled: {
1403
- type: Boolean,
1404
- default: void 0
1405
- },
1406
- preview: {
1407
- type: Boolean,
1408
- default: void 0
1409
- },
1410
- index: [String, Number],
1411
- api: Object,
1412
- locale: [String, Object],
1413
- name: String,
1414
- subForm: {
1415
- type: Boolean,
1416
- default: !0
1417
- },
1418
- inFor: Boolean
1419
- },
1420
- render() {
1421
- return this.fc.render();
1422
- },
1423
- setup(s) {
1424
- const n = or().proxy;
1425
- ar("parentFC", n);
1426
- const o = lr("parentFC", null);
1427
- let a = o;
1428
- if (o)
1429
- for (; a.parent; )
1430
- a = a.parent;
1431
- else
1432
- a = n;
1433
- const { rule: l, value: u, subForm: f, inFor: d } = lt(s), g = ie({
1434
- ctxInject: {},
1435
- destroyed: !1,
1436
- isShow: !0,
1437
- unique: 1,
1438
- renderRule: [...l.value || []],
1439
- updateValue: JSON.stringify(u.value || {})
1440
- }), m = new t(n), v = m.api(), w = d.value, j = () => {
1441
- if (o) {
1442
- const F = Se(n, o);
1443
- if (F) {
1444
- let D;
1445
- w ? (D = H(F.getSubForm()), D.push(v)) : D = v, F.subForm(D);
1446
- }
1447
- }
1448
- }, ee = () => {
1449
- const F = Se(n, o);
1450
- if (F)
1451
- if (w) {
1452
- const D = H(F.getSubForm()), B = D.indexOf(v);
1453
- B > -1 && D.splice(B, 1);
1454
- } else
1455
- F.subForm();
1456
- };
1457
- let P = null;
1458
- ur(() => {
1459
- L(() => {
1460
- let F = "";
1461
- const D = s.option && s.option.globalClass || {};
1462
- Object.keys(D).forEach((B) => {
1463
- let se = "";
1464
- D[B].style && Object.keys(D[B].style).forEach((_e) => {
1465
- se += $e(_e) + ":" + D[B].style[_e] + ";";
1466
- }), D[B].content && (se += D[B].content + ";"), se && (F += `.${B}{${se}}`);
1467
- }), s.option && s.option.style && (F += s.option.style), P || (P = document.createElement("style"), P.type = "text/css", document.head.appendChild(P)), P.innerHTML = F || "";
1468
- }, () => {
1469
- });
1470
- });
1471
- const N = ce(() => {
1472
- m.bus.$emit("$loadData.$topForm");
1473
- }, 100), Ae = ce(() => {
1474
- m.bus.$emit("$loadData.$form");
1475
- }, 100), be = (F) => {
1476
- m.bus.$emit("change-$form." + F);
1477
- };
1478
- return fr(() => {
1479
- o && (v.top.bus.$on("$loadData.$form", N), v.top.bus.$on("change", be)), m.mounted();
1480
- }), cr(() => {
1481
- o && (v.top.bus.$off("$loadData.$form", N), v.top.bus.$off("change", be)), P && document.head.removeChild(P), ee(), g.destroyed = !0, m.unmount();
1482
- }), hr(() => {
1483
- m.updated();
1484
- }), L(f, (F) => {
1485
- F ? j() : ee();
1486
- }, { immediate: !0 }), L(() => [...l.value], (F) => {
1487
- m.$handle.isBreakWatch() || F.length === g.renderRule.length && F.every((D) => g.renderRule.indexOf(D) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
1488
- }), L(() => s.option, () => {
1489
- m.initOptions(), v.refresh();
1490
- }, { deep: !0 }), L(() => [s.disabled, s.preview], () => {
1491
- v.refresh();
1492
- }), L(u, (F) => {
1493
- JSON.stringify(F || {}) !== g.updateValue && (v.config.forceCoverValue ? v.coverValue(F || {}) : v.setValue(F || {}));
1494
- }, { deep: !0, flush: "post" }), L(() => s.index, () => {
1495
- v.coverValue({}), m.$handle.updateAppendData(), T(() => {
1496
- T(() => {
1497
- v.clearValidateState();
1498
- });
1499
- });
1500
- }, { flush: "sync" }), q(b({
1501
- fc: pe(m),
1502
- parent: o && pe(o),
1503
- top: pe(a),
1504
- fapi: pe(v)
1505
- }, lt(g)), {
1506
- getGroupInject: () => Se(n, o),
1507
- refresh() {
1508
- ++g.unique;
1509
- },
1510
- renderRule() {
1511
- g.renderRule = [...l.value || []];
1512
- },
1513
- updateValue(F) {
1514
- if (g.destroyed) return;
1515
- const D = JSON.stringify(F);
1516
- g.updateValue !== D && (g.updateValue = D, n.$emit("update:value", F), T(() => {
1517
- Ae(), o || N();
1518
- }));
1519
- }
1520
- });
1521
- },
1522
- created() {
1523
- this.$emit("input", this.fapi), this.fc.init();
1524
- }
1525
- };
1526
- }
1527
- const Ft = ["attrs", "props", "domProps", "scopedSlots"], Rt = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
1528
- const i = [...Ft, ...r.normal || []], s = [...Rt, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1368
+ const Ot = ["attrs", "props", "domProps", "scopedSlots"], St = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
1369
+ const i = [...Ot, ...r.normal || []], s = [...St, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1529
1370
  return t.reduce((a, l) => {
1530
1371
  for (const u in l)
1531
1372
  if (a[u])
1532
1373
  if (o.indexOf(u) > -1)
1533
- a[u] = Y([l[u]], a[u]);
1374
+ a[u] = ee([l[u]], a[u]);
1534
1375
  else if (i.indexOf(u) > -1)
1535
1376
  a[u] = b(b({}, a[u]), l[u]);
1536
1377
  else if (s.indexOf(u) > -1) {
1537
- const f = a[u] instanceof Array ? a[u] : [a[u]], d = l[u] instanceof Array ? l[u] : [l[u]];
1538
- a[u] = [...f, ...d];
1378
+ const c = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
1379
+ a[u] = [...c, ...p];
1539
1380
  } else if (n.indexOf(u) > -1)
1540
- for (const f in l[u])
1541
- if (a[u][f]) {
1542
- const d = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], g = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
1543
- a[u][f] = [...d, ...g];
1381
+ for (const c in l[u])
1382
+ if (a[u][c]) {
1383
+ const p = a[u][c] instanceof Array ? a[u][c] : [a[u][c]], m = l[u][c] instanceof Array ? l[u][c] : [l[u][c]];
1384
+ a[u][c] = [...p, ...m];
1544
1385
  } else
1545
- a[u][f] = l[u][f];
1386
+ a[u][c] = l[u][c];
1546
1387
  else if (u === "hook")
1547
- for (let f in l[u])
1548
- a[u][f] ? a[u][f] = qr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
1388
+ for (let c in l[u])
1389
+ a[u][c] ? a[u][c] = Nr(a[u][c], l[u][c]) : a[u][c] = l[u][c];
1549
1390
  else
1550
1391
  a[u] = l[u];
1551
1392
  else
1552
1393
  i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = b({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? b({}, l[u]) : l[u] : a[u] = l[u];
1553
1394
  return a;
1554
1395
  }, e);
1555
- }, qr = (t, e) => function() {
1396
+ }, Nr = (t, e) => function() {
1556
1397
  t && t.apply(this, arguments), e && e.apply(this, arguments);
1557
- }, St = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ze = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
1398
+ }, Rt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ye = ["validate", "children", "control"], xe = ["effect", "deep", "renderSlots"];
1558
1399
  function kt() {
1559
- return [...St, ...Ft, ...Rt, ...Et, ...Ze, ...Ye];
1400
+ return [...Rt, ...Ot, ...St, ...Et, ...Ye, ...xe];
1560
1401
  }
1561
1402
  function Dt(t, e, r) {
1562
1403
  return `[form-create ${t}]: ${e}`;
1563
1404
  }
1564
- function xe(t, e) {
1405
+ function et(t, e) {
1565
1406
  console.error(Dt("err", t));
1566
1407
  }
1567
- function Ur(t) {
1568
- xe(t.toString()), console.error(t);
1408
+ function qr(t) {
1409
+ et(t.toString()), console.error(t);
1569
1410
  }
1570
1411
  function jt(t) {
1571
1412
  return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
1572
1413
  }
1573
- const Je = "[[FORM-CREATE-PREFIX-", We = "-FORM-CREATE-SUFFIX]]";
1574
- function et(t, e) {
1575
- return JSON.stringify(ve(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1414
+ const We = "[[FORM-CREATE-PREFIX-", Ke = "-FORM-CREATE-SUFFIX]]";
1415
+ function _e(t, e) {
1416
+ return JSON.stringify(Ce(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1576
1417
  if (!(i && i._isVue === !0)) {
1577
1418
  if (typeof i != "function")
1578
1419
  return i;
1579
1420
  if (i.__json)
1580
1421
  return i.__json;
1581
1422
  if (i.__origin && (i = i.__origin), !i.__emit)
1582
- return Je + i + We;
1423
+ return We + i + Ke;
1583
1424
  }
1584
1425
  }, e);
1585
1426
  }
1586
- function Te(t) {
1427
+ function Be(t) {
1587
1428
  return new Function("return " + t)();
1588
1429
  }
1589
- function K(t, e) {
1430
+ function z(t, e) {
1590
1431
  if (t && h.String(t) && t.length > 4) {
1591
1432
  let r = t.trim(), i = !1;
1592
1433
  try {
1593
- if (r.indexOf(We) > 0 && r.indexOf(Je) === 0)
1594
- r = r.replace(We, "").replace(Je, ""), i = !0;
1434
+ if (r.indexOf(Ke) > 0 && r.indexOf(We) === 0)
1435
+ r = r.replace(Ke, "").replace(We, ""), i = !0;
1595
1436
  else if (r.indexOf("$FN:") === 0)
1596
1437
  r = r.substring(4), i = !0;
1597
1438
  else if (r.indexOf("$EXEC:") === 0)
@@ -1605,19 +1446,19 @@ function K(t, e) {
1605
1446
  }, r.__json = t, r.__inject = !0, r;
1606
1447
  } else {
1607
1448
  if (r.indexOf("$FNX:") === 0)
1608
- return r = Te("function($inject){" + r.substring(5) + "}"), r.__json = t, r.__inject = !0, r;
1449
+ return r = Be("function($inject){" + r.substring(5) + "}"), r.__json = t, r.__inject = !0, r;
1609
1450
  (!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
1610
1451
  }
1611
1452
  if (!i) return t;
1612
1453
  let s;
1613
1454
  try {
1614
- s = Te(r);
1455
+ s = Be(r);
1615
1456
  } catch (n) {
1616
- s = Te("function " + r);
1457
+ s = Be("function " + r);
1617
1458
  }
1618
1459
  return s.__json = t, s;
1619
1460
  } catch (s) {
1620
- xe(`解析失败:${r}
1461
+ et(`解析失败:${r}
1621
1462
 
1622
1463
  err: ${s}`);
1623
1464
  return;
@@ -1627,21 +1468,21 @@ err: ${s}`);
1627
1468
  }
1628
1469
  function At(t, e) {
1629
1470
  return JSON.parse(t, function(r, i) {
1630
- return h.Undef(i) || !i.indexOf ? i : K(i, e);
1471
+ return h.Undef(i) || !i.indexOf ? i : z(i, e);
1631
1472
  });
1632
1473
  }
1633
- let Hr = 0;
1634
- function je() {
1635
- const t = 370 + ++Hr;
1474
+ let Ur = 0;
1475
+ function Ae() {
1476
+ const t = 370 + ++Ur;
1636
1477
  return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
1637
1478
  }
1638
- function ne(t, e, r) {
1479
+ function oe(t, e, r) {
1639
1480
  let i = t, s;
1640
1481
  return (e || "").split(".").forEach((n) => {
1641
- s && ((!i[s] || typeof i[s] != "object") && R(i, s, {}), i = i[s]), s = n;
1642
- }), R(i, s, r), i;
1482
+ s && ((!i[s] || typeof i[s] != "object") && E(i, s, {}), i = i[s]), s = n;
1483
+ }), E(i, s, r), i;
1643
1484
  }
1644
- function Ke(t, e) {
1485
+ function Xe(t, e) {
1645
1486
  return {
1646
1487
  value: t,
1647
1488
  enumerable: !1,
@@ -1653,18 +1494,18 @@ function Vt(t, e) {
1653
1494
  return It([t], e || !1)[0];
1654
1495
  }
1655
1496
  function It(t, e) {
1656
- return ve([], [...t], e || !1);
1497
+ return Ce([], [...t], e || !1);
1657
1498
  }
1658
- function x(t, e) {
1659
- return Y(Array.isArray(e) ? e : [e], t, { array: Ze, normal: Ye }), t;
1499
+ function te(t, e) {
1500
+ return ee(Array.isArray(e) ? e : [e], t, { array: Ye, normal: xe }), t;
1660
1501
  }
1661
- function ct(t) {
1502
+ function ft(t) {
1662
1503
  const e = h.Function(t.getRule) ? t.getRule() : t;
1663
1504
  return e.type || (e.type = "input"), e;
1664
1505
  }
1665
- function Gr(t, e) {
1506
+ function Hr(t, e) {
1666
1507
  return t ? (Object.keys(e || {}).forEach((r) => {
1667
- e[r] && (t[r] = x(t[r] || {}, e[r]));
1508
+ e[r] && (t[r] = te(t[r] || {}, e[r]));
1668
1509
  }), t) : e;
1669
1510
  }
1670
1511
  function Pt(t, e) {
@@ -1674,35 +1515,35 @@ function Pt(t, e) {
1674
1515
  }
1675
1516
  }, r), {}));
1676
1517
  }
1677
- function Z(t) {
1518
+ function x(t) {
1678
1519
  return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
1679
1520
  }
1680
- function O(t, e) {
1521
+ function F(t, e) {
1681
1522
  try {
1682
1523
  e = t();
1683
1524
  } catch (r) {
1684
- Ur(r);
1525
+ qr(r);
1685
1526
  }
1686
1527
  return e;
1687
1528
  }
1688
- function Xe(t, e) {
1529
+ function ze(t, e) {
1689
1530
  let r = null;
1690
- return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
1531
+ return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => ze(i, e)) : r = t, r && e && H(r).forEach((i) => {
1691
1532
  (Array.isArray(i) ? i : [i]).forEach((n) => {
1692
1533
  n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
1693
1534
  });
1694
1535
  }), r;
1695
1536
  }
1696
- function Jr(t, e) {
1537
+ function Gr(t, e) {
1697
1538
  if (h.Object(t)) {
1698
1539
  const r = {};
1699
1540
  return Object.keys(t).forEach((i) => {
1700
- r[i] = Xe(t[i], i);
1541
+ r[i] = ze(t[i], i);
1701
1542
  }), r;
1702
1543
  } else
1703
- return Xe(t, e);
1544
+ return ze(t, e);
1704
1545
  }
1705
- function Fe() {
1546
+ function Se() {
1706
1547
  const t = {}, e = (r) => r || "default";
1707
1548
  return {
1708
1549
  setSlot(r, i) {
@@ -1718,7 +1559,7 @@ function Fe() {
1718
1559
  const n = s();
1719
1560
  Array.isArray(n) ? i.push(...n) : i.push(n);
1720
1561
  } else h.Undef(s) || i.push(s);
1721
- }), Jr(i, r);
1562
+ }), Gr(i, r);
1722
1563
  },
1723
1564
  getSlots() {
1724
1565
  let r = [];
@@ -1738,12 +1579,12 @@ function Fe() {
1738
1579
  }
1739
1580
  };
1740
1581
  }
1741
- function Re(t, e) {
1582
+ function Ee(t, e) {
1742
1583
  return Object.setPrototypeOf(t, e), t;
1743
1584
  }
1744
- const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
1585
+ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
1745
1586
  "==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
1746
- "!=": (t, e) => !fe["=="](t, e),
1587
+ "!=": (t, e) => !ce["=="](t, e),
1747
1588
  ">": (t, e) => t > e,
1748
1589
  ">=": (t, e) => t >= e,
1749
1590
  "<": (t, e) => t < e,
@@ -1752,13 +1593,13 @@ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1752
1593
  return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
1753
1594
  },
1754
1595
  notOn(t, e) {
1755
- return !fe.on(t, e);
1596
+ return !ce.on(t, e);
1756
1597
  },
1757
1598
  in(t, e) {
1758
1599
  return e && e.indexOf && e.indexOf(t) > -1;
1759
1600
  },
1760
1601
  notIn(t, e) {
1761
- return !fe.in(t, e);
1602
+ return !ce.in(t, e);
1762
1603
  },
1763
1604
  between(t, e) {
1764
1605
  return t > e[0] && t < e[1];
@@ -1776,12 +1617,12 @@ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1776
1617
  return new RegExp(e, "g").test(t);
1777
1618
  }
1778
1619
  };
1779
- function M(t, e) {
1620
+ function B(t, e) {
1780
1621
  return (Array.isArray(e) ? e : (e || "").split(".")).forEach((r) => {
1781
1622
  t != null && (t = t[r]);
1782
1623
  }), t;
1783
1624
  }
1784
- function Wr(t) {
1625
+ function Jr(t) {
1785
1626
  const e = /{{\s*(.*?)\s*}}/g;
1786
1627
  let r;
1787
1628
  const i = {};
@@ -1795,6 +1636,170 @@ function dt(t) {
1795
1636
  n === 0 ? i = s : i += "." + s, r.push(i);
1796
1637
  }), r.join(" && ");
1797
1638
  }
1639
+ const ke = (t, e) => {
1640
+ if (!(!t || t === e || !t.$props)) {
1641
+ if (t.$props.formCreateInject)
1642
+ return t.$props.formCreateInject;
1643
+ if (t.$parent)
1644
+ return ke(t.$parent, e);
1645
+ }
1646
+ };
1647
+ function Wr(t, e, r) {
1648
+ const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1649
+ return {
1650
+ name: i,
1651
+ componentName: i,
1652
+ model: {
1653
+ prop: "api"
1654
+ },
1655
+ components: e,
1656
+ directives: r,
1657
+ provide() {
1658
+ return {
1659
+ $pfc: this
1660
+ };
1661
+ },
1662
+ inject: { $pfc: { default: null } },
1663
+ props: {
1664
+ rule: {
1665
+ type: Array,
1666
+ required: !0,
1667
+ default: () => []
1668
+ },
1669
+ option: {
1670
+ type: Object,
1671
+ default: () => ({})
1672
+ },
1673
+ extendOption: Boolean,
1674
+ driver: [String, Object],
1675
+ value: Object,
1676
+ disabled: {
1677
+ type: Boolean,
1678
+ default: void 0
1679
+ },
1680
+ preview: {
1681
+ type: Boolean,
1682
+ default: void 0
1683
+ },
1684
+ index: [String, Number],
1685
+ api: Object,
1686
+ locale: [String, Object],
1687
+ name: String,
1688
+ subForm: {
1689
+ type: Boolean,
1690
+ default: !0
1691
+ },
1692
+ inFor: Boolean
1693
+ },
1694
+ render() {
1695
+ return this.fc.render();
1696
+ },
1697
+ setup(s) {
1698
+ const n = or().proxy;
1699
+ ar("parentFC", n);
1700
+ const o = lr("parentFC", null);
1701
+ let a = o;
1702
+ if (o)
1703
+ for (; a.parent; )
1704
+ a = a.parent;
1705
+ else
1706
+ a = n;
1707
+ const { rule: l, value: u, subForm: c, inFor: p } = lt(s), m = ne({
1708
+ ctxInject: {},
1709
+ destroyed: !1,
1710
+ isShow: !0,
1711
+ unique: 1,
1712
+ renderRule: [...l.value || []],
1713
+ updateValue: JSON.stringify(u.value || {})
1714
+ }), g = new t(n), $ = g.api(), w = p.value, O = () => {
1715
+ if (o) {
1716
+ const S = ke(n, o);
1717
+ if (S) {
1718
+ let R;
1719
+ w ? (R = H(S.getSubForm()), R.push($)) : R = $, S.subForm(R);
1720
+ }
1721
+ }
1722
+ }, G = () => {
1723
+ const S = ke(n, o);
1724
+ if (S)
1725
+ if (w) {
1726
+ const R = H(S.getSubForm()), N = R.indexOf($);
1727
+ N > -1 && R.splice(N, 1);
1728
+ } else
1729
+ S.subForm();
1730
+ };
1731
+ let T = null;
1732
+ ur(() => {
1733
+ L(() => {
1734
+ let S = "";
1735
+ const R = s.option && s.option.globalClass || {};
1736
+ Object.keys(R).forEach((N) => {
1737
+ let pe = "";
1738
+ R[N].style && Object.keys(R[N].style).forEach((K) => {
1739
+ pe += be(K) + ":" + R[N].style[K] + ";";
1740
+ }), R[N].content && (pe += R[N].content + ";"), pe && (S += `.${N}{${pe}}`);
1741
+ }), s.option && s.option.style && (S += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = S || "";
1742
+ }, () => {
1743
+ });
1744
+ });
1745
+ const M = se(() => {
1746
+ g.bus.$emit("$loadData.$topForm");
1747
+ }, 100), he = se(function() {
1748
+ g.bus.$emit("$loadData.$scopeForm");
1749
+ }, 100), Ve = se(() => {
1750
+ g.bus.$emit("$loadData.$form");
1751
+ }, 100), de = (S) => {
1752
+ g.bus.$emit("change-$form." + S);
1753
+ };
1754
+ return cr(() => {
1755
+ o && ($.top.bus.$on("$loadData.$form", M), $.top.bus.$on("change", de)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
1756
+ }), fr(() => {
1757
+ o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), m.destroyed = !0, g.unmount();
1758
+ }), hr(() => {
1759
+ g.updated();
1760
+ }), L(c, (S) => {
1761
+ S ? O() : G();
1762
+ }, { immediate: !0 }), L(() => s.option, () => {
1763
+ g.initOptions(), $.refresh();
1764
+ }, { deep: !0 }), L(() => [...l.value], (S) => {
1765
+ g.$handle.isBreakWatch() || S.length === m.renderRule.length && S.every((R) => m.renderRule.indexOf(R) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1766
+ }), L(() => [s.disabled, s.preview], () => {
1767
+ $.refresh();
1768
+ }), L(u, (S) => {
1769
+ _e(S || {}) !== m.updateValue && ($.config.forceCoverValue ? $.coverValue(S || {}) : $.setValue(S || {}));
1770
+ }, { deep: !0, flush: "post" }), L(() => s.index, () => {
1771
+ $.coverValue({}), g.$handle.updateAppendData(), I(() => {
1772
+ I(() => {
1773
+ $.clearValidateState();
1774
+ });
1775
+ });
1776
+ }, { flush: "sync" }), q(b({
1777
+ fc: ge(g),
1778
+ parent: o && ge(o),
1779
+ top: ge(a),
1780
+ fapi: ge($)
1781
+ }, lt(m)), {
1782
+ getGroupInject: () => ke(n, o),
1783
+ refresh() {
1784
+ ++m.unique;
1785
+ },
1786
+ renderRule() {
1787
+ m.renderRule = [...l.value || []];
1788
+ },
1789
+ updateValue(S) {
1790
+ if (m.destroyed) return;
1791
+ const R = _e(S);
1792
+ m.updateValue !== R && (m.updateValue = R, n.$emit("update:value", S), I(() => {
1793
+ Ve(), o ? c.value || he() : (M(), he());
1794
+ }));
1795
+ }
1796
+ });
1797
+ },
1798
+ created() {
1799
+ this.$emit("input", this.fapi), this.fc.init();
1800
+ }
1801
+ };
1802
+ }
1798
1803
  function Tt() {
1799
1804
  return {
1800
1805
  props: {},
@@ -1807,7 +1812,7 @@ function Tt() {
1807
1812
  value: void 0
1808
1813
  };
1809
1814
  }
1810
- function I(t, e) {
1815
+ function P(t, e) {
1811
1816
  return (r, i, s, n = {}) => {
1812
1817
  const o = new tt(t, r, i, s, n);
1813
1818
  return e && (h.Function(e) ? e(o) : o.props(e)), o;
@@ -1821,7 +1826,7 @@ _(tt.prototype, {
1821
1826
  return this._data;
1822
1827
  },
1823
1828
  setProp(t, e) {
1824
- return R(this._data, t, e), this;
1829
+ return E(this._data, t, e), this;
1825
1830
  },
1826
1831
  _clone() {
1827
1832
  const t = new this.constructor();
@@ -1831,12 +1836,12 @@ _(tt.prototype, {
1831
1836
  function Bt(t) {
1832
1837
  t.forEach((e) => {
1833
1838
  tt.prototype[e] = function(r) {
1834
- return x(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
1839
+ return te(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
1835
1840
  };
1836
1841
  });
1837
1842
  }
1838
1843
  Bt(kt());
1839
- const Lt = I("");
1844
+ const Lt = P("");
1840
1845
  function Kr(t, e, r) {
1841
1846
  let i = Lt("", e);
1842
1847
  return i._data.type = t, i._data.title = r, i;
@@ -1850,7 +1855,7 @@ function Xr() {
1850
1855
  create: Kr,
1851
1856
  createTmp: pt,
1852
1857
  template: pt,
1853
- factory: I
1858
+ factory: P
1854
1859
  };
1855
1860
  }
1856
1861
  function zr(t, e, r) {
@@ -1899,8 +1904,8 @@ function gt(t, e, r) {
1899
1904
  (e || Mt)(q(b({}, t), {
1900
1905
  onSuccess(n) {
1901
1906
  let o = (l) => l;
1902
- const a = K(t.parse);
1903
- h.Function(a) ? o = a : a && h.String(a) && (o = (l) => M(l, a)), i(o(n, void 0, r));
1907
+ const a = z(t.parse);
1908
+ h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), i(o(n, void 0, r));
1904
1909
  },
1905
1910
  onError(n) {
1906
1911
  s(n);
@@ -1908,7 +1913,7 @@ function gt(t, e, r) {
1908
1913
  }));
1909
1914
  });
1910
1915
  }
1911
- function ye(t) {
1916
+ function ve(t) {
1912
1917
  return W(t);
1913
1918
  }
1914
1919
  function Qr(t) {
@@ -1916,9 +1921,10 @@ function Qr(t) {
1916
1921
  return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
1917
1922
  }
1918
1923
  function r(n, o, a) {
1919
- e(n).forEach((l) => {
1920
- t.getCtxs(l).forEach((u) => {
1921
- R(u.rule, o, a), t.$render.clearCache(u);
1924
+ h.Undef(n) ? n = Object.keys(b(b({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1925
+ const u = t.fieldCtx[l] || t.nameCtx[l];
1926
+ u && u.forEach((c) => {
1927
+ E(c.rule, o, a), t.$render.clearCache(c);
1922
1928
  });
1923
1929
  });
1924
1930
  }
@@ -1930,6 +1936,12 @@ function Qr(t) {
1930
1936
  }, []);
1931
1937
  }
1932
1938
  const s = {
1939
+ get isScope() {
1940
+ return t.vm.$props.subForm === !1;
1941
+ },
1942
+ get isPreview() {
1943
+ return t.preview;
1944
+ },
1933
1945
  get config() {
1934
1946
  return t.options;
1935
1947
  },
@@ -1954,6 +1966,15 @@ function Qr(t) {
1954
1966
  get top() {
1955
1967
  return s.parent ? s.parent.top : s;
1956
1968
  },
1969
+ get scope() {
1970
+ let n = t.vm;
1971
+ for (; n && n.fapi; )
1972
+ if (n.$props.subForm)
1973
+ n = n.parent;
1974
+ else
1975
+ return n.fapi;
1976
+ return s.top;
1977
+ },
1957
1978
  get children() {
1958
1979
  return i();
1959
1980
  },
@@ -1973,17 +1994,17 @@ function Qr(t) {
1973
1994
  }
1974
1995
  },
1975
1996
  formData(n) {
1976
- if (n == null) {
1997
+ if (n == null || typeof n == "boolean") {
1977
1998
  const o = {};
1978
1999
  return Object.keys(t.form).forEach((a) => {
1979
- t.ignoreFields.indexOf(a) === -1 && (o[a] = ye(t.form[a]));
2000
+ (n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = ve(t.form[a]));
1980
2001
  }), o;
1981
2002
  } else
1982
2003
  return e(n).reduce((o, a) => (o[a] = s.getValue(a), o), {});
1983
2004
  },
1984
2005
  getValue(n) {
1985
2006
  const o = t.getFieldCtx(n);
1986
- return o ? ye(o.rule.value) : t.options.appendValue !== !1 && S(t.appendData, n) ? ye(t.appendData[n]) : void 0;
2007
+ return o ? ve(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? ve(t.appendData[n]) : void 0;
1987
2008
  },
1988
2009
  coverValue(n) {
1989
2010
  const o = b({}, n || {});
@@ -1991,9 +2012,9 @@ function Qr(t) {
1991
2012
  t.appendData = {}, s.fields().forEach((a) => {
1992
2013
  const l = t.fieldCtx[a];
1993
2014
  if (l) {
1994
- const u = S(n, a);
1995
- l.forEach((f) => {
1996
- f.rule.value = u ? n[a] : void 0;
2015
+ const u = D(n, a);
2016
+ l.forEach((c) => {
2017
+ c.rule.value = u ? n[a] : void 0;
1997
2018
  }), delete o[a];
1998
2019
  }
1999
2020
  }), _(t.appendData, o);
@@ -2020,7 +2041,7 @@ function Qr(t) {
2020
2041
  }, !0), o ? o.origin : void 0;
2021
2042
  },
2022
2043
  removeRule(n) {
2023
- const o = n && Z(n);
2044
+ const o = n && x(n);
2024
2045
  if (o)
2025
2046
  return o.rm(), o.origin;
2026
2047
  },
@@ -2030,24 +2051,24 @@ function Qr(t) {
2030
2051
  fields: () => t.fields(),
2031
2052
  append: (n, o, a) => {
2032
2053
  let l = t.sort.length - 1, u;
2033
- const f = t.getCtx(o);
2034
- if (f)
2054
+ const c = t.getCtx(o);
2055
+ if (c)
2035
2056
  if (a) {
2036
- if (u = f.getPending("children", f.rule.children), !Array.isArray(u)) return;
2037
- l = f.rule.children.length - 1;
2057
+ if (u = c.getPending("children", c.rule.children), !Array.isArray(u)) return;
2058
+ l = c.rule.children.length - 1;
2038
2059
  } else
2039
- l = f.root.indexOf(f.origin), u = f.root;
2060
+ l = c.root.indexOf(c.origin), u = c.root;
2040
2061
  else u = t.rules;
2041
2062
  u.splice(l + 1, 0, n);
2042
2063
  },
2043
2064
  prepend: (n, o, a) => {
2044
2065
  let l = 0, u;
2045
- const f = t.getCtx(o);
2046
- if (f)
2066
+ const c = t.getCtx(o);
2067
+ if (c)
2047
2068
  if (a) {
2048
- if (u = f.getPending("children", f.rule.children), !Array.isArray(u)) return;
2069
+ if (u = c.getPending("children", c.rule.children), !Array.isArray(u)) return;
2049
2070
  } else
2050
- l = f.root.indexOf(f.origin), u = f.root;
2071
+ l = c.root.indexOf(c.origin), u = c.root;
2051
2072
  else u = t.rules;
2052
2073
  u.splice(l, 0, n);
2053
2074
  },
@@ -2070,7 +2091,7 @@ function Qr(t) {
2070
2091
  disabled(n, o) {
2071
2092
  e(o).forEach((a) => {
2072
2093
  t.getCtxs(a).forEach((l) => {
2073
- R(l.rule.props, "disabled", !!n);
2094
+ E(l.rule.props, "disabled", !!n);
2074
2095
  });
2075
2096
  }), t.refresh();
2076
2097
  },
@@ -2109,7 +2130,7 @@ function Qr(t) {
2109
2130
  n.forEach((a) => s.sync(a));
2110
2131
  return;
2111
2132
  }
2112
- let o = h.Object(n) ? Z(n) : t.getCtxs(n);
2133
+ let o = h.Object(n) ? x(n) : t.getCtxs(n);
2113
2134
  o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
2114
2135
  if (!a.deleted) {
2115
2136
  const l = t.subForm[a.id];
@@ -2128,7 +2149,7 @@ function Qr(t) {
2128
2149
  t.$manager.updateOptions(t.options), s.refresh();
2129
2150
  },
2130
2151
  hideForm: (n) => {
2131
- R(t.vm, "isShow", !n);
2152
+ E(t.vm, "isShow", !n);
2132
2153
  },
2133
2154
  changeStatus: () => t.changeStatus,
2134
2155
  clearChangeStatus: () => {
@@ -2146,7 +2167,7 @@ function Qr(t) {
2146
2167
  },
2147
2168
  mergeRule: (n, o) => {
2148
2169
  t.getCtxs(n).forEach((a) => {
2149
- x(a.rule, o);
2170
+ te(a.rule, o);
2150
2171
  });
2151
2172
  },
2152
2173
  mergeRules(n) {
@@ -2173,7 +2194,7 @@ function Qr(t) {
2173
2194
  },
2174
2195
  setEffect(n, o, a) {
2175
2196
  const l = t.getCtx(n);
2176
- l && o && (o[0] === "$" && (o = o.substr(1)), S(l.rule, "$" + o) && R(l.rule, "$" + o, a), S(l.rule, "effect") || R(l.rule, "effect", {}), R(l.rule.effect, o, a));
2197
+ l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) && E(l.rule, "$" + o, a), D(l.rule, "effect") || E(l.rule, "effect", {}), E(l.rule.effect, o, a));
2177
2198
  },
2178
2199
  clearEffectData(n, o) {
2179
2200
  const a = t.getCtx(n);
@@ -2193,15 +2214,15 @@ function Qr(t) {
2193
2214
  resetFields(n) {
2194
2215
  e(n).forEach((o) => {
2195
2216
  t.getCtxs(o).forEach((a) => {
2196
- t.$render.clearCache(a), a.rule.value = ye(a.defaultValue);
2217
+ t.$render.clearCache(a), a.rule.value = ve(a.defaultValue);
2197
2218
  });
2198
- }), T(() => {
2199
- T(() => {
2200
- T(() => {
2219
+ }), I(() => {
2220
+ I(() => {
2221
+ I(() => {
2201
2222
  s.clearValidateState(n);
2202
2223
  });
2203
2224
  });
2204
- }), n == null && (h.Function(t.options.onReset) && O(() => t.options.onReset(s)), t.vm.$emit("reset", s));
2225
+ }), n == null && (h.Function(t.options.onReset) && F(() => t.options.onReset(s)), t.vm.$emit("reset", s));
2205
2226
  },
2206
2227
  method(n, o) {
2207
2228
  const a = s.el(n);
@@ -2210,10 +2231,10 @@ function Qr(t) {
2210
2231
  return (...l) => a[o](...l);
2211
2232
  },
2212
2233
  exec(n, o, ...a) {
2213
- return O(() => s.method(n, o)(...a));
2234
+ return F(() => s.method(n, o)(...a));
2214
2235
  },
2215
2236
  toJson(n) {
2216
- return et(s.rule, n);
2237
+ return _e(s.rule, n);
2217
2238
  },
2218
2239
  trigger(n, o, ...a) {
2219
2240
  const l = s.el(n);
@@ -2232,21 +2253,21 @@ function Qr(t) {
2232
2253
  return o ? t.subForm[o.id] : void 0;
2233
2254
  },
2234
2255
  getChildrenRuleList(n) {
2235
- const o = typeof n == "object", a = o ? Z(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
2256
+ const o = typeof n == "object", a = o ? x(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
2236
2257
  if (!l)
2237
2258
  return [];
2238
2259
  const u = [];
2239
- return ((d) => {
2240
- d && d.forEach((g) => {
2241
- typeof g == "object" && (g.field && u.push(g), u.push(...s.getChildrenRuleList(g)));
2260
+ return ((p) => {
2261
+ p && p.forEach((m) => {
2262
+ typeof m == "object" && (m.field && u.push(m), u.push(...s.getChildrenRuleList(m)));
2242
2263
  });
2243
2264
  })(a ? a.loadChildrenPending() : l.children), u;
2244
2265
  },
2245
2266
  getParentRule(n) {
2246
- return (typeof n == "object" ? Z(n) : t.getCtx(n)).parent.rule;
2267
+ return (typeof n == "object" ? x(n) : t.getCtx(n)).parent.rule;
2247
2268
  },
2248
2269
  getParentSubRule(n) {
2249
- const a = typeof n == "object" ? Z(n) : t.getCtx(n);
2270
+ const a = typeof n == "object" ? x(n) : t.getCtx(n);
2250
2271
  if (a) {
2251
2272
  const l = a.getParentGroup();
2252
2273
  if (l)
@@ -2254,20 +2275,20 @@ function Qr(t) {
2254
2275
  }
2255
2276
  },
2256
2277
  getChildrenFormData(n) {
2257
- return s.getChildrenRuleList(n).reduce((a, l) => (a[l.field] = ye(l.value), a), {});
2278
+ return s.getChildrenRuleList(n).reduce((a, l) => (a[l.field] = ve(l.value), a), {});
2258
2279
  },
2259
2280
  setChildrenFormData(n, o, a) {
2260
2281
  const l = s.getChildrenRuleList(n);
2261
2282
  t.deferSyncValue(() => {
2262
2283
  l.forEach((u) => {
2263
- S(o, u.field) ? u.value = o[u.field] : a && (u.value = void 0);
2284
+ D(o, u.field) ? u.value = o[u.field] : a && (u.value = void 0);
2264
2285
  });
2265
2286
  });
2266
2287
  },
2267
2288
  getGlobalEvent(n) {
2268
2289
  let o = s.options.globalEvent[n];
2269
2290
  if (o)
2270
- return typeof o == "object" && (o = o.handle), K(o);
2291
+ return typeof o == "object" && (o = o.handle), z(o);
2271
2292
  },
2272
2293
  getGlobalData(n) {
2273
2294
  return new Promise((o, a) => {
@@ -2278,18 +2299,18 @@ function Qr(t) {
2278
2299
  });
2279
2300
  },
2280
2301
  renderRule(n, o, a) {
2281
- const u = typeof n == "object" ? Z(n) : t.getCtx(n);
2302
+ const u = typeof n == "object" ? x(n) : t.getCtx(n);
2282
2303
  return u ? t.$render.createRuleVnode(u, o, a) : void 0;
2283
2304
  },
2284
2305
  renderChildren(n, o, a) {
2285
- const u = typeof n == "object" ? Z(n) : t.getCtx(n);
2306
+ const u = typeof n == "object" ? x(n) : t.getCtx(n);
2286
2307
  return u ? t.$render.createChildrenVnodes(u, o, a) : void 0;
2287
2308
  },
2288
2309
  nextTick(n) {
2289
2310
  t.bus.$once("next-tick", n), t.refresh();
2290
2311
  },
2291
2312
  nextRefresh(n) {
2292
- t.nextRefresh(), n && O(n);
2313
+ t.nextRefresh(), n && F(n);
2293
2314
  },
2294
2315
  emit(n, ...o) {
2295
2316
  t.vm.$emit(n, ...o);
@@ -2301,24 +2322,24 @@ function Qr(t) {
2301
2322
  fetch(n) {
2302
2323
  return new Promise((o, a) => {
2303
2324
  n = W(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2304
- O(() => n.onSuccess && n.onSuccess(l)), o(l);
2325
+ F(() => n.onSuccess && n.onSuccess(l)), o(l);
2305
2326
  }).catch((l) => {
2306
- O(() => n.onError && n.onError(l)), a(l);
2327
+ F(() => n.onError && n.onError(l)), a(l);
2307
2328
  }));
2308
2329
  });
2309
2330
  },
2310
2331
  watchFetch(n, o, a, l) {
2311
- return t.fc.watchLoadData((u, f) => {
2312
- let d = W(n);
2313
- d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => gt(d, t.fc.create.fetch, s).then((g) => {
2314
- O(() => d.onSuccess && d.onSuccess(g)), o && o(g, f);
2315
- }).catch((g) => {
2316
- O(() => d.onError && d.onError(g)), a && a(g);
2332
+ return t.fc.watchLoadData((u, c) => {
2333
+ let p = W(n);
2334
+ p = t.loadFetchVar(p, u), !(l && l(p, c) === !1) && t.beforeFetch(p).then(() => gt(p, t.fc.create.fetch, s).then((m) => {
2335
+ F(() => p.onSuccess && p.onSuccess(m)), o && o(m, c);
2336
+ }).catch((m) => {
2337
+ F(() => p.onError && p.onError(m)), a && a(m);
2317
2338
  }));
2318
2339
  }, n.wait == null ? 1e3 : n.wait);
2319
2340
  },
2320
2341
  getData(n, o) {
2321
- return t.fc.getLoadData(n, o);
2342
+ return t.fc.get ? t.fc.get(n, o) : t.fc.getLoadData(n, o);
2322
2343
  },
2323
2344
  setData(n, o, a) {
2324
2345
  return t.fc.setData(n, o, a);
@@ -2375,7 +2396,7 @@ function Zr(t) {
2375
2396
  }
2376
2397
  });
2377
2398
  }
2378
- function G(t) {
2399
+ function J(t) {
2379
2400
  const e = t.replace(/(-[a-z])/g, function(r) {
2380
2401
  return r.replace("-", "").toLocaleUpperCase();
2381
2402
  });
@@ -2393,7 +2414,7 @@ function Yr(t) {
2393
2414
  const r = (i) => {
2394
2415
  if (i) {
2395
2416
  let s;
2396
- return e.rule.field && (s = i.$scopedSlots["field-" + $e(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + $e(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
2417
+ return e.rule.field && (s = i.$scopedSlots["field-" + be(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + be(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
2397
2418
  }
2398
2419
  };
2399
2420
  return r(this.vm);
@@ -2402,7 +2423,7 @@ function Yr(t) {
2402
2423
  if (!this.vm.isShow)
2403
2424
  return;
2404
2425
  this.$manager.beforeRender();
2405
- const e = Fe();
2426
+ const e = Se();
2406
2427
  return this.sort.forEach((r) => {
2407
2428
  this.renderSlot(e, this.$handle.ctxs[r]);
2408
2429
  }), this.$manager.render(e);
@@ -2413,23 +2434,23 @@ function Yr(t) {
2413
2434
  })) : e.setSlot(r.rule.slot, this.renderCtx(r, i));
2414
2435
  },
2415
2436
  mergeGlobal(e) {
2416
- this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = me(() => {
2437
+ this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = ye(() => {
2417
2438
  const i = this.$handle.options.global;
2418
- return x({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
2419
- })), e.prop = x({}, [this.cacheConfig[e.trueType].value, e.prop]));
2439
+ return te({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
2440
+ })), e.prop = te({}, [this.cacheConfig[e.trueType].value, e.prop]));
2420
2441
  },
2421
2442
  setOptions(e) {
2422
2443
  const r = e.loadPending({ key: "options", origin: e.prop.options, def: [] });
2423
- e.prop.options = r, e.prop.optionsTo && r && ne(e.prop, e.prop.optionsTo, r);
2444
+ e.prop.options = r, e.prop.optionsTo && r && oe(e.prop, e.prop.optionsTo, r);
2424
2445
  },
2425
2446
  deepSet(e) {
2426
2447
  const r = e.rule.deep;
2427
2448
  r && Object.keys(r).sort((i, s) => i.length < s.length ? -1 : 1).forEach((i) => {
2428
- ne(e.prop, i, r[i]);
2449
+ oe(e.prop, i, r[i]);
2429
2450
  });
2430
2451
  },
2431
2452
  parseSide(e, r) {
2432
- return h.Object(e) ? x({ props: { formCreateInject: r.prop.props.formCreateInject } }, e) : e;
2453
+ return h.Object(e) ? te({ props: { formCreateInject: r.prop.props.formCreateInject } }, e) : e;
2433
2454
  },
2434
2455
  renderSides(e, r, i) {
2435
2456
  const s = r[i ? "rule" : "prop"];
@@ -2463,23 +2484,23 @@ function Yr(t) {
2463
2484
  model: n.model || {},
2464
2485
  slotValue: l
2465
2486
  };
2466
- l.length && i.slotUpdate && O(() => i.slotUpdate(u));
2467
- let f = [];
2468
- const d = e.loadChildrenPending();
2469
- e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((v) => {
2470
- f.push(this.renderRule({
2487
+ l.length && i.slotUpdate && F(() => i.slotUpdate(u));
2488
+ let c = [];
2489
+ const p = e.loadChildrenPending();
2490
+ e.parser.renderChildren ? c = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (c = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2491
+ c.push(this.renderRule({
2471
2492
  type: "template",
2472
- slot: v
2493
+ slot: $
2473
2494
  }, (() => {
2474
- if (h.Function(n.renderSlots[v]))
2475
- return O(() => n.renderSlots[v]());
2476
- const w = this.parseSide(n.renderSlots[v], e);
2495
+ if (h.Function(n.renderSlots[$]))
2496
+ return F(() => n.renderSlots[$]());
2497
+ const w = this.parseSide(n.renderSlots[$], e);
2477
2498
  return this.renderRule(w);
2478
2499
  })()));
2479
2500
  });
2480
- const g = this.getTypeSlot(e);
2481
- let m;
2482
- return g ? (u.children = f, m = g(u)) : m = a ? e.parser.preview(Ge(f), e) : e.parser.render(Ge(f), e), m = this.renderSides(m, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), m = this.$manager.makeWrap(e, m)), e.none && (Array.isArray(m) ? m = m.map((v) => !v || !v.tag ? v : this.none(v)) : m = this.none(m)), o && this.setCache(e, () => this.stable(m), r), m;
2501
+ const m = this.getTypeSlot(e);
2502
+ let g;
2503
+ return m ? (u.children = c, g = m(u)) : g = a ? e.parser.preview(Je(c), e) : e.parser.render(Je(c), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map(($) => !$ || !$.tag ? $ : this.none($)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2483
2504
  }, this.setCache(e, s, r);
2484
2505
  }
2485
2506
  return (...s) => {
@@ -2555,7 +2576,11 @@ function Yr(t) {
2555
2576
  ctxProp(e) {
2556
2577
  const { ref: r, key: i, rule: s } = e;
2557
2578
  this.$manager.mergeProp(e), e.parser.mergeProp(e);
2558
- const n = [
2579
+ const n = b({}, e.prop.on || {}), o = {};
2580
+ Object.keys(n).forEach((l) => {
2581
+ l.indexOf("native.") === 0 && (o[l.replace("native.", "")] = n[l], delete n[l]);
2582
+ }), e.prop.on = n;
2583
+ const a = [
2559
2584
  {
2560
2585
  ref: r,
2561
2586
  key: s.key || `${i}fc`,
@@ -2564,30 +2589,33 @@ function Yr(t) {
2564
2589
  "hook:mounted": () => {
2565
2590
  this.onMounted(e);
2566
2591
  },
2567
- "fc.updateValue": (o) => {
2568
- this.$handle.onUpdateValue(e, o);
2592
+ "fc.updateValue": (l) => {
2593
+ this.$handle.onUpdateValue(e, l);
2569
2594
  },
2570
- "fc.el": (o) => {
2571
- e.exportEl = o, o && ((o.$el || o).__rule__ = e.rule);
2595
+ "fc.el": (l) => {
2596
+ e.exportEl = l, l && ((l.$el || l).__rule__ = e.rule);
2572
2597
  }
2573
2598
  }
2599
+ },
2600
+ {
2601
+ nativeOn: o
2574
2602
  }
2575
2603
  ];
2576
2604
  if (e.input) {
2577
- const o = this.tmpInput;
2605
+ const l = this.tmpInput;
2578
2606
  this.vm.$props.disabled === !0 && (e.prop.props.disabled = !0), e.prop.model = {
2579
2607
  value: this.$handle.getFormData(e),
2580
- callback: (a) => {
2581
- o && o(e.field, a, e.rule), this.onInput(e, a);
2608
+ callback: (u) => {
2609
+ l && l(e.field, u, e.rule), this.onInput(e, u);
2582
2610
  },
2583
2611
  expression: `formData.${e.id}`
2584
- }, e.prop.modelEmit && n.push({
2612
+ }, e.prop.modelEmit && a.push({
2585
2613
  on: {
2586
2614
  [e.prop.modelEmit]: () => this.onEmitInput(e)
2587
2615
  }
2588
2616
  });
2589
2617
  }
2590
- return Y(n, e.prop), e.prop;
2618
+ return ee(a, e.prop), e.prop;
2591
2619
  },
2592
2620
  onMounted(e) {
2593
2621
  e.el = this.vm.$refs[e.ref], e.el && ((e.el.$el || e.el).__rule__ = e.rule), e.parser.mounted(e), this.$handle.effect(e, "mounted"), this.$handle.targetHook(e, "mounted");
@@ -2604,7 +2632,7 @@ function Yr(t) {
2604
2632
  },
2605
2633
  renderChildren(e, r, i) {
2606
2634
  if (!h.trueArray(e)) return [];
2607
- const s = Fe();
2635
+ const s = Se();
2608
2636
  return e.map((n) => {
2609
2637
  if (n) {
2610
2638
  if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
@@ -2613,7 +2641,7 @@ function Yr(t) {
2613
2641
  }) : n);
2614
2642
  if (n.__fc__)
2615
2643
  return this.renderSlot(s, n.__fc__, r);
2616
- n.type && T(() => {
2644
+ n.type && I(() => {
2617
2645
  this.$handle.loadChildren(e, r), this.$handle.refresh();
2618
2646
  });
2619
2647
  }
@@ -2630,7 +2658,7 @@ function Yr(t) {
2630
2658
  },
2631
2659
  createRuleVnode(e, r, i) {
2632
2660
  this.force = i !== !1, this.tmpInput = r;
2633
- const s = Fe();
2661
+ const s = Se();
2634
2662
  return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
2635
2663
  },
2636
2664
  renderRule(e, r, i) {
@@ -2640,12 +2668,12 @@ function Yr(t) {
2640
2668
  if (i)
2641
2669
  s = e.type;
2642
2670
  else if (s = e.is, e.type) {
2643
- s = G(e.type);
2671
+ s = J(e.type);
2644
2672
  const a = this.vNode.aliasMap[s];
2645
- a && (s = G(a));
2673
+ a && (s = J(a));
2646
2674
  }
2647
2675
  if (!s) return;
2648
- const n = Fe();
2676
+ const n = Se();
2649
2677
  h.trueArray(e.children) && e.children.forEach((a) => {
2650
2678
  a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
2651
2679
  });
@@ -2694,26 +2722,26 @@ function ei(t) {
2694
2722
  if (!s && Array.isArray(r) && r[0] && (h.String(r[0]) || h.Function(r[0])))
2695
2723
  return this.parseEventLst(e, r, i, !0);
2696
2724
  if (h.String(r)) {
2697
- const n = K(r);
2725
+ const n = z(r);
2698
2726
  if (n && r !== n)
2699
2727
  return n.__inject ? this.parseEvent(e, n, i, !0) : n;
2700
2728
  }
2701
2729
  },
2702
2730
  parseEmit(e, r) {
2703
2731
  let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
2704
- return h.trueArray(u) && u.forEach((f) => {
2705
- if (!f) return;
2706
- let d, g = n || o || a;
2707
- if (h.Object(f) && (d = f.inject, f = f.name, g = f.prefix || g), g) {
2708
- r || (g = `native-${g}`);
2709
- const m = $e(`${g}-${f}`), v = (...w) => {
2710
- this.vm.$emit(m, ...w), this.vm.$emit("emit-event", m, ...w), this.bus.$emit(m, ...w);
2732
+ return h.trueArray(u) && u.forEach((c) => {
2733
+ if (!c) return;
2734
+ let p, m = n || o || a;
2735
+ if (h.Object(c) && (p = c.inject, c = c.name, m = c.prefix || m), m) {
2736
+ r || (m = `native-${m}`);
2737
+ const g = be(`${m}-${c}`), $ = (...w) => {
2738
+ this.vm.$emit(g, ...w), this.vm.$emit("emit-event", g, ...w), this.bus.$emit(g, ...w);
2711
2739
  };
2712
- if (v.__emit = !0, !d && l === !1)
2713
- i[f] = v;
2740
+ if ($.__emit = !0, !p && l === !1)
2741
+ i[c] = $;
2714
2742
  else {
2715
- let w = d || l || this.options.injectEvent;
2716
- i[f] = h.Undef(w) ? v : this.inject(s, v, w);
2743
+ let w = p || l || this.options.injectEvent;
2744
+ i[c] = h.Undef(w) ? $ : this.inject(s, $, w);
2717
2745
  }
2718
2746
  }
2719
2747
  }), e.computed[r ? "on" : "nativeOn"] = i, i;
@@ -2743,21 +2771,21 @@ function ei(t) {
2743
2771
  },
2744
2772
  loadStrVar(e, r, i) {
2745
2773
  if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
2746
- const s = e, n = Wr(e);
2774
+ const s = e, n = Jr(e);
2747
2775
  let o;
2748
2776
  if (n.forEach((a) => {
2749
2777
  const l = a.split("||"), u = l[0].trim();
2750
2778
  if (u) {
2751
- const f = (l[1] || "").trim();
2752
- let d, g = !1;
2779
+ const c = (l[1] || "").trim();
2780
+ let p, m = !1;
2753
2781
  if (i && u.indexOf("$form.") === 0) {
2754
- const m = u.split(".");
2755
- m.shift(), S(i.value, m[0]) && (g = !0, d = r ? r({
2756
- id: "$form." + m[0] + "_" + i.rule.__fc__.id,
2757
- getValue: () => M(i.value, m)
2758
- }) : M(i.value, m));
2782
+ const g = u.split(".");
2783
+ g.shift(), D(i.value, g[0]) && (m = !0, p = r ? r({
2784
+ id: "$form." + g[0] + "_" + i.rule.__fc__.id,
2785
+ getValue: () => B(i.value, g)
2786
+ }) : B(i.value, g));
2759
2787
  }
2760
- g || (d = r ? r(u, f) : this.fc.getLoadData(u, f)), o = d, e = e.replaceAll(`{{${a}}}`, d == null ? "" : d);
2788
+ m || (p = r ? r(u, c) : this.fc.getLoadData(u, c)), o = p, e = e.replaceAll(`{{${a}}}`, p == null ? "" : p);
2761
2789
  }
2762
2790
  }), n.length === 1 && s === `{{${n[0]}}}`)
2763
2791
  return o;
@@ -2820,13 +2848,13 @@ function ii(t) {
2820
2848
  }
2821
2849
  function ni(t) {
2822
2850
  Object.defineProperties(t.origin, {
2823
- __fc__: Ke(pe(t), !0)
2851
+ __fc__: Xe(ge(t), !0)
2824
2852
  }), t.rule !== t.origin && Object.defineProperties(t.rule, {
2825
- __fc__: Ke(pe(t), !0)
2853
+ __fc__: Xe(ge(t), !0)
2826
2854
  });
2827
2855
  }
2828
2856
  function qt(t, e, r) {
2829
- const i = je(), s = !!e.field;
2857
+ const i = Ae(), s = !!e.field;
2830
2858
  _(this, {
2831
2859
  id: i,
2832
2860
  ref: i,
@@ -2888,12 +2916,12 @@ _(qt.prototype, {
2888
2916
  delete this.pending[e];
2889
2917
  let a = r;
2890
2918
  if (h.Function(r)) {
2891
- let l = O(() => r({
2919
+ let l = F(() => r({
2892
2920
  rule: this.rule,
2893
2921
  api: this.$api,
2894
2922
  update: (u) => {
2895
- const f = u || i, d = this.getPending(e, i);
2896
- this.setPending(e, r, f), o && o(f, d);
2923
+ const c = u || i, p = this.getPending(e, i);
2924
+ this.setPending(e, r, c), o && o(c, p);
2897
2925
  },
2898
2926
  reload: () => {
2899
2927
  const u = this.getPending(e, i);
@@ -2901,8 +2929,8 @@ _(qt.prototype, {
2901
2929
  }
2902
2930
  }));
2903
2931
  l && h.Function(l.then) ? (l.then((u) => {
2904
- const f = u || i;
2905
- this.setPending(e, r, f), s && s(f), this.$api && this.$api.sync(this.rule);
2932
+ const c = u || i;
2933
+ this.setPending(e, r, c), s && s(c), this.$api && this.$api.sync(this.rule);
2906
2934
  }).catch((u) => {
2907
2935
  console.error(u);
2908
2936
  }), a = i, this.setPending(e, r, a)) : (a = l || i, this.setPending(e, r, a), s && s(a));
@@ -2915,7 +2943,7 @@ _(qt.prototype, {
2915
2943
  setPending(t, e, r) {
2916
2944
  this.pending[t] = {
2917
2945
  origin: e,
2918
- value: ie(r)
2946
+ value: ne(r)
2919
2947
  };
2920
2948
  },
2921
2949
  effectData(t) {
@@ -2925,10 +2953,10 @@ _(qt.prototype, {
2925
2953
  t === void 0 ? this.payload = {} : delete this.payload[t];
2926
2954
  },
2927
2955
  updateKey(t) {
2928
- this.key = je(), t && this.parent && this.parent.updateKey(t);
2956
+ this.key = Ae(), t && this.parent && this.parent.updateKey(t);
2929
2957
  },
2930
2958
  updateType() {
2931
- this.originType = this.rule.type, this.type = G(this.rule.type), this.trueType = this.$handle.getType(this.originType);
2959
+ this.originType = this.rule.type, this.type = J(this.rule.type), this.trueType = this.$handle.getType(this.originType);
2932
2960
  },
2933
2961
  setParser(t) {
2934
2962
  this.parser = t, t.init(this);
@@ -2936,7 +2964,7 @@ _(qt.prototype, {
2936
2964
  initProp() {
2937
2965
  var e, r;
2938
2966
  const t = b({}, this.rule);
2939
- delete t.children, delete t.validate, this.prop = x({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
2967
+ delete t.children, delete t.validate, this.prop = te({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
2940
2968
  },
2941
2969
  initNone() {
2942
2970
  this.none = !(h.Undef(this.prop.display) || this.prop.display);
@@ -3006,17 +3034,17 @@ function si(t) {
3006
3034
  _(t.prototype, {
3007
3035
  nextRefresh(e) {
3008
3036
  const r = this.loadedId;
3009
- T(() => {
3037
+ I(() => {
3010
3038
  r === this.loadedId && (e ? e() : this.refresh());
3011
3039
  });
3012
3040
  },
3013
3041
  parseRule(e) {
3014
- const r = ct(e);
3042
+ const r = ft(e);
3015
3043
  return Object.defineProperties(r, {
3016
- __origin__: Ke(e, !0)
3044
+ __origin__: Xe(e, !0)
3017
3045
  }), oi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
3018
3046
  i && this.loadFn(i, r);
3019
- }), this.loadCtrl(r), r.update && (r.update = K(r.update)), r;
3047
+ }), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
3020
3048
  },
3021
3049
  loadFn(e, r) {
3022
3050
  ["on", "props", "nativeOn", "deep"].forEach((i) => {
@@ -3025,12 +3053,12 @@ function si(t) {
3025
3053
  },
3026
3054
  loadCtrl(e) {
3027
3055
  e.control && e.control.forEach((r) => {
3028
- r.handle && (r.handle = K(r.handle));
3056
+ r.handle && (r.handle = z(r.handle));
3029
3057
  });
3030
3058
  },
3031
3059
  syncProp(e) {
3032
3060
  const r = e.rule;
3033
- h.trueArray(r.sync) && Y([{
3061
+ h.trueArray(r.sync) && ee([{
3034
3062
  on: r.sync.reduce((i, s) => (i[typeof s == "object" && s.event || `update:${s}`] = (n) => {
3035
3063
  r.props[typeof s == "object" && s.prop || s] = n, this.vm.$emit("sync", s, n, r, this.fapi);
3036
3064
  }, i), {})
@@ -3061,37 +3089,37 @@ function si(t) {
3061
3089
  if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
3062
3090
  if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
3063
3091
  return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
3064
- let l = ct(o);
3092
+ let l = ft(o);
3065
3093
  const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
3066
3094
  this.fc.targetFormDriver("loadRule", { rule: l, api: this.api }, this.fc), this.ruleEffect(l, "init", { repeat: u() }), u() && this.vm.$emit("repeat-field", o, this.api);
3067
- let f, d = !1, g = !!o.__fc__, m = l.value;
3068
- if (g) {
3069
- if (f = o.__fc__, m = f.defaultValue, f.deleted) {
3070
- if ($t(f))
3095
+ let c, p = !1, m = !!o.__fc__, g = l.value;
3096
+ if (m) {
3097
+ if (c = o.__fc__, g = c.defaultValue, c.deleted) {
3098
+ if ($t(c))
3071
3099
  return;
3072
- f.update(this);
3073
- } else if (!f.check(this)) {
3074
- if ($t(f))
3100
+ c.update(this);
3101
+ } else if (!c.check(this)) {
3102
+ if ($t(c))
3075
3103
  return;
3076
- e[a] = o = o._clone ? o._clone() : At(et(o)), f = null, d = !0;
3104
+ e[a] = o = o._clone ? o._clone() : At(_e(o)), c = null, p = !0;
3077
3105
  }
3078
3106
  }
3079
- if (f)
3080
- f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
3107
+ if (c)
3108
+ c.originType !== c.rule.type && c.updateType(), this.bindParser(c), this.appendValue(c.rule), c.parent && c.parent !== r && this.rmSubRuleData(c);
3081
3109
  else {
3082
- const j = this.parseRule(o);
3083
- f = new qt(this, j, m), this.bindParser(f);
3110
+ const O = this.parseRule(o);
3111
+ c = new qt(this, O, g), this.bindParser(c);
3084
3112
  }
3085
- [!1, !0].forEach((j) => this.parseEmit(f, j)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !g && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
3086
- const v = f.loadChildrenPending();
3087
- if (f.parser.loadChildren === !1 || s(v, f), !r) {
3088
- const j = i(a);
3089
- j > -1 || !a ? this.sort.splice(j + 1, 0, f.id) : this.sort.push(f.id);
3113
+ [!1, !0].forEach((O) => this.parseEmit(c, O)), this.syncProp(c), c.parent = r || null, c.root = e, this.setCtx(c), !p && !m && (this.effect(c, "load"), this.targetHook(c, "load")), this.effect(c, "created");
3114
+ const $ = c.loadChildrenPending();
3115
+ if (c.parser.loadChildren === !1 || s($, c), !r) {
3116
+ const O = i(a);
3117
+ O > -1 || !a ? this.sort.splice(O + 1, 0, c.id) : this.sort.push(c.id);
3090
3118
  }
3091
- const w = f.rule;
3092
- return f.updated || (f.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
3093
- this.refreshUpdate(f, w.value, "init");
3094
- }), this.effect(f, "loaded")), this.refreshControl(f) && (this.cycleLoad = !0), f;
3119
+ const w = c.rule;
3120
+ return c.updated || (c.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
3121
+ this.refreshUpdate(c, w.value, "init");
3122
+ }), this.effect(c, "loaded")), this.refreshControl(c) && (this.cycleLoad = !0), c;
3095
3123
  }).filter((o) => !!o);
3096
3124
  r && (r.children = n);
3097
3125
  },
@@ -3102,31 +3130,31 @@ function si(t) {
3102
3130
  const r = ai(e), i = [], s = this.api;
3103
3131
  if (!r.length) return !1;
3104
3132
  for (let a = 0; a < r.length; a++) {
3105
- const l = r[a], u = l.handle || function(d) {
3106
- return (fe[l.condition || "=="] || fe["=="])(d, l.value);
3133
+ const l = r[a], u = l.handle || function(p) {
3134
+ return (ce[l.condition || "=="] || ce["=="])(p, l.value);
3107
3135
  };
3108
3136
  if (!h.trueArray(l.rule)) continue;
3109
- const f = q(b({}, l), {
3110
- valid: O(() => u(e.rule.value, s)),
3137
+ const c = q(b({}, l), {
3138
+ valid: F(() => u(e.rule.value, s)),
3111
3139
  ctrl: li(e, l.rule),
3112
3140
  isHidden: h.String(l.rule[0])
3113
3141
  });
3114
- f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
3142
+ c.valid && c.ctrl || !c.valid && !c.ctrl && !c.isHidden || i.push(c);
3115
3143
  }
3116
3144
  if (!i.length) return !1;
3117
3145
  const n = [];
3118
3146
  let o = !1;
3119
3147
  return this.deferSyncValue(() => {
3120
- i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: g, ctrl: m, method: v }) => {
3148
+ i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: c, append: p, child: m, ctrl: g, method: $ }) => {
3121
3149
  if (a) {
3122
3150
  l ? e.ctrlRule.push({
3123
3151
  __ctrl: !0,
3124
3152
  children: u,
3125
3153
  valid: l
3126
- }) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3127
- v === "disabled" || v === "enabled" ? this.api.disabled(!l, u) : v === "display" ? this.api.display(l, u) : v === "required" ? (u.forEach((w) => {
3154
+ }) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3155
+ $ === "disabled" || $ === "enabled" ? this.api.disabled(!l, u) : $ === "display" || $ === "show" ? this.api.display(l, u) : $ === "required" ? (u.forEach((w) => {
3128
3156
  this.api.setEffect(w, "required", l);
3129
- }), l || this.api.clearValidateState(u)) : this.api.hidden(!l, u);
3157
+ }), l || this.api.clearValidateState(u)) : $ === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
3130
3158
  });
3131
3159
  return;
3132
3160
  }
@@ -3139,17 +3167,17 @@ function si(t) {
3139
3167
  children: u
3140
3168
  };
3141
3169
  e.ctrlRule.push(w), this.bus.$once("load-start", () => {
3142
- f ? s.prepend(w, f, g) : d || g ? s.append(w, d || e.id, g) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3170
+ c ? s.prepend(w, c, m) : p || m ? s.append(w, p || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3143
3171
  });
3144
3172
  } else {
3145
- e.ctrlRule.splice(e.ctrlRule.indexOf(m), 1);
3146
- const w = Z(m);
3173
+ e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
3174
+ const w = x(g);
3147
3175
  w && w.rm();
3148
3176
  }
3149
3177
  });
3150
3178
  }), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
3151
3179
  n.forEach((a) => a());
3152
- }) : n.length && T(() => {
3180
+ }) : n.length && I(() => {
3153
3181
  n.forEach((a) => a());
3154
3182
  })), this.vm.$emit("control", e.origin, this.api), this.effect(e, "control"), o;
3155
3183
  },
@@ -3174,7 +3202,7 @@ function si(t) {
3174
3202
  function oi(t) {
3175
3203
  const e = Tt();
3176
3204
  return Object.keys(e).forEach((r) => {
3177
- S(t, r) || R(t, r, e[r]);
3205
+ D(t, r) || E(t, r, e[r]);
3178
3206
  }), t;
3179
3207
  }
3180
3208
  function ai(t) {
@@ -3198,9 +3226,9 @@ function ui(t) {
3198
3226
  rule: e.origin,
3199
3227
  api: this.api,
3200
3228
  setFlag: s || !1
3201
- }), s && T(() => {
3202
- T(() => {
3203
- T(() => {
3229
+ }), s && I(() => {
3230
+ I(() => {
3231
+ I(() => {
3204
3232
  this.api.clearValidateState(e.id);
3205
3233
  });
3206
3234
  });
@@ -3214,7 +3242,7 @@ function ui(t) {
3214
3242
  this.deferSyncValue(() => {
3215
3243
  const i = e.getParentGroup(), s = i ? this.subRuleData[i.id] : null, n = {};
3216
3244
  Object.keys(r || {}).forEach((o) => {
3217
- s && S(s, o) ? n[o] = r[o] : S(this.api.form, o) ? this.api.form[o] = r[o] : this.api.top !== this.api && S(this.api.top.form, o) && (this.api.top.form[o] = r[o]);
3245
+ s && D(s, o) ? n[o] = r[o] : D(this.api.form, o) ? this.api.form[o] = r[o] : this.api.top !== this.api && D(this.api.top.form, o) && (this.api.top.form[o] = r[o]);
3218
3246
  }), Object.keys(n).length && this.api.setChildrenFormData(i.rule, n);
3219
3247
  });
3220
3248
  },
@@ -3224,33 +3252,33 @@ function ui(t) {
3224
3252
  setFormData(e, r) {
3225
3253
  e.modelValue = r;
3226
3254
  const i = e.getParentGroup();
3227
- i && (this.subRuleData[i.id] || R(this.subRuleData, i.id, {}), R(this.subRuleData[i.id], e.field, e.rule.value)), R(this.formData, e.id, r);
3255
+ i && (this.subRuleData[i.id] || E(this.subRuleData, i.id, {}), E(this.subRuleData[i.id], e.field, e.rule.value)), E(this.formData, e.id, r);
3228
3256
  },
3229
3257
  rmSubRuleData(e) {
3230
3258
  const r = e.getParentGroup();
3231
- r && this.subRuleData[r.id] && re(this.subRuleData[r.id], e.field);
3259
+ r && this.subRuleData[r.id] && ie(this.subRuleData[r.id], e.field);
3232
3260
  },
3233
3261
  getFormData(e) {
3234
3262
  return this.formData[e.id];
3235
3263
  },
3236
3264
  syncForm() {
3237
3265
  const e = {}, r = this.fields(), i = [];
3238
- this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = De(this.appendData, n)), s), e), r.reduce((s, n) => {
3266
+ this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = je(this.appendData, n)), s), e), r.reduce((s, n) => {
3239
3267
  const o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a.rule))[0] || this.fieldCtx[n][0];
3240
- return this.isIgnore(o.rule) && i.push(n), s[n] = De(o.rule, "value"), s;
3241
- }, e), this.form = ie(e), this.ignoreFields = i, this.syncValue();
3268
+ return this.isIgnore(o.rule) && i.push(n), s[n] = je(o.rule, "value"), s;
3269
+ }, e), this.form = ne(e), this.ignoreFields = i, this.syncValue();
3242
3270
  },
3243
3271
  isIgnore(e) {
3244
3272
  return e.ignore === !0 || e.ignore === "hidden" && e.hidden || this.options.ignoreHiddenFields && e.hidden;
3245
3273
  },
3246
3274
  appendValue(e) {
3247
- (!e.field || !S(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
3275
+ (!e.field || !D(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
3248
3276
  },
3249
3277
  addSubForm(e, r) {
3250
3278
  this.subForm[e.id] = r;
3251
3279
  },
3252
3280
  deferSyncValue(e, r) {
3253
- this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), O(e), this.deferSyncFn === e && (this.deferSyncFn = null, e.sync && this.syncForm());
3281
+ this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), F(e), this.deferSyncFn === e && (this.deferSyncFn = null, e.sync && this.syncForm());
3254
3282
  },
3255
3283
  syncValue() {
3256
3284
  if (this.deferSyncFn)
@@ -3264,11 +3292,11 @@ function ui(t) {
3264
3292
  return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
3265
3293
  },
3266
3294
  isQuote(e, r) {
3267
- return (h.Object(r) || Array.isArray(r)) && r === e.rule.value;
3295
+ return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
3268
3296
  },
3269
3297
  refreshUpdate(e, r, i, s) {
3270
3298
  if (h.Function(e.rule.update)) {
3271
- const n = O(() => e.rule.update(r, e.origin, this.api, {
3299
+ const n = F(() => e.rule.update(r, e.origin, this.api, {
3272
3300
  origin: i || "change",
3273
3301
  linkField: s
3274
3302
  }));
@@ -3297,7 +3325,7 @@ function ui(t) {
3297
3325
  function vt(t, e) {
3298
3326
  return typeof e == "function" ? "" + e : e;
3299
3327
  }
3300
- const ke = {
3328
+ const De = {
3301
3329
  init(t) {
3302
3330
  },
3303
3331
  toFormValue(t, e) {
@@ -3316,8 +3344,8 @@ const ke = {
3316
3344
  },
3317
3345
  mergeProp(t) {
3318
3346
  }
3319
- }, fi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"];
3320
- function ci(t) {
3347
+ }, ci = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"];
3348
+ function fi(t) {
3321
3349
  _(t.prototype, {
3322
3350
  getCtx(e) {
3323
3351
  return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
@@ -3348,25 +3376,25 @@ function ci(t) {
3348
3376
  getParser(e) {
3349
3377
  const r = this.fc.parsers, i = this.fc.renderDriver;
3350
3378
  if (i) {
3351
- const s = i.parsers || {}, n = s[e.originType] || s[G(e.type)] || s[e.trueType];
3379
+ const s = i.parsers || {}, n = s[e.originType] || s[J(e.type)] || s[e.trueType];
3352
3380
  if (n)
3353
3381
  return n;
3354
3382
  }
3355
- return r[e.originType] || r[G(e.type)] || r[e.trueType] || ke;
3383
+ return r[e.originType] || r[J(e.type)] || r[e.trueType] || De;
3356
3384
  },
3357
3385
  bindParser(e) {
3358
3386
  e.setParser(this.getParser(e));
3359
3387
  },
3360
3388
  getType(e) {
3361
- const r = this.fc.CreateNode.aliasMap, i = r[e] || r[G(e)] || e;
3362
- return G(i);
3389
+ const r = this.fc.CreateNode.aliasMap, i = r[e] || r[J(e)] || e;
3390
+ return J(i);
3363
3391
  },
3364
3392
  noWatch(e) {
3365
- this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
3393
+ this.noWatchFn || (this.noWatchFn = e), F(e), this.noWatchFn === e && (this.noWatchFn = null);
3366
3394
  },
3367
3395
  watchCtx(e) {
3368
- if (kt().filter((i) => i[0] !== "_" && i[0] !== "$" && fi.indexOf(i) === -1).forEach((i) => {
3369
- const s = De(e.rule, i), n = i === "children";
3396
+ if (kt().filter((i) => i[0] !== "_" && i[0] !== "$" && ci.indexOf(i) === -1).forEach((i) => {
3397
+ const s = je(e.rule, i), n = i === "children";
3370
3398
  e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3371
3399
  let l = s.value;
3372
3400
  if (!this.isBreakWatch()) {
@@ -3374,9 +3402,9 @@ function ci(t) {
3374
3402
  this.$render.clearCache(e), this.nextRefresh();
3375
3403
  return;
3376
3404
  }
3377
- if (this.watching = !0, T(() => {
3405
+ if (this.watching = !0, I(() => {
3378
3406
  this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
3379
- }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), T(() => {
3407
+ }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), I(() => {
3380
3408
  this.targetHook(e, "hidden", { value: l });
3381
3409
  })), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
3382
3410
  this.syncForm();
@@ -3387,41 +3415,42 @@ function ci(t) {
3387
3415
  this.$render.clearCache(e), this.refresh(), this.watching = !1;
3388
3416
  }
3389
3417
  }, { deep: !n, sync: n }));
3390
- }), e.refRule.__$title = me(() => {
3418
+ }), e.refRule.__$title = ye(() => {
3391
3419
  let i = (typeof e.rule.title == "object" ? e.rule.title.title : e.rule.title) || "";
3392
3420
  if (i) {
3393
3421
  const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3394
3422
  s && (i = this.api.t(s[1]));
3395
3423
  }
3396
3424
  return i;
3397
- }), e.refRule.__$info = me(() => {
3425
+ }), e.refRule.__$info = ye(() => {
3398
3426
  let i = (typeof e.rule.info == "object" ? e.rule.info.info : e.rule.info) || "";
3399
3427
  if (i) {
3400
3428
  const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3401
3429
  s && (i = this.api.t(s[1]));
3402
3430
  }
3403
3431
  return i;
3404
- }), e.refRule.__$validate = me(() => H(e.rule.validate).map((i) => {
3432
+ }), e.refRule.__$validate = ye(() => H(e.rule.validate).map((i) => {
3433
+ var n, o;
3405
3434
  const s = b({}, i);
3406
3435
  if (s.message) {
3407
- const n = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3408
- n && (s.message = this.api.t(n[1], { title: e.refRule.__$title.value }));
3436
+ const a = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3437
+ a && (s.message = this.api.t(a[1], { title: (o = (n = e.refRule) == null ? void 0 : n.__$title) == null ? void 0 : o.value }));
3409
3438
  }
3410
3439
  if (h.Function(s.validator)) {
3411
- const n = e;
3412
- return s.validator = function(...o) {
3440
+ const a = e;
3441
+ return s.validator = function(...l) {
3413
3442
  return i.validator.call({
3414
3443
  that: this,
3415
- id: n.id,
3416
- field: n.field,
3417
- rule: n.rule,
3418
- api: n.$handle.api
3419
- }, ...o);
3444
+ id: a.id,
3445
+ field: a.field,
3446
+ rule: a.rule,
3447
+ api: a.$handle.api
3448
+ }, ...l);
3420
3449
  }, s;
3421
3450
  }
3422
3451
  return s;
3423
3452
  })), e.input) {
3424
- const i = De(e.rule, "value");
3453
+ const i = je(e.rule, "value");
3425
3454
  e.watch.push(L(() => i.value, () => {
3426
3455
  let s = e.parser.toFormValue(i.value, e);
3427
3456
  this.isChange(e, s) && this.setValue(e, i.value, s, !0);
@@ -3431,15 +3460,15 @@ function ci(t) {
3431
3460
  let i = e.rule.computed;
3432
3461
  i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
3433
3462
  let n;
3434
- const o = me(() => {
3463
+ const o = ye(() => {
3435
3464
  const l = i[s];
3436
3465
  if (!l) return;
3437
3466
  const u = this.compute(e, l);
3438
3467
  return l.linkage && u === void 0 ? n : u;
3439
3468
  }), a = (l) => {
3440
- s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : ne(e.rule, s, l);
3469
+ s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : oe(e.rule, s, l);
3441
3470
  };
3442
- (s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== M(e.rule, s)) && a(o.value), e.watch.push(L(o, (l) => {
3471
+ (s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== B(e.rule, s)) && a(o.value), e.watch.push(L(o, (l) => {
3443
3472
  n = l, setTimeout(() => {
3444
3473
  a(l);
3445
3474
  });
@@ -3455,31 +3484,31 @@ function ci(t) {
3455
3484
  return !0;
3456
3485
  const l = a.mode === "OR";
3457
3486
  let u = !0;
3458
- for (let f = 0; f < a.group.length; f++) {
3459
- const d = a.group[f];
3460
- let g, m = null;
3461
- if (d.variable)
3462
- m = JSON.stringify(this.fc.getLoadData(d.variable) || "");
3463
- else if (d.field)
3464
- m = dt(d.field || "");
3465
- else
3487
+ for (let c = 0; c < a.group.length; c++) {
3488
+ const p = a.group[c];
3489
+ let m, g = null;
3490
+ if (p.variable)
3491
+ g = JSON.stringify(this.fc.getLoadData(p.variable) || "");
3492
+ else if (p.field)
3493
+ g = dt(p.field || "");
3494
+ else if (!p.mode)
3466
3495
  return !0;
3467
- let v = d.compare;
3468
- if (v && (v = dt(v || "")), d.mode ? g = n(d) : fe[d.condition] ? h.Function(d.handler) ? g = O(() => d.handler(this.api, e.rule)) : g = O(() => new Function("$condition", "$val", "$form", "$group", "$rule", `with($form){with(this){with($group){ return $condition['${d.condition}'](${m}, ${v || "$val"}); }}}`).call(this.api.form, fe, d.value, this.api.top.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : g = !1, l && g)
3496
+ let $ = p.compare;
3497
+ if ($ && ($ = dt($ || "")), p.mode ? m = n(p) : ce[p.condition] ? h.Function(p.handler) ? m = F(() => p.handler(this.api, e.rule)) : m = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${g}, ${$ || "$val"}); }}}}`).call(this.api.form, ce, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : m = !1, l && m)
3469
3498
  return !0;
3470
- l || (u = u && g);
3499
+ l || (u = u && m);
3471
3500
  }
3472
3501
  return l ? !1 : u;
3473
3502
  };
3474
3503
  let o = n(r);
3475
- return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : void 0 : o;
3504
+ return o = r.invert === !0 ? !o : o, r.linkage ? o ? F(() => this.computeValue(r.linkage, e, s), void 0) : void 0 : o;
3476
3505
  } else if (h.Function(r))
3477
3506
  i = () => r(this.api.form, this.api);
3478
3507
  else {
3479
3508
  const s = e.getParentGroup();
3480
3509
  i = () => this.computeValue(r, e, s);
3481
3510
  }
3482
- return O(i, void 0);
3511
+ return F(i, void 0);
3483
3512
  },
3484
3513
  computeValue(e, r, i) {
3485
3514
  const s = this, n = Object.keys(this.fc.formulas).reduce((o, a) => (o[a] = function(...l) {
@@ -3490,7 +3519,7 @@ function ci(t) {
3490
3519
  fc: s.fc
3491
3520
  }, ...l);
3492
3521
  }, o), {});
3493
- return new Function("$formulas", "$form", "$group", "$rule", "$api", `with($form){with(this){with($group){with($formulas){ return ${e} }}}}`).call(this.api.form, n, this.api.top.form, i ? this.subRuleData[i.id] || {} : {}, r.rule, this.api);
3522
+ return F(() => new Function("$formulas", "$form", "$scope", "$group", "$rule", "$api", `with($form){with($scope){with(this){with($group){with($formulas){ return ${e} }}}}}`).call(this.api.form, n, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, i ? this.subRuleData[i.id] || {} : {}, r.rule, this.api));
3494
3523
  },
3495
3524
  updateChildren(e, r, i) {
3496
3525
  this.deferSyncValue(() => {
@@ -3507,9 +3536,9 @@ function ci(t) {
3507
3536
  rmCtx(e) {
3508
3537
  if (e.deleted) return;
3509
3538
  const { id: r, field: i, input: s, name: n } = e;
3510
- re(this.ctxs, r), re(this.formData, r), re(this.subForm, r), re(this.vm.ctxInject, r);
3539
+ ie(this.ctxs, r), ie(this.formData, r), ie(this.subForm, r), ie(this.vm.ctxInject, r);
3511
3540
  const o = e.getParentGroup();
3512
- o && this.subRuleData[o.id] && re(this.subRuleData[o.id], i), e.group && re(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !S(this.fieldCtx, i) && re(this.form, i), this.deferSyncValue(() => {
3541
+ o && this.subRuleData[o.id] && ie(this.subRuleData[o.id], i), e.group && ie(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !D(this.fieldCtx, i) && ie(this.form, i), this.deferSyncValue(() => {
3513
3542
  if (!this.reloading) {
3514
3543
  if (e.parser.loadChildren !== !1) {
3515
3544
  const l = e.getPending("children", e.rule.children);
@@ -3535,10 +3564,10 @@ function hi(t) {
3535
3564
  this.fc.targetFormDriver(e, this.api, this.fc), this.vm.$emit(e, this.api), this.emitEvent(e, this.api);
3536
3565
  },
3537
3566
  emitEvent(e, ...r) {
3538
- const i = this.options[e] || this.options[G("on-" + e)];
3567
+ const i = this.options[e] || this.options[J("on-" + e)];
3539
3568
  if (i) {
3540
- const s = K(i);
3541
- h.Function(s) && O(() => s(...r));
3569
+ const s = z(i);
3570
+ h.Function(s) && F(() => s(...r));
3542
3571
  }
3543
3572
  this.bus.$emit(e, ...r);
3544
3573
  },
@@ -3546,7 +3575,7 @@ function hi(t) {
3546
3575
  var n, o;
3547
3576
  let s = (o = (n = e.prop) == null ? void 0 : n.hook) == null ? void 0 : o[r];
3548
3577
  s && (s = Array.isArray(s) ? s : [s], s.forEach((a) => {
3549
- O(() => a(q(b({}, i || {}), { rule: e.rule, api: this.api })));
3578
+ F(() => a(q(b({}, i || {}), { self: e.rule, rule: e.rule, $f: this.api, api: this.api, option: this.vm.$props.option })));
3550
3579
  }));
3551
3580
  }
3552
3581
  });
@@ -3573,7 +3602,7 @@ function di(t) {
3573
3602
  let r = {
3574
3603
  required: () => {
3575
3604
  var i, s;
3576
- return (S(e.rule, "$required") ? e.rule.$required : (s = (i = e.rule) == null ? void 0 : i.effect) == null ? void 0 : s.required) || !1;
3605
+ return (D(e.rule, "$required") ? e.rule.$required : (s = (i = e.rule) == null ? void 0 : i.effect) == null ? void 0 : s.required) || !1;
3577
3606
  }
3578
3607
  };
3579
3608
  Object.keys(e.rule.effect || {}).forEach((i) => {
@@ -3603,26 +3632,26 @@ function di(t) {
3603
3632
  }, r);
3604
3633
  },
3605
3634
  getEffect(e, r) {
3606
- if (S(e, "$" + r))
3635
+ if (D(e, "$" + r))
3607
3636
  return e["$" + r];
3608
- if (S(e, "effect") && S(e.effect, r))
3637
+ if (D(e, "effect") && D(e.effect, r))
3609
3638
  return e.effect[r];
3610
3639
  },
3611
3640
  emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
3612
3641
  if (!s || ["fcFragment", "fragment"].indexOf(s) > -1) return;
3613
- const l = n || Object.keys(r).reduce((u, f) => (f[0] === "$" && (u[f.substr(1)] = r[f]), u), b({}, r.effect || {}));
3642
+ const l = n || Object.keys(r).reduce((u, c) => (c[0] === "$" && (u[c.substr(1)] = r[c]), u), b({}, r.effect || {}));
3614
3643
  Object.keys(l).forEach((u) => {
3615
- const f = this.providers[u];
3616
- if (!f || f.input && !i) return;
3617
- let d;
3618
- if (!f._c)
3619
- d = "*";
3620
- else if (f._used.indexOf(s) > -1)
3621
- d = s;
3644
+ const c = this.providers[u];
3645
+ if (!c || c.input && !i) return;
3646
+ let p;
3647
+ if (!c._c)
3648
+ p = "*";
3649
+ else if (c._used.indexOf(s) > -1)
3650
+ p = s;
3622
3651
  else
3623
3652
  return;
3624
- const g = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3625
- e && (g.getProp = () => e.effectData(u), g.clearProp = () => e.clearEffectData(u), g.mergeProp = (m) => x(g.getProp(), [m]), g.id = e.id), this.bus.$emit(`p:${u}:${d}:${f.input ? 1 : 0}`, o, [g, r, this.api]);
3653
+ const m = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3654
+ e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => te(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${p}:${c.input ? 1 : 0}`, o, [m, r, this.api]);
3626
3655
  });
3627
3656
  }
3628
3657
  });
@@ -3639,7 +3668,7 @@ function mi(t) {
3639
3668
  return r.length ? r : !1;
3640
3669
  } else return h.String(e) ? [e] : !1;
3641
3670
  }
3642
- function X(t) {
3671
+ function Q(t) {
3643
3672
  Pt(this, {
3644
3673
  options() {
3645
3674
  return t.options.value || {};
@@ -3648,7 +3677,7 @@ function X(t) {
3648
3677
  return t.bus;
3649
3678
  },
3650
3679
  preview() {
3651
- return t.vm.$options.propsData.preview != null ? t.vm.$options.propsData.preview : t.options.value.preview || !1;
3680
+ return t.vm.$options.propsData.preview != null ? t.vm.$options.propsData.preview : t.vm.parent && t.vm.parent.$props.preview != null ? t.vm.parent.$props.preview : t.options.value.preview || !1;
3652
3681
  }
3653
3682
  }), _(this, {
3654
3683
  fc: t,
@@ -3659,10 +3688,10 @@ function X(t) {
3659
3688
  noWatchFn: null,
3660
3689
  deferSyncFn: null,
3661
3690
  isMounted: !1,
3662
- formData: ie({}),
3663
- subRuleData: ie({}),
3691
+ formData: ne({}),
3692
+ subRuleData: ne({}),
3664
3693
  subForm: {},
3665
- form: ie({}),
3694
+ form: ne({}),
3666
3695
  appendData: {},
3667
3696
  ignoreFields: [],
3668
3697
  providers: {},
@@ -3675,11 +3704,11 @@ function X(t) {
3675
3704
  this.lifecycle("reload");
3676
3705
  }
3677
3706
  }), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new rt(this), this.api = t.extendApiFn.reduce((e, r) => {
3678
- const i = O(() => r(e, this));
3707
+ const i = F(() => r(e, this));
3679
3708
  return i && i !== e && _(e, i), e;
3680
3709
  }, Qr(this));
3681
3710
  }
3682
- _(X.prototype, {
3711
+ _(Q.prototype, {
3683
3712
  initData(t) {
3684
3713
  _(this, {
3685
3714
  ctxs: {},
@@ -3698,22 +3727,29 @@ _(X.prototype, {
3698
3727
  isBreakWatch() {
3699
3728
  return this.loading || this.noWatchFn || this.reloading;
3700
3729
  },
3730
+ globalBeforeFetch(t) {
3731
+ return new Promise((e, r) => {
3732
+ const i = this.options.beforeFetch && F(() => this.options.beforeFetch(t, { api: this.api }));
3733
+ i && h.Function(i.then) ? i.then(e).catch(r) : e();
3734
+ });
3735
+ },
3701
3736
  beforeFetch(t) {
3702
- return new Promise((e) => {
3703
- const r = this.options.beforeFetch && O(() => this.options.beforeFetch(t, { api: this.api }));
3704
- r && h.Function(r.then) ? r.then(e) : e();
3737
+ return new Promise((e, r) => {
3738
+ const i = t && t.beforeFetch && F(() => t.beforeFetch(t, { api: this.api }));
3739
+ i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
3740
+ }).then(() => this.globalBeforeFetch(t)).catch(() => {
3705
3741
  });
3706
3742
  }
3707
3743
  });
3708
- ei(X);
3709
- ti(X);
3710
- ii(X);
3711
- si(X);
3712
- ui(X);
3713
- ci(X);
3714
- hi(X);
3715
- di(X);
3716
- const gi = "fcFragment", Be = {
3744
+ ei(Q);
3745
+ ti(Q);
3746
+ ii(Q);
3747
+ si(Q);
3748
+ ui(Q);
3749
+ fi(Q);
3750
+ hi(Q);
3751
+ di(Q);
3752
+ const gi = "fcFragment", Le = {
3717
3753
  name: gi,
3718
3754
  functional: !0,
3719
3755
  props: ["vnode"],
@@ -3735,7 +3771,7 @@ function $i() {
3735
3771
  },
3736
3772
  make(r, i, s) {
3737
3773
  var n, o, a;
3738
- return (ge.isReservedTag ? ge.isReservedTag(r) : (o = (n = ge) == null ? void 0 : n.config) != null && o.isReservedTag(r)) && (i == null || delete i.nativeOn, (a = i == null ? void 0 : i.props) == null || delete a.formCreateInject), this.makeComponent(r, i, s);
3774
+ return ($e.isReservedTag ? $e.isReservedTag(r) : (o = (n = $e) == null ? void 0 : n.config) != null && o.isReservedTag(r)) && (i == null || delete i.nativeOn, (a = i == null ? void 0 : i.props) == null || delete a.formCreateInject), this.makeComponent(r, i, s);
3739
3775
  },
3740
3776
  makeComponent(r, i, s) {
3741
3777
  var o;
@@ -3756,7 +3792,7 @@ function $i() {
3756
3792
  },
3757
3793
  use(r) {
3758
3794
  Object.keys(r).forEach((i) => {
3759
- const s = $e(i), n = jt(i).toLocaleLowerCase(), o = r[i];
3795
+ const s = be(i), n = jt(i).toLocaleLowerCase(), o = r[i];
3760
3796
  [i, s, n].forEach((a) => {
3761
3797
  e.alias(i, o), e.prototype[a] = function(l, u) {
3762
3798
  return this.make(o, l, u);
@@ -3787,7 +3823,7 @@ _(Ut.prototype, {
3787
3823
  this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
3788
3824
  },
3789
3825
  updateKey() {
3790
- this.key = je();
3826
+ this.key = Ae();
3791
3827
  },
3792
3828
  //TODO interface
3793
3829
  init() {
@@ -3809,7 +3845,7 @@ _(Ut.prototype, {
3809
3845
  return e(this.vm);
3810
3846
  },
3811
3847
  mergeOptions(t, e) {
3812
- return Y(t.map((r) => this.tidyOptions(r)), e, this.mergeOptionsRule);
3848
+ return ee(t.map((r) => this.tidyOptions(r)), e, this.mergeOptionsRule);
3813
3849
  },
3814
3850
  updateOptions(t) {
3815
3851
  this.$handle.fc.targetFormDriver("updateOptions", t, { handle: this.$handle, api: this.$handle.api }), this.options = this.mergeOptions([t], this.getDefaultOptions()), this.update();
@@ -3832,21 +3868,22 @@ const bi = function(t) {
3832
3868
  name: "loadData",
3833
3869
  _fn: [],
3834
3870
  loaded(r, i, s) {
3835
- this.deleted(r);
3836
- let n = H(r.getValue());
3837
- const o = [];
3838
- n.forEach((a) => {
3839
- if (a && (a.attr || a.template)) {
3840
- let l = (d) => {
3841
- let g;
3842
- a.template ? g = t.$handle.loadStrVar(a.template, d) : a.handler && h.Function(a.handler) ? g = a.handler(d, i, s) : g = d(a.attr, a.default), a.copy !== !1 && (g = W(g));
3843
- const m = a.modify ? i : r.getProp();
3844
- a.to === "child" ? m.children ? R(m.children, 0, g) : R(m, "children", [g]) : ne(m, a.to || "options", g), s.sync(i);
3845
- }, u = (d) => l(d);
3846
- const f = t.watchLoadData(u);
3847
- l = ce(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
3848
- }
3849
- }), this._fn[r.id] = o;
3871
+ this.deleted(r), I(() => {
3872
+ let n = H(r.getValue());
3873
+ const o = [];
3874
+ n.forEach((a) => {
3875
+ if (a && (a.attr || a.template)) {
3876
+ let l = (p) => {
3877
+ let m;
3878
+ a.template ? m = t.$handle.loadStrVar(a.template, p) : a.handler && h.Function(a.handler) ? m = a.handler(p, i, s) : m = p(a.attr, a.default), a.copy !== !1 && (m = W(m));
3879
+ const g = a.modify ? i : r.getProp();
3880
+ a.to === "child" ? g.children ? E(g.children, 0, m) : E(g, "children", [m]) : oe(g, a.to || "options", m), s.sync(i);
3881
+ }, u = (p) => l(p);
3882
+ const c = t.watchLoadData(u);
3883
+ l = se(l, a.wait || 300), a.watch !== !1 ? o.push(c) : c();
3884
+ }
3885
+ }), this._fn[r.id] = o;
3886
+ });
3850
3887
  },
3851
3888
  deleted(r) {
3852
3889
  this._fn[r.id] && (this._fn[r.id].forEach((i) => {
@@ -3854,7 +3891,7 @@ const bi = function(t) {
3854
3891
  }), delete this._fn[r.id]), r.clearProp();
3855
3892
  }
3856
3893
  };
3857
- return e.watch = e.mounted, e;
3894
+ return e.watch = e.loaded, e;
3858
3895
  }, _i = function(t) {
3859
3896
  const e = {
3860
3897
  name: "t",
@@ -3867,13 +3904,13 @@ const bi = function(t) {
3867
3904
  const l = n[a];
3868
3905
  if (l) {
3869
3906
  const u = typeof l == "object";
3870
- let f = (m) => {
3871
- let v = t.t(u ? l.attr : l, u ? l.params : null, m);
3907
+ let c = (g) => {
3908
+ let $ = t.t(u ? l.attr : l, u ? l.params : null, g);
3872
3909
  const w = u && l.modify ? i : r.getProp();
3873
- a === "child" ? w.children ? R(w.children, 0, v) : R(w, "children", [v]) : ne(w, a, v), s.sync(i);
3874
- }, d = (m) => f(m);
3875
- const g = t.watchLoadData(d);
3876
- f = ce(f, l.wait || 300), l.watch !== !1 ? o.push(g) : g();
3910
+ a === "child" ? w.children ? E(w.children, 0, $) : E(w, "children", [$]) : oe(w, a, $), s.sync(i);
3911
+ }, p = (g) => c(g);
3912
+ const m = t.watchLoadData(p);
3913
+ c = se(c, l.wait || 300), l.watch !== !1 ? o.push(m) : m();
3877
3914
  }
3878
3915
  }), this._fn[r.id] = o;
3879
3916
  },
@@ -3895,7 +3932,7 @@ const bi = function(t) {
3895
3932
  const s = i.method;
3896
3933
  delete i.method, t.getProp().validate = [q(b({}, i), {
3897
3934
  validator(...n) {
3898
- const o = Z(e);
3935
+ const o = x(e);
3899
3936
  if (o)
3900
3937
  return r.exec(o.id, h.String(s) ? s : "formCreateValidate", ...n, {
3901
3938
  attr: t,
@@ -3919,55 +3956,55 @@ const bi = function(t) {
3919
3956
  function r(s, n, o) {
3920
3957
  let a = s.value;
3921
3958
  i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
3922
- const l = (d) => {
3923
- d === void 0 ? s.clearProp() : ne(s.getProp(), a.to || "options", d), o.sync(n);
3959
+ const l = (p) => {
3960
+ p === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", p), o.sync(n);
3924
3961
  };
3925
3962
  if (!a || !a.action && !a.key) {
3926
3963
  l(void 0);
3927
3964
  return;
3928
3965
  }
3929
3966
  if (a = W(a), a.to || (a.to = "options"), a.key) {
3930
- const d = t.$handle.options.globalData[a.key];
3931
- if (!d) {
3967
+ const p = t.$handle.options.globalData[a.key];
3968
+ if (!p) {
3932
3969
  l(void 0);
3933
3970
  return;
3934
3971
  }
3935
- if (d.type === "static") {
3936
- l(d.data);
3972
+ if (p.type === "static") {
3973
+ l(p.data);
3937
3974
  return;
3938
3975
  } else
3939
- a = b(b({}, a), d);
3976
+ a = b(b({}, a), p);
3940
3977
  }
3941
- const u = a.onError, f = () => {
3978
+ const u = a.onError, c = () => {
3942
3979
  if (!s.getValue())
3943
3980
  return s.clearProp(), o.sync(n), !0;
3944
3981
  };
3945
- i._fn[s.id] = t.watchLoadData(ce((d, g) => {
3946
- if (g && a.watch === !1)
3982
+ i._fn[s.id] = t.watchLoadData(se((p, m) => {
3983
+ if (m && a.watch === !1)
3947
3984
  return i._fn[s.id]();
3948
- const m = t.$handle.loadFetchVar(W(a), d, n), v = q(b({
3985
+ const g = t.$handle.loadFetchVar(W(a), p, n), $ = q(b({
3949
3986
  headers: {}
3950
- }, m), {
3951
- onSuccess(w, j) {
3952
- if (f()) return;
3953
- let ee = (N) => j ? N : S(N, "data") ? N.data : N;
3954
- const P = K(m.parse);
3955
- h.Function(P) ? ee = P : P && h.String(P) && (ee = (N) => M(N, P)), l(ee(w, n, o)), o.sync(n);
3987
+ }, g), {
3988
+ onSuccess(w, O) {
3989
+ if (c()) return;
3990
+ let G = (M) => O ? M : D(M, "data") ? M.data : M;
3991
+ const T = z(g.parse);
3992
+ h.Function(T) ? G = T : T && h.String(T) && (G = (M) => B(M, T)), l(G(w, n, o));
3956
3993
  },
3957
3994
  onError(w) {
3958
- l(void 0), !f() && (u || ((j) => xe(j.message || "fetch fail " + m.action)))(w, n, o);
3995
+ l(void 0), !c() && (u || ((O) => et(O.message || "fetch fail " + g.action)))(w, n, o);
3959
3996
  }
3960
3997
  });
3961
- t.$handle.beforeFetch(v, { rule: n, api: o }).then(() => {
3962
- if (h.Function(m.action)) {
3963
- m.action(n, o).then((w) => {
3964
- v.onSuccess(w, !0);
3998
+ t.$handle.beforeFetch($, { rule: n, api: o }).then(() => {
3999
+ if (h.Function(g.action)) {
4000
+ g.action(n, o).then((w) => {
4001
+ $.onSuccess(w, !0);
3965
4002
  }).catch((w) => {
3966
- v.onError(w);
4003
+ $.onError(w);
3967
4004
  });
3968
4005
  return;
3969
4006
  }
3970
- O(() => t.create.fetch(v, { inject: s, rule: n, api: o }));
4007
+ F(() => t.create.fetch($, { inject: s, rule: n, api: o }));
3971
4008
  });
3972
4009
  }, a.wait || 600));
3973
4010
  }
@@ -3991,7 +4028,7 @@ const bi = function(t) {
3991
4028
  t: _i,
3992
4029
  componentValidate: Ht
3993
4030
  };
3994
- function Oi(t) {
4031
+ function Fi(t) {
3995
4032
  t = t || /* @__PURE__ */ new Map();
3996
4033
  const e = {
3997
4034
  $on(r, i) {
@@ -4015,8 +4052,8 @@ function Oi(t) {
4015
4052
  };
4016
4053
  return e;
4017
4054
  }
4018
- const Fi = "html", Ri = {
4019
- name: Fi,
4055
+ const Oi = "html", Si = {
4056
+ name: Oi,
4020
4057
  loadChildren: !1,
4021
4058
  render(t, e) {
4022
4059
  return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
@@ -4043,7 +4080,7 @@ function Ei(t) {
4043
4080
  }
4044
4081
  return null;
4045
4082
  }
4046
- function Si(t) {
4083
+ function Ri(t) {
4047
4084
  const e = localStorage.getItem(t);
4048
4085
  if (e)
4049
4086
  try {
@@ -4068,13 +4105,13 @@ function it(t, e) {
4068
4105
  return null;
4069
4106
  const r = e.split(".");
4070
4107
  let i = t(r.shift());
4071
- return r.length ? i == null ? null : M(i, r) : i;
4108
+ return r.length ? i == null ? null : B(i, r) : i;
4072
4109
  }
4073
4110
  function Di(t) {
4074
4111
  return it(Ei, t);
4075
4112
  }
4076
4113
  function ji(t) {
4077
- return it(Si, t);
4114
+ return it(Ri, t);
4078
4115
  }
4079
4116
  function Ai(t) {
4080
4117
  return it(ki, t);
@@ -4083,7 +4120,7 @@ function Vi(t, e) {
4083
4120
  let r;
4084
4121
  return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
4085
4122
  }
4086
- function Le() {
4123
+ function Me() {
4087
4124
  return Vi("name", ...arguments);
4088
4125
  }
4089
4126
  function Ii(t) {
@@ -4102,339 +4139,343 @@ function Pi(t, e) {
4102
4139
  }
4103
4140
  function Ti(t) {
4104
4141
  const e = t.key || [], r = t.array || [], i = t.normal || [];
4105
- St.push(...e), Ze.push(...r), Ye.push(...i), Bt([...e, ...r, ...i]);
4142
+ Rt.push(...e), Ye.push(...r), xe.push(...i), Bt([...e, ...r, ...i]);
4106
4143
  }
4107
4144
  let Bi = 1;
4108
- const U = {}, Ee = Symbol("defValue");
4145
+ const U = {}, Re = Symbol("defValue");
4109
4146
  function Gt(t) {
4110
4147
  const e = {
4111
- [Be.name]: Be
4148
+ [Le.name]: Le
4112
4149
  }, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
4113
4150
  t.extendApi
4114
- ], u = b({}, wi), f = Xr();
4115
- let d = { global: {} };
4116
- const g = t.isMobile === !0, m = ie({
4117
- $mobile: g
4118
- }), v = $i(), w = {}, j = {};
4151
+ ], u = b({}, wi), c = Xr();
4152
+ let p = { global: {} };
4153
+ const m = t.isMobile === !0, g = ne({
4154
+ $mobile: m
4155
+ }), $ = $i(), w = {}, O = {};
4119
4156
  Ti(t.attrs || {});
4120
- function ee(c) {
4121
- const p = U[c];
4122
- if (Array.isArray(p))
4123
- return p.map((y) => y.api());
4124
- if (p)
4125
- return p.api();
4157
+ function G(f) {
4158
+ const d = U[f];
4159
+ if (Array.isArray(d))
4160
+ return d.map((y) => y.api());
4161
+ if (d)
4162
+ return d.api();
4126
4163
  }
4127
- function P(c) {
4128
- o.push(c);
4164
+ function T(f) {
4165
+ o.push(f);
4129
4166
  }
4130
- function N() {
4131
- const c = Le(...arguments);
4132
- c.id && c.prop && (i[c.id] = c.prop);
4167
+ function M() {
4168
+ const f = Me(...arguments);
4169
+ f.id && f.prop && (i[f.id] = f.prop);
4133
4170
  }
4134
- function Ae() {
4135
- const c = Le(...arguments);
4136
- c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(b({}, c.prop), {
4137
- name: c.id
4171
+ function he() {
4172
+ const f = Me(...arguments);
4173
+ f.id && f.prop && (u[f.id] = h.Function(f.prop) ? f.prop : q(b({}, f.prop), {
4174
+ name: f.id
4138
4175
  }));
4139
4176
  }
4140
- function be(c) {
4141
- v.use(c);
4177
+ function Ve(f) {
4178
+ $.use(f);
4142
4179
  }
4143
- function F() {
4144
- const c = Le(...arguments);
4145
- if (!c.id || !c.prop) return ke;
4146
- const p = G(c.id), y = c.prop, $ = y.merge === !0 ? r[p] : void 0;
4147
- r[p] = Re(y, $ || ke), f[p] = I(p), y.maker && _(f, y.maker);
4180
+ function de() {
4181
+ const f = Me(...arguments);
4182
+ if (!f.id || !f.prop) return De;
4183
+ const d = J(f.id), y = f.prop, v = y.merge === !0 ? r[d] : void 0;
4184
+ r[d] = Ee(y, v || De), c[d] = P(d), y.maker && _(c, y.maker);
4148
4185
  }
4149
- function D(c, p) {
4186
+ function S(f, d) {
4150
4187
  let y;
4151
- if (h.String(c)) {
4152
- if (y = c, p === void 0)
4153
- return ["form-create", "formcreate"].indexOf(y) > -1 ? B() : e[y];
4188
+ if (h.String(f)) {
4189
+ if (y = f, d === void 0)
4190
+ return ["form-create", "formcreate"].indexOf(y) > -1 ? R() : e[y];
4154
4191
  } else
4155
- y = G(c.name), p = c;
4156
- if (!y || !p) return;
4157
- const $ = G(y);
4158
- e[y] = p, e[$] = p, delete v.aliasMap[y], delete v.aliasMap[$], delete r[y], delete r[$], p.formCreateParser && F(y, p.formCreateParser);
4192
+ y = J(f.name), d = f;
4193
+ if (!y || !d) return;
4194
+ const v = J(y);
4195
+ e[y] = d, e[v] = d, delete $.aliasMap[y], delete $.aliasMap[v], delete r[y], delete r[v], d.formCreateParser && de(y, d.formCreateParser);
4159
4196
  }
4160
- function B() {
4161
- return Nr(Ie, e, i);
4197
+ function R() {
4198
+ return Wr(Pe, e, i);
4162
4199
  }
4163
- function se() {
4164
- return Be;
4200
+ function N() {
4201
+ return Le;
4165
4202
  }
4166
- function _e(c, p) {
4167
- return h.Function(c.install) ? c.install(oe, p) : h.Function(c) && c(oe, p), this;
4203
+ function pe(f, d) {
4204
+ return h.Function(f.install) ? f.install(K, d) : h.Function(f) && f(K, d), this;
4168
4205
  }
4169
- function oe(c, p, y) {
4170
- let $ = Pi(c, p || {});
4171
- const C = $.$refs.fc.formCreate;
4172
- return C.$parent = y, Ii(C.options).appendChild($.$el), C.api();
4206
+ function K(f, d, y) {
4207
+ let v = Pi(f, d || {});
4208
+ const C = v.$refs.fc.formCreate;
4209
+ return C.$parent = y, Ii(C.options).appendChild(v.$el), C.api();
4173
4210
  }
4174
- Re(oe, j);
4175
- function Wt(c) {
4176
- let p = b({}, t);
4177
- return c ? p.inherit = {
4211
+ Ee(K, O);
4212
+ function Wt(f) {
4213
+ let d = b({}, t);
4214
+ return f ? d.inherit = {
4178
4215
  components: e,
4179
4216
  parsers: r,
4180
4217
  directives: i,
4181
4218
  modelFields: s,
4182
4219
  providers: u,
4183
4220
  useApps: o,
4184
- maker: f,
4221
+ maker: c,
4185
4222
  formulas: w,
4186
- loadData: m
4187
- } : delete p.inherit, Gt(p);
4223
+ loadData: g
4224
+ } : delete d.inherit, Gt(d);
4188
4225
  }
4189
- function Kt(c, p) {
4190
- s[c] = p;
4226
+ function Kt(f, d) {
4227
+ s[f] = d;
4191
4228
  }
4192
- function Xt(c, p) {
4193
- w[c] = p;
4229
+ function Xt(f, d) {
4230
+ w[f] = d;
4194
4231
  }
4195
- function zt(c, p) {
4196
- const y = n[c] || {}, $ = y.parsers || {};
4197
- p.parsers && Object.keys(p.parsers).forEach((C) => {
4198
- $[C] = Re(p.parsers[C], ke);
4199
- }), p.name = c, n[c] = q(b(b({}, y), p), { parsers: $ });
4232
+ function zt(f, d) {
4233
+ const y = n[f] || {}, v = y.parsers || {};
4234
+ d.parsers && Object.keys(d.parsers).forEach((C) => {
4235
+ v[C] = Ee(d.parsers[C], De);
4236
+ }), d.name = f, n[f] = q(b(b({}, y), d), { parsers: v });
4200
4237
  }
4201
- function Ce(c) {
4202
- c && Object.keys(U).forEach((p) => {
4203
- (Array.isArray(U[p]) ? U[p] : [U[p]]).forEach(($) => {
4204
- $.bus.$emit("$loadData." + c);
4238
+ function we(f) {
4239
+ f && Object.keys(U).forEach((d) => {
4240
+ (Array.isArray(U[d]) ? U[d] : [U[d]]).forEach((v) => {
4241
+ v.bus.$emit("$loadData." + f);
4205
4242
  });
4206
4243
  });
4207
4244
  }
4208
- function Ve(c, p) {
4209
- ne(m, c, p), Ce(c);
4245
+ function Ie(f, d) {
4246
+ oe(g, f, d), we(f);
4210
4247
  }
4211
- function we(c, p) {
4212
- const y = (...$) => O(() => p(...$));
4213
- y._driver = !0, Ve(c, y);
4248
+ function Fe(f, d) {
4249
+ const y = (...v) => F(() => d(...v));
4250
+ y._driver = !0, Ie(f, y);
4214
4251
  }
4215
- function nt(c, p) {
4216
- const y = (c || "").split(".");
4217
- c = y.shift();
4218
- const $ = y.join(".");
4219
- if (S(m, c) || R(m, c, Ee), m[c] !== Ee) {
4220
- let C = m[c];
4221
- return C && C._driver ? C = C($) : y.length && (C = M(C, y)), C == null || C === "" ? p : C;
4252
+ function nt(f, d) {
4253
+ const y = (f || "").split(".");
4254
+ f = y.shift();
4255
+ const v = y.join(".");
4256
+ if (D(g, f) || E(g, f, Re), g[f] !== Re) {
4257
+ let C = g[f];
4258
+ return C && C._driver ? C = C(v) : y.length && (C = B(C, y)), C == null || C === "" ? d : C;
4222
4259
  } else
4223
- return p;
4260
+ return d;
4224
4261
  }
4225
- function Qt(c) {
4226
- l.push(c);
4262
+ function Qt(f) {
4263
+ l.push(f);
4227
4264
  }
4228
- function Zt(c) {
4229
- delete m[c], Ce(c);
4265
+ function Zt(f) {
4266
+ delete g[f], we(f);
4230
4267
  }
4231
- function Yt(c, p) {
4232
- a.push({ name: c, callback: p });
4268
+ function Yt(f, d) {
4269
+ a.push({ name: f, callback: d });
4233
4270
  }
4234
- function Ie(c) {
4271
+ function Pe(f) {
4235
4272
  _(this, {
4236
4273
  id: Bi++,
4237
- create: oe,
4238
- vm: c,
4274
+ create: K,
4275
+ vm: f,
4239
4276
  manager: vi(t.manager),
4240
4277
  parsers: r,
4241
4278
  providers: u,
4242
4279
  modelFields: s,
4243
4280
  formulas: w,
4244
- isMobile: g,
4245
- rules: c.$options.propsData.rule,
4246
- name: c.$options.propsData.name || je(),
4247
- inFor: c.$options.propsData.inFor,
4281
+ isMobile: m,
4282
+ rules: f.$options.propsData.rule,
4283
+ name: f.$options.propsData.name || Ae(),
4284
+ inFor: f.$options.propsData.inFor,
4248
4285
  prop: {
4249
4286
  components: e,
4250
4287
  directives: i
4251
4288
  },
4289
+ get: null,
4252
4290
  drivers: n,
4253
4291
  renderDriver: null,
4254
- refreshData: Ce,
4255
- loadData: m,
4256
- CreateNode: v,
4257
- bus: new Oi(),
4292
+ refreshData: we,
4293
+ loadData: g,
4294
+ CreateNode: $,
4295
+ bus: new Fi(),
4258
4296
  unwatch: [],
4259
4297
  options: dr({}),
4260
4298
  extendApiFn: l,
4261
4299
  fetchCache: /* @__PURE__ */ new WeakMap(),
4262
- tmpData: ie({})
4263
- }), a.forEach((p) => {
4264
- this.bus.$on(p.name, p.callback);
4265
- }), T(() => {
4300
+ tmpData: ne({})
4301
+ }), a.forEach((d) => {
4302
+ this.bus.$on(d.name, d.callback);
4303
+ }), I(() => {
4266
4304
  L(this.options, () => {
4267
4305
  this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
4268
4306
  }, { deep: !0 });
4269
- }), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new X(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4307
+ }), _(f.$options.components, e), _(f.$options.directives, i), this.$handle = new Q(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4270
4308
  }
4271
- Ie.isMobile = g, _(Ie.prototype, {
4309
+ Pe.isMobile = m, _(Pe.prototype, {
4272
4310
  init() {
4273
4311
  this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
4274
4312
  this.initOptions(), this.$handle.api.refresh();
4275
- }, { deep: !0 })), this.vm.$options.propsData.driver && (this.renderDriver = typeof this.vm.$options.propsData.driver == "object" ? this.vm.$options.propsData.driver : this.drivers[this.vm.$options.propsData.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
4276
- },
4277
- targetFormDriver(c, ...p) {
4278
- if (this.renderDriver && this.renderDriver[c])
4279
- return O(() => this.renderDriver[c](...p));
4280
- },
4281
- t(c, p, y) {
4282
- let $ = y ? y("$t." + c) : this.globalLanguageDriver(c);
4283
- return $ == null && ($ = ""), $ && p && Object.keys(p).forEach((C) => {
4284
- const k = new RegExp(`{${C}}`, "g");
4285
- $ = $.replace(k, p[C]);
4286
- }), $;
4287
- },
4288
- globalDataDriver(c) {
4289
- let p = c.split(".");
4290
- const y = p.shift(), $ = this.options.value.globalData && this.options.value.globalData[y];
4291
- if ($) {
4292
- if ($.type === "static")
4293
- return M($.data, p);
4313
+ }, { deep: !0 })), this.vm.$options.propsData.driver && (this.renderDriver = typeof this.vm.$options.propsData.driver == "object" ? this.vm.$options.propsData.driver : this.drivers[this.vm.$options.propsData.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
4314
+ },
4315
+ targetFormDriver(f, ...d) {
4316
+ if (this.renderDriver && this.renderDriver[f])
4317
+ return F(() => this.renderDriver[f](...d));
4318
+ },
4319
+ t(f, d, y) {
4320
+ let v = y ? y("$t." + f) : this.globalLanguageDriver(f);
4321
+ return v == null && (v = ""), v && d && Object.keys(d).forEach((C) => {
4322
+ const j = new RegExp(`{${C}}`, "g");
4323
+ v = v.replace(j, d[C]);
4324
+ }), v;
4325
+ },
4326
+ globalDataDriver(f) {
4327
+ let d = f.split(".");
4328
+ const y = d.shift(), v = this.options.value.globalData && this.options.value.globalData[y];
4329
+ if (v) {
4330
+ if (v.type === "static")
4331
+ return B(v.data, d);
4294
4332
  {
4295
4333
  let C;
4296
- const k = this.fetchCache.get($);
4297
- if (k) {
4298
- if (k.status && (C = M(k.data, p)), !k.loading)
4334
+ const j = this.fetchCache.get(v);
4335
+ if (j) {
4336
+ if (j.status && (C = B(j.data, d)), !j.loading)
4299
4337
  return C;
4300
- k.loading = !1, this.fetchCache.set($, k);
4338
+ j.loading = !1, this.fetchCache.set(v, j);
4301
4339
  } else
4302
- this.fetchCache.set($, { status: !1 });
4303
- const E = ce(() => {
4340
+ this.fetchCache.set(v, { status: !1 });
4341
+ const k = se(() => {
4304
4342
  le();
4305
- const J = this.fetchCache.get($);
4306
- this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (J && (J.loading = !0, this.fetchCache.set($, J)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete($);
4307
- }, $.wait || 600), ae = (J) => {
4308
- this.fetchCache.set($, { status: !0, data: J }), this.bus.$emit("$loadData.$globalData." + y);
4309
- }, z = (J, ue) => {
4310
- if (ue && $.watch === !1)
4343
+ const X = this.fetchCache.get(v);
4344
+ this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(v) !== -1 ? (X && (X.loading = !0, this.fetchCache.set(v, X)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(v);
4345
+ }, v.wait || 600), ae = (X) => {
4346
+ this.fetchCache.set(v, { status: !0, data: X }), this.bus.$emit("$loadData.$globalData." + y);
4347
+ }, Z = (X, ue) => {
4348
+ if (ue && v.watch === !1)
4311
4349
  return le();
4312
4350
  if (ue) {
4313
- E();
4351
+ k();
4314
4352
  return;
4315
4353
  }
4316
- const de = this.$handle.loadFetchVar(Ge($), J);
4317
- this.$handle.api.fetch(de).then((te) => {
4318
- ae(te);
4319
- }).catch((te) => {
4354
+ const me = this.$handle.loadFetchVar(Je(v), X);
4355
+ this.$handle.api.fetch(me).then((re) => {
4356
+ ae(re);
4357
+ }).catch((re) => {
4320
4358
  ae(null);
4321
4359
  });
4322
- }, le = this.watchLoadData(z);
4360
+ }, le = this.watchLoadData(Z);
4323
4361
  return this.unwatch.push(le), C;
4324
4362
  }
4325
4363
  }
4326
4364
  },
4327
4365
  getLocale() {
4328
- let c = this.vm.top.$props.locale;
4329
- return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
4330
- },
4331
- globalLanguageDriver(c) {
4332
- let p = this.vm.top.$props.locale, y;
4333
- if (p && typeof p == "object" && (y = M(p, c)), y == null) {
4334
- const $ = this.options.value.language || {}, C = this.getLocale();
4335
- y = M($[C], c);
4366
+ let f = this.vm.top.$props.locale;
4367
+ return f && typeof f == "object" ? f.name : typeof f == "string" ? f : "zh-cn";
4368
+ },
4369
+ globalLanguageDriver(f) {
4370
+ let d = this.vm.top.$props.locale, y;
4371
+ if (d && typeof d == "object" && (y = B(d, f)), y == null) {
4372
+ const v = this.options.value.language || {}, C = this.getLocale();
4373
+ y = B(v[C], f);
4336
4374
  }
4337
4375
  return y;
4338
4376
  },
4339
- globalVarDriver(c) {
4340
- const y = c.split(".").shift(), $ = this.options.value.globalVariable && this.options.value.globalVariable[y];
4341
- if ($) {
4342
- const C = h.Function($) ? $ : K($.handle);
4377
+ globalVarDriver(f) {
4378
+ let d = f.split(".");
4379
+ const y = d.shift(), v = this.options.value.globalVariable && this.options.value.globalVariable[y];
4380
+ if (v) {
4381
+ const C = h.Function(v) ? v : z(v.handle);
4343
4382
  if (C) {
4344
- let k;
4345
- const E = this.watchLoadData((ae, z) => {
4346
- z ? (this.bus.$emit("$loadData.$var." + y), E()) : k = C(ae, this.$handle.api);
4383
+ let j;
4384
+ const k = this.watchLoadData((ae, Z) => {
4385
+ Z ? (this.bus.$emit("$loadData.$var." + y), k()) : j = C(ae, this.$handle.api);
4347
4386
  });
4348
- return this.unwatch.push(E), k;
4387
+ return this.unwatch.push(k), B(j, d);
4349
4388
  }
4350
4389
  }
4351
4390
  },
4352
- setData(c, p, y) {
4353
- y ? Ve(c, p) : (ne(this.vm.top.fc.tmpData, c, p), this.bus.$emit("$loadData." + c));
4391
+ setData(f, d, y) {
4392
+ y ? Ie(f, d) : (oe(this.vm.top.fc.tmpData, f, d), this.bus.$emit("$loadData." + f));
4354
4393
  },
4355
- getLoadData(c, p) {
4394
+ getLoadData(f, d) {
4356
4395
  let y = null;
4357
- if (c != null) {
4358
- let $ = c.split(".");
4359
- const C = $.shift();
4396
+ if (f != null) {
4397
+ let v = f.split(".");
4398
+ const C = v.shift();
4360
4399
  if (C === "$topForm")
4361
- y = this.$handle.api.top.formData();
4400
+ y = this.$handle.api.top.formData(!0);
4401
+ else if (C === "$scopeForm")
4402
+ y = this.$handle.api.scope.formData(!0);
4362
4403
  else if (C === "$form")
4363
- y = this.$handle.api.formData();
4404
+ y = this.$handle.api.formData(!0);
4364
4405
  else if (C === "$options")
4365
4406
  y = this.options.value;
4366
4407
  else if (C === "$globalData")
4367
- y = this.globalDataDriver($.join(".")), $ = [];
4408
+ y = this.globalDataDriver(v.join(".")), v = [];
4368
4409
  else if (C === "$var")
4369
- y = this.globalVarDriver($.join(".")), $ = [];
4410
+ y = this.globalVarDriver(v.join(".")), v = [];
4370
4411
  else if (C === "$locale")
4371
- y = this.getLocale(), $ = [];
4412
+ y = this.getLocale(), v = [];
4372
4413
  else if (C === "$t")
4373
- y = this.globalLanguageDriver($.join(".")), $ = [];
4414
+ y = this.globalLanguageDriver(v.join(".")), v = [];
4374
4415
  else {
4375
4416
  if (C === "$preview")
4376
4417
  return this.$handle.preview;
4377
4418
  {
4378
- const k = this.vm.top.fc.tmpData;
4379
- S(k, C) || R(k, C, Ee), y = k[C] !== Ee ? M(k, c) : nt(c), $ = [];
4419
+ const j = this.vm.top.fc.tmpData;
4420
+ D(j, C) || E(j, C, Re), y = j[C] !== Re ? B(j, f) : nt(f), v = [];
4380
4421
  }
4381
4422
  }
4382
- y && $.length && (y = M(y, $));
4423
+ y && v.length && (y = B(y, v));
4383
4424
  }
4384
- return y == null || y === "" ? p : y;
4425
+ return y == null || y === "" ? d : y;
4385
4426
  },
4386
- watchLoadData(c, p) {
4427
+ watchLoadData(f, d) {
4387
4428
  let y = {};
4388
- const $ = (E) => {
4389
- O(() => {
4390
- c(C, E);
4391
- });
4392
- }, C = (E, ae) => {
4393
- let z;
4394
- if (typeof E == "object" && (z = E.getValue, E = E.id), y[E])
4395
- return y[E].val;
4396
- const le = me(() => z ? z() : this.getLoadData(E, ae)), J = E.split("."), ue = J.shift(), de = J.shift() || "", te = ce(() => {
4397
- const Pe = z ? z() : this.getLoadData(E, ae);
4398
- if (y[E])
4399
- JSON.stringify(Pe) !== JSON.stringify(y[E].val) && (y[E].val = Pe, $(!0));
4429
+ const v = (k) => {
4430
+ this.get || (this.get = C), F(() => {
4431
+ f(C, k);
4432
+ }), this.get === C && (this.get = void 0);
4433
+ }, C = (k, ae) => {
4434
+ let Z;
4435
+ if (typeof k == "object" && (Z = k.getValue, k = k.id), y[k])
4436
+ return y[k].val;
4437
+ const le = ye(() => Z ? Z() : this.getLoadData(k, ae)), X = k.split("."), ue = X.shift(), me = X.shift() || "", re = se(() => {
4438
+ const Te = Z ? Z() : this.getLoadData(k, ae);
4439
+ if (y[k])
4440
+ JSON.stringify(Te) !== JSON.stringify(y[k].val) && (y[k].val = Te, v(!0));
4400
4441
  else return;
4401
- }, p || 0), er = L(le, (Pe) => {
4402
- te();
4442
+ }, d || 0), er = L(le, (Te) => {
4443
+ re();
4403
4444
  });
4404
- return this.bus.$on("$loadData." + ue, te), de && this.bus.$on("$loadData." + ue + "." + de, te), y[E] = {
4445
+ return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re), y[k] = {
4405
4446
  fn: () => {
4406
- this.bus.$off("$loadData." + ue, te), de && this.bus.$off("$loadData." + ue + "." + de, te), er();
4447
+ this.bus.$off("$loadData." + ue, re), me && this.bus.$off("$loadData." + ue + "." + me, re), er();
4407
4448
  },
4408
4449
  val: le.value
4409
4450
  }, le.value;
4410
4451
  };
4411
- $(!1);
4412
- const k = () => {
4413
- Object.keys(y).forEach((E) => y[E].fn()), y = {};
4452
+ v(!1);
4453
+ const j = () => {
4454
+ Object.keys(y).forEach((k) => y[k].fn()), y = {};
4414
4455
  };
4415
- return this.unwatch.push(k), k;
4456
+ return this.unwatch.push(j), j;
4416
4457
  },
4417
4458
  isSub() {
4418
4459
  return this.vm.parent && this.vm.extendOption;
4419
4460
  },
4420
4461
  initOptions() {
4421
4462
  this.options.value = {};
4422
- let c = b({
4463
+ let f = b({
4423
4464
  formData: {},
4424
4465
  submitBtn: {},
4425
4466
  resetBtn: {},
4426
4467
  globalEvent: {},
4427
4468
  globalData: {}
4428
- }, W(d));
4429
- this.isSub() && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$options.propsData.option || {}), this.updateOptions(c);
4469
+ }, W(p));
4470
+ this.isSub() && (f = this.mergeOptions(f, this.vm.parent.fc.options.value || {}, !0)), f = this.mergeOptions(f, this.vm.$options.propsData.option || {}), this.updateOptions(f);
4430
4471
  },
4431
- mergeOptions(c, p, y) {
4432
- return p = b({}, p || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach(($) => {
4433
- delete p[$];
4434
- }), p.global && (c.global = Gr(c.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], c), c;
4472
+ mergeOptions(f, d, y) {
4473
+ return d = b({}, d || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((v) => {
4474
+ delete d[v];
4475
+ }), d.global && (f.global = Hr(f.global, d.global), delete d.global), this.$handle.$manager.mergeOptions([d], f), f;
4435
4476
  },
4436
- updateOptions(c) {
4437
- this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
4477
+ updateOptions(f) {
4478
+ this.options.value = this.mergeOptions(this.options.value, f), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
4438
4479
  },
4439
4480
  api() {
4440
4481
  return this.$handle.api;
@@ -4448,86 +4489,86 @@ function Gt(t) {
4448
4489
  unmount() {
4449
4490
  if (this.name)
4450
4491
  if (this.inFor) {
4451
- const c = U[this.name].indexOf(this);
4452
- U[this.name].splice(c, 1);
4492
+ const f = U[this.name].indexOf(this);
4493
+ U[this.name].splice(f, 1);
4453
4494
  } else
4454
4495
  delete U[this.name];
4455
- a.forEach((c) => {
4456
- this.bus.$off(c.name, c.callback);
4457
- }), this.tmpData = {}, this.unwatch.forEach((c) => c()), this.unwatch = [], this.$handle.reloadRule([]);
4496
+ a.forEach((f) => {
4497
+ this.bus.$off(f.name, f.callback);
4498
+ }), this.tmpData = {}, this.unwatch.forEach((f) => f()), this.unwatch = [], this.$handle.reloadRule([]);
4458
4499
  },
4459
4500
  updated() {
4460
4501
  this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
4461
4502
  }
4462
4503
  });
4463
- function st(c) {
4464
- _(c, {
4504
+ function st(f) {
4505
+ _(f, {
4465
4506
  version: t.version,
4466
4507
  ui: t.ui,
4467
- isMobile: g,
4508
+ isMobile: m,
4468
4509
  extendApi: Qt,
4469
4510
  getData: nt,
4470
- setDataDriver: we,
4471
- setData: Ve,
4511
+ setDataDriver: Fe,
4512
+ setData: Ie,
4472
4513
  removeData: Zt,
4473
- refreshData: Ce,
4474
- maker: f,
4475
- component: D,
4476
- directive: N,
4514
+ refreshData: we,
4515
+ maker: c,
4516
+ component: S,
4517
+ directive: M,
4477
4518
  setModelField: Kt,
4478
4519
  setFormula: Xt,
4479
4520
  setDriver: zt,
4480
- register: Ae,
4481
- $vnode: se,
4482
- parser: F,
4483
- use: _e,
4521
+ register: he,
4522
+ $vnode: N,
4523
+ parser: de,
4524
+ use: pe,
4484
4525
  factory: Wt,
4485
- componentAlias: be,
4526
+ componentAlias: Ve,
4486
4527
  copyRule: Vt,
4487
4528
  copyRules: It,
4488
- mergeRule: x,
4529
+ mergeRule: te,
4489
4530
  fetch: Mt,
4490
- $form: B,
4491
- parseFn: K,
4531
+ $form: R,
4532
+ parseFn: z,
4492
4533
  parseJson: At,
4493
- toJson: et,
4494
- useApp: P,
4495
- getApi: ee,
4534
+ toJson: _e,
4535
+ useApp: T,
4536
+ getApi: G,
4496
4537
  on: Yt
4497
4538
  });
4498
4539
  }
4499
- function xt(c) {
4500
- _(c, {
4501
- create: oe,
4502
- install(p, y) {
4503
- if (d = b(b({}, d), y || {}), p._installedFormCreate === !0) return;
4504
- p._installedFormCreate = !0;
4505
- const $ = function(k, E = {}) {
4506
- return oe(k, E, this);
4540
+ function xt(f) {
4541
+ _(f, {
4542
+ create: K,
4543
+ install(d, y) {
4544
+ if (p = b(b({}, p), y || {}), d._installedFormCreate === !0) return;
4545
+ d._installedFormCreate = !0;
4546
+ const v = function(j, k = {}) {
4547
+ return K(j, k, this);
4507
4548
  };
4508
- st($), p.prototype.$formCreate = $;
4509
- const C = B();
4510
- p.component(C.name, C), p.component("FcFragment", se()), o.forEach((k) => {
4511
- O(() => k(c, p));
4549
+ st(v), d.prototype.$formCreate = v;
4550
+ const C = R();
4551
+ d.component(C.name, C), d.component("FcFragment", N()), o.forEach((j) => {
4552
+ F(() => j(f, d));
4512
4553
  });
4513
4554
  }
4514
4555
  });
4515
4556
  }
4516
- if (st(j), xt(j), we("$cookie", Di), we("$localStorage", ji), we("$sessionStorage", Ai), v.use({ fragment: "fcFragment" }), t.install && oe.use(t), F(Ri), t.inherit) {
4517
- const c = t.inherit;
4518
- c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(m, c.loadData), c.formulas && _(w, c.formulas);
4557
+ if (st(O), xt(O), Fe("$cookie", Di), Fe("$localStorage", ji), Fe("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && K.use(t), de(Si), t.inherit) {
4558
+ const f = t.inherit;
4559
+ f.components && _(e, f.components), f.parsers && _(r, f.parsers), f.directives && _(i, f.directives), f.modelFields && _(s, f.modelFields), f.providers && _(u, f.providers), f.useApps && _(o, f.useApps), f.maker && _(c, f.maker), f.loadData && _(g, f.loadData), f.formulas && _(w, f.formulas);
4519
4560
  }
4520
- const Oe = B();
4521
- return Re(Oe, j), Object.defineProperties(Oe, {
4561
+ const Oe = R();
4562
+ return Ee(Oe, O), Object.defineProperties(Oe, {
4522
4563
  fetch: {
4523
4564
  get() {
4524
- return j.fetch;
4565
+ return O.fetch;
4525
4566
  },
4526
- set(c) {
4527
- j.fetch = c;
4567
+ set(f) {
4568
+ O.fetch = f;
4528
4569
  }
4529
4570
  }
4530
- }), Oe.util = j, Oe;
4571
+ }), Oe.util = O, Oe;
4531
4572
  }
4532
4573
  const bt = {
4533
4574
  date: "yyyy-MM-dd",
@@ -4541,25 +4582,25 @@ const bt = {
4541
4582
  }, _t = "datePicker", Li = {
4542
4583
  name: _t,
4543
4584
  maker: function() {
4544
- return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = I(_t, { type: e.toLowerCase() }), t), {});
4585
+ return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = P(_t, { type: e.toLowerCase() }), t), {});
4545
4586
  }(),
4546
4587
  mergeProp(t) {
4547
4588
  const e = t.prop.props;
4548
4589
  e.valueFormat || (e.valueFormat = bt[e.type] || bt.date);
4549
4590
  }
4550
- }, Me = "hidden", Mi = {
4551
- name: Me,
4591
+ }, Ne = "hidden", Mi = {
4592
+ name: Ne,
4552
4593
  maker: {
4553
- [Me]: (t, e) => I(Me)("", t, e)
4594
+ [Ne]: (t, e) => P(Ne)("", t, e)
4554
4595
  },
4555
4596
  render() {
4556
4597
  return [];
4557
4598
  }
4558
- }, Ne = "input", Ni = {
4559
- name: Ne,
4599
+ }, qe = "input", Ni = {
4600
+ name: qe,
4560
4601
  maker: function() {
4561
- const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = I(Ne, { type: r }), e), {});
4562
- return t.idate = I(Ne, { type: "date" }), t;
4602
+ const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(qe, { type: r }), e), {});
4603
+ return t.idate = P(qe, { type: "date" }), t;
4563
4604
  }(),
4564
4605
  mergeProp(t) {
4565
4606
  let { props: e } = t.prop;
@@ -4568,17 +4609,17 @@ const bt = {
4568
4609
  }, Ct = "slider", qi = {
4569
4610
  name: Ct,
4570
4611
  maker: {
4571
- sliderRange: I(Ct, { range: !0 })
4612
+ sliderRange: P(Ct, { range: !0 })
4572
4613
  },
4573
4614
  toFormValue(t, e) {
4574
4615
  let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
4575
4616
  return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
4576
4617
  }
4577
- }, qe = "timePicker", Ui = {
4578
- name: qe,
4618
+ }, Ue = "timePicker", Ui = {
4619
+ name: Ue,
4579
4620
  maker: {
4580
- time: I(qe, (t) => t.props.isRange = !1),
4581
- timeRange: I(qe, (t) => t.props.isRange = !0)
4621
+ time: P(Ue, (t) => t.props.isRange = !1),
4622
+ timeRange: P(Ue, (t) => t.props.isRange = !0)
4582
4623
  },
4583
4624
  mergeProp(t) {
4584
4625
  const e = t.prop.props;
@@ -4675,15 +4716,15 @@ function zi(t) {
4675
4716
  return t.type === "tooltip";
4676
4717
  }
4677
4718
  function wt(t, e) {
4678
- S(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
4719
+ D(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
4679
4720
  }
4680
- function Q(t) {
4721
+ function Y(t) {
4681
4722
  return t === !1;
4682
4723
  }
4683
4724
  function Qi(t, e) {
4684
- S(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
4725
+ D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
4685
4726
  }
4686
- function Ue(t) {
4727
+ function He(t) {
4687
4728
  const e = b({}, t);
4688
4729
  return delete e.children, e;
4689
4730
  }
@@ -4724,7 +4765,7 @@ const Zi = {
4724
4765
  wrap: {}
4725
4766
  };
4726
4767
  ["info", "wrap", "col", "title"].forEach((r) => {
4727
- t.prop[r] = Y([this.options[r] || {}, t.prop[r] || {}], e[r]);
4768
+ t.prop[r] = ee([this.options[r] || {}, t.prop[r] || {}], e[r]);
4728
4769
  });
4729
4770
  },
4730
4771
  getDefaultOptions() {
@@ -4751,16 +4792,16 @@ const Zi = {
4751
4792
  });
4752
4793
  },
4753
4794
  render(t) {
4754
- return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Q(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
4795
+ return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Y(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
4755
4796
  },
4756
4797
  makeWrap(t, e) {
4757
4798
  const r = t.prop, i = `${this.key}${t.key}`, s = r.col, n = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !n ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props;
4758
4799
  delete r.wrap.title;
4759
- const u = Q(r.wrap.show) ? e : this.$r(Y([r.wrap, {
4800
+ const u = Y(r.wrap.show) ? e : this.$r(ee([r.wrap, {
4760
4801
  props: q(b({
4761
4802
  labelWidth: o === void 0 ? o : jt(o),
4762
4803
  label: n ? r.title.title : void 0
4763
- }, Ue(r.wrap || {})), {
4804
+ }, He(r.wrap || {})), {
4764
4805
  prop: t.id,
4765
4806
  rules: t.injectValidate()
4766
4807
  }),
@@ -4769,30 +4810,30 @@ const Zi = {
4769
4810
  ref: t.wrapRef,
4770
4811
  type: "formItem"
4771
4812
  }]), b({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
4772
- return a === !0 || Q(l) || Q(s.show) ? u : this.makeCol(r, i, [u]);
4813
+ return a === !0 || Y(l) || Y(s.show) ? u : this.makeCol(r, i, [u]);
4773
4814
  },
4774
4815
  isTitle(t) {
4775
4816
  if (this.options.form.title === !1) return !1;
4776
4817
  const e = t.title;
4777
- return !(!e.title && !e.native || Q(e.show));
4818
+ return !(!e.title && !e.native || Y(e.show));
4778
4819
  },
4779
4820
  makeInfo(t, e, r) {
4780
- var f, d, g;
4821
+ var c, p, m, g, $, w;
4781
4822
  const i = b({}, t.title), s = b({}, t.info), n = zi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
4782
- title: (f = r.refRule) == null ? void 0 : f.__$title.value,
4823
+ title: (p = (c = r.refRule) == null ? void 0 : c.__$title) == null ? void 0 : p.value,
4783
4824
  rule: r.rule,
4784
4825
  options: this.options
4785
- }) : ((d = r.refRule) == null ? void 0 : d.__$title.value) + (o.labelSuffix || o["label-suffix"] || "")];
4786
- if (!Q(s.show) && (s.info || s.native) && !Q(s.icon)) {
4787
- const m = {
4826
+ }) : ((g = (m = r.refRule) == null ? void 0 : m.__$title) == null ? void 0 : g.value) + (o.labelSuffix || o["label-suffix"] || "")];
4827
+ if (!Y(s.show) && (s.info || s.native) && !Y(s.icon)) {
4828
+ const O = {
4788
4829
  type: s.type || "popover",
4789
4830
  slot: "label",
4790
- props: Ue(s),
4831
+ props: He(s),
4791
4832
  key: `${e}pop`
4792
4833
  };
4793
- delete m.props.icon, delete m.props.show, delete m.props.info, delete m.props.align, delete m.props.native;
4794
- const v = "content";
4795
- s.info && !S(m.props, v) && (m.props[v] = (g = r.refRule) == null ? void 0 : g.__$info.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, m]), [
4834
+ delete O.props.icon, delete O.props.show, delete O.props.info, delete O.props.align, delete O.props.native;
4835
+ const G = "content";
4836
+ s.info && !D(O.props, G) && (O.props[G] = (w = ($ = r.refRule) == null ? void 0 : $.__$info) == null ? void 0 : w.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(ee([s, O]), [
4796
4837
  this.$r({
4797
4838
  type: "i",
4798
4839
  slot: n ? "default" : "reference",
@@ -4801,8 +4842,8 @@ const Zi = {
4801
4842
  })
4802
4843
  ]));
4803
4844
  }
4804
- const u = Y([i, {
4805
- props: Ue(i),
4845
+ const u = ee([i, {
4846
+ props: He(i),
4806
4847
  key: `${e}tit`,
4807
4848
  class: "fc-form-title",
4808
4849
  slot: i.slot || "label",
@@ -4830,7 +4871,7 @@ const Zi = {
4830
4871
  },
4831
4872
  makeFormBtn() {
4832
4873
  let t = [];
4833
- if (Q(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), Q(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
4874
+ if (Y(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), Y(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
4834
4875
  return;
4835
4876
  const e = this.$r({
4836
4877
  type: "formItem",
@@ -4877,24 +4918,24 @@ const Zi = {
4877
4918
  key: `${this.key}b1`
4878
4919
  }, [e]);
4879
4920
  }
4880
- }, he = {};
4881
- Yi(he);
4882
- xi(he);
4883
- en(he);
4884
- tn(he);
4885
- rn(he);
4921
+ }, fe = {};
4922
+ Yi(fe);
4923
+ xi(fe);
4924
+ en(fe);
4925
+ tn(fe);
4926
+ rn(fe);
4886
4927
  function Yi(t) {
4887
4928
  ["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
4888
- t[e] = I(e);
4929
+ t[e] = P(e);
4889
4930
  }), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
4890
4931
  }
4891
4932
  function xi(t) {
4892
4933
  const e = "select", r = "multiple";
4893
- t.selectMultiple = I(e, { [r]: !0 }), t.selectOne = I(e, { [r]: !1 });
4934
+ t.selectMultiple = P(e, { [r]: !0 }), t.selectOne = P(e, { [r]: !1 });
4894
4935
  }
4895
4936
  function en(t) {
4896
4937
  const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
4897
- Object.keys(r).reduce((i, s) => (i[s] = I(e, { type: r[s] }), i), t);
4938
+ Object.keys(r).reduce((i, s) => (i[s] = P(e, { type: r[s] }), i), t);
4898
4939
  }
4899
4940
  function tn(t) {
4900
4941
  const e = "upload", r = {
@@ -4903,7 +4944,7 @@ function tn(t) {
4903
4944
  uploadFileOne: ["file", 1],
4904
4945
  uploadImageOne: ["image", 1]
4905
4946
  };
4906
- Object.keys(r).reduce((i, s) => (i[s] = I(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4947
+ Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4907
4948
  }
4908
4949
  function rn(t) {
4909
4950
  const e = {
@@ -4914,9 +4955,9 @@ function rn(t) {
4914
4955
  frameFileOne: ["file", 1],
4915
4956
  frameImageOne: ["image", 1]
4916
4957
  };
4917
- return Object.keys(e).reduce((r, i) => (r[i] = I("frame", (s) => s.props({ type: e[i][0], maxLength: e[i][1] })), r), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages, t;
4958
+ return Object.keys(e).reduce((r, i) => (r[i] = P("frame", (s) => s.props({ type: e[i][0], maxLength: e[i][1] })), r), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages, t;
4918
4959
  }
4919
- function Ot(t, e) {
4960
+ function Ft(t, e) {
4920
4961
  return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
4921
4962
  }
4922
4963
  function nn(t, e) {
@@ -4932,7 +4973,7 @@ function nn(t, e) {
4932
4973
  validate(r) {
4933
4974
  return new Promise((i, s) => {
4934
4975
  const n = t.children, o = [e.$manager.validate()];
4935
- n.forEach((a) => {
4976
+ n.filter((a) => !a.isScope).forEach((a) => {
4936
4977
  o.push(a.validate());
4937
4978
  }), Promise.all(o).then(() => {
4938
4979
  i(!0), r && r(!0);
@@ -4946,7 +4987,7 @@ function nn(t, e) {
4946
4987
  const o = e.getFieldCtx(r);
4947
4988
  if (!o) return;
4948
4989
  const a = e.subForm[o.id], l = [e.$manager.validateField(o.id)];
4949
- H(a).forEach((u) => {
4990
+ H(a).filter((u) => !u.isScope).forEach((u) => {
4950
4991
  l.push(u.validate());
4951
4992
  }), Promise.all(l).then(() => {
4952
4993
  s(null), i && i(null);
@@ -4995,20 +5036,20 @@ function nn(t, e) {
4995
5036
  }
4996
5037
  },
4997
5038
  submitBtnProps: (r = {}) => {
4998
- let i = Ot(e.options.submitBtn, !0);
5039
+ let i = Ft(e.options.submitBtn, !0);
4999
5040
  _(i, r), e.options.submitBtn = i, t.refreshOptions();
5000
5041
  },
5001
5042
  resetBtnProps: (r = {}) => {
5002
- let i = Ot(e.options.resetBtn, !1);
5043
+ let i = Ft(e.options.resetBtn, !1);
5003
5044
  _(i, r), e.options.resetBtn = i, t.refreshOptions();
5004
5045
  },
5005
5046
  submit(r, i) {
5006
5047
  return new Promise((s, n) => {
5007
- t.validate().then(() => {
5008
- let o = t.formData();
5009
- h.Function(r) && O(() => r(o, t)), h.Function(e.options.onSubmit) && O(() => e.options.onSubmit(o, t)), e.vm.$emit("submit", o, t), s(o);
5010
- }).catch((...o) => {
5011
- h.Function(i) && O(() => i(t, ...o)), n(...o);
5048
+ (e.options.validateOnSubmit === !1 ? Promise.resolve() : t.validate()).then(() => {
5049
+ let a = t.formData();
5050
+ h.Function(r) && F(() => r(a, t)), h.Function(e.options.onSubmit) && F(() => e.options.onSubmit(a, t)), e.vm.$emit("submit", a, t), s(a);
5051
+ }).catch((...a) => {
5052
+ h.Function(i) && F(() => i(t, ...a)), n(...a);
5012
5053
  });
5013
5054
  });
5014
5055
  }
@@ -5017,23 +5058,24 @@ function nn(t, e) {
5017
5058
  const Jt = {
5018
5059
  name: "required",
5019
5060
  load(t, e, r) {
5061
+ var s, n;
5020
5062
  const i = sn(t.getValue());
5021
5063
  if (i.required === !1)
5022
5064
  t.clearProp(), r.clearValidateState([e.field]);
5023
5065
  else {
5024
- const s = b({
5066
+ const o = b({
5025
5067
  required: !0,
5026
- validator(o, a, l) {
5027
- h.empty(a) ? l(s.message) : l();
5068
+ validator(l, u, c) {
5069
+ h.empty(u) ? c(o.message) : c();
5028
5070
  }
5029
- }, i), n = e.__fc__.refRule.__$title.value;
5030
- if (!s.message)
5031
- s.message = r.t("required", { title: n }) || n + (r.getLocale() === "en" ? " is required" : "不能为空");
5071
+ }, i), a = (n = (s = e.__fc__.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value;
5072
+ if (!o.message)
5073
+ o.message = r.t("required", { title: a }) || a + (r.getLocale() === "en" ? " is required" : "不能为空");
5032
5074
  else {
5033
- const o = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
5034
- o && (s.message = r.t(o[1], { title: n }));
5075
+ const l = o.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
5076
+ l && (o.message = r.t(l[1], { title: a }));
5035
5077
  }
5036
- t.getProp().validate = [s];
5078
+ t.getProp().validate = [o];
5037
5079
  }
5038
5080
  r.sync(e);
5039
5081
  },
@@ -5049,14 +5091,14 @@ function on(t) {
5049
5091
  t.component(e.name, e);
5050
5092
  }), t.register(Jt), Wi.forEach((e) => {
5051
5093
  t.parser(e);
5052
- }), Object.keys(he).forEach((e) => {
5053
- t.maker[e] = he[e];
5094
+ }), Object.keys(fe).forEach((e) => {
5095
+ t.maker[e] = fe[e];
5054
5096
  });
5055
5097
  }
5056
5098
  function an() {
5057
5099
  return Gt({
5058
5100
  ui: "element-ui",
5059
- version: "2.7.3",
5101
+ version: "2.7.5",
5060
5102
  manager: Zi,
5061
5103
  extendApi: nn,
5062
5104
  install: on,
@@ -5067,10 +5109,10 @@ function an() {
5067
5109
  }
5068
5110
  });
5069
5111
  }
5070
- const ze = an();
5071
- typeof window != "undefined" && (window.formCreate = ze, window.Vue && ze.install(window.Vue));
5072
- const fn = ze.maker;
5112
+ const Qe = an();
5113
+ typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
5114
+ const cn = Qe.maker;
5073
5115
  export {
5074
- ze as default,
5075
- fn as maker
5116
+ Qe as default,
5117
+ cn as maker
5076
5118
  };