@pantograph/vue 0.27.6 → 0.27.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 (98) hide show
  1. package/dist/Alert/index.js +1 -1
  2. package/dist/Alert/index.umd.cjs +1 -1
  3. package/dist/{Alert.vue_vue_type_style_index_0_lang-Dy5qag1y.js → Alert.vue_vue_type_style_index_0_lang-BAOHfQJ2.js} +1 -1
  4. package/dist/{Alert.vue_vue_type_style_index_0_lang-qPl7g81O.js → Alert.vue_vue_type_style_index_0_lang-Drpe229t.js} +1 -1
  5. package/dist/Avatar/index.js +1 -1
  6. package/dist/Avatar/index.umd.cjs +1 -1
  7. package/dist/{Avatar.vue_vue_type_style_index_0_lang-BV977bUz.js → Avatar.vue_vue_type_style_index_0_lang-CWObVQTV.js} +1 -1
  8. package/dist/{Avatar.vue_vue_type_style_index_0_lang-DPrsRMvX.js → Avatar.vue_vue_type_style_index_0_lang-sRuIAJc9.js} +2 -2
  9. package/dist/AvatarGroup/index.js +1 -1
  10. package/dist/AvatarGroup/index.umd.cjs +1 -1
  11. package/dist/Chip/index.js +1 -1
  12. package/dist/Chip/index.umd.cjs +1 -1
  13. package/dist/{Chip.vue_vue_type_style_index_0_lang-BTkjNPpY.js → Chip.vue_vue_type_style_index_0_lang-Ddebarn3.js} +2 -2
  14. package/dist/{Chip.vue_vue_type_style_index_0_lang-85COdIHv.js → Chip.vue_vue_type_style_index_0_lang-DsOuKYAw.js} +1 -1
  15. package/dist/ChipGroup/index.js +1 -1
  16. package/dist/ChipGroup/index.umd.cjs +1 -1
  17. package/dist/ColorPicker/index.js +1 -1
  18. package/dist/ColorPicker/index.umd.cjs +1 -1
  19. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-BdOoCdNS.js → ColorPicker.vue_vue_type_style_index_0_lang-CyER8GOv.js} +1 -1
  20. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-DKKyeshn.js → ColorPicker.vue_vue_type_style_index_0_lang-M_Tlbw68.js} +1 -1
  21. package/dist/ColorSwatch/index.js +1 -1
  22. package/dist/ColorSwatch/index.umd.cjs +1 -1
  23. package/dist/{ColorSwatch-Ble3U3gh.js → ColorSwatch-C78FvSId.js} +1 -1
  24. package/dist/{ColorSwatch-CvO0aEqV.js → ColorSwatch-CIE6Omwr.js} +1 -1
  25. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-D1iZGTU1.js → ColorSwatch.vue_vue_type_style_index_0_lang-BlhGwucn.js} +1 -1
  26. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-DV7_KzOo.js → ColorSwatch.vue_vue_type_style_index_0_lang-BuiXPjL9.js} +1 -1
  27. package/dist/ColorSwatchGroup/index.js +1 -1
  28. package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
  29. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-DVHeRwbA.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-Ba9LhQWl.js} +1 -1
  30. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-CVm2wACN.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-BlraIbBp.js} +3 -3
  31. package/dist/ColorTrigger/index.js +1 -1
  32. package/dist/ColorTrigger/index.umd.cjs +1 -1
  33. package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-D1LOnBjA.js → ColorTrigger.vue_vue_type_style_index_0_lang-BMMDPe7y.js} +1 -1
  34. package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-BfBgZWIs.js → ColorTrigger.vue_vue_type_style_index_0_lang-tLIbnaNq.js} +1 -1
  35. package/dist/Combobox/Combobox.d.ts +1 -1
  36. package/dist/Combobox/index.js +1 -1
  37. package/dist/Combobox/index.umd.cjs +1 -1
  38. package/dist/Combobox/types.d.ts +1 -1
  39. package/dist/Combobox.vue_vue_type_style_index_0_lang-DRMbT72Y.js +1139 -0
  40. package/dist/Combobox.vue_vue_type_style_index_0_lang-YQ4Sk4jz.js +1 -0
  41. package/dist/Comment/index.js +8 -8
  42. package/dist/Comment/index.umd.cjs +1 -1
  43. package/dist/DataTable/index.js +1 -1
  44. package/dist/DataTable/index.umd.cjs +1 -1
  45. package/dist/{DataTable.vue_vue_type_style_index_0_lang-wedX7ZEP.js → DataTable.vue_vue_type_style_index_0_lang-CkgL-lAr.js} +1 -1
  46. package/dist/{DataTable.vue_vue_type_style_index_0_lang-Bk51mlZo.js → DataTable.vue_vue_type_style_index_0_lang-DpLNsX2Z.js} +2 -2
  47. package/dist/GOPicker/index.js +1 -1
  48. package/dist/GOPicker/index.umd.cjs +1 -1
  49. package/dist/{GOPicker.vue_vue_type_style_index_0_lang-CteKvBMt.js → GOPicker.vue_vue_type_style_index_0_lang-Coc2r8FZ.js} +1 -1
  50. package/dist/{GOPicker.vue_vue_type_style_index_0_lang-LCobQHEi.js → GOPicker.vue_vue_type_style_index_0_lang-CsxKAG7z.js} +4 -4
  51. package/dist/GraphicalObject/index.js +1 -1
  52. package/dist/GraphicalObject/index.umd.cjs +1 -1
  53. package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-DsNpKZ1Q.js → GraphicalObject.vue_vue_type_script_setup_true_lang-B0QyiUKw.js} +1 -1
  54. package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-C6SGYINj.js → GraphicalObject.vue_vue_type_script_setup_true_lang-CxrU_AN6.js} +1 -1
  55. package/dist/GraphicalObjectGroup/index.js +1 -1
  56. package/dist/GraphicalObjectGroup/index.umd.cjs +1 -1
  57. package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DpUJtahs.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-BR6gx5A6.js} +1 -1
  58. package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-hijTVsAM.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-BgNRt-Av.js} +2 -2
  59. package/dist/HoverCard/index.js +2 -2
  60. package/dist/HoverCard/index.umd.cjs +1 -1
  61. package/dist/{HoverCard.vue_vue_type_style_index_0_lang-CZjE-3yG.js → HoverCard.vue_vue_type_style_index_0_lang-CtSwm0oH.js} +1 -1
  62. package/dist/{HoverCard.vue_vue_type_style_index_0_lang-BXomv-C2.js → HoverCard.vue_vue_type_style_index_0_lang-GZ6S9Pud.js} +1 -1
  63. package/dist/IndentLevel/index.js +1 -1
  64. package/dist/IndentLevel/index.umd.cjs +1 -1
  65. package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-DGxzy3Fe.js → IndentLevel.vue_vue_type_style_index_0_lang-BUK5LxWK.js} +1 -1
  66. package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-0YtmWnET.js → IndentLevel.vue_vue_type_style_index_0_lang-D22BSj0l.js} +1 -1
  67. package/dist/Menu/index.js +1 -1
  68. package/dist/Menu/index.umd.cjs +1 -1
  69. package/dist/MenuItem/index.js +1 -1
  70. package/dist/MenuItem/index.umd.cjs +1 -1
  71. package/dist/{MenuItem.vue_vue_type_style_index_0_lang-BbAMfSHF.js → MenuItem.vue_vue_type_style_index_0_lang-DWhISIbu.js} +1 -1
  72. package/dist/{MenuItem.vue_vue_type_style_index_0_lang-3CVlU74B.js → MenuItem.vue_vue_type_style_index_0_lang-DiVJUHjS.js} +2 -2
  73. package/dist/Popover/index.js +1 -1
  74. package/dist/Popover/index.umd.cjs +1 -1
  75. package/dist/{Popover.vue_vue_type_style_index_0_lang-QNb3ngGr.js → Popover.vue_vue_type_style_index_0_lang-CBbRhcN9.js} +1 -1
  76. package/dist/{Popover.vue_vue_type_style_index_0_lang-pl_b1loW.js → Popover.vue_vue_type_style_index_0_lang-DSoOzWTR.js} +1 -1
  77. package/dist/Select/Select.d.ts +1 -1
  78. package/dist/Select/index.js +1 -1
  79. package/dist/Select/index.umd.cjs +1 -1
  80. package/dist/Select/types.d.ts +1 -1
  81. package/dist/{Select.vue_vue_type_style_index_0_lang-DK0gqVv1.js → Select.vue_vue_type_style_index_0_lang-CiU2FQYW.js} +1 -1
  82. package/dist/{Select.vue_vue_type_style_index_0_lang-DXCsSdMK.js → Select.vue_vue_type_style_index_0_lang-Dh-a0ASP.js} +3 -3
  83. package/dist/SubMenu/index.js +1 -1
  84. package/dist/SubMenu/index.umd.cjs +1 -1
  85. package/dist/Tree/index.js +1 -1
  86. package/dist/Tree/index.umd.cjs +1 -1
  87. package/dist/{Tree.vue_vue_type_style_index_0_lang-CkWdHL4R.js → Tree.vue_vue_type_style_index_0_lang-Biod_hK-.js} +1 -1
  88. package/dist/{Tree.vue_vue_type_style_index_0_lang-BpP1B-73.js → Tree.vue_vue_type_style_index_0_lang-Dl43zrWj.js} +1 -1
  89. package/dist/Upload/index.js +1 -1
  90. package/dist/Upload/index.umd.cjs +1 -1
  91. package/dist/{Upload.vue_vue_type_style_index_0_lang-RRr-8pG3.js → Upload.vue_vue_type_style_index_0_lang-DJqvk1PP.js} +1 -1
  92. package/dist/{Upload.vue_vue_type_style_index_0_lang-DvL_F6Ye.js → Upload.vue_vue_type_style_index_0_lang-cN55f5aO.js} +1 -1
  93. package/dist/index.js +19 -19
  94. package/dist/index.umd.cjs +1 -1
  95. package/dist/style/index.css +1 -1
  96. package/package.json +1 -1
  97. package/dist/Combobox.vue_vue_type_style_index_0_lang-BA_I2GN7.js +0 -1133
  98. package/dist/Combobox.vue_vue_type_style_index_0_lang-C2gSuLRv.js +0 -1
@@ -0,0 +1,1139 @@
1
+ import { defineComponent as ye, useSlots as lt, onBeforeUnmount as Mt, computed as b, createBlock as R, openBlock as x, unref as g, mergeProps as ue, createSlots as nt, renderList as Ae, withCtx as K, renderSlot as Me, normalizeProps as Le, guardReactiveProps as De, createVNode as te, h, useAttrs as Lt, createElementBlock as ve, normalizeClass as Pe, toDisplayString as Dt, ref as me, watch as Et, isRef as je, createCommentVNode as Ee, createElementVNode as qe, normalizeStyle as Rt, Fragment as Re } from "vue";
2
+ import { createContext as At, Slot as $t, useEmitAsProps as Kt } from "reka-ui";
3
+ import { omit as he, isString as Je, cloneDeep as ne, isFunction as Ft, debounce as Qe, pick as Nt, last as Xe } from "es-toolkit";
4
+ import { getComponentOptions as _e, isEmptyLikeLodash as A, isEmptyElement as L, useVModel as Oe, useLazyLoading as Wt, useFormInput as Ht, useVirtualScroll as Ut, useInputDataStates as Gt, useCollection as jt, useDisableBodyPointerEvents as qt } from "@pantograph/utils-vue";
5
+ import { getBemBlock as Jt, getBemModifier as Qt, getBemElement as C, normCls as H, generateVariantClassList as J, createOptionGetterFunc as q, usePCId as Ye } from "@pantograph/utils";
6
+ import { _ as Xt } from "./Popover.vue_vue_type_style_index_0_lang-CBbRhcN9.js";
7
+ import { cva as at } from "class-variance-authority";
8
+ import { _ as $e } from "./Icon.vue_vue_type_style_index_0_lang-LLvjBJx0.js";
9
+ import { _ as rt, d as Yt } from "./Avatar.vue_vue_type_style_index_0_lang-sRuIAJc9.js";
10
+ import { _ as st } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-B0QyiUKw.js";
11
+ import { _ as Zt } from "./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-BgNRt-Av.js";
12
+ import { b as eo, _ as to } from "./Chip.vue_vue_type_style_index_0_lang-Ddebarn3.js";
13
+ import { _ as oo } from "./Input.vue_vue_type_script_setup_true_lang-8xzs2Ugc.js";
14
+ import { whenever as lo, refDebounced as no } from "@vueuse/core";
15
+ import { i as Q } from "./isArray-QlWcxgml.js";
16
+ import { g as ao, a as ro } from "./MenuItem.vue_vue_type_style_index_0_lang-DiVJUHjS.js";
17
+ import { _ as so } from "./ScrollContainer.vue_vue_type_style_index_0_lang-CCEG6AjN.js";
18
+ import { _ as io } from "./Empty.vue_vue_type_style_index_0_lang-GEhjGuWp.js";
19
+ import { f as uo, s as Ze, _ as po, a as co } from "./Tree.vue_vue_type_style_index_0_lang-Dl43zrWj.js";
20
+ import { _ as go } from "./Checkbox.vue_vue_type_style_index_0_lang-DnfmdUgk.js";
21
+ import "@pantograph/tokens";
22
+ import { _ as fo } from "./Skeleton.vue_vue_type_style_index_0_lang-BUizov_K.js";
23
+ import { _ as mo } from "./Divider.vue_vue_type_style_index_0_lang-Clrzj4R0.js";
24
+ import { i as vo } from "./isNumber-BduWbB-B.js";
25
+ function ho(y) {
26
+ return Array.isArray(y) ? y : Array.from(y);
27
+ }
28
+ function yo(y) {
29
+ return Number.isSafeInteger(y) && y >= 0;
30
+ }
31
+ function _o(y) {
32
+ return y != null && typeof y != "function" && yo(y.length);
33
+ }
34
+ function bo(y) {
35
+ return y[0];
36
+ }
37
+ function et(y) {
38
+ if (_o(y))
39
+ return bo(ho(y));
40
+ }
41
+ const [Ke, Co] = At("Combobox"), O = Jt("combobox"), it = Qt(O, "value-placeholder"), tt = C(O, "option"), ut = ["sm", "md", "lg"], ko = ["error", "warning", "success"], pt = /* @__PURE__ */ ye({
42
+ ..._e("ComboboxInput"),
43
+ __name: "ComboboxInput",
44
+ props: {
45
+ id: {},
46
+ maxlength: {},
47
+ type: {},
48
+ placeholder: {},
49
+ disabled: { type: Boolean, default: void 0 },
50
+ required: { type: Boolean },
51
+ readonly: { type: Boolean },
52
+ modelValue: {},
53
+ defaultValue: {},
54
+ leading: {},
55
+ trailing: {},
56
+ clearIcon: {},
57
+ trailingCls: {},
58
+ clearIconCls: {},
59
+ dividerCls: {},
60
+ leadingCls: {},
61
+ class: {},
62
+ allowClear: { type: Boolean },
63
+ bordered: { type: Boolean, default: void 0 },
64
+ simple: { type: Boolean },
65
+ size: {},
66
+ status: {},
67
+ steps: { type: Boolean }
68
+ },
69
+ setup(y) {
70
+ const t = y, o = lt(), a = Ke();
71
+ lo(() => a.openModel.value && a.inputRef.value, a.focusOnInput), Mt(() => {
72
+ a.comboboxInputFocused.value = !1;
73
+ });
74
+ const X = b(() => {
75
+ const f = t.placeholder ?? a.props.placeholder ?? "";
76
+ return (a.props.headerSearch ? f : a.placeholder.value) ?? f;
77
+ }), Y = (f) => {
78
+ var u, r;
79
+ if (a.props.headerSearch || f.stopPropagation(), f.key === "Backspace" && a.props.multiple && Q(a.model.value) && A(a.searchModel.value))
80
+ a.model.value = a.model.value.slice(0, -1);
81
+ else if (!a.openModel.value)
82
+ (f.key === "ArrowDown" || f.key === "Enter") && (a.openModel.value = !0);
83
+ else if (a.openModel.value)
84
+ if (f.key === "Escape") a.openModel.value = !1;
85
+ else if (f.key === "Tab" && !a.props.headerSearch) a.openModel.value = !1;
86
+ else if (["ArrowDown", "ArrowUp"].includes(f.key)) {
87
+ const p = a.getItems();
88
+ if (p.length) {
89
+ const F = p.findIndex(
90
+ (s) => a.highlightedOptionKey.value && s.value && s.value === a.highlightedOptionKey.value
91
+ );
92
+ if (f.key === "ArrowDown") {
93
+ const s = p[F + 1];
94
+ a.highlightedOptionKey.value = (s == null ? void 0 : s.value) ?? a.highlightedOptionKey.value ?? p[0].value;
95
+ } else if (f.key === "ArrowUp") {
96
+ const s = p[F - 1];
97
+ a.highlightedOptionKey.value = (s == null ? void 0 : s.value) ?? p[0].value;
98
+ }
99
+ (r = (u = p.find(
100
+ (s) => a.highlightedOptionKey.value && s.value && s.value === a.highlightedOptionKey.value
101
+ )) == null ? void 0 : u.ref) == null || r.scrollIntoView();
102
+ }
103
+ } else f.key === "Enter" && a.highlightedOptionKey.value && a.selectOption(a.getOptionByValue(a.highlightedOptionKey.value), !0);
104
+ }, V = C(O, "input");
105
+ return (f, u) => (x(), R(g(oo), ue({ ...g(a).comboboxInputBinding.value, ...t }, {
106
+ placeholder: X.value,
107
+ onKeydown: Y,
108
+ ref: g(a).inputRef,
109
+ class: g(H)(g(V), { [g(it)]: g(a).valuePlaceholder.value }, t.class),
110
+ modelValue: g(a).searchModel.value,
111
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => g(a).searchModel.value = r)
112
+ }), nt({ _: 2 }, [
113
+ Ae(Object.keys(g(he)(o, ["leading"])), (r) => ({
114
+ name: r,
115
+ fn: K((p) => [
116
+ Me(f.$slots, r, Le(De(p)))
117
+ ])
118
+ })),
119
+ g(a).props.headerSearch ? {
120
+ name: "leading",
121
+ fn: K((r) => [
122
+ Me(f.$slots, "leading", Le(De(r)), () => [
123
+ te(g($e), {
124
+ size: r.iconSize,
125
+ icon: "tabler:search",
126
+ flipOnDir: "rtl"
127
+ }, null, 8, ["size"])
128
+ ])
129
+ ]),
130
+ key: "0"
131
+ } : {
132
+ name: "leading",
133
+ fn: K((r) => [
134
+ Me(f.$slots, "leading", Le(De(r)))
135
+ ]),
136
+ key: "1"
137
+ }
138
+ ]), 1040, ["placeholder", "class", "modelValue"]));
139
+ }
140
+ }), So = /* @__PURE__ */ ye({
141
+ ..._e("ComboboxTrigger"),
142
+ __name: "ComboboxTrigger",
143
+ setup(y) {
144
+ const t = Ke(), o = ({ value: c }) => {
145
+ c && Q(t.model.value) && !t.getDisabled.value && (t.model.value = t.model.value.filter((m) => m !== c));
146
+ }, a = b(() => {
147
+ switch (t.getSize.value) {
148
+ case "sm":
149
+ return "2xsm";
150
+ case "md":
151
+ default:
152
+ return "xsm";
153
+ }
154
+ }), X = b(() => {
155
+ if (!t.props.multiple && Je(t.model.value) && !A(t.model.value))
156
+ return t.getOptionByValue(t.model.value);
157
+ }), Y = (c = X.value) => {
158
+ if (t.props.selectedItemIconAsTrailingIcon && (c != null && c._icon))
159
+ return c._icon;
160
+ }, V = b(() => Y()), f = b(() => {
161
+ if (!t.props.noTrailing)
162
+ return t.props.trailingIcon;
163
+ }), u = b(() => {
164
+ var _, v;
165
+ const c = ne(t.model.value), m = Q(t.model.value);
166
+ return {
167
+ modelValue: c,
168
+ open: ne(t.openModel.value),
169
+ option: m ? void 0 : t.getOptionByValue(t.model.value),
170
+ options: m ? (v = (_ = t.model.value).map) == null ? void 0 : v.call(_, t.getOptionByValue).filter(Boolean) : void 0
171
+ };
172
+ }), r = (c) => ({
173
+ ...u.value,
174
+ option: t.getOptionByValue(c)
175
+ }), p = C(O, "trigger"), F = at(p, {
176
+ variants: {
177
+ size: J(ut, p),
178
+ headerSearch: J("header-search", p),
179
+ status: J(ko, p),
180
+ bordered: J("bordered", p),
181
+ multiple: J("multiple", p),
182
+ contentFit: J("content-fit", p),
183
+ wrapped: J("wrapped", p),
184
+ filled: J("filled", p)
185
+ }
186
+ }), s = b(() => ({
187
+ type: "button",
188
+ disabled: t.getDisabled.value,
189
+ tabindex: t.getDisabled.value || !t.props.headerSearch ? -1 : 0,
190
+ "data-disabled": t.getDisabled.value ? "" : void 0,
191
+ "aria-disabled": t.getDisabled.value ?? void 0,
192
+ "aria-label": "Show popup",
193
+ "aria-haspopup": "listbox",
194
+ "aria-expanded": t.openModel.value,
195
+ "data-state": t.openModel.value ? "open" : "closed",
196
+ class: H(
197
+ F({
198
+ size: t.getSize.value,
199
+ status: t.getStatus.value === "success" && A(t.model.value) ? void 0 : t.getStatus.value,
200
+ bordered: t.props.bordered,
201
+ multiple: t.props.multiple,
202
+ contentFit: t.props.contentFit,
203
+ wrapped: t.props.wrapped,
204
+ filled: !A(t.model.value),
205
+ headerSearch: t.props.headerSearch
206
+ }),
207
+ t.props.triggerCls
208
+ ),
209
+ ...t.comboboxTriggerBinding.value
210
+ })), U = (c, m = a.value) => h($e, { icon: c, size: m }), ae = () => {
211
+ var _, v;
212
+ let c;
213
+ const m = (v = (_ = t.slots).triggerTrailing) == null ? void 0 : v.call(
214
+ _,
215
+ u.value
216
+ );
217
+ if (L(m) ? f.value && typeof f.value == "string" && (c = U(f.value)) : c = m, c)
218
+ return h(
219
+ "div",
220
+ { class: H(C(p, "trailing"), t.props.triggerTrailingCls) },
221
+ c
222
+ );
223
+ }, Z = (c) => {
224
+ var _, v;
225
+ const m = t.getOptionByValue(c) ?? { _key: c };
226
+ return h(rt, {
227
+ size: t.getTagSize.value,
228
+ ...m ? ((v = (_ = t.props).getTagProps) == null ? void 0 : v.call(_, m)) ?? {} : {}
229
+ });
230
+ }, pe = (c) => {
231
+ var _, v;
232
+ const m = t.getOptionByValue(c) ?? { _key: c };
233
+ return h(st, {
234
+ ...m ? ((v = (_ = t.props).getTagProps) == null ? void 0 : v.call(_, m)) ?? {} : {},
235
+ size: t.getTagSize.value
236
+ });
237
+ }, ce = () => {
238
+ var c, m;
239
+ if (!t.props.multiple && !Q(t.model.value) && t.model.value) {
240
+ let _;
241
+ Je(t.model.value) && !A(t.model.value) && (_ = t.model.value);
242
+ const v = _ ? (m = (c = t.slots).optionLeading) == null ? void 0 : m.call(
243
+ c,
244
+ ao(
245
+ t.props.size,
246
+ r(_)
247
+ )
248
+ ) : null, G = !L(v);
249
+ if (G || t.props.tagRenderMode && ["avatar", "go"].includes(t.props.tagRenderMode) || V.value || t.props.leadingIcon) {
250
+ let z;
251
+ if (G ? z = v : t.props.tagRenderMode === "avatar" ? z = Z(t.model.value) : t.props.tagRenderMode === "go" ? z = pe(t.model.value) : V.value ? z = U(V.value) : t.props.leadingIcon && (z = U(t.props.leadingIcon)), !L(z))
252
+ return h(
253
+ "div",
254
+ {
255
+ class: H(C(p, "leading"), t.props.triggerLeadingCls)
256
+ },
257
+ z
258
+ );
259
+ }
260
+ }
261
+ }, $ = () => {
262
+ var re, w;
263
+ const c = (w = (re = t.slots).trigger) == null ? void 0 : w.call(re, u.value);
264
+ if (!L(c))
265
+ return h($t, he(s.value, ["class"]), () => c);
266
+ const _ = () => {
267
+ const ee = [], de = [
268
+ C(p, "tags"),
269
+ t.props.triggerContentCls,
270
+ t.props.triggerContentValueCls
271
+ ], be = (() => {
272
+ if (t.props.multiple && Q(t.model.value)) {
273
+ if (t.props.tagRenderMode === "avatar")
274
+ return h(
275
+ Yt,
276
+ {
277
+ maxCount: t.props.maxCount,
278
+ size: t.getTagSize.value,
279
+ closeable: !t.getDisabled.value,
280
+ noPopover: !0,
281
+ noWrap: !t.props.wrapped,
282
+ class: de
283
+ },
284
+ () => t.model.value.map(Z)
285
+ );
286
+ if (t.props.tagRenderMode === "go")
287
+ return h(
288
+ Zt,
289
+ {
290
+ maxCount: t.props.maxCount,
291
+ size: t.getTagSize.value,
292
+ closeable: !t.getDisabled.value,
293
+ noPopover: !0,
294
+ noWrap: !t.props.wrapped,
295
+ class: de
296
+ },
297
+ () => t.model.value.map(pe)
298
+ );
299
+ if (t.props.tagRenderMode === "chip")
300
+ return h(
301
+ eo,
302
+ {
303
+ maxCount: t.props.maxCount,
304
+ size: t.getTagSize.value,
305
+ color: "primary",
306
+ closeable: !t.getDisabled.value,
307
+ noPopover: !0,
308
+ noWrap: !t.props.wrapped,
309
+ class: de,
310
+ onClose: o
311
+ },
312
+ () => t.model.value.map((se) => {
313
+ var fe, ke;
314
+ const Ce = () => t.getLabelByValue(se), Be = ({ size: B }) => {
315
+ const N = Y(t.getOptionByValue(se)) ?? t.props.leadingIcon;
316
+ return N ? U(N, B) : null;
317
+ }, ge = t.getOptionByValue(se);
318
+ return h(
319
+ to,
320
+ {
321
+ ...ge ? ((ke = (fe = t.props).getTagProps) == null ? void 0 : ke.call(fe, ge)) ?? {} : {},
322
+ value: se,
323
+ class: H(C(p, "tag"), t.props.tagCls),
324
+ closeIconCls: C(p, "tag__close")
325
+ },
326
+ {
327
+ text: Ce,
328
+ leading: Be
329
+ }
330
+ );
331
+ })
332
+ );
333
+ }
334
+ })();
335
+ if (be && ee.push(be), t.props.headerSearch ? (!t.props.noValueOnPlaceholder || t.props.placeholder) && ee.push(
336
+ h(
337
+ "div",
338
+ {
339
+ class: H(C(p, "content__value"), {
340
+ [it]: t.valuePlaceholder.value
341
+ })
342
+ },
343
+ t.placeholder.value ?? t.props.placeholder
344
+ )
345
+ ) : ee.push(
346
+ h(pt, {
347
+ noValueOnPlaceholder: t.props.noValueOnPlaceholder,
348
+ searchIcon: !1,
349
+ bordered: !1,
350
+ simple: !0
351
+ })
352
+ ), !L(ee) || !t.props.contentFit || t.props.trailingIcon)
353
+ return h("div", { class: C(p, "content") }, ee);
354
+ }, v = [], G = ce();
355
+ L(G) || v.push(G), v.push(_());
356
+ const z = ae();
357
+ return L(z) || v.push(z), h("button", s.value, v);
358
+ };
359
+ return (c, m) => (x(), R($));
360
+ }
361
+ }), ot = /* @__PURE__ */ ye({
362
+ ..._e("ComboboxOption"),
363
+ __name: "ComboboxOption",
364
+ props: {
365
+ option: {}
366
+ },
367
+ setup(y) {
368
+ const t = y, o = Ke(), a = b(() => o.isOptionSelected(t.option._key)), X = (f) => {
369
+ var p, F, s, U, ae, Z;
370
+ const u = [];
371
+ !o.props.tree && o.props.multiple && o.props.checkbox && !t.option._noCheckbox && u.push(
372
+ h(go, {
373
+ modelValue: a.value,
374
+ size: f.checkboxSize,
375
+ disabled: t.option._disabled
376
+ })
377
+ );
378
+ const r = (F = (p = o.slots).optionLeading) == null ? void 0 : F.call(p, { ...f, option: t.option });
379
+ return L(r) ? o.props.tagRenderMode === "avatar" && o.props.showTriggerTagOnOption ? u.push(
380
+ h(rt, {
381
+ size: f.avatarSize,
382
+ ...((U = (s = o.props).getTagProps) == null ? void 0 : U.call(s, t.option)) ?? {}
383
+ })
384
+ ) : o.props.tagRenderMode === "go" && o.props.showTriggerTagOnOption ? u.push(
385
+ h(st, {
386
+ size: f.iconSize,
387
+ ...((Z = (ae = o.props).getTagProps) == null ? void 0 : Z.call(ae, t.option)) ?? {}
388
+ })
389
+ ) : t.option._icon && u.push(h($e, { icon: t.option._icon, size: o.getIconSize.value })) : u.push(r), L(u) ? null : u;
390
+ }, Y = Lt(), V = () => {
391
+ const f = o.props.tree ? void 0 : t.option._description, u = (Ft(o.props.getMenuItemProps) ? o.props.getMenuItemProps(t.option) : o.props.getMenuItemProps) ?? {};
392
+ return h(
393
+ ro,
394
+ {
395
+ class: C(O, "option"),
396
+ unFocusable: !0,
397
+ staticStyle: o.props.tree,
398
+ description: f,
399
+ title: t.option._label,
400
+ key: t.option._key,
401
+ selected: a.value,
402
+ leadingCenter: !!f,
403
+ size: o.getSize.value,
404
+ disabled: o.props.tree ? !1 : t.option._disabled,
405
+ onClick: () => o.selectOption(t.option),
406
+ slotProps: t,
407
+ ...u,
408
+ ...Y
409
+ },
410
+ {
411
+ leading: X,
412
+ trailing: o.slots.optionTrailing,
413
+ title: o.slots.optionTitle,
414
+ description: o.slots.optionDescription
415
+ }
416
+ );
417
+ };
418
+ return (f, u) => (x(), R(V));
419
+ }
420
+ }), xo = /* @__PURE__ */ ye({
421
+ ..._e("ComboboxLabel"),
422
+ __name: "ComboboxLabel",
423
+ props: {
424
+ label: {}
425
+ },
426
+ setup(y) {
427
+ return (t, o) => (x(), ve("div", {
428
+ class: Pe(g(C)(g(O), "label"))
429
+ }, Dt(t.label), 3));
430
+ }
431
+ }), Qo = /* @__PURE__ */ ye({
432
+ ..._e("Combobox"),
433
+ __name: "Combobox",
434
+ props: {
435
+ modelValue: {},
436
+ defaultValue: {},
437
+ multiple: { type: Boolean, default: void 0 },
438
+ disabled: { type: Boolean, default: void 0 },
439
+ highlightOnHover: { type: Boolean },
440
+ resetSearchTermOnBlur: { type: Boolean, default: !0 },
441
+ resetSearchTermOnSelect: { type: Boolean, default: !0 },
442
+ size: { default: "md" },
443
+ status: {},
444
+ noValueOnPlaceholder: { type: Boolean },
445
+ zIndex: {},
446
+ checkbox: { type: Boolean, default: !0 },
447
+ tagRenderMode: { default: "chip" },
448
+ getTagProps: {},
449
+ tree: { type: Boolean },
450
+ treeProps: {},
451
+ contentFit: { type: Boolean },
452
+ wrapped: { type: Boolean },
453
+ sortSelectedItems: { type: Boolean },
454
+ noTrailing: { type: Boolean },
455
+ leadingIcon: {},
456
+ trailingIcon: { type: [String, Boolean], default: "tabler:chevron-down" },
457
+ selectedItemIconAsTrailingIcon: { type: Boolean, default: !0 },
458
+ maxCount: {},
459
+ to: {},
460
+ placeholder: {},
461
+ indicatorIcon: { default: "tabler:check" },
462
+ options: {},
463
+ getDisabled: {},
464
+ getLabel: {},
465
+ getDescription: {},
466
+ getValue: {},
467
+ getNoCheckbox: {},
468
+ getSingle: {},
469
+ getClear: {},
470
+ getOptions: {},
471
+ getIcon: {},
472
+ loading: { type: Boolean },
473
+ skeletonProps: {},
474
+ loadingRowCount: { default: 10 },
475
+ lazyLoading: { type: Boolean },
476
+ bordered: { type: Boolean, default: !0 },
477
+ clearOnChangeMultiple: { type: Boolean, default: !0 },
478
+ triggerCls: {},
479
+ triggerLeadingCls: {},
480
+ triggerContentCls: {},
481
+ triggerContentPlaceholderCls: {},
482
+ triggerContentValueCls: {},
483
+ triggerTrailingCls: {},
484
+ itemLeadingCls: {},
485
+ optionCls: {},
486
+ tagCls: {},
487
+ popupCls: {},
488
+ labelCls: {},
489
+ optionsCls: {},
490
+ optionTextCls: {},
491
+ optionContentCls: {},
492
+ emptyCls: {},
493
+ skeletonCls: {},
494
+ scrollContainerProps: {},
495
+ emptyProps: {},
496
+ samePopupWidth: { type: Boolean, default: !0 },
497
+ popupHeight: { default: 384 },
498
+ popupWidth: {},
499
+ minWidth: {},
500
+ search: {},
501
+ filterOptions: {},
502
+ expandedKeys: {},
503
+ noTrigger: { type: Boolean },
504
+ headerSearch: { type: Boolean },
505
+ headerSearchInputProps: {},
506
+ virtual: { type: Boolean },
507
+ showTriggerTagOnOption: { type: Boolean },
508
+ disableOutsidePointerEvents: { type: Boolean, default: !0 },
509
+ getMenuItemProps: {},
510
+ placement: { default: "bottom-start" },
511
+ containerProps: {},
512
+ reversePlacementOnDir: {},
513
+ open: { type: Boolean, default: void 0 },
514
+ defaultOpen: { type: Boolean, default: void 0 },
515
+ sideOffset: { default: 4 },
516
+ alignOffset: {},
517
+ reference: {},
518
+ prioritizePosition: { type: Boolean, default: !1 },
519
+ avoidCollisions: { type: Boolean, default: void 0 },
520
+ dir: {}
521
+ },
522
+ emits: ["update:modelValue", "update:expandedKeys", "update:search", "fetch", "search", "select", "update:open", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
523
+ setup(y, { emit: t }) {
524
+ const o = y, a = t, X = () => {
525
+ var e, l;
526
+ o.tree && (((e = o.filterOptions) == null ? void 0 : e.expandParent) === "collapse" ? F([]) : ((l = o.filterOptions) == null ? void 0 : l.expandParent) === "expand" && F(
527
+ w.value.filter((n) => n._hasChildren).map((n) => n._key)
528
+ ));
529
+ }, Y = Qe((e) => {
530
+ a("search", e), X();
531
+ }, 500), V = Oe(o, "search", a, {
532
+ passive: o.search === void 0,
533
+ onChange: Y
534
+ }), f = no(V, 500), u = Oe(o, "open", a, {
535
+ defaultValue: o.defaultOpen,
536
+ passive: o.open === void 0,
537
+ onChange(e) {
538
+ !e && o.resetSearchTermOnBlur && (V.value = void 0);
539
+ }
540
+ }), r = Oe(
541
+ o,
542
+ "modelValue",
543
+ a,
544
+ {
545
+ passive: o.modelValue === void 0,
546
+ onChange: (e) => {
547
+ var l, n;
548
+ u.value && !o.multiple && (u.value = !1), typeof B !== void 0 && (B != null && B.value) && o.sortSelectedItems && ((n = (l = B == null ? void 0 : B.value) == null ? void 0 : l.measure) == null || n.call(l));
549
+ }
550
+ }
551
+ ), p = Oe(
552
+ o,
553
+ "expandedKeys",
554
+ a,
555
+ {
556
+ passive: o.expandedKeys === void 0
557
+ }
558
+ ), F = Qe(
559
+ (e) => {
560
+ p.value = e;
561
+ },
562
+ 500,
563
+ { edges: ["leading"] }
564
+ ), s = lt(), U = Kt(a), ae = b(() => ({
565
+ ...he(U, ["update:modelValue", "update:search", "select"]),
566
+ ...Nt(o, [
567
+ "placement",
568
+ "reversePlacementOnDir",
569
+ "zIndex",
570
+ "to",
571
+ "sideOffset",
572
+ "alignOffset",
573
+ "reference",
574
+ "prioritizePosition",
575
+ "avoidCollisions",
576
+ "dir",
577
+ "size"
578
+ ])
579
+ // modal: true,
580
+ })), Z = me();
581
+ Wt({ target: Z });
582
+ const pe = q({
583
+ key: "value",
584
+ getter: o.getValue
585
+ }), ce = {
586
+ getDisabled: q({
587
+ key: "disabled",
588
+ getter: o.getDisabled,
589
+ noReturnOption: !0,
590
+ defaultValue: !1
591
+ }),
592
+ getDescription: q({
593
+ key: "description",
594
+ getter: o.getDescription,
595
+ noReturnOption: !0
596
+ }),
597
+ getValue: pe,
598
+ getLabel: q({
599
+ key: "label",
600
+ getter: o.getLabel,
601
+ noReturnOption: !0,
602
+ defaultValue: pe
603
+ }),
604
+ getNoCheckbox: q({
605
+ key: "noCheckbox",
606
+ getter: o.getNoCheckbox,
607
+ noReturnOption: !0,
608
+ defaultValue: !1
609
+ }),
610
+ getSingle: q({
611
+ key: "single",
612
+ getter: o.getSingle,
613
+ noReturnOption: !0,
614
+ defaultValue: !1
615
+ }),
616
+ getClear: q({
617
+ key: "clear",
618
+ getter: o.getClear,
619
+ noReturnOption: !0,
620
+ defaultValue: !1
621
+ }),
622
+ getOptions: q({
623
+ key: "options",
624
+ getter: o.getOptions,
625
+ noReturnOption: !0
626
+ }),
627
+ getIcon: q({
628
+ key: "icon",
629
+ getter: o.getIcon,
630
+ noReturnOption: !0
631
+ })
632
+ }, $ = (e, l) => {
633
+ var d;
634
+ const n = `get${l[0].toUpperCase() + l.slice(1)}`;
635
+ return (d = ce[n]) == null ? void 0 : d.call(ce, e);
636
+ }, c = (e, l, n) => !!(!o.tree && !(l != null && l.length) && (n != null && n.length)), m = b(
637
+ () => uo({
638
+ getValue: (e, l, n) => {
639
+ const d = $(e, "value");
640
+ return A(d) && c(e, l, n) ? Ye(tt) : d;
641
+ },
642
+ getDisabled: (e) => $(e, "disabled"),
643
+ arr: o.options ?? [],
644
+ getChildren: (e, l) => {
645
+ if (!(l != null && l.length && !o.tree))
646
+ return $(e, "options");
647
+ },
648
+ getExtra: (e) => {
649
+ if (e) {
650
+ let l = $(e, "label");
651
+ return A(l) || (l = String(l)), {
652
+ _description: $(e, "description"),
653
+ _label: l,
654
+ _title: o.tree ? l : void 0,
655
+ _noCheckbox: $(e, "noCheckbox"),
656
+ _single: $(e, "single"),
657
+ _clear: $(e, "clear"),
658
+ _icon: $(e, "icon")
659
+ };
660
+ }
661
+ },
662
+ allowNoValidKey: c
663
+ })
664
+ ), _ = (e, l = !1) => e ? m.value.filter((n) => {
665
+ var d;
666
+ if (l) {
667
+ const P = Xe(n._parentKeys ?? []);
668
+ return P && P === e;
669
+ }
670
+ return (d = n._parentKeys) == null ? void 0 : d.includes(e);
671
+ }) : [], v = (e) => {
672
+ var l;
673
+ if ((l = m.value) != null && l.length && !A(e))
674
+ return m.value.find((n) => n._key === e);
675
+ }, G = (e) => {
676
+ const l = v(e);
677
+ return l && (l._label || l._key) || e;
678
+ }, z = (e) => {
679
+ const l = v(e);
680
+ return l ? l._single ?? !1 : !1;
681
+ }, re = (e) => e === void 0 ? !1 : Array.isArray(r.value) ? !!(e && r.value.includes(e)) : r.value === e, w = b(() => {
682
+ var d, P;
683
+ let e = [];
684
+ const l = /* @__PURE__ */ new Set(), n = (i) => {
685
+ i != null && i._key && !l.has(i._key) && (e.push(ne(i)), l.add(i._key));
686
+ };
687
+ if (f.value ? (m.value.forEach((i) => {
688
+ var E, j;
689
+ if (i._label && i._label.toLowerCase().includes(f.value.toLowerCase()) && !l.has(i._key)) {
690
+ if (n(i), i._hasChildren && _(i._key).forEach(n), (E = o.filterOptions) != null && E.strictNode)
691
+ i._parentKeys && i._parentKeys.forEach((I) => {
692
+ if (!l.has(I)) {
693
+ const oe = v(I);
694
+ n(oe);
695
+ }
696
+ });
697
+ else if ((j = i._parentKeys) != null && j.length) {
698
+ const I = et(i._parentKeys);
699
+ if (!A(I)) {
700
+ if (!l.has(I)) {
701
+ const le = v(I);
702
+ n(le);
703
+ }
704
+ _(I).forEach(n);
705
+ }
706
+ }
707
+ }
708
+ }), e = e.sort(
709
+ (i, M) => m.value.findIndex((E) => E._key === i._key) - m.value.findIndex((E) => E._key === M._key)
710
+ )) : e = ne(m.value), o.sortSelectedItems && !o.tree && !A(r.value)) {
711
+ let i = ne(e);
712
+ const M = i.filter((k) => re(k._key)), E = Symbol("root"), j = Symbol("rootGroup"), I = {}, oe = (k, T, S = 1) => {
713
+ const W = i.splice(k, S);
714
+ i.splice(T, 0, ...W);
715
+ }, le = (k) => k ? i.findIndex((T) => T._key === k) : -1, Se = (k) => {
716
+ const T = I[k], S = le(T == null ? void 0 : T.key);
717
+ return T != null && T.length ? S + T.length + 1 : S + 1;
718
+ };
719
+ M.forEach((k) => {
720
+ var T;
721
+ if ((T = k._parentKeys) != null && T.length) {
722
+ const S = et(k._parentKeys);
723
+ let W = le(S);
724
+ const Ge = Math.max(
725
+ Se(E),
726
+ Se(j)
727
+ );
728
+ if (W > Ge) {
729
+ const xe = _(S).length;
730
+ oe(W, Ge, xe + 1);
731
+ }
732
+ if (I[j] = {
733
+ key: S,
734
+ length: _(S).length
735
+ }, W = le(S), S && W > -1) {
736
+ const xe = le(k._key);
737
+ if (I[S] === void 0)
738
+ oe(xe, W + 1);
739
+ else {
740
+ const wt = Se(S);
741
+ oe(xe, wt);
742
+ }
743
+ I[S] = {
744
+ length: void 0,
745
+ key: k._key
746
+ };
747
+ }
748
+ } else {
749
+ const S = le(k._key), W = Se(E);
750
+ S > W && oe(S, W), I[E] = {
751
+ key: k._key,
752
+ length: k._hasChildren ? _(k._key).length : void 0
753
+ };
754
+ }
755
+ i = ne(i);
756
+ }), e = i;
757
+ }
758
+ if (!o.tree) {
759
+ let i = ne(e);
760
+ for (let M = 0; M < i.length - 1; M++) {
761
+ const E = i[M], j = i[M + 1];
762
+ !j._divider && (j._hasChildren || (d = E._parentKeys) != null && d.length && !((P = j._parentKeys) != null && P.length)) && (i.splice(M + 1, 0, { _key: Ye(tt), _divider: !0 }), M++);
763
+ }
764
+ e = i;
765
+ }
766
+ return e;
767
+ });
768
+ X();
769
+ const { getDisabled: ee, getStatus: de, getSize: D } = Ht(), be = b(() => {
770
+ switch (D.value) {
771
+ case "sm":
772
+ return "xsm";
773
+ case "lg":
774
+ return "md";
775
+ case "md":
776
+ default:
777
+ return "sm";
778
+ }
779
+ }), se = b(() => {
780
+ switch (D.value) {
781
+ case "sm":
782
+ return "2xsm";
783
+ case "lg":
784
+ return "sm";
785
+ case "md":
786
+ default:
787
+ return "xsm";
788
+ }
789
+ }), Ce = me(), Be = {
790
+ sm: 4,
791
+ md: 6,
792
+ lg: 8
793
+ }, ge = {
794
+ sm: 14,
795
+ md: 16
796
+ }, fe = {
797
+ sm: 32,
798
+ md: 50,
799
+ lg: 54
800
+ }, ke = b(() => ({
801
+ get count() {
802
+ return w.value.length;
803
+ },
804
+ getScrollElement: () => {
805
+ var e;
806
+ return (e = Ce.value) == null ? void 0 : e.container.viewportElement;
807
+ },
808
+ estimateSize: (e) => {
809
+ const l = w.value[e];
810
+ if (!o.tree && l) {
811
+ if (l._divider)
812
+ return 1;
813
+ if (l._label && l._hasChildren)
814
+ return 8 + (ge[D.value] ?? ge.md);
815
+ if (l._description)
816
+ return fe[D.value] ?? fe.md;
817
+ }
818
+ return Ze[D.value] ?? Ze.md;
819
+ },
820
+ overscan: 5,
821
+ get gap() {
822
+ return Be[D.value] ?? 0;
823
+ }
824
+ }));
825
+ let B, N;
826
+ if (o.virtual) {
827
+ const { virtualizer: e, ...l } = Ut(
828
+ ke
829
+ );
830
+ B = e, N = l;
831
+ }
832
+ const ct = b(
833
+ () => {
834
+ var e;
835
+ return o.virtual ? (((e = B == null ? void 0 : B.value) == null ? void 0 : e.getVirtualItems()) ?? []).map((l) => w.value[l.index]) : w.value;
836
+ }
837
+ ), dt = b(() => (N == null ? void 0 : N.containerStyles.value) ?? {}), {
838
+ inputBindings: gt,
839
+ rootBindings: ft,
840
+ focused: mt
841
+ } = Gt({
842
+ getDisabled: () => ee.value
843
+ }), ie = me(), Ie = () => {
844
+ var e;
845
+ if (u.value && ie.value && document.activeElement !== ((e = ie.value) == null ? void 0 : e.input)) {
846
+ ie.value.input.style.pointerEvents = "auto";
847
+ const l = setTimeout(() => {
848
+ var n, d;
849
+ (d = (n = ie.value) == null ? void 0 : n.focus) == null || d.call(n), clearTimeout(l);
850
+ }, 100);
851
+ ie.value.input.style.pointerEvents = "";
852
+ }
853
+ }, Fe = b(
854
+ () => !o.noValueOnPlaceholder && (Q(r.value) ? r.value.length === 1 && !A(r.value[0]) : !A(r.value))
855
+ ), vt = b(() => {
856
+ if (Fe.value) {
857
+ if (o.multiple && Q(r.value))
858
+ return G(Xe(r.value));
859
+ if (!o.multiple && !Q(r.value))
860
+ return G(r.value);
861
+ }
862
+ }), { CollectionSlot: ht, CollectionItem: Ne, itemMap: yt, getItems: _t } = jt({
863
+ isProvider: !0,
864
+ key: O
865
+ }), We = () => r.value ? Array.isArray(r.value) ? r.value : [r.value] : [], Te = me(), Ve = (e) => {
866
+ Te.value = e;
867
+ }, He = (e) => ({
868
+ "data-disabled": e._disabled ? "" : void 0,
869
+ "data-highlighted": Te.value === e._key ? "" : void 0
870
+ }), ze = me();
871
+ Co({
872
+ props: o,
873
+ emit: a,
874
+ searchModel: V,
875
+ openModel: u,
876
+ model: r,
877
+ slots: s,
878
+ valuePlaceholder: Fe,
879
+ placeholder: vt,
880
+ getOptionByValue: v,
881
+ isOptionSelected: re,
882
+ getLabelByValue: G,
883
+ getSingleByValue: z,
884
+ inputRef: ie,
885
+ focusOnInput: Ie,
886
+ getDisabled: ee,
887
+ getStatus: de,
888
+ getSize: D,
889
+ getTagSize: be,
890
+ getIconSize: se,
891
+ comboboxInputBinding: gt,
892
+ comboboxTriggerBinding: ft,
893
+ comboboxInputFocused: mt,
894
+ selectOption: (e, l) => {
895
+ var n, d;
896
+ if (l && ((n = ze.value) != null && n.onSelect) && o.tree && ((d = ze.value) == null || d.onSelect(e, !re(e == null ? void 0 : e._key))), !(o.tree || !e || !e._key || e._disabled))
897
+ if (o.multiple)
898
+ if (e._clear)
899
+ r.value = [], a("select", void 0, !1);
900
+ else if (e._single)
901
+ r.value = [e._key], a("select", e._key, !0, e);
902
+ else {
903
+ let P = Q(r.value) ? r.value : [];
904
+ const i = P.includes(e._key);
905
+ P.length === 1 && z(P[0]) && e._key !== P[0] && (P = []), i ? (r.value = P.filter((M) => M !== e._key), a("select", e._key, !0, e)) : (r.value = [...P, e._key], a("select", e._key, !1, e));
906
+ }
907
+ else e._clear ? (r.value = void 0, a("select", void 0, !1)) : (r.value = e._key, a("select", e._key, !0, e));
908
+ },
909
+ itemMap: yt,
910
+ getItems: _t,
911
+ highlightedOptionKey: Te
912
+ }), Et(
913
+ () => [o.clearOnChangeMultiple, o.multiple],
914
+ () => {
915
+ o.clearOnChangeMultiple && (r.value = void 0);
916
+ }
917
+ );
918
+ const bt = b(() => ({
919
+ defaultExpandAll: !0,
920
+ showLine: !0,
921
+ selectionBehavior: "replace",
922
+ ...o.treeProps ?? {},
923
+ size: D.value,
924
+ flattenData: !0,
925
+ outerVirtualScroll: !0,
926
+ selectable: !0,
927
+ focusable: !1,
928
+ multiple: o.multiple,
929
+ checkable: o.multiple && o.checkbox,
930
+ virtual: B,
931
+ syncCheckboxAndSelect: o.multiple,
932
+ data: w.value,
933
+ modelValue: We(),
934
+ checkedKeys: We(),
935
+ class: C(O, "tree")
936
+ })), Ct = b(() => {
937
+ const e = o.scrollContainerProps ?? {};
938
+ return {
939
+ ...e,
940
+ areaCls: [
941
+ C(O, "scroll_area"),
942
+ e == null ? void 0 : e.class,
943
+ e == null ? void 0 : e.areaCls
944
+ ],
945
+ wrapProps: {
946
+ ...(e == null ? void 0 : e.wrapProps) ?? {},
947
+ style: (N == null ? void 0 : N.scrollWrapperStyles.value) ?? {}
948
+ }
949
+ };
950
+ }), Ue = C(O, "popup"), kt = at(Ue, {
951
+ variants: {
952
+ size: J(ut, Ue)
953
+ }
954
+ }), we = (e) => {
955
+ if (vo(e))
956
+ return `${e}px`;
957
+ if (typeof e == "string")
958
+ return e;
959
+ }, St = b(() => we(o.popupWidth)), xt = b(() => we(o.popupHeight)), Ot = b(() => we(o.minWidth)), Pt = () => {
960
+ var n, d;
961
+ const e = (d = s.header) == null ? void 0 : d.call(s, {
962
+ isEmpty: !((n = w.value) != null && n.length),
963
+ search: V.value
964
+ }), l = !L(e);
965
+ if (l || o.headerSearch)
966
+ return h(
967
+ "div",
968
+ { class: C(O, "header") },
969
+ l ? e : h(pt, o.headerSearchInputProps || {})
970
+ );
971
+ }, Bt = () => {
972
+ var n, d;
973
+ const e = (d = s.footer) == null ? void 0 : d.call(s, {
974
+ isEmpty: !((n = w.value) != null && n.length),
975
+ search: V.value
976
+ });
977
+ if (!L(e))
978
+ return h("div", { class: C(O, "footer") }, e);
979
+ }, It = () => {
980
+ var n;
981
+ const e = {
982
+ type: D.value === "sm" ? "simple" : "advance",
983
+ ...he(o.emptyProps ?? {}, ["class"]),
984
+ class: H(C(O, "empty"), o.emptyCls)
985
+ }, l = (n = s.empty) == null ? void 0 : n.call(s, e);
986
+ return L(l) ? h(io, e, {
987
+ title: s.emptyTitle,
988
+ description: s.emptyDescription,
989
+ actions: s.emptyActions,
990
+ image: s.emptyImage
991
+ }) : l;
992
+ }, Tt = () => {
993
+ var l;
994
+ const e = (l = s.loading) == null ? void 0 : l.call(s, {});
995
+ return L(e) ? new Array(w.value.length ? 2 : o.loadingRowCount).fill(1).map(
996
+ () => h(fo, {
997
+ size: D.value,
998
+ class: H(C(O, "skeleton"), o.skeletonCls),
999
+ ...he(o.skeletonProps ?? {}, ["class"])
1000
+ })
1001
+ ) : e;
1002
+ }, Vt = (e, l, n) => {
1003
+ const d = e._clear;
1004
+ if (o.multiple) {
1005
+ const P = e._single;
1006
+ d ? r.value = [] : P ? r.value = [e._key] : r.value = n;
1007
+ } else
1008
+ d || !l ? r.value = void 0 : r.value = e._key;
1009
+ a(
1010
+ "select",
1011
+ e._key,
1012
+ l,
1013
+ e
1014
+ );
1015
+ }, zt = (e) => {
1016
+ e.key === "ArrowDown" && !u.value ? u.value = !0 : e.key === "Tab" && u.value && (u.value = !1);
1017
+ };
1018
+ return o.disableOutsidePointerEvents && qt(u), (e, l) => (x(), R(g(Xt), ue({
1019
+ open: g(u),
1020
+ "onUpdate:open": l[2] || (l[2] = (n) => je(u) ? u.value = n : null)
1021
+ }, ae.value, {
1022
+ containerProps: {
1023
+ ...e.containerProps ?? {},
1024
+ onClick: Ie
1025
+ },
1026
+ noPadding: !0,
1027
+ size: g(D),
1028
+ containerStyle: {
1029
+ pointerEvents: "auto",
1030
+ display: g(u) ? void 0 : "none",
1031
+ zIndex: e.zIndex,
1032
+ "--ptc-combobox-popup-width": e.samePopupWidth ? void 0 : St.value,
1033
+ "--ptc-combobox-popup-height": xt.value,
1034
+ "--ptc-combobox-trigger-min-w": Ot.value
1035
+ },
1036
+ containerCls: g(H)(g(kt)(o), e.popupCls),
1037
+ onKeydown: zt
1038
+ }), nt({
1039
+ content: K(() => [
1040
+ te(Pt),
1041
+ te(g(so), ue({
1042
+ ref_key: "scrollContainerRef",
1043
+ ref: Ce
1044
+ }, Ct.value), {
1045
+ default: K(() => [
1046
+ w.value.length || e.loading ? (x(), R(g(ht), { key: 0 }, {
1047
+ default: K(() => [
1048
+ qe("div", {
1049
+ class: Pe(g(H)(g(C)(g(O), "options"), e.optionsCls)),
1050
+ style: Rt(e.virtual ? dt.value : {}),
1051
+ onPointerleave: l[1] || (l[1] = (n) => Ve(void 0))
1052
+ }, [
1053
+ e.tree ? (x(), R(g(po), ue({
1054
+ key: 0,
1055
+ ref_key: "treeRef",
1056
+ ref: ze
1057
+ }, bt.value, {
1058
+ expandedKeys: g(p),
1059
+ "onUpdate:expandedKeys": l[0] || (l[0] = (n) => je(p) ? p.value = n : null),
1060
+ onExpand: Ie,
1061
+ onSelect: Vt
1062
+ }), {
1063
+ default: K(({ items: n }) => [
1064
+ (x(!0), ve(Re, null, Ae(n, (d) => (x(), R(g(Ne), {
1065
+ key: d._key,
1066
+ value: d._key
1067
+ }, {
1068
+ default: K(() => [
1069
+ te(g(co), ue({ node: d }, { ref_for: !0 }, He(d), {
1070
+ onPointermove: (P) => Ve(d._key)
1071
+ }), {
1072
+ default: K(() => [
1073
+ te(ot, { option: d }, null, 8, ["option"])
1074
+ ]),
1075
+ _: 2
1076
+ }, 1040, ["node", "onPointermove"])
1077
+ ]),
1078
+ _: 2
1079
+ }, 1032, ["value"]))), 128))
1080
+ ]),
1081
+ _: 1
1082
+ }, 16, ["expandedKeys"])) : (x(!0), ve(Re, { key: 1 }, Ae(ct.value, (n) => (x(), ve(Re, {
1083
+ key: n._key
1084
+ }, [
1085
+ n._divider ? (x(), R(mo, { key: 0 })) : n._label && n._hasChildren ? (x(), R(xo, {
1086
+ key: 1,
1087
+ label: n._label
1088
+ }, null, 8, ["label"])) : n._hasChildren ? Ee("", !0) : (x(), R(g(Ne), {
1089
+ key: 2,
1090
+ value: n._key
1091
+ }, {
1092
+ default: K(() => [
1093
+ te(ot, ue({ option: n }, { ref_for: !0 }, He(n), {
1094
+ onPointermove: (d) => Ve(n._key)
1095
+ }), null, 16, ["option", "onPointermove"])
1096
+ ]),
1097
+ _: 2
1098
+ }, 1032, ["value"]))
1099
+ ], 64))), 128)),
1100
+ e.loading ? (x(), R(Tt, { key: 2 })) : Ee("", !0)
1101
+ ], 38)
1102
+ ]),
1103
+ _: 1
1104
+ })) : (x(), R(It, { key: 1 })),
1105
+ e.lazyLoading ? (x(), ve("div", {
1106
+ key: 2,
1107
+ class: Pe(g(C)(g(O), "lazy_loading"))
1108
+ }, [
1109
+ qe("div", {
1110
+ class: Pe(g(C)(g(O), "lazy_loading_trigger")),
1111
+ ref_key: "target",
1112
+ ref: Z
1113
+ }, null, 2)
1114
+ ], 2)) : Ee("", !0)
1115
+ ]),
1116
+ _: 1
1117
+ }, 16),
1118
+ te(Bt)
1119
+ ]),
1120
+ _: 2
1121
+ }, [
1122
+ e.noTrigger ? void 0 : {
1123
+ name: "default",
1124
+ fn: K(() => [
1125
+ te(So)
1126
+ ]),
1127
+ key: "0"
1128
+ }
1129
+ ]), 1040, ["open", "containerProps", "size", "containerStyle", "containerCls"]));
1130
+ }
1131
+ });
1132
+ export {
1133
+ ut as C,
1134
+ Qo as _,
1135
+ pt as a,
1136
+ ko as b,
1137
+ Ke as i,
1138
+ Co as p
1139
+ };