@wirecore/wirelayer-vue 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/{Button-DZ_ZGl7X.js → Button-BpMOPs8b.js} +7 -8
  2. package/dist/{Checkbox-D9f77jtl.js → Checkbox-D175nhKK.js} +26 -22
  3. package/dist/ContextMenu-BEOEyUa6.js +2235 -0
  4. package/dist/{Field-BdIPugFP.js → Field-B1EsNF84.js} +20 -17
  5. package/dist/{Highlight-DvGcm2QR.js → Highlight-uwptdaUw.js} +35 -32
  6. package/dist/{Input-C59NJK4m.js → Input-Cn5q0yVE.js} +50 -36
  7. package/dist/{InputStatus-CUyF9-GR.js → InputStatus-D7kBGlew.js} +4 -1
  8. package/dist/{Select-BlEjQWBP.js → Select-Bd2Vpr7G.js} +175 -164
  9. package/dist/Slider-Cpv7Vj3B.js +143 -0
  10. package/dist/{Tree-B39xwNbU.js → Tree-fd9LXqgZ.js} +184 -181
  11. package/dist/chart/Chart.vue.d.ts +10 -4
  12. package/dist/chart/Chart.vue.d.ts.map +1 -1
  13. package/dist/chart/index.d.ts +2 -0
  14. package/dist/chart/index.d.ts.map +1 -1
  15. package/dist/chart.js +30 -24
  16. package/dist/code.js +1 -1
  17. package/dist/components/AngleSlider/AngleSlider.vue.d.ts +2 -0
  18. package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
  19. package/dist/components/Autocomplete/Autocomplete.vue.d.ts +2 -0
  20. package/dist/components/Autocomplete/Autocomplete.vue.d.ts.map +1 -1
  21. package/dist/components/Badge/Badge.vue.d.ts +2 -0
  22. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  23. package/dist/components/Button/Button.vue.d.ts +5 -0
  24. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  25. package/dist/components/Carousel/Carousel.vue.d.ts +2 -0
  26. package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
  27. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -0
  28. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
  29. package/dist/components/Checkbox/Checkbox.vue.d.ts +2 -0
  30. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  31. package/dist/components/ChipGroup/ChipGroup.vue.d.ts +1 -1
  32. package/dist/components/ChipGroup/ChipGroup.vue.d.ts.map +1 -1
  33. package/dist/components/ColorInput/ColorInput.vue.d.ts.map +1 -1
  34. package/dist/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
  35. package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
  36. package/dist/components/Combobox/Combobox.vue.d.ts +8 -1
  37. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  38. package/dist/components/Confirm/ConfirmDialog.vue.d.ts +5 -0
  39. package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
  40. package/dist/components/Confirm/confirm.d.ts +7 -0
  41. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  42. package/dist/components/DatePicker/DatePicker.vue.d.ts +4 -0
  43. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  44. package/dist/components/DatePicker/DatePickerBase.vue.d.ts +4 -0
  45. package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
  46. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +4 -0
  47. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
  48. package/dist/components/Dialog/DialogContent.vue.d.ts +12 -6
  49. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  50. package/dist/components/Drawer/DrawerContent.vue.d.ts +7 -5
  51. package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
  52. package/dist/components/DurationInput/DurationInput.vue.d.ts +2 -0
  53. package/dist/components/DurationInput/DurationInput.vue.d.ts.map +1 -1
  54. package/dist/components/EmptyState/EmptyState.vue.d.ts +5 -5
  55. package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
  56. package/dist/components/Field/Field.vue.d.ts +12 -2
  57. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  58. package/dist/components/Field/context.d.ts +3 -1
  59. package/dist/components/Field/context.d.ts.map +1 -1
  60. package/dist/components/FileUpload/FileUpload.vue.d.ts +11 -0
  61. package/dist/components/FileUpload/FileUpload.vue.d.ts.map +1 -1
  62. package/dist/components/IconButton/IconButton.vue.d.ts +4 -0
  63. package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
  64. package/dist/components/Knob/Knob.vue.d.ts +2 -0
  65. package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
  66. package/dist/components/Listbox/Listbox.vue.d.ts +2 -0
  67. package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
  68. package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts +1 -0
  69. package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
  70. package/dist/components/MonthPicker/MonthPicker.vue.d.ts +4 -0
  71. package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
  72. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +8 -1
  73. package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
  74. package/dist/components/NumberInput/NumberInput.vue.d.ts +2 -0
  75. package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
  76. package/dist/components/PasswordInput/PasswordInput.vue.d.ts +2 -0
  77. package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
  78. package/dist/components/PinInput/PinInput.vue.d.ts +2 -0
  79. package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
  80. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +1 -1
  81. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  82. package/dist/components/Rating/Rating.vue.d.ts +2 -0
  83. package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
  84. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +2 -2
  85. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  86. package/dist/components/Select/Select.vue.d.ts +8 -1
  87. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  88. package/dist/components/Select/types.d.ts +2 -0
  89. package/dist/components/Select/types.d.ts.map +1 -1
  90. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts +2 -0
  91. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts.map +1 -1
  92. package/dist/components/Slider/Slider.vue.d.ts +2 -0
  93. package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
  94. package/dist/components/Switch/Switch.vue.d.ts +2 -0
  95. package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
  96. package/dist/components/TagsInput/TagsInput.vue.d.ts +2 -0
  97. package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
  98. package/dist/components/TimePicker/TimePicker.vue.d.ts +2 -0
  99. package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
  100. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -0
  101. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
  102. package/dist/components/Toast/Toaster.vue.d.ts +12 -2
  103. package/dist/components/Toast/Toaster.vue.d.ts.map +1 -1
  104. package/dist/components/ToggleButton/ToggleButton.vue.d.ts +9 -2
  105. package/dist/components/ToggleButton/ToggleButton.vue.d.ts.map +1 -1
  106. package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
  107. package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
  108. package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -0
  109. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  110. package/dist/components/YearPicker/YearPicker.vue.d.ts +4 -0
  111. package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
  112. package/dist/data-table/DataTable.vue.d.ts +36 -2
  113. package/dist/data-table/DataTable.vue.d.ts.map +1 -1
  114. package/dist/data-table/FilterMenu.vue.d.ts +10 -0
  115. package/dist/data-table/FilterMenu.vue.d.ts.map +1 -1
  116. package/dist/data-table/ValueInput.vue.d.ts +19 -1
  117. package/dist/data-table/ValueInput.vue.d.ts.map +1 -1
  118. package/dist/data-table/index.d.ts +1 -1
  119. package/dist/data-table/index.d.ts.map +1 -1
  120. package/dist/data-table/types.d.ts +23 -1
  121. package/dist/data-table/types.d.ts.map +1 -1
  122. package/dist/data-table.js +1475 -1341
  123. package/dist/editor.js +2 -2
  124. package/dist/form/FormField.vue.d.ts +13 -5
  125. package/dist/form/FormField.vue.d.ts.map +1 -1
  126. package/dist/form.js +128 -109
  127. package/dist/index.d.ts +1 -1
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/index.js +6470 -6251
  130. package/dist/label-for-eQvYjsM5.js +8 -0
  131. package/dist/pdf.js +4 -4
  132. package/dist/sources/ActionBar.css +1 -0
  133. package/dist/sources/AppShell.css +1 -0
  134. package/dist/sources/ChatPrompt.css +1 -0
  135. package/dist/sources/Gallery.css +1 -0
  136. package/dist/sources/IconButton.css +1 -0
  137. package/dist/sources/Image.css +1 -0
  138. package/dist/sources/ImageCropper.css +1 -0
  139. package/dist/sources/InlineEdit.css +1 -0
  140. package/dist/sources/Marquee.css +1 -0
  141. package/dist/sources/MegaMenu.css +1 -0
  142. package/dist/sources/Menubar.css +1 -0
  143. package/dist/sources/OrderList.css +1 -0
  144. package/dist/sources/PickList.css +1 -0
  145. package/dist/sources/ScrollTop.css +1 -0
  146. package/dist/{useTree-Dt7NO7cp.js → useTree-UhG1TMeM.js} +2 -2
  147. package/dist/utils/label-for.d.ts +3 -0
  148. package/dist/utils/label-for.d.ts.map +1 -0
  149. package/dist/utils/list.d.ts +5 -0
  150. package/dist/utils/list.d.ts.map +1 -1
  151. package/dist/virtual/VirtualSelect.vue.d.ts +2 -0
  152. package/dist/virtual/VirtualSelect.vue.d.ts.map +1 -1
  153. package/dist/virtual.js +207 -197
  154. package/fonts.css +2 -0
  155. package/llms-full.txt +699 -373
  156. package/llms.txt +4 -1
  157. package/package.json +7 -3
  158. package/theme.css +14 -0
  159. package/dist/ContextMenu-R23YbbaS.js +0 -2188
  160. package/dist/Slider-CyoZc5A8.js +0 -135
@@ -0,0 +1,2235 @@
1
+ import { a as e, i as t, n } from "./recipes-BlM9aKyt.js";
2
+ import { t as r } from "./attrs-KNjeRUCf.js";
3
+ import { r as i, t as a } from "./InputStatus-D7kBGlew.js";
4
+ import { t as o } from "./Input-Cn5q0yVE.js";
5
+ import { t as s } from "./label-for-eQvYjsM5.js";
6
+ import { n as c, t as l } from "./Select-Bd2Vpr7G.js";
7
+ import { a as u, n as d, r as f } from "./Highlight-uwptdaUw.js";
8
+ import { Fragment as p, Teleport as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, guardReactiveProps as w, inject as T, mergeModels as E, mergeProps as D, nextTick as O, normalizeClass as k, normalizeProps as A, normalizeStyle as j, onBeforeUnmount as M, onMounted as ee, openBlock as N, provide as P, reactive as F, ref as I, renderList as L, renderSlot as R, resolveComponent as z, resolveDynamicComponent as B, shallowRef as V, toDisplayString as H, unref as U, useAttrs as te, useId as ne, useModel as re, useTemplateRef as ie, vModelText as W, watch as G, withCtx as K, withDirectives as q, withKeys as J } from "vue";
9
+ import { CalendarDays as ae, Check as oe, ChevronDown as se, ChevronLeft as ce, ChevronRight as le, ChevronUp as ue, ChevronsLeft as de, ChevronsRight as fe, Circle as pe, LoaderCircle as me, Minus as he, Plus as ge, X as _e } from "@lucide/vue";
10
+ import { SUBMENU_GUTTER as ve, allListOptionsState as ye, anchorBox as be, controlIds as xe, createLongPress as Se, datePicker as Y, defaultNumberFormat as Ce, filterMenuEntries as we, fromWallIso as Te, highlightFirstMenuItem as Ee, insertIntoTextControl as De, isoWeekday as Oe, linkTarget as ke, localeWeekInfo as Ae, menu as je, menuSearchKey as Me, multiSelect as Ne, numberInput as Pe, numberInputKey as Fe, pageForSize as Ie, pagination as Le, parseLocaleNumber as Re, parsePastedDate as ze, parsePastedRange as Be, pluralText as Ve, rowWeekNumber as He, setTextControlValue as Ue, skeleton as We, textarea as Ge, textareaParts as Ke, timeSlots as qe, timeZoneLabel as Je, timeZoneLongLabel as Ye, toNumberInputValue as Xe, toOverlayAnchor as Ze, toWallIso as Qe, todayIso as $e, toggleAllListOptions as et, zonedToInstant as tt } from "@wirecore/wirelayer-recipes";
11
+ import { Menu as X } from "@ark-ui/vue/menu";
12
+ import { useFilter as nt } from "@ark-ui/vue/locale";
13
+ import { Field as rt, useFieldContext as it } from "@ark-ui/vue/field";
14
+ import { Pagination as Z, usePagination as at } from "@ark-ui/vue/pagination";
15
+ import { createListCollection as ot } from "@ark-ui/vue/collection";
16
+ import { Select as Q } from "@ark-ui/vue/select";
17
+ import { DateInput as st } from "@ark-ui/vue/date-input";
18
+ import { DatePicker as $, useDatePickerContext as ct } from "@ark-ui/vue/date-picker";
19
+ import { CalendarDateTime as lt, DateFormatter as ut, Time as dt, parseDate as ft, parseDateTime as pt, toCalendarDateTime as mt } from "@internationalized/date";
20
+ import { NumberInput as ht, useNumberInput as gt } from "@ark-ui/vue/number-input";
21
+ //#region src/components/Menu/state.ts
22
+ var _t = Symbol("wirecore-menu-state");
23
+ function vt(e) {
24
+ let t = F({
25
+ checked: {},
26
+ radio: {}
27
+ });
28
+ G(e.items, () => {
29
+ t.checked = {}, t.radio = {};
30
+ });
31
+ let n = {
32
+ checked: (e) => t.checked[e.value] ?? e.checked ?? !1,
33
+ setChecked: (n, r) => {
34
+ t.checked[n.value] = r, e.onCheckedChange(n.value, r);
35
+ },
36
+ radio: (e) => t.radio[e.name] ?? e.value,
37
+ setRadio: (n, r) => {
38
+ t.radio[n.name] = r, e.onValueChange(n.name, r);
39
+ },
40
+ linkAs: () => e.linkAs() ?? "a"
41
+ };
42
+ return P(_t, n), n;
43
+ }
44
+ var yt = () => T(_t, null), bt = /* @__PURE__ */ C({
45
+ name: "MenuEntries",
46
+ __name: "MenuEntries",
47
+ props: { entries: {} },
48
+ emits: ["select"],
49
+ setup(e, { emit: t }) {
50
+ let r = n("menu", je), i = t, a = r(), o = {
51
+ placement: "right-start",
52
+ offset: { mainAxis: ve }
53
+ }, s = yt(), c = (e, t) => !("type" in e) || e.type === "checkbox" ? e.value : e.type === "radio" ? `radio-${e.name}` : `${e.type}-${t}`;
54
+ return (t, n) => {
55
+ let l = z("MenuEntries", !0);
56
+ return N(!0), v(p, null, L(e.entries, (e, u) => (N(), v(p, { key: c(e, u) }, ["type" in e && e.type === "separator" ? (N(), g(U(X).Separator, {
57
+ key: 0,
58
+ class: k(U(a).separator())
59
+ }, null, 8, ["class"])) : "type" in e && e.type === "group" ? (N(), g(U(X).ItemGroup, { key: 1 }, {
60
+ default: K(() => [S(U(X).ItemGroupLabel, { class: k(U(a).groupLabel()) }, {
61
+ default: K(() => [x(H(e.label), 1)]),
62
+ _: 2
63
+ }, 1032, ["class"]), S(l, {
64
+ entries: e.items,
65
+ onSelect: n[0] ||= (e) => i("select", e)
66
+ }, b({ _: 2 }, [t.$slots.item ? {
67
+ name: "item",
68
+ fn: K((e) => [R(t.$slots, "item", D({ ref_for: !0 }, e))]),
69
+ key: "0"
70
+ } : void 0]), 1032, ["entries"])]),
71
+ _: 2
72
+ }, 1024)) : "type" in e && e.type === "radio" ? (N(), g(U(X).RadioItemGroup, {
73
+ key: 2,
74
+ "model-value": U(s)?.radio(e),
75
+ "onUpdate:modelValue": (t) => U(s)?.setRadio(e, t)
76
+ }, {
77
+ default: K(() => [e.label ? (N(), g(U(X).ItemGroupLabel, {
78
+ key: 0,
79
+ class: k(U(a).groupLabel())
80
+ }, {
81
+ default: K(() => [x(H(e.label), 1)]),
82
+ _: 2
83
+ }, 1032, ["class"])) : _("", !0), (N(!0), v(p, null, L(e.items, (e) => (N(), g(U(X).RadioItem, {
84
+ key: e.value,
85
+ value: e.value,
86
+ disabled: e.disabled,
87
+ "close-on-select": e.closeOnSelect ?? !1,
88
+ class: k(U(a).item())
89
+ }, {
90
+ default: K(() => [y("span", { class: k(U(a).indicator()) }, [S(U(X).ItemIndicator, null, {
91
+ default: K(() => [S(U(pe), {
92
+ class: k(U(a).indicatorDot()),
93
+ "aria-hidden": "true"
94
+ }, null, 8, ["class"])]),
95
+ _: 1
96
+ })], 2), R(t.$slots, "item", { item: e }, () => [e.icon ? (N(), g(B(e.icon), {
97
+ key: 0,
98
+ class: k(U(a).icon()),
99
+ "aria-hidden": "true"
100
+ }, null, 8, ["class"])) : _("", !0), y("span", { class: k(U(a).label()) }, H(e.label), 3)])]),
101
+ _: 2
102
+ }, 1032, [
103
+ "value",
104
+ "disabled",
105
+ "close-on-select",
106
+ "class"
107
+ ]))), 128))]),
108
+ _: 2
109
+ }, 1032, ["model-value", "onUpdate:modelValue"])) : "type" in e && e.type === "checkbox" ? (N(), g(U(X).CheckboxItem, {
110
+ key: 3,
111
+ value: e.value,
112
+ checked: U(s)?.checked(e) ?? !!e.checked,
113
+ disabled: e.disabled,
114
+ "close-on-select": e.closeOnSelect ?? !1,
115
+ class: k(U(a).item()),
116
+ "onUpdate:checked": (t) => U(s)?.setChecked(e, t)
117
+ }, {
118
+ default: K(() => [y("span", { class: k(U(a).indicator()) }, [S(U(X).ItemIndicator, null, {
119
+ default: K(() => [S(U(oe), {
120
+ class: k(U(a).indicatorIcon()),
121
+ "aria-hidden": "true"
122
+ }, null, 8, ["class"])]),
123
+ _: 1
124
+ })], 2), R(t.$slots, "item", { item: e }, () => [e.icon ? (N(), g(B(e.icon), {
125
+ key: 0,
126
+ class: k(U(a).icon()),
127
+ "aria-hidden": "true"
128
+ }, null, 8, ["class"])) : _("", !0), y("span", { class: k(U(a).label()) }, H(e.label), 3)])]),
129
+ _: 2
130
+ }, 1032, [
131
+ "value",
132
+ "checked",
133
+ "disabled",
134
+ "close-on-select",
135
+ "class",
136
+ "onUpdate:checked"
137
+ ])) : !("type" in e) && e.children ? (N(), g(U(X).Root, {
138
+ key: 4,
139
+ positioning: o,
140
+ onSelect: n[2] ||= (e) => i("select", e.value)
141
+ }, {
142
+ default: K(() => [S(U(X).TriggerItem, { class: k(U(a).item()) }, {
143
+ default: K(() => [
144
+ e.icon ? (N(), g(B(e.icon), {
145
+ key: 0,
146
+ class: k(U(a).icon()),
147
+ "aria-hidden": "true"
148
+ }, null, 8, ["class"])) : _("", !0),
149
+ y("span", { class: k(U(a).label()) }, H(e.label), 3),
150
+ S(U(le), {
151
+ class: k(U(a).submenuIcon()),
152
+ "aria-hidden": "true"
153
+ }, null, 8, ["class"])
154
+ ]),
155
+ _: 2
156
+ }, 1032, ["class"]), (N(), g(m, { to: "body" }, [S(U(X).Positioner, null, {
157
+ default: K(() => [S(U(X).Content, { class: k(U(a).content()) }, {
158
+ default: K(() => [S(l, {
159
+ entries: e.children,
160
+ onSelect: n[1] ||= (e) => i("select", e)
161
+ }, b({ _: 2 }, [t.$slots.item ? {
162
+ name: "item",
163
+ fn: K((e) => [R(t.$slots, "item", D({ ref_for: !0 }, e))]),
164
+ key: "0"
165
+ } : void 0]), 1032, ["entries"])]),
166
+ _: 2
167
+ }, 1032, ["class"])]),
168
+ _: 2
169
+ }, 1024)]))]),
170
+ _: 2
171
+ }, 1024)) : !("type" in e) && (e.href || e.to) ? (N(), g(U(X).Item, {
172
+ key: 5,
173
+ value: e.value,
174
+ disabled: e.disabled,
175
+ "close-on-select": e.closeOnSelect,
176
+ "as-child": ""
177
+ }, {
178
+ default: K(() => [(N(), g(B(U(s)?.linkAs() ?? "a"), D({ ref_for: !0 }, U(ke)(e.href, e.to), { class: U(r)({ danger: e.danger }).item() }), {
179
+ default: K(() => [R(t.$slots, "item", { item: e }, () => [
180
+ e.icon ? (N(), g(B(e.icon), {
181
+ key: 0,
182
+ class: k(U(a).icon()),
183
+ "aria-hidden": "true"
184
+ }, null, 8, ["class"])) : _("", !0),
185
+ y("span", { class: k(U(a).label()) }, H(e.label), 3),
186
+ e.shortcut ? (N(), v("span", {
187
+ key: 1,
188
+ class: k(U(a).shortcut()),
189
+ "aria-hidden": "true"
190
+ }, H(e.shortcut), 3)) : _("", !0)
191
+ ])]),
192
+ _: 2
193
+ }, 1040, ["class"]))]),
194
+ _: 2
195
+ }, 1032, [
196
+ "value",
197
+ "disabled",
198
+ "close-on-select"
199
+ ])) : "type" in e ? _("", !0) : (N(), g(U(X).Item, {
200
+ key: 6,
201
+ value: e.value,
202
+ disabled: e.disabled,
203
+ "close-on-select": e.closeOnSelect,
204
+ class: k(U(r)({ danger: e.danger }).item())
205
+ }, {
206
+ default: K(() => [R(t.$slots, "item", { item: e }, () => [
207
+ e.icon ? (N(), g(B(e.icon), {
208
+ key: 0,
209
+ class: k(U(a).icon()),
210
+ "aria-hidden": "true"
211
+ }, null, 8, ["class"])) : _("", !0),
212
+ y("span", { class: k(U(a).label()) }, H(e.label), 3),
213
+ e.shortcut ? (N(), v("span", {
214
+ key: 1,
215
+ class: k(U(a).shortcut()),
216
+ "aria-hidden": "true"
217
+ }, H(e.shortcut), 3)) : _("", !0)
218
+ ])]),
219
+ _: 2
220
+ }, 1032, [
221
+ "value",
222
+ "disabled",
223
+ "close-on-select",
224
+ "class"
225
+ ]))], 64))), 128);
226
+ };
227
+ }
228
+ });
229
+ //#endregion
230
+ //#region src/overlay.ts
231
+ function xt(e) {
232
+ let t = I(e.defaultOpen?.() ?? !1), n = V(null), r = null, i = h(() => e.open() ?? t.value), a = h(() => n.value ?? e.anchor() ?? null);
233
+ G(i, (t) => {
234
+ if (typeof document < "u") {
235
+ if (t) r = document.activeElement;
236
+ else if (e.restoreFocus) {
237
+ let e = r, t = () => {
238
+ if (i.value) return;
239
+ let t = document.activeElement;
240
+ (!t || t === document.body || !t.isConnected || t.closest("[data-scope=menu]")) && e?.focus();
241
+ };
242
+ requestAnimationFrame(() => {
243
+ t(), setTimeout(t, 50);
244
+ });
245
+ }
246
+ }
247
+ });
248
+ let o = (n) => {
249
+ t.value = n, e.onOpenChange(n);
250
+ }, s = (e) => {
251
+ e && (n.value = null), o(e);
252
+ }, c = {
253
+ open(e) {
254
+ n.value = Ze(e), o(!0);
255
+ },
256
+ close: () => o(!1),
257
+ toggle(e) {
258
+ i.value ? c.close() : c.open(e);
259
+ }
260
+ };
261
+ return {
262
+ isOpen: i,
263
+ anchor: a,
264
+ anchorPoint: h(() => a.value && !("getBoundingClientRect" in a.value) ? a.value : void 0),
265
+ onOpenChange: s,
266
+ handle: c,
267
+ positioning: (e) => {
268
+ let t = a.value;
269
+ return t ? "getBoundingClientRect" in t ? {
270
+ ...e,
271
+ getAnchorElement: () => t
272
+ } : {
273
+ ...e,
274
+ getAnchorRect: () => be(t)
275
+ } : e;
276
+ },
277
+ finalFocusEl: () => a.value ? r : null
278
+ };
279
+ }
280
+ //#endregion
281
+ //#region src/components/Menu/Menu.vue?vue&type=script&setup=true&lang.ts
282
+ var St = ["aria-label"], Ct = [
283
+ "placeholder",
284
+ "aria-label",
285
+ "aria-activedescendant",
286
+ "onKeydown",
287
+ "onInput"
288
+ ], wt = { role: "status" }, Tt = /* @__PURE__ */ C({
289
+ __name: "Menu",
290
+ props: {
291
+ items: {},
292
+ open: {
293
+ type: Boolean,
294
+ default: void 0
295
+ },
296
+ defaultOpen: {
297
+ type: Boolean,
298
+ default: void 0
299
+ },
300
+ anchor: { default: void 0 },
301
+ searchable: { type: Boolean },
302
+ searchLabel: {},
303
+ placement: { default: "bottom-start" },
304
+ arrow: { type: Boolean },
305
+ linkAs: {},
306
+ classes: {}
307
+ },
308
+ emits: [
309
+ "select",
310
+ "checked-change",
311
+ "value-change",
312
+ "update:open"
313
+ ],
314
+ setup(t, { expose: r, emit: i }) {
315
+ let a = t, o = n("menu", je, () => a.classes), s = i, c = o(), l = e();
316
+ vt({
317
+ items: () => a.items,
318
+ linkAs: () => a.linkAs,
319
+ onCheckedChange: (e, t) => s("checked-change", e, t),
320
+ onValueChange: (e, t) => s("value-change", e, t)
321
+ });
322
+ let u = xt({
323
+ open: () => a.open,
324
+ defaultOpen: () => a.defaultOpen,
325
+ anchor: () => a.anchor,
326
+ onOpenChange: (e) => s("update:open", e),
327
+ restoreFocus: !0
328
+ });
329
+ r(u.handle);
330
+ let d = I(""), f = I(), p = nt({
331
+ sensitivity: "base",
332
+ usage: "sort"
333
+ }), x = h(() => a.searchable && d.value ? we(a.items, (e) => p.value.contains(e, d.value)) : a.items), C = I(null);
334
+ async function T(e, t) {
335
+ let n = e.target;
336
+ await O(), f.value = Ee(n, t);
337
+ }
338
+ G(u.isOpen, async (e) => {
339
+ d.value = "", f.value = void 0, e && a.searchable && (await O(), requestAnimationFrame(() => requestAnimationFrame(() => C.value?.focus())));
340
+ });
341
+ let E = h(() => u.positioning({
342
+ placement: a.placement,
343
+ gutter: a.arrow ? 10 : 8
344
+ }));
345
+ return (e, n) => (N(), g(U(X).Root, {
346
+ open: U(u).isOpen.value,
347
+ positioning: E.value,
348
+ "anchor-point": U(u).anchorPoint.value,
349
+ "lazy-mount": "",
350
+ "unmount-on-exit": "",
351
+ "onUpdate:open": n[2] ||= (e) => U(u).onOpenChange(e),
352
+ onSelect: n[3] ||= (e) => s("select", e.value)
353
+ }, {
354
+ default: K(() => [e.$slots.default ? (N(), g(U(X).Trigger, {
355
+ key: 0,
356
+ "as-child": ""
357
+ }, {
358
+ default: K(() => [R(e.$slots, "default")]),
359
+ _: 3
360
+ })) : _("", !0), (N(), g(m, { to: "body" }, [S(U(X).Positioner, null, {
361
+ default: K(() => [S(U(X).Content, { class: k(U(c).content()) }, {
362
+ default: K(() => [
363
+ t.arrow ? (N(), g(U(X).Arrow, {
364
+ key: 0,
365
+ class: k(U(c).arrow())
366
+ }, {
367
+ default: K(() => [S(U(X).ArrowTip, { class: k(U(c).arrowTip()) }, null, 8, ["class"])]),
368
+ _: 1
369
+ }, 8, ["class"])) : _("", !0),
370
+ t.searchable ? (N(), g(U(X).Context, { key: 1 }, {
371
+ default: K((e) => [y("div", {
372
+ role: "group",
373
+ "aria-label": t.searchLabel ?? U(l).menu.search,
374
+ class: k(U(c).search())
375
+ }, [q(y("input", {
376
+ ref_key: "search",
377
+ ref: C,
378
+ "onUpdate:modelValue": n[0] ||= (e) => d.value = e,
379
+ type: "text",
380
+ autocomplete: "off",
381
+ class: k(U(c).searchInput()),
382
+ placeholder: t.searchLabel ?? U(l).menu.search,
383
+ "aria-label": t.searchLabel ?? U(l).menu.search,
384
+ "aria-activedescendant": f.value,
385
+ onKeydown: (t) => f.value = U(Me)(t, e) ?? f.value,
386
+ onInput: (t) => T(t, e)
387
+ }, null, 42, Ct), [[W, d.value]])], 10, St)]),
388
+ _: 1
389
+ })) : _("", !0),
390
+ S(bt, {
391
+ entries: x.value,
392
+ onSelect: n[1] ||= (e) => s("select", e)
393
+ }, b({ _: 2 }, [e.$slots.item ? {
394
+ name: "item",
395
+ fn: K((t) => [R(e.$slots, "item", A(w(t)))]),
396
+ key: "0"
397
+ } : void 0]), 1032, ["entries"]),
398
+ t.searchable && !x.value.length ? (N(), v("div", {
399
+ key: 2,
400
+ role: "group",
401
+ class: k(U(c).empty())
402
+ }, [y("span", wt, H(U(l).common.noResults), 1)], 2)) : _("", !0)
403
+ ]),
404
+ _: 3
405
+ }, 8, ["class"])]),
406
+ _: 3
407
+ })]))]),
408
+ _: 3
409
+ }, 8, [
410
+ "open",
411
+ "positioning",
412
+ "anchor-point"
413
+ ]));
414
+ }
415
+ }), Et = ["id"], Dt = /* @__PURE__ */ C({
416
+ inheritAttrs: !1,
417
+ __name: "Textarea",
418
+ props: /*@__PURE__*/ E({
419
+ defaultValue: {},
420
+ size: {},
421
+ invalid: { type: Boolean },
422
+ success: { type: Boolean },
423
+ disabled: { type: Boolean },
424
+ autoResize: { type: Boolean },
425
+ minRows: {},
426
+ maxRows: {},
427
+ showCount: { type: Boolean },
428
+ loading: { type: Boolean },
429
+ clearable: { type: Boolean },
430
+ clearLabel: {},
431
+ classes: {}
432
+ }, {
433
+ modelValue: {},
434
+ modelModifiers: {}
435
+ }),
436
+ emits: ["update:modelValue"],
437
+ setup(t) {
438
+ let r = t, o = n("textarea", Ge, () => r.classes), s = n("textareaParts", Ke, () => r.classes), c = e(), l = re(t, "modelValue"), u = te(), d = it(), f = i(), m = h(() => r.invalid || !!d?.value.invalid), b = h(() => !m.value && (r.success || f.value.success)), x = h(() => r.disabled || !!d?.value.disabled), C = h(() => u.readonly !== void 0 && u.readonly !== !1), w = h(() => {
439
+ let e = Number(u.maxlength ?? u.maxLength);
440
+ return Number.isFinite(e) && e > 0 ? e : void 0;
441
+ }), T = h(() => r.showCount && w.value !== void 0), E = h(() => r.loading || r.clearable || b.value), A = h(() => T.value || r.loading || r.clearable), P = h(() => s()), F = I(r.defaultValue ?? ""), L = h(() => (l.value ?? F.value).length), R = h({
442
+ get: () => l.value ?? F.value,
443
+ set: (e) => {
444
+ F.value = e, l.value = e;
445
+ }
446
+ }), z = ie("element");
447
+ function B() {
448
+ let e = z.value?.$el;
449
+ if (!r.autoResize || !e) return;
450
+ e.style.height = "auto";
451
+ let t = e.offsetHeight - e.clientHeight, n = e.scrollHeight + t;
452
+ if (r.minRows || r.maxRows) {
453
+ let i = getComputedStyle(e), a = parseFloat(i.lineHeight) || parseFloat(i.fontSize) * 1.5, o = parseFloat(i.paddingTop) + parseFloat(i.paddingBottom) + t, s = r.maxRows ? r.maxRows * a + o : Infinity;
454
+ e.style.overflowY = n > s ? "auto" : "", n = Math.min(Math.max(n, r.minRows ? r.minRows * a + o : 0), s);
455
+ }
456
+ e.style.height = `${n}px`;
457
+ }
458
+ ee(B), G(l, () => O(B));
459
+ let V = ne(), W = I(""), K;
460
+ function q(e) {
461
+ F.value = e.target.value, B(), T.value && (clearTimeout(K), K = setTimeout(() => {
462
+ W.value = c.textarea.remaining(w.value - L.value, w.value);
463
+ }, 1e3));
464
+ }
465
+ M(() => clearTimeout(K));
466
+ let J = h(() => [
467
+ d?.value.ariaDescribedby,
468
+ T.value && V,
469
+ u["aria-describedby"]
470
+ ].filter(Boolean).join(" ") || void 0);
471
+ function ae() {
472
+ let e = z.value?.$el;
473
+ e && (Ue(e), e.focus());
474
+ }
475
+ return (e, n) => A.value ? (N(), v("div", {
476
+ key: 1,
477
+ class: k(P.value.base({ class: k(U(u).class) })),
478
+ style: j(U(u).style)
479
+ }, [
480
+ S(U(rt).Textarea, D({
481
+ ref_key: "element",
482
+ ref: z,
483
+ modelValue: R.value,
484
+ "onUpdate:modelValue": n[1] ||= (e) => R.value = e
485
+ }, {
486
+ ...U(u),
487
+ class: void 0,
488
+ style: void 0
489
+ }, {
490
+ class: U(o)({
491
+ size: t.size,
492
+ invalid: m.value,
493
+ success: b.value,
494
+ disabled: x.value,
495
+ autoResize: t.autoResize,
496
+ hasTrailing: E.value
497
+ }),
498
+ rows: U(u).rows ?? t.minRows,
499
+ disabled: x.value || void 0,
500
+ "aria-invalid": m.value || void 0,
501
+ "aria-describedby": J.value,
502
+ "aria-busy": t.loading || void 0,
503
+ onInput: q
504
+ }), null, 16, [
505
+ "modelValue",
506
+ "class",
507
+ "rows",
508
+ "disabled",
509
+ "aria-invalid",
510
+ "aria-describedby",
511
+ "aria-busy"
512
+ ]),
513
+ E.value ? (N(), v("div", {
514
+ key: 0,
515
+ class: k(P.value.trailing())
516
+ }, [S(a, {
517
+ loading: t.loading,
518
+ clear: t.clearable && L.value > 0 && !x.value && !C.value,
519
+ "clear-label": t.clearLabel ?? U(c).field.clear,
520
+ success: b.value,
521
+ classes: {
522
+ spinner: P.value.spinner(),
523
+ clear: P.value.clear(),
524
+ clearIcon: P.value.clearIcon(),
525
+ statusIcon: P.value.statusIcon()
526
+ },
527
+ onClear: ae
528
+ }, null, 8, [
529
+ "loading",
530
+ "clear",
531
+ "clear-label",
532
+ "success",
533
+ "classes"
534
+ ])], 2)) : _("", !0),
535
+ T.value ? (N(), v(p, { key: 1 }, [y("span", {
536
+ id: U(V),
537
+ class: k(P.value.counter()),
538
+ "aria-hidden": "true"
539
+ }, H(U(c).textarea.counter(L.value, w.value)), 11, Et), y("span", {
540
+ class: k(P.value.status()),
541
+ role: "status"
542
+ }, H(W.value), 3)], 64)) : _("", !0)
543
+ ], 6)) : (N(), g(U(rt).Textarea, D({
544
+ key: 0,
545
+ ref_key: "element",
546
+ ref: z,
547
+ modelValue: R.value,
548
+ "onUpdate:modelValue": n[0] ||= (e) => R.value = e
549
+ }, {
550
+ ...U(u),
551
+ class: U(o)({
552
+ size: t.size,
553
+ invalid: m.value,
554
+ success: b.value,
555
+ disabled: x.value,
556
+ autoResize: t.autoResize,
557
+ class: k(U(u).class)
558
+ })
559
+ }, {
560
+ rows: U(u).rows ?? t.minRows,
561
+ disabled: x.value || void 0,
562
+ "aria-invalid": m.value || void 0,
563
+ onInput: q
564
+ }), null, 16, [
565
+ "modelValue",
566
+ "rows",
567
+ "disabled",
568
+ "aria-invalid"
569
+ ]));
570
+ }
571
+ }), Ot = { "aria-hidden": "true" }, kt = { "aria-hidden": "true" }, At = /* @__PURE__ */ C({
572
+ inheritAttrs: !1,
573
+ __name: "Pagination",
574
+ props: {
575
+ count: {},
576
+ pageSize: { default: 10 },
577
+ page: { default: void 0 },
578
+ defaultPage: { default: void 0 },
579
+ siblingCount: { default: 1 },
580
+ boundaryCount: {},
581
+ showSummary: {
582
+ type: Boolean,
583
+ default: !0
584
+ },
585
+ summary: {},
586
+ pageSizes: {},
587
+ jumper: { type: Boolean },
588
+ variant: { default: "full" },
589
+ withEdges: { type: Boolean },
590
+ hideSinglePage: { type: Boolean },
591
+ getPageHref: {},
592
+ translations: {},
593
+ classes: {}
594
+ },
595
+ emits: ["update:page", "update:pageSize"],
596
+ setup(t, { emit: r }) {
597
+ let i = t, a = n("pagination", Le, () => i.classes), s = r, c = te(), u = h(() => a({ responsive: i.variant === "auto" })), d = e(), f = h(() => ({
598
+ ...d.pagination,
599
+ ...i.translations
600
+ })), m = I(i.pageSize);
601
+ G(() => i.pageSize, (e) => m.value = e);
602
+ let b = (e) => ({
603
+ start: Math.min((e - 1) * m.value + 1, i.count),
604
+ end: Math.min(e * m.value, i.count),
605
+ count: i.count
606
+ }), C = h(() => i.hideSinglePage && i.count <= m.value), w = h(() => i.getPageHref ? "a" : "button"), T = (e) => i.getPageHref && e ? {
607
+ role: "link",
608
+ "aria-disabled": "true"
609
+ } : {}, E = h(() => (i.pageSizes ?? []).map((e) => ({
610
+ value: e,
611
+ label: String(e)
612
+ }))), A = at(h(() => ({
613
+ count: i.count,
614
+ pageSize: m.value,
615
+ page: i.page,
616
+ defaultPage: i.defaultPage,
617
+ siblingCount: i.siblingCount,
618
+ boundaryCount: i.boundaryCount,
619
+ type: i.getPageHref ? "link" : "button",
620
+ getPageUrl: i.getPageHref ? ({ page: e }) => i.getPageHref(e) : void 0,
621
+ translations: f.value,
622
+ onPageChange: ({ page: e }) => s("update:page", e)
623
+ })));
624
+ async function j(e, t) {
625
+ if (!t || t === m.value) return;
626
+ let n = Ie(e.page, m.value, t);
627
+ m.value = t, s("update:pageSize", t), await O(), e.setPage(n);
628
+ }
629
+ function M(e, t) {
630
+ let n = e.target, r = Number.parseInt(n.value, 10);
631
+ Number.isNaN(r) || (e.preventDefault(), t.setPage(Math.min(Math.max(r, 1), t.totalPages)), n.value = "");
632
+ }
633
+ return (e, n) => C.value ? _("", !0) : (N(), g(U(Z).RootProvider, D({ key: 0 }, {
634
+ ...U(c),
635
+ class: u.value.base({ class: k(U(c).class) })
636
+ }, { value: U(A) }), {
637
+ default: K(() => [S(U(Z).Context, null, {
638
+ default: K((e) => [
639
+ t.showSummary ? (N(), v("span", {
640
+ key: 0,
641
+ class: k(u.value.summary()),
642
+ "aria-live": "polite"
643
+ }, H((t.summary ?? U(d).pagination.summary)(b(e.page))), 3)) : _("", !0),
644
+ t.pageSizes?.length ? (N(), v("div", {
645
+ key: 1,
646
+ class: k(u.value.pageSize())
647
+ }, [y("span", Ot, H(U(d).pagination.pageSize), 1), S(l, {
648
+ class: k(u.value.pageSizeSelect()),
649
+ size: "sm",
650
+ items: E.value,
651
+ "model-value": m.value,
652
+ "aria-label": U(d).pagination.pageSize,
653
+ "onUpdate:modelValue": (t) => j(e, t)
654
+ }, null, 8, [
655
+ "class",
656
+ "items",
657
+ "model-value",
658
+ "aria-label",
659
+ "onUpdate:modelValue"
660
+ ])], 2)) : _("", !0),
661
+ y("div", { class: k(u.value.list()) }, [
662
+ t.withEdges ? (N(), g(U(Z).FirstTrigger, {
663
+ key: 0,
664
+ "as-child": ""
665
+ }, {
666
+ default: K(() => [(N(), g(B(w.value), D({ class: u.value.trigger() }, T(e.page === 1)), {
667
+ default: K(() => [S(U(de), {
668
+ class: k(u.value.triggerIcon()),
669
+ "aria-hidden": "true"
670
+ }, null, 8, ["class"])]),
671
+ _: 1
672
+ }, 16, ["class"]))]),
673
+ _: 2
674
+ }, 1024)) : _("", !0),
675
+ S(U(Z).PrevTrigger, { "as-child": "" }, {
676
+ default: K(() => [(N(), g(B(w.value), D({ class: u.value.trigger() }, T(e.page === 1)), {
677
+ default: K(() => [S(U(ce), {
678
+ class: k(u.value.triggerIcon()),
679
+ "aria-hidden": "true"
680
+ }, null, 8, ["class"])]),
681
+ _: 1
682
+ }, 16, ["class"]))]),
683
+ _: 2
684
+ }, 1024),
685
+ t.variant === "full" ? _("", !0) : (N(), v("span", {
686
+ key: 1,
687
+ class: k(u.value.compact())
688
+ }, H(U(d).pagination.compact(e.page, e.totalPages)), 3)),
689
+ t.variant === "compact" ? _("", !0) : (N(!0), v(p, { key: 2 }, L(e.pages, (e, t) => (N(), v(p, { key: t }, [e.type === "page" ? (N(), g(U(Z).Item, D({
690
+ key: 0,
691
+ ref_for: !0
692
+ }, e, { "as-child": "" }), {
693
+ default: K(() => [(N(), g(B(w.value), { class: k(u.value.item()) }, {
694
+ default: K(() => [x(H(e.value), 1)]),
695
+ _: 2
696
+ }, 1032, ["class"]))]),
697
+ _: 2
698
+ }, 1040)) : (N(), g(U(Z).Ellipsis, {
699
+ key: 1,
700
+ index: t,
701
+ class: k(u.value.ellipsis()),
702
+ "aria-hidden": "true"
703
+ }, {
704
+ default: K(() => [...n[0] ||= [x(" … ", -1)]]),
705
+ _: 1
706
+ }, 8, ["index", "class"]))], 64))), 128)),
707
+ S(U(Z).NextTrigger, { "as-child": "" }, {
708
+ default: K(() => [(N(), g(B(w.value), D({ class: u.value.trigger() }, T(e.page === e.totalPages)), {
709
+ default: K(() => [S(U(le), {
710
+ class: k(u.value.triggerIcon()),
711
+ "aria-hidden": "true"
712
+ }, null, 8, ["class"])]),
713
+ _: 1
714
+ }, 16, ["class"]))]),
715
+ _: 2
716
+ }, 1024),
717
+ t.withEdges ? (N(), g(U(Z).LastTrigger, {
718
+ key: 3,
719
+ "as-child": ""
720
+ }, {
721
+ default: K(() => [(N(), g(B(w.value), D({ class: u.value.trigger() }, T(e.page === e.totalPages)), {
722
+ default: K(() => [S(U(fe), {
723
+ class: k(u.value.triggerIcon()),
724
+ "aria-hidden": "true"
725
+ }, null, 8, ["class"])]),
726
+ _: 1
727
+ }, 16, ["class"]))]),
728
+ _: 2
729
+ }, 1024)) : _("", !0)
730
+ ], 2),
731
+ t.jumper ? (N(), v("div", {
732
+ key: 2,
733
+ class: k(u.value.jumper())
734
+ }, [y("span", kt, H(U(d).pagination.jumper), 1), S(o, {
735
+ class: k(u.value.jumperInput()),
736
+ size: "sm",
737
+ inputmode: "numeric",
738
+ autocomplete: "off",
739
+ "aria-label": U(d).pagination.jumper,
740
+ onKeydown: J((t) => M(t, e), ["enter"])
741
+ }, null, 8, [
742
+ "class",
743
+ "aria-label",
744
+ "onKeydown"
745
+ ])], 2)) : _("", !0)
746
+ ]),
747
+ _: 1
748
+ })]),
749
+ _: 1
750
+ }, 16, ["value"]));
751
+ }
752
+ }), jt = /* @__PURE__ */ C({
753
+ inheritAttrs: !1,
754
+ __name: "Skeleton",
755
+ props: {
756
+ shape: {},
757
+ width: {},
758
+ height: {},
759
+ classes: {}
760
+ },
761
+ setup(e) {
762
+ let t = e, r = n("skeleton", We, () => t.classes), i = te(), a = (e) => typeof e == "number" ? `${e}px` : e, o = h(() => [{
763
+ width: a(t.width),
764
+ height: a(t.height)
765
+ }, j(i.style)]);
766
+ return (t, n) => (N(), v("span", D({ "aria-hidden": "true" }, {
767
+ ...U(i),
768
+ class: U(r)({
769
+ shape: e.shape,
770
+ class: k(U(i).class)
771
+ }),
772
+ style: o.value
773
+ }), null, 16));
774
+ }
775
+ }), Mt = ["title"], Nt = ["title"], Pt = ["aria-label"], Ft = /* @__PURE__ */ C({
776
+ __name: "DatePickerDayTable",
777
+ props: {
778
+ weeks: {},
779
+ visibleRange: {},
780
+ showWeekNumbers: { type: Boolean },
781
+ plainToday: { type: Boolean },
782
+ hideOutsideDays: { type: Boolean },
783
+ weekendDays: {},
784
+ allowDeselect: { type: Boolean }
785
+ },
786
+ setup(t) {
787
+ let r = e(), i = t, a = n("datePicker", Y), o = h(() => a({
788
+ plainToday: i.plainToday,
789
+ hideOutsideDays: i.hideOutsideDays
790
+ })), s = ct(), c = (e) => e.toString().slice(0, 10), l = (e) => !!i.visibleRange && (e.month !== i.visibleRange.start.month || e.year !== i.visibleRange.start.year), u = (e) => He(e.map(c));
791
+ function d(e) {
792
+ let t = s.value.getDayTableCellState({
793
+ value: e,
794
+ visibleRange: i.visibleRange
795
+ });
796
+ return {
797
+ day: e.day,
798
+ today: t.today,
799
+ selected: t.selected,
800
+ outside: t.outsideRange,
801
+ unavailable: t.unavailable || !!t.disabled,
802
+ weekend: i.weekendDays ? i.weekendDays.includes(Oe(c(e))) : t.weekend
803
+ };
804
+ }
805
+ let f = (e) => s.value.selectionMode === "single" && s.value.getDayTableCellState({
806
+ value: e,
807
+ visibleRange: i.visibleRange
808
+ }).selected;
809
+ function m(e, t) {
810
+ e instanceof KeyboardEvent && e.key !== "Enter" && e.key !== " " || f(t) && (e.preventDefault(), s.value.clearValue({ focus: !1 }));
811
+ }
812
+ function b(e) {
813
+ let t = {};
814
+ return i.weekendDays?.includes(Oe(c(e))) && (t["data-weekend"] = ""), i.allowDeselect && (t.onClickCapture = (t) => m(t, e), t.onKeydownCapture = (t) => m(t, e)), t;
815
+ }
816
+ return (e, n) => (N(), g(U($).Table, { class: k(o.value.table()) }, {
817
+ default: K(() => [S(U($).TableHead, null, {
818
+ default: K(() => [S(U($).TableRow, null, {
819
+ default: K(() => [t.showWeekNumbers ? (N(), v("th", {
820
+ key: 0,
821
+ scope: "col",
822
+ class: k(o.value.weekNumberHeader())
823
+ }, [y("abbr", { title: U(r).datePicker.weekColumnHeader }, H(U(r).datePicker.weekColumnShort), 9, Mt)], 2)) : _("", !0), (N(!0), v(p, null, L(U(s).weekDays, (e) => (N(), g(U($).TableHeader, {
824
+ key: e.long,
825
+ class: k(o.value.columnHeader())
826
+ }, {
827
+ default: K(() => [y("abbr", { title: e.long }, H(e.short), 9, Nt)]),
828
+ _: 2
829
+ }, 1032, ["class"]))), 128))]),
830
+ _: 1
831
+ })]),
832
+ _: 1
833
+ }), S(U($).TableBody, null, {
834
+ default: K(() => [(N(!0), v(p, null, L(t.weeks, (n) => (N(), g(U($).TableRow, { key: n[0]?.toString() }, {
835
+ default: K(() => [t.showWeekNumbers ? (N(), v("th", {
836
+ key: 0,
837
+ scope: "row",
838
+ class: k(o.value.weekNumber()),
839
+ "aria-label": U(r).datePicker.weekNumberCell(u(n))
840
+ }, H(u(n)), 11, Pt)) : _("", !0), (N(!0), v(p, null, L(n, (n) => (N(), v(p, { key: n.toString() }, [l(n) ? (N(), v("td", {
841
+ key: 0,
842
+ class: k(o.value.cell())
843
+ }, null, 2)) : (N(), g(U($).TableCell, D({
844
+ key: 1,
845
+ value: n,
846
+ "visible-range": t.visibleRange,
847
+ class: o.value.cell()
848
+ }, { ref_for: !0 }, b(n)), {
849
+ default: K(() => [S(U($).TableCellTrigger, { class: k(o.value.day()) }, {
850
+ default: K(() => [e.$slots.day ? (N(), v("span", {
851
+ key: 0,
852
+ class: k(o.value.dayContent())
853
+ }, [R(e.$slots, "day", D({ date: c(n) }, { ref_for: !0 }, d(n)))], 2)) : (N(), v(p, { key: 1 }, [x(H(n.day), 1)], 64))]),
854
+ _: 2
855
+ }, 1032, ["class"])]),
856
+ _: 2
857
+ }, 1040, [
858
+ "value",
859
+ "visible-range",
860
+ "class"
861
+ ]))], 64))), 128))]),
862
+ _: 2
863
+ }, 1024))), 128))]),
864
+ _: 3
865
+ })]),
866
+ _: 3
867
+ }, 8, ["class"]));
868
+ }
869
+ }), It = /* @__PURE__ */ C({
870
+ __name: "DatePickerHeader",
871
+ setup(t) {
872
+ let r = n("datePicker", Y), i = e(), a = r(), o = {
873
+ day: "month",
874
+ month: "year",
875
+ year: void 0
876
+ }, s = (e, t) => `${e}, ${i.datePicker.viewTrigger(t, o[t])}`;
877
+ return (e, t) => (N(), g(U($).ViewControl, { class: k(U(a).header()) }, {
878
+ default: K(() => [
879
+ S(U($).PrevTrigger, { class: k(U(a).nav()) }, {
880
+ default: K(() => [S(U(ce), {
881
+ class: k(U(a).navIcon()),
882
+ "aria-hidden": "true"
883
+ }, null, 8, ["class"])]),
884
+ _: 1
885
+ }, 8, ["class"]),
886
+ S(U($).Context, null, {
887
+ default: K((e) => [S(U($).ViewTrigger, {
888
+ class: k(U(a).viewTrigger()),
889
+ "aria-label": s(e.numOfMonths > 1 && e.view === "day" ? e.visibleRangeText.formatted : e.visibleRangeText.start, e.view)
890
+ }, {
891
+ default: K(() => [S(U($).RangeText)]),
892
+ _: 1
893
+ }, 8, ["class", "aria-label"])]),
894
+ _: 1
895
+ }),
896
+ S(U($).NextTrigger, { class: k(U(a).nav()) }, {
897
+ default: K(() => [S(U(le), {
898
+ class: k(U(a).navIcon()),
899
+ "aria-hidden": "true"
900
+ }, null, 8, ["class"])]),
901
+ _: 1
902
+ }, 8, ["class"])
903
+ ]),
904
+ _: 1
905
+ }, 8, ["class"]));
906
+ }
907
+ }), Lt = ["onClick"], Rt = ["disabled", "onClick"], zt = /* @__PURE__ */ C({
908
+ __name: "DatePickerViews",
909
+ props: {
910
+ presets: {},
911
+ showWeekNumbers: { type: Boolean },
912
+ numberOfMonths: {},
913
+ showButtonBar: { type: Boolean },
914
+ plainToday: { type: Boolean },
915
+ hideOutsideDays: { type: Boolean },
916
+ weekendDays: {},
917
+ allowDeselect: { type: Boolean },
918
+ timeZone: {}
919
+ },
920
+ setup(t) {
921
+ let r = e(), i = t, a = n("datePicker", Y)(), o = (e) => typeof e == "string" ? r.rangePresets[e] ?? e : e.label, s = h(() => Math.max(1, Math.floor(i.numberOfMonths ?? 1))), c = h(() => ({
922
+ showWeekNumbers: i.showWeekNumbers,
923
+ plainToday: i.plainToday,
924
+ hideOutsideDays: i.hideOutsideDays || s.value > 1,
925
+ weekendDays: i.weekendDays,
926
+ allowDeselect: i.allowDeselect
927
+ }));
928
+ function l(e) {
929
+ return Array.from({ length: s.value }, (t, n) => {
930
+ let r = e.getOffset({ months: n }), i = e.visibleRange.start.add({ months: n });
931
+ return {
932
+ title: r.visibleRangeText.start,
933
+ weeks: r.weeks,
934
+ visibleRange: {
935
+ start: i,
936
+ end: i.add({ months: 1 }).subtract({ days: 1 })
937
+ }
938
+ };
939
+ });
940
+ }
941
+ function u(e) {
942
+ if (e.selectionMode === "single") return e.selectToday();
943
+ let [t = 0, n = 1, r = 1] = $e(i.timeZone).split("-").map(Number);
944
+ e.setFocusedValue(e.focusedValue.set({
945
+ year: t,
946
+ month: n,
947
+ day: r
948
+ }));
949
+ }
950
+ return (e, n) => (N(), v(p, null, [
951
+ S(U($).View, { view: "day" }, {
952
+ default: K(() => [S(U($).Context, null, {
953
+ default: K((t) => [S(It), s.value > 1 ? (N(), v("div", {
954
+ key: 0,
955
+ class: k(U(a).months())
956
+ }, [(N(!0), v(p, null, L(l(t), (t) => (N(), v("div", {
957
+ key: t.title,
958
+ class: k(U(a).month())
959
+ }, [y("div", { class: k(U(a).monthTitle()) }, H(t.title), 3), S(Ft, D({
960
+ weeks: t.weeks,
961
+ "visible-range": t.visibleRange
962
+ }, { ref_for: !0 }, c.value), b({ _: 2 }, [e.$slots.day ? {
963
+ name: "day",
964
+ fn: K((t) => [R(e.$slots, "day", D({ ref_for: !0 }, t))]),
965
+ key: "0"
966
+ } : void 0]), 1040, ["weeks", "visible-range"])], 2))), 128))], 2)) : (N(), g(Ft, D({
967
+ key: 1,
968
+ weeks: t.weeks
969
+ }, c.value), b({ _: 2 }, [e.$slots.day ? {
970
+ name: "day",
971
+ fn: K((t) => [R(e.$slots, "day", A(w(t)))]),
972
+ key: "0"
973
+ } : void 0]), 1040, ["weeks"]))]),
974
+ _: 3
975
+ })]),
976
+ _: 3
977
+ }),
978
+ S(U($).View, { view: "month" }, {
979
+ default: K(() => [S(U($).Context, null, {
980
+ default: K((e) => [S(It), S(U($).Table, { class: k(U(a).table()) }, {
981
+ default: K(() => [S(U($).TableBody, null, {
982
+ default: K(() => [(N(!0), v(p, null, L(e.getMonthsGrid({
983
+ columns: 4,
984
+ format: "short"
985
+ }), (e) => (N(), g(U($).TableRow, { key: e[0]?.value }, {
986
+ default: K(() => [(N(!0), v(p, null, L(e, (e) => (N(), g(U($).TableCell, {
987
+ key: e.value,
988
+ value: e.value,
989
+ class: k(U(a).cell())
990
+ }, {
991
+ default: K(() => [S(U($).TableCellTrigger, { class: k(U(a).period()) }, {
992
+ default: K(() => [x(H(e.label), 1)]),
993
+ _: 2
994
+ }, 1032, ["class"])]),
995
+ _: 2
996
+ }, 1032, ["value", "class"]))), 128))]),
997
+ _: 2
998
+ }, 1024))), 128))]),
999
+ _: 2
1000
+ }, 1024)]),
1001
+ _: 2
1002
+ }, 1032, ["class"])]),
1003
+ _: 1
1004
+ })]),
1005
+ _: 1
1006
+ }),
1007
+ S(U($).View, { view: "year" }, {
1008
+ default: K(() => [S(U($).Context, null, {
1009
+ default: K((e) => [S(It), S(U($).Table, { class: k(U(a).table()) }, {
1010
+ default: K(() => [S(U($).TableBody, null, {
1011
+ default: K(() => [(N(!0), v(p, null, L(e.getYearsGrid({ columns: 4 }), (e) => (N(), g(U($).TableRow, { key: e[0]?.value }, {
1012
+ default: K(() => [(N(!0), v(p, null, L(e, (e) => (N(), g(U($).TableCell, {
1013
+ key: e.value,
1014
+ value: e.value,
1015
+ class: k(U(a).cell())
1016
+ }, {
1017
+ default: K(() => [S(U($).TableCellTrigger, { class: k(U(a).period()) }, {
1018
+ default: K(() => [x(H(e.label), 1)]),
1019
+ _: 2
1020
+ }, 1032, ["class"])]),
1021
+ _: 2
1022
+ }, 1032, ["value", "class"]))), 128))]),
1023
+ _: 2
1024
+ }, 1024))), 128))]),
1025
+ _: 2
1026
+ }, 1024)]),
1027
+ _: 2
1028
+ }, 1032, ["class"])]),
1029
+ _: 1
1030
+ })]),
1031
+ _: 1
1032
+ }),
1033
+ t.presets?.length ? (N(), v("div", {
1034
+ key: 0,
1035
+ class: k(U(a).presets())
1036
+ }, [(N(!0), v(p, null, L(t.presets, (e) => (N(), g(U($).PresetTrigger, {
1037
+ key: o(e),
1038
+ value: typeof e == "string" ? e : e.value,
1039
+ class: k(U(a).preset()),
1040
+ "aria-label": o(e)
1041
+ }, {
1042
+ default: K(() => [x(H(o(e)), 1)]),
1043
+ _: 2
1044
+ }, 1032, [
1045
+ "value",
1046
+ "class",
1047
+ "aria-label"
1048
+ ]))), 128))], 2)) : _("", !0),
1049
+ t.showButtonBar ? (N(), g(U($).Context, { key: 1 }, {
1050
+ default: K((e) => [y("div", { class: k(U(a).buttonBar()) }, [y("button", {
1051
+ type: "button",
1052
+ class: k(U(a).buttonBarButton()),
1053
+ onClick: (t) => u(e)
1054
+ }, H(U(r).calendar.today), 11, Lt), y("button", {
1055
+ type: "button",
1056
+ class: k(U(a).buttonBarButton()),
1057
+ disabled: !e.value.length,
1058
+ onClick: (t) => e.clearValue({ focus: !1 })
1059
+ }, H(U(r).calendar.clear), 11, Rt)], 2)]),
1060
+ _: 1
1061
+ })) : _("", !0)
1062
+ ], 64));
1063
+ }
1064
+ }), Bt = /* @__PURE__ */ C({
1065
+ __name: "DatePickerCalendar",
1066
+ props: {
1067
+ presets: {},
1068
+ responsive: { type: Boolean },
1069
+ showWeekNumbers: { type: Boolean },
1070
+ numberOfMonths: {},
1071
+ showButtonBar: { type: Boolean },
1072
+ plainToday: { type: Boolean },
1073
+ hideOutsideDays: { type: Boolean },
1074
+ weekendDays: {},
1075
+ allowDeselect: { type: Boolean },
1076
+ timeZone: {}
1077
+ },
1078
+ setup(e) {
1079
+ let t = e, r = n("datePicker", Y), i = r(), a = h(() => ({
1080
+ presets: t.presets,
1081
+ showWeekNumbers: t.showWeekNumbers,
1082
+ numberOfMonths: t.numberOfMonths,
1083
+ showButtonBar: t.showButtonBar,
1084
+ plainToday: t.plainToday,
1085
+ hideOutsideDays: t.hideOutsideDays,
1086
+ weekendDays: t.weekendDays,
1087
+ allowDeselect: t.allowDeselect,
1088
+ timeZone: t.timeZone
1089
+ })), o = h(() => (t.numberOfMonths ?? 1) > 1), s = I(!1), c, l = () => s.value = !!c?.matches;
1090
+ return ee(() => {
1091
+ t.responsive && typeof window.matchMedia == "function" && (c = window.matchMedia("(max-width: 639.98px)"), l(), c.addEventListener("change", l));
1092
+ }), M(() => c?.removeEventListener("change", l)), (e, t) => (N(), g(m, { to: "body" }, [s.value ? (N(), v(p, { key: 0 }, [S(U($).Context, null, {
1093
+ default: K((e) => [e.open ? (N(), v("div", {
1094
+ key: 0,
1095
+ class: k(U(i).backdrop()),
1096
+ "aria-hidden": "true"
1097
+ }, null, 2)) : _("", !0)]),
1098
+ _: 1
1099
+ }), y("div", { class: k(U(i).sheet()) }, [S(U($).Content, { class: k(U(r)({
1100
+ multiMonth: o.value,
1101
+ bottomSheet: !0
1102
+ }).content()) }, {
1103
+ default: K(() => [S(zt, A(w(a.value)), b({ _: 2 }, [e.$slots.day ? {
1104
+ name: "day",
1105
+ fn: K((t) => [R(e.$slots, "day", A(w(t)))]),
1106
+ key: "0"
1107
+ } : void 0]), 1040)]),
1108
+ _: 3
1109
+ }, 8, ["class"])], 2)], 64)) : (N(), g(U($).Positioner, { key: 1 }, {
1110
+ default: K(() => [S(U($).Content, { class: k(o.value ? U(r)({ multiMonth: o.value }).content() : U(i).content()) }, {
1111
+ default: K(() => [S(zt, A(w(a.value)), b({ _: 2 }, [e.$slots.day ? {
1112
+ name: "day",
1113
+ fn: K((t) => [R(e.$slots, "day", A(w(t)))]),
1114
+ key: "0"
1115
+ } : void 0]), 1040)]),
1116
+ _: 3
1117
+ }, 8, ["class"])]),
1118
+ _: 3
1119
+ }))]));
1120
+ }
1121
+ }), Vt = /* @__PURE__ */ C({
1122
+ __name: "DateSegments",
1123
+ props: {
1124
+ index: {},
1125
+ label: {},
1126
+ describedby: {},
1127
+ paste: { type: Function },
1128
+ size: {}
1129
+ },
1130
+ setup(t) {
1131
+ let r = e(), i = t;
1132
+ function a(e) {
1133
+ let t = e.clipboardData?.getData("text/plain") ?? "";
1134
+ i.paste?.(t, i.index) && (e.preventDefault(), e.stopPropagation());
1135
+ }
1136
+ let o = n("datePicker", Y), s = h(() => o({ size: i.size }));
1137
+ return (e, n) => (N(), g(U(st).SegmentGroup, D({
1138
+ index: t.index,
1139
+ class: s.value.segments(),
1140
+ "aria-label": t.label,
1141
+ "aria-describedby": t.describedby
1142
+ }, t.paste ? { onPasteCapture: a } : {}), {
1143
+ default: K(() => [S(U(st).Context, null, {
1144
+ default: K((e) => [(N(!0), v(p, null, L(e.getSegments({ index: t.index }), (e, t) => (N(), g(U(st).Segment, {
1145
+ key: t,
1146
+ segment: e,
1147
+ class: k(s.value.segment()),
1148
+ "aria-label": U(r).dateSegments[e.type]
1149
+ }, null, 8, [
1150
+ "segment",
1151
+ "class",
1152
+ "aria-label"
1153
+ ]))), 128))]),
1154
+ _: 1
1155
+ })]),
1156
+ _: 1
1157
+ }, 16, [
1158
+ "index",
1159
+ "class",
1160
+ "aria-label",
1161
+ "aria-describedby"
1162
+ ]));
1163
+ }
1164
+ }), Ht = (e, t) => e ? e.toString().slice(0, t ? 16 : 10) : null;
1165
+ function Ut(e, t, n) {
1166
+ return t ? e.includes("T") ? pt(e.slice(0, 16)) : pt(`${e}T${n === "max" ? "23:59" : "00:00"}`) : ft(e.slice(0, 10));
1167
+ }
1168
+ function Wt(e, t, n, r) {
1169
+ let i = typeof e == "string" && !e.includes("T"), a = Qe(e, t && !i, n);
1170
+ return a ? Ut(a, t, r) : void 0;
1171
+ }
1172
+ var Gt = (e, t, n, r) => Te(Ht(e, t), {
1173
+ valueType: n,
1174
+ timeZone: r,
1175
+ withTime: t
1176
+ }), Kt = (e, t, n) => Qe(e, t, n);
1177
+ function qt(e, t) {
1178
+ if (!e && !t?.length) return;
1179
+ let n = new Set(t?.map((e) => Qe(e, !1)));
1180
+ return (t) => {
1181
+ let r = Ht(t, !1);
1182
+ return n.has(r) || !!e?.(r);
1183
+ };
1184
+ }
1185
+ function Jt(e, t) {
1186
+ if ("hour" in e) return e;
1187
+ let n = t && "hour" in t ? new dt(t.hour, t.minute) : new dt();
1188
+ return mt(e, n);
1189
+ }
1190
+ var Yt = {
1191
+ year: 2e3,
1192
+ month: 1,
1193
+ day: 1
1194
+ };
1195
+ function Xt(e) {
1196
+ let [t = 0, n = 0, r = 0] = e.split(":").map(Number);
1197
+ return new lt(Yt.year, Yt.month, Yt.day, t, n, r);
1198
+ }
1199
+ var Zt = (e) => String(e).padStart(2, "0"), Qt = (e, t = !1) => e && "hour" in e ? `${Zt(e.hour)}:${Zt(e.minute)}${t ? `:${Zt(e.second)}` : ""}` : null, $t = (e, t, n, r = !1) => qe(e, t, n, r), en = ["id", "data-placeholder"], tn = ["name", "value"], nn = ["id"], rn = [
1200
+ "id",
1201
+ "data-hidden",
1202
+ "onClick"
1203
+ ], an = ["id"], on = /* @__PURE__ */ C({
1204
+ __name: "DatePickerBase",
1205
+ props: {
1206
+ mode: {},
1207
+ dates: {},
1208
+ withTime: { type: Boolean },
1209
+ min: {},
1210
+ max: {},
1211
+ isDateUnavailable: { type: Function },
1212
+ locale: {},
1213
+ disabled: { type: Boolean },
1214
+ readOnly: { type: Boolean },
1215
+ invalid: { type: Boolean },
1216
+ required: { type: Boolean },
1217
+ name: {},
1218
+ label: {},
1219
+ ownId: {},
1220
+ placeholder: {},
1221
+ className: {},
1222
+ period: {},
1223
+ classes: {},
1224
+ presets: {},
1225
+ size: {},
1226
+ hideClear: { type: Boolean },
1227
+ firstDayOfWeek: {},
1228
+ timeZone: {},
1229
+ showTimeZone: { type: Boolean },
1230
+ responsive: { type: Boolean },
1231
+ showWeekNumbers: { type: Boolean },
1232
+ numberOfMonths: {},
1233
+ showButtonBar: { type: Boolean },
1234
+ plainToday: { type: Boolean },
1235
+ hideOutsideDays: { type: Boolean },
1236
+ weekendDays: {},
1237
+ allowDeselect: { type: Boolean }
1238
+ },
1239
+ emits: ["change"],
1240
+ setup(t, { emit: r }) {
1241
+ let i = e(), a = t, o = n("datePicker", Y, () => a.classes), s = r, c = h(() => o({ size: a.size })), l = ne(), u = it(), d = h(() => ({
1242
+ disabled: a.disabled ?? u?.value.disabled,
1243
+ readOnly: a.readOnly ?? u?.value.readOnly,
1244
+ invalid: a.invalid ?? u?.value.invalid,
1245
+ required: a.required ?? u?.value.required
1246
+ })), f = a.mode === "range", m = a.mode === "multiple", x = f ? "range" : "single", C = f ? [0, 1] : [0], T = [i.dateRange.start, i.dateRange.end], E = h(() => {
1247
+ let e = a.ownId, t = u?.value ? { label: (e) => f ? `${u.value.ids.label} ${l}r${e}` : u.value.ids.label } : {}, n = e ? { segmentGroup: (t) => t === 0 ? e : void 0 } : {};
1248
+ return u?.value || e ? {
1249
+ ...t,
1250
+ ...n
1251
+ } : void 0;
1252
+ }), O = (e) => u?.value ? void 0 : f ? [a.label, T[e]].filter(Boolean).join(", ") : a.label, j = f ? {
1253
+ ...i.datePicker,
1254
+ clearTrigger: i.dateRange.clearTrigger
1255
+ } : i.datePicker, M = h(() => a.period ? new ut(a.locale, a.period === "month" ? {
1256
+ month: "2-digit",
1257
+ year: "numeric"
1258
+ } : { year: "numeric" }) : void 0), ee = h(() => a.firstDayOfWeek ?? Ae(a.locale).firstDay), P = h(() => {
1259
+ if (!a.showTimeZone || !a.timeZone) return;
1260
+ let e = a.dates[0], t = e ? tt(e.toString().slice(0, 16), a.timeZone) : /* @__PURE__ */ new Date();
1261
+ return {
1262
+ short: Je(a.timeZone, a.locale, t),
1263
+ long: i.calendar.timeZone(Ye(a.timeZone, a.locale, t))
1264
+ };
1265
+ }), F = h(() => [u?.value.ariaDescribedby, P.value ? `${l}tz` : void 0].filter(Boolean).join(" ") || void 0), I = (e) => C.every((t) => e.getSegments({ index: t }).every((e) => e.type === "literal" || e.isPlaceholder)), z = (e) => !!a.placeholder && I(e) && !e.focused, B = (e) => a.placeholder && I(e) ? [F.value, `${l}ph`].filter(Boolean).join(" ") : F.value, V = h(() => {
1266
+ if (!a.dates.length) return a.placeholder ?? i.calendar.noDates;
1267
+ if (a.dates.length > 3) return Ve(i.calendar.datesSelected, a.dates.length, a.locale);
1268
+ let e = new ut(a.locale, {
1269
+ day: "2-digit",
1270
+ month: "2-digit",
1271
+ year: "numeric",
1272
+ timeZone: "UTC"
1273
+ });
1274
+ return a.dates.map((t) => e.format(t.toDate("UTC"))).join(", ");
1275
+ }), te = h(() => ({
1276
+ presets: a.presets,
1277
+ showWeekNumbers: a.showWeekNumbers,
1278
+ numberOfMonths: a.numberOfMonths,
1279
+ showButtonBar: a.showButtonBar,
1280
+ plainToday: a.plainToday,
1281
+ hideOutsideDays: a.hideOutsideDays,
1282
+ weekendDays: a.weekendDays,
1283
+ allowDeselect: a.allowDeselect,
1284
+ timeZone: a.timeZone,
1285
+ responsive: a.responsive
1286
+ }));
1287
+ function re(e) {
1288
+ s("change", a.withTime ? e.map((e, t) => Jt(e, a.dates[t])) : e);
1289
+ }
1290
+ function ie(e, t) {
1291
+ if (a.period) return !1;
1292
+ if (f) {
1293
+ let t = Be(e, a.locale, a.withTime);
1294
+ if (t) return s("change", [Ut(t.start, a.withTime), Ut(t.end, a.withTime)]), !0;
1295
+ }
1296
+ let n = ze(e, a.locale, a.withTime);
1297
+ if (!n) return !1;
1298
+ let r = [...a.dates];
1299
+ return r[t] = Ut(n, a.withTime), s("change", r.filter(Boolean)), !0;
1300
+ }
1301
+ let W = {
1302
+ placement: "bottom-start",
1303
+ gutter: 4
1304
+ };
1305
+ return (e, n) => (N(), g(U($).Root, D({
1306
+ class: c.value.base({ class: t.className }),
1307
+ "model-value": t.dates,
1308
+ "selection-mode": t.mode,
1309
+ min: t.min,
1310
+ max: t.max,
1311
+ "is-date-unavailable": t.isDateUnavailable,
1312
+ locale: t.locale,
1313
+ "start-of-week": ee.value,
1314
+ "min-view": t.period,
1315
+ "default-view": t.period,
1316
+ "num-of-months": t.numberOfMonths,
1317
+ "time-zone": t.timeZone
1318
+ }, d.value, {
1319
+ positioning: W,
1320
+ translations: U(j),
1321
+ "lazy-mount": "",
1322
+ "unmount-on-exit": "",
1323
+ onValueChange: n[1] ||= (e) => re(e.value)
1324
+ }), {
1325
+ default: K(() => [S(U($).Control, { class: k(c.value.control()) }, {
1326
+ default: K(() => [
1327
+ m ? (N(), v(p, { key: 0 }, [y("span", {
1328
+ id: `${U(l)}v`,
1329
+ class: k(c.value.multiValue()),
1330
+ "data-placeholder": t.dates.length ? void 0 : ""
1331
+ }, H(V.value), 11, en), t.name ? (N(!0), v(p, { key: 0 }, L(t.dates, (e, n) => (N(), v("input", {
1332
+ key: e.toString(),
1333
+ type: "hidden",
1334
+ name: `${t.name}[${n}]`,
1335
+ value: e.toString()
1336
+ }, null, 8, tn))), 128)) : _("", !0)], 64)) : (N(), g(U(st).Root, D({
1337
+ key: 1,
1338
+ class: c.value.dateInput(),
1339
+ ids: E.value,
1340
+ "model-value": t.dates,
1341
+ "selection-mode": U(x),
1342
+ granularity: t.withTime ? "minute" : "day",
1343
+ formatter: M.value,
1344
+ min: t.min,
1345
+ max: t.max,
1346
+ "is-date-unavailable": t.isDateUnavailable,
1347
+ locale: t.locale,
1348
+ "should-force-leading-zeros": "",
1349
+ name: t.name
1350
+ }, d.value, {
1351
+ translations: U(i).dateInput,
1352
+ onValueChange: n[0] ||= (e) => s("change", e.value)
1353
+ }), {
1354
+ default: K(() => [S(U(st).Context, null, {
1355
+ default: K((e) => [S(U(st).Control, {
1356
+ class: k(c.value.dateControl()),
1357
+ "data-placeholder-shown": z(e) || void 0
1358
+ }, {
1359
+ default: K(() => [(N(!0), v(p, null, L(U(C), (n) => (N(), v(p, { key: n }, [
1360
+ n === 1 ? (N(), v("span", {
1361
+ key: 0,
1362
+ class: k(c.value.rangeSeparator()),
1363
+ "aria-hidden": "true"
1364
+ }, "–", 2)) : _("", !0),
1365
+ f && U(u) ? (N(), v("span", {
1366
+ key: 1,
1367
+ id: `${U(l)}r${n}`,
1368
+ class: k(c.value.rangeLabel())
1369
+ }, H(T[n]), 11, nn)) : _("", !0),
1370
+ S(Vt, {
1371
+ index: n,
1372
+ label: O(n),
1373
+ describedby: B(e),
1374
+ paste: t.period ? void 0 : ie,
1375
+ size: t.size
1376
+ }, null, 8, [
1377
+ "index",
1378
+ "label",
1379
+ "describedby",
1380
+ "paste",
1381
+ "size"
1382
+ ])
1383
+ ], 64))), 128))]),
1384
+ _: 2
1385
+ }, 1032, ["class", "data-placeholder-shown"]), t.placeholder && I(e) ? (N(), v("span", {
1386
+ key: 0,
1387
+ id: `${U(l)}ph`,
1388
+ class: k(c.value.placeholder()),
1389
+ "data-hidden": z(e) ? void 0 : "",
1390
+ onClick: (t) => e.focus()
1391
+ }, H(t.placeholder), 11, rn)) : _("", !0)]),
1392
+ _: 1
1393
+ }), (N(!0), v(p, null, L(U(C), (e) => (N(), g(U(st).HiddenInput, {
1394
+ key: e,
1395
+ index: e
1396
+ }, null, 8, ["index"]))), 128))]),
1397
+ _: 1
1398
+ }, 16, [
1399
+ "class",
1400
+ "ids",
1401
+ "model-value",
1402
+ "selection-mode",
1403
+ "granularity",
1404
+ "formatter",
1405
+ "min",
1406
+ "max",
1407
+ "is-date-unavailable",
1408
+ "locale",
1409
+ "name",
1410
+ "translations"
1411
+ ])),
1412
+ P.value ? (N(), v(p, { key: 2 }, [y("span", {
1413
+ class: k(c.value.timeZone()),
1414
+ "aria-hidden": "true"
1415
+ }, H(P.value.short), 3), y("span", {
1416
+ id: `${U(l)}tz`,
1417
+ hidden: ""
1418
+ }, H(P.value.long), 9, an)], 64)) : _("", !0),
1419
+ t.hideClear ? _("", !0) : (N(), g(U($).ClearTrigger, {
1420
+ key: 3,
1421
+ class: k(c.value.clear())
1422
+ }, {
1423
+ default: K(() => [S(U(_e), {
1424
+ class: k(c.value.clearIcon()),
1425
+ "aria-hidden": "true"
1426
+ }, null, 8, ["class"])]),
1427
+ _: 1
1428
+ }, 8, ["class"])),
1429
+ S(U($).Trigger, D({ class: c.value.trigger() }, m ? { "aria-describedby": `${U(l)}v` } : {}), {
1430
+ default: K(() => [S(U(ae), {
1431
+ class: k(c.value.triggerIcon()),
1432
+ "aria-hidden": "true"
1433
+ }, null, 8, ["class"])]),
1434
+ _: 1
1435
+ }, 16, ["class"])
1436
+ ]),
1437
+ _: 1
1438
+ }, 8, ["class"]), S(Bt, A(w(te.value)), b({ _: 2 }, [e.$slots.day ? {
1439
+ name: "day",
1440
+ fn: K((t) => [R(e.$slots, "day", A(w(t)))]),
1441
+ key: "0"
1442
+ } : void 0]), 1040)]),
1443
+ _: 3
1444
+ }, 16, [
1445
+ "class",
1446
+ "model-value",
1447
+ "selection-mode",
1448
+ "min",
1449
+ "max",
1450
+ "is-date-unavailable",
1451
+ "locale",
1452
+ "start-of-week",
1453
+ "min-view",
1454
+ "default-view",
1455
+ "num-of-months",
1456
+ "time-zone",
1457
+ "translations"
1458
+ ]));
1459
+ }
1460
+ }), sn = /* @__PURE__ */ C({
1461
+ inheritAttrs: !1,
1462
+ __name: "DatePicker",
1463
+ props: {
1464
+ modelValue: { default: void 0 },
1465
+ defaultValue: { default: void 0 },
1466
+ selectionMode: { default: "single" },
1467
+ valueType: { default: "string" },
1468
+ withTime: {
1469
+ type: Boolean,
1470
+ default: !1
1471
+ },
1472
+ min: {},
1473
+ max: {},
1474
+ isDateUnavailable: {},
1475
+ excludeDates: {},
1476
+ locale: {},
1477
+ disabled: {
1478
+ type: Boolean,
1479
+ default: void 0
1480
+ },
1481
+ readOnly: {
1482
+ type: Boolean,
1483
+ default: void 0
1484
+ },
1485
+ invalid: {
1486
+ type: Boolean,
1487
+ default: void 0
1488
+ },
1489
+ required: {
1490
+ type: Boolean,
1491
+ default: void 0
1492
+ },
1493
+ name: {},
1494
+ placeholder: {},
1495
+ size: {},
1496
+ clearable: {
1497
+ type: Boolean,
1498
+ default: !0
1499
+ },
1500
+ showButtonBar: { type: Boolean },
1501
+ showWeekNumbers: { type: Boolean },
1502
+ numberOfMonths: {},
1503
+ highlightToday: {
1504
+ type: Boolean,
1505
+ default: !0
1506
+ },
1507
+ hideOutsideDays: { type: Boolean },
1508
+ firstDayOfWeek: {},
1509
+ weekendDays: {},
1510
+ allowDeselect: { type: Boolean },
1511
+ timeZone: {},
1512
+ showTimeZone: { type: Boolean },
1513
+ responsive: { type: Boolean },
1514
+ id: {},
1515
+ classes: {}
1516
+ },
1517
+ emits: ["update:modelValue"],
1518
+ setup(e, { emit: n }) {
1519
+ let i = t(), a = e, o = h(() => a.locale ?? i.value.locale), c = n, l = te(), u = h(() => r(l)), d = h(() => u.value.rest["aria-label"]);
1520
+ s("DatePicker", () => a.id);
1521
+ let f = I(a.defaultValue ?? null), p = h(() => a.modelValue === void 0 ? f.value : a.modelValue), m = h(() => Array.isArray(p.value) ? p.value : p.value ? [p.value] : []), _ = h(() => m.value.map((e) => Wt(e, a.withTime, a.timeZone)).filter((e) => !!e)), v = (e) => e.map((e) => Kt(e, a.withTime, a.timeZone)).join();
1522
+ function y(e) {
1523
+ let t = e.map((e) => Gt(e, a.withTime, a.valueType, a.timeZone));
1524
+ if (v(t) === v(m.value)) return;
1525
+ let n = a.selectionMode === "multiple" ? t : t[0] ?? null;
1526
+ f.value = n, c("update:modelValue", n);
1527
+ }
1528
+ let x = h(() => ({
1529
+ min: Wt(a.min, a.withTime, a.timeZone, "min"),
1530
+ max: Wt(a.max, a.withTime, a.timeZone, "max")
1531
+ })), S = h(() => qt(a.isDateUnavailable, a.excludeDates));
1532
+ return (t, n) => (N(), g(on, D({
1533
+ mode: e.selectionMode,
1534
+ dates: _.value,
1535
+ "with-time": e.withTime
1536
+ }, x.value, {
1537
+ "is-date-unavailable": S.value,
1538
+ locale: o.value,
1539
+ disabled: e.disabled,
1540
+ "read-only": e.readOnly,
1541
+ invalid: e.invalid,
1542
+ required: e.required,
1543
+ name: e.name,
1544
+ label: d.value,
1545
+ "own-id": e.id,
1546
+ placeholder: e.placeholder,
1547
+ classes: e.classes,
1548
+ "class-name": u.value.className,
1549
+ style: u.value.style,
1550
+ size: e.size,
1551
+ "hide-clear": !e.clearable,
1552
+ "show-button-bar": e.showButtonBar,
1553
+ "show-week-numbers": e.showWeekNumbers,
1554
+ "number-of-months": e.numberOfMonths,
1555
+ "plain-today": !e.highlightToday,
1556
+ "hide-outside-days": e.hideOutsideDays,
1557
+ "first-day-of-week": e.firstDayOfWeek,
1558
+ "weekend-days": e.weekendDays,
1559
+ "allow-deselect": e.allowDeselect,
1560
+ "time-zone": e.timeZone,
1561
+ "show-time-zone": e.showTimeZone,
1562
+ responsive: e.responsive,
1563
+ onChange: y
1564
+ }), b({ _: 2 }, [t.$slots.day ? {
1565
+ name: "day",
1566
+ fn: K((e) => [R(t.$slots, "day", A(w(e)))]),
1567
+ key: "0"
1568
+ } : void 0]), 1040, /* @__PURE__ */ "mode.dates.with-time.is-date-unavailable.locale.disabled.read-only.invalid.required.name.label.own-id.placeholder.classes.class-name.style.size.hide-clear.show-button-bar.show-week-numbers.number-of-months.plain-today.hide-outside-days.first-day-of-week.weekend-days.allow-deselect.time-zone.show-time-zone.responsive".split(".")));
1569
+ }
1570
+ }), cn = ["aria-label", "onClick"], ln = ["data-placeholder-shown"], un = ["data-placeholder-shown"], dn = ["aria-label", "onClick"], fn = [
1571
+ "aria-controls",
1572
+ "aria-activedescendant",
1573
+ "aria-label",
1574
+ "placeholder",
1575
+ "value",
1576
+ "onInput"
1577
+ ], pn = ["aria-checked"], mn = ["data-state"], hn = /* @__PURE__ */ C({
1578
+ inheritAttrs: !1,
1579
+ __name: "MultiSelect",
1580
+ props: {
1581
+ items: {},
1582
+ modelValue: { default: void 0 },
1583
+ defaultValue: { default: void 0 },
1584
+ placeholder: {},
1585
+ summary: {},
1586
+ maxShown: { default: 2 },
1587
+ disabled: {
1588
+ type: Boolean,
1589
+ default: void 0
1590
+ },
1591
+ invalid: {
1592
+ type: Boolean,
1593
+ default: void 0
1594
+ },
1595
+ required: {
1596
+ type: Boolean,
1597
+ default: void 0
1598
+ },
1599
+ name: {},
1600
+ itemValue: {},
1601
+ itemLabel: {},
1602
+ itemDisabled: {},
1603
+ itemGroup: {},
1604
+ itemKeywords: {},
1605
+ valueKey: {},
1606
+ display: { default: "text" },
1607
+ checkboxes: {
1608
+ type: Boolean,
1609
+ default: !0
1610
+ },
1611
+ selectAll: { type: Boolean },
1612
+ max: {},
1613
+ clearable: { type: Boolean },
1614
+ loading: { type: Boolean },
1615
+ loadingText: {},
1616
+ size: {},
1617
+ filter: { type: Boolean },
1618
+ manualFilter: { type: Boolean },
1619
+ emptyText: {},
1620
+ hasMore: { type: Boolean },
1621
+ dataSource: {},
1622
+ minSearchLength: {},
1623
+ pageSize: {},
1624
+ id: {},
1625
+ classes: {}
1626
+ },
1627
+ emits: [
1628
+ "update:modelValue",
1629
+ "filterChange",
1630
+ "loadMore"
1631
+ ],
1632
+ setup(t, { emit: i }) {
1633
+ let a = e(), o = t, s = n("multiSelect", Ne, () => o.classes), l = i, C = te(), T = h(() => r(C)), E = h(() => o.display === "chips"), j = h(() => s({
1634
+ size: o.size,
1635
+ clearable: o.clearable && !E.value
1636
+ })), M = a.select, P = h(() => ({
1637
+ itemValue: o.itemValue,
1638
+ itemLabel: o.itemLabel,
1639
+ itemDisabled: o.itemDisabled,
1640
+ itemGroup: o.itemGroup,
1641
+ itemKeywords: o.itemKeywords,
1642
+ valueKey: o.valueKey
1643
+ })), F = I(""), z = u({
1644
+ items: () => o.items,
1645
+ source: () => o.dataSource,
1646
+ accessors: () => P.value,
1647
+ pageSize: () => o.pageSize,
1648
+ minSearchLength: () => o.minSearchLength
1649
+ }), { options: B, visible: V, groups: re, ordered: ie } = d(() => z.items.value, () => P.value, () => o.filter && !o.manualFilter && !o.dataSource ? F.value : ""), W = h(() => [...B.value, ...z.resolvedOptions.value]), { selected: q, keys: J, commit: ae, commitKeys: ce } = f({
1650
+ multiple: !0,
1651
+ model: () => o.modelValue,
1652
+ defaultValue: o.defaultValue,
1653
+ accessors: () => P.value,
1654
+ items: W,
1655
+ emit: (e) => l("update:modelValue", e),
1656
+ check: {
1657
+ component: "MultiSelect",
1658
+ ready: () => !o.dataSource && !o.loading && o.items.length > 0
1659
+ }
1660
+ });
1661
+ ee(() => z.resolve(J.value, W.value)), G(J, (e) => z.resolve(e, W.value));
1662
+ let le = h(() => o.loading || z.loading.value), ue = h(() => o.hasMore || z.hasMore.value);
1663
+ function de() {
1664
+ o.dataSource ? z.loadMore() : l("loadMore");
1665
+ }
1666
+ let fe = h(() => o.max !== void 0 && q.value.length >= o.max), pe = h(() => {
1667
+ let e = new Set(J.value);
1668
+ return ot({
1669
+ items: ie.value,
1670
+ itemToString: (e) => e.label,
1671
+ itemToValue: (e) => e.key,
1672
+ isItemDisabled: (t) => t.disabled || fe.value && !e.has(t.key)
1673
+ });
1674
+ }), ge = h(() => o.filter || o.selectAll), ve = ne(), be = h(() => o.emptyText ?? z.emptyText.value ?? (F.value ? a.common.noResults : a.common.empty)), Se = h(() => ({
1675
+ item: j.value.item(),
1676
+ itemText: j.value.itemText(),
1677
+ icon: j.value.icon(),
1678
+ itemIndicator: j.value.itemIndicator(),
1679
+ itemBody: j.value.itemBody(),
1680
+ itemDescription: j.value.itemDescription(),
1681
+ group: j.value.group(),
1682
+ groupLabel: j.value.groupLabel(),
1683
+ loading: j.value.loading(),
1684
+ loadingIcon: j.value.loadingIcon(),
1685
+ sentinel: j.value.sentinel(),
1686
+ empty: j.value.empty(),
1687
+ check: j.value.check(),
1688
+ checkIcon: j.value.checkIcon()
1689
+ })), Y = h(() => q.value.length ? q.value.length > o.maxShown ? (o.summary ?? a.common.selectedCount)(q.value.length) : q.value.map((e) => e.label).join(", ") : o.placeholder ?? a.common.placeholder), Ce = h(() => V.value.filter((e) => !e.disabled)), we = h(() => ye(q.value, Ce.value)), Te = I("");
1690
+ function Ee(e) {
1691
+ let t = o.max !== void 0 && e.length >= o.max && q.value.length < o.max;
1692
+ ae(e), t && (Te.value = M.maxReached(o.max));
1693
+ }
1694
+ function De(e, t) {
1695
+ let n = o.max !== void 0 && e.length >= o.max && q.value.length < o.max;
1696
+ ce(e, t), n && (Te.value = M.maxReached(o.max));
1697
+ }
1698
+ function Oe(e) {
1699
+ ae(q.value.filter((t) => t.key !== e.key)), Te.value = M.removed(e.label);
1700
+ }
1701
+ function ke(e) {
1702
+ let t = q.value.at(-1);
1703
+ t && (E.value && e.key === "Backspace" ? (e.preventDefault(), Oe(t)) : o.clearable && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), ae([])));
1704
+ }
1705
+ function Ae(e) {
1706
+ ae([]), e.focus();
1707
+ }
1708
+ function je(e, t) {
1709
+ F.value = t.target.value, l("filterChange", F.value), o.dataSource && z.search(F.value), !(o.manualFilter || o.dataSource) && O(() => {
1710
+ let t = ie.value.find((e) => !e.disabled);
1711
+ t && e.setHighlightValue(t.key);
1712
+ });
1713
+ }
1714
+ function Me(e) {
1715
+ (e.key === " " || e.key === "Home" || e.key === "End") && e.stopPropagation();
1716
+ }
1717
+ function Pe(e) {
1718
+ (e.key === " " || e.key === "Enter") && e.stopPropagation();
1719
+ }
1720
+ function Fe(e) {
1721
+ e && z.open(), !e && F.value && (F.value = "", l("filterChange", ""), o.dataSource && z.search(""));
1722
+ }
1723
+ let Ie = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, Le = {
1724
+ sameWidth: !0,
1725
+ gutter: 4
1726
+ }, Re = it(), ze = h(() => xe(o.id, "trigger", {
1727
+ label: Re?.value.ids.label,
1728
+ hiddenSelect: Re?.value.ids.control
1729
+ }));
1730
+ return (e, n) => (N(), g(U(Q).Root, D({
1731
+ class: j.value.base({ class: T.value.className }),
1732
+ style: T.value.style,
1733
+ collection: pe.value,
1734
+ multiple: "",
1735
+ "close-on-select": !1,
1736
+ "model-value": U(J),
1737
+ disabled: t.disabled,
1738
+ invalid: t.invalid,
1739
+ required: t.required,
1740
+ name: t.name,
1741
+ positioning: Le,
1742
+ composite: !ge.value
1743
+ }, ze.value, {
1744
+ "lazy-mount": "",
1745
+ "unmount-on-exit": "",
1746
+ onValueChange: n[1] ||= (e) => De(e.value, e.items),
1747
+ onOpenChange: n[2] ||= (e) => Fe(e.open)
1748
+ }), {
1749
+ default: K(() => [
1750
+ S(U(Q).Context, null, {
1751
+ default: K((n) => [S(U(Q).Control, A(w(E.value || t.clearable ? { class: E.value ? j.value.chipsControl() : j.value.control() } : {})), {
1752
+ default: K(() => [
1753
+ E.value ? (N(!0), v(p, { key: 0 }, L(U(q), (e) => (N(), v("span", {
1754
+ key: e.key,
1755
+ class: k(j.value.chip())
1756
+ }, [y("span", { class: k(j.value.chipText()) }, H(e.label), 3), n.disabled ? _("", !0) : (N(), v("button", {
1757
+ key: 0,
1758
+ type: "button",
1759
+ tabindex: "-1",
1760
+ class: k(j.value.chipRemove()),
1761
+ "aria-label": U(M).removeItem(e.label),
1762
+ onClick: (t) => Oe(e)
1763
+ }, [S(U(_e), {
1764
+ class: k(j.value.chipRemoveIcon()),
1765
+ "aria-hidden": "true"
1766
+ }, null, 8, ["class"])], 10, cn))], 2))), 128)) : _("", !0),
1767
+ S(U(Q).Trigger, D(T.value.rest, {
1768
+ class: E.value ? j.value.chipsTrigger() : j.value.trigger(),
1769
+ "aria-busy": t.loading || void 0,
1770
+ onKeydown: ke
1771
+ }), {
1772
+ default: K(() => [E.value ? (N(), v("span", {
1773
+ key: 0,
1774
+ class: k(j.value.value()),
1775
+ "data-placeholder-shown": !U(q).length || void 0
1776
+ }, [U(q).length ? (N(), v("span", {
1777
+ key: 0,
1778
+ class: k(j.value.hiddenValue())
1779
+ }, H(U(q).map((e) => e.label).join(", ")), 3)) : (N(), v(p, { key: 1 }, [x(H(t.placeholder ?? U(a).common.placeholder), 1)], 64))], 10, ln)) : (N(), v("span", {
1780
+ key: 1,
1781
+ class: k(j.value.value()),
1782
+ "data-placeholder-shown": !U(q).length || void 0
1783
+ }, [e.$slots.value && U(q).length ? R(e.$slots, "value", { items: U(q).map((e) => e.item) }, void 0, void 0, 0) : (N(), v(p, { key: 1 }, [x(H(Y.value), 1)], 64))], 10, un)), S(U(Q).Indicator, { class: k(j.value.indicator()) }, {
1784
+ default: K(() => [t.loading ? (N(), g(U(me), {
1785
+ key: 0,
1786
+ class: k(j.value.spinner()),
1787
+ "aria-hidden": "true"
1788
+ }, null, 8, ["class"])) : (N(), g(U(se), {
1789
+ key: 1,
1790
+ class: k(j.value.indicatorIcon()),
1791
+ "aria-hidden": "true"
1792
+ }, null, 8, ["class"]))]),
1793
+ _: 1
1794
+ }, 8, ["class"])]),
1795
+ _: 3
1796
+ }, 16, ["class", "aria-busy"]),
1797
+ t.clearable && U(q).length && !n.disabled ? (N(), v("button", {
1798
+ key: 1,
1799
+ type: "button",
1800
+ tabindex: "-1",
1801
+ class: k(E.value ? j.value.chipsClear() : j.value.clear()),
1802
+ "aria-label": U(M).clear,
1803
+ onClick: (e) => Ae(n)
1804
+ }, [S(U(_e), {
1805
+ class: k(j.value.clearIcon()),
1806
+ "aria-hidden": "true"
1807
+ }, null, 8, ["class"])], 10, dn)) : _("", !0)
1808
+ ]),
1809
+ _: 2
1810
+ }, 1040)]),
1811
+ _: 3
1812
+ }),
1813
+ E.value || t.max !== void 0 || t.dataSource ? (N(), v("span", {
1814
+ key: 0,
1815
+ role: "status",
1816
+ class: k(j.value.status())
1817
+ }, H(Te.value || U(z).announcement.value), 3)) : _("", !0),
1818
+ (N(), g(m, { to: "body" }, [S(U(Q).Positioner, null, {
1819
+ default: K(() => [S(U(Q).Content, {
1820
+ class: k(j.value.content()),
1821
+ "aria-busy": le.value || void 0,
1822
+ "aria-label": ge.value ? T.value.rest["aria-label"] : void 0
1823
+ }, {
1824
+ default: K(() => [ge.value ? (N(), v(p, { key: 0 }, [y("div", { class: k(j.value.header()) }, [S(U(Q).Context, null, {
1825
+ default: K((e) => [t.filter ? (N(), v("input", {
1826
+ key: 0,
1827
+ type: "text",
1828
+ role: "combobox",
1829
+ autocomplete: "off",
1830
+ "aria-autocomplete": "list",
1831
+ "aria-expanded": "true",
1832
+ "data-autofocus": "",
1833
+ "aria-controls": U(ve),
1834
+ "aria-activedescendant": Ie(e),
1835
+ "aria-label": U(M).filter,
1836
+ placeholder: U(a).combobox.search,
1837
+ value: F.value,
1838
+ class: k(j.value.search()),
1839
+ onInput: (t) => je(e, t),
1840
+ onKeydown: Me
1841
+ }, null, 42, fn)) : _("", !0)]),
1842
+ _: 1
1843
+ }), t.selectAll && Ce.value.length ? (N(), v("button", {
1844
+ key: 0,
1845
+ type: "button",
1846
+ role: "checkbox",
1847
+ "aria-checked": we.value,
1848
+ class: k(j.value.selectAll()),
1849
+ onClick: n[0] ||= (e) => Ee(U(et)(U(q), U(V), t.max)),
1850
+ onKeydown: Pe
1851
+ }, [y("span", {
1852
+ class: k(j.value.check()),
1853
+ "data-state": we.value === "mixed" ? "indeterminate" : we.value ? "checked" : "unchecked",
1854
+ "aria-hidden": "true"
1855
+ }, [we.value === "mixed" ? (N(), g(U(he), {
1856
+ key: 0,
1857
+ class: k(j.value.checkIcon())
1858
+ }, null, 8, ["class"])) : we.value ? (N(), g(U(oe), {
1859
+ key: 1,
1860
+ class: k(j.value.checkIcon())
1861
+ }, null, 8, ["class"])) : _("", !0)], 10, mn), x(" " + H(U(M).selectAll), 1)], 42, pn)) : _("", !0)], 2), S(U(Q).List, {
1862
+ id: U(ve),
1863
+ class: k(j.value.list()),
1864
+ "data-autofocus": t.filter ? void 0 : ""
1865
+ }, {
1866
+ default: K(() => [S(c, {
1867
+ parts: U(Q),
1868
+ groups: U(re),
1869
+ classes: Se.value,
1870
+ checkbox: t.checkboxes,
1871
+ loading: le.value,
1872
+ "loading-text": t.loadingText ?? U(a).common.loading,
1873
+ "has-more": ue.value,
1874
+ "empty-text": be.value,
1875
+ onLoadMore: de
1876
+ }, b({ _: 2 }, [e.$slots.item ? {
1877
+ name: "item",
1878
+ fn: K((t) => [R(e.$slots, "item", A(w(t)))]),
1879
+ key: "0"
1880
+ } : void 0]), 1032, [
1881
+ "parts",
1882
+ "groups",
1883
+ "classes",
1884
+ "checkbox",
1885
+ "loading",
1886
+ "loading-text",
1887
+ "has-more",
1888
+ "empty-text"
1889
+ ])]),
1890
+ _: 3
1891
+ }, 8, [
1892
+ "id",
1893
+ "class",
1894
+ "data-autofocus"
1895
+ ])], 64)) : (N(), g(c, {
1896
+ key: 1,
1897
+ parts: U(Q),
1898
+ groups: U(re),
1899
+ classes: Se.value,
1900
+ checkbox: t.checkboxes,
1901
+ loading: le.value,
1902
+ "loading-text": t.loadingText ?? U(a).common.loading,
1903
+ "has-more": ue.value,
1904
+ "empty-text": be.value,
1905
+ onLoadMore: de
1906
+ }, b({ _: 2 }, [e.$slots.item ? {
1907
+ name: "item",
1908
+ fn: K((t) => [R(e.$slots, "item", A(w(t)))]),
1909
+ key: "0"
1910
+ } : void 0]), 1032, [
1911
+ "parts",
1912
+ "groups",
1913
+ "classes",
1914
+ "checkbox",
1915
+ "loading",
1916
+ "loading-text",
1917
+ "has-more",
1918
+ "empty-text"
1919
+ ]))]),
1920
+ _: 3
1921
+ }, 8, [
1922
+ "class",
1923
+ "aria-busy",
1924
+ "aria-label"
1925
+ ])]),
1926
+ _: 3
1927
+ })])),
1928
+ S(U(Q).HiddenSelect)
1929
+ ]),
1930
+ _: 3
1931
+ }, 16, [
1932
+ "class",
1933
+ "style",
1934
+ "collection",
1935
+ "model-value",
1936
+ "disabled",
1937
+ "invalid",
1938
+ "required",
1939
+ "name",
1940
+ "composite"
1941
+ ]));
1942
+ }
1943
+ }), gn = ["id"], _n = ["id"], vn = /* @__PURE__ */ C({
1944
+ inheritAttrs: !1,
1945
+ __name: "NumberInput",
1946
+ props: {
1947
+ modelValue: { default: void 0 },
1948
+ defaultValue: { default: void 0 },
1949
+ min: {},
1950
+ max: {},
1951
+ step: {},
1952
+ formatOptions: { default: () => Ce },
1953
+ locale: {},
1954
+ size: {},
1955
+ invalid: {
1956
+ type: Boolean,
1957
+ default: void 0
1958
+ },
1959
+ success: {
1960
+ type: Boolean,
1961
+ default: void 0
1962
+ },
1963
+ disabled: {
1964
+ type: Boolean,
1965
+ default: void 0
1966
+ },
1967
+ readOnly: {
1968
+ type: Boolean,
1969
+ default: void 0
1970
+ },
1971
+ required: {
1972
+ type: Boolean,
1973
+ default: void 0
1974
+ },
1975
+ name: {},
1976
+ stepper: {
1977
+ type: Boolean,
1978
+ default: !0
1979
+ },
1980
+ stepperLayout: { default: "inline" },
1981
+ prefix: {},
1982
+ suffix: {},
1983
+ allowNegative: {
1984
+ type: Boolean,
1985
+ default: !0
1986
+ },
1987
+ allowDecimal: {
1988
+ type: Boolean,
1989
+ default: !0
1990
+ },
1991
+ decimals: {},
1992
+ clampBehavior: { default: "blur" },
1993
+ selectOnFocus: { type: Boolean },
1994
+ loading: { type: Boolean },
1995
+ clearable: { type: Boolean },
1996
+ clearLabel: {},
1997
+ id: {},
1998
+ classes: {}
1999
+ },
2000
+ emits: ["update:modelValue"],
2001
+ setup(o, { emit: s }) {
2002
+ let c = t(), l = e(), u = o, d = n("numberInput", Pe, () => u.classes), f = h(() => u.locale ?? c.value.locale), m = s, y = te(), b = h(() => r(y)), x = it(), C = i(), w = h(() => !!u.invalid || !!x?.value.invalid), T = h(() => !w.value && (!!u.success || C.value.success)), E = h(() => d({
2003
+ size: u.size,
2004
+ stacked: u.stepperLayout === "stacked",
2005
+ success: T.value
2006
+ })), O = h(() => u.decimals === void 0 ? u.allowDecimal ? u.formatOptions : {
2007
+ ...u.formatOptions,
2008
+ maximumFractionDigits: 0
2009
+ } : {
2010
+ ...u.formatOptions,
2011
+ minimumFractionDigits: u.decimals,
2012
+ maximumFractionDigits: u.decimals
2013
+ }), A = h(() => u.allowNegative ? u.min : Math.max(u.min ?? 0, 0)), M, ee = Xe(u.modelValue ?? u.defaultValue, f.value, O.value), P = I(ee ?? ""), F = gt(h(() => ({
2014
+ defaultValue: ee,
2015
+ min: A.value,
2016
+ max: u.max,
2017
+ step: u.step,
2018
+ formatOptions: O.value,
2019
+ locale: f.value,
2020
+ invalid: u.invalid,
2021
+ disabled: u.disabled,
2022
+ readOnly: u.readOnly,
2023
+ required: u.required,
2024
+ name: u.name,
2025
+ clampValueOnBlur: u.clampBehavior !== "none",
2026
+ allowOverflow: u.clampBehavior !== "strict",
2027
+ translations: l.numberInput,
2028
+ ...xe(u.id, "input", {
2029
+ label: x?.value.ids.label,
2030
+ input: x?.value.ids.control
2031
+ }),
2032
+ onValueChange: (e) => {
2033
+ P.value = e.value, M = Number.isNaN(e.valueAsNumber) ? null : e.valueAsNumber, m("update:modelValue", M);
2034
+ }
2035
+ })));
2036
+ G(() => u.modelValue, (e) => {
2037
+ e !== void 0 && e !== M && (e === null ? F.value.clearValue() : F.value.setValue(e));
2038
+ });
2039
+ function L(e) {
2040
+ if (e.ctrlKey || e.metaKey || e.altKey) return;
2041
+ let t = e.currentTarget, n = t.selectionStart ?? t.value.length, r = t.value.slice(0, n) + t.value.slice(t.selectionEnd ?? n), i = Fe(e.key, r, f.value, {
2042
+ allowDecimal: u.allowDecimal && u.decimals !== 0,
2043
+ allowNegative: u.allowNegative
2044
+ });
2045
+ i && (e.preventDefault(), i !== "block" && De(t, i.insert));
2046
+ }
2047
+ function R(e) {
2048
+ let t = e.currentTarget, n = (t.selectionStart ?? 0) === 0 && (t.selectionEnd ?? 0) === t.value.length, r = Re(e.clipboardData?.getData("text") ?? "", f.value);
2049
+ n && r !== null && (e.preventDefault(), Ue(t, Xe(r, f.value, O.value)));
2050
+ }
2051
+ function z(e) {
2052
+ if (!u.selectOnFocus) return;
2053
+ let t = e.currentTarget;
2054
+ requestAnimationFrame(() => t.select());
2055
+ }
2056
+ let B = ne(), V = ne(), re = h(() => u.prefix || u.suffix ? [
2057
+ x?.value.ariaDescribedby,
2058
+ u.prefix && B,
2059
+ u.suffix && V,
2060
+ b.value.rest["aria-describedby"]
2061
+ ].filter(Boolean).join(" ") : void 0), W = h(() => !!u.disabled || !!u.readOnly || !!x?.value.disabled || !!x?.value.readOnly), q = ie("control");
2062
+ function J() {
2063
+ let e = q.value?.$el.querySelector("input");
2064
+ e && (Ue(e), e.focus());
2065
+ }
2066
+ return (e, t) => (N(), g(U(ht).RootProvider, {
2067
+ value: U(F),
2068
+ class: k(E.value.base({ class: b.value.className })),
2069
+ style: j(b.value.style)
2070
+ }, {
2071
+ default: K(() => [S(U(ht).Control, {
2072
+ ref_key: "control",
2073
+ ref: q,
2074
+ class: k(E.value.control())
2075
+ }, {
2076
+ default: K(() => [
2077
+ o.prefix ? (N(), v("span", {
2078
+ key: 0,
2079
+ id: U(B),
2080
+ class: k(E.value.prefix())
2081
+ }, H(o.prefix), 11, gn)) : _("", !0),
2082
+ S(U(ht).Input, D({
2083
+ ...b.value.rest,
2084
+ ...re.value ? { "aria-describedby": re.value } : {}
2085
+ }, {
2086
+ value: P.value,
2087
+ class: E.value.input(),
2088
+ "aria-busy": o.loading || void 0,
2089
+ onKeydown: L,
2090
+ onPaste: R,
2091
+ onFocus: z
2092
+ }), null, 16, [
2093
+ "value",
2094
+ "class",
2095
+ "aria-busy"
2096
+ ]),
2097
+ o.loading || o.clearable || T.value ? (N(), g(a, {
2098
+ key: 1,
2099
+ loading: o.loading,
2100
+ clear: o.clearable && !!P.value && !W.value,
2101
+ "clear-label": o.clearLabel ?? U(l).field.clear,
2102
+ success: T.value,
2103
+ classes: {
2104
+ spinner: E.value.spinner(),
2105
+ clear: E.value.clear(),
2106
+ clearIcon: E.value.clearIcon(),
2107
+ statusIcon: E.value.statusIcon()
2108
+ },
2109
+ onClear: J
2110
+ }, null, 8, [
2111
+ "loading",
2112
+ "clear",
2113
+ "clear-label",
2114
+ "success",
2115
+ "classes"
2116
+ ])) : _("", !0),
2117
+ o.suffix ? (N(), v("span", {
2118
+ key: 2,
2119
+ id: U(V),
2120
+ class: k(E.value.suffix())
2121
+ }, H(o.suffix), 11, _n)) : _("", !0),
2122
+ o.stepper && o.stepperLayout === "stacked" ? (N(), v("div", {
2123
+ key: 3,
2124
+ class: k(E.value.stepper())
2125
+ }, [S(U(ht).IncrementTrigger, { class: k(E.value.button()) }, {
2126
+ default: K(() => [S(U(ue), {
2127
+ class: k(E.value.buttonIcon()),
2128
+ "aria-hidden": "true"
2129
+ }, null, 8, ["class"])]),
2130
+ _: 1
2131
+ }, 8, ["class"]), S(U(ht).DecrementTrigger, { class: k(E.value.button()) }, {
2132
+ default: K(() => [S(U(se), {
2133
+ class: k(E.value.buttonIcon()),
2134
+ "aria-hidden": "true"
2135
+ }, null, 8, ["class"])]),
2136
+ _: 1
2137
+ }, 8, ["class"])], 2)) : o.stepper ? (N(), v(p, { key: 4 }, [S(U(ht).DecrementTrigger, { class: k(E.value.button()) }, {
2138
+ default: K(() => [S(U(he), {
2139
+ class: k(E.value.buttonIcon()),
2140
+ "aria-hidden": "true"
2141
+ }, null, 8, ["class"])]),
2142
+ _: 1
2143
+ }, 8, ["class"]), S(U(ht).IncrementTrigger, { class: k(E.value.button()) }, {
2144
+ default: K(() => [S(U(ge), {
2145
+ class: k(E.value.buttonIcon()),
2146
+ "aria-hidden": "true"
2147
+ }, null, 8, ["class"])]),
2148
+ _: 1
2149
+ }, 8, ["class"])], 64)) : _("", !0)
2150
+ ]),
2151
+ _: 1
2152
+ }, 8, ["class"])]),
2153
+ _: 1
2154
+ }, 8, [
2155
+ "value",
2156
+ "class",
2157
+ "style"
2158
+ ]));
2159
+ }
2160
+ }), yn = /* @__PURE__ */ C({
2161
+ __name: "ContextMenu",
2162
+ props: {
2163
+ items: {},
2164
+ label: {},
2165
+ linkAs: {},
2166
+ classes: {}
2167
+ },
2168
+ emits: [
2169
+ "select",
2170
+ "checked-change",
2171
+ "value-change"
2172
+ ],
2173
+ setup(e, { expose: t, emit: r }) {
2174
+ let i = e, a = n("menu", je, () => i.classes), o = r, s = a();
2175
+ vt({
2176
+ items: () => i.items,
2177
+ linkAs: () => i.linkAs,
2178
+ onCheckedChange: (e, t) => o("checked-change", e, t),
2179
+ onValueChange: (e, t) => o("value-change", e, t)
2180
+ });
2181
+ let c = xt({
2182
+ open: () => void 0,
2183
+ anchor: () => void 0,
2184
+ onOpenChange: () => {},
2185
+ restoreFocus: !0
2186
+ });
2187
+ t(c.handle);
2188
+ let l = Se((e) => c.handle.open(e));
2189
+ M(l.cancel);
2190
+ let u = h(() => c.positioning({}));
2191
+ return (t, n) => (N(), g(U(X).Root, {
2192
+ open: U(c).isOpen.value,
2193
+ positioning: u.value,
2194
+ "anchor-point": U(c).anchorPoint.value,
2195
+ "lazy-mount": "",
2196
+ "unmount-on-exit": "",
2197
+ "onUpdate:open": n[5] ||= (e) => U(c).onOpenChange(e),
2198
+ onSelect: n[6] ||= (e) => o("select", e.value)
2199
+ }, {
2200
+ default: K(() => [S(U(X).ContextTrigger, {
2201
+ "as-child": "",
2202
+ onPointerdown: n[0] ||= (e) => U(l).down(e),
2203
+ onPointermove: n[1] ||= (e) => U(l).move(e),
2204
+ onPointerup: n[2] ||= (e) => U(l).cancel(),
2205
+ onPointercancel: n[3] ||= (e) => U(l).cancel()
2206
+ }, {
2207
+ default: K(() => [R(t.$slots, "default")]),
2208
+ _: 3
2209
+ }), (N(), g(m, { to: "body" }, [S(U(X).Positioner, null, {
2210
+ default: K(() => [S(U(X).Content, D({ class: U(s).content() }, e.label ? {
2211
+ "aria-label": e.label,
2212
+ "aria-labelledby": void 0
2213
+ } : {}), {
2214
+ default: K(() => [S(bt, {
2215
+ entries: e.items,
2216
+ onSelect: n[4] ||= (e) => o("select", e)
2217
+ }, b({ _: 2 }, [t.$slots.item ? {
2218
+ name: "item",
2219
+ fn: K((e) => [R(t.$slots, "item", A(w(e)))]),
2220
+ key: "0"
2221
+ } : void 0]), 1032, ["entries"])]),
2222
+ _: 3
2223
+ }, 16, ["class"])]),
2224
+ _: 3
2225
+ })]))]),
2226
+ _: 3
2227
+ }, 8, [
2228
+ "open",
2229
+ "positioning",
2230
+ "anchor-point"
2231
+ ]));
2232
+ }
2233
+ });
2234
+ //#endregion
2235
+ export { vt as S, At as _, on as a, xt as b, Xt as c, Qt as d, qt as f, jt as g, zt as h, sn as i, $t as l, Vt as m, vn as n, Wt as o, Kt as p, hn as r, Ut as s, yn as t, Gt as u, Dt as v, bt as x, Tt as y };