@opengis/filter 0.1.13 → 0.1.15

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