@opengis/filter 0.1.24 → 0.1.25

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