@harnessio/forms 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
- var Re = Object.defineProperty;
2
- var je = (r, e, n) => e in r ? Re(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
3
- var $ = (r, e, n) => je(r, typeof e != "symbol" ? e + "" : e, n);
4
- import { isEmpty as D, set as O, get as T, forOwn as pe, isArray as x, isObject as he, merge as N, isUndefined as J, cloneDeep as W, unset as ye, isPlainObject as we, isNull as ge, omitBy as be, isNil as Ve, isString as xe, capitalize as Fe } from "lodash-es";
5
- import Pe, { createContext as qe, useContext as Ae, Component as ke, memo as De, useMemo as B, useRef as V, useEffect as w, useCallback as Me, forwardRef as $e, Fragment as Ne } from "react";
6
- import { useFormContext as Be, get as Ze, useForm as We, FormProvider as Je, appendErrors as Le, useController as Ue } from "react-hook-form";
7
- import { Controller as Gr, Form as Kr, FormProvider as Qr, get as Xr, set as Yr, useFieldArray as zr, useForm as et, useFormContext as rt, useFormState as tt, useWatch as nt } from "react-hook-form";
8
- import * as m from "zod";
9
- import { toNestErrors as He } from "@hookform/resolvers";
10
- class Ge extends Error {
1
+ var je = Object.defineProperty;
2
+ var Pe = (r, e, t) => e in r ? je(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var N = (r, e, t) => Pe(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { isEmpty as J, set as R, get as T, forOwn as ge, isArray as w, isObject as be, merge as A, isUndefined as L, cloneDeep as M, unset as ve, isPlainObject as xe, isNull as Te, isString as Fe, omitBy as qe, isNil as Ae, capitalize as ke } from "lodash-es";
5
+ import De, { createContext as Me, useContext as $e, Component as Ne, memo as Be, useMemo as B, useRef as P, useEffect as j, useCallback as Ze, forwardRef as We, Fragment as Je } from "react";
6
+ import { useFormContext as Le, get as Ue, useForm as He, FormProvider as Ge, appendErrors as Ke, useController as Qe } from "react-hook-form";
7
+ import { Controller as Xr, Form as Yr, FormProvider as zr, get as et, set as rt, useFieldArray as tt, useForm as nt, useFormContext as st, useFormState as it, useWatch as at } from "react-hook-form";
8
+ import * as p from "zod";
9
+ import { toNestErrors as Xe } from "@hookform/resolvers";
10
+ class Ye extends Error {
11
11
  constructor(e) {
12
12
  super(`Input component '${e}' is already registered.`);
13
13
  }
14
14
  }
15
- class ve {
15
+ class Ce {
16
16
  constructor(e) {
17
- $(this, "componentBank");
18
- $(this, "allowOverride");
17
+ N(this, "componentBank");
18
+ N(this, "allowOverride");
19
19
  this.allowOverride = (e == null ? void 0 : e.allowOverride) ?? !1, this.componentBank = /* @__PURE__ */ new Map();
20
20
  }
21
21
  /**
@@ -26,11 +26,11 @@ class ve {
26
26
  */
27
27
  registerComponent(e) {
28
28
  if (!this.allowOverride && this.getComponent(e.internalType))
29
- throw new Ge(e.internalType);
29
+ throw new Ye(e.internalType);
30
30
  this.componentBank.set(e.internalType, e);
31
31
  }
32
32
  getComponent(e) {
33
- if (e && !D(e))
33
+ if (e && !J(e))
34
34
  return this.componentBank.get(e);
35
35
  }
36
36
  /**
@@ -47,65 +47,65 @@ class ve {
47
47
  * @returns new input factory
48
48
  */
49
49
  clone() {
50
- const e = new ve({
50
+ const e = new Ce({
51
51
  allowOverride: this.allowOverride
52
52
  });
53
- return this.listRegisteredComponents().forEach((n) => {
54
- e.registerComponent(this.componentBank.get(n));
53
+ return this.listRegisteredComponents().forEach((t) => {
54
+ e.registerComponent(this.componentBank.get(t));
55
55
  }), e;
56
56
  }
57
57
  }
58
- var L = { exports: {} }, F = {};
58
+ var U = { exports: {} }, x = {};
59
59
  /*
60
60
  object-assign
61
61
  (c) Sindre Sorhus
62
62
  @license MIT
63
63
  */
64
- var U, oe;
65
- function Ke() {
66
- if (oe) return U;
67
- oe = 1;
68
- var r = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
69
- function t(s) {
64
+ var H, fe;
65
+ function ze() {
66
+ if (fe) return H;
67
+ fe = 1;
68
+ var r = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
69
+ function n(s) {
70
70
  if (s == null)
71
71
  throw new TypeError("Object.assign cannot be called with null or undefined");
72
72
  return Object(s);
73
73
  }
74
- function i() {
74
+ function o() {
75
75
  try {
76
76
  if (!Object.assign)
77
77
  return !1;
78
78
  var s = new String("abc");
79
79
  if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
80
80
  return !1;
81
- for (var a = {}, o = 0; o < 10; o++)
82
- a["_" + String.fromCharCode(o)] = o;
83
- var u = Object.getOwnPropertyNames(a).map(function(c) {
84
- return a[c];
81
+ for (var i = {}, a = 0; a < 10; a++)
82
+ i["_" + String.fromCharCode(a)] = a;
83
+ var c = Object.getOwnPropertyNames(i).map(function(u) {
84
+ return i[u];
85
85
  });
86
- if (u.join("") !== "0123456789")
86
+ if (c.join("") !== "0123456789")
87
87
  return !1;
88
- var f = {};
89
- return "abcdefghijklmnopqrst".split("").forEach(function(c) {
90
- f[c] = c;
91
- }), Object.keys(Object.assign({}, f)).join("") === "abcdefghijklmnopqrst";
88
+ var l = {};
89
+ return "abcdefghijklmnopqrst".split("").forEach(function(u) {
90
+ l[u] = u;
91
+ }), Object.keys(Object.assign({}, l)).join("") === "abcdefghijklmnopqrst";
92
92
  } catch {
93
93
  return !1;
94
94
  }
95
95
  }
96
- return U = i() ? Object.assign : function(s, a) {
97
- for (var o, u = t(s), f, c = 1; c < arguments.length; c++) {
98
- o = Object(arguments[c]);
99
- for (var l in o)
100
- e.call(o, l) && (u[l] = o[l]);
96
+ return H = o() ? Object.assign : function(s, i) {
97
+ for (var a, c = n(s), l, u = 1; u < arguments.length; u++) {
98
+ a = Object(arguments[u]);
99
+ for (var d in a)
100
+ e.call(a, d) && (c[d] = a[d]);
101
101
  if (r) {
102
- f = r(o);
103
- for (var d = 0; d < f.length; d++)
104
- n.call(o, f[d]) && (u[f[d]] = o[f[d]]);
102
+ l = r(a);
103
+ for (var f = 0; f < l.length; f++)
104
+ t.call(a, l[f]) && (c[l[f]] = a[l[f]]);
105
105
  }
106
106
  }
107
- return u;
108
- }, U;
107
+ return c;
108
+ }, H;
109
109
  }
110
110
  /** @license React v17.0.2
111
111
  * react-jsx-runtime.production.min.js
@@ -115,177 +115,177 @@ function Ke() {
115
115
  * This source code is licensed under the MIT license found in the
116
116
  * LICENSE file in the root directory of this source tree.
117
117
  */
118
- var ue;
119
- function Qe() {
120
- if (ue) return F;
121
- ue = 1, Ke();
122
- var r = Pe, e = 60103;
123
- if (F.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
124
- var n = Symbol.for;
125
- e = n("react.element"), F.Fragment = n("react.fragment");
118
+ var le;
119
+ function er() {
120
+ if (le) return x;
121
+ le = 1, ze();
122
+ var r = De, e = 60103;
123
+ if (x.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
124
+ var t = Symbol.for;
125
+ e = t("react.element"), x.Fragment = t("react.fragment");
126
126
  }
127
- var t = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, s = { key: !0, ref: !0, __self: !0, __source: !0 };
128
- function a(o, u, f) {
129
- var c, l = {}, d = null, p = null;
130
- f !== void 0 && (d = "" + f), u.key !== void 0 && (d = "" + u.key), u.ref !== void 0 && (p = u.ref);
131
- for (c in u) i.call(u, c) && !s.hasOwnProperty(c) && (l[c] = u[c]);
132
- if (o && o.defaultProps) for (c in u = o.defaultProps, u) l[c] === void 0 && (l[c] = u[c]);
133
- return { $$typeof: e, type: o, key: d, ref: p, props: l, _owner: t.current };
127
+ var n = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = Object.prototype.hasOwnProperty, s = { key: !0, ref: !0, __self: !0, __source: !0 };
128
+ function i(a, c, l) {
129
+ var u, d = {}, f = null, m = null;
130
+ l !== void 0 && (f = "" + l), c.key !== void 0 && (f = "" + c.key), c.ref !== void 0 && (m = c.ref);
131
+ for (u in c) o.call(c, u) && !s.hasOwnProperty(u) && (d[u] = c[u]);
132
+ if (a && a.defaultProps) for (u in c = a.defaultProps, c) d[u] === void 0 && (d[u] = c[u]);
133
+ return { $$typeof: e, type: a, key: f, ref: m, props: d, _owner: n.current };
134
134
  }
135
- return F.jsx = a, F.jsxs = a, F;
135
+ return x.jsx = i, x.jsxs = i, x;
136
136
  }
137
- var ce;
138
- function Xe() {
139
- return ce || (ce = 1, L.exports = Qe()), L.exports;
137
+ var de;
138
+ function rr() {
139
+ return de || (de = 1, U.exports = er()), U.exports;
140
140
  }
141
- var h = Xe();
142
- const Ce = qe({});
143
- function Ye({
141
+ var g = rr();
142
+ const Oe = Me({});
143
+ function tr({
144
144
  children: r,
145
145
  metadata: e,
146
- inputErrorHandler: n,
147
- readonly: t
146
+ inputErrorHandler: t,
147
+ readonly: n
148
148
  }) {
149
- return /* @__PURE__ */ h.jsx(
150
- Ce.Provider,
149
+ return /* @__PURE__ */ g.jsx(
150
+ Oe.Provider,
151
151
  {
152
152
  value: {
153
153
  metadata: e,
154
- readonly: t,
155
- inputErrorHandler: n
154
+ readonly: n,
155
+ inputErrorHandler: t
156
156
  },
157
157
  children: r
158
158
  }
159
159
  );
160
160
  }
161
- function ze() {
162
- const r = Ae(Ce);
161
+ function nr() {
162
+ const r = $e(Oe);
163
163
  return r || console.warn("useRootFormContext must be used within RootFormProvider"), r;
164
164
  }
165
- class er extends ke {
165
+ class sr extends Ne {
166
166
  constructor() {
167
167
  super(...arguments);
168
- $(this, "state", {
168
+ N(this, "state", {
169
169
  hasError: !1
170
170
  });
171
171
  }
172
172
  static getDerivedStateFromError() {
173
173
  return { hasError: !0 };
174
174
  }
175
- componentDidCatch(n, t) {
176
- var s, a;
177
- console.error(n, t);
178
- const i = new Error(
179
- `Form input [${this.props.inputType}] has failed at path [${this.props.path}]. Error: ${n}, Error info: ${t}`
175
+ componentDidCatch(t, n) {
176
+ var s, i;
177
+ console.error(t, n);
178
+ const o = new Error(
179
+ `Form input [${this.props.inputType}] has failed at path [${this.props.path}]. Error: ${t}, Error info: ${n}`
180
180
  );
181
- (a = (s = this.props).inputErrorHandler) == null || a.call(s, i);
181
+ (i = (s = this.props).inputErrorHandler) == null || i.call(s, o);
182
182
  }
183
183
  render() {
184
- return this.state.hasError ? /* @__PURE__ */ h.jsx(h.Fragment, {}) : this.props.children;
184
+ return this.state.hasError ? /* @__PURE__ */ g.jsx(g.Fragment, {}) : this.props.children;
185
185
  }
186
186
  }
187
- const fe = ({
187
+ const me = ({
188
188
  children: r,
189
189
  withoutWrapper: e = !1
190
- }) => e || !r ? r : /* @__PURE__ */ h.jsx("div", { children: r }), rr = De(function({
190
+ }) => e || !r ? r : /* @__PURE__ */ g.jsx("div", { children: r }), ir = Be(function({
191
191
  path: e,
192
- factory: n,
193
- onUpdate: t,
194
- onChange: i,
192
+ factory: t,
193
+ onUpdate: n,
194
+ onChange: o,
195
195
  initialValues: s,
196
- input: a,
197
- withoutWrapper: o = !1
196
+ input: i,
197
+ withoutWrapper: a = !1
198
198
  }) {
199
- var z, ee, re, te, ne;
200
- const u = Be(), { formState: f } = u, { fixedValues: c = {} } = {}, { metadata: l, readonly: d, inputErrorHandler: p } = ze(), g = n == null ? void 0 : n.getComponent(a.inputType), b = !!(a.isVisible || typeof a.disabled == "function" || typeof ((z = a.validation) == null ? void 0 : z.schema) == "function" || typeof ((ee = a.warning) == null ? void 0 : ee.schema) == "function"), v = !!((re = a.warning) != null && re.schema || (te = a.validation) != null && te.schema), y = b ? u.watch() : {}, S = v ? b ? Ze(y, a.path) : u.watch(a.path) : void 0, _ = B(() => {
201
- if (!b) return {};
202
- let P = y;
203
- return c && Object.keys(c).forEach((M) => {
204
- const q = c[M];
205
- P = O(P, M, q);
206
- }), P;
207
- }, [b, y, c]), j = !a.isVisible || a.isVisible(_, l), C = d || a.readonly, I = typeof a.disabled == "function" ? a.disabled(_, l) : a.disabled, E = (ne = a.warning) == null ? void 0 : ne.schema, X = B(() => {
208
- var ae, ie;
209
- if (!j || typeof E > "u") return;
210
- const P = typeof E == "function" ? E(_, l) : E, { success: M, error: q } = P.safeParse(S), se = (ie = (ae = q == null ? void 0 : q.errors) == null ? void 0 : ae[0]) == null ? void 0 : ie.message;
211
- return !M && se ? se : void 0;
212
- }, [a.path, S, E, j, l]), Y = B(
199
+ var te, ne, se, ie, ae;
200
+ const c = Le(), { formState: l } = c, { fixedValues: u = {} } = {}, { metadata: d, readonly: f, inputErrorHandler: m } = nr(), b = t == null ? void 0 : t.getComponent(i.inputType), h = !!(i.isVisible || typeof i.disabled == "function" || typeof ((te = i.validation) == null ? void 0 : te.schema) == "function" || typeof ((ne = i.warning) == null ? void 0 : ne.schema) == "function"), v = !!((se = i.warning) != null && se.schema || (ie = i.validation) != null && ie.schema), y = h ? c.watch() : {}, E = v ? h ? Ue(y, i.path) : c.watch(i.path) : void 0, S = B(() => {
201
+ if (!h) return {};
202
+ let F = y;
203
+ return u && Object.keys(u).forEach(($) => {
204
+ const q = u[$];
205
+ F = R(F, $, q);
206
+ }), F;
207
+ }, [h, y, u]), V = !i.isVisible || i.isVisible(S, d), C = f || i.readonly, _ = typeof i.disabled == "function" ? i.disabled(S, d) : i.disabled, O = (ae = i.warning) == null ? void 0 : ae.schema, ee = B(() => {
208
+ var ue, ce;
209
+ if (!V || typeof O > "u") return;
210
+ const F = typeof O == "function" ? O(S, d) : O, { success: $, error: q } = F.safeParse(E), oe = (ce = (ue = q == null ? void 0 : q.errors) == null ? void 0 : ue[0]) == null ? void 0 : ce.message;
211
+ return !$ && oe ? oe : void 0;
212
+ }, [i.path, E, O, V, d]), re = B(
213
213
  () => ({
214
214
  path: e,
215
215
  key: e,
216
216
  initialValues: s,
217
- onUpdate: t,
218
- onChange: i,
219
- factory: n,
217
+ onUpdate: n,
218
+ onChange: o,
219
+ factory: t,
220
220
  readonly: C,
221
- input: a,
222
- disabled: I,
223
- warning: X
221
+ input: i,
222
+ disabled: _,
223
+ warning: ee
224
224
  }),
225
- [n, s, a, i, t, e, C, f.errors, I, X]
226
- ), Ie = B(() => j ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
227
- a.before ? a.before : null,
228
- /* @__PURE__ */ h.jsx(er, { path: e, inputType: a.inputType, inputErrorHandler: p, children: g == null ? void 0 : g.renderComponent(Y) }),
229
- a.after ? a.after : null
230
- ] }) : null, [j, a.before, a.inputType, a.after, e, g, Y, f.errors]);
231
- return g ? /* @__PURE__ */ h.jsx(fe, { withoutWrapper: o, children: Ie }) : /* @__PURE__ */ h.jsx(fe, { withoutWrapper: o, children: /* @__PURE__ */ h.jsxs("p", { children: [
225
+ [t, s, i, o, n, e, C, l.errors, _, ee]
226
+ ), Ve = B(() => V ? /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
227
+ i.before ? i.before : null,
228
+ /* @__PURE__ */ g.jsx(sr, { path: e, inputType: i.inputType, inputErrorHandler: m, children: b == null ? void 0 : b.renderComponent(re) }),
229
+ i.after ? i.after : null
230
+ ] }) : null, [V, i.before, i.inputType, i.after, e, b, re, l.errors]);
231
+ return b ? /* @__PURE__ */ g.jsx(me, { withoutWrapper: a, children: Ve }) : /* @__PURE__ */ g.jsx(me, { withoutWrapper: a, children: /* @__PURE__ */ g.jsxs("p", { children: [
232
232
  "Input component not found (internal type: ",
233
- a.inputType,
233
+ i.inputType,
234
234
  ")"
235
235
  ] }) });
236
236
  });
237
- class Sr {
237
+ class Ir {
238
238
  getType() {
239
239
  return this.internalType;
240
240
  }
241
241
  }
242
- function le() {
242
+ function pe() {
243
243
  return typeof window < "u" && "requestIdleCallback" in window ? window.requestIdleCallback : function(r, e) {
244
- const n = Date.now(), t = (e == null ? void 0 : e.timeout) || 1;
244
+ const t = Date.now(), n = (e == null ? void 0 : e.timeout) || 1;
245
245
  return setTimeout(function() {
246
246
  r({
247
247
  didTimeout: !1,
248
248
  timeRemaining: function() {
249
- return Math.max(0, 50 - (Date.now() - n));
249
+ return Math.max(0, 50 - (Date.now() - t));
250
250
  }
251
251
  });
252
- }, t);
252
+ }, n);
253
253
  };
254
254
  }
255
- function de() {
255
+ function he() {
256
256
  return typeof window < "u" && "cancelIdleCallback" in window ? window.cancelIdleCallback : clearTimeout;
257
257
  }
258
- function _r(r) {
258
+ function wr(r) {
259
259
  const {
260
260
  mode: e = "onSubmit",
261
- resolver: n,
262
- defaultValues: t,
263
- shouldFocusError: i,
261
+ resolver: t,
262
+ defaultValues: n,
263
+ shouldFocusError: o,
264
264
  // validateAfterFirstSubmit,
265
265
  onValuesChange: s,
266
- onValidationChange: a,
267
- onSubmit: o,
268
- onInputRenderError: u,
266
+ onValidationChange: i,
267
+ onSubmit: a,
268
+ onInputRenderError: c,
269
269
  // validate,
270
270
  // validateDebounceInterval,
271
271
  // validationConfig,
272
- metadata: f,
273
- children: c,
272
+ metadata: l,
273
+ children: u,
274
274
  // fixedValues
275
- autoFocusPath: l,
276
- readonly: d
277
- } = r, p = We({
275
+ autoFocusPath: d,
276
+ readonly: f
277
+ } = r, m = He({
278
278
  mode: e,
279
279
  reValidateMode: "onChange",
280
- defaultValues: t,
281
- shouldFocusError: i,
282
- resolver: n
283
- }), g = V(!1), b = V(JSON.stringify(t ?? {}));
284
- w(() => {
285
- b.current = JSON.stringify(t ?? {}), p.reset(t, {});
286
- }, [p.reset, t]), w(() => {
287
- const C = le(), I = de(), E = C(() => {
288
- p.reset({}, {
280
+ defaultValues: n,
281
+ shouldFocusError: o,
282
+ resolver: t
283
+ }), b = P(!1), h = P(JSON.stringify(n ?? {}));
284
+ j(() => {
285
+ h.current = JSON.stringify(n ?? {}), m.reset(n, {});
286
+ }, [m.reset, n]), j(() => {
287
+ const C = pe(), _ = he(), O = C(() => {
288
+ m.reset({}, {
289
289
  keepErrors: !0,
290
290
  keepDirty: !0,
291
291
  keepDirtyValues: !0,
@@ -298,80 +298,80 @@ function _r(r) {
298
298
  keepSubmitCount: !0
299
299
  });
300
300
  });
301
- return () => I(E);
301
+ return () => _(O);
302
302
  }, []);
303
- const { handleSubmit: v } = p, y = V(s);
304
- w(() => {
303
+ const { handleSubmit: v } = m, y = P(s);
304
+ j(() => {
305
305
  y.current = s;
306
306
  }, [s]);
307
- const S = V(a);
308
- w(() => {
309
- S.current = a;
310
- }, [a]);
311
- const _ = V(!1);
312
- w(() => {
313
- const C = p.watch((I) => {
314
- var E;
315
- _.current || JSON.stringify(I ?? {}) !== b.current && ((E = y.current) == null || E.call(y, { ...I }), g.current === !0 && (_.current = !0, p.trigger().finally(() => {
316
- _.current = !1;
307
+ const E = P(i);
308
+ j(() => {
309
+ E.current = i;
310
+ }, [i]);
311
+ const S = P(!1);
312
+ j(() => {
313
+ const C = m.watch((_) => {
314
+ var O;
315
+ S.current || JSON.stringify(_ ?? {}) !== h.current && ((O = y.current) == null || O.call(y, { ..._ }), b.current === !0 && (S.current = !0, m.trigger().finally(() => {
316
+ S.current = !1;
317
317
  })));
318
318
  });
319
319
  return () => {
320
320
  C.unsubscribe();
321
321
  };
322
- }, [p]);
323
- const j = V(!0);
324
- return w(() => {
322
+ }, [m]);
323
+ const V = P(!0);
324
+ return j(() => {
325
325
  var C;
326
- if (j.current) {
327
- j.current = !1;
326
+ if (V.current) {
327
+ V.current = !1;
328
328
  return;
329
329
  }
330
- (C = S.current) == null || C.call(S, { isValid: p.formState.isValid, isSubmitted: p.formState.isSubmitted });
331
- }, [p.formState.isValid, p.formState.isSubmitted]), w(() => {
332
- if (l) {
333
- const C = le(), I = de(), E = C(() => {
334
- p.setFocus(l);
330
+ (C = E.current) == null || C.call(E, { isValid: m.formState.isValid, isSubmitted: m.formState.isSubmitted });
331
+ }, [m.formState.isValid, m.formState.isSubmitted]), j(() => {
332
+ if (d) {
333
+ const C = pe(), _ = he(), O = C(() => {
334
+ m.setFocus(d);
335
335
  });
336
- return () => I(E);
336
+ return () => _(O);
337
337
  }
338
- }, [p, l]), /* @__PURE__ */ h.jsx(Ye, { metadata: f, readonly: d, inputErrorHandler: u, children: /* @__PURE__ */ h.jsx(Je, { ...p, children: typeof c == "function" ? c({
339
- ...p,
338
+ }, [m, d]), /* @__PURE__ */ g.jsx(tr, { metadata: l, readonly: f, inputErrorHandler: c, children: /* @__PURE__ */ g.jsx(Ge, { ...m, children: typeof u == "function" ? u({
339
+ ...m,
340
340
  submitForm: async () => {
341
- o && (g.current = !0, v((C) => {
342
- o(C);
341
+ a && (b.current = !0, v((C) => {
342
+ a(C);
343
343
  })());
344
344
  }
345
- }) : c }) });
345
+ }) : u }) });
346
346
  }
347
- const Ir = (r) => {
348
- const e = {}, n = (t) => {
349
- t.forEach((i) => {
350
- const { path: s, default: a, inputs: o } = i;
351
- Array.isArray(o) ? n(o) : T(e, s) === void 0 && O(e, s, a);
347
+ const Vr = (r) => {
348
+ const e = {}, t = (n) => {
349
+ n.forEach((o) => {
350
+ const { path: s, default: i, inputs: a } = o;
351
+ Array.isArray(a) ? t(a) : T(e, s) === void 0 && R(e, s, i);
352
352
  });
353
353
  };
354
- return Array.isArray(r.inputs) && n(r.inputs), e;
354
+ return Array.isArray(r.inputs) && t(r.inputs), e;
355
355
  };
356
- function Rr(r, e) {
357
- const n = r.inputs.map((t) => {
358
- const i = tr(e, t.path);
359
- return i || t;
356
+ function jr(r, e) {
357
+ const t = r.inputs.map((n) => {
358
+ const o = ar(e, n.path);
359
+ return o || n;
360
360
  });
361
- return { ...r, inputs: n };
361
+ return { ...r, inputs: t };
362
362
  }
363
- function tr(r, e) {
364
- return r.inputs.find((n) => n.path === e);
363
+ function ar(r, e) {
364
+ return r.inputs.find((t) => t.path === e);
365
365
  }
366
- const Te = "__temp_", jr = (r) => Te + r.split(".").join("__");
367
- function nr(r) {
366
+ const Ee = "__temp_", Pr = (r) => Ee + r.split(".").join("__");
367
+ function or(r) {
368
368
  const e = { ...r };
369
- return pe(e, (n, t) => {
370
- t.startsWith(Te) && delete e[t];
369
+ return ge(e, (t, n) => {
370
+ n.startsWith(Ee) && delete e[n];
371
371
  }), e;
372
372
  }
373
- const sr = "Required field";
374
- function A(r) {
373
+ const ur = "Required field";
374
+ function k(r) {
375
375
  let e;
376
376
  if (typeof r == "string")
377
377
  try {
@@ -383,74 +383,74 @@ function A(r) {
383
383
  e = r;
384
384
  if (typeof e == "string")
385
385
  return e;
386
- if (x(e))
387
- return A(e[0]);
388
- const n = e;
389
- return he(n) && (n != null && n.message) ? e == null ? void 0 : e.message : "Unknown error";
390
- }
391
- function ar(r, e, n) {
392
- let t = {};
393
- if (Z(t, r.inputs, e, n), n != null && n.prefix) {
394
- const s = n == null ? void 0 : n.prefix.replace(/.$/, "");
395
- t = O({}, s, t);
386
+ if (w(e))
387
+ return k(e[0]);
388
+ const t = e;
389
+ return be(t) && (t != null && t.message) ? e == null ? void 0 : e.message : "Unknown error";
390
+ }
391
+ function cr(r, e, t) {
392
+ let n = {};
393
+ if (Z(n, r.inputs, e, t), t != null && t.prefix) {
394
+ const s = t == null ? void 0 : t.prefix.replace(/.$/, "");
395
+ n = R({}, s, n);
396
396
  }
397
- return m.object(k(t, e, n));
398
- }
399
- function ir(r, e, n) {
400
- const t = Object.keys(r).filter((a) => /^\d+$/.test(a) && !a.startsWith("_")).map((a) => parseInt(a, 10)).sort((a, o) => a - o);
401
- if (t.length === 0) return null;
402
- const i = Math.max(...t), s = [];
403
- for (let a = 0; a <= i; a++)
404
- if (t.includes(a)) {
405
- const o = r[a], u = k({ item: o }, e, n);
406
- s.push(u.item || m.any().optional());
397
+ return p.object(D(n, e, t));
398
+ }
399
+ function fr(r, e, t) {
400
+ const n = Object.keys(r).filter((i) => /^\d+$/.test(i) && !i.startsWith("_")).map((i) => parseInt(i, 10)).sort((i, a) => i - a);
401
+ if (n.length === 0) return null;
402
+ const o = Math.max(...n), s = [];
403
+ for (let i = 0; i <= o; i++)
404
+ if (n.includes(i)) {
405
+ const a = r[i], c = D({ item: a }, e, t);
406
+ s.push(c.item || p.any().optional());
407
407
  } else
408
- s.push(m.any().optional());
409
- return m.tuple(s).rest(m.any()).optional();
408
+ s.push(p.any().optional());
409
+ return p.tuple(s).rest(p.any()).optional();
410
410
  }
411
- function k(r, e, n) {
412
- const t = {};
413
- return Object.keys(r).forEach((i) => {
411
+ function D(r, e, t) {
412
+ const n = {};
413
+ return Object.keys(r).forEach((o) => {
414
414
  const {
415
415
  _requiredOnly: s,
416
- _schemaObj: a,
417
- _input: o,
418
- _isList: u,
419
- _isArrayItem: f,
420
- _isTuple: c,
421
- _schema: l
416
+ _schemaObj: i,
417
+ _input: a,
418
+ _isList: c,
419
+ _isArrayItem: l,
420
+ _isTuple: u,
421
+ _schema: d
422
422
  /*...nestedSchemaObj*/
423
- } = r[i];
424
- if (c && !u && !f) {
425
- const d = ir(r[i], e, n);
426
- if (d) {
427
- t[i] = d;
423
+ } = r[o];
424
+ if (u && !c && !l) {
425
+ const f = fr(r[o], e, t);
426
+ if (f) {
427
+ n[o] = f;
428
428
  return;
429
429
  }
430
430
  }
431
- if (u && a && o) {
432
- const d = m.object(k(a, e, n)), p = m.union([
433
- m.array(d).optional(),
434
- Ee(o, n)
435
- ]), g = me(l, o, e, n, p);
436
- t[i] = g;
437
- } else if (f && o) {
438
- const d = a != null && a.___array ? k({ ___array: a.___array }, e, n) : { ___array: m.any() }, p = or(d, o, n), g = me(l, o, e, n, p);
439
- t[i] = g;
440
- } else if (l && o) {
441
- const d = ur(l, o, e, n);
442
- t[i] = d;
443
- } else s && o ? t[i] = K(o, n) : t[i] = m.object(k(r[i], e, n)).optional();
444
- }), t;
431
+ if (c && i && a) {
432
+ const f = p.object(D(i, e, t)), m = p.union([
433
+ p.array(f).optional(),
434
+ Se(a, t)
435
+ ]), b = ye(d, a, e, t, m);
436
+ n[o] = b;
437
+ } else if (l && a) {
438
+ const f = i != null && i.___array ? D({ ___array: i.___array }, e, t) : { ___array: p.any() }, m = lr(f, a, t), b = ye(d, a, e, t, m);
439
+ n[o] = b;
440
+ } else if (d && a) {
441
+ const f = dr(d, a, e, t);
442
+ n[o] = f;
443
+ } else s && a ? n[o] = Y(a, t) : n[o] = p.object(D(r[o], e, t)).optional();
444
+ }), n;
445
445
  }
446
- function Ee(r, e) {
447
- return m.string().superRefine((n, t) => {
448
- var i;
449
- if ((i = e == null ? void 0 : e.validationConfig) != null && i.globalValidation) {
450
- const s = e.validationConfig.globalValidation(n, r, e.metadata);
446
+ function Se(r, e) {
447
+ return p.string().superRefine((t, n) => {
448
+ var o;
449
+ if ((o = e == null ? void 0 : e.validationConfig) != null && o.globalValidation) {
450
+ const s = e.validationConfig.globalValidation(t, r, e.metadata);
451
451
  if (s.error)
452
- return t.addIssue({
453
- code: m.ZodIssueCode.custom,
452
+ return n.addIssue({
453
+ code: p.ZodIssueCode.custom,
454
454
  message: s.error
455
455
  }), !1;
456
456
  if (!s.continue)
@@ -459,116 +459,116 @@ function Ee(r, e) {
459
459
  return !0;
460
460
  });
461
461
  }
462
- function or(r, e, n) {
463
- return m.union([m.array(r.___array).optional(), Ee(e, n)]);
462
+ function lr(r, e, t) {
463
+ return p.union([p.array(r.___array).optional(), Se(e, t)]);
464
464
  }
465
- function ur(r, e, n, t) {
466
- return m.any().optional().superRefine(async (i, s) => {
467
- var o, u;
468
- if (e.required && !(await K(e, t).safeParseAsync(i)).success)
465
+ function dr(r, e, t, n) {
466
+ return p.any().optional().superRefine(async (o, s) => {
467
+ var a, c;
468
+ if (e.required && !(await Y(e, n).safeParseAsync(o)).success)
469
469
  return s.addIssue({
470
- code: m.ZodIssueCode.custom,
471
- message: H(e, t)
472
- }), m.NEVER;
473
- if ((o = t == null ? void 0 : t.validationConfig) != null && o.globalValidation) {
474
- const f = (u = t == null ? void 0 : t.validationConfig) == null ? void 0 : u.globalValidation(i, e, t.metadata);
475
- if (f.error)
470
+ code: p.ZodIssueCode.custom,
471
+ message: Q(e, n)
472
+ }), p.NEVER;
473
+ if ((a = n == null ? void 0 : n.validationConfig) != null && a.globalValidation) {
474
+ const l = (c = n == null ? void 0 : n.validationConfig) == null ? void 0 : c.globalValidation(o, e, n.metadata);
475
+ if (l.error)
476
476
  return s.addIssue({
477
- code: m.ZodIssueCode.custom,
478
- message: f.error
479
- }), m.NEVER;
480
- if (!f.continue)
477
+ code: p.ZodIssueCode.custom,
478
+ message: l.error
479
+ }), p.NEVER;
480
+ if (!l.continue)
481
481
  return !0;
482
482
  }
483
- const a = Oe(r, n);
484
- if (a) {
485
- const f = await a.safeParseAsync(i);
486
- if (!f.success) {
487
- const c = A(f == null ? void 0 : f.error.message), l = c === "Required" ? H(e, t) : c;
483
+ const i = _e(r, t);
484
+ if (i) {
485
+ const l = await i.safeParseAsync(o);
486
+ if (!l.success) {
487
+ const u = k(l == null ? void 0 : l.error.message), d = u === "Required" ? Q(e, n) : u;
488
488
  s.addIssue({
489
- code: m.ZodIssueCode.custom,
490
- message: l
489
+ code: p.ZodIssueCode.custom,
490
+ message: d
491
491
  });
492
492
  }
493
493
  }
494
494
  });
495
495
  }
496
- function me(r, e, n, t, i) {
497
- return m.any().optional().superRefine(async (s, a) => {
498
- var c, l;
499
- const u = await K(e, t).safeParseAsync(s);
500
- if (e.required && !u.success) {
501
- const d = A(u.error.message);
502
- return a.addIssue({ code: m.ZodIssueCode.custom, message: d, fatal: !0 }), m.NEVER;
496
+ function ye(r, e, t, n, o) {
497
+ return p.any().optional().superRefine(async (s, i) => {
498
+ var u, d;
499
+ const c = await Y(e, n).safeParseAsync(s);
500
+ if (e.required && !c.success) {
501
+ const f = k(c.error.message);
502
+ return i.addIssue({ code: p.ZodIssueCode.custom, message: f, fatal: !0 }), p.NEVER;
503
503
  }
504
- if (!e.required && !u.success)
505
- return m.NEVER;
506
- if ((c = t == null ? void 0 : t.validationConfig) != null && c.globalValidation) {
507
- const d = (l = t == null ? void 0 : t.validationConfig) == null ? void 0 : l.globalValidation(s, e, t.metadata);
508
- if (d.error)
509
- return a.addIssue({
510
- code: m.ZodIssueCode.custom,
511
- message: A(d.error)
512
- }), m.NEVER;
513
- if (!d.continue)
504
+ if (!e.required && !c.success)
505
+ return p.NEVER;
506
+ if ((u = n == null ? void 0 : n.validationConfig) != null && u.globalValidation) {
507
+ const f = (d = n == null ? void 0 : n.validationConfig) == null ? void 0 : d.globalValidation(s, e, n.metadata);
508
+ if (f.error)
509
+ return i.addIssue({
510
+ code: p.ZodIssueCode.custom,
511
+ message: k(f.error)
512
+ }), p.NEVER;
513
+ if (!f.continue)
514
514
  return !0;
515
515
  }
516
- if (!x(s))
517
- return a.addIssue({
518
- code: m.ZodIssueCode.custom,
516
+ if (!w(s))
517
+ return i.addIssue({
518
+ code: p.ZodIssueCode.custom,
519
519
  message: "'Value is not array'"
520
- }), m.NEVER;
521
- const f = Oe(r, n);
522
- if (f) {
523
- const d = await f.safeParseAsync(s);
524
- if (!d.success)
525
- return a.addIssue({
526
- code: m.ZodIssueCode.custom,
527
- message: A(d.error.message)
528
- }), m.NEVER;
520
+ }), p.NEVER;
521
+ const l = _e(r, t);
522
+ if (l) {
523
+ const f = await l.safeParseAsync(s);
524
+ if (!f.success)
525
+ return i.addIssue({
526
+ code: p.ZodIssueCode.custom,
527
+ message: k(f.error.message)
528
+ }), p.NEVER;
529
529
  }
530
- }).pipe(i ?? m.any());
530
+ }).pipe(o ?? p.any());
531
531
  }
532
- function Z(r, e, n, t, i) {
532
+ function Z(r, e, t, n, o) {
533
533
  e.forEach((s) => {
534
- var o, u, f, c, l, d, p;
535
- const a = n;
536
- if (!s.isVisible || (o = s.isVisible) != null && o.call(s, a, t == null ? void 0 : t.metadata)) {
537
- const g = T(r, s.path);
538
- if ((u = s.validation) != null && u.schema ? O(
534
+ var a, c, l, u, d, f, m;
535
+ const i = t;
536
+ if (!s.isVisible || (a = s.isVisible) != null && a.call(s, i, n == null ? void 0 : n.metadata)) {
537
+ const b = T(r, s.path);
538
+ if ((c = s.validation) != null && c.schema ? R(
539
539
  r,
540
540
  s.path,
541
- N(g, {
542
- _schema: (f = s.validation) == null ? void 0 : f.schema,
541
+ A(b, {
542
+ _schema: (l = s.validation) == null ? void 0 : l.schema,
543
543
  _input: s
544
544
  })
545
- ) : s.required && O(r, s.path, N(g, { _requiredOnly: !0, _input: s })), s.inputs && Z(r, s.inputs, n, t), s.inputType === "list") {
546
- const b = {};
545
+ ) : s.required && R(r, s.path, A(b, { _requiredOnly: !0, _input: s })), s.inputs && Z(r, s.inputs, t, n), s.inputType === "list") {
546
+ const h = {};
547
547
  Z(
548
- b,
549
- (l = (c = s.inputConfig) == null ? void 0 : c.inputs) == null ? void 0 : l.map((y) => ({
548
+ h,
549
+ (d = (u = s.inputConfig) == null ? void 0 : u.inputs) == null ? void 0 : d.map((y) => ({
550
550
  ...y,
551
551
  path: y.relativePath
552
552
  })),
553
- n,
554
- t
553
+ t,
554
+ n
555
555
  );
556
556
  const v = T(r, s.path);
557
- O(r, s.path, N(v, { _schemaObj: b, _isList: !0, _input: s }));
557
+ R(r, s.path, A(v, { _schemaObj: h, _isList: !0, _input: s }));
558
558
  }
559
- if (!((d = s.validation) != null && d.schema) && s.inputType === "array") {
560
- const b = {};
559
+ if (!((f = s.validation) != null && f.schema) && s.inputType === "array") {
560
+ const h = {};
561
561
  Z(
562
- b,
562
+ h,
563
563
  [{ ...s.inputConfig.input, path: "___array" }],
564
- n,
565
- t
566
- ), O(
564
+ t,
565
+ n
566
+ ), R(
567
567
  r,
568
568
  s.path,
569
- N(g, {
570
- _schemaObj: b,
571
- _schema: (p = s.validation) == null ? void 0 : p.schema,
569
+ A(b, {
570
+ _schemaObj: h,
571
+ _schema: (m = s.validation) == null ? void 0 : m.schema,
572
572
  _isArrayItem: !0,
573
573
  _input: s
574
574
  })
@@ -576,87 +576,87 @@ function Z(r, e, n, t, i) {
576
576
  }
577
577
  }
578
578
  }), e.forEach((s) => {
579
- var o;
580
- const a = n;
581
- if ((!s.isVisible || (o = s.isVisible) != null && o.call(s, a, t == null ? void 0 : t.metadata)) && s.path) {
582
- const u = s.path.split(".");
583
- u.forEach((f, c) => {
584
- if (c > 0 && /^\d+$/.test(f)) {
585
- const l = u.slice(0, c).join("."), d = l ? T(r, l) : r;
586
- d && typeof d == "object" && (d._isTuple = !0);
579
+ var a;
580
+ const i = t;
581
+ if ((!s.isVisible || (a = s.isVisible) != null && a.call(s, i, n == null ? void 0 : n.metadata)) && s.path) {
582
+ const c = s.path.split(".");
583
+ c.forEach((l, u) => {
584
+ if (u > 0 && /^\d+$/.test(l)) {
585
+ const d = c.slice(0, u).join("."), f = d ? T(r, d) : r;
586
+ f && typeof f == "object" && (f._isTuple = !0);
587
587
  }
588
588
  });
589
589
  }
590
590
  });
591
591
  }
592
- function H(r, e) {
593
- var n, t, i;
594
- return ((t = (n = e == null ? void 0 : e.validationConfig) == null ? void 0 : n.requiredMessagePerInput) == null ? void 0 : t[r.inputType]) ?? ((i = e == null ? void 0 : e.validationConfig) == null ? void 0 : i.requiredMessage) ?? sr;
595
- }
596
- function K(r, e) {
597
- var t, i, s, a, o, u;
598
- if ((i = (t = e == null ? void 0 : e.validationConfig) == null ? void 0 : t.requiredSchemaPerInput) != null && i[r.inputType])
599
- return (a = (s = e == null ? void 0 : e.validationConfig) == null ? void 0 : s.requiredSchemaPerInput) == null ? void 0 : a[r.inputType];
600
- if ((o = e == null ? void 0 : e.validationConfig) != null && o.requiredSchema)
601
- return (u = e == null ? void 0 : e.validationConfig) == null ? void 0 : u.requiredSchema;
602
- const n = H(r, e);
603
- return m.any().optional().superRefine((f, c) => {
604
- typeof f == "object" && D(f) && c.addIssue({
605
- code: m.ZodIssueCode.custom,
606
- message: n
607
- }), (J(f) || f === "") && c.addIssue({
608
- code: m.ZodIssueCode.custom,
609
- message: n
592
+ function Q(r, e) {
593
+ var t, n, o;
594
+ return ((n = (t = e == null ? void 0 : e.validationConfig) == null ? void 0 : t.requiredMessagePerInput) == null ? void 0 : n[r.inputType]) ?? ((o = e == null ? void 0 : e.validationConfig) == null ? void 0 : o.requiredMessage) ?? ur;
595
+ }
596
+ function Y(r, e) {
597
+ var n, o, s, i, a, c;
598
+ if ((o = (n = e == null ? void 0 : e.validationConfig) == null ? void 0 : n.requiredSchemaPerInput) != null && o[r.inputType])
599
+ return (i = (s = e == null ? void 0 : e.validationConfig) == null ? void 0 : s.requiredSchemaPerInput) == null ? void 0 : i[r.inputType];
600
+ if ((a = e == null ? void 0 : e.validationConfig) != null && a.requiredSchema)
601
+ return (c = e == null ? void 0 : e.validationConfig) == null ? void 0 : c.requiredSchema;
602
+ const t = Q(r, e);
603
+ return p.any().optional().superRefine((l, u) => {
604
+ typeof l == "object" && J(l) && u.addIssue({
605
+ code: p.ZodIssueCode.custom,
606
+ message: t
607
+ }), (L(l) || l === "") && u.addIssue({
608
+ code: p.ZodIssueCode.custom,
609
+ message: t
610
610
  });
611
611
  });
612
612
  }
613
- function Oe(r, e) {
614
- if (r instanceof m.ZodType)
613
+ function _e(r, e) {
614
+ if (r instanceof p.ZodType)
615
615
  return r;
616
616
  if (typeof r == "function")
617
617
  return r(e);
618
618
  }
619
- const cr = (r) => Array.isArray(r == null ? void 0 : r.errors), fr = (r, e) => {
620
- const n = {};
619
+ const mr = (r) => Array.isArray(r == null ? void 0 : r.errors), pr = (r, e) => {
620
+ const t = {};
621
621
  for (; r.length; ) {
622
- const t = r[0], { code: i, message: s, path: a } = t, o = a.join(".");
623
- if (!n[o])
624
- if ("unionErrors" in t) {
625
- const u = t.unionErrors[0].errors[0];
626
- n[o] = {
627
- message: u.message,
628
- type: u.code
622
+ const n = r[0], { code: o, message: s, path: i } = n, a = i.join(".");
623
+ if (!t[a])
624
+ if ("unionErrors" in n) {
625
+ const c = n.unionErrors[0].errors[0];
626
+ t[a] = {
627
+ message: c.message,
628
+ type: c.code
629
629
  };
630
630
  } else
631
- n[o] = { message: s, type: i };
632
- "unionErrors" in t && t.unionErrors.forEach((u) => u.errors.forEach((f) => r.push(f)));
631
+ t[a] = { message: s, type: o };
632
+ "unionErrors" in n && n.unionErrors.forEach((c) => c.errors.forEach((l) => r.push(l)));
633
633
  {
634
- const u = n[o].types, f = u && u[t.code];
635
- n[o] = Le(
636
- o,
634
+ const c = t[a].types, l = c && c[n.code];
635
+ t[a] = Ke(
636
+ a,
637
637
  e,
638
- n,
639
- i,
640
- f ? [].concat(f, t.message) : t.message
638
+ t,
639
+ o,
640
+ l ? [].concat(l, n.message) : n.message
641
641
  );
642
642
  }
643
643
  r.shift();
644
644
  }
645
- return n;
645
+ return t;
646
646
  };
647
- function wr(r, e) {
648
- return Me(
649
- async (n, t, i) => {
647
+ function xr(r, e) {
648
+ return Ze(
649
+ async (t, n, o) => {
650
650
  try {
651
- return await ar(r, n, e).parseAsync(n), {
652
- values: n,
651
+ return await cr(r, t, e).parseAsync(t), {
652
+ values: t,
653
653
  errors: {}
654
654
  };
655
655
  } catch (s) {
656
- if (cr(s))
656
+ if (mr(s))
657
657
  return {
658
658
  values: {},
659
- errors: He(fr(s.errors, !0), i)
659
+ errors: Xe(pr(s.errors, !0), o)
660
660
  };
661
661
  throw s;
662
662
  }
@@ -664,327 +664,346 @@ function wr(r, e) {
664
664
  [r, e]
665
665
  );
666
666
  }
667
- function lr(r, e) {
668
- const n = W(r);
669
- return e.forEach((t) => {
670
- if (t.inputTransform) {
671
- const i = x(t.inputTransform) ? t.inputTransform : [t.inputTransform];
672
- let s;
673
- const a = t.path.split(".");
674
- if (a.length > 1) {
675
- const o = a.slice(0, -1).join("."), u = T(n, o);
676
- typeof u == "string" || typeof u == "number" || typeof u == "boolean" ? s = void 0 : s = T(n, t.path);
667
+ const G = (r, e) => r.level !== e.level ? r.level - e.level : r.isPrimitive ? 1 : -1, K = (r, e) => r.level !== e.level ? e.level - r.level : r.isPrimitive ? -1 : 1;
668
+ function W(r, e, t) {
669
+ T(r, e) === void 0 && t === void 0 || R(r, e, t);
670
+ }
671
+ function hr(r, e) {
672
+ const t = M(r), n = e.filter((a) => a.inputPriority === "early"), o = e.filter((a) => a.inputPriority === "normal"), s = e.filter((a) => a.inputPriority === "late");
673
+ return n.sort(G), o.sort(G), s.sort(G), [...n, ...o, ...s].forEach((a) => {
674
+ if (a.inputTransform) {
675
+ const c = w(a.inputTransform) ? a.inputTransform : [a.inputTransform];
676
+ let l;
677
+ const u = a.path.split(".");
678
+ if (u.length > 1) {
679
+ const d = u.slice(0, -1).join("."), f = T(t, d);
680
+ typeof f == "string" || typeof f == "number" || typeof f == "boolean" ? l = void 0 : l = T(t, a.path);
677
681
  } else
678
- s = T(n, t.path);
679
- i.forEach((o) => {
680
- const u = o(s, n);
681
- u && (s = u.value, O(n, u.path ?? t.path, u.value));
682
+ l = T(t, a.path);
683
+ c.forEach((d) => {
684
+ const f = d(l, t);
685
+ f && (l = f.value, W(t, f.path ?? a.path, f.value));
682
686
  });
683
687
  }
684
- }), n;
688
+ }), t;
685
689
  }
686
- function dr(r, e, n) {
687
- const t = [];
688
- let i = {};
689
- n || (i = W(r));
690
- const s = W(r);
691
- return e.forEach((a) => {
692
- if (a.outputTransform) {
693
- const o = x(a.outputTransform) ? a.outputTransform : [a.outputTransform];
694
- let u = T(s, a.path);
695
- o.forEach((f) => {
696
- const c = f(u, s);
697
- c && (u = c.value, c.path ? (O(i, c.path, c.value), c.unset && t.push(a.path)) : O(i, a.path, c.value));
690
+ function yr(r, e, t) {
691
+ const n = e.filter((u) => u.outputPriority === "early"), o = e.filter((u) => u.outputPriority === "normal"), s = e.filter((u) => u.outputPriority === "late");
692
+ n.sort(K), o.sort(K), s.sort(K);
693
+ const i = [...n, ...o, ...s], a = [];
694
+ let c = {};
695
+ t || (c = M(r));
696
+ const l = M(r);
697
+ return i.forEach((u) => {
698
+ if (u.outputTransform) {
699
+ const d = w(u.outputTransform) ? u.outputTransform : [u.outputTransform];
700
+ let f = T(l, u.path);
701
+ d.forEach((m) => {
702
+ const b = T(c, u.path), h = m(f, l, b, c);
703
+ if (h)
704
+ if (f = h.value, h.path) {
705
+ if (h.merge) {
706
+ const v = T(c, h.path);
707
+ let y;
708
+ v ? y = A({}, v, h.value) : y = h.value, W(c, h.path, y);
709
+ } else
710
+ W(c, h.path, h.value);
711
+ h.unset && a.push(u.path);
712
+ } else
713
+ W(c, u.path, h.value);
698
714
  });
699
715
  }
700
- }), t.forEach((a) => {
701
- ye(i, a);
702
- }), i;
716
+ }), a.forEach((u) => {
717
+ ve(c, u);
718
+ }), c;
703
719
  }
704
- function Q(r) {
705
- return r.reduce((n, t) => Array.isArray(t.inputs) ? [...n, t, ...Q(t.inputs)] : [...n, t], []);
720
+ function z(r) {
721
+ return r.reduce((t, n) => Array.isArray(n.inputs) ? [...t, n, ...z(n.inputs)] : [...t, n], []);
706
722
  }
707
- const mr = (r) => {
723
+ const gr = (r) => {
708
724
  if (r !== void 0)
709
725
  return { value: r };
710
- }, pr = (r) => {
726
+ }, br = (r) => {
711
727
  if (r !== void 0)
712
728
  return { value: r };
713
729
  };
714
- function Se(r, e) {
715
- const t = Q(r.inputs).reduce((i, s) => {
716
- const a = s.inputType === "text" || s.inputType === "boolean" || s.inputType === "number" || s.inputType === "textarea" || s.inputType === "select", o = !!s.inputTransform, u = !!s.outputTransform, f = Array.isArray(s.inputs) && s.inputs.length > 0, c = s.inputType === "list" || s.inputType === "array";
717
- return o || u ? i.push({
730
+ function Re(r, e) {
731
+ return z(r.inputs).reduce((o, s) => {
732
+ var f, m;
733
+ const i = s.inputType === "text" || s.inputType === "boolean" || s.inputType === "number" || s.inputType === "textarea" || s.inputType === "select", a = !!s.inputTransform, c = !!s.outputTransform, l = Array.isArray(s.inputs) && s.inputs.length > 0, u = s.inputType === "list" || s.inputType === "array";
734
+ return a || c ? o.push({
718
735
  path: s.path,
719
736
  inputTransform: s.inputTransform,
720
737
  outputTransform: s.outputTransform,
721
738
  level: s.path.split(".").length,
722
- isPrimitive: a
723
- }) : e && !(f || c) && i.push({
739
+ isPrimitive: i,
740
+ inputPriority: ((f = s.transformerPriority) == null ? void 0 : f.input) ?? "normal",
741
+ outputPriority: ((m = s.transformerPriority) == null ? void 0 : m.output) ?? "normal"
742
+ }) : e && !(l || u) && o.push({
724
743
  path: s.path,
725
- inputTransform: mr,
726
- outputTransform: pr,
744
+ inputTransform: gr,
745
+ outputTransform: br,
727
746
  level: s.path.split(".").length,
728
- isPrimitive: a
729
- }), i;
747
+ isPrimitive: i,
748
+ inputPriority: "normal",
749
+ outputPriority: "normal"
750
+ }), o;
730
751
  }, []);
731
- return t.sort((i, s) => i.level === s.level ? i.isPrimitive ? 1 : -1 : i.level < s.level ? -1 : 1), t;
732
- }
733
- function hr(r, e, n, t = {}) {
734
- const { preserve: i } = t, s = Q(r.inputs), a = W(e);
735
- return s.forEach((o) => {
736
- i && i.includes(o.path) || o.isVisible && !o.isVisible(e, n) && ye(a, o.path);
737
- }), a;
738
- }
739
- function Vr(r, e) {
740
- const n = Se(e);
741
- return lr(r, n);
742
- }
743
- function xr(r, e, n, t = {}) {
744
- const i = t.cleanOutput, s = Se(e, i);
745
- let a = hr(e, r, n, t);
746
- return a = dr(a, s, t.cleanOutput), a = nr(a), a;
747
- }
748
- function Fr(r) {
749
- const e = {}, n = (t) => {
750
- t.forEach((i) => {
751
- const { default: s, path: a, inputs: o } = i;
752
- Array.isArray(o) ? n(o) : s !== void 0 && O(e, a, s);
752
+ }
753
+ function vr(r, e, t, n = {}) {
754
+ const { preserve: o } = n, s = z(r.inputs), i = M(e);
755
+ return s.forEach((a) => {
756
+ o && o.includes(a.path) || a.isVisible && !a.isVisible(e, t) && ve(i, a.path);
757
+ }), i;
758
+ }
759
+ function Fr(r, e) {
760
+ const t = Re(e);
761
+ return hr(r, t);
762
+ }
763
+ function qr(r, e, t, n = {}) {
764
+ const o = n.cleanOutput, s = Re(e, o);
765
+ let i = vr(e, r, t, n);
766
+ return i = yr(i, s, n.cleanOutput), i = or(i), i;
767
+ }
768
+ function Ar(r) {
769
+ const e = {}, t = (n) => {
770
+ n.forEach((o) => {
771
+ const { default: s, path: i, inputs: a } = o;
772
+ Array.isArray(a) ? t(a) : s !== void 0 && R(e, i, s);
753
773
  });
754
774
  };
755
- return Array.isArray(r.inputs) && n(r.inputs), e;
775
+ return Array.isArray(r.inputs) && t(r.inputs), e;
756
776
  }
757
- function Pr() {
777
+ function kr() {
758
778
  return function(r, e) {
759
779
  if (!(typeof r > "u"))
760
- return !r || !we(r) ? { value: r } : {
761
- value: Object.getOwnPropertyNames(r).map((n) => ({ key: n, value: r[n] }))
780
+ return !r || !xe(r) ? { value: r } : {
781
+ value: Object.getOwnPropertyNames(r).map((t) => ({ key: t, value: r[t] }))
762
782
  };
763
783
  };
764
784
  }
765
- function qr(r) {
766
- return function(e, n) {
785
+ function Dr(r) {
786
+ return function(e) {
767
787
  if (typeof e > "u") return;
768
- if (!e || !x(e)) return { value: e };
788
+ if (!e || !w(e)) return { value: e };
769
789
  const t = {
770
- value: e.reduce((i, s) => ({
771
- ...i,
772
- [s.key]: r != null && r.assignKeyToValue ? s.key : s.value ?? (r == null ? void 0 : r.fallbackValue)
790
+ value: e.reduce((n, o) => ({
791
+ ...n,
792
+ [o.key]: r != null && r.assignKeyToValue ? o.key : o.value ?? (r == null ? void 0 : r.fallbackValue)
773
793
  }), {})
774
794
  };
775
795
  return r != null && r.unsetIfEmpty && Object.getOwnPropertyNames(t.value).length === 0 ? { value: void 0 } : t;
776
796
  };
777
797
  }
778
- function Ar() {
779
- return function(r, e) {
798
+ function Mr() {
799
+ return function(r) {
780
800
  if (!(typeof r > "u"))
781
- return x(r) && D(r) ? { value: void 0 } : { value: r };
801
+ return w(r) && J(r) ? { value: void 0 } : { value: r };
782
802
  };
783
803
  }
784
- function kr(r) {
785
- return function(e, n) {
786
- const t = r ? T(n, r) : e;
787
- if (!(typeof t > "u")) {
788
- if (ge(t)) return { value: void 0, path: r };
789
- if (he(t)) {
790
- const i = be(t, Ve);
791
- if (D(i))
792
- return { value: void 0, path: r };
804
+ function $r(r, e) {
805
+ return function(t, n, o, s) {
806
+ let i;
807
+ if (r ? i = T(e && s ? s : n, r) : i = e ? o : t, !(typeof i > "u")) {
808
+ if (Te(i)) return { value: void 0, path: r };
809
+ if (be(i)) {
810
+ const a = we(M(i));
811
+ return Object.getOwnPropertyNames(a).length === 0 ? { value: void 0, path: r } : void 0;
793
812
  }
794
- return { value: t, path: r };
813
+ return { value: i, path: r };
795
814
  }
796
815
  };
797
816
  }
798
- function Dr() {
799
- return function(r, e) {
817
+ function Nr() {
818
+ return function(r) {
800
819
  if (!(typeof r > "u"))
801
- return xe(r) && D(r) ? { value: void 0 } : { value: r };
820
+ return Fe(r) && J(r) ? { value: void 0 } : { value: r };
802
821
  };
803
822
  }
804
- function Mr(r) {
805
- return function(e, n) {
806
- const t = T(n, r);
807
- if (typeof t == "string")
808
- return { value: t };
809
- if (!(typeof t == "number" || typeof t == "boolean") && e !== void 0)
823
+ function Br(r) {
824
+ return function(e, t) {
825
+ const n = T(t, r);
826
+ if (typeof n == "string")
827
+ return { value: n };
828
+ if (!(typeof n == "number" || typeof n == "boolean") && e !== void 0)
810
829
  return { value: e };
811
830
  };
812
831
  }
813
- function $r(r) {
814
- return function(e, n) {
832
+ function Zr(r) {
833
+ return function(e, t, n, o) {
815
834
  if (typeof e > "u") return;
816
835
  if (!e) return { value: e };
817
- const t = T(n, r);
818
- if (typeof t == "object") {
819
- const i = yr(t);
836
+ const s = T(o || t, r);
837
+ if (typeof s == "object") {
838
+ const i = we(s);
820
839
  if (Object.getOwnPropertyNames(i).length === 1)
821
840
  return { value: e, path: r };
822
841
  }
823
842
  return { value: e };
824
843
  };
825
844
  }
826
- function Nr(r) {
827
- return function(e, n) {
828
- const t = T(n, r);
829
- if (typeof t == "string")
830
- return { value: [t] };
831
- if (!(typeof t == "number" || typeof t == "boolean") && e !== void 0)
845
+ function Wr(r) {
846
+ return function(e, t) {
847
+ const n = T(t, r);
848
+ if (typeof n == "string")
849
+ return { value: [n] };
850
+ if (!(typeof n == "number" || typeof n == "boolean") && e !== void 0)
832
851
  return { value: e };
833
852
  };
834
853
  }
835
- function Br(r, e) {
836
- return function(n, t) {
837
- if (typeof n > "u") return;
838
- if (!n) return { value: n };
839
- const i = T(t, r);
840
- if (x(i)) {
841
- if (i.length === 1)
842
- return { value: i[0], path: r };
843
- if (i.length === 0 && e != null && e.unsetIfEmpty)
854
+ function Jr(r, e) {
855
+ return function(t, n) {
856
+ if (typeof t > "u") return;
857
+ if (!t) return { value: t };
858
+ const o = T(n, r);
859
+ if (w(o)) {
860
+ if (o.length === 1)
861
+ return { value: o[0], path: r };
862
+ if (o.length === 0 && e != null && e.unsetIfEmpty)
844
863
  return { value: void 0, path: r };
845
864
  }
846
- return { value: n };
865
+ return { value: t };
847
866
  };
848
867
  }
849
- function _e(r) {
850
- return typeof r == "object" ? !Object.getOwnPropertyNames(r).some((e) => !_e(r[e])) : J(r);
851
- }
852
- function yr(r) {
853
- return be(r, (e) => typeof e == "object" ? _e(e) : J(e));
854
- }
855
- function G(r) {
856
- const { items: e, className: n, withoutWrapper: t = !0, ...i } = r, s = e.map((a) => /* @__PURE__ */ h.jsx(rr, { input: a, path: a.path, ...i }, `${a.inputType}_${a.path}`));
857
- return t ? /* @__PURE__ */ h.jsx(h.Fragment, { children: s }) : /* @__PURE__ */ h.jsx("div", { className: n, children: s });
858
- }
859
- G.displayName = "RenderInputs";
860
- const gr = $e((r, e) => {
861
- const { inputs: n, className: t, factory: i, withoutWrapper: s } = r;
862
- return s ? /* @__PURE__ */ h.jsxs(Ne, { children: [
863
- n.hero,
864
- /* @__PURE__ */ h.jsx(G, { items: n.inputs, factory: i })
865
- ] }) : /* @__PURE__ */ h.jsxs("div", { className: t, ref: e, children: [
866
- n.hero,
867
- /* @__PURE__ */ h.jsx(G, { items: n.inputs, factory: i })
868
+ function Ie(r) {
869
+ return Ae(r) ? !0 : w(r) ? r.length === 0 : typeof r == "object" ? !Object.getOwnPropertyNames(r).some((e) => !Ie(r[e])) : L(r);
870
+ }
871
+ function we(r) {
872
+ return qe(r, (e) => typeof e == "object" ? Ie(e) : L(e));
873
+ }
874
+ function X(r) {
875
+ const { items: e, className: t, withoutWrapper: n = !0, ...o } = r, s = e.map((i) => /* @__PURE__ */ g.jsx(ir, { input: i, path: i.path, ...o }, `${i.inputType}_${i.path}`));
876
+ return n ? /* @__PURE__ */ g.jsx(g.Fragment, { children: s }) : /* @__PURE__ */ g.jsx("div", { className: t, children: s });
877
+ }
878
+ X.displayName = "RenderInputs";
879
+ const Tr = We((r, e) => {
880
+ const { inputs: t, className: n, factory: o, withoutWrapper: s } = r;
881
+ return s ? /* @__PURE__ */ g.jsxs(Je, { children: [
882
+ t.hero,
883
+ /* @__PURE__ */ g.jsx(X, { items: t.inputs, factory: o })
884
+ ] }) : /* @__PURE__ */ g.jsxs("div", { className: n, ref: e, children: [
885
+ t.hero,
886
+ /* @__PURE__ */ g.jsx(X, { items: t.inputs, factory: o })
868
887
  ] });
869
888
  });
870
- gr.displayName = "RenderForm";
871
- function Zr(r) {
889
+ Tr.displayName = "RenderForm";
890
+ function Lr(r) {
872
891
  let e = !0;
873
- return pe(r, (n) => {
874
- e = e && (n === "" || ge(n) || J(n));
892
+ return ge(r, (t) => {
893
+ e = e && (t === "" || Te(t) || L(t));
875
894
  }), e;
876
895
  }
877
- const Wr = (r = "") => Fe(r.split("_").join(" ")), br = (r, e = 2, n, t = 1e3) => {
878
- let i = !1;
896
+ const Ur = (r = "") => ke(r.split("_").join(" ")), Cr = (r, e = 2, t, n = 1e3) => {
897
+ let o = !1;
879
898
  const s = () => {
880
899
  requestAnimationFrame(() => {
881
- i || (e -= 1, e <= 0 ? r() : s());
900
+ o || (e -= 1, e <= 0 ? r() : s());
882
901
  });
883
902
  };
884
- return n && Date.now() - n <= t ? (r(), () => {
903
+ return t && Date.now() - t <= n ? (r(), () => {
885
904
  }) : (s(), () => {
886
- i = !0;
905
+ o = !0;
887
906
  });
888
907
  };
889
- function Jr(r, e) {
908
+ function Hr(r, e) {
890
909
  return {
891
910
  ...r,
892
- inputs: r.inputs.map((n) => R(n, e))
911
+ inputs: r.inputs.map((t) => I(t, e))
893
912
  };
894
913
  }
895
- function R(r, e) {
896
- var u, f, c;
897
- const { override: n, ...t } = r, i = e && n ? n[e] : void 0, { inputConfig: s, ...a } = i || {}, o = i ? { ...t, ...a } : t;
898
- if ((t.inputConfig || s) && (o.inputConfig = { ...t.inputConfig, ...s }), o.inputs && (o.inputs = o.inputs.map((l) => R(l, e))), o.inputType === "list" && o.inputConfig) {
899
- const l = ((u = t.inputConfig) == null ? void 0 : u.inputs) || [], d = (s == null ? void 0 : s.inputs) || [];
900
- if (l.length > 0 || d.length > 0) {
901
- const p = Math.max(l.length, d.length);
902
- o.inputConfig.inputs = Array.from({ length: p }, (g, b) => {
903
- var S;
904
- const v = l[b], y = d[b];
905
- if (!v && y) return R(y, e);
906
- if (v && !y) return R(v, e);
914
+ function I(r, e) {
915
+ var c, l, u;
916
+ const { override: t, ...n } = r, o = e && t ? t[e] : void 0, { inputConfig: s, ...i } = o || {}, a = o ? { ...n, ...i } : n;
917
+ if ((n.inputConfig || s) && (a.inputConfig = { ...n.inputConfig, ...s }), a.inputs && (a.inputs = a.inputs.map((d) => I(d, e))), a.inputType === "list" && a.inputConfig) {
918
+ const d = ((c = n.inputConfig) == null ? void 0 : c.inputs) || [], f = (s == null ? void 0 : s.inputs) || [];
919
+ if (d.length > 0 || f.length > 0) {
920
+ const m = Math.max(d.length, f.length);
921
+ a.inputConfig.inputs = Array.from({ length: m }, (b, h) => {
922
+ var E;
923
+ const v = d[h], y = f[h];
924
+ if (!v && y) return I(y, e);
925
+ if (v && !y) return I(v, e);
907
926
  if (v && y) {
908
- const _ = v.override ? { ...v.override } : {};
909
- return e && y && (_[e] = (S = v.override) != null && S[e] ? { ...v.override[e], ...y } : y), R({ ...v, override: _ }, e);
927
+ const S = v.override ? { ...v.override } : {};
928
+ return e && y && (S[e] = (E = v.override) != null && E[e] ? { ...v.override[e], ...y } : y), I({ ...v, override: S }, e);
910
929
  }
911
930
  }).filter(Boolean);
912
- } else o.inputConfig.inputs && (o.inputConfig.inputs = o.inputConfig.inputs.map(
913
- (p) => R(p, e)
931
+ } else a.inputConfig.inputs && (a.inputConfig.inputs = a.inputConfig.inputs.map(
932
+ (m) => I(m, e)
914
933
  ));
915
934
  }
916
- if (o.inputType === "array" && o.inputConfig) {
917
- const l = (f = t.inputConfig) == null ? void 0 : f.input, d = s == null ? void 0 : s.input;
918
- if (l && d) {
919
- const p = l.override ? { ...l.override } : {};
920
- e && d && (p[e] = (c = l.override) != null && c[e] ? { ...l.override[e], ...d } : d), o.inputConfig.input = R(
921
- { ...l, override: p },
935
+ if (a.inputType === "array" && a.inputConfig) {
936
+ const d = (l = n.inputConfig) == null ? void 0 : l.input, f = s == null ? void 0 : s.input;
937
+ if (d && f) {
938
+ const m = d.override ? { ...d.override } : {};
939
+ e && f && (m[e] = (u = d.override) != null && u[e] ? { ...d.override[e], ...f } : f), a.inputConfig.input = I(
940
+ { ...d, override: m },
922
941
  e
923
942
  );
924
- } else o.inputConfig.input && (o.inputConfig.input = R(o.inputConfig.input, e));
943
+ } else a.inputConfig.input && (a.inputConfig.input = I(a.inputConfig.input, e));
925
944
  }
926
- return o;
945
+ return a;
927
946
  }
928
- function Lr(r) {
947
+ function Gr(r) {
929
948
  const {
930
- field: { onBlur: e, ...n },
931
- ...t
932
- } = Ue(r), i = V(Date.now());
949
+ field: { onBlur: e, ...t },
950
+ ...n
951
+ } = Qe(r), o = P(Date.now());
933
952
  return {
934
- ...t,
953
+ ...n,
935
954
  field: {
936
- ...n,
937
- onBlur: br(e, 2, i.current)
955
+ ...t,
956
+ onBlur: Cr(e, 2, o.current)
938
957
  }
939
958
  };
940
959
  }
941
960
  export {
942
- Gr as Controller,
943
- Kr as Form,
944
- Qr as FormProvider,
945
- Sr as InputComponent,
946
- rr as InputComponentRenderer,
947
- ve as InputFactory,
948
- Ge as InputOverrideError,
949
- gr as RenderForm,
950
- G as RenderInputs,
951
- _r as RootForm,
952
- br as afterFrames,
953
- Jr as applyFormOverrides,
954
- R as applyInputOverride,
955
- qr as arrayToObjectOutputTransformer,
956
- Fr as collectDefaultValues,
957
- Vr as convertDataToFormModel,
958
- xr as convertFormModelToData,
959
- Wr as generateReadableLabel,
960
- Xr as get,
961
- Ir as getDefaultValuesFromFormDefinition,
962
- jr as getTemporaryPath,
963
- Se as getTransformers,
964
- ar as getValidationSchema,
965
- lr as inputTransformValues,
966
- Zr as isChildrenEmpty,
967
- Pr as objectToArrayInputTransformer,
968
- dr as outputTransformValues,
969
- Rr as overrideFormDefinition,
970
- A as processValidationParseResponse,
971
- nr as removeTemporaryFieldsValue,
972
- Yr as set,
973
- Nr as shorthandArrayInputTransformer,
974
- Br as shorthandArrayOutputTransformer,
975
- Mr as shorthandObjectInputTransformer,
976
- $r as shorthandObjectOutputTransformer,
977
- Ar as unsetEmptyArrayOutputTransformer,
978
- kr as unsetEmptyObjectOutputTransformer,
979
- Dr as unsetEmptyStringOutputTransformer,
980
- hr as unsetHiddenInputsValues,
981
- Lr as useController,
982
- zr as useFieldArray,
983
- et as useForm,
984
- rt as useFormContext,
985
- tt as useFormState,
986
- ze as useRootFormContext,
987
- nt as useWatch,
988
- wr as useZodValidationResolver
961
+ Xr as Controller,
962
+ Yr as Form,
963
+ zr as FormProvider,
964
+ Ir as InputComponent,
965
+ ir as InputComponentRenderer,
966
+ Ce as InputFactory,
967
+ Ye as InputOverrideError,
968
+ Tr as RenderForm,
969
+ X as RenderInputs,
970
+ wr as RootForm,
971
+ Cr as afterFrames,
972
+ Hr as applyFormOverrides,
973
+ I as applyInputOverride,
974
+ Dr as arrayToObjectOutputTransformer,
975
+ Ar as collectDefaultValues,
976
+ Fr as convertDataToFormModel,
977
+ qr as convertFormModelToData,
978
+ Ur as generateReadableLabel,
979
+ et as get,
980
+ Vr as getDefaultValuesFromFormDefinition,
981
+ Pr as getTemporaryPath,
982
+ Re as getTransformers,
983
+ cr as getValidationSchema,
984
+ hr as inputTransformValues,
985
+ Lr as isChildrenEmpty,
986
+ kr as objectToArrayInputTransformer,
987
+ yr as outputTransformValues,
988
+ jr as overrideFormDefinition,
989
+ k as processValidationParseResponse,
990
+ or as removeTemporaryFieldsValue,
991
+ rt as set,
992
+ Wr as shorthandArrayInputTransformer,
993
+ Jr as shorthandArrayOutputTransformer,
994
+ Br as shorthandObjectInputTransformer,
995
+ Zr as shorthandObjectOutputTransformer,
996
+ Mr as unsetEmptyArrayOutputTransformer,
997
+ $r as unsetEmptyObjectOutputTransformer,
998
+ Nr as unsetEmptyStringOutputTransformer,
999
+ vr as unsetHiddenInputsValues,
1000
+ Gr as useController,
1001
+ tt as useFieldArray,
1002
+ nt as useForm,
1003
+ st as useFormContext,
1004
+ it as useFormState,
1005
+ nr as useRootFormContext,
1006
+ at as useWatch,
1007
+ xr as useZodValidationResolver
989
1008
  };
990
1009
  //# sourceMappingURL=index.js.map