inertia-bootstrap-forms 4.0.4 → 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.fa.md +548 -548
- package/README.md +554 -554
- package/dist/index.cjs +1 -1
- package/dist/index.js +1041 -970
- package/dist/persian-date.cjs +1 -1
- package/dist/persian-date.js +36 -30
- package/dist/style.css +1 -1
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/CreditCardInput.vue +106 -0
- package/src/PersianDatePickerInput.vue +116 -80
- package/src/entries/persian-date.js +1 -1
- package/src/index.js +5 -1
- package/types/persian-date.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { defineComponent as F, createElementBlock as
|
|
3
|
-
import { _ as R, f as
|
|
4
|
-
import { u as Q, a as
|
|
5
|
-
import { useForm as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
1
|
+
import * as nn from "vue";
|
|
2
|
+
import { defineComponent as F, createElementBlock as v, openBlock as m, normalizeClass as q, renderSlot as L, createElementVNode as h, createCommentVNode as M, toDisplayString as V, computed as S, withDirectives as re, vModelText as fn, normalizeStyle as se, ref as E, onMounted as J, watch as U, vModelDynamic as Se, createTextVNode as x, nextTick as X, shallowRef as Sn, onBeforeUnmount as pn, Fragment as W, renderList as ae, reactive as ie, resolveComponent as oe, createBlock as le, mergeProps as Qe, withModifiers as tn, provide as De, inject as me, withCtx as xe, createVNode as Ne, h as kn, vModelCheckbox as In, Teleport as Cn } from "vue";
|
|
3
|
+
import { _ as R, f as z, u as P } from "./chunks/_plugin-vue_export-helper-13TPlHFF.js";
|
|
4
|
+
import { u as Q, a as Le, l as qe, c as Tn } from "./chunks/http-DV3dRBe5.js";
|
|
5
|
+
import { useForm as Mn } from "@inertiajs/vue3";
|
|
6
|
+
const Bn = "۰۱۲۳۴۵۶۷۸۹", En = "٠١٢٣٤٥٦٧٨٩";
|
|
7
|
+
function ke(e) {
|
|
8
8
|
return String(e ?? "").replace(/[۰-۹٠-٩]/g, (n) => {
|
|
9
|
-
const a =
|
|
10
|
-
return String(a !== -1 ? a :
|
|
9
|
+
const a = Bn.indexOf(n);
|
|
10
|
+
return String(a !== -1 ? a : En.indexOf(n));
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Fe(e) {
|
|
14
14
|
if (e == null || e === "") return "";
|
|
15
15
|
const n = Number(e);
|
|
16
16
|
return Number.isNaN(n) ? "" : n.toLocaleString("en-US");
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const n =
|
|
18
|
+
function mn(e) {
|
|
19
|
+
const n = ke(e).replace(/\D/g, "");
|
|
20
20
|
return n === "" ? null : parseInt(n, 10);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const An = F({
|
|
23
23
|
name: "AmountInput",
|
|
24
24
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
25
25
|
props: {
|
|
26
|
-
...
|
|
26
|
+
...z,
|
|
27
27
|
placeholder: { type: String, default: null },
|
|
28
28
|
unit: { type: String, default: null },
|
|
29
29
|
min: { type: Number, default: null },
|
|
@@ -33,33 +33,33 @@ const Bn = F({
|
|
|
33
33
|
locale: { type: String, default: null }
|
|
34
34
|
},
|
|
35
35
|
setup(e, { emit: n }) {
|
|
36
|
-
const a =
|
|
36
|
+
const a = P(e, n), { t: l } = Q(() => e.locale), u = S(() => Fe(a.model.value)), i = S(() => e.unit ?? l("amount.unit")), t = S(() => e.size ? `form-control-${e.size}` : null);
|
|
37
37
|
function d(w) {
|
|
38
|
-
const
|
|
39
|
-
a.model.value =
|
|
40
|
-
const o =
|
|
41
|
-
|
|
38
|
+
const g = w.target, p = g.value.slice(0, g.selectionStart ?? 0), $ = ke(p).replace(/\D/g, "").length, k = mn(g.value);
|
|
39
|
+
a.model.value = k;
|
|
40
|
+
const o = Fe(k);
|
|
41
|
+
g.value = o;
|
|
42
42
|
let r = 0, s = 0;
|
|
43
43
|
for (; r < o.length && s < $; )
|
|
44
44
|
/\d/.test(o[r]) && s++, r++;
|
|
45
|
-
document.activeElement ===
|
|
45
|
+
document.activeElement === g && g.setSelectionRange(r, r), n("input", k, w);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let
|
|
49
|
-
|
|
47
|
+
function y(w) {
|
|
48
|
+
let g = a.model.value;
|
|
49
|
+
g != null && (e.max !== null && g > e.max && (g = e.max), e.min !== null && g < e.min && (g = e.min), g !== a.model.value && (a.model.value = g)), a.emitChange(g, w);
|
|
50
50
|
}
|
|
51
|
-
return { ...a, displayValue: u, unitText: i, sizeClass: t, onInput: d, clamp:
|
|
51
|
+
return { ...a, displayValue: u, unitText: i, sizeClass: t, onInput: d, clamp: y, t: l };
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), On = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"], Vn = {
|
|
54
54
|
key: 0,
|
|
55
55
|
class: "input-group-text fanum"
|
|
56
56
|
};
|
|
57
|
-
function
|
|
58
|
-
return
|
|
57
|
+
function Dn(e, n, a, l, u, i) {
|
|
58
|
+
return m(), v("div", {
|
|
59
59
|
class: q(["input-group", { "is-invalid": e.isInvalid }])
|
|
60
60
|
}, [
|
|
61
61
|
L(e.$slots, "prefix"),
|
|
62
|
-
|
|
62
|
+
h("input", {
|
|
63
63
|
name: e.name,
|
|
64
64
|
id: e.inputId,
|
|
65
65
|
value: e.displayValue,
|
|
@@ -76,16 +76,16 @@ function On(e, n, a, l, u, i) {
|
|
|
76
76
|
onChange: n[1] || (n[1] = (...t) => e.clamp && e.clamp(...t)),
|
|
77
77
|
onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
|
|
78
78
|
onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
|
|
79
|
-
}, null, 42,
|
|
80
|
-
e.unitText ? (
|
|
79
|
+
}, null, 42, On),
|
|
80
|
+
e.unitText ? (m(), v("span", Vn, V(e.unitText), 1)) : M("", !0),
|
|
81
81
|
L(e.$slots, "suffix")
|
|
82
82
|
], 2);
|
|
83
83
|
}
|
|
84
|
-
const
|
|
84
|
+
const Nn = /* @__PURE__ */ R(An, [["render", Dn]]), qn = F({
|
|
85
85
|
name: "CaptchaInput",
|
|
86
86
|
emits: ["update:modelValue", "change", "input", "refresh"],
|
|
87
87
|
props: {
|
|
88
|
-
...
|
|
88
|
+
...z,
|
|
89
89
|
name: { type: String, default: "captcha" },
|
|
90
90
|
/** Endpoint that returns the captcha image. */
|
|
91
91
|
url: { type: String, default: "/captcha/default" },
|
|
@@ -97,32 +97,32 @@ const Vn = /* @__PURE__ */ R(Bn, [["render", On]]), Dn = F({
|
|
|
97
97
|
locale: { type: String, default: null }
|
|
98
98
|
},
|
|
99
99
|
setup(e, { emit: n, expose: a }) {
|
|
100
|
-
const l =
|
|
101
|
-
function
|
|
100
|
+
const l = P(e, n), { t: u } = Q(() => e.locale), i = Le(), t = E(null), d = E(!0);
|
|
101
|
+
function y() {
|
|
102
102
|
d.value = !0, t.value = `${e.url}${e.url.includes("?") ? "&" : "?"}t=${Date.now()}`, i.timeout(() => {
|
|
103
103
|
d.value = !1;
|
|
104
104
|
}, 500), n("refresh");
|
|
105
105
|
}
|
|
106
|
-
return J(
|
|
106
|
+
return J(y), U(
|
|
107
107
|
() => {
|
|
108
108
|
var w;
|
|
109
109
|
return (w = l.form.value) == null ? void 0 : w.processing;
|
|
110
110
|
},
|
|
111
|
-
(w,
|
|
112
|
-
e.refreshOnSubmit &&
|
|
111
|
+
(w, g) => {
|
|
112
|
+
e.refreshOnSubmit && g && !w && (l.model.value = null, y());
|
|
113
113
|
}
|
|
114
|
-
), a({ refresh:
|
|
114
|
+
), a({ refresh: y }), { ...l, t: u, src: t, loading: d, refresh: y };
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), Fn = ["name", "id", "placeholder", "required", "readonly", "disabled", "aria-invalid"], Rn = ["src", "alt", "width", "height"], Ln = {
|
|
117
117
|
key: 1,
|
|
118
118
|
class: "placeholder-wave w-100",
|
|
119
119
|
"aria-hidden": "true"
|
|
120
|
-
},
|
|
121
|
-
function
|
|
122
|
-
return
|
|
120
|
+
}, jn = ["disabled", "aria-label"];
|
|
121
|
+
function zn(e, n, a, l, u, i) {
|
|
122
|
+
return m(), v("div", {
|
|
123
123
|
class: q(["input-group captcha", { "is-invalid": e.isInvalid }])
|
|
124
124
|
}, [
|
|
125
|
-
re(
|
|
125
|
+
re(h("input", {
|
|
126
126
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
|
|
127
127
|
name: e.name,
|
|
128
128
|
id: e.inputId,
|
|
@@ -137,14 +137,14 @@ function Ln(e, n, a, l, u, i) {
|
|
|
137
137
|
class: q(["form-control text-start", { "is-invalid": e.isInvalid }]),
|
|
138
138
|
onInput: n[1] || (n[1] = (t) => e.$emit("input", e.model, t)),
|
|
139
139
|
onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t))
|
|
140
|
-
}, null, 42,
|
|
141
|
-
[
|
|
140
|
+
}, null, 42, Fn), [
|
|
141
|
+
[fn, e.model]
|
|
142
142
|
]),
|
|
143
|
-
|
|
143
|
+
h("span", {
|
|
144
144
|
class: "input-group-text p-0 overflow-hidden",
|
|
145
145
|
style: se({ width: e.imageWidth + "px", height: "auto" })
|
|
146
146
|
}, [
|
|
147
|
-
e.src && !e.loading ? (
|
|
147
|
+
e.src && !e.loading ? (m(), v("img", {
|
|
148
148
|
key: 0,
|
|
149
149
|
src: e.src,
|
|
150
150
|
alt: e.t("captcha.alt"),
|
|
@@ -153,21 +153,21 @@ function Ln(e, n, a, l, u, i) {
|
|
|
153
153
|
class: "captcha-holder",
|
|
154
154
|
style: { cursor: "pointer", objectFit: "contain" },
|
|
155
155
|
onClick: n[3] || (n[3] = (...t) => e.refresh && e.refresh(...t))
|
|
156
|
-
}, null, 8,
|
|
157
|
-
|
|
156
|
+
}, null, 8, Rn)) : (m(), v("span", Ln, [
|
|
157
|
+
h("span", {
|
|
158
158
|
class: "placeholder w-100",
|
|
159
159
|
style: se({ height: e.imageHeight + "px" })
|
|
160
160
|
}, null, 4)
|
|
161
161
|
]))
|
|
162
162
|
], 4),
|
|
163
|
-
|
|
163
|
+
h("button", {
|
|
164
164
|
type: "button",
|
|
165
165
|
class: "btn-outline theme-secondary btn-icon",
|
|
166
166
|
disabled: e.isDisabled || e.loading,
|
|
167
167
|
"aria-label": e.t("captcha.refresh"),
|
|
168
168
|
onClick: n[4] || (n[4] = (...t) => e.refresh && e.refresh(...t))
|
|
169
169
|
}, n[5] || (n[5] = [
|
|
170
|
-
|
|
170
|
+
h("svg", {
|
|
171
171
|
width: "16",
|
|
172
172
|
height: "16",
|
|
173
173
|
viewBox: "0 0 16 16",
|
|
@@ -178,13 +178,13 @@ function Ln(e, n, a, l, u, i) {
|
|
|
178
178
|
"stroke-linejoin": "round",
|
|
179
179
|
"aria-hidden": "true"
|
|
180
180
|
}, [
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
h("path", { d: "M13.5 3v3.5H10M2.5 13V9.5H6" }),
|
|
182
|
+
h("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5" })
|
|
183
183
|
], -1)
|
|
184
|
-
]), 8,
|
|
184
|
+
]), 8, jn)
|
|
185
185
|
], 2);
|
|
186
186
|
}
|
|
187
|
-
const
|
|
187
|
+
const Pn = /* @__PURE__ */ R(qn, [["render", zn]]);
|
|
188
188
|
function je(e, n, a, { type: l = () => e.type } = {}) {
|
|
189
189
|
function u() {
|
|
190
190
|
if (!e.checked) return;
|
|
@@ -196,13 +196,13 @@ function je(e, n, a, { type: l = () => e.type } = {}) {
|
|
|
196
196
|
}
|
|
197
197
|
return J(() => {
|
|
198
198
|
u(), i();
|
|
199
|
-
}),
|
|
199
|
+
}), U(() => e.indeterminate, i), { applyInitialChecked: u };
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Kn = F({
|
|
202
202
|
name: "CheckboxButtonInput",
|
|
203
203
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
204
204
|
props: {
|
|
205
|
-
...
|
|
205
|
+
...z,
|
|
206
206
|
type: { type: String, default: "radio", validator: (e) => ["checkbox", "radio"].includes(e) },
|
|
207
207
|
value: { type: [String, Number, Boolean, Object], default: "yes" },
|
|
208
208
|
trueValue: { type: null, default: !0 },
|
|
@@ -213,16 +213,16 @@ const zn = F({
|
|
|
213
213
|
theme: { type: String, default: "primary" }
|
|
214
214
|
},
|
|
215
215
|
setup(e, { emit: n }) {
|
|
216
|
-
const a = E(null), l =
|
|
216
|
+
const a = E(null), l = P(e, n, { valued: () => e.value });
|
|
217
217
|
return je(e, l, a), { ...l, input: a, onChange: (u) => l.emitChange(l.model.value, u) };
|
|
218
218
|
},
|
|
219
219
|
expose: ["input"]
|
|
220
|
-
}),
|
|
221
|
-
function
|
|
222
|
-
return
|
|
220
|
+
}), Un = ["name", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"];
|
|
221
|
+
function Hn(e, n, a, l, u, i) {
|
|
222
|
+
return m(), v("label", {
|
|
223
223
|
class: q(["btn-check", [`btn-${e.variant}`, `theme-${e.theme}`, { "is-invalid": e.isInvalid, disabled: e.isDisabled }]])
|
|
224
224
|
}, [
|
|
225
|
-
re(
|
|
225
|
+
re(h("input", {
|
|
226
226
|
ref: "input",
|
|
227
227
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
|
|
228
228
|
name: e.name,
|
|
@@ -238,17 +238,17 @@ function Un(e, n, a, l, u, i) {
|
|
|
238
238
|
onChange: n[1] || (n[1] = (...t) => e.onChange && e.onChange(...t)),
|
|
239
239
|
onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
|
|
240
240
|
onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
|
|
241
|
-
}, null, 42,
|
|
241
|
+
}, null, 42, Un), [
|
|
242
242
|
[Se, e.model]
|
|
243
243
|
]),
|
|
244
244
|
L(e.$slots, "default")
|
|
245
245
|
], 2);
|
|
246
246
|
}
|
|
247
|
-
const
|
|
247
|
+
const Xn = /* @__PURE__ */ R(Kn, [["render", Hn]]), Gn = F({
|
|
248
248
|
name: "CheckboxInput",
|
|
249
249
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
250
250
|
props: {
|
|
251
|
-
...
|
|
251
|
+
...z,
|
|
252
252
|
/** checkbox | radio */
|
|
253
253
|
type: { type: String, default: "checkbox", validator: (e) => ["checkbox", "radio"].includes(e) },
|
|
254
254
|
/** Value added to the model (arrays / radios) when this option is checked. */
|
|
@@ -261,7 +261,7 @@ const Hn = /* @__PURE__ */ R(zn, [["render", Un]]), Kn = F({
|
|
|
261
261
|
label: { type: String, default: null }
|
|
262
262
|
},
|
|
263
263
|
setup(e, { emit: n }) {
|
|
264
|
-
const a = E(null), l =
|
|
264
|
+
const a = E(null), l = P(e, n, { valued: () => e.value });
|
|
265
265
|
je(e, l, a);
|
|
266
266
|
function u(i) {
|
|
267
267
|
l.emitChange(l.model.value, i);
|
|
@@ -269,10 +269,10 @@ const Hn = /* @__PURE__ */ R(zn, [["render", Un]]), Kn = F({
|
|
|
269
269
|
return { ...l, input: a, onChange: u };
|
|
270
270
|
},
|
|
271
271
|
expose: ["input"]
|
|
272
|
-
}),
|
|
273
|
-
function
|
|
274
|
-
return
|
|
275
|
-
re(
|
|
272
|
+
}), Wn = { class: "form-field" }, Qn = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], Jn = ["for"];
|
|
273
|
+
function Zn(e, n, a, l, u, i) {
|
|
274
|
+
return m(), v("div", Wn, [
|
|
275
|
+
re(h("input", {
|
|
276
276
|
ref: "input",
|
|
277
277
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
|
|
278
278
|
name: e.name,
|
|
@@ -289,30 +289,30 @@ function Qn(e, n, a, l, u, i) {
|
|
|
289
289
|
onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
|
|
290
290
|
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
291
291
|
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
292
|
-
}, null, 42,
|
|
292
|
+
}, null, 42, Qn), [
|
|
293
293
|
[Se, e.model]
|
|
294
294
|
]),
|
|
295
|
-
|
|
295
|
+
h("label", { for: e.inputId }, [
|
|
296
296
|
L(e.$slots, "default", {}, () => [
|
|
297
297
|
x(V(e.label), 1)
|
|
298
298
|
])
|
|
299
|
-
], 8,
|
|
299
|
+
], 8, Jn)
|
|
300
300
|
]);
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
304
|
-
return
|
|
302
|
+
const Yn = /* @__PURE__ */ R(Gn, [["render", Zn]]), xn = 24;
|
|
303
|
+
function Ue(e) {
|
|
304
|
+
return ke(e).replace(/^\s*ir/i, "").replace(/\D/g, "").slice(0, xn);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function He(e, n = !0) {
|
|
307
307
|
if (!e) return "";
|
|
308
308
|
const a = [e.slice(0, 2), ...e.slice(2).match(/.{1,4}/g) ?? []];
|
|
309
309
|
return n && (a[0] = `${a[0]}`), a.join(" ");
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const _n = F({
|
|
312
312
|
name: "ShebaInput",
|
|
313
313
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
314
314
|
props: {
|
|
315
|
-
...
|
|
315
|
+
...z,
|
|
316
316
|
placeholder: { type: String, default: null },
|
|
317
317
|
/** Show "IR" at the start of the formatted value. */
|
|
318
318
|
prefix: { type: Boolean, default: !0 },
|
|
@@ -320,51 +320,51 @@ const Yn = F({
|
|
|
320
320
|
size: { type: String, default: null }
|
|
321
321
|
},
|
|
322
322
|
setup(e, { emit: n }) {
|
|
323
|
-
const a =
|
|
324
|
-
() => e.placeholder ??
|
|
323
|
+
const a = P(e, n), l = S(() => Ue(a.model.value ?? "")), u = S(() => He(l.value, e.prefix)), i = S(() => e.size ? `form-control-${e.size}` : null), t = S(
|
|
324
|
+
() => e.placeholder ?? He("000000000000000000000000", e.prefix)
|
|
325
325
|
);
|
|
326
|
-
function d(
|
|
327
|
-
if ($ === 0) return e.prefix &&
|
|
328
|
-
let
|
|
329
|
-
for (let o = 0; o <
|
|
330
|
-
if (/\d/.test(
|
|
331
|
-
return
|
|
332
|
-
}
|
|
333
|
-
function
|
|
334
|
-
const $ =
|
|
326
|
+
function d(p, $) {
|
|
327
|
+
if ($ === 0) return e.prefix && p ? 2 : 0;
|
|
328
|
+
let k = 0;
|
|
329
|
+
for (let o = 0; o < p.length; o++)
|
|
330
|
+
if (/\d/.test(p[o]) && ++k === $) return o + 1;
|
|
331
|
+
return p.length;
|
|
332
|
+
}
|
|
333
|
+
function y(p) {
|
|
334
|
+
const $ = p.target, k = $.selectionStart ?? $.value.length, o = Ue($.value.slice(0, k)).length, r = Ue($.value), s = He(r, e.prefix);
|
|
335
335
|
if (a.model.value = r, $.value = s, document.activeElement === $) {
|
|
336
336
|
const c = d(s, o);
|
|
337
|
-
|
|
337
|
+
X(() => $.setSelectionRange(c, c));
|
|
338
338
|
}
|
|
339
|
-
n("input", r,
|
|
339
|
+
n("input", r, p);
|
|
340
340
|
}
|
|
341
|
-
function w(
|
|
342
|
-
if (
|
|
343
|
-
const $ =
|
|
341
|
+
function w(p) {
|
|
342
|
+
if (p.key !== "Backspace") return;
|
|
343
|
+
const $ = p.target;
|
|
344
344
|
if ($.selectionStart !== $.selectionEnd) return;
|
|
345
|
-
const
|
|
346
|
-
|
|
345
|
+
const k = $.selectionStart ?? 0;
|
|
346
|
+
k > 0 && $.value[k - 1] === " " && $.setSelectionRange(k - 1, k - 1);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
a.emitChange(l.value,
|
|
348
|
+
function g(p) {
|
|
349
|
+
a.emitChange(l.value, p);
|
|
350
350
|
}
|
|
351
|
-
return { ...a, displayValue: u, sizeClass: i, placeholderText: t, onInput:
|
|
351
|
+
return { ...a, displayValue: u, sizeClass: i, placeholderText: t, onInput: y, onKeydown: w, onChange: g };
|
|
352
352
|
}
|
|
353
|
-
}),
|
|
353
|
+
}), et = {
|
|
354
354
|
class: "input-group",
|
|
355
355
|
dir: "ltr"
|
|
356
|
-
},
|
|
357
|
-
function
|
|
358
|
-
return
|
|
359
|
-
|
|
356
|
+
}, nt = ["id"], tt = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
|
|
357
|
+
function lt(e, n, a, l, u, i) {
|
|
358
|
+
return m(), v("div", et, [
|
|
359
|
+
h("span", {
|
|
360
360
|
class: "input-group-text",
|
|
361
361
|
id: e.inputId + "prefix"
|
|
362
362
|
}, [
|
|
363
363
|
L(e.$slots, "default", {}, () => [
|
|
364
364
|
n[5] || (n[5] = x(" IR "))
|
|
365
365
|
])
|
|
366
|
-
], 8,
|
|
367
|
-
|
|
366
|
+
], 8, nt),
|
|
367
|
+
h("input", {
|
|
368
368
|
name: e.name,
|
|
369
369
|
id: e.inputId,
|
|
370
370
|
value: e.displayValue,
|
|
@@ -383,14 +383,82 @@ function nt(e, n, a, l, u, i) {
|
|
|
383
383
|
onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
|
|
384
384
|
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
385
385
|
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
386
|
-
}, null, 42,
|
|
386
|
+
}, null, 42, tt)
|
|
387
387
|
]);
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const at = /* @__PURE__ */ R(_n, [["render", lt]]), ot = 16;
|
|
390
|
+
function Xe(e) {
|
|
391
|
+
return ke(e).replace(/\D/g, "").slice(0, ot);
|
|
392
|
+
}
|
|
393
|
+
function ln(e) {
|
|
394
|
+
return (e.match(/.{1,4}/g) ?? []).join(" ");
|
|
395
|
+
}
|
|
396
|
+
const rt = F({
|
|
397
|
+
name: "CreditCardInput",
|
|
398
|
+
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
399
|
+
props: {
|
|
400
|
+
...z,
|
|
401
|
+
placeholder: { type: String, default: null },
|
|
402
|
+
inputClass: { type: [String, Array, Object], default: null },
|
|
403
|
+
size: { type: String, default: null }
|
|
404
|
+
},
|
|
405
|
+
setup(e, { emit: n }) {
|
|
406
|
+
const a = P(e, n), l = S(() => Xe(a.model.value ?? "")), u = S(() => ln(l.value)), i = S(() => e.size ? `form-control-${e.size}` : null);
|
|
407
|
+
function t(g, p) {
|
|
408
|
+
if (p === 0) return 0;
|
|
409
|
+
let $ = 0;
|
|
410
|
+
for (let k = 0; k < g.length; k++)
|
|
411
|
+
if (/\d/.test(g[k]) && ++$ === p) return k + 1;
|
|
412
|
+
return g.length;
|
|
413
|
+
}
|
|
414
|
+
function d(g) {
|
|
415
|
+
const p = g.target, $ = p.selectionStart ?? p.value.length, k = Xe(p.value.slice(0, $)).length, o = Xe(p.value), r = ln(o);
|
|
416
|
+
if (a.model.value = o, p.value = r, document.activeElement === p) {
|
|
417
|
+
const s = t(r, k);
|
|
418
|
+
X(() => p.setSelectionRange(s, s));
|
|
419
|
+
}
|
|
420
|
+
n("input", o, g);
|
|
421
|
+
}
|
|
422
|
+
function y(g) {
|
|
423
|
+
if (g.key !== "Backspace") return;
|
|
424
|
+
const p = g.target;
|
|
425
|
+
if (p.selectionStart !== p.selectionEnd) return;
|
|
426
|
+
const $ = p.selectionStart ?? 0;
|
|
427
|
+
$ > 0 && p.value[$ - 1] === " " && p.setSelectionRange($ - 1, $ - 1);
|
|
428
|
+
}
|
|
429
|
+
function w(g) {
|
|
430
|
+
a.emitChange(l.value, g);
|
|
431
|
+
}
|
|
432
|
+
return { ...a, displayValue: u, sizeClass: i, onInput: d, onKeydown: y, onChange: w };
|
|
433
|
+
}
|
|
434
|
+
}), st = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
|
|
435
|
+
function it(e, n, a, l, u, i) {
|
|
436
|
+
return m(), v("input", {
|
|
437
|
+
name: e.name,
|
|
438
|
+
id: e.inputId,
|
|
439
|
+
value: e.displayValue,
|
|
440
|
+
placeholder: e.placeholder ?? "0000 0000 0000 0000",
|
|
441
|
+
required: e.required,
|
|
442
|
+
readonly: e.readonly,
|
|
443
|
+
disabled: e.isDisabled,
|
|
444
|
+
"aria-invalid": e.isInvalid || void 0,
|
|
445
|
+
type: "text",
|
|
446
|
+
inputmode: "numeric",
|
|
447
|
+
autocomplete: "cc-number",
|
|
448
|
+
dir: "ltr",
|
|
449
|
+
class: q(["form-control text-start", [e.sizeClass, e.inputClass, { "is-invalid": e.isInvalid }]]),
|
|
450
|
+
onInput: n[0] || (n[0] = (...t) => e.onInput && e.onInput(...t)),
|
|
451
|
+
onKeydown: n[1] || (n[1] = (...t) => e.onKeydown && e.onKeydown(...t)),
|
|
452
|
+
onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
|
|
453
|
+
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
454
|
+
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
455
|
+
}, null, 42, st);
|
|
456
|
+
}
|
|
457
|
+
const ut = /* @__PURE__ */ R(rt, [["render", it]]), dt = F({
|
|
390
458
|
name: "CheckboxToggle",
|
|
391
459
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
392
460
|
props: {
|
|
393
|
-
...
|
|
461
|
+
...z,
|
|
394
462
|
type: { type: String, default: "checkbox", validator: (e) => ["checkbox", "radio"].includes(e) },
|
|
395
463
|
value: { type: [String, Number, Boolean, Object], default: "yes" },
|
|
396
464
|
trueValue: { type: null, default: !0 },
|
|
@@ -402,13 +470,13 @@ const zo = /* @__PURE__ */ R(Yn, [["render", nt]]), tt = F({
|
|
|
402
470
|
formFieldCard: { type: Boolean, default: !0 }
|
|
403
471
|
},
|
|
404
472
|
setup(e, { emit: n }) {
|
|
405
|
-
const a = E(null), l =
|
|
473
|
+
const a = E(null), l = P(e, n, { valued: () => e.value });
|
|
406
474
|
return je(e, l, a), { ...l, input: a, onChange: (u) => l.emitChange(l.model.value, u) };
|
|
407
475
|
},
|
|
408
476
|
expose: ["input"]
|
|
409
|
-
}),
|
|
410
|
-
function
|
|
411
|
-
return
|
|
477
|
+
}), ct = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], ft = ["for"];
|
|
478
|
+
function pt(e, n, a, l, u, i) {
|
|
479
|
+
return m(), v("div", {
|
|
412
480
|
class: q({
|
|
413
481
|
"form-field": e.formField,
|
|
414
482
|
"form-field-card": e.formFieldCard,
|
|
@@ -416,7 +484,7 @@ function ot(e, n, a, l, u, i) {
|
|
|
416
484
|
disabled: e.isDisabled || e.readonly
|
|
417
485
|
})
|
|
418
486
|
}, [
|
|
419
|
-
re(
|
|
487
|
+
re(h("input", {
|
|
420
488
|
ref: "input",
|
|
421
489
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
|
|
422
490
|
name: e.name,
|
|
@@ -433,15 +501,15 @@ function ot(e, n, a, l, u, i) {
|
|
|
433
501
|
onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
|
|
434
502
|
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
435
503
|
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
436
|
-
}, null, 42,
|
|
504
|
+
}, null, 42, ct), [
|
|
437
505
|
[Se, e.model]
|
|
438
506
|
]),
|
|
439
|
-
|
|
507
|
+
h("label", { for: e.inputId }, [
|
|
440
508
|
L(e.$slots, "default")
|
|
441
|
-
], 8,
|
|
509
|
+
], 8, ft)
|
|
442
510
|
], 2);
|
|
443
511
|
}
|
|
444
|
-
const
|
|
512
|
+
const mt = /* @__PURE__ */ R(dt, [["render", pt]]), Je = {}, $e = /* @__PURE__ */ new Map(), an = {
|
|
445
513
|
Combobox: () => import("bootstrap/js/dist/combobox.js"),
|
|
446
514
|
Menu: () => import("bootstrap/js/dist/menu.js"),
|
|
447
515
|
Strength: () => import("bootstrap/js/dist/strength.js"),
|
|
@@ -449,31 +517,31 @@ const rt = /* @__PURE__ */ R(tt, [["render", ot]]), Qe = {}, $e = /* @__PURE__ *
|
|
|
449
517
|
OtpInput: () => import("bootstrap/js/dist/otp-input.js"),
|
|
450
518
|
Range: () => import("bootstrap/js/dist/range.js")
|
|
451
519
|
};
|
|
452
|
-
function
|
|
453
|
-
Object.assign(
|
|
520
|
+
function ht(e = {}) {
|
|
521
|
+
Object.assign(Je, e), $e.clear();
|
|
454
522
|
}
|
|
455
|
-
function
|
|
456
|
-
return
|
|
523
|
+
function vt(e) {
|
|
524
|
+
return Je[e] ? Promise.resolve(Je[e]) : an[e] ? ($e.has(e) || $e.set(
|
|
457
525
|
e,
|
|
458
|
-
|
|
526
|
+
an[e]().then((n) => n.default ?? n[e]).catch((n) => {
|
|
459
527
|
throw $e.delete(e), n;
|
|
460
528
|
})
|
|
461
529
|
), $e.get(e)) : Promise.reject(new Error(`[inertia-bootstrap-forms] Unknown Bootstrap plugin "${e}"`));
|
|
462
530
|
}
|
|
463
531
|
function he(e, n, a, l = {}) {
|
|
464
|
-
const u =
|
|
532
|
+
const u = Sn(null);
|
|
465
533
|
let i = 0, t = !1, d = null;
|
|
466
|
-
function
|
|
467
|
-
var
|
|
534
|
+
function y() {
|
|
535
|
+
var p;
|
|
468
536
|
i++;
|
|
469
|
-
const
|
|
470
|
-
if (u.value = null,
|
|
537
|
+
const g = u.value;
|
|
538
|
+
if (u.value = null, g) {
|
|
471
539
|
try {
|
|
472
|
-
(
|
|
540
|
+
(p = l.onDestroy) == null || p.call(l, g, d);
|
|
473
541
|
} catch {
|
|
474
542
|
}
|
|
475
543
|
try {
|
|
476
|
-
|
|
544
|
+
g.dispose();
|
|
477
545
|
} catch {
|
|
478
546
|
}
|
|
479
547
|
}
|
|
@@ -481,28 +549,28 @@ function he(e, n, a, l = {}) {
|
|
|
481
549
|
}
|
|
482
550
|
async function w() {
|
|
483
551
|
var o, r, s;
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
if (t ||
|
|
552
|
+
y();
|
|
553
|
+
const g = i, p = await vt(e);
|
|
554
|
+
if (t || g !== i) return null;
|
|
487
555
|
const $ = n();
|
|
488
556
|
if (!$) return null;
|
|
489
|
-
(r = (o =
|
|
490
|
-
const
|
|
491
|
-
return u.value =
|
|
557
|
+
(r = (o = p.getInstance) == null ? void 0 : o.call(p, $)) == null || r.dispose(), d = $;
|
|
558
|
+
const k = new p($, a());
|
|
559
|
+
return u.value = k, (s = l.onCreate) == null || s.call(l, k, $), k;
|
|
492
560
|
}
|
|
493
561
|
return J(() => {
|
|
494
|
-
t = !1, w().catch((
|
|
495
|
-
console.error(`[inertia-bootstrap-forms] Could not start Bootstrap ${e}.`,
|
|
562
|
+
t = !1, w().catch((g) => {
|
|
563
|
+
console.error(`[inertia-bootstrap-forms] Could not start Bootstrap ${e}.`, g);
|
|
496
564
|
});
|
|
497
|
-
}),
|
|
498
|
-
t = !0,
|
|
499
|
-
}), { instance: u, create: w, destroy:
|
|
565
|
+
}), pn(() => {
|
|
566
|
+
t = !0, y();
|
|
567
|
+
}), { instance: u, create: w, destroy: y };
|
|
500
568
|
}
|
|
501
|
-
const
|
|
569
|
+
const on = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), gt = F({
|
|
502
570
|
name: "ChipsInput",
|
|
503
571
|
emits: ["update:modelValue", "change", "add", "remove", "select", "rejected", "focus", "blur"],
|
|
504
572
|
props: {
|
|
505
|
-
...
|
|
573
|
+
...z,
|
|
506
574
|
placeholder: { type: String, default: null },
|
|
507
575
|
/** Character that splits typed / pasted text into chips. Use null to disable. */
|
|
508
576
|
separator: { type: String, default: "," },
|
|
@@ -518,14 +586,14 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
|
|
|
518
586
|
locale: { type: String, default: null }
|
|
519
587
|
},
|
|
520
588
|
setup(e, { emit: n, expose: a }) {
|
|
521
|
-
const l =
|
|
522
|
-
let d = !1,
|
|
589
|
+
const l = P(e, n), { t: u } = Q(() => e.locale), i = E(null), t = E(null);
|
|
590
|
+
let d = !1, y = [];
|
|
523
591
|
const w = (o) => Array.isArray(o) ? o.map(String) : typeof o == "string" && o !== "" ? e.separator ? o.split(e.separator).map((r) => r.trim()).filter(Boolean) : [o] : [];
|
|
524
|
-
function
|
|
592
|
+
function g() {
|
|
525
593
|
const o = $.value;
|
|
526
594
|
if (!o) return;
|
|
527
595
|
const r = w(l.model.value);
|
|
528
|
-
if (
|
|
596
|
+
if (on(o.getValues(), r)) return;
|
|
529
597
|
d = !0;
|
|
530
598
|
try {
|
|
531
599
|
o.clear(), r.forEach((c) => o.add(c));
|
|
@@ -533,9 +601,9 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
|
|
|
533
601
|
d = !1;
|
|
534
602
|
}
|
|
535
603
|
const s = o.getValues();
|
|
536
|
-
!
|
|
604
|
+
!on(s, r) && Array.isArray(l.model.value) && (l.model.value = s);
|
|
537
605
|
}
|
|
538
|
-
const
|
|
606
|
+
const p = () => e.readonly || l.isDisabled.value, { instance: $, create: k } = he(
|
|
539
607
|
"Chips",
|
|
540
608
|
() => i.value,
|
|
541
609
|
() => {
|
|
@@ -543,7 +611,7 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
|
|
|
543
611
|
separator: e.separator,
|
|
544
612
|
allowDuplicates: e.allowDuplicates,
|
|
545
613
|
maxChips: e.maxChips,
|
|
546
|
-
dismissible: e.dismissible && !
|
|
614
|
+
dismissible: e.dismissible && !p(),
|
|
547
615
|
createOnBlur: e.createOnBlur,
|
|
548
616
|
placeholder: e.placeholder ?? u("chips.placeholder")
|
|
549
617
|
};
|
|
@@ -551,8 +619,8 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
|
|
|
551
619
|
},
|
|
552
620
|
{
|
|
553
621
|
onCreate(o, r) {
|
|
554
|
-
const s = (c,
|
|
555
|
-
r.addEventListener(c,
|
|
622
|
+
const s = (c, C) => {
|
|
623
|
+
r.addEventListener(c, C), y.push(() => r.removeEventListener(c, C));
|
|
556
624
|
};
|
|
557
625
|
s("add.bs.chips", (c) => {
|
|
558
626
|
if (!d) {
|
|
@@ -564,17 +632,17 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
|
|
|
564
632
|
}
|
|
565
633
|
}), s("remove.bs.chips", (c) => !d && n("remove", c.value)), s("select.bs.chips", (c) => n("select", c.selected)), s("change.bs.chips", (c) => {
|
|
566
634
|
d || (l.model.value = c.values, l.emitChange(c.values, c));
|
|
567
|
-
}),
|
|
635
|
+
}), g();
|
|
568
636
|
},
|
|
569
637
|
onDestroy() {
|
|
570
|
-
|
|
638
|
+
y.forEach((o) => o()), y = [];
|
|
571
639
|
}
|
|
572
640
|
}
|
|
573
641
|
);
|
|
574
|
-
return
|
|
642
|
+
return U(() => l.model.value, g, { deep: !0 }), U(
|
|
575
643
|
() => [e.separator, e.allowDuplicates, e.maxChips, e.dismissible, e.createOnBlur, e.dismissIcon, e.readonly, l.isDisabled.value],
|
|
576
644
|
async () => {
|
|
577
|
-
await
|
|
645
|
+
await X(), k();
|
|
578
646
|
}
|
|
579
647
|
), a({
|
|
580
648
|
add: (o) => {
|
|
@@ -593,16 +661,16 @@ const ln = (e, n) => e.length === n.length && e.every((a, l) => a === n[l]), ut
|
|
|
593
661
|
var o;
|
|
594
662
|
return (o = t.value) == null ? void 0 : o.focus();
|
|
595
663
|
}
|
|
596
|
-
}), { ...l, t: u, el: i, ghost: t, locked:
|
|
664
|
+
}), { ...l, t: u, el: i, ghost: t, locked: p };
|
|
597
665
|
}
|
|
598
|
-
}),
|
|
599
|
-
function
|
|
600
|
-
return
|
|
666
|
+
}), yt = ["aria-disabled"], bt = ["id", "placeholder", "disabled", "readonly", "aria-invalid"];
|
|
667
|
+
function $t(e, n, a, l, u, i) {
|
|
668
|
+
return m(), v("div", {
|
|
601
669
|
ref: "el",
|
|
602
670
|
class: "chip-input",
|
|
603
671
|
"aria-disabled": e.isDisabled || void 0
|
|
604
672
|
}, [
|
|
605
|
-
|
|
673
|
+
h("input", {
|
|
606
674
|
ref: "ghost",
|
|
607
675
|
type: "text",
|
|
608
676
|
class: q(["form-ghost", { "is-invalid": e.isInvalid }]),
|
|
@@ -614,16 +682,16 @@ function ft(e, n, a, l, u, i) {
|
|
|
614
682
|
autocomplete: "off",
|
|
615
683
|
onFocus: n[0] || (n[0] = (t) => e.$emit("focus", t)),
|
|
616
684
|
onBlur: n[1] || (n[1] = (t) => e.$emit("blur", t))
|
|
617
|
-
}, null, 42,
|
|
618
|
-
], 8,
|
|
685
|
+
}, null, 42, bt)
|
|
686
|
+
], 8, yt);
|
|
619
687
|
}
|
|
620
|
-
const
|
|
621
|
-
function
|
|
688
|
+
const wt = /* @__PURE__ */ R(gt, [["render", $t]]), pe = (e) => e !== null && typeof e == "object", rn = (e) => e == null || e === "";
|
|
689
|
+
function St() {
|
|
622
690
|
if (typeof document > "u") return null;
|
|
623
691
|
const e = document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/);
|
|
624
692
|
return e ? decodeURIComponent(e[1]) : null;
|
|
625
693
|
}
|
|
626
|
-
const
|
|
694
|
+
const kt = F({
|
|
627
695
|
name: "ComboboxInput",
|
|
628
696
|
emits: [
|
|
629
697
|
"update:modelValue",
|
|
@@ -639,7 +707,7 @@ const ht = F({
|
|
|
639
707
|
"hidden"
|
|
640
708
|
],
|
|
641
709
|
props: {
|
|
642
|
-
...
|
|
710
|
+
...z,
|
|
643
711
|
/** Strings, numbers or objects ({ id | value, name | label, description, disabled }). */
|
|
644
712
|
options: { type: Array, default: () => [] },
|
|
645
713
|
/** Property that holds the value of an option object (default: id → value → name → label). */
|
|
@@ -684,141 +752,141 @@ const ht = F({
|
|
|
684
752
|
locale: { type: String, default: null }
|
|
685
753
|
},
|
|
686
754
|
setup(e, { emit: n, expose: a, slots: l }) {
|
|
687
|
-
const u =
|
|
688
|
-
var
|
|
689
|
-
return ((
|
|
690
|
-
}), s = S(() => e.searchEnabled || !!r.value), c = (
|
|
691
|
-
if (!pe(
|
|
692
|
-
const
|
|
693
|
-
return (
|
|
694
|
-
}, j = (
|
|
695
|
-
function
|
|
696
|
-
const
|
|
697
|
-
(
|
|
698
|
-
|
|
699
|
-
}),
|
|
700
|
-
}
|
|
701
|
-
|
|
755
|
+
const u = P(e, n), { t: i, locale: t } = Q(() => e.locale), d = Le(), y = E(null), w = E(null), g = E(null), p = E(null), $ = E(null), k = E({}), o = ie({ results: null, loading: !1, error: !1 }), r = S(() => {
|
|
756
|
+
var b;
|
|
757
|
+
return ((b = e.search) == null ? void 0 : b.url) || null;
|
|
758
|
+
}), s = S(() => e.searchEnabled || !!r.value), c = (b) => pe(b) ? e.valueKey ? b[e.valueKey] : b.id ?? b.value ?? b.name ?? b.label : b, C = (b) => {
|
|
759
|
+
if (!pe(b)) return b;
|
|
760
|
+
const I = e.labelKey || e.label;
|
|
761
|
+
return (I ? b[I] : b.name ?? b.label ?? b.title ?? b.value) ?? c(b);
|
|
762
|
+
}, j = (b) => pe(b) ? b[e.descriptionKey] ?? null : null, A = (b) => String(c(b));
|
|
763
|
+
function H(b) {
|
|
764
|
+
const I = { ...k.value };
|
|
765
|
+
(b || []).forEach((N) => {
|
|
766
|
+
I[A(N)] = N;
|
|
767
|
+
}), k.value = I;
|
|
768
|
+
}
|
|
769
|
+
U(() => e.options, (b) => H(b), { immediate: !0, deep: !0 });
|
|
702
770
|
const ee = S(() => {
|
|
703
|
-
const
|
|
704
|
-
return e.multiple ? Array.isArray(
|
|
705
|
-
}),
|
|
706
|
-
const
|
|
707
|
-
return
|
|
708
|
-
},
|
|
709
|
-
() =>
|
|
710
|
-
const
|
|
771
|
+
const b = u.model.value;
|
|
772
|
+
return e.multiple ? Array.isArray(b) ? b : pe(b) ? Object.values(b) : rn(b) ? [] : [b] : rn(b) ? [] : [b];
|
|
773
|
+
}), K = S(() => ee.value.map((b) => pe(b) ? A(b) : String(b))), Ie = (b) => {
|
|
774
|
+
const I = k.value[b];
|
|
775
|
+
return I !== void 0 ? String(C(I)) : b;
|
|
776
|
+
}, Ce = S(
|
|
777
|
+
() => K.value.map((b) => {
|
|
778
|
+
const I = k.value[b];
|
|
711
779
|
return {
|
|
712
|
-
key:
|
|
713
|
-
raw:
|
|
714
|
-
label:
|
|
715
|
-
description:
|
|
780
|
+
key: b,
|
|
781
|
+
raw: I,
|
|
782
|
+
label: I !== void 0 ? String(C(I)) : b,
|
|
783
|
+
description: I !== void 0 ? j(I) : null
|
|
716
784
|
};
|
|
717
785
|
})
|
|
718
|
-
),
|
|
719
|
-
() => e.multiple && e.showSelected &&
|
|
720
|
-
),
|
|
721
|
-
() => !!l.selection &&
|
|
722
|
-
),
|
|
723
|
-
const
|
|
724
|
-
return
|
|
725
|
-
}), ge = S(() =>
|
|
726
|
-
let
|
|
786
|
+
), Te = S(() => e.selectedSeparator ?? (t.value === "fa" ? "، " : ", ")), ve = S(
|
|
787
|
+
() => e.multiple && e.showSelected && K.value.length > 1 && (e.maxVisible === null || K.value.length <= e.maxVisible)
|
|
788
|
+
), Me = S(
|
|
789
|
+
() => !!l.selection && K.value.length > 0 && (!e.multiple || K.value.length === 1 || ve.value)
|
|
790
|
+
), Be = S(() => {
|
|
791
|
+
const b = K.value;
|
|
792
|
+
return b.length ? e.multiple && b.length > 1 ? ve.value ? Ce.value.map((I) => I.label).join(Te.value) : (e.selectedText ?? i("select.selectedCount")).replace("{count}", b.length) : Ie(b[0]) : e.placeholder ?? i("select.placeholder");
|
|
793
|
+
}), ge = S(() => Me.value ? "" : Be.value), Ee = S(() => K.value.length === 0), ye = S(() => {
|
|
794
|
+
let b = o.results ?? e.options;
|
|
727
795
|
if (o.results && e.multiple) {
|
|
728
|
-
const
|
|
729
|
-
|
|
796
|
+
const I = new Set(b.map(A));
|
|
797
|
+
b = [...K.value.filter((f) => !I.has(f) && k.value[f] !== void 0).map((f) => k.value[f]), ...b];
|
|
730
798
|
}
|
|
731
|
-
return
|
|
732
|
-
raw:
|
|
733
|
-
key: A(
|
|
734
|
-
label: I
|
|
735
|
-
description: j(
|
|
736
|
-
disabled: pe(
|
|
799
|
+
return b.map((I) => ({
|
|
800
|
+
raw: I,
|
|
801
|
+
key: A(I),
|
|
802
|
+
label: C(I),
|
|
803
|
+
description: j(I),
|
|
804
|
+
disabled: pe(I) && !!I.disabled
|
|
737
805
|
}));
|
|
738
806
|
});
|
|
739
807
|
function Z() {
|
|
740
|
-
if (!
|
|
741
|
-
const
|
|
742
|
-
|
|
743
|
-
const N =
|
|
744
|
-
|
|
808
|
+
if (!g.value) return;
|
|
809
|
+
const b = new Set(K.value);
|
|
810
|
+
g.value.querySelectorAll(".menu-item[data-bs-value]").forEach((I) => {
|
|
811
|
+
const N = b.has(I.dataset.bsValue) && I.dataset.bsValue !== "";
|
|
812
|
+
I.classList.toggle("selected", N), I.setAttribute("aria-selected", N ? "true" : "false");
|
|
745
813
|
});
|
|
746
814
|
}
|
|
747
815
|
function ue() {
|
|
748
|
-
|
|
816
|
+
p.value && (p.value.textContent = ge.value, p.value.classList.toggle("combobox-placeholder", Ee.value));
|
|
749
817
|
}
|
|
750
818
|
function Pe() {
|
|
751
|
-
var
|
|
752
|
-
(
|
|
819
|
+
var b;
|
|
820
|
+
(b = w.value) == null || b.classList.toggle("is-invalid", u.isInvalid.value);
|
|
753
821
|
}
|
|
754
822
|
function ne() {
|
|
755
823
|
Z(), ue(), Pe();
|
|
756
824
|
}
|
|
757
|
-
|
|
758
|
-
function te(
|
|
759
|
-
const
|
|
760
|
-
return
|
|
825
|
+
U([() => u.model.value, ye, ge, u.isInvalid], () => X(ne), { flush: "post" });
|
|
826
|
+
function te(b) {
|
|
827
|
+
const I = k.value[b];
|
|
828
|
+
return I !== void 0 ? c(I) : b;
|
|
761
829
|
}
|
|
762
|
-
function be(
|
|
763
|
-
let
|
|
830
|
+
function be(b) {
|
|
831
|
+
let I, N;
|
|
764
832
|
if (e.multiple) {
|
|
765
|
-
const f =
|
|
766
|
-
|
|
767
|
-
} else
|
|
768
|
-
u.model.value =
|
|
833
|
+
const f = b.value || [];
|
|
834
|
+
I = f.map(te), N = f.map((O) => k.value[O]);
|
|
835
|
+
} else b.value === "" || b.value === void 0 ? (I = null, N = null) : (I = te(b.value), N = k.value[b.value]);
|
|
836
|
+
u.model.value = I, I === null && n("clear"), n("selected", N), u.emitChange(I, b), X(ne), ue();
|
|
769
837
|
}
|
|
770
|
-
let de = null,
|
|
838
|
+
let de = null, G = null;
|
|
771
839
|
d.add(() => {
|
|
772
|
-
clearTimeout(de),
|
|
840
|
+
clearTimeout(de), G == null || G.abort();
|
|
773
841
|
});
|
|
774
842
|
function ce() {
|
|
775
|
-
var
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
}), (
|
|
779
|
-
}
|
|
780
|
-
async function
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
|
|
843
|
+
var b;
|
|
844
|
+
g.value && (g.value.querySelectorAll(".menu-item[data-bs-value]").forEach((I) => {
|
|
845
|
+
I.style.display = "";
|
|
846
|
+
}), (b = g.value.querySelector(".combobox-no-results")) == null || b.classList.toggle("d-none", ye.value.length > 0));
|
|
847
|
+
}
|
|
848
|
+
async function Ke(b) {
|
|
849
|
+
const I = e.search || {};
|
|
850
|
+
if (I.url) {
|
|
851
|
+
G == null || G.abort(), G = new AbortController(), o.loading = !0, o.error = !1;
|
|
784
852
|
try {
|
|
785
|
-
const N = new URL(
|
|
786
|
-
N.searchParams.set(
|
|
853
|
+
const N = new URL(I.url, window.location.origin);
|
|
854
|
+
N.searchParams.set(I.param || "query", b);
|
|
787
855
|
const f = {
|
|
788
856
|
Accept: "application/json",
|
|
789
857
|
"X-Requested-With": "XMLHttpRequest",
|
|
790
|
-
...
|
|
791
|
-
}, O =
|
|
858
|
+
...I.headers || {}
|
|
859
|
+
}, O = St();
|
|
792
860
|
O && !f["X-XSRF-TOKEN"] && (f["X-XSRF-TOKEN"] = O);
|
|
793
|
-
const
|
|
794
|
-
method: (
|
|
861
|
+
const T = await fetch(N, {
|
|
862
|
+
method: (I.method || "POST").toUpperCase(),
|
|
795
863
|
headers: f,
|
|
796
864
|
credentials: "same-origin",
|
|
797
|
-
signal:
|
|
865
|
+
signal: G.signal
|
|
798
866
|
});
|
|
799
|
-
if (!
|
|
800
|
-
const B = await
|
|
801
|
-
|
|
867
|
+
if (!T.ok) throw new Error(`HTTP ${T.status}`);
|
|
868
|
+
const B = await T.json(), D = Array.isArray(B) ? B : (B == null ? void 0 : B[I.resultsKey || "data"]) ?? (B == null ? void 0 : B.results) ?? [];
|
|
869
|
+
H(D), o.results = D, o.loading = !1, n("search-success", D), await X(), ce(), ne();
|
|
802
870
|
} catch (N) {
|
|
803
871
|
if ((N == null ? void 0 : N.name) === "AbortError") return;
|
|
804
|
-
o.loading = !1, o.error = !0, o.results = [], n("search-error", N), await
|
|
872
|
+
o.loading = !1, o.error = !0, o.results = [], n("search-error", N), await X(), ce();
|
|
805
873
|
}
|
|
806
874
|
}
|
|
807
875
|
}
|
|
808
|
-
function
|
|
876
|
+
function Ae(b) {
|
|
809
877
|
var f, O;
|
|
810
|
-
const
|
|
811
|
-
if (n("search",
|
|
878
|
+
const I = b.target.value;
|
|
879
|
+
if (n("search", I), !r.value) return;
|
|
812
880
|
clearTimeout(de);
|
|
813
881
|
const N = ((f = e.search) == null ? void 0 : f.minChars) ?? 0;
|
|
814
|
-
if (
|
|
815
|
-
|
|
882
|
+
if (I.length < N) {
|
|
883
|
+
G == null || G.abort(), o.results = null, o.loading = !1;
|
|
816
884
|
return;
|
|
817
885
|
}
|
|
818
|
-
o.loading = !0, de = setTimeout(() =>
|
|
886
|
+
o.loading = !0, de = setTimeout(() => Ke(I), ((O = e.search) == null ? void 0 : O.debounce) ?? 400);
|
|
819
887
|
}
|
|
820
888
|
let _ = [];
|
|
821
|
-
const { instance: fe, create:
|
|
889
|
+
const { instance: fe, create: Oe } = he(
|
|
822
890
|
"Combobox",
|
|
823
891
|
() => w.value,
|
|
824
892
|
() => ({
|
|
@@ -829,74 +897,74 @@ const ht = F({
|
|
|
829
897
|
searchNormalize: e.searchNormalize
|
|
830
898
|
}),
|
|
831
899
|
{
|
|
832
|
-
onCreate(
|
|
833
|
-
const N = (f, O,
|
|
834
|
-
f.addEventListener(O,
|
|
900
|
+
onCreate(b, I) {
|
|
901
|
+
const N = (f, O, T) => {
|
|
902
|
+
f.addEventListener(O, T), _.push(() => f.removeEventListener(O, T));
|
|
835
903
|
};
|
|
836
|
-
N(
|
|
837
|
-
o.results !== null && (o.results = null, o.error = !1,
|
|
904
|
+
N(I, "change.bs.combobox", be), N(I, "show.bs.combobox", (f) => n("show", f)), N(I, "shown.bs.combobox", (f) => n("shown", f)), N(I, "hide.bs.combobox", (f) => n("hide", f)), N(I, "hidden.bs.combobox", (f) => {
|
|
905
|
+
o.results !== null && (o.results = null, o.error = !1, X(() => {
|
|
838
906
|
ce(), ne();
|
|
839
907
|
})), n("hidden", f);
|
|
840
|
-
}), $.value && (N($.value, "input",
|
|
908
|
+
}), $.value && (N($.value, "input", Ae), N($.value, "keydown", (f) => f.key === "Enter" && f.preventDefault())), ne();
|
|
841
909
|
},
|
|
842
910
|
onDestroy() {
|
|
843
|
-
_.forEach((
|
|
911
|
+
_.forEach((b) => b()), _ = [];
|
|
844
912
|
}
|
|
845
913
|
}
|
|
846
914
|
);
|
|
847
|
-
return
|
|
915
|
+
return U(
|
|
848
916
|
() => [e.multiple, s.value, e.placement, e.searchNormalize],
|
|
849
917
|
async () => {
|
|
850
|
-
await
|
|
918
|
+
await X(), Oe();
|
|
851
919
|
}
|
|
852
920
|
), a({
|
|
853
921
|
show: () => {
|
|
854
|
-
var
|
|
855
|
-
return (
|
|
922
|
+
var b;
|
|
923
|
+
return (b = fe.value) == null ? void 0 : b.show();
|
|
856
924
|
},
|
|
857
925
|
hide: () => {
|
|
858
|
-
var
|
|
859
|
-
return (
|
|
926
|
+
var b;
|
|
927
|
+
return (b = fe.value) == null ? void 0 : b.hide();
|
|
860
928
|
},
|
|
861
929
|
toggle: () => {
|
|
862
|
-
var
|
|
863
|
-
return (
|
|
930
|
+
var b;
|
|
931
|
+
return (b = fe.value) == null ? void 0 : b.toggle();
|
|
864
932
|
},
|
|
865
933
|
clear: () => {
|
|
866
934
|
u.model.value = e.multiple ? [] : null, n("clear"), u.emitChange(u.model.value);
|
|
867
935
|
},
|
|
868
936
|
focus: () => {
|
|
869
|
-
var
|
|
870
|
-
return (
|
|
937
|
+
var b;
|
|
938
|
+
return (b = w.value) == null ? void 0 : b.focus();
|
|
871
939
|
}
|
|
872
940
|
}), {
|
|
873
941
|
...u,
|
|
874
942
|
t: i,
|
|
875
|
-
root:
|
|
943
|
+
root: y,
|
|
876
944
|
toggle: w,
|
|
877
|
-
menu:
|
|
878
|
-
valueEl:
|
|
945
|
+
menu: g,
|
|
946
|
+
valueEl: p,
|
|
879
947
|
searchInput: $,
|
|
880
948
|
remote: o,
|
|
881
949
|
hasSearch: s,
|
|
882
950
|
rendered: ye,
|
|
883
|
-
displayText:
|
|
951
|
+
displayText: Be,
|
|
884
952
|
plainText: ge,
|
|
885
|
-
selectedItems:
|
|
886
|
-
customSelection:
|
|
887
|
-
separator:
|
|
888
|
-
selectedSet: S(() => new Set(
|
|
889
|
-
showingPlaceholder:
|
|
953
|
+
selectedItems: Ce,
|
|
954
|
+
customSelection: Me,
|
|
955
|
+
separator: Te,
|
|
956
|
+
selectedSet: S(() => new Set(K.value)),
|
|
957
|
+
showingPlaceholder: Ee,
|
|
890
958
|
sizeClass: S(() => e.size ? `form-control-${e.size}` : null)
|
|
891
959
|
};
|
|
892
960
|
}
|
|
893
|
-
}),
|
|
961
|
+
}), It = {
|
|
894
962
|
ref: "root",
|
|
895
963
|
class: "combobox"
|
|
896
|
-
},
|
|
964
|
+
}, Ct = ["id", "disabled", "aria-invalid", "aria-required"], Tt = {
|
|
897
965
|
key: 0,
|
|
898
966
|
class: "combobox-selection d-flex align-items-center flex-wrap gap-2 text-start"
|
|
899
|
-
},
|
|
967
|
+
}, Mt = ["textContent"], Bt = {
|
|
900
968
|
key: 1,
|
|
901
969
|
class: "combobox-caret",
|
|
902
970
|
width: "16",
|
|
@@ -908,30 +976,30 @@ const ht = F({
|
|
|
908
976
|
"stroke-linecap": "round",
|
|
909
977
|
"stroke-linejoin": "round",
|
|
910
978
|
"aria-hidden": "true"
|
|
911
|
-
},
|
|
979
|
+
}, Et = ["aria-multiselectable"], At = {
|
|
912
980
|
key: 0,
|
|
913
981
|
class: "combobox-search"
|
|
914
|
-
},
|
|
982
|
+
}, Ot = ["placeholder"], Vt = {
|
|
915
983
|
key: 1,
|
|
916
984
|
class: "menu-header",
|
|
917
985
|
role: "status"
|
|
918
|
-
},
|
|
986
|
+
}, Dt = {
|
|
919
987
|
key: 2,
|
|
920
988
|
class: "menu-header",
|
|
921
989
|
role: "alert"
|
|
922
|
-
},
|
|
990
|
+
}, Nt = {
|
|
923
991
|
key: 3,
|
|
924
992
|
type: "button",
|
|
925
993
|
class: "menu-item",
|
|
926
994
|
"data-bs-value": "",
|
|
927
995
|
role: "option"
|
|
928
|
-
},
|
|
996
|
+
}, qt = { class: "menu-item-content" }, Ft = ["data-bs-value", "disabled"], Rt = { class: "menu-item-content" }, Lt = {
|
|
929
997
|
key: 0,
|
|
930
998
|
class: "menu-item-description"
|
|
931
|
-
},
|
|
932
|
-
function
|
|
933
|
-
return
|
|
934
|
-
|
|
999
|
+
}, jt = { class: "combobox-no-results d-none" };
|
|
1000
|
+
function zt(e, n, a, l, u, i) {
|
|
1001
|
+
return m(), v("div", It, [
|
|
1002
|
+
h("button", {
|
|
935
1003
|
ref: "toggle",
|
|
936
1004
|
type: "button",
|
|
937
1005
|
class: q(["combobox-toggle form-control", e.sizeClass]),
|
|
@@ -942,8 +1010,8 @@ function Vt(e, n, a, l, u, i) {
|
|
|
942
1010
|
"aria-invalid": e.isInvalid || void 0,
|
|
943
1011
|
"aria-required": e.required || void 0
|
|
944
1012
|
}, [
|
|
945
|
-
e.customSelection ? (
|
|
946
|
-
(
|
|
1013
|
+
e.customSelection ? (m(), v("span", Tt, [
|
|
1014
|
+
(m(!0), v(W, null, ae(e.selectedItems, (t, d) => L(e.$slots, "selection", {
|
|
947
1015
|
key: t.key,
|
|
948
1016
|
option: t.raw,
|
|
949
1017
|
label: t.label,
|
|
@@ -955,37 +1023,37 @@ function Vt(e, n, a, l, u, i) {
|
|
|
955
1023
|
x(V(t.label), 1)
|
|
956
1024
|
])), 128))
|
|
957
1025
|
])) : M("", !0),
|
|
958
|
-
|
|
1026
|
+
h("span", {
|
|
959
1027
|
ref: "valueEl",
|
|
960
1028
|
class: q(["combobox-value", { "combobox-placeholder": e.showingPlaceholder }]),
|
|
961
1029
|
textContent: V(e.plainText)
|
|
962
|
-
}, null, 10,
|
|
963
|
-
e.hideDropdown ? M("", !0) : (
|
|
964
|
-
|
|
1030
|
+
}, null, 10, Mt),
|
|
1031
|
+
e.hideDropdown ? M("", !0) : (m(), v("svg", Bt, n[0] || (n[0] = [
|
|
1032
|
+
h("path", { d: "m3 6 5 5 5-5" }, null, -1)
|
|
965
1033
|
])))
|
|
966
|
-
], 10,
|
|
967
|
-
|
|
1034
|
+
], 10, Ct),
|
|
1035
|
+
h("div", {
|
|
968
1036
|
ref: "menu",
|
|
969
1037
|
class: "menu",
|
|
970
1038
|
role: "listbox",
|
|
971
1039
|
"aria-multiselectable": e.multiple || void 0
|
|
972
1040
|
}, [
|
|
973
|
-
e.hasSearch ? (
|
|
974
|
-
|
|
1041
|
+
e.hasSearch ? (m(), v("div", At, [
|
|
1042
|
+
h("input", {
|
|
975
1043
|
ref: "searchInput",
|
|
976
1044
|
type: "search",
|
|
977
1045
|
class: "form-control combobox-search-input",
|
|
978
1046
|
autocomplete: "off",
|
|
979
1047
|
placeholder: e.searchPlaceholder ?? e.t("select.search")
|
|
980
|
-
}, null, 8,
|
|
1048
|
+
}, null, 8, Ot)
|
|
981
1049
|
])) : M("", !0),
|
|
982
|
-
e.remote.loading ? (
|
|
983
|
-
e.clearable && !e.multiple ? (
|
|
984
|
-
|
|
985
|
-
|
|
1050
|
+
e.remote.loading ? (m(), v("div", Vt, V(e.loadingText ?? e.t("select.loading")), 1)) : e.remote.error ? (m(), v("div", Dt, V(e.t("select.error")), 1)) : M("", !0),
|
|
1051
|
+
e.clearable && !e.multiple ? (m(), v("button", Nt, [
|
|
1052
|
+
h("span", qt, [
|
|
1053
|
+
h("span", null, V(e.clearText ?? e.t("select.clear")), 1)
|
|
986
1054
|
])
|
|
987
1055
|
])) : M("", !0),
|
|
988
|
-
(
|
|
1056
|
+
(m(!0), v(W, null, ae(e.rendered, (t) => (m(), v("button", {
|
|
989
1057
|
key: t.key,
|
|
990
1058
|
type: "button",
|
|
991
1059
|
class: "menu-item",
|
|
@@ -993,7 +1061,7 @@ function Vt(e, n, a, l, u, i) {
|
|
|
993
1061
|
"data-bs-value": t.key,
|
|
994
1062
|
disabled: t.disabled || void 0
|
|
995
1063
|
}, [
|
|
996
|
-
|
|
1064
|
+
h("span", Rt, [
|
|
997
1065
|
L(e.$slots, "option", {
|
|
998
1066
|
option: t.raw,
|
|
999
1067
|
label: t.label,
|
|
@@ -1002,11 +1070,11 @@ function Vt(e, n, a, l, u, i) {
|
|
|
1002
1070
|
selected: e.selectedSet.has(t.key),
|
|
1003
1071
|
disabled: t.disabled
|
|
1004
1072
|
}, () => [
|
|
1005
|
-
|
|
1006
|
-
t.description ? (
|
|
1073
|
+
h("span", null, V(t.label), 1),
|
|
1074
|
+
t.description ? (m(), v("span", Lt, V(t.description), 1)) : M("", !0)
|
|
1007
1075
|
])
|
|
1008
1076
|
]),
|
|
1009
|
-
n[1] || (n[1] =
|
|
1077
|
+
n[1] || (n[1] = h("svg", {
|
|
1010
1078
|
class: "menu-item-check",
|
|
1011
1079
|
width: "16",
|
|
1012
1080
|
height: "16",
|
|
@@ -1018,30 +1086,30 @@ function Vt(e, n, a, l, u, i) {
|
|
|
1018
1086
|
"stroke-linejoin": "round",
|
|
1019
1087
|
"aria-hidden": "true"
|
|
1020
1088
|
}, [
|
|
1021
|
-
|
|
1089
|
+
h("path", { d: "m3.5 8.5 3 3 6-7" })
|
|
1022
1090
|
], -1))
|
|
1023
|
-
], 8,
|
|
1024
|
-
|
|
1025
|
-
], 8,
|
|
1091
|
+
], 8, Ft))), 128)),
|
|
1092
|
+
h("div", jt, V(e.noResultsText ?? e.t("select.noResults")), 1)
|
|
1093
|
+
], 8, Et)
|
|
1026
1094
|
], 512);
|
|
1027
1095
|
}
|
|
1028
|
-
const
|
|
1096
|
+
const hn = /* @__PURE__ */ R(kt, [["render", zt]]), Pt = F({
|
|
1029
1097
|
name: "TextInput",
|
|
1030
1098
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
1031
1099
|
props: {
|
|
1032
|
-
...
|
|
1100
|
+
...z,
|
|
1033
1101
|
type: { type: String, default: "text" },
|
|
1034
1102
|
placeholder: { type: String, default: null },
|
|
1035
1103
|
/** sm | lg */
|
|
1036
1104
|
size: { type: String, default: null }
|
|
1037
1105
|
},
|
|
1038
1106
|
setup(e, { emit: n }) {
|
|
1039
|
-
const a =
|
|
1107
|
+
const a = P(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
|
|
1040
1108
|
return { ...a, sizeClass: l, emit: n };
|
|
1041
1109
|
}
|
|
1042
|
-
}),
|
|
1043
|
-
function
|
|
1044
|
-
return re((
|
|
1110
|
+
}), Kt = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
|
|
1111
|
+
function Ut(e, n, a, l, u, i) {
|
|
1112
|
+
return re((m(), v("input", {
|
|
1045
1113
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
|
|
1046
1114
|
name: e.name,
|
|
1047
1115
|
id: e.inputId,
|
|
@@ -1056,11 +1124,11 @@ function qt(e, n, a, l, u, i) {
|
|
|
1056
1124
|
onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
|
|
1057
1125
|
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
1058
1126
|
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
1059
|
-
}, null, 42,
|
|
1127
|
+
}, null, 42, Kt)), [
|
|
1060
1128
|
[Se, e.model]
|
|
1061
1129
|
]);
|
|
1062
1130
|
}
|
|
1063
|
-
const ze = /* @__PURE__ */ R(
|
|
1131
|
+
const ze = /* @__PURE__ */ R(Pt, [["render", Ut]]), Ht = F({
|
|
1064
1132
|
name: "EmailInput",
|
|
1065
1133
|
components: { TextInput: ze },
|
|
1066
1134
|
props: {
|
|
@@ -1073,22 +1141,22 @@ const ze = /* @__PURE__ */ R(Dt, [["render", qt]]), Ft = F({
|
|
|
1073
1141
|
return { t: n };
|
|
1074
1142
|
}
|
|
1075
1143
|
});
|
|
1076
|
-
function
|
|
1144
|
+
function Xt(e, n, a, l, u, i) {
|
|
1077
1145
|
const t = oe("TextInput");
|
|
1078
|
-
return
|
|
1146
|
+
return m(), le(t, {
|
|
1079
1147
|
type: "email",
|
|
1080
1148
|
autocomplete: "email",
|
|
1081
1149
|
name: e.name,
|
|
1082
1150
|
placeholder: e.placeholder ?? e.t("email.placeholder")
|
|
1083
1151
|
}, null, 8, ["name", "placeholder"]);
|
|
1084
1152
|
}
|
|
1085
|
-
const
|
|
1086
|
-
let
|
|
1087
|
-
const
|
|
1153
|
+
const Gt = /* @__PURE__ */ R(Ht, [["render", Xt]]);
|
|
1154
|
+
let Wt = 0;
|
|
1155
|
+
const Qt = F({
|
|
1088
1156
|
name: "FileInput",
|
|
1089
1157
|
emits: ["update:modelValue", "change", "added", "progress", "uploaded", "error", "removed"],
|
|
1090
1158
|
props: {
|
|
1091
|
-
...
|
|
1159
|
+
...z,
|
|
1092
1160
|
multiple: { type: Boolean, default: !1 },
|
|
1093
1161
|
endpoint: { type: String, default: "/upload" },
|
|
1094
1162
|
accept: { type: String, default: null },
|
|
@@ -1098,63 +1166,63 @@ const zt = F({
|
|
|
1098
1166
|
locale: { type: String, default: null }
|
|
1099
1167
|
},
|
|
1100
1168
|
setup(e, { emit: n, expose: a }) {
|
|
1101
|
-
const l =
|
|
1169
|
+
const l = P(e, n), { t: u } = Q(() => e.locale), i = Le(), t = E(null), d = E([]), y = /* @__PURE__ */ new Map();
|
|
1102
1170
|
i.add(() => {
|
|
1103
|
-
|
|
1171
|
+
y.forEach((s) => s.abort()), y.clear(), l.form.value && (l.form.value.uploading = null);
|
|
1104
1172
|
});
|
|
1105
1173
|
const w = () => d.value.filter((s) => s.path).map((s) => s.path);
|
|
1106
|
-
function
|
|
1174
|
+
function g(s) {
|
|
1107
1175
|
const c = e.multiple ? w() : w()[0] ?? null;
|
|
1108
1176
|
l.model.value = c, l.emitChange(c, s);
|
|
1109
1177
|
}
|
|
1110
|
-
function
|
|
1178
|
+
function p() {
|
|
1111
1179
|
const s = l.form.value;
|
|
1112
1180
|
if (!s) return;
|
|
1113
|
-
const c = d.value.filter((
|
|
1114
|
-
s.uploading = c.length ? Math.min(99, Math.round(c.reduce((
|
|
1181
|
+
const c = d.value.filter((C) => C.uploading);
|
|
1182
|
+
s.uploading = c.length ? Math.min(99, Math.round(c.reduce((C, j) => C + j.percent, 0) / c.length)) : null;
|
|
1115
1183
|
}
|
|
1116
1184
|
function $(s) {
|
|
1117
|
-
s.error = "", s.percent = 0, s.uploading = !0,
|
|
1185
|
+
s.error = "", s.percent = 0, s.uploading = !0, p();
|
|
1118
1186
|
const c = new FormData();
|
|
1119
1187
|
c.append(e.fieldName, s.file);
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1122
|
-
A.lengthComputable && (s.percent = Math.round(A.loaded / A.total * 100), n("progress", s, s.percent),
|
|
1188
|
+
const C = new XMLHttpRequest();
|
|
1189
|
+
y.set(s.id, C), C.open("POST", e.endpoint), Object.entries(qe(e.headers)).forEach(([A, H]) => C.setRequestHeader(A, H)), C.upload.onprogress = (A) => {
|
|
1190
|
+
A.lengthComputable && (s.percent = Math.round(A.loaded / A.total * 100), n("progress", s, s.percent), p());
|
|
1123
1191
|
};
|
|
1124
1192
|
const j = (A) => {
|
|
1125
|
-
s.uploading = !1, s.error = A || u("upload.failed"),
|
|
1193
|
+
s.uploading = !1, s.error = A || u("upload.failed"), y.delete(s.id), p(), n("error", s, s.error);
|
|
1126
1194
|
};
|
|
1127
|
-
|
|
1195
|
+
C.onerror = () => j(), C.onload = () => {
|
|
1128
1196
|
var ee;
|
|
1129
1197
|
let A = null;
|
|
1130
1198
|
try {
|
|
1131
|
-
A = JSON.parse(
|
|
1199
|
+
A = JSON.parse(C.responseText);
|
|
1132
1200
|
} catch {
|
|
1133
1201
|
}
|
|
1134
|
-
if (
|
|
1135
|
-
const
|
|
1136
|
-
return j((A == null ? void 0 : A.message) || (Array.isArray(
|
|
1202
|
+
if (C.status < 200 || C.status >= 300) {
|
|
1203
|
+
const K = A != null && A.errors ? Object.values(A.errors)[0] : null;
|
|
1204
|
+
return j((A == null ? void 0 : A.message) || (Array.isArray(K) ? K[0] : K));
|
|
1137
1205
|
}
|
|
1138
|
-
const
|
|
1139
|
-
if (!
|
|
1140
|
-
s.path =
|
|
1141
|
-
},
|
|
1206
|
+
const H = ((ee = A == null ? void 0 : A.data) == null ? void 0 : ee.path) ?? (A == null ? void 0 : A.path);
|
|
1207
|
+
if (!H) return j();
|
|
1208
|
+
s.path = H, s.percent = 100, s.uploading = !1, y.delete(s.id), p(), g(), n("uploaded", s);
|
|
1209
|
+
}, C.send(c);
|
|
1142
1210
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const c = ie({ id: `f${++
|
|
1211
|
+
function k(s) {
|
|
1212
|
+
const c = ie({ id: `f${++Wt}`, file: s, percent: 0, error: "", path: null, uploading: !1 });
|
|
1145
1213
|
d.value = e.multiple ? [...d.value, c] : [c], n("added", c), $(c);
|
|
1146
1214
|
}
|
|
1147
1215
|
function o(s) {
|
|
1148
|
-
Array.from(s.target.files).forEach(
|
|
1216
|
+
Array.from(s.target.files).forEach(k), s.target.value = "";
|
|
1149
1217
|
}
|
|
1150
1218
|
async function r(s) {
|
|
1151
1219
|
var c;
|
|
1152
|
-
if ((c =
|
|
1153
|
-
|
|
1220
|
+
if ((c = y.get(s.id)) == null || c.abort(), y.delete(s.id), d.value = d.value.filter((C) => C.id !== s.id), p(), s.path) {
|
|
1221
|
+
g();
|
|
1154
1222
|
try {
|
|
1155
1223
|
await fetch(e.endpoint, {
|
|
1156
1224
|
method: "DELETE",
|
|
1157
|
-
headers:
|
|
1225
|
+
headers: qe(e.headers),
|
|
1158
1226
|
credentials: "same-origin",
|
|
1159
1227
|
body: s.path
|
|
1160
1228
|
});
|
|
@@ -1163,27 +1231,27 @@ const zt = F({
|
|
|
1163
1231
|
}
|
|
1164
1232
|
n("removed", s);
|
|
1165
1233
|
}
|
|
1166
|
-
return
|
|
1234
|
+
return U(
|
|
1167
1235
|
() => l.model.value,
|
|
1168
1236
|
(s) => {
|
|
1169
|
-
(s == null || s === "" || Array.isArray(s) && !s.length) && d.value.some((
|
|
1237
|
+
(s == null || s === "" || Array.isArray(s) && !s.length) && d.value.some((C) => C.path) && (d.value = d.value.filter((C) => !C.path));
|
|
1170
1238
|
}
|
|
1171
1239
|
), a({ clear: () => d.value.slice().forEach(r) }), { ...l, t: u, input: t, files: d, onSelect: o, remove: r, retry: $, size: (s) => `${Math.round(s / 1024)}KB` };
|
|
1172
1240
|
}
|
|
1173
|
-
}),
|
|
1241
|
+
}), Jt = { class: "file-input-uploader" }, Zt = ["name", "id", "multiple", "accept", "required", "disabled", "aria-invalid"], Yt = {
|
|
1174
1242
|
key: 0,
|
|
1175
1243
|
class: "list-group mt-2"
|
|
1176
|
-
},
|
|
1244
|
+
}, xt = { class: "d-flex align-items-center justify-content-between gap-2" }, _t = { class: "text-truncate" }, el = { class: "d-flex align-items-center gap-2" }, nl = {
|
|
1177
1245
|
class: "fg-secondary fanum",
|
|
1178
1246
|
dir: "ltr"
|
|
1179
|
-
},
|
|
1247
|
+
}, tl = ["aria-label", "onClick"], ll = ["aria-label", "onClick"], al = ["aria-valuenow"], ol = {
|
|
1180
1248
|
key: 1,
|
|
1181
1249
|
class: "fg-danger mt-1",
|
|
1182
1250
|
role: "alert"
|
|
1183
1251
|
};
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1186
|
-
|
|
1252
|
+
function rl(e, n, a, l, u, i) {
|
|
1253
|
+
return m(), v("div", Jt, [
|
|
1254
|
+
h("input", {
|
|
1187
1255
|
ref: "input",
|
|
1188
1256
|
type: "file",
|
|
1189
1257
|
class: q(["form-control", { "is-invalid": e.isInvalid }]),
|
|
@@ -1195,24 +1263,24 @@ function xt(e, n, a, l, u, i) {
|
|
|
1195
1263
|
disabled: e.isDisabled || e.readonly,
|
|
1196
1264
|
"aria-invalid": e.isInvalid || void 0,
|
|
1197
1265
|
onChange: n[0] || (n[0] = (...t) => e.onSelect && e.onSelect(...t))
|
|
1198
|
-
}, null, 42,
|
|
1199
|
-
e.files.length ? (
|
|
1200
|
-
(
|
|
1266
|
+
}, null, 42, Zt),
|
|
1267
|
+
e.files.length ? (m(), v("ul", Yt, [
|
|
1268
|
+
(m(!0), v(W, null, ae(e.files, (t) => (m(), v("li", {
|
|
1201
1269
|
key: t.id,
|
|
1202
1270
|
class: "list-group-item"
|
|
1203
1271
|
}, [
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
t.error ? (
|
|
1272
|
+
h("div", xt, [
|
|
1273
|
+
h("span", _t, V(t.file.name), 1),
|
|
1274
|
+
h("span", el, [
|
|
1275
|
+
h("span", nl, V(e.size(t.file.size)), 1),
|
|
1276
|
+
t.error ? (m(), v("button", {
|
|
1209
1277
|
key: 0,
|
|
1210
1278
|
type: "button",
|
|
1211
1279
|
class: "btn-text theme-secondary btn-icon",
|
|
1212
1280
|
"aria-label": e.t("file.retry"),
|
|
1213
1281
|
onClick: (d) => e.retry(t)
|
|
1214
1282
|
}, n[1] || (n[1] = [
|
|
1215
|
-
|
|
1283
|
+
h("svg", {
|
|
1216
1284
|
width: "16",
|
|
1217
1285
|
height: "16",
|
|
1218
1286
|
viewBox: "0 0 16 16",
|
|
@@ -1223,18 +1291,18 @@ function xt(e, n, a, l, u, i) {
|
|
|
1223
1291
|
"stroke-linejoin": "round",
|
|
1224
1292
|
"aria-hidden": "true"
|
|
1225
1293
|
}, [
|
|
1226
|
-
|
|
1227
|
-
|
|
1294
|
+
h("path", { d: "M13.5 3v3.5H10" }),
|
|
1295
|
+
h("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5M2.5 13V9.5H6" })
|
|
1228
1296
|
], -1)
|
|
1229
|
-
]), 8,
|
|
1230
|
-
t.path || t.error ? (
|
|
1297
|
+
]), 8, tl)) : M("", !0),
|
|
1298
|
+
t.path || t.error ? (m(), v("button", {
|
|
1231
1299
|
key: 1,
|
|
1232
1300
|
type: "button",
|
|
1233
1301
|
class: "btn-text theme-danger btn-icon",
|
|
1234
1302
|
"aria-label": e.t("file.remove"),
|
|
1235
1303
|
onClick: (d) => e.remove(t)
|
|
1236
1304
|
}, n[2] || (n[2] = [
|
|
1237
|
-
|
|
1305
|
+
h("svg", {
|
|
1238
1306
|
width: "16",
|
|
1239
1307
|
height: "16",
|
|
1240
1308
|
viewBox: "0 0 16 16",
|
|
@@ -1244,12 +1312,12 @@ function xt(e, n, a, l, u, i) {
|
|
|
1244
1312
|
"stroke-linecap": "round",
|
|
1245
1313
|
"aria-hidden": "true"
|
|
1246
1314
|
}, [
|
|
1247
|
-
|
|
1315
|
+
h("path", { d: "m4 4 8 8M12 4l-8 8" })
|
|
1248
1316
|
], -1)
|
|
1249
|
-
]), 8,
|
|
1317
|
+
]), 8, ll)) : M("", !0)
|
|
1250
1318
|
])
|
|
1251
1319
|
]),
|
|
1252
|
-
t.uploading ? (
|
|
1320
|
+
t.uploading ? (m(), v("div", {
|
|
1253
1321
|
key: 0,
|
|
1254
1322
|
class: "progress mt-2",
|
|
1255
1323
|
role: "progressbar",
|
|
@@ -1257,22 +1325,22 @@ function xt(e, n, a, l, u, i) {
|
|
|
1257
1325
|
"aria-valuemin": "0",
|
|
1258
1326
|
"aria-valuemax": "100"
|
|
1259
1327
|
}, [
|
|
1260
|
-
|
|
1328
|
+
h("div", {
|
|
1261
1329
|
class: "progress-bar",
|
|
1262
1330
|
style: se({ width: t.percent + "%" })
|
|
1263
1331
|
}, null, 4)
|
|
1264
|
-
], 8,
|
|
1265
|
-
t.error ? (
|
|
1332
|
+
], 8, al)) : M("", !0),
|
|
1333
|
+
t.error ? (m(), v("div", ol, V(t.error), 1)) : M("", !0)
|
|
1266
1334
|
]))), 128))
|
|
1267
1335
|
])) : M("", !0)
|
|
1268
1336
|
]);
|
|
1269
1337
|
}
|
|
1270
|
-
const
|
|
1338
|
+
const vn = /* @__PURE__ */ R(Qt, [["render", rl]]), sl = F({
|
|
1271
1339
|
name: "FormAdornInput",
|
|
1272
1340
|
inheritAttrs: !1,
|
|
1273
1341
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
1274
1342
|
props: {
|
|
1275
|
-
...
|
|
1343
|
+
...z,
|
|
1276
1344
|
type: { type: String, default: "text" },
|
|
1277
1345
|
placeholder: { type: String, default: null },
|
|
1278
1346
|
/** Text shown before the input. */
|
|
@@ -1282,10 +1350,10 @@ const mn = /* @__PURE__ */ R(zt, [["render", xt]]), _t = F({
|
|
|
1282
1350
|
size: { type: String, default: null }
|
|
1283
1351
|
},
|
|
1284
1352
|
setup(e, { emit: n }) {
|
|
1285
|
-
const a =
|
|
1353
|
+
const a = P(e, n), l = E(null), u = S(() => e.size ? `form-control-${e.size}` : null);
|
|
1286
1354
|
function i(t) {
|
|
1287
|
-
var d,
|
|
1288
|
-
(t.target === t.currentTarget || (
|
|
1355
|
+
var d, y, w;
|
|
1356
|
+
(t.target === t.currentTarget || (y = (d = t.target).closest) != null && y.call(d, ".form-adorn-icon, .form-adorn-text")) && ((w = l.value) == null || w.focus());
|
|
1289
1357
|
}
|
|
1290
1358
|
return { ...a, input: l, sizeClass: u, focusInput: i, emit: n, focus: () => {
|
|
1291
1359
|
var t;
|
|
@@ -1293,23 +1361,23 @@ const mn = /* @__PURE__ */ R(zt, [["render", xt]]), _t = F({
|
|
|
1293
1361
|
} };
|
|
1294
1362
|
},
|
|
1295
1363
|
expose: ["focus"]
|
|
1296
|
-
}),
|
|
1364
|
+
}), il = {
|
|
1297
1365
|
key: 0,
|
|
1298
1366
|
class: "form-adorn-text"
|
|
1299
|
-
},
|
|
1367
|
+
}, ul = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"], dl = {
|
|
1300
1368
|
key: 0,
|
|
1301
1369
|
class: "form-adorn-text"
|
|
1302
1370
|
};
|
|
1303
|
-
function
|
|
1304
|
-
return
|
|
1371
|
+
function cl(e, n, a, l, u, i) {
|
|
1372
|
+
return m(), v("div", {
|
|
1305
1373
|
class: q(["form-control form-adorn", [e.sizeClass, { "is-invalid": e.isInvalid }, e.$attrs.class]]),
|
|
1306
1374
|
style: se(e.$attrs.style),
|
|
1307
1375
|
onClick: n[5] || (n[5] = (...t) => e.focusInput && e.focusInput(...t))
|
|
1308
1376
|
}, [
|
|
1309
1377
|
L(e.$slots, "start", {}, () => [
|
|
1310
|
-
e.startText ? (
|
|
1378
|
+
e.startText ? (m(), v("span", il, V(e.startText), 1)) : M("", !0)
|
|
1311
1379
|
]),
|
|
1312
|
-
re(
|
|
1380
|
+
re(h("input", Qe({
|
|
1313
1381
|
ref: "input",
|
|
1314
1382
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t)
|
|
1315
1383
|
}, { ...e.$attrs, class: void 0, style: void 0 }, {
|
|
@@ -1326,26 +1394,26 @@ function ll(e, n, a, l, u, i) {
|
|
|
1326
1394
|
onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
|
|
1327
1395
|
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
1328
1396
|
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
1329
|
-
}), null, 16,
|
|
1397
|
+
}), null, 16, ul), [
|
|
1330
1398
|
[Se, e.model]
|
|
1331
1399
|
]),
|
|
1332
1400
|
L(e.$slots, "end", {}, () => [
|
|
1333
|
-
e.endText ? (
|
|
1401
|
+
e.endText ? (m(), v("span", dl, V(e.endText), 1)) : M("", !0)
|
|
1334
1402
|
])
|
|
1335
1403
|
], 6);
|
|
1336
1404
|
}
|
|
1337
|
-
const
|
|
1338
|
-
function
|
|
1339
|
-
return typeof e == "string" ?
|
|
1405
|
+
const _e = /* @__PURE__ */ R(sl, [["render", cl]]), fl = (e) => e !== null && typeof e == "object" && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
|
|
1406
|
+
function Ze(e) {
|
|
1407
|
+
return typeof e == "string" ? ke(e) : Array.isArray(e) ? e.map(Ze) : fl(e) ? Object.keys(e).reduce((n, a) => (n[a] = Ze(e[a]), n), {}) : e;
|
|
1340
1408
|
}
|
|
1341
|
-
function
|
|
1409
|
+
function sn(e, n) {
|
|
1342
1410
|
try {
|
|
1343
1411
|
return JSON.stringify(e) === JSON.stringify(n);
|
|
1344
1412
|
} catch {
|
|
1345
1413
|
return !1;
|
|
1346
1414
|
}
|
|
1347
1415
|
}
|
|
1348
|
-
const
|
|
1416
|
+
const pl = F({
|
|
1349
1417
|
name: "FormContainer",
|
|
1350
1418
|
emits: [
|
|
1351
1419
|
"update:modelValue",
|
|
@@ -1390,7 +1458,7 @@ const ol = F({
|
|
|
1390
1458
|
hideAlerts: { type: Boolean, default: !1 }
|
|
1391
1459
|
},
|
|
1392
1460
|
setup(e, { emit: n, expose: a }) {
|
|
1393
|
-
const l = E(null), u = ie({ hasMessage: !1, successMessage: null }), i =
|
|
1461
|
+
const l = E(null), u = ie({ hasMessage: !1, successMessage: null }), i = Mn({
|
|
1394
1462
|
...e.options,
|
|
1395
1463
|
...e.modelValue
|
|
1396
1464
|
});
|
|
@@ -1399,7 +1467,7 @@ const ol = F({
|
|
|
1399
1467
|
const r = [];
|
|
1400
1468
|
return (s = l.value) != null && s.id && r.push(l.value.id), typeof o == "string" && r.push(o), o.group && (o.group.name && r.push(o.group.name), o.group.index !== void 0 && o.group.index !== null && r.push(o.group.index)), o.name && r.push(o.name), o.value !== void 0 && o.value !== null && o.value !== "" && r.push(o.value), r.join("-");
|
|
1401
1469
|
};
|
|
1402
|
-
const t = new Set(Object.keys(i)), d = () => Object.keys(i).filter((o) => !t.has(o) && typeof i[o] != "function" && i[o] !== void 0),
|
|
1470
|
+
const t = new Set(Object.keys(i)), d = () => Object.keys(i).filter((o) => !t.has(o) && typeof i[o] != "function" && i[o] !== void 0), y = () => {
|
|
1403
1471
|
const o = typeof i.data == "function" ? { ...i.data() } : Object.keys(i).reduce((r, s) => (t.has(s) && typeof i[s] != "function" && (r[s] = i[s]), r), {});
|
|
1404
1472
|
return d().forEach((r) => {
|
|
1405
1473
|
o[r] = i[r];
|
|
@@ -1407,43 +1475,43 @@ const ol = F({
|
|
|
1407
1475
|
}, w = () => {
|
|
1408
1476
|
d().forEach((o) => delete i[o]), i.reset();
|
|
1409
1477
|
};
|
|
1410
|
-
|
|
1411
|
-
() =>
|
|
1478
|
+
U(
|
|
1479
|
+
() => y(),
|
|
1412
1480
|
(o) => {
|
|
1413
1481
|
n("change", o), n("update:modelValue", o);
|
|
1414
1482
|
},
|
|
1415
1483
|
{ deep: !0 }
|
|
1416
|
-
),
|
|
1484
|
+
), U(
|
|
1417
1485
|
() => e.modelValue,
|
|
1418
1486
|
(o) => {
|
|
1419
|
-
!o ||
|
|
1420
|
-
|
|
1487
|
+
!o || sn(o, y()) || Object.keys(o).forEach((r) => {
|
|
1488
|
+
sn(i[r], o[r]) || (i[r] = o[r]);
|
|
1421
1489
|
});
|
|
1422
1490
|
},
|
|
1423
1491
|
{ deep: !0 }
|
|
1424
1492
|
);
|
|
1425
|
-
function
|
|
1493
|
+
function g(o) {
|
|
1426
1494
|
const r = Array.from(l.value.querySelectorAll("input, select, textarea")).filter(
|
|
1427
1495
|
(c) => !c.disabled && c.tabIndex !== -1 && c.type !== "hidden" && c.offsetParent !== null
|
|
1428
1496
|
), s = r[r.indexOf(o) + 1];
|
|
1429
1497
|
s && (s.focus(), s.tagName !== "SELECT" && typeof s.select == "function" && s.select());
|
|
1430
1498
|
}
|
|
1431
|
-
function
|
|
1499
|
+
function p(o) {
|
|
1432
1500
|
const r = o.target;
|
|
1433
1501
|
if (!["INPUT", "TEXTAREA"].includes(r.tagName)) return;
|
|
1434
|
-
e.autoTab && r.maxLength > 0 && r.value.length >= r.maxLength &&
|
|
1502
|
+
e.autoTab && r.maxLength > 0 && r.value.length >= r.maxLength && g(r);
|
|
1435
1503
|
const s = parseInt(r.dataset.autoSubmitLength, 10);
|
|
1436
|
-
!isNaN(s) && r.value.length >= s &&
|
|
1504
|
+
!isNaN(s) && r.value.length >= s && k();
|
|
1437
1505
|
}
|
|
1438
1506
|
function $() {
|
|
1439
1507
|
w(), i.clearErrors(), u.hasMessage = !1, u.successMessage = null, n("reset");
|
|
1440
1508
|
}
|
|
1441
|
-
async function
|
|
1509
|
+
async function k(o) {
|
|
1442
1510
|
if (e.submitHandler)
|
|
1443
1511
|
return e.submitHandler(o, i);
|
|
1444
1512
|
n("submit", o), i.transform((r) => {
|
|
1445
|
-
const s = { ...e.modelValue, ...r, ...
|
|
1446
|
-
return e.normalizeDigits ?
|
|
1513
|
+
const s = { ...e.modelValue, ...r, ...y() };
|
|
1514
|
+
return e.normalizeDigits ? Ze(s) : s;
|
|
1447
1515
|
}).submit((e.method || "post").toString().toLowerCase(), e.url, {
|
|
1448
1516
|
only: e.only,
|
|
1449
1517
|
...e.visitOptions,
|
|
@@ -1472,24 +1540,24 @@ const ol = F({
|
|
|
1472
1540
|
n("error", r), n("onError", r), (c = (s = e.visitOptions).onError) == null || c.call(s, r);
|
|
1473
1541
|
},
|
|
1474
1542
|
onSuccess: (r) => {
|
|
1475
|
-
var s, c,
|
|
1476
|
-
e.resetOnSuccess && w(), (s = r == null ? void 0 : r.props) != null && s.message && (u.hasMessage = !0, u.successMessage = r.props.message), n("success", r), n("onSuccess", r), (
|
|
1543
|
+
var s, c, C;
|
|
1544
|
+
e.resetOnSuccess && w(), (s = r == null ? void 0 : r.props) != null && s.message && (u.hasMessage = !0, u.successMessage = r.props.message), n("success", r), n("onSuccess", r), (C = (c = e.visitOptions).onSuccess) == null || C.call(c, r);
|
|
1477
1545
|
}
|
|
1478
1546
|
});
|
|
1479
1547
|
}
|
|
1480
|
-
return
|
|
1548
|
+
return De("form", S(() => i)), De("formApi", { submit: k, reset: $, el: l }), a({ submit: k, reset: $, form: i, el: l }), { form: i, formEl: l, ui: u, handleInput: p, reset: $, submit: k };
|
|
1481
1549
|
}
|
|
1482
|
-
}),
|
|
1550
|
+
}), ml = ["action", "method", "data-bs-validate", "novalidate"], hl = {
|
|
1483
1551
|
key: 0,
|
|
1484
1552
|
class: "alert theme-danger",
|
|
1485
1553
|
role: "alert"
|
|
1486
|
-
},
|
|
1554
|
+
}, vl = { class: "list-unstyled p-0 m-0 fanum" }, gl = ["innerHTML"], yl = {
|
|
1487
1555
|
key: 0,
|
|
1488
1556
|
class: "alert theme-success",
|
|
1489
1557
|
role: "status"
|
|
1490
|
-
},
|
|
1491
|
-
function
|
|
1492
|
-
return
|
|
1558
|
+
}, bl = ["innerHTML"], $l = { key: 1 };
|
|
1559
|
+
function wl(e, n, a, l, u, i) {
|
|
1560
|
+
return m(), v("form", {
|
|
1493
1561
|
ref: "formEl",
|
|
1494
1562
|
action: e.url || void 0,
|
|
1495
1563
|
method: e.method,
|
|
@@ -1497,21 +1565,21 @@ function pl(e, n, a, l, u, i) {
|
|
|
1497
1565
|
novalidate: !e.validate || e.form.hasErrors ? !0 : void 0,
|
|
1498
1566
|
class: q({ "form-processing": e.form.processing }),
|
|
1499
1567
|
onInput: n[0] || (n[0] = (...t) => e.handleInput && e.handleInput(...t)),
|
|
1500
|
-
onSubmit: n[1] || (n[1] =
|
|
1501
|
-
onReset: n[2] || (n[2] =
|
|
1568
|
+
onSubmit: n[1] || (n[1] = tn((...t) => e.submit && e.submit(...t), ["prevent"])),
|
|
1569
|
+
onReset: n[2] || (n[2] = tn((...t) => e.reset && e.reset(...t), ["prevent"]))
|
|
1502
1570
|
}, [
|
|
1503
|
-
e.hideAlerts ? M("", !0) : (
|
|
1571
|
+
e.hideAlerts ? M("", !0) : (m(), v(W, { key: 0 }, [
|
|
1504
1572
|
L(e.$slots, "errors", {
|
|
1505
1573
|
errors: e.form.errors,
|
|
1506
1574
|
form: e.form
|
|
1507
1575
|
}, () => [
|
|
1508
|
-
e.form.hasErrors ? (
|
|
1509
|
-
|
|
1510
|
-
(
|
|
1511
|
-
e.htmlMessages ? (
|
|
1576
|
+
e.form.hasErrors ? (m(), v("div", hl, [
|
|
1577
|
+
h("ul", vl, [
|
|
1578
|
+
(m(!0), v(W, null, ae(e.form.errors, (t, d) => (m(), v("li", { key: d }, [
|
|
1579
|
+
e.htmlMessages ? (m(), v("span", {
|
|
1512
1580
|
key: 0,
|
|
1513
1581
|
innerHTML: t
|
|
1514
|
-
}, null, 8,
|
|
1582
|
+
}, null, 8, gl)) : (m(), v(W, { key: 1 }, [
|
|
1515
1583
|
x(V(t), 1)
|
|
1516
1584
|
], 64))
|
|
1517
1585
|
]))), 128))
|
|
@@ -1521,11 +1589,11 @@ function pl(e, n, a, l, u, i) {
|
|
|
1521
1589
|
L(e.$slots, "message", {
|
|
1522
1590
|
message: e.ui.successMessage
|
|
1523
1591
|
}, () => [
|
|
1524
|
-
e.ui.hasMessage && e.ui.successMessage ? (
|
|
1525
|
-
e.htmlMessages ? (
|
|
1592
|
+
e.ui.hasMessage && e.ui.successMessage ? (m(), v("div", yl, [
|
|
1593
|
+
e.htmlMessages ? (m(), v("span", {
|
|
1526
1594
|
key: 0,
|
|
1527
1595
|
innerHTML: e.ui.successMessage
|
|
1528
|
-
}, null, 8,
|
|
1596
|
+
}, null, 8, bl)) : (m(), v("span", $l, V(e.ui.successMessage), 1))
|
|
1529
1597
|
])) : M("", !0)
|
|
1530
1598
|
])
|
|
1531
1599
|
], 64)),
|
|
@@ -1534,9 +1602,9 @@ function pl(e, n, a, l, u, i) {
|
|
|
1534
1602
|
submit: e.submit,
|
|
1535
1603
|
reset: e.reset
|
|
1536
1604
|
})
|
|
1537
|
-
], 42,
|
|
1605
|
+
], 42, ml);
|
|
1538
1606
|
}
|
|
1539
|
-
const
|
|
1607
|
+
const Sl = /* @__PURE__ */ R(pl, [["render", wl]]), kl = F({
|
|
1540
1608
|
name: "FormLabel",
|
|
1541
1609
|
props: {
|
|
1542
1610
|
/** id of the control. Detected automatically inside <FormField> or from the next element. */
|
|
@@ -1554,26 +1622,26 @@ const ml = /* @__PURE__ */ R(ol, [["render", pl]]), hl = F({
|
|
|
1554
1622
|
const u = S(() => e.for || (n == null ? void 0 : n.id) || l.value || void 0);
|
|
1555
1623
|
return { el: a, target: u };
|
|
1556
1624
|
}
|
|
1557
|
-
}),
|
|
1625
|
+
}), Il = ["for"], Cl = {
|
|
1558
1626
|
key: 0,
|
|
1559
1627
|
class: "fg-danger",
|
|
1560
1628
|
"aria-hidden": "true"
|
|
1561
1629
|
};
|
|
1562
|
-
function
|
|
1563
|
-
return
|
|
1630
|
+
function Tl(e, n, a, l, u, i) {
|
|
1631
|
+
return m(), v("label", {
|
|
1564
1632
|
ref: "el",
|
|
1565
1633
|
class: "form-label",
|
|
1566
1634
|
for: e.target
|
|
1567
1635
|
}, [
|
|
1568
1636
|
L(e.$slots, "default"),
|
|
1569
|
-
e.required ? (
|
|
1570
|
-
], 8,
|
|
1637
|
+
e.required ? (m(), v("span", Cl, " *")) : M("", !0)
|
|
1638
|
+
], 8, Il);
|
|
1571
1639
|
}
|
|
1572
|
-
const
|
|
1573
|
-
let
|
|
1574
|
-
const
|
|
1640
|
+
const gn = /* @__PURE__ */ R(kl, [["render", Tl]]);
|
|
1641
|
+
let Ml = 0;
|
|
1642
|
+
const Bl = F({
|
|
1575
1643
|
name: "FormField",
|
|
1576
|
-
components: { FormLabel:
|
|
1644
|
+
components: { FormLabel: gn },
|
|
1577
1645
|
props: {
|
|
1578
1646
|
/** Field key. Used to read the server-side error of the field. */
|
|
1579
1647
|
name: { type: String, default: null },
|
|
@@ -1585,8 +1653,8 @@ const $l = F({
|
|
|
1585
1653
|
id: { type: String, default: null }
|
|
1586
1654
|
},
|
|
1587
1655
|
setup(e) {
|
|
1588
|
-
const n = me("form", null), a =
|
|
1589
|
-
|
|
1656
|
+
const n = me("form", null), a = nn.useId ? nn.useId() : `ff-${++Ml}`, l = S(() => e.id || (e.name ? `${e.name}-${a}` : a));
|
|
1657
|
+
De("formField", {
|
|
1590
1658
|
get id() {
|
|
1591
1659
|
return l.value;
|
|
1592
1660
|
},
|
|
@@ -1600,17 +1668,17 @@ const $l = F({
|
|
|
1600
1668
|
});
|
|
1601
1669
|
return { fieldId: l, errorText: u };
|
|
1602
1670
|
}
|
|
1603
|
-
}),
|
|
1604
|
-
function
|
|
1671
|
+
}), El = { class: "form-field" }, Al = ["id"], Ol = ["id"];
|
|
1672
|
+
function Vl(e, n, a, l, u, i) {
|
|
1605
1673
|
const t = oe("FormLabel");
|
|
1606
|
-
return
|
|
1674
|
+
return m(), v("div", El, [
|
|
1607
1675
|
L(e.$slots, "label", {}, () => [
|
|
1608
|
-
e.label ? (
|
|
1676
|
+
e.label ? (m(), le(t, {
|
|
1609
1677
|
key: 0,
|
|
1610
1678
|
for: e.fieldId,
|
|
1611
1679
|
required: e.required
|
|
1612
1680
|
}, {
|
|
1613
|
-
default:
|
|
1681
|
+
default: xe(() => [
|
|
1614
1682
|
x(V(e.label), 1)
|
|
1615
1683
|
]),
|
|
1616
1684
|
_: 1
|
|
@@ -1618,23 +1686,23 @@ function Il(e, n, a, l, u, i) {
|
|
|
1618
1686
|
]),
|
|
1619
1687
|
L(e.$slots, "default"),
|
|
1620
1688
|
L(e.$slots, "help", {}, () => [
|
|
1621
|
-
e.help ? (
|
|
1689
|
+
e.help ? (m(), v("div", {
|
|
1622
1690
|
key: 0,
|
|
1623
1691
|
id: e.fieldId + "-help",
|
|
1624
1692
|
class: "form-text"
|
|
1625
|
-
}, V(e.help), 9,
|
|
1693
|
+
}, V(e.help), 9, Al)) : M("", !0)
|
|
1626
1694
|
]),
|
|
1627
1695
|
L(e.$slots, "error", { error: e.errorText }, () => [
|
|
1628
|
-
e.errorText ? (
|
|
1696
|
+
e.errorText ? (m(), v("div", {
|
|
1629
1697
|
key: 0,
|
|
1630
1698
|
id: e.fieldId + "-error",
|
|
1631
1699
|
class: "invalid-feedback d-block",
|
|
1632
1700
|
role: "alert"
|
|
1633
|
-
}, V(e.errorText), 9,
|
|
1701
|
+
}, V(e.errorText), 9, Ol)) : M("", !0)
|
|
1634
1702
|
])
|
|
1635
1703
|
]);
|
|
1636
1704
|
}
|
|
1637
|
-
const
|
|
1705
|
+
const Dl = /* @__PURE__ */ R(Bl, [["render", Vl]]), Nl = F({
|
|
1638
1706
|
name: "GroupControl",
|
|
1639
1707
|
props: {
|
|
1640
1708
|
/** Key of the object / array inside the form that holds the grouped values. */
|
|
@@ -1645,11 +1713,11 @@ const Cl = /* @__PURE__ */ R($l, [["render", Il]]), Tl = F({
|
|
|
1645
1713
|
setup(e) {
|
|
1646
1714
|
const n = me("form", null), a = E(null), l = E("0"), u = S(() => e.index !== null ? String(e.index) : l.value);
|
|
1647
1715
|
J(() => {
|
|
1648
|
-
var d,
|
|
1716
|
+
var d, y, w;
|
|
1649
1717
|
if (e.index !== null) return;
|
|
1650
|
-
const t = (w = (
|
|
1651
|
-
t == null || t.forEach((
|
|
1652
|
-
|
|
1718
|
+
const t = (w = (y = (d = a.value) == null ? void 0 : d.parentNode) == null ? void 0 : y.parentNode) == null ? void 0 : w.querySelectorAll(".form-control-group");
|
|
1719
|
+
t == null || t.forEach((g, p) => {
|
|
1720
|
+
g === a.value && (l.value = String(p));
|
|
1653
1721
|
});
|
|
1654
1722
|
});
|
|
1655
1723
|
const i = {
|
|
@@ -1660,34 +1728,34 @@ const Cl = /* @__PURE__ */ R($l, [["render", Il]]), Tl = F({
|
|
|
1660
1728
|
return u.value;
|
|
1661
1729
|
},
|
|
1662
1730
|
getData(t) {
|
|
1663
|
-
var
|
|
1664
|
-
const d = (
|
|
1731
|
+
var y, w;
|
|
1732
|
+
const d = (y = n == null ? void 0 : n.value) == null ? void 0 : y[e.name];
|
|
1665
1733
|
return d == null ? null : Array.isArray(d) ? ((w = d[Number(u.value)]) == null ? void 0 : w[t]) ?? null : d[t] ?? null;
|
|
1666
1734
|
},
|
|
1667
1735
|
setData(t, d) {
|
|
1668
|
-
const
|
|
1669
|
-
if (
|
|
1670
|
-
if ((
|
|
1736
|
+
const y = n == null ? void 0 : n.value;
|
|
1737
|
+
if (y)
|
|
1738
|
+
if ((y[e.name] === null || y[e.name] === void 0) && (y[e.name] = e.index !== null ? [] : {}), Array.isArray(y[e.name])) {
|
|
1671
1739
|
const w = Number(u.value);
|
|
1672
|
-
|
|
1740
|
+
y[e.name][w] || (y[e.name][w] = {}), y[e.name][w][t] = d;
|
|
1673
1741
|
} else
|
|
1674
|
-
|
|
1742
|
+
y[e.name][t] = d;
|
|
1675
1743
|
}
|
|
1676
1744
|
};
|
|
1677
|
-
return
|
|
1745
|
+
return De("group", S(() => i)), { groupEl: a, index: u };
|
|
1678
1746
|
}
|
|
1679
|
-
}),
|
|
1680
|
-
function
|
|
1681
|
-
return
|
|
1747
|
+
}), ql = ["data-name", "data-group-id"];
|
|
1748
|
+
function Fl(e, n, a, l, u, i) {
|
|
1749
|
+
return m(), v("div", {
|
|
1682
1750
|
ref: "groupEl",
|
|
1683
1751
|
class: "form-control-group",
|
|
1684
1752
|
"data-name": e.name,
|
|
1685
1753
|
"data-group-id": e.index
|
|
1686
1754
|
}, [
|
|
1687
1755
|
L(e.$slots, "default")
|
|
1688
|
-
], 8,
|
|
1756
|
+
], 8, ql);
|
|
1689
1757
|
}
|
|
1690
|
-
const
|
|
1758
|
+
const yn = /* @__PURE__ */ R(Nl, [["render", Fl]]), Rl = F({
|
|
1691
1759
|
name: "MobileInput",
|
|
1692
1760
|
components: { TextInput: ze },
|
|
1693
1761
|
props: {
|
|
@@ -1700,9 +1768,9 @@ const vn = /* @__PURE__ */ R(Tl, [["render", Bl]]), El = F({
|
|
|
1700
1768
|
return { t: n };
|
|
1701
1769
|
}
|
|
1702
1770
|
});
|
|
1703
|
-
function
|
|
1771
|
+
function Ll(e, n, a, l, u, i) {
|
|
1704
1772
|
const t = oe("TextInput");
|
|
1705
|
-
return
|
|
1773
|
+
return m(), le(t, {
|
|
1706
1774
|
type: "tel",
|
|
1707
1775
|
inputmode: "tel",
|
|
1708
1776
|
autocomplete: "tel",
|
|
@@ -1711,11 +1779,11 @@ function Al(e, n, a, l, u, i) {
|
|
|
1711
1779
|
placeholder: e.placeholder ?? e.t("mobile.placeholder")
|
|
1712
1780
|
}, null, 8, ["name", "placeholder"]);
|
|
1713
1781
|
}
|
|
1714
|
-
const
|
|
1782
|
+
const jl = /* @__PURE__ */ R(Rl, [["render", Ll]]), zl = F({
|
|
1715
1783
|
name: "QuantityInput",
|
|
1716
1784
|
emits: ["update:modelValue", "change", "input", "increment", "decrement", "focus", "blur"],
|
|
1717
1785
|
props: {
|
|
1718
|
-
...
|
|
1786
|
+
...z,
|
|
1719
1787
|
min: { type: Number, default: 0 },
|
|
1720
1788
|
max: { type: Number, default: null },
|
|
1721
1789
|
step: { type: Number, default: 1 },
|
|
@@ -1724,17 +1792,17 @@ const Ol = /* @__PURE__ */ R(El, [["render", Al]]), Vl = F({
|
|
|
1724
1792
|
locale: { type: String, default: null }
|
|
1725
1793
|
},
|
|
1726
1794
|
setup(e, { emit: n }) {
|
|
1727
|
-
const a =
|
|
1795
|
+
const a = P(e, n), { t: l } = Q(() => e.locale), u = S(() => {
|
|
1728
1796
|
const $ = Number(a.model.value);
|
|
1729
1797
|
return Number.isFinite($) ? $ : e.min;
|
|
1730
|
-
}), i = S(() => e.unit ?? l("quantity.unit")), t = S(() =>
|
|
1731
|
-
function
|
|
1798
|
+
}), i = S(() => e.unit ?? l("quantity.unit")), t = S(() => Fe(u.value)), d = S(() => e.readonly || a.isDisabled.value), y = S(() => !d.value && (e.max === null || u.value + e.step <= e.max)), w = S(() => !d.value && u.value - e.step >= e.min);
|
|
1799
|
+
function g($, k, o) {
|
|
1732
1800
|
let r = $;
|
|
1733
|
-
e.max !== null && (r = Math.min(r, e.max)), r = Math.max(r, e.min), a.model.value = r, o && n(o, r), a.emitChange(r,
|
|
1801
|
+
e.max !== null && (r = Math.min(r, e.max)), r = Math.max(r, e.min), a.model.value = r, o && n(o, r), a.emitChange(r, k);
|
|
1734
1802
|
}
|
|
1735
|
-
function
|
|
1736
|
-
const
|
|
1737
|
-
a.model.value =
|
|
1803
|
+
function p($) {
|
|
1804
|
+
const k = mn($.target.value);
|
|
1805
|
+
a.model.value = k === null ? e.min : k, $.target.value = Fe(a.model.value), n("input", a.model.value, $);
|
|
1738
1806
|
}
|
|
1739
1807
|
return J(() => {
|
|
1740
1808
|
const $ = a.model.value;
|
|
@@ -1744,31 +1812,31 @@ const Ol = /* @__PURE__ */ R(El, [["render", Al]]), Vl = F({
|
|
|
1744
1812
|
t: l,
|
|
1745
1813
|
unitText: i,
|
|
1746
1814
|
display: t,
|
|
1747
|
-
canIncrement:
|
|
1815
|
+
canIncrement: y,
|
|
1748
1816
|
canDecrement: w,
|
|
1749
1817
|
lock: d,
|
|
1750
|
-
increment: ($) =>
|
|
1751
|
-
decrement: ($) => w.value &&
|
|
1752
|
-
onInput:
|
|
1753
|
-
clampOnBlur: ($) =>
|
|
1818
|
+
increment: ($) => y.value && g(u.value + e.step, $, "increment"),
|
|
1819
|
+
decrement: ($) => w.value && g(u.value - e.step, $, "decrement"),
|
|
1820
|
+
onInput: p,
|
|
1821
|
+
clampOnBlur: ($) => g(u.value, $)
|
|
1754
1822
|
};
|
|
1755
1823
|
}
|
|
1756
|
-
}),
|
|
1824
|
+
}), Pl = ["disabled", "aria-label"], Kl = ["name", "id", "value", "readonly", "disabled", "aria-invalid"], Ul = ["disabled", "aria-label"], Hl = {
|
|
1757
1825
|
key: 0,
|
|
1758
1826
|
class: "input-group-text fanum"
|
|
1759
1827
|
};
|
|
1760
|
-
function
|
|
1761
|
-
return
|
|
1828
|
+
function Xl(e, n, a, l, u, i) {
|
|
1829
|
+
return m(), v("div", {
|
|
1762
1830
|
class: q(["input-group input-group-quantity", { "is-invalid": e.isInvalid }])
|
|
1763
1831
|
}, [
|
|
1764
|
-
|
|
1832
|
+
h("button", {
|
|
1765
1833
|
type: "button",
|
|
1766
1834
|
class: "btn-outline theme-secondary btn-icon",
|
|
1767
1835
|
disabled: !e.canIncrement,
|
|
1768
1836
|
"aria-label": e.t("quantity.increase"),
|
|
1769
1837
|
onClick: n[0] || (n[0] = (...t) => e.increment && e.increment(...t))
|
|
1770
1838
|
}, n[6] || (n[6] = [
|
|
1771
|
-
|
|
1839
|
+
h("svg", {
|
|
1772
1840
|
width: "14",
|
|
1773
1841
|
height: "14",
|
|
1774
1842
|
viewBox: "0 0 16 16",
|
|
@@ -1778,10 +1846,10 @@ function Rl(e, n, a, l, u, i) {
|
|
|
1778
1846
|
"stroke-linecap": "round",
|
|
1779
1847
|
"aria-hidden": "true"
|
|
1780
1848
|
}, [
|
|
1781
|
-
|
|
1849
|
+
h("path", { d: "M8 3v10M3 8h10" })
|
|
1782
1850
|
], -1)
|
|
1783
|
-
]), 8,
|
|
1784
|
-
|
|
1851
|
+
]), 8, Pl),
|
|
1852
|
+
h("input", {
|
|
1785
1853
|
name: e.name,
|
|
1786
1854
|
id: e.inputId,
|
|
1787
1855
|
value: e.display,
|
|
@@ -1796,15 +1864,15 @@ function Rl(e, n, a, l, u, i) {
|
|
|
1796
1864
|
onChange: n[2] || (n[2] = (...t) => e.clampOnBlur && e.clampOnBlur(...t)),
|
|
1797
1865
|
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
1798
1866
|
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
1799
|
-
}, null, 42,
|
|
1800
|
-
|
|
1867
|
+
}, null, 42, Kl),
|
|
1868
|
+
h("button", {
|
|
1801
1869
|
type: "button",
|
|
1802
1870
|
class: "btn-outline theme-secondary btn-icon",
|
|
1803
1871
|
disabled: !e.canDecrement,
|
|
1804
1872
|
"aria-label": e.t("quantity.decrease"),
|
|
1805
1873
|
onClick: n[5] || (n[5] = (...t) => e.decrement && e.decrement(...t))
|
|
1806
1874
|
}, n[7] || (n[7] = [
|
|
1807
|
-
|
|
1875
|
+
h("svg", {
|
|
1808
1876
|
width: "14",
|
|
1809
1877
|
height: "14",
|
|
1810
1878
|
viewBox: "0 0 16 16",
|
|
@@ -1814,19 +1882,19 @@ function Rl(e, n, a, l, u, i) {
|
|
|
1814
1882
|
"stroke-linecap": "round",
|
|
1815
1883
|
"aria-hidden": "true"
|
|
1816
1884
|
}, [
|
|
1817
|
-
|
|
1885
|
+
h("path", { d: "M3 8h10" })
|
|
1818
1886
|
], -1)
|
|
1819
|
-
]), 8,
|
|
1820
|
-
e.unitText ? (
|
|
1887
|
+
]), 8, Ul),
|
|
1888
|
+
e.unitText ? (m(), v("span", Hl, V(e.unitText), 1)) : M("", !0),
|
|
1821
1889
|
L(e.$slots, "suffix")
|
|
1822
1890
|
], 2);
|
|
1823
1891
|
}
|
|
1824
|
-
const
|
|
1892
|
+
const bn = /* @__PURE__ */ R(zl, [["render", Xl]]), Gl = F({
|
|
1825
1893
|
name: "MultiQuantityInput",
|
|
1826
|
-
components: { GroupControl:
|
|
1894
|
+
components: { GroupControl: yn, QuantityInput: bn },
|
|
1827
1895
|
emits: ["update:modelValue", "change", "show", "shown", "hide", "hidden"],
|
|
1828
1896
|
props: {
|
|
1829
|
-
...
|
|
1897
|
+
...z,
|
|
1830
1898
|
/** Array of strings or { name, min, max, description, html }. */
|
|
1831
1899
|
options: { type: Array, default: () => [] },
|
|
1832
1900
|
min: { type: Number, default: 0 },
|
|
@@ -1838,47 +1906,47 @@ const gn = /* @__PURE__ */ R(Vl, [["render", Rl]]), Ll = F({
|
|
|
1838
1906
|
locale: { type: String, default: null }
|
|
1839
1907
|
},
|
|
1840
1908
|
setup(e, { emit: n }) {
|
|
1841
|
-
const a =
|
|
1909
|
+
const a = P(e, n), { t: l } = Q(() => e.locale), u = E(null), i = S(() => {
|
|
1842
1910
|
const w = a.model.value;
|
|
1843
1911
|
return w && typeof w == "object" ? w : {};
|
|
1844
1912
|
}), t = S(
|
|
1845
|
-
() => e.options.reduce((w,
|
|
1846
|
-
), d = S(() => e.unit ?? l("quantity.unit")),
|
|
1847
|
-
() => e.options.map((w,
|
|
1848
|
-
const
|
|
1913
|
+
() => e.options.reduce((w, g, p) => w + (Number(i.value[p]) || 0), 0)
|
|
1914
|
+
), d = S(() => e.unit ?? l("quantity.unit")), y = S(
|
|
1915
|
+
() => e.options.map((w, g) => {
|
|
1916
|
+
const p = typeof w == "object" && w !== null ? w : { name: w }, $ = Number(i.value[g]) || 0, k = p.max ?? e.max, o = e.totalMax === null ? 1 / 0 : $ + (e.totalMax - t.value);
|
|
1849
1917
|
return {
|
|
1850
|
-
key:
|
|
1851
|
-
name:
|
|
1852
|
-
description:
|
|
1853
|
-
html: !!
|
|
1854
|
-
min:
|
|
1855
|
-
max: Math.min(
|
|
1918
|
+
key: g,
|
|
1919
|
+
name: p.name ?? p.label ?? String(w),
|
|
1920
|
+
description: p.description ?? null,
|
|
1921
|
+
html: !!p.html,
|
|
1922
|
+
min: p.min ?? e.min,
|
|
1923
|
+
max: Math.min(k ?? 1 / 0, o) === 1 / 0 ? null : Math.min(k ?? 1 / 0, o)
|
|
1856
1924
|
};
|
|
1857
1925
|
})
|
|
1858
1926
|
);
|
|
1859
1927
|
return J(() => {
|
|
1860
|
-
(!a.model.value || typeof a.model.value != "object") && (a.model.value = e.options.reduce((w,
|
|
1928
|
+
(!a.model.value || typeof a.model.value != "object") && (a.model.value = e.options.reduce((w, g, p) => (w[p] = typeof g == "object" && (g == null ? void 0 : g.min) || e.min, w), {}));
|
|
1861
1929
|
}), he(
|
|
1862
1930
|
"Menu",
|
|
1863
1931
|
() => u.value,
|
|
1864
1932
|
() => ({ autoClose: "outside", placement: e.placement }),
|
|
1865
1933
|
{
|
|
1866
|
-
onCreate(w,
|
|
1934
|
+
onCreate(w, g) {
|
|
1867
1935
|
["show", "shown", "hide", "hidden"].forEach(
|
|
1868
|
-
(
|
|
1936
|
+
(p) => g.addEventListener(`${p}.bs.menu`, ($) => n(p, $))
|
|
1869
1937
|
);
|
|
1870
1938
|
}
|
|
1871
1939
|
}
|
|
1872
|
-
), { ...a, t: l, toggle: u, total: t, unitText: d, normalized:
|
|
1940
|
+
), { ...a, t: l, toggle: u, total: t, unitText: d, normalized: y };
|
|
1873
1941
|
}
|
|
1874
|
-
}),
|
|
1942
|
+
}), Wl = { class: "multi-quantity-input fanum" }, Ql = ["disabled"], Jl = { class: "combobox-value" }, Zl = { class: "menu p-3" }, Yl = ["innerHTML"], xl = { key: 1 }, _l = {
|
|
1875
1943
|
key: 2,
|
|
1876
1944
|
class: "form-text mt-0"
|
|
1877
1945
|
};
|
|
1878
|
-
function
|
|
1946
|
+
function ea(e, n, a, l, u, i) {
|
|
1879
1947
|
const t = oe("QuantityInput"), d = oe("GroupControl");
|
|
1880
|
-
return
|
|
1881
|
-
|
|
1948
|
+
return m(), v("div", Wl, [
|
|
1949
|
+
h("button", {
|
|
1882
1950
|
ref: "toggle",
|
|
1883
1951
|
type: "button",
|
|
1884
1952
|
class: q(["form-control combobox-toggle", { "is-invalid": e.isInvalid }]),
|
|
@@ -1886,26 +1954,26 @@ function Gl(e, n, a, l, u, i) {
|
|
|
1886
1954
|
"aria-haspopup": "true",
|
|
1887
1955
|
disabled: e.isDisabled || e.readonly
|
|
1888
1956
|
}, [
|
|
1889
|
-
|
|
1890
|
-
], 10,
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
default:
|
|
1894
|
-
(
|
|
1895
|
-
key:
|
|
1957
|
+
h("span", Jl, V(e.total) + " " + V(e.unitText), 1)
|
|
1958
|
+
], 10, Ql),
|
|
1959
|
+
h("div", Zl, [
|
|
1960
|
+
Ne(d, { name: e.name }, {
|
|
1961
|
+
default: xe(() => [
|
|
1962
|
+
(m(!0), v(W, null, ae(e.normalized, (y) => (m(), v("div", {
|
|
1963
|
+
key: y.key,
|
|
1896
1964
|
class: "d-flex align-items-center justify-content-between gap-3 py-1"
|
|
1897
1965
|
}, [
|
|
1898
|
-
|
|
1899
|
-
|
|
1966
|
+
h("div", null, [
|
|
1967
|
+
y.html ? (m(), v("span", {
|
|
1900
1968
|
key: 0,
|
|
1901
|
-
innerHTML:
|
|
1902
|
-
}, null, 8,
|
|
1903
|
-
|
|
1969
|
+
innerHTML: y.name
|
|
1970
|
+
}, null, 8, Yl)) : (m(), v("span", xl, V(y.name), 1)),
|
|
1971
|
+
y.description ? (m(), v("div", _l, V(y.description), 1)) : M("", !0)
|
|
1904
1972
|
]),
|
|
1905
|
-
|
|
1906
|
-
name: String(
|
|
1907
|
-
min:
|
|
1908
|
-
max:
|
|
1973
|
+
Ne(t, {
|
|
1974
|
+
name: String(y.key),
|
|
1975
|
+
min: y.min,
|
|
1976
|
+
max: y.max,
|
|
1909
1977
|
readonly: e.readonly,
|
|
1910
1978
|
unit: ""
|
|
1911
1979
|
}, null, 8, ["name", "min", "max", "readonly"])
|
|
@@ -1916,11 +1984,11 @@ function Gl(e, n, a, l, u, i) {
|
|
|
1916
1984
|
])
|
|
1917
1985
|
]);
|
|
1918
1986
|
}
|
|
1919
|
-
const
|
|
1987
|
+
const na = /* @__PURE__ */ R(Gl, [["render", ea]]), ta = F({
|
|
1920
1988
|
name: "OTPInput",
|
|
1921
1989
|
emits: ["update:modelValue", "change", "input", "complete", "focus", "blur"],
|
|
1922
1990
|
props: {
|
|
1923
|
-
...
|
|
1991
|
+
...z,
|
|
1924
1992
|
/** Number of characters. */
|
|
1925
1993
|
length: { type: Number, default: null },
|
|
1926
1994
|
/** Legacy alias of `length`. */
|
|
@@ -1937,14 +2005,14 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
|
|
|
1937
2005
|
autofocus: { type: Boolean, default: !1 }
|
|
1938
2006
|
},
|
|
1939
2007
|
setup(e, { emit: n, expose: a }) {
|
|
1940
|
-
const l =
|
|
2008
|
+
const l = P(e, n), u = E(null), i = E(null);
|
|
1941
2009
|
let t = !1, d = [];
|
|
1942
|
-
const
|
|
1943
|
-
function
|
|
2010
|
+
const y = () => e.length ?? e.maxLength ?? 6, w = (o) => o == null ? "" : String(o);
|
|
2011
|
+
function g() {
|
|
1944
2012
|
var o;
|
|
1945
2013
|
(o = i.value) == null || o.classList.toggle("is-invalid", l.isInvalid.value);
|
|
1946
2014
|
}
|
|
1947
|
-
function
|
|
2015
|
+
function p() {
|
|
1948
2016
|
const o = $.value;
|
|
1949
2017
|
if (!o) return;
|
|
1950
2018
|
const r = w(l.model.value);
|
|
@@ -1957,11 +2025,11 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
|
|
|
1957
2025
|
}
|
|
1958
2026
|
}
|
|
1959
2027
|
}
|
|
1960
|
-
const { instance: $, create:
|
|
2028
|
+
const { instance: $, create: k } = he(
|
|
1961
2029
|
"OtpInput",
|
|
1962
2030
|
() => u.value,
|
|
1963
2031
|
() => ({
|
|
1964
|
-
length:
|
|
2032
|
+
length: y(),
|
|
1965
2033
|
type: e.type,
|
|
1966
2034
|
mask: e.mask,
|
|
1967
2035
|
groups: e.groups,
|
|
@@ -1969,15 +2037,15 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
|
|
|
1969
2037
|
}),
|
|
1970
2038
|
{
|
|
1971
2039
|
onCreate(o, r) {
|
|
1972
|
-
const s = (c,
|
|
1973
|
-
r.addEventListener(c,
|
|
2040
|
+
const s = (c, C) => {
|
|
2041
|
+
r.addEventListener(c, C), d.push(() => r.removeEventListener(c, C));
|
|
1974
2042
|
};
|
|
1975
2043
|
s("input.bs.otpInput", (c) => {
|
|
1976
2044
|
t || (l.model.value = c.value, n("input", c.value, c), l.emitChange(c.value, c));
|
|
1977
2045
|
}), s("complete.bs.otpInput", (c) => {
|
|
1978
|
-
var
|
|
1979
|
-
t || (n("complete", c.value), e.autoSubmit && ((j = (
|
|
1980
|
-
}),
|
|
2046
|
+
var C, j;
|
|
2047
|
+
t || (n("complete", c.value), e.autoSubmit && ((j = (C = l.formApi) == null ? void 0 : C.submit) == null || j.call(C)));
|
|
2048
|
+
}), p(), g(), e.autofocus && o.focus();
|
|
1981
2049
|
},
|
|
1982
2050
|
onDestroy() {
|
|
1983
2051
|
d.forEach((o) => o()), d = [];
|
|
@@ -1986,10 +2054,10 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
|
|
|
1986
2054
|
);
|
|
1987
2055
|
return J(() => {
|
|
1988
2056
|
i.value && (i.value.value = w(l.model.value));
|
|
1989
|
-
}),
|
|
1990
|
-
() => [
|
|
2057
|
+
}), U(() => l.model.value, p), U(l.isInvalid, g, { flush: "post" }), U(
|
|
2058
|
+
() => [y(), e.type, e.mask, e.groups, e.separator],
|
|
1991
2059
|
async () => {
|
|
1992
|
-
await
|
|
2060
|
+
await X(), k();
|
|
1993
2061
|
},
|
|
1994
2062
|
{ deep: !0 }
|
|
1995
2063
|
), a({
|
|
@@ -2003,13 +2071,13 @@ const Wl = /* @__PURE__ */ R(Ll, [["render", Gl]]), Ql = F({
|
|
|
2003
2071
|
}
|
|
2004
2072
|
}), { ...l, el: u, input: i };
|
|
2005
2073
|
}
|
|
2006
|
-
}),
|
|
2074
|
+
}), la = {
|
|
2007
2075
|
ref: "el",
|
|
2008
2076
|
class: "otp fanum"
|
|
2009
|
-
},
|
|
2010
|
-
function
|
|
2011
|
-
return
|
|
2012
|
-
|
|
2077
|
+
}, aa = ["name", "id", "disabled", "readonly", "required", "aria-invalid"];
|
|
2078
|
+
function oa(e, n, a, l, u, i) {
|
|
2079
|
+
return m(), v("div", la, [
|
|
2080
|
+
h("input", {
|
|
2013
2081
|
ref: "input",
|
|
2014
2082
|
type: "text",
|
|
2015
2083
|
name: e.name,
|
|
@@ -2020,19 +2088,19 @@ function Yl(e, n, a, l, u, i) {
|
|
|
2020
2088
|
"aria-invalid": e.isInvalid || void 0,
|
|
2021
2089
|
onFocus: n[0] || (n[0] = (t) => e.$emit("focus", t)),
|
|
2022
2090
|
onBlur: n[1] || (n[1] = (t) => e.$emit("blur", t))
|
|
2023
|
-
}, null, 40,
|
|
2091
|
+
}, null, 40, aa)
|
|
2024
2092
|
], 512);
|
|
2025
2093
|
}
|
|
2026
|
-
const
|
|
2094
|
+
const ra = /* @__PURE__ */ R(ta, [["render", oa]]), un = {
|
|
2027
2095
|
en: { weak: "Weak", fair: "Fair", good: "Good", strong: "Strong" },
|
|
2028
2096
|
fa: { weak: "ضعیف", fair: "متوسط", good: "خوب", strong: "قوی" }
|
|
2029
|
-
},
|
|
2097
|
+
}, sa = F({
|
|
2030
2098
|
name: "PasswordInput",
|
|
2031
|
-
components: { TextInput: ze, FormAdornInput:
|
|
2099
|
+
components: { TextInput: ze, FormAdornInput: _e },
|
|
2032
2100
|
inheritAttrs: !1,
|
|
2033
2101
|
emits: ["toggle", "strength"],
|
|
2034
2102
|
props: {
|
|
2035
|
-
...
|
|
2103
|
+
...z,
|
|
2036
2104
|
name: { type: String, default: "password" },
|
|
2037
2105
|
placeholder: { type: String, default: null },
|
|
2038
2106
|
/** Show a "reveal password" button. */
|
|
@@ -2049,16 +2117,16 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
|
|
|
2049
2117
|
locale: { type: String, default: null }
|
|
2050
2118
|
},
|
|
2051
2119
|
setup(e, { emit: n, expose: a }) {
|
|
2052
|
-
const { t: l, locale: u } = Q(() => e.locale), i =
|
|
2053
|
-
}), t = E(null), d = E(null),
|
|
2054
|
-
...
|
|
2120
|
+
const { t: l, locale: u } = Q(() => e.locale), i = P(e, () => {
|
|
2121
|
+
}), t = E(null), d = E(null), y = E(!1), w = S(() => ({
|
|
2122
|
+
...un[u.value] || un.en,
|
|
2055
2123
|
...e.strengthMessages || {}
|
|
2056
2124
|
}));
|
|
2057
|
-
function
|
|
2058
|
-
|
|
2125
|
+
function g() {
|
|
2126
|
+
y.value = !y.value, n("toggle", y.value);
|
|
2059
2127
|
}
|
|
2060
|
-
let
|
|
2061
|
-
const { instance: $, create:
|
|
2128
|
+
let p = [];
|
|
2129
|
+
const { instance: $, create: k } = he(
|
|
2062
2130
|
"Strength",
|
|
2063
2131
|
() => e.strength ? d.value : null,
|
|
2064
2132
|
() => {
|
|
@@ -2071,24 +2139,24 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
|
|
|
2071
2139
|
},
|
|
2072
2140
|
{
|
|
2073
2141
|
onCreate(r, s) {
|
|
2074
|
-
const c = (
|
|
2075
|
-
s.addEventListener("strengthChange.bs.strength", c),
|
|
2142
|
+
const c = (C) => n("strength", C.strength ?? null, C.score ?? 0);
|
|
2143
|
+
s.addEventListener("strengthChange.bs.strength", c), p.push(() => s.removeEventListener("strengthChange.bs.strength", c));
|
|
2076
2144
|
},
|
|
2077
2145
|
onDestroy() {
|
|
2078
|
-
|
|
2146
|
+
p.forEach((r) => r()), p = [];
|
|
2079
2147
|
}
|
|
2080
2148
|
}
|
|
2081
2149
|
);
|
|
2082
|
-
|
|
2150
|
+
U(
|
|
2083
2151
|
() => i.model.value,
|
|
2084
|
-
() =>
|
|
2152
|
+
() => X(() => {
|
|
2085
2153
|
var r;
|
|
2086
2154
|
return (r = $.value) == null ? void 0 : r.evaluate();
|
|
2087
2155
|
})
|
|
2088
|
-
),
|
|
2156
|
+
), U(
|
|
2089
2157
|
() => [e.strength, e.toggle, e.strengthText, w.value, e.strengthOptions],
|
|
2090
2158
|
async () => {
|
|
2091
|
-
await
|
|
2159
|
+
await X(), e.strength && k();
|
|
2092
2160
|
},
|
|
2093
2161
|
{ deep: !0 }
|
|
2094
2162
|
), a({ strength: () => {
|
|
@@ -2106,12 +2174,12 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
|
|
|
2106
2174
|
size: e.size,
|
|
2107
2175
|
placeholder: e.placeholder ?? l("password.placeholder")
|
|
2108
2176
|
}));
|
|
2109
|
-
return { t: l, root: t, meter: d, visible:
|
|
2177
|
+
return { t: l, root: t, meter: d, visible: y, toggleVisible: g, forwarded: o };
|
|
2110
2178
|
}
|
|
2111
|
-
}),
|
|
2179
|
+
}), ia = {
|
|
2112
2180
|
ref: "root",
|
|
2113
2181
|
class: "password-input"
|
|
2114
|
-
},
|
|
2182
|
+
}, ua = ["aria-label", "aria-pressed"], da = {
|
|
2115
2183
|
key: 0,
|
|
2116
2184
|
width: "16",
|
|
2117
2185
|
height: "16",
|
|
@@ -2122,7 +2190,7 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
|
|
|
2122
2190
|
"stroke-linecap": "round",
|
|
2123
2191
|
"stroke-linejoin": "round",
|
|
2124
2192
|
"aria-hidden": "true"
|
|
2125
|
-
},
|
|
2193
|
+
}, ca = {
|
|
2126
2194
|
key: 1,
|
|
2127
2195
|
width: "16",
|
|
2128
2196
|
height: "16",
|
|
@@ -2133,63 +2201,63 @@ const xl = /* @__PURE__ */ R(Ql, [["render", Yl]]), rn = {
|
|
|
2133
2201
|
"stroke-linecap": "round",
|
|
2134
2202
|
"stroke-linejoin": "round",
|
|
2135
2203
|
"aria-hidden": "true"
|
|
2136
|
-
},
|
|
2204
|
+
}, fa = {
|
|
2137
2205
|
ref: "meter",
|
|
2138
2206
|
class: "strength",
|
|
2139
2207
|
"aria-hidden": "true"
|
|
2140
|
-
},
|
|
2208
|
+
}, pa = {
|
|
2141
2209
|
key: 0,
|
|
2142
2210
|
class: "strength-text",
|
|
2143
2211
|
"aria-live": "polite"
|
|
2144
2212
|
};
|
|
2145
|
-
function
|
|
2213
|
+
function ma(e, n, a, l, u, i) {
|
|
2146
2214
|
const t = oe("FormAdornInput"), d = oe("TextInput");
|
|
2147
|
-
return
|
|
2148
|
-
e.toggle ? (
|
|
2215
|
+
return m(), v("div", ia, [
|
|
2216
|
+
e.toggle ? (m(), le(t, Qe({ key: 0 }, { ...e.$attrs, ...e.forwarded }, {
|
|
2149
2217
|
type: e.visible ? "text" : "password",
|
|
2150
2218
|
autocomplete: "current-password"
|
|
2151
2219
|
}), {
|
|
2152
|
-
end:
|
|
2153
|
-
|
|
2220
|
+
end: xe(() => [
|
|
2221
|
+
h("button", {
|
|
2154
2222
|
type: "button",
|
|
2155
2223
|
class: "btn-text theme-secondary btn-icon",
|
|
2156
2224
|
"aria-label": e.visible ? e.t("password.hide") : e.t("password.show"),
|
|
2157
2225
|
"aria-pressed": e.visible,
|
|
2158
|
-
onClick: n[0] || (n[0] = (...
|
|
2226
|
+
onClick: n[0] || (n[0] = (...y) => e.toggleVisible && e.toggleVisible(...y))
|
|
2159
2227
|
}, [
|
|
2160
|
-
e.visible ? (
|
|
2161
|
-
|
|
2162
|
-
]))) : (
|
|
2163
|
-
|
|
2164
|
-
|
|
2228
|
+
e.visible ? (m(), v("svg", ca, n[2] || (n[2] = [
|
|
2229
|
+
h("path", { d: "M2 2l12 12M6.6 3.7A7 7 0 0 1 8 3.5C12.5 3.5 15 8 15 8a11 11 0 0 1-2.2 2.6M4 5.4A11 11 0 0 0 1 8s2.5 4.5 7 4.5c1 0 1.9-.2 2.7-.6" }, null, -1)
|
|
2230
|
+
]))) : (m(), v("svg", da, n[1] || (n[1] = [
|
|
2231
|
+
h("path", { d: "M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Z" }, null, -1),
|
|
2232
|
+
h("circle", {
|
|
2165
2233
|
cx: "8",
|
|
2166
2234
|
cy: "8",
|
|
2167
2235
|
r: "2"
|
|
2168
2236
|
}, null, -1)
|
|
2169
2237
|
])))
|
|
2170
|
-
], 8,
|
|
2238
|
+
], 8, ua)
|
|
2171
2239
|
]),
|
|
2172
2240
|
_: 1
|
|
2173
|
-
}, 16, ["type"])) : (
|
|
2241
|
+
}, 16, ["type"])) : (m(), le(d, Qe({ key: 1 }, { ...e.$attrs, ...e.forwarded }, {
|
|
2174
2242
|
type: "password",
|
|
2175
2243
|
autocomplete: "current-password"
|
|
2176
2244
|
}), null, 16)),
|
|
2177
|
-
e.strength ? (
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2245
|
+
e.strength ? (m(), v(W, { key: 2 }, [
|
|
2246
|
+
h("div", fa, n[3] || (n[3] = [
|
|
2247
|
+
h("div", { class: "strength-segment" }, null, -1),
|
|
2248
|
+
h("div", { class: "strength-segment" }, null, -1),
|
|
2249
|
+
h("div", { class: "strength-segment" }, null, -1),
|
|
2250
|
+
h("div", { class: "strength-segment" }, null, -1)
|
|
2183
2251
|
]), 512),
|
|
2184
|
-
e.strengthText ? (
|
|
2252
|
+
e.strengthText ? (m(), v("div", pa)) : M("", !0)
|
|
2185
2253
|
], 64)) : M("", !0)
|
|
2186
2254
|
], 512);
|
|
2187
2255
|
}
|
|
2188
|
-
const
|
|
2256
|
+
const ha = /* @__PURE__ */ R(sa, [["render", ma]]), va = F({
|
|
2189
2257
|
name: "RangeInput",
|
|
2190
2258
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
2191
2259
|
props: {
|
|
2192
|
-
...
|
|
2260
|
+
...z,
|
|
2193
2261
|
min: { type: Number, default: 0 },
|
|
2194
2262
|
max: { type: Number, default: 100 },
|
|
2195
2263
|
step: { type: Number, default: 1 },
|
|
@@ -2201,43 +2269,43 @@ const sa = /* @__PURE__ */ R(_l, [["render", ra]]), ia = F({
|
|
|
2201
2269
|
ticks: { type: Array, default: () => [] }
|
|
2202
2270
|
},
|
|
2203
2271
|
setup(e, { emit: n }) {
|
|
2204
|
-
const a =
|
|
2205
|
-
const
|
|
2206
|
-
return a.model.value === null || a.model.value === void 0 || Number.isNaN(
|
|
2272
|
+
const a = P(e, n), l = E(null), u = E(null), i = S(() => {
|
|
2273
|
+
const p = Number(a.model.value);
|
|
2274
|
+
return a.model.value === null || a.model.value === void 0 || Number.isNaN(p) ? e.min : p;
|
|
2207
2275
|
}), t = S(() => e.ticks.length ? `${a.inputId.value}-ticks` : void 0), d = S(
|
|
2208
|
-
() => e.ticks.map((
|
|
2276
|
+
() => e.ticks.map((p) => typeof p == "object" && p !== null ? p : { value: p, label: e.formatter ? e.formatter(p) : String(p) })
|
|
2209
2277
|
);
|
|
2210
|
-
function
|
|
2211
|
-
const $ = Number(
|
|
2212
|
-
a.model.value = $, n("input", $,
|
|
2278
|
+
function y(p) {
|
|
2279
|
+
const $ = Number(p.target.value);
|
|
2280
|
+
a.model.value = $, n("input", $, p);
|
|
2213
2281
|
}
|
|
2214
|
-
const { instance: w, create:
|
|
2282
|
+
const { instance: w, create: g } = he(
|
|
2215
2283
|
"Range",
|
|
2216
2284
|
() => l.value,
|
|
2217
2285
|
() => ({ bubble: e.bubble, formatter: e.formatter })
|
|
2218
2286
|
);
|
|
2219
|
-
return
|
|
2287
|
+
return U(
|
|
2220
2288
|
() => [a.model.value, e.min, e.max],
|
|
2221
|
-
() =>
|
|
2222
|
-
var
|
|
2223
|
-
return (
|
|
2289
|
+
() => X(() => {
|
|
2290
|
+
var p;
|
|
2291
|
+
return (p = w.value) == null ? void 0 : p.update();
|
|
2224
2292
|
}),
|
|
2225
2293
|
{ flush: "post" }
|
|
2226
|
-
),
|
|
2294
|
+
), U(
|
|
2227
2295
|
() => [e.bubble, e.formatter, e.ticks, e.min, e.max],
|
|
2228
2296
|
async () => {
|
|
2229
|
-
await
|
|
2297
|
+
await X(), g();
|
|
2230
2298
|
},
|
|
2231
2299
|
{ deep: !0 }
|
|
2232
|
-
), { ...a, el: l, input: u, current: i, listId: t, tickItems: d, onInput:
|
|
2300
|
+
), { ...a, el: l, input: u, current: i, listId: t, tickItems: d, onInput: y };
|
|
2233
2301
|
}
|
|
2234
|
-
}),
|
|
2302
|
+
}), ga = {
|
|
2235
2303
|
ref: "el",
|
|
2236
2304
|
class: "form-range"
|
|
2237
|
-
},
|
|
2238
|
-
function
|
|
2239
|
-
return
|
|
2240
|
-
|
|
2305
|
+
}, ya = ["name", "id", "min", "max", "step", "list", "disabled", "aria-invalid", "value"], ba = ["id"], $a = ["value", "label"];
|
|
2306
|
+
function wa(e, n, a, l, u, i) {
|
|
2307
|
+
return m(), v("div", ga, [
|
|
2308
|
+
h("input", {
|
|
2241
2309
|
ref: "input",
|
|
2242
2310
|
type: "range",
|
|
2243
2311
|
class: q(["form-range-input", { "is-invalid": e.isInvalid }]),
|
|
@@ -2254,30 +2322,30 @@ function pa(e, n, a, l, u, i) {
|
|
|
2254
2322
|
onChange: n[1] || (n[1] = (t) => e.emitChange(Number(t.target.value), t)),
|
|
2255
2323
|
onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
|
|
2256
2324
|
onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
|
|
2257
|
-
}, null, 42,
|
|
2258
|
-
e.listId ? (
|
|
2325
|
+
}, null, 42, ya),
|
|
2326
|
+
e.listId ? (m(), v("datalist", {
|
|
2259
2327
|
key: 0,
|
|
2260
2328
|
id: e.listId
|
|
2261
2329
|
}, [
|
|
2262
|
-
(
|
|
2330
|
+
(m(!0), v(W, null, ae(e.tickItems, (t) => (m(), v("option", {
|
|
2263
2331
|
key: t.value,
|
|
2264
2332
|
value: t.value,
|
|
2265
2333
|
label: t.label
|
|
2266
|
-
}, null, 8,
|
|
2267
|
-
], 8,
|
|
2334
|
+
}, null, 8, $a))), 128))
|
|
2335
|
+
], 8, ba)) : M("", !0)
|
|
2268
2336
|
], 512);
|
|
2269
2337
|
}
|
|
2270
|
-
const
|
|
2338
|
+
const $n = /* @__PURE__ */ R(va, [["render", wa]]), Sa = F({
|
|
2271
2339
|
name: "SimpleUploader",
|
|
2272
2340
|
inheritAttrs: !0,
|
|
2273
2341
|
setup(e, { attrs: n, slots: a }) {
|
|
2274
|
-
return () =>
|
|
2342
|
+
return () => kn(vn, n, a);
|
|
2275
2343
|
}
|
|
2276
|
-
}),
|
|
2344
|
+
}), ka = F({
|
|
2277
2345
|
name: "StarRatingInput",
|
|
2278
2346
|
emits: ["update:modelValue", "change", "hover"],
|
|
2279
2347
|
props: {
|
|
2280
|
-
...
|
|
2348
|
+
...z,
|
|
2281
2349
|
/** Initial rating used when the model is empty. */
|
|
2282
2350
|
value: { type: Number, default: 0 },
|
|
2283
2351
|
maxStars: { type: Number, default: 5 },
|
|
@@ -2288,61 +2356,61 @@ const yn = /* @__PURE__ */ R(ia, [["render", pa]]), ma = F({
|
|
|
2288
2356
|
clearable: { type: Boolean, default: !1 }
|
|
2289
2357
|
},
|
|
2290
2358
|
setup(e, { emit: n }) {
|
|
2291
|
-
const a =
|
|
2359
|
+
const a = P(e, n), l = E(null), u = E(null), i = E(!1);
|
|
2292
2360
|
J(() => {
|
|
2293
2361
|
l.value && (i.value = getComputedStyle(l.value).direction === "rtl");
|
|
2294
2362
|
});
|
|
2295
2363
|
const t = S(() => e.readonly || a.isDisabled.value), d = S(() => {
|
|
2296
2364
|
const c = Number(a.model.value);
|
|
2297
2365
|
return a.model.value === null || a.model.value === void 0 || Number.isNaN(c) ? e.value : c;
|
|
2298
|
-
}),
|
|
2299
|
-
function
|
|
2300
|
-
const
|
|
2301
|
-
return Math.min(e.maxStars, Math.max(w.value,
|
|
2366
|
+
}), y = S(() => u.value ?? d.value), w = S(() => 1 / e.precision), g = (c) => Math.max(0, Math.min(1, y.value - (c - 1))) * 100;
|
|
2367
|
+
function p(c) {
|
|
2368
|
+
const C = l.value.getBoundingClientRect(), j = i.value ? C.right - c.clientX : c.clientX - C.left, A = C.width / e.maxStars, H = Math.ceil(j / A * e.precision) / e.precision;
|
|
2369
|
+
return Math.min(e.maxStars, Math.max(w.value, H));
|
|
2302
2370
|
}
|
|
2303
2371
|
function $(c) {
|
|
2304
|
-
t.value || (u.value =
|
|
2372
|
+
t.value || (u.value = p(c), n("hover", u.value));
|
|
2305
2373
|
}
|
|
2306
|
-
function
|
|
2374
|
+
function k() {
|
|
2307
2375
|
u.value = null;
|
|
2308
2376
|
}
|
|
2309
|
-
function o(c,
|
|
2377
|
+
function o(c, C) {
|
|
2310
2378
|
if (t.value) return;
|
|
2311
2379
|
const j = e.clearable && c === d.value ? 0 : c;
|
|
2312
|
-
a.model.value = j, a.emitChange(j,
|
|
2380
|
+
a.model.value = j, a.emitChange(j, C);
|
|
2313
2381
|
}
|
|
2314
2382
|
function r(c) {
|
|
2315
|
-
t.value || o(
|
|
2383
|
+
t.value || o(p(c), c);
|
|
2316
2384
|
}
|
|
2317
2385
|
function s(c) {
|
|
2318
2386
|
if (t.value) return;
|
|
2319
|
-
const
|
|
2387
|
+
const C = i.value ? "ArrowLeft" : "ArrowRight", j = i.value ? "ArrowRight" : "ArrowLeft";
|
|
2320
2388
|
let A = null;
|
|
2321
|
-
c.key ===
|
|
2389
|
+
c.key === C || c.key === "ArrowUp" ? A = d.value + w.value : c.key === j || c.key === "ArrowDown" ? A = d.value - w.value : c.key === "Home" ? A = 0 : c.key === "End" && (A = e.maxStars), A !== null && (c.preventDefault(), o(Math.min(e.maxStars, Math.max(0, Number(A.toFixed(4)))), c));
|
|
2322
2390
|
}
|
|
2323
2391
|
return {
|
|
2324
2392
|
...a,
|
|
2325
2393
|
container: l,
|
|
2326
|
-
rating:
|
|
2394
|
+
rating: y,
|
|
2327
2395
|
stored: d,
|
|
2328
|
-
fillOf:
|
|
2396
|
+
fillOf: g,
|
|
2329
2397
|
onMove: $,
|
|
2330
|
-
leave:
|
|
2398
|
+
leave: k,
|
|
2331
2399
|
onClick: r,
|
|
2332
2400
|
onKeydown: s,
|
|
2333
2401
|
locked: t,
|
|
2334
|
-
display: S(() =>
|
|
2402
|
+
display: S(() => y.value.toFixed(1))
|
|
2335
2403
|
};
|
|
2336
2404
|
}
|
|
2337
|
-
}),
|
|
2405
|
+
}), Ia = ["tabindex", "aria-valuemax", "aria-valuenow", "aria-readonly", "aria-invalid"], Ca = ["name", "value"], Ta = {
|
|
2338
2406
|
key: 1,
|
|
2339
2407
|
class: "rating-value fanum"
|
|
2340
2408
|
};
|
|
2341
|
-
function
|
|
2342
|
-
return
|
|
2409
|
+
function Ma(e, n, a, l, u, i) {
|
|
2410
|
+
return m(), v("div", {
|
|
2343
2411
|
class: q(["star-rating d-flex align-items-center gap-2", { "is-invalid": e.isInvalid }])
|
|
2344
2412
|
}, [
|
|
2345
|
-
|
|
2413
|
+
h("div", {
|
|
2346
2414
|
ref: "container",
|
|
2347
2415
|
class: "star-rating-container d-flex position-relative",
|
|
2348
2416
|
role: "slider",
|
|
@@ -2358,31 +2426,31 @@ function ba(e, n, a, l, u, i) {
|
|
|
2358
2426
|
onClick: n[2] || (n[2] = (...t) => e.onClick && e.onClick(...t)),
|
|
2359
2427
|
onKeydown: n[3] || (n[3] = (...t) => e.onKeydown && e.onKeydown(...t))
|
|
2360
2428
|
}, [
|
|
2361
|
-
(
|
|
2429
|
+
(m(!0), v(W, null, ae(e.maxStars, (t) => (m(), v("span", {
|
|
2362
2430
|
key: t,
|
|
2363
2431
|
class: "star-wrapper position-relative d-inline-block fs-2xl lh-1"
|
|
2364
2432
|
}, [
|
|
2365
|
-
n[4] || (n[4] =
|
|
2433
|
+
n[4] || (n[4] = h("span", {
|
|
2366
2434
|
class: "star-bg fg-secondary opacity-50",
|
|
2367
2435
|
"aria-hidden": "true"
|
|
2368
2436
|
}, "★", -1)),
|
|
2369
|
-
|
|
2437
|
+
h("span", {
|
|
2370
2438
|
class: "star-overlay fg-warning",
|
|
2371
2439
|
"aria-hidden": "true",
|
|
2372
2440
|
style: se({ position: "absolute", top: 0, insetInlineStart: 0, overflow: "hidden", whiteSpace: "nowrap", width: e.fillOf(t) + "%" })
|
|
2373
2441
|
}, "★", 4)
|
|
2374
2442
|
]))), 128))
|
|
2375
|
-
], 44,
|
|
2376
|
-
e.name ? (
|
|
2443
|
+
], 44, Ia),
|
|
2444
|
+
e.name ? (m(), v("input", {
|
|
2377
2445
|
key: 0,
|
|
2378
2446
|
type: "hidden",
|
|
2379
2447
|
name: e.name,
|
|
2380
2448
|
value: e.stored
|
|
2381
|
-
}, null, 8,
|
|
2382
|
-
e.showValue && e.rating > 0 ? (
|
|
2449
|
+
}, null, 8, Ca)) : M("", !0),
|
|
2450
|
+
e.showValue && e.rating > 0 ? (m(), v("span", Ta, V(e.display), 1)) : M("", !0)
|
|
2383
2451
|
], 2);
|
|
2384
2452
|
}
|
|
2385
|
-
const
|
|
2453
|
+
const Ba = /* @__PURE__ */ R(ka, [["render", Ma]]), Ea = F({
|
|
2386
2454
|
name: "SubmitButton",
|
|
2387
2455
|
emits: ["click"],
|
|
2388
2456
|
props: {
|
|
@@ -2398,8 +2466,8 @@ const $a = /* @__PURE__ */ R(ha, [["render", ba]]), wa = F({
|
|
|
2398
2466
|
setup(e, { emit: n }) {
|
|
2399
2467
|
const a = me("form", null), l = S(() => (a == null ? void 0 : a.value) ?? null), { t: u } = Q(() => e.locale), i = S(
|
|
2400
2468
|
() => {
|
|
2401
|
-
var d,
|
|
2402
|
-
return e.loading !== null ? e.loading : !!((d = l.value) != null && d.processing || (
|
|
2469
|
+
var d, y;
|
|
2470
|
+
return e.loading !== null ? e.loading : !!((d = l.value) != null && d.processing || (y = l.value) != null && y.uploading);
|
|
2403
2471
|
}
|
|
2404
2472
|
), t = S(() => [
|
|
2405
2473
|
e.variant ? `btn-${e.variant}` : null,
|
|
@@ -2407,25 +2475,25 @@ const $a = /* @__PURE__ */ R(ha, [["render", ba]]), wa = F({
|
|
|
2407
2475
|
]);
|
|
2408
2476
|
return { form: l, busy: i, classes: t, t: u, onClick: (d) => n("click", d) };
|
|
2409
2477
|
}
|
|
2410
|
-
}),
|
|
2478
|
+
}), Aa = ["disabled", "aria-busy"], Oa = {
|
|
2411
2479
|
key: 0,
|
|
2412
2480
|
class: "spinner-border spinner-sm me-2",
|
|
2413
2481
|
role: "status",
|
|
2414
2482
|
"aria-hidden": "true"
|
|
2415
|
-
},
|
|
2483
|
+
}, Va = {
|
|
2416
2484
|
key: 0,
|
|
2417
2485
|
class: "fanum"
|
|
2418
2486
|
};
|
|
2419
|
-
function
|
|
2487
|
+
function Da(e, n, a, l, u, i) {
|
|
2420
2488
|
var t;
|
|
2421
|
-
return
|
|
2489
|
+
return m(), v("button", {
|
|
2422
2490
|
type: "submit",
|
|
2423
2491
|
class: q(e.classes),
|
|
2424
2492
|
disabled: e.disabled || e.busy,
|
|
2425
2493
|
"aria-busy": e.busy || void 0,
|
|
2426
2494
|
onClick: n[0] || (n[0] = (...d) => e.onClick && e.onClick(...d))
|
|
2427
2495
|
}, [
|
|
2428
|
-
e.busy ? (
|
|
2496
|
+
e.busy ? (m(), v("span", Oa)) : M("", !0),
|
|
2429
2497
|
L(e.$slots, "default", {
|
|
2430
2498
|
form: e.form,
|
|
2431
2499
|
loading: e.busy
|
|
@@ -2437,16 +2505,16 @@ function Ca(e, n, a, l, u, i) {
|
|
|
2437
2505
|
}, () => {
|
|
2438
2506
|
var d;
|
|
2439
2507
|
return [
|
|
2440
|
-
(d = e.form) != null && d.uploading ? (
|
|
2508
|
+
(d = e.form) != null && d.uploading ? (m(), v("span", Va, V(e.form.uploading) + "%", 1)) : M("", !0)
|
|
2441
2509
|
];
|
|
2442
2510
|
})
|
|
2443
|
-
], 10,
|
|
2511
|
+
], 10, Aa);
|
|
2444
2512
|
}
|
|
2445
|
-
const
|
|
2513
|
+
const Na = /* @__PURE__ */ R(Ea, [["render", Da]]), qa = F({
|
|
2446
2514
|
name: "SwitchInput",
|
|
2447
2515
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
2448
2516
|
props: {
|
|
2449
|
-
...
|
|
2517
|
+
...z,
|
|
2450
2518
|
value: { type: [String, Number, Boolean, Object], default: null },
|
|
2451
2519
|
trueValue: { type: null, default: !0 },
|
|
2452
2520
|
falseValue: { type: null, default: !1 },
|
|
@@ -2454,7 +2522,7 @@ const Ta = /* @__PURE__ */ R(wa, [["render", Ca]]), Ma = F({
|
|
|
2454
2522
|
label: { type: String, default: null }
|
|
2455
2523
|
},
|
|
2456
2524
|
setup(e, { emit: n }) {
|
|
2457
|
-
const a = E(null), l =
|
|
2525
|
+
const a = E(null), l = P(e, n, { valued: () => e.value });
|
|
2458
2526
|
return je(e, l, a, { type: () => "checkbox" }), {
|
|
2459
2527
|
...l,
|
|
2460
2528
|
input: a,
|
|
@@ -2462,11 +2530,11 @@ const Ta = /* @__PURE__ */ R(wa, [["render", Ca]]), Ma = F({
|
|
|
2462
2530
|
};
|
|
2463
2531
|
},
|
|
2464
2532
|
expose: ["input"]
|
|
2465
|
-
}),
|
|
2466
|
-
function
|
|
2467
|
-
return
|
|
2468
|
-
|
|
2469
|
-
re(
|
|
2533
|
+
}), Fa = { class: "form-field" }, Ra = { class: "switch" }, La = ["name", "id", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], ja = ["for"];
|
|
2534
|
+
function za(e, n, a, l, u, i) {
|
|
2535
|
+
return m(), v("div", Fa, [
|
|
2536
|
+
h("div", Ra, [
|
|
2537
|
+
re(h("input", {
|
|
2470
2538
|
ref: "input",
|
|
2471
2539
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
|
|
2472
2540
|
name: e.name,
|
|
@@ -2484,33 +2552,33 @@ function Va(e, n, a, l, u, i) {
|
|
|
2484
2552
|
onChange: n[1] || (n[1] = (...t) => e.onChange && e.onChange(...t)),
|
|
2485
2553
|
onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
|
|
2486
2554
|
onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
|
|
2487
|
-
}, null, 42,
|
|
2488
|
-
[
|
|
2555
|
+
}, null, 42, La), [
|
|
2556
|
+
[In, e.model]
|
|
2489
2557
|
])
|
|
2490
2558
|
]),
|
|
2491
|
-
|
|
2559
|
+
h("label", { for: e.inputId }, [
|
|
2492
2560
|
L(e.$slots, "default", {}, () => [
|
|
2493
2561
|
x(V(e.label), 1)
|
|
2494
2562
|
])
|
|
2495
|
-
], 8,
|
|
2563
|
+
], 8, ja)
|
|
2496
2564
|
]);
|
|
2497
2565
|
}
|
|
2498
|
-
const
|
|
2566
|
+
const Pa = /* @__PURE__ */ R(qa, [["render", za]]), Ka = F({
|
|
2499
2567
|
name: "TextAreaInput",
|
|
2500
2568
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
2501
2569
|
props: {
|
|
2502
|
-
...
|
|
2570
|
+
...z,
|
|
2503
2571
|
rows: { type: [Number, String], default: 3 },
|
|
2504
2572
|
placeholder: { type: String, default: null },
|
|
2505
2573
|
size: { type: String, default: null }
|
|
2506
2574
|
},
|
|
2507
2575
|
setup(e, { emit: n }) {
|
|
2508
|
-
const a =
|
|
2576
|
+
const a = P(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
|
|
2509
2577
|
return { ...a, sizeClass: l, emit: n };
|
|
2510
2578
|
}
|
|
2511
|
-
}),
|
|
2512
|
-
function
|
|
2513
|
-
return re((
|
|
2579
|
+
}), Ua = ["name", "id", "rows", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
|
|
2580
|
+
function Ha(e, n, a, l, u, i) {
|
|
2581
|
+
return re((m(), v("textarea", {
|
|
2514
2582
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
|
|
2515
2583
|
name: e.name,
|
|
2516
2584
|
id: e.inputId,
|
|
@@ -2525,24 +2593,24 @@ function Fa(e, n, a, l, u, i) {
|
|
|
2525
2593
|
onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
|
|
2526
2594
|
onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
|
|
2527
2595
|
onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
|
|
2528
|
-
}, null, 42,
|
|
2529
|
-
[
|
|
2596
|
+
}, null, 42, Ua)), [
|
|
2597
|
+
[fn, e.model]
|
|
2530
2598
|
]);
|
|
2531
2599
|
}
|
|
2532
|
-
const
|
|
2533
|
-
function
|
|
2534
|
-
|
|
2600
|
+
const Xa = /* @__PURE__ */ R(Ka, [["render", Ha]]), Re = ie({}), we = ie({});
|
|
2601
|
+
function Ga(e, n) {
|
|
2602
|
+
Re[e] = n;
|
|
2535
2603
|
}
|
|
2536
|
-
function
|
|
2604
|
+
function Wa(e, n) {
|
|
2537
2605
|
var a;
|
|
2538
|
-
((a =
|
|
2606
|
+
((a = Re[e]) == null ? void 0 : a.owner) === n && delete Re[e];
|
|
2539
2607
|
}
|
|
2540
|
-
function
|
|
2608
|
+
function Qa(e) {
|
|
2541
2609
|
return we[e] = (we[e] || 0) + 1, () => {
|
|
2542
2610
|
we[e] = Math.max(0, (we[e] || 1) - 1);
|
|
2543
2611
|
};
|
|
2544
2612
|
}
|
|
2545
|
-
const
|
|
2613
|
+
const dn = (e) => String(Math.floor(e)).padStart(2, "0"), Ye = (e) => `${dn(e / 60)}:${dn(e % 60)}`, Ja = F({
|
|
2546
2614
|
name: "VoiceRecorderResultArea",
|
|
2547
2615
|
props: {
|
|
2548
2616
|
/** channel / name of the recorder to display. */
|
|
@@ -2557,55 +2625,55 @@ const sn = (e) => String(Math.floor(e)).padStart(2, "0"), Ze = (e) => `${sn(e /
|
|
|
2557
2625
|
internal: { type: Boolean, default: !1 }
|
|
2558
2626
|
},
|
|
2559
2627
|
setup(e) {
|
|
2560
|
-
const n = E(null), a = S(() =>
|
|
2628
|
+
const n = E(null), a = S(() => Re[e.for] ?? null);
|
|
2561
2629
|
let l = null;
|
|
2562
2630
|
J(() => {
|
|
2563
|
-
e.internal || (l =
|
|
2564
|
-
}),
|
|
2631
|
+
e.internal || (l = Qa(e.for));
|
|
2632
|
+
}), pn(() => l == null ? void 0 : l());
|
|
2565
2633
|
const u = (t) => {
|
|
2566
|
-
var d,
|
|
2567
|
-
return ((
|
|
2634
|
+
var d, y;
|
|
2635
|
+
return ((y = (d = a.value) == null ? void 0 : d.t) == null ? void 0 : y.call(d, t)) ?? t;
|
|
2568
2636
|
};
|
|
2569
2637
|
function i(t) {
|
|
2570
2638
|
var d;
|
|
2571
|
-
(d = n.value) == null || d.querySelectorAll("audio").forEach((
|
|
2572
|
-
|
|
2639
|
+
(d = n.value) == null || d.querySelectorAll("audio").forEach((y) => {
|
|
2640
|
+
y !== t.target && y.pause();
|
|
2573
2641
|
});
|
|
2574
2642
|
}
|
|
2575
|
-
return { root: n, channel: a, t: u, onPlay: i, formatTime:
|
|
2643
|
+
return { root: n, channel: a, t: u, onPlay: i, formatTime: Ye };
|
|
2576
2644
|
}
|
|
2577
|
-
}),
|
|
2645
|
+
}), Za = {
|
|
2578
2646
|
key: 0,
|
|
2579
2647
|
ref: "root",
|
|
2580
2648
|
class: "voice-recorder-results"
|
|
2581
|
-
},
|
|
2649
|
+
}, Ya = ["data-code"], xa = { class: "row gx-3 align-items-center" }, _a = { class: "col-12 sm:col-4" }, eo = ["src"], no = {
|
|
2582
2650
|
key: 0,
|
|
2583
2651
|
class: "col-auto"
|
|
2584
|
-
},
|
|
2652
|
+
}, to = {
|
|
2585
2653
|
class: "fg-secondary fanum",
|
|
2586
2654
|
dir: "ltr"
|
|
2587
|
-
},
|
|
2655
|
+
}, lo = { class: "col" }, ao = ["aria-valuenow"], oo = {
|
|
2588
2656
|
key: 1,
|
|
2589
2657
|
class: "fg-danger",
|
|
2590
2658
|
role: "alert"
|
|
2591
|
-
},
|
|
2659
|
+
}, ro = {
|
|
2592
2660
|
key: 1,
|
|
2593
2661
|
class: "col-auto"
|
|
2594
|
-
},
|
|
2595
|
-
function
|
|
2596
|
-
return e.channel && (e.showProblem && e.channel.problem || e.showList && e.channel.items.length) ? (
|
|
2662
|
+
}, so = ["aria-label", "onClick"], io = { class: "col-auto" }, uo = ["aria-label", "onClick"];
|
|
2663
|
+
function co(e, n, a, l, u, i) {
|
|
2664
|
+
return e.channel && (e.showProblem && e.channel.problem || e.showList && e.channel.items.length) ? (m(), v("div", Za, [
|
|
2597
2665
|
L(e.$slots, "default"),
|
|
2598
|
-
e.showProblem && e.channel.problem ? (
|
|
2666
|
+
e.showProblem && e.channel.problem ? (m(), v("div", {
|
|
2599
2667
|
key: 0,
|
|
2600
2668
|
class: q(e.alertClass),
|
|
2601
2669
|
role: "alert",
|
|
2602
2670
|
"data-code": e.channel.problem.code
|
|
2603
|
-
}, V(e.channel.problem.message), 11,
|
|
2604
|
-
e.showList && e.channel.items.length ? (
|
|
2671
|
+
}, V(e.channel.problem.message), 11, Ya)) : M("", !0),
|
|
2672
|
+
e.showList && e.channel.items.length ? (m(), v("ul", {
|
|
2605
2673
|
key: 1,
|
|
2606
2674
|
class: q(["list-group", e.listClass])
|
|
2607
2675
|
}, [
|
|
2608
|
-
(
|
|
2676
|
+
(m(!0), v(W, null, ae(e.channel.items, (t) => (m(), v("li", {
|
|
2609
2677
|
key: t.id,
|
|
2610
2678
|
class: "list-group-item"
|
|
2611
2679
|
}, [
|
|
@@ -2616,21 +2684,21 @@ function to(e, n, a, l, u, i) {
|
|
|
2616
2684
|
remove: () => e.channel.remove(t),
|
|
2617
2685
|
retry: () => e.channel.retry(t)
|
|
2618
2686
|
}, () => [
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2687
|
+
h("div", xa, [
|
|
2688
|
+
h("div", _a, [
|
|
2689
|
+
h("audio", {
|
|
2622
2690
|
class: "flex-grow-1 w-100",
|
|
2623
2691
|
controls: "",
|
|
2624
2692
|
preload: "metadata",
|
|
2625
2693
|
src: t.src,
|
|
2626
2694
|
onPlay: n[0] || (n[0] = (...d) => e.onPlay && e.onPlay(...d))
|
|
2627
|
-
}, null, 40,
|
|
2695
|
+
}, null, 40, eo)
|
|
2628
2696
|
]),
|
|
2629
|
-
t.seconds !== null ? (
|
|
2630
|
-
|
|
2697
|
+
t.seconds !== null ? (m(), v("div", no, [
|
|
2698
|
+
h("span", to, V(e.formatTime(t.seconds)), 1)
|
|
2631
2699
|
])) : M("", !0),
|
|
2632
|
-
|
|
2633
|
-
t.status === "uploading" ? (
|
|
2700
|
+
h("div", lo, [
|
|
2701
|
+
t.status === "uploading" ? (m(), v("div", {
|
|
2634
2702
|
key: 0,
|
|
2635
2703
|
class: "progress",
|
|
2636
2704
|
role: "progressbar",
|
|
@@ -2638,21 +2706,21 @@ function to(e, n, a, l, u, i) {
|
|
|
2638
2706
|
"aria-valuemin": "0",
|
|
2639
2707
|
"aria-valuemax": "100"
|
|
2640
2708
|
}, [
|
|
2641
|
-
|
|
2709
|
+
h("div", {
|
|
2642
2710
|
class: "progress-bar",
|
|
2643
2711
|
style: se({ width: t.percent + "%" })
|
|
2644
2712
|
}, null, 4)
|
|
2645
|
-
], 8,
|
|
2646
|
-
t.status === "error" ? (
|
|
2713
|
+
], 8, ao)) : M("", !0),
|
|
2714
|
+
t.status === "error" ? (m(), v("div", oo, V(t.error), 1)) : M("", !0)
|
|
2647
2715
|
]),
|
|
2648
|
-
t.status === "error" ? (
|
|
2649
|
-
|
|
2716
|
+
t.status === "error" ? (m(), v("div", ro, [
|
|
2717
|
+
h("button", {
|
|
2650
2718
|
type: "button",
|
|
2651
2719
|
class: "btn-text theme-secondary btn-icon",
|
|
2652
2720
|
"aria-label": e.t("retry"),
|
|
2653
2721
|
onClick: (d) => e.channel.retry(t)
|
|
2654
2722
|
}, n[1] || (n[1] = [
|
|
2655
|
-
|
|
2723
|
+
h("svg", {
|
|
2656
2724
|
width: "16",
|
|
2657
2725
|
height: "16",
|
|
2658
2726
|
viewBox: "0 0 16 16",
|
|
@@ -2663,20 +2731,20 @@ function to(e, n, a, l, u, i) {
|
|
|
2663
2731
|
"stroke-linejoin": "round",
|
|
2664
2732
|
"aria-hidden": "true"
|
|
2665
2733
|
}, [
|
|
2666
|
-
|
|
2667
|
-
|
|
2734
|
+
h("path", { d: "M13.5 3v3.5H10" }),
|
|
2735
|
+
h("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5M2.5 13V9.5H6" })
|
|
2668
2736
|
], -1)
|
|
2669
|
-
]), 8,
|
|
2737
|
+
]), 8, so)
|
|
2670
2738
|
])) : M("", !0),
|
|
2671
|
-
|
|
2672
|
-
e.channel.locked ? M("", !0) : (
|
|
2739
|
+
h("div", io, [
|
|
2740
|
+
e.channel.locked ? M("", !0) : (m(), v("button", {
|
|
2673
2741
|
key: 0,
|
|
2674
2742
|
type: "button",
|
|
2675
2743
|
class: "btn-text theme-danger btn-icon",
|
|
2676
2744
|
"aria-label": e.t("remove"),
|
|
2677
2745
|
onClick: (d) => e.channel.remove(t)
|
|
2678
2746
|
}, n[2] || (n[2] = [
|
|
2679
|
-
|
|
2747
|
+
h("svg", {
|
|
2680
2748
|
width: "16",
|
|
2681
2749
|
height: "16",
|
|
2682
2750
|
viewBox: "0 0 16 16",
|
|
@@ -2687,9 +2755,9 @@ function to(e, n, a, l, u, i) {
|
|
|
2687
2755
|
"stroke-linejoin": "round",
|
|
2688
2756
|
"aria-hidden": "true"
|
|
2689
2757
|
}, [
|
|
2690
|
-
|
|
2758
|
+
h("path", { d: "M2.5 4.5h11M6 4.5V3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.5M4 4.5l.6 8.1a1 1 0 0 0 1 .9h4.8a1 1 0 0 0 1-.9l.6-8.1" })
|
|
2691
2759
|
], -1)
|
|
2692
|
-
]), 8,
|
|
2760
|
+
]), 8, uo))
|
|
2693
2761
|
])
|
|
2694
2762
|
])
|
|
2695
2763
|
])
|
|
@@ -2697,7 +2765,7 @@ function to(e, n, a, l, u, i) {
|
|
|
2697
2765
|
], 2)) : M("", !0)
|
|
2698
2766
|
], 512)) : M("", !0);
|
|
2699
2767
|
}
|
|
2700
|
-
const
|
|
2768
|
+
const wn = /* @__PURE__ */ R(Ja, [["render", co]]), Ge = {
|
|
2701
2769
|
en: {
|
|
2702
2770
|
start: "Record voice",
|
|
2703
2771
|
stop: "Stop recording",
|
|
@@ -2738,15 +2806,15 @@ const bn = /* @__PURE__ */ R(Pa, [["render", to]]), Xe = {
|
|
|
2738
2806
|
unknown: "شروع ضبط ممکن نشد.",
|
|
2739
2807
|
uploadFailed: "خطا در ارسال"
|
|
2740
2808
|
}
|
|
2741
|
-
},
|
|
2742
|
-
let
|
|
2743
|
-
function
|
|
2744
|
-
return typeof MediaRecorder > "u" || !MediaRecorder.isTypeSupported ? "" :
|
|
2809
|
+
}, fo = ["audio/ogg;codecs=opus", "audio/webm;codecs=opus", "audio/mp4", "audio/webm", "audio/ogg"];
|
|
2810
|
+
let We = 0;
|
|
2811
|
+
function cn() {
|
|
2812
|
+
return typeof MediaRecorder > "u" || !MediaRecorder.isTypeSupported ? "" : fo.find((e) => MediaRecorder.isTypeSupported(e)) || "";
|
|
2745
2813
|
}
|
|
2746
|
-
function
|
|
2814
|
+
function po(e = "") {
|
|
2747
2815
|
return /ogg/.test(e) ? "ogg" : /webm/.test(e) ? "webm" : /mp4|aac|m4a/.test(e) ? "m4a" : /mpeg|mp3/.test(e) ? "mp3" : /wav/.test(e) ? "wav" : "audio";
|
|
2748
2816
|
}
|
|
2749
|
-
function
|
|
2817
|
+
function mo(e) {
|
|
2750
2818
|
switch (e == null ? void 0 : e.name) {
|
|
2751
2819
|
case "NotAllowedError":
|
|
2752
2820
|
case "PermissionDeniedError":
|
|
@@ -2766,12 +2834,12 @@ function oo(e) {
|
|
|
2766
2834
|
return "unknown";
|
|
2767
2835
|
}
|
|
2768
2836
|
}
|
|
2769
|
-
const
|
|
2837
|
+
const ho = F({
|
|
2770
2838
|
name: "VoiceRecorderInput",
|
|
2771
|
-
components: { VoiceRecorderResultArea:
|
|
2839
|
+
components: { VoiceRecorderResultArea: wn },
|
|
2772
2840
|
emits: ["update:modelValue", "change", "start", "stop", "recorded", "progress", "uploaded", "removed", "error"],
|
|
2773
2841
|
props: {
|
|
2774
|
-
...
|
|
2842
|
+
...z,
|
|
2775
2843
|
/** box | button */
|
|
2776
2844
|
variant: { type: String, default: "box", validator: (e) => ["box", "button"].includes(e) },
|
|
2777
2845
|
url: { type: String, default: "/upload" },
|
|
@@ -2810,15 +2878,15 @@ const ro = F({
|
|
|
2810
2878
|
locale: { type: String, default: null }
|
|
2811
2879
|
},
|
|
2812
2880
|
setup(e, { emit: n, expose: a }) {
|
|
2813
|
-
const l =
|
|
2814
|
-
let
|
|
2815
|
-
const
|
|
2816
|
-
() =>
|
|
2817
|
-
),
|
|
2818
|
-
() =>
|
|
2881
|
+
const l = P(e, n), { locale: u } = Q(() => e.locale), i = Le(), t = (f) => (Ge[u.value] || Ge.en)[f] ?? Ge.en[f] ?? f, d = `voice-${++We}`, y = e.channel ?? e.name ?? d, w = E(null), g = E([]), p = E(!1), $ = E(!1), k = E(0), o = E(null), r = E(!0), s = E(!1), c = /* @__PURE__ */ new Map();
|
|
2882
|
+
let C = null, j = null, A = [], H = null, ee = 0, K = !1;
|
|
2883
|
+
const Ie = S(() => e.readonly || l.isDisabled.value), Ce = S(() => Ye(k.value)), Te = S(() => g.value.some((f) => f.status === "uploading")), ve = S(() => !r.value || Ie.value), Me = S(() => (we[y] || 0) > 0), Be = S(() => !e.resultTarget && (e.inlineResults ?? !Me.value)), ge = S(
|
|
2884
|
+
() => p.value ? e.recordingClass : o.value ? e.problemClass : e.buttonClass
|
|
2885
|
+
), Ee = S(() => $.value ? t("starting") : p.value ? t("recording") : Te.value ? t("uploading") : t("idle")), ye = S(
|
|
2886
|
+
() => p.value ? e.stopText ?? t("stop") : e.startText ?? t("start")
|
|
2819
2887
|
);
|
|
2820
|
-
function Z(f, O,
|
|
2821
|
-
o.value = { code: f, message: t(f) }, n("error", { code: f, message: o.value.message, error: O ?? null, item:
|
|
2888
|
+
function Z(f, O, T = null) {
|
|
2889
|
+
o.value = { code: f, message: t(f) }, n("error", { code: f, message: o.value.message, error: O ?? null, item: T });
|
|
2822
2890
|
}
|
|
2823
2891
|
const ue = () => {
|
|
2824
2892
|
o.value = null;
|
|
@@ -2827,53 +2895,53 @@ const ro = F({
|
|
|
2827
2895
|
return e.multiple ? Array.isArray(f) ? f : f ? [f] : [] : f ? [f] : [];
|
|
2828
2896
|
};
|
|
2829
2897
|
function ne(f) {
|
|
2830
|
-
const O =
|
|
2831
|
-
l.model.value =
|
|
2898
|
+
const O = g.value.filter((B) => B.path).map((B) => B.path), T = e.multiple ? O : O[0] ?? null;
|
|
2899
|
+
l.model.value = T, l.emitChange(T, f);
|
|
2832
2900
|
}
|
|
2833
2901
|
function te() {
|
|
2834
2902
|
const f = l.form.value;
|
|
2835
2903
|
if (!f) return;
|
|
2836
|
-
const O =
|
|
2837
|
-
f.uploading = O.length ? Math.min(99, Math.round(O.reduce((
|
|
2904
|
+
const O = g.value.filter((T) => T.status === "uploading");
|
|
2905
|
+
f.uploading = O.length ? Math.min(99, Math.round(O.reduce((T, B) => T + B.percent, 0) / O.length)) : null;
|
|
2838
2906
|
}
|
|
2839
2907
|
function be(f) {
|
|
2840
2908
|
f.local && f.src && URL.revokeObjectURL(f.src);
|
|
2841
2909
|
}
|
|
2842
2910
|
function de() {
|
|
2843
2911
|
const f = Pe();
|
|
2844
|
-
!f.length &&
|
|
2845
|
-
const O = new Set(
|
|
2846
|
-
f.forEach((
|
|
2847
|
-
O.has(
|
|
2848
|
-
ie({ id: `v${++
|
|
2912
|
+
!f.length && g.value.some((T) => T.path) && (g.value.filter((T) => T.path).forEach(be), g.value = g.value.filter((T) => !T.path));
|
|
2913
|
+
const O = new Set(g.value.map((T) => T.path).filter(Boolean));
|
|
2914
|
+
f.forEach((T) => {
|
|
2915
|
+
O.has(T) || g.value.push(
|
|
2916
|
+
ie({ id: `v${++We}`, path: T, src: e.playbackUrl(T), status: "done", percent: 100, seconds: null, error: "", local: !1, file: null })
|
|
2849
2917
|
);
|
|
2850
2918
|
});
|
|
2851
2919
|
}
|
|
2852
2920
|
J(() => {
|
|
2853
2921
|
var f;
|
|
2854
|
-
s.value = !0,
|
|
2855
|
-
}),
|
|
2856
|
-
async function
|
|
2922
|
+
s.value = !0, Ga(y, { owner: d, items: g, problem: o, locked: Ie, t, remove: N, retry: I }), i.add(() => Wa(y, d)), r.value = typeof navigator < "u" && !!((f = navigator.mediaDevices) != null && f.getUserMedia) && typeof MediaRecorder < "u", r.value ? G() : Z(typeof window < "u" && window.isSecureContext === !1 ? "insecure" : "unsupported"), de();
|
|
2923
|
+
}), U(() => l.model.value, de, { deep: !0 });
|
|
2924
|
+
async function G() {
|
|
2857
2925
|
var f;
|
|
2858
2926
|
try {
|
|
2859
2927
|
const O = await ((f = navigator.permissions) == null ? void 0 : f.query({ name: "microphone" }));
|
|
2860
2928
|
if (!O || i.isDisposed()) return;
|
|
2861
|
-
const
|
|
2929
|
+
const T = () => {
|
|
2862
2930
|
var B;
|
|
2863
2931
|
O.state === "denied" ? Z("denied") : ((B = o.value) == null ? void 0 : B.code) === "denied" && ue();
|
|
2864
2932
|
};
|
|
2865
|
-
|
|
2933
|
+
T(), O.addEventListener("change", T), i.add(() => O.removeEventListener("change", T));
|
|
2866
2934
|
} catch {
|
|
2867
2935
|
}
|
|
2868
2936
|
}
|
|
2869
2937
|
function ce() {
|
|
2870
2938
|
j == null || j.getTracks().forEach((f) => f.stop()), j = null;
|
|
2871
2939
|
}
|
|
2872
|
-
function
|
|
2873
|
-
|
|
2940
|
+
function Ke() {
|
|
2941
|
+
k.value = (Date.now() - ee) / 1e3, e.maxDuration && k.value >= e.maxDuration && _();
|
|
2874
2942
|
}
|
|
2875
|
-
async function
|
|
2876
|
-
if (
|
|
2943
|
+
async function Ae() {
|
|
2944
|
+
if (p.value || $.value || ve.value) return;
|
|
2877
2945
|
ue(), $.value = !0;
|
|
2878
2946
|
let f;
|
|
2879
2947
|
try {
|
|
@@ -2881,61 +2949,61 @@ const ro = F({
|
|
|
2881
2949
|
audio: Object.keys(e.audioConstraints || {}).length ? e.audioConstraints : !0
|
|
2882
2950
|
});
|
|
2883
2951
|
} catch (B) {
|
|
2884
|
-
return $.value = !1, Z(
|
|
2952
|
+
return $.value = !1, Z(mo(B), B);
|
|
2885
2953
|
}
|
|
2886
2954
|
if ($.value = !1, i.isDisposed()) {
|
|
2887
2955
|
f.getTracks().forEach((B) => B.stop());
|
|
2888
2956
|
return;
|
|
2889
2957
|
}
|
|
2890
|
-
const O =
|
|
2891
|
-
let
|
|
2958
|
+
const O = cn();
|
|
2959
|
+
let T;
|
|
2892
2960
|
try {
|
|
2893
|
-
|
|
2961
|
+
T = new MediaRecorder(f, { ...O ? { mimeType: O } : {}, audioBitsPerSecond: e.audioBitsPerSecond });
|
|
2894
2962
|
} catch {
|
|
2895
2963
|
try {
|
|
2896
|
-
|
|
2964
|
+
T = new MediaRecorder(f);
|
|
2897
2965
|
} catch (D) {
|
|
2898
2966
|
return f.getTracks().forEach((Y) => Y.stop()), Z("recorder", D);
|
|
2899
2967
|
}
|
|
2900
2968
|
}
|
|
2901
|
-
j = f,
|
|
2969
|
+
j = f, C = T, A = [], K = !1, T.ondataavailable = (B) => {
|
|
2902
2970
|
var D;
|
|
2903
2971
|
(D = B.data) != null && D.size && A.push(B.data);
|
|
2904
|
-
},
|
|
2905
|
-
|
|
2906
|
-
},
|
|
2972
|
+
}, T.onerror = (B) => {
|
|
2973
|
+
K = !0, Z("recorder", B.error), _();
|
|
2974
|
+
}, T.onstop = () => fe(T), f.getAudioTracks().forEach(
|
|
2907
2975
|
(B) => B.addEventListener("ended", () => {
|
|
2908
|
-
|
|
2976
|
+
p.value && (Z("disconnected"), _());
|
|
2909
2977
|
})
|
|
2910
|
-
),
|
|
2978
|
+
), T.start(500), ee = Date.now(), k.value = 0, p.value = !0, H = setInterval(Ke, 250), n("start");
|
|
2911
2979
|
}
|
|
2912
2980
|
function _() {
|
|
2913
|
-
if (clearInterval(
|
|
2981
|
+
if (clearInterval(H), H = null, C && C.state !== "inactive")
|
|
2914
2982
|
try {
|
|
2915
|
-
|
|
2983
|
+
C.stop();
|
|
2916
2984
|
} catch {
|
|
2917
|
-
fe(
|
|
2985
|
+
fe(C);
|
|
2918
2986
|
}
|
|
2919
|
-
|
|
2987
|
+
p.value = !1;
|
|
2920
2988
|
}
|
|
2921
2989
|
function fe(f) {
|
|
2922
|
-
clearInterval(
|
|
2923
|
-
const O = (Date.now() - ee) / 1e3,
|
|
2924
|
-
if (A = [], ce(),
|
|
2990
|
+
clearInterval(H), H = null, p.value = !1;
|
|
2991
|
+
const O = (Date.now() - ee) / 1e3, T = A;
|
|
2992
|
+
if (A = [], ce(), C = null, K) return;
|
|
2925
2993
|
n("stop", O);
|
|
2926
|
-
const B = f.mimeType ||
|
|
2994
|
+
const B = f.mimeType || cn() || "audio/webm", D = new Blob(T, { type: B });
|
|
2927
2995
|
if (!D.size || O < 0.4) return Z("tooShort");
|
|
2928
|
-
|
|
2996
|
+
b(D, O);
|
|
2929
2997
|
}
|
|
2930
|
-
function
|
|
2931
|
-
return
|
|
2998
|
+
function Oe() {
|
|
2999
|
+
return p.value ? _() : Ae();
|
|
2932
3000
|
}
|
|
2933
|
-
function
|
|
2934
|
-
e.multiple ||
|
|
2935
|
-
const
|
|
2936
|
-
id: `v${++
|
|
2937
|
-
file:
|
|
2938
|
-
src: URL.createObjectURL(
|
|
3001
|
+
function b(f, O) {
|
|
3002
|
+
e.multiple || g.value.slice().forEach((D) => N(D, !1));
|
|
3003
|
+
const T = new File([f], `voice-${Date.now()}.${po(f.type)}`, { type: f.type }), B = ie({
|
|
3004
|
+
id: `v${++We}`,
|
|
3005
|
+
file: T,
|
|
3006
|
+
src: URL.createObjectURL(T),
|
|
2939
3007
|
seconds: Math.round(O),
|
|
2940
3008
|
status: "uploading",
|
|
2941
3009
|
percent: 0,
|
|
@@ -2943,41 +3011,41 @@ const ro = F({
|
|
|
2943
3011
|
error: "",
|
|
2944
3012
|
local: !0
|
|
2945
3013
|
});
|
|
2946
|
-
|
|
3014
|
+
g.value = [...g.value, B], n("recorded", B), I(B);
|
|
2947
3015
|
}
|
|
2948
|
-
function
|
|
3016
|
+
function I(f) {
|
|
2949
3017
|
f.status = "uploading", f.percent = 0, f.error = "", te();
|
|
2950
3018
|
const O = new FormData();
|
|
2951
3019
|
O.append(e.fieldName, f.file, f.file.name);
|
|
2952
|
-
const
|
|
2953
|
-
c.set(f.id,
|
|
3020
|
+
const T = new XMLHttpRequest();
|
|
3021
|
+
c.set(f.id, T), T.open("POST", e.url), Object.entries(qe(e.headers)).forEach(([D, Y]) => T.setRequestHeader(D, Y)), T.upload.onprogress = (D) => {
|
|
2954
3022
|
D.lengthComputable && (f.percent = Math.round(D.loaded / D.total * 100), n("progress", f, f.percent), te());
|
|
2955
3023
|
};
|
|
2956
3024
|
const B = (D) => {
|
|
2957
3025
|
c.delete(f.id), f.status = "error", f.error = D || t("uploadFailed"), te(), Z("uploadFailed", null, f), o.value = { code: "uploadFailed", message: f.error };
|
|
2958
3026
|
};
|
|
2959
|
-
|
|
3027
|
+
T.onerror = () => B(), T.onload = () => {
|
|
2960
3028
|
let D = null;
|
|
2961
3029
|
try {
|
|
2962
|
-
D = JSON.parse(
|
|
3030
|
+
D = JSON.parse(T.responseText);
|
|
2963
3031
|
} catch {
|
|
2964
3032
|
}
|
|
2965
|
-
if (
|
|
2966
|
-
const
|
|
2967
|
-
return B((D == null ? void 0 : D.message) || (Array.isArray(
|
|
3033
|
+
if (T.status < 200 || T.status >= 300) {
|
|
3034
|
+
const Ve = D != null && D.errors ? Object.values(D.errors)[0] : null;
|
|
3035
|
+
return B((D == null ? void 0 : D.message) || (Array.isArray(Ve) ? Ve[0] : Ve));
|
|
2968
3036
|
}
|
|
2969
|
-
const Y = (D == null ? void 0 : D.data) ?? D,
|
|
2970
|
-
if (!
|
|
2971
|
-
c.delete(f.id), f.path =
|
|
2972
|
-
},
|
|
3037
|
+
const Y = (D == null ? void 0 : D.data) ?? D, en = (Y == null ? void 0 : Y.path) ?? (Y == null ? void 0 : Y.url);
|
|
3038
|
+
if (!en) return B();
|
|
3039
|
+
c.delete(f.id), f.path = en, f.status = "done", f.percent = 100, te(), ue(), ne(), n("uploaded", f, D);
|
|
3040
|
+
}, T.send(O);
|
|
2973
3041
|
}
|
|
2974
3042
|
async function N(f, O = !0) {
|
|
2975
|
-
var
|
|
2976
|
-
if ((
|
|
3043
|
+
var T;
|
|
3044
|
+
if ((T = c.get(f.id)) == null || T.abort(), c.delete(f.id), be(f), g.value = g.value.filter((B) => B.id !== f.id), te(), f.path && (ne(), e.deleteOnRemove))
|
|
2977
3045
|
try {
|
|
2978
3046
|
await fetch(e.url, {
|
|
2979
3047
|
method: "DELETE",
|
|
2980
|
-
headers:
|
|
3048
|
+
headers: qe(e.headers),
|
|
2981
3049
|
credentials: "same-origin",
|
|
2982
3050
|
body: f.path
|
|
2983
3051
|
});
|
|
@@ -2986,53 +3054,53 @@ const ro = F({
|
|
|
2986
3054
|
O && n("removed", f);
|
|
2987
3055
|
}
|
|
2988
3056
|
return i.add(() => {
|
|
2989
|
-
if (
|
|
3057
|
+
if (K = !0, clearInterval(H), C && C.state !== "inactive")
|
|
2990
3058
|
try {
|
|
2991
|
-
|
|
3059
|
+
C.stop();
|
|
2992
3060
|
} catch {
|
|
2993
3061
|
}
|
|
2994
|
-
ce(), c.forEach((f) => f.abort()), c.clear(),
|
|
2995
|
-
}), a({ start:
|
|
3062
|
+
ce(), c.forEach((f) => f.abort()), c.clear(), g.value.forEach(be), l.form.value && (l.form.value.uploading = null);
|
|
3063
|
+
}), a({ start: Ae, stop: _, toggle: Oe, channel: y }), {
|
|
2996
3064
|
...l,
|
|
2997
3065
|
t,
|
|
2998
3066
|
root: w,
|
|
2999
|
-
items:
|
|
3000
|
-
recording:
|
|
3067
|
+
items: g,
|
|
3068
|
+
recording: p,
|
|
3001
3069
|
starting: $,
|
|
3002
|
-
seconds:
|
|
3003
|
-
time:
|
|
3070
|
+
seconds: k,
|
|
3071
|
+
time: Ce,
|
|
3004
3072
|
problem: o,
|
|
3005
3073
|
supported: r,
|
|
3006
3074
|
blocked: ve,
|
|
3007
3075
|
mounted: s,
|
|
3008
|
-
channelKey:
|
|
3009
|
-
showInline:
|
|
3076
|
+
channelKey: y,
|
|
3077
|
+
showInline: Be,
|
|
3010
3078
|
stateClass: ge,
|
|
3011
|
-
statusText:
|
|
3079
|
+
statusText: Ee,
|
|
3012
3080
|
buttonLabel: ye,
|
|
3013
|
-
toggle:
|
|
3014
|
-
formatTime:
|
|
3081
|
+
toggle: Oe,
|
|
3082
|
+
formatTime: Ye
|
|
3015
3083
|
};
|
|
3016
3084
|
}
|
|
3017
|
-
}),
|
|
3085
|
+
}), vo = ["id"], go = {
|
|
3018
3086
|
key: 0,
|
|
3019
3087
|
class: "voice-recorder-box p-5"
|
|
3020
|
-
},
|
|
3088
|
+
}, yo = { class: "card-body" }, bo = { class: "row gx-5" }, $o = {
|
|
3021
3089
|
key: 0,
|
|
3022
3090
|
class: "col-auto mx-auto"
|
|
3023
|
-
},
|
|
3091
|
+
}, wo = { class: "col-12 text-center" }, So = { class: "row gx-5 align-items-center" }, ko = { class: "col-auto" }, Io = ["disabled", "aria-label", "aria-pressed"], Co = {
|
|
3024
3092
|
key: 0,
|
|
3025
3093
|
class: "spinner-border spinner-sm",
|
|
3026
3094
|
role: "status",
|
|
3027
3095
|
"aria-hidden": "true"
|
|
3028
|
-
},
|
|
3096
|
+
}, To = {
|
|
3029
3097
|
key: 1,
|
|
3030
3098
|
width: "18",
|
|
3031
3099
|
height: "18",
|
|
3032
3100
|
viewBox: "0 0 16 16",
|
|
3033
3101
|
fill: "currentColor",
|
|
3034
3102
|
"aria-hidden": "true"
|
|
3035
|
-
},
|
|
3103
|
+
}, Mo = {
|
|
3036
3104
|
key: 2,
|
|
3037
3105
|
width: "18",
|
|
3038
3106
|
height: "18",
|
|
@@ -3043,22 +3111,22 @@ const ro = F({
|
|
|
3043
3111
|
"stroke-linecap": "round",
|
|
3044
3112
|
"stroke-linejoin": "round",
|
|
3045
3113
|
"aria-hidden": "true"
|
|
3046
|
-
},
|
|
3114
|
+
}, Bo = { class: "col" }, Eo = { class: "flex-grow-1 text-center" }, Ao = {
|
|
3047
3115
|
class: "fw-semibold",
|
|
3048
3116
|
role: "status",
|
|
3049
3117
|
"aria-live": "polite"
|
|
3050
|
-
},
|
|
3118
|
+
}, Oo = {
|
|
3051
3119
|
class: "fg-secondary fanum",
|
|
3052
3120
|
dir: "ltr"
|
|
3053
|
-
},
|
|
3121
|
+
}, Vo = {
|
|
3054
3122
|
key: 0,
|
|
3055
3123
|
class: "col-auto"
|
|
3056
|
-
},
|
|
3124
|
+
}, Do = ["disabled", "aria-pressed"], No = {
|
|
3057
3125
|
key: 0,
|
|
3058
3126
|
class: "spinner-border spinner-sm me-2",
|
|
3059
3127
|
role: "status",
|
|
3060
3128
|
"aria-hidden": "true"
|
|
3061
|
-
},
|
|
3129
|
+
}, qo = {
|
|
3062
3130
|
key: 1,
|
|
3063
3131
|
class: "me-2",
|
|
3064
3132
|
width: "16",
|
|
@@ -3066,7 +3134,7 @@ const ro = F({
|
|
|
3066
3134
|
viewBox: "0 0 16 16",
|
|
3067
3135
|
fill: "currentColor",
|
|
3068
3136
|
"aria-hidden": "true"
|
|
3069
|
-
},
|
|
3137
|
+
}, Fo = {
|
|
3070
3138
|
key: 2,
|
|
3071
3139
|
class: "me-2",
|
|
3072
3140
|
width: "16",
|
|
@@ -3078,76 +3146,76 @@ const ro = F({
|
|
|
3078
3146
|
"stroke-linecap": "round",
|
|
3079
3147
|
"stroke-linejoin": "round",
|
|
3080
3148
|
"aria-hidden": "true"
|
|
3081
|
-
},
|
|
3149
|
+
}, Ro = {
|
|
3082
3150
|
key: 3,
|
|
3083
3151
|
class: "ms-2 fanum",
|
|
3084
3152
|
dir: "ltr"
|
|
3085
3153
|
};
|
|
3086
|
-
function
|
|
3154
|
+
function Lo(e, n, a, l, u, i) {
|
|
3087
3155
|
const t = oe("VoiceRecorderResultArea");
|
|
3088
|
-
return
|
|
3156
|
+
return m(), v("div", {
|
|
3089
3157
|
ref: "root",
|
|
3090
3158
|
class: q(["voice-recorder", { "is-invalid": e.isInvalid }]),
|
|
3091
3159
|
id: e.inputId
|
|
3092
3160
|
}, [
|
|
3093
|
-
e.variant === "box" ? (
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
e.showInline && e.problem ? (
|
|
3097
|
-
|
|
3161
|
+
e.variant === "box" ? (m(), v("div", go, [
|
|
3162
|
+
h("div", yo, [
|
|
3163
|
+
h("div", bo, [
|
|
3164
|
+
e.showInline && e.problem ? (m(), v("div", $o, [
|
|
3165
|
+
Ne(t, {
|
|
3098
3166
|
for: e.channelKey,
|
|
3099
3167
|
internal: "",
|
|
3100
3168
|
"show-list": !1,
|
|
3101
3169
|
"alert-class": "alert theme-danger p-1 text-center mb-4"
|
|
3102
3170
|
}, null, 8, ["for"])
|
|
3103
3171
|
])) : M("", !0),
|
|
3104
|
-
|
|
3105
|
-
|
|
3172
|
+
h("div", wo, [
|
|
3173
|
+
h("div", {
|
|
3106
3174
|
class: "btn btn-subtle mx-auto p-3",
|
|
3107
3175
|
onClick: n[0] || (n[0] = (...d) => e.toggle && e.toggle(...d))
|
|
3108
3176
|
}, [
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3177
|
+
h("div", So, [
|
|
3178
|
+
h("div", ko, [
|
|
3179
|
+
h("button", {
|
|
3112
3180
|
type: "button",
|
|
3113
3181
|
class: q(["btn", e.stateClass]),
|
|
3114
3182
|
disabled: e.blocked || e.starting,
|
|
3115
3183
|
"aria-label": e.buttonLabel,
|
|
3116
3184
|
"aria-pressed": e.recording
|
|
3117
3185
|
}, [
|
|
3118
|
-
e.starting ? (
|
|
3119
|
-
|
|
3186
|
+
e.starting ? (m(), v("span", Co)) : e.recording ? (m(), v("svg", To, n[2] || (n[2] = [
|
|
3187
|
+
h("rect", {
|
|
3120
3188
|
x: "3.5",
|
|
3121
3189
|
y: "3.5",
|
|
3122
3190
|
width: "9",
|
|
3123
3191
|
height: "9",
|
|
3124
3192
|
rx: "1.5"
|
|
3125
3193
|
}, null, -1)
|
|
3126
|
-
]))) : (
|
|
3127
|
-
|
|
3194
|
+
]))) : (m(), v("svg", Mo, n[3] || (n[3] = [
|
|
3195
|
+
h("rect", {
|
|
3128
3196
|
x: "5.5",
|
|
3129
3197
|
y: "1.5",
|
|
3130
3198
|
width: "5",
|
|
3131
3199
|
height: "8",
|
|
3132
3200
|
rx: "2.5"
|
|
3133
3201
|
}, null, -1),
|
|
3134
|
-
|
|
3202
|
+
h("path", { d: "M3 7.5a5 5 0 0 0 10 0M8 12.5v2" }, null, -1)
|
|
3135
3203
|
])))
|
|
3136
|
-
], 10,
|
|
3204
|
+
], 10, Io)
|
|
3137
3205
|
]),
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3206
|
+
h("div", Bo, [
|
|
3207
|
+
h("div", Eo, [
|
|
3208
|
+
h("div", Ao, V(e.statusText), 1),
|
|
3209
|
+
h("div", Oo, [
|
|
3142
3210
|
x(V(e.time) + " ", 1),
|
|
3143
|
-
e.maxDuration ? (
|
|
3211
|
+
e.maxDuration ? (m(), v(W, { key: 0 }, [
|
|
3144
3212
|
x(" / " + V(e.formatTime(e.maxDuration)), 1)
|
|
3145
3213
|
], 64)) : M("", !0)
|
|
3146
3214
|
])
|
|
3147
3215
|
])
|
|
3148
3216
|
]),
|
|
3149
|
-
e.recording ? (
|
|
3150
|
-
|
|
3217
|
+
e.recording ? (m(), v("div", Vo, n[4] || (n[4] = [
|
|
3218
|
+
h("span", {
|
|
3151
3219
|
class: "spinner-grow spinner-sm fg-danger",
|
|
3152
3220
|
role: "status",
|
|
3153
3221
|
"aria-hidden": "true"
|
|
@@ -3157,7 +3225,7 @@ function Ao(e, n, a, l, u, i) {
|
|
|
3157
3225
|
])
|
|
3158
3226
|
])
|
|
3159
3227
|
]),
|
|
3160
|
-
e.showInline && e.showList ? (
|
|
3228
|
+
e.showInline && e.showList ? (m(), le(t, {
|
|
3161
3229
|
key: 0,
|
|
3162
3230
|
class: "d-block mt-2",
|
|
3163
3231
|
for: e.channelKey,
|
|
@@ -3165,8 +3233,8 @@ function Ao(e, n, a, l, u, i) {
|
|
|
3165
3233
|
"show-problem": !1
|
|
3166
3234
|
}, null, 8, ["for"])) : M("", !0)
|
|
3167
3235
|
])
|
|
3168
|
-
])) : (
|
|
3169
|
-
|
|
3236
|
+
])) : (m(), v(W, { key: 1 }, [
|
|
3237
|
+
h("button", {
|
|
3170
3238
|
type: "button",
|
|
3171
3239
|
disabled: e.blocked || e.starting,
|
|
3172
3240
|
"aria-pressed": e.recording,
|
|
@@ -3179,29 +3247,29 @@ function Ao(e, n, a, l, u, i) {
|
|
|
3179
3247
|
seconds: e.seconds,
|
|
3180
3248
|
time: e.time
|
|
3181
3249
|
}, () => [
|
|
3182
|
-
e.starting ? (
|
|
3183
|
-
|
|
3250
|
+
e.starting ? (m(), v("span", No)) : e.recording ? (m(), v("svg", qo, n[5] || (n[5] = [
|
|
3251
|
+
h("rect", {
|
|
3184
3252
|
x: "3.5",
|
|
3185
3253
|
y: "3.5",
|
|
3186
3254
|
width: "9",
|
|
3187
3255
|
height: "9",
|
|
3188
3256
|
rx: "1.5"
|
|
3189
3257
|
}, null, -1)
|
|
3190
|
-
]))) : (
|
|
3191
|
-
|
|
3258
|
+
]))) : (m(), v("svg", Fo, n[6] || (n[6] = [
|
|
3259
|
+
h("rect", {
|
|
3192
3260
|
x: "5.5",
|
|
3193
3261
|
y: "1.5",
|
|
3194
3262
|
width: "5",
|
|
3195
3263
|
height: "8",
|
|
3196
3264
|
rx: "2.5"
|
|
3197
3265
|
}, null, -1),
|
|
3198
|
-
|
|
3266
|
+
h("path", { d: "M3 7.5a5 5 0 0 0 10 0M8 12.5v2" }, null, -1)
|
|
3199
3267
|
]))),
|
|
3200
3268
|
x(" " + V(e.buttonLabel) + " ", 1),
|
|
3201
|
-
e.recording ? (
|
|
3269
|
+
e.recording ? (m(), v("span", Ro, V(e.time), 1)) : M("", !0)
|
|
3202
3270
|
])
|
|
3203
|
-
], 10,
|
|
3204
|
-
e.showInline ? (
|
|
3271
|
+
], 10, Do),
|
|
3272
|
+
e.showInline ? (m(), le(t, {
|
|
3205
3273
|
key: 0,
|
|
3206
3274
|
class: "d-block mt-2",
|
|
3207
3275
|
for: e.channelKey,
|
|
@@ -3209,20 +3277,20 @@ function Ao(e, n, a, l, u, i) {
|
|
|
3209
3277
|
"show-list": e.showList
|
|
3210
3278
|
}, null, 8, ["for", "show-list"])) : M("", !0)
|
|
3211
3279
|
], 64)),
|
|
3212
|
-
e.resultTarget && e.mounted ? (
|
|
3280
|
+
e.resultTarget && e.mounted ? (m(), le(Cn, {
|
|
3213
3281
|
key: 2,
|
|
3214
3282
|
to: e.resultTarget
|
|
3215
3283
|
}, [
|
|
3216
|
-
|
|
3284
|
+
Ne(t, {
|
|
3217
3285
|
for: e.channelKey,
|
|
3218
3286
|
internal: "",
|
|
3219
3287
|
"show-list": e.showList
|
|
3220
3288
|
}, null, 8, ["for", "show-list"])
|
|
3221
3289
|
], 8, ["to"])) : M("", !0)
|
|
3222
|
-
], 10,
|
|
3290
|
+
], 10, vo);
|
|
3223
3291
|
}
|
|
3224
|
-
const
|
|
3225
|
-
function
|
|
3292
|
+
const jo = /* @__PURE__ */ R(ho, [["render", Lo]]);
|
|
3293
|
+
function Qo() {
|
|
3226
3294
|
const e = me("form", null), n = me("formApi", null);
|
|
3227
3295
|
return {
|
|
3228
3296
|
form: e,
|
|
@@ -3236,84 +3304,87 @@ function Po() {
|
|
|
3236
3304
|
}
|
|
3237
3305
|
};
|
|
3238
3306
|
}
|
|
3239
|
-
const
|
|
3240
|
-
AmountInput:
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3307
|
+
const zo = hn, Po = $n, Ko = _e, Uo = {
|
|
3308
|
+
AmountInput: Nn,
|
|
3309
|
+
ShebaInput: at,
|
|
3310
|
+
CreditCardInput: ut,
|
|
3311
|
+
CaptchaInput: Pn,
|
|
3312
|
+
VoiceRecorderInput: jo,
|
|
3313
|
+
VoiceRecorderResultArea: wn,
|
|
3314
|
+
CheckboxButtonInput: Xn,
|
|
3315
|
+
CheckboxInput: Yn,
|
|
3316
|
+
CheckboxToggle: mt,
|
|
3317
|
+
ChipsInput: wt,
|
|
3318
|
+
ComboboxInput: hn,
|
|
3319
|
+
EmailInput: Gt,
|
|
3320
|
+
FileInput: vn,
|
|
3321
|
+
FormAdornInput: _e,
|
|
3322
|
+
FormContainer: Sl,
|
|
3323
|
+
FormField: Dl,
|
|
3324
|
+
FormLabel: gn,
|
|
3325
|
+
GroupControl: yn,
|
|
3326
|
+
MobileInput: jl,
|
|
3327
|
+
MultiQuantityInput: na,
|
|
3328
|
+
OTPInput: ra,
|
|
3329
|
+
PasswordInput: ha,
|
|
3330
|
+
QuantityInput: bn,
|
|
3331
|
+
RangeInput: $n,
|
|
3332
|
+
SimpleUploader: Sa,
|
|
3333
|
+
StarRatingInput: Ba,
|
|
3334
|
+
SubmitButton: Na,
|
|
3335
|
+
SwitchInput: Pa,
|
|
3336
|
+
TextAreaInput: Xa,
|
|
3267
3337
|
TextInput: ze,
|
|
3268
3338
|
// aliases
|
|
3269
|
-
Select2Input:
|
|
3270
|
-
RangeSliderInput:
|
|
3271
|
-
FormAdorn:
|
|
3272
|
-
},
|
|
3339
|
+
Select2Input: zo,
|
|
3340
|
+
RangeSliderInput: Po,
|
|
3341
|
+
FormAdorn: Ko
|
|
3342
|
+
}, Jo = {
|
|
3273
3343
|
install(e, n = {}) {
|
|
3274
|
-
(n.locale || n.messages) &&
|
|
3344
|
+
(n.locale || n.messages) && Tn(n), n.bootstrap && ht(n.bootstrap), Object.entries(Uo).forEach(([a, l]) => e.component(a, l));
|
|
3275
3345
|
}
|
|
3276
3346
|
};
|
|
3277
3347
|
export {
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
zo as
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3348
|
+
Nn as AmountInput,
|
|
3349
|
+
Pn as CaptchaInput,
|
|
3350
|
+
Xn as CheckboxButtonInput,
|
|
3351
|
+
Yn as CheckboxInput,
|
|
3352
|
+
mt as CheckboxToggle,
|
|
3353
|
+
wt as ChipsInput,
|
|
3354
|
+
hn as ComboboxInput,
|
|
3355
|
+
ut as CreditCardInput,
|
|
3356
|
+
Gt as EmailInput,
|
|
3357
|
+
vn as FileInput,
|
|
3358
|
+
Ko as FormAdorn,
|
|
3359
|
+
_e as FormAdornInput,
|
|
3360
|
+
Sl as FormContainer,
|
|
3361
|
+
Dl as FormField,
|
|
3362
|
+
gn as FormLabel,
|
|
3363
|
+
yn as GroupControl,
|
|
3364
|
+
jl as MobileInput,
|
|
3365
|
+
na as MultiQuantityInput,
|
|
3366
|
+
ra as OTPInput,
|
|
3367
|
+
ha as PasswordInput,
|
|
3368
|
+
bn as QuantityInput,
|
|
3369
|
+
$n as RangeInput,
|
|
3370
|
+
Po as RangeSliderInput,
|
|
3371
|
+
zo as Select2Input,
|
|
3372
|
+
at as ShebaInput,
|
|
3373
|
+
Sa as SimpleUploader,
|
|
3374
|
+
Ba as StarRatingInput,
|
|
3375
|
+
Na as SubmitButton,
|
|
3376
|
+
Pa as SwitchInput,
|
|
3377
|
+
Xa as TextAreaInput,
|
|
3307
3378
|
ze as TextInput,
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3379
|
+
jo as VoiceRecorderInput,
|
|
3380
|
+
wn as VoiceRecorderResultArea,
|
|
3381
|
+
ht as configureBootstrap,
|
|
3382
|
+
Tn as configureI18n,
|
|
3383
|
+
Jo as default,
|
|
3384
|
+
z as fieldProps,
|
|
3385
|
+
ke as toEnglishDigits,
|
|
3315
3386
|
he as useBsInstance,
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3387
|
+
Le as useDisposables,
|
|
3388
|
+
P as useField,
|
|
3389
|
+
Qo as useFormApi
|
|
3319
3390
|
};
|