@signal24/vue-foundation 4.29.2 → 4.29.4

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