vx-vue 1.4.0 → 1.4.1
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.
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +154 -153
- package/dist/vxvue.umd.js +1 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-f6b1631e],[data-v-f6b1631e]:before,[data-v-f6b1631e]:after,[data-v-f6b1631e]::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-duration:initial;--tw-ease:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}.appear-enter-from[data-v-f6b1631e],.appear-leave-to[data-v-f6b1631e]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x)var(--tw-scale-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);opacity:0}.appear-enter-to[data-v-f6b1631e],.appear-leave-from[data-v-f6b1631e]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);opacity:1}.appear-enter-active[data-v-f6b1631e]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.2s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1))}.appear-leave-active[data-v-f6b1631e]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1))}.vert-fade-enter-from[data-v-f6b1631e],.vert-fade-leave-to[data-v-f6b1631e]{--tw-translate-y:calc(var(--spacing,.25rem)*-10);translate:var(--tw-translate-x)var(--tw-translate-y);transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);opacity:0}.vert-fade-enter-to[data-v-f6b1631e],.vert-fade-leave-from[data-v-f6b1631e]{--tw-translate-y:calc(var(--spacing,.25rem)*0);translate:var(--tw-translate-x)var(--tw-translate-y);opacity:1}.vert-fade-enter-active[data-v-f6b1631e],.vert-fade-leave-active[data-v-f6b1631e]{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.3s;transition-duration:.3s}.fade-enter-from[data-v-f6b1631e],.fade-leave-to[data-v-f6b1631e]{opacity:0}.fade-enter-to[data-v-f6b1631e],.fade-leave-from[data-v-f6b1631e]{opacity:1}.fade-enter-active[data-v-f6b1631e],.fade-leave-active[data-v-f6b1631e]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;transition-duration:.2s}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}/*! tailwindcss v4.1.
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-f6b1631e],[data-v-f6b1631e]:before,[data-v-f6b1631e]:after,[data-v-f6b1631e]::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-duration:initial;--tw-ease:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}.appear-enter-from[data-v-f6b1631e],.appear-leave-to[data-v-f6b1631e]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x)var(--tw-scale-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);opacity:0}.appear-enter-to[data-v-f6b1631e],.appear-leave-from[data-v-f6b1631e]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);opacity:1}.appear-enter-active[data-v-f6b1631e]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.2s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1))}.appear-leave-active[data-v-f6b1631e]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1))}.vert-fade-enter-from[data-v-f6b1631e],.vert-fade-leave-to[data-v-f6b1631e]{--tw-translate-y:calc(var(--spacing,.25rem)*-10);translate:var(--tw-translate-x)var(--tw-translate-y);transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);opacity:0}.vert-fade-enter-to[data-v-f6b1631e],.vert-fade-leave-from[data-v-f6b1631e]{--tw-translate-y:calc(var(--spacing,.25rem)*0);translate:var(--tw-translate-x)var(--tw-translate-y);opacity:1}.vert-fade-enter-active[data-v-f6b1631e],.vert-fade-leave-active[data-v-f6b1631e]{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.3s;transition-duration:.3s}.fade-enter-from[data-v-f6b1631e],.fade-leave-to[data-v-f6b1631e]{opacity:0}.fade-enter-to[data-v-f6b1631e],.fade-leave-from[data-v-f6b1631e]{opacity:1}.fade-enter-active[data-v-f6b1631e],.fade-leave-active[data-v-f6b1631e]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;transition-duration:.2s}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-646b7a90],[data-v-646b7a90]:before,[data-v-646b7a90]:after,[data-v-646b7a90]::backdrop{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}button.success[data-v-646b7a90]{background-color:var(--color-success,rgb(var(--success-color)));color:var(--color-white,#fff)}@media (hover:hover){button.success[data-v-646b7a90]:hover{background-color:var(--color-success-700,rgb(var(--success-color-700)))}}button.success[data-v-646b7a90]:focus{--tw-ring-color:var(--color-success,rgb(var(--success-color)))}button.error[data-v-646b7a90]{background-color:var(--color-error,rgb(var(--error-color)));color:var(--color-error-50,rgb(var(--error-color-50)))}@media (hover:hover){button.error[data-v-646b7a90]:hover{background-color:var(--color-error-600,rgb(var(--error-color-600)))}}button.error[data-v-646b7a90]:focus{--tw-ring-color:var(--color-error-600,rgb(var(--error-color-600)))}button[data-v-646b7a90]:disabled{background-color:var(--color-slate-300,oklch(86.9% .022 252.894));color:var(--color-slate-800,oklch(27.9% .041 260.031))}@media (hover:hover){button[data-v-646b7a90]:disabled:hover{background-color:var(--color-slate-300,oklch(86.9% .022 252.894))}}button[data-v-646b7a90]:disabled:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
package/dist/vxvue.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useSlots as Le, ref as k, computed as I, onBeforeUpdate as Te, createElementBlock as m, openBlock as d, Fragment as
|
|
2
|
-
const
|
|
1
|
+
import { useSlots as Le, ref as k, computed as I, onBeforeUpdate as Te, createElementBlock as m, openBlock as d, Fragment as E, renderList as Y, createBlock as H, resolveDynamicComponent as me, createElementVNode as c, useAttrs as K, normalizeClass as S, unref as L, renderSlot as T, Transition as Ve, withCtx as ee, toValue as N, watch as X, getCurrentScope as ze, onScopeDispose as Pe, mergeModels as Z, useModel as te, onUpdated as Be, createVNode as _, mergeProps as R, withKeys as re, withModifiers as j, createCommentVNode as B, toDisplayString as P, createTextVNode as Q, nextTick as be, withDirectives as le, vShow as fe, vModelText as Ie, onMounted as xe, vModelSelect as Oe, vModelCheckbox as Ee, normalizeStyle as Se, vModelDynamic as Fe, resolveComponent as Ne, createSlots as _e, toHandlers as ce } from "vue";
|
|
2
|
+
const Ml = {
|
|
3
3
|
__name: "Accordion",
|
|
4
4
|
props: { activeIndex: { type: [Number, Array], default: null } },
|
|
5
5
|
emits: ["update:activeIndex"],
|
|
@@ -25,14 +25,14 @@ const Cl = {
|
|
|
25
25
|
}
|
|
26
26
|
i(f);
|
|
27
27
|
};
|
|
28
|
-
return Te(() => s.value = []), (f, b) => (d(!0), m(
|
|
28
|
+
return Te(() => s.value = []), (f, b) => (d(!0), m(E, null, Y(r.value, (w, g) => (d(), H(me(w), {
|
|
29
29
|
key: g,
|
|
30
30
|
ref_for: !0,
|
|
31
31
|
ref: v,
|
|
32
32
|
show: Array.isArray(e.activeIndex) ? e.activeIndex?.includes(g) : e.activeIndex === g,
|
|
33
|
-
onSelect: (
|
|
34
|
-
onKeydown: (
|
|
35
|
-
onKeyup: (
|
|
33
|
+
onSelect: (C) => o(g),
|
|
34
|
+
onKeydown: (C) => n(g),
|
|
35
|
+
onKeyup: (C) => i(g)
|
|
36
36
|
}, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]))), 128));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
@@ -171,7 +171,7 @@ function ye(e, u) {
|
|
|
171
171
|
})
|
|
172
172
|
]);
|
|
173
173
|
}
|
|
174
|
-
const We = ["id", "disabled", "aria-expanded", "aria-controls"], qe = ["id", "aria-labelledby"], Ke = { class: "overflow-hidden rounded-b" },
|
|
174
|
+
const We = ["id", "disabled", "aria-expanded", "aria-controls"], qe = ["id", "aria-labelledby"], Ke = { class: "overflow-hidden rounded-b" }, Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
175
175
|
__name: "AccordionPanel",
|
|
176
176
|
props: { show: Boolean, disabled: Boolean },
|
|
177
177
|
emits: ["select", "keyup", "keydown"],
|
|
@@ -222,7 +222,7 @@ const We = ["id", "disabled", "aria-expanded", "aria-controls"], qe = ["id", "ar
|
|
|
222
222
|
], 10, qe)
|
|
223
223
|
]));
|
|
224
224
|
}
|
|
225
|
-
}), Xe = ["viewBox"], Ge = ["cx", "cy", "r", "stroke-width"], Je = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"],
|
|
225
|
+
}), Xe = ["viewBox"], Ge = ["cx", "cy", "r", "stroke-width"], Je = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], Me = {
|
|
226
226
|
__name: "Spinner",
|
|
227
227
|
props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
|
|
228
228
|
setup(e) {
|
|
@@ -253,7 +253,7 @@ const We = ["id", "disabled", "aria-expanded", "aria-controls"], qe = ["id", "ar
|
|
|
253
253
|
}, null, 8, Je)
|
|
254
254
|
], 8, Xe));
|
|
255
255
|
}
|
|
256
|
-
},
|
|
256
|
+
}, Ce = (e, u) => {
|
|
257
257
|
const t = e.__vccOpts || e;
|
|
258
258
|
for (const [a, l] of u)
|
|
259
259
|
t[a] = l;
|
|
@@ -269,7 +269,7 @@ const We = ["id", "disabled", "aria-expanded", "aria-controls"], qe = ["id", "ar
|
|
|
269
269
|
_: 3
|
|
270
270
|
}, 8, ["name"]));
|
|
271
271
|
}
|
|
272
|
-
}, de = /* @__PURE__ */
|
|
272
|
+
}, de = /* @__PURE__ */ Ce(Qe, [["__scopeId", "data-v-f6b1631e"]]);
|
|
273
273
|
function et(e) {
|
|
274
274
|
return ze() ? (Pe(e), !0) : !1;
|
|
275
275
|
}
|
|
@@ -295,9 +295,9 @@ function se(e) {
|
|
|
295
295
|
}
|
|
296
296
|
function ke(e, u, t = {}) {
|
|
297
297
|
var a;
|
|
298
|
-
const l = e.getFullYear(), s = e.getMonth(), v = e.getDate(), r = e.getHours(), o = e.getMinutes(), n = e.getSeconds(), i = e.getMilliseconds(), f = e.getDay(), b = (a = t.customMeridiem) != null ? a : ot, w = (
|
|
298
|
+
const l = e.getFullYear(), s = e.getMonth(), v = e.getDate(), r = e.getHours(), o = e.getMinutes(), n = e.getSeconds(), i = e.getMilliseconds(), f = e.getDay(), b = (a = t.customMeridiem) != null ? a : ot, w = (C) => {
|
|
299
299
|
var y;
|
|
300
|
-
return (y =
|
|
300
|
+
return (y = C.split(" ")[1]) != null ? y : "";
|
|
301
301
|
}, g = {
|
|
302
302
|
Yo: () => se(l),
|
|
303
303
|
YY: () => String(l).slice(-2),
|
|
@@ -305,8 +305,8 @@ function ke(e, u, t = {}) {
|
|
|
305
305
|
M: () => s + 1,
|
|
306
306
|
Mo: () => se(s + 1),
|
|
307
307
|
MM: () => `${s + 1}`.padStart(2, "0"),
|
|
308
|
-
MMM: () => e.toLocaleDateString(
|
|
309
|
-
MMMM: () => e.toLocaleDateString(
|
|
308
|
+
MMM: () => e.toLocaleDateString(N(t.locales), { month: "short" }),
|
|
309
|
+
MMMM: () => e.toLocaleDateString(N(t.locales), { month: "long" }),
|
|
310
310
|
D: () => String(v),
|
|
311
311
|
Do: () => se(v),
|
|
312
312
|
DD: () => `${v}`.padStart(2, "0"),
|
|
@@ -324,21 +324,21 @@ function ke(e, u, t = {}) {
|
|
|
324
324
|
ss: () => `${n}`.padStart(2, "0"),
|
|
325
325
|
SSS: () => `${i}`.padStart(3, "0"),
|
|
326
326
|
d: () => f,
|
|
327
|
-
dd: () => e.toLocaleDateString(
|
|
328
|
-
ddd: () => e.toLocaleDateString(
|
|
329
|
-
dddd: () => e.toLocaleDateString(
|
|
327
|
+
dd: () => e.toLocaleDateString(N(t.locales), { weekday: "narrow" }),
|
|
328
|
+
ddd: () => e.toLocaleDateString(N(t.locales), { weekday: "short" }),
|
|
329
|
+
dddd: () => e.toLocaleDateString(N(t.locales), { weekday: "long" }),
|
|
330
330
|
A: () => b(r, o),
|
|
331
331
|
AA: () => b(r, o, !1, !0),
|
|
332
332
|
a: () => b(r, o, !0),
|
|
333
333
|
aa: () => b(r, o, !0, !0),
|
|
334
|
-
z: () => w(e.toLocaleDateString(
|
|
335
|
-
zz: () => w(e.toLocaleDateString(
|
|
336
|
-
zzz: () => w(e.toLocaleDateString(
|
|
337
|
-
zzzz: () => w(e.toLocaleDateString(
|
|
334
|
+
z: () => w(e.toLocaleDateString(N(t.locales), { timeZoneName: "shortOffset" })),
|
|
335
|
+
zz: () => w(e.toLocaleDateString(N(t.locales), { timeZoneName: "shortOffset" })),
|
|
336
|
+
zzz: () => w(e.toLocaleDateString(N(t.locales), { timeZoneName: "shortOffset" })),
|
|
337
|
+
zzzz: () => w(e.toLocaleDateString(N(t.locales), { timeZoneName: "longOffset" }))
|
|
338
338
|
};
|
|
339
|
-
return u.replace(nt, (
|
|
340
|
-
var
|
|
341
|
-
return (V = y ?? ((
|
|
339
|
+
return u.replace(nt, (C, y) => {
|
|
340
|
+
var M, V;
|
|
341
|
+
return (V = y ?? ((M = g[C]) == null ? void 0 : M.call(g))) != null ? V : C;
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
function rt(e, u, t) {
|
|
@@ -354,24 +354,24 @@ function rt(e, u, t) {
|
|
|
354
354
|
const Ae = De ? window : void 0;
|
|
355
355
|
function ue(e) {
|
|
356
356
|
var u;
|
|
357
|
-
const t =
|
|
357
|
+
const t = N(e);
|
|
358
358
|
return (u = t?.$el) != null ? u : t;
|
|
359
359
|
}
|
|
360
360
|
function ge(...e) {
|
|
361
361
|
const u = [], t = () => {
|
|
362
362
|
u.forEach((r) => r()), u.length = 0;
|
|
363
363
|
}, a = (r, o, n, i) => (r.addEventListener(o, n, i), () => r.removeEventListener(o, n, i)), l = I(() => {
|
|
364
|
-
const r = pe(
|
|
364
|
+
const r = pe(N(e[0])).filter((o) => o != null);
|
|
365
365
|
return r.every((o) => typeof o != "string") ? r : void 0;
|
|
366
366
|
}), s = rt(
|
|
367
367
|
() => {
|
|
368
368
|
var r, o;
|
|
369
369
|
return [
|
|
370
370
|
(o = (r = l.value) == null ? void 0 : r.map((n) => ue(n))) != null ? o : [Ae].filter((n) => n != null),
|
|
371
|
-
pe(
|
|
371
|
+
pe(N(l.value ? e[1] : e[0])),
|
|
372
372
|
pe(L(l.value ? e[2] : e[1])),
|
|
373
373
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
374
|
-
|
|
374
|
+
N(l.value ? e[3] : e[2])
|
|
375
375
|
];
|
|
376
376
|
},
|
|
377
377
|
([r, o, n, i]) => {
|
|
@@ -400,28 +400,28 @@ function we(e, u, t = {}) {
|
|
|
400
400
|
if (at && !$e) {
|
|
401
401
|
$e = !0;
|
|
402
402
|
const y = { passive: !0 };
|
|
403
|
-
Array.from(a.document.body.children).forEach((
|
|
403
|
+
Array.from(a.document.body.children).forEach((M) => M.addEventListener("click", ne, y)), a.document.documentElement.addEventListener("click", ne, y);
|
|
404
404
|
}
|
|
405
405
|
let o = !0;
|
|
406
|
-
const n = (y) =>
|
|
407
|
-
if (typeof
|
|
408
|
-
return Array.from(a.document.querySelectorAll(
|
|
406
|
+
const n = (y) => N(l).some((M) => {
|
|
407
|
+
if (typeof M == "string")
|
|
408
|
+
return Array.from(a.document.querySelectorAll(M)).some((V) => V === y.target || y.composedPath().includes(V));
|
|
409
409
|
{
|
|
410
|
-
const V = ue(
|
|
410
|
+
const V = ue(M);
|
|
411
411
|
return V && (y.target === V || y.composedPath().includes(V));
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
function i(y) {
|
|
415
|
-
const
|
|
416
|
-
return
|
|
415
|
+
const M = N(y);
|
|
416
|
+
return M && M.$.subTree.shapeFlag === 16;
|
|
417
417
|
}
|
|
418
|
-
function f(y,
|
|
419
|
-
const V =
|
|
420
|
-
return
|
|
418
|
+
function f(y, M) {
|
|
419
|
+
const V = N(y), F = V.$.subTree && V.$.subTree.children;
|
|
420
|
+
return F == null || !Array.isArray(F) ? !1 : F.some((G) => G.el === M.target || M.composedPath().includes(G.el));
|
|
421
421
|
}
|
|
422
422
|
const b = (y) => {
|
|
423
|
-
const
|
|
424
|
-
if (y.target != null && !(!(
|
|
423
|
+
const M = ue(e);
|
|
424
|
+
if (y.target != null && !(!(M instanceof Element) && i(e) && f(e, y)) && !(!M || M === y.target || y.composedPath().includes(M))) {
|
|
425
425
|
if ("detail" in y && y.detail === 0 && (o = !n(y)), !o) {
|
|
426
426
|
o = !0;
|
|
427
427
|
return;
|
|
@@ -437,26 +437,26 @@ function we(e, u, t = {}) {
|
|
|
437
437
|
}, 0), b(y));
|
|
438
438
|
}, { passive: !0, capture: s }),
|
|
439
439
|
ge(a, "pointerdown", (y) => {
|
|
440
|
-
const
|
|
441
|
-
o = !n(y) && !!(
|
|
440
|
+
const M = ue(e);
|
|
441
|
+
o = !n(y) && !!(M && !y.composedPath().includes(M));
|
|
442
442
|
}, { passive: !0 }),
|
|
443
443
|
v && ge(a, "blur", (y) => {
|
|
444
444
|
setTimeout(() => {
|
|
445
|
-
var
|
|
445
|
+
var M;
|
|
446
446
|
const V = ue(e);
|
|
447
|
-
((
|
|
447
|
+
((M = a.document.activeElement) == null ? void 0 : M.tagName) === "IFRAME" && !V?.contains(a.document.activeElement) && u(y);
|
|
448
448
|
}, 0);
|
|
449
449
|
}, { passive: !0 })
|
|
450
|
-
].filter(Boolean),
|
|
450
|
+
].filter(Boolean), C = () => g.forEach((y) => y());
|
|
451
451
|
return r ? {
|
|
452
|
-
stop:
|
|
452
|
+
stop: C,
|
|
453
453
|
cancel: () => {
|
|
454
454
|
o = !1;
|
|
455
455
|
},
|
|
456
456
|
trigger: (y) => {
|
|
457
457
|
o = !0, b(y), o = !1;
|
|
458
458
|
}
|
|
459
|
-
} :
|
|
459
|
+
} : C;
|
|
460
460
|
}
|
|
461
461
|
const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, dt = ["data-result-index"], Dl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
462
462
|
__name: "Autocomplete",
|
|
@@ -475,14 +475,14 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
475
475
|
const t = u, a = e, l = te(e, "modelValue"), s = K(), r = (/* @__PURE__ */ (() => {
|
|
476
476
|
let A = 0;
|
|
477
477
|
return (z) => (z || "") + ++A;
|
|
478
|
-
})())((s.id || "autocomplete") + "-"), o = k([]), n = k(-1), i = k(0), f = k(!1), b = k(!1), w = k("top-0 translate-y-12"), g = k(!0),
|
|
478
|
+
})())((s.id || "autocomplete") + "-"), o = k([]), n = k(-1), i = k(0), f = k(!1), b = k(!1), w = k("top-0 translate-y-12"), g = k(!0), C = k(null), y = k(null), M = k(null), V = I(
|
|
479
479
|
() => o.value.map((A, z) => ({
|
|
480
480
|
id: (s.id || "autocomplete") + "-item-" + z,
|
|
481
481
|
class: [a.resultItemClass, { "bg-vxvue-700 text-white": n.value === z }],
|
|
482
482
|
role: "option",
|
|
483
483
|
...n.value === z ? { "aria-selected": "true" } : {}
|
|
484
484
|
}))
|
|
485
|
-
),
|
|
485
|
+
), F = I(() => ({
|
|
486
486
|
role: "combobox",
|
|
487
487
|
autocomplete: "off",
|
|
488
488
|
autocapitalize: "off",
|
|
@@ -516,7 +516,7 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
516
516
|
l.value = A, $(A);
|
|
517
517
|
}, h = (A) => $(A.target.value), x = () => {
|
|
518
518
|
q(), t("blur-sm");
|
|
519
|
-
},
|
|
519
|
+
}, O = () => {
|
|
520
520
|
const A = o.value.length;
|
|
521
521
|
n.value = ((n.value - 1) % A + A) % A;
|
|
522
522
|
}, U = (A) => {
|
|
@@ -529,19 +529,19 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
529
529
|
const z = A.target.closest("[data-result-index]");
|
|
530
530
|
z && (n.value = parseInt(z.dataset.resultIndex, 10), t("submit", D()));
|
|
531
531
|
};
|
|
532
|
-
return we(
|
|
533
|
-
if (
|
|
534
|
-
const A = y.value.getBoundingClientRect(), z =
|
|
532
|
+
return we(M, q), Be(() => {
|
|
533
|
+
if (C.value) {
|
|
534
|
+
const A = y.value.getBoundingClientRect(), z = C.value.getBoundingClientRect();
|
|
535
535
|
g.value && o.value.length && (g.value = !1, w.value = A.bottom + z.height > window.innerHeight && window.innerHeight - A.bottom < A.top && window.pageYOffset + A.top - z.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
|
|
536
|
-
const J =
|
|
536
|
+
const J = C.value.querySelector('[data-result-index="' + n.value + '"]');
|
|
537
537
|
if (J) {
|
|
538
538
|
let W = J.getBoundingClientRect();
|
|
539
|
-
W.top < z.top ?
|
|
539
|
+
W.top < z.top ? C.value.scrollTop -= z.top - W.top : W.bottom > z.bottom && (C.value.scrollTop += W.bottom - z.bottom);
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
}), (A, z) => (d(), m("div", {
|
|
543
543
|
ref_key: "container",
|
|
544
|
-
ref:
|
|
544
|
+
ref: M,
|
|
545
545
|
class: S(["inline-block relative", A.$attrs.class])
|
|
546
546
|
}, [
|
|
547
547
|
c("input", R({
|
|
@@ -549,20 +549,20 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
549
549
|
ref: y,
|
|
550
550
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
551
551
|
value: l.value
|
|
552
|
-
},
|
|
552
|
+
}, F.value, {
|
|
553
553
|
onInput: z[0] || (z[0] = (J) => p(J.target.value)),
|
|
554
554
|
onKeydown: [
|
|
555
555
|
re(ae, ["enter"]),
|
|
556
556
|
re(oe, ["esc"]),
|
|
557
557
|
re(D, ["tab"]),
|
|
558
|
-
re(j(
|
|
558
|
+
re(j(O, ["prevent"]), ["up"]),
|
|
559
559
|
re(j(U, ["prevent"]), ["down"])
|
|
560
560
|
],
|
|
561
561
|
onFocus: h,
|
|
562
562
|
onBlur: x
|
|
563
563
|
}), null, 16, ut),
|
|
564
564
|
c("span", it, [
|
|
565
|
-
b.value ? (d(), H(
|
|
565
|
+
b.value ? (d(), H(Me, {
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "size-5"
|
|
568
568
|
})) : B("", !0)
|
|
@@ -572,13 +572,13 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
572
572
|
o.value.length ? (d(), m("div", R({
|
|
573
573
|
key: 0,
|
|
574
574
|
ref_key: "resultList",
|
|
575
|
-
ref:
|
|
575
|
+
ref: C
|
|
576
576
|
}, G.value, {
|
|
577
577
|
onClick: he,
|
|
578
578
|
onMousedown: z[1] || (z[1] = j(() => {
|
|
579
579
|
}, ["prevent"]))
|
|
580
580
|
}), [
|
|
581
|
-
(d(!0), m(
|
|
581
|
+
(d(!0), m(E, null, Y(o.value, (J, W) => (d(), m("div", { "data-result-index": W }, [
|
|
582
582
|
T(A.$slots, "result", {
|
|
583
583
|
result: J,
|
|
584
584
|
props: V.value[W]
|
|
@@ -624,9 +624,9 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
624
624
|
const o = I(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), n = k(null), i = (b, w) => {
|
|
625
625
|
s.value = !1, b.value !== void 0 ? b.value ? v() : r() : w ? r() : v();
|
|
626
626
|
};
|
|
627
|
-
return u({ open: (b, w) => (a.value = b, l.value = w, s.value = !0, be(() => n.value.firstElementChild.focus()), new Promise((g,
|
|
628
|
-
v = g, r =
|
|
629
|
-
})) }), (b, w) => (d(), m(
|
|
627
|
+
return u({ open: (b, w) => (a.value = b, l.value = w, s.value = !0, be(() => n.value.firstElementChild.focus()), new Promise((g, C) => {
|
|
628
|
+
v = g, r = C;
|
|
629
|
+
})) }), (b, w) => (d(), m(E, null, [
|
|
630
630
|
s.value ? (d(), m("div", ct)) : B("", !0),
|
|
631
631
|
_(de, { name: "appear" }, {
|
|
632
632
|
default: ee(() => [
|
|
@@ -662,10 +662,10 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
662
662
|
ref: n,
|
|
663
663
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6"
|
|
664
664
|
}, [
|
|
665
|
-
(d(!0), m(
|
|
665
|
+
(d(!0), m(E, null, Y(o.value, (g, C) => (d(), m("button", {
|
|
666
666
|
key: g.label,
|
|
667
667
|
class: S([e.buttonClass, g.class]),
|
|
668
|
-
onClick: j((y) => i(g,
|
|
668
|
+
onClick: j((y) => i(g, C), ["prevent"])
|
|
669
669
|
}, P(g.label), 11, yt))), 128))
|
|
670
670
|
], 512)
|
|
671
671
|
])
|
|
@@ -680,7 +680,7 @@ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-
|
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
682
|
function wt(e, u) {
|
|
683
|
-
const t = k(!1), a =
|
|
683
|
+
const t = k(!1), a = N(u);
|
|
684
684
|
let l, s = a.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), v = [];
|
|
685
685
|
if ((l = a.match(/\bd\b/gi)) && l.length === 1)
|
|
686
686
|
s = s.replace("d", "(\\d{1,2})");
|
|
@@ -698,7 +698,7 @@ function wt(e, u) {
|
|
|
698
698
|
s = s.replace("yyyy", "(\\d{4})");
|
|
699
699
|
else
|
|
700
700
|
return { date: t };
|
|
701
|
-
if (v.push({ srcPos: a.toLowerCase().indexOf("y"), destPos: 0 }), !(l =
|
|
701
|
+
if (v.push({ srcPos: a.toLowerCase().indexOf("y"), destPos: 0 }), !(l = N(e).match(s)))
|
|
702
702
|
return { date: t };
|
|
703
703
|
l.shift(), v.sort((i, f) => i.srcPos < f.srcPos ? -1 : 1);
|
|
704
704
|
let r = [], o, n;
|
|
@@ -769,7 +769,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
769
769
|
T(o.$slots, "default")
|
|
770
770
|
], 2));
|
|
771
771
|
}
|
|
772
|
-
}),
|
|
772
|
+
}), Mt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, Ct = { class: "flex justify-between w-1/2" }, Dt = { class: "flex justify-between w-1/2" }, At = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, Lt = ["disabled", "onClick"], Tt = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, Vt = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, zt = ["onClick"], Ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
773
773
|
__name: "Datepicker",
|
|
774
774
|
props: /* @__PURE__ */ Z({
|
|
775
775
|
shownMonth: Date,
|
|
@@ -794,40 +794,40 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
794
794
|
const t = e, a = te(e, "modelValue"), l = u, s = (() => {
|
|
795
795
|
const p = /* @__PURE__ */ new Date();
|
|
796
796
|
return new Date(p.getFullYear(), p.getMonth(), p.getDate());
|
|
797
|
-
})(), v = k(null), r = k([]), o = k(!1), n = k("days"), i = k(0), f = k({ horiz: "left-0", vert: "top-0" }), b = k(null), w = k(null), g = k(null),
|
|
798
|
-
const p = [], h = v.value.getFullYear(), x = v.value.getMonth(),
|
|
799
|
-
for (let ae = -U, he =
|
|
797
|
+
})(), v = k(null), r = k([]), o = k(!1), n = k("days"), i = k(0), f = k({ horiz: "left-0", vert: "top-0" }), b = k(null), w = k(null), g = k(null), C = I(() => t.hasInput && t.maxNumberOfValues === 1), y = I(() => {
|
|
798
|
+
const p = [], h = v.value.getFullYear(), x = v.value.getMonth(), O = new Date(h, x + 1, 0), U = new Date(h, x, 0).getDay() + 1 - t.startOfWeekIndex, oe = (6 + t.startOfWeekIndex - O.getDay()) % 7;
|
|
799
|
+
for (let ae = -U, he = O.getDate() + oe; ae < he; ++ae)
|
|
800
800
|
p.push(new Date(h, x, ae + 1));
|
|
801
801
|
return p;
|
|
802
|
-
}),
|
|
802
|
+
}), M = I(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames), V = (p) => {
|
|
803
803
|
v.value = new Date(v.value.getFullYear(), p, 1), l("month-change", v.value);
|
|
804
|
-
},
|
|
804
|
+
}, F = (p) => {
|
|
805
805
|
v.value = new Date(p, v.value.getMonth(), 1), l("year-change", v.value);
|
|
806
806
|
}, G = (p) => a.value = p, q = (p) => {
|
|
807
807
|
if (o.value = !1, t.maxNumberOfValues === 1)
|
|
808
808
|
a.value = p;
|
|
809
809
|
else {
|
|
810
810
|
const h = r.value;
|
|
811
|
-
let x = h.findIndex((
|
|
811
|
+
let x = h.findIndex((O) => O.getTime() === p.getTime());
|
|
812
812
|
x !== -1 ? h.splice(x, 1) : h.length < t.maxNumberOfValues && h.push(p), a.value = h;
|
|
813
813
|
}
|
|
814
814
|
}, $ = (p) => r.value.find((h) => h?.getTime() === p.getTime()), D = (p) => {
|
|
815
|
-
const h = p.getMonth() !== v.value.getMonth(), x = $(p),
|
|
815
|
+
const h = p.getMonth() !== v.value.getMonth(), x = $(p), O = p.getTime() === s.getTime(), U = t.validFrom && t.validFrom > p || t.validUntil && t.validUntil < p, oe = !x && t.maxNumberOfValues > 1 && r.value.length === t.maxNumberOfValues, ae = t.highlightRange && p > Math.min(...r.value) && p < Math.max(...r.value);
|
|
816
816
|
return {
|
|
817
817
|
"cursor-not-allowed": U || oe,
|
|
818
|
-
"text-vxvue-700": !U && !h && !
|
|
818
|
+
"text-vxvue-700": !U && !h && !O && !x,
|
|
819
819
|
"text-error": U && !h,
|
|
820
|
-
"text-gray-400": h && !
|
|
821
|
-
"bg-vxvue-alt-300 font-bold":
|
|
820
|
+
"text-gray-400": h && !O && !x,
|
|
821
|
+
"bg-vxvue-alt-300 font-bold": O && !x,
|
|
822
822
|
"bg-vxvue-700 text-white": x,
|
|
823
823
|
"hover:ring-2 hover:ring-vxvue": !U,
|
|
824
|
-
"bg-vxvue-100/50": ae && !
|
|
824
|
+
"bg-vxvue-100/50": ae && !O && !x
|
|
825
825
|
};
|
|
826
826
|
};
|
|
827
827
|
return we(w, () => {
|
|
828
828
|
o.value = !1, n.value = "days";
|
|
829
829
|
}, { ignore: [g] }), xe(() => g.value = b.value?.$refs.toggleButton), X(o, (p) => {
|
|
830
|
-
p &&
|
|
830
|
+
p && C.value && be(() => {
|
|
831
831
|
const h = b.value.$el.getBoundingClientRect(), x = w.value.getBoundingClientRect();
|
|
832
832
|
f.value.horiz = h.right - x.width < 0 ? "left-0" : "right-0", f.value.vert = h.bottom + x.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
|
|
833
833
|
});
|
|
@@ -835,9 +835,9 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
835
835
|
if (p)
|
|
836
836
|
if (Array.isArray(p)) {
|
|
837
837
|
const h = [], x = r.value;
|
|
838
|
-
p.forEach((
|
|
839
|
-
|
|
840
|
-
}), (h.length !== x.length || ![.../* @__PURE__ */ new Set([...h, ...x])].every((
|
|
838
|
+
p.forEach((O) => {
|
|
839
|
+
O && h.push(new Date(O.getFullYear(), O.getMonth(), O.getDate()));
|
|
840
|
+
}), (h.length !== x.length || ![.../* @__PURE__ */ new Set([...h, ...x])].every((O) => h.filter((U) => U.getTime() === O.getTime()).length === x.filter((U) => U.getTime() === O.getTime()).length)) && (r.value = h, v.value = new Date((h[0] || s).getTime()), v.value.setDate(1));
|
|
841
841
|
} else
|
|
842
842
|
r.value = [new Date(p.getFullYear(), p.getMonth(), p.getDate())], v.value = new Date(p.getFullYear(), p.getMonth(), 1);
|
|
843
843
|
else
|
|
@@ -847,7 +847,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
847
847
|
}, { immediate: !0 }), (p, h) => (d(), m("div", {
|
|
848
848
|
class: S(["relative", p.$attrs.class])
|
|
849
849
|
}, [
|
|
850
|
-
|
|
850
|
+
C.value ? (d(), H(St, R({ key: 0 }, p.$attrs, {
|
|
851
851
|
ref_key: "input",
|
|
852
852
|
ref: b,
|
|
853
853
|
"model-value": r.value[0],
|
|
@@ -871,13 +871,13 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
871
871
|
f.value.horiz,
|
|
872
872
|
f.value.vert,
|
|
873
873
|
{
|
|
874
|
-
absolute:
|
|
874
|
+
absolute: C.value
|
|
875
875
|
}
|
|
876
876
|
])
|
|
877
877
|
}, [
|
|
878
|
-
n.value === "days" ? (d(), m(
|
|
879
|
-
c("div",
|
|
880
|
-
c("div",
|
|
878
|
+
n.value === "days" ? (d(), m(E, { key: 0 }, [
|
|
879
|
+
c("div", Mt, [
|
|
880
|
+
c("div", Ct, [
|
|
881
881
|
c("button", {
|
|
882
882
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
883
883
|
onClick: h[1] || (h[1] = j((x) => V(v.value.getMonth() - 1), ["stop"]))
|
|
@@ -895,7 +895,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
895
895
|
c("div", Dt, [
|
|
896
896
|
c("button", {
|
|
897
897
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
898
|
-
onClick: h[3] || (h[3] = j((x) =>
|
|
898
|
+
onClick: h[3] || (h[3] = j((x) => F(v.value.getFullYear() - 1), ["stop"]))
|
|
899
899
|
}, [
|
|
900
900
|
_(L(ve), { class: "size-6" })
|
|
901
901
|
]),
|
|
@@ -907,26 +907,26 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
907
907
|
}, P(v.value.getFullYear()), 1),
|
|
908
908
|
c("button", {
|
|
909
909
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
910
|
-
onClick: h[5] || (h[5] = j((x) =>
|
|
910
|
+
onClick: h[5] || (h[5] = j((x) => F(v.value.getFullYear() + 1), ["stop"]))
|
|
911
911
|
}, [
|
|
912
912
|
_(L(ie), { class: "size-6" })
|
|
913
913
|
])
|
|
914
914
|
])
|
|
915
915
|
]),
|
|
916
916
|
c("div", At, [
|
|
917
|
-
(d(!0), m(
|
|
918
|
-
key:
|
|
917
|
+
(d(!0), m(E, null, Y(M.value, (x, O) => (d(), m("div", {
|
|
918
|
+
key: O,
|
|
919
919
|
class: "py-2 text-center bg-gray-200"
|
|
920
920
|
}, P(x), 1))), 128)),
|
|
921
|
-
(d(!0), m(
|
|
921
|
+
(d(!0), m(E, null, Y(y.value, (x) => (d(), m("button", {
|
|
922
922
|
key: x,
|
|
923
923
|
class: S(["py-2 rounded-xs block text-center", D(x)]),
|
|
924
924
|
disabled: e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x || e.maxNumberOfValues > 1 && r.value.length === e.maxNumberOfValues && !$(x),
|
|
925
|
-
onClick: j((
|
|
925
|
+
onClick: j((O) => q(x), ["stop"])
|
|
926
926
|
}, P(x.getDate()), 11, Lt))), 128))
|
|
927
927
|
])
|
|
928
928
|
], 64)) : B("", !0),
|
|
929
|
-
n.value === "years" ? (d(), m(
|
|
929
|
+
n.value === "years" ? (d(), m(E, { key: 1 }, [
|
|
930
930
|
c("div", Tt, [
|
|
931
931
|
c("button", {
|
|
932
932
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
@@ -943,14 +943,14 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
943
943
|
])
|
|
944
944
|
]),
|
|
945
945
|
c("div", Vt, [
|
|
946
|
-
(d(), m(
|
|
946
|
+
(d(), m(E, null, Y(10, (x) => c("div", {
|
|
947
947
|
key: x,
|
|
948
948
|
class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"
|
|
949
949
|
}, [
|
|
950
950
|
c("button", {
|
|
951
951
|
class: "py-2 px-3",
|
|
952
|
-
onClick: j((
|
|
953
|
-
|
|
952
|
+
onClick: j((O) => {
|
|
953
|
+
F(i.value + x - 1), n.value = "days";
|
|
954
954
|
}, ["stop"])
|
|
955
955
|
}, P(i.value + x - 1), 9, zt)
|
|
956
956
|
])), 64))
|
|
@@ -1008,7 +1008,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
1008
1008
|
value: null,
|
|
1009
1009
|
disabled: "",
|
|
1010
1010
|
hidden: ""
|
|
1011
|
-
},
|
|
1011
|
+
}, Ot = ["selected", "value"], Et = {
|
|
1012
1012
|
__name: "FormSelect",
|
|
1013
1013
|
props: /* @__PURE__ */ Z({
|
|
1014
1014
|
options: { type: Array, default: () => [] },
|
|
@@ -1025,16 +1025,16 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
1025
1025
|
class: "form-select"
|
|
1026
1026
|
}), [
|
|
1027
1027
|
e.placeholder ? (d(), m("option", It, P(e.placeholder), 1)) : B("", !0),
|
|
1028
|
-
(d(!0), m(
|
|
1028
|
+
(d(!0), m(E, null, Y(e.options, (l) => (d(), m("option", {
|
|
1029
1029
|
key: l.key !== void 0 ? l.key : l.label || l,
|
|
1030
1030
|
selected: (l.key !== void 0 ? l.key : l.label || l) === u.value,
|
|
1031
1031
|
value: l.key !== void 0 ? l.key : l.label || l
|
|
1032
|
-
}, P(l.label || l), 9,
|
|
1032
|
+
}, P(l.label || l), 9, Ot))), 128))
|
|
1033
1033
|
], 16)), [
|
|
1034
|
-
[
|
|
1034
|
+
[Oe, u.value]
|
|
1035
1035
|
]);
|
|
1036
1036
|
}
|
|
1037
|
-
},
|
|
1037
|
+
}, Ft = ["aria-checked", "aria-label"], Nt = ["d"], Vl = {
|
|
1038
1038
|
__name: "FormSwitch",
|
|
1039
1039
|
props: {
|
|
1040
1040
|
modelValue: {},
|
|
@@ -1079,7 +1079,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
1079
1079
|
c("path", {
|
|
1080
1080
|
"stroke-linecap": "round",
|
|
1081
1081
|
d: u.value ? "M12 18 V6" : "m18.5 12 c0 3.5 -3 6.5 -6.5 6.5 -3.5 0 -6.5 -3 -6.5 -6.5 0 -3.5 3 -6.5 6.5 -6.5 3.5 0 6.5 3 6.5 6.5z"
|
|
1082
|
-
}, null, 8,
|
|
1082
|
+
}, null, 8, Nt)
|
|
1083
1083
|
], 2))
|
|
1084
1084
|
])
|
|
1085
1085
|
], 2),
|
|
@@ -1090,9 +1090,9 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
1090
1090
|
value: "1",
|
|
1091
1091
|
type: "checkbox"
|
|
1092
1092
|
}), null, 16), [
|
|
1093
|
-
[
|
|
1093
|
+
[Ee, u.value]
|
|
1094
1094
|
])
|
|
1095
|
-
], 10,
|
|
1095
|
+
], 10, Ft),
|
|
1096
1096
|
T(l.$slots, "default")
|
|
1097
1097
|
], 2));
|
|
1098
1098
|
}
|
|
@@ -1137,7 +1137,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
1137
1137
|
c("div", Ut, P(e.title), 1)
|
|
1138
1138
|
]),
|
|
1139
1139
|
T(o.$slots, "default", {}, () => [
|
|
1140
|
-
(d(!0), m(
|
|
1140
|
+
(d(!0), m(E, null, Y(l.value, (i) => (d(), m("p", Wt, P(i), 1))), 256))
|
|
1141
1141
|
])
|
|
1142
1142
|
]),
|
|
1143
1143
|
c("div", qt, [
|
|
@@ -1190,7 +1190,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
1190
1190
|
emits: ["clicked-outside"],
|
|
1191
1191
|
setup(e, { emit: u }) {
|
|
1192
1192
|
const t = u, a = k(null);
|
|
1193
|
-
return we(a, () => t("clicked-outside")), (l, s) => (d(), m(
|
|
1193
|
+
return we(a, () => t("clicked-outside")), (l, s) => (d(), m(E, null, [
|
|
1194
1194
|
e.show ? (d(), m("div", Kt)) : B("", !0),
|
|
1195
1195
|
_(de, { name: "appear" }, {
|
|
1196
1196
|
default: ee(() => [
|
|
@@ -1269,7 +1269,7 @@ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */
|
|
|
1269
1269
|
], 10, el)) : B("", !0)
|
|
1270
1270
|
]),
|
|
1271
1271
|
c("div", tl, [
|
|
1272
|
-
(d(!0), m(
|
|
1272
|
+
(d(!0), m(E, null, Y(r.value, (b, w) => (d(), H(me(e.page !== "dots" ? "button" : "span"), {
|
|
1273
1273
|
key: w,
|
|
1274
1274
|
class: S([
|
|
1275
1275
|
{ "pointer-events-none": b === "dots" },
|
|
@@ -1360,7 +1360,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1360
1360
|
"onUpdate:modelValue": s[0] || (s[0] = (v) => u.value = v),
|
|
1361
1361
|
type: t.value ? "text" : "password"
|
|
1362
1362
|
}, a.value, { class: "block pr-12 w-full form-input peer" }), null, 16, ol), [
|
|
1363
|
-
[
|
|
1363
|
+
[Fe, u.value]
|
|
1364
1364
|
]),
|
|
1365
1365
|
c("button", {
|
|
1366
1366
|
class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
|
|
@@ -1381,7 +1381,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1381
1381
|
}), ul = { class: "flex items-center pb-1" }, il = {
|
|
1382
1382
|
key: 0,
|
|
1383
1383
|
class: "ml-6"
|
|
1384
|
-
},
|
|
1384
|
+
}, Ol = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1385
1385
|
__name: "SimpleTree",
|
|
1386
1386
|
props: /* @__PURE__ */ Z({ branch: { type: Object, default: () => ({}) } }, {
|
|
1387
1387
|
modelValue: { type: Object, default: null },
|
|
@@ -1393,7 +1393,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1393
1393
|
return xe(() => {
|
|
1394
1394
|
t.branch === l.value && a("expand", !0);
|
|
1395
1395
|
}), (v, r) => {
|
|
1396
|
-
const o =
|
|
1396
|
+
const o = Ne("simple-tree", !0);
|
|
1397
1397
|
return d(), m("div", {
|
|
1398
1398
|
class: S([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", v.$attrs.class])
|
|
1399
1399
|
}, [
|
|
@@ -1425,7 +1425,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1425
1425
|
]))
|
|
1426
1426
|
]),
|
|
1427
1427
|
e.branch.branches && e.branch.branches.length ? le((d(), m("div", il, [
|
|
1428
|
-
(d(!0), m(
|
|
1428
|
+
(d(!0), m(E, null, Y(e.branch.branches, (n) => (d(), H(o, {
|
|
1429
1429
|
key: n.id || n.key || null,
|
|
1430
1430
|
branch: n,
|
|
1431
1431
|
modelValue: l.value,
|
|
@@ -1447,7 +1447,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1447
1447
|
], 2);
|
|
1448
1448
|
};
|
|
1449
1449
|
}
|
|
1450
|
-
}),
|
|
1450
|
+
}), El = {
|
|
1451
1451
|
__name: "Sizable",
|
|
1452
1452
|
props: { vertical: Boolean },
|
|
1453
1453
|
emits: ["dragStart", "dragStop"],
|
|
@@ -1457,17 +1457,17 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1457
1457
|
const f = (g) => {
|
|
1458
1458
|
if (v) {
|
|
1459
1459
|
g.preventDefault();
|
|
1460
|
-
const { pageX:
|
|
1461
|
-
t.vertical ? l.value.style.height = Math.min(n.height - i.height - (o.y - n.y), Math.max(0, o.height + y - r.y)) + "px" : l.value.style.width = Math.min(n.width - i.width - (o.x - n.x), Math.max(0, o.width +
|
|
1460
|
+
const { pageX: C, pageY: y } = g.touches?.[0] ?? g;
|
|
1461
|
+
t.vertical ? l.value.style.height = Math.min(n.height - i.height - (o.y - n.y), Math.max(0, o.height + y - r.y)) + "px" : l.value.style.width = Math.min(n.width - i.width - (o.x - n.x), Math.max(0, o.width + C - r.x)) + "px";
|
|
1462
1462
|
}
|
|
1463
1463
|
}, b = (g) => {
|
|
1464
1464
|
g.preventDefault(), g.currentTarget.focus(), v = !0;
|
|
1465
|
-
const { pageX:
|
|
1466
|
-
r = { x:
|
|
1465
|
+
const { pageX: C, pageY: y } = g.touches?.[0] ?? g;
|
|
1466
|
+
r = { x: C, y }, i = s.value.getBoundingClientRect(), o = l.value.getBoundingClientRect(), n = l.value.parentElement.getBoundingClientRect(), g.type === "mousedown" ? (document.addEventListener("mousemove", f), document.addEventListener("mouseup", w)) : (document.addEventListener("touchmove", f), document.addEventListener("touchend", w)), a("dragStart");
|
|
1467
1467
|
}, w = (g) => {
|
|
1468
1468
|
v && (v = !1, g.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", w)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", w)), setTimeout(() => a("dragStop"), 0));
|
|
1469
1469
|
};
|
|
1470
|
-
return (g,
|
|
1470
|
+
return (g, C) => (d(), m("div", {
|
|
1471
1471
|
ref_key: "box",
|
|
1472
1472
|
ref: l,
|
|
1473
1473
|
class: "relative"
|
|
@@ -1491,7 +1491,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1491
1491
|
], 16)
|
|
1492
1492
|
], 512));
|
|
1493
1493
|
}
|
|
1494
|
-
}, dl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], cl = ["id"], vl = ["id", "aria-label"],
|
|
1494
|
+
}, dl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], cl = ["id"], vl = ["id", "aria-label"], Fl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1495
1495
|
__name: "Slider",
|
|
1496
1496
|
props: /* @__PURE__ */ Z({
|
|
1497
1497
|
min: { type: Number, default: 0 },
|
|
@@ -1527,18 +1527,18 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1527
1527
|
}), g = ($) => {
|
|
1528
1528
|
let D = parseFloat($.toFixed(10));
|
|
1529
1529
|
D = Math.min(t.max, Math.max(t.min, D)), a.value instanceof Array ? a.value[i.value] = D : a.value = D;
|
|
1530
|
-
},
|
|
1530
|
+
}, C = ($) => {
|
|
1531
1531
|
const { pageX: D, pageY: p } = $.touches ? $.touches[0] : $, h = t.vertical ? (-p + v.y) / r.h : (D - v.x) / r.w;
|
|
1532
1532
|
g(Math.floor((t.max - t.min) * h + t.min));
|
|
1533
1533
|
}, y = () => {
|
|
1534
1534
|
const { clientLeft: $, clientTop: D, scrollLeft: p, scrollTop: h } = document.documentElement, x = n.value.getBoundingClientRect();
|
|
1535
1535
|
v.x = x.left + p - $, v.y = x.bottom + h - D, r.w = n.value.offsetWidth, r.h = n.value.offsetHeight;
|
|
1536
|
-
},
|
|
1537
|
-
o && ($.preventDefault(),
|
|
1536
|
+
}, M = ($) => {
|
|
1537
|
+
o && ($.preventDefault(), C($));
|
|
1538
1538
|
}, V = ($) => {
|
|
1539
|
-
$.preventDefault(), $.currentTarget.focus(), y(), o = !0, $.type === "mousedown" ? (document.addEventListener("mousemove",
|
|
1540
|
-
},
|
|
1541
|
-
o && (o = !1, $.type === "mouseup" ? (document.removeEventListener("mousemove",
|
|
1539
|
+
$.preventDefault(), $.currentTarget.focus(), y(), o = !0, $.type === "mousedown" ? (document.addEventListener("mousemove", M), document.addEventListener("mouseup", F)) : (document.addEventListener("touchmove", M), document.addEventListener("touchend", F)), l("dragStart");
|
|
1540
|
+
}, F = ($) => {
|
|
1541
|
+
o && (o = !1, $.type === "mouseup" ? (document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", F)) : (document.removeEventListener("touchmove", M), document.removeEventListener("touchend", F)), setTimeout(() => l("dragStop"), 0));
|
|
1542
1542
|
}, G = ($) => {
|
|
1543
1543
|
$.keyCode >= 33 && $.keyCode <= 40 && $.preventDefault();
|
|
1544
1544
|
const D = a.value[i.value] ?? a.value;
|
|
@@ -1564,7 +1564,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1564
1564
|
g(t.max);
|
|
1565
1565
|
}
|
|
1566
1566
|
}, q = ($) => {
|
|
1567
|
-
y(),
|
|
1567
|
+
y(), C($);
|
|
1568
1568
|
};
|
|
1569
1569
|
return ($, D) => (d(), m("div", R({
|
|
1570
1570
|
ref_key: "track",
|
|
@@ -1584,7 +1584,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1584
1584
|
class: S(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1585
1585
|
style: Se(b.value)
|
|
1586
1586
|
}, null, 6)),
|
|
1587
|
-
a.value.length ? (d(!0), m(
|
|
1587
|
+
a.value.length ? (d(!0), m(E, { key: 2 }, Y(a.value, (p, h) => (d(), m("button", R({
|
|
1588
1588
|
id: h ? null : L(s).id,
|
|
1589
1589
|
style: e.vertical ? { bottom: f.value[h] + "%" } : { left: f.value[h] + "%" },
|
|
1590
1590
|
"aria-label": "slider-thumb-" + (h + 1)
|
|
@@ -1597,8 +1597,8 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1597
1597
|
mousedown: (x) => {
|
|
1598
1598
|
i.value = h, V(x);
|
|
1599
1599
|
},
|
|
1600
|
-
touchend:
|
|
1601
|
-
mouseup:
|
|
1600
|
+
touchend: F,
|
|
1601
|
+
mouseup: F
|
|
1602
1602
|
}, !0)), null, 16, vl))), 256)) : (d(), m("button", R({
|
|
1603
1603
|
key: 1,
|
|
1604
1604
|
id: L(s).id,
|
|
@@ -1613,12 +1613,12 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1613
1613
|
mousedown: (p) => {
|
|
1614
1614
|
i.value = 0, V(p);
|
|
1615
1615
|
},
|
|
1616
|
-
touchend:
|
|
1617
|
-
mouseup:
|
|
1616
|
+
touchend: F,
|
|
1617
|
+
mouseup: F
|
|
1618
1618
|
}, !0)), null, 16, cl))
|
|
1619
1619
|
], 16, dl));
|
|
1620
1620
|
}
|
|
1621
|
-
}), fl = ["data-active", "onClick"], ml = { class: "flex items-center space-x-1" }, hl = ["data-active"],
|
|
1621
|
+
}), fl = ["data-active", "onClick"], ml = { class: "flex items-center space-x-1" }, hl = ["data-active"], Nl = {
|
|
1622
1622
|
__name: "Sortable",
|
|
1623
1623
|
props: {
|
|
1624
1624
|
columns: {
|
|
@@ -1656,7 +1656,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1656
1656
|
class: S(e.headerClass)
|
|
1657
1657
|
}, [
|
|
1658
1658
|
c("tr", null, [
|
|
1659
|
-
(d(!0), m(
|
|
1659
|
+
(d(!0), m(E, null, Y(e.columns, (i) => (d(), m("th", {
|
|
1660
1660
|
key: i.prop,
|
|
1661
1661
|
scope: "col",
|
|
1662
1662
|
"data-active": l.value === i.prop ? "active" : null,
|
|
@@ -1686,11 +1686,11 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1686
1686
|
c("tbody", {
|
|
1687
1687
|
class: S(e.bodyClass)
|
|
1688
1688
|
}, [
|
|
1689
|
-
(d(!0), m(
|
|
1689
|
+
(d(!0), m(E, null, Y(v.value, (i) => (d(), m("tr", {
|
|
1690
1690
|
key: i[e.keyProperty],
|
|
1691
1691
|
class: S(i.cssClass)
|
|
1692
1692
|
}, [
|
|
1693
|
-
(d(!0), m(
|
|
1693
|
+
(d(!0), m(E, null, Y(e.columns, (f) => (d(), m("td", {
|
|
1694
1694
|
key: f.prop,
|
|
1695
1695
|
"data-active": l.value === f.prop ? "active" : null,
|
|
1696
1696
|
class: "overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis"
|
|
@@ -1722,13 +1722,13 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1722
1722
|
}, [
|
|
1723
1723
|
T(a.$slots, "default", {}, void 0, !0)
|
|
1724
1724
|
], 10, gl),
|
|
1725
|
-
e.busy ? (d(), H(
|
|
1725
|
+
e.busy ? (d(), H(Me, {
|
|
1726
1726
|
key: 0,
|
|
1727
1727
|
class: S(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
|
|
1728
1728
|
}, null, 8, ["class"])) : B("", !0)
|
|
1729
1729
|
]));
|
|
1730
1730
|
}
|
|
1731
|
-
}), _l = /* @__PURE__ */
|
|
1731
|
+
}), _l = /* @__PURE__ */ Ce(bl, [["__scopeId", "data-v-646b7a90"]]), xl = { class: "sm:hidden" }, yl = { class: "hidden sm:block" }, wl = { class: "border-b border-gray-200" }, kl = {
|
|
1732
1732
|
class: "flex -mb-px space-x-8",
|
|
1733
1733
|
"aria-label": "Tabs"
|
|
1734
1734
|
}, $l = ["aria-current", "onClick"], jl = {
|
|
@@ -1751,9 +1751,9 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1751
1751
|
const v = (r) => {
|
|
1752
1752
|
r.disabled || (l.value = r, a("update:activeIndex", t.items.indexOf(r)));
|
|
1753
1753
|
};
|
|
1754
|
-
return (r, o) => (d(), m(
|
|
1754
|
+
return (r, o) => (d(), m(E, null, [
|
|
1755
1755
|
c("div", xl, [
|
|
1756
|
-
_(
|
|
1756
|
+
_(Et, {
|
|
1757
1757
|
options: s.value,
|
|
1758
1758
|
"model-value": e.activeIndex,
|
|
1759
1759
|
class: "w-full",
|
|
@@ -1763,7 +1763,7 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1763
1763
|
c("div", yl, [
|
|
1764
1764
|
c("div", wl, [
|
|
1765
1765
|
c("nav", kl, [
|
|
1766
|
-
(d(!0), m(
|
|
1766
|
+
(d(!0), m(E, null, Y(e.items, (n) => (d(), m("a", {
|
|
1767
1767
|
key: n.name,
|
|
1768
1768
|
href: "#",
|
|
1769
1769
|
class: S([
|
|
@@ -1824,30 +1824,31 @@ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inh
|
|
|
1824
1824
|
}
|
|
1825
1825
|
},
|
|
1826
1826
|
updated: (e, u) => {
|
|
1827
|
-
const t = e.parentNode.querySelector("label")
|
|
1827
|
+
const t = e.parentNode.querySelector("label");
|
|
1828
|
+
if (!t) return;
|
|
1829
|
+
const a = e.getAttribute("placeholder")?.trim();
|
|
1828
1830
|
t.innerHTML = u.value?.label || a || t.innerHTML, a && e.setAttribute("placeholder", " "), u.value?.invalid ? (t.classList.add("text-error", "peer-focus:text-error"), t.classList.remove("peer-focus:text-blue-600")) : (t.classList.remove("text-error", "peer-focus:text-error"), t.classList.add("peer-focus:text-blue-600")), t.classList[e.getAttribute("required") !== null ? "add" : "remove"]("required");
|
|
1829
|
-
}
|
|
1830
|
-
beforeUnmount: (e) => e.parentNode.parentNode.removeChild(e.parentNode)
|
|
1831
|
+
}
|
|
1831
1832
|
};
|
|
1832
1833
|
export {
|
|
1833
|
-
|
|
1834
|
-
|
|
1834
|
+
Ml as Accordion,
|
|
1835
|
+
Cl as AccordionPanel,
|
|
1835
1836
|
Dl as Autocomplete,
|
|
1836
1837
|
Al as Confirm,
|
|
1837
1838
|
St as DateInput,
|
|
1838
1839
|
Ll as Datepicker,
|
|
1839
1840
|
Tl as FormFileButton,
|
|
1840
|
-
|
|
1841
|
+
Et as FormSelect,
|
|
1841
1842
|
Vl as FormSwitch,
|
|
1842
1843
|
zl as MessageToast,
|
|
1843
1844
|
Pl as Modal,
|
|
1844
1845
|
Bl as Pagination,
|
|
1845
1846
|
Il as PasswordInput,
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1847
|
+
Ol as SimpleTree,
|
|
1848
|
+
El as Sizable,
|
|
1849
|
+
Fl as Slider,
|
|
1850
|
+
Nl as Sortable,
|
|
1851
|
+
Me as Spinner,
|
|
1851
1852
|
_l as SubmitButton,
|
|
1852
1853
|
jl as Tabs,
|
|
1853
1854
|
Rl as VFloatingLabel,
|
package/dist/vxvue.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(v,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(v=typeof globalThis<"u"?globalThis:v||self,e(v.vxVue={},v.Vue))})(this,function(v,e){"use strict";const le={__name:"Accordion",props:{activeIndex:{type:[Number,Array],default:null}},emits:["update:activeIndex"],setup(t,{emit:c}){const l=t,o=c,a=e.useSlots(),n=e.ref([]),u=m=>n.value.push(m),i=e.computed(()=>a.default().reduce((m,g)=>((g.type.__name||g.type.name)==="AccordionPanel"&&m.push(g),m),[])),s=m=>{if(Array.isArray(l.activeIndex)){let g=[].concat(l.activeIndex),y=g.findIndex(h=>h===m);y===-1?o("update:activeIndex",[...g,m]):(g.splice(y,1),o("update:activeIndex",g))}else o("update:activeIndex",m===l.activeIndex?-1:m)},r=m=>{if(m=++m%i.value.length,!n.value[m].disabled){s(m),n.value[m].focus();return}r(m)},d=m=>{if(m=(m||i.value.length)-1,!n.value[m].disabled){s(m),n.value[m].focus();return}d(m)};return e.onBeforeUpdate(()=>n.value=[]),(m,g)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(y,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y),{key:h,ref_for:!0,ref:u,show:Array.isArray(t.activeIndex)?t.activeIndex?.includes(h):t.activeIndex===h,onSelect:B=>s(h),onKeydown:B=>r(h),onKeyup:B=>d(h)},null,40,["show","onSelect","onKeydown","onKeyup"]))),128))}};function ae(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z","clip-rule":"evenodd"})])}function oe(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z","clip-rule":"evenodd"})])}function Y(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z","clip-rule":"evenodd"})])}function I(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z","clip-rule":"evenodd"})])}function ne(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}function re(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z","clip-rule":"evenodd"})])}function se(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}function ie(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z","clip-rule":"evenodd"})])}function R(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}const ce=["id","disabled","aria-expanded","aria-controls"],de=["id","aria-labelledby"],ue={class:"overflow-hidden rounded-b"},me=Object.assign({inheritAttrs:!1},{__name:"AccordionPanel",props:{show:Boolean,disabled:Boolean},emits:["select","keyup","keydown"],setup(t,{expose:c,emit:l}){const o=l,a=t,n=e.useAttrs(),u=e.ref(null),i=Math.random().toString(20).substring(2,8),s=d=>{if(!a.disabled){const m=new Map([[40,"keydown"],[38,"keyup"]]).get(d.keyCode);m&&(o(m),d.preventDefault())}};return c({focus:()=>u.value.focus(),disabled:a.disabled}),(d,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{id:"ap-control-"+e.unref(i),ref_key:"btn",ref:u,class:e.normalizeClass(["flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",t.show?"rounded-t":"rounded-sm",t.disabled?"bg-slate-300 text-slate-700":"bg-vxvue hover:bg-vxvue-600 text-white",e.unref(n).class]),disabled:t.disabled,"aria-expanded":t.show,"aria-controls":"ap-"+e.unref(i),tabindex:"0",onClick:m[0]||(m[0]=g=>o("select")),onKeydown:s},[t.disabled?(e.openBlock(),e.createBlock(e.unref(R),{key:0,class:"size-5"})):(e.openBlock(),e.createBlock(e.unref(I),{key:1,class:e.normalizeClass(["size-5 transform-gpu transition-transform duration-300",{"rotate-90":t.show}])},null,8,["class"])),e.createElementVNode("span",null,[e.renderSlot(d.$slots,"header")])],42,ce),e.createElementVNode("div",{id:"ap-"+e.unref(i),class:e.normalizeClass(["grid transition-[grid-template-rows] duration-300 ease-in-out",t.show&&!t.disabled?"grid-rows-1":"grid-rows-[repeat(1,minmax(0,0fr))]"]),"aria-labelledby":"ap-control-"+e.unref(i)},[e.createElementVNode("div",ue,[e.renderSlot(d.$slots,"default")])],10,de)]))}}),fe=["viewBox"],pe=["cx","cy","r","stroke-width"],he=["cx","cy","r","stroke-width","stroke-dasharray"],H={__name:"Spinner",props:{radius:{type:Number,default:10},strokeWidth:{type:Number,default:4}},setup(t){const c=t,l=e.computed(()=>c.radius+c.strokeWidth/2),o=e.computed(()=>c.radius*2+c.strokeWidth),a=e.computed(()=>c.radius*Math.PI/1.5);return(n,u)=>(e.openBlock(),e.createElementBlock("svg",{class:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 "+o.value+" "+o.value,role:"progressbar"},[e.createElementVNode("circle",{class:"opacity-35",cx:l.value,cy:l.value,r:t.radius,stroke:"currentColor","stroke-width":t.strokeWidth},null,8,pe),e.createElementVNode("circle",{cx:l.value,cy:l.value,r:t.radius,stroke:"currentColor","stroke-width":t.strokeWidth,"stroke-dasharray":a.value+" "+t.radius*100,"stroke-linecap":"round"},null,8,he)],8,fe))}},K=(t,c)=>{const l=t.__vccOpts||t;for(const[o,a]of c)l[o]=a;return l},O=K({__name:"VxVueTransition",props:{name:{type:String,required:!0,validator:t=>["appear","vert-fade","fade"].includes(t)}},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(e.Transition,{name:t.name},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["name"]))}},[["__scopeId","data-v-f6b1631e"]]);function ge(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const X=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const be=Object.prototype.toString,ke=t=>be.call(t)==="[object Object]",F=()=>{},ye=xe();function xe(){var t,c;return X&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((c=window?.navigator)==null?void 0:c.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Z(t){return Array.isArray(t)?t:[t]}const we=/[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;function Be(t,c,l,o){let a=t<12?"AM":"PM";return o&&(a=a.split("").reduce((n,u)=>n+=`${u}.`,"")),l?a.toLowerCase():a}function T(t){const c=["th","st","nd","rd"],l=t%100;return t+(c[(l-20)%10]||c[l]||c[0])}function G(t,c,l={}){var o;const a=t.getFullYear(),n=t.getMonth(),u=t.getDate(),i=t.getHours(),s=t.getMinutes(),r=t.getSeconds(),d=t.getMilliseconds(),m=t.getDay(),g=(o=l.customMeridiem)!=null?o:Be,y=B=>{var k;return(k=B.split(" ")[1])!=null?k:""},h={Yo:()=>T(a),YY:()=>String(a).slice(-2),YYYY:()=>a,M:()=>n+1,Mo:()=>T(n+1),MM:()=>`${n+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(e.toValue(l.locales),{month:"short"}),MMMM:()=>t.toLocaleDateString(e.toValue(l.locales),{month:"long"}),D:()=>String(u),Do:()=>T(u),DD:()=>`${u}`.padStart(2,"0"),H:()=>String(i),Ho:()=>T(i),HH:()=>`${i}`.padStart(2,"0"),h:()=>`${i%12||12}`.padStart(1,"0"),ho:()=>T(i%12||12),hh:()=>`${i%12||12}`.padStart(2,"0"),m:()=>String(s),mo:()=>T(s),mm:()=>`${s}`.padStart(2,"0"),s:()=>String(r),so:()=>T(r),ss:()=>`${r}`.padStart(2,"0"),SSS:()=>`${d}`.padStart(3,"0"),d:()=>m,dd:()=>t.toLocaleDateString(e.toValue(l.locales),{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(e.toValue(l.locales),{weekday:"short"}),dddd:()=>t.toLocaleDateString(e.toValue(l.locales),{weekday:"long"}),A:()=>g(i,s),AA:()=>g(i,s,!1,!0),a:()=>g(i,s,!0),aa:()=>g(i,s,!0,!0),z:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"shortOffset"})),zz:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"shortOffset"})),zzz:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"shortOffset"})),zzzz:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"longOffset"}))};return c.replace(we,(B,k)=>{var w,S;return(S=k??((w=h[B])==null?void 0:w.call(h)))!=null?S:B})}function Ve(t,c,l){return e.watch(t,c,{...l,immediate:!0})}const J=X?window:void 0;function _(t){var c;const l=e.toValue(t);return(c=l?.$el)!=null?c:l}function U(...t){const c=[],l=()=>{c.forEach(i=>i()),c.length=0},o=(i,s,r,d)=>(i.addEventListener(s,r,d),()=>i.removeEventListener(s,r,d)),a=e.computed(()=>{const i=Z(e.toValue(t[0])).filter(s=>s!=null);return i.every(s=>typeof s!="string")?i:void 0}),n=Ve(()=>{var i,s;return[(s=(i=a.value)==null?void 0:i.map(r=>_(r)))!=null?s:[J].filter(r=>r!=null),Z(e.toValue(a.value?t[1]:t[0])),Z(e.unref(a.value?t[2]:t[1])),e.toValue(a.value?t[3]:t[2])]},([i,s,r,d])=>{if(l(),!i?.length||!s?.length||!r?.length)return;const m=ke(d)?{...d}:d;c.push(...i.flatMap(g=>s.flatMap(y=>r.map(h=>o(g,y,h,m)))))},{flush:"post"}),u=()=>{n(),l()};return ge(l),u}let Q=!1;function q(t,c,l={}){const{window:o=J,ignore:a=[],capture:n=!0,detectIframe:u=!1,controls:i=!1}=l;if(!o)return i?{stop:F,cancel:F,trigger:F}:F;if(ye&&!Q){Q=!0;const k={passive:!0};Array.from(o.document.body.children).forEach(w=>w.addEventListener("click",F,k)),o.document.documentElement.addEventListener("click",F,k)}let s=!0;const r=k=>e.toValue(a).some(w=>{if(typeof w=="string")return Array.from(o.document.querySelectorAll(w)).some(S=>S===k.target||k.composedPath().includes(S));{const S=_(w);return S&&(k.target===S||k.composedPath().includes(S))}});function d(k){const w=e.toValue(k);return w&&w.$.subTree.shapeFlag===16}function m(k,w){const S=e.toValue(k),$=S.$.subTree&&S.$.subTree.children;return $==null||!Array.isArray($)?!1:$.some(A=>A.el===w.target||w.composedPath().includes(A.el))}const g=k=>{const w=_(t);if(k.target!=null&&!(!(w instanceof Element)&&d(t)&&m(t,k))&&!(!w||w===k.target||k.composedPath().includes(w))){if("detail"in k&&k.detail===0&&(s=!r(k)),!s){s=!0;return}c(k)}};let y=!1;const h=[U(o,"click",k=>{y||(y=!0,setTimeout(()=>{y=!1},0),g(k))},{passive:!0,capture:n}),U(o,"pointerdown",k=>{const w=_(t);s=!r(k)&&!!(w&&!k.composedPath().includes(w))},{passive:!0}),u&&U(o,"blur",k=>{setTimeout(()=>{var w;const S=_(t);((w=o.document.activeElement)==null?void 0:w.tagName)==="IFRAME"&&!S?.contains(o.document.activeElement)&&c(k)},0)},{passive:!0})].filter(Boolean),B=()=>h.forEach(k=>k());return i?{stop:B,cancel:()=>{s=!1},trigger:k=>{s=!0,g(k),s=!1}}:B}const Ee=["value","onKeydown"],ve={class:"flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700"},Se=["data-result-index"],Ne=Object.assign({inheritAttrs:!1},{__name:"Autocomplete",props:e.mergeModels({search:{type:Function,required:!0},resultListClass:{type:String,default:"result-list"},resultItemClass:{type:String,default:"result-list-item"},getResultValue:{type:Function,default:t=>t},autoSelect:Boolean},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:e.mergeModels(["blur-sm","submit"],["update:modelValue"]),setup(t,{emit:c}){const l=c,o=t,a=e.useModel(t,"modelValue"),n=e.useAttrs(),i=(()=>{let E=0;return N=>(N||"")+ ++E})()((n.id||"autocomplete")+"-"),s=e.ref([]),r=e.ref(-1),d=e.ref(0),m=e.ref(!1),g=e.ref(!1),y=e.ref("top-0 translate-y-12"),h=e.ref(!0),B=e.ref(null),k=e.ref(null),w=e.ref(null),S=e.computed(()=>s.value.map((E,N)=>({id:(n.id||"autocomplete")+"-item-"+N,class:[o.resultItemClass,{"bg-vxvue-700 text-white":r.value===N}],role:"option",...r.value===N?{"aria-selected":"true"}:{}}))),$=e.computed(()=>({role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":i,"aria-expanded":m.value?"true":"false","aria-activedescendant":r.value>-1?S.value[r.value].id:"",...n})),A=e.computed(()=>({id:i,class:["absolute min-w-full transform z-[var(--zIndex-dropdown)]",o.resultListClass,y.value],role:"listbox"})),z=()=>{r.value=-1,s.value=[],m.value=!1,h.value=!0},x=E=>{const N=o.search(E);if(N instanceof Promise){const L=++d.value;g.value=!0,N.then(D=>{L===d.value&&(s.value=D,g.value=!1,s.value.length?(r.value=o.autoSelect?0:-1,m.value=!0):z())})}else s.value=N,s.value.length===0?z():(r.value=o.autoSelect?0:-1,m.value=!0)},V=()=>{const E=s.value[r.value];return E&&(a.value=o.getResultValue(E)),z(),E},p=E=>{a.value=E,x(E)},f=E=>x(E.target.value),b=()=>{z(),l("blur-sm")},C=()=>{const E=s.value.length;r.value=((r.value-1)%E+E)%E},M=E=>{m.value||f(E);const N=s.value.length;r.value=((r.value+1)%N+N)%N},j=()=>{z(),a.value=""},P=()=>l("submit",V()),W=E=>{const N=E.target.closest("[data-result-index]");N&&(r.value=parseInt(N.dataset.resultIndex,10),l("submit",V()))};return q(w,z),e.onUpdated(()=>{if(B.value){const E=k.value.getBoundingClientRect(),N=B.value.getBoundingClientRect();h.value&&s.value.length&&(h.value=!1,y.value=E.bottom+N.height>window.innerHeight&&window.innerHeight-E.bottom<E.top&&window.pageYOffset+E.top-N.height>0?"bottom-0 -translate-y-12":"top-0 translate-y-12");const L=B.value.querySelector('[data-result-index="'+r.value+'"]');if(L){let D=L.getBoundingClientRect();D.top<N.top?B.value.scrollTop-=N.top-D.top:D.bottom>N.bottom&&(B.value.scrollTop+=D.bottom-N.bottom)}}}),(E,N)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:w,class:e.normalizeClass(["inline-block relative",E.$attrs.class])},[e.createElementVNode("input",e.mergeProps({ref_key:"input",ref:k,class:"block pr-10 w-full form-input focus:border-vxvue",value:a.value},$.value,{onInput:N[0]||(N[0]=L=>p(L.target.value)),onKeydown:[e.withKeys(P,["enter"]),e.withKeys(j,["esc"]),e.withKeys(V,["tab"]),e.withKeys(e.withModifiers(C,["prevent"]),["up"]),e.withKeys(e.withModifiers(M,["prevent"]),["down"])],onFocus:f,onBlur:b}),null,16,Ee),e.createElementVNode("span",ve,[g.value?(e.openBlock(),e.createBlock(H,{key:0,class:"size-5"})):e.createCommentVNode("",!0)]),e.createVNode(O,{name:"fade"},{default:e.withCtx(()=>[s.value.length?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,ref_key:"resultList",ref:B},A.value,{onClick:W,onMousedown:N[1]||(N[1]=e.withModifiers(()=>{},["prevent"]))}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(L,D)=>(e.openBlock(),e.createElementBlock("div",{"data-result-index":D},[e.renderSlot(E.$slots,"result",{result:L,props:S.value[D]},()=>[(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:S.value[D].id},{ref_for:!0},S.value[D]),e.toDisplayString(t.getResultValue(L)),17))])],8,Se))),256))],16)):e.createCommentVNode("",!0)]),_:3})],2))}}),Ce={key:0,class:"fixed inset-0 z-[calc(var(--zIndex-confirm)-1)] bg-black/50 backdrop-blur-xs","aria-hidden":"true"},$e={key:0,class:"overflow-y-auto fixed inset-0 z-[var(--zIndex-confirm)]"},Me={class:"flex justify-center items-center min-h-screen text-center sm:block sm:p-0"},De={key:0},ze={class:"inline-block text-left align-bottom bg-white rounded-sm shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg"},Ae={class:"px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5"},Le={class:"flex flex-row items-center"},Te={class:"shrink-0"},Pe={class:"grow text-center"},Fe=["onClick"],Ie={__name:"Confirm",props:{buttons:{type:[Object,Array],default:()=>({label:"Ok"}),validator:t=>Array.isArray(t)&&t.length<=2&&t.filter(c=>c.label!=="undefined"&&c.value!=="undefined").length===t.length||t.label!==void 0&&t.value!==void 0},headerClass:{type:String,default:"text-vxvue-alt-900 bg-vxvue-alt-300"},buttonClass:{type:String,default:"button"}},setup(t,{expose:c}){const l=t,o=e.ref(""),a=e.ref(""),n=e.ref(!1);let u=null,i=null;const s=e.computed(()=>Array.isArray(l.buttons)?l.buttons:[l.buttons]),r=e.ref(null),d=(g,y)=>{n.value=!1,g.value!==void 0?g.value?u():i():y?i():u()};return c({open:(g,y)=>(o.value=g,a.value=y,n.value=!0,e.nextTick(()=>r.value.firstElementChild.focus()),new Promise((h,B)=>{u=h,i=B}))}),(g,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.value?(e.openBlock(),e.createElementBlock("div",Ce)):e.createCommentVNode("",!0),e.createVNode(O,{name:"appear"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Me,[n.value?(e.openBlock(),e.createElementBlock("div",De,[y[0]||(y[0]=e.createElementVNode("span",{class:"hidden sm:inline-block sm:h-screen sm:align-middle","aria-hidden":"true"},"",-1)),e.createElementVNode("div",ze,[o.value||g.$slots.title?(e.openBlock(),e.createElementBlock("h3",{key:0,class:e.normalizeClass(["py-4 pt-4 rounded-t-sm text-lg font-medium text-center sm:py-6",t.headerClass])},[e.renderSlot(g.$slots,"title",{title:o.value},()=>[e.createTextVNode(e.toDisplayString(o.value),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Ae,[e.createElementVNode("div",Le,[e.createElementVNode("div",Te,[e.renderSlot(g.$slots,"icon")]),e.createElementVNode("p",Pe,[e.renderSlot(g.$slots,"default",{message:a.value},()=>[e.createTextVNode(e.toDisplayString(a.value),1)])])]),e.createElementVNode("div",{ref_key:"buttonsContainer",ref:r,class:"flex justify-center mt-5 space-x-2 sm:mt-6"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(h,B)=>(e.openBlock(),e.createElementBlock("button",{key:h.label,class:e.normalizeClass([t.buttonClass,h.class]),onClick:e.withModifiers(k=>d(h,B),["prevent"])},e.toDisplayString(h.label),11,Fe))),128))],512)])])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:3})],64))}};function Oe(t,c){const l=e.ref(!1),o=e.toValue(c);let a,n=o.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=[];if((a=o.match(/\bd\b/gi))&&a.length===1)n=n.replace("d","(\\d{1,2})");else if((a=o.match(/\bdd\b/gi))&&a.length===1)n=n.replace("dd","(\\d{2})");else return{date:l};if(u.push({srcPos:o.toLowerCase().indexOf("d"),destPos:2}),(a=o.match(/\bm\b/gi))&&a.length===1)n=n.replace("m","(\\d{1,2})");else if((a=o.match(/\bmm\b/gi))&&a.length===1)n=n.replace("mm","(\\d{2})");else return{date:l};if(u.push({srcPos:o.toLowerCase().indexOf("m"),destPos:1}),(a=o.match(/\byyyy\b/gi))&&a.length===1)n=n.replace("yyyy","(\\d{4})");else return{date:l};if(u.push({srcPos:o.toLowerCase().indexOf("y"),destPos:0}),!(a=e.toValue(t).match(n)))return{date:l};a.shift(),u.sort((d,m)=>d.srcPos<m.srcPos?-1:1);let i=[],s,r;for(;s=a.shift();)r=u.shift(),i[r.destPos]=s;return i=Date.parse(i.join("-")),i&&(i=new Date(i),l.value=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0)),{date:l}}const _e={class:"text-vxvue-700"},je=["disabled"],ee=Object.assign({inheritAttrs:!1},{__name:"DateInput",props:e.mergeModels({outputFormat:{type:String,default:"YYYY-MM-DD"},inputFormat:{type:String,default:"YYYY-MM-DD"},showToggle:{type:Boolean,default:!1}},{modelValue:{type:Date,default:null},modelModifiers:{}}),emits:e.mergeModels(["toggle-datepicker"],["update:modelValue"]),setup(t,{emit:c}){const l=c,o=t,a=e.useModel(t,"modelValue"),n=e.ref(""),u=e.computed(()=>a.value?G(a.value,o.outputFormat):""),i=e.computed(()=>{let s=Object.assign({},e.useAttrs());return delete s.class,s});return e.watch(a,s=>n.value===s?G(s,o.outputFormat):""),(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-block relative",s.$attrs.class])},[e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["block flex items-center w-full form-input bg-vxvue-50",{"pr-10":t.showToggle}])},[e.createElementVNode("span",_e,e.toDisplayString(u.value),1),i.value.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-hidden size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700",onClick:r[0]||(r[0]=d=>a.value=null)},[e.createVNode(e.unref(R),{class:"size-4"})]))],2)],512),[[e.vShow,u.value]]),e.withDirectives(e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d),type:"text",class:["block w-full form-input peer focus:border-vxvue",{"pr-10":t.showToggle}]},i.value,{onBlur:r[2]||(r[2]=d=>a.value=e.unref(Oe)(n.value,o.inputFormat).date?.value||null),onInput:r[3]||(r[3]=e.withModifiers(()=>{},["prevent"]))}),null,16),[[e.vModelText,n.value]])],512),[[e.vShow,!u.value]]),t.showToggle?(e.openBlock(),e.createElementBlock("button",{key:0,ref:"toggleButton",class:e.normalizeClass(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700",i.value.disabled?"cursor-not-allowed":"hover:text-vxvue"]),disabled:i.value.disabled,"aria-label":"datepicker-toggle",onClick:r[4]||(r[4]=e.withModifiers(d=>l("toggle-datepicker"),["stop"]))},[e.createVNode(e.unref(ae),{class:"size-6"})],10,je)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default")],2))}}),Ye={class:"flex items-center py-2 px-3 text-white bg-vxvue-700"},Re={class:"flex justify-between w-1/2"},He={class:"flex justify-between w-1/2"},Ze={class:"grid grid-cols-7 gap-0.5 p-0.5"},Ue=["disabled","onClick"],qe={class:"flex justify-between items-center py-2 px-3 text-white bg-vxvue-700"},We={class:"grid grid-cols-2 gap-0.5 p-0.5"},Ke=["onClick"],Xe=Object.assign({inheritAttrs:!1},{__name:"Datepicker",props:e.mergeModels({shownMonth:Date,maxNumberOfValues:{type:Number,default:1},validFrom:Date,validUntil:Date,dayNames:{type:Array,default:()=>"S M T W T F S".split(" ")},highlightRange:Boolean,locale:{type:String,default:"default"},startOfWeekIndex:{type:Number,default:0,validator:t=>t===0||t===1},hasInput:{type:Boolean,default:!0}},{modelValue:{type:[Date,Array],default:null,validator:(t,c)=>t instanceof Date&&c.maxNumberOfValues===1||t.every(l=>l instanceof Date||l===null)&&t.length<=c.maxNumberOfValues},modelModifiers:{}}),emits:e.mergeModels(["month-change","year-change"],["update:modelValue"]),setup(t,{emit:c}){const l=t,o=e.useModel(t,"modelValue"),a=c,n=(()=>{const p=new Date;return new Date(p.getFullYear(),p.getMonth(),p.getDate())})(),u=e.ref(null),i=e.ref([]),s=e.ref(!1),r=e.ref("days"),d=e.ref(0),m=e.ref({horiz:"left-0",vert:"top-0"}),g=e.ref(null),y=e.ref(null),h=e.ref(null),B=e.computed(()=>l.hasInput&&l.maxNumberOfValues===1),k=e.computed(()=>{const p=[],f=u.value.getFullYear(),b=u.value.getMonth(),C=new Date(f,b+1,0),M=new Date(f,b,0).getDay()+1-l.startOfWeekIndex,j=(6+l.startOfWeekIndex-C.getDay())%7;for(let P=-M,W=C.getDate()+j;P<W;++P)p.push(new Date(f,b,P+1));return p}),w=e.computed(()=>l.startOfWeekIndex?l.dayNames.slice(1).concat(l.dayNames[0]):l.dayNames),S=p=>{u.value=new Date(u.value.getFullYear(),p,1),a("month-change",u.value)},$=p=>{u.value=new Date(p,u.value.getMonth(),1),a("year-change",u.value)},A=p=>o.value=p,z=p=>{if(s.value=!1,l.maxNumberOfValues===1)o.value=p;else{const f=i.value;let b=f.findIndex(C=>C.getTime()===p.getTime());b!==-1?f.splice(b,1):f.length<l.maxNumberOfValues&&f.push(p),o.value=f}},x=p=>i.value.find(f=>f?.getTime()===p.getTime()),V=p=>{const f=p.getMonth()!==u.value.getMonth(),b=x(p),C=p.getTime()===n.getTime(),M=l.validFrom&&l.validFrom>p||l.validUntil&&l.validUntil<p,j=!b&&l.maxNumberOfValues>1&&i.value.length===l.maxNumberOfValues,P=l.highlightRange&&p>Math.min(...i.value)&&p<Math.max(...i.value);return{"cursor-not-allowed":M||j,"text-vxvue-700":!M&&!f&&!C&&!b,"text-error":M&&!f,"text-gray-400":f&&!C&&!b,"bg-vxvue-alt-300 font-bold":C&&!b,"bg-vxvue-700 text-white":b,"hover:ring-2 hover:ring-vxvue":!M,"bg-vxvue-100/50":P&&!C&&!b}};return q(y,()=>{s.value=!1,r.value="days"},{ignore:[h]}),e.onMounted(()=>h.value=g.value?.$refs.toggleButton),e.watch(s,p=>{p&&B.value&&e.nextTick(()=>{const f=g.value.$el.getBoundingClientRect(),b=y.value.getBoundingClientRect();m.value.horiz=f.right-b.width<0?"left-0":"right-0",m.value.vert=f.bottom+b.height>window.innerHeight?"bottom-0 -translate-y-12":"top-0 translate-y-12"})}),e.watch(o,p=>{if(p)if(Array.isArray(p)){const f=[],b=i.value;p.forEach(C=>{C&&f.push(new Date(C.getFullYear(),C.getMonth(),C.getDate()))}),(f.length!==b.length||![...new Set([...f,...b])].every(C=>f.filter(M=>M.getTime()===C.getTime()).length===b.filter(M=>M.getTime()===C.getTime()).length))&&(i.value=f,u.value=new Date((f[0]||n).getTime()),u.value.setDate(1))}else i.value=[new Date(p.getFullYear(),p.getMonth(),p.getDate())],u.value=new Date(p.getFullYear(),p.getMonth(),1);else i.value=[],u.value=new Date(n.getFullYear(),n.getMonth(),1)},{immediate:!0}),e.watch(()=>l.shownMonth,p=>{u.value=new Date((p||n).getTime()),u.value.setDate(1)},{immediate:!0}),(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative",p.$attrs.class])},[B.value?(e.openBlock(),e.createBlock(ee,e.mergeProps({key:0},p.$attrs,{ref_key:"input",ref:g,"model-value":i.value[0],"show-toggle":!0,class:"w-full",onToggleDatepicker:f[0]||(f[0]=b=>s.value=!s.value),"onUpdate:modelValue":A}),{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3},16,["model-value"])):e.createCommentVNode("",!0),e.createVNode(O,{name:"fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"calendar",ref:y,class:e.normalizeClass(["overflow-hidden z-[var(--zIndex-dropdown)] bg-white rounded-sm shadow-md min-w-72 sm:min-w-80",m.value.horiz,m.value.vert,{absolute:B.value}])},[r.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Re,[e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[1]||(f[1]=e.withModifiers(b=>S(u.value.getMonth()-1),["stop"]))},[e.createVNode(e.unref(Y),{class:"size-6"})]),e.createElementVNode("span",null,e.toDisplayString(u.value.toLocaleString(t.locale,{month:"long"})),1),e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[2]||(f[2]=e.withModifiers(b=>S(u.value.getMonth()+1),["stop"]))},[e.createVNode(e.unref(I),{class:"size-6"})])]),e.createElementVNode("div",He,[e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[3]||(f[3]=e.withModifiers(b=>$(u.value.getFullYear()-1),["stop"]))},[e.createVNode(e.unref(Y),{class:"size-6"})]),e.createElementVNode("button",{class:"text-vxvue-100 hover:text-vxvue-50",onClick:f[4]||(f[4]=b=>{r.value="years",d.value=u.value.getFullYear()})},e.toDisplayString(u.value.getFullYear()),1),e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[5]||(f[5]=e.withModifiers(b=>$(u.value.getFullYear()+1),["stop"]))},[e.createVNode(e.unref(I),{class:"size-6"})])])]),e.createElementVNode("div",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(b,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"py-2 text-center bg-gray-200"},e.toDisplayString(b),1))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,b=>(e.openBlock(),e.createElementBlock("button",{key:b,class:e.normalizeClass(["py-2 rounded-xs block text-center",V(b)]),disabled:t.validFrom&&t.validFrom>b||t.validUntil&&t.validUntil<b||t.maxNumberOfValues>1&&i.value.length===t.maxNumberOfValues&&!x(b),onClick:e.withModifiers(C=>z(b),["stop"])},e.toDisplayString(b.getDate()),11,Ue))),128))])],64)):e.createCommentVNode("",!0),r.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",qe,[e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[6]||(f[6]=e.withModifiers(b=>d.value-=10,["stop"]))},[e.createVNode(e.unref(Y),{class:"size-6"})]),e.createElementVNode("span",null,e.toDisplayString(d.value)+" - "+e.toDisplayString(d.value+9),1),e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[7]||(f[7]=e.withModifiers(b=>d.value+=10,["stop"]))},[e.createVNode(e.unref(I),{class:"size-6"})])]),e.createElementVNode("div",We,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(10,b=>e.createElementVNode("div",{key:b,class:"text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"},[e.createElementVNode("button",{class:"py-2 px-3",onClick:e.withModifiers(C=>{$(d.value+b-1),r.value="days"},["stop"])},e.toDisplayString(d.value+b-1),9,Ke)])),64))])],64)):e.createCommentVNode("",!0)],2),[[e.vShow,s.value]])]),_:1})],2))}}),Ge=["for"],Je=["id","multiple","accept"],Qe={__name:"FormFileButton",props:e.mergeModels({accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},id:{type:String,default:"form-file-button-"+Math.ceil(Math.random()*1e3)}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["form-data"],["update:modelValue"]),setup(t,{emit:c}){const l=c,o=t,a=e.useModel(t,"modelValue"),n=i=>{const s=new FormData;for(let r of i)s.append(o.name,r,r.name);return s},u=i=>{const s=i.target.files||i.dataTransfer.files;if(s){const r=Array.from(s);a.value=r,l("form-data",n(r))}};return(i,s)=>(e.openBlock(),e.createElementBlock("label",{for:t.id},[e.renderSlot(i.$slots,"default",{},()=>[s[0]||(s[0]=e.createTextVNode("Upload",-1))]),e.createElementVNode("input",{id:t.id,type:"file",multiple:t.multiple,accept:t.accept,class:"hidden",onChange:u},null,40,Je)],8,Ge))}},et={key:0,value:null,disabled:"",hidden:""},tt=["selected","value"],te={__name:"FormSelect",props:e.mergeModels({options:{type:Array,default:()=>[]},placeholder:{type:String,default:null}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const c=e.useModel(t,"modelValue");return(l,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("select",e.mergeProps(l.$attrs,{"onUpdate:modelValue":o[0]||(o[0]=a=>c.value=a),class:"form-select"}),[t.placeholder?(e.openBlock(),e.createElementBlock("option",et,e.toDisplayString(t.placeholder),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,a=>(e.openBlock(),e.createElementBlock("option",{key:a.key!==void 0?a.key:a.label||a,selected:(a.key!==void 0?a.key:a.label||a)===c.value,value:a.key!==void 0?a.key:a.label||a},e.toDisplayString(a.label||a),9,tt))),128))],16)),[[e.vModelSelect,c.value]])}},lt=["aria-checked","aria-label"],at=["d"],ot={__name:"FormSwitch",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const c=e.useModel(t,"modelValue"),l=e.computed(()=>{let a=Object.assign({},e.useAttrs());return delete a.class,a}),o=e.computed(()=>e.useAttrs().disabled||e.useAttrs().disabled==="");return(a,n)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(a.$attrs.class),tabindex:"0"},[e.createElementVNode("span",{role:"switch",class:e.normalizeClass(["inline-flex relative shrink-0 w-11 p-[2px] rounded-full transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-vxvue",o.value?"bg-slate-200":c.value?"bg-vxvue":"bg-slate-300"]),"aria-checked":c.value,"aria-label":a.$attrs["aria-label"]},[e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["block relative size-5 rounded-full transition duration-200 ease-in-out transform pointer-events-none",c.value?"translate-x-5":"translate-x-0",o.value?"bg-slate-100":"bg-white"])},[e.renderSlot(a.$slots,"handle",{},()=>[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"6",stroke:"currentColor",class:e.normalizeClass(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-3",c.value&&!o.value?"text-vxvue":"text-slate-300"])},[e.createElementVNode("path",{"stroke-linecap":"round",d:c.value?"M12 18 V6":"m18.5 12 c0 3.5 -3 6.5 -6.5 6.5 -3.5 0 -6.5 -3 -6.5 -6.5 0 -3.5 3 -6.5 6.5 -6.5 3.5 0 6.5 3 6.5 6.5z"},null,8,at)],2))])],2),e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":n[0]||(n[0]=u=>c.value=u)},l.value,{class:"hidden",value:"1",type:"checkbox"}),null,16),[[e.vModelCheckbox,c.value]])],10,lt),e.renderSlot(a.$slots,"default")],2))}},nt={"aria-live":"assertive",class:"flex fixed inset-0 z-[var(--zIndex-toast)] items-start py-6 px-4 pointer-events-none sm:p-6"},rt={class:"flex flex-col items-center space-y-4 w-full"},st={class:"p-4"},it={class:"flex items-start"},ct={class:"shrink-0"},dt={class:"flex-1 pt-0.5 ml-3 w-0"},ut={class:"font-bold"},mt={class:"mt-1"},ft={class:"flex shrink-0 ml-4"},pt=Object.assign({inheritAttrs:!1},{__name:"MessageToast",props:{title:{type:String,default:""},message:{type:[String,Array],default:null},timeout:{type:Number,default:5e3},active:{type:Boolean,default:!1},showTimeoutProgress:{type:Boolean,default:!1}},emits:["timeout","close"],setup(t,{emit:c}){const l=t,o=c,a=e.computed(()=>typeof l.message=="string"?[l.message]:l.message),n=e.ref(0);let u=null;const i=()=>{window.clearTimeout(u),n.value=100,l.active&&l.timeout&&(u=window.setTimeout(()=>{o("timeout")},l.timeout),window.setTimeout(()=>n.value=0,0))};return e.watch(()=>l.active,i),e.onMounted(i),(s,r)=>(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",rt,[e.createVNode(O,{name:"vert-fade"},{default:e.withCtx(()=>[t.active?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto",s.$attrs.class])},[e.createElementVNode("div",st,[e.createElementVNode("div",it,[e.createElementVNode("div",ct,[e.renderSlot(s.$slots,"icon")]),e.createElementVNode("div",dt,[e.renderSlot(s.$slots,"title",{},()=>[e.createElementVNode("div",ut,e.toDisplayString(t.title),1)]),e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,d=>(e.openBlock(),e.createElementBlock("p",mt,e.toDisplayString(d),1))),256))])]),e.createElementVNode("div",ft,[e.createElementVNode("button",{class:"inline-flex text-white bg-black/20 rounded-xs focus:ring-2 focus:outline-hidden hover:text-stone-200 focus:ring-stone-200",onClick:r[0]||(r[0]=d=>o("close"))},[r[1]||(r[1]=e.createElementVNode("span",{class:"sr-only"},"Close",-1)),e.createVNode(e.unref(R),{class:"size-5"})])])])]),t.showTimeoutProgress&&t.timeout?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-1 transition-all ease-linear bg-vxvue-alt",style:e.normalizeStyle({width:n.value+"%","transition-duration":t.timeout+"ms"}),role:"progressbar","aria-hidden":"false","aria-label":"notification timer"},null,4)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]),_:3})])]))}}),ht={key:0,class:"fixed inset-0 z-[calc(var(--zIndex-modal)-1)] bg-white/50 backdrop-blur-xs","aria-hidden":"true"},gt={key:0,class:"fixed inset-0 z-[var(--zIndex-modal)]"},bt={class:"flex justify-center items-center h-screen"},kt={__name:"Modal",props:{show:Boolean,containerClass:{type:String,default:"mx-4 w-full lg:w-1/2 xl:w-1/4 max-h-[90vh]"},headerClass:{type:String,default:""},contentClass:{type:String,default:""}},emits:["clicked-outside"],setup(t,{emit:c}){const l=c,o=e.ref(null);return q(o,()=>l("clicked-outside")),(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",ht)):e.createCommentVNode("",!0),e.createVNode(O,{name:"appear"},{default:e.withCtx(()=>[t.show?(e.openBlock(),e.createElementBlock("div",gt,[e.createElementVNode("div",bt,[e.createElementVNode("div",{ref_key:"container",ref:o,class:e.normalizeClass(["flex flex-col overflow-hidden max-w-full bg-white rounded-sm ring-1 ring-black/10 shadow-xl transition-all transform xl:max-w-(--breakpoint-xl)",t.containerClass])},[e.createElementVNode("div",{class:e.normalizeClass(["grow-0",t.headerClass])},[e.renderSlot(a.$slots,"title")],2),e.createElementVNode("div",{class:e.normalizeClass(["overflow-y-auto h-full",t.contentClass])},[e.renderSlot(a.$slots,"default")],2)],2)])])):e.createCommentVNode("",!0)]),_:3})],64))}},yt={class:"flex justify-between items-center px-4 sm:px-0"},xt={class:"flex flex-1 -mt-px w-0"},wt=["disabled"],Bt={class:"hidden md:flex md:-mt-px"},Vt={class:"flex flex-1 justify-end -mt-px w-0"},Et=["disabled"],vt={__name:"Pagination",props:{page:{type:Number,default:1},total:{type:Number,default:1},perPage:{type:Number,default:20,validator:t=>t>=1},showNavButtons:{type:Boolean,default:!0},prevText:{type:String,default:"Previous"},nextText:{type:String,default:"Next"},showAllPages:{type:Boolean,default:!1},markerPosition:{type:String,default:"above",validator:t=>["above","below"].includes(t)}},emits:["update:page"],setup(t,{emit:c}){const l=c,o=t,a=e.ref(Math.ceil(o.total/o.perPage)),n=e.ref(null),u=e.computed(()=>(o.markerPosition==="above"?"border-t-4 -mt-[4px]":"border-b-4 -mb-[4px]")+" py-4"),i=e.computed(()=>{let d=[1];if(o.showAllPages||a.value<=7){for(let m=2;m<=a.value;++m)d.push(m);return d}return n.value>=a.value?d.push("dots",n.value-2,n.value-1):n.value-1&&n.value-1>1&&(n.value>1&&d.push("dots"),d.push(n.value-1)),n.value>1&&d.push(n.value),n.value+1<a.value&&(d.push(n.value+1),n.value<=1&&d.push(n.value+2),n.value+2<a.value&&d.push("dots")),n.value<a.value&&d.push(a.value),d}),s=()=>{n.value>1&&l("update:page",n.value-1)},r=()=>{n.value<a.value&&l("update:page",n.value+1)};return e.watch(()=>o.page,d=>n.value=Math.min(Math.max(d,1),a.value),{immediate:!0}),e.watch(()=>o.perPage,d=>{a.value=Math.ceil(o.total/o.perPage),l("update:page",1)}),e.watch(()=>o.total,d=>{a.value=Math.ceil(o.total/o.perPage),n.value>a.value&&l("update:page",a.value)}),(d,m)=>(e.openBlock(),e.createElementBlock("nav",yt,[e.createElementVNode("div",xt,[t.showNavButtons?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:n.value<=1,class:e.normalizeClass([n.value<=1?"pointer-events-none text-gray-500":"text-vxvue-700","inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"]),onClick:s},[e.createVNode(e.unref(Y),{class:"size-5"}),e.createTextVNode(" "+e.toDisplayString(t.prevText),1)],10,wt)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(g,y)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page!=="dots"?"button":"span"),{key:y,class:e.normalizeClass([{"pointer-events-none":g==="dots"},g===n.value?"border-vxvue text-vxvue font-bold":"border-transparent text-gray-500 hover:border-gray-300",u.value,"inline-flex items-center px-4 text-sm"]),onClick:h=>g!=="dots"?l("update:page",g):null},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g!=="dots"?g:"…"),1)]),_:2},1032,["class","onClick"]))),128))]),e.createElementVNode("div",Vt,[t.showNavButtons?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:n.value>=a.value,class:e.normalizeClass([n.value>=a.value?"pointer-events-none text-gray-500":"text-vxvue-700","inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"]),onClick:r},[e.createTextVNode(e.toDisplayString(t.nextText)+" ",1),e.createVNode(e.unref(I),{class:"size-5"})],10,Et)):e.createCommentVNode("",!0)])]))}};function St(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"})])}function Nt(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])}const Ct=["type"],$t=["disabled"],Mt=Object.assign({inheritAttrs:!1},{__name:"PasswordInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const c=e.useModel(t,"modelValue"),l=e.ref(!1),o=e.computed(()=>{let a=Object.assign({},e.useAttrs());return delete a.class,a});return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass("inline-block relative "+e.useAttrs().class)},[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":n[0]||(n[0]=u=>c.value=u),type:l.value?"text":"password"},o.value,{class:"block pr-12 w-full form-input peer"}),null,16,Ct),[[e.vModelDynamic,c.value]]),e.createElementVNode("button",{class:"flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand","aria-label":"show-password-toggle",disabled:e.useAttrs().disabled??!1,onClick:n[1]||(n[1]=e.withModifiers(u=>l.value=!l.value,["stop"]))},[l.value?(e.openBlock(),e.createBlock(e.unref(St),{key:0,class:"size-5"})):(e.openBlock(),e.createBlock(e.unref(Nt),{key:1,class:"size-5"}))],8,$t)],2))}}),Dt={class:"flex items-center pb-1"},zt={key:0,class:"ml-6"},At=Object.assign({inheritAttrs:!1},{__name:"SimpleTree",props:e.mergeModels({branch:{type:Object,default:()=>({})}},{modelValue:{type:Object,default:null},modelModifiers:{}}),emits:e.mergeModels(["expand"],["update:modelValue"]),setup(t,{emit:c}){const l=t,o=c,a=e.useModel(t,"modelValue"),n=e.ref(!1);return e.onMounted(()=>{l.branch===a.value&&o("expand",!0)}),(u,i)=>{const s=e.resolveComponent("simple-tree",!0);return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([!t.branch.branches||!t.branch.branches.length?"terminates":"",u.$attrs.class])},[e.createElementVNode("div",Dt,[t.branch.branches&&t.branch.branches.length?(e.openBlock(),e.createElementBlock("button",{key:0,class:"mr-2",onClick:i[0]||(i[0]=r=>n.value=!n.value)},[e.renderSlot(u.$slots,"toggle",{branch:t.branch,expanded:n.value},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value?e.unref(se):e.unref(ie)),{class:"p-0.5 text-white rounded size-5 bg-vxvue-700 hover:bg-vxvue"}))])])):e.createCommentVNode("",!0),t.branch===a.value?e.renderSlot(u.$slots,"label-selected",{key:1,branch:t.branch},()=>[e.createElementVNode("strong",null,e.toDisplayString(t.branch.label),1)]):(e.openBlock(),e.createElementBlock("button",{key:2,onClick:i[1]||(i[1]=r=>a.value=t.branch)},[e.renderSlot(u.$slots,"label",{branch:t.branch},()=>[e.createTextVNode(e.toDisplayString(t.branch.label),1)])]))]),t.branch.branches&&t.branch.branches.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.branch.branches,r=>(e.openBlock(),e.createBlock(s,{key:r.id||r.key||null,branch:r,modelValue:a.value,"onUpdate:modelValue":i[2]||(i[2]=d=>a.value=d),onExpand:i[3]||(i[3]=d=>{n.value=d,o("expand",d)})},e.createSlots({_:2},[e.renderList(u.$slots,(d,m)=>({name:m,fn:e.withCtx(g=>[e.renderSlot(u.$slots,m,e.mergeProps({ref_for:!0},g))])}))]),1032,["branch","modelValue"]))),128))],512)),[[e.vShow,n.value]]):e.createCommentVNode("",!0)],2)}}}),Lt={__name:"Sizable",props:{vertical:Boolean},emits:["dragStart","dragStop"],setup(t,{emit:c}){const l=t,o=c,a=e.ref(null),n=e.ref(null);let u=!1,i={},s=null,r=null,d=null;const m=h=>{if(u){h.preventDefault();const{pageX:B,pageY:k}=h.touches?.[0]??h;l.vertical?a.value.style.height=Math.min(r.height-d.height-(s.y-r.y),Math.max(0,s.height+k-i.y))+"px":a.value.style.width=Math.min(r.width-d.width-(s.x-r.x),Math.max(0,s.width+B-i.x))+"px"}},g=h=>{h.preventDefault(),h.currentTarget.focus(),u=!0;const{pageX:B,pageY:k}=h.touches?.[0]??h;i={x:B,y:k},d=n.value.getBoundingClientRect(),s=a.value.getBoundingClientRect(),r=a.value.parentElement.getBoundingClientRect(),h.type==="mousedown"?(document.addEventListener("mousemove",m),document.addEventListener("mouseup",y)):(document.addEventListener("touchmove",m),document.addEventListener("touchend",y)),o("dragStart")},y=h=>{u&&(u=!1,h.type==="mouseup"?(document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y)):(document.removeEventListener("touchmove",m),document.removeEventListener("touchend",y)),setTimeout(()=>o("dragStop"),0))};return(h,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"box",ref:a,class:"relative"},[e.renderSlot(h.$slots,"default"),e.createElementVNode("div",e.mergeProps({ref_key:"handle",ref:n,class:["absolute flex",l.vertical?"inset-x-0 top-full justify-center py-1 cursor-ns-resize":"inset-y-0 left-full items-center px-1 cursor-ew-resize"]},e.toHandlers({touchstart:g,mousedown:g,touchend:y,mouseup:y},!0)),[e.renderSlot(h.$slots,"handle",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["rounded-full bg-vxvue",l.vertical?"h-1.5 w-8":"h-8 w-1.5"])},null,2)])],16)],512))}},Tt=["aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext"],Pt=["id"],Ft=["id","aria-label"],It=Object.assign({inheritAttrs:!1},{__name:"Slider",props:e.mergeModels({min:{type:Number,default:0},max:{type:Number,default:100},vertical:Boolean,disabled:Boolean},{modelValue:{type:[Number,Array],default:null,validator(t){return typeof t=="number"||t.every(c=>typeof c=="number")}},modelModifiers:{}}),emits:e.mergeModels(["dragStart","dragStop"],["update:modelValue"]),setup(t,{emit:c}){const l=t,o=e.useModel(t,"modelValue"),a=c,n=e.useAttrs(),u={x:null,y:null},i={w:null,h:null};let s=!1;const r=e.ref(null),d=e.ref(0),m=e.computed(()=>{const x=l.max,V=l.min;return o.value instanceof Array?o.value.map(p=>(Math.max(Math.min(p,x),V)-V)*100/(x-V)):(Math.max(Math.min(o.value,x),V)-V)*100/(x-V)}),g=e.computed(()=>{if(o.value instanceof Array){const x=Math.min(...m.value)+"%",V=Math.max(...m.value)-Math.min(...m.value)+"%";return l.vertical?{bottom:x,height:V}:{left:x,width:V}}return l.vertical?{bottom:0,height:m.value+"%"}:{width:m.value+"%"}}),y=e.ref({class:(l.vertical?"left-0 -translate-x-1.5 translate-y-2.5":"top-0 -translate-x-2.5 -translate-y-1.5")+" touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 "+(l.disabled?"":" focus:ring-4 focus:outline-hidden border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),tabindex:0}),h=x=>{let V=parseFloat(x.toFixed(10));V=Math.min(l.max,Math.max(l.min,V)),o.value instanceof Array?o.value[d.value]=V:o.value=V},B=x=>{const{pageX:V,pageY:p}=x.touches?x.touches[0]:x,f=l.vertical?(-p+u.y)/i.h:(V-u.x)/i.w;h(Math.floor((l.max-l.min)*f+l.min))},k=()=>{const{clientLeft:x,clientTop:V,scrollLeft:p,scrollTop:f}=document.documentElement,b=r.value.getBoundingClientRect();u.x=b.left+p-x,u.y=b.bottom+f-V,i.w=r.value.offsetWidth,i.h=r.value.offsetHeight},w=x=>{s&&(x.preventDefault(),B(x))},S=x=>{x.preventDefault(),x.currentTarget.focus(),k(),s=!0,x.type==="mousedown"?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",$)):(document.addEventListener("touchmove",w),document.addEventListener("touchend",$)),a("dragStart")},$=x=>{s&&(s=!1,x.type==="mouseup"?(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",$)):(document.removeEventListener("touchmove",w),document.removeEventListener("touchend",$)),setTimeout(()=>a("dragStop"),0))},A=x=>{x.keyCode>=33&&x.keyCode<=40&&x.preventDefault();const V=o.value[d.value]??o.value;switch(x.keyCode){case 37:case 40:h(V-1);break;case 39:case 38:h(V+1);break;case 33:h(V+(l.max-l.min)/10);break;case 34:h(V-(l.max-l.min)/10);break;case 36:h(l.min);break;case 35:h(l.max)}},z=x=>{k(),B(x)};return(x,V)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"track",ref:r,class:["relative bg-slate-300",t.vertical?"h-full w-2 rounded-t-full rounded-b-full":"w-full h-2 rounded-r-full rounded-l-full"],role:"slider","aria-label":"slider-thumb","aria-valuemin":t.min,"aria-valuemax":t.max,"aria-valuenow":o.value[0]??o.value,"aria-valuetext":o.value},e.toHandlers(t.disabled?{}:{click:z},!0)),[t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute bg-vxvue",t.vertical?"w-full rounded-t-full rounded-b-full":"h-full rounded-r-full rounded-l-full"]),style:e.normalizeStyle(g.value)},null,6)),o.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(o.value,(p,f)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({id:f?null:e.unref(n).id,style:t.vertical?{bottom:m.value[f]+"%"}:{left:m.value[f]+"%"},"aria-label":"slider-thumb-"+(f+1)},{ref_for:!0},y.value,e.toHandlers(t.disabled?{}:{focus:()=>d.value=f,keydown:A,touchstart:b=>{d.value=f,S(b)},mousedown:b=>{d.value=f,S(b)},touchend:$,mouseup:$},!0)),null,16,Ft))),256)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,id:e.unref(n).id,style:t.vertical?{bottom:m.value+"%"}:{left:m.value+"%"},"aria-label":"slider-thumb"},y.value,e.toHandlers(t.disabled?{}:{focus:()=>d.value=0,keydown:A,touchstart:p=>{d.value=0,S(p)},mousedown:p=>{d.value=0,S(p)},touchend:$,mouseup:$},!0)),null,16,Pt))],16,Tt))}}),Ot=["data-active","onClick"],_t={class:"flex items-center space-x-1"},jt=["data-active"],Yt={__name:"Sortable",props:{columns:{type:Array,required:!0,validator:t=>{for(const c of t)if(c.label===void 0||c.prop===void 0)return!1;return!0}},rows:{type:Array,required:!0},offset:{type:Number,default:null},count:{type:Number,default:null},sortProp:{type:String,default:null},sortDirection:{type:String,default:null,validator:t=>!t||["asc","desc"].includes(t)},keyProperty:{type:String,default:"key"},headerClass:{type:String,default:"text-white bg-vxvue-700 [&_*[data-active]]:bg-vxvue-alt-800"},bodyClass:{type:String,default:"[&>*:nth-child(even)]:bg-vxvue-50 [&>*:nth-child(even)_*[data-active]]:bg-vxvue-alt-100 [&>*:nth-child(odd)_*[data-active]]:bg-vxvue-alt-50"}},emits:["before-sort","after-sort"],setup(t,{emit:c}){const l=t,o=c,a=e.ref(l.sortProp),n=e.ref(l.sortDirection),u=e.computed(()=>{let s=l.rows.slice();const r=l.columns.find(({prop:d})=>d===a.value);return r&&(n.value==="asc"&&r.sortAscFunction?s.sort(r.sortAscFunction):n.value==="desc"&&r.sortDescFunction?s.sort(r.sortDescFunction):s.sort((d,m)=>d[a.value]<m[a.value]?n.value==="asc"?-1:1:d[a.value]>m[a.value]?n.value==="asc"?1:-1:0)),s.slice(l.offset||0,(l.offset||0)+(l.count||s.length))}),i=s=>{o("before-sort",{prop:a.value,dir:n.value}),a.value===s?n.value=n.value==="asc"?"desc":"asc":(a.value=s,n.value=n.value||"asc"),e.nextTick(()=>o("after-sort",{prop:a.value,dir:n.value}))};return(s,r)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(s.$attrs.class||"w-full divide-y divide-y-slate-900 table-fixed")},[e.createElementVNode("thead",{class:e.normalizeClass(t.headerClass)},[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,d=>(e.openBlock(),e.createElementBlock("th",{key:d.prop,scope:"col","data-active":a.value===d.prop?"active":null,class:e.normalizeClass(["py-3 px-6 text-left",{"cursor-pointer":d.sortable},d.cssClass]),onClick:m=>d.sortable?i(d.prop):null},[e.renderSlot(s.$slots,d.prop+"-header",{column:d,sortDir:n.value,sortProp:a.value},()=>[e.createElementVNode("div",_t,[e.createElementVNode("span",null,e.toDisplayString(d.label),1),d.sortable?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value!==d.prop?e.unref(ne):n.value==="asc"?e.unref(oe):e.unref(re)),{key:0,class:"size-4"})):e.createCommentVNode("",!0)])])],10,Ot))),128))])],2),e.createElementVNode("tbody",{class:e.normalizeClass(t.bodyClass)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,d=>(e.openBlock(),e.createElementBlock("tr",{key:d[t.keyProperty],class:e.normalizeClass(d.cssClass)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,m=>(e.openBlock(),e.createElementBlock("td",{key:m.prop,"data-active":a.value===m.prop?"active":null,class:"overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis"},[e.renderSlot(s.$slots,m.prop,{row:d},()=>[e.createTextVNode(e.toDisplayString(d[m.prop]),1)])],8,jt))),128))],2))),128))],2)],2))}},Rt={class:"flex items-center space-x-2"},Ht=["disabled"],Zt=K(Object.assign({inheritAttrs:!1},{__name:"SubmitButton",props:{busy:Boolean,spinnerClass:{type:String,default:null},theme:{type:String,default:null}},emits:["submit"],setup(t,{emit:c}){const l=c;return(o,a)=>(e.openBlock(),e.createElementBlock("div",Rt,[e.createElementVNode("button",{class:e.normalizeClass([o.$attrs.class,t.theme]),disabled:o.$attrs.disabled||t.busy,type:"button",onClick:a[0]||(a[0]=n=>l("submit"))},[e.renderSlot(o.$slots,"default",{},void 0,!0)],10,Ht),t.busy?(e.openBlock(),e.createBlock(H,{key:0,class:e.normalizeClass(t.spinnerClass||["size-5",{error:"text-error",success:"text-success",default:"text-vxvue"}[t.theme||"default"]])},null,8,["class"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-646b7a90"]]),Ut={class:"sm:hidden"},qt={class:"hidden sm:block"},Wt={class:"border-b border-gray-200"},Kt={class:"flex -mb-px space-x-8","aria-label":"Tabs"},Xt=["aria-current","onClick"],Gt={__name:"Tabs",props:{items:{type:Array,default:()=>[]},activeIndex:{type:Number,default:0}},emits:["update:activeIndex"],setup(t,{emit:c}){const l=t,o=c,a=e.ref(l.items[l.activeIndex]||{}),n=e.computed(()=>{let i=[];return l.items.forEach((s,r)=>{s.disabled||i.push({label:s.name,key:r})}),i});e.watch(()=>l.activeIndex,i=>{a.value=l.items[i]||{}});const u=i=>{i.disabled||(a.value=i,o("update:activeIndex",l.items.indexOf(i)))};return(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ut,[e.createVNode(te,{options:n.value,"model-value":t.activeIndex,class:"w-full","onUpdate:modelValue":s[0]||(s[0]=r=>o("update:activeIndex",r))},null,8,["options","model-value"])]),e.createElementVNode("div",qt,[e.createElementVNode("div",Wt,[e.createElementVNode("nav",Kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,r=>(e.openBlock(),e.createElementBlock("a",{key:r.name,href:"#",class:e.normalizeClass(["group inline-flex items-center py-4 px-1 border-b-4 font-medium no-underline! border-transparent",{"border-vxvue text-vxvue":a.value===r,"cursor-not-allowed text-gray-400":r.disabled,"text-gray-900 hover:text-vxvue-600 hover:border-vxvue-600":a.value!==r&&!r.disabled}]),"aria-current":a.value===r?"page":void 0,onClick:e.withModifiers(d=>u(r),["prevent"])},[e.renderSlot(i.$slots,"icon",{tab:r}),e.createElementVNode("span",null,[e.renderSlot(i.$slots,"default",{tab:r},()=>[e.createTextVNode(e.toDisplayString(r.name),1)])]),e.renderSlot(i.$slots,"badge",{tab:r},()=>[r.badge?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block text-current",{"bg-gray-100":r.disabled,"bg-vxvue-50":a.value===r,"bg-gray-200":a.value!==r&&!r.disabled}])},e.toDisplayString(r.badge),3)):e.createCommentVNode("",!0)])],10,Xt))),128))])])])],64))}},Jt={mounted:t=>t.focus()},Qt={mounted:(t,c)=>{if(!["INPUT","TEXTAREA"].includes(t.nodeName)){let l=t.querySelector('input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="url"],input[type="tel"]');l||(l=t.querySelector("textarea")),t=l}if(t){if(t.querySelector("label"))throw new Error("VFloatingLabel directive: LABEL element found.");const l=Math.random().toString(36).substring(2),o=document.createElement("div");o.classList.add("relative","isolate");const a=document.createElement("label");a.classList.add(..."absolute px-2 left-1 top-2 scale-90 text-sm z-[var(--zIndex-label)] origin-[0] bg-white -translate-y-4 transform-gpu duration-200".split(" "),..."peer-focus:top-2 peer-focus:scale-90 peer-focus:-translate-y-full".split(" "),..."peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2".split(" "),t.nodeName==="TEXTAREA"?"peer-placeholder-shown:top-4":"peer-placeholder-shown:top-1/2"),c.value?.invalid?a.classList.add("text-error","peer-focus:text-error"):a.classList.add("peer-focus:text-blue-600"),t.getAttribute("required")!==null&&a.classList.add("required"),a.setAttribute("for",t.getAttribute("id")||l+"-element"),a.innerHTML=c.value?.label||t.getAttribute("placeholder")||l+"-label",t.classList.add("peer"),t.setAttribute("placeholder"," "),t.setAttribute("id",t.getAttribute("id")||l+"-element"),t.parentElement.replaceChild(o,t),o.appendChild(t),o.appendChild(a)}},updated:(t,c)=>{const l=t.parentNode.querySelector("label"),o=t.getAttribute("placeholder")?.trim();l.innerHTML=c.value?.label||o||l.innerHTML,o&&t.setAttribute("placeholder"," "),c.value?.invalid?(l.classList.add("text-error","peer-focus:text-error"),l.classList.remove("peer-focus:text-blue-600")):(l.classList.remove("text-error","peer-focus:text-error"),l.classList.add("peer-focus:text-blue-600")),l.classList[t.getAttribute("required")!==null?"add":"remove"]("required")},beforeUnmount:t=>t.parentNode.parentNode.removeChild(t.parentNode)};v.Accordion=le,v.AccordionPanel=me,v.Autocomplete=Ne,v.Confirm=Ie,v.DateInput=ee,v.Datepicker=Xe,v.FormFileButton=Qe,v.FormSelect=te,v.FormSwitch=ot,v.MessageToast=pt,v.Modal=kt,v.Pagination=vt,v.PasswordInput=Mt,v.SimpleTree=At,v.Sizable=Lt,v.Slider=It,v.Sortable=Yt,v.Spinner=H,v.SubmitButton=Zt,v.Tabs=Gt,v.VFloatingLabel=Qt,v.VFocus=Jt,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(v,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(v=typeof globalThis<"u"?globalThis:v||self,e(v.vxVue={},v.Vue))})(this,function(v,e){"use strict";const le={__name:"Accordion",props:{activeIndex:{type:[Number,Array],default:null}},emits:["update:activeIndex"],setup(t,{emit:c}){const l=t,o=c,a=e.useSlots(),n=e.ref([]),u=m=>n.value.push(m),i=e.computed(()=>a.default().reduce((m,g)=>((g.type.__name||g.type.name)==="AccordionPanel"&&m.push(g),m),[])),s=m=>{if(Array.isArray(l.activeIndex)){let g=[].concat(l.activeIndex),y=g.findIndex(h=>h===m);y===-1?o("update:activeIndex",[...g,m]):(g.splice(y,1),o("update:activeIndex",g))}else o("update:activeIndex",m===l.activeIndex?-1:m)},r=m=>{if(m=++m%i.value.length,!n.value[m].disabled){s(m),n.value[m].focus();return}r(m)},d=m=>{if(m=(m||i.value.length)-1,!n.value[m].disabled){s(m),n.value[m].focus();return}d(m)};return e.onBeforeUpdate(()=>n.value=[]),(m,g)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(y,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y),{key:h,ref_for:!0,ref:u,show:Array.isArray(t.activeIndex)?t.activeIndex?.includes(h):t.activeIndex===h,onSelect:B=>s(h),onKeydown:B=>r(h),onKeyup:B=>d(h)},null,40,["show","onSelect","onKeydown","onKeyup"]))),128))}};function ae(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z","clip-rule":"evenodd"})])}function oe(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z","clip-rule":"evenodd"})])}function Y(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z","clip-rule":"evenodd"})])}function I(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z","clip-rule":"evenodd"})])}function ne(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}function re(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z","clip-rule":"evenodd"})])}function se(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}function ie(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z","clip-rule":"evenodd"})])}function R(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}const ce=["id","disabled","aria-expanded","aria-controls"],de=["id","aria-labelledby"],ue={class:"overflow-hidden rounded-b"},me=Object.assign({inheritAttrs:!1},{__name:"AccordionPanel",props:{show:Boolean,disabled:Boolean},emits:["select","keyup","keydown"],setup(t,{expose:c,emit:l}){const o=l,a=t,n=e.useAttrs(),u=e.ref(null),i=Math.random().toString(20).substring(2,8),s=d=>{if(!a.disabled){const m=new Map([[40,"keydown"],[38,"keyup"]]).get(d.keyCode);m&&(o(m),d.preventDefault())}};return c({focus:()=>u.value.focus(),disabled:a.disabled}),(d,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{id:"ap-control-"+e.unref(i),ref_key:"btn",ref:u,class:e.normalizeClass(["flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",t.show?"rounded-t":"rounded-sm",t.disabled?"bg-slate-300 text-slate-700":"bg-vxvue hover:bg-vxvue-600 text-white",e.unref(n).class]),disabled:t.disabled,"aria-expanded":t.show,"aria-controls":"ap-"+e.unref(i),tabindex:"0",onClick:m[0]||(m[0]=g=>o("select")),onKeydown:s},[t.disabled?(e.openBlock(),e.createBlock(e.unref(R),{key:0,class:"size-5"})):(e.openBlock(),e.createBlock(e.unref(I),{key:1,class:e.normalizeClass(["size-5 transform-gpu transition-transform duration-300",{"rotate-90":t.show}])},null,8,["class"])),e.createElementVNode("span",null,[e.renderSlot(d.$slots,"header")])],42,ce),e.createElementVNode("div",{id:"ap-"+e.unref(i),class:e.normalizeClass(["grid transition-[grid-template-rows] duration-300 ease-in-out",t.show&&!t.disabled?"grid-rows-1":"grid-rows-[repeat(1,minmax(0,0fr))]"]),"aria-labelledby":"ap-control-"+e.unref(i)},[e.createElementVNode("div",ue,[e.renderSlot(d.$slots,"default")])],10,de)]))}}),fe=["viewBox"],pe=["cx","cy","r","stroke-width"],he=["cx","cy","r","stroke-width","stroke-dasharray"],H={__name:"Spinner",props:{radius:{type:Number,default:10},strokeWidth:{type:Number,default:4}},setup(t){const c=t,l=e.computed(()=>c.radius+c.strokeWidth/2),o=e.computed(()=>c.radius*2+c.strokeWidth),a=e.computed(()=>c.radius*Math.PI/1.5);return(n,u)=>(e.openBlock(),e.createElementBlock("svg",{class:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 "+o.value+" "+o.value,role:"progressbar"},[e.createElementVNode("circle",{class:"opacity-35",cx:l.value,cy:l.value,r:t.radius,stroke:"currentColor","stroke-width":t.strokeWidth},null,8,pe),e.createElementVNode("circle",{cx:l.value,cy:l.value,r:t.radius,stroke:"currentColor","stroke-width":t.strokeWidth,"stroke-dasharray":a.value+" "+t.radius*100,"stroke-linecap":"round"},null,8,he)],8,fe))}},K=(t,c)=>{const l=t.__vccOpts||t;for(const[o,a]of c)l[o]=a;return l},O=K({__name:"VxVueTransition",props:{name:{type:String,required:!0,validator:t=>["appear","vert-fade","fade"].includes(t)}},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(e.Transition,{name:t.name},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["name"]))}},[["__scopeId","data-v-f6b1631e"]]);function ge(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const X=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const be=Object.prototype.toString,ke=t=>be.call(t)==="[object Object]",F=()=>{},ye=xe();function xe(){var t,c;return X&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((c=window?.navigator)==null?void 0:c.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Z(t){return Array.isArray(t)?t:[t]}const we=/[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;function Be(t,c,l,o){let a=t<12?"AM":"PM";return o&&(a=a.split("").reduce((n,u)=>n+=`${u}.`,"")),l?a.toLowerCase():a}function T(t){const c=["th","st","nd","rd"],l=t%100;return t+(c[(l-20)%10]||c[l]||c[0])}function G(t,c,l={}){var o;const a=t.getFullYear(),n=t.getMonth(),u=t.getDate(),i=t.getHours(),s=t.getMinutes(),r=t.getSeconds(),d=t.getMilliseconds(),m=t.getDay(),g=(o=l.customMeridiem)!=null?o:Be,y=B=>{var k;return(k=B.split(" ")[1])!=null?k:""},h={Yo:()=>T(a),YY:()=>String(a).slice(-2),YYYY:()=>a,M:()=>n+1,Mo:()=>T(n+1),MM:()=>`${n+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(e.toValue(l.locales),{month:"short"}),MMMM:()=>t.toLocaleDateString(e.toValue(l.locales),{month:"long"}),D:()=>String(u),Do:()=>T(u),DD:()=>`${u}`.padStart(2,"0"),H:()=>String(i),Ho:()=>T(i),HH:()=>`${i}`.padStart(2,"0"),h:()=>`${i%12||12}`.padStart(1,"0"),ho:()=>T(i%12||12),hh:()=>`${i%12||12}`.padStart(2,"0"),m:()=>String(s),mo:()=>T(s),mm:()=>`${s}`.padStart(2,"0"),s:()=>String(r),so:()=>T(r),ss:()=>`${r}`.padStart(2,"0"),SSS:()=>`${d}`.padStart(3,"0"),d:()=>m,dd:()=>t.toLocaleDateString(e.toValue(l.locales),{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(e.toValue(l.locales),{weekday:"short"}),dddd:()=>t.toLocaleDateString(e.toValue(l.locales),{weekday:"long"}),A:()=>g(i,s),AA:()=>g(i,s,!1,!0),a:()=>g(i,s,!0),aa:()=>g(i,s,!0,!0),z:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"shortOffset"})),zz:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"shortOffset"})),zzz:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"shortOffset"})),zzzz:()=>y(t.toLocaleDateString(e.toValue(l.locales),{timeZoneName:"longOffset"}))};return c.replace(we,(B,k)=>{var w,S;return(S=k??((w=h[B])==null?void 0:w.call(h)))!=null?S:B})}function Ve(t,c,l){return e.watch(t,c,{...l,immediate:!0})}const J=X?window:void 0;function _(t){var c;const l=e.toValue(t);return(c=l?.$el)!=null?c:l}function q(...t){const c=[],l=()=>{c.forEach(i=>i()),c.length=0},o=(i,s,r,d)=>(i.addEventListener(s,r,d),()=>i.removeEventListener(s,r,d)),a=e.computed(()=>{const i=Z(e.toValue(t[0])).filter(s=>s!=null);return i.every(s=>typeof s!="string")?i:void 0}),n=Ve(()=>{var i,s;return[(s=(i=a.value)==null?void 0:i.map(r=>_(r)))!=null?s:[J].filter(r=>r!=null),Z(e.toValue(a.value?t[1]:t[0])),Z(e.unref(a.value?t[2]:t[1])),e.toValue(a.value?t[3]:t[2])]},([i,s,r,d])=>{if(l(),!i?.length||!s?.length||!r?.length)return;const m=ke(d)?{...d}:d;c.push(...i.flatMap(g=>s.flatMap(y=>r.map(h=>o(g,y,h,m)))))},{flush:"post"}),u=()=>{n(),l()};return ge(l),u}let Q=!1;function U(t,c,l={}){const{window:o=J,ignore:a=[],capture:n=!0,detectIframe:u=!1,controls:i=!1}=l;if(!o)return i?{stop:F,cancel:F,trigger:F}:F;if(ye&&!Q){Q=!0;const k={passive:!0};Array.from(o.document.body.children).forEach(w=>w.addEventListener("click",F,k)),o.document.documentElement.addEventListener("click",F,k)}let s=!0;const r=k=>e.toValue(a).some(w=>{if(typeof w=="string")return Array.from(o.document.querySelectorAll(w)).some(S=>S===k.target||k.composedPath().includes(S));{const S=_(w);return S&&(k.target===S||k.composedPath().includes(S))}});function d(k){const w=e.toValue(k);return w&&w.$.subTree.shapeFlag===16}function m(k,w){const S=e.toValue(k),$=S.$.subTree&&S.$.subTree.children;return $==null||!Array.isArray($)?!1:$.some(A=>A.el===w.target||w.composedPath().includes(A.el))}const g=k=>{const w=_(t);if(k.target!=null&&!(!(w instanceof Element)&&d(t)&&m(t,k))&&!(!w||w===k.target||k.composedPath().includes(w))){if("detail"in k&&k.detail===0&&(s=!r(k)),!s){s=!0;return}c(k)}};let y=!1;const h=[q(o,"click",k=>{y||(y=!0,setTimeout(()=>{y=!1},0),g(k))},{passive:!0,capture:n}),q(o,"pointerdown",k=>{const w=_(t);s=!r(k)&&!!(w&&!k.composedPath().includes(w))},{passive:!0}),u&&q(o,"blur",k=>{setTimeout(()=>{var w;const S=_(t);((w=o.document.activeElement)==null?void 0:w.tagName)==="IFRAME"&&!S?.contains(o.document.activeElement)&&c(k)},0)},{passive:!0})].filter(Boolean),B=()=>h.forEach(k=>k());return i?{stop:B,cancel:()=>{s=!1},trigger:k=>{s=!0,g(k),s=!1}}:B}const Ee=["value","onKeydown"],ve={class:"flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700"},Se=["data-result-index"],Ce=Object.assign({inheritAttrs:!1},{__name:"Autocomplete",props:e.mergeModels({search:{type:Function,required:!0},resultListClass:{type:String,default:"result-list"},resultItemClass:{type:String,default:"result-list-item"},getResultValue:{type:Function,default:t=>t},autoSelect:Boolean},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:e.mergeModels(["blur-sm","submit"],["update:modelValue"]),setup(t,{emit:c}){const l=c,o=t,a=e.useModel(t,"modelValue"),n=e.useAttrs(),i=(()=>{let E=0;return C=>(C||"")+ ++E})()((n.id||"autocomplete")+"-"),s=e.ref([]),r=e.ref(-1),d=e.ref(0),m=e.ref(!1),g=e.ref(!1),y=e.ref("top-0 translate-y-12"),h=e.ref(!0),B=e.ref(null),k=e.ref(null),w=e.ref(null),S=e.computed(()=>s.value.map((E,C)=>({id:(n.id||"autocomplete")+"-item-"+C,class:[o.resultItemClass,{"bg-vxvue-700 text-white":r.value===C}],role:"option",...r.value===C?{"aria-selected":"true"}:{}}))),$=e.computed(()=>({role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":i,"aria-expanded":m.value?"true":"false","aria-activedescendant":r.value>-1?S.value[r.value].id:"",...n})),A=e.computed(()=>({id:i,class:["absolute min-w-full transform z-[var(--zIndex-dropdown)]",o.resultListClass,y.value],role:"listbox"})),z=()=>{r.value=-1,s.value=[],m.value=!1,h.value=!0},x=E=>{const C=o.search(E);if(C instanceof Promise){const L=++d.value;g.value=!0,C.then(D=>{L===d.value&&(s.value=D,g.value=!1,s.value.length?(r.value=o.autoSelect?0:-1,m.value=!0):z())})}else s.value=C,s.value.length===0?z():(r.value=o.autoSelect?0:-1,m.value=!0)},V=()=>{const E=s.value[r.value];return E&&(a.value=o.getResultValue(E)),z(),E},p=E=>{a.value=E,x(E)},f=E=>x(E.target.value),b=()=>{z(),l("blur-sm")},N=()=>{const E=s.value.length;r.value=((r.value-1)%E+E)%E},M=E=>{m.value||f(E);const C=s.value.length;r.value=((r.value+1)%C+C)%C},j=()=>{z(),a.value=""},P=()=>l("submit",V()),W=E=>{const C=E.target.closest("[data-result-index]");C&&(r.value=parseInt(C.dataset.resultIndex,10),l("submit",V()))};return U(w,z),e.onUpdated(()=>{if(B.value){const E=k.value.getBoundingClientRect(),C=B.value.getBoundingClientRect();h.value&&s.value.length&&(h.value=!1,y.value=E.bottom+C.height>window.innerHeight&&window.innerHeight-E.bottom<E.top&&window.pageYOffset+E.top-C.height>0?"bottom-0 -translate-y-12":"top-0 translate-y-12");const L=B.value.querySelector('[data-result-index="'+r.value+'"]');if(L){let D=L.getBoundingClientRect();D.top<C.top?B.value.scrollTop-=C.top-D.top:D.bottom>C.bottom&&(B.value.scrollTop+=D.bottom-C.bottom)}}}),(E,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:w,class:e.normalizeClass(["inline-block relative",E.$attrs.class])},[e.createElementVNode("input",e.mergeProps({ref_key:"input",ref:k,class:"block pr-10 w-full form-input focus:border-vxvue",value:a.value},$.value,{onInput:C[0]||(C[0]=L=>p(L.target.value)),onKeydown:[e.withKeys(P,["enter"]),e.withKeys(j,["esc"]),e.withKeys(V,["tab"]),e.withKeys(e.withModifiers(N,["prevent"]),["up"]),e.withKeys(e.withModifiers(M,["prevent"]),["down"])],onFocus:f,onBlur:b}),null,16,Ee),e.createElementVNode("span",ve,[g.value?(e.openBlock(),e.createBlock(H,{key:0,class:"size-5"})):e.createCommentVNode("",!0)]),e.createVNode(O,{name:"fade"},{default:e.withCtx(()=>[s.value.length?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,ref_key:"resultList",ref:B},A.value,{onClick:W,onMousedown:C[1]||(C[1]=e.withModifiers(()=>{},["prevent"]))}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(L,D)=>(e.openBlock(),e.createElementBlock("div",{"data-result-index":D},[e.renderSlot(E.$slots,"result",{result:L,props:S.value[D]},()=>[(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:S.value[D].id},{ref_for:!0},S.value[D]),e.toDisplayString(t.getResultValue(L)),17))])],8,Se))),256))],16)):e.createCommentVNode("",!0)]),_:3})],2))}}),Ne={key:0,class:"fixed inset-0 z-[calc(var(--zIndex-confirm)-1)] bg-black/50 backdrop-blur-xs","aria-hidden":"true"},$e={key:0,class:"overflow-y-auto fixed inset-0 z-[var(--zIndex-confirm)]"},Me={class:"flex justify-center items-center min-h-screen text-center sm:block sm:p-0"},De={key:0},ze={class:"inline-block text-left align-bottom bg-white rounded-sm shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg"},Ae={class:"px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5"},Le={class:"flex flex-row items-center"},Te={class:"shrink-0"},Pe={class:"grow text-center"},Fe=["onClick"],Ie={__name:"Confirm",props:{buttons:{type:[Object,Array],default:()=>({label:"Ok"}),validator:t=>Array.isArray(t)&&t.length<=2&&t.filter(c=>c.label!=="undefined"&&c.value!=="undefined").length===t.length||t.label!==void 0&&t.value!==void 0},headerClass:{type:String,default:"text-vxvue-alt-900 bg-vxvue-alt-300"},buttonClass:{type:String,default:"button"}},setup(t,{expose:c}){const l=t,o=e.ref(""),a=e.ref(""),n=e.ref(!1);let u=null,i=null;const s=e.computed(()=>Array.isArray(l.buttons)?l.buttons:[l.buttons]),r=e.ref(null),d=(g,y)=>{n.value=!1,g.value!==void 0?g.value?u():i():y?i():u()};return c({open:(g,y)=>(o.value=g,a.value=y,n.value=!0,e.nextTick(()=>r.value.firstElementChild.focus()),new Promise((h,B)=>{u=h,i=B}))}),(g,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.value?(e.openBlock(),e.createElementBlock("div",Ne)):e.createCommentVNode("",!0),e.createVNode(O,{name:"appear"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Me,[n.value?(e.openBlock(),e.createElementBlock("div",De,[y[0]||(y[0]=e.createElementVNode("span",{class:"hidden sm:inline-block sm:h-screen sm:align-middle","aria-hidden":"true"},"",-1)),e.createElementVNode("div",ze,[o.value||g.$slots.title?(e.openBlock(),e.createElementBlock("h3",{key:0,class:e.normalizeClass(["py-4 pt-4 rounded-t-sm text-lg font-medium text-center sm:py-6",t.headerClass])},[e.renderSlot(g.$slots,"title",{title:o.value},()=>[e.createTextVNode(e.toDisplayString(o.value),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Ae,[e.createElementVNode("div",Le,[e.createElementVNode("div",Te,[e.renderSlot(g.$slots,"icon")]),e.createElementVNode("p",Pe,[e.renderSlot(g.$slots,"default",{message:a.value},()=>[e.createTextVNode(e.toDisplayString(a.value),1)])])]),e.createElementVNode("div",{ref_key:"buttonsContainer",ref:r,class:"flex justify-center mt-5 space-x-2 sm:mt-6"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(h,B)=>(e.openBlock(),e.createElementBlock("button",{key:h.label,class:e.normalizeClass([t.buttonClass,h.class]),onClick:e.withModifiers(k=>d(h,B),["prevent"])},e.toDisplayString(h.label),11,Fe))),128))],512)])])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:3})],64))}};function Oe(t,c){const l=e.ref(!1),o=e.toValue(c);let a,n=o.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=[];if((a=o.match(/\bd\b/gi))&&a.length===1)n=n.replace("d","(\\d{1,2})");else if((a=o.match(/\bdd\b/gi))&&a.length===1)n=n.replace("dd","(\\d{2})");else return{date:l};if(u.push({srcPos:o.toLowerCase().indexOf("d"),destPos:2}),(a=o.match(/\bm\b/gi))&&a.length===1)n=n.replace("m","(\\d{1,2})");else if((a=o.match(/\bmm\b/gi))&&a.length===1)n=n.replace("mm","(\\d{2})");else return{date:l};if(u.push({srcPos:o.toLowerCase().indexOf("m"),destPos:1}),(a=o.match(/\byyyy\b/gi))&&a.length===1)n=n.replace("yyyy","(\\d{4})");else return{date:l};if(u.push({srcPos:o.toLowerCase().indexOf("y"),destPos:0}),!(a=e.toValue(t).match(n)))return{date:l};a.shift(),u.sort((d,m)=>d.srcPos<m.srcPos?-1:1);let i=[],s,r;for(;s=a.shift();)r=u.shift(),i[r.destPos]=s;return i=Date.parse(i.join("-")),i&&(i=new Date(i),l.value=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0)),{date:l}}const _e={class:"text-vxvue-700"},je=["disabled"],ee=Object.assign({inheritAttrs:!1},{__name:"DateInput",props:e.mergeModels({outputFormat:{type:String,default:"YYYY-MM-DD"},inputFormat:{type:String,default:"YYYY-MM-DD"},showToggle:{type:Boolean,default:!1}},{modelValue:{type:Date,default:null},modelModifiers:{}}),emits:e.mergeModels(["toggle-datepicker"],["update:modelValue"]),setup(t,{emit:c}){const l=c,o=t,a=e.useModel(t,"modelValue"),n=e.ref(""),u=e.computed(()=>a.value?G(a.value,o.outputFormat):""),i=e.computed(()=>{let s=Object.assign({},e.useAttrs());return delete s.class,s});return e.watch(a,s=>n.value===s?G(s,o.outputFormat):""),(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-block relative",s.$attrs.class])},[e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["block flex items-center w-full form-input bg-vxvue-50",{"pr-10":t.showToggle}])},[e.createElementVNode("span",_e,e.toDisplayString(u.value),1),i.value.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-hidden size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700",onClick:r[0]||(r[0]=d=>a.value=null)},[e.createVNode(e.unref(R),{class:"size-4"})]))],2)],512),[[e.vShow,u.value]]),e.withDirectives(e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d),type:"text",class:["block w-full form-input peer focus:border-vxvue",{"pr-10":t.showToggle}]},i.value,{onBlur:r[2]||(r[2]=d=>a.value=e.unref(Oe)(n.value,o.inputFormat).date?.value||null),onInput:r[3]||(r[3]=e.withModifiers(()=>{},["prevent"]))}),null,16),[[e.vModelText,n.value]])],512),[[e.vShow,!u.value]]),t.showToggle?(e.openBlock(),e.createElementBlock("button",{key:0,ref:"toggleButton",class:e.normalizeClass(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700",i.value.disabled?"cursor-not-allowed":"hover:text-vxvue"]),disabled:i.value.disabled,"aria-label":"datepicker-toggle",onClick:r[4]||(r[4]=e.withModifiers(d=>l("toggle-datepicker"),["stop"]))},[e.createVNode(e.unref(ae),{class:"size-6"})],10,je)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default")],2))}}),Ye={class:"flex items-center py-2 px-3 text-white bg-vxvue-700"},Re={class:"flex justify-between w-1/2"},He={class:"flex justify-between w-1/2"},Ze={class:"grid grid-cols-7 gap-0.5 p-0.5"},qe=["disabled","onClick"],Ue={class:"flex justify-between items-center py-2 px-3 text-white bg-vxvue-700"},We={class:"grid grid-cols-2 gap-0.5 p-0.5"},Ke=["onClick"],Xe=Object.assign({inheritAttrs:!1},{__name:"Datepicker",props:e.mergeModels({shownMonth:Date,maxNumberOfValues:{type:Number,default:1},validFrom:Date,validUntil:Date,dayNames:{type:Array,default:()=>"S M T W T F S".split(" ")},highlightRange:Boolean,locale:{type:String,default:"default"},startOfWeekIndex:{type:Number,default:0,validator:t=>t===0||t===1},hasInput:{type:Boolean,default:!0}},{modelValue:{type:[Date,Array],default:null,validator:(t,c)=>t instanceof Date&&c.maxNumberOfValues===1||t.every(l=>l instanceof Date||l===null)&&t.length<=c.maxNumberOfValues},modelModifiers:{}}),emits:e.mergeModels(["month-change","year-change"],["update:modelValue"]),setup(t,{emit:c}){const l=t,o=e.useModel(t,"modelValue"),a=c,n=(()=>{const p=new Date;return new Date(p.getFullYear(),p.getMonth(),p.getDate())})(),u=e.ref(null),i=e.ref([]),s=e.ref(!1),r=e.ref("days"),d=e.ref(0),m=e.ref({horiz:"left-0",vert:"top-0"}),g=e.ref(null),y=e.ref(null),h=e.ref(null),B=e.computed(()=>l.hasInput&&l.maxNumberOfValues===1),k=e.computed(()=>{const p=[],f=u.value.getFullYear(),b=u.value.getMonth(),N=new Date(f,b+1,0),M=new Date(f,b,0).getDay()+1-l.startOfWeekIndex,j=(6+l.startOfWeekIndex-N.getDay())%7;for(let P=-M,W=N.getDate()+j;P<W;++P)p.push(new Date(f,b,P+1));return p}),w=e.computed(()=>l.startOfWeekIndex?l.dayNames.slice(1).concat(l.dayNames[0]):l.dayNames),S=p=>{u.value=new Date(u.value.getFullYear(),p,1),a("month-change",u.value)},$=p=>{u.value=new Date(p,u.value.getMonth(),1),a("year-change",u.value)},A=p=>o.value=p,z=p=>{if(s.value=!1,l.maxNumberOfValues===1)o.value=p;else{const f=i.value;let b=f.findIndex(N=>N.getTime()===p.getTime());b!==-1?f.splice(b,1):f.length<l.maxNumberOfValues&&f.push(p),o.value=f}},x=p=>i.value.find(f=>f?.getTime()===p.getTime()),V=p=>{const f=p.getMonth()!==u.value.getMonth(),b=x(p),N=p.getTime()===n.getTime(),M=l.validFrom&&l.validFrom>p||l.validUntil&&l.validUntil<p,j=!b&&l.maxNumberOfValues>1&&i.value.length===l.maxNumberOfValues,P=l.highlightRange&&p>Math.min(...i.value)&&p<Math.max(...i.value);return{"cursor-not-allowed":M||j,"text-vxvue-700":!M&&!f&&!N&&!b,"text-error":M&&!f,"text-gray-400":f&&!N&&!b,"bg-vxvue-alt-300 font-bold":N&&!b,"bg-vxvue-700 text-white":b,"hover:ring-2 hover:ring-vxvue":!M,"bg-vxvue-100/50":P&&!N&&!b}};return U(y,()=>{s.value=!1,r.value="days"},{ignore:[h]}),e.onMounted(()=>h.value=g.value?.$refs.toggleButton),e.watch(s,p=>{p&&B.value&&e.nextTick(()=>{const f=g.value.$el.getBoundingClientRect(),b=y.value.getBoundingClientRect();m.value.horiz=f.right-b.width<0?"left-0":"right-0",m.value.vert=f.bottom+b.height>window.innerHeight?"bottom-0 -translate-y-12":"top-0 translate-y-12"})}),e.watch(o,p=>{if(p)if(Array.isArray(p)){const f=[],b=i.value;p.forEach(N=>{N&&f.push(new Date(N.getFullYear(),N.getMonth(),N.getDate()))}),(f.length!==b.length||![...new Set([...f,...b])].every(N=>f.filter(M=>M.getTime()===N.getTime()).length===b.filter(M=>M.getTime()===N.getTime()).length))&&(i.value=f,u.value=new Date((f[0]||n).getTime()),u.value.setDate(1))}else i.value=[new Date(p.getFullYear(),p.getMonth(),p.getDate())],u.value=new Date(p.getFullYear(),p.getMonth(),1);else i.value=[],u.value=new Date(n.getFullYear(),n.getMonth(),1)},{immediate:!0}),e.watch(()=>l.shownMonth,p=>{u.value=new Date((p||n).getTime()),u.value.setDate(1)},{immediate:!0}),(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative",p.$attrs.class])},[B.value?(e.openBlock(),e.createBlock(ee,e.mergeProps({key:0},p.$attrs,{ref_key:"input",ref:g,"model-value":i.value[0],"show-toggle":!0,class:"w-full",onToggleDatepicker:f[0]||(f[0]=b=>s.value=!s.value),"onUpdate:modelValue":A}),{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3},16,["model-value"])):e.createCommentVNode("",!0),e.createVNode(O,{name:"fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"calendar",ref:y,class:e.normalizeClass(["overflow-hidden z-[var(--zIndex-dropdown)] bg-white rounded-sm shadow-md min-w-72 sm:min-w-80",m.value.horiz,m.value.vert,{absolute:B.value}])},[r.value==="days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Re,[e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[1]||(f[1]=e.withModifiers(b=>S(u.value.getMonth()-1),["stop"]))},[e.createVNode(e.unref(Y),{class:"size-6"})]),e.createElementVNode("span",null,e.toDisplayString(u.value.toLocaleString(t.locale,{month:"long"})),1),e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[2]||(f[2]=e.withModifiers(b=>S(u.value.getMonth()+1),["stop"]))},[e.createVNode(e.unref(I),{class:"size-6"})])]),e.createElementVNode("div",He,[e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[3]||(f[3]=e.withModifiers(b=>$(u.value.getFullYear()-1),["stop"]))},[e.createVNode(e.unref(Y),{class:"size-6"})]),e.createElementVNode("button",{class:"text-vxvue-100 hover:text-vxvue-50",onClick:f[4]||(f[4]=b=>{r.value="years",d.value=u.value.getFullYear()})},e.toDisplayString(u.value.getFullYear()),1),e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[5]||(f[5]=e.withModifiers(b=>$(u.value.getFullYear()+1),["stop"]))},[e.createVNode(e.unref(I),{class:"size-6"})])])]),e.createElementVNode("div",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(b,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:"py-2 text-center bg-gray-200"},e.toDisplayString(b),1))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,b=>(e.openBlock(),e.createElementBlock("button",{key:b,class:e.normalizeClass(["py-2 rounded-xs block text-center",V(b)]),disabled:t.validFrom&&t.validFrom>b||t.validUntil&&t.validUntil<b||t.maxNumberOfValues>1&&i.value.length===t.maxNumberOfValues&&!x(b),onClick:e.withModifiers(N=>z(b),["stop"])},e.toDisplayString(b.getDate()),11,qe))),128))])],64)):e.createCommentVNode("",!0),r.value==="years"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Ue,[e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[6]||(f[6]=e.withModifiers(b=>d.value-=10,["stop"]))},[e.createVNode(e.unref(Y),{class:"size-6"})]),e.createElementVNode("span",null,e.toDisplayString(d.value)+" - "+e.toDisplayString(d.value+9),1),e.createElementVNode("button",{class:"shrink-0 text-vxvue-100 hover:text-vxvue-50",onClick:f[7]||(f[7]=e.withModifiers(b=>d.value+=10,["stop"]))},[e.createVNode(e.unref(I),{class:"size-6"})])]),e.createElementVNode("div",We,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(10,b=>e.createElementVNode("div",{key:b,class:"text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"},[e.createElementVNode("button",{class:"py-2 px-3",onClick:e.withModifiers(N=>{$(d.value+b-1),r.value="days"},["stop"])},e.toDisplayString(d.value+b-1),9,Ke)])),64))])],64)):e.createCommentVNode("",!0)],2),[[e.vShow,s.value]])]),_:1})],2))}}),Ge=["for"],Je=["id","multiple","accept"],Qe={__name:"FormFileButton",props:e.mergeModels({accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},id:{type:String,default:"form-file-button-"+Math.ceil(Math.random()*1e3)}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["form-data"],["update:modelValue"]),setup(t,{emit:c}){const l=c,o=t,a=e.useModel(t,"modelValue"),n=i=>{const s=new FormData;for(let r of i)s.append(o.name,r,r.name);return s},u=i=>{const s=i.target.files||i.dataTransfer.files;if(s){const r=Array.from(s);a.value=r,l("form-data",n(r))}};return(i,s)=>(e.openBlock(),e.createElementBlock("label",{for:t.id},[e.renderSlot(i.$slots,"default",{},()=>[s[0]||(s[0]=e.createTextVNode("Upload",-1))]),e.createElementVNode("input",{id:t.id,type:"file",multiple:t.multiple,accept:t.accept,class:"hidden",onChange:u},null,40,Je)],8,Ge))}},et={key:0,value:null,disabled:"",hidden:""},tt=["selected","value"],te={__name:"FormSelect",props:e.mergeModels({options:{type:Array,default:()=>[]},placeholder:{type:String,default:null}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const c=e.useModel(t,"modelValue");return(l,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("select",e.mergeProps(l.$attrs,{"onUpdate:modelValue":o[0]||(o[0]=a=>c.value=a),class:"form-select"}),[t.placeholder?(e.openBlock(),e.createElementBlock("option",et,e.toDisplayString(t.placeholder),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,a=>(e.openBlock(),e.createElementBlock("option",{key:a.key!==void 0?a.key:a.label||a,selected:(a.key!==void 0?a.key:a.label||a)===c.value,value:a.key!==void 0?a.key:a.label||a},e.toDisplayString(a.label||a),9,tt))),128))],16)),[[e.vModelSelect,c.value]])}},lt=["aria-checked","aria-label"],at=["d"],ot={__name:"FormSwitch",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const c=e.useModel(t,"modelValue"),l=e.computed(()=>{let a=Object.assign({},e.useAttrs());return delete a.class,a}),o=e.computed(()=>e.useAttrs().disabled||e.useAttrs().disabled==="");return(a,n)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(a.$attrs.class),tabindex:"0"},[e.createElementVNode("span",{role:"switch",class:e.normalizeClass(["inline-flex relative shrink-0 w-11 p-[2px] rounded-full transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-vxvue",o.value?"bg-slate-200":c.value?"bg-vxvue":"bg-slate-300"]),"aria-checked":c.value,"aria-label":a.$attrs["aria-label"]},[e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["block relative size-5 rounded-full transition duration-200 ease-in-out transform pointer-events-none",c.value?"translate-x-5":"translate-x-0",o.value?"bg-slate-100":"bg-white"])},[e.renderSlot(a.$slots,"handle",{},()=>[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"6",stroke:"currentColor",class:e.normalizeClass(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-3",c.value&&!o.value?"text-vxvue":"text-slate-300"])},[e.createElementVNode("path",{"stroke-linecap":"round",d:c.value?"M12 18 V6":"m18.5 12 c0 3.5 -3 6.5 -6.5 6.5 -3.5 0 -6.5 -3 -6.5 -6.5 0 -3.5 3 -6.5 6.5 -6.5 3.5 0 6.5 3 6.5 6.5z"},null,8,at)],2))])],2),e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":n[0]||(n[0]=u=>c.value=u)},l.value,{class:"hidden",value:"1",type:"checkbox"}),null,16),[[e.vModelCheckbox,c.value]])],10,lt),e.renderSlot(a.$slots,"default")],2))}},nt={"aria-live":"assertive",class:"flex fixed inset-0 z-[var(--zIndex-toast)] items-start py-6 px-4 pointer-events-none sm:p-6"},rt={class:"flex flex-col items-center space-y-4 w-full"},st={class:"p-4"},it={class:"flex items-start"},ct={class:"shrink-0"},dt={class:"flex-1 pt-0.5 ml-3 w-0"},ut={class:"font-bold"},mt={class:"mt-1"},ft={class:"flex shrink-0 ml-4"},pt=Object.assign({inheritAttrs:!1},{__name:"MessageToast",props:{title:{type:String,default:""},message:{type:[String,Array],default:null},timeout:{type:Number,default:5e3},active:{type:Boolean,default:!1},showTimeoutProgress:{type:Boolean,default:!1}},emits:["timeout","close"],setup(t,{emit:c}){const l=t,o=c,a=e.computed(()=>typeof l.message=="string"?[l.message]:l.message),n=e.ref(0);let u=null;const i=()=>{window.clearTimeout(u),n.value=100,l.active&&l.timeout&&(u=window.setTimeout(()=>{o("timeout")},l.timeout),window.setTimeout(()=>n.value=0,0))};return e.watch(()=>l.active,i),e.onMounted(i),(s,r)=>(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",rt,[e.createVNode(O,{name:"vert-fade"},{default:e.withCtx(()=>[t.active?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto",s.$attrs.class])},[e.createElementVNode("div",st,[e.createElementVNode("div",it,[e.createElementVNode("div",ct,[e.renderSlot(s.$slots,"icon")]),e.createElementVNode("div",dt,[e.renderSlot(s.$slots,"title",{},()=>[e.createElementVNode("div",ut,e.toDisplayString(t.title),1)]),e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,d=>(e.openBlock(),e.createElementBlock("p",mt,e.toDisplayString(d),1))),256))])]),e.createElementVNode("div",ft,[e.createElementVNode("button",{class:"inline-flex text-white bg-black/20 rounded-xs focus:ring-2 focus:outline-hidden hover:text-stone-200 focus:ring-stone-200",onClick:r[0]||(r[0]=d=>o("close"))},[r[1]||(r[1]=e.createElementVNode("span",{class:"sr-only"},"Close",-1)),e.createVNode(e.unref(R),{class:"size-5"})])])])]),t.showTimeoutProgress&&t.timeout?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-1 transition-all ease-linear bg-vxvue-alt",style:e.normalizeStyle({width:n.value+"%","transition-duration":t.timeout+"ms"}),role:"progressbar","aria-hidden":"false","aria-label":"notification timer"},null,4)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]),_:3})])]))}}),ht={key:0,class:"fixed inset-0 z-[calc(var(--zIndex-modal)-1)] bg-white/50 backdrop-blur-xs","aria-hidden":"true"},gt={key:0,class:"fixed inset-0 z-[var(--zIndex-modal)]"},bt={class:"flex justify-center items-center h-screen"},kt={__name:"Modal",props:{show:Boolean,containerClass:{type:String,default:"mx-4 w-full lg:w-1/2 xl:w-1/4 max-h-[90vh]"},headerClass:{type:String,default:""},contentClass:{type:String,default:""}},emits:["clicked-outside"],setup(t,{emit:c}){const l=c,o=e.ref(null);return U(o,()=>l("clicked-outside")),(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",ht)):e.createCommentVNode("",!0),e.createVNode(O,{name:"appear"},{default:e.withCtx(()=>[t.show?(e.openBlock(),e.createElementBlock("div",gt,[e.createElementVNode("div",bt,[e.createElementVNode("div",{ref_key:"container",ref:o,class:e.normalizeClass(["flex flex-col overflow-hidden max-w-full bg-white rounded-sm ring-1 ring-black/10 shadow-xl transition-all transform xl:max-w-(--breakpoint-xl)",t.containerClass])},[e.createElementVNode("div",{class:e.normalizeClass(["grow-0",t.headerClass])},[e.renderSlot(a.$slots,"title")],2),e.createElementVNode("div",{class:e.normalizeClass(["overflow-y-auto h-full",t.contentClass])},[e.renderSlot(a.$slots,"default")],2)],2)])])):e.createCommentVNode("",!0)]),_:3})],64))}},yt={class:"flex justify-between items-center px-4 sm:px-0"},xt={class:"flex flex-1 -mt-px w-0"},wt=["disabled"],Bt={class:"hidden md:flex md:-mt-px"},Vt={class:"flex flex-1 justify-end -mt-px w-0"},Et=["disabled"],vt={__name:"Pagination",props:{page:{type:Number,default:1},total:{type:Number,default:1},perPage:{type:Number,default:20,validator:t=>t>=1},showNavButtons:{type:Boolean,default:!0},prevText:{type:String,default:"Previous"},nextText:{type:String,default:"Next"},showAllPages:{type:Boolean,default:!1},markerPosition:{type:String,default:"above",validator:t=>["above","below"].includes(t)}},emits:["update:page"],setup(t,{emit:c}){const l=c,o=t,a=e.ref(Math.ceil(o.total/o.perPage)),n=e.ref(null),u=e.computed(()=>(o.markerPosition==="above"?"border-t-4 -mt-[4px]":"border-b-4 -mb-[4px]")+" py-4"),i=e.computed(()=>{let d=[1];if(o.showAllPages||a.value<=7){for(let m=2;m<=a.value;++m)d.push(m);return d}return n.value>=a.value?d.push("dots",n.value-2,n.value-1):n.value-1&&n.value-1>1&&(n.value>1&&d.push("dots"),d.push(n.value-1)),n.value>1&&d.push(n.value),n.value+1<a.value&&(d.push(n.value+1),n.value<=1&&d.push(n.value+2),n.value+2<a.value&&d.push("dots")),n.value<a.value&&d.push(a.value),d}),s=()=>{n.value>1&&l("update:page",n.value-1)},r=()=>{n.value<a.value&&l("update:page",n.value+1)};return e.watch(()=>o.page,d=>n.value=Math.min(Math.max(d,1),a.value),{immediate:!0}),e.watch(()=>o.perPage,d=>{a.value=Math.ceil(o.total/o.perPage),l("update:page",1)}),e.watch(()=>o.total,d=>{a.value=Math.ceil(o.total/o.perPage),n.value>a.value&&l("update:page",a.value)}),(d,m)=>(e.openBlock(),e.createElementBlock("nav",yt,[e.createElementVNode("div",xt,[t.showNavButtons?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:n.value<=1,class:e.normalizeClass([n.value<=1?"pointer-events-none text-gray-500":"text-vxvue-700","inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"]),onClick:s},[e.createVNode(e.unref(Y),{class:"size-5"}),e.createTextVNode(" "+e.toDisplayString(t.prevText),1)],10,wt)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(g,y)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page!=="dots"?"button":"span"),{key:y,class:e.normalizeClass([{"pointer-events-none":g==="dots"},g===n.value?"border-vxvue text-vxvue font-bold":"border-transparent text-gray-500 hover:border-gray-300",u.value,"inline-flex items-center px-4 text-sm"]),onClick:h=>g!=="dots"?l("update:page",g):null},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g!=="dots"?g:"…"),1)]),_:2},1032,["class","onClick"]))),128))]),e.createElementVNode("div",Vt,[t.showNavButtons?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:n.value>=a.value,class:e.normalizeClass([n.value>=a.value?"pointer-events-none text-gray-500":"text-vxvue-700","inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"]),onClick:r},[e.createTextVNode(e.toDisplayString(t.nextText)+" ",1),e.createVNode(e.unref(I),{class:"size-5"})],10,Et)):e.createCommentVNode("",!0)])]))}};function St(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"})])}function Ct(t,c){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])}const Nt=["type"],$t=["disabled"],Mt=Object.assign({inheritAttrs:!1},{__name:"PasswordInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const c=e.useModel(t,"modelValue"),l=e.ref(!1),o=e.computed(()=>{let a=Object.assign({},e.useAttrs());return delete a.class,a});return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass("inline-block relative "+e.useAttrs().class)},[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":n[0]||(n[0]=u=>c.value=u),type:l.value?"text":"password"},o.value,{class:"block pr-12 w-full form-input peer"}),null,16,Nt),[[e.vModelDynamic,c.value]]),e.createElementVNode("button",{class:"flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand","aria-label":"show-password-toggle",disabled:e.useAttrs().disabled??!1,onClick:n[1]||(n[1]=e.withModifiers(u=>l.value=!l.value,["stop"]))},[l.value?(e.openBlock(),e.createBlock(e.unref(St),{key:0,class:"size-5"})):(e.openBlock(),e.createBlock(e.unref(Ct),{key:1,class:"size-5"}))],8,$t)],2))}}),Dt={class:"flex items-center pb-1"},zt={key:0,class:"ml-6"},At=Object.assign({inheritAttrs:!1},{__name:"SimpleTree",props:e.mergeModels({branch:{type:Object,default:()=>({})}},{modelValue:{type:Object,default:null},modelModifiers:{}}),emits:e.mergeModels(["expand"],["update:modelValue"]),setup(t,{emit:c}){const l=t,o=c,a=e.useModel(t,"modelValue"),n=e.ref(!1);return e.onMounted(()=>{l.branch===a.value&&o("expand",!0)}),(u,i)=>{const s=e.resolveComponent("simple-tree",!0);return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([!t.branch.branches||!t.branch.branches.length?"terminates":"",u.$attrs.class])},[e.createElementVNode("div",Dt,[t.branch.branches&&t.branch.branches.length?(e.openBlock(),e.createElementBlock("button",{key:0,class:"mr-2",onClick:i[0]||(i[0]=r=>n.value=!n.value)},[e.renderSlot(u.$slots,"toggle",{branch:t.branch,expanded:n.value},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value?e.unref(se):e.unref(ie)),{class:"p-0.5 text-white rounded size-5 bg-vxvue-700 hover:bg-vxvue"}))])])):e.createCommentVNode("",!0),t.branch===a.value?e.renderSlot(u.$slots,"label-selected",{key:1,branch:t.branch},()=>[e.createElementVNode("strong",null,e.toDisplayString(t.branch.label),1)]):(e.openBlock(),e.createElementBlock("button",{key:2,onClick:i[1]||(i[1]=r=>a.value=t.branch)},[e.renderSlot(u.$slots,"label",{branch:t.branch},()=>[e.createTextVNode(e.toDisplayString(t.branch.label),1)])]))]),t.branch.branches&&t.branch.branches.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.branch.branches,r=>(e.openBlock(),e.createBlock(s,{key:r.id||r.key||null,branch:r,modelValue:a.value,"onUpdate:modelValue":i[2]||(i[2]=d=>a.value=d),onExpand:i[3]||(i[3]=d=>{n.value=d,o("expand",d)})},e.createSlots({_:2},[e.renderList(u.$slots,(d,m)=>({name:m,fn:e.withCtx(g=>[e.renderSlot(u.$slots,m,e.mergeProps({ref_for:!0},g))])}))]),1032,["branch","modelValue"]))),128))],512)),[[e.vShow,n.value]]):e.createCommentVNode("",!0)],2)}}}),Lt={__name:"Sizable",props:{vertical:Boolean},emits:["dragStart","dragStop"],setup(t,{emit:c}){const l=t,o=c,a=e.ref(null),n=e.ref(null);let u=!1,i={},s=null,r=null,d=null;const m=h=>{if(u){h.preventDefault();const{pageX:B,pageY:k}=h.touches?.[0]??h;l.vertical?a.value.style.height=Math.min(r.height-d.height-(s.y-r.y),Math.max(0,s.height+k-i.y))+"px":a.value.style.width=Math.min(r.width-d.width-(s.x-r.x),Math.max(0,s.width+B-i.x))+"px"}},g=h=>{h.preventDefault(),h.currentTarget.focus(),u=!0;const{pageX:B,pageY:k}=h.touches?.[0]??h;i={x:B,y:k},d=n.value.getBoundingClientRect(),s=a.value.getBoundingClientRect(),r=a.value.parentElement.getBoundingClientRect(),h.type==="mousedown"?(document.addEventListener("mousemove",m),document.addEventListener("mouseup",y)):(document.addEventListener("touchmove",m),document.addEventListener("touchend",y)),o("dragStart")},y=h=>{u&&(u=!1,h.type==="mouseup"?(document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y)):(document.removeEventListener("touchmove",m),document.removeEventListener("touchend",y)),setTimeout(()=>o("dragStop"),0))};return(h,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"box",ref:a,class:"relative"},[e.renderSlot(h.$slots,"default"),e.createElementVNode("div",e.mergeProps({ref_key:"handle",ref:n,class:["absolute flex",l.vertical?"inset-x-0 top-full justify-center py-1 cursor-ns-resize":"inset-y-0 left-full items-center px-1 cursor-ew-resize"]},e.toHandlers({touchstart:g,mousedown:g,touchend:y,mouseup:y},!0)),[e.renderSlot(h.$slots,"handle",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["rounded-full bg-vxvue",l.vertical?"h-1.5 w-8":"h-8 w-1.5"])},null,2)])],16)],512))}},Tt=["aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext"],Pt=["id"],Ft=["id","aria-label"],It=Object.assign({inheritAttrs:!1},{__name:"Slider",props:e.mergeModels({min:{type:Number,default:0},max:{type:Number,default:100},vertical:Boolean,disabled:Boolean},{modelValue:{type:[Number,Array],default:null,validator(t){return typeof t=="number"||t.every(c=>typeof c=="number")}},modelModifiers:{}}),emits:e.mergeModels(["dragStart","dragStop"],["update:modelValue"]),setup(t,{emit:c}){const l=t,o=e.useModel(t,"modelValue"),a=c,n=e.useAttrs(),u={x:null,y:null},i={w:null,h:null};let s=!1;const r=e.ref(null),d=e.ref(0),m=e.computed(()=>{const x=l.max,V=l.min;return o.value instanceof Array?o.value.map(p=>(Math.max(Math.min(p,x),V)-V)*100/(x-V)):(Math.max(Math.min(o.value,x),V)-V)*100/(x-V)}),g=e.computed(()=>{if(o.value instanceof Array){const x=Math.min(...m.value)+"%",V=Math.max(...m.value)-Math.min(...m.value)+"%";return l.vertical?{bottom:x,height:V}:{left:x,width:V}}return l.vertical?{bottom:0,height:m.value+"%"}:{width:m.value+"%"}}),y=e.ref({class:(l.vertical?"left-0 -translate-x-1.5 translate-y-2.5":"top-0 -translate-x-2.5 -translate-y-1.5")+" touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 "+(l.disabled?"":" focus:ring-4 focus:outline-hidden border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),tabindex:0}),h=x=>{let V=parseFloat(x.toFixed(10));V=Math.min(l.max,Math.max(l.min,V)),o.value instanceof Array?o.value[d.value]=V:o.value=V},B=x=>{const{pageX:V,pageY:p}=x.touches?x.touches[0]:x,f=l.vertical?(-p+u.y)/i.h:(V-u.x)/i.w;h(Math.floor((l.max-l.min)*f+l.min))},k=()=>{const{clientLeft:x,clientTop:V,scrollLeft:p,scrollTop:f}=document.documentElement,b=r.value.getBoundingClientRect();u.x=b.left+p-x,u.y=b.bottom+f-V,i.w=r.value.offsetWidth,i.h=r.value.offsetHeight},w=x=>{s&&(x.preventDefault(),B(x))},S=x=>{x.preventDefault(),x.currentTarget.focus(),k(),s=!0,x.type==="mousedown"?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",$)):(document.addEventListener("touchmove",w),document.addEventListener("touchend",$)),a("dragStart")},$=x=>{s&&(s=!1,x.type==="mouseup"?(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",$)):(document.removeEventListener("touchmove",w),document.removeEventListener("touchend",$)),setTimeout(()=>a("dragStop"),0))},A=x=>{x.keyCode>=33&&x.keyCode<=40&&x.preventDefault();const V=o.value[d.value]??o.value;switch(x.keyCode){case 37:case 40:h(V-1);break;case 39:case 38:h(V+1);break;case 33:h(V+(l.max-l.min)/10);break;case 34:h(V-(l.max-l.min)/10);break;case 36:h(l.min);break;case 35:h(l.max)}},z=x=>{k(),B(x)};return(x,V)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"track",ref:r,class:["relative bg-slate-300",t.vertical?"h-full w-2 rounded-t-full rounded-b-full":"w-full h-2 rounded-r-full rounded-l-full"],role:"slider","aria-label":"slider-thumb","aria-valuemin":t.min,"aria-valuemax":t.max,"aria-valuenow":o.value[0]??o.value,"aria-valuetext":o.value},e.toHandlers(t.disabled?{}:{click:z},!0)),[t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute bg-vxvue",t.vertical?"w-full rounded-t-full rounded-b-full":"h-full rounded-r-full rounded-l-full"]),style:e.normalizeStyle(g.value)},null,6)),o.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(o.value,(p,f)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({id:f?null:e.unref(n).id,style:t.vertical?{bottom:m.value[f]+"%"}:{left:m.value[f]+"%"},"aria-label":"slider-thumb-"+(f+1)},{ref_for:!0},y.value,e.toHandlers(t.disabled?{}:{focus:()=>d.value=f,keydown:A,touchstart:b=>{d.value=f,S(b)},mousedown:b=>{d.value=f,S(b)},touchend:$,mouseup:$},!0)),null,16,Ft))),256)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,id:e.unref(n).id,style:t.vertical?{bottom:m.value+"%"}:{left:m.value+"%"},"aria-label":"slider-thumb"},y.value,e.toHandlers(t.disabled?{}:{focus:()=>d.value=0,keydown:A,touchstart:p=>{d.value=0,S(p)},mousedown:p=>{d.value=0,S(p)},touchend:$,mouseup:$},!0)),null,16,Pt))],16,Tt))}}),Ot=["data-active","onClick"],_t={class:"flex items-center space-x-1"},jt=["data-active"],Yt={__name:"Sortable",props:{columns:{type:Array,required:!0,validator:t=>{for(const c of t)if(c.label===void 0||c.prop===void 0)return!1;return!0}},rows:{type:Array,required:!0},offset:{type:Number,default:null},count:{type:Number,default:null},sortProp:{type:String,default:null},sortDirection:{type:String,default:null,validator:t=>!t||["asc","desc"].includes(t)},keyProperty:{type:String,default:"key"},headerClass:{type:String,default:"text-white bg-vxvue-700 [&_*[data-active]]:bg-vxvue-alt-800"},bodyClass:{type:String,default:"[&>*:nth-child(even)]:bg-vxvue-50 [&>*:nth-child(even)_*[data-active]]:bg-vxvue-alt-100 [&>*:nth-child(odd)_*[data-active]]:bg-vxvue-alt-50"}},emits:["before-sort","after-sort"],setup(t,{emit:c}){const l=t,o=c,a=e.ref(l.sortProp),n=e.ref(l.sortDirection),u=e.computed(()=>{let s=l.rows.slice();const r=l.columns.find(({prop:d})=>d===a.value);return r&&(n.value==="asc"&&r.sortAscFunction?s.sort(r.sortAscFunction):n.value==="desc"&&r.sortDescFunction?s.sort(r.sortDescFunction):s.sort((d,m)=>d[a.value]<m[a.value]?n.value==="asc"?-1:1:d[a.value]>m[a.value]?n.value==="asc"?1:-1:0)),s.slice(l.offset||0,(l.offset||0)+(l.count||s.length))}),i=s=>{o("before-sort",{prop:a.value,dir:n.value}),a.value===s?n.value=n.value==="asc"?"desc":"asc":(a.value=s,n.value=n.value||"asc"),e.nextTick(()=>o("after-sort",{prop:a.value,dir:n.value}))};return(s,r)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(s.$attrs.class||"w-full divide-y divide-y-slate-900 table-fixed")},[e.createElementVNode("thead",{class:e.normalizeClass(t.headerClass)},[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,d=>(e.openBlock(),e.createElementBlock("th",{key:d.prop,scope:"col","data-active":a.value===d.prop?"active":null,class:e.normalizeClass(["py-3 px-6 text-left",{"cursor-pointer":d.sortable},d.cssClass]),onClick:m=>d.sortable?i(d.prop):null},[e.renderSlot(s.$slots,d.prop+"-header",{column:d,sortDir:n.value,sortProp:a.value},()=>[e.createElementVNode("div",_t,[e.createElementVNode("span",null,e.toDisplayString(d.label),1),d.sortable?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value!==d.prop?e.unref(ne):n.value==="asc"?e.unref(oe):e.unref(re)),{key:0,class:"size-4"})):e.createCommentVNode("",!0)])])],10,Ot))),128))])],2),e.createElementVNode("tbody",{class:e.normalizeClass(t.bodyClass)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,d=>(e.openBlock(),e.createElementBlock("tr",{key:d[t.keyProperty],class:e.normalizeClass(d.cssClass)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,m=>(e.openBlock(),e.createElementBlock("td",{key:m.prop,"data-active":a.value===m.prop?"active":null,class:"overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis"},[e.renderSlot(s.$slots,m.prop,{row:d},()=>[e.createTextVNode(e.toDisplayString(d[m.prop]),1)])],8,jt))),128))],2))),128))],2)],2))}},Rt={class:"flex items-center space-x-2"},Ht=["disabled"],Zt=K(Object.assign({inheritAttrs:!1},{__name:"SubmitButton",props:{busy:Boolean,spinnerClass:{type:String,default:null},theme:{type:String,default:null}},emits:["submit"],setup(t,{emit:c}){const l=c;return(o,a)=>(e.openBlock(),e.createElementBlock("div",Rt,[e.createElementVNode("button",{class:e.normalizeClass([o.$attrs.class,t.theme]),disabled:o.$attrs.disabled||t.busy,type:"button",onClick:a[0]||(a[0]=n=>l("submit"))},[e.renderSlot(o.$slots,"default",{},void 0,!0)],10,Ht),t.busy?(e.openBlock(),e.createBlock(H,{key:0,class:e.normalizeClass(t.spinnerClass||["size-5",{error:"text-error",success:"text-success",default:"text-vxvue"}[t.theme||"default"]])},null,8,["class"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-646b7a90"]]),qt={class:"sm:hidden"},Ut={class:"hidden sm:block"},Wt={class:"border-b border-gray-200"},Kt={class:"flex -mb-px space-x-8","aria-label":"Tabs"},Xt=["aria-current","onClick"],Gt={__name:"Tabs",props:{items:{type:Array,default:()=>[]},activeIndex:{type:Number,default:0}},emits:["update:activeIndex"],setup(t,{emit:c}){const l=t,o=c,a=e.ref(l.items[l.activeIndex]||{}),n=e.computed(()=>{let i=[];return l.items.forEach((s,r)=>{s.disabled||i.push({label:s.name,key:r})}),i});e.watch(()=>l.activeIndex,i=>{a.value=l.items[i]||{}});const u=i=>{i.disabled||(a.value=i,o("update:activeIndex",l.items.indexOf(i)))};return(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",qt,[e.createVNode(te,{options:n.value,"model-value":t.activeIndex,class:"w-full","onUpdate:modelValue":s[0]||(s[0]=r=>o("update:activeIndex",r))},null,8,["options","model-value"])]),e.createElementVNode("div",Ut,[e.createElementVNode("div",Wt,[e.createElementVNode("nav",Kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,r=>(e.openBlock(),e.createElementBlock("a",{key:r.name,href:"#",class:e.normalizeClass(["group inline-flex items-center py-4 px-1 border-b-4 font-medium no-underline! border-transparent",{"border-vxvue text-vxvue":a.value===r,"cursor-not-allowed text-gray-400":r.disabled,"text-gray-900 hover:text-vxvue-600 hover:border-vxvue-600":a.value!==r&&!r.disabled}]),"aria-current":a.value===r?"page":void 0,onClick:e.withModifiers(d=>u(r),["prevent"])},[e.renderSlot(i.$slots,"icon",{tab:r}),e.createElementVNode("span",null,[e.renderSlot(i.$slots,"default",{tab:r},()=>[e.createTextVNode(e.toDisplayString(r.name),1)])]),e.renderSlot(i.$slots,"badge",{tab:r},()=>[r.badge?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block text-current",{"bg-gray-100":r.disabled,"bg-vxvue-50":a.value===r,"bg-gray-200":a.value!==r&&!r.disabled}])},e.toDisplayString(r.badge),3)):e.createCommentVNode("",!0)])],10,Xt))),128))])])])],64))}},Jt={mounted:t=>t.focus()},Qt={mounted:(t,c)=>{if(!["INPUT","TEXTAREA"].includes(t.nodeName)){let l=t.querySelector('input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="url"],input[type="tel"]');l||(l=t.querySelector("textarea")),t=l}if(t){if(t.querySelector("label"))throw new Error("VFloatingLabel directive: LABEL element found.");const l=Math.random().toString(36).substring(2),o=document.createElement("div");o.classList.add("relative","isolate");const a=document.createElement("label");a.classList.add(..."absolute px-2 left-1 top-2 scale-90 text-sm z-[var(--zIndex-label)] origin-[0] bg-white -translate-y-4 transform-gpu duration-200".split(" "),..."peer-focus:top-2 peer-focus:scale-90 peer-focus:-translate-y-full".split(" "),..."peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2".split(" "),t.nodeName==="TEXTAREA"?"peer-placeholder-shown:top-4":"peer-placeholder-shown:top-1/2"),c.value?.invalid?a.classList.add("text-error","peer-focus:text-error"):a.classList.add("peer-focus:text-blue-600"),t.getAttribute("required")!==null&&a.classList.add("required"),a.setAttribute("for",t.getAttribute("id")||l+"-element"),a.innerHTML=c.value?.label||t.getAttribute("placeholder")||l+"-label",t.classList.add("peer"),t.setAttribute("placeholder"," "),t.setAttribute("id",t.getAttribute("id")||l+"-element"),t.parentElement.replaceChild(o,t),o.appendChild(t),o.appendChild(a)}},updated:(t,c)=>{const l=t.parentNode.querySelector("label");if(!l)return;const o=t.getAttribute("placeholder")?.trim();l.innerHTML=c.value?.label||o||l.innerHTML,o&&t.setAttribute("placeholder"," "),c.value?.invalid?(l.classList.add("text-error","peer-focus:text-error"),l.classList.remove("peer-focus:text-blue-600")):(l.classList.remove("text-error","peer-focus:text-error"),l.classList.add("peer-focus:text-blue-600")),l.classList[t.getAttribute("required")!==null?"add":"remove"]("required")}};v.Accordion=le,v.AccordionPanel=me,v.Autocomplete=Ce,v.Confirm=Ie,v.DateInput=ee,v.Datepicker=Xe,v.FormFileButton=Qe,v.FormSelect=te,v.FormSwitch=ot,v.MessageToast=pt,v.Modal=kt,v.Pagination=vt,v.PasswordInput=Mt,v.SimpleTree=At,v.Sizable=Lt,v.Slider=It,v.Sortable=Yt,v.Spinner=H,v.SubmitButton=Zt,v.Tabs=Gt,v.VFloatingLabel=Qt,v.VFocus=Jt,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|