@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.
@@ -1,19 +1,19 @@
1
- var Tt = Object.defineProperty;
2
- var St = (e, t, n) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var F = (e, t, n) => St(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as _, ref as T, computed as x, watch as O, onMounted as V, createElementBlock as b, withDirectives as J, openBlock as E, createElementVNode as D, toDisplayString as U, createCommentVNode as A, Fragment as ee, renderList as he, vModelSelect as Ct, getCurrentInstance as pe, withModifiers as ye, normalizeStyle as Lt, normalizeClass as B, renderSlot as j, reactive as Mt, h as te, Teleport as xt, markRaw as It, onBeforeUnmount as ge, resolveDirective as Ht, createBlock as qe, createSlots as Ft, withCtx as ce, createTextVNode as Q, vModelText as Ot, onActivated as ze, onDeactivated as Ke } from "vue";
5
- import { compact as Ye, debounce as At, isEqual as Xe, startCase as Dt, upperFirst as Bt, cloneDeep as $t, remove as Vt, last as Nt } from "lodash";
6
- import { escapeHtml as _t } from "@vue/shared";
7
- import { escapeHtml as jo } from "@vue/shared";
8
- import { configureOpenApiClient as Rt, OpenApiError as Wt } from "@signal24/openapi-client-codegen/browser";
9
- import { format as ve } from "date-fns";
10
- const Ut = {
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
- }, jt = {
13
+ }, Zt = {
14
14
  key: 0,
15
15
  value: null
16
- }, Pt = ["value"], ho = /* @__PURE__ */ _({
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), l = x(() => i.value ? i.value.map((g) => {
29
- const k = g;
30
- return n.preprocesor ? n.preprocesor(k) : n.displayKey ? k[n.displayKey] : "";
31
- }) : null), u = T(n.modelValue ?? null);
32
- O(() => n.loadFn, r), O(
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
- () => u.value = n.modelValue
35
- ), O(u, () => o("update:modelValue", u.value));
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 V(r), (d, g) => l.value ? J((E(), b("select", {
39
+ return _(r), (u, v) => s.value ? ne((b(), k("select", {
40
40
  key: 1,
41
- "onUpdate:modelValue": g[0] || (g[0] = (k) => u.value = k)
41
+ "onUpdate:modelValue": v[0] || (v[0] = (E) => a.value = E)
42
42
  }, [
43
- n.nullText ? (E(), b("option", jt, U(n.nullText), 1)) : A("", !0),
44
- (E(!0), b(ee, null, he(l.value, (k, f) => {
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 E(), b("option", {
46
+ return b(), k("option", {
47
47
  key: f,
48
48
  value: (w = i.value) == null ? void 0 : w[f]
49
- }, U(k), 9, Pt);
49
+ }, P(E), 9, Gt);
50
50
  }), 128))
51
51
  ], 512)), [
52
- [Ct, u.value]
53
- ]) : (E(), b("select", Ut, [
54
- D("option", null, U(n.loadingText || "Loading..."), 1)
52
+ [Ot, a.value]
53
+ ]) : (b(), k("select", Xt, [
54
+ $("option", null, P(n.loadingText || "Loading..."), 1)
55
55
  ]));
56
56
  }
57
- }), qt = /* @__PURE__ */ _({
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([]), l = pe();
65
- V(u);
66
- function u() {
67
- if (!l) return;
68
- const g = l.vnode.el, { styles: k, classes: f } = r(g, n);
69
- o.value = k, i.value = f;
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(g, k) {
72
- const f = t.anchor instanceof HTMLElement ? {} : t.anchor, w = k.getBoundingClientRect(), p = g.getBoundingClientRect();
73
- f.matchWidth && (p.width = w.width), f.matchHeight && (p.height = w.height);
74
- const a = f.class ? Array.isArray(f.class) ? f.class : [f.class] : [];
75
- let c, S;
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
- c = w.top + w.height / 2 - p.height / 2, a.push("anchored-center-y");
77
+ d = w.top + w.height / 2 - y.height / 2, c.push("anchored-center-y");
78
78
  else {
79
- const L = (w.bottom + p.height < window.innerHeight || f.y === "below") && f.y !== "above";
80
- c = L ? w.bottom : w.top - p.height, a.push(L ? "anchored-top" : "anchored-bottom");
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
- S = w.left + w.width / 2 - p.width / 2, a.push("anchored-center-x");
83
+ C = w.left + w.width / 2 - y.width / 2, c.push("anchored-center-x");
84
84
  else {
85
- const L = (w.left + p.width < window.innerWidth || f.x === "left") && f.x !== "right";
86
- S = L ? w.left : w.right - p.width, a.push(L ? "anchored-left" : "anchored-right");
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: `${c}px`,
91
- left: `${S}px`,
92
- ...f.matchWidth ? { width: `${p.width}px` } : {},
93
- ...f.matchHeight ? { height: `${p.height}px` } : {}
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: a
95
+ classes: c
96
96
  };
97
97
  }
98
- function d() {
99
- window.removeEventListener("click", d), Yt(t.overlayId);
98
+ function u() {
99
+ window.removeEventListener("click", u), tn(t.overlayId);
100
100
  }
101
- return V(() => {
101
+ return _(() => {
102
102
  setTimeout(() => {
103
- window.addEventListener("click", d);
103
+ window.addEventListener("click", u);
104
104
  }, 10);
105
- }), (g, k) => (E(), b("div", {
105
+ }), (v, E) => (b(), k("div", {
106
106
  class: B(["vf-overlay-anchor", i.value]),
107
- style: Lt(o.value),
108
- onClick: ye(d, ["stop"])
107
+ style: Ft(o.value),
108
+ onClick: we(u, ["stop"])
109
109
  }, [
110
- j(g.$slots, "default")
110
+ q(v.$slots, "default")
111
111
  ], 6));
112
112
  }
113
113
  });
114
- let zt = 0;
115
- const N = Mt([]), po = _({
114
+ let Qt = 0;
115
+ const N = Dt([]), Ho = R({
116
116
  setup() {
117
- return () => te("div", [
118
- he(N, (e) => te(xt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
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 we(e, t, n) {
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(++zt), l = It(e), u = te(l, t), r = n != null && n.anchor ? te(qt, { overlayId: i, anchor: n.anchor }, () => [u]) : void 0, d = {
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: l,
127
+ component: s,
128
128
  props: t,
129
129
  options: n ?? {},
130
- vnode: u,
130
+ vnode: a,
131
131
  wrapperVnode: r
132
132
  };
133
- return N.push(d), d;
133
+ return N.push(u), u;
134
134
  }
135
- function yo(e) {
136
- e.$ && Ze(e.$);
135
+ function Vo(e) {
136
+ e.$ && Qe(e.$);
137
137
  }
138
- function Ze(e) {
138
+ function Qe(e) {
139
139
  let t = e;
140
- for (; t && !Kt(t.vnode); )
140
+ for (; t && !en(t.vnode); )
141
141
  t = t.parent;
142
142
  }
143
- function Kt(e) {
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 Yt(e) {
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 ne(e) {
151
+ function ie(e) {
152
152
  const t = N.indexOf(e);
153
153
  t >= 0 && N.splice(t, 1);
154
154
  }
155
- async function Ee(e, t, n) {
155
+ async function ke(e, t, n) {
156
156
  return new Promise((o) => {
157
157
  let i = null;
158
- const u = { ...t, callback: async (r) => {
158
+ const a = { ...t, callback: async (r) => {
159
159
  if (n != null && n.onCallback) {
160
- const d = n.onCallback(r);
161
- if (typeof d == "object" && "then" in d && typeof d.then == "function" && await d === !1)
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
- ne(i), o(r);
164
+ ie(i), o(r);
165
165
  } };
166
- i = we(e, u, n);
166
+ i = be(e, a, n);
167
167
  });
168
168
  }
169
- function oe(e, t) {
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 Xt(e, t) {
176
- await Ee(se, oe(e, t));
175
+ async function nn(e, t) {
176
+ await ke(ae, le(e, t));
177
177
  }
178
- async function go(e, t) {
179
- const n = oe(e, t);
180
- return await Ee(se, {
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 wo(e, t) {
186
- const n = oe(e, t);
187
- return await Ee(se, {
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 Eo(e, t) {
194
- const n = oe(e, t), o = we(se, {
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 () => ne(o);
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 bo(e) {
210
- Object.assign($, e);
209
+ function _o(e) {
210
+ Object.assign(H, e);
211
211
  }
212
- class le extends Error {
212
+ class re extends Error {
213
213
  constructor(t) {
214
214
  super(t), this.name = "UserError";
215
215
  }
216
216
  }
217
- function Zt(e) {
218
- return e instanceof le ? e.message : `An application error has occurred:
217
+ function on(e) {
218
+ return e instanceof re ? e.message : `An application error has occurred:
219
219
 
220
- ${be(e).message}
220
+ ${Te(e).message}
221
221
 
222
- Please refresh the page and try again. If this error persists, ${$.unhandledErrorSupportText}.`;
222
+ Please refresh the page and try again. If this error persists, ${H.unhandledErrorSupportText}.`;
223
223
  }
224
- function be(e) {
225
- return Gt(e) ? e : new Error(String(e));
224
+ function Te(e) {
225
+ return sn(e) ? e : new Error(String(e));
226
226
  }
227
- function Gt(e) {
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 ko(e, t) {
231
- const n = be(e);
232
- return n instanceof le || $.errorHandler(n), Xt({
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 To(e) {
239
- const t = be(e);
240
- t instanceof le || $.errorHandler(t);
238
+ async function Ro(e) {
239
+ const t = Te(e);
240
+ t instanceof re || H.errorHandler(t);
241
241
  }
242
- const K = Symbol("MaskState");
243
- function So(e, t) {
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 Qt(o ?? n, t);
246
+ return ln(o ?? n, t);
247
247
  }
248
- function Co(e) {
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 Ge(n ?? t);
251
+ return et(n ?? t);
252
252
  }
253
- function Qt(e, t) {
254
- if (!e[K]) {
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[K] = { maskEl: n };
256
+ n.classList.add("vf-mask"), e.appendChild(n), e[X] = { maskEl: n };
257
257
  }
258
- return e[K].maskEl.innerText = t ?? "", () => Ge(e);
258
+ return e[X].maskEl.innerText = t ?? "", () => et(e);
259
259
  }
260
- function Ge(e) {
261
- e[K] && e.removeChild(e[K].maskEl);
260
+ function et(e) {
261
+ e[X] && e.removeChild(e[X].maskEl);
262
262
  }
263
- const me = Symbol("FormMaskState");
264
- function Jt(e, t, n) {
265
- const o = e instanceof Element ? e : Je(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 l;
271
- i && (l = i.tagName === "INPUT" ? i.value : i.innerHTML, i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...");
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((d) => d.setAttribute("disabled", "disabled")), o[me] = {
273
+ return r.forEach((u) => u.setAttribute("disabled", "disabled")), o[pe] = {
274
274
  disabledElements: r,
275
275
  waitButton: i,
276
- buttonHtml: l
277
- }, () => Qe(o);
276
+ buttonHtml: s
277
+ }, () => tt(o);
278
278
  }
279
- function Qe(e) {
280
- const t = e instanceof Element ? e : Je(e);
279
+ function tt(e) {
280
+ const t = e instanceof Element ? e : nt(e);
281
281
  if (!t) return;
282
- const n = t[me];
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[me]);
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 Je(e) {
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 en = ["id"], tn = {
290
+ const an = ["id"], un = {
291
291
  key: 0,
292
292
  class: "vf-modal-header"
293
- }, nn = { class: "vf-modal-content" }, on = {
293
+ }, cn = { class: "vf-modal-content" }, dn = {
294
294
  key: 1,
295
295
  class: "vf-modal-footer"
296
- }, ln = /* @__PURE__ */ _({
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 = pe(), o = e;
308
- t({ mask: f, unmask: w, hide: p, unhide: a });
309
- const i = T(), l = T(), u = T(!1), r = x(() => Ye([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
310
- V(() => {
311
- var c;
312
- document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", g), (c = i.value) == null || c.addEventListener("click", d));
313
- }), ge(() => {
314
- window.removeEventListener("keydown", g), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
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(c) {
317
- c.target == i.value && k();
316
+ function u(d) {
317
+ d.target == i.value && E();
318
318
  }
319
- function g(c) {
320
- if (c.key === "Esc" || c.key === "Escape") {
321
- const S = document.querySelectorAll(".vf-modal-wrap");
322
- S[S.length - 1] === i.value && k();
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 k() {
326
- Ze(n);
325
+ function E() {
326
+ Qe(n);
327
327
  }
328
328
  function f() {
329
- return Jt(l.value), () => w();
329
+ return rn(s.value), () => w();
330
330
  }
331
331
  function w() {
332
- Qe(l.value);
332
+ tt(s.value);
333
333
  }
334
- function p() {
335
- return u.value = !0, () => a();
334
+ function y() {
335
+ return a.value = !0, () => c();
336
336
  }
337
- function a() {
338
- u.value = !1;
337
+ function c() {
338
+ a.value = !1;
339
339
  }
340
- return (c, S) => (E(), b("div", {
341
- id: c.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
- D("form", {
346
+ $("form", {
347
347
  ref_key: "form",
348
- ref: l,
348
+ ref: s,
349
349
  action: ".",
350
- class: B(["vf-modal", { scrolls: c.scrolls }]),
351
- onSubmit: S[0] || (S[0] = ye((I) => c.$emit("formSubmit"), ["prevent"]))
350
+ class: B(["vf-modal", { scrolls: d.scrolls }]),
351
+ onSubmit: C[0] || (C[0] = we((I) => d.$emit("formSubmit"), ["prevent"]))
352
352
  }, [
353
- c.$slots.header ? (E(), b("div", tn, [
354
- j(c.$slots, "header"),
355
- o.closeX ? (E(), b("i", {
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: k
358
+ onClick: E
359
359
  })) : A("", !0)
360
360
  ])) : A("", !0),
361
- D("div", nn, [
362
- j(c.$slots, "default")
361
+ $("div", cn, [
362
+ q(d.$slots, "default")
363
363
  ]),
364
- c.$slots.footer ? (E(), b("div", on, [
365
- j(c.$slots, "footer")
364
+ d.$slots.footer ? (b(), k("div", dn, [
365
+ q(d.$slots, "footer")
366
366
  ])) : A("", !0)
367
367
  ], 34)
368
- ], 10, en));
368
+ ], 10, an));
369
369
  }
370
- }), sn = ["innerHtml"], rn = ["innerText"], se = /* @__PURE__ */ _({
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 ? Zt(t.message) : t.message);
383
+ const t = e, n = x(() => t.message instanceof Error ? on(t.message) : t.message);
384
384
  return (o, i) => {
385
- const l = Ht("autofocus");
386
- return E(), qe(ln, {
385
+ const s = At("autofocus");
386
+ return b(), Ye(fn, {
387
387
  class: B(["vf-alert", ...o.classes ?? []])
388
- }, Ft({
389
- default: ce(() => [
390
- o.iconClass ? (E(), b("i", {
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 ? (E(), b("div", {
394
+ o.isHtml ? (b(), k("div", {
395
395
  key: 1,
396
396
  innerHtml: o.message,
397
397
  class: "user-message"
398
- }, null, 8, sn)) : (E(), b("div", {
398
+ }, null, 8, vn)) : (b(), k("div", {
399
399
  key: 2,
400
400
  innerText: n.value
401
- }, null, 8, rn))
401
+ }, null, 8, mn))
402
402
  ]),
403
403
  _: 2
404
404
  }, [
405
405
  o.title ? {
406
406
  name: "header",
407
- fn: ce(() => [
408
- Q(U(o.title), 1)
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: ce(() => [
415
- o.shouldConfirm ? (E(), b(ee, { key: 0 }, [
416
- J((E(), b("button", {
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
- Q("Confirm")
420
+ ee("Confirm")
421
421
  ]))), [
422
- [l]
422
+ [s]
423
423
  ]),
424
- D("button", {
424
+ $("button", {
425
425
  class: "default",
426
426
  onClick: i[1] || (i[1] = () => o.callback(!1))
427
427
  }, "Cancel")
428
- ], 64)) : J((E(), b("button", {
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
- Q("OK")
433
+ ee("OK")
434
434
  ]))), [
435
- [l]
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
- }), M = [];
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
- M.push((e + 256).toString(16).slice(1));
446
- function an(e, t = 0) {
447
- return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
448
- }
449
- let de;
450
- const un = new Uint8Array(16);
451
- function cn() {
452
- if (!de) {
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
- de = crypto.getRandomValues.bind(crypto);
597
+ me = crypto.getRandomValues.bind(crypto);
456
598
  }
457
- return de(un);
599
+ return me(bn);
458
600
  }
459
- const dn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Be = { randomUUID: dn };
460
- function fn(e, t, n) {
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 (Be.randomUUID && !e)
463
- return Be.randomUUID();
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)) ?? cn();
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, an(o);
610
+ return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, En(o);
469
611
  }
470
- function Lo(e) {
612
+ function Uo(e) {
471
613
  return e.replace(/\n/g, "<br>");
472
614
  }
473
- function vn(e) {
615
+ function Sn(e) {
474
616
  return e.replace(/_/g, " ");
475
617
  }
476
- function mn(e) {
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 hn(e, t = 1) {
481
- return "$" + (Number(e) / t).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
622
+ function Ln(e, t = 1) {
623
+ return V(e).divide(t).format();
482
624
  }
483
- function Mo() {
484
- return fn();
625
+ function Po() {
626
+ return Cn();
485
627
  }
486
- const pn = ["disabled", "placeholder", "required"], yn = {
628
+ const xn = ["disabled", "placeholder", "required"], In = {
487
629
  key: 0,
488
630
  class: "no-results"
489
- }, gn = ["onMousemove", "onMousedown"], wn = ["innerHTML"], En = ["innerHTML"], bn = {
631
+ }, On = ["onMousemove", "onMousedown"], Fn = ["innerHTML"], Dn = ["innerHTML"], Hn = {
490
632
  key: 0,
491
633
  class: "no-results"
492
- }, kn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Tn = /* @__PURE__ */ _({
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"), l = e, u = n;
666
+ const o = Symbol("null"), i = Symbol("create"), s = e, a = n;
525
667
  t({
526
- addRemoteOption: kt
668
+ addRemoteOption: Lt
527
669
  });
528
- const r = T(), d = T(), g = T(), k = T(!1), f = T(!1), w = T([]), p = T(!1), a = T(""), c = T(null), S = T(null), I = T(!1), L = T(null), Se = T(!1), rt = x(() => l.showCreateTextOnNewItem ?? !0), at = x(() => l.prependOptions ?? []), ut = x(() => l.appendOptions ?? []), Ce = x(() => !!l.disabled), ct = x(() => !f.value && l.preload ? "Loading..." : l.nullTitle ? l.nullTitle : l.placeholder || ""), dt = x(() => l.noResultsText || "No options match your search."), W = x(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (s) => s[l.valueField] : null), P = x(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (s) => String(s[l.keyField]) : W.value ? (s) => String(W.value(s)) : null), ie = x(() => l.formatter ? l.formatter : l.labelField ? (s) => String(s[l.labelField]) : (s) => String(s)), Le = x(() => [...at.value, ...w.value, ...ut.value]), re = x(() => Le.value.map((s, v) => {
529
- var Oe, Ae;
530
- const m = ie.value(s), h = (Oe = l.subtitleFormatter) == null ? void 0 : Oe.call(l, s), y = m ? m.trim().toLowerCase() : "", C = h ? h.trim().toLowerCase() : "", G = [];
531
- return l.searchFields ? l.searchFields.forEach((De) => {
532
- s[De] && G.push(String(s[De]).toLowerCase());
533
- }) : (G.push(y), C && G.push(C)), {
534
- key: ((Ae = P.value) == null ? void 0 : Ae.call(P, s)) ?? String(v),
535
- title: m,
536
- subtitle: h,
537
- searchContent: G.join(""),
538
- ref: s
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
- })), H = x(() => {
541
- let s = [...re.value];
542
- if (p.value) {
543
- const v = a.value.trim().toLowerCase();
544
- if (v.length) {
545
- s = s.filter((y) => y.searchContent.includes(v));
546
- const m = _t(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), h = new RegExp(`(${m})`, "ig");
547
- s = s.map((y) => {
548
- var C;
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
- ...y,
551
- title: y.title.replace(h, "<mark>$1</mark>"),
552
- subtitle: (C = y.subtitle) == null ? void 0 : C.replace(h, "<mark>$1</mark>")
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
- }), Se.value && (s.find((C) => C.searchContent === v) !== void 0 || s.push({
696
+ }), Le.value && (l.find((S) => S.searchContent === m) !== void 0 || l.push({
555
697
  key: i,
556
- title: rt.value ? "Create <strong>" + a.value.trim() + "</strong>..." : a.value.trim()
698
+ title: ft.value ? "Create <strong>" + c.value.trim() + "</strong>..." : c.value.trim()
557
699
  }));
558
700
  }
559
- } else l.nullTitle && s.unshift({
701
+ } else s.nullTitle && l.unshift({
560
702
  key: o,
561
- title: l.nullTitle
703
+ title: s.nullTitle
562
704
  });
563
- return s;
705
+ return l;
564
706
  });
565
- O(() => l.modelValue, ue), O(
566
- () => l.options,
707
+ D(() => s.modelValue, fe), D(
708
+ () => s.options,
567
709
  () => {
568
- w.value = l.options ?? [], f.value = !0;
710
+ w.value = s.options ?? [], f.value = !0;
569
711
  }
570
- ), O(re, () => {
571
- I.value && setTimeout(Ie, 0);
572
- }), O(a, () => {
573
- p.value && !l.remoteSearch && !a.value.trim().length && (p.value = !1);
574
- }), O(I, () => {
575
- I.value ? setTimeout(wt, 0) : (p.value = !1, a.value = S.value || "", g.value && (g.value.style.visibility = "hidden"));
576
- }), O(H, () => {
577
- var s;
578
- l.modelValue && !c.value && ue(), (L.value || p.value) && !H.value.find((v) => v.key == L.value) && (L.value = ((s = H.value[0]) == null ? void 0 : s.key) ?? o);
579
- }), V(async () => {
580
- Se.value = l.onCreateItem !== void 0, l.options ? (w.value = [...l.options], f.value = !0) : l.preload && await Me(), ue(), O(c, () => {
581
- c.value !== l.modelValue && u(
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
- c.value && W.value ? W.value(c.value) : c.value
725
+ d.value && U.value ? U.value(d.value) : d.value
584
726
  );
585
- }), l.remoteSearch && O(a, At(ft, 250));
727
+ }), s.remoteSearch && D(c, _t(yt, 250));
586
728
  });
587
- async function Me() {
588
- await xe(), w.value && u("optionsLoaded", w.value);
729
+ async function Oe() {
730
+ await Fe(), w.value && a("optionsLoaded", w.value);
589
731
  }
590
- async function xe() {
591
- var v;
592
- const s = l.remoteSearch && p.value && a.value ? a.value : null;
593
- k.value = !0, w.value = await ((v = l.loadOptions) == null ? void 0 : v.call(l, s)) ?? [], k.value = !1, f.value = !0;
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 ft() {
596
- p.value && (xe(), p.value = a.value.trim().length > 0);
737
+ function yt() {
738
+ y.value && (Fe(), y.value = c.value.trim().length > 0);
597
739
  }
598
- function vt(s) {
599
- if (s.key == "Escape") {
600
- s.stopPropagation(), s.target.blur(), Fe();
740
+ function gt(l) {
741
+ if (l.key == "Escape") {
742
+ l.stopPropagation(), l.target.blur(), Ve();
601
743
  return;
602
744
  }
603
- if (!(s.key == "ArrowLeft" || s.key == "ArrowRight") && s.key != "Tab") {
745
+ if (!(l.key == "ArrowLeft" || l.key == "ArrowRight") && l.key != "Tab") {
604
746
  if (!f.value) {
605
- p.value || s.preventDefault();
747
+ y.value || l.preventDefault();
606
748
  return;
607
749
  }
608
- if (s.key == "ArrowUp" || s.key == "ArrowDown")
609
- return s.preventDefault(), ae(s.key == "ArrowUp" ? -1 : 1);
610
- if (s.key == "PageUp" || s.key == "PageDown")
611
- return s.preventDefault(), ae(s.key == "PageUp" ? -10 : 10);
612
- if (s.key == "Home" || s.key == "End")
613
- return s.preventDefault(), ae(s.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
614
- if (s.key == "Enter") {
615
- s.preventDefault();
616
- const v = H.value.find((m) => m.key == L.value);
617
- if (v) return He(v);
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 (s.key === "Delete" || s.key === "Backspace") {
620
- a.value.length > 1 && (p.value = !0);
761
+ if (l.key === "Delete" || l.key === "Backspace") {
762
+ c.value.length > 1 && (y.value = !0);
621
763
  return;
622
764
  }
623
- !s.metaKey && kn.includes(s.key) && (p.value = !0);
765
+ !l.metaKey && Vn.includes(l.key) && (y.value = !0);
624
766
  }
625
767
  }
626
- function mt() {
627
- ht(), I.value = !0, setTimeout(() => {
628
- var s;
629
- return (s = d.value) == null ? void 0 : s.select();
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 ht(s) {
633
- c.value ? L.value = pt(c.value) : l.nullTitle && (L.value = o);
774
+ function Et(l) {
775
+ d.value ? M.value = bt(d.value) : s.nullTitle && (M.value = o);
634
776
  }
635
- function pt(s) {
636
- var v;
637
- return P.value ? P.value(c.value) : ((v = yt(s)) == null ? void 0 : v.key) ?? "";
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 yt(s) {
640
- const v = H.value.find((y) => y.ref === s);
641
- if (v)
642
- return v;
643
- const m = l.keyExtractor ? (y, C) => l.keyExtractor(y) === l.keyExtractor(C) : Xe, h = H.value.find((y) => m(y.ref, s));
644
- return h || null;
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 gt() {
647
- l.debug || (!a.value.length && l.nullTitle && (c.value = null, S.value = null), I.value = !1);
788
+ function Tt() {
789
+ s.debug || (!c.value.length && s.nullTitle && (d.value = null, C.value = null), I.value = !1);
648
790
  }
649
- function wt() {
650
- var s;
651
- f.value || Me(), l.optionsListId && ((s = g.value) == null || s.setAttribute("id", l.optionsListId)), Et();
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 Et() {
654
- const s = r.value.getBoundingClientRect(), v = s.y + s.height + 2, m = s.x, h = g.value, y = window.getComputedStyle(r.value);
655
- for (let C in y)
656
- /^(font|text)/.test(C) && (h.style[C] = y[C]);
657
- if (h.style.top = v + "px", h.style.left = m + "px", h.style.minWidth = s.width + "px", !y.maxHeight || y.maxHeight == "none") {
658
- const C = window.innerHeight - v - 12;
659
- h.style.maxHeight = C + "px";
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
- h.style.visibility = "visible", document.body.appendChild(h), setTimeout(Ie, 0);
803
+ p.style.visibility = "visible", document.body.appendChild(p), setTimeout(De, 0);
662
804
  }
663
- function Ie() {
664
- if (!f.value || !L.value) return;
665
- const s = H.value.findIndex((h) => h.key == L.value), v = g.value, m = v == null ? void 0 : v.querySelectorAll(".option")[s];
666
- m && (v.scrollTop = m.offsetTop);
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 bt(s) {
669
- L.value = s ? s.key : null;
810
+ function Mt(l) {
811
+ M.value = l ? l.key : null;
670
812
  }
671
- function ae(s) {
672
- const v = H.value.findIndex((C) => C.key == L.value);
673
- let m = v + s;
674
- if (m < 0 ? m = 0 : m >= H.value.length && (m = H.value.length - 1), v == m) return;
675
- L.value = H.value[m].key;
676
- const h = g.value, y = h == null ? void 0 : h.querySelectorAll(".option")[m];
677
- y && (y.offsetTop < h.scrollTop ? h.scrollTop = y.offsetTop : y.offsetTop + y.offsetHeight > h.scrollTop + h.clientHeight && (h.scrollTop = y.offsetTop + y.offsetHeight - h.clientHeight));
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(s) {
680
- var v, m;
681
- if (p.value = !1, s.key == o)
682
- a.value = "", c.value = null, S.value = null;
683
- else if (s.key === i) {
684
- const h = a.value.trim();
685
- a.value = "", c.value = null, S.value = null, (v = l.onCreateItem) == null || v.call(l, h);
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 y = re.value.find((C) => C.key == s.key).ref;
688
- c.value = y, S.value = ie.value(y), a.value = S.value || "";
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
- (m = d.value) == null || m.blur(), Fe();
832
+ (h = u.value) == null || h.blur(), Ve();
691
833
  }
692
- function ue() {
693
- l.modelValue ? (c.value = W.value ? Le.value.find((s) => l.modelValue === W.value(s)) : l.modelValue, S.value = c.value ? ie.value(c.value) : null, a.value = S.value || "") : (c.value = null, S.value = null, a.value = "");
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 kt(s) {
696
- w.value.unshift(s);
837
+ function Lt(l) {
838
+ w.value.unshift(l);
697
839
  }
698
- function Fe() {
699
- var y;
700
- if (!l.autoNext) return;
701
- let s = (y = r.value) == null ? void 0 : y.parentElement;
702
- for (; s && s.tagName !== "FORM" && s.tagName !== "BODY"; )
703
- s = s.parentElement;
704
- if (!s) return;
705
- const v = s.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
706
- if (!v) return;
707
- const m = Array.from(v).findIndex((C) => C === d.value), h = v[m + 1];
708
- h && setTimeout(() => h.focus(), 0);
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 (s, v) => (E(), b("div", {
852
+ return (l, m) => (b(), k("div", {
711
853
  ref_key: "el",
712
854
  ref: r,
713
- class: B(["vf-smart-select", { disabled: Ce.value, open: I.value }])
855
+ class: B(["vf-smart-select", { disabled: xe.value, open: I.value }])
714
856
  }, [
715
- J(D("input", {
857
+ ne($("input", {
716
858
  ref_key: "searchField",
717
- ref: d,
718
- "onUpdate:modelValue": v[0] || (v[0] = (m) => a.value = m),
859
+ ref: u,
860
+ "onUpdate:modelValue": m[0] || (m[0] = (h) => c.value = h),
719
861
  type: "text",
720
- disabled: Ce.value,
721
- class: B({ nullable: !!s.nullTitle }),
722
- placeholder: ct.value,
723
- required: s.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: vt,
726
- onFocus: mt,
727
- onBlur: gt
728
- }, null, 42, pn), [
729
- [Ot, a.value]
867
+ onKeydown: gt,
868
+ onFocus: wt,
869
+ onBlur: Tt
870
+ }, null, 42, xn), [
871
+ [Bt, c.value]
730
872
  ]),
731
- I.value ? (E(), b("div", {
873
+ I.value ? (b(), k("div", {
732
874
  key: 0,
733
875
  ref_key: "optionsContainer",
734
- ref: g,
876
+ ref: v,
735
877
  class: "vf-smart-select-options"
736
878
  }, [
737
- f.value ? (E(), b(ee, { key: 1 }, [
738
- (E(!0), b(ee, null, he(H.value, (m) => {
739
- var h;
740
- return E(), b("div", {
741
- key: String(m.key),
742
- class: B(["option", [L.value === m.key && "highlighted", m.ref && ((h = s.classForOption) == null ? void 0 : h.call(s, m.ref))]]),
743
- onMousemove: (y) => bt(m),
744
- onMousedown: (y) => He(m)
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
- j(s.$slots, "option", { option: m }, () => [
747
- D("div", {
888
+ q(l.$slots, "option", { option: h }, () => [
889
+ $("div", {
748
890
  class: "title",
749
- innerHTML: m.title
750
- }, null, 8, wn),
751
- m.subtitle ? (E(), b("div", {
891
+ innerHTML: h.title
892
+ }, null, 8, Fn),
893
+ h.subtitle ? (b(), k("div", {
752
894
  key: 0,
753
895
  class: "subtitle",
754
- innerHTML: m.subtitle
755
- }, null, 8, En)) : A("", !0)
896
+ innerHTML: h.subtitle
897
+ }, null, 8, Dn)) : A("", !0)
756
898
  ])
757
- ], 42, gn);
899
+ ], 42, On);
758
900
  }), 128)),
759
- !H.value.length && a.value ? (E(), b("div", bn, [
760
- j(s.$slots, "no-results", {}, () => [
761
- Q(U(dt.value), 1)
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)) : (E(), b("div", yn, "Loading..."))
906
+ ], 64)) : (b(), k("div", In, "Loading..."))
765
907
  ], 512)) : A("", !0)
766
908
  ], 2));
767
909
  }
768
- }), xo = /* @__PURE__ */ _({
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, d]) => ({
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: d
782
- }))), i = x(() => n.formatter ? (r) => n.formatter(r.label, r.value) : (r) => r.label), l = t, u = T(o.value.find((r) => r.value === n.modelValue) ?? null);
783
- return O(
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
- u.value = o.value.find((d) => d.value === r) ?? null;
928
+ a.value = o.value.find((u) => u.value === r) ?? null;
787
929
  }
788
- ), O(u, (r) => {
789
- var g;
790
- const d = r ? (g = o.value.find((k) => Xe(k, r))) == null ? void 0 : g.value : null;
791
- l("update:modelValue", d ?? null);
792
- }), (r, d) => (E(), qe(Tn, {
793
- modelValue: u.value,
794
- "onUpdate:modelValue": d[0] || (d[0] = (g) => u.value = g),
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 Io() {
944
+ function zo() {
803
945
  return T();
804
946
  }
805
- const Sn = { class: "content" }, Cn = { class: "message" }, Ln = {
947
+ const $n = { class: "content" }, Bn = { class: "message" }, _n = {
806
948
  key: 0,
807
949
  class: "close"
808
- }, Mn = {
950
+ }, Nn = {
809
951
  key: 0,
810
952
  class: "progress-bar"
811
- }, xn = /* @__PURE__ */ _({
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 && V(() => {
828
- var l;
969
+ return t.durationSecs !== null && _(() => {
970
+ var s;
829
971
  const i = t.durationSecs ?? 5;
830
- (l = o.value) == null || l.animate([{ width: "0%" }, { width: "100%" }], {
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, l) => (E(), b("div", {
976
+ }), (i, s) => (b(), k("div", {
835
977
  class: B(["vf-toast", i.className]),
836
- onClick: ye(n, ["stop"])
978
+ onClick: we(n, ["stop"])
837
979
  }, [
838
- D("div", Sn, [
839
- D("div", Cn, U(i.message), 1),
840
- i.disableClose ? A("", !0) : (E(), b("div", Ln, "x"))
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 ? (E(), b("div", Mn, [
843
- D("div", {
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 Ho(e) {
853
- const t = we(xn, {
994
+ function Ko(e) {
995
+ const t = be(Rn, {
854
996
  ...e,
855
- callback: () => ne(t)
997
+ callback: () => ie(t)
856
998
  });
857
- return () => ne(t);
999
+ return () => ie(t);
858
1000
  }
859
- function In(e) {
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 Hn(e) {
1005
+ function jn(e) {
864
1006
  return e != null && String(e).length ? e : "-";
865
1007
  }
866
- function Fn(e) {
1008
+ function Un(e) {
867
1009
  return e || "-";
868
1010
  }
869
- function On(e) {
870
- return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Rn(Number(e));
1011
+ function Pn(e) {
1012
+ return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : oo(Number(e));
871
1013
  }
872
- function An(e) {
873
- return e && mn(e);
1014
+ function qn(e) {
1015
+ return e && Mn(e);
874
1016
  }
875
- function Dn(e) {
876
- return e ? Bt(e) : null;
1017
+ function zn(e) {
1018
+ return e ? Rt(e) : null;
877
1019
  }
878
- function Bn(e) {
879
- return e ? Dt(e) : null;
1020
+ function st(e) {
1021
+ return e ? Nt(e) : null;
880
1022
  }
881
- function $n(e) {
1023
+ function Kn(e) {
882
1024
  return e ? e.toUpperCase() : null;
883
1025
  }
884
- function Vn(e) {
885
- return e ? vn(e) : null;
886
- }
887
- function Nn(e, t = 1) {
888
- return hn(e, t);
889
- }
890
- const $e = {
891
- bytes: In,
892
- dash: Hn,
893
- dashZeros: Fn,
894
- number: On,
895
- phone: An,
896
- upperFirst: Dn,
897
- startCase: Bn,
898
- upperCase: $n,
899
- desnake: Vn,
900
- usCurrency: Nn
901
- }, Fo = (e) => ({
902
- ...$e,
903
- ...e($e)
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 Oo(e, t, n) {
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 Ao(e, t) {
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((p) => {
916
- if (p == "-") {
917
- const c = document.createElement("div");
918
- c.classList.add("separator"), o.appendChild(c);
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 a = document.createElement("div");
922
- a.classList.add("item"), a.style.userSelect = "none", a.innerText = p.title, o.appendChild(a), p.class && a.classList.add(p.class), p.shouldConfirm ? a.addEventListener("click", (c) => w(c, a, p.handler)) : a.addEventListener("click", () => p.handler());
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 l = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY, r = o.offsetHeight, d = o.offsetWidth, g = l < d ? e.clientX - d - 1 : e.clientX + 1, k = u < r ? e.clientY - r - 1 : e.clientY + 1;
925
- o.style.left = g + "px", o.style.top = k + "px", setTimeout(() => {
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(p, a, c) {
932
- if (a.classList.contains("pending-confirm"))
933
- return c();
934
- const S = a.innerHTML;
935
- a.classList.add("pending-confirm"), a.innerText = "Confirm";
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
- a.classList.remove("pending-confirm"), a.innerHTML = S, a.removeEventListener("mouseleave", I);
1103
+ c.classList.remove("pending-confirm"), c.innerHTML = C, c.removeEventListener("mouseleave", I);
938
1104
  };
939
- a.addEventListener("mouseleave", I), p.stopPropagation();
1105
+ c.addEventListener("mouseleave", I), y.stopPropagation();
940
1106
  }
941
1107
  }
942
- const _n = (e) => new Promise((t) => setTimeout(t, e)), Do = (e) => _n(e * 1e3);
943
- function Rn(e) {
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 Bo(e, t) {
947
- return e != null ? $t(e) : t;
1112
+ function Jo(e, t) {
1113
+ return e != null ? Wt(e) : t;
948
1114
  }
949
- function $o(e, t) {
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 Vo(e, t) {
956
- Rt(e, {
1121
+ function es(e, t) {
1122
+ Kt(e, {
957
1123
  ...t,
958
1124
  onError(n, o) {
959
- var l;
960
- n instanceof Wt && n.response.status === 422 && typeof n.body == "object" && n.body && "error" in n.body && typeof n.body.error == "string" && (n = new le(n.body.error));
961
- const i = (l = t.onError) == null ? void 0 : l.call(t, n, o);
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 ke = Symbol("HookState");
967
- function No(e, t) {
968
- const n = t ?? pe();
969
- V(() => Wn(n, e), n), ze(() => Un(n), n), Ke(() => Ve(n), n), ge(() => Ve(n), n);
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 Wn(e, t) {
1137
+ function so(e, t) {
972
1138
  const n = {};
973
- if (t.elScrolledToBottom && (n.el = new Y(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
974
- const o = et(e.vnode.el);
975
- o ? n.ancestor = new Y(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
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 Y(window, t.windowScrolledToBottom)), e[ke] = n;
1143
+ t.windowScrolledToBottom && (n.window = new Z(window, t.windowScrolledToBottom)), e[Se] = n;
978
1144
  }
979
- function Un(e) {
1145
+ function io(e) {
980
1146
  var n, o, i;
981
- const t = e[ke];
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 Ve(e) {
1150
+ function Re(e) {
985
1151
  var n, o, i;
986
- const t = e[ke];
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 fe = ["auto", "scroll"];
990
- function et(e) {
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 fe.includes(n.overflow) || fe.includes(n.overflowX) || fe.includes(n.overflowY) ? t : et(t);
1160
+ return he.includes(n.overflow) || he.includes(n.overflowX) || he.includes(n.overflowY) ? t : it(t);
995
1161
  }
996
- class Y {
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 _o(e) {
1013
- V(() => window.addEventListener("resize", e)), ze(() => window.addEventListener("resize", e)), Ke(() => window.removeEventListener("resize", e)), ge(() => window.removeEventListener("resize", e));
1014
- }
1015
- const jn = {
1016
- mounted: _e,
1017
- updated: _e
1018
- }, Ne = Symbol("HasAutoFocused");
1019
- function _e(e, t) {
1020
- if (t.value === void 0 && e[Ne] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
1021
- e[Ne] = !0;
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 Pn = {
1026
- mounted: qn
1027
- }, q = Symbol("ConfirmState");
1028
- function qn(e, t) {
1191
+ const ro = {
1192
+ mounted: ao
1193
+ }, K = Symbol("ConfirmState");
1194
+ function ao(e, t) {
1029
1195
  e.addEventListener("click", (n) => {
1030
- var u, r;
1031
- const o = Date.now(), i = ((u = t.value) == null ? void 0 : u.text) !== void 0 ? t.value.text : "Confirm";
1032
- if (e[q]) {
1033
- if (o - e[q].initTime < 300)
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[q].resetHandler(), e.dispatchEvent(new Event("confirm"));
1201
+ e[K].resetHandler(), e.dispatchEvent(new Event("confirm"));
1036
1202
  return;
1037
1203
  }
1038
1204
  n.preventDefault(), n.stopImmediatePropagation();
1039
- const l = {
1205
+ const s = {
1040
1206
  initTime: o,
1041
1207
  preconfirmHtml: e.innerHTML,
1042
1208
  resetHandler: () => {
1043
- var d;
1044
- i && (e.innerHTML = l.preconfirmHtml), (d = t.value) != null && d.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", l.resetHandler), delete e[q];
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[q] = l, i && (e.innerHTML = i), (r = t.value) != null && r.class && e.classList.add(t.value.class), e.addEventListener("mouseout", l.resetHandler);
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 zn = {
1051
- beforeMount: Kn
1216
+ const uo = {
1217
+ beforeMount: co
1052
1218
  };
1053
- function Kn(e) {
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 += "/" + ve(/* @__PURE__ */ new Date(), "yy"));
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 = ve(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1224
+ isNaN(n) ? e.value = "" : e.value = j(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1059
1225
  });
1060
1226
  }
1061
- const Yn = {
1062
- beforeMount: Re,
1063
- updated: Re
1227
+ const fo = {
1228
+ beforeMount: Ue,
1229
+ updated: Ue
1064
1230
  };
1065
- function Re(e, t) {
1066
- t.value == t.oldValue && e.innerHTML.length || (e.innerText = Xn(e, t));
1231
+ function Ue(e, t) {
1232
+ t.value == t.oldValue && e.innerHTML.length || (e.innerText = vo(e, t));
1067
1233
  }
1068
- function Xn(e, t) {
1069
- var g, k;
1234
+ function vo(e, t) {
1235
+ var v, E;
1070
1236
  if (!t.value)
1071
- return ((g = e.attributes.getNamedItem("placeholder")) == null ? void 0 : g.value) ?? "";
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"), l = new Date(i);
1074
- e.attributes.getNamedItem("display-utc") !== null && l.setMinutes(l.getMinutes() - l.getTimezoneOffset());
1075
- let u = (k = e.attributes.getNamedItem("format")) == null ? void 0 : k.value;
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 (!u && e.attributes.getNamedItem("relative-date") !== null) {
1243
+ if (!a && e.attributes.getNamedItem("relative-date") !== null) {
1078
1244
  const f = /* @__PURE__ */ new Date();
1079
- f.getFullYear() === l.getFullYear() && f.getMonth() === l.getMonth() && f.getDate() === l.getDate() && (n = "at", u = "HH:mm");
1245
+ f.getFullYear() === s.getFullYear() && f.getMonth() === s.getMonth() && f.getDate() === s.getDate() && (n = "at", a = "HH:mm");
1080
1246
  }
1081
- if (!u && e.attributes.getNamedItem("simplified-date") !== null) {
1247
+ if (!a && e.attributes.getNamedItem("simplified-date") !== null) {
1082
1248
  let f = null;
1083
1249
  const w = /* @__PURE__ */ new Date();
1084
- w.getFullYear() === l.getFullYear() ? (w.getMonth() !== l.getMonth() || w.getDate() !== l.getDate()) && (f = "M/d") : f = "M/d/yy";
1085
- const p = r ? null : $.defaultTimeFormat;
1086
- u = Ye([f, p]).join(" ");
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
- u || (r ? u = $.defaultDateFormat : u = `${$.defaultDateFormat} ${$.defaultTimeFormat}`);
1089
- let d = ve(l, u);
1090
- return n && (d = n + " " + d), d;
1091
- }
1092
- const Zn = {
1093
- beforeMount: We,
1094
- updated: We,
1095
- unmounted: Gn
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 We(e, t) {
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 Gn(e) {
1266
+ function ho(e) {
1101
1267
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1102
1268
  }
1103
- const Qn = {
1104
- beforeMount: Ue,
1105
- updated: Ue,
1106
- unmounted: nt
1107
- }, Z = Symbol("HasAutoFocused"), Te = [];
1108
- function Jn() {
1109
- Te.forEach(tt);
1110
- }
1111
- setInterval(Jn, 1e3);
1112
- function Ue(e, t) {
1113
- var u;
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 nt(e);
1116
- const n = new Date(t.value), o = (u = e.attributes.getNamedItem("base-time")) == null ? void 0 : u.value, i = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
1117
- e[Z] || Te.push(e), e[Z] = {
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: l
1120
- }, tt(e);
1285
+ includeSeconds: s
1286
+ }, lt(e);
1121
1287
  }
1122
- function tt(e) {
1123
- const t = e[Z], n = Math.round((Date.now() - t.startTs) / 1e3);
1124
- e.innerText = eo(n, t.includeSeconds);
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 nt(e) {
1127
- e[Z] && (Vt(Te, e), delete e[Z]), e.innerText = "-";
1292
+ function rt(e) {
1293
+ e[J] && (jt(Me, e), delete e[J]), e.innerText = "-";
1128
1294
  }
1129
- function eo(e, t) {
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 l = Math.floor(e / 60);
1135
- return (o || i || l) && n.push(l + "m"), t ? n.length || n.push("0m") : (e -= l * 60, n.push(e + "s")), n.join(" ");
1136
- }
1137
- const to = {
1138
- mounted: ot,
1139
- updated: no,
1140
- unmounted: lt
1141
- }, R = /* @__PURE__ */ new Map();
1142
- function ot(e, t) {
1143
- R.size === 0 && window.addEventListener("keydown", st), R.set(t.value.toLowerCase(), [...R.get(t.value.toLowerCase()) ?? [], e]);
1144
- }
1145
- function lt(e, t) {
1146
- const n = R.get(t.value.toLowerCase());
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 && R.delete(t.value.toLowerCase());
1315
+ o !== -1 && n.splice(o, 1), n.length === 0 && W.delete(t.value.toLowerCase());
1150
1316
  }
1151
- R.size === 0 && window.removeEventListener("keydown", st);
1317
+ W.size === 0 && window.removeEventListener("keydown", ct);
1152
1318
  }
1153
- function no(e, t) {
1154
- lt(e, t), ot(e, t);
1319
+ function Eo(e, t) {
1320
+ ut(e, t), at(e, t);
1155
1321
  }
1156
- function st(e) {
1322
+ function ct(e) {
1157
1323
  if (typeof e.key != "string") return;
1158
- const t = e.key.toLowerCase(), n = R.get(t);
1324
+ const t = e.key.toLowerCase(), n = W.get(t);
1159
1325
  if (n) {
1160
- const o = Nt(n);
1326
+ const o = Ut(n);
1161
1327
  o == null || o.click(), e.preventDefault();
1162
1328
  }
1163
1329
  }
1164
- const z = Symbol("InfiniteScrollHandler"), oo = {
1330
+ const Y = Symbol("InfiniteScrollHandler"), bo = {
1165
1331
  mounted(e, t) {
1166
- e[z] = new Y(e, t.value);
1332
+ e[Y] = new Z(e, t.value);
1167
1333
  },
1168
1334
  updated(e, t) {
1169
1335
  var n;
1170
- (n = e[z]) == null || n.uninstall(), e[z] = new Y(e, t.value);
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[z]) == null || t.uninstall(), delete e[z];
1340
+ (t = e[Y]) == null || t.uninstall(), delete e[Y];
1175
1341
  }
1176
- }, lo = {
1177
- beforeMount: je,
1178
- updated: je
1342
+ }, ko = {
1343
+ beforeMount: ze,
1344
+ updated: ze
1179
1345
  };
1180
- function je(e, t) {
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 so = {
1184
- mounted: Pe,
1185
- updated: Pe,
1186
- unmounted: it
1187
- }, X = Symbol("TooltipState");
1188
- function Pe(e, t) {
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[X] ? e[X].configure(i) : e[X] = new io(e, i);
1362
+ e[G] ? e[G].configure(i) : e[G] = new Co(e, i);
1197
1363
  } else
1198
- it(e);
1364
+ dt(e);
1199
1365
  }
1200
- function it(e) {
1366
+ function dt(e) {
1201
1367
  var t;
1202
- (t = e[X]) == null || t.destroy(), delete e[X];
1368
+ (t = e[G]) == null || t.destroy(), delete e[G];
1203
1369
  }
1204
- class io {
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, l = window.innerHeight;
1241
- let u = t.pageX + 10, r = t.pageY + 20;
1242
- u + n > i && (u = t.pageX - 5 - n), r + o > l && (r = t.pageY - 5 - o), this.tipEl.style.left = u + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
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 ro(e) {
1253
- e.directive("autofocus", jn), e.directive("confirm-button", Pn), e.directive("date-input", zn), e.directive("datetime", Yn), e.directive("disabled", Zn), e.directive("duration", Qn), e.directive("hotkey", to), e.directive("infinite-scroll", oo), e.directive("readonly", lo), e.directive("tooltip", so);
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 Ro(e) {
1256
- ro(e);
1421
+ function os(e) {
1422
+ So(e);
1257
1423
  }
1258
1424
  export {
1259
- po as OverlayContainer,
1260
- le as UserError,
1261
- ho as VfAjaxSelect,
1262
- se as VfAlertModal,
1263
- xo as VfEzSmartSelect,
1264
- ln as VfModal,
1265
- Tn as VfSmartSelect,
1266
- Bo as cloneProp,
1267
- bo as configureVf,
1268
- Vo as configureVfOpenApiClient,
1269
- Fo as createFilters,
1270
- we as createOverlayInjection,
1271
- vn as desnakeCase,
1272
- Yt as dismissOverlayInjectionById,
1273
- yo as dismissOverlayInjectionByInstance,
1274
- Ze as dismissOverlayInjectionByInternalInstance,
1275
- Kt as dismissOverlayInjectionByVnode,
1276
- jo as escapeHtml,
1277
- Zt as formatError,
1278
- Rn as formatNumber,
1279
- mn as formatPhone,
1280
- hn as formatUSCurrency,
1281
- To as handleError,
1282
- ko as handleErrorAndAlert,
1283
- Ro as installVf,
1284
- Gt as isError,
1285
- So as maskComponent,
1286
- Qt as maskEl,
1287
- Jt as maskForm,
1288
- Lo as nl2br,
1289
- $o as nullifyEmptyInputs,
1290
- Ee as presentOverlay,
1291
- ne as removeOverlayInjection,
1292
- Oo as replaceElement,
1293
- Xt as showAlert,
1294
- go as showConfirm,
1295
- wo as showConfirmDestroy,
1296
- Ao as showContextMenu,
1297
- Ho as showToast,
1298
- Eo as showWait,
1299
- _n as sleep,
1300
- Do as sleepSecs,
1301
- be as toError,
1302
- Co as unmaskComponent,
1303
- Ge as unmaskEl,
1304
- Qe as unmaskForm,
1305
- No as useInfiniteScroll,
1306
- _o as useResizeWatcher,
1307
- Mo as uuid,
1308
- Io as vfModalRef
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
  };