@opengis/filter 0.1.13 → 0.1.14

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.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { createElementBlock as w, openBlock as s, createElementVNode as r, defineComponent as W, ref as $, withModifiers as re, normalizeClass as U, createCommentVNode as V, toDisplayString as S, computed as L, watch as I, createStaticVNode as ze, Fragment as T, renderList as X, unref as e, createBlock as E, createVNode as Q, createTextVNode as G, withDirectives as Y, vShow as J, getCurrentInstance as Ne, vModelText as ee, onBeforeUnmount as pe, onMounted as ce, isRef as Pe, Teleport as ge, normalizeStyle as be, renderSlot as ue, nextTick as me, withCtx as oe, resolveDynamicComponent as ne, mergeProps as Z, toRaw as de, cloneVNode as Ye, useSlots as fe, reactive as We, withKeys as $e, createSlots as qe, normalizeProps as Qe, guardReactiveProps as He } from "vue";
1
+ import { createElementBlock as w, openBlock as i, createElementVNode as r, defineComponent as q, ref as A, withModifiers as re, normalizeClass as E, createCommentVNode as $, toDisplayString as S, computed as O, watch as U, createStaticVNode as ze, Fragment as I, renderList as X, unref as e, createBlock as T, createVNode as Q, createTextVNode as G, withDirectives as W, vShow as J, getCurrentInstance as Ne, vModelText as ee, onBeforeUnmount as pe, onMounted as ce, isRef as Pe, Teleport as ge, normalizeStyle as be, renderSlot as ue, nextTick as me, withCtx as oe, resolveDynamicComponent as ae, mergeProps as Z, toRaw as de, cloneVNode as Ye, useSlots as fe, reactive as We, withKeys as $e, createSlots as qe, normalizeProps as Qe, guardReactiveProps as He } from "vue";
2
2
  import { notify as Ae } from "@opengis/core";
3
- const te = (c, n) => {
4
- const v = c.__vccOpts || c;
5
- for (const [t, u] of n)
3
+ const te = (d, a) => {
4
+ const v = d.__vccOpts || d;
5
+ for (const [t, u] of a)
6
6
  v[t] = u;
7
7
  return v;
8
8
  }, Ge = {}, Xe = {
@@ -17,8 +17,8 @@ const te = (c, n) => {
17
17
  "stroke-linejoin": "round",
18
18
  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"
19
19
  };
20
- function Ze(c, n) {
21
- return s(), w("svg", Xe, n[0] || (n[0] = [
20
+ function Ze(d, a) {
21
+ return i(), w("svg", Xe, a[0] || (a[0] = [
22
22
  r("path", {
23
23
  stroke: "none",
24
24
  d: "M0 0h24v24H0z",
@@ -33,10 +33,10 @@ const Je = /* @__PURE__ */ te(Ge, [["render", Ze]]), et = { class: "flex items-c
33
33
  width: "16",
34
34
  height: "auto",
35
35
  src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
36
- }, ot = ["value"], nt = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, at = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, rt = {
36
+ }, ot = ["value"], at = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, nt = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, rt = {
37
37
  key: 0,
38
38
  class: "text-xs text-gray-500 dark:text-neutral-500 pr-1"
39
- }, he = /* @__PURE__ */ W({
39
+ }, he = /* @__PURE__ */ q({
40
40
  __name: "list-item",
41
41
  props: {
42
42
  layout: {},
@@ -49,44 +49,44 @@ const Je = /* @__PURE__ */ te(Ge, [["render", Ze]]), et = { class: "flex items-c
49
49
  highlighted: { type: Boolean }
50
50
  },
51
51
  emits: ["itemClick"],
52
- setup(c, { expose: n, emit: v }) {
53
- const t = c, u = v;
52
+ setup(d, { expose: a, emit: v }) {
53
+ const t = d, u = v;
54
54
  function l() {
55
55
  u("itemClick", t.value);
56
56
  }
57
- const g = $(null);
58
- return n({ el: g }), (a, f) => (s(), w("div", {
57
+ const b = A(null);
58
+ return a({ el: b }), (n, f) => (i(), w("div", {
59
59
  class: "flex items-center w-full rounded-sm group hover:bg-gray-100",
60
60
  ref_key: "el",
61
- ref: g
61
+ ref: b
62
62
  }, [
63
63
  r("div", et, [
64
64
  r("div", tt, [
65
65
  r("label", {
66
66
  for: "radio-9740",
67
- class: U([
68
- ["inline", "popover"].includes(a.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",
69
- { "bg-blue-100": a.highlighted }
67
+ class: E([
68
+ ["inline", "popover"].includes(n.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",
69
+ { "bg-blue-100": n.highlighted }
70
70
  ]),
71
71
  onClick: re(l, ["stop", "prevent"])
72
72
  }, [
73
73
  r("div", {
74
- class: U(["w-[18px] h-[18px] border flex items-center justify-center", [
75
- a.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
76
- a.color ? `bg-[${a.color}] border-[#ffffff]` : a.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
74
+ class: E(["w-[18px] h-[18px] border flex items-center justify-center", [
75
+ n.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
76
+ n.color ? `bg-[${n.color}] border-[#ffffff]` : n.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
77
77
  ]])
78
78
  }, [
79
- a.isSelected ? (s(), w("img", lt)) : V("", !0)
79
+ n.isSelected ? (i(), w("img", lt)) : $("", !0)
80
80
  ], 2),
81
81
  r("input", {
82
82
  type: "checkbox",
83
83
  class: "hidden",
84
84
  id: "radio-9740",
85
- value: a.value
85
+ value: n.value
86
86
  }, null, 8, ot),
87
- r("div", nt, [
88
- r("span", at, S(a.label ?? "Відсутні данні"), 1),
89
- a.count ? (s(), w("div", rt, " (" + S(a.count) + ") ", 1)) : V("", !0)
87
+ r("div", at, [
88
+ r("span", nt, S(n.label ?? "Відсутні данні"), 1),
89
+ n.count ? (i(), w("div", rt, " (" + S(n.count) + ") ", 1)) : $("", !0)
90
90
  ])
91
91
  ], 2)
92
92
  ])
@@ -94,53 +94,53 @@ const Je = /* @__PURE__ */ te(Ge, [["render", Ze]]), et = { class: "flex items-c
94
94
  ], 512));
95
95
  }
96
96
  });
97
- function xe(c, n) {
97
+ function xe(d, a) {
98
98
  const {
99
99
  options: v = [],
100
100
  limit: t = 20
101
- } = c;
101
+ } = d;
102
102
  function u(h) {
103
103
  return Array.isArray(h) ? h[0] : h;
104
104
  }
105
- const l = $(u(c.modelValue)), g = $(""), a = $(!1), f = $([]), y = $("id"), m = $("text"), d = $(!1), i = $(c.layout !== "popover" && v.length > t);
106
- function C(h) {
107
- const x = h.find(Boolean) ?? {}, D = ["id", "value", "code", "key"].find((A) => A in x) ?? "id", F = ["text", "label", "name", "title"].find((A) => A in x) ?? "text";
108
- return { autoValueKey: D, autoLabelKey: F };
105
+ const l = A(u(d.modelValue)), b = A(""), n = A(!1), f = A([]), y = A("id"), m = A("text"), c = A(!1), s = A(d.layout !== "popover" && v.length > t);
106
+ function V(h) {
107
+ const x = h.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((_) => _ in x) ?? "id", F = ["text", "label", "name", "title"].find((_) => _ in x) ?? "text";
108
+ return { autoValueKey: B, autoLabelKey: F };
109
109
  }
110
110
  if (v.length > 0) {
111
- const h = C(v);
111
+ const h = V(v);
112
112
  y.value = h.autoValueKey, m.value = h.autoLabelKey;
113
113
  }
114
- const k = L(() => {
114
+ const k = O(() => {
115
115
  const h = f.value;
116
- return c.layout === "popover" || d.value ? h : h.slice(0, t);
116
+ return d.layout === "popover" || c.value ? h : h.slice(0, t);
117
117
  });
118
- I(() => c.modelValue, (h) => {
118
+ U(() => d.modelValue, (h) => {
119
119
  l.value = u(h);
120
- }, { immediate: !0 }), f.value = [...v].sort((h, x) => c.sort === "count" ? x.count && h.count ? x.count - h.count : 0 : c.sort === "name" ? String(h[m.value] ?? "").localeCompare(String(x[m.value] ?? "")) : 0);
121
- function _(h) {
120
+ }, { immediate: !0 }), f.value = [...v].sort((h, x) => d.sort === "count" ? x.count && h.count ? x.count - h.count : 0 : d.sort === "name" ? String(h[m.value] ?? "").localeCompare(String(x[m.value] ?? "")) : 0);
121
+ function C(h) {
122
122
  return l.value === h[y.value];
123
123
  }
124
124
  function o(h) {
125
- l.value = h[y.value], n("update:modelValue", l.value), n("change", { name: c.name, value: l.value });
125
+ l.value = h[y.value], a("update:modelValue", l.value), a("change", { name: d.name, value: l.value });
126
126
  }
127
- function b() {
128
- l.value = void 0, n("update:modelValue", l.value), n("clear", c.name);
127
+ function g() {
128
+ l.value = void 0, a("update:modelValue", l.value), a("clear", d.name);
129
129
  }
130
130
  function p() {
131
- d.value = !d.value;
131
+ c.value = !c.value;
132
132
  }
133
133
  return {
134
134
  innerValue: l,
135
- searchTerm: g,
135
+ searchTerm: b,
136
136
  filteredOptions: k,
137
- isSelected: _,
137
+ isSelected: C,
138
138
  selectItem: o,
139
- clear: b,
139
+ clear: g,
140
140
  toggleShowAll: p,
141
- isReqProc: a,
142
- showAll: d,
143
- isEnableShowAll: i,
141
+ isReqProc: n,
142
+ showAll: c,
143
+ isEnableShowAll: s,
144
144
  labelKey: m,
145
145
  valueKey: y,
146
146
  allOptions: f
@@ -152,8 +152,8 @@ const st = {}, it = {
152
152
  fill: "none",
153
153
  xmlns: "http://www.w3.org/2000/svg"
154
154
  };
155
- function ut(c, n) {
156
- return s(), w("svg", it, n[0] || (n[0] = [
155
+ function ut(d, a) {
156
+ return i(), w("svg", it, a[0] || (a[0] = [
157
157
  ze('<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)
158
158
  ]));
159
159
  }
@@ -169,8 +169,8 @@ const we = /* @__PURE__ */ te(st, [["render", ut]]), dt = {}, ct = {
169
169
  "stroke-linejoin": "round",
170
170
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
171
171
  };
172
- function ft(c, n) {
173
- return s(), w("svg", ct, n[0] || (n[0] = [
172
+ function ft(d, a) {
173
+ return i(), w("svg", ct, a[0] || (a[0] = [
174
174
  r("path", {
175
175
  stroke: "none",
176
176
  d: "M0 0h24v24H0z",
@@ -191,8 +191,8 @@ const ve = /* @__PURE__ */ te(dt, [["render", ft]]), pt = {}, mt = {
191
191
  "stroke-linejoin": "round",
192
192
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
193
193
  };
194
- function vt(c, n) {
195
- return s(), w("svg", mt, n[0] || (n[0] = [
194
+ function vt(d, a) {
195
+ return i(), w("svg", mt, a[0] || (a[0] = [
196
196
  r("path", {
197
197
  stroke: "none",
198
198
  d: "M0 0h24v24H0z",
@@ -210,7 +210,7 @@ const ke = /* @__PURE__ */ te(pt, [["render", vt]]), yt = {
210
210
  }, ht = {
211
211
  key: 1,
212
212
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
213
- }, xt = /* @__PURE__ */ W({
213
+ }, xt = /* @__PURE__ */ q({
214
214
  __name: "radio",
215
215
  props: {
216
216
  id: {},
@@ -235,57 +235,58 @@ const ke = /* @__PURE__ */ te(pt, [["render", vt]]), yt = {
235
235
  mode: {},
236
236
  labelKey: {},
237
237
  sort: {},
238
- ua: {}
238
+ ua: {},
239
+ itemClass: {}
239
240
  },
240
241
  emits: ["update:modelValue", "change", "clear"],
241
- setup(c, { expose: n, emit: v }) {
242
- const t = c, u = $(null), l = v, {
243
- innerValue: g,
244
- filteredOptions: a,
242
+ setup(d, { expose: a, emit: v }) {
243
+ const t = d, u = A(null), l = v, {
244
+ innerValue: b,
245
+ filteredOptions: n,
245
246
  isSelected: f,
246
247
  selectItem: y,
247
248
  clear: m,
248
- toggleShowAll: d,
249
- isReqProc: i,
250
- showAll: C,
249
+ toggleShowAll: c,
250
+ isReqProc: s,
251
+ showAll: V,
251
252
  isEnableShowAll: k,
252
- labelKey: _,
253
+ labelKey: C,
253
254
  valueKey: o,
254
- allOptions: b
255
+ allOptions: g
255
256
  } = xe({
256
257
  ...t,
257
258
  modelValue: t.modelValue ?? t.default ?? ""
258
259
  }, l);
259
- return n({
260
+ return a({
260
261
  clear: m,
261
262
  inputTextRef: u
262
- }), I(
263
+ }), U(
263
264
  () => t.modelValue,
264
265
  (p) => {
265
- p === void 0 && (g.value = void 0);
266
+ p === void 0 && (b.value = void 0);
266
267
  }
267
- ), (p, h) => (s(), w("div", {
268
- class: U([p.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
268
+ ), (p, h) => (i(), w("div", {
269
+ class: E([p.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
269
270
  }, [
270
271
  r("div", {
271
- class: U([
272
+ class: E([
272
273
  p.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
273
274
  p.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
274
275
  ])
275
276
  }, [
276
- (s(!0), w(T, null, X(e(a), (x) => (s(), E(he, {
277
+ (i(!0), w(I, null, X(e(n), (x) => (i(), T(he, {
277
278
  layout: p.layout,
278
279
  key: x[e(o)],
279
280
  count: x.count,
280
- label: x[e(_)],
281
+ label: x[e(C)],
281
282
  color: x.color,
282
283
  type: "radio",
283
284
  value: x[e(o)],
284
285
  "is-selected": e(f)(x),
285
- onItemClick: (D) => e(y)(x)
286
+ onItemClick: (B) => e(y)(x)
286
287
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
287
288
  ], 2),
288
- p.type === "select" && e(a).length === 0 && !e(i) ? (s(), w("div", yt, [
289
+ p.type === "select" && e(n).length === 0 && !e(s) ? (i(), w("div", yt, [
289
290
  r("div", gt, [
290
291
  Q(we),
291
292
  h[4] || (h[4] = r("div", { class: "max-w-sm mx-auto mt-6" }, [
@@ -293,100 +294,100 @@ const ke = /* @__PURE__ */ te(pt, [["render", vt]]), yt = {
293
294
  r("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
294
295
  ], -1))
295
296
  ])
296
- ])) : V("", !0),
297
- p.layout !== "popover" && p.type !== "select" ? (s(), w(T, { key: 1 }, [
298
- !e(C) && e(k) ? (s(), w("div", {
297
+ ])) : $("", !0),
298
+ p.layout !== "popover" && p.type !== "select" ? (i(), w(I, { key: 1 }, [
299
+ !e(V) && e(k) ? (i(), w("div", {
299
300
  key: 0,
300
301
  onClick: h[0] || (h[0] = //@ts-ignore
301
- (...x) => e(d) && e(d)(...x)),
302
+ (...x) => e(c) && e(c)(...x)),
302
303
  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"
303
304
  }, [
304
305
  h[5] || (h[5] = G(" Показати більше ", -1)),
305
306
  Q(ve)
306
- ])) : V("", !0),
307
- e(C) ? (s(), w("div", {
307
+ ])) : $("", !0),
308
+ e(V) ? (i(), w("div", {
308
309
  key: 1,
309
310
  onClick: h[1] || (h[1] = //@ts-ignore
310
- (...x) => e(d) && e(d)(...x)),
311
+ (...x) => e(c) && e(c)(...x)),
311
312
  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"
312
313
  }, [
313
314
  h[6] || (h[6] = G(" Показати менше ", -1)),
314
315
  Q(ke)
315
- ])) : V("", !0)
316
- ], 64)) : V("", !0),
317
- p.cleanable ? (s(), w(T, { key: 2 }, [
318
- p.layout === "inline" ? (s(), w("div", bt, [
319
- G(S(e(g) || e(g) === null ? 1 : 0) + " з " + S(e(b).length) + " обрано ", 1),
320
- Y(r("button", {
316
+ ])) : $("", !0)
317
+ ], 64)) : $("", !0),
318
+ p.cleanable ? (i(), w(I, { key: 2 }, [
319
+ p.layout === "inline" ? (i(), w("div", bt, [
320
+ G(S(e(b) || e(b) === null ? 1 : 0) + " з " + S(e(g).length) + " обрано ", 1),
321
+ W(r("button", {
321
322
  class: "text-gray-600 hover:text-gray-800",
322
323
  onClick: h[2] || (h[2] = //@ts-ignore
323
324
  (...x) => e(m) && e(m)(...x))
324
325
  }, " Очистити ", 512), [
325
- [J, e(g) !== "" && e(g) !== void 0]
326
+ [J, e(b) !== "" && e(b) !== void 0]
326
327
  ])
327
- ])) : V("", !0),
328
- p.layout === "popover" ? (s(), w("div", ht, [
329
- r("span", null, S(e(g) || e(g) === null ? 1 : 0) + " з " + S(e(b).length) + " обрано", 1),
330
- Y(r("button", {
328
+ ])) : $("", !0),
329
+ p.layout === "popover" ? (i(), w("div", ht, [
330
+ r("span", null, S(e(b) || e(b) === null ? 1 : 0) + " з " + S(e(g).length) + " обрано", 1),
331
+ W(r("button", {
331
332
  class: "text-gray-600 hover:text-gray-800",
332
333
  onClick: h[3] || (h[3] = //@ts-ignore
333
334
  (...x) => e(m) && e(m)(...x))
334
335
  }, " Очистити ", 512), [
335
- [J, e(g) !== "" && e(g) !== void 0]
336
+ [J, e(b) !== "" && e(b) !== void 0]
336
337
  ])
337
- ])) : V("", !0)
338
- ], 64)) : V("", !0)
338
+ ])) : $("", !0)
339
+ ], 64)) : $("", !0)
339
340
  ], 2));
340
341
  }
341
342
  });
342
- function Fe(c, n) {
343
+ function Fe(d, a) {
343
344
  const {
344
345
  options: v = [],
345
346
  limit: t = 20
346
- } = c;
347
+ } = d;
347
348
  function u(h) {
348
349
  return Array.isArray(h) ? h : h ? [h] : [];
349
350
  }
350
- const l = $(u(c.modelValue)), g = $(""), a = $(!1), f = $([]), y = $("id"), m = $("text"), d = $(!1), i = $(c.layout !== "popover" && v.length > t);
351
- function C(h) {
352
- const x = h.find(Boolean) ?? {}, D = ["id", "value", "code", "key"].find((A) => A in x) ?? "id", F = ["text", "label", "name", "title"].find((A) => A in x) ?? "text";
353
- return { autoValueKey: D, autoLabelKey: F };
351
+ const l = A(u(d.modelValue)), b = A(""), n = A(!1), f = A([]), y = A("id"), m = A("text"), c = A(!1), s = A(d.layout !== "popover" && v.length > t);
352
+ function V(h) {
353
+ const x = h.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((_) => _ in x) ?? "id", F = ["text", "label", "name", "title"].find((_) => _ in x) ?? "text";
354
+ return { autoValueKey: B, autoLabelKey: F };
354
355
  }
355
356
  if (v.length > 0) {
356
- const h = C(v);
357
+ const h = V(v);
357
358
  y.value = h.autoValueKey, m.value = h.autoLabelKey;
358
359
  }
359
- const k = L(() => {
360
+ const k = O(() => {
360
361
  const h = f.value;
361
- return c.layout === "popover" || d.value ? h : h.slice(0, t);
362
+ return d.layout === "popover" || c.value ? h : h.slice(0, t);
362
363
  });
363
- I(() => c.modelValue, (h) => {
364
+ U(() => d.modelValue, (h) => {
364
365
  l.value = u(h);
365
- }, { immediate: !0 }), f.value = [...v].sort((h, x) => c.sort === "count" ? x.count && h.count ? x.count - h.count : 0 : c.sort === "name" ? String(h[m.value]).localeCompare(String(x[m.value])) : 0);
366
- function _(h) {
366
+ }, { immediate: !0 }), f.value = [...v].sort((h, x) => d.sort === "count" ? x.count && h.count ? x.count - h.count : 0 : d.sort === "name" ? String(h[m.value]).localeCompare(String(x[m.value])) : 0);
367
+ function C(h) {
367
368
  return l.value && l.value.includes(h[y.value]);
368
369
  }
369
370
  function o(h) {
370
371
  const x = l.value.includes(h[y.value]);
371
- l.value = x ? l.value.filter((D) => D !== h[y.value]) : [...l.value, h[y.value]], n("update:modelValue", l.value), n("change", { name: c.name, value: l.value });
372
+ l.value = x ? l.value.filter((B) => B !== h[y.value]) : [...l.value, h[y.value]], a("update:modelValue", l.value), a("change", { name: d.name, value: l.value });
372
373
  }
373
- function b() {
374
- l.value = [], n("update:modelValue", l.value), n("clear", c.name);
374
+ function g() {
375
+ l.value = [], a("update:modelValue", l.value), a("clear", d.name);
375
376
  }
376
377
  function p() {
377
- d.value = !d.value;
378
+ c.value = !c.value;
378
379
  }
379
380
  return {
380
381
  innerValue: l,
381
- searchTerm: g,
382
+ searchTerm: b,
382
383
  filteredOptions: k,
383
- isSelected: _,
384
+ isSelected: C,
384
385
  selectItem: o,
385
- clear: b,
386
+ clear: g,
386
387
  toggleShowAll: p,
387
- isReqProc: a,
388
- showAll: d,
389
- isEnableShowAll: i,
388
+ isReqProc: n,
389
+ showAll: c,
390
+ isEnableShowAll: s,
390
391
  labelKey: m,
391
392
  valueKey: y,
392
393
  allOptions: f
@@ -428,24 +429,24 @@ const Se = {
428
429
  next: "Настпуний період"
429
430
  }
430
431
  };
431
- function wt(c) {
432
- const n = c.split(".")[1], v = typeof window < "u" && window.localStorage ? localStorage.locale : null;
433
- return (Se[v || navigator.language] || Se.uk)[n];
432
+ function wt(d) {
433
+ const a = d.split(".")[1], v = typeof window < "u" && window.localStorage ? localStorage.locale : null;
434
+ return (Se[v || navigator.language] || Se.uk)[a];
434
435
  }
435
436
  function se() {
436
- const c = Ne();
437
- return c.appContext.config.globalProperties.$i18n ? c.appContext.config.globalProperties.$t : wt;
437
+ const d = Ne();
438
+ return d.appContext.config.globalProperties.$i18n ? d.appContext.config.globalProperties.$t : wt;
438
439
  }
439
440
  const kt = {
440
441
  key: 0,
441
442
  class: "w-full"
442
- }, Ct = { class: "flex flex-col items-center justify-center p-5 text-center" }, _t = { class: "max-w-sm mx-auto mt-6" }, Vt = { class: "font-medium text-gray-800 dark:text-neutral-200" }, $t = {
443
+ }, Ct = { class: "flex flex-col items-center justify-center p-5 text-center" }, Vt = { class: "max-w-sm mx-auto mt-6" }, _t = { class: "font-medium text-gray-800 dark:text-neutral-200" }, $t = {
443
444
  key: 0,
444
445
  class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
445
446
  }, At = {
446
447
  key: 1,
447
448
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
448
- }, Be = /* @__PURE__ */ W({
449
+ }, Be = /* @__PURE__ */ q({
449
450
  __name: "checkbox",
450
451
  props: {
451
452
  id: {},
@@ -470,105 +471,106 @@ const kt = {
470
471
  mode: {},
471
472
  labelKey: {},
472
473
  sort: {},
473
- ua: {}
474
+ ua: {},
475
+ itemClass: {}
474
476
  },
475
477
  emits: ["update:modelValue", "change", "clear"],
476
- setup(c, { expose: n, emit: v }) {
477
- const t = se(), u = c, l = v, {
478
- innerValue: g,
479
- filteredOptions: a,
478
+ setup(d, { expose: a, emit: v }) {
479
+ const t = se(), u = d, l = v, {
480
+ innerValue: b,
481
+ filteredOptions: n,
480
482
  isSelected: f,
481
483
  selectItem: y,
482
484
  clear: m,
483
- toggleShowAll: d,
484
- isReqProc: i,
485
- showAll: C,
485
+ toggleShowAll: c,
486
+ isReqProc: s,
487
+ showAll: V,
486
488
  isEnableShowAll: k,
487
- labelKey: _,
489
+ labelKey: C,
488
490
  valueKey: o,
489
- allOptions: b
491
+ allOptions: g
490
492
  } = Fe({
491
493
  ...u,
492
494
  modelValue: u.modelValue
493
495
  }, l);
494
- return I(
496
+ return U(
495
497
  () => u.modelValue,
496
498
  (p) => {
497
- p === void 0 && (g.value = []);
499
+ p === void 0 && (b.value = []);
498
500
  }
499
- ), n({
501
+ ), a({
500
502
  clear: m
501
- }), (p, h) => (s(), w("div", {
502
- class: U([p.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
503
+ }), (p, h) => (i(), w("div", {
504
+ class: E([p.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
503
505
  }, [
504
506
  r("div", {
505
- class: U([
507
+ class: E([
506
508
  p.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
507
509
  p.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
508
510
  ])
509
511
  }, [
510
- (s(!0), w(T, null, X(e(a), (x) => (s(), E(he, {
512
+ (i(!0), w(I, null, X(e(n), (x) => (i(), T(he, {
511
513
  layout: p.layout,
512
514
  count: x.count,
513
- label: x[e(_)],
515
+ label: x[e(C)],
514
516
  color: x.color,
515
517
  type: "checkbox",
516
518
  value: x[e(o)],
517
519
  "is-selected": e(f)(x),
518
- onItemClick: (D) => e(y)(x)
520
+ onItemClick: (B) => e(y)(x)
519
521
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
520
522
  ], 2),
521
- p.type === "select" && e(a).length === 0 && !e(i) ? (s(), w("div", kt, [
523
+ p.type === "select" && e(n).length === 0 && !e(s) ? (i(), w("div", kt, [
522
524
  r("div", Ct, [
523
525
  Q(we),
524
- r("div", _t, [
525
- r("p", Vt, S(e(t)("filter.notfound")), 1),
526
+ r("div", Vt, [
527
+ r("p", _t, S(e(t)("filter.notfound")), 1),
526
528
  h[4] || (h[4] = r("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
527
529
  ])
528
530
  ])
529
- ])) : V("", !0),
530
- p.layout !== "popover" && p.type !== "select" ? (s(), w(T, { key: 1 }, [
531
- !e(C) && e(k) ? (s(), w("div", {
531
+ ])) : $("", !0),
532
+ p.layout !== "popover" && p.type !== "select" ? (i(), w(I, { key: 1 }, [
533
+ !e(V) && e(k) ? (i(), w("div", {
532
534
  key: 0,
533
535
  onClick: h[0] || (h[0] = //@ts-ignore
534
- (...x) => e(d) && e(d)(...x)),
536
+ (...x) => e(c) && e(c)(...x)),
535
537
  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"
536
538
  }, [
537
539
  G(S(e(t)("filter.more")) + " ", 1),
538
540
  Q(ve)
539
- ])) : V("", !0),
540
- e(C) ? (s(), w("div", {
541
+ ])) : $("", !0),
542
+ e(V) ? (i(), w("div", {
541
543
  key: 1,
542
544
  onClick: h[1] || (h[1] = //@ts-ignore
543
- (...x) => e(d) && e(d)(...x)),
545
+ (...x) => e(c) && e(c)(...x)),
544
546
  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"
545
547
  }, [
546
548
  G(S(e(t)("filter.less")) + " ", 1),
547
549
  Q(ke)
548
- ])) : V("", !0)
549
- ], 64)) : V("", !0),
550
- p.cleanable ? (s(), w(T, { key: 2 }, [
551
- p.layout === "inline" ? (s(), w("div", $t, [
552
- G(S(e(g).length) + " / " + S(e(b).length) + " " + S(e(t)("filter.selected")) + " ", 1),
553
- Y(r("button", {
550
+ ])) : $("", !0)
551
+ ], 64)) : $("", !0),
552
+ p.cleanable ? (i(), w(I, { key: 2 }, [
553
+ p.layout === "inline" ? (i(), w("div", $t, [
554
+ G(S(e(b).length) + " / " + S(e(g).length) + " " + S(e(t)("filter.selected")) + " ", 1),
555
+ W(r("button", {
554
556
  class: "text-gray-600 hover:text-gray-800",
555
557
  onClick: h[2] || (h[2] = //@ts-ignore
556
558
  (...x) => e(m) && e(m)(...x))
557
559
  }, S(e(t)("filter.clear")), 513), [
558
- [J, e(g).length !== 0]
560
+ [J, e(b).length !== 0]
559
561
  ])
560
- ])) : V("", !0),
561
- p.layout === "popover" ? (s(), w("div", At, [
562
- r("span", null, S(e(g).length) + " / " + S(e(b).length) + " " + S(e(t)("filter.selected")), 1),
563
- Y(r("button", {
562
+ ])) : $("", !0),
563
+ p.layout === "popover" ? (i(), w("div", At, [
564
+ r("span", null, S(e(b).length) + " / " + S(e(g).length) + " " + S(e(t)("filter.selected")), 1),
565
+ W(r("button", {
564
566
  class: "text-gray-600 hover:text-gray-800",
565
567
  onClick: h[3] || (h[3] = //@ts-ignore
566
568
  (...x) => e(m) && e(m)(...x))
567
569
  }, S(e(t)("filter.clear")), 513), [
568
- [J, e(g).length !== 0]
570
+ [J, e(b).length !== 0]
569
571
  ])
570
- ])) : V("", !0)
571
- ], 64)) : V("", !0)
572
+ ])) : $("", !0)
573
+ ], 64)) : $("", !0)
572
574
  ], 2));
573
575
  }
574
576
  }), St = {}, Bt = {
@@ -583,8 +585,8 @@ const kt = {
583
585
  "stroke-linejoin": "round",
584
586
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
585
587
  };
586
- function Dt(c, n) {
587
- return s(), w("svg", Bt, n[0] || (n[0] = [
588
+ function jt(d, a) {
589
+ return i(), w("svg", Bt, a[0] || (a[0] = [
588
590
  r("path", {
589
591
  stroke: "none",
590
592
  d: "M0 0h24v24H0z",
@@ -594,7 +596,7 @@ function Dt(c, n) {
594
596
  r("path", { d: "M21 21l-6 -6" }, null, -1)
595
597
  ]));
596
598
  }
597
- const Me = /* @__PURE__ */ te(St, [["render", Dt]]), jt = {}, Rt = {
599
+ const Me = /* @__PURE__ */ te(St, [["render", jt]]), Dt = {}, Rt = {
598
600
  xmlns: "http://www.w3.org/2000/svg",
599
601
  viewBox: "0 0 24 24",
600
602
  fill: "none",
@@ -606,8 +608,8 @@ const Me = /* @__PURE__ */ te(St, [["render", Dt]]), jt = {}, Rt = {
606
608
  width: "15px",
607
609
  height: "15px"
608
610
  };
609
- function Kt(c, n) {
610
- return s(), w("svg", Rt, n[0] || (n[0] = [
611
+ function Kt(d, a) {
612
+ return i(), w("svg", Rt, a[0] || (a[0] = [
611
613
  r("path", {
612
614
  stroke: "none",
613
615
  d: "M0 0h24v24H0z",
@@ -617,13 +619,13 @@ function Kt(c, n) {
617
619
  r("path", { d: "M6 6l12 12" }, null, -1)
618
620
  ]));
619
621
  }
620
- const Ce = /* @__PURE__ */ te(jt, [["render", Kt]]);
622
+ const Ce = /* @__PURE__ */ te(Dt, [["render", Kt]]);
621
623
  class Le {
622
- static getWidthClass(n) {
623
- return typeof n == "number" ? `max-w-[${n}px] min-w-[${n}px]` : typeof n == "string" ? n.endsWith("%") || n.endsWith("px") ? `max-w-[${n}]` : `max-w-${n}` : "w-full";
624
+ static getWidthClass(a) {
625
+ return typeof a == "number" ? `max-w-[${a}px] min-w-[${a}px]` : typeof a == "string" ? a.endsWith("%") || a.endsWith("px") ? `max-w-[${a}]` : `max-w-${a}` : "w-full";
624
626
  }
625
627
  }
626
- const Ft = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Mt = ["placeholder"], Lt = /* @__PURE__ */ W({
628
+ const Ft = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Mt = ["placeholder"], Lt = /* @__PURE__ */ q({
627
629
  __name: "text-input",
628
630
  props: {
629
631
  id: {},
@@ -648,32 +650,33 @@ const Ft = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
648
650
  mode: {},
649
651
  labelKey: {},
650
652
  sort: {},
651
- ua: {}
653
+ ua: {},
654
+ itemClass: {}
652
655
  },
653
656
  emits: ["update:modelValue", "change", "clear"],
654
- setup(c, { emit: n }) {
655
- const v = c, t = $((v.placeholder || v.label || v.title || v.name || "search").toString()), u = n, l = $(v.modelValue?.toString() ?? "");
656
- I(
657
+ setup(d, { emit: a }) {
658
+ const v = d, t = A((v.placeholder || v.label || v.title || v.name || "search").toString()), u = a, l = A(v.modelValue?.toString() ?? "");
659
+ U(
657
660
  () => v.modelValue,
658
661
  (y) => {
659
662
  y !== l.value && (l.value = y?.toString() ?? "");
660
663
  }
661
664
  );
662
- let g = null;
663
- function a() {
665
+ let b = null;
666
+ function n() {
664
667
  if (l.value = l.value.trimStart(), l.value.length === 0) {
665
668
  f();
666
669
  return;
667
670
  }
668
- g && clearTimeout(g), g = setTimeout(() => {
671
+ b && clearTimeout(b), b = setTimeout(() => {
669
672
  u("update:modelValue", l.value), u("change", { name: v.name, value: l.value });
670
673
  }, 300);
671
674
  }
672
675
  function f() {
673
676
  l.value = "", u("update:modelValue", ""), u("clear", v.name);
674
677
  }
675
- return (y, m) => (s(), w("div", {
676
- class: U([
678
+ return (y, m) => (i(), w("div", {
679
+ class: E([
677
680
  "vs-form-text relative bg-white rounded-sm [&>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-sm [&>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",
678
681
  y.layout === "inline" ? e(Le).getWidthClass(y.width) : "mb-2" + (y.layout === "popover" ? " m-2" : "")
679
682
  ])
@@ -681,17 +684,17 @@ const Ft = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
681
684
  r("div", Ft, [
682
685
  Q(Me)
683
686
  ]),
684
- l.value !== "" ? (s(), w("div", {
687
+ l.value !== "" ? (i(), w("div", {
685
688
  key: 0,
686
689
  onClick: f,
687
690
  class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
688
691
  }, [
689
692
  Q(Ce)
690
- ])) : V("", !0),
691
- Y(r("input", {
693
+ ])) : $("", !0),
694
+ W(r("input", {
692
695
  type: "text",
693
- "onUpdate:modelValue": m[0] || (m[0] = (d) => l.value = d),
694
- onInput: a,
696
+ "onUpdate:modelValue": m[0] || (m[0] = (c) => l.value = c),
697
+ onInput: n,
695
698
  placeholder: t.value,
696
699
  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-sm 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"
697
700
  }, null, 40, Mt), [
@@ -700,10 +703,10 @@ const Ft = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
700
703
  ], 2));
701
704
  }
702
705
  });
703
- function Ee(c = { color: "blue" }) {
704
- return L(() => {
705
- 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-${c.color}-500 focus:border-transparent`;
706
- return c?.size === "sm" ? `${v}h-[32px]` : `${v}h-[38px]`;
706
+ function Ee(d = { color: "blue" }) {
707
+ return O(() => {
708
+ 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-${d.color}-500 focus:border-transparent`;
709
+ return d?.size === "sm" ? `${v}h-[32px]` : `${v}h-[38px]`;
707
710
  });
708
711
  }
709
712
  function Et() {
@@ -712,8 +715,8 @@ function Et() {
712
715
  function Ot() {
713
716
  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";
714
717
  }
715
- function Oe(c) {
716
- return c === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border 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-sm border bg-white-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-1 bg-transparent h-[38px]";
718
+ function Oe(d) {
719
+ return d === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border 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" : d === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border bg-white-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-1 bg-transparent h-[38px]";
717
720
  }
718
721
  const Tt = {
719
722
  key: 0,
@@ -725,7 +728,7 @@ const Tt = {
725
728
  key: 0,
726
729
  class: "block text-xs font-medium text-gray-600 mb-1"
727
730
  }, Nt = ["placeholder", "disabled"], Pt = ["disabled"];
728
- const Yt = /* @__PURE__ */ W({
731
+ const Yt = /* @__PURE__ */ q({
729
732
  __name: "range-input",
730
733
  props: {
731
734
  id: {},
@@ -750,145 +753,146 @@ const Yt = /* @__PURE__ */ W({
750
753
  mode: {},
751
754
  labelKey: {},
752
755
  sort: {},
753
- ua: {}
756
+ ua: {},
757
+ itemClass: {}
754
758
  },
755
759
  emits: ["update:modelValue", "change", "clear"],
756
- setup(c, { expose: n, emit: v }) {
757
- const t = Ee(), u = Et(), l = se(), g = c, a = $(
758
- g.modelValue ?? g.default ?? []
759
- ), f = v, y = L({
760
- get: () => g.modelValue ?? a.value,
761
- set: (i) => {
762
- g.modelValue !== void 0 ? f("update:modelValue", i) : a.value = i;
760
+ setup(d, { expose: a, emit: v }) {
761
+ const t = Ee(), u = Et(), l = se(), b = d, n = A(
762
+ b.modelValue ?? b.default ?? []
763
+ ), f = v, y = O({
764
+ get: () => b.modelValue ?? n.value,
765
+ set: (s) => {
766
+ b.modelValue !== void 0 ? f("update:modelValue", s) : n.value = s;
763
767
  }
764
768
  });
765
769
  function m() {
766
- f("change", { name: g.name, value: y.value || a.value });
770
+ f("change", { name: b.name, value: y.value || n.value });
767
771
  }
768
- function d() {
769
- a.value = [], y.value = a.value, f("clear", g.name);
772
+ function c() {
773
+ n.value = [], y.value = n.value, f("clear", b.name);
770
774
  }
771
- return I(() => g.modelValue, (i) => {
772
- i !== void 0 && g.layout !== "popover" ? (a.value = i, f("update:modelValue", i)) : a.value = [];
773
- }), n({
774
- clear: d,
775
+ return U(() => b.modelValue, (s) => {
776
+ s !== void 0 && b.layout !== "popover" ? (n.value = s, f("update:modelValue", s)) : n.value = [];
777
+ }), a({
778
+ clear: c,
775
779
  currentValue: y
776
- }), (i, C) => (s(), w(T, null, [
780
+ }), (s, V) => (i(), w(I, null, [
777
781
  r("div", null, [
778
782
  r("div", {
779
- class: U(i.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
783
+ class: E(s.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
780
784
  }, [
781
785
  r("div", null, [
782
- i.layout !== "vertical" ? (s(), w("label", Tt, S(e(l)("filter.from")), 1)) : V("", !0),
783
- Y(r("input", {
786
+ s.layout !== "vertical" ? (i(), w("label", Tt, S(e(l)("filter.from")), 1)) : $("", !0),
787
+ W(r("input", {
784
788
  type: "number",
785
- class: U(e(t)),
786
- placeholder: i.placeholder?.[0] ?? "min",
789
+ class: E(e(t)),
790
+ placeholder: s.placeholder?.[0] ?? "min",
787
791
  step: "1",
788
792
  style: { outline: "none" },
789
- "onUpdate:modelValue": C[0] || (C[0] = (k) => y.value[0] = k),
790
- disabled: i.disabled
793
+ "onUpdate:modelValue": V[0] || (V[0] = (k) => y.value[0] = k),
794
+ disabled: s.disabled
791
795
  }, null, 10, It), [
792
796
  [ee, y.value[0]]
793
797
  ])
794
798
  ]),
795
- i.layout === "vertical" ? (s(), w("label", Ut, " - ")) : V("", !0),
799
+ s.layout === "vertical" ? (i(), w("label", Ut, " - ")) : $("", !0),
796
800
  r("div", null, [
797
- i.layout !== "vertical" ? (s(), w("label", zt, S(e(l)("filter.to")), 1)) : V("", !0),
798
- Y(r("input", {
801
+ s.layout !== "vertical" ? (i(), w("label", zt, S(e(l)("filter.to")), 1)) : $("", !0),
802
+ W(r("input", {
799
803
  type: "number",
800
- class: U(e(t)),
801
- placeholder: i.placeholder?.[1] ?? "max",
804
+ class: E(e(t)),
805
+ placeholder: s.placeholder?.[1] ?? "max",
802
806
  min: "0",
803
807
  max: "1000000000000000",
804
808
  step: "1",
805
809
  style: { outline: "none" },
806
- "onUpdate:modelValue": C[1] || (C[1] = (k) => y.value[1] = k),
807
- disabled: i.disabled
810
+ "onUpdate:modelValue": V[1] || (V[1] = (k) => y.value[1] = k),
811
+ disabled: s.disabled
808
812
  }, null, 10, Nt), [
809
813
  [ee, y.value[1]]
810
814
  ])
811
815
  ]),
812
- ["popover", "inline", "vertical"].includes(i.layout) ? (s(), w("button", {
816
+ ["popover", "inline", "vertical"].includes(s.layout) ? (i(), w("button", {
813
817
  key: 1,
814
818
  onClick: m,
815
- class: U(e(u) + (i.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
816
- }, S(i.layout === "vertical" ? "Ok" : e(l)("filter.apply")), 3)) : V("", !0),
817
- ["popover", "inline"].includes(i.layout) ? (s(), w("button", {
819
+ class: E(e(u) + (s.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
820
+ }, S(s.layout === "vertical" ? "Ok" : e(l)("filter.apply")), 3)) : $("", !0),
821
+ ["popover", "inline"].includes(s.layout) ? (i(), w("button", {
818
822
  key: 2,
819
823
  disabled: !(y.value[0] || y.value[1]),
820
- onClick: d,
821
- class: U(e(u) + " hover:bg-gray-100")
822
- }, S(e(l)("filter.clear")), 11, Pt)) : V("", !0)
824
+ onClick: c,
825
+ class: E(e(u) + " hover:bg-gray-100")
826
+ }, S(e(l)("filter.clear")), 11, Pt)) : $("", !0)
823
827
  ], 2)
824
828
  ]),
825
- (i.cleanable && a.value.length, V("", !0))
829
+ (s.cleanable && n.value.length, $("", !0))
826
830
  ], 64));
827
831
  }
828
832
  });
829
- function Wt(c) {
830
- return String(c).charAt(0).toUpperCase() + String(c).slice(1);
833
+ function Wt(d) {
834
+ return String(d).charAt(0).toUpperCase() + String(d).slice(1);
831
835
  }
832
836
  class H {
833
- static format(n) {
834
- const v = n.getFullYear(), t = (n.getMonth() + 1).toString().padStart(2, "0"), u = n.getDate().toString().padStart(2, "0");
837
+ static format(a) {
838
+ const v = a.getFullYear(), t = (a.getMonth() + 1).toString().padStart(2, "0"), u = a.getDate().toString().padStart(2, "0");
835
839
  return `${v}-${t}-${u}`;
836
840
  }
837
- static getShiftedDay(n, v = 0) {
838
- const t = n ? new Date(n) : /* @__PURE__ */ new Date();
841
+ static getShiftedDay(a, v = 0) {
842
+ const t = a ? new Date(a) : /* @__PURE__ */ new Date();
839
843
  return t.setDate(t.getDate() + v), this.format(t);
840
844
  }
841
- static getLastWeekRange(n, v, t = 0) {
842
- if (n && v) {
843
- const y = new Date(n), m = new Date(v);
845
+ static getLastWeekRange(a, v, t = 0) {
846
+ if (a && v) {
847
+ const y = new Date(a), m = new Date(v);
844
848
  return y.setDate(y.getDate() + t * 7), m.setDate(m.getDate() + t * 7), [this.format(y), this.format(m)];
845
849
  }
846
- const u = /* @__PURE__ */ new Date(), l = u.getDay(), g = l === 0 ? 13 : l - 1 + 7, a = new Date(u);
847
- a.setDate(u.getDate() - g + t * 7);
848
- const f = new Date(a);
849
- return f.setDate(a.getDate() + 6), [this.format(a), this.format(f)];
850
+ const u = /* @__PURE__ */ new Date(), l = u.getDay(), b = l === 0 ? 13 : l - 1 + 7, n = new Date(u);
851
+ n.setDate(u.getDate() - b + t * 7);
852
+ const f = new Date(n);
853
+ return f.setDate(n.getDate() + 6), [this.format(n), this.format(f)];
850
854
  }
851
- static getMonthRange(n, v, t = 0) {
855
+ static getMonthRange(a, v, t = 0) {
852
856
  let u;
853
- n ? u = new Date(n) : u = /* @__PURE__ */ new Date(), u = new Date(u.getFullYear(), u.getMonth() + t, 1);
854
- const l = u, g = new Date(u.getFullYear(), u.getMonth() + 1, 0);
855
- return [this.format(l), this.format(g)];
856
- }
857
- static getQuarterRange(n, v, t = 0) {
858
- const u = n || v, l = u ? new Date(u) : /* @__PURE__ */ new Date();
859
- let g = Math.floor(l.getMonth() / 3);
860
- g += t;
861
- const a = (g % 4 + 4) % 4 * 3, f = l.getFullYear() + Math.floor(g / 4), y = new Date(f, a, 1), m = new Date(f, a + 3, 0);
857
+ a ? u = new Date(a) : u = /* @__PURE__ */ new Date(), u = new Date(u.getFullYear(), u.getMonth() + t, 1);
858
+ const l = u, b = new Date(u.getFullYear(), u.getMonth() + 1, 0);
859
+ return [this.format(l), this.format(b)];
860
+ }
861
+ static getQuarterRange(a, v, t = 0) {
862
+ const u = a || v, l = u ? new Date(u) : /* @__PURE__ */ new Date();
863
+ let b = Math.floor(l.getMonth() / 3);
864
+ b += t;
865
+ const n = (b % 4 + 4) % 4 * 3, f = l.getFullYear() + Math.floor(b / 4), y = new Date(f, n, 1), m = new Date(f, n + 3, 0);
862
866
  return [this.format(y), this.format(m)];
863
867
  }
864
- static getYear(n, v = 0) {
868
+ static getYear(a, v = 0) {
865
869
  let t;
866
- return n && /^\d{4}$/.test(n) ? t = parseInt(n, 10) : n ? t = new Date(n).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + v);
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);
867
871
  }
868
- static getYearRange(n, v = 0) {
872
+ static getYearRange(a, v = 0) {
869
873
  let t;
870
- return n && /^\d{4}$/.test(n) ? t = parseInt(n, 10) : n ? t = new Date(n).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
874
+ return a && /^\d{4}$/.test(a) ? t = parseInt(a, 10) : a ? t = new Date(a).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
871
875
  this.format(new Date(t + v, 0, 1)),
872
876
  this.format(new Date(t + v + 1, 0, 0))
873
877
  ];
874
878
  }
875
- static getRangeFromDaysBefore(n) {
879
+ static getRangeFromDaysBefore(a) {
876
880
  const v = /* @__PURE__ */ new Date(), t = new Date(v.getTime());
877
- return t.setDate(v.getDate() - n), [this.format(t), this.format(v)];
881
+ return t.setDate(v.getDate() - a), [this.format(t), this.format(v)];
878
882
  }
879
883
  }
880
- function Te(c, n) {
884
+ function Te(d, a) {
881
885
  const {
882
886
  popoverRef: v
883
- } = c, t = se(), u = $(""), l = $(
884
- c.modelValue ?? c.default ?? []
885
- ), g = $(0);
886
- function a() {
887
- const b = H.getRangeFromDaysBefore(g.value);
888
- return l.value = [...b], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value), b;
889
- }
890
- function f(b) {
891
- u.value = b, v.value?.close();
887
+ } = d, t = se(), u = A(""), l = A(
888
+ d.modelValue ?? d.default ?? []
889
+ ), b = A(0);
890
+ function n() {
891
+ const g = H.getRangeFromDaysBefore(b.value);
892
+ return l.value = [...g], a("change", { name: d.name, value: l.value }), a("update:modelValue", l.value), g;
893
+ }
894
+ function f(g) {
895
+ u.value = g, v.value?.close();
892
896
  const p = [];
893
897
  switch (u.value) {
894
898
  case "today":
@@ -907,57 +911,57 @@ function Te(c, n) {
907
911
  p.push(...H.getYearRange());
908
912
  break;
909
913
  case "last_7_days":
910
- g.value = 7, a();
914
+ b.value = 7, n();
911
915
  break;
912
916
  case "range":
913
- g.value = 7, p.push(...a());
917
+ b.value = 7, p.push(...n());
914
918
  break;
915
919
  }
916
- l.value = [...p], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value);
920
+ l.value = [...p], a("change", { name: d.name, value: l.value }), a("update:modelValue", l.value);
917
921
  }
918
922
  function y() {
919
- const b = [];
923
+ const g = [];
920
924
  switch (u.value) {
921
925
  case "today":
922
- b.push(H.getShiftedDay(l.value[0], 1));
926
+ g.push(H.getShiftedDay(l.value[0], 1));
923
927
  break;
924
928
  case "week":
925
- b.push(...H.getLastWeekRange(l.value[0], l.value[1], 1));
929
+ g.push(...H.getLastWeekRange(l.value[0], l.value[1], 1));
926
930
  break;
927
931
  case "month":
928
- b.push(...H.getMonthRange(l.value[0], l.value[1], 1));
932
+ g.push(...H.getMonthRange(l.value[0], l.value[1], 1));
929
933
  break;
930
934
  case "quarter":
931
- b.push(...H.getQuarterRange(l.value[0], l.value[1], 1));
935
+ g.push(...H.getQuarterRange(l.value[0], l.value[1], 1));
932
936
  break;
933
937
  case "year":
934
- b.push(...H.getYearRange(l.value[0], 1));
938
+ g.push(...H.getYearRange(l.value[0], 1));
935
939
  break;
936
940
  }
937
- l.value = [...b], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value);
941
+ l.value = [...g], a("change", { name: d.name, value: l.value }), a("update:modelValue", l.value);
938
942
  }
939
943
  function m() {
940
- const b = [];
944
+ const g = [];
941
945
  switch (u.value) {
942
946
  case "today":
943
- b.push(H.getShiftedDay(l.value[0], -1));
947
+ g.push(H.getShiftedDay(l.value[0], -1));
944
948
  break;
945
949
  case "week":
946
- b.push(...H.getLastWeekRange(l.value[0], l.value[1], -1));
950
+ g.push(...H.getLastWeekRange(l.value[0], l.value[1], -1));
947
951
  break;
948
952
  case "month":
949
- b.push(...H.getMonthRange(l.value[0], l.value[1], -1));
953
+ g.push(...H.getMonthRange(l.value[0], l.value[1], -1));
950
954
  break;
951
955
  case "quarter":
952
- b.push(...H.getQuarterRange(l.value[0], l.value[1], -1));
956
+ g.push(...H.getQuarterRange(l.value[0], l.value[1], -1));
953
957
  break;
954
958
  case "year":
955
- b.push(...H.getYearRange(l.value[0], -1));
959
+ g.push(...H.getYearRange(l.value[0], -1));
956
960
  break;
957
961
  }
958
- l.value = [...b], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value);
962
+ l.value = [...g], a("change", { name: d.name, value: l.value }), a("update:modelValue", l.value);
959
963
  }
960
- const d = [
964
+ const c = [
961
965
  "Січень",
962
966
  "Лютий",
963
967
  "Березень",
@@ -971,33 +975,33 @@ function Te(c, n) {
971
975
  "Листопад",
972
976
  "Грудень"
973
977
  ];
974
- function i(b) {
975
- const [p, h, x] = b.split("-");
978
+ function s(g) {
979
+ const [p, h, x] = g.split("-");
976
980
  return `${x}.${h}.${p}`;
977
981
  }
978
- function C(b, p = "long") {
979
- const h = new Date(Date.UTC(2e3, b - 1, 1));
982
+ function V(g, p = "long") {
983
+ const h = new Date(Date.UTC(2e3, g - 1, 1));
980
984
  return new Intl.DateTimeFormat(localStorage.locale, { month: p, timeZone: "UTC" }).format(h);
981
985
  }
982
- function k(b) {
986
+ function k(g) {
983
987
  const { value: p } = l;
984
- switch (b) {
988
+ switch (g) {
985
989
  case "today":
986
- return i(p[0]);
990
+ return s(p[0]);
987
991
  case "range":
988
992
  return "Період";
989
993
  case "week":
990
- return p[0] && p[1] ? `${i(p[0])} – ${i(p[1])}` : "";
994
+ return p[0] && p[1] ? `${s(p[0])} – ${s(p[1])}` : "";
991
995
  case "quarter":
992
996
  if (p[0]) {
993
- const h = new Date(p[0]), x = h.getFullYear(), D = h.getMonth();
994
- return `${Math.floor(D / 3) + 1} ${t("filter.quarter")} ${x}`;
997
+ const h = new Date(p[0]), x = h.getFullYear(), B = h.getMonth();
998
+ return `${Math.floor(B / 3) + 1} ${t("filter.quarter")} ${x}`;
995
999
  }
996
1000
  return "";
997
1001
  case "month":
998
1002
  if (p[0]) {
999
1003
  const [h, x] = p[0].split("-");
1000
- return `${C(parseInt(x, 10))} ${h}`;
1004
+ return `${V(parseInt(x, 10))} ${h}`;
1001
1005
  }
1002
1006
  return "";
1003
1007
  case "year":
@@ -1005,25 +1009,25 @@ function Te(c, n) {
1005
1009
  case "last_7_days":
1006
1010
  return "За останні дні";
1007
1011
  default:
1008
- return c.label ?? "";
1012
+ return d.label ?? "";
1009
1013
  }
1010
1014
  }
1011
- const _ = L(() => u.value ? k(u.value) : c.label ?? "");
1015
+ const C = O(() => u.value ? k(u.value) : d.label ?? "");
1012
1016
  function o() {
1013
- u.value = "", l.value = [], n("update:modelValue", []), n("clear", c.name);
1017
+ u.value = "", l.value = [], a("update:modelValue", []), a("clear", d.name);
1014
1018
  }
1015
1019
  return {
1016
1020
  activeMode: u,
1017
1021
  innerValue: l,
1018
- daysBefore: g,
1019
- onDaysBeforeChange: a,
1022
+ daysBefore: b,
1023
+ onDaysBeforeChange: n,
1020
1024
  onSelectChange: f,
1021
1025
  nextClick: y,
1022
1026
  prevClick: m,
1023
- ukMonths: d,
1024
- formatDisplayDate: i,
1027
+ ukMonths: c,
1028
+ formatDisplayDate: s,
1025
1029
  getModeLabel: k,
1026
- currentLabel: _,
1030
+ currentLabel: C,
1027
1031
  clear: o
1028
1032
  };
1029
1033
  }
@@ -1043,7 +1047,7 @@ const qt = {
1043
1047
  key: 0,
1044
1048
  class: "block text-xs font-medium text-gray-600 mb-1"
1045
1049
  }, tl = ["min", "disabled"], ll = { class: "flex gap-1 pt-2" }, ol = ["onClick"];
1046
- const nl = /* @__PURE__ */ W({
1050
+ const al = /* @__PURE__ */ q({
1047
1051
  __name: "date-input",
1048
1052
  props: {
1049
1053
  id: {},
@@ -1068,80 +1072,81 @@ const nl = /* @__PURE__ */ W({
1068
1072
  mode: {},
1069
1073
  labelKey: {},
1070
1074
  sort: {},
1071
- ua: {}
1075
+ ua: {},
1076
+ itemClass: {}
1072
1077
  },
1073
1078
  emits: ["update:modelValue", "change", "clear"],
1074
- setup(c, { expose: n, emit: v }) {
1075
- const t = c, u = Ee(), l = Ot(), g = v, a = $(null), {
1079
+ setup(d, { expose: a, emit: v }) {
1080
+ const t = d, u = Ee(), l = Ot(), b = v, n = A(null), {
1076
1081
  activeMode: f,
1077
1082
  innerValue: y,
1078
1083
  onSelectChange: m,
1079
- nextClick: d,
1080
- prevClick: i,
1081
- clear: C
1084
+ nextClick: c,
1085
+ prevClick: s,
1086
+ clear: V
1082
1087
  } = Te({
1083
1088
  ...t,
1084
- popoverRef: a
1085
- }, g);
1086
- return I(() => t.modelValue, (k) => {
1087
- k !== void 0 ? (y.value = k, g("update:modelValue", k)) : (f.value = "", y.value = []);
1088
- }), n({
1089
- clear: C,
1090
- popoverRef: a
1091
- }), (k, _) => (s(), w(T, null, [
1092
- k.layout === "inline" ? (s(), w("div", qt, [
1093
- e(f) !== "" && e(f) === "range" ? (s(), w("div", Qt, [
1094
- Y(r("input", {
1089
+ popoverRef: n
1090
+ }, b);
1091
+ return U(() => t.modelValue, (k) => {
1092
+ k !== void 0 ? (y.value = k, b("update:modelValue", k)) : (f.value = "", y.value = []);
1093
+ }), a({
1094
+ clear: V,
1095
+ popoverRef: n
1096
+ }), (k, C) => (i(), w(I, null, [
1097
+ k.layout === "inline" ? (i(), w("div", qt, [
1098
+ e(f) !== "" && e(f) === "range" ? (i(), w("div", Qt, [
1099
+ W(r("input", {
1095
1100
  type: "date",
1096
1101
  max: e(y)[1],
1097
1102
  locale: "uk-UA",
1098
- "onUpdate:modelValue": _[0] || (_[0] = (o) => e(y)[0] = o),
1103
+ "onUpdate:modelValue": C[0] || (C[0] = (o) => e(y)[0] = o),
1099
1104
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",
1100
1105
  disabled: k.disabled
1101
1106
  }, null, 8, Ht), [
1102
1107
  [ee, e(y)[0]]
1103
1108
  ]),
1104
- Y(r("input", {
1109
+ W(r("input", {
1105
1110
  type: "date",
1106
1111
  min: e(y)[0],
1107
1112
  locale: "uk-UA",
1108
- "onUpdate:modelValue": _[1] || (_[1] = (o) => e(y)[1] = o),
1113
+ "onUpdate:modelValue": C[1] || (C[1] = (o) => e(y)[1] = o),
1109
1114
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",
1110
1115
  disabled: k.disabled
1111
1116
  }, null, 8, Gt), [
1112
1117
  [ee, e(y)[1]]
1113
1118
  ])
1114
- ])) : V("", !0)
1115
- ])) : V("", !0),
1119
+ ])) : $("", !0)
1120
+ ])) : $("", !0),
1116
1121
  r("div", {
1117
- class: U(k.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1122
+ class: E(k.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1118
1123
  }, [
1119
1124
  r("div", {
1120
- class: U(k.layout !== "popover" ? "w-[48%]" : "")
1125
+ class: E(k.layout !== "popover" ? "w-[48%]" : "")
1121
1126
  }, [
1122
- k.layout === "popover" ? (s(), w("label", Xt, "Від")) : V("", !0),
1123
- Y(r("input", {
1127
+ k.layout === "popover" ? (i(), w("label", Xt, "Від")) : $("", !0),
1128
+ W(r("input", {
1124
1129
  type: "date",
1125
1130
  max: e(y)[1],
1126
1131
  locale: "uk-UA",
1127
- "onUpdate:modelValue": _[2] || (_[2] = (o) => e(y)[0] = o),
1128
- class: U(e(u)),
1132
+ "onUpdate:modelValue": C[2] || (C[2] = (o) => e(y)[0] = o),
1133
+ class: E(e(u)),
1129
1134
  disabled: k.disabled
1130
1135
  }, null, 10, Zt), [
1131
1136
  [ee, e(y)[0]]
1132
1137
  ])
1133
1138
  ], 2),
1134
- k.layout !== "popover" ? (s(), w("label", Jt, " - ")) : V("", !0),
1139
+ k.layout !== "popover" ? (i(), w("label", Jt, " - ")) : $("", !0),
1135
1140
  r("div", {
1136
- class: U(k.layout !== "popover" ? "w-[48%]" : "")
1141
+ class: E(k.layout !== "popover" ? "w-[48%]" : "")
1137
1142
  }, [
1138
- k.layout === "popover" ? (s(), w("label", el, "До")) : V("", !0),
1139
- Y(r("input", {
1143
+ k.layout === "popover" ? (i(), w("label", el, "До")) : $("", !0),
1144
+ W(r("input", {
1140
1145
  type: "date",
1141
1146
  min: e(y)[0],
1142
1147
  locale: "uk-UA",
1143
- "onUpdate:modelValue": _[3] || (_[3] = (o) => e(y)[1] = o),
1144
- class: U(e(u)),
1148
+ "onUpdate:modelValue": C[3] || (C[3] = (o) => e(y)[1] = o),
1149
+ class: E(e(u)),
1145
1150
  disabled: k.disabled
1146
1151
  }, null, 10, tl), [
1147
1152
  [ee, e(y)[1]]
@@ -1149,105 +1154,105 @@ const nl = /* @__PURE__ */ W({
1149
1154
  ], 2)
1150
1155
  ], 2),
1151
1156
  r("div", ll, [
1152
- (s(), w(T, null, X(["today", "week", "month", "quarter", "year"], (o) => r("button", {
1157
+ (i(), w(I, null, X(["today", "week", "month", "quarter", "year"], (o) => r("button", {
1153
1158
  key: o,
1154
- class: U(e(l) + (e(f) === o ? " bg-blue-100" : "")),
1155
- onClick: (b) => e(m)(o)
1159
+ class: E(e(l) + (e(f) === o ? " bg-blue-100" : "")),
1160
+ onClick: (g) => e(m)(o)
1156
1161
  }, S(e(Wt)(o)), 11, ol)), 64)),
1157
1162
  r("button", {
1158
- class: U(e(l)),
1159
- onClick: _[4] || (_[4] = //@ts-ignore
1160
- (...o) => e(i) && e(i)(...o))
1163
+ class: E(e(l)),
1164
+ onClick: C[4] || (C[4] = //@ts-ignore
1165
+ (...o) => e(s) && e(s)(...o))
1161
1166
  }, " <", 2),
1162
1167
  r("button", {
1163
- class: U(e(l)),
1164
- onClick: _[5] || (_[5] = //@ts-ignore
1165
- (...o) => e(d) && e(d)(...o))
1168
+ class: E(e(l)),
1169
+ onClick: C[5] || (C[5] = //@ts-ignore
1170
+ (...o) => e(c) && e(c)(...o))
1166
1171
  }, " >", 2)
1167
1172
  ]),
1168
- (k.cleanable, V("", !0))
1173
+ (k.cleanable, $("", !0))
1169
1174
  ], 64));
1170
1175
  }
1171
1176
  });
1172
- function al(c, n) {
1177
+ function nl(d, a) {
1173
1178
  const {
1174
1179
  api: v,
1175
1180
  options: t = [],
1176
1181
  limit: u = 20,
1177
1182
  dataKey: l = "data"
1178
- } = c, g = c.multi;
1179
- function a(B) {
1180
- return g ? Array.isArray(B) ? B : B ? [B] : [] : Array.isArray(B) ? B[0] : B;
1183
+ } = d, b = d.multi;
1184
+ function n(j) {
1185
+ return b ? Array.isArray(j) ? j : j ? [j] : [] : Array.isArray(j) ? j[0] : j;
1181
1186
  }
1182
- const f = $(a(c.modelValue)), y = $(""), m = $(!1), d = $(t), i = $("id"), C = $("text"), k = $(!1), _ = $(c.layout !== "popover" && t.length > u), o = $([]), b = $(0);
1183
- function p(B) {
1184
- const O = B.find(Boolean) ?? {}, q = ["id", "value", "code", "key"].find((ie) => ie in O) ?? "id", N = ["text", "label", "name", "title"].find((ie) => ie in O) ?? "text";
1185
- return { autoValueKey: q, autoLabelKey: N };
1187
+ const f = A(n(d.modelValue)), y = A(""), m = A(!1), c = A(t), s = A("id"), V = A("text"), k = A(!1), C = A(d.layout !== "popover" && t.length > u), o = A([]), g = A(0);
1188
+ function p(j) {
1189
+ const L = j.find(Boolean) ?? {}, P = ["id", "value", "code", "key"].find((ie) => ie in L) ?? "id", Y = ["text", "label", "name", "title"].find((ie) => ie in L) ?? "text";
1190
+ return { autoValueKey: P, autoLabelKey: Y };
1186
1191
  }
1187
1192
  if (t.length > 0) {
1188
- const B = p(t);
1189
- i.value = B.autoValueKey, C.value = B.autoLabelKey;
1193
+ const j = p(t);
1194
+ s.value = j.autoValueKey, V.value = j.autoLabelKey;
1190
1195
  }
1191
- const h = L(() => {
1192
- if (v) return d.value;
1193
- const B = d.value;
1194
- if (c.layout === "popover") return B;
1196
+ const h = O(() => {
1197
+ if (v) return c.value;
1198
+ const j = c.value;
1199
+ if (d.layout === "popover") return j;
1195
1200
  if (!y.value)
1196
- return k.value ? B : B.slice(0, u);
1197
- const O = y.value.toLowerCase();
1198
- return B.filter((q) => q[C.value].toLowerCase().includes(O));
1201
+ return k.value ? j : j.slice(0, u);
1202
+ const L = y.value.toLowerCase();
1203
+ return j.filter((P) => P[V.value].toLowerCase().includes(L));
1199
1204
  });
1200
1205
  let x = null;
1201
- async function D(B) {
1206
+ async function B(j) {
1202
1207
  if (v) {
1203
1208
  m.value = !0;
1204
1209
  try {
1205
- const O = new URL(v, window.location.origin);
1206
- O.searchParams.set("json", "1"), O.searchParams.set("key", B), O.searchParams.set("limit", u.toString());
1207
- const q = await fetch(O.toString());
1208
- if (!q.ok) {
1209
- Ae({ type: "error", title: "Error", message: "Failed to fetch remote options" }), d.value = [];
1210
+ const L = new URL(v, window.location.origin);
1211
+ L.searchParams.set("json", "1"), L.searchParams.set("key", j), L.searchParams.set("limit", u.toString());
1212
+ const P = await fetch(L.toString());
1213
+ if (!P.ok) {
1214
+ Ae({ type: "error", title: "Error", message: "Failed to fetch remote options" }), c.value = [];
1210
1215
  return;
1211
1216
  }
1212
- const N = await q.json();
1213
- if (!N[l]) {
1214
- Ae({ type: "error", title: "Error", message: N }), d.value = [];
1217
+ const Y = await P.json();
1218
+ if (!Y[l]) {
1219
+ Ae({ type: "error", title: "Error", message: Y }), c.value = [];
1215
1220
  return;
1216
1221
  }
1217
- if (d.value = N[l], d.value.length > 0) {
1218
- const ie = p(d.value);
1219
- i.value = ie.autoValueKey, C.value = ie.autoLabelKey;
1222
+ if (c.value = Y[l], c.value.length > 0) {
1223
+ const ie = p(c.value);
1224
+ s.value = ie.autoValueKey, V.value = ie.autoLabelKey;
1220
1225
  }
1221
- b.value = N.total;
1222
- } catch (O) {
1223
- console.error("Failed to fetch remote options:", O);
1226
+ g.value = Y.total;
1227
+ } catch (L) {
1228
+ console.error("Failed to fetch remote options:", L);
1224
1229
  } finally {
1225
1230
  m.value = !1;
1226
1231
  }
1227
1232
  }
1228
1233
  }
1229
- I(y, (B) => {
1234
+ U(y, (j) => {
1230
1235
  v && (x && clearTimeout(x), x = setTimeout(() => {
1231
- D(B);
1236
+ B(j);
1232
1237
  }, 200));
1233
- }), I(() => c.modelValue, (B) => {
1234
- f.value = a(B);
1238
+ }), U(() => d.modelValue, (j) => {
1239
+ f.value = n(j);
1235
1240
  }, { immediate: !0 });
1236
- function F(B) {
1237
- return g && Array.isArray(f.value) ? f.value.includes(B[i.value]) : f.value && f.value === B[i.value];
1241
+ function F(j) {
1242
+ return b && Array.isArray(f.value) ? f.value.includes(j[s.value]) : f.value && f.value === j[s.value];
1238
1243
  }
1239
- function A(B) {
1240
- if (g && !Array.isArray(f.value) && (f.value = []), g && Array.isArray(f.value)) {
1241
- const O = f.value.includes(B[i.value]);
1242
- f.value = O ? f.value.filter((q) => q !== B[i.value]) : [...f.value, B[i.value]], o.value = O ? o.value.filter((q) => q !== B[C.value]) : [...o.value, B[C.value]];
1244
+ function _(j) {
1245
+ if (b && !Array.isArray(f.value) && (f.value = []), b && Array.isArray(f.value)) {
1246
+ const L = f.value.includes(j[s.value]);
1247
+ f.value = L ? f.value.filter((P) => P !== j[s.value]) : [...f.value, j[s.value]], o.value = L ? o.value.filter((P) => P !== j[V.value]) : [...o.value, j[V.value]];
1243
1248
  } else
1244
- f.value = B[i.value], o.value = B[C.value];
1245
- n("update:modelValue", f.value), n("change", { name: c.name, value: f.value });
1249
+ f.value = j[s.value], o.value = j[V.value];
1250
+ a("update:modelValue", f.value), a("change", { name: d.name, value: f.value });
1246
1251
  }
1247
1252
  function R() {
1248
- g ? (f.value = [], o.value = []) : (f.value = void 0, o.value = []), n("update:modelValue", f.value), n("clear", c.name);
1253
+ b ? (f.value = [], o.value = []) : (f.value = void 0, o.value = []), a("update:modelValue", f.value), a("clear", d.name);
1249
1254
  }
1250
- function j() {
1255
+ function D() {
1251
1256
  x && clearTimeout(x), y.value = "", k.value = !1;
1252
1257
  }
1253
1258
  function M() {
@@ -1256,44 +1261,44 @@ function al(c, n) {
1256
1261
  pe(() => {
1257
1262
  x && clearTimeout(x);
1258
1263
  });
1259
- const K = $(-1);
1260
- I(h, () => {
1264
+ const K = A(-1);
1265
+ U(h, () => {
1261
1266
  K.value = h.value.length > 0 ? 0 : -1;
1262
1267
  });
1263
- function z(B) {
1264
- const O = h.value.length;
1265
- if (B.key === "ArrowDown")
1266
- B.preventDefault(), K.value = (K.value + 1) % O;
1267
- else if (B.key === "ArrowUp")
1268
- B.preventDefault(), K.value = (K.value - 1 + O) % O;
1269
- else if (B.key === "Enter" && (B.preventDefault(), K.value >= 0 && K.value < h.value.length)) {
1270
- const q = h.value[K.value];
1271
- A(q);
1268
+ function N(j) {
1269
+ const L = h.value.length;
1270
+ if (j.key === "ArrowDown")
1271
+ j.preventDefault(), K.value = (K.value + 1) % L;
1272
+ else if (j.key === "ArrowUp")
1273
+ j.preventDefault(), K.value = (K.value - 1 + L) % L;
1274
+ else if (j.key === "Enter" && (j.preventDefault(), K.value >= 0 && K.value < h.value.length)) {
1275
+ const P = h.value[K.value];
1276
+ _(P);
1272
1277
  }
1273
1278
  }
1274
- function P() {
1275
- v && d.value.length === 0 && y.value.length === 0 && D(y.value);
1279
+ function z() {
1280
+ v && c.value.length === 0 && y.value.length === 0 && B(y.value);
1276
1281
  }
1277
1282
  return {
1278
1283
  innerValue: f,
1279
1284
  searchTerm: y,
1280
1285
  filteredOptions: h,
1281
1286
  isSelected: F,
1282
- selectItem: A,
1287
+ selectItem: _,
1283
1288
  clear: R,
1284
- resetSearch: j,
1289
+ resetSearch: D,
1285
1290
  toggleShowAll: M,
1286
1291
  isReqProc: m,
1287
1292
  showAll: k,
1288
- isEnableShowAll: _,
1289
- labelKey: C,
1290
- valueKey: i,
1291
- allOptions: d,
1293
+ isEnableShowAll: C,
1294
+ labelKey: V,
1295
+ valueKey: s,
1296
+ allOptions: c,
1292
1297
  highlightedIndex: K,
1293
- onKeyDown: z,
1298
+ onKeyDown: N,
1294
1299
  selectedLabels: o,
1295
- totalCount: b,
1296
- loadData: P
1300
+ totalCount: g,
1301
+ loadData: z
1297
1302
  };
1298
1303
  }
1299
1304
  const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, sl = ["placeholder"], il = {
@@ -1305,7 +1310,7 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1305
1310
  }, pl = {
1306
1311
  key: 1,
1307
1312
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1308
- }, ml = /* @__PURE__ */ W({
1313
+ }, ml = /* @__PURE__ */ q({
1309
1314
  __name: "select",
1310
1315
  props: {
1311
1316
  id: {},
@@ -1330,98 +1335,99 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1330
1335
  mode: {},
1331
1336
  labelKey: {},
1332
1337
  sort: {},
1333
- ua: {}
1338
+ ua: {},
1339
+ itemClass: {}
1334
1340
  },
1335
1341
  emits: ["update:modelValue", "change", "clear"],
1336
- setup(c, { expose: n, emit: v }) {
1337
- const t = se(), u = c, l = v, g = $(null), {
1338
- innerValue: a,
1342
+ setup(d, { expose: a, emit: v }) {
1343
+ const t = se(), u = d, l = v, b = A(null), {
1344
+ innerValue: n,
1339
1345
  filteredOptions: f,
1340
1346
  isSelected: y,
1341
1347
  selectItem: m,
1342
- clear: d,
1343
- resetSearch: i,
1344
- toggleShowAll: C,
1348
+ clear: c,
1349
+ resetSearch: s,
1350
+ toggleShowAll: V,
1345
1351
  isReqProc: k,
1346
- showAll: _,
1352
+ showAll: C,
1347
1353
  isEnableShowAll: o,
1348
- searchTerm: b,
1354
+ searchTerm: g,
1349
1355
  labelKey: p,
1350
1356
  valueKey: h,
1351
1357
  highlightedIndex: x,
1352
- onKeyDown: D,
1358
+ onKeyDown: B,
1353
1359
  selectedLabels: F,
1354
- totalCount: A,
1360
+ totalCount: _,
1355
1361
  loadData: R
1356
- } = al({
1362
+ } = nl({
1357
1363
  ...u,
1358
1364
  modelValue: u.modelValue
1359
1365
  }, l);
1360
1366
  ce(() => {
1361
- i(), u.layout !== "inline" && (R(), g.value && u.layout === "popover" && g.value.focus());
1362
- }), I(
1367
+ s(), u.layout !== "inline" && (R(), b.value && u.layout === "popover" && b.value.focus());
1368
+ }), U(
1363
1369
  () => u.modelValue,
1364
1370
  (M) => {
1365
- M === void 0 && (u.multi ? a.value = [] : a.value = void 0);
1371
+ M === void 0 && (u.multi ? n.value = [] : n.value = void 0);
1366
1372
  }
1367
1373
  );
1368
- const j = $([]);
1369
- return I(x, (M) => {
1370
- M >= 0 && j.value[M] && j.value[M]?.scrollIntoView({
1374
+ const D = A([]);
1375
+ return U(x, (M) => {
1376
+ M >= 0 && D.value[M] && D.value[M]?.scrollIntoView({
1371
1377
  block: "nearest",
1372
1378
  behavior: "smooth"
1373
1379
  });
1374
- }), I(f, () => {
1375
- j.value = [];
1376
- }), n({
1377
- clear: d,
1378
- inputTextRef: g,
1380
+ }), U(f, () => {
1381
+ D.value = [];
1382
+ }), a({
1383
+ clear: c,
1384
+ inputTextRef: b,
1379
1385
  selectedLabels: F,
1380
1386
  loadData: R
1381
- }), (M, K) => (s(), w("div", {
1382
- class: U([M.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1387
+ }), (M, K) => (i(), w("div", {
1388
+ class: E([M.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1383
1389
  }, [
1384
1390
  r("div", rl, [
1385
- Y(r("input", {
1386
- "onUpdate:modelValue": K[0] || (K[0] = (z) => Pe(b) ? b.value = z : null),
1391
+ W(r("input", {
1392
+ "onUpdate:modelValue": K[0] || (K[0] = (N) => Pe(g) ? g.value = N : null),
1387
1393
  onKeydown: K[1] || (K[1] = //@ts-ignore
1388
- (...z) => e(D) && e(D)(...z)),
1394
+ (...N) => e(B) && e(B)(...N)),
1389
1395
  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 text-gray-700",
1390
1396
  placeholder: e(t)("filter.search"),
1391
1397
  type: "text",
1392
1398
  ref_key: "inputTextRef",
1393
- ref: g
1399
+ ref: b
1394
1400
  }, null, 40, sl), [
1395
- [ee, e(b)]
1401
+ [ee, e(g)]
1396
1402
  ]),
1397
1403
  Q(Me, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
1398
- e(b) != "" ? (s(), E(Ce, {
1404
+ e(g) != "" ? (i(), T(Ce, {
1399
1405
  key: 0,
1400
- onClick: K[2] || (K[2] = (z) => b.value = ""),
1406
+ onClick: K[2] || (K[2] = (N) => g.value = ""),
1401
1407
  class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
1402
- })) : V("", !0)
1408
+ })) : $("", !0)
1403
1409
  ]),
1404
1410
  r("div", {
1405
- class: U([
1411
+ class: E([
1406
1412
  M.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
1407
1413
  M.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
1408
1414
  ])
1409
1415
  }, [
1410
- (s(!0), w(T, null, X(e(f), (z, P) => (s(), E(he, {
1416
+ (i(!0), w(I, null, X(e(f), (N, z) => (i(), T(he, {
1411
1417
  layout: M.layout,
1412
- count: z.count,
1413
- label: z[e(p)],
1414
- color: z.color,
1418
+ count: N.count,
1419
+ label: N[e(p)],
1420
+ color: N.color,
1415
1421
  type: M.multi ? "checkbox" : "radio",
1416
- value: z[e(h)],
1417
- "is-selected": e(y)(z),
1418
- highlighted: P === e(x),
1419
- onItemClick: (B) => e(m)(z),
1422
+ value: N[e(h)],
1423
+ "is-selected": e(y)(N),
1424
+ highlighted: z === e(x),
1425
+ onItemClick: (j) => e(m)(N),
1420
1426
  ref_for: !0,
1421
- ref: (B) => j.value[P] = B?.el
1427
+ ref: (j) => D.value[z] = j?.el
1422
1428
  }, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
1423
1429
  ], 2),
1424
- M.type === "select" && e(f).length === 0 && !e(k) ? (s(), w("div", il, [
1430
+ M.type === "select" && e(f).length === 0 && !e(k) ? (i(), w("div", il, [
1425
1431
  r("div", ul, [
1426
1432
  Q(we),
1427
1433
  r("div", dl, [
@@ -1429,49 +1435,49 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1429
1435
  K[7] || (K[7] = r("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
1430
1436
  ])
1431
1437
  ])
1432
- ])) : V("", !0),
1433
- M.layout !== "popover" && M.type !== "select" ? (s(), w(T, { key: 1 }, [
1434
- !e(_) && e(o) ? (s(), w("div", {
1438
+ ])) : $("", !0),
1439
+ M.layout !== "popover" && M.type !== "select" ? (i(), w(I, { key: 1 }, [
1440
+ !e(C) && e(o) ? (i(), w("div", {
1435
1441
  key: 0,
1436
1442
  onClick: K[3] || (K[3] = //@ts-ignore
1437
- (...z) => e(C) && e(C)(...z)),
1443
+ (...N) => e(V) && e(V)(...N)),
1438
1444
  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"
1439
1445
  }, [
1440
1446
  G(S(e(t)("filter.more")) + " ", 1),
1441
1447
  Q(ve)
1442
- ])) : V("", !0),
1443
- e(_) ? (s(), w("div", {
1448
+ ])) : $("", !0),
1449
+ e(C) ? (i(), w("div", {
1444
1450
  key: 1,
1445
1451
  onClick: K[4] || (K[4] = //@ts-ignore
1446
- (...z) => e(C) && e(C)(...z)),
1452
+ (...N) => e(V) && e(V)(...N)),
1447
1453
  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"
1448
1454
  }, [
1449
1455
  G(S(e(t)("filter.less")) + " ", 1),
1450
1456
  Q(ke)
1451
- ])) : V("", !0)
1452
- ], 64)) : V("", !0),
1453
- M.cleanable ? (s(), w(T, { key: 2 }, [
1454
- M.layout === "inline" ? (s(), w("div", fl, [
1455
- G(S(M.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " / " + S(e(A)) + " " + S(e(t)("filter.selected")) + " ", 1),
1456
- Y(r("button", {
1457
+ ])) : $("", !0)
1458
+ ], 64)) : $("", !0),
1459
+ M.cleanable ? (i(), w(I, { key: 2 }, [
1460
+ M.layout === "inline" ? (i(), w("div", fl, [
1461
+ G(S(M.multi && Array.isArray(e(n)) ? e(n)?.length : e(n) !== void 0 && (e(n) || e(n) === null) ? 1 : 0) + " / " + S(e(_)) + " " + S(e(t)("filter.selected")) + " ", 1),
1462
+ W(r("button", {
1457
1463
  class: "text-gray-600 hover:text-gray-800",
1458
1464
  onClick: K[5] || (K[5] = //@ts-ignore
1459
- (...z) => e(d) && e(d)(...z))
1465
+ (...N) => e(c) && e(c)(...N))
1460
1466
  }, S(e(t)("filter.clear")), 513), [
1461
- [J, e(a) !== "" && e(a) !== void 0 || e(a)]
1467
+ [J, e(n) !== "" && e(n) !== void 0 || e(n)]
1462
1468
  ])
1463
- ])) : V("", !0),
1464
- M.layout === "popover" ? (s(), w("div", pl, [
1465
- r("span", null, S(M.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " / " + S(e(A)) + " " + S(e(t)("filter.selected")), 1),
1466
- Y(r("button", {
1469
+ ])) : $("", !0),
1470
+ M.layout === "popover" ? (i(), w("div", pl, [
1471
+ r("span", null, S(M.multi && Array.isArray(e(n)) ? e(n)?.length : e(n) !== void 0 && (e(n) || e(n) === null) ? 1 : 0) + " / " + S(e(_)) + " " + S(e(t)("filter.selected")), 1),
1472
+ W(r("button", {
1467
1473
  class: "text-gray-600 hover:text-gray-800",
1468
1474
  onClick: K[6] || (K[6] = //@ts-ignore
1469
- (...z) => e(d) && e(d)(...z))
1475
+ (...N) => e(c) && e(c)(...N))
1470
1476
  }, S(e(t)("filter.clear")), 513), [
1471
- [J, e(a) !== "" && e(a) !== void 0 || e(a)]
1477
+ [J, e(n) !== "" && e(n) !== void 0 || e(n)]
1472
1478
  ])
1473
- ])) : V("", !0)
1474
- ], 64)) : V("", !0)
1479
+ ])) : $("", !0)
1480
+ ], 64)) : $("", !0)
1475
1481
  ], 2));
1476
1482
  }
1477
1483
  }), vl = ["for", "onClick"], yl = ["id", "name", "value"], gl = { class: "block" }, bl = {
@@ -1480,7 +1486,7 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1480
1486
  }, hl = {
1481
1487
  key: 1,
1482
1488
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1483
- }, xl = /* @__PURE__ */ W({
1489
+ }, xl = /* @__PURE__ */ q({
1484
1490
  __name: "tag-field",
1485
1491
  props: {
1486
1492
  id: {},
@@ -1505,18 +1511,19 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1505
1511
  mode: {},
1506
1512
  labelKey: {},
1507
1513
  sort: {},
1508
- ua: {}
1514
+ ua: {},
1515
+ itemClass: {}
1509
1516
  },
1510
1517
  emits: ["update:modelValue", "change", "clear"],
1511
- setup(c, { expose: n, emit: v }) {
1512
- const t = c, u = v, {
1518
+ setup(d, { expose: a, emit: v }) {
1519
+ const t = d, u = v, {
1513
1520
  innerValue: l,
1514
- isSelected: g,
1515
- selectItem: a,
1521
+ isSelected: b,
1522
+ selectItem: n,
1516
1523
  clear: f,
1517
1524
  labelKey: y,
1518
1525
  valueKey: m,
1519
- allOptions: d
1526
+ allOptions: c
1520
1527
  } = t.multi ? Fe({
1521
1528
  ...t,
1522
1529
  modelValue: t.modelValue ?? t.default ?? []
@@ -1524,22 +1531,22 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1524
1531
  ...t,
1525
1532
  modelValue: t.modelValue !== void 0 ? t.modelValue : t.default ?? ""
1526
1533
  }, u);
1527
- return n({
1534
+ return a({
1528
1535
  clear: f
1529
- }), I(
1536
+ }), U(
1530
1537
  () => t.modelValue,
1531
- (i) => {
1532
- i === void 0 && (t.multi ? l.value = [] : l.value = void 0);
1538
+ (s) => {
1539
+ s === void 0 && (t.multi ? l.value = [] : l.value = void 0);
1533
1540
  }
1534
- ), (i, C) => (s(), w(T, null, [
1541
+ ), (s, V) => (i(), w(I, null, [
1535
1542
  r("div", {
1536
- class: U(["grid grid-cols-3 gap-2 mx-[1px]", i.layout === "popover" ? "m-1" : "mb-1"])
1543
+ class: E(["grid grid-cols-3 gap-2 mx-[1px]", s.layout === "popover" ? "m-1" : "mb-1"])
1537
1544
  }, [
1538
- (s(!0), w(T, null, X(e(d), (k) => (s(), w("label", {
1545
+ (i(!0), w(I, null, X(e(c), (k) => (i(), w("label", {
1539
1546
  key: `item-${k[e(m)]}`,
1540
1547
  for: `item-${k[e(m)]}`,
1541
- onClick: re((_) => e(a)(k), ["stop", "prevent"]),
1542
- class: U([e(g)(k) ? "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-sm 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%)]"])
1548
+ onClick: re((C) => e(n)(k), ["stop", "prevent"]),
1549
+ class: E([e(b)(k) ? "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-sm 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%)]"])
1543
1550
  }, [
1544
1551
  r("input", {
1545
1552
  type: "checkbox",
@@ -1551,34 +1558,34 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1551
1558
  r("span", gl, S(k[e(y)]), 1)
1552
1559
  ], 10, vl))), 128))
1553
1560
  ], 2),
1554
- i.cleanable ? (s(), w(T, { key: 0 }, [
1555
- i.layout === "inline" ? (s(), w("div", bl, [
1556
- G(S(i.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(d).length) + " обрано ", 1),
1557
- Y(r("button", {
1561
+ s.cleanable ? (i(), w(I, { key: 0 }, [
1562
+ s.layout === "inline" ? (i(), w("div", bl, [
1563
+ G(S(s.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(c).length) + " обрано ", 1),
1564
+ W(r("button", {
1558
1565
  class: "text-gray-600 hover:text-gray-800",
1559
- onClick: C[0] || (C[0] = //@ts-ignore
1566
+ onClick: V[0] || (V[0] = //@ts-ignore
1560
1567
  (...k) => e(f) && e(f)(...k))
1561
1568
  }, " Очистити ", 512), [
1562
1569
  [J, e(l) !== "" && e(l) !== void 0 || e(l)]
1563
1570
  ])
1564
- ])) : V("", !0),
1565
- i.layout === "popover" ? (s(), w("div", hl, [
1566
- r("span", null, S(i.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(d).length) + " обрано", 1),
1567
- Y(r("button", {
1571
+ ])) : $("", !0),
1572
+ s.layout === "popover" ? (i(), w("div", hl, [
1573
+ r("span", null, S(s.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(c).length) + " обрано", 1),
1574
+ W(r("button", {
1568
1575
  class: "text-gray-600 hover:text-gray-800",
1569
- onClick: C[1] || (C[1] = //@ts-ignore
1576
+ onClick: V[1] || (V[1] = //@ts-ignore
1570
1577
  (...k) => e(f) && e(f)(...k))
1571
1578
  }, " Очистити ", 512), [
1572
1579
  [J, e(l) !== void 0 && e(l) !== "" || e(l)]
1573
1580
  ])
1574
- ])) : V("", !0)
1575
- ], 64)) : V("", !0)
1581
+ ])) : $("", !0)
1582
+ ], 64)) : $("", !0)
1576
1583
  ], 64));
1577
1584
  }
1578
- }), wl = ["disabled", "title"], kl = { class: "flex w-full items-center justify-between gap-1 overflow-hidden text-left" }, Cl = { class: "truncate text-ellipsis text-sm" }, _l = {
1585
+ }), wl = ["disabled", "title"], kl = { class: "flex w-full items-center justify-between gap-1 overflow-hidden text-left" }, Cl = { class: "truncate text-ellipsis text-sm" }, Vl = {
1579
1586
  key: 0,
1580
1587
  class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-sm bg-blue-100 px-2 text-[11px] font-semibold text-blue-600"
1581
- }, Vl = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-sm 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" }, $l = { 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" }, _e = /* @__PURE__ */ W({
1588
+ }, _l = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-sm 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" }, $l = { 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" }, Ve = /* @__PURE__ */ q({
1582
1589
  __name: "popover-field",
1583
1590
  props: {
1584
1591
  disabled: { type: Boolean, default: !1 },
@@ -1595,56 +1602,56 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1595
1602
  mode: {},
1596
1603
  layout: {}
1597
1604
  },
1598
- setup(c, { expose: n }) {
1599
- const v = c, t = L(() => Oe(v.mode)), u = $(!1), l = $({ top: 0, left: 0 }), g = $(null), a = $(null), f = $(null);
1605
+ setup(d, { expose: a }) {
1606
+ const v = d, t = O(() => Oe(v.mode)), u = A(!1), l = A({ top: 0, left: 0 }), b = A(null), n = A(null), f = A(null);
1600
1607
  function y() {
1601
- const x = a.value, D = f.value;
1602
- if (!x || !D) return;
1603
- const F = x.getBoundingClientRect(), A = D.offsetWidth, R = window.innerWidth, j = F.bottom + 8;
1608
+ const x = n.value, B = f.value;
1609
+ if (!x || !B) return;
1610
+ const F = x.getBoundingClientRect(), _ = B.offsetWidth, R = window.innerWidth, D = F.bottom + 8;
1604
1611
  let { left: M } = F;
1605
- M + A > R && (M = Math.max(R - A - 10, 10)), l.value = { top: j, left: M };
1612
+ M + _ > R && (M = Math.max(R - _ - 10, 10)), l.value = { top: D, left: M };
1606
1613
  }
1607
1614
  function m() {
1608
1615
  u.value = !u.value, u.value && me(() => {
1609
1616
  y(), v.fieldRef?.inputTextRef && v.fieldRef?.inputTextRef?.focus?.(), v.fieldRef?.loadData && v.fieldRef?.loadData?.();
1610
1617
  });
1611
1618
  }
1612
- function d(x) {
1613
- !g.value?.contains(x.target) && !f.value?.contains(x.target) && !a.value?.contains(x.target) && (u.value = !1);
1619
+ function c(x) {
1620
+ !b.value?.contains(x.target) && !f.value?.contains(x.target) && !n.value?.contains(x.target) && (u.value = !1);
1614
1621
  }
1615
- function i(x) {
1622
+ function s(x) {
1616
1623
  x.key === "Escape" && (u.value = !1);
1617
1624
  }
1618
- const C = $(!1), k = $("ua"), _ = (x) => {
1625
+ const V = A(!1), k = A("ua"), C = (x) => {
1619
1626
  x.detail.key === "locale" && (k.value = x.detail.newValue);
1620
1627
  };
1621
1628
  ce(() => {
1622
- C.value = !0, k.value = localStorage.locale, window.addEventListener("storage", _), document.addEventListener("click", d, !0), document.addEventListener("keydown", i), window.addEventListener("scroll", y, !0);
1629
+ V.value = !0, k.value = localStorage.locale, window.addEventListener("storage", C), document.addEventListener("click", c, !0), document.addEventListener("keydown", s), window.addEventListener("scroll", y, !0);
1623
1630
  }), pe(() => {
1624
- window.removeEventListener("resize", _), document.removeEventListener("click", d, !0), document.removeEventListener("keydown", i), window.removeEventListener("scroll", y, !0);
1631
+ window.removeEventListener("resize", C), document.removeEventListener("click", c, !0), document.removeEventListener("keydown", s), window.removeEventListener("scroll", y, !0);
1625
1632
  });
1626
1633
  function o() {
1627
1634
  u.value = !1;
1628
1635
  }
1629
- n({ close: o });
1630
- function b(x) {
1631
- return Array.isArray(x) ? x.filter((D) => D != null && D !== "").length : x && typeof x == "object" ? Object.values(x).filter((D) => D != null && D !== "").length : typeof x == "string" ? x.trim() === "" ? 0 : 1 : typeof x == "number" ? Number.isNaN(x) ? 0 : 1 : x === null || x !== void 0 ? 1 : 0;
1636
+ a({ close: o });
1637
+ function g(x) {
1638
+ return Array.isArray(x) ? x.filter((B) => B != null && B !== "").length : x && typeof x == "object" ? Object.values(x).filter((B) => B != null && B !== "").length : typeof x == "string" ? x.trim() === "" ? 0 : 1 : typeof x == "number" ? Number.isNaN(x) ? 0 : 1 : x === null || x !== void 0 ? 1 : 0;
1632
1639
  }
1633
- const p = L(() => {
1634
- const x = v.fieldRef?.selectedLabels, D = b(x);
1635
- return D > 0 ? D : b(v.currentValue);
1636
- }), h = L(() => {
1640
+ const p = O(() => {
1641
+ const x = v.fieldRef?.selectedLabels, B = g(x);
1642
+ return B > 0 ? B : g(v.currentValue);
1643
+ }), h = O(() => {
1637
1644
  const x = v.fieldRef?.selectedLabels;
1638
1645
  return !x || ["inline"].includes(v.layout || "") ? v[k.value] || (v.label ?? "") : Array.isArray(x) ? x.length > 0 ? x.join(", ") : v.label ?? "" : String(x);
1639
1646
  });
1640
- return (x, D) => (s(), w("div", null, [
1647
+ return (x, B) => (i(), w("div", null, [
1641
1648
  r("button", {
1642
1649
  onClick: m,
1643
1650
  disabled: x.disabled,
1644
1651
  ref_key: "triggerRef",
1645
- ref: a,
1652
+ ref: n,
1646
1653
  title: x.label,
1647
- class: U([
1654
+ class: E([
1648
1655
  t.value,
1649
1656
  x.width ? e(Le).getWidthClass(x.width) : "w-full",
1650
1657
  x.layout === "inline" && p.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600" : ""
@@ -1653,22 +1660,22 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1653
1660
  }, [
1654
1661
  r("span", kl, [
1655
1662
  r("span", Cl, S(h.value), 1),
1656
- x.layout === "inline" && p.value > 0 ? (s(), w("span", _l, S(p.value), 1)) : V("", !0)
1663
+ x.layout === "inline" && p.value > 0 ? (i(), w("span", Vl, S(p.value), 1)) : $("", !0)
1657
1664
  ]),
1658
1665
  Q(ve, { class: "h-4 w-4 text-neutral-500" })
1659
1666
  ], 10, wl),
1660
- C.value ? (s(), E(ge, {
1667
+ V.value ? (i(), T(ge, {
1661
1668
  key: 0,
1662
1669
  to: "body"
1663
1670
  }, [
1664
- Y(r("div", {
1671
+ W(r("div", {
1665
1672
  ref_key: "popperRef",
1666
1673
  ref: f,
1667
1674
  class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
1668
1675
  style: be({ top: `${l.value.top}px`, left: `${l.value.left}px` }),
1669
1676
  "data-inside-popover": ""
1670
1677
  }, [
1671
- r("div", Vl, [
1678
+ r("div", _l, [
1672
1679
  r("div", $l, [
1673
1680
  ue(x.$slots, "default")
1674
1681
  ])
@@ -1676,7 +1683,7 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1676
1683
  ], 4), [
1677
1684
  [J, u.value]
1678
1685
  ])
1679
- ])) : V("", !0)
1686
+ ])) : $("", !0)
1680
1687
  ]));
1681
1688
  }
1682
1689
  }), Al = {}, Sl = {
@@ -1691,12 +1698,12 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1691
1698
  "stroke-linejoin": "round",
1692
1699
  class: "text-blue-600 w-[16px] h-[16px]"
1693
1700
  };
1694
- function Bl(c, n) {
1695
- return s(), w("svg", Sl, n[0] || (n[0] = [
1701
+ function Bl(d, a) {
1702
+ return i(), w("svg", Sl, a[0] || (a[0] = [
1696
1703
  r("path", { d: "M20 6 9 17l-5-5" }, null, -1)
1697
1704
  ]));
1698
1705
  }
1699
- const ae = /* @__PURE__ */ te(Al, [["render", Bl]]), Dl = {}, jl = {
1706
+ const ne = /* @__PURE__ */ te(Al, [["render", Bl]]), jl = {}, Dl = {
1700
1707
  xmlns: "http://www.w3.org/2000/svg",
1701
1708
  width: "15px",
1702
1709
  height: "24",
@@ -1708,8 +1715,8 @@ const ae = /* @__PURE__ */ te(Al, [["render", Bl]]), Dl = {}, jl = {
1708
1715
  "stroke-linejoin": "round",
1709
1716
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
1710
1717
  };
1711
- function Rl(c, n) {
1712
- return s(), w("svg", jl, n[0] || (n[0] = [
1718
+ function Rl(d, a) {
1719
+ return i(), w("svg", Dl, a[0] || (a[0] = [
1713
1720
  r("path", {
1714
1721
  stroke: "none",
1715
1722
  d: "M0 0h24v24H0z",
@@ -1718,7 +1725,7 @@ function Rl(c, n) {
1718
1725
  r("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1719
1726
  ]));
1720
1727
  }
1721
- const Kl = /* @__PURE__ */ te(Dl, [["render", Rl]]), Fl = {}, Ml = {
1728
+ const Kl = /* @__PURE__ */ te(jl, [["render", Rl]]), Fl = {}, Ml = {
1722
1729
  xmlns: "http://www.w3.org/2000/svg",
1723
1730
  width: "15px",
1724
1731
  height: "24",
@@ -1730,8 +1737,8 @@ const Kl = /* @__PURE__ */ te(Dl, [["render", Rl]]), Fl = {}, Ml = {
1730
1737
  "stroke-linejoin": "round",
1731
1738
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
1732
1739
  };
1733
- function Ll(c, n) {
1734
- return s(), w("svg", Ml, n[0] || (n[0] = [
1740
+ function Ll(d, a) {
1741
+ return i(), w("svg", Ml, a[0] || (a[0] = [
1735
1742
  r("path", {
1736
1743
  stroke: "none",
1737
1744
  d: "M0 0h24v24H0z",
@@ -1744,7 +1751,7 @@ const El = /* @__PURE__ */ te(Fl, [["render", Ll]]), Ol = { class: "flex" }, Tl
1744
1751
  key: 1,
1745
1752
  class: "flex gap-1 !w-[75%] rounded-sm"
1746
1753
  }, Wl = ["max", "disabled"], ql = ["min", "disabled"];
1747
- const Ql = /* @__PURE__ */ W({
1754
+ const Ql = /* @__PURE__ */ q({
1748
1755
  __name: "date-input-inline",
1749
1756
  props: {
1750
1757
  id: {},
@@ -1769,125 +1776,126 @@ const Ql = /* @__PURE__ */ W({
1769
1776
  mode: {},
1770
1777
  labelKey: {},
1771
1778
  sort: {},
1772
- ua: {}
1779
+ ua: {},
1780
+ itemClass: {}
1773
1781
  },
1774
1782
  emits: ["update:modelValue", "change", "clear"],
1775
- setup(c, { expose: n, emit: v }) {
1776
- const t = se(), u = c, l = v, g = $(null), {
1777
- activeMode: a,
1783
+ setup(d, { expose: a, emit: v }) {
1784
+ const t = se(), u = d, l = v, b = A(null), {
1785
+ activeMode: n,
1778
1786
  innerValue: f,
1779
1787
  onSelectChange: y,
1780
1788
  nextClick: m,
1781
- prevClick: d,
1782
- currentLabel: i,
1783
- clear: C
1789
+ prevClick: c,
1790
+ currentLabel: s,
1791
+ clear: V
1784
1792
  } = Te({
1785
1793
  ...u,
1786
- popoverRef: g
1794
+ popoverRef: b
1787
1795
  }, l);
1788
- return I(() => u.modelValue, (k) => {
1789
- k !== void 0 ? (f.value = k, l("update:modelValue", k)) : (a.value = "", f.value = []);
1790
- }), n({
1791
- clear: C,
1792
- popoverRef: g
1793
- }), (k, _) => (s(), w(T, null, [
1796
+ return U(() => u.modelValue, (k) => {
1797
+ k !== void 0 ? (f.value = k, l("update:modelValue", k)) : (n.value = "", f.value = []);
1798
+ }), a({
1799
+ clear: V,
1800
+ popoverRef: b
1801
+ }), (k, C) => (i(), w(I, null, [
1794
1802
  r("div", Ol, [
1795
- Q(_e, {
1803
+ Q(Ve, {
1796
1804
  ref_key: "popoverRef",
1797
- ref: g,
1798
- label: e(i),
1805
+ ref: b,
1806
+ label: e(s),
1799
1807
  "current-value": e(f),
1800
1808
  mode: k.mode,
1801
1809
  width: typeof k.width == "number" && e(f).length ? k.width - 70 : k.width,
1802
- onClear: e(C),
1810
+ onClear: e(V),
1803
1811
  layout: k.layout
1804
1812
  }, {
1805
1813
  default: oe(() => [
1806
1814
  r("div", null, [
1807
1815
  r("button", {
1808
1816
  type: "button",
1809
- onClick: _[0] || (_[0] = (o) => e(y)("range")),
1817
+ onClick: C[0] || (C[0] = (o) => e(y)("range")),
1810
1818
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1811
1819
  }, [
1812
1820
  G(S(e(t)("filter.period")) + " ", 1),
1813
- e(a) === "range" ? (s(), E(ae, { key: 0 })) : V("", !0)
1821
+ e(n) === "range" ? (i(), T(ne, { key: 0 })) : $("", !0)
1814
1822
  ])
1815
1823
  ]),
1816
- _[12] || (_[12] = r("div", null, [
1824
+ C[12] || (C[12] = r("div", null, [
1817
1825
  r("div", { class: "pt-1 mt-1 border-t" })
1818
1826
  ], -1)),
1819
1827
  r("div", null, [
1820
1828
  r("button", {
1821
1829
  type: "button",
1822
- onClick: _[1] || (_[1] = (o) => e(y)("today")),
1830
+ onClick: C[1] || (C[1] = (o) => e(y)("today")),
1823
1831
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1824
1832
  }, [
1825
1833
  G(S(e(t)("filter.today")) + " ", 1),
1826
- e(a) === "today" ? (s(), E(ae, { key: 0 })) : V("", !0)
1834
+ e(n) === "today" ? (i(), T(ne, { key: 0 })) : $("", !0)
1827
1835
  ])
1828
1836
  ]),
1829
1837
  r("div", null, [
1830
1838
  r("button", {
1831
1839
  type: "button",
1832
- onClick: _[2] || (_[2] = (o) => e(y)("week")),
1840
+ onClick: C[2] || (C[2] = (o) => e(y)("week")),
1833
1841
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1834
1842
  }, [
1835
1843
  G(S(e(t)("filter.week")) + " ", 1),
1836
- e(a) === "week" ? (s(), E(ae, { key: 0 })) : V("", !0)
1844
+ e(n) === "week" ? (i(), T(ne, { key: 0 })) : $("", !0)
1837
1845
  ])
1838
1846
  ]),
1839
1847
  r("div", null, [
1840
1848
  r("button", {
1841
1849
  type: "button",
1842
- onClick: _[3] || (_[3] = (o) => e(y)("month")),
1850
+ onClick: C[3] || (C[3] = (o) => e(y)("month")),
1843
1851
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1844
1852
  }, [
1845
1853
  G(S(e(t)("filter.month")) + " ", 1),
1846
- e(a) === "month" ? (s(), E(ae, { key: 0 })) : V("", !0)
1854
+ e(n) === "month" ? (i(), T(ne, { key: 0 })) : $("", !0)
1847
1855
  ])
1848
1856
  ]),
1849
1857
  r("div", null, [
1850
1858
  r("button", {
1851
1859
  type: "button",
1852
- onClick: _[4] || (_[4] = (o) => e(y)("quarter")),
1860
+ onClick: C[4] || (C[4] = (o) => e(y)("quarter")),
1853
1861
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1854
1862
  }, [
1855
1863
  G(S(e(t)("filter.quarter")) + " ", 1),
1856
- e(a) === "quarter" ? (s(), E(ae, { key: 0 })) : V("", !0)
1864
+ e(n) === "quarter" ? (i(), T(ne, { key: 0 })) : $("", !0)
1857
1865
  ])
1858
1866
  ]),
1859
1867
  r("div", Tl, [
1860
1868
  r("button", {
1861
1869
  type: "button",
1862
- onClick: _[5] || (_[5] = (o) => e(y)("year")),
1870
+ onClick: C[5] || (C[5] = (o) => e(y)("year")),
1863
1871
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1864
1872
  }, [
1865
1873
  G(S(e(t)("filter.year")) + " ", 1),
1866
- e(a) === "year" ? (s(), E(ae, { key: 0 })) : V("", !0)
1874
+ e(n) === "year" ? (i(), T(ne, { key: 0 })) : $("", !0)
1867
1875
  ])
1868
1876
  ]),
1869
1877
  r("div", Il, [
1870
1878
  r("button", {
1871
1879
  type: "button",
1872
- onClick: _[6] || (_[6] = (o) => e(C)()),
1880
+ onClick: C[6] || (C[6] = (o) => e(V)()),
1873
1881
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1874
1882
  }, [
1875
1883
  G(S(e(t)("filter.alltime")) + " ", 1),
1876
- e(f)[0] ? V("", !0) : (s(), E(ae, { key: 0 }))
1884
+ e(f)[0] ? $("", !0) : (i(), T(ne, { key: 0 }))
1877
1885
  ])
1878
1886
  ])
1879
1887
  ]),
1880
1888
  _: 1,
1881
1889
  __: [12]
1882
1890
  }, 8, ["label", "current-value", "mode", "width", "onClear", "layout"]),
1883
- e(a) !== "" && e(a) !== "range" && e(a) !== "last_7_days" ? (s(), w(T, { key: 0 }, [
1891
+ e(n) !== "" && e(n) !== "range" && e(n) !== "last_7_days" ? (i(), w(I, { key: 0 }, [
1884
1892
  r("div", Ul, [
1885
1893
  r("button", {
1886
1894
  type: "button",
1887
1895
  title: e(t)("filter.prev"),
1888
1896
  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",
1889
- onClick: _[7] || (_[7] = //@ts-ignore
1890
- (...o) => e(d) && e(d)(...o))
1897
+ onClick: C[7] || (C[7] = //@ts-ignore
1898
+ (...o) => e(c) && e(c)(...o))
1891
1899
  }, [
1892
1900
  Q(Kl)
1893
1901
  ], 8, zl)
@@ -1897,43 +1905,43 @@ const Ql = /* @__PURE__ */ W({
1897
1905
  type: "button",
1898
1906
  title: e(t)("filter.next"),
1899
1907
  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",
1900
- onClick: _[8] || (_[8] = //@ts-ignore
1908
+ onClick: C[8] || (C[8] = //@ts-ignore
1901
1909
  (...o) => e(m) && e(m)(...o))
1902
1910
  }, [
1903
1911
  Q(El)
1904
1912
  ], 8, Pl)
1905
1913
  ])
1906
- ], 64)) : V("", !0),
1907
- e(a) !== "" && e(a) === "range" ? (s(), w("div", Yl, [
1908
- Y(r("input", {
1914
+ ], 64)) : $("", !0),
1915
+ e(n) !== "" && e(n) === "range" ? (i(), w("div", Yl, [
1916
+ W(r("input", {
1909
1917
  type: "date",
1910
1918
  max: e(f)[1],
1911
1919
  locale: "uk-UA",
1912
- "onUpdate:modelValue": _[9] || (_[9] = (o) => e(f)[0] = o),
1920
+ "onUpdate:modelValue": C[9] || (C[9] = (o) => e(f)[0] = o),
1913
1921
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",
1914
1922
  disabled: k.disabled
1915
1923
  }, null, 8, Wl), [
1916
1924
  [ee, e(f)[0]]
1917
1925
  ]),
1918
- Y(r("input", {
1926
+ W(r("input", {
1919
1927
  type: "date",
1920
1928
  min: e(f)[0],
1921
1929
  locale: "uk-UA",
1922
- "onUpdate:modelValue": _[10] || (_[10] = (o) => e(f)[1] = o),
1930
+ "onUpdate:modelValue": C[10] || (C[10] = (o) => e(f)[1] = o),
1923
1931
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",
1924
1932
  disabled: k.disabled
1925
1933
  }, null, 8, ql), [
1926
1934
  [ee, e(f)[1]]
1927
1935
  ])
1928
- ])) : V("", !0)
1936
+ ])) : $("", !0)
1929
1937
  ]),
1930
- (k.cleanable, V("", !0))
1938
+ (k.cleanable, $("", !0))
1931
1939
  ], 64));
1932
1940
  }
1933
1941
  }), Hl = { class: "flex flex-wrap items-center gap-2" }, Gl = ["disabled", "onClick"], Xl = {
1934
1942
  key: 0,
1935
1943
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1936
- }, Zl = /* @__PURE__ */ W({
1944
+ }, Zl = /* @__PURE__ */ q({
1937
1945
  __name: "button-field",
1938
1946
  props: {
1939
1947
  id: {},
@@ -1958,72 +1966,73 @@ const Ql = /* @__PURE__ */ W({
1958
1966
  mode: {},
1959
1967
  labelKey: {},
1960
1968
  sort: {},
1961
- ua: {}
1969
+ ua: {},
1970
+ itemClass: {}
1962
1971
  },
1963
1972
  emits: ["update:modelValue", "change", "clear"],
1964
- setup(c, { expose: n, emit: v }) {
1965
- const t = c, u = v, {
1973
+ setup(d, { expose: a, emit: v }) {
1974
+ const t = d, u = v, {
1966
1975
  innerValue: l,
1967
- isSelected: g,
1968
- selectItem: a,
1976
+ isSelected: b,
1977
+ selectItem: n,
1969
1978
  clear: f,
1970
1979
  labelKey: y,
1971
1980
  valueKey: m,
1972
- allOptions: d
1981
+ allOptions: c
1973
1982
  } = xe({
1974
1983
  ...t,
1975
1984
  modelValue: t.modelValue ?? t.default ?? ""
1976
- }, u), i = L(() => l.value !== void 0 && !(typeof l.value == "string" && l.value === "")), C = L(() => i.value ? 1 : 0);
1985
+ }, u), s = O(() => l.value !== void 0 && !(typeof l.value == "string" && l.value === "")), V = O(() => s.value ? 1 : 0);
1977
1986
  function k(o) {
1978
- return g(o) ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-200";
1987
+ return b(o) ? ["bg-blue-600 text-white"].filter((g) => typeof g == "string" && g.trim().length > 0).join(" ") : ["text-gray-700 hover:bg-gray-200 bg-gray-50 "].filter((g) => typeof g == "string" && g.trim().length > 0).join(" ");
1979
1988
  }
1980
- function _(o) {
1981
- t.disabled || a(o);
1989
+ function C(o) {
1990
+ t.disabled || n(o);
1982
1991
  }
1983
- return n({
1992
+ return a({
1984
1993
  clear: f
1985
- }), I(
1994
+ }), U(
1986
1995
  () => t.modelValue,
1987
1996
  (o) => {
1988
1997
  o === void 0 && (l.value = void 0);
1989
1998
  }
1990
- ), (o, b) => (s(), w(T, null, [
1999
+ ), (o, g) => (i(), w(I, null, [
1991
2000
  r("div", Hl, [
1992
- (s(!0), w(T, null, X(e(d), (p) => (s(), w("button", {
2001
+ (i(!0), w(I, null, X(e(c), (p) => (i(), w("button", {
1993
2002
  key: p[e(m)],
1994
2003
  type: "button",
1995
- class: U(["px-3 py-1.5 text-sm font-medium rounded-md transition-colors", k(p)]),
2004
+ class: E(["px-3 py-2 text-sm font-medium rounded-md transition-colors", k(p)]),
1996
2005
  disabled: o.disabled,
1997
- onClick: (h) => _(p)
2006
+ onClick: (h) => C(p)
1998
2007
  }, S(p[e(y)]), 11, Gl))), 128))
1999
2008
  ]),
2000
- o.cleanable && o.layout === "popover" ? (s(), w("div", Xl, [
2001
- r("span", null, S(C.value) + " з " + S(e(d).length) + " обрано", 1),
2002
- Y(r("button", {
2009
+ o.cleanable && o.layout === "popover" ? (i(), w("div", Xl, [
2010
+ r("span", null, S(V.value) + " з " + S(e(c).length) + " обрано", 1),
2011
+ W(r("button", {
2003
2012
  class: "text-gray-600 hover:text-gray-800",
2004
- onClick: b[0] || (b[0] = //@ts-ignore
2013
+ onClick: g[0] || (g[0] = //@ts-ignore
2005
2014
  (...p) => e(f) && e(f)(...p))
2006
2015
  }, " Очистити ", 512), [
2007
- [J, i.value]
2016
+ [J, s.value]
2008
2017
  ])
2009
- ])) : V("", !0)
2018
+ ])) : $("", !0)
2010
2019
  ], 64));
2011
2020
  }
2012
- }), De = {
2021
+ }), je = {
2013
2022
  radio: xt,
2014
2023
  checkbox: Be,
2015
2024
  check: Be,
2016
2025
  text: Lt,
2017
2026
  range: Yt,
2018
- date: nl,
2027
+ date: al,
2019
2028
  select: ml,
2020
2029
  tag: xl,
2021
2030
  button: Zl,
2022
2031
  "date:inline": Ql
2023
2032
  };
2024
- function Ve(c, n) {
2033
+ function _e(d, a) {
2025
2034
  let v;
2026
- switch (c.toLowerCase()) {
2035
+ switch (d.toLowerCase()) {
2027
2036
  case "autocomplete":
2028
2037
  v = "select";
2029
2038
  break;
@@ -2031,14 +2040,14 @@ function Ve(c, n) {
2031
2040
  v = "checkbox";
2032
2041
  break;
2033
2042
  default:
2034
- v = c?.toString().toLowerCase();
2043
+ v = d?.toString().toLowerCase();
2035
2044
  }
2036
- return v === "date" && n && n === "inline" && (v = "date:inline"), {
2037
- component: De[v] || De.text,
2045
+ return v === "date" && a && a === "inline" && (v = "date:inline"), {
2046
+ component: je[v] || je.text,
2038
2047
  type: v
2039
2048
  };
2040
2049
  }
2041
- const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, eo = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, to = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, lo = { class: "flex items-center" }, oo = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, no = { class: "filter-layout__body" }, ao = /* @__PURE__ */ W({
2050
+ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, eo = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, to = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, lo = { class: "flex items-center" }, oo = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, ao = { class: "filter-layout__body" }, no = /* @__PURE__ */ q({
2042
2051
  __name: "vertical-layout",
2043
2052
  props: {
2044
2053
  id: {},
@@ -2063,73 +2072,76 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2063
2072
  mode: {},
2064
2073
  labelKey: {},
2065
2074
  sort: {},
2066
- ua: {}
2075
+ ua: {},
2076
+ itemClass: {}
2067
2077
  },
2068
2078
  emits: ["update:modelValue", "change", "clear"],
2069
- setup(c, { expose: n, emit: v }) {
2070
- const t = c, u = v, l = $(), g = Ve(t.type, t.layout), a = L({
2079
+ setup(d, { expose: a, emit: v }) {
2080
+ const t = d, u = v, l = A(), b = _e(t.type, t.layout), n = O({
2071
2081
  get: () => t.modelValue,
2072
- set: (d) => u("update:modelValue", d)
2082
+ set: (c) => u("update:modelValue", c)
2073
2083
  });
2074
- function f(d) {
2075
- u("clear", d);
2084
+ function f(c) {
2085
+ u("clear", c);
2076
2086
  }
2077
- function y(d, i) {
2078
- u("change", { name: d, value: i }), t.modelValue !== void 0 && u("update:modelValue", i);
2087
+ function y(c, s) {
2088
+ u("change", { name: c, value: s }), t.modelValue !== void 0 && u("update:modelValue", s);
2079
2089
  }
2080
2090
  function m() {
2081
2091
  u("clear", t.name);
2082
2092
  }
2083
- return I(
2093
+ return U(
2084
2094
  () => t.default,
2085
- (d) => {
2086
- a.value = d;
2095
+ (c) => {
2096
+ n.value = c;
2087
2097
  }
2088
- ), I(
2098
+ ), U(
2089
2099
  () => t.modelValue,
2090
- (d) => {
2091
- a.value = d;
2100
+ (c) => {
2101
+ n.value = c;
2092
2102
  }
2093
- ), n({
2103
+ ), a({
2094
2104
  filterRef: l
2095
- }), (d, i) => (s(), w("div", Jl, [
2105
+ }), (c, s) => (i(), w("div", Jl, [
2096
2106
  r("div", eo, [
2097
2107
  r("div", to, [
2098
2108
  r("div", lo, [
2099
- r("span", oo, S(d.label), 1)
2109
+ r("span", oo, S(c.label), 1)
2100
2110
  ]),
2101
- typeof a.value == "string" && a.value.trim() !== "" || Array.isArray(a.value) && a.value.length > 0 && a.value.some((C) => C !== void 0) || a.value === null ? (s(), E(Je, {
2111
+ typeof n.value == "string" && n.value.trim() !== "" || Array.isArray(n.value) && n.value.length > 0 && n.value.some((V) => V !== void 0) || n.value === null ? (i(), T(Je, {
2102
2112
  key: 0,
2103
2113
  onClick: m
2104
- })) : V("", !0)
2114
+ })) : $("", !0)
2105
2115
  ]),
2106
- r("div", no, [
2107
- e(g)?.type !== "select" ? (s(), E(ne(e(g)?.component), Z({ key: 0 }, t, {
2108
- type: e(g)?.type,
2109
- onChange: i[0] || (i[0] = (C) => y(C.name, C.value)),
2110
- onClear: i[1] || (i[1] = (C) => f(C)),
2116
+ r("div", ao, [
2117
+ e(b)?.type !== "select" ? (i(), T(ae(e(b)?.component), Z({ key: 0 }, t, {
2118
+ type: e(b)?.type,
2119
+ class: t.itemClass,
2120
+ onChange: s[0] || (s[0] = (V) => y(V.name, V.value)),
2121
+ onClear: s[1] || (s[1] = (V) => f(V)),
2111
2122
  ref_key: "filterRef",
2112
2123
  ref: l
2113
- }), null, 16, ["type"])) : (s(), E(_e, {
2124
+ }), null, 16, ["type", "class"])) : (i(), T(Ve, {
2114
2125
  key: 1,
2115
- "current-value": a.value,
2116
- label: d.label,
2117
- mode: d.mode,
2126
+ "current-value": n.value,
2127
+ label: c.label,
2128
+ mode: c.mode,
2118
2129
  onClear: m,
2119
2130
  fieldRef: l.value,
2120
2131
  width: void 0,
2121
- disabled: d.disabled,
2132
+ disabled: c.disabled,
2122
2133
  layout: "vertical"
2123
2134
  }, {
2124
2135
  default: oe(() => [
2125
- (s(), E(ne(e(g)?.component), Z({
2136
+ (i(), T(ae(e(b)?.component), Z({
2126
2137
  ref_key: "filterRef",
2127
2138
  ref: l
2128
2139
  }, t, {
2129
- type: e(g)?.type,
2130
- onChange: i[2] || (i[2] = (C) => y(C.name, C.value)),
2131
- onClear: i[3] || (i[3] = (C) => f(C))
2132
- }), null, 16, ["type"]))
2140
+ type: e(b)?.type,
2141
+ class: t.itemClass,
2142
+ onChange: s[2] || (s[2] = (V) => y(V.name, V.value)),
2143
+ onClear: s[3] || (s[3] = (V) => f(V))
2144
+ }), null, 16, ["type", "class"]))
2133
2145
  ]),
2134
2146
  _: 1
2135
2147
  }, 8, ["current-value", "label", "mode", "fieldRef", "disabled"]))
@@ -2137,7 +2149,7 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2137
2149
  ])
2138
2150
  ]));
2139
2151
  }
2140
- }), je = /* @__PURE__ */ W({
2152
+ }), De = /* @__PURE__ */ q({
2141
2153
  __name: "inline-layout",
2142
2154
  props: {
2143
2155
  id: {},
@@ -2162,42 +2174,44 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2162
2174
  mode: {},
2163
2175
  labelKey: {},
2164
2176
  sort: {},
2165
- ua: {}
2177
+ ua: {},
2178
+ itemClass: {}
2166
2179
  },
2167
2180
  emits: ["update:modelValue", "change", "clear"],
2168
- setup(c, { expose: n, emit: v }) {
2169
- const t = c, u = v, l = $(), g = Ve(t.type, t.layout), a = L({
2181
+ setup(d, { expose: a, emit: v }) {
2182
+ const t = d, u = v, l = A(), b = _e(t.type, t.layout), n = O({
2170
2183
  get: () => t.modelValue,
2171
2184
  set: (m) => u("update:modelValue", m)
2172
2185
  });
2173
2186
  function f(m = t.name) {
2174
2187
  u("clear", m);
2175
2188
  }
2176
- function y(m, d) {
2177
- u("change", { name: m, value: d }), t.modelValue !== void 0 && u("update:modelValue", d);
2189
+ function y(m, c) {
2190
+ u("change", { name: m, value: c }), t.modelValue !== void 0 && u("update:modelValue", c);
2178
2191
  }
2179
- return I(
2192
+ return U(
2180
2193
  () => t.default,
2181
2194
  (m) => {
2182
- a.value = m;
2195
+ n.value = m;
2183
2196
  }
2184
- ), I(
2197
+ ), U(
2185
2198
  () => t.modelValue,
2186
2199
  (m) => {
2187
- a.value = m;
2200
+ n.value = m;
2188
2201
  }
2189
- ), n({
2202
+ ), a({
2190
2203
  filterRef: l
2191
- }), (m, d) => ["text", "date", "button"].includes(m.type.toLocaleLowerCase()) ? (s(), E(ne(e(g)?.component), Z({ key: 0 }, t, {
2192
- type: e(g)?.type,
2193
- onChange: d[0] || (d[0] = (i) => y(i.name, i.value)),
2194
- onClear: d[1] || (d[1] = (i) => f(i)),
2204
+ }), (m, c) => ["text", "date", "button"].includes(m.type.toLocaleLowerCase()) ? (i(), T(ae(e(b)?.component), Z({ key: 0 }, t, {
2205
+ type: e(b)?.type,
2206
+ class: t.itemClass,
2207
+ onChange: c[0] || (c[0] = (s) => y(s.name, s.value)),
2208
+ onClear: c[1] || (c[1] = (s) => f(s)),
2195
2209
  disabled: m.disabled,
2196
- modelValue: a.value,
2197
- "onUpdate:modelValue": d[2] || (d[2] = (i) => a.value = i)
2198
- }), null, 16, ["type", "disabled", "modelValue"])) : (s(), E(_e, {
2210
+ modelValue: n.value,
2211
+ "onUpdate:modelValue": c[2] || (c[2] = (s) => n.value = s)
2212
+ }), null, 16, ["type", "class", "disabled", "modelValue"])) : (i(), T(Ve, {
2199
2213
  key: 1,
2200
- "current-value": a.value,
2214
+ "current-value": n.value,
2201
2215
  label: m.label,
2202
2216
  mode: m.mode,
2203
2217
  onClear: f,
@@ -2207,21 +2221,22 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2207
2221
  layout: "inline"
2208
2222
  }, {
2209
2223
  default: oe(() => [
2210
- (s(), E(ne(e(g)?.component), Z({
2224
+ (i(), T(ae(e(b)?.component), Z({
2211
2225
  ref_key: "filterRef",
2212
2226
  ref: l
2213
2227
  }, t, {
2214
- modelValue: a.value,
2215
- "onUpdate:modelValue": d[3] || (d[3] = (i) => a.value = i),
2216
- type: e(g)?.type,
2217
- onChange: d[4] || (d[4] = (i) => y(i.name, i.value)),
2218
- onClear: d[5] || (d[5] = (i) => f(i))
2219
- }), null, 16, ["modelValue", "type"]))
2228
+ modelValue: n.value,
2229
+ "onUpdate:modelValue": c[3] || (c[3] = (s) => n.value = s),
2230
+ type: e(b)?.type,
2231
+ class: t.itemClass,
2232
+ onChange: c[4] || (c[4] = (s) => y(s.name, s.value)),
2233
+ onClear: c[5] || (c[5] = (s) => f(s))
2234
+ }), null, 16, ["modelValue", "type", "class"]))
2220
2235
  ]),
2221
2236
  _: 1
2222
2237
  }, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
2223
2238
  }
2224
- }), ro = /* @__PURE__ */ W({
2239
+ }), ro = /* @__PURE__ */ q({
2225
2240
  __name: "popover-layout",
2226
2241
  props: {
2227
2242
  id: {},
@@ -2246,48 +2261,50 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2246
2261
  mode: {},
2247
2262
  labelKey: {},
2248
2263
  sort: {},
2249
- ua: {}
2264
+ ua: {},
2265
+ itemClass: {}
2250
2266
  },
2251
2267
  emits: ["update:modelValue", "change", "clear"],
2252
- setup(c, { expose: n, emit: v }) {
2253
- const t = c, u = v, l = $(), g = $(Ve(t.type, t.layout)), a = L({
2268
+ setup(d, { expose: a, emit: v }) {
2269
+ const t = d, u = v, l = A(), b = A(_e(t.type, t.layout)), n = O({
2254
2270
  get: () => t.modelValue,
2255
2271
  set: (m) => u("update:modelValue", m)
2256
2272
  });
2257
2273
  function f(m) {
2258
2274
  u("clear", m);
2259
2275
  }
2260
- function y(m, d) {
2261
- u("change", { name: m, value: d }), t.modelValue !== void 0 && u("update:modelValue", d);
2276
+ function y(m, c) {
2277
+ u("change", { name: m, value: c }), t.modelValue !== void 0 && u("update:modelValue", c);
2262
2278
  }
2263
- return I(
2279
+ return U(
2264
2280
  () => t.default,
2265
2281
  (m) => {
2266
- a.value = m;
2282
+ n.value = m;
2267
2283
  }
2268
- ), I(
2284
+ ), U(
2269
2285
  () => t.modelValue,
2270
2286
  (m) => {
2271
- a.value = m;
2287
+ n.value = m;
2272
2288
  }
2273
- ), I(
2289
+ ), U(
2274
2290
  () => t,
2275
2291
  (m) => {
2276
- a.value = m;
2292
+ n.value = m;
2277
2293
  }
2278
- ), n({
2294
+ ), a({
2279
2295
  filterRef: l
2280
- }), (m, d) => (s(), E(ne(g.value?.component), Z(t, {
2281
- type: g.value?.type,
2282
- modelValue: a.value,
2283
- "onUpdate:modelValue": d[0] || (d[0] = (i) => a.value = i),
2284
- onChange: d[1] || (d[1] = (i) => y(i.name, i.value)),
2285
- onClear: d[2] || (d[2] = (i) => f(i)),
2296
+ }), (m, c) => (i(), T(ae(b.value?.component), Z(t, {
2297
+ type: b.value?.type,
2298
+ class: t.itemClass,
2299
+ modelValue: n.value,
2300
+ "onUpdate:modelValue": c[0] || (c[0] = (s) => n.value = s),
2301
+ onChange: c[1] || (c[1] = (s) => y(s.name, s.value)),
2302
+ onClear: c[2] || (c[2] = (s) => f(s)),
2286
2303
  ref_key: "filterRef",
2287
2304
  ref: l
2288
- }), null, 16, ["type", "modelValue"]));
2305
+ }), null, 16, ["type", "class", "modelValue"]));
2289
2306
  }
2290
- }), le = /* @__PURE__ */ W({
2307
+ }), le = /* @__PURE__ */ q({
2291
2308
  __name: "filter-field",
2292
2309
  props: {
2293
2310
  id: {},
@@ -2312,182 +2329,185 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2312
2329
  mode: {},
2313
2330
  labelKey: {},
2314
2331
  sort: { default: "name" },
2315
- ua: {}
2332
+ ua: {},
2333
+ itemClass: {}
2316
2334
  },
2317
2335
  emits: ["update:modelValue", "change", "clear"],
2318
- setup(c, { expose: n, emit: v }) {
2319
- const t = c, u = v, l = $(), g = L({
2336
+ setup(d, { expose: a, emit: v }) {
2337
+ const t = d, u = v, l = A(), b = O({
2320
2338
  get: () => t.modelValue,
2321
2339
  set: (m) => u("update:modelValue", m)
2322
2340
  });
2323
- function a(m) {
2341
+ function n(m) {
2324
2342
  u("clear", m);
2325
2343
  }
2326
- function f(m, d) {
2327
- u("change", { name: m, value: d }), t.modelValue !== void 0 && u("update:modelValue", d);
2344
+ function f(m, c) {
2345
+ u("change", { name: m, value: c }), t.modelValue !== void 0 && u("update:modelValue", c);
2328
2346
  }
2329
- I(
2347
+ U(
2330
2348
  () => t.default,
2331
2349
  (m) => {
2332
- g.value = m;
2350
+ b.value = m;
2333
2351
  }
2334
- ), I(
2352
+ ), U(
2335
2353
  () => t.modelValue,
2336
2354
  (m) => {
2337
- g.value = m;
2355
+ b.value = m;
2338
2356
  }
2339
- ), n({
2357
+ ), a({
2340
2358
  filterRef: l
2341
2359
  });
2342
2360
  function y() {
2343
2361
  switch (t.layout) {
2344
2362
  case "inline":
2345
- return je;
2363
+ return De;
2346
2364
  case "vertical":
2347
- return ao;
2365
+ return no;
2348
2366
  case "popover":
2349
2367
  return ro;
2350
2368
  default:
2351
- return je;
2369
+ return De;
2352
2370
  }
2353
2371
  }
2354
- return (m, d) => (s(), E(ne(y()), Z(t, {
2355
- onChange: d[0] || (d[0] = (i) => f(i.name, i.value)),
2356
- onClear: d[1] || (d[1] = (i) => a(i)),
2357
- modelValue: g.value,
2358
- "onUpdate:modelValue": d[2] || (d[2] = (i) => g.value = i)
2372
+ return (m, c) => (i(), T(ae(y()), Z(t, {
2373
+ onChange: c[0] || (c[0] = (s) => f(s.name, s.value)),
2374
+ onClear: c[1] || (c[1] = (s) => n(s)),
2375
+ modelValue: b.value,
2376
+ "onUpdate:modelValue": c[2] || (c[2] = (s) => b.value = s)
2359
2377
  }), null, 16, ["modelValue"]));
2360
2378
  }
2361
2379
  });
2362
- function ye(c, n) {
2380
+ function ye(d, a) {
2363
2381
  const {
2364
2382
  slots: v
2365
- } = c, t = $(c.value ?? {}), u = L(() => (de(v?.default?.()) ?? []).flatMap((b) => Array.isArray(b.children) ? b.children : [b]));
2383
+ } = d, t = A(d.value ?? {}), u = O(() => (de(v?.default?.()) ?? []).flatMap((g) => Array.isArray(g.children) ? g.children : [g]));
2366
2384
  function l(o) {
2367
- delete t.value[o], n("clear", {
2385
+ delete t.value[o], a("clear", {
2368
2386
  data: de(t.value),
2369
2387
  name: o
2370
2388
  });
2371
2389
  }
2372
- function g(o, b) {
2373
- b === void 0 ? l(o) : t.value = {
2390
+ function b(o, g) {
2391
+ g === void 0 ? l(o) : t.value = {
2374
2392
  ...t.value,
2375
- [o]: b
2376
- }, n("change", {
2393
+ [o]: g
2394
+ }, a("change", {
2377
2395
  data: de(t.value),
2378
2396
  name: o,
2379
- value: b
2397
+ value: g
2380
2398
  });
2381
2399
  }
2382
- const a = L(() => u.value.map((o) => {
2383
- const b = o.props?.name;
2400
+ const n = O(() => u.value.map((o) => {
2401
+ const g = o.props?.name;
2384
2402
  return Ye(o, {
2385
2403
  ...o.props,
2386
- layout: c.view,
2404
+ layout: d.view,
2387
2405
  showClean: !0,
2388
- modelValue: t.value[b],
2406
+ modelValue: t.value[g],
2389
2407
  "onUpdate:modelValue": (p) => {
2390
- g(b, p);
2408
+ b(g, p);
2391
2409
  },
2392
- onClear: () => l(b)
2410
+ onClear: () => l(g),
2411
+ class: [d.itemClass, o.props?.class],
2412
+ itemClass: [d.itemClass, o.props?.itemClass].filter((p) => typeof p == "string" && p.trim().length > 0).join(" ") || void 0
2393
2413
  });
2394
- })), f = L(
2414
+ })), f = O(
2395
2415
  () => new Map(
2396
- a.value.map((o) => {
2397
- const b = o.props?.name;
2398
- return b ? [b, o] : null;
2416
+ n.value.map((o) => {
2417
+ const g = o.props?.name;
2418
+ return g ? [g, o] : null;
2399
2419
  }).filter((o) => o !== null)
2400
2420
  )
2401
2421
  );
2402
2422
  function y(o = !1) {
2403
- t.value = {}, o || n("clearAll", {
2423
+ t.value = {}, o || a("clearAll", {
2404
2424
  data: de(t.value),
2405
2425
  name: "ALL"
2406
2426
  });
2407
2427
  }
2408
- const m = $(""), d = L(() => c.schema?.value ? Object.entries(t.value).filter(([o, b]) => c.schema && !(o in c.schema.value) ? !1 : Array.isArray(b) ? b.some((p) => p !== "" && p !== void 0) : b !== "" && b !== void 0).length : 0), i = $();
2409
- I(m, async () => {
2410
- await me(), i?.value?.filterRef?.inputTextRef && i.value.filterRef.inputTextRef.focus();
2428
+ const m = A(""), c = O(() => d.schema?.value ? Object.entries(t.value).filter(([o, g]) => d.schema && !(o in d.schema.value) ? !1 : Array.isArray(g) ? g.some((p) => p !== "" && p !== void 0) : g !== "" && g !== void 0).length : 0), s = A();
2429
+ U(m, async () => {
2430
+ await me(), s?.value?.filterRef?.inputTextRef && s.value.filterRef.inputTextRef.focus();
2411
2431
  });
2412
- const C = L(() => c.schema?.value ? Object.fromEntries(Object.entries(c.schema?.value).slice(0, c.limit)) : {}), k = L(() => {
2413
- if (a.value.length === 0) return [];
2432
+ const V = O(() => d.schema?.value ? Object.fromEntries(Object.entries(d.schema?.value).slice(0, d.limit)) : {}), k = O(() => {
2433
+ if (n.value.length === 0) return [];
2414
2434
  let o = 0;
2415
- if (c.schema?.value) {
2416
- const b = Object.entries(c.schema.value).length;
2417
- c.limit && b < c.limit ? o = c.limit - b : o = 0;
2435
+ if (d.schema?.value) {
2436
+ const g = Object.entries(d.schema.value).length;
2437
+ d.limit && g < d.limit ? o = d.limit - g : o = 0;
2418
2438
  }
2419
- return a.value.slice(0, o);
2420
- }), _ = L(() => a.value.length === 0 ? [] : c.view !== "inline" ? a.value : a.value.slice(k.value.length));
2439
+ return n.value.slice(0, o);
2440
+ }), C = O(() => n.value.length === 0 ? [] : d.view !== "inline" ? n.value : n.value.slice(k.value.length));
2421
2441
  return {
2422
2442
  activeFilter: t,
2423
- activeFilterCount: d,
2424
- onFilterChange: g,
2443
+ activeFilterCount: c,
2444
+ onFilterChange: b,
2425
2445
  clearFilter: l,
2426
2446
  clearAllFilters: y,
2427
- limitedSchema: C,
2428
- filtersSlot: a,
2447
+ limitedSchema: V,
2448
+ filtersSlot: n,
2429
2449
  limitedFiltersSlot: k,
2430
- popoverFiltersSlot: _,
2450
+ popoverFiltersSlot: C,
2431
2451
  vnodeMap: f,
2432
2452
  selectedFilter: m,
2433
- filterRef: i
2453
+ filterRef: s
2434
2454
  };
2435
2455
  }
2436
- const so = /* @__PURE__ */ W({
2456
+ const so = /* @__PURE__ */ q({
2437
2457
  __name: "popover",
2438
2458
  emits: ["open", "close"],
2439
- setup(c, { emit: n }) {
2440
- const v = $(!1), t = $(null), u = $(null), l = $(null), g = $({ top: "0px", left: "0px", position: "absolute" });
2441
- function a() {
2459
+ setup(d, { emit: a }) {
2460
+ const v = A(!1), t = A(null), u = A(null), l = A(null), b = A({ top: "0px", left: "0px", position: "absolute" });
2461
+ function n() {
2442
2462
  v.value = !v.value;
2443
2463
  }
2444
2464
  function f() {
2445
- const C = l.value, k = t.value;
2446
- if (!C || !k) return;
2447
- const _ = C.getBoundingClientRect(), o = k.offsetWidth, b = window.innerWidth - _.left;
2448
- let p = _.left + window.scrollX;
2449
- o > b && (p = window.innerWidth - o - 8, p < 8 && (p = 8)), g.value = {
2465
+ const V = l.value, k = t.value;
2466
+ if (!V || !k) return;
2467
+ const C = V.getBoundingClientRect(), o = k.offsetWidth, g = window.innerWidth - C.left;
2468
+ let p = C.left + window.scrollX;
2469
+ o > g && (p = window.innerWidth - o - 8, p < 8 && (p = 8)), b.value = {
2450
2470
  position: "absolute",
2451
- top: `${_.bottom + window.scrollY + 8}px`,
2471
+ top: `${C.bottom + window.scrollY + 8}px`,
2452
2472
  left: `${p}px`
2453
2473
  };
2454
2474
  }
2455
- const y = L(() => Object.entries(g.value).map((C) => C.join(":")).join(";"));
2456
- function m(C) {
2457
- const k = C.target;
2458
- !l.value?.contains(C.target) && !t.value?.contains(C.target) && !k.closest("[data-inside-popover]") && (v.value = !1);
2475
+ const y = O(() => Object.entries(b.value).map((V) => V.join(":")).join(";"));
2476
+ function m(V) {
2477
+ const k = V.target;
2478
+ !l.value?.contains(V.target) && !t.value?.contains(V.target) && !k.closest("[data-inside-popover]") && (v.value = !1);
2459
2479
  }
2460
- const d = $(!1);
2480
+ const c = A(!1);
2461
2481
  ce(() => {
2462
- d.value = !0;
2482
+ c.value = !0;
2463
2483
  }), ce(() => {
2464
- l.value = u.value?.querySelector("[data-popover-trigger]") || null, l.value?.addEventListener("click", a), document.addEventListener("click", m), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0);
2484
+ l.value = u.value?.querySelector("[data-popover-trigger]") || null, l.value?.addEventListener("click", n), document.addEventListener("click", m), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0);
2465
2485
  }), pe(() => {
2466
- l.value?.removeEventListener("click", a), document.removeEventListener("click", m), window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
2486
+ l.value?.removeEventListener("click", n), document.removeEventListener("click", m), window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
2467
2487
  });
2468
- const i = n;
2469
- return I(v, async (C) => {
2470
- C ? (i("open"), await me(), f()) : i("close");
2471
- }), (C, k) => (s(), w("div", {
2488
+ const s = a;
2489
+ return U(v, async (V) => {
2490
+ V ? (s("open"), await me(), f()) : s("close");
2491
+ }), (V, k) => (i(), w("div", {
2472
2492
  ref_key: "wrapperRef",
2473
2493
  ref: u
2474
2494
  }, [
2475
- ue(C.$slots, "trigger"),
2476
- d.value ? (s(), E(ge, {
2495
+ ue(V.$slots, "trigger"),
2496
+ c.value ? (i(), T(ge, {
2477
2497
  key: 0,
2478
2498
  to: "body"
2479
2499
  }, [
2480
- Y(r("div", {
2500
+ W(r("div", {
2481
2501
  ref_key: "popoverRef",
2482
2502
  ref: t,
2483
2503
  class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
2484
2504
  style: be(y.value)
2485
2505
  }, [
2486
- ue(C.$slots, "default")
2506
+ ue(V.$slots, "default")
2487
2507
  ], 4), [
2488
2508
  [J, v.value]
2489
2509
  ])
2490
- ])) : V("", !0)
2510
+ ])) : $("", !0)
2491
2511
  ], 512));
2492
2512
  }
2493
2513
  }), io = {}, uo = {
@@ -2502,8 +2522,8 @@ const so = /* @__PURE__ */ W({
2502
2522
  "stroke-linejoin": "round",
2503
2523
  class: "lucide lucide-filter h-4 w-4"
2504
2524
  };
2505
- function co(c, n) {
2506
- return s(), w("svg", uo, n[0] || (n[0] = [
2525
+ function co(d, a) {
2526
+ return i(), w("svg", uo, a[0] || (a[0] = [
2507
2527
  r("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2508
2528
  ]));
2509
2529
  }
@@ -2513,16 +2533,16 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2513
2533
  }, mo = { class: "flex" }, vo = { class: "w-64 border-r border-gray-200" }, yo = { class: "p-2" }, go = ["onClick"], bo = { class: "flex items-center gap-2" }, ho = { class: "text-sm font-medium" }, xo = {
2514
2534
  key: 0,
2515
2535
  class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-100 px-1 text-[11px] font-semibold text-blue-600"
2516
- }, wo = ["onClick"], ko = { class: "flex items-center gap-2" }, Co = { class: "text-sm font-medium" }, _o = {
2536
+ }, wo = ["onClick"], ko = { class: "flex items-center gap-2" }, Co = { class: "text-sm font-medium" }, Vo = {
2517
2537
  key: 0,
2518
2538
  class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-100 px-1 text-[11px] font-semibold text-blue-600"
2519
- }, Vo = {
2539
+ }, _o = {
2520
2540
  key: 0,
2521
2541
  class: "p-2 border-t"
2522
2542
  }, $o = { class: "flex-1 min-h-[300px] overflow-y-auto" }, Ao = {
2523
2543
  key: 0,
2524
2544
  class: "flex items-center justify-center h-full text-gray-500"
2525
- }, Ue = /* @__PURE__ */ W({
2545
+ }, Ue = /* @__PURE__ */ q({
2526
2546
  __name: "popover-filter-layout",
2527
2547
  props: {
2528
2548
  badgeCount: {},
@@ -2535,58 +2555,60 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2535
2555
  width: {},
2536
2556
  title: {},
2537
2557
  disabled: { type: Boolean },
2538
- defaultPanelWidth: {}
2558
+ defaultPanelWidth: {},
2559
+ itemClass: {}
2539
2560
  },
2540
2561
  emits: ["change", "clear", "clearAll"],
2541
- setup(c, { expose: n, emit: v }) {
2542
- const t = c, u = Oe(t.mode), l = fe(), g = v, a = $({}), f = L(() => a?.value ? t.view !== "inline" ? a?.value : Object.fromEntries(Object.entries(a?.value).slice(t.limit)) : {}), {
2562
+ setup(d, { expose: a, emit: v }) {
2563
+ const t = d, u = Oe(t.mode), l = fe(), b = v, n = A({}), f = O(() => n?.value ? t.view !== "inline" ? n?.value : Object.fromEntries(Object.entries(n?.value).slice(t.limit)) : {}), {
2543
2564
  activeFilter: y,
2544
2565
  activeFilterCount: m,
2545
- onFilterChange: d,
2546
- clearFilter: i,
2547
- clearAllFilters: C,
2566
+ onFilterChange: c,
2567
+ clearFilter: s,
2568
+ clearAllFilters: V,
2548
2569
  popoverFiltersSlot: k,
2549
- selectedFilter: _,
2570
+ selectedFilter: C,
2550
2571
  filterRef: o
2551
2572
  } = ye({
2552
2573
  ...t,
2553
- schema: a,
2574
+ schema: n,
2554
2575
  slots: l
2555
- }, g), b = L(() => t.badgeCount ?? m.value);
2556
- function p(D) {
2557
- return Array.isArray(D) ? D.filter((F) => F != null && F !== "").length : D && typeof D == "object" ? Object.values(D).filter((F) => F != null && F !== "").length : D === null || D !== void 0 && D !== "" ? 1 : 0;
2576
+ }, b), g = O(() => t.badgeCount ?? m.value);
2577
+ function p(B) {
2578
+ return Array.isArray(B) ? B.filter((F) => F != null && F !== "").length : B && typeof B == "object" ? Object.values(B).filter((F) => F != null && F !== "").length : B === null || B !== void 0 && B !== "" ? 1 : 0;
2558
2579
  }
2559
- function h(D) {
2560
- return y.value ? p(y.value[D]) : 0;
2580
+ function h(B) {
2581
+ return y.value ? p(y.value[B]) : 0;
2561
2582
  }
2562
2583
  function x() {
2563
2584
  if (f.value) {
2564
- const [D] = Object.keys(f.value);
2565
- _.value = D;
2566
- } else k.value.length > 0 ? _.value = k.value[0].props.name : _.value = "";
2585
+ const [B] = Object.keys(f.value);
2586
+ C.value = B;
2587
+ } else k.value.length > 0 ? C.value = k.value[0].props.name : C.value = "";
2567
2588
  }
2568
- return I(
2589
+ return U(
2569
2590
  () => t.schema,
2570
- (D) => {
2571
- a.value = D ?? {};
2591
+ (B) => {
2592
+ n.value = B ?? {};
2572
2593
  },
2573
2594
  { deep: !0, immediate: !0 }
2574
- ), n({
2575
- clearFilter: i,
2576
- clearAllFilters: C
2577
- }), (D, F) => (s(), E(so, {
2595
+ ), a({
2596
+ clearFilter: s,
2597
+ clearAllFilters: V
2598
+ }), (B, F) => (i(), T(so, {
2578
2599
  onOpen: x,
2579
- onClose: F[5] || (F[5] = (A) => _.value = "")
2600
+ onClose: F[5] || (F[5] = (_) => C.value = "")
2580
2601
  }, {
2581
2602
  trigger: oe(() => [
2582
2603
  r("button", {
2583
2604
  "data-popover-trigger": "",
2584
2605
  "aria-haspopup": "dialog",
2585
2606
  "aria-expanded": "false",
2586
- class: U([
2607
+ class: E([
2608
+ B.itemClass,
2587
2609
  e(u),
2588
2610
  "flex items-center justify-between gap-2",
2589
- b.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600 hover:border-blue-500" : "text-neutral-700 hover:border-neutral-400"
2611
+ g.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600 hover:border-blue-500" : "text-neutral-700 hover:border-neutral-400"
2590
2612
  ]),
2591
2613
  type: "button"
2592
2614
  }, [
@@ -2594,7 +2616,7 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2594
2616
  Q(Ie, { class: "h-4 w-4" }),
2595
2617
  F[6] || (F[6] = r("span", { class: "text-sm font-medium" }, "Фільтр", -1))
2596
2618
  ]),
2597
- b.value > 0 ? (s(), w("span", po, S(b.value), 1)) : V("", !0)
2619
+ g.value > 0 ? (i(), w("span", po, S(g.value), 1)) : $("", !0)
2598
2620
  ], 2)
2599
2621
  ]),
2600
2622
  default: oe(() => [
@@ -2604,92 +2626,96 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2604
2626
  r("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
2605
2627
  ], -1)),
2606
2628
  r("div", yo, [
2607
- D.schema ? (s(!0), w(T, { key: 0 }, X(Object.entries(f.value), ([A, R]) => (s(), w("button", {
2608
- key: A,
2629
+ B.schema ? (i(!0), w(I, { key: 0 }, X(Object.entries(f.value), ([_, R]) => (i(), w("button", {
2630
+ key: _,
2609
2631
  onClick: () => {
2610
- _.value = A;
2632
+ C.value = _;
2611
2633
  },
2612
- class: U([
2634
+ class: E([
2613
2635
  "flex w-full items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
2614
- e(_) === A ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2636
+ e(C) === _ ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2615
2637
  ])
2616
2638
  }, [
2617
2639
  r("div", bo, [
2618
2640
  r("span", ho, S(R.label), 1)
2619
2641
  ]),
2620
- h(A) > 0 ? (s(), w("div", xo, S(h(A)), 1)) : V("", !0)
2621
- ], 10, go))), 128)) : V("", !0),
2622
- (s(!0), w(T, null, X(e(k), (A, R) => (s(), w("button", {
2642
+ h(_) > 0 ? (i(), w("div", xo, S(h(_)), 1)) : $("", !0)
2643
+ ], 10, go))), 128)) : $("", !0),
2644
+ (i(!0), w(I, null, X(e(k), (_, R) => (i(), w("button", {
2623
2645
  key: "slot-" + R,
2624
- onClick: (j) => _.value = A.props.name,
2625
- class: U([
2646
+ onClick: (D) => C.value = _.props.name,
2647
+ class: E([
2626
2648
  "flex items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
2627
- e(_) === A.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2649
+ e(C) === _.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2628
2650
  ])
2629
2651
  }, [
2630
2652
  r("div", ko, [
2631
- r("span", Co, S(A.props.label), 1)
2653
+ r("span", Co, S(_.props.label), 1)
2632
2654
  ]),
2633
- h(A.props.name) > 0 ? (s(), w("div", _o, S(h(A.props.name)), 1)) : V("", !0)
2655
+ h(_.props.name) > 0 ? (i(), w("div", Vo, S(h(_.props.name)), 1)) : $("", !0)
2634
2656
  ], 10, wo))), 128))
2635
2657
  ]),
2636
- e(m) > 0 ? (s(), w("div", Vo, [
2658
+ e(m) > 0 ? (i(), w("div", _o, [
2637
2659
  r("button", {
2638
- class: "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",
2639
- onClick: F[0] || (F[0] = (A) => e(C)()),
2660
+ class: E([B.itemClass, "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors"]),
2661
+ onClick: F[0] || (F[0] = (_) => e(V)()),
2640
2662
  "data-inside-popover": ""
2641
- }, " Очистити всі ")
2642
- ])) : V("", !0)
2663
+ }, " Очистити всі ", 2)
2664
+ ])) : $("", !0)
2643
2665
  ]),
2644
2666
  r("div", $o, [
2645
- e(_) === "" ? (s(), w("div", Ao, F[8] || (F[8] = [
2667
+ e(C) === "" ? (i(), w("div", Ao, F[8] || (F[8] = [
2646
2668
  r("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
2647
- ]))) : V("", !0),
2648
- e(_) ? (s(), w(T, { key: 1 }, [
2649
- f.value ? (s(!0), w(T, { key: 0 }, X(Object.entries(f.value), ([A, R]) => (s(), w(T, null, [
2650
- e(_) === A ? (s(), E(le, Z({
2651
- key: A,
2669
+ ]))) : $("", !0),
2670
+ e(C) ? (i(), w(I, { key: 1 }, [
2671
+ f.value ? (i(!0), w(I, { key: 0 }, X(Object.entries(f.value), ([_, R]) => (i(), w(I, null, [
2672
+ e(C) === _ ? (i(), T(le, Z({
2673
+ key: _,
2652
2674
  layout: "popover",
2653
2675
  ref_for: !0,
2654
2676
  ref_key: "filterRef",
2655
2677
  ref: o
2656
2678
  }, { ref_for: !0 }, R, {
2657
- onChange: F[1] || (F[1] = (j) => e(d)(j.name, j.value)),
2658
- onClear: F[2] || (F[2] = (j) => {
2659
- e(i)(j), e(d)(j, void 0);
2679
+ class: [B.itemClass, R?.class],
2680
+ "item-class": [B.itemClass, R?.itemClass].filter(Boolean).join(" ") || void 0,
2681
+ onChange: F[1] || (F[1] = (D) => e(c)(D.name, D.value)),
2682
+ onClear: F[2] || (F[2] = (D) => {
2683
+ e(s)(D), e(c)(D, void 0);
2660
2684
  }),
2661
- modelValue: e(y)[A],
2662
- "onUpdate:modelValue": (j) => e(y)[A] = j,
2685
+ modelValue: e(y)[_],
2686
+ "onUpdate:modelValue": (D) => e(y)[_] = D,
2663
2687
  cleanable: !0
2664
- }), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
2665
- ], 64))), 256)) : V("", !0),
2666
- (s(!0), w(T, null, X(e(k), (A, R) => (s(), w(T, {
2688
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : $("", !0)
2689
+ ], 64))), 256)) : $("", !0),
2690
+ (i(!0), w(I, null, X(e(k), (_, R) => (i(), w(I, {
2667
2691
  key: "slot-" + R
2668
2692
  }, [
2669
- e(_) === A.props.name ? (s(), E(le, Z({
2693
+ e(C) === _.props.name ? (i(), T(le, Z({
2670
2694
  key: 0,
2671
2695
  layout: "popover"
2672
- }, { ref_for: !0 }, A.props, {
2696
+ }, { ref_for: !0 }, _.props, {
2673
2697
  ref_for: !0,
2674
2698
  ref_key: "filterRef",
2675
2699
  ref: o,
2676
- onChange: F[3] || (F[3] = (j) => e(d)(j.name, j.value)),
2677
- onClear: F[4] || (F[4] = (j) => {
2678
- e(i)(j), e(d)(j, void 0);
2700
+ class: [B.itemClass, _.props?.class],
2701
+ "item-class": [B.itemClass, _.props?.itemClass].filter(Boolean).join(" ") || void 0,
2702
+ onChange: F[3] || (F[3] = (D) => e(c)(D.name, D.value)),
2703
+ onClear: F[4] || (F[4] = (D) => {
2704
+ e(s)(D), e(c)(D, void 0);
2679
2705
  }),
2680
- modelValue: e(y)[A.props.name],
2681
- "onUpdate:modelValue": (j) => e(y)[A.props.name] = j,
2706
+ modelValue: e(y)[_.props.name],
2707
+ "onUpdate:modelValue": (D) => e(y)[_.props.name] = D,
2682
2708
  cleanable: !0
2683
- }), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
2709
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : $("", !0)
2684
2710
  ], 64))), 128))
2685
- ], 64)) : V("", !0)
2711
+ ], 64)) : $("", !0)
2686
2712
  ])
2687
2713
  ])
2688
2714
  ]),
2689
2715
  _: 1
2690
2716
  }));
2691
2717
  }
2692
- }), So = { class: "flex gap-1 items-center flex-wrap" }, Re = /* @__PURE__ */ W({
2718
+ }), So = { class: "flex gap-1 items-center flex-wrap" }, Re = /* @__PURE__ */ q({
2693
2719
  __name: "inline-filter-layout",
2694
2720
  props: {
2695
2721
  schema: {},
@@ -2701,105 +2727,110 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2701
2727
  width: {},
2702
2728
  title: {},
2703
2729
  disabled: { type: Boolean },
2704
- defaultPanelWidth: {}
2730
+ defaultPanelWidth: {},
2731
+ itemClass: {}
2705
2732
  },
2706
2733
  emits: ["change", "clear", "clearAll"],
2707
- setup(c, { expose: n, emit: v }) {
2708
- const t = se(), u = c, l = v, g = fe(), a = $({}), f = L(() => Object.keys(u.schema).length > u.limit), {
2734
+ setup(d, { expose: a, emit: v }) {
2735
+ const t = se(), u = d, l = v, b = fe(), n = A({}), f = O(() => Object.keys(u.schema).length > u.limit), {
2709
2736
  activeFilter: y,
2710
2737
  activeFilterCount: m,
2711
- onFilterChange: d,
2712
- clearFilter: i,
2713
- clearAllFilters: C,
2738
+ onFilterChange: c,
2739
+ clearFilter: s,
2740
+ clearAllFilters: V,
2714
2741
  limitedSchema: k,
2715
- filtersSlot: _,
2742
+ filtersSlot: C,
2716
2743
  limitedFiltersSlot: o
2717
2744
  } = ye(
2718
2745
  {
2719
2746
  ...u,
2720
- schema: a,
2721
- slots: g
2747
+ schema: n,
2748
+ slots: b
2722
2749
  },
2723
2750
  l
2724
2751
  );
2725
- function b(A) {
2726
- return Array.isArray(A) ? A.some((R) => R !== "" && R !== void 0 && R !== null) : A === null ? !0 : A && typeof A == "object" ? Object.values(A).some((R) => R !== "" && R !== void 0 && R !== null) : A !== "" && A !== void 0;
2752
+ function g(_) {
2753
+ return Array.isArray(_) ? _.some((R) => R !== "" && R !== void 0 && R !== null) : _ === null ? !0 : _ && typeof _ == "object" ? Object.values(_).some((R) => R !== "" && R !== void 0 && R !== null) : _ !== "" && _ !== void 0;
2727
2754
  }
2728
- const p = L(() => {
2729
- const A = Object.keys(k.value ?? {}), R = o.value.map((j) => j.props?.name).filter((j) => typeof j == "string");
2730
- return /* @__PURE__ */ new Set([...A, ...R]);
2731
- }), h = L(() => Object.entries(y.value ?? {}).filter(([A, R]) => p.value.has(A) && b(R)).length), x = L(() => {
2732
- const A = m.value ?? 0, R = h.value ?? 0;
2733
- return Math.max(A - R, 0);
2734
- }), D = $();
2755
+ const p = O(() => {
2756
+ const _ = Object.keys(k.value ?? {}), R = o.value.map((D) => D.props?.name).filter((D) => typeof D == "string");
2757
+ return /* @__PURE__ */ new Set([..._, ...R]);
2758
+ }), h = O(() => Object.entries(y.value ?? {}).filter(([_, R]) => p.value.has(_) && g(R)).length), x = O(() => {
2759
+ const _ = m.value ?? 0, R = h.value ?? 0;
2760
+ return Math.max(_ - R, 0);
2761
+ }), B = A();
2735
2762
  function F() {
2736
- D.value && D.value.clearAllFilters(!0), C();
2763
+ B.value && B.value.clearAllFilters(!0), V();
2737
2764
  }
2738
- return I(
2765
+ return U(
2739
2766
  () => u.schema,
2740
- (A) => {
2741
- a.value = A;
2767
+ (_) => {
2768
+ n.value = _;
2742
2769
  },
2743
2770
  { deep: !0, immediate: !0 }
2744
- ), n({
2745
- clearFilter: i,
2746
- clearAllFilters: C
2747
- }), (A, R) => (s(), w("div", So, [
2748
- A.schema ? (s(!0), w(T, { key: 0 }, X(Object.entries(e(k)), ([j, M]) => (s(), E(le, Z({
2749
- key: j,
2750
- mode: A.mode,
2751
- width: A.width ? A.width : M?.width
2771
+ ), a({
2772
+ clearFilter: s,
2773
+ clearAllFilters: V
2774
+ }), (_, R) => (i(), w("div", So, [
2775
+ _.schema ? (i(!0), w(I, { key: 0 }, X(Object.entries(e(k)), ([D, M]) => (i(), T(le, Z({
2776
+ key: D,
2777
+ mode: _.mode,
2778
+ width: _.width ? _.width : M?.width
2752
2779
  }, { ref_for: !0 }, M, {
2753
- onChange: R[0] || (R[0] = (K) => e(d)(K.name, K.value)),
2754
- onClear: e(i),
2780
+ class: [_.itemClass, M?.class],
2781
+ "item-class": [_.itemClass, M?.itemClass].filter(Boolean).join(" ") || void 0,
2782
+ onChange: R[0] || (R[0] = (K) => e(c)(K.name, K.value)),
2783
+ onClear: e(s),
2755
2784
  layout: "inline",
2756
2785
  cleanable: !0,
2757
- modelValue: e(y)[j],
2758
- "onUpdate:modelValue": (K) => e(y)[j] = K
2759
- }), null, 16, ["mode", "width", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : V("", !0),
2760
- (s(!0), w(T, null, X(e(o), (j, M) => (s(), E(le, Z({
2786
+ modelValue: e(y)[D],
2787
+ "onUpdate:modelValue": (K) => e(y)[D] = K
2788
+ }), null, 16, ["mode", "width", "class", "item-class", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : $("", !0),
2789
+ (i(!0), w(I, null, X(e(o), (D, M) => (i(), T(le, Z({
2761
2790
  key: "slot-" + M,
2762
2791
  layout: "inline"
2763
- }, { ref_for: !0 }, j.props, {
2764
- onChange: R[1] || (R[1] = (K) => e(d)(K.name, K.value)),
2792
+ }, { ref_for: !0 }, D.props, {
2793
+ class: [_.itemClass, D.props?.class],
2794
+ "item-class": [_.itemClass, D.props?.itemClass].filter(Boolean).join(" ") || void 0,
2795
+ onChange: R[1] || (R[1] = (K) => e(c)(K.name, K.value)),
2765
2796
  onClear: R[2] || (R[2] = (K) => {
2766
- e(i)(K), e(d)(K, void 0);
2797
+ e(s)(K), e(c)(K, void 0);
2767
2798
  }),
2768
2799
  cleanable: !0,
2769
- modelValue: e(y)[j.props.name],
2770
- "onUpdate:modelValue": (K) => e(y)[j.props.name] = K
2771
- }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
2772
- f.value ? (s(), E(Ue, Z({ key: 1 }, u, {
2773
- schema: A.schema,
2774
- limit: A.limit,
2775
- onChange: R[3] || (R[3] = (j) => e(d)(j.name, j.value)),
2776
- onClearAll: R[4] || (R[4] = (j) => e(C)()),
2777
- onClear: R[5] || (R[5] = (j) => e(i)(j.name)),
2778
- mode: A.mode,
2800
+ modelValue: e(y)[D.props.name],
2801
+ "onUpdate:modelValue": (K) => e(y)[D.props.name] = K
2802
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128)),
2803
+ f.value ? (i(), T(Ue, Z({ key: 1 }, u, {
2804
+ schema: _.schema,
2805
+ limit: _.limit,
2806
+ onChange: R[3] || (R[3] = (D) => e(c)(D.name, D.value)),
2807
+ onClearAll: R[4] || (R[4] = (D) => e(V)()),
2808
+ onClear: R[5] || (R[5] = (D) => e(s)(D.name)),
2809
+ mode: _.mode,
2779
2810
  ref_key: "popoverRef",
2780
- ref: D,
2811
+ ref: B,
2781
2812
  cleanable: !0,
2782
2813
  "badge-count": x.value
2783
2814
  }), {
2784
2815
  default: oe(() => [
2785
- (s(!0), w(T, null, X(e(_), (j, M) => (s(), E(ne(j), Z({
2816
+ (i(!0), w(I, null, X(e(C), (D, M) => (i(), T(ae(D), Z({
2786
2817
  key: "slot-" + M,
2787
2818
  layout: "popover"
2788
- }, { ref_for: !0 }, j.props, { cleanable: !0 }), null, 16))), 128))
2819
+ }, { ref_for: !0 }, D.props, { cleanable: !0 }), null, 16))), 128))
2789
2820
  ]),
2790
2821
  _: 1
2791
- }, 16, ["schema", "limit", "mode", "badge-count"])) : V("", !0),
2792
- e(m) > 0 ? (s(), w("button", {
2822
+ }, 16, ["schema", "limit", "mode", "badge-count"])) : $("", !0),
2823
+ e(m) > 0 ? (i(), w("button", {
2793
2824
  key: 2,
2794
2825
  onClick: F,
2795
- class: "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-sm bg-white-100 border text-gray-800 hover:bg-gray-200 focus:bg-gray-200"
2796
- }, S(e(t)("filter.clear")), 1)) : V("", !0)
2826
+ class: E([_.itemClass, "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-md bg-gray-50 border text-gray-800 hover:bg-gray-200 focus:bg-gray-200"])
2827
+ }, S(e(t)("filter.clear")), 3)) : $("", !0)
2797
2828
  ]));
2798
2829
  }
2799
2830
  }), Bo = {
2800
2831
  key: 0,
2801
2832
  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"
2802
- }, Do = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, jo = /* @__PURE__ */ W({
2833
+ }, jo = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, Do = /* @__PURE__ */ q({
2803
2834
  __name: "vertical-filter-layout",
2804
2835
  props: {
2805
2836
  schema: {},
@@ -2811,58 +2842,63 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2811
2842
  width: {},
2812
2843
  title: {},
2813
2844
  disabled: { type: Boolean },
2814
- defaultPanelWidth: {}
2845
+ defaultPanelWidth: {},
2846
+ itemClass: {}
2815
2847
  },
2816
2848
  emits: ["change", "clear", "clearAll"],
2817
- setup(c, { expose: n, emit: v }) {
2818
- const t = c, u = v, l = fe(), {
2819
- activeFilter: g,
2820
- activeFilterCount: a,
2849
+ setup(d, { expose: a, emit: v }) {
2850
+ const t = d, u = v, l = fe(), {
2851
+ activeFilter: b,
2852
+ activeFilterCount: n,
2821
2853
  onFilterChange: f,
2822
2854
  clearFilter: y,
2823
2855
  clearAllFilters: m,
2824
- filtersSlot: d
2856
+ filtersSlot: c
2825
2857
  } = ye({
2826
2858
  ...t,
2827
2859
  slots: l
2828
2860
  }, u);
2829
- return n({
2861
+ return a({
2830
2862
  clearFilter: y,
2831
2863
  clearAllFilters: m
2832
- }), (i, C) => i.view === "vertical" ? (s(), w("div", Bo, [
2833
- r("div", Do, [
2834
- e(a) > 0 ? (s(), w("button", {
2864
+ }), (s, V) => s.view === "vertical" ? (i(), w("div", Bo, [
2865
+ r("div", jo, [
2866
+ e(n) > 0 ? (i(), w("button", {
2835
2867
  key: 0,
2836
- onClick: C[0] || (C[0] = (k) => e(m)()),
2868
+ onClick: V[0] || (V[0] = (k) => e(m)()),
2837
2869
  "data-popover-trigger": "",
2838
2870
  "aria-haspopup": "dialog",
2839
2871
  "aria-expanded": "false",
2840
- 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",
2872
+ class: E([s.itemClass, "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"]),
2841
2873
  type: "button"
2842
- }, " Очистити ")) : V("", !0),
2843
- i.schema ? (s(!0), w(T, { key: 1 }, X(Object.entries(i.schema), ([k, _]) => (s(), E(le, Z({ layout: "vertical" }, { ref_for: !0 }, _, {
2844
- onChange: C[1] || (C[1] = (o) => e(f)(o.name, o.value)),
2845
- onClear: C[2] || (C[2] = (o) => {
2874
+ }, " Очистити ", 2)) : $("", !0),
2875
+ s.schema ? (i(!0), w(I, { key: 1 }, X(Object.entries(s.schema), ([k, C]) => (i(), T(le, Z({ layout: "vertical" }, { ref_for: !0 }, C, {
2876
+ class: [s.itemClass, C?.class],
2877
+ "item-class": [s.itemClass, C?.itemClass].filter(Boolean).join(" ") || void 0,
2878
+ onChange: V[1] || (V[1] = (o) => e(f)(o.name, o.value)),
2879
+ onClear: V[2] || (V[2] = (o) => {
2846
2880
  e(y)(o), e(f)(o, void 0);
2847
2881
  }),
2848
- modelValue: e(g)[k],
2849
- "onUpdate:modelValue": (o) => e(g)[k] = o,
2882
+ modelValue: e(b)[k],
2883
+ "onUpdate:modelValue": (o) => e(b)[k] = o,
2850
2884
  showClean: !0
2851
- }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 256)) : V("", !0),
2852
- (s(!0), w(T, null, X(e(d), (k, _) => (s(), E(le, Z({
2853
- key: "slot-" + _,
2885
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 256)) : $("", !0),
2886
+ (i(!0), w(I, null, X(e(c), (k, C) => (i(), T(le, Z({
2887
+ key: "slot-" + C,
2854
2888
  layout: "vertical"
2855
2889
  }, { ref_for: !0 }, k.props, {
2856
- onChange: C[3] || (C[3] = (o) => e(f)(o.name, o.value)),
2857
- onClear: C[4] || (C[4] = (o) => {
2890
+ class: [s.itemClass, k.props?.class],
2891
+ "item-class": [s.itemClass, k.props?.itemClass].filter(Boolean).join(" ") || void 0,
2892
+ onChange: V[3] || (V[3] = (o) => e(f)(o.name, o.value)),
2893
+ onClear: V[4] || (V[4] = (o) => {
2858
2894
  e(y)(o), e(f)(o, void 0);
2859
2895
  }),
2860
- modelValue: e(g)[k.props.name],
2861
- "onUpdate:modelValue": (o) => e(g)[k.props.name] = o,
2896
+ modelValue: e(b)[k.props.name],
2897
+ "onUpdate:modelValue": (o) => e(b)[k.props.name] = o,
2862
2898
  showClean: !0
2863
- }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
2899
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128))
2864
2900
  ])
2865
- ])) : V("", !0);
2901
+ ])) : $("", !0);
2866
2902
  }
2867
2903
  }), Ro = ["onKeydown"], Ko = ["disabled"], Fo = {
2868
2904
  key: 0,
@@ -2870,7 +2906,7 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2870
2906
  }, Mo = { class: "rounded-2xl border border-slate-300/35 bg-white/95 p-4 shadow-2xl backdrop-blur-sm" }, Lo = { class: "mb-3 flex items-center justify-between" }, Eo = { class: "text-[15px] font-semibold text-slate-800" }, Oo = { "aria-hidden": "true" }, To = { class: "flex max-h-80 flex-col gap-1 overflow-y-auto" }, Io = {
2871
2907
  key: 0,
2872
2908
  class: "mt-3 flex justify-end"
2873
- }, Uo = /* @__PURE__ */ W({
2909
+ }, Uo = /* @__PURE__ */ q({
2874
2910
  __name: "popover-inline-filter-layout",
2875
2911
  props: {
2876
2912
  schema: {},
@@ -2882,89 +2918,90 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2882
2918
  width: { default: 220 },
2883
2919
  title: {},
2884
2920
  disabled: { type: Boolean },
2885
- defaultPanelWidth: {}
2921
+ defaultPanelWidth: {},
2922
+ itemClass: {}
2886
2923
  },
2887
2924
  emits: ["change", "clear", "clearAll"],
2888
- setup(c, { emit: n }) {
2889
- const v = se(), t = c, u = n, l = $({}), g = fe(), {
2890
- activeFilter: a,
2925
+ setup(d, { emit: a }) {
2926
+ const v = se(), t = d, u = a, l = A({}), b = fe(), {
2927
+ activeFilter: n,
2891
2928
  activeFilterCount: f,
2892
2929
  onFilterChange: y,
2893
2930
  clearFilter: m,
2894
- clearAllFilters: d,
2895
- filtersSlot: i
2931
+ clearAllFilters: c,
2932
+ filtersSlot: s
2896
2933
  } = ye(
2897
2934
  {
2898
2935
  ...t,
2899
2936
  schema: l.value,
2900
- slots: g
2937
+ slots: b
2901
2938
  },
2902
2939
  u
2903
- ), C = $(null), k = $(null), _ = We({ open: !1, top: 0, left: 0 }), o = L(() => _.open), b = L(() => !!t.disabled), p = L(() => l.value || {}), h = L(() => t.title ?? "Фільтр"), x = L(() => !!g.trigger), D = L(() => [
2940
+ ), V = A(null), k = A(null), C = We({ open: !1, top: 0, left: 0 }), o = O(() => C.open), g = O(() => !!t.disabled), p = O(() => l.value || {}), h = O(() => t.title ?? "Фільтр"), x = O(() => !!b.trigger), B = O(() => [
2904
2941
  "inline-flex h-9 items-center justify-center gap-2 rounded-lg border border-transparent bg-slate-200/70 px-3 text-sm font-medium text-slate-700 transition-colors hover:bg-blue-100 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-slate-200/70 disabled:hover:text-slate-700",
2905
- b.value ? "cursor-not-allowed opacity-60" : "cursor-pointer"
2906
- ]), F = L(() => _.open ? {
2942
+ g.value ? "cursor-not-allowed opacity-60" : "cursor-pointer"
2943
+ ]), F = O(() => C.open ? {
2907
2944
  position: "absolute",
2908
- top: `${_.top}px`,
2909
- left: `${_.left}px`,
2945
+ top: `${C.top}px`,
2946
+ left: `${C.left}px`,
2910
2947
  transform: "translateX(-50%)",
2911
2948
  zIndex: 1e3
2912
2949
  } : { display: "none" });
2913
- function A() {
2914
- _.open = !1;
2950
+ function _() {
2951
+ C.open = !1;
2915
2952
  }
2916
2953
  function R() {
2917
- if (!C.value) return;
2918
- const P = C.value.getBoundingClientRect();
2919
- _.top = P.bottom + window.scrollY + 8, _.left = P.left + P.width / 2 + window.scrollX;
2954
+ if (!V.value) return;
2955
+ const z = V.value.getBoundingClientRect();
2956
+ C.top = z.bottom + window.scrollY + 8, C.left = z.left + z.width / 2 + window.scrollX;
2920
2957
  }
2921
- function j() {
2922
- _.open = !_.open, _.open && me(R);
2958
+ function D() {
2959
+ C.open = !C.open, C.open && me(R);
2923
2960
  }
2924
2961
  function M() {
2925
- b.value || j();
2962
+ g.value || D();
2926
2963
  }
2927
2964
  function K() {
2928
- _.open && R();
2965
+ C.open && R();
2929
2966
  }
2930
- function z() {
2931
- d();
2967
+ function N() {
2968
+ c();
2932
2969
  }
2933
2970
  return ce(() => {
2934
2971
  window.addEventListener("resize", K), window.addEventListener("scroll", K, !0);
2935
2972
  }), pe(() => {
2936
2973
  window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
2937
- }), I(
2974
+ }), U(
2938
2975
  () => t.schema,
2939
- (P) => {
2940
- if (!P) {
2976
+ (z) => {
2977
+ if (!z) {
2941
2978
  l.value = {};
2942
2979
  return;
2943
2980
  }
2944
- if (Array.isArray(P)) {
2945
- const B = P.filter((O) => O && (O.name || O.id)).map((O) => {
2946
- const q = O.name || O.id;
2947
- return [q, { ...O, name: q }];
2981
+ if (Array.isArray(z)) {
2982
+ const j = z.filter((L) => L && (L.name || L.id)).map((L) => {
2983
+ const P = L.name || L.id;
2984
+ return [P, { ...L, name: P }];
2948
2985
  });
2949
- l.value = Object.fromEntries(B);
2986
+ l.value = Object.fromEntries(j);
2950
2987
  return;
2951
2988
  }
2952
- l.value = P;
2989
+ l.value = z;
2953
2990
  },
2954
2991
  { deep: !0, immediate: !0 }
2955
- ), I(
2992
+ ), U(
2956
2993
  () => t.disabled,
2957
- (P) => {
2958
- P && A();
2994
+ (z) => {
2995
+ z && _();
2959
2996
  }
2960
- ), (P, B) => (s(), w("div", {
2997
+ ), (z, j) => (i(), w("div", {
2961
2998
  class: "relative inline-flex",
2962
2999
  ref_key: "anchor",
2963
- ref: C
3000
+ ref: V
2964
3001
  }, [
2965
- x.value ? (s(), w("span", {
3002
+ x.value ? (i(), w("span", {
2966
3003
  key: 0,
2967
- class: U(["inline-flex", b.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
3004
+ class: E(["inline-flex", g.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
2968
3005
  role: "button",
2969
3006
  tabindex: "0",
2970
3007
  "data-popover-trigger": "",
@@ -2974,31 +3011,31 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
2974
3011
  $e(re(M, ["prevent", "stop"]), ["space"])
2975
3012
  ]
2976
3013
  }, [
2977
- ue(P.$slots, "trigger", {
3014
+ ue(z.$slots, "trigger", {
2978
3015
  toggle: M,
2979
3016
  open: o.value,
2980
- disabled: b.value,
3017
+ disabled: g.value,
2981
3018
  activeCount: e(f)
2982
3019
  })
2983
- ], 42, Ro)) : (s(), w("button", {
3020
+ ], 42, Ro)) : (i(), w("button", {
2984
3021
  key: 1,
2985
- class: U(D.value),
3022
+ class: E(B.value),
2986
3023
  type: "button",
2987
- disabled: b.value,
3024
+ disabled: g.value,
2988
3025
  onClick: re(M, ["prevent", "stop"]),
2989
3026
  "data-popover-trigger": ""
2990
3027
  }, [
2991
3028
  Q(Ie, { class: "h-4 w-4" }),
2992
- e(f) > 0 ? (s(), w("div", Fo, S(e(f)), 1)) : V("", !0)
3029
+ e(f) > 0 ? (i(), w("div", Fo, S(e(f)), 1)) : $("", !0)
2993
3030
  ], 10, Ko)),
2994
- (s(), E(ge, { to: "body" }, [
2995
- o.value ? (s(), w("div", {
3031
+ (i(), T(ge, { to: "body" }, [
3032
+ o.value ? (i(), w("div", {
2996
3033
  key: 0,
2997
- class: U(["absolute", typeof P.width == "number" ? `min-w-[${P.width + 32 + (Object.keys(p.value).length > 7 ? 20 : 0)}px]` : "min-w-[268px] "]),
3034
+ class: E(["absolute", typeof z.width == "number" ? `min-w-[${z.width + 32 + (Object.keys(p.value).length > 7 ? 20 : 0)}px]` : "min-w-[268px] "]),
2998
3035
  style: be(F.value),
2999
3036
  ref_key: "panel",
3000
3037
  ref: k,
3001
- onClick: B[4] || (B[4] = re(() => {
3038
+ onClick: j[4] || (j[4] = re(() => {
3002
3039
  }, ["stop"]))
3003
3040
  }, [
3004
3041
  r("div", Mo, [
@@ -3007,51 +3044,55 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
3007
3044
  r("button", {
3008
3045
  type: "button",
3009
3046
  class: "inline-flex h-6 w-6 items-center justify-center rounded-full border-0 bg-slate-300/40 text-slate-600 transition-colors hover:bg-blue-200/60 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200",
3010
- onClick: A
3047
+ onClick: _
3011
3048
  }, [
3012
3049
  r("span", Oo, [
3013
3050
  Q(Ce, { class: "h-4 w-4" })
3014
3051
  ]),
3015
- B[5] || (B[5] = r("span", { class: "sr-only" }, "Закрити", -1))
3052
+ j[5] || (j[5] = r("span", { class: "sr-only" }, "Закрити", -1))
3016
3053
  ])
3017
3054
  ]),
3018
3055
  r("div", To, [
3019
- Object.keys(p.value).length ? (s(!0), w(T, { key: 0 }, X(Object.entries(p.value), ([O, q]) => (s(), E(le, Z({ key: O }, { ref_for: !0 }, { ...q, layout: "inline" }, {
3020
- width: P.width ? P.width : q?.width,
3056
+ Object.keys(p.value).length ? (i(!0), w(I, { key: 0 }, X(Object.entries(p.value), ([L, P]) => (i(), T(le, Z({ key: L }, { ref_for: !0 }, { ...P, layout: "inline" }, {
3057
+ width: z.width ? z.width : P?.width,
3058
+ class: [z.itemClass, P?.class],
3059
+ "item-class": [z.itemClass, P?.itemClass].filter(Boolean).join(" ") || void 0,
3021
3060
  cleanable: !0,
3022
- modelValue: e(a)[O],
3023
- "onUpdate:modelValue": (N) => e(a)[O] = N,
3024
- onChange: B[0] || (B[0] = (N) => e(y)(N.name, N.value)),
3025
- onClear: B[1] || (B[1] = (N) => {
3026
- e(m)(N), e(y)(N, void 0);
3061
+ modelValue: e(n)[L],
3062
+ "onUpdate:modelValue": (Y) => e(n)[L] = Y,
3063
+ onChange: j[0] || (j[0] = (Y) => e(y)(Y.name, Y.value)),
3064
+ onClear: j[1] || (j[1] = (Y) => {
3065
+ e(m)(Y), e(y)(Y, void 0);
3027
3066
  })
3028
- }), null, 16, ["width", "modelValue", "onUpdate:modelValue"]))), 128)) : V("", !0),
3029
- (s(!0), w(T, null, X(e(i), (O, q) => (s(), E(le, Z({
3030
- key: "slot-" + q,
3067
+ }), null, 16, ["width", "class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128)) : $("", !0),
3068
+ (i(!0), w(I, null, X(e(s), (L, P) => (i(), T(le, Z({
3069
+ key: "slot-" + P,
3031
3070
  ref_for: !0
3032
- }, { ...O.props, layout: "inline" }, {
3071
+ }, { ...L.props, layout: "inline" }, {
3072
+ class: [z.itemClass, L.props?.class],
3073
+ "item-class": [z.itemClass, L.props?.itemClass].filter(Boolean).join(" ") || void 0,
3033
3074
  cleanable: !0,
3034
- modelValue: e(a)[O.props.name],
3035
- "onUpdate:modelValue": (N) => e(a)[O.props.name] = N,
3036
- onChange: B[2] || (B[2] = (N) => e(y)(N.name, N.value)),
3037
- onClear: B[3] || (B[3] = (N) => {
3038
- e(m)(N), e(y)(N, void 0);
3075
+ modelValue: e(n)[L.props.name],
3076
+ "onUpdate:modelValue": (Y) => e(n)[L.props.name] = Y,
3077
+ onChange: j[2] || (j[2] = (Y) => e(y)(Y.name, Y.value)),
3078
+ onClear: j[3] || (j[3] = (Y) => {
3079
+ e(m)(Y), e(y)(Y, void 0);
3039
3080
  })
3040
- }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
3081
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128))
3041
3082
  ]),
3042
- e(f) > 0 ? (s(), w("div", Io, [
3083
+ e(f) > 0 ? (i(), w("div", Io, [
3043
3084
  r("button", {
3044
3085
  type: "button",
3045
- class: "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none",
3046
- onClick: z
3047
- }, S(e(v)("filter.clear")), 1)
3048
- ])) : V("", !0)
3086
+ class: E([z.itemClass, "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none"]),
3087
+ onClick: N
3088
+ }, S(e(v)("filter.clear")), 3)
3089
+ ])) : $("", !0)
3049
3090
  ])
3050
- ], 6)) : V("", !0)
3091
+ ], 6)) : $("", !0)
3051
3092
  ]))
3052
3093
  ], 512));
3053
3094
  }
3054
- }), Ke = /* @__PURE__ */ W({
3095
+ }), Ke = /* @__PURE__ */ q({
3055
3096
  __name: "filter",
3056
3097
  props: {
3057
3098
  schema: {},
@@ -3063,30 +3104,31 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
3063
3104
  width: {},
3064
3105
  title: {},
3065
3106
  disabled: { type: Boolean },
3066
- defaultPanelWidth: {}
3107
+ defaultPanelWidth: {},
3108
+ itemClass: {}
3067
3109
  },
3068
3110
  emits: ["change", "clear", "clearAll"],
3069
- setup(c, { expose: n, emit: v }) {
3070
- const t = c, u = $(t.value ?? {}), l = v, g = $(), a = fe();
3111
+ setup(d, { expose: a, emit: v }) {
3112
+ const t = d, u = A(t.value ?? {}), l = v, b = A(), n = fe();
3071
3113
  function f(o) {
3072
3114
  if (Array.isArray(o))
3073
- return o.map((b) => f(b));
3115
+ return o.map((g) => f(g));
3074
3116
  if (o !== null && typeof o == "object") {
3075
- const b = de(o), p = {};
3076
- for (const h in b)
3077
- p[h] = f(b[h]);
3117
+ const g = de(o), p = {};
3118
+ for (const h in g)
3119
+ p[h] = f(g[h]);
3078
3120
  return p;
3079
3121
  }
3080
3122
  return o;
3081
3123
  }
3082
- function y(o, b) {
3083
- b !== void 0 ? u.value = {
3124
+ function y(o, g) {
3125
+ g !== void 0 ? u.value = {
3084
3126
  ...u.value,
3085
- [o]: b
3127
+ [o]: g
3086
3128
  } : delete u.value[o], l("change", {
3087
3129
  data: f(u.value),
3088
3130
  name: o,
3089
- value: f(b)
3131
+ value: f(g)
3090
3132
  });
3091
3133
  }
3092
3134
  function m(o) {
@@ -3099,7 +3141,7 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
3099
3141
  value: null
3100
3142
  });
3101
3143
  }
3102
- function d() {
3144
+ function c() {
3103
3145
  u.value = {}, l("clear", {
3104
3146
  data: f(u.value),
3105
3147
  name: "ALL"
@@ -3109,13 +3151,13 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
3109
3151
  value: null
3110
3152
  });
3111
3153
  }
3112
- const i = $({});
3113
- function C() {
3154
+ const s = A({});
3155
+ function V() {
3114
3156
  switch (t.view) {
3115
3157
  case "inline":
3116
3158
  return Re;
3117
3159
  case "vertical":
3118
- return jo;
3160
+ return Do;
3119
3161
  case "popover":
3120
3162
  return Ue;
3121
3163
  case "popover-inline":
@@ -3124,61 +3166,61 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
3124
3166
  return Re;
3125
3167
  }
3126
3168
  }
3127
- I(
3169
+ U(
3128
3170
  () => t.schema,
3129
3171
  (o) => {
3130
3172
  if (!o) {
3131
- i.value = {};
3173
+ s.value = {};
3132
3174
  return;
3133
3175
  }
3134
3176
  if (Array.isArray(o) && !o.length) {
3135
- i.value = {};
3177
+ s.value = {};
3136
3178
  return;
3137
3179
  }
3138
- Array.isArray(o) ? i.value = o.filter((b) => b.type).reduce((b, p) => (Object.assign(p, {
3180
+ Array.isArray(o) ? s.value = o.filter((g) => g.type).reduce((g, p) => (Object.assign(p, {
3139
3181
  name: p.id || p.name,
3140
3182
  type: { datepicker: "date" }[p.type.toLowerCase()] || p.type.toLowerCase(),
3141
3183
  label: p.label || p.ua
3142
- }), b[p.name] = p, p.data && !p.api && !p.options && Object.assign(p, { api: `/api/suggest/${p.data}` }), b), {}) : (Object.entries(o).forEach(([b, p]) => {
3143
- Object.assign(p, { name: b || p.name || p.id, type: p.type.toLowerCase() });
3144
- }), i.value = { ...o });
3184
+ }), g[p.name] = p, p.data && !p.api && !p.options && Object.assign(p, { api: `/api/suggest/${p.data}` }), g), {}) : (Object.entries(o).forEach(([g, p]) => {
3185
+ Object.assign(p, { name: g || p.name || p.id, type: p.type.toLowerCase() });
3186
+ }), s.value = { ...o });
3145
3187
  },
3146
3188
  { immediate: !0, deep: !0 }
3147
3189
  );
3148
3190
  function k(o) {
3149
- g.value.clearFilter(o), m(o);
3191
+ b.value.clearFilter(o), m(o);
3150
3192
  }
3151
- function _() {
3152
- g.value.clearAllFilters(), d();
3193
+ function C() {
3194
+ b.value.clearAllFilters(), c();
3153
3195
  }
3154
- return I(
3196
+ return U(
3155
3197
  () => u.value,
3156
3198
  (o) => {
3157
3199
  if (t.history) {
3158
- const b = new URL(window.location.href), p = new URLSearchParams(window.location.search);
3200
+ const g = new URL(window.location.href), p = new URLSearchParams(window.location.search);
3159
3201
  Object.keys(o).length > 0 ? p.set(
3160
3202
  "filter",
3161
3203
  Object.entries(o).filter(([, h]) => h).map(([h, x]) => `${h}=${x}`).join("|")
3162
- ) : p.delete("filter"), b.search = decodeURI(p.toString()), window.history.pushState({}, "", b);
3204
+ ) : p.delete("filter"), g.search = decodeURI(p.toString()), window.history.pushState({}, "", g);
3163
3205
  }
3164
3206
  }
3165
- ), n({
3166
- clearAllFilters: _,
3207
+ ), a({
3208
+ clearAllFilters: C,
3167
3209
  clearFilter: k
3168
- }), (o, b) => (s(), E(ne(C()), Z(t, {
3169
- schema: i.value,
3170
- onChange: b[0] || (b[0] = (p) => y(p.name, p.value)),
3171
- onClear: b[1] || (b[1] = (p) => m(p.name)),
3172
- onClearAll: d,
3210
+ }), (o, g) => (i(), T(ae(V()), Z(t, {
3211
+ schema: s.value,
3212
+ onChange: g[0] || (g[0] = (p) => y(p.name, p.value)),
3213
+ onClear: g[1] || (g[1] = (p) => m(p.name)),
3214
+ onClearAll: c,
3173
3215
  ref_key: "filterRef",
3174
- ref: g
3216
+ ref: b
3175
3217
  }), qe({
3176
3218
  default: oe(() => [
3177
3219
  ue(o.$slots, "default")
3178
3220
  ]),
3179
3221
  _: 2
3180
3222
  }, [
3181
- e(a).trigger ? {
3223
+ e(n).trigger ? {
3182
3224
  name: "trigger",
3183
3225
  fn: oe((p) => [
3184
3226
  ue(o.$slots, "trigger", Qe(He(p)))
@@ -3188,8 +3230,8 @@ const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-c
3188
3230
  ]), 1040, ["schema"]));
3189
3231
  }
3190
3232
  });
3191
- Ke.install = function(n) {
3192
- n.component("Filter", Ke), n.component("FilterField", le);
3233
+ Ke.install = function(a) {
3234
+ a.component("Filter", Ke), a.component("FilterField", le);
3193
3235
  };
3194
3236
  export {
3195
3237
  Ke as Filter,