@sfxcode/formkit-primevue 1.8.1 → 1.8.3

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