@levo-so/studio 0.3.16 → 0.3.17
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/{BillingStep-CF4WmMy-.js → BillingStep-CG2IunE8.js} +1 -1
- package/{Button-CMauKkZy.js → Button-D7XP602F.js} +1 -1
- package/{EntryCard-B7-xczol.js → EntryCard-DNTcImS3.js} +1 -1
- package/{LoginCard-e65CC9-H.js → LoginCard-BU32SHk6.js} +1 -1
- package/{PendingApprovalCard-BF6O2-qq.js → PendingApprovalCard-ms57AZba.js} +1 -1
- package/{PopupBody-BI-MJqmd-DxjS3iTT.js → PopupBody-BI-MJqmd-Ctaw71BK.js} +1 -1
- package/{PopupRenderer-D66Gx63H-BMiAwwVA.js → PopupRenderer-D66Gx63H-DDb2kf_-.js} +1 -1
- package/{ProfileCard-BOWVeBAk.js → ProfileCard-BZvtFlIF.js} +1 -1
- package/{bookingCard-B71nDko3.js → bookingCard-B2xt1njL.js} +2 -2
- package/collection.js +1 -1
- package/{dist-t-Nm_OLw.js → dist-E86OopnH.js} +995 -995
- package/index.js +5 -5
- package/package.json +4 -4
|
@@ -11,40 +11,40 @@ import { n as w, t as T } from "./inlineCollectionTheme-uhBXoF1F.js";
|
|
|
11
11
|
import { c as E } from "react/compiler-runtime";
|
|
12
12
|
import { errorHandler as D, errorToast as O, successToast as k, useLevo as A } from "@levo-so/react";
|
|
13
13
|
import * as j from "react";
|
|
14
|
-
import M, { Suspense as N, createContext as P, lazy as F, useCallback as I,
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { FieldInterfaces as
|
|
14
|
+
import M, { Suspense as N, createContext as P, lazy as F, useCallback as I, useDeferredValue as L, useEffect as R, useMemo as z, useRef as B, useState as V } from "react";
|
|
15
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
16
|
+
import { FieldInterfaces as G, LevoError as K, MediaKindList as q, defaultByKinds as J, getLevoError as Y, mediaMimetypeByKind as X, operatorsByKind as ee } from "@levo-so/core";
|
|
17
17
|
import Z from "clsx";
|
|
18
|
-
import
|
|
19
|
-
import { createRuntimeFn as
|
|
20
|
-
import { FormProvider as
|
|
18
|
+
import te from "dayjs";
|
|
19
|
+
import { createRuntimeFn as ne } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
20
|
+
import { FormProvider as re, get as ie, useController as Q, useFieldArray as ae, useForm as oe, useFormContext as se, useWatch as ce } from "react-hook-form";
|
|
21
21
|
import "@theinternetfolks/snowflake";
|
|
22
22
|
import "react-phone-number-input";
|
|
23
23
|
import "yup";
|
|
24
|
-
import { Tabs as
|
|
25
|
-
import { IconArrowLeft as
|
|
26
|
-
import { Checkbox as
|
|
27
|
-
import { NumericFormat as
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { Radio as
|
|
31
|
-
import { RadioGroup as
|
|
32
|
-
import { Switch as
|
|
33
|
-
import { useDropzone as
|
|
34
|
-
import { useDebouncedCallback as
|
|
24
|
+
import { Tabs as le } from "@base-ui/react/tabs";
|
|
25
|
+
import { IconArrowLeft as ue, IconCheck as de, IconChevronLeft as fe, IconChevronRight as pe, IconChevronsLeft as me, IconChevronsRight as he, IconFile as ge, IconHash as _e, IconMail as ve, IconPencil as ye, IconPlus as be, IconTrash as xe, IconUpload as Se, IconX as Ce } from "@tabler/icons-react";
|
|
26
|
+
import { Checkbox as we } from "@base-ui/react/checkbox";
|
|
27
|
+
import { NumericFormat as Te } from "react-number-format";
|
|
28
|
+
import Ee from "react-select";
|
|
29
|
+
import De from "react-select/async";
|
|
30
|
+
import { Radio as Oe } from "@base-ui/react/radio";
|
|
31
|
+
import { RadioGroup as ke } from "@base-ui/react/radio-group";
|
|
32
|
+
import { Switch as Ae } from "@base-ui/react/switch";
|
|
33
|
+
import { useDropzone as je } from "react-dropzone";
|
|
34
|
+
import { useDebouncedCallback as Me } from "use-debounce";
|
|
35
35
|
//#region \0rolldown/runtime.js
|
|
36
|
-
var
|
|
36
|
+
var Ne = Object.defineProperty, Pe = (e, t) => {
|
|
37
37
|
let n = {};
|
|
38
|
-
for (var r in e)
|
|
38
|
+
for (var r in e) Ne(n, r, {
|
|
39
39
|
get: e[r],
|
|
40
40
|
enumerable: !0
|
|
41
41
|
});
|
|
42
|
-
return t ||
|
|
43
|
-
},
|
|
42
|
+
return t || Ne(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
43
|
+
}, Fe = (e) => e.combinator !== void 0, Ie = (e) => e == null ? !0 : typeof e == "string" ? e === "" : Array.isArray(e) ? e.length === 0 : !1, Le = (e, t) => {
|
|
44
44
|
if (t == null) return t;
|
|
45
45
|
if (e === "date") {
|
|
46
46
|
if (t instanceof Date || typeof t == "string" || typeof t == "number") {
|
|
47
|
-
let e =
|
|
47
|
+
let e = te(t);
|
|
48
48
|
if (e.isValid()) return e.valueOf();
|
|
49
49
|
}
|
|
50
50
|
return NaN;
|
|
@@ -58,42 +58,42 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
58
58
|
return NaN;
|
|
59
59
|
}
|
|
60
60
|
return t;
|
|
61
|
-
},
|
|
62
|
-
if (
|
|
61
|
+
}, Re = (e, t) => e === "collection" && t && typeof t == "object" && !Array.isArray(t) && "_id" in t ? t._id : t, ze = (e, t, n) => Le(e, Re(e, t)) === Le(e, Re(e, n)), Be = (e, t) => e ? ee[e]?.includes(t) ?? !1 : !1, Ve = (e, t) => {
|
|
62
|
+
if (Fe(e)) {
|
|
63
63
|
e.conditions.forEach((e) => {
|
|
64
|
-
|
|
64
|
+
Ve(e, t);
|
|
65
65
|
});
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
t.add(e.source);
|
|
69
|
-
},
|
|
70
|
-
let { fieldByKey: n } =
|
|
71
|
-
for (let e of
|
|
69
|
+
}, He = (e, t) => {
|
|
70
|
+
let { fieldByKey: n } = Xe(e), r = {};
|
|
71
|
+
for (let e of Ze(t)) {
|
|
72
72
|
let t = n.get(e);
|
|
73
73
|
t && (r[e] = t.kind);
|
|
74
74
|
}
|
|
75
75
|
return r;
|
|
76
|
-
},
|
|
77
|
-
if (
|
|
76
|
+
}, Ue = (e, t) => Fe(e) ? e.conditions.some((e) => Ue(e, t)) : t[e.source] === void 0, We = (e, t) => {
|
|
77
|
+
if (Fe(e)) {
|
|
78
78
|
for (let n of e.conditions) {
|
|
79
|
-
let e =
|
|
79
|
+
let e = We(n, t);
|
|
80
80
|
if (e) return e;
|
|
81
81
|
}
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
|
-
return
|
|
85
|
-
},
|
|
84
|
+
return Be(t[e.source], e.operator) ? null : e;
|
|
85
|
+
}, Ge = (e, t, n) => {
|
|
86
86
|
let r = n[e.source], i = t[e.source];
|
|
87
87
|
switch (e.operator) {
|
|
88
|
-
case "is_empty": return
|
|
89
|
-
case "is_not_empty": return !
|
|
90
|
-
case "equals": return
|
|
91
|
-
case "not": return !
|
|
88
|
+
case "is_empty": return Ie(i);
|
|
89
|
+
case "is_not_empty": return !Ie(i);
|
|
90
|
+
case "equals": return ze(r, i, e.value);
|
|
91
|
+
case "not": return !ze(r, i, e.value);
|
|
92
92
|
case "gt":
|
|
93
93
|
case "gte":
|
|
94
94
|
case "lt":
|
|
95
95
|
case "lte": {
|
|
96
|
-
let t =
|
|
96
|
+
let t = Le(r, i), n = Le(r, e.value);
|
|
97
97
|
if (typeof t != "number" || typeof n != "number" || Number.isNaN(t) || Number.isNaN(n)) return !1;
|
|
98
98
|
switch (e.operator) {
|
|
99
99
|
case "gt": return t > n;
|
|
@@ -107,7 +107,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
107
107
|
case "not_contains":
|
|
108
108
|
if (r === "array-string" || r === "array-number" || r === "collection") {
|
|
109
109
|
if (!Array.isArray(i)) return e.operator === "not_contains";
|
|
110
|
-
let t = i.some((t) =>
|
|
110
|
+
let t = i.some((t) => ze(r, t, e.value));
|
|
111
111
|
return e.operator === "contains" ? t : !t;
|
|
112
112
|
}
|
|
113
113
|
if (typeof i == "string" && typeof e.value == "string") {
|
|
@@ -128,36 +128,36 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
128
128
|
default: return !1;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
},
|
|
131
|
+
}, Ke = (e, t, n) => Fe(e) ? e.conditions.length === 0 ? !1 : e.combinator === "AND" ? e.conditions.every((e) => Ke(e, t, n)) : e.conditions.some((e) => Ke(e, t, n)) : Ge(e, t, n), qe = ({ logic: e, formValues: t, sourceKinds: n }) => {
|
|
132
132
|
if (!e?.length) return { visible: !0 };
|
|
133
133
|
let r = !e.some((e) => e.action === "show");
|
|
134
|
-
for (let { action: r, when: i } of e) if (r && !
|
|
134
|
+
for (let { action: r, when: i } of e) if (r && !Ue(i, n) && !We(i, n) && Ke(i, t, n)) return { visible: r === "show" };
|
|
135
135
|
return { visible: r };
|
|
136
|
-
},
|
|
136
|
+
}, Je = () => ({
|
|
137
137
|
active: /* @__PURE__ */ new Set(),
|
|
138
138
|
memo: /* @__PURE__ */ new Map(),
|
|
139
139
|
hitCycle: !1
|
|
140
|
-
}),
|
|
141
|
-
let t =
|
|
140
|
+
}), Ye = /* @__PURE__ */ new WeakMap(), Xe = (e) => {
|
|
141
|
+
let t = Ye.get(e);
|
|
142
142
|
if (t) return t;
|
|
143
143
|
let n = {
|
|
144
144
|
fieldByKey: /* @__PURE__ */ new Map(),
|
|
145
145
|
sectionOfField: /* @__PURE__ */ new Map()
|
|
146
146
|
};
|
|
147
147
|
for (let t of e.sections ?? []) for (let e of t.fields ?? []) n.fieldByKey.set(e.key, e), n.sectionOfField.set(e.key, t);
|
|
148
|
-
return
|
|
149
|
-
},
|
|
148
|
+
return Ye.set(e, n), n;
|
|
149
|
+
}, Ze = (e) => {
|
|
150
150
|
let t = /* @__PURE__ */ new Set();
|
|
151
|
-
for (let n of e ?? [])
|
|
151
|
+
for (let n of e ?? []) Ve(n.when, t);
|
|
152
152
|
return t;
|
|
153
|
-
},
|
|
154
|
-
let { fieldByKey: i } =
|
|
155
|
-
for (let o of
|
|
153
|
+
}, Qe = (e, t, n, r) => {
|
|
154
|
+
let { fieldByKey: i } = Xe(e), a = { ...n };
|
|
155
|
+
for (let o of Ze(t)) {
|
|
156
156
|
let t = i.get(o);
|
|
157
|
-
!t || t.hidden ||
|
|
157
|
+
!t || t.hidden || tt(e, t, n, r) && (a[o] = void 0);
|
|
158
158
|
}
|
|
159
159
|
return a;
|
|
160
|
-
},
|
|
160
|
+
}, $e = (e, t, n, r) => {
|
|
161
161
|
let i = e.memo.get(t);
|
|
162
162
|
if (i !== void 0) return i;
|
|
163
163
|
if (e.active.has(t)) return e.hitCycle = !0, n;
|
|
@@ -169,43 +169,43 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
169
169
|
} finally {
|
|
170
170
|
e.active.delete(t), e.hitCycle = e.hitCycle || a;
|
|
171
171
|
}
|
|
172
|
-
},
|
|
173
|
-
let i =
|
|
174
|
-
return
|
|
172
|
+
}, et = (e, t, n, r) => ot(e, t) || !t.logic?.length ? !0 : $e(r, `section:${t.id}`, !0, () => {
|
|
173
|
+
let i = He(e, t.logic), a = Qe(e, t.logic, n, r);
|
|
174
|
+
return qe({
|
|
175
175
|
logic: t.logic,
|
|
176
176
|
formValues: a,
|
|
177
177
|
sourceKinds: i
|
|
178
178
|
}).visible;
|
|
179
|
-
}),
|
|
180
|
-
let i =
|
|
181
|
-
if (i && !
|
|
179
|
+
}), tt = (e, t, n, r) => t.hidden ? !0 : $e(r, t.key, !1, () => {
|
|
180
|
+
let i = Xe(e).sectionOfField.get(t.key);
|
|
181
|
+
if (i && !et(e, i, n, r)) return !0;
|
|
182
182
|
if (!t.logic?.length) return !1;
|
|
183
|
-
let a =
|
|
184
|
-
return !
|
|
183
|
+
let a = He(e, t.logic), o = Qe(e, t.logic, n, r);
|
|
184
|
+
return !qe({
|
|
185
185
|
logic: t.logic,
|
|
186
186
|
formValues: o,
|
|
187
187
|
sourceKinds: a
|
|
188
188
|
}).visible;
|
|
189
|
-
}),
|
|
190
|
-
let { fieldByKey: n, sectionOfField: r } =
|
|
191
|
-
for (let o of
|
|
189
|
+
}), nt = (e, t, n) => t.hidden ? !0 : e ? tt(e, t, n, Je()) : !1, rt = (e, t) => {
|
|
190
|
+
let { fieldByKey: n, sectionOfField: r } = Xe(e), i = /* @__PURE__ */ new Set(), a = (t) => {
|
|
191
|
+
for (let o of Ze(t)) {
|
|
192
192
|
if (i.has(o)) continue;
|
|
193
193
|
i.add(o);
|
|
194
194
|
let t = n.get(o);
|
|
195
195
|
if (!t) continue;
|
|
196
196
|
a(t.logic);
|
|
197
197
|
let s = r.get(o);
|
|
198
|
-
s && !
|
|
198
|
+
s && !ot(e, s) && a(s.logic);
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
return a(t), [...i];
|
|
202
|
-
},
|
|
203
|
-
let n =
|
|
204
|
-
return [...new Set([...
|
|
205
|
-
},
|
|
206
|
-
let r =
|
|
207
|
-
return t.some((t) => !!t.field_interface && !!t.key && !(e ?
|
|
208
|
-
},
|
|
202
|
+
}, it = (e, t) => {
|
|
203
|
+
let n = Xe(e).sectionOfField.get(t.key);
|
|
204
|
+
return [...new Set([...rt(e, t.logic), ...n ? at(e, n) : []])];
|
|
205
|
+
}, at = (e, t) => ot(e, t) ? [] : rt(e, t.logic), ot = (e, t) => e?.sections?.[0]?.id === t.id, st = (e, t, n) => {
|
|
206
|
+
let r = Je();
|
|
207
|
+
return t.some((t) => !!t.field_interface && !!t.key && !(e ? tt(e, t, n, r) : t.hidden));
|
|
208
|
+
}, ct = (e, t) => {
|
|
209
209
|
let n = E(6), r;
|
|
210
210
|
n[0] !== t || n[1] !== e ? (r = (n) => {
|
|
211
211
|
let r = n ?? [], i = {};
|
|
@@ -218,18 +218,18 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
218
218
|
name: e,
|
|
219
219
|
exact: !0,
|
|
220
220
|
compute: r
|
|
221
|
-
}, n[3] = e, n[4] = r, n[5] = i) : i = n[5],
|
|
222
|
-
},
|
|
221
|
+
}, n[3] = e, n[4] = r, n[5] = i) : i = n[5], ce(i);
|
|
222
|
+
}, lt = (e, t) => {
|
|
223
223
|
let n = E(9), r;
|
|
224
|
-
n[0] !== t || n[1] !== e ? (r = e ?
|
|
224
|
+
n[0] !== t || n[1] !== e ? (r = e ? it(e, t) : [], n[0] = t, n[1] = e, n[2] = r) : r = n[2];
|
|
225
225
|
let i = r, a;
|
|
226
|
-
n[3] !== t || n[4] !== e ? (a = (n) =>
|
|
227
|
-
let o =
|
|
228
|
-
return n[6] !==
|
|
226
|
+
n[3] !== t || n[4] !== e ? (a = (n) => nt(e, t, n), n[3] = t, n[4] = e, n[5] = a) : a = n[5];
|
|
227
|
+
let o = L(ct(i, a)), s;
|
|
228
|
+
return n[6] !== o || n[7] !== t ? (s = {
|
|
229
229
|
...t,
|
|
230
230
|
hidden: o
|
|
231
|
-
}, n[6] =
|
|
232
|
-
},
|
|
231
|
+
}, n[6] = o, n[7] = t, n[8] = s) : s = n[8], s;
|
|
232
|
+
}, ut = (e, t) => {
|
|
233
233
|
let n = E(11), r;
|
|
234
234
|
bb0: {
|
|
235
235
|
if (!e) {
|
|
@@ -240,14 +240,14 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
240
240
|
let i;
|
|
241
241
|
if (n[1] !== e || n[2] !== t.fields) {
|
|
242
242
|
let r;
|
|
243
|
-
n[4] === e ? r = n[5] : (r = (t) =>
|
|
243
|
+
n[4] === e ? r = n[5] : (r = (t) => it(e, t), n[4] = e, n[5] = r), i = new Set((t.fields ?? []).flatMap(r)), n[1] = e, n[2] = t.fields, n[3] = i;
|
|
244
244
|
} else i = n[3];
|
|
245
245
|
let a;
|
|
246
246
|
n[6] === i ? a = n[7] : (a = [...i], n[6] = i, n[7] = a), r = a;
|
|
247
247
|
}
|
|
248
248
|
let i = r, a;
|
|
249
|
-
return n[8] !== e || n[9] !== t.fields ? (a = (n) =>
|
|
250
|
-
},
|
|
249
|
+
return n[8] !== e || n[9] !== t.fields ? (a = (n) => st(e, t.fields ?? [], n), n[8] = e, n[9] = t.fields, n[10] = a) : a = n[10], L(ct(i, a));
|
|
250
|
+
}, dt = (e) => Array.isArray(e) ? e.map((e) => {
|
|
251
251
|
if (e && typeof e == "object") {
|
|
252
252
|
let t = e.value ?? e.label ?? "";
|
|
253
253
|
return {
|
|
@@ -259,41 +259,41 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
259
259
|
value: String(e),
|
|
260
260
|
label: String(e)
|
|
261
261
|
};
|
|
262
|
-
}) : [],
|
|
262
|
+
}) : [], ft = (e) => dt(e).map((e) => e.value), pt = (e) => {
|
|
263
263
|
let t = {};
|
|
264
264
|
for (let n of e) {
|
|
265
265
|
if (n.kind === "collection") {
|
|
266
266
|
let e = n.options?.current_have_many_connected, r = n.options?.connected_have_many_current;
|
|
267
|
-
e && r ? t[n.key] =
|
|
268
|
-
} else t[n.key] =
|
|
269
|
-
n?.field_interface ===
|
|
267
|
+
e && r ? t[n.key] = J.collection.m2m : t[n.key] = J.collection.m2o;
|
|
268
|
+
} else t[n.key] = J?.[n?.kind];
|
|
269
|
+
n?.field_interface === G.RecordWidget && n?.fields?.length && (t[n.key] = pt(n.fields));
|
|
270
270
|
}
|
|
271
271
|
return t;
|
|
272
|
-
},
|
|
272
|
+
}, mt = (e) => e === void 0 ? null : e, ht = (e) => {
|
|
273
273
|
if (!e?.sections) return {};
|
|
274
274
|
let t = {};
|
|
275
275
|
for (let n of e.sections) {
|
|
276
|
-
let e =
|
|
276
|
+
let e = pt(n.fields ?? []);
|
|
277
277
|
for (let r of n.fields ?? []) {
|
|
278
|
-
let n =
|
|
279
|
-
if (n != null &&
|
|
280
|
-
let e =
|
|
278
|
+
let n = mt(r?.default_value);
|
|
279
|
+
if (n != null && gt(r)) {
|
|
280
|
+
let e = ft(r?.values);
|
|
281
281
|
Array.isArray(n) ? n = n.filter((t) => e.includes(t)) : typeof n == "string" && !e.includes(n) && (n = null);
|
|
282
282
|
}
|
|
283
283
|
t[r.key] = n ?? e[r.key];
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
return t;
|
|
287
|
-
},
|
|
287
|
+
}, gt = (e) => Array.isArray(e?.values) && e?.values?.length > 0 && !e?.options?.custom_input, _t = (e, t, n) => {
|
|
288
288
|
let r = n !== void 0;
|
|
289
289
|
if (!t) return {};
|
|
290
290
|
let i = (t?.sections ?? []).flatMap((e) => e?.fields ?? []), a = {};
|
|
291
291
|
for (let o of i) {
|
|
292
|
-
let i = r &&
|
|
293
|
-
o.field_interface === "CollectionWidget" ? i && typeof i == "object" ? a[o.key] = Array.isArray(i) ? i.map((e) => e && typeof e == "object" ? e._id : e).filter(Boolean) : i._id : typeof i == "string" && i ? a[o.key] = i : a[o.key] =
|
|
292
|
+
let i = r && nt(t, o, e) ? n[o.key] : e?.[o.key];
|
|
293
|
+
o.field_interface === "CollectionWidget" ? i && typeof i == "object" ? a[o.key] = Array.isArray(i) ? i.map((e) => e && typeof e == "object" ? e._id : e).filter(Boolean) : i._id : typeof i == "string" && i ? a[o.key] = i : a[o.key] = pt([o])[o.key] : a[o.key] = i;
|
|
294
294
|
}
|
|
295
295
|
return a;
|
|
296
|
-
},
|
|
296
|
+
}, vt = "_1kzhxrs0", yt = "_1kzhxrs1", bt = "_1kzhxrs2", xt = "_1kzhxrs3", St = "_1kzhxrs4", Ct = "_1kzhxrs5", wt = "_1kzhxrs6", Tt = "_1kzhxrs7", Et = "_1kzhxrs8", Dt = "_1kzhxrs9", Ot = "_1kzhxrsa", kt = "_1kzhxrsb", At = "ktjhuv0", jt = ne({
|
|
297
297
|
defaultClassName: "ktjhuv1",
|
|
298
298
|
variantClassNames: { variant: {
|
|
299
299
|
default: "ktjhuv2",
|
|
@@ -301,105 +301,105 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
301
301
|
} },
|
|
302
302
|
defaultVariants: { variant: "default" },
|
|
303
303
|
compoundVariants: []
|
|
304
|
-
}),
|
|
304
|
+
}), Mt = "ktjhuv4", Nt = "ktjhuv5", Pt = "ktjhuv6", Ft = (e) => {
|
|
305
305
|
let t = E(10), n, r, i;
|
|
306
306
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, orientation: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
307
307
|
let a = i === void 0 ? "horizontal" : i, o;
|
|
308
|
-
t[4] === n ? o = t[5] : (o = Z(
|
|
308
|
+
t[4] === n ? o = t[5] : (o = Z(At, n), t[4] = n, t[5] = o);
|
|
309
309
|
let s;
|
|
310
|
-
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */
|
|
310
|
+
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */ U(le.Root, {
|
|
311
311
|
"data-slot": "tabs",
|
|
312
312
|
"data-orientation": a,
|
|
313
313
|
className: o,
|
|
314
314
|
...r
|
|
315
315
|
}), t[6] = a, t[7] = r, t[8] = o, t[9] = s) : s = t[9], s;
|
|
316
|
-
},
|
|
316
|
+
}, It = (e) => {
|
|
317
317
|
let t = E(11), n, r, i;
|
|
318
318
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, variant: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
319
319
|
let a = i === void 0 ? "default" : i, o;
|
|
320
|
-
t[4] !== n || t[5] !== a ? (o = Z(
|
|
320
|
+
t[4] !== n || t[5] !== a ? (o = Z(jt({ variant: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
321
321
|
let s;
|
|
322
|
-
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */
|
|
322
|
+
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */ U(le.List, {
|
|
323
323
|
"data-slot": "tabs-list",
|
|
324
324
|
"data-variant": a,
|
|
325
325
|
className: o,
|
|
326
326
|
...r
|
|
327
327
|
}), t[7] = r, t[8] = o, t[9] = a, t[10] = s) : s = t[10], s;
|
|
328
|
-
},
|
|
328
|
+
}, Lt = (e) => {
|
|
329
329
|
let t = E(8), n, r;
|
|
330
330
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
331
331
|
let i;
|
|
332
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
332
|
+
t[3] === n ? i = t[4] : (i = Z(Mt, Nt, n), t[3] = n, t[4] = i);
|
|
333
333
|
let a;
|
|
334
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
334
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U(le.Tab, {
|
|
335
335
|
"data-slot": "tabs-trigger",
|
|
336
336
|
className: i,
|
|
337
337
|
...r
|
|
338
338
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
339
|
-
},
|
|
339
|
+
}, Rt = (e) => {
|
|
340
340
|
let t = E(8), n, r;
|
|
341
341
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
342
342
|
let i;
|
|
343
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
343
|
+
t[3] === n ? i = t[4] : (i = Z(Pt, n), t[3] = n, t[4] = i);
|
|
344
344
|
let a;
|
|
345
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
345
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U(le.Panel, {
|
|
346
346
|
"data-slot": "tabs-content",
|
|
347
347
|
className: i,
|
|
348
348
|
...r
|
|
349
349
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
350
|
-
},
|
|
350
|
+
}, zt = (e) => {
|
|
351
351
|
let n = E(36), r, i, a;
|
|
352
352
|
n[0] === e ? (r = n[1], i = n[2], a = n[3]) : ({field: r, schema: a, ...i} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a);
|
|
353
353
|
let { key: o, label: l, field_interface: u, fields: d } = r, f = o === void 0 ? "" : o, p = l === void 0 ? "" : l, m = u === void 0 ? "" : u, h;
|
|
354
354
|
n[4] === d ? h = n[5] : (h = d === void 0 ? [] : d, n[4] = d, n[5] = h);
|
|
355
|
-
let g = h, [_, v] =
|
|
355
|
+
let g = h, [_, v] = V("0"), { formState: y } = se(), b;
|
|
356
356
|
n[6] === r ? b = n[7] : (b = c(r), n[6] = r, n[7] = b);
|
|
357
357
|
let x;
|
|
358
358
|
n[8] !== f || n[9] !== b ? (x = {
|
|
359
359
|
name: f,
|
|
360
360
|
rules: b
|
|
361
361
|
}, n[8] = f, n[9] = b, n[10] = x) : x = n[10];
|
|
362
|
-
let S =
|
|
362
|
+
let S = ae(x), C, w;
|
|
363
363
|
n[11] === S ? (C = n[12], w = n[13]) : ({fields: w, ...C} = S, n[11] = S, n[12] = C, n[13] = w);
|
|
364
364
|
let T;
|
|
365
|
-
n[14] !== y.errors || n[15] !== f ? (T =
|
|
365
|
+
n[14] !== y.errors || n[15] !== f ? (T = ie(y.errors, f)?.root?.message, n[14] = y.errors, n[15] = f, n[16] = T) : T = n[16];
|
|
366
366
|
let D = T;
|
|
367
367
|
if (!m || !f) return null;
|
|
368
368
|
let O = r?.required, k;
|
|
369
|
-
n[17] !== p || n[18] !== O ? (k = /* @__PURE__ */
|
|
369
|
+
n[17] !== p || n[18] !== O ? (k = /* @__PURE__ */ U(s, {
|
|
370
370
|
label: p,
|
|
371
371
|
isRequired: O
|
|
372
372
|
}), n[17] = p, n[18] = O, n[19] = k) : k = n[19];
|
|
373
373
|
let A;
|
|
374
|
-
n[20] !== C || n[21] !== r.id || n[22] !== r.key || n[23] !== w || n[24] !== g || n[25] !== f || n[26] !== i || n[27] !== a || n[28] !== _ ? (A = w && Array.isArray(w) ? /* @__PURE__ */
|
|
374
|
+
n[20] !== C || n[21] !== r.id || n[22] !== r.key || n[23] !== w || n[24] !== g || n[25] !== f || n[26] !== i || n[27] !== a || n[28] !== _ ? (A = w && Array.isArray(w) ? /* @__PURE__ */ W(Ft, {
|
|
375
375
|
value: _,
|
|
376
376
|
onValueChange: v,
|
|
377
|
-
className:
|
|
378
|
-
children: [/* @__PURE__ */
|
|
379
|
-
className:
|
|
380
|
-
children: [w.length ? /* @__PURE__ */
|
|
381
|
-
className:
|
|
382
|
-
children: w?.map((e, t) => /* @__PURE__ */
|
|
377
|
+
className: yt,
|
|
378
|
+
children: [/* @__PURE__ */ W("div", {
|
|
379
|
+
className: bt,
|
|
380
|
+
children: [w.length ? /* @__PURE__ */ U(It, {
|
|
381
|
+
className: xt,
|
|
382
|
+
children: w?.map((e, t) => /* @__PURE__ */ U(Lt, {
|
|
383
383
|
id: `${r?.key}-${t}`,
|
|
384
384
|
value: t.toString(),
|
|
385
|
-
className:
|
|
385
|
+
className: St,
|
|
386
386
|
children: t + 1
|
|
387
387
|
}, `array-widget-tab-${r?.id}-${t}`))
|
|
388
|
-
}) : null, /* @__PURE__ */
|
|
388
|
+
}) : null, /* @__PURE__ */ W(t, {
|
|
389
389
|
variant: "ghost",
|
|
390
390
|
size: "xs",
|
|
391
|
-
className:
|
|
391
|
+
className: Ct,
|
|
392
392
|
onClick: () => {
|
|
393
|
-
C.append(
|
|
393
|
+
C.append(pt(g)), v((w?.length ?? 0).toString());
|
|
394
394
|
},
|
|
395
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ U(be, { size: 14 }), "Add"]
|
|
396
396
|
})]
|
|
397
|
-
}), w?.map((e, n) => /* @__PURE__ */
|
|
398
|
-
className:
|
|
397
|
+
}), w?.map((e, n) => /* @__PURE__ */ W(Rt, {
|
|
398
|
+
className: wt,
|
|
399
399
|
value: n.toString(),
|
|
400
|
-
children: [/* @__PURE__ */
|
|
401
|
-
className:
|
|
402
|
-
children: g.map((e) => /* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ U("div", {
|
|
401
|
+
className: Tt,
|
|
402
|
+
children: g.map((e) => /* @__PURE__ */ U(Jr, {
|
|
403
403
|
field: {
|
|
404
404
|
...e,
|
|
405
405
|
key: `${f}.${n}.${e?.key}`
|
|
@@ -407,104 +407,104 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
407
407
|
schema: a ?? null,
|
|
408
408
|
...i
|
|
409
409
|
}, `common-fields-${e?.id}`))
|
|
410
|
-
}), /* @__PURE__ */
|
|
411
|
-
className:
|
|
410
|
+
}), /* @__PURE__ */ W("div", {
|
|
411
|
+
className: Et,
|
|
412
412
|
children: [
|
|
413
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ U(t, {
|
|
414
414
|
onClick: () => {
|
|
415
415
|
v((n - 1).toString()), C.move(n, n - 1);
|
|
416
416
|
},
|
|
417
417
|
disabled: n === 0,
|
|
418
418
|
size: "icon",
|
|
419
|
-
className:
|
|
420
|
-
children: /* @__PURE__ */
|
|
419
|
+
className: Dt,
|
|
420
|
+
children: /* @__PURE__ */ U(fe, { size: 20 })
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
className:
|
|
422
|
+
/* @__PURE__ */ U(t, {
|
|
423
|
+
className: Ot,
|
|
424
424
|
variant: "link",
|
|
425
425
|
onClick: () => {
|
|
426
426
|
v(Math.max(0, n - 1).toString()), C.remove(n);
|
|
427
427
|
},
|
|
428
428
|
children: "Remove Item"
|
|
429
429
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
-
className:
|
|
430
|
+
/* @__PURE__ */ U(t, {
|
|
431
|
+
className: Dt,
|
|
432
432
|
onClick: () => {
|
|
433
433
|
v((n + 1).toString()), C.move(n, n + 1);
|
|
434
434
|
},
|
|
435
435
|
disabled: n >= w.length - 1,
|
|
436
436
|
size: "icon",
|
|
437
|
-
children: /* @__PURE__ */
|
|
437
|
+
children: /* @__PURE__ */ U(pe, { size: 20 })
|
|
438
438
|
})
|
|
439
439
|
]
|
|
440
440
|
})]
|
|
441
441
|
}, `array-widget-tab-content-${r?.id}-${n}`))]
|
|
442
|
-
}) : /* @__PURE__ */
|
|
442
|
+
}) : /* @__PURE__ */ W(t, {
|
|
443
443
|
variant: "ghost",
|
|
444
444
|
size: "xs",
|
|
445
445
|
onClick: () => {
|
|
446
|
-
C.append(
|
|
446
|
+
C.append(pt(g)), v("0");
|
|
447
447
|
},
|
|
448
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ U(be, { size: 14 }), "Add"]
|
|
449
449
|
}), n[20] = C, n[21] = r.id, n[22] = r.key, n[23] = w, n[24] = g, n[25] = f, n[26] = i, n[27] = a, n[28] = _, n[29] = A) : A = n[29];
|
|
450
450
|
let j;
|
|
451
|
-
n[30] === D ? j = n[31] : (j = !!D && /* @__PURE__ */
|
|
451
|
+
n[30] === D ? j = n[31] : (j = !!D && /* @__PURE__ */ U("div", {
|
|
452
452
|
className: "_1kzhxrsc",
|
|
453
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ U("p", {
|
|
454
454
|
className: "_1ompjs13",
|
|
455
455
|
children: D
|
|
456
456
|
})
|
|
457
457
|
}), n[30] = D, n[31] = j);
|
|
458
458
|
let M;
|
|
459
|
-
return n[32] !== k || n[33] !== A || n[34] !== j ? (M = /* @__PURE__ */
|
|
460
|
-
className:
|
|
459
|
+
return n[32] !== k || n[33] !== A || n[34] !== j ? (M = /* @__PURE__ */ W("div", {
|
|
460
|
+
className: vt,
|
|
461
461
|
children: [
|
|
462
462
|
k,
|
|
463
463
|
A,
|
|
464
464
|
j
|
|
465
465
|
]
|
|
466
466
|
}), n[32] = k, n[33] = A, n[34] = j, n[35] = M) : M = n[35], M;
|
|
467
|
-
},
|
|
468
|
-
container: () =>
|
|
469
|
-
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Z(
|
|
467
|
+
}, Bt = "_8vx4f60 _1oiks600 _1ri7vba0", Vt = "_8vx4f61", Ht = "_8vx4f62", Ut = "_8vx4f63", Wt = "_8vx4f66", Gt = "_8vx4f67", Kt = "_8vx4f68", qt = "_8vx4f69", Jt = "_8vx4f6a", Yt = "_8vx4f6b", Xt = "_8vx4f6c", Zt = "_8vx4f6d _6o7s4x0", Qt = "_8vx4f6e", $t = "_8vx4f6f", en = "_8vx4f6g", tn = "_8vx4f6h", nn = "_8vx4f6k", rn = {
|
|
468
|
+
container: () => Vt,
|
|
469
|
+
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Z(Bt, t ? Ut : Ht, e && "_8vx4f64", n && "_8vx4f65"),
|
|
470
470
|
input: () => "",
|
|
471
|
-
valueContainer: () =>
|
|
472
|
-
loadingMessage: () =>
|
|
471
|
+
valueContainer: () => Wt,
|
|
472
|
+
loadingMessage: () => Kt,
|
|
473
473
|
singleValue: () => "",
|
|
474
|
-
multiValue: () =>
|
|
475
|
-
multiValueRemove: () =>
|
|
476
|
-
indicatorsContainer: () =>
|
|
477
|
-
clearIndicator: () =>
|
|
474
|
+
multiValue: () => qt,
|
|
475
|
+
multiValueRemove: () => Jt,
|
|
476
|
+
indicatorsContainer: () => Gt,
|
|
477
|
+
clearIndicator: () => Yt,
|
|
478
478
|
indicatorSeparator: () => "",
|
|
479
|
-
dropdownIndicator: () =>
|
|
480
|
-
menu: () =>
|
|
481
|
-
groupHeading: () =>
|
|
482
|
-
placeholder: () =>
|
|
483
|
-
option: ({ isSelected: e, isFocused: t }) => Z(
|
|
484
|
-
noOptionsMessage: () =>
|
|
485
|
-
menuPortal: () =>
|
|
486
|
-
},
|
|
479
|
+
dropdownIndicator: () => Xt,
|
|
480
|
+
menu: () => Zt,
|
|
481
|
+
groupHeading: () => $t,
|
|
482
|
+
placeholder: () => en,
|
|
483
|
+
option: ({ isSelected: e, isFocused: t }) => Z(tn, t && "_8vx4f6i", e && "_8vx4f6j"),
|
|
484
|
+
noOptionsMessage: () => nn,
|
|
485
|
+
menuPortal: () => Qt
|
|
486
|
+
}, an = M.lazy(() => import("react-select-async-paginate").then((e) => ({ default: e.AsyncPaginate }))), on = (e) => {
|
|
487
487
|
let { portalRef: t } = n();
|
|
488
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ U(an, {
|
|
489
489
|
isClearable: !0,
|
|
490
490
|
menuPlacement: "auto",
|
|
491
491
|
isSearchable: !0,
|
|
492
492
|
unstyled: !0,
|
|
493
|
-
classNames:
|
|
493
|
+
classNames: rn,
|
|
494
494
|
styles: { menuPortal: (e) => ({
|
|
495
495
|
...e,
|
|
496
496
|
zIndex: 99999999
|
|
497
497
|
}) },
|
|
498
498
|
menuPosition: "fixed",
|
|
499
499
|
menuPortalTarget: t?.current,
|
|
500
|
-
loadingMessage: () => /* @__PURE__ */
|
|
500
|
+
loadingMessage: () => /* @__PURE__ */ U(d, { size: 16 }),
|
|
501
501
|
...e
|
|
502
502
|
});
|
|
503
|
-
},
|
|
504
|
-
let { collection: n } = A(), [r, i] =
|
|
503
|
+
}, sn = { OR: [{ _original: "" }, { _original: null }] }, cn = (e) => e ? e.replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()) : "", ln = "_1k5k6yj0", un = ({ field: e }) => {
|
|
504
|
+
let { collection: n } = A(), [r, i] = V(!1), [a, o] = V(!1), [s, u] = V([]), [f, g] = V(1), [_, v] = V(5), [y, b] = V(0), [x, S] = V(0), { key: C = "", label: w = "", helper_text: T = "", readonly: E = !1 } = e, O = C, k = e?.options?.collection_key || "", j = e?.options?.label_field_key || "", { field: { value: M, onChange: N, ref: P }, fieldState: F } = Q({
|
|
505
505
|
name: O,
|
|
506
506
|
rules: c(e)
|
|
507
|
-
}), I = !!e?.required,
|
|
507
|
+
}), I = !!e?.required, L = F?.error?.message, z = async () => {
|
|
508
508
|
i(!0);
|
|
509
509
|
try {
|
|
510
510
|
let e = await n?.getCollectionContentList({
|
|
@@ -520,23 +520,23 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
520
520
|
i(!1);
|
|
521
521
|
}
|
|
522
522
|
};
|
|
523
|
-
return
|
|
523
|
+
return R(() => {
|
|
524
524
|
M?.length > 0 && z();
|
|
525
525
|
}, [
|
|
526
526
|
M,
|
|
527
527
|
f,
|
|
528
528
|
_
|
|
529
|
-
]), /* @__PURE__ */
|
|
530
|
-
className:
|
|
531
|
-
children: [/* @__PURE__ */
|
|
529
|
+
]), /* @__PURE__ */ W("div", {
|
|
530
|
+
className: ln,
|
|
531
|
+
children: [/* @__PURE__ */ U(l, {
|
|
532
532
|
ref: P,
|
|
533
|
-
error:
|
|
533
|
+
error: L,
|
|
534
534
|
helperText: T,
|
|
535
535
|
readOnly: E,
|
|
536
536
|
label: w,
|
|
537
537
|
htmlFor: O,
|
|
538
538
|
isRequired: I,
|
|
539
|
-
children: /* @__PURE__ */
|
|
539
|
+
children: /* @__PURE__ */ U(on, {
|
|
540
540
|
id: O,
|
|
541
541
|
value: [],
|
|
542
542
|
onChange: (e) => {
|
|
@@ -547,7 +547,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
547
547
|
loadOptions: async (e, t, { page: r = 1 }) => {
|
|
548
548
|
o(!0);
|
|
549
549
|
try {
|
|
550
|
-
let t = Array.isArray(M) && M.length > 0 ? { AND: [{ _id: { not_in: M } },
|
|
550
|
+
let t = Array.isArray(M) && M.length > 0 ? { AND: [{ _id: { not_in: M } }, sn] } : sn, i = (await n?.getCollectionContentList({
|
|
551
551
|
collection_key: k,
|
|
552
552
|
page: r,
|
|
553
553
|
search: e,
|
|
@@ -559,7 +559,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
559
559
|
slug: e?.slug,
|
|
560
560
|
[j]: e?.[j]
|
|
561
561
|
},
|
|
562
|
-
label: e?.[j] ? e?.[j] :
|
|
562
|
+
label: e?.[j] ? e?.[j] : cn(e?.slug ?? "")
|
|
563
563
|
}));
|
|
564
564
|
return {
|
|
565
565
|
options: Array.isArray(a) ? a : [],
|
|
@@ -584,44 +584,44 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
584
584
|
cacheUniqs: [k, M],
|
|
585
585
|
minMenuHeight: 250
|
|
586
586
|
})
|
|
587
|
-
}), Array.isArray(M) && M?.length > 0 && /* @__PURE__ */
|
|
587
|
+
}), Array.isArray(M) && M?.length > 0 && /* @__PURE__ */ W("div", {
|
|
588
588
|
className: "_1k5k6yj1",
|
|
589
589
|
children: [
|
|
590
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ W("h4", {
|
|
591
591
|
className: "_1k5k6yj2",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: [/* @__PURE__ */ U("span", { children: "Selected" }), r && s?.length > 0 && /* @__PURE__ */ U(d, { size: 16 })]
|
|
593
593
|
}),
|
|
594
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ U("div", {
|
|
595
595
|
className: "_1k5k6yj4",
|
|
596
|
-
children: s.map((e) => /* @__PURE__ */
|
|
596
|
+
children: s.map((e) => /* @__PURE__ */ W("div", {
|
|
597
597
|
className: "_1k5k6yj5",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ U("div", {
|
|
599
599
|
className: "_1k5k6yj6",
|
|
600
|
-
children: e?.[j] ||
|
|
601
|
-
}), /* @__PURE__ */
|
|
600
|
+
children: e?.[j] || cn(e?.slug ?? "")
|
|
601
|
+
}), /* @__PURE__ */ U(t, {
|
|
602
602
|
disabled: r,
|
|
603
603
|
size: "icon-sm",
|
|
604
604
|
variant: "ghost",
|
|
605
605
|
onClick: () => {
|
|
606
606
|
N(M?.filter((t) => t !== e?._id));
|
|
607
607
|
},
|
|
608
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ U(Ce, { size: 16 })
|
|
609
609
|
})]
|
|
610
610
|
}, e?._id))
|
|
611
611
|
}),
|
|
612
|
-
r && s?.length === 0 && /* @__PURE__ */
|
|
612
|
+
r && s?.length === 0 && /* @__PURE__ */ U("div", {
|
|
613
613
|
className: "_1k5k6yj3",
|
|
614
|
-
children: /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ U(d, { size: 24 })
|
|
615
615
|
}),
|
|
616
|
-
M?.length > 5 && /* @__PURE__ */
|
|
616
|
+
M?.length > 5 && /* @__PURE__ */ W("div", {
|
|
617
617
|
className: "_1k5k6yj7",
|
|
618
618
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ W("div", {
|
|
620
620
|
className: "_1k5k6yj8",
|
|
621
621
|
children: [
|
|
622
622
|
"Showing",
|
|
623
623
|
" ",
|
|
624
|
-
y ? /* @__PURE__ */
|
|
624
|
+
y ? /* @__PURE__ */ W(H, { children: [
|
|
625
625
|
_ * (f - 1) + 1,
|
|
626
626
|
"-",
|
|
627
627
|
Math.min(_ * f, y),
|
|
@@ -632,64 +632,64 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
632
632
|
" items"
|
|
633
633
|
]
|
|
634
634
|
}),
|
|
635
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ W("select", {
|
|
636
636
|
className: "_1k5k6yjb",
|
|
637
637
|
value: _,
|
|
638
638
|
onChange: (e) => {
|
|
639
639
|
g(1), v(Number(e.target.value));
|
|
640
640
|
},
|
|
641
641
|
children: [
|
|
642
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ U("option", {
|
|
643
643
|
value: 5,
|
|
644
644
|
children: "5"
|
|
645
645
|
}),
|
|
646
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ U("option", {
|
|
647
647
|
value: 10,
|
|
648
648
|
children: "10"
|
|
649
649
|
}),
|
|
650
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ U("option", {
|
|
651
651
|
value: 25,
|
|
652
652
|
children: "25"
|
|
653
653
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ U("option", {
|
|
655
655
|
value: 50,
|
|
656
656
|
children: "50"
|
|
657
657
|
})
|
|
658
658
|
]
|
|
659
659
|
}),
|
|
660
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ U("div", {
|
|
661
661
|
className: "_1k5k6yj9",
|
|
662
|
-
children: /* @__PURE__ */
|
|
662
|
+
children: /* @__PURE__ */ W("div", {
|
|
663
663
|
className: "_1k5k6yja",
|
|
664
664
|
children: [
|
|
665
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
666
666
|
variant: "ghost",
|
|
667
667
|
size: "icon-xs",
|
|
668
668
|
onClick: () => g(1),
|
|
669
669
|
disabled: f === 1,
|
|
670
|
-
children: /* @__PURE__ */
|
|
671
|
-
}), /* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
670
|
+
children: /* @__PURE__ */ U(me, { size: 14 })
|
|
671
|
+
}), /* @__PURE__ */ U(m, { children: "First page" })] }),
|
|
672
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
673
673
|
variant: "ghost",
|
|
674
674
|
size: "icon-xs",
|
|
675
675
|
disabled: f === 1,
|
|
676
676
|
onClick: () => g(f - 1),
|
|
677
|
-
children: /* @__PURE__ */
|
|
678
|
-
}), /* @__PURE__ */
|
|
679
|
-
/* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ U(fe, { size: 14 })
|
|
678
|
+
}), /* @__PURE__ */ U(m, { children: "Previous page" })] }),
|
|
679
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
680
680
|
variant: "ghost",
|
|
681
681
|
size: "icon-xs",
|
|
682
682
|
onClick: () => g(f + 1),
|
|
683
683
|
disabled: f === x,
|
|
684
|
-
children: /* @__PURE__ */
|
|
685
|
-
}), /* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
684
|
+
children: /* @__PURE__ */ U(pe, { size: 14 })
|
|
685
|
+
}), /* @__PURE__ */ U(m, { children: "Next page" })] }),
|
|
686
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
687
687
|
variant: "ghost",
|
|
688
688
|
size: "icon-xs",
|
|
689
689
|
onClick: () => g(x),
|
|
690
690
|
disabled: f === x,
|
|
691
|
-
children: /* @__PURE__ */
|
|
692
|
-
}), /* @__PURE__ */
|
|
691
|
+
children: /* @__PURE__ */ U(he, { size: 14 })
|
|
692
|
+
}), /* @__PURE__ */ U(m, { children: "Last page" })] })
|
|
693
693
|
]
|
|
694
694
|
})
|
|
695
695
|
})
|
|
@@ -698,12 +698,12 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
698
698
|
]
|
|
699
699
|
})]
|
|
700
700
|
});
|
|
701
|
-
},
|
|
702
|
-
let { collection: t, logger: n } = A(), [r, i] =
|
|
701
|
+
}, dn = ({ field: e }) => {
|
|
702
|
+
let { collection: t, logger: n } = A(), [r, i] = V(!1), { key: a = "", label: o = "", helper_text: s = "", readonly: u = !1 } = e, d = a, f = e?.options?.collection_key || "", p = e?.options?.label_field_key || "", { field: { value: m, onBlur: h, onChange: g, ref: _, disabled: v, ...y }, fieldState: b } = Q({
|
|
703
703
|
name: d,
|
|
704
704
|
rules: c(e)
|
|
705
|
-
}), { setValue: x } =
|
|
706
|
-
|
|
705
|
+
}), { setValue: x } = se(), S = !!e?.required, C = b?.error?.message, w = B(null);
|
|
706
|
+
R(() => {
|
|
707
707
|
typeof m != "string" || !m || w.current !== m && (w.current = m, i(!0), t?.getCollectionContentList({
|
|
708
708
|
collection_key: f,
|
|
709
709
|
where: { _id: m },
|
|
@@ -735,9 +735,9 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
735
735
|
page: r,
|
|
736
736
|
search: e,
|
|
737
737
|
limit: 10,
|
|
738
|
-
where:
|
|
738
|
+
where: sn
|
|
739
739
|
}))?.content?.data, i = (n || []).map((e) => {
|
|
740
|
-
let t = e?.[p] ? e?.[p] :
|
|
740
|
+
let t = e?.[p] ? e?.[p] : cn(e?.slug || "");
|
|
741
741
|
return {
|
|
742
742
|
value: {
|
|
743
743
|
_id: e?._id,
|
|
@@ -762,7 +762,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
762
762
|
i(!1);
|
|
763
763
|
}
|
|
764
764
|
};
|
|
765
|
-
return /* @__PURE__ */
|
|
765
|
+
return /* @__PURE__ */ U(l, {
|
|
766
766
|
ref: _,
|
|
767
767
|
error: C,
|
|
768
768
|
helperText: s,
|
|
@@ -770,10 +770,10 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
770
770
|
label: o,
|
|
771
771
|
htmlFor: d,
|
|
772
772
|
isRequired: S,
|
|
773
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ U(on, {
|
|
774
774
|
id: d,
|
|
775
775
|
value: m && typeof m == "object" ? {
|
|
776
|
-
label: m?.[p] ? m?.[p] : m?.slug ?
|
|
776
|
+
label: m?.[p] ? m?.[p] : m?.slug ? cn(m?.slug || "") : "",
|
|
777
777
|
value: {
|
|
778
778
|
_id: m?._id,
|
|
779
779
|
slug: m?.slug,
|
|
@@ -796,50 +796,50 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
796
796
|
...y
|
|
797
797
|
})
|
|
798
798
|
});
|
|
799
|
-
},
|
|
799
|
+
}, fn = (e) => {
|
|
800
800
|
let t = E(4), { field: n } = e, { field_interface: r, key: i, options: a } = n, o = a === void 0 ? {} : a;
|
|
801
801
|
if (!r || !i) return null;
|
|
802
802
|
if (!o?.collection_key || !o?.label_field_key) return console.error("[LevoCollection]: Error while rendering collection widget. Collection key of label field key is required."), null;
|
|
803
803
|
if (o?.current_have_many_connected && !o?.connected_have_many_current) return console.error("[LevoCollection]: O2M is not supported"), null;
|
|
804
804
|
if (o?.current_have_many_connected && o?.connected_have_many_current) {
|
|
805
805
|
let n;
|
|
806
|
-
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */
|
|
806
|
+
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ U(un, {
|
|
807
807
|
...e,
|
|
808
808
|
schema: null
|
|
809
809
|
}), t[0] = e, t[1] = n), n;
|
|
810
810
|
}
|
|
811
811
|
let s;
|
|
812
|
-
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */
|
|
812
|
+
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */ U(dn, {
|
|
813
813
|
...e,
|
|
814
814
|
schema: null
|
|
815
815
|
}), t[2] = e, t[3] = s), s;
|
|
816
|
-
},
|
|
816
|
+
}, $ = (e) => M.memo(e), pn = "_1vaa8ub0", mn = "_1vaa8ub2", hn = "_1vaa8ub3", gn = "_13kepqq0", _n = "_13kepqq1", vn = (e) => {
|
|
817
817
|
let t = E(9), n, r;
|
|
818
818
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
819
819
|
let i;
|
|
820
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
820
|
+
t[3] === n ? i = t[4] : (i = Z(gn, n), t[3] = n, t[4] = i);
|
|
821
821
|
let a;
|
|
822
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
822
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ U(we.Indicator, {
|
|
823
823
|
"data-slot": "checkbox-indicator",
|
|
824
|
-
className:
|
|
825
|
-
children: /* @__PURE__ */
|
|
824
|
+
className: _n,
|
|
825
|
+
children: /* @__PURE__ */ U(de, {})
|
|
826
826
|
}), t[5] = a) : a = t[5];
|
|
827
827
|
let o;
|
|
828
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
828
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ U(we.Root, {
|
|
829
829
|
"data-slot": "checkbox",
|
|
830
830
|
className: i,
|
|
831
831
|
...r,
|
|
832
832
|
children: a
|
|
833
833
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
834
|
-
},
|
|
835
|
-
let [t, n] =
|
|
834
|
+
}, yn = ({ field: e }) => {
|
|
835
|
+
let [t, n] = V(""), [r, i] = V(!1), { key: a = "", label: s = "", helper_text: u = "", readonly: d = !1, values: f = [], options: p = {} } = e, { field: { name: m, onBlur: h, onChange: g, value: _, ref: v, disabled: b }, fieldState: { error: x } } = Q({
|
|
836
836
|
name: a,
|
|
837
837
|
rules: c(e)
|
|
838
838
|
}), S = (e) => {
|
|
839
839
|
let t = Array.isArray(_ || null) ? [..._] : [];
|
|
840
840
|
t.includes(e) ? t = t?.filter((t) => t !== e) : t.push(e), g(t);
|
|
841
|
-
}, C = !!p?.custom_input, w =
|
|
842
|
-
return
|
|
841
|
+
}, C = !!p?.custom_input, w = z(() => dt(f), [f]), T = z(() => w.map((e) => e.value), [w]);
|
|
842
|
+
return R(() => {
|
|
843
843
|
if (C) {
|
|
844
844
|
let e = !1;
|
|
845
845
|
(_ ?? []).forEach((t) => {
|
|
@@ -850,36 +850,36 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
850
850
|
_,
|
|
851
851
|
T,
|
|
852
852
|
C
|
|
853
|
-
]), /* @__PURE__ */
|
|
853
|
+
]), /* @__PURE__ */ W(l, {
|
|
854
854
|
error: x?.message,
|
|
855
855
|
helperText: u,
|
|
856
856
|
readOnly: d,
|
|
857
857
|
label: s,
|
|
858
858
|
htmlFor: m,
|
|
859
859
|
isRequired: e?.required,
|
|
860
|
-
children: [/* @__PURE__ */
|
|
860
|
+
children: [/* @__PURE__ */ U("div", {
|
|
861
861
|
ref: v,
|
|
862
|
-
className: Z(
|
|
863
|
-
children: w.map((e, t) => /* @__PURE__ */
|
|
864
|
-
className:
|
|
865
|
-
children: [/* @__PURE__ */
|
|
862
|
+
className: Z(pn, d && "_1vaa8ub1"),
|
|
863
|
+
children: w.map((e, t) => /* @__PURE__ */ W("div", {
|
|
864
|
+
className: mn,
|
|
865
|
+
children: [/* @__PURE__ */ U(vn, {
|
|
866
866
|
id: `${m}-${e.value}-${t}`,
|
|
867
867
|
name: m,
|
|
868
868
|
checked: _ ? _?.includes(e.value) : !1,
|
|
869
869
|
onCheckedChange: () => S(e.value),
|
|
870
870
|
onBlur: () => h(),
|
|
871
871
|
disabled: b
|
|
872
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ U(o, {
|
|
873
873
|
htmlFor: `${m}-${e.value}-${t}`,
|
|
874
|
-
className:
|
|
874
|
+
className: hn,
|
|
875
875
|
children: e.label
|
|
876
876
|
})]
|
|
877
877
|
}, `${e.value}-${t}`))
|
|
878
|
-
}), C && /* @__PURE__ */
|
|
878
|
+
}), C && /* @__PURE__ */ W("div", {
|
|
879
879
|
className: "_1vaa8ub4",
|
|
880
|
-
children: [/* @__PURE__ */
|
|
880
|
+
children: [/* @__PURE__ */ W("div", {
|
|
881
881
|
className: "_1vaa8ub5",
|
|
882
|
-
children: [/* @__PURE__ */
|
|
882
|
+
children: [/* @__PURE__ */ U(vn, {
|
|
883
883
|
name: `${m}-other`,
|
|
884
884
|
id: `${m}-other`,
|
|
885
885
|
disabled: b,
|
|
@@ -888,12 +888,12 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
888
888
|
i(!!e), e ? Array.isArray(_) ? g?.([..._, t]) : g?.([t]) : g?.((_ ?? [])?.filter((e) => e !== t));
|
|
889
889
|
},
|
|
890
890
|
onBlur: () => h()
|
|
891
|
-
}), /* @__PURE__ */
|
|
891
|
+
}), /* @__PURE__ */ W(o, {
|
|
892
892
|
htmlFor: `${m}-other`,
|
|
893
893
|
className: "_1vaa8ub3",
|
|
894
894
|
children: ["Other:", " "]
|
|
895
895
|
})]
|
|
896
|
-
}), /* @__PURE__ */
|
|
896
|
+
}), /* @__PURE__ */ U(y, {
|
|
897
897
|
name: `other-checkbox-${m}`,
|
|
898
898
|
className: "_1vaa8ub6",
|
|
899
899
|
value: t,
|
|
@@ -906,7 +906,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
906
906
|
})]
|
|
907
907
|
})]
|
|
908
908
|
});
|
|
909
|
-
},
|
|
909
|
+
}, bn = (e) => {
|
|
910
910
|
let t = E(39), n, r;
|
|
911
911
|
t[0] === e ? (n = t[1], r = t[2]) : ({field: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
912
912
|
let { key: i, label: a, helper_text: o, readonly: s } = n, u = i === void 0 ? "" : i, d = a === void 0 ? "" : a, f = o === void 0 ? "" : o, p = s === void 0 ? !1 : s, m = u, h;
|
|
@@ -916,7 +916,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
916
916
|
name: m,
|
|
917
917
|
rules: h
|
|
918
918
|
}, t[5] = m, t[6] = h, t[7] = _) : _ = t[7];
|
|
919
|
-
let { field: y, fieldState: b } =
|
|
919
|
+
let { field: y, fieldState: b } = Q(_), x, S, C, w, T;
|
|
920
920
|
t[8] === y ? (x = t[9], S = t[10], C = t[11], w = t[12], T = t[13]) : ({value: T, onBlur: x, onChange: S, ref: C, ...w} = y, t[8] = y, t[9] = x, t[10] = S, t[11] = C, t[12] = w, t[13] = T);
|
|
921
921
|
let D = !!n?.required, O = b?.error?.message, k = n?.options?.currency_code, A = `${k || "$"} `, j = `${k || "$"} 0`, M = k === "₹" ? "lakh" : "thousand", N;
|
|
922
922
|
t[14] === S ? N = t[15] : (N = (e, t) => {
|
|
@@ -931,7 +931,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
931
931
|
let F;
|
|
932
932
|
t[18] === Symbol.for("react.memo_cache_sentinel") ? (F = Z(v, g), t[18] = F) : F = t[18];
|
|
933
933
|
let I;
|
|
934
|
-
t[19] !== m || t[20] !== r || t[21] !== p || t[22] !== C || t[23] !== w || t[24] !== M || t[25] !== N || t[26] !== P || t[27] !== A || t[28] !== j || t[29] !== T ? (I = /* @__PURE__ */
|
|
934
|
+
t[19] !== m || t[20] !== r || t[21] !== p || t[22] !== C || t[23] !== w || t[24] !== M || t[25] !== N || t[26] !== P || t[27] !== A || t[28] !== j || t[29] !== T ? (I = /* @__PURE__ */ U(Te, {
|
|
935
935
|
thousandSeparator: !0,
|
|
936
936
|
prefix: A,
|
|
937
937
|
placeholder: j,
|
|
@@ -949,7 +949,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
949
949
|
...r
|
|
950
950
|
}), t[19] = m, t[20] = r, t[21] = p, t[22] = C, t[23] = w, t[24] = M, t[25] = N, t[26] = P, t[27] = A, t[28] = j, t[29] = T, t[30] = I) : I = t[30];
|
|
951
951
|
let L;
|
|
952
|
-
return t[31] !== O || t[32] !== f || t[33] !== D || t[34] !== d || t[35] !== m || t[36] !== p || t[37] !== I ? (L = /* @__PURE__ */
|
|
952
|
+
return t[31] !== O || t[32] !== f || t[33] !== D || t[34] !== d || t[35] !== m || t[36] !== p || t[37] !== I ? (L = /* @__PURE__ */ U(l, {
|
|
953
953
|
error: O,
|
|
954
954
|
helperText: f,
|
|
955
955
|
readOnly: p,
|
|
@@ -958,37 +958,37 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
958
958
|
label: d,
|
|
959
959
|
children: I
|
|
960
960
|
}), t[31] = O, t[32] = f, t[33] = D, t[34] = d, t[35] = m, t[36] = p, t[37] = I, t[38] = L) : L = t[38], L;
|
|
961
|
-
},
|
|
961
|
+
}, xn = {
|
|
962
962
|
label: "Other",
|
|
963
963
|
value: "other_internal"
|
|
964
|
-
},
|
|
965
|
-
let { portalRef: r } = n(), [i, a] =
|
|
964
|
+
}, Sn = ({ field: e, ...t }) => {
|
|
965
|
+
let { portalRef: r } = n(), [i, a] = V([]), { key: o = "", label: s = "", helper_text: u = "", readonly: d = !1, values: f = [], options: p = {} } = e, m = o, { field: { value: h, onBlur: g, onChange: _, disabled: v, ...b }, fieldState: x } = Q({
|
|
966
966
|
name: m,
|
|
967
967
|
rules: c(e)
|
|
968
|
-
}), [S, C] =
|
|
969
|
-
return
|
|
968
|
+
}), [S, C] = V(""), [w, T] = V(!1), E = !!e?.required, D = x?.error?.message, O = !!p?.custom_input;
|
|
969
|
+
return R(() => {
|
|
970
970
|
if (f?.length) {
|
|
971
|
-
let e = [...
|
|
972
|
-
O && e.push(
|
|
971
|
+
let e = [...dt(f)];
|
|
972
|
+
O && e.push(xn), a(e);
|
|
973
973
|
}
|
|
974
|
-
}, [f, O]),
|
|
975
|
-
!t?.isMulti && O && typeof h == "string" && h && (i.some((e) => e.value !==
|
|
974
|
+
}, [f, O]), R(() => {
|
|
975
|
+
!t?.isMulti && O && typeof h == "string" && h && (i.some((e) => e.value !== xn.value && e.value === h) ? T(!1) : (T(!0), C(h)));
|
|
976
976
|
}, [
|
|
977
977
|
h,
|
|
978
978
|
i,
|
|
979
979
|
O
|
|
980
|
-
]), /* @__PURE__ */
|
|
980
|
+
]), /* @__PURE__ */ W(l, {
|
|
981
981
|
error: D,
|
|
982
982
|
helperText: u,
|
|
983
983
|
readOnly: d,
|
|
984
984
|
label: s,
|
|
985
985
|
htmlFor: m,
|
|
986
986
|
isRequired: E,
|
|
987
|
-
children: [/* @__PURE__ */
|
|
987
|
+
children: [/* @__PURE__ */ U(Ee, {
|
|
988
988
|
id: m,
|
|
989
|
-
value: w ?
|
|
989
|
+
value: w ? xn : h ? t?.isMulti ? i?.filter((e) => h?.includes(e?.value)) : i?.find((e) => e?.value === h) : null,
|
|
990
990
|
onChange: (e) => {
|
|
991
|
-
O && e?.value ===
|
|
991
|
+
O && e?.value === xn.value && e?.label === xn.label ? (T(!0), C(""), _("")) : (T(!1), t?.isMulti ? _(e?.map((e) => e?.value)) : _(e?.value));
|
|
992
992
|
},
|
|
993
993
|
onBlur: () => g(),
|
|
994
994
|
options: i,
|
|
@@ -998,16 +998,16 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
998
998
|
...b,
|
|
999
999
|
...t,
|
|
1000
1000
|
unstyled: !0,
|
|
1001
|
-
classNames:
|
|
1001
|
+
classNames: rn,
|
|
1002
1002
|
styles: { menuPortal: (e) => ({
|
|
1003
1003
|
...e,
|
|
1004
1004
|
zIndex: 99999999
|
|
1005
1005
|
}) },
|
|
1006
1006
|
menuPosition: "fixed",
|
|
1007
1007
|
menuPortalTarget: r?.current
|
|
1008
|
-
}), w && /* @__PURE__ */
|
|
1008
|
+
}), w && /* @__PURE__ */ U("div", {
|
|
1009
1009
|
className: "ldp9z20",
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1010
|
+
children: /* @__PURE__ */ U(y, {
|
|
1011
1011
|
name: `select-other-${m}`,
|
|
1012
1012
|
value: S,
|
|
1013
1013
|
onChange: (e) => {
|
|
@@ -1017,10 +1017,10 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1017
1017
|
})
|
|
1018
1018
|
})]
|
|
1019
1019
|
});
|
|
1020
|
-
},
|
|
1020
|
+
}, Cn = "eviv4t0", wn = "eviv4t1", Tn = "eviv4t3", En = (e) => {
|
|
1021
1021
|
let t = E(50), n, r, i;
|
|
1022
1022
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({field: n, settings: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1023
|
-
let { key: a, label: o, helper_text: s, readonly: u } = n, d = a === void 0 ? "" : a, p = o === void 0 ? "" : o, m = s === void 0 ? "" : s, h = u === void 0 ? !1 : u, g = d, _ = !!n.options?.verification && !!i?.enableVerification, [v, b] =
|
|
1023
|
+
let { key: a, label: o, helper_text: s, readonly: u } = n, d = a === void 0 ? "" : a, p = o === void 0 ? "" : o, m = s === void 0 ? "" : s, h = u === void 0 ? !1 : u, g = d, _ = !!n.options?.verification && !!i?.enableVerification, [v, b] = V(null), [x, S] = V(!1), C;
|
|
1024
1024
|
t[4] !== x || t[5] !== _ || t[6] !== v ? (C = (e) => x ? !0 : _ && (!v || v !== e) ? "Email verification required" : !0, t[4] = x, t[5] = _, t[6] = v, t[7] = C) : C = t[7];
|
|
1025
1025
|
let w;
|
|
1026
1026
|
t[8] !== n || t[9] !== C ? (w = c(n, C), t[8] = n, t[9] = C, t[10] = w) : w = t[10];
|
|
@@ -1029,42 +1029,42 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1029
1029
|
name: g,
|
|
1030
1030
|
rules: T
|
|
1031
1031
|
}, t[11] = g, t[12] = T, t[13] = D) : D = t[13];
|
|
1032
|
-
let { field: O, fieldState: k } =
|
|
1032
|
+
let { field: O, fieldState: k } = Q(D), A, j, M, N;
|
|
1033
1033
|
t[14] === O ? (A = t[15], j = t[16], M = t[17], N = t[18]) : ({value: N, onBlur: j, onChange: M, ...A} = O, t[14] = O, t[15] = A, t[16] = j, t[17] = M, t[18] = N);
|
|
1034
1034
|
let P = !!n?.required, F = k?.error?.message, I = !!v && !!N && v === N?.trim()?.toLowerCase(), L;
|
|
1035
1035
|
t[19] === M ? L = t[20] : (L = (e) => {
|
|
1036
1036
|
b(e), M(e);
|
|
1037
1037
|
}, t[19] = M, t[20] = L);
|
|
1038
1038
|
let R = L, z;
|
|
1039
|
-
t[21] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */
|
|
1040
|
-
let
|
|
1041
|
-
t[22] === I ?
|
|
1039
|
+
t[21] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ U(ve, { size: 20 }), t[21] = z) : z = t[21];
|
|
1040
|
+
let B;
|
|
1041
|
+
t[22] === I ? B = t[23] : (B = I ? /* @__PURE__ */ U("button", {
|
|
1042
1042
|
type: "button",
|
|
1043
1043
|
onClick: () => b(null),
|
|
1044
|
-
className:
|
|
1044
|
+
className: Tn,
|
|
1045
1045
|
title: "Change email",
|
|
1046
|
-
children: /* @__PURE__ */
|
|
1047
|
-
}) : null, t[22] = I, t[23] =
|
|
1048
|
-
let
|
|
1046
|
+
children: /* @__PURE__ */ U(ye, { size: 14 })
|
|
1047
|
+
}) : null, t[22] = I, t[23] = B);
|
|
1048
|
+
let H = N || "", G;
|
|
1049
1049
|
t[24] === M ? G = t[25] : (G = (e) => M(e?.target?.value?.trim()?.toLocaleLowerCase()), t[24] = M, t[25] = G);
|
|
1050
1050
|
let K = h || I, q;
|
|
1051
|
-
t[26] !== A || t[27] !== g || t[28] !== j || t[29] !== r || t[30] !==
|
|
1052
|
-
className:
|
|
1051
|
+
t[26] !== A || t[27] !== g || t[28] !== j || t[29] !== r || t[30] !== B || t[31] !== H || t[32] !== G || t[33] !== K ? (q = /* @__PURE__ */ U(y, {
|
|
1052
|
+
className: wn,
|
|
1053
1053
|
id: g,
|
|
1054
1054
|
type: "email",
|
|
1055
1055
|
leftIcon: z,
|
|
1056
|
-
rightIcon:
|
|
1057
|
-
value:
|
|
1056
|
+
rightIcon: B,
|
|
1057
|
+
value: H,
|
|
1058
1058
|
onChange: G,
|
|
1059
1059
|
onBlur: j,
|
|
1060
1060
|
readOnly: K,
|
|
1061
1061
|
...A,
|
|
1062
1062
|
...r
|
|
1063
|
-
}), t[26] = A, t[27] = g, t[28] = j, t[29] = r, t[30] =
|
|
1063
|
+
}), t[26] = A, t[27] = g, t[28] = j, t[29] = r, t[30] = B, t[31] = H, t[32] = G, t[33] = K, t[34] = q) : q = t[34];
|
|
1064
1064
|
let J;
|
|
1065
|
-
t[35] !== R || t[36] !== I || t[37] !== _ || t[38] !== N ? (J = _ && /* @__PURE__ */
|
|
1065
|
+
t[35] !== R || t[36] !== I || t[37] !== _ || t[38] !== N ? (J = _ && /* @__PURE__ */ U("div", {
|
|
1066
1066
|
className: "eviv4t2",
|
|
1067
|
-
children: /* @__PURE__ */
|
|
1067
|
+
children: /* @__PURE__ */ U(f, {
|
|
1068
1068
|
value: N,
|
|
1069
1069
|
type: "email",
|
|
1070
1070
|
isVerified: I,
|
|
@@ -1073,12 +1073,12 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1073
1073
|
})
|
|
1074
1074
|
}), t[35] = R, t[36] = I, t[37] = _, t[38] = N, t[39] = J) : J = t[39];
|
|
1075
1075
|
let Y;
|
|
1076
|
-
t[40] !== q || t[41] !== J ? (Y = /* @__PURE__ */
|
|
1077
|
-
className:
|
|
1076
|
+
t[40] !== q || t[41] !== J ? (Y = /* @__PURE__ */ W("div", {
|
|
1077
|
+
className: Cn,
|
|
1078
1078
|
children: [q, J]
|
|
1079
1079
|
}), t[40] = q, t[41] = J, t[42] = Y) : Y = t[42];
|
|
1080
1080
|
let X;
|
|
1081
|
-
return t[43] !== F || t[44] !== m || t[45] !== P || t[46] !== p || t[47] !== g || t[48] !== Y ? (X = /* @__PURE__ */
|
|
1081
|
+
return t[43] !== F || t[44] !== m || t[45] !== P || t[46] !== p || t[47] !== g || t[48] !== Y ? (X = /* @__PURE__ */ U(l, {
|
|
1082
1082
|
error: F,
|
|
1083
1083
|
helperText: m,
|
|
1084
1084
|
label: p,
|
|
@@ -1086,18 +1086,18 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1086
1086
|
isRequired: P,
|
|
1087
1087
|
children: Y
|
|
1088
1088
|
}), t[43] = F, t[44] = m, t[45] = P, t[46] = p, t[47] = g, t[48] = Y, t[49] = X) : X = t[49], X;
|
|
1089
|
-
},
|
|
1089
|
+
}, Dn = (e) => e ? {
|
|
1090
1090
|
value: e,
|
|
1091
1091
|
label: e?.place_name || e?.formatted_address || e?.name
|
|
1092
|
-
} : null,
|
|
1093
|
-
let { portalRef: t } = n(), [r, i] =
|
|
1092
|
+
} : null, On = ({ field: e }) => {
|
|
1093
|
+
let { portalRef: t } = n(), [r, i] = V(!1), [a, o] = V(!1), s = A(), { key: u = "", label: d = "", helper_text: f = "", readonly: p = !1 } = e, { field: { value: m, onBlur: h, onChange: g, disabled: _, ...v }, fieldState: y } = Q({
|
|
1094
1094
|
name: u,
|
|
1095
1095
|
rules: c(e)
|
|
1096
1096
|
}), b = !!e?.required, x = y?.error?.message, S = (e) => {
|
|
1097
1097
|
e && e?.place_id !== m?.place_id ? (o(!0), s?.fetch.url(`/v1/bevy/content/location/${e?.place_id}/get-location-details`).get().json().then((e) => {
|
|
1098
1098
|
g && g(e?.content?.data);
|
|
1099
1099
|
}).catch((e) => {
|
|
1100
|
-
console.log("Could not fetch location details:",
|
|
1100
|
+
console.log("Could not fetch location details:", Y(e).message);
|
|
1101
1101
|
}).finally(() => o(!1))) : g(null);
|
|
1102
1102
|
}, C = (t, n) => {
|
|
1103
1103
|
i(!0);
|
|
@@ -1114,17 +1114,17 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1114
1114
|
n([]);
|
|
1115
1115
|
}).finally(() => i(!1));
|
|
1116
1116
|
};
|
|
1117
|
-
return /* @__PURE__ */
|
|
1117
|
+
return /* @__PURE__ */ U(l, {
|
|
1118
1118
|
error: x,
|
|
1119
1119
|
helperText: f,
|
|
1120
1120
|
readOnly: p,
|
|
1121
1121
|
label: d,
|
|
1122
1122
|
htmlFor: u,
|
|
1123
1123
|
isRequired: b,
|
|
1124
|
-
children: /* @__PURE__ */
|
|
1124
|
+
children: /* @__PURE__ */ U(De, {
|
|
1125
1125
|
id: u,
|
|
1126
|
-
value:
|
|
1127
|
-
defaultOptions: m ? [
|
|
1126
|
+
value: Dn(m),
|
|
1127
|
+
defaultOptions: m ? [Dn(m)] : void 0,
|
|
1128
1128
|
onChange: (e) => {
|
|
1129
1129
|
S(e?.value);
|
|
1130
1130
|
},
|
|
@@ -1133,7 +1133,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1133
1133
|
menuPlacement: "auto",
|
|
1134
1134
|
...v,
|
|
1135
1135
|
unstyled: !0,
|
|
1136
|
-
classNames:
|
|
1136
|
+
classNames: rn,
|
|
1137
1137
|
styles: { menuPortal: (e) => ({
|
|
1138
1138
|
...e,
|
|
1139
1139
|
zIndex: 99999999
|
|
@@ -1146,32 +1146,32 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1146
1146
|
noOptionsMessage: ({ inputValue: e }) => e ? "No results found. Try searching something else" : "Start typing to search"
|
|
1147
1147
|
})
|
|
1148
1148
|
});
|
|
1149
|
-
},
|
|
1149
|
+
}, kn = "xgv9uh0", An = "xgv9uh1", jn = "xgv9uh2", Mn = "xgv9uh3", Nn = "xgv9uh4", Pn = "xgv9uh5", Fn = (e) => {
|
|
1150
1150
|
let n = E(29), { field: r } = e, { key: i, label: a } = r, s = i === void 0 ? "" : i, c = a === void 0 ? "" : a, l;
|
|
1151
1151
|
n[0] === s ? l = n[1] : (l = { name: s }, n[0] = s, n[1] = l);
|
|
1152
|
-
let u =
|
|
1152
|
+
let u = ae(l), d, f, p, m, h, g;
|
|
1153
1153
|
if (n[2] !== r || n[3] !== s || n[4] !== c || n[5] !== u) {
|
|
1154
1154
|
let { fields: e, ...i } = u;
|
|
1155
|
-
d = i, m =
|
|
1155
|
+
d = i, m = kn, h = s, n[12] !== s || n[13] !== c ? (g = c && /* @__PURE__ */ U(o, {
|
|
1156
1156
|
htmlFor: s,
|
|
1157
1157
|
className: "_1ompjs11",
|
|
1158
1158
|
children: c
|
|
1159
|
-
}), n[12] = s, n[13] = c, n[14] = g) : g = n[14], f =
|
|
1160
|
-
className:
|
|
1161
|
-
children: [/* @__PURE__ */
|
|
1162
|
-
className:
|
|
1163
|
-
children: /* @__PURE__ */
|
|
1159
|
+
}), n[12] = s, n[13] = c, n[14] = g) : g = n[14], f = An, p = e?.map((e, n) => /* @__PURE__ */ W("div", {
|
|
1160
|
+
className: Mn,
|
|
1161
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1162
|
+
className: Nn,
|
|
1163
|
+
children: /* @__PURE__ */ U(On, { field: {
|
|
1164
1164
|
...r,
|
|
1165
1165
|
key: `${s}.${n}`,
|
|
1166
1166
|
label: ""
|
|
1167
1167
|
} })
|
|
1168
|
-
}), /* @__PURE__ */
|
|
1168
|
+
}), /* @__PURE__ */ U(t, {
|
|
1169
1169
|
variant: "ghost",
|
|
1170
1170
|
size: "icon-sm",
|
|
1171
|
-
className:
|
|
1171
|
+
className: Pn,
|
|
1172
1172
|
onClick: () => d.remove(n),
|
|
1173
1173
|
"aria-label": `Remove location ${n + 1}`,
|
|
1174
|
-
children: /* @__PURE__ */
|
|
1174
|
+
children: /* @__PURE__ */ U(xe, { size: 14 })
|
|
1175
1175
|
})]
|
|
1176
1176
|
}, e.id)), n[2] = r, n[3] = s, n[4] = c, n[5] = u, n[6] = d, n[7] = f, n[8] = p, n[9] = m, n[10] = h, n[11] = g;
|
|
1177
1177
|
} else d = n[6], f = n[7], p = n[8], m = n[9], h = n[10], g = n[11];
|
|
@@ -1180,36 +1180,36 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1180
1180
|
d.append(null);
|
|
1181
1181
|
}, n[15] = d, n[16] = _);
|
|
1182
1182
|
let v;
|
|
1183
|
-
n[17] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */
|
|
1183
|
+
n[17] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ U(be, { size: 14 }), n[17] = v) : v = n[17];
|
|
1184
1184
|
let y;
|
|
1185
|
-
n[18] === _ ? y = n[19] : (y = /* @__PURE__ */
|
|
1185
|
+
n[18] === _ ? y = n[19] : (y = /* @__PURE__ */ W(t, {
|
|
1186
1186
|
variant: "ghost",
|
|
1187
1187
|
size: "xs",
|
|
1188
|
-
className:
|
|
1188
|
+
className: jn,
|
|
1189
1189
|
onClick: _,
|
|
1190
1190
|
children: [v, "Add"]
|
|
1191
1191
|
}), n[18] = _, n[19] = y);
|
|
1192
1192
|
let b;
|
|
1193
|
-
n[20] !== y || n[21] !== f || n[22] !== p ? (b = /* @__PURE__ */
|
|
1193
|
+
n[20] !== y || n[21] !== f || n[22] !== p ? (b = /* @__PURE__ */ W("div", {
|
|
1194
1194
|
className: f,
|
|
1195
1195
|
children: [p, y]
|
|
1196
1196
|
}), n[20] = y, n[21] = f, n[22] = p, n[23] = b) : b = n[23];
|
|
1197
1197
|
let x;
|
|
1198
|
-
return n[24] !== b || n[25] !== m || n[26] !== h || n[27] !== g ? (x = /* @__PURE__ */
|
|
1198
|
+
return n[24] !== b || n[25] !== m || n[26] !== h || n[27] !== g ? (x = /* @__PURE__ */ W("div", {
|
|
1199
1199
|
className: m,
|
|
1200
1200
|
children: [g, b]
|
|
1201
1201
|
}, h), n[24] = b, n[25] = m, n[26] = h, n[27] = g, n[28] = x) : x = n[28], x;
|
|
1202
|
-
},
|
|
1203
|
-
let { key: t = "", label: n = "", helper_text: r = "", readonly: i = !1 } = e, a = t, { field: { value: o, onChange: s, onBlur: u, ref: d }, fieldState: f } =
|
|
1202
|
+
}, In = "a22xph0", Ln = "a22xph2", Rn = "a22xph3", zn = "a22xph5", Bn = /[\n\t,]+/, Vn = ({ field: e }) => {
|
|
1203
|
+
let { key: t = "", label: n = "", helper_text: r = "", readonly: i = !1 } = e, a = t, { field: { value: o, onChange: s, onBlur: u, ref: d }, fieldState: f } = Q({
|
|
1204
1204
|
name: a,
|
|
1205
1205
|
rules: c(e)
|
|
1206
|
-
}), p = !!e?.required, m = f?.error?.message, h = Array.isArray(o) ? o : [], [g, _] =
|
|
1206
|
+
}), p = !!e?.required, m = f?.error?.message, h = Array.isArray(o) ? o : [], [g, _] = V(""), [v, y] = V(-1), b = B(null), x = I((e) => {
|
|
1207
1207
|
b.current = e, typeof d == "function" && d(e);
|
|
1208
1208
|
}, [d]), S = I((e) => {
|
|
1209
1209
|
s(h.filter((t, n) => n !== e));
|
|
1210
1210
|
}, [h, s]), C = I(() => {
|
|
1211
1211
|
if (!g.trim()) return;
|
|
1212
|
-
let e = g.split(
|
|
1212
|
+
let e = g.split(Bn), t = [...h];
|
|
1213
1213
|
for (let n of e) {
|
|
1214
1214
|
let e = n.trim();
|
|
1215
1215
|
e && !t.includes(e) && t.push(e);
|
|
@@ -1252,9 +1252,9 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1252
1252
|
S
|
|
1253
1253
|
]), T = I((e) => {
|
|
1254
1254
|
let t = e.clipboardData.getData("text");
|
|
1255
|
-
if (
|
|
1255
|
+
if (Bn.test(t)) {
|
|
1256
1256
|
e.preventDefault();
|
|
1257
|
-
let n = t.split(
|
|
1257
|
+
let n = t.split(Bn), r = [...h];
|
|
1258
1258
|
for (let e of n) {
|
|
1259
1259
|
let t = e.trim();
|
|
1260
1260
|
t && !r.includes(t) && r.push(t);
|
|
@@ -1266,23 +1266,23 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1266
1266
|
}, []), D = I(() => {
|
|
1267
1267
|
C(), y(-1), u();
|
|
1268
1268
|
}, [C, u]);
|
|
1269
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ U(l, {
|
|
1270
1270
|
error: m,
|
|
1271
1271
|
helperText: r,
|
|
1272
1272
|
label: n,
|
|
1273
1273
|
htmlFor: a,
|
|
1274
1274
|
isRequired: p,
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1276
|
-
className:
|
|
1275
|
+
children: /* @__PURE__ */ W("div", {
|
|
1276
|
+
className: In,
|
|
1277
1277
|
"data-readonly": i,
|
|
1278
1278
|
onClick: E,
|
|
1279
|
-
children: [h.map((e, t) => /* @__PURE__ */
|
|
1280
|
-
className:
|
|
1279
|
+
children: [h.map((e, t) => /* @__PURE__ */ W("span", {
|
|
1280
|
+
className: Ln,
|
|
1281
1281
|
"data-active": v === t,
|
|
1282
|
-
children: [/* @__PURE__ */
|
|
1283
|
-
className:
|
|
1282
|
+
children: [/* @__PURE__ */ U("span", {
|
|
1283
|
+
className: Rn,
|
|
1284
1284
|
children: e
|
|
1285
|
-
}), !i && /* @__PURE__ */
|
|
1285
|
+
}), !i && /* @__PURE__ */ U("button", {
|
|
1286
1286
|
type: "button",
|
|
1287
1287
|
className: "a22xph4",
|
|
1288
1288
|
onClick: (e) => {
|
|
@@ -1290,12 +1290,12 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1290
1290
|
},
|
|
1291
1291
|
"aria-label": `Remove ${e}`,
|
|
1292
1292
|
tabIndex: -1,
|
|
1293
|
-
children: /* @__PURE__ */
|
|
1293
|
+
children: /* @__PURE__ */ U(Ce, { size: 12 })
|
|
1294
1294
|
})]
|
|
1295
|
-
}, `${e}-${t}`)), /* @__PURE__ */
|
|
1295
|
+
}, `${e}-${t}`)), /* @__PURE__ */ U("input", {
|
|
1296
1296
|
ref: x,
|
|
1297
1297
|
id: a,
|
|
1298
|
-
className:
|
|
1298
|
+
className: zn,
|
|
1299
1299
|
type: "text",
|
|
1300
1300
|
value: g,
|
|
1301
1301
|
onChange: (e) => _(e.target.value),
|
|
@@ -1309,36 +1309,36 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1309
1309
|
})]
|
|
1310
1310
|
})
|
|
1311
1311
|
});
|
|
1312
|
-
},
|
|
1312
|
+
}, Hn = "jqes4z0", Un = "jqes4z2", Wn = "jqes4z3", Gn = "_1mrsmih0", Kn = "_1mrsmih1", qn = "_1mrsmih2", Jn = "_1mrsmih3", Yn = (e) => {
|
|
1313
1313
|
let t = E(8), n, r;
|
|
1314
1314
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1315
1315
|
let i;
|
|
1316
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
1316
|
+
t[3] === n ? i = t[4] : (i = Z(Gn, n), t[3] = n, t[4] = i);
|
|
1317
1317
|
let a;
|
|
1318
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
1318
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U(ke, {
|
|
1319
1319
|
"data-slot": "radio-group",
|
|
1320
1320
|
className: i,
|
|
1321
1321
|
...r
|
|
1322
1322
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
1323
|
-
},
|
|
1323
|
+
}, Xn = (e) => {
|
|
1324
1324
|
let t = E(9), n, r;
|
|
1325
1325
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1326
1326
|
let i;
|
|
1327
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
1327
|
+
t[3] === n ? i = t[4] : (i = Z(Kn, n), t[3] = n, t[4] = i);
|
|
1328
1328
|
let a;
|
|
1329
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
1329
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ U(Oe.Indicator, {
|
|
1330
1330
|
"data-slot": "radio-group-indicator",
|
|
1331
|
-
className:
|
|
1332
|
-
children: /* @__PURE__ */
|
|
1331
|
+
className: qn,
|
|
1332
|
+
children: /* @__PURE__ */ U("span", { className: Jn })
|
|
1333
1333
|
}), t[5] = a) : a = t[5];
|
|
1334
1334
|
let o;
|
|
1335
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
1335
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ U(Oe.Root, {
|
|
1336
1336
|
"data-slot": "radio-group-item",
|
|
1337
1337
|
className: i,
|
|
1338
1338
|
...r,
|
|
1339
1339
|
children: a
|
|
1340
1340
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
1341
|
-
},
|
|
1341
|
+
}, Zn = (e) => {
|
|
1342
1342
|
let t = E(56), { field: n } = e, [r, i] = j.useState(""), [a, s] = j.useState(!1), { key: u, label: d, helper_text: f, readonly: p, values: m, options: h } = n, g = u === void 0 ? "" : u, _ = d === void 0 ? "" : d, v = f === void 0 ? "" : f, b = p === void 0 ? !1 : p, x;
|
|
1343
1343
|
t[0] === m ? x = t[1] : (x = m === void 0 ? [] : m, t[0] = m, t[1] = x);
|
|
1344
1344
|
let S = x, C;
|
|
@@ -1350,10 +1350,10 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1350
1350
|
name: T,
|
|
1351
1351
|
rules: D
|
|
1352
1352
|
}, t[6] = T, t[7] = D, t[8] = O) : O = t[8];
|
|
1353
|
-
let { field: k, fieldState: A } =
|
|
1353
|
+
let { field: k, fieldState: A } = Q(O), M, N, P, F;
|
|
1354
1354
|
t[9] === k ? (M = t[10], N = t[11], P = t[12], F = t[13]) : ({value: F, onBlur: M, onChange: N, ...P} = k, t[9] = k, t[10] = M, t[11] = N, t[12] = P, t[13] = F);
|
|
1355
1355
|
let I = !!n?.required, L = A?.error?.message, R;
|
|
1356
|
-
t[14] === S ? R = t[15] : (R =
|
|
1356
|
+
t[14] === S ? R = t[15] : (R = dt(S), t[14] = S, t[15] = R);
|
|
1357
1357
|
let z = R, B, V;
|
|
1358
1358
|
t[16] !== z || t[17] !== a || t[18] !== F ? (B = () => {
|
|
1359
1359
|
a || F && z.findIndex((e) => e.value === F) === -1 && (s(!0), i(F));
|
|
@@ -1362,8 +1362,8 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1362
1362
|
z,
|
|
1363
1363
|
a
|
|
1364
1364
|
], t[16] = z, t[17] = a, t[18] = F, t[19] = B, t[20] = V) : (B = t[19], V = t[20]), j.useEffect(B, V);
|
|
1365
|
-
let
|
|
1366
|
-
t[21] ===
|
|
1365
|
+
let H = b && "jqes4z1", G;
|
|
1366
|
+
t[21] === H ? G = t[22] : (G = Z(Hn, H), t[21] = H, t[22] = G);
|
|
1367
1367
|
let K;
|
|
1368
1368
|
t[23] !== N || t[24] !== r ? (K = (e) => {
|
|
1369
1369
|
N && (e === "Other" ? (s(!0), N(r)) : (s(!1), N(e)));
|
|
@@ -1373,34 +1373,34 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1373
1373
|
let J = a ? "Other" : F ?? "", Y;
|
|
1374
1374
|
if (t[28] !== z || t[29] !== T) {
|
|
1375
1375
|
let e;
|
|
1376
|
-
t[31] === T ? e = t[32] : (e = (e, t) => /* @__PURE__ */
|
|
1377
|
-
className:
|
|
1378
|
-
children: [/* @__PURE__ */
|
|
1376
|
+
t[31] === T ? e = t[32] : (e = (e, t) => /* @__PURE__ */ W("div", {
|
|
1377
|
+
className: Un,
|
|
1378
|
+
children: [/* @__PURE__ */ U(Xn, {
|
|
1379
1379
|
id: `${T}-${e.value}-${t}`,
|
|
1380
1380
|
value: e.value
|
|
1381
|
-
}), /* @__PURE__ */
|
|
1381
|
+
}), /* @__PURE__ */ U(o, {
|
|
1382
1382
|
htmlFor: `${T}-${e.value}-${t}`,
|
|
1383
|
-
className:
|
|
1383
|
+
className: Wn,
|
|
1384
1384
|
children: e.label
|
|
1385
1385
|
})]
|
|
1386
1386
|
}, `${e.value}-${t}`), t[31] = T, t[32] = e), Y = z.map(e), t[28] = z, t[29] = T, t[30] = Y;
|
|
1387
1387
|
} else Y = t[30];
|
|
1388
1388
|
let X;
|
|
1389
|
-
t[33] !== w || t[34] !== T || t[35] !== N || t[36] !== a || t[37] !== r ? (X = !!w && /* @__PURE__ */
|
|
1389
|
+
t[33] !== w || t[34] !== T || t[35] !== N || t[36] !== a || t[37] !== r ? (X = !!w && /* @__PURE__ */ W("div", {
|
|
1390
1390
|
className: "jqes4z4",
|
|
1391
1391
|
children: [
|
|
1392
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ U(Xn, {
|
|
1393
1393
|
id: `${T}-other`,
|
|
1394
1394
|
value: "Other"
|
|
1395
1395
|
}),
|
|
1396
|
-
/* @__PURE__ */
|
|
1396
|
+
/* @__PURE__ */ U(o, {
|
|
1397
1397
|
className: "jqes4z3",
|
|
1398
1398
|
htmlFor: `${T}-other`,
|
|
1399
1399
|
children: "Other:"
|
|
1400
1400
|
}),
|
|
1401
|
-
/* @__PURE__ */
|
|
1401
|
+
/* @__PURE__ */ U("div", {
|
|
1402
1402
|
className: "jqes4z6",
|
|
1403
|
-
children: /* @__PURE__ */
|
|
1403
|
+
children: /* @__PURE__ */ U(y, {
|
|
1404
1404
|
className: "jqes4z5",
|
|
1405
1405
|
name: `radio-other-${T}`,
|
|
1406
1406
|
value: r,
|
|
@@ -1414,7 +1414,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1414
1414
|
]
|
|
1415
1415
|
}), t[33] = w, t[34] = T, t[35] = N, t[36] = a, t[37] = r, t[38] = X) : X = t[38];
|
|
1416
1416
|
let ee;
|
|
1417
|
-
t[39] !== T || t[40] !== P || t[41] !== G || t[42] !== K || t[43] !== q || t[44] !== J || t[45] !== Y || t[46] !== X ? (ee = /* @__PURE__ */
|
|
1417
|
+
t[39] !== T || t[40] !== P || t[41] !== G || t[42] !== K || t[43] !== q || t[44] !== J || t[45] !== Y || t[46] !== X ? (ee = /* @__PURE__ */ W(Yn, {
|
|
1418
1418
|
id: T,
|
|
1419
1419
|
className: G,
|
|
1420
1420
|
onValueChange: K,
|
|
@@ -1423,8 +1423,8 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1423
1423
|
...P,
|
|
1424
1424
|
children: [Y, X]
|
|
1425
1425
|
}), t[39] = T, t[40] = P, t[41] = G, t[42] = K, t[43] = q, t[44] = J, t[45] = Y, t[46] = X, t[47] = ee) : ee = t[47];
|
|
1426
|
-
let
|
|
1427
|
-
return t[48] !== L || t[49] !== v || t[50] !== I || t[51] !== _ || t[52] !== T || t[53] !== b || t[54] !== ee ? (
|
|
1426
|
+
let te;
|
|
1427
|
+
return t[48] !== L || t[49] !== v || t[50] !== I || t[51] !== _ || t[52] !== T || t[53] !== b || t[54] !== ee ? (te = /* @__PURE__ */ U(l, {
|
|
1428
1428
|
error: L,
|
|
1429
1429
|
helperText: v,
|
|
1430
1430
|
readOnly: b,
|
|
@@ -1432,8 +1432,8 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1432
1432
|
htmlFor: T,
|
|
1433
1433
|
isRequired: I,
|
|
1434
1434
|
children: ee
|
|
1435
|
-
}), t[48] = L, t[49] = v, t[50] = I, t[51] = _, t[52] = T, t[53] = b, t[54] = ee, t[55] =
|
|
1436
|
-
},
|
|
1435
|
+
}), t[48] = L, t[49] = v, t[50] = I, t[51] = _, t[52] = T, t[53] = b, t[54] = ee, t[55] = te) : te = t[55], te;
|
|
1436
|
+
}, Qn = "i9l98i0", $n = ne({
|
|
1437
1437
|
defaultClassName: "_193nrs70",
|
|
1438
1438
|
variantClassNames: { size: {
|
|
1439
1439
|
default: "_193nrs71",
|
|
@@ -1441,26 +1441,26 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1441
1441
|
} },
|
|
1442
1442
|
defaultVariants: { size: "default" },
|
|
1443
1443
|
compoundVariants: []
|
|
1444
|
-
}),
|
|
1444
|
+
}), er = "_193nrs73", tr = "_193nrs74", nr = "_193nrs75", rr = (e) => {
|
|
1445
1445
|
let t = E(15), n, r, i;
|
|
1446
1446
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, size: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1447
1447
|
let a = i === void 0 ? "default" : i, o;
|
|
1448
|
-
t[4] !== n || t[5] !== a ? (o = Z(
|
|
1449
|
-
let s = a === "sm" ?
|
|
1450
|
-
t[7] === s ? c = t[8] : (c = Z(
|
|
1448
|
+
t[4] !== n || t[5] !== a ? (o = Z($n({ size: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
1449
|
+
let s = a === "sm" ? nr : tr, c;
|
|
1450
|
+
t[7] === s ? c = t[8] : (c = Z(er, s), t[7] = s, t[8] = c);
|
|
1451
1451
|
let l;
|
|
1452
|
-
t[9] === c ? l = t[10] : (l = /* @__PURE__ */
|
|
1452
|
+
t[9] === c ? l = t[10] : (l = /* @__PURE__ */ U(Ae.Thumb, {
|
|
1453
1453
|
"data-slot": "switch-thumb",
|
|
1454
1454
|
className: c
|
|
1455
1455
|
}), t[9] = c, t[10] = l);
|
|
1456
1456
|
let u;
|
|
1457
|
-
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */
|
|
1457
|
+
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */ U(Ae.Root, {
|
|
1458
1458
|
"data-slot": "switch",
|
|
1459
1459
|
className: o,
|
|
1460
1460
|
...r,
|
|
1461
1461
|
children: l
|
|
1462
1462
|
}), t[11] = r, t[12] = o, t[13] = l, t[14] = u) : u = t[14], u;
|
|
1463
|
-
},
|
|
1463
|
+
}, ir = (e) => {
|
|
1464
1464
|
let t = E(32), { field: n } = e, { key: r, label: i, helper_text: a, readonly: o } = n, u = r === void 0 ? "" : r, d = i === void 0 ? "" : i, f = a === void 0 ? "" : a, p = o === void 0 ? !1 : o, m = u, h;
|
|
1465
1465
|
t[0] === n ? h = t[1] : (h = c(n), t[0] = n, t[1] = h);
|
|
1466
1466
|
let g;
|
|
@@ -1468,14 +1468,14 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1468
1468
|
name: m,
|
|
1469
1469
|
rules: h
|
|
1470
1470
|
}, t[2] = m, t[3] = h, t[4] = g) : g = t[4];
|
|
1471
|
-
let { field: _, fieldState: v } =
|
|
1471
|
+
let { field: _, fieldState: v } = Q(g), y, b, x, S;
|
|
1472
1472
|
t[5] === _ ? (y = t[6], b = t[7], x = t[8], S = t[9]) : ({value: S, onBlur: y, onChange: b, ...x} = _, t[5] = _, t[6] = y, t[7] = b, t[8] = x, t[9] = S);
|
|
1473
1473
|
let C = !!n?.required, w = v?.error?.message, T = !!S, D;
|
|
1474
1474
|
t[10] === b ? D = t[11] : (D = (e) => b?.(e), t[10] = b, t[11] = D);
|
|
1475
1475
|
let O;
|
|
1476
1476
|
t[12] === y ? O = t[13] : (O = () => y?.(), t[12] = y, t[13] = O);
|
|
1477
1477
|
let k;
|
|
1478
|
-
t[14] !== m || t[15] !== x || t[16] !== O || t[17] !== T || t[18] !== D ? (k = /* @__PURE__ */
|
|
1478
|
+
t[14] !== m || t[15] !== x || t[16] !== O || t[17] !== T || t[18] !== D ? (k = /* @__PURE__ */ U(rr, {
|
|
1479
1479
|
id: m,
|
|
1480
1480
|
checked: T,
|
|
1481
1481
|
onCheckedChange: D,
|
|
@@ -1483,24 +1483,24 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1483
1483
|
...x
|
|
1484
1484
|
}), t[14] = m, t[15] = x, t[16] = O, t[17] = T, t[18] = D, t[19] = k) : k = t[19];
|
|
1485
1485
|
let A;
|
|
1486
|
-
t[20] !== C || t[21] !== d || t[22] !== m ? (A = /* @__PURE__ */
|
|
1486
|
+
t[20] !== C || t[21] !== d || t[22] !== m ? (A = /* @__PURE__ */ U(s, {
|
|
1487
1487
|
label: d,
|
|
1488
1488
|
isRequired: C,
|
|
1489
1489
|
htmlFor: m
|
|
1490
1490
|
}), t[20] = C, t[21] = d, t[22] = m, t[23] = A) : A = t[23];
|
|
1491
1491
|
let j;
|
|
1492
|
-
t[24] !== k || t[25] !== A ? (j = /* @__PURE__ */
|
|
1493
|
-
className:
|
|
1492
|
+
t[24] !== k || t[25] !== A ? (j = /* @__PURE__ */ W("div", {
|
|
1493
|
+
className: Qn,
|
|
1494
1494
|
children: [k, A]
|
|
1495
1495
|
}), t[24] = k, t[25] = A, t[26] = j) : j = t[26];
|
|
1496
1496
|
let M;
|
|
1497
|
-
return t[27] !== w || t[28] !== f || t[29] !== p || t[30] !== j ? (M = /* @__PURE__ */
|
|
1497
|
+
return t[27] !== w || t[28] !== f || t[29] !== p || t[30] !== j ? (M = /* @__PURE__ */ U(l, {
|
|
1498
1498
|
error: w,
|
|
1499
1499
|
helperText: f,
|
|
1500
1500
|
readOnly: p,
|
|
1501
1501
|
children: j
|
|
1502
1502
|
}), t[27] = w, t[28] = f, t[29] = p, t[30] = j, t[31] = M) : M = t[31], M;
|
|
1503
|
-
},
|
|
1503
|
+
}, ar = "gaaqp00", or = (e) => {
|
|
1504
1504
|
let t = E(29), { field: n } = e, { key: r, label: i, helper_text: a, readonly: o } = n, s = r === void 0 ? "" : r, u = i === void 0 ? "" : i, d = a === void 0 ? "" : a, f = o === void 0 ? !1 : o, p = s, m = !!n?.required, h;
|
|
1505
1505
|
t[0] === n ? h = t[1] : (h = c(n), t[0] = n, t[1] = h);
|
|
1506
1506
|
let g;
|
|
@@ -1508,12 +1508,12 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1508
1508
|
name: p,
|
|
1509
1509
|
rules: h
|
|
1510
1510
|
}, t[2] = p, t[3] = h, t[4] = g) : g = t[4];
|
|
1511
|
-
let { field: v, fieldState: y } =
|
|
1511
|
+
let { field: v, fieldState: y } = Q(g), b, x, S, C, w, T;
|
|
1512
1512
|
t[5] === v ? (b = t[6], x = t[7], S = t[8], C = t[9], w = t[10], T = t[11]) : ({value: T, onBlur: x, onChange: S, ref: C, disabled: b, ...w} = v, t[5] = v, t[6] = b, t[7] = x, t[8] = S, t[9] = C, t[10] = w, t[11] = T);
|
|
1513
1513
|
let D = y?.error?.message, O;
|
|
1514
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (O = Z(
|
|
1514
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (O = Z(ar), t[12] = O) : O = t[12];
|
|
1515
1515
|
let k = T || "", A;
|
|
1516
|
-
t[13] !== b || t[14] !== p || t[15] !== x || t[16] !== S || t[17] !== f || t[18] !== C || t[19] !== w || t[20] !== k ? (A = /* @__PURE__ */
|
|
1516
|
+
t[13] !== b || t[14] !== p || t[15] !== x || t[16] !== S || t[17] !== f || t[18] !== C || t[19] !== w || t[20] !== k ? (A = /* @__PURE__ */ U(_, {
|
|
1517
1517
|
id: p,
|
|
1518
1518
|
className: O,
|
|
1519
1519
|
readOnly: f,
|
|
@@ -1525,7 +1525,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1525
1525
|
...w
|
|
1526
1526
|
}), t[13] = b, t[14] = p, t[15] = x, t[16] = S, t[17] = f, t[18] = C, t[19] = w, t[20] = k, t[21] = A) : A = t[21];
|
|
1527
1527
|
let j;
|
|
1528
|
-
return t[22] !== D || t[23] !== d || t[24] !== m || t[25] !== u || t[26] !== p || t[27] !== A ? (j = /* @__PURE__ */
|
|
1528
|
+
return t[22] !== D || t[23] !== d || t[24] !== m || t[25] !== u || t[26] !== p || t[27] !== A ? (j = /* @__PURE__ */ U(l, {
|
|
1529
1529
|
error: D,
|
|
1530
1530
|
helperText: d,
|
|
1531
1531
|
label: u,
|
|
@@ -1533,7 +1533,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1533
1533
|
isRequired: m,
|
|
1534
1534
|
children: A
|
|
1535
1535
|
}), t[22] = D, t[23] = d, t[24] = m, t[25] = u, t[26] = p, t[27] = A, t[28] = j) : j = t[28], j;
|
|
1536
|
-
},
|
|
1536
|
+
}, sr = (e) => {
|
|
1537
1537
|
let t = E(36), n, r, i;
|
|
1538
1538
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({field: n, inputStyles: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1539
1539
|
let { key: a, label: o, helper_text: s, readonly: u } = n, d = a === void 0 ? "" : a, f = o === void 0 ? "" : o, p = s === void 0 ? "" : s, m = u === void 0 ? !1 : u, h = d, g = !!n?.required, _;
|
|
@@ -1543,12 +1543,12 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1543
1543
|
name: h,
|
|
1544
1544
|
rules: _
|
|
1545
1545
|
}, t[6] = h, t[7] = _, t[8] = v) : v = t[8];
|
|
1546
|
-
let { field: b, fieldState: x } =
|
|
1546
|
+
let { field: b, fieldState: x } = Q(v), S, C, w, T, D, O;
|
|
1547
1547
|
t[9] === b ? (S = t[10], C = t[11], w = t[12], T = t[13], D = t[14], O = t[15]) : ({value: O, onBlur: C, onChange: w, ref: T, disabled: S, ...D} = b, t[9] = b, t[10] = S, t[11] = C, t[12] = w, t[13] = T, t[14] = D, t[15] = O);
|
|
1548
1548
|
let k = x?.error?.message, A;
|
|
1549
1549
|
t[16] === i ? A = t[17] : (A = Z(i), t[16] = i, t[17] = A);
|
|
1550
1550
|
let j = O || "", M;
|
|
1551
|
-
t[18] !== S || t[19] !== r || t[20] !== h || t[21] !== C || t[22] !== w || t[23] !== m || t[24] !== T || t[25] !== D || t[26] !== A || t[27] !== j ? (M = /* @__PURE__ */
|
|
1551
|
+
t[18] !== S || t[19] !== r || t[20] !== h || t[21] !== C || t[22] !== w || t[23] !== m || t[24] !== T || t[25] !== D || t[26] !== A || t[27] !== j ? (M = /* @__PURE__ */ U(y, {
|
|
1552
1552
|
id: h,
|
|
1553
1553
|
className: A,
|
|
1554
1554
|
readOnly: m,
|
|
@@ -1561,7 +1561,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1561
1561
|
...r
|
|
1562
1562
|
}), t[18] = S, t[19] = r, t[20] = h, t[21] = C, t[22] = w, t[23] = m, t[24] = T, t[25] = D, t[26] = A, t[27] = j, t[28] = M) : M = t[28];
|
|
1563
1563
|
let N;
|
|
1564
|
-
return t[29] !== k || t[30] !== p || t[31] !== g || t[32] !== f || t[33] !== h || t[34] !== M ? (N = /* @__PURE__ */
|
|
1564
|
+
return t[29] !== k || t[30] !== p || t[31] !== g || t[32] !== f || t[33] !== h || t[34] !== M ? (N = /* @__PURE__ */ U(l, {
|
|
1565
1565
|
error: k,
|
|
1566
1566
|
helperText: p,
|
|
1567
1567
|
label: f,
|
|
@@ -1569,7 +1569,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1569
1569
|
isRequired: g,
|
|
1570
1570
|
children: M
|
|
1571
1571
|
}), t[29] = k, t[30] = p, t[31] = g, t[32] = f, t[33] = h, t[34] = M, t[35] = N) : N = t[35], N;
|
|
1572
|
-
},
|
|
1572
|
+
}, cr = (e) => {
|
|
1573
1573
|
let t = E(27), { field: n } = e, { key: r, label: i, helper_text: a, readonly: o } = n, s = r === void 0 ? "" : r, u = i === void 0 ? "" : i, d = a === void 0 ? "" : a, f = o === void 0 ? !1 : o, p = s, m;
|
|
1574
1574
|
t[0] === n ? m = t[1] : (m = c(n), t[0] = n, t[1] = m);
|
|
1575
1575
|
let h;
|
|
@@ -1577,10 +1577,10 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1577
1577
|
name: p,
|
|
1578
1578
|
rules: m
|
|
1579
1579
|
}, t[2] = p, t[3] = m, t[4] = h) : h = t[4];
|
|
1580
|
-
let { field: g, fieldState: _ } =
|
|
1580
|
+
let { field: g, fieldState: _ } = Q(h), { value: v, onBlur: b, onChange: x, ref: S } = g, C = !!n?.required, w = _?.error?.message, T = v || "", D;
|
|
1581
1581
|
t[5] === x ? D = t[6] : (D = (e) => x(e.target.value || null), t[5] = x, t[6] = D);
|
|
1582
1582
|
let O;
|
|
1583
|
-
t[7] !== x || t[8] !== f || t[9] !== v ? (O = v && !f ? /* @__PURE__ */
|
|
1583
|
+
t[7] !== x || t[8] !== f || t[9] !== v ? (O = v && !f ? /* @__PURE__ */ U("button", {
|
|
1584
1584
|
type: "button",
|
|
1585
1585
|
onClick: (e) => {
|
|
1586
1586
|
e.preventDefault(), e.stopPropagation(), x(null);
|
|
@@ -1593,10 +1593,10 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1593
1593
|
padding: 0
|
|
1594
1594
|
},
|
|
1595
1595
|
"aria-label": "Clear time",
|
|
1596
|
-
children: /* @__PURE__ */
|
|
1596
|
+
children: /* @__PURE__ */ U(Ce, { size: 16 })
|
|
1597
1597
|
}) : void 0, t[7] = x, t[8] = f, t[9] = v, t[10] = O) : O = t[10];
|
|
1598
1598
|
let k;
|
|
1599
|
-
t[11] !== p || t[12] !== b || t[13] !== f || t[14] !== S || t[15] !== O || t[16] !== T || t[17] !== D ? (k = /* @__PURE__ */
|
|
1599
|
+
t[11] !== p || t[12] !== b || t[13] !== f || t[14] !== S || t[15] !== O || t[16] !== T || t[17] !== D ? (k = /* @__PURE__ */ U(y, {
|
|
1600
1600
|
id: p,
|
|
1601
1601
|
ref: S,
|
|
1602
1602
|
type: "time",
|
|
@@ -1607,7 +1607,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1607
1607
|
rightIcon: O
|
|
1608
1608
|
}), t[11] = p, t[12] = b, t[13] = f, t[14] = S, t[15] = O, t[16] = T, t[17] = D, t[18] = k) : k = t[18];
|
|
1609
1609
|
let A;
|
|
1610
|
-
return t[19] !== w || t[20] !== d || t[21] !== C || t[22] !== u || t[23] !== p || t[24] !== f || t[25] !== k ? (A = /* @__PURE__ */
|
|
1610
|
+
return t[19] !== w || t[20] !== d || t[21] !== C || t[22] !== u || t[23] !== p || t[24] !== f || t[25] !== k ? (A = /* @__PURE__ */ U(l, {
|
|
1611
1611
|
helperText: d,
|
|
1612
1612
|
readOnly: f,
|
|
1613
1613
|
error: w,
|
|
@@ -1616,7 +1616,7 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1616
1616
|
label: u,
|
|
1617
1617
|
children: k
|
|
1618
1618
|
}), t[19] = w, t[20] = d, t[21] = C, t[22] = u, t[23] = p, t[24] = f, t[25] = k, t[26] = A) : A = t[26], A;
|
|
1619
|
-
},
|
|
1619
|
+
}, lr = "_3j2y9l0", ur = (e) => {
|
|
1620
1620
|
let t = E(28), { field: n } = e, { key: r, label: i, helper_text: a, readonly: s } = n, u = r === void 0 ? "" : r, d = i === void 0 ? "" : i, f = a === void 0 ? "" : a, p = s === void 0 ? !1 : s, m;
|
|
1621
1621
|
t[0] === n ? m = t[1] : (m = c(n), t[0] = n, t[1] = m);
|
|
1622
1622
|
let h;
|
|
@@ -1624,12 +1624,12 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1624
1624
|
name: u,
|
|
1625
1625
|
rules: m
|
|
1626
1626
|
}, t[2] = u, t[3] = m, t[4] = h) : h = t[4];
|
|
1627
|
-
let { field: g, fieldState: _ } =
|
|
1627
|
+
let { field: g, fieldState: _ } = Q(h), { name: v, onBlur: y, onChange: b, ref: x, value: S, disabled: C } = g, { error: w } = _, T = w?.message, D = !!S, O;
|
|
1628
1628
|
t[5] === b ? O = t[6] : (O = (e) => b(e), t[5] = b, t[6] = O);
|
|
1629
1629
|
let k;
|
|
1630
1630
|
t[7] === y ? k = t[8] : (k = () => y(), t[7] = y, t[8] = k);
|
|
1631
1631
|
let A;
|
|
1632
|
-
t[9] !== C || t[10] !== v || t[11] !== D || t[12] !== O || t[13] !== k ? (A = /* @__PURE__ */
|
|
1632
|
+
t[9] !== C || t[10] !== v || t[11] !== D || t[12] !== O || t[13] !== k ? (A = /* @__PURE__ */ U(vn, {
|
|
1633
1633
|
id: v,
|
|
1634
1634
|
name: v,
|
|
1635
1635
|
checked: D,
|
|
@@ -1638,35 +1638,35 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1638
1638
|
disabled: C
|
|
1639
1639
|
}), t[9] = C, t[10] = v, t[11] = D, t[12] = O, t[13] = k, t[14] = A) : A = t[14];
|
|
1640
1640
|
let j;
|
|
1641
|
-
t[15] !== n.required || t[16] !== d || t[17] !== v ? (j = d && /* @__PURE__ */
|
|
1641
|
+
t[15] !== n.required || t[16] !== d || t[17] !== v ? (j = d && /* @__PURE__ */ W(o, {
|
|
1642
1642
|
htmlFor: v,
|
|
1643
1643
|
className: "_3j2y9l1",
|
|
1644
|
-
children: [d, n?.required && /* @__PURE__ */
|
|
1644
|
+
children: [d, n?.required && /* @__PURE__ */ U("span", {
|
|
1645
1645
|
className: "_1ompjs10",
|
|
1646
1646
|
children: "*"
|
|
1647
1647
|
})]
|
|
1648
1648
|
}), t[15] = n.required, t[16] = d, t[17] = v, t[18] = j) : j = t[18];
|
|
1649
1649
|
let M;
|
|
1650
|
-
t[19] !== x || t[20] !== A || t[21] !== j ? (M = /* @__PURE__ */
|
|
1651
|
-
className:
|
|
1650
|
+
t[19] !== x || t[20] !== A || t[21] !== j ? (M = /* @__PURE__ */ W("div", {
|
|
1651
|
+
className: lr,
|
|
1652
1652
|
ref: x,
|
|
1653
1653
|
children: [A, j]
|
|
1654
1654
|
}), t[19] = x, t[20] = A, t[21] = j, t[22] = M) : M = t[22];
|
|
1655
1655
|
let N;
|
|
1656
|
-
return t[23] !== f || t[24] !== p || t[25] !== M || t[26] !== T ? (N = /* @__PURE__ */
|
|
1656
|
+
return t[23] !== f || t[24] !== p || t[25] !== M || t[26] !== T ? (N = /* @__PURE__ */ U(l, {
|
|
1657
1657
|
error: T,
|
|
1658
1658
|
helperText: f,
|
|
1659
1659
|
readOnly: p,
|
|
1660
1660
|
children: M
|
|
1661
1661
|
}), t[23] = f, t[24] = p, t[25] = M, t[26] = T, t[27] = N) : N = t[27], N;
|
|
1662
|
-
},
|
|
1662
|
+
}, dr = [
|
|
1663
1663
|
"pdf",
|
|
1664
1664
|
"xls",
|
|
1665
1665
|
"xlsx",
|
|
1666
1666
|
"doc",
|
|
1667
1667
|
"docx",
|
|
1668
1668
|
"csv"
|
|
1669
|
-
],
|
|
1669
|
+
], fr = [
|
|
1670
1670
|
"svg",
|
|
1671
1671
|
"png",
|
|
1672
1672
|
"jpg",
|
|
@@ -1674,11 +1674,11 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1674
1674
|
"webp",
|
|
1675
1675
|
"gif",
|
|
1676
1676
|
"avif"
|
|
1677
|
-
],
|
|
1677
|
+
], pr = ["mpeg", "mp4"], mr = [
|
|
1678
1678
|
"mp3",
|
|
1679
1679
|
"ogg",
|
|
1680
1680
|
"oga"
|
|
1681
|
-
],
|
|
1681
|
+
], hr = {
|
|
1682
1682
|
audio: {
|
|
1683
1683
|
"audio/mpeg": [".mp3"],
|
|
1684
1684
|
"audio/ogg": [".oga"]
|
|
@@ -1703,26 +1703,26 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
1703
1703
|
"video/mp4": [".mp4"],
|
|
1704
1704
|
"video/mpeg": [".mpeg"]
|
|
1705
1705
|
}
|
|
1706
|
-
},
|
|
1707
|
-
audio:
|
|
1708
|
-
document:
|
|
1709
|
-
image:
|
|
1710
|
-
video:
|
|
1706
|
+
}, gr = {
|
|
1707
|
+
audio: mr,
|
|
1708
|
+
document: dr,
|
|
1709
|
+
image: fr,
|
|
1710
|
+
video: pr
|
|
1711
1711
|
};
|
|
1712
1712
|
[
|
|
1713
|
+
...gr.audio,
|
|
1714
|
+
...gr.document,
|
|
1715
|
+
...gr.image,
|
|
1716
|
+
...gr.video
|
|
1717
|
+
], {
|
|
1713
1718
|
...hr.audio,
|
|
1714
1719
|
...hr.document,
|
|
1715
1720
|
...hr.image,
|
|
1716
1721
|
...hr.video
|
|
1717
|
-
], {
|
|
1718
|
-
...mr.audio,
|
|
1719
|
-
...mr.document,
|
|
1720
|
-
...mr.image,
|
|
1721
|
-
...mr.video
|
|
1722
1722
|
};
|
|
1723
1723
|
//#endregion
|
|
1724
1724
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/MediaCard.cssm.js
|
|
1725
|
-
var
|
|
1725
|
+
var _r = "_11lzwkh0", vr = "_11lzwkh2", yr = "_11lzwkh3", br = "_11lzwkh4", xr = "_11lzwkh5", Sr = "_11lzwkh9", Cr = "_11lzwkha", wr = (e) => {
|
|
1726
1726
|
let n = E(31), { file: r, onDelete: i, onClick: a, showCheckbox: o, isSelected: s, showDelete: c } = e, l = o === void 0 ? !1 : o, u = s === void 0 ? !1 : s, d = c === void 0 ? !0 : c, f;
|
|
1727
1727
|
n[0] !== r || n[1] !== i ? (f = (e) => {
|
|
1728
1728
|
e.stopPropagation(), e.preventDefault(), i?.(r.id);
|
|
@@ -1738,45 +1738,45 @@ var gr = "_11lzwkh0", _r = "_11lzwkh2", vr = "_11lzwkh3", yr = "_11lzwkh4", br =
|
|
|
1738
1738
|
let h = m, g;
|
|
1739
1739
|
n[6] !== r?.filename || n[7] !== r?.location ? (g = r?.filename || r?.location?.split("/")?.[r?.location?.split("/").length - 1], n[6] = r?.filename, n[7] = r?.location, n[8] = g) : g = n[8];
|
|
1740
1740
|
let _ = g, v = r?.location || void 0, y = u && "_11lzwkh1", b;
|
|
1741
|
-
n[9] === y ? b = n[10] : (b = Z(
|
|
1741
|
+
n[9] === y ? b = n[10] : (b = Z(_r, y), n[9] = y, n[10] = b);
|
|
1742
1742
|
let x;
|
|
1743
|
-
n[11] !== r?.kind || n[12] !== r?.location ? (x = r?.kind === "image" ? /* @__PURE__ */
|
|
1743
|
+
n[11] !== r?.kind || n[12] !== r?.location ? (x = r?.kind === "image" ? /* @__PURE__ */ U("img", {
|
|
1744
1744
|
alt: "uploaded-file-icon",
|
|
1745
|
-
className:
|
|
1745
|
+
className: br,
|
|
1746
1746
|
src: r?.location
|
|
1747
|
-
}) : /* @__PURE__ */
|
|
1748
|
-
className:
|
|
1749
|
-
children: /* @__PURE__ */
|
|
1747
|
+
}) : /* @__PURE__ */ U("div", {
|
|
1748
|
+
className: vr,
|
|
1749
|
+
children: /* @__PURE__ */ U(ge, {
|
|
1750
1750
|
size: 60,
|
|
1751
|
-
className:
|
|
1751
|
+
className: yr
|
|
1752
1752
|
})
|
|
1753
1753
|
}), n[11] = r?.kind, n[12] = r?.location, n[13] = x) : x = n[13];
|
|
1754
1754
|
let S;
|
|
1755
|
-
n[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */
|
|
1755
|
+
n[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ U("div", { className: xr }), n[14] = S) : S = n[14];
|
|
1756
1756
|
let C;
|
|
1757
|
-
n[15] !== u || n[16] !== l ? (C = l && /* @__PURE__ */
|
|
1757
|
+
n[15] !== u || n[16] !== l ? (C = l && /* @__PURE__ */ U("div", {
|
|
1758
1758
|
className: "_11lzwkh8",
|
|
1759
|
-
onClick:
|
|
1760
|
-
children: /* @__PURE__ */
|
|
1759
|
+
onClick: Tr,
|
|
1760
|
+
children: /* @__PURE__ */ U(vn, { checked: u })
|
|
1761
1761
|
}), n[15] = u, n[16] = l, n[17] = C) : C = n[17];
|
|
1762
1762
|
let w;
|
|
1763
|
-
n[18] !== p || n[19] !== d ? (w = d && /* @__PURE__ */
|
|
1763
|
+
n[18] !== p || n[19] !== d ? (w = d && /* @__PURE__ */ U(t, {
|
|
1764
1764
|
className: "_11lzwkh6",
|
|
1765
1765
|
size: "sm",
|
|
1766
1766
|
variant: "secondary",
|
|
1767
1767
|
onClick: p,
|
|
1768
|
-
children: /* @__PURE__ */
|
|
1768
|
+
children: /* @__PURE__ */ U(Ce, { className: "_11lzwkh7" })
|
|
1769
1769
|
}), n[18] = p, n[19] = d, n[20] = w) : w = n[20];
|
|
1770
1770
|
let T;
|
|
1771
|
-
n[21] === _ ? T = n[22] : (T = /* @__PURE__ */
|
|
1772
|
-
className:
|
|
1773
|
-
children: /* @__PURE__ */
|
|
1774
|
-
className:
|
|
1771
|
+
n[21] === _ ? T = n[22] : (T = /* @__PURE__ */ U("div", {
|
|
1772
|
+
className: Sr,
|
|
1773
|
+
children: /* @__PURE__ */ U("p", {
|
|
1774
|
+
className: Cr,
|
|
1775
1775
|
children: _
|
|
1776
1776
|
})
|
|
1777
1777
|
}), n[21] = _, n[22] = T);
|
|
1778
1778
|
let D;
|
|
1779
|
-
return n[23] !== h || n[24] !== x || n[25] !== C || n[26] !== w || n[27] !== T || n[28] !== v || n[29] !== b ? (D = /* @__PURE__ */
|
|
1779
|
+
return n[23] !== h || n[24] !== x || n[25] !== C || n[26] !== w || n[27] !== T || n[28] !== v || n[29] !== b ? (D = /* @__PURE__ */ W("a", {
|
|
1780
1780
|
href: v,
|
|
1781
1781
|
target: "_blank",
|
|
1782
1782
|
rel: "noopener noreferrer",
|
|
@@ -1791,24 +1791,24 @@ var gr = "_11lzwkh0", _r = "_11lzwkh2", vr = "_11lzwkh3", yr = "_11lzwkh4", br =
|
|
|
1791
1791
|
]
|
|
1792
1792
|
}), n[23] = h, n[24] = x, n[25] = C, n[26] = w, n[27] = T, n[28] = v, n[29] = b, n[30] = D) : D = n[30], D;
|
|
1793
1793
|
};
|
|
1794
|
-
function
|
|
1794
|
+
function Tr(e) {
|
|
1795
1795
|
e.preventDefault(), e.stopPropagation();
|
|
1796
1796
|
}
|
|
1797
1797
|
//#endregion
|
|
1798
1798
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/modal/FileUploadModal.cssm.js
|
|
1799
|
-
var
|
|
1799
|
+
var Er = "vwpjhx0", Dr = "vwpjhx1", Or = "vwpjhx2", kr = "vwpjhx5", Ar = "vwpjhx6", jr = "vwpjhxb", Mr = (e) => {
|
|
1800
1800
|
let n = E(57), { isOpen: r, setIsOpen: i, files: a, kind: o, allowedExtensions: s, isMultiple: c, isLoading: l, handleUploadFiles: f, handleChange: p } = e, m;
|
|
1801
1801
|
n[0] === i ? m = n[1] : (m = () => i(!1), n[0] = i, n[1] = m);
|
|
1802
1802
|
let h = m, g = a.length, _;
|
|
1803
1803
|
bb0: {
|
|
1804
1804
|
let e;
|
|
1805
1805
|
if (n[2] !== s || n[3] !== o) {
|
|
1806
|
-
let t = o.reduce(
|
|
1806
|
+
let t = o.reduce(Nr, {});
|
|
1807
1807
|
if (!s || s.length === 0) {
|
|
1808
1808
|
_ = t;
|
|
1809
1809
|
break bb0;
|
|
1810
1810
|
}
|
|
1811
|
-
let r = s.map(
|
|
1811
|
+
let r = s.map(Pr);
|
|
1812
1812
|
e = {};
|
|
1813
1813
|
for (let [n, i] of Object.entries(t)) {
|
|
1814
1814
|
let t = i.filter((e) => r.includes(e));
|
|
@@ -1833,36 +1833,36 @@ var Tr = "vwpjhx0", Er = "vwpjhx1", Dr = "vwpjhx2", Or = "vwpjhx5", kr = "vwpjhx
|
|
|
1833
1833
|
multiple: c,
|
|
1834
1834
|
maxSize: 26214400,
|
|
1835
1835
|
disabled: l,
|
|
1836
|
-
onDropRejected:
|
|
1836
|
+
onDropRejected: Ir
|
|
1837
1837
|
}, n[8] = v, n[9] = l, n[10] = c, n[11] = w, n[12] = T) : T = n[12];
|
|
1838
|
-
let { getRootProps: D, getInputProps: k, isDragActive: A } =
|
|
1839
|
-
n[13] === Symbol.for("react.memo_cache_sentinel") ? (j = Z(
|
|
1838
|
+
let { getRootProps: D, getInputProps: k, isDragActive: A } = je(T), j;
|
|
1839
|
+
n[13] === Symbol.for("react.memo_cache_sentinel") ? (j = Z(Er, u), n[13] = j) : j = n[13];
|
|
1840
1840
|
let M = o?.length > 1 ? "Upload file" : `Upload ${o?.[0]}`, N;
|
|
1841
|
-
n[14] === M ? N = n[15] : (N = /* @__PURE__ */
|
|
1841
|
+
n[14] === M ? N = n[15] : (N = /* @__PURE__ */ U(C, { children: /* @__PURE__ */ U(b, { children: M }) }), n[14] = M, n[15] = N);
|
|
1842
1842
|
let P = l && "vwpjhx3", F;
|
|
1843
|
-
n[16] === P ? F = n[17] : (F = Z(
|
|
1843
|
+
n[16] === P ? F = n[17] : (F = Z(Or, P), n[16] = P, n[17] = F);
|
|
1844
1844
|
let I;
|
|
1845
1845
|
n[18] === D ? I = n[19] : (I = D(), n[18] = D, n[19] = I);
|
|
1846
1846
|
let L;
|
|
1847
|
-
n[20] === l ? L = n[21] : (L = l && /* @__PURE__ */
|
|
1847
|
+
n[20] === l ? L = n[21] : (L = l && /* @__PURE__ */ U("div", {
|
|
1848
1848
|
className: "vwpjhx4",
|
|
1849
|
-
children: /* @__PURE__ */
|
|
1849
|
+
children: /* @__PURE__ */ U(d, {})
|
|
1850
1850
|
}), n[20] = l, n[21] = L);
|
|
1851
1851
|
let R = A ? "Drop your files here..." : c && a.length > 0 ? "Drag & Drop here to upload more!" : a?.length > 0 ? "Drag & Drop here to upload another file!" : "Drag & Drop here to upload file!", z;
|
|
1852
|
-
n[22] === R ? z = n[23] : (z = /* @__PURE__ */
|
|
1853
|
-
className:
|
|
1852
|
+
n[22] === R ? z = n[23] : (z = /* @__PURE__ */ U("p", {
|
|
1853
|
+
className: kr,
|
|
1854
1854
|
children: R
|
|
1855
1855
|
}), n[22] = R, n[23] = z);
|
|
1856
1856
|
let B = l && "vwpjhx7", V;
|
|
1857
|
-
n[24] === B ? V = n[25] : (V = Z(
|
|
1858
|
-
let
|
|
1859
|
-
n[26] === k ?
|
|
1857
|
+
n[24] === B ? V = n[25] : (V = Z(Ar, B), n[24] = B, n[25] = V);
|
|
1858
|
+
let H;
|
|
1859
|
+
n[26] === k ? H = n[27] : (H = k(), n[26] = k, n[27] = H);
|
|
1860
1860
|
let G;
|
|
1861
|
-
n[28] ===
|
|
1861
|
+
n[28] === H ? G = n[29] : (G = /* @__PURE__ */ U("input", { ...H }), n[28] = H, n[29] = G);
|
|
1862
1862
|
let K;
|
|
1863
|
-
n[30] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */
|
|
1863
|
+
n[30] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ U(Se, { size: 14 }), n[30] = K) : K = n[30];
|
|
1864
1864
|
let q;
|
|
1865
|
-
n[31] === G ? q = n[32] : (q = /* @__PURE__ */
|
|
1865
|
+
n[31] === G ? q = n[32] : (q = /* @__PURE__ */ W(t, {
|
|
1866
1866
|
variant: "ghost",
|
|
1867
1867
|
size: "sm",
|
|
1868
1868
|
children: [
|
|
@@ -1872,14 +1872,14 @@ var Tr = "vwpjhx0", Er = "vwpjhx1", Dr = "vwpjhx2", Or = "vwpjhx5", kr = "vwpjhx
|
|
|
1872
1872
|
]
|
|
1873
1873
|
}), n[31] = G, n[32] = q);
|
|
1874
1874
|
let J;
|
|
1875
|
-
n[33] !== V || n[34] !== q ? (J = /* @__PURE__ */
|
|
1875
|
+
n[33] !== V || n[34] !== q ? (J = /* @__PURE__ */ U("div", {
|
|
1876
1876
|
className: V,
|
|
1877
1877
|
children: q
|
|
1878
1878
|
}), n[33] = V, n[34] = q, n[35] = J) : J = n[35];
|
|
1879
1879
|
let Y;
|
|
1880
|
-
n[36] !== I || n[37] !== L || n[38] !== z || n[39] !== J || n[40] !== F ? (Y = /* @__PURE__ */
|
|
1881
|
-
className:
|
|
1882
|
-
children: /* @__PURE__ */
|
|
1880
|
+
n[36] !== I || n[37] !== L || n[38] !== z || n[39] !== J || n[40] !== F ? (Y = /* @__PURE__ */ U("div", {
|
|
1881
|
+
className: Dr,
|
|
1882
|
+
children: /* @__PURE__ */ W("div", {
|
|
1883
1883
|
className: F,
|
|
1884
1884
|
...I,
|
|
1885
1885
|
children: [
|
|
@@ -1890,14 +1890,14 @@ var Tr = "vwpjhx0", Er = "vwpjhx1", Dr = "vwpjhx2", Or = "vwpjhx5", kr = "vwpjhx
|
|
|
1890
1890
|
})
|
|
1891
1891
|
}), n[36] = I, n[37] = L, n[38] = z, n[39] = J, n[40] = F, n[41] = Y) : Y = n[41];
|
|
1892
1892
|
let X;
|
|
1893
|
-
n[42] !== a || n[43] !== p ? (X = a.length > 0 && /* @__PURE__ */
|
|
1893
|
+
n[42] !== a || n[43] !== p ? (X = a.length > 0 && /* @__PURE__ */ W("div", {
|
|
1894
1894
|
className: "vwpjhx8",
|
|
1895
|
-
children: [/* @__PURE__ */
|
|
1895
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
1896
1896
|
className: "vwpjhx9",
|
|
1897
1897
|
children: "Selected Files"
|
|
1898
|
-
}), /* @__PURE__ */
|
|
1898
|
+
}), /* @__PURE__ */ U("div", {
|
|
1899
1899
|
className: "vwpjhxa",
|
|
1900
|
-
children: a.map((e) => /* @__PURE__ */
|
|
1900
|
+
children: a.map((e) => /* @__PURE__ */ U(wr, {
|
|
1901
1901
|
file: e,
|
|
1902
1902
|
onDelete: (e) => {
|
|
1903
1903
|
p(a.filter((t) => t.id !== e));
|
|
@@ -1905,57 +1905,57 @@ var Tr = "vwpjhx0", Er = "vwpjhx1", Dr = "vwpjhx2", Or = "vwpjhx5", kr = "vwpjhx
|
|
|
1905
1905
|
}, e.id))
|
|
1906
1906
|
})]
|
|
1907
1907
|
}), n[42] = a, n[43] = p, n[44] = X) : X = n[44];
|
|
1908
|
-
let ee = g === 1 ? `${g} file` : `${g} files`,
|
|
1909
|
-
n[45] !== h || n[46] !== ee ? (
|
|
1910
|
-
className:
|
|
1911
|
-
children: /* @__PURE__ */
|
|
1908
|
+
let ee = g === 1 ? `${g} file` : `${g} files`, te;
|
|
1909
|
+
n[45] !== h || n[46] !== ee ? (te = /* @__PURE__ */ U("div", {
|
|
1910
|
+
className: jr,
|
|
1911
|
+
children: /* @__PURE__ */ W(t, {
|
|
1912
1912
|
variant: "default",
|
|
1913
1913
|
onClick: h,
|
|
1914
1914
|
children: ["Save\xA0", ee]
|
|
1915
1915
|
})
|
|
1916
|
-
}), n[45] = h, n[46] = ee, n[47] =
|
|
1917
|
-
let
|
|
1918
|
-
n[48] !== Y || n[49] !== X || n[50] !==
|
|
1916
|
+
}), n[45] = h, n[46] = ee, n[47] = te) : te = n[47];
|
|
1917
|
+
let ne;
|
|
1918
|
+
n[48] !== Y || n[49] !== X || n[50] !== te || n[51] !== N ? (ne = /* @__PURE__ */ W(x, {
|
|
1919
1919
|
className: j,
|
|
1920
1920
|
children: [
|
|
1921
1921
|
N,
|
|
1922
1922
|
Y,
|
|
1923
1923
|
X,
|
|
1924
|
-
|
|
1924
|
+
te
|
|
1925
1925
|
]
|
|
1926
|
-
}), n[48] = Y, n[49] = X, n[50] =
|
|
1927
|
-
let
|
|
1928
|
-
return n[53] !== r || n[54] !== i || n[55] !==
|
|
1926
|
+
}), n[48] = Y, n[49] = X, n[50] = te, n[51] = N, n[52] = ne) : ne = n[52];
|
|
1927
|
+
let re;
|
|
1928
|
+
return n[53] !== r || n[54] !== i || n[55] !== ne ? (re = /* @__PURE__ */ U(S, {
|
|
1929
1929
|
open: r,
|
|
1930
1930
|
onOpenChange: i,
|
|
1931
|
-
children:
|
|
1932
|
-
}), n[53] = r, n[54] = i, n[55] =
|
|
1931
|
+
children: ne
|
|
1932
|
+
}), n[53] = r, n[54] = i, n[55] = ne, n[56] = re) : re = n[56], re;
|
|
1933
1933
|
};
|
|
1934
|
-
function
|
|
1934
|
+
function Nr(e, t) {
|
|
1935
1935
|
return {
|
|
1936
1936
|
...e,
|
|
1937
|
-
...
|
|
1937
|
+
...X[t]
|
|
1938
1938
|
};
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1940
|
+
function Pr(e) {
|
|
1941
1941
|
return `.${e}`;
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Fr(e) {
|
|
1944
1944
|
e.errors.forEach((t) => {
|
|
1945
1945
|
t.code === "file-too-large" && O(`${e.file.name} is bigger than 25MB`);
|
|
1946
1946
|
});
|
|
1947
1947
|
}
|
|
1948
|
-
function
|
|
1949
|
-
e.forEach(
|
|
1948
|
+
function Ir(e) {
|
|
1949
|
+
e.forEach(Fr);
|
|
1950
1950
|
}
|
|
1951
1951
|
//#endregion
|
|
1952
1952
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/UploadWidget.cssm.js
|
|
1953
|
-
var
|
|
1954
|
-
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ? r.filter((e) => o.includes(e)) : null, u = s && s.length > 0 ? s : r, [f, p] =
|
|
1953
|
+
var Lr = "_156u72w0", Rr = "_156u72w1", zr = (e) => Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "location" in e), Br = ({ field: e, schema: n, kind: r = q, isMultiple: i, uploadContext: a }) => {
|
|
1954
|
+
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ? r.filter((e) => o.includes(e)) : null, u = s && s.length > 0 ? s : r, [f, p] = V(!1), [m, h] = V(!1), { media: g } = A(), { field: { onChange: _, value: v, onBlur: b, disabled: x, ref: S }, fieldState: C } = Q({
|
|
1955
1955
|
name: e?.key || "",
|
|
1956
1956
|
rules: c(e)
|
|
1957
|
-
}), w = e.options?.allowed_extensions, T =
|
|
1958
|
-
let e = u.flatMap((e) =>
|
|
1957
|
+
}), w = e.options?.allowed_extensions, T = z(() => {
|
|
1958
|
+
let e = u.flatMap((e) => gr[e]);
|
|
1959
1959
|
return w && w.length > 0 ? e.filter((e) => w.includes(e)) : e;
|
|
1960
1960
|
}, [u, w]), E = Array.isArray(v) ? v : v ? [v] : [], O = a ?? (n?.key ? {
|
|
1961
1961
|
module: "collection",
|
|
@@ -1975,7 +1975,7 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
1975
1975
|
}), h(!0);
|
|
1976
1976
|
try {
|
|
1977
1977
|
let e = await g?.mediaBulkUpload(t, {}, k);
|
|
1978
|
-
if (e?.content?.data &&
|
|
1978
|
+
if (e?.content?.data && zr(e.content.data)) {
|
|
1979
1979
|
let t = e.content.data;
|
|
1980
1980
|
j(i ? [...E, ...t] : t);
|
|
1981
1981
|
}
|
|
@@ -1986,24 +1986,24 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
}, { label: N = "", helper_text: P = "", readonly: F = !1 } = e;
|
|
1989
|
-
return /* @__PURE__ */
|
|
1989
|
+
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W(l, {
|
|
1990
1990
|
error: C?.error?.message,
|
|
1991
1991
|
helperText: P,
|
|
1992
1992
|
readOnly: F,
|
|
1993
1993
|
htmlFor: e.key,
|
|
1994
1994
|
isRequired: e?.required,
|
|
1995
1995
|
label: N,
|
|
1996
|
-
children: [/* @__PURE__ */
|
|
1997
|
-
className:
|
|
1996
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1997
|
+
className: Lr,
|
|
1998
1998
|
ref: S,
|
|
1999
|
-
children: [/* @__PURE__ */
|
|
1999
|
+
children: [/* @__PURE__ */ U(t, {
|
|
2000
2000
|
size: "icon",
|
|
2001
2001
|
variant: "outline",
|
|
2002
2002
|
disabled: x || F,
|
|
2003
2003
|
onClick: () => p(!0),
|
|
2004
|
-
className:
|
|
2005
|
-
children: /* @__PURE__ */
|
|
2006
|
-
}), /* @__PURE__ */
|
|
2004
|
+
className: Rr,
|
|
2005
|
+
children: /* @__PURE__ */ U(Se, { size: 15 })
|
|
2006
|
+
}), /* @__PURE__ */ U(y, {
|
|
2007
2007
|
name: "pasteUrl",
|
|
2008
2008
|
placeholder: "Paste your files here...",
|
|
2009
2009
|
onBlur: () => b(),
|
|
@@ -2018,13 +2018,13 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2018
2018
|
},
|
|
2019
2019
|
disabled: x,
|
|
2020
2020
|
readOnly: F,
|
|
2021
|
-
rightIcon: m ? /* @__PURE__ */
|
|
2021
|
+
rightIcon: m ? /* @__PURE__ */ U(d, { size: 16 }) : void 0
|
|
2022
2022
|
})]
|
|
2023
|
-
}), E.length > 0 && /* @__PURE__ */
|
|
2023
|
+
}), E.length > 0 && /* @__PURE__ */ U("div", {
|
|
2024
2024
|
className: "_156u72w2",
|
|
2025
|
-
children: /* @__PURE__ */
|
|
2025
|
+
children: /* @__PURE__ */ U("div", {
|
|
2026
2026
|
className: "_156u72w3",
|
|
2027
|
-
children: E.map((e) => /* @__PURE__ */
|
|
2027
|
+
children: E.map((e) => /* @__PURE__ */ U(wr, {
|
|
2028
2028
|
file: e,
|
|
2029
2029
|
onDelete: (e) => {
|
|
2030
2030
|
j(E.filter((t) => t.id !== e));
|
|
@@ -2032,7 +2032,7 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2032
2032
|
}, e.id))
|
|
2033
2033
|
})
|
|
2034
2034
|
})]
|
|
2035
|
-
}), /* @__PURE__ */
|
|
2035
|
+
}), /* @__PURE__ */ U(Mr, {
|
|
2036
2036
|
isOpen: f,
|
|
2037
2037
|
setIsOpen: p,
|
|
2038
2038
|
files: E,
|
|
@@ -2043,56 +2043,56 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2043
2043
|
handleUploadFiles: M,
|
|
2044
2044
|
handleChange: j
|
|
2045
2045
|
})] });
|
|
2046
|
-
},
|
|
2046
|
+
}, Vr = (e) => {
|
|
2047
2047
|
let t = E(3), n;
|
|
2048
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2048
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ U(_e, { size: 20 }), t[0] = n) : n = t[0];
|
|
2049
2049
|
let r;
|
|
2050
|
-
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */
|
|
2050
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ U(sr, {
|
|
2051
2051
|
leftIcon: n,
|
|
2052
2052
|
...e
|
|
2053
2053
|
}), t[1] = e, t[2] = r), r;
|
|
2054
|
-
},
|
|
2055
|
-
TextWidget:
|
|
2056
|
-
NumberWidget:
|
|
2054
|
+
}, Hr = F(() => import("./DateTimeWidget-Bt1UcCnx.js")), Ur = F(() => import("./PhoneWidget-BtMMfGLu.js")), Wr = F(() => import("./RichTextWidget-C3Y-0pNy.js")), Gr = {
|
|
2055
|
+
TextWidget: $((e) => /* @__PURE__ */ U(sr, { ...e })),
|
|
2056
|
+
NumberWidget: $((e) => /* @__PURE__ */ U(sr, {
|
|
2057
2057
|
type: "number",
|
|
2058
2058
|
step: "any",
|
|
2059
2059
|
...e
|
|
2060
2060
|
})),
|
|
2061
|
-
CurrencyWidget:
|
|
2062
|
-
MultiTextWidget:
|
|
2063
|
-
TextareaWidget:
|
|
2064
|
-
RichTextWidget:
|
|
2065
|
-
EmailWidget:
|
|
2066
|
-
PhoneWidget:
|
|
2067
|
-
URLWidget:
|
|
2068
|
-
DropdownWidget:
|
|
2061
|
+
CurrencyWidget: $((e) => /* @__PURE__ */ U(bn, { ...e })),
|
|
2062
|
+
MultiTextWidget: $((e) => /* @__PURE__ */ U(Vn, { ...e })),
|
|
2063
|
+
TextareaWidget: $((e) => /* @__PURE__ */ U(or, { ...e })),
|
|
2064
|
+
RichTextWidget: $((e) => /* @__PURE__ */ U(Wr, { ...e })),
|
|
2065
|
+
EmailWidget: $((e) => /* @__PURE__ */ U(En, { ...e })),
|
|
2066
|
+
PhoneWidget: $((e) => /* @__PURE__ */ U(Ur, { ...e })),
|
|
2067
|
+
URLWidget: $((e) => /* @__PURE__ */ U(Vr, { ...e })),
|
|
2068
|
+
DropdownWidget: $((e) => /* @__PURE__ */ U(Sn, {
|
|
2069
2069
|
isMulti: !1,
|
|
2070
2070
|
...e
|
|
2071
2071
|
})),
|
|
2072
|
-
MultiDropdownWidget:
|
|
2072
|
+
MultiDropdownWidget: $((e) => /* @__PURE__ */ U(Sn, {
|
|
2073
2073
|
isMulti: !0,
|
|
2074
2074
|
...e
|
|
2075
2075
|
})),
|
|
2076
|
-
RadioWidget:
|
|
2077
|
-
CheckboxWidget:
|
|
2078
|
-
ToggleCheckboxWidget:
|
|
2079
|
-
SwitchWidget:
|
|
2080
|
-
DateTimeWidget:
|
|
2081
|
-
DateWidget:
|
|
2082
|
-
TimeWidget:
|
|
2083
|
-
GeocoderWidget:
|
|
2084
|
-
MultiGeocoderWidget:
|
|
2085
|
-
ImageUploadWidget:
|
|
2076
|
+
RadioWidget: $((e) => /* @__PURE__ */ U(Zn, { ...e })),
|
|
2077
|
+
CheckboxWidget: $((e) => /* @__PURE__ */ U(yn, { ...e })),
|
|
2078
|
+
ToggleCheckboxWidget: $((e) => /* @__PURE__ */ U(ur, { ...e })),
|
|
2079
|
+
SwitchWidget: $((e) => /* @__PURE__ */ U(ir, { ...e })),
|
|
2080
|
+
DateTimeWidget: $((e) => /* @__PURE__ */ U(Hr, { ...e })),
|
|
2081
|
+
DateWidget: $((e) => /* @__PURE__ */ U(Hr, { ...e })),
|
|
2082
|
+
TimeWidget: $((e) => /* @__PURE__ */ U(cr, { ...e })),
|
|
2083
|
+
GeocoderWidget: $((e) => /* @__PURE__ */ U(On, { ...e })),
|
|
2084
|
+
MultiGeocoderWidget: $((e) => /* @__PURE__ */ U(Fn, { ...e })),
|
|
2085
|
+
ImageUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2086
2086
|
kind: ["image"],
|
|
2087
2087
|
isMultiple: !1,
|
|
2088
2088
|
...e
|
|
2089
2089
|
})),
|
|
2090
|
-
MultiImageUploadWidget:
|
|
2090
|
+
MultiImageUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2091
2091
|
kind: ["image"],
|
|
2092
2092
|
isMultiple: !0,
|
|
2093
2093
|
...e
|
|
2094
2094
|
})),
|
|
2095
|
-
FileUploadWidget:
|
|
2095
|
+
FileUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2096
2096
|
kind: [
|
|
2097
2097
|
"audio",
|
|
2098
2098
|
"video",
|
|
@@ -2102,7 +2102,7 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2102
2102
|
isMultiple: !1,
|
|
2103
2103
|
...e
|
|
2104
2104
|
})),
|
|
2105
|
-
MultiFileUploadWidget:
|
|
2105
|
+
MultiFileUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2106
2106
|
kind: [
|
|
2107
2107
|
"audio",
|
|
2108
2108
|
"video",
|
|
@@ -2112,7 +2112,7 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2112
2112
|
isMultiple: !0,
|
|
2113
2113
|
...e
|
|
2114
2114
|
}))
|
|
2115
|
-
},
|
|
2115
|
+
}, Kr = (e) => {
|
|
2116
2116
|
let t = E(9), n, r;
|
|
2117
2117
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2118
2118
|
let { field: i } = n, { field_interface: a, key: o } = i;
|
|
@@ -2121,16 +2121,16 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2121
2121
|
let e = r[a];
|
|
2122
2122
|
if (e) {
|
|
2123
2123
|
let r;
|
|
2124
|
-
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */
|
|
2124
|
+
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */ U(e, { ...n }), t[3] = e, t[4] = n, t[5] = r) : r = t[5], r;
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
let s =
|
|
2127
|
+
let s = Gr[a];
|
|
2128
2128
|
if (s) {
|
|
2129
2129
|
let e;
|
|
2130
|
-
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */
|
|
2130
|
+
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */ U(s, { ...n }), t[6] = s, t[7] = n, t[8] = e) : e = t[8], e;
|
|
2131
2131
|
}
|
|
2132
2132
|
return null;
|
|
2133
|
-
},
|
|
2133
|
+
}, qr = (e) => {
|
|
2134
2134
|
let t = E(25), n, r, i;
|
|
2135
2135
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({field: n, schema: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
2136
2136
|
let { key: a, label: o, field_interface: c, fields: l } = n, u = a === void 0 ? "" : a, d = o === void 0 ? "" : o, f = c === void 0 ? "" : c, p;
|
|
@@ -2138,14 +2138,14 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2138
2138
|
let m = p;
|
|
2139
2139
|
if (!f || !u) return null;
|
|
2140
2140
|
let h = n?.required, g;
|
|
2141
|
-
t[6] !== d || t[7] !== h ? (g = /* @__PURE__ */
|
|
2141
|
+
t[6] !== d || t[7] !== h ? (g = /* @__PURE__ */ U(s, {
|
|
2142
2142
|
label: d,
|
|
2143
2143
|
isRequired: h
|
|
2144
2144
|
}), t[6] = d, t[7] = h, t[8] = g) : g = t[8];
|
|
2145
2145
|
let _;
|
|
2146
2146
|
if (t[9] !== n.id || t[10] !== m || t[11] !== u || t[12] !== r || t[13] !== i) {
|
|
2147
2147
|
let e;
|
|
2148
|
-
t[15] !== n.id || t[16] !== u || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */
|
|
2148
|
+
t[15] !== n.id || t[16] !== u || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */ U(Jr, {
|
|
2149
2149
|
field: {
|
|
2150
2150
|
...e,
|
|
2151
2151
|
key: `${u}.${e?.key}`
|
|
@@ -2155,45 +2155,45 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2155
2155
|
}, `common-fields-${n?.id}-${e?.id}`), t[15] = n.id, t[16] = u, t[17] = r, t[18] = i, t[19] = e) : e = t[19], _ = m.map(e), t[9] = n.id, t[10] = m, t[11] = u, t[12] = r, t[13] = i, t[14] = _;
|
|
2156
2156
|
} else _ = t[14];
|
|
2157
2157
|
let v;
|
|
2158
|
-
t[20] === _ ? v = t[21] : (v = /* @__PURE__ */
|
|
2159
|
-
className:
|
|
2158
|
+
t[20] === _ ? v = t[21] : (v = /* @__PURE__ */ U("div", {
|
|
2159
|
+
className: kt,
|
|
2160
2160
|
children: _
|
|
2161
2161
|
}), t[20] = _, t[21] = v);
|
|
2162
2162
|
let y;
|
|
2163
|
-
return t[22] !== g || t[23] !== v ? (y = /* @__PURE__ */
|
|
2164
|
-
className:
|
|
2163
|
+
return t[22] !== g || t[23] !== v ? (y = /* @__PURE__ */ W("div", {
|
|
2164
|
+
className: vt,
|
|
2165
2165
|
children: [g, v]
|
|
2166
2166
|
}), t[22] = g, t[23] = v, t[24] = y) : y = t[24], y;
|
|
2167
|
-
},
|
|
2167
|
+
}, Jr = (e) => {
|
|
2168
2168
|
let t = E(16), n, r;
|
|
2169
2169
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2170
|
-
let i =
|
|
2170
|
+
let i = lt(n.schema, n.field), { field_interface: a, key: o, hidden: s } = i, c = a === void 0 ? "" : a;
|
|
2171
2171
|
if (!c || !(o !== void 0 && o) || s) return null;
|
|
2172
2172
|
switch (c) {
|
|
2173
|
-
case
|
|
2173
|
+
case G.ArrayWidget: {
|
|
2174
2174
|
let e;
|
|
2175
|
-
return t[3] !== i || t[4] !== n ? (e = /* @__PURE__ */
|
|
2175
|
+
return t[3] !== i || t[4] !== n ? (e = /* @__PURE__ */ U(zt, {
|
|
2176
2176
|
...n,
|
|
2177
2177
|
field: i
|
|
2178
2178
|
}), t[3] = i, t[4] = n, t[5] = e) : e = t[5], e;
|
|
2179
2179
|
}
|
|
2180
|
-
case
|
|
2180
|
+
case G.RecordWidget: {
|
|
2181
2181
|
let e;
|
|
2182
|
-
return t[6] !== i || t[7] !== n ? (e = /* @__PURE__ */
|
|
2182
|
+
return t[6] !== i || t[7] !== n ? (e = /* @__PURE__ */ U(qr, {
|
|
2183
2183
|
...n,
|
|
2184
2184
|
field: i
|
|
2185
2185
|
}), t[6] = i, t[7] = n, t[8] = e) : e = t[8], e;
|
|
2186
2186
|
}
|
|
2187
|
-
case
|
|
2187
|
+
case G.CollectionWidget: {
|
|
2188
2188
|
let e;
|
|
2189
|
-
return t[9] !== i || t[10] !== n ? (e = /* @__PURE__ */
|
|
2189
|
+
return t[9] !== i || t[10] !== n ? (e = /* @__PURE__ */ U(fn, {
|
|
2190
2190
|
...n,
|
|
2191
2191
|
field: i
|
|
2192
2192
|
}), t[9] = i, t[10] = n, t[11] = e) : e = t[11], e;
|
|
2193
2193
|
}
|
|
2194
2194
|
default: {
|
|
2195
2195
|
let e;
|
|
2196
|
-
return t[12] !== i || t[13] !== n || t[14] !== r ? (e = /* @__PURE__ */
|
|
2196
|
+
return t[12] !== i || t[13] !== n || t[14] !== r ? (e = /* @__PURE__ */ U(Kr, {
|
|
2197
2197
|
widgets: r,
|
|
2198
2198
|
...n,
|
|
2199
2199
|
field: i
|
|
@@ -2204,20 +2204,20 @@ var Ir = "_156u72w0", Lr = "_156u72w1", Rr = (e) => Array.isArray(e) && e.every(
|
|
|
2204
2204
|
i(r.radius);
|
|
2205
2205
|
//#endregion
|
|
2206
2206
|
//#region ../../libraries/levocn/dist/utils/deep-merge.js
|
|
2207
|
-
function
|
|
2207
|
+
function Yr(e) {
|
|
2208
2208
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2211
|
-
if (!
|
|
2210
|
+
function Xr(e, t) {
|
|
2211
|
+
if (!Yr(e) || !Yr(t)) return t;
|
|
2212
2212
|
let n = { ...e };
|
|
2213
2213
|
return Object.keys(t).forEach((r) => {
|
|
2214
2214
|
let i = r, a = e[i], o = t[i];
|
|
2215
|
-
|
|
2215
|
+
Yr(a) && Yr(o) ? n[i] = Xr(a, o) : n[i] = o;
|
|
2216
2216
|
}), n;
|
|
2217
2217
|
}
|
|
2218
2218
|
//#endregion
|
|
2219
2219
|
//#region ../../libraries/levocn/dist/theme/utils/defineTheme.js
|
|
2220
|
-
var
|
|
2220
|
+
var Zr = ((e) => (t) => t ? Xr(e, t) : e)({
|
|
2221
2221
|
form: {
|
|
2222
2222
|
maxWidth: "100%",
|
|
2223
2223
|
gap: "1.5rem",
|
|
@@ -2231,7 +2231,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2231
2231
|
borderRadius: "6px"
|
|
2232
2232
|
},
|
|
2233
2233
|
checkbox: { labelFontSize: "0.875rem" }
|
|
2234
|
-
}),
|
|
2234
|
+
}), Qr = "_1g8bxz40", $r = "r6cfdr0", ei = P({ themeClass: "" }), ti = T(Zr({
|
|
2235
2235
|
form: {
|
|
2236
2236
|
maxWidth: "800px",
|
|
2237
2237
|
labelFontSize: "1.5rem",
|
|
@@ -2244,14 +2244,14 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2244
2244
|
borderRadius: "4px"
|
|
2245
2245
|
},
|
|
2246
2246
|
checkbox: { labelFontSize: "1.125rem" }
|
|
2247
|
-
})),
|
|
2247
|
+
})), ni = (t) => {
|
|
2248
2248
|
let n = E(30), r, i, o, s, c, l, u;
|
|
2249
2249
|
n[0] === t ? (r = n[1], i = n[2], o = n[3], s = n[4], c = n[5], l = n[6], u = n[7]) : ({children: r, className: i, style: l, cssReset: o, variant: u, portalToThemeRoot: s, ...c} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = o, n[4] = s, n[5] = c, n[6] = l, n[7] = u);
|
|
2250
2250
|
let d = u === "single-field" || u === "steps-2", f;
|
|
2251
|
-
n[8] === i ? f = n[9] : (f = Z(a,
|
|
2251
|
+
n[8] === i ? f = n[9] : (f = Z(a, Qr, i), n[8] = i, n[9] = f);
|
|
2252
2252
|
let p = f, m;
|
|
2253
2253
|
n[10] !== d || n[11] !== l ? (m = d ? {
|
|
2254
|
-
...
|
|
2254
|
+
...ti,
|
|
2255
2255
|
...l
|
|
2256
2256
|
} : l, n[10] = d, n[11] = l, n[12] = m) : m = n[12];
|
|
2257
2257
|
let h = m, g;
|
|
@@ -2261,17 +2261,17 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2261
2261
|
cssReset: o
|
|
2262
2262
|
}, n[13] = p, n[14] = h, n[15] = o, n[16] = g) : g = n[16];
|
|
2263
2263
|
let _;
|
|
2264
|
-
n[17] !== r || n[18] !== d ? (_ = d ? /* @__PURE__ */
|
|
2265
|
-
className:
|
|
2264
|
+
n[17] !== r || n[18] !== d ? (_ = d ? /* @__PURE__ */ U("div", {
|
|
2265
|
+
className: $r,
|
|
2266
2266
|
children: r
|
|
2267
2267
|
}) : r, n[17] = r, n[18] = d, n[19] = _) : _ = n[19];
|
|
2268
2268
|
let v;
|
|
2269
|
-
n[20] !== g || n[21] !== _ ? (v = /* @__PURE__ */
|
|
2269
|
+
n[20] !== g || n[21] !== _ ? (v = /* @__PURE__ */ U(ei.Provider, {
|
|
2270
2270
|
value: g,
|
|
2271
2271
|
children: _
|
|
2272
2272
|
}), n[20] = g, n[21] = _, n[22] = v) : v = n[22];
|
|
2273
2273
|
let y;
|
|
2274
|
-
return n[23] !== p || n[24] !== h || n[25] !== o || n[26] !== s || n[27] !== c || n[28] !== v ? (y = /* @__PURE__ */
|
|
2274
|
+
return n[23] !== p || n[24] !== h || n[25] !== o || n[26] !== s || n[27] !== c || n[28] !== v ? (y = /* @__PURE__ */ U(e, {
|
|
2275
2275
|
...c,
|
|
2276
2276
|
className: p,
|
|
2277
2277
|
cssReset: o,
|
|
@@ -2279,14 +2279,14 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2279
2279
|
portalToThemeRoot: s,
|
|
2280
2280
|
children: v
|
|
2281
2281
|
}), n[23] = p, n[24] = h, n[25] = o, n[26] = s, n[27] = c, n[28] = v, n[29] = y) : y = n[29], y;
|
|
2282
|
-
},
|
|
2283
|
-
let f =
|
|
2282
|
+
}, ri = "_1dzarb20", ii = "_1dzarb21", ai = "_1dzarb23", oi = "_1dzarb24", si = "_1dzarb25", ci = "_1dzarb26", li = ({ hiddenFields: e, isLoading: n, initialValues: r, onSubmit: i, schema: a, uiConfig: o, submitButtonConfig: s, containerStyles: c, isDisabled: l, theme: u, enableVerification: d = !0 }) => {
|
|
2283
|
+
let f = z(() => {
|
|
2284
2284
|
if (a) {
|
|
2285
2285
|
let t = { ...a };
|
|
2286
2286
|
return t.sections = t?.sections?.map((t) => (t.fields = t?.fields?.map((t) => ((e?.includes(t?.key) || e?.includes(t?.id)) && (t.hidden = !0), t)), t)), t;
|
|
2287
2287
|
}
|
|
2288
2288
|
return null;
|
|
2289
|
-
}, [a]), p =
|
|
2289
|
+
}, [a]), p = oe({
|
|
2290
2290
|
mode: "onTouched",
|
|
2291
2291
|
disabled: l,
|
|
2292
2292
|
defaultValues: {},
|
|
@@ -2294,39 +2294,39 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2294
2294
|
}), { formState: { isSubmitting: m } } = p, h = (e) => {
|
|
2295
2295
|
i && i(e);
|
|
2296
2296
|
};
|
|
2297
|
-
|
|
2297
|
+
R(() => {
|
|
2298
2298
|
if (f) {
|
|
2299
2299
|
let e = {
|
|
2300
|
-
...a ?
|
|
2300
|
+
...a ? ht(a) : {},
|
|
2301
2301
|
...r
|
|
2302
2302
|
};
|
|
2303
2303
|
p.reset(e);
|
|
2304
2304
|
}
|
|
2305
2305
|
}, [f]);
|
|
2306
2306
|
let g = n || m;
|
|
2307
|
-
return f ? /* @__PURE__ */
|
|
2307
|
+
return f ? /* @__PURE__ */ U(re, {
|
|
2308
2308
|
...p,
|
|
2309
|
-
children: /* @__PURE__ */
|
|
2309
|
+
children: /* @__PURE__ */ U(ni, {
|
|
2310
2310
|
...u || {},
|
|
2311
|
-
children: /* @__PURE__ */
|
|
2312
|
-
className:
|
|
2313
|
-
children: [o?.hideFormHeading ? null : /* @__PURE__ */
|
|
2314
|
-
className: Z(
|
|
2311
|
+
children: /* @__PURE__ */ W("div", {
|
|
2312
|
+
className: ri,
|
|
2313
|
+
children: [o?.hideFormHeading ? null : /* @__PURE__ */ U("h1", {
|
|
2314
|
+
className: Z(ii),
|
|
2315
2315
|
children: "Create new"
|
|
2316
|
-
}), /* @__PURE__ */
|
|
2317
|
-
className: Z(
|
|
2318
|
-
children: /* @__PURE__ */
|
|
2319
|
-
className: Z(
|
|
2316
|
+
}), /* @__PURE__ */ U("div", {
|
|
2317
|
+
className: Z(ai, c),
|
|
2318
|
+
children: /* @__PURE__ */ W("form", {
|
|
2319
|
+
className: Z(oi, n && "_1dzarb27"),
|
|
2320
2320
|
id: "collection-form",
|
|
2321
2321
|
onSubmit: p.handleSubmit(h),
|
|
2322
|
-
children: [a?.sections?.map((e) => /* @__PURE__ */
|
|
2322
|
+
children: [a?.sections?.map((e) => /* @__PURE__ */ U(ui, {
|
|
2323
2323
|
schema: a,
|
|
2324
2324
|
section: e,
|
|
2325
2325
|
hideHeading: !!o?.hideSectionHeadings,
|
|
2326
2326
|
enableVerification: d
|
|
2327
|
-
}, e.id)), s?.show && /* @__PURE__ */
|
|
2327
|
+
}, e.id)), s?.show && /* @__PURE__ */ U("div", {
|
|
2328
2328
|
className: "_1dzarb29",
|
|
2329
|
-
children: /* @__PURE__ */
|
|
2329
|
+
children: /* @__PURE__ */ U(t, {
|
|
2330
2330
|
className: s?.styles,
|
|
2331
2331
|
disabled: l || g,
|
|
2332
2332
|
type: "submit",
|
|
@@ -2338,50 +2338,50 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2338
2338
|
})
|
|
2339
2339
|
})
|
|
2340
2340
|
}) : null;
|
|
2341
|
-
},
|
|
2341
|
+
}, ui = (e) => {
|
|
2342
2342
|
let t = E(12), { schema: n, section: r, hideHeading: i, enableVerification: a } = e;
|
|
2343
|
-
if (!
|
|
2343
|
+
if (!ut(n, r)) return null;
|
|
2344
2344
|
let o;
|
|
2345
|
-
t[0] !== i || t[1] !== r?.label ? (o = !i && /* @__PURE__ */
|
|
2345
|
+
t[0] !== i || t[1] !== r?.label ? (o = !i && /* @__PURE__ */ U("p", {
|
|
2346
2346
|
className: "_1dzarb28",
|
|
2347
2347
|
children: r?.label
|
|
2348
2348
|
}), t[0] = i, t[1] = r?.label, t[2] = o) : o = t[2];
|
|
2349
2349
|
let s;
|
|
2350
|
-
t[3] !== a || t[4] !== n || t[5] !== r?.fields ? (s = r?.fields?.map((e) => /* @__PURE__ */
|
|
2350
|
+
t[3] !== a || t[4] !== n || t[5] !== r?.fields ? (s = r?.fields?.map((e) => /* @__PURE__ */ U(Jr, {
|
|
2351
2351
|
field: e,
|
|
2352
2352
|
schema: n,
|
|
2353
2353
|
settings: { enableVerification: a }
|
|
2354
2354
|
}, e?.key)), t[3] = a, t[4] = n, t[5] = r?.fields, t[6] = s) : s = t[6];
|
|
2355
2355
|
let c;
|
|
2356
|
-
t[7] === s ? c = t[8] : (c = /* @__PURE__ */
|
|
2357
|
-
className:
|
|
2356
|
+
t[7] === s ? c = t[8] : (c = /* @__PURE__ */ U("div", {
|
|
2357
|
+
className: ci,
|
|
2358
2358
|
children: s
|
|
2359
2359
|
}), t[7] = s, t[8] = c);
|
|
2360
2360
|
let l;
|
|
2361
|
-
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */
|
|
2362
|
-
className:
|
|
2361
|
+
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ W("div", {
|
|
2362
|
+
className: si,
|
|
2363
2363
|
children: [o, c]
|
|
2364
2364
|
}), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
|
|
2365
|
-
},
|
|
2365
|
+
}, di = M.createContext({
|
|
2366
2366
|
schema: null,
|
|
2367
2367
|
submitButtonConfig: { show: !0 }
|
|
2368
|
-
}),
|
|
2368
|
+
}), fi = (e) => {
|
|
2369
2369
|
let t = E(14), n, r, i, a;
|
|
2370
2370
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({children: n, theme: i, variant: a, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
2371
2371
|
let o;
|
|
2372
2372
|
t[5] === r ? o = t[6] : (o = { ...r }, t[5] = r, t[6] = o);
|
|
2373
2373
|
let s;
|
|
2374
|
-
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */
|
|
2374
|
+
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */ U(ni, {
|
|
2375
2375
|
...i,
|
|
2376
2376
|
variant: a,
|
|
2377
2377
|
children: n
|
|
2378
2378
|
}), t[7] = n, t[8] = i, t[9] = a, t[10] = s) : s = t[10];
|
|
2379
2379
|
let c;
|
|
2380
|
-
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */
|
|
2380
|
+
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */ U(di.Provider, {
|
|
2381
2381
|
value: o,
|
|
2382
2382
|
children: s
|
|
2383
2383
|
}), t[11] = o, t[12] = s, t[13] = c) : c = t[13], c;
|
|
2384
|
-
},
|
|
2384
|
+
}, pi = () => M.useContext(di), mi = (e, t) => {
|
|
2385
2385
|
if (Array.isArray(e) && e.length > 0) {
|
|
2386
2386
|
let n = 0;
|
|
2387
2387
|
for (let r of e) n += 1, r?.param && t && t(r?.param, {
|
|
@@ -2389,21 +2389,21 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2389
2389
|
message: r?.message
|
|
2390
2390
|
}, { shouldFocus: n === 0 });
|
|
2391
2391
|
}
|
|
2392
|
-
},
|
|
2392
|
+
}, hi = {
|
|
2393
2393
|
FORM_DIRTY: "form-dirty",
|
|
2394
2394
|
FORM_VALUES: "form-values"
|
|
2395
|
-
},
|
|
2396
|
-
let t = localStorage.getItem(`${e}-${
|
|
2395
|
+
}, gi = (e) => {
|
|
2396
|
+
let t = localStorage.getItem(`${e}-${hi.FORM_VALUES}`);
|
|
2397
2397
|
return t ? JSON.parse(t) : {};
|
|
2398
|
-
},
|
|
2399
|
-
localStorage.setItem(`${e}-${
|
|
2400
|
-
},
|
|
2401
|
-
localStorage.removeItem(`${e}-${
|
|
2402
|
-
},
|
|
2403
|
-
let o =
|
|
2398
|
+
}, _i = (e, t) => {
|
|
2399
|
+
localStorage.setItem(`${e}-${hi.FORM_VALUES}`, JSON.stringify(t));
|
|
2400
|
+
}, vi = (e) => {
|
|
2401
|
+
localStorage.removeItem(`${e}-${hi.FORM_VALUES}`);
|
|
2402
|
+
}, yi = ({ schema: e, originalSchema: t, onSubmitSuccess: n, onSubmitError: r, onInit: i, setFormErrorAfterSubmit: a = !0 }) => {
|
|
2403
|
+
let o = z(() => e, [e]), s = z(() => t || o, [t, o]), c = A(), { toastConfig: l, onSuccess: u, onError: d, isLoggedIn: f, isDisabled: p, externalInitialValues: m = {}, account: h, preview: g, uiConfig: _ } = pi(), [v, y] = V({
|
|
2404
2404
|
contentId: null,
|
|
2405
2405
|
publishedId: null
|
|
2406
|
-
}), [b, x] =
|
|
2406
|
+
}), [b, x] = V(!1), [S, C] = V(!1), [w, T] = V(!1), E = B({}), O = B({}), j = (e) => {
|
|
2407
2407
|
if (!o?.sections) return null;
|
|
2408
2408
|
for (let t of o.sections) for (let n of t?.fields ?? []) if (n?.key === e) return n?.kind ?? null;
|
|
2409
2409
|
return null;
|
|
@@ -2423,7 +2423,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2423
2423
|
}
|
|
2424
2424
|
}
|
|
2425
2425
|
} catch {}
|
|
2426
|
-
let t = o ?
|
|
2426
|
+
let t = o ? ht(o) : {}, n = {};
|
|
2427
2427
|
h && o && (o.email_field && h.email && (n[o.email_field] = h.email), o.mobile_field && h.mobile && (n[o.mobile_field] = h.mobile));
|
|
2428
2428
|
let r = {
|
|
2429
2429
|
...m || {},
|
|
@@ -2435,7 +2435,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2435
2435
|
...r,
|
|
2436
2436
|
...E.current
|
|
2437
2437
|
};
|
|
2438
|
-
}, N =
|
|
2438
|
+
}, N = oe({
|
|
2439
2439
|
mode: "onTouched",
|
|
2440
2440
|
disabled: p
|
|
2441
2441
|
}), { formState: P } = N, F = (e) => {
|
|
@@ -2444,7 +2444,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2444
2444
|
...e
|
|
2445
2445
|
};
|
|
2446
2446
|
};
|
|
2447
|
-
return
|
|
2447
|
+
return R(() => {
|
|
2448
2448
|
if (o && c?.collection) {
|
|
2449
2449
|
if (M(), !v.contentId && !v.publishedId && !g) {
|
|
2450
2450
|
let e = o?.allow_multiple === !1;
|
|
@@ -2480,7 +2480,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2480
2480
|
});
|
|
2481
2481
|
return;
|
|
2482
2482
|
}
|
|
2483
|
-
let t =
|
|
2483
|
+
let t = gi(o?.key);
|
|
2484
2484
|
t && (E.current = {
|
|
2485
2485
|
...E.current || {},
|
|
2486
2486
|
...t
|
|
@@ -2489,14 +2489,14 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2489
2489
|
}
|
|
2490
2490
|
O.current = { ...E.current }, N.reset({ ...E?.current }), i?.(E.current);
|
|
2491
2491
|
}
|
|
2492
|
-
}, [o, f]),
|
|
2492
|
+
}, [o, f]), R(() => {
|
|
2493
2493
|
let { isSubmitSuccessful: e, isValid: t } = P;
|
|
2494
2494
|
e && t && (O.current = { ...E.current }, N.reset({
|
|
2495
2495
|
...E?.current,
|
|
2496
2496
|
__captcha: "verified"
|
|
2497
2497
|
}), i?.(E.current));
|
|
2498
|
-
}, [P]),
|
|
2499
|
-
o && (v.contentId || v.publishedId) &&
|
|
2498
|
+
}, [P]), R(() => {
|
|
2499
|
+
o && (v.contentId || v.publishedId) && vi(o?.key);
|
|
2500
2500
|
}, [v]), {
|
|
2501
2501
|
methods: N,
|
|
2502
2502
|
isLoading: b,
|
|
@@ -2513,13 +2513,13 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2513
2513
|
appendFormValues: F,
|
|
2514
2514
|
submitToRemote: async (e) => {
|
|
2515
2515
|
if (F(e), !(g || !c?.collection || !s)) try {
|
|
2516
|
-
let e =
|
|
2516
|
+
let e = _t(E?.current, s, O.current), t = null;
|
|
2517
2517
|
if (t = v.publishedId ? await c?.collection?.editDraftEntry(s?.key, v.publishedId, e) : v.contentId ? await c?.collection?.submitDraftEntry(s?.key, e) : await c?.collection?.saveCollectionData({
|
|
2518
2518
|
collection_id: s?.id,
|
|
2519
2519
|
data: e
|
|
2520
2520
|
}), t?.content?.data) {
|
|
2521
2521
|
let e = t?.content?.meta?.booking_config?.enabled;
|
|
2522
|
-
l?.showSuccessToast && !(l?.suppressOnBooking && e) && k(l.successToastText || "Form submitted successfully."), E.current = {}, M(),
|
|
2522
|
+
l?.showSuccessToast && !(l?.suppressOnBooking && e) && k(l.successToastText || "Form submitted successfully."), E.current = {}, M(), vi(s?.key), y({
|
|
2523
2523
|
contentId: null,
|
|
2524
2524
|
publishedId: null
|
|
2525
2525
|
}), _?.hideSuccessScreen || T(!0);
|
|
@@ -2530,33 +2530,33 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2530
2530
|
meta: t?.content?.meta
|
|
2531
2531
|
}), n && n();
|
|
2532
2532
|
} catch (e) {
|
|
2533
|
-
c?.logger?.error("Form success callback threw after a saved entry", { exception:
|
|
2533
|
+
c?.logger?.error("Form success callback threw after a saved entry", { exception: Y(e) });
|
|
2534
2534
|
}
|
|
2535
2535
|
return;
|
|
2536
2536
|
}
|
|
2537
2537
|
throw Error("Failed to save form details, API response invalid");
|
|
2538
2538
|
} catch (e) {
|
|
2539
|
-
D(e), e instanceof
|
|
2539
|
+
D(e), e instanceof K ? (e?.hasFieldErrors && a && mi(e?.fieldErrors, N.setError), r && r(e.fieldErrors || []), d && d(e)) : d && d(e?.response?.data || e);
|
|
2540
2540
|
}
|
|
2541
2541
|
},
|
|
2542
2542
|
showSuccessOverlay: w,
|
|
2543
2543
|
dismissSuccessOverlay: () => T(!1)
|
|
2544
2544
|
};
|
|
2545
|
-
},
|
|
2545
|
+
}, bi = "_1jed92w2", xi = "_1jed92w3 _1jed92w1", Si = "_1jed92w4 _1jed92w1", Ci = "_1jed92w5 _1jed92w1", wi = "_1jed92w6 _1jed92w1", Ti = () => {
|
|
2546
2546
|
let e = E(1), t;
|
|
2547
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2548
|
-
className:
|
|
2547
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ W("div", {
|
|
2548
|
+
className: bi,
|
|
2549
2549
|
children: [
|
|
2550
|
-
/* @__PURE__ */
|
|
2551
|
-
/* @__PURE__ */
|
|
2552
|
-
/* @__PURE__ */
|
|
2550
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("div", { className: xi }), /* @__PURE__ */ U("div", { className: Ci })] }),
|
|
2551
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("div", { className: Si }), /* @__PURE__ */ U("div", { className: Ci })] }),
|
|
2552
|
+
/* @__PURE__ */ U("div", { className: wi })
|
|
2553
2553
|
]
|
|
2554
2554
|
}), e[0] = t) : t = e[0], t;
|
|
2555
|
-
},
|
|
2556
|
-
return
|
|
2555
|
+
}, Ei = "a2n8870", Di = "a2n8871", Oi = "a2n8872", ki = "a2n8873", Ai = "a2n8874", ji = "a2n8875", Mi = "a2n8876", Ni = "https://static.levocdn.com/WLZ1TXTD/Levo-Logo-moxa93IxlVi0W.webp", Pi = F(() => import("altcha").then(() => ({ default: function({ widgetRef: e, client: t, onStateChange: n }) {
|
|
2556
|
+
return R(() => {
|
|
2557
2557
|
let { current: t } = e;
|
|
2558
2558
|
if (t) return t.addEventListener("statechange", n), () => t.removeEventListener("statechange", n);
|
|
2559
|
-
}, [n]), /* @__PURE__ */
|
|
2559
|
+
}, [n]), /* @__PURE__ */ U("altcha-widget", {
|
|
2560
2560
|
ref: e,
|
|
2561
2561
|
style: {
|
|
2562
2562
|
"--altcha-max-width": "100%",
|
|
@@ -2573,40 +2573,40 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2573
2573
|
challengeurl: `${t.apiUrl}/v1/identity/captcha/create-challenge`,
|
|
2574
2574
|
verifyurl: `${t.apiUrl}/v1/identity/captcha/verify-challenge`
|
|
2575
2575
|
});
|
|
2576
|
-
} }))),
|
|
2576
|
+
} }))), Fi = () => {
|
|
2577
2577
|
let e = E(1), t;
|
|
2578
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2579
|
-
className:
|
|
2580
|
-
children: [/* @__PURE__ */
|
|
2578
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ W("div", {
|
|
2579
|
+
className: Oi,
|
|
2580
|
+
children: [/* @__PURE__ */ U("img", {
|
|
2581
2581
|
alt: "Levo",
|
|
2582
|
-
src:
|
|
2582
|
+
src: Ni,
|
|
2583
2583
|
width: 16,
|
|
2584
2584
|
height: 16,
|
|
2585
|
-
className:
|
|
2586
|
-
}), /* @__PURE__ */
|
|
2587
|
-
className:
|
|
2585
|
+
className: ki
|
|
2586
|
+
}), /* @__PURE__ */ U("span", {
|
|
2587
|
+
className: Ai,
|
|
2588
2588
|
children: "Levo CAPTCHA"
|
|
2589
2589
|
})]
|
|
2590
2590
|
}), e[0] = t) : t = e[0], t;
|
|
2591
|
-
},
|
|
2591
|
+
}, Ii = () => {
|
|
2592
2592
|
let e = E(1), t;
|
|
2593
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2594
|
-
className:
|
|
2595
|
-
children: /* @__PURE__ */
|
|
2596
|
-
className:
|
|
2593
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ U("div", {
|
|
2594
|
+
className: ji,
|
|
2595
|
+
children: /* @__PURE__ */ U("span", {
|
|
2596
|
+
className: Mi,
|
|
2597
2597
|
children: "Loading verification..."
|
|
2598
2598
|
})
|
|
2599
2599
|
}), e[0] = t) : t = e[0], t;
|
|
2600
|
-
},
|
|
2601
|
-
let e = E(19), { disableCaptcha: t } =
|
|
2600
|
+
}, Li = () => {
|
|
2601
|
+
let e = E(19), { disableCaptcha: t } = pi(), n = A(), [r, i] = V(!1), a = B(null), o = t ? !1 : "Verification is required", s;
|
|
2602
2602
|
e[0] === o ? s = e[1] : (s = {
|
|
2603
2603
|
name: "__captcha",
|
|
2604
2604
|
rules: { required: o }
|
|
2605
2605
|
}, e[0] = o, e[1] = s);
|
|
2606
|
-
let { field: c, fieldState: u } =
|
|
2606
|
+
let { field: c, fieldState: u } = Q(s), { onChange: d } = c, { error: f } = u, p, m;
|
|
2607
2607
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (p = () => {
|
|
2608
2608
|
i(!0);
|
|
2609
|
-
}, m = [], e[2] = p, e[3] = m) : (p = e[2], m = e[3]),
|
|
2609
|
+
}, m = [], e[2] = p, e[3] = m) : (p = e[2], m = e[3]), R(p, m);
|
|
2610
2610
|
let h;
|
|
2611
2611
|
e[4] === d ? h = e[5] : (h = (e) => {
|
|
2612
2612
|
"detail" in e && d(e.detail.state || null);
|
|
@@ -2614,50 +2614,50 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2614
2614
|
let g = h;
|
|
2615
2615
|
if (!r) {
|
|
2616
2616
|
let t = f?.message, n;
|
|
2617
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2618
|
-
className:
|
|
2619
|
-
children: [/* @__PURE__ */
|
|
2617
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ W("div", {
|
|
2618
|
+
className: Di,
|
|
2619
|
+
children: [/* @__PURE__ */ U(Ii, {}), /* @__PURE__ */ U(Fi, {})]
|
|
2620
2620
|
}), e[6] = n) : n = e[6];
|
|
2621
2621
|
let r;
|
|
2622
|
-
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */
|
|
2622
|
+
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */ U(l, {
|
|
2623
2623
|
error: t,
|
|
2624
|
-
className:
|
|
2624
|
+
className: Ei,
|
|
2625
2625
|
children: n
|
|
2626
2626
|
}), e[7] = t, e[8] = r), r;
|
|
2627
2627
|
}
|
|
2628
2628
|
let _ = f?.message, v;
|
|
2629
|
-
e[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */
|
|
2629
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ U(Ii, {}), e[9] = v) : v = e[9];
|
|
2630
2630
|
let y;
|
|
2631
|
-
e[10] !== n || e[11] !== g ? (y = /* @__PURE__ */
|
|
2631
|
+
e[10] !== n || e[11] !== g ? (y = /* @__PURE__ */ U(N, {
|
|
2632
2632
|
fallback: v,
|
|
2633
|
-
children: /* @__PURE__ */
|
|
2633
|
+
children: /* @__PURE__ */ U(Pi, {
|
|
2634
2634
|
widgetRef: a,
|
|
2635
2635
|
client: n,
|
|
2636
2636
|
onStateChange: g
|
|
2637
2637
|
})
|
|
2638
2638
|
}), e[10] = n, e[11] = g, e[12] = y) : y = e[12];
|
|
2639
2639
|
let b;
|
|
2640
|
-
e[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */
|
|
2640
|
+
e[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ U(Fi, {}), e[13] = b) : b = e[13];
|
|
2641
2641
|
let x;
|
|
2642
|
-
e[14] === y ? x = e[15] : (x = /* @__PURE__ */
|
|
2643
|
-
className:
|
|
2642
|
+
e[14] === y ? x = e[15] : (x = /* @__PURE__ */ W("div", {
|
|
2643
|
+
className: Di,
|
|
2644
2644
|
children: [y, b]
|
|
2645
2645
|
}), e[14] = y, e[15] = x);
|
|
2646
2646
|
let S;
|
|
2647
|
-
return e[16] !== x || e[17] !== _ ? (S = /* @__PURE__ */
|
|
2647
|
+
return e[16] !== x || e[17] !== _ ? (S = /* @__PURE__ */ U(l, {
|
|
2648
2648
|
error: _,
|
|
2649
|
-
className:
|
|
2649
|
+
className: Ei,
|
|
2650
2650
|
children: x
|
|
2651
2651
|
}), e[16] = x, e[17] = _, e[18] = S) : S = e[18], S;
|
|
2652
|
-
},
|
|
2652
|
+
}, Ri = {
|
|
2653
2653
|
errors: {},
|
|
2654
2654
|
isValid: !0,
|
|
2655
2655
|
isDirty: !1,
|
|
2656
2656
|
isSubmitted: !1,
|
|
2657
2657
|
submitCount: 0,
|
|
2658
2658
|
dirtyFields: {}
|
|
2659
|
-
},
|
|
2660
|
-
let e = E(22), t =
|
|
2659
|
+
}, zi = () => {
|
|
2660
|
+
let e = E(22), t = ce(), n = se(), [r, i] = V(Ri), a, o;
|
|
2661
2661
|
e[0] === n ? (a = e[1], o = e[2]) : (a = () => {
|
|
2662
2662
|
if (n?.subscribe) return n.subscribe({
|
|
2663
2663
|
formState: {
|
|
@@ -2678,9 +2678,9 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2678
2678
|
});
|
|
2679
2679
|
}
|
|
2680
2680
|
});
|
|
2681
|
-
}, o = [n], e[0] = n, e[1] = a, e[2] = o),
|
|
2682
|
-
let { errors: s, isValid: c, isDirty: l, isSubmitted: u, submitCount: d, dirtyFields: f } = r, [p, m] =
|
|
2683
|
-
e[3] === s ? h = e[4] : (h = Object.entries(s).map(
|
|
2681
|
+
}, o = [n], e[0] = n, e[1] = a, e[2] = o), R(a, o);
|
|
2682
|
+
let { errors: s, isValid: c, isDirty: l, isSubmitted: u, submitCount: d, dirtyFields: f } = r, [p, m] = V(!0), h;
|
|
2683
|
+
e[3] === s ? h = e[4] : (h = Object.entries(s).map(Hi), e[3] = s, e[4] = h);
|
|
2684
2684
|
let g = h, _;
|
|
2685
2685
|
e[5] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
|
|
2686
2686
|
position: "fixed",
|
|
@@ -2702,7 +2702,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2702
2702
|
}, e[5] = _) : _ = e[5];
|
|
2703
2703
|
let v, y;
|
|
2704
2704
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (v = () => {
|
|
2705
|
-
m(
|
|
2705
|
+
m(Ui);
|
|
2706
2706
|
}, y = {
|
|
2707
2707
|
padding: "8px 12px",
|
|
2708
2708
|
background: "#141b33",
|
|
@@ -2717,7 +2717,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2717
2717
|
textTransform: "uppercase"
|
|
2718
2718
|
}, e[6] = v, e[7] = y) : (v = e[6], y = e[7]);
|
|
2719
2719
|
let b = p ? "▾" : "▸", x = String(c), S = String(l), C = String(u), w;
|
|
2720
|
-
e[8] !== d || e[9] !== b || e[10] !== x || e[11] !== S || e[12] !== C ? (w = /* @__PURE__ */
|
|
2720
|
+
e[8] !== d || e[9] !== b || e[10] !== x || e[11] !== S || e[12] !== C ? (w = /* @__PURE__ */ W("button", {
|
|
2721
2721
|
type: "button",
|
|
2722
2722
|
onClick: v,
|
|
2723
2723
|
style: y,
|
|
@@ -2735,7 +2735,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2735
2735
|
]
|
|
2736
2736
|
}), e[8] = d, e[9] = b, e[10] = x, e[11] = S, e[12] = C, e[13] = w) : w = e[13];
|
|
2737
2737
|
let T;
|
|
2738
|
-
e[14] !== f || e[15] !== g || e[16] !== p || e[17] !== t ? (T = p && /* @__PURE__ */
|
|
2738
|
+
e[14] !== f || e[15] !== g || e[16] !== p || e[17] !== t ? (T = p && /* @__PURE__ */ W("div", {
|
|
2739
2739
|
style: {
|
|
2740
2740
|
overflow: "auto",
|
|
2741
2741
|
padding: 10,
|
|
@@ -2743,45 +2743,45 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2743
2743
|
gap: 10
|
|
2744
2744
|
},
|
|
2745
2745
|
children: [
|
|
2746
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ U(Vi, {
|
|
2747
2747
|
title: `Errors (${g.length})`,
|
|
2748
2748
|
accent: "#ff6b6b",
|
|
2749
|
-
children: g.length === 0 ? /* @__PURE__ */
|
|
2749
|
+
children: g.length === 0 ? /* @__PURE__ */ U("div", {
|
|
2750
2750
|
style: { opacity: .6 },
|
|
2751
2751
|
children: "none"
|
|
2752
|
-
}) : g.map(
|
|
2752
|
+
}) : g.map(Wi)
|
|
2753
2753
|
}),
|
|
2754
|
-
/* @__PURE__ */
|
|
2754
|
+
/* @__PURE__ */ U(Vi, {
|
|
2755
2755
|
title: "Values",
|
|
2756
2756
|
accent: "#7ce5b1",
|
|
2757
|
-
children: /* @__PURE__ */
|
|
2758
|
-
style:
|
|
2757
|
+
children: /* @__PURE__ */ U("pre", {
|
|
2758
|
+
style: Bi,
|
|
2759
2759
|
children: JSON.stringify(t ?? {}, null, 2)
|
|
2760
2760
|
})
|
|
2761
2761
|
}),
|
|
2762
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ U(Vi, {
|
|
2763
2763
|
title: "Dirty fields",
|
|
2764
2764
|
accent: "#7cb1e5",
|
|
2765
|
-
children: /* @__PURE__ */
|
|
2766
|
-
style:
|
|
2765
|
+
children: /* @__PURE__ */ U("pre", {
|
|
2766
|
+
style: Bi,
|
|
2767
2767
|
children: JSON.stringify(f ?? {}, null, 2)
|
|
2768
2768
|
})
|
|
2769
2769
|
})
|
|
2770
2770
|
]
|
|
2771
2771
|
}), e[14] = f, e[15] = g, e[16] = p, e[17] = t, e[18] = T) : T = e[18];
|
|
2772
2772
|
let D;
|
|
2773
|
-
return e[19] !== w || e[20] !== T ? (D = /* @__PURE__ */
|
|
2773
|
+
return e[19] !== w || e[20] !== T ? (D = /* @__PURE__ */ W("div", {
|
|
2774
2774
|
style: _,
|
|
2775
2775
|
children: [w, T]
|
|
2776
2776
|
}), e[19] = w, e[20] = T, e[21] = D) : D = e[21], D;
|
|
2777
|
-
},
|
|
2777
|
+
}, Bi = {
|
|
2778
2778
|
margin: 0,
|
|
2779
2779
|
whiteSpace: "pre-wrap",
|
|
2780
2780
|
wordBreak: "break-word",
|
|
2781
2781
|
fontFamily: "inherit",
|
|
2782
2782
|
fontSize: 11,
|
|
2783
2783
|
lineHeight: 1.45
|
|
2784
|
-
},
|
|
2784
|
+
}, Vi = (e) => {
|
|
2785
2785
|
let t = E(11), { title: n, accent: r, children: i } = e, a;
|
|
2786
2786
|
t[0] === r ? a = t[1] : (a = {
|
|
2787
2787
|
fontSize: 10,
|
|
@@ -2792,7 +2792,7 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2792
2792
|
fontWeight: 700
|
|
2793
2793
|
}, t[0] = r, t[1] = a);
|
|
2794
2794
|
let o;
|
|
2795
|
-
t[2] !== a || t[3] !== n ? (o = /* @__PURE__ */
|
|
2795
|
+
t[2] !== a || t[3] !== n ? (o = /* @__PURE__ */ U("div", {
|
|
2796
2796
|
style: a,
|
|
2797
2797
|
children: n
|
|
2798
2798
|
}), t[2] = a, t[3] = n, t[4] = o) : o = t[4];
|
|
@@ -2804,14 +2804,14 @@ var Xr = ((e) => (t) => t ? Yr(e, t) : e)({
|
|
|
2804
2804
|
padding: 8
|
|
2805
2805
|
}, t[5] = s) : s = t[5];
|
|
2806
2806
|
let c;
|
|
2807
|
-
t[6] === i ? c = t[7] : (c = /* @__PURE__ */
|
|
2807
|
+
t[6] === i ? c = t[7] : (c = /* @__PURE__ */ U("div", {
|
|
2808
2808
|
style: s,
|
|
2809
2809
|
children: i
|
|
2810
2810
|
}), t[6] = i, t[7] = c);
|
|
2811
2811
|
let l;
|
|
2812
|
-
return t[8] !== o || t[9] !== c ? (l = /* @__PURE__ */
|
|
2812
|
+
return t[8] !== o || t[9] !== c ? (l = /* @__PURE__ */ W("div", { children: [o, c] }), t[8] = o, t[9] = c, t[10] = l) : l = t[10], l;
|
|
2813
2813
|
};
|
|
2814
|
-
function
|
|
2814
|
+
function Hi(e) {
|
|
2815
2815
|
let [t, n] = e;
|
|
2816
2816
|
return {
|
|
2817
2817
|
key: t,
|
|
@@ -2819,19 +2819,19 @@ function Vi(e) {
|
|
|
2819
2819
|
type: n?.type ?? "—"
|
|
2820
2820
|
};
|
|
2821
2821
|
}
|
|
2822
|
-
function
|
|
2822
|
+
function Ui(e) {
|
|
2823
2823
|
return !e;
|
|
2824
2824
|
}
|
|
2825
|
-
function
|
|
2826
|
-
return /* @__PURE__ */
|
|
2825
|
+
function Wi(e) {
|
|
2826
|
+
return /* @__PURE__ */ W("div", {
|
|
2827
2827
|
style: { marginBottom: 4 },
|
|
2828
2828
|
children: [
|
|
2829
|
-
/* @__PURE__ */
|
|
2829
|
+
/* @__PURE__ */ U("span", {
|
|
2830
2830
|
style: { color: "#ffb86b" },
|
|
2831
2831
|
children: e.key
|
|
2832
2832
|
}),
|
|
2833
2833
|
" ",
|
|
2834
|
-
/* @__PURE__ */
|
|
2834
|
+
/* @__PURE__ */ W("span", {
|
|
2835
2835
|
style: { opacity: .7 },
|
|
2836
2836
|
children: [
|
|
2837
2837
|
"[",
|
|
@@ -2839,7 +2839,7 @@ function Ui(e) {
|
|
|
2839
2839
|
"]"
|
|
2840
2840
|
]
|
|
2841
2841
|
}),
|
|
2842
|
-
/* @__PURE__ */
|
|
2842
|
+
/* @__PURE__ */ U("div", {
|
|
2843
2843
|
style: {
|
|
2844
2844
|
paddingLeft: 8,
|
|
2845
2845
|
opacity: .85
|
|
@@ -2851,29 +2851,29 @@ function Ui(e) {
|
|
|
2851
2851
|
}
|
|
2852
2852
|
//#endregion
|
|
2853
2853
|
//#region ../../libraries/react-collection/dist/lib/components/FormHeader/FormHeader.cssm.js
|
|
2854
|
-
var
|
|
2855
|
-
let t = E(4), { className: n } = e, { uiConfig: r } =
|
|
2854
|
+
var Gi = "_1vist8m0", Ki = (e) => {
|
|
2855
|
+
let t = E(4), { className: n } = e, { uiConfig: r } = pi();
|
|
2856
2856
|
if (r?.hideFormHeading) return null;
|
|
2857
2857
|
let i;
|
|
2858
|
-
t[0] === n ? i = t[1] : (i = Z(
|
|
2858
|
+
t[0] === n ? i = t[1] : (i = Z(Gi, n), t[0] = n, t[1] = i);
|
|
2859
2859
|
let a;
|
|
2860
|
-
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */
|
|
2860
|
+
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */ U("h1", {
|
|
2861
2861
|
className: i,
|
|
2862
2862
|
children: "Create new"
|
|
2863
2863
|
}), t[2] = i, t[3] = a), a;
|
|
2864
|
-
},
|
|
2865
|
-
let t = E(5), { children: n, className: r } = e, { uiConfig: i } =
|
|
2864
|
+
}, qi = "zx38wb0", Ji = (e) => {
|
|
2865
|
+
let t = E(5), { children: n, className: r } = e, { uiConfig: i } = pi();
|
|
2866
2866
|
if (i?.hideSectionHeadings) return null;
|
|
2867
2867
|
let a;
|
|
2868
|
-
t[0] === r ? a = t[1] : (a = Z(
|
|
2868
|
+
t[0] === r ? a = t[1] : (a = Z(qi, r), t[0] = r, t[1] = a);
|
|
2869
2869
|
let o;
|
|
2870
|
-
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */
|
|
2870
|
+
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ U("h3", {
|
|
2871
2871
|
className: a,
|
|
2872
2872
|
children: n
|
|
2873
2873
|
}), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
|
|
2874
|
-
},
|
|
2874
|
+
}, Yi = "q22d794", Xi = "q22d795", Zi = "q22d796", Qi = "q22d797", $i = "q22d798", ea = 5, ta = "Thank you!", na = "Your response has been submitted successfully.", ra = () => {
|
|
2875
2875
|
let e = E(1), t;
|
|
2876
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2876
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ W("svg", {
|
|
2877
2877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2878
2878
|
viewBox: "0 0 24 24",
|
|
2879
2879
|
fill: "none",
|
|
@@ -2881,10 +2881,10 @@ var Wi = "_1vist8m0", Gi = (e) => {
|
|
|
2881
2881
|
strokeWidth: "2.5",
|
|
2882
2882
|
strokeLinecap: "round",
|
|
2883
2883
|
strokeLinejoin: "round",
|
|
2884
|
-
children: [/* @__PURE__ */
|
|
2884
|
+
children: [/* @__PURE__ */ U("title", { children: "Check Icon" }), /* @__PURE__ */ U("path", { d: "M20 6 9 17l-5-5" })]
|
|
2885
2885
|
}), e[0] = t) : t = e[0], t;
|
|
2886
|
-
},
|
|
2887
|
-
let { successConfig: n, schema: r } =
|
|
2886
|
+
}, ia = ({ onDismiss: e }) => {
|
|
2887
|
+
let { successConfig: n, schema: r } = pi(), i = r?.settings?.success_message, [a, o] = V(ea), s = (e) => !e || e.replace(/<[^>]*>/g, "").trim() === "", c = n?.title || i?.title || ta, l = n?.message || i?.message, u = s(l) ? na : l, d = n?.action || i?.action, f = d?.type ?? "none", p = f === "redirect" ? d?.value : void 0, m = (() => {
|
|
2888
2888
|
let e = p?.trim();
|
|
2889
2889
|
if (e && !e.startsWith("//")) {
|
|
2890
2890
|
if (e.startsWith("/")) return e;
|
|
@@ -2894,7 +2894,7 @@ var Wi = "_1vist8m0", Gi = (e) => {
|
|
|
2894
2894
|
} catch {}
|
|
2895
2895
|
}
|
|
2896
2896
|
})();
|
|
2897
|
-
|
|
2897
|
+
R(() => {
|
|
2898
2898
|
if (!m) return;
|
|
2899
2899
|
let e = setInterval(() => {
|
|
2900
2900
|
o((t) => t <= 1 ? (clearInterval(e), window.location.href = m, 0) : t - 1);
|
|
@@ -2904,40 +2904,40 @@ var Wi = "_1vist8m0", Gi = (e) => {
|
|
|
2904
2904
|
let h = I(() => {
|
|
2905
2905
|
m && (window.location.href = m);
|
|
2906
2906
|
}, [m]);
|
|
2907
|
-
return /* @__PURE__ */
|
|
2908
|
-
className:
|
|
2909
|
-
children: /* @__PURE__ */
|
|
2910
|
-
className:
|
|
2907
|
+
return /* @__PURE__ */ U("div", {
|
|
2908
|
+
className: Yi,
|
|
2909
|
+
children: /* @__PURE__ */ W("div", {
|
|
2910
|
+
className: Xi,
|
|
2911
2911
|
children: [
|
|
2912
|
-
/* @__PURE__ */
|
|
2913
|
-
className: Xi,
|
|
2914
|
-
children: /* @__PURE__ */ H(na, {})
|
|
2915
|
-
}),
|
|
2916
|
-
/* @__PURE__ */ H("h2", {
|
|
2912
|
+
/* @__PURE__ */ U("div", {
|
|
2917
2913
|
className: Zi,
|
|
2918
|
-
children:
|
|
2914
|
+
children: /* @__PURE__ */ U(ra, {})
|
|
2919
2915
|
}),
|
|
2920
|
-
/* @__PURE__ */
|
|
2916
|
+
/* @__PURE__ */ U("h2", {
|
|
2921
2917
|
className: Qi,
|
|
2918
|
+
children: c
|
|
2919
|
+
}),
|
|
2920
|
+
/* @__PURE__ */ U("div", {
|
|
2921
|
+
className: $i,
|
|
2922
2922
|
dangerouslySetInnerHTML: { __html: u }
|
|
2923
2923
|
}),
|
|
2924
|
-
f === "submit_another" && /* @__PURE__ */
|
|
2924
|
+
f === "submit_another" && /* @__PURE__ */ U("div", {
|
|
2925
2925
|
className: "q22d799",
|
|
2926
|
-
children: /* @__PURE__ */
|
|
2926
|
+
children: /* @__PURE__ */ U(t, {
|
|
2927
2927
|
variant: "default",
|
|
2928
2928
|
size: "sm",
|
|
2929
2929
|
onClick: e,
|
|
2930
2930
|
children: "Submit Another"
|
|
2931
2931
|
})
|
|
2932
2932
|
}),
|
|
2933
|
-
f === "redirect" && m && /* @__PURE__ */
|
|
2933
|
+
f === "redirect" && m && /* @__PURE__ */ W("div", {
|
|
2934
2934
|
className: "q22d799",
|
|
2935
|
-
children: [/* @__PURE__ */
|
|
2935
|
+
children: [/* @__PURE__ */ U(t, {
|
|
2936
2936
|
variant: "default",
|
|
2937
2937
|
size: "sm",
|
|
2938
2938
|
onClick: h,
|
|
2939
2939
|
children: "Continue"
|
|
2940
|
-
}), /* @__PURE__ */
|
|
2940
|
+
}), /* @__PURE__ */ W("span", {
|
|
2941
2941
|
className: "q22d79a",
|
|
2942
2942
|
children: [
|
|
2943
2943
|
"Redirecting in ",
|
|
@@ -2949,16 +2949,16 @@ var Wi = "_1vist8m0", Gi = (e) => {
|
|
|
2949
2949
|
]
|
|
2950
2950
|
})
|
|
2951
2951
|
});
|
|
2952
|
-
},
|
|
2953
|
-
let t = E(29), { isError: n, contentId: r, publishedId: i, getContentId: a, allFormValues: o } = e, { collection: s } = A(), { schema: c, isLoggedIn: l, preview: u } =
|
|
2952
|
+
}, aa = (e) => {
|
|
2953
|
+
let t = E(29), { isError: n, contentId: r, publishedId: i, getContentId: a, allFormValues: o } = e, { collection: s } = A(), { schema: c, isLoggedIn: l, preview: u } = pi(), { formState: d } = se(), f = ce(), p;
|
|
2954
2954
|
t[0] !== s || t[1] !== r || t[2] !== a || t[3] !== n || t[4] !== l || t[5] !== u || t[6] !== i || t[7] !== c?.allow_draft || t[8] !== c?.key ? (p = (e) => {
|
|
2955
2955
|
u || i || c?.key && !n && c?.allow_draft && (l ? r ? s.editDraftEntry(c?.key, r, e).then((e) => {
|
|
2956
2956
|
e?.content?.data?._id && a(e?.content?.data?._id);
|
|
2957
|
-
}).catch(
|
|
2957
|
+
}).catch(oa) : s.saveDraftEntry(c?.key, e).then((e) => {
|
|
2958
2958
|
e?.content?.data?._id && a(e?.content?.data?._id);
|
|
2959
|
-
}).catch(
|
|
2959
|
+
}).catch(sa) : _i(c?.key, e));
|
|
2960
2960
|
}, t[0] = s, t[1] = r, t[2] = a, t[3] = n, t[4] = l, t[5] = u, t[6] = i, t[7] = c?.allow_draft, t[8] = c?.key, t[9] = p) : p = t[9];
|
|
2961
|
-
let m =
|
|
2961
|
+
let m = Me(p, 100), { isDirty: h, isSubmitting: g, isSubmitSuccessful: _ } = d, v;
|
|
2962
2962
|
t[10] !== o || t[11] !== m || t[12] !== f || t[13] !== h || t[14] !== n || t[15] !== _ || t[16] !== g || t[17] !== u ? (v = () => {
|
|
2963
2963
|
if (!u) {
|
|
2964
2964
|
if (g || _) {
|
|
@@ -2982,20 +2982,20 @@ var Wi = "_1vist8m0", Gi = (e) => {
|
|
|
2982
2982
|
g,
|
|
2983
2983
|
_,
|
|
2984
2984
|
u
|
|
2985
|
-
], t[19] = r, t[20] = f, t[21] = h, t[22] = n, t[23] = l, t[24] = _, t[25] = g, t[26] = u, t[27] = i, t[28] = y) : y = t[28],
|
|
2985
|
+
], t[19] = r, t[20] = f, t[21] = h, t[22] = n, t[23] = l, t[24] = _, t[25] = g, t[26] = u, t[27] = i, t[28] = y) : y = t[28], R(v, y), null;
|
|
2986
2986
|
};
|
|
2987
|
-
function
|
|
2987
|
+
function oa() {
|
|
2988
2988
|
console.error("saving entry failed");
|
|
2989
2989
|
}
|
|
2990
|
-
function
|
|
2990
|
+
function sa() {
|
|
2991
2991
|
console.error("saving entry failed");
|
|
2992
2992
|
}
|
|
2993
2993
|
//#endregion
|
|
2994
2994
|
//#region ../../libraries/react-collection/dist/lib/variants/DefaultFormVariant/DefaultFormVariant.cssm.js
|
|
2995
|
-
var
|
|
2996
|
-
let e = E(51), { schema: n, containerStyles: r, submitButtonConfig: i, isDisabled: a, widgets: o, disableCaptcha: s, debug: c, enableVerification: l } =
|
|
2995
|
+
var ca = "fil1ri0", la = "fil1ri1", ua = "fil1ri2", da = "fil1ri5", fa = () => {
|
|
2996
|
+
let e = E(51), { schema: n, containerStyles: r, submitButtonConfig: i, isDisabled: a, widgets: o, disableCaptcha: s, debug: c, enableVerification: l } = pi(), u;
|
|
2997
2997
|
e[0] === n ? u = e[1] : (u = { schema: n }, e[0] = n, e[1] = u);
|
|
2998
|
-
let { methods: d, isError: f, isLoading: p, contentId: m, publishedId: h, handleContentId: g, submitToRemote: _, allFormValues: v, showSuccessOverlay: y, dismissSuccessOverlay: b } =
|
|
2998
|
+
let { methods: d, isError: f, isLoading: p, contentId: m, publishedId: h, handleContentId: g, submitToRemote: _, allFormValues: v, showSuccessOverlay: y, dismissSuccessOverlay: b } = yi(u), { handleSubmit: x, watch: S, formState: C } = d, { isSubmitting: w } = C, T;
|
|
2999
2999
|
e[2] === S ? T = e[3] : (T = S("__captcha"), e[2] = S, e[3] = T);
|
|
3000
3000
|
let D = T, O;
|
|
3001
3001
|
e[4] === _ ? O = e[5] : (O = async (e) => {
|
|
@@ -3006,12 +3006,12 @@ var sa = "fil1ri0", ca = "fil1ri1", la = "fil1ri2", ua = "fil1ri5", da = () => {
|
|
|
3006
3006
|
let A = k;
|
|
3007
3007
|
if (y) {
|
|
3008
3008
|
let t;
|
|
3009
|
-
return e[9] === b ? t = e[10] : (t = /* @__PURE__ */
|
|
3009
|
+
return e[9] === b ? t = e[10] : (t = /* @__PURE__ */ U(ia, { onDismiss: b }), e[9] = b, e[10] = t), t;
|
|
3010
3010
|
}
|
|
3011
3011
|
let j;
|
|
3012
|
-
e[11] === c ? j = e[12] : (j = c && /* @__PURE__ */
|
|
3012
|
+
e[11] === c ? j = e[12] : (j = c && /* @__PURE__ */ U(zi, {}), e[11] = c, e[12] = j);
|
|
3013
3013
|
let M = m || "", N = h || "", P;
|
|
3014
|
-
e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */
|
|
3014
|
+
e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */ U(aa, {
|
|
3015
3015
|
getContentId: g,
|
|
3016
3016
|
isError: f,
|
|
3017
3017
|
contentId: M,
|
|
@@ -3019,32 +3019,32 @@ var sa = "fil1ri0", ca = "fil1ri1", la = "fil1ri2", ua = "fil1ri5", da = () => {
|
|
|
3019
3019
|
allFormValues: v
|
|
3020
3020
|
}), e[13] = v, e[14] = g, e[15] = f, e[16] = M, e[17] = N, e[18] = P) : P = e[18];
|
|
3021
3021
|
let F;
|
|
3022
|
-
e[19] === r ? F = e[20] : (F = Z(
|
|
3022
|
+
e[19] === r ? F = e[20] : (F = Z(ca, r), e[19] = r, e[20] = F);
|
|
3023
3023
|
let I;
|
|
3024
|
-
e[21] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */
|
|
3024
|
+
e[21] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ U(Ki, {}), e[21] = I) : I = e[21];
|
|
3025
3025
|
let L = p && "fil1ri3", R;
|
|
3026
|
-
e[22] === L ? R = e[23] : (R = Z(
|
|
3026
|
+
e[22] === L ? R = e[23] : (R = Z(la, L), e[22] = L, e[23] = R);
|
|
3027
3027
|
let z;
|
|
3028
|
-
e[24] !== l || e[25] !== n || e[26] !== o ? (z = n?.sections?.map((e) => /* @__PURE__ */
|
|
3028
|
+
e[24] !== l || e[25] !== n || e[26] !== o ? (z = n?.sections?.map((e) => /* @__PURE__ */ U(pa, {
|
|
3029
3029
|
schema: n,
|
|
3030
3030
|
section: e,
|
|
3031
3031
|
widgets: o,
|
|
3032
3032
|
enableVerification: l
|
|
3033
3033
|
}, e.id)), e[24] = l, e[25] = n, e[26] = o, e[27] = z) : z = e[27];
|
|
3034
3034
|
let B;
|
|
3035
|
-
e[28] === s ? B = e[29] : (B = !s && /* @__PURE__ */
|
|
3035
|
+
e[28] === s ? B = e[29] : (B = !s && /* @__PURE__ */ U(Li, {}), e[28] = s, e[29] = B);
|
|
3036
3036
|
let V;
|
|
3037
|
-
e[30] !== D || e[31] !== a || e[32] !== w || e[33] !== i?.show || e[34] !== i?.styles || e[35] !== i?.text ? (V = i?.show && /* @__PURE__ */
|
|
3037
|
+
e[30] !== D || e[31] !== a || e[32] !== w || e[33] !== i?.show || e[34] !== i?.styles || e[35] !== i?.text ? (V = i?.show && /* @__PURE__ */ U("div", {
|
|
3038
3038
|
className: "fil1ri4",
|
|
3039
|
-
children: /* @__PURE__ */
|
|
3039
|
+
children: /* @__PURE__ */ U(t, {
|
|
3040
3040
|
className: i?.styles,
|
|
3041
3041
|
disabled: a || w,
|
|
3042
3042
|
type: "submit",
|
|
3043
3043
|
children: w ? "Saving..." : D === "verifying" ? "Verifying..." : i?.text || "Save"
|
|
3044
3044
|
})
|
|
3045
3045
|
}), e[30] = D, e[31] = a, e[32] = w, e[33] = i?.show, e[34] = i?.styles, e[35] = i?.text, e[36] = V) : V = e[36];
|
|
3046
|
-
let
|
|
3047
|
-
e[37] !== A || e[38] !== R || e[39] !== z || e[40] !== B || e[41] !== V ? (
|
|
3046
|
+
let H;
|
|
3047
|
+
e[37] !== A || e[38] !== R || e[39] !== z || e[40] !== B || e[41] !== V ? (H = /* @__PURE__ */ W("form", {
|
|
3048
3048
|
className: R,
|
|
3049
3049
|
id: "collection-form",
|
|
3050
3050
|
onSubmit: A,
|
|
@@ -3053,14 +3053,14 @@ var sa = "fil1ri0", ca = "fil1ri1", la = "fil1ri2", ua = "fil1ri5", da = () => {
|
|
|
3053
3053
|
B,
|
|
3054
3054
|
V
|
|
3055
3055
|
]
|
|
3056
|
-
}), e[37] = A, e[38] = R, e[39] = z, e[40] = B, e[41] = V, e[42] =
|
|
3056
|
+
}), e[37] = A, e[38] = R, e[39] = z, e[40] = B, e[41] = V, e[42] = H) : H = e[42];
|
|
3057
3057
|
let G;
|
|
3058
|
-
e[43] !==
|
|
3058
|
+
e[43] !== H || e[44] !== F ? (G = /* @__PURE__ */ W("div", {
|
|
3059
3059
|
className: F,
|
|
3060
|
-
children: [I,
|
|
3061
|
-
}), e[43] =
|
|
3060
|
+
children: [I, H]
|
|
3061
|
+
}), e[43] = H, e[44] = F, e[45] = G) : G = e[45];
|
|
3062
3062
|
let K;
|
|
3063
|
-
return e[46] !== d || e[47] !== G || e[48] !== j || e[49] !== P ? (K = /* @__PURE__ */
|
|
3063
|
+
return e[46] !== d || e[47] !== G || e[48] !== j || e[49] !== P ? (K = /* @__PURE__ */ W(re, {
|
|
3064
3064
|
...d,
|
|
3065
3065
|
children: [
|
|
3066
3066
|
j,
|
|
@@ -3068,65 +3068,65 @@ var sa = "fil1ri0", ca = "fil1ri1", la = "fil1ri2", ua = "fil1ri5", da = () => {
|
|
|
3068
3068
|
G
|
|
3069
3069
|
]
|
|
3070
3070
|
}), e[46] = d, e[47] = G, e[48] = j, e[49] = P, e[50] = K) : K = e[50], K;
|
|
3071
|
-
},
|
|
3071
|
+
}, pa = (e) => {
|
|
3072
3072
|
let t = E(12), { schema: n, section: r, widgets: i, enableVerification: a } = e;
|
|
3073
|
-
if (!
|
|
3073
|
+
if (!ut(n, r)) return null;
|
|
3074
3074
|
let o;
|
|
3075
|
-
t[0] === r ? o = t[1] : (o = r?.label && /* @__PURE__ */
|
|
3075
|
+
t[0] === r ? o = t[1] : (o = r?.label && /* @__PURE__ */ U(Ji, { children: r.label }), t[0] = r, t[1] = o);
|
|
3076
3076
|
let s;
|
|
3077
|
-
t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (s = r?.fields?.map((e) => /* @__PURE__ */
|
|
3077
|
+
t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (s = r?.fields?.map((e) => /* @__PURE__ */ U(Jr, {
|
|
3078
3078
|
field: e,
|
|
3079
3079
|
widgets: i,
|
|
3080
3080
|
schema: n,
|
|
3081
3081
|
settings: { enableVerification: a }
|
|
3082
3082
|
}, e?.key)), t[2] = a, t[3] = n, t[4] = r?.fields, t[5] = i, t[6] = s) : s = t[6];
|
|
3083
3083
|
let c;
|
|
3084
|
-
t[7] === s ? c = t[8] : (c = /* @__PURE__ */
|
|
3085
|
-
className:
|
|
3084
|
+
t[7] === s ? c = t[8] : (c = /* @__PURE__ */ U("div", {
|
|
3085
|
+
className: da,
|
|
3086
3086
|
children: s
|
|
3087
3087
|
}), t[7] = s, t[8] = c);
|
|
3088
3088
|
let l;
|
|
3089
|
-
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */
|
|
3090
|
-
className:
|
|
3089
|
+
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ W("div", {
|
|
3090
|
+
className: ua,
|
|
3091
3091
|
children: [o, c]
|
|
3092
3092
|
}), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
|
|
3093
|
-
},
|
|
3094
|
-
let t = E(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } =
|
|
3095
|
-
t[0] === l ? u = t[1] : (u = Z(
|
|
3093
|
+
}, ma = "_1kah2gz0", ha = "_1kah2gz1", ga = "_1kah2gz3", _a = (e) => {
|
|
3094
|
+
let t = E(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } = se(), { errors: o } = a, s = Object.keys(o || {}).length > 0 || i, c = Math.floor((r + 1) * 100 / n), l = s && "_1kah2gz2", u;
|
|
3095
|
+
t[0] === l ? u = t[1] : (u = Z(ha, l), t[0] = l, t[1] = u);
|
|
3096
3096
|
let d = s && "_1kah2gz4", f;
|
|
3097
|
-
t[2] === d ? f = t[3] : (f = Z(
|
|
3097
|
+
t[2] === d ? f = t[3] : (f = Z(ga, d), t[2] = d, t[3] = f);
|
|
3098
3098
|
let p = `${c}%`, m;
|
|
3099
3099
|
t[4] === p ? m = t[5] : (m = { width: p }, t[4] = p, t[5] = m);
|
|
3100
3100
|
let h;
|
|
3101
|
-
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */
|
|
3101
|
+
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */ U("div", {
|
|
3102
3102
|
className: f,
|
|
3103
3103
|
style: m
|
|
3104
3104
|
}), t[6] = f, t[7] = m, t[8] = h) : h = t[8];
|
|
3105
3105
|
let g;
|
|
3106
|
-
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */
|
|
3107
|
-
className:
|
|
3108
|
-
children: /* @__PURE__ */
|
|
3106
|
+
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */ U("div", {
|
|
3107
|
+
className: ma,
|
|
3108
|
+
children: /* @__PURE__ */ U("div", {
|
|
3109
3109
|
className: u,
|
|
3110
3110
|
children: h
|
|
3111
3111
|
})
|
|
3112
3112
|
}), t[9] = u, t[10] = h, t[11] = g) : g = t[11], g;
|
|
3113
|
-
},
|
|
3113
|
+
}, va = "_1ypxmcv0", ya = "_1ypxmcv1", ba = "_1ypxmcvb", xa = "_1ypxmcvc", Sa = (e, t) => e?.sections?.flatMap((n) => (n.fields || []).filter((n) => !nt(e, n, t)).map((e) => ({
|
|
3114
3114
|
id: e.key,
|
|
3115
3115
|
content: e,
|
|
3116
3116
|
sectionId: n.id || "",
|
|
3117
3117
|
sectionLabel: n.label
|
|
3118
|
-
}))) ?? [],
|
|
3119
|
-
let e = E(82), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } =
|
|
3120
|
-
e[0] === r ? c = e[1] : (c = () =>
|
|
3121
|
-
let [l, u] =
|
|
3118
|
+
}))) ?? [], Ca = () => {
|
|
3119
|
+
let e = E(82), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } = pi(), c;
|
|
3120
|
+
e[0] === r ? c = e[1] : (c = () => Sa(r, {}), e[0] = r, e[1] = c);
|
|
3121
|
+
let [l, u] = V(c), [d, f] = V(0), [p, m] = V(0), h;
|
|
3122
3122
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
3123
3123
|
state: "entered",
|
|
3124
3124
|
direction: "next"
|
|
3125
3125
|
}, e[2] = h) : h = e[2];
|
|
3126
|
-
let [g, _] =
|
|
3126
|
+
let [g, _] = V(h), v;
|
|
3127
3127
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (v = [], e[3] = v) : v = e[3];
|
|
3128
|
-
let [y, b] =
|
|
3129
|
-
e[4] === r ? w = e[5] : (w = (e) => u(
|
|
3128
|
+
let [y, b] = V(v), x = g.state === "exiting" ? d : p, S = p === l.length - 1, C = l[x], w;
|
|
3129
|
+
e[4] === r ? w = e[5] : (w = (e) => u(Sa(r, e)), e[4] = r, e[5] = w);
|
|
3130
3130
|
let T;
|
|
3131
3131
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (T = () => {
|
|
3132
3132
|
b([]), m(0), _({
|
|
@@ -3151,26 +3151,26 @@ var sa = "fil1ri0", ca = "fil1ri1", la = "fil1ri2", ua = "fil1ri5", da = () => {
|
|
|
3151
3151
|
onSubmitSuccess: T,
|
|
3152
3152
|
onSubmitError: D
|
|
3153
3153
|
}, e[10] = r, e[11] = w, e[12] = D, e[13] = O) : O = e[13];
|
|
3154
|
-
let { methods: k, submitToRemote: A, appendFormValues: j, handleContentId: M, isError: N, allFormValues: P, contentId: F, publishedId: I, isLoading:
|
|
3154
|
+
let { methods: k, submitToRemote: A, appendFormValues: j, handleContentId: M, isError: N, allFormValues: P, contentId: F, publishedId: I, isLoading: L, showSuccessOverlay: z, dismissSuccessOverlay: B } = yi(O), { handleSubmit: H, setFocus: G, setError: K, formState: q } = k, { isSubmitting: J } = q, Y;
|
|
3155
3155
|
e[14] !== j || e[15] !== C?.content?.key || e[16] !== C?.id || e[17] !== r || e[18] !== A ? (Y = async (e) => {
|
|
3156
3156
|
b((e) => e.filter((e) => e?.param !== C?.content?.key));
|
|
3157
|
-
let t =
|
|
3157
|
+
let t = Sa(r, e), n = t.findIndex((e) => e.id === C?.id);
|
|
3158
3158
|
n !== -1 && n + 1 < t.length ? (u(t), j(e), m(n + 1), _({
|
|
3159
3159
|
state: "exiting",
|
|
3160
3160
|
direction: "next"
|
|
3161
3161
|
})) : await A(e);
|
|
3162
3162
|
}, e[14] = j, e[15] = C?.content?.key, e[16] = C?.id, e[17] = r, e[18] = A, e[19] = Y) : Y = e[19];
|
|
3163
3163
|
let X;
|
|
3164
|
-
e[20] !==
|
|
3165
|
-
let ee = X,
|
|
3166
|
-
e[23] !== g.state || e[24] !== p ? (
|
|
3167
|
-
g.state === "entered" && (p <= 0 || (m(
|
|
3164
|
+
e[20] !== H || e[21] !== Y ? (X = H(Y), e[20] = H, e[21] = Y, e[22] = X) : X = e[22];
|
|
3165
|
+
let ee = X, te;
|
|
3166
|
+
e[23] !== g.state || e[24] !== p ? (te = () => {
|
|
3167
|
+
g.state === "entered" && (p <= 0 || (m(wa), _({
|
|
3168
3168
|
state: "exiting",
|
|
3169
3169
|
direction: "prev"
|
|
3170
3170
|
})));
|
|
3171
|
-
}, e[23] = g.state, e[24] = p, e[25] =
|
|
3172
|
-
let ne =
|
|
3173
|
-
e[26] !== g.direction || e[27] !== g.state || e[28] !== C || e[29] !== p || e[30] !== G ? (
|
|
3171
|
+
}, e[23] = g.state, e[24] = p, e[25] = te) : te = e[25];
|
|
3172
|
+
let ne = te, ie;
|
|
3173
|
+
e[26] !== g.direction || e[27] !== g.state || e[28] !== C || e[29] !== p || e[30] !== G ? (ie = () => {
|
|
3174
3174
|
g.state === "exiting" ? (f(p), _({
|
|
3175
3175
|
state: "entering",
|
|
3176
3176
|
direction: g.direction
|
|
@@ -3178,9 +3178,9 @@ var sa = "fil1ri0", ca = "fil1ri1", la = "fil1ri2", ua = "fil1ri5", da = () => {
|
|
|
3178
3178
|
state: "entered",
|
|
3179
3179
|
direction: g.direction
|
|
3180
3180
|
}), C?.content?.key && G(C.content.key));
|
|
3181
|
-
}, e[26] = g.direction, e[27] = g.state, e[28] = C, e[29] = p, e[30] = G, e[31] =
|
|
3182
|
-
let
|
|
3183
|
-
if (e[32] !== C || e[33] !== y || e[34] !== K ? (
|
|
3181
|
+
}, e[26] = g.direction, e[27] = g.state, e[28] = C, e[29] = p, e[30] = G, e[31] = ie) : ie = e[31];
|
|
3182
|
+
let Q = ie, ae, oe;
|
|
3183
|
+
if (e[32] !== C || e[33] !== y || e[34] !== K ? (ae = () => {
|
|
3184
3184
|
if (C && y?.length > 0) {
|
|
3185
3185
|
let e = y?.find((e) => e?.param === C?.content?.key);
|
|
3186
3186
|
e && K(e?.param, {
|
|
@@ -3188,121 +3188,121 @@ var sa = "fil1ri0", ca = "fil1ri1", la = "fil1ri2", ua = "fil1ri5", da = () => {
|
|
|
3188
3188
|
message: e?.message
|
|
3189
3189
|
});
|
|
3190
3190
|
}
|
|
3191
|
-
},
|
|
3191
|
+
}, oe = [
|
|
3192
3192
|
C,
|
|
3193
3193
|
y,
|
|
3194
3194
|
K
|
|
3195
|
-
], e[32] = C, e[33] = y, e[34] = K, e[35] =
|
|
3195
|
+
], e[32] = C, e[33] = y, e[34] = K, e[35] = ae, e[36] = oe) : (ae = e[35], oe = e[36]), R(ae, oe), !r || l.length === 0) return null;
|
|
3196
3196
|
if (z) {
|
|
3197
3197
|
let t;
|
|
3198
|
-
return e[37] ===
|
|
3198
|
+
return e[37] === B ? t = e[38] : (t = /* @__PURE__ */ U(ia, { onDismiss: B }), e[37] = B, e[38] = t), t;
|
|
3199
3199
|
}
|
|
3200
|
-
let
|
|
3201
|
-
e[39] !== P || e[40] !== M || e[41] !== N || e[42] !==
|
|
3200
|
+
let se = J || L, ce = F || "", le = I || "", de;
|
|
3201
|
+
e[39] !== P || e[40] !== M || e[41] !== N || e[42] !== ce || e[43] !== le ? (de = /* @__PURE__ */ U(aa, {
|
|
3202
3202
|
getContentId: M,
|
|
3203
3203
|
isError: N,
|
|
3204
|
-
contentId:
|
|
3204
|
+
contentId: ce,
|
|
3205
3205
|
publishedId: le,
|
|
3206
3206
|
allFormValues: P
|
|
3207
|
-
}), e[39] = P, e[40] = M, e[41] = N, e[42] =
|
|
3208
|
-
let
|
|
3209
|
-
e[45] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3210
|
-
let
|
|
3211
|
-
e[46] ===
|
|
3212
|
-
className:
|
|
3213
|
-
children:
|
|
3214
|
-
}), e[46] =
|
|
3215
|
-
let
|
|
3216
|
-
e[48] !== p || e[49] !==
|
|
3207
|
+
}), e[39] = P, e[40] = M, e[41] = N, e[42] = ce, e[43] = le, e[44] = de) : de = e[44];
|
|
3208
|
+
let fe;
|
|
3209
|
+
e[45] === Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */ U(Ki, { className: xa }), e[45] = fe) : fe = e[45];
|
|
3210
|
+
let pe = C?.sectionLabel, me;
|
|
3211
|
+
e[46] === pe ? me = e[47] : (me = /* @__PURE__ */ U(Ji, {
|
|
3212
|
+
className: ba,
|
|
3213
|
+
children: pe
|
|
3214
|
+
}), e[46] = pe, e[47] = me);
|
|
3215
|
+
let he = l?.length || 1, ge = Array.isArray(y) && y?.length > 0, _e;
|
|
3216
|
+
e[48] !== p || e[49] !== he || e[50] !== ge ? (_e = /* @__PURE__ */ U(_a, {
|
|
3217
3217
|
currentStepIndex: p,
|
|
3218
|
-
totalSteps:
|
|
3219
|
-
hasLevoErrors:
|
|
3220
|
-
}), e[48] = p, e[49] =
|
|
3221
|
-
let
|
|
3222
|
-
e[52] !==
|
|
3223
|
-
className:
|
|
3218
|
+
totalSteps: he,
|
|
3219
|
+
hasLevoErrors: ge
|
|
3220
|
+
}), e[48] = p, e[49] = he, e[50] = ge, e[51] = _e) : _e = e[51];
|
|
3221
|
+
let ve;
|
|
3222
|
+
e[52] !== me || e[53] !== _e ? (ve = /* @__PURE__ */ W("div", {
|
|
3223
|
+
className: va,
|
|
3224
3224
|
children: [
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3225
|
+
fe,
|
|
3226
|
+
me,
|
|
3227
|
+
_e
|
|
3228
3228
|
]
|
|
3229
|
-
}), e[52] =
|
|
3230
|
-
let ve;
|
|
3231
|
-
e[55] === o ? ve = e[56] : (ve = Z(va, o), e[55] = o, e[56] = ve);
|
|
3229
|
+
}), e[52] = me, e[53] = _e, e[54] = ve) : ve = e[54];
|
|
3232
3230
|
let ye;
|
|
3233
|
-
e[
|
|
3231
|
+
e[55] === o ? ye = e[56] : (ye = Z(ya, o), e[55] = o, e[56] = ye);
|
|
3232
|
+
let be;
|
|
3233
|
+
e[57] !== g.direction || e[58] !== g.state || e[59] !== C || e[60] !== n || e[61] !== s || e[62] !== Q || e[63] !== ne || e[64] !== se || e[65] !== S || e[66] !== p || e[67] !== ee || e[68] !== r || e[69] !== a?.show || e[70] !== a?.styles || e[71] !== a?.text || e[72] !== i ? (be = C && /* @__PURE__ */ U("div", {
|
|
3234
3234
|
className: "_1ypxmcv6",
|
|
3235
3235
|
"data-state": g.state,
|
|
3236
3236
|
"data-direction": g.direction,
|
|
3237
|
-
onAnimationEnd:
|
|
3238
|
-
children: /* @__PURE__ */
|
|
3237
|
+
onAnimationEnd: Q,
|
|
3238
|
+
children: /* @__PURE__ */ W("form", {
|
|
3239
3239
|
onSubmit: ee,
|
|
3240
3240
|
className: "_1ypxmcv7",
|
|
3241
3241
|
children: [
|
|
3242
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ U(Jr, {
|
|
3243
3243
|
field: C.content,
|
|
3244
3244
|
schema: r,
|
|
3245
3245
|
widgets: i,
|
|
3246
3246
|
settings: { enableVerification: s }
|
|
3247
3247
|
}),
|
|
3248
|
-
!n && S && /* @__PURE__ */
|
|
3249
|
-
/* @__PURE__ */
|
|
3248
|
+
!n && S && /* @__PURE__ */ U(Li, {}),
|
|
3249
|
+
/* @__PURE__ */ W("div", {
|
|
3250
3250
|
className: "_1ypxmcv8",
|
|
3251
|
-
children: [/* @__PURE__ */
|
|
3251
|
+
children: [/* @__PURE__ */ U("div", { className: "_1ypxmcv9" }), /* @__PURE__ */ W("div", {
|
|
3252
3252
|
className: "_1ypxmcva",
|
|
3253
|
-
children: [/* @__PURE__ */
|
|
3253
|
+
children: [/* @__PURE__ */ W(t, {
|
|
3254
3254
|
type: "button",
|
|
3255
3255
|
onClick: ne,
|
|
3256
3256
|
size: "lg",
|
|
3257
|
-
disabled: p === 0 ||
|
|
3257
|
+
disabled: p === 0 || se || g.state !== "entered",
|
|
3258
3258
|
variant: "ghost",
|
|
3259
|
-
children: [/* @__PURE__ */
|
|
3259
|
+
children: [/* @__PURE__ */ U(ue, {
|
|
3260
3260
|
size: 18,
|
|
3261
3261
|
className: "mr-2"
|
|
3262
3262
|
}), "Prev"]
|
|
3263
|
-
}), (!S || a?.show !== !1) && /* @__PURE__ */
|
|
3263
|
+
}), (!S || a?.show !== !1) && /* @__PURE__ */ U(t, {
|
|
3264
3264
|
type: "submit",
|
|
3265
3265
|
size: "lg",
|
|
3266
3266
|
className: a?.styles,
|
|
3267
|
-
disabled:
|
|
3268
|
-
children:
|
|
3267
|
+
disabled: se || g.state !== "entered",
|
|
3268
|
+
children: se ? "Saving..." : S ? a?.text || "Submit" : "Next"
|
|
3269
3269
|
})]
|
|
3270
3270
|
})]
|
|
3271
3271
|
})
|
|
3272
3272
|
]
|
|
3273
3273
|
})
|
|
3274
|
-
}, C.id), e[57] = g.direction, e[58] = g.state, e[59] = C, e[60] = n, e[61] = s, e[62] =
|
|
3275
|
-
let be;
|
|
3276
|
-
e[74] !== ve || e[75] !== ye ? (be = /* @__PURE__ */ H("div", {
|
|
3277
|
-
className: ve,
|
|
3278
|
-
children: ye
|
|
3279
|
-
}), e[74] = ve, e[75] = ye, e[76] = be) : be = e[76];
|
|
3274
|
+
}, C.id), e[57] = g.direction, e[58] = g.state, e[59] = C, e[60] = n, e[61] = s, e[62] = Q, e[63] = ne, e[64] = se, e[65] = S, e[66] = p, e[67] = ee, e[68] = r, e[69] = a?.show, e[70] = a?.styles, e[71] = a?.text, e[72] = i, e[73] = be) : be = e[73];
|
|
3280
3275
|
let xe;
|
|
3281
|
-
|
|
3276
|
+
e[74] !== ye || e[75] !== be ? (xe = /* @__PURE__ */ U("div", {
|
|
3277
|
+
className: ye,
|
|
3278
|
+
children: be
|
|
3279
|
+
}), e[74] = ye, e[75] = be, e[76] = xe) : xe = e[76];
|
|
3280
|
+
let Se;
|
|
3281
|
+
return e[77] !== k || e[78] !== de || e[79] !== ve || e[80] !== xe ? (Se = /* @__PURE__ */ W(re, {
|
|
3282
3282
|
...k,
|
|
3283
3283
|
children: [
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3284
|
+
de,
|
|
3285
|
+
ve,
|
|
3286
|
+
xe
|
|
3287
3287
|
]
|
|
3288
|
-
}), e[77] = k, e[78] =
|
|
3288
|
+
}), e[77] = k, e[78] = de, e[79] = ve, e[80] = xe, e[81] = Se) : Se = e[81], Se;
|
|
3289
3289
|
};
|
|
3290
|
-
function
|
|
3290
|
+
function wa(e) {
|
|
3291
3291
|
return Math.max(e - 1, 0);
|
|
3292
3292
|
}
|
|
3293
3293
|
//#endregion
|
|
3294
3294
|
//#region ../../libraries/react-collection/dist/lib/variants/StepFormVariant2/StepFormVariant2.cssm.js
|
|
3295
|
-
var
|
|
3296
|
-
let e = E(99), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } =
|
|
3297
|
-
e[0] === r ? c = e[1] : (c = () =>
|
|
3298
|
-
let [l, u] =
|
|
3295
|
+
var Ta = "zlgzzn0", Ea = "zlgzzn1", Da = "zlgzznb", Oa = "zlgzznc", ka = (e, t) => e?.sections ? e.sections.filter((n) => st(e, n.fields || [], t)) : [], Aa = () => {
|
|
3296
|
+
let e = E(99), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } = pi(), c;
|
|
3297
|
+
e[0] === r ? c = e[1] : (c = () => ka(r, {}), e[0] = r, e[1] = c);
|
|
3298
|
+
let [l, u] = V(c), [d, f] = V(0), [p, m] = V(0), h;
|
|
3299
3299
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
3300
3300
|
state: "entered",
|
|
3301
3301
|
direction: "next"
|
|
3302
3302
|
}, e[2] = h) : h = e[2];
|
|
3303
|
-
let [g, _] =
|
|
3303
|
+
let [g, _] = V(h), v;
|
|
3304
3304
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (v = [], e[3] = v) : v = e[3];
|
|
3305
|
-
let [y, b] =
|
|
3305
|
+
let [y, b] = V(v), x = g.state === "exiting" ? d : p, S = l[x], C = p === l.length - 1, w;
|
|
3306
3306
|
bb0: {
|
|
3307
3307
|
if (r) {
|
|
3308
3308
|
let t;
|
|
@@ -3319,7 +3319,7 @@ var wa = "zlgzzn0", Ta = "zlgzzn1", Ea = "zlgzznb", Da = "zlgzznc", Oa = (e, t)
|
|
|
3319
3319
|
w = null;
|
|
3320
3320
|
}
|
|
3321
3321
|
let T = w, D;
|
|
3322
|
-
e[9] === r ? D = e[10] : (D = (e) => u(
|
|
3322
|
+
e[9] === r ? D = e[10] : (D = (e) => u(ka(r, e)), e[9] = r, e[10] = D);
|
|
3323
3323
|
let O;
|
|
3324
3324
|
e[11] === Symbol.for("react.memo_cache_sentinel") ? (O = () => {
|
|
3325
3325
|
b([]), m(0), _({
|
|
@@ -3346,15 +3346,15 @@ var wa = "zlgzzn0", Ta = "zlgzzn1", Ea = "zlgzznb", Da = "zlgzznc", Oa = (e, t)
|
|
|
3346
3346
|
onSubmitSuccess: O,
|
|
3347
3347
|
onSubmitError: k
|
|
3348
3348
|
}, e[15] = r, e[16] = T, e[17] = D, e[18] = k, e[19] = A) : A = e[19];
|
|
3349
|
-
let { methods: j, submitToRemote: M, appendFormValues: N, handleContentId: P, isError: F, allFormValues: I, contentId:
|
|
3350
|
-
e[20] === Y ?
|
|
3351
|
-
let ne =
|
|
3352
|
-
e[22] !== I || e[23] !== g.state || e[24] !== N || e[25] !== S?.fields || e[26] !== p || e[27] !== r || e[28] !== M ? (
|
|
3349
|
+
let { methods: j, submitToRemote: M, appendFormValues: N, handleContentId: P, isError: F, allFormValues: I, contentId: L, publishedId: z, isLoading: B, showSuccessOverlay: H, dismissSuccessOverlay: G } = yi(A), { handleSubmit: K, setFocus: q, setError: J, watch: Y, formState: X } = j, { isSubmitting: ee } = X, te;
|
|
3350
|
+
e[20] === Y ? te = e[21] : (te = Y("__captcha"), e[20] = Y, e[21] = te);
|
|
3351
|
+
let ne = te, ie;
|
|
3352
|
+
e[22] !== I || e[23] !== g.state || e[24] !== N || e[25] !== S?.fields || e[26] !== p || e[27] !== r || e[28] !== M ? (ie = async (e) => {
|
|
3353
3353
|
b((e) => {
|
|
3354
|
-
let t = S?.fields?.map(
|
|
3354
|
+
let t = S?.fields?.map(ja) || [];
|
|
3355
3355
|
return e.filter((e) => !t.includes(e.param));
|
|
3356
3356
|
});
|
|
3357
|
-
let t =
|
|
3357
|
+
let t = ka(r, {
|
|
3358
3358
|
...I || {},
|
|
3359
3359
|
...e
|
|
3360
3360
|
});
|
|
@@ -3362,18 +3362,18 @@ var wa = "zlgzzn0", Ta = "zlgzzn1", Ea = "zlgzznb", Da = "zlgzznc", Oa = (e, t)
|
|
|
3362
3362
|
state: "exiting",
|
|
3363
3363
|
direction: "next"
|
|
3364
3364
|
})));
|
|
3365
|
-
}, e[22] = I, e[23] = g.state, e[24] = N, e[25] = S?.fields, e[26] = p, e[27] = r, e[28] = M, e[29] =
|
|
3366
|
-
let
|
|
3367
|
-
e[30] !== K || e[31] !==
|
|
3368
|
-
let
|
|
3369
|
-
e[33] !== g.state || e[34] !== p ? (
|
|
3370
|
-
g.state === "entered" && (p <= 0 || (m(
|
|
3365
|
+
}, e[22] = I, e[23] = g.state, e[24] = N, e[25] = S?.fields, e[26] = p, e[27] = r, e[28] = M, e[29] = ie) : ie = e[29];
|
|
3366
|
+
let Q;
|
|
3367
|
+
e[30] !== K || e[31] !== ie ? (Q = K(ie), e[30] = K, e[31] = ie, e[32] = Q) : Q = e[32];
|
|
3368
|
+
let ae = Q, oe;
|
|
3369
|
+
e[33] !== g.state || e[34] !== p ? (oe = () => {
|
|
3370
|
+
g.state === "entered" && (p <= 0 || (m(Ma), _({
|
|
3371
3371
|
state: "exiting",
|
|
3372
3372
|
direction: "prev"
|
|
3373
3373
|
})));
|
|
3374
|
-
}, e[33] = g.state, e[34] = p, e[35] =
|
|
3375
|
-
let
|
|
3376
|
-
e[36] !== g.direction || e[37] !== g.state || e[38] !== S || e[39] !== p || e[40] !== q ? (
|
|
3374
|
+
}, e[33] = g.state, e[34] = p, e[35] = oe) : oe = e[35];
|
|
3375
|
+
let se = oe, ce;
|
|
3376
|
+
e[36] !== g.direction || e[37] !== g.state || e[38] !== S || e[39] !== p || e[40] !== q ? (ce = () => {
|
|
3377
3377
|
g.state === "exiting" ? (f(p), _({
|
|
3378
3378
|
state: "entering",
|
|
3379
3379
|
direction: g.direction
|
|
@@ -3381,135 +3381,135 @@ var wa = "zlgzzn0", Ta = "zlgzzn1", Ea = "zlgzznb", Da = "zlgzznc", Oa = (e, t)
|
|
|
3381
3381
|
state: "entered",
|
|
3382
3382
|
direction: g.direction
|
|
3383
3383
|
}), S?.fields?.[0]?.key && q(S.fields[0].key));
|
|
3384
|
-
}, e[36] = g.direction, e[37] = g.state, e[38] = S, e[39] = p, e[40] = q, e[41] =
|
|
3385
|
-
let le =
|
|
3386
|
-
e[42] !== g.state || e[43] !== S || e[44] !== y || e[45] !== J ? (
|
|
3384
|
+
}, e[36] = g.direction, e[37] = g.state, e[38] = S, e[39] = p, e[40] = q, e[41] = ce) : ce = e[41];
|
|
3385
|
+
let le = ce, de;
|
|
3386
|
+
e[42] !== g.state || e[43] !== S || e[44] !== y || e[45] !== J ? (de = () => {
|
|
3387
3387
|
y?.length > 0 && S?.fields && g?.state === "entered" && y.forEach((e) => {
|
|
3388
3388
|
S.fields?.some((t) => t.key === e.param) && J(e?.param, {
|
|
3389
3389
|
type: "server_error",
|
|
3390
3390
|
message: e?.message
|
|
3391
3391
|
});
|
|
3392
3392
|
});
|
|
3393
|
-
}, e[42] = g.state, e[43] = S, e[44] = y, e[45] = J, e[46] =
|
|
3394
|
-
let
|
|
3395
|
-
if (e[47] !== g || e[48] !== S || e[49] !== y || e[50] !== J ? (
|
|
3393
|
+
}, e[42] = g.state, e[43] = S, e[44] = y, e[45] = J, e[46] = de) : de = e[46];
|
|
3394
|
+
let fe;
|
|
3395
|
+
if (e[47] !== g || e[48] !== S || e[49] !== y || e[50] !== J ? (fe = [
|
|
3396
3396
|
y,
|
|
3397
3397
|
J,
|
|
3398
3398
|
S,
|
|
3399
3399
|
g
|
|
3400
|
-
], e[47] = g, e[48] = S, e[49] = y, e[50] = J, e[51] =
|
|
3401
|
-
if (
|
|
3400
|
+
], e[47] = g, e[48] = S, e[49] = y, e[50] = J, e[51] = fe) : fe = e[51], R(de, fe), !r || l.length === 0) return null;
|
|
3401
|
+
if (H) {
|
|
3402
3402
|
let t;
|
|
3403
|
-
return e[52] === G ? t = e[53] : (t = /* @__PURE__ */
|
|
3403
|
+
return e[52] === G ? t = e[53] : (t = /* @__PURE__ */ U(ia, { onDismiss: G }), e[52] = G, e[53] = t), t;
|
|
3404
3404
|
}
|
|
3405
|
-
let
|
|
3406
|
-
e[54] !== I || e[55] !== P || e[56] !== F || e[57] !==
|
|
3405
|
+
let pe = ee || B || ne === "verifying" && C, me = L || "", he = z || "", ge;
|
|
3406
|
+
e[54] !== I || e[55] !== P || e[56] !== F || e[57] !== me || e[58] !== he ? (ge = /* @__PURE__ */ U(aa, {
|
|
3407
3407
|
getContentId: P,
|
|
3408
3408
|
isError: F,
|
|
3409
|
-
contentId:
|
|
3410
|
-
publishedId:
|
|
3409
|
+
contentId: me,
|
|
3410
|
+
publishedId: he,
|
|
3411
3411
|
allFormValues: I
|
|
3412
|
-
}), e[54] = I, e[55] = P, e[56] = F, e[57] =
|
|
3413
|
-
let
|
|
3414
|
-
e[60] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3415
|
-
let
|
|
3416
|
-
e[61] ===
|
|
3417
|
-
className:
|
|
3418
|
-
children:
|
|
3419
|
-
}), e[61] =
|
|
3420
|
-
let
|
|
3421
|
-
e[63] !== p || e[64] !==
|
|
3412
|
+
}), e[54] = I, e[55] = P, e[56] = F, e[57] = me, e[58] = he, e[59] = ge) : ge = e[59];
|
|
3413
|
+
let _e;
|
|
3414
|
+
e[60] === Symbol.for("react.memo_cache_sentinel") ? (_e = /* @__PURE__ */ U(Ki, { className: Oa }), e[60] = _e) : _e = e[60];
|
|
3415
|
+
let ve = S?.label, ye;
|
|
3416
|
+
e[61] === ve ? ye = e[62] : (ye = /* @__PURE__ */ U(Ji, {
|
|
3417
|
+
className: Da,
|
|
3418
|
+
children: ve
|
|
3419
|
+
}), e[61] = ve, e[62] = ye);
|
|
3420
|
+
let be = l?.length || 1, xe = Array.isArray(y) && y?.length > 0, Se;
|
|
3421
|
+
e[63] !== p || e[64] !== be || e[65] !== xe ? (Se = /* @__PURE__ */ U(_a, {
|
|
3422
3422
|
currentStepIndex: p,
|
|
3423
|
-
totalSteps:
|
|
3424
|
-
hasLevoErrors:
|
|
3425
|
-
}), e[63] = p, e[64] =
|
|
3426
|
-
let
|
|
3427
|
-
e[67] !==
|
|
3428
|
-
className:
|
|
3423
|
+
totalSteps: be,
|
|
3424
|
+
hasLevoErrors: xe
|
|
3425
|
+
}), e[63] = p, e[64] = be, e[65] = xe, e[66] = Se) : Se = e[66];
|
|
3426
|
+
let Ce;
|
|
3427
|
+
e[67] !== ye || e[68] !== Se ? (Ce = /* @__PURE__ */ W("div", {
|
|
3428
|
+
className: Ta,
|
|
3429
3429
|
children: [
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3430
|
+
_e,
|
|
3431
|
+
ye,
|
|
3432
|
+
Se
|
|
3433
3433
|
]
|
|
3434
|
-
}), e[67] =
|
|
3435
|
-
let Ce;
|
|
3436
|
-
e[70] === o ? Ce = e[71] : (Ce = Z(Ta, o), e[70] = o, e[71] = Ce);
|
|
3434
|
+
}), e[67] = ye, e[68] = Se, e[69] = Ce) : Ce = e[69];
|
|
3437
3435
|
let we;
|
|
3438
|
-
e[
|
|
3436
|
+
e[70] === o ? we = e[71] : (we = Z(Ea, o), e[70] = o, e[71] = we);
|
|
3437
|
+
let Te;
|
|
3438
|
+
e[72] !== g.direction || e[73] !== g.state || e[74] !== ne || e[75] !== S || e[76] !== n || e[77] !== x || e[78] !== s || e[79] !== le || e[80] !== se || e[81] !== pe || e[82] !== C || e[83] !== p || e[84] !== ae || e[85] !== r || e[86] !== a?.show || e[87] !== a?.styles || e[88] !== a?.text || e[89] !== i ? (Te = S && /* @__PURE__ */ U("div", {
|
|
3439
3439
|
className: "zlgzzn6",
|
|
3440
3440
|
"data-state": g.state,
|
|
3441
3441
|
"data-direction": g.direction,
|
|
3442
3442
|
onAnimationEnd: le,
|
|
3443
|
-
children: /* @__PURE__ */
|
|
3444
|
-
onSubmit:
|
|
3443
|
+
children: /* @__PURE__ */ W("form", {
|
|
3444
|
+
onSubmit: ae,
|
|
3445
3445
|
className: "zlgzzn7",
|
|
3446
3446
|
children: [
|
|
3447
|
-
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */
|
|
3447
|
+
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */ U(Jr, {
|
|
3448
3448
|
field: e,
|
|
3449
3449
|
schema: r,
|
|
3450
3450
|
widgets: i,
|
|
3451
3451
|
settings: { enableVerification: s }
|
|
3452
3452
|
}, e.key)),
|
|
3453
|
-
!n && C && /* @__PURE__ */
|
|
3454
|
-
/* @__PURE__ */
|
|
3453
|
+
!n && C && /* @__PURE__ */ U(Li, {}),
|
|
3454
|
+
/* @__PURE__ */ W("div", {
|
|
3455
3455
|
className: "zlgzzn8",
|
|
3456
|
-
children: [/* @__PURE__ */
|
|
3456
|
+
children: [/* @__PURE__ */ U("div", { className: "zlgzzn9" }), /* @__PURE__ */ W("div", {
|
|
3457
3457
|
className: "zlgzzna",
|
|
3458
|
-
children: [/* @__PURE__ */
|
|
3458
|
+
children: [/* @__PURE__ */ W(t, {
|
|
3459
3459
|
type: "button",
|
|
3460
|
-
onClick:
|
|
3460
|
+
onClick: se,
|
|
3461
3461
|
size: "lg",
|
|
3462
|
-
disabled: p === 0 ||
|
|
3462
|
+
disabled: p === 0 || pe || g.state !== "entered",
|
|
3463
3463
|
variant: "ghost",
|
|
3464
|
-
children: [/* @__PURE__ */
|
|
3464
|
+
children: [/* @__PURE__ */ U(ue, {
|
|
3465
3465
|
size: 18,
|
|
3466
3466
|
className: "mr-2"
|
|
3467
3467
|
}), "Prev"]
|
|
3468
|
-
}), (!C || a?.show !== !1) && /* @__PURE__ */
|
|
3468
|
+
}), (!C || a?.show !== !1) && /* @__PURE__ */ U(t, {
|
|
3469
3469
|
type: "submit",
|
|
3470
3470
|
size: "lg",
|
|
3471
3471
|
className: a?.styles,
|
|
3472
|
-
disabled:
|
|
3473
|
-
children:
|
|
3472
|
+
disabled: pe || g.state !== "entered",
|
|
3473
|
+
children: pe ? ne === "verifying" ? "Verifying..." : "Saving..." : C ? a?.text || "Save" : "Next"
|
|
3474
3474
|
})]
|
|
3475
3475
|
})]
|
|
3476
3476
|
})
|
|
3477
3477
|
]
|
|
3478
3478
|
})
|
|
3479
|
-
}, S.id || x), e[72] = g.direction, e[73] = g.state, e[74] = ne, e[75] = S, e[76] = n, e[77] = x, e[78] = s, e[79] = le, e[80] =
|
|
3480
|
-
let Te;
|
|
3481
|
-
e[91] !== Ce || e[92] !== we ? (Te = /* @__PURE__ */ H("div", {
|
|
3482
|
-
className: Ce,
|
|
3483
|
-
children: we
|
|
3484
|
-
}), e[91] = Ce, e[92] = we, e[93] = Te) : Te = e[93];
|
|
3479
|
+
}, S.id || x), e[72] = g.direction, e[73] = g.state, e[74] = ne, e[75] = S, e[76] = n, e[77] = x, e[78] = s, e[79] = le, e[80] = se, e[81] = pe, e[82] = C, e[83] = p, e[84] = ae, e[85] = r, e[86] = a?.show, e[87] = a?.styles, e[88] = a?.text, e[89] = i, e[90] = Te) : Te = e[90];
|
|
3485
3480
|
let Ee;
|
|
3486
|
-
|
|
3481
|
+
e[91] !== we || e[92] !== Te ? (Ee = /* @__PURE__ */ U("div", {
|
|
3482
|
+
className: we,
|
|
3483
|
+
children: Te
|
|
3484
|
+
}), e[91] = we, e[92] = Te, e[93] = Ee) : Ee = e[93];
|
|
3485
|
+
let De;
|
|
3486
|
+
return e[94] !== j || e[95] !== ge || e[96] !== Ce || e[97] !== Ee ? (De = /* @__PURE__ */ W(re, {
|
|
3487
3487
|
...j,
|
|
3488
3488
|
children: [
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3489
|
+
ge,
|
|
3490
|
+
Ce,
|
|
3491
|
+
Ee
|
|
3492
3492
|
]
|
|
3493
|
-
}), e[94] = j, e[95] =
|
|
3493
|
+
}), e[94] = j, e[95] = ge, e[96] = Ce, e[97] = Ee, e[98] = De) : De = e[98], De;
|
|
3494
3494
|
};
|
|
3495
|
-
function
|
|
3495
|
+
function ja(e) {
|
|
3496
3496
|
return e.key;
|
|
3497
3497
|
}
|
|
3498
|
-
function
|
|
3498
|
+
function Ma(e) {
|
|
3499
3499
|
return Math.max(e - 1, 0);
|
|
3500
3500
|
}
|
|
3501
3501
|
//#endregion
|
|
3502
3502
|
//#region ../../libraries/react-collection/dist/lib/variants/StepsFormVariant/StepsFormVariant.cssm.js
|
|
3503
|
-
var
|
|
3504
|
-
let e = E(15), { schema: t, containerStyles: n } =
|
|
3505
|
-
e[0] === t ? r = e[1] : (r = () =>
|
|
3506
|
-
let [i, a] =
|
|
3503
|
+
var Na = "_1f3ynb50", Pa = "_1f3ynb54", Fa = "_1f3ynb55", Ia = (e, t) => e?.sections ? e.sections.filter((n) => st(e, n.fields || [], t)) : [], La = () => {
|
|
3504
|
+
let e = E(15), { schema: t, containerStyles: n } = pi(), r;
|
|
3505
|
+
e[0] === t ? r = e[1] : (r = () => Ia(t, {}), e[0] = t, e[1] = r);
|
|
3506
|
+
let [i, a] = V(r), [o, s] = V(0), c;
|
|
3507
3507
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
|
|
3508
|
-
s(
|
|
3508
|
+
s(za);
|
|
3509
3509
|
}, e[2] = c) : c = e[2];
|
|
3510
3510
|
let l = c, u;
|
|
3511
3511
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (u = () => {
|
|
3512
|
-
s(
|
|
3512
|
+
s(Ba);
|
|
3513
3513
|
}, e[3] = u) : u = e[3];
|
|
3514
3514
|
let d = u, f;
|
|
3515
3515
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = (e) => {
|
|
@@ -3517,14 +3517,14 @@ var Ma = "_1f3ynb50", Na = "_1f3ynb54", Pa = "_1f3ynb55", Fa = (e, t) => e?.sect
|
|
|
3517
3517
|
}, e[4] = f) : f = e[4];
|
|
3518
3518
|
let p = f, m;
|
|
3519
3519
|
e[5] === t ? m = e[6] : (m = (e) => {
|
|
3520
|
-
a(
|
|
3520
|
+
a(Ia(t, e)), d();
|
|
3521
3521
|
}, e[5] = t, e[6] = m);
|
|
3522
3522
|
let h;
|
|
3523
3523
|
e[7] === t ? h = e[8] : (h = (e) => {
|
|
3524
|
-
a(
|
|
3524
|
+
a(Ia(t, e));
|
|
3525
3525
|
}, e[7] = t, e[8] = h);
|
|
3526
3526
|
let g;
|
|
3527
|
-
return e[9] !== n || e[10] !== o || e[11] !== m || e[12] !== h || e[13] !== i ? (g = /* @__PURE__ */
|
|
3527
|
+
return e[9] !== n || e[10] !== o || e[11] !== m || e[12] !== h || e[13] !== i ? (g = /* @__PURE__ */ U(Ra, {
|
|
3528
3528
|
currentSectionIndex: o,
|
|
3529
3529
|
visibleSections: i,
|
|
3530
3530
|
onAdvanceWithValues: m,
|
|
@@ -3533,10 +3533,10 @@ var Ma = "_1f3ynb50", Na = "_1f3ynb54", Pa = "_1f3ynb55", Fa = (e, t) => e?.sect
|
|
|
3533
3533
|
onInit: h,
|
|
3534
3534
|
containerStyles: n
|
|
3535
3535
|
}), e[9] = n, e[10] = o, e[11] = m, e[12] = h, e[13] = i, e[14] = g) : g = e[14], g;
|
|
3536
|
-
},
|
|
3537
|
-
let n = E(82), { containerStyles: r, currentSectionIndex: i, visibleSections: a, onAdvanceWithValues: o, handlePrev: s, goToIndex: c, onInit: l } = e, { schema: u, disableCaptcha: d, isDisabled: f, submitButtonConfig: p, widgets: m, enableVerification: h } =
|
|
3536
|
+
}, Ra = (e) => {
|
|
3537
|
+
let n = E(82), { containerStyles: r, currentSectionIndex: i, visibleSections: a, onAdvanceWithValues: o, handlePrev: s, goToIndex: c, onInit: l } = e, { schema: u, disableCaptcha: d, isDisabled: f, submitButtonConfig: p, widgets: m, enableVerification: h } = pi(), g;
|
|
3538
3538
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (g = [], n[0] = g) : g = n[0];
|
|
3539
|
-
let [_, v] =
|
|
3539
|
+
let [_, v] = V(g), y = a?.[i], b;
|
|
3540
3540
|
bb0: {
|
|
3541
3541
|
if (u) {
|
|
3542
3542
|
let e;
|
|
@@ -3572,63 +3572,63 @@ var Ma = "_1f3ynb50", Na = "_1f3ynb54", Pa = "_1f3ynb55", Fa = (e, t) => e?.sect
|
|
|
3572
3572
|
onSubmitSuccess: C,
|
|
3573
3573
|
onSubmitError: w
|
|
3574
3574
|
}, n[11] = l, n[12] = u, n[13] = x, n[14] = C, n[15] = w, n[16] = T) : T = n[16];
|
|
3575
|
-
let { methods: D, submitToRemote: O, appendFormValues: k, isLoading: A, handleContentId: j, isError: M, contentId: N, publishedId: P, allFormValues: F, showSuccessOverlay: I, dismissSuccessOverlay:
|
|
3576
|
-
n[17] ===
|
|
3575
|
+
let { methods: D, submitToRemote: O, appendFormValues: k, isLoading: A, handleContentId: j, isError: M, contentId: N, publishedId: P, allFormValues: F, showSuccessOverlay: I, dismissSuccessOverlay: L } = yi(T), { handleSubmit: z, setError: B, watch: H, formState: G } = D, { isSubmitting: K } = G, q;
|
|
3576
|
+
n[17] === H ? q = n[18] : (q = H("__captcha"), n[17] = H, n[18] = q);
|
|
3577
3577
|
let J = q, Y;
|
|
3578
3578
|
n[19] !== F || n[20] !== k || n[21] !== y?.fields || n[22] !== i || n[23] !== o || n[24] !== u || n[25] !== O ? (Y = async (e) => {
|
|
3579
3579
|
v((e) => {
|
|
3580
|
-
let t = y?.fields?.map(
|
|
3580
|
+
let t = y?.fields?.map(Va) || [];
|
|
3581
3581
|
return e.filter((e) => !t.includes(e.param));
|
|
3582
3582
|
});
|
|
3583
3583
|
let t = {
|
|
3584
3584
|
...F || {},
|
|
3585
3585
|
...e
|
|
3586
3586
|
};
|
|
3587
|
-
i >=
|
|
3587
|
+
i >= Ia(u, t).length - 1 ? await O(e) : (k(e), o(t));
|
|
3588
3588
|
}, n[19] = F, n[20] = k, n[21] = y?.fields, n[22] = i, n[23] = o, n[24] = u, n[25] = O, n[26] = Y) : Y = n[26];
|
|
3589
3589
|
let X;
|
|
3590
3590
|
n[27] !== z || n[28] !== Y ? (X = z(Y), n[27] = z, n[28] = Y, n[29] = X) : X = n[29];
|
|
3591
|
-
let ee = X,
|
|
3592
|
-
if (n[30] !== y || n[31] !== _ || n[32] !==
|
|
3591
|
+
let ee = X, te, ne;
|
|
3592
|
+
if (n[30] !== y || n[31] !== _ || n[32] !== B ? (ne = () => {
|
|
3593
3593
|
_?.length > 0 && y?.fields && _.forEach((e) => {
|
|
3594
|
-
y.fields?.some((t) => t.key === e.param) &&
|
|
3594
|
+
y.fields?.some((t) => t.key === e.param) && B(e?.param, {
|
|
3595
3595
|
type: "server_error",
|
|
3596
3596
|
message: e?.message
|
|
3597
3597
|
});
|
|
3598
3598
|
});
|
|
3599
|
-
},
|
|
3599
|
+
}, te = [
|
|
3600
3600
|
_,
|
|
3601
|
-
|
|
3601
|
+
B,
|
|
3602
3602
|
y
|
|
3603
|
-
], n[30] = y, n[31] = _, n[32] =
|
|
3603
|
+
], n[30] = y, n[31] = _, n[32] = B, n[33] = te, n[34] = ne) : (te = n[33], ne = n[34]), R(ne, te), I) {
|
|
3604
3604
|
let e;
|
|
3605
|
-
return n[35] ===
|
|
3605
|
+
return n[35] === L ? e = n[36] : (e = /* @__PURE__ */ U(ia, { onDismiss: L }), n[35] = L, n[36] = e), e;
|
|
3606
3606
|
}
|
|
3607
|
-
let
|
|
3608
|
-
n[37] !== F || n[38] !== j || n[39] !== M || n[40] !==
|
|
3607
|
+
let ie = K || J === "verifying" && S, Q = N || "", ae = P || "", oe;
|
|
3608
|
+
n[37] !== F || n[38] !== j || n[39] !== M || n[40] !== Q || n[41] !== ae ? (oe = /* @__PURE__ */ U(aa, {
|
|
3609
3609
|
getContentId: j,
|
|
3610
3610
|
isError: M,
|
|
3611
|
-
contentId:
|
|
3612
|
-
publishedId:
|
|
3611
|
+
contentId: Q,
|
|
3612
|
+
publishedId: ae,
|
|
3613
3613
|
allFormValues: F
|
|
3614
|
-
}), n[37] = F, n[38] = j, n[39] = M, n[40] =
|
|
3615
|
-
let
|
|
3616
|
-
n[43] !== r || n[44] !==
|
|
3617
|
-
let
|
|
3618
|
-
n[46] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3619
|
-
let
|
|
3620
|
-
n[47] ===
|
|
3621
|
-
let
|
|
3622
|
-
n[49] !== y?.fields || n[50] !== h || n[51] !== u || n[52] !== m ? (
|
|
3614
|
+
}), n[37] = F, n[38] = j, n[39] = M, n[40] = Q, n[41] = ae, n[42] = oe) : oe = n[42];
|
|
3615
|
+
let se = A && "_1f3ynb51", ce;
|
|
3616
|
+
n[43] !== r || n[44] !== se ? (ce = Z(Na, r, se), n[43] = r, n[44] = se, n[45] = ce) : ce = n[45];
|
|
3617
|
+
let le;
|
|
3618
|
+
n[46] === Symbol.for("react.memo_cache_sentinel") ? (le = /* @__PURE__ */ U(Ki, {}), n[46] = le) : le = n[46];
|
|
3619
|
+
let ue = y?.label || "Details", de;
|
|
3620
|
+
n[47] === ue ? de = n[48] : (de = /* @__PURE__ */ U(Ji, { children: /* @__PURE__ */ U("span", { children: ue }) }), n[47] = ue, n[48] = de);
|
|
3621
|
+
let fe;
|
|
3622
|
+
n[49] !== y?.fields || n[50] !== h || n[51] !== u || n[52] !== m ? (fe = y?.fields?.map((e) => e && !e.hidden ? /* @__PURE__ */ U(Jr, {
|
|
3623
3623
|
field: e,
|
|
3624
3624
|
widgets: m,
|
|
3625
3625
|
schema: u,
|
|
3626
3626
|
settings: { enableVerification: h }
|
|
3627
|
-
}, e?.key) : null), n[49] = y?.fields, n[50] = h, n[51] = u, n[52] = m, n[53] =
|
|
3628
|
-
let fe;
|
|
3629
|
-
n[54] !== d || n[55] !== S ? (fe = !d && S && /* @__PURE__ */ H(Ii, {}), n[54] = d, n[55] = S, n[56] = fe) : fe = n[56];
|
|
3627
|
+
}, e?.key) : null), n[49] = y?.fields, n[50] = h, n[51] = u, n[52] = m, n[53] = fe) : fe = n[53];
|
|
3630
3628
|
let pe;
|
|
3631
|
-
n[
|
|
3629
|
+
n[54] !== d || n[55] !== S ? (pe = !d && S && /* @__PURE__ */ U(Li, {}), n[54] = d, n[55] = S, n[56] = pe) : pe = n[56];
|
|
3630
|
+
let me;
|
|
3631
|
+
n[57] !== J || n[58] !== i || n[59] !== s || n[60] !== S ? (me = i === 0 ? /* @__PURE__ */ U("div", {}) : /* @__PURE__ */ U(t, {
|
|
3632
3632
|
type: "button",
|
|
3633
3633
|
size: "sm",
|
|
3634
3634
|
variant: "secondary",
|
|
@@ -3637,119 +3637,119 @@ var Ma = "_1f3ynb50", Na = "_1f3ynb54", Pa = "_1f3ynb55", Fa = (e, t) => e?.sect
|
|
|
3637
3637
|
s();
|
|
3638
3638
|
},
|
|
3639
3639
|
children: "Prev"
|
|
3640
|
-
}), n[57] = J, n[58] = i, n[59] = s, n[60] = S, n[61] =
|
|
3641
|
-
let
|
|
3642
|
-
n[62] !==
|
|
3640
|
+
}), n[57] = J, n[58] = i, n[59] = s, n[60] = S, n[61] = me) : me = n[61];
|
|
3641
|
+
let he = f || ie, ge = p?.styles, _e = ie ? J === "verifying" ? "Verifying..." : "Saving..." : S ? p?.text || "Save" : "Next", ve;
|
|
3642
|
+
n[62] !== he || n[63] !== ge || n[64] !== _e ? (ve = /* @__PURE__ */ U(t, {
|
|
3643
3643
|
type: "submit",
|
|
3644
3644
|
size: "sm",
|
|
3645
|
-
disabled:
|
|
3646
|
-
className:
|
|
3647
|
-
children:
|
|
3648
|
-
}), n[62] =
|
|
3649
|
-
let ve;
|
|
3650
|
-
n[66] !== pe || n[67] !== _e ? (ve = /* @__PURE__ */ U("div", {
|
|
3651
|
-
className: Na,
|
|
3652
|
-
children: [pe, _e]
|
|
3653
|
-
}), n[66] = pe, n[67] = _e, n[68] = ve) : ve = n[68];
|
|
3645
|
+
disabled: he,
|
|
3646
|
+
className: ge,
|
|
3647
|
+
children: _e
|
|
3648
|
+
}), n[62] = he, n[63] = ge, n[64] = _e, n[65] = ve) : ve = n[65];
|
|
3654
3649
|
let ye;
|
|
3655
|
-
n[
|
|
3650
|
+
n[66] !== me || n[67] !== ve ? (ye = /* @__PURE__ */ W("div", {
|
|
3656
3651
|
className: Pa,
|
|
3652
|
+
children: [me, ve]
|
|
3653
|
+
}), n[66] = me, n[67] = ve, n[68] = ye) : ye = n[68];
|
|
3654
|
+
let be;
|
|
3655
|
+
n[69] !== fe || n[70] !== pe || n[71] !== ye ? (be = /* @__PURE__ */ W("div", {
|
|
3656
|
+
className: Fa,
|
|
3657
3657
|
children: [
|
|
3658
|
-
de,
|
|
3659
3658
|
fe,
|
|
3660
|
-
|
|
3659
|
+
pe,
|
|
3660
|
+
ye
|
|
3661
3661
|
]
|
|
3662
|
-
}), n[69] =
|
|
3663
|
-
let
|
|
3664
|
-
n[73] !== ee || n[74] !==
|
|
3665
|
-
className:
|
|
3662
|
+
}), n[69] = fe, n[70] = pe, n[71] = ye, n[72] = be) : be = n[72];
|
|
3663
|
+
let xe;
|
|
3664
|
+
n[73] !== ee || n[74] !== ce || n[75] !== de || n[76] !== be ? (xe = /* @__PURE__ */ W("form", {
|
|
3665
|
+
className: ce,
|
|
3666
3666
|
id: "collection-form",
|
|
3667
3667
|
onSubmit: ee,
|
|
3668
3668
|
children: [
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3669
|
+
le,
|
|
3670
|
+
de,
|
|
3671
|
+
be
|
|
3672
3672
|
]
|
|
3673
|
-
}), n[73] = ee, n[74] =
|
|
3674
|
-
let
|
|
3675
|
-
return n[78] !== D || n[79] !==
|
|
3673
|
+
}), n[73] = ee, n[74] = ce, n[75] = de, n[76] = be, n[77] = xe) : xe = n[77];
|
|
3674
|
+
let Se;
|
|
3675
|
+
return n[78] !== D || n[79] !== oe || n[80] !== xe ? (Se = /* @__PURE__ */ W(re, {
|
|
3676
3676
|
...D,
|
|
3677
|
-
children: [
|
|
3678
|
-
}), n[78] = D, n[79] =
|
|
3677
|
+
children: [oe, xe]
|
|
3678
|
+
}), n[78] = D, n[79] = oe, n[80] = xe, n[81] = Se) : Se = n[81], Se;
|
|
3679
3679
|
};
|
|
3680
|
-
function
|
|
3680
|
+
function za(e) {
|
|
3681
3681
|
return Math.max(e - 1, 0);
|
|
3682
3682
|
}
|
|
3683
|
-
function
|
|
3683
|
+
function Ba(e) {
|
|
3684
3684
|
return e + 1;
|
|
3685
3685
|
}
|
|
3686
|
-
function
|
|
3686
|
+
function Va(e) {
|
|
3687
3687
|
return e.key;
|
|
3688
3688
|
}
|
|
3689
3689
|
//#endregion
|
|
3690
3690
|
//#region ../../libraries/react-collection/dist/lib/FormBuilder/index.js
|
|
3691
|
-
var
|
|
3691
|
+
var Ha = (e) => {
|
|
3692
3692
|
let t = E(12), n, r, i;
|
|
3693
3693
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({formVariant: n, enableVerification: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
3694
3694
|
let a = i === void 0 ? !0 : i, o;
|
|
3695
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */
|
|
3695
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ U(Ti, {}), t[4] = o) : o = t[4];
|
|
3696
3696
|
let s;
|
|
3697
|
-
t[5] === n ? s = t[6] : (s = /* @__PURE__ */
|
|
3697
|
+
t[5] === n ? s = t[6] : (s = /* @__PURE__ */ U(N, {
|
|
3698
3698
|
fallback: o,
|
|
3699
|
-
children:
|
|
3699
|
+
children: U(n === "single-field" ? Ca : n === "steps" ? La : n === "steps-2" ? Aa : fa, {})
|
|
3700
3700
|
}), t[5] = n, t[6] = s);
|
|
3701
3701
|
let c;
|
|
3702
|
-
return t[7] !== a || t[8] !== n || t[9] !== r || t[10] !== s ? (c = /* @__PURE__ */
|
|
3702
|
+
return t[7] !== a || t[8] !== n || t[9] !== r || t[10] !== s ? (c = /* @__PURE__ */ U(fi, {
|
|
3703
3703
|
...r,
|
|
3704
3704
|
enableVerification: a,
|
|
3705
3705
|
variant: n,
|
|
3706
3706
|
children: s
|
|
3707
3707
|
}), t[7] = a, t[8] = n, t[9] = r, t[10] = s, t[11] = c) : c = t[11], c;
|
|
3708
|
-
},
|
|
3708
|
+
}, Ua = (e) => {
|
|
3709
3709
|
let t = E(17), n, r, i, a;
|
|
3710
3710
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({collection_id: n, hiddenFields: r, enableVerification: a, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
3711
|
-
let o = a === void 0 ? !0 : a, { collection: s } = A(), [c, l] =
|
|
3711
|
+
let o = a === void 0 ? !0 : a, { collection: s } = A(), [c, l] = V(!0), [u, d] = V(null), f;
|
|
3712
3712
|
t[5] !== s || t[6] !== n || t[7] !== r || t[8] !== i ? (f = () => {
|
|
3713
3713
|
n ? s?.getCollectionByIDExpanded(n, { headers: { "Levo-Workspace": i.workspace_id } }).then((e) => {
|
|
3714
3714
|
let t = e?.content?.data;
|
|
3715
3715
|
if (t) t.sections = t?.sections?.map((e) => (e.fields = e?.fields?.map((e) => (r?.includes(e?.key) && (e.hidden = !0), e)), e)), d(t);
|
|
3716
3716
|
else throw Error(`API response invalid: ${t}`);
|
|
3717
|
-
}).catch(
|
|
3717
|
+
}).catch(Wa).finally(() => {
|
|
3718
3718
|
l(!1);
|
|
3719
3719
|
}) : (console.error("[CollectionFormBuilder] Collection ID or Workspace ID is missing."), l(!1));
|
|
3720
3720
|
}, t[5] = s, t[6] = n, t[7] = r, t[8] = i, t[9] = f) : f = t[9];
|
|
3721
3721
|
let p;
|
|
3722
|
-
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p),
|
|
3722
|
+
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p), R(f, p);
|
|
3723
3723
|
let m;
|
|
3724
|
-
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */
|
|
3724
|
+
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */ U(Ti, {}) : u ? /* @__PURE__ */ U(Ha, {
|
|
3725
3725
|
schema: u,
|
|
3726
3726
|
enableVerification: o,
|
|
3727
3727
|
...i
|
|
3728
3728
|
}) : null, t[12] = o, t[13] = c, t[14] = i, t[15] = u, t[16] = m) : m = t[16], m;
|
|
3729
3729
|
};
|
|
3730
|
-
function
|
|
3730
|
+
function Wa(e) {
|
|
3731
3731
|
console.error("Error fetching schema", e);
|
|
3732
3732
|
}
|
|
3733
3733
|
//#endregion
|
|
3734
3734
|
//#region ../../libraries/react-collection/dist/lib/CollectionFormRenderer/index.js
|
|
3735
|
-
var
|
|
3736
|
-
let a =
|
|
3735
|
+
var Ga = ({ hiddenFields: e, fetchedSchema: t, isLoading: n, enableVerification: r = !0, ...i }) => {
|
|
3736
|
+
let a = z(() => {
|
|
3737
3737
|
let n = { ...t }, r = (t) => t?.map((t) => ((e?.includes(t.key) || e?.includes(t.id)) && (t.hidden = !0), t.fields = r(t.fields), t));
|
|
3738
3738
|
return n.sections = n?.sections?.map((e) => (e.fields = r(e?.fields), e)), n;
|
|
3739
3739
|
}, [t]);
|
|
3740
|
-
return n ? /* @__PURE__ */
|
|
3740
|
+
return n ? /* @__PURE__ */ U(Ti, {}) : a ? /* @__PURE__ */ U(Ha, {
|
|
3741
3741
|
schema: a,
|
|
3742
3742
|
enableVerification: r,
|
|
3743
3743
|
...i
|
|
3744
3744
|
}) : null;
|
|
3745
|
-
},
|
|
3746
|
-
CollectionForm: () =>
|
|
3747
|
-
CollectionFormBuilder: () =>
|
|
3748
|
-
CollectionFormRenderer: () =>
|
|
3749
|
-
FormBuilder: () =>
|
|
3750
|
-
LevoFormProvider: () =>
|
|
3751
|
-
useLevoForm: () =>
|
|
3752
|
-
useLevoFormContext: () =>
|
|
3745
|
+
}, Ka = /* @__PURE__ */ Pe({
|
|
3746
|
+
CollectionForm: () => li,
|
|
3747
|
+
CollectionFormBuilder: () => Ua,
|
|
3748
|
+
CollectionFormRenderer: () => Ga,
|
|
3749
|
+
FormBuilder: () => Ha,
|
|
3750
|
+
LevoFormProvider: () => fi,
|
|
3751
|
+
useLevoForm: () => yi,
|
|
3752
|
+
useLevoFormContext: () => pi
|
|
3753
3753
|
});
|
|
3754
3754
|
//#endregion
|
|
3755
|
-
export {
|
|
3755
|
+
export { yi as a, li as c, Ha as i, ht as l, Ga as n, fi as o, Ua as r, pi as s, Ka as t };
|