@open-xamu-co/ui-components-vue 1.0.0

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.
Files changed (135) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +7 -0
  3. package/README.md +3 -0
  4. package/dist/_virtual/chunk_h.cjs.js +1 -0
  5. package/dist/_virtual/chunk_h.es.js +4372 -0
  6. package/dist/_virtual/index.cjs.js +1 -0
  7. package/dist/_virtual/index.es.js +39 -0
  8. package/dist/_virtual/lodash.cjs.js +27 -0
  9. package/dist/_virtual/lodash.es.js +3686 -0
  10. package/dist/_virtual/nanoid.cjs.js +1 -0
  11. package/dist/_virtual/nanoid.es.js +4 -0
  12. package/dist/_virtual/sweetalert2.cjs.js +65 -0
  13. package/dist/_virtual/sweetalert2.es.js +1415 -0
  14. package/dist/_virtual/validator.cjs.js +7 -0
  15. package/dist/_virtual/validator.es.js +4508 -0
  16. package/dist/components/Dropdown.vue.cjs +1 -0
  17. package/dist/components/Dropdown.vue.d.ts +64 -0
  18. package/dist/components/Dropdown.vue.mjs +9 -0
  19. package/dist/components/Modal.vue.cjs +1 -0
  20. package/dist/components/Modal.vue.d.ts +112 -0
  21. package/dist/components/Modal.vue.mjs +9 -0
  22. package/dist/components/Slider.vue.cjs +1 -0
  23. package/dist/components/Slider.vue.d.ts +110 -0
  24. package/dist/components/Slider.vue.mjs +9 -0
  25. package/dist/components/Table.vue.cjs +1 -0
  26. package/dist/components/Table.vue.d.ts +98 -0
  27. package/dist/components/Table.vue.mjs +9 -0
  28. package/dist/components/action/Button.vue.cjs +1 -0
  29. package/dist/components/action/Button.vue.d.ts +149 -0
  30. package/dist/components/action/Button.vue.mjs +9 -0
  31. package/dist/components/action/ButtonLink.vue.cjs +1 -0
  32. package/dist/components/action/ButtonLink.vue.d.ts +155 -0
  33. package/dist/components/action/ButtonLink.vue.mjs +9 -0
  34. package/dist/components/action/ButtonToggle.vue.cjs +1 -0
  35. package/dist/components/action/ButtonToggle.vue.d.ts +155 -0
  36. package/dist/components/action/ButtonToggle.vue.mjs +9 -0
  37. package/dist/components/action/Link.vue.cjs +1 -0
  38. package/dist/components/action/Link.vue.d.ts +155 -0
  39. package/dist/components/action/Link.vue.mjs +9 -0
  40. package/dist/components/base/Action.vue.cjs +1 -0
  41. package/dist/components/base/Action.vue.d.ts +95 -0
  42. package/dist/components/base/Action.vue.mjs +9 -0
  43. package/dist/components/base/Img.vue.cjs +1 -0
  44. package/dist/components/base/Img.vue.d.ts +48 -0
  45. package/dist/components/base/Img.vue.mjs +9 -0
  46. package/dist/components/base/Input.vue.cjs +1 -0
  47. package/dist/components/base/Input.vue.d.ts +71 -0
  48. package/dist/components/base/Input.vue.mjs +9 -0
  49. package/dist/components/base/Select.vue.cjs +1 -0
  50. package/dist/components/base/Select.vue.d.ts +61 -0
  51. package/dist/components/base/Select.vue.mjs +9 -0
  52. package/dist/components/base/Wrapper.vue.cjs +1 -0
  53. package/dist/components/base/Wrapper.vue.d.ts +42 -0
  54. package/dist/components/base/Wrapper.vue.mjs +9 -0
  55. package/dist/components/box/Action.vue.cjs +1 -0
  56. package/dist/components/box/Action.vue.d.ts +170 -0
  57. package/dist/components/box/Action.vue.mjs +9 -0
  58. package/dist/components/box/Message.vue.cjs +1 -0
  59. package/dist/components/box/Message.vue.d.ts +143 -0
  60. package/dist/components/box/Message.vue.mjs +9 -0
  61. package/dist/components/form/Input.vue.cjs +1 -0
  62. package/dist/components/form/Input.vue.d.ts +49 -0
  63. package/dist/components/form/Input.vue.mjs +9 -0
  64. package/dist/components/form/InputCountriesAPI.vue.d.ts +45 -0
  65. package/dist/components/form/InputLoop.vue.d.ts +44 -0
  66. package/dist/components/form/InputNValues.vue.d.ts +34 -0
  67. package/dist/components/form/InputOptions.vue.d.ts +22 -0
  68. package/dist/components/form/Simple.vue.cjs +1 -0
  69. package/dist/components/form/Simple.vue.d.ts +45 -0
  70. package/dist/components/form/Simple.vue.mjs +9 -0
  71. package/dist/components/form/Stages.vue.cjs +1 -0
  72. package/dist/components/form/Stages.vue.d.ts +77 -0
  73. package/dist/components/form/Stages.vue.mjs +9 -0
  74. package/dist/components/icon/Fa.vue.cjs +1 -0
  75. package/dist/components/icon/Fa.vue.d.ts +47 -0
  76. package/dist/components/icon/Fa.vue.mjs +9 -0
  77. package/dist/components/icon/Simple.vue.cjs +1 -0
  78. package/dist/components/icon/Simple.vue.d.ts +29 -0
  79. package/dist/components/icon/Simple.vue.mjs +9 -0
  80. package/dist/components/index.cjs +1 -0
  81. package/dist/components/index.d.ts +32 -0
  82. package/dist/components/index.mjs +40 -0
  83. package/dist/components/input/Color.vue.d.ts +88 -0
  84. package/dist/components/input/File.vue.cjs +1 -0
  85. package/dist/components/input/File.vue.d.ts +135 -0
  86. package/dist/components/input/File.vue.mjs +9 -0
  87. package/dist/components/input/Text.vue.cjs +1 -0
  88. package/dist/components/input/Text.vue.d.ts +128 -0
  89. package/dist/components/input/Text.vue.mjs +9 -0
  90. package/dist/components/input/Toggle.vue.cjs +1 -0
  91. package/dist/components/input/Toggle.vue.d.ts +113 -0
  92. package/dist/components/input/Toggle.vue.mjs +9 -0
  93. package/dist/components/loader/Content.vue.cjs +1 -0
  94. package/dist/components/loader/Content.vue.d.ts +73 -0
  95. package/dist/components/loader/Content.vue.mjs +9 -0
  96. package/dist/components/loader/ContentFetch.vue.cjs +1 -0
  97. package/dist/components/loader/ContentFetch.vue.d.ts +60 -0
  98. package/dist/components/loader/ContentFetch.vue.mjs +9 -0
  99. package/dist/components/loader/Simple.vue.cjs +1 -0
  100. package/dist/components/loader/Simple.vue.d.ts +47 -0
  101. package/dist/components/loader/Simple.vue.mjs +9 -0
  102. package/dist/components/pagination/Content.vue.cjs +1 -0
  103. package/dist/components/pagination/Content.vue.d.ts +66 -0
  104. package/dist/components/pagination/Content.vue.mjs +9 -0
  105. package/dist/components/pagination/Simple.vue.cjs +1 -0
  106. package/dist/components/pagination/Simple.vue.d.ts +41 -0
  107. package/dist/components/pagination/Simple.vue.mjs +9 -0
  108. package/dist/components/select/Filter.vue.cjs +1 -0
  109. package/dist/components/select/Filter.vue.d.ts +110 -0
  110. package/dist/components/select/Filter.vue.mjs +9 -0
  111. package/dist/components/select/Simple.vue.cjs +1 -0
  112. package/dist/components/select/Simple.vue.d.ts +88 -0
  113. package/dist/components/select/Simple.vue.mjs +9 -0
  114. package/dist/components/value/Complex.vue.cjs +1 -0
  115. package/dist/components/value/Complex.vue.d.ts +80 -0
  116. package/dist/components/value/Complex.vue.mjs +9 -0
  117. package/dist/components/value/Simple.vue.cjs +1 -0
  118. package/dist/components/value/Simple.vue.d.ts +50 -0
  119. package/dist/components/value/Simple.vue.mjs +9 -0
  120. package/dist/composables/browser.d.ts +11 -0
  121. package/dist/composables/countries.d.ts +21 -0
  122. package/dist/composables/fetch.d.ts +10 -0
  123. package/dist/composables/helpers.d.ts +2 -0
  124. package/dist/composables/input.d.ts +9 -0
  125. package/dist/composables/modifiers.d.ts +9 -0
  126. package/dist/composables/state.d.ts +9 -0
  127. package/dist/composables/theme.d.ts +28 -0
  128. package/dist/composables/uuid.d.ts +9 -0
  129. package/dist/plugin.cjs +1 -0
  130. package/dist/plugin.d.ts +8 -0
  131. package/dist/plugin.mjs +36 -0
  132. package/dist/types/countries.d.ts +12 -0
  133. package/dist/types/props.d.ts +77 -0
  134. package/dist/vite.svg +22 -0
  135. package/package.json +162 -0
@@ -0,0 +1,4372 @@
1
+ import { _ as H } from "./lodash.es.js";
2
+ import { D as _t } from "./sweetalert2.es.js";
3
+ import { defineComponent as j, inject as de, computed as O, openBlock as i, createBlock as A, resolveDynamicComponent as ve, normalizeProps as X, guardReactiveProps as le, mergeProps as z, unref as r, withCtx as C, renderSlot as x, createElementBlock as b, Fragment as Y, createTextVNode as ne, toDisplayString as T, createCommentVNode as L, watch as ce, setBlockTracking as xe, createElementVNode as E, renderList as oe, ref as W, onMounted as Ve, onUnmounted as qe, normalizeClass as G, createVNode as k, withModifiers as ie, reactive as bt, normalizeStyle as $e, Teleport as wt, withDirectives as Fe, vShow as je, Transition as ot, getCurrentInstance as We, resolveComponent as nt, useSlots as Ct, onBeforeUnmount as kt } from "vue";
4
+ import { v as pe } from "./validator.es.js";
5
+ import { n as $t } from "./nanoid.es.js";
6
+ const He = /* @__PURE__ */ j({
7
+ name: "BaseImg",
8
+ inheritAttrs: !1,
9
+ __name: "Img",
10
+ props: {
11
+ /**
12
+ * image url or path
13
+ */
14
+ src: {
15
+ type: String,
16
+ default: null
17
+ },
18
+ alt: {
19
+ type: String,
20
+ default: null
21
+ },
22
+ format: {
23
+ type: String,
24
+ default: null
25
+ },
26
+ loading: {
27
+ type: String,
28
+ default: "lazy"
29
+ }
30
+ },
31
+ setup(l) {
32
+ const t = l, e = de("xamu"), n = O(() => (e == null ? void 0 : e.imageComponent) || "img");
33
+ return (m, c) => (i(), A(ve(n.value), X(le({ ...m.$attrs, ...t })), null, 16));
34
+ }
35
+ }), st = [
36
+ {
37
+ mime: "image/jpeg",
38
+ pattern: [255, 216, 255],
39
+ mask: [255, 255, 255]
40
+ },
41
+ {
42
+ mime: "image/png",
43
+ pattern: [137, 80, 78, 71, 13, 10, 26, 10],
44
+ mask: [255, 255, 255, 255]
45
+ }
46
+ ];
47
+ [
48
+ ...st
49
+ ];
50
+ const At = (l, t) => {
51
+ const e = new FileReader(), n = l.slice(0, 4), m = (c, o) => {
52
+ for (let a = 0, s = o.mask.length; a < s; ++a)
53
+ if ((c[a] & o.mask[a]) - o.pattern[a] !== 0)
54
+ return !1;
55
+ return !0;
56
+ };
57
+ return new Promise((c) => {
58
+ e.onload = (o) => {
59
+ if (o.target && !o.target.error) {
60
+ const a = new Uint8Array(o.target.result);
61
+ for (let s = 0, u = t.length; s < u; ++s)
62
+ m(a, t[s]) && c(!0);
63
+ c(!1);
64
+ }
65
+ }, e.readAsArrayBuffer(n);
66
+ });
67
+ }, St = (l) => {
68
+ const t = new FileReader();
69
+ return new Promise((e) => {
70
+ t.onload = (n) => {
71
+ var m;
72
+ e((m = n.target) == null ? void 0 : m.result);
73
+ }, t.readAsDataURL(l);
74
+ });
75
+ }, Bt = (l, t) => new File([l], t, {
76
+ type: l.type,
77
+ lastModified: l.lastModified
78
+ });
79
+ function be(l) {
80
+ return typeof l == "object" && l !== null ? l : { value: l };
81
+ }
82
+ function Et(l, t = "en-US") {
83
+ const e = ((/* @__PURE__ */ new Date()).getTime() - l.getTime()) / 1e3, n = Math.floor(e / 60), m = Math.floor(n / 60), c = Math.floor(m / 24), o = Math.floor(c / 30), a = Math.floor(o / 12), s = new Intl.RelativeTimeFormat(t, { numeric: "auto" });
84
+ return a > 0 ? s.format(0 - a, "year") : o > 0 ? s.format(0 - o, "month") : c > 0 ? s.format(0 - c, "day") : m > 0 ? s.format(0 - m, "hour") : n > 0 ? s.format(0 - n, "minute") : s.format(0 - e, "second");
85
+ }
86
+ var he;
87
+ (function(l) {
88
+ l.SELECT = "SELECT", l.SELECT_FILTER = "SELECT_FILTER", l.CHOICE = "CHOICE", l.FILE = "FILE", l.BOOLEAN = "BOOLEAN", l.TEXT = "TEXT", l.EMAIL = "EMAIL", l.NUMBER = "NUMBER", l.PASSWORD = "PASSWORD", l.LONGTEXT = "LONGTEXT", l.COLOR = "COLOR";
89
+ })(he || (he = {}));
90
+ var Ie;
91
+ (function(l) {
92
+ l.NEW_PASSWORD = "NEW_PASSWORD", l.CELLPHONE = "CELLPHONE", l.PHONE = "PHONE", l.ID = "ID", l.SCHEDULE = "SCHEDULE", l.LOCATION = "LOCATION";
93
+ })(Ie || (Ie = {}));
94
+ const P = Object.assign(Object.assign({}, he), Ie);
95
+ var Ye;
96
+ (function(l) {
97
+ l.LAPTOP = "(max-width: 1080px)", l.TABLET = "(max-width: 768px)", l.MOBILE = "(max-width: 576px)";
98
+ })(Ye || (Ye = {}));
99
+ var ze;
100
+ (function(l) {
101
+ l.PRIMARY = "primary", l.PRIMARY_COMPLEMENT = "primary-complement", l.SECONDARY = "secondary", l.SECONDARY_COMPLEMENT = "secondary-complement", l.DANGER = "danger", l.SUCCESS = "success";
102
+ })(ze || (ze = {}));
103
+ var De;
104
+ (function(l) {
105
+ l.LIGHT = "light", l.DARK = "dark";
106
+ })(De || (De = {}));
107
+ const ue = Object.assign(Object.assign({}, ze), De), Ml = [
108
+ // base
109
+ "BaseImg",
110
+ "BaseAction",
111
+ "BaseInput",
112
+ "BaseSelect",
113
+ "BaseWrapper",
114
+ // icon
115
+ "IconSimple",
116
+ "IconFa",
117
+ // action
118
+ "ActionButton",
119
+ "ActionButtonLink",
120
+ "ActionButtonToggle",
121
+ "ActionLink",
122
+ // input
123
+ "InputFile",
124
+ "InputText",
125
+ "InputToggle",
126
+ // select
127
+ "SelectSimple",
128
+ "SelectFilter",
129
+ // value
130
+ "ValueSimple",
131
+ "ValueComplex",
132
+ // box
133
+ "BoxAction",
134
+ "BoxMessage",
135
+ // loader
136
+ "LoaderSimple",
137
+ "LoaderContent",
138
+ "LoaderContentFetch",
139
+ // pagination
140
+ "PaginationSimple",
141
+ "PaginationContent",
142
+ // form
143
+ "FormInput",
144
+ "FormSimple",
145
+ "FormStages",
146
+ // singletons
147
+ "Modal",
148
+ "Dropdown",
149
+ "Table",
150
+ "Slider"
151
+ ];
152
+ function Z(l = {}) {
153
+ function t(m, c = {}, o = `No locale for "${m}" provided`) {
154
+ let a = H.get(l.locale || {}, m, o);
155
+ const s = /\{(.+?)\}/g, u = a.split("|"), p = typeof c == "number" ? c : (c == null ? void 0 : c.count) ?? -1;
156
+ return p > -1 && u.length > 1 && (u.length === 2 ? a = u[p > 1 ? 1 : 0] : u.length === 3 && (a = u[p ? p > 1 ? 2 : 1 : 0])), H.template(H.trim(a), { interpolate: s })(typeof c == "number" ? { count: p } : c);
157
+ }
158
+ function e(m) {
159
+ return H.has(l.locale || {}, m);
160
+ }
161
+ function n(m) {
162
+ return e(m) && t(m) || m;
163
+ }
164
+ return {
165
+ t,
166
+ te: e,
167
+ tet: n
168
+ };
169
+ }
170
+ function Vt(l) {
171
+ return [...new Set([l].flat(2))].join(" ").trim();
172
+ }
173
+ function rt(l, t = {}) {
174
+ if (!l)
175
+ return [];
176
+ const { prefix: e, modifier: n, divider: m } = {
177
+ prefix: "",
178
+ modifier: "",
179
+ divider: "",
180
+ // override defaults
181
+ ...t
182
+ }, c = (t == null ? void 0 : t.modifierClass) || `${e}--${n}`;
183
+ return Array.isArray(l) ? l.map((o) => typeof o == "string" ? c + m + o : Object.keys(o).map((a) => {
184
+ if (o[a])
185
+ return c + a;
186
+ })).flat(2).filter((o) => !!o) : typeof l == "boolean" ? [c] : rt([l], { modifierClass: c });
187
+ }
188
+ function Lt(l, t = 0) {
189
+ if (typeof l != "string") {
190
+ const [e, n] = Object.entries(l)[t];
191
+ return n ? e : void 0;
192
+ }
193
+ return l;
194
+ }
195
+ function J(l = {}) {
196
+ const t = typeof window < "u", e = t && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
197
+ return {
198
+ isBrowser: t,
199
+ isTouchDevice: e,
200
+ getClassesString: Vt,
201
+ getModifierClasses: rt,
202
+ getPropData: Lt
203
+ };
204
+ }
205
+ function Le(l = {}, t = {}) {
206
+ const { t: e } = Z(l), { swal: n } = l, c = { ...{
207
+ timer: 1700,
208
+ showConfirmButton: !1,
209
+ heightAuto: !1,
210
+ reverseButtons: !0,
211
+ buttonsStyling: !1,
212
+ cancelButtonText: e("swal.cancel"),
213
+ allowOutsideClick: () => !o.isLoading(),
214
+ allowEscapeKey: () => !o.isLoading(),
215
+ customClass: {
216
+ confirmButton: "bttn",
217
+ cancelButton: "bttnToggle",
218
+ denyButton: "link"
219
+ }
220
+ }, ...n == null ? void 0 : n.overrides, ...t }, o = _t.mixin(c), a = {
221
+ icon: "warning",
222
+ timer: void 0,
223
+ showCancelButton: !0,
224
+ showConfirmButton: !0,
225
+ confirmButtonText: e("swal.continue"),
226
+ allowOutsideClick: () => !o.isLoading(),
227
+ allowEscapeKey: () => !o.isLoading(),
228
+ customClass: {
229
+ confirmButton: ["bttn", "--tm-danger-light"],
230
+ cancelButton: "bttnToggle",
231
+ denyButton: "link"
232
+ }
233
+ }, s = {
234
+ title: e("loading"),
235
+ text: e("swal.dont_close_window"),
236
+ timer: void 0,
237
+ willOpen: () => o.showLoading(),
238
+ allowOutsideClick: () => !o.isLoading(),
239
+ allowEscapeKey: () => !o.isLoading()
240
+ }, u = { ...a, ...n == null ? void 0 : n.preventOverrides }, p = { ...s, ...n == null ? void 0 : n.loaderOverrides };
241
+ return o.firePrevent = function(h = {}) {
242
+ const y = { ...u, ...h };
243
+ return o.fire(y);
244
+ }, o.fireLoader = function(h = {}) {
245
+ const y = { ...p, ...h };
246
+ return o.fire(y);
247
+ }, o;
248
+ }
249
+ function Ce(l, t) {
250
+ return Array.isArray(l) ? l.length ? l.every((e, n) => {
251
+ var m;
252
+ return Ce(e) || t && !((m = t == null ? void 0 : t[n]) != null && m.required);
253
+ }) : !1 : !(!l && l !== !1 && l !== 0);
254
+ }
255
+ function it(l, t) {
256
+ if (!Ce(l, t.defaults))
257
+ return !1;
258
+ switch (t.type) {
259
+ case P.PHONE:
260
+ return Array.isArray(l) && l[1].toString().length >= 7;
261
+ case P.CELLPHONE:
262
+ return Array.isArray(l) && l[1].toString().length === 10;
263
+ case P.NEW_PASSWORD:
264
+ return Array.isArray(l) && l[0] === l[1];
265
+ case P.EMAIL:
266
+ return typeof l == "string" && pe.isEmail(l);
267
+ default:
268
+ return !0;
269
+ }
270
+ }
271
+ const ut = (l, t = !1) => {
272
+ const { values: e, multiple: n, required: m, min: c, max: o } = l;
273
+ if (!e || n && (e.length < c || e.length > o))
274
+ return !1;
275
+ const a = !!e.length && e.every((u) => it(u, l)), s = e.every((u) => Ce(u, l.defaults));
276
+ return a || !s && !m && !t;
277
+ };
278
+ function Me(l) {
279
+ switch (l) {
280
+ case P.ID:
281
+ return ["Type", "Number"];
282
+ case P.CELLPHONE:
283
+ case P.PHONE:
284
+ return ["Indicative", "Number"];
285
+ case P.LOCATION:
286
+ return ["Country", "State", "City"];
287
+ default:
288
+ return ["", ""];
289
+ }
290
+ }
291
+ function dt(l) {
292
+ const t = [];
293
+ return l.forEach((e) => {
294
+ ut(e) || t.push({
295
+ name: e.name,
296
+ invalidValue: e.values || []
297
+ });
298
+ }), t;
299
+ }
300
+ function mt(l, t = !0) {
301
+ return l.reduce((e, n, m) => {
302
+ if (!n.name || !n.values || !Array.isArray(n.values) || !n.values.length)
303
+ return n.name || console.log(`Missing name on input with index ${m}`), e;
304
+ if (n.values.forEach((c) => {
305
+ if (!(!Ce(c, n.defaults) && !n.required))
306
+ switch (n.type) {
307
+ case P.ID:
308
+ case P.PHONE:
309
+ case P.CELLPHONE:
310
+ case P.LOCATION: {
311
+ if (!Array.isArray(c))
312
+ return;
313
+ Me(n.type).forEach((o, a) => {
314
+ const s = n.name + o, u = c[a];
315
+ s in e ? Array.isArray(e[s]) && e[s].push(u) : e[s] = [u];
316
+ });
317
+ break;
318
+ }
319
+ default: {
320
+ const o = (p) => n.defaults ? p : p[0], a = (p) => n.type === P.NUMBER ? Number(p) : p, s = n.name, u = Array.isArray(c) ? o(c) : a(c);
321
+ s in e ? Array.isArray(e[s]) && e[s].push(u) : e[s] = [u];
322
+ break;
323
+ }
324
+ }
325
+ }), !n.multiple) {
326
+ if (t) {
327
+ const c = n.name, o = e[c];
328
+ Array.isArray(o) && o.length === 1 && (e[c] = o[0]);
329
+ }
330
+ Me(n.type).filter((c) => c).forEach((c) => {
331
+ const o = n.name + c, a = e[o];
332
+ Array.isArray(a) && a.length === 1 && (e[o] = a[0]);
333
+ });
334
+ }
335
+ return e;
336
+ }, {});
337
+ }
338
+ function Ke(l) {
339
+ if (!Array.isArray(l))
340
+ return { values: l, invalidInputs: [] };
341
+ l = l.map((n) => {
342
+ var m;
343
+ return n.clone({
344
+ values: (((m = n.values) == null ? void 0 : m.slice()) || []).map((c) => Array.isArray(c) ? c.slice().map((o) => o) : c)
345
+ });
346
+ });
347
+ const t = mt(l), e = dt(l).filter(({ name: n }) => t[n] !== void 0);
348
+ return {
349
+ values: t,
350
+ invalidInputs: e
351
+ };
352
+ }
353
+ function ct(l = {}) {
354
+ const { t } = Z(l), { isBrowser: e } = J(l), n = Le(l);
355
+ async function m(c, o = [], a) {
356
+ var d;
357
+ const { values: s, invalidInputs: u } = Ke(o), p = ((d = a == null ? void 0 : a.target) == null ? void 0 : d.closest("dialog")) || "body";
358
+ let h, y = !1, g = { data: null };
359
+ if (u.length)
360
+ e && n.fire({
361
+ title: t("swal.incomplete_data"),
362
+ text: t("swal.incomplete_data_message"),
363
+ icon: "warning",
364
+ target: p
365
+ });
366
+ else
367
+ try {
368
+ e && n.fireLoader({ target: p }), g = await c(s), g != null && g.errors && (h = g.errors, (h || !g.data) && (y = !0));
369
+ } catch (D) {
370
+ if (h = D, y = !0, console.error(D), e) {
371
+ const { value: F } = await n.fire({
372
+ title: t("swal.connection_error"),
373
+ text: t("swal.connection_error_message"),
374
+ icon: "error",
375
+ timer: void 0,
376
+ showConfirmButton: !0,
377
+ confirmButtonText: t("swal.connection_error_confirm"),
378
+ target: p
379
+ });
380
+ F && location.reload();
381
+ }
382
+ }
383
+ const v = u.length > 0 || !!(h && !y), S = y || v, $ = g.data;
384
+ return e && !v && $ && n.close(), {
385
+ response: $,
386
+ invalidInputs: u,
387
+ withErrors: S,
388
+ requestHadErrors: y,
389
+ validationHadErrors: v,
390
+ errors: h,
391
+ modalTarget: p
392
+ };
393
+ }
394
+ return {
395
+ utils: {
396
+ notEmptyValue: Ce,
397
+ isValidValue: it,
398
+ isValidFormInputValue: ut,
399
+ getInputSuffixes: Me,
400
+ getFormInputsInvalids: dt,
401
+ getFormInputsValues: mt,
402
+ getFormValues: Ke
403
+ },
404
+ getResponse: m
405
+ };
406
+ }
407
+ const Xe = {
408
+ yes: "Yes",
409
+ no: "No",
410
+ increase: "increase",
411
+ decrease: "Decrease",
412
+ could_not_get_data: "Couldn't get the data",
413
+ nothing_to_show: "Nothing to show",
414
+ loading: "Loading...",
415
+ close: "Close",
416
+ ok: "Ok",
417
+ see_value: "See value",
418
+ see_name: 'See: "{name}"',
419
+ add: "Add",
420
+ clear: "Clear",
421
+ required_verification: "* Required. The information provided will be verified.",
422
+ previous: "Previous",
423
+ next: "Next",
424
+ send: "Send",
425
+ delete: "Select to delete | Delete | Delete {count}",
426
+ delete_all: "Delete all",
427
+ pick: "Pick",
428
+ refresh: "Refresh",
429
+ swal: {
430
+ cancel: "Cancel",
431
+ continue: "Continue",
432
+ connection_error: "¡Connection error!",
433
+ connection_error_message: "The server is not responding. Please check your network or try again later",
434
+ connection_error_confirm: "Retry",
435
+ incomplete_data: "Incomplete data",
436
+ incomplete_data_message: "Fill the data acorddinly",
437
+ dont_close_window: "Don't close this window while we finish the task"
438
+ }
439
+ }, Qe = {
440
+ select_placeholder: "--SELECT--",
441
+ select_restablish_field: "Restablish field",
442
+ select_filter_options: "Type or Double click for options",
443
+ file_one_of_amount: "{count} of {amount}",
444
+ file_delete_files: "Delete file | Delete files",
445
+ file_thumb: "Thumbnail",
446
+ file_choose_file: "Choose a file | Choose files",
447
+ file_or_drop_files_here: "Or drop it here | Or drop them here",
448
+ file_max_file_size_mb: "maximum {size}MB per file",
449
+ file_drop_files_here: "Drop file here | Drop files here",
450
+ file_completed: "Completed",
451
+ file_loading_files: "Loading file... | Loading files...",
452
+ swal: {
453
+ file_limit: "File limit",
454
+ file_limit_text: "This field only allows {amount} file | This field only allows {amount} files",
455
+ file_wrong_format_image: "Wrong format",
456
+ file_wrong_format_image_text: "This field only allows image files",
457
+ file_too_big: "File too big",
458
+ file_too_big_text: "The file exceeds the allowed size",
459
+ file_unknown_error: "Something went wrong",
460
+ file_unknown_error_text: "There was an error uploding the files, try again later"
461
+ }
462
+ }, Je = {
463
+ modal_taking_too_long: "Taking too long?",
464
+ swal: {
465
+ modal_unauthorized: "Unauthorized",
466
+ modal_unauthorized_text: "You are not allowed to perform this action"
467
+ }
468
+ }, Ot = {
469
+ form_required_options: "Options are required",
470
+ form_requires_n_values: "No values are required | A value is required | {count} values are required",
471
+ form_country: "Look for country",
472
+ form_state: "Look for state",
473
+ form_city: "Look for city",
474
+ form_desired_password: "Desired password",
475
+ form_confirm_password: "Confirm password",
476
+ form_check_password: "Check password",
477
+ form_password: "Password",
478
+ form_email: "E-mail address",
479
+ form_phone_line: "Phone line",
480
+ form_cellphone: "Cellphone number",
481
+ form_id_number: "ID number",
482
+ form_complete_the_field: "Complete the field",
483
+ form_location: "Location",
484
+ form_required_field: "This field is required",
485
+ form_use_valid_email: "You should use a valid E-mail address",
486
+ form_use_valid_phone: "Too short. Use a valid phone number",
487
+ form_use_valid_cellphone: "You should use a valid cellphone number",
488
+ form_unmatching_passwords: "The passwords are unmatching",
489
+ form_invalid_data: "Invalid data"
490
+ // swal: {},
491
+ }, Ze = {
492
+ table_see_values: "See {name}",
493
+ table_see_name: 'See: "{name}"',
494
+ table_create_new: "Create new",
495
+ table_quantity: "Quantity: {count}",
496
+ table_modify: "Modify",
497
+ table_select: "Select",
498
+ table_select_all: "Select all",
499
+ table_update: "Update",
500
+ table_update_name: 'Update: "{name}"',
501
+ table_delete: "Delete",
502
+ table_delete_name: 'Delete: "{name}"',
503
+ table_showing_name: 'Showing: "{name}"',
504
+ table_sort_by_name: 'Sort by: "{name}"',
505
+ table_duplicate: "Duplicate",
506
+ table_options: "Options",
507
+ table_open_url: "Open URL",
508
+ swal: {
509
+ table_delete_node_title: "Are you sure you want to delete this element?",
510
+ table_delete_node_disclaimer: "Remember that you wont be able to recover this element data and you will lost all of your work",
511
+ table_deleted: "Successfull deletion",
512
+ table_delete_nodes_title: "Are you sure you want to delete this element? | Are you sure you want to delete these {count} elements?",
513
+ table_delete_nodes_disclaimer: "Remember that you wont be able to recover these elements data and you will lost all of your work",
514
+ table_possibly_not_deleted: "The item may not have been deleted | The items may not have been deleted",
515
+ table_updated: "Successfull update",
516
+ table_possibly_not_updated: "The item may not have been updated | The items may not have been updated",
517
+ table_cloned: "Successfull cloning",
518
+ table_possibly_not_cloned: "The item may not have been cloned | The items may not have been cloned"
519
+ }
520
+ }, Tt = {
521
+ pagination_items: "No items | Single item | {count} items",
522
+ pagination_pages: "No pages | Single page | {count} pages",
523
+ pagination_order_relevance: "Order: relevance",
524
+ pagination_order_recent: "Order: more recent",
525
+ pagination_order_older: "Order: more older",
526
+ pagination_order_expensive: "Order: lower price",
527
+ pagination_order_cheaper: "Order: high price",
528
+ pagination_order_az: "Order: alphabetically (Asc.)",
529
+ pagination_order_za: "Order: alphabetically (Desc.)",
530
+ pagination_filter_by: "Filter by:"
531
+ // swal: {},
532
+ }, Ul = {
533
+ ...H.omit(Xe, "swal"),
534
+ ...H.omit(Qe, "swal"),
535
+ ...H.omit(Je, "swal"),
536
+ ...H.omit(Ot, "swal"),
537
+ ...H.omit(Ze, "swal"),
538
+ ...H.omit(Tt, "swal"),
539
+ swal: {
540
+ ...Xe.swal,
541
+ ...Qe.swal,
542
+ ...Je.swal,
543
+ // ...localeForm.swal,
544
+ ...Ze.swal
545
+ // ...localePagination.swal,
546
+ }
547
+ }, et = {
548
+ yes: "Si",
549
+ no: "No",
550
+ increase: "Aumentar",
551
+ decrease: "Disminuir",
552
+ could_not_get_data: "No se pudo obtener los datos",
553
+ nothing_to_show: "Nada para mostrar",
554
+ loading: "Cargando...",
555
+ close: "Cerrar",
556
+ ok: "Aceptar",
557
+ see_value: "Ver valor",
558
+ see_name: 'Ver "{name}"',
559
+ add: "Añadir",
560
+ clear: "Limpiar",
561
+ required_verification: "* Requerido. La informacion proporcionada sera verificada.",
562
+ previous: "Anterior",
563
+ next: "Siguiente",
564
+ send: "Enviar",
565
+ delete: "Selecciona para eliminar | Eliminar | Eliminar {count}",
566
+ delete_all: "Eliminar todo",
567
+ pick: "Elegir",
568
+ refresh: "Refrescar",
569
+ swal: {
570
+ cancel: "Cancelar",
571
+ continue: "Continuar",
572
+ connection_error: "¡Error de conexion!",
573
+ connection_error_message: "El servidor no responde. Por favor verifica tu conexion o intentalo de nuevo mas tarde",
574
+ connection_error_confirm: "Reintentar",
575
+ incomplete_data: "Datos incompletos",
576
+ incomplete_data_message: "Llena los datos adecuadamente",
577
+ dont_close_window: "No cierres esta ventana mientras completamos el proceso"
578
+ }
579
+ }, tt = {
580
+ select_placeholder: "--SELECCIONAR--",
581
+ select_restablish_field: "Restablecer campo",
582
+ select_filter_options: "Escribe o haz doble click para las opciones",
583
+ file_one_of_amount: "{count} de {amount}",
584
+ file_delete_files: "Eliminar archivo | Eliminar archivos",
585
+ file_thumb: "Miniatura",
586
+ file_choose_file: "Seleccionar un archivo | Seleccionar archivos",
587
+ file_or_drop_files_here: "O arrástralo aquí | O arrástralos aquí",
588
+ file_max_file_size_mb: "máximo {size}MB por archivo",
589
+ file_drop_files_here: "Suelta el archivo aquí | Suelta los archivos aquí",
590
+ file_completed: "Completado",
591
+ file_loading_files: "Cargando archivo... | Cargando archivos...",
592
+ swal: {
593
+ file_limit: "Límite de archivos",
594
+ file_limit_text: "Este campo solo permite {amount} archivo | Este campo solo permite {amount} archivos",
595
+ file_wrong_format_image: "Formato incorrecto",
596
+ file_wrong_format_image_text: "Este campo solo permite archivos de imagen",
597
+ file_too_big: "Archivo demasiado grande",
598
+ file_too_big_text: "El archivo supera el tamaño permitido",
599
+ file_unknown_error: "Algo salió mal",
600
+ file_unknown_error_text: "Ocurrió un error al subir los archivos, intenta nuevamente más tarde"
601
+ }
602
+ }, at = {
603
+ modal_taking_too_long: "¿Esta tardando demasiado?",
604
+ swal: {
605
+ modal_unauthorized: "No autorizado",
606
+ modal_unauthorized_text: "No tienes permiso para realizar esta acción"
607
+ }
608
+ }, Rt = {
609
+ form_required_options: "Las opciones son requeridas",
610
+ form_requires_n_values: "No se requieren valores | Se requiere un valor | {count} valores son requeridos",
611
+ form_country: "Buscar país",
612
+ form_state: "Buscar provincia",
613
+ form_city: "Buscar ciudad",
614
+ form_desired_password: "Contraseña deseada",
615
+ form_confirm_password: "Confirma la contraseña",
616
+ form_check_password: "Verificar Contraseña",
617
+ form_password: "Contraseña",
618
+ form_email: "Direccion de correo",
619
+ form_phone_line: "Linea de telefono fijo",
620
+ form_cellphone: "Telefono celular",
621
+ form_id_number: "Numero de identificacion",
622
+ form_complete_the_field: "Completa el campo",
623
+ form_location: "Ubicacion",
624
+ form_required_field: "Este campo es requerido",
625
+ form_use_valid_email: "Debes usar una direccion de correo electronico valida",
626
+ form_use_valid_phone: "Muy corto. Usa un numero de telefono valido",
627
+ form_use_valid_cellphone: "Debes usar un numero de celular valido",
628
+ form_unmatching_passwords: "Las contraseñas no coinciden",
629
+ form_invalid_data: "Informacion invalida"
630
+ // swal: {},
631
+ }, lt = {
632
+ table_see_values: "Ver {name}",
633
+ table_see_name: 'Ver: "{name}"',
634
+ table_create_new: "Crear nuevo",
635
+ table_quantity: "Cantidad: {count}",
636
+ table_modify: "Modificar",
637
+ table_select: "Seleccionar",
638
+ table_select_all: "Seleccionar todo",
639
+ table_update: "Actualizar",
640
+ table_update_name: 'Actualizar: "{name}"',
641
+ table_delete: "Eliminar",
642
+ table_delete_name: 'Eliminar: "{name}"',
643
+ table_showing_name: 'Mostrando: "{name}"',
644
+ table_sort_by_name: 'Ordenar por: "{name}"',
645
+ table_duplicate: "Duplicar",
646
+ table_options: "Opciones",
647
+ table_open_url: "Abrir enlace",
648
+ swal: {
649
+ table_delete_node_title: "¿Estas seguro de que quieres eliminar este elemento?",
650
+ table_delete_node_disclaimer: "Recuerda que no podras recuperar los datos de este elemento y perderas todo tu trabajo.",
651
+ table_deleted: "Eliminacion exitosa",
652
+ table_delete_nodes_title: "¿Estas seguro de que quieres eliminar este elemento? | ¿Estas seguro de que quieres eliminar estos {count} elementos?",
653
+ table_delete_nodes_disclaimer: "Recuerda que no podras recuperar los datos de estos elementos y perderas todo tu trabajo.",
654
+ table_possibly_not_deleted: "El elemento pudo no haber sido eliminado | Los elementos pudieron no haber sido eliminados",
655
+ table_updated: "Actualizacion exitosa",
656
+ table_possibly_not_updated: "El elemento pudo no haber sido actualizado | Los elementos pudieron no haber sido actualizados",
657
+ table_cloned: "Clonacion exitosa",
658
+ table_possibly_not_cloned: "El elemento pudo no haber sido clonado | Los elementos pudieron no haber sido clonados"
659
+ }
660
+ }, Pt = {
661
+ pagination_items: "Sin elementos | Único elemento | {count} elementos",
662
+ pagination_pages: "Sin páginas | Única página | {count} páginas",
663
+ pagination_order_relevance: "Orden: relevancia",
664
+ pagination_order_recent: "Orden: mas reciente",
665
+ pagination_order_older: "Orden: mas antiguo",
666
+ pagination_order_expensive: "Orden: menor precio",
667
+ pagination_order_cheaper: "Orden: mayor precio",
668
+ pagination_order_az: "Orden: alfabeticamente (Asc.)",
669
+ pagination_order_za: "Orden: alfabeticamente (Desc.)",
670
+ pagination_filter_by: "Filtrar por:"
671
+ // swal: {},
672
+ };
673
+ ({
674
+ ...H.omit(et, "swal"),
675
+ ...H.omit(tt, "swal"),
676
+ ...H.omit(at, "swal"),
677
+ ...H.omit(Rt, "swal"),
678
+ ...H.omit(lt, "swal"),
679
+ ...H.omit(Pt, "swal"),
680
+ swal: {
681
+ ...et.swal,
682
+ ...tt.swal,
683
+ ...at.swal,
684
+ // ...localeForm.swal,
685
+ ...lt.swal
686
+ // ...localePagination.swal,
687
+ }
688
+ });
689
+ function U(l) {
690
+ const t = de("xamu");
691
+ return l(t);
692
+ }
693
+ const ge = /* @__PURE__ */ j({
694
+ name: "BaseAction",
695
+ inheritAttrs: !1,
696
+ __name: "Action",
697
+ props: {
698
+ to: {},
699
+ href: {},
700
+ target: {},
701
+ tel: {},
702
+ disabled: { type: Boolean },
703
+ mailto: {},
704
+ type: {},
705
+ tag: {},
706
+ toggle: {},
707
+ round: { type: [String, Boolean, Object, Array] },
708
+ toggleState: {},
709
+ indicative: {},
710
+ whatsapp: { type: Boolean },
711
+ download: {}
712
+ },
713
+ setup(l) {
714
+ const t = l, e = de("xamu"), { getModifierClasses: n, getClassesString: m } = U(J), c = O(() => !t.mailto && !t.tel && !t.href ? t.tag ?? "button" : "a"), o = O(() => t.to && (e == null ? void 0 : e.routerComponent) || c.value), a = O(() => {
715
+ const g = t.round || typeof t.round == "string" && !t.round.length;
716
+ return [
717
+ g ? n(g, { modifier: "round" }) : [],
718
+ t.toggle ? n([t.toggle], { prefix: "toggle" }) : [],
719
+ t.toggleState ? n([t.toggleState].flat(2), { prefix: "is" }) : []
720
+ ].flat(2);
721
+ }), s = O(() => {
722
+ const { indicative: g = "CO+57" } = t;
723
+ return (g == null ? void 0 : g.toString().split("+")[1]) || g;
724
+ }), u = O(() => {
725
+ const g = t.tel || "", v = `${g.substring(0, 3)}-${g.substring(3, 6)}-${g.substring(6)}`;
726
+ return `(+${s.value}) ${v}`;
727
+ }), p = O(() => t.to || !t.mailto ? "" : `mailto:${t.mailto}`), h = O(() => {
728
+ if (t.to || !t.tel)
729
+ return "";
730
+ const g = `https://web.whatsapp.com/send/?phone=${s.value}${t.tel}`, v = `tel:+(${s.value})${t.tel}`;
731
+ return t.whatsapp ? g : v;
732
+ }), y = O(() => {
733
+ const g = t.href || p.value || h.value;
734
+ return g ? { to: void 0, href: g, target: "_blank" } : {};
735
+ });
736
+ return (g, v) => (i(), A(ve(o.value), z({ ...g.$attrs, ...t, ...y.value }, {
737
+ type: c.value === "button" && !g.to && !g.href ? g.type || "button" : null,
738
+ tabindex: t.disabled && "-1" || null,
739
+ class: r(m)([a.value])
740
+ }), {
741
+ default: C(() => [
742
+ x(g.$slots, "default", {}, () => [
743
+ g.mailto ? (i(), b(Y, { key: 0 }, [
744
+ ne(T(g.mailto), 1)
745
+ ], 64)) : g.tel ? (i(), b(Y, { key: 1 }, [
746
+ ne(T(u.value), 1)
747
+ ], 64)) : L("", !0)
748
+ ])
749
+ ]),
750
+ _: 3
751
+ }, 16, ["type", "tabindex", "class"]));
752
+ }
753
+ });
754
+ function Oe() {
755
+ try {
756
+ self.crypto || window.crypto;
757
+ } catch {
758
+ global.crypto = global.crypto || require("crypto");
759
+ }
760
+ return { uuid: $t };
761
+ }
762
+ const Te = /* @__PURE__ */ j({
763
+ name: "BaseInput",
764
+ inheritAttrs: !1,
765
+ __name: "Input",
766
+ props: {
767
+ modelValue: {},
768
+ type: {},
769
+ autocomplete: {},
770
+ id: {},
771
+ name: {},
772
+ placeholder: {},
773
+ title: {},
774
+ required: { type: Boolean },
775
+ disabled: { type: Boolean }
776
+ },
777
+ emits: ["update:model-value"],
778
+ setup(l, { emit: t }) {
779
+ const e = l, { uuid: n } = Oe(), m = n().replace("-", "").substring(0, 8), c = O(() => e.type === "checkbox" || e.type === "radio"), o = O(() => e.id ?? `input${m}`);
780
+ function a(s) {
781
+ const { target: u } = s;
782
+ return t("update:model-value", c.value ? u.checked : u.value);
783
+ }
784
+ return (s, u) => (i(), b(Y, null, [
785
+ (i(), A(ve(s.type !== "textarea" ? "input" : "textarea"), z({
786
+ ...s.$attrs,
787
+ id: o.value,
788
+ name: s.name ?? o.value,
789
+ type: s.type ?? "text",
790
+ placeholder: s.placeholder,
791
+ title: s.title,
792
+ autocomplete: s.autocomplete ?? "on",
793
+ required: s.required,
794
+ disabled: s.disabled || void 0,
795
+ tabindex: s.disabled && "-1" || void 0,
796
+ ...c.value ? { checked: s.modelValue ?? s.$attrs.checked } : { value: s.modelValue }
797
+ }, { onInput: a }), null, 16)),
798
+ x(s.$slots, "default", X(le({ id: o.value, name: s.name, modelValue: s.modelValue })))
799
+ ], 64));
800
+ }
801
+ }), Nt = ["value"], It = ["value"], zt = /* @__PURE__ */ j({
802
+ name: "BaseSelect",
803
+ inheritAttrs: !1,
804
+ __name: "Select",
805
+ props: {
806
+ modelValue: {},
807
+ options: {},
808
+ multiple: { type: Boolean },
809
+ id: {},
810
+ name: {},
811
+ placeholder: {},
812
+ title: {},
813
+ required: { type: Boolean },
814
+ disabled: { type: Boolean }
815
+ },
816
+ emits: ["update:model-value"],
817
+ setup(l, { emit: t }) {
818
+ const e = l, { t: n } = U(Z), { uuid: m } = Oe(), c = m().replace("-", "").substring(0, 8), o = O(() => (e.options ?? []).map(be)), a = O(() => e.id ?? `select${c}`);
819
+ function s(u) {
820
+ const { target: p } = u;
821
+ return t("update:model-value", p.value);
822
+ }
823
+ return o.value.length === 1 && t("update:model-value", o.value[0].value), ce(
824
+ o,
825
+ (u) => {
826
+ u.length || t("update:model-value", ""), u.length === 1 && t("update:model-value", u[0].value);
827
+ },
828
+ { immediate: !1 }
829
+ ), (u, p) => (i(), b("select", z({
830
+ ...u.$attrs,
831
+ id: a.value,
832
+ name: u.name ?? a.value,
833
+ title: u.title,
834
+ required: u.required,
835
+ disabled: !!u.modelValue && o.value.length === 1 || u.disabled || void 0,
836
+ tabindex: u.disabled && "-1" || void 0
837
+ }, {
838
+ value: u.modelValue,
839
+ onInput: s
840
+ }), [
841
+ p[0] || (xe(-1), p[0] = E("option", {
842
+ hidden: "",
843
+ disabled: "",
844
+ value: ""
845
+ }, [
846
+ ne(T(r(n)("select_placeholder")), 1)
847
+ ]), xe(1), p[0]),
848
+ (i(!0), b(Y, null, oe(o.value, ({ value: h, alias: y }, g) => (i(), b("option", {
849
+ key: g,
850
+ value: h
851
+ }, T(y || h), 9, It))), 128))
852
+ ], 16, Nt));
853
+ }
854
+ }), Ae = /* @__PURE__ */ j({
855
+ name: "BaseWrapper",
856
+ inheritAttrs: !1,
857
+ __name: "Wrapper",
858
+ props: {
859
+ /**
860
+ * Wheter or not render the wrapper
861
+ */
862
+ wrap: {
863
+ type: Boolean,
864
+ required: !0
865
+ },
866
+ /**
867
+ * Component or tag to render
868
+ */
869
+ el: {
870
+ type: [String, Object, Function],
871
+ default: "div"
872
+ }
873
+ },
874
+ setup(l) {
875
+ return (t, e) => l.wrap ? (i(), A(ve(l.el), X(z({ key: 0 }, t.$attrs)), {
876
+ default: C(() => [
877
+ x(t.$slots, "default")
878
+ ]),
879
+ _: 3
880
+ }, 16)) : x(t.$slots, "default", { key: 1 });
881
+ }
882
+ });
883
+ function re(l) {
884
+ const { getModifierClasses: t } = U(J);
885
+ return { modifiersClasses: O(() => {
886
+ const n = l.hidden || typeof l.hidden == "string" && !l.hidden.length;
887
+ return [
888
+ l.size ? t([String(l.size)], { modifier: "size", divider: "-" }) : [],
889
+ n ? t(n, { modifier: "hidden" }) : []
890
+ ].flat(2);
891
+ }) };
892
+ }
893
+ const Dt = /* @__PURE__ */ j({
894
+ name: "IconSimple",
895
+ inheritAttrs: !1,
896
+ __name: "Simple",
897
+ props: {
898
+ indicator: { type: Boolean },
899
+ hidden: { type: [String, Boolean, Object, Array] },
900
+ size: {}
901
+ },
902
+ setup(l) {
903
+ const t = l, { getClassesString: e, getModifierClasses: n } = U(J), { modifiersClasses: m } = re(t), c = O(() => t.indicator ? n(["indicator"]) : []);
904
+ return (o, a) => (i(), b("i", z({
905
+ "aria-hidden": "true",
906
+ class: r(e)([
907
+ r(m),
908
+ c.value,
909
+ o.$slots.default ? "svg" : "icon"
910
+ ])
911
+ }, o.$attrs), [
912
+ x(o.$slots, "default")
913
+ ], 16));
914
+ }
915
+ }), M = /* @__PURE__ */ j({
916
+ name: "IconFa",
917
+ inheritAttrs: !1,
918
+ __name: "Fa",
919
+ props: {
920
+ name: {},
921
+ regular: { type: Boolean },
922
+ brand: { type: Boolean },
923
+ indicator: { type: Boolean },
924
+ forceRegular: { type: Boolean },
925
+ hidden: { type: [String, Boolean, Object, Array] },
926
+ size: {}
927
+ },
928
+ setup(l) {
929
+ const t = l, e = de("xamu"), { getClassesString: n } = U(J), m = O(() => t.forceRegular || (e == null ? void 0 : e.fontAwesomePro) && t.regular), c = O(() => t.brand && "fab" || m.value && "far" || "fas");
930
+ return (o, a) => (i(), A(Dt, z({
931
+ class: r(n)([`fa-${o.name ?? "cubes"}`, c.value])
932
+ }, { ...o.$attrs, hidden: o.hidden, size: o.size, indicator: o.indicator }), null, 16, ["class"]));
933
+ }
934
+ });
935
+ function me(l) {
936
+ const { getModifierClasses: t } = U(J);
937
+ return { stateClasses: O(() => {
938
+ const n = [
939
+ { ...l.state, active: l.active || !1, invalid: l.invalid || !1 }
940
+ ];
941
+ return l.state || l.active || l.invalid ? t(n, { prefix: "is" }) : [];
942
+ }) };
943
+ }
944
+ function te(l) {
945
+ const { getModifierClasses: t, getPropData: e } = U(J), n = O(() => o(l.theme || ue.SECONDARY)), m = O(() => l.theme ? a(n.value) : []), c = O(() => {
946
+ const s = l.tooltip && e(l.tooltip), u = n.value[1] !== ue.LIGHT;
947
+ return s ? {
948
+ "arial-label": s,
949
+ "data-tooltip": s,
950
+ "data-tooltip-position": l.tooltipPosition,
951
+ "data-tooltip-text": l.tooltipAsText ?? !0,
952
+ "data-tooltip-bg": n.value[0],
953
+ "data-tooltip-color": u ? n.value[1] : void 0
954
+ } : null;
955
+ });
956
+ function o(s) {
957
+ if (Array.isArray(s))
958
+ return [s[0], s[1] || ue.LIGHT];
959
+ if (typeof s == "object" && s !== null) {
960
+ const u = Object.entries(s).filter(([p, h]) => h);
961
+ return o([u[0][0]]);
962
+ }
963
+ return o([s]);
964
+ }
965
+ function a(s) {
966
+ return s[1] = s[1] || ue.LIGHT, l.themeAsUnion || (s = [s[0]]), t([s.join("-")], { modifier: "tm", divider: "-" });
967
+ }
968
+ return { themeValues: n, themeClasses: m, tooltipAttributes: c };
969
+ }
970
+ const se = /* @__PURE__ */ j({
971
+ name: "ActionButton",
972
+ inheritAttrs: !1,
973
+ __name: "Button",
974
+ props: {
975
+ to: {},
976
+ href: {},
977
+ target: {},
978
+ tel: {},
979
+ disabled: { type: Boolean },
980
+ mailto: {},
981
+ type: {},
982
+ tag: {},
983
+ toggle: {},
984
+ round: { type: [String, Boolean, Object, Array] },
985
+ toggleState: {},
986
+ indicative: {},
987
+ whatsapp: { type: Boolean },
988
+ download: {},
989
+ hidden: { type: [String, Boolean, Object, Array] },
990
+ size: {},
991
+ active: { type: Boolean },
992
+ invalid: { type: Boolean },
993
+ state: {},
994
+ theme: {},
995
+ tooltip: {},
996
+ tooltipPosition: {},
997
+ tooltipAsText: { type: Boolean }
998
+ },
999
+ setup(l) {
1000
+ const t = l, { getClassesString: e } = U(J), { modifiersClasses: n } = re(t), { stateClasses: m } = me(t), { themeClasses: c, tooltipAttributes: o } = te({
1001
+ ...t,
1002
+ themeAsUnion: !0
1003
+ });
1004
+ return (a, s) => (i(), A(ge, z({ ...a.$attrs, ...t, ...r(o) }, {
1005
+ class: [r(e)([r(n), r(m), r(c)]), "bttn"]
1006
+ }), {
1007
+ default: C(() => [
1008
+ x(a.$slots, "default")
1009
+ ]),
1010
+ _: 3
1011
+ }, 16, ["class"]));
1012
+ }
1013
+ }), ae = /* @__PURE__ */ j({
1014
+ name: "ActionButtonToggle",
1015
+ inheritAttrs: !1,
1016
+ __name: "ButtonToggle",
1017
+ props: {
1018
+ shadow: { type: Boolean },
1019
+ to: {},
1020
+ href: {},
1021
+ target: {},
1022
+ tel: {},
1023
+ disabled: { type: Boolean },
1024
+ mailto: {},
1025
+ type: {},
1026
+ tag: {},
1027
+ toggle: {},
1028
+ round: { type: [String, Boolean, Object, Array] },
1029
+ toggleState: {},
1030
+ indicative: {},
1031
+ whatsapp: { type: Boolean },
1032
+ download: {},
1033
+ hidden: { type: [String, Boolean, Object, Array] },
1034
+ size: {},
1035
+ active: { type: Boolean },
1036
+ invalid: { type: Boolean },
1037
+ state: {},
1038
+ theme: {},
1039
+ tooltip: {},
1040
+ tooltipPosition: {},
1041
+ tooltipAsText: { type: Boolean }
1042
+ },
1043
+ setup(l) {
1044
+ const t = l, { getModifierClasses: e, getClassesString: n } = U(J), { modifiersClasses: m } = re(t), { stateClasses: c } = me(t), { themeClasses: o, tooltipAttributes: a } = te(t), s = O(() => t.shadow ? e(t.shadow, { modifier: "shadow" }) : []);
1045
+ return (u, p) => (i(), A(ge, z({ ...u.$attrs, ...t, ...r(a) }, {
1046
+ class: [r(n)([r(m), r(c), r(o), s.value]), "bttnToggle"]
1047
+ }), {
1048
+ default: C(() => [
1049
+ x(u.$slots, "default")
1050
+ ]),
1051
+ _: 3
1052
+ }, 16, ["class"]));
1053
+ }
1054
+ }), ee = /* @__PURE__ */ j({
1055
+ name: "ActionLink",
1056
+ inheritAttrs: !1,
1057
+ __name: "Link",
1058
+ props: {
1059
+ shadow: { type: Boolean },
1060
+ to: {},
1061
+ href: {},
1062
+ target: {},
1063
+ tel: {},
1064
+ disabled: { type: Boolean },
1065
+ mailto: {},
1066
+ type: {},
1067
+ tag: {},
1068
+ toggle: {},
1069
+ round: { type: [String, Boolean, Object, Array] },
1070
+ toggleState: {},
1071
+ indicative: {},
1072
+ whatsapp: { type: Boolean },
1073
+ download: {},
1074
+ hidden: { type: [String, Boolean, Object, Array] },
1075
+ size: {},
1076
+ active: { type: Boolean },
1077
+ invalid: { type: Boolean },
1078
+ state: {},
1079
+ theme: {},
1080
+ tooltip: {},
1081
+ tooltipPosition: {},
1082
+ tooltipAsText: { type: Boolean }
1083
+ },
1084
+ setup(l) {
1085
+ const t = l, { getModifierClasses: e, getClassesString: n } = U(J), { modifiersClasses: m } = re(t), { stateClasses: c } = me(t), { themeClasses: o, tooltipAttributes: a } = te(t), s = O(() => t.shadow ? e(t.shadow, { modifier: "shadow" }) : []);
1086
+ return (u, p) => (i(), A(ge, z({ ...u.$attrs, ...t, ...r(a) }, {
1087
+ class: [r(n)([r(m), r(c), r(o), s.value]), "link"]
1088
+ }), {
1089
+ default: C(() => [
1090
+ x(u.$slots, "default")
1091
+ ]),
1092
+ _: 3
1093
+ }, 16, ["class"]));
1094
+ }
1095
+ });
1096
+ function Re(l) {
1097
+ return function(t) {
1098
+ l.value = t.matches;
1099
+ };
1100
+ }
1101
+ function Pe(l) {
1102
+ return window.matchMedia(`(max-width: ${l}px)`);
1103
+ }
1104
+ function ft() {
1105
+ const { mediaQueryPixels: l } = de("xamu") || {}, { isBrowser: t } = U(J), e = W(!1), n = W(!1), m = W(!1), c = Re(e), o = Re(n), a = Re(m);
1106
+ if (t) {
1107
+ const s = Pe((l == null ? void 0 : l.laptop) ?? 1080), u = Pe((l == null ? void 0 : l.tablet) ?? 768), p = Pe((l == null ? void 0 : l.mobile) ?? 576);
1108
+ Ve(() => {
1109
+ s.addEventListener("change", c, !0), u.addEventListener("change", o, !0), p.addEventListener("change", a, !0), c(s), o(u), a(p);
1110
+ }), qe(() => {
1111
+ s.removeEventListener("change", c, !0), u.removeEventListener("change", o, !0), p.removeEventListener("change", a, !0);
1112
+ });
1113
+ }
1114
+ return { laptopMqRange: e, tabletMqRange: n, mobileMqRange: m };
1115
+ }
1116
+ const ql = /* @__PURE__ */ j({
1117
+ name: "ActionButtonLink",
1118
+ inheritAttrs: !1,
1119
+ __name: "ButtonLink",
1120
+ props: {
1121
+ asToggle: { type: Boolean },
1122
+ to: {},
1123
+ href: {},
1124
+ target: {},
1125
+ tel: {},
1126
+ disabled: { type: Boolean },
1127
+ mailto: {},
1128
+ type: {},
1129
+ tag: {},
1130
+ toggle: {},
1131
+ round: { type: [String, Boolean, Object, Array] },
1132
+ toggleState: {},
1133
+ indicative: {},
1134
+ whatsapp: { type: Boolean },
1135
+ download: {},
1136
+ hidden: { type: [String, Boolean, Object, Array] },
1137
+ size: {},
1138
+ active: { type: Boolean },
1139
+ invalid: { type: Boolean },
1140
+ state: {},
1141
+ theme: {},
1142
+ tooltip: {},
1143
+ tooltipPosition: {},
1144
+ tooltipAsText: { type: Boolean }
1145
+ },
1146
+ setup(l) {
1147
+ const t = l, { tabletMqRange: e } = ft();
1148
+ return (n, m) => r(e) ? (i(), b(Y, { key: 0 }, [
1149
+ n.asToggle ? (i(), A(ae, X(z({ key: 0 }, { ...n.$attrs, ...t })), {
1150
+ default: C(() => [
1151
+ x(n.$slots, "default")
1152
+ ]),
1153
+ _: 3
1154
+ }, 16)) : (i(), A(se, X(z({ key: 1 }, { ...n.$attrs, ...t })), {
1155
+ default: C(() => [
1156
+ x(n.$slots, "default")
1157
+ ]),
1158
+ _: 3
1159
+ }, 16))
1160
+ ], 64)) : (i(), A(ee, X(z({ key: 1 }, { ...n.$attrs, ...t })), {
1161
+ default: C(() => [
1162
+ x(n.$slots, "default")
1163
+ ]),
1164
+ _: 3
1165
+ }, 16));
1166
+ }
1167
+ }), Mt = {
1168
+ key: 0,
1169
+ class: "flx --flxRow --flx-start-center --gap-10"
1170
+ }, Ut = { class: "flx --flxRow-wrap --flx-start-center --gap-10" }, qt = { class: "back" }, Ft = { class: "--txtWrap-nowrap" }, jt = ["for"], Wt = { class: "txt --txtAlignFlx-center" }, Ht = { class: "--txtSize-xs" }, Gt = { key: 1 }, xt = /* @__PURE__ */ j({
1171
+ name: "InputFile",
1172
+ inheritAttrs: !1,
1173
+ __name: "File",
1174
+ props: {
1175
+ filePrefix: {},
1176
+ min: {},
1177
+ max: {},
1178
+ maxSize: {},
1179
+ accept: {},
1180
+ modelValue: {},
1181
+ classes: {},
1182
+ type: {},
1183
+ autocomplete: {},
1184
+ id: {},
1185
+ name: {},
1186
+ placeholder: {},
1187
+ title: {},
1188
+ required: { type: Boolean },
1189
+ disabled: { type: Boolean },
1190
+ hidden: { type: [String, Boolean, Object, Array] },
1191
+ size: {},
1192
+ active: { type: Boolean },
1193
+ invalid: { type: Boolean },
1194
+ state: {},
1195
+ theme: {}
1196
+ },
1197
+ emits: ["update:model-value"],
1198
+ setup(l, { emit: t }) {
1199
+ const e = l, { t: n } = U(Z), { getClassesString: m, isBrowser: c } = U(J), o = U(Le), { modifiersClasses: a } = re(e), { stateClasses: s } = me(e), { themeClasses: u } = te(e), p = W(), h = W([]), y = W(!1), g = W(!1), v = W(!1), S = O(() => e.min ?? 1), $ = O(() => e.max ?? 100), d = O(() => e.maxSize ?? 1e7);
1200
+ function D(_ = [], R = []) {
1201
+ h.value = R, t("update:model-value", _);
1202
+ }
1203
+ function F() {
1204
+ const _ = document.createElement("div");
1205
+ return ("draggable" in _ || "ondragstart" in _ && "ondrop" in _) && "FormData" in window && "FileReader" in window;
1206
+ }
1207
+ async function Q(_) {
1208
+ g.value = !0;
1209
+ const R = [...e.modelValue], N = [...h.value];
1210
+ try {
1211
+ for (let K = 0; K < _.length; K++) {
1212
+ if (R.length >= $.value) {
1213
+ o.fire({
1214
+ title: n("swal.file_limit"),
1215
+ text: n("swal.file_limit_text", {
1216
+ count: $.value,
1217
+ amount: $.value
1218
+ }),
1219
+ icon: "warning"
1220
+ });
1221
+ break;
1222
+ }
1223
+ if (await At(_[K], st))
1224
+ if (_[K].size < d.value) {
1225
+ const yt = `${e.filePrefix ?? "image"}_${K}`;
1226
+ R.push(Bt(_[K], yt)), N.push(await St(_[K]));
1227
+ } else
1228
+ o.fire({
1229
+ title: n("swal.file_too_big"),
1230
+ text: n("swal.file_too_big_text"),
1231
+ icon: "warning"
1232
+ });
1233
+ else
1234
+ o.fire({
1235
+ title: n("swal.file_wrong_format_image"),
1236
+ text: n("swal.file_wrong_format_image_text"),
1237
+ icon: "warning"
1238
+ });
1239
+ }
1240
+ D(R, N);
1241
+ } catch (K) {
1242
+ console.log(K), o.fire({
1243
+ title: n("swal.file_unknown_error"),
1244
+ text: n("swal.file_unknown_error_text"),
1245
+ icon: "error",
1246
+ timer: void 0,
1247
+ showConfirmButton: !0
1248
+ });
1249
+ }
1250
+ g.value = !1;
1251
+ }
1252
+ const w = H.debounce((_) => {
1253
+ D(e.modelValue.toSpliced(_, 1), h.value.toSpliced(_, 1));
1254
+ });
1255
+ function I(_) {
1256
+ y.value && (_.preventDefault(), _.stopPropagation());
1257
+ }
1258
+ function q(_) {
1259
+ I(_), v.value = !0;
1260
+ }
1261
+ function B(_) {
1262
+ I(_), v.value = !1;
1263
+ }
1264
+ function f(_) {
1265
+ const { dataTransfer: R, originalEvent: N } = _;
1266
+ B(_), Q((R == null ? void 0 : R.files) || N.dataTransfer.files);
1267
+ }
1268
+ function V(_) {
1269
+ const { target: R } = _;
1270
+ R.files && (I(_), Q(R.files));
1271
+ }
1272
+ return c && (y.value = F()), (_, R) => (i(), b("div", {
1273
+ class: G([[_.classes, r(m)([r(a), r(s), r(u)])], "box --button flx --flxColumn --flx-start-stretch --gap-10 --width"])
1274
+ }, [
1275
+ S.value !== $.value && h.value.length ? (i(), b("div", Mt, [
1276
+ E("ul", Ut, [
1277
+ (i(!0), b(Y, null, oe(h.value, (N, K) => (i(), b("li", {
1278
+ key: K,
1279
+ class: "flx --flxRow --flx-start-center --gap-5"
1280
+ }, [
1281
+ k(ge, {
1282
+ class: "avatar --index --bdr",
1283
+ tooltip: r(n)("file_delete_files", 1),
1284
+ "tooltip-position": "bottom",
1285
+ onClick: ie((gt) => r(w)(K), ["prevent"])
1286
+ }, {
1287
+ default: C(() => [
1288
+ E("div", qt, [
1289
+ k(He, {
1290
+ src: N,
1291
+ alt: r(n)("file_thumb")
1292
+ }, null, 8, ["src", "alt"])
1293
+ ]),
1294
+ k(ee, {
1295
+ theme: r(ue).LIGHT,
1296
+ class: "--shadow"
1297
+ }, {
1298
+ default: C(() => [
1299
+ k(M, {
1300
+ name: "xmark",
1301
+ size: "20"
1302
+ })
1303
+ ]),
1304
+ _: 1
1305
+ }, 8, ["theme"])
1306
+ ]),
1307
+ _: 2
1308
+ }, 1032, ["tooltip", "onClick"])
1309
+ ]))), 128))
1310
+ ]),
1311
+ E("span", Ft, T(r(n)("file_one_of_amount", {
1312
+ count: _.modelValue.length,
1313
+ amount: $.value
1314
+ })), 1)
1315
+ ])) : L("", !0),
1316
+ k(Te, z({
1317
+ ref_key: "fileInput",
1318
+ ref: p,
1319
+ style: { display: "none" }
1320
+ }, {
1321
+ ..._.$attrs,
1322
+ type: "file",
1323
+ accept: (_.accept ?? ["image/*"]).join(","),
1324
+ multiple: $.value > 1,
1325
+ disabled: _.disabled
1326
+ }, { onChange: V }), {
1327
+ default: C(({ id: N }) => [
1328
+ g.value ? (i(), b("div", {
1329
+ key: 1,
1330
+ class: G([r(u), "box --bdr-solid --size-xs --bgColor-none flx --flxRow --flx-center"])
1331
+ }, T(r(n)("file_loading_files", $.value)), 3)) : (i(), b(Y, { key: 0 }, [
1332
+ _.modelValue.length < $.value ? (i(), b("label", {
1333
+ key: 0,
1334
+ for: N,
1335
+ class: G([[...r(u), { "--bgColor-none": !v.value }], "box --bdr-dashed --size-xs flx --flxColumn --flx-center --minHeight-90"]),
1336
+ onDrag: I,
1337
+ onDragstart: I,
1338
+ onDragend: B,
1339
+ onDragleave: B,
1340
+ onDrop: f,
1341
+ onDragover: q,
1342
+ onDragenter: q
1343
+ }, [
1344
+ E("div", Wt, [
1345
+ v.value ? (i(), b("p", Gt, [
1346
+ E("b", null, T(r(n)("file_drop_files_here", $.value)), 1)
1347
+ ])) : (i(), b(Y, { key: 0 }, [
1348
+ E("p", null, [
1349
+ E("b", null, T(r(n)("file_choose_file", $.value)), 1),
1350
+ ne(" " + T(y.value && !v.value && r(n)("file_or_drop_files_here", $.value) || ""), 1)
1351
+ ]),
1352
+ E("p", Ht, T(r(n)("file_max_file_size_mb", { size: d.value / 1e6 })), 1)
1353
+ ], 64))
1354
+ ])
1355
+ ], 42, jt)) : (i(), b("div", {
1356
+ key: 1,
1357
+ class: G([r(u), "box --bdr-solid --size-xs --bgColor-none flx --flxRow --flx-center"])
1358
+ }, [
1359
+ E("p", null, T(r(n)("file_completed")), 1),
1360
+ k(se, {
1361
+ theme: _.theme,
1362
+ "aria-label": r(n)("file_delete_files", $.value),
1363
+ onClick: R[0] || (R[0] = ie((K) => D(), ["prevent"]))
1364
+ }, {
1365
+ default: C(() => [
1366
+ ne(T(r(n)("file_delete_files", $.value)), 1)
1367
+ ]),
1368
+ _: 1
1369
+ }, 8, ["theme", "aria-label"])
1370
+ ], 2))
1371
+ ], 64))
1372
+ ]),
1373
+ _: 1
1374
+ }, 16)
1375
+ ], 2));
1376
+ }
1377
+ }), fe = /* @__PURE__ */ j({
1378
+ name: "InputText",
1379
+ inheritAttrs: !1,
1380
+ __name: "Text",
1381
+ props: {
1382
+ type: {},
1383
+ placeholder: {},
1384
+ icon: {},
1385
+ iconProps: {},
1386
+ textarea: { type: Boolean },
1387
+ min: {},
1388
+ max: {},
1389
+ modelValue: {},
1390
+ autocomplete: {},
1391
+ id: {},
1392
+ name: {},
1393
+ title: {},
1394
+ required: { type: Boolean },
1395
+ disabled: { type: Boolean },
1396
+ hidden: { type: [String, Boolean, Object, Array] },
1397
+ size: {},
1398
+ active: { type: Boolean },
1399
+ invalid: { type: Boolean },
1400
+ state: {},
1401
+ theme: {}
1402
+ },
1403
+ emits: ["update:model-value"],
1404
+ setup(l, { emit: t }) {
1405
+ const e = l, { t: n } = U(Z), { getClassesString: m } = U(J), { modifiersClasses: c } = re(e), { stateClasses: o } = me(e), { themeClasses: a } = te(e), s = O(() => e.type ?? "text"), u = O(() => Number(e.min) || 0), p = O(() => Number(e.max) || 9e9), h = O(() => ["number", "tel"].includes(s.value)), y = O(() => s.value === "tel"), g = O({
1406
+ get: () => {
1407
+ const d = e.modelValue;
1408
+ return s.value !== "number" ? d : Number(d);
1409
+ },
1410
+ set: (d) => t("update:model-value", d)
1411
+ }), v = O(() => [
1412
+ "iTxt",
1413
+ m([c.value, o.value, a.value])
1414
+ ]);
1415
+ function S() {
1416
+ typeof g.value == "number" && g.value < p.value && g.value++;
1417
+ }
1418
+ function $() {
1419
+ typeof g.value == "number" && g.value > u.value && g.value--;
1420
+ }
1421
+ return (d, D) => (i(), b("div", {
1422
+ class: G([d.$attrs.class, "flx --flxRow --flx-center --gap-5"])
1423
+ }, [
1424
+ k(Ae, {
1425
+ wrap: !!d.icon && !d.textarea,
1426
+ disabled: d.disabled,
1427
+ class: G(v.value)
1428
+ }, {
1429
+ default: C(() => [
1430
+ k(Te, z({
1431
+ modelValue: g.value,
1432
+ "onUpdate:modelValue": D[0] || (D[0] = (F) => g.value = F)
1433
+ }, {
1434
+ ...r(H).omit(d.$attrs, "class"),
1435
+ type: d.textarea ? "textarea" : s.value,
1436
+ placeholder: d.placeholder,
1437
+ disabled: d.disabled,
1438
+ ...(h.value || y.value) && {
1439
+ pattern: "[0-9]*",
1440
+ oninput: "this.value = this.value.replace(/[^0-9]/g,'')"
1441
+ },
1442
+ ...!h.value && { min: void 0, max: void 0 },
1443
+ ...!(d.icon && !d.textarea) && { class: v.value }
1444
+ }), null, 16, ["modelValue"]),
1445
+ d.icon && !d.textarea ? (i(), A(M, z({ key: 0 }, d.iconProps, {
1446
+ name: d.icon ?? "user-group"
1447
+ }), null, 16, ["name"])) : L("", !0)
1448
+ ]),
1449
+ _: 1
1450
+ }, 8, ["wrap", "disabled", "class"]),
1451
+ d.type === "number" && (Number.isInteger(d.min) || Number.isInteger(d.max)) ? (i(), b(Y, { key: 0 }, [
1452
+ k(ae, {
1453
+ disabled: Number(g.value) <= u.value,
1454
+ size: d.size,
1455
+ theme: d.theme,
1456
+ "aria-label": r(n)("decrease"),
1457
+ tooltip: r(n)("decrease"),
1458
+ "tooltip-position": "left",
1459
+ "tooltip-as-text": "",
1460
+ round: "",
1461
+ onClick: $
1462
+ }, {
1463
+ default: C(() => [
1464
+ k(M, { name: "minus" }),
1465
+ k(M, {
1466
+ name: "minus",
1467
+ regular: ""
1468
+ })
1469
+ ]),
1470
+ _: 1
1471
+ }, 8, ["disabled", "size", "theme", "aria-label", "tooltip"]),
1472
+ k(ae, {
1473
+ disabled: Number(g.value) >= p.value,
1474
+ size: d.size,
1475
+ theme: d.theme,
1476
+ tooltip: r(n)("increase"),
1477
+ "tooltip-position": "left",
1478
+ round: "",
1479
+ onClick: S
1480
+ }, {
1481
+ default: C(() => [
1482
+ k(M, { name: "plus" }),
1483
+ k(M, {
1484
+ name: "plus",
1485
+ regular: ""
1486
+ })
1487
+ ]),
1488
+ _: 1
1489
+ }, 8, ["disabled", "size", "theme", "tooltip"])
1490
+ ], 64)) : L("", !0)
1491
+ ], 2));
1492
+ }
1493
+ }), Yt = ["for"], Kt = {
1494
+ key: 0,
1495
+ class: "flx --flxColumn --flx-start --flx --gap-none"
1496
+ }, Xt = { key: 0 }, Qt = { key: 1 }, Se = /* @__PURE__ */ j({
1497
+ name: "InputToggle",
1498
+ inheritAttrs: !1,
1499
+ __name: "Toggle",
1500
+ props: {
1501
+ type: {},
1502
+ label: {},
1503
+ showPlaceholder: { type: Boolean },
1504
+ fullWidth: { type: Boolean },
1505
+ autocomplete: {},
1506
+ id: {},
1507
+ name: {},
1508
+ placeholder: {},
1509
+ title: {},
1510
+ required: { type: Boolean },
1511
+ disabled: { type: Boolean },
1512
+ hidden: { type: [String, Boolean, Object, Array] },
1513
+ size: {},
1514
+ active: { type: Boolean },
1515
+ invalid: { type: Boolean },
1516
+ state: {},
1517
+ theme: {}
1518
+ },
1519
+ setup(l) {
1520
+ const t = l, { t: e } = U(Z), { getClassesString: n } = U(J), { modifiersClasses: m } = re(t), { stateClasses: c } = me(t), { themeClasses: o } = te(t), a = O(() => t.type || "checkbox");
1521
+ return (s, u) => (i(), b("div", {
1522
+ class: G({ "--width": s.fullWidth })
1523
+ }, [
1524
+ k(Te, z({
1525
+ class: [
1526
+ r(n)([
1527
+ r(m),
1528
+ r(c),
1529
+ r(o),
1530
+ `i${r(H).capitalize(a.value)}`
1531
+ ]),
1532
+ "--full"
1533
+ ]
1534
+ }, { ...s.$attrs, type: a.value, disabled: s.disabled }), {
1535
+ default: C(({ id: p, modelValue: h }) => [
1536
+ E("label", {
1537
+ for: p,
1538
+ class: "flx --flxRow --flx-start-center --gap-none"
1539
+ }, [
1540
+ s.label || s.showPlaceholder || s.$slots.default ? (i(), b("div", Kt, [
1541
+ s.label ? (i(), b("span", Xt, T(s.label), 1)) : s.showPlaceholder ? (i(), b("span", Qt, T(r(e)(h ? "yes" : "no")), 1)) : L("", !0),
1542
+ x(s.$slots, "default")
1543
+ ])) : L("", !0)
1544
+ ], 8, Yt)
1545
+ ]),
1546
+ _: 3
1547
+ }, 16, ["class"])
1548
+ ], 2));
1549
+ }
1550
+ }), _e = /* @__PURE__ */ j({
1551
+ name: "SelectSimple",
1552
+ inheritAttrs: !1,
1553
+ __name: "Simple",
1554
+ props: {
1555
+ options: {},
1556
+ multiple: { type: Boolean },
1557
+ id: {},
1558
+ name: {},
1559
+ placeholder: {},
1560
+ title: {},
1561
+ required: { type: Boolean },
1562
+ disabled: { type: Boolean },
1563
+ hidden: { type: [String, Boolean, Object, Array] },
1564
+ size: {},
1565
+ active: { type: Boolean },
1566
+ invalid: { type: Boolean },
1567
+ state: {},
1568
+ theme: {}
1569
+ },
1570
+ setup(l) {
1571
+ const t = l, { getClassesString: e } = U(J), { modifiersClasses: n } = re(t), { stateClasses: m } = me(t), { themeClasses: c } = te({ ...t, themeAsUnion: !0 });
1572
+ return (o, a) => (i(), A(zt, z({
1573
+ class: [r(e)([r(n), r(m), r(c)]), "iSelect"]
1574
+ }, { ...o.$attrs, options: o.options, required: o.required, disabled: o.disabled }), null, 16, ["class"]));
1575
+ }
1576
+ }), Jt = ["id"], ke = /* @__PURE__ */ j({
1577
+ name: "SelectFilter",
1578
+ inheritAttrs: !1,
1579
+ __name: "Filter",
1580
+ props: {
1581
+ icon: {},
1582
+ iconProps: {},
1583
+ modelValue: {},
1584
+ options: {},
1585
+ multiple: { type: Boolean },
1586
+ id: {},
1587
+ name: {},
1588
+ placeholder: {},
1589
+ title: {},
1590
+ required: { type: Boolean },
1591
+ disabled: { type: Boolean },
1592
+ hidden: { type: [String, Boolean, Object, Array] },
1593
+ size: {},
1594
+ active: { type: Boolean },
1595
+ invalid: { type: Boolean },
1596
+ state: {},
1597
+ theme: {}
1598
+ },
1599
+ emits: ["update:model-value"],
1600
+ setup(l, { emit: t }) {
1601
+ const e = l, { t: n } = U(Z), { isBrowser: m } = U(J), { uuid: c } = Oe(), o = c().replace("-", "").substring(0, 8), a = W(!0), s = O(() => e.name ?? `select-filter${o}`), u = O(() => (e.options ?? []).map(be)), p = W(e.modelValue || ""), h = O({
1602
+ get: () => e.modelValue,
1603
+ set: (v = "") => {
1604
+ const S = (d) => H.deburr(d).toLowerCase(), $ = u.value.find(({ value: d, alias: D }) => {
1605
+ const F = D ?? d;
1606
+ return typeof v == "string" && typeof F == "string" && S(F) === S(v) ? !0 : F === v;
1607
+ });
1608
+ $ ? (p.value = $.alias || $.value, t("update:model-value", $.value)) : v === "" && (p.value = v, t("update:model-value", v));
1609
+ }
1610
+ }), y = O(() => {
1611
+ const v = u.value.find(({ value: S }) => S === h.value);
1612
+ return h.value && !v || e.invalid;
1613
+ });
1614
+ function g(v) {
1615
+ const { target: S } = v;
1616
+ h.value = S.value;
1617
+ }
1618
+ return m && (a.value = !!HTMLDataListElement), (v, S) => (i(), b(Y, null, [
1619
+ E("datalist", { id: s.value }, [
1620
+ k(_e, z({
1621
+ modelValue: h.value,
1622
+ "onUpdate:modelValue": S[0] || (S[0] = ($) => h.value = $)
1623
+ }, {
1624
+ ...v.$attrs,
1625
+ options: u.value.map(({ value: $, alias: d }) => ({
1626
+ alias: d,
1627
+ value: d ?? $
1628
+ })),
1629
+ placeholder: v.placeholder ?? r(n)("select_placeholder"),
1630
+ disabled: v.disabled,
1631
+ hidden: v.hidden,
1632
+ size: v.size,
1633
+ active: v.active,
1634
+ invalid: v.invalid,
1635
+ state: v.state,
1636
+ theme: v.theme
1637
+ }), null, 16, ["modelValue"])
1638
+ ], 8, Jt),
1639
+ a.value ? (i(), b("div", z({
1640
+ key: 0,
1641
+ class: "flx --flxRow --flx-start-center --gap-5"
1642
+ }, v.$attrs), [
1643
+ k(fe, z({
1644
+ modelValue: p.value,
1645
+ "onUpdate:modelValue": S[1] || (S[1] = ($) => p.value = $),
1646
+ list: s.value
1647
+ }, {
1648
+ type: "text",
1649
+ placeholder: r(n)("select_filter_options"),
1650
+ disabled: !!h.value && !y.value || v.disabled,
1651
+ hidden: v.hidden,
1652
+ size: v.size,
1653
+ active: v.active,
1654
+ invalid: y.value,
1655
+ state: v.state,
1656
+ theme: v.theme,
1657
+ icon: v.icon,
1658
+ iconProps: v.iconProps
1659
+ }, {
1660
+ class: "--flx",
1661
+ onChange: g
1662
+ }), null, 16, ["modelValue", "list"]),
1663
+ h.value && u.value.length > 1 ? (i(), A(ee, {
1664
+ key: 0,
1665
+ theme: v.theme,
1666
+ "aria-label": r(n)("select_restablish_field"),
1667
+ title: r(n)("select_restablish_field"),
1668
+ onClick: S[2] || (S[2] = ie(($) => h.value = "", ["prevent"]))
1669
+ }, {
1670
+ default: C(() => [
1671
+ k(M, {
1672
+ name: "xmark",
1673
+ size: "20"
1674
+ })
1675
+ ]),
1676
+ _: 1
1677
+ }, 8, ["theme", "aria-label", "title"])) : L("", !0)
1678
+ ], 16)) : L("", !0)
1679
+ ], 64));
1680
+ }
1681
+ }), Zt = { class: "flx --flxColumn --flx-center" }, ea = {
1682
+ key: 0,
1683
+ class: "txt --txtAlign-center"
1684
+ }, Ue = /* @__PURE__ */ j({
1685
+ name: "LoaderSimple",
1686
+ inheritAttrs: !0,
1687
+ __name: "Simple",
1688
+ props: {
1689
+ label: {},
1690
+ size: {},
1691
+ margin: {},
1692
+ radius: {},
1693
+ speed: {},
1694
+ theme: {}
1695
+ },
1696
+ setup(l) {
1697
+ const t = l, { themeValues: e } = te(t), n = O(() => t.size || "0.5rem"), m = bt({
1698
+ width: n.value,
1699
+ height: n.value,
1700
+ margin: t.margin || "2px",
1701
+ borderRadius: t.radius || "100%",
1702
+ display: "inline-block",
1703
+ animationDuration: (t.speed || 1e3) + "ms"
1704
+ });
1705
+ return (c, o) => (i(), b("span", Zt, [
1706
+ E("span", null, [
1707
+ E("span", {
1708
+ class: G([`--bgColor-${r(e)[0]}`, "a-pulse is--animated --iterations-infinite"]),
1709
+ style: $e(m)
1710
+ }, null, 6),
1711
+ E("span", {
1712
+ class: G([`--bgColor-${r(e)[0]}`, "a-pulse is--animated --iterations-infinite --delay-2"]),
1713
+ style: $e(m)
1714
+ }, null, 6),
1715
+ E("span", {
1716
+ class: G([`--bgColor-${r(e)[0]}`, "a-pulse is--animated --iterations-infinite --delay-4"]),
1717
+ style: $e(m)
1718
+ }, null, 6)
1719
+ ]),
1720
+ x(c.$slots, "default", {}, () => [
1721
+ c.label ? (i(), b("span", ea, [
1722
+ E("p", null, T(c.label), 1)
1723
+ ])) : L("", !0)
1724
+ ])
1725
+ ]));
1726
+ }
1727
+ }), ta = {
1728
+ key: 0,
1729
+ class: "flx --flxRow --flx-between-center"
1730
+ }, aa = { class: "txt --gaping-none" }, la = {
1731
+ key: 0,
1732
+ class: "--txtSize-xs"
1733
+ }, oa = { class: "scroll --vertical" }, na = {
1734
+ key: 0,
1735
+ class: "flx --flxRow --flx-end-center"
1736
+ }, sa = { class: "--hidden-full:sm-inv" }, ra = {
1737
+ key: 0,
1738
+ class: "txt --txtAlignFlx-center --gaping-5"
1739
+ }, ia = { class: "--txtColor-light --txtShadow --txtSize-sm" }, Be = /* @__PURE__ */ j({
1740
+ name: "ModalSimple",
1741
+ inheritAttrs: !1,
1742
+ __name: "Modal",
1743
+ props: {
1744
+ loading: { type: Boolean },
1745
+ title: {},
1746
+ subtitle: {},
1747
+ modalClass: {},
1748
+ saveButton: {},
1749
+ cancelButton: {},
1750
+ hide: { type: Boolean },
1751
+ hideMessage: {},
1752
+ hideFooter: { type: Boolean },
1753
+ disabled: { type: Boolean },
1754
+ modelValue: { type: Boolean },
1755
+ target: {},
1756
+ theme: {}
1757
+ },
1758
+ emits: ["save", "close", "update:model-value"],
1759
+ setup(l, { emit: t }) {
1760
+ const e = l, { t: n } = U(Z), m = U(Le), { themeValues: c } = te(e), { uuid: o } = Oe(), a = o().replace("-", "").substring(0, 8), s = W(), u = W(), p = W(!1), h = O(() => {
1761
+ var d;
1762
+ return {
1763
+ title: n("ok"),
1764
+ visible: !!((d = e.saveButton) != null && d.title),
1765
+ btnClass: "",
1766
+ ...!!e.saveButton && e.saveButton
1767
+ };
1768
+ }), y = O(() => ({
1769
+ title: n("close"),
1770
+ visible: !0,
1771
+ btnClass: "",
1772
+ ...!!e.cancelButton && e.cancelButton
1773
+ }));
1774
+ function g() {
1775
+ var d;
1776
+ (d = u.value) == null || d.close(), p.value = !1, t("update:model-value", !1), t("close");
1777
+ }
1778
+ function v(d) {
1779
+ u.value === d.target && g();
1780
+ }
1781
+ function S(d = !0) {
1782
+ $.value = d;
1783
+ }
1784
+ const $ = O({
1785
+ get() {
1786
+ return !e.disabled && s.value;
1787
+ },
1788
+ set(d) {
1789
+ var D;
1790
+ d ? ((D = u.value) == null || D.showModal(), !e.loading && e.hide && (d = !1, g(), m.fire({
1791
+ title: n("swal.modal_unauthorized"),
1792
+ text: e.hideMessage || n("swal.modal_unauthorized_text"),
1793
+ icon: "warning"
1794
+ })), setTimeout(() => p.value = e.loading, 3e3)) : g(), s.value = d;
1795
+ }
1796
+ });
1797
+ return Ve(() => {
1798
+ e.modelValue && ($.value = e.modelValue);
1799
+ }), qe(g), ce(
1800
+ () => e.modelValue,
1801
+ (d) => $.value = d,
1802
+ { immediate: !1 }
1803
+ ), (d, D) => (i(), b(Y, null, [
1804
+ d.$slots.toggle ? x(d.$slots, "toggle", X(z({ key: 0 }, { setModel: S, model: $.value }))) : L("", !0),
1805
+ d.disabled ? x(d.$slots, "default", X(z({ key: 2 }, { model: $.value }))) : (i(), A(wt, {
1806
+ id: r(a),
1807
+ key: r(a),
1808
+ to: d.target || "body"
1809
+ }, [
1810
+ E("dialog", {
1811
+ ref_key: "modalRef",
1812
+ ref: u,
1813
+ onClose: g,
1814
+ onMousedown: v
1815
+ }, [
1816
+ Fe(E("div", z({
1817
+ class: ["modal", [
1818
+ d.modalClass ?? "flx --flxColumn --flx-start-stretch --width",
1819
+ `--bgColor-${r(c)[1]}`
1820
+ ]],
1821
+ role: "document"
1822
+ }, d.$attrs), [
1823
+ x(d.$slots, "modal-header", X(le({ model: $.value })), () => [
1824
+ d.title ? (i(), b("div", ta, [
1825
+ E("div", aa, [
1826
+ E("h5", null, T(d.title), 1),
1827
+ d.subtitle ? (i(), b("p", la, T(d.subtitle), 1)) : L("", !0)
1828
+ ]),
1829
+ k(ee, {
1830
+ theme: d.theme,
1831
+ "aria-label": y.value.title,
1832
+ onClick: ie(g, ["stop"])
1833
+ }, {
1834
+ default: C(() => [
1835
+ k(M, {
1836
+ name: "xmark",
1837
+ size: "20"
1838
+ })
1839
+ ]),
1840
+ _: 1
1841
+ }, 8, ["theme", "aria-label", "onClick"])
1842
+ ])) : L("", !0)
1843
+ ]),
1844
+ E("div", oa, [
1845
+ x(d.$slots, "default", X(le({ model: $.value })))
1846
+ ]),
1847
+ x(d.$slots, "modal-footer", X(le({ model: $.value })), () => [
1848
+ d.hideFooter ? L("", !0) : (i(), b("div", na, [
1849
+ h.value.visible ? (i(), A(se, {
1850
+ key: 0,
1851
+ theme: d.theme,
1852
+ "aria-label": h.value.title,
1853
+ class: G(h.value.btnClass),
1854
+ onClick: D[0] || (D[0] = (F) => t("save", g, F))
1855
+ }, {
1856
+ default: C(() => [
1857
+ ne(T(h.value.title), 1)
1858
+ ]),
1859
+ _: 1
1860
+ }, 8, ["theme", "aria-label", "class"])) : L("", !0),
1861
+ y.value.visible ? (i(), A(ae, {
1862
+ key: 1,
1863
+ theme: d.theme,
1864
+ "aria-label": y.value.title,
1865
+ class: G(y.value.btnClass),
1866
+ "data-dismiss": "modal",
1867
+ round: ":sm-inv",
1868
+ onClick: ie(g, ["stop"])
1869
+ }, {
1870
+ default: C(() => [
1871
+ k(M, {
1872
+ name: "xmark",
1873
+ hidden: "-full:sm"
1874
+ }),
1875
+ k(M, {
1876
+ name: "xmark",
1877
+ regular: "",
1878
+ hidden: "-full:sm"
1879
+ }),
1880
+ E("span", sa, T(y.value.title), 1)
1881
+ ]),
1882
+ _: 1
1883
+ }, 8, ["theme", "aria-label", "class", "onClick"])) : L("", !0)
1884
+ ]))
1885
+ ])
1886
+ ], 16), [
1887
+ [je, !d.loading && !d.hide]
1888
+ ]),
1889
+ d.loading || d.hide ? (i(), A(Ue, {
1890
+ key: 0,
1891
+ theme: d.theme
1892
+ }, {
1893
+ default: C(() => [
1894
+ k(ot, { name: "fade" }, {
1895
+ default: C(() => [
1896
+ p.value || e.hide && e.hideMessage ? (i(), b("div", ra, [
1897
+ E("p", ia, T(e.hideMessage ? e.hideMessage : r(n)("modal_taking_too_long")), 1),
1898
+ k(se, {
1899
+ theme: d.theme,
1900
+ "aria-label": r(n)("close"),
1901
+ onClick: g
1902
+ }, {
1903
+ default: C(() => [
1904
+ ne(T(r(n)("close")), 1)
1905
+ ]),
1906
+ _: 1
1907
+ }, 8, ["theme", "aria-label"])
1908
+ ])) : L("", !0)
1909
+ ]),
1910
+ _: 1
1911
+ })
1912
+ ]),
1913
+ _: 1
1914
+ }, 8, ["theme"])) : L("", !0)
1915
+ ], 544)
1916
+ ], 8, ["id", "to"]))
1917
+ ], 64));
1918
+ }
1919
+ }), ua = ["title"], da = { key: 5 }, ma = /* @__PURE__ */ j({
1920
+ name: "ValueSimple",
1921
+ inheritAttrs: !1,
1922
+ __name: "Simple",
1923
+ props: {
1924
+ value: {},
1925
+ property: {},
1926
+ readOnly: { type: Boolean },
1927
+ classes: {},
1928
+ modalTarget: {},
1929
+ modalTheme: {},
1930
+ theme: {}
1931
+ },
1932
+ setup(l) {
1933
+ const t = de("xamu"), { t: e } = U(Z), n = O(() => {
1934
+ const o = (t == null ? void 0 : t.lang) || "en", a = (t == null ? void 0 : t.country) || "US";
1935
+ return `${o}-${a}`;
1936
+ });
1937
+ function m(o) {
1938
+ const [a] = o.split("?");
1939
+ if (t != null && t.imageHosts && pe.isURL(a)) {
1940
+ const s = new URL(a);
1941
+ if (t.imageHosts.includes(s.host))
1942
+ return !0;
1943
+ }
1944
+ return /\.(jpg|jpeg|png|webp|avif|gif)$/.test(a);
1945
+ }
1946
+ function c(o) {
1947
+ return pe.isDate(o) || !isNaN(Date.parse(o));
1948
+ }
1949
+ return (o, a) => {
1950
+ var s;
1951
+ return i(), b("div", {
1952
+ class: G(["flx --flxRow --flx-start-center --gap-5", o.classes])
1953
+ }, [
1954
+ typeof o.value == "boolean" ? (i(), A(Se, {
1955
+ key: 0,
1956
+ checked: o.value,
1957
+ theme: o.theme,
1958
+ disabled: ""
1959
+ }, null, 8, ["checked", "theme"])) : typeof o.value == "string" && c(o.value) || o.value instanceof Date ? (i(), b("span", {
1960
+ key: 1,
1961
+ title: String(o.value)
1962
+ }, T(r(Et)(new Date(o.value), n.value)), 9, ua)) : typeof o.value == "string" && r(pe).isEmail(o.value) ? (i(), A(ee, {
1963
+ key: 2,
1964
+ mailto: o.value,
1965
+ theme: o.theme
1966
+ }, null, 8, ["mailto", "theme"])) : typeof o.value == "string" && r(pe).isURL(o.value, { require_host: !1 }) ? (i(), b(Y, { key: 3 }, [
1967
+ m(o.value) ? (i(), A(ge, {
1968
+ key: 0,
1969
+ class: "avatar",
1970
+ href: o.value,
1971
+ target: "_blank"
1972
+ }, {
1973
+ default: C(() => [
1974
+ k(He, {
1975
+ preset: "avatar",
1976
+ src: o.value,
1977
+ alt: o.value
1978
+ }, null, 8, ["src", "alt"])
1979
+ ]),
1980
+ _: 1
1981
+ }, 8, ["href"])) : (i(), A(ee, {
1982
+ key: 1,
1983
+ theme: o.theme,
1984
+ href: o.value,
1985
+ target: "_blank"
1986
+ }, {
1987
+ default: C(() => [
1988
+ ne(T(r(e)("table_open_url")), 1)
1989
+ ]),
1990
+ _: 1
1991
+ }, 8, ["theme", "href"]))
1992
+ ], 64)) : typeof o.value == "string" && o.value.length > 66 ? (i(), A(Be, {
1993
+ key: 4,
1994
+ class: "--txtSize",
1995
+ theme: o.modalTheme || o.theme,
1996
+ title: (s = o.property) == null ? void 0 : s.alias,
1997
+ target: o.modalTarget
1998
+ }, {
1999
+ toggle: C(({ setModel: u }) => [
2000
+ k(ee, {
2001
+ theme: o.theme,
2002
+ tooltip: r(e)("see_value"),
2003
+ "tooltip-as-text": "",
2004
+ "tooltip-position": "bottom",
2005
+ onClick: (p) => u()
2006
+ }, {
2007
+ default: C(() => [
2008
+ ne(T(o.value.substring(0, 33)) + "... ", 1)
2009
+ ]),
2010
+ _: 2
2011
+ }, 1032, ["theme", "tooltip", "onClick"])
2012
+ ]),
2013
+ default: C(({ model: u }) => [
2014
+ u ? (i(), b("div", {
2015
+ key: 0,
2016
+ class: G(["txt", o.classes])
2017
+ }, [
2018
+ E("p", null, T(o.value), 1)
2019
+ ], 2)) : L("", !0)
2020
+ ]),
2021
+ _: 1
2022
+ }, 8, ["theme", "title", "target"])) : (i(), b("span", da, T(typeof o.value == "string" || typeof o.value == "number" ? o.value ?? "-" : "-"), 1))
2023
+ ], 2);
2024
+ };
2025
+ }
2026
+ }), ca = { class: "txt --txtAlign-center --width" }, fa = ["innerHTML"], Ee = /* @__PURE__ */ j({
2027
+ name: "BoxMessage",
2028
+ inheritAttrs: !1,
2029
+ __name: "Message",
2030
+ props: {
2031
+ text: {},
2032
+ asButton: { type: Boolean },
2033
+ to: {},
2034
+ href: {},
2035
+ target: {},
2036
+ tel: {},
2037
+ disabled: { type: Boolean },
2038
+ mailto: {},
2039
+ type: {},
2040
+ tag: {},
2041
+ toggle: {},
2042
+ round: { type: [String, Boolean, Object, Array] },
2043
+ toggleState: {},
2044
+ indicative: {},
2045
+ whatsapp: { type: Boolean },
2046
+ download: {},
2047
+ hidden: { type: [String, Boolean, Object, Array] },
2048
+ size: {},
2049
+ active: { type: Boolean },
2050
+ invalid: { type: Boolean },
2051
+ state: {},
2052
+ theme: {}
2053
+ },
2054
+ setup(l) {
2055
+ const t = l, { getModifierClasses: e, getClassesString: n } = U(J), { modifiersClasses: m } = re(t), { stateClasses: c } = me(t), { themeClasses: o, themeValues: a } = te(t);
2056
+ return (s, u) => (i(), b("div", z({
2057
+ class: [r(m), "flx --flxColumn --flx-center --width"]
2058
+ }, s.$attrs), [
2059
+ E("div", ca, [
2060
+ E("div", {
2061
+ class: G([
2062
+ r(n)([
2063
+ r(m),
2064
+ r(c),
2065
+ r(o),
2066
+ r(e)([r(a)[0]], { modifier: "txtColor", divider: "-" }),
2067
+ r(e)(s.asButton ?? !1, { modifier: "button" })
2068
+ ]),
2069
+ "box"
2070
+ ])
2071
+ }, [
2072
+ s.text ? (i(), b("p", {
2073
+ key: 0,
2074
+ innerHTML: s.text
2075
+ }, null, 8, fa)) : x(s.$slots, "default", { key: 1 })
2076
+ ], 2)
2077
+ ])
2078
+ ], 16));
2079
+ }
2080
+ }), pa = /* @__PURE__ */ j({
2081
+ name: "DropdownSimple",
2082
+ inheritAttrs: !1,
2083
+ __name: "Dropdown",
2084
+ props: {
2085
+ position: {},
2086
+ el: {},
2087
+ modelValue: { type: Boolean },
2088
+ hidden: { type: [String, Boolean, Object, Array] },
2089
+ size: {},
2090
+ theme: {}
2091
+ },
2092
+ emits: ["close", "update:model-value"],
2093
+ setup(l, { emit: t }) {
2094
+ const e = l, { getModifierClasses: n, getClassesString: m } = U(J), { themeValues: c } = te(e), { tabletMqRange: o } = ft(), { modifiersClasses: a } = re(e), s = W(), u = W(), p = W(!1), h = W(e.modelValue), y = O(() => m([
2095
+ "dropdown",
2096
+ `--bgColor-${c.value[1]}`,
2097
+ n([{ active: e.modelValue }], { prefix: "is" }),
2098
+ n([[e.position ?? "bottom"].flat(2).join("-")], {
2099
+ modifier: "position",
2100
+ divider: "-"
2101
+ })
2102
+ ]));
2103
+ function g(d = !h.value) {
2104
+ return h.value = d;
2105
+ }
2106
+ function v() {
2107
+ t("close"), t("update:model-value", g(!1));
2108
+ }
2109
+ function S(d) {
2110
+ const D = d.target, F = s.value, Q = u.value;
2111
+ Q === D || Q != null && Q.contains(D) || F != null && F.contains(D) || v();
2112
+ }
2113
+ const $ = O({
2114
+ get: () => e.modelValue || h.value,
2115
+ set: v
2116
+ });
2117
+ return ce(
2118
+ o,
2119
+ (d) => {
2120
+ p.value = d && e.modelValue !== null, v();
2121
+ },
2122
+ { immediate: !1 }
2123
+ ), Ve(() => {
2124
+ document.addEventListener("click", S, !0);
2125
+ }), qe(() => {
2126
+ document.removeEventListener("click", S, !0);
2127
+ }), (d, D) => (i(), A(Ae, {
2128
+ wrap: !!d.$slots.toggle
2129
+ }, {
2130
+ default: C(() => [
2131
+ d.$slots.toggle ? (i(), b("div", {
2132
+ key: 0,
2133
+ ref_key: "toggleRef",
2134
+ ref: s,
2135
+ class: G(["only--active toggle--dropdown", { "is--active": $.value }])
2136
+ }, [
2137
+ x(d.$slots, "toggle", X(le({ model: h.value, setModel: g })))
2138
+ ], 2)) : L("", !0),
2139
+ k(Be, {
2140
+ modelValue: $.value,
2141
+ "onUpdate:modelValue": D[0] || (D[0] = (F) => $.value = F),
2142
+ disabled: !p.value,
2143
+ theme: d.theme
2144
+ }, {
2145
+ default: C(() => [
2146
+ E("div", {
2147
+ ref_key: "dropdownRef",
2148
+ ref: u,
2149
+ class: G({ [r(m)([r(a), y.value])]: !p.value })
2150
+ }, [
2151
+ x(d.$slots, "default", X(le({ model: h.value, setModel: g })))
2152
+ ], 2)
2153
+ ]),
2154
+ _: 3
2155
+ }, 8, ["modelValue", "disabled", "theme"])
2156
+ ]),
2157
+ _: 3
2158
+ }, 8, ["wrap"]));
2159
+ }
2160
+ }), ha = {
2161
+ key: 0,
2162
+ class: "flx --flxRow --flx-end-center"
2163
+ }, va = { class: "--txtAlign --txtSize-sm" }, ga = { class: "flx --flxRow --flx-start-center --gap-10" }, ya = { key: 1 }, _a = /* @__PURE__ */ E("span", null, "#", -1), ba = ["data-column-name", "data-column", "width"], wa = ["title"], Ca = {
2164
+ key: 0,
2165
+ class: "--sticky --txtAlign-center",
2166
+ "data-column-name": "modify",
2167
+ "data-column": "modify"
2168
+ }, ka = { class: "flx --flxRow --flx-start-center --gap-10" }, $a = ["title"], Aa = ["data-column-name", "data-column"], Sa = ["data-column"], Ba = { class: "flx --flxRow --flx-center --gap-10" }, Ea = { class: "flx --flxColumn --flx-start-stretch --gap-5" }, Va = { key: 0 }, La = { key: 1 }, Oa = {
2169
+ key: 0,
2170
+ class: "no--hover"
2171
+ }, Ta = { class: "--sticky --pX-10 --pY-5 --vAlign" }, Ra = { class: "flx --flxRow --flx-center-end --gap-10 --bdr" }, Pa = ["colspan"], Na = { class: "flx --flxRow --flx-start --flx --width" }, Ia = {
2172
+ key: 0,
2173
+ class: "--width --pRight --boxSizing --overflow-hidden"
2174
+ }, za = { class: "flx --flxRow --flx-center" }, Da = /* @__PURE__ */ j({
2175
+ name: "TableSimple",
2176
+ inheritAttrs: !1,
2177
+ __name: "Table",
2178
+ props: {
2179
+ nodes: {},
2180
+ properties: {},
2181
+ readOnly: { type: Boolean },
2182
+ canSort: { type: Boolean },
2183
+ updateNode: { type: Function },
2184
+ deleteNode: { type: Function },
2185
+ cloneNode: { type: Function },
2186
+ createNodeChildren: { type: Function },
2187
+ classes: {},
2188
+ refresh: { type: Function },
2189
+ extraCols: { type: Boolean },
2190
+ childrenName: {},
2191
+ childrenCountKey: {},
2192
+ modalTheme: {},
2193
+ omitRefresh: { type: Boolean },
2194
+ theme: {}
2195
+ },
2196
+ setup(l) {
2197
+ var B;
2198
+ const t = l, { t: e, tet: n } = U(Z), m = U(Le), { themeClasses: c, themeValues: o } = te({ ...t, themeAsUnion: !0 }), a = (B = We()) == null ? void 0 : B.appContext.config.globalProperties.$router, s = W(), u = W(v(t.nodes.length)), p = O(() => u.value.filter(([f]) => f).length), h = O(() => {
2199
+ var V;
2200
+ const f = { name: "id", asc: !0 };
2201
+ if (a) {
2202
+ const _ = a.currentRoute.value;
2203
+ if (!_.query.orderBy)
2204
+ return f;
2205
+ const N = (V = String(_.query.orderBy).split(",")[0]) == null ? void 0 : V.split(":");
2206
+ f.name = N[0], String(N[1]).toUpperCase() === "DESC" && (f.asc = !1);
2207
+ }
2208
+ return f;
2209
+ }), y = O(() => t.readOnly || !t.nodes.length || !t.updateNode && !t.cloneNode && !t.deleteNode), g = O(() => Object.entries(t.nodes[0]).sort(([f], [V]) => f.endsWith("At") || f.endsWith("By") || V.endsWith("At") || V.endsWith("By") ? f.endsWith("At") || f.endsWith("By") ? 1 : -1 : f > V ? 1 : f < V ? -1 : 0).map(([f]) => {
2210
+ const V = (t.properties || []).map(be), _ = be(V.find((N) => N.value === f) || f), R = H.snakeCase(f);
2211
+ return {
2212
+ ..._,
2213
+ alias: H.capitalize(H.startCase(_.alias || n(R)))
2214
+ };
2215
+ }).filter((f) => f.value !== "id"));
2216
+ function v(f) {
2217
+ return Array.from({ length: f }, () => [!1, !1]);
2218
+ }
2219
+ function S(f) {
2220
+ return t.childrenCountKey ? f[t.childrenCountKey] : 0;
2221
+ }
2222
+ function $(f = !0) {
2223
+ u.value.forEach((V, _) => u.value[_][0] = f);
2224
+ }
2225
+ function d(f) {
2226
+ const [V, _] = u.value[f];
2227
+ u.value[f] = [V, !_];
2228
+ }
2229
+ function D(f) {
2230
+ return h.value.name === f;
2231
+ }
2232
+ function F(f) {
2233
+ var V = "ASC";
2234
+ h.value.name === f && h.value.asc && (V = "DESC");
2235
+ const _ = `${f}:${V}`;
2236
+ if (!a)
2237
+ return;
2238
+ const R = a.currentRoute.value;
2239
+ a.push({ path: R.path, hash: R.hash, query: { ...R.query, orderBy: _ } });
2240
+ }
2241
+ async function Q(f) {
2242
+ var _, R;
2243
+ m.fireLoader({});
2244
+ const V = await ((_ = t.updateNode) == null ? void 0 : _.call(t, f));
2245
+ if (V === void 0) {
2246
+ m.isLoading() && m.close();
2247
+ return;
2248
+ }
2249
+ V ? m.fire({
2250
+ icon: "success",
2251
+ title: e("swal.table_updated")
2252
+ }) : m.fire({
2253
+ icon: "warning",
2254
+ title: e("swal.table_updated"),
2255
+ text: e("swal.table_possibly_not_updated")
2256
+ }), t.omitRefresh || (R = t.refresh) == null || R.call(t);
2257
+ }
2258
+ async function w(f, V) {
2259
+ var R, N;
2260
+ V(!1), m.fireLoader({});
2261
+ const _ = await ((R = t.cloneNode) == null ? void 0 : R.call(t, f));
2262
+ if (_ === void 0) {
2263
+ m.isLoading() && m.close();
2264
+ return;
2265
+ }
2266
+ _ ? m.fire({
2267
+ icon: "success",
2268
+ title: e("swal.table_cloned")
2269
+ }) : m.fire({
2270
+ icon: "warning",
2271
+ title: e("swal.table_cloned"),
2272
+ text: e("swal.table_possibly_not_cloned")
2273
+ }), t.omitRefresh || (N = t.refresh) == null || N.call(t);
2274
+ }
2275
+ async function I(f, V) {
2276
+ var N, K;
2277
+ const { value: _ } = await m.firePrevent({
2278
+ title: e("table_delete"),
2279
+ text: e("swal.table_delete_node_title"),
2280
+ footer: e("swal.table_delete_node_disclaimer")
2281
+ });
2282
+ if (!_)
2283
+ return;
2284
+ V(!1), m.fireLoader({});
2285
+ const R = await ((N = t.deleteNode) == null ? void 0 : N.call(t, f));
2286
+ if (R === void 0) {
2287
+ m.isLoading() && m.close();
2288
+ return;
2289
+ }
2290
+ R ? m.fire({
2291
+ icon: "success",
2292
+ title: e("swal.table_deleted")
2293
+ }) : m.fire({
2294
+ icon: "warning",
2295
+ title: e("swal.table_deleted"),
2296
+ text: e("swal.table_possibly_not_deleted")
2297
+ }), t.omitRefresh || (K = t.refresh) == null || K.call(t);
2298
+ }
2299
+ async function q() {
2300
+ var _;
2301
+ const { value: f } = await m.firePrevent({
2302
+ title: e("table_delete"),
2303
+ text: e("swal.table_delete_nodes_title", p.value),
2304
+ footer: e("swal.table_delete_nodes_disclaimer")
2305
+ });
2306
+ if (!f)
2307
+ return;
2308
+ m.fireLoader({});
2309
+ const V = await Promise.all(
2310
+ t.nodes.filter((R, N) => u.value[N][0]).map(async (R) => {
2311
+ var N;
2312
+ return await ((N = t.deleteNode) == null ? void 0 : N.call(t, R));
2313
+ })
2314
+ );
2315
+ if (V.every((R) => R === void 0)) {
2316
+ m.isLoading() && m.close();
2317
+ return;
2318
+ }
2319
+ V.every((R) => R) ? m.fire({
2320
+ icon: "success",
2321
+ title: e("swal.table_deleted")
2322
+ }) : m.fire({
2323
+ icon: "warning",
2324
+ title: e("swal.table_deleted"),
2325
+ text: e("swal.table_possibly_not_deleted", t.nodes.length)
2326
+ }), t.omitRefresh || (_ = t.refresh) == null || _.call(t);
2327
+ }
2328
+ return ce(
2329
+ () => t.nodes,
2330
+ (f) => u.value = v(f.length),
2331
+ { immediate: !1 }
2332
+ ), (f, V) => f.nodes.length ? (i(), b("div", {
2333
+ key: 0,
2334
+ ref_key: "valueRootRef",
2335
+ ref: s,
2336
+ class: "flx --flxColumn --flx-start-stretch --width"
2337
+ }, [
2338
+ y.value ? L("", !0) : (i(), b("div", ha, [
2339
+ f.deleteNode ? (i(), A(se, {
2340
+ key: 0,
2341
+ tooltip: r(e)("table_delete"),
2342
+ "tooltip-as-text": "",
2343
+ "tooltip-position": "bottom",
2344
+ theme: [r(ue).DANGER, r(o)[1]],
2345
+ disabled: !u.value.some(([_]) => _),
2346
+ onClick: q
2347
+ }, {
2348
+ default: C(() => [
2349
+ E("span", null, T(p.value === u.value.length ? r(e)("delete_all") : r(e)("delete", p.value)), 1),
2350
+ k(M, { name: "trash-can" })
2351
+ ]),
2352
+ _: 1
2353
+ }, 8, ["tooltip", "theme", "disabled"])) : L("", !0)
2354
+ ])),
2355
+ E("div", z(f.$attrs, { class: "scroll --horizontal --always" }), [
2356
+ E("table", {
2357
+ class: G(["tbl", r(c)])
2358
+ }, [
2359
+ E("thead", null, [
2360
+ E("tr", va, [
2361
+ E("th", {
2362
+ class: G(["--sticky", { "is--selected": f.canSort && D("id") }]),
2363
+ "data-column-name": "id",
2364
+ "data-column": "id"
2365
+ }, [
2366
+ E("div", ga, [
2367
+ y.value ? L("", !0) : (i(), A(Se, {
2368
+ key: 0,
2369
+ theme: f.theme,
2370
+ title: r(e)("table_select_all"),
2371
+ checked: u.value.every(([_]) => _),
2372
+ "onUpdate:modelValue": $
2373
+ }, null, 8, ["theme", "title", "checked"])),
2374
+ y.value || !f.canSort ? (i(), b("span", ya, "#")) : (i(), A(ee, {
2375
+ key: 2,
2376
+ theme: f.theme,
2377
+ title: "id",
2378
+ tooltip: r(e)("table_sort_by_name", { name: "Id" }),
2379
+ "tooltip-as-text": "",
2380
+ "tooltip-position": "bottom",
2381
+ onClick: V[0] || (V[0] = (_) => F("id"))
2382
+ }, {
2383
+ default: C(() => [
2384
+ _a,
2385
+ D("id") ? (i(), b(Y, { key: 0 }, [
2386
+ h.value.asc ? (i(), A(M, {
2387
+ key: 0,
2388
+ name: "arrow-down"
2389
+ })) : L("", !0),
2390
+ h.value.asc ? L("", !0) : (i(), A(M, {
2391
+ key: 1,
2392
+ name: "arrow-up"
2393
+ }))
2394
+ ], 64)) : L("", !0)
2395
+ ]),
2396
+ _: 1
2397
+ }, 8, ["theme", "tooltip"]))
2398
+ ])
2399
+ ], 2),
2400
+ (i(!0), b(Y, null, oe(g.value, (_, R) => (i(), b("td", {
2401
+ key: R,
2402
+ class: G(["--txtSize-sm --maxWidth-440", { "is--selected": f.canSort && D(_.value) }]),
2403
+ "data-column-name": _.value,
2404
+ "data-column": _.alias,
2405
+ width: f.extraCols && R === g.value.length - 1 ? "99%" : "auto"
2406
+ }, [
2407
+ f.canSort ? (i(), A(ee, {
2408
+ key: 1,
2409
+ theme: f.theme,
2410
+ title: _.value,
2411
+ tooltip: r(e)("table_sort_by_name", { name: _.alias }),
2412
+ "tooltip-as-text": "",
2413
+ "tooltip-position": "bottom",
2414
+ onClick: (N) => F(_.value)
2415
+ }, {
2416
+ default: C(() => [
2417
+ E("span", null, T(_.alias), 1),
2418
+ D(_.value) ? (i(), b(Y, { key: 0 }, [
2419
+ h.value.asc ? (i(), A(M, {
2420
+ key: 0,
2421
+ name: "arrow-down"
2422
+ })) : (i(), A(M, {
2423
+ key: 1,
2424
+ name: "arrow-up"
2425
+ }))
2426
+ ], 64)) : L("", !0)
2427
+ ]),
2428
+ _: 2
2429
+ }, 1032, ["theme", "title", "tooltip", "onClick"])) : (i(), b("span", {
2430
+ key: 0,
2431
+ title: String(_.value)
2432
+ }, T(_.alias), 9, wa))
2433
+ ], 10, ba))), 128)),
2434
+ !y.value && (f.updateNode || f.deleteNode || f.cloneNode) ? (i(), b("th", Ca, [
2435
+ E("span", null, T(r(e)("table_modify")), 1)
2436
+ ])) : L("", !0)
2437
+ ])
2438
+ ]),
2439
+ E("tbody", {
2440
+ class: G(f.classes)
2441
+ }, [
2442
+ (i(!0), b(Y, null, oe(f.nodes, (_, R) => (i(), b(Y, { key: R }, [
2443
+ E("tr", {
2444
+ class: G(["--txtAlign --txtSize-sm", { "is--selected": u.value[R][0] }])
2445
+ }, [
2446
+ E("th", {
2447
+ class: G(["--sticky", { "is--selected": D("id") }]),
2448
+ "data-column-name": "id",
2449
+ "data-column": "id"
2450
+ }, [
2451
+ E("div", ka, [
2452
+ y.value ? L("", !0) : (i(), A(Se, {
2453
+ key: 0,
2454
+ modelValue: u.value[R][0],
2455
+ "onUpdate:modelValue": (N) => u.value[R][0] = N,
2456
+ theme: f.theme,
2457
+ title: r(e)("table_select")
2458
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "theme", "title"])),
2459
+ E("span", {
2460
+ title: _.id
2461
+ }, T(_.id && typeof _.id == "number" ? _.id : R + 1), 9, $a)
2462
+ ])
2463
+ ], 2),
2464
+ (i(!0), b(Y, null, oe(g.value, (N) => (i(), b("td", {
2465
+ key: N.value,
2466
+ "data-column-name": N.value,
2467
+ "data-column": N.alias,
2468
+ class: G([{
2469
+ "is--selected": h.value.name === N.value
2470
+ }, "--txtSize-sm --maxWidth-440"])
2471
+ }, [
2472
+ s.value ? (i(), A(ja, X(z({ key: 0 }, {
2473
+ value: _[N.value],
2474
+ property: N,
2475
+ node: _,
2476
+ readOnly: y.value,
2477
+ theme: f.theme,
2478
+ modalTheme: f.modalTheme,
2479
+ classes: f.classes,
2480
+ modalTarget: s.value,
2481
+ refresh: f.refresh
2482
+ })), null, 16)) : L("", !0)
2483
+ ], 10, Aa))), 128)),
2484
+ !y.value && (f.updateNode || f.deleteNode || f.cloneNode) ? (i(), b("th", {
2485
+ key: 0,
2486
+ class: "--sticky --txtAlign-center",
2487
+ "data-column-name": "modify",
2488
+ "data-column": r(e)("table_modify")
2489
+ }, [
2490
+ E("div", Ba, [
2491
+ f.updateNode ? (i(), A(se, {
2492
+ key: 0,
2493
+ tooltip: r(e)("table_update"),
2494
+ "tooltip-as-text": "",
2495
+ "tooltip-position": "left",
2496
+ theme: f.theme,
2497
+ size: "sm",
2498
+ round: "",
2499
+ disabled: u.value.some(([N]) => N),
2500
+ onClick: (N) => Q(_)
2501
+ }, {
2502
+ default: C(() => [
2503
+ k(M, { name: "pencil" })
2504
+ ]),
2505
+ _: 2
2506
+ }, 1032, ["tooltip", "theme", "disabled", "onClick"])) : L("", !0),
2507
+ k(pa, {
2508
+ class: "flx --flxRow --flx-center",
2509
+ position: ["left", "center"],
2510
+ theme: f.modalTheme,
2511
+ size: "sm"
2512
+ }, {
2513
+ toggle: C(({ setModel: N }) => [
2514
+ k(ee, {
2515
+ "aria-label": r(e)("table_options"),
2516
+ title: r(e)("table_options"),
2517
+ theme: f.theme,
2518
+ size: "sm",
2519
+ disabled: u.value.some(([K]) => K),
2520
+ toggle: "dropdown",
2521
+ onClick: (K) => N()
2522
+ }, {
2523
+ default: C(() => [
2524
+ k(M, { name: "ellipsis-vertical" })
2525
+ ]),
2526
+ _: 2
2527
+ }, 1032, ["aria-label", "title", "theme", "disabled", "onClick"])
2528
+ ]),
2529
+ default: C(({ setModel: N }) => [
2530
+ E("ul", Ea, [
2531
+ f.cloneNode ? (i(), b("li", Va, [
2532
+ k(ee, {
2533
+ theme: f.theme,
2534
+ size: "sm",
2535
+ "aria-label": r(e)("table_duplicate"),
2536
+ onClick: (K) => w(_, N)
2537
+ }, {
2538
+ default: C(() => [
2539
+ k(M, { name: "clone" }),
2540
+ E("span", null, T(r(e)("table_duplicate")), 1)
2541
+ ]),
2542
+ _: 2
2543
+ }, 1032, ["theme", "aria-label", "onClick"])
2544
+ ])) : L("", !0),
2545
+ f.deleteNode ? (i(), b("li", La, [
2546
+ k(ee, {
2547
+ theme: [r(ue).DANGER, r(o)[1]],
2548
+ size: "sm",
2549
+ "aria-label": r(e)("table_delete"),
2550
+ onClick: (K) => I(_, N)
2551
+ }, {
2552
+ default: C(() => [
2553
+ k(M, { name: "trash-can" }),
2554
+ E("span", null, T(r(e)("table_delete")), 1)
2555
+ ]),
2556
+ _: 2
2557
+ }, 1032, ["theme", "aria-label", "onClick"])
2558
+ ])) : L("", !0)
2559
+ ])
2560
+ ]),
2561
+ _: 2
2562
+ }, 1032, ["theme"])
2563
+ ])
2564
+ ], 8, Sa)) : L("", !0)
2565
+ ], 2),
2566
+ f.$slots.default ? (i(), b("tr", Oa, [
2567
+ E("th", Ta, [
2568
+ E("div", Ra, [
2569
+ k(ee, {
2570
+ theme: f.theme,
2571
+ size: "sm",
2572
+ active: u.value[R][1],
2573
+ tooltip: r(e)("table_see_name", {
2574
+ name: f.childrenName || f.childrenCountKey || _.id.split("/")[0]
2575
+ }),
2576
+ "tooltip-position": "right",
2577
+ disabled: f.childrenCountKey && !S(_),
2578
+ class: "--p-5",
2579
+ onClick: (N) => d(R)
2580
+ }, {
2581
+ default: C(() => [
2582
+ k(M, {
2583
+ name: "chevron-up",
2584
+ indicator: ""
2585
+ })
2586
+ ]),
2587
+ _: 2
2588
+ }, 1032, ["theme", "active", "tooltip", "disabled", "onClick"]),
2589
+ k(ee, {
2590
+ theme: f.theme,
2591
+ size: "sm",
2592
+ tooltip: r(e)("table_create_new"),
2593
+ "tooltip-position": "right",
2594
+ disabled: !f.createNodeChildren,
2595
+ class: "--p-5",
2596
+ onClick: (N) => {
2597
+ var K;
2598
+ return (K = f.createNodeChildren) == null ? void 0 : K.call(f, _);
2599
+ }
2600
+ }, {
2601
+ default: C(() => [
2602
+ k(M, { name: "plus" })
2603
+ ]),
2604
+ _: 2
2605
+ }, 1032, ["theme", "tooltip", "disabled", "onClick"])
2606
+ ])
2607
+ ]),
2608
+ E("td", {
2609
+ colspan: g.value.length + 1,
2610
+ class: "--pY-5 --index-1 --pRight"
2611
+ }, [
2612
+ Fe(E("div", Na, [
2613
+ x(f.$slots, "default", X(le({ node: _, show: u.value[R][1] })))
2614
+ ], 512), [
2615
+ [je, u.value[R][1]]
2616
+ ]),
2617
+ u.value[R][1] ? L("", !0) : (i(), b("div", Ia, [
2618
+ E("hr", {
2619
+ class: G(`--tm-${r(o)[0]}`)
2620
+ }, null, 2)
2621
+ ]))
2622
+ ], 8, Pa)
2623
+ ])) : L("", !0)
2624
+ ], 64))), 128))
2625
+ ], 2)
2626
+ ], 2)
2627
+ ], 16)
2628
+ ], 512)) : f.canSort ? L("", !0) : (i(), A(Ee, {
2629
+ key: 1,
2630
+ theme: f.theme
2631
+ }, {
2632
+ default: C(() => [
2633
+ E("div", za, [
2634
+ E("span", null, T(r(e)("nothing_to_show")), 1),
2635
+ f.refresh ? (i(), A(ae, {
2636
+ key: 0,
2637
+ theme: f.theme,
2638
+ tooltip: r(e)("refresh"),
2639
+ round: "",
2640
+ onClick: V[1] || (V[1] = (_) => f.refresh())
2641
+ }, {
2642
+ default: C(() => [
2643
+ k(M, { name: "rotate-right" }),
2644
+ k(M, {
2645
+ name: "rotate-right",
2646
+ regular: ""
2647
+ })
2648
+ ]),
2649
+ _: 1
2650
+ }, 8, ["theme", "tooltip"])) : L("", !0)
2651
+ ])
2652
+ ]),
2653
+ _: 1
2654
+ }, 8, ["theme"]));
2655
+ }
2656
+ }), Ma = ["title"], Ua = { class: "--txtWrap-nowrap" }, qa = { key: 1 }, Fa = { key: 2 }, ja = /* @__PURE__ */ j({
2657
+ name: "ValueComplex",
2658
+ inheritAttrs: !1,
2659
+ __name: "Complex",
2660
+ props: {
2661
+ value: {},
2662
+ property: {},
2663
+ node: {},
2664
+ readOnly: { type: Boolean },
2665
+ readFn: { type: Function },
2666
+ createFn: { type: Function },
2667
+ deleteFn: { type: Function },
2668
+ classes: {},
2669
+ refresh: { type: Function },
2670
+ modalTarget: {},
2671
+ modalTheme: {},
2672
+ theme: {}
2673
+ },
2674
+ setup(l) {
2675
+ const t = l, { themeValues: e } = te(t), { t: n } = U(Z);
2676
+ function m(a) {
2677
+ return a.map((s) => typeof s == "object" && s !== null ? s : { value: s });
2678
+ }
2679
+ async function c(a) {
2680
+ var s;
2681
+ await a && ((s = t.refresh) == null || s.call(t));
2682
+ }
2683
+ function o(a) {
2684
+ return Object.entries(a).sort(([s], [u]) => s.endsWith("At") || s.endsWith("By") || u.endsWith("At") || u.endsWith("By") ? s.endsWith("At") || s.endsWith("By") ? 1 : -1 : s > u ? 1 : s < u ? -1 : 0).filter(([s]) => s !== "id");
2685
+ }
2686
+ return (a, s) => {
2687
+ var p, h;
2688
+ const u = nt("Complex", !0);
2689
+ return Array.isArray(a.value) ? (i(), b("div", {
2690
+ key: 0,
2691
+ class: "flx --flxRow --flx-start-center --gap-5",
2692
+ title: a.value.length ? r(n)("table_quantity", a.value.length) : ""
2693
+ }, [
2694
+ !a.readOnly && a.createFn ? (i(), A(se, {
2695
+ key: 0,
2696
+ theme: a.theme,
2697
+ tooltip: r(n)("table_create_new"),
2698
+ "tooltip-as-text": "",
2699
+ "tooltip-position": "bottom",
2700
+ round: "",
2701
+ onClick: s[0] || (s[0] = (y) => c(a.createFn()))
2702
+ }, {
2703
+ default: C(() => [
2704
+ k(M, { name: "plus" })
2705
+ ]),
2706
+ _: 1
2707
+ }, 8, ["theme", "tooltip"])) : L("", !0),
2708
+ a.value.length ? (i(), b(Y, { key: 1 }, [
2709
+ E("span", Ua, [
2710
+ E("b", {
2711
+ class: G(`--txtColor-${r(e)[0]}`)
2712
+ }, T(a.value.length), 3),
2713
+ ne(" ⋅ ")
2714
+ ]),
2715
+ a.value.every((y) => typeof y == "object") || a.value.length > 3 ? (i(), A(Be, {
2716
+ key: 0,
2717
+ class: "--txtSize",
2718
+ theme: a.modalTheme || a.theme,
2719
+ title: (p = a.property) == null ? void 0 : p.alias,
2720
+ target: a.modalTarget
2721
+ }, {
2722
+ toggle: C(({ setModel: y }) => {
2723
+ var g, v;
2724
+ return [
2725
+ k(ae, {
2726
+ theme: a.theme,
2727
+ "aria-label": r(n)("table_see_values", { name: (v = (g = a.property) == null ? void 0 : g.alias) == null ? void 0 : v.toLowerCase() }),
2728
+ size: "sm",
2729
+ onClick: (S) => y()
2730
+ }, {
2731
+ default: C(() => {
2732
+ var S, $;
2733
+ return [
2734
+ ne(T(r(n)("table_see_values", { name: ($ = (S = a.property) == null ? void 0 : S.alias) == null ? void 0 : $.toLowerCase() })), 1)
2735
+ ];
2736
+ }),
2737
+ _: 2
2738
+ }, 1032, ["theme", "aria-label", "onClick"])
2739
+ ];
2740
+ }),
2741
+ default: C(({ model: y }) => [
2742
+ y ? (i(), A(Da, {
2743
+ key: 0,
2744
+ nodes: m(a.value),
2745
+ theme: a.theme,
2746
+ "modal-theme": a.modalTheme,
2747
+ classes: a.classes
2748
+ }, null, 8, ["nodes", "theme", "modal-theme", "classes"])) : L("", !0)
2749
+ ]),
2750
+ _: 1
2751
+ }, 8, ["theme", "title", "target"])) : (i(), b("span", qa, T(a.value.join(", ")), 1))
2752
+ ], 64)) : a.createFn ? L("", !0) : (i(), b("span", Fa, "-"))
2753
+ ], 8, Ma)) : typeof a.value == "object" && a.value !== null && Object.keys(a.value).length ? (i(), A(Be, {
2754
+ key: 1,
2755
+ class: "--txtSize",
2756
+ theme: a.modalTheme || a.theme,
2757
+ title: (h = a.property) == null ? void 0 : h.alias,
2758
+ target: a.modalTarget
2759
+ }, {
2760
+ toggle: C(({ setModel: y }) => [
2761
+ "name" in a.value ? (i(), A(ee, {
2762
+ key: 0,
2763
+ theme: a.theme,
2764
+ tooltip: r(n)("see_value"),
2765
+ "tooltip-as-text": "",
2766
+ "tooltip-position": "bottom",
2767
+ size: "sm",
2768
+ onClick: (g) => y()
2769
+ }, {
2770
+ default: C(() => [
2771
+ k(M, {
2772
+ name: "lemon",
2773
+ "force-regular": ""
2774
+ }),
2775
+ E("span", null, T(a.value.name), 1)
2776
+ ]),
2777
+ _: 2
2778
+ }, 1032, ["theme", "tooltip", "onClick"])) : (i(), A(ae, {
2779
+ key: 1,
2780
+ theme: a.theme,
2781
+ tooltip: r(n)("see_value"),
2782
+ "tooltip-as-text": "",
2783
+ "tooltip-position": "bottom",
2784
+ size: "sm",
2785
+ round: "",
2786
+ onClick: (g) => y()
2787
+ }, {
2788
+ default: C(() => [
2789
+ k(M, { name: "lemon" }),
2790
+ k(M, {
2791
+ name: "lemon",
2792
+ "force-regular": ""
2793
+ })
2794
+ ]),
2795
+ _: 2
2796
+ }, 1032, ["theme", "tooltip", "onClick"]))
2797
+ ]),
2798
+ default: C(({ model: y }) => [
2799
+ y ? (i(), b("ul", {
2800
+ key: 0,
2801
+ class: G(["flx --flxColumn --minWidth-220 --txtSize-sm", a.classes])
2802
+ }, [
2803
+ (i(!0), b(Y, null, oe(o(a.value), ([g, v], S) => (i(), b("li", {
2804
+ key: S,
2805
+ class: "flx --flxColumn --flx-center-start --gap-5 --flx-fit"
2806
+ }, [
2807
+ E("span", {
2808
+ class: G(["--txtSize-xs", `--txtColor-${r(e)[0]}`])
2809
+ }, T(r(H).capitalize(r(H).startCase(g))), 3),
2810
+ k(u, z({
2811
+ value: v,
2812
+ node: a.node,
2813
+ property: {
2814
+ value: g,
2815
+ alias: r(H).capitalize(r(H).startCase(g))
2816
+ },
2817
+ readOnly: a.readOnly,
2818
+ theme: a.theme,
2819
+ modalTheme: a.modalTheme,
2820
+ modalTarget: a.modalTarget
2821
+ }, { class: a.classes }), null, 16, ["class"])
2822
+ ]))), 128))
2823
+ ], 2)) : L("", !0)
2824
+ ]),
2825
+ _: 1
2826
+ }, 8, ["theme", "title", "target"])) : (i(), A(ma, X(z({ key: 2 }, { value: a.value, property: a.property, readOnly: a.readOnly, theme: a.theme, modalTheme: a.modalTheme, classes: a.classes, modalTarget: a.modalTarget })), null, 16));
2827
+ };
2828
+ }
2829
+ }), Fl = /* @__PURE__ */ j({
2830
+ name: "BoxAction",
2831
+ inheritAttrs: !1,
2832
+ __name: "Action",
2833
+ props: {
2834
+ icon: {},
2835
+ iconProps: {},
2836
+ src: {},
2837
+ text: {},
2838
+ to: {},
2839
+ href: {},
2840
+ target: {},
2841
+ tel: {},
2842
+ disabled: { type: Boolean },
2843
+ mailto: {},
2844
+ type: {},
2845
+ tag: {},
2846
+ toggle: {},
2847
+ round: { type: [String, Boolean, Object, Array] },
2848
+ toggleState: {},
2849
+ indicative: {},
2850
+ whatsapp: { type: Boolean },
2851
+ download: {},
2852
+ hidden: { type: [String, Boolean, Object, Array] },
2853
+ size: {},
2854
+ active: { type: Boolean },
2855
+ invalid: { type: Boolean },
2856
+ state: {},
2857
+ theme: {},
2858
+ tooltip: {},
2859
+ tooltipPosition: {},
2860
+ tooltipAsText: { type: Boolean }
2861
+ },
2862
+ setup(l) {
2863
+ const t = l, { getClassesString: e } = U(J), { modifiersClasses: n } = re(t), { stateClasses: m } = me(t), { themeClasses: c, tooltipAttributes: o } = te(t), { themeClasses: a } = te({ theme: ue.LIGHT });
2864
+ return (s, u) => (i(), A(ge, z({ ...s.$attrs, ...t, ...r(o) }, {
2865
+ class: [r(e)([r(n), r(m), r(c)]), "box --button"]
2866
+ }), {
2867
+ default: C(() => [
2868
+ E("div", {
2869
+ class: G([r(e)([r(a)]), "box --square-sm"])
2870
+ }, [
2871
+ s.src ? (i(), A(He, {
2872
+ key: 1,
2873
+ class: "--bgColor-light --width --height",
2874
+ src: s.src,
2875
+ alt: s.text
2876
+ }, null, 8, ["src", "alt"])) : (i(), A(M, X(z({ key: 0 }, { ...s.iconProps, name: s.icon ?? "cubes", size: 50 })), null, 16))
2877
+ ], 2),
2878
+ E("p", null, [
2879
+ E("b", null, T(s.text), 1)
2880
+ ])
2881
+ ]),
2882
+ _: 1
2883
+ }, 16, ["class"]));
2884
+ }
2885
+ }), Wa = { class: "flx --flxRow --flx-center" }, Ha = { class: "flx --flxRow --flx-center" }, Ga = {
2886
+ key: 0,
2887
+ class: "back --overlay is--active"
2888
+ }, pt = /* @__PURE__ */ j({
2889
+ name: "LoaderContent",
2890
+ inheritAttrs: !1,
2891
+ __name: "Content",
2892
+ props: {
2893
+ content: { type: Boolean },
2894
+ loading: { type: Boolean },
2895
+ errors: { type: Boolean },
2896
+ noContentMessage: {},
2897
+ label: {},
2898
+ refresh: { type: Function },
2899
+ unwrap: { type: Boolean },
2900
+ el: {},
2901
+ loaderClasses: {},
2902
+ theme: {}
2903
+ },
2904
+ setup(l) {
2905
+ const { t } = U(Z);
2906
+ return (e, n) => (i(), A(Ae, {
2907
+ el: ot,
2908
+ wrap: !e.unwrap,
2909
+ name: "fade",
2910
+ appear: ""
2911
+ }, {
2912
+ default: C(() => [
2913
+ !e.content || e.errors ? (i(), b("div", {
2914
+ key: 0,
2915
+ class: G(["flx --flxColumn --flx-center --width", e.loaderClasses])
2916
+ }, [
2917
+ e.loading ? (i(), A(Ue, {
2918
+ key: 1,
2919
+ label: e.label,
2920
+ theme: e.theme
2921
+ }, null, 8, ["label", "theme"])) : (i(), b(Y, { key: 0 }, [
2922
+ e.errors ? (i(), A(Ee, {
2923
+ key: 0,
2924
+ theme: r(ue).DANGER
2925
+ }, {
2926
+ default: C(() => [
2927
+ E("div", Wa, [
2928
+ E("span", null, T(r(t)("could_not_get_data")), 1),
2929
+ e.refresh ? (i(), A(ae, {
2930
+ key: 0,
2931
+ theme: r(ue).DANGER,
2932
+ tooltip: r(t)("refresh"),
2933
+ round: "",
2934
+ onClick: n[0] || (n[0] = (m) => e.refresh())
2935
+ }, {
2936
+ default: C(() => [
2937
+ k(M, { name: "rotate-right" }),
2938
+ k(M, {
2939
+ name: "rotate-right",
2940
+ regular: ""
2941
+ })
2942
+ ]),
2943
+ _: 1
2944
+ }, 8, ["theme", "tooltip"])) : L("", !0)
2945
+ ])
2946
+ ]),
2947
+ _: 1
2948
+ }, 8, ["theme"])) : (i(), A(Ee, {
2949
+ key: 1,
2950
+ theme: e.theme
2951
+ }, {
2952
+ default: C(() => [
2953
+ E("div", Ha, [
2954
+ E("span", null, T(e.noContentMessage || r(t)("nothing_to_show")), 1),
2955
+ e.refresh ? (i(), A(ae, {
2956
+ key: 0,
2957
+ theme: e.theme,
2958
+ tooltip: r(t)("refresh"),
2959
+ round: "",
2960
+ onClick: n[1] || (n[1] = (m) => e.refresh())
2961
+ }, {
2962
+ default: C(() => [
2963
+ k(M, { name: "rotate-right" }),
2964
+ k(M, {
2965
+ name: "rotate-right",
2966
+ regular: ""
2967
+ })
2968
+ ]),
2969
+ _: 1
2970
+ }, 8, ["theme", "tooltip"])) : L("", !0)
2971
+ ])
2972
+ ]),
2973
+ _: 1
2974
+ }, 8, ["theme"]))
2975
+ ], 64))
2976
+ ], 2)) : (i(), A(Ae, z({
2977
+ key: 1,
2978
+ wrap: !e.unwrap,
2979
+ el: e.el
2980
+ }, e.$attrs), {
2981
+ default: C(() => [
2982
+ e.loading ? (i(), b("div", Ga, [
2983
+ k(Ue, {
2984
+ label: e.label,
2985
+ theme: e.theme
2986
+ }, null, 8, ["label", "theme"])
2987
+ ])) : L("", !0),
2988
+ x(e.$slots, "default")
2989
+ ]),
2990
+ _: 3
2991
+ }, 16, ["wrap", "el"]))
2992
+ ]),
2993
+ _: 3
2994
+ }, 8, ["wrap"]));
2995
+ }
2996
+ }), we = /* @__PURE__ */ j({
2997
+ name: "LoaderContentFetch",
2998
+ inheritAttrs: !1,
2999
+ __name: "ContentFetch",
3000
+ props: {
3001
+ promise: { type: [Boolean, Function] },
3002
+ url: { type: [Boolean, String] },
3003
+ fallback: {},
3004
+ unwrap: { type: Boolean },
3005
+ payload: {},
3006
+ el: {},
3007
+ preventAutoload: { type: Boolean },
3008
+ theme: {}
3009
+ },
3010
+ emits: ["refresh"],
3011
+ setup(l, { emit: t }) {
3012
+ const e = l, n = W(!1), m = W(), c = W(), o = W(!1), a = W(!1), s = (p, h) => {
3013
+ if (c.value && !a.value)
3014
+ return a.value = !0;
3015
+ !e.preventAutoload && !o.value || (c.value = p, m.value = h);
3016
+ };
3017
+ async function u(p) {
3018
+ if (p && (c.value = p), !!(e.promise || e.url)) {
3019
+ try {
3020
+ if (n.value = !0, e.promise)
3021
+ c.value = await e.promise(s, ...e.payload || []);
3022
+ else if (e.url) {
3023
+ const h = await (await fetch(e.url)).json(), y = "data" in h ? h.data : h;
3024
+ if (h.error)
3025
+ throw new Error(h.error);
3026
+ y && (c.value = y);
3027
+ }
3028
+ m.value = void 0;
3029
+ } catch (h) {
3030
+ console.error(h), c.value = void 0, m.value = h;
3031
+ }
3032
+ o.value = !0, n.value = !1, t("refresh", u);
3033
+ }
3034
+ }
3035
+ return e.preventAutoload || u(e.fallback), ce(
3036
+ [() => e.url, () => e.promise],
3037
+ (p, h) => {
3038
+ const y = p[0] === h[0], g = p[1] === h[1], v = p[1] && h[1];
3039
+ y && g || v || (!n.value && (p[1] || p[0]) ? u() : e.fallback && (c.value = e.fallback));
3040
+ },
3041
+ { immediate: !1 }
3042
+ ), ce(
3043
+ () => e.preventAutoload,
3044
+ (p) => {
3045
+ !p && !o.value && u();
3046
+ },
3047
+ { immediate: !1 }
3048
+ ), ce(
3049
+ () => e.payload,
3050
+ (p, h) => {
3051
+ o.value && !H.isEqual(p, h) && u();
3052
+ },
3053
+ { immediate: !1 }
3054
+ ), (p, h) => (i(), A(pt, X(le({
3055
+ ...p.$attrs,
3056
+ content: !!c.value,
3057
+ errors: !!m.value,
3058
+ loading: n.value,
3059
+ refresh: u,
3060
+ unwrap: p.unwrap,
3061
+ theme: p.theme
3062
+ })), {
3063
+ default: C(() => [
3064
+ c.value ? x(p.$slots, "default", X(z({ key: 0 }, { content: c.value, refresh: u, loading: n.value, errors: m.value }))) : L("", !0)
3065
+ ]),
3066
+ _: 3
3067
+ }, 16));
3068
+ }
3069
+ }), xa = {
3070
+ key: 0,
3071
+ class: "flx --flxRow-wrap --flx-center --gap-5 --gap:sm"
3072
+ }, Ya = { key: 0 }, Ka = { class: "--txtSize-sm" }, Xa = { key: 1 }, Qa = { class: "flx --flxRow-wrap --flx-center --gap-5 --gap:sm" }, Ja = { key: 0 }, Za = { class: "--hidden-full:sm-inv" }, el = { class: "--hidden-full:sm-inv" }, tl = /* @__PURE__ */ j({
3073
+ name: "PaginationSimple",
3074
+ inheritAttrs: !1,
3075
+ __name: "Simple",
3076
+ props: {
3077
+ withRoute: { type: Boolean },
3078
+ hidePageLength: { type: Boolean },
3079
+ pagination: {},
3080
+ currentPage: {},
3081
+ theme: {}
3082
+ },
3083
+ setup(l) {
3084
+ var o;
3085
+ const t = l, { t: e } = U(Z), n = (o = We()) == null ? void 0 : o.appContext.config.globalProperties.$router;
3086
+ function m(a) {
3087
+ if (!n)
3088
+ return;
3089
+ const s = n.currentRoute.value;
3090
+ n.push({ path: s.path, query: { ...s.query, at: a } });
3091
+ }
3092
+ const c = O({
3093
+ get: () => {
3094
+ var a;
3095
+ return String((a = t.pagination) == null ? void 0 : a.first);
3096
+ },
3097
+ set(a) {
3098
+ if (!n)
3099
+ return;
3100
+ const s = n.currentRoute.value;
3101
+ n.push({ path: s.path, query: { first: a } });
3102
+ }
3103
+ });
3104
+ return (a, s) => {
3105
+ var u, p;
3106
+ return a.currentPage ? (i(), b("ul", xa, [
3107
+ (u = a.pagination) != null && u.first ? (i(), b("li", Ya, [
3108
+ E("p", Ka, T(r(e)("pagination_items", a.currentPage.totalCount)) + " ⋅ " + T(r(e)("pagination_pages", Math.ceil(a.currentPage.totalCount / ((p = a.pagination) == null ? void 0 : p.first)))), 1)
3109
+ ])) : L("", !0),
3110
+ a.withRoute ? (i(), b("li", Xa, [
3111
+ E("ul", Qa, [
3112
+ !a.hidePageLength && a.currentPage.totalCount > 5 ? (i(), b("li", Ja, [
3113
+ k(_e, {
3114
+ id: "order",
3115
+ modelValue: c.value,
3116
+ "onUpdate:modelValue": s[0] || (s[0] = (h) => c.value = h),
3117
+ theme: a.theme,
3118
+ class: "--maxWidthVw-60",
3119
+ name: "order",
3120
+ options: [5, 10, 25, 50, 100]
3121
+ }, null, 8, ["modelValue", "theme"])
3122
+ ])) : L("", !0),
3123
+ a.currentPage.totalCount > a.currentPage.edges.length ? (i(), b(Y, { key: 1 }, [
3124
+ E("li", null, [
3125
+ k(ae, {
3126
+ theme: a.theme,
3127
+ "aria-label": r(e)("previous"),
3128
+ disabled: !a.currentPage.pageInfo.hasPreviousPage,
3129
+ round: ":sm-inv",
3130
+ onClick: s[1] || (s[1] = (h) => {
3131
+ var y;
3132
+ return a.currentPage && m((y = a.currentPage.pageInfo) == null ? void 0 : y.previousCursor);
3133
+ })
3134
+ }, {
3135
+ default: C(() => [
3136
+ k(M, { name: "arrow-left" }),
3137
+ k(M, {
3138
+ name: "arrow-left",
3139
+ regular: ""
3140
+ }),
3141
+ E("span", Za, T(r(e)("previous")), 1)
3142
+ ]),
3143
+ _: 1
3144
+ }, 8, ["theme", "aria-label", "disabled"])
3145
+ ]),
3146
+ E("li", null, [
3147
+ k(ae, {
3148
+ theme: a.theme,
3149
+ "aria-label": r(e)("next"),
3150
+ disabled: !a.currentPage.pageInfo.hasNextPage,
3151
+ round: ":sm-inv",
3152
+ onClick: s[2] || (s[2] = (h) => {
3153
+ var y;
3154
+ return a.currentPage && m((y = a.currentPage.pageInfo) == null ? void 0 : y.nextCursor);
3155
+ })
3156
+ }, {
3157
+ default: C(() => [
3158
+ E("span", el, T(r(e)("next")), 1),
3159
+ k(M, { name: "arrow-right" }),
3160
+ k(M, {
3161
+ name: "arrow-left",
3162
+ regular: ""
3163
+ })
3164
+ ]),
3165
+ _: 1
3166
+ }, 8, ["theme", "aria-label", "disabled"])
3167
+ ])
3168
+ ], 64)) : L("", !0)
3169
+ ])
3170
+ ])) : L("", !0)
3171
+ ])) : L("", !0);
3172
+ };
3173
+ }
3174
+ }), jl = /* @__PURE__ */ j({
3175
+ name: "PaginationContent",
3176
+ inheritAttrs: !1,
3177
+ __name: "Content",
3178
+ props: {
3179
+ page: { type: Function },
3180
+ withProps: { type: Boolean },
3181
+ withRoute: { type: Boolean },
3182
+ hideControls: { type: Boolean },
3183
+ preventAutoload: { type: Boolean },
3184
+ at: {},
3185
+ first: {},
3186
+ orderBy: {},
3187
+ theme: {}
3188
+ },
3189
+ setup(l) {
3190
+ var a;
3191
+ const t = l, e = de("xamu"), n = (a = We()) == null ? void 0 : a.appContext.config.globalProperties.$router, m = O(() => {
3192
+ const { orderBy: s, first: u, at: p } = t;
3193
+ return { orderBy: s, first: u || (e == null ? void 0 : e.first), at: p };
3194
+ }), c = O(() => {
3195
+ if (!n)
3196
+ return {};
3197
+ const s = n.currentRoute.value, u = { ...m.value }, [p, h] = Array.isArray(s.query.orderBy) ? s.query.orderBy : [], g = [p ?? "createdAt", h === "asc" || h === "desc" ? h : "desc"], v = s.query.first, S = s.query.at;
3198
+ if (u.orderBy = g, v && !Array.isArray(v) && (u.first = Number(v)), S && !Array.isArray(S)) {
3199
+ const $ = Number(S);
3200
+ u.at = isNaN($) ? S : $;
3201
+ }
3202
+ return u;
3203
+ }), o = O(() => {
3204
+ if (t.withProps)
3205
+ return m.value;
3206
+ if (t.withRoute)
3207
+ return c.value;
3208
+ });
3209
+ return (s, u) => (i(), A(we, z({
3210
+ promise: s.page,
3211
+ payload: [o.value]
3212
+ }, { ...s.$attrs, preventAutoload: s.preventAutoload, theme: s.theme }), {
3213
+ default: C(({ content: p, refresh: h }) => [
3214
+ x(s.$slots, "default", X(le({
3215
+ content: p.edges.map(({ node: y }) => y),
3216
+ pagination: o.value,
3217
+ currentPage: p,
3218
+ refresh: h
3219
+ }))),
3220
+ s.hideControls ? L("", !0) : (i(), A(tl, X(z({ key: 0 }, { pagination: o.value, currentPage: p, withRoute: s.withRoute, theme: s.theme })), null, 16))
3221
+ ]),
3222
+ _: 3
3223
+ }, 16, ["promise", "payload"]));
3224
+ }
3225
+ }), al = /* @__PURE__ */ j({
3226
+ name: "InputColor",
3227
+ inheritAttrs: !1,
3228
+ __name: "Color",
3229
+ props: {
3230
+ type: {},
3231
+ autocomplete: {},
3232
+ id: {},
3233
+ name: {},
3234
+ placeholder: {},
3235
+ title: {},
3236
+ required: { type: Boolean },
3237
+ disabled: { type: Boolean },
3238
+ hidden: { type: [String, Boolean, Object, Array] },
3239
+ size: {},
3240
+ active: { type: Boolean },
3241
+ invalid: { type: Boolean },
3242
+ state: {},
3243
+ theme: {}
3244
+ },
3245
+ setup(l) {
3246
+ const t = l, { getClassesString: e } = U(J), { modifiersClasses: n } = re(t), { stateClasses: m } = me(t), { themeClasses: c } = te(t);
3247
+ return (o, a) => (i(), A(Te, z({
3248
+ type: "color",
3249
+ disabled: o.disabled,
3250
+ class: r(e)([r(n), r(m), r(c), "iColor"])
3251
+ }, o.$attrs), null, 16, ["disabled", "class"]));
3252
+ }
3253
+ }), ll = {
3254
+ key: 1,
3255
+ class: "--txtColor-danger"
3256
+ }, Ne = /* @__PURE__ */ j({
3257
+ name: "FormInputOptions",
3258
+ inheritAttrs: !0,
3259
+ __name: "InputOptions",
3260
+ props: {
3261
+ input: {}
3262
+ },
3263
+ setup(l) {
3264
+ const { t } = U(Z);
3265
+ return (e, n) => {
3266
+ var m;
3267
+ return (m = e.input.options) != null && m.length ? x(e.$slots, "default", X(z({ key: 0 }, { options: e.input.options.map(r(be)) }))) : (i(), b("p", ll, T(r(t)("form_required_options")), 1));
3268
+ };
3269
+ }
3270
+ }), ol = {
3271
+ key: 0,
3272
+ class: "flx --flxColumn --flxRow-wrap:md --flx-start-stretch --gap-5 --flx"
3273
+ }, nl = {
3274
+ key: 1,
3275
+ class: "--txtColor-danger"
3276
+ }, ye = /* @__PURE__ */ j({
3277
+ name: "FormInputNValues",
3278
+ inheritAttrs: !0,
3279
+ __name: "InputNValues",
3280
+ props: {
3281
+ model: {},
3282
+ values: {}
3283
+ },
3284
+ setup(l) {
3285
+ const t = l, { t: e } = U(Z), n = O(() => t.values.some((m) => Array.isArray(t.model) && t.model.length === m));
3286
+ return (m, c) => Array.isArray(m.model) && n.value ? (i(), b("div", ol, [
3287
+ x(m.$slots, "default")
3288
+ ])) : (i(), b("p", nl, T(m.values.map((o) => r(e)("form_requires_n_values", o)).join(" | ")), 1));
3289
+ }
3290
+ });
3291
+ function ht({ input: l }) {
3292
+ const { t, tet: e } = U(Z);
3293
+ function n() {
3294
+ switch (l.type) {
3295
+ case P.EMAIL:
3296
+ return t("form_use_valid_email");
3297
+ case P.PHONE:
3298
+ return t("form_use_valid_phone");
3299
+ case P.CELLPHONE:
3300
+ return t("form_use_valid_cellphone");
3301
+ case P.NEW_PASSWORD:
3302
+ return t("form_unmatching_passwords");
3303
+ default:
3304
+ return t("form_invalid_data");
3305
+ }
3306
+ }
3307
+ function m() {
3308
+ switch (l.type) {
3309
+ case P.PASSWORD:
3310
+ return "password";
3311
+ case P.EMAIL:
3312
+ return "email";
3313
+ case P.NUMBER:
3314
+ return "number";
3315
+ case P.PHONE:
3316
+ case P.CELLPHONE:
3317
+ return "tel";
3318
+ default:
3319
+ return "text";
3320
+ }
3321
+ }
3322
+ function c(a = 0) {
3323
+ const s = (u) => l.placeholder ? `${e(l.placeholder).replace("...", "")}...` : `${t(u)}...`;
3324
+ switch (l.type) {
3325
+ case P.LOCATION:
3326
+ return [s("form_country"), s("form_state"), s("form_city")][a];
3327
+ case P.NEW_PASSWORD:
3328
+ return [s("form_desired_password"), s("form_confirm_password")][a];
3329
+ case P.PASSWORD:
3330
+ return [s("form_password")][a];
3331
+ case P.EMAIL:
3332
+ return [s("form_email")][a];
3333
+ case P.PHONE:
3334
+ return [s("form_phone_line")][a];
3335
+ case P.CELLPHONE:
3336
+ return [s("form_cellphone")][a];
3337
+ case P.ID:
3338
+ return [s("form_id_number")][a];
3339
+ default:
3340
+ return [s("form_complete_the_field")][a];
3341
+ }
3342
+ }
3343
+ function o() {
3344
+ if (l.autocomplete)
3345
+ return l.autocomplete;
3346
+ switch (l.type) {
3347
+ case P.NEW_PASSWORD:
3348
+ return "new-password";
3349
+ case P.PASSWORD:
3350
+ return "current-password";
3351
+ case P.EMAIL:
3352
+ return "email";
3353
+ case P.PHONE:
3354
+ return "tel-local";
3355
+ case P.CELLPHONE:
3356
+ return "tel-national";
3357
+ default:
3358
+ return "on";
3359
+ }
3360
+ }
3361
+ return {
3362
+ getInputError: n,
3363
+ getInputAutocomplete: o,
3364
+ getInputPlaceholder: c,
3365
+ getInputTextType: m
3366
+ };
3367
+ }
3368
+ const sl = { class: "flx --flxRow --flx-start-center --gap-5" }, rl = {
3369
+ key: 0,
3370
+ class: "--txtColor-danger --txtSize-sm"
3371
+ }, il = /* @__PURE__ */ j({
3372
+ name: "FormInputLoop",
3373
+ inheritAttrs: !0,
3374
+ __name: "InputLoop",
3375
+ props: {
3376
+ input: {},
3377
+ models: {},
3378
+ theme: {}
3379
+ },
3380
+ setup(l) {
3381
+ const t = l, { t: e } = U(Z), { isValidValue: n, notEmptyValue: m } = U(ct).utils, { getInputError: c } = ht(t);
3382
+ return (o, a) => (i(), b(Y, null, [
3383
+ (i(!0), b(Y, null, oe(o.models, (s, u) => {
3384
+ var p, h, y, g;
3385
+ return i(), b("div", {
3386
+ key: ((h = (p = o.input.defaults) == null ? void 0 : p[u]) == null ? void 0 : h.placeholder) || ((g = (y = o.input.defaults) == null ? void 0 : y[u]) == null ? void 0 : g.type) || u,
3387
+ class: "--width"
3388
+ }, [
3389
+ E("div", sl, [
3390
+ x(o.$slots, "default", X(le({ i: u }))),
3391
+ o.input.multiple && o.input.min < o.input.values.length ? (i(), A(ee, {
3392
+ key: 0,
3393
+ "aria-label": r(e)("clear"),
3394
+ theme: o.theme,
3395
+ onClick: (v) => o.input.removeValue(u)
3396
+ }, {
3397
+ default: C(() => [
3398
+ k(M, {
3399
+ name: "trash-can",
3400
+ size: "20"
3401
+ })
3402
+ ]),
3403
+ _: 2
3404
+ }, 1032, ["aria-label", "theme", "onClick"])) : L("", !0)
3405
+ ]),
3406
+ r(m)(s.value, o.input.defaults) && !r(n)(s.value, o.input) ? (i(), b("p", rl, T(r(c)()), 1)) : L("", !0)
3407
+ ]);
3408
+ }), 128)),
3409
+ o.input.multiple && o.input.max > o.models.length ? (i(), A(se, {
3410
+ key: 0,
3411
+ "aria-label": r(e)("add"),
3412
+ theme: o.theme,
3413
+ onClick: a[0] || (a[0] = (s) => o.input.addValue())
3414
+ }, {
3415
+ default: C(() => [
3416
+ ne(T(r(e)("add")), 1)
3417
+ ]),
3418
+ _: 1
3419
+ }, 8, ["aria-label", "theme"])) : L("", !0)
3420
+ ], 64));
3421
+ }
3422
+ });
3423
+ function vt() {
3424
+ const { lang: l } = de("xamu") || {};
3425
+ function t(n = {}) {
3426
+ return new URLSearchParams({ ...n, ...l && l !== "en" ? { lang: l } : {} });
3427
+ }
3428
+ function e(n) {
3429
+ return (m, ...c) => n(...c);
3430
+ }
3431
+ return {
3432
+ getUrlParams: t,
3433
+ unHydrate: e
3434
+ };
3435
+ }
3436
+ function Ge() {
3437
+ const { country: l } = de("xamu") || {}, { getUrlParams: t } = vt(), e = "https://countries.xamu.com.co/api/v1", n = {};
3438
+ async function m() {
3439
+ const u = `${e}?${t()}`, { data: p, error: h } = await (await fetch(u)).json();
3440
+ if (h)
3441
+ throw new Error(h);
3442
+ return p;
3443
+ }
3444
+ async function c(u) {
3445
+ if (!u)
3446
+ throw new Error("A valid country is required");
3447
+ const p = `${e}/${u}?${t({ states: "" })}`, { data: h, error: y } = await (await fetch(p)).json();
3448
+ if (y)
3449
+ throw new Error(y);
3450
+ return h;
3451
+ }
3452
+ async function o(u) {
3453
+ return (await c(u)).states;
3454
+ }
3455
+ async function a(u, p) {
3456
+ if (!u || !p)
3457
+ throw new Error("A valid country and state are required");
3458
+ const h = `${e}/${u}/${p}?${t({ cities: "" })}`, { data: y, error: g } = await (await fetch(h)).json();
3459
+ if (g)
3460
+ throw new Error(g);
3461
+ return y;
3462
+ }
3463
+ async function s(u, p) {
3464
+ return (await a(u, p)).cities;
3465
+ }
3466
+ return {
3467
+ defaultCountry: l,
3468
+ fallbackCountry: n,
3469
+ getCountries: m,
3470
+ getCountry: c,
3471
+ getCountryStates: o,
3472
+ getState: a,
3473
+ getStateCities: s
3474
+ };
3475
+ }
3476
+ const ul = /* @__PURE__ */ j({
3477
+ name: "FormInputCountriesApi",
3478
+ inheritAttrs: !0,
3479
+ __name: "InputCountriesAPI",
3480
+ props: {
3481
+ model: {},
3482
+ states: {},
3483
+ theme: {}
3484
+ },
3485
+ setup(l) {
3486
+ const t = l, { unHydrate: e } = vt(), { defaultCountry: n, getCountryStates: m, getStateCities: c } = Ge(), o = O(() => t.model[0] || n || "");
3487
+ return (a, s) => (i(), A(ye, {
3488
+ model: a.model,
3489
+ values: [1, 3]
3490
+ }, {
3491
+ default: C(() => [
3492
+ k(we, {
3493
+ theme: a.theme,
3494
+ promise: !a.states && !!o.value && r(e)(r(m)),
3495
+ payload: [o.value],
3496
+ fallback: [],
3497
+ unwrap: ""
3498
+ }, {
3499
+ default: C((u) => [
3500
+ k(we, {
3501
+ theme: a.theme,
3502
+ promise: !!(o.value && a.model[0]) && a.model[0] !== a.model[0] && !!(u.content.length || a.states) && r(e)(r(c)),
3503
+ payload: [o.value, a.model[1]],
3504
+ fallback: [],
3505
+ unwrap: ""
3506
+ }, {
3507
+ default: C((p) => [
3508
+ x(a.$slots, "default", X(le({ statesReq: u, citiesReq: p })))
3509
+ ]),
3510
+ _: 2
3511
+ }, 1032, ["theme", "promise", "payload"])
3512
+ ]),
3513
+ _: 3
3514
+ }, 8, ["theme", "promise", "payload"])
3515
+ ]),
3516
+ _: 3
3517
+ }, 8, ["model"]));
3518
+ }
3519
+ }), dl = { class: "flx --flxColumn --flx-start --gap-5" }, ml = {
3520
+ key: 0,
3521
+ class: "flx --flxRow-wrap --flx-center --flx-start-center:md --maxWidth-440"
3522
+ }, cl = {
3523
+ key: 0,
3524
+ class: "flx --flxColumn --flxRow-wrap:md --flx-start-stretch --flx"
3525
+ }, fl = {
3526
+ key: 1,
3527
+ class: "flx --flxColumn --flxRow-wrap:md --flx-start-stretch --gap-5 --flx"
3528
+ }, pl = /* @__PURE__ */ E("p", null, "Schedule Component Here", -1), hl = {
3529
+ key: 6,
3530
+ class: "--flx"
3531
+ }, vl = {
3532
+ key: 0,
3533
+ class: "--txtSize-sm --txtWeight --txtWrap"
3534
+ }, gl = {
3535
+ key: 3,
3536
+ class: "--txtColor-danger --txtSize-sm"
3537
+ }, yl = /* @__PURE__ */ j({
3538
+ name: "FormInput",
3539
+ inheritAttrs: !1,
3540
+ __name: "Input",
3541
+ props: {
3542
+ modelValue: {},
3543
+ input: {},
3544
+ invalid: {},
3545
+ countries: {},
3546
+ states: {},
3547
+ theme: {}
3548
+ },
3549
+ emits: ["update:model-value"],
3550
+ setup(l, { emit: t }) {
3551
+ const e = l, { t: n, tet: m } = U(Z), { isValidFormInputValue: c, notEmptyValue: o } = U(ct).utils, { getInputPlaceholder: a, getInputAutocomplete: s, getInputTextType: u } = ht(e), { defaultCountry: p } = Ge(), h = O(() => (e.countries || []).map(({ code: w, name: I }) => ({ value: w, alias: I }))), y = O(() => (e.countries || []).map(({ name: w, code: I, indicative: q }) => ({
3552
+ value: I + q,
3553
+ alias: w
3554
+ }))), g = O(() => {
3555
+ var w;
3556
+ return (w = e.states) == null ? void 0 : w.map(({ code: I, name: q }) => ({ value: I, alias: q }));
3557
+ }), v = O(() => e.input.values.every((I) => o(I, e.input.defaults))), S = O(() => {
3558
+ const w = e.input.values, I = !!e.invalid && H.isEqual(e.invalid.invalidValue, w), q = v.value && !c(e.input);
3559
+ return I || q;
3560
+ }), $ = O(() => {
3561
+ var q;
3562
+ const [w, I] = ((q = e.input) == null ? void 0 : q.icon) || [];
3563
+ return {
3564
+ ...H.omit(e.input, ["type"]),
3565
+ invalid: S.value,
3566
+ autocomplete: s(),
3567
+ icon: w,
3568
+ iconProps: I
3569
+ };
3570
+ }), d = O(() => e.modelValue.map(
3571
+ (w, I) => O({
3572
+ get: () => w,
3573
+ set: (q) => {
3574
+ t("update:model-value", e.modelValue.toSpliced(I, 1, q));
3575
+ }
3576
+ })
3577
+ ));
3578
+ function D(w) {
3579
+ if (e.input.multiple)
3580
+ if (e.modelValue.includes(w)) {
3581
+ const I = e.modelValue.indexOf(w);
3582
+ I > -1 && e.input.removeValue(I);
3583
+ } else
3584
+ e.input.addValue(w);
3585
+ else
3586
+ d.value[0].value = w;
3587
+ }
3588
+ function F(w) {
3589
+ return { value: w.code, alias: w.name };
3590
+ }
3591
+ function Q(w) {
3592
+ return { value: w.name };
3593
+ }
3594
+ return (w, I) => {
3595
+ const q = nt("Input", !0);
3596
+ return i(), b("div", dl, [
3597
+ !w.input.defaults && w.input.type === r(P).CHOICE ? (i(), A(Ne, {
3598
+ key: 0,
3599
+ input: w.input
3600
+ }, {
3601
+ default: C(({ options: B }) => {
3602
+ var f;
3603
+ return [
3604
+ (f = w.input.options) != null && f.length ? (i(), b("div", ml, [
3605
+ (i(!0), b(Y, null, oe(B, (V, _) => (i(), A(ve(w.input.multiple ? ae : se), {
3606
+ key: _,
3607
+ size: "md",
3608
+ theme: w.theme,
3609
+ "aria-label": V.alias || V.value,
3610
+ active: w.modelValue.includes(V.value),
3611
+ disabled: !w.input.multiple && w.modelValue.includes(V.value),
3612
+ onClick: (R) => D(V.value)
3613
+ }, {
3614
+ default: C(() => [
3615
+ E("span", null, T(V.alias || V.value), 1),
3616
+ V.icon ? (i(), b(Y, { key: 0 }, [
3617
+ k(M, {
3618
+ name: V.icon
3619
+ }, null, 8, ["name"]),
3620
+ w.input.multiple ? (i(), A(M, {
3621
+ key: 0,
3622
+ name: V.icon,
3623
+ regular: ""
3624
+ }, null, 8, ["name"])) : L("", !0)
3625
+ ], 64)) : V.pattern ? (i(), b("figure", {
3626
+ key: 1,
3627
+ class: "avatar --size-xs --bdr --bdrColor-light",
3628
+ style: $e(
3629
+ r(pe).isURL(V.pattern) ? { backgroundImage: `url('${V.pattern}')` } : { backgroundColor: V.pattern }
3630
+ )
3631
+ }, null, 4)) : L("", !0)
3632
+ ]),
3633
+ _: 2
3634
+ }, 1032, ["theme", "aria-label", "active", "disabled", "onClick"]))), 128))
3635
+ ])) : L("", !0)
3636
+ ];
3637
+ }),
3638
+ _: 1
3639
+ }, 8, ["input"])) : !w.input.defaults && w.input.type === r(P).FILE ? (i(), A(xt, {
3640
+ key: 1,
3641
+ theme: w.theme,
3642
+ class: "--flx",
3643
+ min: w.input.min,
3644
+ max: w.input.max,
3645
+ "file-prefix": r(H).snakeCase(w.input.placeholder),
3646
+ "model-value": w.modelValue,
3647
+ "onUpdate:modelValue": I[0] || (I[0] = (B) => w.$emit("update:model-value", B))
3648
+ }, null, 8, ["theme", "min", "max", "file-prefix", "model-value"])) : (i(), A(il, {
3649
+ key: 2,
3650
+ models: d.value,
3651
+ input: w.input,
3652
+ theme: w.theme
3653
+ }, {
3654
+ default: C(({ i: B }) => [
3655
+ w.input.defaults && w.input.defaults.length >= 2 ? (i(), b("div", cl, [
3656
+ (i(!0), b(Y, null, oe(d.value[B].value, (f, V) => {
3657
+ var _, R;
3658
+ return i(), A(q, {
3659
+ key: ((_ = w.input.defaults) == null ? void 0 : _[V].placeholder) || ((R = w.input.defaults) == null ? void 0 : R[V].type) || V,
3660
+ input: w.input.setRerender(w.$forceUpdate).clone({
3661
+ ...w.input.defaults[V],
3662
+ // sub input
3663
+ multiple: !1,
3664
+ defaults: void 0,
3665
+ values: [d.value[B].value[V]]
3666
+ }),
3667
+ theme: w.theme,
3668
+ class: "--width-180 --flx",
3669
+ invalid: w.invalid,
3670
+ "model-value": [f],
3671
+ "onUpdate:modelValue": (N) => d.value[B].value = d.value[B].value.toSpliced(V, 1, N[0])
3672
+ }, null, 8, ["input", "theme", "invalid", "model-value", "onUpdate:modelValue"]);
3673
+ }), 128))
3674
+ ])) : w.input.type === r(P).NEW_PASSWORD ? (i(), A(ye, {
3675
+ key: 1,
3676
+ model: d.value[B].value,
3677
+ values: [2]
3678
+ }, {
3679
+ default: C(() => [
3680
+ k(fe, z({
3681
+ modelValue: d.value[B].value[0],
3682
+ "onUpdate:modelValue": (f) => d.value[B].value[0] = f
3683
+ }, $.value, {
3684
+ theme: w.theme,
3685
+ placeholder: r(a)(),
3686
+ type: "password",
3687
+ class: "--width-180 --flx"
3688
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "theme", "placeholder"]),
3689
+ k(fe, z({
3690
+ modelValue: d.value[B].value[1],
3691
+ "onUpdate:modelValue": (f) => d.value[B].value[1] = f
3692
+ }, $.value, {
3693
+ theme: w.theme,
3694
+ placeholder: r(a)(),
3695
+ type: "password",
3696
+ class: "--width-180 --flx"
3697
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "theme", "placeholder"])
3698
+ ]),
3699
+ _: 2
3700
+ }, 1032, ["model"])) : w.input.type === r(P).ID ? (i(), A(ye, {
3701
+ key: 2,
3702
+ model: d.value[B].value,
3703
+ values: [2]
3704
+ }, {
3705
+ default: C(() => [
3706
+ k(_e, z({
3707
+ modelValue: d.value[B].value[0],
3708
+ "onUpdate:modelValue": (f) => d.value[B].value[0] = f
3709
+ }, { options: w.input.options, theme: w.theme }, { class: "--width-180 --flx" }), null, 16, ["modelValue", "onUpdate:modelValue"]),
3710
+ k(fe, z({
3711
+ modelValue: d.value[B].value[1],
3712
+ "onUpdate:modelValue": (f) => d.value[B].value[1] = f
3713
+ }, $.value, {
3714
+ theme: w.theme,
3715
+ placeholder: r(a)(),
3716
+ type: "number",
3717
+ class: "--width-180 --flx"
3718
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "theme", "placeholder"])
3719
+ ]),
3720
+ _: 2
3721
+ }, 1032, ["model"])) : w.input.type === r(P).PHONE || w.input.type === r(P).CELLPHONE ? (i(), A(ye, {
3722
+ key: 3,
3723
+ model: d.value[B].value,
3724
+ values: [2]
3725
+ }, {
3726
+ default: C(() => [
3727
+ k(_e, {
3728
+ modelValue: d.value[B].value[0],
3729
+ "onUpdate:modelValue": (f) => d.value[B].value[0] = f,
3730
+ theme: w.theme,
3731
+ options: y.value,
3732
+ class: "--width-180 --flx"
3733
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "theme", "options"]),
3734
+ k(fe, z({
3735
+ modelValue: d.value[B].value[1],
3736
+ "onUpdate:modelValue": (f) => d.value[B].value[1] = f
3737
+ }, $.value, {
3738
+ theme: w.theme,
3739
+ placeholder: r(a)(),
3740
+ type: "tel",
3741
+ class: "--width-180 --flx"
3742
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "theme", "placeholder"])
3743
+ ]),
3744
+ _: 2
3745
+ }, 1032, ["model"])) : w.input.type === r(P).LOCATION ? (i(), A(ul, {
3746
+ key: 4,
3747
+ states: g.value,
3748
+ model: d.value[B].value,
3749
+ values: [1, 3]
3750
+ }, {
3751
+ default: C(({ statesReq: f, citiesReq: V }) => [
3752
+ !r(p) || d.value[B].value.length === 1 ? (i(), A(ke, {
3753
+ key: 0,
3754
+ modelValue: d.value[B].value[0],
3755
+ "onUpdate:modelValue": (_) => d.value[B].value[0] = _,
3756
+ options: h.value,
3757
+ value: r(p),
3758
+ icon: "earth-americas",
3759
+ theme: w.theme,
3760
+ placeholder: r(a)(),
3761
+ class: "--width-180 --flx"
3762
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "value", "theme", "placeholder"])) : L("", !0),
3763
+ d.value[B].value.length === 3 ? (i(), b("div", fl, [
3764
+ k(ke, {
3765
+ modelValue: d.value[B].value[1],
3766
+ "onUpdate:modelValue": (_) => d.value[B].value[1] = _,
3767
+ options: g.value || (f.loading || f.content.length ? f.content.map(F) : [d.value[B].value[0] || r(p)]),
3768
+ icon: "mountain-sun",
3769
+ theme: w.theme,
3770
+ disabled: !(d.value[B].value[0] || r(p)),
3771
+ placeholder: r(a)(1),
3772
+ class: "--width-180 --flx"
3773
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "theme", "disabled", "placeholder"]),
3774
+ k(ke, {
3775
+ modelValue: d.value[B].value[2],
3776
+ "onUpdate:modelValue": (_) => d.value[B].value[2] = _,
3777
+ options: V.loading || V.content.length ? V.content.map(Q) : [d.value[B].value[1]],
3778
+ icon: "city",
3779
+ theme: w.theme,
3780
+ disabled: !d.value[B].value[1],
3781
+ placeholder: r(a)(2),
3782
+ class: "--width-180 --flx"
3783
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "theme", "disabled", "placeholder"])
3784
+ ])) : L("", !0)
3785
+ ]),
3786
+ _: 2
3787
+ }, 1032, ["states", "model"])) : w.input.type === r(P).SCHEDULE ? (i(), A(ye, {
3788
+ key: 5,
3789
+ model: d.value[B].value,
3790
+ values: []
3791
+ }, {
3792
+ default: C(() => [
3793
+ pl
3794
+ ]),
3795
+ _: 2
3796
+ }, 1032, ["model"])) : w.input.type === r(P).BOOLEAN ? (i(), b("label", hl, [
3797
+ k(Ee, {
3798
+ theme: w.theme,
3799
+ class: "--txtAlign"
3800
+ }, {
3801
+ default: C(() => [
3802
+ k(Se, z({
3803
+ modelValue: d.value[B].value,
3804
+ "onUpdate:modelValue": (f) => d.value[B].value = f
3805
+ }, $.value, {
3806
+ placeholder: r(a)(),
3807
+ type: "checkbox",
3808
+ theme: w.theme,
3809
+ "full-width": "",
3810
+ "show-placeholder": ""
3811
+ }), {
3812
+ default: C(() => [
3813
+ w.input.placeholder ? (i(), b("p", vl, T(r(m)(w.input.placeholder)), 1)) : L("", !0)
3814
+ ]),
3815
+ _: 2
3816
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "theme"])
3817
+ ]),
3818
+ _: 2
3819
+ }, 1032, ["theme"])
3820
+ ])) : w.input.type === r(P).SELECT ? (i(), A(Ne, {
3821
+ key: 7,
3822
+ input: w.input
3823
+ }, {
3824
+ default: C(({ options: f }) => [
3825
+ k(_e, z({
3826
+ modelValue: d.value[B].value,
3827
+ "onUpdate:modelValue": (V) => d.value[B].value = V
3828
+ }, $.value, {
3829
+ theme: w.theme,
3830
+ placeholder: w.input.placeholder,
3831
+ options: f,
3832
+ class: "--flx"
3833
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "theme", "placeholder", "options"])
3834
+ ]),
3835
+ _: 2
3836
+ }, 1032, ["input"])) : w.input.type === r(P).SELECT_FILTER ? (i(), A(Ne, {
3837
+ key: 8,
3838
+ input: w.input
3839
+ }, {
3840
+ default: C(({ options: f }) => [
3841
+ k(ke, z({
3842
+ modelValue: d.value[B].value,
3843
+ "onUpdate:modelValue": (V) => d.value[B].value = V
3844
+ }, $.value, {
3845
+ theme: w.theme,
3846
+ placeholder: w.input.placeholder,
3847
+ options: f,
3848
+ class: "--flx"
3849
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "theme", "placeholder", "options"])
3850
+ ]),
3851
+ _: 2
3852
+ }, 1032, ["input"])) : w.input.type === r(P).COLOR ? (i(), A(al, z({
3853
+ key: 9,
3854
+ modelValue: d.value[B].value,
3855
+ "onUpdate:modelValue": (f) => d.value[B].value = f
3856
+ }, $.value, { theme: w.theme }), null, 16, ["modelValue", "onUpdate:modelValue", "theme"])) : (i(), A(fe, z({
3857
+ key: 10,
3858
+ modelValue: d.value[B].value,
3859
+ "onUpdate:modelValue": (f) => d.value[B].value = f
3860
+ }, {
3861
+ ...$.value,
3862
+ ...w.input.type === r(P).LONGTEXT ? { textarea: !0 } : { type: r(u)() }
3863
+ }, {
3864
+ theme: w.theme,
3865
+ placeholder: r(a)(),
3866
+ class: "--flx"
3867
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "theme", "placeholder"]))
3868
+ ]),
3869
+ _: 1
3870
+ }, 8, ["models", "input", "theme"])),
3871
+ w.input.required && !v.value && S.value ? (i(), b("p", gl, T(r(n)("form_required_field")), 1)) : L("", !0)
3872
+ ]);
3873
+ };
3874
+ }
3875
+ }), _l = { key: 0 }, bl = {
3876
+ key: 0,
3877
+ class: "--txtSize-sm"
3878
+ }, wl = /* @__PURE__ */ j({
3879
+ name: "FormSimple",
3880
+ inheritAttrs: !0,
3881
+ __name: "Simple",
3882
+ props: {
3883
+ title: {},
3884
+ modelValue: {},
3885
+ noForm: { type: Boolean },
3886
+ invalid: {},
3887
+ make: {},
3888
+ theme: {}
3889
+ },
3890
+ emits: ["update:invalid", "update:model-value"],
3891
+ setup(l, { emit: t }) {
3892
+ const e = l, { t: n, tet: m } = U(Z), { defaultCountry: c, getCountries: o, getCountryStates: a } = Ge(), s = O(() => {
3893
+ var v;
3894
+ return (v = e.modelValue) == null ? void 0 : v.some(({ type: S }) => S === P.LOCATION);
3895
+ }), u = O(() => {
3896
+ var v;
3897
+ return (v = e.modelValue) == null ? void 0 : v.some(({ type: S }) => S === P.CELLPHONE || S === P.PHONE);
3898
+ });
3899
+ function p(v, S) {
3900
+ var $, d;
3901
+ h.value[v].values = S, t("update:model-value", ($ = e.modelValue) == null ? void 0 : $.toSpliced(v, 1, h.value[v])), (d = e.invalid) != null && d.length && t(
3902
+ "update:invalid",
3903
+ e.invalid.filter(({ invalidValue: D, name: F }) => h.value[v].name !== F || H.isEqual(D, S))
3904
+ );
3905
+ }
3906
+ const h = O(
3907
+ () => (e.modelValue || []).filter(({ type: v, options: S, required: $ }) => !((he.SELECT === v || he.SELECT_FILTER === v || he.CHOICE === v) && !(S != null && S.length) && !$))
3908
+ );
3909
+ function y({ type: v, title: S, required: $ }) {
3910
+ if (S)
3911
+ S = m(S);
3912
+ else
3913
+ switch (v) {
3914
+ case P.LOCATION:
3915
+ S = n("form_location");
3916
+ break;
3917
+ case P.NEW_PASSWORD:
3918
+ S = n("form_desired_password");
3919
+ break;
3920
+ case P.PASSWORD:
3921
+ S = n("form_password");
3922
+ break;
3923
+ case P.ID:
3924
+ S = n("form_id_number");
3925
+ break;
3926
+ case P.PHONE:
3927
+ S = n("form_phone_line");
3928
+ break;
3929
+ case P.CELLPHONE:
3930
+ S = n("form_cellphone");
3931
+ break;
3932
+ case P.EMAIL:
3933
+ S = n("form_email");
3934
+ break;
3935
+ }
3936
+ return $ && S && (S += "*"), S || "";
3937
+ }
3938
+ function g(v) {
3939
+ var S;
3940
+ return (S = e.invalid) == null ? void 0 : S.find(($) => $.name === v);
3941
+ }
3942
+ return ce(
3943
+ () => e.make,
3944
+ (v, S) => {
3945
+ S && (v != null && v.every(($, d) => $.isEqual(S[d]))) || t("update:model-value", v);
3946
+ },
3947
+ { immediate: !0 }
3948
+ ), (v, S) => (i(), A(we, {
3949
+ theme: v.theme,
3950
+ promise: (s.value && !r(c) || u.value) && r(o),
3951
+ class: "flx --flxColumn --flx-start-stretch --gap-10 --gap:md --maxWidth-full",
3952
+ fallback: [],
3953
+ el: v.noForm ? "fieldset" : "form"
3954
+ }, {
3955
+ default: C(($) => [
3956
+ k(we, {
3957
+ theme: v.theme,
3958
+ promise: s.value && !!r(c) && (() => r(a)(r(c) || "")),
3959
+ fallback: [],
3960
+ unwrap: ""
3961
+ }, {
3962
+ default: C((d) => [
3963
+ v.title ? (i(), b("legend", _l, [
3964
+ E("h4", null, T(v.title) + ":", 1)
3965
+ ])) : L("", !0),
3966
+ (i(!0), b(Y, null, oe(h.value, (D, F) => (i(), b("div", {
3967
+ key: F,
3968
+ class: "flx --flxColumn --flx-start-stretch --gap-5"
3969
+ }, [
3970
+ y(D) ? (i(), b("p", bl, T(y(D)), 1)) : L("", !0),
3971
+ k(yl, {
3972
+ theme: v.theme,
3973
+ input: D,
3974
+ invalid: g(D.name),
3975
+ countries: $.content,
3976
+ states: s.value && !!r(c) && d.content || void 0,
3977
+ "model-value": h.value[F].values,
3978
+ "onUpdate:modelValue": (Q) => p(F, Q)
3979
+ }, null, 8, ["theme", "input", "invalid", "countries", "states", "model-value", "onUpdate:modelValue"])
3980
+ ]))), 128))
3981
+ ]),
3982
+ _: 2
3983
+ }, 1032, ["theme", "promise"])
3984
+ ]),
3985
+ _: 1
3986
+ }, 8, ["theme", "promise", "el"]));
3987
+ }
3988
+ }), Cl = { class: "flx --flxColumn --gap-30" }, kl = {
3989
+ key: 0,
3990
+ class: "flx --flxColumn"
3991
+ }, $l = { class: "--txtSize-xs" }, Al = { class: "flx --flxRow --flx-end-center --width" }, Sl = {
3992
+ key: 0,
3993
+ class: "flx --flxRow --flx-start-center --flx --gap-5 --gap:md"
3994
+ }, Bl = { class: "--hidden-full:sm-inv" }, El = { class: "--hidden-full:sm-inv" }, Wl = /* @__PURE__ */ j({
3995
+ name: "FormStages",
3996
+ inheritAttrs: !0,
3997
+ __name: "Stages",
3998
+ props: {
3999
+ submitLabel: {},
4000
+ stages: {},
4001
+ showConformity: { type: Boolean },
4002
+ hideRequiredDisclaimer: { type: Boolean },
4003
+ stagesClasses: {},
4004
+ submitFn: { type: Function },
4005
+ theme: {}
4006
+ },
4007
+ emits: ["inputValues", "submited", "update:activeStage"],
4008
+ setup(l, { emit: t }) {
4009
+ const e = l, { t: n } = U(Z), { isBrowser: m } = U(J), c = W(!1), o = W(0), a = W([]), s = O({
4010
+ get() {
4011
+ return e.stages || [];
4012
+ },
4013
+ set(y) {
4014
+ y && y.length && (!c.value && (c.value = !0), y.forEach((g, v) => {
4015
+ g.forEach(({ listen: S, inputs: $ }) => {
4016
+ if (S && v === o.value) {
4017
+ const d = $.reduce((D, F) => ({ ...D, [F.name]: F.values }), {});
4018
+ t("inputValues", d);
4019
+ }
4020
+ });
4021
+ }));
4022
+ }
4023
+ }), u = W(!1), p = H.debounce(async () => {
4024
+ var v;
4025
+ u.value = !0;
4026
+ const y = (e.stages || []).map((S) => S.map(({ inputs: $ }) => $)), g = await ((v = e.submitFn) == null ? void 0 : v.call(e, y.flat(2)));
4027
+ u.value = !1, Array.isArray(g) ? a.value = g : t("submited", g);
4028
+ });
4029
+ function h(y) {
4030
+ o.value = y, window.scrollTo({ top: 0, behavior: "smooth" });
4031
+ }
4032
+ return m && t("update:activeStage", h), (y, g) => {
4033
+ var v;
4034
+ return i(), A(pt, {
4035
+ loading: u.value,
4036
+ content: !!((v = y.stages) != null && v.length),
4037
+ theme: y.theme,
4038
+ tag: "form",
4039
+ method: "post",
4040
+ class: "flx --flxColumn --flx-start-stretch --gap-30 --maxWidth-full"
4041
+ }, {
4042
+ default: C(() => {
4043
+ var S;
4044
+ return [
4045
+ (i(!0), b(Y, null, oe(s.value.filter(($) => $.length), ($, d) => Fe((i(), b("div", {
4046
+ key: `stage-${d}`,
4047
+ class: G(y.stagesClasses ?? "flx --flxColumn --flx-start-stretch --gap-30")
4048
+ }, [
4049
+ (i(!0), b(Y, null, oe($, (D, F) => (i(), A(wl, {
4050
+ key: `form-${F}`,
4051
+ modelValue: s.value[d][F].inputs,
4052
+ "onUpdate:modelValue": (Q) => s.value[d][F].inputs = Q,
4053
+ modelModifiers: { lazy: !0 },
4054
+ theme: y.theme,
4055
+ invalid: a.value,
4056
+ "no-form": "",
4057
+ title: D.title,
4058
+ "onUpdate:invalid": g[0] || (g[0] = (Q) => a.value = Q)
4059
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "theme", "invalid", "title"]))), 128))
4060
+ ], 2)), [
4061
+ [je, o.value == d]
4062
+ ])), 128)),
4063
+ E("div", Cl, [
4064
+ y.hideRequiredDisclaimer ? L("", !0) : (i(), b("div", kl, [
4065
+ E("p", $l, T(r(n)("required_verification")), 1)
4066
+ ])),
4067
+ E("div", Al, [
4068
+ (S = y.stages) != null && S.length ? (i(), b("div", Sl, [
4069
+ x(y.$slots, "primary-actions", X(le({
4070
+ activeStage: o.value,
4071
+ stagesLength: y.stages && y.stages.length,
4072
+ setActiveStage: h,
4073
+ canSubmit: c.value
4074
+ })), () => [
4075
+ s.value.length > 1 && o.value ? (i(), A(ae, {
4076
+ key: "button-back",
4077
+ theme: y.theme,
4078
+ "aria-label": r(n)("previous"),
4079
+ round: ":sm",
4080
+ onClick: g[1] || (g[1] = ie(($) => h(o.value - 1), ["prevent"]))
4081
+ }, {
4082
+ default: C(() => [
4083
+ k(M, { name: "arrow-left" }),
4084
+ k(M, {
4085
+ name: "arrow-left",
4086
+ regular: ""
4087
+ }),
4088
+ E("span", Bl, T(r(n)("previous")), 1)
4089
+ ]),
4090
+ _: 1
4091
+ }, 8, ["theme", "aria-label"])) : L("", !0),
4092
+ y.submitLabel && (o.value === s.value.length - 1 || !s.value.length) ? (i(), A(se, {
4093
+ key: "button-submit",
4094
+ theme: y.theme,
4095
+ "aria-label": r(n)("send"),
4096
+ disabled: !c.value || !y.submitFn,
4097
+ onClick: ie(r(p), ["prevent"])
4098
+ }, {
4099
+ default: C(() => [
4100
+ ne(T(y.submitLabel || r(n)("send")), 1)
4101
+ ]),
4102
+ _: 1
4103
+ }, 8, ["theme", "aria-label", "disabled", "onClick"])) : L("", !0),
4104
+ s.value.length > 1 && o.value < s.value.length - 1 ? (i(), A(ae, {
4105
+ key: "button-next",
4106
+ theme: y.theme,
4107
+ "aria-label": r(n)("next"),
4108
+ round: ":sm",
4109
+ onClick: g[2] || (g[2] = ie(($) => h(o.value + 1), ["prevent"]))
4110
+ }, {
4111
+ default: C(() => [
4112
+ E("span", El, T(r(n)("next")), 1),
4113
+ k(M, { name: "arrow-right" }),
4114
+ k(M, {
4115
+ name: "arrow-right",
4116
+ regular: ""
4117
+ })
4118
+ ]),
4119
+ _: 1
4120
+ }, 8, ["theme", "aria-label"])) : L("", !0)
4121
+ ])
4122
+ ])) : L("", !0),
4123
+ x(y.$slots, "secondary-actions", X(le({
4124
+ activeStage: o.value,
4125
+ stagesLength: y.stages && y.stages.length,
4126
+ setActiveStage: h,
4127
+ canSubmit: c.value
4128
+ })))
4129
+ ])
4130
+ ])
4131
+ ];
4132
+ }),
4133
+ _: 3
4134
+ }, 8, ["loading", "content", "theme"]);
4135
+ };
4136
+ }
4137
+ }), Vl = { class: "flx --flxColumn --flx-start-center --gap-10" }, Ll = {
4138
+ key: 0,
4139
+ class: "flx --flxRow --flx-center"
4140
+ }, Ol = { key: 0 }, Tl = {
4141
+ key: 0,
4142
+ class: "--txtSize-sm"
4143
+ }, Rl = { key: 1 }, Hl = /* @__PURE__ */ j({
4144
+ name: "SliderSimple",
4145
+ inheritAttrs: !0,
4146
+ __name: "Slider",
4147
+ props: {
4148
+ /**
4149
+ * Show controls
4150
+ */
4151
+ controls: {
4152
+ type: [Boolean, String],
4153
+ default: !0
4154
+ },
4155
+ /**
4156
+ * Auto-animate
4157
+ */
4158
+ animate: {
4159
+ type: Boolean,
4160
+ default: !0
4161
+ },
4162
+ /**
4163
+ * Transition duration in ms
4164
+ * @values 100 - 1000
4165
+ */
4166
+ transitionDuration: {
4167
+ type: Number,
4168
+ default: 700
4169
+ },
4170
+ /**
4171
+ * Interval duration in ms
4172
+ */
4173
+ intervalDuration: {
4174
+ type: Number,
4175
+ default: 7e3
4176
+ },
4177
+ visibleSlides: {
4178
+ type: Number,
4179
+ default: 3
4180
+ },
4181
+ /**
4182
+ * is gallery (border radius)
4183
+ * TODO: allow opening overlay with picture gallery
4184
+ */
4185
+ gallery: {
4186
+ type: Boolean,
4187
+ default: !1
4188
+ },
4189
+ enumerate: {
4190
+ type: Boolean,
4191
+ default: !1
4192
+ }
4193
+ },
4194
+ setup(l) {
4195
+ const t = l, e = Ct(), n = de("xamu"), { t: m } = U(Z), { isBrowser: c } = U(J), o = W(), a = W(), s = W(!1), u = W(!1), p = W(), h = W("slide-1"), y = W(0), g = O(() => !(n != null && n.disableAutoAnimate) && t.animate), v = O(() => {
4196
+ var q;
4197
+ const I = ((q = e.default) == null ? void 0 : q.call(e)) || [];
4198
+ return I.length && I[0].type === "li" ? "ul" : "div";
4199
+ });
4200
+ function S() {
4201
+ if (!a.value || !o.value)
4202
+ throw new Error("Missing containers");
4203
+ s.value = !0;
4204
+ const I = Array.from(a.value.children || []), q = a.value.offsetWidth, B = I[0].offsetWidth;
4205
+ return o.value.style.width = `${q}px`, a.value.style.left = "0", {
4206
+ slides: I,
4207
+ sliderWidth: q,
4208
+ slideWidth: B,
4209
+ slider: a.value,
4210
+ sliderContainer: o.value
4211
+ };
4212
+ }
4213
+ function $() {
4214
+ if (!a.value || !o.value)
4215
+ throw new Error("Missing containers");
4216
+ a.value.style.transition = "none", o.value.style.width = "auto", a.value.style.left = "0", s.value = !1;
4217
+ }
4218
+ const d = (I) => new Promise((q) => {
4219
+ const { slides: B, slideWidth: f, slider: V } = S();
4220
+ B[B.length - 1].after(B[0].cloneNode(!0)), V.style.transition = `left ${I}ms ease`, setTimeout(() => {
4221
+ V.style.left = `-${f}px`, setTimeout(() => {
4222
+ B[0].remove();
4223
+ const _ = V.children[0];
4224
+ _.dataset.id && (h.value = _.dataset.id), q(!0);
4225
+ }, I);
4226
+ }, 1);
4227
+ }), D = (I) => new Promise((q) => {
4228
+ const { slides: B, slideWidth: f, slider: V } = S();
4229
+ V.style.left = `-${f}px`, B[0].before(B[B.length - 1].cloneNode(!0)), setTimeout(() => {
4230
+ V.style.transition = `left ${I}ms ease`, setTimeout(() => {
4231
+ V.style.left = "0", setTimeout(() => {
4232
+ B[B.length - 1].remove();
4233
+ const _ = V.children[0];
4234
+ _.dataset.id && (h.value = _.dataset.id), q(!0);
4235
+ }, I);
4236
+ }, 1);
4237
+ }, 1);
4238
+ });
4239
+ async function F(I, q, B = t.transitionDuration) {
4240
+ if (!a.value || !o.value)
4241
+ return;
4242
+ const f = Array.from(a.value.children || []);
4243
+ if (!(!f.length || s.value)) {
4244
+ if (q) {
4245
+ const V = f.findIndex((K) => K.dataset.id === q);
4246
+ if (V < 1)
4247
+ return;
4248
+ const _ = V > Math.floor(f.length / 2), R = _ ? f.length - V : V, N = B / R;
4249
+ for (const K of Array(R).fill(() => F(_, "", N)))
4250
+ await K(K);
4251
+ } else if (await (I ? D(B) : d(B)))
4252
+ return $();
4253
+ }
4254
+ }
4255
+ const Q = H.debounce(F);
4256
+ function w() {
4257
+ if (!a.value || !o.value)
4258
+ return;
4259
+ const I = Array.from(a.value.children || []);
4260
+ I.length && (y.value = I.length, I.forEach((q, B) => {
4261
+ q.dataset.id = `slide-${B + 1}`, q.style.flex = `0 0 ${100 / t.visibleSlides}%`;
4262
+ }), !(!g.value || y.value <= 1) && (p.value = setInterval(
4263
+ () => !u.value && Q(!1),
4264
+ t.intervalDuration
4265
+ )));
4266
+ }
4267
+ return c && (Ve(() => {
4268
+ w();
4269
+ }), kt(() => {
4270
+ clearInterval(p.value);
4271
+ })), (I, q) => (i(), b("header", {
4272
+ onMouseover: q[2] || (q[2] = (B) => u.value = !0),
4273
+ onMouseleave: q[3] || (q[3] = (B) => u.value = !1)
4274
+ }, [
4275
+ E("div", Vl, [
4276
+ E("div", {
4277
+ ref_key: "sliderContainerRef",
4278
+ ref: o,
4279
+ class: G([{ "avatarAureo --size-lg": l.gallery }, "--overflow-hidden"])
4280
+ }, [
4281
+ (i(), A(ve(v.value), {
4282
+ ref_key: "sliderRef",
4283
+ ref: a,
4284
+ class: "flx --flxRow --flx-start-stretch --gap-none --overflow"
4285
+ }, {
4286
+ default: C(() => [
4287
+ x(I.$slots, "default")
4288
+ ]),
4289
+ _: 3
4290
+ }, 512))
4291
+ ], 2),
4292
+ y.value > 1 && l.controls ? (i(), b("ul", Ll, [
4293
+ l.controls === "full" ? (i(), b("li", Ol, [
4294
+ k(se, {
4295
+ "aria-label": r(m)("previous"),
4296
+ round: "",
4297
+ onClick: q[0] || (q[0] = ie((B) => r(Q)(!0), ["prevent"]))
4298
+ }, {
4299
+ default: C(() => [
4300
+ k(M, { name: "arrow-left" })
4301
+ ]),
4302
+ _: 1
4303
+ }, 8, ["aria-label"])
4304
+ ])) : L("", !0),
4305
+ (i(!0), b(Y, null, oe(y.value, (B) => (i(), b("li", { key: B }, [
4306
+ k(ae, {
4307
+ id: `slide-${B}`,
4308
+ tooltip: r(m)("pick"),
4309
+ active: h.value === `slide-${B}`,
4310
+ size: "xs",
4311
+ round: "",
4312
+ onClick: ie((f) => r(Q)(!1, `slide-${B}`), ["prevent"])
4313
+ }, {
4314
+ default: C(() => [
4315
+ l.enumerate ? (i(), b("span", Tl, T(B), 1)) : L("", !0)
4316
+ ]),
4317
+ _: 2
4318
+ }, 1032, ["id", "tooltip", "active", "onClick"])
4319
+ ]))), 128)),
4320
+ l.controls === "full" ? (i(), b("li", Rl, [
4321
+ k(se, {
4322
+ "aria-label": r(m)("next"),
4323
+ round: "",
4324
+ onClick: q[1] || (q[1] = ie((B) => r(Q)(!1), ["prevent"]))
4325
+ }, {
4326
+ default: C(() => [
4327
+ k(M, { name: "arrow-right" })
4328
+ ]),
4329
+ _: 1
4330
+ }, 8, ["aria-label"])
4331
+ ])) : L("", !0)
4332
+ ])) : L("", !0)
4333
+ ])
4334
+ ], 32));
4335
+ }
4336
+ });
4337
+ export {
4338
+ tl as A,
4339
+ ke as B,
4340
+ _e as C,
4341
+ Hl as D,
4342
+ Da as E,
4343
+ ja as F,
4344
+ ma as G,
4345
+ se as _,
4346
+ ql as a,
4347
+ ae as b,
4348
+ Ml as c,
4349
+ ee as d,
4350
+ Ul as e,
4351
+ ge as f,
4352
+ He as g,
4353
+ Te as h,
4354
+ zt as i,
4355
+ Ae as j,
4356
+ Fl as k,
4357
+ Ee as l,
4358
+ pa as m,
4359
+ yl as n,
4360
+ wl as o,
4361
+ Wl as p,
4362
+ M as q,
4363
+ Dt as r,
4364
+ xt as s,
4365
+ fe as t,
4366
+ Se as u,
4367
+ pt as v,
4368
+ we as w,
4369
+ Ue as x,
4370
+ Be as y,
4371
+ jl as z
4372
+ };