@signal24/vue-foundation 4.7.0 → 4.7.2

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,17 +1,17 @@
1
1
  var Ve = Object.defineProperty;
2
2
  var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var v = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as S, defineProps as Ne, defineEmits as Re, ref as T, computed as K, openBlock as u, createElementBlock as h, createElementVNode as E, toDisplayString as x, withDirectives as U, createCommentVNode as O, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as C, normalizeClass as w, normalizeStyle as Ue, withModifiers as te, renderSlot as R, reactive as je, h as W, Teleport as We, markRaw as Pe, onBeforeUnmount as ne, resolveDirective as Te, createBlock as ke, createSlots as qe, withCtx as Y, createTextVNode as ae, vModelText as ze, watch as ce, onActivated as Se, onDeactivated as xe } from "vue";
5
- import { debounce as Xe, isEqual as Ce, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
6
- import { escapeHtml as Je } from "@vue/shared";
7
- import { escapeHtml as ss } from "@vue/shared";
4
+ import { defineComponent as C, defineProps as Ne, defineEmits as Re, ref as w, computed as V, openBlock as u, createElementBlock as f, createElementVNode as O, toDisplayString as x, withDirectives as U, createCommentVNode as T, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ue, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as We, markRaw as Pe, onBeforeUnmount as ne, resolveDirective as Te, createBlock as ke, createSlots as qe, withCtx as Y, createTextVNode as ae, vModelText as ze, watch as ce, onActivated as Se, onDeactivated as Ce } from "vue";
5
+ import { compact as Xe, debounce as Ye, isEqual as xe, upperFirst as Ze, startCase as Ge, cloneDeep as Qe, remove as Je } from "lodash";
6
+ import { escapeHtml as et } from "@vue/shared";
7
+ import { escapeHtml as si } from "@vue/shared";
8
8
  import { format as G } from "date-fns";
9
- const et = S({
9
+ const tt = C({
10
10
  setup() {
11
11
  const e = Ne();
12
12
  Re(["update:modelValue"]);
13
- const t = T(null), n = K(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), s = T(e.modelValue ?? null);
14
- return { props: e, options: t, renderOptions: n, selectedItem: s };
13
+ const t = w(null), n = V(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = w(e.modelValue ?? null);
14
+ return { props: e, options: t, renderOptions: n, selectedItem: i };
15
15
  },
16
16
  watch: {
17
17
  loadFn() {
@@ -34,162 +34,162 @@ const et = S({
34
34
  }
35
35
  }), Le = (e, t) => {
36
36
  const n = e.__vccOpts || e;
37
- for (const [s, i] of t)
38
- n[s] = i;
37
+ for (const [i, s] of t)
38
+ n[i] = s;
39
39
  return n;
40
- }, tt = {
40
+ }, nt = {
41
41
  key: 0,
42
42
  disabled: ""
43
- }, nt = {
43
+ }, it = {
44
44
  key: 0,
45
45
  value: null
46
46
  }, st = ["value"];
47
- function it(e, t, n, s, i, o) {
48
- return e.renderOptions ? U((u(), h("select", {
47
+ function ot(e, t, n, i, s, o) {
48
+ return e.renderOptions ? U((u(), f("select", {
49
49
  key: 1,
50
50
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
51
51
  }, [
52
- e.props.nullText ? (u(), h("option", nt, x(e.props.nullText), 1)) : O("", !0),
53
- (u(!0), h(j, null, J(e.renderOptions, (r, l) => {
52
+ e.props.nullText ? (u(), f("option", it, x(e.props.nullText), 1)) : T("", !0),
53
+ (u(!0), f(j, null, J(e.renderOptions, (r, l) => {
54
54
  var c;
55
- return u(), h("option", {
55
+ return u(), f("option", {
56
56
  key: l,
57
57
  value: (c = e.options) == null ? void 0 : c[l]
58
58
  }, x(r), 9, st);
59
59
  }), 128))
60
60
  ], 512)), [
61
61
  [Ke, e.selectedItem]
62
- ]) : (u(), h("select", tt, [
63
- E("option", null, x(e.props.loadingText || "Loading..."), 1)
62
+ ]) : (u(), f("select", nt, [
63
+ O("option", null, x(e.props.loadingText || "Loading..."), 1)
64
64
  ]));
65
65
  }
66
- const In = /* @__PURE__ */ Le(et, [["render", it]]), ot = ["onClick"], lt = /* @__PURE__ */ S({
66
+ const Hn = /* @__PURE__ */ Le(tt, [["render", ot]]), lt = ["onClick"], rt = /* @__PURE__ */ C({
67
67
  __name: "overlay-anchor",
68
68
  props: {
69
69
  overlayId: {},
70
70
  anchor: {}
71
71
  },
72
72
  setup(e) {
73
- const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), o = ee();
74
- C(r);
73
+ const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, i = w({ visibility: "hidden", top: "0", left: "0" }), s = w([]), o = ee();
74
+ L(r);
75
75
  function r() {
76
- const f = o.vnode.el, { styles: g, classes: a } = l(f, n);
77
- s.value = g, i.value = a;
76
+ const h = o.vnode.el, { styles: b, classes: m } = l(h, n);
77
+ i.value = b, s.value = m;
78
78
  }
79
- function l(f, g) {
80
- const a = t.anchor instanceof HTMLElement ? {} : t.anchor, m = g.getBoundingClientRect(), p = f.getBoundingClientRect();
81
- a.matchWidth && (p.width = m.width), a.matchHeight && (p.height = m.height);
82
- const d = a.class ? Array.isArray(a.class) ? a.class : [a.class] : [];
83
- let b, L;
84
- if (a.y === "center")
85
- b = m.top + m.height / 2 - p.height / 2, d.push("anchored-center-y");
79
+ function l(h, b) {
80
+ const m = t.anchor instanceof HTMLElement ? {} : t.anchor, y = b.getBoundingClientRect(), p = h.getBoundingClientRect();
81
+ m.matchWidth && (p.width = y.width), m.matchHeight && (p.height = y.height);
82
+ const a = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
83
+ let d, E;
84
+ if (m.y === "center")
85
+ d = y.top + y.height / 2 - p.height / 2, a.push("anchored-center-y");
86
86
  else {
87
- const M = (m.bottom + p.height < window.innerHeight || a.y === "below") && a.y !== "above";
88
- b = M ? m.bottom : m.top - p.height, d.push(M ? "anchored-top" : "anchored-bottom");
87
+ const I = (y.bottom + p.height < window.innerHeight || m.y === "below") && m.y !== "above";
88
+ d = I ? y.bottom : y.top - p.height, a.push(I ? "anchored-top" : "anchored-bottom");
89
89
  }
90
- if (a.x === "center")
91
- L = m.left + m.width / 2 - p.width / 2, d.push("anchored-center-x");
90
+ if (m.x === "center")
91
+ E = y.left + y.width / 2 - p.width / 2, a.push("anchored-center-x");
92
92
  else {
93
- const M = (m.left + p.width < window.innerWidth || a.x === "left") && a.x !== "right";
94
- L = M ? m.left : m.right - p.width, d.push(M ? "anchored-left" : "anchored-right");
93
+ const I = (y.left + p.width < window.innerWidth || m.x === "left") && m.x !== "right";
94
+ E = I ? y.left : y.right - p.width, a.push(I ? "anchored-left" : "anchored-right");
95
95
  }
96
96
  return {
97
97
  styles: {
98
- top: `${b}px`,
99
- left: `${L}px`,
100
- ...a.matchWidth ? { width: `${p.width}px` } : {},
101
- ...a.matchHeight ? { height: `${p.height}px` } : {}
98
+ top: `${d}px`,
99
+ left: `${E}px`,
100
+ ...m.matchWidth ? { width: `${p.width}px` } : {},
101
+ ...m.matchHeight ? { height: `${p.height}px` } : {}
102
102
  },
103
- classes: d
103
+ classes: a
104
104
  };
105
105
  }
106
106
  function c() {
107
- window.removeEventListener("click", c), ct(t.overlayId);
107
+ window.removeEventListener("click", c), dt(t.overlayId);
108
108
  }
109
- return C(() => {
109
+ return L(() => {
110
110
  setTimeout(() => {
111
111
  window.addEventListener("click", c);
112
112
  }, 10);
113
- }), (f, g) => (u(), h("div", {
114
- class: w(["vf-overlay-anchor", i.value]),
115
- style: Ue(s.value),
113
+ }), (h, b) => (u(), f("div", {
114
+ class: k(["vf-overlay-anchor", s.value]),
115
+ style: Ue(i.value),
116
116
  onClick: te(c, ["stop"])
117
117
  }, [
118
- R(f.$slots, "default")
119
- ], 14, ot));
118
+ K(h.$slots, "default")
119
+ ], 14, lt));
120
120
  }
121
121
  });
122
- let rt = 0;
123
- const k = je([]), _n = S({
122
+ let at = 0;
123
+ const S = je([]), _n = C({
124
124
  setup() {
125
125
  return () => W("div", [
126
- J(k, (e) => W(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
+ J(S, (e) => W(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
127
127
  ]);
128
128
  }
129
129
  });
130
- function se(e, t, n) {
131
- const s = document.getElementById("vf-overlay-target") ?? document.createElement("div");
132
- s.id = "vf-overlay-target", s.removeAttribute("inert"), document.body.appendChild(s);
133
- const i = String(++rt), o = Pe(e), r = W(o, t), l = n != null && n.anchor ? W(lt, { overlayId: i, anchor: n.anchor }, () => [r]) : void 0, c = {
134
- id: i,
130
+ function ie(e, t, n) {
131
+ const i = document.getElementById("vf-overlay-target") ?? document.createElement("div");
132
+ i.id = "vf-overlay-target", i.removeAttribute("inert"), document.body.appendChild(i);
133
+ const s = String(++at), o = Pe(e), r = W(o, t), l = n != null && n.anchor ? W(rt, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, c = {
134
+ id: s,
135
135
  component: o,
136
136
  props: t,
137
137
  options: n ?? {},
138
138
  vnode: r,
139
139
  wrapperVnode: l
140
140
  };
141
- return k.push(c), c;
141
+ return S.push(c), c;
142
142
  }
143
- function Hn(e) {
143
+ function Dn(e) {
144
144
  Me(e.$);
145
145
  }
146
146
  function Me(e) {
147
147
  let t = e;
148
- for (; t && !at(t.vnode); )
148
+ for (; t && !ct(t.vnode); )
149
149
  t = t.parent;
150
150
  }
151
- function at(e) {
152
- const t = k.findIndex((n) => n.vnode.component === e.component);
153
- return t >= 0 ? (k[t].props.callback(), !0) : !1;
154
- }
155
151
  function ct(e) {
156
- const t = k.findIndex((n) => n.id === e);
157
- return t >= 0 ? (k[t].props.callback(), !0) : !1;
152
+ const t = S.findIndex((n) => n.vnode.component === e.component);
153
+ return t >= 0 ? (S[t].props.callback(), !0) : !1;
154
+ }
155
+ function dt(e) {
156
+ const t = S.findIndex((n) => n.id === e);
157
+ return t >= 0 ? (S[t].props.callback(), !0) : !1;
158
158
  }
159
159
  function P(e) {
160
- const t = k.indexOf(e);
161
- t >= 0 && k.splice(t, 1);
160
+ const t = S.indexOf(e);
161
+ t >= 0 && S.splice(t, 1);
162
162
  }
163
- async function ie(e, t, n) {
164
- return new Promise((s) => {
165
- let i = null;
163
+ async function se(e, t, n) {
164
+ return new Promise((i) => {
165
+ let s = null;
166
166
  const r = { ...t, callback: (l) => {
167
- P(i), s(l);
167
+ P(s), i(l);
168
168
  } };
169
- i = se(e, r, n);
169
+ s = ie(e, r, n);
170
170
  });
171
171
  }
172
172
  function q(e, t) {
173
173
  return { title: t ? e : void 0, message: t ?? e };
174
174
  }
175
175
  async function de(e, t) {
176
- await ie(X, q(e, t));
176
+ await se(X, q(e, t));
177
177
  }
178
- async function Dn(e, t) {
179
- return await ie(X, {
178
+ async function $n(e, t) {
179
+ return await se(X, {
180
180
  ...q(e, t),
181
181
  shouldConfirm: !0
182
182
  }) === !0;
183
183
  }
184
- async function $n(e, t) {
185
- return await ie(X, {
184
+ async function An(e, t) {
185
+ return await se(X, {
186
186
  ...q(e, t),
187
187
  shouldConfirm: !0,
188
188
  classes: ["destructive"]
189
189
  }) === !0;
190
190
  }
191
- function An(e, t) {
192
- const n = se(X, {
191
+ function Bn(e, t) {
192
+ const n = ie(X, {
193
193
  ...q(e, t),
194
194
  isBare: !0,
195
195
  classes: ["wait"],
@@ -198,84 +198,84 @@ function An(e, t) {
198
198
  });
199
199
  return () => P(n);
200
200
  }
201
- const V = {
201
+ const N = {
202
202
  unhandledErrorSupportText: "please contact support",
203
203
  errorHandler: (e) => console.error("Unhandled error:", e),
204
204
  defaultDateTimeFormat: "MM/dd/yy HH:mm"
205
205
  };
206
- function Bn(e) {
207
- Object.assign(V, e);
206
+ function Vn(e) {
207
+ Object.assign(N, e);
208
208
  }
209
209
  class z extends Error {
210
210
  constructor(t) {
211
211
  super(t), this.name = "UserError";
212
212
  }
213
213
  }
214
- function dt(e) {
214
+ function ut(e) {
215
215
  return e instanceof z ? e.message : `An application error has occurred:
216
216
 
217
217
  ${oe(e).message}
218
218
 
219
- Please refresh the page and try again. If this error persists, ${V.unhandledErrorSupportText}.`;
219
+ Please refresh the page and try again. If this error persists, ${N.unhandledErrorSupportText}.`;
220
220
  }
221
221
  function oe(e) {
222
222
  return e instanceof Error ? e : new Error(String(e));
223
223
  }
224
- async function Vn(e, t) {
224
+ async function Fn(e, t) {
225
225
  const n = oe(e);
226
- return n instanceof z || V.errorHandler(n), t ? de(t, n) : de(n);
226
+ return n instanceof z || N.errorHandler(n), t ? de(t, n) : de(n);
227
227
  }
228
- async function Fn(e) {
228
+ async function Nn(e) {
229
229
  const t = oe(e);
230
- t instanceof z || V.errorHandler(t);
230
+ t instanceof z || N.errorHandler(t);
231
231
  }
232
- const D = Symbol("MaskState");
233
- function Nn(e, t) {
234
- const n = e.$.vnode.el, s = n.closest(".vf-modal");
235
- return ut(s ?? n, t);
232
+ const $ = Symbol("MaskState");
233
+ function Rn(e, t) {
234
+ const n = e.$.vnode.el, i = n.closest(".vf-modal");
235
+ return ht(i ?? n, t);
236
236
  }
237
- function Rn(e) {
237
+ function Kn(e) {
238
238
  const t = e.$.vnode.el, n = t.closest(".vf-modal");
239
239
  return Ie(n ?? t);
240
240
  }
241
- function ut(e, t) {
242
- if (!e[D]) {
241
+ function ht(e, t) {
242
+ if (!e[$]) {
243
243
  const n = document.createElement("div");
244
- n.classList.add("vf-mask"), e.appendChild(n), e[D] = { maskEl: n };
244
+ n.classList.add("vf-mask"), e.appendChild(n), e[$] = { maskEl: n };
245
245
  }
246
- return e[D].maskEl.innerText = t ?? "", () => Ie(e);
246
+ return e[$].maskEl.innerText = t ?? "", () => Ie(e);
247
247
  }
248
248
  function Ie(e) {
249
- e[D] && e.removeChild(e[D].maskEl);
249
+ e[$] && e.removeChild(e[$].maskEl);
250
250
  }
251
251
  const Q = Symbol("FormMaskState");
252
- function ht(e, t, n) {
253
- const s = e instanceof Element ? e : He(e);
254
- s.classList.add("vf-masked");
255
- const i = t instanceof Element ? t : s.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0], o = i.tagName === "INPUT" ? i.value : i.innerHTML;
256
- i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...";
257
- const l = [...s.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
258
- return l.forEach((c) => c.setAttribute("disabled", "disabled")), s[Q] = {
252
+ function ft(e, t, n) {
253
+ const i = e instanceof Element ? e : _e(e);
254
+ i.classList.add("vf-masked");
255
+ const s = t instanceof Element ? t : i.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0], o = s.tagName === "INPUT" ? s.value : s.innerHTML;
256
+ s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...";
257
+ const l = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
258
+ return l.forEach((c) => c.setAttribute("disabled", "disabled")), i[Q] = {
259
259
  disabledElements: l,
260
- waitButton: i,
260
+ waitButton: s,
261
261
  buttonHtml: o
262
- }, () => _e(s);
263
- }
264
- function _e(e) {
265
- const t = e instanceof Element ? e : He(e), n = t[Q];
266
- n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((s) => s.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[Q]);
262
+ }, () => He(i);
267
263
  }
268
264
  function He(e) {
265
+ const t = e instanceof Element ? e : _e(e), n = t[Q];
266
+ n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[Q]);
267
+ }
268
+ function _e(e) {
269
269
  const t = e.$.vnode.el;
270
270
  return t.tagName === "FORM" ? t : t.querySelector("form");
271
271
  }
272
- const ft = ["id"], pt = {
272
+ const pt = ["id"], mt = {
273
273
  key: 0,
274
274
  class: "vf-modal-header"
275
- }, mt = { class: "vf-modal-content" }, vt = {
275
+ }, vt = { class: "vf-modal-content" }, yt = {
276
276
  key: 1,
277
277
  class: "vf-modal-footer"
278
- }, yt = /* @__PURE__ */ S({
278
+ }, gt = /* @__PURE__ */ C({
279
279
  __name: "modal",
280
280
  props: {
281
281
  id: {},
@@ -286,65 +286,71 @@ const ft = ["id"], pt = {
286
286
  },
287
287
  emits: ["formSubmit"],
288
288
  setup(e, { expose: t }) {
289
- const n = e, s = ee();
290
- t({ mask: f, unmask: g });
291
- const i = T(), o = T();
292
- C(() => {
293
- var a;
294
- document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", l), (a = i.value) == null || a.addEventListener("click", r));
289
+ const n = e, i = ee();
290
+ t({ mask: m, unmask: y, hide: p, unhide: a });
291
+ const s = w(), o = w(), r = w(!1), l = V(() => Xe([n.class, r.value && "hidden"]));
292
+ L(() => {
293
+ var d;
294
+ document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", h), (d = s.value) == null || d.addEventListener("click", c));
295
295
  }), ne(() => {
296
- window.removeEventListener("keydown", l), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
296
+ window.removeEventListener("keydown", h), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
297
297
  });
298
- function r(a) {
299
- a.target == i.value && c();
298
+ function c(d) {
299
+ d.target == s.value && b();
300
300
  }
301
- function l(a) {
302
- if (a.key === "Esc" || a.key === "Escape") {
303
- const m = document.querySelectorAll(".vf-modal-wrap");
304
- m[m.length - 1] === i.value && c();
301
+ function h(d) {
302
+ if (d.key === "Esc" || d.key === "Escape") {
303
+ const E = document.querySelectorAll(".vf-modal-wrap");
304
+ E[E.length - 1] === s.value && b();
305
305
  }
306
306
  }
307
- function c() {
308
- Me(s);
307
+ function b() {
308
+ Me(i);
309
309
  }
310
- function f() {
311
- ht(o.value);
310
+ function m() {
311
+ ft(o.value);
312
312
  }
313
- function g() {
314
- _e(o.value);
313
+ function y() {
314
+ He(o.value);
315
315
  }
316
- return (a, m) => (u(), h("div", {
317
- id: a.id,
318
- class: w(["vf-overlay vf-modal-wrap", n.class]),
316
+ function p() {
317
+ r.value = !0;
318
+ }
319
+ function a() {
320
+ r.value = !1;
321
+ }
322
+ return (d, E) => (u(), f("div", {
323
+ id: d.id,
324
+ class: k(["vf-overlay vf-modal-wrap", l.value]),
319
325
  ref_key: "overlay",
320
- ref: i
326
+ ref: s
321
327
  }, [
322
- E("form", {
328
+ O("form", {
323
329
  action: ".",
324
- class: w(["vf-modal", { scrolls: a.scrolls }]),
325
- onSubmit: m[0] || (m[0] = te((p) => a.$emit("formSubmit"), ["prevent"])),
330
+ class: k(["vf-modal", { scrolls: d.scrolls }]),
331
+ onSubmit: E[0] || (E[0] = te((M) => d.$emit("formSubmit"), ["prevent"])),
326
332
  ref_key: "form",
327
333
  ref: o
328
334
  }, [
329
- a.$slots.header ? (u(), h("div", pt, [
330
- R(a.$slots, "header"),
331
- n.closeX ? (u(), h("i", {
335
+ d.$slots.header ? (u(), f("div", mt, [
336
+ K(d.$slots, "header"),
337
+ n.closeX ? (u(), f("i", {
332
338
  key: 0,
333
339
  class: "close",
334
- onClick: c
335
- })) : O("", !0)
336
- ])) : O("", !0),
337
- E("div", mt, [
338
- R(a.$slots, "default")
340
+ onClick: b
341
+ })) : T("", !0)
342
+ ])) : T("", !0),
343
+ O("div", vt, [
344
+ K(d.$slots, "default")
339
345
  ]),
340
- a.$slots.footer ? (u(), h("div", vt, [
341
- R(a.$slots, "footer")
342
- ])) : O("", !0)
346
+ d.$slots.footer ? (u(), f("div", yt, [
347
+ K(d.$slots, "footer")
348
+ ])) : T("", !0)
343
349
  ], 34)
344
- ], 10, ft));
350
+ ], 10, pt));
345
351
  }
346
352
  });
347
- const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
353
+ const bt = ["innerHtml"], Et = ["innerText"], X = /* @__PURE__ */ C({
348
354
  __name: "alert-modal",
349
355
  props: {
350
356
  isBare: { type: Boolean },
@@ -356,51 +362,51 @@ const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
356
362
  callback: { type: Function }
357
363
  },
358
364
  setup(e) {
359
- const t = e, n = K(() => t.message instanceof Error ? dt(t.message) : t.message);
360
- return (s, i) => {
365
+ const t = e, n = V(() => t.message instanceof Error ? ut(t.message) : t.message);
366
+ return (i, s) => {
361
367
  const o = Te("autofocus");
362
- return u(), ke(yt, {
363
- class: w(["vf-alert", s.classes])
368
+ return u(), ke(gt, {
369
+ class: k(["vf-alert", i.classes])
364
370
  }, qe({
365
371
  default: Y(() => [
366
- s.isHtml ? (u(), h("div", {
372
+ i.isHtml ? (u(), f("div", {
367
373
  key: 0,
368
- innerHtml: s.message,
374
+ innerHtml: i.message,
369
375
  class: "user-message"
370
- }, null, 8, gt)) : (u(), h("div", {
376
+ }, null, 8, bt)) : (u(), f("div", {
371
377
  key: 1,
372
378
  innerText: n.value
373
- }, null, 8, bt))
379
+ }, null, 8, Et))
374
380
  ]),
375
381
  _: 2
376
382
  }, [
377
- s.title ? {
383
+ i.title ? {
378
384
  name: "header",
379
385
  fn: Y(() => [
380
- E("h1", null, x(s.title), 1)
386
+ O("h1", null, x(i.title), 1)
381
387
  ]),
382
388
  key: "0"
383
389
  } : void 0,
384
- s.isBare ? void 0 : {
390
+ i.isBare ? void 0 : {
385
391
  name: "footer",
386
392
  fn: Y(() => [
387
- s.shouldConfirm ? (u(), h(j, { key: 0 }, [
388
- U((u(), h("button", {
393
+ i.shouldConfirm ? (u(), f(j, { key: 0 }, [
394
+ U((u(), f("button", {
389
395
  class: "primary",
390
- onClick: i[0] || (i[0] = () => s.callback(!0))
396
+ onClick: s[0] || (s[0] = () => i.callback(!0))
391
397
  }, [
392
398
  ae("Confirm")
393
399
  ])), [
394
400
  [o]
395
401
  ]),
396
- E("button", {
402
+ O("button", {
397
403
  class: "default",
398
- onClick: i[1] || (i[1] = () => s.callback(!1))
404
+ onClick: s[1] || (s[1] = () => i.callback(!1))
399
405
  }, "Cancel")
400
- ], 64)) : U((u(), h("button", {
406
+ ], 64)) : U((u(), f("button", {
401
407
  key: 1,
402
408
  class: "default",
403
- onClick: i[2] || (i[2] = () => s.callback(!0))
409
+ onClick: s[2] || (s[2] = () => i.callback(!0))
404
410
  }, [
405
411
  ae("OK")
406
412
  ])), [
@@ -413,52 +419,52 @@ const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
413
419
  };
414
420
  }
415
421
  });
416
- let N;
417
- const Et = new Uint8Array(16);
418
- function Ot() {
419
- if (!N && (N = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !N))
422
+ let R;
423
+ const Ot = new Uint8Array(16);
424
+ function wt() {
425
+ if (!R && (R = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))
420
426
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
421
- return N(Et);
427
+ return R(Ot);
422
428
  }
423
- const y = [];
429
+ const g = [];
424
430
  for (let e = 0; e < 256; ++e)
425
- y.push((e + 256).toString(16).slice(1));
426
- function wt(e, t = 0) {
427
- return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
431
+ g.push((e + 256).toString(16).slice(1));
432
+ function Tt(e, t = 0) {
433
+ return (g[e[t + 0]] + g[e[t + 1]] + g[e[t + 2]] + g[e[t + 3]] + "-" + g[e[t + 4]] + g[e[t + 5]] + "-" + g[e[t + 6]] + g[e[t + 7]] + "-" + g[e[t + 8]] + g[e[t + 9]] + "-" + g[e[t + 10]] + g[e[t + 11]] + g[e[t + 12]] + g[e[t + 13]] + g[e[t + 14]] + g[e[t + 15]]).toLowerCase();
428
434
  }
429
- const Tt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
430
- randomUUID: Tt
435
+ const kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
436
+ randomUUID: kt
431
437
  };
432
- function kt(e, t, n) {
438
+ function St(e, t, n) {
433
439
  if (ue.randomUUID && !t && !e)
434
440
  return ue.randomUUID();
435
441
  e = e || {};
436
- const s = e.random || (e.rng || Ot)();
437
- if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, t) {
442
+ const i = e.random || (e.rng || wt)();
443
+ if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
438
444
  n = n || 0;
439
- for (let i = 0; i < 16; ++i)
440
- t[n + i] = s[i];
445
+ for (let s = 0; s < 16; ++s)
446
+ t[n + s] = i[s];
441
447
  return t;
442
448
  }
443
- return wt(s);
449
+ return Tt(i);
444
450
  }
445
- function Kn(e) {
451
+ function Un(e) {
446
452
  return e.replace(/\n/g, "<br>");
447
453
  }
448
- function St(e) {
454
+ function Ct(e) {
449
455
  return e.replace(/_/g, " ");
450
456
  }
451
457
  function xt(e) {
452
458
  const t = e.replace(/\D/g, "").replace(/^1/, "");
453
459
  return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
454
460
  }
455
- function Ct(e) {
461
+ function Lt(e) {
456
462
  return "$" + Number(e).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
457
463
  }
458
- function Un() {
459
- return kt();
464
+ function jn() {
465
+ return St();
460
466
  }
461
- const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Mt = {
467
+ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", It = {
462
468
  props: {
463
469
  modelValue: {
464
470
  type: null,
@@ -484,11 +490,11 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
484
490
  noResultsText: String,
485
491
  disabled: Boolean,
486
492
  optionsListId: String,
487
- debug: Boolean
493
+ debug: Boolean,
494
+ required: Boolean
488
495
  },
489
496
  emits: {
490
497
  optionsLoaded: Object,
491
- createItem: Object,
492
498
  "update:modelValue": Object
493
499
  },
494
500
  data() {
@@ -536,14 +542,14 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
536
542
  optionsDescriptors() {
537
543
  return this.allOptions.map((e, t) => {
538
544
  var l, c;
539
- const n = this.formatter(e), s = (l = this.subtitleFormatter) == null ? void 0 : l.call(this, e), i = n ? n.trim().toLowerCase() : "", o = s ? s.trim().toLowerCase() : "", r = [];
540
- return this.searchFields ? this.searchFields.forEach((f) => {
541
- e[f] && r.push(String(e[f]).toLowerCase());
542
- }) : (r.push(i), o && r.push(o)), {
545
+ const n = this.formatter(e), i = (l = this.subtitleFormatter) == null ? void 0 : l.call(this, e), s = n ? n.trim().toLowerCase() : "", o = i ? i.trim().toLowerCase() : "", r = [];
546
+ return this.searchFields ? this.searchFields.forEach((h) => {
547
+ e[h] && r.push(String(e[h]).toLowerCase());
548
+ }) : (r.push(s), o && r.push(o)), {
543
549
  // eslint-disable-next-line vue/no-use-computed-property-like-method
544
550
  key: ((c = this.effectiveKeyExtractor) == null ? void 0 : c.call(this, e)) ?? String(t),
545
551
  title: n,
546
- subtitle: s,
552
+ subtitle: i,
547
553
  searchContent: r.join(""),
548
554
  ref: e
549
555
  };
@@ -554,14 +560,14 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
554
560
  if (this.isSearching) {
555
561
  const t = this.searchText.trim().toLowerCase();
556
562
  if (t.length) {
557
- e = e.filter((i) => i.searchContent.includes(t));
558
- const n = Je(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), s = new RegExp(`(${n})`, "ig");
559
- e = e.map((i) => {
563
+ e = e.filter((s) => s.searchContent.includes(t));
564
+ const n = et(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(`(${n})`, "ig");
565
+ e = e.map((s) => {
560
566
  var o;
561
567
  return {
562
- ...i,
563
- title: i.title.replace(s, "<mark>$1</mark>"),
564
- subtitle: (o = i.subtitle) == null ? void 0 : o.replace(s, "<mark>$1</mark>")
568
+ ...s,
569
+ title: s.title.replace(i, "<mark>$1</mark>"),
570
+ subtitle: (o = s.subtitle) == null ? void 0 : o.replace(i, "<mark>$1</mark>")
565
571
  };
566
572
  }), this.shouldShowCreateOption && (e.find((o) => o.searchContent === t) !== void 0 || e.push({
567
573
  key: he,
@@ -570,7 +576,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
570
576
  }
571
577
  } else
572
578
  this.nullTitle && e.unshift({
573
- key: I,
579
+ key: H,
574
580
  title: this.nullTitle
575
581
  });
576
582
  return e;
@@ -582,7 +588,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
582
588
  this.handleValueChanged();
583
589
  },
584
590
  options() {
585
- this.loadedOptions = this.options ?? [];
591
+ this.loadedOptions = this.options ?? [], this.isLoaded = !0;
586
592
  },
587
593
  // data
588
594
  optionsDescriptors() {
@@ -596,26 +602,21 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
596
602
  },
597
603
  effectiveOptions() {
598
604
  var e;
599
- this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ?? I);
605
+ this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ?? H);
600
606
  }
601
607
  },
602
608
  async mounted() {
603
- this.shouldShowCreateOption = this.$attrs.onCreateItem !== void 0, this.options ? (this.loadedOptions = this.options, this.isLoaded = !0) : this.preload && await this.loadRemoteOptions(), this.handleValueChanged(), this.$watch("selectedOption", () => {
609
+ this.shouldShowCreateOption = this.onCreateItem !== void 0, this.options ? (this.loadedOptions = this.options, this.isLoaded = !0) : this.preload && await this.loadRemoteOptions(), this.handleValueChanged(), this.$watch("selectedOption", () => {
604
610
  this.selectedOption !== this.modelValue && this.$emit(
605
611
  "update:modelValue",
606
612
  this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
607
613
  );
608
- }), this.remoteSearch && this.$watch("searchText", Xe(this.reloadOptionsIfSearching, 250));
614
+ }), this.remoteSearch && this.$watch("searchText", Ye(this.reloadOptionsIfSearching, 250));
609
615
  },
610
616
  methods: {
611
617
  async loadRemoteOptions() {
612
618
  await this.reloadOptions(), this.loadedOptions && this.$emit("optionsLoaded", this.loadedOptions);
613
619
  },
614
- handleSourceUpdate() {
615
- if (this.preload)
616
- return this.reloadOptions();
617
- this.isLoaded && (this.isLoaded = !1, this.loadedOptions = []);
618
- },
619
620
  async reloadOptions() {
620
621
  var t;
621
622
  const e = this.remoteSearch && this.isSearching && this.searchText ? this.searchText : null;
@@ -650,7 +651,7 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
650
651
  this.searchText.length > 1 && (this.isSearching = !0);
651
652
  return;
652
653
  }
653
- !e.metaKey && Lt.includes(e.key) && (this.isSearching = !0);
654
+ !e.metaKey && Mt.includes(e.key) && (this.isSearching = !0);
654
655
  }
655
656
  },
656
657
  handleInputFocused() {
@@ -658,17 +659,17 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
658
659
  },
659
660
  setHighlightedOptionKey(e) {
660
661
  var t;
661
- this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ?? I : this.nullTitle && (this.highlightedOptionKey = I);
662
+ this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ?? H : this.nullTitle && (this.highlightedOptionKey = H);
662
663
  },
663
664
  getOptionKey(e) {
664
665
  var t;
665
666
  return this.effectiveKeyExtractor ? this.effectiveKeyExtractor(this.selectedOption) : ((t = this.getOptionDescriptor(e)) == null ? void 0 : t.key) ?? "";
666
667
  },
667
668
  getOptionDescriptor(e) {
668
- const t = this.effectiveOptions.find((s) => s.ref === e);
669
+ const t = this.effectiveOptions.find((i) => i.ref === e);
669
670
  if (t)
670
671
  return t;
671
- const n = this.effectiveOptions.find((s) => Ce(s.ref, e));
672
+ const n = this.effectiveOptions.find((i) => xe(i.ref, e));
672
673
  return n || null;
673
674
  },
674
675
  handleInputBlurred() {
@@ -678,19 +679,19 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
678
679
  this.isLoaded || this.loadRemoteOptions(), this.optionsListId && this.$refs.optionsContainer.setAttribute("id", this.optionsListId), this.teleportOptionsContainer();
679
680
  },
680
681
  teleportOptionsContainer() {
681
- const e = this.$el.getBoundingClientRect(), t = e.y + e.height + 2, n = e.x, s = this.$refs.optionsContainer, i = window.getComputedStyle(this.$el);
682
- for (let o in i)
683
- /^(font|text)/.test(o) && (s.style[o] = i[o]);
684
- if (s.style.top = t + "px", s.style.left = n + "px", s.style.minWidth = e.width + "px", !i.maxHeight || i.maxHeight == "none") {
682
+ const e = this.$el.getBoundingClientRect(), t = e.y + e.height + 2, n = e.x, i = this.$refs.optionsContainer, s = window.getComputedStyle(this.$el);
683
+ for (let o in s)
684
+ /^(font|text)/.test(o) && (i.style[o] = s[o]);
685
+ if (i.style.top = t + "px", i.style.left = n + "px", i.style.minWidth = e.width + "px", !s.maxHeight || s.maxHeight == "none") {
685
686
  const o = window.innerHeight - t - 12;
686
- s.style.maxHeight = o + "px";
687
+ i.style.maxHeight = o + "px";
687
688
  }
688
- s.style.visibility = "visible", document.body.appendChild(s), setTimeout(this.highlightInitialOption, 0);
689
+ i.style.visibility = "visible", document.body.appendChild(i), setTimeout(this.highlightInitialOption, 0);
689
690
  },
690
691
  highlightInitialOption() {
691
692
  if (!this.isLoaded || !this.highlightedOptionKey)
692
693
  return;
693
- const e = this.effectiveOptions.findIndex((s) => s.key == this.highlightedOptionKey), t = this.$refs.optionsContainer, n = t.querySelectorAll(".option")[e];
694
+ const e = this.effectiveOptions.findIndex((i) => i.key == this.highlightedOptionKey), t = this.$refs.optionsContainer, n = t.querySelectorAll(".option")[e];
694
695
  t.scrollTop = n.offsetTop;
695
696
  },
696
697
  handleOptionHover(e) {
@@ -702,18 +703,19 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
702
703
  if (n < 0 ? n = 0 : n >= this.effectiveOptions.length && (n = this.effectiveOptions.length - 1), t == n)
703
704
  return;
704
705
  this.highlightedOptionKey = this.effectiveOptions[n].key;
705
- const s = this.$refs.optionsContainer, i = s.querySelectorAll(".option")[n];
706
- i.offsetTop < s.scrollTop ? s.scrollTop = i.offsetTop : i.offsetTop + i.offsetHeight > s.scrollTop + s.clientHeight && (s.scrollTop = i.offsetTop + i.offsetHeight - s.clientHeight);
706
+ const i = this.$refs.optionsContainer, s = i.querySelectorAll(".option")[n];
707
+ s.offsetTop < i.scrollTop ? i.scrollTop = s.offsetTop : s.offsetTop + s.offsetHeight > i.scrollTop + i.clientHeight && (i.scrollTop = s.offsetTop + s.offsetHeight - i.clientHeight);
707
708
  },
708
709
  selectOption(e) {
709
- if (this.isSearching = !1, e.key == I)
710
+ var t;
711
+ if (this.isSearching = !1, e.key == H)
710
712
  this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
711
713
  else if (e.key === he) {
712
- const t = this.searchText.trim();
713
- this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, this.$emit("createItem", t);
714
+ const n = this.searchText.trim();
715
+ this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, (t = this.onCreateItem) == null || t.call(this, n);
714
716
  } else {
715
- const n = this.optionsDescriptors.find((s) => s.key == e.key).ref;
716
- this.selectedOption = n, this.selectedOptionTitle = this.formatter(n), this.searchText = this.selectedOptionTitle || "";
717
+ const i = this.optionsDescriptors.find((s) => s.key == e.key).ref;
718
+ this.selectedOption = i, this.selectedOptionTitle = this.formatter(i), this.searchText = this.selectedOptionTitle || "";
717
719
  }
718
720
  this.$refs.searchField.blur();
719
721
  },
@@ -721,65 +723,66 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
721
723
  this.modelValue ? (this.selectedOption = this.valueExtractor ? this.allOptions.find((e) => this.modelValue === this.valueExtractor(e)) : this.modelValue, this.selectedOptionTitle = this.selectedOption ? this.formatter(this.selectedOption) : null, this.searchText = this.selectedOptionTitle || "") : (this.selectedOption = null, this.selectedOptionTitle = null, this.searchText = "");
722
724
  },
723
725
  addRemoteOption(e) {
724
- this.loadedOptions.push(e);
726
+ this.loadedOptions.unshift(e);
725
727
  }
726
728
  }
727
729
  };
728
- const It = ["placeholder"], _t = {
730
+ const Ht = ["placeholder", "required"], _t = {
729
731
  key: 0,
730
732
  ref: "optionsContainer",
731
733
  class: "vf-smart-select-options"
732
- }, Ht = {
734
+ }, Dt = {
733
735
  key: 0,
734
736
  class: "no-results"
735
- }, Dt = ["onMousemove", "onMousedown"], $t = ["innerHTML"], At = ["innerHTML"], Bt = {
737
+ }, $t = ["onMousemove", "onMousedown"], At = ["innerHTML"], Bt = ["innerHTML"], Vt = {
736
738
  key: 0,
737
739
  class: "no-results"
738
740
  };
739
- function Vt(e, t, n, s, i, o) {
741
+ function Ft(e, t, n, i, s, o) {
740
742
  const r = Te("disabled");
741
- return u(), h("div", {
742
- class: w(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
743
+ return u(), f("div", {
744
+ class: k(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
743
745
  }, [
744
- U(E("input", {
746
+ U(O("input", {
745
747
  "onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l),
746
748
  ref: "searchField",
747
749
  type: "text",
748
- class: w({ nullable: !!n.nullTitle }),
750
+ class: k({ nullable: !!n.nullTitle }),
749
751
  onKeydown: t[1] || (t[1] = (...l) => o.handleKeyDown && o.handleKeyDown(...l)),
750
752
  placeholder: o.effectivePlaceholder,
751
753
  onFocus: t[2] || (t[2] = (...l) => o.handleInputFocused && o.handleInputFocused(...l)),
752
- onBlur: t[3] || (t[3] = (...l) => o.handleInputBlurred && o.handleInputBlurred(...l))
753
- }, null, 42, It), [
754
+ onBlur: t[3] || (t[3] = (...l) => o.handleInputBlurred && o.handleInputBlurred(...l)),
755
+ required: n.required
756
+ }, null, 42, Ht), [
754
757
  [ze, e.searchText],
755
758
  [r, o.effectiveDisabled]
756
759
  ]),
757
- e.shouldDisplayOptions ? (u(), h("div", _t, [
758
- e.isLoaded ? (u(), h(j, { key: 1 }, [
759
- (u(!0), h(j, null, J(o.effectiveOptions, (l) => (u(), h("div", {
760
+ e.shouldDisplayOptions ? (u(), f("div", _t, [
761
+ e.isLoaded ? (u(), f(j, { key: 1 }, [
762
+ (u(!0), f(j, null, J(o.effectiveOptions, (l) => (u(), f("div", {
760
763
  key: String(l.key),
761
- class: w(["option", {
764
+ class: k(["option", {
762
765
  highlighted: e.highlightedOptionKey === l.key
763
766
  }]),
764
767
  onMousemove: (c) => o.handleOptionHover(l),
765
768
  onMousedown: (c) => o.selectOption(l)
766
769
  }, [
767
- E("div", {
770
+ O("div", {
768
771
  class: "title",
769
772
  innerHTML: l.title
770
- }, null, 8, $t),
771
- l.subtitle ? (u(), h("div", {
773
+ }, null, 8, At),
774
+ l.subtitle ? (u(), f("div", {
772
775
  key: 0,
773
776
  class: "subtitle",
774
777
  innerHTML: l.subtitle
775
- }, null, 8, At)) : O("", !0)
776
- ], 42, Dt))), 128)),
777
- !o.effectiveOptions.length && e.searchText ? (u(), h("div", Bt, x(o.effectiveNoResultsText), 1)) : O("", !0)
778
- ], 64)) : (u(), h("div", Ht, "Loading..."))
779
- ], 512)) : O("", !0)
778
+ }, null, 8, Bt)) : T("", !0)
779
+ ], 42, $t))), 128)),
780
+ !o.effectiveOptions.length && e.searchText ? (u(), f("div", Vt, x(o.effectiveNoResultsText), 1)) : T("", !0)
781
+ ], 64)) : (u(), f("div", Dt, "Loading..."))
782
+ ], 512)) : T("", !0)
780
783
  ], 2);
781
784
  }
782
- const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
785
+ const Nt = /* @__PURE__ */ Le(It, [["render", Ft]]), Wn = /* @__PURE__ */ C({
783
786
  __name: "ez-smart-select",
784
787
  props: {
785
788
  modelValue: {},
@@ -790,36 +793,36 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
790
793
  },
791
794
  emits: ["update:modelValue"],
792
795
  setup(e, { emit: t }) {
793
- const n = e, s = K(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, l]) => ({
796
+ const n = e, i = V(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, l]) => ({
794
797
  value: r,
795
798
  label: l
796
- }))), i = K(() => n.formatter ? (r) => {
799
+ }))), s = V(() => n.formatter ? (r) => {
797
800
  var l;
798
801
  return (l = n.formatter) == null ? void 0 : l.call(n, r.label);
799
- } : (r) => r.label), o = T(s.value.find((r) => r.value === n.modelValue) ?? null);
802
+ } : (r) => r.label), o = w(i.value.find((r) => r.value === n.modelValue) ?? null);
800
803
  return ce(
801
804
  () => n.modelValue,
802
805
  (r) => {
803
- o.value = s.value.find((l) => l.value === r) ?? null;
806
+ o.value = i.value.find((l) => l.value === r) ?? null;
804
807
  }
805
808
  ), ce(o, (r) => {
806
809
  var l;
807
- t("update:modelValue", r ? ((l = s.value.find((c) => Ce(c, r))) == null ? void 0 : l.value) ?? null : null);
808
- }), (r, l) => (u(), ke(Ft, {
810
+ t("update:modelValue", r ? ((l = i.value.find((c) => xe(c, r))) == null ? void 0 : l.value) ?? null : null);
811
+ }), (r, l) => (u(), ke(Nt, {
809
812
  modelValue: o.value,
810
813
  "onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
811
- options: s.value,
812
- formatter: i.value,
814
+ options: i.value,
815
+ formatter: s.value,
813
816
  "null-title": r.nullTitle
814
817
  }, null, 8, ["modelValue", "options", "formatter", "null-title"]));
815
818
  }
816
- }), Nt = ["onClick"], Rt = { class: "content" }, Kt = { class: "message" }, Ut = {
819
+ }), Rt = ["onClick"], Kt = { class: "content" }, Ut = { class: "message" }, jt = {
817
820
  key: 0,
818
821
  class: "close"
819
- }, jt = {
822
+ }, Wt = {
820
823
  key: 0,
821
824
  class: "progress-bar"
822
- }, Wt = /* @__PURE__ */ S({
825
+ }, Pt = /* @__PURE__ */ C({
823
826
  __name: "toast",
824
827
  props: {
825
828
  message: {},
@@ -834,157 +837,157 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
834
837
  function n() {
835
838
  t.onClick ? t.onClick() : t.disableClose || t.callback();
836
839
  }
837
- const s = T();
838
- return t.durationSecs !== null && C(() => {
840
+ const i = w();
841
+ return t.durationSecs !== null && L(() => {
839
842
  var o;
840
- const i = t.durationSecs ?? 5;
841
- (o = s.value) == null || o.animate([{ width: "0%" }, { width: "100%" }], {
842
- duration: i * 1e3,
843
+ const s = t.durationSecs ?? 5;
844
+ (o = i.value) == null || o.animate([{ width: "0%" }, { width: "100%" }], {
845
+ duration: s * 1e3,
843
846
  easing: "linear"
844
- }), setTimeout(() => t.callback(), i * 1e3);
845
- }), (i, o) => (u(), h("div", {
846
- class: w(["vf-toast", i.className]),
847
+ }), setTimeout(() => t.callback(), s * 1e3);
848
+ }), (s, o) => (u(), f("div", {
849
+ class: k(["vf-toast", s.className]),
847
850
  onClick: te(n, ["stop"])
848
851
  }, [
849
- E("div", Rt, [
850
- E("div", Kt, x(i.message), 1),
851
- i.disableClose ? O("", !0) : (u(), h("div", Ut, "x"))
852
+ O("div", Kt, [
853
+ O("div", Ut, x(s.message), 1),
854
+ s.disableClose ? T("", !0) : (u(), f("div", jt, "x"))
852
855
  ]),
853
- i.durationSecs !== null ? (u(), h("div", jt, [
854
- E("div", {
856
+ s.durationSecs !== null ? (u(), f("div", Wt, [
857
+ O("div", {
855
858
  ref_key: "progressInnerEl",
856
- ref: s,
859
+ ref: i,
857
860
  class: "inner"
858
861
  }, null, 512)
859
- ])) : O("", !0)
860
- ], 10, Nt));
862
+ ])) : T("", !0)
863
+ ], 10, Rt));
861
864
  }
862
865
  });
863
- function Wn(e) {
864
- const t = se(Wt, {
866
+ function Pn(e) {
867
+ const t = ie(Pt, {
865
868
  ...e,
866
869
  callback: () => P(t)
867
870
  });
868
871
  return () => P(t);
869
872
  }
870
- function Pt(e) {
871
- const t = Math.floor(Math.log(e) / Math.log(1024)), s = (e / Math.pow(1024, t)).toFixed(2), i = ["B", "KB", "MB", "GB", "TB"][t];
872
- return `${s} ${i}`;
873
- }
874
873
  function qt(e) {
875
- return e != null && String(e).length ? e : "-";
874
+ const t = Math.floor(Math.log(e) / Math.log(1024)), i = (e / Math.pow(1024, t)).toFixed(2), s = ["B", "KB", "MB", "GB", "TB"][t];
875
+ return `${i} ${s}`;
876
876
  }
877
877
  function zt(e) {
878
- return e || "-";
878
+ return e != null && String(e).length ? e : "-";
879
879
  }
880
880
  function Xt(e) {
881
- return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : nn(Number(e));
881
+ return e || "-";
882
882
  }
883
883
  function Yt(e) {
884
- return e && xt(e);
884
+ return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : sn(Number(e));
885
885
  }
886
886
  function Zt(e) {
887
- return e ? Ye(e) : null;
887
+ return e && xt(e);
888
888
  }
889
889
  function Gt(e) {
890
890
  return e ? Ze(e) : null;
891
891
  }
892
892
  function Qt(e) {
893
- return e ? e.toUpperCase() : null;
893
+ return e ? Ge(e) : null;
894
894
  }
895
895
  function Jt(e) {
896
- return e ? St(e) : null;
896
+ return e ? e.toUpperCase() : null;
897
897
  }
898
898
  function en(e) {
899
- return Ct(e);
899
+ return e ? Ct(e) : null;
900
+ }
901
+ function tn(e) {
902
+ return Lt(e);
900
903
  }
901
904
  const fe = {
902
- bytes: Pt,
903
- dash: qt,
904
- dashZeros: zt,
905
- number: Xt,
906
- phone: Yt,
907
- upperFirst: Zt,
908
- startCase: Gt,
909
- upperCase: Qt,
910
- desnake: Jt,
911
- usCurrency: en
912
- }, Pn = (e) => ({
905
+ bytes: qt,
906
+ dash: zt,
907
+ dashZeros: Xt,
908
+ number: Yt,
909
+ phone: Zt,
910
+ upperFirst: Gt,
911
+ startCase: Qt,
912
+ upperCase: Jt,
913
+ desnake: en,
914
+ usCurrency: tn
915
+ }, qn = (e) => ({
913
916
  ...fe,
914
917
  ...e(fe)
915
918
  });
916
- function qn(e, t, n) {
917
- const s = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
918
- return s === -1 ? !1 : (e.splice(s, 1, n), !0);
919
+ function zn(e, t, n) {
920
+ const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
921
+ return i === -1 ? !1 : (e.splice(i, 1, n), !0);
919
922
  }
920
- function zn(e, t) {
923
+ function Xn(e, t) {
921
924
  const n = document.createElement("div");
922
- n.classList.add("vf-overlay"), n.addEventListener("click", a), document.body.appendChild(n);
923
- const s = document.createElement("div");
924
- s.classList.add("vf-context-menu"), s.style.position = "absolute", n.appendChild(s);
925
- const i = e.currentTarget;
926
- i.style.userSelect = "none", i.classList.add("context-menu-active"), t.targetClass && i.classList.add(t.targetClass), t.class && s.classList.add(t.class), t.items.forEach((p) => {
925
+ n.classList.add("vf-overlay"), n.addEventListener("click", m), document.body.appendChild(n);
926
+ const i = document.createElement("div");
927
+ i.classList.add("vf-context-menu"), i.style.position = "absolute", n.appendChild(i);
928
+ const s = e.currentTarget;
929
+ s.style.userSelect = "none", s.classList.add("context-menu-active"), t.targetClass && s.classList.add(t.targetClass), t.class && i.classList.add(t.class), t.items.forEach((p) => {
927
930
  if (p == "-") {
928
- const b = document.createElement("div");
929
- b.classList.add("separator"), s.appendChild(b);
931
+ const d = document.createElement("div");
932
+ d.classList.add("separator"), i.appendChild(d);
930
933
  return;
931
934
  }
932
- const d = document.createElement("div");
933
- d.classList.add("item"), d.style.userSelect = "none", d.innerText = p.title, s.appendChild(d), p.class && d.classList.add(p.class), p.shouldConfirm ? d.addEventListener("click", (b) => m(b, d, p.handler)) : d.addEventListener("click", () => p.handler());
935
+ const a = document.createElement("div");
936
+ a.classList.add("item"), a.style.userSelect = "none", a.innerText = p.title, i.appendChild(a), p.class && a.classList.add(p.class), p.shouldConfirm ? a.addEventListener("click", (d) => y(d, a, p.handler)) : a.addEventListener("click", () => p.handler());
934
937
  });
935
- const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = s.offsetHeight, c = s.offsetWidth, f = o < c ? e.clientX - c - 1 : e.clientX + 1, g = r < l ? e.clientY - l - 1 : e.clientY + 1;
936
- s.style.left = f + "px", s.style.top = g + "px", setTimeout(() => {
937
- s.style.width = s.offsetWidth + "px";
938
+ const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, c = i.offsetWidth, h = o < c ? e.clientX - c - 1 : e.clientX + 1, b = r < l ? e.clientY - l - 1 : e.clientY + 1;
939
+ i.style.left = h + "px", i.style.top = b + "px", setTimeout(() => {
940
+ i.style.width = i.offsetWidth + "px";
938
941
  }, 50);
939
- function a() {
940
- t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
942
+ function m() {
943
+ t.targetClass && s.classList.remove(t.targetClass), s.classList.remove("context-menu-active"), s.style.userSelect = "", n.remove();
941
944
  }
942
- function m(p, d, b) {
943
- if (d.classList.contains("pending-confirm"))
944
- return b();
945
- const L = d.innerHTML;
946
- d.classList.add("pending-confirm"), d.innerText = "Confirm";
947
- const F = () => {
948
- d.classList.remove("pending-confirm"), d.innerHTML = L, d.removeEventListener("mouseleave", F);
945
+ function y(p, a, d) {
946
+ if (a.classList.contains("pending-confirm"))
947
+ return d();
948
+ const E = a.innerHTML;
949
+ a.classList.add("pending-confirm"), a.innerText = "Confirm";
950
+ const M = () => {
951
+ a.classList.remove("pending-confirm"), a.innerHTML = E, a.removeEventListener("mouseleave", M);
949
952
  };
950
- d.addEventListener("mouseleave", F), p.stopPropagation();
953
+ a.addEventListener("mouseleave", M), p.stopPropagation();
951
954
  }
952
955
  }
953
- const tn = (e) => new Promise((t) => setTimeout(t, e)), Xn = (e) => tn(e * 1e3);
954
- function nn(e) {
956
+ const nn = (e) => new Promise((t) => setTimeout(t, e)), Yn = (e) => nn(e * 1e3);
957
+ function sn(e) {
955
958
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
956
959
  }
957
- function Yn(e, t) {
958
- return e != null ? Ge(e) : t;
959
- }
960
960
  function Zn(e, t) {
961
+ return e != null ? Qe(e) : t;
962
+ }
963
+ function Gn(e, t) {
961
964
  const n = { ...e };
962
- for (const s of t)
963
- n[s] === "" && (n[s] = null);
965
+ for (const i of t)
966
+ n[i] === "" && (n[i] = null);
964
967
  return n;
965
968
  }
966
- function sn(e) {
969
+ function on(e) {
967
970
  return e instanceof Error && "status" in e && "body" in e;
968
971
  }
969
- function Gn({ apiClient: e, wrapper: t, onRequest: n, onError: s, afterRequest: i, CancelablePromise: o }) {
970
- const r = e.request.request.bind(e.request), l = t ?? ((c, f) => f(c));
971
- e.request.request = (c) => l(c, (f) => (f = on(f), n && (f = n(f)), new o((g, a, m) => {
972
- const p = r(f);
973
- m(p.cancel), p.then(g).catch((d) => {
974
- if (sn(d) && typeof d.body == "object" && "error" in d.body) {
975
- if (d.status === 422)
976
- return a(new z(d.body.error));
977
- d.message = `${d.body.error} (${d.status})`;
972
+ function Qn({ apiClient: e, wrapper: t, onRequest: n, onError: i, afterRequest: s, CancelablePromise: o }) {
973
+ const r = e.request.request.bind(e.request), l = t ?? ((c, h) => h(c));
974
+ e.request.request = (c) => l(c, (h) => (h = ln(h), n && (h = n(h)), new o((b, m, y) => {
975
+ const p = r(h);
976
+ y(p.cancel), p.then(b).catch((a) => {
977
+ if (on(a) && typeof a.body == "object" && "error" in a.body) {
978
+ if (a.status === 422)
979
+ return m(new z(a.body.error));
980
+ a.message = `${a.body.error} (${a.status})`;
978
981
  }
979
- if (s) {
980
- const b = s(d, f);
981
- if (b === null)
982
+ if (i) {
983
+ const d = i(a, h);
984
+ if (d === null)
982
985
  return;
983
- if (b instanceof Error)
984
- return a(b);
986
+ if (d instanceof Error)
987
+ return m(d);
985
988
  }
986
- a(d);
987
- }).finally(() => i == null ? void 0 : i(f));
989
+ m(a);
990
+ }).finally(() => s == null ? void 0 : s(h));
988
991
  })));
989
992
  }
990
993
  class pe {
@@ -999,40 +1002,40 @@ class pe {
999
1002
  this.blob = t;
1000
1003
  }
1001
1004
  }
1002
- function on(e) {
1003
- if (!(typeof e.body == "object" && Object.values(e.body).some((i) => i instanceof pe)))
1005
+ function ln(e) {
1006
+ if (!(typeof e.body == "object" && Object.values(e.body).some((s) => s instanceof pe)))
1004
1007
  return e;
1005
- const n = {}, s = {};
1006
- for (const [i, o] of Object.entries(e.body))
1007
- o instanceof pe ? n[i] = o.blob : s[i] = o;
1008
- return n._payload = new Blob([JSON.stringify(s)], { type: "application/json" }), {
1008
+ const n = {}, i = {};
1009
+ for (const [s, o] of Object.entries(e.body))
1010
+ o instanceof pe ? n[s] = o.blob : i[s] = o;
1011
+ return n._payload = new Blob([JSON.stringify(i)], { type: "application/json" }), {
1009
1012
  ...e,
1010
1013
  body: void 0,
1011
1014
  formData: n
1012
1015
  };
1013
1016
  }
1014
1017
  const le = Symbol("HookState");
1015
- function Qn(e, t) {
1018
+ function Jn(e, t) {
1016
1019
  const n = t ?? ee();
1017
- C(() => ln(n, e), n), Se(() => rn(n), n), xe(() => me(n), n), ne(() => me(n), n);
1020
+ L(() => rn(n, e), n), Se(() => an(n), n), Ce(() => me(n), n), ne(() => me(n), n);
1018
1021
  }
1019
- function ln(e, t) {
1022
+ function rn(e, t) {
1020
1023
  const n = {};
1021
- if (t.elScrolledToBottom && (n.el = new $(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1022
- const s = De(e.vnode.el);
1023
- s ? n.ancestor = new $(s, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1024
+ if (t.elScrolledToBottom && (n.el = new A(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1025
+ const i = De(e.vnode.el);
1026
+ i ? n.ancestor = new A(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1024
1027
  }
1025
- t.windowScrolledToBottom && (n.window = new $(window, t.windowScrolledToBottom)), e[le] = n;
1028
+ t.windowScrolledToBottom && (n.window = new A(window, t.windowScrolledToBottom)), e[le] = n;
1026
1029
  }
1027
- function rn(e) {
1028
- var n, s, i;
1030
+ function an(e) {
1031
+ var n, i, s;
1029
1032
  const t = e[le];
1030
- (n = t == null ? void 0 : t.el) == null || n.install(), (s = t == null ? void 0 : t.ancestor) == null || s.install(), (i = t == null ? void 0 : t.window) == null || i.install();
1033
+ (n = t == null ? void 0 : t.el) == null || n.install(), (i = t == null ? void 0 : t.ancestor) == null || i.install(), (s = t == null ? void 0 : t.window) == null || s.install();
1031
1034
  }
1032
1035
  function me(e) {
1033
- var n, s, i;
1036
+ var n, i, s;
1034
1037
  const t = e[le];
1035
- (n = t == null ? void 0 : t.el) == null || n.uninstall(), (s = t == null ? void 0 : t.ancestor) == null || s.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
1038
+ (n = t == null ? void 0 : t.el) == null || n.uninstall(), (i = t == null ? void 0 : t.ancestor) == null || i.uninstall(), (s = t == null ? void 0 : t.window) == null || s.uninstall();
1036
1039
  }
1037
1040
  const Z = ["auto", "scroll"];
1038
1041
  function De(e) {
@@ -1042,7 +1045,7 @@ function De(e) {
1042
1045
  const n = window.getComputedStyle(t);
1043
1046
  return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t : De(t);
1044
1047
  }
1045
- class $ {
1048
+ class A {
1046
1049
  constructor(t, n) {
1047
1050
  v(this, "isTripped", !1);
1048
1051
  v(this, "onScrollWithContext", this.onScroll.bind(this));
@@ -1058,10 +1061,10 @@ class $ {
1058
1061
  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);
1059
1062
  }
1060
1063
  }
1061
- function Jn(e) {
1062
- C(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), xe(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1064
+ function ei(e) {
1065
+ L(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), Ce(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1063
1066
  }
1064
- const an = {
1067
+ const cn = {
1065
1068
  mounted: ye,
1066
1069
  updated: ye
1067
1070
  }, ve = Symbol("HasAutoFocused");
@@ -1072,10 +1075,10 @@ function ye(e, t) {
1072
1075
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
1073
1076
  setTimeout(() => n.focus(), 10);
1074
1077
  }
1075
- const cn = {
1076
- mounted: dn
1078
+ const dn = {
1079
+ mounted: un
1077
1080
  }, _ = Symbol("ConfirmState");
1078
- function dn(e) {
1081
+ function un(e) {
1079
1082
  e.addEventListener("click", (t) => {
1080
1083
  const n = Date.now();
1081
1084
  if (e[_]) {
@@ -1085,20 +1088,20 @@ function dn(e) {
1085
1088
  return;
1086
1089
  }
1087
1090
  t.preventDefault(), t.stopImmediatePropagation();
1088
- const s = {
1091
+ const i = {
1089
1092
  initTime: n,
1090
1093
  preconfirmHtml: e.innerHTML,
1091
1094
  resetHandler: () => {
1092
- e.innerHTML = s.preconfirmHtml, e.blur(), e.removeEventListener("mouseout", s.resetHandler), delete e[_];
1095
+ e.innerHTML = i.preconfirmHtml, e.blur(), e.removeEventListener("mouseout", i.resetHandler), delete e[_];
1093
1096
  }
1094
1097
  };
1095
- e[_] = s, e.innerHTML = "Confirm", e.addEventListener("mouseout", s.resetHandler);
1098
+ e[_] = i, e.innerHTML = "Confirm", e.addEventListener("mouseout", i.resetHandler);
1096
1099
  });
1097
1100
  }
1098
- const un = {
1099
- beforeMount: hn
1101
+ const hn = {
1102
+ beforeMount: fn
1100
1103
  };
1101
- function hn(e) {
1104
+ function fn(e) {
1102
1105
  e.addEventListener("blur", () => {
1103
1106
  let t = e.value;
1104
1107
  /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + G(/* @__PURE__ */ new Date(), "yy"));
@@ -1106,117 +1109,117 @@ function hn(e) {
1106
1109
  isNaN(n) ? e.value = "" : e.value = G(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1107
1110
  });
1108
1111
  }
1109
- const fn = {
1112
+ const pn = {
1110
1113
  beforeMount: ge,
1111
1114
  updated: ge
1112
1115
  };
1113
1116
  function ge(e, t) {
1114
- t.value == t.oldValue && e.innerHTML.length || (e.innerText = pn(e, t));
1117
+ t.value == t.oldValue && e.innerHTML.length || (e.innerText = mn(e, t));
1115
1118
  }
1116
- function pn(e, t) {
1117
- var c, f;
1119
+ function mn(e, t) {
1120
+ var c, h;
1118
1121
  if (!t.value)
1119
1122
  return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
1120
1123
  let n = "";
1121
- const s = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? s.replace(/Z$/, "") : s.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(i);
1124
+ const i = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), s = e.attributes.getNamedItem("local") !== null ? i.replace(/Z$/, "") : i.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(s);
1122
1125
  e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
1123
- let r = (f = e.attributes.getNamedItem("format")) == null ? void 0 : f.value;
1126
+ let r = (h = e.attributes.getNamedItem("format")) == null ? void 0 : h.value;
1124
1127
  if (!r && e.attributes.getNamedItem("relative-date") !== null) {
1125
- const g = /* @__PURE__ */ new Date();
1126
- g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1128
+ const b = /* @__PURE__ */ new Date();
1129
+ b.getFullYear() == o.getFullYear() && b.getMonth() == o.getMonth() && b.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1127
1130
  }
1128
- r || (r = V.defaultDateTimeFormat);
1131
+ r || (r = N.defaultDateTimeFormat);
1129
1132
  let l = G(o, r);
1130
1133
  return n && (l = n + " " + l), l;
1131
1134
  }
1132
- const mn = {
1135
+ const vn = {
1133
1136
  beforeMount: be,
1134
1137
  updated: be,
1135
- unmounted: vn
1138
+ unmounted: yn
1136
1139
  };
1137
1140
  function be(e, t) {
1138
1141
  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");
1139
1142
  }
1140
- function vn(e) {
1143
+ function yn(e) {
1141
1144
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1142
1145
  }
1143
- const yn = {
1146
+ const gn = {
1144
1147
  beforeMount: Ee,
1145
1148
  updated: Ee,
1146
1149
  unmounted: Ae
1147
- }, B = Symbol("HasAutoFocused"), re = [];
1148
- function gn() {
1150
+ }, F = Symbol("HasAutoFocused"), re = [];
1151
+ function bn() {
1149
1152
  re.forEach($e);
1150
1153
  }
1151
- setInterval(gn, 1e3);
1154
+ setInterval(bn, 1e3);
1152
1155
  function Ee(e, t) {
1153
1156
  var r;
1154
1157
  if (t.value == t.oldValue)
1155
1158
  return;
1156
1159
  if (!t.value)
1157
1160
  return Ae(e);
1158
- const n = new Date(t.value), s = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, i = n.getTime() - (s ? new Date(s).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
1159
- e[B] || re.push(e), e[B] = {
1160
- startTs: i,
1161
+ const n = new Date(t.value), i = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
1162
+ e[F] || re.push(e), e[F] = {
1163
+ startTs: s,
1161
1164
  includeSeconds: o
1162
1165
  }, $e(e);
1163
1166
  }
1164
1167
  function $e(e) {
1165
- const t = e[B], n = Math.round((Date.now() - t.startTs) / 1e3);
1166
- e.innerText = bn(n, t.includeSeconds);
1168
+ const t = e[F], n = Math.round((Date.now() - t.startTs) / 1e3);
1169
+ e.innerText = En(n, t.includeSeconds);
1167
1170
  }
1168
1171
  function Ae(e) {
1169
- e[B] && (Qe(re, e), delete e[B]), e.innerText = "-";
1172
+ e[F] && (Je(re, e), delete e[F]), e.innerText = "-";
1170
1173
  }
1171
- function bn(e, t) {
1172
- const n = [], s = Math.floor(e / 86400);
1173
- s && n.push(s + "d"), e -= s * 86400;
1174
- const i = Math.floor(e / 3600);
1175
- (s || i) && n.push(i + "h"), e -= i * 3600;
1174
+ function En(e, t) {
1175
+ const n = [], i = Math.floor(e / 86400);
1176
+ i && n.push(i + "d"), e -= i * 86400;
1177
+ const s = Math.floor(e / 3600);
1178
+ (i || s) && n.push(s + "h"), e -= s * 3600;
1176
1179
  const o = Math.floor(e / 60);
1177
- return (s || i || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
1180
+ return (i || s || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
1178
1181
  }
1179
- const H = Symbol("InfiniteScrollHandler"), En = {
1182
+ const D = Symbol("InfiniteScrollHandler"), On = {
1180
1183
  mounted(e, t) {
1181
- e[H] = new $(e, t.value);
1184
+ e[D] = new A(e, t.value);
1182
1185
  },
1183
1186
  updated(e, t) {
1184
1187
  var n;
1185
- (n = e[H]) == null || n.uninstall(), e[H] = new $(e, t.value);
1188
+ (n = e[D]) == null || n.uninstall(), e[D] = new A(e, t.value);
1186
1189
  },
1187
1190
  unmounted(e) {
1188
1191
  var t;
1189
- (t = e[H]) == null || t.uninstall(), delete e[H];
1192
+ (t = e[D]) == null || t.uninstall(), delete e[D];
1190
1193
  }
1191
- }, On = {
1194
+ }, wn = {
1192
1195
  beforeMount: Oe,
1193
1196
  updated: Oe
1194
1197
  };
1195
1198
  function Oe(e, t) {
1196
1199
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1197
1200
  }
1198
- const wn = {
1201
+ const Tn = {
1199
1202
  mounted: we,
1200
1203
  updated: we,
1201
1204
  unmounted: Be
1202
- }, A = Symbol("TooltipState");
1205
+ }, B = Symbol("TooltipState");
1203
1206
  function we(e, t) {
1204
- var s;
1205
- let n = ((s = e.attributes.getNamedItem("tip")) == null ? void 0 : s.value) ?? t.value;
1207
+ var i;
1208
+ let n = ((i = e.attributes.getNamedItem("tip")) == null ? void 0 : i.value) ?? t.value;
1206
1209
  if (t.value || (n = null), n) {
1207
- const i = {
1210
+ const s = {
1208
1211
  content: n,
1209
1212
  html: e.getAttribute("html") !== null
1210
1213
  };
1211
- e[A] ? e[A].configure(i) : e[A] = new Tn(e, i);
1214
+ e[B] ? e[B].configure(s) : e[B] = new kn(e, s);
1212
1215
  } else
1213
1216
  Be(e);
1214
1217
  }
1215
1218
  function Be(e) {
1216
1219
  var t;
1217
- (t = e[A]) == null || t.destroy(), delete e[A];
1220
+ (t = e[B]) == null || t.destroy(), delete e[B];
1218
1221
  }
1219
- class Tn {
1222
+ class kn {
1220
1223
  constructor(t, n) {
1221
1224
  v(this, "lastMoveEvt");
1222
1225
  v(this, "checkInterval");
@@ -1252,9 +1255,9 @@ class Tn {
1252
1255
  this.shouldShow || this.tipEl && (this.tipEl.remove(), this.tipEl = void 0, this.titleEl = void 0, this.contentEl = void 0, this.checkInterval && (clearInterval(this.checkInterval), this.checkInterval = void 0), window.removeEventListener("mousemove", this.handleMouseMoveWithContext), this.mouseMoveBound = !1);
1253
1256
  }
1254
1257
  handleMouseMove(t) {
1255
- const n = this.tipEl.offsetWidth, s = this.tipEl.offsetHeight, i = window.innerWidth, o = window.innerHeight;
1258
+ const n = this.tipEl.offsetWidth, i = this.tipEl.offsetHeight, s = window.innerWidth, o = window.innerHeight;
1256
1259
  let r = t.pageX + 10, l = t.pageY + 20;
1257
- r + n > i && (r = t.pageX - 5 - n), l + s > o && (l = t.pageY - 5 - s), this.tipEl.style.left = r + "px", this.tipEl.style.top = l + "px", this.lastMoveEvt = t;
1260
+ r + n > s && (r = t.pageX - 5 - n), l + i > o && (l = t.pageY - 5 - i), this.tipEl.style.left = r + "px", this.tipEl.style.top = l + "px", this.lastMoveEvt = t;
1258
1261
  }
1259
1262
  checkMoveEvent() {
1260
1263
  var t;
@@ -1264,61 +1267,61 @@ class Tn {
1264
1267
  this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
1265
1268
  }
1266
1269
  }
1267
- function kn(e) {
1268
- e.directive("autofocus", an), e.directive("confirm-button", cn), e.directive("date-input", un), e.directive("datetime", fn), e.directive("disabled", mn), e.directive("duration", yn), e.directive("infinite-scroll", En), e.directive("readonly", On), e.directive("tooltip", wn);
1270
+ function Sn(e) {
1271
+ e.directive("autofocus", cn), e.directive("confirm-button", dn), e.directive("date-input", hn), e.directive("datetime", pn), e.directive("disabled", vn), e.directive("duration", gn), e.directive("infinite-scroll", On), e.directive("readonly", wn), e.directive("tooltip", Tn);
1269
1272
  }
1270
- function es(e) {
1271
- kn(e);
1273
+ function ti(e) {
1274
+ Sn(e);
1272
1275
  }
1273
1276
  export {
1274
1277
  pe as FileUploadRequest,
1275
1278
  _n as OverlayContainer,
1276
1279
  z as UserError,
1277
- In as VfAjaxSelect,
1280
+ Hn as VfAjaxSelect,
1278
1281
  X as VfAlertModal,
1279
- jn as VfEzSmartSelect,
1280
- yt as VfModal,
1281
- Ft as VfSmartSelect,
1282
- Yn as cloneProp,
1283
- Bn as configureVf,
1284
- Pn as createFilters,
1285
- se as createOverlayInjection,
1286
- St as desnakeCase,
1287
- ct as dismissOverlayInjectionById,
1288
- Hn as dismissOverlayInjectionByInstance,
1282
+ Wn as VfEzSmartSelect,
1283
+ gt as VfModal,
1284
+ Nt as VfSmartSelect,
1285
+ Zn as cloneProp,
1286
+ Vn as configureVf,
1287
+ qn as createFilters,
1288
+ ie as createOverlayInjection,
1289
+ Ct as desnakeCase,
1290
+ dt as dismissOverlayInjectionById,
1291
+ Dn as dismissOverlayInjectionByInstance,
1289
1292
  Me as dismissOverlayInjectionByInternalInstance,
1290
- at as dismissOverlayInjectionByVnode,
1291
- ss as escapeHtml,
1292
- dt as formatError,
1293
- nn as formatNumber,
1293
+ ct as dismissOverlayInjectionByVnode,
1294
+ si as escapeHtml,
1295
+ ut as formatError,
1296
+ sn as formatNumber,
1294
1297
  xt as formatPhone,
1295
- Ct as formatUSCurrency,
1296
- Fn as handleError,
1297
- Vn as handleErrorAndAlert,
1298
- Gn as installApiClientInterceptors,
1299
- es as installVf,
1300
- sn as isApiError,
1301
- Nn as maskComponent,
1302
- ut as maskEl,
1303
- ht as maskForm,
1304
- Kn as nl2br,
1305
- Zn as nullifyEmptyInputs,
1306
- ie as presentOverlay,
1298
+ Lt as formatUSCurrency,
1299
+ Nn as handleError,
1300
+ Fn as handleErrorAndAlert,
1301
+ Qn as installApiClientInterceptors,
1302
+ ti as installVf,
1303
+ on as isApiError,
1304
+ Rn as maskComponent,
1305
+ ht as maskEl,
1306
+ ft as maskForm,
1307
+ Un as nl2br,
1308
+ Gn as nullifyEmptyInputs,
1309
+ se as presentOverlay,
1307
1310
  P as removeOverlayInjection,
1308
- qn as replaceElement,
1311
+ zn as replaceElement,
1309
1312
  de as showAlert,
1310
- Dn as showConfirm,
1311
- $n as showConfirmDestroy,
1312
- zn as showContextMenu,
1313
- Wn as showToast,
1314
- An as showWait,
1315
- tn as sleep,
1316
- Xn as sleepSecs,
1313
+ $n as showConfirm,
1314
+ An as showConfirmDestroy,
1315
+ Xn as showContextMenu,
1316
+ Pn as showToast,
1317
+ Bn as showWait,
1318
+ nn as sleep,
1319
+ Yn as sleepSecs,
1317
1320
  oe as toError,
1318
- Rn as unmaskComponent,
1321
+ Kn as unmaskComponent,
1319
1322
  Ie as unmaskEl,
1320
- _e as unmaskForm,
1321
- Qn as useInfiniteScroll,
1322
- Jn as useResizeWatcher,
1323
- Un as uuid
1323
+ He as unmaskForm,
1324
+ Jn as useInfiniteScroll,
1325
+ ei as useResizeWatcher,
1326
+ jn as uuid
1324
1327
  };