@opengis/filter 0.1.1 → 0.1.2

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 (3) hide show
  1. package/filter.js +1366 -1344
  2. package/filter.umd.cjs +1 -1
  3. package/package.json +1 -1
package/filter.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as O, ref as _, createElementBlock as w, openBlock as f, createElementVNode as u, withModifiers as _e, normalizeClass as D, createCommentVNode as V, toDisplayString as F, computed as I, watch as M, createStaticVNode as Le, Fragment as R, renderList as W, unref as e, createBlock as S, createVNode as N, createTextVNode as z, withDirectives as T, vShow as X, vModelText as G, onMounted as ae, onBeforeUnmount as ce, Teleport as $e, normalizeStyle as Ae, renderSlot as ue, nextTick as fe, isRef as Ee, withCtx as le, resolveDynamicComponent as ee, mergeProps as P, toRaw as Z, cloneVNode as Ie, useSlots as pe } from "vue";
2
- const Te = { class: "flex items-center justify-between w-full text-sm" }, Oe = { class: "flex items-center cursor-pointer w-full" }, Ue = {
1
+ import { defineComponent as U, ref as _, createElementBlock as k, openBlock as f, createElementVNode as d, withModifiers as $e, normalizeClass as R, createCommentVNode as $, toDisplayString as j, computed as I, watch as F, createStaticVNode as Le, Fragment as M, renderList as W, unref as e, createBlock as D, createVNode as H, createTextVNode as N, withDirectives as O, vShow as X, vModelText as G, onMounted as ae, onBeforeUnmount as ce, Teleport as _e, normalizeStyle as Ae, renderSlot as ue, nextTick as fe, isRef as Ee, withCtx as te, resolveDynamicComponent as Z, mergeProps as P, toRaw as ne, cloneVNode as Te, useSlots as pe } from "vue";
2
+ const Ie = { class: "flex items-center justify-between w-full text-sm" }, Oe = { class: "flex items-center cursor-pointer w-full" }, Ue = {
3
3
  key: 0,
4
4
  width: "16",
5
5
  height: "auto",
@@ -7,7 +7,7 @@ const Te = { class: "flex items-center justify-between w-full text-sm" }, Oe = {
7
7
  }, ze = ["value"], Ne = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, He = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, Ye = {
8
8
  key: 0,
9
9
  class: "text-xs text-gray-500 dark:text-neutral-500 pr-1"
10
- }, me = /* @__PURE__ */ O({
10
+ }, me = /* @__PURE__ */ U({
11
11
  __name: "list-item",
12
12
  props: {
13
13
  layout: {},
@@ -20,44 +20,44 @@ const Te = { class: "flex items-center justify-between w-full text-sm" }, Oe = {
20
20
  highlighted: { type: Boolean }
21
21
  },
22
22
  emits: ["itemClick"],
23
- setup(i, { expose: a, emit: v }) {
24
- const t = i, s = v;
23
+ setup(c, { expose: o, emit: b }) {
24
+ const t = c, a = b;
25
25
  function r() {
26
- s("itemClick", t.value);
26
+ a("itemClick", t.value);
27
27
  }
28
- const c = _(null);
29
- return a({ el: c }), (m, d) => (f(), w("div", {
28
+ const u = _(null);
29
+ return o({ el: u }), (p, m) => (f(), k("div", {
30
30
  class: "flex items-center w-full rounded-lg group hover:bg-gray-100",
31
31
  ref_key: "el",
32
- ref: c
32
+ ref: u
33
33
  }, [
34
- u("div", Te, [
35
- u("div", Oe, [
36
- u("label", {
34
+ d("div", Ie, [
35
+ d("div", Oe, [
36
+ d("label", {
37
37
  for: "radio-9740",
38
- class: D([
39
- ["inline", "popover"].includes(m.layout) ? "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center" : "flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",
40
- { "bg-blue-100": m.highlighted }
38
+ class: R([
39
+ ["inline", "popover"].includes(p.layout) ? "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center" : "flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",
40
+ { "bg-blue-100": p.highlighted }
41
41
  ]),
42
- onClick: _e(r, ["stop", "prevent"])
42
+ onClick: $e(r, ["stop", "prevent"])
43
43
  }, [
44
- u("div", {
45
- class: D(["w-[18px] h-[18px] border flex items-center justify-center", [
46
- m.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
47
- m.color ? `bg-[${m.color}] border-[#ffffff]` : m.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
44
+ d("div", {
45
+ class: R(["w-[18px] h-[18px] border flex items-center justify-center", [
46
+ p.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
47
+ p.color ? `bg-[${p.color}] border-[#ffffff]` : p.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
48
48
  ]])
49
49
  }, [
50
- m.isSelected ? (f(), w("img", Ue)) : V("", !0)
50
+ p.isSelected ? (f(), k("img", Ue)) : $("", !0)
51
51
  ], 2),
52
- u("input", {
52
+ d("input", {
53
53
  type: "checkbox",
54
54
  class: "hidden",
55
55
  id: "radio-9740",
56
- value: m.value
56
+ value: p.value
57
57
  }, null, 8, ze),
58
- u("div", Ne, [
59
- u("span", He, F(m.label ?? "Відсутні данні"), 1),
60
- m.count ? (f(), w("div", Ye, " (" + F(m.count) + ") ", 1)) : V("", !0)
58
+ d("div", Ne, [
59
+ d("span", He, j(p.label ?? "Відсутні данні"), 1),
60
+ p.count ? (f(), k("div", Ye, " (" + j(p.count) + ") ", 1)) : $("", !0)
61
61
  ])
62
62
  ], 2)
63
63
  ])
@@ -65,71 +65,71 @@ const Te = { class: "flex items-center justify-between w-full text-sm" }, Oe = {
65
65
  ], 512));
66
66
  }
67
67
  });
68
- function Be(i, a) {
68
+ function Be(c, o) {
69
69
  const {
70
- options: v = [],
70
+ options: b = [],
71
71
  limit: t = 20
72
- } = i;
73
- function s(l) {
74
- return Array.isArray(l) ? l[0] : l;
75
- }
76
- const r = _(s(i.modelValue)), c = _(""), m = _(!1), d = _([]), x = _("id"), p = _("text"), n = _(!1), o = _(i.layout !== "popover" && v.length > t);
77
- function h(l) {
78
- const b = l.find(Boolean) ?? {}, K = ["id", "value", "code", "key"].find((Y) => Y in b) ?? "id", A = ["text", "label", "name", "title"].find((Y) => Y in b) ?? "text";
79
- return { autoValueKey: K, autoLabelKey: A };
80
- }
81
- if (v.length > 0) {
82
- const l = h(v);
83
- x.value = l.autoValueKey, p.value = l.autoLabelKey;
84
- }
85
- const g = I(() => {
86
- const l = d.value;
87
- return i.layout === "popover" || n.value ? l : l.slice(0, t);
72
+ } = c;
73
+ function a(n) {
74
+ return Array.isArray(n) ? n[0] : n;
75
+ }
76
+ const r = _(a(c.modelValue)), u = _(""), p = _(!1), m = _([]), h = _("id"), i = _("text"), s = _(!1), v = _(c.layout !== "popover" && b.length > t);
77
+ function w(n) {
78
+ const x = n.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((K) => K in x) ?? "id", S = ["text", "label", "name", "title"].find((K) => K in x) ?? "text";
79
+ return { autoValueKey: B, autoLabelKey: S };
80
+ }
81
+ if (b.length > 0) {
82
+ const n = w(b);
83
+ h.value = n.autoValueKey, i.value = n.autoLabelKey;
84
+ }
85
+ const y = I(() => {
86
+ const n = m.value;
87
+ return c.layout === "popover" || s.value ? n : n.slice(0, t);
88
88
  });
89
- M(() => i.modelValue, (l) => {
90
- r.value = s(l);
91
- }, { immediate: !0 }), d.value = [...v].sort((l, b) => i.sort === "count" ? b.count && l.count ? b.count - l.count : 0 : i.sort === "name" ? String(l[p.value] ?? "").localeCompare(String(b[p.value] ?? "")) : 0);
92
- function k(l) {
93
- return r.value === l[x.value];
89
+ F(() => c.modelValue, (n) => {
90
+ r.value = a(n);
91
+ }, { immediate: !0 }), m.value = [...b].sort((n, x) => c.sort === "count" ? x.count && n.count ? x.count - n.count : 0 : c.sort === "name" ? String(n[i.value] ?? "").localeCompare(String(x[i.value] ?? "")) : 0);
92
+ function g(n) {
93
+ return r.value === n[h.value];
94
94
  }
95
- function y(l) {
96
- r.value = l[x.value], a("update:modelValue", r.value), a("change", { name: i.name, value: r.value });
95
+ function l(n) {
96
+ r.value = n[h.value], o("update:modelValue", r.value), o("change", { name: c.name, value: r.value });
97
97
  }
98
- function $() {
99
- r.value = void 0, a("update:modelValue", r.value), a("clear", i.name);
98
+ function V() {
99
+ r.value = void 0, o("update:modelValue", r.value), o("clear", c.name);
100
100
  }
101
101
  function C() {
102
- n.value = !n.value;
102
+ s.value = !s.value;
103
103
  }
104
104
  return {
105
105
  innerValue: r,
106
- searchTerm: c,
107
- filteredOptions: g,
108
- isSelected: k,
109
- selectItem: y,
110
- clear: $,
106
+ searchTerm: u,
107
+ filteredOptions: y,
108
+ isSelected: g,
109
+ selectItem: l,
110
+ clear: V,
111
111
  toggleShowAll: C,
112
- isReqProc: m,
113
- showAll: n,
114
- isEnableShowAll: o,
115
- labelKey: p,
116
- valueKey: x,
117
- allOptions: d
112
+ isReqProc: p,
113
+ showAll: s,
114
+ isEnableShowAll: v,
115
+ labelKey: i,
116
+ valueKey: h,
117
+ allOptions: m
118
118
  };
119
119
  }
120
- const J = (i, a) => {
121
- const v = i.__vccOpts || i;
122
- for (const [t, s] of a)
123
- v[t] = s;
124
- return v;
120
+ const J = (c, o) => {
121
+ const b = c.__vccOpts || c;
122
+ for (const [t, a] of o)
123
+ b[t] = a;
124
+ return b;
125
125
  }, Pe = {}, We = {
126
126
  class: "w-48 mx-auto",
127
127
  viewBox: "0 0 178 90",
128
128
  fill: "none",
129
129
  xmlns: "http://www.w3.org/2000/svg"
130
130
  };
131
- function qe(i, a) {
132
- return f(), w("svg", We, a[0] || (a[0] = [
131
+ function qe(c, o) {
132
+ return f(), k("svg", We, o[0] || (o[0] = [
133
133
  Le('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
134
134
  ]));
135
135
  }
@@ -145,14 +145,14 @@ const ve = /* @__PURE__ */ J(Pe, [["render", qe]]), Qe = {}, Ge = {
145
145
  "stroke-linejoin": "round",
146
146
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
147
147
  };
148
- function Xe(i, a) {
149
- return f(), w("svg", Ge, a[0] || (a[0] = [
150
- u("path", {
148
+ function Xe(c, o) {
149
+ return f(), k("svg", Ge, o[0] || (o[0] = [
150
+ d("path", {
151
151
  stroke: "none",
152
152
  d: "M0 0h24v24H0z",
153
153
  fill: "none"
154
154
  }, null, -1),
155
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
155
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
156
156
  ]));
157
157
  }
158
158
  const ie = /* @__PURE__ */ J(Qe, [["render", Xe]]), Je = {}, Ze = {
@@ -167,14 +167,14 @@ const ie = /* @__PURE__ */ J(Qe, [["render", Xe]]), Je = {}, Ze = {
167
167
  "stroke-linejoin": "round",
168
168
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
169
169
  };
170
- function et(i, a) {
171
- return f(), w("svg", Ze, a[0] || (a[0] = [
172
- u("path", {
170
+ function et(c, o) {
171
+ return f(), k("svg", Ze, o[0] || (o[0] = [
172
+ d("path", {
173
173
  stroke: "none",
174
174
  d: "M0 0h24v24H0z",
175
175
  fill: "none"
176
176
  }, null, -1),
177
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
177
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
178
178
  ]));
179
179
  }
180
180
  const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
@@ -186,7 +186,7 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
186
186
  }, nt = {
187
187
  key: 1,
188
188
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
189
- }, at = /* @__PURE__ */ O({
189
+ }, at = /* @__PURE__ */ U({
190
190
  __name: "radio",
191
191
  props: {
192
192
  id: {},
@@ -212,158 +212,158 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
212
212
  sort: {}
213
213
  },
214
214
  emits: ["update:modelValue", "change", "clear"],
215
- setup(i, { expose: a, emit: v }) {
216
- const t = i, s = _(null), r = v, {
217
- innerValue: c,
218
- filteredOptions: m,
219
- isSelected: d,
220
- selectItem: x,
221
- clear: p,
222
- toggleShowAll: n,
223
- isReqProc: o,
224
- showAll: h,
225
- isEnableShowAll: g,
226
- labelKey: k,
227
- valueKey: y,
228
- allOptions: $
215
+ setup(c, { expose: o, emit: b }) {
216
+ const t = c, a = _(null), r = b, {
217
+ innerValue: u,
218
+ filteredOptions: p,
219
+ isSelected: m,
220
+ selectItem: h,
221
+ clear: i,
222
+ toggleShowAll: s,
223
+ isReqProc: v,
224
+ showAll: w,
225
+ isEnableShowAll: y,
226
+ labelKey: g,
227
+ valueKey: l,
228
+ allOptions: V
229
229
  } = Be({
230
230
  ...t,
231
231
  modelValue: t.modelValue ?? t.default ?? ""
232
232
  }, r);
233
- return a({
234
- clear: p,
235
- inputTextRef: s
236
- }), M(
233
+ return o({
234
+ clear: i,
235
+ inputTextRef: a
236
+ }), F(
237
237
  () => t.modelValue,
238
238
  (C) => {
239
- C === void 0 && (c.value = void 0);
239
+ C === void 0 && (u.value = void 0);
240
240
  }
241
- ), (C, l) => (f(), w("div", {
242
- class: D([C.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
241
+ ), (C, n) => (f(), k("div", {
242
+ class: R([C.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
243
243
  }, [
244
- u("div", {
245
- class: D([
244
+ d("div", {
245
+ class: R([
246
246
  C.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
247
247
  C.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
248
248
  ])
249
249
  }, [
250
- (f(!0), w(R, null, W(e(m), (b) => (f(), S(me, {
250
+ (f(!0), k(M, null, W(e(p), (x) => (f(), D(me, {
251
251
  layout: C.layout,
252
- key: b[e(y)],
253
- count: b.count,
254
- label: b[e(k)],
255
- color: b.color,
252
+ key: x[e(l)],
253
+ count: x.count,
254
+ label: x[e(g)],
255
+ color: x.color,
256
256
  type: "radio",
257
- value: b[e(y)],
258
- "is-selected": e(d)(b),
259
- onItemClick: (K) => e(x)(b)
257
+ value: x[e(l)],
258
+ "is-selected": e(m)(x),
259
+ onItemClick: (B) => e(h)(x)
260
260
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
261
261
  ], 2),
262
- C.type === "select" && e(m).length === 0 && !e(o) ? (f(), w("div", tt, [
263
- u("div", lt, [
264
- N(ve),
265
- l[4] || (l[4] = u("div", { class: "max-w-sm mx-auto mt-6" }, [
266
- u("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
267
- u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
262
+ C.type === "select" && e(p).length === 0 && !e(v) ? (f(), k("div", tt, [
263
+ d("div", lt, [
264
+ H(ve),
265
+ n[4] || (n[4] = d("div", { class: "max-w-sm mx-auto mt-6" }, [
266
+ d("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
267
+ d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
268
268
  ], -1))
269
269
  ])
270
- ])) : V("", !0),
271
- C.layout !== "popover" && C.type !== "select" ? (f(), w(R, { key: 1 }, [
272
- !e(h) && e(g) ? (f(), w("div", {
270
+ ])) : $("", !0),
271
+ C.layout !== "popover" && C.type !== "select" ? (f(), k(M, { key: 1 }, [
272
+ !e(w) && e(y) ? (f(), k("div", {
273
273
  key: 0,
274
- onClick: l[0] || (l[0] = //@ts-ignore
275
- (...b) => e(n) && e(n)(...b)),
274
+ onClick: n[0] || (n[0] = //@ts-ignore
275
+ (...x) => e(s) && e(s)(...x)),
276
276
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
277
277
  }, [
278
- l[5] || (l[5] = z(" Показати більше ", -1)),
279
- N(ie)
280
- ])) : V("", !0),
281
- e(h) ? (f(), w("div", {
278
+ n[5] || (n[5] = N(" Показати більше ", -1)),
279
+ H(ie)
280
+ ])) : $("", !0),
281
+ e(w) ? (f(), k("div", {
282
282
  key: 1,
283
- onClick: l[1] || (l[1] = //@ts-ignore
284
- (...b) => e(n) && e(n)(...b)),
283
+ onClick: n[1] || (n[1] = //@ts-ignore
284
+ (...x) => e(s) && e(s)(...x)),
285
285
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
286
286
  }, [
287
- l[6] || (l[6] = z(" Показати менше ", -1)),
288
- N(ye)
289
- ])) : V("", !0)
290
- ], 64)) : V("", !0),
291
- C.cleanable ? (f(), w(R, { key: 2 }, [
292
- C.layout === "inline" ? (f(), w("div", ot, [
293
- z(F(e(c) || e(c) === null ? 1 : 0) + " з " + F(e($).length) + " обрано ", 1),
294
- T(u("button", {
287
+ n[6] || (n[6] = N(" Показати менше ", -1)),
288
+ H(ye)
289
+ ])) : $("", !0)
290
+ ], 64)) : $("", !0),
291
+ C.cleanable ? (f(), k(M, { key: 2 }, [
292
+ C.layout === "inline" ? (f(), k("div", ot, [
293
+ N(j(e(u) || e(u) === null ? 1 : 0) + " з " + j(e(V).length) + " обрано ", 1),
294
+ O(d("button", {
295
295
  class: "text-gray-600 hover:text-gray-800",
296
- onClick: l[2] || (l[2] = //@ts-ignore
297
- (...b) => e(p) && e(p)(...b))
296
+ onClick: n[2] || (n[2] = //@ts-ignore
297
+ (...x) => e(i) && e(i)(...x))
298
298
  }, " Очистити ", 512), [
299
- [X, e(c) !== "" && e(c) !== void 0]
299
+ [X, e(u) !== "" && e(u) !== void 0]
300
300
  ])
301
- ])) : V("", !0),
302
- C.layout === "popover" ? (f(), w("div", nt, [
303
- u("span", null, F(e(c) || e(c) === null ? 1 : 0) + " з " + F(e($).length) + " обрано", 1),
304
- T(u("button", {
301
+ ])) : $("", !0),
302
+ C.layout === "popover" ? (f(), k("div", nt, [
303
+ d("span", null, j(e(u) || e(u) === null ? 1 : 0) + " з " + j(e(V).length) + " обрано", 1),
304
+ O(d("button", {
305
305
  class: "text-gray-600 hover:text-gray-800",
306
- onClick: l[3] || (l[3] = //@ts-ignore
307
- (...b) => e(p) && e(p)(...b))
306
+ onClick: n[3] || (n[3] = //@ts-ignore
307
+ (...x) => e(i) && e(i)(...x))
308
308
  }, " Очистити ", 512), [
309
- [X, e(c) !== "" && e(c) !== void 0]
309
+ [X, e(u) !== "" && e(u) !== void 0]
310
310
  ])
311
- ])) : V("", !0)
312
- ], 64)) : V("", !0)
311
+ ])) : $("", !0)
312
+ ], 64)) : $("", !0)
313
313
  ], 2));
314
314
  }
315
315
  });
316
- function Se(i, a) {
316
+ function Se(c, o) {
317
317
  const {
318
- options: v = [],
318
+ options: b = [],
319
319
  limit: t = 20
320
- } = i;
321
- function s(l) {
322
- return Array.isArray(l) ? l : l ? [l] : [];
323
- }
324
- const r = _(s(i.modelValue)), c = _(""), m = _(!1), d = _([]), x = _("id"), p = _("text"), n = _(!1), o = _(i.layout !== "popover" && v.length > t);
325
- function h(l) {
326
- const b = l.find(Boolean) ?? {}, K = ["id", "value", "code", "key"].find((Y) => Y in b) ?? "id", A = ["text", "label", "name", "title"].find((Y) => Y in b) ?? "text";
327
- return { autoValueKey: K, autoLabelKey: A };
328
- }
329
- if (v.length > 0) {
330
- const l = h(v);
331
- x.value = l.autoValueKey, p.value = l.autoLabelKey;
332
- }
333
- const g = I(() => {
334
- const l = d.value;
335
- return i.layout === "popover" || n.value ? l : l.slice(0, t);
320
+ } = c;
321
+ function a(n) {
322
+ return Array.isArray(n) ? n : n ? [n] : [];
323
+ }
324
+ const r = _(a(c.modelValue)), u = _(""), p = _(!1), m = _([]), h = _("id"), i = _("text"), s = _(!1), v = _(c.layout !== "popover" && b.length > t);
325
+ function w(n) {
326
+ const x = n.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((K) => K in x) ?? "id", S = ["text", "label", "name", "title"].find((K) => K in x) ?? "text";
327
+ return { autoValueKey: B, autoLabelKey: S };
328
+ }
329
+ if (b.length > 0) {
330
+ const n = w(b);
331
+ h.value = n.autoValueKey, i.value = n.autoLabelKey;
332
+ }
333
+ const y = I(() => {
334
+ const n = m.value;
335
+ return c.layout === "popover" || s.value ? n : n.slice(0, t);
336
336
  });
337
- M(() => i.modelValue, (l) => {
338
- r.value = s(l);
339
- }, { immediate: !0 }), d.value = [...v].sort((l, b) => i.sort === "count" ? b.count && l.count ? b.count - l.count : 0 : i.sort === "name" ? String(l[p.value]).localeCompare(String(b[p.value])) : 0);
340
- function k(l) {
341
- return r.value && r.value.includes(l[x.value]);
337
+ F(() => c.modelValue, (n) => {
338
+ r.value = a(n);
339
+ }, { immediate: !0 }), m.value = [...b].sort((n, x) => c.sort === "count" ? x.count && n.count ? x.count - n.count : 0 : c.sort === "name" ? String(n[i.value]).localeCompare(String(x[i.value])) : 0);
340
+ function g(n) {
341
+ return r.value && r.value.includes(n[h.value]);
342
342
  }
343
- function y(l) {
344
- const b = r.value.includes(l[x.value]);
345
- r.value = b ? r.value.filter((K) => K !== l[x.value]) : [...r.value, l[x.value]], a("update:modelValue", r.value), a("change", { name: i.name, value: r.value });
343
+ function l(n) {
344
+ const x = r.value.includes(n[h.value]);
345
+ r.value = x ? r.value.filter((B) => B !== n[h.value]) : [...r.value, n[h.value]], o("update:modelValue", r.value), o("change", { name: c.name, value: r.value });
346
346
  }
347
- function $() {
348
- r.value = [], a("update:modelValue", r.value), a("clear", i.name);
347
+ function V() {
348
+ r.value = [], o("update:modelValue", r.value), o("clear", c.name);
349
349
  }
350
350
  function C() {
351
- n.value = !n.value;
351
+ s.value = !s.value;
352
352
  }
353
353
  return {
354
354
  innerValue: r,
355
- searchTerm: c,
356
- filteredOptions: g,
357
- isSelected: k,
358
- selectItem: y,
359
- clear: $,
355
+ searchTerm: u,
356
+ filteredOptions: y,
357
+ isSelected: g,
358
+ selectItem: l,
359
+ clear: V,
360
360
  toggleShowAll: C,
361
- isReqProc: m,
362
- showAll: n,
363
- isEnableShowAll: o,
364
- labelKey: p,
365
- valueKey: x,
366
- allOptions: d
361
+ isReqProc: p,
362
+ showAll: s,
363
+ isEnableShowAll: v,
364
+ labelKey: i,
365
+ valueKey: h,
366
+ allOptions: m
367
367
  };
368
368
  }
369
369
  const rt = {
@@ -375,7 +375,7 @@ const rt = {
375
375
  }, it = {
376
376
  key: 1,
377
377
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
378
- }, xe = /* @__PURE__ */ O({
378
+ }, xe = /* @__PURE__ */ U({
379
379
  __name: "checkbox",
380
380
  props: {
381
381
  id: {},
@@ -401,102 +401,102 @@ const rt = {
401
401
  sort: {}
402
402
  },
403
403
  emits: ["update:modelValue", "change", "clear"],
404
- setup(i, { expose: a, emit: v }) {
405
- const t = i, s = v, {
404
+ setup(c, { expose: o, emit: b }) {
405
+ const t = c, a = b, {
406
406
  innerValue: r,
407
- filteredOptions: c,
408
- isSelected: m,
409
- selectItem: d,
410
- clear: x,
411
- toggleShowAll: p,
412
- isReqProc: n,
413
- showAll: o,
414
- isEnableShowAll: h,
415
- labelKey: g,
416
- valueKey: k,
417
- allOptions: y
407
+ filteredOptions: u,
408
+ isSelected: p,
409
+ selectItem: m,
410
+ clear: h,
411
+ toggleShowAll: i,
412
+ isReqProc: s,
413
+ showAll: v,
414
+ isEnableShowAll: w,
415
+ labelKey: y,
416
+ valueKey: g,
417
+ allOptions: l
418
418
  } = Se({
419
419
  ...t,
420
420
  modelValue: t.modelValue
421
- }, s);
422
- return M(
421
+ }, a);
422
+ return F(
423
423
  () => t.modelValue,
424
- ($) => {
425
- $ === void 0 && (r.value = []);
424
+ (V) => {
425
+ V === void 0 && (r.value = []);
426
426
  }
427
- ), a({
428
- clear: x
429
- }), ($, C) => (f(), w("div", {
430
- class: D([$.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
427
+ ), o({
428
+ clear: h
429
+ }), (V, C) => (f(), k("div", {
430
+ class: R([V.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
431
431
  }, [
432
- u("div", {
433
- class: D([
434
- $.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
435
- $.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
432
+ d("div", {
433
+ class: R([
434
+ V.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
435
+ V.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
436
436
  ])
437
437
  }, [
438
- (f(!0), w(R, null, W(e(c), (l) => (f(), S(me, {
439
- layout: $.layout,
440
- count: l.count,
441
- label: l[e(g)],
442
- color: l.color,
438
+ (f(!0), k(M, null, W(e(u), (n) => (f(), D(me, {
439
+ layout: V.layout,
440
+ count: n.count,
441
+ label: n[e(y)],
442
+ color: n.color,
443
443
  type: "checkbox",
444
- value: l[e(k)],
445
- "is-selected": e(m)(l),
446
- onItemClick: (b) => e(d)(l)
444
+ value: n[e(g)],
445
+ "is-selected": e(p)(n),
446
+ onItemClick: (x) => e(m)(n)
447
447
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
448
448
  ], 2),
449
- $.type === "select" && e(c).length === 0 && !e(n) ? (f(), w("div", rt, [
450
- u("div", st, [
451
- N(ve),
452
- C[4] || (C[4] = u("div", { class: "max-w-sm mx-auto mt-6" }, [
453
- u("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
454
- u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
449
+ V.type === "select" && e(u).length === 0 && !e(s) ? (f(), k("div", rt, [
450
+ d("div", st, [
451
+ H(ve),
452
+ C[4] || (C[4] = d("div", { class: "max-w-sm mx-auto mt-6" }, [
453
+ d("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
454
+ d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
455
455
  ], -1))
456
456
  ])
457
- ])) : V("", !0),
458
- $.layout !== "popover" && $.type !== "select" ? (f(), w(R, { key: 1 }, [
459
- !e(o) && e(h) ? (f(), w("div", {
457
+ ])) : $("", !0),
458
+ V.layout !== "popover" && V.type !== "select" ? (f(), k(M, { key: 1 }, [
459
+ !e(v) && e(w) ? (f(), k("div", {
460
460
  key: 0,
461
461
  onClick: C[0] || (C[0] = //@ts-ignore
462
- (...l) => e(p) && e(p)(...l)),
462
+ (...n) => e(i) && e(i)(...n)),
463
463
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
464
464
  }, [
465
- C[5] || (C[5] = z(" Показати більше ", -1)),
466
- N(ie)
467
- ])) : V("", !0),
468
- e(o) ? (f(), w("div", {
465
+ C[5] || (C[5] = N(" Показати більше ", -1)),
466
+ H(ie)
467
+ ])) : $("", !0),
468
+ e(v) ? (f(), k("div", {
469
469
  key: 1,
470
470
  onClick: C[1] || (C[1] = //@ts-ignore
471
- (...l) => e(p) && e(p)(...l)),
471
+ (...n) => e(i) && e(i)(...n)),
472
472
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
473
473
  }, [
474
- C[6] || (C[6] = z(" Показати менше ", -1)),
475
- N(ye)
476
- ])) : V("", !0)
477
- ], 64)) : V("", !0),
478
- $.cleanable ? (f(), w(R, { key: 2 }, [
479
- $.layout === "inline" ? (f(), w("div", ut, [
480
- z(F(e(r).length) + " з " + F(e(y).length) + " обрано ", 1),
481
- T(u("button", {
474
+ C[6] || (C[6] = N(" Показати менше ", -1)),
475
+ H(ye)
476
+ ])) : $("", !0)
477
+ ], 64)) : $("", !0),
478
+ V.cleanable ? (f(), k(M, { key: 2 }, [
479
+ V.layout === "inline" ? (f(), k("div", ut, [
480
+ N(j(e(r).length) + " з " + j(e(l).length) + " обрано ", 1),
481
+ O(d("button", {
482
482
  class: "text-gray-600 hover:text-gray-800",
483
483
  onClick: C[2] || (C[2] = //@ts-ignore
484
- (...l) => e(x) && e(x)(...l))
484
+ (...n) => e(h) && e(h)(...n))
485
485
  }, " Очистити ", 512), [
486
486
  [X, e(r).length !== 0]
487
487
  ])
488
- ])) : V("", !0),
489
- $.layout === "popover" ? (f(), w("div", it, [
490
- u("span", null, F(e(r).length) + " з " + F(e(y).length) + " обрано", 1),
491
- T(u("button", {
488
+ ])) : $("", !0),
489
+ V.layout === "popover" ? (f(), k("div", it, [
490
+ d("span", null, j(e(r).length) + " з " + j(e(l).length) + " обрано", 1),
491
+ O(d("button", {
492
492
  class: "text-gray-600 hover:text-gray-800",
493
493
  onClick: C[3] || (C[3] = //@ts-ignore
494
- (...l) => e(x) && e(x)(...l))
494
+ (...n) => e(h) && e(h)(...n))
495
495
  }, " Очистити ", 512), [
496
496
  [X, e(r).length !== 0]
497
497
  ])
498
- ])) : V("", !0)
499
- ], 64)) : V("", !0)
498
+ ])) : $("", !0)
499
+ ], 64)) : $("", !0)
500
500
  ], 2));
501
501
  }
502
502
  }), dt = {}, ct = {
@@ -511,15 +511,15 @@ const rt = {
511
511
  "stroke-linejoin": "round",
512
512
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
513
513
  };
514
- function ft(i, a) {
515
- return f(), w("svg", ct, a[0] || (a[0] = [
516
- u("path", {
514
+ function ft(c, o) {
515
+ return f(), k("svg", ct, o[0] || (o[0] = [
516
+ d("path", {
517
517
  stroke: "none",
518
518
  d: "M0 0h24v24H0z",
519
519
  fill: "none"
520
520
  }, null, -1),
521
- u("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
522
- u("path", { d: "M21 21l-6 -6" }, null, -1)
521
+ d("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
522
+ d("path", { d: "M21 21l-6 -6" }, null, -1)
523
523
  ]));
524
524
  }
525
525
  const De = /* @__PURE__ */ J(dt, [["render", ft]]), pt = {}, mt = {
@@ -534,24 +534,24 @@ const De = /* @__PURE__ */ J(dt, [["render", ft]]), pt = {}, mt = {
534
534
  width: "15px",
535
535
  height: "15px"
536
536
  };
537
- function vt(i, a) {
538
- return f(), w("svg", mt, a[0] || (a[0] = [
539
- u("path", {
537
+ function vt(c, o) {
538
+ return f(), k("svg", mt, o[0] || (o[0] = [
539
+ d("path", {
540
540
  stroke: "none",
541
541
  d: "M0 0h24v24H0z",
542
542
  fill: "none"
543
543
  }, null, -1),
544
- u("path", { d: "M18 6l-12 12" }, null, -1),
545
- u("path", { d: "M6 6l12 12" }, null, -1)
544
+ d("path", { d: "M18 6l-12 12" }, null, -1),
545
+ d("path", { d: "M6 6l12 12" }, null, -1)
546
546
  ]));
547
547
  }
548
548
  const Re = /* @__PURE__ */ J(pt, [["render", vt]]);
549
549
  class de {
550
- static getWidthClass(a) {
551
- return typeof a == "number" ? `max-w-[${a}px]` : typeof a == "string" ? a.endsWith("%") || a.endsWith("px") ? `max-w-[${a}]` : `max-w-${a}` : "w-full";
550
+ static getWidthClass(o) {
551
+ return typeof o == "number" ? `max-w-[${o}px]` : typeof o == "string" ? o.endsWith("%") || o.endsWith("px") ? `max-w-[${o}]` : `max-w-${o}` : "w-full";
552
552
  }
553
553
  }
554
- const yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, gt = ["placeholder"], bt = /* @__PURE__ */ O({
554
+ const yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, gt = ["placeholder"], bt = /* @__PURE__ */ U({
555
555
  __name: "text-input",
556
556
  props: {
557
557
  id: {},
@@ -577,52 +577,52 @@ const yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
577
577
  sort: {}
578
578
  },
579
579
  emits: ["update:modelValue", "change", "clear"],
580
- setup(i, { emit: a }) {
581
- const v = i, t = _((v.placeHolder || v.label || v.name).toString()), s = a, r = _(v.modelValue ?? "");
582
- M(
583
- () => v.modelValue,
584
- (d) => {
585
- d !== r.value && (r.value = d ?? "");
580
+ setup(c, { emit: o }) {
581
+ const b = c, t = _((b.placeHolder || b.label || b.name || "search").toString()), a = o, r = _(b.modelValue ?? "");
582
+ F(
583
+ () => b.modelValue,
584
+ (m) => {
585
+ m !== r.value && (r.value = m ?? "");
586
586
  }
587
587
  );
588
- function c() {
589
- s("update:modelValue", r.value), s("change", { name: v.name, value: r.value });
588
+ function u() {
589
+ a("update:modelValue", r.value), a("change", { name: b.name, value: r.value });
590
590
  }
591
- function m() {
592
- r.value = "", s("update:modelValue", ""), s("clear", v.name);
591
+ function p() {
592
+ r.value = "", a("update:modelValue", ""), a("clear", b.name), a("change", { name: b.name, value: null });
593
593
  }
594
- return (d, x) => (f(), w("div", {
595
- class: D([
594
+ return (m, h) => (f(), k("div", {
595
+ class: R([
596
596
  "vs-form-text relative bg-white rounded-lg [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
597
- d.layout === "inline" ? e(de).getWidthClass(d.width) : "mb-2" + (d.layout === "popover" ? " m-2" : "")
597
+ m.layout === "inline" ? e(de).getWidthClass(m.width) : "mb-2" + (m.layout === "popover" ? " m-2" : "")
598
598
  ])
599
599
  }, [
600
- u("div", yt, [
601
- N(De)
600
+ d("div", yt, [
601
+ H(De)
602
602
  ]),
603
- r.value !== "" ? (f(), w("div", {
603
+ r.value !== "" ? (f(), k("div", {
604
604
  key: 0,
605
- onClick: m,
605
+ onClick: p,
606
606
  class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
607
607
  }, [
608
- N(Re)
609
- ])) : V("", !0),
610
- T(u("input", {
608
+ H(Re)
609
+ ])) : $("", !0),
610
+ O(d("input", {
611
611
  type: "text",
612
- "onUpdate:modelValue": x[0] || (x[0] = (p) => r.value = p),
613
- onInput: c,
612
+ "onUpdate:modelValue": h[0] || (h[0] = (i) => r.value = i),
613
+ onInput: u,
614
614
  placeholder: t.value,
615
- class: "!pr-7 !pl-8 bg-white h-[38px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
615
+ class: "!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
616
616
  }, null, 40, gt), [
617
617
  [G, r.value]
618
618
  ])
619
619
  ], 2));
620
620
  }
621
621
  });
622
- function Me(i = { color: "blue" }) {
622
+ function Me(c = { color: "blue" }) {
623
623
  return I(() => {
624
- const v = `w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${i.color}-500 focus:border-transparent`;
625
- return i?.size === "sm" ? `${v}h-[32px]` : `${v}h-[38px]`;
624
+ const b = `w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${c.color}-500 focus:border-transparent`;
625
+ return c?.size === "sm" ? `${b}h-[32px]` : `${b}h-[38px]`;
626
626
  });
627
627
  }
628
628
  function ht() {
@@ -631,8 +631,8 @@ function ht() {
631
631
  function xt() {
632
632
  return "font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 border h-7 rounded-md text-xs px-2 py-1 hover:bg-gray-100";
633
633
  }
634
- function Ke(i) {
635
- return i === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400" : i === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900" : "relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]";
634
+ function Fe(c) {
635
+ return c === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400" : c === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900" : "relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]";
636
636
  }
637
637
  const kt = {
638
638
  key: 0,
@@ -643,8 +643,8 @@ const kt = {
643
643
  }, Vt = {
644
644
  key: 0,
645
645
  class: "block text-xs font-medium text-gray-600 mb-1"
646
- }, _t = ["placeholder", "disabled"], $t = ["disabled"];
647
- const At = /* @__PURE__ */ O({
646
+ }, $t = ["placeholder", "disabled"], _t = ["disabled"];
647
+ const At = /* @__PURE__ */ U({
648
648
  __name: "range-input",
649
649
  props: {
650
650
  id: {},
@@ -670,82 +670,82 @@ const At = /* @__PURE__ */ O({
670
670
  sort: {}
671
671
  },
672
672
  emits: ["update:modelValue", "change", "clear"],
673
- setup(i, { expose: a, emit: v }) {
674
- const t = Me(), s = ht(), r = i, c = _(
673
+ setup(c, { expose: o, emit: b }) {
674
+ const t = Me(), a = ht(), r = c, u = _(
675
675
  r.modelValue ?? r.default ?? []
676
- ), m = v, d = I({
677
- get: () => r.modelValue ?? c.value,
678
- set: (n) => {
679
- r.modelValue !== void 0 ? m("update:modelValue", n) : c.value = n;
676
+ ), p = b, m = I({
677
+ get: () => r.modelValue ?? u.value,
678
+ set: (s) => {
679
+ r.modelValue !== void 0 ? p("update:modelValue", s) : u.value = s;
680
680
  }
681
681
  });
682
- function x() {
683
- m("change", { name: r.name, value: d.value || c.value });
682
+ function h() {
683
+ p("change", { name: r.name, value: m.value || u.value });
684
684
  }
685
- function p() {
686
- c.value = [], d.value = c.value, m("clear", r.name);
685
+ function i() {
686
+ u.value = [], m.value = u.value, p("clear", r.name);
687
687
  }
688
- return M(() => r.modelValue, (n) => {
689
- n !== void 0 && r.layout !== "popover" ? (c.value = n, m("update:modelValue", n)) : c.value = [];
690
- }), a({
691
- clear: p,
692
- currentValue: d
693
- }), (n, o) => (f(), w(R, null, [
694
- u("div", null, [
695
- u("div", {
696
- class: D(n.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
688
+ return F(() => r.modelValue, (s) => {
689
+ s !== void 0 && r.layout !== "popover" ? (u.value = s, p("update:modelValue", s)) : u.value = [];
690
+ }), o({
691
+ clear: i,
692
+ currentValue: m
693
+ }), (s, v) => (f(), k(M, null, [
694
+ d("div", null, [
695
+ d("div", {
696
+ class: R(s.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
697
697
  }, [
698
- u("div", null, [
699
- n.layout !== "vertical" ? (f(), w("label", kt, "Від")) : V("", !0),
700
- T(u("input", {
698
+ d("div", null, [
699
+ s.layout !== "vertical" ? (f(), k("label", kt, "Від")) : $("", !0),
700
+ O(d("input", {
701
701
  type: "number",
702
- class: D(e(t)),
703
- placeholder: n.placeHolder?.[0] ?? "min",
702
+ class: R(e(t)),
703
+ placeholder: s.placeHolder?.[0] ?? "min",
704
704
  step: "1",
705
705
  style: { outline: "none" },
706
- "onUpdate:modelValue": o[0] || (o[0] = (h) => d.value[0] = h),
707
- disabled: n.disabled
706
+ "onUpdate:modelValue": v[0] || (v[0] = (w) => m.value[0] = w),
707
+ disabled: s.disabled
708
708
  }, null, 10, wt), [
709
- [G, d.value[0]]
709
+ [G, m.value[0]]
710
710
  ])
711
711
  ]),
712
- n.layout === "vertical" ? (f(), w("label", Ct, " - ")) : V("", !0),
713
- u("div", null, [
714
- n.layout !== "vertical" ? (f(), w("label", Vt, "До")) : V("", !0),
715
- T(u("input", {
712
+ s.layout === "vertical" ? (f(), k("label", Ct, " - ")) : $("", !0),
713
+ d("div", null, [
714
+ s.layout !== "vertical" ? (f(), k("label", Vt, "До")) : $("", !0),
715
+ O(d("input", {
716
716
  type: "number",
717
- class: D(e(t)),
718
- placeholder: n.placeHolder?.[1] ?? "max",
717
+ class: R(e(t)),
718
+ placeholder: s.placeHolder?.[1] ?? "max",
719
719
  min: "0",
720
720
  max: "1000000000000000",
721
721
  step: "1",
722
722
  style: { outline: "none" },
723
- "onUpdate:modelValue": o[1] || (o[1] = (h) => d.value[1] = h),
724
- disabled: n.disabled
725
- }, null, 10, _t), [
726
- [G, d.value[1]]
723
+ "onUpdate:modelValue": v[1] || (v[1] = (w) => m.value[1] = w),
724
+ disabled: s.disabled
725
+ }, null, 10, $t), [
726
+ [G, m.value[1]]
727
727
  ])
728
728
  ]),
729
- ["popover", "inline", "vertical"].includes(n.layout) ? (f(), w("button", {
729
+ ["popover", "inline", "vertical"].includes(s.layout) ? (f(), k("button", {
730
730
  key: 1,
731
- onClick: x,
732
- class: D(e(s) + (n.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
733
- }, F(n.layout === "vertical" ? "Ok" : "Застосувати"), 3)) : V("", !0),
734
- ["popover", "inline"].includes(n.layout) ? (f(), w("button", {
731
+ onClick: h,
732
+ class: R(e(a) + (s.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
733
+ }, j(s.layout === "vertical" ? "Ok" : "Застосувати"), 3)) : $("", !0),
734
+ ["popover", "inline"].includes(s.layout) ? (f(), k("button", {
735
735
  key: 2,
736
- disabled: !(d.value[0] || d.value[1]),
737
- onClick: p,
738
- class: D(e(s) + " hover:bg-gray-100")
739
- }, "Очистити", 10, $t)) : V("", !0)
736
+ disabled: !(m.value[0] || m.value[1]),
737
+ onClick: i,
738
+ class: R(e(a) + " hover:bg-gray-100")
739
+ }, "Очистити", 10, _t)) : $("", !0)
740
740
  ], 2)
741
741
  ]),
742
- (n.cleanable && c.value.length, V("", !0))
742
+ (s.cleanable && u.value.length, $("", !0))
743
743
  ], 64));
744
744
  }
745
745
  }), Bt = ["disabled", "title"], St = {
746
746
  key: 0,
747
747
  class: "absolute top-0 end-0 inline-flex min-h-[10px] min-w-[10px] z-10 items-center py-0.5 rounded-full text-xs font-medium transform -translate-y-1/2 translate-x-1/2 bg-blue-600 text-white px-1"
748
- }, Dt = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, Rt = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, ge = /* @__PURE__ */ O({
748
+ }, Dt = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, Rt = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, ge = /* @__PURE__ */ U({
749
749
  __name: "popover-field",
750
750
  props: {
751
751
  disabled: { type: Boolean, default: !1 },
@@ -756,212 +756,212 @@ const At = /* @__PURE__ */ O({
756
756
  mode: {},
757
757
  layout: {}
758
758
  },
759
- setup(i, { expose: a }) {
760
- const v = i, t = I(() => Ke(v.mode)), s = _(!1), r = _({ top: 0, left: 0 }), c = _(null), m = _(null), d = _(null);
761
- function x() {
762
- const y = m.value, $ = d.value;
763
- if (!y || !$) return;
764
- const C = y.getBoundingClientRect(), l = $.offsetWidth, b = window.innerWidth, K = C.bottom + 8;
765
- let { left: A } = C;
766
- A + l > b && (A = Math.max(b - l - 10, 10)), r.value = { top: K, left: A };
759
+ setup(c, { expose: o }) {
760
+ const b = c, t = I(() => Fe(b.mode)), a = _(!1), r = _({ top: 0, left: 0 }), u = _(null), p = _(null), m = _(null);
761
+ function h() {
762
+ const l = p.value, V = m.value;
763
+ if (!l || !V) return;
764
+ const C = l.getBoundingClientRect(), n = V.offsetWidth, x = window.innerWidth, B = C.bottom + 8;
765
+ let { left: S } = C;
766
+ S + n > x && (S = Math.max(x - n - 10, 10)), r.value = { top: B, left: S };
767
767
  }
768
- function p() {
769
- s.value = !s.value, s.value && fe(() => {
770
- x(), v.fieldRef?.inputTextRef && v.fieldRef?.inputTextRef.focus();
768
+ function i() {
769
+ a.value = !a.value, a.value && fe(() => {
770
+ h(), b.fieldRef?.inputTextRef && b.fieldRef?.inputTextRef.focus();
771
771
  });
772
772
  }
773
- function n(y) {
774
- !c.value?.contains(y.target) && !d.value?.contains(y.target) && (s.value = !1);
773
+ function s(l) {
774
+ !u.value?.contains(l.target) && !m.value?.contains(l.target) && (a.value = !1);
775
775
  }
776
- function o(y) {
777
- y.key === "Escape" && (s.value = !1);
776
+ function v(l) {
777
+ l.key === "Escape" && (a.value = !1);
778
778
  }
779
- const h = _(!1);
779
+ const w = _(!1);
780
780
  ae(() => {
781
- h.value = !0;
781
+ w.value = !0;
782
782
  }), ae(() => {
783
- document.addEventListener("click", n, !0), document.addEventListener("keydown", o), window.addEventListener("scroll", x, !0);
783
+ document.addEventListener("click", s, !0), document.addEventListener("keydown", v), window.addEventListener("scroll", h, !0);
784
784
  }), ce(() => {
785
- document.removeEventListener("click", n, !0), document.removeEventListener("keydown", o), window.removeEventListener("scroll", x, !0);
785
+ document.removeEventListener("click", s, !0), document.removeEventListener("keydown", v), window.removeEventListener("scroll", h, !0);
786
786
  });
787
- function g() {
788
- s.value = !1;
787
+ function y() {
788
+ a.value = !1;
789
789
  }
790
- a({ close: g });
791
- const k = I(() => {
792
- const y = v.fieldRef?.selectedLabels;
793
- return y ? Array.isArray(y) ? y.length > 0 ? y.join(", ") : v.label ?? "" : String(y) : v.label ?? "";
790
+ o({ close: y });
791
+ const g = I(() => {
792
+ const l = b.fieldRef?.selectedLabels;
793
+ return l ? Array.isArray(l) ? l.length > 0 ? l.join(", ") : b.label ?? "" : String(l) : b.label ?? "";
794
794
  });
795
- return (y, $) => (f(), w("div", null, [
796
- u("button", {
797
- onClick: p,
798
- disabled: y.disabled,
795
+ return (l, V) => (f(), k("div", null, [
796
+ d("button", {
797
+ onClick: i,
798
+ disabled: l.disabled,
799
799
  ref_key: "triggerRef",
800
- ref: m,
801
- title: y.label,
802
- class: D(t.value + " " + (y.width ? e(de).getWidthClass(y.width) : "w-full"))
800
+ ref: p,
801
+ title: l.label,
802
+ class: R(t.value + " " + (l.width ? e(de).getWidthClass(l.width) : "w-full"))
803
803
  }, [
804
- u("span", {
805
- class: D(["truncate text-ellipsis block", y.width ? e(de).getWidthClass(y.width - 50) : "w-full"])
806
- }, F(k.value), 3),
807
- N(ie, { class: "h-4 w-4" }),
808
- (Array.isArray(y.currentValue) ? y.currentValue === null || y.currentValue.length > 0 : y.currentValue === null || y.currentValue) && y.layout === "inline" ? (f(), w("span", St)) : V("", !0)
804
+ d("span", {
805
+ class: R(["truncate text-ellipsis block", l.width ? e(de).getWidthClass(l.width - 50) : "w-full"])
806
+ }, j(g.value), 3),
807
+ H(ie, { class: "h-4 w-4" }),
808
+ (Array.isArray(l.currentValue) ? l.currentValue === null || l.currentValue.length > 0 : l.currentValue === null || l.currentValue) && l.layout === "inline" ? (f(), k("span", St)) : $("", !0)
809
809
  ], 10, Bt),
810
- h.value ? (f(), S($e, {
810
+ w.value ? (f(), D(_e, {
811
811
  key: 0,
812
812
  to: "body"
813
813
  }, [
814
- T(u("div", {
814
+ O(d("div", {
815
815
  ref_key: "popperRef",
816
- ref: d,
816
+ ref: m,
817
817
  class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
818
818
  style: Ae({ top: `${r.value.top}px`, left: `${r.value.left}px` }),
819
819
  "data-inside-popover": ""
820
820
  }, [
821
- u("div", Dt, [
822
- u("div", Rt, [
823
- ue(y.$slots, "default")
821
+ d("div", Dt, [
822
+ d("div", Rt, [
823
+ ue(l.$slots, "default")
824
824
  ])
825
825
  ])
826
826
  ], 4), [
827
- [X, s.value]
827
+ [X, a.value]
828
828
  ])
829
- ])) : V("", !0)
829
+ ])) : $("", !0)
830
830
  ]));
831
831
  }
832
832
  });
833
- function Mt(i) {
834
- return String(i).charAt(0).toUpperCase() + String(i).slice(1);
833
+ function Mt(c) {
834
+ return String(c).charAt(0).toUpperCase() + String(c).slice(1);
835
835
  }
836
- class H {
837
- static format(a) {
838
- const v = a.getFullYear(), t = (a.getMonth() + 1).toString().padStart(2, "0"), s = a.getDate().toString().padStart(2, "0");
839
- return `${v}-${t}-${s}`;
840
- }
841
- static getShiftedDay(a, v = 0) {
842
- const t = a ? new Date(a) : /* @__PURE__ */ new Date();
843
- return t.setDate(t.getDate() + v), this.format(t);
844
- }
845
- static getLastWeekRange(a, v, t = 0) {
846
- if (a && v) {
847
- const x = new Date(a), p = new Date(v);
848
- return x.setDate(x.getDate() + t * 7), p.setDate(p.getDate() + t * 7), [this.format(x), this.format(p)];
836
+ class Y {
837
+ static format(o) {
838
+ const b = o.getFullYear(), t = (o.getMonth() + 1).toString().padStart(2, "0"), a = o.getDate().toString().padStart(2, "0");
839
+ return `${b}-${t}-${a}`;
840
+ }
841
+ static getShiftedDay(o, b = 0) {
842
+ const t = o ? new Date(o) : /* @__PURE__ */ new Date();
843
+ return t.setDate(t.getDate() + b), this.format(t);
844
+ }
845
+ static getLastWeekRange(o, b, t = 0) {
846
+ if (o && b) {
847
+ const h = new Date(o), i = new Date(b);
848
+ return h.setDate(h.getDate() + t * 7), i.setDate(i.getDate() + t * 7), [this.format(h), this.format(i)];
849
849
  }
850
- const s = /* @__PURE__ */ new Date(), r = s.getDay(), c = r === 0 ? 13 : r - 1 + 7, m = new Date(s);
851
- m.setDate(s.getDate() - c + t * 7);
852
- const d = new Date(m);
853
- return d.setDate(m.getDate() + 6), [this.format(m), this.format(d)];
854
- }
855
- static getMonthRange(a, v, t = 0) {
856
- let s;
857
- a ? s = new Date(a) : s = /* @__PURE__ */ new Date(), s = new Date(s.getFullYear(), s.getMonth() + t, 1);
858
- const r = s, c = new Date(s.getFullYear(), s.getMonth() + 1, 0);
859
- return [this.format(r), this.format(c)];
860
- }
861
- static getQuarterRange(a, v, t = 0) {
862
- const s = a || v, r = s ? new Date(s) : /* @__PURE__ */ new Date();
863
- let c = Math.floor(r.getMonth() / 3);
864
- c += t;
865
- const m = (c % 4 + 4) % 4 * 3, d = r.getFullYear() + Math.floor(c / 4), x = new Date(d, m, 1), p = new Date(d, m + 3, 0);
866
- return [this.format(x), this.format(p)];
867
- }
868
- static getYear(a, v = 0) {
850
+ const a = /* @__PURE__ */ new Date(), r = a.getDay(), u = r === 0 ? 13 : r - 1 + 7, p = new Date(a);
851
+ p.setDate(a.getDate() - u + t * 7);
852
+ const m = new Date(p);
853
+ return m.setDate(p.getDate() + 6), [this.format(p), this.format(m)];
854
+ }
855
+ static getMonthRange(o, b, t = 0) {
856
+ let a;
857
+ o ? a = new Date(o) : a = /* @__PURE__ */ new Date(), a = new Date(a.getFullYear(), a.getMonth() + t, 1);
858
+ const r = a, u = new Date(a.getFullYear(), a.getMonth() + 1, 0);
859
+ return [this.format(r), this.format(u)];
860
+ }
861
+ static getQuarterRange(o, b, t = 0) {
862
+ const a = o || b, r = a ? new Date(a) : /* @__PURE__ */ new Date();
863
+ let u = Math.floor(r.getMonth() / 3);
864
+ u += t;
865
+ const p = (u % 4 + 4) % 4 * 3, m = r.getFullYear() + Math.floor(u / 4), h = new Date(m, p, 1), i = new Date(m, p + 3, 0);
866
+ return [this.format(h), this.format(i)];
867
+ }
868
+ static getYear(o, b = 0) {
869
869
  let t;
870
- return a && /^\d{4}$/.test(a) ? t = parseInt(a, 10) : a ? t = new Date(a).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + v);
870
+ return o && /^\d{4}$/.test(o) ? t = parseInt(o, 10) : o ? t = new Date(o).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + b);
871
871
  }
872
- static getYearRange(a, v = 0) {
872
+ static getYearRange(o, b = 0) {
873
873
  let t;
874
- return a && /^\d{4}$/.test(a) ? t = parseInt(a, 10) : a ? t = new Date(a).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
875
- this.format(new Date(t + v, 0, 1)),
876
- this.format(new Date(t + v + 1, 0, 0))
874
+ return o && /^\d{4}$/.test(o) ? t = parseInt(o, 10) : o ? t = new Date(o).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
875
+ this.format(new Date(t + b, 0, 1)),
876
+ this.format(new Date(t + b + 1, 0, 0))
877
877
  ];
878
878
  }
879
- static getRangeFromDaysBefore(a) {
880
- const v = /* @__PURE__ */ new Date(), t = new Date(v.getTime());
881
- return t.setDate(v.getDate() - a), [this.format(t), this.format(v)];
879
+ static getRangeFromDaysBefore(o) {
880
+ const b = /* @__PURE__ */ new Date(), t = new Date(b.getTime());
881
+ return t.setDate(b.getDate() - o), [this.format(t), this.format(b)];
882
882
  }
883
883
  }
884
- function Fe(i, a) {
884
+ function Ke(c, o) {
885
885
  const {
886
- popoverRef: v
887
- } = i, t = _(""), s = _(
888
- i.modelValue ?? i.default ?? []
886
+ popoverRef: b
887
+ } = c, t = _(""), a = _(
888
+ c.modelValue ?? c.default ?? []
889
889
  ), r = _(0);
890
- function c() {
891
- const k = H.getRangeFromDaysBefore(r.value);
892
- return s.value = [...k], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value), k;
890
+ function u() {
891
+ const g = Y.getRangeFromDaysBefore(r.value);
892
+ return a.value = [...g], o("change", { name: c.name, value: a.value }), o("update:modelValue", a.value), g;
893
893
  }
894
- function m(k) {
895
- t.value = k, v.value?.close();
896
- const y = [];
894
+ function p(g) {
895
+ t.value = g, b.value?.close();
896
+ const l = [];
897
897
  switch (t.value) {
898
898
  case "today":
899
- y.push(H.getShiftedDay()), y.push(H.getShiftedDay());
899
+ l.push(Y.getShiftedDay()), l.push(Y.getShiftedDay());
900
900
  break;
901
901
  case "week":
902
- y.push(...H.getLastWeekRange());
902
+ l.push(...Y.getLastWeekRange());
903
903
  break;
904
904
  case "month":
905
- y.push(...H.getMonthRange());
905
+ l.push(...Y.getMonthRange());
906
906
  break;
907
907
  case "quarter":
908
- y.push(...H.getQuarterRange());
908
+ l.push(...Y.getQuarterRange());
909
909
  break;
910
910
  case "year":
911
- y.push(...H.getYearRange());
911
+ l.push(...Y.getYearRange());
912
912
  break;
913
913
  case "last_7_days":
914
- r.value = 7, c();
914
+ r.value = 7, u();
915
915
  break;
916
916
  case "range":
917
- r.value = 7, y.push(...c());
917
+ r.value = 7, l.push(...u());
918
918
  break;
919
919
  }
920
- s.value = [...y], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value);
920
+ a.value = [...l], o("change", { name: c.name, value: a.value }), o("update:modelValue", a.value);
921
921
  }
922
- function d() {
923
- const k = [];
922
+ function m() {
923
+ const g = [];
924
924
  switch (t.value) {
925
925
  case "today":
926
- k.push(H.getShiftedDay(s.value[0], 1));
926
+ g.push(Y.getShiftedDay(a.value[0], 1));
927
927
  break;
928
928
  case "week":
929
- k.push(...H.getLastWeekRange(s.value[0], s.value[1], 1));
929
+ g.push(...Y.getLastWeekRange(a.value[0], a.value[1], 1));
930
930
  break;
931
931
  case "month":
932
- k.push(...H.getMonthRange(s.value[0], s.value[1], 1));
932
+ g.push(...Y.getMonthRange(a.value[0], a.value[1], 1));
933
933
  break;
934
934
  case "quarter":
935
- k.push(...H.getQuarterRange(s.value[0], s.value[1], 1));
935
+ g.push(...Y.getQuarterRange(a.value[0], a.value[1], 1));
936
936
  break;
937
937
  case "year":
938
- k.push(...H.getYearRange(s.value[0], 1));
938
+ g.push(...Y.getYearRange(a.value[0], 1));
939
939
  break;
940
940
  }
941
- s.value = [...k], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value);
941
+ a.value = [...g], o("change", { name: c.name, value: a.value }), o("update:modelValue", a.value);
942
942
  }
943
- function x() {
944
- const k = [];
943
+ function h() {
944
+ const g = [];
945
945
  switch (t.value) {
946
946
  case "today":
947
- k.push(H.getShiftedDay(s.value[0], -1));
947
+ g.push(Y.getShiftedDay(a.value[0], -1));
948
948
  break;
949
949
  case "week":
950
- k.push(...H.getLastWeekRange(s.value[0], s.value[1], -1));
950
+ g.push(...Y.getLastWeekRange(a.value[0], a.value[1], -1));
951
951
  break;
952
952
  case "month":
953
- k.push(...H.getMonthRange(s.value[0], s.value[1], -1));
953
+ g.push(...Y.getMonthRange(a.value[0], a.value[1], -1));
954
954
  break;
955
955
  case "quarter":
956
- k.push(...H.getQuarterRange(s.value[0], s.value[1], -1));
956
+ g.push(...Y.getQuarterRange(a.value[0], a.value[1], -1));
957
957
  break;
958
958
  case "year":
959
- k.push(...H.getYearRange(s.value[0], -1));
959
+ g.push(...Y.getYearRange(a.value[0], -1));
960
960
  break;
961
961
  }
962
- s.value = [...k], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value);
962
+ a.value = [...g], o("change", { name: c.name, value: a.value }), o("update:modelValue", a.value);
963
963
  }
964
- const p = [
964
+ const i = [
965
965
  "Січень",
966
966
  "Лютий",
967
967
  "Березень",
@@ -975,75 +975,75 @@ function Fe(i, a) {
975
975
  "Листопад",
976
976
  "Грудень"
977
977
  ];
978
- function n(k) {
979
- const [y, $, C] = k.split("-");
980
- return `${C}.${$}.${y}`;
978
+ function s(g) {
979
+ const [l, V, C] = g.split("-");
980
+ return `${C}.${V}.${l}`;
981
981
  }
982
- function o(k) {
983
- const { value: y } = s;
984
- switch (k) {
982
+ function v(g) {
983
+ const { value: l } = a;
984
+ switch (g) {
985
985
  case "today":
986
- return n(y[0]);
986
+ return s(l[0]);
987
987
  case "range":
988
988
  return "Період";
989
989
  case "week":
990
- return y[0] && y[1] ? `${n(y[0])} – ${n(y[1])}` : "";
990
+ return l[0] && l[1] ? `${s(l[0])} – ${s(l[1])}` : "";
991
991
  case "quarter":
992
- if (y[0]) {
993
- const $ = new Date(y[0]), C = $.getFullYear(), l = $.getMonth();
994
- return `${Math.floor(l / 3) + 1} квартал ${C}`;
992
+ if (l[0]) {
993
+ const V = new Date(l[0]), C = V.getFullYear(), n = V.getMonth();
994
+ return `${Math.floor(n / 3) + 1} квартал ${C}`;
995
995
  }
996
996
  return "";
997
997
  case "month":
998
- if (y[0]) {
999
- const [$, C] = y[0].split("-");
1000
- return `${p[parseInt(C, 10) - 1]} ${$}`;
998
+ if (l[0]) {
999
+ const [V, C] = l[0].split("-");
1000
+ return `${i[parseInt(C, 10) - 1]} ${V}`;
1001
1001
  }
1002
1002
  return "";
1003
1003
  case "year":
1004
- return y[0] || "";
1004
+ return l[0] || "";
1005
1005
  case "last_7_days":
1006
1006
  return "За останні дні";
1007
1007
  default:
1008
- return i.label ?? "";
1008
+ return c.label ?? "";
1009
1009
  }
1010
1010
  }
1011
- const h = I(() => t.value ? o(t.value) : i.label ?? "");
1012
- function g() {
1013
- t.value = "", s.value = [], a("update:modelValue", []), a("clear", i.name);
1011
+ const w = I(() => t.value ? v(t.value) : c.label ?? "");
1012
+ function y() {
1013
+ t.value = "", a.value = [], o("update:modelValue", []), o("clear", c.name);
1014
1014
  }
1015
1015
  return {
1016
1016
  activeMode: t,
1017
- innerValue: s,
1017
+ innerValue: a,
1018
1018
  daysBefore: r,
1019
- onDaysBeforeChange: c,
1020
- onSelectChange: m,
1021
- nextClick: d,
1022
- prevClick: x,
1023
- ukMonths: p,
1024
- formatDisplayDate: n,
1025
- getModeLabel: o,
1026
- currentLabel: h,
1027
- clear: g
1019
+ onDaysBeforeChange: u,
1020
+ onSelectChange: p,
1021
+ nextClick: m,
1022
+ prevClick: h,
1023
+ ukMonths: i,
1024
+ formatDisplayDate: s,
1025
+ getModeLabel: v,
1026
+ currentLabel: w,
1027
+ clear: y
1028
1028
  };
1029
1029
  }
1030
- const Kt = {
1030
+ const Ft = {
1031
1031
  key: 0,
1032
1032
  class: "relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"
1033
- }, Ft = {
1033
+ }, Kt = {
1034
1034
  key: 0,
1035
1035
  class: "flex gap-1 !w-[75%] rounded-lg"
1036
1036
  }, jt = ["max", "disabled"], Lt = ["min", "disabled"], Et = {
1037
1037
  key: 0,
1038
1038
  class: "block text-xs font-medium text-gray-600 mb-1"
1039
- }, It = ["max", "disabled"], Tt = {
1039
+ }, Tt = ["max", "disabled"], It = {
1040
1040
  key: 0,
1041
1041
  class: "block text-xs font-medium text-gray-600 mb-1"
1042
1042
  }, Ot = {
1043
1043
  key: 0,
1044
1044
  class: "block text-xs font-medium text-gray-600 mb-1"
1045
1045
  }, Ut = ["min", "disabled"], zt = { class: "flex gap-1 pt-2" }, Nt = ["onClick"];
1046
- const Ht = /* @__PURE__ */ O({
1046
+ const Ht = /* @__PURE__ */ U({
1047
1047
  __name: "date-input",
1048
1048
  props: {
1049
1049
  id: {},
@@ -1069,219 +1069,219 @@ const Ht = /* @__PURE__ */ O({
1069
1069
  sort: {}
1070
1070
  },
1071
1071
  emits: ["update:modelValue", "change", "clear"],
1072
- setup(i, { expose: a, emit: v }) {
1073
- const t = i, s = Me(), r = xt(), c = v, m = _(null), {
1074
- activeMode: d,
1075
- innerValue: x,
1076
- onSelectChange: p,
1077
- nextClick: n,
1078
- prevClick: o,
1079
- clear: h
1080
- } = Fe({
1072
+ setup(c, { expose: o, emit: b }) {
1073
+ const t = c, a = Me(), r = xt(), u = b, p = _(null), {
1074
+ activeMode: m,
1075
+ innerValue: h,
1076
+ onSelectChange: i,
1077
+ nextClick: s,
1078
+ prevClick: v,
1079
+ clear: w
1080
+ } = Ke({
1081
1081
  ...t,
1082
- popoverRef: m
1083
- }, c);
1084
- return M(() => t.modelValue, (g) => {
1085
- g !== void 0 ? (x.value = g, c("update:modelValue", g)) : (d.value = "", x.value = []);
1086
- }), a({
1087
- clear: h,
1088
- popoverRef: m
1089
- }), (g, k) => (f(), w(R, null, [
1090
- g.layout === "inline" ? (f(), w("div", Kt, [
1091
- e(d) !== "" && e(d) === "range" ? (f(), w("div", Ft, [
1092
- T(u("input", {
1082
+ popoverRef: p
1083
+ }, u);
1084
+ return F(() => t.modelValue, (y) => {
1085
+ y !== void 0 ? (h.value = y, u("update:modelValue", y)) : (m.value = "", h.value = []);
1086
+ }), o({
1087
+ clear: w,
1088
+ popoverRef: p
1089
+ }), (y, g) => (f(), k(M, null, [
1090
+ y.layout === "inline" ? (f(), k("div", Ft, [
1091
+ e(m) !== "" && e(m) === "range" ? (f(), k("div", Kt, [
1092
+ O(d("input", {
1093
1093
  type: "date",
1094
- max: e(x)[1],
1094
+ max: e(h)[1],
1095
1095
  locale: "uk-UA",
1096
- "onUpdate:modelValue": k[0] || (k[0] = (y) => e(x)[0] = y),
1096
+ "onUpdate:modelValue": g[0] || (g[0] = (l) => e(h)[0] = l),
1097
1097
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
1098
- disabled: g.disabled
1098
+ disabled: y.disabled
1099
1099
  }, null, 8, jt), [
1100
- [G, e(x)[0]]
1100
+ [G, e(h)[0]]
1101
1101
  ]),
1102
- T(u("input", {
1102
+ O(d("input", {
1103
1103
  type: "date",
1104
- min: e(x)[0],
1104
+ min: e(h)[0],
1105
1105
  locale: "uk-UA",
1106
- "onUpdate:modelValue": k[1] || (k[1] = (y) => e(x)[1] = y),
1106
+ "onUpdate:modelValue": g[1] || (g[1] = (l) => e(h)[1] = l),
1107
1107
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
1108
- disabled: g.disabled
1108
+ disabled: y.disabled
1109
1109
  }, null, 8, Lt), [
1110
- [G, e(x)[1]]
1110
+ [G, e(h)[1]]
1111
1111
  ])
1112
- ])) : V("", !0)
1113
- ])) : V("", !0),
1114
- u("div", {
1115
- class: D(g.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1112
+ ])) : $("", !0)
1113
+ ])) : $("", !0),
1114
+ d("div", {
1115
+ class: R(y.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1116
1116
  }, [
1117
- u("div", {
1118
- class: D(g.layout !== "popover" ? "w-[48%]" : "")
1117
+ d("div", {
1118
+ class: R(y.layout !== "popover" ? "w-[48%]" : "")
1119
1119
  }, [
1120
- g.layout === "popover" ? (f(), w("label", Et, "Від")) : V("", !0),
1121
- T(u("input", {
1120
+ y.layout === "popover" ? (f(), k("label", Et, "Від")) : $("", !0),
1121
+ O(d("input", {
1122
1122
  type: "date",
1123
- max: e(x)[1],
1123
+ max: e(h)[1],
1124
1124
  locale: "uk-UA",
1125
- "onUpdate:modelValue": k[2] || (k[2] = (y) => e(x)[0] = y),
1126
- class: D(e(s)),
1127
- disabled: g.disabled
1128
- }, null, 10, It), [
1129
- [G, e(x)[0]]
1125
+ "onUpdate:modelValue": g[2] || (g[2] = (l) => e(h)[0] = l),
1126
+ class: R(e(a)),
1127
+ disabled: y.disabled
1128
+ }, null, 10, Tt), [
1129
+ [G, e(h)[0]]
1130
1130
  ])
1131
1131
  ], 2),
1132
- g.layout !== "popover" ? (f(), w("label", Tt, " - ")) : V("", !0),
1133
- u("div", {
1134
- class: D(g.layout !== "popover" ? "w-[48%]" : "")
1132
+ y.layout !== "popover" ? (f(), k("label", It, " - ")) : $("", !0),
1133
+ d("div", {
1134
+ class: R(y.layout !== "popover" ? "w-[48%]" : "")
1135
1135
  }, [
1136
- g.layout === "popover" ? (f(), w("label", Ot, "До")) : V("", !0),
1137
- T(u("input", {
1136
+ y.layout === "popover" ? (f(), k("label", Ot, "До")) : $("", !0),
1137
+ O(d("input", {
1138
1138
  type: "date",
1139
- min: e(x)[0],
1139
+ min: e(h)[0],
1140
1140
  locale: "uk-UA",
1141
- "onUpdate:modelValue": k[3] || (k[3] = (y) => e(x)[1] = y),
1142
- class: D(e(s)),
1143
- disabled: g.disabled
1141
+ "onUpdate:modelValue": g[3] || (g[3] = (l) => e(h)[1] = l),
1142
+ class: R(e(a)),
1143
+ disabled: y.disabled
1144
1144
  }, null, 10, Ut), [
1145
- [G, e(x)[1]]
1145
+ [G, e(h)[1]]
1146
1146
  ])
1147
1147
  ], 2)
1148
1148
  ], 2),
1149
- u("div", zt, [
1150
- (f(), w(R, null, W(["today", "week", "month", "quarter", "year"], (y) => u("button", {
1151
- key: y,
1152
- class: D(e(r) + (e(d) === y ? " bg-blue-100" : "")),
1153
- onClick: ($) => e(p)(y)
1154
- }, F(e(Mt)(y)), 11, Nt)), 64)),
1155
- u("button", {
1156
- class: D(e(r)),
1157
- onClick: k[4] || (k[4] = //@ts-ignore
1158
- (...y) => e(o) && e(o)(...y))
1149
+ d("div", zt, [
1150
+ (f(), k(M, null, W(["today", "week", "month", "quarter", "year"], (l) => d("button", {
1151
+ key: l,
1152
+ class: R(e(r) + (e(m) === l ? " bg-blue-100" : "")),
1153
+ onClick: (V) => e(i)(l)
1154
+ }, j(e(Mt)(l)), 11, Nt)), 64)),
1155
+ d("button", {
1156
+ class: R(e(r)),
1157
+ onClick: g[4] || (g[4] = //@ts-ignore
1158
+ (...l) => e(v) && e(v)(...l))
1159
1159
  }, " <", 2),
1160
- u("button", {
1161
- class: D(e(r)),
1162
- onClick: k[5] || (k[5] = //@ts-ignore
1163
- (...y) => e(n) && e(n)(...y))
1160
+ d("button", {
1161
+ class: R(e(r)),
1162
+ onClick: g[5] || (g[5] = //@ts-ignore
1163
+ (...l) => e(s) && e(s)(...l))
1164
1164
  }, " >", 2)
1165
1165
  ]),
1166
- (g.cleanable, V("", !0))
1166
+ (y.cleanable, $("", !0))
1167
1167
  ], 64));
1168
1168
  }
1169
1169
  });
1170
- function Yt(i, a) {
1170
+ function Yt(c, o) {
1171
1171
  const {
1172
- api: v,
1172
+ api: b,
1173
1173
  options: t = [],
1174
- limit: s = 20,
1174
+ limit: a = 20,
1175
1175
  dataKey: r = "data"
1176
- } = i, c = i.multi;
1177
- function m(B) {
1178
- return c ? Array.isArray(B) ? B : B ? [B] : [] : Array.isArray(B) ? B[0] : B;
1176
+ } = c, u = c.multi;
1177
+ function p(A) {
1178
+ return u ? Array.isArray(A) ? A : A ? [A] : [] : Array.isArray(A) ? A[0] : A;
1179
1179
  }
1180
- const d = _(m(i.modelValue)), x = _(""), p = _(!1), n = _([]), o = _("id"), h = _("text"), g = _(!1), k = _(i.layout !== "popover" && t.length > s), y = _([]), $ = _(0);
1181
- function C(B) {
1182
- const U = B.find(Boolean) ?? {}, q = ["id", "value", "code", "key"].find((ne) => ne in U) ?? "id", se = ["text", "label", "name", "title"].find((ne) => ne in U) ?? "text";
1180
+ const m = _(p(c.modelValue)), h = _(""), i = _(!1), s = _([]), v = _("id"), w = _("text"), y = _(!1), g = _(c.layout !== "popover" && t.length > a), l = _([]), V = _(0);
1181
+ function C(A) {
1182
+ const z = A.find(Boolean) ?? {}, q = ["id", "value", "code", "key"].find((oe) => oe in z) ?? "id", se = ["text", "label", "name", "title"].find((oe) => oe in z) ?? "text";
1183
1183
  return { autoValueKey: q, autoLabelKey: se };
1184
1184
  }
1185
1185
  if (t.length > 0) {
1186
- const B = C(t);
1187
- o.value = B.autoValueKey, h.value = B.autoLabelKey;
1188
- }
1189
- const l = I(() => {
1190
- if (v) return n.value;
1191
- const B = n.value;
1192
- if (i.layout === "popover") return B;
1193
- if (!x.value)
1194
- return g.value ? B : B.slice(0, s);
1195
- const U = x.value.toLowerCase();
1196
- return B.filter((q) => q[h.value].toLowerCase().includes(U));
1186
+ const A = C(t);
1187
+ v.value = A.autoValueKey, w.value = A.autoLabelKey;
1188
+ }
1189
+ const n = I(() => {
1190
+ if (b) return s.value;
1191
+ const A = s.value;
1192
+ if (c.layout === "popover") return A;
1193
+ if (!h.value)
1194
+ return y.value ? A : A.slice(0, a);
1195
+ const z = h.value.toLowerCase();
1196
+ return A.filter((q) => q[w.value].toLowerCase().includes(z));
1197
1197
  });
1198
- let b = null;
1199
- async function K(B) {
1200
- if (v) {
1201
- p.value = !0;
1198
+ let x = null;
1199
+ async function B(A) {
1200
+ if (b) {
1201
+ i.value = !0;
1202
1202
  try {
1203
- const U = new URL(v, window.location.origin);
1204
- U.searchParams.set("json", "1"), U.searchParams.set("key", B), U.searchParams.set("limit", s.toString());
1205
- const q = await fetch(U.toString());
1203
+ const z = new URL(b, window.location.origin);
1204
+ z.searchParams.set("json", "1"), z.searchParams.set("key", A), z.searchParams.set("limit", a.toString());
1205
+ const q = await fetch(z.toString());
1206
1206
  if (!q.ok)
1207
1207
  throw new Error(`HTTP error! status: ${q.status}`);
1208
1208
  const se = await q.json();
1209
- if (n.value = se[r], n.value.length > 0) {
1210
- const ne = C(n.value);
1211
- o.value = ne.autoValueKey, h.value = ne.autoLabelKey;
1209
+ if (s.value = se[r], s.value.length > 0) {
1210
+ const oe = C(s.value);
1211
+ v.value = oe.autoValueKey, w.value = oe.autoLabelKey;
1212
1212
  }
1213
- $.value = se.total;
1214
- } catch (U) {
1215
- console.error("Failed to fetch remote options:", U);
1213
+ V.value = se.total;
1214
+ } catch (z) {
1215
+ console.error("Failed to fetch remote options:", z);
1216
1216
  } finally {
1217
- p.value = !1;
1217
+ i.value = !1;
1218
1218
  }
1219
1219
  }
1220
1220
  }
1221
- M(x, (B) => {
1222
- v && (b && clearTimeout(b), b = setTimeout(() => {
1223
- K(B);
1221
+ F(h, (A) => {
1222
+ b && (x && clearTimeout(x), x = setTimeout(() => {
1223
+ B(A);
1224
1224
  }, 200));
1225
- }), M(() => i.modelValue, (B) => {
1226
- d.value = m(B);
1227
- }, { immediate: !0 }), v ? K("") : n.value = t;
1228
- function A(B) {
1229
- return c && Array.isArray(d.value) ? d.value.includes(B[o.value]) : d.value && d.value === B[o.value];
1230
- }
1231
- function Y(B) {
1232
- if (c && !Array.isArray(d.value) && (d.value = []), c && Array.isArray(d.value)) {
1233
- const U = d.value.includes(B[o.value]);
1234
- d.value = U ? d.value.filter((q) => q !== B[o.value]) : [...d.value, B[o.value]], y.value = U ? y.value.filter((q) => q !== B[h.value]) : [...y.value, B[h.value]];
1225
+ }), F(() => c.modelValue, (A) => {
1226
+ m.value = p(A);
1227
+ }, { immediate: !0 }), b ? B("") : s.value = t;
1228
+ function S(A) {
1229
+ return u && Array.isArray(m.value) ? m.value.includes(A[v.value]) : m.value && m.value === A[v.value];
1230
+ }
1231
+ function K(A) {
1232
+ if (u && !Array.isArray(m.value) && (m.value = []), u && Array.isArray(m.value)) {
1233
+ const z = m.value.includes(A[v.value]);
1234
+ m.value = z ? m.value.filter((q) => q !== A[v.value]) : [...m.value, A[v.value]], l.value = z ? l.value.filter((q) => q !== A[w.value]) : [...l.value, A[w.value]];
1235
1235
  } else
1236
- d.value = B[o.value], y.value = B[h.value];
1237
- a("update:modelValue", d.value), a("change", { name: i.name, value: d.value });
1236
+ m.value = A[v.value], l.value = A[w.value];
1237
+ o("update:modelValue", m.value), o("change", { name: c.name, value: m.value });
1238
1238
  }
1239
- function L() {
1240
- c ? (d.value = [], y.value = []) : (d.value = void 0, y.value = []), a("update:modelValue", d.value), a("clear", i.name);
1239
+ function E() {
1240
+ u ? (m.value = [], l.value = []) : (m.value = void 0, l.value = []), o("update:modelValue", m.value), o("clear", c.name);
1241
1241
  }
1242
- function j() {
1243
- b && clearTimeout(b), x.value = "", g.value = !1;
1242
+ function L() {
1243
+ x && clearTimeout(x), h.value = "", y.value = !1;
1244
1244
  }
1245
- function E() {
1246
- g.value = !g.value;
1245
+ function T() {
1246
+ y.value = !y.value;
1247
1247
  }
1248
1248
  ce(() => {
1249
- b && clearTimeout(b);
1249
+ x && clearTimeout(x);
1250
1250
  });
1251
1251
  const Q = _(-1);
1252
- M(l, () => {
1253
- Q.value = l.value.length > 0 ? 0 : -1;
1252
+ F(n, () => {
1253
+ Q.value = n.value.length > 0 ? 0 : -1;
1254
1254
  });
1255
- function re(B) {
1256
- const U = l.value.length;
1257
- if (B.key === "ArrowDown")
1258
- B.preventDefault(), Q.value = (Q.value + 1) % U;
1259
- else if (B.key === "ArrowUp")
1260
- B.preventDefault(), Q.value = (Q.value - 1 + U) % U;
1261
- else if (B.key === "Enter" && (B.preventDefault(), Q.value >= 0 && Q.value < l.value.length)) {
1262
- const q = l.value[Q.value];
1263
- Y(q);
1255
+ function re(A) {
1256
+ const z = n.value.length;
1257
+ if (A.key === "ArrowDown")
1258
+ A.preventDefault(), Q.value = (Q.value + 1) % z;
1259
+ else if (A.key === "ArrowUp")
1260
+ A.preventDefault(), Q.value = (Q.value - 1 + z) % z;
1261
+ else if (A.key === "Enter" && (A.preventDefault(), Q.value >= 0 && Q.value < n.value.length)) {
1262
+ const q = n.value[Q.value];
1263
+ K(q);
1264
1264
  }
1265
1265
  }
1266
1266
  return {
1267
- innerValue: d,
1268
- searchTerm: x,
1269
- filteredOptions: l,
1270
- isSelected: A,
1271
- selectItem: Y,
1272
- clear: L,
1273
- resetSearch: j,
1274
- toggleShowAll: E,
1275
- isReqProc: p,
1276
- showAll: g,
1277
- isEnableShowAll: k,
1278
- labelKey: h,
1279
- valueKey: o,
1280
- allOptions: n,
1267
+ innerValue: m,
1268
+ searchTerm: h,
1269
+ filteredOptions: n,
1270
+ isSelected: S,
1271
+ selectItem: K,
1272
+ clear: E,
1273
+ resetSearch: L,
1274
+ toggleShowAll: T,
1275
+ isReqProc: i,
1276
+ showAll: y,
1277
+ isEnableShowAll: g,
1278
+ labelKey: w,
1279
+ valueKey: v,
1280
+ allOptions: s,
1281
1281
  highlightedIndex: Q,
1282
1282
  onKeyDown: re,
1283
- selectedLabels: y,
1284
- totalCount: $
1283
+ selectedLabels: l,
1284
+ totalCount: V
1285
1285
  };
1286
1286
  }
1287
1287
  const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, Wt = {
@@ -1293,7 +1293,7 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1293
1293
  }, Gt = {
1294
1294
  key: 1,
1295
1295
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1296
- }, Xt = /* @__PURE__ */ O({
1296
+ }, Xt = /* @__PURE__ */ U({
1297
1297
  __name: "select",
1298
1298
  props: {
1299
1299
  id: {},
@@ -1319,142 +1319,142 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1319
1319
  sort: {}
1320
1320
  },
1321
1321
  emits: ["update:modelValue", "change", "clear"],
1322
- setup(i, { expose: a, emit: v }) {
1323
- const t = i, s = v, r = _(null), {
1324
- innerValue: c,
1325
- filteredOptions: m,
1326
- isSelected: d,
1327
- selectItem: x,
1328
- clear: p,
1329
- resetSearch: n,
1330
- toggleShowAll: o,
1331
- isReqProc: h,
1332
- showAll: g,
1333
- isEnableShowAll: k,
1334
- searchTerm: y,
1335
- labelKey: $,
1322
+ setup(c, { expose: o, emit: b }) {
1323
+ const t = c, a = b, r = _(null), {
1324
+ innerValue: u,
1325
+ filteredOptions: p,
1326
+ isSelected: m,
1327
+ selectItem: h,
1328
+ clear: i,
1329
+ resetSearch: s,
1330
+ toggleShowAll: v,
1331
+ isReqProc: w,
1332
+ showAll: y,
1333
+ isEnableShowAll: g,
1334
+ searchTerm: l,
1335
+ labelKey: V,
1336
1336
  valueKey: C,
1337
- highlightedIndex: l,
1338
- onKeyDown: b,
1339
- selectedLabels: K,
1340
- totalCount: A
1337
+ highlightedIndex: n,
1338
+ onKeyDown: x,
1339
+ selectedLabels: B,
1340
+ totalCount: S
1341
1341
  } = Yt({
1342
1342
  ...t,
1343
1343
  modelValue: t.modelValue
1344
- }, s);
1344
+ }, a);
1345
1345
  ae(() => {
1346
- n();
1347
- }), M(
1346
+ s();
1347
+ }), F(
1348
1348
  () => t.modelValue,
1349
- (L) => {
1350
- L === void 0 && (t.multi ? c.value = [] : c.value = void 0);
1349
+ (E) => {
1350
+ E === void 0 && (t.multi ? u.value = [] : u.value = void 0);
1351
1351
  }
1352
1352
  );
1353
- const Y = _([]);
1354
- return M(l, (L) => {
1355
- L >= 0 && Y.value[L] && Y.value[L]?.scrollIntoView({
1353
+ const K = _([]);
1354
+ return F(n, (E) => {
1355
+ E >= 0 && K.value[E] && K.value[E]?.scrollIntoView({
1356
1356
  block: "nearest",
1357
1357
  behavior: "smooth"
1358
1358
  });
1359
- }), M(m, () => {
1360
- Y.value = [];
1361
- }), a({
1362
- clear: p,
1359
+ }), F(p, () => {
1360
+ K.value = [];
1361
+ }), o({
1362
+ clear: i,
1363
1363
  inputTextRef: r,
1364
- selectedLabels: K
1365
- }), (L, j) => (f(), w("div", {
1366
- class: D([L.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1364
+ selectedLabels: B
1365
+ }), (E, L) => (f(), k("div", {
1366
+ class: R([E.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1367
1367
  }, [
1368
- u("div", Pt, [
1369
- T(u("input", {
1370
- "onUpdate:modelValue": j[0] || (j[0] = (E) => Ee(y) ? y.value = E : null),
1371
- onKeydown: j[1] || (j[1] = //@ts-ignore
1372
- (...E) => e(b) && e(b)(...E)),
1368
+ d("div", Pt, [
1369
+ O(d("input", {
1370
+ "onUpdate:modelValue": L[0] || (L[0] = (T) => Ee(l) ? l.value = T : null),
1371
+ onKeydown: L[1] || (L[1] = //@ts-ignore
1372
+ (...T) => e(x) && e(x)(...T)),
1373
1373
  class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
1374
1374
  placeholder: "Пошук",
1375
1375
  type: "text",
1376
1376
  ref_key: "inputTextRef",
1377
1377
  ref: r
1378
1378
  }, null, 544), [
1379
- [G, e(y)]
1379
+ [G, e(l)]
1380
1380
  ]),
1381
- N(De, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
1382
- N(Re, {
1383
- onClick: j[2] || (j[2] = (E) => y.value = ""),
1381
+ H(De, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
1382
+ H(Re, {
1383
+ onClick: L[2] || (L[2] = (T) => l.value = ""),
1384
1384
  class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
1385
1385
  })
1386
1386
  ]),
1387
- u("div", {
1388
- class: D([
1389
- L.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
1390
- L.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
1387
+ d("div", {
1388
+ class: R([
1389
+ E.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
1390
+ E.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
1391
1391
  ])
1392
1392
  }, [
1393
- (f(!0), w(R, null, W(e(m), (E, Q) => (f(), S(me, {
1394
- layout: L.layout,
1395
- count: E.count,
1396
- label: E[e($)],
1397
- color: E.color,
1398
- type: L.multi ? "checkbox" : "radio",
1399
- value: E[e(C)],
1400
- "is-selected": e(d)(E),
1401
- highlighted: Q === e(l),
1402
- onItemClick: (re) => e(x)(E),
1393
+ (f(!0), k(M, null, W(e(p), (T, Q) => (f(), D(me, {
1394
+ layout: E.layout,
1395
+ count: T.count,
1396
+ label: T[e(V)],
1397
+ color: T.color,
1398
+ type: E.multi ? "checkbox" : "radio",
1399
+ value: T[e(C)],
1400
+ "is-selected": e(m)(T),
1401
+ highlighted: Q === e(n),
1402
+ onItemClick: (re) => e(h)(T),
1403
1403
  ref_for: !0,
1404
- ref: (re) => Y.value[Q] = re?.el
1404
+ ref: (re) => K.value[Q] = re?.el
1405
1405
  }, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
1406
1406
  ], 2),
1407
- L.type === "select" && e(m).length === 0 && !e(h) ? (f(), w("div", Wt, [
1408
- u("div", qt, [
1409
- N(ve),
1410
- j[7] || (j[7] = u("div", { class: "max-w-sm mx-auto mt-6" }, [
1411
- u("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
1412
- u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
1407
+ E.type === "select" && e(p).length === 0 && !e(w) ? (f(), k("div", Wt, [
1408
+ d("div", qt, [
1409
+ H(ve),
1410
+ L[7] || (L[7] = d("div", { class: "max-w-sm mx-auto mt-6" }, [
1411
+ d("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
1412
+ d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
1413
1413
  ], -1))
1414
1414
  ])
1415
- ])) : V("", !0),
1416
- L.layout !== "popover" && L.type !== "select" ? (f(), w(R, { key: 1 }, [
1417
- !e(g) && e(k) ? (f(), w("div", {
1415
+ ])) : $("", !0),
1416
+ E.layout !== "popover" && E.type !== "select" ? (f(), k(M, { key: 1 }, [
1417
+ !e(y) && e(g) ? (f(), k("div", {
1418
1418
  key: 0,
1419
- onClick: j[3] || (j[3] = //@ts-ignore
1420
- (...E) => e(o) && e(o)(...E)),
1419
+ onClick: L[3] || (L[3] = //@ts-ignore
1420
+ (...T) => e(v) && e(v)(...T)),
1421
1421
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
1422
1422
  }, [
1423
- j[8] || (j[8] = z(" Показати більше ", -1)),
1424
- N(ie)
1425
- ])) : V("", !0),
1426
- e(g) ? (f(), w("div", {
1423
+ L[8] || (L[8] = N(" Показати більше ", -1)),
1424
+ H(ie)
1425
+ ])) : $("", !0),
1426
+ e(y) ? (f(), k("div", {
1427
1427
  key: 1,
1428
- onClick: j[4] || (j[4] = //@ts-ignore
1429
- (...E) => e(o) && e(o)(...E)),
1428
+ onClick: L[4] || (L[4] = //@ts-ignore
1429
+ (...T) => e(v) && e(v)(...T)),
1430
1430
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
1431
1431
  }, [
1432
- j[9] || (j[9] = z(" Показати менше ", -1)),
1433
- N(ye)
1434
- ])) : V("", !0)
1435
- ], 64)) : V("", !0),
1436
- L.cleanable ? (f(), w(R, { key: 2 }, [
1437
- L.layout === "inline" ? (f(), w("div", Qt, [
1438
- z(F(L.multi && Array.isArray(e(c)) ? e(c)?.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + F(e(A)) + " обрано ", 1),
1439
- T(u("button", {
1432
+ L[9] || (L[9] = N(" Показати менше ", -1)),
1433
+ H(ye)
1434
+ ])) : $("", !0)
1435
+ ], 64)) : $("", !0),
1436
+ E.cleanable ? (f(), k(M, { key: 2 }, [
1437
+ E.layout === "inline" ? (f(), k("div", Qt, [
1438
+ N(j(E.multi && Array.isArray(e(u)) ? e(u)?.length : e(u) !== void 0 && (e(u) || e(u) === null) ? 1 : 0) + " з " + j(e(S)) + " обрано ", 1),
1439
+ O(d("button", {
1440
1440
  class: "text-gray-600 hover:text-gray-800",
1441
- onClick: j[5] || (j[5] = //@ts-ignore
1442
- (...E) => e(p) && e(p)(...E))
1441
+ onClick: L[5] || (L[5] = //@ts-ignore
1442
+ (...T) => e(i) && e(i)(...T))
1443
1443
  }, " Очистити ", 512), [
1444
- [X, e(c) !== "" && e(c) !== void 0 || e(c)]
1444
+ [X, e(u) !== "" && e(u) !== void 0 || e(u)]
1445
1445
  ])
1446
- ])) : V("", !0),
1447
- L.layout === "popover" ? (f(), w("div", Gt, [
1448
- u("span", null, F(L.multi && Array.isArray(e(c)) ? e(c)?.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + F(e(A)) + " обрано", 1),
1449
- T(u("button", {
1446
+ ])) : $("", !0),
1447
+ E.layout === "popover" ? (f(), k("div", Gt, [
1448
+ d("span", null, j(E.multi && Array.isArray(e(u)) ? e(u)?.length : e(u) !== void 0 && (e(u) || e(u) === null) ? 1 : 0) + " з " + j(e(S)) + " обрано", 1),
1449
+ O(d("button", {
1450
1450
  class: "text-gray-600 hover:text-gray-800",
1451
- onClick: j[6] || (j[6] = //@ts-ignore
1452
- (...E) => e(p) && e(p)(...E))
1451
+ onClick: L[6] || (L[6] = //@ts-ignore
1452
+ (...T) => e(i) && e(i)(...T))
1453
1453
  }, " Очистити ", 512), [
1454
- [X, e(c) !== "" && e(c) !== void 0 || e(c)]
1454
+ [X, e(u) !== "" && e(u) !== void 0 || e(u)]
1455
1455
  ])
1456
- ])) : V("", !0)
1457
- ], 64)) : V("", !0)
1456
+ ])) : $("", !0)
1457
+ ], 64)) : $("", !0)
1458
1458
  ], 2));
1459
1459
  }
1460
1460
  }), Jt = ["for", "onClick"], Zt = ["id", "name", "value"], el = { class: "block" }, tl = {
@@ -1463,7 +1463,7 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1463
1463
  }, ll = {
1464
1464
  key: 1,
1465
1465
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1466
- }, ol = /* @__PURE__ */ O({
1466
+ }, ol = /* @__PURE__ */ U({
1467
1467
  __name: "tag-field",
1468
1468
  props: {
1469
1469
  id: {},
@@ -1489,71 +1489,71 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1489
1489
  sort: {}
1490
1490
  },
1491
1491
  emits: ["update:modelValue", "change", "clear"],
1492
- setup(i, { expose: a, emit: v }) {
1493
- const t = i, s = v, {
1492
+ setup(c, { expose: o, emit: b }) {
1493
+ const t = c, a = b, {
1494
1494
  innerValue: r,
1495
- isSelected: c,
1496
- selectItem: m,
1497
- clear: d,
1498
- labelKey: x,
1499
- valueKey: p,
1500
- allOptions: n
1495
+ isSelected: u,
1496
+ selectItem: p,
1497
+ clear: m,
1498
+ labelKey: h,
1499
+ valueKey: i,
1500
+ allOptions: s
1501
1501
  } = t.multi ? Se({
1502
1502
  ...t,
1503
1503
  modelValue: t.modelValue ?? t.default ?? []
1504
- }, s) : Be({
1504
+ }, a) : Be({
1505
1505
  ...t,
1506
1506
  modelValue: t.modelValue !== void 0 ? t.modelValue : t.default ?? ""
1507
- }, s);
1508
- return a({
1509
- clear: d
1510
- }), M(
1507
+ }, a);
1508
+ return o({
1509
+ clear: m
1510
+ }), F(
1511
1511
  () => t.modelValue,
1512
- (o) => {
1513
- o === void 0 && (t.multi ? r.value = [] : r.value = void 0);
1512
+ (v) => {
1513
+ v === void 0 && (t.multi ? r.value = [] : r.value = void 0);
1514
1514
  }
1515
- ), (o, h) => (f(), w(R, null, [
1516
- u("div", {
1517
- class: D(["grid grid-cols-3 gap-2 mx-[1px]", o.layout === "popover" ? "m-1" : "mb-1"])
1515
+ ), (v, w) => (f(), k(M, null, [
1516
+ d("div", {
1517
+ class: R(["grid grid-cols-3 gap-2 mx-[1px]", v.layout === "popover" ? "m-1" : "mb-1"])
1518
1518
  }, [
1519
- (f(!0), w(R, null, W(e(n), (g) => (f(), w("label", {
1520
- key: `item-${g[e(p)]}`,
1521
- for: `item-${g[e(p)]}`,
1522
- onClick: _e((k) => e(m)(g), ["stop", "prevent"]),
1523
- class: D([e(c)(g) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-lg dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
1519
+ (f(!0), k(M, null, W(e(s), (y) => (f(), k("label", {
1520
+ key: `item-${y[e(i)]}`,
1521
+ for: `item-${y[e(i)]}`,
1522
+ onClick: $e((g) => e(p)(y), ["stop", "prevent"]),
1523
+ class: R([e(u)(y) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-lg dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
1524
1524
  }, [
1525
- u("input", {
1525
+ d("input", {
1526
1526
  type: "checkbox",
1527
- id: `item-${g[e(p)]}`,
1527
+ id: `item-${y[e(i)]}`,
1528
1528
  class: "hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",
1529
- name: `item-${g[e(p)]}`,
1530
- value: g[e(p)]
1529
+ name: `item-${y[e(i)]}`,
1530
+ value: y[e(i)]
1531
1531
  }, null, 8, Zt),
1532
- u("span", el, F(g[e(x)]), 1)
1532
+ d("span", el, j(y[e(h)]), 1)
1533
1533
  ], 10, Jt))), 128))
1534
1534
  ], 2),
1535
- o.cleanable ? (f(), w(R, { key: 0 }, [
1536
- o.layout === "inline" ? (f(), w("div", tl, [
1537
- z(F(o.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + F(e(n).length) + " обрано ", 1),
1538
- T(u("button", {
1535
+ v.cleanable ? (f(), k(M, { key: 0 }, [
1536
+ v.layout === "inline" ? (f(), k("div", tl, [
1537
+ N(j(v.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + j(e(s).length) + " обрано ", 1),
1538
+ O(d("button", {
1539
1539
  class: "text-gray-600 hover:text-gray-800",
1540
- onClick: h[0] || (h[0] = //@ts-ignore
1541
- (...g) => e(d) && e(d)(...g))
1540
+ onClick: w[0] || (w[0] = //@ts-ignore
1541
+ (...y) => e(m) && e(m)(...y))
1542
1542
  }, " Очистити ", 512), [
1543
1543
  [X, e(r) !== "" && e(r) !== void 0 || e(r)]
1544
1544
  ])
1545
- ])) : V("", !0),
1546
- o.layout === "popover" ? (f(), w("div", ll, [
1547
- u("span", null, F(o.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + F(e(n).length) + " обрано", 1),
1548
- T(u("button", {
1545
+ ])) : $("", !0),
1546
+ v.layout === "popover" ? (f(), k("div", ll, [
1547
+ d("span", null, j(v.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + j(e(s).length) + " обрано", 1),
1548
+ O(d("button", {
1549
1549
  class: "text-gray-600 hover:text-gray-800",
1550
- onClick: h[1] || (h[1] = //@ts-ignore
1551
- (...g) => e(d) && e(d)(...g))
1550
+ onClick: w[1] || (w[1] = //@ts-ignore
1551
+ (...y) => e(m) && e(m)(...y))
1552
1552
  }, " Очистити ", 512), [
1553
1553
  [X, e(r) !== void 0 && e(r) !== "" || e(r)]
1554
1554
  ])
1555
- ])) : V("", !0)
1556
- ], 64)) : V("", !0)
1555
+ ])) : $("", !0)
1556
+ ], 64)) : $("", !0)
1557
1557
  ], 64));
1558
1558
  }
1559
1559
  }), nl = {}, al = {
@@ -1568,12 +1568,12 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1568
1568
  "stroke-linejoin": "round",
1569
1569
  class: "text-blue-600 w-[16px] h-[16px]"
1570
1570
  };
1571
- function rl(i, a) {
1572
- return f(), w("svg", al, a[0] || (a[0] = [
1573
- u("path", { d: "M20 6 9 17l-5-5" }, null, -1)
1571
+ function rl(c, o) {
1572
+ return f(), k("svg", al, o[0] || (o[0] = [
1573
+ d("path", { d: "M20 6 9 17l-5-5" }, null, -1)
1574
1574
  ]));
1575
1575
  }
1576
- const te = /* @__PURE__ */ J(nl, [["render", rl]]), sl = {}, ul = {
1576
+ const ee = /* @__PURE__ */ J(nl, [["render", rl]]), sl = {}, ul = {
1577
1577
  xmlns: "http://www.w3.org/2000/svg",
1578
1578
  width: "15px",
1579
1579
  height: "24",
@@ -1585,14 +1585,14 @@ const te = /* @__PURE__ */ J(nl, [["render", rl]]), sl = {}, ul = {
1585
1585
  "stroke-linejoin": "round",
1586
1586
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
1587
1587
  };
1588
- function il(i, a) {
1589
- return f(), w("svg", ul, a[0] || (a[0] = [
1590
- u("path", {
1588
+ function il(c, o) {
1589
+ return f(), k("svg", ul, o[0] || (o[0] = [
1590
+ d("path", {
1591
1591
  stroke: "none",
1592
1592
  d: "M0 0h24v24H0z",
1593
1593
  fill: "none"
1594
1594
  }, null, -1),
1595
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1595
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1596
1596
  ]));
1597
1597
  }
1598
1598
  const dl = /* @__PURE__ */ J(sl, [["render", il]]), cl = {}, fl = {
@@ -1607,21 +1607,21 @@ const dl = /* @__PURE__ */ J(sl, [["render", il]]), cl = {}, fl = {
1607
1607
  "stroke-linejoin": "round",
1608
1608
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
1609
1609
  };
1610
- function pl(i, a) {
1611
- return f(), w("svg", fl, a[0] || (a[0] = [
1612
- u("path", {
1610
+ function pl(c, o) {
1611
+ return f(), k("svg", fl, o[0] || (o[0] = [
1612
+ d("path", {
1613
1613
  stroke: "none",
1614
1614
  d: "M0 0h24v24H0z",
1615
1615
  fill: "none"
1616
1616
  }, null, -1),
1617
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1617
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1618
1618
  ]));
1619
1619
  }
1620
1620
  const ml = /* @__PURE__ */ J(cl, [["render", pl]]), vl = { class: "flex" }, yl = { class: "mb-1" }, gl = { class: "mb-1" }, bl = { class: "inline-flex rounded-lg shrink-0 pl-1" }, hl = { class: "inline-flex rounded-lg shrink-0 pl-1" }, xl = {
1621
1621
  key: 1,
1622
1622
  class: "flex gap-1 !w-[75%] rounded-lg"
1623
1623
  }, kl = ["max", "disabled"], wl = ["min", "disabled"];
1624
- const Cl = /* @__PURE__ */ O({
1624
+ const Cl = /* @__PURE__ */ U({
1625
1625
  __name: "date-input-inline",
1626
1626
  props: {
1627
1627
  id: {},
@@ -1647,161 +1647,161 @@ const Cl = /* @__PURE__ */ O({
1647
1647
  sort: {}
1648
1648
  },
1649
1649
  emits: ["update:modelValue", "change", "clear"],
1650
- setup(i, { expose: a, emit: v }) {
1651
- const t = i, s = v, r = _(null), {
1652
- activeMode: c,
1653
- innerValue: m,
1654
- onSelectChange: d,
1655
- nextClick: x,
1656
- prevClick: p,
1657
- currentLabel: n,
1658
- clear: o
1659
- } = Fe({
1650
+ setup(c, { expose: o, emit: b }) {
1651
+ const t = c, a = b, r = _(null), {
1652
+ activeMode: u,
1653
+ innerValue: p,
1654
+ onSelectChange: m,
1655
+ nextClick: h,
1656
+ prevClick: i,
1657
+ currentLabel: s,
1658
+ clear: v
1659
+ } = Ke({
1660
1660
  ...t,
1661
1661
  popoverRef: r
1662
- }, s);
1663
- return M(() => t.modelValue, (h) => {
1664
- h !== void 0 ? (m.value = h, s("update:modelValue", h)) : (c.value = "", m.value = []);
1665
- }), a({
1666
- clear: o,
1662
+ }, a);
1663
+ return F(() => t.modelValue, (w) => {
1664
+ w !== void 0 ? (p.value = w, a("update:modelValue", w)) : (u.value = "", p.value = []);
1665
+ }), o({
1666
+ clear: v,
1667
1667
  popoverRef: r
1668
- }), (h, g) => (f(), w(R, null, [
1669
- u("div", vl, [
1670
- N(ge, {
1668
+ }), (w, y) => (f(), k(M, null, [
1669
+ d("div", vl, [
1670
+ H(ge, {
1671
1671
  ref_key: "popoverRef",
1672
1672
  ref: r,
1673
- label: e(n),
1674
- "current-value": e(m),
1675
- mode: h.mode,
1676
- onClear: e(o),
1677
- layout: h.layout
1673
+ label: e(s),
1674
+ "current-value": e(p),
1675
+ mode: w.mode,
1676
+ onClear: e(v),
1677
+ layout: w.layout
1678
1678
  }, {
1679
- default: le(() => [
1680
- u("div", null, [
1681
- u("button", {
1679
+ default: te(() => [
1680
+ d("div", null, [
1681
+ d("button", {
1682
1682
  type: "button",
1683
- onClick: g[0] || (g[0] = (k) => e(d)("range")),
1683
+ onClick: y[0] || (y[0] = (g) => e(m)("range")),
1684
1684
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1685
1685
  }, [
1686
- g[12] || (g[12] = z(" Період ", -1)),
1687
- e(c) === "range" ? (f(), S(te, { key: 0 })) : V("", !0)
1686
+ y[12] || (y[12] = N(" Період ", -1)),
1687
+ e(u) === "range" ? (f(), D(ee, { key: 0 })) : $("", !0)
1688
1688
  ])
1689
1689
  ]),
1690
- g[19] || (g[19] = u("div", null, [
1691
- u("div", { class: "pt-1 mt-1 border-t" })
1690
+ y[19] || (y[19] = d("div", null, [
1691
+ d("div", { class: "pt-1 mt-1 border-t" })
1692
1692
  ], -1)),
1693
- u("div", null, [
1694
- u("button", {
1693
+ d("div", null, [
1694
+ d("button", {
1695
1695
  type: "button",
1696
- onClick: g[1] || (g[1] = (k) => e(d)("today")),
1696
+ onClick: y[1] || (y[1] = (g) => e(m)("today")),
1697
1697
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1698
1698
  }, [
1699
- g[13] || (g[13] = z(" Сьогодні ", -1)),
1700
- e(c) === "today" ? (f(), S(te, { key: 0 })) : V("", !0)
1699
+ y[13] || (y[13] = N(" Сьогодні ", -1)),
1700
+ e(u) === "today" ? (f(), D(ee, { key: 0 })) : $("", !0)
1701
1701
  ])
1702
1702
  ]),
1703
- u("div", null, [
1704
- u("button", {
1703
+ d("div", null, [
1704
+ d("button", {
1705
1705
  type: "button",
1706
- onClick: g[2] || (g[2] = (k) => e(d)("week")),
1706
+ onClick: y[2] || (y[2] = (g) => e(m)("week")),
1707
1707
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1708
1708
  }, [
1709
- g[14] || (g[14] = z(" Тиждень ", -1)),
1710
- e(c) === "week" ? (f(), S(te, { key: 0 })) : V("", !0)
1709
+ y[14] || (y[14] = N(" Тиждень ", -1)),
1710
+ e(u) === "week" ? (f(), D(ee, { key: 0 })) : $("", !0)
1711
1711
  ])
1712
1712
  ]),
1713
- u("div", null, [
1714
- u("button", {
1713
+ d("div", null, [
1714
+ d("button", {
1715
1715
  type: "button",
1716
- onClick: g[3] || (g[3] = (k) => e(d)("month")),
1716
+ onClick: y[3] || (y[3] = (g) => e(m)("month")),
1717
1717
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1718
1718
  }, [
1719
- g[15] || (g[15] = z(" Місяць ", -1)),
1720
- e(c) === "month" ? (f(), S(te, { key: 0 })) : V("", !0)
1719
+ y[15] || (y[15] = N(" Місяць ", -1)),
1720
+ e(u) === "month" ? (f(), D(ee, { key: 0 })) : $("", !0)
1721
1721
  ])
1722
1722
  ]),
1723
- u("div", null, [
1724
- u("button", {
1723
+ d("div", null, [
1724
+ d("button", {
1725
1725
  type: "button",
1726
- onClick: g[4] || (g[4] = (k) => e(d)("quarter")),
1726
+ onClick: y[4] || (y[4] = (g) => e(m)("quarter")),
1727
1727
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1728
1728
  }, [
1729
- g[16] || (g[16] = z(" Квартал ", -1)),
1730
- e(c) === "quarter" ? (f(), S(te, { key: 0 })) : V("", !0)
1729
+ y[16] || (y[16] = N(" Квартал ", -1)),
1730
+ e(u) === "quarter" ? (f(), D(ee, { key: 0 })) : $("", !0)
1731
1731
  ])
1732
1732
  ]),
1733
- u("div", yl, [
1734
- u("button", {
1733
+ d("div", yl, [
1734
+ d("button", {
1735
1735
  type: "button",
1736
- onClick: g[5] || (g[5] = (k) => e(d)("year")),
1736
+ onClick: y[5] || (y[5] = (g) => e(m)("year")),
1737
1737
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1738
1738
  }, [
1739
- g[17] || (g[17] = z(" Рік ", -1)),
1740
- e(c) === "year" ? (f(), S(te, { key: 0 })) : V("", !0)
1739
+ y[17] || (y[17] = N(" Рік ", -1)),
1740
+ e(u) === "year" ? (f(), D(ee, { key: 0 })) : $("", !0)
1741
1741
  ])
1742
1742
  ]),
1743
- u("div", gl, [
1744
- u("button", {
1743
+ d("div", gl, [
1744
+ d("button", {
1745
1745
  type: "button",
1746
- onClick: g[6] || (g[6] = (k) => e(o)()),
1746
+ onClick: y[6] || (y[6] = (g) => e(v)()),
1747
1747
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1748
1748
  }, [
1749
- g[18] || (g[18] = z(" Весь час ", -1)),
1750
- e(m)[0] ? V("", !0) : (f(), S(te, { key: 0 }))
1749
+ y[18] || (y[18] = N(" Весь час ", -1)),
1750
+ e(p)[0] ? $("", !0) : (f(), D(ee, { key: 0 }))
1751
1751
  ])
1752
1752
  ])
1753
1753
  ]),
1754
1754
  _: 1,
1755
1755
  __: [19]
1756
1756
  }, 8, ["label", "current-value", "mode", "onClear", "layout"]),
1757
- e(c) !== "" && e(c) !== "range" && e(c) !== "last_7_days" ? (f(), w(R, { key: 0 }, [
1758
- u("div", bl, [
1759
- u("button", {
1757
+ e(u) !== "" && e(u) !== "range" && e(u) !== "last_7_days" ? (f(), k(M, { key: 0 }, [
1758
+ d("div", bl, [
1759
+ d("button", {
1760
1760
  type: "button",
1761
1761
  title: "Попередній період",
1762
1762
  class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
1763
- onClick: g[7] || (g[7] = //@ts-ignore
1764
- (...k) => e(p) && e(p)(...k))
1763
+ onClick: y[7] || (y[7] = //@ts-ignore
1764
+ (...g) => e(i) && e(i)(...g))
1765
1765
  }, [
1766
- N(dl)
1766
+ H(dl)
1767
1767
  ])
1768
1768
  ]),
1769
- u("div", hl, [
1770
- u("button", {
1769
+ d("div", hl, [
1770
+ d("button", {
1771
1771
  type: "button",
1772
1772
  title: "Наступний період",
1773
1773
  class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
1774
- onClick: g[8] || (g[8] = //@ts-ignore
1775
- (...k) => e(x) && e(x)(...k))
1774
+ onClick: y[8] || (y[8] = //@ts-ignore
1775
+ (...g) => e(h) && e(h)(...g))
1776
1776
  }, [
1777
- N(ml)
1777
+ H(ml)
1778
1778
  ])
1779
1779
  ])
1780
- ], 64)) : V("", !0),
1781
- e(c) !== "" && e(c) === "range" ? (f(), w("div", xl, [
1782
- T(u("input", {
1780
+ ], 64)) : $("", !0),
1781
+ e(u) !== "" && e(u) === "range" ? (f(), k("div", xl, [
1782
+ O(d("input", {
1783
1783
  type: "date",
1784
- max: e(m)[1],
1784
+ max: e(p)[1],
1785
1785
  locale: "uk-UA",
1786
- "onUpdate:modelValue": g[9] || (g[9] = (k) => e(m)[0] = k),
1786
+ "onUpdate:modelValue": y[9] || (y[9] = (g) => e(p)[0] = g),
1787
1787
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
1788
- disabled: h.disabled
1788
+ disabled: w.disabled
1789
1789
  }, null, 8, kl), [
1790
- [G, e(m)[0]]
1790
+ [G, e(p)[0]]
1791
1791
  ]),
1792
- T(u("input", {
1792
+ O(d("input", {
1793
1793
  type: "date",
1794
- min: e(m)[0],
1794
+ min: e(p)[0],
1795
1795
  locale: "uk-UA",
1796
- "onUpdate:modelValue": g[10] || (g[10] = (k) => e(m)[1] = k),
1796
+ "onUpdate:modelValue": y[10] || (y[10] = (g) => e(p)[1] = g),
1797
1797
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
1798
- disabled: h.disabled
1798
+ disabled: w.disabled
1799
1799
  }, null, 8, wl), [
1800
- [G, e(m)[1]]
1800
+ [G, e(p)[1]]
1801
1801
  ])
1802
- ])) : V("", !0)
1802
+ ])) : $("", !0)
1803
1803
  ]),
1804
- (h.cleanable, V("", !0))
1804
+ (w.cleanable, $("", !0))
1805
1805
  ], 64));
1806
1806
  }
1807
1807
  }), ke = {
@@ -1815,24 +1815,24 @@ const Cl = /* @__PURE__ */ O({
1815
1815
  tag: ol,
1816
1816
  "date:inline": Cl
1817
1817
  };
1818
- function be(i, a) {
1819
- let v;
1820
- switch (i.toLowerCase()) {
1818
+ function be(c, o) {
1819
+ let b;
1820
+ switch (c.toLowerCase()) {
1821
1821
  case "autocomplete":
1822
- v = "select";
1822
+ b = "select";
1823
1823
  break;
1824
1824
  case "check":
1825
- v = "checkbox";
1825
+ b = "checkbox";
1826
1826
  break;
1827
1827
  default:
1828
- v = i?.toString().toLowerCase();
1828
+ b = c?.toString().toLowerCase();
1829
1829
  }
1830
- return v === "date" && a && a === "inline" && (v = "date:inline"), {
1831
- component: ke[v] || ke.text,
1832
- type: v
1830
+ return b === "date" && o && o === "inline" && (b = "date:inline"), {
1831
+ component: ke[b] || ke.text,
1832
+ type: b
1833
1833
  };
1834
1834
  }
1835
- const Vl = {}, _l = {
1835
+ const Vl = {}, $l = {
1836
1836
  xmlns: "http://www.w3.org/2000/svg",
1837
1837
  width: "15px",
1838
1838
  height: "24",
@@ -1844,18 +1844,18 @@ const Vl = {}, _l = {
1844
1844
  "stroke-linejoin": "round",
1845
1845
  class: "icon icon-tabler icons-tabler-outline icon-tabler-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"
1846
1846
  };
1847
- function $l(i, a) {
1848
- return f(), w("svg", _l, a[0] || (a[0] = [
1849
- u("path", {
1847
+ function _l(c, o) {
1848
+ return f(), k("svg", $l, o[0] || (o[0] = [
1849
+ d("path", {
1850
1850
  stroke: "none",
1851
1851
  d: "M0 0h24v24H0z",
1852
1852
  fill: "none"
1853
1853
  }, null, -1),
1854
- u("path", { d: "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747" }, null, -1),
1855
- u("path", { d: "M20 4v5h-5" }, null, -1)
1854
+ d("path", { d: "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747" }, null, -1),
1855
+ d("path", { d: "M20 4v5h-5" }, null, -1)
1856
1856
  ]));
1857
1857
  }
1858
- const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Sl = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, Dl = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, Rl = { class: "flex items-center" }, Ml = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, Kl = { class: "filter-layout__body" }, Fl = /* @__PURE__ */ O({
1858
+ const Al = /* @__PURE__ */ J(Vl, [["render", _l]]), Bl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Sl = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, Dl = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, Rl = { class: "flex items-center" }, Ml = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, Fl = { class: "filter-layout__body" }, Kl = /* @__PURE__ */ U({
1859
1859
  __name: "vertical-layout",
1860
1860
  props: {
1861
1861
  id: {},
@@ -1881,69 +1881,69 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
1881
1881
  sort: {}
1882
1882
  },
1883
1883
  emits: ["update:modelValue", "change", "clear"],
1884
- setup(i, { expose: a, emit: v }) {
1885
- const t = i, s = v, r = _(), c = be(t.type, t.layout), m = I({
1884
+ setup(c, { expose: o, emit: b }) {
1885
+ const t = c, a = b, r = _(), u = be(t.type, t.layout), p = I({
1886
1886
  get: () => t.modelValue,
1887
- set: (n) => s("update:modelValue", n)
1887
+ set: (s) => a("update:modelValue", s)
1888
1888
  });
1889
- function d(n) {
1890
- s("clear", n);
1889
+ function m(s) {
1890
+ a("clear", s);
1891
1891
  }
1892
- function x(n, o) {
1893
- s("change", { name: n, value: o }), t.modelValue !== void 0 && s("update:modelValue", o);
1892
+ function h(s, v) {
1893
+ a("change", { name: s, value: v }), t.modelValue !== void 0 && a("update:modelValue", v);
1894
1894
  }
1895
- function p() {
1896
- r.value && r.value.clear(), s("clear", t.name);
1895
+ function i() {
1896
+ r.value && r.value.clear(), a("clear", t.name);
1897
1897
  }
1898
- return M(
1898
+ return F(
1899
1899
  () => t.default,
1900
- (n) => {
1901
- m.value = n;
1900
+ (s) => {
1901
+ p.value = s;
1902
1902
  }
1903
- ), M(
1903
+ ), F(
1904
1904
  () => t.modelValue,
1905
- (n) => {
1906
- m.value = n;
1905
+ (s) => {
1906
+ p.value = s;
1907
1907
  }
1908
- ), a({
1908
+ ), o({
1909
1909
  filterRef: r
1910
- }), (n, o) => (f(), w("div", Bl, [
1911
- u("div", Sl, [
1912
- u("div", Dl, [
1913
- u("div", Rl, [
1914
- u("span", Ml, F(n.label), 1)
1910
+ }), (s, v) => (f(), k("div", Bl, [
1911
+ d("div", Sl, [
1912
+ d("div", Dl, [
1913
+ d("div", Rl, [
1914
+ d("span", Ml, j(s.label), 1)
1915
1915
  ]),
1916
- typeof m.value == "string" && m.value.trim() !== "" || Array.isArray(m.value) && m.value.length > 0 && m.value.some((h) => h !== void 0) || m.value === null ? (f(), S(Al, {
1916
+ typeof p.value == "string" && p.value.trim() !== "" || Array.isArray(p.value) && p.value.length > 0 && p.value.some((w) => w !== void 0) || p.value === null ? (f(), D(Al, {
1917
1917
  key: 0,
1918
- onClick: p
1919
- })) : V("", !0)
1918
+ onClick: i
1919
+ })) : $("", !0)
1920
1920
  ]),
1921
- u("div", Kl, [
1922
- e(c)?.type !== "select" ? (f(), S(ee(e(c)?.component), P({ key: 0 }, t, {
1923
- type: e(c)?.type,
1924
- onChange: o[0] || (o[0] = (h) => x(h.name, h.value)),
1925
- onClear: o[1] || (o[1] = (h) => d(h)),
1921
+ d("div", Fl, [
1922
+ e(u)?.type !== "select" ? (f(), D(Z(e(u)?.component), P({ key: 0 }, t, {
1923
+ type: e(u)?.type,
1924
+ onChange: v[0] || (v[0] = (w) => h(w.name, w.value)),
1925
+ onClear: v[1] || (v[1] = (w) => m(w)),
1926
1926
  ref_key: "filterRef",
1927
1927
  ref: r
1928
- }), null, 16, ["type"])) : (f(), S(ge, {
1928
+ }), null, 16, ["type"])) : (f(), D(ge, {
1929
1929
  key: 1,
1930
- "current-value": m.value,
1931
- label: n.label,
1932
- mode: n.mode,
1933
- onClear: p,
1930
+ "current-value": p.value,
1931
+ label: s.label,
1932
+ mode: s.mode,
1933
+ onClear: i,
1934
1934
  fieldRef: r.value,
1935
1935
  width: void 0,
1936
- disabled: n.disabled,
1936
+ disabled: s.disabled,
1937
1937
  layout: "vertical"
1938
1938
  }, {
1939
- default: le(() => [
1940
- (f(), S(ee(e(c)?.component), P({
1939
+ default: te(() => [
1940
+ (f(), D(Z(e(u)?.component), P({
1941
1941
  ref_key: "filterRef",
1942
1942
  ref: r
1943
1943
  }, t, {
1944
- type: e(c)?.type,
1945
- onChange: o[2] || (o[2] = (h) => x(h.name, h.value)),
1946
- onClear: o[3] || (o[3] = (h) => d(h))
1944
+ type: e(u)?.type,
1945
+ onChange: v[2] || (v[2] = (w) => h(w.name, w.value)),
1946
+ onClear: v[3] || (v[3] = (w) => m(w))
1947
1947
  }), null, 16, ["type"]))
1948
1948
  ]),
1949
1949
  _: 1
@@ -1952,7 +1952,7 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
1952
1952
  ])
1953
1953
  ]));
1954
1954
  }
1955
- }), we = /* @__PURE__ */ O({
1955
+ }), we = /* @__PURE__ */ U({
1956
1956
  __name: "inline-layout",
1957
1957
  props: {
1958
1958
  id: {},
@@ -1978,66 +1978,63 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
1978
1978
  sort: {}
1979
1979
  },
1980
1980
  emits: ["update:modelValue", "change", "clear"],
1981
- setup(i, { expose: a, emit: v }) {
1982
- const t = i, s = v, r = _(), c = be(t.type, t.layout), m = I({
1981
+ setup(c, { expose: o, emit: b }) {
1982
+ const t = c, a = b, r = _(), u = be(t.type, t.layout), p = I({
1983
1983
  get: () => t.modelValue,
1984
- set: (n) => s("update:modelValue", n)
1984
+ set: (i) => a("update:modelValue", i)
1985
1985
  });
1986
- function d(n) {
1987
- s("clear", n);
1986
+ function m(i = t.name) {
1987
+ a("clear", i);
1988
1988
  }
1989
- function x(n, o) {
1990
- s("change", { name: n, value: o }), t.modelValue !== void 0 && s("update:modelValue", o);
1989
+ function h(i, s) {
1990
+ a("change", { name: i, value: s }), t.modelValue !== void 0 && a("update:modelValue", s);
1991
1991
  }
1992
- function p() {
1993
- r.value && r.value.clear(), s("clear", t.name);
1994
- }
1995
- return M(
1992
+ return F(
1996
1993
  () => t.default,
1997
- (n) => {
1998
- m.value = n;
1994
+ (i) => {
1995
+ p.value = i;
1999
1996
  }
2000
- ), M(
1997
+ ), F(
2001
1998
  () => t.modelValue,
2002
- (n) => {
2003
- m.value = n;
1999
+ (i) => {
2000
+ p.value = i;
2004
2001
  }
2005
- ), a({
2002
+ ), o({
2006
2003
  filterRef: r
2007
- }), (n, o) => ["text", "date"].includes(n.type.toLocaleLowerCase()) ? (f(), S(ee(e(c)?.component), P({ key: 0 }, t, {
2008
- type: e(c)?.type,
2009
- onChange: o[0] || (o[0] = (h) => x(h.name, h.value)),
2010
- onClear: o[1] || (o[1] = (h) => d(h)),
2011
- disabled: n.disabled,
2012
- modelValue: m.value,
2013
- "onUpdate:modelValue": o[2] || (o[2] = (h) => m.value = h)
2014
- }), null, 16, ["type", "disabled", "modelValue"])) : (f(), S(ge, {
2004
+ }), (i, s) => ["text", "date"].includes(i.type.toLocaleLowerCase()) ? (f(), D(Z(e(u)?.component), P({ key: 0 }, t, {
2005
+ type: e(u)?.type,
2006
+ onChange: s[0] || (s[0] = (v) => h(v.name, v.value)),
2007
+ onClear: s[1] || (s[1] = (v) => m(v)),
2008
+ disabled: i.disabled,
2009
+ modelValue: p.value,
2010
+ "onUpdate:modelValue": s[2] || (s[2] = (v) => p.value = v)
2011
+ }), null, 16, ["type", "disabled", "modelValue"])) : (f(), D(ge, {
2015
2012
  key: 1,
2016
- "current-value": m.value,
2017
- label: n.label,
2018
- mode: n.mode,
2019
- onClear: p,
2013
+ "current-value": p.value,
2014
+ label: i.label,
2015
+ mode: i.mode,
2016
+ onClear: m,
2020
2017
  fieldRef: r.value,
2021
2018
  width: t.width,
2022
- disabled: n.disabled,
2019
+ disabled: i.disabled,
2023
2020
  layout: "inline"
2024
2021
  }, {
2025
- default: le(() => [
2026
- (f(), S(ee(e(c)?.component), P({
2022
+ default: te(() => [
2023
+ (f(), D(Z(e(u)?.component), P({
2027
2024
  ref_key: "filterRef",
2028
2025
  ref: r
2029
2026
  }, t, {
2030
- modelValue: m.value,
2031
- "onUpdate:modelValue": o[3] || (o[3] = (h) => m.value = h),
2032
- type: e(c)?.type,
2033
- onChange: o[4] || (o[4] = (h) => x(h.name, h.value)),
2034
- onClear: o[5] || (o[5] = (h) => d(h))
2027
+ modelValue: p.value,
2028
+ "onUpdate:modelValue": s[3] || (s[3] = (v) => p.value = v),
2029
+ type: e(u)?.type,
2030
+ onChange: s[4] || (s[4] = (v) => h(v.name, v.value)),
2031
+ onClear: s[5] || (s[5] = (v) => m(v))
2035
2032
  }), null, 16, ["modelValue", "type"]))
2036
2033
  ]),
2037
2034
  _: 1
2038
2035
  }, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
2039
2036
  }
2040
- }), jl = /* @__PURE__ */ O({
2037
+ }), jl = /* @__PURE__ */ U({
2041
2038
  __name: "popover-layout",
2042
2039
  props: {
2043
2040
  id: {},
@@ -2063,45 +2060,45 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
2063
2060
  sort: {}
2064
2061
  },
2065
2062
  emits: ["update:modelValue", "change", "clear"],
2066
- setup(i, { expose: a, emit: v }) {
2067
- const t = i, s = v, r = _(), c = _(be(t.type, t.layout)), m = I({
2063
+ setup(c, { expose: o, emit: b }) {
2064
+ const t = c, a = b, r = _(), u = _(be(t.type, t.layout)), p = I({
2068
2065
  get: () => t.modelValue,
2069
- set: (p) => s("update:modelValue", p)
2066
+ set: (i) => a("update:modelValue", i)
2070
2067
  });
2071
- function d(p) {
2072
- s("clear", p);
2068
+ function m(i) {
2069
+ a("clear", i);
2073
2070
  }
2074
- function x(p, n) {
2075
- s("change", { name: p, value: n }), t.modelValue !== void 0 && s("update:modelValue", n);
2071
+ function h(i, s) {
2072
+ a("change", { name: i, value: s }), t.modelValue !== void 0 && a("update:modelValue", s);
2076
2073
  }
2077
- return M(
2074
+ return F(
2078
2075
  () => t.default,
2079
- (p) => {
2080
- m.value = p;
2076
+ (i) => {
2077
+ p.value = i;
2081
2078
  }
2082
- ), M(
2079
+ ), F(
2083
2080
  () => t.modelValue,
2084
- (p) => {
2085
- m.value = p;
2081
+ (i) => {
2082
+ p.value = i;
2086
2083
  }
2087
- ), M(
2084
+ ), F(
2088
2085
  () => t,
2089
- (p) => {
2090
- m.value = p;
2086
+ (i) => {
2087
+ p.value = i;
2091
2088
  }
2092
- ), a({
2089
+ ), o({
2093
2090
  filterRef: r
2094
- }), (p, n) => (f(), S(ee(c.value?.component), P(t, {
2095
- type: c.value?.type,
2096
- modelValue: m.value,
2097
- "onUpdate:modelValue": n[0] || (n[0] = (o) => m.value = o),
2098
- onChange: n[1] || (n[1] = (o) => x(o.name, o.value)),
2099
- onClear: n[2] || (n[2] = (o) => d(o)),
2091
+ }), (i, s) => (f(), D(Z(u.value?.component), P(t, {
2092
+ type: u.value?.type,
2093
+ modelValue: p.value,
2094
+ "onUpdate:modelValue": s[0] || (s[0] = (v) => p.value = v),
2095
+ onChange: s[1] || (s[1] = (v) => h(v.name, v.value)),
2096
+ onClear: s[2] || (s[2] = (v) => m(v)),
2100
2097
  ref_key: "filterRef",
2101
2098
  ref: r
2102
2099
  }), null, 16, ["type", "modelValue"]));
2103
2100
  }
2104
- }), oe = /* @__PURE__ */ O({
2101
+ }), le = /* @__PURE__ */ U({
2105
2102
  __name: "filter-field",
2106
2103
  props: {
2107
2104
  id: {},
@@ -2127,193 +2124,189 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
2127
2124
  sort: { default: "name" }
2128
2125
  },
2129
2126
  emits: ["update:modelValue", "change", "clear"],
2130
- setup(i, { expose: a, emit: v }) {
2131
- const t = i, s = v, r = _(), c = I({
2127
+ setup(c, { expose: o, emit: b }) {
2128
+ const t = c, a = b, r = _(), u = I({
2132
2129
  get: () => t.modelValue,
2133
- set: (p) => s("update:modelValue", p)
2130
+ set: (i) => a("update:modelValue", i)
2134
2131
  });
2135
- function m(p) {
2136
- s("clear", p);
2132
+ function p(i) {
2133
+ a("clear", i);
2137
2134
  }
2138
- function d(p, n) {
2139
- s("change", { name: p, value: n }), t.modelValue !== void 0 && s("update:modelValue", n);
2135
+ function m(i, s) {
2136
+ a("change", { name: i, value: s }), t.modelValue !== void 0 && a("update:modelValue", s);
2140
2137
  }
2141
- M(
2138
+ F(
2142
2139
  () => t.default,
2143
- (p) => {
2144
- c.value = p;
2140
+ (i) => {
2141
+ u.value = i;
2145
2142
  }
2146
- ), M(
2143
+ ), F(
2147
2144
  () => t.modelValue,
2148
- (p) => {
2149
- c.value = p;
2145
+ (i) => {
2146
+ u.value = i;
2150
2147
  }
2151
- ), a({
2148
+ ), o({
2152
2149
  filterRef: r
2153
2150
  });
2154
- function x() {
2151
+ function h() {
2155
2152
  switch (t.layout) {
2156
2153
  case "inline":
2157
2154
  return we;
2158
2155
  case "vertical":
2159
- return Fl;
2156
+ return Kl;
2160
2157
  case "popover":
2161
2158
  return jl;
2162
2159
  default:
2163
2160
  return we;
2164
2161
  }
2165
2162
  }
2166
- return (p, n) => (f(), S(ee(x()), P(t, {
2167
- onChange: n[0] || (n[0] = (o) => d(o.name, o.value)),
2168
- onClear: n[1] || (n[1] = (o) => m(o)),
2169
- modelValue: c.value,
2170
- "onUpdate:modelValue": n[2] || (n[2] = (o) => c.value = o)
2163
+ return (i, s) => (f(), D(Z(h()), P(t, {
2164
+ onChange: s[0] || (s[0] = (v) => m(v.name, v.value)),
2165
+ onClear: s[1] || (s[1] = (v) => p(v)),
2166
+ modelValue: u.value,
2167
+ "onUpdate:modelValue": s[2] || (s[2] = (v) => u.value = v)
2171
2168
  }), null, 16, ["modelValue"]));
2172
2169
  }
2173
2170
  });
2174
- function he(i, a) {
2171
+ function he(c, o) {
2175
2172
  const {
2176
- slots: v
2177
- } = i, t = _(i.value ?? {}), s = I(() => (Z(v?.default?.()) ?? []).flatMap((l) => Array.isArray(l.children) ? l.children : [l]));
2173
+ slots: b
2174
+ } = c, t = _(c.value ?? {}), a = I(() => (ne(b?.default?.()) ?? []).flatMap((n) => Array.isArray(n.children) ? n.children : [n]));
2178
2175
  function r(C) {
2179
- delete t.value[C], a("clear", {
2180
- data: Z(t.value),
2176
+ delete t.value[C], o("clear", {
2177
+ data: ne(t.value),
2181
2178
  name: C
2182
2179
  });
2183
2180
  }
2184
- function c(C, l) {
2185
- l === void 0 ? (r(C), a("change", {
2186
- data: Z(t.value),
2187
- name: C,
2188
- undefined: void 0
2189
- })) : t.value = {
2181
+ function u(C, n) {
2182
+ n === void 0 ? r(C) : t.value = {
2190
2183
  ...t.value,
2191
- [C]: l
2192
- }, a("change", {
2193
- data: Z(t.value),
2184
+ [C]: n
2185
+ }, o("change", {
2186
+ data: ne(t.value),
2194
2187
  name: C,
2195
- value: l
2188
+ value: n
2196
2189
  });
2197
2190
  }
2198
- const m = I(() => s.value.map((C) => {
2199
- const l = C.props?.name;
2200
- return Ie(C, {
2191
+ const p = I(() => a.value.map((C) => {
2192
+ const n = C.props?.name;
2193
+ return Te(C, {
2201
2194
  ...C.props,
2202
- layout: i.view,
2195
+ layout: c.view,
2203
2196
  showClean: !0,
2204
- modelValue: t[l],
2205
- "onUpdate:modelValue": (b) => {
2206
- c(l, b);
2197
+ modelValue: t[n],
2198
+ "onUpdate:modelValue": (x) => {
2199
+ u(n, x);
2207
2200
  },
2208
- onClear: () => r(l)
2201
+ onClear: () => r(n)
2209
2202
  });
2210
- })), d = I(
2203
+ })), m = I(
2211
2204
  () => new Map(
2212
- m.value.map((C) => {
2213
- const l = C.props?.name;
2214
- return l ? [l, C] : null;
2205
+ p.value.map((C) => {
2206
+ const n = C.props?.name;
2207
+ return n ? [n, C] : null;
2215
2208
  }).filter((C) => C !== null)
2216
2209
  )
2217
2210
  );
2218
- function x() {
2219
- t.value = {}, a("clearAll", {
2220
- data: Z(t.value),
2211
+ function h(C = !1) {
2212
+ t.value = {}, C || o("clearAll", {
2213
+ data: ne(t.value),
2221
2214
  name: "ALL"
2222
2215
  });
2223
2216
  }
2224
- const p = _(""), n = I(() => i.schema?.value ? Object.entries(t.value).filter(([C, l]) => i.schema && !(C in i.schema.value) ? !1 : Array.isArray(l) ? l.some((b) => b !== "" && b !== void 0) : l !== "" && l !== void 0).length : 0), o = _();
2225
- M(p, async () => {
2226
- await fe(), o?.value?.filterRef?.inputTextRef && o.value.filterRef.inputTextRef.focus();
2217
+ const i = _(""), s = I(() => c.schema?.value ? Object.entries(t.value).filter(([C, n]) => c.schema && !(C in c.schema.value) ? !1 : Array.isArray(n) ? n.some((x) => x !== "" && x !== void 0) : n !== "" && n !== void 0).length : 0), v = _();
2218
+ F(i, async () => {
2219
+ await fe(), v?.value?.filterRef?.inputTextRef && v.value.filterRef.inputTextRef.focus();
2227
2220
  });
2228
- const h = I(() => i.schema?.value ? Object.fromEntries(Object.entries(i.schema?.value).slice(0, i.limit)) : {}), g = I(() => i.schema?.value ? i.view !== "inline" ? i.schema?.value : Object.fromEntries(Object.entries(i.schema?.value).slice(i.limit)) : {}), k = I(() => {
2229
- if (m.value.length === 0) return [];
2221
+ const w = I(() => c.schema?.value ? Object.fromEntries(Object.entries(c.schema?.value).slice(0, c.limit)) : {}), y = I(() => c.schema?.value ? c.view !== "inline" ? c.schema?.value : Object.fromEntries(Object.entries(c.schema?.value).slice(c.limit)) : {}), g = I(() => {
2222
+ if (p.value.length === 0) return [];
2230
2223
  let C = 0;
2231
- if (i.schema?.value) {
2232
- const l = Object.entries(i.schema.value).length;
2233
- l < i.limit ? C = i.limit - l : C = 0;
2224
+ if (c.schema?.value) {
2225
+ const n = Object.entries(c.schema.value).length;
2226
+ n < c.limit ? C = c.limit - n : C = 0;
2234
2227
  }
2235
- return m.value.slice(0, C);
2236
- }), y = I(() => m.value.length === 0 ? [] : i.view !== "inline" ? m.value : m.value.slice(k.value.length));
2237
- function $() {
2238
- if (g.value) {
2239
- const [C] = Object.keys(g.value);
2240
- p.value = C;
2241
- } else y.value.length > 0 ? p.value = y.value[0].props.name : p.value = "";
2228
+ return p.value.slice(0, C);
2229
+ }), l = I(() => p.value.length === 0 ? [] : c.view !== "inline" ? p.value : p.value.slice(g.value.length));
2230
+ function V() {
2231
+ if (y.value) {
2232
+ const [C] = Object.keys(y.value);
2233
+ i.value = C;
2234
+ } else l.value.length > 0 ? i.value = l.value[0].props.name : i.value = "";
2242
2235
  }
2243
2236
  return {
2244
2237
  activeFilter: t,
2245
- activeFilterCount: n,
2246
- onFilterChange: c,
2238
+ activeFilterCount: s,
2239
+ onFilterChange: u,
2247
2240
  clearFilter: r,
2248
- clearAllFilters: x,
2249
- limitedSchema: h,
2250
- popoverSchema: g,
2251
- filtersSlot: m,
2252
- limitedFiltersSlot: k,
2253
- popoverFiltersSlot: y,
2254
- vnodeMap: d,
2255
- onPopoverOpen: $,
2256
- selectedFilter: p,
2257
- filterRef: o
2241
+ clearAllFilters: h,
2242
+ limitedSchema: w,
2243
+ popoverSchema: y,
2244
+ filtersSlot: p,
2245
+ limitedFiltersSlot: g,
2246
+ popoverFiltersSlot: l,
2247
+ vnodeMap: m,
2248
+ onPopoverOpen: V,
2249
+ selectedFilter: i,
2250
+ filterRef: v
2258
2251
  };
2259
2252
  }
2260
- const Ll = /* @__PURE__ */ O({
2253
+ const Ll = /* @__PURE__ */ U({
2261
2254
  __name: "popover",
2262
2255
  emits: ["open", "close"],
2263
- setup(i, { emit: a }) {
2264
- const v = _(!1), t = _(null), s = _(null), r = _(null), c = _({ top: "0px", left: "0px", position: "absolute" });
2265
- function m() {
2266
- v.value = !v.value;
2256
+ setup(c, { emit: o }) {
2257
+ const b = _(!1), t = _(null), a = _(null), r = _(null), u = _({ top: "0px", left: "0px", position: "absolute" });
2258
+ function p() {
2259
+ b.value = !b.value;
2267
2260
  }
2268
- function d() {
2269
- const o = r.value, h = t.value;
2270
- if (!o || !h) return;
2271
- const g = o.getBoundingClientRect(), k = h.offsetWidth, y = window.innerWidth - g.left;
2272
- let $ = g.left + window.scrollX;
2273
- k > y && ($ = window.innerWidth - k - 8, $ < 8 && ($ = 8)), c.value = {
2261
+ function m() {
2262
+ const v = r.value, w = t.value;
2263
+ if (!v || !w) return;
2264
+ const y = v.getBoundingClientRect(), g = w.offsetWidth, l = window.innerWidth - y.left;
2265
+ let V = y.left + window.scrollX;
2266
+ g > l && (V = window.innerWidth - g - 8, V < 8 && (V = 8)), u.value = {
2274
2267
  position: "absolute",
2275
- top: `${g.bottom + window.scrollY + 8}px`,
2276
- left: `${$}px`
2268
+ top: `${y.bottom + window.scrollY + 8}px`,
2269
+ left: `${V}px`
2277
2270
  };
2278
2271
  }
2279
- function x(o) {
2280
- const h = o.target;
2281
- !r.value?.contains(o.target) && !t.value?.contains(o.target) && !h.closest("[data-inside-popover]") && (v.value = !1);
2272
+ function h(v) {
2273
+ const w = v.target;
2274
+ !r.value?.contains(v.target) && !t.value?.contains(v.target) && !w.closest("[data-inside-popover]") && (b.value = !1);
2282
2275
  }
2283
- const p = _(!1);
2276
+ const i = _(!1);
2284
2277
  ae(() => {
2285
- p.value = !0;
2278
+ i.value = !0;
2286
2279
  }), ae(() => {
2287
- r.value = s.value?.querySelector("[data-popover-trigger]") || null, r.value?.addEventListener("click", m), document.addEventListener("click", x), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
2280
+ r.value = a.value?.querySelector("[data-popover-trigger]") || null, r.value?.addEventListener("click", p), document.addEventListener("click", h), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0);
2288
2281
  }), ce(() => {
2289
- r.value?.removeEventListener("click", m), document.removeEventListener("click", x), window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0);
2282
+ r.value?.removeEventListener("click", p), document.removeEventListener("click", h), window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
2290
2283
  });
2291
- const n = a;
2292
- return M(v, async (o) => {
2293
- o ? (n("open"), await fe(), d()) : n("close");
2294
- }), (o, h) => (f(), w("div", {
2284
+ const s = o;
2285
+ return F(b, async (v) => {
2286
+ v ? (s("open"), await fe(), m()) : s("close");
2287
+ }), (v, w) => (f(), k("div", {
2295
2288
  ref_key: "wrapperRef",
2296
- ref: s
2289
+ ref: a
2297
2290
  }, [
2298
- ue(o.$slots, "trigger"),
2299
- p.value ? (f(), S($e, {
2291
+ ue(v.$slots, "trigger"),
2292
+ i.value ? (f(), D(_e, {
2300
2293
  key: 0,
2301
2294
  to: "body"
2302
2295
  }, [
2303
- T(u("div", {
2296
+ O(d("div", {
2304
2297
  ref_key: "popoverRef",
2305
2298
  ref: t,
2306
2299
  class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
2307
- style: Ae(c.value)
2300
+ style: Ae(u.value)
2308
2301
  }, [
2309
- ue(o.$slots, "default")
2302
+ ue(v.$slots, "default")
2310
2303
  ], 4), [
2311
- [X, v.value]
2304
+ [X, b.value]
2312
2305
  ])
2313
- ])) : V("", !0)
2306
+ ])) : $("", !0)
2314
2307
  ], 512));
2315
2308
  }
2316
- }), El = {}, Il = {
2309
+ }), El = {}, Tl = {
2317
2310
  xmlns: "http://www.w3.org/2000/svg",
2318
2311
  width: "24",
2319
2312
  height: "24",
@@ -2325,12 +2318,12 @@ const Ll = /* @__PURE__ */ O({
2325
2318
  "stroke-linejoin": "round",
2326
2319
  class: "lucide lucide-filter h-4 w-4"
2327
2320
  };
2328
- function Tl(i, a) {
2329
- return f(), w("svg", Il, a[0] || (a[0] = [
2330
- u("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2321
+ function Il(c, o) {
2322
+ return f(), k("svg", Tl, o[0] || (o[0] = [
2323
+ d("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2331
2324
  ]));
2332
2325
  }
2333
- const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
2326
+ const Ol = /* @__PURE__ */ J(El, [["render", Il]]), Ul = {
2334
2327
  key: 0,
2335
2328
  class: "inline-flex rounded-sm items-center border font-semibold border-transparent hover:bg-secondary/80 bg-blue-500 text-white text-xs px-1.5"
2336
2329
  }, zl = { class: "flex" }, Nl = { class: "w-64 border-r border-gray-200" }, Hl = { class: "p-2" }, Yl = ["onClick"], Pl = { class: "flex items-center gap-2" }, Wl = { class: "text-sm font-medium" }, ql = {
@@ -2345,7 +2338,7 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
2345
2338
  }, eo = { class: "flex-1 min-h-[300px] overflow-y-auto" }, to = {
2346
2339
  key: 0,
2347
2340
  class: "flex items-center justify-center h-full text-gray-500"
2348
- }, je = /* @__PURE__ */ O({
2341
+ }, je = /* @__PURE__ */ U({
2349
2342
  __name: "popover-filter-layout",
2350
2343
  props: {
2351
2344
  schema: {},
@@ -2356,146 +2349,145 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
2356
2349
  limit: { default: 3 }
2357
2350
  },
2358
2351
  emits: ["change", "clear", "clearAll"],
2359
- setup(i, { expose: a, emit: v }) {
2360
- const t = i, s = Ke(t.mode), r = pe(), c = v, m = _({}), {
2361
- activeFilter: d,
2362
- activeFilterCount: x,
2363
- onFilterChange: p,
2364
- clearFilter: n,
2365
- clearAllFilters: o,
2366
- popoverSchema: h,
2367
- popoverFiltersSlot: g,
2368
- onPopoverOpen: k,
2369
- selectedFilter: y,
2370
- filterRef: $
2352
+ setup(c, { expose: o, emit: b }) {
2353
+ const t = c, a = Fe(t.mode), r = pe(), u = b, p = _({}), {
2354
+ activeFilter: m,
2355
+ activeFilterCount: h,
2356
+ onFilterChange: i,
2357
+ clearFilter: s,
2358
+ clearAllFilters: v,
2359
+ popoverSchema: w,
2360
+ popoverFiltersSlot: y,
2361
+ onPopoverOpen: g,
2362
+ selectedFilter: l,
2363
+ filterRef: V
2371
2364
  } = he({
2372
2365
  ...t,
2373
- schema: m,
2366
+ schema: p,
2374
2367
  slots: r
2375
- }, c);
2376
- return M(
2368
+ }, u);
2369
+ return F(
2377
2370
  () => t.schema,
2378
2371
  (C) => {
2379
- m.value = C;
2372
+ p.value = C;
2380
2373
  },
2381
2374
  { deep: !0, immediate: !0 }
2382
- ), a({
2383
- clearFilter: n,
2384
- clearAllFilters: o
2385
- }), (C, l) => (f(), S(Ll, {
2386
- onOpen: e(k),
2387
- onClose: l[5] || (l[5] = (b) => y.value = "")
2375
+ ), o({
2376
+ clearFilter: s,
2377
+ clearAllFilters: v
2378
+ }), (C, n) => (f(), D(Ll, {
2379
+ onOpen: e(g),
2380
+ onClose: n[5] || (n[5] = (x) => l.value = "")
2388
2381
  }, {
2389
- trigger: le(() => [
2390
- u("button", {
2382
+ trigger: te(() => [
2383
+ d("button", {
2391
2384
  "data-popover-trigger": "",
2392
2385
  "aria-haspopup": "dialog",
2393
2386
  "aria-expanded": "false",
2394
- class: D(
2395
- e(s) + (e(x) > 0 ? "bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100" : "text-gray-800 hover:bg-gray-200 focus:bg-gray-200")
2387
+ class: R(
2388
+ e(a) + (e(h) > 0 ? "bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100" : "text-gray-800 hover:bg-gray-200 focus:bg-gray-200")
2396
2389
  ),
2397
2390
  type: "button"
2398
2391
  }, [
2399
- N(Ol),
2400
- l[6] || (l[6] = z(" Фільтр ", -1)),
2401
- e(x) > 0 ? (f(), w("div", Ul, F(e(x)), 1)) : V("", !0)
2392
+ H(Ol),
2393
+ n[6] || (n[6] = N(" Фільтр ", -1)),
2394
+ e(h) > 0 ? (f(), k("div", Ul, j(e(h)), 1)) : $("", !0)
2402
2395
  ], 2)
2403
2396
  ]),
2404
- default: le(() => [
2405
- u("div", zl, [
2406
- u("div", Nl, [
2407
- l[7] || (l[7] = u("div", { class: "p-4 border-b" }, [
2408
- u("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
2397
+ default: te(() => [
2398
+ d("div", zl, [
2399
+ d("div", Nl, [
2400
+ n[7] || (n[7] = d("div", { class: "p-4 border-b" }, [
2401
+ d("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
2409
2402
  ], -1)),
2410
- u("div", Hl, [
2411
- C.schema ? (f(!0), w(R, { key: 0 }, W(Object.entries(e(h)), ([b, K]) => (f(), w("button", {
2412
- key: b,
2403
+ d("div", Hl, [
2404
+ C.schema ? (f(!0), k(M, { key: 0 }, W(Object.entries(e(w)), ([x, B]) => (f(), k("button", {
2405
+ key: x,
2413
2406
  onClick: () => {
2414
- y.value = b;
2407
+ l.value = x;
2415
2408
  },
2416
- class: D([
2409
+ class: R([
2417
2410
  "w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
2418
- e(y) === b ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
2411
+ e(l) === x ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
2419
2412
  ])
2420
2413
  }, [
2421
- u("div", Pl, [
2422
- u("span", Wl, F(K.label), 1)
2414
+ d("div", Pl, [
2415
+ d("span", Wl, j(B.label), 1)
2423
2416
  ]),
2424
- (Array.isArray(e(d)[b]) ? e(d)[b]?.length > 0 : e(d)[b] || e(d)[b] === null) ? (f(), w("div", ql)) : V("", !0)
2425
- ], 10, Yl))), 128)) : V("", !0),
2426
- (f(!0), w(R, null, W(e(g), (b, K) => (f(), w("button", {
2427
- key: "slot-" + K,
2428
- onClick: (A) => y.value = b.props.name,
2429
- class: D([
2417
+ (Array.isArray(e(m)[x]) ? e(m)[x]?.length > 0 : e(m)[x] || e(m)[x] === null) ? (f(), k("div", ql)) : $("", !0)
2418
+ ], 10, Yl))), 128)) : $("", !0),
2419
+ (f(!0), k(M, null, W(e(y), (x, B) => (f(), k("button", {
2420
+ key: "slot-" + B,
2421
+ onClick: (S) => l.value = x.props.name,
2422
+ class: R([
2430
2423
  "w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
2431
- e(y) === b.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
2424
+ e(l) === x.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
2432
2425
  ])
2433
2426
  }, [
2434
- u("div", Gl, [
2435
- u("span", Xl, F(b.props.label), 1)
2427
+ d("div", Gl, [
2428
+ d("span", Xl, j(x.props.label), 1)
2436
2429
  ]),
2437
- e(d)[b.props.name]?.length > 0 ? (f(), w("div", Jl)) : V("", !0)
2430
+ e(m)[x.props.name]?.length > 0 ? (f(), k("div", Jl)) : $("", !0)
2438
2431
  ], 10, Ql))), 128))
2439
2432
  ]),
2440
- e(x) > 0 ? (f(), w("div", Zl, [
2441
- u("button", {
2433
+ e(h) > 0 ? (f(), k("div", Zl, [
2434
+ d("button", {
2442
2435
  class: "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",
2443
- onClick: l[0] || (l[0] = //@ts-ignore
2444
- (...b) => e(o) && e(o)(...b)),
2436
+ onClick: n[0] || (n[0] = (x) => e(v)()),
2445
2437
  "data-inside-popover": ""
2446
2438
  }, " Очистити всі ")
2447
- ])) : V("", !0)
2439
+ ])) : $("", !0)
2448
2440
  ]),
2449
- u("div", eo, [
2450
- e(y) === "" ? (f(), w("div", to, l[8] || (l[8] = [
2451
- u("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
2452
- ]))) : V("", !0),
2453
- e(y) ? (f(), w(R, { key: 1 }, [
2454
- e(h) ? (f(!0), w(R, { key: 0 }, W(Object.entries(e(h)), ([b, K]) => (f(), w(R, null, [
2455
- e(y) === b ? (f(), S(oe, P({
2456
- name: b,
2457
- key: b,
2441
+ d("div", eo, [
2442
+ e(l) === "" ? (f(), k("div", to, n[8] || (n[8] = [
2443
+ d("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
2444
+ ]))) : $("", !0),
2445
+ e(l) ? (f(), k(M, { key: 1 }, [
2446
+ e(w) ? (f(!0), k(M, { key: 0 }, W(Object.entries(e(w)), ([x, B]) => (f(), k(M, null, [
2447
+ e(l) === x ? (f(), D(le, P({
2448
+ name: x,
2449
+ key: x,
2458
2450
  layout: "popover",
2459
2451
  ref_for: !0,
2460
2452
  ref_key: "filterRef",
2461
- ref: $
2462
- }, { ref_for: !0 }, K, {
2463
- onChange: l[1] || (l[1] = (A) => e(p)(A.name, A.value)),
2464
- onClear: l[2] || (l[2] = (A) => {
2465
- e(n)(A), e(p)(A, void 0);
2453
+ ref: V
2454
+ }, { ref_for: !0 }, B, {
2455
+ onChange: n[1] || (n[1] = (S) => e(i)(S.name, S.value)),
2456
+ onClear: n[2] || (n[2] = (S) => {
2457
+ e(s)(S), e(i)(S, void 0);
2466
2458
  }),
2467
- modelValue: e(d)[b],
2468
- "onUpdate:modelValue": (A) => e(d)[b] = A,
2459
+ modelValue: e(m)[x],
2460
+ "onUpdate:modelValue": (S) => e(m)[x] = S,
2469
2461
  cleanable: !0
2470
- }), null, 16, ["name", "modelValue", "onUpdate:modelValue"])) : V("", !0)
2471
- ], 64))), 256)) : V("", !0),
2472
- (f(!0), w(R, null, W(e(g), (b, K) => (f(), w(R, {
2473
- key: "slot-" + K
2462
+ }), null, 16, ["name", "modelValue", "onUpdate:modelValue"])) : $("", !0)
2463
+ ], 64))), 256)) : $("", !0),
2464
+ (f(!0), k(M, null, W(e(y), (x, B) => (f(), k(M, {
2465
+ key: "slot-" + B
2474
2466
  }, [
2475
- e(y) === b.props.name ? (f(), S(oe, P({
2467
+ e(l) === x.props.name ? (f(), D(le, P({
2476
2468
  key: 0,
2477
2469
  layout: "popover"
2478
- }, { ref_for: !0 }, b.props, {
2470
+ }, { ref_for: !0 }, x.props, {
2479
2471
  ref_for: !0,
2480
2472
  ref_key: "filterRef",
2481
- ref: $,
2482
- onChange: l[3] || (l[3] = (A) => e(p)(A.name, A.value)),
2483
- onClear: l[4] || (l[4] = (A) => {
2484
- e(n)(A), e(p)(A, void 0);
2473
+ ref: V,
2474
+ onChange: n[3] || (n[3] = (S) => e(i)(S.name, S.value)),
2475
+ onClear: n[4] || (n[4] = (S) => {
2476
+ e(s)(S), e(i)(S, void 0);
2485
2477
  }),
2486
- modelValue: e(d)[b.props.name],
2487
- "onUpdate:modelValue": (A) => e(d)[b.props.name] = A,
2478
+ modelValue: e(m)[x.props.name],
2479
+ "onUpdate:modelValue": (S) => e(m)[x.props.name] = S,
2488
2480
  cleanable: !0
2489
- }), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
2481
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])) : $("", !0)
2490
2482
  ], 64))), 128))
2491
- ], 64)) : V("", !0)
2483
+ ], 64)) : $("", !0)
2492
2484
  ])
2493
2485
  ])
2494
2486
  ]),
2495
2487
  _: 1
2496
2488
  }, 8, ["onOpen"]));
2497
2489
  }
2498
- }), lo = { class: "flex gap-1 items-center flex-wrap" }, Ce = /* @__PURE__ */ O({
2490
+ }), lo = { class: "flex gap-1 items-center flex-wrap" }, Ce = /* @__PURE__ */ U({
2499
2491
  __name: "inline-filter-layout",
2500
2492
  props: {
2501
2493
  schema: {},
@@ -2506,92 +2498,93 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
2506
2498
  limit: { default: 3 }
2507
2499
  },
2508
2500
  emits: ["change", "clear", "clearAll"],
2509
- setup(i, { emit: a }) {
2510
- const v = i, t = a, s = pe(), r = _({}), {
2511
- activeFilter: c,
2501
+ setup(c, { expose: o, emit: b }) {
2502
+ const t = c, a = b, r = pe(), u = _({}), {
2503
+ activeFilter: p,
2512
2504
  activeFilterCount: m,
2513
- onFilterChange: d,
2514
- clearFilter: x,
2515
- clearAllFilters: p,
2516
- limitedSchema: n,
2517
- popoverSchema: o,
2518
- filtersSlot: h,
2505
+ onFilterChange: h,
2506
+ clearFilter: i,
2507
+ clearAllFilters: s,
2508
+ limitedSchema: v,
2509
+ popoverSchema: w,
2510
+ filtersSlot: y,
2519
2511
  limitedFiltersSlot: g,
2520
- popoverFiltersSlot: k
2512
+ popoverFiltersSlot: l
2521
2513
  } = he(
2522
2514
  {
2523
- ...v,
2524
- schema: r,
2525
- slots: s
2515
+ ...t,
2516
+ schema: u,
2517
+ slots: r
2526
2518
  },
2527
- t
2528
- ), y = _();
2529
- function $() {
2530
- y.value && y.value.clearAllFilters(), p();
2519
+ a
2520
+ ), V = _();
2521
+ function C() {
2522
+ V.value && V.value.clearAllFilters(!0), s();
2531
2523
  }
2532
- return M(
2533
- () => v.schema,
2534
- (C) => {
2535
- r.value = C;
2524
+ return F(
2525
+ () => t.schema,
2526
+ (n) => {
2527
+ u.value = n;
2536
2528
  },
2537
2529
  { deep: !0, immediate: !0 }
2538
- ), (C, l) => (f(), w("div", lo, [
2539
- C.schema ? (f(!0), w(R, { key: 0 }, W(Object.entries(e(n)), ([b, K]) => (f(), S(oe, P({
2540
- key: b,
2541
- name: b,
2542
- mode: C.mode
2543
- }, { ref_for: !0 }, K, {
2544
- onChange: l[0] || (l[0] = (A) => e(d)(A.name, A.value)),
2545
- onClear: l[1] || (l[1] = (A) => {
2546
- e(x)(A), e(d)(A, void 0);
2547
- }),
2530
+ ), o({
2531
+ clearFilter: i,
2532
+ clearAllFilters: s
2533
+ }), (n, x) => (f(), k("div", lo, [
2534
+ n.schema ? (f(!0), k(M, { key: 0 }, W(Object.entries(e(v)), ([B, S]) => (f(), D(le, P({
2535
+ key: B,
2536
+ name: B,
2537
+ mode: n.mode
2538
+ }, { ref_for: !0 }, S, {
2539
+ onChange: x[0] || (x[0] = (K) => e(h)(K.name, K.value)),
2540
+ onClear: e(i),
2548
2541
  layout: "inline",
2549
2542
  cleanable: !0,
2550
- modelValue: e(c)[b],
2551
- "onUpdate:modelValue": (A) => e(c)[b] = A
2552
- }), null, 16, ["name", "mode", "modelValue", "onUpdate:modelValue"]))), 128)) : V("", !0),
2553
- (f(!0), w(R, null, W(e(g), (b, K) => (f(), S(oe, P({
2554
- key: "slot-" + K,
2543
+ modelValue: e(p)[B],
2544
+ "onUpdate:modelValue": (K) => e(p)[B] = K
2545
+ }), null, 16, ["name", "mode", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : $("", !0),
2546
+ (f(!0), k(M, null, W(e(g), (B, S) => (f(), D(le, P({
2547
+ key: "slot-" + S,
2555
2548
  layout: "inline"
2556
- }, { ref_for: !0 }, b.props, {
2557
- onChange: l[2] || (l[2] = (A) => e(d)(A.name, A.value)),
2558
- onClear: l[3] || (l[3] = (A) => {
2559
- e(x)(A), e(d)(A, void 0);
2549
+ }, { ref_for: !0 }, B.props, {
2550
+ onChange: x[1] || (x[1] = (K) => e(h)(K.name, K.value)),
2551
+ onClear: x[2] || (x[2] = (K) => {
2552
+ e(i)(K), e(h)(K, void 0);
2560
2553
  }),
2561
2554
  cleanable: !0,
2562
- modelValue: e(c)[b.props.name],
2563
- "onUpdate:modelValue": (A) => e(c)[b.props.name] = A
2555
+ modelValue: e(p)[B.props.name],
2556
+ "onUpdate:modelValue": (K) => e(p)[B.props.name] = K
2564
2557
  }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
2565
- Object.entries(e(o)).length > 0 || e(k).length > 0 ? (f(), S(je, P({ key: 1 }, v, {
2566
- schema: e(o),
2558
+ Object.entries(e(w)).length > 0 || e(l).length > 0 ? (f(), D(je, P({ key: 1 }, t, {
2559
+ schema: e(w),
2567
2560
  limit: 0,
2568
- onChange: l[4] || (l[4] = (b) => e(d)(b.name, b.value)),
2569
- onClearAll: e(p),
2570
- onClear: l[5] || (l[5] = (b) => e(x)(b.name)),
2571
- mode: C.mode,
2561
+ onChange: x[3] || (x[3] = (B) => e(h)(B.name, B.value)),
2562
+ onClearAll: x[4] || (x[4] = (B) => e(s)()),
2563
+ onClear: x[5] || (x[5] = (B) => e(i)(B.name)),
2564
+ mode: n.mode,
2572
2565
  ref_key: "popoverRef",
2573
- ref: y,
2566
+ ref: V,
2574
2567
  cleanable: !0
2575
2568
  }), {
2576
- default: le(() => [
2577
- (f(!0), w(R, null, W(e(h), (b, K) => (f(), S(ee(b), P({
2578
- key: "slot-" + K,
2569
+ default: te(() => [
2570
+ (f(!0), k(M, null, W(e(y), (B, S) => (f(), D(Z(B), P({
2571
+ key: "slot-" + S,
2579
2572
  layout: "popover"
2580
- }, { ref_for: !0 }, b.props, { cleanable: !0 }), null, 16))), 128))
2573
+ }, { ref_for: !0 }, B.props, { cleanable: !0 }), null, 16))), 128))
2581
2574
  ]),
2582
2575
  _: 1
2583
- }, 16, ["schema", "onClearAll", "mode"])) : V("", !0),
2584
- e(m) > 0 ? (f(), w("button", {
2576
+ }, 16, ["schema", "mode"])) : $("", !0),
2577
+ e(m) > 0 ? (f(), k("button", {
2585
2578
  key: 2,
2586
- onClick: $,
2579
+ onClick: C,
2587
2580
  class: "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 border border-transparent text-gray-800 hover:bg-gray-200 focus:bg-gray-200"
2588
- }, " Очистити ")) : V("", !0)
2581
+ }, " Очистити ")) : $("", !0)
2589
2582
  ]));
2590
2583
  }
2591
2584
  }), oo = {
2592
2585
  key: 0,
2593
2586
  class: "p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"
2594
- }, no = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, ao = /* @__PURE__ */ O({
2587
+ }, no = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, ao = /* @__PURE__ */ U({
2595
2588
  __name: "vertical-filter-layout",
2596
2589
  props: {
2597
2590
  schema: {},
@@ -2602,58 +2595,60 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
2602
2595
  limit: { default: 3 }
2603
2596
  },
2604
2597
  emits: ["change", "clear", "clearAll"],
2605
- setup(i, { emit: a }) {
2606
- const v = i, t = a, s = pe(), {
2607
- activeFilter: r,
2608
- activeFilterCount: c,
2598
+ setup(c, { expose: o, emit: b }) {
2599
+ const t = c, a = b, r = pe(), {
2600
+ activeFilter: u,
2601
+ activeFilterCount: p,
2609
2602
  onFilterChange: m,
2610
- clearFilter: d,
2611
- clearAllFilters: x,
2612
- filtersSlot: p
2603
+ clearFilter: h,
2604
+ clearAllFilters: i,
2605
+ filtersSlot: s
2613
2606
  } = he({
2614
- ...v,
2615
- slots: s
2616
- }, t);
2617
- return (n, o) => n.view === "vertical" ? (f(), w("div", oo, [
2618
- u("div", no, [
2619
- e(c) > 0 ? (f(), w("button", {
2607
+ ...t,
2608
+ slots: r
2609
+ }, a);
2610
+ return o({
2611
+ clearFilter: h,
2612
+ clearAllFilters: i
2613
+ }), (v, w) => v.view === "vertical" ? (f(), k("div", oo, [
2614
+ d("div", no, [
2615
+ e(p) > 0 ? (f(), k("button", {
2620
2616
  key: 0,
2621
- onClick: o[0] || (o[0] = //@ts-ignore
2622
- (...h) => e(x) && e(x)(...h)),
2617
+ onClick: w[0] || (w[0] = (y) => e(i)()),
2623
2618
  "data-popover-trigger": "",
2624
2619
  "aria-haspopup": "dialog",
2625
2620
  "aria-expanded": "false",
2626
2621
  class: "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",
2627
2622
  type: "button"
2628
- }, " Очистити ")) : V("", !0),
2629
- n.schema ? (f(!0), w(R, { key: 1 }, W(Object.entries(n.schema), ([h, g]) => (f(), S(oe, P({
2630
- name: h,
2623
+ }, " Очистити ")) : $("", !0),
2624
+ v.schema ? (f(!0), k(M, { key: 1 }, W(Object.entries(v.schema), ([y, g]) => (f(), D(le, P({
2625
+ name: y,
2631
2626
  layout: "vertical"
2632
2627
  }, { ref_for: !0 }, g, {
2633
- onChange: o[1] || (o[1] = (k) => e(m)(k.name, k.value)),
2634
- onClear: o[2] || (o[2] = (k) => {
2635
- e(d)(k), e(m)(k, void 0);
2628
+ onChange: w[1] || (w[1] = (l) => e(m)(l.name, l.value)),
2629
+ onClear: w[2] || (w[2] = (l) => {
2630
+ e(h)(l), e(m)(l, void 0);
2636
2631
  }),
2637
- modelValue: e(r)[h],
2638
- "onUpdate:modelValue": (k) => e(r)[h] = k,
2632
+ modelValue: e(u)[y],
2633
+ "onUpdate:modelValue": (l) => e(u)[y] = l,
2639
2634
  showClean: !0
2640
- }), null, 16, ["name", "modelValue", "onUpdate:modelValue"]))), 256)) : V("", !0),
2641
- (f(!0), w(R, null, W(e(p), (h, g) => (f(), S(oe, P({
2635
+ }), null, 16, ["name", "modelValue", "onUpdate:modelValue"]))), 256)) : $("", !0),
2636
+ (f(!0), k(M, null, W(e(s), (y, g) => (f(), D(le, P({
2642
2637
  key: "slot-" + g,
2643
2638
  layout: "vertical"
2644
- }, { ref_for: !0 }, h.props, {
2645
- onChange: o[3] || (o[3] = (k) => e(m)(k.name, k.value)),
2646
- onClear: o[4] || (o[4] = (k) => {
2647
- e(d)(k), e(m)(k, void 0);
2639
+ }, { ref_for: !0 }, y.props, {
2640
+ onChange: w[3] || (w[3] = (l) => e(m)(l.name, l.value)),
2641
+ onClear: w[4] || (w[4] = (l) => {
2642
+ e(h)(l), e(m)(l, void 0);
2648
2643
  }),
2649
- modelValue: e(r)[h.props.name],
2650
- "onUpdate:modelValue": (k) => e(r)[h.props.name] = k,
2644
+ modelValue: e(u)[y.props.name],
2645
+ "onUpdate:modelValue": (l) => e(u)[y.props.name] = l,
2651
2646
  showClean: !0
2652
2647
  }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
2653
2648
  ])
2654
- ])) : V("", !0);
2649
+ ])) : $("", !0);
2655
2650
  }
2656
- }), Ve = /* @__PURE__ */ O({
2651
+ }), Ve = /* @__PURE__ */ U({
2657
2652
  __name: "filter",
2658
2653
  props: {
2659
2654
  schema: {},
@@ -2664,37 +2659,52 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
2664
2659
  limit: { default: 3 }
2665
2660
  },
2666
2661
  emits: ["change", "clear", "clearAll"],
2667
- setup(i, { emit: a }) {
2668
- const v = i, t = _(v.value ?? {}), s = a;
2669
- function r(p, n) {
2670
- t.value = {
2671
- ...t.value,
2672
- [p]: n
2673
- }, s("change", {
2674
- data: Z(t.value),
2675
- name: p,
2676
- value: n
2662
+ setup(c, { expose: o, emit: b }) {
2663
+ const t = c, a = _(t.value ?? {}), r = b, u = _();
2664
+ function p(g) {
2665
+ if (Array.isArray(g))
2666
+ return g.map((l) => p(l));
2667
+ if (g !== null && typeof g == "object") {
2668
+ const l = ne(g), V = {};
2669
+ for (const C in l)
2670
+ V[C] = p(l[C]);
2671
+ return V;
2672
+ }
2673
+ return g;
2674
+ }
2675
+ function m(g, l) {
2676
+ l !== void 0 ? a.value = {
2677
+ ...a.value,
2678
+ [g]: l
2679
+ } : delete a.value[g], r("change", {
2680
+ data: p(a.value),
2681
+ name: g,
2682
+ value: p(l)
2677
2683
  });
2678
2684
  }
2679
- function c(p) {
2680
- delete t.value[p], s("clear", {
2681
- data: Z(t.value),
2682
- name: p
2685
+ function h(g) {
2686
+ delete a.value[g], r("clear", {
2687
+ data: p(a.value),
2688
+ name: g
2689
+ }), r("change", {
2690
+ data: p(a.value),
2691
+ name: g,
2692
+ value: null
2683
2693
  });
2684
2694
  }
2685
- function m() {
2686
- t.value = {}, s("clear", {
2687
- data: Z(t.value),
2695
+ function i() {
2696
+ a.value = {}, r("clear", {
2697
+ data: p(a.value),
2688
2698
  name: "ALL"
2689
- }), s("change", {
2690
- data: Z(t.value),
2699
+ }), r("change", {
2700
+ data: p(a.value),
2691
2701
  name: "ALL",
2692
2702
  value: null
2693
2703
  });
2694
2704
  }
2695
- const d = _({});
2696
- function x() {
2697
- switch (v.view) {
2705
+ const s = _({});
2706
+ function v() {
2707
+ switch (t.view) {
2698
2708
  case "inline":
2699
2709
  return Ce;
2700
2710
  case "vertical":
@@ -2705,40 +2715,52 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
2705
2715
  return Ce;
2706
2716
  }
2707
2717
  }
2708
- return M(
2709
- () => v.schema,
2710
- (p) => {
2711
- if (!p) {
2712
- d.value = {};
2718
+ F(
2719
+ () => t.schema,
2720
+ (g) => {
2721
+ if (!g) {
2722
+ s.value = {};
2713
2723
  return;
2714
2724
  }
2715
- if (Array.isArray(p) && !p.length) {
2716
- d.value = {};
2725
+ if (Array.isArray(g) && !g.length) {
2726
+ s.value = {};
2717
2727
  return;
2718
2728
  }
2719
- Array.isArray(p) ? d.value = p.filter((n) => n.type).reduce((n, o) => (Object.assign(o, { name: o.id || o.name, type: o.type.toLowerCase() }), n[o.name] = o, o.data && !o.api && !o.options && Object.assign(o, { api: `/api/suggest/${o.data}` }), n), {}) : (Object.entries(p).forEach(([n, o]) => {
2720
- Object.assign(o, { name: n || o.name || o.id, type: o.type.toLowerCase() });
2721
- }), d.value = { ...p });
2729
+ Array.isArray(g) ? s.value = g.filter((l) => l.type).reduce((l, V) => (Object.assign(V, { name: V.id || V.name, type: V.type.toLowerCase() }), l[V.name] = V, V.data && !V.api && !V.options && Object.assign(V, { api: `/api/suggest/${V.data}` }), l), {}) : (Object.entries(g).forEach(([l, V]) => {
2730
+ Object.assign(V, { name: l || V.name || V.id, type: V.type.toLowerCase() });
2731
+ }), s.value = { ...g });
2722
2732
  },
2723
2733
  { immediate: !0, deep: !0 }
2724
- ), (p, n) => (f(), S(ee(x()), P(v, {
2725
- schema: d.value,
2726
- onChange: n[0] || (n[0] = (o) => r(o.name, o.value)),
2727
- onClear: n[1] || (n[1] = (o) => c(o.name)),
2728
- onClearAll: m
2734
+ );
2735
+ function w(g) {
2736
+ u.value.clearFilter(g), h(g);
2737
+ }
2738
+ function y() {
2739
+ u.value.clearAllFilters(), i();
2740
+ }
2741
+ return o({
2742
+ clearAllFilters: y,
2743
+ clearFilter: w
2744
+ }), (g, l) => (f(), D(Z(v()), P(t, {
2745
+ schema: s.value,
2746
+ onChange: l[0] || (l[0] = (V) => m(V.name, V.value)),
2747
+ onClear: l[1] || (l[1] = (V) => h(V.name)),
2748
+ onClearAll: i,
2749
+ ref_key: "filterRef",
2750
+ ref: u
2729
2751
  }), {
2730
- default: le(() => [
2731
- ue(p.$slots, "default")
2752
+ default: te(() => [
2753
+ ue(g.$slots, "default")
2732
2754
  ]),
2733
2755
  _: 3
2734
2756
  }, 16, ["schema"]));
2735
2757
  }
2736
2758
  });
2737
- Ve.install = function(a) {
2738
- a.component("Filter", Ve), a.component("FilterField", oe);
2759
+ Ve.install = function(o) {
2760
+ o.component("Filter", Ve), o.component("FilterField", le);
2739
2761
  };
2740
2762
  export {
2741
2763
  Ve as Filter,
2742
- oe as FilterField,
2764
+ le as FilterField,
2743
2765
  Ve as default
2744
2766
  };