@feedmepos/mf-brand-app-builder 0.5.18 → 0.5.19-dev.4
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/README.md +37 -18
- package/dist/{App-CKxXz-yv.js → App-DVLHiNG9.js} +7 -7
- package/dist/{AssetsSettings-D7stEXBP.js → AssetsSettings-BvM-SP-0.js} +141 -139
- package/dist/{BrandkitView-CGFsc8gN.js → BrandkitView-CblefL8X.js} +2614 -1739
- package/dist/{BuilderView-h-AD0K_z.js → BuilderView--q-5hMi3.js} +4043 -2393
- package/dist/ButtonGroup-Bj4keKPr.js +29 -0
- package/dist/{ColorPicker-BsSFgHSF.js → ColorPicker-I6CkNIxt.js} +50 -47
- package/dist/{ImageUpload-Bu1QY9Tu.js → ImageUpload-BjpONdvQ.js} +8 -8
- package/dist/{LinkButton-DS5DH9B8.js → LinkButton-DKtZH2cU.js} +1 -1
- package/dist/{ListRepeater-Bjq_VTKB.js → ListRepeater-D4MyXNOt.js} +1 -1
- package/dist/{ManagementSettings-DWh1pA_2.js → ManagementSettings-DPBoHGLa.js} +76 -75
- package/dist/{ProjectView-BweZwCAj.js → ProjectView-Crd-APxa.js} +393 -367
- package/dist/Select-DnIKki3a.js +95 -0
- package/dist/SettingsView-Cm0hTMsz.js +34 -0
- package/dist/app-BfAfuAYv.js +8693 -0
- package/dist/app.js +5 -4
- package/dist/client/components/src/views/_Credit.vue.d.ts +4 -0
- package/dist/client/components/src/views/_MemberProfile.vue.d.ts +5 -17
- package/dist/client/components/src/views/_Point.vue.d.ts +4 -0
- package/dist/client/merchant/src/api/index.d.ts +2 -0
- package/dist/client/merchant/src/app.d.ts +1544 -1
- package/dist/client/merchant/src/components/element-sidebar/ElementSidebar.vue.d.ts +1 -1
- package/dist/client/merchant/src/plugin/formkit-i18n.d.ts +2 -0
- package/dist/client/merchant/src/plugin/i18n.d.ts +2 -0
- package/dist/{image-BYlGZH0E.js → image-CBUD2SnK.js} +15 -14
- package/dist/{index-BvuwuHni.js → index-B029PiqU.js} +1 -1
- package/dist/{index-DDahVJiF.js → index-BNtn5C9X.js} +185 -184
- package/dist/{index-DBOAICnu.js → index-Bzf4Ev8B.js} +15 -15
- package/dist/{index-bSKZrhdP.js → index-CHLideqw.js} +19 -19
- package/dist/{main-pKSbpQEA.js → main-DBrQC_KK.js} +968 -939
- package/dist/package.json +4 -2
- package/dist/style.css +1 -1
- package/package.json +4 -2
- package/dist/ButtonGroup-B3ba45VA.js +0 -25
- package/dist/Select-DQrjO2Su.js +0 -91
- package/dist/SettingsView-DFAxZPug.js +0 -33
- package/dist/app-DKN3IiyF.js +0 -4757
package/dist/app-DKN3IiyF.js
DELETED
|
@@ -1,4757 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as L, defineComponent as dr, getCurrentInstance as ct, markRaw as nt, watch as Re, watchEffect as ne, reactive as Ie, onMounted as yr, onUnmounted as vn, ref as z, isRef as pt, h as mt, inject as qe, computed as me, provide as gn, toRef as hn, onBeforeUnmount as bn, nextTick as $n, triggerRef as Te, isReactive as Dt, createTextVNode as _n, resolveComponent as wn } from "vue";
|
|
2
|
-
const vo = [
|
|
3
|
-
{
|
|
4
|
-
path: "/",
|
|
5
|
-
name: "brandkit",
|
|
6
|
-
component: L(() => import("./BrandkitView-CGFsc8gN.js"))
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
path: "/projects",
|
|
10
|
-
name: "projects",
|
|
11
|
-
component: L(() => import("./ProjectView-BweZwCAj.js"))
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
path: "/builder",
|
|
15
|
-
redirect: { name: "builder" },
|
|
16
|
-
children: [
|
|
17
|
-
{
|
|
18
|
-
path: ":templateId(.*)*",
|
|
19
|
-
name: "builder",
|
|
20
|
-
component: L(
|
|
21
|
-
() => import("./BuilderView-h-AD0K_z.js")
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
path: "/settings",
|
|
28
|
-
name: "settings",
|
|
29
|
-
component: L(() => import("./SettingsView-DFAxZPug.js")),
|
|
30
|
-
redirect: { name: "settings-assets" },
|
|
31
|
-
children: [
|
|
32
|
-
{
|
|
33
|
-
path: "assets",
|
|
34
|
-
name: "settings-assets",
|
|
35
|
-
component: L(
|
|
36
|
-
() => import("./AssetsSettings-D7stEXBP.js")
|
|
37
|
-
)
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
path: "management",
|
|
41
|
-
name: "settings-management",
|
|
42
|
-
component: L(
|
|
43
|
-
() => import("./ManagementSettings-DWh1pA_2.js")
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
// temp until home view is done
|
|
49
|
-
{
|
|
50
|
-
path: "/",
|
|
51
|
-
redirect: { name: "brandkit" }
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
path: "",
|
|
55
|
-
redirect: { name: "brandkit" }
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
path: "/:pathMatch(.*)",
|
|
59
|
-
redirect: { name: "brandkit" }
|
|
60
|
-
}
|
|
61
|
-
];
|
|
62
|
-
var vr = [
|
|
63
|
-
"__key",
|
|
64
|
-
"__init",
|
|
65
|
-
"__shim",
|
|
66
|
-
"__original",
|
|
67
|
-
"__index",
|
|
68
|
-
"__prevKey"
|
|
69
|
-
];
|
|
70
|
-
function Ee() {
|
|
71
|
-
return Math.random().toString(36).substring(2, 15);
|
|
72
|
-
}
|
|
73
|
-
function kn(e, t) {
|
|
74
|
-
return [...e instanceof Set ? e : new Set(e)];
|
|
75
|
-
}
|
|
76
|
-
function P(e, t) {
|
|
77
|
-
return Object.prototype.hasOwnProperty.call(e, t);
|
|
78
|
-
}
|
|
79
|
-
function T(e, t, r = !0, n = ["__key"]) {
|
|
80
|
-
if (e === t)
|
|
81
|
-
return !0;
|
|
82
|
-
if (typeof t == "object" && typeof e == "object") {
|
|
83
|
-
if (e instanceof Map || e instanceof Set)
|
|
84
|
-
return !1;
|
|
85
|
-
if (e instanceof Date && t instanceof Date)
|
|
86
|
-
return e.getTime() === t.getTime();
|
|
87
|
-
if (e instanceof RegExp && t instanceof RegExp)
|
|
88
|
-
return Sn(e, t);
|
|
89
|
-
if (e === null || t === null || Object.keys(e).length !== Object.keys(t).length)
|
|
90
|
-
return !1;
|
|
91
|
-
for (const s of n)
|
|
92
|
-
if ((s in e || s in t) && e[s] !== t[s])
|
|
93
|
-
return !1;
|
|
94
|
-
for (const s in e)
|
|
95
|
-
if (!(s in t) || e[s] !== t[s] && !r || r && !T(e[s], t[s], r, n))
|
|
96
|
-
return !1;
|
|
97
|
-
return !0;
|
|
98
|
-
}
|
|
99
|
-
return !1;
|
|
100
|
-
}
|
|
101
|
-
function Sn(e, t) {
|
|
102
|
-
return e.source === t.source && e.flags.split("").sort().join("") === t.flags.split("").sort().join("");
|
|
103
|
-
}
|
|
104
|
-
function Z(e) {
|
|
105
|
-
const t = typeof e;
|
|
106
|
-
if (t === "number")
|
|
107
|
-
return !1;
|
|
108
|
-
if (e === void 0)
|
|
109
|
-
return !0;
|
|
110
|
-
if (t === "string")
|
|
111
|
-
return e === "";
|
|
112
|
-
if (t === "object") {
|
|
113
|
-
if (e === null)
|
|
114
|
-
return !0;
|
|
115
|
-
for (const r in e)
|
|
116
|
-
return !1;
|
|
117
|
-
return !(e instanceof RegExp || e instanceof Date);
|
|
118
|
-
}
|
|
119
|
-
return !1;
|
|
120
|
-
}
|
|
121
|
-
function An(e) {
|
|
122
|
-
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
123
|
-
}
|
|
124
|
-
function Cn(e) {
|
|
125
|
-
const t = `^${An(e)}$`, r = {
|
|
126
|
-
MM: "(0[1-9]|1[012])",
|
|
127
|
-
M: "([1-9]|1[012])",
|
|
128
|
-
DD: "([012][0-9]|3[01])",
|
|
129
|
-
D: "([012]?[0-9]|3[01])",
|
|
130
|
-
YYYY: "\\d{4}",
|
|
131
|
-
YY: "\\d{2}"
|
|
132
|
-
}, n = Object.keys(r);
|
|
133
|
-
return new RegExp(
|
|
134
|
-
n.reduce((s, i) => s.replace(i, r[i]), t)
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
function Be(e) {
|
|
138
|
-
return Object.prototype.toString.call(e) === "[object Object]";
|
|
139
|
-
}
|
|
140
|
-
function je(e) {
|
|
141
|
-
return Be(e) || Array.isArray(e);
|
|
142
|
-
}
|
|
143
|
-
function Se(e) {
|
|
144
|
-
if (Be(e) === !1 || e.__FKNode__ || e.__POJO__ === !1)
|
|
145
|
-
return !1;
|
|
146
|
-
const t = e.constructor;
|
|
147
|
-
if (t === void 0)
|
|
148
|
-
return !0;
|
|
149
|
-
const r = t.prototype;
|
|
150
|
-
return !(Be(r) === !1 || r.hasOwnProperty("isPrototypeOf") === !1);
|
|
151
|
-
}
|
|
152
|
-
var le = /* @__NO_SIDE_EFFECTS__ */ (e, t, r = !1, n = !1) => {
|
|
153
|
-
if (t === null)
|
|
154
|
-
return null;
|
|
155
|
-
const s = {};
|
|
156
|
-
if (typeof t == "string")
|
|
157
|
-
return t;
|
|
158
|
-
for (const i in e)
|
|
159
|
-
if (P(t, i) && (t[i] !== void 0 || !n)) {
|
|
160
|
-
if (r && Array.isArray(e[i]) && Array.isArray(t[i])) {
|
|
161
|
-
s[i] = e[i].concat(t[i]);
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
if (t[i] === void 0)
|
|
165
|
-
continue;
|
|
166
|
-
Se(e[i]) && Se(t[i]) ? s[i] = /* @__PURE__ */ le(
|
|
167
|
-
e[i],
|
|
168
|
-
t[i],
|
|
169
|
-
r,
|
|
170
|
-
n
|
|
171
|
-
) : s[i] = t[i];
|
|
172
|
-
} else
|
|
173
|
-
s[i] = e[i];
|
|
174
|
-
for (const i in t)
|
|
175
|
-
!P(s, i) && t[i] !== void 0 && (s[i] = t[i]);
|
|
176
|
-
return s;
|
|
177
|
-
};
|
|
178
|
-
function Pn(e) {
|
|
179
|
-
if (e[0] !== '"' && e[0] !== "'" || e[0] !== e[e.length - 1])
|
|
180
|
-
return !1;
|
|
181
|
-
const t = e[0];
|
|
182
|
-
for (let r = 1; r < e.length; r++)
|
|
183
|
-
if (e[r] === t && (r === 1 || e[r - 1] !== "\\") && r !== e.length - 1)
|
|
184
|
-
return !1;
|
|
185
|
-
return !0;
|
|
186
|
-
}
|
|
187
|
-
function En(e) {
|
|
188
|
-
if (!e.length)
|
|
189
|
-
return "";
|
|
190
|
-
let t = "", r = "";
|
|
191
|
-
for (let n = 0; n < e.length; n++) {
|
|
192
|
-
const s = e.charAt(n);
|
|
193
|
-
(s !== "\\" || r === "\\") && (t += s), r = s;
|
|
194
|
-
}
|
|
195
|
-
return t;
|
|
196
|
-
}
|
|
197
|
-
function ge(...e) {
|
|
198
|
-
return e.reduce((t, r) => {
|
|
199
|
-
const { value: n, name: s, modelValue: i, config: a, plugins: l, ...o } = r;
|
|
200
|
-
return Object.assign(t, o);
|
|
201
|
-
}, {});
|
|
202
|
-
}
|
|
203
|
-
function On(e) {
|
|
204
|
-
const t = [];
|
|
205
|
-
let r = "", n = 0, s = "", i = "";
|
|
206
|
-
for (let a = 0; a < e.length; a++) {
|
|
207
|
-
const l = e.charAt(a);
|
|
208
|
-
l === s && i !== "\\" ? s = "" : (l === "'" || l === '"') && !s && i !== "\\" ? s = l : l === "(" && !s ? n++ : l === ")" && !s && n--, l === "," && !s && n === 0 ? (t.push(r), r = "") : (l !== " " || s) && (r += l), i = l;
|
|
209
|
-
}
|
|
210
|
-
return r && t.push(r), t;
|
|
211
|
-
}
|
|
212
|
-
function Lt(e, t) {
|
|
213
|
-
const r = {}, n = t.filter((i) => i instanceof RegExp), s = new Set(t);
|
|
214
|
-
for (const i in e)
|
|
215
|
-
!s.has(i) && !n.some((a) => a.test(i)) && (r[i] = e[i]);
|
|
216
|
-
return r;
|
|
217
|
-
}
|
|
218
|
-
function qt(e, t) {
|
|
219
|
-
const r = {}, n = t.filter((s) => s instanceof RegExp);
|
|
220
|
-
return t.forEach((s) => {
|
|
221
|
-
s instanceof RegExp || (r[s] = e[s]);
|
|
222
|
-
}), Object.keys(e).forEach((s) => {
|
|
223
|
-
n.some((i) => i.test(s)) && (r[s] = e[s]);
|
|
224
|
-
}), r;
|
|
225
|
-
}
|
|
226
|
-
function $e(e) {
|
|
227
|
-
return e.replace(
|
|
228
|
-
/-([a-z0-9])/gi,
|
|
229
|
-
(t, r) => r.toUpperCase()
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
function gr(e) {
|
|
233
|
-
return e.replace(
|
|
234
|
-
/([a-z0-9])([A-Z])/g,
|
|
235
|
-
(t, r, n) => r + "-" + n.toLowerCase()
|
|
236
|
-
).replace(" ", "-").toLowerCase();
|
|
237
|
-
}
|
|
238
|
-
function dt(e, t = vr) {
|
|
239
|
-
if (e !== null && typeof e == "object") {
|
|
240
|
-
let r;
|
|
241
|
-
if (Array.isArray(e) ? r = [...e] : Se(e) && (r = { ...e }), r)
|
|
242
|
-
return Mn(e, r, t), r;
|
|
243
|
-
}
|
|
244
|
-
return e;
|
|
245
|
-
}
|
|
246
|
-
function Ae(e, t = vr) {
|
|
247
|
-
if (e === null || e instanceof RegExp || e instanceof Date || e instanceof Map || e instanceof Set || typeof File == "function" && e instanceof File)
|
|
248
|
-
return e;
|
|
249
|
-
let r;
|
|
250
|
-
Array.isArray(e) ? r = e.map((n) => typeof n == "object" ? Ae(n, t) : n) : r = Object.keys(e).reduce((n, s) => (n[s] = typeof e[s] == "object" ? Ae(e[s], t) : e[s], n), {});
|
|
251
|
-
for (const n of t)
|
|
252
|
-
n in e && Object.defineProperty(r, n, {
|
|
253
|
-
enumerable: !1,
|
|
254
|
-
value: e[n]
|
|
255
|
-
});
|
|
256
|
-
return r;
|
|
257
|
-
}
|
|
258
|
-
function B(e) {
|
|
259
|
-
return typeof e == "object" ? Ae(e) : e;
|
|
260
|
-
}
|
|
261
|
-
function In(e, t) {
|
|
262
|
-
if (!e || typeof e != "object")
|
|
263
|
-
return null;
|
|
264
|
-
const r = t.split(".");
|
|
265
|
-
let n = e;
|
|
266
|
-
for (const s in r) {
|
|
267
|
-
const i = r[s];
|
|
268
|
-
if (P(n, i) && (n = n[i]), +s === r.length - 1)
|
|
269
|
-
return n;
|
|
270
|
-
if (!n || typeof n != "object")
|
|
271
|
-
return null;
|
|
272
|
-
}
|
|
273
|
-
return null;
|
|
274
|
-
}
|
|
275
|
-
function G(e) {
|
|
276
|
-
return e !== void 0 && e !== "false" && e !== !1 ? !0 : void 0;
|
|
277
|
-
}
|
|
278
|
-
function Ce(e) {
|
|
279
|
-
return Object.isFrozen(e) ? e : Object.defineProperty(e, "__init", {
|
|
280
|
-
enumerable: !1,
|
|
281
|
-
value: !0
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
function At(e) {
|
|
285
|
-
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]/g, " ").trim().replace(/\s+/g, "-");
|
|
286
|
-
}
|
|
287
|
-
function Mn(e, t, r) {
|
|
288
|
-
for (const n of r)
|
|
289
|
-
n in e && Object.defineProperty(t, n, {
|
|
290
|
-
enumerable: !1,
|
|
291
|
-
value: e[n]
|
|
292
|
-
});
|
|
293
|
-
return t;
|
|
294
|
-
}
|
|
295
|
-
function xn(e) {
|
|
296
|
-
let t = !1;
|
|
297
|
-
return (...r) => {
|
|
298
|
-
if (!t)
|
|
299
|
-
return t = !0, queueMicrotask(() => t = !1), e(...r);
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
function Rn(e) {
|
|
303
|
-
if (!(e === "false" || e === !1))
|
|
304
|
-
return !0;
|
|
305
|
-
}
|
|
306
|
-
function Ct() {
|
|
307
|
-
const e = [];
|
|
308
|
-
let t = 0;
|
|
309
|
-
const r = (s) => e.push(s), n = (s) => {
|
|
310
|
-
const i = e[t];
|
|
311
|
-
return typeof i == "function" ? i(s, (a) => (t++, n(a))) : (t = 0, s);
|
|
312
|
-
};
|
|
313
|
-
return r.dispatch = n, r.unshift = (s) => e.unshift(s), r.remove = (s) => {
|
|
314
|
-
const i = e.indexOf(s);
|
|
315
|
-
i > -1 && e.splice(i, 1);
|
|
316
|
-
}, r;
|
|
317
|
-
}
|
|
318
|
-
function hr() {
|
|
319
|
-
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
320
|
-
let r;
|
|
321
|
-
const n = (s, i) => {
|
|
322
|
-
if (r) {
|
|
323
|
-
r.set(i.name, [s, i]);
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
e.has(i.name) && e.get(i.name).forEach((a) => {
|
|
327
|
-
(i.origin === s || a.modifiers.includes("deep")) && a.listener(i);
|
|
328
|
-
}), i.bubble && s.bubble(i);
|
|
329
|
-
};
|
|
330
|
-
return n.flush = () => {
|
|
331
|
-
e.clear(), t.clear(), r == null || r.clear();
|
|
332
|
-
}, n.on = (s, i, a = "push") => {
|
|
333
|
-
const [l, ...o] = s.split("."), y = i.receipt || Ee(), v = {
|
|
334
|
-
modifiers: o,
|
|
335
|
-
event: l,
|
|
336
|
-
listener: i,
|
|
337
|
-
receipt: y
|
|
338
|
-
};
|
|
339
|
-
return e.has(l) ? e.get(l)[a](v) : e.set(l, [v]), t.has(y) ? t.get(y)[a](l) : t.set(y, [l]), y;
|
|
340
|
-
}, n.off = (s) => {
|
|
341
|
-
var i;
|
|
342
|
-
t.has(s) && ((i = t.get(s)) == null || i.forEach((a) => {
|
|
343
|
-
const l = e.get(a);
|
|
344
|
-
Array.isArray(l) && e.set(
|
|
345
|
-
a,
|
|
346
|
-
l.filter((o) => o.receipt !== s)
|
|
347
|
-
);
|
|
348
|
-
}), t.delete(s));
|
|
349
|
-
}, n.pause = (s) => {
|
|
350
|
-
r || (r = /* @__PURE__ */ new Map()), s && s.walk((i) => i._e.pause());
|
|
351
|
-
}, n.play = (s) => {
|
|
352
|
-
if (!r)
|
|
353
|
-
return;
|
|
354
|
-
const i = r;
|
|
355
|
-
r = void 0, i.forEach(([a, l]) => n(a, l)), s && s.walk((a) => a._e.play());
|
|
356
|
-
}, n;
|
|
357
|
-
}
|
|
358
|
-
function jn(e, t, r, n, s = !0, i) {
|
|
359
|
-
return t._e(e, {
|
|
360
|
-
payload: n,
|
|
361
|
-
name: r,
|
|
362
|
-
bubble: s,
|
|
363
|
-
origin: e,
|
|
364
|
-
meta: i
|
|
365
|
-
}), e;
|
|
366
|
-
}
|
|
367
|
-
function Fn(e, t, r) {
|
|
368
|
-
return Ne(e.parent) && e.parent._e(e.parent, r), e;
|
|
369
|
-
}
|
|
370
|
-
function Vn(e, t, r, n, s) {
|
|
371
|
-
return t._e.on(r, n, s);
|
|
372
|
-
}
|
|
373
|
-
function Nn(e, t, r) {
|
|
374
|
-
return t._e.off(r), e;
|
|
375
|
-
}
|
|
376
|
-
var Pt = Ct();
|
|
377
|
-
Pt((e, t) => (e.message || (e.message = `E${e.code}`), t(e)));
|
|
378
|
-
var Et = Ct();
|
|
379
|
-
Et((e, t) => {
|
|
380
|
-
e.message || (e.message = `W${e.code}`);
|
|
381
|
-
const r = t(e);
|
|
382
|
-
return console && typeof console.warn == "function" && console.warn(r.message), r;
|
|
383
|
-
});
|
|
384
|
-
function ye(e, t = {}) {
|
|
385
|
-
Et.dispatch({ code: e, data: t });
|
|
386
|
-
}
|
|
387
|
-
function W(e, t = {}) {
|
|
388
|
-
throw Error(Pt.dispatch({ code: e, data: t }).message);
|
|
389
|
-
}
|
|
390
|
-
function H(e, t) {
|
|
391
|
-
return {
|
|
392
|
-
blocking: !1,
|
|
393
|
-
key: Ee(),
|
|
394
|
-
meta: {},
|
|
395
|
-
type: "state",
|
|
396
|
-
visible: !0,
|
|
397
|
-
...e
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
var Tt = {
|
|
401
|
-
apply: zn,
|
|
402
|
-
set: Ln,
|
|
403
|
-
remove: br,
|
|
404
|
-
filter: Tn,
|
|
405
|
-
reduce: Kn,
|
|
406
|
-
release: Un,
|
|
407
|
-
touch: qn
|
|
408
|
-
};
|
|
409
|
-
function Dn(e = !1) {
|
|
410
|
-
const t = {};
|
|
411
|
-
let r, n = e, s = [];
|
|
412
|
-
const i = /* @__PURE__ */ new Map();
|
|
413
|
-
let a;
|
|
414
|
-
const l = new Proxy(t, {
|
|
415
|
-
get(...o) {
|
|
416
|
-
const [y, v] = o;
|
|
417
|
-
return v === "buffer" ? n : v === "_b" ? s : v === "_m" ? i : v === "_r" ? a : P(Tt, v) ? Tt[v].bind(
|
|
418
|
-
null,
|
|
419
|
-
t,
|
|
420
|
-
l,
|
|
421
|
-
r
|
|
422
|
-
) : Reflect.get(...o);
|
|
423
|
-
},
|
|
424
|
-
set(o, y, v) {
|
|
425
|
-
return y === "_n" ? (r = v, a === "__n" && $r(r, l), !0) : y === "_b" ? (s = v, !0) : y === "buffer" ? (n = v, !0) : y === "_r" ? (a = v, !0) : (W(101, r), !1);
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
return l;
|
|
429
|
-
}
|
|
430
|
-
function Ln(e, t, r, n) {
|
|
431
|
-
if (t.buffer)
|
|
432
|
-
return t._b.push([[n]]), t;
|
|
433
|
-
if (e[n.key] !== n) {
|
|
434
|
-
if (typeof n.value == "string" && n.meta.localize !== !1) {
|
|
435
|
-
const i = n.value;
|
|
436
|
-
n.value = r.t(n), n.value !== i && (n.meta.locale = r.props.locale);
|
|
437
|
-
}
|
|
438
|
-
const s = `message-${P(e, n.key) ? "updated" : "added"}`;
|
|
439
|
-
e[n.key] = Object.freeze(
|
|
440
|
-
r.hook.message.dispatch(n)
|
|
441
|
-
), r.emit(s, n);
|
|
442
|
-
}
|
|
443
|
-
return t;
|
|
444
|
-
}
|
|
445
|
-
function qn(e, t) {
|
|
446
|
-
for (const r in e) {
|
|
447
|
-
const n = { ...e[r] };
|
|
448
|
-
t.set(n);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
function br(e, t, r, n) {
|
|
452
|
-
if (P(e, n)) {
|
|
453
|
-
const s = e[n];
|
|
454
|
-
delete e[n], r.emit("message-removed", s);
|
|
455
|
-
}
|
|
456
|
-
return t.buffer === !0 && (t._b = t._b.filter((s) => (s[0] = s[0].filter((i) => i.key !== n), s[1] || s[0].length))), t;
|
|
457
|
-
}
|
|
458
|
-
function Tn(e, t, r, n, s) {
|
|
459
|
-
for (const i in e) {
|
|
460
|
-
const a = e[i];
|
|
461
|
-
(!s || a.type === s) && !n(a) && br(e, t, r, i);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
function Kn(e, t, r, n, s) {
|
|
465
|
-
for (const i in e) {
|
|
466
|
-
const a = e[i];
|
|
467
|
-
s = n(s, a);
|
|
468
|
-
}
|
|
469
|
-
return s;
|
|
470
|
-
}
|
|
471
|
-
function zn(e, t, r, n, s) {
|
|
472
|
-
if (Array.isArray(n)) {
|
|
473
|
-
if (t.buffer) {
|
|
474
|
-
t._b.push([n, s]);
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
const i = new Set(
|
|
478
|
-
n.map((a) => (t.set(a), a.key))
|
|
479
|
-
);
|
|
480
|
-
typeof s == "string" ? t.filter(
|
|
481
|
-
(a) => a.type !== s || i.has(a.key)
|
|
482
|
-
) : typeof s == "function" && t.filter((a) => !s(a) || i.has(a.key));
|
|
483
|
-
} else
|
|
484
|
-
for (const i in n) {
|
|
485
|
-
const a = r.at(i);
|
|
486
|
-
a ? a.store.apply(n[i], s) : Hn(r, t, i, n[i], s);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
function Wn(e, ...t) {
|
|
490
|
-
const r = `${e.name}-set`, n = (s) => /* @__PURE__ */ H({
|
|
491
|
-
key: At(s),
|
|
492
|
-
type: "error",
|
|
493
|
-
value: s,
|
|
494
|
-
meta: { source: r, autoClear: !0 }
|
|
495
|
-
});
|
|
496
|
-
return t.filter((s) => !!s).map((s) => {
|
|
497
|
-
if (typeof s == "string" && (s = [s]), Array.isArray(s))
|
|
498
|
-
return s.map((i) => n(i));
|
|
499
|
-
{
|
|
500
|
-
const i = {};
|
|
501
|
-
for (const a in s)
|
|
502
|
-
Array.isArray(s[a]) ? i[a] = s[a].map(
|
|
503
|
-
(l) => n(l)
|
|
504
|
-
) : i[a] = [n(s[a])];
|
|
505
|
-
return i;
|
|
506
|
-
}
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
function Hn(e, t, r, n, s) {
|
|
510
|
-
var a;
|
|
511
|
-
const i = t._m;
|
|
512
|
-
i.has(r) || i.set(r, []), t._r || (t._r = $r(e, t)), (a = i.get(r)) == null || a.push([n, s]);
|
|
513
|
-
}
|
|
514
|
-
function $r(e, t) {
|
|
515
|
-
return e.on(
|
|
516
|
-
"child.deep",
|
|
517
|
-
({ payload: r }) => {
|
|
518
|
-
t._m.forEach((n, s) => {
|
|
519
|
-
e.at(s) === r && (n.forEach(([i, a]) => {
|
|
520
|
-
r.store.apply(i, a);
|
|
521
|
-
}), t._m.delete(s));
|
|
522
|
-
}), t._m.size === 0 && t._r && (e.off(t._r), t._r = void 0);
|
|
523
|
-
}
|
|
524
|
-
);
|
|
525
|
-
}
|
|
526
|
-
function Un(e, t) {
|
|
527
|
-
t.buffer = !1, t._b.forEach(([r, n]) => t.apply(r, n)), t._b = [];
|
|
528
|
-
}
|
|
529
|
-
function Bn() {
|
|
530
|
-
const e = {};
|
|
531
|
-
let t;
|
|
532
|
-
return {
|
|
533
|
-
count: (...r) => Zn(t, e, ...r),
|
|
534
|
-
init(r) {
|
|
535
|
-
t = r, r.on("message-added.deep", Kt(e, 1)), r.on("message-removed.deep", Kt(e, -1));
|
|
536
|
-
},
|
|
537
|
-
merge: (r) => zt(t, e, r),
|
|
538
|
-
settled(r) {
|
|
539
|
-
return P(e, r) ? e[r].promise : Promise.resolve();
|
|
540
|
-
},
|
|
541
|
-
unmerge: (r) => zt(t, e, r, !0),
|
|
542
|
-
value(r) {
|
|
543
|
-
return P(e, r) ? e[r].count : 0;
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
function Zn(e, t, r, n, s = 0) {
|
|
548
|
-
if (n = Yn(n || r), !P(t, r)) {
|
|
549
|
-
const i = {
|
|
550
|
-
condition: n,
|
|
551
|
-
count: 0,
|
|
552
|
-
name: r,
|
|
553
|
-
node: e,
|
|
554
|
-
promise: Promise.resolve(),
|
|
555
|
-
resolve: () => {
|
|
556
|
-
}
|
|
557
|
-
// eslint-disable-line @typescript-eslint/no-empty-function
|
|
558
|
-
};
|
|
559
|
-
t[r] = i, s = e.store.reduce(
|
|
560
|
-
(a, l) => a + i.condition(l) * 1,
|
|
561
|
-
s
|
|
562
|
-
), e.each((a) => {
|
|
563
|
-
a.ledger.count(i.name, i.condition), s += a.ledger.value(i.name);
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
return _r(t[r], s).promise;
|
|
567
|
-
}
|
|
568
|
-
function Yn(e) {
|
|
569
|
-
return typeof e == "function" ? e : (t) => t.type === e;
|
|
570
|
-
}
|
|
571
|
-
function _r(e, t) {
|
|
572
|
-
const r = e.count, n = e.count + t;
|
|
573
|
-
return e.count = n, r === 0 && n !== 0 ? (e.node.emit(`unsettled:${e.name}`, e.count, !1), e.promise = new Promise((s) => e.resolve = s)) : r !== 0 && n === 0 && (e.node.emit(`settled:${e.name}`, e.count, !1), e.resolve()), e.node.emit(`count:${e.name}`, e.count, !1), e;
|
|
574
|
-
}
|
|
575
|
-
function Kt(e, t) {
|
|
576
|
-
return (r) => {
|
|
577
|
-
for (const n in e) {
|
|
578
|
-
const s = e[n];
|
|
579
|
-
s.condition(r.payload) && _r(s, t);
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
function zt(e, t, r, n = !1) {
|
|
584
|
-
const s = e;
|
|
585
|
-
for (const i in t) {
|
|
586
|
-
const a = t[i].condition;
|
|
587
|
-
n || r.ledger.count(i, a);
|
|
588
|
-
const l = r.ledger.value(i) * (n ? -1 : 1);
|
|
589
|
-
if (e) {
|
|
590
|
-
do
|
|
591
|
-
e.ledger.count(i, a, l), e = e.parent;
|
|
592
|
-
while (e);
|
|
593
|
-
e = s;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
var Ot = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), It = hr();
|
|
598
|
-
function Gn(e) {
|
|
599
|
-
e.props.id && (Ot.set(e.props.id, e), ze.set(e, e.props.id), It(e, {
|
|
600
|
-
payload: e,
|
|
601
|
-
name: e.props.id,
|
|
602
|
-
bubble: !1,
|
|
603
|
-
origin: e
|
|
604
|
-
}));
|
|
605
|
-
}
|
|
606
|
-
function Jn(e) {
|
|
607
|
-
if (ze.has(e)) {
|
|
608
|
-
const t = ze.get(e);
|
|
609
|
-
ze.delete(e), Ot.delete(t), It(e, {
|
|
610
|
-
payload: null,
|
|
611
|
-
name: t,
|
|
612
|
-
bubble: !1,
|
|
613
|
-
origin: e
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
function Ve(e) {
|
|
618
|
-
return Ot.get(e);
|
|
619
|
-
}
|
|
620
|
-
function Qn(e, t) {
|
|
621
|
-
return It.on(e, t);
|
|
622
|
-
}
|
|
623
|
-
function yt(e, t, r) {
|
|
624
|
-
let n = !0;
|
|
625
|
-
return t in e.config._t ? n = !1 : e.emit(`config:${t}`, r, !1), t in e.props || (e.emit("prop", { prop: t, value: r }), e.emit(`prop:${t}`, r)), n;
|
|
626
|
-
}
|
|
627
|
-
function Xn(e = {}) {
|
|
628
|
-
const t = /* @__PURE__ */ new Set(), r = {
|
|
629
|
-
...e,
|
|
630
|
-
_add: (s) => t.add(s),
|
|
631
|
-
_rm: (s) => t.delete(s)
|
|
632
|
-
};
|
|
633
|
-
return new Proxy(r, {
|
|
634
|
-
set(s, i, a, l) {
|
|
635
|
-
return typeof i == "string" && t.forEach((o) => yt(o, i, a)), Reflect.set(s, i, a, l);
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
function wr(e, t) {
|
|
640
|
-
const r = (t || document).getElementById(e);
|
|
641
|
-
if (r instanceof HTMLFormElement) {
|
|
642
|
-
const n = new Event("submit", { cancelable: !0, bubbles: !0 });
|
|
643
|
-
r.dispatchEvent(n);
|
|
644
|
-
return;
|
|
645
|
-
}
|
|
646
|
-
ye(151, e);
|
|
647
|
-
}
|
|
648
|
-
function es(e) {
|
|
649
|
-
const t = (r) => {
|
|
650
|
-
for (const n in r.store) {
|
|
651
|
-
const s = r.store[n];
|
|
652
|
-
s.type === "error" || s.type === "ui" && n === "incomplete" ? r.store.remove(n) : s.type === "state" && r.store.set({ ...s, value: !1 });
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
t(e), e.walk(t);
|
|
656
|
-
}
|
|
657
|
-
function kr(e, t) {
|
|
658
|
-
const r = typeof e == "string" ? Ve(e) : e;
|
|
659
|
-
if (r) {
|
|
660
|
-
const n = (a) => {
|
|
661
|
-
const l = B(a.props.initial);
|
|
662
|
-
return l !== void 0 ? l : a.type === "group" ? {} : a.type === "list" ? [] : void 0;
|
|
663
|
-
};
|
|
664
|
-
r._e.pause(r);
|
|
665
|
-
const s = B(t);
|
|
666
|
-
return t && !Z(t) && (r.props.initial = je(s) ? Ce(s) : s, r.props._init = r.props.initial), r.input(n(r), !1), r.walk((a) => {
|
|
667
|
-
a.type === "list" && a.sync || a.input(n(a), !1);
|
|
668
|
-
}), r.input(
|
|
669
|
-
Z(s) && s ? s : n(r),
|
|
670
|
-
!1
|
|
671
|
-
), r.type !== "input" && t && !Z(t) && je(t) && r.walk((a) => {
|
|
672
|
-
a.props.initial = je(a.value) ? Ce(a.value) : a.value, a.props._init = a.props.initial;
|
|
673
|
-
}), r._e.play(r), es(r), r.emit("reset", r), r;
|
|
674
|
-
}
|
|
675
|
-
ye(152, e);
|
|
676
|
-
}
|
|
677
|
-
var ts = {
|
|
678
|
-
delimiter: ".",
|
|
679
|
-
delay: 0,
|
|
680
|
-
locale: "en",
|
|
681
|
-
rootClasses: (e) => ({ [`formkit-${gr(e)}`]: !0 })
|
|
682
|
-
}, Sr = Symbol("index"), vt = Symbol("removed"), gt = Symbol("moved"), Ar = Symbol("inserted");
|
|
683
|
-
function rs(e) {
|
|
684
|
-
return e.type === "list" && Array.isArray(e._value);
|
|
685
|
-
}
|
|
686
|
-
function Ne(e) {
|
|
687
|
-
return e && typeof e == "object" && e.__FKNode__ === !0;
|
|
688
|
-
}
|
|
689
|
-
var We = (e, t, r) => {
|
|
690
|
-
W(102, [e, r]);
|
|
691
|
-
}, ns = {
|
|
692
|
-
_c: x(Ss, We, !1),
|
|
693
|
-
add: x(vs),
|
|
694
|
-
addProps: x(ys),
|
|
695
|
-
address: x(Cs, We, !1),
|
|
696
|
-
at: x(Ps),
|
|
697
|
-
bubble: x(Fn),
|
|
698
|
-
clearErrors: x(Vs),
|
|
699
|
-
calm: x(ps),
|
|
700
|
-
config: x(!1),
|
|
701
|
-
define: x(ds),
|
|
702
|
-
disturb: x(cs),
|
|
703
|
-
destroy: x(ms),
|
|
704
|
-
extend: x(Ds),
|
|
705
|
-
hydrate: x(us),
|
|
706
|
-
index: x(ks, ws, !1),
|
|
707
|
-
input: x(Er),
|
|
708
|
-
each: x(bs),
|
|
709
|
-
emit: x(jn),
|
|
710
|
-
find: x(Os),
|
|
711
|
-
on: x(Vn),
|
|
712
|
-
off: x(Nn),
|
|
713
|
-
parent: x(!1, gs),
|
|
714
|
-
plugins: x(!1),
|
|
715
|
-
remove: x(hs),
|
|
716
|
-
root: x(Ms, We, !1),
|
|
717
|
-
reset: x(js),
|
|
718
|
-
resetConfig: x(_s),
|
|
719
|
-
setErrors: x(Fs),
|
|
720
|
-
submit: x(Rs),
|
|
721
|
-
t: x(xs),
|
|
722
|
-
use: x(Mt),
|
|
723
|
-
name: x(As, !1, !1),
|
|
724
|
-
walk: x($s)
|
|
725
|
-
};
|
|
726
|
-
function ss() {
|
|
727
|
-
return new Map(Object.entries(ns));
|
|
728
|
-
}
|
|
729
|
-
function x(e, t, r = !0) {
|
|
730
|
-
return {
|
|
731
|
-
get: e ? (n, s) => r ? (...i) => e(n, s, ...i) : e(n, s) : !1,
|
|
732
|
-
set: t !== void 0 ? t : We.bind(null)
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
function is() {
|
|
736
|
-
const e = /* @__PURE__ */ new Map();
|
|
737
|
-
return new Proxy(e, {
|
|
738
|
-
get(t, r) {
|
|
739
|
-
return e.has(r) || e.set(r, Ct()), e.get(r);
|
|
740
|
-
}
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
var Cr = 0, as = 0;
|
|
744
|
-
function ls(e) {
|
|
745
|
-
var t, r;
|
|
746
|
-
return ((t = e.parent) == null ? void 0 : t.type) === "list" ? Sr : e.name || `${((r = e.props) == null ? void 0 : r.type) || "input"}_${++Cr}`;
|
|
747
|
-
}
|
|
748
|
-
function Pr(e) {
|
|
749
|
-
return e.type === "group" ? Ce(
|
|
750
|
-
e.value && typeof e.value == "object" && !Array.isArray(e.value) ? e.value : {}
|
|
751
|
-
) : e.type === "list" ? Ce(Array.isArray(e.value) ? e.value : []) : e.value;
|
|
752
|
-
}
|
|
753
|
-
function Er(e, t, r, n = !0) {
|
|
754
|
-
return t._value = os(e, e.hook.input.dispatch(r)), e.emit("input", t._value), e.isCreated && e.type === "input" && T(t._value, t.value) && !e.props.mergeStrategy ? (e.emit("commitRaw", t.value), t.settled) : (t.isSettled && e.disturb(), n ? (t._tmo && clearTimeout(t._tmo), t._tmo = setTimeout(
|
|
755
|
-
Ze,
|
|
756
|
-
e.props.delay,
|
|
757
|
-
e,
|
|
758
|
-
t
|
|
759
|
-
)) : Ze(e, t), t.settled);
|
|
760
|
-
}
|
|
761
|
-
function os(e, t) {
|
|
762
|
-
switch (e.type) {
|
|
763
|
-
case "input":
|
|
764
|
-
break;
|
|
765
|
-
case "group":
|
|
766
|
-
(!t || typeof t != "object") && W(107, [e, t]);
|
|
767
|
-
break;
|
|
768
|
-
case "list":
|
|
769
|
-
Array.isArray(t) || W(108, [e, t]);
|
|
770
|
-
break;
|
|
771
|
-
}
|
|
772
|
-
return t;
|
|
773
|
-
}
|
|
774
|
-
function Ze(e, t, r = !0, n = !0) {
|
|
775
|
-
t._value = t.value = e.hook.commit.dispatch(t._value), e.type !== "input" && n && e.hydrate(), e.emit("commitRaw", t.value), e.emit("commit", t.value), r && e.calm();
|
|
776
|
-
}
|
|
777
|
-
function Or(e, { name: t, value: r, from: n }) {
|
|
778
|
-
if (!Object.isFrozen(e._value)) {
|
|
779
|
-
if (rs(e)) {
|
|
780
|
-
const s = r === vt ? [] : r === gt && typeof n == "number" ? e._value.splice(n, 1) : [r];
|
|
781
|
-
e._value.splice(
|
|
782
|
-
t,
|
|
783
|
-
r === gt || n === Ar ? 0 : 1,
|
|
784
|
-
...s
|
|
785
|
-
);
|
|
786
|
-
return;
|
|
787
|
-
}
|
|
788
|
-
r !== vt ? e._value[t] = r : delete e._value[t];
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
function us(e, t) {
|
|
792
|
-
const r = t._value;
|
|
793
|
-
return e.type === "list" && e.sync && fs(e, t), t.children.forEach((n) => {
|
|
794
|
-
if (typeof r == "object")
|
|
795
|
-
if (n.name in r) {
|
|
796
|
-
const s = n.type !== "input" || r[n.name] && typeof r[n.name] == "object" ? Ce(r[n.name]) : r[n.name];
|
|
797
|
-
if (!n.isSettled || (!je(s) || n.props.mergeStrategy) && T(s, n._value))
|
|
798
|
-
return;
|
|
799
|
-
n.input(s, !1);
|
|
800
|
-
} else
|
|
801
|
-
(e.type !== "list" || typeof n.name == "number") && Or(t, { name: n.name, value: n.value }), r.__init || (n.type === "group" ? n.input({}, !1) : n.type === "list" ? n.input([], !1) : n.input(void 0, !1));
|
|
802
|
-
}), e;
|
|
803
|
-
}
|
|
804
|
-
function fs(e, t) {
|
|
805
|
-
const r = e._value;
|
|
806
|
-
if (!Array.isArray(r))
|
|
807
|
-
return;
|
|
808
|
-
const n = [], s = new Set(t.children), i = /* @__PURE__ */ new Map();
|
|
809
|
-
r.forEach((l, o) => {
|
|
810
|
-
if (t.children[o] && t.children[o]._value === l)
|
|
811
|
-
n.push(t.children[o]), s.delete(t.children[o]);
|
|
812
|
-
else {
|
|
813
|
-
n.push(null);
|
|
814
|
-
const y = i.get(l) || [];
|
|
815
|
-
y.push(o), i.set(l, y);
|
|
816
|
-
}
|
|
817
|
-
}), s.size && i.size && s.forEach((l) => {
|
|
818
|
-
if (i.has(l._value)) {
|
|
819
|
-
const o = i.get(l._value), y = o.shift();
|
|
820
|
-
n[y] = l, s.delete(l), o.length || i.delete(l._value);
|
|
821
|
-
}
|
|
822
|
-
});
|
|
823
|
-
const a = [];
|
|
824
|
-
for (i.forEach((l) => {
|
|
825
|
-
a.push(...l);
|
|
826
|
-
}); s.size && a.length; ) {
|
|
827
|
-
const l = s.values().next().value, o = a.shift();
|
|
828
|
-
if (o === void 0)
|
|
829
|
-
break;
|
|
830
|
-
n[o] = l, s.delete(l);
|
|
831
|
-
}
|
|
832
|
-
a.forEach((l, o) => {
|
|
833
|
-
n[l] = Ks({ value: o });
|
|
834
|
-
}), s.size && s.forEach((l) => {
|
|
835
|
-
if (!("__FKP" in l)) {
|
|
836
|
-
const o = l._c.parent;
|
|
837
|
-
if (!o || zs(o))
|
|
838
|
-
return;
|
|
839
|
-
o.ledger.unmerge(l), l._c.parent = null, l.destroy();
|
|
840
|
-
}
|
|
841
|
-
}), t.children = n;
|
|
842
|
-
}
|
|
843
|
-
function cs(e, t) {
|
|
844
|
-
var r;
|
|
845
|
-
return t._d <= 0 && (t.isSettled = !1, e.emit("settled", !1, !1), t.settled = new Promise((n) => {
|
|
846
|
-
t._resolve = n;
|
|
847
|
-
}), e.parent && ((r = e.parent) == null || r.disturb())), t._d++, e;
|
|
848
|
-
}
|
|
849
|
-
function ps(e, t, r) {
|
|
850
|
-
var n;
|
|
851
|
-
if (r !== void 0 && e.type !== "input") {
|
|
852
|
-
Or(t, r);
|
|
853
|
-
const s = !!(e.config.mergeStrategy && e.config.mergeStrategy[r.name]);
|
|
854
|
-
return Ze(e, t, !0, s);
|
|
855
|
-
}
|
|
856
|
-
t._d > 0 && t._d--, t._d === 0 && (t.isSettled = !0, e.emit("settled", !0, !1), e.parent && ((n = e.parent) == null || n.calm({ name: e.name, value: t.value })), t._resolve && t._resolve(t.value));
|
|
857
|
-
}
|
|
858
|
-
function ms(e, t) {
|
|
859
|
-
e.emit("destroying", e), e.store.filter(() => !1), e.parent && e.parent.remove(e), Jn(e), e.emit("destroyed", e), t._e.flush(), t._value = t.value = void 0;
|
|
860
|
-
for (const r in t.context)
|
|
861
|
-
delete t.context[r];
|
|
862
|
-
t.plugins.clear(), t.context = null;
|
|
863
|
-
}
|
|
864
|
-
function ds(e, t, r) {
|
|
865
|
-
t.type = r.type;
|
|
866
|
-
const n = Ae(r);
|
|
867
|
-
e.props.__propDefs = Ir(
|
|
868
|
-
e.props.__propDefs ?? [],
|
|
869
|
-
(n == null ? void 0 : n.props) || []
|
|
870
|
-
), n.props = e.props.__propDefs, t.props.definition = n, t.value = t._value = Pr({
|
|
871
|
-
type: e.type,
|
|
872
|
-
value: t.value
|
|
873
|
-
}), r.forceTypeProp && (e.props.type && (e.props.originalType = e.props.type), t.props.type = r.forceTypeProp), r.family && (t.props.family = r.family), r.features && r.features.forEach((s) => s(e)), r.props && e.addProps(r.props), e.emit("defined", r);
|
|
874
|
-
}
|
|
875
|
-
function ys(e, t, r) {
|
|
876
|
-
const n = Array.isArray(r) ? r : Object.keys(r), s = Array.isArray(r) ? {} : n.reduce((a, l) => ("default" in r[l] && (a[l] = r[l].default), a), {});
|
|
877
|
-
if (e.props.attrs) {
|
|
878
|
-
const a = { ...e.props.attrs };
|
|
879
|
-
e.props._emit = !1;
|
|
880
|
-
for (const o in a) {
|
|
881
|
-
const y = $e(o);
|
|
882
|
-
n.includes(y) && (e.props[y] = a[o], delete a[o]);
|
|
883
|
-
}
|
|
884
|
-
Array.isArray(r) || n.forEach((o) => {
|
|
885
|
-
"default" in r[o] && e.props[o] === void 0 && (e.props[o] = s[o]);
|
|
886
|
-
});
|
|
887
|
-
const l = B(t._value);
|
|
888
|
-
e.props.initial = e.type !== "input" ? Ce(l) : l, e.props._emit = !0, e.props.attrs = a;
|
|
889
|
-
}
|
|
890
|
-
const i = Ir(e.props.__propDefs ?? [], r);
|
|
891
|
-
return e.props.definition && (e.props.definition.props = i), e.props.__propDefs = i, e.emit("added-props", r), e;
|
|
892
|
-
}
|
|
893
|
-
function ht(e) {
|
|
894
|
-
return Array.isArray(e) ? e.reduce((t, r) => (t[r] = {}, t), {}) : e;
|
|
895
|
-
}
|
|
896
|
-
function Ir(e, t) {
|
|
897
|
-
return Array.isArray(e) && Array.isArray(t) ? e.concat(t) : le(ht(e), ht(t));
|
|
898
|
-
}
|
|
899
|
-
function vs(e, t, r, n) {
|
|
900
|
-
if (e.type === "input" && W(100, e), r.parent && r.parent !== e && r.parent.remove(r), !t.children.includes(r)) {
|
|
901
|
-
if (n !== void 0 && e.type === "list") {
|
|
902
|
-
const s = t.children[n];
|
|
903
|
-
s && "__FKP" in s ? (r._c.uid = s.uid, t.children.splice(n, 1, r)) : t.children.splice(n, 0, r), Array.isArray(e.value) && e.value.length < t.children.length && e.disturb().calm({
|
|
904
|
-
name: n,
|
|
905
|
-
value: r.value,
|
|
906
|
-
from: Ar
|
|
907
|
-
});
|
|
908
|
-
} else
|
|
909
|
-
t.children.push(r);
|
|
910
|
-
r.isSettled || e.disturb();
|
|
911
|
-
}
|
|
912
|
-
if (r.parent !== e) {
|
|
913
|
-
if (r.parent = e, r.parent !== e)
|
|
914
|
-
return e.remove(r), r.parent.add(r), e;
|
|
915
|
-
} else
|
|
916
|
-
r.use(e.plugins);
|
|
917
|
-
return Ze(e, t, !1), e.ledger.merge(r), e.emit("child", r), e;
|
|
918
|
-
}
|
|
919
|
-
function gs(e, t, r, n) {
|
|
920
|
-
return Ne(n) ? (e.parent && e.parent !== n && e.parent.remove(e), t.parent = n, e.resetConfig(), n.children.includes(e) ? e.use(n.plugins) : n.add(e), !0) : n === null ? (t.parent = null, !0) : !1;
|
|
921
|
-
}
|
|
922
|
-
function hs(e, t, r) {
|
|
923
|
-
const n = t.children.indexOf(r);
|
|
924
|
-
if (n !== -1) {
|
|
925
|
-
r.isSettled && e.disturb(), t.children.splice(n, 1);
|
|
926
|
-
let s = G(r.props.preserve), i = r.parent;
|
|
927
|
-
for (; s === void 0 && i; )
|
|
928
|
-
s = G(i.props.preserve), i = i.parent;
|
|
929
|
-
s ? e.calm() : e.calm({
|
|
930
|
-
name: e.type === "list" ? n : r.name,
|
|
931
|
-
value: vt
|
|
932
|
-
}), r.parent = null, r.config._rmn = r;
|
|
933
|
-
}
|
|
934
|
-
return e.ledger.unmerge(r), e.emit("childRemoved", r), e;
|
|
935
|
-
}
|
|
936
|
-
function bs(e, t, r) {
|
|
937
|
-
t.children.forEach((n) => !("__FKP" in n) && r(n));
|
|
938
|
-
}
|
|
939
|
-
function $s(e, t, r, n = !1, s = !1) {
|
|
940
|
-
t.children.some((i) => {
|
|
941
|
-
if ("__FKP" in i)
|
|
942
|
-
return !1;
|
|
943
|
-
const a = r(i);
|
|
944
|
-
return n && a === !1 ? !0 : s && a === !1 ? !1 : i.walk(r, n, s);
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
function _s(e, t) {
|
|
948
|
-
const r = e.parent || void 0;
|
|
949
|
-
t.config = Mr(e.config._t, r), e.walk((n) => n.resetConfig());
|
|
950
|
-
}
|
|
951
|
-
function Mt(e, t, r, n = !0, s = !0) {
|
|
952
|
-
return Array.isArray(r) || r instanceof Set ? (r.forEach((i) => Mt(e, t, i)), e) : (t.plugins.has(r) || (s && typeof r.library == "function" && r.library(e), n && r(e) !== !1 && (t.plugins.add(r), e.children.forEach((i) => i.use(r)))), e);
|
|
953
|
-
}
|
|
954
|
-
function ws(e, t, r, n) {
|
|
955
|
-
if (Ne(e.parent)) {
|
|
956
|
-
const s = e.parent.children, i = n >= s.length ? s.length - 1 : n < 0 ? 0 : n, a = s.indexOf(e);
|
|
957
|
-
return a === -1 ? !1 : (s.splice(a, 1), s.splice(i, 0, e), e.parent.children = s, e.parent.type === "list" && e.parent.disturb().calm({ name: i, value: gt, from: a }), !0);
|
|
958
|
-
}
|
|
959
|
-
return !1;
|
|
960
|
-
}
|
|
961
|
-
function ks(e) {
|
|
962
|
-
if (e.parent) {
|
|
963
|
-
const t = [...e.parent.children].indexOf(e);
|
|
964
|
-
return t === -1 ? e.parent.children.length : t;
|
|
965
|
-
}
|
|
966
|
-
return -1;
|
|
967
|
-
}
|
|
968
|
-
function Ss(e, t) {
|
|
969
|
-
return t;
|
|
970
|
-
}
|
|
971
|
-
function As(e, t) {
|
|
972
|
-
var r;
|
|
973
|
-
return ((r = e.parent) == null ? void 0 : r.type) === "list" ? e.index : t.name !== Sr ? t.name : e.index;
|
|
974
|
-
}
|
|
975
|
-
function Cs(e, t) {
|
|
976
|
-
return t.parent ? t.parent.address.concat([e.name]) : [e.name];
|
|
977
|
-
}
|
|
978
|
-
function Ps(e, t, r) {
|
|
979
|
-
const n = typeof r == "string" ? r.split(e.config.delimiter) : r;
|
|
980
|
-
if (!n.length)
|
|
981
|
-
return;
|
|
982
|
-
const s = n[0];
|
|
983
|
-
let i = e.parent;
|
|
984
|
-
for (i || (String(n[0]) === String(e.name) && n.shift(), i = e), s === "$parent" && n.shift(); i && n.length; ) {
|
|
985
|
-
const a = n.shift();
|
|
986
|
-
switch (a) {
|
|
987
|
-
case "$root":
|
|
988
|
-
i = e.root;
|
|
989
|
-
break;
|
|
990
|
-
case "$parent":
|
|
991
|
-
i = i.parent;
|
|
992
|
-
break;
|
|
993
|
-
case "$self":
|
|
994
|
-
i = e;
|
|
995
|
-
break;
|
|
996
|
-
default:
|
|
997
|
-
i = i.children.find(
|
|
998
|
-
(l) => !("__FKP" in l) && String(l.name) === String(a)
|
|
999
|
-
) || Es(i, a);
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
return i || void 0;
|
|
1003
|
-
}
|
|
1004
|
-
function Es(e, t) {
|
|
1005
|
-
const r = String(t).match(/^(find)\((.*)\)$/);
|
|
1006
|
-
if (r) {
|
|
1007
|
-
const [, n, s] = r, i = s.split(",").map((a) => a.trim());
|
|
1008
|
-
switch (n) {
|
|
1009
|
-
case "find":
|
|
1010
|
-
return e.find(i[0], i[1]);
|
|
1011
|
-
default:
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
function Os(e, t, r, n) {
|
|
1017
|
-
return Is(e, r, n);
|
|
1018
|
-
}
|
|
1019
|
-
function Is(e, t, r = "name") {
|
|
1020
|
-
const n = typeof r == "string" ? (i) => i[r] == t : r, s = [e];
|
|
1021
|
-
for (; s.length; ) {
|
|
1022
|
-
const i = s.shift();
|
|
1023
|
-
if (!("__FKP" in i)) {
|
|
1024
|
-
if (n(i, t))
|
|
1025
|
-
return i;
|
|
1026
|
-
s.push(...i.children);
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
function Ms(e) {
|
|
1031
|
-
let t = e;
|
|
1032
|
-
for (; t.parent; )
|
|
1033
|
-
t = t.parent;
|
|
1034
|
-
return t;
|
|
1035
|
-
}
|
|
1036
|
-
function Mr(e = {}, t) {
|
|
1037
|
-
let r;
|
|
1038
|
-
return new Proxy(e, {
|
|
1039
|
-
get(...n) {
|
|
1040
|
-
const s = n[1];
|
|
1041
|
-
if (s === "_t")
|
|
1042
|
-
return e;
|
|
1043
|
-
const i = Reflect.get(...n);
|
|
1044
|
-
if (i !== void 0)
|
|
1045
|
-
return i;
|
|
1046
|
-
if (t) {
|
|
1047
|
-
const a = t.config[s];
|
|
1048
|
-
if (a !== void 0)
|
|
1049
|
-
return a;
|
|
1050
|
-
}
|
|
1051
|
-
if (e.rootConfig && typeof s == "string") {
|
|
1052
|
-
const a = e.rootConfig[s];
|
|
1053
|
-
if (a !== void 0)
|
|
1054
|
-
return a;
|
|
1055
|
-
}
|
|
1056
|
-
return s === "delay" && (r == null ? void 0 : r.type) === "input" ? 20 : ts[s];
|
|
1057
|
-
},
|
|
1058
|
-
set(...n) {
|
|
1059
|
-
const s = n[1], i = n[2];
|
|
1060
|
-
if (s === "_n")
|
|
1061
|
-
return r = i, e.rootConfig && e.rootConfig._add(r), !0;
|
|
1062
|
-
if (s === "_rmn")
|
|
1063
|
-
return e.rootConfig && e.rootConfig._rm(r), r = void 0, !0;
|
|
1064
|
-
if (!T(e[s], i, !1)) {
|
|
1065
|
-
const a = Reflect.set(...n);
|
|
1066
|
-
return r && (r.emit(`config:${s}`, i, !1), yt(r, s, i), r.walk((l) => yt(l, s, i), !1, !0)), a;
|
|
1067
|
-
}
|
|
1068
|
-
return !0;
|
|
1069
|
-
}
|
|
1070
|
-
});
|
|
1071
|
-
}
|
|
1072
|
-
function xs(e, t, r, n = "ui") {
|
|
1073
|
-
const s = typeof r == "string" ? { key: r, value: r, type: n } : r, i = e.hook.text.dispatch(s);
|
|
1074
|
-
return e.emit("text", i, !1), i.value;
|
|
1075
|
-
}
|
|
1076
|
-
function Rs(e) {
|
|
1077
|
-
const t = e.name;
|
|
1078
|
-
do {
|
|
1079
|
-
if (e.props.isForm === !0)
|
|
1080
|
-
break;
|
|
1081
|
-
e.parent || W(106, t), e = e.parent;
|
|
1082
|
-
} while (e);
|
|
1083
|
-
e.props.id && wr(e.props.id, e.props.__root);
|
|
1084
|
-
}
|
|
1085
|
-
function js(e, t, r) {
|
|
1086
|
-
return kr(e, r);
|
|
1087
|
-
}
|
|
1088
|
-
function Fs(e, t, r, n) {
|
|
1089
|
-
const s = `${e.name}-set`, i = e.hook.setErrors.dispatch({ localErrors: r, childErrors: n });
|
|
1090
|
-
return Wn(e, i.localErrors, i.childErrors).forEach(
|
|
1091
|
-
(a) => {
|
|
1092
|
-
e.store.apply(a, (l) => l.meta.source === s);
|
|
1093
|
-
}
|
|
1094
|
-
), e;
|
|
1095
|
-
}
|
|
1096
|
-
function Vs(e, t, r = !0, n) {
|
|
1097
|
-
return e.store.filter((s) => !(n === void 0 || s.meta.source === n), "error"), r && (n = n || `${e.name}-set`, e.walk((s) => {
|
|
1098
|
-
s.store.filter((i) => !(i.type === "error" && i.meta && i.meta.source === n));
|
|
1099
|
-
})), e;
|
|
1100
|
-
}
|
|
1101
|
-
function Ns(e) {
|
|
1102
|
-
const t = {
|
|
1103
|
-
initial: typeof e == "object" ? B(e) : e
|
|
1104
|
-
};
|
|
1105
|
-
let r, n = !0, s = {};
|
|
1106
|
-
return new Proxy(t, {
|
|
1107
|
-
get(...i) {
|
|
1108
|
-
var v, h, O, g;
|
|
1109
|
-
const [a, l] = i;
|
|
1110
|
-
let o;
|
|
1111
|
-
P(t, l) ? (o = Reflect.get(...i), (v = s[l]) != null && v.boolean && (o = Rn(o))) : r && typeof l == "string" && r.config[l] !== void 0 ? (o = r.config[l], l === "mergeStrategy" && (r == null ? void 0 : r.type) === "input" && Be(o) && r.name in o && (o = o[r.name])) : o = (h = s[l]) == null ? void 0 : h.default;
|
|
1112
|
-
const y = (O = s[l]) == null ? void 0 : O.getter;
|
|
1113
|
-
return (g = s[l]) != null && g.boolean && (o = !!o), y ? y(o, r) : o;
|
|
1114
|
-
},
|
|
1115
|
-
set(i, a, l, o) {
|
|
1116
|
-
var O;
|
|
1117
|
-
if (a === "_n")
|
|
1118
|
-
return r = l, !0;
|
|
1119
|
-
if (a === "_emit")
|
|
1120
|
-
return n = l, !0;
|
|
1121
|
-
let { prop: y, value: v } = r.hook.prop.dispatch({
|
|
1122
|
-
prop: a,
|
|
1123
|
-
value: l
|
|
1124
|
-
});
|
|
1125
|
-
const h = (O = s[y]) == null ? void 0 : O.setter;
|
|
1126
|
-
if (v = h ? h(v, r) : v, !T(t[y], v, !1) || typeof v == "object") {
|
|
1127
|
-
const g = Reflect.set(i, y, v, o);
|
|
1128
|
-
return y === "__propDefs" && (s = ht(v)), n && (r.emit("prop", { prop: y, value: v }), typeof y == "string" && r.emit(`prop:${y}`, v)), g;
|
|
1129
|
-
}
|
|
1130
|
-
return !0;
|
|
1131
|
-
}
|
|
1132
|
-
});
|
|
1133
|
-
}
|
|
1134
|
-
function Ds(e, t, r, n) {
|
|
1135
|
-
return t.traps.set(r, n), e;
|
|
1136
|
-
}
|
|
1137
|
-
function Ls(e, t) {
|
|
1138
|
-
if (e.props.definition)
|
|
1139
|
-
return e.define(e.props.definition);
|
|
1140
|
-
for (const r of t) {
|
|
1141
|
-
if (e.props.definition)
|
|
1142
|
-
return;
|
|
1143
|
-
typeof r.library == "function" && r.library(e);
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
function qs(e) {
|
|
1147
|
-
const t = Pr(e), r = Mr(e.config || {}, e.parent);
|
|
1148
|
-
return {
|
|
1149
|
-
_d: 0,
|
|
1150
|
-
_e: hr(),
|
|
1151
|
-
uid: Symbol(),
|
|
1152
|
-
_resolve: !1,
|
|
1153
|
-
_tmo: !1,
|
|
1154
|
-
_value: t,
|
|
1155
|
-
children: kn(e.children || []),
|
|
1156
|
-
config: r,
|
|
1157
|
-
hook: is(),
|
|
1158
|
-
isCreated: !1,
|
|
1159
|
-
isSettled: !0,
|
|
1160
|
-
ledger: Bn(),
|
|
1161
|
-
name: ls(e),
|
|
1162
|
-
parent: e.parent || null,
|
|
1163
|
-
plugins: /* @__PURE__ */ new Set(),
|
|
1164
|
-
props: Ns(t),
|
|
1165
|
-
settled: Promise.resolve(t),
|
|
1166
|
-
store: Dn(!0),
|
|
1167
|
-
sync: e.sync || !1,
|
|
1168
|
-
traps: ss(),
|
|
1169
|
-
type: e.type || "input",
|
|
1170
|
-
value: t
|
|
1171
|
-
};
|
|
1172
|
-
}
|
|
1173
|
-
function Ts(e, t) {
|
|
1174
|
-
var n, s;
|
|
1175
|
-
const r = (n = t.props) == null ? void 0 : n.id;
|
|
1176
|
-
if (r || (s = t.props) == null || delete s.id, e.ledger.init(e.store._n = e.props._n = e.config._n = e), e.props._emit = !1, Object.assign(
|
|
1177
|
-
e.props,
|
|
1178
|
-
r ? {} : { id: `input_${as++}` },
|
|
1179
|
-
t.props ?? {}
|
|
1180
|
-
), e.props._emit = !0, Ls(
|
|
1181
|
-
e,
|
|
1182
|
-
/* @__PURE__ */ new Set([
|
|
1183
|
-
...t.plugins || [],
|
|
1184
|
-
...e.parent ? e.parent.plugins : []
|
|
1185
|
-
])
|
|
1186
|
-
), t.plugins)
|
|
1187
|
-
for (const i of t.plugins)
|
|
1188
|
-
Mt(e, e._c, i, !0, !1);
|
|
1189
|
-
return e.each((i) => e.add(i)), e.parent && e.parent.add(e, t.index), e.type === "input" && e.children.length && W(100, e), Er(e, e._c, e._value, !1), e.store.release(), r && Gn(e), e.emit("created", e), e.isCreated = !0, e;
|
|
1190
|
-
}
|
|
1191
|
-
function Ks(e) {
|
|
1192
|
-
return {
|
|
1193
|
-
__FKP: !0,
|
|
1194
|
-
uid: Symbol(),
|
|
1195
|
-
name: (e == null ? void 0 : e.name) ?? `p_${Cr++}`,
|
|
1196
|
-
value: (e == null ? void 0 : e.value) ?? null,
|
|
1197
|
-
_value: (e == null ? void 0 : e.value) ?? null,
|
|
1198
|
-
type: (e == null ? void 0 : e.type) ?? "input",
|
|
1199
|
-
props: {},
|
|
1200
|
-
use: () => {
|
|
1201
|
-
},
|
|
1202
|
-
input(t) {
|
|
1203
|
-
return this._value = t, this.value = t, Promise.resolve();
|
|
1204
|
-
},
|
|
1205
|
-
isSettled: !0
|
|
1206
|
-
};
|
|
1207
|
-
}
|
|
1208
|
-
function zs(e) {
|
|
1209
|
-
return "__FKP" in e;
|
|
1210
|
-
}
|
|
1211
|
-
function Ws(e) {
|
|
1212
|
-
const t = e || {}, r = qs(t), n = new Proxy(r, {
|
|
1213
|
-
get(...s) {
|
|
1214
|
-
const [, i] = s;
|
|
1215
|
-
if (i === "__FKNode__")
|
|
1216
|
-
return !0;
|
|
1217
|
-
const a = r.traps.get(i);
|
|
1218
|
-
return a && a.get ? a.get(n, r) : Reflect.get(...s);
|
|
1219
|
-
},
|
|
1220
|
-
set(...s) {
|
|
1221
|
-
const [, i, a] = s, l = r.traps.get(i);
|
|
1222
|
-
return l && l.set ? l.set(n, r, i, a) : Reflect.set(...s);
|
|
1223
|
-
}
|
|
1224
|
-
});
|
|
1225
|
-
return Ts(n, t);
|
|
1226
|
-
}
|
|
1227
|
-
function bt(e) {
|
|
1228
|
-
return typeof e != "string" && P(e, "$el");
|
|
1229
|
-
}
|
|
1230
|
-
function $t(e) {
|
|
1231
|
-
return typeof e != "string" && P(e, "$cmp");
|
|
1232
|
-
}
|
|
1233
|
-
function he(e) {
|
|
1234
|
-
return !e || typeof e == "string" ? !1 : P(e, "if") && P(e, "then");
|
|
1235
|
-
}
|
|
1236
|
-
function Hs(e) {
|
|
1237
|
-
return typeof e != "string" && "$formkit" in e;
|
|
1238
|
-
}
|
|
1239
|
-
function Us(e) {
|
|
1240
|
-
if (typeof e == "string")
|
|
1241
|
-
return {
|
|
1242
|
-
$el: "text",
|
|
1243
|
-
children: e
|
|
1244
|
-
};
|
|
1245
|
-
if (Hs(e)) {
|
|
1246
|
-
const {
|
|
1247
|
-
$formkit: t,
|
|
1248
|
-
for: r,
|
|
1249
|
-
if: n,
|
|
1250
|
-
children: s,
|
|
1251
|
-
bind: i,
|
|
1252
|
-
...a
|
|
1253
|
-
} = e;
|
|
1254
|
-
return Object.assign(
|
|
1255
|
-
{
|
|
1256
|
-
$cmp: "FormKit",
|
|
1257
|
-
props: { ...a, type: t }
|
|
1258
|
-
},
|
|
1259
|
-
n ? { if: n } : {},
|
|
1260
|
-
r ? { for: r } : {},
|
|
1261
|
-
s ? { children: s } : {},
|
|
1262
|
-
i ? { bind: i } : {}
|
|
1263
|
-
);
|
|
1264
|
-
}
|
|
1265
|
-
return e;
|
|
1266
|
-
}
|
|
1267
|
-
function Y(e) {
|
|
1268
|
-
let t;
|
|
1269
|
-
const r = /* @__PURE__ */ new Set(), n = function(m, d) {
|
|
1270
|
-
return typeof m == "function" ? m(d) : m;
|
|
1271
|
-
}, s = [
|
|
1272
|
-
{
|
|
1273
|
-
"&&": (c, m, d) => n(c, d) && n(m, d),
|
|
1274
|
-
"||": (c, m, d) => n(c, d) || n(m, d)
|
|
1275
|
-
},
|
|
1276
|
-
{
|
|
1277
|
-
"===": (c, m, d) => n(c, d) === n(m, d),
|
|
1278
|
-
"!==": (c, m, d) => n(c, d) !== n(m, d),
|
|
1279
|
-
"==": (c, m, d) => n(c, d) == n(m, d),
|
|
1280
|
-
"!=": (c, m, d) => n(c, d) != n(m, d),
|
|
1281
|
-
">=": (c, m, d) => n(c, d) >= n(m, d),
|
|
1282
|
-
"<=": (c, m, d) => n(c, d) <= n(m, d),
|
|
1283
|
-
">": (c, m, d) => n(c, d) > n(m, d),
|
|
1284
|
-
"<": (c, m, d) => n(c, d) < n(m, d)
|
|
1285
|
-
},
|
|
1286
|
-
{
|
|
1287
|
-
"+": (c, m, d) => n(c, d) + n(m, d),
|
|
1288
|
-
"-": (c, m, d) => n(c, d) - n(m, d)
|
|
1289
|
-
},
|
|
1290
|
-
{
|
|
1291
|
-
"*": (c, m, d) => n(c, d) * n(m, d),
|
|
1292
|
-
"/": (c, m, d) => n(c, d) / n(m, d),
|
|
1293
|
-
"%": (c, m, d) => n(c, d) % n(m, d)
|
|
1294
|
-
}
|
|
1295
|
-
], i = s.reduce((c, m) => c.concat(Object.keys(m)), []), a = new Set(i.map((c) => c.charAt(0)));
|
|
1296
|
-
function l(c, m, d, _) {
|
|
1297
|
-
const S = c.filter(($) => $.startsWith(m));
|
|
1298
|
-
return S.length ? S.find(($) => _.length >= d + $.length && _.substring(d, d + $.length) === $ ? $ : !1) : !1;
|
|
1299
|
-
}
|
|
1300
|
-
function o(c, m, d = 1) {
|
|
1301
|
-
let _ = d ? m.substring(c + 1).trim() : m.substring(0, c).trim();
|
|
1302
|
-
if (!_.length)
|
|
1303
|
-
return -1;
|
|
1304
|
-
if (!d) {
|
|
1305
|
-
const $ = _.split("").reverse(), w = $.findIndex((u) => a.has(u));
|
|
1306
|
-
_ = $.slice(w).join("");
|
|
1307
|
-
}
|
|
1308
|
-
const S = _[0];
|
|
1309
|
-
return s.findIndex(($) => {
|
|
1310
|
-
const w = Object.keys($);
|
|
1311
|
-
return !!l(w, S, 0, _);
|
|
1312
|
-
});
|
|
1313
|
-
}
|
|
1314
|
-
function y(c, m) {
|
|
1315
|
-
let d = "";
|
|
1316
|
-
const _ = m.length;
|
|
1317
|
-
let S = 0;
|
|
1318
|
-
for (let $ = c; $ < _; $++) {
|
|
1319
|
-
const w = m.charAt($);
|
|
1320
|
-
if (w === "(")
|
|
1321
|
-
S++;
|
|
1322
|
-
else if (w === ")")
|
|
1323
|
-
S--;
|
|
1324
|
-
else if (S === 0 && w === " ")
|
|
1325
|
-
continue;
|
|
1326
|
-
if (S === 0 && l(i, w, $, m))
|
|
1327
|
-
return [d, $ - 1];
|
|
1328
|
-
d += w;
|
|
1329
|
-
}
|
|
1330
|
-
return [d, m.length - 1];
|
|
1331
|
-
}
|
|
1332
|
-
function v(c, m = 0) {
|
|
1333
|
-
const d = s[m], _ = c.length, S = Object.keys(d);
|
|
1334
|
-
let $ = 0, w = !1, u = null, p = "", E = null, R, j = "", M = "", f = "", k = "", C = 0;
|
|
1335
|
-
const V = (F, N) => {
|
|
1336
|
-
F ? f += N : p += N;
|
|
1337
|
-
};
|
|
1338
|
-
for (let F = 0; F < _; F++)
|
|
1339
|
-
if (j = M, M = c.charAt(F), (M === "'" || M === '"') && j !== "\\" && ($ === 0 && !w || $ && !k)) {
|
|
1340
|
-
$ ? k = M : w = M, V($, M);
|
|
1341
|
-
continue;
|
|
1342
|
-
} else if (w && (M !== w || j === "\\") || k && (M !== k || j === "\\")) {
|
|
1343
|
-
V($, M);
|
|
1344
|
-
continue;
|
|
1345
|
-
} else if (w === M) {
|
|
1346
|
-
w = !1, V($, M);
|
|
1347
|
-
continue;
|
|
1348
|
-
} else if (k === M) {
|
|
1349
|
-
k = !1, V($, M);
|
|
1350
|
-
continue;
|
|
1351
|
-
} else {
|
|
1352
|
-
if (M === " ")
|
|
1353
|
-
continue;
|
|
1354
|
-
if (M === "(")
|
|
1355
|
-
$ === 0 ? C = F : f += M, $++;
|
|
1356
|
-
else if (M === ")")
|
|
1357
|
-
if ($--, $ === 0) {
|
|
1358
|
-
const N = typeof p == "string" && p.startsWith("$") ? p : void 0, ce = N && c.charAt(F + 1) === ".";
|
|
1359
|
-
let Q = "";
|
|
1360
|
-
ce && ([Q, F] = y(F + 2, c));
|
|
1361
|
-
const ve = u ? m : o(C, c, 0), pe = o(F, c);
|
|
1362
|
-
ve === -1 && pe === -1 ? (p = h(f, -1, N, Q), typeof p == "string" && (p = f)) : u && (ve >= pe || pe === -1) && m === ve ? (E = u.bind(null, h(f, -1, N, Q)), u = null, p = "") : pe > ve && m === pe ? p = h(f, -1, N, Q) : p += `(${f})${ce ? `.${Q}` : ""}`, f = "";
|
|
1363
|
-
} else
|
|
1364
|
-
f += M;
|
|
1365
|
-
else if ($ === 0 && (R = l(S, M, F, c))) {
|
|
1366
|
-
F === 0 && W(103, [R, c]), F += R.length - 1, F === c.length - 1 && W(104, [R, c]), u ? p && (E = u.bind(null, h(p, m)), u = d[R].bind(null, E), p = "") : E ? (u = d[R].bind(null, h(E, m)), E = null) : (u = d[R].bind(null, h(p, m)), p = "");
|
|
1367
|
-
continue;
|
|
1368
|
-
} else
|
|
1369
|
-
V($, M);
|
|
1370
|
-
}
|
|
1371
|
-
return p && u && (u = u.bind(null, h(p, m))), u = !u && E ? E : u, !u && p && (u = (F, N) => typeof F == "function" ? F(N) : F, u = u.bind(null, h(p, m))), !u && !p && W(105, c), u;
|
|
1372
|
-
}
|
|
1373
|
-
function h(c, m, d, _) {
|
|
1374
|
-
if (d) {
|
|
1375
|
-
const S = h(d, s.length);
|
|
1376
|
-
let $, w = _ ? Y(`$${_}`) : !1;
|
|
1377
|
-
if (typeof S == "function") {
|
|
1378
|
-
const u = On(String(c)).map(
|
|
1379
|
-
(p) => h(p, -1)
|
|
1380
|
-
);
|
|
1381
|
-
return (p) => {
|
|
1382
|
-
const E = S(p);
|
|
1383
|
-
return typeof E != "function" ? (ye(150, d), E) : ($ = E(
|
|
1384
|
-
...u.map(
|
|
1385
|
-
(R) => typeof R == "function" ? R(p) : R
|
|
1386
|
-
)
|
|
1387
|
-
), w && (w = w.provide((R) => {
|
|
1388
|
-
const j = t(R);
|
|
1389
|
-
return R.reduce(
|
|
1390
|
-
(f, k) => {
|
|
1391
|
-
if (k === _ || (_ == null ? void 0 : _.startsWith(`${k}(`))) {
|
|
1392
|
-
const V = In($, k);
|
|
1393
|
-
f[k] = () => V;
|
|
1394
|
-
} else
|
|
1395
|
-
f[k] = j[k];
|
|
1396
|
-
return f;
|
|
1397
|
-
},
|
|
1398
|
-
{}
|
|
1399
|
-
);
|
|
1400
|
-
})), w ? w() : $);
|
|
1401
|
-
};
|
|
1402
|
-
}
|
|
1403
|
-
} else if (typeof c == "string") {
|
|
1404
|
-
if (c === "true")
|
|
1405
|
-
return !0;
|
|
1406
|
-
if (c === "false")
|
|
1407
|
-
return !1;
|
|
1408
|
-
if (c === "undefined")
|
|
1409
|
-
return;
|
|
1410
|
-
if (Pn(c))
|
|
1411
|
-
return En(c.substring(1, c.length - 1));
|
|
1412
|
-
if (!isNaN(+c))
|
|
1413
|
-
return Number(c);
|
|
1414
|
-
if (m < s.length - 1)
|
|
1415
|
-
return v(c, m + 1);
|
|
1416
|
-
if (c.startsWith("$")) {
|
|
1417
|
-
const S = c.substring(1);
|
|
1418
|
-
return r.add(S), function(w) {
|
|
1419
|
-
return S in w ? w[S]() : void 0;
|
|
1420
|
-
};
|
|
1421
|
-
}
|
|
1422
|
-
return c;
|
|
1423
|
-
}
|
|
1424
|
-
return c;
|
|
1425
|
-
}
|
|
1426
|
-
const O = v(
|
|
1427
|
-
e.startsWith("$:") ? e.substring(2) : e
|
|
1428
|
-
), g = Array.from(r);
|
|
1429
|
-
function b(c) {
|
|
1430
|
-
return t = c, Object.assign(
|
|
1431
|
-
// @ts-ignore - @rollup/plugin-typescript doesn't like this
|
|
1432
|
-
O.bind(null, c(g)),
|
|
1433
|
-
{ provide: b }
|
|
1434
|
-
);
|
|
1435
|
-
}
|
|
1436
|
-
return Object.assign(O, {
|
|
1437
|
-
provide: b
|
|
1438
|
-
});
|
|
1439
|
-
}
|
|
1440
|
-
function He(e, t, r) {
|
|
1441
|
-
return r ? typeof r == "string" ? r.split(" ").reduce(
|
|
1442
|
-
(s, i) => Object.assign(s, { [i]: !0 }),
|
|
1443
|
-
{}
|
|
1444
|
-
) : typeof r == "function" ? He(
|
|
1445
|
-
e,
|
|
1446
|
-
t,
|
|
1447
|
-
r(t, e)
|
|
1448
|
-
) : r : {};
|
|
1449
|
-
}
|
|
1450
|
-
function Bs(e, t, ...r) {
|
|
1451
|
-
const n = r.reduce((s, i) => {
|
|
1452
|
-
if (!i)
|
|
1453
|
-
return at(s);
|
|
1454
|
-
const { $reset: a, ...l } = i;
|
|
1455
|
-
return at(a ? l : Object.assign(s, l));
|
|
1456
|
-
}, {});
|
|
1457
|
-
return Object.keys(
|
|
1458
|
-
e.hook.classes.dispatch({ property: t, classes: n }).classes
|
|
1459
|
-
).filter((s) => n[s]).join(" ") || null;
|
|
1460
|
-
}
|
|
1461
|
-
function at(e) {
|
|
1462
|
-
const t = "$remove:";
|
|
1463
|
-
let r = !1;
|
|
1464
|
-
const n = Object.keys(e).filter((s) => (e[s] && s.startsWith(t) && (r = !0), e[s]));
|
|
1465
|
-
return n.length > 1 && r && n.filter((i) => i.startsWith(t)).map((i) => {
|
|
1466
|
-
const a = i.substring(t.length);
|
|
1467
|
-
e[a] = !1, e[i] = !1;
|
|
1468
|
-
}), e;
|
|
1469
|
-
}
|
|
1470
|
-
function Zs(e, t, r) {
|
|
1471
|
-
const n = Ve(e);
|
|
1472
|
-
n ? n.setErrors(t, r) : ye(651, e);
|
|
1473
|
-
}
|
|
1474
|
-
function Ys(e, t = !0) {
|
|
1475
|
-
const r = Ve(e);
|
|
1476
|
-
r ? r.clearErrors(t) : ye(652, e);
|
|
1477
|
-
}
|
|
1478
|
-
var Ye = "1.6.9", xr = /* @__PURE__ */ new WeakSet();
|
|
1479
|
-
function st(e, t) {
|
|
1480
|
-
const r = t || Object.assign(/* @__PURE__ */ new Map(), { active: !1 }), n = /* @__PURE__ */ new Map(), s = function(v) {
|
|
1481
|
-
var h;
|
|
1482
|
-
r.active && (r.has(e) || r.set(e, /* @__PURE__ */ new Set()), (h = r.get(e)) == null || h.add(v));
|
|
1483
|
-
}, i = function(v) {
|
|
1484
|
-
return new Proxy(v, {
|
|
1485
|
-
get(...h) {
|
|
1486
|
-
return typeof h[1] == "string" && s(`prop:${h[1]}`), Reflect.get(...h);
|
|
1487
|
-
}
|
|
1488
|
-
});
|
|
1489
|
-
}, a = function(v) {
|
|
1490
|
-
return new Proxy(v, {
|
|
1491
|
-
get(...h) {
|
|
1492
|
-
return h[1] === "value" ? (O) => (s(`count:${O}`), v.value(O)) : Reflect.get(...h);
|
|
1493
|
-
}
|
|
1494
|
-
});
|
|
1495
|
-
}, l = function(v, h) {
|
|
1496
|
-
return Ne(v) ? st(v, r) : (h === "value" && s("commit"), h === "_value" && s("input"), h === "props" ? i(v) : h === "ledger" ? a(v) : (h === "children" && (s("child"), s("childRemoved")), v));
|
|
1497
|
-
}, {
|
|
1498
|
-
proxy: o,
|
|
1499
|
-
revoke: y
|
|
1500
|
-
} = Proxy.revocable(e, {
|
|
1501
|
-
get(...v) {
|
|
1502
|
-
switch (v[1]) {
|
|
1503
|
-
case "_node":
|
|
1504
|
-
return e;
|
|
1505
|
-
case "deps":
|
|
1506
|
-
return r;
|
|
1507
|
-
case "watch":
|
|
1508
|
-
return (O, g, b) => Fr(o, O, g, b);
|
|
1509
|
-
case "observe":
|
|
1510
|
-
return () => {
|
|
1511
|
-
const O = new Map(r);
|
|
1512
|
-
return r.clear(), r.active = !0, O;
|
|
1513
|
-
};
|
|
1514
|
-
case "stopObserve":
|
|
1515
|
-
return () => {
|
|
1516
|
-
const O = new Map(r);
|
|
1517
|
-
return r.active = !1, O;
|
|
1518
|
-
};
|
|
1519
|
-
case "receipts":
|
|
1520
|
-
return n;
|
|
1521
|
-
case "kill":
|
|
1522
|
-
return () => {
|
|
1523
|
-
jr(n), xr.add(v[2]), y();
|
|
1524
|
-
};
|
|
1525
|
-
}
|
|
1526
|
-
const h = Reflect.get(...v);
|
|
1527
|
-
return typeof h == "function" ? (...O) => {
|
|
1528
|
-
const g = h(...O);
|
|
1529
|
-
return l(g, v[1]);
|
|
1530
|
-
} : l(h, v[1]);
|
|
1531
|
-
}
|
|
1532
|
-
});
|
|
1533
|
-
return o;
|
|
1534
|
-
}
|
|
1535
|
-
function Rr(e, [t, r], n, s) {
|
|
1536
|
-
t.forEach((i, a) => {
|
|
1537
|
-
i.forEach((l) => {
|
|
1538
|
-
e.receipts.has(a) || e.receipts.set(a, {});
|
|
1539
|
-
const o = e.receipts.get(a) ?? {};
|
|
1540
|
-
o[l] = o[l] ?? [], o[l].push(a.on(l, n, s)), e.receipts.set(a, o);
|
|
1541
|
-
});
|
|
1542
|
-
}), r.forEach((i, a) => {
|
|
1543
|
-
i.forEach((l) => {
|
|
1544
|
-
if (e.receipts.has(a)) {
|
|
1545
|
-
const o = e.receipts.get(a);
|
|
1546
|
-
o && P(o, l) && (o[l].map(a.off), delete o[l], e.receipts.set(a, o));
|
|
1547
|
-
}
|
|
1548
|
-
});
|
|
1549
|
-
});
|
|
1550
|
-
}
|
|
1551
|
-
function jr(e) {
|
|
1552
|
-
e.forEach((t, r) => {
|
|
1553
|
-
for (const n in t)
|
|
1554
|
-
t[n].map(r.off);
|
|
1555
|
-
}), e.clear();
|
|
1556
|
-
}
|
|
1557
|
-
function Fr(e, t, r, n) {
|
|
1558
|
-
const s = (l) => {
|
|
1559
|
-
const o = e.stopObserve();
|
|
1560
|
-
Rr(
|
|
1561
|
-
e,
|
|
1562
|
-
Vr(i, o),
|
|
1563
|
-
() => Fr(e, t, r, n),
|
|
1564
|
-
n
|
|
1565
|
-
), r && r(l);
|
|
1566
|
-
}, i = new Map(e.deps);
|
|
1567
|
-
e.observe();
|
|
1568
|
-
const a = t(e);
|
|
1569
|
-
a instanceof Promise ? a.then((l) => s(l)) : s(a);
|
|
1570
|
-
}
|
|
1571
|
-
function Vr(e, t) {
|
|
1572
|
-
const r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
1573
|
-
return t.forEach((s, i) => {
|
|
1574
|
-
if (!e.has(i))
|
|
1575
|
-
r.set(i, s);
|
|
1576
|
-
else {
|
|
1577
|
-
const a = /* @__PURE__ */ new Set(), l = e.get(i);
|
|
1578
|
-
s.forEach(
|
|
1579
|
-
(o) => !(l != null && l.has(o)) && a.add(o)
|
|
1580
|
-
), r.set(i, a);
|
|
1581
|
-
}
|
|
1582
|
-
}), e.forEach((s, i) => {
|
|
1583
|
-
if (!t.has(i))
|
|
1584
|
-
n.set(i, s);
|
|
1585
|
-
else {
|
|
1586
|
-
const a = /* @__PURE__ */ new Set(), l = t.get(i);
|
|
1587
|
-
s.forEach(
|
|
1588
|
-
(o) => !(l != null && l.has(o)) && a.add(o)
|
|
1589
|
-
), n.set(i, a);
|
|
1590
|
-
}
|
|
1591
|
-
}), [r, n];
|
|
1592
|
-
}
|
|
1593
|
-
function xt(e) {
|
|
1594
|
-
return xr.has(e);
|
|
1595
|
-
}
|
|
1596
|
-
var Nr = function({ value: t }) {
|
|
1597
|
-
return ["yes", "on", "1", 1, !0, "true"].includes(t);
|
|
1598
|
-
};
|
|
1599
|
-
Nr.skipEmpty = !1;
|
|
1600
|
-
var Gs = Nr, Js = function({ value: e }, t = !1) {
|
|
1601
|
-
const r = Date.parse(t || /* @__PURE__ */ new Date()), n = Date.parse(String(e));
|
|
1602
|
-
return isNaN(n) ? !1 : n > r;
|
|
1603
|
-
}, Qs = Js, Xs = function({ value: e }, t = !1) {
|
|
1604
|
-
const r = Date.parse(t || /* @__PURE__ */ new Date()), n = Date.parse(String(e));
|
|
1605
|
-
return isNaN(n) ? !1 : n > r || n === r;
|
|
1606
|
-
}, ei = Xs, ti = function(e, t) {
|
|
1607
|
-
var s;
|
|
1608
|
-
if (!t)
|
|
1609
|
-
return !1;
|
|
1610
|
-
const r = Date.parse(String(e.value)), n = Date.parse(String((s = e.at(t)) == null ? void 0 : s.value));
|
|
1611
|
-
return isNaN(n) ? !0 : isNaN(r) ? !1 : r > n;
|
|
1612
|
-
}, ri = ti, ni = function({ value: e }, t = "default") {
|
|
1613
|
-
const r = {
|
|
1614
|
-
default: new RegExp("^\\p{L}+$", "u"),
|
|
1615
|
-
latin: /^[a-z]+$/i
|
|
1616
|
-
}, n = P(r, t) ? t : "default";
|
|
1617
|
-
return r[n].test(String(e));
|
|
1618
|
-
}, si = ni, ii = function({ value: e }, t = "default") {
|
|
1619
|
-
const r = {
|
|
1620
|
-
default: /^[\p{L} ]+$/u,
|
|
1621
|
-
latin: /^[a-z ]+$/i
|
|
1622
|
-
}, n = P(r, t) ? t : "default";
|
|
1623
|
-
return r[n].test(String(e));
|
|
1624
|
-
}, ai = ii, li = function({ value: e }, t = "default") {
|
|
1625
|
-
const r = {
|
|
1626
|
-
default: /^[0-9\p{L}]+$/u,
|
|
1627
|
-
latin: /^[0-9a-z]+$/i
|
|
1628
|
-
}, n = P(r, t) ? t : "default";
|
|
1629
|
-
return r[n].test(String(e));
|
|
1630
|
-
}, oi = li, ui = function({ value: e }, t = !1) {
|
|
1631
|
-
const r = Date.parse(t || /* @__PURE__ */ new Date()), n = Date.parse(String(e));
|
|
1632
|
-
return isNaN(n) ? !1 : n < r;
|
|
1633
|
-
}, fi = ui, ci = function(e, t) {
|
|
1634
|
-
var s;
|
|
1635
|
-
if (!t)
|
|
1636
|
-
return !1;
|
|
1637
|
-
const r = Date.parse(String(e.value)), n = Date.parse(String((s = e.at(t)) == null ? void 0 : s.value));
|
|
1638
|
-
return isNaN(n) ? !0 : isNaN(r) ? !1 : r < n;
|
|
1639
|
-
}, pi = ci, mi = function({ value: e }, t = !1) {
|
|
1640
|
-
const r = Date.parse(t || /* @__PURE__ */ new Date()), n = Date.parse(String(e));
|
|
1641
|
-
return isNaN(n) ? !1 : n < r || n === r;
|
|
1642
|
-
}, di = mi, yi = function({ value: t }, r, n) {
|
|
1643
|
-
if (!isNaN(t) && !isNaN(r) && !isNaN(n)) {
|
|
1644
|
-
const s = 1 * t;
|
|
1645
|
-
r = Number(r), n = Number(n);
|
|
1646
|
-
const [i, a] = r <= n ? [r, n] : [n, r];
|
|
1647
|
-
return s >= 1 * i && s <= 1 * a;
|
|
1648
|
-
}
|
|
1649
|
-
return !1;
|
|
1650
|
-
}, vi = yi, Wt = /(_confirm(?:ed)?)$/, gi = function(t, r, n = "loose") {
|
|
1651
|
-
var i;
|
|
1652
|
-
r || (r = Wt.test(t.name) ? t.name.replace(Wt, "") : `${t.name}_confirm`);
|
|
1653
|
-
const s = (i = t.at(r)) == null ? void 0 : i.value;
|
|
1654
|
-
return n === "strict" ? t.value === s : t.value == s;
|
|
1655
|
-
}, hi = gi, bi = function({ value: e }, t = "default") {
|
|
1656
|
-
const r = {
|
|
1657
|
-
default: new RegExp("\\p{L}", "u"),
|
|
1658
|
-
latin: /[a-z]/i
|
|
1659
|
-
}, n = P(r, t) ? t : "default";
|
|
1660
|
-
return r[n].test(String(e));
|
|
1661
|
-
}, $i = bi, _i = function({ value: e }, t = "default") {
|
|
1662
|
-
const r = {
|
|
1663
|
-
default: /[\p{L} ]/u,
|
|
1664
|
-
latin: /[a-z ]/i
|
|
1665
|
-
}, n = P(r, t) ? t : "default";
|
|
1666
|
-
return r[n].test(String(e));
|
|
1667
|
-
}, wi = _i, ki = function({ value: e }, t = "default") {
|
|
1668
|
-
const r = {
|
|
1669
|
-
default: /[0-9\p{L}]/u,
|
|
1670
|
-
latin: /[0-9a-z]/i
|
|
1671
|
-
}, n = P(r, t) ? t : "default";
|
|
1672
|
-
return r[n].test(String(e));
|
|
1673
|
-
}, Si = ki, Ai = function({ value: e }, t = "default") {
|
|
1674
|
-
const r = {
|
|
1675
|
-
default: new RegExp("\\p{Ll}", "u"),
|
|
1676
|
-
latin: /[a-z]/
|
|
1677
|
-
}, n = P(r, t) ? t : "default";
|
|
1678
|
-
return r[n].test(String(e));
|
|
1679
|
-
}, Ci = Ai, Pi = function({ value: t }) {
|
|
1680
|
-
return /[0-9]/.test(String(t));
|
|
1681
|
-
}, Ei = Pi, Oi = function({ value: e }) {
|
|
1682
|
-
return /[!-/:-@[-`{-~]/.test(String(e));
|
|
1683
|
-
}, Ii = Oi, Mi = function({ value: e }, t = "default") {
|
|
1684
|
-
const r = {
|
|
1685
|
-
default: new RegExp("\\p{Lu}", "u"),
|
|
1686
|
-
latin: /[A-Z]/
|
|
1687
|
-
}, n = P(r, t) ? t : "default";
|
|
1688
|
-
return r[n].test(String(e));
|
|
1689
|
-
}, xi = Mi, Ri = function({ value: t }, r, n) {
|
|
1690
|
-
r = r instanceof Date ? r.getTime() : Date.parse(r), n = n instanceof Date ? n.getTime() : Date.parse(n);
|
|
1691
|
-
const s = t instanceof Date ? t.getTime() : Date.parse(String(t));
|
|
1692
|
-
if (r && !n)
|
|
1693
|
-
n = r, r = Date.now();
|
|
1694
|
-
else if (!r || !s)
|
|
1695
|
-
return !1;
|
|
1696
|
-
return s >= r && s <= n;
|
|
1697
|
-
}, ji = Ri, Fi = function({ value: t }, r) {
|
|
1698
|
-
return r && typeof r == "string" ? Cn(r).test(String(t)) : !isNaN(Date.parse(String(t)));
|
|
1699
|
-
}, Vi = Fi, Ni = function({ value: t }) {
|
|
1700
|
-
return /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(String(t));
|
|
1701
|
-
}, Di = Ni, Li = function({ value: t }, ...r) {
|
|
1702
|
-
return typeof t == "string" && r.length ? r.some((n) => t.endsWith(n)) : typeof t == "string" && r.length === 0;
|
|
1703
|
-
}, qi = Li, Ti = function({ value: t }, ...r) {
|
|
1704
|
-
return r.some((n) => typeof n == "object" ? T(n, t) : n == t);
|
|
1705
|
-
}, Ki = Ti, zi = function({ value: t }, r = 0, n = 1 / 0) {
|
|
1706
|
-
r = parseInt(r), n = isNaN(parseInt(n)) ? 1 / 0 : parseInt(n);
|
|
1707
|
-
const s = r <= n ? r : n, i = n >= r ? n : r;
|
|
1708
|
-
if (typeof t == "string" || Array.isArray(t))
|
|
1709
|
-
return t.length >= s && t.length <= i;
|
|
1710
|
-
if (t && typeof t == "object") {
|
|
1711
|
-
const a = Object.keys(t).length;
|
|
1712
|
-
return a >= s && a <= i;
|
|
1713
|
-
}
|
|
1714
|
-
return !1;
|
|
1715
|
-
}, Wi = zi, Hi = function({ value: e }, t = "default") {
|
|
1716
|
-
const r = {
|
|
1717
|
-
default: new RegExp("^\\p{Ll}+$", "u"),
|
|
1718
|
-
allow_non_alpha: /^[0-9\p{Ll}!-/:-@[-`{-~]+$/u,
|
|
1719
|
-
allow_numeric: /^[0-9\p{Ll}]+$/u,
|
|
1720
|
-
allow_numeric_dashes: /^[0-9\p{Ll}-]+$/u,
|
|
1721
|
-
latin: /^[a-z]+$/
|
|
1722
|
-
}, n = P(r, t) ? t : "default";
|
|
1723
|
-
return r[n].test(String(e));
|
|
1724
|
-
}, Ui = Hi, Bi = function({ value: t }, ...r) {
|
|
1725
|
-
return r.some((n) => (typeof n == "string" && n.substr(0, 1) === "/" && n.substr(-1) === "/" && (n = new RegExp(n.substr(1, n.length - 2))), n instanceof RegExp ? n.test(String(t)) : n === t));
|
|
1726
|
-
}, Zi = Bi, Yi = function({ value: t }, r = 10) {
|
|
1727
|
-
return Array.isArray(t) ? t.length <= r : Number(t) <= Number(r);
|
|
1728
|
-
}, Gi = Yi, Ji = function({ value: t }, r = 1) {
|
|
1729
|
-
return Array.isArray(t) ? t.length >= r : Number(t) >= Number(r);
|
|
1730
|
-
}, Qi = Ji, Xi = function({ value: t }, ...r) {
|
|
1731
|
-
return !r.some((n) => typeof n == "object" ? T(n, t) : n === t);
|
|
1732
|
-
}, ea = Xi, ta = function({ value: t }) {
|
|
1733
|
-
return !isNaN(t);
|
|
1734
|
-
}, ra = ta, Dr = function(e, ...t) {
|
|
1735
|
-
return Z(e.value) ? t.map((n) => {
|
|
1736
|
-
var s;
|
|
1737
|
-
return (s = e.at(n)) == null ? void 0 : s.value;
|
|
1738
|
-
}).some((n) => !Z(n)) : !0;
|
|
1739
|
-
};
|
|
1740
|
-
Dr.skipEmpty = !1;
|
|
1741
|
-
var na = Dr, Lr = function({ value: t }, r = "default") {
|
|
1742
|
-
return r === "trim" && typeof t == "string" ? !Z(t.trim()) : !Z(t);
|
|
1743
|
-
};
|
|
1744
|
-
Lr.skipEmpty = !1;
|
|
1745
|
-
var sa = Lr, ia = function({ value: t }, ...r) {
|
|
1746
|
-
return typeof t == "string" && r.length ? r.some((n) => t.startsWith(n)) : typeof t == "string" && r.length === 0;
|
|
1747
|
-
}, aa = ia, la = function({ value: e }) {
|
|
1748
|
-
return /^[!-/:-@[-`{-~]+$/.test(String(e));
|
|
1749
|
-
}, oa = la, ua = function({ value: e }, t = "default") {
|
|
1750
|
-
const r = {
|
|
1751
|
-
default: new RegExp("^\\p{Lu}+$", "u"),
|
|
1752
|
-
latin: /^[A-Z]+$/
|
|
1753
|
-
}, n = P(r, t) ? t : "default";
|
|
1754
|
-
return r[n].test(String(e));
|
|
1755
|
-
}, fa = ua, ca = function({ value: t }, ...r) {
|
|
1756
|
-
try {
|
|
1757
|
-
const n = r.length ? r : ["http:", "https:"], s = new URL(String(t));
|
|
1758
|
-
return n.includes(s.protocol);
|
|
1759
|
-
} catch {
|
|
1760
|
-
return !1;
|
|
1761
|
-
}
|
|
1762
|
-
}, pa = ca;
|
|
1763
|
-
const ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1764
|
-
__proto__: null,
|
|
1765
|
-
accepted: Gs,
|
|
1766
|
-
alpha: si,
|
|
1767
|
-
alpha_spaces: ai,
|
|
1768
|
-
alphanumeric: oi,
|
|
1769
|
-
between: vi,
|
|
1770
|
-
confirm: hi,
|
|
1771
|
-
contains_alpha: $i,
|
|
1772
|
-
contains_alpha_spaces: wi,
|
|
1773
|
-
contains_alphanumeric: Si,
|
|
1774
|
-
contains_lowercase: Ci,
|
|
1775
|
-
contains_numeric: Ei,
|
|
1776
|
-
contains_symbol: Ii,
|
|
1777
|
-
contains_uppercase: xi,
|
|
1778
|
-
date_after: Qs,
|
|
1779
|
-
date_after_node: ri,
|
|
1780
|
-
date_after_or_equal: ei,
|
|
1781
|
-
date_before: fi,
|
|
1782
|
-
date_before_node: pi,
|
|
1783
|
-
date_before_or_equal: di,
|
|
1784
|
-
date_between: ji,
|
|
1785
|
-
date_format: Vi,
|
|
1786
|
-
email: Di,
|
|
1787
|
-
ends_with: qi,
|
|
1788
|
-
is: Ki,
|
|
1789
|
-
length: Wi,
|
|
1790
|
-
lowercase: Ui,
|
|
1791
|
-
matches: Zi,
|
|
1792
|
-
max: Gi,
|
|
1793
|
-
min: Qi,
|
|
1794
|
-
not: ea,
|
|
1795
|
-
number: ra,
|
|
1796
|
-
require_one: na,
|
|
1797
|
-
required: sa,
|
|
1798
|
-
starts_with: aa,
|
|
1799
|
-
symbol: oa,
|
|
1800
|
-
uppercase: fa,
|
|
1801
|
-
url: pa
|
|
1802
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1803
|
-
var _t = /* @__PURE__ */ H({
|
|
1804
|
-
type: "state",
|
|
1805
|
-
blocking: !0,
|
|
1806
|
-
visible: !1,
|
|
1807
|
-
value: !0,
|
|
1808
|
-
key: "validating"
|
|
1809
|
-
});
|
|
1810
|
-
function da(e = {}) {
|
|
1811
|
-
return function(r) {
|
|
1812
|
-
let n = B(r.props.validationRules || {}), s = { ...e, ...n };
|
|
1813
|
-
const i = { input: Ee(), rerun: null, isPassing: !0 };
|
|
1814
|
-
let a = B(r.props.validation);
|
|
1815
|
-
r.on("prop:validation", ({ payload: o }) => l(o, n)), r.on(
|
|
1816
|
-
"prop:validationRules",
|
|
1817
|
-
({ payload: o }) => l(a, o)
|
|
1818
|
-
);
|
|
1819
|
-
function l(o, y) {
|
|
1820
|
-
var v;
|
|
1821
|
-
T(Object.keys(n || {}), Object.keys(y || {})) && T(a, o) || (n = B(y), a = B(o), s = { ...e, ...n }, (v = r.props.parsedRules) == null || v.forEach((h) => {
|
|
1822
|
-
qr(h), jr(h.observer.receipts), h.observer.kill();
|
|
1823
|
-
}), r.store.filter(() => !1, "validation"), r.props.parsedRules = Ut(o, s, r), i.isPassing = !0, wt(r, r.props.parsedRules, i));
|
|
1824
|
-
}
|
|
1825
|
-
r.props.parsedRules = Ut(a, s, r), wt(r, r.props.parsedRules, i);
|
|
1826
|
-
};
|
|
1827
|
-
}
|
|
1828
|
-
function wt(e, t, r) {
|
|
1829
|
-
xt(e) || (r.input = Ee(), e.store.set(
|
|
1830
|
-
/* @__PURE__ */ H({
|
|
1831
|
-
key: "failing",
|
|
1832
|
-
value: !r.isPassing,
|
|
1833
|
-
visible: !1
|
|
1834
|
-
})
|
|
1835
|
-
), r.isPassing = !0, e.store.filter((n) => !n.meta.removeImmediately, "validation"), t.forEach(
|
|
1836
|
-
(n) => n.debounce && clearTimeout(n.timer)
|
|
1837
|
-
), t.length && (e.store.set(_t), kt(0, t, r, !1, () => {
|
|
1838
|
-
e.store.remove(_t.key), e.store.set(
|
|
1839
|
-
/* @__PURE__ */ H({
|
|
1840
|
-
key: "failing",
|
|
1841
|
-
value: !r.isPassing,
|
|
1842
|
-
visible: !1
|
|
1843
|
-
})
|
|
1844
|
-
);
|
|
1845
|
-
})));
|
|
1846
|
-
}
|
|
1847
|
-
function kt(e, t, r, n, s) {
|
|
1848
|
-
const i = t[e];
|
|
1849
|
-
if (!i)
|
|
1850
|
-
return s();
|
|
1851
|
-
const a = i.observer;
|
|
1852
|
-
if (xt(a))
|
|
1853
|
-
return;
|
|
1854
|
-
const l = r.input;
|
|
1855
|
-
i.state = null;
|
|
1856
|
-
function o(y, v) {
|
|
1857
|
-
if (r.input !== l)
|
|
1858
|
-
return;
|
|
1859
|
-
r.isPassing = r.isPassing && !!v, i.queued = !1;
|
|
1860
|
-
const h = a.stopObserve(), O = Vr(i.deps, h);
|
|
1861
|
-
if (Rr(
|
|
1862
|
-
a,
|
|
1863
|
-
O,
|
|
1864
|
-
function() {
|
|
1865
|
-
try {
|
|
1866
|
-
a.store.set(_t);
|
|
1867
|
-
} catch {
|
|
1868
|
-
}
|
|
1869
|
-
i.queued = !0, r.rerun && clearTimeout(r.rerun), r.rerun = setTimeout(
|
|
1870
|
-
wt,
|
|
1871
|
-
0,
|
|
1872
|
-
a,
|
|
1873
|
-
t,
|
|
1874
|
-
r
|
|
1875
|
-
);
|
|
1876
|
-
},
|
|
1877
|
-
"unshift"
|
|
1878
|
-
// We want these listeners to run before other events are emitted so the 'state.validating' will be reliable.
|
|
1879
|
-
), i.deps = h, i.state = v, v === !1 ? va(i, n || y) : qr(i), t.length > e + 1) {
|
|
1880
|
-
const g = t[e + 1];
|
|
1881
|
-
(v || g.force || !g.skipEmpty) && g.state === null && (g.queued = !0), kt(e + 1, t, r, n || y, s);
|
|
1882
|
-
} else
|
|
1883
|
-
s();
|
|
1884
|
-
}
|
|
1885
|
-
(!Z(a.value) || !i.skipEmpty) && (r.isPassing || i.force) ? i.queued ? ya(i, a, (y) => {
|
|
1886
|
-
y instanceof Promise ? y.then((v) => o(!0, v)) : o(!1, y);
|
|
1887
|
-
}) : kt(e + 1, t, r, n, s) : Z(a.value) && i.skipEmpty && r.isPassing ? (a.observe(), a.value, o(!1, r.isPassing)) : o(!1, null);
|
|
1888
|
-
}
|
|
1889
|
-
function ya(e, t, r) {
|
|
1890
|
-
e.debounce ? e.timer = setTimeout(() => {
|
|
1891
|
-
t.observe(), r(e.rule(t, ...e.args));
|
|
1892
|
-
}, e.debounce) : (t.observe(), r(e.rule(t, ...e.args)));
|
|
1893
|
-
}
|
|
1894
|
-
function qr(e) {
|
|
1895
|
-
const t = `rule_${e.name}`;
|
|
1896
|
-
e.messageObserver && (e.messageObserver = e.messageObserver.kill()), P(e.observer.store, t) && e.observer.store.remove(t);
|
|
1897
|
-
}
|
|
1898
|
-
function va(e, t) {
|
|
1899
|
-
const r = e.observer;
|
|
1900
|
-
xt(r) || (e.messageObserver || (e.messageObserver = st(r._node)), e.messageObserver.watch(
|
|
1901
|
-
(n) => ha(
|
|
1902
|
-
n,
|
|
1903
|
-
e
|
|
1904
|
-
),
|
|
1905
|
-
(n) => {
|
|
1906
|
-
const s = ga(r, e, n), i = /* @__PURE__ */ H({
|
|
1907
|
-
blocking: e.blocking,
|
|
1908
|
-
key: `rule_${e.name}`,
|
|
1909
|
-
meta: {
|
|
1910
|
-
/**
|
|
1911
|
-
* Use this key instead of the message root key to produce i18n validation
|
|
1912
|
-
* messages.
|
|
1913
|
-
*/
|
|
1914
|
-
messageKey: e.name,
|
|
1915
|
-
/**
|
|
1916
|
-
* For messages that were created *by or after* a debounced or async
|
|
1917
|
-
* validation rule — we make note of it so we can immediately remove them
|
|
1918
|
-
* as soon as the next commit happens.
|
|
1919
|
-
*/
|
|
1920
|
-
removeImmediately: t,
|
|
1921
|
-
/**
|
|
1922
|
-
* Determines if this message should be passed to localization.
|
|
1923
|
-
*/
|
|
1924
|
-
localize: !s,
|
|
1925
|
-
/**
|
|
1926
|
-
* The arguments that will be passed to the validation rules
|
|
1927
|
-
*/
|
|
1928
|
-
i18nArgs: n
|
|
1929
|
-
},
|
|
1930
|
-
type: "validation",
|
|
1931
|
-
value: s || "This field is not valid."
|
|
1932
|
-
});
|
|
1933
|
-
r.store.set(i);
|
|
1934
|
-
}
|
|
1935
|
-
));
|
|
1936
|
-
}
|
|
1937
|
-
function ga(e, t, r) {
|
|
1938
|
-
const n = e.props.validationMessages && P(e.props.validationMessages, t.name) ? e.props.validationMessages[t.name] : void 0;
|
|
1939
|
-
return typeof n == "function" ? n(...r) : n;
|
|
1940
|
-
}
|
|
1941
|
-
function ha(e, t) {
|
|
1942
|
-
return [
|
|
1943
|
-
{
|
|
1944
|
-
node: e,
|
|
1945
|
-
name: Tr(e),
|
|
1946
|
-
args: t.args
|
|
1947
|
-
}
|
|
1948
|
-
];
|
|
1949
|
-
}
|
|
1950
|
-
function Tr(e) {
|
|
1951
|
-
return typeof e.props.validationLabel == "function" ? e.props.validationLabel(e) : e.props.validationLabel || e.props.label || e.props.name || String(e.name);
|
|
1952
|
-
}
|
|
1953
|
-
var Kr = "(?:[\\*+?()0-9]+)", zr = "[a-zA-Z][a-zA-Z0-9_]+", ba = new RegExp(
|
|
1954
|
-
`^(${Kr}?${zr})(?:\\:(.*)+)?$`,
|
|
1955
|
-
"i"
|
|
1956
|
-
), $a = new RegExp(`^(${Kr})(${zr})$`, "i"), _a = /([\*+?]+)?(\(\d+\))([\*+?]+)?/, Ht = /\(\d+\)/, wa = {
|
|
1957
|
-
blocking: !0,
|
|
1958
|
-
debounce: 0,
|
|
1959
|
-
force: !1,
|
|
1960
|
-
skipEmpty: !0,
|
|
1961
|
-
name: ""
|
|
1962
|
-
};
|
|
1963
|
-
function Ut(e, t, r) {
|
|
1964
|
-
return e ? (typeof e == "string" ? ka(e) : Ae(e)).reduce((s, i) => {
|
|
1965
|
-
let a = i.shift();
|
|
1966
|
-
const l = {};
|
|
1967
|
-
if (typeof a == "string") {
|
|
1968
|
-
const [o, y] = Aa(a);
|
|
1969
|
-
P(t, o) && (a = t[o], Object.assign(l, y));
|
|
1970
|
-
}
|
|
1971
|
-
return typeof a == "function" && s.push({
|
|
1972
|
-
observer: st(r),
|
|
1973
|
-
rule: a,
|
|
1974
|
-
args: i,
|
|
1975
|
-
timer: 0,
|
|
1976
|
-
state: null,
|
|
1977
|
-
queued: !0,
|
|
1978
|
-
deps: /* @__PURE__ */ new Map(),
|
|
1979
|
-
...wa,
|
|
1980
|
-
...Ca(l, a)
|
|
1981
|
-
}), s;
|
|
1982
|
-
}, []) : [];
|
|
1983
|
-
}
|
|
1984
|
-
function ka(e) {
|
|
1985
|
-
return e.split("|").reduce((t, r) => {
|
|
1986
|
-
const n = Sa(r);
|
|
1987
|
-
return n && t.push(n), t;
|
|
1988
|
-
}, []);
|
|
1989
|
-
}
|
|
1990
|
-
function Sa(e) {
|
|
1991
|
-
const t = e.trim();
|
|
1992
|
-
if (t) {
|
|
1993
|
-
const r = t.match(ba);
|
|
1994
|
-
if (r && typeof r[1] == "string") {
|
|
1995
|
-
const n = r[1].trim(), s = r[2] && typeof r[2] == "string" ? r[2].split(",").map((i) => i.trim()) : [];
|
|
1996
|
-
return [n, ...s];
|
|
1997
|
-
}
|
|
1998
|
-
}
|
|
1999
|
-
return !1;
|
|
2000
|
-
}
|
|
2001
|
-
function Aa(e) {
|
|
2002
|
-
const t = e.match($a);
|
|
2003
|
-
if (!t)
|
|
2004
|
-
return [e, { name: e }];
|
|
2005
|
-
const r = {
|
|
2006
|
-
"*": { force: !0 },
|
|
2007
|
-
"+": { skipEmpty: !1 },
|
|
2008
|
-
"?": { blocking: !1 }
|
|
2009
|
-
}, [, n, s] = t, i = Ht.test(n) ? n.match(_a) || [] : [, n];
|
|
2010
|
-
return [
|
|
2011
|
-
s,
|
|
2012
|
-
[i[1], i[2], i[3]].reduce(
|
|
2013
|
-
(a, l) => (l && (Ht.test(l) ? a.debounce = parseInt(l.substr(1, l.length - 1)) : l.split("").forEach(
|
|
2014
|
-
(o) => P(r, o) && Object.assign(a, r[o])
|
|
2015
|
-
)), a),
|
|
2016
|
-
{ name: s }
|
|
2017
|
-
)
|
|
2018
|
-
];
|
|
2019
|
-
}
|
|
2020
|
-
function Ca(e, t) {
|
|
2021
|
-
return e.name || (e.name = t.ruleName || t.name), ["skipEmpty", "force", "debounce", "blocking"].reduce(
|
|
2022
|
-
(r, n) => (P(t, n) && !P(r, n) && Object.assign(r, {
|
|
2023
|
-
[n]: t[n]
|
|
2024
|
-
}), r),
|
|
2025
|
-
e
|
|
2026
|
-
);
|
|
2027
|
-
}
|
|
2028
|
-
function I(e) {
|
|
2029
|
-
return e[0].toUpperCase() + e.substr(1);
|
|
2030
|
-
}
|
|
2031
|
-
function Bt(e, t = "or") {
|
|
2032
|
-
return e.reduce((r, n, s) => (r += n, s <= e.length - 2 && e.length > 2 && (r += ", "), s === e.length - 2 && (r += `${e.length === 2 ? " " : ""}${t} `), r), "");
|
|
2033
|
-
}
|
|
2034
|
-
function Ke(e) {
|
|
2035
|
-
const t = typeof e == "string" ? new Date(Date.parse(e)) : e;
|
|
2036
|
-
return t instanceof Date ? new Intl.DateTimeFormat(void 0, {
|
|
2037
|
-
dateStyle: "medium",
|
|
2038
|
-
timeZone: "UTC"
|
|
2039
|
-
}).format(t) : "(unknown)";
|
|
2040
|
-
}
|
|
2041
|
-
function Pa(e, t) {
|
|
2042
|
-
return Number(e) >= Number(t) ? [t, e] : [e, t];
|
|
2043
|
-
}
|
|
2044
|
-
var Ea = {
|
|
2045
|
-
/**
|
|
2046
|
-
* Shown on a button for adding additional items.
|
|
2047
|
-
*/
|
|
2048
|
-
add: "Add",
|
|
2049
|
-
/**
|
|
2050
|
-
* Shown when a button to remove items is visible.
|
|
2051
|
-
*/
|
|
2052
|
-
remove: "Remove",
|
|
2053
|
-
/**
|
|
2054
|
-
* Shown when there are multiple items to remove at the same time.
|
|
2055
|
-
*/
|
|
2056
|
-
removeAll: "Remove all",
|
|
2057
|
-
/**
|
|
2058
|
-
* Shown when all fields are not filled out correctly.
|
|
2059
|
-
*/
|
|
2060
|
-
incomplete: "Sorry, not all fields are filled out correctly.",
|
|
2061
|
-
/**
|
|
2062
|
-
* Shown in a button inside a form to submit the form.
|
|
2063
|
-
*/
|
|
2064
|
-
submit: "Submit",
|
|
2065
|
-
/**
|
|
2066
|
-
* Shown when no files are selected.
|
|
2067
|
-
*/
|
|
2068
|
-
noFiles: "No file chosen",
|
|
2069
|
-
/**
|
|
2070
|
-
* Shown on buttons that move fields up in a list.
|
|
2071
|
-
*/
|
|
2072
|
-
moveUp: "Move up",
|
|
2073
|
-
/**
|
|
2074
|
-
* Shown on buttons that move fields down in a list.
|
|
2075
|
-
*/
|
|
2076
|
-
moveDown: "Move down",
|
|
2077
|
-
/**
|
|
2078
|
-
* Shown when something is actively loading.
|
|
2079
|
-
*/
|
|
2080
|
-
isLoading: "Loading...",
|
|
2081
|
-
/**
|
|
2082
|
-
* Shown when there is more to load.
|
|
2083
|
-
*/
|
|
2084
|
-
loadMore: "Load more",
|
|
2085
|
-
/**
|
|
2086
|
-
* Show on buttons that navigate state forward
|
|
2087
|
-
*/
|
|
2088
|
-
next: "Next",
|
|
2089
|
-
/**
|
|
2090
|
-
* Show on buttons that navigate state backward
|
|
2091
|
-
*/
|
|
2092
|
-
prev: "Previous",
|
|
2093
|
-
/**
|
|
2094
|
-
* Shown when adding all values.
|
|
2095
|
-
*/
|
|
2096
|
-
addAllValues: "Add all values",
|
|
2097
|
-
/**
|
|
2098
|
-
* Shown when adding selected values.
|
|
2099
|
-
*/
|
|
2100
|
-
addSelectedValues: "Add selected values",
|
|
2101
|
-
/**
|
|
2102
|
-
* Shown when removing all values.
|
|
2103
|
-
*/
|
|
2104
|
-
removeAllValues: "Remove all values",
|
|
2105
|
-
/**
|
|
2106
|
-
* Shown when removing selected values.
|
|
2107
|
-
*/
|
|
2108
|
-
removeSelectedValues: "Remove selected values",
|
|
2109
|
-
/**
|
|
2110
|
-
* Shown when there is a date to choose.
|
|
2111
|
-
*/
|
|
2112
|
-
chooseDate: "Choose date",
|
|
2113
|
-
/**
|
|
2114
|
-
* Shown when there is a date to change.
|
|
2115
|
-
*/
|
|
2116
|
-
changeDate: "Change date",
|
|
2117
|
-
/**
|
|
2118
|
-
* Shown above error summaries when someone attempts to submit a form with
|
|
2119
|
-
* errors and the developer has implemented `<FormKitSummary />`.
|
|
2120
|
-
*/
|
|
2121
|
-
summaryHeader: "There were errors in your form.",
|
|
2122
|
-
/*
|
|
2123
|
-
* Shown when there is something to close
|
|
2124
|
-
*/
|
|
2125
|
-
close: "Close",
|
|
2126
|
-
/**
|
|
2127
|
-
* Shown when there is something to open.
|
|
2128
|
-
*/
|
|
2129
|
-
open: "Open"
|
|
2130
|
-
}, Oa = {
|
|
2131
|
-
/**
|
|
2132
|
-
* The value is not an accepted value.
|
|
2133
|
-
* @see {@link https://formkit.com/essentials/validation#accepted}
|
|
2134
|
-
*/
|
|
2135
|
-
accepted({ name: e }) {
|
|
2136
|
-
return `Please accept the ${e}.`;
|
|
2137
|
-
},
|
|
2138
|
-
/**
|
|
2139
|
-
* The date is not after
|
|
2140
|
-
* @see {@link https://formkit.com/essentials/validation#date-after}
|
|
2141
|
-
*/
|
|
2142
|
-
date_after({ name: e, args: t }) {
|
|
2143
|
-
return Array.isArray(t) && t.length ? `${I(e)} must be after ${Ke(t[0])}.` : `${I(e)} must be in the future.`;
|
|
2144
|
-
},
|
|
2145
|
-
/**
|
|
2146
|
-
* The value is not a letter.
|
|
2147
|
-
* @see {@link https://formkit.com/essentials/validation#alpha}
|
|
2148
|
-
*/
|
|
2149
|
-
alpha({ name: e }) {
|
|
2150
|
-
return `${I(e)} can only contain alphabetical characters.`;
|
|
2151
|
-
},
|
|
2152
|
-
/**
|
|
2153
|
-
* The value is not alphanumeric
|
|
2154
|
-
* @see {@link https://formkit.com/essentials/validation#alphanumeric}
|
|
2155
|
-
*/
|
|
2156
|
-
alphanumeric({ name: e }) {
|
|
2157
|
-
return `${I(e)} can only contain letters and numbers.`;
|
|
2158
|
-
},
|
|
2159
|
-
/**
|
|
2160
|
-
* The value is not letter and/or spaces
|
|
2161
|
-
* @see {@link https://formkit.com/essentials/validation#alpha-spaces}
|
|
2162
|
-
*/
|
|
2163
|
-
alpha_spaces({ name: e }) {
|
|
2164
|
-
return `${I(e)} can only contain letters and spaces.`;
|
|
2165
|
-
},
|
|
2166
|
-
/**
|
|
2167
|
-
* The value have no letter.
|
|
2168
|
-
* @see {@link https://formkit.com/essentials/validation#contains_alpha}
|
|
2169
|
-
*/
|
|
2170
|
-
contains_alpha({ name: e }) {
|
|
2171
|
-
return `${I(e)} must contain alphabetical characters.`;
|
|
2172
|
-
},
|
|
2173
|
-
/**
|
|
2174
|
-
* The value have no alphanumeric
|
|
2175
|
-
* @see {@link https://formkit.com/essentials/validation#contains_alphanumeric}
|
|
2176
|
-
*/
|
|
2177
|
-
contains_alphanumeric({ name: e }) {
|
|
2178
|
-
return `${I(e)} must contain letters or numbers.`;
|
|
2179
|
-
},
|
|
2180
|
-
/**
|
|
2181
|
-
* The value have no letter and/or spaces
|
|
2182
|
-
* @see {@link https://formkit.com/essentials/validation#contains_alpha-spaces}
|
|
2183
|
-
*/
|
|
2184
|
-
contains_alpha_spaces({ name: e }) {
|
|
2185
|
-
return `${I(e)} must contain letters or spaces.`;
|
|
2186
|
-
},
|
|
2187
|
-
/**
|
|
2188
|
-
* The value have no symbol
|
|
2189
|
-
* @see {@link https://formkit.com/essentials/validation#contains_symbol}
|
|
2190
|
-
*/
|
|
2191
|
-
contains_symbol({ name: e }) {
|
|
2192
|
-
return `${I(e)} must contain a symbol.`;
|
|
2193
|
-
},
|
|
2194
|
-
/**
|
|
2195
|
-
* The value have no uppercase
|
|
2196
|
-
* @see {@link https://formkit.com/essentials/validation#contains_uppercase}
|
|
2197
|
-
*/
|
|
2198
|
-
contains_uppercase({ name: e }) {
|
|
2199
|
-
return `${I(e)} must contain an uppercase letter.`;
|
|
2200
|
-
},
|
|
2201
|
-
/**
|
|
2202
|
-
* The value have no lowercase
|
|
2203
|
-
* @see {@link https://formkit.com/essentials/validation#contains_lowercase}
|
|
2204
|
-
*/
|
|
2205
|
-
contains_lowercase({ name: e }) {
|
|
2206
|
-
return `${I(e)} must contain a lowercase letter.`;
|
|
2207
|
-
},
|
|
2208
|
-
/**
|
|
2209
|
-
* The value have no numeric
|
|
2210
|
-
* @see {@link https://formkit.com/essentials/validation#contains_numeric}
|
|
2211
|
-
*/
|
|
2212
|
-
contains_numeric({ name: e }) {
|
|
2213
|
-
return `${I(e)} must contain numbers.`;
|
|
2214
|
-
},
|
|
2215
|
-
/**
|
|
2216
|
-
* The value is not symbol
|
|
2217
|
-
* @see {@link https://formkit.com/essentials/validation#symbol}
|
|
2218
|
-
*/
|
|
2219
|
-
symbol({ name: e }) {
|
|
2220
|
-
return `${I(e)} must be a symbol.`;
|
|
2221
|
-
},
|
|
2222
|
-
/**
|
|
2223
|
-
* The value is not uppercase
|
|
2224
|
-
* @see {@link https://formkit.com/essentials/validation#uppercase}
|
|
2225
|
-
*/
|
|
2226
|
-
uppercase({ name: e }) {
|
|
2227
|
-
return `${I(e)} can only contain uppercase letters.`;
|
|
2228
|
-
},
|
|
2229
|
-
/**
|
|
2230
|
-
* The value is not lowercase
|
|
2231
|
-
* @see {@link https://formkit.com/essentials/validation#lowercase}
|
|
2232
|
-
*/
|
|
2233
|
-
lowercase({ name: e, args: t }) {
|
|
2234
|
-
let r = "";
|
|
2235
|
-
return Array.isArray(t) && t.length && (t[0] === "allow_non_alpha" && (r = ", numbers and symbols"), t[0] === "allow_numeric" && (r = " and numbers"), t[0] === "allow_numeric_dashes" && (r = ", numbers and dashes")), `${I(e)} can only contain lowercase letters${r}.`;
|
|
2236
|
-
},
|
|
2237
|
-
/**
|
|
2238
|
-
* The date is not before
|
|
2239
|
-
* @see {@link https://formkit.com/essentials/validation#date-before}
|
|
2240
|
-
*/
|
|
2241
|
-
date_before({ name: e, args: t }) {
|
|
2242
|
-
return Array.isArray(t) && t.length ? `${I(e)} must be before ${Ke(t[0])}.` : `${I(e)} must be in the past.`;
|
|
2243
|
-
},
|
|
2244
|
-
/**
|
|
2245
|
-
* The value is not between two numbers
|
|
2246
|
-
* @see {@link https://formkit.com/essentials/validation#between}
|
|
2247
|
-
*/
|
|
2248
|
-
between({ name: e, args: t }) {
|
|
2249
|
-
if (isNaN(t[0]) || isNaN(t[1]))
|
|
2250
|
-
return "This field was configured incorrectly and can’t be submitted.";
|
|
2251
|
-
const [r, n] = Pa(t[0], t[1]);
|
|
2252
|
-
return `${I(e)} must be between ${r} and ${n}.`;
|
|
2253
|
-
},
|
|
2254
|
-
/**
|
|
2255
|
-
* The confirmation field does not match
|
|
2256
|
-
* @see {@link https://formkit.com/essentials/validation#confirm}
|
|
2257
|
-
*/
|
|
2258
|
-
confirm({ name: e }) {
|
|
2259
|
-
return `${I(e)} does not match.`;
|
|
2260
|
-
},
|
|
2261
|
-
/**
|
|
2262
|
-
* The value is not a valid date
|
|
2263
|
-
* @see {@link https://formkit.com/essentials/validation#date-format}
|
|
2264
|
-
*/
|
|
2265
|
-
date_format({ name: e, args: t }) {
|
|
2266
|
-
return Array.isArray(t) && t.length ? `${I(e)} is not a valid date, please use the format ${t[0]}` : "This field was configured incorrectly and can’t be submitted";
|
|
2267
|
-
},
|
|
2268
|
-
/**
|
|
2269
|
-
* Is not within expected date range
|
|
2270
|
-
* @see {@link https://formkit.com/essentials/validation#date-between}
|
|
2271
|
-
*/
|
|
2272
|
-
date_between({ name: e, args: t }) {
|
|
2273
|
-
return `${I(e)} must be between ${Ke(t[0])} and ${Ke(t[1])}`;
|
|
2274
|
-
},
|
|
2275
|
-
/**
|
|
2276
|
-
* Shown when the user-provided value is not a valid email address.
|
|
2277
|
-
* @see {@link https://formkit.com/essentials/validation#email}
|
|
2278
|
-
*/
|
|
2279
|
-
email: "Please enter a valid email address.",
|
|
2280
|
-
/**
|
|
2281
|
-
* Does not end with the specified value
|
|
2282
|
-
* @see {@link https://formkit.com/essentials/validation#ends-with}
|
|
2283
|
-
*/
|
|
2284
|
-
ends_with({ name: e, args: t }) {
|
|
2285
|
-
return `${I(e)} doesn’t end with ${Bt(t)}.`;
|
|
2286
|
-
},
|
|
2287
|
-
/**
|
|
2288
|
-
* Is not an allowed value
|
|
2289
|
-
* @see {@link https://formkit.com/essentials/validation#is}
|
|
2290
|
-
*/
|
|
2291
|
-
is({ name: e }) {
|
|
2292
|
-
return `${I(e)} is not an allowed value.`;
|
|
2293
|
-
},
|
|
2294
|
-
/**
|
|
2295
|
-
* Does not match specified length
|
|
2296
|
-
* @see {@link https://formkit.com/essentials/validation#length}
|
|
2297
|
-
*/
|
|
2298
|
-
length({ name: e, args: [t = 0, r = 1 / 0] }) {
|
|
2299
|
-
const n = Number(t) <= Number(r) ? t : r, s = Number(r) >= Number(t) ? r : t;
|
|
2300
|
-
return n == 1 && s === 1 / 0 ? `${I(e)} must be at least one character.` : n == 0 && s ? `${I(e)} must be less than or equal to ${s} characters.` : n === s ? `${I(e)} should be ${s} characters long.` : n && s === 1 / 0 ? `${I(e)} must be greater than or equal to ${n} characters.` : `${I(e)} must be between ${n} and ${s} characters.`;
|
|
2301
|
-
},
|
|
2302
|
-
/**
|
|
2303
|
-
* Value is not a match
|
|
2304
|
-
* @see {@link https://formkit.com/essentials/validation#matches}
|
|
2305
|
-
*/
|
|
2306
|
-
matches({ name: e }) {
|
|
2307
|
-
return `${I(e)} is not an allowed value.`;
|
|
2308
|
-
},
|
|
2309
|
-
/**
|
|
2310
|
-
* Exceeds maximum allowed value
|
|
2311
|
-
* @see {@link https://formkit.com/essentials/validation#max}
|
|
2312
|
-
*/
|
|
2313
|
-
max({ name: e, node: { value: t }, args: r }) {
|
|
2314
|
-
return Array.isArray(t) ? `Cannot have more than ${r[0]} ${e}.` : `${I(e)} must be no more than ${r[0]}.`;
|
|
2315
|
-
},
|
|
2316
|
-
/**
|
|
2317
|
-
* The (field-level) value does not match specified mime type
|
|
2318
|
-
* @see {@link https://formkit.com/essentials/validation#mime}
|
|
2319
|
-
*/
|
|
2320
|
-
mime({ name: e, args: t }) {
|
|
2321
|
-
return t[0] ? `${I(e)} must be of the type: ${t[0]}` : "No file formats allowed.";
|
|
2322
|
-
},
|
|
2323
|
-
/**
|
|
2324
|
-
* Does not fulfill minimum allowed value
|
|
2325
|
-
* @see {@link https://formkit.com/essentials/validation#min}
|
|
2326
|
-
*/
|
|
2327
|
-
min({ name: e, node: { value: t }, args: r }) {
|
|
2328
|
-
return Array.isArray(t) ? `Cannot have fewer than ${r[0]} ${e}.` : `${I(e)} must be at least ${r[0]}.`;
|
|
2329
|
-
},
|
|
2330
|
-
/**
|
|
2331
|
-
* Is not an allowed value
|
|
2332
|
-
* @see {@link https://formkit.com/essentials/validation#not}
|
|
2333
|
-
*/
|
|
2334
|
-
not({ name: e, node: { value: t } }) {
|
|
2335
|
-
return `“${t}” is not an allowed ${e}.`;
|
|
2336
|
-
},
|
|
2337
|
-
/**
|
|
2338
|
-
* Is not a number
|
|
2339
|
-
* @see {@link https://formkit.com/essentials/validation#number}
|
|
2340
|
-
*/
|
|
2341
|
-
number({ name: e }) {
|
|
2342
|
-
return `${I(e)} must be a number.`;
|
|
2343
|
-
},
|
|
2344
|
-
/**
|
|
2345
|
-
* Require one field.
|
|
2346
|
-
* @see {@link https://formkit.com/essentials/validation#require-one}
|
|
2347
|
-
*/
|
|
2348
|
-
require_one: ({ name: e, node: t, args: r }) => {
|
|
2349
|
-
const n = r.map((s) => {
|
|
2350
|
-
const i = t.at(s);
|
|
2351
|
-
return i ? Tr(i) : !1;
|
|
2352
|
-
}).filter((s) => !!s);
|
|
2353
|
-
return n.unshift(e), `${n.join(" or ")} is required.`;
|
|
2354
|
-
},
|
|
2355
|
-
/**
|
|
2356
|
-
* Required field.
|
|
2357
|
-
* @see {@link https://formkit.com/essentials/validation#required}
|
|
2358
|
-
*/
|
|
2359
|
-
required({ name: e }) {
|
|
2360
|
-
return `${I(e)} is required.`;
|
|
2361
|
-
},
|
|
2362
|
-
/**
|
|
2363
|
-
* Does not start with specified value
|
|
2364
|
-
* @see {@link https://formkit.com/essentials/validation#starts-with}
|
|
2365
|
-
*/
|
|
2366
|
-
starts_with({ name: e, args: t }) {
|
|
2367
|
-
return `${I(e)} doesn’t start with ${Bt(t)}.`;
|
|
2368
|
-
},
|
|
2369
|
-
/**
|
|
2370
|
-
* Is not a url
|
|
2371
|
-
* @see {@link https://formkit.com/essentials/validation#url}
|
|
2372
|
-
*/
|
|
2373
|
-
url() {
|
|
2374
|
-
return "Please enter a valid URL.";
|
|
2375
|
-
},
|
|
2376
|
-
/**
|
|
2377
|
-
* Shown when the date is invalid.
|
|
2378
|
-
*/
|
|
2379
|
-
invalidDate: "The selected date is invalid."
|
|
2380
|
-
}, Ia = { ui: Ea, validation: Oa }, Zt = /* @__PURE__ */ new Set();
|
|
2381
|
-
function Ma(e) {
|
|
2382
|
-
return function(r) {
|
|
2383
|
-
Zt.add(r), r.on("destroying", () => Zt.delete(r));
|
|
2384
|
-
let n = Yt(r.config.locale, e), s = n ? e[n] : {};
|
|
2385
|
-
r.on("prop:locale", ({ payload: i }) => {
|
|
2386
|
-
n = Yt(i, e), s = n ? e[n] : {}, r.store.touch();
|
|
2387
|
-
}), r.on("prop:label", () => r.store.touch()), r.on("prop:validationLabel", () => r.store.touch()), r.hook.text((i, a) => {
|
|
2388
|
-
var o, y;
|
|
2389
|
-
const l = ((o = i.meta) == null ? void 0 : o.messageKey) || i.key;
|
|
2390
|
-
if (P(s, i.type) && P(s[i.type], l)) {
|
|
2391
|
-
const v = s[i.type][l];
|
|
2392
|
-
typeof v == "function" ? i.value = Array.isArray((y = i.meta) == null ? void 0 : y.i18nArgs) ? v(...i.meta.i18nArgs) : v(i) : i.value = v;
|
|
2393
|
-
}
|
|
2394
|
-
return a(i);
|
|
2395
|
-
});
|
|
2396
|
-
};
|
|
2397
|
-
}
|
|
2398
|
-
function Yt(e, t) {
|
|
2399
|
-
if (P(t, e))
|
|
2400
|
-
return e;
|
|
2401
|
-
const [r] = e.split("-");
|
|
2402
|
-
if (P(t, r))
|
|
2403
|
-
return r;
|
|
2404
|
-
for (const n in t)
|
|
2405
|
-
return n;
|
|
2406
|
-
return !1;
|
|
2407
|
-
}
|
|
2408
|
-
function xa(...e) {
|
|
2409
|
-
const t = e.reduce(
|
|
2410
|
-
(n, s) => le(n, s),
|
|
2411
|
-
{}
|
|
2412
|
-
), r = () => {
|
|
2413
|
-
};
|
|
2414
|
-
return r.library = function(n) {
|
|
2415
|
-
const s = $e(n.props.type);
|
|
2416
|
-
P(t, s) && n.define(t[s]);
|
|
2417
|
-
}, r;
|
|
2418
|
-
}
|
|
2419
|
-
var Ra = [
|
|
2420
|
-
"classes",
|
|
2421
|
-
"config",
|
|
2422
|
-
"delay",
|
|
2423
|
-
"errors",
|
|
2424
|
-
"id",
|
|
2425
|
-
"index",
|
|
2426
|
-
"inputErrors",
|
|
2427
|
-
"library",
|
|
2428
|
-
"modelValue",
|
|
2429
|
-
"onUpdate:modelValue",
|
|
2430
|
-
"name",
|
|
2431
|
-
"number",
|
|
2432
|
-
"parent",
|
|
2433
|
-
"plugins",
|
|
2434
|
-
"sectionsSchema",
|
|
2435
|
-
"type",
|
|
2436
|
-
"validation",
|
|
2437
|
-
"validationLabel",
|
|
2438
|
-
"validationMessages",
|
|
2439
|
-
"validationRules",
|
|
2440
|
-
// Runtime event props:
|
|
2441
|
-
"onInput",
|
|
2442
|
-
"onInputRaw",
|
|
2443
|
-
"onUpdate:modelValue",
|
|
2444
|
-
"onNode",
|
|
2445
|
-
"onSubmit",
|
|
2446
|
-
"onSubmitInvalid",
|
|
2447
|
-
"onSubmitRaw"
|
|
2448
|
-
];
|
|
2449
|
-
function it(e) {
|
|
2450
|
-
return e && typeof e == "object" && "group" in e && Array.isArray(e.options);
|
|
2451
|
-
}
|
|
2452
|
-
function Wr(e, t = { count: 1 }) {
|
|
2453
|
-
return Array.isArray(e) ? e.map(
|
|
2454
|
-
(r) => {
|
|
2455
|
-
if (typeof r == "string" || typeof r == "number")
|
|
2456
|
-
return {
|
|
2457
|
-
label: String(r),
|
|
2458
|
-
value: String(r)
|
|
2459
|
-
};
|
|
2460
|
-
if (typeof r == "object") {
|
|
2461
|
-
if ("group" in r)
|
|
2462
|
-
return r.options = Wr(r.options || [], t), r;
|
|
2463
|
-
"value" in r && typeof r.value != "string" && Object.assign(r, {
|
|
2464
|
-
value: `__mask_${t.count++}`,
|
|
2465
|
-
__original: r.value
|
|
2466
|
-
});
|
|
2467
|
-
}
|
|
2468
|
-
return r;
|
|
2469
|
-
}
|
|
2470
|
-
) : Object.keys(e).map((r) => ({
|
|
2471
|
-
label: e[r],
|
|
2472
|
-
value: r
|
|
2473
|
-
}));
|
|
2474
|
-
}
|
|
2475
|
-
function de(e, t, r = !1) {
|
|
2476
|
-
if (Array.isArray(e)) {
|
|
2477
|
-
for (const n of e)
|
|
2478
|
-
if (!(typeof n != "object" && n)) {
|
|
2479
|
-
if (it(n)) {
|
|
2480
|
-
const s = de(n.options, t, !0);
|
|
2481
|
-
if (s !== void 0)
|
|
2482
|
-
return s;
|
|
2483
|
-
} else if (t == n.value)
|
|
2484
|
-
return "__original" in n ? n.__original : n.value;
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
return r ? void 0 : t;
|
|
2488
|
-
}
|
|
2489
|
-
function Pe(e, t) {
|
|
2490
|
-
return e === null && t === void 0 || e === void 0 && t === null ? !1 : e == t ? !0 : Se(e) && Se(t) ? T(e, t) : !1;
|
|
2491
|
-
}
|
|
2492
|
-
function Rt(e) {
|
|
2493
|
-
e.hook.prop((t, r) => {
|
|
2494
|
-
var n;
|
|
2495
|
-
return t.prop === "options" && (typeof t.value == "function" ? (e.props.optionsLoader = t.value, t.value = []) : ((n = e.props)._normalizeCounter ?? (n._normalizeCounter = { count: 1 }), t.value = Wr(t.value, e.props._normalizeCounter))), r(t);
|
|
2496
|
-
});
|
|
2497
|
-
}
|
|
2498
|
-
// @__NO_SIDE_EFFECTS__
|
|
2499
|
-
function A(e, t, r = !1) {
|
|
2500
|
-
return (...n) => {
|
|
2501
|
-
const s = (i) => {
|
|
2502
|
-
const a = !t || typeof t == "string" ? { $el: t } : t();
|
|
2503
|
-
return (bt(a) || $t(a)) && (a.meta ? a.meta.section = e : a.meta = { section: e }, n.length && !a.children && (a.children = [
|
|
2504
|
-
...n.map(
|
|
2505
|
-
(l) => typeof l == "function" ? l(i) : l
|
|
2506
|
-
)
|
|
2507
|
-
]), bt(a) && (a.attrs = {
|
|
2508
|
-
class: `$classes.${e}`,
|
|
2509
|
-
...a.attrs || {}
|
|
2510
|
-
})), {
|
|
2511
|
-
if: `$slots.${e}`,
|
|
2512
|
-
then: `$slots.${e}`,
|
|
2513
|
-
else: e in i ? /* @__PURE__ */ Me(a, i[e]) : a
|
|
2514
|
-
};
|
|
2515
|
-
};
|
|
2516
|
-
return s._s = e, r ? /* @__PURE__ */ ja(s) : s;
|
|
2517
|
-
};
|
|
2518
|
-
}
|
|
2519
|
-
// @__NO_SIDE_EFFECTS__
|
|
2520
|
-
function ja(e) {
|
|
2521
|
-
return (t) => [e(t)];
|
|
2522
|
-
}
|
|
2523
|
-
function Ge(e) {
|
|
2524
|
-
return !!(e && typeof e == "object" && ("$el" in e || "$cmp" in e || "$formkit" in e));
|
|
2525
|
-
}
|
|
2526
|
-
// @__NO_SIDE_EFFECTS__
|
|
2527
|
-
function Me(e, t = {}) {
|
|
2528
|
-
return typeof e == "string" ? Ge(t) || typeof t == "string" ? t : e : Array.isArray(e) ? Ge(t) ? t : e : le(e, t);
|
|
2529
|
-
}
|
|
2530
|
-
var Fa = /* @__PURE__ */ A("actions", () => ({
|
|
2531
|
-
$el: "div",
|
|
2532
|
-
if: "$actions"
|
|
2533
|
-
})), Je = /* @__PURE__ */ A("input", () => ({
|
|
2534
|
-
$el: "input",
|
|
2535
|
-
bind: "$attrs",
|
|
2536
|
-
attrs: {
|
|
2537
|
-
type: "$type",
|
|
2538
|
-
name: "$node.props.altName || $node.name",
|
|
2539
|
-
disabled: "$option.attrs.disabled || $disabled",
|
|
2540
|
-
onInput: "$handlers.toggleChecked",
|
|
2541
|
-
checked: "$fns.eq($_value, $onValue)",
|
|
2542
|
-
onBlur: "$handlers.blur",
|
|
2543
|
-
value: "$: true",
|
|
2544
|
-
id: "$id",
|
|
2545
|
-
"aria-describedby": {
|
|
2546
|
-
if: "$options.length",
|
|
2547
|
-
then: {
|
|
2548
|
-
if: "$option.help",
|
|
2549
|
-
then: '$: "help-" + $option.attrs.id',
|
|
2550
|
-
else: void 0
|
|
2551
|
-
},
|
|
2552
|
-
else: {
|
|
2553
|
-
if: "$help",
|
|
2554
|
-
then: '$: "help-" + $id',
|
|
2555
|
-
else: void 0
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
}
|
|
2559
|
-
})), Hr = /* @__PURE__ */ A("optionHelp", () => ({
|
|
2560
|
-
$el: "div",
|
|
2561
|
-
if: "$option.help",
|
|
2562
|
-
attrs: {
|
|
2563
|
-
id: '$: "help-" + $option.attrs.id'
|
|
2564
|
-
}
|
|
2565
|
-
})), Qe = /* @__PURE__ */ A("inner", "span"), Xe = /* @__PURE__ */ A("label", "span"), Ur = /* @__PURE__ */ A("option", () => ({
|
|
2566
|
-
$el: "li",
|
|
2567
|
-
for: ["option", "$options"],
|
|
2568
|
-
attrs: {
|
|
2569
|
-
"data-disabled": "$option.attrs.disabled || $disabled || undefined"
|
|
2570
|
-
}
|
|
2571
|
-
})), Br = /* @__PURE__ */ A("options", "ul"), et = /* @__PURE__ */ A("wrapper", () => ({
|
|
2572
|
-
$el: "label",
|
|
2573
|
-
attrs: {
|
|
2574
|
-
"data-disabled": {
|
|
2575
|
-
if: "$options.length",
|
|
2576
|
-
then: void 0,
|
|
2577
|
-
else: "$disabled || undefined"
|
|
2578
|
-
},
|
|
2579
|
-
"data-checked": {
|
|
2580
|
-
if: "$options == undefined",
|
|
2581
|
-
then: "$fns.eq($_value, $onValue) || undefined",
|
|
2582
|
-
else: "$fns.isChecked($option.value) || undefined"
|
|
2583
|
-
}
|
|
2584
|
-
}
|
|
2585
|
-
})), Va = /* @__PURE__ */ A("input", () => ({
|
|
2586
|
-
$el: "button",
|
|
2587
|
-
bind: "$attrs",
|
|
2588
|
-
attrs: {
|
|
2589
|
-
type: "$type",
|
|
2590
|
-
disabled: "$disabled",
|
|
2591
|
-
name: "$node.name",
|
|
2592
|
-
id: "$id"
|
|
2593
|
-
}
|
|
2594
|
-
})), Na = /* @__PURE__ */ A("default", null), tt = /* @__PURE__ */ A("decorator", () => ({
|
|
2595
|
-
$el: "span",
|
|
2596
|
-
attrs: {
|
|
2597
|
-
"aria-hidden": "true"
|
|
2598
|
-
}
|
|
2599
|
-
})), Zr = /* @__PURE__ */ A("fieldset", () => ({
|
|
2600
|
-
$el: "fieldset",
|
|
2601
|
-
attrs: {
|
|
2602
|
-
id: "$id",
|
|
2603
|
-
"aria-describedby": {
|
|
2604
|
-
if: "$help",
|
|
2605
|
-
then: '$: "help-" + $id',
|
|
2606
|
-
else: void 0
|
|
2607
|
-
}
|
|
2608
|
-
}
|
|
2609
|
-
})), Da = /* @__PURE__ */ A("input", () => ({
|
|
2610
|
-
$el: "input",
|
|
2611
|
-
bind: "$attrs",
|
|
2612
|
-
attrs: {
|
|
2613
|
-
type: "file",
|
|
2614
|
-
disabled: "$disabled",
|
|
2615
|
-
name: "$node.name",
|
|
2616
|
-
onChange: "$handlers.files",
|
|
2617
|
-
onBlur: "$handlers.blur",
|
|
2618
|
-
id: "$id",
|
|
2619
|
-
"aria-describedby": "$describedBy",
|
|
2620
|
-
"aria-required": "$state.required || undefined"
|
|
2621
|
-
}
|
|
2622
|
-
})), La = /* @__PURE__ */ A("fileItem", () => ({
|
|
2623
|
-
$el: "li",
|
|
2624
|
-
for: ["file", "$value"]
|
|
2625
|
-
})), qa = /* @__PURE__ */ A("fileList", () => ({
|
|
2626
|
-
$el: "ul",
|
|
2627
|
-
if: "$value.length",
|
|
2628
|
-
attrs: {
|
|
2629
|
-
"data-has-multiple": "$_hasMultipleFiles"
|
|
2630
|
-
}
|
|
2631
|
-
})), Ta = /* @__PURE__ */ A("fileName", () => ({
|
|
2632
|
-
$el: "span",
|
|
2633
|
-
attrs: {
|
|
2634
|
-
class: "$classes.fileName"
|
|
2635
|
-
}
|
|
2636
|
-
})), Gt = /* @__PURE__ */ A("fileRemove", () => ({
|
|
2637
|
-
$el: "button",
|
|
2638
|
-
attrs: {
|
|
2639
|
-
type: "button",
|
|
2640
|
-
onClick: "$handlers.resetFiles"
|
|
2641
|
-
}
|
|
2642
|
-
})), Ka = /* @__PURE__ */ A("form", () => ({
|
|
2643
|
-
$el: "form",
|
|
2644
|
-
bind: "$attrs",
|
|
2645
|
-
meta: {
|
|
2646
|
-
autoAnimate: !0
|
|
2647
|
-
},
|
|
2648
|
-
attrs: {
|
|
2649
|
-
id: "$id",
|
|
2650
|
-
name: "$node.name",
|
|
2651
|
-
onSubmit: "$handlers.submit",
|
|
2652
|
-
"data-loading": "$state.loading || undefined"
|
|
2653
|
-
}
|
|
2654
|
-
})), jt = /* @__PURE__ */ A("wrapper", null, !0), ee = /* @__PURE__ */ A("help", () => ({
|
|
2655
|
-
$el: "div",
|
|
2656
|
-
if: "$help",
|
|
2657
|
-
attrs: {
|
|
2658
|
-
id: '$: "help-" + $id'
|
|
2659
|
-
}
|
|
2660
|
-
})), D = (e, t) => (/* @__PURE__ */ A(`${e}Icon`, () => {
|
|
2661
|
-
const r = `_raw${e.charAt(0).toUpperCase()}${e.slice(1)}Icon`;
|
|
2662
|
-
return {
|
|
2663
|
-
if: `$${e}Icon && $${r}`,
|
|
2664
|
-
$el: `${t || "span"}`,
|
|
2665
|
-
attrs: {
|
|
2666
|
-
class: `$classes.${e}Icon + " " + $classes.icon`,
|
|
2667
|
-
innerHTML: `$${r}`,
|
|
2668
|
-
onClick: `$handlers.iconClick(${e})`,
|
|
2669
|
-
role: `$fns.iconRole(${e})`,
|
|
2670
|
-
tabindex: `$fns.iconRole(${e}) === "button" && "0" || undefined`,
|
|
2671
|
-
for: {
|
|
2672
|
-
if: `${t === "label"}`,
|
|
2673
|
-
then: "$id"
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
};
|
|
2677
|
-
}))(), De = /* @__PURE__ */ A("inner", "div"), Le = /* @__PURE__ */ A("label", () => ({
|
|
2678
|
-
$el: "label",
|
|
2679
|
-
if: "$label",
|
|
2680
|
-
attrs: {
|
|
2681
|
-
for: "$id"
|
|
2682
|
-
}
|
|
2683
|
-
})), Yr = /* @__PURE__ */ A("legend", () => ({
|
|
2684
|
-
$el: "legend",
|
|
2685
|
-
if: "$label"
|
|
2686
|
-
})), oe = /* @__PURE__ */ A("message", () => ({
|
|
2687
|
-
$el: "li",
|
|
2688
|
-
for: ["message", "$messages"],
|
|
2689
|
-
attrs: {
|
|
2690
|
-
key: "$message.key",
|
|
2691
|
-
id: "$id + '-' + $message.key",
|
|
2692
|
-
"data-message-type": "$message.type"
|
|
2693
|
-
}
|
|
2694
|
-
})), ue = /* @__PURE__ */ A("messages", () => ({
|
|
2695
|
-
$el: "ul",
|
|
2696
|
-
if: "$defaultMessagePlacement && $fns.length($messages)"
|
|
2697
|
-
})), za = /* @__PURE__ */ A("noFiles", () => ({
|
|
2698
|
-
$el: "span",
|
|
2699
|
-
if: "$value == null || $value.length == 0"
|
|
2700
|
-
})), Wa = /* @__PURE__ */ A("optGroup", () => ({
|
|
2701
|
-
$el: "optgroup",
|
|
2702
|
-
bind: "$option.attrs",
|
|
2703
|
-
attrs: {
|
|
2704
|
-
label: "$option.group"
|
|
2705
|
-
}
|
|
2706
|
-
})), Jt = /* @__PURE__ */ A("option", () => ({
|
|
2707
|
-
$el: "option",
|
|
2708
|
-
bind: "$option.attrs",
|
|
2709
|
-
attrs: {
|
|
2710
|
-
class: "$classes.option",
|
|
2711
|
-
value: "$option.value",
|
|
2712
|
-
selected: "$fns.isSelected($option)"
|
|
2713
|
-
}
|
|
2714
|
-
})), Qt = /* @__PURE__ */ A("options", () => ({
|
|
2715
|
-
$el: null,
|
|
2716
|
-
if: "$options.length",
|
|
2717
|
-
for: ["option", "$option.options || $options"]
|
|
2718
|
-
})), fe = /* @__PURE__ */ A("outer", () => ({
|
|
2719
|
-
$el: "div",
|
|
2720
|
-
meta: {
|
|
2721
|
-
autoAnimate: !0
|
|
2722
|
-
},
|
|
2723
|
-
attrs: {
|
|
2724
|
-
key: "$id",
|
|
2725
|
-
"data-family": "$family || undefined",
|
|
2726
|
-
"data-type": "$type",
|
|
2727
|
-
"data-multiple": '$attrs.multiple || ($type != "select" && $options != undefined) || undefined',
|
|
2728
|
-
"data-has-multiple": "$_hasMultipleFiles",
|
|
2729
|
-
"data-disabled": '$: ($disabled !== "false" && $disabled) || undefined',
|
|
2730
|
-
"data-empty": "$state.empty || undefined",
|
|
2731
|
-
"data-complete": "$state.complete || undefined",
|
|
2732
|
-
"data-invalid": "$state.invalid || undefined",
|
|
2733
|
-
"data-errors": "$state.errors || undefined",
|
|
2734
|
-
"data-submitted": "$state.submitted || undefined",
|
|
2735
|
-
"data-prefix-icon": "$_rawPrefixIcon !== undefined || undefined",
|
|
2736
|
-
"data-suffix-icon": "$_rawSuffixIcon !== undefined || undefined",
|
|
2737
|
-
"data-prefix-icon-click": "$onPrefixIconClick !== undefined || undefined",
|
|
2738
|
-
"data-suffix-icon-click": "$onSuffixIconClick !== undefined || undefined"
|
|
2739
|
-
}
|
|
2740
|
-
})), te = /* @__PURE__ */ A("prefix", null), Ha = /* @__PURE__ */ A("input", () => ({
|
|
2741
|
-
$el: "select",
|
|
2742
|
-
bind: "$attrs",
|
|
2743
|
-
attrs: {
|
|
2744
|
-
id: "$id",
|
|
2745
|
-
"data-placeholder": "$fns.showPlaceholder($_value, $placeholder)",
|
|
2746
|
-
disabled: "$disabled",
|
|
2747
|
-
class: "$classes.input",
|
|
2748
|
-
name: "$node.name",
|
|
2749
|
-
onChange: "$handlers.onChange",
|
|
2750
|
-
onInput: "$handlers.selectInput",
|
|
2751
|
-
onBlur: "$handlers.blur",
|
|
2752
|
-
"aria-describedby": "$describedBy",
|
|
2753
|
-
"aria-required": "$state.required || undefined"
|
|
2754
|
-
}
|
|
2755
|
-
})), Ua = /* @__PURE__ */ A("submit", () => ({
|
|
2756
|
-
$cmp: "FormKit",
|
|
2757
|
-
bind: "$submitAttrs",
|
|
2758
|
-
props: {
|
|
2759
|
-
type: "submit",
|
|
2760
|
-
label: "$submitLabel"
|
|
2761
|
-
}
|
|
2762
|
-
})), re = /* @__PURE__ */ A("suffix", null), Gr = /* @__PURE__ */ A("input", () => ({
|
|
2763
|
-
$el: "input",
|
|
2764
|
-
bind: "$attrs",
|
|
2765
|
-
attrs: {
|
|
2766
|
-
type: "$type",
|
|
2767
|
-
disabled: "$disabled",
|
|
2768
|
-
name: "$node.name",
|
|
2769
|
-
onInput: "$handlers.DOMInput",
|
|
2770
|
-
onBlur: "$handlers.blur",
|
|
2771
|
-
value: "$_value",
|
|
2772
|
-
id: "$id",
|
|
2773
|
-
"aria-describedby": "$describedBy",
|
|
2774
|
-
"aria-required": "$state.required || undefined"
|
|
2775
|
-
}
|
|
2776
|
-
})), Ba = /* @__PURE__ */ A("input", () => ({
|
|
2777
|
-
$el: "textarea",
|
|
2778
|
-
bind: "$attrs",
|
|
2779
|
-
attrs: {
|
|
2780
|
-
disabled: "$disabled",
|
|
2781
|
-
name: "$node.name",
|
|
2782
|
-
onInput: "$handlers.DOMInput",
|
|
2783
|
-
onBlur: "$handlers.blur",
|
|
2784
|
-
value: "$_value",
|
|
2785
|
-
id: "$id",
|
|
2786
|
-
"aria-describedby": "$describedBy",
|
|
2787
|
-
"aria-required": "$state.required || undefined"
|
|
2788
|
-
},
|
|
2789
|
-
children: "$initialValue"
|
|
2790
|
-
})), Oe = /* @__PURE__ */ A("wrapper", "div"), Za = 0;
|
|
2791
|
-
function Jr(e) {
|
|
2792
|
-
(e.type === "group" || e.type === "list") && e.plugins.add(Ya);
|
|
2793
|
-
}
|
|
2794
|
-
function Ya(e) {
|
|
2795
|
-
e.props.type === "radio" && (e.addProps(["altName"]), e.props.altName = `${e.name}_${Za++}`);
|
|
2796
|
-
}
|
|
2797
|
-
function Qr(e) {
|
|
2798
|
-
return function(t, r) {
|
|
2799
|
-
return t.prop === "options" && Array.isArray(t.value) && (t.value = t.value.map((n) => {
|
|
2800
|
-
var s;
|
|
2801
|
-
return (s = n.attrs) != null && s.id ? n : le(n, {
|
|
2802
|
-
attrs: {
|
|
2803
|
-
id: `${e.props.id}-option-${At(String(n.value))}`
|
|
2804
|
-
}
|
|
2805
|
-
});
|
|
2806
|
-
}), e.props.type === "checkbox" && !Array.isArray(e.value) && (e.isCreated ? e.input([], !1) : e.on("created", () => {
|
|
2807
|
-
Array.isArray(e.value) || e.input([], !1);
|
|
2808
|
-
}))), r(t);
|
|
2809
|
-
};
|
|
2810
|
-
}
|
|
2811
|
-
function Ga(e, t) {
|
|
2812
|
-
const r = t.target;
|
|
2813
|
-
if (r instanceof HTMLInputElement) {
|
|
2814
|
-
const n = Array.isArray(e.props.options) ? de(e.props.options, r.value) : r.value;
|
|
2815
|
-
Array.isArray(e.props.options) && e.props.options.length ? Array.isArray(e._value) ? e._value.some((s) => Pe(n, s)) ? e.input(
|
|
2816
|
-
e._value.filter(
|
|
2817
|
-
(s) => !Pe(n, s)
|
|
2818
|
-
)
|
|
2819
|
-
) : e.input([...e._value, n]) : e.input([n]) : r.checked ? e.input(e.props.onValue) : e.input(e.props.offValue);
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
2822
|
-
function Ja(e, t) {
|
|
2823
|
-
var r, n;
|
|
2824
|
-
return (r = e.context) == null || r.value, (n = e.context) == null || n._value, Array.isArray(e._value) ? e._value.some(
|
|
2825
|
-
(s) => Pe(de(e.props.options, t), s)
|
|
2826
|
-
) : !1;
|
|
2827
|
-
}
|
|
2828
|
-
function Qa(e) {
|
|
2829
|
-
e.on("created", () => {
|
|
2830
|
-
var t, r;
|
|
2831
|
-
(t = e.context) != null && t.handlers && (e.context.handlers.toggleChecked = Ga.bind(null, e)), (r = e.context) != null && r.fns && (e.context.fns.isChecked = Ja.bind(null, e)), P(e.props, "onValue") || (e.props.onValue = !0), P(e.props, "offValue") || (e.props.offValue = !1);
|
|
2832
|
-
}), e.hook.prop(Qr(e));
|
|
2833
|
-
}
|
|
2834
|
-
function _e(e, t) {
|
|
2835
|
-
return (r) => {
|
|
2836
|
-
r.props[`${e}Icon`] === void 0 && (r.props[`${e}Icon`] = t.startsWith("<svg") ? t : `default:${t}`);
|
|
2837
|
-
};
|
|
2838
|
-
}
|
|
2839
|
-
function Ft(e) {
|
|
2840
|
-
e.on("created", () => {
|
|
2841
|
-
"disabled" in e.props && (e.props.disabled = G(e.props.disabled), e.config.disabled = G(e.props.disabled));
|
|
2842
|
-
}), e.hook.prop(({ prop: t, value: r }, n) => (r = t === "disabled" ? G(r) : r, n({ prop: t, value: r }))), e.on("prop:disabled", ({ payload: t }) => {
|
|
2843
|
-
e.config.disabled = G(t);
|
|
2844
|
-
});
|
|
2845
|
-
}
|
|
2846
|
-
function Ue(e, t) {
|
|
2847
|
-
return (r) => {
|
|
2848
|
-
r.store.set(
|
|
2849
|
-
/* @__PURE__ */ H({
|
|
2850
|
-
key: e,
|
|
2851
|
-
type: "ui",
|
|
2852
|
-
value: t || e,
|
|
2853
|
-
meta: {
|
|
2854
|
-
localize: !0,
|
|
2855
|
-
i18nArgs: [r]
|
|
2856
|
-
}
|
|
2857
|
-
})
|
|
2858
|
-
);
|
|
2859
|
-
};
|
|
2860
|
-
}
|
|
2861
|
-
var lt = typeof window < "u";
|
|
2862
|
-
function Xr(e) {
|
|
2863
|
-
e.target instanceof HTMLElement && e.target.hasAttribute("data-file-hover") && e.target.removeAttribute("data-file-hover");
|
|
2864
|
-
}
|
|
2865
|
-
function Xt(e, t) {
|
|
2866
|
-
t.target instanceof HTMLInputElement ? e === "dragover" && t.target.setAttribute("data-file-hover", "true") : t.preventDefault(), e === "drop" && Xr(t);
|
|
2867
|
-
}
|
|
2868
|
-
function Xa(e) {
|
|
2869
|
-
Ue("noFiles", "Select file")(e), Ue("removeAll", "Remove all")(e), Ue("remove")(e), e.addProps(["_hasMultipleFiles"]), lt && (window._FormKit_File_Drop || (window.addEventListener(
|
|
2870
|
-
"dragover",
|
|
2871
|
-
Xt.bind(null, "dragover")
|
|
2872
|
-
), window.addEventListener("drop", Xt.bind(null, "drop")), window.addEventListener("dragleave", Xr), window._FormKit_File_Drop = !0)), e.hook.input((t, r) => r(Array.isArray(t) ? t : [])), e.on("input", ({ payload: t }) => {
|
|
2873
|
-
e.props._hasMultipleFiles = Array.isArray(t) && t.length > 1 ? !0 : void 0;
|
|
2874
|
-
}), e.on("reset", () => {
|
|
2875
|
-
if (e.props.id && lt) {
|
|
2876
|
-
const t = document.getElementById(e.props.id);
|
|
2877
|
-
t && (t.value = "");
|
|
2878
|
-
}
|
|
2879
|
-
}), e.on("created", () => {
|
|
2880
|
-
Array.isArray(e.value) || e.input([], !1), e.context && (e.context.handlers.resetFiles = (t) => {
|
|
2881
|
-
if (t.preventDefault(), e.input([]), e.props.id && lt) {
|
|
2882
|
-
const r = document.getElementById(e.props.id);
|
|
2883
|
-
r && (r.value = ""), r == null || r.focus();
|
|
2884
|
-
}
|
|
2885
|
-
}, e.context.handlers.files = (t) => {
|
|
2886
|
-
var n, s;
|
|
2887
|
-
const r = [];
|
|
2888
|
-
if (t.target instanceof HTMLInputElement && t.target.files) {
|
|
2889
|
-
for (let i = 0; i < t.target.files.length; i++) {
|
|
2890
|
-
let a;
|
|
2891
|
-
(a = t.target.files.item(i)) && r.push({ name: a.name, file: a });
|
|
2892
|
-
}
|
|
2893
|
-
e.input(r);
|
|
2894
|
-
}
|
|
2895
|
-
e.context && (e.context.files = r), typeof ((n = e.props.attrs) == null ? void 0 : n.onChange) == "function" && ((s = e.props.attrs) == null || s.onChange(t));
|
|
2896
|
-
});
|
|
2897
|
-
});
|
|
2898
|
-
}
|
|
2899
|
-
var er = /* @__PURE__ */ H({
|
|
2900
|
-
key: "loading",
|
|
2901
|
-
value: !0,
|
|
2902
|
-
visible: !1
|
|
2903
|
-
});
|
|
2904
|
-
async function el(e, t) {
|
|
2905
|
-
const r = Math.random();
|
|
2906
|
-
if (e.props._submitNonce = r, t.preventDefault(), await e.settled, e.ledger.value("validating") && (e.store.set(er), await e.ledger.settled("validating"), e.store.remove("loading"), e.props._submitNonce !== r))
|
|
2907
|
-
return;
|
|
2908
|
-
const n = (s) => s.store.set(
|
|
2909
|
-
/* @__PURE__ */ H({
|
|
2910
|
-
key: "submitted",
|
|
2911
|
-
value: !0,
|
|
2912
|
-
visible: !1
|
|
2913
|
-
})
|
|
2914
|
-
);
|
|
2915
|
-
if (e.walk(n), n(e), e.emit("submit-raw"), typeof e.props.onSubmitRaw == "function" && e.props.onSubmitRaw(t, e), e.ledger.value("blocking"))
|
|
2916
|
-
typeof e.props.onSubmitInvalid == "function" && e.props.onSubmitInvalid(e), e.props.incompleteMessage !== !1 && en(e);
|
|
2917
|
-
else if (typeof e.props.onSubmit == "function") {
|
|
2918
|
-
const s = e.props.onSubmit(
|
|
2919
|
-
e.hook.submit.dispatch(Ae(e.value)),
|
|
2920
|
-
e
|
|
2921
|
-
);
|
|
2922
|
-
if (s instanceof Promise) {
|
|
2923
|
-
const i = e.props.disabled === void 0 && e.props.submitBehavior !== "live";
|
|
2924
|
-
i && (e.props.disabled = !0), e.store.set(er), await s, i && (e.props.disabled = !1), e.store.remove("loading");
|
|
2925
|
-
}
|
|
2926
|
-
} else
|
|
2927
|
-
t.target instanceof HTMLFormElement && t.target.submit();
|
|
2928
|
-
}
|
|
2929
|
-
function en(e) {
|
|
2930
|
-
e.store.set(
|
|
2931
|
-
/* @__PURE__ */ H({
|
|
2932
|
-
blocking: !1,
|
|
2933
|
-
key: "incomplete",
|
|
2934
|
-
meta: {
|
|
2935
|
-
localize: e.props.incompleteMessage === void 0,
|
|
2936
|
-
i18nArgs: [{ node: e }],
|
|
2937
|
-
showAsMessage: !0
|
|
2938
|
-
},
|
|
2939
|
-
type: "ui",
|
|
2940
|
-
value: e.props.incompleteMessage || "Form incomplete."
|
|
2941
|
-
})
|
|
2942
|
-
);
|
|
2943
|
-
}
|
|
2944
|
-
function tl(e) {
|
|
2945
|
-
var t;
|
|
2946
|
-
e.props.isForm = !0, e.ledger.count("validating", (r) => r.key === "validating"), (t = e.props).submitAttrs ?? (t.submitAttrs = {
|
|
2947
|
-
disabled: e.props.disabled
|
|
2948
|
-
}), e.on("prop:disabled", ({ payload: r }) => {
|
|
2949
|
-
e.props.submitAttrs = { ...e.props.submitAttrs, disabled: r };
|
|
2950
|
-
}), e.on("created", () => {
|
|
2951
|
-
var r;
|
|
2952
|
-
(r = e.context) != null && r.handlers && (e.context.handlers.submit = el.bind(null, e)), P(e.props, "actions") || (e.props.actions = !0);
|
|
2953
|
-
}), e.on("prop:incompleteMessage", () => {
|
|
2954
|
-
e.store.incomplete && en(e);
|
|
2955
|
-
}), e.on("settled:blocking", () => e.store.remove("incomplete"));
|
|
2956
|
-
}
|
|
2957
|
-
function rl(e) {
|
|
2958
|
-
e.props.ignore === void 0 && (e.props.ignore = !0, e.parent = null);
|
|
2959
|
-
}
|
|
2960
|
-
function nl(e) {
|
|
2961
|
-
e.on("created", () => {
|
|
2962
|
-
e.context && (e.context.initialValue = e.value || "");
|
|
2963
|
-
});
|
|
2964
|
-
}
|
|
2965
|
-
function tn(e) {
|
|
2966
|
-
if (typeof e.props.number > "u")
|
|
2967
|
-
return;
|
|
2968
|
-
const t = ["number", "range", "hidden"].includes(e.props.type);
|
|
2969
|
-
e.hook.input((r, n) => {
|
|
2970
|
-
if (r === "")
|
|
2971
|
-
return n(void 0);
|
|
2972
|
-
const s = e.props.number === "integer" ? parseInt(r) : parseFloat(r);
|
|
2973
|
-
return Number.isFinite(s) ? n(s) : n(t ? void 0 : r);
|
|
2974
|
-
});
|
|
2975
|
-
}
|
|
2976
|
-
function sl(e, t) {
|
|
2977
|
-
t.target instanceof HTMLInputElement && e.input(de(e.props.options, t.target.value));
|
|
2978
|
-
}
|
|
2979
|
-
function il(e, t) {
|
|
2980
|
-
var r, n;
|
|
2981
|
-
return (r = e.context) == null || r.value, (n = e.context) == null || n._value, Pe(de(e.props.options, t), e._value);
|
|
2982
|
-
}
|
|
2983
|
-
function al(e) {
|
|
2984
|
-
e.on("created", () => {
|
|
2985
|
-
var t, r;
|
|
2986
|
-
Array.isArray(e.props.options) || ye(350, {
|
|
2987
|
-
node: e,
|
|
2988
|
-
inputType: "radio"
|
|
2989
|
-
}), (t = e.context) != null && t.handlers && (e.context.handlers.toggleChecked = sl.bind(null, e)), (r = e.context) != null && r.fns && (e.context.fns.isChecked = il.bind(null, e));
|
|
2990
|
-
}), e.hook.prop(Qr(e));
|
|
2991
|
-
}
|
|
2992
|
-
function ll(e, t) {
|
|
2993
|
-
if (it(t))
|
|
2994
|
-
return !1;
|
|
2995
|
-
e.context && e.context.value;
|
|
2996
|
-
const r = "__original" in t ? t.__original : t.value;
|
|
2997
|
-
return Array.isArray(e._value) ? e._value.some((n) => Pe(n, r)) : (e._value === void 0 || e._value === null && !rn(e.props.options, null)) && t.attrs && t.attrs["data-is-placeholder"] ? !0 : Pe(r, e._value);
|
|
2998
|
-
}
|
|
2999
|
-
function rn(e, t) {
|
|
3000
|
-
return e.some((r) => it(r) ? rn(r.options, t) : ("__original" in r ? r.__original : r.value) === t);
|
|
3001
|
-
}
|
|
3002
|
-
async function ol(e, t) {
|
|
3003
|
-
var r;
|
|
3004
|
-
typeof ((r = e.props.attrs) == null ? void 0 : r.onChange) == "function" && (await new Promise((n) => setTimeout(n, 0)), await e.settled, e.props.attrs.onChange(t));
|
|
3005
|
-
}
|
|
3006
|
-
function ul(e, t) {
|
|
3007
|
-
const r = t.target, n = r.hasAttribute("multiple") ? Array.from(r.selectedOptions).map(
|
|
3008
|
-
(s) => de(e.props.options, s.value)
|
|
3009
|
-
) : de(e.props.options, r.value);
|
|
3010
|
-
e.input(n);
|
|
3011
|
-
}
|
|
3012
|
-
function tr(e, t) {
|
|
3013
|
-
return e.some(
|
|
3014
|
-
(r) => r.attrs && r.attrs["data-is-placeholder"]
|
|
3015
|
-
) ? e : [
|
|
3016
|
-
{
|
|
3017
|
-
label: t,
|
|
3018
|
-
value: "",
|
|
3019
|
-
attrs: {
|
|
3020
|
-
hidden: !0,
|
|
3021
|
-
disabled: !0,
|
|
3022
|
-
"data-is-placeholder": "true"
|
|
3023
|
-
}
|
|
3024
|
-
},
|
|
3025
|
-
...e
|
|
3026
|
-
];
|
|
3027
|
-
}
|
|
3028
|
-
function nn(e) {
|
|
3029
|
-
const t = e.length > 0 ? e[0] : void 0;
|
|
3030
|
-
if (t)
|
|
3031
|
-
return it(t) ? nn(t.options) : "__original" in t ? t.__original : t.value;
|
|
3032
|
-
}
|
|
3033
|
-
function fl(e) {
|
|
3034
|
-
e.on("created", () => {
|
|
3035
|
-
var r, n, s;
|
|
3036
|
-
const t = G((r = e.props.attrs) == null ? void 0 : r.multiple);
|
|
3037
|
-
!t && e.props.placeholder && Array.isArray(e.props.options) && (e.hook.prop(({ prop: i, value: a }, l) => (i === "options" && (a = tr(a, e.props.placeholder)), l({ prop: i, value: a }))), e.props.options = tr(
|
|
3038
|
-
e.props.options,
|
|
3039
|
-
e.props.placeholder
|
|
3040
|
-
)), t ? e.value === void 0 && e.input([], !1) : e.context && !e.context.options && (e.props.attrs = Object.assign({}, e.props.attrs, {
|
|
3041
|
-
value: e._value
|
|
3042
|
-
}), e.on("input", ({ payload: i }) => {
|
|
3043
|
-
e.props.attrs = Object.assign({}, e.props.attrs, {
|
|
3044
|
-
value: i
|
|
3045
|
-
});
|
|
3046
|
-
})), (n = e.context) != null && n.handlers && (e.context.handlers.selectInput = ul.bind(null, e), e.context.handlers.onChange = ol.bind(null, e)), (s = e.context) != null && s.fns && (e.context.fns.isSelected = ll.bind(null, e), e.context.fns.showPlaceholder = (i, a) => {
|
|
3047
|
-
if (!Array.isArray(e.props.options))
|
|
3048
|
-
return !1;
|
|
3049
|
-
const l = e.props.options.some(
|
|
3050
|
-
(o) => {
|
|
3051
|
-
if (o.attrs && "data-is-placeholder" in o.attrs)
|
|
3052
|
-
return !1;
|
|
3053
|
-
const y = "__original" in o ? o.__original : o.value;
|
|
3054
|
-
return T(i, y);
|
|
3055
|
-
}
|
|
3056
|
-
);
|
|
3057
|
-
return a && !l ? !0 : void 0;
|
|
3058
|
-
});
|
|
3059
|
-
}), e.hook.input((t, r) => {
|
|
3060
|
-
var n, s, i;
|
|
3061
|
-
return !e.props.placeholder && t === void 0 && Array.isArray((n = e.props) == null ? void 0 : n.options) && e.props.options.length && !G((i = (s = e.props) == null ? void 0 : s.attrs) == null ? void 0 : i.multiple) && (t = nn(e.props.options)), r(t);
|
|
3062
|
-
});
|
|
3063
|
-
}
|
|
3064
|
-
// @__NO_SIDE_EFFECTS__
|
|
3065
|
-
function St(e) {
|
|
3066
|
-
return !!(he(e) && e.if && e.if.startsWith("$slots.") && typeof e.then == "string" && e.then.startsWith("$slots.") && "else" in e);
|
|
3067
|
-
}
|
|
3068
|
-
// @__NO_SIDE_EFFECTS__
|
|
3069
|
-
function cl(e, t = {}) {
|
|
3070
|
-
const r = /* @__PURE__ */ fe(
|
|
3071
|
-
/* @__PURE__ */ Oe(
|
|
3072
|
-
/* @__PURE__ */ Le("$label"),
|
|
3073
|
-
/* @__PURE__ */ De(/* @__PURE__ */ D("prefix"), /* @__PURE__ */ te(), e(), /* @__PURE__ */ re(), /* @__PURE__ */ D("suffix"))
|
|
3074
|
-
),
|
|
3075
|
-
/* @__PURE__ */ ee("$help"),
|
|
3076
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value"))
|
|
3077
|
-
);
|
|
3078
|
-
return (n = {}) => r(le(t, n));
|
|
3079
|
-
}
|
|
3080
|
-
// @__NO_SIDE_EFFECTS__
|
|
3081
|
-
function ie(e, t, r) {
|
|
3082
|
-
const n = (s) => {
|
|
3083
|
-
const i = t(s);
|
|
3084
|
-
if (r || Ge(i) && "if" in i || /* @__PURE__ */ St(i)) {
|
|
3085
|
-
const a = {
|
|
3086
|
-
if: e,
|
|
3087
|
-
then: i
|
|
3088
|
-
};
|
|
3089
|
-
return r && (a.else = r(s)), a;
|
|
3090
|
-
} else /* @__PURE__ */ St(i) ? Object.assign(i.else, { if: e }) : Ge(i) && Object.assign(i, { if: e });
|
|
3091
|
-
return i;
|
|
3092
|
-
};
|
|
3093
|
-
return n._s = Ee(), n;
|
|
3094
|
-
}
|
|
3095
|
-
// @__NO_SIDE_EFFECTS__
|
|
3096
|
-
function we(e, t) {
|
|
3097
|
-
const r = (n) => {
|
|
3098
|
-
const s = e({});
|
|
3099
|
-
return /* @__PURE__ */ St(s) ? (Array.isArray(s.else) || (s.else = /* @__PURE__ */ Me(
|
|
3100
|
-
/* @__PURE__ */ Me(s.else, t),
|
|
3101
|
-
e._s ? n[e._s] : {}
|
|
3102
|
-
)), s) : /* @__PURE__ */ Me(
|
|
3103
|
-
/* @__PURE__ */ Me(s, t),
|
|
3104
|
-
e._s ? n[e._s] : {}
|
|
3105
|
-
);
|
|
3106
|
-
};
|
|
3107
|
-
return r._s = e._s, r;
|
|
3108
|
-
}
|
|
3109
|
-
var rr = {
|
|
3110
|
-
/**
|
|
3111
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3112
|
-
*/
|
|
3113
|
-
schema: /* @__PURE__ */ fe(
|
|
3114
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value")),
|
|
3115
|
-
/* @__PURE__ */ Oe(
|
|
3116
|
-
/* @__PURE__ */ Va(
|
|
3117
|
-
/* @__PURE__ */ D("prefix"),
|
|
3118
|
-
/* @__PURE__ */ te(),
|
|
3119
|
-
/* @__PURE__ */ Na("$label || $ui.submit.value"),
|
|
3120
|
-
/* @__PURE__ */ re(),
|
|
3121
|
-
/* @__PURE__ */ D("suffix")
|
|
3122
|
-
)
|
|
3123
|
-
),
|
|
3124
|
-
/* @__PURE__ */ ee("$help")
|
|
3125
|
-
),
|
|
3126
|
-
/**
|
|
3127
|
-
* The type of node, can be a list, group, or input.
|
|
3128
|
-
*/
|
|
3129
|
-
type: "input",
|
|
3130
|
-
/**
|
|
3131
|
-
* The family of inputs this one belongs too. For example "text" and "email"
|
|
3132
|
-
* are both part of the "text" family. This is primary used for styling.
|
|
3133
|
-
*/
|
|
3134
|
-
family: "button",
|
|
3135
|
-
/**
|
|
3136
|
-
* An array of extra props to accept for this input.
|
|
3137
|
-
*/
|
|
3138
|
-
props: [],
|
|
3139
|
-
/**
|
|
3140
|
-
* Additional features that should be added to your input
|
|
3141
|
-
*/
|
|
3142
|
-
features: [Ue("submit"), rl],
|
|
3143
|
-
/**
|
|
3144
|
-
* A key to use for memoizing the schema. This is used to prevent the schema
|
|
3145
|
-
* from needing to be stringified when performing a memo lookup.
|
|
3146
|
-
*/
|
|
3147
|
-
schemaMemoKey: "h6st4epl3j8"
|
|
3148
|
-
}, pl = {
|
|
3149
|
-
/**
|
|
3150
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3151
|
-
*/
|
|
3152
|
-
schema: /* @__PURE__ */ fe(
|
|
3153
|
-
/* @__PURE__ */ ie(
|
|
3154
|
-
"$options == undefined",
|
|
3155
|
-
/**
|
|
3156
|
-
* Single checkbox structure.
|
|
3157
|
-
*/
|
|
3158
|
-
/* @__PURE__ */ et(
|
|
3159
|
-
/* @__PURE__ */ Qe(/* @__PURE__ */ te(), /* @__PURE__ */ Je(), /* @__PURE__ */ tt(/* @__PURE__ */ D("decorator")), /* @__PURE__ */ re()),
|
|
3160
|
-
/* @__PURE__ */ we(/* @__PURE__ */ Xe("$label"), {
|
|
3161
|
-
if: "$label"
|
|
3162
|
-
})
|
|
3163
|
-
),
|
|
3164
|
-
/**
|
|
3165
|
-
* Multi checkbox structure.
|
|
3166
|
-
*/
|
|
3167
|
-
/* @__PURE__ */ Zr(
|
|
3168
|
-
/* @__PURE__ */ Yr("$label"),
|
|
3169
|
-
/* @__PURE__ */ ee("$help"),
|
|
3170
|
-
/* @__PURE__ */ Br(
|
|
3171
|
-
/* @__PURE__ */ Ur(
|
|
3172
|
-
/* @__PURE__ */ et(
|
|
3173
|
-
/* @__PURE__ */ Qe(
|
|
3174
|
-
/* @__PURE__ */ te(),
|
|
3175
|
-
/* @__PURE__ */ we(/* @__PURE__ */ Je(), {
|
|
3176
|
-
bind: "$option.attrs",
|
|
3177
|
-
attrs: {
|
|
3178
|
-
id: "$option.attrs.id",
|
|
3179
|
-
value: "$option.value",
|
|
3180
|
-
checked: "$fns.isChecked($option.value)"
|
|
3181
|
-
}
|
|
3182
|
-
}),
|
|
3183
|
-
/* @__PURE__ */ tt(/* @__PURE__ */ D("decorator")),
|
|
3184
|
-
/* @__PURE__ */ re()
|
|
3185
|
-
),
|
|
3186
|
-
/* @__PURE__ */ we(/* @__PURE__ */ Xe("$option.label"), {
|
|
3187
|
-
if: "$option.label"
|
|
3188
|
-
})
|
|
3189
|
-
),
|
|
3190
|
-
/* @__PURE__ */ Hr("$option.help")
|
|
3191
|
-
)
|
|
3192
|
-
)
|
|
3193
|
-
)
|
|
3194
|
-
),
|
|
3195
|
-
// Help text only goes under the input when it is a single.
|
|
3196
|
-
/* @__PURE__ */ ie("$options == undefined && $help", /* @__PURE__ */ ee("$help")),
|
|
3197
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value"))
|
|
3198
|
-
),
|
|
3199
|
-
/**
|
|
3200
|
-
* The type of node, can be a list, group, or input.
|
|
3201
|
-
*/
|
|
3202
|
-
type: "input",
|
|
3203
|
-
/**
|
|
3204
|
-
* The family of inputs this one belongs too. For example "text" and "email"
|
|
3205
|
-
* are both part of the "text" family. This is primary used for styling.
|
|
3206
|
-
*/
|
|
3207
|
-
family: "box",
|
|
3208
|
-
/**
|
|
3209
|
-
* An array of extra props to accept for this input.
|
|
3210
|
-
*/
|
|
3211
|
-
props: ["options", "onValue", "offValue", "optionsLoader"],
|
|
3212
|
-
/**
|
|
3213
|
-
* Additional features that should be added to your input
|
|
3214
|
-
*/
|
|
3215
|
-
features: [
|
|
3216
|
-
Rt,
|
|
3217
|
-
Qa,
|
|
3218
|
-
_e("decorator", "checkboxDecorator")
|
|
3219
|
-
],
|
|
3220
|
-
/**
|
|
3221
|
-
* The key used to memoize the schema.
|
|
3222
|
-
*/
|
|
3223
|
-
schemaMemoKey: "qje02tb3gu8"
|
|
3224
|
-
}, ml = {
|
|
3225
|
-
/**
|
|
3226
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3227
|
-
*/
|
|
3228
|
-
schema: /* @__PURE__ */ fe(
|
|
3229
|
-
/* @__PURE__ */ Oe(
|
|
3230
|
-
/* @__PURE__ */ Le("$label"),
|
|
3231
|
-
/* @__PURE__ */ De(
|
|
3232
|
-
/* @__PURE__ */ D("prefix", "label"),
|
|
3233
|
-
/* @__PURE__ */ te(),
|
|
3234
|
-
/* @__PURE__ */ Da(),
|
|
3235
|
-
/* @__PURE__ */ qa(
|
|
3236
|
-
/* @__PURE__ */ La(
|
|
3237
|
-
/* @__PURE__ */ D("fileItem"),
|
|
3238
|
-
/* @__PURE__ */ Ta("$file.name"),
|
|
3239
|
-
/* @__PURE__ */ ie(
|
|
3240
|
-
"$value.length === 1",
|
|
3241
|
-
/* @__PURE__ */ Gt(
|
|
3242
|
-
/* @__PURE__ */ D("fileRemove"),
|
|
3243
|
-
'$ui.remove.value + " " + $file.name'
|
|
3244
|
-
)
|
|
3245
|
-
)
|
|
3246
|
-
)
|
|
3247
|
-
),
|
|
3248
|
-
/* @__PURE__ */ ie("$value.length > 1", /* @__PURE__ */ Gt("$ui.removeAll.value")),
|
|
3249
|
-
/* @__PURE__ */ za(/* @__PURE__ */ D("noFiles"), "$ui.noFiles.value"),
|
|
3250
|
-
/* @__PURE__ */ re(),
|
|
3251
|
-
/* @__PURE__ */ D("suffix")
|
|
3252
|
-
)
|
|
3253
|
-
),
|
|
3254
|
-
/* @__PURE__ */ ee("$help"),
|
|
3255
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value"))
|
|
3256
|
-
),
|
|
3257
|
-
/**
|
|
3258
|
-
* The type of node, can be a list, group, or input.
|
|
3259
|
-
*/
|
|
3260
|
-
type: "input",
|
|
3261
|
-
/**
|
|
3262
|
-
* The family of inputs this one belongs too. For example "text" and "email"
|
|
3263
|
-
* are both part of the "text" family. This is primary used for styling.
|
|
3264
|
-
*/
|
|
3265
|
-
family: "text",
|
|
3266
|
-
/**
|
|
3267
|
-
* An array of extra props to accept for this input.
|
|
3268
|
-
*/
|
|
3269
|
-
props: [],
|
|
3270
|
-
/**
|
|
3271
|
-
* Additional features that should be added to your input
|
|
3272
|
-
*/
|
|
3273
|
-
features: [
|
|
3274
|
-
Xa,
|
|
3275
|
-
_e("fileItem", "fileItem"),
|
|
3276
|
-
_e("fileRemove", "fileRemove"),
|
|
3277
|
-
_e("noFiles", "noFiles")
|
|
3278
|
-
],
|
|
3279
|
-
/**
|
|
3280
|
-
* The key used to memoize the schema.
|
|
3281
|
-
*/
|
|
3282
|
-
schemaMemoKey: "9kqc4852fv8"
|
|
3283
|
-
}, dl = {
|
|
3284
|
-
/**
|
|
3285
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3286
|
-
*/
|
|
3287
|
-
schema: /* @__PURE__ */ Ka(
|
|
3288
|
-
"$slots.default",
|
|
3289
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value")),
|
|
3290
|
-
/* @__PURE__ */ Fa(/* @__PURE__ */ Ua())
|
|
3291
|
-
),
|
|
3292
|
-
/**
|
|
3293
|
-
* The type of node, can be a list, group, or input.
|
|
3294
|
-
*/
|
|
3295
|
-
type: "group",
|
|
3296
|
-
/**
|
|
3297
|
-
* An array of extra props to accept for this input.
|
|
3298
|
-
*/
|
|
3299
|
-
props: [
|
|
3300
|
-
"actions",
|
|
3301
|
-
"submit",
|
|
3302
|
-
"submitLabel",
|
|
3303
|
-
"submitAttrs",
|
|
3304
|
-
"submitBehavior",
|
|
3305
|
-
"incompleteMessage"
|
|
3306
|
-
],
|
|
3307
|
-
/**
|
|
3308
|
-
* Additional features that should be added to your input
|
|
3309
|
-
*/
|
|
3310
|
-
features: [tl, Ft],
|
|
3311
|
-
/**
|
|
3312
|
-
* The key used to memoize the schema.
|
|
3313
|
-
*/
|
|
3314
|
-
schemaMemoKey: "5bg016redjo"
|
|
3315
|
-
}, yl = {
|
|
3316
|
-
/**
|
|
3317
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3318
|
-
*/
|
|
3319
|
-
schema: /* @__PURE__ */ jt("$slots.default"),
|
|
3320
|
-
/**
|
|
3321
|
-
* The type of node, can be a list, group, or input.
|
|
3322
|
-
*/
|
|
3323
|
-
type: "group",
|
|
3324
|
-
/**
|
|
3325
|
-
* An array of extra props to accept for this input.
|
|
3326
|
-
*/
|
|
3327
|
-
props: [],
|
|
3328
|
-
/**
|
|
3329
|
-
* Additional features that should be added to your input
|
|
3330
|
-
*/
|
|
3331
|
-
features: [Ft, Jr]
|
|
3332
|
-
}, vl = {
|
|
3333
|
-
/**
|
|
3334
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3335
|
-
*/
|
|
3336
|
-
schema: /* @__PURE__ */ Gr(),
|
|
3337
|
-
/**
|
|
3338
|
-
* The type of node, can be a list, group, or input.
|
|
3339
|
-
*/
|
|
3340
|
-
type: "input",
|
|
3341
|
-
/**
|
|
3342
|
-
* An array of extra props to accept for this input.
|
|
3343
|
-
*/
|
|
3344
|
-
props: [],
|
|
3345
|
-
/**
|
|
3346
|
-
* Additional features that should be added to your input
|
|
3347
|
-
*/
|
|
3348
|
-
features: [tn]
|
|
3349
|
-
}, gl = {
|
|
3350
|
-
/**
|
|
3351
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3352
|
-
*/
|
|
3353
|
-
schema: /* @__PURE__ */ jt("$slots.default"),
|
|
3354
|
-
/**
|
|
3355
|
-
* The type of node, can be a list, group, or input.
|
|
3356
|
-
*/
|
|
3357
|
-
type: "list",
|
|
3358
|
-
/**
|
|
3359
|
-
* An array of extra props to accept for this input.
|
|
3360
|
-
*/
|
|
3361
|
-
props: ["sync", "dynamic"],
|
|
3362
|
-
/**
|
|
3363
|
-
* Additional features that should be added to your input
|
|
3364
|
-
*/
|
|
3365
|
-
features: [Ft, Jr]
|
|
3366
|
-
}, hl = {
|
|
3367
|
-
/**
|
|
3368
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3369
|
-
*/
|
|
3370
|
-
schema: /* @__PURE__ */ jt(),
|
|
3371
|
-
/**
|
|
3372
|
-
* The type of node, can be a list, group, or input.
|
|
3373
|
-
*/
|
|
3374
|
-
type: "input",
|
|
3375
|
-
/**
|
|
3376
|
-
* An array of extra props to accept for this input.
|
|
3377
|
-
*/
|
|
3378
|
-
props: [],
|
|
3379
|
-
/**
|
|
3380
|
-
* Additional features that should be added to your input
|
|
3381
|
-
*/
|
|
3382
|
-
features: []
|
|
3383
|
-
}, bl = {
|
|
3384
|
-
/**
|
|
3385
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3386
|
-
*/
|
|
3387
|
-
schema: /* @__PURE__ */ fe(
|
|
3388
|
-
/* @__PURE__ */ ie(
|
|
3389
|
-
"$options == undefined",
|
|
3390
|
-
/**
|
|
3391
|
-
* Single radio structure.
|
|
3392
|
-
*/
|
|
3393
|
-
/* @__PURE__ */ et(
|
|
3394
|
-
/* @__PURE__ */ Qe(/* @__PURE__ */ te(), /* @__PURE__ */ Je(), /* @__PURE__ */ tt(/* @__PURE__ */ D("decorator")), /* @__PURE__ */ re()),
|
|
3395
|
-
/* @__PURE__ */ we(/* @__PURE__ */ Xe("$label"), {
|
|
3396
|
-
if: "$label"
|
|
3397
|
-
})
|
|
3398
|
-
),
|
|
3399
|
-
/**
|
|
3400
|
-
* Multi radio structure.
|
|
3401
|
-
*/
|
|
3402
|
-
/* @__PURE__ */ Zr(
|
|
3403
|
-
/* @__PURE__ */ Yr("$label"),
|
|
3404
|
-
/* @__PURE__ */ ee("$help"),
|
|
3405
|
-
/* @__PURE__ */ Br(
|
|
3406
|
-
/* @__PURE__ */ Ur(
|
|
3407
|
-
/* @__PURE__ */ et(
|
|
3408
|
-
/* @__PURE__ */ Qe(
|
|
3409
|
-
/* @__PURE__ */ te(),
|
|
3410
|
-
/* @__PURE__ */ we(/* @__PURE__ */ Je(), {
|
|
3411
|
-
bind: "$option.attrs",
|
|
3412
|
-
attrs: {
|
|
3413
|
-
id: "$option.attrs.id",
|
|
3414
|
-
value: "$option.value",
|
|
3415
|
-
checked: "$fns.isChecked($option.value)"
|
|
3416
|
-
}
|
|
3417
|
-
}),
|
|
3418
|
-
/* @__PURE__ */ tt(/* @__PURE__ */ D("decorator")),
|
|
3419
|
-
/* @__PURE__ */ re()
|
|
3420
|
-
),
|
|
3421
|
-
/* @__PURE__ */ we(/* @__PURE__ */ Xe("$option.label"), {
|
|
3422
|
-
if: "$option.label"
|
|
3423
|
-
})
|
|
3424
|
-
),
|
|
3425
|
-
/* @__PURE__ */ Hr("$option.help")
|
|
3426
|
-
)
|
|
3427
|
-
)
|
|
3428
|
-
)
|
|
3429
|
-
),
|
|
3430
|
-
// Help text only goes under the input when it is a single.
|
|
3431
|
-
/* @__PURE__ */ ie("$options == undefined && $help", /* @__PURE__ */ ee("$help")),
|
|
3432
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value"))
|
|
3433
|
-
),
|
|
3434
|
-
/**
|
|
3435
|
-
* The type of node, can be a list, group, or input.
|
|
3436
|
-
*/
|
|
3437
|
-
type: "input",
|
|
3438
|
-
/**
|
|
3439
|
-
* The family of inputs this one belongs too. For example "text" and "email"
|
|
3440
|
-
* are both part of the "text" family. This is primary used for styling.
|
|
3441
|
-
*/
|
|
3442
|
-
family: "box",
|
|
3443
|
-
/**
|
|
3444
|
-
* An array of extra props to accept for this input.
|
|
3445
|
-
*/
|
|
3446
|
-
props: ["options", "onValue", "offValue", "optionsLoader"],
|
|
3447
|
-
/**
|
|
3448
|
-
* Additional features that should be added to your input
|
|
3449
|
-
*/
|
|
3450
|
-
features: [Rt, al, _e("decorator", "radioDecorator")],
|
|
3451
|
-
/**
|
|
3452
|
-
* The key used to memoize the schema.
|
|
3453
|
-
*/
|
|
3454
|
-
schemaMemoKey: "qje02tb3gu8"
|
|
3455
|
-
}, $l = {
|
|
3456
|
-
/**
|
|
3457
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3458
|
-
*/
|
|
3459
|
-
schema: /* @__PURE__ */ fe(
|
|
3460
|
-
/* @__PURE__ */ Oe(
|
|
3461
|
-
/* @__PURE__ */ Le("$label"),
|
|
3462
|
-
/* @__PURE__ */ De(
|
|
3463
|
-
/* @__PURE__ */ D("prefix"),
|
|
3464
|
-
/* @__PURE__ */ te(),
|
|
3465
|
-
/* @__PURE__ */ Ha(
|
|
3466
|
-
/* @__PURE__ */ ie(
|
|
3467
|
-
"$slots.default",
|
|
3468
|
-
() => "$slots.default",
|
|
3469
|
-
/* @__PURE__ */ Qt(
|
|
3470
|
-
/* @__PURE__ */ ie(
|
|
3471
|
-
"$option.group",
|
|
3472
|
-
/* @__PURE__ */ Wa(/* @__PURE__ */ Qt(/* @__PURE__ */ Jt("$option.label"))),
|
|
3473
|
-
/* @__PURE__ */ Jt("$option.label")
|
|
3474
|
-
)
|
|
3475
|
-
)
|
|
3476
|
-
)
|
|
3477
|
-
),
|
|
3478
|
-
/* @__PURE__ */ ie("$attrs.multiple !== undefined", () => "", /* @__PURE__ */ D("select")),
|
|
3479
|
-
/* @__PURE__ */ re(),
|
|
3480
|
-
/* @__PURE__ */ D("suffix")
|
|
3481
|
-
)
|
|
3482
|
-
),
|
|
3483
|
-
/* @__PURE__ */ ee("$help"),
|
|
3484
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value"))
|
|
3485
|
-
),
|
|
3486
|
-
/**
|
|
3487
|
-
* The type of node, can be a list, group, or input.
|
|
3488
|
-
*/
|
|
3489
|
-
type: "input",
|
|
3490
|
-
/**
|
|
3491
|
-
* An array of extra props to accept for this input.
|
|
3492
|
-
*/
|
|
3493
|
-
props: ["options", "placeholder", "optionsLoader"],
|
|
3494
|
-
/**
|
|
3495
|
-
* Additional features that should be added to your input
|
|
3496
|
-
*/
|
|
3497
|
-
features: [Rt, fl, _e("select", "select")],
|
|
3498
|
-
/**
|
|
3499
|
-
* The key used to memoize the schema.
|
|
3500
|
-
*/
|
|
3501
|
-
schemaMemoKey: "cb119h43krg"
|
|
3502
|
-
}, _l = {
|
|
3503
|
-
/**
|
|
3504
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3505
|
-
*/
|
|
3506
|
-
schema: /* @__PURE__ */ fe(
|
|
3507
|
-
/* @__PURE__ */ Oe(
|
|
3508
|
-
/* @__PURE__ */ Le("$label"),
|
|
3509
|
-
/* @__PURE__ */ De(
|
|
3510
|
-
/* @__PURE__ */ D("prefix", "label"),
|
|
3511
|
-
/* @__PURE__ */ te(),
|
|
3512
|
-
/* @__PURE__ */ Ba(),
|
|
3513
|
-
/* @__PURE__ */ re(),
|
|
3514
|
-
/* @__PURE__ */ D("suffix")
|
|
3515
|
-
)
|
|
3516
|
-
),
|
|
3517
|
-
/* @__PURE__ */ ee("$help"),
|
|
3518
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value"))
|
|
3519
|
-
),
|
|
3520
|
-
/**
|
|
3521
|
-
* The type of node, can be a list, group, or input.
|
|
3522
|
-
*/
|
|
3523
|
-
type: "input",
|
|
3524
|
-
/**
|
|
3525
|
-
* An array of extra props to accept for this input.
|
|
3526
|
-
*/
|
|
3527
|
-
props: [],
|
|
3528
|
-
/**
|
|
3529
|
-
* Additional features that should be added to your input
|
|
3530
|
-
*/
|
|
3531
|
-
features: [nl],
|
|
3532
|
-
/**
|
|
3533
|
-
* The key used to memoize the schema.
|
|
3534
|
-
*/
|
|
3535
|
-
schemaMemoKey: "b1n0td79m9g"
|
|
3536
|
-
}, K = {
|
|
3537
|
-
/**
|
|
3538
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
3539
|
-
*/
|
|
3540
|
-
schema: /* @__PURE__ */ fe(
|
|
3541
|
-
/* @__PURE__ */ Oe(
|
|
3542
|
-
/* @__PURE__ */ Le("$label"),
|
|
3543
|
-
/* @__PURE__ */ De(
|
|
3544
|
-
/* @__PURE__ */ D("prefix", "label"),
|
|
3545
|
-
/* @__PURE__ */ te(),
|
|
3546
|
-
/* @__PURE__ */ Gr(),
|
|
3547
|
-
/* @__PURE__ */ re(),
|
|
3548
|
-
/* @__PURE__ */ D("suffix")
|
|
3549
|
-
)
|
|
3550
|
-
),
|
|
3551
|
-
/* @__PURE__ */ ee("$help"),
|
|
3552
|
-
/* @__PURE__ */ ue(/* @__PURE__ */ oe("$message.value"))
|
|
3553
|
-
),
|
|
3554
|
-
/**
|
|
3555
|
-
* The type of node, can be a list, group, or input.
|
|
3556
|
-
*/
|
|
3557
|
-
type: "input",
|
|
3558
|
-
/**
|
|
3559
|
-
* The family of inputs this one belongs too. For example "text" and "email"
|
|
3560
|
-
* are both part of the "text" family. This is primary used for styling.
|
|
3561
|
-
*/
|
|
3562
|
-
family: "text",
|
|
3563
|
-
/**
|
|
3564
|
-
* An array of extra props to accept for this input.
|
|
3565
|
-
*/
|
|
3566
|
-
props: [],
|
|
3567
|
-
/**
|
|
3568
|
-
* Additional features that should be added to your input
|
|
3569
|
-
*/
|
|
3570
|
-
features: [tn],
|
|
3571
|
-
/**
|
|
3572
|
-
* The key used to memoize the schema.
|
|
3573
|
-
*/
|
|
3574
|
-
schemaMemoKey: "c3cc4kflsg"
|
|
3575
|
-
}, wl = {
|
|
3576
|
-
button: rr,
|
|
3577
|
-
submit: rr,
|
|
3578
|
-
checkbox: pl,
|
|
3579
|
-
file: ml,
|
|
3580
|
-
form: dl,
|
|
3581
|
-
group: yl,
|
|
3582
|
-
hidden: vl,
|
|
3583
|
-
list: gl,
|
|
3584
|
-
meta: hl,
|
|
3585
|
-
radio: bl,
|
|
3586
|
-
select: $l,
|
|
3587
|
-
textarea: _l,
|
|
3588
|
-
text: K,
|
|
3589
|
-
color: K,
|
|
3590
|
-
date: K,
|
|
3591
|
-
datetimeLocal: K,
|
|
3592
|
-
email: K,
|
|
3593
|
-
month: K,
|
|
3594
|
-
number: K,
|
|
3595
|
-
password: K,
|
|
3596
|
-
search: K,
|
|
3597
|
-
tel: K,
|
|
3598
|
-
time: K,
|
|
3599
|
-
url: K,
|
|
3600
|
-
week: K,
|
|
3601
|
-
range: K
|
|
3602
|
-
}, J = void 0, X = null, rt, sn = !1, xe = !1, kl = /* @__PURE__ */ new Promise((e) => {
|
|
3603
|
-
rt = () => {
|
|
3604
|
-
sn = !0, e();
|
|
3605
|
-
};
|
|
3606
|
-
}), ae = typeof window < "u" && typeof fetch < "u";
|
|
3607
|
-
J = ae ? /* @__PURE__ */ getComputedStyle(document.documentElement) : void 0;
|
|
3608
|
-
var be = {}, ot = {};
|
|
3609
|
-
function Sl(e, t, r, n) {
|
|
3610
|
-
t && Object.assign(be, t), ae && !xe && (J != null && J.getPropertyValue("--formkit-theme")) ? (rt(), xe = !0) : e && !xe && ae ? Al(e) : !xe && ae && rt();
|
|
3611
|
-
const s = function(a) {
|
|
3612
|
-
var l, o;
|
|
3613
|
-
a.addProps(["iconLoader", "iconLoaderUrl"]), a.props.iconHandler = nr(
|
|
3614
|
-
(l = a.props) != null && l.iconLoader ? a.props.iconLoader : n,
|
|
3615
|
-
(o = a.props) != null && o.iconLoaderUrl ? a.props.iconLoaderUrl : r
|
|
3616
|
-
), El(a, a.props.iconHandler), a.on("created", () => {
|
|
3617
|
-
var y, v;
|
|
3618
|
-
(y = a == null ? void 0 : a.context) != null && y.handlers && (a.context.handlers.iconClick = (h) => {
|
|
3619
|
-
const O = `on${h.charAt(0).toUpperCase()}${h.slice(1)}IconClick`, g = a.props[O];
|
|
3620
|
-
if (g && typeof g == "function")
|
|
3621
|
-
return (b) => g(a, b);
|
|
3622
|
-
}), (v = a == null ? void 0 : a.context) != null && v.fns && (a.context.fns.iconRole = (h) => {
|
|
3623
|
-
const O = `on${h.charAt(0).toUpperCase()}${h.slice(1)}IconClick`;
|
|
3624
|
-
return typeof a.props[O] == "function" ? "button" : null;
|
|
3625
|
-
});
|
|
3626
|
-
});
|
|
3627
|
-
};
|
|
3628
|
-
return s.iconHandler = nr(n, r), s;
|
|
3629
|
-
}
|
|
3630
|
-
function Al(e) {
|
|
3631
|
-
if (!(!e || !ae || typeof getComputedStyle != "function") && (xe = !0, X = document.getElementById("formkit-theme"), e && // if we have a window object
|
|
3632
|
-
ae && // we don't have an existing theme OR the theme being set up is different
|
|
3633
|
-
(!(J != null && J.getPropertyValue("--formkit-theme")) && !X || X != null && X.getAttribute("data-theme") && (X == null ? void 0 : X.getAttribute("data-theme")) !== e))) {
|
|
3634
|
-
const r = `https://cdn.jsdelivr.net/npm/@formkit/themes@${Ye.startsWith("__") ? "latest" : Ye}/dist/${e}/theme.css`, n = document.createElement("link");
|
|
3635
|
-
n.type = "text/css", n.rel = "stylesheet", n.id = "formkit-theme", n.setAttribute("data-theme", e), n.onload = () => {
|
|
3636
|
-
J = getComputedStyle(document.documentElement), rt();
|
|
3637
|
-
}, document.head.appendChild(n), n.href = r, X && X.remove();
|
|
3638
|
-
}
|
|
3639
|
-
}
|
|
3640
|
-
function nr(e, t) {
|
|
3641
|
-
return (r) => {
|
|
3642
|
-
if (typeof r != "string")
|
|
3643
|
-
return;
|
|
3644
|
-
if (r.startsWith("<svg"))
|
|
3645
|
-
return r;
|
|
3646
|
-
const n = r.startsWith("default:");
|
|
3647
|
-
r = n ? r.split(":")[1] : r;
|
|
3648
|
-
const s = r in be;
|
|
3649
|
-
let i;
|
|
3650
|
-
if (s)
|
|
3651
|
-
return be[r];
|
|
3652
|
-
if (!ot[r]) {
|
|
3653
|
-
if (i = Cl(r), i = ae && typeof i > "u" ? Promise.resolve(i) : i, i instanceof Promise)
|
|
3654
|
-
ot[r] = i.then((a) => !a && typeof r == "string" && !n ? i = typeof e == "function" ? e(r) : Pl(r, t) : a).then((a) => (typeof r == "string" && (be[n ? `default:${r}` : r] = a), a));
|
|
3655
|
-
else if (typeof i == "string")
|
|
3656
|
-
return be[n ? `default:${r}` : r] = i, i;
|
|
3657
|
-
}
|
|
3658
|
-
return ot[r];
|
|
3659
|
-
};
|
|
3660
|
-
}
|
|
3661
|
-
function Cl(e) {
|
|
3662
|
-
if (ae)
|
|
3663
|
-
return sn ? sr(e) : kl.then(() => sr(e));
|
|
3664
|
-
}
|
|
3665
|
-
function sr(e) {
|
|
3666
|
-
const t = J == null ? void 0 : J.getPropertyValue(`--fk-icon-${e}`);
|
|
3667
|
-
if (t) {
|
|
3668
|
-
const r = atob(t);
|
|
3669
|
-
if (r.startsWith("<svg"))
|
|
3670
|
-
return be[e] = r, r;
|
|
3671
|
-
}
|
|
3672
|
-
}
|
|
3673
|
-
function Pl(e, t) {
|
|
3674
|
-
const r = Ye.startsWith("__") ? "latest" : Ye, n = typeof t == "function" ? t(e) : `https://cdn.jsdelivr.net/npm/@formkit/icons@${r}/dist/icons/${e}.svg`;
|
|
3675
|
-
if (ae)
|
|
3676
|
-
return fetch(`${n}`).then(async (s) => {
|
|
3677
|
-
const i = await s.text();
|
|
3678
|
-
if (i.startsWith("<svg"))
|
|
3679
|
-
return i;
|
|
3680
|
-
}).catch((s) => {
|
|
3681
|
-
console.error(s);
|
|
3682
|
-
});
|
|
3683
|
-
}
|
|
3684
|
-
function El(e, t) {
|
|
3685
|
-
const r = /^[a-zA-Z-]+(?:-icon|Icon)$/;
|
|
3686
|
-
Object.keys(e.props).filter((s) => r.test(s)).forEach((s) => Ol(e, t, s));
|
|
3687
|
-
}
|
|
3688
|
-
function Ol(e, t, r) {
|
|
3689
|
-
const n = e.props[r], s = t(n), i = `_raw${r.charAt(0).toUpperCase()}${r.slice(1)}`, a = `on${r.charAt(0).toUpperCase()}${r.slice(1)}Click`;
|
|
3690
|
-
if (e.addProps([i, a]), e.on(`prop:${r}`, Il), s instanceof Promise)
|
|
3691
|
-
return s.then((l) => {
|
|
3692
|
-
e.props[i] = l;
|
|
3693
|
-
});
|
|
3694
|
-
e.props[i] = s;
|
|
3695
|
-
}
|
|
3696
|
-
function Il(e) {
|
|
3697
|
-
var a;
|
|
3698
|
-
const t = e.origin, r = e.payload, n = (a = t == null ? void 0 : t.props) == null ? void 0 : a.iconHandler, s = e.name.split(":")[1], i = `_raw${s.charAt(0).toUpperCase()}${s.slice(1)}`;
|
|
3699
|
-
if (n && typeof n == "function") {
|
|
3700
|
-
const l = n(r);
|
|
3701
|
-
if (l instanceof Promise)
|
|
3702
|
-
return l.then((o) => {
|
|
3703
|
-
t.props[i] = o;
|
|
3704
|
-
});
|
|
3705
|
-
t.props[i] = l;
|
|
3706
|
-
}
|
|
3707
|
-
}
|
|
3708
|
-
var ir = {
|
|
3709
|
-
/**
|
|
3710
|
-
* FormKit errors:
|
|
3711
|
-
*/
|
|
3712
|
-
100: ({ data: e }) => `Only groups, lists, and forms can have children (${e.name}).`,
|
|
3713
|
-
101: ({ data: e }) => `You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,
|
|
3714
|
-
102: ({
|
|
3715
|
-
data: [e, t]
|
|
3716
|
-
}) => `You cannot directly assign node.${t} (${e.name})`,
|
|
3717
|
-
103: ({ data: [e] }) => `Schema expressions cannot start with an operator (${e})`,
|
|
3718
|
-
104: ({ data: [e, t] }) => `Schema expressions cannot end with an operator (${e} in "${t}")`,
|
|
3719
|
-
105: ({ data: e }) => `Invalid schema expression: ${e}`,
|
|
3720
|
-
106: ({ data: e }) => `Cannot submit because (${e}) is not in a form.`,
|
|
3721
|
-
107: ({ data: [e, t] }) => `Cannot set ${e.name} to non object value: ${t}`,
|
|
3722
|
-
108: ({ data: [e, t] }) => `Cannot set ${e.name} to non array value: ${t}`,
|
|
3723
|
-
/**
|
|
3724
|
-
* Input specific errors:
|
|
3725
|
-
*/
|
|
3726
|
-
300: ({ data: [e] }) => `Cannot set behavior prop to overscroll (on ${e.name} input) when options prop is a function.`,
|
|
3727
|
-
/**
|
|
3728
|
-
* FormKit vue errors:
|
|
3729
|
-
*/
|
|
3730
|
-
600: ({ data: e }) => `Unknown input type${typeof e.props.type == "string" ? ' "' + e.props.type + '"' : ""} ("${e.name}")`,
|
|
3731
|
-
601: ({ data: e }) => `Input definition${typeof e.props.type == "string" ? ' "' + e.props.type + '"' : ""} is missing a schema or component property (${e.name}).`
|
|
3732
|
-
}, ar = {
|
|
3733
|
-
/**
|
|
3734
|
-
* Core warnings:
|
|
3735
|
-
*/
|
|
3736
|
-
150: ({ data: e }) => `Schema function "${e}()" is not a valid function.`,
|
|
3737
|
-
151: ({ data: e }) => `No form element with id: ${e}`,
|
|
3738
|
-
152: ({ data: e }) => `No input element with id: ${e}`,
|
|
3739
|
-
/**
|
|
3740
|
-
* Input specific warnings:
|
|
3741
|
-
*/
|
|
3742
|
-
350: ({
|
|
3743
|
-
data: { node: e, inputType: t }
|
|
3744
|
-
}) => `Invalid options prop for ${e.name} input (${t}). See https://formkit.com/inputs/${t}`,
|
|
3745
|
-
/**
|
|
3746
|
-
* Vue warnings:
|
|
3747
|
-
*/
|
|
3748
|
-
650: 'Schema "$get()" must use the id of an input to access.',
|
|
3749
|
-
651: ({ data: e }) => `Cannot setErrors() on "${e}" because no such id exists.`,
|
|
3750
|
-
652: ({ data: e }) => `Cannot clearErrors() on "${e}" because no such id exists.`,
|
|
3751
|
-
/**
|
|
3752
|
-
* Deprecation warnings:
|
|
3753
|
-
*/
|
|
3754
|
-
800: ({ data: e }) => `${e} is deprecated.`
|
|
3755
|
-
}, Ml = (e, t) => {
|
|
3756
|
-
if (e.code in ir) {
|
|
3757
|
-
const r = ir[e.code];
|
|
3758
|
-
e.message = typeof r == "function" ? r(e) : r;
|
|
3759
|
-
}
|
|
3760
|
-
return t(e);
|
|
3761
|
-
}, lr = !1;
|
|
3762
|
-
function xl() {
|
|
3763
|
-
lr || (Pt(Ml), Et(Rl), lr = !0);
|
|
3764
|
-
}
|
|
3765
|
-
var Rl = (e, t) => {
|
|
3766
|
-
if (e.code in ar) {
|
|
3767
|
-
const r = ar[e.code];
|
|
3768
|
-
e.message = typeof r == "function" ? r(e) : r;
|
|
3769
|
-
}
|
|
3770
|
-
return t(e);
|
|
3771
|
-
}, jl = Object.defineProperty, Fl = Object.getOwnPropertyNames, an = (e, t) => function() {
|
|
3772
|
-
return e && (t = (0, e[Fl(e)[0]])(e = 0)), t;
|
|
3773
|
-
}, Vl = (e, t) => {
|
|
3774
|
-
for (var r in t)
|
|
3775
|
-
jl(e, r, { get: t[r], enumerable: !0 });
|
|
3776
|
-
}, or, ln, on = an({
|
|
3777
|
-
"packages/vue/src/bindings.ts"() {
|
|
3778
|
-
or = function(t) {
|
|
3779
|
-
t.ledger.count("blocking", (f) => f.blocking);
|
|
3780
|
-
const r = z(!t.ledger.value("blocking"));
|
|
3781
|
-
t.ledger.count("errors", (f) => f.type === "error");
|
|
3782
|
-
const n = z(!!t.ledger.value("errors"));
|
|
3783
|
-
let s = !1;
|
|
3784
|
-
$n(() => {
|
|
3785
|
-
s = !0;
|
|
3786
|
-
});
|
|
3787
|
-
const i = Ie(
|
|
3788
|
-
t.store.reduce((f, k) => (k.visible && (f[k.key] = k), f), {})
|
|
3789
|
-
), a = z(
|
|
3790
|
-
t.props.validationVisibility || (t.props.type === "checkbox" ? "dirty" : "blur")
|
|
3791
|
-
);
|
|
3792
|
-
t.on("prop:validationVisibility", ({ payload: f }) => {
|
|
3793
|
-
a.value = f;
|
|
3794
|
-
});
|
|
3795
|
-
const l = z(a.value === "live"), o = z(!1), y = (f) => {
|
|
3796
|
-
o.value = (f ?? []).some(
|
|
3797
|
-
(k) => k.name === "required"
|
|
3798
|
-
);
|
|
3799
|
-
};
|
|
3800
|
-
y(t.props.parsedRules), t.on("prop:parsedRules", ({ payload: f }) => y(f));
|
|
3801
|
-
const v = z(t.children.map((f) => f.uid)), h = me(() => {
|
|
3802
|
-
if (!p.state)
|
|
3803
|
-
return !1;
|
|
3804
|
-
if (p.state.submitted)
|
|
3805
|
-
return !0;
|
|
3806
|
-
if (!l.value && !p.state.settled)
|
|
3807
|
-
return !1;
|
|
3808
|
-
switch (a.value) {
|
|
3809
|
-
case "live":
|
|
3810
|
-
return !0;
|
|
3811
|
-
case "blur":
|
|
3812
|
-
return p.state.blurred;
|
|
3813
|
-
case "dirty":
|
|
3814
|
-
return p.state.dirty;
|
|
3815
|
-
default:
|
|
3816
|
-
return !1;
|
|
3817
|
-
}
|
|
3818
|
-
}), O = me(() => p.state.failing && h.value), g = me(() => p && b.value ? r.value && !n.value : p.state.dirty && !Z(p.value)), b = z(
|
|
3819
|
-
Array.isArray(t.props.parsedRules) && t.props.parsedRules.length > 0
|
|
3820
|
-
);
|
|
3821
|
-
t.on("prop:parsedRules", ({ payload: f }) => {
|
|
3822
|
-
b.value = Array.isArray(f) && f.length > 0;
|
|
3823
|
-
});
|
|
3824
|
-
const c = me(() => {
|
|
3825
|
-
const f = {};
|
|
3826
|
-
for (const k in i) {
|
|
3827
|
-
const C = i[k];
|
|
3828
|
-
(C.type !== "validation" || h.value) && (f[k] = C);
|
|
3829
|
-
}
|
|
3830
|
-
return f;
|
|
3831
|
-
}), m = Ie(
|
|
3832
|
-
t.store.reduce((f, k) => (k.type === "ui" && k.visible && (f[k.key] = k), f), {})
|
|
3833
|
-
), d = me(() => !p.state.failing), _ = Ie({}), S = new Proxy(_, {
|
|
3834
|
-
get(...f) {
|
|
3835
|
-
if (!t)
|
|
3836
|
-
return "";
|
|
3837
|
-
const [k, C] = f;
|
|
3838
|
-
let V = Reflect.get(...f);
|
|
3839
|
-
return !V && typeof C == "string" && !P(k, C) && !C.startsWith("__v") && st(t).watch((N) => {
|
|
3840
|
-
const ce = typeof N.config.rootClasses == "function" ? N.config.rootClasses(C, N) : {}, Q = N.config.classes ? He(C, N, N.config.classes[C]) : {}, ve = He(
|
|
3841
|
-
C,
|
|
3842
|
-
N,
|
|
3843
|
-
N.props[`_${C}Class`]
|
|
3844
|
-
), pe = He(
|
|
3845
|
-
C,
|
|
3846
|
-
N,
|
|
3847
|
-
N.props[`${C}Class`]
|
|
3848
|
-
);
|
|
3849
|
-
V = Bs(
|
|
3850
|
-
N,
|
|
3851
|
-
C,
|
|
3852
|
-
ce,
|
|
3853
|
-
Q,
|
|
3854
|
-
ve,
|
|
3855
|
-
pe
|
|
3856
|
-
), k[C] = V ?? "";
|
|
3857
|
-
}), V;
|
|
3858
|
-
}
|
|
3859
|
-
});
|
|
3860
|
-
t.on("prop:rootClasses", () => {
|
|
3861
|
-
const f = Object.keys(_);
|
|
3862
|
-
for (const k of f)
|
|
3863
|
-
delete _[k];
|
|
3864
|
-
});
|
|
3865
|
-
const $ = me(() => {
|
|
3866
|
-
if (!t)
|
|
3867
|
-
return;
|
|
3868
|
-
const f = [];
|
|
3869
|
-
p.help && f.push(`help-${t.props.id}`);
|
|
3870
|
-
for (const k in c.value)
|
|
3871
|
-
f.push(`${t.props.id}-${k}`);
|
|
3872
|
-
return f.length ? f.join(" ") : void 0;
|
|
3873
|
-
}), w = z(t.value), u = z(t.value), p = Ie({
|
|
3874
|
-
_value: u,
|
|
3875
|
-
attrs: t.props.attrs,
|
|
3876
|
-
disabled: t.props.disabled,
|
|
3877
|
-
describedBy: $,
|
|
3878
|
-
fns: {
|
|
3879
|
-
length: (f) => Object.keys(f).length,
|
|
3880
|
-
number: (f) => Number(f),
|
|
3881
|
-
string: (f) => String(f),
|
|
3882
|
-
json: (f) => JSON.stringify(f),
|
|
3883
|
-
eq: T
|
|
3884
|
-
},
|
|
3885
|
-
handlers: {
|
|
3886
|
-
blur: (f) => {
|
|
3887
|
-
t && (t.store.set(
|
|
3888
|
-
/* @__PURE__ */ H({ key: "blurred", visible: !1, value: !0 })
|
|
3889
|
-
), typeof t.props.attrs.onBlur == "function" && t.props.attrs.onBlur(f));
|
|
3890
|
-
},
|
|
3891
|
-
touch: () => {
|
|
3892
|
-
var C;
|
|
3893
|
-
const f = p.dirtyBehavior === "compare";
|
|
3894
|
-
if ((C = t.store.dirty) != null && C.value && !f)
|
|
3895
|
-
return;
|
|
3896
|
-
const k = !T(t.props._init, t._value);
|
|
3897
|
-
!k && !f || t.store.set(
|
|
3898
|
-
/* @__PURE__ */ H({ key: "dirty", visible: !1, value: k })
|
|
3899
|
-
);
|
|
3900
|
-
},
|
|
3901
|
-
DOMInput: (f) => {
|
|
3902
|
-
t.input(f.target.value), t.emit("dom-input-event", f);
|
|
3903
|
-
}
|
|
3904
|
-
},
|
|
3905
|
-
help: t.props.help,
|
|
3906
|
-
id: t.props.id,
|
|
3907
|
-
items: v,
|
|
3908
|
-
label: t.props.label,
|
|
3909
|
-
messages: c,
|
|
3910
|
-
didMount: !1,
|
|
3911
|
-
node: nt(t),
|
|
3912
|
-
options: t.props.options,
|
|
3913
|
-
defaultMessagePlacement: !0,
|
|
3914
|
-
slots: t.props.__slots,
|
|
3915
|
-
state: {
|
|
3916
|
-
blurred: !1,
|
|
3917
|
-
complete: g,
|
|
3918
|
-
dirty: !1,
|
|
3919
|
-
empty: Z(w),
|
|
3920
|
-
submitted: !1,
|
|
3921
|
-
settled: t.isSettled,
|
|
3922
|
-
valid: r,
|
|
3923
|
-
invalid: O,
|
|
3924
|
-
errors: n,
|
|
3925
|
-
rules: b,
|
|
3926
|
-
validationVisible: h,
|
|
3927
|
-
required: o,
|
|
3928
|
-
failing: !1,
|
|
3929
|
-
passing: d
|
|
3930
|
-
},
|
|
3931
|
-
type: t.props.type,
|
|
3932
|
-
family: t.props.family,
|
|
3933
|
-
ui: m,
|
|
3934
|
-
value: w,
|
|
3935
|
-
classes: S
|
|
3936
|
-
});
|
|
3937
|
-
t.on("created", () => {
|
|
3938
|
-
T(p.value, t.value) || (u.value = t.value, w.value = t.value, Te(w), Te(u)), (async () => (await t.settled, t && (t.props._init = B(t.value))))();
|
|
3939
|
-
}), t.on("mounted", () => {
|
|
3940
|
-
p.didMount = !0;
|
|
3941
|
-
}), t.on("settled", ({ payload: f }) => {
|
|
3942
|
-
p.state.settled = f;
|
|
3943
|
-
});
|
|
3944
|
-
function E(f) {
|
|
3945
|
-
(Array.isArray(f) ? f : Object.keys(f)).forEach((C) => {
|
|
3946
|
-
C = $e(C), P(p, C) || (p[C] = t.props[C]), t.on(`prop:${C}`, ({ payload: V }) => {
|
|
3947
|
-
p[C] = V;
|
|
3948
|
-
});
|
|
3949
|
-
});
|
|
3950
|
-
}
|
|
3951
|
-
E((() => {
|
|
3952
|
-
const f = [
|
|
3953
|
-
"__root",
|
|
3954
|
-
"help",
|
|
3955
|
-
"label",
|
|
3956
|
-
"disabled",
|
|
3957
|
-
"options",
|
|
3958
|
-
"type",
|
|
3959
|
-
"attrs",
|
|
3960
|
-
"preserve",
|
|
3961
|
-
"preserveErrors",
|
|
3962
|
-
"id",
|
|
3963
|
-
"dirtyBehavior"
|
|
3964
|
-
], k = /^[a-zA-Z-]+(?:-icon|Icon)$/, C = Object.keys(t.props).filter((V) => k.test(V));
|
|
3965
|
-
return f.concat(C);
|
|
3966
|
-
})());
|
|
3967
|
-
function j(f) {
|
|
3968
|
-
f.props && E(f.props);
|
|
3969
|
-
}
|
|
3970
|
-
t.props.definition && j(t.props.definition), t.on("added-props", ({ payload: f }) => E(f)), t.on("input", ({ payload: f }) => {
|
|
3971
|
-
t.type !== "input" && !pt(f) && !Dt(f) ? u.value = dt(f) : (u.value = f, Te(u));
|
|
3972
|
-
}), t.on("commitRaw", ({ payload: f }) => {
|
|
3973
|
-
t.type !== "input" && !pt(f) && !Dt(f) ? w.value = u.value = dt(f) : (w.value = u.value = f, Te(w)), t.emit("modelUpdated");
|
|
3974
|
-
}), t.on("commit", ({ payload: f }) => {
|
|
3975
|
-
var k;
|
|
3976
|
-
if ((!p.state.dirty || p.dirtyBehavior === "compare") && t.isCreated && s)
|
|
3977
|
-
if (!((k = t.store.validating) != null && k.value))
|
|
3978
|
-
p.handlers.touch();
|
|
3979
|
-
else {
|
|
3980
|
-
const C = t.on("message-removed", ({ payload: V }) => {
|
|
3981
|
-
V.key === "validating" && (p.handlers.touch(), t.off(C));
|
|
3982
|
-
});
|
|
3983
|
-
}
|
|
3984
|
-
g && t.type === "input" && n.value && !G(t.props.preserveErrors) && t.store.filter(
|
|
3985
|
-
(C) => {
|
|
3986
|
-
var V;
|
|
3987
|
-
return !(C.type === "error" && ((V = C.meta) == null ? void 0 : V.autoClear) === !0);
|
|
3988
|
-
}
|
|
3989
|
-
), t.type === "list" && t.sync && (v.value = t.children.map((C) => C.uid)), p.state.empty = Z(f);
|
|
3990
|
-
});
|
|
3991
|
-
const M = async (f) => {
|
|
3992
|
-
f.type === "ui" && f.visible && !f.meta.showAsMessage ? m[f.key] = f : f.visible ? i[f.key] = f : f.type === "state" && (p.state[f.key] = !!f.value);
|
|
3993
|
-
};
|
|
3994
|
-
t.on("message-added", (f) => M(f.payload)), t.on("message-updated", (f) => M(f.payload)), t.on("message-removed", ({ payload: f }) => {
|
|
3995
|
-
delete m[f.key], delete i[f.key], delete p.state[f.key];
|
|
3996
|
-
}), t.on("settled:blocking", () => {
|
|
3997
|
-
r.value = !0;
|
|
3998
|
-
}), t.on("unsettled:blocking", () => {
|
|
3999
|
-
r.value = !1;
|
|
4000
|
-
}), t.on("settled:errors", () => {
|
|
4001
|
-
n.value = !1;
|
|
4002
|
-
}), t.on("unsettled:errors", () => {
|
|
4003
|
-
n.value = !0;
|
|
4004
|
-
}), Re(h, (f) => {
|
|
4005
|
-
f && (l.value = !0);
|
|
4006
|
-
}), t.context = p, t.emit("context", t, !1), t.on("destroyed", () => {
|
|
4007
|
-
t.context = void 0, t = null;
|
|
4008
|
-
});
|
|
4009
|
-
}, ln = or;
|
|
4010
|
-
}
|
|
4011
|
-
}), Nl = {};
|
|
4012
|
-
Vl(Nl, {
|
|
4013
|
-
defaultConfig: () => Vt
|
|
4014
|
-
});
|
|
4015
|
-
var Vt, Dl = an({
|
|
4016
|
-
"packages/vue/src/defaultConfig.ts"() {
|
|
4017
|
-
on(), Vt = (e = {}) => {
|
|
4018
|
-
xl();
|
|
4019
|
-
const {
|
|
4020
|
-
rules: t = {},
|
|
4021
|
-
locales: r = {},
|
|
4022
|
-
inputs: n = {},
|
|
4023
|
-
messages: s = {},
|
|
4024
|
-
locale: i = void 0,
|
|
4025
|
-
theme: a = void 0,
|
|
4026
|
-
iconLoaderUrl: l = void 0,
|
|
4027
|
-
iconLoader: o = void 0,
|
|
4028
|
-
icons: y = {},
|
|
4029
|
-
...v
|
|
4030
|
-
} = e, h = da({
|
|
4031
|
-
...ma,
|
|
4032
|
-
...t || {}
|
|
4033
|
-
}), O = Ma(
|
|
4034
|
-
le({ en: Ia, ...r || {} }, s)
|
|
4035
|
-
), g = xa(wl, n), b = Sl(a, y, l, o);
|
|
4036
|
-
return le(
|
|
4037
|
-
{
|
|
4038
|
-
plugins: [g, b, ln, O, h],
|
|
4039
|
-
...i ? { config: { locale: i } } : {}
|
|
4040
|
-
},
|
|
4041
|
-
v || {},
|
|
4042
|
-
!0
|
|
4043
|
-
);
|
|
4044
|
-
};
|
|
4045
|
-
}
|
|
4046
|
-
}), Ll = typeof window > "u", ut = /* @__PURE__ */ new Map();
|
|
4047
|
-
function ql(e, t) {
|
|
4048
|
-
var r;
|
|
4049
|
-
!Ll || !e || (ut.has(e) || ut.set(e, /* @__PURE__ */ new Set()), (r = ut.get(e)) == null || r.add(t));
|
|
4050
|
-
}
|
|
4051
|
-
var un = typeof window > "u", Fe = {}, ke = {}, q, se = /* @__PURE__ */ new WeakMap(), Tl = "__raw__", Kl = /[a-zA-Z0-9\-][cC]lass$/;
|
|
4052
|
-
function zl(e, t) {
|
|
4053
|
-
const r = z(null);
|
|
4054
|
-
if (e === "get") {
|
|
4055
|
-
const s = {};
|
|
4056
|
-
return r.value = Wl.bind(null, s), r;
|
|
4057
|
-
}
|
|
4058
|
-
const n = e.split(".");
|
|
4059
|
-
return ne(() => {
|
|
4060
|
-
r.value = Nt(
|
|
4061
|
-
pt(t) ? t.value : t,
|
|
4062
|
-
n
|
|
4063
|
-
);
|
|
4064
|
-
}), r;
|
|
4065
|
-
}
|
|
4066
|
-
function Nt(e, t) {
|
|
4067
|
-
if (Array.isArray(e)) {
|
|
4068
|
-
for (const s of e) {
|
|
4069
|
-
const i = s !== !1 && Nt(s, t);
|
|
4070
|
-
if (i !== void 0)
|
|
4071
|
-
return i;
|
|
4072
|
-
}
|
|
4073
|
-
return;
|
|
4074
|
-
}
|
|
4075
|
-
let r, n = e;
|
|
4076
|
-
for (const s in t) {
|
|
4077
|
-
const i = t[s];
|
|
4078
|
-
if (typeof n != "object" || n === null) {
|
|
4079
|
-
r = void 0;
|
|
4080
|
-
break;
|
|
4081
|
-
}
|
|
4082
|
-
const a = n[i];
|
|
4083
|
-
if (Number(s) === t.length - 1 && a !== void 0) {
|
|
4084
|
-
r = typeof a == "function" ? a.bind(n) : a;
|
|
4085
|
-
break;
|
|
4086
|
-
}
|
|
4087
|
-
n = a;
|
|
4088
|
-
}
|
|
4089
|
-
return r;
|
|
4090
|
-
}
|
|
4091
|
-
function Wl(e, t) {
|
|
4092
|
-
if (typeof t != "string")
|
|
4093
|
-
return ye(650);
|
|
4094
|
-
if (t in e || (e[t] = z(void 0)), e[t].value === void 0) {
|
|
4095
|
-
e[t].value = null;
|
|
4096
|
-
const r = Ve(t);
|
|
4097
|
-
r && (e[t].value = r.context), Qn(t, ({ payload: n }) => {
|
|
4098
|
-
e[t].value = Ne(n) ? n.context : n;
|
|
4099
|
-
});
|
|
4100
|
-
}
|
|
4101
|
-
return e[t].value;
|
|
4102
|
-
}
|
|
4103
|
-
function ur(e, t, r) {
|
|
4104
|
-
function n(g, b) {
|
|
4105
|
-
const c = h(Y(b.if), { if: !0 }), m = y(g, b.then), d = b.else ? y(g, b.else) : null;
|
|
4106
|
-
return [c, m, d];
|
|
4107
|
-
}
|
|
4108
|
-
function s(g, b) {
|
|
4109
|
-
var _, S;
|
|
4110
|
-
const c = h(Y(g.if));
|
|
4111
|
-
let m = () => b, d = () => b;
|
|
4112
|
-
return typeof g.then == "object" ? d = i(g.then, void 0) : typeof g.then == "string" && ((_ = g.then) != null && _.startsWith("$")) ? d = h(Y(g.then)) : d = () => g.then, P(g, "else") && (typeof g.else == "object" ? m = i(g.else) : typeof g.else == "string" && ((S = g.else) != null && S.startsWith("$")) ? m = h(Y(g.else)) : m = () => g.else), () => c() ? d() : m();
|
|
4113
|
-
}
|
|
4114
|
-
function i(g, b, c = {}) {
|
|
4115
|
-
const m = new Set(Object.keys(g || {})), d = b ? h(Y(b)) : () => ({}), _ = [
|
|
4116
|
-
(S) => {
|
|
4117
|
-
const $ = d();
|
|
4118
|
-
for (const w in $)
|
|
4119
|
-
m.has(w) || (S[w] = $[w]);
|
|
4120
|
-
}
|
|
4121
|
-
];
|
|
4122
|
-
if (g) {
|
|
4123
|
-
if (he(g))
|
|
4124
|
-
return s(
|
|
4125
|
-
g,
|
|
4126
|
-
c
|
|
4127
|
-
);
|
|
4128
|
-
for (let S in g) {
|
|
4129
|
-
const $ = g[S];
|
|
4130
|
-
let w;
|
|
4131
|
-
const u = typeof $ == "string";
|
|
4132
|
-
S.startsWith(Tl) ? (S = S.substring(7), w = () => $) : u && $.startsWith("$") && $.length > 1 && !($.startsWith("$reset") && Kl.test(S)) ? w = h(Y($)) : typeof $ == "object" && he($) ? w = s($, void 0) : typeof $ == "object" && Se($) ? w = i($) : w = () => $, _.push((p) => {
|
|
4133
|
-
p[S] = w();
|
|
4134
|
-
});
|
|
4135
|
-
}
|
|
4136
|
-
}
|
|
4137
|
-
return () => {
|
|
4138
|
-
const S = Array.isArray(g) ? [] : {};
|
|
4139
|
-
return _.forEach(($) => $(S)), S;
|
|
4140
|
-
};
|
|
4141
|
-
}
|
|
4142
|
-
function a(g, b) {
|
|
4143
|
-
let c = null, m = () => null, d = !1, _ = null, S = null, $ = null, w = !1;
|
|
4144
|
-
const u = Us(b);
|
|
4145
|
-
if (bt(u) ? (c = u.$el, m = u.$el !== "text" ? i(u.attrs, u.bind) : () => null) : $t(u) ? (typeof u.$cmp == "string" ? P(g, u.$cmp) ? c = g[u.$cmp] : (c = u.$cmp, w = !0) : c = u.$cmp, m = i(u.props, u.bind)) : he(u) && ([d, _, S] = n(g, u)), !he(u) && "if" in u ? d = h(Y(u.if)) : !he(u) && c === null && (d = () => !0), "children" in u && u.children)
|
|
4146
|
-
if (typeof u.children == "string")
|
|
4147
|
-
if (u.children.startsWith("$slots."))
|
|
4148
|
-
c = c === "text" ? "slot" : c, _ = h(Y(u.children));
|
|
4149
|
-
else if (u.children.startsWith("$") && u.children.length > 1) {
|
|
4150
|
-
const p = h(Y(u.children));
|
|
4151
|
-
_ = () => String(p());
|
|
4152
|
-
} else
|
|
4153
|
-
_ = () => String(u.children);
|
|
4154
|
-
else if (Array.isArray(u.children))
|
|
4155
|
-
_ = y(g, u.children);
|
|
4156
|
-
else {
|
|
4157
|
-
const [p, E, R] = n(g, u.children);
|
|
4158
|
-
_ = (j) => p && p() ? E && E(j) : R && R(j);
|
|
4159
|
-
}
|
|
4160
|
-
if ($t(u))
|
|
4161
|
-
if (_) {
|
|
4162
|
-
const p = _;
|
|
4163
|
-
_ = (E) => ({
|
|
4164
|
-
default(R, j) {
|
|
4165
|
-
var k, C, V, F;
|
|
4166
|
-
const M = q;
|
|
4167
|
-
j && (q = j), R && ((k = se.get(q)) == null || k.unshift(R)), E && ((C = se.get(q)) == null || C.unshift(E));
|
|
4168
|
-
const f = p(E);
|
|
4169
|
-
return R && ((V = se.get(q)) == null || V.shift()), E && ((F = se.get(q)) == null || F.shift()), q = M, f;
|
|
4170
|
-
}
|
|
4171
|
-
}), _.slot = !0;
|
|
4172
|
-
} else
|
|
4173
|
-
_ = () => ({});
|
|
4174
|
-
if ("for" in u && u.for) {
|
|
4175
|
-
const p = u.for.length === 3 ? u.for[2] : u.for[1];
|
|
4176
|
-
$ = [
|
|
4177
|
-
typeof p == "string" && p.startsWith("$") ? h(Y(p)) : () => p,
|
|
4178
|
-
u.for[0],
|
|
4179
|
-
u.for.length === 3 ? String(u.for[1]) : null
|
|
4180
|
-
];
|
|
4181
|
-
}
|
|
4182
|
-
return [d, c, m, _, S, $, w];
|
|
4183
|
-
}
|
|
4184
|
-
function l(g, b) {
|
|
4185
|
-
const c = g(b), m = q;
|
|
4186
|
-
return Object.keys(c).reduce((d, _) => {
|
|
4187
|
-
const S = c && c[_];
|
|
4188
|
-
return d[_] = ($) => S && S($, m) || null, d;
|
|
4189
|
-
}, {});
|
|
4190
|
-
}
|
|
4191
|
-
function o(g, b) {
|
|
4192
|
-
const [c, m, d, _, S, $, w] = a(g, b);
|
|
4193
|
-
let u = (p) => {
|
|
4194
|
-
if (c && m === null && _)
|
|
4195
|
-
return c() ? _(p) : S && S(p);
|
|
4196
|
-
if (m && (!c || c())) {
|
|
4197
|
-
if (m === "text" && _)
|
|
4198
|
-
return _n(String(_()));
|
|
4199
|
-
if (m === "slot" && _)
|
|
4200
|
-
return _(p);
|
|
4201
|
-
const E = w ? wn(m) : m, R = _ != null && _.slot ? l(_, p) : null;
|
|
4202
|
-
return mt(
|
|
4203
|
-
E,
|
|
4204
|
-
d(),
|
|
4205
|
-
R || (_ ? _(p) : [])
|
|
4206
|
-
);
|
|
4207
|
-
}
|
|
4208
|
-
return typeof S == "function" ? S(p) : S;
|
|
4209
|
-
};
|
|
4210
|
-
if ($) {
|
|
4211
|
-
const p = u, [E, R, j] = $;
|
|
4212
|
-
u = () => {
|
|
4213
|
-
const M = E(), f = Number.isFinite(M) ? Array(Number(M)).fill(0).map((F, N) => N) : M, k = [];
|
|
4214
|
-
if (typeof f != "object")
|
|
4215
|
-
return null;
|
|
4216
|
-
const C = se.get(q) || [], V = Array.isArray(f);
|
|
4217
|
-
for (const F in f) {
|
|
4218
|
-
if (V && F in Array.prototype)
|
|
4219
|
-
continue;
|
|
4220
|
-
const N = Object.defineProperty(
|
|
4221
|
-
{
|
|
4222
|
-
...C.reduce(
|
|
4223
|
-
(ce, Q) => ce.__idata ? { ...ce, ...Q } : Q,
|
|
4224
|
-
{}
|
|
4225
|
-
),
|
|
4226
|
-
[R]: f[F],
|
|
4227
|
-
...j !== null ? { [j]: V ? Number(F) : F } : {}
|
|
4228
|
-
},
|
|
4229
|
-
"__idata",
|
|
4230
|
-
{ enumerable: !1, value: !0 }
|
|
4231
|
-
);
|
|
4232
|
-
C.unshift(N), k.push(p.bind(null, N)()), C.shift();
|
|
4233
|
-
}
|
|
4234
|
-
return k;
|
|
4235
|
-
};
|
|
4236
|
-
}
|
|
4237
|
-
return u;
|
|
4238
|
-
}
|
|
4239
|
-
function y(g, b) {
|
|
4240
|
-
if (Array.isArray(b)) {
|
|
4241
|
-
const m = b.map(o.bind(null, g));
|
|
4242
|
-
return (d) => m.map((_) => _(d));
|
|
4243
|
-
}
|
|
4244
|
-
const c = o(g, b);
|
|
4245
|
-
return (m) => c(m);
|
|
4246
|
-
}
|
|
4247
|
-
const v = [];
|
|
4248
|
-
function h(g, b = {}) {
|
|
4249
|
-
const c = /* @__PURE__ */ new WeakMap();
|
|
4250
|
-
return v.push((m, d) => {
|
|
4251
|
-
c.set(
|
|
4252
|
-
d,
|
|
4253
|
-
g.provide((_) => m(_, b))
|
|
4254
|
-
);
|
|
4255
|
-
}), () => c.get(q)();
|
|
4256
|
-
}
|
|
4257
|
-
function O(g, b) {
|
|
4258
|
-
r ?? (r = cn(t));
|
|
4259
|
-
const [c, m] = P(Fe, r) ? Fe[r] : [y(e, t), v];
|
|
4260
|
-
return un || (ke[r] ?? (ke[r] = 0), ke[r]++, Fe[r] = [c, m]), m.forEach((d) => {
|
|
4261
|
-
d(g, b);
|
|
4262
|
-
}), () => (q = b, c());
|
|
4263
|
-
}
|
|
4264
|
-
return O;
|
|
4265
|
-
}
|
|
4266
|
-
function fn(e, t) {
|
|
4267
|
-
const r = se.get(q) || [];
|
|
4268
|
-
let n;
|
|
4269
|
-
return r.length && (n = Nt(r, e.split("."))), n === void 0 ? t : n;
|
|
4270
|
-
}
|
|
4271
|
-
function Hl(e, t) {
|
|
4272
|
-
return new Proxy(e, {
|
|
4273
|
-
get(...r) {
|
|
4274
|
-
let n;
|
|
4275
|
-
const s = r[1];
|
|
4276
|
-
if (typeof s == "string") {
|
|
4277
|
-
const i = q;
|
|
4278
|
-
q = t, n = fn(s, void 0), q = i;
|
|
4279
|
-
}
|
|
4280
|
-
return n !== void 0 ? n : Reflect.get(...r);
|
|
4281
|
-
}
|
|
4282
|
-
});
|
|
4283
|
-
}
|
|
4284
|
-
function fr(e, t, r) {
|
|
4285
|
-
return e(
|
|
4286
|
-
(n, s = {}) => n.reduce((i, a) => {
|
|
4287
|
-
if (a.startsWith("slots.")) {
|
|
4288
|
-
const l = a.substring(6), o = () => t.slots && P(t.slots, l) && typeof t.slots[l] == "function";
|
|
4289
|
-
if (s.if)
|
|
4290
|
-
i[a] = o;
|
|
4291
|
-
else if (t.slots) {
|
|
4292
|
-
const y = Hl(t, r);
|
|
4293
|
-
i[a] = () => o() ? t.slots[l](y) : null;
|
|
4294
|
-
}
|
|
4295
|
-
} else {
|
|
4296
|
-
const l = zl(a, t);
|
|
4297
|
-
i[a] = () => fn(a, l.value);
|
|
4298
|
-
}
|
|
4299
|
-
return i;
|
|
4300
|
-
}, {}),
|
|
4301
|
-
r
|
|
4302
|
-
);
|
|
4303
|
-
}
|
|
4304
|
-
function cr(e, t, r) {
|
|
4305
|
-
if (t ?? (t = cn(e)), ke[t]--, ke[t] === 0) {
|
|
4306
|
-
delete ke[t];
|
|
4307
|
-
const [, n] = Fe[t];
|
|
4308
|
-
delete Fe[t], n.length = 0;
|
|
4309
|
-
}
|
|
4310
|
-
se.delete(r);
|
|
4311
|
-
}
|
|
4312
|
-
function cn(e) {
|
|
4313
|
-
return JSON.stringify(e, (t, r) => typeof r == "function" ? r.toString() : r);
|
|
4314
|
-
}
|
|
4315
|
-
var pn = /* @__PURE__ */ dr({
|
|
4316
|
-
name: "FormKitSchema",
|
|
4317
|
-
props: {
|
|
4318
|
-
schema: {
|
|
4319
|
-
type: [Array, Object],
|
|
4320
|
-
required: !0
|
|
4321
|
-
},
|
|
4322
|
-
data: {
|
|
4323
|
-
type: Object,
|
|
4324
|
-
default: () => ({})
|
|
4325
|
-
},
|
|
4326
|
-
library: {
|
|
4327
|
-
type: Object,
|
|
4328
|
-
default: () => ({})
|
|
4329
|
-
},
|
|
4330
|
-
memoKey: {
|
|
4331
|
-
type: String,
|
|
4332
|
-
required: !1
|
|
4333
|
-
}
|
|
4334
|
-
},
|
|
4335
|
-
emits: ["mounted"],
|
|
4336
|
-
setup(e, t) {
|
|
4337
|
-
var y;
|
|
4338
|
-
const r = ct();
|
|
4339
|
-
let n = {};
|
|
4340
|
-
se.set(n, []);
|
|
4341
|
-
const s = { FormKit: nt(dn), ...e.library };
|
|
4342
|
-
let i = ur(s, e.schema, e.memoKey), a, l;
|
|
4343
|
-
un || Re(
|
|
4344
|
-
() => e.schema,
|
|
4345
|
-
(v, h) => {
|
|
4346
|
-
var g;
|
|
4347
|
-
const O = n;
|
|
4348
|
-
n = {}, se.set(n, []), i = ur(s, e.schema, e.memoKey), a = fr(i, l, n), v === h && ((g = r == null ? void 0 : r.proxy) == null ? void 0 : g.$forceUpdate).call(g), cr(e.schema, e.memoKey, O);
|
|
4349
|
-
},
|
|
4350
|
-
{ deep: !0 }
|
|
4351
|
-
), ne(() => {
|
|
4352
|
-
l = Object.assign(Ie(e.data ?? {}), {
|
|
4353
|
-
slots: t.slots
|
|
4354
|
-
}), t.slots, a = fr(i, l, n);
|
|
4355
|
-
});
|
|
4356
|
-
function o() {
|
|
4357
|
-
cr(e.schema, e.memoKey, n), l && (l.node && l.node.destroy(), l.slots = null, l = null), a = null;
|
|
4358
|
-
}
|
|
4359
|
-
return yr(() => t.emit("mounted")), vn(o), ql((y = ct()) == null ? void 0 : y.appContext.app, o), () => a ? a() : null;
|
|
4360
|
-
}
|
|
4361
|
-
}), Ul = pn, Bl = typeof window > "u", pr = Symbol("FormKitParent"), Zl = Symbol("FormKitComponentCallback");
|
|
4362
|
-
function Yl(e, t) {
|
|
4363
|
-
const r = no(e, t);
|
|
4364
|
-
if (r.props.definition || W(600, r), r.props.definition.component)
|
|
4365
|
-
return () => {
|
|
4366
|
-
var y;
|
|
4367
|
-
return mt(
|
|
4368
|
-
(y = r.props.definition) == null ? void 0 : y.component,
|
|
4369
|
-
{
|
|
4370
|
-
context: r.context
|
|
4371
|
-
},
|
|
4372
|
-
{ ...t.slots }
|
|
4373
|
-
);
|
|
4374
|
-
};
|
|
4375
|
-
const n = z([]);
|
|
4376
|
-
let s = r.props.definition.schemaMemoKey;
|
|
4377
|
-
const i = () => {
|
|
4378
|
-
var v, h;
|
|
4379
|
-
const y = (h = (v = r.props) == null ? void 0 : v.definition) == null ? void 0 : h.schema;
|
|
4380
|
-
y || W(601, r), typeof y == "function" ? (n.value = y({ ...e.sectionsSchema || {} }), (s && e.sectionsSchema || "memoKey" in y && typeof y.memoKey == "string") && (s = (s ?? (y == null ? void 0 : y.memoKey)) + JSON.stringify(e.sectionsSchema))) : n.value = y;
|
|
4381
|
-
};
|
|
4382
|
-
i(), Bl || r.on("schema", () => {
|
|
4383
|
-
s += "♻️", i();
|
|
4384
|
-
}), t.emit("node", r);
|
|
4385
|
-
const a = r.props.definition.library, l = {
|
|
4386
|
-
FormKit: nt(mn),
|
|
4387
|
-
...a,
|
|
4388
|
-
...e.library ?? {}
|
|
4389
|
-
};
|
|
4390
|
-
function o() {
|
|
4391
|
-
r.emit("mounted");
|
|
4392
|
-
}
|
|
4393
|
-
return t.expose({ node: r }), () => mt(
|
|
4394
|
-
pn,
|
|
4395
|
-
{
|
|
4396
|
-
schema: n.value,
|
|
4397
|
-
data: r.context,
|
|
4398
|
-
onMounted: o,
|
|
4399
|
-
library: l,
|
|
4400
|
-
memoKey: s
|
|
4401
|
-
},
|
|
4402
|
-
{ ...t.slots }
|
|
4403
|
-
);
|
|
4404
|
-
}
|
|
4405
|
-
var mn = /* @__PURE__ */ dr(
|
|
4406
|
-
Yl,
|
|
4407
|
-
{
|
|
4408
|
-
props: Ra,
|
|
4409
|
-
inheritAttrs: !1
|
|
4410
|
-
}
|
|
4411
|
-
), dn = mn, Gl = Symbol();
|
|
4412
|
-
function Jl(e, t) {
|
|
4413
|
-
return e.component(t.alias || "FormKit", dn).component(t.schemaAlias || "FormKitSchema", Ul), {
|
|
4414
|
-
get: Ve,
|
|
4415
|
-
setLocale: (r) => {
|
|
4416
|
-
var n;
|
|
4417
|
-
(n = t.config) != null && n.rootConfig && (t.config.rootConfig.locale = r);
|
|
4418
|
-
},
|
|
4419
|
-
clearErrors: Ys,
|
|
4420
|
-
setErrors: Zs,
|
|
4421
|
-
submit: wr,
|
|
4422
|
-
reset: kr
|
|
4423
|
-
};
|
|
4424
|
-
}
|
|
4425
|
-
var yn = Symbol.for("FormKitOptions"), Ql = Symbol.for("FormKitConfig"), Xl = {
|
|
4426
|
-
install(e, t) {
|
|
4427
|
-
const r = Object.assign(
|
|
4428
|
-
{
|
|
4429
|
-
alias: "FormKit",
|
|
4430
|
-
schemaAlias: "FormKitSchema"
|
|
4431
|
-
},
|
|
4432
|
-
typeof t == "function" ? t() : t
|
|
4433
|
-
), n = Xn(r.config || {});
|
|
4434
|
-
r.config = { rootConfig: n }, e.config.globalProperties.$formkit = Jl(e, r), e.provide(yn, r), e.provide(Ql, n), typeof window < "u" && (globalThis.__FORMKIT_CONFIGS__ = (globalThis.__FORMKIT_CONFIGS__ || []).concat([n]));
|
|
4435
|
-
}
|
|
4436
|
-
}, eo = typeof window < "u", ft = [
|
|
4437
|
-
// Boolean props
|
|
4438
|
-
"ignore",
|
|
4439
|
-
"disabled",
|
|
4440
|
-
"preserve",
|
|
4441
|
-
// String props
|
|
4442
|
-
"help",
|
|
4443
|
-
"label",
|
|
4444
|
-
/^preserve(-e|E)rrors/,
|
|
4445
|
-
/^[a-z]+(?:-visibility|Visibility|-behavior|Behavior)$/,
|
|
4446
|
-
/^[a-zA-Z-]+(?:-class|Class)$/,
|
|
4447
|
-
"prefixIcon",
|
|
4448
|
-
"suffixIcon",
|
|
4449
|
-
/^[a-zA-Z-]+(?:-icon|Icon)$/
|
|
4450
|
-
], to = ["disabled", "ignore", "preserve"];
|
|
4451
|
-
function mr(e, t) {
|
|
4452
|
-
t.classes && Object.keys(t.classes).forEach(
|
|
4453
|
-
(r) => {
|
|
4454
|
-
typeof r == "string" && (e.props[`_${r}Class`] = t.classes[r], je(t.classes[r]) && r === "inner" && Object.values(t.classes[r]));
|
|
4455
|
-
}
|
|
4456
|
-
);
|
|
4457
|
-
}
|
|
4458
|
-
function ro(e) {
|
|
4459
|
-
return e ? ["Submit", "SubmitRaw", "SubmitInvalid"].reduce(
|
|
4460
|
-
(r, n) => {
|
|
4461
|
-
const s = `on${n}`;
|
|
4462
|
-
return s in e && typeof e[s] == "function" && (r[s] = e[s]), r;
|
|
4463
|
-
},
|
|
4464
|
-
{}
|
|
4465
|
-
) : {};
|
|
4466
|
-
}
|
|
4467
|
-
function no(e, t, r = {}) {
|
|
4468
|
-
const n = Object.assign({}, qe(yn) || {}, r), s = qe(Gl, z(eo ? document : void 0)), i = qe(Zl, () => {
|
|
4469
|
-
}), a = ct(), l = ro(a == null ? void 0 : a.vnode.props), o = ["modelValue", "model-value"].some(
|
|
4470
|
-
(u) => u in ((a == null ? void 0 : a.vnode.props) ?? {})
|
|
4471
|
-
);
|
|
4472
|
-
let y = !1;
|
|
4473
|
-
yr(() => {
|
|
4474
|
-
y = !0;
|
|
4475
|
-
});
|
|
4476
|
-
const v = e.modelValue !== void 0 ? e.modelValue : B(t.attrs.value);
|
|
4477
|
-
function h() {
|
|
4478
|
-
const u = {
|
|
4479
|
-
...ge(e),
|
|
4480
|
-
...l,
|
|
4481
|
-
type: e.type ?? "text",
|
|
4482
|
-
__root: s.value,
|
|
4483
|
-
__slots: t.slots
|
|
4484
|
-
}, p = Lt(ge(t.attrs), ft);
|
|
4485
|
-
p.key || (p.key = Ee()), u.attrs = p;
|
|
4486
|
-
const E = qt(ge(t.attrs), ft);
|
|
4487
|
-
for (const j in E)
|
|
4488
|
-
to.includes(j) && E[j] === "" && (E[j] = !0), u[$e(j)] = E[j];
|
|
4489
|
-
const R = { props: {} };
|
|
4490
|
-
return mr(R, e), Object.assign(u, R.props), typeof u.type != "string" && (u.definition = u.type, delete u.type), u;
|
|
4491
|
-
}
|
|
4492
|
-
const O = h(), g = O.ignore ? null : e.parent || qe(pr, null), b = Ws(
|
|
4493
|
-
le(
|
|
4494
|
-
n || {},
|
|
4495
|
-
{
|
|
4496
|
-
name: e.name || void 0,
|
|
4497
|
-
value: v,
|
|
4498
|
-
parent: g,
|
|
4499
|
-
plugins: (n.plugins || []).concat(e.plugins ?? []),
|
|
4500
|
-
config: e.config || {},
|
|
4501
|
-
props: O,
|
|
4502
|
-
index: e.index,
|
|
4503
|
-
sync: !!G(t.attrs.sync || t.attrs.dynamic)
|
|
4504
|
-
},
|
|
4505
|
-
!1,
|
|
4506
|
-
!0
|
|
4507
|
-
)
|
|
4508
|
-
);
|
|
4509
|
-
i(b), b.props.definition || W(600, b);
|
|
4510
|
-
const c = z(
|
|
4511
|
-
new Set(
|
|
4512
|
-
Array.isArray(b.props.__propDefs) ? b.props.__propDefs : Object.keys(b.props.__propDefs ?? {})
|
|
4513
|
-
)
|
|
4514
|
-
);
|
|
4515
|
-
b.on(
|
|
4516
|
-
"added-props",
|
|
4517
|
-
({ payload: u }) => {
|
|
4518
|
-
(Array.isArray(u) ? u : Object.keys(u ?? {})).forEach((E) => c.value.add(E));
|
|
4519
|
-
}
|
|
4520
|
-
);
|
|
4521
|
-
const m = me(
|
|
4522
|
-
() => ft.concat([...c.value]).reduce((u, p) => (typeof p == "string" ? (u.push($e(p)), u.push(gr(p))) : u.push(p), u), [])
|
|
4523
|
-
);
|
|
4524
|
-
ne(() => mr(b, e));
|
|
4525
|
-
const d = ge(e);
|
|
4526
|
-
for (const u in d)
|
|
4527
|
-
Re(
|
|
4528
|
-
() => e[u],
|
|
4529
|
-
() => {
|
|
4530
|
-
e[u] !== void 0 && (b.props[u] = e[u]);
|
|
4531
|
-
}
|
|
4532
|
-
);
|
|
4533
|
-
ne(() => {
|
|
4534
|
-
b.props.__root = s.value;
|
|
4535
|
-
});
|
|
4536
|
-
const _ = /* @__PURE__ */ new Set(), S = ge(t.attrs);
|
|
4537
|
-
ne(() => {
|
|
4538
|
-
$(qt(S, m.value));
|
|
4539
|
-
});
|
|
4540
|
-
function $(u) {
|
|
4541
|
-
_.forEach((p) => {
|
|
4542
|
-
p(), _.delete(p);
|
|
4543
|
-
});
|
|
4544
|
-
for (const p in u) {
|
|
4545
|
-
const E = $e(p);
|
|
4546
|
-
_.add(
|
|
4547
|
-
Re(
|
|
4548
|
-
() => t.attrs[p],
|
|
4549
|
-
() => {
|
|
4550
|
-
b.props[E] = t.attrs[p];
|
|
4551
|
-
}
|
|
4552
|
-
)
|
|
4553
|
-
);
|
|
4554
|
-
}
|
|
4555
|
-
}
|
|
4556
|
-
if (ne(() => {
|
|
4557
|
-
const u = Lt(ge(t.attrs), m.value);
|
|
4558
|
-
"multiple" in u && (u.multiple = G(u.multiple)), typeof u.onBlur == "function" && (u.onBlur = xn(u.onBlur)), b.props.attrs = Object.assign({}, b.props.attrs || {}, u);
|
|
4559
|
-
}), ne(() => {
|
|
4560
|
-
const u = (e.errors ?? []).map(
|
|
4561
|
-
(p) => /* @__PURE__ */ H({
|
|
4562
|
-
key: At(p),
|
|
4563
|
-
type: "error",
|
|
4564
|
-
value: p,
|
|
4565
|
-
meta: { source: "prop" }
|
|
4566
|
-
})
|
|
4567
|
-
);
|
|
4568
|
-
b.store.apply(
|
|
4569
|
-
u,
|
|
4570
|
-
(p) => p.type === "error" && p.meta.source === "prop"
|
|
4571
|
-
);
|
|
4572
|
-
}), b.type !== "input") {
|
|
4573
|
-
const u = `${b.name}-prop`;
|
|
4574
|
-
ne(() => {
|
|
4575
|
-
const p = e.inputErrors ?? {}, E = Object.keys(p);
|
|
4576
|
-
E.length || b.clearErrors(!0, u);
|
|
4577
|
-
const R = E.reduce((j, M) => {
|
|
4578
|
-
let f = p[M];
|
|
4579
|
-
return typeof f == "string" && (f = [f]), Array.isArray(f) && (j[M] = f.map(
|
|
4580
|
-
(k) => /* @__PURE__ */ H({
|
|
4581
|
-
key: k,
|
|
4582
|
-
type: "error",
|
|
4583
|
-
value: k,
|
|
4584
|
-
meta: { source: u }
|
|
4585
|
-
})
|
|
4586
|
-
)), j;
|
|
4587
|
-
}, {});
|
|
4588
|
-
b.store.apply(
|
|
4589
|
-
R,
|
|
4590
|
-
(j) => j.type === "error" && j.meta.source === u
|
|
4591
|
-
);
|
|
4592
|
-
});
|
|
4593
|
-
}
|
|
4594
|
-
ne(() => Object.assign(b.config, e.config)), b.type !== "input" && gn(pr, b);
|
|
4595
|
-
let w;
|
|
4596
|
-
return b.on("modelUpdated", () => {
|
|
4597
|
-
var u, p;
|
|
4598
|
-
t.emit("inputRaw", (u = b.context) == null ? void 0 : u.value, b), y && t.emit("input", (p = b.context) == null ? void 0 : p.value, b), o && b.context && (w = B(b.value), t.emit("update:modelValue", dt(b.value)));
|
|
4599
|
-
}), o && (Re(
|
|
4600
|
-
hn(e, "modelValue"),
|
|
4601
|
-
(u) => {
|
|
4602
|
-
T(w, u) || b.input(u, !1);
|
|
4603
|
-
},
|
|
4604
|
-
{ deep: !0 }
|
|
4605
|
-
), b.value !== v && b.emit("modelUpdated")), bn(() => b.destroy()), b;
|
|
4606
|
-
}
|
|
4607
|
-
var so = 1;
|
|
4608
|
-
function io(e) {
|
|
4609
|
-
return typeof e == "function" && e.length === 2 || typeof e == "object" && !Array.isArray(e) && !("$el" in e) && !("$cmp" in e) && !("if" in e);
|
|
4610
|
-
}
|
|
4611
|
-
function U(e, t = {}, r = {}) {
|
|
4612
|
-
const n = {
|
|
4613
|
-
type: "input",
|
|
4614
|
-
...t
|
|
4615
|
-
};
|
|
4616
|
-
let s;
|
|
4617
|
-
if (io(e)) {
|
|
4618
|
-
const i = `SchemaComponent${so++}`;
|
|
4619
|
-
s = /* @__PURE__ */ A("input", () => ({
|
|
4620
|
-
$cmp: i,
|
|
4621
|
-
props: {
|
|
4622
|
-
context: "$node.context"
|
|
4623
|
-
}
|
|
4624
|
-
})), n.library = { [i]: nt(e) };
|
|
4625
|
-
} else typeof e == "function" ? s = e : s = /* @__PURE__ */ A("input", () => B(e));
|
|
4626
|
-
return n.schema = /* @__PURE__ */ cl(s || "Schema undefined", r), n.schemaMemoKey || (n.schemaMemoKey = `${Math.random()}`), n;
|
|
4627
|
-
}
|
|
4628
|
-
var ao = /* @__PURE__ */ A("messages", () => ({
|
|
4629
|
-
$el: "ul",
|
|
4630
|
-
if: "$fns.length($messages)"
|
|
4631
|
-
})), lo = /* @__PURE__ */ A("message", () => ({
|
|
4632
|
-
$el: "li",
|
|
4633
|
-
for: ["message", "$messages"],
|
|
4634
|
-
attrs: {
|
|
4635
|
-
key: "$message.key",
|
|
4636
|
-
id: "$id + '-' + $message.key",
|
|
4637
|
-
"data-message-type": "$message.type"
|
|
4638
|
-
}
|
|
4639
|
-
}));
|
|
4640
|
-
ao(lo("$message.value"));
|
|
4641
|
-
var oo = /* @__PURE__ */ A("summary", () => ({
|
|
4642
|
-
$el: "div",
|
|
4643
|
-
attrs: {
|
|
4644
|
-
"aria-live": "polite"
|
|
4645
|
-
}
|
|
4646
|
-
})), uo = /* @__PURE__ */ A("summaryInner", () => ({
|
|
4647
|
-
$el: "div",
|
|
4648
|
-
if: "$summaries.length && $showSummaries"
|
|
4649
|
-
})), fo = /* @__PURE__ */ A("messages", () => ({
|
|
4650
|
-
$el: "ul",
|
|
4651
|
-
if: "$summaries.length && $showSummaries"
|
|
4652
|
-
})), co = /* @__PURE__ */ A("message", () => ({
|
|
4653
|
-
$el: "li",
|
|
4654
|
-
for: ["summary", "$summaries"],
|
|
4655
|
-
attrs: {
|
|
4656
|
-
key: "$summary.key",
|
|
4657
|
-
"data-message-type": "$summary.type"
|
|
4658
|
-
}
|
|
4659
|
-
})), po = /* @__PURE__ */ A("summaryHeader", () => ({
|
|
4660
|
-
$el: "h2",
|
|
4661
|
-
attrs: {
|
|
4662
|
-
id: "$id"
|
|
4663
|
-
}
|
|
4664
|
-
})), mo = /* @__PURE__ */ A("messageLink", () => ({
|
|
4665
|
-
$el: "a",
|
|
4666
|
-
attrs: {
|
|
4667
|
-
id: "$summary.key",
|
|
4668
|
-
href: '$: "#" + $summary.id',
|
|
4669
|
-
onClick: "$jumpLink"
|
|
4670
|
-
}
|
|
4671
|
-
}));
|
|
4672
|
-
oo(
|
|
4673
|
-
uo(
|
|
4674
|
-
po("$summaryHeader"),
|
|
4675
|
-
fo(co(mo("$summary.message")))
|
|
4676
|
-
)
|
|
4677
|
-
);
|
|
4678
|
-
Dl();
|
|
4679
|
-
on();
|
|
4680
|
-
const go = (e) => {
|
|
4681
|
-
e.use(
|
|
4682
|
-
Xl,
|
|
4683
|
-
Vt({
|
|
4684
|
-
inputs: {
|
|
4685
|
-
BaTextField: U(
|
|
4686
|
-
L(
|
|
4687
|
-
() => import("./TextField-BiVH5rLX.js")
|
|
4688
|
-
)
|
|
4689
|
-
),
|
|
4690
|
-
BaStepperField: U(
|
|
4691
|
-
L(
|
|
4692
|
-
() => import("./StepperField-BeeZ_sl9.js")
|
|
4693
|
-
),
|
|
4694
|
-
{ props: ["suffix", "disabled", "min"] }
|
|
4695
|
-
),
|
|
4696
|
-
BaColorPicker: U(
|
|
4697
|
-
L(
|
|
4698
|
-
() => import("./ColorPicker-BsSFgHSF.js")
|
|
4699
|
-
)
|
|
4700
|
-
),
|
|
4701
|
-
BaSelect: U(
|
|
4702
|
-
L(
|
|
4703
|
-
() => import("./Select-DQrjO2Su.js")
|
|
4704
|
-
),
|
|
4705
|
-
{ props: ["selectItems", "editable"] }
|
|
4706
|
-
),
|
|
4707
|
-
BaListRepeater: U(
|
|
4708
|
-
L(
|
|
4709
|
-
() => import("./ListRepeater-Bjq_VTKB.js")
|
|
4710
|
-
)
|
|
4711
|
-
),
|
|
4712
|
-
BaTextStyleList: U(
|
|
4713
|
-
L(
|
|
4714
|
-
() => import("./TextStyleList-CuPE80Py.js")
|
|
4715
|
-
)
|
|
4716
|
-
),
|
|
4717
|
-
BaTextAlign: U(
|
|
4718
|
-
L(
|
|
4719
|
-
() => import("./TextAlign-BOC8ekaH.js")
|
|
4720
|
-
)
|
|
4721
|
-
),
|
|
4722
|
-
BaTextDecorators: U(
|
|
4723
|
-
L(
|
|
4724
|
-
() => import("./TextDecorators-BJC4umDR.js")
|
|
4725
|
-
)
|
|
4726
|
-
),
|
|
4727
|
-
BaImageUpload: U(
|
|
4728
|
-
L(
|
|
4729
|
-
() => import("./ImageUpload-Bu1QY9Tu.js")
|
|
4730
|
-
),
|
|
4731
|
-
{ props: ["ignoreUpdate"] }
|
|
4732
|
-
),
|
|
4733
|
-
BaLinkButton: U(
|
|
4734
|
-
L(
|
|
4735
|
-
() => import("./LinkButton-DS5DH9B8.js")
|
|
4736
|
-
)
|
|
4737
|
-
),
|
|
4738
|
-
BaSwitch: U(
|
|
4739
|
-
L(() => import("./Switch-8mmNQUDo.js"))
|
|
4740
|
-
),
|
|
4741
|
-
BaButtonGroup: U(
|
|
4742
|
-
L(
|
|
4743
|
-
() => import("./ButtonGroup-B3ba45VA.js")
|
|
4744
|
-
),
|
|
4745
|
-
{ props: ["groupItems"] }
|
|
4746
|
-
)
|
|
4747
|
-
}
|
|
4748
|
-
})
|
|
4749
|
-
);
|
|
4750
|
-
}, ho = L(() => import("./App-CKxXz-yv.js"));
|
|
4751
|
-
export {
|
|
4752
|
-
dn as F,
|
|
4753
|
-
pn as a,
|
|
4754
|
-
ho as b,
|
|
4755
|
-
go as c,
|
|
4756
|
-
vo as r
|
|
4757
|
-
};
|