@signal24/vue-foundation 4.25.6 → 4.25.8

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