@8wave/ai-elements 0.103.0-beta.3 → 0.103.0-beta.4

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 (128) hide show
  1. package/dist/_chunks/PkLazyImg-CyeqD59M.js +34 -0
  2. package/dist/_chunks/{PkLazyImg-_389yCnQ.js.map → PkLazyImg-CyeqD59M.js.map} +1 -1
  3. package/dist/_chunks/{PkStreamingMarkdown-YJDdYD0E.js → PkStreamingMarkdown-DIkusrTI.js} +28 -28
  4. package/dist/_chunks/{PkStreamingMarkdown-YJDdYD0E.js.map → PkStreamingMarkdown-DIkusrTI.js.map} +1 -1
  5. package/dist/_chunks/PkToolRequestGeolocation-Cgus94KF.js +69 -0
  6. package/dist/_chunks/{PkToolRequestGeolocation-T16QI-Uv.js.map → PkToolRequestGeolocation-Cgus94KF.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-C8e5np2q.js → PkToolRequestOAuthConnection-DsUpUh97.js} +21 -21
  8. package/dist/_chunks/{PkToolRequestOAuthConnection-C8e5np2q.js.map → PkToolRequestOAuthConnection-DsUpUh97.js.map} +1 -1
  9. package/dist/_chunks/PkToolShowArtifact-griVx9w3.js +93 -0
  10. package/dist/_chunks/{PkToolShowArtifact-D15GjBm6.js.map → PkToolShowArtifact-griVx9w3.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowCalendarEvent-D_GjXl2_.js → PkToolShowCalendarEvent-DyiNmqqo.js} +43 -43
  12. package/dist/_chunks/{PkToolShowCalendarEvent-D_GjXl2_.js.map → PkToolShowCalendarEvent-DyiNmqqo.js.map} +1 -1
  13. package/dist/_chunks/PkToolShowComparison-RA72YL7R.js +66 -0
  14. package/dist/_chunks/{PkToolShowComparison-Bp2rP2Hx.js.map → PkToolShowComparison-RA72YL7R.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowContactForm-NVzIu2t0.js → PkToolShowContactForm-BzDhv2yd.js} +41 -41
  16. package/dist/_chunks/{PkToolShowContactForm-NVzIu2t0.js.map → PkToolShowContactForm-BzDhv2yd.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowDiagram-BnZrDPVC.js → PkToolShowDiagram-DhXe8IPm.js} +79 -79
  18. package/dist/_chunks/{PkToolShowDiagram-BnZrDPVC.js.map → PkToolShowDiagram-DhXe8IPm.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowEmail-DCSj4328.js → PkToolShowEmail-CBmfy_I9.js} +34 -34
  20. package/dist/_chunks/{PkToolShowEmail-DCSj4328.js.map → PkToolShowEmail-CBmfy_I9.js.map} +1 -1
  21. package/dist/_chunks/PkToolShowForm-CzIfm5de.js +365 -0
  22. package/dist/_chunks/{PkToolShowForm-ztQFyFd9.js.map → PkToolShowForm-CzIfm5de.js.map} +1 -1
  23. package/dist/_chunks/PkToolShowImageGallery-CSIiRuSC.js +74 -0
  24. package/dist/_chunks/{PkToolShowImageGallery-DiOR0vYa.js.map → PkToolShowImageGallery-CSIiRuSC.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowLocation-CQmgakEo.js → PkToolShowLocation-BHoUqpx4.js} +4079 -4079
  26. package/dist/_chunks/{PkToolShowLocation-CQmgakEo.js.map → PkToolShowLocation-BHoUqpx4.js.map} +1 -1
  27. package/dist/_chunks/PkToolShowMessage-CpDmPfCG.js +77 -0
  28. package/dist/_chunks/{PkToolShowMessage-BysjJ1oS.js.map → PkToolShowMessage-CpDmPfCG.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowProductList-D-JXSRmA.js → PkToolShowProductList-B8uuIvGo.js} +28 -28
  30. package/dist/_chunks/{PkToolShowProductList-D-JXSRmA.js.map → PkToolShowProductList-B8uuIvGo.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowQrCode-BcIwuGqm.js → PkToolShowQrCode-CD2lo3O0.js} +23 -23
  32. package/dist/_chunks/{PkToolShowQrCode-BcIwuGqm.js.map → PkToolShowQrCode-CD2lo3O0.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowSources-U7etupUP.js → PkToolShowSources-JxaTAEpc.js} +98 -98
  34. package/dist/_chunks/{PkToolShowSources-U7etupUP.js.map → PkToolShowSources-JxaTAEpc.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowSuggestedReply-Dqe4gtEY.js → PkToolShowSuggestedReply-BTxqEwEm.js} +18 -18
  36. package/dist/_chunks/{PkToolShowSuggestedReply-Dqe4gtEY.js.map → PkToolShowSuggestedReply-BTxqEwEm.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowVideo-DYMhfXKH.js → PkToolShowVideo-CVksKdPD.js} +17 -17
  38. package/dist/_chunks/{PkToolShowVideo-DYMhfXKH.js.map → PkToolShowVideo-CVksKdPD.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowWeather-D_pJe5DI.js → PkToolShowWeather-IDwTDozU.js} +68 -68
  40. package/dist/_chunks/{PkToolShowWeather-D_pJe5DI.js.map → PkToolShowWeather-IDwTDozU.js.map} +1 -1
  41. package/dist/_chunks/PkToolShowWebPages-D9Yst_2O.js +78 -0
  42. package/dist/_chunks/{PkToolShowWebPages-CPNgXzrS.js.map → PkToolShowWebPages-D9Yst_2O.js.map} +1 -1
  43. package/dist/_chunks/{PkUrl-C3gMPCjz.js → PkUrl-B3FTSURr.js} +19 -19
  44. package/dist/_chunks/{PkUrl-C3gMPCjz.js.map → PkUrl-B3FTSURr.js.map} +1 -1
  45. package/dist/_chunks/{VvCheckbox.es-CEfwI84M.js → VvCheckbox.es-C_dlDzrr.js} +78 -78
  46. package/dist/_chunks/{VvCheckbox.es-CEfwI84M.js.map → VvCheckbox.es-C_dlDzrr.js.map} +1 -1
  47. package/dist/_chunks/{VvCheckboxGroup.es-B-eWqe8G.js → VvCheckboxGroup.es-hY0kWpC2.js} +197 -197
  48. package/dist/_chunks/{VvCheckboxGroup.es-B-eWqe8G.js.map → VvCheckboxGroup.es-hY0kWpC2.js.map} +1 -1
  49. package/dist/_chunks/VvCombobox.es-DxhDF7ab.js +2044 -0
  50. package/dist/_chunks/{VvCombobox.es-CfRJtWOd.js.map → VvCombobox.es-DxhDF7ab.js.map} +1 -1
  51. package/dist/_chunks/{VvInputText.es-B0HHD6Th.js → VvInputText.es-CdpU8kvP.js} +460 -460
  52. package/dist/_chunks/{VvInputText.es-B0HHD6Th.js.map → VvInputText.es-CdpU8kvP.js.map} +1 -1
  53. package/dist/_chunks/{VvRadio.es-B3u8JJFF.js → VvRadio.es-BruZ5FHR.js} +144 -144
  54. package/dist/_chunks/{VvRadio.es-B3u8JJFF.js.map → VvRadio.es-BruZ5FHR.js.map} +1 -1
  55. package/dist/_chunks/{VvRadioGroup.es--AMV1wAw.js → VvRadioGroup.es-DSv6UdEy.js} +148 -148
  56. package/dist/_chunks/{VvRadioGroup.es--AMV1wAw.js.map → VvRadioGroup.es-DSv6UdEy.js.map} +1 -1
  57. package/dist/_chunks/{VvSelect.es-BfrDID0e.js → VvSelect.es-C244CAei.js} +155 -155
  58. package/dist/_chunks/{VvSelect.es-BfrDID0e.js.map → VvSelect.es-C244CAei.js.map} +1 -1
  59. package/dist/_chunks/VvTextarea.es-DbaPIcWl.js +1166 -0
  60. package/dist/_chunks/{VvTextarea.es-CAzFW944.js.map → VvTextarea.es-DbaPIcWl.js.map} +1 -1
  61. package/dist/_chunks/{dist-BvSGMyWS.js → dist-BgJVX4FG.js} +12 -12
  62. package/dist/_chunks/{dist-BvSGMyWS.js.map → dist-BgJVX4FG.js.map} +1 -1
  63. package/dist/_chunks/{dist-TFHdNK0W.js → dist-C5Y-NI3i.js} +230 -230
  64. package/dist/_chunks/{dist-TFHdNK0W.js.map → dist-C5Y-NI3i.js.map} +1 -1
  65. package/dist/_chunks/{esm-CUYQMpeA.js → esm-BTbGj6W3.js} +25 -25
  66. package/dist/_chunks/{esm-CUYQMpeA.js.map → esm-BTbGj6W3.js.map} +1 -1
  67. package/dist/_chunks/{floating-ui.vue-Br_zOLJv.js → floating-ui.vue-CoA4oagI.js} +16 -16
  68. package/dist/_chunks/{floating-ui.vue-Br_zOLJv.js.map → floating-ui.vue-CoA4oagI.js.map} +1 -1
  69. package/dist/_chunks/{iconify-BGSTR7vH.js → iconify-6ObncgfH.js} +36 -36
  70. package/dist/_chunks/{iconify-BGSTR7vH.js.map → iconify-6ObncgfH.js.map} +1 -1
  71. package/dist/_chunks/{index.es-B9rhQl9Z.js → index.es-BbyodRh9.js} +258 -258
  72. package/dist/_chunks/{index.es-B9rhQl9Z.js.map → index.es-BbyodRh9.js.map} +1 -1
  73. package/dist/_chunks/index.es-gbmOq0Nu.js +3124 -0
  74. package/dist/_chunks/index.es-gbmOq0Nu.js.map +1 -0
  75. package/dist/_chunks/{rolldown-runtime-CEFd7nDs.js → rolldown-runtime-CoeuCKPe.js} +4 -11
  76. package/dist/_chunks/{src-BjFv9Ag8.js → src-CIEdKLKO.js} +2 -2
  77. package/dist/_chunks/{src-BjFv9Ag8.js.map → src-CIEdKLKO.js.map} +1 -1
  78. package/dist/_chunks/useImageFallback-BAsLRsyg.js +19 -0
  79. package/dist/_chunks/{useImageFallback-8kfLDjXm.js.map → useImageFallback-BAsLRsyg.js.map} +1 -1
  80. package/dist/_chunks/{useLightbox-Bq6k-Wlt.js → useLightbox-Epg2fN87.js} +7 -7
  81. package/dist/_chunks/{useLightbox-Bq6k-Wlt.js.map → useLightbox-Epg2fN87.js.map} +1 -1
  82. package/dist/_chunks/useShortUrlResolver--HRa6Od3.js +72 -0
  83. package/dist/_chunks/{useShortUrlResolver-BTJM8XRw.js.map → useShortUrlResolver--HRa6Od3.js.map} +1 -1
  84. package/dist/_chunks/{vue-i18n-BJ7nxwO3.js → vue-i18n-t25g63Be.js} +81 -81
  85. package/dist/_chunks/{vue-i18n-BJ7nxwO3.js.map → vue-i18n-t25g63Be.js.map} +1 -1
  86. package/dist/_chunks/vue.runtime.esm-bundler-B3bThTaf.js +3747 -0
  87. package/dist/_chunks/vue.runtime.esm-bundler-B3bThTaf.js.map +1 -0
  88. package/dist/ai-elements.es.js +1861 -1861
  89. package/dist/ai-elements.es.js.map +1 -1
  90. package/dist-vue/PkChatbot.js +1 -1
  91. package/dist-vue/PkChatbotAuth.js +1 -1
  92. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  93. package/dist-vue/PkChatbotMessages.js +1 -1
  94. package/dist-vue/PkChatbotViewChat.js +1 -1
  95. package/dist-vue/_chunks/{PkChatbot-DZ6TaZHh.js → PkChatbot-Ch8FlZjC.js} +2 -2
  96. package/dist-vue/_chunks/{PkChatbot-DZ6TaZHh.js.map → PkChatbot-Ch8FlZjC.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkChatbotAuth-CqwTN8ih.js → PkChatbotAuth-DvnmIukc.js} +2 -2
  98. package/dist-vue/_chunks/{PkChatbotAuth-CqwTN8ih.js.map → PkChatbotAuth-DvnmIukc.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkChatbotFeedbackForm-nEevDHmI.js → PkChatbotFeedbackForm-D0RNa7bE.js} +2 -2
  100. package/dist-vue/_chunks/{PkChatbotFeedbackForm-nEevDHmI.js.map → PkChatbotFeedbackForm-D0RNa7bE.js.map} +1 -1
  101. package/dist-vue/_chunks/{PkChatbotMessages-BgsyN-mB.js → PkChatbotMessages-DGO0WIqx.js} +4 -4
  102. package/dist-vue/_chunks/{PkChatbotMessages-BgsyN-mB.js.map → PkChatbotMessages-DGO0WIqx.js.map} +1 -1
  103. package/dist-vue/_chunks/{PkChatbotViewChat-0g30_sQH.js → PkChatbotViewChat-Dkz8dq8N.js} +3 -3
  104. package/dist-vue/_chunks/{PkChatbotViewChat-0g30_sQH.js.map → PkChatbotViewChat-Dkz8dq8N.js.map} +1 -1
  105. package/dist-vue/_chunks/{PkToolShowContactForm-CMK4zR2J.js → PkToolShowContactForm-CkkWxSSz.js} +2 -2
  106. package/dist-vue/_chunks/{PkToolShowContactForm-CMK4zR2J.js.map → PkToolShowContactForm-CkkWxSSz.js.map} +1 -1
  107. package/dist-vue/_chunks/{PkToolShowDiagram-DoklcF3f.js → PkToolShowDiagram-D0NBG-Gy.js} +2 -2
  108. package/dist-vue/_chunks/{PkToolShowDiagram-DoklcF3f.js.map → PkToolShowDiagram-D0NBG-Gy.js.map} +1 -1
  109. package/dist-vue/_chunks/{index.es-BT6Jr2yi.js → index.es-BKxzs6Sh.js} +2 -2
  110. package/dist-vue/_chunks/{index.es-BT6Jr2yi.js.map → index.es-BKxzs6Sh.js.map} +1 -1
  111. package/dist-vue/index.js +10 -10
  112. package/package.json +2 -2
  113. package/dist/_chunks/PkLazyImg-_389yCnQ.js +0 -34
  114. package/dist/_chunks/PkToolRequestGeolocation-T16QI-Uv.js +0 -69
  115. package/dist/_chunks/PkToolShowArtifact-D15GjBm6.js +0 -93
  116. package/dist/_chunks/PkToolShowComparison-Bp2rP2Hx.js +0 -66
  117. package/dist/_chunks/PkToolShowForm-ztQFyFd9.js +0 -365
  118. package/dist/_chunks/PkToolShowImageGallery-DiOR0vYa.js +0 -74
  119. package/dist/_chunks/PkToolShowMessage-BysjJ1oS.js +0 -77
  120. package/dist/_chunks/PkToolShowWebPages-CPNgXzrS.js +0 -78
  121. package/dist/_chunks/VvCombobox.es-CfRJtWOd.js +0 -2044
  122. package/dist/_chunks/VvTextarea.es-CAzFW944.js +0 -1166
  123. package/dist/_chunks/index.es-DvV0VhDa.js +0 -9832
  124. package/dist/_chunks/index.es-DvV0VhDa.js.map +0 -1
  125. package/dist/_chunks/useImageFallback-8kfLDjXm.js +0 -19
  126. package/dist/_chunks/useShortUrlResolver-BTJM8XRw.js +0 -72
  127. package/dist/_chunks/vue.runtime.esm-bundler-DF2of3lp.js +0 -5007
  128. package/dist/_chunks/vue.runtime.esm-bundler-DF2of3lp.js.map +0 -1
@@ -0,0 +1,3124 @@
1
+ import { $ as e, A as t, B as n, C as r, Ct as i, E as a, F as o, G as s, H as c, L as l, M as u, N as d, O as f, P as p, Q as m, R as h, St as g, T as _, Tt as v, U as y, V as b, W as x, X as S, Z as C, _ as w, _t as T, a as E, b as D, bt as O, c as k, ct as A, d as j, et as M, g as N, h as P, i as ee, it as te, k as F, m as I, pt as L, q as ne, r as re, t as R, u as ie, ut as ae, v as z, vt as B, w as oe, wt as se, x as ce, xt as le, y as ue, yt as de, z as fe } from "./vue.runtime.esm-bundler-B3bThTaf.js";
2
+ import { a as V, i as pe, t as me } from "./iconify-6ObncgfH.js";
3
+ import { c as he, d as ge, l as _e, m as ve, n as ye, o as be, p as xe, r as Se, s as H } from "./dist-C5Y-NI3i.js";
4
+ import { a as U, c as Ce, i as we, l as Te, n as Ee, o as De, r as Oe, s as W, t as ke } from "./floating-ui.vue-CoA4oagI.js";
5
+ import { t as Ae } from "./dot-prop-BEIkPL0b.js";
6
+ import { t as je } from "./esm-BTbGj6W3.js";
7
+ //#region ../../node_modules/.pnpm/@volverjs+ui-vue@0.0.18_@json-render+core@0.19.0_zod@4.4.3__@volverjs+style@0.1.25_@vue_fb2fc569fa47f04da7f3d790d6448706/node_modules/@volverjs/ui-vue/dist/components/index.es.js
8
+ f(), re(), te(), le();
9
+ var G = {
10
+ showPassword: "eye-on",
11
+ hidePassword: "eye-off",
12
+ showDatePicker: "calendar",
13
+ showTimePicker: "time",
14
+ showColorPicker: "color",
15
+ clear: "close",
16
+ add: "add",
17
+ remove: "trash",
18
+ edit: "edit",
19
+ download: "download"
20
+ }, Me = { prefix: "normal" }, K = /* @__PURE__ */ (function(e) {
21
+ return e.local = "local", e.session = "session", e;
22
+ })({}), Ne = /* @__PURE__ */ (function(e) {
23
+ return e.absolute = "absolute", e.fixed = "fixed", e;
24
+ })({}), q = /* @__PURE__ */ (function(e) {
25
+ return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
26
+ })({}), Pe = /* @__PURE__ */ (function(e) {
27
+ return e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e;
28
+ })({}), Fe = /* @__PURE__ */ (function(e) {
29
+ return e.before = "before", e.after = "after", e;
30
+ })({}), Ie = /* @__PURE__ */ (function(e) {
31
+ return e.button = "button", e.submit = "submit", e.reset = "reset", e;
32
+ })({}), J = /* @__PURE__ */ (function(e) {
33
+ return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
34
+ })({}), Le = /* @__PURE__ */ (function(e) {
35
+ return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
36
+ })({}), Re = /* @__PURE__ */ (function(e) {
37
+ return e.listbox = "listbox", e.menu = "menu", e;
38
+ })({}), ze = /* @__PURE__ */ (function(e) {
39
+ return e.option = "option", e.presentation = "presentation", e;
40
+ })({}), Be = /* @__PURE__ */ (function(e) {
41
+ return e.alert = "alert", e.alertdialog = "alertdialog", e;
42
+ })({}), Ve = /* @__PURE__ */ Symbol.for("volver"), He = /* @__PURE__ */ Symbol.for("buttonGroup"), Ue = /* @__PURE__ */ Symbol.for("radioGroup"), We = /* @__PURE__ */ Symbol.for("checkGroup"), Ge = /* @__PURE__ */ Symbol.for("accordionGroup"), Ke = /* @__PURE__ */ Symbol.for("dropdownTrigger"), qe = /* @__PURE__ */ Symbol.for("dropdownItem"), Je = /* @__PURE__ */ Symbol.for("dropdownAction"), Ye = /* @__PURE__ */ Symbol.for("alertGroup"), Xe = {
43
+ to: { type: [String, Object] },
44
+ href: String,
45
+ target: String,
46
+ rel: {
47
+ type: String,
48
+ default: "noopener noreferrer"
49
+ }
50
+ }, Ze = {
51
+ valid: {
52
+ type: Boolean,
53
+ default: !1
54
+ },
55
+ validLabel: {
56
+ type: [String, Array],
57
+ default: void 0
58
+ }
59
+ }, Qe = {
60
+ invalid: {
61
+ type: Boolean,
62
+ default: !1
63
+ },
64
+ invalidLabel: {
65
+ type: [String, Array],
66
+ default: void 0
67
+ }
68
+ }, $e = {
69
+ loading: {
70
+ type: Boolean,
71
+ default: !1
72
+ },
73
+ loadingLabel: {
74
+ type: String,
75
+ default: "Loading..."
76
+ }
77
+ }, Y = { disabled: {
78
+ type: Boolean,
79
+ default: !1
80
+ } }, et = { required: {
81
+ type: Boolean,
82
+ default: !1
83
+ } }, tt = { selected: {
84
+ type: Boolean,
85
+ default: !1
86
+ } }, nt = { active: {
87
+ type: Boolean,
88
+ default: !1
89
+ } }, rt = { current: {
90
+ type: Boolean,
91
+ default: !1
92
+ } }, it = {
93
+ showClearAction: {
94
+ type: Boolean,
95
+ default: !1
96
+ },
97
+ iconClear: {
98
+ type: [String, Object],
99
+ default: G.clear
100
+ },
101
+ labelClear: {
102
+ type: String,
103
+ default: "Clear"
104
+ }
105
+ }, at = { pressed: {
106
+ type: Boolean,
107
+ default: !1
108
+ } }, ot = { label: {
109
+ type: [String, Number],
110
+ default: void 0
111
+ } }, st = { readonly: {
112
+ type: Boolean,
113
+ default: !1
114
+ } }, X = { modifiers: {
115
+ type: [String, Array],
116
+ default: void 0
117
+ } }, ct = { hintLabel: {
118
+ type: String,
119
+ default: ""
120
+ } }, lt = {
121
+ options: {
122
+ type: Array,
123
+ default: () => []
124
+ },
125
+ labelKey: {
126
+ type: [String, Function],
127
+ default: "label"
128
+ },
129
+ valueKey: {
130
+ type: [String, Function],
131
+ default: "value"
132
+ },
133
+ disabledKey: {
134
+ type: [String, Function],
135
+ default: "disabled"
136
+ }
137
+ }, ut = { count: {
138
+ type: [Boolean, String],
139
+ default: !1,
140
+ validator: (e) => [
141
+ !0,
142
+ !1,
143
+ "limit",
144
+ "countdown"
145
+ ].includes(e)
146
+ } }, dt = { debounce: {
147
+ type: [Number, String],
148
+ default: void 0
149
+ } }, ft = {
150
+ icon: {
151
+ type: [String, Object],
152
+ default: void 0
153
+ },
154
+ iconPosition: {
155
+ type: String,
156
+ default: Fe.before,
157
+ validation: (e) => Object.values(Fe).includes(e)
158
+ }
159
+ }, pt = { tabindex: {
160
+ type: [String, Number],
161
+ default: 0
162
+ } }, mt = { floating: {
163
+ type: Boolean,
164
+ default: !1
165
+ } }, ht = { unselectable: {
166
+ type: Boolean,
167
+ default: !0
168
+ } }, gt = { id: [String, Number] }, _t = {
169
+ placement: {
170
+ type: String,
171
+ default: q.bottom,
172
+ validator: (e) => Object.values(q).includes(e) || Object.values(Pe).includes(e)
173
+ },
174
+ strategy: {
175
+ type: String,
176
+ default: void 0,
177
+ validator: (e) => Object.values(Ne).includes(e)
178
+ },
179
+ transitionName: {
180
+ type: String,
181
+ default: void 0
182
+ },
183
+ offset: {
184
+ type: [
185
+ Number,
186
+ String,
187
+ Object
188
+ ],
189
+ default: 0
190
+ },
191
+ shift: {
192
+ type: [Boolean, Object],
193
+ default: !1
194
+ },
195
+ flip: {
196
+ type: [Boolean, Object],
197
+ default: !0
198
+ },
199
+ size: {
200
+ type: [Boolean, Object],
201
+ default: () => ({ padding: 10 })
202
+ },
203
+ autoPlacement: {
204
+ type: [Boolean, Object],
205
+ default: !1
206
+ },
207
+ arrow: {
208
+ type: Boolean,
209
+ default: !1
210
+ },
211
+ keepOpen: {
212
+ type: Boolean,
213
+ default: !1
214
+ },
215
+ autofocusFirst: {
216
+ type: Boolean,
217
+ default: !0
218
+ },
219
+ triggerWidth: {
220
+ type: Boolean,
221
+ default: !1
222
+ },
223
+ topLayer: {
224
+ type: Boolean,
225
+ default: !1
226
+ }
227
+ }, vt = {
228
+ ...gt,
229
+ name: {
230
+ type: String,
231
+ required: !0
232
+ }
233
+ }, yt = { autofocus: {
234
+ type: Boolean,
235
+ default: !1
236
+ } }, bt = { autocomplete: {
237
+ type: String,
238
+ default: "off"
239
+ } }, xt = {
240
+ ...vt,
241
+ ...yt,
242
+ ...bt,
243
+ ...pt,
244
+ ...Y,
245
+ ...st,
246
+ ...Ze,
247
+ ...Qe,
248
+ ...ct,
249
+ ...$e,
250
+ ...X,
251
+ ...ut,
252
+ ...dt,
253
+ ...ft,
254
+ ...mt,
255
+ ...ot,
256
+ minlength: {
257
+ type: [String, Number],
258
+ default: void 0
259
+ },
260
+ maxlength: {
261
+ type: [String, Number],
262
+ default: void 0
263
+ },
264
+ placeholder: {
265
+ type: String,
266
+ default: void 0
267
+ },
268
+ ...et
269
+ }, St = {
270
+ ...vt,
271
+ ...pt,
272
+ ...Ze,
273
+ ...Qe,
274
+ ...ct,
275
+ ...Y,
276
+ ...st,
277
+ ...X,
278
+ ...ot,
279
+ ...$e,
280
+ value: {
281
+ type: [
282
+ String,
283
+ Number,
284
+ Boolean
285
+ ],
286
+ default: void 0
287
+ },
288
+ modelValue: {
289
+ type: [
290
+ Object,
291
+ Number,
292
+ Boolean,
293
+ String
294
+ ],
295
+ default: void 0
296
+ }
297
+ }, Ct = {
298
+ ...Ze,
299
+ ...Qe,
300
+ ...lt,
301
+ ...ct,
302
+ ...Y,
303
+ ...st,
304
+ ...X,
305
+ ...ot,
306
+ ...$e,
307
+ ...et,
308
+ modelValue: {
309
+ type: [
310
+ String,
311
+ Array,
312
+ Boolean,
313
+ Number,
314
+ Symbol
315
+ ],
316
+ default: void 0
317
+ },
318
+ name: {
319
+ type: String,
320
+ required: !0
321
+ },
322
+ vertical: {
323
+ type: Boolean,
324
+ default: !1
325
+ }
326
+ }, wt = {
327
+ ...Y,
328
+ ...ot,
329
+ ...at,
330
+ ...nt,
331
+ ...rt,
332
+ ...Xe,
333
+ type: {
334
+ type: String,
335
+ default: Ie.button,
336
+ validator: (e) => Object.values(Ie).includes(e)
337
+ },
338
+ ariaLabel: {
339
+ type: String,
340
+ default: void 0
341
+ },
342
+ defaultTag: {
343
+ type: String,
344
+ default: J.button
345
+ }
346
+ }, Tt = { items: {
347
+ type: Array,
348
+ default: () => []
349
+ } }, Et = {
350
+ storageType: {
351
+ type: String,
352
+ default: K.local,
353
+ validator: (e) => Object.values(K).includes(e)
354
+ },
355
+ storageKey: String
356
+ };
357
+ function Dt(e) {
358
+ let t = F(e, void 0), n = I(() => t !== void 0);
359
+ function r(e, n, r) {
360
+ let i = t?.[e];
361
+ if (i) return I({
362
+ get() {
363
+ return i.value;
364
+ },
365
+ set(e) {
366
+ i.value = e;
367
+ }
368
+ });
369
+ let a = T(n, e);
370
+ return I({
371
+ get() {
372
+ return a.value;
373
+ },
374
+ set(t) {
375
+ r && r(`update:${e}`, t);
376
+ }
377
+ });
378
+ }
379
+ return {
380
+ group: t,
381
+ isInGroup: n,
382
+ getGroupOrLocalRef: r
383
+ };
384
+ }
385
+ var Ot = {
386
+ ...X,
387
+ name: String,
388
+ title: String,
389
+ content: String,
390
+ modelValue: {
391
+ type: Boolean,
392
+ default: void 0
393
+ },
394
+ disabled: Boolean,
395
+ not: Boolean
396
+ }, kt = ["update:modelValue"];
397
+ function At(e) {
398
+ let { group: t, isInGroup: n } = Dt(Ge), r = I(() => !!(e.disabled || t?.disabled.value));
399
+ return {
400
+ isInGroup: n,
401
+ group: t,
402
+ modifiers: I(() => {
403
+ let n = e.modifiers, r = t?.modifiers.value, i = /* @__PURE__ */ new Set();
404
+ return n && (Array.isArray(n) || (n = n.split(" ")), n.forEach((e) => i.add(e))), r && (Array.isArray(r) || (r = r.split(" ")), r.forEach((e) => i.add(e))), [...i];
405
+ }),
406
+ disabled: r,
407
+ bus: t?.bus
408
+ };
409
+ }
410
+ function Z(e, t, n) {
411
+ return I(() => {
412
+ let r = { [e]: !0 }, i = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
413
+ return i && Array.isArray(i) && i.forEach((t) => {
414
+ t && (r[`${e}--${t}`] = !0);
415
+ }), n && Object.keys(n.value).forEach((t) => {
416
+ r[`${e}--${t}`] = O(n.value[t]);
417
+ }), r;
418
+ });
419
+ }
420
+ var jt = ["id", "open"], Mt = ["aria-controls", "aria-expanded"], Nt = ["aria-hidden"], Pt = /* @__PURE__ */ r({
421
+ name: "VvAccordion",
422
+ props: Ot,
423
+ emits: kt,
424
+ setup(e, { expose: t, emit: r }) {
425
+ let a = e, o = r, c = x(), u = ve(a, "modelValue", o), d = I(() => a.name || c?.id || s()), { title: f, content: m, not: h } = B(a), { isInGroup: y, modifiers: b, disabled: C, bus: w } = At(a), T = L(!1);
426
+ S(u, (e) => {
427
+ typeof e == "boolean" && (T.value = h.value ? !e : e);
428
+ }, { immediate: !0 }), S(T, (e) => {
429
+ u.value = h.value ? !e : e;
430
+ });
431
+ function E({ name: e, value: t }) {
432
+ e === d.value && (T.value = t);
433
+ }
434
+ w?.on("toggle", E), p(() => {
435
+ w?.off("toggle", E);
436
+ });
437
+ function k() {
438
+ if (!C.value) {
439
+ if (y.value) {
440
+ w?.emit("toggle", {
441
+ name: d.value,
442
+ value: !T.value
443
+ });
444
+ return;
445
+ }
446
+ T.value = !T.value;
447
+ }
448
+ }
449
+ S(d, (e, t) => {
450
+ w && (t && t !== e && w.emit("unregister", { name: t }), w.emit("register", { name: e }));
451
+ }, { immediate: !0 }), p(() => {
452
+ w && w.emit("unregister", { name: d.value });
453
+ });
454
+ function A() {
455
+ T.value || k();
456
+ }
457
+ function j() {
458
+ T.value && k();
459
+ }
460
+ function M(e) {
461
+ if (!w) {
462
+ console.warn(`[VvAccordion]: You are trying to expand accordion group of "${d.value}" but it is not in a group`);
463
+ return;
464
+ }
465
+ w.emit("expand", { name: e });
466
+ }
467
+ function N(e) {
468
+ if (!w) {
469
+ console.warn(`[VvAccordion]: You are trying to collapse accordion group of "${d.value}" but it is not in a group`);
470
+ return;
471
+ }
472
+ w?.emit("collapse", { name: e });
473
+ }
474
+ t({
475
+ isExpanded: T,
476
+ expand: A,
477
+ collapse: j,
478
+ groupExpand: M,
479
+ groupCollapse: N
480
+ });
481
+ let ee = Z("vv-accordion", b, I(() => ({ disabled: C.value })));
482
+ return (e, t) => (l(), z("details", {
483
+ id: O(d),
484
+ class: g(O(ee)),
485
+ open: O(T)
486
+ }, [P("summary", {
487
+ "aria-controls": O(d),
488
+ "aria-expanded": O(T),
489
+ class: "vv-accordion__summary",
490
+ onClick: t[0] ||= ie((e) => k(), ["prevent"])
491
+ }, [n(e.$slots, "summary", i(_({
492
+ isExpanded: O(T),
493
+ expand: A,
494
+ collapse: j,
495
+ groupExpand: M,
496
+ groupCollapse: N
497
+ })), () => [D(v(O(f)), 1)])], 8, Mt), P("div", {
498
+ "aria-hidden": !O(T),
499
+ class: "vv-accordion__content"
500
+ }, [n(e.$slots, "default", i(_({
501
+ isExpanded: O(T),
502
+ expand: A,
503
+ collapse: j,
504
+ groupExpand: M,
505
+ groupCollapse: N
506
+ })), () => [D(v(O(m)), 1)])], 8, Nt)], 10, jt));
507
+ }
508
+ });
509
+ ({
510
+ ...X,
511
+ ...Et
512
+ });
513
+ function Ft(e, t = K.local, n) {
514
+ let r = L();
515
+ n && (r.value = n);
516
+ let i;
517
+ return o(() => {
518
+ e && S(e, (e, n) => {
519
+ let a = O(t) === K.session ? sessionStorage : localStorage;
520
+ if (n && n !== e && a.removeItem(n), e) {
521
+ i = xe(e, i?.value ?? r.value, a), i.value && (r.value = i.value);
522
+ return;
523
+ }
524
+ i = void 0;
525
+ }, { immediate: !0 }), A(t) && S(t, (t, n) => {
526
+ if (e?.value) {
527
+ if (t) {
528
+ let n = t === K.session ? sessionStorage : localStorage;
529
+ i = xe(e.value, i?.value ?? r.value, n);
530
+ }
531
+ n && n !== t && (n === K.session ? sessionStorage : localStorage).removeItem(e.value);
532
+ }
533
+ });
534
+ }), S(r, (e) => {
535
+ i && (i.value = e);
536
+ }, {
537
+ deep: !0,
538
+ immediate: !0
539
+ }), r;
540
+ }
541
+ function It(e, t) {
542
+ h(e, t);
543
+ }
544
+ var Lt = [
545
+ "click",
546
+ "mouseover",
547
+ "mouseleave"
548
+ ];
549
+ function Rt() {
550
+ return F(Ve, void 0);
551
+ }
552
+ function zt() {
553
+ return F(Ke, {});
554
+ }
555
+ function Bt() {
556
+ return F(qe, {});
557
+ }
558
+ function Vt() {
559
+ return F(Je, {});
560
+ }
561
+ var Ht = /* @__PURE__ */ r({
562
+ name: "VvAction",
563
+ props: wt,
564
+ emits: Lt,
565
+ setup(t, { expose: r, emit: i }) {
566
+ let a = t, o = i, s = oe(), d = Rt(), f = L(null);
567
+ r({ $el: f });
568
+ let { reference: p, bus: m, aria: h, expanded: g } = zt();
569
+ S(() => f.value, (e) => {
570
+ p && (p.value = e);
571
+ });
572
+ let _ = I(() => a.pressed || g?.value), { role: y } = Vt(), x = I(() => {
573
+ switch (!0) {
574
+ case a.disabled: return J.button;
575
+ case a.to !== void 0: return d?.nuxt ? b(J.nuxtLink) : J.routerLink;
576
+ case a.href !== void 0: return J.a;
577
+ default: return a.defaultTag;
578
+ }
579
+ }), C = I(() => {
580
+ let e = {
581
+ ...h?.value,
582
+ ariaPressed: _.value ? !0 : void 0,
583
+ ariaLabel: a.ariaLabel,
584
+ role: y?.value
585
+ };
586
+ switch (x.value) {
587
+ case J.a: return {
588
+ ...e,
589
+ href: a.href,
590
+ target: a.target,
591
+ rel: a.rel
592
+ };
593
+ case J.routerLink:
594
+ case J.nuxtLink: return {
595
+ ...e,
596
+ to: a.to,
597
+ target: a.target
598
+ };
599
+ case J.button: return {
600
+ ...e,
601
+ type: a.type,
602
+ disabled: a.disabled
603
+ };
604
+ default: return e;
605
+ }
606
+ });
607
+ function w(e) {
608
+ if (a.disabled) {
609
+ e.preventDefault();
610
+ return;
611
+ }
612
+ if (s?.vnode.props?.onClick) {
613
+ o("click", e);
614
+ return;
615
+ }
616
+ m?.emit("click", e);
617
+ }
618
+ function T(e) {
619
+ if (s?.vnode.props?.onMouseover) {
620
+ o("mouseover", e);
621
+ return;
622
+ }
623
+ m?.emit("mouseover", e);
624
+ }
625
+ function E(e) {
626
+ if (s?.vnode.props?.onMouseleave) {
627
+ o("mouseleave", e);
628
+ return;
629
+ }
630
+ m?.emit("mouseleave", e);
631
+ }
632
+ return (t, r) => (l(), N(c(O(x)), u(O(C), {
633
+ ref_key: "rootEl",
634
+ ref: f,
635
+ class: {
636
+ active: t.active,
637
+ pressed: O(_),
638
+ disabled: t.disabled,
639
+ current: t.current
640
+ },
641
+ onClickPassive: w,
642
+ onMouseoverPassive: T,
643
+ onMouseleavePassive: E
644
+ }), {
645
+ default: e(() => [n(t.$slots, "default", {}, () => [D(v(t.label), 1)])]),
646
+ _: 3
647
+ }, 16, ["class"]));
648
+ }
649
+ });
650
+ function Ut() {
651
+ return F(Ye, {});
652
+ }
653
+ function Wt(e) {
654
+ return I(() => String(e?.value || s()));
655
+ }
656
+ function Gt(e, t) {
657
+ let n = I(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = I(() => t?.value === Fe.before ? n.value : void 0), i = I(() => t?.value === Fe.after ? n.value : void 0);
658
+ return {
659
+ hasIcon: n,
660
+ hasIconLeft: I(() => t?.value === q.left ? n.value : void 0),
661
+ hasIconRight: I(() => t?.value === q.right ? n.value : void 0),
662
+ hasIconTop: I(() => t?.value === q.top ? n.value : void 0),
663
+ hasIconBottom: I(() => t?.value === q.bottom ? n.value : void 0),
664
+ hasIconBefore: r,
665
+ hasIconAfter: i
666
+ };
667
+ }
668
+ var Kt = {
669
+ ...gt,
670
+ ...ft,
671
+ modifiers: {
672
+ type: [String, Array],
673
+ default: void 0
674
+ },
675
+ dismissable: {
676
+ type: Boolean,
677
+ default: !1
678
+ },
679
+ autoClose: {
680
+ type: Number,
681
+ default: 0
682
+ },
683
+ closeLabel: {
684
+ type: String,
685
+ default: "Close"
686
+ },
687
+ title: {
688
+ type: String,
689
+ default: void 0
690
+ },
691
+ content: {
692
+ type: String,
693
+ default: void 0
694
+ },
695
+ footer: {
696
+ type: String,
697
+ default: void 0
698
+ },
699
+ role: {
700
+ type: String,
701
+ default: Be.alert
702
+ }
703
+ }, qt = ["close"];
704
+ function Jt(e, t) {
705
+ let { bus: n } = Ut(), r = Wt(I(() => e.id)), i = I(() => `${r.value}-title`), a, o = () => {
706
+ a && clearTimeout(a), t("close", r.value), n?.emit("close", r.value);
707
+ };
708
+ S(() => e.autoClose, (e) => {
709
+ if (e > 0) {
710
+ a = setTimeout(o, e);
711
+ return;
712
+ }
713
+ a && clearTimeout(a);
714
+ }, { immediate: !0 }), p(() => {
715
+ a && clearTimeout(a);
716
+ });
717
+ let s = L(!1), c = () => {
718
+ s.value = !0, a && clearTimeout(a);
719
+ }, l = () => {
720
+ s.value = !1, e.autoClose > 0 && (a = setTimeout(o, e.autoClose));
721
+ }, { hasIcon: u } = Gt(I(() => e.icon)), d = Z("vv-alert", I(() => e.modifiers), I(() => ({
722
+ dismissable: e.autoClose > 0 || e.dismissable,
723
+ "auto-close": e.autoClose > 0,
724
+ hover: s.value
725
+ }))), f = I(() => ({ "--alert-duration": `${e.autoClose}ms` }));
726
+ return {
727
+ close: o,
728
+ hasIcon: u,
729
+ hasTitleId: i,
730
+ hasProps: I(() => ({
731
+ onMouseover: c,
732
+ onMouseleave: l,
733
+ class: d.value,
734
+ style: f.value,
735
+ role: e.role,
736
+ "aria-labelledby": i.value
737
+ }))
738
+ };
739
+ }
740
+ var Q = /* @__PURE__ */ r({
741
+ name: "VvIcon",
742
+ props: /* @__PURE__ */ t({
743
+ name: {},
744
+ color: {},
745
+ width: {},
746
+ height: {},
747
+ provider: {},
748
+ prefix: {},
749
+ src: {},
750
+ horizontalFlip: { type: Boolean },
751
+ verticalFlip: { type: Boolean },
752
+ flip: {},
753
+ mode: {},
754
+ inline: { type: Boolean },
755
+ rotate: {},
756
+ onLoad: { type: Function },
757
+ svg: {},
758
+ modifiers: {}
759
+ }, Me),
760
+ setup(e) {
761
+ let t = e, n = I(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r = L(!0), i = Rt(), { modifiers: a } = B(t), o = Z("vv-icon", a), s = I(() => t.provider || i?.iconsProvider), c = I(() => {
762
+ let e = t.name ?? "", n = `@${s.value}:${t.prefix}:${e}`;
763
+ if (V(n)) return n;
764
+ let r = i?.iconsCollections.find((t) => {
765
+ let n = `@${s.value}:${t.prefix}:${e}`;
766
+ return V(n);
767
+ });
768
+ return r ? `@${s.value}:${r.prefix}:${e}` : e;
769
+ });
770
+ function d(e) {
771
+ return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(e, "text/html").querySelector("svg");
772
+ }
773
+ function f(e) {
774
+ let n = d(e), r = n?.innerHTML.trim() || "";
775
+ n && r && pe(`@${s.value}:${t.prefix}:${t.name}`, {
776
+ body: r,
777
+ height: n.viewBox.baseVal.height,
778
+ width: n.viewBox.baseVal.width
779
+ });
780
+ }
781
+ return i && t.src && !V(`@${s.value}:${t.prefix}:${t.name}`) && (r.value = !1, i.fetchIcon(t.src).then((e) => {
782
+ e && f(e), r.value = !0;
783
+ }).catch((e) => {
784
+ throw r.value = !0, /* @__PURE__ */ Error(`Error during fetch icon: ${e?.message}`);
785
+ })), t.svg && f(t.svg), (t, i) => O(r) ? (l(), N(O(me), u({
786
+ key: 0,
787
+ class: O(o)
788
+ }, {
789
+ inline: e.inline,
790
+ width: e.width,
791
+ height: e.height,
792
+ horizontalFlip: e.horizontalFlip,
793
+ verticalFlip: e.verticalFlip,
794
+ flip: e.flip,
795
+ rotate: O(n),
796
+ color: e.color,
797
+ icon: O(c)
798
+ }, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : w("v-if", !0);
799
+ }
800
+ }), Yt = {
801
+ key: 0,
802
+ class: "vv-alert__header"
803
+ }, Xt = ["id"], Zt = ["aria-label"], Qt = {
804
+ key: 1,
805
+ class: "vv-alert__content"
806
+ }, $t = {
807
+ key: 2,
808
+ class: "vv-alert__footer"
809
+ }, en = /* @__PURE__ */ r({
810
+ name: "VvAlert",
811
+ props: Kt,
812
+ emits: qt,
813
+ setup(e, { expose: t, emit: r }) {
814
+ let { hasProps: a, hasTitleId: o, hasIcon: s, close: c } = Jt(e, r);
815
+ return t({ close: c }), (e, t) => (l(), z("div", i(_(O(a))), [
816
+ e.$slots.header || e.$slots.title || e.$slots.close || e.$slots["title::before"] || e.$slots["title::after"] || e.title || O(s) || e.dismissable || e.autoClose ? (l(), z("div", Yt, [
817
+ O(s) ? (l(), N(Q, u({ key: 0 }, O(s), { class: "vv-alert__icon" }), null, 16)) : w("v-if", !0),
818
+ n(e.$slots, "header", {}, () => [
819
+ n(e.$slots, "title::before"),
820
+ e.$slots.title || e.title ? (l(), z("strong", {
821
+ key: 0,
822
+ id: O(o),
823
+ class: "vv-alert__title"
824
+ }, [n(e.$slots, "title", {}, () => [D(v(e.title), 1)])], 8, Xt)) : w("v-if", !0),
825
+ n(e.$slots, "title::after")
826
+ ]),
827
+ n(e.$slots, "close", i(_({ close: O(c) })), () => [e.dismissable || e.autoClose ? (l(), z("button", {
828
+ key: 0,
829
+ class: "vv-alert__close",
830
+ type: "button",
831
+ "aria-label": e.closeLabel,
832
+ onClick: t[0] ||= ie((...e) => O(c) && O(c)(...e), ["stop"])
833
+ }, [...t[1] ||= [P("div", { class: "vv-alert__close-mask" }, null, -1)]], 8, Zt)) : w("v-if", !0)])
834
+ ])) : w("v-if", !0),
835
+ e.$slots.default || e.content ? (l(), z("div", Qt, [n(e.$slots, "default", {}, () => [D(v(e.content), 1)])])) : w("v-if", !0),
836
+ e.$slots.footer || e.footer ? (l(), z("div", $t, [n(e.$slots, "footer", {}, () => [D(v(e.footer), 1)])])) : w("v-if", !0)
837
+ ], 16));
838
+ }
839
+ });
840
+ ({ ...X });
841
+ var tn = {
842
+ ...X,
843
+ imgSrc: String
844
+ }, nn = ["role", "aria-label"], rn = ["src"], an = /* @__PURE__ */ r({
845
+ name: "VvAvatar",
846
+ props: tn,
847
+ setup(e) {
848
+ let { modifiers: t } = B(e), r = Z("vv-avatar", t);
849
+ return (e, t) => (l(), z("span", {
850
+ class: g(O(r)),
851
+ role: e.imgSrc ? void 0 : "img",
852
+ "aria-label": e.imgSrc ? void 0 : "avatar"
853
+ }, [n(e.$slots, "default", {}, () => [e.imgSrc ? (l(), z("img", {
854
+ key: 0,
855
+ src: e.imgSrc,
856
+ alt: "avatar"
857
+ }, null, 8, rn)) : w("v-if", !0)])], 10, nn));
858
+ }
859
+ });
860
+ ({ ...X }), { ...X }, { ...X };
861
+ var on = ["update:modelValue"], sn = {
862
+ ...wt,
863
+ ...gt,
864
+ ...X,
865
+ ...ht,
866
+ ...$e,
867
+ ...ft,
868
+ iconPosition: {
869
+ type: String,
870
+ default: q.left,
871
+ validator: (e) => Object.values(q).includes(e)
872
+ },
873
+ loadingIcon: {
874
+ type: String,
875
+ default: "eos-icons:bubble-loading"
876
+ },
877
+ toggle: {
878
+ type: Boolean,
879
+ default: !1
880
+ },
881
+ value: {
882
+ type: [
883
+ String,
884
+ Number,
885
+ Boolean
886
+ ],
887
+ default: void 0
888
+ },
889
+ uncheckedValue: {
890
+ type: [
891
+ String,
892
+ Number,
893
+ Boolean
894
+ ],
895
+ default: void 0
896
+ },
897
+ modelValue: {
898
+ type: [
899
+ String,
900
+ Number,
901
+ Boolean
902
+ ],
903
+ default: void 0
904
+ }
905
+ };
906
+ function cn(e, t) {
907
+ let { group: n, isInGroup: r, getGroupOrLocalRef: i } = Dt(He), { id: a, iconPosition: o, icon: s, label: c, pressed: l } = B(e);
908
+ return {
909
+ group: n,
910
+ isInGroup: r,
911
+ modelValue: i("modelValue", e, t),
912
+ toggle: i("toggle", e),
913
+ unselectable: i("unselectable", e),
914
+ multiple: I(() => n?.multiple.value ?? !1),
915
+ modifiers: I(() => {
916
+ let t = e.modifiers, r = n?.modifiers.value, i = /* @__PURE__ */ new Set();
917
+ return t && (Array.isArray(t) || (t = t.split(" ")), t.forEach((e) => i.add(e))), r && (Array.isArray(r) || (r = r.split(" ")), r.forEach((e) => i.add(e))), [...i];
918
+ }),
919
+ disabled: I(() => !!(e.disabled || n?.disabled.value)),
920
+ id: a,
921
+ pressed: l,
922
+ iconPosition: o,
923
+ icon: s,
924
+ label: c
925
+ };
926
+ }
927
+ function ln(e, t, n) {
928
+ return n ? pn(e, n) === pn(t, n) : fn(e, t);
929
+ }
930
+ function un(e, t) {
931
+ if (e.length !== t.length) return !1;
932
+ for (let n = e.length; n-- !== 0;) if (!fn(e[n], t[n])) return !1;
933
+ return !0;
934
+ }
935
+ function dn(e, t) {
936
+ let n = Object.keys(e), { length: r } = n;
937
+ if (r !== Object.keys(t).length) return !1;
938
+ for (let e = r; e-- !== 0;) if (!Object.hasOwn(t, n[e])) return !1;
939
+ for (let i = r; i-- !== 0;) {
940
+ let r = n[i];
941
+ if (!fn(e[r], t[r])) return !1;
942
+ }
943
+ return !0;
944
+ }
945
+ function fn(e, t) {
946
+ if (e === t) return !0;
947
+ if (!e || !t || typeof e != "object" || typeof t != "object") return Number.isNaN(e) && Number.isNaN(t);
948
+ let n = Array.isArray(e), r = Array.isArray(t);
949
+ if (n !== r) return !1;
950
+ if (n && r) return un(e, t);
951
+ let i = e instanceof Date, a = t instanceof Date;
952
+ if (i !== a) return !1;
953
+ if (i && a) return e.getTime() === t.getTime();
954
+ let o = e instanceof RegExp, s = t instanceof RegExp;
955
+ return o === s ? o && s ? e.toString() === t.toString() : dn(e, t) : !1;
956
+ }
957
+ function pn(e, t) {
958
+ if (e && Object.keys(e).length && t) {
959
+ if (!t.includes(".")) return e[t];
960
+ let n = t.split("."), r = e;
961
+ for (let e = 0, t = n.length; e < t; ++e) {
962
+ if (r == null) return null;
963
+ r = r[n[e]];
964
+ }
965
+ return r;
966
+ }
967
+ return null;
968
+ }
969
+ function mn(e, t) {
970
+ if (e != null && t?.length) {
971
+ for (let n of t) if (ln(e, n)) return !0;
972
+ }
973
+ return !1;
974
+ }
975
+ function hn(e) {
976
+ return ((e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0)(O(e));
977
+ }
978
+ function gn(e) {
979
+ return typeof e == "string";
980
+ }
981
+ var _n = {
982
+ key: 1,
983
+ class: "vv-button__label"
984
+ }, vn = {
985
+ key: 1,
986
+ class: "vv-button__label"
987
+ }, yn = /* @__PURE__ */ r({
988
+ name: "VvButton",
989
+ inheritAttrs: !1,
990
+ props: sn,
991
+ emits: on,
992
+ setup(t, { expose: r, emit: i }) {
993
+ let a = t, o = i, s = x(), c = ne(), { id: d, modifiers: f, iconPosition: p, icon: m, label: h, modelValue: g, disabled: _, toggle: y, unselectable: b } = cn(a, o), S = Wt(d), C = I(() => s?.name || S.value), T = L(null);
994
+ r({ $el: I(() => T.value?.$el) });
995
+ let E = I(() => y.value ? Array.isArray(g.value) ? mn(C.value, g.value) : ln(C.value, g.value) : a.pressed), k = Z("vv-button", f, I(() => ({
996
+ reverse: [q.right, q.bottom].includes(p.value),
997
+ column: [q.top, q.bottom].includes(p.value),
998
+ "icon-only": !!(m?.value && !h?.value && !c.default)
999
+ }))), { hasIcon: A } = Gt(m), M = I(() => a.value === void 0 ? C.value : a.value), P = I(() => {
1000
+ if (y.value) return { onClick: ee };
1001
+ });
1002
+ function ee() {
1003
+ if (y.value) {
1004
+ if (Array.isArray(g.value)) {
1005
+ if (mn(M.value, g.value)) {
1006
+ b.value && (g.value = g.value.filter((e) => e !== M.value));
1007
+ return;
1008
+ }
1009
+ g.value.push(M.value);
1010
+ return;
1011
+ }
1012
+ if (M.value === g.value && b.value) {
1013
+ g.value = a.uncheckedValue;
1014
+ return;
1015
+ }
1016
+ g.value = M.value;
1017
+ }
1018
+ }
1019
+ return (t, r) => (l(), N(Ht, u({
1020
+ ...O(s),
1021
+ ...O(P),
1022
+ disabled: O(_),
1023
+ pressed: O(E),
1024
+ active: t.active,
1025
+ type: t.type,
1026
+ to: t.to,
1027
+ href: t.href,
1028
+ target: t.target,
1029
+ rel: t.rel,
1030
+ ariaLabel: t.ariaLabel
1031
+ }, {
1032
+ id: O(S),
1033
+ ref_key: "rootEl",
1034
+ ref: T,
1035
+ class: O(k)
1036
+ }), {
1037
+ default: e(() => [n(t.$slots, "default", {}, () => [t.loading ? n(t.$slots, "loading", {}, () => [t.loadingIcon ? (l(), N(Q, {
1038
+ key: 0,
1039
+ class: "vv-button__loading-icon",
1040
+ name: t.loadingIcon
1041
+ }, null, 8, ["name"])) : w("v-if", !0), t.loadingLabel ? (l(), z("span", _n, v(t.loadingLabel), 1)) : w("v-if", !0)], void 0, 0) : (l(), z(j, { key: 1 }, [
1042
+ n(t.$slots, "before"),
1043
+ O(A) ? (l(), N(Q, u({ key: 0 }, O(A), { class: "vv-button__icon" }), null, 16)) : w("v-if", !0),
1044
+ O(h) ? (l(), z("span", vn, [n(t.$slots, "label", {}, () => [D(v(O(h)), 1)])])) : w("v-if", !0),
1045
+ n(t.$slots, "after")
1046
+ ], 64))])]),
1047
+ _: 3
1048
+ }, 16, ["id", "class"]));
1049
+ }
1050
+ }), bn = {
1051
+ ...X,
1052
+ ...Y,
1053
+ ...ht,
1054
+ legendLabel: { type: String },
1055
+ itemModifiers: {
1056
+ type: [String, Array],
1057
+ default: ""
1058
+ },
1059
+ toggle: {
1060
+ type: Boolean,
1061
+ default: !1
1062
+ },
1063
+ multiple: {
1064
+ type: Boolean,
1065
+ default: !1
1066
+ },
1067
+ modelValue: {
1068
+ type: [
1069
+ String,
1070
+ Number,
1071
+ Boolean,
1072
+ Array
1073
+ ],
1074
+ default: void 0
1075
+ }
1076
+ }, xn = ["update:modelValue"], Sn = {
1077
+ key: 0,
1078
+ class: "vv-button-group__legend"
1079
+ }, Cn = /* @__PURE__ */ r({
1080
+ name: "VvButtonGroup",
1081
+ props: bn,
1082
+ emits: xn,
1083
+ setup(e, { emit: t }) {
1084
+ let r = e, i = t, { disabled: a, toggle: o, modifiers: s, multiple: c, unselectable: u, itemModifiers: d } = B(r);
1085
+ C(() => {
1086
+ typeof r.modelValue == "string" && c.value && console.warn("[VvButtonGroup]: modelValue is a string but multiple is true.");
1087
+ }), It(He, {
1088
+ modelValue: I({
1089
+ get: () => c.value ? r.modelValue : Array.isArray(r.modelValue) ? r.modelValue[0] : r.modelValue,
1090
+ set: (e) => e !== void 0 && (Array.isArray(r.modelValue) || c.value) && !Array.isArray(e) ? i("update:modelValue", [e]) : i("update:modelValue", e)
1091
+ }),
1092
+ disabled: a,
1093
+ toggle: o,
1094
+ multiple: c,
1095
+ unselectable: u,
1096
+ modifiers: d
1097
+ });
1098
+ let f = Z("vv-button-group", s);
1099
+ return (e, t) => (l(), z("fieldset", {
1100
+ class: g(O(f)),
1101
+ role: "group"
1102
+ }, [e.$slots.legend || e.legendLabel ? (l(), z("legend", Sn, [n(e.$slots, "legend", {}, () => [D(v(e.legendLabel), 1)])])) : w("v-if", !0), n(e.$slots, "default")], 2));
1103
+ }
1104
+ });
1105
+ ({ ...X });
1106
+ var wn = {
1107
+ ...St,
1108
+ ...X,
1109
+ indeterminate: Boolean,
1110
+ uncheckedValue: [
1111
+ String,
1112
+ Number,
1113
+ Boolean
1114
+ ],
1115
+ switch: Boolean
1116
+ }, Tn = [
1117
+ "click",
1118
+ "update:modelValue",
1119
+ "change",
1120
+ "blur"
1121
+ ];
1122
+ function En(e, t) {
1123
+ let { group: n, isInGroup: r, getGroupOrLocalRef: i } = Dt(We), { id: a, switch: o, indeterminate: s } = B(e);
1124
+ return {
1125
+ id: a,
1126
+ propsSwitch: o,
1127
+ indeterminate: s,
1128
+ group: n,
1129
+ isInGroup: r,
1130
+ modelValue: i("modelValue", e, t),
1131
+ valid: i("valid", e),
1132
+ invalid: i("invalid", e),
1133
+ readonly: I(() => !!(e.readonly || n?.readonly.value)),
1134
+ disabled: I(() => !!(e.disabled || n?.disabled.value))
1135
+ };
1136
+ }
1137
+ function Dn(e) {
1138
+ return Array.isArray(e) ? e.filter((e) => gn(e)).join(" ") : e;
1139
+ }
1140
+ function On(e, t) {
1141
+ let n = I(() => A(e) ? e.value : e), i = I(() => Dn(n.value.invalidLabel)), o = I(() => Dn(n.value.validLabel)), s = I(() => n.value.loadingLabel), c = I(() => n.value.hintLabel), l = I(() => !!(n.value.loading && (t.loading || s.value))), u = I(() => !l.value && !!(n.value.invalid && (t.invalid || i.value))), d = I(() => !l.value && !u.value && !!(n.value.valid && (t.valid || o.value))), f = I(() => !l.value && !u.value && !d.value && !!(t.hint || c.value)), p = I(() => u.value || d.value || l.value || f.value);
1142
+ return {
1143
+ hasInvalidLabelOrSlot: u,
1144
+ hasHintLabelOrSlot: f,
1145
+ hasValidLabelOrSlot: d,
1146
+ hasLoadingLabelOrSlot: l,
1147
+ hintSlotScope: I(() => ({
1148
+ modelValue: n.value.modelValue,
1149
+ valid: n.value.valid,
1150
+ invalid: n.value.invalid,
1151
+ loading: n.value.loading
1152
+ })),
1153
+ HintSlot: r({
1154
+ name: "HintSlot",
1155
+ props: { tag: {
1156
+ type: String,
1157
+ default: "small"
1158
+ } },
1159
+ setup() {
1160
+ return {
1161
+ isVisible: p,
1162
+ invalidLabel: i,
1163
+ validLabel: o,
1164
+ loadingLabel: s,
1165
+ hintLabel: c,
1166
+ hasInvalidLabelOrSlot: u,
1167
+ hasValidLabelOrSlot: d,
1168
+ hasLoadingLabelOrSlot: l,
1169
+ hasHintLabelOrSlot: f
1170
+ };
1171
+ },
1172
+ render() {
1173
+ if (this.isVisible) {
1174
+ let e;
1175
+ return this.hasInvalidLabelOrSlot && (e = "alert"), this.hasValidLabelOrSlot && (e = "status"), this.hasLoadingLabelOrSlot ? a(this.tag, { role: e }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? a(this.tag, { role: e }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? a(this.tag, { role: e }, this.$slots.valid?.() ?? this.validLabel) : a(this.tag, { role: e }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
1176
+ }
1177
+ return null;
1178
+ }
1179
+ })
1180
+ };
1181
+ }
1182
+ function kn(e, t, n) {
1183
+ let r = t;
1184
+ if (Array.isArray(e) && e.length) {
1185
+ let i = e[0];
1186
+ i() === t && (r = n);
1187
+ }
1188
+ if (typeof e == "function" && e() === t && (r = n), typeof e == "object") {
1189
+ let i = e.default;
1190
+ typeof i == "function" && (i = i()), (typeof i == "object" ? JSON.stringify(i) === JSON.stringify(t) : i === t) && (r = n);
1191
+ }
1192
+ return r;
1193
+ }
1194
+ function An(e, t, n) {
1195
+ let r = Rt(), i = I(() => {
1196
+ if (r?.defaults.value?.[e]) return r.defaults.value[e];
1197
+ });
1198
+ return I(() => {
1199
+ if (i.value === void 0) return n;
1200
+ let e = i.value, r = t, a = n;
1201
+ return Object.keys(r).reduce((t, n) => {
1202
+ let i = a[n];
1203
+ return t[n] = n in e ? kn(r[n], i, e[n]) : i, t;
1204
+ }, {});
1205
+ });
1206
+ }
1207
+ var jn = ["for"], Mn = [
1208
+ "id",
1209
+ "name",
1210
+ "disabled",
1211
+ "value",
1212
+ "tabindex",
1213
+ "aria-invalid",
1214
+ "aria-describedby",
1215
+ "aria-errormessage"
1216
+ ], Nn = /* @__PURE__ */ r({
1217
+ name: "VvCheckbox",
1218
+ props: wn,
1219
+ emits: Tn,
1220
+ setup(t, { emit: r }) {
1221
+ let a = t, s = r, c = ne(), u = An("VvCheckbox", wn, a), { id: d, disabled: f, readonly: p, valid: m, invalid: h, propsSwitch: y, modelValue: b, indeterminate: x, isInGroup: w } = En(a, s), T = Wt(d), E = I(() => `${T.value}-hint`), k = I(() => te.value ? -1 : a.tabindex), j = L(), N = I(() => a.uncheckedValue !== void 0 && !w.value), te = I(() => f.value || p.value), F = I(() => {
1222
+ if (h.value === !0) return !0;
1223
+ if (m.value === !0) return !1;
1224
+ }), re = I(() => N.value ? b.value === a.value : Array.isArray(b.value) ? mn(a.value, b.value) : ln(a.value, b.value)), R = I(() => !!(x.value || !re.value && N.value && a.uncheckedValue !== b.value)), ie = I(() => {
1225
+ if (!N.value) return ![
1226
+ "string",
1227
+ "number",
1228
+ "boolean"
1229
+ ].includes(typeof a.value) || a.value;
1230
+ }), ae = I({
1231
+ get() {
1232
+ return re.value;
1233
+ },
1234
+ set(e) {
1235
+ if (N.value) b.value = e ? a.value : a.uncheckedValue;
1236
+ else if (Array.isArray(b.value) || w.value) {
1237
+ let t = b.value ?? [], n = new Set(Array.isArray(t) ? t : [t]);
1238
+ e ? n.add(a.value) : n.delete(a.value), b.value = [...n];
1239
+ } else b.value = e ? a.value : void 0;
1240
+ s("change", e);
1241
+ }
1242
+ }), { modifiers: oe } = B(a), se = Z("vv-checkbox", oe, I(() => ({
1243
+ switch: y.value,
1244
+ valid: m.value,
1245
+ invalid: h.value,
1246
+ disabled: f.value,
1247
+ readonly: p.value,
1248
+ indeterminate: x.value
1249
+ })));
1250
+ C(() => {
1251
+ N.value && Array.isArray(b.value) && console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.");
1252
+ }), S(() => R.value, (e) => {
1253
+ e ? j.value.indeterminate = !0 : j.value.indeterminate = !1;
1254
+ }), o(() => {
1255
+ R.value && (j.value.indeterminate = !0);
1256
+ });
1257
+ let { HintSlot: le, hasHintLabelOrSlot: de, hasInvalidLabelOrSlot: fe, hintSlotScope: V } = On(u, c);
1258
+ return (t, r) => (l(), z("label", {
1259
+ class: g(O(se)),
1260
+ for: O(T)
1261
+ }, [
1262
+ M(P("input", {
1263
+ id: O(T),
1264
+ ref_key: "input",
1265
+ ref: j,
1266
+ "onUpdate:modelValue": r[0] ||= (e) => A(ae) ? ae.value = e : null,
1267
+ type: "checkbox",
1268
+ class: "vv-checkbox__input",
1269
+ name: t.name,
1270
+ disabled: O(te),
1271
+ value: O(ie),
1272
+ tabindex: O(k),
1273
+ "aria-invalid": O(F),
1274
+ "aria-describedby": O(de) ? O(E) : void 0,
1275
+ "aria-errormessage": O(fe) ? O(E) : void 0
1276
+ }, null, 8, Mn), [[ee, O(ae)]]),
1277
+ n(t.$slots, "default", { value: O(b) }, () => [D(v(t.label), 1)]),
1278
+ ce(O(le), {
1279
+ id: O(E),
1280
+ class: "vv-checkbox__hint"
1281
+ }, ue({ _: 2 }, [
1282
+ t.$slots.hint ? {
1283
+ name: "hint",
1284
+ fn: e(() => [n(t.$slots, "hint", i(_(O(V))))]),
1285
+ key: "0"
1286
+ } : void 0,
1287
+ t.$slots.loading ? {
1288
+ name: "loading",
1289
+ fn: e(() => [n(t.$slots, "loading", i(_(O(V))))]),
1290
+ key: "1"
1291
+ } : void 0,
1292
+ t.$slots.valid ? {
1293
+ name: "valid",
1294
+ fn: e(() => [n(t.$slots, "valid", i(_(O(V))))]),
1295
+ key: "2"
1296
+ } : void 0,
1297
+ t.$slots.invalid ? {
1298
+ name: "invalid",
1299
+ fn: e(() => [n(t.$slots, "invalid", i(_(O(V))))]),
1300
+ key: "3"
1301
+ } : void 0
1302
+ ]), 1032, ["id"])
1303
+ ], 10, jn));
1304
+ }
1305
+ }), Pn = ["update:modelValue", "change"];
1306
+ function Fn(e) {
1307
+ let { options: t, labelKey: n, valueKey: r, disabledKey: i } = B(e);
1308
+ return {
1309
+ options: t,
1310
+ getOptionLabel: (e) => typeof e == "string" ? e : typeof n.value == "function" ? n.value(e) : String(n.value ? Ae(e, n.value) : e),
1311
+ getOptionValue: (e) => typeof e == "string" ? e : typeof r.value == "function" ? r.value(e) : r.value ? Ae(e, r.value) : e,
1312
+ isOptionDisabled: (e) => typeof e == "string" ? !1 : typeof i.value == "function" ? i.value(e) : i.value ? !!Ae(e, i.value) : !1,
1313
+ getOptionGrouped: (e) => typeof e == "string" ? [] : typeof e == "object" && e && "options" in e ? e.options : []
1314
+ };
1315
+ }
1316
+ var In = ["textContent"], Ln = { class: "vv-checkbox-group__wrapper" }, Rn = /* @__PURE__ */ r({
1317
+ name: "VvCheckboxGroup",
1318
+ props: Ct,
1319
+ emits: Pn,
1320
+ setup(t, { emit: r }) {
1321
+ let a = t, o = r, s = ne(), c = An("VvCheckboxGroup", Ct, a), d = ve(a, "modelValue", o), { disabled: f, readonly: p, vertical: m, valid: h, invalid: y, modifiers: b } = B(a);
1322
+ It(We, {
1323
+ modelValue: d,
1324
+ disabled: f,
1325
+ readonly: p,
1326
+ valid: h,
1327
+ invalid: y
1328
+ });
1329
+ let { getOptionLabel: x, getOptionValue: S, isOptionDisabled: C } = Fn(a), T = Z("vv-checkbox-group", b, I(() => ({
1330
+ disabled: f.value,
1331
+ readonly: p.value,
1332
+ required: a.required,
1333
+ horizontal: !m.value,
1334
+ valid: h.value,
1335
+ invalid: y.value
1336
+ })));
1337
+ function E(e, t) {
1338
+ return {
1339
+ id: `${a.name}_opt${t}`,
1340
+ name: a.name,
1341
+ label: x(e),
1342
+ value: S(e),
1343
+ required: a.required,
1344
+ disabled: C(e)
1345
+ };
1346
+ }
1347
+ let { HintSlot: D, hintSlotScope: k } = On(c, s);
1348
+ return (t, r) => (l(), z("fieldset", { class: g(O(T)) }, [
1349
+ t.label ? (l(), z("legend", {
1350
+ key: 0,
1351
+ textContent: v(t.label)
1352
+ }, null, 8, In)) : w("v-if", !0),
1353
+ P("div", Ln, [t.options.length > 0 ? (l(!0), z(j, { key: 0 }, fe(t.options, (e, t) => (l(), N(Nn, u({ key: t }, { ref_for: !0 }, E(e, t)), null, 16))), 128)) : n(t.$slots, "default", {}, void 0, void 0, 1)]),
1354
+ ce(O(D), { class: "vv-checkbox-group__hint" }, ue({ _: 2 }, [
1355
+ t.$slots.hint ? {
1356
+ name: "hint",
1357
+ fn: e(() => [n(t.$slots, "hint", i(_(O(k))))]),
1358
+ key: "0"
1359
+ } : void 0,
1360
+ t.$slots.loading ? {
1361
+ name: "loading",
1362
+ fn: e(() => [n(t.$slots, "loading", i(_(O(k))))]),
1363
+ key: "1"
1364
+ } : void 0,
1365
+ t.$slots.valid ? {
1366
+ name: "valid",
1367
+ fn: e(() => [n(t.$slots, "valid", i(_(O(k))))]),
1368
+ key: "2"
1369
+ } : void 0,
1370
+ t.$slots.invalid ? {
1371
+ name: "invalid",
1372
+ fn: e(() => [n(t.$slots, "invalid", i(_(O(k))))]),
1373
+ key: "3"
1374
+ } : void 0
1375
+ ]), 1024)
1376
+ ], 2));
1377
+ }
1378
+ }), zn = {
1379
+ ...vt,
1380
+ ...pt,
1381
+ ...Ze,
1382
+ ...Qe,
1383
+ ...ct,
1384
+ ...$e,
1385
+ ...Y,
1386
+ ...st,
1387
+ ...X,
1388
+ ...lt,
1389
+ ...ft,
1390
+ ...mt,
1391
+ ..._t,
1392
+ ...ot,
1393
+ ...et,
1394
+ ...it,
1395
+ transitionName: {
1396
+ type: String,
1397
+ default: "vv-dropdown--mobile-fade-block"
1398
+ },
1399
+ modelValue: {
1400
+ type: [
1401
+ String,
1402
+ Number,
1403
+ Boolean,
1404
+ Object,
1405
+ Array
1406
+ ],
1407
+ default: void 0
1408
+ },
1409
+ noResultsLabel: {
1410
+ type: String,
1411
+ default: "No results"
1412
+ },
1413
+ noOptionsLabel: {
1414
+ type: String,
1415
+ default: "No options available"
1416
+ },
1417
+ selectedOptionNotFoundLabel: {
1418
+ type: String,
1419
+ default: "Selected option not found"
1420
+ },
1421
+ selectedHintLabel: {
1422
+ type: String,
1423
+ default: "Selected"
1424
+ },
1425
+ deselectActionLabel: {
1426
+ type: String,
1427
+ default: "Deselect"
1428
+ },
1429
+ selectHintLabel: {
1430
+ type: String,
1431
+ default: "Press enter to select"
1432
+ },
1433
+ deselectHintLabel: {
1434
+ type: String,
1435
+ default: "Press enter to remove"
1436
+ },
1437
+ addOptionHintLabel: {
1438
+ type: String,
1439
+ default: "Press enter to add"
1440
+ },
1441
+ closeLabel: {
1442
+ type: String,
1443
+ default: "Close"
1444
+ },
1445
+ placeholder: String,
1446
+ addable: Boolean,
1447
+ searchable: Boolean,
1448
+ keepSearch: Boolean,
1449
+ searchFunction: {
1450
+ type: Function,
1451
+ default: void 0
1452
+ },
1453
+ searchPlaceholder: {
1454
+ type: String,
1455
+ default: "Search..."
1456
+ },
1457
+ debounceSearch: {
1458
+ type: [Number, String],
1459
+ default: 0
1460
+ },
1461
+ multiple: Boolean,
1462
+ minValues: {
1463
+ type: [Number, String],
1464
+ default: 0
1465
+ },
1466
+ maxValues: [Number, String],
1467
+ unselectable: {
1468
+ type: Boolean,
1469
+ default: !0
1470
+ },
1471
+ separator: {
1472
+ type: String,
1473
+ default: ", "
1474
+ },
1475
+ native: Boolean,
1476
+ badges: Boolean,
1477
+ badgeModifiers: {
1478
+ type: [String, Array],
1479
+ default: "action sm"
1480
+ },
1481
+ triggerWidth: {
1482
+ ..._t.triggerWidth,
1483
+ default: !0
1484
+ },
1485
+ dropdownModifiers: {
1486
+ type: [String, Array],
1487
+ default: "mobile"
1488
+ },
1489
+ autoOpen: {
1490
+ type: Boolean,
1491
+ default: !1
1492
+ },
1493
+ autoselectFirst: {
1494
+ type: Boolean,
1495
+ default: !1
1496
+ },
1497
+ keepOpen: {
1498
+ type: Boolean,
1499
+ default: !1
1500
+ },
1501
+ focusOnHover: {
1502
+ type: Boolean,
1503
+ default: !0
1504
+ }
1505
+ };
1506
+ function Bn() {
1507
+ return {
1508
+ ...zn,
1509
+ options: {
1510
+ ...zn.options,
1511
+ type: Array
1512
+ },
1513
+ searchFunction: {
1514
+ ...zn.searchFunction,
1515
+ type: Function
1516
+ }
1517
+ };
1518
+ }
1519
+ var Vn = r({
1520
+ components: { VvIcon: Q },
1521
+ props: {
1522
+ inputType: {
1523
+ type: String,
1524
+ default: "input-text"
1525
+ },
1526
+ disabled: {
1527
+ type: Boolean,
1528
+ default: !1
1529
+ },
1530
+ label: {
1531
+ type: String,
1532
+ default: "Clear"
1533
+ },
1534
+ icon: {
1535
+ type: [String, Object],
1536
+ default: "close"
1537
+ }
1538
+ },
1539
+ emits: ["clear"],
1540
+ setup(e, { emit: t }) {
1541
+ let { hasIcon: n } = Gt(I(() => e.icon));
1542
+ function r(n) {
1543
+ n?.stopPropagation(), e.disabled || t("clear");
1544
+ }
1545
+ return {
1546
+ hasIcon: n,
1547
+ onClick: r
1548
+ };
1549
+ },
1550
+ render() {
1551
+ let e = this.hasIcon ? a(Q, {
1552
+ ...this.hasIcon,
1553
+ class: `vv-${this.inputType}__icon`
1554
+ }) : void 0;
1555
+ return a("button", {
1556
+ disabled: this.disabled,
1557
+ class: `vv-${this.inputType}__action`,
1558
+ ariaLabel: this.label,
1559
+ type: "button",
1560
+ onClick: this.onClick
1561
+ }, e);
1562
+ }
1563
+ }), Hn = {
1564
+ ...gt,
1565
+ ..._t,
1566
+ ...X,
1567
+ modelValue: {
1568
+ type: Boolean,
1569
+ default: void 0
1570
+ },
1571
+ reference: {
1572
+ type: Object,
1573
+ default: null
1574
+ },
1575
+ role: {
1576
+ type: String,
1577
+ default: Re.menu,
1578
+ validator: (e) => Object.values(Re).includes(e)
1579
+ }
1580
+ }, Un = { focusOnHover: {
1581
+ type: Boolean,
1582
+ default: !1
1583
+ } }, Wn = {
1584
+ ...Y,
1585
+ ...tt,
1586
+ ...ht,
1587
+ ...X,
1588
+ deselectHintLabel: { type: String },
1589
+ selectHintLabel: { type: String },
1590
+ selectedHintLabel: { type: String },
1591
+ focusOnHover: {
1592
+ type: Boolean,
1593
+ default: !1
1594
+ }
1595
+ };
1596
+ function Gn(e, t) {
1597
+ let n = globalThis.HTMLElement !== void 0 && "popover" in globalThis.HTMLElement.prototype, r = I(() => n && de(t)), i = I(() => r.value ? "manual" : void 0);
1598
+ function a() {
1599
+ return (n && e.value?.matches(":popover-open")) ?? !1;
1600
+ }
1601
+ function o() {
1602
+ if (!(!r.value || !e.value?.isConnected || a())) try {
1603
+ e.value.showPopover();
1604
+ } catch {}
1605
+ }
1606
+ function s() {
1607
+ if (!(!e.value || !a())) try {
1608
+ e.value.hidePopover();
1609
+ } catch {}
1610
+ }
1611
+ return {
1612
+ isTopLayer: r,
1613
+ popover: i,
1614
+ show: o,
1615
+ hide: s
1616
+ };
1617
+ }
1618
+ function Kn({ reference: e, id: t, expanded: n, aria: i }) {
1619
+ let o = Te();
1620
+ return {
1621
+ bus: o,
1622
+ component: r({
1623
+ name: "VvDropdownTriggerProvider",
1624
+ setup() {
1625
+ h(Ke, {
1626
+ reference: e,
1627
+ id: t,
1628
+ expanded: n,
1629
+ aria: i,
1630
+ bus: o
1631
+ });
1632
+ },
1633
+ render() {
1634
+ return a(j, {}, this.$slots.default?.());
1635
+ }
1636
+ })
1637
+ };
1638
+ }
1639
+ function qn({ role: e, ...t }) {
1640
+ let n = I(() => e.value === Re.listbox ? ze.option : ze.presentation);
1641
+ return h(qe, {
1642
+ role: n,
1643
+ ...t
1644
+ }), { itemRole: n };
1645
+ }
1646
+ function Jn({ expanded: e }) {
1647
+ h(Je, {
1648
+ role: L(Le.menuitem),
1649
+ expanded: e
1650
+ });
1651
+ }
1652
+ var Yn = ["popover"], Xn = [
1653
+ "id",
1654
+ "tabindex",
1655
+ "role",
1656
+ "aria-labelledby"
1657
+ ], Zn = /* @__PURE__ */ r({
1658
+ name: "VvDropdown",
1659
+ inheritAttrs: !1,
1660
+ props: Hn,
1661
+ emits: [
1662
+ "update:modelValue",
1663
+ "beforeEnter",
1664
+ "afterLeave",
1665
+ "beforeExpand",
1666
+ "beforeCollapse",
1667
+ "afterExpand",
1668
+ "afterCollapse",
1669
+ "before-enter",
1670
+ "after-leave",
1671
+ "enter",
1672
+ "afterEnter",
1673
+ "enterCancelled",
1674
+ "beforeLeave",
1675
+ "leave",
1676
+ "leaveCancelled"
1677
+ ],
1678
+ setup(t, { expose: r, emit: a }) {
1679
+ let s = t, c = a, { id: f } = B(s), p = Wt(f), h = x(), v = L("auto"), b = L("auto"), C = L(), T = L(), E = L(), D = L(), A = I({
1680
+ get: () => s.reference ?? C.value,
1681
+ set: (e) => {
1682
+ C.value = e;
1683
+ }
1684
+ }), { isTopLayer: N, popover: ee, show: te, hide: F } = Gn(T, () => s.topLayer), ne = I(() => N.value ? Ne.fixed : s.strategy), re = L(!1);
1685
+ o(() => {
1686
+ ge(T.value, () => {
1687
+ re.value = globalThis.getComputedStyle(T.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
1688
+ }, {
1689
+ attributeFilter: ["style"],
1690
+ window: globalThis.window
1691
+ });
1692
+ });
1693
+ function ie(e, t, n) {
1694
+ return typeof e == "boolean" ? t() : n(e);
1695
+ }
1696
+ let ae = I(() => {
1697
+ let e = [];
1698
+ if (s.autoPlacement ? e.push(ie(s.autoPlacement, () => Oe(), (e) => Oe(e))) : s.flip && e.push(ie(s.flip, () => U({ fallbackStrategy: "initialPlacement" }), (e) => U(e))), s.shift && e.push(ie(s.shift, () => W(), (e) => W(e))), s.size) {
1699
+ let t = ({ availableWidth: e, availableHeight: t }) => {
1700
+ v.value = `${e}px`, b.value = `${t}px`;
1701
+ };
1702
+ e.push(ie(s.size, () => Ce({ apply: t }), (e) => Ce({
1703
+ ...e,
1704
+ apply: t
1705
+ })));
1706
+ }
1707
+ return s.offset && e.push(["string", "number"].includes(typeof s.offset) ? De(Number(s.offset)) : De(s.offset)), s.arrow && e.push(ke({ element: E })), e;
1708
+ }), { x: oe, y: le, middlewareData: ue, placement: de, strategy: fe } = Ee(A, T, {
1709
+ whileElementsMounted: (...e) => we(...e, { animationFrame: ne.value === Ne.fixed }),
1710
+ placement: I(() => s.placement),
1711
+ strategy: ne,
1712
+ middleware: ae
1713
+ }), V = I(() => {
1714
+ if (re.value) return;
1715
+ let e = s.triggerWidth && A.value ? `${A.value?.offsetWidth}px` : void 0;
1716
+ return {
1717
+ position: fe.value,
1718
+ top: `${le.value ?? 0}px`,
1719
+ left: `${oe.value ?? 0}px`,
1720
+ maxWidth: e ? void 0 : v.value,
1721
+ maxHeight: b.value,
1722
+ width: e
1723
+ };
1724
+ }), pe = I(() => de.value.split("-")[0]), me = I(() => {
1725
+ if (re.value) return;
1726
+ let e = {
1727
+ [q.top]: q.bottom,
1728
+ [q.right]: q.left,
1729
+ [q.bottom]: q.top,
1730
+ [q.left]: q.right
1731
+ }[pe.value];
1732
+ return {
1733
+ left: ue.value.arrow?.x === void 0 ? void 0 : `${ue.value.arrow?.x}px`,
1734
+ top: ue.value.arrow?.y === void 0 ? void 0 : `${ue.value.arrow?.y}px`,
1735
+ [e]: `${-(E.value?.offsetWidth ?? 0) / 2}px`
1736
+ };
1737
+ }), he = ve(s, "modelValue", c), xe = L(!1), H = I({
1738
+ get: () => he.value ?? xe.value,
1739
+ set: (e) => {
1740
+ if (he.value === void 0) {
1741
+ xe.value = e;
1742
+ return;
1743
+ }
1744
+ he.value = e;
1745
+ }
1746
+ });
1747
+ m(() => {
1748
+ H.value && te();
1749
+ });
1750
+ function Te() {
1751
+ H.value = !0;
1752
+ }
1753
+ function Ae() {
1754
+ H.value = !1;
1755
+ }
1756
+ function je() {
1757
+ H.value = !H.value;
1758
+ }
1759
+ function G(e) {
1760
+ A.value = e;
1761
+ }
1762
+ ye(T, () => {
1763
+ !s.keepOpen && H.value && (H.value = !1);
1764
+ }, { ignore: [A] });
1765
+ let Me = I(() => A.value?.getAttribute?.("id") ?? void 0), K = I(() => ({
1766
+ "aria-controls": p.value,
1767
+ "aria-haspopup": !0,
1768
+ "aria-expanded": H.value
1769
+ })), { component: Pe, bus: Fe } = Kn({
1770
+ reference: A,
1771
+ id: p,
1772
+ expanded: H,
1773
+ aria: K
1774
+ });
1775
+ Fe.on("click", je);
1776
+ let { role: Ie, modifiers: J } = B(s), Le = Z("vv-dropdown", J, I(() => ({ arrow: s.arrow }))), { focused: Re } = _e(T);
1777
+ function ze(e) {
1778
+ return e ? [...e.querySelectorAll("a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])")].filter((e) => !e.hasAttribute("disabled") && !e.getAttribute("aria-hidden")) : [];
1779
+ }
1780
+ function Be() {
1781
+ d(() => {
1782
+ let e = ze(T.value);
1783
+ e.length > 0 && e[0].focus({ preventScroll: !0 });
1784
+ });
1785
+ }
1786
+ function Ve() {
1787
+ d(() => {
1788
+ let e = ze(D.value);
1789
+ e.length > 0 && e[0].focus({ preventScroll: !0 });
1790
+ });
1791
+ }
1792
+ function He() {
1793
+ d(() => {
1794
+ if (Re.value) {
1795
+ let e = ze(T.value);
1796
+ if (e.length === 0 || !document.activeElement) return;
1797
+ let t = e.indexOf(document.activeElement);
1798
+ t < e.length - 1 ? e[t + 1].focus({ preventScroll: !0 }) : e[0].focus({ preventScroll: !0 });
1799
+ }
1800
+ });
1801
+ }
1802
+ function Ue() {
1803
+ d(() => {
1804
+ if (Re.value) {
1805
+ let e = ze(T.value);
1806
+ if (e.length === 0 || !document.activeElement) return;
1807
+ let t = e.indexOf(document.activeElement);
1808
+ if (t > 0) {
1809
+ e[t - 1].focus({ preventScroll: !0 });
1810
+ return;
1811
+ }
1812
+ e.at(-1)?.focus({ preventScroll: !0 });
1813
+ }
1814
+ });
1815
+ }
1816
+ S(H, (e) => {
1817
+ e && s.autofocusFirst && Be();
1818
+ }), r({
1819
+ toggle: je,
1820
+ show: Te,
1821
+ hide: Ae,
1822
+ init: G,
1823
+ focusFirst: Be,
1824
+ focusFirstListElement: Ve,
1825
+ focusNext: He,
1826
+ focusPrev: Ue,
1827
+ customPosition: re
1828
+ });
1829
+ let { itemRole: We } = qn({
1830
+ role: Ie,
1831
+ expanded: H,
1832
+ focused: Re,
1833
+ hovered: be(T)
1834
+ });
1835
+ Se("Escape", (e) => {
1836
+ H.value && (e.preventDefault(), Ae());
1837
+ }), Se("ArrowDown", (e) => {
1838
+ H.value && Re.value && (e.preventDefault(), He());
1839
+ }), Se("ArrowUp", (e) => {
1840
+ H.value && Re.value && (e.preventDefault(), Ue());
1841
+ }), Se([" ", "Enter"], (e) => {
1842
+ let t = e.target;
1843
+ H.value && Re.value && t && t?.click();
1844
+ });
1845
+ let Ge = {
1846
+ "before-enter": () => {
1847
+ c(H.value ? "beforeExpand" : "beforeCollapse"), c("beforeEnter");
1848
+ },
1849
+ "after-leave": () => {
1850
+ H.value || F(), c(H.value ? "afterExpand" : "afterCollapse"), c("afterLeave");
1851
+ },
1852
+ enter: () => {
1853
+ c("enter");
1854
+ },
1855
+ "after-enter": () => {
1856
+ c("afterEnter");
1857
+ },
1858
+ "enter-cancelled": () => {
1859
+ c("enterCancelled");
1860
+ },
1861
+ "before-leave": () => {
1862
+ c("beforeLeave");
1863
+ },
1864
+ leave: () => {
1865
+ c("leave");
1866
+ },
1867
+ "leave-cancelled": () => {
1868
+ c("leaveCancelled");
1869
+ }
1870
+ };
1871
+ return (t, r) => (l(), z(j, null, [ce(O(Pe), null, {
1872
+ default: e(() => [n(t.$slots, "default", i(_({
1873
+ init: G,
1874
+ show: Te,
1875
+ hide: Ae,
1876
+ toggle: je,
1877
+ expanded: O(H),
1878
+ aria: O(K)
1879
+ })))]),
1880
+ _: 3
1881
+ }), ce(R, u({ name: t.transitionName }, y(Ge), { persisted: "" }), {
1882
+ default: e(() => [M(P("div", {
1883
+ ref_key: "floatingEl",
1884
+ ref: T,
1885
+ popover: O(ee),
1886
+ style: se(O(V)),
1887
+ class: g(O(Le))
1888
+ }, [
1889
+ s.arrow ? (l(), z("div", {
1890
+ key: 0,
1891
+ ref_key: "arrowEl",
1892
+ ref: E,
1893
+ style: se(O(me)),
1894
+ class: "vv-dropdown__arrow"
1895
+ }, null, 4)) : w("v-if", !0),
1896
+ n(t.$slots, "before", i(_({
1897
+ show: Te,
1898
+ hide: Ae,
1899
+ toggle: je,
1900
+ expanded: O(H)
1901
+ }))),
1902
+ P("div", u(O(h), {
1903
+ id: O(p),
1904
+ ref_key: "listEl",
1905
+ ref: D,
1906
+ tabindex: O(H) ? void 0 : -1,
1907
+ role: O(Ie),
1908
+ "aria-labelledby": O(Me),
1909
+ class: "vv-dropdown__list"
1910
+ }), [n(t.$slots, "items", i(_({
1911
+ show: Te,
1912
+ hide: Ae,
1913
+ toggle: je,
1914
+ expanded: O(H),
1915
+ role: O(We)
1916
+ })))], 16, Xn),
1917
+ n(t.$slots, "after", i(_({
1918
+ show: Te,
1919
+ hide: Ae,
1920
+ toggle: je,
1921
+ expanded: O(H)
1922
+ })))
1923
+ ], 14, Yn), [[k, O(H)]])]),
1924
+ _: 3
1925
+ }, 16, ["name"])], 64));
1926
+ }
1927
+ });
1928
+ ({ ...ot });
1929
+ var Qn = /* @__PURE__ */ r({
1930
+ name: "VvDropdownItem",
1931
+ props: Un,
1932
+ setup(e) {
1933
+ let t = e, { role: r, expanded: i } = Bt(), a = L(null);
1934
+ Jn({ expanded: i });
1935
+ let o = be(a), { focused: s } = he(a), { focused: c } = _e(a);
1936
+ return S(o, (e) => {
1937
+ e && t.focusOnHover && (s.value = !0);
1938
+ }), (e, t) => (l(), z("div", u({ role: O(r) }, {
1939
+ ref_key: "element",
1940
+ ref: a,
1941
+ class: ["vv-dropdown__item", { "focus-visible": O(s) || O(c) }]
1942
+ }), [n(e.$slots, "default")], 16));
1943
+ }
1944
+ }), $n = ["title"], er = /* @__PURE__ */ r({
1945
+ name: "VvDropdownOption",
1946
+ props: Wn,
1947
+ setup(t) {
1948
+ let r = t, { modifiers: a } = B(r), o = Z("vv-dropdown-option", a, I(() => ({
1949
+ disabled: r.disabled,
1950
+ selected: r.selected,
1951
+ unselectable: r.unselectable && r.selected
1952
+ }))), s = I(() => r.selected ? r.unselectable ? r.deselectHintLabel : r.selectedHintLabel : r.disabled ? "" : r.selectHintLabel);
1953
+ return (t, r) => (l(), N(Qn, {
1954
+ class: g(O(o)),
1955
+ tabindex: t.disabled ? -1 : 0,
1956
+ "aria-selected": t.selected,
1957
+ "aria-disabled": t.disabled,
1958
+ "focus-on-hover": t.focusOnHover
1959
+ }, {
1960
+ default: e(() => [n(t.$slots, "default"), P("span", {
1961
+ class: "vv-dropdown-option__hint",
1962
+ title: O(s)
1963
+ }, [n(t.$slots, "hint", i(_({
1964
+ disabled: t.disabled,
1965
+ selected: t.selected,
1966
+ unselectable: t.unselectable
1967
+ })), () => [D(v(O(s)), 1)])], 8, $n)]),
1968
+ _: 3
1969
+ }, 8, [
1970
+ "class",
1971
+ "tabindex",
1972
+ "aria-selected",
1973
+ "aria-disabled",
1974
+ "focus-on-hover"
1975
+ ]));
1976
+ }
1977
+ }), tr = {
1978
+ ...vt,
1979
+ ...yt,
1980
+ ...bt,
1981
+ ...pt,
1982
+ ...Ze,
1983
+ ...Qe,
1984
+ ...ct,
1985
+ ...$e,
1986
+ ...Y,
1987
+ ...st,
1988
+ ...X,
1989
+ ...lt,
1990
+ ...ft,
1991
+ ...mt,
1992
+ ...ht,
1993
+ ...ot,
1994
+ ...it,
1995
+ multiple: Boolean,
1996
+ required: Boolean,
1997
+ size: [String, Number],
1998
+ modelValue: {
1999
+ type: [
2000
+ String,
2001
+ Number,
2002
+ Boolean,
2003
+ Object,
2004
+ Array
2005
+ ],
2006
+ default: void 0
2007
+ },
2008
+ autoselectFirst: {
2009
+ type: Boolean,
2010
+ default: !1
2011
+ },
2012
+ placeholder: String
2013
+ };
2014
+ function nr() {
2015
+ return {
2016
+ ...tr,
2017
+ options: {
2018
+ ...tr.options,
2019
+ type: Array,
2020
+ default: () => []
2021
+ }
2022
+ };
2023
+ }
2024
+ function rr(e, t) {
2025
+ let { focused: n } = he(e);
2026
+ return S(n, (n) => {
2027
+ t(n ? "focus" : "blur", O(e));
2028
+ }), { focused: n };
2029
+ }
2030
+ nr(), Bn();
2031
+ var ir = [
2032
+ "open",
2033
+ "close",
2034
+ "update:modelValue",
2035
+ "beforeEnter",
2036
+ "afterLeave",
2037
+ "enter",
2038
+ "afterEnter",
2039
+ "enterCancelled",
2040
+ "beforeLeave",
2041
+ "leave",
2042
+ "leaveCancelled"
2043
+ ], ar = {
2044
+ ...X,
2045
+ ...gt,
2046
+ title: String,
2047
+ modelValue: {
2048
+ type: Boolean,
2049
+ default: void 0
2050
+ },
2051
+ transition: {
2052
+ type: String,
2053
+ default: "fade-block"
2054
+ },
2055
+ size: String,
2056
+ keepOpen: {
2057
+ type: Boolean,
2058
+ default: !1
2059
+ },
2060
+ labelClose: {
2061
+ type: String,
2062
+ default: "Close"
2063
+ }
2064
+ }, or = {
2065
+ key: 0,
2066
+ class: "vv-dialog__header"
2067
+ }, sr = ["aria-label", "title"], cr = { class: "vv-dialog__content" }, lr = {
2068
+ key: 1,
2069
+ class: "vv-dialog__footer"
2070
+ }, ur = /* @__PURE__ */ r({
2071
+ name: "VvDialog",
2072
+ props: ar,
2073
+ emits: ir,
2074
+ setup(t, { expose: r, emit: i }) {
2075
+ let a = t, o = i, s = L(), c = ve(a, "modelValue", o), d = L(!1), f = I({
2076
+ get: () => c.value ?? d.value,
2077
+ set: (e) => {
2078
+ if (c.value === void 0) {
2079
+ d.value = e;
2080
+ return;
2081
+ }
2082
+ c.value = e;
2083
+ }
2084
+ }), p = L(null), { modifiers: m } = B(a), h = Z("vv-dialog", m, I(() => a.size ? { [a.size]: !!a.size } : {})), g = I(() => {
2085
+ let { id: e } = a;
2086
+ return { id: e };
2087
+ }), _ = I(() => `vv-dialog--${a.transition}`), b = {
2088
+ "before-enter": () => {
2089
+ s.value?.open || s.value?.showModal(), o("open"), o("beforeEnter");
2090
+ },
2091
+ "after-leave": () => {
2092
+ s.value?.open && s.value?.close(), o("close"), o("afterLeave");
2093
+ },
2094
+ enter: () => {
2095
+ o("enter");
2096
+ },
2097
+ "after-enter": () => {
2098
+ o("afterEnter");
2099
+ },
2100
+ "enter-cancelled": () => {
2101
+ o("enterCancelled");
2102
+ },
2103
+ "before-leave": () => {
2104
+ o("beforeLeave");
2105
+ },
2106
+ leave: () => {
2107
+ o("leave");
2108
+ },
2109
+ "leave-cancelled": () => {
2110
+ o("leaveCancelled");
2111
+ }
2112
+ };
2113
+ ye(p, () => {
2114
+ a.keepOpen || x();
2115
+ });
2116
+ function x() {
2117
+ f.value = !1;
2118
+ }
2119
+ function S() {
2120
+ f.value = !0;
2121
+ }
2122
+ r({
2123
+ close: x,
2124
+ open: S
2125
+ });
2126
+ function C() {
2127
+ a.keepOpen || x();
2128
+ }
2129
+ return (t, r) => (l(), N(R, u({ name: O(_) }, y(b), { persisted: "" }), {
2130
+ default: e(() => [M(P("dialog", u(O(g), {
2131
+ ref_key: "dialogEl",
2132
+ ref: s,
2133
+ class: O(h),
2134
+ onCancel: ie(C, ["stop", "prevent"])
2135
+ }), [P("article", {
2136
+ ref_key: "modalWrapper",
2137
+ ref: p,
2138
+ class: "vv-dialog__wrapper"
2139
+ }, [
2140
+ t.$slots.header || t.title ? (l(), z("header", or, [n(t.$slots, "header", {}, () => [D(v(t.title) + " ", 1), P("button", {
2141
+ type: "button",
2142
+ "aria-label": t.labelClose,
2143
+ title: t.labelClose,
2144
+ class: "vv-dialog__close",
2145
+ onClickPassive: x
2146
+ }, null, 40, sr)])])) : w("v-if", !0),
2147
+ P("div", cr, [n(t.$slots, "default")]),
2148
+ t.$slots.footer ? (l(), z("footer", lr, [n(t.$slots, "footer")])) : w("v-if", !0)
2149
+ ], 512)], 16), [[k, O(f)]])]),
2150
+ _: 3
2151
+ }, 16, ["name"]));
2152
+ }
2153
+ }), dr = /* @__PURE__ */ r({
2154
+ __name: "VvDropdownAction",
2155
+ props: {
2156
+ ...wt,
2157
+ ...X
2158
+ },
2159
+ setup(t) {
2160
+ let { modifiers: r } = B(t), i = Z("vv-dropdown-action", r);
2161
+ return (t, r) => (l(), N(Qn, null, {
2162
+ default: e(() => [ce(Ht, u({
2163
+ disabled: t.disabled,
2164
+ pressed: t.pressed,
2165
+ active: t.active,
2166
+ type: t.type,
2167
+ to: t.to,
2168
+ href: t.href,
2169
+ target: t.target,
2170
+ rel: t.rel
2171
+ }, { class: O(i) }), {
2172
+ default: e(() => [n(t.$slots, "default", {}, () => [D(v(t.label), 1)])]),
2173
+ _: 3
2174
+ }, 16, ["class"])]),
2175
+ _: 3
2176
+ }));
2177
+ }
2178
+ });
2179
+ ({
2180
+ ...vt,
2181
+ ...X,
2182
+ ...Ze,
2183
+ ...Qe,
2184
+ ...ct,
2185
+ ...ot,
2186
+ ...$e,
2187
+ ...st,
2188
+ ...Y,
2189
+ ...et,
2190
+ ...ft
2191
+ }), G.add, G.edit, G.download;
2192
+ var fr = (e) => e.toString().padStart(2, "0"), pr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
2193
+ function mr(e) {
2194
+ if (typeof e != "string" || !pr.test(e)) return !1;
2195
+ let t = new Date(e);
2196
+ return !Number.isNaN(t.getTime()) && t.toISOString() === e;
2197
+ }
2198
+ function hr(e, t = "date", n) {
2199
+ if (typeof e == "string" && !mr(e)) return "";
2200
+ let r = new Date(e);
2201
+ if (Number.isNaN(r.getTime())) return "";
2202
+ let i = `${r.getFullYear()}-${fr(r.getMonth() + 1)}`;
2203
+ if (t === "month" || (i += `-${fr(r.getDate())}`, t === "date")) return i;
2204
+ let a = n ? `${fr(r.getHours())}:${fr(r.getMinutes())}:${fr(r.getSeconds())}` : `${fr(r.getHours())}:${fr(r.getMinutes())}`;
2205
+ return t === "time" ? a : `${i}T${a}`;
2206
+ }
2207
+ var gr = /^\d{4}-\d{2}-\d{2}$/, _r = /^\d{4}-\d{2}$/, vr = /^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/, yr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/;
2208
+ function br(e, t = "date") {
2209
+ if (!e?.trim()) return null;
2210
+ let n = /* @__PURE__ */ new Date(), r = n.getFullYear(), i = n.getMonth(), a = n.getDate();
2211
+ if (t === "date") {
2212
+ if (!gr.test(e)) throw Error("Invalid date format. Expected: YYYY-MM-DD");
2213
+ return /* @__PURE__ */ new Date(`${e}T00:00:00`);
2214
+ }
2215
+ if (t === "month") {
2216
+ if (!_r.test(e)) throw Error("Invalid month format. Expected: YYYY-MM");
2217
+ return /* @__PURE__ */ new Date(`${e}-01T00:00:00`);
2218
+ }
2219
+ if (t === "time") {
2220
+ if (!vr.test(e)) throw Error("Invalid time format. Expected: HH:mm or HH:mm:ss");
2221
+ return e.length === 8 ? /* @__PURE__ */ new Date(`${r}-${fr(i + 1)}-${fr(a)}T${e}`) : /* @__PURE__ */ new Date(`${r}-${fr(i + 1)}-${fr(a)}T${e}:00`);
2222
+ }
2223
+ if (!yr.test(e)) throw Error("Invalid datetime format. Expected: YYYY-MM-DDThh:mm or YYYY-MM-DDThh:mm:ss");
2224
+ return e.length === 16 ? /* @__PURE__ */ new Date(`${e}:00`) : /* @__PURE__ */ new Date(`${e}`);
2225
+ }
2226
+ var $ = {
2227
+ TEXT: "text",
2228
+ PASSWORD: "password",
2229
+ NUMBER: "number",
2230
+ EMAIL: "email",
2231
+ TEL: "tel",
2232
+ URL: "url",
2233
+ COLOR: "color",
2234
+ SEARCH: "search",
2235
+ DATE: "date",
2236
+ TIME: "time",
2237
+ DATETIME_LOCAL: "datetime-local",
2238
+ MONTH: "month",
2239
+ WEEK: "week"
2240
+ }, xr = [
2241
+ "update:modelValue",
2242
+ "update:masked",
2243
+ "accept",
2244
+ "accept:typed",
2245
+ "accept:masked",
2246
+ "accept:unmasked",
2247
+ "complete",
2248
+ "complete:typed",
2249
+ "complete:masked",
2250
+ "complete:unmasked",
2251
+ "suggestion:selected",
2252
+ "suggestion:removed",
2253
+ "focus",
2254
+ "blur",
2255
+ "keyup",
2256
+ "keydown",
2257
+ "keypress",
2258
+ "clear"
2259
+ ], Sr = {
2260
+ ...xt,
2261
+ ...Et,
2262
+ modelValue: [
2263
+ String,
2264
+ Number,
2265
+ Date
2266
+ ],
2267
+ type: {
2268
+ type: String,
2269
+ default: $.TEXT,
2270
+ validator: (e) => Object.values($).includes(e)
2271
+ },
2272
+ min: [
2273
+ Number,
2274
+ Date,
2275
+ String
2276
+ ],
2277
+ max: [
2278
+ Number,
2279
+ Date,
2280
+ String
2281
+ ],
2282
+ step: {
2283
+ type: [String, Number],
2284
+ default: 1
2285
+ },
2286
+ pattern: String,
2287
+ multiple: Boolean,
2288
+ iconShowPassword: {
2289
+ type: [String, Object],
2290
+ default: G.showPassword
2291
+ },
2292
+ iconHidePassword: {
2293
+ type: [String, Object],
2294
+ default: G.hidePassword
2295
+ },
2296
+ iconClear: {
2297
+ type: [String, Object],
2298
+ default: G.clear
2299
+ },
2300
+ iconRemoveSuggestion: {
2301
+ type: [String, Object],
2302
+ default: G.remove
2303
+ },
2304
+ labelStepUp: {
2305
+ type: String,
2306
+ default: "Increase value"
2307
+ },
2308
+ labelStepDown: {
2309
+ type: String,
2310
+ default: "Decrease value"
2311
+ },
2312
+ labelShowPassword: {
2313
+ type: String,
2314
+ default: "Show password"
2315
+ },
2316
+ labelHidePassword: {
2317
+ type: String,
2318
+ default: "Hide password"
2319
+ },
2320
+ labelClear: {
2321
+ type: String,
2322
+ default: "Clear"
2323
+ },
2324
+ labelRemoveSuggestion: {
2325
+ type: String,
2326
+ default: "Remove suggestion"
2327
+ },
2328
+ iMask: {
2329
+ type: Object,
2330
+ default: void 0
2331
+ },
2332
+ masked: {
2333
+ type: String,
2334
+ default: void 0
2335
+ },
2336
+ autoWidth: {
2337
+ type: Boolean,
2338
+ default: !1
2339
+ },
2340
+ hideActions: {
2341
+ type: Boolean,
2342
+ default: !1
2343
+ },
2344
+ unit: { type: String },
2345
+ selectOnFocus: {
2346
+ type: Boolean,
2347
+ default: !1
2348
+ },
2349
+ maxSuggestions: {
2350
+ type: Number,
2351
+ default: 5
2352
+ },
2353
+ suggestions: {
2354
+ type: Array,
2355
+ default: void 0
2356
+ },
2357
+ topLayer: _t.topLayer,
2358
+ inputMode: {
2359
+ type: String,
2360
+ default: "text"
2361
+ }
2362
+ }, Cr = r({
2363
+ components: { VvIcon: Q },
2364
+ props: {
2365
+ inputType: {
2366
+ type: String,
2367
+ default: "input-text"
2368
+ },
2369
+ disabled: {
2370
+ type: Boolean,
2371
+ default: !1
2372
+ },
2373
+ labelShow: {
2374
+ type: String,
2375
+ default: "Show password"
2376
+ },
2377
+ labelHide: {
2378
+ type: String,
2379
+ default: "Hide password"
2380
+ },
2381
+ iconShow: {
2382
+ type: [String, Object],
2383
+ default: G.showPassword
2384
+ },
2385
+ iconHide: {
2386
+ type: [String, Object],
2387
+ default: G.hidePassword
2388
+ }
2389
+ },
2390
+ emits: ["toggle-password"],
2391
+ setup(e, { emit: t }) {
2392
+ let n = L(!1), r = I(() => n.value ? e.iconHide : e.iconShow), { hasIcon: i } = Gt(r);
2393
+ function a(r) {
2394
+ r?.stopPropagation(), e.disabled || (n.value = !n.value, t("toggle-password", n.value));
2395
+ }
2396
+ return {
2397
+ active: n,
2398
+ activeIcon: r,
2399
+ hasIcon: i,
2400
+ onClick: a
2401
+ };
2402
+ },
2403
+ render() {
2404
+ let e = this.hasIcon ? a(Q, {
2405
+ ...this.hasIcon,
2406
+ class: `vv-${this.inputType}__icon`
2407
+ }) : void 0;
2408
+ return a("button", {
2409
+ disabled: this.disabled,
2410
+ class: `vv-${this.inputType}__action`,
2411
+ ariaLabel: this.active ? this.labelHide : this.labelShow,
2412
+ type: "button",
2413
+ onClick: this.onClick
2414
+ }, e);
2415
+ }
2416
+ }), wr = r({
2417
+ components: { VvIcon: Q },
2418
+ props: {
2419
+ inputType: {
2420
+ type: String,
2421
+ default: "input-text"
2422
+ },
2423
+ disabled: {
2424
+ type: Boolean,
2425
+ default: !1
2426
+ },
2427
+ label: { type: String },
2428
+ mode: {
2429
+ type: String,
2430
+ validator: (e) => ["up", "down"].includes(e),
2431
+ default: "up"
2432
+ }
2433
+ },
2434
+ emits: ["step-up", "step-down"],
2435
+ setup(e, { emit: t }) {
2436
+ let n = I(() => e.mode === "up");
2437
+ return {
2438
+ isUp: n,
2439
+ onClick: (r) => {
2440
+ r?.stopPropagation(), e.disabled || t(n.value ? "step-up" : "step-down");
2441
+ }
2442
+ };
2443
+ },
2444
+ render() {
2445
+ return a("button", {
2446
+ class: [
2447
+ `vv-${this.inputType}__action`,
2448
+ `vv-${this.inputType}__action-chevron`,
2449
+ this.isUp ? `vv-${this.inputType}__action-chevron-up` : void 0
2450
+ ],
2451
+ disabled: this.disabled,
2452
+ ariaLabel: this.label,
2453
+ type: "button",
2454
+ onClick: this.onClick
2455
+ });
2456
+ }
2457
+ });
2458
+ function Tr(e, t, n) {
2459
+ return {
2460
+ name: "VvInputTextActions",
2461
+ components: {
2462
+ VvIcon: Q,
2463
+ VvInputPasswordAction: Cr,
2464
+ VvInputStepAction: wr,
2465
+ VvInputClearAction: Vn
2466
+ },
2467
+ setup() {
2468
+ return {
2469
+ isDirty: n,
2470
+ isDisabled: I(() => t.disabled || t.readonly),
2471
+ labelStepUp: t.labelStepUp,
2472
+ labelStepDown: t.labelStepDown,
2473
+ labelShowPassword: t.labelShowPassword,
2474
+ labelHidePassword: t.labelHidePassword,
2475
+ labelClear: t.labelClear,
2476
+ iconShowPassword: t.iconShowPassword,
2477
+ iconHidePassword: t.iconHidePassword
2478
+ };
2479
+ },
2480
+ render() {
2481
+ let n = null;
2482
+ switch (e) {
2483
+ case $.SEARCH: {
2484
+ let { onClear: e } = this.$attrs;
2485
+ n = [a(Vn, {
2486
+ disabled: this.isDisabled || !this.isDirty,
2487
+ label: this.labelClear,
2488
+ onClear: e
2489
+ })];
2490
+ break;
2491
+ }
2492
+ case $.PASSWORD: {
2493
+ let { onTogglePassword: e } = this.$attrs;
2494
+ n = [a(Cr, {
2495
+ disabled: this.isDisabled,
2496
+ onTogglePassword: e,
2497
+ labelShow: this.labelShowPassword,
2498
+ labelHide: this.labelHidePassword,
2499
+ iconShow: this.iconShowPassword,
2500
+ iconHide: this.iconHidePassword
2501
+ })];
2502
+ break;
2503
+ }
2504
+ case $.NUMBER: {
2505
+ let { onStepUp: e, onStepDown: r } = this.$attrs;
2506
+ n = [a(wr, {
2507
+ mode: "up",
2508
+ disabled: this.isDisabled || t.max !== void 0 && t.modelValue === t.max,
2509
+ label: this.labelStepUp,
2510
+ onStepUp: e,
2511
+ onStepDown: r
2512
+ }), a(wr, {
2513
+ mode: "down",
2514
+ disabled: this.isDisabled || t.min !== void 0 && t.modelValue === t.min,
2515
+ label: this.labelStepDown,
2516
+ onStepUp: e,
2517
+ onStepDown: r
2518
+ })];
2519
+ break;
2520
+ }
2521
+ }
2522
+ return Array.isArray(n) ? a("div", { class: "vv-input-text__actions-group" }, n) : n;
2523
+ }
2524
+ };
2525
+ }
2526
+ function Er(e, t, n = 0, { getter: r = (e) => e, setter: i = (e) => e } = {}) {
2527
+ let a, o, s = I(() => {
2528
+ let e = de(n) ?? 0, t = typeof e == "string" ? Number.parseInt(e) : e;
2529
+ return Number.isNaN(t) ? 0 : t;
2530
+ });
2531
+ function c() {
2532
+ a &&= (clearTimeout(a), void 0), o = void 0;
2533
+ }
2534
+ function l() {
2535
+ if (!o) return;
2536
+ let e = i(o.value);
2537
+ return c(), t("update:modelValue", e), e;
2538
+ }
2539
+ return ae(c), {
2540
+ model: I({
2541
+ get: () => r(e?.value),
2542
+ set: (e) => {
2543
+ if (s.value <= 0) {
2544
+ c(), t("update:modelValue", i(e));
2545
+ return;
2546
+ }
2547
+ o = { value: e }, a && clearTimeout(a), a = setTimeout(l, s.value);
2548
+ }
2549
+ }),
2550
+ flush: l,
2551
+ cancel: c
2552
+ };
2553
+ }
2554
+ function Dr(e, t) {
2555
+ let n = I(() => (O(e) ?? "").length), r = I(() => t?.lowerLimit !== void 0 && n.value < t?.lowerLimit ? n.value - t.lowerLimit : t?.upperLimit === void 0 ? 0 : t.upperLimit - n.value);
2556
+ return {
2557
+ length: n,
2558
+ gap: r,
2559
+ formatted: I(() => t?.mode === !1 ? "" : t?.mode === "limit" && t?.upperLimit ? `${n.value} / ${t.lowerLimit ? `${t.lowerLimit}-` : ""}${t.upperLimit}` : t?.mode === "countdown" ? r.value === 0 ? void 0 : r.value : n.value)
2560
+ };
2561
+ }
2562
+ var Or = ["for"], kr = {
2563
+ key: 0,
2564
+ class: "vv-input-text__input-before"
2565
+ }, Ar = ["id"], jr = {
2566
+ key: 1,
2567
+ class: "vv-input-text__unit"
2568
+ }, Mr = {
2569
+ key: 5,
2570
+ class: "vv-input-text__input-after"
2571
+ }, Nr = {
2572
+ key: 6,
2573
+ class: "vv-input-text__limit"
2574
+ }, Pr = { class: "flex-1" }, Fr = ["title", "onClick"], Ir = /* @__PURE__ */ r({
2575
+ name: "VvInputText",
2576
+ props: Sr,
2577
+ emits: xr,
2578
+ setup(t, { expose: r, emit: a }) {
2579
+ let s = t, c = a, d = ne(), f = Rt(), p = An("VvInputText", Sr, s), { count: m, debounce: h, icon: y, iconPosition: b, iconRemoveSuggestion: x, id: C, invalid: T, label: E, labelRemoveSuggestion: k, loading: A, maxlength: M, minlength: ee, modelValue: te, step: F, storageType: re, type: R, unit: ae, valid: oe } = B(s), se = Wt(C), le = I(() => `${se.value}-hint`), de = I(() => s.floating && hn(s.placeholder) ? " " : s.placeholder), { model: V, flush: pe } = Er(te, c, h), me = I(() => {
2580
+ let e = typeof F.value == "number" ? F.value : Number.parseInt(F.value);
2581
+ return !Number.isNaN(e) && e % 60 != 0;
2582
+ }), he = /^-0?[.,]?[0*]?$/, ge = /./, _e = /^-$|^$/, ve = L(!1), ye = L(), be = L(), { el: xe, mask: Se, typed: U, masked: Ce, unmasked: we } = je(I(() => {
2583
+ if (!s.iMask) return { mask: ge };
2584
+ if (s.iMask.mask === Number) {
2585
+ let e = { ...s.iMask };
2586
+ return s.min && (e.min = Number(s.min)), s.max && (e.max = Number(s.max)), e;
2587
+ }
2588
+ return s.iMask;
2589
+ }), {
2590
+ emit: c,
2591
+ onAccept: () => {
2592
+ if (ve.value) {
2593
+ if (c("update:masked", Ce.value), R.value === $.NUMBER) {
2594
+ Te();
2595
+ return;
2596
+ }
2597
+ if (R.value === $.DATETIME_LOCAL || R.value === $.DATE || R.value === $.TIME || R.value === $.MONTH) {
2598
+ De();
2599
+ return;
2600
+ }
2601
+ !V.value && !we.value || (V.value = we.value);
2602
+ }
2603
+ }
2604
+ });
2605
+ function Te() {
2606
+ if (_e.test(we.value)) {
2607
+ if (V.value === null || V.value === void 0) return;
2608
+ V.value = void 0;
2609
+ return;
2610
+ }
2611
+ if (he.test(we.value)) {
2612
+ V.value = 0;
2613
+ return;
2614
+ }
2615
+ if (typeof U.value != "number") {
2616
+ V.value = Number(U.value);
2617
+ return;
2618
+ }
2619
+ V.value = U.value;
2620
+ }
2621
+ function Ee(e) {
2622
+ let t = new Date(ye.value || be.value);
2623
+ if ((R.value === $.DATETIME_LOCAL || R.value === $.DATE || R.value === $.MONTH) && (t.setFullYear(e.getFullYear()), t.setMonth(e.getMonth())), (R.value === $.DATETIME_LOCAL || R.value === $.DATE) && t.setDate(e.getDate()), (R.value === $.DATETIME_LOCAL || R.value === $.TIME) && (t.setHours(e.getHours()), t.setMinutes(e.getMinutes()), t.setSeconds(e.getSeconds())), ye.value instanceof Date) {
2624
+ if (V.value?.getTime() === t.getTime()) return;
2625
+ V.value = t;
2626
+ return;
2627
+ }
2628
+ V.value = t.toISOString();
2629
+ }
2630
+ function De() {
2631
+ let e = R.value;
2632
+ if (!U.value) {
2633
+ if (!V.value) return;
2634
+ if (ye.value) {
2635
+ V.value = void 0;
2636
+ return;
2637
+ }
2638
+ V.value = "";
2639
+ return;
2640
+ }
2641
+ if (!(U.value instanceof Date) && !ye.value && !be.value) {
2642
+ V.value = U.value;
2643
+ return;
2644
+ }
2645
+ let t = U.value;
2646
+ if (t instanceof Date || (t = br(U.value, e)), ye.value || be.value) {
2647
+ Ee(t);
2648
+ return;
2649
+ }
2650
+ V.value = hr(t, e, me.value);
2651
+ }
2652
+ function Oe(e) {
2653
+ if (e == null) {
2654
+ U.value = "", we.value = "";
2655
+ return;
2656
+ }
2657
+ if (s.iMask?.mask === Date) {
2658
+ U.value = e instanceof Date ? e : new Date(e);
2659
+ return;
2660
+ }
2661
+ if (!(R.value === $.NUMBER && he.test(we.value) && e === 0)) {
2662
+ if (X.value) {
2663
+ if (e instanceof Date || mr(e)) {
2664
+ if (e instanceof Date ? (ye.value = e, be.value = void 0) : (be.value = e, ye.value = void 0), R.value !== $.WEEK) {
2665
+ let t = new Date(e), n = R.value;
2666
+ U.value = hr(t, n, me.value), we.value = U.value;
2667
+ }
2668
+ return;
2669
+ }
2670
+ ye.value = void 0, be.value = void 0;
2671
+ }
2672
+ U.value = e, we.value = `${U.value}`;
2673
+ }
2674
+ }
2675
+ o(() => {
2676
+ Se.value && (ve.value = !0, Oe(s.modelValue));
2677
+ }), S(() => s.modelValue, (e) => {
2678
+ Se.value && Oe(e);
2679
+ }), S(() => s.masked, (e) => {
2680
+ Ce.value = e ?? "";
2681
+ });
2682
+ let W = xe, ke = L(), Ae = L(), Me = L();
2683
+ r({
2684
+ $input: W,
2685
+ $inner: ke,
2686
+ $wrapper: Ae,
2687
+ flush: pe
2688
+ });
2689
+ let { focused: K } = rr(W, c), Ne = I(() => K.value && !s.disabled && !s.readonly);
2690
+ function q(e) {
2691
+ e ? Pe() : Fe();
2692
+ }
2693
+ function Pe() {
2694
+ p.value.selectOnFocus && W.value && W.value.select(), et.value.size && Me.value?.show();
2695
+ }
2696
+ function Fe() {
2697
+ let e = pe() ?? V.value;
2698
+ if (!Y.value || hn(e)) return;
2699
+ let t = s.maxSuggestions;
2700
+ Y.value.size >= t && !Y.value.has(e) && (Y.value = new Set([...Y.value].slice(Y.value.size - t + 1))), Y.value.add(e);
2701
+ }
2702
+ S(Ne, q);
2703
+ let Ie = H(W);
2704
+ S(Ie, (e) => {
2705
+ e && s.autofocus && !s.disabled && !s.readonly && (K.value = !0);
2706
+ });
2707
+ let J = L(!1), Le = I(() => s.type === $.PASSWORD);
2708
+ function Re() {
2709
+ J.value = !J.value;
2710
+ }
2711
+ let ze = I(() => X.value), Be = I(() => s.type === $.NUMBER);
2712
+ function Ve() {
2713
+ if (!Xe.value) {
2714
+ if (s.iMask) {
2715
+ U.value = Number(U.value) + Number(F?.value ?? 1);
2716
+ return;
2717
+ }
2718
+ W.value.stepUp(), V.value = Number(W.value.value);
2719
+ }
2720
+ }
2721
+ function He() {
2722
+ if (!Xe.value) {
2723
+ if (s.iMask) {
2724
+ U.value = Number(U.value) - Number(F?.value ?? 1);
2725
+ return;
2726
+ }
2727
+ W.value.stepDown(), V.value = Number(W.value.value);
2728
+ }
2729
+ }
2730
+ let Ue = I(() => s.type === $.SEARCH);
2731
+ function We() {
2732
+ V.value = "", c("clear");
2733
+ }
2734
+ let { hasIconBefore: Ge, hasIconAfter: Ke } = Gt(y, b), qe = I(() => {
2735
+ if (Ke.value !== void 0) return Ke.value;
2736
+ switch (s.type) {
2737
+ case $.COLOR: return { name: G.showColorPicker };
2738
+ case $.DATE:
2739
+ case $.DATETIME_LOCAL:
2740
+ case $.WEEK:
2741
+ case $.MONTH: return { name: G.showDatePicker };
2742
+ case $.TIME: return { name: G.showTimePicker };
2743
+ }
2744
+ }), { hasIcon: Je } = Gt(x), { formatted: Ye } = Dr(V, {
2745
+ mode: m.value,
2746
+ upperLimit: Number(M?.value),
2747
+ lowerLimit: Number(ee?.value)
2748
+ }), Xe = I(() => s.disabled || s.readonly), Ze = I(() => Xe.value ? -1 : s.tabindex), Qe = I(() => !hn(te?.value)), $e = I(() => {
2749
+ if (T.value === !0) return !0;
2750
+ if (oe.value === !0) return !1;
2751
+ }), Y = Ft(I(() => s.storageKey ?? (f?.experimentalFeatures.forceInputSuggestions ? s.name : void 0)), re, /* @__PURE__ */ new Set()), et = I(() => {
2752
+ let e = /* @__PURE__ */ new Map();
2753
+ if (Y.value) for (let t of Y.value) e.set(t, { isFromStorage: !0 });
2754
+ if (s.suggestions) for (let t of s.suggestions) e.set(t, { isFromStorage: !1 });
2755
+ return e;
2756
+ }), tt = I(() => et.value.size === 0 ? [] : [...et.value.entries()].filter(([e]) => hn(V.value) || `${e}`.toLowerCase().includes(`${V.value}`.toLowerCase()) && e !== V.value).reverse().map(([e]) => e)), nt = I(() => et.value.size > 0);
2757
+ function rt(e) {
2758
+ V.value = e, Me.value?.hide(), c("suggestion:selected", e);
2759
+ }
2760
+ function it(e) {
2761
+ et.value.get(e)?.isFromStorage && (Y.value?.delete(e), c("suggestion:removed", e));
2762
+ }
2763
+ let { modifiers: at } = B(s), ot = Z("vv-input-text", at, I(() => ({
2764
+ valid: oe.value,
2765
+ invalid: T.value,
2766
+ loading: A.value,
2767
+ disabled: s.disabled,
2768
+ required: s.required,
2769
+ readonly: s.readonly,
2770
+ "icon-before": !!Ge.value,
2771
+ "icon-after": !!qe.value,
2772
+ floating: s.floating && !hn(s.label),
2773
+ dirty: Qe.value,
2774
+ focus: Ne.value && !Xe.value,
2775
+ "auto-width": s.autoWidth
2776
+ }))), st = I(() => [
2777
+ $.TEXT,
2778
+ $.SEARCH,
2779
+ $.URL,
2780
+ $.TEL,
2781
+ $.EMAIL,
2782
+ $.PASSWORD
2783
+ ].includes(R.value)), X = I(() => [
2784
+ $.DATE,
2785
+ $.MONTH,
2786
+ $.WEEK,
2787
+ $.TIME,
2788
+ $.DATETIME_LOCAL
2789
+ ].includes(R.value)), ct = I(() => [
2790
+ $.TEXT,
2791
+ $.SEARCH,
2792
+ $.URL,
2793
+ $.TEL,
2794
+ $.EMAIL,
2795
+ $.PASSWORD
2796
+ ].includes(R.value)), lt = I(() => {
2797
+ let e = Le.value && J.value || ze.value && !Qe.value && !K.value || s.iMask ? $.TEXT : s.type, t = {
2798
+ type: e,
2799
+ name: s.name,
2800
+ tabindex: Ze.value,
2801
+ disabled: s.disabled,
2802
+ readonly: s.readonly,
2803
+ required: s.required,
2804
+ autocomplete: s.autocomplete,
2805
+ "aria-invalid": $e.value,
2806
+ "aria-describedby": ft.value ? le.value : void 0,
2807
+ "aria-errormessage": pt.value ? le.value : void 0,
2808
+ inputMode: s.inputMode
2809
+ };
2810
+ if (X.value || e === $.NUMBER) {
2811
+ let n = s.max;
2812
+ e === $.DATE && !n && (n = "9999-12-31"), t.step = s.step, t.max = n === void 0 ? void 0 : String(n), t.min = s.min === void 0 ? void 0 : String(s.min);
2813
+ }
2814
+ return (st.value || e === $.TEXT || e === $.NUMBER) && (t.placeholder = de.value), ct.value && (t.minlength = s.minlength, t.maxlength = s.maxlength, t.pattern = s.pattern), e === $.EMAIL && (t.multiple = s.multiple), t;
2815
+ }), ut = I(() => ({
2816
+ valid: s.valid,
2817
+ invalid: s.invalid,
2818
+ modelValue: s.modelValue,
2819
+ togglePassword: Re,
2820
+ stepUp: Ve,
2821
+ stepDown: He,
2822
+ clear: We
2823
+ })), { HintSlot: dt, hasHintLabelOrSlot: ft, hasInvalidLabelOrSlot: pt, hintSlotScope: mt } = On(p, d), ht = Tr($.PASSWORD, s, Qe), gt = Tr($.NUMBER, s, Qe), _t = Tr($.SEARCH, s, Qe);
2824
+ function vt() {
2825
+ Xe.value || (K.value = !0);
2826
+ }
2827
+ let yt = I(() => {
2828
+ if (s.autoWidth) return { width: V.value === void 0 ? void 0 : `${String(V.value).length + 1}ch` };
2829
+ });
2830
+ function bt(e) {
2831
+ switch (e.code) {
2832
+ case "ArrowUp":
2833
+ Be.value && (Ve(), e.preventDefault());
2834
+ break;
2835
+ case "ArrowDown":
2836
+ Be.value && (He(), e.preventDefault());
2837
+ break;
2838
+ case "Enter":
2839
+ case "NumpadEnter": pe();
2840
+ }
2841
+ c("keydown", e);
2842
+ }
2843
+ return (t, r) => (l(), z("div", { class: g(O(ot)) }, [
2844
+ O(E) ? (l(), z("label", {
2845
+ key: 0,
2846
+ for: O(se),
2847
+ class: "vv-input-text__label"
2848
+ }, v(O(E)), 9, Or)) : w("v-if", !0),
2849
+ P("div", {
2850
+ ref_key: "wrapperEl",
2851
+ ref: Ae,
2852
+ class: "vv-input-text__wrapper"
2853
+ }, [
2854
+ t.$slots.before ? (l(), z("div", kr, [n(t.$slots, "before", i(_(O(ut))))])) : w("v-if", !0),
2855
+ P("div", {
2856
+ ref_key: "innerEl",
2857
+ ref: ke,
2858
+ class: "vv-input-text__inner",
2859
+ onClick: ie(vt, ["stop"])
2860
+ }, [
2861
+ O(Ge) ? (l(), N(Q, u({ key: 0 }, O(Ge), { class: "vv-input-text__icon" }), null, 16)) : w("v-if", !0),
2862
+ P("input", u({
2863
+ id: O(se),
2864
+ ref_key: "inputEl",
2865
+ ref: W
2866
+ }, O(lt), {
2867
+ style: O(yt),
2868
+ onKeyup: r[0] ||= (e) => c("keyup", e),
2869
+ onKeydown: bt,
2870
+ onKeypress: r[1] ||= (e) => c("keypress", e)
2871
+ }), null, 16, Ar),
2872
+ (O(ae) || t.$slots.unit) && O(Qe) ? (l(), z("div", jr, [n(t.$slots, "unit", i(_(O(ut))), () => [D(v(O(ae)), 1)])])) : w("v-if", !0)
2873
+ ], 512),
2874
+ O(qe) ? (l(), N(Q, u({ key: 1 }, O(qe), { class: "vv-input-text__icon vv-input-text__icon-after" }), null, 16)) : O(Le) && !t.hideActions && !O(Xe) ? (l(), N(O(ht), {
2875
+ key: 2,
2876
+ onTogglePassword: Re
2877
+ })) : O(Be) && !t.hideActions && !O(Xe) ? (l(), N(O(gt), {
2878
+ key: 3,
2879
+ onStepUp: Ve,
2880
+ onStepDown: He
2881
+ })) : O(Ue) && !t.hideActions && !O(Xe) ? (l(), N(O(_t), {
2882
+ key: 4,
2883
+ onClear: We
2884
+ })) : w("v-if", !0),
2885
+ t.$slots.after ? (l(), z("div", Mr, [n(t.$slots, "after", i(_(O(ut))))])) : w("v-if", !0),
2886
+ O(m) ? (l(), z("span", Nr, [n(t.$slots, "count", i(_(O(ut))), () => [D(v(O(Ye)), 1)])])) : w("v-if", !0)
2887
+ ], 512),
2888
+ ce(O(dt), {
2889
+ id: O(le),
2890
+ class: "vv-input-text__hint"
2891
+ }, ue({ _: 2 }, [
2892
+ t.$slots.hint ? {
2893
+ name: "hint",
2894
+ fn: e(() => [n(t.$slots, "hint", i(_(O(mt))))]),
2895
+ key: "0"
2896
+ } : void 0,
2897
+ t.$slots.loading ? {
2898
+ name: "loading",
2899
+ fn: e(() => [n(t.$slots, "loading", i(_(O(mt))))]),
2900
+ key: "1"
2901
+ } : void 0,
2902
+ t.$slots.valid ? {
2903
+ name: "valid",
2904
+ fn: e(() => [n(t.$slots, "valid", i(_(O(mt))))]),
2905
+ key: "2"
2906
+ } : void 0,
2907
+ t.$slots.invalid ? {
2908
+ name: "invalid",
2909
+ fn: e(() => [n(t.$slots, "invalid", i(_(O(mt))))]),
2910
+ key: "3"
2911
+ } : void 0
2912
+ ]), 1032, ["id"]),
2913
+ O(nt) ? (l(), N(Zn, {
2914
+ key: 1,
2915
+ ref_key: "suggestionsDropdownEl",
2916
+ ref: Me,
2917
+ reference: O(Ae),
2918
+ "autofocus-first": !1,
2919
+ "trigger-width": !0,
2920
+ "top-layer": O(p).topLayer
2921
+ }, {
2922
+ items: e(() => [(l(!0), z(j, null, fe(O(tt), (r) => (l(), N(er, {
2923
+ key: String(r),
2924
+ onClick: ie((e) => rt(r), ["stop"])
2925
+ }, {
2926
+ default: e(() => [P("div", Pr, [n(t.$slots, "suggestion", u({ ref_for: !0 }, { value: r }), () => [D(v(r), 1)])]), O(et).get(r)?.isFromStorage && O(Je) ? (l(), z("button", {
2927
+ key: 0,
2928
+ type: "button",
2929
+ tabindex: "-1",
2930
+ class: "cursor-pointer",
2931
+ title: O(k),
2932
+ onClick: ie((e) => it(r), ["stop"])
2933
+ }, [ce(Q, u({ ref_for: !0 }, O(Je)), null, 16)], 8, Fr)) : w("v-if", !0)]),
2934
+ _: 2
2935
+ }, 1032, ["onClick"]))), 128))]),
2936
+ _: 3
2937
+ }, 8, ["reference", "top-layer"])) : w("v-if", !0)
2938
+ ], 2));
2939
+ }
2940
+ });
2941
+ ({
2942
+ ...X,
2943
+ ...Tt
2944
+ }), { ...X };
2945
+ var Lr = St, Rr = [
2946
+ "click",
2947
+ "update:modelValue",
2948
+ "change",
2949
+ "blur"
2950
+ ];
2951
+ function zr(e, t) {
2952
+ let { id: n } = B(e), { group: r, isInGroup: i, getGroupOrLocalRef: a } = Dt(Ue);
2953
+ return {
2954
+ id: n,
2955
+ group: r,
2956
+ isInGroup: i,
2957
+ modelValue: a("modelValue", e, t),
2958
+ valid: a("valid", e),
2959
+ invalid: a("invalid", e),
2960
+ readonly: I(() => !!(e.readonly || r?.readonly.value)),
2961
+ disabled: I(() => !!(e.disabled || r?.disabled.value))
2962
+ };
2963
+ }
2964
+ var Br = ["for"], Vr = [
2965
+ "id",
2966
+ "name",
2967
+ "disabled",
2968
+ "value",
2969
+ "tabindex",
2970
+ "aria-invalid",
2971
+ "aria-describedby",
2972
+ "aria-errormessage"
2973
+ ], Hr = /* @__PURE__ */ r({
2974
+ name: "VvRadio",
2975
+ props: Lr,
2976
+ emits: Rr,
2977
+ setup(t, { emit: r }) {
2978
+ let a = t, o = r, s = ne(), c = An("VvRadio", Lr, a), { id: u, disabled: d, readonly: f, modelValue: p, valid: m, invalid: h } = zr(a, o), y = Wt(u), b = I(() => `${y.value}-hint`), x = I(() => C.value ? -1 : a.tabindex), S = L(), C = I(() => d.value || f.value), w = I(() => {
2979
+ if (h.value === !0) return !0;
2980
+ if (m.value === !0) return !1;
2981
+ }), T = I(() => Array.isArray(p.value) ? mn(a.value, p.value) : ln(a.value, p.value)), k = I(() => ![
2982
+ "string",
2983
+ "number",
2984
+ "boolean"
2985
+ ].includes(typeof a.value) || a.value), j = I({
2986
+ get() {
2987
+ return T.value ? k.value : null;
2988
+ },
2989
+ set(e) {
2990
+ Array.isArray(p.value) ? p.value = [a.value] : p.value = a.value, o("change", e);
2991
+ }
2992
+ }), { modifiers: N } = B(a), ee = Z("vv-radio", N, I(() => ({
2993
+ valid: m.value,
2994
+ invalid: h.value,
2995
+ disabled: d.value,
2996
+ readonly: f.value
2997
+ }))), { HintSlot: te, hasHintLabelOrSlot: F, hasInvalidLabelOrSlot: re, hintSlotScope: R } = On(c, s);
2998
+ return (t, r) => (l(), z("label", {
2999
+ class: g(O(ee)),
3000
+ for: O(y)
3001
+ }, [
3002
+ M(P("input", {
3003
+ id: O(y),
3004
+ ref_key: "input",
3005
+ ref: S,
3006
+ "onUpdate:modelValue": r[0] ||= (e) => A(j) ? j.value = e : null,
3007
+ type: "radio",
3008
+ class: "vv-radio__input",
3009
+ name: t.name,
3010
+ disabled: O(C),
3011
+ value: O(k),
3012
+ tabindex: O(x),
3013
+ "aria-invalid": O(w),
3014
+ "aria-describedby": O(F) ? O(b) : void 0,
3015
+ "aria-errormessage": O(re) ? O(b) : void 0
3016
+ }, null, 8, Vr), [[E, O(j)]]),
3017
+ n(t.$slots, "default", { value: O(p) }, () => [D(v(t.label), 1)]),
3018
+ ce(O(te), {
3019
+ id: O(b),
3020
+ class: "vv-radio__hint"
3021
+ }, ue({ _: 2 }, [
3022
+ t.$slots.hint ? {
3023
+ name: "hint",
3024
+ fn: e(() => [n(t.$slots, "hint", i(_(O(R))))]),
3025
+ key: "0"
3026
+ } : void 0,
3027
+ t.$slots.loading ? {
3028
+ name: "loading",
3029
+ fn: e(() => [n(t.$slots, "loading", i(_(O(R))))]),
3030
+ key: "1"
3031
+ } : void 0,
3032
+ t.$slots.valid ? {
3033
+ name: "valid",
3034
+ fn: e(() => [n(t.$slots, "valid", i(_(O(R))))]),
3035
+ key: "2"
3036
+ } : void 0,
3037
+ t.$slots.invalid ? {
3038
+ name: "invalid",
3039
+ fn: e(() => [n(t.$slots, "invalid", i(_(O(R))))]),
3040
+ key: "3"
3041
+ } : void 0
3042
+ ]), 1032, ["id"])
3043
+ ], 10, Br));
3044
+ }
3045
+ }), Ur = ["update:modelValue", "change"], Wr = ["textContent"], Gr = { class: "vv-radio-group__wrapper" }, Kr = /* @__PURE__ */ r({
3046
+ name: "VvRadioGroup",
3047
+ props: Ct,
3048
+ emits: Ur,
3049
+ setup(t, { emit: r }) {
3050
+ let a = t, o = r, s = ne(), c = An("VvRadioGroup", Ct, a), d = ve(a, "modelValue", o), { disabled: f, readonly: p, vertical: m, valid: h, invalid: y, modifiers: b } = B(a);
3051
+ It(Ue, {
3052
+ modelValue: d,
3053
+ disabled: f,
3054
+ readonly: p,
3055
+ valid: h,
3056
+ invalid: y
3057
+ });
3058
+ let { getOptionLabel: x, getOptionValue: S, isOptionDisabled: C } = Fn(a), T = Z("vv-radio-group", b, I(() => ({
3059
+ disabled: f.value,
3060
+ readonly: p.value,
3061
+ required: a.required,
3062
+ horizontal: !m.value,
3063
+ valid: h.value,
3064
+ invalid: y.value
3065
+ })));
3066
+ function E(e, t) {
3067
+ return {
3068
+ id: `${a.name}_opt${t}`,
3069
+ name: a.name,
3070
+ label: x(e),
3071
+ value: S(e),
3072
+ required: a.required,
3073
+ disabled: C(e)
3074
+ };
3075
+ }
3076
+ let { HintSlot: D, hintSlotScope: k } = On(c, s);
3077
+ return (t, r) => (l(), z("fieldset", { class: g(O(T)) }, [
3078
+ t.label ? (l(), z("legend", {
3079
+ key: 0,
3080
+ textContent: v(t.label)
3081
+ }, null, 8, Wr)) : w("v-if", !0),
3082
+ P("div", Gr, [t.options.length > 0 ? (l(!0), z(j, { key: 0 }, fe(t.options, (e, t) => (l(), N(Hr, u({ key: t }, { ref_for: !0 }, E(e, t)), null, 16))), 128)) : n(t.$slots, "default", {}, void 0, void 0, 1)]),
3083
+ ce(O(D), { class: "vv-radio-group__hint" }, ue({ _: 2 }, [
3084
+ t.$slots.hint ? {
3085
+ name: "hint",
3086
+ fn: e(() => [n(t.$slots, "hint", i(_(O(k))))]),
3087
+ key: "0"
3088
+ } : void 0,
3089
+ t.$slots.loading ? {
3090
+ name: "loading",
3091
+ fn: e(() => [n(t.$slots, "loading", i(_(O(k))))]),
3092
+ key: "1"
3093
+ } : void 0,
3094
+ t.$slots.valid ? {
3095
+ name: "valid",
3096
+ fn: e(() => [n(t.$slots, "valid", i(_(O(k))))]),
3097
+ key: "2"
3098
+ } : void 0,
3099
+ t.$slots.invalid ? {
3100
+ name: "invalid",
3101
+ fn: e(() => [n(t.$slots, "invalid", i(_(O(k))))]),
3102
+ key: "3"
3103
+ } : void 0
3104
+ ]), 1024)
3105
+ ], 2));
3106
+ }
3107
+ });
3108
+ ({ ...X });
3109
+ var qr = {
3110
+ hard: "hard",
3111
+ soft: "soft"
3112
+ }, Jr = {
3113
+ true: !0,
3114
+ false: !1,
3115
+ default: "default"
3116
+ };
3117
+ ({
3118
+ ...xt,
3119
+ ...Et
3120
+ }), qr.soft, Jr.default, G.remove, _t.topLayer, { ...X }, q.bottom;
3121
+ //#endregion
3122
+ export { Zn as a, Pt as c, Hr as d, Ir as f, Cn as i, Nn as l, Kr as m, ur as n, yn as o, Q as p, Rn as r, an as s, dr as t, en as u };
3123
+
3124
+ //# sourceMappingURL=index.es-gbmOq0Nu.js.map