@signal24/vue-foundation 4.23.0 → 4.24.1
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/dist/src/filters/index.d.ts +13 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/vue-foundation.es.js +843 -677
- package/package.json +7 -6
- package/src/filters/index.ts +41 -1
- package/src/helpers/string.ts +2 -7
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var F = (e, t, n) =>
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { compact as
|
|
6
|
-
import { escapeHtml as
|
|
7
|
-
import { escapeHtml as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
1
|
+
var xt = Object.defineProperty;
|
|
2
|
+
var It = (e, t, n) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var F = (e, t, n) => It(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as R, ref as T, computed as x, watch as D, onMounted as _, createElementBlock as k, withDirectives as ne, openBlock as b, createElementVNode as $, toDisplayString as P, createCommentVNode as A, Fragment as oe, renderList as ye, vModelSelect as Ot, getCurrentInstance as ge, withModifiers as we, normalizeStyle as Ft, normalizeClass as B, renderSlot as q, reactive as Dt, h as se, Teleport as Ht, markRaw as Vt, onBeforeUnmount as Ee, resolveDirective as At, createBlock as Ye, createSlots as $t, withCtx as ve, createTextVNode as ee, vModelText as Bt, onActivated as Xe, onDeactivated as Ze } from "vue";
|
|
5
|
+
import { compact as Ge, debounce as _t, isEqual as Je, startCase as Nt, upperFirst as Rt, cloneDeep as Wt, remove as jt, last as Ut } from "lodash";
|
|
6
|
+
import { escapeHtml as Pt } from "@vue/shared";
|
|
7
|
+
import { escapeHtml as ls } from "@vue/shared";
|
|
8
|
+
import { format as j, addDays as qt, parse as zt } from "date-fns";
|
|
9
|
+
import { configureOpenApiClient as Kt, OpenApiError as Yt } from "@signal24/openapi-client-codegen/browser";
|
|
10
|
+
const Xt = {
|
|
11
11
|
key: 0,
|
|
12
12
|
disabled: ""
|
|
13
|
-
},
|
|
13
|
+
}, Zt = {
|
|
14
14
|
key: 0,
|
|
15
15
|
value: null
|
|
16
|
-
},
|
|
16
|
+
}, Gt = ["value"], Do = /* @__PURE__ */ R({
|
|
17
17
|
__name: "vf-ajax-select",
|
|
18
18
|
props: {
|
|
19
19
|
modelValue: {},
|
|
@@ -25,275 +25,275 @@ const Ut = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
27
|
setup(e, { emit: t }) {
|
|
28
|
-
const n = e, o = t, i = T(null),
|
|
29
|
-
const
|
|
30
|
-
return n.preprocesor ? n.preprocesor(
|
|
31
|
-
}) : null),
|
|
32
|
-
|
|
28
|
+
const n = e, o = t, i = T(null), s = x(() => i.value ? i.value.map((v) => {
|
|
29
|
+
const E = v;
|
|
30
|
+
return n.preprocesor ? n.preprocesor(E) : n.displayKey ? E[n.displayKey] : "";
|
|
31
|
+
}) : null), a = T(n.modelValue ?? null);
|
|
32
|
+
D(() => n.loadFn, r), D(
|
|
33
33
|
() => n.modelValue,
|
|
34
|
-
() =>
|
|
35
|
-
),
|
|
34
|
+
() => a.value = n.modelValue
|
|
35
|
+
), D(a, () => o("update:modelValue", a.value));
|
|
36
36
|
async function r() {
|
|
37
37
|
i.value = await n.loadFn();
|
|
38
38
|
}
|
|
39
|
-
return
|
|
39
|
+
return _(r), (u, v) => s.value ? ne((b(), k("select", {
|
|
40
40
|
key: 1,
|
|
41
|
-
"onUpdate:modelValue":
|
|
41
|
+
"onUpdate:modelValue": v[0] || (v[0] = (E) => a.value = E)
|
|
42
42
|
}, [
|
|
43
|
-
n.nullText ? (
|
|
44
|
-
(
|
|
43
|
+
n.nullText ? (b(), k("option", Zt, P(n.nullText), 1)) : A("", !0),
|
|
44
|
+
(b(!0), k(oe, null, ye(s.value, (E, f) => {
|
|
45
45
|
var w;
|
|
46
|
-
return
|
|
46
|
+
return b(), k("option", {
|
|
47
47
|
key: f,
|
|
48
48
|
value: (w = i.value) == null ? void 0 : w[f]
|
|
49
|
-
},
|
|
49
|
+
}, P(E), 9, Gt);
|
|
50
50
|
}), 128))
|
|
51
51
|
], 512)), [
|
|
52
|
-
[
|
|
53
|
-
]) : (
|
|
54
|
-
|
|
52
|
+
[Ot, a.value]
|
|
53
|
+
]) : (b(), k("select", Xt, [
|
|
54
|
+
$("option", null, P(n.loadingText || "Loading..."), 1)
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), Jt = /* @__PURE__ */ R({
|
|
58
58
|
__name: "overlay-anchor",
|
|
59
59
|
props: {
|
|
60
60
|
overlayId: {},
|
|
61
61
|
anchor: {}
|
|
62
62
|
},
|
|
63
63
|
setup(e) {
|
|
64
|
-
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]),
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
if (!
|
|
68
|
-
const
|
|
69
|
-
o.value =
|
|
64
|
+
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), s = ge();
|
|
65
|
+
_(a);
|
|
66
|
+
function a() {
|
|
67
|
+
if (!s) return;
|
|
68
|
+
const v = s.vnode.el, { styles: E, classes: f } = r(v, n);
|
|
69
|
+
o.value = E, i.value = f;
|
|
70
70
|
}
|
|
71
|
-
function r(
|
|
72
|
-
const f = t.anchor instanceof HTMLElement ? {} : t.anchor, w =
|
|
73
|
-
f.matchWidth && (
|
|
74
|
-
const
|
|
75
|
-
let
|
|
71
|
+
function r(v, E) {
|
|
72
|
+
const f = t.anchor instanceof HTMLElement ? {} : t.anchor, w = E.getBoundingClientRect(), y = v.getBoundingClientRect();
|
|
73
|
+
f.matchWidth && (y.width = w.width), f.matchHeight && (y.height = w.height);
|
|
74
|
+
const c = f.class ? Array.isArray(f.class) ? f.class : [f.class] : [];
|
|
75
|
+
let d, C;
|
|
76
76
|
if (f.y === "center")
|
|
77
|
-
|
|
77
|
+
d = w.top + w.height / 2 - y.height / 2, c.push("anchored-center-y");
|
|
78
78
|
else {
|
|
79
|
-
const
|
|
80
|
-
|
|
79
|
+
const M = (w.bottom + y.height < window.innerHeight || f.y === "below") && f.y !== "above";
|
|
80
|
+
d = M ? w.bottom : w.top - y.height, c.push(M ? "anchored-top" : "anchored-bottom");
|
|
81
81
|
}
|
|
82
82
|
if (f.x === "center")
|
|
83
|
-
|
|
83
|
+
C = w.left + w.width / 2 - y.width / 2, c.push("anchored-center-x");
|
|
84
84
|
else {
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
const M = (w.left + y.width < window.innerWidth || f.x === "left") && f.x !== "right";
|
|
86
|
+
C = M ? w.left : w.right - y.width, c.push(M ? "anchored-left" : "anchored-right");
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
styles: {
|
|
90
|
-
top: `${
|
|
91
|
-
left: `${
|
|
92
|
-
...f.matchWidth ? { width: `${
|
|
93
|
-
...f.matchHeight ? { height: `${
|
|
90
|
+
top: `${d}px`,
|
|
91
|
+
left: `${C}px`,
|
|
92
|
+
...f.matchWidth ? { width: `${y.width}px` } : {},
|
|
93
|
+
...f.matchHeight ? { height: `${y.height}px` } : {}
|
|
94
94
|
},
|
|
95
|
-
classes:
|
|
95
|
+
classes: c
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
window.removeEventListener("click",
|
|
98
|
+
function u() {
|
|
99
|
+
window.removeEventListener("click", u), tn(t.overlayId);
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return _(() => {
|
|
102
102
|
setTimeout(() => {
|
|
103
|
-
window.addEventListener("click",
|
|
103
|
+
window.addEventListener("click", u);
|
|
104
104
|
}, 10);
|
|
105
|
-
}), (
|
|
105
|
+
}), (v, E) => (b(), k("div", {
|
|
106
106
|
class: B(["vf-overlay-anchor", i.value]),
|
|
107
|
-
style:
|
|
108
|
-
onClick:
|
|
107
|
+
style: Ft(o.value),
|
|
108
|
+
onClick: we(u, ["stop"])
|
|
109
109
|
}, [
|
|
110
|
-
|
|
110
|
+
q(v.$slots, "default")
|
|
111
111
|
], 6));
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
let
|
|
115
|
-
const N =
|
|
114
|
+
let Qt = 0;
|
|
115
|
+
const N = Dt([]), Ho = R({
|
|
116
116
|
setup() {
|
|
117
|
-
return () =>
|
|
118
|
-
|
|
117
|
+
return () => se("div", [
|
|
118
|
+
ye(N, (e) => se(Ht, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
119
119
|
]);
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
function
|
|
122
|
+
function be(e, t, n) {
|
|
123
123
|
const o = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
124
124
|
o.id = "vf-overlay-target", o.removeAttribute("inert"), document.body.appendChild(o);
|
|
125
|
-
const i = String(++
|
|
125
|
+
const i = String(++Qt), s = Vt(e), a = se(s, t), r = n != null && n.anchor ? se(Jt, { overlayId: i, anchor: n.anchor }, () => [a]) : void 0, u = {
|
|
126
126
|
id: i,
|
|
127
|
-
component:
|
|
127
|
+
component: s,
|
|
128
128
|
props: t,
|
|
129
129
|
options: n ?? {},
|
|
130
|
-
vnode:
|
|
130
|
+
vnode: a,
|
|
131
131
|
wrapperVnode: r
|
|
132
132
|
};
|
|
133
|
-
return N.push(
|
|
133
|
+
return N.push(u), u;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
e.$ &&
|
|
135
|
+
function Vo(e) {
|
|
136
|
+
e.$ && Qe(e.$);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Qe(e) {
|
|
139
139
|
let t = e;
|
|
140
|
-
for (; t && !
|
|
140
|
+
for (; t && !en(t.vnode); )
|
|
141
141
|
t = t.parent;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function en(e) {
|
|
144
144
|
const t = N.findIndex((n) => n.vnode.component === e.component);
|
|
145
145
|
return t >= 0 ? (N[t].props.callback(), !0) : !1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function tn(e) {
|
|
148
148
|
const t = N.findIndex((n) => n.id === e);
|
|
149
149
|
return t >= 0 ? (N[t].props.callback(), !0) : !1;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function ie(e) {
|
|
152
152
|
const t = N.indexOf(e);
|
|
153
153
|
t >= 0 && N.splice(t, 1);
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
155
|
+
async function ke(e, t, n) {
|
|
156
156
|
return new Promise((o) => {
|
|
157
157
|
let i = null;
|
|
158
|
-
const
|
|
158
|
+
const a = { ...t, callback: async (r) => {
|
|
159
159
|
if (n != null && n.onCallback) {
|
|
160
|
-
const
|
|
161
|
-
if (typeof
|
|
160
|
+
const u = n.onCallback(r);
|
|
161
|
+
if (typeof u == "object" && "then" in u && typeof u.then == "function" && await u === !1)
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
ie(i), o(r);
|
|
165
165
|
} };
|
|
166
|
-
i =
|
|
166
|
+
i = be(e, a, n);
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function le(e, t) {
|
|
170
170
|
return typeof e == "object" && !(e instanceof Error) ? {
|
|
171
171
|
...e,
|
|
172
172
|
classes: e.classes ?? []
|
|
173
173
|
} : { title: t ? e : void 0, message: t ?? e, classes: [] };
|
|
174
174
|
}
|
|
175
|
-
async function
|
|
176
|
-
await
|
|
175
|
+
async function nn(e, t) {
|
|
176
|
+
await ke(ae, le(e, t));
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
179
|
-
const n =
|
|
180
|
-
return await
|
|
178
|
+
async function Ao(e, t) {
|
|
179
|
+
const n = le(e, t);
|
|
180
|
+
return await ke(ae, {
|
|
181
181
|
...n,
|
|
182
182
|
shouldConfirm: !0
|
|
183
183
|
}) === !0;
|
|
184
184
|
}
|
|
185
|
-
async function
|
|
186
|
-
const n =
|
|
187
|
-
return await
|
|
185
|
+
async function $o(e, t) {
|
|
186
|
+
const n = le(e, t);
|
|
187
|
+
return await ke(ae, {
|
|
188
188
|
...n,
|
|
189
189
|
shouldConfirm: !0,
|
|
190
190
|
classes: ["destructive", ...n.classes]
|
|
191
191
|
}) === !0;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
const n =
|
|
193
|
+
function Bo(e, t) {
|
|
194
|
+
const n = le(e, t), o = be(ae, {
|
|
195
195
|
...n,
|
|
196
196
|
isBare: !0,
|
|
197
197
|
classes: ["wait", ...n.classes],
|
|
198
198
|
callback: () => {
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
|
-
return () =>
|
|
201
|
+
return () => ie(o);
|
|
202
202
|
}
|
|
203
|
-
const
|
|
203
|
+
const H = {
|
|
204
204
|
unhandledErrorSupportText: "please contact support",
|
|
205
205
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
206
206
|
defaultDateFormat: "M/d/yy",
|
|
207
207
|
defaultTimeFormat: "H:mm"
|
|
208
208
|
};
|
|
209
|
-
function
|
|
210
|
-
Object.assign(
|
|
209
|
+
function _o(e) {
|
|
210
|
+
Object.assign(H, e);
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class re extends Error {
|
|
213
213
|
constructor(t) {
|
|
214
214
|
super(t), this.name = "UserError";
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
return e instanceof
|
|
217
|
+
function on(e) {
|
|
218
|
+
return e instanceof re ? e.message : `An application error has occurred:
|
|
219
219
|
|
|
220
|
-
${
|
|
220
|
+
${Te(e).message}
|
|
221
221
|
|
|
222
|
-
Please refresh the page and try again. If this error persists, ${
|
|
222
|
+
Please refresh the page and try again. If this error persists, ${H.unhandledErrorSupportText}.`;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
return
|
|
224
|
+
function Te(e) {
|
|
225
|
+
return sn(e) ? e : new Error(String(e));
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function sn(e) {
|
|
228
228
|
return e instanceof Error || typeof e == "object" && e !== null && "message" in e && "name" in e;
|
|
229
229
|
}
|
|
230
|
-
async function
|
|
231
|
-
const n =
|
|
232
|
-
return n instanceof
|
|
230
|
+
async function No(e, t) {
|
|
231
|
+
const n = Te(e);
|
|
232
|
+
return n instanceof re || H.errorHandler(n), nn({
|
|
233
233
|
title: t == null ? void 0 : t.title,
|
|
234
234
|
message: n,
|
|
235
235
|
classes: t == null ? void 0 : t.classes
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
async function
|
|
239
|
-
const t =
|
|
240
|
-
t instanceof
|
|
238
|
+
async function Ro(e) {
|
|
239
|
+
const t = Te(e);
|
|
240
|
+
t instanceof re || H.errorHandler(t);
|
|
241
241
|
}
|
|
242
|
-
const
|
|
243
|
-
function
|
|
242
|
+
const X = Symbol("MaskState");
|
|
243
|
+
function Wo(e, t) {
|
|
244
244
|
var i;
|
|
245
245
|
const n = (i = e.$) == null ? void 0 : i.vnode.el, o = n.closest(".vf-modal");
|
|
246
|
-
return
|
|
246
|
+
return ln(o ?? n, t);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function jo(e) {
|
|
249
249
|
var o;
|
|
250
250
|
const t = (o = e.$) == null ? void 0 : o.vnode.el, n = t.closest(".vf-modal");
|
|
251
|
-
return
|
|
251
|
+
return et(n ?? t);
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
if (!e[
|
|
253
|
+
function ln(e, t) {
|
|
254
|
+
if (!e[X]) {
|
|
255
255
|
const n = document.createElement("div");
|
|
256
|
-
n.classList.add("vf-mask"), e.appendChild(n), e[
|
|
256
|
+
n.classList.add("vf-mask"), e.appendChild(n), e[X] = { maskEl: n };
|
|
257
257
|
}
|
|
258
|
-
return e[
|
|
258
|
+
return e[X].maskEl.innerText = t ?? "", () => et(e);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
e[
|
|
260
|
+
function et(e) {
|
|
261
|
+
e[X] && e.removeChild(e[X].maskEl);
|
|
262
262
|
}
|
|
263
|
-
const
|
|
264
|
-
function
|
|
265
|
-
const o = e instanceof Element ? e :
|
|
263
|
+
const pe = Symbol("FormMaskState");
|
|
264
|
+
function rn(e, t, n) {
|
|
265
|
+
const o = e instanceof Element ? e : nt(e);
|
|
266
266
|
if (!o) return () => {
|
|
267
267
|
};
|
|
268
268
|
o.classList.add("vf-masked");
|
|
269
269
|
const i = t instanceof Element ? t : o.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
|
|
270
|
-
let
|
|
271
|
-
i && (
|
|
270
|
+
let s;
|
|
271
|
+
i && (s = i.tagName === "INPUT" ? i.value : i.innerHTML, i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...");
|
|
272
272
|
const r = [...o.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
|
|
273
|
-
return r.forEach((
|
|
273
|
+
return r.forEach((u) => u.setAttribute("disabled", "disabled")), o[pe] = {
|
|
274
274
|
disabledElements: r,
|
|
275
275
|
waitButton: i,
|
|
276
|
-
buttonHtml:
|
|
277
|
-
}, () =>
|
|
276
|
+
buttonHtml: s
|
|
277
|
+
}, () => tt(o);
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
const t = e instanceof Element ? e :
|
|
279
|
+
function tt(e) {
|
|
280
|
+
const t = e instanceof Element ? e : nt(e);
|
|
281
281
|
if (!t) return;
|
|
282
|
-
const n = t[
|
|
283
|
-
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((o) => o.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[
|
|
282
|
+
const n = t[pe];
|
|
283
|
+
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((o) => o.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[pe]);
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function nt(e) {
|
|
286
286
|
var n;
|
|
287
287
|
const t = (n = e == null ? void 0 : e.$) == null ? void 0 : n.vnode.el;
|
|
288
288
|
return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const an = ["id"], un = {
|
|
291
291
|
key: 0,
|
|
292
292
|
class: "vf-modal-header"
|
|
293
|
-
},
|
|
293
|
+
}, cn = { class: "vf-modal-content" }, dn = {
|
|
294
294
|
key: 1,
|
|
295
295
|
class: "vf-modal-footer"
|
|
296
|
-
},
|
|
296
|
+
}, fn = /* @__PURE__ */ R({
|
|
297
297
|
__name: "vf-modal",
|
|
298
298
|
props: {
|
|
299
299
|
id: {},
|
|
@@ -304,70 +304,70 @@ const en = ["id"], tn = {
|
|
|
304
304
|
},
|
|
305
305
|
emits: ["formSubmit"],
|
|
306
306
|
setup(e, { expose: t }) {
|
|
307
|
-
const n =
|
|
308
|
-
t({ mask: f, unmask: w, hide:
|
|
309
|
-
const i = T(),
|
|
310
|
-
|
|
311
|
-
var
|
|
312
|
-
document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown",
|
|
313
|
-
}),
|
|
314
|
-
window.removeEventListener("keydown",
|
|
307
|
+
const n = ge(), o = e;
|
|
308
|
+
t({ mask: f, unmask: w, hide: y, unhide: c });
|
|
309
|
+
const i = T(), s = T(), a = T(!1), r = x(() => Ge([...Array.isArray(o.class) ? o.class : [o.class], a.value && "hidden"]));
|
|
310
|
+
_(() => {
|
|
311
|
+
var d;
|
|
312
|
+
document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", v), (d = i.value) == null || d.addEventListener("click", u));
|
|
313
|
+
}), Ee(() => {
|
|
314
|
+
window.removeEventListener("keydown", v), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
|
|
315
315
|
});
|
|
316
|
-
function d
|
|
317
|
-
|
|
316
|
+
function u(d) {
|
|
317
|
+
d.target == i.value && E();
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
if (
|
|
321
|
-
const
|
|
322
|
-
|
|
319
|
+
function v(d) {
|
|
320
|
+
if (d.key === "Esc" || d.key === "Escape") {
|
|
321
|
+
const C = document.querySelectorAll(".vf-modal-wrap");
|
|
322
|
+
C[C.length - 1] === i.value && E();
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
|
|
325
|
+
function E() {
|
|
326
|
+
Qe(n);
|
|
327
327
|
}
|
|
328
328
|
function f() {
|
|
329
|
-
return
|
|
329
|
+
return rn(s.value), () => w();
|
|
330
330
|
}
|
|
331
331
|
function w() {
|
|
332
|
-
|
|
332
|
+
tt(s.value);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
return
|
|
334
|
+
function y() {
|
|
335
|
+
return a.value = !0, () => c();
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
337
|
+
function c() {
|
|
338
|
+
a.value = !1;
|
|
339
339
|
}
|
|
340
|
-
return (
|
|
341
|
-
id:
|
|
340
|
+
return (d, C) => (b(), k("div", {
|
|
341
|
+
id: d.id,
|
|
342
342
|
ref_key: "overlay",
|
|
343
343
|
ref: i,
|
|
344
344
|
class: B(["vf-overlay vf-modal-wrap", r.value])
|
|
345
345
|
}, [
|
|
346
|
-
|
|
346
|
+
$("form", {
|
|
347
347
|
ref_key: "form",
|
|
348
|
-
ref:
|
|
348
|
+
ref: s,
|
|
349
349
|
action: ".",
|
|
350
|
-
class: B(["vf-modal", { scrolls:
|
|
351
|
-
onSubmit:
|
|
350
|
+
class: B(["vf-modal", { scrolls: d.scrolls }]),
|
|
351
|
+
onSubmit: C[0] || (C[0] = we((I) => d.$emit("formSubmit"), ["prevent"]))
|
|
352
352
|
}, [
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
o.closeX ? (
|
|
353
|
+
d.$slots.header ? (b(), k("div", un, [
|
|
354
|
+
q(d.$slots, "header"),
|
|
355
|
+
o.closeX ? (b(), k("i", {
|
|
356
356
|
key: 0,
|
|
357
357
|
class: "close",
|
|
358
|
-
onClick:
|
|
358
|
+
onClick: E
|
|
359
359
|
})) : A("", !0)
|
|
360
360
|
])) : A("", !0),
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
$("div", cn, [
|
|
362
|
+
q(d.$slots, "default")
|
|
363
363
|
]),
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
d.$slots.footer ? (b(), k("div", dn, [
|
|
365
|
+
q(d.$slots, "footer")
|
|
366
366
|
])) : A("", !0)
|
|
367
367
|
], 34)
|
|
368
|
-
], 10,
|
|
368
|
+
], 10, an));
|
|
369
369
|
}
|
|
370
|
-
}),
|
|
370
|
+
}), vn = ["innerHtml"], mn = ["innerText"], ae = /* @__PURE__ */ R({
|
|
371
371
|
__name: "vf-alert-modal",
|
|
372
372
|
props: {
|
|
373
373
|
isBare: { type: Boolean },
|
|
@@ -380,59 +380,59 @@ const en = ["id"], tn = {
|
|
|
380
380
|
callback: { type: Function }
|
|
381
381
|
},
|
|
382
382
|
setup(e) {
|
|
383
|
-
const t = e, n = x(() => t.message instanceof Error ?
|
|
383
|
+
const t = e, n = x(() => t.message instanceof Error ? on(t.message) : t.message);
|
|
384
384
|
return (o, i) => {
|
|
385
|
-
const
|
|
386
|
-
return
|
|
385
|
+
const s = At("autofocus");
|
|
386
|
+
return b(), Ye(fn, {
|
|
387
387
|
class: B(["vf-alert", ...o.classes ?? []])
|
|
388
|
-
},
|
|
389
|
-
default:
|
|
390
|
-
o.iconClass ? (
|
|
388
|
+
}, $t({
|
|
389
|
+
default: ve(() => [
|
|
390
|
+
o.iconClass ? (b(), k("i", {
|
|
391
391
|
key: 0,
|
|
392
392
|
class: B(["vf-alert-icon", o.iconClass])
|
|
393
393
|
}, null, 2)) : A("", !0),
|
|
394
|
-
o.isHtml ? (
|
|
394
|
+
o.isHtml ? (b(), k("div", {
|
|
395
395
|
key: 1,
|
|
396
396
|
innerHtml: o.message,
|
|
397
397
|
class: "user-message"
|
|
398
|
-
}, null, 8,
|
|
398
|
+
}, null, 8, vn)) : (b(), k("div", {
|
|
399
399
|
key: 2,
|
|
400
400
|
innerText: n.value
|
|
401
|
-
}, null, 8,
|
|
401
|
+
}, null, 8, mn))
|
|
402
402
|
]),
|
|
403
403
|
_: 2
|
|
404
404
|
}, [
|
|
405
405
|
o.title ? {
|
|
406
406
|
name: "header",
|
|
407
|
-
fn:
|
|
408
|
-
|
|
407
|
+
fn: ve(() => [
|
|
408
|
+
ee(P(o.title), 1)
|
|
409
409
|
]),
|
|
410
410
|
key: "0"
|
|
411
411
|
} : void 0,
|
|
412
412
|
o.isBare ? void 0 : {
|
|
413
413
|
name: "footer",
|
|
414
|
-
fn:
|
|
415
|
-
o.shouldConfirm ? (
|
|
416
|
-
|
|
414
|
+
fn: ve(() => [
|
|
415
|
+
o.shouldConfirm ? (b(), k(oe, { key: 0 }, [
|
|
416
|
+
ne((b(), k("button", {
|
|
417
417
|
class: "primary",
|
|
418
418
|
onClick: i[0] || (i[0] = () => o.callback(!0))
|
|
419
419
|
}, i[3] || (i[3] = [
|
|
420
|
-
|
|
420
|
+
ee("Confirm")
|
|
421
421
|
]))), [
|
|
422
|
-
[
|
|
422
|
+
[s]
|
|
423
423
|
]),
|
|
424
|
-
|
|
424
|
+
$("button", {
|
|
425
425
|
class: "default",
|
|
426
426
|
onClick: i[1] || (i[1] = () => o.callback(!1))
|
|
427
427
|
}, "Cancel")
|
|
428
|
-
], 64)) :
|
|
428
|
+
], 64)) : ne((b(), k("button", {
|
|
429
429
|
key: 1,
|
|
430
430
|
class: "default",
|
|
431
431
|
onClick: i[2] || (i[2] = () => o.callback(!0))
|
|
432
432
|
}, i[4] || (i[4] = [
|
|
433
|
-
|
|
433
|
+
ee("OK")
|
|
434
434
|
]))), [
|
|
435
|
-
[
|
|
435
|
+
[s]
|
|
436
436
|
])
|
|
437
437
|
]),
|
|
438
438
|
key: "1"
|
|
@@ -440,56 +440,198 @@ const en = ["id"], tn = {
|
|
|
440
440
|
]), 1032, ["class"]);
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
})
|
|
443
|
+
});
|
|
444
|
+
/*!
|
|
445
|
+
* currency.js - v2.0.4
|
|
446
|
+
* http://scurker.github.io/currency.js
|
|
447
|
+
*
|
|
448
|
+
* Copyright (c) 2021 Jason Wilson
|
|
449
|
+
* Released under MIT license
|
|
450
|
+
*/
|
|
451
|
+
var hn = {
|
|
452
|
+
symbol: "$",
|
|
453
|
+
separator: ",",
|
|
454
|
+
decimal: ".",
|
|
455
|
+
errorOnInvalid: !1,
|
|
456
|
+
precision: 2,
|
|
457
|
+
pattern: "!#",
|
|
458
|
+
negativePattern: "-!#",
|
|
459
|
+
format: wn,
|
|
460
|
+
fromCents: !1
|
|
461
|
+
}, ot = function(t) {
|
|
462
|
+
return Math.round(t);
|
|
463
|
+
}, Ce = function(t) {
|
|
464
|
+
return Math.pow(10, t);
|
|
465
|
+
}, pn = function(t, n) {
|
|
466
|
+
return ot(t / n) * n;
|
|
467
|
+
}, yn = /(\d)(?=(\d{3})+\b)/g, gn = /(\d)(?=(\d\d)+\d\b)/g;
|
|
468
|
+
function V(e, t) {
|
|
469
|
+
var n = this;
|
|
470
|
+
if (!(n instanceof V))
|
|
471
|
+
return new V(e, t);
|
|
472
|
+
var o = Object.assign({}, hn, t), i = Ce(o.precision), s = te(e, o);
|
|
473
|
+
n.intValue = s, n.value = s / i, o.increment = o.increment || 1 / i, o.useVedic ? o.groups = gn : o.groups = yn, this.s = o, this.p = i;
|
|
474
|
+
}
|
|
475
|
+
function te(e, t) {
|
|
476
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = 0, i = t.decimal, s = t.errorOnInvalid, a = t.precision, r = t.fromCents, u = Ce(a), v = typeof e == "number", E = e instanceof V;
|
|
477
|
+
if (E && r)
|
|
478
|
+
return e.intValue;
|
|
479
|
+
if (v || E)
|
|
480
|
+
o = E ? e.value : e;
|
|
481
|
+
else if (typeof e == "string") {
|
|
482
|
+
var f = new RegExp("[^-\\d" + i + "]", "g"), w = new RegExp("\\" + i, "g");
|
|
483
|
+
o = e.replace(/\((.*)\)/, "-$1").replace(f, "").replace(w, "."), o = o || 0;
|
|
484
|
+
} else {
|
|
485
|
+
if (s)
|
|
486
|
+
throw Error("Invalid Input");
|
|
487
|
+
o = 0;
|
|
488
|
+
}
|
|
489
|
+
return r || (o *= u, o = o.toFixed(4)), n ? ot(o) : o;
|
|
490
|
+
}
|
|
491
|
+
function wn(e, t) {
|
|
492
|
+
var n = t.pattern, o = t.negativePattern, i = t.symbol, s = t.separator, a = t.decimal, r = t.groups, u = ("" + e).replace(/^-/, "").split("."), v = u[0], E = u[1];
|
|
493
|
+
return (e.value >= 0 ? n : o).replace("!", i).replace("#", v.replace(r, "$1" + s) + (E ? a + E : ""));
|
|
494
|
+
}
|
|
495
|
+
V.prototype = {
|
|
496
|
+
/**
|
|
497
|
+
* Adds values together.
|
|
498
|
+
* @param {number} number
|
|
499
|
+
* @returns {currency}
|
|
500
|
+
*/
|
|
501
|
+
add: function(t) {
|
|
502
|
+
var n = this.intValue, o = this.s, i = this.p;
|
|
503
|
+
return V((n += te(t, o)) / (o.fromCents ? 1 : i), o);
|
|
504
|
+
},
|
|
505
|
+
/**
|
|
506
|
+
* Subtracts value.
|
|
507
|
+
* @param {number} number
|
|
508
|
+
* @returns {currency}
|
|
509
|
+
*/
|
|
510
|
+
subtract: function(t) {
|
|
511
|
+
var n = this.intValue, o = this.s, i = this.p;
|
|
512
|
+
return V((n -= te(t, o)) / (o.fromCents ? 1 : i), o);
|
|
513
|
+
},
|
|
514
|
+
/**
|
|
515
|
+
* Multiplies values.
|
|
516
|
+
* @param {number} number
|
|
517
|
+
* @returns {currency}
|
|
518
|
+
*/
|
|
519
|
+
multiply: function(t) {
|
|
520
|
+
var n = this.intValue, o = this.s;
|
|
521
|
+
return V((n *= t) / (o.fromCents ? 1 : Ce(o.precision)), o);
|
|
522
|
+
},
|
|
523
|
+
/**
|
|
524
|
+
* Divides value.
|
|
525
|
+
* @param {number} number
|
|
526
|
+
* @returns {currency}
|
|
527
|
+
*/
|
|
528
|
+
divide: function(t) {
|
|
529
|
+
var n = this.intValue, o = this.s;
|
|
530
|
+
return V(n /= te(t, o, !1), o);
|
|
531
|
+
},
|
|
532
|
+
/**
|
|
533
|
+
* Takes the currency amount and distributes the values evenly. Any extra pennies
|
|
534
|
+
* left over from the distribution will be stacked onto the first set of entries.
|
|
535
|
+
* @param {number} count
|
|
536
|
+
* @returns {array}
|
|
537
|
+
*/
|
|
538
|
+
distribute: function(t) {
|
|
539
|
+
for (var n = this.intValue, o = this.p, i = this.s, s = [], a = Math[n >= 0 ? "floor" : "ceil"](n / t), r = Math.abs(n - a * t), u = i.fromCents ? 1 : o; t !== 0; t--) {
|
|
540
|
+
var v = V(a / u, i);
|
|
541
|
+
r-- > 0 && (v = v[n >= 0 ? "add" : "subtract"](1 / u)), s.push(v);
|
|
542
|
+
}
|
|
543
|
+
return s;
|
|
544
|
+
},
|
|
545
|
+
/**
|
|
546
|
+
* Returns the dollar value.
|
|
547
|
+
* @returns {number}
|
|
548
|
+
*/
|
|
549
|
+
dollars: function() {
|
|
550
|
+
return ~~this.value;
|
|
551
|
+
},
|
|
552
|
+
/**
|
|
553
|
+
* Returns the cent value.
|
|
554
|
+
* @returns {number}
|
|
555
|
+
*/
|
|
556
|
+
cents: function() {
|
|
557
|
+
var t = this.intValue, n = this.p;
|
|
558
|
+
return ~~(t % n);
|
|
559
|
+
},
|
|
560
|
+
/**
|
|
561
|
+
* Formats the value as a string according to the formatting settings.
|
|
562
|
+
* @param {boolean} useSymbol - format with currency symbol
|
|
563
|
+
* @returns {string}
|
|
564
|
+
*/
|
|
565
|
+
format: function(t) {
|
|
566
|
+
var n = this.s;
|
|
567
|
+
return typeof t == "function" ? t(this, n) : n.format(this, Object.assign({}, n, t));
|
|
568
|
+
},
|
|
569
|
+
/**
|
|
570
|
+
* Formats the value as a string according to the formatting settings.
|
|
571
|
+
* @returns {string}
|
|
572
|
+
*/
|
|
573
|
+
toString: function() {
|
|
574
|
+
var t = this.intValue, n = this.p, o = this.s;
|
|
575
|
+
return pn(t / n, o.increment).toFixed(o.precision);
|
|
576
|
+
},
|
|
577
|
+
/**
|
|
578
|
+
* Value for JSON serialization.
|
|
579
|
+
* @returns {float}
|
|
580
|
+
*/
|
|
581
|
+
toJSON: function() {
|
|
582
|
+
return this.value;
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
const L = [];
|
|
444
586
|
for (let e = 0; e < 256; ++e)
|
|
445
|
-
|
|
446
|
-
function
|
|
447
|
-
return (
|
|
448
|
-
}
|
|
449
|
-
let
|
|
450
|
-
const
|
|
451
|
-
function
|
|
452
|
-
if (!
|
|
587
|
+
L.push((e + 256).toString(16).slice(1));
|
|
588
|
+
function En(e, t = 0) {
|
|
589
|
+
return (L[e[t + 0]] + L[e[t + 1]] + L[e[t + 2]] + L[e[t + 3]] + "-" + L[e[t + 4]] + L[e[t + 5]] + "-" + L[e[t + 6]] + L[e[t + 7]] + "-" + L[e[t + 8]] + L[e[t + 9]] + "-" + L[e[t + 10]] + L[e[t + 11]] + L[e[t + 12]] + L[e[t + 13]] + L[e[t + 14]] + L[e[t + 15]]).toLowerCase();
|
|
590
|
+
}
|
|
591
|
+
let me;
|
|
592
|
+
const bn = new Uint8Array(16);
|
|
593
|
+
function kn() {
|
|
594
|
+
if (!me) {
|
|
453
595
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
454
596
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
455
|
-
|
|
597
|
+
me = crypto.getRandomValues.bind(crypto);
|
|
456
598
|
}
|
|
457
|
-
return
|
|
599
|
+
return me(bn);
|
|
458
600
|
}
|
|
459
|
-
const
|
|
460
|
-
function
|
|
601
|
+
const Tn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), _e = { randomUUID: Tn };
|
|
602
|
+
function Cn(e, t, n) {
|
|
461
603
|
var i;
|
|
462
|
-
if (
|
|
463
|
-
return
|
|
604
|
+
if (_e.randomUUID && !e)
|
|
605
|
+
return _e.randomUUID();
|
|
464
606
|
e = e || {};
|
|
465
|
-
const o = e.random ?? ((i = e.rng) == null ? void 0 : i.call(e)) ??
|
|
607
|
+
const o = e.random ?? ((i = e.rng) == null ? void 0 : i.call(e)) ?? kn();
|
|
466
608
|
if (o.length < 16)
|
|
467
609
|
throw new Error("Random bytes length must be >= 16");
|
|
468
|
-
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128,
|
|
610
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, En(o);
|
|
469
611
|
}
|
|
470
|
-
function
|
|
612
|
+
function Uo(e) {
|
|
471
613
|
return e.replace(/\n/g, "<br>");
|
|
472
614
|
}
|
|
473
|
-
function
|
|
615
|
+
function Sn(e) {
|
|
474
616
|
return e.replace(/_/g, " ");
|
|
475
617
|
}
|
|
476
|
-
function
|
|
618
|
+
function Mn(e) {
|
|
477
619
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
478
620
|
return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
479
621
|
}
|
|
480
|
-
function
|
|
481
|
-
return
|
|
622
|
+
function Ln(e, t = 1) {
|
|
623
|
+
return V(e).divide(t).format();
|
|
482
624
|
}
|
|
483
|
-
function
|
|
484
|
-
return
|
|
625
|
+
function Po() {
|
|
626
|
+
return Cn();
|
|
485
627
|
}
|
|
486
|
-
const
|
|
628
|
+
const xn = ["disabled", "placeholder", "required"], In = {
|
|
487
629
|
key: 0,
|
|
488
630
|
class: "no-results"
|
|
489
|
-
},
|
|
631
|
+
}, On = ["onMousemove", "onMousedown"], Fn = ["innerHTML"], Dn = ["innerHTML"], Hn = {
|
|
490
632
|
key: 0,
|
|
491
633
|
class: "no-results"
|
|
492
|
-
},
|
|
634
|
+
}, Vn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", An = /* @__PURE__ */ R({
|
|
493
635
|
__name: "vf-smart-select",
|
|
494
636
|
props: {
|
|
495
637
|
modelValue: {},
|
|
@@ -521,251 +663,251 @@ const pn = ["disabled", "placeholder", "required"], yn = {
|
|
|
521
663
|
},
|
|
522
664
|
emits: ["optionsLoaded", "update:modelValue"],
|
|
523
665
|
setup(e, { expose: t, emit: n }) {
|
|
524
|
-
const o = Symbol("null"), i = Symbol("create"),
|
|
666
|
+
const o = Symbol("null"), i = Symbol("create"), s = e, a = n;
|
|
525
667
|
t({
|
|
526
|
-
addRemoteOption:
|
|
668
|
+
addRemoteOption: Lt
|
|
527
669
|
});
|
|
528
|
-
const r = T(),
|
|
529
|
-
var
|
|
530
|
-
const
|
|
531
|
-
return
|
|
532
|
-
|
|
533
|
-
}) : (
|
|
534
|
-
key: ((
|
|
535
|
-
title:
|
|
536
|
-
subtitle:
|
|
537
|
-
searchContent:
|
|
538
|
-
ref:
|
|
670
|
+
const r = T(), u = T(), v = T(), E = T(!1), f = T(!1), w = T([]), y = T(!1), c = T(""), d = T(null), C = T(null), I = T(!1), M = T(null), Le = T(!1), ft = x(() => s.showCreateTextOnNewItem ?? !0), vt = x(() => s.prependOptions ?? []), mt = x(() => s.appendOptions ?? []), xe = x(() => !!s.disabled), ht = x(() => !f.value && s.preload ? "Loading..." : s.nullTitle ? s.nullTitle : s.placeholder || ""), pt = x(() => s.noResultsText || "No options match your search."), U = x(() => s.valueExtractor ? s.valueExtractor : s.valueField ? (l) => l[s.valueField] : null), z = x(() => s.keyExtractor ? s.keyExtractor : s.keyField ? (l) => String(l[s.keyField]) : U.value ? (l) => String(U.value(l)) : null), ue = x(() => s.formatter ? s.formatter : s.labelField ? (l) => String(l[s.labelField]) : (l) => String(l)), Ie = x(() => [...vt.value, ...w.value, ...mt.value]), ce = x(() => Ie.value.map((l, m) => {
|
|
671
|
+
var Ae, $e;
|
|
672
|
+
const h = ue.value(l), p = (Ae = s.subtitleFormatter) == null ? void 0 : Ae.call(s, l), g = h ? h.trim().toLowerCase() : "", S = p ? p.trim().toLowerCase() : "", Q = [];
|
|
673
|
+
return s.searchFields ? s.searchFields.forEach((Be) => {
|
|
674
|
+
l[Be] && Q.push(String(l[Be]).toLowerCase());
|
|
675
|
+
}) : (Q.push(g), S && Q.push(S)), {
|
|
676
|
+
key: (($e = z.value) == null ? void 0 : $e.call(z, l)) ?? String(m),
|
|
677
|
+
title: h,
|
|
678
|
+
subtitle: p,
|
|
679
|
+
searchContent: Q.join(""),
|
|
680
|
+
ref: l
|
|
539
681
|
};
|
|
540
|
-
})),
|
|
541
|
-
let
|
|
542
|
-
if (
|
|
543
|
-
const
|
|
544
|
-
if (
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
var
|
|
682
|
+
})), O = x(() => {
|
|
683
|
+
let l = [...ce.value];
|
|
684
|
+
if (y.value) {
|
|
685
|
+
const m = c.value.trim().toLowerCase();
|
|
686
|
+
if (m.length) {
|
|
687
|
+
l = l.filter((g) => g.searchContent.includes(m));
|
|
688
|
+
const h = Pt(c.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${h})`, "ig");
|
|
689
|
+
l = l.map((g) => {
|
|
690
|
+
var S;
|
|
549
691
|
return {
|
|
550
|
-
...
|
|
551
|
-
title:
|
|
552
|
-
subtitle: (
|
|
692
|
+
...g,
|
|
693
|
+
title: g.title.replace(p, "<mark>$1</mark>"),
|
|
694
|
+
subtitle: (S = g.subtitle) == null ? void 0 : S.replace(p, "<mark>$1</mark>")
|
|
553
695
|
};
|
|
554
|
-
}),
|
|
696
|
+
}), Le.value && (l.find((S) => S.searchContent === m) !== void 0 || l.push({
|
|
555
697
|
key: i,
|
|
556
|
-
title:
|
|
698
|
+
title: ft.value ? "Create <strong>" + c.value.trim() + "</strong>..." : c.value.trim()
|
|
557
699
|
}));
|
|
558
700
|
}
|
|
559
|
-
} else
|
|
701
|
+
} else s.nullTitle && l.unshift({
|
|
560
702
|
key: o,
|
|
561
|
-
title:
|
|
703
|
+
title: s.nullTitle
|
|
562
704
|
});
|
|
563
|
-
return
|
|
705
|
+
return l;
|
|
564
706
|
});
|
|
565
|
-
|
|
566
|
-
() =>
|
|
707
|
+
D(() => s.modelValue, fe), D(
|
|
708
|
+
() => s.options,
|
|
567
709
|
() => {
|
|
568
|
-
w.value =
|
|
710
|
+
w.value = s.options ?? [], f.value = !0;
|
|
569
711
|
}
|
|
570
|
-
),
|
|
571
|
-
I.value && setTimeout(
|
|
572
|
-
}),
|
|
573
|
-
|
|
574
|
-
}),
|
|
575
|
-
I.value ? setTimeout(
|
|
576
|
-
}), O
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
}),
|
|
580
|
-
|
|
581
|
-
|
|
712
|
+
), D(ce, () => {
|
|
713
|
+
I.value && setTimeout(De, 0);
|
|
714
|
+
}), D(c, () => {
|
|
715
|
+
y.value && !s.remoteSearch && !c.value.trim().length && (y.value = !1);
|
|
716
|
+
}), D(I, () => {
|
|
717
|
+
I.value ? setTimeout(Ct, 0) : (y.value = !1, c.value = C.value || "", v.value && (v.value.style.visibility = "hidden"));
|
|
718
|
+
}), D(O, () => {
|
|
719
|
+
var l;
|
|
720
|
+
s.modelValue && !d.value && fe(), (M.value || y.value) && !O.value.find((m) => m.key == M.value) && (M.value = ((l = O.value[0]) == null ? void 0 : l.key) ?? o);
|
|
721
|
+
}), _(async () => {
|
|
722
|
+
Le.value = s.onCreateItem !== void 0, s.options ? (w.value = [...s.options], f.value = !0) : s.preload && await Oe(), fe(), D(d, () => {
|
|
723
|
+
d.value !== s.modelValue && a(
|
|
582
724
|
"update:modelValue",
|
|
583
|
-
|
|
725
|
+
d.value && U.value ? U.value(d.value) : d.value
|
|
584
726
|
);
|
|
585
|
-
}),
|
|
727
|
+
}), s.remoteSearch && D(c, _t(yt, 250));
|
|
586
728
|
});
|
|
587
|
-
async function
|
|
588
|
-
await
|
|
729
|
+
async function Oe() {
|
|
730
|
+
await Fe(), w.value && a("optionsLoaded", w.value);
|
|
589
731
|
}
|
|
590
|
-
async function
|
|
591
|
-
var
|
|
592
|
-
const
|
|
593
|
-
|
|
732
|
+
async function Fe() {
|
|
733
|
+
var m;
|
|
734
|
+
const l = s.remoteSearch && y.value && c.value ? c.value : null;
|
|
735
|
+
E.value = !0, w.value = await ((m = s.loadOptions) == null ? void 0 : m.call(s, l)) ?? [], E.value = !1, f.value = !0;
|
|
594
736
|
}
|
|
595
|
-
function
|
|
596
|
-
|
|
737
|
+
function yt() {
|
|
738
|
+
y.value && (Fe(), y.value = c.value.trim().length > 0);
|
|
597
739
|
}
|
|
598
|
-
function
|
|
599
|
-
if (
|
|
600
|
-
|
|
740
|
+
function gt(l) {
|
|
741
|
+
if (l.key == "Escape") {
|
|
742
|
+
l.stopPropagation(), l.target.blur(), Ve();
|
|
601
743
|
return;
|
|
602
744
|
}
|
|
603
|
-
if (!(
|
|
745
|
+
if (!(l.key == "ArrowLeft" || l.key == "ArrowRight") && l.key != "Tab") {
|
|
604
746
|
if (!f.value) {
|
|
605
|
-
|
|
747
|
+
y.value || l.preventDefault();
|
|
606
748
|
return;
|
|
607
749
|
}
|
|
608
|
-
if (
|
|
609
|
-
return
|
|
610
|
-
if (
|
|
611
|
-
return
|
|
612
|
-
if (
|
|
613
|
-
return
|
|
614
|
-
if (
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
if (
|
|
750
|
+
if (l.key == "ArrowUp" || l.key == "ArrowDown")
|
|
751
|
+
return l.preventDefault(), de(l.key == "ArrowUp" ? -1 : 1);
|
|
752
|
+
if (l.key == "PageUp" || l.key == "PageDown")
|
|
753
|
+
return l.preventDefault(), de(l.key == "PageUp" ? -10 : 10);
|
|
754
|
+
if (l.key == "Home" || l.key == "End")
|
|
755
|
+
return l.preventDefault(), de(l.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
|
|
756
|
+
if (l.key == "Enter") {
|
|
757
|
+
l.preventDefault();
|
|
758
|
+
const m = O.value.find((h) => h.key == M.value);
|
|
759
|
+
if (m) return He(m);
|
|
618
760
|
}
|
|
619
|
-
if (
|
|
620
|
-
|
|
761
|
+
if (l.key === "Delete" || l.key === "Backspace") {
|
|
762
|
+
c.value.length > 1 && (y.value = !0);
|
|
621
763
|
return;
|
|
622
764
|
}
|
|
623
|
-
!
|
|
765
|
+
!l.metaKey && Vn.includes(l.key) && (y.value = !0);
|
|
624
766
|
}
|
|
625
767
|
}
|
|
626
|
-
function
|
|
627
|
-
|
|
628
|
-
var
|
|
629
|
-
return (
|
|
768
|
+
function wt() {
|
|
769
|
+
Et(), I.value = !0, setTimeout(() => {
|
|
770
|
+
var l;
|
|
771
|
+
return (l = u.value) == null ? void 0 : l.select();
|
|
630
772
|
}, 0);
|
|
631
773
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
774
|
+
function Et(l) {
|
|
775
|
+
d.value ? M.value = bt(d.value) : s.nullTitle && (M.value = o);
|
|
634
776
|
}
|
|
635
|
-
function
|
|
636
|
-
var
|
|
637
|
-
return
|
|
777
|
+
function bt(l) {
|
|
778
|
+
var m;
|
|
779
|
+
return z.value ? z.value(d.value) : ((m = kt(l)) == null ? void 0 : m.key) ?? "";
|
|
638
780
|
}
|
|
639
|
-
function
|
|
640
|
-
const
|
|
641
|
-
if (
|
|
642
|
-
return
|
|
643
|
-
const
|
|
644
|
-
return
|
|
781
|
+
function kt(l) {
|
|
782
|
+
const m = O.value.find((g) => g.ref === l);
|
|
783
|
+
if (m)
|
|
784
|
+
return m;
|
|
785
|
+
const h = s.keyExtractor ? (g, S) => s.keyExtractor(g) === s.keyExtractor(S) : Je, p = O.value.find((g) => h(g.ref, l));
|
|
786
|
+
return p || null;
|
|
645
787
|
}
|
|
646
|
-
function
|
|
647
|
-
|
|
788
|
+
function Tt() {
|
|
789
|
+
s.debug || (!c.value.length && s.nullTitle && (d.value = null, C.value = null), I.value = !1);
|
|
648
790
|
}
|
|
649
|
-
function
|
|
650
|
-
var
|
|
651
|
-
f.value ||
|
|
791
|
+
function Ct() {
|
|
792
|
+
var l;
|
|
793
|
+
f.value || Oe(), s.optionsListId && ((l = v.value) == null || l.setAttribute("id", s.optionsListId)), St();
|
|
652
794
|
}
|
|
653
|
-
function
|
|
654
|
-
const
|
|
655
|
-
for (let
|
|
656
|
-
/^(font|text)/.test(
|
|
657
|
-
if (
|
|
658
|
-
const
|
|
659
|
-
|
|
795
|
+
function St() {
|
|
796
|
+
const l = r.value.getBoundingClientRect(), m = l.y + l.height + 2, h = l.x, p = v.value, g = window.getComputedStyle(r.value);
|
|
797
|
+
for (let S in g)
|
|
798
|
+
/^(font|text)/.test(S) && (p.style[S] = g[S]);
|
|
799
|
+
if (p.style.top = m + "px", p.style.left = h + "px", p.style.minWidth = l.width + "px", !g.maxHeight || g.maxHeight == "none") {
|
|
800
|
+
const S = window.innerHeight - m - 12;
|
|
801
|
+
p.style.maxHeight = S + "px";
|
|
660
802
|
}
|
|
661
|
-
|
|
803
|
+
p.style.visibility = "visible", document.body.appendChild(p), setTimeout(De, 0);
|
|
662
804
|
}
|
|
663
|
-
function
|
|
664
|
-
if (!f.value || !
|
|
665
|
-
const
|
|
666
|
-
|
|
805
|
+
function De() {
|
|
806
|
+
if (!f.value || !M.value) return;
|
|
807
|
+
const l = O.value.findIndex((p) => p.key == M.value), m = v.value, h = m == null ? void 0 : m.querySelectorAll(".option")[l];
|
|
808
|
+
h && (m.scrollTop = h.offsetTop);
|
|
667
809
|
}
|
|
668
|
-
function
|
|
669
|
-
|
|
810
|
+
function Mt(l) {
|
|
811
|
+
M.value = l ? l.key : null;
|
|
670
812
|
}
|
|
671
|
-
function
|
|
672
|
-
const
|
|
673
|
-
let
|
|
674
|
-
if (
|
|
675
|
-
|
|
676
|
-
const
|
|
677
|
-
|
|
813
|
+
function de(l) {
|
|
814
|
+
const m = O.value.findIndex((S) => S.key == M.value);
|
|
815
|
+
let h = m + l;
|
|
816
|
+
if (h < 0 ? h = 0 : h >= O.value.length && (h = O.value.length - 1), m == h) return;
|
|
817
|
+
M.value = O.value[h].key;
|
|
818
|
+
const p = v.value, g = p == null ? void 0 : p.querySelectorAll(".option")[h];
|
|
819
|
+
g && (g.offsetTop < p.scrollTop ? p.scrollTop = g.offsetTop : g.offsetTop + g.offsetHeight > p.scrollTop + p.clientHeight && (p.scrollTop = g.offsetTop + g.offsetHeight - p.clientHeight));
|
|
678
820
|
}
|
|
679
|
-
function He(
|
|
680
|
-
var
|
|
681
|
-
if (
|
|
682
|
-
|
|
683
|
-
else if (
|
|
684
|
-
const
|
|
685
|
-
|
|
821
|
+
function He(l) {
|
|
822
|
+
var m, h;
|
|
823
|
+
if (y.value = !1, l.key == o)
|
|
824
|
+
c.value = "", d.value = null, C.value = null;
|
|
825
|
+
else if (l.key === i) {
|
|
826
|
+
const p = c.value.trim();
|
|
827
|
+
c.value = "", d.value = null, C.value = null, (m = s.onCreateItem) == null || m.call(s, p);
|
|
686
828
|
} else {
|
|
687
|
-
const
|
|
688
|
-
|
|
829
|
+
const g = ce.value.find((S) => S.key == l.key).ref;
|
|
830
|
+
d.value = g, C.value = ue.value(g), c.value = C.value || "";
|
|
689
831
|
}
|
|
690
|
-
(
|
|
832
|
+
(h = u.value) == null || h.blur(), Ve();
|
|
691
833
|
}
|
|
692
|
-
function
|
|
693
|
-
|
|
834
|
+
function fe() {
|
|
835
|
+
s.modelValue ? (d.value = U.value ? Ie.value.find((l) => s.modelValue === U.value(l)) : s.modelValue, C.value = d.value ? ue.value(d.value) : null, c.value = C.value || "") : (d.value = null, C.value = null, c.value = "");
|
|
694
836
|
}
|
|
695
|
-
function
|
|
696
|
-
w.value.unshift(
|
|
837
|
+
function Lt(l) {
|
|
838
|
+
w.value.unshift(l);
|
|
697
839
|
}
|
|
698
|
-
function
|
|
699
|
-
var
|
|
700
|
-
if (!
|
|
701
|
-
let
|
|
702
|
-
for (;
|
|
703
|
-
|
|
704
|
-
if (!
|
|
705
|
-
const
|
|
706
|
-
if (!
|
|
707
|
-
const
|
|
708
|
-
|
|
840
|
+
function Ve() {
|
|
841
|
+
var g;
|
|
842
|
+
if (!s.autoNext) return;
|
|
843
|
+
let l = (g = r.value) == null ? void 0 : g.parentElement;
|
|
844
|
+
for (; l && l.tagName !== "FORM" && l.tagName !== "BODY"; )
|
|
845
|
+
l = l.parentElement;
|
|
846
|
+
if (!l) return;
|
|
847
|
+
const m = l.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
|
|
848
|
+
if (!m) return;
|
|
849
|
+
const h = Array.from(m).findIndex((S) => S === u.value), p = m[h + 1];
|
|
850
|
+
p && setTimeout(() => p.focus(), 0);
|
|
709
851
|
}
|
|
710
|
-
return (
|
|
852
|
+
return (l, m) => (b(), k("div", {
|
|
711
853
|
ref_key: "el",
|
|
712
854
|
ref: r,
|
|
713
|
-
class: B(["vf-smart-select", { disabled:
|
|
855
|
+
class: B(["vf-smart-select", { disabled: xe.value, open: I.value }])
|
|
714
856
|
}, [
|
|
715
|
-
|
|
857
|
+
ne($("input", {
|
|
716
858
|
ref_key: "searchField",
|
|
717
|
-
ref:
|
|
718
|
-
"onUpdate:modelValue":
|
|
859
|
+
ref: u,
|
|
860
|
+
"onUpdate:modelValue": m[0] || (m[0] = (h) => c.value = h),
|
|
719
861
|
type: "text",
|
|
720
|
-
disabled:
|
|
721
|
-
class: B({ nullable: !!
|
|
722
|
-
placeholder:
|
|
723
|
-
required:
|
|
862
|
+
disabled: xe.value,
|
|
863
|
+
class: B({ nullable: !!l.nullTitle }),
|
|
864
|
+
placeholder: ht.value,
|
|
865
|
+
required: l.required,
|
|
724
866
|
"data-1p-ignore": "",
|
|
725
|
-
onKeydown:
|
|
726
|
-
onFocus:
|
|
727
|
-
onBlur:
|
|
728
|
-
}, null, 42,
|
|
729
|
-
[
|
|
867
|
+
onKeydown: gt,
|
|
868
|
+
onFocus: wt,
|
|
869
|
+
onBlur: Tt
|
|
870
|
+
}, null, 42, xn), [
|
|
871
|
+
[Bt, c.value]
|
|
730
872
|
]),
|
|
731
|
-
I.value ? (
|
|
873
|
+
I.value ? (b(), k("div", {
|
|
732
874
|
key: 0,
|
|
733
875
|
ref_key: "optionsContainer",
|
|
734
|
-
ref:
|
|
876
|
+
ref: v,
|
|
735
877
|
class: "vf-smart-select-options"
|
|
736
878
|
}, [
|
|
737
|
-
f.value ? (
|
|
738
|
-
(
|
|
739
|
-
var
|
|
740
|
-
return
|
|
741
|
-
key: String(
|
|
742
|
-
class: B(["option", [
|
|
743
|
-
onMousemove: (
|
|
744
|
-
onMousedown: (
|
|
879
|
+
f.value ? (b(), k(oe, { key: 1 }, [
|
|
880
|
+
(b(!0), k(oe, null, ye(O.value, (h) => {
|
|
881
|
+
var p;
|
|
882
|
+
return b(), k("div", {
|
|
883
|
+
key: String(h.key),
|
|
884
|
+
class: B(["option", [M.value === h.key && "highlighted", h.ref && ((p = l.classForOption) == null ? void 0 : p.call(l, h.ref))]]),
|
|
885
|
+
onMousemove: (g) => Mt(h),
|
|
886
|
+
onMousedown: (g) => He(h)
|
|
745
887
|
}, [
|
|
746
|
-
|
|
747
|
-
|
|
888
|
+
q(l.$slots, "option", { option: h }, () => [
|
|
889
|
+
$("div", {
|
|
748
890
|
class: "title",
|
|
749
|
-
innerHTML:
|
|
750
|
-
}, null, 8,
|
|
751
|
-
|
|
891
|
+
innerHTML: h.title
|
|
892
|
+
}, null, 8, Fn),
|
|
893
|
+
h.subtitle ? (b(), k("div", {
|
|
752
894
|
key: 0,
|
|
753
895
|
class: "subtitle",
|
|
754
|
-
innerHTML:
|
|
755
|
-
}, null, 8,
|
|
896
|
+
innerHTML: h.subtitle
|
|
897
|
+
}, null, 8, Dn)) : A("", !0)
|
|
756
898
|
])
|
|
757
|
-
], 42,
|
|
899
|
+
], 42, On);
|
|
758
900
|
}), 128)),
|
|
759
|
-
!
|
|
760
|
-
|
|
761
|
-
|
|
901
|
+
!O.value.length && c.value ? (b(), k("div", Hn, [
|
|
902
|
+
q(l.$slots, "no-results", {}, () => [
|
|
903
|
+
ee(P(pt.value), 1)
|
|
762
904
|
])
|
|
763
905
|
])) : A("", !0)
|
|
764
|
-
], 64)) : (
|
|
906
|
+
], 64)) : (b(), k("div", In, "Loading..."))
|
|
765
907
|
], 512)) : A("", !0)
|
|
766
908
|
], 2));
|
|
767
909
|
}
|
|
768
|
-
}),
|
|
910
|
+
}), qo = /* @__PURE__ */ R({
|
|
769
911
|
__name: "vf-ez-smart-select",
|
|
770
912
|
props: {
|
|
771
913
|
modelValue: {},
|
|
@@ -776,22 +918,22 @@ const pn = ["disabled", "placeholder", "required"], yn = {
|
|
|
776
918
|
},
|
|
777
919
|
emits: ["update:modelValue"],
|
|
778
920
|
setup(e, { emit: t }) {
|
|
779
|
-
const n = e, o = x(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: String(r) })) : Object.entries(n.options).map(([r,
|
|
921
|
+
const n = e, o = x(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: String(r) })) : Object.entries(n.options).map(([r, u]) => ({
|
|
780
922
|
value: r,
|
|
781
|
-
label:
|
|
782
|
-
}))), i = x(() => n.formatter ? (r) => n.formatter(r.label, r.value) : (r) => r.label),
|
|
783
|
-
return
|
|
923
|
+
label: u
|
|
924
|
+
}))), i = x(() => n.formatter ? (r) => n.formatter(r.label, r.value) : (r) => r.label), s = t, a = T(o.value.find((r) => r.value === n.modelValue) ?? null);
|
|
925
|
+
return D(
|
|
784
926
|
() => n.modelValue,
|
|
785
927
|
(r) => {
|
|
786
|
-
|
|
928
|
+
a.value = o.value.find((u) => u.value === r) ?? null;
|
|
787
929
|
}
|
|
788
|
-
),
|
|
789
|
-
var
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
}), (r,
|
|
793
|
-
modelValue:
|
|
794
|
-
"onUpdate:modelValue":
|
|
930
|
+
), D(a, (r) => {
|
|
931
|
+
var v;
|
|
932
|
+
const u = r ? (v = o.value.find((E) => Je(E, r))) == null ? void 0 : v.value : null;
|
|
933
|
+
s("update:modelValue", u ?? null);
|
|
934
|
+
}), (r, u) => (b(), Ye(An, {
|
|
935
|
+
modelValue: a.value,
|
|
936
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => a.value = v),
|
|
795
937
|
options: o.value,
|
|
796
938
|
formatter: i.value,
|
|
797
939
|
"null-title": r.nullTitle,
|
|
@@ -799,16 +941,16 @@ const pn = ["disabled", "placeholder", "required"], yn = {
|
|
|
799
941
|
}, null, 8, ["modelValue", "options", "formatter", "null-title", "placeholder"]));
|
|
800
942
|
}
|
|
801
943
|
});
|
|
802
|
-
function
|
|
944
|
+
function zo() {
|
|
803
945
|
return T();
|
|
804
946
|
}
|
|
805
|
-
const
|
|
947
|
+
const $n = { class: "content" }, Bn = { class: "message" }, _n = {
|
|
806
948
|
key: 0,
|
|
807
949
|
class: "close"
|
|
808
|
-
},
|
|
950
|
+
}, Nn = {
|
|
809
951
|
key: 0,
|
|
810
952
|
class: "progress-bar"
|
|
811
|
-
},
|
|
953
|
+
}, Rn = /* @__PURE__ */ R({
|
|
812
954
|
__name: "vf-toast",
|
|
813
955
|
props: {
|
|
814
956
|
message: {},
|
|
@@ -824,23 +966,23 @@ const Sn = { class: "content" }, Cn = { class: "message" }, Ln = {
|
|
|
824
966
|
t.onClick ? t.onClick() : t.disableClose || t.callback();
|
|
825
967
|
}
|
|
826
968
|
const o = T();
|
|
827
|
-
return t.durationSecs !== null &&
|
|
828
|
-
var
|
|
969
|
+
return t.durationSecs !== null && _(() => {
|
|
970
|
+
var s;
|
|
829
971
|
const i = t.durationSecs ?? 5;
|
|
830
|
-
(
|
|
972
|
+
(s = o.value) == null || s.animate([{ width: "0%" }, { width: "100%" }], {
|
|
831
973
|
duration: i * 1e3,
|
|
832
974
|
easing: "linear"
|
|
833
975
|
}), setTimeout(() => t.callback(), i * 1e3);
|
|
834
|
-
}), (i,
|
|
976
|
+
}), (i, s) => (b(), k("div", {
|
|
835
977
|
class: B(["vf-toast", i.className]),
|
|
836
|
-
onClick:
|
|
978
|
+
onClick: we(n, ["stop"])
|
|
837
979
|
}, [
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
i.disableClose ? A("", !0) : (
|
|
980
|
+
$("div", $n, [
|
|
981
|
+
$("div", Bn, P(i.message), 1),
|
|
982
|
+
i.disableClose ? A("", !0) : (b(), k("div", _n, "x"))
|
|
841
983
|
]),
|
|
842
|
-
i.durationSecs !== null ? (
|
|
843
|
-
|
|
984
|
+
i.durationSecs !== null ? (b(), k("div", Nn, [
|
|
985
|
+
$("div", {
|
|
844
986
|
ref_key: "progressInnerEl",
|
|
845
987
|
ref: o,
|
|
846
988
|
class: "inner"
|
|
@@ -849,151 +991,175 @@ const Sn = { class: "content" }, Cn = { class: "message" }, Ln = {
|
|
|
849
991
|
], 2));
|
|
850
992
|
}
|
|
851
993
|
});
|
|
852
|
-
function
|
|
853
|
-
const t =
|
|
994
|
+
function Ko(e) {
|
|
995
|
+
const t = be(Rn, {
|
|
854
996
|
...e,
|
|
855
|
-
callback: () =>
|
|
997
|
+
callback: () => ie(t)
|
|
856
998
|
});
|
|
857
|
-
return () =>
|
|
999
|
+
return () => ie(t);
|
|
858
1000
|
}
|
|
859
|
-
function
|
|
1001
|
+
function Wn(e) {
|
|
860
1002
|
const t = Math.floor(Math.log(e) / Math.log(1024)), o = (e / Math.pow(1024, t)).toFixed(2), i = ["B", "KB", "MB", "GB", "TB"][t];
|
|
861
1003
|
return `${o} ${i}`;
|
|
862
1004
|
}
|
|
863
|
-
function
|
|
1005
|
+
function jn(e) {
|
|
864
1006
|
return e != null && String(e).length ? e : "-";
|
|
865
1007
|
}
|
|
866
|
-
function
|
|
1008
|
+
function Un(e) {
|
|
867
1009
|
return e || "-";
|
|
868
1010
|
}
|
|
869
|
-
function
|
|
870
|
-
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e :
|
|
1011
|
+
function Pn(e) {
|
|
1012
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : oo(Number(e));
|
|
871
1013
|
}
|
|
872
|
-
function
|
|
873
|
-
return e &&
|
|
1014
|
+
function qn(e) {
|
|
1015
|
+
return e && Mn(e);
|
|
874
1016
|
}
|
|
875
|
-
function
|
|
876
|
-
return e ?
|
|
1017
|
+
function zn(e) {
|
|
1018
|
+
return e ? Rt(e) : null;
|
|
877
1019
|
}
|
|
878
|
-
function
|
|
879
|
-
return e ?
|
|
1020
|
+
function st(e) {
|
|
1021
|
+
return e ? Nt(e) : null;
|
|
880
1022
|
}
|
|
881
|
-
function
|
|
1023
|
+
function Kn(e) {
|
|
882
1024
|
return e ? e.toUpperCase() : null;
|
|
883
1025
|
}
|
|
884
|
-
function
|
|
885
|
-
return e ?
|
|
886
|
-
}
|
|
887
|
-
function
|
|
888
|
-
return
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
|
|
1026
|
+
function Yn(e) {
|
|
1027
|
+
return e ? st(e.toLowerCase()) : null;
|
|
1028
|
+
}
|
|
1029
|
+
function Xn(e) {
|
|
1030
|
+
return e ? Sn(e) : null;
|
|
1031
|
+
}
|
|
1032
|
+
function Zn(e, t = 1) {
|
|
1033
|
+
return Ln(e, t);
|
|
1034
|
+
}
|
|
1035
|
+
function Gn(e, t) {
|
|
1036
|
+
return V(e).divide(t).value;
|
|
1037
|
+
}
|
|
1038
|
+
function Jn(e, t) {
|
|
1039
|
+
return e && j(new Date(e), t ?? H.defaultDateFormat);
|
|
1040
|
+
}
|
|
1041
|
+
function Qn(e, t) {
|
|
1042
|
+
return e && j(new Date(e), t ?? H.defaultTimeFormat);
|
|
1043
|
+
}
|
|
1044
|
+
function eo(e, t) {
|
|
1045
|
+
return e && j(new Date(e), t ?? H.defaultDateFormat);
|
|
1046
|
+
}
|
|
1047
|
+
function to(e) {
|
|
1048
|
+
return e && j(qt(zt(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), H.defaultDateFormat);
|
|
1049
|
+
}
|
|
1050
|
+
const Ne = {
|
|
1051
|
+
bytes: Wn,
|
|
1052
|
+
dash: jn,
|
|
1053
|
+
dashZeros: Un,
|
|
1054
|
+
number: Pn,
|
|
1055
|
+
phone: qn,
|
|
1056
|
+
upperFirst: zn,
|
|
1057
|
+
startCase: st,
|
|
1058
|
+
upperCase: Kn,
|
|
1059
|
+
upperWords: Yn,
|
|
1060
|
+
desnake: Xn,
|
|
1061
|
+
usCurrency: Zn,
|
|
1062
|
+
divide: Gn,
|
|
1063
|
+
date: Jn,
|
|
1064
|
+
time: Qn,
|
|
1065
|
+
dateTime: eo,
|
|
1066
|
+
oneDayForward: to
|
|
1067
|
+
}, Yo = (e) => ({
|
|
1068
|
+
...Ne,
|
|
1069
|
+
...e(Ne)
|
|
904
1070
|
});
|
|
905
|
-
function
|
|
1071
|
+
function Xo(e, t, n) {
|
|
906
1072
|
const o = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
907
1073
|
return o === -1 ? !1 : (e.splice(o, 1, n), !0);
|
|
908
1074
|
}
|
|
909
|
-
function
|
|
1075
|
+
function Zo(e, t) {
|
|
910
1076
|
const n = document.createElement("div");
|
|
911
1077
|
n.classList.add("vf-overlay"), n.addEventListener("click", f), document.body.appendChild(n);
|
|
912
1078
|
const o = document.createElement("div");
|
|
913
1079
|
o.classList.add("vf-context-menu"), o.style.position = "absolute", n.appendChild(o);
|
|
914
1080
|
const i = e.currentTarget;
|
|
915
|
-
i.style.userSelect = "none", i.classList.add("context-menu-active"), t.targetClass && i.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((
|
|
916
|
-
if (
|
|
917
|
-
const
|
|
918
|
-
|
|
1081
|
+
i.style.userSelect = "none", i.classList.add("context-menu-active"), t.targetClass && i.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((y) => {
|
|
1082
|
+
if (y == "-") {
|
|
1083
|
+
const d = document.createElement("div");
|
|
1084
|
+
d.classList.add("separator"), o.appendChild(d);
|
|
919
1085
|
return;
|
|
920
1086
|
}
|
|
921
|
-
const
|
|
922
|
-
|
|
1087
|
+
const c = document.createElement("div");
|
|
1088
|
+
c.classList.add("item"), c.style.userSelect = "none", c.innerText = y.title, o.appendChild(c), y.class && c.classList.add(y.class), y.shouldConfirm ? c.addEventListener("click", (d) => w(d, c, y.handler)) : c.addEventListener("click", () => y.handler());
|
|
923
1089
|
});
|
|
924
|
-
const
|
|
925
|
-
o.style.left =
|
|
1090
|
+
const s = window.innerWidth - e.clientX, a = window.innerHeight - e.clientY, r = o.offsetHeight, u = o.offsetWidth, v = s < u ? e.clientX - u - 1 : e.clientX + 1, E = a < r ? e.clientY - r - 1 : e.clientY + 1;
|
|
1091
|
+
o.style.left = v + "px", o.style.top = E + "px", setTimeout(() => {
|
|
926
1092
|
o.style.width = o.offsetWidth + "px";
|
|
927
1093
|
}, 50);
|
|
928
1094
|
function f() {
|
|
929
1095
|
t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
|
|
930
1096
|
}
|
|
931
|
-
function w(
|
|
932
|
-
if (
|
|
933
|
-
return
|
|
934
|
-
const
|
|
935
|
-
|
|
1097
|
+
function w(y, c, d) {
|
|
1098
|
+
if (c.classList.contains("pending-confirm"))
|
|
1099
|
+
return d();
|
|
1100
|
+
const C = c.innerHTML;
|
|
1101
|
+
c.classList.add("pending-confirm"), c.innerText = "Confirm";
|
|
936
1102
|
const I = () => {
|
|
937
|
-
|
|
1103
|
+
c.classList.remove("pending-confirm"), c.innerHTML = C, c.removeEventListener("mouseleave", I);
|
|
938
1104
|
};
|
|
939
|
-
|
|
1105
|
+
c.addEventListener("mouseleave", I), y.stopPropagation();
|
|
940
1106
|
}
|
|
941
1107
|
}
|
|
942
|
-
const
|
|
943
|
-
function
|
|
1108
|
+
const no = (e) => new Promise((t) => setTimeout(t, e)), Go = (e) => no(e * 1e3);
|
|
1109
|
+
function oo(e) {
|
|
944
1110
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
945
1111
|
}
|
|
946
|
-
function
|
|
947
|
-
return e != null ?
|
|
1112
|
+
function Jo(e, t) {
|
|
1113
|
+
return e != null ? Wt(e) : t;
|
|
948
1114
|
}
|
|
949
|
-
function
|
|
1115
|
+
function Qo(e, t) {
|
|
950
1116
|
const n = { ...e };
|
|
951
1117
|
for (const o of t)
|
|
952
1118
|
n[o] === "" && (n[o] = null);
|
|
953
1119
|
return n;
|
|
954
1120
|
}
|
|
955
|
-
function
|
|
956
|
-
|
|
1121
|
+
function es(e, t) {
|
|
1122
|
+
Kt(e, {
|
|
957
1123
|
...t,
|
|
958
1124
|
onError(n, o) {
|
|
959
|
-
var
|
|
960
|
-
n instanceof
|
|
961
|
-
const i = (
|
|
1125
|
+
var s;
|
|
1126
|
+
n instanceof Yt && n.response.status === 422 && typeof n.body == "object" && n.body && "error" in n.body && typeof n.body.error == "string" && (n = new re(n.body.error));
|
|
1127
|
+
const i = (s = t.onError) == null ? void 0 : s.call(t, n, o);
|
|
962
1128
|
return i !== void 0 ? i : n;
|
|
963
1129
|
}
|
|
964
1130
|
});
|
|
965
1131
|
}
|
|
966
|
-
const
|
|
967
|
-
function
|
|
968
|
-
const n = t ??
|
|
969
|
-
|
|
1132
|
+
const Se = Symbol("HookState");
|
|
1133
|
+
function ts(e, t) {
|
|
1134
|
+
const n = t ?? ge();
|
|
1135
|
+
_(() => so(n, e), n), Xe(() => io(n), n), Ze(() => Re(n), n), Ee(() => Re(n), n);
|
|
970
1136
|
}
|
|
971
|
-
function
|
|
1137
|
+
function so(e, t) {
|
|
972
1138
|
const n = {};
|
|
973
|
-
if (t.elScrolledToBottom && (n.el = new
|
|
974
|
-
const o =
|
|
975
|
-
o ? n.ancestor = new
|
|
1139
|
+
if (t.elScrolledToBottom && (n.el = new Z(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
1140
|
+
const o = it(e.vnode.el);
|
|
1141
|
+
o ? n.ancestor = new Z(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
976
1142
|
}
|
|
977
|
-
t.windowScrolledToBottom && (n.window = new
|
|
1143
|
+
t.windowScrolledToBottom && (n.window = new Z(window, t.windowScrolledToBottom)), e[Se] = n;
|
|
978
1144
|
}
|
|
979
|
-
function
|
|
1145
|
+
function io(e) {
|
|
980
1146
|
var n, o, i;
|
|
981
|
-
const t = e[
|
|
1147
|
+
const t = e[Se];
|
|
982
1148
|
(n = t == null ? void 0 : t.el) == null || n.install(), (o = t == null ? void 0 : t.ancestor) == null || o.install(), (i = t == null ? void 0 : t.window) == null || i.install();
|
|
983
1149
|
}
|
|
984
|
-
function
|
|
1150
|
+
function Re(e) {
|
|
985
1151
|
var n, o, i;
|
|
986
|
-
const t = e[
|
|
1152
|
+
const t = e[Se];
|
|
987
1153
|
(n = t == null ? void 0 : t.el) == null || n.uninstall(), (o = t == null ? void 0 : t.ancestor) == null || o.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
|
|
988
1154
|
}
|
|
989
|
-
const
|
|
990
|
-
function
|
|
1155
|
+
const he = ["auto", "scroll"];
|
|
1156
|
+
function it(e) {
|
|
991
1157
|
const t = e.parentElement;
|
|
992
1158
|
if (!t) return null;
|
|
993
1159
|
const n = window.getComputedStyle(t);
|
|
994
|
-
return
|
|
1160
|
+
return he.includes(n.overflow) || he.includes(n.overflowX) || he.includes(n.overflowY) ? t : it(t);
|
|
995
1161
|
}
|
|
996
|
-
class
|
|
1162
|
+
class Z {
|
|
997
1163
|
constructor(t, n) {
|
|
998
1164
|
F(this, "isTripped", !1);
|
|
999
1165
|
F(this, "onScrollWithContext", this.onScroll.bind(this));
|
|
@@ -1009,183 +1175,183 @@ class Y {
|
|
|
1009
1175
|
Math.ceil(this.el.scrollTop + this.el.clientHeight + 5) >= this.el.scrollHeight ? this.isTripped || (this.handler(t), this.isTripped = !0) : this.isTripped && (this.isTripped = !1);
|
|
1010
1176
|
}
|
|
1011
1177
|
}
|
|
1012
|
-
function
|
|
1013
|
-
|
|
1014
|
-
}
|
|
1015
|
-
const
|
|
1016
|
-
mounted:
|
|
1017
|
-
updated:
|
|
1018
|
-
},
|
|
1019
|
-
function
|
|
1020
|
-
if (t.value === void 0 && e[
|
|
1021
|
-
e[
|
|
1178
|
+
function ns(e) {
|
|
1179
|
+
_(() => window.addEventListener("resize", e)), Xe(() => window.addEventListener("resize", e)), Ze(() => window.removeEventListener("resize", e)), Ee(() => window.removeEventListener("resize", e));
|
|
1180
|
+
}
|
|
1181
|
+
const lo = {
|
|
1182
|
+
mounted: je,
|
|
1183
|
+
updated: je
|
|
1184
|
+
}, We = Symbol("HasAutoFocused");
|
|
1185
|
+
function je(e, t) {
|
|
1186
|
+
if (t.value === void 0 && e[We] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
|
|
1187
|
+
e[We] = !0;
|
|
1022
1188
|
const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1023
1189
|
setTimeout(() => n.focus(), 10);
|
|
1024
1190
|
}
|
|
1025
|
-
const
|
|
1026
|
-
mounted:
|
|
1027
|
-
},
|
|
1028
|
-
function
|
|
1191
|
+
const ro = {
|
|
1192
|
+
mounted: ao
|
|
1193
|
+
}, K = Symbol("ConfirmState");
|
|
1194
|
+
function ao(e, t) {
|
|
1029
1195
|
e.addEventListener("click", (n) => {
|
|
1030
|
-
var
|
|
1031
|
-
const o = Date.now(), i = ((
|
|
1032
|
-
if (e[
|
|
1033
|
-
if (o - e[
|
|
1196
|
+
var a, r;
|
|
1197
|
+
const o = Date.now(), i = ((a = t.value) == null ? void 0 : a.text) !== void 0 ? t.value.text : "Confirm";
|
|
1198
|
+
if (e[K]) {
|
|
1199
|
+
if (o - e[K].initTime < 300)
|
|
1034
1200
|
return;
|
|
1035
|
-
e[
|
|
1201
|
+
e[K].resetHandler(), e.dispatchEvent(new Event("confirm"));
|
|
1036
1202
|
return;
|
|
1037
1203
|
}
|
|
1038
1204
|
n.preventDefault(), n.stopImmediatePropagation();
|
|
1039
|
-
const
|
|
1205
|
+
const s = {
|
|
1040
1206
|
initTime: o,
|
|
1041
1207
|
preconfirmHtml: e.innerHTML,
|
|
1042
1208
|
resetHandler: () => {
|
|
1043
|
-
var
|
|
1044
|
-
i && (e.innerHTML =
|
|
1209
|
+
var u;
|
|
1210
|
+
i && (e.innerHTML = s.preconfirmHtml), (u = t.value) != null && u.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", s.resetHandler), delete e[K];
|
|
1045
1211
|
}
|
|
1046
1212
|
};
|
|
1047
|
-
e[
|
|
1213
|
+
e[K] = s, i && (e.innerHTML = i), (r = t.value) != null && r.class && e.classList.add(t.value.class), e.addEventListener("mouseout", s.resetHandler);
|
|
1048
1214
|
});
|
|
1049
1215
|
}
|
|
1050
|
-
const
|
|
1051
|
-
beforeMount:
|
|
1216
|
+
const uo = {
|
|
1217
|
+
beforeMount: co
|
|
1052
1218
|
};
|
|
1053
|
-
function
|
|
1219
|
+
function co(e) {
|
|
1054
1220
|
e.addEventListener("blur", () => {
|
|
1055
1221
|
let t = e.value;
|
|
1056
|
-
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" +
|
|
1222
|
+
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + j(/* @__PURE__ */ new Date(), "yy"));
|
|
1057
1223
|
const n = Date.parse(t);
|
|
1058
|
-
isNaN(n) ? e.value = "" : e.value =
|
|
1224
|
+
isNaN(n) ? e.value = "" : e.value = j(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1059
1225
|
});
|
|
1060
1226
|
}
|
|
1061
|
-
const
|
|
1062
|
-
beforeMount:
|
|
1063
|
-
updated:
|
|
1227
|
+
const fo = {
|
|
1228
|
+
beforeMount: Ue,
|
|
1229
|
+
updated: Ue
|
|
1064
1230
|
};
|
|
1065
|
-
function
|
|
1066
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1231
|
+
function Ue(e, t) {
|
|
1232
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = vo(e, t));
|
|
1067
1233
|
}
|
|
1068
|
-
function
|
|
1069
|
-
var
|
|
1234
|
+
function vo(e, t) {
|
|
1235
|
+
var v, E;
|
|
1070
1236
|
if (!t.value)
|
|
1071
|
-
return ((
|
|
1237
|
+
return ((v = e.attributes.getNamedItem("placeholder")) == null ? void 0 : v.value) ?? "";
|
|
1072
1238
|
let n = "";
|
|
1073
|
-
const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"),
|
|
1074
|
-
e.attributes.getNamedItem("display-utc") !== null &&
|
|
1075
|
-
let
|
|
1239
|
+
const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"), s = new Date(i);
|
|
1240
|
+
e.attributes.getNamedItem("display-utc") !== null && s.setMinutes(s.getMinutes() - s.getTimezoneOffset());
|
|
1241
|
+
let a = (E = e.attributes.getNamedItem("format")) == null ? void 0 : E.value;
|
|
1076
1242
|
const r = e.attributes.getNamedItem("date-only") !== null;
|
|
1077
|
-
if (!
|
|
1243
|
+
if (!a && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1078
1244
|
const f = /* @__PURE__ */ new Date();
|
|
1079
|
-
f.getFullYear() ===
|
|
1245
|
+
f.getFullYear() === s.getFullYear() && f.getMonth() === s.getMonth() && f.getDate() === s.getDate() && (n = "at", a = "HH:mm");
|
|
1080
1246
|
}
|
|
1081
|
-
if (!
|
|
1247
|
+
if (!a && e.attributes.getNamedItem("simplified-date") !== null) {
|
|
1082
1248
|
let f = null;
|
|
1083
1249
|
const w = /* @__PURE__ */ new Date();
|
|
1084
|
-
w.getFullYear() ===
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1250
|
+
w.getFullYear() === s.getFullYear() ? (w.getMonth() !== s.getMonth() || w.getDate() !== s.getDate()) && (f = "M/d") : f = "M/d/yy";
|
|
1251
|
+
const y = r ? null : H.defaultTimeFormat;
|
|
1252
|
+
a = Ge([f, y]).join(" ");
|
|
1087
1253
|
}
|
|
1088
|
-
|
|
1089
|
-
let
|
|
1090
|
-
return n && (
|
|
1091
|
-
}
|
|
1092
|
-
const
|
|
1093
|
-
beforeMount:
|
|
1094
|
-
updated:
|
|
1095
|
-
unmounted:
|
|
1254
|
+
a || (r ? a = H.defaultDateFormat : a = `${H.defaultDateFormat} ${H.defaultTimeFormat}`);
|
|
1255
|
+
let u = j(s, a);
|
|
1256
|
+
return n && (u = n + " " + u), u;
|
|
1257
|
+
}
|
|
1258
|
+
const mo = {
|
|
1259
|
+
beforeMount: Pe,
|
|
1260
|
+
updated: Pe,
|
|
1261
|
+
unmounted: ho
|
|
1096
1262
|
};
|
|
1097
|
-
function
|
|
1263
|
+
function Pe(e, t) {
|
|
1098
1264
|
e.tagName === "LABEL" && (t.value ? e.classList.remove("disabled") : e.classList.add("disabled"), e = e.querySelector("input")), t.value ? e.setAttribute("disabled", "disabled") : e.removeAttribute("disabled");
|
|
1099
1265
|
}
|
|
1100
|
-
function
|
|
1266
|
+
function ho(e) {
|
|
1101
1267
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1102
1268
|
}
|
|
1103
|
-
const
|
|
1104
|
-
beforeMount:
|
|
1105
|
-
updated:
|
|
1106
|
-
unmounted:
|
|
1107
|
-
},
|
|
1108
|
-
function
|
|
1109
|
-
|
|
1110
|
-
}
|
|
1111
|
-
setInterval(
|
|
1112
|
-
function
|
|
1113
|
-
var
|
|
1269
|
+
const po = {
|
|
1270
|
+
beforeMount: qe,
|
|
1271
|
+
updated: qe,
|
|
1272
|
+
unmounted: rt
|
|
1273
|
+
}, J = Symbol("HasAutoFocused"), Me = [];
|
|
1274
|
+
function yo() {
|
|
1275
|
+
Me.forEach(lt);
|
|
1276
|
+
}
|
|
1277
|
+
setInterval(yo, 1e3);
|
|
1278
|
+
function qe(e, t) {
|
|
1279
|
+
var a;
|
|
1114
1280
|
if (t.value == t.oldValue) return;
|
|
1115
|
-
if (!t.value) return
|
|
1116
|
-
const n = new Date(t.value), o = (
|
|
1117
|
-
e[
|
|
1281
|
+
if (!t.value) return rt(e);
|
|
1282
|
+
const n = new Date(t.value), o = (a = e.attributes.getNamedItem("base-time")) == null ? void 0 : a.value, i = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), s = e.getAttribute("no-seconds") === null;
|
|
1283
|
+
e[J] || Me.push(e), e[J] = {
|
|
1118
1284
|
startTs: i,
|
|
1119
|
-
includeSeconds:
|
|
1120
|
-
},
|
|
1285
|
+
includeSeconds: s
|
|
1286
|
+
}, lt(e);
|
|
1121
1287
|
}
|
|
1122
|
-
function
|
|
1123
|
-
const t = e[
|
|
1124
|
-
e.innerText =
|
|
1288
|
+
function lt(e) {
|
|
1289
|
+
const t = e[J], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1290
|
+
e.innerText = go(n, t.includeSeconds);
|
|
1125
1291
|
}
|
|
1126
|
-
function
|
|
1127
|
-
e[
|
|
1292
|
+
function rt(e) {
|
|
1293
|
+
e[J] && (jt(Me, e), delete e[J]), e.innerText = "-";
|
|
1128
1294
|
}
|
|
1129
|
-
function
|
|
1295
|
+
function go(e, t) {
|
|
1130
1296
|
const n = [], o = Math.floor(e / 86400);
|
|
1131
1297
|
o && n.push(o + "d"), e -= o * 86400;
|
|
1132
1298
|
const i = Math.floor(e / 3600);
|
|
1133
1299
|
(o || i) && n.push(i + "h"), e -= i * 3600;
|
|
1134
|
-
const
|
|
1135
|
-
return (o || i ||
|
|
1136
|
-
}
|
|
1137
|
-
const
|
|
1138
|
-
mounted:
|
|
1139
|
-
updated:
|
|
1140
|
-
unmounted:
|
|
1141
|
-
},
|
|
1142
|
-
function
|
|
1143
|
-
|
|
1144
|
-
}
|
|
1145
|
-
function
|
|
1146
|
-
const n =
|
|
1300
|
+
const s = Math.floor(e / 60);
|
|
1301
|
+
return (o || i || s) && n.push(s + "m"), t ? n.length || n.push("0m") : (e -= s * 60, n.push(e + "s")), n.join(" ");
|
|
1302
|
+
}
|
|
1303
|
+
const wo = {
|
|
1304
|
+
mounted: at,
|
|
1305
|
+
updated: Eo,
|
|
1306
|
+
unmounted: ut
|
|
1307
|
+
}, W = /* @__PURE__ */ new Map();
|
|
1308
|
+
function at(e, t) {
|
|
1309
|
+
W.size === 0 && window.addEventListener("keydown", ct), W.set(t.value.toLowerCase(), [...W.get(t.value.toLowerCase()) ?? [], e]);
|
|
1310
|
+
}
|
|
1311
|
+
function ut(e, t) {
|
|
1312
|
+
const n = W.get(t.value.toLowerCase());
|
|
1147
1313
|
if (n) {
|
|
1148
1314
|
const o = n.indexOf(e);
|
|
1149
|
-
o !== -1 && n.splice(o, 1), n.length === 0 &&
|
|
1315
|
+
o !== -1 && n.splice(o, 1), n.length === 0 && W.delete(t.value.toLowerCase());
|
|
1150
1316
|
}
|
|
1151
|
-
|
|
1317
|
+
W.size === 0 && window.removeEventListener("keydown", ct);
|
|
1152
1318
|
}
|
|
1153
|
-
function
|
|
1154
|
-
|
|
1319
|
+
function Eo(e, t) {
|
|
1320
|
+
ut(e, t), at(e, t);
|
|
1155
1321
|
}
|
|
1156
|
-
function
|
|
1322
|
+
function ct(e) {
|
|
1157
1323
|
if (typeof e.key != "string") return;
|
|
1158
|
-
const t = e.key.toLowerCase(), n =
|
|
1324
|
+
const t = e.key.toLowerCase(), n = W.get(t);
|
|
1159
1325
|
if (n) {
|
|
1160
|
-
const o =
|
|
1326
|
+
const o = Ut(n);
|
|
1161
1327
|
o == null || o.click(), e.preventDefault();
|
|
1162
1328
|
}
|
|
1163
1329
|
}
|
|
1164
|
-
const
|
|
1330
|
+
const Y = Symbol("InfiniteScrollHandler"), bo = {
|
|
1165
1331
|
mounted(e, t) {
|
|
1166
|
-
e[
|
|
1332
|
+
e[Y] = new Z(e, t.value);
|
|
1167
1333
|
},
|
|
1168
1334
|
updated(e, t) {
|
|
1169
1335
|
var n;
|
|
1170
|
-
(n = e[
|
|
1336
|
+
(n = e[Y]) == null || n.uninstall(), e[Y] = new Z(e, t.value);
|
|
1171
1337
|
},
|
|
1172
1338
|
unmounted(e) {
|
|
1173
1339
|
var t;
|
|
1174
|
-
(t = e[
|
|
1340
|
+
(t = e[Y]) == null || t.uninstall(), delete e[Y];
|
|
1175
1341
|
}
|
|
1176
|
-
},
|
|
1177
|
-
beforeMount:
|
|
1178
|
-
updated:
|
|
1342
|
+
}, ko = {
|
|
1343
|
+
beforeMount: ze,
|
|
1344
|
+
updated: ze
|
|
1179
1345
|
};
|
|
1180
|
-
function
|
|
1346
|
+
function ze(e, t) {
|
|
1181
1347
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1182
1348
|
}
|
|
1183
|
-
const
|
|
1184
|
-
mounted:
|
|
1185
|
-
updated:
|
|
1186
|
-
unmounted:
|
|
1187
|
-
},
|
|
1188
|
-
function
|
|
1349
|
+
const To = {
|
|
1350
|
+
mounted: Ke,
|
|
1351
|
+
updated: Ke,
|
|
1352
|
+
unmounted: dt
|
|
1353
|
+
}, G = Symbol("TooltipState");
|
|
1354
|
+
function Ke(e, t) {
|
|
1189
1355
|
var o;
|
|
1190
1356
|
let n = ((o = e.attributes.getNamedItem("tip")) == null ? void 0 : o.value) ?? t.value;
|
|
1191
1357
|
if (t.value || (n = null), n) {
|
|
@@ -1193,15 +1359,15 @@ function Pe(e, t) {
|
|
|
1193
1359
|
content: n,
|
|
1194
1360
|
html: e.getAttribute("html") !== null
|
|
1195
1361
|
};
|
|
1196
|
-
e[
|
|
1362
|
+
e[G] ? e[G].configure(i) : e[G] = new Co(e, i);
|
|
1197
1363
|
} else
|
|
1198
|
-
|
|
1364
|
+
dt(e);
|
|
1199
1365
|
}
|
|
1200
|
-
function
|
|
1366
|
+
function dt(e) {
|
|
1201
1367
|
var t;
|
|
1202
|
-
(t = e[
|
|
1368
|
+
(t = e[G]) == null || t.destroy(), delete e[G];
|
|
1203
1369
|
}
|
|
1204
|
-
class
|
|
1370
|
+
class Co {
|
|
1205
1371
|
constructor(t, n) {
|
|
1206
1372
|
F(this, "lastMoveEvt");
|
|
1207
1373
|
F(this, "checkInterval");
|
|
@@ -1237,9 +1403,9 @@ class io {
|
|
|
1237
1403
|
this.shouldShow || this.tipEl && (this.tipEl.remove(), this.tipEl = void 0, this.titleEl = void 0, this.contentEl = void 0, this.checkInterval && (clearInterval(this.checkInterval), this.checkInterval = void 0), window.removeEventListener("mousemove", this.handleMouseMoveWithContext), this.mouseMoveBound = !1);
|
|
1238
1404
|
}
|
|
1239
1405
|
handleMouseMove(t) {
|
|
1240
|
-
const n = this.tipEl.offsetWidth, o = this.tipEl.offsetHeight, i = window.innerWidth,
|
|
1241
|
-
let
|
|
1242
|
-
|
|
1406
|
+
const n = this.tipEl.offsetWidth, o = this.tipEl.offsetHeight, i = window.innerWidth, s = window.innerHeight;
|
|
1407
|
+
let a = t.pageX + 10, r = t.pageY + 20;
|
|
1408
|
+
a + n > i && (a = t.pageX - 5 - n), r + o > s && (r = t.pageY - 5 - o), this.tipEl.style.left = a + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
|
|
1243
1409
|
}
|
|
1244
1410
|
checkMoveEvent() {
|
|
1245
1411
|
var t;
|
|
@@ -1249,61 +1415,61 @@ class io {
|
|
|
1249
1415
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
1250
1416
|
}
|
|
1251
1417
|
}
|
|
1252
|
-
function
|
|
1253
|
-
e.directive("autofocus",
|
|
1418
|
+
function So(e) {
|
|
1419
|
+
e.directive("autofocus", lo), e.directive("confirm-button", ro), e.directive("date-input", uo), e.directive("datetime", fo), e.directive("disabled", mo), e.directive("duration", po), e.directive("hotkey", wo), e.directive("infinite-scroll", bo), e.directive("readonly", ko), e.directive("tooltip", To);
|
|
1254
1420
|
}
|
|
1255
|
-
function
|
|
1256
|
-
|
|
1421
|
+
function os(e) {
|
|
1422
|
+
So(e);
|
|
1257
1423
|
}
|
|
1258
1424
|
export {
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1425
|
+
Ho as OverlayContainer,
|
|
1426
|
+
re as UserError,
|
|
1427
|
+
Do as VfAjaxSelect,
|
|
1428
|
+
ae as VfAlertModal,
|
|
1429
|
+
qo as VfEzSmartSelect,
|
|
1430
|
+
fn as VfModal,
|
|
1431
|
+
An as VfSmartSelect,
|
|
1432
|
+
Jo as cloneProp,
|
|
1433
|
+
_o as configureVf,
|
|
1434
|
+
es as configureVfOpenApiClient,
|
|
1435
|
+
Yo as createFilters,
|
|
1436
|
+
be as createOverlayInjection,
|
|
1437
|
+
Sn as desnakeCase,
|
|
1438
|
+
tn as dismissOverlayInjectionById,
|
|
1439
|
+
Vo as dismissOverlayInjectionByInstance,
|
|
1440
|
+
Qe as dismissOverlayInjectionByInternalInstance,
|
|
1441
|
+
en as dismissOverlayInjectionByVnode,
|
|
1442
|
+
ls as escapeHtml,
|
|
1443
|
+
on as formatError,
|
|
1444
|
+
oo as formatNumber,
|
|
1445
|
+
Mn as formatPhone,
|
|
1446
|
+
Ln as formatUSCurrency,
|
|
1447
|
+
Ro as handleError,
|
|
1448
|
+
No as handleErrorAndAlert,
|
|
1449
|
+
os as installVf,
|
|
1450
|
+
sn as isError,
|
|
1451
|
+
Wo as maskComponent,
|
|
1452
|
+
ln as maskEl,
|
|
1453
|
+
rn as maskForm,
|
|
1454
|
+
Uo as nl2br,
|
|
1455
|
+
Qo as nullifyEmptyInputs,
|
|
1456
|
+
ke as presentOverlay,
|
|
1457
|
+
ie as removeOverlayInjection,
|
|
1458
|
+
Xo as replaceElement,
|
|
1459
|
+
nn as showAlert,
|
|
1460
|
+
Ao as showConfirm,
|
|
1461
|
+
$o as showConfirmDestroy,
|
|
1462
|
+
Zo as showContextMenu,
|
|
1463
|
+
Ko as showToast,
|
|
1464
|
+
Bo as showWait,
|
|
1465
|
+
no as sleep,
|
|
1466
|
+
Go as sleepSecs,
|
|
1467
|
+
Te as toError,
|
|
1468
|
+
jo as unmaskComponent,
|
|
1469
|
+
et as unmaskEl,
|
|
1470
|
+
tt as unmaskForm,
|
|
1471
|
+
ts as useInfiniteScroll,
|
|
1472
|
+
ns as useResizeWatcher,
|
|
1473
|
+
Po as uuid,
|
|
1474
|
+
zo as vfModalRef
|
|
1309
1475
|
};
|