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