@levo-so/studio 0.1.100 → 0.1.102
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/Beams-DkcjMVZl.js +102 -0
- package/{BillingStep-Brc1Mzo3.js → BillingStep-BTRobf00.js} +1 -1
- package/{Button-XTKnNIl9.js → Button-DTrN8kki.js} +32 -18
- package/{Input-Btdc1Dee.js → CollectionField-7uXvhxYK.js} +57 -76
- package/CollectionInput-lHOvWWav.js +147 -0
- package/{DateTimeWidget-B5lBr0_R.js → DateTimeWidget-BHCP5osb.js} +9 -9
- package/Dots-BrEPvoj3.js +100 -0
- package/{EntryCard-CYdsSkIk.js → EntryCard-CqZlbw1Z.js} +6 -6
- package/Grid-B4XWU9eL.js +99 -0
- package/{LoginCard-5LaKaFCO.js → LoginCard-DWLnYJJU.js} +3 -3
- package/{LoginForm-Ck-xFaDg.js → LoginForm-CEUbBeE3.js} +23 -22
- package/{LoginModal-BdYM8INu.js → LoginModal-AWNLO49X.js} +3 -3
- package/{MessageCard-ChDBqLVG.js → MessageCard-C5ULcfuw.js} +2 -2
- package/{MessageFooter-AzAtJWMo.js → MessageFooter-CATwNJJU.js} +1 -1
- package/{ModalManager-SggxCIno.js → ModalManager-DQXhkmyC.js} +1 -1
- package/{PendingApprovalCard-z2sdLyCa.js → PendingApprovalCard-BowwZMBu.js} +3 -3
- package/{PhoneWidget-1ffYuESC.js → PhoneWidget-C6uZmrk8.js} +3 -3
- package/{Popover-BdKCElnb.js → Popover-Du4iigVw.js} +1 -1
- package/RichTextWidget-iYdVRBGB.js +112 -0
- package/Toolbar-BHi_B-nE.js +737 -0
- package/{Tooltip-BOq5vSOW.js → Tooltip-K_gFzjOa.js} +1 -1
- package/{VerifyButton-CdPQqtc2.js → VerifyButton-D21AOIX3.js} +92 -103
- package/authentication-fXmNYss1.js +36 -0
- package/{bookingCard-D3ZSjq-P.js → bookingCard--NlgtcJs.js} +3 -3
- package/collection.d.ts +83 -0
- package/collection.js +9 -8
- package/{dist-ir7pIkAm.js → dist-x5VFEnQl.js} +1167 -1097
- package/index.d.ts +43 -12
- package/index.js +1517 -1441
- package/inlineRteTheme-Cn_Vqgsm.js +23 -0
- package/{nodeAlignment-BZbdafVA.js → nodeAlignment-DoVbjk29.js} +39 -60
- package/package.json +2 -2
- package/studio.css +1 -1
- package/useLogin-D2VCOHYI.js +127 -0
- package/{utils-CsfPGq4R.js → utils-Bh9uGjo1.js} +1 -1
- package/{widgets-DD4OjK2Y.js → widgets-CG5Z_dk7.js} +49 -54
- package/Beams-B0O3uyYF.js +0 -118
- package/CollectionInput-cmJ0RXzG.js +0 -132
- package/Dots-DjezbpLp.js +0 -137
- package/Grid-C9aUfXM-.js +0 -145
- package/RichTextWidget-CjEoGecM.js +0 -1136
- /package/{Gradient-B1K9Yi04.js → Gradient-B4Er9hym.js} +0 -0
- /package/{StripePaymentModal-BHIBBvRj.js → StripePaymentModal-DC-ySB_o.js} +0 -0
- /package/{Waves-BkaAfGqA.js → Waves-kW-EBDdJ.js} +0 -0
- /package/{card-BQr9258p.js → card-BwNr7kQS.js} +0 -0
- /package/{dialog-Dw6n_36P.js → dialog-CCWrvmHd.js} +0 -0
|
@@ -1,57 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as m } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
2
|
+
import { a as e } from "./Toolbar-BHi_B-nE.js";
|
|
3
|
+
import { n as t, r as n, t as r } from "./getFieldValidations-DZnDgNI0.js";
|
|
4
|
+
import { _ as i, d as a, f as o, g as s, h as c, n as l, o as u, p as d, r as f, t as p, v as m } from "./widgets-CG5Z_dk7.js";
|
|
5
|
+
import { t as h } from "./theme.cssm-2YTdd8Yh.js";
|
|
6
|
+
import { f as g, p as _, t as v, u as y } from "./CollectionField-7uXvhxYK.js";
|
|
7
|
+
import { a as b, i as x, n as S, o as C, r as w, s as T, t as E } from "./VerifyButton-D21AOIX3.js";
|
|
8
|
+
import { n as D, r as O, t as k } from "./Tooltip-K_gFzjOa.js";
|
|
9
|
+
import { i as A, n as j, r as M, t as N } from "./CollectionInput-lHOvWWav.js";
|
|
10
|
+
import * as P from "react";
|
|
11
|
+
import F, { Suspense as I, createContext as L, lazy as R, useCallback as z, useContext as B, useEffect as V, useMemo as H, useRef as U, useState as W } from "react";
|
|
12
|
+
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
13
|
+
import { FieldInterfaces as J, LevoError as Y, MediaKindList as X, getLevoError as ee } from "@levo-so/core";
|
|
14
|
+
import { errorHandler as te, errorToast as ne, mediaMimetypeByKind as re, successToast as ie, useLevo as ae } from "@levo-so/react";
|
|
14
15
|
import { c as Z } from "react/compiler-runtime";
|
|
15
16
|
import Q from "clsx";
|
|
16
|
-
import { createRuntimeFn as
|
|
17
|
-
import { useDebouncedCallback as
|
|
18
|
-
import
|
|
19
|
-
import { FormProvider as
|
|
20
|
-
import { Tabs as
|
|
21
|
-
import { IconArrowLeft as
|
|
22
|
-
import { Checkbox as
|
|
23
|
-
import { NumericFormat as
|
|
24
|
-
import
|
|
25
|
-
import { Radio as
|
|
26
|
-
import { RadioGroup as
|
|
27
|
-
import { Switch as
|
|
28
|
-
import { useDropzone as
|
|
29
|
-
|
|
30
|
-
var Ie = Object.defineProperty, Le = (e, t) => {
|
|
31
|
-
let n = {};
|
|
32
|
-
for (var r in e) Ie(n, r, {
|
|
33
|
-
get: e[r],
|
|
34
|
-
enumerable: !0
|
|
35
|
-
});
|
|
36
|
-
return t || Ie(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
37
|
-
};
|
|
38
|
-
r(p.radius);
|
|
17
|
+
import { createRuntimeFn as oe } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
18
|
+
import { useDebouncedCallback as se } from "use-debounce";
|
|
19
|
+
import ce from "react-select";
|
|
20
|
+
import { FormProvider as le, get as ue, useController as $, useFieldArray as de, useForm as fe, useFormContext as pe, useWatch as me } from "react-hook-form";
|
|
21
|
+
import { Tabs as he } from "@base-ui/react/tabs";
|
|
22
|
+
import { IconArrowLeft as ge, IconCheck as _e, IconChevronLeft as ve, IconChevronRight as ye, IconChevronsLeft as be, IconChevronsRight as xe, IconFile as Se, IconHash as Ce, IconMail as we, IconPencil as Te, IconPlus as Ee, IconTrash as De, IconUpload as Oe, IconX as ke } from "@tabler/icons-react";
|
|
23
|
+
import { Checkbox as Ae } from "@base-ui/react/checkbox";
|
|
24
|
+
import { NumericFormat as je } from "react-number-format";
|
|
25
|
+
import Me from "react-select/async";
|
|
26
|
+
import { Radio as Ne } from "@base-ui/react/radio";
|
|
27
|
+
import { RadioGroup as Pe } from "@base-ui/react/radio-group";
|
|
28
|
+
import { Switch as Fe } from "@base-ui/react/switch";
|
|
29
|
+
import { useDropzone as Ie } from "react-dropzone";
|
|
30
|
+
i(m.radius);
|
|
39
31
|
//#endregion
|
|
40
32
|
//#region ../../libraries/levocn/dist/utils/deep-merge.js
|
|
41
|
-
function
|
|
33
|
+
function Le(e) {
|
|
42
34
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
43
35
|
}
|
|
44
|
-
function
|
|
45
|
-
if (!
|
|
36
|
+
function Re(e, t) {
|
|
37
|
+
if (!Le(e) || !Le(t)) return t;
|
|
46
38
|
let n = { ...e };
|
|
47
39
|
return Object.keys(t).forEach((r) => {
|
|
48
40
|
let i = r, a = e[i], o = t[i];
|
|
49
|
-
|
|
41
|
+
Le(a) && Le(o) ? n[i] = Re(a, o) : n[i] = o;
|
|
50
42
|
}), n;
|
|
51
43
|
}
|
|
52
44
|
//#endregion
|
|
53
45
|
//#region ../../libraries/levocn/dist/theme/utils/defineTheme.js
|
|
54
|
-
var
|
|
46
|
+
var ze = ((e) => (t) => t ? Re(e, t) : e)({
|
|
55
47
|
form: {
|
|
56
48
|
maxWidth: "100%",
|
|
57
49
|
gap: "1.5rem",
|
|
@@ -64,13 +56,8 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
64
56
|
height: "2.25rem",
|
|
65
57
|
borderRadius: "6px"
|
|
66
58
|
},
|
|
67
|
-
checkbox: { labelFontSize: "0.875rem" }
|
|
68
|
-
|
|
69
|
-
fontSize: "0.875rem",
|
|
70
|
-
padding: "0.5rem 1rem",
|
|
71
|
-
borderRadius: "6px"
|
|
72
|
-
}
|
|
73
|
-
}), Ve = "_1g8bxz40", He = "_1kzhxrs0", Ue = "_1kzhxrs1", We = "_1kzhxrs2", Ge = "_1kzhxrs3", Ke = "_1kzhxrs4", qe = "_1kzhxrs5", Je = "_1kzhxrs6", Ye = "_1kzhxrs7", Xe = "_1kzhxrs8", Ze = "_1kzhxrs9", Qe = "_1kzhxrsa", $e = "_1kzhxrsb", et = "ktjhuv0", tt = ae({
|
|
59
|
+
checkbox: { labelFontSize: "0.875rem" }
|
|
60
|
+
}), Be = "_1g8bxz40", Ve = "_1kzhxrs0", He = "_1kzhxrs1", Ue = "_1kzhxrs2", We = "_1kzhxrs3", Ge = "_1kzhxrs4", Ke = "_1kzhxrs5", qe = "_1kzhxrs6", Je = "_1kzhxrs7", Ye = "_1kzhxrs8", Xe = "_1kzhxrs9", Ze = "_1kzhxrsa", Qe = "_1kzhxrsb", $e = "ktjhuv0", et = oe({
|
|
74
61
|
defaultClassName: "ktjhuv1",
|
|
75
62
|
variantClassNames: { variant: {
|
|
76
63
|
default: "ktjhuv2",
|
|
@@ -78,105 +65,105 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
78
65
|
} },
|
|
79
66
|
defaultVariants: { variant: "default" },
|
|
80
67
|
compoundVariants: []
|
|
81
|
-
}),
|
|
68
|
+
}), tt = "ktjhuv4", nt = "ktjhuv5", rt = "ktjhuv6", it = (e) => {
|
|
82
69
|
let t = Z(10), n, r, i;
|
|
83
70
|
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);
|
|
84
71
|
let a = i === void 0 ? "horizontal" : i, o;
|
|
85
|
-
t[4] === n ? o = t[5] : (o = Q(
|
|
72
|
+
t[4] === n ? o = t[5] : (o = Q($e, n), t[4] = n, t[5] = o);
|
|
86
73
|
let s;
|
|
87
|
-
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */
|
|
74
|
+
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */ K(he.Root, {
|
|
88
75
|
"data-slot": "tabs",
|
|
89
76
|
"data-orientation": a,
|
|
90
77
|
className: o,
|
|
91
78
|
...r
|
|
92
79
|
}), t[6] = a, t[7] = r, t[8] = o, t[9] = s) : s = t[9], s;
|
|
93
|
-
},
|
|
80
|
+
}, at = (e) => {
|
|
94
81
|
let t = Z(11), n, r, i;
|
|
95
82
|
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);
|
|
96
83
|
let a = i === void 0 ? "default" : i, o;
|
|
97
|
-
t[4] !== n || t[5] !== a ? (o = Q(
|
|
84
|
+
t[4] !== n || t[5] !== a ? (o = Q(et({ variant: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
98
85
|
let s;
|
|
99
|
-
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */
|
|
86
|
+
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */ K(he.List, {
|
|
100
87
|
"data-slot": "tabs-list",
|
|
101
88
|
"data-variant": a,
|
|
102
89
|
className: o,
|
|
103
90
|
...r
|
|
104
91
|
}), t[7] = r, t[8] = o, t[9] = a, t[10] = s) : s = t[10], s;
|
|
105
|
-
},
|
|
92
|
+
}, ot = (e) => {
|
|
106
93
|
let t = Z(8), n, r;
|
|
107
94
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
108
95
|
let i;
|
|
109
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
96
|
+
t[3] === n ? i = t[4] : (i = Q(tt, nt, n), t[3] = n, t[4] = i);
|
|
110
97
|
let a;
|
|
111
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
98
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ K(he.Tab, {
|
|
112
99
|
"data-slot": "tabs-trigger",
|
|
113
100
|
className: i,
|
|
114
101
|
...r
|
|
115
102
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
116
|
-
},
|
|
103
|
+
}, st = (e) => {
|
|
117
104
|
let t = Z(8), n, r;
|
|
118
105
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
119
106
|
let i;
|
|
120
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
107
|
+
t[3] === n ? i = t[4] : (i = Q(rt, n), t[3] = n, t[4] = i);
|
|
121
108
|
let a;
|
|
122
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
109
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ K(he.Panel, {
|
|
123
110
|
"data-slot": "tabs-content",
|
|
124
111
|
className: i,
|
|
125
112
|
...r
|
|
126
113
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
127
|
-
},
|
|
128
|
-
let t = Z(36),
|
|
129
|
-
t[0] === e ? (
|
|
130
|
-
let { key: o, label: s, field_interface: c, fields:
|
|
131
|
-
t[4] ===
|
|
132
|
-
let
|
|
133
|
-
t[6] ===
|
|
114
|
+
}, ct = (e) => {
|
|
115
|
+
let t = Z(36), n, i, a;
|
|
116
|
+
t[0] === e ? (n = t[1], i = t[2], a = t[3]) : ({field: n, schema: a, ...i} = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a);
|
|
117
|
+
let { key: o, label: s, field_interface: c, fields: l } = n, d = o === void 0 ? "" : o, f = s === void 0 ? "" : s, p = c === void 0 ? "" : c, m;
|
|
118
|
+
t[4] === l ? m = t[5] : (m = l === void 0 ? [] : l, t[4] = l, t[5] = m);
|
|
119
|
+
let h = m, [_, v] = W("0"), { formState: b } = pe(), x;
|
|
120
|
+
t[6] === n ? x = t[7] : (x = r(n), t[6] = n, t[7] = x);
|
|
134
121
|
let S;
|
|
135
122
|
t[8] !== d || t[9] !== x ? (S = {
|
|
136
123
|
name: d,
|
|
137
124
|
rules: x
|
|
138
125
|
}, t[8] = d, t[9] = x, t[10] = S) : S = t[10];
|
|
139
|
-
let C =
|
|
126
|
+
let C = de(S), w, T;
|
|
140
127
|
t[11] === C ? (w = t[12], T = t[13]) : ({fields: T, ...w} = C, t[11] = C, t[12] = w, t[13] = T);
|
|
141
128
|
let E;
|
|
142
|
-
t[14] !== b.errors || t[15] !== d ? (E =
|
|
129
|
+
t[14] !== b.errors || t[15] !== d ? (E = ue(b.errors, d)?.root?.message, t[14] = b.errors, t[15] = d, t[16] = E) : E = t[16];
|
|
143
130
|
let D = E;
|
|
144
131
|
if (!p || !d) return null;
|
|
145
|
-
let O =
|
|
146
|
-
t[17] !== f || t[18] !== O ? (k = /* @__PURE__ */
|
|
132
|
+
let O = n?.required, k;
|
|
133
|
+
t[17] !== f || t[18] !== O ? (k = /* @__PURE__ */ K(g, {
|
|
147
134
|
label: f,
|
|
148
135
|
isRequired: O
|
|
149
136
|
}), t[17] = f, t[18] = O, t[19] = k) : k = t[19];
|
|
150
137
|
let A;
|
|
151
|
-
t[20] !== w || t[21] !==
|
|
152
|
-
value:
|
|
153
|
-
onValueChange:
|
|
154
|
-
className:
|
|
155
|
-
children: [/* @__PURE__ */
|
|
156
|
-
className:
|
|
157
|
-
children: [T.length ? /* @__PURE__ */
|
|
158
|
-
className:
|
|
159
|
-
children: T?.map((e, t) => /* @__PURE__ */
|
|
160
|
-
id: `${
|
|
138
|
+
t[20] !== w || t[21] !== n.id || t[22] !== n.key || t[23] !== T || t[24] !== h || t[25] !== d || t[26] !== i || t[27] !== a || t[28] !== _ ? (A = T && Array.isArray(T) ? /* @__PURE__ */ q(it, {
|
|
139
|
+
value: _,
|
|
140
|
+
onValueChange: v,
|
|
141
|
+
className: He,
|
|
142
|
+
children: [/* @__PURE__ */ q("div", {
|
|
143
|
+
className: Ue,
|
|
144
|
+
children: [T.length ? /* @__PURE__ */ K(at, {
|
|
145
|
+
className: We,
|
|
146
|
+
children: T?.map((e, t) => /* @__PURE__ */ K(ot, {
|
|
147
|
+
id: `${n?.key}-${t}`,
|
|
161
148
|
value: t.toString(),
|
|
162
|
-
className:
|
|
149
|
+
className: Ge,
|
|
163
150
|
children: t + 1
|
|
164
|
-
}, `array-widget-tab-${
|
|
165
|
-
}) : null, /* @__PURE__ */
|
|
151
|
+
}, `array-widget-tab-${n?.id}-${t}`))
|
|
152
|
+
}) : null, /* @__PURE__ */ q(y, {
|
|
166
153
|
variant: "ghost",
|
|
167
154
|
size: "xs",
|
|
168
|
-
className:
|
|
155
|
+
className: Ke,
|
|
169
156
|
onClick: () => {
|
|
170
|
-
w.append(
|
|
157
|
+
w.append(u(h)), v((T?.length ?? 0).toString());
|
|
171
158
|
},
|
|
172
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ K(Ee, { size: 14 }), "Add"]
|
|
173
160
|
})]
|
|
174
|
-
}), T?.map((e, t) => /* @__PURE__ */
|
|
175
|
-
className:
|
|
161
|
+
}), T?.map((e, t) => /* @__PURE__ */ q(st, {
|
|
162
|
+
className: qe,
|
|
176
163
|
value: t.toString(),
|
|
177
|
-
children: [/* @__PURE__ */
|
|
178
|
-
className:
|
|
179
|
-
children:
|
|
164
|
+
children: [/* @__PURE__ */ K("div", {
|
|
165
|
+
className: Je,
|
|
166
|
+
children: h.map((e) => /* @__PURE__ */ K(fr, {
|
|
180
167
|
field: {
|
|
181
168
|
...e,
|
|
182
169
|
key: `${d}.${t}.${e?.key}`
|
|
@@ -184,103 +171,103 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
184
171
|
schema: a ?? null,
|
|
185
172
|
...i
|
|
186
173
|
}, `common-fields-${e?.id}`))
|
|
187
|
-
}), /* @__PURE__ */
|
|
188
|
-
className:
|
|
174
|
+
}), /* @__PURE__ */ q("div", {
|
|
175
|
+
className: Ye,
|
|
189
176
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ K(y, {
|
|
191
178
|
onClick: () => {
|
|
192
|
-
|
|
179
|
+
v((t - 1).toString()), w.move(t, t - 1);
|
|
193
180
|
},
|
|
194
181
|
disabled: t === 0,
|
|
195
182
|
size: "icon",
|
|
196
|
-
className:
|
|
197
|
-
children: /* @__PURE__ */
|
|
183
|
+
className: Xe,
|
|
184
|
+
children: /* @__PURE__ */ K(ve, { size: 20 })
|
|
198
185
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
className:
|
|
186
|
+
/* @__PURE__ */ K(y, {
|
|
187
|
+
className: Ze,
|
|
201
188
|
variant: "link",
|
|
202
189
|
onClick: () => {
|
|
203
|
-
|
|
190
|
+
v(Math.max(0, t - 1).toString()), w.remove(t);
|
|
204
191
|
},
|
|
205
192
|
children: "Remove Item"
|
|
206
193
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
className:
|
|
194
|
+
/* @__PURE__ */ K(y, {
|
|
195
|
+
className: Xe,
|
|
209
196
|
onClick: () => {
|
|
210
|
-
|
|
197
|
+
v((t + 1).toString()), w.move(t, t + 1);
|
|
211
198
|
},
|
|
212
199
|
disabled: t >= T.length - 1,
|
|
213
200
|
size: "icon",
|
|
214
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ K(ye, { size: 20 })
|
|
215
202
|
})
|
|
216
203
|
]
|
|
217
204
|
})]
|
|
218
|
-
}, `array-widget-tab-content-${
|
|
219
|
-
}) : /* @__PURE__ */
|
|
205
|
+
}, `array-widget-tab-content-${n?.id}-${t}`))]
|
|
206
|
+
}) : /* @__PURE__ */ q(y, {
|
|
220
207
|
variant: "ghost",
|
|
221
208
|
size: "xs",
|
|
222
209
|
onClick: () => {
|
|
223
|
-
w.append(
|
|
210
|
+
w.append(u(h)), v("0");
|
|
224
211
|
},
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
-
}), t[20] = w, t[21] =
|
|
212
|
+
children: [/* @__PURE__ */ K(Ee, { size: 14 }), "Add"]
|
|
213
|
+
}), t[20] = w, t[21] = n.id, t[22] = n.key, t[23] = T, t[24] = h, t[25] = d, t[26] = i, t[27] = a, t[28] = _, t[29] = A) : A = t[29];
|
|
227
214
|
let j;
|
|
228
|
-
t[30] === D ? j = t[31] : (j = !!D && /* @__PURE__ */
|
|
215
|
+
t[30] === D ? j = t[31] : (j = !!D && /* @__PURE__ */ K("div", {
|
|
229
216
|
className: "_1kzhxrsc",
|
|
230
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: /* @__PURE__ */ K("p", {
|
|
231
218
|
className: "_1ompjs13",
|
|
232
219
|
children: D
|
|
233
220
|
})
|
|
234
221
|
}), t[30] = D, t[31] = j);
|
|
235
222
|
let M;
|
|
236
|
-
return t[32] !== k || t[33] !== A || t[34] !== j ? (M = /* @__PURE__ */
|
|
237
|
-
className:
|
|
223
|
+
return t[32] !== k || t[33] !== A || t[34] !== j ? (M = /* @__PURE__ */ q("div", {
|
|
224
|
+
className: Ve,
|
|
238
225
|
children: [
|
|
239
226
|
k,
|
|
240
227
|
A,
|
|
241
228
|
j
|
|
242
229
|
]
|
|
243
230
|
}), t[32] = k, t[33] = A, t[34] = j, t[35] = M) : M = t[35], M;
|
|
244
|
-
},
|
|
245
|
-
container: () =>
|
|
246
|
-
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Q(
|
|
231
|
+
}, lt = "_8vx4f60 _1oiks600 _1ri7vba0", ut = "_8vx4f61", dt = "_8vx4f62", ft = "_8vx4f63", pt = "_8vx4f66", mt = "_8vx4f67", ht = "_8vx4f68", gt = "_8vx4f69", _t = "_8vx4f6a", vt = "_8vx4f6b", yt = "_8vx4f6c", bt = "_8vx4f6d _6o7s4x0", xt = "_8vx4f6e", St = "_8vx4f6f", Ct = "_8vx4f6g", wt = "_8vx4f6h", Tt = "_8vx4f6k", Et = {
|
|
232
|
+
container: () => ut,
|
|
233
|
+
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Q(lt, t ? ft : dt, e && "_8vx4f64", n && "_8vx4f65"),
|
|
247
234
|
input: () => "",
|
|
248
|
-
valueContainer: () =>
|
|
249
|
-
loadingMessage: () =>
|
|
235
|
+
valueContainer: () => pt,
|
|
236
|
+
loadingMessage: () => ht,
|
|
250
237
|
singleValue: () => "",
|
|
251
|
-
multiValue: () =>
|
|
252
|
-
multiValueRemove: () =>
|
|
253
|
-
indicatorsContainer: () =>
|
|
254
|
-
clearIndicator: () =>
|
|
238
|
+
multiValue: () => gt,
|
|
239
|
+
multiValueRemove: () => _t,
|
|
240
|
+
indicatorsContainer: () => mt,
|
|
241
|
+
clearIndicator: () => vt,
|
|
255
242
|
indicatorSeparator: () => "",
|
|
256
|
-
dropdownIndicator: () =>
|
|
257
|
-
menu: () =>
|
|
258
|
-
groupHeading: () =>
|
|
259
|
-
placeholder: () =>
|
|
260
|
-
option: ({ isSelected: e, isFocused: t }) => Q(
|
|
261
|
-
noOptionsMessage: () =>
|
|
262
|
-
menuPortal: () =>
|
|
263
|
-
},
|
|
264
|
-
let { portalRef: n } =
|
|
265
|
-
return /* @__PURE__ */
|
|
243
|
+
dropdownIndicator: () => yt,
|
|
244
|
+
menu: () => bt,
|
|
245
|
+
groupHeading: () => St,
|
|
246
|
+
placeholder: () => Ct,
|
|
247
|
+
option: ({ isSelected: e, isFocused: t }) => Q(wt, t && "_8vx4f6i", e && "_8vx4f6j"),
|
|
248
|
+
noOptionsMessage: () => Tt,
|
|
249
|
+
menuPortal: () => xt
|
|
250
|
+
}, Dt = F.lazy(() => import("react-select-async-paginate").then((e) => ({ default: e.AsyncPaginate }))), Ot = (e) => {
|
|
251
|
+
let { portalRef: n } = t();
|
|
252
|
+
return /* @__PURE__ */ K(Dt, {
|
|
266
253
|
isClearable: !0,
|
|
267
254
|
menuPlacement: "auto",
|
|
268
255
|
isSearchable: !0,
|
|
269
256
|
unstyled: !0,
|
|
270
|
-
classNames:
|
|
257
|
+
classNames: Et,
|
|
271
258
|
styles: { menuPortal: (e) => ({
|
|
272
259
|
...e,
|
|
273
260
|
zIndex: 99999999
|
|
274
261
|
}) },
|
|
275
262
|
menuPosition: "fixed",
|
|
276
263
|
menuPortalTarget: n?.current,
|
|
277
|
-
loadingMessage: () => /* @__PURE__ */
|
|
278
|
-
...
|
|
264
|
+
loadingMessage: () => /* @__PURE__ */ K(T, { size: 16 }),
|
|
265
|
+
...e
|
|
279
266
|
});
|
|
280
|
-
},
|
|
281
|
-
let { collection: t } =
|
|
267
|
+
}, kt = (e) => e ? e.replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()) : "", At = "_1k5k6yj0", jt = ({ field: e }) => {
|
|
268
|
+
let { collection: t } = ae(), [n, i] = W(!1), [a, o] = W(!1), [s, c] = W([]), [l, u] = W(1), [d, f] = W(5), [p, m] = W(0), [h, g] = W(0), { key: _ = "", label: b = "", helper_text: x = "", readonly: S = !1 } = e, C = _, w = e?.options?.collection_key || "", E = e?.options?.label_field_key || "", { field: { value: A, onChange: j, ref: M }, fieldState: N } = $({
|
|
282
269
|
name: C,
|
|
283
|
-
rules:
|
|
270
|
+
rules: r(e)
|
|
284
271
|
}), P = !!e?.required, F = N?.error?.message, I = async () => {
|
|
285
272
|
i(!0);
|
|
286
273
|
try {
|
|
@@ -290,22 +277,22 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
290
277
|
limit: d,
|
|
291
278
|
where: { _id: { in: A } }
|
|
292
279
|
}), n = e?.content?.data ?? [], r = e?.content?.meta?.pages ?? 0;
|
|
293
|
-
m(e?.content?.meta?.total ?? 0),
|
|
280
|
+
m(e?.content?.meta?.total ?? 0), g(r), l > r && u(r), c(n);
|
|
294
281
|
} catch (e) {
|
|
295
|
-
|
|
282
|
+
te(e);
|
|
296
283
|
} finally {
|
|
297
284
|
i(!1);
|
|
298
285
|
}
|
|
299
286
|
};
|
|
300
|
-
return
|
|
287
|
+
return V(() => {
|
|
301
288
|
A?.length > 0 && I();
|
|
302
289
|
}, [
|
|
303
290
|
A,
|
|
304
291
|
l,
|
|
305
292
|
d
|
|
306
|
-
]), /* @__PURE__ */
|
|
307
|
-
className:
|
|
308
|
-
children: [/* @__PURE__ */
|
|
293
|
+
]), /* @__PURE__ */ q("div", {
|
|
294
|
+
className: At,
|
|
295
|
+
children: [/* @__PURE__ */ K(v, {
|
|
309
296
|
ref: M,
|
|
310
297
|
error: F,
|
|
311
298
|
helperText: x,
|
|
@@ -313,7 +300,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
313
300
|
label: b,
|
|
314
301
|
htmlFor: C,
|
|
315
302
|
isRequired: P,
|
|
316
|
-
children: /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ K(Ot, {
|
|
317
304
|
id: C,
|
|
318
305
|
value: [],
|
|
319
306
|
onChange: (e) => {
|
|
@@ -336,7 +323,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
336
323
|
slug: e?.slug,
|
|
337
324
|
[E]: e?.[E]
|
|
338
325
|
},
|
|
339
|
-
label: e?.[E] ? e?.[E] :
|
|
326
|
+
label: e?.[E] ? e?.[E] : kt(e?.slug ?? "")
|
|
340
327
|
}));
|
|
341
328
|
return {
|
|
342
329
|
options: Array.isArray(a) ? a : [],
|
|
@@ -361,44 +348,44 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
361
348
|
cacheUniqs: [w],
|
|
362
349
|
minMenuHeight: 250
|
|
363
350
|
})
|
|
364
|
-
}), Array.isArray(A) && A?.length > 0 && /* @__PURE__ */
|
|
351
|
+
}), Array.isArray(A) && A?.length > 0 && /* @__PURE__ */ q("div", {
|
|
365
352
|
className: "_1k5k6yj1",
|
|
366
353
|
children: [
|
|
367
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ q("h4", {
|
|
368
355
|
className: "_1k5k6yj2",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ K("span", { children: "Selected" }), n && s?.length > 0 && /* @__PURE__ */ K(T, { size: 16 })]
|
|
370
357
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ K("div", {
|
|
372
359
|
className: "_1k5k6yj4",
|
|
373
|
-
children: s.map((e) => /* @__PURE__ */
|
|
360
|
+
children: s.map((e) => /* @__PURE__ */ q("div", {
|
|
374
361
|
className: "_1k5k6yj5",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ K("div", {
|
|
376
363
|
className: "_1k5k6yj6",
|
|
377
|
-
children: e?.[E] ||
|
|
378
|
-
}), /* @__PURE__ */
|
|
379
|
-
disabled:
|
|
364
|
+
children: e?.[E] || kt(e?.slug ?? "")
|
|
365
|
+
}), /* @__PURE__ */ K(y, {
|
|
366
|
+
disabled: n,
|
|
380
367
|
size: "icon-sm",
|
|
381
368
|
variant: "ghost",
|
|
382
369
|
onClick: () => {
|
|
383
370
|
j(A?.filter((t) => t !== e?._id));
|
|
384
371
|
},
|
|
385
|
-
children: /* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ K(ke, { size: 16 })
|
|
386
373
|
})]
|
|
387
374
|
}, e?._id))
|
|
388
375
|
}),
|
|
389
|
-
|
|
376
|
+
n && s?.length === 0 && /* @__PURE__ */ K("div", {
|
|
390
377
|
className: "_1k5k6yj3",
|
|
391
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ K(T, { size: 24 })
|
|
392
379
|
}),
|
|
393
|
-
A?.length > 5 && /* @__PURE__ */
|
|
380
|
+
A?.length > 5 && /* @__PURE__ */ q("div", {
|
|
394
381
|
className: "_1k5k6yj7",
|
|
395
382
|
children: [
|
|
396
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ q("div", {
|
|
397
384
|
className: "_1k5k6yj8",
|
|
398
385
|
children: [
|
|
399
386
|
"Showing",
|
|
400
387
|
" ",
|
|
401
|
-
p ? /* @__PURE__ */
|
|
388
|
+
p ? /* @__PURE__ */ q(G, { children: [
|
|
402
389
|
d * (l - 1) + 1,
|
|
403
390
|
"-",
|
|
404
391
|
Math.min(d * l, p),
|
|
@@ -409,64 +396,64 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
409
396
|
" items"
|
|
410
397
|
]
|
|
411
398
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ q("select", {
|
|
413
400
|
className: "_1k5k6yjb",
|
|
414
401
|
value: d,
|
|
415
402
|
onChange: (e) => {
|
|
416
403
|
u(1), f(Number(e.target.value));
|
|
417
404
|
},
|
|
418
405
|
children: [
|
|
419
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ K("option", {
|
|
420
407
|
value: 5,
|
|
421
408
|
children: "5"
|
|
422
409
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ K("option", {
|
|
424
411
|
value: 10,
|
|
425
412
|
children: "10"
|
|
426
413
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ K("option", {
|
|
428
415
|
value: 25,
|
|
429
416
|
children: "25"
|
|
430
417
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ K("option", {
|
|
432
419
|
value: 50,
|
|
433
420
|
children: "50"
|
|
434
421
|
})
|
|
435
422
|
]
|
|
436
423
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ K("div", {
|
|
438
425
|
className: "_1k5k6yj9",
|
|
439
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ q("div", {
|
|
440
427
|
className: "_1k5k6yja",
|
|
441
428
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
443
430
|
variant: "ghost",
|
|
444
431
|
size: "icon-xs",
|
|
445
432
|
onClick: () => u(1),
|
|
446
433
|
disabled: l === 1,
|
|
447
|
-
children: /* @__PURE__ */
|
|
448
|
-
}), /* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
434
|
+
children: /* @__PURE__ */ K(be, { size: 14 })
|
|
435
|
+
}), /* @__PURE__ */ K(O, { children: "First page" })] }),
|
|
436
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
450
437
|
variant: "ghost",
|
|
451
438
|
size: "icon-xs",
|
|
452
439
|
disabled: l === 1,
|
|
453
440
|
onClick: () => u(l - 1),
|
|
454
|
-
children: /* @__PURE__ */
|
|
455
|
-
}), /* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */
|
|
441
|
+
children: /* @__PURE__ */ K(ve, { size: 14 })
|
|
442
|
+
}), /* @__PURE__ */ K(O, { children: "Previous page" })] }),
|
|
443
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
457
444
|
variant: "ghost",
|
|
458
445
|
size: "icon-xs",
|
|
459
446
|
onClick: () => u(l + 1),
|
|
460
|
-
disabled: l ===
|
|
461
|
-
children: /* @__PURE__ */
|
|
462
|
-
}), /* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
447
|
+
disabled: l === h,
|
|
448
|
+
children: /* @__PURE__ */ K(ye, { size: 14 })
|
|
449
|
+
}), /* @__PURE__ */ K(O, { children: "Next page" })] }),
|
|
450
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
464
451
|
variant: "ghost",
|
|
465
452
|
size: "icon-xs",
|
|
466
|
-
onClick: () => u(
|
|
467
|
-
disabled: l ===
|
|
468
|
-
children: /* @__PURE__ */
|
|
469
|
-
}), /* @__PURE__ */
|
|
453
|
+
onClick: () => u(h),
|
|
454
|
+
disabled: l === h,
|
|
455
|
+
children: /* @__PURE__ */ K(xe, { size: 14 })
|
|
456
|
+
}), /* @__PURE__ */ K(O, { children: "Last page" })] })
|
|
470
457
|
]
|
|
471
458
|
})
|
|
472
459
|
})
|
|
@@ -475,11 +462,11 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
475
462
|
]
|
|
476
463
|
})]
|
|
477
464
|
});
|
|
478
|
-
},
|
|
479
|
-
let { collection: t } =
|
|
465
|
+
}, Mt = ({ field: e }) => {
|
|
466
|
+
let { collection: t } = ae(), [n, i] = W(!1), { key: a = "", label: o = "", helper_text: s = "", readonly: c = !1 } = e, l = a, u = e?.options?.collection_key || "", d = e?.options?.label_field_key || "", { field: { value: f, onBlur: p, onChange: m, ref: h, disabled: g, ..._ }, fieldState: y } = $({
|
|
480
467
|
name: l,
|
|
481
|
-
rules:
|
|
482
|
-
}), b = !!e?.required, x =
|
|
468
|
+
rules: r(e)
|
|
469
|
+
}), b = !!e?.required, x = y?.error?.message, S = async (e, n, { page: r = 1 }) => {
|
|
483
470
|
i(!0);
|
|
484
471
|
try {
|
|
485
472
|
let n = (await t?.getCollectionContentList({
|
|
@@ -488,7 +475,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
488
475
|
search: e,
|
|
489
476
|
limit: 10
|
|
490
477
|
}))?.content?.data, i = (n || []).map((e) => {
|
|
491
|
-
let t = e?.[d] ? e?.[d] :
|
|
478
|
+
let t = e?.[d] ? e?.[d] : kt(e?.slug || "");
|
|
492
479
|
return {
|
|
493
480
|
value: {
|
|
494
481
|
_id: e?._id,
|
|
@@ -513,7 +500,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
513
500
|
i(!1);
|
|
514
501
|
}
|
|
515
502
|
};
|
|
516
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ K(v, {
|
|
517
504
|
ref: h,
|
|
518
505
|
error: x,
|
|
519
506
|
helperText: s,
|
|
@@ -521,10 +508,10 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
521
508
|
label: o,
|
|
522
509
|
htmlFor: l,
|
|
523
510
|
isRequired: b,
|
|
524
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ K(Ot, {
|
|
525
512
|
id: l,
|
|
526
513
|
value: f ? {
|
|
527
|
-
label: f?.[d] ? f?.[d] : f?.slug ?
|
|
514
|
+
label: f?.[d] ? f?.[d] : f?.slug ? kt(f?.slug || "") : "",
|
|
528
515
|
value: {
|
|
529
516
|
_id: f?._id,
|
|
530
517
|
slug: f?.slug,
|
|
@@ -539,7 +526,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
539
526
|
debounceTimeout: 500,
|
|
540
527
|
getOptionLabel: (e) => e?.label,
|
|
541
528
|
getOptionValue: (e) => e?.value?._id || e?.value?.slug,
|
|
542
|
-
isLoading:
|
|
529
|
+
isLoading: n,
|
|
543
530
|
additional: { page: 1 },
|
|
544
531
|
cacheUniqs: [u],
|
|
545
532
|
minMenuHeight: 250,
|
|
@@ -547,52 +534,52 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
547
534
|
..._
|
|
548
535
|
})
|
|
549
536
|
});
|
|
550
|
-
},
|
|
537
|
+
}, Nt = (e) => {
|
|
551
538
|
let t = Z(4), { field: n } = e, { field_interface: r, key: i, options: a } = n, o = a === void 0 ? {} : a;
|
|
552
539
|
if (!r || !i) return null;
|
|
553
540
|
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;
|
|
554
541
|
if (o?.current_have_many_connected && !o?.connected_have_many_current) return console.error("[LevoCollection]: O2M is not supported"), null;
|
|
555
542
|
if (o?.current_have_many_connected && o?.connected_have_many_current) {
|
|
556
543
|
let n;
|
|
557
|
-
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */
|
|
544
|
+
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ K(jt, {
|
|
558
545
|
...e,
|
|
559
546
|
schema: null
|
|
560
547
|
}), t[0] = e, t[1] = n), n;
|
|
561
548
|
}
|
|
562
549
|
let s;
|
|
563
|
-
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */
|
|
550
|
+
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */ K(Mt, {
|
|
564
551
|
...e,
|
|
565
552
|
schema: null
|
|
566
553
|
}), t[2] = e, t[3] = s), s;
|
|
567
|
-
},
|
|
554
|
+
}, Pt = "_1vaa8ub0", Ft = "_1vaa8ub2", It = "_1vaa8ub3", Lt = "_13kepqq0", Rt = "_13kepqq1", zt = (e) => {
|
|
568
555
|
let t = Z(9), n, r;
|
|
569
556
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
570
557
|
let i;
|
|
571
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
558
|
+
t[3] === n ? i = t[4] : (i = Q(Lt, n), t[3] = n, t[4] = i);
|
|
572
559
|
let a;
|
|
573
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
560
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ K(Ae.Indicator, {
|
|
574
561
|
"data-slot": "checkbox-indicator",
|
|
575
|
-
className:
|
|
576
|
-
children: /* @__PURE__ */
|
|
562
|
+
className: Rt,
|
|
563
|
+
children: /* @__PURE__ */ K(_e, {})
|
|
577
564
|
}), t[5] = a) : a = t[5];
|
|
578
565
|
let o;
|
|
579
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
566
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ K(Ae.Root, {
|
|
580
567
|
"data-slot": "checkbox",
|
|
581
568
|
className: i,
|
|
582
569
|
...r,
|
|
583
570
|
children: a
|
|
584
571
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
585
|
-
},
|
|
586
|
-
let t = Z(48), { field:
|
|
572
|
+
}, Bt = (e) => {
|
|
573
|
+
let t = Z(48), { field: n } = e, [i, a] = W(""), [o, s] = W(!1), { key: c, label: l, helper_text: u, readonly: d, values: f, options: p } = n, m = c === void 0 ? "" : c, h = l === void 0 ? "" : l, g = u === void 0 ? "" : u, y = d === void 0 ? !1 : d, b;
|
|
587
574
|
t[0] === f ? b = t[1] : (b = f === void 0 ? [] : f, t[0] = f, t[1] = b);
|
|
588
575
|
let x = b, S = p === void 0 ? {} : p, C;
|
|
589
|
-
t[2] ===
|
|
576
|
+
t[2] === n ? C = t[3] : (C = r(n), t[2] = n, t[3] = C);
|
|
590
577
|
let w;
|
|
591
578
|
t[4] !== m || t[5] !== C ? (w = {
|
|
592
579
|
name: m,
|
|
593
580
|
rules: C
|
|
594
581
|
}, t[4] = m, t[5] = C, t[6] = w) : w = t[6];
|
|
595
|
-
let { field: T, fieldState: E } = $(w), { name: D, onBlur: O, onChange: k, value: A, ref: j, disabled:
|
|
582
|
+
let { field: T, fieldState: E } = $(w), { name: D, onBlur: O, onChange: k, value: A, ref: j, disabled: M } = T, { error: P } = E, F;
|
|
596
583
|
t[7] !== k || t[8] !== A ? (F = (e) => {
|
|
597
584
|
let t = Array.isArray(A || null) ? [...A] : [];
|
|
598
585
|
t.includes(e) ? t = t?.filter((t) => t !== e) : t.push(e), k(t);
|
|
@@ -607,51 +594,51 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
607
594
|
}
|
|
608
595
|
}, t[10] = L, t[11] = A, t[12] = x, t[13] = R) : R = t[13];
|
|
609
596
|
let z;
|
|
610
|
-
t[14] !== A || t[15] !== x ? (z = [A, x], t[14] = A, t[15] = x, t[16] = z) : z = t[16],
|
|
611
|
-
let
|
|
612
|
-
t[17] ===
|
|
597
|
+
t[14] !== A || t[15] !== x ? (z = [A, x], t[14] = A, t[15] = x, t[16] = z) : z = t[16], V(R, z);
|
|
598
|
+
let B = P?.message, H = n?.required, U = y && "_1vaa8ub1", G;
|
|
599
|
+
t[17] === U ? G = t[18] : (G = Q(Pt, U), t[17] = U, t[18] = G);
|
|
613
600
|
let J;
|
|
614
|
-
t[19] !==
|
|
615
|
-
className:
|
|
616
|
-
children: [/* @__PURE__ */
|
|
601
|
+
t[19] !== M || t[20] !== I || t[21] !== D || t[22] !== O || t[23] !== A || t[24] !== x ? (J = x?.map((e, t) => /* @__PURE__ */ q("div", {
|
|
602
|
+
className: Ft,
|
|
603
|
+
children: [/* @__PURE__ */ K(zt, {
|
|
617
604
|
id: `${D}-${e}-${t}`,
|
|
618
605
|
name: D,
|
|
619
606
|
checked: A ? A?.includes(e) : !1,
|
|
620
607
|
onCheckedChange: () => I(e),
|
|
621
608
|
onBlur: () => O(),
|
|
622
|
-
disabled:
|
|
623
|
-
}), /* @__PURE__ */
|
|
609
|
+
disabled: M
|
|
610
|
+
}), /* @__PURE__ */ K(_, {
|
|
624
611
|
htmlFor: `${D}-${e}-${t}`,
|
|
625
|
-
className:
|
|
612
|
+
className: It,
|
|
626
613
|
children: e
|
|
627
614
|
})]
|
|
628
|
-
}, `${e}-${t}`)), t[19] =
|
|
615
|
+
}, `${e}-${t}`)), t[19] = M, t[20] = I, t[21] = D, t[22] = O, t[23] = A, t[24] = x, t[25] = J) : J = t[25];
|
|
629
616
|
let Y;
|
|
630
|
-
t[26] !== j || t[27] !==
|
|
617
|
+
t[26] !== j || t[27] !== G || t[28] !== J ? (Y = /* @__PURE__ */ K("div", {
|
|
631
618
|
ref: j,
|
|
632
|
-
className:
|
|
619
|
+
className: G,
|
|
633
620
|
children: J
|
|
634
|
-
}), t[26] = j, t[27] =
|
|
621
|
+
}), t[26] = j, t[27] = G, t[28] = J, t[29] = Y) : Y = t[29];
|
|
635
622
|
let X;
|
|
636
|
-
t[30] !==
|
|
623
|
+
t[30] !== M || t[31] !== L || t[32] !== D || t[33] !== O || t[34] !== k || t[35] !== o || t[36] !== i || t[37] !== A ? (X = L && /* @__PURE__ */ q("div", {
|
|
637
624
|
className: "_1vaa8ub4",
|
|
638
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ q("div", {
|
|
639
626
|
className: "_1vaa8ub5",
|
|
640
|
-
children: [/* @__PURE__ */
|
|
627
|
+
children: [/* @__PURE__ */ K(zt, {
|
|
641
628
|
name: `${D}-other`,
|
|
642
629
|
id: `${D}-other`,
|
|
643
|
-
disabled:
|
|
630
|
+
disabled: M,
|
|
644
631
|
checked: o,
|
|
645
632
|
onCheckedChange: (e) => {
|
|
646
633
|
s(!!e), e ? Array.isArray(A) ? k?.([...A, i]) : k?.([i]) : k?.((A ?? [])?.filter((e) => e !== i));
|
|
647
634
|
},
|
|
648
635
|
onBlur: () => O()
|
|
649
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ q(_, {
|
|
650
637
|
htmlFor: `${D}-other`,
|
|
651
638
|
className: "_1vaa8ub3",
|
|
652
639
|
children: ["Other:", " "]
|
|
653
640
|
})]
|
|
654
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ K(N, {
|
|
655
642
|
name: `other-checkbox-${D}`,
|
|
656
643
|
className: "_1vaa8ub6",
|
|
657
644
|
value: i,
|
|
@@ -659,123 +646,205 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
659
646
|
let t = 0;
|
|
660
647
|
k?.(A?.map((n) => n === i && !t ? (t = 1, e.target.value) : n)), a(e.target.value);
|
|
661
648
|
},
|
|
662
|
-
disabled: !o ||
|
|
649
|
+
disabled: !o || M,
|
|
663
650
|
placeholder: "Please specify"
|
|
664
651
|
})]
|
|
665
|
-
}), t[30] =
|
|
652
|
+
}), t[30] = M, t[31] = L, t[32] = D, t[33] = O, t[34] = k, t[35] = o, t[36] = i, t[37] = A, t[38] = X) : X = t[38];
|
|
666
653
|
let ee;
|
|
667
|
-
return t[39] !==
|
|
668
|
-
error:
|
|
669
|
-
helperText:
|
|
670
|
-
readOnly:
|
|
654
|
+
return t[39] !== g || t[40] !== h || t[41] !== D || t[42] !== y || t[43] !== B || t[44] !== H || t[45] !== Y || t[46] !== X ? (ee = /* @__PURE__ */ q(v, {
|
|
655
|
+
error: B,
|
|
656
|
+
helperText: g,
|
|
657
|
+
readOnly: y,
|
|
671
658
|
label: h,
|
|
672
659
|
htmlFor: D,
|
|
673
660
|
isRequired: H,
|
|
674
661
|
children: [Y, X]
|
|
675
|
-
}), t[39] =
|
|
676
|
-
},
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
662
|
+
}), t[39] = g, t[40] = h, t[41] = D, t[42] = y, t[43] = B, t[44] = H, t[45] = Y, t[46] = X, t[47] = ee) : ee = t[47], ee;
|
|
663
|
+
}, Vt = "₹", Ht = [
|
|
664
|
+
{
|
|
665
|
+
label: "INR — Indian Rupee (₹)",
|
|
666
|
+
value: "₹",
|
|
667
|
+
code: "INR"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
label: "USD — US Dollar ($)",
|
|
671
|
+
value: "$",
|
|
672
|
+
code: "USD"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
label: "EUR — Euro (€)",
|
|
676
|
+
value: "€",
|
|
677
|
+
code: "EUR"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
label: "GBP — British Pound (£)",
|
|
681
|
+
value: "£",
|
|
682
|
+
code: "GBP"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
label: "JPY — Japanese Yen (¥)",
|
|
686
|
+
value: "¥",
|
|
687
|
+
code: "JPY"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
label: "AUD — Australian Dollar (A$)",
|
|
691
|
+
value: "A$",
|
|
692
|
+
code: "AUD"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
label: "CAD — Canadian Dollar (C$)",
|
|
696
|
+
value: "C$",
|
|
697
|
+
code: "CAD"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
label: "SGD — Singapore Dollar (S$)",
|
|
701
|
+
value: "S$",
|
|
702
|
+
code: "SGD"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
label: "HKD — Hong Kong Dollar (HK$)",
|
|
706
|
+
value: "HK$",
|
|
707
|
+
code: "HKD"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
label: "BRL — Brazilian Real (R$)",
|
|
711
|
+
value: "R$",
|
|
712
|
+
code: "BRL"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
label: "RUB — Russian Ruble (₽)",
|
|
716
|
+
value: "₽",
|
|
717
|
+
code: "RUB"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
label: "KRW — South Korean Won (₩)",
|
|
721
|
+
value: "₩",
|
|
722
|
+
code: "KRW"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
label: "TRY — Turkish Lira (₺)",
|
|
726
|
+
value: "₺",
|
|
727
|
+
code: "TRY"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
label: "CHF — Swiss Franc",
|
|
731
|
+
value: "CHF",
|
|
732
|
+
code: "CHF"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
label: "SAR — Saudi Riyal (﷼)",
|
|
736
|
+
value: "﷼",
|
|
737
|
+
code: "SAR"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
label: "AED — UAE Dirham (د.إ)",
|
|
741
|
+
value: "د.إ",
|
|
742
|
+
code: "AED"
|
|
743
|
+
}
|
|
744
|
+
], Ut = (e) => {
|
|
745
|
+
let t = Z(39), n, i;
|
|
746
|
+
t[0] === e ? (n = t[1], i = t[2]) : ({field: n, ...i} = e, t[0] = e, t[1] = n, t[2] = i);
|
|
747
|
+
let { key: a, label: o, helper_text: s, readonly: c } = n, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f = c === void 0 ? !1 : c, p = l, m;
|
|
748
|
+
t[3] === n ? m = t[4] : (m = r(n), t[3] = n, t[4] = m);
|
|
681
749
|
let h;
|
|
682
750
|
t[5] !== p || t[6] !== m ? (h = {
|
|
683
751
|
name: p,
|
|
684
752
|
rules: m
|
|
685
753
|
}, t[5] = p, t[6] = m, t[7] = h) : h = t[7];
|
|
686
|
-
let { field: g, fieldState: _ } = $(h), b, x, S, C
|
|
687
|
-
t[8] === g ? (
|
|
688
|
-
let
|
|
689
|
-
t[14] ===
|
|
754
|
+
let { field: g, fieldState: _ } = $(h), y, b, x, S, C;
|
|
755
|
+
t[8] === g ? (y = t[9], b = t[10], x = t[11], S = t[12], C = t[13]) : ({value: C, onBlur: y, onChange: b, ref: x, ...S} = g, t[8] = g, t[9] = y, t[10] = b, t[11] = x, t[12] = S, t[13] = C);
|
|
756
|
+
let w = !!n?.required, T = _?.error?.message, E = n?.options?.currency_code, D = `${E || "$"} `, O = `${E || "$"} 0`, k = E === "₹" ? "lakh" : "thousand", j;
|
|
757
|
+
t[14] === b ? j = t[15] : (j = (e) => {
|
|
690
758
|
let { value: t } = e;
|
|
691
|
-
|
|
692
|
-
}, t[14] =
|
|
693
|
-
let M;
|
|
694
|
-
t[16] === b ? M = t[17] : (M = () => {
|
|
695
|
-
b && b();
|
|
696
|
-
}, t[16] = b, t[17] = M);
|
|
759
|
+
b && b(t);
|
|
760
|
+
}, t[14] = b, t[15] = j);
|
|
697
761
|
let N;
|
|
698
|
-
t[
|
|
762
|
+
t[16] === y ? N = t[17] : (N = () => {
|
|
763
|
+
y && y();
|
|
764
|
+
}, t[16] = y, t[17] = N);
|
|
699
765
|
let P;
|
|
700
|
-
t[
|
|
766
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (P = Q(M, A), t[18] = P) : P = t[18];
|
|
767
|
+
let F;
|
|
768
|
+
t[19] !== p || t[20] !== i || t[21] !== f || t[22] !== x || t[23] !== S || t[24] !== k || t[25] !== j || t[26] !== N || t[27] !== D || t[28] !== O || t[29] !== C ? (F = /* @__PURE__ */ K(je, {
|
|
701
769
|
thousandSeparator: !0,
|
|
702
|
-
prefix:
|
|
770
|
+
prefix: D,
|
|
771
|
+
placeholder: O,
|
|
703
772
|
thousandsGroupStyle: k,
|
|
704
773
|
suffix: "",
|
|
705
774
|
allowNegative: !1,
|
|
706
775
|
id: p,
|
|
707
|
-
getInputRef:
|
|
708
|
-
onValueChange:
|
|
709
|
-
onBlur:
|
|
710
|
-
value:
|
|
776
|
+
getInputRef: x,
|
|
777
|
+
onValueChange: j,
|
|
778
|
+
onBlur: N,
|
|
779
|
+
value: C,
|
|
711
780
|
readOnly: f,
|
|
712
|
-
className:
|
|
713
|
-
...
|
|
781
|
+
className: P,
|
|
782
|
+
...S,
|
|
714
783
|
...i
|
|
715
|
-
}), t[19] = p, t[20] = i, t[21] = f, t[22] =
|
|
716
|
-
let
|
|
717
|
-
return t[
|
|
718
|
-
error:
|
|
784
|
+
}), t[19] = p, t[20] = i, t[21] = f, t[22] = x, t[23] = S, t[24] = k, t[25] = j, t[26] = N, t[27] = D, t[28] = O, t[29] = C, t[30] = F) : F = t[30];
|
|
785
|
+
let I;
|
|
786
|
+
return t[31] !== T || t[32] !== d || t[33] !== w || t[34] !== u || t[35] !== p || t[36] !== f || t[37] !== F ? (I = /* @__PURE__ */ K(v, {
|
|
787
|
+
error: T,
|
|
719
788
|
helperText: d,
|
|
720
789
|
readOnly: f,
|
|
721
790
|
htmlFor: p,
|
|
722
|
-
isRequired:
|
|
791
|
+
isRequired: w,
|
|
723
792
|
label: u,
|
|
724
|
-
children:
|
|
725
|
-
}), t[
|
|
726
|
-
},
|
|
793
|
+
children: F
|
|
794
|
+
}), t[31] = T, t[32] = d, t[33] = w, t[34] = u, t[35] = p, t[36] = f, t[37] = F, t[38] = I) : I = t[38], I;
|
|
795
|
+
}, Wt = {
|
|
727
796
|
label: "Other",
|
|
728
797
|
value: "other_internal"
|
|
729
|
-
},
|
|
730
|
-
let { portalRef: i } =
|
|
798
|
+
}, Gt = ({ field: e, ...n }) => {
|
|
799
|
+
let { portalRef: i } = t(), [a, o] = W([]), { key: s = "", label: c = "", helper_text: l = "", readonly: u = !1, values: d = [], options: f = {} } = e, p = s, { field: { value: m, onBlur: h, onChange: g, disabled: _, ...y }, fieldState: b } = $({
|
|
731
800
|
name: p,
|
|
732
|
-
rules:
|
|
733
|
-
}), [x, S] =
|
|
734
|
-
return
|
|
801
|
+
rules: r(e)
|
|
802
|
+
}), [x, S] = W(""), [C, w] = W(!1), T = !!e?.required, E = b?.error?.message, D = !!f?.custom_input;
|
|
803
|
+
return V(() => {
|
|
735
804
|
if (d?.length) {
|
|
736
805
|
let e = [...d?.map((e) => ({
|
|
737
806
|
label: e,
|
|
738
807
|
value: e
|
|
739
808
|
}))];
|
|
740
|
-
D && e.push(
|
|
809
|
+
D && e.push(Wt), o(e);
|
|
741
810
|
}
|
|
742
|
-
}, [d, D]),
|
|
743
|
-
!
|
|
811
|
+
}, [d, D]), V(() => {
|
|
812
|
+
!n?.isMulti && D && typeof m == "string" && m && (a.some((e) => e.value !== Wt.value && e.value === m) ? w(!1) : (w(!0), S(m)));
|
|
744
813
|
}, [
|
|
745
814
|
m,
|
|
746
815
|
a,
|
|
747
816
|
D
|
|
748
|
-
]), /* @__PURE__ */
|
|
817
|
+
]), /* @__PURE__ */ q(v, {
|
|
749
818
|
error: E,
|
|
750
819
|
helperText: l,
|
|
751
820
|
readOnly: u,
|
|
752
821
|
label: c,
|
|
753
822
|
htmlFor: p,
|
|
754
823
|
isRequired: T,
|
|
755
|
-
children: [/* @__PURE__ */
|
|
824
|
+
children: [/* @__PURE__ */ K(ce, {
|
|
756
825
|
id: p,
|
|
757
|
-
value: C ?
|
|
826
|
+
value: C ? Wt : m ? n?.isMulti ? a?.filter((e) => m?.includes(e?.value)) : a?.find((e) => e?.value === m) : null,
|
|
758
827
|
onChange: (e) => {
|
|
759
|
-
D && e?.value ===
|
|
828
|
+
D && e?.value === Wt.value && e?.label === Wt.label ? (w(!0), S(""), g("")) : (w(!1), n?.isMulti ? g(e?.map((e) => e?.value)) : g(e?.value));
|
|
760
829
|
},
|
|
761
830
|
onBlur: () => h(),
|
|
762
831
|
options: a,
|
|
763
832
|
isDisabled: _,
|
|
764
833
|
menuPlacement: "auto",
|
|
765
834
|
isClearable: !0,
|
|
766
|
-
...
|
|
767
|
-
...
|
|
835
|
+
...y,
|
|
836
|
+
...n,
|
|
768
837
|
unstyled: !0,
|
|
769
|
-
classNames:
|
|
838
|
+
classNames: Et,
|
|
770
839
|
styles: { menuPortal: (e) => ({
|
|
771
840
|
...e,
|
|
772
841
|
zIndex: 99999999
|
|
773
842
|
}) },
|
|
774
843
|
menuPosition: "fixed",
|
|
775
844
|
menuPortalTarget: i?.current
|
|
776
|
-
}), C && /* @__PURE__ */
|
|
845
|
+
}), C && /* @__PURE__ */ K("div", {
|
|
777
846
|
className: "ldp9z20",
|
|
778
|
-
children: /* @__PURE__ */
|
|
847
|
+
children: /* @__PURE__ */ K(N, {
|
|
779
848
|
name: `select-other-${p}`,
|
|
780
849
|
value: x,
|
|
781
850
|
onChange: (e) => {
|
|
@@ -785,13 +854,13 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
785
854
|
})
|
|
786
855
|
})]
|
|
787
856
|
});
|
|
788
|
-
},
|
|
789
|
-
let t = Z(50),
|
|
790
|
-
t[0] === e ? (
|
|
791
|
-
let { key: o, label: s, helper_text: c, readonly: l } =
|
|
792
|
-
t[4] !==
|
|
857
|
+
}, Kt = "eviv4t0", qt = "eviv4t1", Jt = "eviv4t3", Yt = (e) => {
|
|
858
|
+
let t = Z(50), n, i, a;
|
|
859
|
+
t[0] === e ? (n = t[1], i = t[2], a = t[3]) : ({field: n, settings: a, ...i} = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a);
|
|
860
|
+
let { key: o, label: s, helper_text: c, readonly: l } = n, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f = c === void 0 ? "" : c, p = l === void 0 ? !1 : l, m = u, h = !!n.options?.verification && !!a?.enableVerification, [g, _] = W(null), [y, b] = W(!1), x;
|
|
861
|
+
t[4] !== y || t[5] !== h || t[6] !== g ? (x = (e) => y ? !0 : h && (!g || g !== e) ? "Email verification required" : !0, t[4] = y, t[5] = h, t[6] = g, t[7] = x) : x = t[7];
|
|
793
862
|
let S;
|
|
794
|
-
t[8] !==
|
|
863
|
+
t[8] !== n || t[9] !== x ? (S = r(n, x), t[8] = n, t[9] = x, t[10] = S) : S = t[10];
|
|
795
864
|
let C = S, w;
|
|
796
865
|
t[11] !== m || t[12] !== C ? (w = {
|
|
797
866
|
name: m,
|
|
@@ -799,25 +868,25 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
799
868
|
}, t[11] = m, t[12] = C, t[13] = w) : w = t[13];
|
|
800
869
|
let { field: T, fieldState: D } = $(w), O, k, A, j;
|
|
801
870
|
t[14] === T ? (O = t[15], k = t[16], A = t[17], j = t[18]) : ({value: j, onBlur: k, onChange: A, ...O} = T, t[14] = T, t[15] = O, t[16] = k, t[17] = A, t[18] = j);
|
|
802
|
-
let
|
|
871
|
+
let M = !!n?.required, P = D?.error?.message, F = !!g && !!j && g === j?.trim()?.toLowerCase(), I;
|
|
803
872
|
t[19] === A ? I = t[20] : (I = (e) => {
|
|
804
873
|
_(e), A(e);
|
|
805
874
|
}, t[19] = A, t[20] = I);
|
|
806
875
|
let L = I, R;
|
|
807
|
-
t[21] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */
|
|
876
|
+
t[21] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ K(we, { size: 20 }), t[21] = R) : R = t[21];
|
|
808
877
|
let z;
|
|
809
|
-
t[22] === F ? z = t[23] : (z = F ? /* @__PURE__ */
|
|
878
|
+
t[22] === F ? z = t[23] : (z = F ? /* @__PURE__ */ K("button", {
|
|
810
879
|
type: "button",
|
|
811
880
|
onClick: () => _(null),
|
|
812
|
-
className:
|
|
881
|
+
className: Jt,
|
|
813
882
|
title: "Change email",
|
|
814
|
-
children: /* @__PURE__ */
|
|
883
|
+
children: /* @__PURE__ */ K(Te, { size: 14 })
|
|
815
884
|
}) : null, t[22] = F, t[23] = z);
|
|
816
885
|
let B = j || "", V;
|
|
817
886
|
t[24] === A ? V = t[25] : (V = (e) => A(e?.target?.value?.trim()?.toLocaleLowerCase()), t[24] = A, t[25] = V);
|
|
818
|
-
let H = p || F,
|
|
819
|
-
t[26] !== O || t[27] !== m || t[28] !== k || t[29] !== i || t[30] !== z || t[31] !== B || t[32] !== V || t[33] !== H ? (
|
|
820
|
-
className:
|
|
887
|
+
let H = p || F, U;
|
|
888
|
+
t[26] !== O || t[27] !== m || t[28] !== k || t[29] !== i || t[30] !== z || t[31] !== B || t[32] !== V || t[33] !== H ? (U = /* @__PURE__ */ K(N, {
|
|
889
|
+
className: qt,
|
|
821
890
|
id: m,
|
|
822
891
|
type: "email",
|
|
823
892
|
leftIcon: R,
|
|
@@ -828,50 +897,50 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
828
897
|
readOnly: H,
|
|
829
898
|
...O,
|
|
830
899
|
...i
|
|
831
|
-
}), t[26] = O, t[27] = m, t[28] = k, t[29] = i, t[30] = z, t[31] = B, t[32] = V, t[33] = H, t[34] =
|
|
832
|
-
let
|
|
833
|
-
t[35] !== L || t[36] !== F || t[37] !== h || t[38] !== j ? (
|
|
900
|
+
}), t[26] = O, t[27] = m, t[28] = k, t[29] = i, t[30] = z, t[31] = B, t[32] = V, t[33] = H, t[34] = U) : U = t[34];
|
|
901
|
+
let G;
|
|
902
|
+
t[35] !== L || t[36] !== F || t[37] !== h || t[38] !== j ? (G = h && /* @__PURE__ */ K("div", {
|
|
834
903
|
className: "eviv4t2",
|
|
835
|
-
children: /* @__PURE__ */
|
|
904
|
+
children: /* @__PURE__ */ K(E, {
|
|
836
905
|
value: j,
|
|
837
906
|
type: "email",
|
|
838
907
|
isVerified: F,
|
|
839
908
|
onVerifySuccess: L,
|
|
840
909
|
onStateChange: b
|
|
841
910
|
})
|
|
842
|
-
}), t[35] = L, t[36] = F, t[37] = h, t[38] = j, t[39] =
|
|
911
|
+
}), t[35] = L, t[36] = F, t[37] = h, t[38] = j, t[39] = G) : G = t[39];
|
|
843
912
|
let J;
|
|
844
|
-
t[40] !==
|
|
845
|
-
className:
|
|
846
|
-
children: [
|
|
847
|
-
}), t[40] =
|
|
913
|
+
t[40] !== U || t[41] !== G ? (J = /* @__PURE__ */ q("div", {
|
|
914
|
+
className: Kt,
|
|
915
|
+
children: [U, G]
|
|
916
|
+
}), t[40] = U, t[41] = G, t[42] = J) : J = t[42];
|
|
848
917
|
let Y;
|
|
849
|
-
return t[43] !== P || t[44] !== f || t[45] !==
|
|
918
|
+
return t[43] !== P || t[44] !== f || t[45] !== M || t[46] !== d || t[47] !== m || t[48] !== J ? (Y = /* @__PURE__ */ K(v, {
|
|
850
919
|
error: P,
|
|
851
920
|
helperText: f,
|
|
852
921
|
label: d,
|
|
853
922
|
htmlFor: m,
|
|
854
|
-
isRequired:
|
|
923
|
+
isRequired: M,
|
|
855
924
|
children: J
|
|
856
|
-
}), t[43] = P, t[44] = f, t[45] =
|
|
857
|
-
},
|
|
925
|
+
}), t[43] = P, t[44] = f, t[45] = M, t[46] = d, t[47] = m, t[48] = J, t[49] = Y) : Y = t[49], Y;
|
|
926
|
+
}, Xt = (e) => e ? {
|
|
858
927
|
value: e,
|
|
859
928
|
label: e?.place_name || e?.formatted_address || e?.name
|
|
860
|
-
} : null,
|
|
861
|
-
let { portalRef:
|
|
929
|
+
} : null, Zt = ({ field: e }) => {
|
|
930
|
+
let { portalRef: n } = t(), [i, a] = W(!1), [o, s] = W(!1), c = ae(), { key: l = "", label: u = "", helper_text: d = "", readonly: f = !1 } = e, { field: { value: p, onBlur: m, onChange: h, disabled: g, ..._ }, fieldState: y } = $({
|
|
862
931
|
name: l,
|
|
863
|
-
rules:
|
|
864
|
-
}), b = !!
|
|
932
|
+
rules: r(e)
|
|
933
|
+
}), b = !!e?.required, x = y?.error?.message, S = (e) => {
|
|
865
934
|
e && e?.place_id !== p?.place_id ? (s(!0), c?.fetch.url(`/v1/bevy/content/location/${e?.place_id}/get-location-details`).get().json().then((e) => {
|
|
866
935
|
h && h(e?.content?.data);
|
|
867
936
|
}).catch((e) => {
|
|
868
|
-
console.log("Could not fetch location details:",
|
|
937
|
+
console.log("Could not fetch location details:", ee(e).message);
|
|
869
938
|
}).finally(() => s(!1))) : h(null);
|
|
870
|
-
}, C = (
|
|
939
|
+
}, C = (t, n) => {
|
|
871
940
|
a(!0);
|
|
872
941
|
let r = {};
|
|
873
|
-
|
|
874
|
-
search:
|
|
942
|
+
e?.options?.location_type && (r.location_type = e?.options?.location_type), e?.options?.country && (r.country = e?.options?.country), c?.fetch.url("/v1/bevy/content/location/search-location").post({
|
|
943
|
+
search: t,
|
|
875
944
|
where: r
|
|
876
945
|
}).json().then((e) => {
|
|
877
946
|
n(e?.content?.data?.map((e) => ({
|
|
@@ -882,17 +951,17 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
882
951
|
n([]);
|
|
883
952
|
}).finally(() => a(!1));
|
|
884
953
|
};
|
|
885
|
-
return /* @__PURE__ */
|
|
954
|
+
return /* @__PURE__ */ K(v, {
|
|
886
955
|
error: x,
|
|
887
956
|
helperText: d,
|
|
888
957
|
readOnly: f,
|
|
889
958
|
label: u,
|
|
890
959
|
htmlFor: l,
|
|
891
960
|
isRequired: b,
|
|
892
|
-
children: /* @__PURE__ */
|
|
961
|
+
children: /* @__PURE__ */ K(Me, {
|
|
893
962
|
id: l,
|
|
894
|
-
value:
|
|
895
|
-
defaultOptions: p ? [
|
|
963
|
+
value: Xt(p),
|
|
964
|
+
defaultOptions: p ? [Xt(p)] : void 0,
|
|
896
965
|
onChange: (e) => {
|
|
897
966
|
S(e?.value);
|
|
898
967
|
},
|
|
@@ -901,83 +970,83 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
901
970
|
menuPlacement: "auto",
|
|
902
971
|
..._,
|
|
903
972
|
unstyled: !0,
|
|
904
|
-
classNames:
|
|
973
|
+
classNames: Et,
|
|
905
974
|
styles: { menuPortal: (e) => ({
|
|
906
975
|
...e,
|
|
907
976
|
zIndex: 99999999
|
|
908
977
|
}) },
|
|
909
978
|
menuPosition: "fixed",
|
|
910
|
-
menuPortalTarget:
|
|
979
|
+
menuPortalTarget: n?.current,
|
|
911
980
|
loadOptions: C,
|
|
912
981
|
isLoading: i || o,
|
|
913
982
|
isClearable: !0,
|
|
914
983
|
noOptionsMessage: ({ inputValue: e }) => e ? "No results found. Try searching something else" : "Start typing to search"
|
|
915
984
|
})
|
|
916
985
|
});
|
|
917
|
-
},
|
|
986
|
+
}, Qt = "xgv9uh0", $t = "xgv9uh1", en = "xgv9uh2", tn = "xgv9uh3", nn = "xgv9uh4", rn = "xgv9uh5", an = (e) => {
|
|
918
987
|
let t = Z(29), { field: n } = e, { key: r, label: i } = n, a = r === void 0 ? "" : r, o = i === void 0 ? "" : i, s;
|
|
919
988
|
t[0] === a ? s = t[1] : (s = { name: a }, t[0] = a, t[1] = s);
|
|
920
|
-
let c =
|
|
989
|
+
let c = de(s), l, u, d, f, p, m;
|
|
921
990
|
if (t[2] !== n || t[3] !== a || t[4] !== o || t[5] !== c) {
|
|
922
991
|
let { fields: e, ...r } = c;
|
|
923
|
-
l = r, f =
|
|
992
|
+
l = r, f = Qt, p = a, t[12] !== a || t[13] !== o ? (m = o && /* @__PURE__ */ K(_, {
|
|
924
993
|
htmlFor: a,
|
|
925
994
|
className: "_1ompjs11",
|
|
926
995
|
children: o
|
|
927
|
-
}), t[12] = a, t[13] = o, t[14] = m) : m = t[14], u =
|
|
928
|
-
className:
|
|
929
|
-
children: [/* @__PURE__ */
|
|
930
|
-
className:
|
|
931
|
-
children: /* @__PURE__ */
|
|
996
|
+
}), t[12] = a, t[13] = o, t[14] = m) : m = t[14], u = $t, d = e?.map((e, t) => /* @__PURE__ */ q("div", {
|
|
997
|
+
className: tn,
|
|
998
|
+
children: [/* @__PURE__ */ K("div", {
|
|
999
|
+
className: nn,
|
|
1000
|
+
children: /* @__PURE__ */ K(Zt, { field: {
|
|
932
1001
|
...n,
|
|
933
1002
|
key: `${a}.${t}`,
|
|
934
1003
|
label: ""
|
|
935
1004
|
} })
|
|
936
|
-
}), /* @__PURE__ */
|
|
1005
|
+
}), /* @__PURE__ */ K(y, {
|
|
937
1006
|
variant: "ghost",
|
|
938
1007
|
size: "icon-sm",
|
|
939
|
-
className:
|
|
1008
|
+
className: rn,
|
|
940
1009
|
onClick: () => l.remove(t),
|
|
941
1010
|
"aria-label": `Remove location ${t + 1}`,
|
|
942
|
-
children: /* @__PURE__ */
|
|
1011
|
+
children: /* @__PURE__ */ K(De, { size: 14 })
|
|
943
1012
|
})]
|
|
944
1013
|
}, e.id)), t[2] = n, t[3] = a, t[4] = o, t[5] = c, t[6] = l, t[7] = u, t[8] = d, t[9] = f, t[10] = p, t[11] = m;
|
|
945
1014
|
} else l = t[6], u = t[7], d = t[8], f = t[9], p = t[10], m = t[11];
|
|
946
|
-
let
|
|
947
|
-
t[15] === l ?
|
|
1015
|
+
let h;
|
|
1016
|
+
t[15] === l ? h = t[16] : (h = () => {
|
|
948
1017
|
l.append(null);
|
|
949
|
-
}, t[15] = l, t[16] =
|
|
1018
|
+
}, t[15] = l, t[16] = h);
|
|
1019
|
+
let g;
|
|
1020
|
+
t[17] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ K(Ee, { size: 14 }), t[17] = g) : g = t[17];
|
|
950
1021
|
let v;
|
|
951
|
-
t[
|
|
952
|
-
let y;
|
|
953
|
-
t[18] === _ ? y = t[19] : (y = /* @__PURE__ */ K(h, {
|
|
1022
|
+
t[18] === h ? v = t[19] : (v = /* @__PURE__ */ q(y, {
|
|
954
1023
|
variant: "ghost",
|
|
955
1024
|
size: "xs",
|
|
956
|
-
className:
|
|
957
|
-
onClick:
|
|
958
|
-
children: [
|
|
959
|
-
}), t[18] =
|
|
1025
|
+
className: en,
|
|
1026
|
+
onClick: h,
|
|
1027
|
+
children: [g, "Add"]
|
|
1028
|
+
}), t[18] = h, t[19] = v);
|
|
960
1029
|
let b;
|
|
961
|
-
t[20] !==
|
|
1030
|
+
t[20] !== v || t[21] !== u || t[22] !== d ? (b = /* @__PURE__ */ q("div", {
|
|
962
1031
|
className: u,
|
|
963
|
-
children: [d,
|
|
964
|
-
}), t[20] =
|
|
1032
|
+
children: [d, v]
|
|
1033
|
+
}), t[20] = v, t[21] = u, t[22] = d, t[23] = b) : b = t[23];
|
|
965
1034
|
let x;
|
|
966
|
-
return t[24] !== b || t[25] !== f || t[26] !== p || t[27] !== m ? (x = /* @__PURE__ */
|
|
1035
|
+
return t[24] !== b || t[25] !== f || t[26] !== p || t[27] !== m ? (x = /* @__PURE__ */ q("div", {
|
|
967
1036
|
className: f,
|
|
968
1037
|
children: [m, b]
|
|
969
1038
|
}, p), t[24] = b, t[25] = f, t[26] = p, t[27] = m, t[28] = x) : x = t[28], x;
|
|
970
|
-
},
|
|
971
|
-
let { key: t = "", label:
|
|
1039
|
+
}, on = "a22xph0", sn = "a22xph2", cn = "a22xph3", ln = "a22xph5", un = /[\n\t,]+/, dn = ({ field: e }) => {
|
|
1040
|
+
let { key: t = "", label: n = "", helper_text: i = "", readonly: a = !1 } = e, o = t, { field: { value: s, onChange: c, onBlur: l, ref: u }, fieldState: d } = $({
|
|
972
1041
|
name: o,
|
|
973
|
-
rules:
|
|
974
|
-
}), f = !!e?.required, p = d?.error?.message, m = Array.isArray(s) ? s : [], [h, g] =
|
|
1042
|
+
rules: r(e)
|
|
1043
|
+
}), f = !!e?.required, p = d?.error?.message, m = Array.isArray(s) ? s : [], [h, g] = W(""), [_, y] = W(-1), b = U(null), x = z((e) => {
|
|
975
1044
|
b.current = e, typeof u == "function" && u(e);
|
|
976
|
-
}, [u]), S =
|
|
1045
|
+
}, [u]), S = z((e) => {
|
|
977
1046
|
c(m.filter((t, n) => n !== e));
|
|
978
|
-
}, [m, c]), C =
|
|
1047
|
+
}, [m, c]), C = z(() => {
|
|
979
1048
|
if (!h.trim()) return;
|
|
980
|
-
let e = h.split(
|
|
1049
|
+
let e = h.split(un), t = [...m];
|
|
981
1050
|
for (let n of e) {
|
|
982
1051
|
let e = n.trim();
|
|
983
1052
|
e && !t.includes(e) && t.push(e);
|
|
@@ -987,29 +1056,29 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
987
1056
|
h,
|
|
988
1057
|
m,
|
|
989
1058
|
c
|
|
990
|
-
]), w =
|
|
1059
|
+
]), w = z((e) => {
|
|
991
1060
|
let t = e.currentTarget;
|
|
992
1061
|
switch (e.key) {
|
|
993
1062
|
case "Enter":
|
|
994
1063
|
h.trim() && (e.preventDefault(), C());
|
|
995
1064
|
break;
|
|
996
1065
|
case "Backspace":
|
|
997
|
-
t.selectionStart === 0 && t.selectionEnd === 0 && m.length > 0 && (_ >= 0 ? (S(_),
|
|
1066
|
+
t.selectionStart === 0 && t.selectionEnd === 0 && m.length > 0 && (_ >= 0 ? (S(_), y(_ > 0 ? _ - 1 : -1)) : y(m.length - 1));
|
|
998
1067
|
break;
|
|
999
1068
|
case "Delete":
|
|
1000
|
-
_ >= 0 && _ < m.length && (S(_),
|
|
1069
|
+
_ >= 0 && _ < m.length && (S(_), y(_ < m.length - 1 ? _ : -1));
|
|
1001
1070
|
break;
|
|
1002
1071
|
case "ArrowLeft":
|
|
1003
|
-
t.selectionStart === 0 && m.length > 0 && (e.preventDefault(),
|
|
1072
|
+
t.selectionStart === 0 && m.length > 0 && (e.preventDefault(), y(_ > 0 ? _ - 1 : _ === -1 ? m.length - 1 : 0));
|
|
1004
1073
|
break;
|
|
1005
1074
|
case "ArrowRight":
|
|
1006
|
-
_ >= 0 && (e.preventDefault(), _ < m.length - 1 ?
|
|
1075
|
+
_ >= 0 && (e.preventDefault(), _ < m.length - 1 ? y(_ + 1) : y(-1));
|
|
1007
1076
|
break;
|
|
1008
1077
|
case "Escape":
|
|
1009
|
-
|
|
1078
|
+
y(-1);
|
|
1010
1079
|
break;
|
|
1011
1080
|
default:
|
|
1012
|
-
_ >= 0 &&
|
|
1081
|
+
_ >= 0 && y(-1);
|
|
1013
1082
|
break;
|
|
1014
1083
|
}
|
|
1015
1084
|
}, [
|
|
@@ -1018,39 +1087,39 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1018
1087
|
_,
|
|
1019
1088
|
C,
|
|
1020
1089
|
S
|
|
1021
|
-
]), T =
|
|
1090
|
+
]), T = z((e) => {
|
|
1022
1091
|
let t = e.clipboardData.getData("text");
|
|
1023
|
-
if (
|
|
1092
|
+
if (un.test(t)) {
|
|
1024
1093
|
e.preventDefault();
|
|
1025
|
-
let n = t.split(
|
|
1094
|
+
let n = t.split(un), r = [...m];
|
|
1026
1095
|
for (let e of n) {
|
|
1027
1096
|
let t = e.trim();
|
|
1028
1097
|
t && !r.includes(t) && r.push(t);
|
|
1029
1098
|
}
|
|
1030
1099
|
c(r), g("");
|
|
1031
1100
|
}
|
|
1032
|
-
}, [m, c]), E =
|
|
1033
|
-
b.current?.focus(),
|
|
1034
|
-
}, []), D =
|
|
1035
|
-
C(),
|
|
1101
|
+
}, [m, c]), E = z(() => {
|
|
1102
|
+
b.current?.focus(), y(-1);
|
|
1103
|
+
}, []), D = z(() => {
|
|
1104
|
+
C(), y(-1), l();
|
|
1036
1105
|
}, [C, l]);
|
|
1037
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ K(v, {
|
|
1038
1107
|
error: p,
|
|
1039
1108
|
helperText: i,
|
|
1040
|
-
label:
|
|
1109
|
+
label: n,
|
|
1041
1110
|
htmlFor: o,
|
|
1042
1111
|
isRequired: f,
|
|
1043
|
-
children: /* @__PURE__ */
|
|
1044
|
-
className:
|
|
1112
|
+
children: /* @__PURE__ */ q("div", {
|
|
1113
|
+
className: on,
|
|
1045
1114
|
"data-readonly": a,
|
|
1046
1115
|
onClick: E,
|
|
1047
|
-
children: [m.map((e, t) => /* @__PURE__ */
|
|
1048
|
-
className:
|
|
1116
|
+
children: [m.map((e, t) => /* @__PURE__ */ q("span", {
|
|
1117
|
+
className: sn,
|
|
1049
1118
|
"data-active": _ === t,
|
|
1050
|
-
children: [/* @__PURE__ */
|
|
1051
|
-
className:
|
|
1119
|
+
children: [/* @__PURE__ */ K("span", {
|
|
1120
|
+
className: cn,
|
|
1052
1121
|
children: e
|
|
1053
|
-
}), !a && /* @__PURE__ */
|
|
1122
|
+
}), !a && /* @__PURE__ */ K("button", {
|
|
1054
1123
|
type: "button",
|
|
1055
1124
|
className: "a22xph4",
|
|
1056
1125
|
onClick: (e) => {
|
|
@@ -1058,12 +1127,12 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1058
1127
|
},
|
|
1059
1128
|
"aria-label": `Remove ${e}`,
|
|
1060
1129
|
tabIndex: -1,
|
|
1061
|
-
children: /* @__PURE__ */
|
|
1130
|
+
children: /* @__PURE__ */ K(ke, { size: 12 })
|
|
1062
1131
|
})]
|
|
1063
|
-
}, `${e}-${t}`)), /* @__PURE__ */
|
|
1132
|
+
}, `${e}-${t}`)), /* @__PURE__ */ K("input", {
|
|
1064
1133
|
ref: x,
|
|
1065
1134
|
id: o,
|
|
1066
|
-
className:
|
|
1135
|
+
className: ln,
|
|
1067
1136
|
type: "text",
|
|
1068
1137
|
value: h,
|
|
1069
1138
|
onChange: (e) => g(e.target.value),
|
|
@@ -1077,91 +1146,91 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1077
1146
|
})]
|
|
1078
1147
|
})
|
|
1079
1148
|
});
|
|
1080
|
-
},
|
|
1149
|
+
}, fn = "jqes4z0", pn = "jqes4z2", mn = "jqes4z3", hn = "_1mrsmih0", gn = "_1mrsmih1", _n = "_1mrsmih2", vn = "_1mrsmih3", yn = (e) => {
|
|
1081
1150
|
let t = Z(8), n, r;
|
|
1082
1151
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1083
1152
|
let i;
|
|
1084
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
1153
|
+
t[3] === n ? i = t[4] : (i = Q(hn, n), t[3] = n, t[4] = i);
|
|
1085
1154
|
let a;
|
|
1086
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
1155
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ K(Pe, {
|
|
1087
1156
|
"data-slot": "radio-group",
|
|
1088
1157
|
className: i,
|
|
1089
1158
|
...r
|
|
1090
1159
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
1091
|
-
},
|
|
1160
|
+
}, bn = (e) => {
|
|
1092
1161
|
let t = Z(9), n, r;
|
|
1093
1162
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1094
1163
|
let i;
|
|
1095
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
1164
|
+
t[3] === n ? i = t[4] : (i = Q(gn, n), t[3] = n, t[4] = i);
|
|
1096
1165
|
let a;
|
|
1097
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
1166
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ K(Ne.Indicator, {
|
|
1098
1167
|
"data-slot": "radio-group-indicator",
|
|
1099
|
-
className:
|
|
1100
|
-
children: /* @__PURE__ */
|
|
1168
|
+
className: _n,
|
|
1169
|
+
children: /* @__PURE__ */ K("span", { className: vn })
|
|
1101
1170
|
}), t[5] = a) : a = t[5];
|
|
1102
1171
|
let o;
|
|
1103
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
1172
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ K(Ne.Root, {
|
|
1104
1173
|
"data-slot": "radio-group-item",
|
|
1105
1174
|
className: i,
|
|
1106
1175
|
...r,
|
|
1107
1176
|
children: a
|
|
1108
1177
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
1109
|
-
},
|
|
1110
|
-
let t = Z(53), { field:
|
|
1178
|
+
}, xn = (e) => {
|
|
1179
|
+
let t = Z(53), { field: n } = e, [i, a] = P.useState(""), [o, s] = P.useState(!1), { key: c, label: l, helper_text: u, readonly: d, values: f, options: p } = n, m = c === void 0 ? "" : c, h = l === void 0 ? "" : l, g = u === void 0 ? "" : u, y = d === void 0 ? !1 : d, b;
|
|
1111
1180
|
t[0] === f ? b = t[1] : (b = f === void 0 ? [] : f, t[0] = f, t[1] = b);
|
|
1112
1181
|
let x = b, S;
|
|
1113
1182
|
t[2] === p ? S = t[3] : (S = p === void 0 ? {} : p, t[2] = p, t[3] = S);
|
|
1114
1183
|
let { custom_input: C } = S, w = m, T;
|
|
1115
|
-
t[4] ===
|
|
1184
|
+
t[4] === n ? T = t[5] : (T = r(n), t[4] = n, t[5] = T);
|
|
1116
1185
|
let E;
|
|
1117
1186
|
t[6] !== w || t[7] !== T ? (E = {
|
|
1118
1187
|
name: w,
|
|
1119
1188
|
rules: T
|
|
1120
1189
|
}, t[6] = w, t[7] = T, t[8] = E) : E = t[8];
|
|
1121
|
-
let { field: D, fieldState: O } = $(E), k, A, j,
|
|
1122
|
-
t[9] === D ? (k = t[10], A = t[11], j = t[12],
|
|
1123
|
-
let F = !!
|
|
1124
|
-
t[14] !== o || t[15] !==
|
|
1125
|
-
o ||
|
|
1126
|
-
}, t[14] = o, t[15] =
|
|
1190
|
+
let { field: D, fieldState: O } = $(E), k, A, j, M;
|
|
1191
|
+
t[9] === D ? (k = t[10], A = t[11], j = t[12], M = t[13]) : ({value: M, onBlur: k, onChange: A, ...j} = D, t[9] = D, t[10] = k, t[11] = A, t[12] = j, t[13] = M);
|
|
1192
|
+
let F = !!n?.required, I = O?.error?.message, L;
|
|
1193
|
+
t[14] !== o || t[15] !== M || t[16] !== x ? (L = () => {
|
|
1194
|
+
o || M && x?.findIndex((e) => e === M) === -1 && (s(!0), a(M));
|
|
1195
|
+
}, t[14] = o, t[15] = M, t[16] = x, t[17] = L) : L = t[17];
|
|
1127
1196
|
let R;
|
|
1128
|
-
t[18] ===
|
|
1129
|
-
let z =
|
|
1130
|
-
t[20] === z ? B = t[21] : (B = Q(
|
|
1197
|
+
t[18] === M ? R = t[19] : (R = [M], t[18] = M, t[19] = R), P.useEffect(L, R);
|
|
1198
|
+
let z = y && "jqes4z1", B;
|
|
1199
|
+
t[20] === z ? B = t[21] : (B = Q(fn, z), t[20] = z, t[21] = B);
|
|
1131
1200
|
let V;
|
|
1132
1201
|
t[22] !== A || t[23] !== i ? (V = (e) => {
|
|
1133
1202
|
A && (e === "Other" ? (s(!0), A(i)) : (s(!1), A(e)));
|
|
1134
1203
|
}, t[22] = A, t[23] = i, t[24] = V) : V = t[24];
|
|
1135
1204
|
let H;
|
|
1136
1205
|
t[25] === k ? H = t[26] : (H = () => k(), t[25] = k, t[26] = H);
|
|
1137
|
-
let U = o ? "Other" :
|
|
1138
|
-
t[27] !== w || t[28] !== x ? (W = x?.map((e, t) => /* @__PURE__ */
|
|
1139
|
-
className:
|
|
1140
|
-
children: [/* @__PURE__ */
|
|
1206
|
+
let U = o ? "Other" : M ?? "", W;
|
|
1207
|
+
t[27] !== w || t[28] !== x ? (W = x?.map((e, t) => /* @__PURE__ */ q("div", {
|
|
1208
|
+
className: pn,
|
|
1209
|
+
children: [/* @__PURE__ */ K(bn, {
|
|
1141
1210
|
id: `${w}-${e}-${t}`,
|
|
1142
1211
|
value: e
|
|
1143
|
-
}), /* @__PURE__ */
|
|
1212
|
+
}), /* @__PURE__ */ K(_, {
|
|
1144
1213
|
htmlFor: `${w}-${e}-${t}`,
|
|
1145
|
-
className:
|
|
1214
|
+
className: mn,
|
|
1146
1215
|
children: e
|
|
1147
1216
|
})]
|
|
1148
1217
|
}, `${e}-${t}`)), t[27] = w, t[28] = x, t[29] = W) : W = t[29];
|
|
1149
|
-
let
|
|
1150
|
-
t[30] !== C || t[31] !== w || t[32] !== A || t[33] !== o || t[34] !== i ? (
|
|
1218
|
+
let G;
|
|
1219
|
+
t[30] !== C || t[31] !== w || t[32] !== A || t[33] !== o || t[34] !== i ? (G = !!C && /* @__PURE__ */ q("div", {
|
|
1151
1220
|
className: "jqes4z4",
|
|
1152
1221
|
children: [
|
|
1153
|
-
/* @__PURE__ */
|
|
1222
|
+
/* @__PURE__ */ K(bn, {
|
|
1154
1223
|
id: `${w}-other`,
|
|
1155
1224
|
value: "Other"
|
|
1156
1225
|
}),
|
|
1157
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ K(_, {
|
|
1158
1227
|
className: "jqes4z3",
|
|
1159
1228
|
htmlFor: `${w}-other`,
|
|
1160
1229
|
children: "Other:"
|
|
1161
1230
|
}),
|
|
1162
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ K("div", {
|
|
1163
1232
|
className: "jqes4z6",
|
|
1164
|
-
children: /* @__PURE__ */
|
|
1233
|
+
children: /* @__PURE__ */ K(N, {
|
|
1165
1234
|
className: "jqes4z5",
|
|
1166
1235
|
name: `radio-other-${w}`,
|
|
1167
1236
|
value: i,
|
|
@@ -1173,28 +1242,28 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1173
1242
|
})
|
|
1174
1243
|
})
|
|
1175
1244
|
]
|
|
1176
|
-
}), t[30] = C, t[31] = w, t[32] = A, t[33] = o, t[34] = i, t[35] =
|
|
1245
|
+
}), t[30] = C, t[31] = w, t[32] = A, t[33] = o, t[34] = i, t[35] = G) : G = t[35];
|
|
1177
1246
|
let J;
|
|
1178
|
-
t[36] !== w || t[37] !== j || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U || t[42] !== W || t[43] !==
|
|
1247
|
+
t[36] !== w || t[37] !== j || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U || t[42] !== W || t[43] !== G ? (J = /* @__PURE__ */ q(yn, {
|
|
1179
1248
|
id: w,
|
|
1180
1249
|
className: B,
|
|
1181
1250
|
onValueChange: V,
|
|
1182
1251
|
onBlur: H,
|
|
1183
1252
|
value: U,
|
|
1184
1253
|
...j,
|
|
1185
|
-
children: [W,
|
|
1186
|
-
}), t[36] = w, t[37] = j, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = W, t[43] =
|
|
1254
|
+
children: [W, G]
|
|
1255
|
+
}), t[36] = w, t[37] = j, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = W, t[43] = G, t[44] = J) : J = t[44];
|
|
1187
1256
|
let Y;
|
|
1188
|
-
return t[45] !== I || t[46] !==
|
|
1257
|
+
return t[45] !== I || t[46] !== g || t[47] !== F || t[48] !== h || t[49] !== w || t[50] !== y || t[51] !== J ? (Y = /* @__PURE__ */ K(v, {
|
|
1189
1258
|
error: I,
|
|
1190
|
-
helperText:
|
|
1191
|
-
readOnly:
|
|
1259
|
+
helperText: g,
|
|
1260
|
+
readOnly: y,
|
|
1192
1261
|
label: h,
|
|
1193
1262
|
htmlFor: w,
|
|
1194
1263
|
isRequired: F,
|
|
1195
1264
|
children: J
|
|
1196
|
-
}), t[45] = I, t[46] =
|
|
1197
|
-
},
|
|
1265
|
+
}), t[45] = I, t[46] = g, t[47] = F, t[48] = h, t[49] = w, t[50] = y, t[51] = J, t[52] = Y) : Y = t[52], Y;
|
|
1266
|
+
}, Sn = "i9l98i0", Cn = oe({
|
|
1198
1267
|
defaultClassName: "_193nrs70",
|
|
1199
1268
|
variantClassNames: { size: {
|
|
1200
1269
|
default: "_193nrs71",
|
|
@@ -1202,41 +1271,41 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1202
1271
|
} },
|
|
1203
1272
|
defaultVariants: { size: "default" },
|
|
1204
1273
|
compoundVariants: []
|
|
1205
|
-
}),
|
|
1274
|
+
}), wn = "_193nrs73", Tn = "_193nrs74", En = "_193nrs75", Dn = (e) => {
|
|
1206
1275
|
let t = Z(15), n, r, i;
|
|
1207
1276
|
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);
|
|
1208
1277
|
let a = i === void 0 ? "default" : i, o;
|
|
1209
|
-
t[4] !== n || t[5] !== a ? (o = Q(
|
|
1210
|
-
let s = a === "sm" ?
|
|
1211
|
-
t[7] === s ? c = t[8] : (c = Q(
|
|
1278
|
+
t[4] !== n || t[5] !== a ? (o = Q(Cn({ size: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
1279
|
+
let s = a === "sm" ? En : Tn, c;
|
|
1280
|
+
t[7] === s ? c = t[8] : (c = Q(wn, s), t[7] = s, t[8] = c);
|
|
1212
1281
|
let l;
|
|
1213
|
-
t[9] === c ? l = t[10] : (l = /* @__PURE__ */
|
|
1282
|
+
t[9] === c ? l = t[10] : (l = /* @__PURE__ */ K(Fe.Thumb, {
|
|
1214
1283
|
"data-slot": "switch-thumb",
|
|
1215
1284
|
className: c
|
|
1216
1285
|
}), t[9] = c, t[10] = l);
|
|
1217
1286
|
let u;
|
|
1218
|
-
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */
|
|
1287
|
+
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */ K(Fe.Root, {
|
|
1219
1288
|
"data-slot": "switch",
|
|
1220
1289
|
className: o,
|
|
1221
1290
|
...r,
|
|
1222
1291
|
children: l
|
|
1223
1292
|
}), t[11] = r, t[12] = o, t[13] = l, t[14] = u) : u = t[14], u;
|
|
1224
|
-
},
|
|
1225
|
-
let t = Z(32), { field:
|
|
1226
|
-
t[0] ===
|
|
1293
|
+
}, On = (e) => {
|
|
1294
|
+
let t = Z(32), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f = c, p;
|
|
1295
|
+
t[0] === n ? p = t[1] : (p = r(n), t[0] = n, t[1] = p);
|
|
1227
1296
|
let m;
|
|
1228
1297
|
t[2] !== f || t[3] !== p ? (m = {
|
|
1229
1298
|
name: f,
|
|
1230
1299
|
rules: p
|
|
1231
1300
|
}, t[2] = f, t[3] = p, t[4] = m) : m = t[4];
|
|
1232
|
-
let { field: h, fieldState:
|
|
1233
|
-
t[5] === h ? (
|
|
1234
|
-
let C = !!
|
|
1301
|
+
let { field: h, fieldState: _ } = $(m), y, b, x, S;
|
|
1302
|
+
t[5] === h ? (y = t[6], b = t[7], x = t[8], S = t[9]) : ({value: S, onBlur: y, onChange: b, ...x} = h, t[5] = h, t[6] = y, t[7] = b, t[8] = x, t[9] = S);
|
|
1303
|
+
let C = !!n?.required, w = _?.error?.message, T = !!S, E;
|
|
1235
1304
|
t[10] === b ? E = t[11] : (E = (e) => b?.(e), t[10] = b, t[11] = E);
|
|
1236
1305
|
let D;
|
|
1237
|
-
t[12] ===
|
|
1306
|
+
t[12] === y ? D = t[13] : (D = () => y?.(), t[12] = y, t[13] = D);
|
|
1238
1307
|
let O;
|
|
1239
|
-
t[14] !== f || t[15] !== x || t[16] !== D || t[17] !== T || t[18] !== E ? (O = /* @__PURE__ */
|
|
1308
|
+
t[14] !== f || t[15] !== x || t[16] !== D || t[17] !== T || t[18] !== E ? (O = /* @__PURE__ */ K(Dn, {
|
|
1240
1309
|
id: f,
|
|
1241
1310
|
checked: T,
|
|
1242
1311
|
onCheckedChange: E,
|
|
@@ -1244,37 +1313,37 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1244
1313
|
...x
|
|
1245
1314
|
}), t[14] = f, t[15] = x, t[16] = D, t[17] = T, t[18] = E, t[19] = O) : O = t[19];
|
|
1246
1315
|
let k;
|
|
1247
|
-
t[20] !== C || t[21] !== l || t[22] !== f ? (k = /* @__PURE__ */
|
|
1316
|
+
t[20] !== C || t[21] !== l || t[22] !== f ? (k = /* @__PURE__ */ K(g, {
|
|
1248
1317
|
label: l,
|
|
1249
1318
|
isRequired: C,
|
|
1250
1319
|
htmlFor: f
|
|
1251
1320
|
}), t[20] = C, t[21] = l, t[22] = f, t[23] = k) : k = t[23];
|
|
1252
1321
|
let A;
|
|
1253
|
-
t[24] !== O || t[25] !== k ? (A = /* @__PURE__ */
|
|
1254
|
-
className:
|
|
1322
|
+
t[24] !== O || t[25] !== k ? (A = /* @__PURE__ */ q("div", {
|
|
1323
|
+
className: Sn,
|
|
1255
1324
|
children: [O, k]
|
|
1256
1325
|
}), t[24] = O, t[25] = k, t[26] = A) : A = t[26];
|
|
1257
1326
|
let j;
|
|
1258
|
-
return t[27] !== w || t[28] !== u || t[29] !== d || t[30] !== A ? (j = /* @__PURE__ */
|
|
1327
|
+
return t[27] !== w || t[28] !== u || t[29] !== d || t[30] !== A ? (j = /* @__PURE__ */ K(v, {
|
|
1259
1328
|
error: w,
|
|
1260
1329
|
helperText: u,
|
|
1261
1330
|
readOnly: d,
|
|
1262
1331
|
children: A
|
|
1263
1332
|
}), t[27] = w, t[28] = u, t[29] = d, t[30] = A, t[31] = j) : j = t[31], j;
|
|
1264
|
-
},
|
|
1265
|
-
let t = Z(29), { field:
|
|
1266
|
-
t[0] ===
|
|
1333
|
+
}, kn = "gaaqp00", An = (e) => {
|
|
1334
|
+
let t = Z(29), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f = c, p = !!n?.required, m;
|
|
1335
|
+
t[0] === n ? m = t[1] : (m = r(n), t[0] = n, t[1] = m);
|
|
1267
1336
|
let h;
|
|
1268
1337
|
t[2] !== f || t[3] !== m ? (h = {
|
|
1269
1338
|
name: f,
|
|
1270
1339
|
rules: m
|
|
1271
1340
|
}, t[2] = f, t[3] = m, t[4] = h) : h = t[4];
|
|
1272
|
-
let { field: g, fieldState: _ } = $(h),
|
|
1273
|
-
t[5] === g ? (
|
|
1341
|
+
let { field: g, fieldState: _ } = $(h), y, b, x, S, C, w;
|
|
1342
|
+
t[5] === g ? (y = t[6], b = t[7], x = t[8], S = t[9], C = t[10], w = t[11]) : ({value: w, onBlur: b, onChange: x, ref: S, disabled: y, ...C} = g, t[5] = g, t[6] = y, t[7] = b, t[8] = x, t[9] = S, t[10] = C, t[11] = w);
|
|
1274
1343
|
let T = _?.error?.message, E;
|
|
1275
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (E = Q(
|
|
1344
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (E = Q(kn), t[12] = E) : E = t[12];
|
|
1276
1345
|
let D = w || "", O;
|
|
1277
|
-
t[13] !==
|
|
1346
|
+
t[13] !== y || t[14] !== f || t[15] !== b || t[16] !== x || t[17] !== d || t[18] !== S || t[19] !== C || t[20] !== D ? (O = /* @__PURE__ */ K(j, {
|
|
1278
1347
|
id: f,
|
|
1279
1348
|
className: E,
|
|
1280
1349
|
readOnly: d,
|
|
@@ -1282,11 +1351,11 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1282
1351
|
onChange: x,
|
|
1283
1352
|
onBlur: b,
|
|
1284
1353
|
ref: S,
|
|
1285
|
-
disabled:
|
|
1354
|
+
disabled: y,
|
|
1286
1355
|
...C
|
|
1287
|
-
}), t[13] =
|
|
1356
|
+
}), t[13] = y, t[14] = f, t[15] = b, t[16] = x, t[17] = d, t[18] = S, t[19] = C, t[20] = D, t[21] = O) : O = t[21];
|
|
1288
1357
|
let k;
|
|
1289
|
-
return t[22] !== T || t[23] !== u || t[24] !== p || t[25] !== l || t[26] !== f || t[27] !== O ? (k = /* @__PURE__ */
|
|
1358
|
+
return t[22] !== T || t[23] !== u || t[24] !== p || t[25] !== l || t[26] !== f || t[27] !== O ? (k = /* @__PURE__ */ K(v, {
|
|
1290
1359
|
error: T,
|
|
1291
1360
|
helperText: u,
|
|
1292
1361
|
label: l,
|
|
@@ -1294,22 +1363,22 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1294
1363
|
isRequired: p,
|
|
1295
1364
|
children: O
|
|
1296
1365
|
}), t[22] = T, t[23] = u, t[24] = p, t[25] = l, t[26] = f, t[27] = O, t[28] = k) : k = t[28], k;
|
|
1297
|
-
},
|
|
1298
|
-
let t = Z(36),
|
|
1299
|
-
t[0] === e ? (
|
|
1300
|
-
let { key: o, label: s, helper_text: c, readonly: l } =
|
|
1301
|
-
t[4] ===
|
|
1366
|
+
}, jn = (e) => {
|
|
1367
|
+
let t = Z(36), n, i, a;
|
|
1368
|
+
t[0] === e ? (n = t[1], i = t[2], a = t[3]) : ({field: n, inputStyles: a, ...i} = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a);
|
|
1369
|
+
let { key: o, label: s, helper_text: c, readonly: l } = n, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f = c === void 0 ? "" : c, p = l === void 0 ? !1 : l, m = u, h = !!n?.required, g;
|
|
1370
|
+
t[4] === n ? g = t[5] : (g = r(n), t[4] = n, t[5] = g);
|
|
1302
1371
|
let _;
|
|
1303
1372
|
t[6] !== m || t[7] !== g ? (_ = {
|
|
1304
1373
|
name: m,
|
|
1305
1374
|
rules: g
|
|
1306
1375
|
}, t[6] = m, t[7] = g, t[8] = _) : _ = t[8];
|
|
1307
|
-
let { field:
|
|
1308
|
-
t[9] ===
|
|
1376
|
+
let { field: y, fieldState: b } = $(_), x, S, C, w, T, E;
|
|
1377
|
+
t[9] === y ? (x = t[10], S = t[11], C = t[12], w = t[13], T = t[14], E = t[15]) : ({value: E, onBlur: S, onChange: C, ref: w, disabled: x, ...T} = y, t[9] = y, t[10] = x, t[11] = S, t[12] = C, t[13] = w, t[14] = T, t[15] = E);
|
|
1309
1378
|
let D = b?.error?.message, O;
|
|
1310
1379
|
t[16] === a ? O = t[17] : (O = Q(a), t[16] = a, t[17] = O);
|
|
1311
1380
|
let k = E || "", A;
|
|
1312
|
-
t[18] !== x || t[19] !== i || t[20] !== m || t[21] !== S || t[22] !== C || t[23] !== p || t[24] !== w || t[25] !== T || t[26] !== O || t[27] !== k ? (A = /* @__PURE__ */
|
|
1381
|
+
t[18] !== x || t[19] !== i || t[20] !== m || t[21] !== S || t[22] !== C || t[23] !== p || t[24] !== w || t[25] !== T || t[26] !== O || t[27] !== k ? (A = /* @__PURE__ */ K(N, {
|
|
1313
1382
|
id: m,
|
|
1314
1383
|
className: O,
|
|
1315
1384
|
readOnly: p,
|
|
@@ -1322,7 +1391,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1322
1391
|
...i
|
|
1323
1392
|
}), t[18] = x, t[19] = i, t[20] = m, t[21] = S, t[22] = C, t[23] = p, t[24] = w, t[25] = T, t[26] = O, t[27] = k, t[28] = A) : A = t[28];
|
|
1324
1393
|
let j;
|
|
1325
|
-
return t[29] !== D || t[30] !== f || t[31] !== h || t[32] !== d || t[33] !== m || t[34] !== A ? (j = /* @__PURE__ */
|
|
1394
|
+
return t[29] !== D || t[30] !== f || t[31] !== h || t[32] !== d || t[33] !== m || t[34] !== A ? (j = /* @__PURE__ */ K(v, {
|
|
1326
1395
|
error: D,
|
|
1327
1396
|
helperText: f,
|
|
1328
1397
|
label: d,
|
|
@@ -1330,18 +1399,18 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1330
1399
|
isRequired: h,
|
|
1331
1400
|
children: A
|
|
1332
1401
|
}), t[29] = D, t[30] = f, t[31] = h, t[32] = d, t[33] = m, t[34] = A, t[35] = j) : j = t[35], j;
|
|
1333
|
-
},
|
|
1334
|
-
let t = Z(27), { field:
|
|
1335
|
-
t[0] ===
|
|
1402
|
+
}, Mn = (e) => {
|
|
1403
|
+
let t = Z(27), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f = c, p;
|
|
1404
|
+
t[0] === n ? p = t[1] : (p = r(n), t[0] = n, t[1] = p);
|
|
1336
1405
|
let m;
|
|
1337
1406
|
t[2] !== f || t[3] !== p ? (m = {
|
|
1338
1407
|
name: f,
|
|
1339
1408
|
rules: p
|
|
1340
1409
|
}, t[2] = f, t[3] = p, t[4] = m) : m = t[4];
|
|
1341
|
-
let { field: h, fieldState: g } = $(m), { value: _, onBlur:
|
|
1410
|
+
let { field: h, fieldState: g } = $(m), { value: _, onBlur: y, onChange: b, ref: x } = h, S = !!n?.required, C = g?.error?.message, w = _ || "", T;
|
|
1342
1411
|
t[5] === b ? T = t[6] : (T = (e) => b(e.target.value || null), t[5] = b, t[6] = T);
|
|
1343
1412
|
let E;
|
|
1344
|
-
t[7] !== b || t[8] !== d || t[9] !== _ ? (E = _ && !d ? /* @__PURE__ */
|
|
1413
|
+
t[7] !== b || t[8] !== d || t[9] !== _ ? (E = _ && !d ? /* @__PURE__ */ K("button", {
|
|
1345
1414
|
type: "button",
|
|
1346
1415
|
onClick: (e) => {
|
|
1347
1416
|
e.preventDefault(), e.stopPropagation(), b(null);
|
|
@@ -1354,21 +1423,21 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1354
1423
|
padding: 0
|
|
1355
1424
|
},
|
|
1356
1425
|
"aria-label": "Clear time",
|
|
1357
|
-
children: /* @__PURE__ */
|
|
1426
|
+
children: /* @__PURE__ */ K(ke, { size: 16 })
|
|
1358
1427
|
}) : void 0, t[7] = b, t[8] = d, t[9] = _, t[10] = E) : E = t[10];
|
|
1359
1428
|
let D;
|
|
1360
|
-
t[11] !== f || t[12] !==
|
|
1429
|
+
t[11] !== f || t[12] !== y || t[13] !== d || t[14] !== x || t[15] !== E || t[16] !== w || t[17] !== T ? (D = /* @__PURE__ */ K(N, {
|
|
1361
1430
|
id: f,
|
|
1362
1431
|
ref: x,
|
|
1363
1432
|
type: "time",
|
|
1364
1433
|
value: w,
|
|
1365
1434
|
onChange: T,
|
|
1366
|
-
onBlur:
|
|
1435
|
+
onBlur: y,
|
|
1367
1436
|
readOnly: d,
|
|
1368
1437
|
rightIcon: E
|
|
1369
|
-
}), t[11] = f, t[12] =
|
|
1438
|
+
}), t[11] = f, t[12] = y, t[13] = d, t[14] = x, t[15] = E, t[16] = w, t[17] = T, t[18] = D) : D = t[18];
|
|
1370
1439
|
let O;
|
|
1371
|
-
return t[19] !== C || t[20] !== u || t[21] !== S || t[22] !== l || t[23] !== f || t[24] !== d || t[25] !== D ? (O = /* @__PURE__ */
|
|
1440
|
+
return t[19] !== C || t[20] !== u || t[21] !== S || t[22] !== l || t[23] !== f || t[24] !== d || t[25] !== D ? (O = /* @__PURE__ */ K(v, {
|
|
1372
1441
|
helperText: u,
|
|
1373
1442
|
readOnly: d,
|
|
1374
1443
|
error: C,
|
|
@@ -1377,50 +1446,50 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1377
1446
|
label: l,
|
|
1378
1447
|
children: D
|
|
1379
1448
|
}), t[19] = C, t[20] = u, t[21] = S, t[22] = l, t[23] = f, t[24] = d, t[25] = D, t[26] = O) : O = t[26], O;
|
|
1380
|
-
},
|
|
1381
|
-
let t = Z(28), { field:
|
|
1382
|
-
t[0] ===
|
|
1449
|
+
}, Nn = "_3j2y9l0", Pn = (e) => {
|
|
1450
|
+
let t = Z(28), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f;
|
|
1451
|
+
t[0] === n ? f = t[1] : (f = r(n), t[0] = n, t[1] = f);
|
|
1383
1452
|
let p;
|
|
1384
1453
|
t[2] !== c || t[3] !== f ? (p = {
|
|
1385
1454
|
name: c,
|
|
1386
1455
|
rules: f
|
|
1387
1456
|
}, t[2] = c, t[3] = f, t[4] = p) : p = t[4];
|
|
1388
|
-
let { field: m, fieldState: h } = $(p), { name:
|
|
1457
|
+
let { field: m, fieldState: h } = $(p), { name: g, onBlur: y, onChange: b, ref: x, value: S, disabled: C } = m, { error: w } = h, T = w?.message, E = !!S, D;
|
|
1389
1458
|
t[5] === b ? D = t[6] : (D = (e) => b(e), t[5] = b, t[6] = D);
|
|
1390
1459
|
let O;
|
|
1391
|
-
t[7] ===
|
|
1460
|
+
t[7] === y ? O = t[8] : (O = () => y(), t[7] = y, t[8] = O);
|
|
1392
1461
|
let k;
|
|
1393
|
-
t[9] !== C || t[10] !==
|
|
1394
|
-
id:
|
|
1395
|
-
name:
|
|
1462
|
+
t[9] !== C || t[10] !== g || t[11] !== E || t[12] !== D || t[13] !== O ? (k = /* @__PURE__ */ K(zt, {
|
|
1463
|
+
id: g,
|
|
1464
|
+
name: g,
|
|
1396
1465
|
checked: E,
|
|
1397
1466
|
onCheckedChange: D,
|
|
1398
1467
|
onBlur: O,
|
|
1399
1468
|
disabled: C
|
|
1400
|
-
}), t[9] = C, t[10] =
|
|
1469
|
+
}), t[9] = C, t[10] = g, t[11] = E, t[12] = D, t[13] = O, t[14] = k) : k = t[14];
|
|
1401
1470
|
let A;
|
|
1402
|
-
t[15] !==
|
|
1403
|
-
htmlFor:
|
|
1471
|
+
t[15] !== n.required || t[16] !== l || t[17] !== g ? (A = l && /* @__PURE__ */ q(_, {
|
|
1472
|
+
htmlFor: g,
|
|
1404
1473
|
className: "_3j2y9l1",
|
|
1405
|
-
children: [l,
|
|
1474
|
+
children: [l, n?.required && /* @__PURE__ */ K("span", {
|
|
1406
1475
|
className: "_1ompjs10",
|
|
1407
1476
|
children: "*"
|
|
1408
1477
|
})]
|
|
1409
|
-
}), t[15] =
|
|
1478
|
+
}), t[15] = n.required, t[16] = l, t[17] = g, t[18] = A) : A = t[18];
|
|
1410
1479
|
let j;
|
|
1411
|
-
t[19] !== x || t[20] !== k || t[21] !== A ? (j = /* @__PURE__ */
|
|
1412
|
-
className:
|
|
1480
|
+
t[19] !== x || t[20] !== k || t[21] !== A ? (j = /* @__PURE__ */ q("div", {
|
|
1481
|
+
className: Nn,
|
|
1413
1482
|
ref: x,
|
|
1414
1483
|
children: [k, A]
|
|
1415
1484
|
}), t[19] = x, t[20] = k, t[21] = A, t[22] = j) : j = t[22];
|
|
1416
1485
|
let M;
|
|
1417
|
-
return t[23] !== u || t[24] !== d || t[25] !== j || t[26] !== T ? (M = /* @__PURE__ */
|
|
1486
|
+
return t[23] !== u || t[24] !== d || t[25] !== j || t[26] !== T ? (M = /* @__PURE__ */ K(v, {
|
|
1418
1487
|
error: T,
|
|
1419
1488
|
helperText: u,
|
|
1420
1489
|
readOnly: d,
|
|
1421
1490
|
children: j
|
|
1422
1491
|
}), t[23] = u, t[24] = d, t[25] = j, t[26] = T, t[27] = M) : M = t[27], M;
|
|
1423
|
-
},
|
|
1492
|
+
}, Fn = "_11lzwkh0", In = "_11lzwkh2", Ln = "_11lzwkh3", Rn = "_11lzwkh4", zn = "_11lzwkh5", Bn = "_11lzwkh9", Vn = "_11lzwkha", Hn = (e) => {
|
|
1424
1493
|
let t = Z(31), { file: n, onDelete: r, onClick: i, showCheckbox: a, isSelected: o, showDelete: s } = e, c = a === void 0 ? !1 : a, l = o === void 0 ? !1 : o, u = s === void 0 ? !0 : s, d;
|
|
1425
1494
|
t[0] !== n || t[1] !== r ? (d = (e) => {
|
|
1426
1495
|
e.stopPropagation(), e.preventDefault(), r?.(n.id);
|
|
@@ -1433,49 +1502,49 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1433
1502
|
}
|
|
1434
1503
|
n?.location || e.preventDefault();
|
|
1435
1504
|
}, t[3] = n, t[4] = i, t[5] = p) : p = t[5];
|
|
1436
|
-
let m = p,
|
|
1437
|
-
t[6] !== n?.filename || t[7] !== n?.location ? (
|
|
1438
|
-
let
|
|
1439
|
-
t[9] ===
|
|
1505
|
+
let m = p, h;
|
|
1506
|
+
t[6] !== n?.filename || t[7] !== n?.location ? (h = n?.filename || n?.location?.split("/")?.[n?.location?.split("/").length - 1], t[6] = n?.filename, t[7] = n?.location, t[8] = h) : h = t[8];
|
|
1507
|
+
let g = h, _ = n?.location || void 0, v = l && "_11lzwkh1", b;
|
|
1508
|
+
t[9] === v ? b = t[10] : (b = Q(Fn, v), t[9] = v, t[10] = b);
|
|
1440
1509
|
let x;
|
|
1441
|
-
t[11] !== n?.kind || t[12] !== n?.location ? (x = n?.kind === "image" ? /* @__PURE__ */
|
|
1510
|
+
t[11] !== n?.kind || t[12] !== n?.location ? (x = n?.kind === "image" ? /* @__PURE__ */ K("img", {
|
|
1442
1511
|
alt: "uploaded-file-icon",
|
|
1443
|
-
className:
|
|
1512
|
+
className: Rn,
|
|
1444
1513
|
src: n?.location
|
|
1445
|
-
}) : /* @__PURE__ */
|
|
1446
|
-
className:
|
|
1447
|
-
children: /* @__PURE__ */
|
|
1514
|
+
}) : /* @__PURE__ */ K("div", {
|
|
1515
|
+
className: In,
|
|
1516
|
+
children: /* @__PURE__ */ K(Se, {
|
|
1448
1517
|
size: 60,
|
|
1449
|
-
className:
|
|
1518
|
+
className: Ln
|
|
1450
1519
|
})
|
|
1451
1520
|
}), t[11] = n?.kind, t[12] = n?.location, t[13] = x) : x = t[13];
|
|
1452
1521
|
let S;
|
|
1453
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */
|
|
1522
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ K("div", { className: zn }), t[14] = S) : S = t[14];
|
|
1454
1523
|
let C;
|
|
1455
|
-
t[15] !== l || t[16] !== c ? (C = c && /* @__PURE__ */
|
|
1524
|
+
t[15] !== l || t[16] !== c ? (C = c && /* @__PURE__ */ K("div", {
|
|
1456
1525
|
className: "_11lzwkh8",
|
|
1457
|
-
onClick:
|
|
1458
|
-
children: /* @__PURE__ */
|
|
1526
|
+
onClick: Un,
|
|
1527
|
+
children: /* @__PURE__ */ K(zt, { checked: l })
|
|
1459
1528
|
}), t[15] = l, t[16] = c, t[17] = C) : C = t[17];
|
|
1460
1529
|
let w;
|
|
1461
|
-
t[18] !== f || t[19] !== u ? (w = u && /* @__PURE__ */
|
|
1530
|
+
t[18] !== f || t[19] !== u ? (w = u && /* @__PURE__ */ K(y, {
|
|
1462
1531
|
className: "_11lzwkh6",
|
|
1463
1532
|
size: "sm",
|
|
1464
1533
|
variant: "secondary",
|
|
1465
1534
|
onClick: f,
|
|
1466
|
-
children: /* @__PURE__ */
|
|
1535
|
+
children: /* @__PURE__ */ K(ke, { className: "_11lzwkh7" })
|
|
1467
1536
|
}), t[18] = f, t[19] = u, t[20] = w) : w = t[20];
|
|
1468
1537
|
let T;
|
|
1469
|
-
t[21] ===
|
|
1470
|
-
className:
|
|
1471
|
-
children: /* @__PURE__ */
|
|
1472
|
-
className:
|
|
1473
|
-
children:
|
|
1538
|
+
t[21] === g ? T = t[22] : (T = /* @__PURE__ */ K("div", {
|
|
1539
|
+
className: Bn,
|
|
1540
|
+
children: /* @__PURE__ */ K("p", {
|
|
1541
|
+
className: Vn,
|
|
1542
|
+
children: g
|
|
1474
1543
|
})
|
|
1475
|
-
}), t[21] =
|
|
1544
|
+
}), t[21] = g, t[22] = T);
|
|
1476
1545
|
let E;
|
|
1477
|
-
return t[23] !== m || t[24] !== x || t[25] !== C || t[26] !== w || t[27] !== T || t[28] !==
|
|
1478
|
-
href:
|
|
1546
|
+
return t[23] !== m || t[24] !== x || t[25] !== C || t[26] !== w || t[27] !== T || t[28] !== _ || t[29] !== b ? (E = /* @__PURE__ */ q("a", {
|
|
1547
|
+
href: _,
|
|
1479
1548
|
target: "_blank",
|
|
1480
1549
|
rel: "noopener noreferrer",
|
|
1481
1550
|
className: b,
|
|
@@ -1487,26 +1556,26 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1487
1556
|
w,
|
|
1488
1557
|
T
|
|
1489
1558
|
]
|
|
1490
|
-
}), t[23] = m, t[24] = x, t[25] = C, t[26] = w, t[27] = T, t[28] =
|
|
1559
|
+
}), t[23] = m, t[24] = x, t[25] = C, t[26] = w, t[27] = T, t[28] = _, t[29] = b, t[30] = E) : E = t[30], E;
|
|
1491
1560
|
};
|
|
1492
|
-
function
|
|
1561
|
+
function Un(e) {
|
|
1493
1562
|
e.preventDefault(), e.stopPropagation();
|
|
1494
1563
|
}
|
|
1495
1564
|
//#endregion
|
|
1496
1565
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/modal/FileUploadModal.cssm.js
|
|
1497
|
-
var
|
|
1498
|
-
let t = Z(
|
|
1566
|
+
var Wn = "vwpjhx0", Gn = "vwpjhx1", Kn = "vwpjhx2", qn = "vwpjhx5", Jn = "vwpjhx6", Yn = "vwpjhxb", Xn = (e) => {
|
|
1567
|
+
let t = Z(57), { isOpen: n, setIsOpen: r, files: i, kind: a, allowedExtensions: o, isMultiple: s, isLoading: c, handleUploadFiles: l, handleChange: u } = e, d;
|
|
1499
1568
|
t[0] === r ? d = t[1] : (d = () => r(!1), t[0] = r, t[1] = d);
|
|
1500
1569
|
let f = d, p = i.length, m;
|
|
1501
1570
|
bb0: {
|
|
1502
1571
|
let e;
|
|
1503
1572
|
if (t[2] !== o || t[3] !== a) {
|
|
1504
|
-
let n = a.reduce(
|
|
1573
|
+
let n = a.reduce(Zn, {});
|
|
1505
1574
|
if (!o || o.length === 0) {
|
|
1506
1575
|
m = n;
|
|
1507
1576
|
break bb0;
|
|
1508
1577
|
}
|
|
1509
|
-
let r = o.map(
|
|
1578
|
+
let r = o.map(Qn);
|
|
1510
1579
|
e = {};
|
|
1511
1580
|
for (let [t, i] of Object.entries(n)) {
|
|
1512
1581
|
let n = i.filter((e) => r.includes(e));
|
|
@@ -1516,144 +1585,146 @@ var Un = "vwpjhx0", Wn = "vwpjhx1", Gn = "vwpjhx2", Kn = "vwpjhx5", qn = "vwpjhx
|
|
|
1516
1585
|
} else e = t[4], m = t[5];
|
|
1517
1586
|
m = e;
|
|
1518
1587
|
}
|
|
1519
|
-
let
|
|
1520
|
-
t[6] === l ?
|
|
1588
|
+
let h = m, g;
|
|
1589
|
+
t[6] === l ? g = t[7] : (g = (e) => {
|
|
1521
1590
|
if (e.length === 0) {
|
|
1522
|
-
|
|
1591
|
+
ne("No file selected. Please select one file.");
|
|
1523
1592
|
return;
|
|
1524
1593
|
}
|
|
1525
1594
|
l(e);
|
|
1526
|
-
}, t[6] = l, t[7] =
|
|
1527
|
-
let
|
|
1528
|
-
t[8] !==
|
|
1529
|
-
onDrop:
|
|
1530
|
-
accept:
|
|
1595
|
+
}, t[6] = l, t[7] = g);
|
|
1596
|
+
let _ = g, v;
|
|
1597
|
+
t[8] !== h || t[9] !== c || t[10] !== s || t[11] !== _ ? (v = {
|
|
1598
|
+
onDrop: _,
|
|
1599
|
+
accept: h,
|
|
1531
1600
|
multiple: s,
|
|
1532
1601
|
maxSize: 26214400,
|
|
1533
1602
|
disabled: c,
|
|
1534
|
-
onDropRejected:
|
|
1535
|
-
}, t[8] =
|
|
1536
|
-
let { getRootProps: E, getInputProps: D, isDragActive: O } =
|
|
1537
|
-
t[13] ===
|
|
1538
|
-
let
|
|
1539
|
-
t[
|
|
1540
|
-
let N;
|
|
1541
|
-
t[
|
|
1603
|
+
onDropRejected: er
|
|
1604
|
+
}, t[8] = h, t[9] = c, t[10] = s, t[11] = _, t[12] = v) : v = t[12];
|
|
1605
|
+
let { getRootProps: E, getInputProps: D, isDragActive: O } = Ie(v), k;
|
|
1606
|
+
t[13] === Symbol.for("react.memo_cache_sentinel") ? (k = Q(Wn, C), t[13] = k) : k = t[13];
|
|
1607
|
+
let A = a?.length > 1 ? "Upload file" : `Upload ${a?.[0]}`, j;
|
|
1608
|
+
t[14] === A ? j = t[15] : (j = /* @__PURE__ */ K(S, { children: /* @__PURE__ */ K(x, { children: A }) }), t[14] = A, t[15] = j);
|
|
1609
|
+
let M = c && "vwpjhx3", N;
|
|
1610
|
+
t[16] === M ? N = t[17] : (N = Q(Kn, M), t[16] = M, t[17] = N);
|
|
1542
1611
|
let P;
|
|
1543
|
-
t[
|
|
1612
|
+
t[18] === E ? P = t[19] : (P = E(), t[18] = E, t[19] = P);
|
|
1613
|
+
let F;
|
|
1614
|
+
t[20] === c ? F = t[21] : (F = c && /* @__PURE__ */ K("div", {
|
|
1544
1615
|
className: "vwpjhx4",
|
|
1545
|
-
children: /* @__PURE__ */
|
|
1546
|
-
}), t[
|
|
1547
|
-
let
|
|
1548
|
-
t[
|
|
1549
|
-
className:
|
|
1550
|
-
children:
|
|
1551
|
-
}), t[
|
|
1552
|
-
let
|
|
1553
|
-
t[
|
|
1554
|
-
let z;
|
|
1555
|
-
t[25] === D ? z = t[26] : (z = D(), t[25] = D, t[26] = z);
|
|
1616
|
+
children: /* @__PURE__ */ K(T, {})
|
|
1617
|
+
}), t[20] = c, t[21] = F);
|
|
1618
|
+
let I = O ? "Drop your files here..." : s && i.length > 0 ? "Drag & Drop here to upload more!" : i?.length > 0 ? "Drag & Drop here to upload another file!" : "Drag & Drop here to upload file!", L;
|
|
1619
|
+
t[22] === I ? L = t[23] : (L = /* @__PURE__ */ K("p", {
|
|
1620
|
+
className: qn,
|
|
1621
|
+
children: I
|
|
1622
|
+
}), t[22] = I, t[23] = L);
|
|
1623
|
+
let R = c && "vwpjhx7", z;
|
|
1624
|
+
t[24] === R ? z = t[25] : (z = Q(Jn, R), t[24] = R, t[25] = z);
|
|
1556
1625
|
let B;
|
|
1557
|
-
t[
|
|
1626
|
+
t[26] === D ? B = t[27] : (B = D(), t[26] = D, t[27] = B);
|
|
1558
1627
|
let V;
|
|
1559
|
-
t[
|
|
1628
|
+
t[28] === B ? V = t[29] : (V = /* @__PURE__ */ K("input", { ...B }), t[28] = B, t[29] = V);
|
|
1560
1629
|
let H;
|
|
1561
|
-
t[30] ===
|
|
1630
|
+
t[30] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ K(Oe, { size: 14 }), t[30] = H) : H = t[30];
|
|
1631
|
+
let U;
|
|
1632
|
+
t[31] === V ? U = t[32] : (U = /* @__PURE__ */ q(y, {
|
|
1562
1633
|
variant: "ghost",
|
|
1563
1634
|
size: "sm",
|
|
1564
1635
|
children: [
|
|
1565
|
-
B,
|
|
1566
1636
|
V,
|
|
1637
|
+
H,
|
|
1567
1638
|
"Click to upload"
|
|
1568
1639
|
]
|
|
1569
|
-
}), t[
|
|
1570
|
-
let U;
|
|
1571
|
-
t[32] !== R || t[33] !== H ? (U = /* @__PURE__ */ G("div", {
|
|
1572
|
-
className: R,
|
|
1573
|
-
children: H
|
|
1574
|
-
}), t[32] = R, t[33] = H, t[34] = U) : U = t[34];
|
|
1640
|
+
}), t[31] = V, t[32] = U);
|
|
1575
1641
|
let W;
|
|
1576
|
-
t[
|
|
1577
|
-
className:
|
|
1578
|
-
children:
|
|
1579
|
-
|
|
1580
|
-
|
|
1642
|
+
t[33] !== z || t[34] !== U ? (W = /* @__PURE__ */ K("div", {
|
|
1643
|
+
className: z,
|
|
1644
|
+
children: U
|
|
1645
|
+
}), t[33] = z, t[34] = U, t[35] = W) : W = t[35];
|
|
1646
|
+
let G;
|
|
1647
|
+
t[36] !== P || t[37] !== F || t[38] !== L || t[39] !== W || t[40] !== N ? (G = /* @__PURE__ */ K("div", {
|
|
1648
|
+
className: Gn,
|
|
1649
|
+
children: /* @__PURE__ */ q("div", {
|
|
1650
|
+
className: N,
|
|
1651
|
+
...P,
|
|
1581
1652
|
children: [
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1653
|
+
F,
|
|
1654
|
+
L,
|
|
1655
|
+
W
|
|
1585
1656
|
]
|
|
1586
1657
|
})
|
|
1587
|
-
}), t[
|
|
1588
|
-
let
|
|
1589
|
-
t[
|
|
1658
|
+
}), t[36] = P, t[37] = F, t[38] = L, t[39] = W, t[40] = N, t[41] = G) : G = t[41];
|
|
1659
|
+
let J;
|
|
1660
|
+
t[42] !== i || t[43] !== u ? (J = i.length > 0 && /* @__PURE__ */ q("div", {
|
|
1590
1661
|
className: "vwpjhx8",
|
|
1591
|
-
children: [/* @__PURE__ */
|
|
1662
|
+
children: [/* @__PURE__ */ K("h3", {
|
|
1592
1663
|
className: "vwpjhx9",
|
|
1593
1664
|
children: "Selected Files"
|
|
1594
|
-
}), /* @__PURE__ */
|
|
1665
|
+
}), /* @__PURE__ */ K("div", {
|
|
1595
1666
|
className: "vwpjhxa",
|
|
1596
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1667
|
+
children: i.map((e) => /* @__PURE__ */ K(Hn, {
|
|
1597
1668
|
file: e,
|
|
1598
1669
|
onDelete: (e) => {
|
|
1599
1670
|
u(i.filter((t) => t.id !== e));
|
|
1600
1671
|
}
|
|
1601
1672
|
}, e.id))
|
|
1602
1673
|
})]
|
|
1603
|
-
}), t[
|
|
1604
|
-
let
|
|
1605
|
-
t[
|
|
1606
|
-
className:
|
|
1607
|
-
children: /* @__PURE__ */
|
|
1674
|
+
}), t[42] = i, t[43] = u, t[44] = J) : J = t[44];
|
|
1675
|
+
let Y = p === 1 ? `${p} file` : `${p} files`, X;
|
|
1676
|
+
t[45] !== f || t[46] !== Y ? (X = /* @__PURE__ */ K("div", {
|
|
1677
|
+
className: Yn,
|
|
1678
|
+
children: /* @__PURE__ */ q(y, {
|
|
1608
1679
|
variant: "default",
|
|
1609
1680
|
onClick: f,
|
|
1610
|
-
children: ["Save\xA0",
|
|
1611
|
-
})
|
|
1612
|
-
}), t[
|
|
1613
|
-
let
|
|
1614
|
-
t[
|
|
1615
|
-
className:
|
|
1681
|
+
children: ["Save\xA0", Y]
|
|
1682
|
+
})
|
|
1683
|
+
}), t[45] = f, t[46] = Y, t[47] = X) : X = t[47];
|
|
1684
|
+
let ee;
|
|
1685
|
+
t[48] !== G || t[49] !== J || t[50] !== X || t[51] !== j ? (ee = /* @__PURE__ */ q(w, {
|
|
1686
|
+
className: k,
|
|
1616
1687
|
children: [
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1688
|
+
j,
|
|
1689
|
+
G,
|
|
1690
|
+
J,
|
|
1691
|
+
X
|
|
1621
1692
|
]
|
|
1622
|
-
}), t[
|
|
1623
|
-
let
|
|
1624
|
-
return t[
|
|
1693
|
+
}), t[48] = G, t[49] = J, t[50] = X, t[51] = j, t[52] = ee) : ee = t[52];
|
|
1694
|
+
let te;
|
|
1695
|
+
return t[53] !== n || t[54] !== r || t[55] !== ee ? (te = /* @__PURE__ */ K(b, {
|
|
1625
1696
|
open: n,
|
|
1626
1697
|
onOpenChange: r,
|
|
1627
|
-
children:
|
|
1628
|
-
}), t[
|
|
1698
|
+
children: ee
|
|
1699
|
+
}), t[53] = n, t[54] = r, t[55] = ee, t[56] = te) : te = t[56], te;
|
|
1629
1700
|
};
|
|
1630
|
-
function
|
|
1701
|
+
function Zn(e, t) {
|
|
1631
1702
|
return {
|
|
1632
1703
|
...e,
|
|
1633
|
-
...
|
|
1704
|
+
...re[t]
|
|
1634
1705
|
};
|
|
1635
1706
|
}
|
|
1636
|
-
function
|
|
1707
|
+
function Qn(e) {
|
|
1637
1708
|
return `.${e}`;
|
|
1638
1709
|
}
|
|
1639
|
-
function
|
|
1710
|
+
function $n(e) {
|
|
1640
1711
|
e.errors.forEach((t) => {
|
|
1641
|
-
t.code === "file-too-large" &&
|
|
1712
|
+
t.code === "file-too-large" && ne(`${e.file.name} is bigger than 25MB`);
|
|
1642
1713
|
});
|
|
1643
1714
|
}
|
|
1644
|
-
function
|
|
1645
|
-
e.forEach(
|
|
1715
|
+
function er(e) {
|
|
1716
|
+
e.forEach($n);
|
|
1646
1717
|
}
|
|
1647
1718
|
//#endregion
|
|
1648
1719
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/UploadWidget.cssm.js
|
|
1649
|
-
var
|
|
1650
|
-
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ?
|
|
1720
|
+
var tr = "_156u72w0", nr = "_156u72w1", rr = (e) => Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "location" in e), ir = ({ field: e, schema: t, kind: n = X, isMultiple: i, uploadContext: a }) => {
|
|
1721
|
+
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ? n.filter((e) => o.includes(e)) : null, c = s && s.length > 0 ? s : n, [l, u] = W(!1), [f, p] = W(!1), { media: m } = ae(), { field: { onChange: h, value: g, onBlur: _, disabled: b, ref: x }, fieldState: S } = $({
|
|
1651
1722
|
name: e?.key || "",
|
|
1652
|
-
rules:
|
|
1653
|
-
}), C = e.options?.allowed_extensions, w =
|
|
1654
|
-
let e = c.flatMap((e) =>
|
|
1723
|
+
rules: r(e)
|
|
1724
|
+
}), C = e.options?.allowed_extensions, w = H(() => {
|
|
1725
|
+
let e = c.flatMap((e) => d[e]);
|
|
1655
1726
|
return C && C.length > 0 ? e.filter((e) => C.includes(e)) : e;
|
|
1656
|
-
}, [c, C]), E = Array.isArray(
|
|
1727
|
+
}, [c, C]), E = Array.isArray(g) ? g : g ? [g] : [], D = a ?? (t?.key ? {
|
|
1657
1728
|
module: "collection",
|
|
1658
1729
|
identifier: t.key
|
|
1659
1730
|
} : void 0), O = D ? {
|
|
@@ -1661,7 +1732,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1661
1732
|
field_key: e.key || void 0,
|
|
1662
1733
|
field_label: e.label || void 0
|
|
1663
1734
|
} : void 0, k = (e) => {
|
|
1664
|
-
|
|
1735
|
+
h(i ? e : e?.[0]);
|
|
1665
1736
|
}, A = async (e) => {
|
|
1666
1737
|
let t = new FormData(), n = i ? e : e.slice(0, 1);
|
|
1667
1738
|
if (n.length !== 0) {
|
|
@@ -1671,38 +1742,38 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1671
1742
|
}), p(!0);
|
|
1672
1743
|
try {
|
|
1673
1744
|
let e = await m?.mediaBulkUpload(t, {}, O);
|
|
1674
|
-
if (e?.content?.data &&
|
|
1745
|
+
if (e?.content?.data && rr(e.content.data)) {
|
|
1675
1746
|
let t = e.content.data;
|
|
1676
1747
|
k(i ? [...E, ...t] : t);
|
|
1677
1748
|
}
|
|
1678
1749
|
} catch (e) {
|
|
1679
|
-
|
|
1750
|
+
te(e);
|
|
1680
1751
|
} finally {
|
|
1681
1752
|
p(!1);
|
|
1682
1753
|
}
|
|
1683
1754
|
}
|
|
1684
|
-
}, { label: j = "", helper_text:
|
|
1685
|
-
return /* @__PURE__ */
|
|
1755
|
+
}, { label: j = "", helper_text: M = "", readonly: P = !1 } = e;
|
|
1756
|
+
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ q(v, {
|
|
1686
1757
|
error: S?.error?.message,
|
|
1687
|
-
helperText:
|
|
1758
|
+
helperText: M,
|
|
1688
1759
|
readOnly: P,
|
|
1689
1760
|
htmlFor: e.key,
|
|
1690
1761
|
isRequired: e?.required,
|
|
1691
1762
|
label: j,
|
|
1692
|
-
children: [/* @__PURE__ */
|
|
1693
|
-
className:
|
|
1763
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1764
|
+
className: tr,
|
|
1694
1765
|
ref: x,
|
|
1695
|
-
children: [/* @__PURE__ */
|
|
1766
|
+
children: [/* @__PURE__ */ K(y, {
|
|
1696
1767
|
size: "icon",
|
|
1697
1768
|
variant: "outline",
|
|
1698
1769
|
disabled: b || P,
|
|
1699
|
-
onClick: () =>
|
|
1700
|
-
className:
|
|
1701
|
-
children: /* @__PURE__ */
|
|
1702
|
-
}), /* @__PURE__ */
|
|
1770
|
+
onClick: () => u(!0),
|
|
1771
|
+
className: nr,
|
|
1772
|
+
children: /* @__PURE__ */ K(Oe, { size: 15 })
|
|
1773
|
+
}), /* @__PURE__ */ K(N, {
|
|
1703
1774
|
name: "pasteUrl",
|
|
1704
1775
|
placeholder: "Paste your files here...",
|
|
1705
|
-
onBlur: () =>
|
|
1776
|
+
onBlur: () => _(),
|
|
1706
1777
|
onPaste: (e) => {
|
|
1707
1778
|
let t = [];
|
|
1708
1779
|
Array.from(e.clipboardData.items).forEach((e) => {
|
|
@@ -1714,13 +1785,13 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1714
1785
|
},
|
|
1715
1786
|
disabled: b,
|
|
1716
1787
|
readOnly: P,
|
|
1717
|
-
rightIcon: f ? /* @__PURE__ */
|
|
1788
|
+
rightIcon: f ? /* @__PURE__ */ K(T, { size: 16 }) : void 0
|
|
1718
1789
|
})]
|
|
1719
|
-
}), E.length > 0 && /* @__PURE__ */
|
|
1790
|
+
}), E.length > 0 && /* @__PURE__ */ K("div", {
|
|
1720
1791
|
className: "_156u72w2",
|
|
1721
|
-
children: /* @__PURE__ */
|
|
1792
|
+
children: /* @__PURE__ */ K("div", {
|
|
1722
1793
|
className: "_156u72w3",
|
|
1723
|
-
children: E.map((e) => /* @__PURE__ */
|
|
1794
|
+
children: E.map((e) => /* @__PURE__ */ K(Hn, {
|
|
1724
1795
|
file: e,
|
|
1725
1796
|
onDelete: (e) => {
|
|
1726
1797
|
k(E.filter((t) => t.id !== e));
|
|
@@ -1728,9 +1799,9 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1728
1799
|
}, e.id))
|
|
1729
1800
|
})
|
|
1730
1801
|
})]
|
|
1731
|
-
}), /* @__PURE__ */
|
|
1802
|
+
}), /* @__PURE__ */ K(Xn, {
|
|
1732
1803
|
isOpen: l,
|
|
1733
|
-
setIsOpen:
|
|
1804
|
+
setIsOpen: u,
|
|
1734
1805
|
files: E,
|
|
1735
1806
|
kind: c,
|
|
1736
1807
|
allowedExtensions: C,
|
|
@@ -1739,56 +1810,56 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1739
1810
|
handleUploadFiles: A,
|
|
1740
1811
|
handleChange: k
|
|
1741
1812
|
})] });
|
|
1742
|
-
},
|
|
1813
|
+
}, ar = (e) => {
|
|
1743
1814
|
let t = Z(3), n;
|
|
1744
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
1815
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ K(Ce, { size: 20 }), t[0] = n) : n = t[0];
|
|
1745
1816
|
let r;
|
|
1746
|
-
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */
|
|
1817
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ K(jn, {
|
|
1747
1818
|
leftIcon: n,
|
|
1748
1819
|
...e
|
|
1749
1820
|
}), t[1] = e, t[2] = r), r;
|
|
1750
|
-
},
|
|
1751
|
-
TextWidget:
|
|
1752
|
-
NumberWidget:
|
|
1821
|
+
}, or = R(() => import("./DateTimeWidget-BHCP5osb.js")), sr = R(() => import("./PhoneWidget-C6uZmrk8.js")), cr = R(() => import("./RichTextWidget-iYdVRBGB.js")), lr = {
|
|
1822
|
+
TextWidget: p((e) => /* @__PURE__ */ K(jn, { ...e })),
|
|
1823
|
+
NumberWidget: p((e) => /* @__PURE__ */ K(jn, {
|
|
1753
1824
|
type: "number",
|
|
1754
1825
|
step: "any",
|
|
1755
1826
|
...e
|
|
1756
1827
|
})),
|
|
1757
|
-
CurrencyWidget:
|
|
1758
|
-
MultiTextWidget:
|
|
1759
|
-
TextareaWidget:
|
|
1760
|
-
RichTextWidget:
|
|
1761
|
-
EmailWidget:
|
|
1762
|
-
PhoneWidget:
|
|
1763
|
-
URLWidget:
|
|
1764
|
-
DropdownWidget:
|
|
1828
|
+
CurrencyWidget: p((e) => /* @__PURE__ */ K(Ut, { ...e })),
|
|
1829
|
+
MultiTextWidget: p((e) => /* @__PURE__ */ K(dn, { ...e })),
|
|
1830
|
+
TextareaWidget: p((e) => /* @__PURE__ */ K(An, { ...e })),
|
|
1831
|
+
RichTextWidget: p((e) => /* @__PURE__ */ K(cr, { ...e })),
|
|
1832
|
+
EmailWidget: p((e) => /* @__PURE__ */ K(Yt, { ...e })),
|
|
1833
|
+
PhoneWidget: p((e) => /* @__PURE__ */ K(sr, { ...e })),
|
|
1834
|
+
URLWidget: p((e) => /* @__PURE__ */ K(ar, { ...e })),
|
|
1835
|
+
DropdownWidget: p((e) => /* @__PURE__ */ K(Gt, {
|
|
1765
1836
|
isMulti: !1,
|
|
1766
1837
|
...e
|
|
1767
1838
|
})),
|
|
1768
|
-
MultiDropdownWidget:
|
|
1839
|
+
MultiDropdownWidget: p((e) => /* @__PURE__ */ K(Gt, {
|
|
1769
1840
|
isMulti: !0,
|
|
1770
1841
|
...e
|
|
1771
1842
|
})),
|
|
1772
|
-
RadioWidget:
|
|
1773
|
-
CheckboxWidget:
|
|
1774
|
-
ToggleCheckboxWidget:
|
|
1775
|
-
SwitchWidget:
|
|
1776
|
-
DateTimeWidget:
|
|
1777
|
-
DateWidget:
|
|
1778
|
-
TimeWidget:
|
|
1779
|
-
GeocoderWidget:
|
|
1780
|
-
MultiGeocoderWidget:
|
|
1781
|
-
ImageUploadWidget:
|
|
1843
|
+
RadioWidget: p((e) => /* @__PURE__ */ K(xn, { ...e })),
|
|
1844
|
+
CheckboxWidget: p((e) => /* @__PURE__ */ K(Bt, { ...e })),
|
|
1845
|
+
ToggleCheckboxWidget: p((e) => /* @__PURE__ */ K(Pn, { ...e })),
|
|
1846
|
+
SwitchWidget: p((e) => /* @__PURE__ */ K(On, { ...e })),
|
|
1847
|
+
DateTimeWidget: p((e) => /* @__PURE__ */ K(or, { ...e })),
|
|
1848
|
+
DateWidget: p((e) => /* @__PURE__ */ K(or, { ...e })),
|
|
1849
|
+
TimeWidget: p((e) => /* @__PURE__ */ K(Mn, { ...e })),
|
|
1850
|
+
GeocoderWidget: p((e) => /* @__PURE__ */ K(Zt, { ...e })),
|
|
1851
|
+
MultiGeocoderWidget: p((e) => /* @__PURE__ */ K(an, { ...e })),
|
|
1852
|
+
ImageUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1782
1853
|
kind: ["image"],
|
|
1783
1854
|
isMultiple: !1,
|
|
1784
1855
|
...e
|
|
1785
1856
|
})),
|
|
1786
|
-
MultiImageUploadWidget:
|
|
1857
|
+
MultiImageUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1787
1858
|
kind: ["image"],
|
|
1788
1859
|
isMultiple: !0,
|
|
1789
1860
|
...e
|
|
1790
1861
|
})),
|
|
1791
|
-
FileUploadWidget:
|
|
1862
|
+
FileUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1792
1863
|
kind: [
|
|
1793
1864
|
"audio",
|
|
1794
1865
|
"video",
|
|
@@ -1798,7 +1869,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1798
1869
|
isMultiple: !1,
|
|
1799
1870
|
...e
|
|
1800
1871
|
})),
|
|
1801
|
-
MultiFileUploadWidget:
|
|
1872
|
+
MultiFileUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1802
1873
|
kind: [
|
|
1803
1874
|
"audio",
|
|
1804
1875
|
"video",
|
|
@@ -1808,7 +1879,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1808
1879
|
isMultiple: !0,
|
|
1809
1880
|
...e
|
|
1810
1881
|
}))
|
|
1811
|
-
},
|
|
1882
|
+
}, ur = (e) => {
|
|
1812
1883
|
let t = Z(9), n, r;
|
|
1813
1884
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1814
1885
|
let { field: i } = n, { field_interface: a, key: o } = i;
|
|
@@ -1817,16 +1888,16 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1817
1888
|
let e = r[a];
|
|
1818
1889
|
if (e) {
|
|
1819
1890
|
let r;
|
|
1820
|
-
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */
|
|
1891
|
+
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */ K(e, { ...n }), t[3] = e, t[4] = n, t[5] = r) : r = t[5], r;
|
|
1821
1892
|
}
|
|
1822
1893
|
}
|
|
1823
|
-
let s =
|
|
1894
|
+
let s = lr[a];
|
|
1824
1895
|
if (s) {
|
|
1825
1896
|
let e;
|
|
1826
|
-
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */
|
|
1897
|
+
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */ K(s, { ...n }), t[6] = s, t[7] = n, t[8] = e) : e = t[8], e;
|
|
1827
1898
|
}
|
|
1828
1899
|
return null;
|
|
1829
|
-
},
|
|
1900
|
+
}, dr = (e) => {
|
|
1830
1901
|
let t = Z(25), n, r, i;
|
|
1831
1902
|
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);
|
|
1832
1903
|
let { key: a, label: o, field_interface: s, fields: c } = n, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f;
|
|
@@ -1834,59 +1905,59 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1834
1905
|
let p = f;
|
|
1835
1906
|
if (!d || !l) return null;
|
|
1836
1907
|
let m = n?.required, h;
|
|
1837
|
-
t[6] !== u || t[7] !== m ? (h = /* @__PURE__ */
|
|
1908
|
+
t[6] !== u || t[7] !== m ? (h = /* @__PURE__ */ K(g, {
|
|
1838
1909
|
label: u,
|
|
1839
1910
|
isRequired: m
|
|
1840
1911
|
}), t[6] = u, t[7] = m, t[8] = h) : h = t[8];
|
|
1841
|
-
let
|
|
1912
|
+
let _;
|
|
1842
1913
|
if (t[9] !== n.id || t[10] !== p || t[11] !== l || t[12] !== r || t[13] !== i) {
|
|
1843
1914
|
let e;
|
|
1844
|
-
t[15] !== n.id || t[16] !== l || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */
|
|
1915
|
+
t[15] !== n.id || t[16] !== l || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */ K(fr, {
|
|
1845
1916
|
field: {
|
|
1846
1917
|
...e,
|
|
1847
1918
|
key: `${l}.${e?.key}`
|
|
1848
1919
|
},
|
|
1849
1920
|
schema: i,
|
|
1850
1921
|
...r
|
|
1851
|
-
}, `common-fields-${n?.id}-${e?.id}`), t[15] = n.id, t[16] = l, t[17] = r, t[18] = i, t[19] = e) : e = t[19],
|
|
1852
|
-
} else
|
|
1922
|
+
}, `common-fields-${n?.id}-${e?.id}`), t[15] = n.id, t[16] = l, t[17] = r, t[18] = i, t[19] = e) : e = t[19], _ = p.map(e), t[9] = n.id, t[10] = p, t[11] = l, t[12] = r, t[13] = i, t[14] = _;
|
|
1923
|
+
} else _ = t[14];
|
|
1853
1924
|
let v;
|
|
1854
|
-
t[20] ===
|
|
1855
|
-
className:
|
|
1856
|
-
children:
|
|
1857
|
-
}), t[20] =
|
|
1925
|
+
t[20] === _ ? v = t[21] : (v = /* @__PURE__ */ K("div", {
|
|
1926
|
+
className: Qe,
|
|
1927
|
+
children: _
|
|
1928
|
+
}), t[20] = _, t[21] = v);
|
|
1858
1929
|
let y;
|
|
1859
|
-
return t[22] !== h || t[23] !== v ? (y = /* @__PURE__ */
|
|
1860
|
-
className:
|
|
1930
|
+
return t[22] !== h || t[23] !== v ? (y = /* @__PURE__ */ q("div", {
|
|
1931
|
+
className: Ve,
|
|
1861
1932
|
children: [h, v]
|
|
1862
1933
|
}), t[22] = h, t[23] = v, t[24] = y) : y = t[24], y;
|
|
1863
|
-
},
|
|
1934
|
+
}, fr = (e) => {
|
|
1864
1935
|
let t = Z(12), n, r;
|
|
1865
1936
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1866
1937
|
let { field_interface: i, key: a, hidden: o } = n.field, s = i === void 0 ? "" : i;
|
|
1867
1938
|
if (!s || !(a !== void 0 && a) || o) return null;
|
|
1868
1939
|
switch (s) {
|
|
1869
|
-
case
|
|
1940
|
+
case J.ArrayWidget: {
|
|
1870
1941
|
let e;
|
|
1871
|
-
return t[3] === n ? e = t[4] : (e = /* @__PURE__ */
|
|
1942
|
+
return t[3] === n ? e = t[4] : (e = /* @__PURE__ */ K(ct, { ...n }), t[3] = n, t[4] = e), e;
|
|
1872
1943
|
}
|
|
1873
|
-
case
|
|
1944
|
+
case J.RecordWidget: {
|
|
1874
1945
|
let e;
|
|
1875
|
-
return t[5] === n ? e = t[6] : (e = /* @__PURE__ */
|
|
1946
|
+
return t[5] === n ? e = t[6] : (e = /* @__PURE__ */ K(dr, { ...n }), t[5] = n, t[6] = e), e;
|
|
1876
1947
|
}
|
|
1877
|
-
case
|
|
1948
|
+
case J.CollectionWidget: {
|
|
1878
1949
|
let e;
|
|
1879
|
-
return t[7] === n ? e = t[8] : (e = /* @__PURE__ */
|
|
1950
|
+
return t[7] === n ? e = t[8] : (e = /* @__PURE__ */ K(Nt, { ...n }), t[7] = n, t[8] = e), e;
|
|
1880
1951
|
}
|
|
1881
1952
|
default: {
|
|
1882
1953
|
let e;
|
|
1883
|
-
return t[9] !== n || t[10] !== r ? (e = /* @__PURE__ */
|
|
1954
|
+
return t[9] !== n || t[10] !== r ? (e = /* @__PURE__ */ K(ur, {
|
|
1884
1955
|
widgets: r,
|
|
1885
1956
|
...n
|
|
1886
1957
|
}), t[9] = n, t[10] = r, t[11] = e) : e = t[11], e;
|
|
1887
1958
|
}
|
|
1888
1959
|
}
|
|
1889
|
-
},
|
|
1960
|
+
}, pr = "r6cfdr0", mr = L({ themeClass: "" }), hr = c(ze({
|
|
1890
1961
|
form: {
|
|
1891
1962
|
maxWidth: "800px",
|
|
1892
1963
|
labelFontSize: "1.5rem",
|
|
@@ -1898,109 +1969,108 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1898
1969
|
height: "3.5rem",
|
|
1899
1970
|
borderRadius: "4px"
|
|
1900
1971
|
},
|
|
1901
|
-
checkbox: { labelFontSize: "1.125rem" }
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
n[0] === e ? (r = n[1], i = n[2], a = n[3], o = n[4], s = n[5], c = n[6], l = n[7]) : ({children: r, className: i, style: c, cssReset: a, variant: l, portalToThemeRoot: o, ...s} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = s, n[6] = c, n[7] = l);
|
|
1972
|
+
checkbox: { labelFontSize: "1.125rem" }
|
|
1973
|
+
})), gr = (e) => {
|
|
1974
|
+
let t = Z(30), r, i, a, o, s, c, l;
|
|
1975
|
+
t[0] === e ? (r = t[1], i = t[2], a = t[3], o = t[4], s = t[5], c = t[6], l = t[7]) : ({children: r, className: i, style: c, cssReset: a, variant: l, portalToThemeRoot: o, ...s} = e, t[0] = e, t[1] = r, t[2] = i, t[3] = a, t[4] = o, t[5] = s, t[6] = c, t[7] = l);
|
|
1906
1976
|
let u = l === "single-field" || l === "steps-2", d;
|
|
1907
|
-
|
|
1977
|
+
t[8] === i ? d = t[9] : (d = Q(h, Be, i), t[8] = i, t[9] = d);
|
|
1908
1978
|
let f = d, p;
|
|
1909
|
-
|
|
1910
|
-
...
|
|
1979
|
+
t[10] !== u || t[11] !== c ? (p = u ? {
|
|
1980
|
+
...hr,
|
|
1911
1981
|
...c
|
|
1912
|
-
} : c,
|
|
1913
|
-
let
|
|
1914
|
-
|
|
1982
|
+
} : c, t[10] = u, t[11] = c, t[12] = p) : p = t[12];
|
|
1983
|
+
let m = p, g;
|
|
1984
|
+
t[13] !== f || t[14] !== m || t[15] !== a ? (g = {
|
|
1915
1985
|
themeClass: f,
|
|
1916
|
-
style:
|
|
1986
|
+
style: m,
|
|
1917
1987
|
cssReset: a
|
|
1918
|
-
},
|
|
1988
|
+
}, t[13] = f, t[14] = m, t[15] = a, t[16] = g) : g = t[16];
|
|
1919
1989
|
let _;
|
|
1920
|
-
|
|
1921
|
-
className:
|
|
1990
|
+
t[17] !== r || t[18] !== u ? (_ = u ? /* @__PURE__ */ K("div", {
|
|
1991
|
+
className: pr,
|
|
1922
1992
|
children: r
|
|
1923
|
-
}) : r,
|
|
1993
|
+
}) : r, t[17] = r, t[18] = u, t[19] = _) : _ = t[19];
|
|
1924
1994
|
let v;
|
|
1925
|
-
|
|
1995
|
+
t[20] !== g || t[21] !== _ ? (v = /* @__PURE__ */ K(mr.Provider, {
|
|
1926
1996
|
value: g,
|
|
1927
1997
|
children: _
|
|
1928
|
-
}),
|
|
1998
|
+
}), t[20] = g, t[21] = _, t[22] = v) : v = t[22];
|
|
1929
1999
|
let y;
|
|
1930
|
-
return
|
|
2000
|
+
return t[23] !== f || t[24] !== m || t[25] !== a || t[26] !== o || t[27] !== s || t[28] !== v ? (y = /* @__PURE__ */ K(n, {
|
|
1931
2001
|
...s,
|
|
1932
2002
|
className: f,
|
|
1933
2003
|
cssReset: a,
|
|
1934
|
-
style:
|
|
2004
|
+
style: m,
|
|
1935
2005
|
portalToThemeRoot: o,
|
|
1936
2006
|
children: v
|
|
1937
|
-
}),
|
|
1938
|
-
},
|
|
2007
|
+
}), t[23] = f, t[24] = m, t[25] = a, t[26] = o, t[27] = s, t[28] = v, t[29] = y) : y = t[29], y;
|
|
2008
|
+
}, _r = () => {
|
|
1939
2009
|
try {
|
|
1940
|
-
return
|
|
2010
|
+
return B(mr);
|
|
1941
2011
|
} catch {
|
|
1942
2012
|
return null;
|
|
1943
2013
|
}
|
|
1944
|
-
},
|
|
1945
|
-
let p =
|
|
1946
|
-
if (
|
|
1947
|
-
let t = { ...
|
|
2014
|
+
}, vr = "_1dzarb20", yr = "_1dzarb21", br = "_1dzarb23", xr = "_1dzarb24", Sr = "_1dzarb25", Cr = "_1dzarb26", wr = ({ hiddenFields: e, isLoading: t, initialValues: n, onSubmit: r, schema: i, uiConfig: s, submitButtonConfig: c, containerStyles: l, isDisabled: u, theme: d, enableVerification: f = !0 }) => {
|
|
2015
|
+
let p = H(() => {
|
|
2016
|
+
if (i) {
|
|
2017
|
+
let t = { ...i };
|
|
1948
2018
|
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;
|
|
1949
2019
|
}
|
|
1950
2020
|
return null;
|
|
1951
|
-
}, [
|
|
2021
|
+
}, [i]), m = fe({
|
|
1952
2022
|
mode: "onTouched",
|
|
1953
2023
|
disabled: u,
|
|
1954
2024
|
defaultValues: {},
|
|
1955
2025
|
resetOptions: { keepErrors: !0 }
|
|
1956
|
-
}), { formState: { isSubmitting:
|
|
2026
|
+
}), { formState: { isSubmitting: h } } = m, g = (e) => {
|
|
1957
2027
|
r && r(e);
|
|
1958
2028
|
};
|
|
1959
|
-
|
|
2029
|
+
V(() => {
|
|
1960
2030
|
if (p) {
|
|
1961
2031
|
let e = {
|
|
1962
|
-
...i
|
|
2032
|
+
...a(i),
|
|
1963
2033
|
...n
|
|
1964
2034
|
};
|
|
1965
2035
|
m.reset(e);
|
|
1966
2036
|
}
|
|
1967
2037
|
}, [p]);
|
|
1968
|
-
let
|
|
1969
|
-
return p ? /* @__PURE__ */
|
|
2038
|
+
let _ = t || h;
|
|
2039
|
+
return p ? /* @__PURE__ */ K(le, {
|
|
1970
2040
|
...m,
|
|
1971
|
-
children: /* @__PURE__ */
|
|
2041
|
+
children: /* @__PURE__ */ K(gr, {
|
|
1972
2042
|
...d || {},
|
|
1973
|
-
children: /* @__PURE__ */
|
|
1974
|
-
className:
|
|
1975
|
-
children: [s?.hideFormHeading ? null : /* @__PURE__ */
|
|
1976
|
-
className: Q(
|
|
2043
|
+
children: /* @__PURE__ */ q("div", {
|
|
2044
|
+
className: vr,
|
|
2045
|
+
children: [s?.hideFormHeading ? null : /* @__PURE__ */ K("h1", {
|
|
2046
|
+
className: Q(yr),
|
|
1977
2047
|
children: "Create new"
|
|
1978
|
-
}), /* @__PURE__ */
|
|
1979
|
-
className: Q(
|
|
1980
|
-
children: /* @__PURE__ */
|
|
1981
|
-
className: Q(
|
|
2048
|
+
}), /* @__PURE__ */ K("div", {
|
|
2049
|
+
className: Q(br, l),
|
|
2050
|
+
children: /* @__PURE__ */ q("form", {
|
|
2051
|
+
className: Q(xr, t && "_1dzarb27"),
|
|
1982
2052
|
id: "collection-form",
|
|
1983
|
-
onSubmit: m.handleSubmit(
|
|
1984
|
-
children: [
|
|
1985
|
-
className:
|
|
1986
|
-
children: [!s?.hideSectionHeadings && /* @__PURE__ */
|
|
2053
|
+
onSubmit: m.handleSubmit(g),
|
|
2054
|
+
children: [i?.sections?.map((e) => o(e?.fields || []) ? null : /* @__PURE__ */ q("div", {
|
|
2055
|
+
className: Sr,
|
|
2056
|
+
children: [!s?.hideSectionHeadings && /* @__PURE__ */ K("p", {
|
|
1987
2057
|
className: "_1dzarb28",
|
|
1988
2058
|
children: e?.label
|
|
1989
|
-
}), /* @__PURE__ */
|
|
1990
|
-
className:
|
|
1991
|
-
children: e?.fields?.map((e) => /* @__PURE__ */
|
|
2059
|
+
}), /* @__PURE__ */ K("div", {
|
|
2060
|
+
className: Cr,
|
|
2061
|
+
children: e?.fields?.map((e) => /* @__PURE__ */ K(fr, {
|
|
1992
2062
|
field: e,
|
|
1993
|
-
schema:
|
|
2063
|
+
schema: i,
|
|
1994
2064
|
settings: { enableVerification: f }
|
|
1995
2065
|
}, e?.key))
|
|
1996
2066
|
})]
|
|
1997
|
-
}, e.id)), c?.show && /* @__PURE__ */
|
|
2067
|
+
}, e.id)), c?.show && /* @__PURE__ */ K("div", {
|
|
1998
2068
|
className: "_1dzarb29",
|
|
1999
|
-
children: /* @__PURE__ */
|
|
2069
|
+
children: /* @__PURE__ */ K(y, {
|
|
2000
2070
|
className: c?.styles,
|
|
2001
|
-
disabled: u ||
|
|
2071
|
+
disabled: u || _,
|
|
2002
2072
|
type: "submit",
|
|
2003
|
-
children:
|
|
2073
|
+
children: _ ? "Saving" : c?.text || "Save"
|
|
2004
2074
|
})
|
|
2005
2075
|
})]
|
|
2006
2076
|
})
|
|
@@ -2008,39 +2078,39 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2008
2078
|
})
|
|
2009
2079
|
})
|
|
2010
2080
|
}) : null;
|
|
2011
|
-
},
|
|
2081
|
+
}, Tr = F.createContext({
|
|
2012
2082
|
schema: null,
|
|
2013
2083
|
submitButtonConfig: { show: !0 }
|
|
2014
|
-
}),
|
|
2084
|
+
}), Er = (e) => {
|
|
2015
2085
|
let t = Z(14), n, r, i, a;
|
|
2016
2086
|
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);
|
|
2017
2087
|
let o;
|
|
2018
2088
|
t[5] === r ? o = t[6] : (o = { ...r }, t[5] = r, t[6] = o);
|
|
2019
2089
|
let s;
|
|
2020
|
-
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */
|
|
2090
|
+
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */ K(gr, {
|
|
2021
2091
|
...i,
|
|
2022
2092
|
variant: a,
|
|
2023
2093
|
children: n
|
|
2024
2094
|
}), t[7] = n, t[8] = i, t[9] = a, t[10] = s) : s = t[10];
|
|
2025
2095
|
let c;
|
|
2026
|
-
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */
|
|
2096
|
+
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */ K(Tr.Provider, {
|
|
2027
2097
|
value: o,
|
|
2028
2098
|
children: s
|
|
2029
2099
|
}), t[11] = o, t[12] = s, t[13] = c) : c = t[13], c;
|
|
2030
|
-
},
|
|
2100
|
+
}, Dr = () => F.useContext(Tr), Or = {
|
|
2031
2101
|
FORM_DIRTY: "form-dirty",
|
|
2032
2102
|
FORM_VALUES: "form-values"
|
|
2033
|
-
},
|
|
2034
|
-
let t = localStorage.getItem(`${e}-${
|
|
2103
|
+
}, kr = (e) => {
|
|
2104
|
+
let t = localStorage.getItem(`${e}-${Or.FORM_VALUES}`);
|
|
2035
2105
|
return t ? JSON.parse(t) : {};
|
|
2036
|
-
},
|
|
2037
|
-
localStorage.setItem(`${e}-${
|
|
2038
|
-
},
|
|
2039
|
-
localStorage.removeItem(`${e}-${
|
|
2040
|
-
},
|
|
2041
|
-
let
|
|
2042
|
-
if (!
|
|
2043
|
-
for (let t of
|
|
2106
|
+
}, Ar = (e, t) => {
|
|
2107
|
+
localStorage.setItem(`${e}-${Or.FORM_VALUES}`, JSON.stringify(t));
|
|
2108
|
+
}, jr = (e) => {
|
|
2109
|
+
localStorage.removeItem(`${e}-${Or.FORM_VALUES}`);
|
|
2110
|
+
}, Mr = ({ schema: e, originalSchema: t, saveToRemote: n, onSubmit: r, onSubmitSuccess: i, onSubmitError: o, setFormErrorAfterSubmit: s = !0 }) => {
|
|
2111
|
+
let c = H(() => e, [e]), u = H(() => t || c, [t]), d = ae(), { toastConfig: p, onSuccess: m, onError: h, isLoggedIn: g, isDisabled: _, externalInitialValues: v = {}, account: y, preview: b } = Dr(), [x, S] = W(null), [C, w] = W(!1), [T, E] = W(!1), [D, O] = W(!1), k = U({}), A = (e) => {
|
|
2112
|
+
if (!c?.sections) return null;
|
|
2113
|
+
for (let t of c.sections) for (let n of t?.fields ?? []) if (n?.key === e) return n?.kind ?? null;
|
|
2044
2114
|
return null;
|
|
2045
2115
|
}, j = () => {
|
|
2046
2116
|
let e = {};
|
|
@@ -2058,49 +2128,49 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2058
2128
|
}
|
|
2059
2129
|
}
|
|
2060
2130
|
} catch {}
|
|
2061
|
-
let t =
|
|
2062
|
-
y &&
|
|
2131
|
+
let t = a(c), n = {};
|
|
2132
|
+
y && c && (c.email_field && y.email && (n[c.email_field] = y.email), c.mobile_field && y.mobile && (n[c.mobile_field] = y.mobile)), k.current = {
|
|
2063
2133
|
...t,
|
|
2064
2134
|
...v || {},
|
|
2065
2135
|
...n,
|
|
2066
2136
|
...e,
|
|
2067
2137
|
...k.current
|
|
2068
2138
|
};
|
|
2069
|
-
}, M =
|
|
2139
|
+
}, M = fe({
|
|
2070
2140
|
mode: "onTouched",
|
|
2071
2141
|
disabled: _
|
|
2072
2142
|
}), { formState: N } = M, P = M.handleSubmit(async (e) => {
|
|
2073
2143
|
if (k.current = {
|
|
2074
2144
|
...k.current || {},
|
|
2075
2145
|
...e
|
|
2076
|
-
}, n && !b &&
|
|
2146
|
+
}, n && !b && d?.collection) {
|
|
2077
2147
|
if (u) try {
|
|
2078
|
-
let e =
|
|
2079
|
-
if (t = x ? await
|
|
2148
|
+
let e = f(k?.current, u), t = null;
|
|
2149
|
+
if (t = x ? await d?.collection?.submitDraftEntry(u?.key, e) : await d?.collection?.saveCollectionData({
|
|
2080
2150
|
collection_id: u?.id,
|
|
2081
2151
|
data: e
|
|
2082
2152
|
}), t?.content?.data) {
|
|
2083
2153
|
let e = t?.content?.meta?.booking_config?.enabled;
|
|
2084
|
-
p?.showSuccessToast && !(p?.suppressOnBooking && e) &&
|
|
2154
|
+
p?.showSuccessToast && !(p?.suppressOnBooking && e) && ie(p.successToastText || "Form submitted successfully."), k.current = {}, j(), jr(u?.key), S(null), O(!0), m && m({
|
|
2085
2155
|
schemaId: u?.id,
|
|
2086
2156
|
response: t?.content?.data,
|
|
2087
2157
|
meta: t?.content?.meta
|
|
2088
|
-
}),
|
|
2158
|
+
}), i && i();
|
|
2089
2159
|
return;
|
|
2090
2160
|
}
|
|
2091
2161
|
throw Error("Failed to save form details, API response invalid");
|
|
2092
2162
|
} catch (e) {
|
|
2093
|
-
|
|
2163
|
+
te(e), e instanceof Y ? (e?.hasFieldErrors && s && l(e?.fieldErrors, M.setError), o && o(e.fieldErrors || []), h && h(e)) : h && h(e?.response?.data || e);
|
|
2094
2164
|
}
|
|
2095
2165
|
return;
|
|
2096
2166
|
}
|
|
2097
2167
|
e && r && r(e);
|
|
2098
2168
|
});
|
|
2099
|
-
return
|
|
2100
|
-
if (
|
|
2101
|
-
if (j(), !x && !b &&
|
|
2169
|
+
return V(() => {
|
|
2170
|
+
if (c && d?.collection) {
|
|
2171
|
+
if (j(), !x && !b && c?.allow_draft) {
|
|
2102
2172
|
if (g) {
|
|
2103
|
-
w(!0),
|
|
2173
|
+
w(!0), d?.collection?.getDraftEntry(c?.key).then((e) => {
|
|
2104
2174
|
let t = e?.content?.data;
|
|
2105
2175
|
if (t === null) {
|
|
2106
2176
|
E(!0);
|
|
@@ -2115,12 +2185,12 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2115
2185
|
...e
|
|
2116
2186
|
}, S(e?._id));
|
|
2117
2187
|
}
|
|
2118
|
-
}).catch((e) => (
|
|
2188
|
+
}).catch((e) => (d?.logger?.error("Failed to get draft entry", { exception: e }), null)).finally(() => {
|
|
2119
2189
|
M.reset({ ...k?.current }), w(!1);
|
|
2120
2190
|
});
|
|
2121
2191
|
return;
|
|
2122
2192
|
}
|
|
2123
|
-
let e =
|
|
2193
|
+
let e = kr(c?.key);
|
|
2124
2194
|
e && (k.current = {
|
|
2125
2195
|
...k.current || {},
|
|
2126
2196
|
...e
|
|
@@ -2128,14 +2198,14 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2128
2198
|
}
|
|
2129
2199
|
M.reset({ ...k?.current });
|
|
2130
2200
|
}
|
|
2131
|
-
}, [
|
|
2201
|
+
}, [c]), V(() => {
|
|
2132
2202
|
let { isSubmitSuccessful: e, isValid: t } = N;
|
|
2133
2203
|
e && t && M.reset({
|
|
2134
2204
|
...k?.current,
|
|
2135
2205
|
__captcha: "verified"
|
|
2136
2206
|
});
|
|
2137
|
-
}, [N]),
|
|
2138
|
-
|
|
2207
|
+
}, [N]), V(() => {
|
|
2208
|
+
c && x && jr(c?.key);
|
|
2139
2209
|
}, [x]), {
|
|
2140
2210
|
methods: M,
|
|
2141
2211
|
isLoading: C,
|
|
@@ -2149,20 +2219,20 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2149
2219
|
showSuccessOverlay: D,
|
|
2150
2220
|
dismissSuccessOverlay: () => O(!1)
|
|
2151
2221
|
};
|
|
2152
|
-
},
|
|
2153
|
-
return
|
|
2222
|
+
}, Nr = "a2n8870", Pr = "a2n8871", Fr = "a2n8872", Ir = R(() => import("altcha").then(() => ({ default: function({ widgetRef: e, client: t, onStateChange: n }) {
|
|
2223
|
+
return V(() => {
|
|
2154
2224
|
let { current: t } = e;
|
|
2155
2225
|
if (t) return t.addEventListener("statechange", n), () => t.removeEventListener("statechange", n);
|
|
2156
|
-
}, [n]), /* @__PURE__ */
|
|
2226
|
+
}, [n]), /* @__PURE__ */ K("altcha-widget", {
|
|
2157
2227
|
ref: e,
|
|
2158
2228
|
style: {
|
|
2159
2229
|
"--altcha-max-width": "100%",
|
|
2160
2230
|
"--altcha-border-width": "1px",
|
|
2161
|
-
"--altcha-border-radius":
|
|
2162
|
-
"--altcha-color-base":
|
|
2163
|
-
"--altcha-color-border":
|
|
2164
|
-
"--altcha-color-border-focus":
|
|
2165
|
-
"--altcha-color-text":
|
|
2231
|
+
"--altcha-border-radius": s.input.borderRadius,
|
|
2232
|
+
"--altcha-color-base": m.colors.input,
|
|
2233
|
+
"--altcha-color-border": m.colors.border,
|
|
2234
|
+
"--altcha-color-border-focus": m.colors.ring,
|
|
2235
|
+
"--altcha-color-text": m.colors.inputForeground
|
|
2166
2236
|
},
|
|
2167
2237
|
hidelogo: !0,
|
|
2168
2238
|
auto: "onfocus",
|
|
@@ -2170,17 +2240,17 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2170
2240
|
challengeurl: `${t.apiUrl}/v1/identity/captcha/create-challenge`,
|
|
2171
2241
|
verifyurl: `${t.apiUrl}/v1/identity/captcha/verify-challenge`
|
|
2172
2242
|
});
|
|
2173
|
-
} }))),
|
|
2243
|
+
} }))), Lr = () => {
|
|
2174
2244
|
let e = Z(1), t;
|
|
2175
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2176
|
-
className:
|
|
2177
|
-
children: /* @__PURE__ */
|
|
2178
|
-
className:
|
|
2245
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ K("div", {
|
|
2246
|
+
className: Pr,
|
|
2247
|
+
children: /* @__PURE__ */ K("span", {
|
|
2248
|
+
className: Fr,
|
|
2179
2249
|
children: "Loading verification..."
|
|
2180
2250
|
})
|
|
2181
2251
|
}), e[0] = t) : t = e[0], t;
|
|
2182
|
-
},
|
|
2183
|
-
let e = Z(16), { disableCaptcha: t } =
|
|
2252
|
+
}, Rr = () => {
|
|
2253
|
+
let e = Z(16), { disableCaptcha: t } = Dr(), n = ae(), [r, i] = W(!1), a = U(null), o = t ? !1 : "Verification is required", s;
|
|
2184
2254
|
e[0] === o ? s = e[1] : (s = {
|
|
2185
2255
|
name: "__captcha",
|
|
2186
2256
|
rules: { required: o }
|
|
@@ -2188,7 +2258,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2188
2258
|
let { field: c, fieldState: l } = $(s), { onChange: u } = c, { error: d } = l, f, p;
|
|
2189
2259
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
2190
2260
|
i(!0);
|
|
2191
|
-
}, p = [], e[2] = f, e[3] = p) : (f = e[2], p = e[3]),
|
|
2261
|
+
}, p = [], e[2] = f, e[3] = p) : (f = e[2], p = e[3]), V(f, p);
|
|
2192
2262
|
let m;
|
|
2193
2263
|
e[4] === u ? m = e[5] : (m = (e) => {
|
|
2194
2264
|
"detail" in e && u(e.detail.state || null);
|
|
@@ -2196,62 +2266,62 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2196
2266
|
let h = m;
|
|
2197
2267
|
if (!r) {
|
|
2198
2268
|
let t = d?.message, n;
|
|
2199
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2269
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ K(Lr, {}), e[6] = n) : n = e[6];
|
|
2200
2270
|
let r;
|
|
2201
|
-
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */
|
|
2271
|
+
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */ K(v, {
|
|
2202
2272
|
error: t,
|
|
2203
|
-
className:
|
|
2273
|
+
className: Nr,
|
|
2204
2274
|
children: n
|
|
2205
2275
|
}), e[7] = t, e[8] = r), r;
|
|
2206
2276
|
}
|
|
2207
2277
|
let g = d?.message, _;
|
|
2208
|
-
e[9] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */
|
|
2209
|
-
let
|
|
2210
|
-
e[10] !== n || e[11] !== h ? (
|
|
2278
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ K(Lr, {}), e[9] = _) : _ = e[9];
|
|
2279
|
+
let y;
|
|
2280
|
+
e[10] !== n || e[11] !== h ? (y = /* @__PURE__ */ K(I, {
|
|
2211
2281
|
fallback: _,
|
|
2212
|
-
children: /* @__PURE__ */
|
|
2282
|
+
children: /* @__PURE__ */ K(Ir, {
|
|
2213
2283
|
widgetRef: a,
|
|
2214
2284
|
client: n,
|
|
2215
2285
|
onStateChange: h
|
|
2216
2286
|
})
|
|
2217
|
-
}), e[10] = n, e[11] = h, e[12] =
|
|
2287
|
+
}), e[10] = n, e[11] = h, e[12] = y) : y = e[12];
|
|
2218
2288
|
let b;
|
|
2219
|
-
return e[13] !== g || e[14] !==
|
|
2289
|
+
return e[13] !== g || e[14] !== y ? (b = /* @__PURE__ */ K(v, {
|
|
2220
2290
|
error: g,
|
|
2221
|
-
className:
|
|
2222
|
-
children:
|
|
2223
|
-
}), e[13] = g, e[14] =
|
|
2224
|
-
},
|
|
2225
|
-
let e = Z(4), t =
|
|
2291
|
+
className: Nr,
|
|
2292
|
+
children: y
|
|
2293
|
+
}), e[13] = g, e[14] = y, e[15] = b) : b = e[15], b;
|
|
2294
|
+
}, zr = () => {
|
|
2295
|
+
let e = Z(4), t = me(), { formState: n } = pe(), r, i;
|
|
2226
2296
|
return e[0] !== n || e[1] !== t ? (r = () => {
|
|
2227
2297
|
console.log({
|
|
2228
2298
|
values: t,
|
|
2229
2299
|
formState: n
|
|
2230
2300
|
});
|
|
2231
|
-
}, i = [t, n], e[0] = n, e[1] = t, e[2] = r, e[3] = i) : (r = e[2], i = e[3]),
|
|
2232
|
-
},
|
|
2233
|
-
let t = Z(4), { className: n } = e, { uiConfig: r } =
|
|
2301
|
+
}, i = [t, n], e[0] = n, e[1] = t, e[2] = r, e[3] = i) : (r = e[2], i = e[3]), V(r, i), null;
|
|
2302
|
+
}, Br = "_1vist8m0", Vr = (e) => {
|
|
2303
|
+
let t = Z(4), { className: n } = e, { uiConfig: r } = Dr();
|
|
2234
2304
|
if (r?.hideFormHeading) return null;
|
|
2235
2305
|
let i;
|
|
2236
|
-
t[0] === n ? i = t[1] : (i = Q(
|
|
2306
|
+
t[0] === n ? i = t[1] : (i = Q(Br, n), t[0] = n, t[1] = i);
|
|
2237
2307
|
let a;
|
|
2238
|
-
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */
|
|
2308
|
+
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */ K("h1", {
|
|
2239
2309
|
className: i,
|
|
2240
2310
|
children: "Create new"
|
|
2241
2311
|
}), t[2] = i, t[3] = a), a;
|
|
2242
|
-
},
|
|
2243
|
-
let t = Z(5), { children: n, className: r } = e, { uiConfig: i } =
|
|
2312
|
+
}, Hr = "zx38wb0", Ur = (e) => {
|
|
2313
|
+
let t = Z(5), { children: n, className: r } = e, { uiConfig: i } = Dr();
|
|
2244
2314
|
if (i?.hideSectionHeadings) return null;
|
|
2245
2315
|
let a;
|
|
2246
|
-
t[0] === r ? a = t[1] : (a = Q(
|
|
2316
|
+
t[0] === r ? a = t[1] : (a = Q(Hr, r), t[0] = r, t[1] = a);
|
|
2247
2317
|
let o;
|
|
2248
|
-
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */
|
|
2318
|
+
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ K("h3", {
|
|
2249
2319
|
className: a,
|
|
2250
2320
|
children: n
|
|
2251
2321
|
}), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
|
|
2252
|
-
},
|
|
2322
|
+
}, Wr = "q22d794", Gr = "q22d795", Kr = "q22d796", qr = "q22d797", Jr = "q22d798", Yr = 5, Xr = "Thank you!", Zr = "Your response has been submitted successfully.", Qr = () => {
|
|
2253
2323
|
let e = Z(1), t;
|
|
2254
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2324
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ q("svg", {
|
|
2255
2325
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2256
2326
|
viewBox: "0 0 24 24",
|
|
2257
2327
|
fill: "none",
|
|
@@ -2259,10 +2329,10 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2259
2329
|
strokeWidth: "2.5",
|
|
2260
2330
|
strokeLinecap: "round",
|
|
2261
2331
|
strokeLinejoin: "round",
|
|
2262
|
-
children: [/* @__PURE__ */
|
|
2332
|
+
children: [/* @__PURE__ */ K("title", { children: "Check Icon" }), /* @__PURE__ */ K("path", { d: "M20 6 9 17l-5-5" })]
|
|
2263
2333
|
}), e[0] = t) : t = e[0], t;
|
|
2264
|
-
},
|
|
2265
|
-
let { successConfig: t, schema: n } =
|
|
2334
|
+
}, $r = ({ onDismiss: e }) => {
|
|
2335
|
+
let { successConfig: t, schema: n } = Dr(), r = n?.settings?.success_message, [i, a] = W(Yr), o = (e) => !e || e.replace(/<[^>]*>/g, "").trim() === "", s = t?.title || r?.title || Xr, c = t?.message || r?.message, l = o(c) ? Zr : c, u = t?.action || r?.action, d = u?.type ?? "none", f = d === "redirect" ? u?.value : void 0, p = (() => {
|
|
2266
2336
|
if (f) {
|
|
2267
2337
|
if (f.startsWith("/")) return f;
|
|
2268
2338
|
try {
|
|
@@ -2271,50 +2341,50 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2271
2341
|
} catch {}
|
|
2272
2342
|
}
|
|
2273
2343
|
})();
|
|
2274
|
-
|
|
2344
|
+
V(() => {
|
|
2275
2345
|
if (!p) return;
|
|
2276
2346
|
let e = setInterval(() => {
|
|
2277
2347
|
a((t) => t <= 1 ? (clearInterval(e), window.location.href = p, 0) : t - 1);
|
|
2278
2348
|
}, 1e3);
|
|
2279
2349
|
return () => clearInterval(e);
|
|
2280
2350
|
}, [p]);
|
|
2281
|
-
let m =
|
|
2351
|
+
let m = z(() => {
|
|
2282
2352
|
p && (window.location.href = p);
|
|
2283
2353
|
}, [p]);
|
|
2284
|
-
return /* @__PURE__ */
|
|
2285
|
-
className:
|
|
2286
|
-
children: /* @__PURE__ */
|
|
2287
|
-
className:
|
|
2354
|
+
return /* @__PURE__ */ K("div", {
|
|
2355
|
+
className: Wr,
|
|
2356
|
+
children: /* @__PURE__ */ q("div", {
|
|
2357
|
+
className: Gr,
|
|
2288
2358
|
children: [
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
-
className: Gr,
|
|
2291
|
-
children: /* @__PURE__ */ G(Zr, {})
|
|
2292
|
-
}),
|
|
2293
|
-
/* @__PURE__ */ G("h2", {
|
|
2359
|
+
/* @__PURE__ */ K("div", {
|
|
2294
2360
|
className: Kr,
|
|
2295
|
-
children:
|
|
2361
|
+
children: /* @__PURE__ */ K(Qr, {})
|
|
2296
2362
|
}),
|
|
2297
|
-
/* @__PURE__ */
|
|
2363
|
+
/* @__PURE__ */ K("h2", {
|
|
2298
2364
|
className: qr,
|
|
2365
|
+
children: s
|
|
2366
|
+
}),
|
|
2367
|
+
/* @__PURE__ */ K("div", {
|
|
2368
|
+
className: Jr,
|
|
2299
2369
|
dangerouslySetInnerHTML: { __html: l }
|
|
2300
2370
|
}),
|
|
2301
|
-
d === "submit_another" && /* @__PURE__ */
|
|
2371
|
+
d === "submit_another" && /* @__PURE__ */ K("div", {
|
|
2302
2372
|
className: "q22d799",
|
|
2303
|
-
children: /* @__PURE__ */
|
|
2373
|
+
children: /* @__PURE__ */ K(y, {
|
|
2304
2374
|
variant: "default",
|
|
2305
2375
|
size: "sm",
|
|
2306
2376
|
onClick: e,
|
|
2307
2377
|
children: "Submit Another"
|
|
2308
2378
|
})
|
|
2309
2379
|
}),
|
|
2310
|
-
d === "redirect" && p && /* @__PURE__ */
|
|
2380
|
+
d === "redirect" && p && /* @__PURE__ */ q("div", {
|
|
2311
2381
|
className: "q22d799",
|
|
2312
|
-
children: [/* @__PURE__ */
|
|
2382
|
+
children: [/* @__PURE__ */ K(y, {
|
|
2313
2383
|
variant: "default",
|
|
2314
2384
|
size: "sm",
|
|
2315
2385
|
onClick: m,
|
|
2316
2386
|
children: "Continue"
|
|
2317
|
-
}), /* @__PURE__ */
|
|
2387
|
+
}), /* @__PURE__ */ q("span", {
|
|
2318
2388
|
className: "q22d79a",
|
|
2319
2389
|
children: [
|
|
2320
2390
|
"Redirecting in ",
|
|
@@ -2326,16 +2396,16 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2326
2396
|
]
|
|
2327
2397
|
})
|
|
2328
2398
|
});
|
|
2329
|
-
},
|
|
2330
|
-
let t = Z(27), { isError: n, contentId: r, getContentId: i, allFormValues: a } = e, { collection: o } =
|
|
2399
|
+
}, ei = (e) => {
|
|
2400
|
+
let t = Z(27), { isError: n, contentId: r, getContentId: i, allFormValues: a } = e, { collection: o } = ae(), { schema: s, isLoggedIn: c, preview: l } = Dr(), { formState: u } = pe(), d = me(), f;
|
|
2331
2401
|
t[0] !== o || t[1] !== r || t[2] !== i || t[3] !== n || t[4] !== c || t[5] !== l || t[6] !== s?.allow_draft || t[7] !== s?.key ? (f = (e) => {
|
|
2332
2402
|
l || s?.key && !n && s?.allow_draft && (c ? r ? o.editDraftEntry(s?.key, r, e).then((e) => {
|
|
2333
2403
|
e?.content?.data?._id && i(e?.content?.data?._id);
|
|
2334
|
-
}).catch(
|
|
2404
|
+
}).catch(ti) : o.saveDraftEntry(s?.key, e).then((e) => {
|
|
2335
2405
|
e?.content?.data?._id && i(e?.content?.data?._id);
|
|
2336
|
-
}).catch(
|
|
2406
|
+
}).catch(ni) : Ar(s?.key, e));
|
|
2337
2407
|
}, t[0] = o, t[1] = r, t[2] = i, t[3] = n, t[4] = c, t[5] = l, t[6] = s?.allow_draft, t[7] = s?.key, t[8] = f) : f = t[8];
|
|
2338
|
-
let p =
|
|
2408
|
+
let p = se(f, 100), { isDirty: m, isSubmitting: h, isSubmitSuccessful: g } = u, _;
|
|
2339
2409
|
t[9] !== a || t[10] !== p || t[11] !== d || t[12] !== m || t[13] !== n || t[14] !== g || t[15] !== h || t[16] !== l ? (_ = () => {
|
|
2340
2410
|
if (!l) {
|
|
2341
2411
|
if (h || g) {
|
|
@@ -2358,63 +2428,63 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2358
2428
|
h,
|
|
2359
2429
|
g,
|
|
2360
2430
|
l
|
|
2361
|
-
], t[18] = r, t[19] = d, t[20] = m, t[21] = n, t[22] = c, t[23] = g, t[24] = h, t[25] = l, t[26] = v) : v = t[26],
|
|
2431
|
+
], t[18] = r, t[19] = d, t[20] = m, t[21] = n, t[22] = c, t[23] = g, t[24] = h, t[25] = l, t[26] = v) : v = t[26], V(_, v), null;
|
|
2362
2432
|
};
|
|
2363
|
-
function
|
|
2433
|
+
function ti() {
|
|
2364
2434
|
console.error("saving entry failed");
|
|
2365
2435
|
}
|
|
2366
|
-
function
|
|
2436
|
+
function ni() {
|
|
2367
2437
|
console.error("saving entry failed");
|
|
2368
2438
|
}
|
|
2369
2439
|
//#endregion
|
|
2370
2440
|
//#region ../../libraries/react-collection/dist/lib/variants/DefaultFormVariant/DefaultFormVariant.cssm.js
|
|
2371
|
-
var
|
|
2372
|
-
let e = Z(46), { schema: t, containerStyles: n, submitButtonConfig: r, isDisabled: i, widgets:
|
|
2441
|
+
var ri = "fil1ri0", ii = "fil1ri1", ai = "fil1ri2", oi = "fil1ri5", si = () => {
|
|
2442
|
+
let e = Z(46), { schema: t, containerStyles: n, submitButtonConfig: r, isDisabled: i, widgets: a, disableCaptcha: s, debug: c, enableVerification: l, preview: u } = Dr(), d;
|
|
2373
2443
|
e[0] === t ? d = e[1] : (d = {
|
|
2374
2444
|
schema: t,
|
|
2375
2445
|
saveToRemote: !0
|
|
2376
2446
|
}, e[0] = t, e[1] = d);
|
|
2377
|
-
let { methods: f, isError: p, isLoading: m, contentId:
|
|
2447
|
+
let { methods: f, isError: p, isLoading: m, contentId: h, handleContentId: g, handleSubmit: _, allFormValues: v, showSuccessOverlay: b, dismissSuccessOverlay: x } = Mr(d), { formState: S } = f, { isSubmitting: C } = S, w;
|
|
2378
2448
|
e[2] === f ? w = e[3] : (w = f.watch("__captcha"), e[2] = f, e[3] = w);
|
|
2379
2449
|
let T = w;
|
|
2380
2450
|
if (b) {
|
|
2381
2451
|
let t;
|
|
2382
|
-
return e[4] === x ? t = e[5] : (t = /* @__PURE__ */
|
|
2452
|
+
return e[4] === x ? t = e[5] : (t = /* @__PURE__ */ K($r, { onDismiss: x }), e[4] = x, e[5] = t), t;
|
|
2383
2453
|
}
|
|
2384
2454
|
let E;
|
|
2385
|
-
e[6] === c ? E = e[7] : (E = c && /* @__PURE__ */
|
|
2386
|
-
let D =
|
|
2387
|
-
e[8] !==
|
|
2388
|
-
getContentId:
|
|
2455
|
+
e[6] === c ? E = e[7] : (E = c && /* @__PURE__ */ K(zr, {}), e[6] = c, e[7] = E);
|
|
2456
|
+
let D = h || "", O;
|
|
2457
|
+
e[8] !== v || e[9] !== g || e[10] !== p || e[11] !== D ? (O = /* @__PURE__ */ K(ei, {
|
|
2458
|
+
getContentId: g,
|
|
2389
2459
|
isError: p,
|
|
2390
2460
|
contentId: D,
|
|
2391
|
-
allFormValues:
|
|
2392
|
-
}), e[8] =
|
|
2461
|
+
allFormValues: v
|
|
2462
|
+
}), e[8] = v, e[9] = g, e[10] = p, e[11] = D, e[12] = O) : O = e[12];
|
|
2393
2463
|
let k;
|
|
2394
|
-
e[13] === n ? k = e[14] : (k = Q(
|
|
2464
|
+
e[13] === n ? k = e[14] : (k = Q(ri, n), e[13] = n, e[14] = k);
|
|
2395
2465
|
let A;
|
|
2396
|
-
e[15] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */
|
|
2466
|
+
e[15] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ K(Vr, {}), e[15] = A) : A = e[15];
|
|
2397
2467
|
let j = m && "fil1ri3", M;
|
|
2398
|
-
e[16] === j ? M = e[17] : (M = Q(
|
|
2468
|
+
e[16] === j ? M = e[17] : (M = Q(ii, j), e[16] = j, e[17] = M);
|
|
2399
2469
|
let N;
|
|
2400
|
-
e[18] !== l || e[19] !== t || e[20] !==
|
|
2401
|
-
className:
|
|
2402
|
-
children: [e?.label && /* @__PURE__ */
|
|
2403
|
-
className:
|
|
2404
|
-
children: e?.fields?.map((e) => /* @__PURE__ */
|
|
2470
|
+
e[18] !== l || e[19] !== t || e[20] !== a ? (N = t?.sections?.map((e) => o(e?.fields || []) ? null : /* @__PURE__ */ q("div", {
|
|
2471
|
+
className: ai,
|
|
2472
|
+
children: [e?.label && /* @__PURE__ */ K(Ur, { children: e.label }), /* @__PURE__ */ K("div", {
|
|
2473
|
+
className: oi,
|
|
2474
|
+
children: e?.fields?.map((e) => /* @__PURE__ */ K(fr, {
|
|
2405
2475
|
field: e,
|
|
2406
|
-
widgets:
|
|
2476
|
+
widgets: a,
|
|
2407
2477
|
schema: t,
|
|
2408
2478
|
settings: { enableVerification: l }
|
|
2409
2479
|
}, e?.key))
|
|
2410
2480
|
})]
|
|
2411
|
-
}, e.id)), e[18] = l, e[19] = t, e[20] =
|
|
2481
|
+
}, e.id)), e[18] = l, e[19] = t, e[20] = a, e[21] = N) : N = e[21];
|
|
2412
2482
|
let P;
|
|
2413
|
-
e[22] !== s || e[23] !== u ? (P = !s && !u && /* @__PURE__ */
|
|
2483
|
+
e[22] !== s || e[23] !== u ? (P = !s && !u && /* @__PURE__ */ K(Rr, {}), e[22] = s, e[23] = u, e[24] = P) : P = e[24];
|
|
2414
2484
|
let F;
|
|
2415
|
-
e[25] !== T || e[26] !== i || e[27] !== C || e[28] !== r?.show || e[29] !== r?.styles || e[30] !== r?.text ? (F = r?.show && /* @__PURE__ */
|
|
2485
|
+
e[25] !== T || e[26] !== i || e[27] !== C || e[28] !== r?.show || e[29] !== r?.styles || e[30] !== r?.text ? (F = r?.show && /* @__PURE__ */ K("div", {
|
|
2416
2486
|
className: "fil1ri4",
|
|
2417
|
-
children: /* @__PURE__ */
|
|
2487
|
+
children: /* @__PURE__ */ K(y, {
|
|
2418
2488
|
className: r?.styles,
|
|
2419
2489
|
disabled: i || C,
|
|
2420
2490
|
type: "submit",
|
|
@@ -2422,23 +2492,23 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2422
2492
|
})
|
|
2423
2493
|
}), e[25] = T, e[26] = i, e[27] = C, e[28] = r?.show, e[29] = r?.styles, e[30] = r?.text, e[31] = F) : F = e[31];
|
|
2424
2494
|
let I;
|
|
2425
|
-
e[32] !==
|
|
2495
|
+
e[32] !== _ || e[33] !== N || e[34] !== P || e[35] !== F || e[36] !== M ? (I = /* @__PURE__ */ q("form", {
|
|
2426
2496
|
className: M,
|
|
2427
2497
|
id: "collection-form",
|
|
2428
|
-
onSubmit:
|
|
2498
|
+
onSubmit: _,
|
|
2429
2499
|
children: [
|
|
2430
2500
|
N,
|
|
2431
2501
|
P,
|
|
2432
2502
|
F
|
|
2433
2503
|
]
|
|
2434
|
-
}), e[32] =
|
|
2504
|
+
}), e[32] = _, e[33] = N, e[34] = P, e[35] = F, e[36] = M, e[37] = I) : I = e[37];
|
|
2435
2505
|
let L;
|
|
2436
|
-
e[38] !== I || e[39] !== k ? (L = /* @__PURE__ */
|
|
2506
|
+
e[38] !== I || e[39] !== k ? (L = /* @__PURE__ */ q("div", {
|
|
2437
2507
|
className: k,
|
|
2438
2508
|
children: [A, I]
|
|
2439
2509
|
}), e[38] = I, e[39] = k, e[40] = L) : L = e[40];
|
|
2440
2510
|
let R;
|
|
2441
|
-
return e[41] !== f || e[42] !== L || e[43] !== E || e[44] !== O ? (R = /* @__PURE__ */
|
|
2511
|
+
return e[41] !== f || e[42] !== L || e[43] !== E || e[44] !== O ? (R = /* @__PURE__ */ q(le, {
|
|
2442
2512
|
...f,
|
|
2443
2513
|
children: [
|
|
2444
2514
|
E,
|
|
@@ -2446,28 +2516,28 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2446
2516
|
L
|
|
2447
2517
|
]
|
|
2448
2518
|
}), e[41] = f, e[42] = L, e[43] = E, e[44] = O, e[45] = R) : R = e[45], R;
|
|
2449
|
-
},
|
|
2450
|
-
let t = Z(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } =
|
|
2451
|
-
t[0] === l ? u = t[1] : (u = Q(
|
|
2519
|
+
}, ci = "_1kah2gz0", li = "_1kah2gz1", ui = "_1kah2gz3", di = (e) => {
|
|
2520
|
+
let t = Z(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } = pe(), { errors: o } = a, s = Object.keys(o || {}).length > 0 || i, c = Math.floor((r + 1) * 100 / n), l = s && "_1kah2gz2", u;
|
|
2521
|
+
t[0] === l ? u = t[1] : (u = Q(li, l), t[0] = l, t[1] = u);
|
|
2452
2522
|
let d = s && "_1kah2gz4", f;
|
|
2453
|
-
t[2] === d ? f = t[3] : (f = Q(
|
|
2523
|
+
t[2] === d ? f = t[3] : (f = Q(ui, d), t[2] = d, t[3] = f);
|
|
2454
2524
|
let p = `${c}%`, m;
|
|
2455
2525
|
t[4] === p ? m = t[5] : (m = { width: p }, t[4] = p, t[5] = m);
|
|
2456
2526
|
let h;
|
|
2457
|
-
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */
|
|
2527
|
+
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */ K("div", {
|
|
2458
2528
|
className: f,
|
|
2459
2529
|
style: m
|
|
2460
2530
|
}), t[6] = f, t[7] = m, t[8] = h) : h = t[8];
|
|
2461
2531
|
let g;
|
|
2462
|
-
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */
|
|
2463
|
-
className:
|
|
2464
|
-
children: /* @__PURE__ */
|
|
2532
|
+
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */ K("div", {
|
|
2533
|
+
className: ci,
|
|
2534
|
+
children: /* @__PURE__ */ K("div", {
|
|
2465
2535
|
className: u,
|
|
2466
2536
|
children: h
|
|
2467
2537
|
})
|
|
2468
2538
|
}), t[9] = u, t[10] = h, t[11] = g) : g = t[11], g;
|
|
2469
|
-
},
|
|
2470
|
-
let e = Z(74), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } =
|
|
2539
|
+
}, fi = "_1ypxmcv0", pi = "_1ypxmcv1", mi = "_1ypxmcvb", hi = "_1ypxmcvc", gi = () => {
|
|
2540
|
+
let e = Z(74), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } = Dr(), c;
|
|
2471
2541
|
bb0: {
|
|
2472
2542
|
if (!n?.sections) {
|
|
2473
2543
|
let t;
|
|
@@ -2475,18 +2545,18 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2475
2545
|
break bb0;
|
|
2476
2546
|
}
|
|
2477
2547
|
let t;
|
|
2478
|
-
e[1] === n.sections ? t = e[2] : (t = n.sections.flatMap(
|
|
2548
|
+
e[1] === n.sections ? t = e[2] : (t = n.sections.flatMap(vi), e[1] = n.sections, e[2] = t), c = t;
|
|
2479
2549
|
}
|
|
2480
|
-
let l = c, [u, d] =
|
|
2550
|
+
let l = c, [u, d] = W(0), [f, p] = W(0), m;
|
|
2481
2551
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
2482
2552
|
state: "entered",
|
|
2483
2553
|
direction: "next"
|
|
2484
2554
|
}, e[3] = m) : m = e[3];
|
|
2485
|
-
let [
|
|
2486
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2487
|
-
let [
|
|
2555
|
+
let [h, g] = W(m), _;
|
|
2556
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (_ = [], e[4] = _) : _ = e[4];
|
|
2557
|
+
let [v, b] = W(_), x = h.state === "exiting" ? u : f, S = f === l.length - 1, C = l[x], w;
|
|
2488
2558
|
e[5] === Symbol.for("react.memo_cache_sentinel") ? (w = () => {
|
|
2489
|
-
b([]), p(0),
|
|
2559
|
+
b([]), p(0), g({
|
|
2490
2560
|
state: "exiting",
|
|
2491
2561
|
direction: "next"
|
|
2492
2562
|
});
|
|
@@ -2495,178 +2565,178 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2495
2565
|
e[6] !== f || e[7] !== l ? (T = (e) => {
|
|
2496
2566
|
b(e);
|
|
2497
2567
|
let t = l.findIndex((t) => e.some((e) => e.param === t.content.key));
|
|
2498
|
-
t !== -1 && t !== f && (p(t),
|
|
2568
|
+
t !== -1 && t !== f && (p(t), g({
|
|
2499
2569
|
state: "exiting",
|
|
2500
2570
|
direction: "next"
|
|
2501
2571
|
}));
|
|
2502
2572
|
}, e[6] = f, e[7] = l, e[8] = T) : T = e[8];
|
|
2503
|
-
let { methods: E, handleContentId: D, isError: O, allFormValues: k, contentId: A, isLoading: j, handleSubmit: M, showSuccessOverlay: N, dismissSuccessOverlay: P } =
|
|
2573
|
+
let { methods: E, handleContentId: D, isError: O, allFormValues: k, contentId: A, isLoading: j, handleSubmit: M, showSuccessOverlay: N, dismissSuccessOverlay: P } = Mr({
|
|
2504
2574
|
schema: n,
|
|
2505
2575
|
saveToRemote: S,
|
|
2506
2576
|
setFormErrorAfterSubmit: !1,
|
|
2507
2577
|
onSubmitSuccess: w,
|
|
2508
2578
|
onSubmit: () => {
|
|
2509
|
-
b((e) => e.filter((e) => e?.param !== C?.content?.key)),
|
|
2579
|
+
b((e) => e.filter((e) => e?.param !== C?.content?.key)), B();
|
|
2510
2580
|
},
|
|
2511
2581
|
onSubmitError: T
|
|
2512
2582
|
}), { setFocus: F, setError: I, formState: L } = E, { isSubmitting: R } = L, z;
|
|
2513
|
-
e[9] !==
|
|
2514
|
-
|
|
2583
|
+
e[9] !== h.state || e[10] !== S || e[11] !== l.length ? (z = () => {
|
|
2584
|
+
h.state === "entered" && (S || (p((e) => Math.min(e + 1, l.length - 1)), g({
|
|
2515
2585
|
state: "exiting",
|
|
2516
2586
|
direction: "next"
|
|
2517
2587
|
})));
|
|
2518
|
-
}, e[9] =
|
|
2519
|
-
let
|
|
2520
|
-
e[13] !==
|
|
2521
|
-
|
|
2588
|
+
}, e[9] = h.state, e[10] = S, e[11] = l.length, e[12] = z) : z = e[12];
|
|
2589
|
+
let B = z, H;
|
|
2590
|
+
e[13] !== h.state || e[14] !== f ? (H = () => {
|
|
2591
|
+
h.state === "entered" && (f <= 0 || (p(yi), g({
|
|
2522
2592
|
state: "exiting",
|
|
2523
2593
|
direction: "prev"
|
|
2524
2594
|
})));
|
|
2525
|
-
}, e[13] =
|
|
2526
|
-
let
|
|
2527
|
-
e[16] !==
|
|
2528
|
-
|
|
2595
|
+
}, e[13] = h.state, e[14] = f, e[15] = H) : H = e[15];
|
|
2596
|
+
let U = H, G;
|
|
2597
|
+
e[16] !== h.direction || e[17] !== h.state || e[18] !== C || e[19] !== f || e[20] !== F ? (G = () => {
|
|
2598
|
+
h.state === "exiting" ? (d(f), g({
|
|
2529
2599
|
state: "entering",
|
|
2530
|
-
direction:
|
|
2531
|
-
})) :
|
|
2600
|
+
direction: h.direction
|
|
2601
|
+
})) : h.state === "entering" && (g({
|
|
2532
2602
|
state: "entered",
|
|
2533
|
-
direction:
|
|
2603
|
+
direction: h.direction
|
|
2534
2604
|
}), C?.content?.key && F(C.content.key));
|
|
2535
|
-
}, e[16] =
|
|
2536
|
-
let J =
|
|
2537
|
-
e[22] !== C || e[23] !==
|
|
2538
|
-
if (C &&
|
|
2539
|
-
let e =
|
|
2605
|
+
}, e[16] = h.direction, e[17] = h.state, e[18] = C, e[19] = f, e[20] = F, e[21] = G) : G = e[21];
|
|
2606
|
+
let J = G, Y;
|
|
2607
|
+
e[22] !== C || e[23] !== v || e[24] !== I ? (Y = () => {
|
|
2608
|
+
if (C && v?.length > 0) {
|
|
2609
|
+
let e = v?.find((e) => e?.param === C?.content?.key);
|
|
2540
2610
|
e && I(e?.param, {
|
|
2541
2611
|
type: "server_error",
|
|
2542
2612
|
message: e?.message
|
|
2543
2613
|
});
|
|
2544
2614
|
}
|
|
2545
|
-
}, e[22] = C, e[23] =
|
|
2615
|
+
}, e[22] = C, e[23] = v, e[24] = I, e[25] = Y) : Y = e[25];
|
|
2546
2616
|
let X;
|
|
2547
|
-
if (e[26] !== C || e[27] !==
|
|
2617
|
+
if (e[26] !== C || e[27] !== v ? (X = [C, v], e[26] = C, e[27] = v, e[28] = X) : X = e[28], V(Y, X), !n || l.length === 0) return null;
|
|
2548
2618
|
if (N) {
|
|
2549
2619
|
let t;
|
|
2550
|
-
return e[29] === P ? t = e[30] : (t = /* @__PURE__ */
|
|
2620
|
+
return e[29] === P ? t = e[30] : (t = /* @__PURE__ */ K($r, { onDismiss: P }), e[29] = P, e[30] = t), t;
|
|
2551
2621
|
}
|
|
2552
2622
|
let ee = R || j, te = A || "", ne;
|
|
2553
|
-
e[31] !== k || e[32] !== D || e[33] !== O || e[34] !== te ? (ne = /* @__PURE__ */
|
|
2623
|
+
e[31] !== k || e[32] !== D || e[33] !== O || e[34] !== te ? (ne = /* @__PURE__ */ K(ei, {
|
|
2554
2624
|
getContentId: D,
|
|
2555
2625
|
isError: O,
|
|
2556
2626
|
contentId: te,
|
|
2557
2627
|
allFormValues: k
|
|
2558
2628
|
}), e[31] = k, e[32] = D, e[33] = O, e[34] = te, e[35] = ne) : ne = e[35];
|
|
2559
2629
|
let re;
|
|
2560
|
-
e[36] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */
|
|
2630
|
+
e[36] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ K(Vr, { className: hi }), e[36] = re) : re = e[36];
|
|
2561
2631
|
let ie = C?.sectionLabel, ae;
|
|
2562
|
-
e[37] === ie ? ae = e[38] : (ae = /* @__PURE__ */
|
|
2563
|
-
className:
|
|
2632
|
+
e[37] === ie ? ae = e[38] : (ae = /* @__PURE__ */ K(Ur, {
|
|
2633
|
+
className: mi,
|
|
2564
2634
|
children: ie
|
|
2565
2635
|
}), e[37] = ie, e[38] = ae);
|
|
2566
|
-
let oe = l?.length || 1, se = Array.isArray(
|
|
2567
|
-
e[39] !== f || e[40] !== oe || e[41] !== se ? (
|
|
2636
|
+
let oe = l?.length || 1, se = Array.isArray(v) && v?.length > 0, ce;
|
|
2637
|
+
e[39] !== f || e[40] !== oe || e[41] !== se ? (ce = /* @__PURE__ */ K(di, {
|
|
2568
2638
|
currentStepIndex: f,
|
|
2569
2639
|
totalSteps: oe,
|
|
2570
2640
|
hasLevoErrors: se
|
|
2571
|
-
}), e[39] = f, e[40] = oe, e[41] = se, e[42] =
|
|
2572
|
-
let
|
|
2573
|
-
e[43] !== ae || e[44] !==
|
|
2574
|
-
className:
|
|
2641
|
+
}), e[39] = f, e[40] = oe, e[41] = se, e[42] = ce) : ce = e[42];
|
|
2642
|
+
let ue;
|
|
2643
|
+
e[43] !== ae || e[44] !== ce ? (ue = /* @__PURE__ */ q("div", {
|
|
2644
|
+
className: fi,
|
|
2575
2645
|
children: [
|
|
2576
2646
|
re,
|
|
2577
2647
|
ae,
|
|
2578
|
-
|
|
2648
|
+
ce
|
|
2579
2649
|
]
|
|
2580
|
-
}), e[43] = ae, e[44] =
|
|
2581
|
-
let
|
|
2582
|
-
e[46] === a ?
|
|
2650
|
+
}), e[43] = ae, e[44] = ce, e[45] = ue) : ue = e[45];
|
|
2651
|
+
let $;
|
|
2652
|
+
e[46] === a ? $ = e[47] : ($ = Q(pi, a), e[46] = a, e[47] = $);
|
|
2583
2653
|
let de;
|
|
2584
|
-
e[48] !==
|
|
2654
|
+
e[48] !== h.direction || e[49] !== h.state || e[50] !== C || e[51] !== t || e[52] !== o || e[53] !== J || e[54] !== U || e[55] !== M || e[56] !== ee || e[57] !== S || e[58] !== f || e[59] !== s || e[60] !== n || e[61] !== i?.show || e[62] !== i?.styles || e[63] !== i?.text || e[64] !== r ? (de = C && /* @__PURE__ */ K("div", {
|
|
2585
2655
|
className: "_1ypxmcv6",
|
|
2586
|
-
"data-state":
|
|
2587
|
-
"data-direction":
|
|
2656
|
+
"data-state": h.state,
|
|
2657
|
+
"data-direction": h.direction,
|
|
2588
2658
|
onAnimationEnd: J,
|
|
2589
|
-
children: /* @__PURE__ */
|
|
2659
|
+
children: /* @__PURE__ */ q("form", {
|
|
2590
2660
|
onSubmit: M,
|
|
2591
2661
|
className: "_1ypxmcv7",
|
|
2592
2662
|
children: [
|
|
2593
|
-
/* @__PURE__ */
|
|
2663
|
+
/* @__PURE__ */ K(fr, {
|
|
2594
2664
|
field: C.content,
|
|
2595
2665
|
schema: n,
|
|
2596
2666
|
widgets: r,
|
|
2597
2667
|
settings: { enableVerification: o }
|
|
2598
2668
|
}),
|
|
2599
|
-
!t && !s && S && /* @__PURE__ */
|
|
2600
|
-
/* @__PURE__ */
|
|
2669
|
+
!t && !s && S && /* @__PURE__ */ K(Rr, {}),
|
|
2670
|
+
/* @__PURE__ */ q("div", {
|
|
2601
2671
|
className: "_1ypxmcv8",
|
|
2602
|
-
children: [/* @__PURE__ */
|
|
2672
|
+
children: [/* @__PURE__ */ K("div", { className: "_1ypxmcv9" }), /* @__PURE__ */ q("div", {
|
|
2603
2673
|
className: "_1ypxmcva",
|
|
2604
|
-
children: [/* @__PURE__ */
|
|
2674
|
+
children: [/* @__PURE__ */ q(y, {
|
|
2605
2675
|
type: "button",
|
|
2606
|
-
onClick:
|
|
2676
|
+
onClick: U,
|
|
2607
2677
|
size: "lg",
|
|
2608
|
-
disabled: f === 0 || ee ||
|
|
2678
|
+
disabled: f === 0 || ee || h.state !== "entered",
|
|
2609
2679
|
variant: "ghost",
|
|
2610
|
-
children: [/* @__PURE__ */
|
|
2680
|
+
children: [/* @__PURE__ */ K(ge, {
|
|
2611
2681
|
size: 18,
|
|
2612
2682
|
className: "mr-2"
|
|
2613
2683
|
}), "Prev"]
|
|
2614
|
-
}), (!S || i?.show !== !1) && /* @__PURE__ */
|
|
2684
|
+
}), (!S || i?.show !== !1) && /* @__PURE__ */ K(y, {
|
|
2615
2685
|
type: "submit",
|
|
2616
2686
|
size: "lg",
|
|
2617
2687
|
className: i?.styles,
|
|
2618
|
-
disabled: ee ||
|
|
2688
|
+
disabled: ee || h.state !== "entered",
|
|
2619
2689
|
children: ee ? "Saving..." : S ? i?.text || "Submit" : "Next"
|
|
2620
2690
|
})]
|
|
2621
2691
|
})]
|
|
2622
2692
|
})
|
|
2623
2693
|
]
|
|
2624
2694
|
})
|
|
2625
|
-
}, C.id), e[48] =
|
|
2695
|
+
}, C.id), e[48] = h.direction, e[49] = h.state, e[50] = C, e[51] = t, e[52] = o, e[53] = J, e[54] = U, e[55] = M, e[56] = ee, e[57] = S, e[58] = f, e[59] = s, e[60] = n, e[61] = i?.show, e[62] = i?.styles, e[63] = i?.text, e[64] = r, e[65] = de) : de = e[65];
|
|
2626
2696
|
let fe;
|
|
2627
|
-
e[66] !==
|
|
2628
|
-
className:
|
|
2697
|
+
e[66] !== $ || e[67] !== de ? (fe = /* @__PURE__ */ K("div", {
|
|
2698
|
+
className: $,
|
|
2629
2699
|
children: de
|
|
2630
|
-
}), e[66] =
|
|
2700
|
+
}), e[66] = $, e[67] = de, e[68] = fe) : fe = e[68];
|
|
2631
2701
|
let pe;
|
|
2632
|
-
return e[69] !== E || e[70] !== ne || e[71] !==
|
|
2702
|
+
return e[69] !== E || e[70] !== ne || e[71] !== ue || e[72] !== fe ? (pe = /* @__PURE__ */ q(le, {
|
|
2633
2703
|
...E,
|
|
2634
2704
|
children: [
|
|
2635
2705
|
ne,
|
|
2636
|
-
|
|
2706
|
+
ue,
|
|
2637
2707
|
fe
|
|
2638
2708
|
]
|
|
2639
|
-
}), e[69] = E, e[70] = ne, e[71] =
|
|
2709
|
+
}), e[69] = E, e[70] = ne, e[71] = ue, e[72] = fe, e[73] = pe) : pe = e[73], pe;
|
|
2640
2710
|
};
|
|
2641
|
-
function
|
|
2711
|
+
function _i(e) {
|
|
2642
2712
|
return !e.hidden;
|
|
2643
2713
|
}
|
|
2644
|
-
function
|
|
2645
|
-
return (e.fields?.filter(
|
|
2714
|
+
function vi(e) {
|
|
2715
|
+
return (e.fields?.filter(_i) || []).map((t) => ({
|
|
2646
2716
|
id: t.key,
|
|
2647
2717
|
content: t,
|
|
2648
2718
|
sectionId: e.id || "",
|
|
2649
2719
|
sectionLabel: e.label
|
|
2650
2720
|
}));
|
|
2651
2721
|
}
|
|
2652
|
-
function
|
|
2722
|
+
function yi(e) {
|
|
2653
2723
|
return Math.max(e - 1, 0);
|
|
2654
2724
|
}
|
|
2655
2725
|
//#endregion
|
|
2656
2726
|
//#region ../../libraries/react-collection/dist/lib/variants/StepFormVariant2/StepFormVariant2.cssm.js
|
|
2657
|
-
var
|
|
2658
|
-
let e = Z(85), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } =
|
|
2727
|
+
var bi = "zlgzzn0", xi = "zlgzzn1", Si = "zlgzznb", Ci = "zlgzznc", wi = () => {
|
|
2728
|
+
let e = Z(85), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } = Dr();
|
|
2659
2729
|
n?.sections;
|
|
2660
2730
|
let c;
|
|
2661
|
-
e[0] === n?.sections ? c = e[1] : (c = n?.sections?.filter(
|
|
2662
|
-
let l = c, [u, d] =
|
|
2731
|
+
e[0] === n?.sections ? c = e[1] : (c = n?.sections?.filter(Ti) || [], e[0] = n?.sections, e[1] = c);
|
|
2732
|
+
let l = c, [u, d] = W(0), [f, p] = W(0), m;
|
|
2663
2733
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
2664
2734
|
state: "entered",
|
|
2665
2735
|
direction: "next"
|
|
2666
2736
|
}, e[2] = m) : m = e[2];
|
|
2667
|
-
let [
|
|
2668
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2669
|
-
let [
|
|
2737
|
+
let [h, g] = W(m), _;
|
|
2738
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (_ = [], e[3] = _) : _ = e[3];
|
|
2739
|
+
let [v, b] = W(_), x = h.state === "exiting" ? u : f, S = l[x], C = f === l.length - 1, w;
|
|
2670
2740
|
bb0: {
|
|
2671
2741
|
if (n) {
|
|
2672
2742
|
let t;
|
|
@@ -2684,7 +2754,7 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2684
2754
|
}
|
|
2685
2755
|
let T = w, E;
|
|
2686
2756
|
e[9] === Symbol.for("react.memo_cache_sentinel") ? (E = () => {
|
|
2687
|
-
b([]), p(0),
|
|
2757
|
+
b([]), p(0), g({
|
|
2688
2758
|
state: "exiting",
|
|
2689
2759
|
direction: "next"
|
|
2690
2760
|
});
|
|
@@ -2693,13 +2763,13 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2693
2763
|
e[10] !== f || e[11] !== l ? (D = (e) => {
|
|
2694
2764
|
if (b(e), Array.isArray(e) && e.length > 0) {
|
|
2695
2765
|
let t = l.findIndex((t) => t.fields?.some((t) => e.some((e) => e.param === t.key)));
|
|
2696
|
-
t !== -1 && t !== f && (p(t),
|
|
2766
|
+
t !== -1 && t !== f && (p(t), g({
|
|
2697
2767
|
state: "exiting",
|
|
2698
2768
|
direction: "next"
|
|
2699
2769
|
}));
|
|
2700
2770
|
}
|
|
2701
2771
|
}, e[10] = f, e[11] = l, e[12] = D) : D = e[12];
|
|
2702
|
-
let { methods: O, handleContentId: k, isError: A, allFormValues: j, contentId: M, isLoading: N, handleSubmit: P, showSuccessOverlay: F, dismissSuccessOverlay: I } =
|
|
2772
|
+
let { methods: O, handleContentId: k, isError: A, allFormValues: j, contentId: M, isLoading: N, handleSubmit: P, showSuccessOverlay: F, dismissSuccessOverlay: I } = Mr({
|
|
2703
2773
|
schema: T,
|
|
2704
2774
|
originalSchema: n,
|
|
2705
2775
|
saveToRemote: C,
|
|
@@ -2707,138 +2777,138 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2707
2777
|
onSubmitSuccess: E,
|
|
2708
2778
|
onSubmit: () => {
|
|
2709
2779
|
b((e) => {
|
|
2710
|
-
let t = S?.fields?.map(
|
|
2780
|
+
let t = S?.fields?.map(Ei) || [];
|
|
2711
2781
|
return e.filter((e) => !t.includes(e.param));
|
|
2712
2782
|
}), J();
|
|
2713
2783
|
},
|
|
2714
2784
|
onSubmitError: D
|
|
2715
|
-
}), { setFocus: L, setError: R, formState: z } = O, { isSubmitting:
|
|
2785
|
+
}), { setFocus: L, setError: R, formState: z } = O, { isSubmitting: B } = z, H;
|
|
2716
2786
|
e[13] === O ? H = e[14] : (H = O.watch("__captcha"), e[13] = O, e[14] = H);
|
|
2717
|
-
let
|
|
2718
|
-
e[15] !==
|
|
2719
|
-
|
|
2787
|
+
let U = H, G;
|
|
2788
|
+
e[15] !== h.state || e[16] !== C || e[17] !== l.length ? (G = () => {
|
|
2789
|
+
h.state === "entered" && (C || (p((e) => Math.min(e + 1, l.length - 1)), g({
|
|
2720
2790
|
state: "exiting",
|
|
2721
2791
|
direction: "next"
|
|
2722
2792
|
})));
|
|
2723
|
-
}, e[15] =
|
|
2724
|
-
let J =
|
|
2725
|
-
e[19] !==
|
|
2726
|
-
|
|
2793
|
+
}, e[15] = h.state, e[16] = C, e[17] = l.length, e[18] = G) : G = e[18];
|
|
2794
|
+
let J = G, Y;
|
|
2795
|
+
e[19] !== h.state || e[20] !== f ? (Y = () => {
|
|
2796
|
+
h.state === "entered" && (f <= 0 || (p(Di), g({
|
|
2727
2797
|
state: "exiting",
|
|
2728
2798
|
direction: "prev"
|
|
2729
2799
|
})));
|
|
2730
|
-
}, e[19] =
|
|
2800
|
+
}, e[19] = h.state, e[20] = f, e[21] = Y) : Y = e[21];
|
|
2731
2801
|
let X = Y, ee;
|
|
2732
|
-
e[22] !==
|
|
2733
|
-
|
|
2802
|
+
e[22] !== h.direction || e[23] !== h.state || e[24] !== S || e[25] !== f || e[26] !== L ? (ee = () => {
|
|
2803
|
+
h.state === "exiting" ? (d(f), g({
|
|
2734
2804
|
state: "entering",
|
|
2735
|
-
direction:
|
|
2736
|
-
})) :
|
|
2805
|
+
direction: h.direction
|
|
2806
|
+
})) : h.state === "entering" && (g({
|
|
2737
2807
|
state: "entered",
|
|
2738
|
-
direction:
|
|
2808
|
+
direction: h.direction
|
|
2739
2809
|
}), S?.fields?.[0]?.key && L(S.fields[0].key));
|
|
2740
|
-
}, e[22] =
|
|
2810
|
+
}, e[22] = h.direction, e[23] = h.state, e[24] = S, e[25] = f, e[26] = L, e[27] = ee) : ee = e[27];
|
|
2741
2811
|
let te = ee, ne;
|
|
2742
|
-
e[28] !==
|
|
2743
|
-
|
|
2812
|
+
e[28] !== h.state || e[29] !== S || e[30] !== v || e[31] !== R ? (ne = () => {
|
|
2813
|
+
v?.length > 0 && S?.fields && h?.state === "entered" && v.forEach((e) => {
|
|
2744
2814
|
S.fields?.some((t) => t.key === e.param) && R(e?.param, {
|
|
2745
2815
|
type: "server_error",
|
|
2746
2816
|
message: e?.message
|
|
2747
2817
|
});
|
|
2748
2818
|
});
|
|
2749
|
-
}, e[28] =
|
|
2819
|
+
}, e[28] = h.state, e[29] = S, e[30] = v, e[31] = R, e[32] = ne) : ne = e[32];
|
|
2750
2820
|
let re;
|
|
2751
|
-
if (e[33] !==
|
|
2752
|
-
|
|
2821
|
+
if (e[33] !== h || e[34] !== S || e[35] !== v || e[36] !== R ? (re = [
|
|
2822
|
+
v,
|
|
2753
2823
|
R,
|
|
2754
2824
|
S,
|
|
2755
|
-
|
|
2756
|
-
], e[33] =
|
|
2825
|
+
h
|
|
2826
|
+
], e[33] = h, e[34] = S, e[35] = v, e[36] = R, e[37] = re) : re = e[37], V(ne, re), !n || l.length === 0) return null;
|
|
2757
2827
|
if (F) {
|
|
2758
2828
|
let t;
|
|
2759
|
-
return e[38] === I ? t = e[39] : (t = /* @__PURE__ */
|
|
2829
|
+
return e[38] === I ? t = e[39] : (t = /* @__PURE__ */ K($r, { onDismiss: I }), e[38] = I, e[39] = t), t;
|
|
2760
2830
|
}
|
|
2761
|
-
let ie =
|
|
2762
|
-
e[40] !== j || e[41] !== k || e[42] !== A || e[43] !== ae ? (oe = /* @__PURE__ */
|
|
2831
|
+
let ie = B || N || U === "verifying" && C, ae = M || "", oe;
|
|
2832
|
+
e[40] !== j || e[41] !== k || e[42] !== A || e[43] !== ae ? (oe = /* @__PURE__ */ K(ei, {
|
|
2763
2833
|
getContentId: k,
|
|
2764
2834
|
isError: A,
|
|
2765
2835
|
contentId: ae,
|
|
2766
2836
|
allFormValues: j
|
|
2767
2837
|
}), e[40] = j, e[41] = k, e[42] = A, e[43] = ae, e[44] = oe) : oe = e[44];
|
|
2768
2838
|
let se;
|
|
2769
|
-
e[45] === Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */
|
|
2770
|
-
let
|
|
2771
|
-
e[46] ===
|
|
2772
|
-
className:
|
|
2773
|
-
children:
|
|
2774
|
-
}), e[46] =
|
|
2775
|
-
let
|
|
2776
|
-
e[48] !== f || e[49] !==
|
|
2839
|
+
e[45] === Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */ K(Vr, { className: Ci }), e[45] = se) : se = e[45];
|
|
2840
|
+
let ce = S?.label, ue;
|
|
2841
|
+
e[46] === ce ? ue = e[47] : (ue = /* @__PURE__ */ K(Ur, {
|
|
2842
|
+
className: Si,
|
|
2843
|
+
children: ce
|
|
2844
|
+
}), e[46] = ce, e[47] = ue);
|
|
2845
|
+
let $ = l?.length || 1, de = Array.isArray(v) && v?.length > 0, fe;
|
|
2846
|
+
e[48] !== f || e[49] !== $ || e[50] !== de ? (fe = /* @__PURE__ */ K(di, {
|
|
2777
2847
|
currentStepIndex: f,
|
|
2778
|
-
totalSteps:
|
|
2848
|
+
totalSteps: $,
|
|
2779
2849
|
hasLevoErrors: de
|
|
2780
|
-
}), e[48] = f, e[49] =
|
|
2850
|
+
}), e[48] = f, e[49] = $, e[50] = de, e[51] = fe) : fe = e[51];
|
|
2781
2851
|
let pe;
|
|
2782
|
-
e[52] !==
|
|
2783
|
-
className:
|
|
2852
|
+
e[52] !== ue || e[53] !== fe ? (pe = /* @__PURE__ */ q("div", {
|
|
2853
|
+
className: bi,
|
|
2784
2854
|
children: [
|
|
2785
2855
|
se,
|
|
2786
|
-
|
|
2856
|
+
ue,
|
|
2787
2857
|
fe
|
|
2788
2858
|
]
|
|
2789
|
-
}), e[52] =
|
|
2859
|
+
}), e[52] = ue, e[53] = fe, e[54] = pe) : pe = e[54];
|
|
2790
2860
|
let me;
|
|
2791
|
-
e[55] === a ? me = e[56] : (me = Q(
|
|
2792
|
-
let
|
|
2793
|
-
e[57] !==
|
|
2861
|
+
e[55] === a ? me = e[56] : (me = Q(xi, a), e[55] = a, e[56] = me);
|
|
2862
|
+
let he;
|
|
2863
|
+
e[57] !== h.direction || e[58] !== h.state || e[59] !== U || e[60] !== S || e[61] !== t || e[62] !== x || e[63] !== o || e[64] !== te || e[65] !== X || e[66] !== P || e[67] !== ie || e[68] !== C || e[69] !== f || e[70] !== s || e[71] !== n || e[72] !== i?.show || e[73] !== i?.styles || e[74] !== i?.text || e[75] !== r ? (he = S && /* @__PURE__ */ K("div", {
|
|
2794
2864
|
className: "zlgzzn6",
|
|
2795
|
-
"data-state":
|
|
2796
|
-
"data-direction":
|
|
2865
|
+
"data-state": h.state,
|
|
2866
|
+
"data-direction": h.direction,
|
|
2797
2867
|
onAnimationEnd: te,
|
|
2798
|
-
children: /* @__PURE__ */
|
|
2868
|
+
children: /* @__PURE__ */ q("form", {
|
|
2799
2869
|
onSubmit: P,
|
|
2800
2870
|
className: "zlgzzn7",
|
|
2801
2871
|
children: [
|
|
2802
|
-
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */
|
|
2872
|
+
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */ K(fr, {
|
|
2803
2873
|
field: e,
|
|
2804
2874
|
schema: n,
|
|
2805
2875
|
widgets: r,
|
|
2806
2876
|
settings: { enableVerification: o }
|
|
2807
2877
|
}, e.key)),
|
|
2808
|
-
!t && !s && C && /* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2878
|
+
!t && !s && C && /* @__PURE__ */ K(Rr, {}),
|
|
2879
|
+
/* @__PURE__ */ q("div", {
|
|
2810
2880
|
className: "zlgzzn8",
|
|
2811
|
-
children: [/* @__PURE__ */
|
|
2881
|
+
children: [/* @__PURE__ */ K("div", { className: "zlgzzn9" }), /* @__PURE__ */ q("div", {
|
|
2812
2882
|
className: "zlgzzna",
|
|
2813
|
-
children: [/* @__PURE__ */
|
|
2883
|
+
children: [/* @__PURE__ */ q(y, {
|
|
2814
2884
|
type: "button",
|
|
2815
2885
|
onClick: X,
|
|
2816
2886
|
size: "lg",
|
|
2817
|
-
disabled: f === 0 || ie ||
|
|
2887
|
+
disabled: f === 0 || ie || h.state !== "entered",
|
|
2818
2888
|
variant: "ghost",
|
|
2819
|
-
children: [/* @__PURE__ */
|
|
2889
|
+
children: [/* @__PURE__ */ K(ge, {
|
|
2820
2890
|
size: 18,
|
|
2821
2891
|
className: "mr-2"
|
|
2822
2892
|
}), "Prev"]
|
|
2823
|
-
}), (!C || i?.show !== !1) && /* @__PURE__ */
|
|
2893
|
+
}), (!C || i?.show !== !1) && /* @__PURE__ */ K(y, {
|
|
2824
2894
|
type: "submit",
|
|
2825
2895
|
size: "lg",
|
|
2826
2896
|
className: i?.styles,
|
|
2827
|
-
disabled: ie ||
|
|
2828
|
-
children: ie ?
|
|
2897
|
+
disabled: ie || h.state !== "entered",
|
|
2898
|
+
children: ie ? U === "verifying" ? "Verifying..." : "Saving..." : C ? i?.text || "Save" : "Next"
|
|
2829
2899
|
})]
|
|
2830
2900
|
})]
|
|
2831
2901
|
})
|
|
2832
2902
|
]
|
|
2833
2903
|
})
|
|
2834
|
-
}, S.id || x), e[57] =
|
|
2904
|
+
}, S.id || x), e[57] = h.direction, e[58] = h.state, e[59] = U, e[60] = S, e[61] = t, e[62] = x, e[63] = o, e[64] = te, e[65] = X, e[66] = P, e[67] = ie, e[68] = C, e[69] = f, e[70] = s, e[71] = n, e[72] = i?.show, e[73] = i?.styles, e[74] = i?.text, e[75] = r, e[76] = he) : he = e[76];
|
|
2835
2905
|
let _e;
|
|
2836
|
-
e[77] !== me || e[78] !==
|
|
2906
|
+
e[77] !== me || e[78] !== he ? (_e = /* @__PURE__ */ K("div", {
|
|
2837
2907
|
className: me,
|
|
2838
|
-
children:
|
|
2839
|
-
}), e[77] = me, e[78] =
|
|
2908
|
+
children: he
|
|
2909
|
+
}), e[77] = me, e[78] = he, e[79] = _e) : _e = e[79];
|
|
2840
2910
|
let ve;
|
|
2841
|
-
return e[80] !== O || e[81] !== oe || e[82] !== pe || e[83] !== _e ? (ve = /* @__PURE__ */
|
|
2911
|
+
return e[80] !== O || e[81] !== oe || e[82] !== pe || e[83] !== _e ? (ve = /* @__PURE__ */ q(le, {
|
|
2842
2912
|
...O,
|
|
2843
2913
|
children: [
|
|
2844
2914
|
oe,
|
|
@@ -2847,46 +2917,46 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2847
2917
|
]
|
|
2848
2918
|
}), e[80] = O, e[81] = oe, e[82] = pe, e[83] = _e, e[84] = ve) : ve = e[84], ve;
|
|
2849
2919
|
};
|
|
2850
|
-
function wi(e) {
|
|
2851
|
-
return !a(e?.fields || []);
|
|
2852
|
-
}
|
|
2853
2920
|
function Ti(e) {
|
|
2854
|
-
return e
|
|
2921
|
+
return !o(e?.fields || []);
|
|
2855
2922
|
}
|
|
2856
2923
|
function Ei(e) {
|
|
2924
|
+
return e.key;
|
|
2925
|
+
}
|
|
2926
|
+
function Di(e) {
|
|
2857
2927
|
return Math.max(e - 1, 0);
|
|
2858
2928
|
}
|
|
2859
2929
|
//#endregion
|
|
2860
2930
|
//#region ../../libraries/react-collection/dist/lib/variants/StepsFormVariant/StepsFormVariant.cssm.js
|
|
2861
|
-
var
|
|
2862
|
-
let e = Z(6), [t, n] =
|
|
2931
|
+
var Oi = "_1f3ynb50", ki = "_1f3ynb54", Ai = "_1f3ynb55", ji = () => {
|
|
2932
|
+
let e = Z(6), [t, n] = W(0), { containerStyles: r } = Dr(), i;
|
|
2863
2933
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
2864
|
-
n(
|
|
2934
|
+
n(Ni);
|
|
2865
2935
|
}, e[0] = i) : i = e[0];
|
|
2866
2936
|
let a = i, o;
|
|
2867
2937
|
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
|
|
2868
|
-
n(
|
|
2938
|
+
n(Pi);
|
|
2869
2939
|
}, e[1] = o) : o = e[1];
|
|
2870
2940
|
let s = o, c;
|
|
2871
2941
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (c = (e) => {
|
|
2872
2942
|
n(e);
|
|
2873
2943
|
}, e[2] = c) : c = e[2];
|
|
2874
2944
|
let l = c, u;
|
|
2875
|
-
return e[3] !== r || e[4] !== t ? (u = /* @__PURE__ */
|
|
2945
|
+
return e[3] !== r || e[4] !== t ? (u = /* @__PURE__ */ K(Mi, {
|
|
2876
2946
|
currentSectionIndex: t,
|
|
2877
2947
|
handleNext: s,
|
|
2878
2948
|
handlePrev: a,
|
|
2879
2949
|
goToIndex: l,
|
|
2880
2950
|
containerStyles: r
|
|
2881
2951
|
}), e[3] = r, e[4] = t, e[5] = u) : u = e[5], u;
|
|
2882
|
-
},
|
|
2883
|
-
let t = Z(83), { containerStyles: n, currentSectionIndex: r, handleNext: i, handlePrev: a, goToIndex: o } = e, { schema: s, disableCaptcha: c, isDisabled: l, submitButtonConfig: u, widgets: d, enableVerification: f, preview: p } =
|
|
2952
|
+
}, Mi = (e) => {
|
|
2953
|
+
let t = Z(83), { containerStyles: n, currentSectionIndex: r, handleNext: i, handlePrev: a, goToIndex: o } = e, { schema: s, disableCaptcha: c, isDisabled: l, submitButtonConfig: u, widgets: d, enableVerification: f, preview: p } = Dr(), m;
|
|
2884
2954
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (m = [], t[0] = m) : m = t[0];
|
|
2885
|
-
let [
|
|
2955
|
+
let [h, g] = W(m);
|
|
2886
2956
|
s?.sections;
|
|
2887
|
-
let
|
|
2888
|
-
t[1] === s?.sections ?
|
|
2889
|
-
let
|
|
2957
|
+
let _;
|
|
2958
|
+
t[1] === s?.sections ? _ = t[2] : (_ = s?.sections?.filter(Fi) || [], t[1] = s?.sections, t[2] = _);
|
|
2959
|
+
let v = _, b = v?.[r], x;
|
|
2890
2960
|
bb0: {
|
|
2891
2961
|
if (s) {
|
|
2892
2962
|
let e;
|
|
@@ -2902,24 +2972,24 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2902
2972
|
}
|
|
2903
2973
|
x = null;
|
|
2904
2974
|
}
|
|
2905
|
-
let S = x, C = r === Number(
|
|
2975
|
+
let S = x, C = r === Number(v?.length) - 1, w;
|
|
2906
2976
|
t[8] !== b?.fields || t[9] !== i ? (w = () => {
|
|
2907
|
-
|
|
2908
|
-
let t = b?.fields?.map(
|
|
2977
|
+
g((e) => {
|
|
2978
|
+
let t = b?.fields?.map(Ii) || [];
|
|
2909
2979
|
return e.filter((e) => !t.includes(e.param));
|
|
2910
2980
|
}), i();
|
|
2911
2981
|
}, t[8] = b?.fields, t[9] = i, t[10] = w) : w = t[10];
|
|
2912
2982
|
let T;
|
|
2913
2983
|
t[11] === o ? T = t[12] : (T = () => {
|
|
2914
|
-
|
|
2984
|
+
g([]), o(0);
|
|
2915
2985
|
}, t[11] = o, t[12] = T);
|
|
2916
2986
|
let E;
|
|
2917
|
-
t[13] !== o || t[14] !==
|
|
2918
|
-
if (
|
|
2919
|
-
let t =
|
|
2987
|
+
t[13] !== o || t[14] !== v ? (E = (e) => {
|
|
2988
|
+
if (g(e), Array.isArray(e) && e.length > 0) {
|
|
2989
|
+
let t = v.findIndex((t) => t.fields?.some((t) => e.some((e) => e.param === t.key)));
|
|
2920
2990
|
t !== -1 && o(t);
|
|
2921
2991
|
}
|
|
2922
|
-
}, t[13] = o, t[14] =
|
|
2992
|
+
}, t[13] = o, t[14] = v, t[15] = E) : E = t[15];
|
|
2923
2993
|
let D;
|
|
2924
2994
|
t[16] !== C || t[17] !== s || t[18] !== S || t[19] !== w || t[20] !== T || t[21] !== E ? (D = {
|
|
2925
2995
|
schema: S,
|
|
@@ -2930,57 +3000,57 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2930
3000
|
onSubmitSuccess: T,
|
|
2931
3001
|
onSubmitError: E
|
|
2932
3002
|
}, t[16] = C, t[17] = s, t[18] = S, t[19] = w, t[20] = T, t[21] = E, t[22] = D) : D = t[22];
|
|
2933
|
-
let { methods: O, handleSubmit: k, isLoading: A, handleContentId: j, isError: M, contentId: N, allFormValues: P, showSuccessOverlay: F, dismissSuccessOverlay: I } =
|
|
2934
|
-
t[23] === O ?
|
|
2935
|
-
let H =
|
|
2936
|
-
if (t[25] !== b || t[26] !==
|
|
2937
|
-
|
|
3003
|
+
let { methods: O, handleSubmit: k, isLoading: A, handleContentId: j, isError: M, contentId: N, allFormValues: P, showSuccessOverlay: F, dismissSuccessOverlay: I } = Mr(D), { setError: L, formState: R } = O, { isSubmitting: z } = R, B;
|
|
3004
|
+
t[23] === O ? B = t[24] : (B = O.watch("__captcha"), t[23] = O, t[24] = B);
|
|
3005
|
+
let H = B, U, G;
|
|
3006
|
+
if (t[25] !== b || t[26] !== h || t[27] !== L ? (U = () => {
|
|
3007
|
+
h?.length > 0 && b?.fields && h.forEach((e) => {
|
|
2938
3008
|
b.fields?.some((t) => t.key === e.param) && L(e?.param, {
|
|
2939
3009
|
type: "server_error",
|
|
2940
3010
|
message: e?.message
|
|
2941
3011
|
});
|
|
2942
3012
|
});
|
|
2943
|
-
},
|
|
2944
|
-
|
|
3013
|
+
}, G = [
|
|
3014
|
+
h,
|
|
2945
3015
|
L,
|
|
2946
3016
|
b
|
|
2947
|
-
], t[25] = b, t[26] =
|
|
3017
|
+
], t[25] = b, t[26] = h, t[27] = L, t[28] = U, t[29] = G) : (U = t[28], G = t[29]), V(U, G), F) {
|
|
2948
3018
|
let e;
|
|
2949
|
-
return t[30] === I ? e = t[31] : (e = /* @__PURE__ */
|
|
3019
|
+
return t[30] === I ? e = t[31] : (e = /* @__PURE__ */ K($r, { onDismiss: I }), t[30] = I, t[31] = e), e;
|
|
2950
3020
|
}
|
|
2951
3021
|
let J = z || H === "verifying" && C, Y = N || "", X;
|
|
2952
|
-
t[32] !== P || t[33] !== j || t[34] !== M || t[35] !== Y ? (X = /* @__PURE__ */
|
|
3022
|
+
t[32] !== P || t[33] !== j || t[34] !== M || t[35] !== Y ? (X = /* @__PURE__ */ K(ei, {
|
|
2953
3023
|
getContentId: j,
|
|
2954
3024
|
isError: M,
|
|
2955
3025
|
contentId: Y,
|
|
2956
3026
|
allFormValues: P
|
|
2957
3027
|
}), t[32] = P, t[33] = j, t[34] = M, t[35] = Y, t[36] = X) : X = t[36];
|
|
2958
3028
|
let ee = A && "_1f3ynb51", te;
|
|
2959
|
-
t[37] !== n || t[38] !== ee ? (te = Q(
|
|
3029
|
+
t[37] !== n || t[38] !== ee ? (te = Q(Oi, n, ee), t[37] = n, t[38] = ee, t[39] = te) : te = t[39];
|
|
2960
3030
|
let ne;
|
|
2961
|
-
t[40] === Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */
|
|
3031
|
+
t[40] === Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */ K(Vr, {}), t[40] = ne) : ne = t[40];
|
|
2962
3032
|
let re = b?.label || "Details", ie;
|
|
2963
|
-
t[41] === re ? ie = t[42] : (ie = /* @__PURE__ */
|
|
2964
|
-
let ae = r + 1, oe =
|
|
2965
|
-
t[43] !== ae || t[44] !== oe ? (se = /* @__PURE__ */
|
|
3033
|
+
t[41] === re ? ie = t[42] : (ie = /* @__PURE__ */ K("span", { children: re }), t[41] = re, t[42] = ie);
|
|
3034
|
+
let ae = r + 1, oe = v?.length || 1, se;
|
|
3035
|
+
t[43] !== ae || t[44] !== oe ? (se = /* @__PURE__ */ q("span", { children: [
|
|
2966
3036
|
"Step ",
|
|
2967
3037
|
ae,
|
|
2968
3038
|
"/",
|
|
2969
3039
|
oe
|
|
2970
3040
|
] }), t[43] = ae, t[44] = oe, t[45] = se) : se = t[45];
|
|
2971
|
-
let
|
|
2972
|
-
t[46] !== ie || t[47] !== se ? (
|
|
2973
|
-
let
|
|
2974
|
-
t[49] !== b?.fields || t[50] !== f || t[51] !== s || t[52] !== d ? (
|
|
3041
|
+
let ce;
|
|
3042
|
+
t[46] !== ie || t[47] !== se ? (ce = /* @__PURE__ */ q(Ur, { children: [ie, se] }), t[46] = ie, t[47] = se, t[48] = ce) : ce = t[48];
|
|
3043
|
+
let ue;
|
|
3044
|
+
t[49] !== b?.fields || t[50] !== f || t[51] !== s || t[52] !== d ? (ue = b?.fields?.map((e) => e && !e.hidden ? /* @__PURE__ */ K(fr, {
|
|
2975
3045
|
field: e,
|
|
2976
3046
|
widgets: d,
|
|
2977
3047
|
schema: s,
|
|
2978
3048
|
settings: { enableVerification: f }
|
|
2979
|
-
}, e?.key) : null), t[49] = b?.fields, t[50] = f, t[51] = s, t[52] = d, t[53] =
|
|
2980
|
-
let
|
|
2981
|
-
t[54] !== c || t[55] !== C || t[56] !== p ? (
|
|
3049
|
+
}, e?.key) : null), t[49] = b?.fields, t[50] = f, t[51] = s, t[52] = d, t[53] = ue) : ue = t[53];
|
|
3050
|
+
let $;
|
|
3051
|
+
t[54] !== c || t[55] !== C || t[56] !== p ? ($ = !c && !p && C && /* @__PURE__ */ K(Rr, {}), t[54] = c, t[55] = C, t[56] = p, t[57] = $) : $ = t[57];
|
|
2982
3052
|
let de;
|
|
2983
|
-
t[58] !== H || t[59] !== r || t[60] !== a || t[61] !== C ? (de = r === 0 ? /* @__PURE__ */
|
|
3053
|
+
t[58] !== H || t[59] !== r || t[60] !== a || t[61] !== C ? (de = r === 0 ? /* @__PURE__ */ K("div", {}) : /* @__PURE__ */ K(y, {
|
|
2984
3054
|
type: "button",
|
|
2985
3055
|
size: "sm",
|
|
2986
3056
|
variant: "secondary",
|
|
@@ -2991,7 +3061,7 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2991
3061
|
children: "Prev"
|
|
2992
3062
|
}), t[58] = H, t[59] = r, t[60] = a, t[61] = C, t[62] = de) : de = t[62];
|
|
2993
3063
|
let fe = l || J, pe = u?.styles, me = J ? H === "verifying" ? "Verifying..." : "Saving..." : C ? u?.text || "Save" : "Next", he;
|
|
2994
|
-
t[63] !== fe || t[64] !== pe || t[65] !== me ? (he = /* @__PURE__ */
|
|
3064
|
+
t[63] !== fe || t[64] !== pe || t[65] !== me ? (he = /* @__PURE__ */ K(y, {
|
|
2995
3065
|
type: "submit",
|
|
2996
3066
|
size: "sm",
|
|
2997
3067
|
disabled: fe,
|
|
@@ -2999,117 +3069,117 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2999
3069
|
children: me
|
|
3000
3070
|
}), t[63] = fe, t[64] = pe, t[65] = me, t[66] = he) : he = t[66];
|
|
3001
3071
|
let ge;
|
|
3002
|
-
t[67] !== de || t[68] !== he ? (ge = /* @__PURE__ */
|
|
3003
|
-
className:
|
|
3072
|
+
t[67] !== de || t[68] !== he ? (ge = /* @__PURE__ */ q("div", {
|
|
3073
|
+
className: ki,
|
|
3004
3074
|
children: [de, he]
|
|
3005
3075
|
}), t[67] = de, t[68] = he, t[69] = ge) : ge = t[69];
|
|
3006
3076
|
let _e;
|
|
3007
|
-
t[70] !==
|
|
3008
|
-
className:
|
|
3077
|
+
t[70] !== ue || t[71] !== $ || t[72] !== ge ? (_e = /* @__PURE__ */ q("div", {
|
|
3078
|
+
className: Ai,
|
|
3009
3079
|
children: [
|
|
3010
|
-
$,
|
|
3011
3080
|
ue,
|
|
3081
|
+
$,
|
|
3012
3082
|
ge
|
|
3013
3083
|
]
|
|
3014
|
-
}), t[70] =
|
|
3084
|
+
}), t[70] = ue, t[71] = $, t[72] = ge, t[73] = _e) : _e = t[73];
|
|
3015
3085
|
let ve;
|
|
3016
|
-
t[74] !== k || t[75] !== te || t[76] !==
|
|
3086
|
+
t[74] !== k || t[75] !== te || t[76] !== ce || t[77] !== _e ? (ve = /* @__PURE__ */ q("form", {
|
|
3017
3087
|
className: te,
|
|
3018
3088
|
id: "collection-form",
|
|
3019
3089
|
onSubmit: k,
|
|
3020
3090
|
children: [
|
|
3021
3091
|
ne,
|
|
3022
|
-
|
|
3092
|
+
ce,
|
|
3023
3093
|
_e
|
|
3024
3094
|
]
|
|
3025
|
-
}), t[74] = k, t[75] = te, t[76] =
|
|
3095
|
+
}), t[74] = k, t[75] = te, t[76] = ce, t[77] = _e, t[78] = ve) : ve = t[78];
|
|
3026
3096
|
let ye;
|
|
3027
|
-
return t[79] !== O || t[80] !== X || t[81] !== ve ? (ye = /* @__PURE__ */
|
|
3097
|
+
return t[79] !== O || t[80] !== X || t[81] !== ve ? (ye = /* @__PURE__ */ q(le, {
|
|
3028
3098
|
...O,
|
|
3029
3099
|
children: [X, ve]
|
|
3030
3100
|
}), t[79] = O, t[80] = X, t[81] = ve, t[82] = ye) : ye = t[82], ye;
|
|
3031
3101
|
};
|
|
3032
|
-
function Mi(e) {
|
|
3033
|
-
return e - 1;
|
|
3034
|
-
}
|
|
3035
3102
|
function Ni(e) {
|
|
3036
|
-
return e
|
|
3103
|
+
return e - 1;
|
|
3037
3104
|
}
|
|
3038
3105
|
function Pi(e) {
|
|
3039
|
-
return
|
|
3106
|
+
return e + 1;
|
|
3040
3107
|
}
|
|
3041
3108
|
function Fi(e) {
|
|
3109
|
+
return !o(e?.fields || []);
|
|
3110
|
+
}
|
|
3111
|
+
function Ii(e) {
|
|
3042
3112
|
return e.key;
|
|
3043
3113
|
}
|
|
3044
3114
|
//#endregion
|
|
3045
3115
|
//#region ../../libraries/react-collection/dist/lib/FormBuilder/index.js
|
|
3046
|
-
var
|
|
3116
|
+
var Li = (e) => {
|
|
3047
3117
|
let t = Z(11), n, r, i;
|
|
3048
3118
|
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);
|
|
3049
3119
|
let a = i === void 0 ? !0 : i, o;
|
|
3050
|
-
t[4] === n ? o = t[5] : (o =
|
|
3120
|
+
t[4] === n ? o = t[5] : (o = K(n === "single-field" ? gi : n === "steps" ? ji : n === "steps-2" ? wi : si, {}), t[4] = n, t[5] = o);
|
|
3051
3121
|
let s;
|
|
3052
|
-
return t[6] !== a || t[7] !== n || t[8] !== r || t[9] !== o ? (s = /* @__PURE__ */
|
|
3122
|
+
return t[6] !== a || t[7] !== n || t[8] !== r || t[9] !== o ? (s = /* @__PURE__ */ K(Er, {
|
|
3053
3123
|
...r,
|
|
3054
3124
|
enableVerification: a,
|
|
3055
3125
|
variant: n,
|
|
3056
3126
|
children: o
|
|
3057
3127
|
}), t[6] = a, t[7] = n, t[8] = r, t[9] = o, t[10] = s) : s = t[10], s;
|
|
3058
|
-
},
|
|
3128
|
+
}, Ri = "_1jed92w2", zi = "_1jed92w3 _1jed92w1", Bi = "_1jed92w4 _1jed92w1", Vi = "_1jed92w5 _1jed92w1", Hi = "_1jed92w6 _1jed92w1", Ui = () => {
|
|
3059
3129
|
let e = Z(1), t;
|
|
3060
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
3061
|
-
className:
|
|
3130
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ q("div", {
|
|
3131
|
+
className: Ri,
|
|
3062
3132
|
children: [
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("div", { className: zi }), /* @__PURE__ */ K("div", { className: Vi })] }),
|
|
3134
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("div", { className: Bi }), /* @__PURE__ */ K("div", { className: Vi })] }),
|
|
3135
|
+
/* @__PURE__ */ K("div", { className: Hi })
|
|
3066
3136
|
]
|
|
3067
3137
|
}), e[0] = t) : t = e[0], t;
|
|
3068
|
-
},
|
|
3138
|
+
}, Wi = (e) => {
|
|
3069
3139
|
let t = Z(17), n, r, i, a;
|
|
3070
3140
|
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);
|
|
3071
|
-
let o = a === void 0 ? !0 : a, { collection: s } =
|
|
3141
|
+
let o = a === void 0 ? !0 : a, { collection: s } = ae(), [c, l] = W(!0), [u, d] = W(null), f;
|
|
3072
3142
|
t[5] !== s || t[6] !== n || t[7] !== r || t[8] !== i?.workspace_id ? (f = () => {
|
|
3073
3143
|
n ? s?.getCollectionByIDExpanded(n, { headers: { "Levo-Workspace": i?.workspace_id } }).then((e) => {
|
|
3074
3144
|
let t = e?.content?.data;
|
|
3075
3145
|
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);
|
|
3076
3146
|
else throw Error(`API response invalid: ${t}`);
|
|
3077
|
-
}).catch(
|
|
3147
|
+
}).catch(Gi).finally(() => {
|
|
3078
3148
|
l(!1);
|
|
3079
3149
|
}) : (console.error("[CollectionFormBuilder] Collection ID or Workspace ID is missing."), l(!1));
|
|
3080
3150
|
}, t[5] = s, t[6] = n, t[7] = r, t[8] = i?.workspace_id, t[9] = f) : f = t[9];
|
|
3081
3151
|
let p;
|
|
3082
|
-
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p),
|
|
3152
|
+
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p), V(f, p);
|
|
3083
3153
|
let m;
|
|
3084
|
-
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */
|
|
3154
|
+
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */ K(Ui, {}) : u ? /* @__PURE__ */ K(Li, {
|
|
3085
3155
|
schema: u,
|
|
3086
3156
|
enableVerification: o,
|
|
3087
3157
|
...i
|
|
3088
3158
|
}) : null, t[12] = o, t[13] = c, t[14] = i, t[15] = u, t[16] = m) : m = t[16], m;
|
|
3089
3159
|
};
|
|
3090
|
-
function
|
|
3160
|
+
function Gi(e) {
|
|
3091
3161
|
console.error("Error fetching schema", e);
|
|
3092
3162
|
}
|
|
3093
3163
|
//#endregion
|
|
3094
3164
|
//#region ../../libraries/react-collection/dist/lib/CollectionFormRenderer/index.js
|
|
3095
|
-
var
|
|
3096
|
-
let a =
|
|
3165
|
+
var Ki = ({ hiddenFields: e, fetchedSchema: t, isLoading: n, enableVerification: r = !0, ...i }) => {
|
|
3166
|
+
let a = H(() => {
|
|
3097
3167
|
let n = { ...t };
|
|
3098
3168
|
return n.sections = n?.sections?.map((t) => (t.fields = t?.fields?.map((t) => ((e?.includes(t?.key) || e?.includes(t?.id)) && (t.hidden = !0), t)), t)), n;
|
|
3099
3169
|
}, [t]);
|
|
3100
|
-
return n ? /* @__PURE__ */
|
|
3170
|
+
return n ? /* @__PURE__ */ K(Ui, {}) : a ? /* @__PURE__ */ K(Li, {
|
|
3101
3171
|
schema: a,
|
|
3102
3172
|
enableVerification: r,
|
|
3103
3173
|
...i
|
|
3104
3174
|
}) : null;
|
|
3105
|
-
},
|
|
3106
|
-
CollectionForm: () =>
|
|
3107
|
-
CollectionFormBuilder: () =>
|
|
3108
|
-
CollectionFormRenderer: () =>
|
|
3109
|
-
FormBuilder: () =>
|
|
3110
|
-
LevoFormProvider: () =>
|
|
3111
|
-
useLevoForm: () =>
|
|
3112
|
-
useLevoFormContext: () =>
|
|
3175
|
+
}, qi = /* @__PURE__ */ e({
|
|
3176
|
+
CollectionForm: () => wr,
|
|
3177
|
+
CollectionFormBuilder: () => Wi,
|
|
3178
|
+
CollectionFormRenderer: () => Ki,
|
|
3179
|
+
FormBuilder: () => Li,
|
|
3180
|
+
LevoFormProvider: () => Er,
|
|
3181
|
+
useLevoForm: () => Mr,
|
|
3182
|
+
useLevoFormContext: () => Dr
|
|
3113
3183
|
});
|
|
3114
3184
|
//#endregion
|
|
3115
|
-
export {
|
|
3185
|
+
export { Mr as a, wr as c, fr as d, lr as f, Ot as h, Li as i, _r as l, Ht as m, Ki as n, Er as o, Vt as p, Wi as r, Dr as s, qi as t, gr as u };
|