@signal24/vue-foundation 4.25.4 → 4.25.6

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