@object-ui/fields 3.0.2 → 3.1.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,303 +1,303 @@
1
- import P, { useId as xt, useState as L, useRef as te, useEffect as ve } from "react";
1
+ import k, { useId as vt, useState as B, useRef as xe, useCallback as te, useEffect as ze } from "react";
2
2
  import { ComponentRegistry as g } from "@object-ui/core";
3
- import { Textarea as V, Input as _, Checkbox as ht, Label as R, Switch as pt, Select as gt, SelectTrigger as bt, SelectValue as jt, SelectContent as yt, SelectItem as Nt, Badge as k, Dialog as vt, DialogTrigger as _t, Button as F, DialogContent as Ft, DialogHeader as wt, DialogTitle as St, Avatar as $, AvatarFallback as z, cn as O, Slider as Ct, AvatarImage as ce } from "@object-ui/components";
4
- import { X as E, Search as Pt, EyeOff as Ot, Eye as Tt, File as Rt, Upload as _e, Image as kt, Star as de, MapPin as ue, Crosshair as At, Eraser as $t, QrCode as me, Copy as zt, ExternalLink as fe, Plus as Et, Check as Mt } from "lucide-react";
5
- var Y = { exports: {} }, D = {};
6
- var xe;
7
- function Ut() {
8
- if (xe) return D;
9
- xe = 1;
3
+ import { Textarea as Z, Input as w, Checkbox as Ee, Label as E, Switch as _t, Select as wt, SelectTrigger as Ft, SelectValue as St, SelectContent as Ct, SelectItem as Pt, Badge as M, Dialog as Tt, DialogTrigger as Ot, Button as P, DialogContent as Rt, DialogHeader as kt, DialogTitle as At, Slider as De, Avatar as L, AvatarFallback as I, cn as z, AvatarImage as ve } from "@object-ui/components";
4
+ import { X as W, Search as $t, EyeOff as zt, Eye as Et, Upload as Me, ImageIcon as Dt, File as Mt, Image as Lt, Star as _e, MapPin as we, Crosshair as It, Eraser as Ut, QrCode as Fe, Copy as he, ExternalLink as Se, Plus as Vt, Check as pe, Phone as Bt } from "lucide-react";
5
+ var re = { exports: {} }, H = {};
6
+ var Ce;
7
+ function Yt() {
8
+ if (Ce) return H;
9
+ Ce = 1;
10
10
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
11
- function a(s, n, l) {
12
- var i = null;
13
- if (l !== void 0 && (i = "" + l), n.key !== void 0 && (i = "" + n.key), "key" in n) {
14
- l = {};
15
- for (var o in n)
16
- o !== "key" && (l[o] = n[o]);
17
- } else l = n;
18
- return n = l.ref, {
11
+ function n(a, s, i) {
12
+ var l = null;
13
+ if (i !== void 0 && (l = "" + i), s.key !== void 0 && (l = "" + s.key), "key" in s) {
14
+ i = {};
15
+ for (var o in s)
16
+ o !== "key" && (i[o] = s[o]);
17
+ } else i = s;
18
+ return s = i.ref, {
19
19
  $$typeof: e,
20
- type: s,
21
- key: i,
22
- ref: n !== void 0 ? n : null,
23
- props: l
20
+ type: a,
21
+ key: l,
22
+ ref: s !== void 0 ? s : null,
23
+ props: i
24
24
  };
25
25
  }
26
- return D.Fragment = r, D.jsx = a, D.jsxs = a, D;
27
- }
28
- var I = {};
29
- var he;
30
- function Dt() {
31
- return he || (he = 1, process.env.NODE_ENV !== "production" && (function() {
32
- function e(u) {
33
- if (u == null) return null;
34
- if (typeof u == "function")
35
- return u.$$typeof === ut ? null : u.displayName || u.name || null;
36
- if (typeof u == "string") return u;
37
- switch (u) {
38
- case T:
26
+ return H.Fragment = r, H.jsx = n, H.jsxs = n, H;
27
+ }
28
+ var X = {};
29
+ var Pe;
30
+ function qt() {
31
+ return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && (function() {
32
+ function e(d) {
33
+ if (d == null) return null;
34
+ if (typeof d == "function")
35
+ return d.$$typeof === Y ? null : d.displayName || d.name || null;
36
+ if (typeof d == "string") return d;
37
+ switch (d) {
38
+ case R:
39
39
  return "Fragment";
40
- case C:
40
+ case T:
41
41
  return "Profiler";
42
- case y:
42
+ case N:
43
43
  return "StrictMode";
44
- case it:
44
+ case b:
45
45
  return "Suspense";
46
- case ot:
46
+ case F:
47
47
  return "SuspenseList";
48
- case dt:
48
+ case O:
49
49
  return "Activity";
50
50
  }
51
- if (typeof u == "object")
52
- switch (typeof u.tag == "number" && console.error(
51
+ if (typeof d == "object")
52
+ switch (typeof d.tag == "number" && console.error(
53
53
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
54
- ), u.$$typeof) {
55
- case N:
54
+ ), d.$$typeof) {
55
+ case v:
56
56
  return "Portal";
57
- case J:
58
- return u.displayName || "Context";
57
+ case Q:
58
+ return d.displayName || "Context";
59
59
  case U:
60
- return (u._context.displayName || "Context") + ".Consumer";
61
- case lt:
62
- var b = u.render;
63
- return u = u.displayName, u || (u = b.displayName || b.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
64
- case ct:
65
- return b = u.displayName || null, b !== null ? b : e(u.type) || "Memo";
66
- case G:
67
- b = u._payload, u = u._init;
60
+ return (d._context.displayName || "Context") + ".Consumer";
61
+ case K:
62
+ var j = d.render;
63
+ return d = d.displayName, d || (d = j.displayName || j.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
64
+ case A:
65
+ return j = d.displayName || null, j !== null ? j : e(d.type) || "Memo";
66
+ case $:
67
+ j = d._payload, d = d._init;
68
68
  try {
69
- return e(u(b));
69
+ return e(d(j));
70
70
  } catch {
71
71
  }
72
72
  }
73
73
  return null;
74
74
  }
75
- function r(u) {
76
- return "" + u;
75
+ function r(d) {
76
+ return "" + d;
77
77
  }
78
- function a(u) {
78
+ function n(d) {
79
79
  try {
80
- r(u);
81
- var b = !1;
80
+ r(d);
81
+ var j = !1;
82
82
  } catch {
83
- b = !0;
83
+ j = !0;
84
84
  }
85
- if (b) {
86
- b = console;
87
- var v = b.error, w = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
88
- return v.call(
89
- b,
85
+ if (j) {
86
+ j = console;
87
+ var _ = j.error, S = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
88
+ return _.call(
89
+ j,
90
90
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
91
- w
92
- ), r(u);
91
+ S
92
+ ), r(d);
93
93
  }
94
94
  }
95
- function s(u) {
96
- if (u === T) return "<>";
97
- if (typeof u == "object" && u !== null && u.$$typeof === G)
95
+ function a(d) {
96
+ if (d === R) return "<>";
97
+ if (typeof d == "object" && d !== null && d.$$typeof === $)
98
98
  return "<...>";
99
99
  try {
100
- var b = e(u);
101
- return b ? "<" + b + ">" : "<...>";
100
+ var j = e(d);
101
+ return j ? "<" + j + ">" : "<...>";
102
102
  } catch {
103
103
  return "<...>";
104
104
  }
105
105
  }
106
- function n() {
107
- var u = W.A;
108
- return u === null ? null : u.getOwner();
106
+ function s() {
107
+ var d = q.A;
108
+ return d === null ? null : d.getOwner();
109
109
  }
110
- function l() {
110
+ function i() {
111
111
  return Error("react-stack-top-frame");
112
112
  }
113
- function i(u) {
114
- if (se.call(u, "key")) {
115
- var b = Object.getOwnPropertyDescriptor(u, "key").get;
116
- if (b && b.isReactWarning) return !1;
113
+ function l(d) {
114
+ if (V.call(d, "key")) {
115
+ var j = Object.getOwnPropertyDescriptor(d, "key").get;
116
+ if (j && j.isReactWarning) return !1;
117
117
  }
118
- return u.key !== void 0;
118
+ return d.key !== void 0;
119
119
  }
120
- function o(u, b) {
121
- function v() {
122
- ne || (ne = !0, console.error(
120
+ function o(d, j) {
121
+ function _() {
122
+ ge || (ge = !0, console.error(
123
123
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
124
- b
124
+ j
125
125
  ));
126
126
  }
127
- v.isReactWarning = !0, Object.defineProperty(u, "key", {
128
- get: v,
127
+ _.isReactWarning = !0, Object.defineProperty(d, "key", {
128
+ get: _,
129
129
  configurable: !0
130
130
  });
131
131
  }
132
132
  function c() {
133
- var u = e(this.type);
134
- return ae[u] || (ae[u] = !0, console.error(
133
+ var d = e(this.type);
134
+ return be[d] || (be[d] = !0, console.error(
135
135
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
136
- )), u = this.props.ref, u !== void 0 ? u : null;
136
+ )), d = this.props.ref, d !== void 0 ? d : null;
137
137
  }
138
- function m(u, b, v, w, B, X) {
139
- var S = v.ref;
140
- return u = {
138
+ function m(d, j, _, S, ee, ie) {
139
+ var C = _.ref;
140
+ return d = {
141
141
  $$typeof: p,
142
- type: u,
143
- key: b,
144
- props: v,
145
- _owner: w
146
- }, (S !== void 0 ? S : null) !== null ? Object.defineProperty(u, "ref", {
142
+ type: d,
143
+ key: j,
144
+ props: _,
145
+ _owner: S
146
+ }, (C !== void 0 ? C : null) !== null ? Object.defineProperty(d, "ref", {
147
147
  enumerable: !1,
148
148
  get: c
149
- }) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
149
+ }) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
150
150
  configurable: !1,
151
151
  enumerable: !1,
152
152
  writable: !0,
153
153
  value: 0
154
- }), Object.defineProperty(u, "_debugInfo", {
154
+ }), Object.defineProperty(d, "_debugInfo", {
155
155
  configurable: !1,
156
156
  enumerable: !1,
157
157
  writable: !0,
158
158
  value: null
159
- }), Object.defineProperty(u, "_debugStack", {
159
+ }), Object.defineProperty(d, "_debugStack", {
160
160
  configurable: !1,
161
161
  enumerable: !1,
162
162
  writable: !0,
163
- value: B
164
- }), Object.defineProperty(u, "_debugTask", {
163
+ value: ee
164
+ }), Object.defineProperty(d, "_debugTask", {
165
165
  configurable: !1,
166
166
  enumerable: !1,
167
167
  writable: !0,
168
- value: X
169
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
168
+ value: ie
169
+ }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
170
170
  }
171
- function h(u, b, v, w, B, X) {
172
- var S = b.children;
173
- if (S !== void 0)
174
- if (w)
175
- if (mt(S)) {
176
- for (w = 0; w < S.length; w++)
177
- x(S[w]);
178
- Object.freeze && Object.freeze(S);
171
+ function h(d, j, _, S, ee, ie) {
172
+ var C = j.children;
173
+ if (C !== void 0)
174
+ if (S)
175
+ if (yt(C)) {
176
+ for (S = 0; S < C.length; S++)
177
+ f(C[S]);
178
+ Object.freeze && Object.freeze(C);
179
179
  } else
180
180
  console.error(
181
181
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
182
182
  );
183
- else x(S);
184
- if (se.call(b, "key")) {
185
- S = e(u);
186
- var M = Object.keys(b).filter(function(ft) {
187
- return ft !== "key";
183
+ else f(C);
184
+ if (V.call(j, "key")) {
185
+ C = e(d);
186
+ var J = Object.keys(j).filter(function(Nt) {
187
+ return Nt !== "key";
188
188
  });
189
- w = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}", oe[S + w] || (M = 0 < M.length ? "{" + M.join(": ..., ") + ": ...}" : "{}", console.error(
189
+ S = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", Ne[C + S] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
190
190
  `A props object containing a "key" prop is being spread into JSX:
191
191
  let props = %s;
192
192
  <%s {...props} />
193
193
  React keys must be passed directly to JSX without using spread:
194
194
  let props = %s;
195
195
  <%s key={someKey} {...props} />`,
196
- w,
197
196
  S,
198
- M,
199
- S
200
- ), oe[S + w] = !0);
197
+ C,
198
+ J,
199
+ C
200
+ ), Ne[C + S] = !0);
201
201
  }
202
- if (S = null, v !== void 0 && (a(v), S = "" + v), i(b) && (a(b.key), S = "" + b.key), "key" in b) {
203
- v = {};
204
- for (var H in b)
205
- H !== "key" && (v[H] = b[H]);
206
- } else v = b;
207
- return S && o(
208
- v,
209
- typeof u == "function" ? u.displayName || u.name || "Unknown" : u
202
+ if (C = null, _ !== void 0 && (n(_), C = "" + _), l(j) && (n(j.key), C = "" + j.key), "key" in j) {
203
+ _ = {};
204
+ for (var oe in j)
205
+ oe !== "key" && (_[oe] = j[oe]);
206
+ } else _ = j;
207
+ return C && o(
208
+ _,
209
+ typeof d == "function" ? d.displayName || d.name || "Unknown" : d
210
210
  ), m(
211
- u,
212
- S,
213
- v,
214
- n(),
215
- B,
216
- X
211
+ d,
212
+ C,
213
+ _,
214
+ s(),
215
+ ee,
216
+ ie
217
217
  );
218
218
  }
219
- function x(u) {
220
- d(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === G && (u._payload.status === "fulfilled" ? d(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
219
+ function f(d) {
220
+ u(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === $ && (d._payload.status === "fulfilled" ? u(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
221
221
  }
222
- function d(u) {
223
- return typeof u == "object" && u !== null && u.$$typeof === p;
222
+ function u(d) {
223
+ return typeof d == "object" && d !== null && d.$$typeof === p;
224
224
  }
225
- var f = P, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), N = /* @__PURE__ */ Symbol.for("react.portal"), T = /* @__PURE__ */ Symbol.for("react.fragment"), y = /* @__PURE__ */ Symbol.for("react.strict_mode"), C = /* @__PURE__ */ Symbol.for("react.profiler"), U = /* @__PURE__ */ Symbol.for("react.consumer"), J = /* @__PURE__ */ Symbol.for("react.context"), lt = /* @__PURE__ */ Symbol.for("react.forward_ref"), it = /* @__PURE__ */ Symbol.for("react.suspense"), ot = /* @__PURE__ */ Symbol.for("react.suspense_list"), ct = /* @__PURE__ */ Symbol.for("react.memo"), G = /* @__PURE__ */ Symbol.for("react.lazy"), dt = /* @__PURE__ */ Symbol.for("react.activity"), ut = /* @__PURE__ */ Symbol.for("react.client.reference"), W = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, se = Object.prototype.hasOwnProperty, mt = Array.isArray, Q = console.createTask ? console.createTask : function() {
225
+ var x = k, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), v = /* @__PURE__ */ Symbol.for("react.portal"), R = /* @__PURE__ */ Symbol.for("react.fragment"), N = /* @__PURE__ */ Symbol.for("react.strict_mode"), T = /* @__PURE__ */ Symbol.for("react.profiler"), U = /* @__PURE__ */ Symbol.for("react.consumer"), Q = /* @__PURE__ */ Symbol.for("react.context"), K = /* @__PURE__ */ Symbol.for("react.forward_ref"), b = /* @__PURE__ */ Symbol.for("react.suspense"), F = /* @__PURE__ */ Symbol.for("react.suspense_list"), A = /* @__PURE__ */ Symbol.for("react.memo"), $ = /* @__PURE__ */ Symbol.for("react.lazy"), O = /* @__PURE__ */ Symbol.for("react.activity"), Y = /* @__PURE__ */ Symbol.for("react.client.reference"), q = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, yt = Array.isArray, le = console.createTask ? console.createTask : function() {
226
226
  return null;
227
227
  };
228
- f = {
229
- react_stack_bottom_frame: function(u) {
230
- return u();
228
+ x = {
229
+ react_stack_bottom_frame: function(d) {
230
+ return d();
231
231
  }
232
232
  };
233
- var ne, ae = {}, le = f.react_stack_bottom_frame.bind(
234
- f,
235
- l
236
- )(), ie = Q(s(l)), oe = {};
237
- I.Fragment = T, I.jsx = function(u, b, v) {
238
- var w = 1e4 > W.recentlyCreatedOwnerStacks++;
233
+ var ge, be = {}, je = x.react_stack_bottom_frame.bind(
234
+ x,
235
+ i
236
+ )(), ye = le(a(i)), Ne = {};
237
+ X.Fragment = R, X.jsx = function(d, j, _) {
238
+ var S = 1e4 > q.recentlyCreatedOwnerStacks++;
239
239
  return h(
240
- u,
241
- b,
242
- v,
240
+ d,
241
+ j,
242
+ _,
243
243
  !1,
244
- w ? Error("react-stack-top-frame") : le,
245
- w ? Q(s(u)) : ie
244
+ S ? Error("react-stack-top-frame") : je,
245
+ S ? le(a(d)) : ye
246
246
  );
247
- }, I.jsxs = function(u, b, v) {
248
- var w = 1e4 > W.recentlyCreatedOwnerStacks++;
247
+ }, X.jsxs = function(d, j, _) {
248
+ var S = 1e4 > q.recentlyCreatedOwnerStacks++;
249
249
  return h(
250
- u,
251
- b,
252
- v,
250
+ d,
251
+ j,
252
+ _,
253
253
  !0,
254
- w ? Error("react-stack-top-frame") : le,
255
- w ? Q(s(u)) : ie
254
+ S ? Error("react-stack-top-frame") : je,
255
+ S ? le(a(d)) : ye
256
256
  );
257
257
  };
258
- })()), I;
258
+ })()), X;
259
259
  }
260
- var pe;
261
- function It() {
262
- return pe || (pe = 1, process.env.NODE_ENV === "production" ? Y.exports = Ut() : Y.exports = Dt()), Y.exports;
260
+ var Te;
261
+ function Jt() {
262
+ return Te || (Te = 1, process.env.NODE_ENV === "production" ? re.exports = Yt() : re.exports = qt()), re.exports;
263
263
  }
264
- var t = It();
265
- function Fe({ value: e, onChange: r, field: a, readonly: s, ...n }) {
266
- const l = a || n.schema;
267
- if (s)
264
+ var t = Jt();
265
+ function Le({ value: e, onChange: r, field: n, readonly: a, ...s }) {
266
+ const i = n || s.schema;
267
+ if (a)
268
268
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: e || "-" });
269
- const i = l?.rows, { inputType: o, ...c } = n;
270
- return i && i > 1 ? /* @__PURE__ */ t.jsx(
271
- V,
269
+ const l = i?.rows, { inputType: o, ...c } = s;
270
+ return l && l > 1 ? /* @__PURE__ */ t.jsx(
271
+ Z,
272
272
  {
273
273
  ...c,
274
274
  value: e || "",
275
275
  onChange: (m) => r(m.target.value),
276
- placeholder: l?.placeholder,
277
- disabled: s || c.disabled
276
+ placeholder: i?.placeholder,
277
+ disabled: a || c.disabled
278
278
  }
279
279
  ) : /* @__PURE__ */ t.jsx(
280
- _,
280
+ w,
281
281
  {
282
282
  ...c,
283
- type: l?.type === "password" ? "password" : "text",
283
+ type: i?.type === "password" ? "password" : "text",
284
284
  value: e || "",
285
285
  onChange: (m) => r(m.target.value),
286
- placeholder: l?.placeholder,
287
- disabled: s || c.disabled
286
+ placeholder: i?.placeholder,
287
+ disabled: a || c.disabled
288
288
  }
289
289
  );
290
290
  }
291
- const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
291
+ const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
292
292
  __proto__: null,
293
- TextField: Fe
293
+ TextField: Le
294
294
  }, Symbol.toStringTag, { value: "Module" }));
295
- function we({ value: e, onChange: r, field: a, readonly: s, ...n }) {
296
- if (s)
295
+ function Ie({ value: e, onChange: r, field: n, readonly: a, ...s }) {
296
+ if (a)
297
297
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: e ?? "-" });
298
- const l = a || n.schema, i = l?.precision, { inputType: o, ...c } = n;
298
+ const i = n || s.schema, l = i?.precision, { inputType: o, ...c } = s;
299
299
  return /* @__PURE__ */ t.jsx(
300
- _,
300
+ w,
301
301
  {
302
302
  ...c,
303
303
  type: "number",
@@ -306,97 +306,97 @@ function we({ value: e, onChange: r, field: a, readonly: s, ...n }) {
306
306
  const h = m.target.value;
307
307
  r(h === "" ? null : Number(h));
308
308
  },
309
- placeholder: l?.placeholder,
310
- disabled: s || c.disabled,
311
- step: i ? Math.pow(10, -i) : "any"
309
+ placeholder: i?.placeholder,
310
+ disabled: a || c.disabled,
311
+ step: l ? Math.pow(10, -l) : "any"
312
312
  }
313
313
  );
314
314
  }
315
- const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
315
+ const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
316
316
  __proto__: null,
317
- NumberField: we
317
+ NumberField: Ie
318
318
  }, Symbol.toStringTag, { value: "Module" }));
319
- function Se({ value: e, onChange: r, field: a, readonly: s, ...n }) {
320
- const l = a || n.schema, i = l?.widget, o = xt(), c = l?.name || o, m = l?.label || "Checkbox";
321
- if (s)
319
+ function Ue({ value: e, onChange: r, field: n, readonly: a, ...s }) {
320
+ const i = n || s.schema, l = i?.widget, o = vt(), c = i?.name || o, m = i?.label || "Checkbox";
321
+ if (a)
322
322
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: e ? "Yes" : "No" });
323
- const { inputType: h, ...x } = n;
324
- return i === "checkbox" ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-2", children: [
323
+ const { inputType: h, ...f } = s;
324
+ return l === "checkbox" ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-2", children: [
325
325
  /* @__PURE__ */ t.jsx(
326
- ht,
326
+ Ee,
327
327
  {
328
- ...x,
328
+ ...f,
329
329
  id: c,
330
330
  checked: !!e,
331
- onCheckedChange: (d) => r(!!d),
332
- disabled: s || x.disabled
331
+ onCheckedChange: (u) => r(!!u),
332
+ disabled: a || f.disabled
333
333
  }
334
334
  ),
335
- /* @__PURE__ */ t.jsx(R, { htmlFor: c, children: m })
335
+ /* @__PURE__ */ t.jsx(E, { htmlFor: c, children: m })
336
336
  ] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-2", children: [
337
337
  /* @__PURE__ */ t.jsx(
338
- pt,
338
+ _t,
339
339
  {
340
- ...x,
340
+ ...f,
341
341
  id: c,
342
342
  checked: !!e,
343
343
  onCheckedChange: r,
344
- disabled: s || x.disabled
344
+ disabled: a || f.disabled
345
345
  }
346
346
  ),
347
- /* @__PURE__ */ t.jsx(R, { htmlFor: c, children: m })
347
+ /* @__PURE__ */ t.jsx(E, { htmlFor: c, children: m })
348
348
  ] });
349
349
  }
350
- const Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
350
+ const Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
351
351
  __proto__: null,
352
- BooleanField: Se
352
+ BooleanField: Ue
353
353
  }, Symbol.toStringTag, { value: "Module" }));
354
- function Ce({ value: e, onChange: r, field: a, readonly: s, ...n }) {
355
- const l = a || n.schema, i = l?.options || [];
356
- if (s) {
357
- const o = i.find((c) => c.value === e);
354
+ function Ve({ value: e, onChange: r, field: n, readonly: a, ...s }) {
355
+ const i = n || s.schema, l = i?.options || [];
356
+ if (a) {
357
+ const o = l.find((c) => c.value === e);
358
358
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: o?.label || e || "-" });
359
359
  }
360
360
  return /* @__PURE__ */ t.jsxs(
361
- gt,
361
+ wt,
362
362
  {
363
- ...n,
363
+ ...s,
364
364
  value: e,
365
365
  onValueChange: r,
366
- disabled: s || n.disabled,
366
+ disabled: a || s.disabled,
367
367
  children: [
368
- /* @__PURE__ */ t.jsx(bt, { className: n.className, id: n.id, children: /* @__PURE__ */ t.jsx(jt, { placeholder: l?.placeholder || "Select an option" }) }),
369
- /* @__PURE__ */ t.jsx(yt, { position: "popper", children: i.map((o) => /* @__PURE__ */ t.jsx(Nt, { value: o.value, children: o.label }, o.value)) })
368
+ /* @__PURE__ */ t.jsx(Ft, { className: s.className, id: s.id, children: /* @__PURE__ */ t.jsx(St, { placeholder: i?.placeholder || "Select an option" }) }),
369
+ /* @__PURE__ */ t.jsx(Ct, { position: "popper", children: l.map((o) => /* @__PURE__ */ t.jsx(Pt, { value: o.value, children: o.label }, o.value)) })
370
370
  ]
371
371
  }
372
372
  );
373
373
  }
374
- const Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
374
+ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
375
375
  __proto__: null,
376
- SelectField: Ce
376
+ SelectField: Ve
377
377
  }, Symbol.toStringTag, { value: "Module" }));
378
- function Pe({ value: e, onChange: r, field: a, readonly: s, ...n }) {
379
- if (s)
378
+ function Be({ value: e, onChange: r, field: n, readonly: a, ...s }) {
379
+ if (a)
380
380
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: e ? new Date(e).toLocaleDateString() : "-" });
381
- const { inputType: l, ...i } = n;
381
+ const { inputType: i, ...l } = s;
382
382
  return /* @__PURE__ */ t.jsx(
383
- _,
383
+ w,
384
384
  {
385
- ...i,
385
+ ...l,
386
386
  type: "date",
387
387
  value: e || "",
388
388
  onChange: (o) => r(o.target.value),
389
- disabled: s || i.disabled
389
+ disabled: a || l.disabled
390
390
  }
391
391
  );
392
392
  }
393
- const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
393
+ const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
394
394
  __proto__: null,
395
- DateField: Pe
395
+ DateField: Be
396
396
  }, Symbol.toStringTag, { value: "Module" }));
397
- function Oe({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...l }) {
398
- const i = a || l.schema;
399
- if (s)
397
+ function Ye({ value: e, onChange: r, field: n, readonly: a, errorMessage: s, ...i }) {
398
+ const l = n || i.schema;
399
+ if (a)
400
400
  return e ? /* @__PURE__ */ t.jsx(
401
401
  "a",
402
402
  {
@@ -405,27 +405,27 @@ function Oe({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...
405
405
  children: e
406
406
  }
407
407
  ) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
408
- const { inputType: o, ...c } = l;
408
+ const { inputType: o, ...c } = i;
409
409
  return /* @__PURE__ */ t.jsx(
410
- _,
410
+ w,
411
411
  {
412
412
  ...c,
413
413
  type: "email",
414
414
  value: e || "",
415
415
  onChange: (m) => r(m.target.value),
416
- placeholder: i?.placeholder || "email@example.com",
417
- disabled: s || c.disabled,
418
- "aria-invalid": !!n
416
+ placeholder: l?.placeholder || "email@example.com",
417
+ disabled: a || c.disabled,
418
+ "aria-invalid": !!s
419
419
  }
420
420
  );
421
421
  }
422
- const Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
422
+ const Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
423
423
  __proto__: null,
424
- EmailField: Oe
424
+ EmailField: Ye
425
425
  }, Symbol.toStringTag, { value: "Module" }));
426
- function Te({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...l }) {
427
- const i = a || l.schema;
428
- if (s)
426
+ function qe({ value: e, onChange: r, field: n, readonly: a, errorMessage: s, ...i }) {
427
+ const l = n || i.schema;
428
+ if (a)
429
429
  return e ? /* @__PURE__ */ t.jsx(
430
430
  "a",
431
431
  {
@@ -434,27 +434,27 @@ function Te({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...
434
434
  children: e
435
435
  }
436
436
  ) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
437
- const { inputType: o, ...c } = l;
437
+ const { inputType: o, ...c } = i;
438
438
  return /* @__PURE__ */ t.jsx(
439
- _,
439
+ w,
440
440
  {
441
441
  ...c,
442
442
  type: "tel",
443
443
  value: e || "",
444
444
  onChange: (m) => r(m.target.value),
445
- placeholder: i?.placeholder || "(555) 123-4567",
446
- disabled: s || c.disabled,
447
- "aria-invalid": !!n
445
+ placeholder: l?.placeholder || "(555) 123-4567",
446
+ disabled: a || c.disabled,
447
+ "aria-invalid": !!s
448
448
  }
449
449
  );
450
450
  }
451
- const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
451
+ const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
452
452
  __proto__: null,
453
- PhoneField: Te
453
+ PhoneField: qe
454
454
  }, Symbol.toStringTag, { value: "Module" }));
455
- function Re({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...l }) {
456
- const i = a || l.schema;
457
- if (s)
455
+ function Je({ value: e, onChange: r, field: n, readonly: a, errorMessage: s, ...i }) {
456
+ const l = n || i.schema;
457
+ if (a)
458
458
  return e ? e.startsWith("http://") || e.startsWith("https://") ? /* @__PURE__ */ t.jsx(
459
459
  "a",
460
460
  {
@@ -465,25 +465,25 @@ function Re({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...
465
465
  children: e
466
466
  }
467
467
  ) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: e }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
468
- const { inputType: o, ...c } = l;
468
+ const { inputType: o, ...c } = i;
469
469
  return /* @__PURE__ */ t.jsx(
470
- _,
470
+ w,
471
471
  {
472
472
  ...c,
473
473
  type: "url",
474
474
  value: e || "",
475
475
  onChange: (m) => r(m.target.value),
476
- placeholder: i?.placeholder || "https://example.com",
477
- disabled: s || c.disabled,
478
- "aria-invalid": !!n
476
+ placeholder: l?.placeholder || "https://example.com",
477
+ disabled: a || c.disabled,
478
+ "aria-invalid": !!s
479
479
  }
480
480
  );
481
481
  }
482
- const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
482
+ const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
483
483
  __proto__: null,
484
- UrlField: Re
484
+ UrlField: Je
485
485
  }, Symbol.toStringTag, { value: "Module" }));
486
- function Qt(e, r = "USD") {
486
+ function tr(e, r = "USD") {
487
487
  try {
488
488
  return new Intl.NumberFormat("en-US", {
489
489
  style: "currency",
@@ -493,56 +493,56 @@ function Qt(e, r = "USD") {
493
493
  return `${r} ${e.toFixed(2)}`;
494
494
  }
495
495
  }
496
- function ke({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, className: l, ...i }) {
497
- const o = a || i.schema, c = o?.currency || "USD", m = o?.precision ?? 2;
498
- if (s)
499
- return e == null ? /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium tabular-nums", children: Qt(Number(e), c) });
500
- const h = (x) => {
501
- const d = parseFloat(x.target.value);
502
- isNaN(d) || r(parseFloat(d.toFixed(m)));
496
+ function We({ value: e, onChange: r, field: n, readonly: a, errorMessage: s, className: i, ...l }) {
497
+ const o = n || l.schema, c = o?.currency || "USD", m = o?.precision ?? 2;
498
+ if (a)
499
+ return e == null ? /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium tabular-nums", children: tr(Number(e), c) });
500
+ const h = (f) => {
501
+ const u = parseFloat(f.target.value);
502
+ isNaN(u) || r(parseFloat(u.toFixed(m)));
503
503
  };
504
504
  return /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
505
505
  /* @__PURE__ */ t.jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-sm text-gray-500", children: c === "USD" ? "$" : c }),
506
506
  /* @__PURE__ */ t.jsx(
507
- _,
507
+ w,
508
508
  {
509
- ...i,
509
+ ...l,
510
510
  type: "number",
511
511
  value: e ?? "",
512
- onChange: (x) => {
513
- const d = x.target.value === "" ? null : parseFloat(x.target.value);
514
- r(d);
512
+ onChange: (f) => {
513
+ const u = f.target.value === "" ? null : parseFloat(f.target.value);
514
+ r(u);
515
515
  },
516
516
  onBlur: h,
517
517
  placeholder: o?.placeholder || "0.00",
518
- disabled: s || i.disabled,
519
- className: `pl-8 ${l || ""}`,
518
+ disabled: a || l.disabled,
519
+ className: `pl-8 ${i || ""}`,
520
520
  step: Math.pow(10, -m).toFixed(m),
521
- "aria-invalid": !!n
521
+ "aria-invalid": !!s
522
522
  }
523
523
  )
524
524
  ] });
525
525
  }
526
- const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
526
+ const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
527
527
  __proto__: null,
528
- CurrencyField: ke
528
+ CurrencyField: We
529
529
  }, Symbol.toStringTag, { value: "Module" }));
530
- function Ae({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...l }) {
531
- if (s)
530
+ function Ge({ value: e, onChange: r, field: n, readonly: a, errorMessage: s, ...i }) {
531
+ if (a)
532
532
  return /* @__PURE__ */ t.jsx("div", { className: "text-sm whitespace-pre-wrap", children: e || "-" });
533
- const i = a || l.schema, o = i?.rows || 4, c = i?.max_length, { inputType: m, ...h } = l;
533
+ const l = n || i.schema, o = l?.rows || 4, c = l?.max_length, { inputType: m, ...h } = i;
534
534
  return /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
535
535
  /* @__PURE__ */ t.jsx(
536
- V,
536
+ Z,
537
537
  {
538
538
  ...h,
539
539
  value: e || "",
540
- onChange: (x) => r(x.target.value),
541
- placeholder: i?.placeholder,
542
- disabled: s || h.disabled,
540
+ onChange: (f) => r(f.target.value),
541
+ placeholder: l?.placeholder,
542
+ disabled: a || h.disabled,
543
543
  rows: o,
544
544
  maxLength: c,
545
- "aria-invalid": !!n
545
+ "aria-invalid": !!s
546
546
  }
547
547
  ),
548
548
  c && /* @__PURE__ */ t.jsxs(
@@ -560,12 +560,12 @@ function Ae({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...
560
560
  )
561
561
  ] });
562
562
  }
563
- const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
563
+ const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
564
564
  __proto__: null,
565
- TextAreaField: Ae
565
+ TextAreaField: Ge
566
566
  }, Symbol.toStringTag, { value: "Module" }));
567
- function Z({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...l }) {
568
- if (s)
567
+ function ce({ value: e, onChange: r, field: n, readonly: a, errorMessage: s, ...i }) {
568
+ if (a)
569
569
  return /* @__PURE__ */ t.jsx(
570
570
  "div",
571
571
  {
@@ -573,7 +573,7 @@ function Z({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...l
573
573
  children: e || "-"
574
574
  }
575
575
  );
576
- const i = a || l.schema, o = i?.rows || 8, c = i?.format || "markdown";
576
+ const l = n || i.schema, o = l?.rows || 8, c = l?.format || "markdown";
577
577
  return /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
578
578
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between text-xs text-gray-500", children: [
579
579
  /* @__PURE__ */ t.jsxs("span", { children: [
@@ -583,106 +583,106 @@ function Z({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, ...l
583
583
  /* @__PURE__ */ t.jsx("span", { className: "italic", children: "Rich text editor (basic)" })
584
584
  ] }),
585
585
  /* @__PURE__ */ t.jsx(
586
- V,
586
+ Z,
587
587
  {
588
588
  value: e || "",
589
589
  onChange: (m) => r(m.target.value),
590
- placeholder: i?.placeholder || "Enter text...",
591
- disabled: s || l.disabled,
590
+ placeholder: l?.placeholder || "Enter text...",
591
+ disabled: a || i.disabled,
592
592
  rows: o,
593
- className: `font-mono text-sm ${l.className || ""}`,
594
- "aria-invalid": !!n
593
+ className: `font-mono text-sm ${i.className || ""}`,
594
+ "aria-invalid": !!s
595
595
  }
596
596
  )
597
597
  ] });
598
598
  }
599
- const ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
599
+ const Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
600
600
  __proto__: null,
601
- RichTextField: Z
601
+ RichTextField: ce
602
602
  }, Symbol.toStringTag, { value: "Module" }));
603
- function $e({ value: e, onChange: r, field: a, readonly: s, ...n }) {
604
- const [l, i] = L(!1), [o, c] = L(""), m = a || n.schema, h = m?.options || [], x = m.multiple || !1, d = m.display_field || "label", f = h.filter(
605
- (y) => y.label.toLowerCase().includes(o.toLowerCase())
606
- ), p = x ? (Array.isArray(e) ? e : []).map(
607
- (y) => h.find((C) => C.value === y)
608
- ).filter(Boolean) : e ? [h.find((y) => y.value === e)].filter(Boolean) : [], N = (y) => {
609
- if (x) {
610
- const C = Array.isArray(e) ? e : [], U = C.includes(y.value);
611
- r(U ? C.filter((J) => J !== y.value) : [...C, y.value]);
603
+ function Qe({ value: e, onChange: r, field: n, readonly: a, ...s }) {
604
+ const [i, l] = B(!1), [o, c] = B(""), m = n || s.schema, h = m?.options || [], f = m.multiple || !1, u = m.display_field || "label", x = h.filter(
605
+ (N) => N.label.toLowerCase().includes(o.toLowerCase())
606
+ ), p = f ? (Array.isArray(e) ? e : []).map(
607
+ (N) => h.find((T) => T.value === N)
608
+ ).filter(Boolean) : e ? [h.find((N) => N.value === e)].filter(Boolean) : [], v = (N) => {
609
+ if (f) {
610
+ const T = Array.isArray(e) ? e : [], U = T.includes(N.value);
611
+ r(U ? T.filter((Q) => Q !== N.value) : [...T, N.value]);
612
612
  } else
613
- r(y.value), i(!1);
614
- }, T = (y) => {
615
- if (x) {
616
- const C = Array.isArray(e) ? e : [];
617
- r(C.filter((U) => U !== y));
613
+ r(N.value), l(!1);
614
+ }, R = (N) => {
615
+ if (f) {
616
+ const T = Array.isArray(e) ? e : [];
617
+ r(T.filter((U) => U !== N));
618
618
  } else
619
619
  r(null);
620
620
  };
621
- return s ? p.length ? x ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: p.map((y, C) => /* @__PURE__ */ t.jsx(k, { variant: "outline", children: y?.[d] || y?.label }, C)) }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: p[0]?.[d] || p[0]?.label }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
622
- p.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: p.map((y, C) => /* @__PURE__ */ t.jsxs(
623
- k,
621
+ return a ? p.length ? f ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: p.map((N, T) => /* @__PURE__ */ t.jsx(M, { variant: "outline", children: N?.[u] || N?.label }, T)) }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: p[0]?.[u] || p[0]?.label }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
622
+ p.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: p.map((N, T) => /* @__PURE__ */ t.jsxs(
623
+ M,
624
624
  {
625
625
  variant: "outline",
626
626
  className: "gap-1",
627
627
  children: [
628
- y?.[d] || y?.label,
628
+ N?.[u] || N?.label,
629
629
  /* @__PURE__ */ t.jsx(
630
630
  "button",
631
631
  {
632
- onClick: () => T(y?.value),
632
+ onClick: () => R(N?.value),
633
633
  className: "ml-1 hover:text-destructive",
634
634
  type: "button",
635
- "aria-label": `Remove ${y?.[d] || y?.label}`,
636
- children: /* @__PURE__ */ t.jsx(E, { className: "size-3" })
635
+ "aria-label": `Remove ${N?.[u] || N?.label}`,
636
+ children: /* @__PURE__ */ t.jsx(W, { className: "size-3" })
637
637
  }
638
638
  )
639
639
  ]
640
640
  },
641
- C
641
+ T
642
642
  )) }),
643
- /* @__PURE__ */ t.jsxs(vt, { open: l, onOpenChange: i, children: [
644
- /* @__PURE__ */ t.jsx(_t, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
645
- F,
643
+ /* @__PURE__ */ t.jsxs(Tt, { open: i, onOpenChange: l, children: [
644
+ /* @__PURE__ */ t.jsx(Ot, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
645
+ P,
646
646
  {
647
647
  variant: "outline",
648
648
  className: "w-full justify-start text-left font-normal",
649
649
  type: "button",
650
650
  children: [
651
- /* @__PURE__ */ t.jsx(Pt, { className: "mr-2 size-4" }),
652
- p.length === 0 ? m?.placeholder || "Select..." : x ? `${p.length} selected` : "Change selection"
651
+ /* @__PURE__ */ t.jsx($t, { className: "mr-2 size-4" }),
652
+ p.length === 0 ? m?.placeholder || "Select..." : f ? `${p.length} selected` : "Change selection"
653
653
  ]
654
654
  }
655
655
  ) }),
656
- /* @__PURE__ */ t.jsxs(Ft, { className: "max-w-md", children: [
657
- /* @__PURE__ */ t.jsx(wt, { children: /* @__PURE__ */ t.jsxs(St, { children: [
656
+ /* @__PURE__ */ t.jsxs(Rt, { className: "max-w-md", children: [
657
+ /* @__PURE__ */ t.jsx(kt, { children: /* @__PURE__ */ t.jsxs(At, { children: [
658
658
  m?.label || "Select",
659
659
  " ",
660
- x && "(multiple)"
660
+ f && "(multiple)"
661
661
  ] }) }),
662
662
  /* @__PURE__ */ t.jsxs("div", { className: "space-y-4", children: [
663
663
  /* @__PURE__ */ t.jsx(
664
- _,
664
+ w,
665
665
  {
666
666
  placeholder: "Search...",
667
667
  value: o,
668
- onChange: (y) => c(y.target.value),
668
+ onChange: (N) => c(N.target.value),
669
669
  className: "w-full"
670
670
  }
671
671
  ),
672
- /* @__PURE__ */ t.jsx("div", { className: "max-h-64 overflow-y-auto space-y-1", children: f.length === 0 ? /* @__PURE__ */ t.jsx("p", { className: "text-sm text-gray-500 text-center py-4", children: "No options found" }) : f.map((y) => {
673
- const C = x ? (Array.isArray(e) ? e : []).includes(y.value) : e === y.value;
672
+ /* @__PURE__ */ t.jsx("div", { className: "max-h-64 overflow-y-auto space-y-1", children: x.length === 0 ? /* @__PURE__ */ t.jsx("p", { className: "text-sm text-gray-500 text-center py-4", children: "No options found" }) : x.map((N) => {
673
+ const T = f ? (Array.isArray(e) ? e : []).includes(N.value) : e === N.value;
674
674
  return /* @__PURE__ */ t.jsxs(
675
675
  "button",
676
676
  {
677
- onClick: () => N(y),
678
- className: `w-full text-left px-3 py-2 rounded-md text-sm hover:bg-gray-100 flex items-center justify-between ${C ? "bg-blue-50 text-blue-700" : ""}`,
677
+ onClick: () => v(N),
678
+ className: `w-full text-left px-3 py-2 rounded-md text-sm hover:bg-gray-100 flex items-center justify-between ${T ? "bg-blue-50 text-blue-700" : ""}`,
679
679
  type: "button",
680
680
  children: [
681
- /* @__PURE__ */ t.jsx("span", { children: y.label }),
682
- C && /* @__PURE__ */ t.jsx(k, { variant: "default", className: "ml-2", children: "Selected" })
681
+ /* @__PURE__ */ t.jsx("span", { children: N.label }),
682
+ T && /* @__PURE__ */ t.jsx(M, { variant: "default", className: "ml-2", children: "Selected" })
683
683
  ]
684
684
  },
685
- y.value
685
+ N.value
686
686
  );
687
687
  }) })
688
688
  ] })
@@ -690,12 +690,12 @@ function $e({ value: e, onChange: r, field: a, readonly: s, ...n }) {
690
690
  ] })
691
691
  ] });
692
692
  }
693
- const Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
693
+ const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
694
694
  __proto__: null,
695
- LookupField: $e
695
+ LookupField: Qe
696
696
  }, Symbol.toStringTag, { value: "Module" }));
697
- function ze({ value: e, onChange: r, field: a, readonly: s, ...n }) {
698
- if (s) {
697
+ function He({ value: e, onChange: r, field: n, readonly: a, ...s }) {
698
+ if (a) {
699
699
  if (!e) return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
700
700
  const o = new Date(e);
701
701
  return /* @__PURE__ */ t.jsxs("span", { className: "text-sm", children: [
@@ -704,241 +704,308 @@ function ze({ value: e, onChange: r, field: a, readonly: s, ...n }) {
704
704
  o.toLocaleTimeString()
705
705
  ] });
706
706
  }
707
- const { inputType: l, ...i } = n;
707
+ const { inputType: i, ...l } = s;
708
708
  return /* @__PURE__ */ t.jsx(
709
- _,
709
+ w,
710
710
  {
711
- ...i,
711
+ ...l,
712
712
  type: "datetime-local",
713
713
  value: e || "",
714
714
  onChange: (o) => r(o.target.value),
715
- disabled: s || i.disabled
715
+ disabled: a || l.disabled
716
716
  }
717
717
  );
718
718
  }
719
- const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
719
+ const ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
720
720
  __proto__: null,
721
- DateTimeField: ze
721
+ DateTimeField: He
722
722
  }, Symbol.toStringTag, { value: "Module" }));
723
- function Ee({ value: e, onChange: r, field: a, readonly: s, ...n }) {
724
- if (s)
723
+ function Xe({ value: e, onChange: r, field: n, readonly: a, ...s }) {
724
+ if (a)
725
725
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: e || "-" });
726
- const { inputType: l, ...i } = n;
726
+ const { inputType: i, ...l } = s;
727
727
  return /* @__PURE__ */ t.jsx(
728
- _,
728
+ w,
729
729
  {
730
- ...i,
730
+ ...l,
731
731
  type: "time",
732
732
  value: e || "",
733
733
  onChange: (o) => r(o.target.value),
734
- disabled: s || i.disabled
734
+ disabled: a || l.disabled
735
735
  }
736
736
  );
737
737
  }
738
- const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
738
+ const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
739
739
  __proto__: null,
740
- TimeField: Ee
740
+ TimeField: Xe
741
741
  }, Symbol.toStringTag, { value: "Module" }));
742
- function Me({ value: e, onChange: r, field: a, readonly: s, errorMessage: n, className: l, ...i }) {
743
- const o = a || i.schema, c = o?.precision ?? 2;
744
- if (s)
742
+ function Ze({ value: e, onChange: r, field: n, readonly: a, errorMessage: s, className: i, ...l }) {
743
+ const o = n || l.schema, c = o?.precision ?? 2;
744
+ if (a)
745
745
  return e == null ? /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" }) : /* @__PURE__ */ t.jsxs("span", { className: "text-sm font-medium tabular-nums", children: [
746
746
  (e * 100).toFixed(c),
747
747
  "%"
748
748
  ] });
749
- const m = e != null ? e * 100 : "", h = (x) => {
750
- if (x.target.value === "") {
749
+ const m = e != null ? e * 100 : "", h = e != null ? e * 100 : 0, f = (p) => {
750
+ if (p.target.value === "") {
751
751
  r(null);
752
752
  return;
753
753
  }
754
- const d = parseFloat(x.target.value), f = isNaN(d) ? null : d / 100;
755
- r(f);
756
- };
757
- return /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
754
+ const v = parseFloat(p.target.value), R = isNaN(v) ? null : v / 100;
755
+ r(R);
756
+ }, u = (p) => {
757
+ if (a || l.disabled) return;
758
+ if (!Array.isArray(p) || p.length === 0) {
759
+ r(null);
760
+ return;
761
+ }
762
+ const v = p[0], R = typeof v == "number" ? v / 100 : null;
763
+ r(R);
764
+ }, x = Math.pow(10, -c);
765
+ return /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
766
+ /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
767
+ /* @__PURE__ */ t.jsx(
768
+ w,
769
+ {
770
+ ...l,
771
+ type: "number",
772
+ value: m,
773
+ onChange: f,
774
+ placeholder: o?.placeholder || "0",
775
+ disabled: a || l.disabled,
776
+ className: `pr-8 ${i || ""}`,
777
+ step: Math.pow(10, -c).toFixed(c),
778
+ "aria-invalid": !!s
779
+ }
780
+ ),
781
+ /* @__PURE__ */ t.jsx("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-gray-500", children: "%" })
782
+ ] }),
758
783
  /* @__PURE__ */ t.jsx(
759
- _,
784
+ De,
760
785
  {
761
- ...i,
762
- type: "number",
763
- value: m,
764
- onChange: h,
765
- placeholder: o?.placeholder || "0",
766
- disabled: s || i.disabled,
767
- className: `pr-8 ${l || ""}`,
768
- step: Math.pow(10, -c).toFixed(c),
769
- "aria-invalid": !!n
786
+ value: [h],
787
+ onValueChange: u,
788
+ min: 0,
789
+ max: 100,
790
+ step: x,
791
+ disabled: a || l.disabled,
792
+ className: "w-full",
793
+ "aria-label": "Percentage",
794
+ "data-testid": "percent-slider"
770
795
  }
771
- ),
772
- /* @__PURE__ */ t.jsx("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-gray-500", children: "%" })
796
+ )
773
797
  ] });
774
798
  }
775
- const tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
799
+ const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
776
800
  __proto__: null,
777
- PercentField: Me
801
+ PercentField: Ze
778
802
  }, Symbol.toStringTag, { value: "Module" }));
779
- function Ue({ value: e, onChange: r, field: a, readonly: s, className: n, ...l }) {
780
- const [i, o] = L(!1), c = a || l.schema;
781
- if (s)
803
+ function Ke({ value: e, onChange: r, field: n, readonly: a, className: s, ...i }) {
804
+ const [l, o] = B(!1), c = n || i.schema;
805
+ if (a)
782
806
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "••••••••" });
783
- const { inputType: m, ...h } = l;
807
+ const { inputType: m, ...h } = i;
784
808
  return /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
785
809
  /* @__PURE__ */ t.jsx(
786
- _,
810
+ w,
787
811
  {
788
812
  ...h,
789
- type: i ? "text" : "password",
813
+ type: l ? "text" : "password",
790
814
  value: e || "",
791
- onChange: (x) => r(x.target.value),
815
+ onChange: (f) => r(f.target.value),
792
816
  placeholder: c?.placeholder,
793
- disabled: s || h.disabled,
794
- className: `pr-10 ${n || ""}`
817
+ disabled: a || h.disabled,
818
+ className: `pr-10 ${s || ""}`
795
819
  }
796
820
  ),
797
821
  /* @__PURE__ */ t.jsx(
798
- F,
822
+ P,
799
823
  {
800
824
  type: "button",
801
825
  variant: "ghost",
802
826
  size: "sm",
803
827
  className: "absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",
804
- onClick: () => o(!i),
828
+ onClick: () => o(!l),
805
829
  tabIndex: -1,
806
- children: i ? /* @__PURE__ */ t.jsx(Ot, { className: "size-4 text-gray-500" }) : /* @__PURE__ */ t.jsx(Tt, { className: "size-4 text-gray-500" })
830
+ children: l ? /* @__PURE__ */ t.jsx(zt, { className: "size-4 text-gray-500" }) : /* @__PURE__ */ t.jsx(Et, { className: "size-4 text-gray-500" })
807
831
  }
808
832
  )
809
833
  ] });
810
834
  }
811
- const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
835
+ const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
812
836
  __proto__: null,
813
- PasswordField: Ue
837
+ PasswordField: Ke
814
838
  }, Symbol.toStringTag, { value: "Module" }));
815
- function De({ value: e, onChange: r, field: a, readonly: s, ...n }) {
816
- const l = te(null), i = a || n.schema, o = i?.multiple || !1, c = i?.accept ? i.accept.join(",") : void 0;
817
- if (s) {
818
- if (!e) return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
819
- const d = Array.isArray(e) ? e : [e];
820
- return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: d.map((f, p) => /* @__PURE__ */ t.jsx("span", { className: "text-sm truncate max-w-xs", children: f.name || f.original_name || "File" }, p)) });
821
- }
822
- const m = e ? Array.isArray(e) ? e : [e] : [], h = (d) => {
823
- const f = Array.from(d.target.files || []);
824
- if (f.length === 0) return;
825
- const p = f.map((N) => ({
826
- name: N.name,
827
- original_name: N.name,
828
- size: N.size,
829
- mime_type: N.type,
839
+ function et({ value: e, onChange: r, field: n, readonly: a, ...s }) {
840
+ const i = xe(null), l = n || s.schema, o = l?.multiple || !1, c = l?.accept ? l.accept.join(",") : void 0, m = l?.maxSize, [h, f] = B(!1), [u, x] = B([]), p = e ? Array.isArray(e) ? e : [e] : [], v = te((b) => {
841
+ if (b.length === 0) return;
842
+ const F = [], A = b.filter((O) => {
843
+ if (m && O.size > m) {
844
+ const Y = (m / 1048576).toFixed(1);
845
+ return F.push(`"${O.name}" exceeds max size (${Y} MB)`), !1;
846
+ }
847
+ return !0;
848
+ });
849
+ if (x(F), A.length === 0) return;
850
+ const $ = A.map((O) => ({
851
+ name: O.name,
852
+ original_name: O.name,
853
+ size: O.size,
854
+ mime_type: O.type,
830
855
  // In a real implementation, this would upload the file and return a URL
831
- url: URL.createObjectURL(N)
856
+ url: URL.createObjectURL(O)
832
857
  }));
833
- r(o ? [...m, ...p] : p[0]);
834
- }, x = (d) => {
858
+ r(o ? [...p, ...$] : $[0]);
859
+ }, [p, o, r, m]), R = te((b) => {
860
+ b.preventDefault(), b.stopPropagation(), f(!0);
861
+ }, []), N = te((b) => {
862
+ b.preventDefault(), b.stopPropagation(), f(!1);
863
+ }, []), T = te((b) => {
864
+ b.preventDefault(), b.stopPropagation(), f(!1);
865
+ const F = Array.from(b.dataTransfer.files);
866
+ if (c) {
867
+ const A = c.split(",").map((O) => O.trim().toLowerCase()), $ = F.filter((O) => {
868
+ const Y = O.name.split("."), q = Y.length > 1 ? "." + Y.pop()?.toLowerCase() : "";
869
+ return A.some(
870
+ (V) => V === O.type || q && V === q || V.endsWith("/*") && O.type.startsWith(V.replace("/*", "/"))
871
+ );
872
+ });
873
+ v($);
874
+ } else
875
+ v(F);
876
+ }, [c, v]);
877
+ if (a) {
878
+ if (!e) return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
879
+ const b = Array.isArray(e) ? e : [e];
880
+ return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: b.map((F, A) => /* @__PURE__ */ t.jsx("span", { className: "text-sm truncate max-w-xs", children: F.name || F.original_name || "File" }, A)) });
881
+ }
882
+ const U = (b) => {
883
+ v(Array.from(b.target.files || []));
884
+ }, Q = (b) => {
835
885
  if (o) {
836
- const f = m.filter((p, N) => N !== d);
837
- r(f.length > 0 ? f : null);
886
+ const F = p.filter((A, $) => $ !== b);
887
+ r(F.length > 0 ? F : null);
838
888
  } else
839
889
  r(null);
840
- };
841
- return /* @__PURE__ */ t.jsxs("div", { className: n.className, children: [
890
+ }, K = (b) => (b.mime_type || "").startsWith("image/");
891
+ return /* @__PURE__ */ t.jsxs("div", { className: s.className, children: [
842
892
  /* @__PURE__ */ t.jsx(
843
893
  "input",
844
894
  {
845
- ref: l,
895
+ ref: i,
846
896
  type: "file",
847
897
  multiple: o,
848
898
  accept: c,
849
- onChange: h,
899
+ onChange: U,
850
900
  className: "hidden"
851
901
  }
852
902
  ),
853
903
  /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
854
- m.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "space-y-1", children: m.map((d, f) => /* @__PURE__ */ t.jsxs(
904
+ /* @__PURE__ */ t.jsxs(
855
905
  "div",
856
906
  {
857
- className: "flex items-center justify-between gap-2 p-2 bg-gray-50 rounded-md border border-gray-200",
907
+ onDragOver: R,
908
+ onDragLeave: N,
909
+ onDrop: T,
910
+ onClick: () => i.current?.click(),
911
+ className: `
912
+ flex flex-col items-center justify-center gap-2 p-6
913
+ border-2 border-dashed rounded-lg cursor-pointer
914
+ transition-colors duration-200
915
+ ${h ? "border-primary bg-primary/5 text-primary" : "border-muted-foreground/25 hover:border-primary/50 text-muted-foreground hover:text-foreground"}
916
+ `,
917
+ role: "button",
918
+ tabIndex: 0,
919
+ onKeyDown: (b) => {
920
+ (b.key === "Enter" || b.key === " ") && (b.preventDefault(), i.current?.click());
921
+ },
922
+ children: [
923
+ /* @__PURE__ */ t.jsx(Me, { className: `size-8 ${h ? "text-primary" : "text-muted-foreground"}` }),
924
+ /* @__PURE__ */ t.jsxs("div", { className: "text-center", children: [
925
+ /* @__PURE__ */ t.jsx("p", { className: "text-sm font-medium", children: h ? "Drop files here" : "Drag & drop files here" }),
926
+ /* @__PURE__ */ t.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "or click to browse" })
927
+ ] })
928
+ ]
929
+ }
930
+ ),
931
+ u.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "space-y-0.5", children: u.map((b, F) => /* @__PURE__ */ t.jsx("p", { className: "text-xs text-destructive", children: b }, F)) }),
932
+ p.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "space-y-1", children: p.map((b, F) => /* @__PURE__ */ t.jsxs(
933
+ "div",
934
+ {
935
+ className: "flex items-center justify-between gap-2 p-2 bg-muted/50 rounded-md border",
858
936
  children: [
859
937
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
860
- /* @__PURE__ */ t.jsx(Rt, { className: "size-4 text-gray-500 flex-shrink-0" }),
861
- /* @__PURE__ */ t.jsx("span", { className: "text-sm truncate", children: d.name || d.original_name || "File" }),
862
- d.size && /* @__PURE__ */ t.jsxs("span", { className: "text-xs text-gray-500", children: [
938
+ K(b) && b.url ? /* @__PURE__ */ t.jsx("img", { src: b.url, alt: b.name, className: "size-8 object-cover rounded flex-shrink-0" }) : K(b) ? /* @__PURE__ */ t.jsx(Dt, { className: "size-4 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ t.jsx(Mt, { className: "size-4 text-muted-foreground flex-shrink-0" }),
939
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm truncate", children: b.name || b.original_name || "File" }),
940
+ b.size && /* @__PURE__ */ t.jsxs("span", { className: "text-xs text-muted-foreground", children: [
863
941
  "(",
864
- (d.size / 1024).toFixed(1),
942
+ (b.size / 1024).toFixed(1),
865
943
  " KB)"
866
944
  ] })
867
945
  ] }),
868
946
  /* @__PURE__ */ t.jsx(
869
- F,
947
+ P,
870
948
  {
871
949
  type: "button",
872
950
  variant: "ghost",
873
951
  size: "sm",
874
- onClick: () => x(f),
952
+ onClick: (A) => {
953
+ A.stopPropagation(), Q(F);
954
+ },
875
955
  className: "h-6 w-6 p-0",
876
- children: /* @__PURE__ */ t.jsx(E, { className: "size-3" })
956
+ children: /* @__PURE__ */ t.jsx(W, { className: "size-3" })
877
957
  }
878
958
  )
879
959
  ]
880
960
  },
881
- f
882
- )) }),
883
- /* @__PURE__ */ t.jsxs(
884
- F,
885
- {
886
- type: "button",
887
- variant: "outline",
888
- onClick: () => l.current?.click(),
889
- className: "w-full",
890
- children: [
891
- /* @__PURE__ */ t.jsx(_e, { className: "size-4 mr-2" }),
892
- m.length > 0 ? "Add More Files" : "Upload File"
893
- ]
894
- }
895
- )
961
+ F
962
+ )) })
896
963
  ] })
897
964
  ] });
898
965
  }
899
- const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
966
+ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
900
967
  __proto__: null,
901
- FileField: De
968
+ FileField: et
902
969
  }, Symbol.toStringTag, { value: "Module" }));
903
- function Ie({ value: e, onChange: r, field: a, readonly: s, ...n }) {
904
- const l = te(null), i = a || n.schema, o = i?.multiple || !1, c = i?.accept ? i.accept.join(",") : "image/*";
905
- if (s) {
970
+ function tt({ value: e, onChange: r, field: n, readonly: a, ...s }) {
971
+ const i = xe(null), l = n || s.schema, o = l?.multiple || !1, c = l?.accept ? l.accept.join(",") : "image/*";
972
+ if (a) {
906
973
  if (!e) return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
907
- const d = Array.isArray(e) ? e : [e];
908
- return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: d.map((f, p) => /* @__PURE__ */ t.jsx(
974
+ const u = Array.isArray(e) ? e : [e];
975
+ return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: u.map((x, p) => /* @__PURE__ */ t.jsx(
909
976
  "img",
910
977
  {
911
- src: f.url || "",
912
- alt: f.name || `Image ${p + 1}`,
978
+ src: x.url || "",
979
+ alt: x.name || `Image ${p + 1}`,
913
980
  className: "size-20 rounded-md object-cover border border-gray-200"
914
981
  },
915
982
  p
916
983
  )) });
917
984
  }
918
- const m = e ? Array.isArray(e) ? e : [e] : [], h = (d) => {
919
- const f = Array.from(d.target.files || []);
920
- if (f.length === 0) return;
921
- const p = f.map((N) => ({
922
- name: N.name,
923
- original_name: N.name,
924
- size: N.size,
925
- mime_type: N.type,
985
+ const m = e ? Array.isArray(e) ? e : [e] : [], h = (u) => {
986
+ const x = Array.from(u.target.files || []);
987
+ if (x.length === 0) return;
988
+ const p = x.map((v) => ({
989
+ name: v.name,
990
+ original_name: v.name,
991
+ size: v.size,
992
+ mime_type: v.type,
926
993
  // In a real implementation, this would upload the image and return a URL
927
- url: URL.createObjectURL(N)
994
+ url: URL.createObjectURL(v)
928
995
  }));
929
996
  r(o ? [...m, ...p] : p[0]);
930
- }, x = (d) => {
997
+ }, f = (u) => {
931
998
  if (o) {
932
- const f = m.filter((p, N) => N !== d);
933
- r(f.length > 0 ? f : null);
999
+ const x = m.filter((p, v) => v !== u);
1000
+ r(x.length > 0 ? x : null);
934
1001
  } else
935
1002
  r(null);
936
1003
  };
937
- return /* @__PURE__ */ t.jsxs("div", { className: n.className, children: [
1004
+ return /* @__PURE__ */ t.jsxs("div", { className: s.className, children: [
938
1005
  /* @__PURE__ */ t.jsx(
939
1006
  "input",
940
1007
  {
941
- ref: l,
1008
+ ref: i,
942
1009
  type: "file",
943
1010
  multiple: o,
944
1011
  accept: c,
@@ -947,36 +1014,36 @@ function Ie({ value: e, onChange: r, field: a, readonly: s, ...n }) {
947
1014
  }
948
1015
  ),
949
1016
  /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
950
- m.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "grid grid-cols-4 gap-2", children: m.map((d, f) => /* @__PURE__ */ t.jsxs("div", { className: "relative group", children: [
1017
+ m.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "grid grid-cols-4 gap-2", children: m.map((u, x) => /* @__PURE__ */ t.jsxs("div", { className: "relative group", children: [
951
1018
  /* @__PURE__ */ t.jsx(
952
1019
  "img",
953
1020
  {
954
- src: d.url || "",
955
- alt: d.name || `Image ${f + 1}`,
1021
+ src: u.url || "",
1022
+ alt: u.name || `Image ${x + 1}`,
956
1023
  className: "size-20 rounded-md object-cover border border-gray-200"
957
1024
  }
958
1025
  ),
959
1026
  /* @__PURE__ */ t.jsx(
960
- F,
1027
+ P,
961
1028
  {
962
1029
  type: "button",
963
1030
  variant: "destructive",
964
1031
  size: "sm",
965
- onClick: () => x(f),
1032
+ onClick: () => f(x),
966
1033
  className: "absolute top-1 right-1 h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",
967
- children: /* @__PURE__ */ t.jsx(E, { className: "size-3" })
1034
+ children: /* @__PURE__ */ t.jsx(W, { className: "size-3" })
968
1035
  }
969
1036
  )
970
- ] }, f)) }),
1037
+ ] }, x)) }),
971
1038
  /* @__PURE__ */ t.jsxs(
972
- F,
1039
+ P,
973
1040
  {
974
1041
  type: "button",
975
1042
  variant: "outline",
976
- onClick: () => l.current?.click(),
1043
+ onClick: () => i.current?.click(),
977
1044
  className: "w-full",
978
1045
  children: [
979
- /* @__PURE__ */ t.jsx(kt, { className: "size-4 mr-2" }),
1046
+ /* @__PURE__ */ t.jsx(Lt, { className: "size-4 mr-2" }),
980
1047
  m.length > 0 ? "Add More Images" : "Upload Image"
981
1048
  ]
982
1049
  }
@@ -984,104 +1051,104 @@ function Ie({ value: e, onChange: r, field: a, readonly: s, ...n }) {
984
1051
  ] })
985
1052
  ] });
986
1053
  }
987
- const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1054
+ const dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
988
1055
  __proto__: null,
989
- ImageField: Ie
1056
+ ImageField: tt
990
1057
  }, Symbol.toStringTag, { value: "Module" }));
991
- function Le({ value: e, onChange: r, field: a, readonly: s, ...n }) {
992
- const l = a || n.schema, i = e && typeof e == "object" ? `${e.latitude || 0}, ${e.longitude || 0}` : "";
993
- if (s)
994
- return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: i || "-" });
1058
+ function rt({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1059
+ const i = n || s.schema, l = e && typeof e == "object" ? `${e.latitude || 0}, ${e.longitude || 0}` : "";
1060
+ if (a)
1061
+ return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: l || "-" });
995
1062
  const o = (c) => {
996
1063
  const m = c.target.value;
997
1064
  if (!m.trim()) {
998
1065
  r(null);
999
1066
  return;
1000
1067
  }
1001
- const h = m.split(",").map((x) => x.trim());
1068
+ const h = m.split(",").map((f) => f.trim());
1002
1069
  if (h.length === 2) {
1003
- const x = parseFloat(h[0]), d = parseFloat(h[1]);
1004
- !isNaN(x) && !isNaN(d) && r({ latitude: x, longitude: d });
1070
+ const f = parseFloat(h[0]), u = parseFloat(h[1]);
1071
+ !isNaN(f) && !isNaN(u) && r({ latitude: f, longitude: u });
1005
1072
  }
1006
1073
  };
1007
1074
  return /* @__PURE__ */ t.jsx(
1008
- _,
1075
+ w,
1009
1076
  {
1010
1077
  type: "text",
1011
- value: i,
1078
+ value: l,
1012
1079
  onChange: o,
1013
- placeholder: l?.placeholder || "latitude, longitude",
1014
- disabled: s || n.disabled,
1015
- className: n.className
1080
+ placeholder: i?.placeholder || "latitude, longitude",
1081
+ disabled: a || s.disabled,
1082
+ className: s.className
1016
1083
  }
1017
1084
  );
1018
1085
  }
1019
- const ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1086
+ const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1020
1087
  __proto__: null,
1021
- LocationField: Le
1088
+ LocationField: rt
1022
1089
  }, Symbol.toStringTag, { value: "Module" }));
1023
- function Ve({ value: e, field: r, ...a }) {
1024
- const n = (r || a.schema)?.return_type || "text";
1025
- let l = "-";
1026
- return e != null && (n === "number" || n === "currency" ? l = typeof e == "number" ? e.toFixed(2) : String(e) : n === "boolean" ? l = e ? "Yes" : "No" : n === "date" ? l = new Date(e).toLocaleDateString() : l = String(e)), /* @__PURE__ */ t.jsx("span", { className: `text-sm font-mono text-gray-700 ${a.className || ""}`, children: l });
1090
+ function st({ value: e, field: r, ...n }) {
1091
+ const s = (r || n.schema)?.return_type || "text";
1092
+ let i = "-";
1093
+ return e != null && (s === "number" || s === "currency" ? i = typeof e == "number" ? e.toFixed(2) : String(e) : s === "boolean" ? i = e ? "Yes" : "No" : s === "date" ? i = new Date(e).toLocaleDateString() : i = String(e)), /* @__PURE__ */ t.jsx("span", { className: `text-sm font-mono text-gray-700 ${n.className || ""}`, children: i });
1027
1094
  }
1028
- const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1095
+ const mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1029
1096
  __proto__: null,
1030
- FormulaField: Ve
1097
+ FormulaField: st
1031
1098
  }, Symbol.toStringTag, { value: "Module" }));
1032
- function Be({ value: e, field: r, ...a }) {
1033
- const n = (r || a.schema)?.summary_type || "count";
1034
- let l = "-";
1035
- return e != null && (n === "count" ? l = String(e) : ["sum", "avg", "min", "max"].includes(n) ? l = typeof e == "number" ? e.toFixed(2) : String(e) : l = String(e)), /* @__PURE__ */ t.jsx("span", { className: `text-sm font-medium tabular-nums text-gray-700 ${a.className || ""}`, children: l });
1099
+ function nt({ value: e, field: r, ...n }) {
1100
+ const s = (r || n.schema)?.summary_type || "count";
1101
+ let i = "-";
1102
+ return e != null && (s === "count" ? i = String(e) : ["sum", "avg", "min", "max"].includes(s) ? i = typeof e == "number" ? e.toFixed(2) : String(e) : i = String(e)), /* @__PURE__ */ t.jsx("span", { className: `text-sm font-medium tabular-nums text-gray-700 ${n.className || ""}`, children: i });
1036
1103
  }
1037
- const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1104
+ const fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1038
1105
  __proto__: null,
1039
- SummaryField: Be
1106
+ SummaryField: nt
1040
1107
  }, Symbol.toStringTag, { value: "Module" }));
1041
- function Ye({ value: e, field: r, ...a }) {
1042
- const s = e != null ? String(e) : "-";
1043
- return /* @__PURE__ */ t.jsx("span", { className: `text-sm font-mono text-gray-700 ${a.className || ""}`, children: s });
1108
+ function at({ value: e, field: r, ...n }) {
1109
+ const a = e != null ? String(e) : "-";
1110
+ return /* @__PURE__ */ t.jsx("span", { className: `text-sm font-mono text-gray-700 ${n.className || ""}`, children: a });
1044
1111
  }
1045
- const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1112
+ const xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1046
1113
  __proto__: null,
1047
- AutoNumberField: Ye
1114
+ AutoNumberField: at
1048
1115
  }, Symbol.toStringTag, { value: "Module" }));
1049
- function K({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1050
- const i = (a || n.schema)?.multiple || !1;
1051
- if (s) {
1116
+ function de({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1117
+ const l = (n || s.schema)?.multiple || !1;
1118
+ if (a) {
1052
1119
  if (!e) return /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
1053
1120
  const m = Array.isArray(e) ? e : [e];
1054
1121
  return /* @__PURE__ */ t.jsxs("div", { className: "flex -space-x-2", children: [
1055
- m.slice(0, 3).map((h, x) => {
1056
- const d = h.name || h.username || "User", f = d.split(" ").map((p) => p[0]).join("").toUpperCase().slice(0, 2);
1057
- return /* @__PURE__ */ t.jsx($, { className: "size-8 border-2 border-white", title: d, children: /* @__PURE__ */ t.jsx(z, { className: "bg-blue-500 text-white text-xs", children: f }) }, x);
1122
+ m.slice(0, 3).map((h, f) => {
1123
+ const u = h.name || h.username || "User", x = u.split(" ").map((p) => p[0]).join("").toUpperCase().slice(0, 2);
1124
+ return /* @__PURE__ */ t.jsx(L, { className: "size-8 border-2 border-white", title: u, children: /* @__PURE__ */ t.jsx(I, { className: "bg-blue-500 text-white text-xs", children: x }) }, f);
1058
1125
  }),
1059
- m.length > 3 && /* @__PURE__ */ t.jsx($, { className: "size-8 border-2 border-white", children: /* @__PURE__ */ t.jsxs(z, { className: "bg-gray-200 text-gray-600 text-xs", children: [
1126
+ m.length > 3 && /* @__PURE__ */ t.jsx(L, { className: "size-8 border-2 border-white", children: /* @__PURE__ */ t.jsxs(I, { className: "bg-gray-200 text-gray-600 text-xs", children: [
1060
1127
  "+",
1061
1128
  m.length - 3
1062
1129
  ] }) })
1063
1130
  ] });
1064
1131
  }
1065
1132
  const o = e ? Array.isArray(e) ? e : [e] : [], c = (m) => {
1066
- if (i) {
1067
- const h = o.filter((x, d) => d !== m);
1133
+ if (l) {
1134
+ const h = o.filter((f, u) => u !== m);
1068
1135
  r(h.length > 0 ? h : null);
1069
1136
  } else
1070
1137
  r(null);
1071
1138
  };
1072
- return /* @__PURE__ */ t.jsxs("div", { className: n.className, children: [
1139
+ return /* @__PURE__ */ t.jsxs("div", { className: s.className, children: [
1073
1140
  o.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2 mb-2", children: o.map((m, h) => {
1074
- const x = m.name || m.username || "User", d = x.split(" ").map((f) => f[0]).join("").toUpperCase().slice(0, 2);
1075
- return /* @__PURE__ */ t.jsxs(k, { variant: "outline", className: "gap-2 pr-1", children: [
1076
- /* @__PURE__ */ t.jsx($, { className: "size-5", children: /* @__PURE__ */ t.jsx(z, { className: "bg-blue-500 text-white text-xs", children: d }) }),
1077
- /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: x }),
1141
+ const f = m.name || m.username || "User", u = f.split(" ").map((x) => x[0]).join("").toUpperCase().slice(0, 2);
1142
+ return /* @__PURE__ */ t.jsxs(M, { variant: "outline", className: "gap-2 pr-1", children: [
1143
+ /* @__PURE__ */ t.jsx(L, { className: "size-5", children: /* @__PURE__ */ t.jsx(I, { className: "bg-blue-500 text-white text-xs", children: u }) }),
1144
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: f }),
1078
1145
  /* @__PURE__ */ t.jsx(
1079
1146
  "button",
1080
1147
  {
1081
1148
  type: "button",
1082
1149
  onClick: () => c(h),
1083
1150
  className: "ml-1 rounded-full hover:bg-gray-200 p-0.5",
1084
- children: /* @__PURE__ */ t.jsx(E, { className: "size-3" })
1151
+ children: /* @__PURE__ */ t.jsx(W, { className: "size-3" })
1085
1152
  }
1086
1153
  )
1087
1154
  ] }, h);
@@ -1089,33 +1156,33 @@ function K({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1089
1156
  /* @__PURE__ */ t.jsx("div", { className: "text-sm text-gray-500 italic", children: "User selection component requires integration with user management system" })
1090
1157
  ] });
1091
1158
  }
1092
- const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1159
+ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1093
1160
  __proto__: null,
1094
- UserField: K
1161
+ UserField: de
1095
1162
  }, Symbol.toStringTag, { value: "Module" }));
1096
- function qe({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1097
- const l = a || n.schema, i = () => e == null ? "" : JSON.stringify(e, null, 2), [o, c] = L(i), [m, h] = L(null);
1098
- if (ve(() => {
1163
+ function lt({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1164
+ const i = n || s.schema, l = () => e == null ? "" : JSON.stringify(e, null, 2), [o, c] = B(l), [m, h] = B(null);
1165
+ if (ze(() => {
1099
1166
  try {
1100
1167
  if (e == null) {
1101
1168
  c("");
1102
1169
  return;
1103
1170
  }
1104
- const d = o ? JSON.parse(o) : null;
1105
- JSON.stringify(d) !== JSON.stringify(e) && c(JSON.stringify(e, null, 2));
1171
+ const u = o ? JSON.parse(o) : null;
1172
+ JSON.stringify(u) !== JSON.stringify(e) && c(JSON.stringify(e, null, 2));
1106
1173
  } catch {
1107
1174
  c(JSON.stringify(e, null, 2));
1108
1175
  }
1109
- }, [e, o]), s)
1110
- return e ? /* @__PURE__ */ t.jsx("pre", { className: O("text-xs bg-gray-50 p-2 rounded border border-gray-200 overflow-auto max-h-40", n.className), children: JSON.stringify(e, null, 2) }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
1111
- const x = (d) => {
1112
- const f = d.target.value;
1113
- if (c(f), h(null), !f.trim()) {
1176
+ }, [e, o]), a)
1177
+ return e ? /* @__PURE__ */ t.jsx("pre", { className: z("text-xs bg-gray-50 p-2 rounded border border-gray-200 overflow-auto max-h-40", s.className), children: JSON.stringify(e, null, 2) }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
1178
+ const f = (u) => {
1179
+ const x = u.target.value;
1180
+ if (c(x), h(null), !x.trim()) {
1114
1181
  r(null);
1115
1182
  return;
1116
1183
  }
1117
1184
  try {
1118
- const p = JSON.parse(f);
1185
+ const p = JSON.parse(x);
1119
1186
  r(p);
1120
1187
  } catch {
1121
1188
  h("Invalid JSON");
@@ -1123,81 +1190,81 @@ function qe({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1123
1190
  };
1124
1191
  return /* @__PURE__ */ t.jsxs("div", { className: "space-y-1", children: [
1125
1192
  /* @__PURE__ */ t.jsx(
1126
- V,
1193
+ Z,
1127
1194
  {
1128
1195
  value: o,
1129
- onChange: x,
1130
- placeholder: l?.placeholder || `{
1196
+ onChange: f,
1197
+ placeholder: i?.placeholder || `{
1131
1198
  "key": "value"
1132
1199
  }`,
1133
- disabled: s || n.disabled,
1134
- className: O("font-mono text-xs", m ? "border-red-500 focus-visible:ring-red-500" : "", n.className),
1200
+ disabled: a || s.disabled,
1201
+ className: z("font-mono text-xs", m ? "border-red-500 focus-visible:ring-red-500" : "", s.className),
1135
1202
  rows: 6
1136
1203
  }
1137
1204
  ),
1138
1205
  m && /* @__PURE__ */ t.jsx("p", { className: "text-xs text-red-500", children: m })
1139
1206
  ] });
1140
1207
  }
1141
- const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1208
+ const hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1142
1209
  __proto__: null,
1143
- ObjectField: qe
1210
+ ObjectField: lt
1144
1211
  }, Symbol.toStringTag, { value: "Module" }));
1145
- function Je({ value: e, field: r, ...a }) {
1146
- const n = (r || a.schema)?.dimensions || (Array.isArray(e) ? e.length : 0);
1212
+ function it({ value: e, field: r, ...n }) {
1213
+ const s = (r || n.schema)?.dimensions || (Array.isArray(e) ? e.length : 0);
1147
1214
  if (!e || !Array.isArray(e))
1148
1215
  return /* @__PURE__ */ t.jsx("span", { className: "text-sm text-gray-500", children: "-" });
1149
- const l = e.slice(0, 3).map((i) => {
1150
- const o = Number(i);
1216
+ const i = e.slice(0, 3).map((l) => {
1217
+ const o = Number(l);
1151
1218
  return isNaN(o) ? "0" : o.toFixed(4);
1152
1219
  }).join(", ");
1153
- return /* @__PURE__ */ t.jsxs("div", { className: `text-sm ${a.className || ""}`, children: [
1220
+ return /* @__PURE__ */ t.jsxs("div", { className: `text-sm ${n.className || ""}`, children: [
1154
1221
  /* @__PURE__ */ t.jsxs("span", { className: "font-mono text-gray-700", children: [
1155
1222
  "[",
1156
- l,
1223
+ i,
1157
1224
  "...]"
1158
1225
  ] }),
1159
1226
  /* @__PURE__ */ t.jsxs("span", { className: "text-gray-500 ml-2", children: [
1160
1227
  "(",
1161
- n,
1228
+ s,
1162
1229
  "D)"
1163
1230
  ] })
1164
1231
  ] });
1165
1232
  }
1166
- const dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1233
+ const pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1167
1234
  __proto__: null,
1168
- VectorField: Je
1235
+ VectorField: it
1169
1236
  }, Symbol.toStringTag, { value: "Module" }));
1170
- function Ge({ value: e, field: r, readonly: a, ...s }) {
1171
- const l = (r || s.schema)?.columns || [];
1172
- return !e || !Array.isArray(e) ? /* @__PURE__ */ t.jsx("span", { className: "text-sm text-gray-500", children: "-" }) : a ? /* @__PURE__ */ t.jsx("div", { className: O("text-sm", s.className), children: /* @__PURE__ */ t.jsxs("span", { className: "text-gray-700", children: [
1237
+ function ot({ value: e, field: r, readonly: n, ...a }) {
1238
+ const i = (r || a.schema)?.columns || [];
1239
+ return !e || !Array.isArray(e) ? /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: "-" }) : n ? /* @__PURE__ */ t.jsx("div", { className: z("text-sm", a.className), children: /* @__PURE__ */ t.jsxs("span", { className: "text-foreground", children: [
1173
1240
  e.length,
1174
1241
  " rows"
1175
- ] }) }) : /* @__PURE__ */ t.jsxs("div", { className: O("border border-gray-200 rounded-md overflow-hidden", s.className), children: [
1242
+ ] }) }) : /* @__PURE__ */ t.jsxs("div", { className: z("border border-border rounded-lg overflow-hidden", a.className), children: [
1176
1243
  /* @__PURE__ */ t.jsx("div", { className: "overflow-auto max-h-60", children: /* @__PURE__ */ t.jsxs("table", { className: "w-full text-sm", children: [
1177
- /* @__PURE__ */ t.jsx("thead", { className: "bg-gray-50 border-b border-gray-200", children: /* @__PURE__ */ t.jsx("tr", { children: l.map((i, o) => /* @__PURE__ */ t.jsx(
1244
+ /* @__PURE__ */ t.jsx("thead", { className: "bg-muted border-b border-border", children: /* @__PURE__ */ t.jsx("tr", { children: i.map((l, o) => /* @__PURE__ */ t.jsx(
1178
1245
  "th",
1179
1246
  {
1180
- className: "px-3 py-2 text-left text-xs font-medium text-gray-700",
1181
- children: i.label || i.name
1247
+ className: "px-3 py-2 text-left text-xs font-medium text-muted-foreground",
1248
+ children: l.label || l.name
1182
1249
  },
1183
1250
  o
1184
1251
  )) }) }),
1185
- /* @__PURE__ */ t.jsx("tbody", { className: "divide-y divide-gray-200", children: e.slice(0, 5).map((i, o) => /* @__PURE__ */ t.jsx("tr", { className: "hover:bg-gray-50", children: l.map((c, m) => /* @__PURE__ */ t.jsx("td", { className: "px-3 py-2 text-gray-900", children: i[c.name] != null ? String(i[c.name]) : "-" }, m)) }, o)) })
1252
+ /* @__PURE__ */ t.jsx("tbody", { className: "divide-y divide-border", children: e.slice(0, 5).map((l, o) => /* @__PURE__ */ t.jsx("tr", { className: "hover:bg-muted/50 transition-colors", children: i.map((c, m) => /* @__PURE__ */ t.jsx("td", { className: "px-3 py-2 text-foreground", children: l[c.name] != null ? String(l[c.name]) : "-" }, m)) }, o)) })
1186
1253
  ] }) }),
1187
- e.length > 5 && /* @__PURE__ */ t.jsxs("div", { className: "bg-gray-50 px-3 py-2 text-xs text-gray-500 border-t border-gray-200", children: [
1254
+ e.length > 5 && /* @__PURE__ */ t.jsxs("div", { className: "bg-muted px-3 py-2 text-xs text-muted-foreground border-t border-border", children: [
1188
1255
  "Showing 5 of ",
1189
1256
  e.length,
1190
1257
  " rows"
1191
1258
  ] })
1192
1259
  ] });
1193
1260
  }
1194
- const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1261
+ const gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1195
1262
  __proto__: null,
1196
- GridField: Ge
1263
+ GridField: ot
1197
1264
  }, Symbol.toStringTag, { value: "Module" }));
1198
- function We({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1199
- const l = a || n.schema;
1200
- return s ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1265
+ function ct({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1266
+ const i = n || s.schema;
1267
+ return a ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1201
1268
  /* @__PURE__ */ t.jsx(
1202
1269
  "div",
1203
1270
  {
@@ -1212,90 +1279,90 @@ function We({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1212
1279
  {
1213
1280
  type: "color",
1214
1281
  value: e || "#000000",
1215
- onChange: (i) => r(i.target.value),
1216
- disabled: s || n.disabled,
1282
+ onChange: (l) => r(l.target.value),
1283
+ disabled: a || s.disabled,
1217
1284
  className: "w-10 h-10 rounded border border-input cursor-pointer"
1218
1285
  }
1219
1286
  ),
1220
1287
  /* @__PURE__ */ t.jsx(
1221
- _,
1288
+ w,
1222
1289
  {
1223
1290
  type: "text",
1224
1291
  value: e || "",
1225
- onChange: (i) => r(i.target.value),
1226
- placeholder: l?.placeholder || "#000000",
1227
- disabled: s || n.disabled,
1228
- className: n.className,
1292
+ onChange: (l) => r(l.target.value),
1293
+ placeholder: i?.placeholder || "#000000",
1294
+ disabled: a || s.disabled,
1295
+ className: s.className,
1229
1296
  pattern: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
1230
1297
  }
1231
1298
  )
1232
1299
  ] });
1233
1300
  }
1234
- const mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1301
+ const br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1235
1302
  __proto__: null,
1236
- ColorField: We
1303
+ ColorField: ct
1237
1304
  }, Symbol.toStringTag, { value: "Module" }));
1238
- function Qe({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1239
- const l = a || n.schema, i = l?.min ?? 0, o = l?.max ?? 100, c = l?.step ?? 1;
1240
- return s ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1241
- /* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: e ?? i }),
1305
+ function dt({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1306
+ const i = n || s.schema, l = i?.min ?? 0, o = i?.max ?? 100, c = i?.step ?? 1;
1307
+ return a ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1308
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: e ?? l }),
1242
1309
  /* @__PURE__ */ t.jsxs("span", { className: "text-xs text-muted-foreground", children: [
1243
1310
  "/ ",
1244
1311
  o
1245
1312
  ] })
1246
1313
  ] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-4", children: [
1247
1314
  /* @__PURE__ */ t.jsx(
1248
- Ct,
1315
+ De,
1249
1316
  {
1250
- value: [e ?? i],
1317
+ value: [e ?? l],
1251
1318
  onValueChange: (m) => r(m[0]),
1252
- min: i,
1319
+ min: l,
1253
1320
  max: o,
1254
1321
  step: c,
1255
- disabled: s || n.disabled,
1256
- className: n.className
1322
+ disabled: a || s.disabled,
1323
+ className: s.className
1257
1324
  }
1258
1325
  ),
1259
- /* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium w-12 text-right", children: e ?? i })
1326
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium w-12 text-right", children: e ?? l })
1260
1327
  ] });
1261
1328
  }
1262
- const fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1329
+ const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1263
1330
  __proto__: null,
1264
- SliderField: Qe
1331
+ SliderField: dt
1265
1332
  }, Symbol.toStringTag, { value: "Module" }));
1266
- function Xe({ value: e, onChange: r, field: a, readonly: s, className: n, ...l }) {
1267
- const o = (a || l.schema)?.max ?? 5, c = e ?? 0, [m, h] = P.useState(null), x = m !== null ? m : c;
1268
- return s ? /* @__PURE__ */ t.jsxs("div", { className: O("flex items-center gap-1", n), children: [
1269
- Array.from({ length: o }, (d, f) => /* @__PURE__ */ t.jsx(
1270
- de,
1333
+ function ut({ value: e, onChange: r, field: n, readonly: a, className: s, ...i }) {
1334
+ const o = (n || i.schema)?.max ?? 5, c = e ?? 0, [m, h] = k.useState(null), f = m !== null ? m : c;
1335
+ return a ? /* @__PURE__ */ t.jsxs("div", { className: z("flex items-center gap-1", s), children: [
1336
+ Array.from({ length: o }, (u, x) => /* @__PURE__ */ t.jsx(
1337
+ _e,
1271
1338
  {
1272
- className: `w-5 h-5 ${f < c ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground"}`
1339
+ className: `w-5 h-5 ${x < c ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground"}`
1273
1340
  },
1274
- f
1341
+ x
1275
1342
  )),
1276
1343
  /* @__PURE__ */ t.jsxs("span", { className: "ml-2 text-sm text-muted-foreground", children: [
1277
1344
  c,
1278
1345
  " / ",
1279
1346
  o
1280
1347
  ] })
1281
- ] }) : /* @__PURE__ */ t.jsxs("div", { className: O("flex items-center gap-1", n), children: [
1282
- Array.from({ length: o }, (d, f) => /* @__PURE__ */ t.jsx(
1348
+ ] }) : /* @__PURE__ */ t.jsxs("div", { className: z("flex items-center gap-1", s), children: [
1349
+ Array.from({ length: o }, (u, x) => /* @__PURE__ */ t.jsx(
1283
1350
  "button",
1284
1351
  {
1285
1352
  type: "button",
1286
- onClick: () => r(f + 1),
1287
- onMouseEnter: () => h(f + 1),
1353
+ onClick: () => r(x + 1),
1354
+ onMouseEnter: () => h(x + 1),
1288
1355
  onMouseLeave: () => h(null),
1289
1356
  className: "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 rounded",
1290
- disabled: s || l.disabled,
1357
+ disabled: a || i.disabled,
1291
1358
  children: /* @__PURE__ */ t.jsx(
1292
- de,
1359
+ _e,
1293
1360
  {
1294
- className: `w-5 h-5 transition-colors ${f < x ? "fill-yellow-400 text-yellow-400 hover:fill-yellow-500 hover:text-yellow-500" : "text-muted-foreground hover:text-yellow-400"}`
1361
+ className: `w-5 h-5 transition-colors ${x < f ? "fill-yellow-400 text-yellow-400 hover:fill-yellow-500 hover:text-yellow-500" : "text-muted-foreground hover:text-yellow-400"}`
1295
1362
  }
1296
1363
  )
1297
1364
  },
1298
- f
1365
+ x
1299
1366
  )),
1300
1367
  /* @__PURE__ */ t.jsxs("span", { className: "ml-2 text-sm text-muted-foreground", children: [
1301
1368
  c,
@@ -1304,70 +1371,70 @@ function Xe({ value: e, onChange: r, field: a, readonly: s, className: n, ...l }
1304
1371
  ] })
1305
1372
  ] });
1306
1373
  }
1307
- const xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1374
+ const yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1308
1375
  __proto__: null,
1309
- RatingField: Xe
1376
+ RatingField: ut
1310
1377
  }, Symbol.toStringTag, { value: "Module" }));
1311
- function He({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1312
- const l = a || n.schema, i = l?.language ?? "javascript";
1313
- return s ? /* @__PURE__ */ t.jsx("pre", { className: O("text-sm bg-muted p-2 rounded overflow-x-auto border", n.className), children: /* @__PURE__ */ t.jsx("code", { children: e || "-" }) }) : /* @__PURE__ */ t.jsx(
1314
- V,
1378
+ function mt({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1379
+ const i = n || s.schema, l = i?.language ?? "javascript";
1380
+ return a ? /* @__PURE__ */ t.jsx("pre", { className: z("text-sm bg-muted p-2 rounded overflow-x-auto border", s.className), children: /* @__PURE__ */ t.jsx("code", { children: e || "-" }) }) : /* @__PURE__ */ t.jsx(
1381
+ Z,
1315
1382
  {
1316
1383
  value: e || "",
1317
1384
  onChange: (o) => r(o.target.value),
1318
- placeholder: l?.placeholder || `// Write ${i} code here...`,
1319
- disabled: s || n.disabled,
1320
- className: O("font-mono text-sm", n.className),
1385
+ placeholder: i?.placeholder || `// Write ${l} code here...`,
1386
+ disabled: a || s.disabled,
1387
+ className: z("font-mono text-sm", s.className),
1321
1388
  rows: 12,
1322
1389
  spellCheck: !1
1323
1390
  }
1324
1391
  );
1325
1392
  }
1326
- const hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1393
+ const Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1327
1394
  __proto__: null,
1328
- CodeField: He
1395
+ CodeField: mt
1329
1396
  }, Symbol.toStringTag, { value: "Module" }));
1330
- function Ze({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1331
- const [l, i] = P.useState(!1), o = P.useRef(null), c = a || n.schema, m = (d) => {
1332
- const f = d.target.files?.[0];
1333
- if (!f) return;
1334
- if (!f.type.startsWith("image/")) {
1397
+ function ft({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1398
+ const [i, l] = k.useState(!1), o = k.useRef(null), c = n || s.schema, m = (u) => {
1399
+ const x = u.target.files?.[0];
1400
+ if (!x) return;
1401
+ if (!x.type.startsWith("image/")) {
1335
1402
  console.error("Please select an image file");
1336
1403
  return;
1337
1404
  }
1338
- if (f.size > 5 * 1024 * 1024) {
1405
+ if (x.size > 5 * 1024 * 1024) {
1339
1406
  console.error("File size must be less than 5MB");
1340
1407
  return;
1341
1408
  }
1342
1409
  const p = new FileReader();
1343
1410
  p.onloadend = () => {
1344
1411
  r(p.result);
1345
- }, p.readAsDataURL(f);
1412
+ }, p.readAsDataURL(x);
1346
1413
  }, h = () => {
1347
1414
  r("");
1348
- }, x = () => (c?.defaultName || c?.label || "User").split(" ").map((f) => f[0]).join("").toUpperCase().slice(0, 2);
1349
- return s ? /* @__PURE__ */ t.jsxs($, { className: "w-16 h-16", children: [
1350
- e && /* @__PURE__ */ t.jsx(ce, { src: e, alt: c?.label }),
1351
- /* @__PURE__ */ t.jsx(z, { children: x() })
1415
+ }, f = () => (c?.defaultName || c?.label || "User").split(" ").map((x) => x[0]).join("").toUpperCase().slice(0, 2);
1416
+ return a ? /* @__PURE__ */ t.jsxs(L, { className: "w-16 h-16", children: [
1417
+ e && /* @__PURE__ */ t.jsx(ve, { src: e, alt: c?.label }),
1418
+ /* @__PURE__ */ t.jsx(I, { children: f() })
1352
1419
  ] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-4", children: [
1353
1420
  /* @__PURE__ */ t.jsxs(
1354
1421
  "div",
1355
1422
  {
1356
1423
  className: "relative",
1357
- onMouseEnter: () => i(!0),
1358
- onMouseLeave: () => i(!1),
1424
+ onMouseEnter: () => l(!0),
1425
+ onMouseLeave: () => l(!1),
1359
1426
  children: [
1360
- /* @__PURE__ */ t.jsxs($, { className: "w-16 h-16", children: [
1361
- e && /* @__PURE__ */ t.jsx(ce, { src: e, alt: c?.label }),
1362
- /* @__PURE__ */ t.jsx(z, { children: x() })
1427
+ /* @__PURE__ */ t.jsxs(L, { className: "w-16 h-16", children: [
1428
+ e && /* @__PURE__ */ t.jsx(ve, { src: e, alt: c?.label }),
1429
+ /* @__PURE__ */ t.jsx(I, { children: f() })
1363
1430
  ] }),
1364
- !s && l && e && /* @__PURE__ */ t.jsx(
1431
+ !a && i && e && /* @__PURE__ */ t.jsx(
1365
1432
  "button",
1366
1433
  {
1367
1434
  type: "button",
1368
1435
  onClick: h,
1369
1436
  className: "absolute -top-1 -right-1 bg-destructive text-destructive-foreground rounded-full p-1 hover:bg-destructive/90",
1370
- children: /* @__PURE__ */ t.jsx(E, { className: "w-3 h-3" })
1437
+ children: /* @__PURE__ */ t.jsx(W, { className: "w-3 h-3" })
1371
1438
  }
1372
1439
  )
1373
1440
  ]
@@ -1385,15 +1452,15 @@ function Ze({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1385
1452
  }
1386
1453
  ),
1387
1454
  /* @__PURE__ */ t.jsxs(
1388
- F,
1455
+ P,
1389
1456
  {
1390
1457
  type: "button",
1391
1458
  variant: "outline",
1392
1459
  size: "sm",
1393
1460
  onClick: () => o.current?.click(),
1394
- disabled: s || n.disabled,
1461
+ disabled: a || s.disabled,
1395
1462
  children: [
1396
- /* @__PURE__ */ t.jsx(_e, { className: "w-4 h-4 mr-2" }),
1463
+ /* @__PURE__ */ t.jsx(Me, { className: "w-4 h-4 mr-2" }),
1397
1464
  e ? "Change" : "Upload",
1398
1465
  " Avatar"
1399
1466
  ]
@@ -1403,14 +1470,14 @@ function Ze({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1403
1470
  ] })
1404
1471
  ] });
1405
1472
  }
1406
- const pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1473
+ const vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1407
1474
  __proto__: null,
1408
- AvatarField: Ze
1475
+ AvatarField: ft
1409
1476
  }, Symbol.toStringTag, { value: "Module" }));
1410
- function Ke({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1411
- const l = e || {}, i = (c, m) => {
1477
+ function xt({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1478
+ const i = e || {}, l = (c, m) => {
1412
1479
  r({
1413
- ...l,
1480
+ ...i,
1414
1481
  [c]: m
1415
1482
  });
1416
1483
  }, o = (c) => [
@@ -1419,109 +1486,109 @@ function Ke({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1419
1486
  [c.state, c.zipCode].filter(Boolean).join(" "),
1420
1487
  c.country
1421
1488
  ].filter(Boolean).join(", ") || "-";
1422
- return s ? /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: o(l) }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-3", children: [
1489
+ return a ? /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: o(i) }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-3", children: [
1423
1490
  /* @__PURE__ */ t.jsxs("div", { children: [
1424
- /* @__PURE__ */ t.jsx(R, { htmlFor: "street", className: "text-xs", children: "Street Address" }),
1491
+ /* @__PURE__ */ t.jsx(E, { htmlFor: "street", className: "text-xs", children: "Street Address" }),
1425
1492
  /* @__PURE__ */ t.jsx(
1426
- _,
1493
+ w,
1427
1494
  {
1428
1495
  id: "street",
1429
1496
  type: "text",
1430
- value: l.street || "",
1431
- onChange: (c) => i("street", c.target.value),
1497
+ value: i.street || "",
1498
+ onChange: (c) => l("street", c.target.value),
1432
1499
  placeholder: "123 Main St",
1433
- disabled: s || n.disabled,
1434
- className: n.className
1500
+ disabled: a || s.disabled,
1501
+ className: s.className
1435
1502
  }
1436
1503
  )
1437
1504
  ] }),
1438
1505
  /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
1439
1506
  /* @__PURE__ */ t.jsxs("div", { children: [
1440
- /* @__PURE__ */ t.jsx(R, { htmlFor: "city", className: "text-xs", children: "City" }),
1507
+ /* @__PURE__ */ t.jsx(E, { htmlFor: "city", className: "text-xs", children: "City" }),
1441
1508
  /* @__PURE__ */ t.jsx(
1442
- _,
1509
+ w,
1443
1510
  {
1444
1511
  id: "city",
1445
1512
  type: "text",
1446
- value: l.city || "",
1447
- onChange: (c) => i("city", c.target.value),
1513
+ value: i.city || "",
1514
+ onChange: (c) => l("city", c.target.value),
1448
1515
  placeholder: "San Francisco",
1449
- disabled: s || n.disabled
1516
+ disabled: a || s.disabled
1450
1517
  }
1451
1518
  )
1452
1519
  ] }),
1453
1520
  /* @__PURE__ */ t.jsxs("div", { children: [
1454
- /* @__PURE__ */ t.jsx(R, { htmlFor: "state", className: "text-xs", children: "State / Province" }),
1521
+ /* @__PURE__ */ t.jsx(E, { htmlFor: "state", className: "text-xs", children: "State / Province" }),
1455
1522
  /* @__PURE__ */ t.jsx(
1456
- _,
1523
+ w,
1457
1524
  {
1458
1525
  id: "state",
1459
1526
  type: "text",
1460
- value: l.state || "",
1461
- onChange: (c) => i("state", c.target.value),
1527
+ value: i.state || "",
1528
+ onChange: (c) => l("state", c.target.value),
1462
1529
  placeholder: "CA",
1463
- disabled: s || n.disabled
1530
+ disabled: a || s.disabled
1464
1531
  }
1465
1532
  )
1466
1533
  ] })
1467
1534
  ] }),
1468
1535
  /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
1469
1536
  /* @__PURE__ */ t.jsxs("div", { children: [
1470
- /* @__PURE__ */ t.jsx(R, { htmlFor: "zipCode", className: "text-xs", children: "ZIP / Postal Code" }),
1537
+ /* @__PURE__ */ t.jsx(E, { htmlFor: "zipCode", className: "text-xs", children: "ZIP / Postal Code" }),
1471
1538
  /* @__PURE__ */ t.jsx(
1472
- _,
1539
+ w,
1473
1540
  {
1474
1541
  id: "zipCode",
1475
1542
  type: "text",
1476
- value: l.zipCode || "",
1477
- onChange: (c) => i("zipCode", c.target.value),
1543
+ value: i.zipCode || "",
1544
+ onChange: (c) => l("zipCode", c.target.value),
1478
1545
  placeholder: "94102",
1479
- disabled: s || n.disabled
1546
+ disabled: a || s.disabled
1480
1547
  }
1481
1548
  )
1482
1549
  ] }),
1483
1550
  /* @__PURE__ */ t.jsxs("div", { children: [
1484
- /* @__PURE__ */ t.jsx(R, { htmlFor: "country", className: "text-xs", children: "Country" }),
1551
+ /* @__PURE__ */ t.jsx(E, { htmlFor: "country", className: "text-xs", children: "Country" }),
1485
1552
  /* @__PURE__ */ t.jsx(
1486
- _,
1553
+ w,
1487
1554
  {
1488
1555
  id: "country",
1489
1556
  type: "text",
1490
- value: l.country || "",
1491
- onChange: (c) => i("country", c.target.value),
1557
+ value: i.country || "",
1558
+ onChange: (c) => l("country", c.target.value),
1492
1559
  placeholder: "United States",
1493
- disabled: s || n.disabled
1560
+ disabled: a || s.disabled
1494
1561
  }
1495
1562
  )
1496
1563
  ] })
1497
1564
  ] })
1498
1565
  ] });
1499
1566
  }
1500
- const gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1567
+ const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1501
1568
  __proto__: null,
1502
- AddressField: Ke
1569
+ AddressField: xt
1503
1570
  }, Symbol.toStringTag, { value: "Module" }));
1504
- function et({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1505
- const [l, i] = P.useState(!1), o = e || {}, c = (d, f) => {
1571
+ function ht({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1572
+ const [i, l] = k.useState(!1), o = e || {}, c = (u, x) => {
1506
1573
  r({
1507
1574
  ...o,
1508
- [d]: f ? Number(f) : void 0
1575
+ [u]: x ? Number(x) : void 0
1509
1576
  });
1510
1577
  }, m = () => {
1511
1578
  if (!navigator.geolocation) {
1512
1579
  console.error("Geolocation is not supported by this browser");
1513
1580
  return;
1514
1581
  }
1515
- i(!0), navigator.geolocation.getCurrentPosition(
1516
- (d) => {
1582
+ l(!0), navigator.geolocation.getCurrentPosition(
1583
+ (u) => {
1517
1584
  r({
1518
- latitude: d.coords.latitude,
1519
- longitude: d.coords.longitude,
1520
- accuracy: d.coords.accuracy
1521
- }), i(!1);
1585
+ latitude: u.coords.latitude,
1586
+ longitude: u.coords.longitude,
1587
+ accuracy: u.coords.accuracy
1588
+ }), l(!1);
1522
1589
  },
1523
- (d) => {
1524
- console.error("Error getting location:", d.message), i(!1);
1590
+ (u) => {
1591
+ console.error("Error getting location:", u.message), l(!1);
1525
1592
  },
1526
1593
  {
1527
1594
  enableHighAccuracy: !0,
@@ -1529,21 +1596,21 @@ function et({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1529
1596
  maximumAge: 0
1530
1597
  }
1531
1598
  );
1532
- }, h = (d) => !d.latitude || !d.longitude ? "-" : `${d.latitude.toFixed(6)}, ${d.longitude.toFixed(6)}`, x = () => {
1599
+ }, h = (u) => !u.latitude || !u.longitude ? "-" : `${u.latitude.toFixed(6)}, ${u.longitude.toFixed(6)}`, f = () => {
1533
1600
  if (!o.latitude || !o.longitude) return;
1534
- const d = `https://www.google.com/maps?q=${o.latitude},${o.longitude}`;
1535
- window.open(d, "_blank");
1601
+ const u = `https://www.google.com/maps?q=${o.latitude},${o.longitude}`;
1602
+ window.open(u, "_blank");
1536
1603
  };
1537
- return s ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1538
- /* @__PURE__ */ t.jsx(ue, { className: "w-4 h-4 text-muted-foreground" }),
1604
+ return a ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1605
+ /* @__PURE__ */ t.jsx(we, { className: "w-4 h-4 text-muted-foreground" }),
1539
1606
  /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: h(o) }),
1540
1607
  o.latitude && o.longitude && /* @__PURE__ */ t.jsx(
1541
- F,
1608
+ P,
1542
1609
  {
1543
1610
  type: "button",
1544
1611
  variant: "link",
1545
1612
  size: "sm",
1546
- onClick: x,
1613
+ onClick: f,
1547
1614
  className: "p-0 h-auto",
1548
1615
  children: "View on map"
1549
1616
  }
@@ -1551,28 +1618,28 @@ function et({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1551
1618
  ] }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-3", children: [
1552
1619
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1553
1620
  /* @__PURE__ */ t.jsxs(
1554
- F,
1621
+ P,
1555
1622
  {
1556
1623
  type: "button",
1557
1624
  variant: "outline",
1558
1625
  size: "sm",
1559
1626
  onClick: m,
1560
- disabled: s || l,
1627
+ disabled: a || i,
1561
1628
  children: [
1562
- /* @__PURE__ */ t.jsx(At, { className: "w-4 h-4 mr-2" }),
1563
- l ? "Getting location..." : "Use Current Location"
1629
+ /* @__PURE__ */ t.jsx(It, { className: "w-4 h-4 mr-2" }),
1630
+ i ? "Getting location..." : "Use Current Location"
1564
1631
  ]
1565
1632
  }
1566
1633
  ),
1567
1634
  o.latitude && o.longitude && /* @__PURE__ */ t.jsxs(
1568
- F,
1635
+ P,
1569
1636
  {
1570
1637
  type: "button",
1571
1638
  variant: "link",
1572
1639
  size: "sm",
1573
- onClick: x,
1640
+ onClick: f,
1574
1641
  children: [
1575
- /* @__PURE__ */ t.jsx(ue, { className: "w-4 h-4 mr-2" }),
1642
+ /* @__PURE__ */ t.jsx(we, { className: "w-4 h-4 mr-2" }),
1576
1643
  "View on map"
1577
1644
  ]
1578
1645
  }
@@ -1580,32 +1647,32 @@ function et({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1580
1647
  ] }),
1581
1648
  /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
1582
1649
  /* @__PURE__ */ t.jsxs("div", { children: [
1583
- /* @__PURE__ */ t.jsx(R, { htmlFor: "latitude", className: "text-xs", children: "Latitude" }),
1650
+ /* @__PURE__ */ t.jsx(E, { htmlFor: "latitude", className: "text-xs", children: "Latitude" }),
1584
1651
  /* @__PURE__ */ t.jsx(
1585
- _,
1652
+ w,
1586
1653
  {
1587
1654
  id: "latitude",
1588
1655
  type: "number",
1589
1656
  value: o.latitude ?? "",
1590
- onChange: (d) => c("latitude", d.target.value),
1657
+ onChange: (u) => c("latitude", u.target.value),
1591
1658
  placeholder: "37.7749",
1592
- disabled: s || n.disabled,
1659
+ disabled: a || s.disabled,
1593
1660
  step: "any",
1594
- className: n.className
1661
+ className: s.className
1595
1662
  }
1596
1663
  )
1597
1664
  ] }),
1598
1665
  /* @__PURE__ */ t.jsxs("div", { children: [
1599
- /* @__PURE__ */ t.jsx(R, { htmlFor: "longitude", className: "text-xs", children: "Longitude" }),
1666
+ /* @__PURE__ */ t.jsx(E, { htmlFor: "longitude", className: "text-xs", children: "Longitude" }),
1600
1667
  /* @__PURE__ */ t.jsx(
1601
- _,
1668
+ w,
1602
1669
  {
1603
1670
  id: "longitude",
1604
1671
  type: "number",
1605
1672
  value: o.longitude ?? "",
1606
- onChange: (d) => c("longitude", d.target.value),
1673
+ onChange: (u) => c("longitude", u.target.value),
1607
1674
  placeholder: "-122.4194",
1608
- disabled: s || n.disabled,
1675
+ disabled: a || s.disabled,
1609
1676
  step: "any"
1610
1677
  }
1611
1678
  )
@@ -1618,58 +1685,58 @@ function et({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1618
1685
  ] })
1619
1686
  ] });
1620
1687
  }
1621
- const br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1688
+ const wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1622
1689
  __proto__: null,
1623
- GeolocationField: et
1690
+ GeolocationField: ht
1624
1691
  }, Symbol.toStringTag, { value: "Module" }));
1625
- function tt({ value: e, onChange: r, readonly: a }) {
1626
- const s = te(null), [n, l] = P.useState(!1), [i, o] = P.useState(!e);
1627
- ve(() => {
1628
- if (e && s.current) {
1629
- const f = s.current.getContext("2d");
1630
- if (f) {
1692
+ function pt({ value: e, onChange: r, readonly: n }) {
1693
+ const a = xe(null), [s, i] = k.useState(!1), [l, o] = k.useState(!e);
1694
+ ze(() => {
1695
+ if (e && a.current) {
1696
+ const x = a.current.getContext("2d");
1697
+ if (x) {
1631
1698
  const p = new Image();
1632
1699
  p.onload = () => {
1633
- f.drawImage(p, 0, 0), o(!1);
1700
+ x.drawImage(p, 0, 0), o(!1);
1634
1701
  }, p.src = e;
1635
1702
  }
1636
1703
  }
1637
1704
  }, [e]);
1638
- const c = (d) => {
1639
- if (a) return;
1640
- l(!0), o(!1);
1641
- const f = s.current;
1642
- if (!f) return;
1643
- const p = f.getContext("2d");
1705
+ const c = (u) => {
1706
+ if (n) return;
1707
+ i(!0), o(!1);
1708
+ const x = a.current;
1709
+ if (!x) return;
1710
+ const p = x.getContext("2d");
1644
1711
  if (!p) return;
1645
- const N = f.getBoundingClientRect(), T = "touches" in d ? d.touches[0].clientX - N.left : d.clientX - N.left, y = "touches" in d ? d.touches[0].clientY - N.top : d.clientY - N.top;
1646
- p.beginPath(), p.moveTo(T, y);
1647
- }, m = (d) => {
1648
- if (!n || a) return;
1649
- const f = s.current;
1650
- if (!f) return;
1651
- const p = f.getContext("2d");
1712
+ const v = x.getBoundingClientRect(), R = "touches" in u ? u.touches[0].clientX - v.left : u.clientX - v.left, N = "touches" in u ? u.touches[0].clientY - v.top : u.clientY - v.top;
1713
+ p.beginPath(), p.moveTo(R, N);
1714
+ }, m = (u) => {
1715
+ if (!s || n) return;
1716
+ const x = a.current;
1717
+ if (!x) return;
1718
+ const p = x.getContext("2d");
1652
1719
  if (!p) return;
1653
- const N = f.getBoundingClientRect(), T = "touches" in d ? d.touches[0].clientX - N.left : d.clientX - N.left, y = "touches" in d ? d.touches[0].clientY - N.top : d.clientY - N.top;
1654
- p.lineTo(T, y), p.strokeStyle = "#000", p.lineWidth = 2, p.lineCap = "round", p.lineJoin = "round", p.stroke();
1720
+ const v = x.getBoundingClientRect(), R = "touches" in u ? u.touches[0].clientX - v.left : u.clientX - v.left, N = "touches" in u ? u.touches[0].clientY - v.top : u.clientY - v.top;
1721
+ p.lineTo(R, N), p.strokeStyle = "#000", p.lineWidth = 2, p.lineCap = "round", p.lineJoin = "round", p.stroke();
1655
1722
  }, h = () => {
1656
- if (!n) return;
1657
- l(!1);
1658
- const d = s.current;
1659
- if (!d) return;
1660
- const f = d.toDataURL("image/png");
1661
- r(f);
1662
- }, x = () => {
1663
- const d = s.current;
1664
- if (!d) return;
1665
- const f = d.getContext("2d");
1666
- f && (f.clearRect(0, 0, d.width, d.height), o(!0), r(""));
1723
+ if (!s) return;
1724
+ i(!1);
1725
+ const u = a.current;
1726
+ if (!u) return;
1727
+ const x = u.toDataURL("image/png");
1728
+ r(x);
1729
+ }, f = () => {
1730
+ const u = a.current;
1731
+ if (!u) return;
1732
+ const x = u.getContext("2d");
1733
+ x && (x.clearRect(0, 0, u.width, u.height), o(!0), r(""));
1667
1734
  };
1668
- return a && e ? /* @__PURE__ */ t.jsx("div", { className: "border rounded p-2 bg-white", children: /* @__PURE__ */ t.jsx("img", { src: e, alt: "Signature", loading: "lazy", className: "max-w-full h-auto" }) }) : a && !e ? /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: "No signature" }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
1735
+ return n && e ? /* @__PURE__ */ t.jsx("div", { className: "border rounded p-2 bg-white", children: /* @__PURE__ */ t.jsx("img", { src: e, alt: "Signature", loading: "lazy", className: "max-w-full h-auto" }) }) : n && !e ? /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: "No signature" }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
1669
1736
  /* @__PURE__ */ t.jsx("div", { className: "border rounded bg-white", children: /* @__PURE__ */ t.jsx(
1670
1737
  "canvas",
1671
1738
  {
1672
- ref: s,
1739
+ ref: a,
1673
1740
  width: 400,
1674
1741
  height: 200,
1675
1742
  className: "w-full touch-none cursor-crosshair",
@@ -1683,17 +1750,17 @@ function tt({ value: e, onChange: r, readonly: a }) {
1683
1750
  }
1684
1751
  ) }),
1685
1752
  /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
1686
- /* @__PURE__ */ t.jsx("p", { className: "text-xs text-muted-foreground", children: i ? "Sign above" : "Signature captured" }),
1753
+ /* @__PURE__ */ t.jsx("p", { className: "text-xs text-muted-foreground", children: l ? "Sign above" : "Signature captured" }),
1687
1754
  /* @__PURE__ */ t.jsxs(
1688
- F,
1755
+ P,
1689
1756
  {
1690
1757
  type: "button",
1691
1758
  variant: "outline",
1692
1759
  size: "sm",
1693
- onClick: x,
1694
- disabled: a || i,
1760
+ onClick: f,
1761
+ disabled: n || l,
1695
1762
  children: [
1696
- /* @__PURE__ */ t.jsx($t, { className: "w-4 h-4 mr-2" }),
1763
+ /* @__PURE__ */ t.jsx(Ut, { className: "w-4 h-4 mr-2" }),
1697
1764
  "Clear"
1698
1765
  ]
1699
1766
  }
@@ -1701,26 +1768,26 @@ function tt({ value: e, onChange: r, readonly: a }) {
1701
1768
  ] })
1702
1769
  ] });
1703
1770
  }
1704
- const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1771
+ const Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1705
1772
  __proto__: null,
1706
- SignatureField: tt
1773
+ SignatureField: pt
1707
1774
  }, Symbol.toStringTag, { value: "Module" }));
1708
- function rt({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1709
- const [l, i] = P.useState(!1), o = a || n.schema, c = (h) => `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(h)}`, m = () => {
1775
+ function gt({ value: e, onChange: r, field: n, readonly: a, ...s }) {
1776
+ const [i, l] = k.useState(!1), o = n || s.schema, c = (h) => `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(h)}`, m = () => {
1710
1777
  e && navigator.clipboard.writeText(e);
1711
1778
  };
1712
- return s ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
1779
+ return a ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
1713
1780
  /* @__PURE__ */ t.jsx("span", { className: "text-sm flex-1 truncate", children: e || "-" }),
1714
1781
  e && /* @__PURE__ */ t.jsxs(
1715
- F,
1782
+ P,
1716
1783
  {
1717
1784
  type: "button",
1718
1785
  variant: "outline",
1719
1786
  size: "sm",
1720
- onClick: () => i(!l),
1787
+ onClick: () => l(!i),
1721
1788
  children: [
1722
- /* @__PURE__ */ t.jsx(me, { className: "w-4 h-4 mr-2" }),
1723
- l ? "Hide" : "Show",
1789
+ /* @__PURE__ */ t.jsx(Fe, { className: "w-4 h-4 mr-2" }),
1790
+ i ? "Hide" : "Show",
1724
1791
  " QR"
1725
1792
  ]
1726
1793
  }
@@ -1728,40 +1795,40 @@ function rt({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1728
1795
  ] }) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-3", children: [
1729
1796
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1730
1797
  /* @__PURE__ */ t.jsx(
1731
- _,
1798
+ w,
1732
1799
  {
1733
1800
  type: "text",
1734
1801
  value: e || "",
1735
1802
  onChange: (h) => r(h.target.value),
1736
1803
  placeholder: o?.placeholder || "Enter text for QR code",
1737
- disabled: s || n.disabled,
1738
- className: n.className
1804
+ disabled: a || s.disabled,
1805
+ className: s.className
1739
1806
  }
1740
1807
  ),
1741
1808
  e && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1742
1809
  /* @__PURE__ */ t.jsx(
1743
- F,
1810
+ P,
1744
1811
  {
1745
1812
  type: "button",
1746
1813
  variant: "outline",
1747
1814
  size: "sm",
1748
1815
  onClick: m,
1749
- children: /* @__PURE__ */ t.jsx(zt, { className: "w-4 h-4" })
1816
+ children: /* @__PURE__ */ t.jsx(he, { className: "w-4 h-4" })
1750
1817
  }
1751
1818
  ),
1752
1819
  /* @__PURE__ */ t.jsx(
1753
- F,
1820
+ P,
1754
1821
  {
1755
1822
  type: "button",
1756
1823
  variant: "outline",
1757
1824
  size: "sm",
1758
- onClick: () => i(!l),
1759
- children: /* @__PURE__ */ t.jsx(me, { className: "w-4 h-4" })
1825
+ onClick: () => l(!i),
1826
+ children: /* @__PURE__ */ t.jsx(Fe, { className: "w-4 h-4" })
1760
1827
  }
1761
1828
  )
1762
1829
  ] })
1763
1830
  ] }),
1764
- l && e && /* @__PURE__ */ t.jsx("div", { className: "border rounded p-4 bg-white flex justify-center", children: /* @__PURE__ */ t.jsx(
1831
+ i && e && /* @__PURE__ */ t.jsx("div", { className: "border rounded p-4 bg-white flex justify-center", children: /* @__PURE__ */ t.jsx(
1765
1832
  "img",
1766
1833
  {
1767
1834
  src: c(e),
@@ -1776,105 +1843,105 @@ function rt({ value: e, onChange: r, field: a, readonly: s, ...n }) {
1776
1843
  ] })
1777
1844
  ] });
1778
1845
  }
1779
- const yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1846
+ const Sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1780
1847
  __proto__: null,
1781
- QRCodeField: rt
1848
+ QRCodeField: gt
1782
1849
  }, Symbol.toStringTag, { value: "Module" }));
1783
- function st({
1850
+ function bt({
1784
1851
  value: e,
1785
1852
  onChange: r,
1786
- field: a,
1787
- readonly: s,
1788
- className: n,
1789
- ...l
1853
+ field: n,
1854
+ readonly: a,
1855
+ className: s,
1856
+ ...i
1790
1857
  }) {
1791
- const i = e || [], o = a || l.schema, c = () => {
1792
- const x = {
1858
+ const l = e || [], o = n || i.schema, c = () => {
1859
+ const f = {
1793
1860
  id: `new-${Date.now()}`,
1794
1861
  label: "New Related Record"
1795
1862
  };
1796
- r([...i, x]);
1797
- }, m = (x) => {
1798
- r(i.filter((d) => d.id !== x));
1799
- }, h = (x) => {
1800
- console.log("View detail:", x);
1863
+ r([...l, f]);
1864
+ }, m = (f) => {
1865
+ r(l.filter((u) => u.id !== f));
1866
+ }, h = (f) => {
1867
+ console.log("View detail:", f);
1801
1868
  };
1802
- return s ? /* @__PURE__ */ t.jsxs("div", { className: O("space-y-2", n), children: [
1803
- i.length === 0 ? /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: "No related records" }) : i.map((x) => /* @__PURE__ */ t.jsxs(
1869
+ return a ? /* @__PURE__ */ t.jsxs("div", { className: z("space-y-2", s), children: [
1870
+ l.length === 0 ? /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: "No related records" }) : l.map((f) => /* @__PURE__ */ t.jsxs(
1804
1871
  "div",
1805
1872
  {
1806
1873
  className: "flex items-center justify-between p-2 border rounded hover:bg-muted/50",
1807
1874
  children: [
1808
- /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: x.label }),
1875
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: f.label }),
1809
1876
  /* @__PURE__ */ t.jsx(
1810
- F,
1877
+ P,
1811
1878
  {
1812
1879
  type: "button",
1813
1880
  variant: "ghost",
1814
1881
  size: "sm",
1815
- onClick: () => h(x),
1816
- children: /* @__PURE__ */ t.jsx(fe, { className: "w-4 h-4" })
1882
+ onClick: () => h(f),
1883
+ children: /* @__PURE__ */ t.jsx(Se, { className: "w-4 h-4" })
1817
1884
  }
1818
1885
  )
1819
1886
  ]
1820
1887
  },
1821
- x.id
1888
+ f.id
1822
1889
  )),
1823
1890
  /* @__PURE__ */ t.jsxs("p", { className: "text-xs text-muted-foreground", children: [
1824
- i.length,
1891
+ l.length,
1825
1892
  " ",
1826
- i.length === 1 ? "record" : "records"
1893
+ l.length === 1 ? "record" : "records"
1827
1894
  ] })
1828
- ] }) : /* @__PURE__ */ t.jsxs("div", { className: O("space-y-3", n), children: [
1895
+ ] }) : /* @__PURE__ */ t.jsxs("div", { className: z("space-y-3", s), children: [
1829
1896
  /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
1830
- i.map((x) => /* @__PURE__ */ t.jsxs(
1897
+ l.map((f) => /* @__PURE__ */ t.jsxs(
1831
1898
  "div",
1832
1899
  {
1833
1900
  className: "flex items-center justify-between gap-2 p-2 border rounded hover:bg-muted/50",
1834
1901
  children: [
1835
1902
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2 flex-1", children: [
1836
- /* @__PURE__ */ t.jsx(k, { variant: "outline", children: x.id }),
1837
- /* @__PURE__ */ t.jsx("span", { className: "text-sm flex-1", children: x.label })
1903
+ /* @__PURE__ */ t.jsx(M, { variant: "outline", children: f.id }),
1904
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm flex-1", children: f.label })
1838
1905
  ] }),
1839
1906
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
1840
1907
  /* @__PURE__ */ t.jsx(
1841
- F,
1908
+ P,
1842
1909
  {
1843
1910
  type: "button",
1844
1911
  variant: "ghost",
1845
1912
  size: "sm",
1846
- onClick: () => h(x),
1847
- children: /* @__PURE__ */ t.jsx(fe, { className: "w-4 h-4" })
1913
+ onClick: () => h(f),
1914
+ children: /* @__PURE__ */ t.jsx(Se, { className: "w-4 h-4" })
1848
1915
  }
1849
1916
  ),
1850
1917
  /* @__PURE__ */ t.jsx(
1851
- F,
1918
+ P,
1852
1919
  {
1853
1920
  type: "button",
1854
1921
  variant: "ghost",
1855
1922
  size: "sm",
1856
- onClick: () => m(x.id),
1857
- disabled: l.disabled,
1858
- children: /* @__PURE__ */ t.jsx(E, { className: "w-4 h-4" })
1923
+ onClick: () => m(f.id),
1924
+ disabled: i.disabled,
1925
+ children: /* @__PURE__ */ t.jsx(W, { className: "w-4 h-4" })
1859
1926
  }
1860
1927
  )
1861
1928
  ] })
1862
1929
  ]
1863
1930
  },
1864
- x.id
1931
+ f.id
1865
1932
  )),
1866
- i.length === 0 && /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground text-center py-4 border border-dashed rounded bg-muted/20", children: "No related records" })
1933
+ l.length === 0 && /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground text-center py-4 border border-dashed rounded bg-muted/20", children: "No related records" })
1867
1934
  ] }),
1868
1935
  /* @__PURE__ */ t.jsxs(
1869
- F,
1936
+ P,
1870
1937
  {
1871
1938
  type: "button",
1872
1939
  variant: "outline",
1873
1940
  className: "w-full",
1874
1941
  onClick: c,
1875
- disabled: l.disabled,
1942
+ disabled: i.disabled,
1876
1943
  children: [
1877
- /* @__PURE__ */ t.jsx(Et, { className: "w-4 h-4 mr-2" }),
1944
+ /* @__PURE__ */ t.jsx(Vt, { className: "w-4 h-4 mr-2" }),
1878
1945
  "Add ",
1879
1946
  o?.label || "Record"
1880
1947
  ]
@@ -1882,11 +1949,11 @@ function st({
1882
1949
  )
1883
1950
  ] });
1884
1951
  }
1885
- const Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1952
+ const Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1886
1953
  __proto__: null,
1887
- MasterDetailField: st
1954
+ MasterDetailField: bt
1888
1955
  }, Symbol.toStringTag, { value: "Module" }));
1889
- function vr(e, r = "USD") {
1956
+ function Pr(e, r = "USD") {
1890
1957
  try {
1891
1958
  return new Intl.NumberFormat("en-US", {
1892
1959
  style: "currency",
@@ -1896,22 +1963,56 @@ function vr(e, r = "USD") {
1896
1963
  return `${r} ${e.toFixed(2)}`;
1897
1964
  }
1898
1965
  }
1899
- function _r(e, r = 0) {
1966
+ function Zr(e, r = "USD") {
1967
+ try {
1968
+ return new Intl.NumberFormat("en-US", {
1969
+ style: "currency",
1970
+ currency: r,
1971
+ notation: "compact",
1972
+ maximumFractionDigits: 1
1973
+ }).format(e).replace(/\.0(?=[KMBT])/, "");
1974
+ } catch {
1975
+ return `${r} ${e}`;
1976
+ }
1977
+ }
1978
+ function Tr(e, r = 0) {
1900
1979
  return `${(e > -1 && e < 1 ? e * 100 : e).toFixed(r)}%`;
1901
1980
  }
1902
- function Fr(e, r) {
1981
+ function ue(e) {
1982
+ return e.replace(/[_-]/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
1983
+ }
1984
+ function Or(e) {
1985
+ if (!e) return "-";
1986
+ const r = typeof e == "string" ? new Date(e) : e;
1987
+ if (isNaN(r.getTime())) return "-";
1988
+ const n = /* @__PURE__ */ new Date(), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), i = new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime() - a.getTime(), l = Math.round(i / (1e3 * 60 * 60 * 24));
1989
+ if (l === 0) return "Today";
1990
+ if (l === 1) return "Tomorrow";
1991
+ if (l === -1) return "Yesterday";
1992
+ if (l < -1) {
1993
+ const o = Math.abs(l);
1994
+ return o <= 7 ? `Overdue ${o}d` : me(r);
1995
+ }
1996
+ return l > 1 && l <= 7 ? `In ${l} days` : me(r);
1997
+ }
1998
+ function me(e, r) {
1903
1999
  if (!e) return "-";
1904
- const a = typeof e == "string" ? new Date(e) : e;
1905
- return isNaN(a.getTime()) ? "-" : a.toLocaleDateString("en-US", {
2000
+ const n = typeof e == "string" ? new Date(e) : e;
2001
+ if (isNaN(n.getTime())) return "-";
2002
+ if (r === "short") {
2003
+ const a = n.toLocaleDateString("en-US", { month: "short" }), s = n.getDate(), i = String(n.getFullYear()).slice(-2);
2004
+ return `${a} ${s}, '${i}`;
2005
+ }
2006
+ return r === "relative" ? Or(n) : n.toLocaleDateString(void 0, {
1906
2007
  year: "numeric",
1907
2008
  month: "short",
1908
2009
  day: "numeric"
1909
2010
  });
1910
2011
  }
1911
- function wr(e) {
2012
+ function Kr(e) {
1912
2013
  if (!e) return "-";
1913
2014
  const r = typeof e == "string" ? new Date(e) : e;
1914
- return isNaN(r.getTime()) ? "-" : r.toLocaleDateString("en-US", {
2015
+ return isNaN(r.getTime()) ? "-" : r.toLocaleDateString(void 0, {
1915
2016
  year: "numeric",
1916
2017
  month: "short",
1917
2018
  day: "numeric",
@@ -1919,121 +2020,182 @@ function wr(e) {
1919
2020
  minute: "2-digit"
1920
2021
  });
1921
2022
  }
1922
- function A({ value: e }) {
1923
- return /* @__PURE__ */ t.jsx("span", { className: "truncate", children: e || "-" });
2023
+ function D({ value: e }) {
2024
+ return /* @__PURE__ */ t.jsx("span", { className: "truncate", children: e != null && e !== "" ? String(e) : "-" });
1924
2025
  }
1925
- function Sr({ value: e, field: r }) {
2026
+ function Rr({ value: e, field: r }) {
1926
2027
  if (e == null) return /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "-" });
1927
- const s = r.precision ?? 0, n = typeof e == "number" ? new Intl.NumberFormat("en-US", { minimumFractionDigits: s, maximumFractionDigits: s }).format(e) : e;
1928
- return /* @__PURE__ */ t.jsx("span", { className: "tabular-nums", children: n });
2028
+ const a = r.precision ?? 0, s = typeof e == "number" ? new Intl.NumberFormat("en-US", { minimumFractionDigits: a, maximumFractionDigits: a }).format(e) : e;
2029
+ return /* @__PURE__ */ t.jsx("span", { className: "tabular-nums", children: s });
1929
2030
  }
1930
- function Cr({ value: e, field: r }) {
2031
+ function kr({ value: e, field: r }) {
1931
2032
  if (e == null) return /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "-" });
1932
- const s = r.currency || "USD", n = vr(Number(e), s);
1933
- return /* @__PURE__ */ t.jsx("span", { className: "tabular-nums font-medium whitespace-nowrap", children: n });
2033
+ const a = r.currency || "USD", s = Pr(Number(e), a);
2034
+ return /* @__PURE__ */ t.jsx("span", { className: "tabular-nums font-medium whitespace-nowrap", children: s });
1934
2035
  }
1935
- function Pr({ value: e, field: r }) {
2036
+ const Ar = /progress|completion/;
2037
+ function $r({ value: e, field: r }) {
1936
2038
  if (e == null) return /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "-" });
1937
- const s = r.precision ?? 0, n = Number(e), l = _r(n, s), i = n > -1 && n < 1 ? n * 100 : n, o = Math.max(0, Math.min(100, i));
2039
+ const a = r.precision ?? 0, s = Number(e), i = Ar.test(r?.name?.toLowerCase() || ""), l = i ? s : s > -1 && s < 1 ? s * 100 : s, o = i ? `${s.toFixed(a)}%` : Tr(s, a), c = Math.max(0, Math.min(100, l));
1938
2040
  return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1939
2041
  /* @__PURE__ */ t.jsx(
1940
2042
  "div",
1941
2043
  {
1942
2044
  className: "h-1.5 w-16 rounded-full bg-muted overflow-hidden flex-shrink-0",
1943
2045
  role: "progressbar",
1944
- "aria-valuenow": o,
2046
+ "aria-valuenow": c,
1945
2047
  "aria-valuemin": 0,
1946
2048
  "aria-valuemax": 100,
1947
2049
  children: /* @__PURE__ */ t.jsx(
1948
2050
  "div",
1949
2051
  {
1950
2052
  className: "h-full rounded-full bg-primary transition-all",
1951
- style: { width: `${o}%` }
2053
+ style: { width: `${c}%` }
1952
2054
  }
1953
2055
  )
1954
2056
  }
1955
2057
  ),
1956
- /* @__PURE__ */ t.jsx("span", { className: "tabular-nums whitespace-nowrap", children: l })
2058
+ /* @__PURE__ */ t.jsx("span", { className: "tabular-nums whitespace-nowrap", children: o })
1957
2059
  ] });
1958
2060
  }
1959
- function Or({ value: e }) {
1960
- return /* @__PURE__ */ t.jsx("div", { className: "flex items-center", children: e ? /* @__PURE__ */ t.jsxs(k, { variant: "outline", className: "bg-green-50 text-green-700 border-green-200 gap-1", children: [
1961
- /* @__PURE__ */ t.jsx(Mt, { className: "size-3" }),
1962
- "True"
1963
- ] }) : /* @__PURE__ */ t.jsxs(k, { variant: "outline", className: "bg-gray-50 text-gray-500 border-gray-200 gap-1", children: [
1964
- /* @__PURE__ */ t.jsx(E, { className: "size-3" }),
1965
- "False"
1966
- ] }) });
1967
- }
1968
- function Tr({ value: e, field: r }) {
1969
- const s = Fr(e, r.format);
1970
- return /* @__PURE__ */ t.jsx("span", { className: "tabular-nums", children: s });
2061
+ const zr = /* @__PURE__ */ new Set([
2062
+ "active",
2063
+ "is_active",
2064
+ "enabled",
2065
+ "is_enabled",
2066
+ "verified",
2067
+ "is_verified"
2068
+ ]);
2069
+ function Er({ value: e, field: r }) {
2070
+ if (e == null)
2071
+ return /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/50 text-xs italic flex items-center justify-center", children: "—" });
2072
+ const n = r?.name?.toLowerCase() || "";
2073
+ return n === "completed" || n === "is_completed" || n === "done" || n === "is_done" ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-center", children: e ? /* @__PURE__ */ t.jsx("div", { className: "size-5 rounded-full bg-green-500 flex items-center justify-center", role: "img", "aria-label": "Completed", "data-testid": "completion-indicator", children: /* @__PURE__ */ t.jsx(pe, { className: "size-3 text-white" }) }) : /* @__PURE__ */ t.jsx("div", { className: "size-5 rounded-full border-2 border-muted-foreground/30", role: "img", "aria-label": "Not completed", "data-testid": "completion-indicator" }) }) : zr.has(n) && !e ? /* @__PURE__ */ t.jsxs(M, { variant: "destructive", className: "text-xs", "data-testid": "boolean-warning-badge", children: [
2074
+ r?.label || ue(n),
2075
+ " — Off"
2076
+ ] }) : /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Ee, { checked: !!e, disabled: !0, className: "pointer-events-none" }) });
2077
+ }
2078
+ function Dr({ value: e, field: r }) {
2079
+ if (!e) return /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "-" });
2080
+ const a = r.format || "relative", s = me(e, a), i = typeof e == "string" ? new Date(e) : e, l = i instanceof Date && !isNaN(i.getTime()), o = /* @__PURE__ */ new Date();
2081
+ o.setHours(0, 0, 0, 0);
2082
+ const c = l && i < o, m = l ? i.toISOString() : String(e);
2083
+ return /* @__PURE__ */ t.jsx(
2084
+ "span",
2085
+ {
2086
+ className: `tabular-nums${c ? " text-red-600" : ""}`,
2087
+ title: m,
2088
+ children: s
2089
+ }
2090
+ );
1971
2091
  }
1972
- function Rr({ value: e }) {
1973
- const r = wr(e);
1974
- return /* @__PURE__ */ t.jsx("span", { className: "tabular-nums text-sm", children: r });
2092
+ function Mr({ value: e }) {
2093
+ if (!e) return /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "-" });
2094
+ const r = typeof e == "string" ? new Date(e) : e;
2095
+ if (isNaN(r.getTime())) return /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "-" });
2096
+ const n = r.toLocaleDateString(void 0, {
2097
+ month: "numeric",
2098
+ day: "numeric",
2099
+ year: "numeric"
2100
+ }), a = r.toLocaleTimeString(void 0, {
2101
+ hour: "numeric",
2102
+ minute: "2-digit",
2103
+ hour12: !0
2104
+ }).toLowerCase();
2105
+ return /* @__PURE__ */ t.jsxs("span", { className: "tabular-nums text-sm whitespace-nowrap", children: [
2106
+ /* @__PURE__ */ t.jsx("span", { children: n }),
2107
+ /* @__PURE__ */ t.jsx("span", { className: "ml-2 text-muted-foreground", children: a })
2108
+ ] });
2109
+ }
2110
+ const Lr = {
2111
+ critical: "red",
2112
+ urgent: "red",
2113
+ high: "orange",
2114
+ medium: "yellow",
2115
+ normal: "blue",
2116
+ low: "gray",
2117
+ none: "gray"
2118
+ }, Ir = {
2119
+ gray: "bg-gray-100 text-gray-800 border-gray-300",
2120
+ red: "bg-red-100 text-red-800 border-red-300",
2121
+ orange: "bg-orange-100 text-orange-800 border-orange-300",
2122
+ yellow: "bg-yellow-100 text-yellow-800 border-yellow-300",
2123
+ green: "bg-green-100 text-green-800 border-green-300",
2124
+ blue: "bg-blue-100 text-blue-800 border-blue-300",
2125
+ indigo: "bg-indigo-100 text-indigo-800 border-indigo-300",
2126
+ purple: "bg-purple-100 text-purple-800 border-purple-300",
2127
+ pink: "bg-pink-100 text-pink-800 border-pink-300"
2128
+ };
2129
+ function ke(e, r) {
2130
+ const n = e || (r ? Lr[String(r).toLowerCase()] : void 0);
2131
+ return Ir[n || ""] || "bg-muted text-muted-foreground border-border";
1975
2132
  }
1976
- function q({ value: e, field: r }) {
1977
- const s = r.options || [];
2133
+ function se({ value: e, field: r }) {
2134
+ const a = r.options || [];
1978
2135
  if (!e) return /* @__PURE__ */ t.jsx("span", { children: "-" });
1979
- const n = (c) => {
1980
- const m = {
1981
- gray: "bg-gray-100 text-gray-800 border-gray-300",
1982
- red: "bg-red-100 text-red-800 border-red-300",
1983
- orange: "bg-orange-100 text-orange-800 border-orange-300",
1984
- yellow: "bg-yellow-100 text-yellow-800 border-yellow-300",
1985
- green: "bg-green-100 text-green-800 border-green-300",
1986
- blue: "bg-blue-100 text-blue-800 border-blue-300",
1987
- indigo: "bg-indigo-100 text-indigo-800 border-indigo-300",
1988
- purple: "bg-purple-100 text-purple-800 border-purple-300",
1989
- pink: "bg-pink-100 text-pink-800 border-pink-300"
1990
- };
1991
- return m[c || "blue"] || m.blue;
1992
- };
1993
2136
  if (Array.isArray(e))
1994
- return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: e.map((c, m) => {
1995
- const h = s.find((f) => f.value === c), x = h?.label || c, d = n(h?.color);
2137
+ return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: e.map((o, c) => {
2138
+ const m = a.find((u) => u.value === o), h = m?.label || ue(String(o)), f = ke(m?.color, o);
1996
2139
  return /* @__PURE__ */ t.jsx(
1997
- k,
2140
+ M,
1998
2141
  {
1999
2142
  variant: "outline",
2000
- className: d,
2001
- children: x
2143
+ className: f,
2144
+ children: h
2002
2145
  },
2003
- m
2146
+ c
2004
2147
  );
2005
2148
  }) });
2006
- const l = s.find((c) => c.value === e), i = l?.label || e, o = n(l?.color);
2149
+ const s = a.find((o) => o.value === e), i = s?.label || ue(String(e)), l = ke(s?.color, e);
2007
2150
  return /* @__PURE__ */ t.jsx(
2008
- k,
2151
+ M,
2009
2152
  {
2010
2153
  variant: "outline",
2011
- className: o,
2154
+ className: l,
2012
2155
  children: i
2013
2156
  }
2014
2157
  );
2015
2158
  }
2016
- function kr({ value: e }) {
2017
- return e ? /* @__PURE__ */ t.jsx(
2018
- F,
2019
- {
2020
- variant: "link",
2021
- className: "p-0 h-auto font-normal text-blue-600 hover:text-blue-800",
2022
- asChild: !0,
2023
- children: /* @__PURE__ */ t.jsx(
2024
- "a",
2025
- {
2026
- href: `mailto:${e}`,
2027
- onClick: (r) => r.stopPropagation(),
2028
- children: e
2029
- }
2030
- )
2031
- }
2032
- ) : /* @__PURE__ */ t.jsx("span", { children: "-" });
2159
+ function Ur({ value: e }) {
2160
+ if (!e) return /* @__PURE__ */ t.jsx("span", { children: "-" });
2161
+ const [r, n] = k.useState(!1), a = (s) => {
2162
+ s.stopPropagation(), s.preventDefault(), navigator.clipboard.writeText(String(e)).then(() => {
2163
+ n(!0), setTimeout(() => n(!1), 2e3);
2164
+ }).catch(() => {
2165
+ });
2166
+ };
2167
+ return /* @__PURE__ */ t.jsxs("span", { className: "inline-flex items-center gap-1 group/email", children: [
2168
+ /* @__PURE__ */ t.jsx(
2169
+ P,
2170
+ {
2171
+ variant: "link",
2172
+ className: "p-0 h-auto font-normal text-blue-600 hover:text-blue-800",
2173
+ asChild: !0,
2174
+ children: /* @__PURE__ */ t.jsx(
2175
+ "a",
2176
+ {
2177
+ href: `mailto:${e}`,
2178
+ onClick: (s) => s.stopPropagation(),
2179
+ children: e
2180
+ }
2181
+ )
2182
+ }
2183
+ ),
2184
+ /* @__PURE__ */ t.jsx(
2185
+ "button",
2186
+ {
2187
+ type: "button",
2188
+ className: "opacity-0 group-hover/email:opacity-100 transition-opacity p-0.5 rounded hover:bg-muted",
2189
+ onClick: a,
2190
+ "aria-label": "Copy email",
2191
+ children: r ? /* @__PURE__ */ t.jsx(pe, { className: "h-3 w-3 text-green-600" }) : /* @__PURE__ */ t.jsx(he, { className: "h-3 w-3 text-muted-foreground" })
2192
+ }
2193
+ )
2194
+ ] });
2033
2195
  }
2034
- function Ar({ value: e }) {
2196
+ function Vr({ value: e }) {
2035
2197
  return e ? /* @__PURE__ */ t.jsx(
2036
- F,
2198
+ P,
2037
2199
  {
2038
2200
  variant: "link",
2039
2201
  className: "p-0 h-auto font-normal text-blue-600 hover:text-blue-800",
@@ -2051,40 +2213,62 @@ function Ar({ value: e }) {
2051
2213
  }
2052
2214
  ) : /* @__PURE__ */ t.jsx("span", { children: "-" });
2053
2215
  }
2054
- function $r({ value: e }) {
2055
- return e ? /* @__PURE__ */ t.jsx(
2056
- "a",
2057
- {
2058
- href: `tel:${e}`,
2059
- className: "text-blue-600 hover:text-blue-800",
2060
- onClick: (r) => r.stopPropagation(),
2061
- children: e
2062
- }
2063
- ) : /* @__PURE__ */ t.jsx("span", { children: "-" });
2216
+ function Br({ value: e }) {
2217
+ if (!e) return /* @__PURE__ */ t.jsx("span", { children: "-" });
2218
+ const [r, n] = k.useState(!1), a = (s) => {
2219
+ s.stopPropagation(), s.preventDefault(), navigator.clipboard.writeText(String(e)).then(() => {
2220
+ n(!0), setTimeout(() => n(!1), 2e3);
2221
+ }).catch(() => {
2222
+ });
2223
+ };
2224
+ return /* @__PURE__ */ t.jsxs("span", { className: "inline-flex items-center gap-1 group/phone", children: [
2225
+ /* @__PURE__ */ t.jsxs(
2226
+ "a",
2227
+ {
2228
+ href: `tel:${e}`,
2229
+ className: "inline-flex items-center gap-1 text-blue-600 hover:text-blue-800",
2230
+ onClick: (s) => s.stopPropagation(),
2231
+ children: [
2232
+ /* @__PURE__ */ t.jsx(Bt, { className: "h-3 w-3" }),
2233
+ e
2234
+ ]
2235
+ }
2236
+ ),
2237
+ /* @__PURE__ */ t.jsx(
2238
+ "button",
2239
+ {
2240
+ type: "button",
2241
+ className: "opacity-0 group-hover/phone:opacity-100 transition-opacity p-0.5 rounded hover:bg-muted",
2242
+ onClick: a,
2243
+ "aria-label": "Copy phone number",
2244
+ children: r ? /* @__PURE__ */ t.jsx(pe, { className: "h-3 w-3 text-green-600" }) : /* @__PURE__ */ t.jsx(he, { className: "h-3 w-3 text-muted-foreground" })
2245
+ }
2246
+ )
2247
+ ] });
2064
2248
  }
2065
- function zr({ value: e, field: r }) {
2249
+ function Yr({ value: e, field: r }) {
2066
2250
  if (!e) return /* @__PURE__ */ t.jsx("span", { children: "-" });
2067
2251
  if (r.multiple, Array.isArray(e)) {
2068
- const n = e.length;
2252
+ const s = e.length;
2069
2253
  return /* @__PURE__ */ t.jsxs("span", { className: "text-sm text-gray-600", children: [
2070
- n,
2254
+ s,
2071
2255
  " ",
2072
- n === 1 ? "file" : "files"
2256
+ s === 1 ? "file" : "files"
2073
2257
  ] });
2074
2258
  }
2075
- const s = e.name || e.original_name || "File";
2076
- return /* @__PURE__ */ t.jsx("span", { className: "text-sm truncate", children: s });
2259
+ const a = e.name || e.original_name || "File";
2260
+ return /* @__PURE__ */ t.jsx("span", { className: "text-sm truncate", children: a });
2077
2261
  }
2078
- function Er({ value: e }) {
2262
+ function qr({ value: e }) {
2079
2263
  return e ? Array.isArray(e) ? /* @__PURE__ */ t.jsxs("div", { className: "flex -space-x-2", children: [
2080
- e.slice(0, 3).map((r, a) => /* @__PURE__ */ t.jsx(
2264
+ e.slice(0, 3).map((r, n) => /* @__PURE__ */ t.jsx(
2081
2265
  "img",
2082
2266
  {
2083
2267
  src: r.url || "",
2084
- alt: r.name || `Image ${a + 1}`,
2268
+ alt: r.name || `Image ${n + 1}`,
2085
2269
  className: "size-8 rounded-md border-2 border-white object-cover"
2086
2270
  },
2087
- a
2271
+ n
2088
2272
  )),
2089
2273
  e.length > 3 && /* @__PURE__ */ t.jsxs("div", { className: "size-8 rounded-md border-2 border-white bg-gray-100 flex items-center justify-center text-xs font-medium text-gray-600", children: [
2090
2274
  "+",
@@ -2099,100 +2283,113 @@ function Er({ value: e }) {
2099
2283
  }
2100
2284
  ) : /* @__PURE__ */ t.jsx("span", { children: "-" });
2101
2285
  }
2102
- function nt({ value: e }) {
2103
- if (!e) return /* @__PURE__ */ t.jsx("span", { children: "-" });
2286
+ function ne({ value: e, field: r }) {
2287
+ if (e == null || e === "") return /* @__PURE__ */ t.jsx("span", { children: "-" });
2288
+ const n = r.options || [], a = (s) => {
2289
+ if (n.length > 0) {
2290
+ const i = n.find((l) => String(l.value) === String(s));
2291
+ if (i) return i.label;
2292
+ }
2293
+ return String(s);
2294
+ };
2104
2295
  if (Array.isArray(e))
2105
- return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: e.map((r, a) => {
2106
- const s = r.name || r.label || r._id || String(r);
2107
- return /* @__PURE__ */ t.jsx(
2296
+ return /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-1", children: e.map((s, i) => {
2297
+ let l;
2298
+ return s != null && typeof s == "object" ? l = s.name || s.label || s._id || String(s) : l = a(s), /* @__PURE__ */ t.jsx(
2108
2299
  "span",
2109
2300
  {
2110
2301
  className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",
2111
- children: s
2302
+ children: l
2112
2303
  },
2113
- a
2304
+ i
2114
2305
  );
2115
2306
  }) });
2116
2307
  if (typeof e == "object" && e !== null) {
2117
- const r = e.name || e.label || e._id || "[Object]";
2118
- return /* @__PURE__ */ t.jsx("span", { className: "truncate", children: r });
2308
+ const s = e.name || e.label || e._id || "[Object]";
2309
+ return /* @__PURE__ */ t.jsx("span", { className: "truncate", children: s });
2119
2310
  }
2120
- return /* @__PURE__ */ t.jsx("span", { className: "truncate", children: String(e) });
2311
+ return /* @__PURE__ */ t.jsx("span", { className: "truncate", children: a(e) });
2121
2312
  }
2122
- function je({ value: e }) {
2313
+ function Ae({ value: e }) {
2123
2314
  return /* @__PURE__ */ t.jsx("span", { className: "text-gray-700 font-mono text-sm", children: e != null ? String(e) : "-" });
2124
2315
  }
2125
- function ye({ value: e }) {
2316
+ function ae({ value: e }) {
2126
2317
  if (!e) return /* @__PURE__ */ t.jsx("span", { children: "-" });
2318
+ if (typeof e != "object")
2319
+ return /* @__PURE__ */ t.jsx("span", { className: "truncate", children: String(e) });
2127
2320
  if (Array.isArray(e))
2128
2321
  return /* @__PURE__ */ t.jsxs("div", { className: "flex -space-x-2", children: [
2129
- e.slice(0, 3).map((s, n) => {
2130
- const l = s.name || s.username || "User", i = l.split(" ").map((o) => o[0]).join("").toUpperCase().slice(0, 2);
2322
+ e.slice(0, 3).map((a, s) => {
2323
+ if (typeof a != "object" || a === null)
2324
+ return /* @__PURE__ */ t.jsx("span", { className: "truncate text-sm", children: String(a) }, s);
2325
+ const i = a.name || a.username || "User", l = i.split(" ").map((o) => o[0]).join("").toUpperCase().slice(0, 2);
2131
2326
  return /* @__PURE__ */ t.jsx(
2132
- $,
2327
+ L,
2133
2328
  {
2134
2329
  className: "size-8 border-2 border-white",
2135
- title: l,
2136
- children: /* @__PURE__ */ t.jsx(z, { className: "bg-blue-500 text-white text-xs", children: i })
2330
+ title: i,
2331
+ children: /* @__PURE__ */ t.jsx(I, { className: "bg-blue-500 text-white text-xs", children: l })
2137
2332
  },
2138
- n
2333
+ s
2139
2334
  );
2140
2335
  }),
2141
- e.length > 3 && /* @__PURE__ */ t.jsx($, { className: "size-8 border-2 border-white", children: /* @__PURE__ */ t.jsxs(z, { className: "bg-gray-200 text-gray-600 text-xs", children: [
2336
+ e.length > 3 && /* @__PURE__ */ t.jsx(L, { className: "size-8 border-2 border-white", children: /* @__PURE__ */ t.jsxs(I, { className: "bg-gray-200 text-gray-600 text-xs", children: [
2142
2337
  "+",
2143
2338
  e.length - 3
2144
2339
  ] }) })
2145
2340
  ] });
2146
- const r = e.name || e.username || "User", a = r.split(" ").map((s) => s[0]).join("").toUpperCase().slice(0, 2);
2341
+ const r = e.name || e.username || "User", n = r.split(" ").map((a) => a[0]).join("").toUpperCase().slice(0, 2);
2147
2342
  return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
2148
- /* @__PURE__ */ t.jsx($, { className: "size-8", children: /* @__PURE__ */ t.jsx(z, { className: "bg-blue-500 text-white text-xs", children: a }) }),
2343
+ /* @__PURE__ */ t.jsx(L, { className: "size-8", children: /* @__PURE__ */ t.jsx(I, { className: "bg-blue-500 text-white text-xs", children: n }) }),
2149
2344
  /* @__PURE__ */ t.jsx("span", { className: "truncate", children: r })
2150
2345
  ] });
2151
2346
  }
2152
- const ee = /* @__PURE__ */ new Map();
2153
- function re(e, r) {
2154
- ee.set(e, r);
2155
- }
2156
- function Br(e) {
2157
- return ee.has(e) ? ee.get(e) : {
2158
- text: A,
2159
- textarea: A,
2160
- markdown: A,
2161
- html: A,
2162
- number: Sr,
2163
- currency: Cr,
2164
- percent: Pr,
2165
- boolean: Or,
2166
- date: Tr,
2167
- datetime: Rr,
2168
- time: A,
2169
- select: q,
2170
- lookup: q,
2171
- // Default fallback
2172
- master_detail: q,
2173
- // Default fallback
2174
- email: kr,
2175
- url: Ar,
2176
- phone: $r,
2177
- file: zr,
2178
- image: Er,
2179
- formula: je,
2180
- summary: je,
2181
- auto_number: A,
2182
- user: ye,
2183
- owner: ye,
2347
+ const fe = /* @__PURE__ */ new Map();
2348
+ function G(e, r) {
2349
+ fe.set(e, r);
2350
+ }
2351
+ function es(e) {
2352
+ return fe.has(e) ? fe.get(e) : {
2353
+ text: D,
2354
+ textarea: D,
2355
+ markdown: D,
2356
+ html: D,
2357
+ number: Rr,
2358
+ currency: kr,
2359
+ percent: $r,
2360
+ boolean: Er,
2361
+ date: Dr,
2362
+ datetime: Mr,
2363
+ time: D,
2364
+ select: se,
2365
+ status: se,
2366
+ lookup: ne,
2367
+ master_detail: ne,
2368
+ email: Ur,
2369
+ url: Vr,
2370
+ phone: Br,
2371
+ file: Yr,
2372
+ image: qr,
2373
+ formula: Ae,
2374
+ summary: Ae,
2375
+ auto_number: D,
2376
+ user: ae,
2377
+ owner: ae,
2184
2378
  password: () => /* @__PURE__ */ t.jsx("span", { children: "••••••" }),
2185
- location: A,
2379
+ location: D,
2186
2380
  // Default fallback
2187
2381
  object: () => /* @__PURE__ */ t.jsx("span", { className: "text-gray-500 italic", children: "[Object]" }),
2188
2382
  vector: () => /* @__PURE__ */ t.jsx("span", { className: "text-gray-500 italic", children: "[Vector]" }),
2189
2383
  grid: () => /* @__PURE__ */ t.jsx("span", { className: "text-gray-500 italic", children: "[Grid]" })
2190
- }[e] || A;
2191
- }
2192
- re("lookup", nt);
2193
- re("master_detail", nt);
2194
- re("select", q);
2195
- function Yr(e) {
2384
+ }[e] || D;
2385
+ }
2386
+ G("lookup", ne);
2387
+ G("master_detail", ne);
2388
+ G("select", se);
2389
+ G("status", se);
2390
+ G("user", ae);
2391
+ G("owner", ae);
2392
+ function ts(e) {
2196
2393
  return {
2197
2394
  // Text-based fields
2198
2395
  text: "field:text",
@@ -2232,16 +2429,16 @@ function Yr(e) {
2232
2429
  auto_number: "field:auto_number"
2233
2430
  }[e] || "field:text";
2234
2431
  }
2235
- function qr(e) {
2432
+ function rs(e) {
2236
2433
  if (e < 0 || !Number.isFinite(e) || e === 0)
2237
2434
  return "0 B";
2238
2435
  const r = ["B", "KB", "MB", "GB", "TB"];
2239
- let a = e, s = 0;
2240
- for (; a >= 1024 && s < r.length - 1; )
2241
- a /= 1024, s++;
2242
- return `${a.toFixed(s > 0 ? 1 : 0)} ${r[s]}`;
2436
+ let n = e, a = 0;
2437
+ for (; n >= 1024 && a < r.length - 1; )
2438
+ n /= 1024, a++;
2439
+ return `${n.toFixed(a > 0 ? 1 : 0)} ${r[a]}`;
2243
2440
  }
2244
- function Jr(e) {
2441
+ function ss(e) {
2245
2442
  const r = {};
2246
2443
  return e.required && (r.required = typeof e.required_message == "string" ? e.required_message : `${e.label || e.name} is required`), e.min_length && (r.minLength = {
2247
2444
  value: e.min_length,
@@ -2266,199 +2463,202 @@ function Jr(e) {
2266
2463
  message: "Please enter a valid URL"
2267
2464
  }), e.validate && (r.validate = e.validate), Object.keys(r).length > 0 ? r : void 0;
2268
2465
  }
2269
- function Ne(e, r) {
2466
+ function $e(e, r) {
2270
2467
  if (!e) return !0;
2271
2468
  if (e.field && e.value !== void 0) {
2272
- const a = r[e.field];
2469
+ const n = r[e.field];
2273
2470
  if (e.operator === "=" || e.operator === "==")
2274
- return a === e.value;
2471
+ return n === e.value;
2275
2472
  if (e.operator === "!=")
2276
- return a !== e.value;
2473
+ return n !== e.value;
2277
2474
  if (e.operator === ">")
2278
- return a > e.value;
2475
+ return n > e.value;
2279
2476
  if (e.operator === ">=")
2280
- return a >= e.value;
2477
+ return n >= e.value;
2281
2478
  if (e.operator === "<")
2282
- return a < e.value;
2479
+ return n < e.value;
2283
2480
  if (e.operator === "<=")
2284
- return a <= e.value;
2481
+ return n <= e.value;
2285
2482
  if (e.operator === "in")
2286
- return Array.isArray(e.value) && e.value.includes(a);
2483
+ return Array.isArray(e.value) && e.value.includes(n);
2287
2484
  }
2288
- return e.and && Array.isArray(e.and) ? e.and.every((a) => Ne(a, r)) : e.or && Array.isArray(e.or) ? e.or.some((a) => Ne(a, r)) : !0;
2289
- }
2290
- function j(e) {
2291
- const r = ({ schema: a, className: s, value: n, ...l }) => {
2292
- const [i, o] = P.useState(n ?? a?.value ?? ""), c = {
2293
- name: a?.name || "field",
2294
- label: a?.label,
2295
- type: a?.type,
2296
- placeholder: a?.placeholder,
2297
- required: a?.required,
2298
- readonly: a?.readonly || a?.readOnly,
2299
- help: a?.help,
2300
- description: a?.description,
2301
- defaultValue: a?.defaultValue || a?.value,
2302
- ...a
2303
- }, m = P.useCallback((x) => {
2304
- o(x), l.onChange && l.onChange(x);
2305
- }, [l]), h = a?.readonly || a?.readOnly || !1;
2485
+ return e.and && Array.isArray(e.and) ? e.and.every((n) => $e(n, r)) : e.or && Array.isArray(e.or) ? e.or.some((n) => $e(n, r)) : !0;
2486
+ }
2487
+ function y(e) {
2488
+ const r = ({ schema: n, className: a, value: s, ...i }) => {
2489
+ const [l, o] = k.useState(s ?? n?.value ?? ""), c = {
2490
+ name: n?.name || "field",
2491
+ label: n?.label,
2492
+ type: n?.type,
2493
+ placeholder: n?.placeholder,
2494
+ required: n?.required,
2495
+ readonly: n?.readonly || n?.readOnly,
2496
+ help: n?.help,
2497
+ description: n?.description,
2498
+ defaultValue: n?.defaultValue || n?.value,
2499
+ ...n
2500
+ }, m = k.useCallback((f) => {
2501
+ o(f), i.onChange && i.onChange(f);
2502
+ }, [i]), h = n?.readonly || n?.readOnly || !1;
2306
2503
  return /* @__PURE__ */ t.jsxs(
2307
2504
  "div",
2308
2505
  {
2309
2506
  className: "grid w-full items-center gap-1.5",
2310
- "data-obj-id": a?.id,
2311
- "data-obj-type": a?.type,
2507
+ "data-obj-id": n?.id,
2508
+ "data-obj-type": n?.type,
2312
2509
  children: [
2313
- a?.label && /* @__PURE__ */ t.jsx("label", { htmlFor: a.id, className: a.required ? "after:content-['*'] after:ml-0.5 after:text-red-500" : "", children: a.label }),
2510
+ n?.label && /* @__PURE__ */ t.jsx("label", { htmlFor: n.id, className: n.required ? "after:content-['*'] after:ml-0.5 after:text-red-500" : "", children: n.label }),
2314
2511
  /* @__PURE__ */ t.jsx(
2315
2512
  e,
2316
2513
  {
2317
- value: i,
2514
+ value: l,
2318
2515
  onChange: m,
2319
2516
  field: c,
2320
2517
  readonly: h,
2321
- className: s
2518
+ className: a
2322
2519
  }
2323
2520
  ),
2324
- a?.description && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-gray-500", children: a.description })
2521
+ n?.description && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-gray-500", children: n.description })
2325
2522
  ]
2326
2523
  }
2327
2524
  );
2328
2525
  };
2329
2526
  return r.displayName = `FieldRenderer(${e.displayName || e.name || "Component"})`, r;
2330
2527
  }
2331
- const at = {
2528
+ const jt = {
2332
2529
  // Basic fields
2333
- text: () => Promise.resolve().then(() => Lt).then((e) => ({ default: e.TextField })),
2334
- textarea: () => Promise.resolve().then(() => Ht).then((e) => ({ default: e.TextAreaField })),
2335
- number: () => Promise.resolve().then(() => Vt).then((e) => ({ default: e.NumberField })),
2336
- boolean: () => Promise.resolve().then(() => Bt).then((e) => ({ default: e.BooleanField })),
2337
- select: () => Promise.resolve().then(() => Yt).then((e) => ({ default: e.SelectField })),
2338
- date: () => Promise.resolve().then(() => qt).then((e) => ({ default: e.DateField })),
2339
- datetime: () => Promise.resolve().then(() => Kt).then((e) => ({ default: e.DateTimeField })),
2340
- time: () => Promise.resolve().then(() => er).then((e) => ({ default: e.TimeField })),
2530
+ text: () => Promise.resolve().then(() => Wt).then((e) => ({ default: e.TextField })),
2531
+ textarea: () => Promise.resolve().then(() => sr).then((e) => ({ default: e.TextAreaField })),
2532
+ number: () => Promise.resolve().then(() => Gt).then((e) => ({ default: e.NumberField })),
2533
+ boolean: () => Promise.resolve().then(() => Qt).then((e) => ({ default: e.BooleanField })),
2534
+ select: () => Promise.resolve().then(() => Ht).then((e) => ({ default: e.SelectField })),
2535
+ date: () => Promise.resolve().then(() => Xt).then((e) => ({ default: e.DateField })),
2536
+ datetime: () => Promise.resolve().then(() => ar).then((e) => ({ default: e.DateTimeField })),
2537
+ time: () => Promise.resolve().then(() => lr).then((e) => ({ default: e.TimeField })),
2341
2538
  // Contact fields
2342
- email: () => Promise.resolve().then(() => Jt).then((e) => ({ default: e.EmailField })),
2343
- phone: () => Promise.resolve().then(() => Gt).then((e) => ({ default: e.PhoneField })),
2344
- url: () => Promise.resolve().then(() => Wt).then((e) => ({ default: e.UrlField })),
2539
+ email: () => Promise.resolve().then(() => Zt).then((e) => ({ default: e.EmailField })),
2540
+ phone: () => Promise.resolve().then(() => Kt).then((e) => ({ default: e.PhoneField })),
2541
+ url: () => Promise.resolve().then(() => er).then((e) => ({ default: e.UrlField })),
2345
2542
  // Specialized fields
2346
- currency: () => Promise.resolve().then(() => Xt).then((e) => ({ default: e.CurrencyField })),
2347
- percent: () => Promise.resolve().then(() => tr).then((e) => ({ default: e.PercentField })),
2348
- password: () => Promise.resolve().then(() => rr).then((e) => ({ default: e.PasswordField })),
2349
- markdown: () => Promise.resolve().then(() => ge).then((e) => ({ default: e.RichTextField })),
2350
- html: () => Promise.resolve().then(() => ge).then((e) => ({ default: e.RichTextField })),
2351
- lookup: () => Promise.resolve().then(() => Zt).then((e) => ({ default: e.LookupField })),
2352
- master_detail: () => Promise.resolve().then(() => Nr).then((e) => ({ default: e.MasterDetailField })),
2543
+ currency: () => Promise.resolve().then(() => rr).then((e) => ({ default: e.CurrencyField })),
2544
+ percent: () => Promise.resolve().then(() => ir).then((e) => ({ default: e.PercentField })),
2545
+ password: () => Promise.resolve().then(() => or).then((e) => ({ default: e.PasswordField })),
2546
+ markdown: () => Promise.resolve().then(() => Oe).then((e) => ({ default: e.RichTextField })),
2547
+ html: () => Promise.resolve().then(() => Oe).then((e) => ({ default: e.RichTextField })),
2548
+ lookup: () => Promise.resolve().then(() => nr).then((e) => ({ default: e.LookupField })),
2549
+ master_detail: () => Promise.resolve().then(() => Cr).then((e) => ({ default: e.MasterDetailField })),
2353
2550
  // File fields
2354
- file: () => Promise.resolve().then(() => sr).then((e) => ({ default: e.FileField })),
2355
- image: () => Promise.resolve().then(() => nr).then((e) => ({ default: e.ImageField })),
2551
+ file: () => Promise.resolve().then(() => cr).then((e) => ({ default: e.FileField })),
2552
+ image: () => Promise.resolve().then(() => dr).then((e) => ({ default: e.ImageField })),
2356
2553
  // Location field
2357
- location: () => Promise.resolve().then(() => ar).then((e) => ({ default: e.LocationField })),
2554
+ location: () => Promise.resolve().then(() => ur).then((e) => ({ default: e.LocationField })),
2358
2555
  // Computed/Read-only fields
2359
- formula: () => Promise.resolve().then(() => lr).then((e) => ({ default: e.FormulaField })),
2360
- summary: () => Promise.resolve().then(() => ir).then((e) => ({ default: e.SummaryField })),
2361
- auto_number: () => Promise.resolve().then(() => or).then((e) => ({ default: e.AutoNumberField })),
2556
+ formula: () => Promise.resolve().then(() => mr).then((e) => ({ default: e.FormulaField })),
2557
+ summary: () => Promise.resolve().then(() => fr).then((e) => ({ default: e.SummaryField })),
2558
+ auto_number: () => Promise.resolve().then(() => xr).then((e) => ({ default: e.AutoNumberField })),
2362
2559
  // User fields
2363
- user: () => Promise.resolve().then(() => be).then((e) => ({ default: e.UserField })),
2364
- owner: () => Promise.resolve().then(() => be).then((e) => ({ default: e.UserField })),
2560
+ user: () => Promise.resolve().then(() => Re).then((e) => ({ default: e.UserField })),
2561
+ owner: () => Promise.resolve().then(() => Re).then((e) => ({ default: e.UserField })),
2365
2562
  // Complex data types
2366
- object: () => Promise.resolve().then(() => cr).then((e) => ({ default: e.ObjectField })),
2367
- vector: () => Promise.resolve().then(() => dr).then((e) => ({ default: e.VectorField })),
2368
- grid: () => Promise.resolve().then(() => ur).then((e) => ({ default: e.GridField })),
2563
+ object: () => Promise.resolve().then(() => hr).then((e) => ({ default: e.ObjectField })),
2564
+ vector: () => Promise.resolve().then(() => pr).then((e) => ({ default: e.VectorField })),
2565
+ grid: () => Promise.resolve().then(() => gr).then((e) => ({ default: e.GridField })),
2369
2566
  // Additional field types from @objectstack/spec
2370
- color: () => Promise.resolve().then(() => mr).then((e) => ({ default: e.ColorField })),
2371
- slider: () => Promise.resolve().then(() => fr).then((e) => ({ default: e.SliderField })),
2372
- rating: () => Promise.resolve().then(() => xr).then((e) => ({ default: e.RatingField })),
2373
- code: () => Promise.resolve().then(() => hr).then((e) => ({ default: e.CodeField })),
2374
- avatar: () => Promise.resolve().then(() => pr).then((e) => ({ default: e.AvatarField })),
2375
- address: () => Promise.resolve().then(() => gr).then((e) => ({ default: e.AddressField })),
2376
- geolocation: () => Promise.resolve().then(() => br).then((e) => ({ default: e.GeolocationField })),
2377
- signature: () => Promise.resolve().then(() => jr).then((e) => ({ default: e.SignatureField })),
2378
- qrcode: () => Promise.resolve().then(() => yr).then((e) => ({ default: e.QRCodeField }))
2567
+ color: () => Promise.resolve().then(() => br).then((e) => ({ default: e.ColorField })),
2568
+ slider: () => Promise.resolve().then(() => jr).then((e) => ({ default: e.SliderField })),
2569
+ rating: () => Promise.resolve().then(() => yr).then((e) => ({ default: e.RatingField })),
2570
+ code: () => Promise.resolve().then(() => Nr).then((e) => ({ default: e.CodeField })),
2571
+ avatar: () => Promise.resolve().then(() => vr).then((e) => ({ default: e.AvatarField })),
2572
+ address: () => Promise.resolve().then(() => _r).then((e) => ({ default: e.AddressField })),
2573
+ geolocation: () => Promise.resolve().then(() => wr).then((e) => ({ default: e.GeolocationField })),
2574
+ signature: () => Promise.resolve().then(() => Fr).then((e) => ({ default: e.SignatureField })),
2575
+ qrcode: () => Promise.resolve().then(() => Sr).then((e) => ({ default: e.QRCodeField }))
2379
2576
  };
2380
- function Mr(e) {
2381
- const r = at[e];
2577
+ function Jr(e) {
2578
+ const r = jt[e];
2382
2579
  if (!r) {
2383
2580
  console.warn(`Unknown field type: ${e}`);
2384
2581
  return;
2385
2582
  }
2386
- const a = P.lazy(r);
2387
- g.register(e, a, { namespace: "field" });
2583
+ const n = k.lazy(r);
2584
+ g.register(e, n, { namespace: "field" });
2388
2585
  }
2389
- function Ur() {
2390
- Object.keys(at).forEach((e) => {
2391
- Mr(e);
2586
+ function Wr() {
2587
+ Object.keys(jt).forEach((e) => {
2588
+ Jr(e);
2392
2589
  });
2393
2590
  }
2394
- function Gr() {
2395
- g.register("text", j(Fe), { namespace: "field" }), g.register("textarea", j(Ae), { namespace: "field" }), g.register("number", j(we), { namespace: "field" }), g.register("boolean", j(Se), { namespace: "field" }), g.register("select", j(Ce), { namespace: "field" }), g.register("date", j(Pe), { namespace: "field" }), g.register("datetime", j(ze), { namespace: "field" }), g.register("time", j(Ee), { namespace: "field" }), g.register("email", j(Oe), { namespace: "field" }), g.register("phone", j(Te), { namespace: "field" }), g.register("url", j(Re), { namespace: "field" }), g.register("currency", j(ke), { namespace: "field" }), g.register("percent", j(Me), { namespace: "field" }), g.register("password", j(Ue), { namespace: "field" }), g.register("markdown", j(Z), { namespace: "field" }), g.register("html", j(Z), { namespace: "field" }), g.register("lookup", j($e), { namespace: "field" }), g.register("master_detail", j(st), { namespace: "field" }), g.register("file", j(De), { namespace: "field" }), g.register("image", j(Ie), { namespace: "field" }), g.register("location", j(Le), { namespace: "field" }), g.register("formula", j(Ve), { namespace: "field" }), g.register("summary", j(Be), { namespace: "field" }), g.register("auto_number", j(Ye), { namespace: "field" }), g.register("user", j(K), { namespace: "field" }), g.register("owner", j(K), { namespace: "field" }), g.register("object", j(qe), { namespace: "field" }), g.register("vector", j(Je), { namespace: "field" }), g.register("grid", j(Ge), { namespace: "field" }), g.register("color", j(We), { namespace: "field" }), g.register("slider", j(Qe), { namespace: "field" }), g.register("rating", j(Xe), { namespace: "field" }), g.register("code", j(He), { namespace: "field" }), g.register("avatar", j(Ze), { namespace: "field" }), g.register("address", j(Ke), { namespace: "field" }), g.register("geolocation", j(et), { namespace: "field" }), g.register("signature", j(tt), { namespace: "field" }), g.register("qrcode", j(rt), { namespace: "field" });
2591
+ function ns() {
2592
+ g.register("text", y(Le), { namespace: "field" }), g.register("textarea", y(Ge), { namespace: "field" }), g.register("number", y(Ie), { namespace: "field" }), g.register("boolean", y(Ue), { namespace: "field" }), g.register("select", y(Ve), { namespace: "field" }), g.register("date", y(Be), { namespace: "field" }), g.register("datetime", y(He), { namespace: "field" }), g.register("time", y(Xe), { namespace: "field" }), g.register("email", y(Ye), { namespace: "field" }), g.register("phone", y(qe), { namespace: "field" }), g.register("url", y(Je), { namespace: "field" }), g.register("currency", y(We), { namespace: "field" }), g.register("percent", y(Ze), { namespace: "field" }), g.register("password", y(Ke), { namespace: "field" }), g.register("markdown", y(ce), { namespace: "field" }), g.register("html", y(ce), { namespace: "field" }), g.register("lookup", y(Qe), { namespace: "field" }), g.register("master_detail", y(bt), { namespace: "field" }), g.register("file", y(et), { namespace: "field" }), g.register("image", y(tt), { namespace: "field" }), g.register("location", y(rt), { namespace: "field" }), g.register("formula", y(st), { namespace: "field" }), g.register("summary", y(nt), { namespace: "field" }), g.register("auto_number", y(at), { namespace: "field" }), g.register("user", y(de), { namespace: "field" }), g.register("owner", y(de), { namespace: "field" }), g.register("object", y(lt), { namespace: "field" }), g.register("vector", y(it), { namespace: "field" }), g.register("grid", y(ot), { namespace: "field" }), g.register("color", y(ct), { namespace: "field" }), g.register("slider", y(dt), { namespace: "field" }), g.register("rating", y(ut), { namespace: "field" }), g.register("code", y(mt), { namespace: "field" }), g.register("avatar", y(ft), { namespace: "field" }), g.register("address", y(xt), { namespace: "field" }), g.register("geolocation", y(ht), { namespace: "field" }), g.register("signature", y(pt), { namespace: "field" }), g.register("qrcode", y(gt), { namespace: "field" });
2396
2593
  }
2397
- Ur();
2594
+ Wr();
2398
2595
  export {
2399
- Ke as AddressField,
2400
- Ye as AutoNumberField,
2401
- Ze as AvatarField,
2402
- Or as BooleanCellRenderer,
2403
- Se as BooleanField,
2404
- He as CodeField,
2405
- We as ColorField,
2406
- Cr as CurrencyCellRenderer,
2407
- ke as CurrencyField,
2408
- Tr as DateCellRenderer,
2409
- Pe as DateField,
2410
- Rr as DateTimeCellRenderer,
2411
- ze as DateTimeField,
2412
- kr as EmailCellRenderer,
2413
- Oe as EmailField,
2414
- zr as FileCellRenderer,
2415
- De as FileField,
2416
- je as FormulaCellRenderer,
2417
- Ve as FormulaField,
2418
- et as GeolocationField,
2419
- Ge as GridField,
2420
- Er as ImageCellRenderer,
2421
- Ie as ImageField,
2422
- Le as LocationField,
2423
- nt as LookupCellRenderer,
2424
- $e as LookupField,
2425
- st as MasterDetailField,
2426
- Sr as NumberCellRenderer,
2427
- we as NumberField,
2428
- qe as ObjectField,
2429
- Ue as PasswordField,
2430
- Pr as PercentCellRenderer,
2431
- Me as PercentField,
2432
- $r as PhoneCellRenderer,
2433
- Te as PhoneField,
2434
- rt as QRCodeField,
2435
- Xe as RatingField,
2436
- Z as RichTextField,
2437
- q as SelectCellRenderer,
2438
- Ce as SelectField,
2439
- tt as SignatureField,
2440
- Qe as SliderField,
2441
- Be as SummaryField,
2442
- Ae as TextAreaField,
2443
- A as TextCellRenderer,
2444
- Fe as TextField,
2445
- Ee as TimeField,
2446
- Ar as UrlCellRenderer,
2447
- Re as UrlField,
2448
- ye as UserCellRenderer,
2449
- K as UserField,
2450
- Je as VectorField,
2451
- Jr as buildValidationRules,
2452
- Ne as evaluateCondition,
2453
- vr as formatCurrency,
2454
- Fr as formatDate,
2455
- wr as formatDateTime,
2456
- qr as formatFileSize,
2457
- _r as formatPercent,
2458
- Br as getCellRenderer,
2459
- Yr as mapFieldTypeToFormType,
2460
- Ur as registerAllFields,
2461
- Mr as registerField,
2462
- re as registerFieldRenderer,
2463
- Gr as registerFields
2596
+ xt as AddressField,
2597
+ at as AutoNumberField,
2598
+ ft as AvatarField,
2599
+ Er as BooleanCellRenderer,
2600
+ Ue as BooleanField,
2601
+ mt as CodeField,
2602
+ ct as ColorField,
2603
+ kr as CurrencyCellRenderer,
2604
+ We as CurrencyField,
2605
+ Dr as DateCellRenderer,
2606
+ Be as DateField,
2607
+ Mr as DateTimeCellRenderer,
2608
+ He as DateTimeField,
2609
+ Ur as EmailCellRenderer,
2610
+ Ye as EmailField,
2611
+ Yr as FileCellRenderer,
2612
+ et as FileField,
2613
+ Ae as FormulaCellRenderer,
2614
+ st as FormulaField,
2615
+ ht as GeolocationField,
2616
+ ot as GridField,
2617
+ qr as ImageCellRenderer,
2618
+ tt as ImageField,
2619
+ rt as LocationField,
2620
+ ne as LookupCellRenderer,
2621
+ Qe as LookupField,
2622
+ bt as MasterDetailField,
2623
+ Rr as NumberCellRenderer,
2624
+ Ie as NumberField,
2625
+ lt as ObjectField,
2626
+ Ke as PasswordField,
2627
+ $r as PercentCellRenderer,
2628
+ Ze as PercentField,
2629
+ Br as PhoneCellRenderer,
2630
+ qe as PhoneField,
2631
+ gt as QRCodeField,
2632
+ ut as RatingField,
2633
+ ce as RichTextField,
2634
+ se as SelectCellRenderer,
2635
+ Ve as SelectField,
2636
+ pt as SignatureField,
2637
+ dt as SliderField,
2638
+ nt as SummaryField,
2639
+ Ge as TextAreaField,
2640
+ D as TextCellRenderer,
2641
+ Le as TextField,
2642
+ Xe as TimeField,
2643
+ Vr as UrlCellRenderer,
2644
+ Je as UrlField,
2645
+ ae as UserCellRenderer,
2646
+ de as UserField,
2647
+ it as VectorField,
2648
+ ss as buildValidationRules,
2649
+ $e as evaluateCondition,
2650
+ Zr as formatCompactCurrency,
2651
+ Pr as formatCurrency,
2652
+ me as formatDate,
2653
+ Kr as formatDateTime,
2654
+ rs as formatFileSize,
2655
+ Tr as formatPercent,
2656
+ Or as formatRelativeDate,
2657
+ es as getCellRenderer,
2658
+ ue as humanizeLabel,
2659
+ ts as mapFieldTypeToFormType,
2660
+ Wr as registerAllFields,
2661
+ Jr as registerField,
2662
+ G as registerFieldRenderer,
2663
+ ns as registerFields
2464
2664
  };