@volverjs/ui-vue 0.0.10-beta.5 → 0.0.10-beta.7

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 (56) hide show
  1. package/dist/Volver.d.ts +1 -0
  2. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -4
  3. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -4
  4. package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
  5. package/dist/components/VvAlert/VvAlert.vue.d.ts +4 -4
  6. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +4 -4
  7. package/dist/components/VvButton/VvButton.vue.d.ts +15 -9
  8. package/dist/components/VvButton/index.d.ts +2 -2
  9. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +4 -4
  10. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +5 -5
  11. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +4 -4
  12. package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
  13. package/dist/components/VvCombobox/VvCombobox.es.js +9 -5
  14. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  15. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +14 -14
  16. package/dist/components/VvCombobox/index.d.ts +11 -6
  17. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  18. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +19 -5
  19. package/dist/components/VvDropdown/index.d.ts +1 -1
  20. package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
  21. package/dist/components/VvNav/VvNav.vue.d.ts +7 -7
  22. package/dist/components/VvNav/index.d.ts +1 -1
  23. package/dist/components/VvRadio/VvRadio.vue.d.ts +5 -5
  24. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +4 -4
  25. package/dist/components/VvRadioGroup/index.d.ts +1 -1
  26. package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
  27. package/dist/components/VvSelect/index.d.ts +1 -1
  28. package/dist/components/VvTab/VvTab.vue.d.ts +4 -4
  29. package/dist/components/VvTextarea/VvTextarea.es.js +1 -1
  30. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  31. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +7 -7
  32. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +3 -3
  33. package/dist/components/VvTooltip/index.d.ts +1 -1
  34. package/dist/components/index.es.js +10 -6
  35. package/dist/components/index.umd.js +1 -1
  36. package/dist/icons.es.js +3 -3
  37. package/dist/icons.umd.js +1 -1
  38. package/dist/props/index.d.ts +1 -1
  39. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +45 -10
  40. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +301 -52
  41. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  42. package/dist/stories/Tab/Tab.settings.d.ts +2 -15
  43. package/dist/types/generic.d.ts +1 -2
  44. package/dist/types/index.d.ts +5 -0
  45. package/package.json +28 -28
  46. package/src/Volver.ts +1 -0
  47. package/src/assets/icons/detailed.json +1 -1
  48. package/src/assets/icons/normal.json +1 -1
  49. package/src/assets/icons/simple.json +1 -1
  50. package/src/components/VvCombobox/VvCombobox.vue +8 -4
  51. package/src/components/VvCombobox/index.ts +4 -0
  52. package/src/components/VvTextarea/VvTextarea.vue +1 -1
  53. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  54. package/src/stories/Tab/Tab.settings.ts +2 -2
  55. package/src/types/generic.ts +2 -3
  56. package/src/types/index.ts +5 -0
package/dist/Volver.d.ts CHANGED
@@ -107,3 +107,4 @@ export declare class Volver implements VolverInterface {
107
107
  }
108
108
  declare const VolverPlugin: Plugin;
109
109
  export default VolverPlugin;
110
+ export * from './types';
@@ -9,7 +9,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
9
9
  disabled: BooleanConstructor;
10
10
  not: BooleanConstructor;
11
11
  modifiers: globalThis.PropType<string | string[]>;
12
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ [x: string]: (...args: any[]) => void;
14
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
15
  name: StringConstructor;
14
16
  title: StringConstructor;
15
17
  content: StringConstructor;
@@ -20,9 +22,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
20
22
  disabled: BooleanConstructor;
21
23
  not: BooleanConstructor;
22
24
  modifiers: globalThis.PropType<string | string[]>;
23
- }>> & {
24
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
25
- }, {
25
+ }>>, {
26
26
  disabled: boolean;
27
27
  modelValue: boolean;
28
28
  not: boolean;
@@ -13,7 +13,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
13
13
  not: BooleanConstructor;
14
14
  storeKey: StringConstructor;
15
15
  modifiers: globalThis.PropType<string | string[]>;
16
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ [x: string]: (...args: any[]) => void;
18
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
19
  modelValue: (ArrayConstructor | StringConstructor)[];
18
20
  items: {
19
21
  type: globalThis.PropType<import(".").VvAccordionGroupItem[]>;
@@ -28,9 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
28
30
  not: BooleanConstructor;
29
31
  storeKey: StringConstructor;
30
32
  modifiers: globalThis.PropType<string | string[]>;
31
- }>> & {
32
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
33
- }, {
33
+ }>>, {
34
34
  disabled: boolean;
35
35
  collapse: boolean;
36
36
  not: boolean;
@@ -27,7 +27,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
27
27
  disabled: BooleanConstructor;
28
28
  }, {
29
29
  $el: globalThis.Ref<HTMLElement | null>;
30
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ [x: string]: (...args: any[]) => void;
32
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
31
33
  type: {
32
34
  type: globalThis.PropType<"button" | "submit" | "reset">;
33
35
  default: import("../../constants").ButtonType;
@@ -54,9 +56,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
54
56
  pressed: BooleanConstructor;
55
57
  label: (StringConstructor | NumberConstructor)[];
56
58
  disabled: BooleanConstructor;
57
- }>> & {
58
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
59
- }, {
59
+ }>>, {
60
60
  disabled: boolean;
61
61
  type: "button" | "submit" | "reset";
62
62
  ariaLabel: string;
@@ -39,7 +39,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
39
39
  id: (StringConstructor | NumberConstructor)[];
40
40
  }, {
41
41
  close: () => void;
42
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
+ [x: string]: (...args: any[]) => void;
44
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
45
  dismissable: {
44
46
  type: BooleanConstructor;
45
47
  default: boolean;
@@ -78,9 +80,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
78
80
  };
79
81
  modifiers: globalThis.PropType<string | string[]>;
80
82
  id: (StringConstructor | NumberConstructor)[];
81
- }>> & {
82
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
83
- }, {
83
+ }>>, {
84
84
  title: string;
85
85
  content: string;
86
86
  footer: string;
@@ -32,7 +32,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
32
32
  default: undefined;
33
33
  };
34
34
  modifiers: globalThis.PropType<string | string[]>;
35
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
35
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ [x: string]: (...args: any[]) => void;
37
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
38
  name: {
37
39
  type: StringConstructor;
38
40
  required: boolean;
@@ -66,9 +68,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
66
68
  default: undefined;
67
69
  };
68
70
  modifiers: globalThis.PropType<string | string[]>;
69
- }>> & {
70
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
71
- }, {
71
+ }>>, {
72
72
  reverse: boolean;
73
73
  items: import(".").AlertItem[];
74
74
  transition: string;
@@ -2,7 +2,7 @@ import { Side } from '../../constants';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
3
  icon: (ObjectConstructor | StringConstructor)[];
4
4
  iconPosition: {
5
- type: globalThis.PropType<"left" | "right" | "top" | "bottom">;
5
+ type: globalThis.PropType<"top" | "right" | "bottom" | "left">;
6
6
  default: Side;
7
7
  validator: (value: Side) => boolean;
8
8
  };
@@ -26,7 +26,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
26
26
  type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
27
27
  default: undefined;
28
28
  };
29
- loading: BooleanConstructor;
29
+ loading: BooleanConstructor; /**
30
+ * @description Define component classes with BEM style.
31
+ * @returns {Array} The component classes.
32
+ */
30
33
  loadingLabel: {
31
34
  type: StringConstructor;
32
35
  default: string;
@@ -65,10 +68,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
65
68
  disabled: BooleanConstructor;
66
69
  }, {
67
70
  $el: globalThis.ComputedRef<HTMLElement | undefined>;
68
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
71
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
72
+ [x: string]: (...args: any[]) => void;
73
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
69
74
  icon: (ObjectConstructor | StringConstructor)[];
70
75
  iconPosition: {
71
- type: globalThis.PropType<"left" | "right" | "top" | "bottom">;
76
+ type: globalThis.PropType<"top" | "right" | "bottom" | "left">;
72
77
  default: Side;
73
78
  validator: (value: Side) => boolean;
74
79
  };
@@ -92,7 +97,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
92
97
  type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
93
98
  default: undefined;
94
99
  };
95
- loading: BooleanConstructor;
100
+ loading: BooleanConstructor; /**
101
+ * @description Define component classes with BEM style.
102
+ * @returns {Array} The component classes.
103
+ */
96
104
  loadingLabel: {
97
105
  type: StringConstructor;
98
106
  default: string;
@@ -129,9 +137,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
129
137
  pressed: BooleanConstructor;
130
138
  label: (StringConstructor | NumberConstructor)[];
131
139
  disabled: BooleanConstructor;
132
- }>> & {
133
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
134
- }, {
140
+ }>>, {
135
141
  disabled: boolean;
136
142
  modelValue: string | number | boolean;
137
143
  toggle: boolean;
@@ -143,7 +149,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
143
149
  current: boolean;
144
150
  active: boolean;
145
151
  pressed: boolean;
146
- iconPosition: "left" | "right" | "top" | "bottom";
152
+ iconPosition: "top" | "right" | "bottom" | "left";
147
153
  loadingIcon: string;
148
154
  uncheckedValue: string | number | boolean;
149
155
  loading: boolean;
@@ -11,7 +11,7 @@ export declare const VvButtonProps: {
11
11
  * Button icon position
12
12
  */
13
13
  iconPosition: {
14
- type: PropType<"left" | "right" | "top" | "bottom">;
14
+ type: PropType<"top" | "right" | "bottom" | "left">;
15
15
  default: Side;
16
16
  validator: (value: Side) => boolean;
17
17
  };
@@ -103,7 +103,7 @@ export declare function useGroupProps(props: VvButtonPropsTypes, emit: (event: (
103
103
  disabled: globalThis.ComputedRef<boolean>;
104
104
  id: Ref<string | number | undefined> | undefined;
105
105
  pressed: Ref<boolean>;
106
- iconPosition: Ref<"left" | "right" | "top" | "bottom">;
106
+ iconPosition: Ref<"top" | "right" | "bottom" | "left">;
107
107
  icon: Ref<string | Record<string, any> | undefined> | undefined;
108
108
  label: Ref<string | number | undefined> | undefined;
109
109
  };
@@ -21,7 +21,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
21
21
  };
22
22
  disabled: BooleanConstructor;
23
23
  modifiers: globalThis.PropType<string | string[]>;
24
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ [x: string]: (...args: any[]) => void;
26
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
27
  itemModifiers: {
26
28
  type: globalThis.PropType<string | string[]>;
27
29
  default: string;
@@ -44,9 +46,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
44
46
  };
45
47
  disabled: BooleanConstructor;
46
48
  modifiers: globalThis.PropType<string | string[]>;
47
- }>> & {
48
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
49
- }, {
49
+ }>>, {
50
50
  disabled: boolean;
51
51
  modelValue: string | number | boolean | (string | number | boolean)[] | undefined;
52
52
  toggle: boolean;
@@ -30,7 +30,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
30
30
  required: boolean;
31
31
  };
32
32
  id: (StringConstructor | NumberConstructor)[];
33
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
+ [x: string]: (...args: any[]) => void;
35
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
36
  indeterminate: BooleanConstructor;
35
37
  uncheckedValue: (StringConstructor | BooleanConstructor | NumberConstructor)[];
36
38
  switch: BooleanConstructor;
@@ -62,19 +64,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
62
64
  required: boolean;
63
65
  };
64
66
  id: (StringConstructor | NumberConstructor)[];
65
- }>> & {
66
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
67
- }, {
67
+ }>>, {
68
68
  readonly: boolean;
69
69
  disabled: boolean;
70
70
  valid: boolean;
71
71
  invalid: boolean;
72
72
  switch: boolean;
73
- tabindex: string | number;
74
73
  loading: boolean;
75
74
  loadingLabel: string;
76
75
  indeterminate: boolean;
77
76
  hintLabel: string;
77
+ tabindex: string | number;
78
78
  }, {}>, {
79
79
  default?(_: {
80
80
  value: any;
@@ -39,7 +39,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
39
39
  invalidLabel: (ArrayConstructor | StringConstructor)[];
40
40
  valid: BooleanConstructor;
41
41
  validLabel: (ArrayConstructor | StringConstructor)[];
42
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
+ [x: string]: (...args: any[]) => void;
44
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
45
  modelValue: (SymbolConstructor | ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
44
46
  name: {
45
47
  type: StringConstructor;
@@ -79,9 +81,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
79
81
  invalidLabel: (ArrayConstructor | StringConstructor)[];
80
82
  valid: BooleanConstructor;
81
83
  validLabel: (ArrayConstructor | StringConstructor)[];
82
- }>> & {
83
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
84
- }, {
84
+ }>>, {
85
85
  readonly: boolean;
86
86
  disabled: boolean;
87
87
  valid: boolean;
@@ -19,7 +19,7 @@ export declare const VvCheckboxGroupProps: {
19
19
  default: string;
20
20
  };
21
21
  options: {
22
- type: globalThis.PropType<(string | import("../../types/generic").Option)[]>;
22
+ type: globalThis.PropType<(string | import("../../types").Option)[]>;
23
23
  default: () => never[];
24
24
  };
25
25
  labelKey: {
@@ -393,6 +393,10 @@ const ActionProps = {
393
393
  };
394
394
  const VvComboboxEvents = [
395
395
  "update:modelValue",
396
+ "update:search",
397
+ /**
398
+ * @deprecated change:search should not be used, use update:search instead
399
+ */
396
400
  "change:search",
397
401
  "focus",
398
402
  "blur"
@@ -2487,10 +2491,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2487
2491
  searchText,
2488
2492
  computed(() => Number(props.debounceSearch))
2489
2493
  );
2490
- watch(
2491
- debouncedSearchText,
2492
- () => emit("change:search", debouncedSearchText.value)
2493
- );
2494
+ watch(debouncedSearchText, () => {
2495
+ emit("update:search", debouncedSearchText.value);
2496
+ emit("change:search", debouncedSearchText.value);
2497
+ });
2494
2498
  const expanded = ref(false);
2495
2499
  const toggleExpanded = () => {
2496
2500
  if (props.disabled || props.readonly)
@@ -2561,7 +2565,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2561
2565
  valid: valid.value,
2562
2566
  invalid: invalid.value,
2563
2567
  dirty: isDirty.value,
2564
- focus: focused.value,
2568
+ focus: focused.value || focusedWithin.value || expanded.value,
2565
2569
  floating: floating.value,
2566
2570
  badges: props.badges
2567
2571
  }))
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@floating-ui/vue","uid","@vueuse/core","mitt","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCombobox=t(e.vue,e.vue$1,e.vue$2,e.uid,e.core,e.mitt,e.tsDotProp)}(this,(function(e,t,l,o,a,n,r){"use strict";var i=(e=>(e.absolute="absolute",e.fixed="fixed",e))(i||{}),u=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(u||{}),s=(e=>(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))(s||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),c=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(c||{}),v=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(v||{}),p=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(p||{}),f=(e=>(e.listbox="listbox",e.menu="menu",e))(f||{}),m=(e=>(e.option="option",e.presentation="presentation",e))(m||{}),b=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(b||{});const g=Symbol.for("volver"),y=Symbol.for("buttonGroup"),h=Symbol.for("dropdownTrigger"),k=Symbol.for("dropdownItem"),S=Symbol.for("dropdownAction"),B={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(b).includes(e)},rel:{type:String,default:"noopener noreferrer"}},V={valid:Boolean,validLabel:[String,Array]},x={invalid:Boolean,invalidLabel:[String,Array]},w={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},L={disabled:Boolean},P={selected:Boolean},$={active:Boolean},_={current:Boolean},C={pressed:Boolean},O={label:[String,Number]},E={readonly:Boolean},N={modifiers:[String,Array]},A={hintLabel:{type:String,default:""}},D={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},j={icon:{type:[String,Object]},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},R={tabindex:{type:[String,Number],default:0}},F={floating:Boolean},z={unselectable:{type:Boolean,default:!0}},H={id:[String,Number]},I={placement:{type:String,default:u.bottom,validator:e=>Object.values(u).includes(e)||Object.values(s).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(i).includes(e)},transitionName:{type:String},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}},T={...H,name:{type:String,required:!0}},M={autofocus:Boolean},q={autocomplete:{type:String,default:"off"}},K={...L,...O,...C,...$,..._,...B,type:{type:String,default:c.button,validator:e=>Object.values(c).includes(e)},ariaLabel:{type:String,default:void 0}},W={...T,...R,...V,...x,...A,...w,...L,...E,...N,...D,...j,...F,...z,...I,...O,transitionName:{type:String,default:"vv-dropdown--mobile-fade-block"},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},noResultsLabel:{type:String,default:"No results"},noOptionsLabel:{type:String,default:"No options available"},selectedHintLabel:{type:String,default:"Selected"},deselectActionLabel:{type:String,default:"Deselect"},selectHintLabel:{type:String,default:"Press enter to select"},deselectHintLabel:{type:String,default:"Press enter to remove"},closeLabel:{type:String,default:"Close"},placeholder:String,searchable:Boolean,searchFunction:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search..."},debounceSearch:{type:[Number,String],default:0},multiple:Boolean,maxValues:[Number,String],separator:{type:String,default:", "},native:Boolean,badges:Boolean,badgeModifiers:{type:[String,Array],default:"action sm"},triggerWidth:{...I.triggerWidth,default:!0},dropdownModifiers:{type:[String,Array],default:"mobile"},autoOpen:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1}},G={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};function U(){return e.inject(g)}function J(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const Q=e.defineComponent({name:"VvIcon",props:G,setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=U(),{modifiers:i}=e.toRefs(o),u=J("vv-icon",i),s=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),d=e.computed((()=>{const e=o.name??"",l=`@${s.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==r?void 0:r.iconsCollections.find((l=>{const o=`@${s.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${s.value}:${a.prefix}:${e}`:e}));function c(e){const l=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${s.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return r&&o.src&&!t.iconExists(`@${s.value}:${o.prefix}:${o.name}`)&&(n.value=!1,r.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),X={...H,...I,...N,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:f.menu,validator:e=>Object.values(f).includes(e)}},Y=t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid())));const Z=["id","tabindex","role","aria-labelledby"],ee=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:X,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(t,{expose:o,emit:r}){const s=t,{id:d}=e.toRefs(s),c=Y(d),v=e.useAttrs(),p=e.ref("auto"),b=e.ref("auto"),g=e.ref(null),y=e.ref(),S=e.ref(null),B=e.ref(null),V=e.computed({get:()=>s.reference??g.value,set:e=>{g.value=e}}),x=e.ref(!1);e.onMounted((()=>{a.useMutationObserver(y.value,(()=>{var e;x.value="true"===(null==(e=window.getComputedStyle(y.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const w=e.computed((()=>{const e=[];if(s.autoPlacement?"boolean"==typeof s.autoPlacement?e.push(l.autoPlacement()):e.push(l.autoPlacement(s.autoPlacement)):s.flip&&("boolean"==typeof s.flip?e.push(l.flip({fallbackStrategy:"initialPlacement"})):e.push(l.flip(s.flip))),s.shift&&("boolean"==typeof s.shift?e.push(l.shift()):e.push(l.shift(s.shift))),s.size){const t=({availableWidth:e,availableHeight:t})=>{p.value=`${e}px`,b.value=`${t}px`};"boolean"==typeof s.size?e.push(l.size({apply:t})):e.push(l.size({...s.size,apply:t}))}return s.offset&&(e.push(l.offset(Number(s.offset))),["string","number"].includes(typeof s.offset)?e.push(l.offset(Number(s.offset))):e.push(l.offset(s.offset))),s.arrow&&e.push(l.arrow({element:S})),e})),{x:L,y:P,middlewareData:$,placement:_,strategy:C}=l.useFloating(V,y,{whileElementsMounted:(...e)=>l.autoUpdate(...e,{animationFrame:s.strategy===i.fixed}),placement:e.computed((()=>s.placement)),strategy:e.computed((()=>s.strategy)),middleware:w}),O=e.computed((()=>{var e;if(x.value)return;const t=s.triggerWidth&&V.value?`${null==(e=V.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${P.value??0}px`,left:`${L.value??0}px`,maxWidth:t?void 0:p.value,maxHeight:b.value,width:t}})),E=e.computed((()=>_.value.split("-")[0])),N=e.computed((()=>{var e,t,l,o,a;if(x.value)return;const n={[u.top]:u.bottom,[u.right]:u.left,[u.bottom]:u.top,[u.left]:u.right}[E.value];return{left:void 0!==(null==(e=$.value.arrow)?void 0:e.x)?`${null==(t=$.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(l=$.value.arrow)?void 0:l.y)?`${null==(o=$.value.arrow)?void 0:o.y}px`:void 0,[n]:-((null==(a=S.value)?void 0:a.offsetWidth)??0)/2+"px"}})),A=a.useVModel(s,"modelValue",r),D=e.ref(!1),j=e.computed({get:()=>A.value??D.value,set:e=>{void 0!==A.value?A.value=e:D.value=e}}),R=()=>{j.value=!0},F=()=>{j.value=!1},z=()=>{j.value=!j.value},H=e=>{V.value=e};o({toggle:z,show:R,hide:F,init:H,customPosition:x}),e.watch(j,(t=>{t&&s.autofocusFirst&&e.nextTick((()=>{const e=X(y.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),a.onClickOutside(y,(()=>{!s.keepOpen&&j.value&&(j.value=!1)}),{ignore:[V]});const I=e.computed((()=>{var e,t;return(null==(t=null==(e=V.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),T=e.computed((()=>({"aria-controls":c.value,"aria-haspopup":!0,"aria-expanded":j.value}))),{component:M,bus:q}=function({reference:t,id:l,expanded:o,aria:a}){const r=n(),i=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(h,{reference:t,id:l,expanded:o,aria:a,bus:r})},render(){var t,l;return e.h(e.Fragment,{},null==(l=(t=this.$slots).default)?void 0:l.call(t))}});return{bus:r,component:i}}({reference:V,id:c,expanded:j,aria:T});q.on("click",z);const{role:K,modifiers:W}=e.toRefs(s),{itemRole:G}=function({role:t,expanded:l}){const o=e.computed((()=>t.value===f.listbox?m.option:m.presentation));return e.provide(k,{role:o,expanded:l}),{itemRole:o}}({role:K,expanded:j}),U=J("vv-dropdown",W,e.computed((()=>({arrow:s.arrow})))),{focused:Q}=a.useFocusWithin(y);function X(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}a.onKeyStroke("Escape",(e=>{j.value&&(e.preventDefault(),F())})),a.onKeyStroke("ArrowDown",(t=>{j.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),a.onKeyStroke("ArrowUp",(t=>{j.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),a.onKeyStroke([" ","Enter"],(e=>{const t=e.target;j.value&&Q.value&&t&&(null==t||t.click())}));const ee={"before-enter":()=>{r(j.value?"beforeExpand":"beforeCollapse"),r("before-enter")},"after-leave":()=>{r(j.value?"afterExpand":"afterCollapse"),r("after-leave")},enter:()=>{r("enter")},"after-enter":()=>{r("after-enter")},"enter-cancelled":()=>{r("enter-cancelled")},"before-leave":()=>{r("before-leave")},leave:()=>{r("leave")},"leave-cancelled":()=>{r("leave-cancelled")}};return(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(M),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:H,show:R,hide:F,toggle:z,expanded:e.unref(j),aria:e.unref(T)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(ee)),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:y,style:e.normalizeStyle(e.unref(O)),class:e.normalizeClass(e.unref(U))},[s.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:S,style:e.normalizeStyle(e.unref(N)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(j)}))),e.createElementVNode("div",e.mergeProps(e.unref(v),{id:e.unref(c),ref_key:"listEl",ref:B,tabindex:e.unref(j)?void 0:-1,role:e.unref(K),"aria-labelledby":e.unref(I),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(G)})))],16,Z),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(j)})))],6),[[e.vShow,e.unref(j)]])])),_:3},16,["name"])],64))}});const te=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:l,expanded:o}=e.inject(k,{}),n=e.ref(null);!function({expanded:t}){e.provide(S,{role:e.ref(p.menuitem),expanded:t})}({expanded:o});const r=a.useElementHover(n),{focused:i}=a.useFocus(n),{focused:u}=a.useFocusWithin(n);return e.watch(r,(e=>{e&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(l)},{ref_key:"element",ref:n,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(u)}]}),[e.renderSlot(t.$slots,"default")],16))}}),le=["title"],oe=e.defineComponent({name:"VvDropdownOption",props:{...L,...P,...z,...N,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String}},setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=J("vv-dropdown-option",o,e.computed((()=>({disabled:l.disabled,selected:l.selected,unselectable:l.unselectable&&l.selected})))),n=e.computed((()=>l.selected?l.unselectable?l.deselectHintLabel:l.selectedHintLabel:l.disabled?void 0:l.selectHintLabel));return(t,l)=>(e.openBlock(),e.createBlock(te,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,le)])),_:3},8,["class","tabindex","aria-selected","aria-disabled"]))}}),ae={class:"vv-dropdown-optgroup",role:"presentation",tabindex:"-1"},ne=e.defineComponent({name:"VvDropdownOptgroup",props:{...O},setup(t){const l=t;return(t,o)=>(e.openBlock(),e.createElementBlock("li",ae,e.toDisplayString(l.label),1))}});function re(e,t,l){return l?ue(e,l)===ue(t,l):ie(e,t)}function ie(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),o=Array.isArray(t);let a,n,r;if(l&&o){if(n=e.length,n!=t.length)return!1;for(a=n;0!=a--;)if(!ie(e[a],t[a]))return!1;return!0}if(l!=o)return!1;const i=e instanceof Date,u=t instanceof Date;if(i!=u)return!1;if(i&&u)return e.getTime()==t.getTime();const s=e instanceof RegExp,d=t instanceof RegExp;if(s!=d)return!1;if(s&&d)return e.toString()==t.toString();const c=Object.keys(e);if(n=c.length,n!==Object.keys(t).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,c[a]))return!1;for(a=n;0!=a--;)if(r=c[a],!ie(e[r],t[r]))return!1;return!0}return e!=e&&t!=t}function ue(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,a=l.length;t<a;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function se(e,t){if(null!=e&&t&&t.length)for(const l of t)if(re(e,l))return!0;return!1}function de(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function ce(e,t){const l=function(e,t){let l=-1;if(t)for(let o=0;o<t.length;o++)if(re(t[o],e)){l=o;break}return l}(e,t);return l>-1?t.filter(((e,t)=>t!==l)):t}function ve(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function pe(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>ve(o.value.invalidLabel))),n=e.computed((()=>ve(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),i=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),s=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),d=e.computed((()=>!u.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!u.value&&!s.value&&!d.value&&Boolean(l.hint||i.value))),v=e.computed((()=>s.value||d.value||u.value||c.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,r,i,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:f}}const fe={...T,...M,...q,...R,...V,...x,...A,...w,...L,...E,...N,...D,...j,...F,...z,...O,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String};function me(t,l,o){const a=U(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}function be(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}function ge(t,l){const o=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===d.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===d.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.left))),r=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.right))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.top))),s=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:r,hasIconTop:i,hasIconBottom:s,hasIconBefore:o,hasIconAfter:a}}function ye(t){const{options:l,labelKey:o,valueKey:a,disabledKey:n}=e.toRefs(t);return{options:l,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof o.value?o.value(e):r.get(e,o.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof a.value?a.value(e):r.get(e,a.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof n.value?n.value(e):r.get(e,n.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}const he=["for"],ke={class:"vv-select__wrapper"},Se={key:0,class:"vv-select__input-before"},Be={class:"vv-select__inner"},Ve=["id"],xe=["disabled","hidden"],we=["disabled","value"],Le=["disabled","label"],Pe=["disabled","value"],$e={key:1,class:"vv-select__input-after"},_e=e.defineComponent({name:"VvSelect",props:fe,emits:["update:modelValue","focus","blur"],setup(t,{emit:l}){const o=t,n=e.useSlots(),r=me("VvSelect",fe,o),i=e.ref(),{HintSlot:u,hasHintLabelOrSlot:s,hasInvalidLabelOrSlot:d,hintSlotScope:c}=pe(r,n),{id:v,modifiers:p,disabled:f,readonly:m,loading:b,icon:g,iconPosition:y,invalid:h,valid:k,floating:S,multiple:B}=e.toRefs(o),V=Y(v),x=e.computed((()=>`${V.value}-hint`)),{focused:w}=be(i,l),L=a.useElementVisibility(i);e.watch(L,(e=>{e&&o.autofocus&&(w.value=!0)}));const{hasIcon:P,hasIconBefore:$,hasIconAfter:_}=ge(g,y),C=e.computed((()=>!de(o.modelValue))),O=e.computed((()=>o.disabled||o.readonly)),E=e.computed((()=>O.value?-1:o.tabindex)),N=e.computed((()=>!0===o.invalid||!0!==o.valid&&void 0)),A=J("vv-select",p,e.computed((()=>({valid:k.value,invalid:h.value,loading:b.value,disabled:f.value,readonly:m.value,"icon-before":$.value,"icon-after":_.value,dirty:C.value,focus:w.value,floating:S.value,multiple:B.value})))),D=e.computed((()=>({name:o.name,tabindex:E.value,disabled:O.value,required:o.required,size:o.size,autocomplete:o.autocomplete,multiple:o.multiple,"aria-invalid":N.value,"aria-describedby":s.value?x.value:void 0,"aria-errormessage":d.value?x.value:void 0}))),j=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue}))),{getOptionLabel:R,getOptionValue:F,isOptionDisabled:z,getOptionGrouped:H}=ye(o),I=e.computed({get:()=>o.modelValue,set:e=>{Array.isArray(e)&&(e=e.filter((e=>void 0!==e))),l("update:modelValue",e)}}),T=e=>"string"!=typeof e&&(e&&e.options&&e.options.length>0);return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(A))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(V)},e.toDisplayString(t.label),9,he)):e.createCommentVNode("",!0),e.createElementVNode("div",ke,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(j))))])):e.createCommentVNode("",!0),e.createElementVNode("div",Be,[e.unref($)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(P)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(V),ref_key:"select",ref:i,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(I)?I.value=t:null)},e.unref(D)),[t.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!t.unselectable,hidden:!t.unselectable},e.toDisplayString(t.placeholder),9,xe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,((t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[T(t)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${l}`,disabled:e.unref(z)(t),label:e.unref(R)(t)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(H)(t),((t,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${l}-item-${o}`,disabled:e.unref(z)(t),value:e.unref(F)(t)},e.toDisplayString(e.unref(R)(t)),9,Pe)))),128))],8,Le)):(e.openBlock(),e.createElementBlock("option",{key:l,disabled:e.unref(z)(t),value:e.unref(F)(t)},e.toDisplayString(e.unref(R)(t)),9,we))],64)))),256))],16,Ve),[[e.vModelSelect,e.unref(I)]]),e.unref(_)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(P)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(j))))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(u),{id:e.unref(x),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"3"}:void 0]),1032,["id"])],2))}}),Ce={...N,value:[String,Number]},Oe=e.defineComponent({name:"VvBadge",props:Ce,setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=J("vv-badge",o);return(t,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),role:"status"},[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.value),1)]))],2))}}),Ee=K,Ne=e.defineComponent({name:"VvAction",props:Ee,emits:["click","mouseover","mouseleave"],setup(t,{expose:l,emit:o}){const a=t,n=U(),r=e.ref(null);l({$el:r});const{reference:i,bus:u,aria:s,expanded:d}=e.inject(h,{});e.watch((()=>r.value),(e=>{i&&(i.value=e)}));const c=e.computed((()=>a.pressed||(null==d?void 0:d.value))),{role:p}=e.inject(S,{}),f=e.computed((()=>{switch(!0){case a.disabled:return v.button;case void 0!==a.to:return(null==n?void 0:n.nuxt)?v.nuxtLink:v.routerLink;case void 0!==a.href:return v.a;default:return v.button}})),m=e.computed((()=>{const e={...null==s?void 0:s.value,ariaPressed:!!c.value||void 0,ariaLabel:a.ariaLabel,role:null==p?void 0:p.value};switch(f.value){case v.a:return{...e,href:a.href,target:a.target,rel:a.rel};case v.routerLink:case v.nuxtLink:return{...e,to:a.to,target:a.target};default:return{...e,type:a.type,disabled:a.disabled}}})),b=e=>{a.disabled?e.preventDefault():(null==u||u.emit("click",e),o("click",e))},g=e=>{null==u||u.emit("mouseover",e),o("mouseover",e)},y=e=>{null==u||u.emit("mouseleave",e),o("mouseleave",e)};return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),e.mergeProps(e.unref(m),{ref_key:"element",ref:r,class:{active:t.active,pressed:e.unref(c),disabled:t.disabled,current:t.current},onClickPassive:b,onMouseoverPassive:g,onMouseleavePassive:y}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const Ae={...K,...H,...N,...z,...w,icon:[String,Object],iconPosition:{type:String,default:u.left,validator:e=>Object.values(u).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function De(t,l){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),o=e.computed((()=>!de(l)));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){if(null==l?void 0:l.value){const o=e.unref(l.value)[t];return e.computed({get:()=>null==o?void 0:o.value,set(e){o.value=e}})}const n=e.toRef(o,t);return e.computed({get:()=>n.value,set(e){a&&a(`update:${t}`,e)}})}}}(y),{id:r,iconPosition:i,icon:u,label:s,pressed:d}=e.toRefs(t),c=n("modelValue",t,l),v=n("toggle",t),p=n("unselectable",t),f=e.computed((()=>(null==o?void 0:o.value.multiple.value)??!1)),m=e.computed((()=>{let e=t.modifiers,l=null==o?void 0:o.value.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),l&&(Array.isArray(l)||(l=l.split(" ")),l.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==o?void 0:o.value)?void 0:e.disabled.value))}));return{group:o,isInGroup:a,modelValue:c,toggle:v,unselectable:p,multiple:f,modifiers:m,disabled:b,id:r,pressed:d,iconPosition:i,icon:u,label:s}}const je={key:1,class:"vv-button__label"},Re={key:1,class:"vv-button__label"},Fe=e.defineComponent({name:"VvButton",props:Ae,emits:["update:modelValue"],setup(t,{expose:l,emit:o}){const a=t,n=e.useAttrs(),r=e.useSlots(),{id:i,modifiers:s,iconPosition:d,icon:c,label:v,modelValue:p,disabled:f,toggle:m,unselectable:b}=De(a,o),g=Y(i),y=e.computed((()=>(null==n?void 0:n.name)||g.value)),h=e.ref(null);l({$el:e.computed((()=>{var e;return null==(e=h.value)?void 0:e.$el}))});const k=e.computed((()=>m.value?Array.isArray(p.value)?se(y.value,p.value):re(y.value,p.value):a.pressed)),S=J("vv-button",s,e.computed((()=>({reverse:[u.right,u.bottom].includes(d.value),column:[u.top,u.bottom].includes(d.value),"icon-only":Boolean((null==c?void 0:c.value)&&!(null==v?void 0:v.value)&&!r.default)})))),B=e.computed((()=>"string"==typeof(null==c?void 0:c.value)?{name:null==c?void 0:c.value}:null==c?void 0:c.value)),V=e.computed((()=>void 0!==a.value?a.value:y.value)),x=()=>{if(m.value){if(Array.isArray(p.value))return se(V.value,p.value)?void(b.value&&(p.value=p.value.filter((e=>e!==V.value)))):void p.value.push(V.value);if(V.value===p.value&&b.value)return void(p.value=a.uncheckedValue);p.value=V.value}};return(t,l)=>(e.openBlock(),e.createBlock(Ne,e.mergeProps({disabled:e.unref(f),pressed:e.unref(k),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(g),ref_key:"element",ref:h,class:e.unref(S),onClick:x}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(Q,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(c)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:0,class:"vv-button__icon"},e.unref(B)),null,16)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("span",Re,[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]))])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"after")],64))]))])),_:3},16,["id","class"]))}}),ze=["id"],He=["id","for"],Ie=["id","aria-controls","placeholder"],Te={key:0,class:"vv-select__input-before"},Me={class:"vv-select__inner"},qe=["aria-expanded","aria-labelledby","aria-describedby","aria-errormessage","tabindex"],Ke={key:0,class:"vv-select__value"},We=["aria-label","onClick"],Ge={key:1,class:"vv-select__input-after"},Ue={name:"VvCombobox",components:{VvDropdown:ee,VvDropdownOption:oe,VvDropdownOptgroup:ne,VvButton:Fe}};return e.defineComponent({...Ue,props:W,emits:["update:modelValue","change:search","focus","blur"],setup(t,{emit:l}){const o=t,n=e.useSlots(),r=me("VvCombobox",W,o),i=e=>"string"!=typeof e&&(e.options&&e.options.length>0),{HintSlot:u,hasHintLabelOrSlot:s,hasInvalidLabelOrSlot:d,hintSlotScope:c}=pe(r,n),v=e.ref(null),p=e.ref(null),m=e.ref(null),{focused:b}=be(v,l),{focused:g}=a.useFocusWithin(m);e.watch(b,(e=>{o.autoOpen&&(!e||k.value?e||!k.value||g.value||V():B())})),e.watch(g,(e=>{b.value||e||!k.value||V()}));const y=e.ref(""),h=a.refDebounced(y,e.computed((()=>Number(o.debounceSearch))));e.watch(h,(()=>l("change:search",h.value)));const k=e.ref(!1),S=()=>{o.disabled||o.readonly||(k.value=!k.value)},B=()=>{o.disabled||o.readonly||k.value||(k.value=!0)},V=()=>{o.disabled||o.readonly||!k.value||(k.value=!1)},x=()=>{r.value.searchable&&p.value&&p.value.focus({preventScroll:!0})},w=()=>{r.value.searchable&&(y.value="")},{id:L,icon:P,iconPosition:$,modifiers:_,disabled:C,readonly:O,loading:E,valid:N,invalid:A,floating:D}=e.toRefs(o),j=Y(L),R=e.computed((()=>`${j.value}-hint`)),F=e.computed((()=>`${j.value}-dropdown`)),z=e.computed((()=>`${j.value}-search`)),H=e.computed((()=>`${j.value}-label`)),I=e.ref(!1),T=e.computed((()=>I.value||E.value)),M=e.ref(),{hasIcon:q,hasIconBefore:K,hasIconAfter:G}=ge(P,$),U=e.computed((()=>!de(o.modelValue))),X=e.computed((()=>C.value||O.value?-1:o.tabindex)),Z=J("vv-select",_,e.computed((()=>({disabled:C.value,loading:T.value,readonly:O.value,"icon-before":Boolean(K.value),"icon-after":Boolean(G.value),valid:N.value,invalid:A.value,dirty:U.value,focus:b.value,floating:D.value,badges:o.badges})))),{getOptionLabel:te,getOptionValue:le,getOptionGrouped:ae,isOptionDisabled:ie}=ye(o),ue=a.computedAsync((async()=>{var e;if(r.value.searchFunction){I.value=!0;const e=await Promise.resolve(r.value.searchFunction(h.value,o.options));return I.value=!1,e}return null==(e=o.options)?void 0:e.filter((e=>te(e).toLowerCase().includes(h.value.toLowerCase().trim())))}));function ve(e){return Array.isArray(o.modelValue)?se(e,o.modelValue)||se(le(e),o.modelValue):re(e,o.modelValue)||re(le(e),o.modelValue)}const fe=e.computed((()=>o.options.reduce(((e,t)=>i(t)?[...e,...ae(t)]:[...e,t]),[]).filter((e=>ve(e))))),he=e.computed((()=>fe.value.map((e=>te(e))).join(o.separator))),ke=()=>{o.autoOpen?B():S()},Se=e=>{var t;if(o.disabled||o.readonly)return;const a=le(e);let n=a;if(o.multiple)if(Array.isArray(o.modelValue)){const e=Number(o.maxValues);if(void 0!==o.maxValues&&e>=0&&(null==(t=o.modelValue)?void 0:t.length)>=e&&!se(a,o.modelValue))return;n=se(a,o.modelValue)?ce(a,o.modelValue):[...o.modelValue,a]}else n=[a];else o.keepOpen||V(),Array.isArray(o.modelValue)?n=o.unselectable&&o.modelValue.includes(a)?[]:[a]:o.unselectable&&a===o.modelValue&&(n=void 0);l("update:modelValue",n)},Be=e.computed((()=>({id:j.value,name:o.name,tabindex:X.value,valid:N.value,validLabel:r.value.validLabel,invalid:A.value,invalidLabel:r.value.invalidLabel,hintLabel:r.value.hintLabel,loading:T.value,loadingLabel:r.value.loadingLabel,disabled:C.value,readonly:O.value,modifiers:r.value.modifiers,options:r.value.options,labelKey:r.value.labelKey,valueKey:r.value.valueKey,icon:r.value.icon,iconPosition:r.value.iconPosition,floating:r.value.floating,unselectable:r.value.unselectable,multiple:r.value.multiple,label:r.value.label,placeholder:r.value.placeholder,modelValue:o.modelValue}))),Ve=e.computed((()=>({id:F.value,reference:m.value,placement:r.value.placement,strategy:r.value.strategy,transitionName:r.value.transitionName,offset:r.value.offset,shift:r.value.shift,flip:r.value.flip,autoPlacement:r.value.autoPlacement,arrow:r.value.arrow,autofocusFirst:!!r.value.searchable||r.value.autofocusFirst,triggerWidth:r.value.triggerWidth,modifiers:r.value.dropdownModifiers}))),xe=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue})));return a.onKeyStroke([" ","Enter"],(e=>{o.autoOpen||!k.value&&b.value&&(e.preventDefault(),e.stopImmediatePropagation(),S())}),{target:v}),(t,o)=>t.native?(e.openBlock(),e.createBlock(_e,e.mergeProps({key:1},e.unref(Be),{"onUpdate:modelValue":o[3]||(o[3]=e=>l("update:modelValue",e))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(j),class:e.normalizeClass(e.unref(Z))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:e.unref(H),for:e.unref(r).searchable?e.unref(z):void 0},e.toDisplayString(t.label),9,He)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:m,class:"vv-select__wrapper"},[e.createVNode(ee,e.mergeProps({ref_key:"dropdownEl",ref:M,modelValue:e.unref(k),"onUpdate:modelValue":o[2]||(o[2]=t=>e.isRef(k)?k.value=t:null)},e.unref(Ve),{role:e.unref(f).listbox,onAfterExpand:x,onAfterCollapse:w}),e.createSlots({default:e.withCtx((({aria:l})=>[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(xe))))])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.unref(K)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(q)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({ref_key:"inputEl",ref:v},l,{class:"vv-select__input",role:"combobox","aria-expanded":e.unref(k),"aria-labelledby":e.unref(H),"aria-describedby":e.unref(s)?e.unref(R):void 0,"aria-errormessage":e.unref(d)?e.unref(R):void 0,tabindex:e.unref(X),onClickPassive:ke}),[e.renderSlot(t.$slots,"value",e.normalizeProps(e.guardReactiveProps({selectedOptions:e.unref(fe),onInput:Se})),(()=>[e.unref(he)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.badges?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(fe),((l,o)=>(e.openBlock(),e.createBlock(Oe,{key:o,modifiers:t.badgeModifiers,class:"vv-select__badge"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(te)(l))+" ",1),!t.unselectable||e.unref(O)||e.unref(C)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(r).deselectActionLabel,type:"button",onClick:e.withModifiers((e=>Se(l)),["stop"])},[e.createVNode(Q,{name:"close"})],8,We))])),_:2},1032,["modifiers"])))),128)):(e.openBlock(),e.createElementBlock("div",Ke,e.toDisplayString(e.unref(he)),1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.placeholder),1)],64))]))],16,qe),e.unref(G)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(q)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(xe))))])):e.createCommentVNode("",!0)])),items:e.withCtx((()=>{var l;return[!e.unref(C)&&(null==(l=e.unref(ue))?void 0:l.length)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(ue),((l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[i(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(ne,{label:e.unref(te)(l)},null,8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae)(l),((o,a)=>(e.openBlock(),e.createBlock(oe,e.mergeProps({selected:ve(o),disabled:e.unref(ie)(o),unselectable:t.unselectable,deselectHintLabel:e.unref(r).deselectHintLabel,selectHintLabel:e.unref(r).selectHintLabel,selectedHintLabel:e.unref(r).selectedHintLabel},{key:a,class:"vv-dropdown-option",onClickPassive:e=>Se(o)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.normalizeProps(e.guardReactiveProps({option:l,selectedOptions:e.unref(fe),selected:ve(o),disabled:e.unref(ie)(o)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(te)(o)),1)]))])),_:2},1040,["onClickPassive"])))),128))],64)):(e.openBlock(),e.createBlock(oe,e.mergeProps({key:1},{selected:ve(l),disabled:e.unref(ie)(l),unselectable:t.unselectable,deselectHintLabel:e.unref(r).deselectHintLabel,selectHintLabel:e.unref(r).selectHintLabel,selectedHintLabel:e.unref(r).selectedHintLabel},{class:"vv-dropdown-option",onClickPassive:e=>Se(l)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.normalizeProps(e.guardReactiveProps({option:l,selectedOptions:e.unref(fe),selected:ve(l),disabled:e.unref(ie)(l)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(te)(l)),1)]))])),_:2},1040,["onClickPassive"]))],64)))),128)):t.options.length?e.unref(C)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe,{key:2,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-results",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).noResultsLabel),1)]))])),_:3})):(e.openBlock(),e.createBlock(oe,{key:1,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-options",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).noOptionsLabel),1)]))])),_:3}))]})),after:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::after",{},(()=>{var t;return[(null==(t=e.unref(M))?void 0:t.customPosition)?(e.openBlock(),e.createBlock(Fe,{key:0,label:e.unref(r).closeLabel,modifiers:"secondary",onClick:o[1]||(o[1]=t=>e.unref(M).hide())},null,8,["label"])):e.createCommentVNode("",!0)]}))])),_:2},[e.unref(r).searchable||t.$slots["dropdown::before"]?{name:"before",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::before"),e.unref(r).searchable&&!e.unref(C)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:e.unref(z),ref_key:"inputSearchEl",ref:p,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(y)?y.value=t:null),"aria-autocomplete":"list","aria-controls":e.unref(F),autocomplete:"off",spellcheck:"false",type:"search",class:"vv-dropdown__search",placeholder:e.unref(r).searchPlaceholder},null,8,Ie)),[[e.vModelText,e.unref(y)]]):e.createCommentVNode("",!0)])),key:"0"}:void 0]),1040,["modelValue","role"])],512),e.createVNode(e.unref(u),{id:e.unref(R),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"3"}:void 0]),1032,["id"])],10,ze))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@floating-ui/vue","uid","@vueuse/core","mitt","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCombobox=t(e.vue,e.vue$1,e.vue$2,e.uid,e.core,e.mitt,e.tsDotProp)}(this,(function(e,t,l,o,a,n,r){"use strict";var i=(e=>(e.absolute="absolute",e.fixed="fixed",e))(i||{}),u=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(u||{}),s=(e=>(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))(s||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),c=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(c||{}),v=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(v||{}),p=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(p||{}),f=(e=>(e.listbox="listbox",e.menu="menu",e))(f||{}),m=(e=>(e.option="option",e.presentation="presentation",e))(m||{}),b=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(b||{});const g=Symbol.for("volver"),y=Symbol.for("buttonGroup"),h=Symbol.for("dropdownTrigger"),k=Symbol.for("dropdownItem"),S=Symbol.for("dropdownAction"),B={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(b).includes(e)},rel:{type:String,default:"noopener noreferrer"}},V={valid:Boolean,validLabel:[String,Array]},x={invalid:Boolean,invalidLabel:[String,Array]},w={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},L={disabled:Boolean},P={selected:Boolean},$={active:Boolean},_={current:Boolean},C={pressed:Boolean},O={label:[String,Number]},E={readonly:Boolean},N={modifiers:[String,Array]},A={hintLabel:{type:String,default:""}},D={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},j={icon:{type:[String,Object]},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},R={tabindex:{type:[String,Number],default:0}},F={floating:Boolean},z={unselectable:{type:Boolean,default:!0}},H={id:[String,Number]},I={placement:{type:String,default:u.bottom,validator:e=>Object.values(u).includes(e)||Object.values(s).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(i).includes(e)},transitionName:{type:String},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}},T={...H,name:{type:String,required:!0}},M={autofocus:Boolean},q={autocomplete:{type:String,default:"off"}},K={...L,...O,...C,...$,..._,...B,type:{type:String,default:c.button,validator:e=>Object.values(c).includes(e)},ariaLabel:{type:String,default:void 0}},W={...T,...R,...V,...x,...A,...w,...L,...E,...N,...D,...j,...F,...z,...I,...O,transitionName:{type:String,default:"vv-dropdown--mobile-fade-block"},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},noResultsLabel:{type:String,default:"No results"},noOptionsLabel:{type:String,default:"No options available"},selectedHintLabel:{type:String,default:"Selected"},deselectActionLabel:{type:String,default:"Deselect"},selectHintLabel:{type:String,default:"Press enter to select"},deselectHintLabel:{type:String,default:"Press enter to remove"},closeLabel:{type:String,default:"Close"},placeholder:String,searchable:Boolean,searchFunction:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search..."},debounceSearch:{type:[Number,String],default:0},multiple:Boolean,maxValues:[Number,String],separator:{type:String,default:", "},native:Boolean,badges:Boolean,badgeModifiers:{type:[String,Array],default:"action sm"},triggerWidth:{...I.triggerWidth,default:!0},dropdownModifiers:{type:[String,Array],default:"mobile"},autoOpen:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1}},G={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};function U(){return e.inject(g)}function J(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const Q=e.defineComponent({name:"VvIcon",props:G,setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=U(),{modifiers:i}=e.toRefs(o),u=J("vv-icon",i),s=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),d=e.computed((()=>{const e=o.name??"",l=`@${s.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==r?void 0:r.iconsCollections.find((l=>{const o=`@${s.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${s.value}:${a.prefix}:${e}`:e}));function c(e){const l=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${s.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return r&&o.src&&!t.iconExists(`@${s.value}:${o.prefix}:${o.name}`)&&(n.value=!1,r.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),X={...H,...I,...N,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:f.menu,validator:e=>Object.values(f).includes(e)}},Y=t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid())));const Z=["id","tabindex","role","aria-labelledby"],ee=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:X,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(t,{expose:o,emit:r}){const s=t,{id:d}=e.toRefs(s),c=Y(d),v=e.useAttrs(),p=e.ref("auto"),b=e.ref("auto"),g=e.ref(null),y=e.ref(),S=e.ref(null),B=e.ref(null),V=e.computed({get:()=>s.reference??g.value,set:e=>{g.value=e}}),x=e.ref(!1);e.onMounted((()=>{a.useMutationObserver(y.value,(()=>{var e;x.value="true"===(null==(e=window.getComputedStyle(y.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const w=e.computed((()=>{const e=[];if(s.autoPlacement?"boolean"==typeof s.autoPlacement?e.push(l.autoPlacement()):e.push(l.autoPlacement(s.autoPlacement)):s.flip&&("boolean"==typeof s.flip?e.push(l.flip({fallbackStrategy:"initialPlacement"})):e.push(l.flip(s.flip))),s.shift&&("boolean"==typeof s.shift?e.push(l.shift()):e.push(l.shift(s.shift))),s.size){const t=({availableWidth:e,availableHeight:t})=>{p.value=`${e}px`,b.value=`${t}px`};"boolean"==typeof s.size?e.push(l.size({apply:t})):e.push(l.size({...s.size,apply:t}))}return s.offset&&(e.push(l.offset(Number(s.offset))),["string","number"].includes(typeof s.offset)?e.push(l.offset(Number(s.offset))):e.push(l.offset(s.offset))),s.arrow&&e.push(l.arrow({element:S})),e})),{x:L,y:P,middlewareData:$,placement:_,strategy:C}=l.useFloating(V,y,{whileElementsMounted:(...e)=>l.autoUpdate(...e,{animationFrame:s.strategy===i.fixed}),placement:e.computed((()=>s.placement)),strategy:e.computed((()=>s.strategy)),middleware:w}),O=e.computed((()=>{var e;if(x.value)return;const t=s.triggerWidth&&V.value?`${null==(e=V.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${P.value??0}px`,left:`${L.value??0}px`,maxWidth:t?void 0:p.value,maxHeight:b.value,width:t}})),E=e.computed((()=>_.value.split("-")[0])),N=e.computed((()=>{var e,t,l,o,a;if(x.value)return;const n={[u.top]:u.bottom,[u.right]:u.left,[u.bottom]:u.top,[u.left]:u.right}[E.value];return{left:void 0!==(null==(e=$.value.arrow)?void 0:e.x)?`${null==(t=$.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(l=$.value.arrow)?void 0:l.y)?`${null==(o=$.value.arrow)?void 0:o.y}px`:void 0,[n]:-((null==(a=S.value)?void 0:a.offsetWidth)??0)/2+"px"}})),A=a.useVModel(s,"modelValue",r),D=e.ref(!1),j=e.computed({get:()=>A.value??D.value,set:e=>{void 0!==A.value?A.value=e:D.value=e}}),R=()=>{j.value=!0},F=()=>{j.value=!1},z=()=>{j.value=!j.value},H=e=>{V.value=e};o({toggle:z,show:R,hide:F,init:H,customPosition:x}),e.watch(j,(t=>{t&&s.autofocusFirst&&e.nextTick((()=>{const e=X(y.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),a.onClickOutside(y,(()=>{!s.keepOpen&&j.value&&(j.value=!1)}),{ignore:[V]});const I=e.computed((()=>{var e,t;return(null==(t=null==(e=V.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),T=e.computed((()=>({"aria-controls":c.value,"aria-haspopup":!0,"aria-expanded":j.value}))),{component:M,bus:q}=function({reference:t,id:l,expanded:o,aria:a}){const r=n(),i=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(h,{reference:t,id:l,expanded:o,aria:a,bus:r})},render(){var t,l;return e.h(e.Fragment,{},null==(l=(t=this.$slots).default)?void 0:l.call(t))}});return{bus:r,component:i}}({reference:V,id:c,expanded:j,aria:T});q.on("click",z);const{role:K,modifiers:W}=e.toRefs(s),{itemRole:G}=function({role:t,expanded:l}){const o=e.computed((()=>t.value===f.listbox?m.option:m.presentation));return e.provide(k,{role:o,expanded:l}),{itemRole:o}}({role:K,expanded:j}),U=J("vv-dropdown",W,e.computed((()=>({arrow:s.arrow})))),{focused:Q}=a.useFocusWithin(y);function X(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}a.onKeyStroke("Escape",(e=>{j.value&&(e.preventDefault(),F())})),a.onKeyStroke("ArrowDown",(t=>{j.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),a.onKeyStroke("ArrowUp",(t=>{j.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),a.onKeyStroke([" ","Enter"],(e=>{const t=e.target;j.value&&Q.value&&t&&(null==t||t.click())}));const ee={"before-enter":()=>{r(j.value?"beforeExpand":"beforeCollapse"),r("before-enter")},"after-leave":()=>{r(j.value?"afterExpand":"afterCollapse"),r("after-leave")},enter:()=>{r("enter")},"after-enter":()=>{r("after-enter")},"enter-cancelled":()=>{r("enter-cancelled")},"before-leave":()=>{r("before-leave")},leave:()=>{r("leave")},"leave-cancelled":()=>{r("leave-cancelled")}};return(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(M),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:H,show:R,hide:F,toggle:z,expanded:e.unref(j),aria:e.unref(T)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(ee)),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:y,style:e.normalizeStyle(e.unref(O)),class:e.normalizeClass(e.unref(U))},[s.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:S,style:e.normalizeStyle(e.unref(N)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(j)}))),e.createElementVNode("div",e.mergeProps(e.unref(v),{id:e.unref(c),ref_key:"listEl",ref:B,tabindex:e.unref(j)?void 0:-1,role:e.unref(K),"aria-labelledby":e.unref(I),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(G)})))],16,Z),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(j)})))],6),[[e.vShow,e.unref(j)]])])),_:3},16,["name"])],64))}});const te=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:l,expanded:o}=e.inject(k,{}),n=e.ref(null);!function({expanded:t}){e.provide(S,{role:e.ref(p.menuitem),expanded:t})}({expanded:o});const r=a.useElementHover(n),{focused:i}=a.useFocus(n),{focused:u}=a.useFocusWithin(n);return e.watch(r,(e=>{e&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(l)},{ref_key:"element",ref:n,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(u)}]}),[e.renderSlot(t.$slots,"default")],16))}}),le=["title"],oe=e.defineComponent({name:"VvDropdownOption",props:{...L,...P,...z,...N,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String}},setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=J("vv-dropdown-option",o,e.computed((()=>({disabled:l.disabled,selected:l.selected,unselectable:l.unselectable&&l.selected})))),n=e.computed((()=>l.selected?l.unselectable?l.deselectHintLabel:l.selectedHintLabel:l.disabled?void 0:l.selectHintLabel));return(t,l)=>(e.openBlock(),e.createBlock(te,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,le)])),_:3},8,["class","tabindex","aria-selected","aria-disabled"]))}}),ae={class:"vv-dropdown-optgroup",role:"presentation",tabindex:"-1"},ne=e.defineComponent({name:"VvDropdownOptgroup",props:{...O},setup(t){const l=t;return(t,o)=>(e.openBlock(),e.createElementBlock("li",ae,e.toDisplayString(l.label),1))}});function re(e,t,l){return l?ue(e,l)===ue(t,l):ie(e,t)}function ie(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),o=Array.isArray(t);let a,n,r;if(l&&o){if(n=e.length,n!=t.length)return!1;for(a=n;0!=a--;)if(!ie(e[a],t[a]))return!1;return!0}if(l!=o)return!1;const i=e instanceof Date,u=t instanceof Date;if(i!=u)return!1;if(i&&u)return e.getTime()==t.getTime();const s=e instanceof RegExp,d=t instanceof RegExp;if(s!=d)return!1;if(s&&d)return e.toString()==t.toString();const c=Object.keys(e);if(n=c.length,n!==Object.keys(t).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,c[a]))return!1;for(a=n;0!=a--;)if(r=c[a],!ie(e[r],t[r]))return!1;return!0}return e!=e&&t!=t}function ue(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,a=l.length;t<a;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function se(e,t){if(null!=e&&t&&t.length)for(const l of t)if(re(e,l))return!0;return!1}function de(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function ce(e,t){const l=function(e,t){let l=-1;if(t)for(let o=0;o<t.length;o++)if(re(t[o],e)){l=o;break}return l}(e,t);return l>-1?t.filter(((e,t)=>t!==l)):t}function ve(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function pe(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>ve(o.value.invalidLabel))),n=e.computed((()=>ve(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),i=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),s=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),d=e.computed((()=>!u.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!u.value&&!s.value&&!d.value&&Boolean(l.hint||i.value))),v=e.computed((()=>s.value||d.value||u.value||c.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,r,i,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:f}}const fe={...T,...M,...q,...R,...V,...x,...A,...w,...L,...E,...N,...D,...j,...F,...z,...O,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String};function me(t,l,o){const a=U(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}function be(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}function ge(t,l){const o=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===d.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===d.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.left))),r=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.right))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.top))),s=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:r,hasIconTop:i,hasIconBottom:s,hasIconBefore:o,hasIconAfter:a}}function ye(t){const{options:l,labelKey:o,valueKey:a,disabledKey:n}=e.toRefs(t);return{options:l,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof o.value?o.value(e):r.get(e,o.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof a.value?a.value(e):r.get(e,a.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof n.value?n.value(e):r.get(e,n.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}const he=["for"],ke={class:"vv-select__wrapper"},Se={key:0,class:"vv-select__input-before"},Be={class:"vv-select__inner"},Ve=["id"],xe=["disabled","hidden"],we=["disabled","value"],Le=["disabled","label"],Pe=["disabled","value"],$e={key:1,class:"vv-select__input-after"},_e=e.defineComponent({name:"VvSelect",props:fe,emits:["update:modelValue","focus","blur"],setup(t,{emit:l}){const o=t,n=e.useSlots(),r=me("VvSelect",fe,o),i=e.ref(),{HintSlot:u,hasHintLabelOrSlot:s,hasInvalidLabelOrSlot:d,hintSlotScope:c}=pe(r,n),{id:v,modifiers:p,disabled:f,readonly:m,loading:b,icon:g,iconPosition:y,invalid:h,valid:k,floating:S,multiple:B}=e.toRefs(o),V=Y(v),x=e.computed((()=>`${V.value}-hint`)),{focused:w}=be(i,l),L=a.useElementVisibility(i);e.watch(L,(e=>{e&&o.autofocus&&(w.value=!0)}));const{hasIcon:P,hasIconBefore:$,hasIconAfter:_}=ge(g,y),C=e.computed((()=>!de(o.modelValue))),O=e.computed((()=>o.disabled||o.readonly)),E=e.computed((()=>O.value?-1:o.tabindex)),N=e.computed((()=>!0===o.invalid||!0!==o.valid&&void 0)),A=J("vv-select",p,e.computed((()=>({valid:k.value,invalid:h.value,loading:b.value,disabled:f.value,readonly:m.value,"icon-before":$.value,"icon-after":_.value,dirty:C.value,focus:w.value,floating:S.value,multiple:B.value})))),D=e.computed((()=>({name:o.name,tabindex:E.value,disabled:O.value,required:o.required,size:o.size,autocomplete:o.autocomplete,multiple:o.multiple,"aria-invalid":N.value,"aria-describedby":s.value?x.value:void 0,"aria-errormessage":d.value?x.value:void 0}))),j=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue}))),{getOptionLabel:R,getOptionValue:F,isOptionDisabled:z,getOptionGrouped:H}=ye(o),I=e.computed({get:()=>o.modelValue,set:e=>{Array.isArray(e)&&(e=e.filter((e=>void 0!==e))),l("update:modelValue",e)}}),T=e=>"string"!=typeof e&&(e&&e.options&&e.options.length>0);return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(A))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(V)},e.toDisplayString(t.label),9,he)):e.createCommentVNode("",!0),e.createElementVNode("div",ke,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(j))))])):e.createCommentVNode("",!0),e.createElementVNode("div",Be,[e.unref($)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(P)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(V),ref_key:"select",ref:i,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(I)?I.value=t:null)},e.unref(D)),[t.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!t.unselectable,hidden:!t.unselectable},e.toDisplayString(t.placeholder),9,xe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,((t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[T(t)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${l}`,disabled:e.unref(z)(t),label:e.unref(R)(t)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(H)(t),((t,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${l}-item-${o}`,disabled:e.unref(z)(t),value:e.unref(F)(t)},e.toDisplayString(e.unref(R)(t)),9,Pe)))),128))],8,Le)):(e.openBlock(),e.createElementBlock("option",{key:l,disabled:e.unref(z)(t),value:e.unref(F)(t)},e.toDisplayString(e.unref(R)(t)),9,we))],64)))),256))],16,Ve),[[e.vModelSelect,e.unref(I)]]),e.unref(_)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(P)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(j))))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(u),{id:e.unref(x),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"3"}:void 0]),1032,["id"])],2))}}),Ce={...N,value:[String,Number]},Oe=e.defineComponent({name:"VvBadge",props:Ce,setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=J("vv-badge",o);return(t,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),role:"status"},[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.value),1)]))],2))}}),Ee=K,Ne=e.defineComponent({name:"VvAction",props:Ee,emits:["click","mouseover","mouseleave"],setup(t,{expose:l,emit:o}){const a=t,n=U(),r=e.ref(null);l({$el:r});const{reference:i,bus:u,aria:s,expanded:d}=e.inject(h,{});e.watch((()=>r.value),(e=>{i&&(i.value=e)}));const c=e.computed((()=>a.pressed||(null==d?void 0:d.value))),{role:p}=e.inject(S,{}),f=e.computed((()=>{switch(!0){case a.disabled:return v.button;case void 0!==a.to:return(null==n?void 0:n.nuxt)?v.nuxtLink:v.routerLink;case void 0!==a.href:return v.a;default:return v.button}})),m=e.computed((()=>{const e={...null==s?void 0:s.value,ariaPressed:!!c.value||void 0,ariaLabel:a.ariaLabel,role:null==p?void 0:p.value};switch(f.value){case v.a:return{...e,href:a.href,target:a.target,rel:a.rel};case v.routerLink:case v.nuxtLink:return{...e,to:a.to,target:a.target};default:return{...e,type:a.type,disabled:a.disabled}}})),b=e=>{a.disabled?e.preventDefault():(null==u||u.emit("click",e),o("click",e))},g=e=>{null==u||u.emit("mouseover",e),o("mouseover",e)},y=e=>{null==u||u.emit("mouseleave",e),o("mouseleave",e)};return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),e.mergeProps(e.unref(m),{ref_key:"element",ref:r,class:{active:t.active,pressed:e.unref(c),disabled:t.disabled,current:t.current},onClickPassive:b,onMouseoverPassive:g,onMouseleavePassive:y}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const Ae={...K,...H,...N,...z,...w,icon:[String,Object],iconPosition:{type:String,default:u.left,validator:e=>Object.values(u).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function De(t,l){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),o=e.computed((()=>!de(l)));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){if(null==l?void 0:l.value){const o=e.unref(l.value)[t];return e.computed({get:()=>null==o?void 0:o.value,set(e){o.value=e}})}const n=e.toRef(o,t);return e.computed({get:()=>n.value,set(e){a&&a(`update:${t}`,e)}})}}}(y),{id:r,iconPosition:i,icon:u,label:s,pressed:d}=e.toRefs(t),c=n("modelValue",t,l),v=n("toggle",t),p=n("unselectable",t),f=e.computed((()=>(null==o?void 0:o.value.multiple.value)??!1)),m=e.computed((()=>{let e=t.modifiers,l=null==o?void 0:o.value.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),l&&(Array.isArray(l)||(l=l.split(" ")),l.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==o?void 0:o.value)?void 0:e.disabled.value))}));return{group:o,isInGroup:a,modelValue:c,toggle:v,unselectable:p,multiple:f,modifiers:m,disabled:b,id:r,pressed:d,iconPosition:i,icon:u,label:s}}const je={key:1,class:"vv-button__label"},Re={key:1,class:"vv-button__label"},Fe=e.defineComponent({name:"VvButton",props:Ae,emits:["update:modelValue"],setup(t,{expose:l,emit:o}){const a=t,n=e.useAttrs(),r=e.useSlots(),{id:i,modifiers:s,iconPosition:d,icon:c,label:v,modelValue:p,disabled:f,toggle:m,unselectable:b}=De(a,o),g=Y(i),y=e.computed((()=>(null==n?void 0:n.name)||g.value)),h=e.ref(null);l({$el:e.computed((()=>{var e;return null==(e=h.value)?void 0:e.$el}))});const k=e.computed((()=>m.value?Array.isArray(p.value)?se(y.value,p.value):re(y.value,p.value):a.pressed)),S=J("vv-button",s,e.computed((()=>({reverse:[u.right,u.bottom].includes(d.value),column:[u.top,u.bottom].includes(d.value),"icon-only":Boolean((null==c?void 0:c.value)&&!(null==v?void 0:v.value)&&!r.default)})))),B=e.computed((()=>"string"==typeof(null==c?void 0:c.value)?{name:null==c?void 0:c.value}:null==c?void 0:c.value)),V=e.computed((()=>void 0!==a.value?a.value:y.value)),x=()=>{if(m.value){if(Array.isArray(p.value))return se(V.value,p.value)?void(b.value&&(p.value=p.value.filter((e=>e!==V.value)))):void p.value.push(V.value);if(V.value===p.value&&b.value)return void(p.value=a.uncheckedValue);p.value=V.value}};return(t,l)=>(e.openBlock(),e.createBlock(Ne,e.mergeProps({disabled:e.unref(f),pressed:e.unref(k),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(g),ref_key:"element",ref:h,class:e.unref(S),onClick:x}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(Q,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(c)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:0,class:"vv-button__icon"},e.unref(B)),null,16)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("span",Re,[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]))])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"after")],64))]))])),_:3},16,["id","class"]))}}),ze=["id"],He=["id","for"],Ie=["id","aria-controls","placeholder"],Te={key:0,class:"vv-select__input-before"},Me={class:"vv-select__inner"},qe=["aria-expanded","aria-labelledby","aria-describedby","aria-errormessage","tabindex"],Ke={key:0,class:"vv-select__value"},We=["aria-label","onClick"],Ge={key:1,class:"vv-select__input-after"},Ue={name:"VvCombobox",components:{VvDropdown:ee,VvDropdownOption:oe,VvDropdownOptgroup:ne,VvButton:Fe}};return e.defineComponent({...Ue,props:W,emits:["update:modelValue","update:search","change:search","focus","blur"],setup(t,{emit:l}){const o=t,n=e.useSlots(),r=me("VvCombobox",W,o),i=e=>"string"!=typeof e&&(e.options&&e.options.length>0),{HintSlot:u,hasHintLabelOrSlot:s,hasInvalidLabelOrSlot:d,hintSlotScope:c}=pe(r,n),v=e.ref(null),p=e.ref(null),m=e.ref(null),{focused:b}=be(v,l),{focused:g}=a.useFocusWithin(m);e.watch(b,(e=>{o.autoOpen&&(!e||k.value?e||!k.value||g.value||V():B())})),e.watch(g,(e=>{b.value||e||!k.value||V()}));const y=e.ref(""),h=a.refDebounced(y,e.computed((()=>Number(o.debounceSearch))));e.watch(h,(()=>{l("update:search",h.value),l("change:search",h.value)}));const k=e.ref(!1),S=()=>{o.disabled||o.readonly||(k.value=!k.value)},B=()=>{o.disabled||o.readonly||k.value||(k.value=!0)},V=()=>{o.disabled||o.readonly||!k.value||(k.value=!1)},x=()=>{r.value.searchable&&p.value&&p.value.focus({preventScroll:!0})},w=()=>{r.value.searchable&&(y.value="")},{id:L,icon:P,iconPosition:$,modifiers:_,disabled:C,readonly:O,loading:E,valid:N,invalid:A,floating:D}=e.toRefs(o),j=Y(L),R=e.computed((()=>`${j.value}-hint`)),F=e.computed((()=>`${j.value}-dropdown`)),z=e.computed((()=>`${j.value}-search`)),H=e.computed((()=>`${j.value}-label`)),I=e.ref(!1),T=e.computed((()=>I.value||E.value)),M=e.ref(),{hasIcon:q,hasIconBefore:K,hasIconAfter:G}=ge(P,$),U=e.computed((()=>!de(o.modelValue))),X=e.computed((()=>C.value||O.value?-1:o.tabindex)),Z=J("vv-select",_,e.computed((()=>({disabled:C.value,loading:T.value,readonly:O.value,"icon-before":Boolean(K.value),"icon-after":Boolean(G.value),valid:N.value,invalid:A.value,dirty:U.value,focus:b.value||g.value||k.value,floating:D.value,badges:o.badges})))),{getOptionLabel:te,getOptionValue:le,getOptionGrouped:ae,isOptionDisabled:ie}=ye(o),ue=a.computedAsync((async()=>{var e;if(r.value.searchFunction){I.value=!0;const e=await Promise.resolve(r.value.searchFunction(h.value,o.options));return I.value=!1,e}return null==(e=o.options)?void 0:e.filter((e=>te(e).toLowerCase().includes(h.value.toLowerCase().trim())))}));function ve(e){return Array.isArray(o.modelValue)?se(e,o.modelValue)||se(le(e),o.modelValue):re(e,o.modelValue)||re(le(e),o.modelValue)}const fe=e.computed((()=>o.options.reduce(((e,t)=>i(t)?[...e,...ae(t)]:[...e,t]),[]).filter((e=>ve(e))))),he=e.computed((()=>fe.value.map((e=>te(e))).join(o.separator))),ke=()=>{o.autoOpen?B():S()},Se=e=>{var t;if(o.disabled||o.readonly)return;const a=le(e);let n=a;if(o.multiple)if(Array.isArray(o.modelValue)){const e=Number(o.maxValues);if(void 0!==o.maxValues&&e>=0&&(null==(t=o.modelValue)?void 0:t.length)>=e&&!se(a,o.modelValue))return;n=se(a,o.modelValue)?ce(a,o.modelValue):[...o.modelValue,a]}else n=[a];else o.keepOpen||V(),Array.isArray(o.modelValue)?n=o.unselectable&&o.modelValue.includes(a)?[]:[a]:o.unselectable&&a===o.modelValue&&(n=void 0);l("update:modelValue",n)},Be=e.computed((()=>({id:j.value,name:o.name,tabindex:X.value,valid:N.value,validLabel:r.value.validLabel,invalid:A.value,invalidLabel:r.value.invalidLabel,hintLabel:r.value.hintLabel,loading:T.value,loadingLabel:r.value.loadingLabel,disabled:C.value,readonly:O.value,modifiers:r.value.modifiers,options:r.value.options,labelKey:r.value.labelKey,valueKey:r.value.valueKey,icon:r.value.icon,iconPosition:r.value.iconPosition,floating:r.value.floating,unselectable:r.value.unselectable,multiple:r.value.multiple,label:r.value.label,placeholder:r.value.placeholder,modelValue:o.modelValue}))),Ve=e.computed((()=>({id:F.value,reference:m.value,placement:r.value.placement,strategy:r.value.strategy,transitionName:r.value.transitionName,offset:r.value.offset,shift:r.value.shift,flip:r.value.flip,autoPlacement:r.value.autoPlacement,arrow:r.value.arrow,autofocusFirst:!!r.value.searchable||r.value.autofocusFirst,triggerWidth:r.value.triggerWidth,modifiers:r.value.dropdownModifiers}))),xe=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue})));return a.onKeyStroke([" ","Enter"],(e=>{o.autoOpen||!k.value&&b.value&&(e.preventDefault(),e.stopImmediatePropagation(),S())}),{target:v}),(t,o)=>t.native?(e.openBlock(),e.createBlock(_e,e.mergeProps({key:1},e.unref(Be),{"onUpdate:modelValue":o[3]||(o[3]=e=>l("update:modelValue",e))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(j),class:e.normalizeClass(e.unref(Z))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:e.unref(H),for:e.unref(r).searchable?e.unref(z):void 0},e.toDisplayString(t.label),9,He)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:m,class:"vv-select__wrapper"},[e.createVNode(ee,e.mergeProps({ref_key:"dropdownEl",ref:M,modelValue:e.unref(k),"onUpdate:modelValue":o[2]||(o[2]=t=>e.isRef(k)?k.value=t:null)},e.unref(Ve),{role:e.unref(f).listbox,onAfterExpand:x,onAfterCollapse:w}),e.createSlots({default:e.withCtx((({aria:l})=>[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(xe))))])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.unref(K)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(q)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({ref_key:"inputEl",ref:v},l,{class:"vv-select__input",role:"combobox","aria-expanded":e.unref(k),"aria-labelledby":e.unref(H),"aria-describedby":e.unref(s)?e.unref(R):void 0,"aria-errormessage":e.unref(d)?e.unref(R):void 0,tabindex:e.unref(X),onClickPassive:ke}),[e.renderSlot(t.$slots,"value",e.normalizeProps(e.guardReactiveProps({selectedOptions:e.unref(fe),onInput:Se})),(()=>[e.unref(he)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.badges?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(fe),((l,o)=>(e.openBlock(),e.createBlock(Oe,{key:o,modifiers:t.badgeModifiers,class:"vv-select__badge"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(te)(l))+" ",1),!t.unselectable||e.unref(O)||e.unref(C)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(r).deselectActionLabel,type:"button",onClick:e.withModifiers((e=>Se(l)),["stop"])},[e.createVNode(Q,{name:"close"})],8,We))])),_:2},1032,["modifiers"])))),128)):(e.openBlock(),e.createElementBlock("div",Ke,e.toDisplayString(e.unref(he)),1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.placeholder),1)],64))]))],16,qe),e.unref(G)?(e.openBlock(),e.createBlock(Q,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(q)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(xe))))])):e.createCommentVNode("",!0)])),items:e.withCtx((()=>{var l;return[!e.unref(C)&&(null==(l=e.unref(ue))?void 0:l.length)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(ue),((l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[i(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(ne,{label:e.unref(te)(l)},null,8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae)(l),((o,a)=>(e.openBlock(),e.createBlock(oe,e.mergeProps({selected:ve(o),disabled:e.unref(ie)(o),unselectable:t.unselectable,deselectHintLabel:e.unref(r).deselectHintLabel,selectHintLabel:e.unref(r).selectHintLabel,selectedHintLabel:e.unref(r).selectedHintLabel},{key:a,class:"vv-dropdown-option",onClickPassive:e=>Se(o)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.normalizeProps(e.guardReactiveProps({option:l,selectedOptions:e.unref(fe),selected:ve(o),disabled:e.unref(ie)(o)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(te)(o)),1)]))])),_:2},1040,["onClickPassive"])))),128))],64)):(e.openBlock(),e.createBlock(oe,e.mergeProps({key:1},{selected:ve(l),disabled:e.unref(ie)(l),unselectable:t.unselectable,deselectHintLabel:e.unref(r).deselectHintLabel,selectHintLabel:e.unref(r).selectHintLabel,selectedHintLabel:e.unref(r).selectedHintLabel},{class:"vv-dropdown-option",onClickPassive:e=>Se(l)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.normalizeProps(e.guardReactiveProps({option:l,selectedOptions:e.unref(fe),selected:ve(l),disabled:e.unref(ie)(l)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(te)(l)),1)]))])),_:2},1040,["onClickPassive"]))],64)))),128)):t.options.length?e.unref(C)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe,{key:2,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-results",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).noResultsLabel),1)]))])),_:3})):(e.openBlock(),e.createBlock(oe,{key:1,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-options",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).noOptionsLabel),1)]))])),_:3}))]})),after:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::after",{},(()=>{var t;return[(null==(t=e.unref(M))?void 0:t.customPosition)?(e.openBlock(),e.createBlock(Fe,{key:0,label:e.unref(r).closeLabel,modifiers:"secondary",onClick:o[1]||(o[1]=t=>e.unref(M).hide())},null,8,["label"])):e.createCommentVNode("",!0)]}))])),_:2},[e.unref(r).searchable||t.$slots["dropdown::before"]?{name:"before",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::before"),e.unref(r).searchable&&!e.unref(C)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:e.unref(z),ref_key:"inputSearchEl",ref:p,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(y)?y.value=t:null),"aria-autocomplete":"list","aria-controls":e.unref(F),autocomplete:"off",spellcheck:"false",type:"search",class:"vv-dropdown__search",placeholder:e.unref(r).searchPlaceholder},null,8,Ie)),[[e.vModelText,e.unref(y)]]):e.createCommentVNode("",!0)])),key:"0"}:void 0]),1040,["modelValue","role"])],512),e.createVNode(e.unref(u),{id:e.unref(R),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(c))))])),key:"3"}:void 0]),1032,["id"])],10,ze))}})}));