@opengis/form 0.0.62 → 0.0.64

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,15 +1,15 @@
1
- import { defineComponent as G, ref as w, onMounted as ye, onUnmounted as Qe, createElementBlock as d, openBlock as i, createCommentVNode as U, renderSlot as Le, createElementVNode as l, toDisplayString as W, mergeProps as Fe, computed as S, normalizeStyle as be, createTextVNode as ge, normalizeProps as st, guardReactiveProps as rt, normalizeClass as T, mergeModels as ie, useModel as de, withDirectives as ne, unref as te, vModelText as he, vModelCheckbox as jt, createVNode as R, createBlock as me, resolveDynamicComponent as Oe, withCtx as Ee, withModifiers as $e, onBeforeUnmount as it, watch as ue, createStaticVNode as xe, vModelRadio as Et, Fragment as re, renderList as fe, reactive as qt, vModelDynamic as Kt, vShow as et, inject as Ae, resolveComponent as xt, Transition as ut, nextTick as je, Teleport as It, getCurrentInstance as Wt, watchEffect as Zt, toRef as Jt, provide as wt } from "vue";
2
- import { notify as ce, VsModal as zt, modal as Yt } from "@opengis/core";
3
- const Xt = { class: "w-full relative" }, Qt = {
1
+ import { defineComponent as G, ref as w, onMounted as ye, onUnmounted as Xe, createElementBlock as d, openBlock as i, createCommentVNode as D, renderSlot as Me, createElementVNode as l, toDisplayString as K, mergeProps as Fe, computed as B, normalizeStyle as be, createTextVNode as he, normalizeProps as at, guardReactiveProps as st, normalizeClass as T, mergeModels as ie, useModel as de, withDirectives as ne, unref as le, vModelText as me, vModelCheckbox as Bt, createVNode as R, createBlock as ve, resolveDynamicComponent as Oe, withCtx as Ee, withModifiers as $e, onBeforeUnmount as rt, watch as ue, createStaticVNode as xe, vModelRadio as jt, Fragment as re, renderList as pe, reactive as Gt, vModelDynamic as qt, vShow as it, inject as Ae, resolveComponent as yt, Transition as ut, nextTick as je, Teleport as Et, getCurrentInstance as Kt, watchEffect as Wt, toRef as Zt, provide as xt } from "vue";
2
+ import { notify as ce, VsModal as It, modal as Jt } from "@opengis/core";
3
+ const Yt = { class: "w-full relative" }, Xt = {
4
4
  key: 0,
5
5
  class: "text-[14px] font-medium text-gray-900 mb-2"
6
- }, el = { class: "opacity-100" }, tl = {
6
+ }, Qt = { class: "opacity-100" }, el = {
7
7
  key: 0,
8
8
  class: "text-red-500 text-[14px]"
9
- }, ll = {
9
+ }, tl = {
10
10
  key: 1,
11
11
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
12
- }, ol = /* @__PURE__ */ G({
12
+ }, ll = /* @__PURE__ */ G({
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
@@ -29,26 +29,26 @@ const Xt = { class: "w-full relative" }, Qt = {
29
29
  };
30
30
  return ye(() => {
31
31
  e.value = localStorage.locale, window.addEventListener("storage", t);
32
- }), Qe(() => {
32
+ }), Xe(() => {
33
33
  window.removeEventListener("resize", t);
34
- }), (s, n) => (i(), d("div", Xt, [
35
- s.ua || s.label ? (i(), d("div", Qt, [
36
- l("span", el, W(s.item[e.value] || s.ua || s.label), 1),
37
- s.item?.rules?.includes("required") ? (i(), d("span", tl, "*")) : U("", !0)
38
- ])) : U("", !0),
39
- Le(s.$slots, "default", Fe(s.$attrs, {
34
+ }), (s, n) => (i(), d("div", Yt, [
35
+ s.ua || s.label ? (i(), d("div", Xt, [
36
+ l("span", Qt, K(s.item[e.value] || s.ua || s.label), 1),
37
+ s.item?.rules?.includes("required") ? (i(), d("span", el, "*")) : D("", !0)
38
+ ])) : D("", !0),
39
+ Me(s.$slots, "default", Fe(s.$attrs, {
40
40
  class: { "opacity-60": s.item.disabled }
41
41
  })),
42
- s.error ? (i(), d("span", ll, W(s.error), 1)) : U("", !0)
42
+ s.error ? (i(), d("span", tl, K(s.error), 1)) : D("", !0)
43
43
  ]));
44
44
  }
45
- }), nl = { class: "w-full relative flex flex-row items-center gap-2" }, al = {
45
+ }), ol = { class: "w-full relative flex flex-row items-center gap-2" }, nl = {
46
46
  key: 0,
47
47
  class: "text-red-500 text-[14px]"
48
- }, sl = {
48
+ }, al = {
49
49
  key: 1,
50
50
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
51
- }, rl = /* @__PURE__ */ G({
51
+ }, sl = /* @__PURE__ */ G({
52
52
  __name: "vs-layout-horizontal",
53
53
  props: {
54
54
  ua: { default: "" },
@@ -63,14 +63,14 @@ const Xt = { class: "w-full relative" }, Qt = {
63
63
  columns: { default: () => ({ container: 12, label: 3 }) }
64
64
  },
65
65
  setup(o) {
66
- const e = o, t = S(() => e.columns ?? { container: 12, label: 3 }), s = S(() => {
66
+ const e = o, t = B(() => e.columns ?? { container: 12, label: 3 }), s = B(() => {
67
67
  const { container: u, label: c } = t.value;
68
68
  return !u || u <= 0 ? 0 : Math.min(Math.max(c ?? 0, 0), u) / u;
69
- }), n = S(() => e.item?.type === "html" || s.value <= 0 ? !1 : !!(e.ua || e.label)), a = S(() => {
69
+ }), n = B(() => e.item?.type === "html" || s.value <= 0 ? !1 : !!(e.ua || e.label)), a = B(() => {
70
70
  if (!n.value) return {};
71
71
  const u = `${s.value * 100}%`;
72
72
  return { flexBasis: u, maxWidth: u };
73
- }), r = S(() => {
73
+ }), r = B(() => {
74
74
  const { container: u, label: c } = t.value;
75
75
  if (!u || u <= 0) return {};
76
76
  if (e.item?.type === "html") return { flexBasis: "100%", maxWidth: "100%" };
@@ -80,28 +80,28 @@ const Xt = { class: "w-full relative" }, Qt = {
80
80
  const p = `${f * 100}%`;
81
81
  return { flexBasis: p, maxWidth: p };
82
82
  });
83
- return (u, c) => (i(), d("div", nl, [
83
+ return (u, c) => (i(), d("div", ol, [
84
84
  n.value ? (i(), d("span", {
85
85
  key: 0,
86
86
  class: "text-sm text-gray-900 font-medium flex shrink-0",
87
87
  style: be(a.value)
88
88
  }, [
89
- ge(W(u.ua || u.label) + " ", 1),
90
- u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", al, "*")) : U("", !0)
91
- ], 4)) : U("", !0),
89
+ he(K(u.ua || u.label) + " ", 1),
90
+ u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", nl, "*")) : D("", !0)
91
+ ], 4)) : D("", !0),
92
92
  l("div", {
93
93
  class: "flex-1 min-w-0",
94
94
  style: be(r.value)
95
95
  }, [
96
- Le(u.$slots, "default", st(rt(u.$attrs)))
96
+ Me(u.$slots, "default", at(st(u.$attrs)))
97
97
  ], 4),
98
- u.error ? (i(), d("span", sl, W(u.error), 1)) : U("", !0)
98
+ u.error ? (i(), d("span", al, K(u.error), 1)) : D("", !0)
99
99
  ]));
100
100
  }
101
- }), il = { class: "w-full relative" }, ul = {
101
+ }), rl = { class: "w-full relative" }, il = {
102
102
  key: 0,
103
103
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
104
- }, dl = /* @__PURE__ */ G({
104
+ }, ul = /* @__PURE__ */ G({
105
105
  __name: "vs-layout-inline",
106
106
  props: {
107
107
  ua: { default: "" },
@@ -116,24 +116,24 @@ const Xt = { class: "w-full relative" }, Qt = {
116
116
  columns: {}
117
117
  },
118
118
  setup(o) {
119
- return (e, t) => (i(), d("div", il, [
120
- Le(e.$slots, "default", st(rt(e.$attrs))),
121
- e.error ? (i(), d("span", ul, W(e.error), 1)) : U("", !0)
119
+ return (e, t) => (i(), d("div", rl, [
120
+ Me(e.$slots, "default", at(st(e.$attrs))),
121
+ e.error ? (i(), d("span", il, K(e.error), 1)) : D("", !0)
122
122
  ]));
123
123
  }
124
- }), cl = { class: "flex-1 min-w-0" }, pl = {
124
+ }), dl = { class: "flex-1 min-w-0" }, cl = {
125
125
  key: 0,
126
126
  class: "text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"
127
- }, fl = { class: "truncate" }, vl = {
127
+ }, pl = { class: "truncate" }, fl = {
128
128
  key: 0,
129
129
  class: "text-red-500 text-[14px]"
130
- }, ml = {
130
+ }, vl = {
131
131
  key: 1,
132
132
  class: "text-xs text-slate-500 dark:text-slate-400"
133
- }, hl = { class: "w-full md:w-auto" }, gl = {
133
+ }, ml = { class: "w-full md:w-auto" }, hl = {
134
134
  key: 0,
135
135
  class: "mt-1 text-xs text-red-500"
136
- }, bl = /* @__PURE__ */ G({
136
+ }, gl = /* @__PURE__ */ G({
137
137
  __name: "vs-layout-settings",
138
138
  props: {
139
139
  ua: { default: "" },
@@ -149,8 +149,8 @@ const Xt = { class: "w-full relative" }, Qt = {
149
149
  },
150
150
  setup(o) {
151
151
  const e = o, t = w("uk");
152
- S(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
153
- const s = S(() => e.item?.description ?? ""), n = S(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), a = S(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (u) => {
152
+ B(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
153
+ const s = B(() => e.item?.description ?? ""), n = B(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), a = B(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (u) => {
154
154
  u.key === "locale" && (t.value = u.newValue ?? "uk");
155
155
  };
156
156
  return ye(() => {
@@ -159,7 +159,7 @@ const Xt = { class: "w-full relative" }, Qt = {
159
159
  } catch {
160
160
  }
161
161
  window.addEventListener("storage", r);
162
- }), Qe(() => {
162
+ }), Xe(() => {
163
163
  window.removeEventListener("storage", r);
164
164
  }), (u, c) => (i(), d("div", {
165
165
  class: T(["w-full relative", { "opacity-60": u.item?.disabled }])
@@ -167,35 +167,35 @@ const Xt = { class: "w-full relative" }, Qt = {
167
167
  l("div", {
168
168
  class: T(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(u.item.type) ? "flex flex-col" : ""]])
169
169
  }, [
170
- l("div", cl, [
171
- u.ua || u.label ? (i(), d("p", pl, [
172
- l("span", fl, W(u.item[t.value] || u.ua || u.label), 1),
173
- n.value ? (i(), d("span", vl, "*")) : U("", !0)
174
- ])) : U("", !0),
175
- s.value ? (i(), d("p", ml, W(s.value), 1)) : U("", !0)
170
+ l("div", dl, [
171
+ u.ua || u.label ? (i(), d("p", cl, [
172
+ l("span", pl, K(u.item[t.value] || u.ua || u.label), 1),
173
+ n.value ? (i(), d("span", fl, "*")) : D("", !0)
174
+ ])) : D("", !0),
175
+ s.value ? (i(), d("p", vl, K(s.value), 1)) : D("", !0)
176
176
  ]),
177
- l("div", hl, [
178
- Le(u.$slots, "default", st(rt(u.$attrs)))
177
+ l("div", ml, [
178
+ Me(u.$slots, "default", at(st(u.$attrs)))
179
179
  ])
180
180
  ], 2),
181
- a.value ? (i(), d("p", gl, W(a.value), 1)) : U("", !0)
181
+ a.value ? (i(), d("p", hl, K(a.value), 1)) : D("", !0)
182
182
  ], 2));
183
183
  }
184
- }), yl = {
185
- default: ol,
186
- horizontal: rl,
187
- inline: dl,
188
- settings: bl
184
+ }), bl = {
185
+ default: ll,
186
+ horizontal: sl,
187
+ inline: ul,
188
+ settings: gl
189
189
  };
190
190
  function Ce(o) {
191
191
  return {
192
- inputClass: S(() => {
192
+ inputClass: B(() => {
193
193
  const t = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
194
194
  return o?.size === "sm" ? `${t}h-[32px]` : `${t}h-[38px]`;
195
195
  })
196
196
  };
197
197
  }
198
- const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
198
+ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ G({
199
199
  __name: "vs-input-password",
200
200
  props: /* @__PURE__ */ ie({
201
201
  style: { default: () => ({}) },
@@ -217,15 +217,15 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
217
217
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
218
218
  placeholder: n.placeholder,
219
219
  disabled: n.disabled,
220
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": n.error }]]),
220
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": n.error }]]),
221
221
  style: {
222
222
  border: "1px solid #CFD9E0"
223
223
  }
224
- }, null, 10, xl)), [
225
- [he, s.value]
224
+ }, null, 10, yl)), [
225
+ [me, s.value]
226
226
  ]);
227
227
  }
228
- }), kl = ["placeholder", "disabled"], Xe = /* @__PURE__ */ G({
228
+ }), wl = ["placeholder", "disabled"], Ye = /* @__PURE__ */ G({
229
229
  __name: "vs-input-text",
230
230
  props: /* @__PURE__ */ ie({
231
231
  style: { default: () => ({}) },
@@ -247,15 +247,15 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
247
247
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
248
248
  placeholder: n.placeholder,
249
249
  disabled: n.disabled,
250
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": n.error }]]),
250
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": n.error }]]),
251
251
  style: {
252
252
  border: "1px solid #CFD9E0"
253
253
  }
254
- }, null, 10, kl)), [
255
- [he, s.value]
254
+ }, null, 10, wl)), [
255
+ [me, s.value]
256
256
  ]);
257
257
  }
258
- }), _l = ["placeholder", "min", "max"], $l = /* @__PURE__ */ G({
258
+ }), kl = ["placeholder", "min", "max"], _l = /* @__PURE__ */ G({
259
259
  __name: "vs-input-number",
260
260
  props: /* @__PURE__ */ ie({
261
261
  min: {},
@@ -279,14 +279,14 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
279
279
  step: "any",
280
280
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
281
281
  placeholder: n.placeholder,
282
- class: T(["py-1.5 px-3 block w-full bg-white", [te(t)]]),
282
+ class: T(["py-1.5 px-3 block w-full bg-white", [le(t)]]),
283
283
  style: {
284
284
  border: "1px solid #CFD9E0"
285
285
  },
286
286
  min: n.min,
287
287
  max: n.max
288
- }, null, 10, _l)), [
289
- [he, s.value]
288
+ }, null, 10, kl)), [
289
+ [me, s.value]
290
290
  ]);
291
291
  }
292
292
  }), Y = (o, e) => {
@@ -294,7 +294,7 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
294
294
  for (const [s, n] of e)
295
295
  t[s] = n;
296
296
  return t;
297
- }, Cl = {}, Vl = {
297
+ }, $l = {}, Cl = {
298
298
  xmlns: "http://www.w3.org/2000/svg",
299
299
  viewBox: "0 0 24 24",
300
300
  fill: "none",
@@ -304,8 +304,8 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
304
304
  "stroke-linejoin": "round",
305
305
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
306
306
  };
307
- function Ml(o, e) {
308
- return i(), d("svg", Vl, e[0] || (e[0] = [
307
+ function Vl(o, e) {
308
+ return i(), d("svg", Cl, e[0] || (e[0] = [
309
309
  l("path", {
310
310
  stroke: "none",
311
311
  d: "M0 0h24v24H0z",
@@ -314,7 +314,7 @@ function Ml(o, e) {
314
314
  l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
315
315
  ]));
316
316
  }
317
- const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-center gap-[4px]" }, Bl = ["value", "id", "disabled"], jl = ["for"], El = { class: "text-[14px] text-gray-700 flex items-center dark:text-neutral-400" }, Il = /* @__PURE__ */ G({
317
+ const Ml = /* @__PURE__ */ Y($l, [["render", Vl]]), Ll = { class: "flex items-center gap-[4px]" }, Sl = ["value", "id", "disabled"], Bl = ["for"], jl = { class: "text-[14px] text-gray-700 flex items-center dark:text-neutral-400" }, El = /* @__PURE__ */ G({
318
318
  __name: "vs-checkbox-default",
319
319
  props: {
320
320
  value: { default: "" },
@@ -327,11 +327,11 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
327
327
  },
328
328
  emits: ["update:modelValue"],
329
329
  setup(o, { emit: e }) {
330
- const t = e, s = o, n = S({
330
+ const t = e, s = o, n = B({
331
331
  get: () => s.modelValue,
332
332
  set: (a) => t("update:modelValue", a)
333
333
  });
334
- return (a, r) => (i(), d("div", Sl, [
334
+ return (a, r) => (i(), d("div", Ll, [
335
335
  ne(l("input", {
336
336
  type: "checkbox",
337
337
  value: a.value,
@@ -339,8 +339,8 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
339
339
  class: T(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": a.disabled }]),
340
340
  id: a.id,
341
341
  disabled: a.disabled
342
- }, null, 10, Bl), [
343
- [jt, n.value]
342
+ }, null, 10, Sl), [
343
+ [Bt, n.value]
344
344
  ]),
345
345
  l("label", {
346
346
  for: a.id,
@@ -349,23 +349,23 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
349
349
  l("div", {
350
350
  class: T(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [n.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
351
351
  }, [
352
- R(Ll, {
352
+ R(Ml, {
353
353
  height: "12",
354
354
  width: "12"
355
355
  })
356
356
  ], 2),
357
- l("span", El, [
358
- Le(a.$slots, "default", {}, () => [
359
- ge(W(a.label), 1)
357
+ l("span", jl, [
358
+ Me(a.$slots, "default", {}, () => [
359
+ he(K(a.label), 1)
360
360
  ])
361
361
  ])
362
- ], 10, jl)
362
+ ], 10, Bl)
363
363
  ]));
364
364
  }
365
- }), zl = ["name", "value", "disabled"], Al = { class: "flex items-center gap-[6px] text-[14px]" }, Tl = {
365
+ }), Il = ["name", "value", "disabled"], zl = { class: "flex items-center gap-[6px] text-[14px]" }, Al = {
366
366
  key: 0,
367
367
  class: "text-[16px]"
368
- }, Fl = ["src"], Ol = /* @__PURE__ */ G({
368
+ }, Tl = ["src"], Fl = /* @__PURE__ */ G({
369
369
  __name: "vs-checkbox-buttons",
370
370
  props: {
371
371
  value: { type: [String, Number, Boolean], default: "" },
@@ -379,12 +379,12 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
379
379
  },
380
380
  emits: ["update:modelValue"],
381
381
  setup(o, { emit: e }) {
382
- const t = o, s = e, n = S({
382
+ const t = o, s = e, n = B({
383
383
  get: () => t.modelValue,
384
384
  set: (u) => {
385
385
  s("update:modelValue", u);
386
386
  }
387
- }), a = S(() => Array.isArray(n.value) ? n.value.includes(t.value) : n.value === !0 || n.value === t.value), r = S(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
387
+ }), a = B(() => Array.isArray(n.value) ? n.value.includes(t.value) : n.value === !0 || n.value === t.value), r = B(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
388
388
  return (u, c) => (i(), d("label", {
389
389
  class: T(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [r.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
390
390
  }, [
@@ -395,30 +395,30 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
395
395
  value: u.value,
396
396
  "onUpdate:modelValue": c[0] || (c[0] = (f) => n.value = f),
397
397
  disabled: u.disabled
398
- }, null, 8, zl), [
399
- [jt, n.value]
398
+ }, null, 8, Il), [
399
+ [Bt, n.value]
400
400
  ]),
401
- l("span", Al, [
402
- u.icon || u.imgUrl ? (i(), d("span", Tl, [
401
+ l("span", zl, [
402
+ u.icon || u.imgUrl ? (i(), d("span", Al, [
403
403
  u.icon ? (i(), d("i", {
404
404
  key: 0,
405
405
  class: T(u.icon)
406
- }, null, 2)) : U("", !0),
406
+ }, null, 2)) : D("", !0),
407
407
  u.imgUrl ? (i(), d("img", {
408
408
  key: 1,
409
409
  src: u.imgUrl,
410
410
  width: "16",
411
411
  height: "16",
412
412
  alt: "icon"
413
- }, null, 8, Fl)) : U("", !0)
414
- ])) : U("", !0),
415
- Le(u.$slots, "default", {}, () => [
416
- ge(W(u.label), 1)
413
+ }, null, 8, Tl)) : D("", !0)
414
+ ])) : D("", !0),
415
+ Me(u.$slots, "default", {}, () => [
416
+ he(K(u.label), 1)
417
417
  ])
418
418
  ])
419
419
  ], 2));
420
420
  }
421
- }), Ul = { class: "flex items-center" }, nt = /* @__PURE__ */ G({
421
+ }), Ol = { class: "flex items-center" }, ot = /* @__PURE__ */ G({
422
422
  __name: "vs-input-checkbox-item",
423
423
  props: {
424
424
  value: { default: "" },
@@ -435,7 +435,7 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
435
435
  },
436
436
  emits: ["update:modelValue"],
437
437
  setup(o, { emit: e }) {
438
- const t = o, s = e, n = `radio-${Math.floor(Math.random() * 1e4)}`, a = S({
438
+ const t = o, s = e, n = `radio-${Math.floor(Math.random() * 1e4)}`, a = B({
439
439
  get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
440
440
  set: (u) => {
441
441
  if (Array.isArray(t.modelValue)) {
@@ -445,8 +445,8 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
445
445
  s("update:modelValue", u);
446
446
  }
447
447
  }), r = w(`vs-checkbox-${t.view || "default"}`);
448
- return (u, c) => (i(), d("div", Ul, [
449
- (i(), me(Oe(r.value === "vs-checkbox-buttons" ? te(Ol) : te(Il)), {
448
+ return (u, c) => (i(), d("div", Ol, [
449
+ (i(), ve(Oe(r.value === "vs-checkbox-buttons" ? le(Fl) : le(El)), {
450
450
  value: u.value,
451
451
  label: u.label,
452
452
  info: u.option?.info,
@@ -460,13 +460,13 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
460
460
  error: u.error
461
461
  }, {
462
462
  default: Ee(() => [
463
- ge(W(u.label), 1)
463
+ he(K(u.label), 1)
464
464
  ]),
465
465
  _: 1
466
466
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
467
467
  ]));
468
468
  }
469
- }), Dl = {}, Rl = {
469
+ }), Ul = {}, Dl = {
470
470
  xmlns: "http://www.w3.org/2000/svg",
471
471
  viewBox: "0 0 24 24",
472
472
  fill: "none",
@@ -476,8 +476,8 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
476
476
  "stroke-linejoin": "round",
477
477
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
478
478
  };
479
- function Pl(o, e) {
480
- return i(), d("svg", Rl, e[0] || (e[0] = [
479
+ function Rl(o, e) {
480
+ return i(), d("svg", Dl, e[0] || (e[0] = [
481
481
  l("path", {
482
482
  stroke: "none",
483
483
  d: "M0 0h24v24H0z",
@@ -486,7 +486,7 @@ function Pl(o, e) {
486
486
  l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
487
487
  ]));
488
488
  }
489
- const Hl = /* @__PURE__ */ Y(Dl, [["render", Pl]]), Nl = {}, Gl = {
489
+ const Pl = /* @__PURE__ */ Y(Ul, [["render", Rl]]), Hl = {}, Nl = {
490
490
  xmlns: "http://www.w3.org/2000/svg",
491
491
  viewBox: "0 0 24 24",
492
492
  fill: "none",
@@ -496,8 +496,8 @@ const Hl = /* @__PURE__ */ Y(Dl, [["render", Pl]]), Nl = {}, Gl = {
496
496
  "stroke-linejoin": "round",
497
497
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
498
498
  };
499
- function ql(o, e) {
500
- return i(), d("svg", Gl, e[0] || (e[0] = [
499
+ function Gl(o, e) {
500
+ return i(), d("svg", Nl, e[0] || (e[0] = [
501
501
  l("path", {
502
502
  stroke: "none",
503
503
  d: "M0 0h24v24H0z",
@@ -507,7 +507,7 @@ function ql(o, e) {
507
507
  l("path", { d: "M6 6l12 12" }, null, -1)
508
508
  ]));
509
509
  }
510
- const Kl = /* @__PURE__ */ Y(Nl, [["render", ql]]), Wl = {}, Zl = {
510
+ const ql = /* @__PURE__ */ Y(Hl, [["render", Gl]]), Kl = {}, Wl = {
511
511
  xmlns: "http://www.w3.org/2000/svg",
512
512
  width: "24",
513
513
  height: "24",
@@ -518,8 +518,8 @@ const Kl = /* @__PURE__ */ Y(Nl, [["render", ql]]), Wl = {}, Zl = {
518
518
  "stroke-linecap": "round",
519
519
  "stroke-linejoin": "round"
520
520
  };
521
- function Jl(o, e) {
522
- return i(), d("svg", Zl, e[0] || (e[0] = [
521
+ function Zl(o, e) {
522
+ return i(), d("svg", Wl, e[0] || (e[0] = [
523
523
  l("path", {
524
524
  stroke: "none",
525
525
  d: "M0 0h24v24H0z",
@@ -530,13 +530,13 @@ function Jl(o, e) {
530
530
  l("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
531
531
  ]));
532
532
  }
533
- const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
533
+ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
534
534
  key: 0,
535
535
  class: "flex items-start gap-x-1"
536
- }, Ql = {
536
+ }, Xl = {
537
537
  key: 0,
538
538
  class: "text-red-500 text-[14px]"
539
- }, eo = ["title"], to = ["disabled"], At = /* @__PURE__ */ G({
539
+ }, Ql = ["title"], eo = ["disabled"], zt = /* @__PURE__ */ G({
540
540
  __name: "vs-input-switcher",
541
541
  props: /* @__PURE__ */ ie({
542
542
  rules: { default: () => [] },
@@ -558,14 +558,14 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
558
558
  emits: ["update:modelValue"],
559
559
  setup(o) {
560
560
  const e = o, t = de(o, "modelValue");
561
- return (s, n) => e.view === "checkbox" ? (i(), d("div", Xl, [
562
- R(nt, {
561
+ return (s, n) => e.view === "checkbox" ? (i(), d("div", Yl, [
562
+ R(ot, {
563
563
  modelValue: t.value,
564
564
  "onUpdate:modelValue": n[0] || (n[0] = (a) => t.value = a),
565
565
  label: s.text,
566
566
  error: s.error || ""
567
567
  }, null, 8, ["modelValue", "label", "error"]),
568
- s.rules?.includes("required") ? (i(), d("span", Ql, "*")) : U("", !0),
568
+ s.rules?.includes("required") ? (i(), d("span", Xl, "*")) : D("", !0),
569
569
  s.i ? (i(), d("button", {
570
570
  key: 1,
571
571
  class: "cursor-pointer",
@@ -573,8 +573,8 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
573
573
  onClick: n[1] || (n[1] = $e(() => {
574
574
  }, ["prevent"]))
575
575
  }, [
576
- R(te(Yl), { class: "text-gray-500 w-[14px] h-[14px]" })
577
- ], 8, eo)) : U("", !0)
576
+ R(le(Jl), { class: "text-gray-500 w-[14px] h-[14px]" })
577
+ ], 8, Ql)) : D("", !0)
578
578
  ])) : (i(), d("button", {
579
579
  key: 1,
580
580
  type: "button",
@@ -586,9 +586,9 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
586
586
  "data-state": "checked",
587
587
  class: T(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
588
588
  }, null, 2)
589
- ], 10, to));
589
+ ], 10, eo));
590
590
  }
591
- }), lo = ["id", "innerHTML"], kt = /* @__PURE__ */ G({
591
+ }), to = ["id", "innerHTML"], wt = /* @__PURE__ */ G({
592
592
  __name: "vs-input-static",
593
593
  props: {
594
594
  text: { default: "" },
@@ -606,9 +606,9 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
606
606
  id: e.name,
607
607
  class: T(["text-gray-900", e.customClass]),
608
608
  innerHTML: e.html ? e.html : e.text
609
- }, null, 10, lo));
609
+ }, null, 10, to));
610
610
  }
611
- }), oo = ["placeholder", "disabled", "name"], no = /* @__PURE__ */ G({
611
+ }), lo = ["placeholder", "disabled", "name"], oo = /* @__PURE__ */ G({
612
612
  __name: "vs-input-mask",
613
613
  props: /* @__PURE__ */ ie({
614
614
  name: {},
@@ -645,7 +645,7 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
645
645
  s.value = e.unmask ? a.unmaskedValue : a.value;
646
646
  }), a.value = s.value ?? "";
647
647
  }
648
- }), it(() => {
648
+ }), rt(() => {
649
649
  a?.destroy();
650
650
  }), ue(() => e.mask, (r) => {
651
651
  a && a.updateOptions({
@@ -665,13 +665,13 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
665
665
  placeholder: r.placeholder,
666
666
  disabled: r.disabled,
667
667
  name: r.name,
668
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t)]]),
668
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t)]]),
669
669
  style: {
670
670
  border: "1px solid #CFD9E0"
671
671
  }
672
- }, null, 10, oo));
672
+ }, null, 10, lo));
673
673
  }
674
- }), ao = { class: "relative w-full bg-white rounded-lg" }, so = ["placeholder", "disabled"], ro = /* @__PURE__ */ G({
674
+ }), no = { class: "relative w-full bg-white rounded-lg" }, ao = ["placeholder", "disabled"], so = /* @__PURE__ */ G({
675
675
  __name: "vs-input-email",
676
676
  props: /* @__PURE__ */ ie({
677
677
  style: { default: () => ({}) },
@@ -688,23 +688,23 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
688
688
  emits: ["update:modelValue"],
689
689
  setup(o) {
690
690
  const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
691
- return (n, a) => (i(), d("div", ao, [
691
+ return (n, a) => (i(), d("div", no, [
692
692
  a[1] || (a[1] = xe('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
693
693
  ne(l("input", {
694
694
  type: "email",
695
695
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
696
696
  placeholder: n.placeholder,
697
697
  disabled: n.disabled,
698
- class: T(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": n.error }]]),
698
+ class: T(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": n.error }]]),
699
699
  style: {
700
700
  border: "1px solid #CFD9E0"
701
701
  }
702
- }, null, 10, so), [
703
- [he, s.value]
702
+ }, null, 10, ao), [
703
+ [me, s.value]
704
704
  ])
705
705
  ]));
706
706
  }
707
- }), io = ["value", "disabled"], uo = { class: "text-[13px] text-gray-700" }, co = /* @__PURE__ */ G({
707
+ }), ro = ["value", "disabled"], io = { class: "text-[13px] text-gray-700" }, uo = /* @__PURE__ */ G({
708
708
  __name: "vs-input-radio-default",
709
709
  props: /* @__PURE__ */ ie({
710
710
  style: {},
@@ -732,8 +732,8 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
732
732
  value: t.value,
733
733
  disabled: t.disabled,
734
734
  class: "hidden"
735
- }, null, 8, io), [
736
- [Et, e.value]
735
+ }, null, 8, ro), [
736
+ [jt, e.value]
737
737
  ]),
738
738
  l("span", {
739
739
  class: T(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
@@ -744,12 +744,12 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
744
744
  e.value == t.value ? (i(), d("span", {
745
745
  key: 0,
746
746
  class: T(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
747
- }, null, 2)) : U("", !0)
747
+ }, null, 2)) : D("", !0)
748
748
  ], 2),
749
- l("span", uo, W(t.text), 1)
749
+ l("span", io, K(t.text), 1)
750
750
  ], 2));
751
751
  }
752
- }), po = ["value", "disabled"], fo = { class: "text-[13px] text-gray-700" }, vo = /* @__PURE__ */ G({
752
+ }), co = ["value", "disabled"], po = { class: "text-[13px] text-gray-700" }, fo = /* @__PURE__ */ G({
753
753
  __name: "vs-input-radio-buttons",
754
754
  props: /* @__PURE__ */ ie({
755
755
  style: {},
@@ -780,16 +780,16 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
780
780
  value: t.value,
781
781
  disabled: t.disabled,
782
782
  class: "hidden"
783
- }, null, 8, po), [
784
- [Et, e.value]
783
+ }, null, 8, co), [
784
+ [jt, e.value]
785
785
  ]),
786
- l("span", fo, W(t.text), 1)
786
+ l("span", po, K(t.text), 1)
787
787
  ], 2));
788
788
  }
789
- }), mo = {
790
- "vs-input-radio-default": co,
791
- "vs-input-radio-buttons": vo
792
- }, _t = /* @__PURE__ */ G({
789
+ }), vo = {
790
+ "vs-input-radio-default": uo,
791
+ "vs-input-radio-buttons": fo
792
+ }, kt = /* @__PURE__ */ G({
793
793
  __name: "vs-input-radio",
794
794
  props: /* @__PURE__ */ ie({
795
795
  options: {},
@@ -808,11 +808,11 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
808
808
  }),
809
809
  emits: ["update:modelValue"],
810
810
  setup(o) {
811
- const e = o, t = de(o, "modelValue"), s = S(() => mo[`vs-input-radio-${e.view}`]);
811
+ const e = o, t = de(o, "modelValue"), s = B(() => vo[`vs-input-radio-${e.view}`]);
812
812
  return (n, a) => (i(), d("div", {
813
813
  class: T([n.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
814
814
  }, [
815
- (i(!0), d(re, null, fe(n.options, (r) => (i(), me(Oe(s.value), Fe({
815
+ (i(!0), d(re, null, pe(n.options, (r) => (i(), ve(Oe(s.value), Fe({
816
816
  key: r?.id,
817
817
  text: r.text,
818
818
  value: r.id.toString(),
@@ -822,13 +822,13 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
822
822
  }, { ref_for: !0 }, n.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
823
823
  ], 2));
824
824
  }
825
- }), ho = {
825
+ }), mo = {
826
826
  key: 1,
827
827
  class: "w-full flex flex-col gap-4"
828
- }, go = {
828
+ }, ho = {
829
829
  key: 0,
830
830
  class: "text-sm font-medium text-muted-foreground my-2"
831
- }, bo = "Без категорії", yo = /* @__PURE__ */ G({
831
+ }, go = "Без категорії", bo = /* @__PURE__ */ G({
832
832
  __name: "vs-input-checkbox",
833
833
  props: {
834
834
  options: { default: () => [] },
@@ -849,10 +849,10 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
849
849
  },
850
850
  emits: ["update:modelValue"],
851
851
  setup(o, { emit: e }) {
852
- const t = o, s = e, n = w([]), a = qt({}), r = (m) => m?.value || m?.id || m?.text || m, u = (m) => m.text || String(m), c = (m) => `lg:col-span-${m || 12}`, f = S(() => [
852
+ const t = o, s = e, n = w([]), a = Gt({}), r = (m) => m?.value || m?.id || m?.text || m, u = (m) => m.text || String(m), c = (m) => `lg:col-span-${m || 12}`, f = B(() => [
853
853
  t.position === "vertical" ? "flex flex-col" : "",
854
854
  t.colSpan ? "grid" : "flex justify-start"
855
- ]), p = (m) => m == null || m === "" ? null : typeof m == "string" || typeof m == "number" ? m : String(m), v = S(() => {
855
+ ]), p = (m) => m == null || m === "" ? null : typeof m == "string" || typeof m == "number" ? m : String(m), v = B(() => {
856
856
  if (!t.group)
857
857
  return [];
858
858
  const m = /* @__PURE__ */ new Map();
@@ -869,7 +869,7 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
869
869
  const C = m.get(O) || [];
870
870
  if (!C.length)
871
871
  return null;
872
- const h = O === null ? "group-null" : `group-${String(O)}`, x = O === null ? bo : String(O);
872
+ const h = O === null ? "group-null" : `group-${String(O)}`, x = O === null ? go : String(O);
873
873
  return $.add(O), {
874
874
  key: h,
875
875
  label: x,
@@ -949,16 +949,16 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
949
949
  }
950
950
  });
951
951
  }
952
- }), (m, I) => t.group ? (i(), d("div", ho, [
953
- (i(!0), d(re, null, fe(v.value, ($) => (i(), d("div", {
952
+ }), (m, I) => t.group ? (i(), d("div", mo, [
953
+ (i(!0), d(re, null, pe(v.value, ($) => (i(), d("div", {
954
954
  key: $.key,
955
955
  class: "flex flex-col gap-2"
956
956
  }, [
957
- $.label ? (i(), d("span", go, W($.label), 1)) : U("", !0),
957
+ $.label ? (i(), d("span", ho, K($.label), 1)) : D("", !0),
958
958
  l("div", {
959
959
  class: T(["p-0 w-full gap-[12px]", f.value])
960
960
  }, [
961
- (i(!0), d(re, null, fe($.options, (A) => (i(), me(nt, {
961
+ (i(!0), d(re, null, pe($.options, (A) => (i(), ve(ot, {
962
962
  modelValue: a[r(A)],
963
963
  "onUpdate:modelValue": (E) => a[r(A)] = E,
964
964
  value: r(A),
@@ -977,7 +977,7 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
977
977
  key: 0,
978
978
  class: T(["p-0 w-full gap-[10px]", f.value])
979
979
  }, [
980
- (i(!0), d(re, null, fe(n.value, ($) => (i(), me(nt, {
980
+ (i(!0), d(re, null, pe(n.value, ($) => (i(), ve(ot, {
981
981
  modelValue: a[r($)],
982
982
  "onUpdate:modelValue": (A) => a[r($)] = A,
983
983
  value: r($),
@@ -992,7 +992,7 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
992
992
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
993
993
  ], 2));
994
994
  }
995
- }), xo = /* @__PURE__ */ Y(yo, [["__scopeId", "data-v-58e06c8a"]]), wo = ["type", "placeholder", "disabled"], ko = /* @__PURE__ */ G({
995
+ }), yo = /* @__PURE__ */ Y(bo, [["__scopeId", "data-v-58e06c8a"]]), xo = ["type", "placeholder", "disabled"], wo = /* @__PURE__ */ G({
996
996
  __name: "vs-input-date1",
997
997
  props: {
998
998
  style: { default: () => ({}) },
@@ -1010,25 +1010,25 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
1010
1010
  function s(c) {
1011
1011
  return c ? t.mode === "datetime" ? (c.includes("T") ? c : null) || c + (c.includes(" ") ? "" : "T00:00") : c?.split(" ")[0] : null;
1012
1012
  }
1013
- const { inputClass: n } = Ce(t.style), a = e, r = S({
1013
+ const { inputClass: n } = Ce(t.style), a = e, r = B({
1014
1014
  get: () => s(t.modelValue),
1015
1015
  set: (c) => a("update:modelValue", c)
1016
- }), u = S(() => t.mode === "datetime" ? "datetime-local" : t.mode);
1016
+ }), u = B(() => t.mode === "datetime" ? "datetime-local" : t.mode);
1017
1017
  return (c, f) => ne((i(), d("input", {
1018
1018
  type: u.value,
1019
1019
  "onUpdate:modelValue": f[0] || (f[0] = (p) => r.value = p),
1020
1020
  placeholder: c.placeholder,
1021
1021
  disabled: c.disabled,
1022
1022
  ref: "date",
1023
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [c.modelValue ? "" : "text-opacity-50", te(n)].join(" ")]),
1023
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [c.modelValue ? "" : "text-opacity-50", le(n)].join(" ")]),
1024
1024
  style: {
1025
1025
  border: "1px solid #CFD9E0"
1026
1026
  }
1027
- }, null, 10, wo)), [
1028
- [Kt, r.value]
1027
+ }, null, 10, xo)), [
1028
+ [qt, r.value]
1029
1029
  ]);
1030
1030
  }
1031
- }), $t = async (o, e, t, s) => {
1031
+ }), _t = async (o, e, t, s) => {
1032
1032
  try {
1033
1033
  const n = new FormData();
1034
1034
  return n.append("unique", "true"), n.append("file", o), (await fetch(
@@ -1046,20 +1046,20 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
1046
1046
  position: "right-bottom"
1047
1047
  }), console.error("Сталась помилка завантаження файлу", n), null;
1048
1048
  }
1049
- }, _o = async (o) => {
1049
+ }, ko = async (o) => {
1050
1050
  try {
1051
1051
  return await fetch(`file/delete${o}`), !0;
1052
1052
  } catch (e) {
1053
1053
  return console.error(e), !1;
1054
1054
  }
1055
- }, Ct = async (o) => {
1055
+ }, $t = async (o) => {
1056
1056
  try {
1057
1057
  const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), s = e.headers["content-type"], n = new TextDecoder("utf-8").decode(t), a = new Blob([n], { type: s }), r = document.createElement("a");
1058
1058
  r.setAttribute("download", o), r.href = window.URL.createObjectURL(a), r.click();
1059
1059
  } catch (e) {
1060
1060
  console.error(e.message);
1061
1061
  }
1062
- }, $o = {}, Co = {
1062
+ }, _o = {}, $o = {
1063
1063
  xmlns: "http://www.w3.org/2000/svg",
1064
1064
  width: "24",
1065
1065
  height: "24",
@@ -1070,13 +1070,13 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
1070
1070
  "stroke-linecap": "round",
1071
1071
  "stroke-linejoin": "round"
1072
1072
  };
1073
- function Vo(o, e) {
1074
- return i(), d("svg", Co, e[0] || (e[0] = [
1073
+ function Co(o, e) {
1074
+ return i(), d("svg", $o, e[0] || (e[0] = [
1075
1075
  l("path", { d: "M5 12h14" }, null, -1),
1076
1076
  l("path", { d: "M12 5v14" }, null, -1)
1077
1077
  ]));
1078
1078
  }
1079
- const qe = /* @__PURE__ */ Y($o, [["render", Vo]]), Mo = {}, Lo = {
1079
+ const Ge = /* @__PURE__ */ Y(_o, [["render", Co]]), Vo = {}, Mo = {
1080
1080
  xmlns: "http://www.w3.org/2000/svg",
1081
1081
  class: "icon icon-tabler icon-tabler-file-text",
1082
1082
  width: "44",
@@ -1088,12 +1088,12 @@ const qe = /* @__PURE__ */ Y($o, [["render", Vo]]), Mo = {}, Lo = {
1088
1088
  "stroke-linecap": "round",
1089
1089
  "stroke-linejoin": "round"
1090
1090
  };
1091
- function So(o, e, t, s, n, a) {
1092
- return i(), d("svg", Lo, e[0] || (e[0] = [
1091
+ function Lo(o, e, t, s, n, a) {
1092
+ return i(), d("svg", Mo, e[0] || (e[0] = [
1093
1093
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
1094
1094
  ]));
1095
1095
  }
1096
- const Bo = /* @__PURE__ */ Y(Mo, [["render", So]]), jo = {}, Eo = {
1096
+ const So = /* @__PURE__ */ Y(Vo, [["render", Lo]]), Bo = {}, jo = {
1097
1097
  xmlns: "http://www.w3.org/2000/svg",
1098
1098
  class: "icon icon-tabler icon-tabler-table",
1099
1099
  width: "44",
@@ -1105,8 +1105,8 @@ const Bo = /* @__PURE__ */ Y(Mo, [["render", So]]), jo = {}, Eo = {
1105
1105
  "stroke-linecap": "round",
1106
1106
  "stroke-linejoin": "round"
1107
1107
  };
1108
- function Io(o, e, t, s, n, a) {
1109
- return i(), d("svg", Eo, e[0] || (e[0] = [
1108
+ function Eo(o, e, t, s, n, a) {
1109
+ return i(), d("svg", jo, e[0] || (e[0] = [
1110
1110
  l("path", {
1111
1111
  stroke: "none",
1112
1112
  d: "M0 0h24v24H0z",
@@ -1133,7 +1133,7 @@ function Io(o, e, t, s, n, a) {
1133
1133
  }, null, -1)
1134
1134
  ]));
1135
1135
  }
1136
- const zo = /* @__PURE__ */ Y(jo, [["render", Io]]), Ao = {}, To = {
1136
+ const Io = /* @__PURE__ */ Y(Bo, [["render", Eo]]), zo = {}, Ao = {
1137
1137
  xmlns: "http://www.w3.org/2000/svg",
1138
1138
  width: "24",
1139
1139
  height: "24",
@@ -1144,12 +1144,12 @@ const zo = /* @__PURE__ */ Y(jo, [["render", Io]]), Ao = {}, To = {
1144
1144
  "stroke-linecap": "round",
1145
1145
  "stroke-linejoin": "round"
1146
1146
  };
1147
- function Fo(o, e) {
1148
- return i(), d("svg", To, e[0] || (e[0] = [
1147
+ function To(o, e) {
1148
+ return i(), d("svg", Ao, e[0] || (e[0] = [
1149
1149
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>', 6)
1150
1150
  ]));
1151
1151
  }
1152
- const Tt = /* @__PURE__ */ Y(Ao, [["render", Fo]]), Oo = {}, Uo = {
1152
+ const At = /* @__PURE__ */ Y(zo, [["render", To]]), Fo = {}, Oo = {
1153
1153
  xmlns: "http://www.w3.org/2000/svg",
1154
1154
  class: "icon icon-tabler icon-tabler-file-zip",
1155
1155
  width: "44",
@@ -1161,12 +1161,12 @@ const Tt = /* @__PURE__ */ Y(Ao, [["render", Fo]]), Oo = {}, Uo = {
1161
1161
  "stroke-linecap": "round",
1162
1162
  "stroke-linejoin": "round"
1163
1163
  };
1164
- function Do(o, e, t, s, n, a) {
1165
- return i(), d("svg", Uo, e[0] || (e[0] = [
1164
+ function Uo(o, e, t, s, n, a) {
1165
+ return i(), d("svg", Oo, e[0] || (e[0] = [
1166
1166
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
1167
1167
  ]));
1168
1168
  }
1169
- const Ro = /* @__PURE__ */ Y(Oo, [["render", Do]]), Po = {}, Ho = {
1169
+ const Do = /* @__PURE__ */ Y(Fo, [["render", Uo]]), Ro = {}, Po = {
1170
1170
  xmlns: "http://www.w3.org/2000/svg",
1171
1171
  class: "icon icon-tabler icon-tabler-file-code",
1172
1172
  width: "44",
@@ -1178,25 +1178,25 @@ const Ro = /* @__PURE__ */ Y(Oo, [["render", Do]]), Po = {}, Ho = {
1178
1178
  "stroke-linecap": "round",
1179
1179
  "stroke-linejoin": "round"
1180
1180
  };
1181
- function No(o, e, t, s, n, a) {
1182
- return i(), d("svg", Ho, e[0] || (e[0] = [
1181
+ function Ho(o, e, t, s, n, a) {
1182
+ return i(), d("svg", Po, e[0] || (e[0] = [
1183
1183
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
1184
1184
  ]));
1185
1185
  }
1186
- const Go = /* @__PURE__ */ Y(Po, [["render", No]]), qo = (o) => {
1186
+ const No = /* @__PURE__ */ Y(Ro, [["render", Ho]]), Go = (o) => {
1187
1187
  if (!o) return "";
1188
1188
  const e = o?.split(".");
1189
1189
  return e[e.length - 1];
1190
- }, Ko = (o) => {
1191
- const e = qo(o), t = {
1190
+ }, qo = (o) => {
1191
+ const e = Go(o), t = {
1192
1192
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
1193
1193
  sheetsFormat: ["xls", "csv", "xlsx"],
1194
1194
  archivesFormat: ["zip", "rar"],
1195
1195
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
1196
1196
  documentsFormat: ["pdf"]
1197
1197
  };
1198
- return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? zo : t.textsFormat.includes(e) ? Go : t.documentsFormat.includes(e) ? Bo : t.archivesFormat.includes(e) ? Ro : Tt;
1199
- }, Wo = {}, Zo = {
1198
+ return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? Io : t.textsFormat.includes(e) ? No : t.documentsFormat.includes(e) ? So : t.archivesFormat.includes(e) ? Do : At;
1199
+ }, Ko = {}, Wo = {
1200
1200
  xmlns: "http://www.w3.org/2000/svg",
1201
1201
  width: "24",
1202
1202
  height: "24",
@@ -1208,12 +1208,12 @@ const Go = /* @__PURE__ */ Y(Po, [["render", No]]), qo = (o) => {
1208
1208
  "stroke-linejoin": "round",
1209
1209
  class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
1210
1210
  };
1211
- function Jo(o, e) {
1212
- return i(), d("svg", Zo, e[0] || (e[0] = [
1211
+ function Zo(o, e) {
1212
+ return i(), d("svg", Wo, e[0] || (e[0] = [
1213
1213
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
1214
1214
  ]));
1215
1215
  }
1216
- const tt = /* @__PURE__ */ Y(Wo, [["render", Jo]]), Yo = {}, Xo = {
1216
+ const Qe = /* @__PURE__ */ Y(Ko, [["render", Zo]]), Jo = {}, Yo = {
1217
1217
  xmlns: "http://www.w3.org/2000/svg",
1218
1218
  width: "24",
1219
1219
  height: "24",
@@ -1225,8 +1225,8 @@ const tt = /* @__PURE__ */ Y(Wo, [["render", Jo]]), Yo = {}, Xo = {
1225
1225
  "stroke-linejoin": "round",
1226
1226
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1227
1227
  };
1228
- function Qo(o, e) {
1229
- return i(), d("svg", Xo, e[0] || (e[0] = [
1228
+ function Xo(o, e) {
1229
+ return i(), d("svg", Yo, e[0] || (e[0] = [
1230
1230
  l("path", {
1231
1231
  stroke: "none",
1232
1232
  d: "M0 0h24v24H0z",
@@ -1237,7 +1237,7 @@ function Qo(o, e) {
1237
1237
  l("path", { d: "M12 4l0 12" }, null, -1)
1238
1238
  ]));
1239
1239
  }
1240
- const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, tn = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, ln = /* @__PURE__ */ G({
1240
+ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, en = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, tn = /* @__PURE__ */ G({
1241
1241
  __name: "vs-input-file-list-item",
1242
1242
  props: /* @__PURE__ */ ie({
1243
1243
  format: {},
@@ -1259,43 +1259,43 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1259
1259
  emits: ["update:value", "update:item"],
1260
1260
  setup(o) {
1261
1261
  const e = de(o, "value"), t = de(o, "item"), s = o;
1262
- return (n, a) => (i(), d("div", en, [
1263
- (i(), me(Oe(te(Ko)(t.value)), {
1262
+ return (n, a) => (i(), d("div", Qo, [
1263
+ (i(), ve(Oe(le(qo)(t.value)), {
1264
1264
  src: t.value,
1265
1265
  alt: "file",
1266
1266
  class: "w-full h-full object-cover cursor-pointer",
1267
- onClick: a[0] || (a[0] = (r) => te(Ct)(t.value))
1267
+ onClick: a[0] || (a[0] = (r) => le($t)(t.value))
1268
1268
  }, null, 8, ["src"])),
1269
- l("div", tn, [
1269
+ l("div", en, [
1270
1270
  l("button", {
1271
1271
  type: "button",
1272
1272
  onClick: a[1] || (a[1] = (r) => {
1273
- te(_o)(t.value), e.value = s.multiple ? e.value?.filter((u) => u !== t.value) : "";
1273
+ le(ko)(t.value), e.value = s.multiple ? e.value?.filter((u) => u !== t.value) : "";
1274
1274
  }),
1275
1275
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1276
1276
  }, [
1277
- R(tt, { class: "w-4 h-4" })
1277
+ R(Qe, { class: "w-4 h-4" })
1278
1278
  ]),
1279
1279
  l("button", {
1280
1280
  type: "button",
1281
- onClick: a[2] || (a[2] = (r) => te(Ct)(t.value)),
1281
+ onClick: a[2] || (a[2] = (r) => le($t)(t.value)),
1282
1282
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1283
1283
  }, [
1284
- R(Ft, { class: "w-4 h-4" })
1284
+ R(Tt, { class: "w-4 h-4" })
1285
1285
  ])
1286
1286
  ])
1287
1287
  ]));
1288
1288
  }
1289
- }), Vt = /* @__PURE__ */ Y(ln, [["__scopeId", "data-v-0ca886b3"]]), on = { class: "flex items-center gap-x-2" }, nn = ["multiple", "disabled"], an = {
1289
+ }), Ct = /* @__PURE__ */ Y(tn, [["__scopeId", "data-v-0ca886b3"]]), ln = { class: "flex items-center gap-x-2" }, on = ["multiple", "disabled"], nn = {
1290
1290
  key: 1,
1291
1291
  class: "flex items-center flex-wrap gap-2"
1292
- }, sn = {
1292
+ }, an = {
1293
1293
  key: 1,
1294
1294
  class: "loader"
1295
- }, rn = {
1295
+ }, sn = {
1296
1296
  key: 1,
1297
1297
  class: "loader"
1298
- }, un = /* @__PURE__ */ G({
1298
+ }, rn = /* @__PURE__ */ G({
1299
1299
  __name: "vs-input-file",
1300
1300
  props: /* @__PURE__ */ ie({
1301
1301
  format: {},
@@ -1336,20 +1336,20 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1336
1336
  r.value = !0;
1337
1337
  try {
1338
1338
  if (t.multiple) {
1339
- const m = Array.from(v).map(async (E) => t.format && !E.name.endsWith(t.format) ? null : await $t(E, "1", "form", "table")), A = (await Promise.all(m)).filter((E) => E !== null).map((E) => E?.file_path).filter(Boolean);
1339
+ const m = Array.from(v).map(async (E) => t.format && !E.name.endsWith(t.format) ? null : await _t(E, "1", "form", "table")), A = (await Promise.all(m)).filter((E) => E !== null).map((E) => E?.file_path).filter(Boolean);
1340
1340
  s.value = [...s.value || [], ...A], n("change", s.value);
1341
1341
  } else {
1342
1342
  const m = v[0];
1343
1343
  if (t.format && !m.name.endsWith(t.format))
1344
1344
  return;
1345
- const I = await $t(m, "1", "form", "table");
1345
+ const I = await _t(m, "1", "form", "table");
1346
1346
  s.value = I?.file_path, n("change", s.value || "");
1347
1347
  }
1348
1348
  } finally {
1349
1349
  r.value = !1, a.value && (a.value.value = "");
1350
1350
  }
1351
1351
  };
1352
- return (p, v) => (i(), d("div", on, [
1352
+ return (p, v) => (i(), d("div", ln, [
1353
1353
  l("input", {
1354
1354
  class: "hidden",
1355
1355
  ref_key: "fileInput",
@@ -1358,15 +1358,15 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1358
1358
  multiple: p.multiple,
1359
1359
  onChange: f,
1360
1360
  disabled: r.value || p.disabled
1361
- }, null, 40, nn),
1362
- !p.multiple && s.value ? (i(), me(Vt, {
1361
+ }, null, 40, on),
1362
+ !p.multiple && s.value ? (i(), ve(Ct, {
1363
1363
  key: 0,
1364
1364
  item: s.value,
1365
1365
  "onUpdate:item": v[0] || (v[0] = (k) => s.value = k),
1366
1366
  value: s.value,
1367
1367
  "onUpdate:value": v[1] || (v[1] = (k) => s.value = k)
1368
- }, null, 8, ["item", "value"])) : p.multiple ? (i(), d("div", an, [
1369
- (i(!0), d(re, null, fe(s.value, (k, m) => (i(), me(Vt, {
1368
+ }, null, 8, ["item", "value"])) : p.multiple ? (i(), d("div", nn, [
1369
+ (i(!0), d(re, null, pe(s.value, (k, m) => (i(), ve(Ct, {
1370
1370
  multiple: p.multiple,
1371
1371
  key: m,
1372
1372
  value: s.value,
@@ -1380,31 +1380,31 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1380
1380
  p.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1381
1381
  ])
1382
1382
  }, [
1383
- r.value ? (i(), d("div", sn)) : (i(), me(qe, {
1383
+ r.value ? (i(), d("div", an)) : (i(), ve(Ge, {
1384
1384
  key: 0,
1385
1385
  class: "w-6 h-6"
1386
1386
  }))
1387
1387
  ], 2)
1388
- ])) : U("", !0),
1389
- p.multiple ? U("", !0) : (i(), d("div", {
1388
+ ])) : D("", !0),
1389
+ p.multiple ? D("", !0) : (i(), d("div", {
1390
1390
  key: 2,
1391
1391
  onClick: v[4] || (v[4] = (k) => a.value?.click()),
1392
1392
  class: T([p.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1393
1393
  }, [
1394
- r.value ? (i(), d("div", rn)) : (i(), me(qe, {
1394
+ r.value ? (i(), d("div", sn)) : (i(), ve(Ge, {
1395
1395
  key: 0,
1396
1396
  class: "w-6 h-6"
1397
1397
  }))
1398
1398
  ], 2))
1399
1399
  ]));
1400
1400
  }
1401
- }), dn = /* @__PURE__ */ Y(un, [["__scopeId", "data-v-e613a523"]]), cn = { class: "max-w-[55vw]" }, pn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, fn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, vn = { class: "px-[5px]" }, mn = { class: "" }, Ye = /* @__PURE__ */ G({
1401
+ }), un = /* @__PURE__ */ Y(rn, [["__scopeId", "data-v-e613a523"]]), dn = { class: "max-w-[55vw]" }, cn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, pn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, fn = { class: "px-[5px]" }, vn = { class: "" }, Je = /* @__PURE__ */ G({
1402
1402
  __name: "vs-widget-file-info",
1403
1403
  props: {
1404
1404
  item: { default: null }
1405
1405
  },
1406
1406
  setup(o) {
1407
- const e = o, t = S(() => {
1407
+ const e = o, t = B(() => {
1408
1408
  try {
1409
1409
  return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
1410
1410
  day: "2-digit",
@@ -1423,33 +1423,33 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1423
1423
  }
1424
1424
  return (n, a) => (i(), d(re, null, [
1425
1425
  a[1] || (a[1] = xe('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
1426
- l("div", cn, [
1427
- l("p", pn, W(n.item?.uploaded_name), 1),
1428
- l("p", fn, [
1429
- l("span", null, W(n.item?.username), 1),
1430
- ne(l("span", vn, "|", 512), [
1431
- [et, n.item?.username]
1426
+ l("div", dn, [
1427
+ l("p", cn, K(n.item?.uploaded_name), 1),
1428
+ l("p", pn, [
1429
+ l("span", null, K(n.item?.username), 1),
1430
+ ne(l("span", fn, "|", 512), [
1431
+ [it, n.item?.username]
1432
1432
  ]),
1433
- l("span", null, W(t.value), 1),
1433
+ l("span", null, K(t.value), 1),
1434
1434
  a[0] || (a[0] = l("span", { class: "px-[5px]" }, "|", -1)),
1435
- l("span", mn, W(s(n.item?.size)), 1)
1435
+ l("span", vn, K(s(n.item?.size)), 1)
1436
1436
  ])
1437
1437
  ])
1438
1438
  ], 64));
1439
1439
  }
1440
- }), hn = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, gn = {
1440
+ }), mn = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, hn = {
1441
1441
  key: 0,
1442
1442
  class: "flex w-full gap-x-3 items-center"
1443
- }, bn = {
1443
+ }, gn = {
1444
1444
  key: 1,
1445
1445
  class: "flex gap-x-3 w-full items-center"
1446
- }, yn = {
1446
+ }, bn = {
1447
1447
  key: 2,
1448
1448
  class: "flex gap-x-3 w-full items-center"
1449
- }, xn = ["href"], wn = {
1449
+ }, yn = ["href"], xn = {
1450
1450
  key: 3,
1451
1451
  class: "flex gap-x-3 w-full items-center"
1452
- }, kn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, _n = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, $n = { class: "inline-block" }, Cn = { class: "inline-block" }, Vn = /* @__PURE__ */ G({
1452
+ }, wn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, kn = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, _n = { class: "inline-block" }, $n = { class: "inline-block" }, Cn = /* @__PURE__ */ G({
1453
1453
  __name: "vs-widget-file-item",
1454
1454
  props: {
1455
1455
  item: { default: null },
@@ -1491,48 +1491,48 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1491
1491
  function f(p) {
1492
1492
  (t.item.ext === "jpg" || t.item.ext === "png") && s("openLightbox", { item: t.item, index: p });
1493
1493
  }
1494
- return (p, v) => (i(), d("div", hn, [
1495
- p.item.ext === "jpg" || p.item.ext === "png" ? (i(), d("div", gn, [
1494
+ return (p, v) => (i(), d("div", mn, [
1495
+ p.item.ext === "jpg" || p.item.ext === "png" ? (i(), d("div", hn, [
1496
1496
  l("div", {
1497
1497
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1498
1498
  onClick: v[0] || (v[0] = (k) => f(p.index))
1499
1499
  }, [
1500
- R(Ye, { item: p.item }, null, 8, ["item"])
1500
+ R(Je, { item: p.item }, null, 8, ["item"])
1501
1501
  ])
1502
- ])) : n(p.item) ? (i(), d("div", bn, [
1503
- R(Ye, { item: p.item }, null, 8, ["item"])
1504
- ])) : a(p.item) ? (i(), d("div", yn, [
1502
+ ])) : n(p.item) ? (i(), d("div", gn, [
1503
+ R(Je, { item: p.item }, null, 8, ["item"])
1504
+ ])) : a(p.item) ? (i(), d("div", bn, [
1505
1505
  l("a", {
1506
1506
  href: `/api/file-preview?id=${p.item.file_id}`,
1507
1507
  target: "_blank",
1508
1508
  class: "flex gap-x-3 w-full items-center"
1509
1509
  }, [
1510
- R(Ye, { item: p.item }, null, 8, ["item"])
1511
- ], 8, xn)
1512
- ])) : (i(), d("div", wn, [
1513
- R(Ye, { item: p.item }, null, 8, ["item"])
1510
+ R(Je, { item: p.item }, null, 8, ["item"])
1511
+ ], 8, yn)
1512
+ ])) : (i(), d("div", xn, [
1513
+ R(Je, { item: p.item }, null, 8, ["item"])
1514
1514
  ])),
1515
- l("div", kn, [
1516
- l("div", _n, [
1517
- l("div", $n, [
1515
+ l("div", wn, [
1516
+ l("div", kn, [
1517
+ l("div", _n, [
1518
1518
  l("button", {
1519
1519
  class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
1520
1520
  onClick: v[1] || (v[1] = (k) => r(p.item))
1521
1521
  }, [
1522
- R(Ft, {
1522
+ R(Tt, {
1523
1523
  height: "14",
1524
1524
  width: "14"
1525
1525
  })
1526
1526
  ])
1527
1527
  ]),
1528
1528
  v[3] || (v[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1529
- l("div", Cn, [
1529
+ l("div", $n, [
1530
1530
  l("button", {
1531
1531
  type: "button",
1532
1532
  class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
1533
1533
  onClick: v[2] || (v[2] = (k) => c())
1534
1534
  }, [
1535
- R(tt, {
1535
+ R(Qe, {
1536
1536
  height: "14",
1537
1537
  width: "14"
1538
1538
  })
@@ -1542,7 +1542,7 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1542
1542
  ])
1543
1543
  ]));
1544
1544
  }
1545
- }), Mn = {}, Ln = {
1545
+ }), Vn = {}, Mn = {
1546
1546
  xmlns: "http://www.w3.org/2000/svg",
1547
1547
  width: "24",
1548
1548
  height: "24",
@@ -1554,8 +1554,8 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1554
1554
  "stroke-linejoin": "round",
1555
1555
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1556
1556
  };
1557
- function Sn(o, e) {
1558
- return i(), d("svg", Ln, e[0] || (e[0] = [
1557
+ function Ln(o, e) {
1558
+ return i(), d("svg", Mn, e[0] || (e[0] = [
1559
1559
  l("path", {
1560
1560
  stroke: "none",
1561
1561
  d: "M0 0h24v24H0z",
@@ -1566,13 +1566,13 @@ function Sn(o, e) {
1566
1566
  l("path", { d: "M12 4l0 12" }, null, -1)
1567
1567
  ]));
1568
1568
  }
1569
- const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, En = { class: "flex w-full mb-[12px] items-center gap-x-2" }, In = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, zn = { class1: "ml-auto" }, An = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, Tn = {
1569
+ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, jn = { class: "flex w-full mb-[12px] items-center gap-x-2" }, En = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, In = { class1: "ml-auto" }, zn = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, An = {
1570
1570
  key: 0,
1571
1571
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1572
- }, Fn = { class: "relative" }, On = {
1572
+ }, Tn = { class: "relative" }, Fn = {
1573
1573
  key: 1,
1574
1574
  class: "space-y-3 max-h-[300px] overflow-y-auto [&::-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"
1575
- }, Un = { key: 0 }, Dn = /* @__PURE__ */ G({
1575
+ }, On = { key: 0 }, Un = /* @__PURE__ */ G({
1576
1576
  __name: "vs-input-file-list",
1577
1577
  props: {
1578
1578
  id: { default: "" },
@@ -1587,7 +1587,7 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1587
1587
  },
1588
1588
  emits: ["update"],
1589
1589
  setup(o, { emit: e }) {
1590
- const t = o, s = Ae("form"), n = S(() => s.value.formId), a = w(!1), r = w(0), u = e, c = w(!1), f = w({}), p = w([]), v = w(""), k = S(() => Array.isArray(p.value) ? p.value.filter((C) => C.ext === "jpg" || C.ext === "png").map((C) => C?.file_path) : []), m = S(() => v.value === "" ? p.value : p.value.filter((C) => C?.uploaded_name?.includes(v.value))), I = (C) => {
1590
+ const t = o, s = Ae("form"), n = B(() => s.value.formId), a = w(!1), r = w(0), u = e, c = w(!1), f = w({}), p = w([]), v = w(""), k = B(() => Array.isArray(p.value) ? p.value.filter((C) => C.ext === "jpg" || C.ext === "png").map((C) => C?.file_path) : []), m = B(() => v.value === "" ? p.value : p.value.filter((C) => C?.uploaded_name?.includes(v.value))), I = (C) => {
1591
1591
  const h = k.value.findIndex((x) => x === C.item.file_path);
1592
1592
  h !== -1 && (a.value = !0, r.value = h);
1593
1593
  }, $ = async () => {
@@ -1603,18 +1603,18 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1603
1603
  const x = new FormData();
1604
1604
  x.append("file", h);
1605
1605
  try {
1606
- const B = `${t.prefix}/widget/file/${n.value}`, V = await fetch(B, { method: "POST", body: x });
1607
- return V.ok ? (u("update", "file-list"), h) : (ce({
1608
- type: V.status >= 400 && V.status < 500 ? "warning" : "error",
1606
+ const j = `${t.prefix}/widget/file/${n.value}`, M = await fetch(j, { method: "POST", body: x });
1607
+ return M.ok ? (u("update", "file-list"), h) : (ce({
1608
+ type: M.status >= 400 && M.status < 500 ? "warning" : "error",
1609
1609
  title: "Error",
1610
- message: `Error code: ${V.status}`
1610
+ message: `Error code: ${M.status}`
1611
1611
  }), null);
1612
- } catch (B) {
1612
+ } catch (j) {
1613
1613
  return ce({
1614
1614
  type: "error",
1615
1615
  title: "Error",
1616
- message: B.message || "Unknown error"
1617
- }), console.error(B), null;
1616
+ message: j.message || "Unknown error"
1617
+ }), console.error(j), null;
1618
1618
  }
1619
1619
  })
1620
1620
  ), await $();
@@ -1633,19 +1633,19 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1633
1633
  }), ye(() => {
1634
1634
  n.value && $();
1635
1635
  }), (C, h) => {
1636
- const x = xt("Lightbox"), B = xt("MessageBox");
1637
- return i(), d("div", jn, [
1638
- l("div", En, [
1639
- l("h2", In, " Файлів: " + W(p.value?.length), 1),
1640
- l("div", zn, [
1636
+ const x = yt("Lightbox"), j = yt("MessageBox");
1637
+ return i(), d("div", Bn, [
1638
+ l("div", jn, [
1639
+ l("h2", En, " Файлів: " + K(p.value?.length), 1),
1640
+ l("div", In, [
1641
1641
  l("label", null, [
1642
1642
  l("input", {
1643
1643
  type: "file",
1644
1644
  class: "hidden",
1645
- onChange: h[0] || (h[0] = (V) => A(V))
1645
+ onChange: h[0] || (h[0] = (M) => A(M))
1646
1646
  }, null, 32),
1647
- l("div", An, [
1648
- R(Bn, {
1647
+ l("div", zn, [
1648
+ R(Sn, {
1649
1649
  height: "16",
1650
1650
  width: "16"
1651
1651
  })
@@ -1653,9 +1653,9 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1653
1653
  ])
1654
1654
  ])
1655
1655
  ]),
1656
- p.value?.length > 4 ? (i(), d("div", Tn, [
1656
+ p.value?.length > 4 ? (i(), d("div", An, [
1657
1657
  l("div", null, [
1658
- l("div", Fn, [
1658
+ l("div", Tn, [
1659
1659
  h[8] || (h[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1660
1660
  l("svg", {
1661
1661
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
@@ -1679,12 +1679,12 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1679
1679
  ], -1)),
1680
1680
  ne(l("input", {
1681
1681
  type: "text",
1682
- "onUpdate:modelValue": h[1] || (h[1] = (V) => v.value = V),
1682
+ "onUpdate:modelValue": h[1] || (h[1] = (M) => v.value = M),
1683
1683
  class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
1684
1684
  placeholder: "Введіть назву файлу"
1685
1685
  }, null, 512), [
1686
1686
  [
1687
- he,
1687
+ me,
1688
1688
  v.value,
1689
1689
  void 0,
1690
1690
  { trim: !0 }
@@ -1692,37 +1692,37 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1692
1692
  ])
1693
1693
  ])
1694
1694
  ])
1695
- ])) : U("", !0),
1696
- p.value?.length ? (i(), d("div", On, [
1697
- (i(!0), d(re, null, fe(m.value, (V, P) => (i(), me(Vn, {
1695
+ ])) : D("", !0),
1696
+ p.value?.length ? (i(), d("div", Fn, [
1697
+ (i(!0), d(re, null, pe(m.value, (M, P) => (i(), ve(Cn, {
1698
1698
  key: P,
1699
1699
  prefix: C.prefix,
1700
- item: V,
1700
+ item: M,
1701
1701
  index: P,
1702
- onUpdate: h[2] || (h[2] = (ee) => C.$emit("update", "file-list")),
1703
- onOpenModal: h[3] || (h[3] = (ee) => O(ee)),
1704
- onOpenLightbox: h[4] || (h[4] = (ee) => I(ee))
1702
+ onUpdate: h[2] || (h[2] = (te) => C.$emit("update", "file-list")),
1703
+ onOpenModal: h[3] || (h[3] = (te) => O(te)),
1704
+ onOpenLightbox: h[4] || (h[4] = (te) => I(te))
1705
1705
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1706
- m.value.length ? U("", !0) : (i(), d("div", Un, h[9] || (h[9] = [
1706
+ m.value.length ? D("", !0) : (i(), d("div", On, h[9] || (h[9] = [
1707
1707
  l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1708
1708
  ])))
1709
- ])) : U("", !0),
1709
+ ])) : D("", !0),
1710
1710
  R(x, {
1711
1711
  modelValue: a.value,
1712
- "onUpdate:modelValue": h[5] || (h[5] = (V) => a.value = V),
1712
+ "onUpdate:modelValue": h[5] || (h[5] = (M) => a.value = M),
1713
1713
  startIndex: r.value,
1714
- "onUpdate:index": h[6] || (h[6] = (V) => r.value = V),
1714
+ "onUpdate:index": h[6] || (h[6] = (M) => r.value = M),
1715
1715
  images: k.value
1716
1716
  }, null, 8, ["modelValue", "startIndex", "images"]),
1717
- R(B, Fe({
1717
+ R(j, Fe({
1718
1718
  modelValue: c.value,
1719
- "onUpdate:modelValue": h[7] || (h[7] = (V) => c.value = V),
1719
+ "onUpdate:modelValue": h[7] || (h[7] = (M) => c.value = M),
1720
1720
  onConfirm: f.value.confirm
1721
1721
  }, f.value), null, 16, ["modelValue", "onConfirm"])
1722
1722
  ]);
1723
1723
  };
1724
1724
  }
1725
- }), Rn = { class: "flex items-center justify-between" }, Pn = { class: "text-[16px] text-gray-900 font-medium" }, Hn = { class: "grid gap-3" }, Nn = /* @__PURE__ */ G({
1725
+ }), Dn = { class: "flex items-center justify-between" }, Rn = { class: "text-[16px] text-gray-900 font-medium" }, Pn = { class: "grid gap-3" }, Hn = /* @__PURE__ */ G({
1726
1726
  __name: "vs-container-switcher",
1727
1727
  props: {
1728
1728
  title: {
@@ -1746,9 +1746,9 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1746
1746
  t.value = s;
1747
1747
  }
1748
1748
  ), (s, n) => (i(), d("div", null, [
1749
- l("div", Rn, [
1750
- l("p", Pn, W(o.title), 1),
1751
- R(At, {
1749
+ l("div", Dn, [
1750
+ l("p", Rn, K(o.title), 1),
1751
+ R(zt, {
1752
1752
  modelValue: t.value,
1753
1753
  "onUpdate:modelValue": n[0] || (n[0] = (a) => t.value = a),
1754
1754
  style: be(o.style)
@@ -1756,17 +1756,17 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1756
1756
  ]),
1757
1757
  R(ut, { name: "slide-fade" }, {
1758
1758
  default: Ee(() => [
1759
- ne(l("div", Hn, [
1760
- Le(s.$slots, "default", {}, void 0, !0)
1759
+ ne(l("div", Pn, [
1760
+ Me(s.$slots, "default", {}, void 0, !0)
1761
1761
  ], 512), [
1762
- [et, t.value]
1762
+ [it, t.value]
1763
1763
  ])
1764
1764
  ]),
1765
1765
  _: 3
1766
1766
  })
1767
1767
  ]));
1768
1768
  }
1769
- }), Gn = /* @__PURE__ */ Y(Nn, [["__scopeId", "data-v-90320b87"]]), qn = { class: "text-[16px] text-gray-900 font-medium" }, Kn = { class: "grid gap-3" }, Wn = /* @__PURE__ */ G({
1769
+ }), Nn = /* @__PURE__ */ Y(Hn, [["__scopeId", "data-v-90320b87"]]), Gn = { class: "text-[16px] text-gray-900 font-medium" }, qn = { class: "grid gap-3" }, Kn = /* @__PURE__ */ G({
1770
1770
  __name: "vs-container-accordion",
1771
1771
  props: {
1772
1772
  title: {
@@ -1795,24 +1795,24 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1795
1795
  onClick: n[0] || (n[0] = (a) => t.value = !t.value),
1796
1796
  class: "flex items-center gap-2"
1797
1797
  }, [
1798
- R(te(Hl), {
1798
+ R(le(Pl), {
1799
1799
  class: T(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1800
1800
  }, null, 8, ["class"]),
1801
- l("span", qn, W(o.title), 1)
1801
+ l("span", Gn, K(o.title), 1)
1802
1802
  ]),
1803
1803
  R(ut, { name: "slide-fade" }, {
1804
1804
  default: Ee(() => [
1805
- ne(l("div", Kn, [
1806
- Le(s.$slots, "default", {}, void 0, !0)
1805
+ ne(l("div", qn, [
1806
+ Me(s.$slots, "default", {}, void 0, !0)
1807
1807
  ], 512), [
1808
- [et, t.value]
1808
+ [it, t.value]
1809
1809
  ])
1810
1810
  ]),
1811
1811
  _: 3
1812
1812
  })
1813
1813
  ]));
1814
1814
  }
1815
- }), Zn = /* @__PURE__ */ Y(Wn, [["__scopeId", "data-v-590eff11"]]), Jn = { class: "flex items-center justify-between" }, Yn = /* @__PURE__ */ G({
1815
+ }), Wn = /* @__PURE__ */ Y(Kn, [["__scopeId", "data-v-590eff11"]]), Zn = { class: "flex items-center justify-between" }, Jn = /* @__PURE__ */ G({
1816
1816
  __name: "vs-container-default",
1817
1817
  props: {
1818
1818
  title: {
@@ -1826,16 +1826,16 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1826
1826
  },
1827
1827
  setup(o) {
1828
1828
  return (e, t) => (i(), d("div", null, [
1829
- l("div", Jn, [
1830
- l("p", null, W(o.title), 1)
1829
+ l("div", Zn, [
1830
+ l("p", null, K(o.title), 1)
1831
1831
  ]),
1832
- Le(e.$slots, "default")
1832
+ Me(e.$slots, "default")
1833
1833
  ]));
1834
1834
  }
1835
- }), Xn = {
1836
- switcher: Gn,
1837
- accordion: Zn,
1838
- default: Yn
1835
+ }), Yn = {
1836
+ switcher: Nn,
1837
+ accordion: Wn,
1838
+ default: Jn
1839
1839
  }, _e = {
1840
1840
  Equal: "==",
1841
1841
  Inequal: "!=",
@@ -1849,37 +1849,37 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1849
1849
  Contain: "*",
1850
1850
  In: "in",
1851
1851
  NotIn: "not_in"
1852
- }, Qn = (o, e) => String(o) === String(e), ea = (o, e) => String(o) !== String(e), ta = (o, e) => o > e, la = (o, e) => o >= e, oa = (o, e) => o < e, na = (o, e) => o <= e, aa = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, sa = (o, e) => String(o).startsWith(String(e)), ra = (o, e) => String(o).endsWith(String(e)), ia = (o, e) => String(o).includes(String(e)), ua = (o, e) => Array.isArray(e) ? e.includes(o) : !1, da = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, Ot = (o, e) => {
1852
+ }, Xn = (o, e) => String(o) === String(e), Qn = (o, e) => String(o) !== String(e), ea = (o, e) => o > e, ta = (o, e) => o >= e, la = (o, e) => o < e, oa = (o, e) => o <= e, na = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, aa = (o, e) => String(o).startsWith(String(e)), sa = (o, e) => String(o).endsWith(String(e)), ra = (o, e) => String(o).includes(String(e)), ia = (o, e) => Array.isArray(e) ? e.includes(o) : !1, ua = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, Ft = (o, e) => {
1853
1853
  if (!e) return !0;
1854
1854
  switch (e?.[1]) {
1855
1855
  case _e.Equal:
1856
- return Qn(o, e?.[2]);
1856
+ return Xn(o, e?.[2]);
1857
1857
  case _e.Inequal:
1858
- return ea(o, e?.[2]);
1858
+ return Qn(o, e?.[2]);
1859
1859
  case _e.Higer:
1860
- return ta(o, e?.[2]);
1860
+ return ea(o, e?.[2]);
1861
1861
  case _e.HigerOrEqual:
1862
- return la(o, e?.[2]);
1862
+ return ta(o, e?.[2]);
1863
1863
  case _e.Lower:
1864
- return oa(o, e?.[2]);
1864
+ return la(o, e?.[2]);
1865
1865
  case _e.LowerOrEqual:
1866
- return na(o, e?.[2]);
1866
+ return oa(o, e?.[2]);
1867
1867
  case _e.Between:
1868
- return aa(o, e?.[2]);
1868
+ return na(o, e?.[2]);
1869
1869
  case _e.StartWith:
1870
- return sa(o, e?.[2]);
1870
+ return aa(o, e?.[2]);
1871
1871
  case _e.EndWith:
1872
- return ra(o, e?.[2]);
1872
+ return sa(o, e?.[2]);
1873
1873
  case _e.Contain:
1874
- return ia(o, e?.[2]);
1874
+ return ra(o, e?.[2]);
1875
1875
  case _e.In:
1876
- return ua(o, e?.[2]);
1876
+ return ia(o, e?.[2]);
1877
1877
  case _e.NotIn:
1878
- return da(o, e?.[2]);
1878
+ return ua(o, e?.[2]);
1879
1879
  default:
1880
1880
  return !0;
1881
1881
  }
1882
- }, ca = /* @__PURE__ */ G({
1882
+ }, da = /* @__PURE__ */ G({
1883
1883
  __name: "vs-input-container",
1884
1884
  props: {
1885
1885
  style: {
@@ -1904,12 +1904,12 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1904
1904
  }
1905
1905
  },
1906
1906
  setup(o) {
1907
- const e = o, t = Ae("values", w({})), s = Ae("form"), n = S(() => e.schema?.filter((u) => {
1907
+ const e = o, t = Ae("values", w({})), s = Ae("form"), n = B(() => e.schema?.filter((u) => {
1908
1908
  const c = u?.conditions;
1909
1909
  if (!c) return !0;
1910
1910
  const f = Array.isArray(c) ? c[0] : c, p = e.name ? t.value?.[e.name]?.[f] ?? t.value?.[f] : t.value?.[f];
1911
- return Ot(p, c);
1912
- })), a = S(() => Xn[e.view]), r = S(() => {
1911
+ return Ft(p, c);
1912
+ })), a = B(() => Yn[e.view]), r = B(() => {
1913
1913
  if (t.value || (t.value = {}), !e.name) return t.value;
1914
1914
  const u = t.value[e.name];
1915
1915
  if (u) return u;
@@ -1919,38 +1919,35 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1919
1919
  [e.name]: c
1920
1920
  }, c;
1921
1921
  });
1922
- return (u, c) => o.schema?.length ? (i(), me(Oe(a.value), {
1922
+ return (u, c) => o.schema?.length ? (i(), ve(Oe(a.value), {
1923
1923
  key: 0,
1924
1924
  title: o.title,
1925
1925
  style: be(o.style)
1926
1926
  }, {
1927
1927
  default: Ee(() => [
1928
- (i(!0), d(re, null, fe(n.value, (f) => (i(), me(Ut, Fe({
1928
+ (i(!0), d(re, null, pe(n.value, (f) => (i(), ve(Ot, Fe({
1929
1929
  key: f.name
1930
1930
  }, { ref_for: !0 }, f, {
1931
1931
  item: f,
1932
1932
  modelValue: r.value[f.name],
1933
1933
  "onUpdate:modelValue": (p) => r.value[f.name] = p,
1934
1934
  style: o.style,
1935
- error: te(s)?.errors?.[f.name]
1935
+ error: le(s)?.errors?.[f.name]
1936
1936
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1937
1937
  ]),
1938
1938
  _: 1
1939
- }, 8, ["title", "style"])) : U("", !0);
1939
+ }, 8, ["title", "style"])) : D("", !0);
1940
1940
  }
1941
- }), pa = ["aria-expanded", "data-focus"], fa = {
1941
+ }), ca = ["aria-expanded", "data-focus"], pa = {
1942
1942
  key: 0,
1943
1943
  class: "flex flex-wrap items-center gap-1 max-h-20 overflow-y-auto min-w-0 flex-1"
1944
- }, va = { class: "flex items-center min-w-0" }, ma = ["title"], ha = ["innerHTML"], ga = ["onClick"], ba = { class: "flex-1 min-w-[2px]" }, ya = ["placeholder"], xa = ["title"], wa = ["innerHTML"], ka = {
1944
+ }, fa = { class: "flex items-center min-w-0" }, va = ["title"], ma = ["innerHTML"], ha = ["onClick"], ga = { class: "flex-1 min-w-[2px]" }, ba = ["placeholder"], ya = ["title"], xa = ["innerHTML"], wa = {
1945
1945
  key: 2,
1946
- class: "text-gray-500 truncate"
1947
- }, _a = {
1948
- key: 3,
1949
1946
  class: "flex-1 min-w-[2px]"
1950
- }, $a = ["placeholder"], Ca = { class: "flex items-center shrink-0" }, Va = ["disabled"], Ma = ["disabled", "title"], La = ["aria-disabled", "onClick"], Sa = ["innerHTML"], Ba = {
1947
+ }, ka = ["placeholder"], _a = { class: "flex items-center shrink-0" }, $a = ["disabled"], Ca = ["disabled", "title"], Va = ["aria-disabled", "onClick"], Ma = ["innerHTML"], La = {
1951
1948
  key: 1,
1952
1949
  class: "px-3 py-2 text-center text-gray-500"
1953
- }, ja = ["disabled"], Mt = /* @__PURE__ */ G({
1950
+ }, Sa = ["disabled"], Vt = /* @__PURE__ */ G({
1954
1951
  __name: "vs-input-select",
1955
1952
  props: {
1956
1953
  multiple: { type: Boolean, default: !1 },
@@ -1978,24 +1975,26 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1978
1975
  },
1979
1976
  emits: ["change", "update:modelValue"],
1980
1977
  setup(o, { emit: e }) {
1981
- const t = o, s = e, n = S(() => t.multiple), a = S(() => t.disabled);
1978
+ const t = o, s = e, n = B(() => t.multiple), a = B(() => t.disabled);
1982
1979
  Ce(t.style);
1983
- const r = S({
1980
+ const r = B({
1984
1981
  get: () => t.modelValue,
1985
1982
  set: (g) => s("update:modelValue", g)
1986
1983
  });
1987
1984
  !r.value && t.defaultValue && (r.value = t.defaultValue);
1988
- const u = w(null), c = w(null), f = w(null), p = w(null), v = w(!1), k = w(!1), m = w(null), I = w([]), $ = w(-1), A = w([]), E = w(""), O = w(null), C = w("bottom"), h = w({}), x = w([]), B = S(() => {
1985
+ const u = w(null), c = w(null), f = w(null), p = w(null), v = w(!1), k = w(!1), m = w(null), I = w([]), $ = w(-1), A = w([]), E = w(""), O = w(null), C = w("bottom"), h = w({}), x = w([]), j = B(() => {
1989
1986
  if (!x.value.length) return [];
1990
1987
  const g = I.value, y = new Map(g.map((_) => [_.id?.toString(), _]));
1991
1988
  return x.value.map((_) => y.get(_?.toString())).filter((_) => !!_);
1992
- }), V = S(() => t.placeholder || "Select..."), P = S(() => H(m.value)), ee = S(() => n.value ? !x.value.length && E.value === "" : !P.value && E.value === ""), Q = S(() => a.value ? !1 : n.value ? x.value.length > 0 : !!r.value), j = (g) => n.value ? x.value.some((y) => y?.toString() === g?.toString()) : r.value?.toString() === g?.toString(), q = S(() => {
1989
+ }), M = B(() => t.placeholder || "Select..."), P = B(() => z(m.value));
1990
+ B(() => n.value ? !x.value.length && E.value === "" : !P.value && E.value === "");
1991
+ const te = B(() => a.value ? !1 : n.value ? x.value.length > 0 : !!r.value), X = (g) => n.value ? x.value.some((y) => y?.toString() === g?.toString()) : r.value?.toString() === g?.toString(), S = B(() => {
1993
1992
  let g = I.value ?? [];
1994
1993
  if (!t.data && E.value.trim() !== "") {
1995
1994
  const y = E.value.toLowerCase();
1996
1995
  g = g.filter((_) => {
1997
- const K = H(_).toLowerCase(), se = _.text?.toLowerCase?.() || "";
1998
- return K.includes(y) || se.includes(y);
1996
+ const q = z(_).toLowerCase(), se = _.text?.toLowerCase?.() || "";
1997
+ return q.includes(y) || se.includes(y);
1999
1998
  });
2000
1999
  }
2001
2000
  if (n.value && x.value.length) {
@@ -2003,228 +2002,228 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2003
2002
  g = g.filter((_) => !y.has(_.id?.toString()));
2004
2003
  }
2005
2004
  return g;
2006
- }), X = Ae("values"), Z = /\{\{\s*([^}]+?)\s*\}\}/g, D = (g) => (g ? String(g) : "").replace(/<[^>]*>/g, "").trim(), F = S(() => t.slot ?? t?.optionTemplate ?? ""), z = (g) => {
2005
+ }), W = Ae("values"), Q = /\{\{\s*([^}]+?)\s*\}\}/g, Z = (g) => (g ? String(g) : "").replace(/<[^>]*>/g, "").trim(), U = B(() => t.slot ?? t?.optionTemplate ?? ""), F = (g) => {
2007
2006
  if (!g) return "";
2008
- const y = F.value;
2009
- return y ? y.replace(Z, (_, K) => {
2010
- const se = K.trim(), ve = g[se];
2011
- return ve != null ? String(ve) : "";
2007
+ const y = U.value;
2008
+ return y ? y.replace(Q, (_, q) => {
2009
+ const se = q.trim(), fe = g[se];
2010
+ return fe != null ? String(fe) : "";
2012
2011
  }) : g.text ?? "";
2013
- }, H = (g) => {
2012
+ }, z = (g) => {
2014
2013
  if (!g) return "";
2015
- if (!F.value) return g.text ?? "";
2016
- const _ = z(g);
2017
- return D(_) || g.text || "";
2018
- }, le = (g) => {
2019
- t.set && X?.value && Object.entries(t.set).forEach(([y, _]) => {
2014
+ if (!U.value) return g.text ?? "";
2015
+ const _ = F(g);
2016
+ return Z(_) || g.text || "";
2017
+ }, H = (g) => {
2018
+ t.set && W?.value && Object.entries(t.set).forEach(([y, _]) => {
2020
2019
  if (!y) return;
2021
- const K = g ? g[_] : null;
2022
- X.value[y] = K ?? null;
2020
+ const q = g ? g[_] : null;
2021
+ W.value[y] = q ?? null;
2023
2022
  });
2024
- }, pe = S(() => t.parent ? X?.value?.[t.parent]?.toString() ?? null : null), we = async (g) => {
2023
+ }, ee = B(() => t.parent ? W?.value?.[t.parent]?.toString() ?? null : null), ge = async (g) => {
2025
2024
  if (!t.data) {
2026
2025
  let y = t.options ?? [];
2027
2026
  if (g?.trim()) {
2028
2027
  const _ = g.toLowerCase();
2029
- y = y.filter((K) => {
2030
- const se = H(K).toLowerCase(), ve = K.text?.toLowerCase?.() || "";
2031
- return se.includes(_) || ve.includes(_);
2028
+ y = y.filter((q) => {
2029
+ const se = z(q).toLowerCase(), fe = q.text?.toLowerCase?.() || "";
2030
+ return se.includes(_) || fe.includes(_);
2032
2031
  });
2033
2032
  }
2034
2033
  return y;
2035
2034
  }
2036
2035
  try {
2037
- const y = t.host ?? "", _ = t.prefix ?? "api", K = t.api ?? `/${_}/suggest/${t.data}`, se = `${y}${K}`, ve = new URLSearchParams();
2038
- return ve.set("json", "1"), g && ve.set("key", g), pe.value !== void 0 && pe.value !== null && pe.value !== "" && ve.set("parent", pe.value), (await fetch(`${se}?${ve.toString()}`).then((ze) => ze.json()))?.data ?? [];
2036
+ const y = t.host ?? "", _ = t.prefix ?? "api", q = t.api ?? `/${_}/suggest/${t.data}`, se = `${y}${q}`, fe = new URLSearchParams();
2037
+ return fe.set("json", "1"), g && fe.set("key", g), ee.value !== void 0 && ee.value !== null && ee.value !== "" && fe.set("parent", ee.value), (await fetch(`${se}?${fe.toString()}`).then((ze) => ze.json()))?.data ?? [];
2039
2038
  } catch {
2040
2039
  return [];
2041
2040
  }
2042
- }, Ue = async () => {
2043
- t.data ? I.value = await we(E.value) : I.value = t.options ? [...t.options] : [];
2044
- }, We = async (g) => {
2041
+ }, we = async () => {
2042
+ t.data ? I.value = await ge(E.value) : I.value = t.options ? [...t.options] : [];
2043
+ }, Ke = async (g) => {
2045
2044
  if (g == null) return null;
2046
2045
  const y = I.value?.find((_) => _?.id?.toString() === String(g));
2047
2046
  if (y) return y;
2048
2047
  if (t.data)
2049
2048
  try {
2050
- const _ = t.host ?? "", K = t.prefix ?? "api", se = t.api ?? `/${K}/suggest/${t.data}`, ve = `${_}${se}`, ke = new URLSearchParams();
2051
- return ke.set("json", "1"), ke.set("val", String(g)), pe.value !== void 0 && pe.value !== null && pe.value !== "" && ke.set("parent", pe.value), ((await fetch(`${ve}?${ke.toString()}`).then((Pe) => Pe.json()))?.data ?? [])?.[0] ?? null;
2049
+ const _ = t.host ?? "", q = t.prefix ?? "api", se = t.api ?? `/${q}/suggest/${t.data}`, fe = `${_}${se}`, ke = new URLSearchParams();
2050
+ return ke.set("json", "1"), ke.set("val", String(g)), ee.value !== void 0 && ee.value !== null && ee.value !== "" && ke.set("parent", ee.value), ((await fetch(`${fe}?${ke.toString()}`).then((Re) => Re.json()))?.data ?? [])?.[0] ?? null;
2052
2051
  } catch {
2053
2052
  return null;
2054
2053
  }
2055
2054
  return null;
2056
- }, lt = async (g) => {
2057
- const y = new Set(I.value.map((K) => K.id?.toString())), _ = g.filter((K) => !y.has(K?.toString()));
2058
- _.length && await _.reduce(async (K, se) => {
2059
- await K;
2060
- const ve = await We(se);
2061
- ve && I.value.push(ve);
2055
+ }, et = async (g) => {
2056
+ const y = new Set(I.value.map((q) => q.id?.toString())), _ = g.filter((q) => !y.has(q?.toString()));
2057
+ _.length && await _.reduce(async (q, se) => {
2058
+ await q;
2059
+ const fe = await Ke(se);
2060
+ fe && I.value.push(fe);
2062
2061
  }, Promise.resolve());
2063
- }, De = async () => {
2064
- a.value || (v.value = !0, await Ue(), await je(() => {
2065
- Ve(), O.value?.focus(), q.value.length ? $.value = 0 : $.value = -1;
2062
+ }, Ue = async () => {
2063
+ a.value || (v.value = !0, await we(), await je(() => {
2064
+ Ve(), O.value?.focus(), S.value.length ? $.value = 0 : $.value = -1;
2066
2065
  }));
2067
- }, Se = () => {
2066
+ }, Le = () => {
2068
2067
  v.value = !1, $.value = -1;
2069
- }, Te = async (g) => {
2068
+ }, tt = async (g) => {
2070
2069
  if (a.value) return;
2071
- !v.value ? await De() : Se();
2072
- }, b = async () => {
2073
- v.value ? O.value?.focus() : await De();
2074
- }, M = () => {
2075
- n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null)), le(null), E.value = "", je(() => O.value?.focus());
2076
- }, J = (g) => {
2070
+ !v.value ? await Ue() : Le();
2071
+ }, Te = async () => {
2072
+ v.value ? O.value?.focus() : await Ue();
2073
+ }, b = () => {
2074
+ n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null)), H(null), E.value = "", je(() => O.value?.focus());
2075
+ }, V = (g) => {
2077
2076
  n.value && (x.value = x.value.filter((y) => y?.toString() !== g?.toString()), r.value = [...x.value], s("change", r.value), je(() => O.value?.focus()));
2077
+ }, J = (g) => {
2078
+ n.value ? (X(g.id) || (x.value = [...x.value, g.id], r.value = [...x.value], s("change", r.value)), E.value = "", je(() => {
2079
+ O.value?.focus(), $.value = Math.min($.value, S.value.length - 1);
2080
+ }), H(null)) : (m.value = g, r.value = g.id, s("change", r.value), E.value = "", Le(), H(g));
2078
2081
  }, N = (g) => {
2079
- n.value ? (j(g.id) || (x.value = [...x.value, g.id], r.value = [...x.value], s("change", r.value)), E.value = "", je(() => {
2080
- O.value?.focus(), $.value = Math.min($.value, q.value.length - 1);
2081
- }), le(null)) : (m.value = g, r.value = g.id, s("change", r.value), E.value = "", Se(), le(g));
2082
- }, ae = (g) => {
2083
- j(g.id) || N(g);
2082
+ X(g.id) || J(g);
2084
2083
  }, oe = (g, y) => {
2085
2084
  if (!g || !y) return;
2086
- const _ = g.offsetTop, K = _ + g.offsetHeight, se = y.scrollTop, ve = se + y.clientHeight;
2085
+ const _ = g.offsetTop, q = _ + g.offsetHeight, se = y.scrollTop, fe = se + y.clientHeight;
2087
2086
  let ke = y.scrollTop;
2088
- _ < se ? ke = _ - 80 : K > ve && (ke = K - y.clientHeight + 4);
2087
+ _ < se ? ke = _ - 80 : q > fe && (ke = q - y.clientHeight + 4);
2089
2088
  const ze = y;
2090
2089
  ze.scrollTop = ke;
2091
- }, Me = (g) => {
2090
+ }, ae = (g) => {
2092
2091
  let y = g.parentElement;
2093
2092
  for (; y; ) {
2094
2093
  if (y.classList.contains("ui-dialog__content"))
2095
2094
  return y;
2096
- const _ = window.getComputedStyle(y), K = _.overflow + _.overflowY + _.overflowX;
2097
- if (K.includes("auto") || K.includes("scroll") || y === document.body || y === document.documentElement)
2095
+ const _ = window.getComputedStyle(y), q = _.overflow + _.overflowY + _.overflowX;
2096
+ if (q.includes("auto") || q.includes("scroll") || y === document.body || y === document.documentElement)
2098
2097
  return y;
2099
2098
  y = y.parentElement;
2100
2099
  }
2101
2100
  return document.body;
2102
2101
  }, Ve = () => {
2103
2102
  if (!c.value) return;
2104
- const g = c.value.getBoundingClientRect(), y = window.innerHeight || document.documentElement.clientHeight, _ = window.innerWidth || document.documentElement.clientWidth, K = 8, se = 8, ve = t.maxHeight || 300, ke = y - g.bottom - se - K, ze = g.top - se - K, Re = ke >= ze, Pe = Math.max(_ - K * 2, 0);
2105
- let { width: He } = g;
2106
- Pe > 0 && He > Pe && (He = Pe);
2107
- let { left: Ne } = g;
2108
- Ne + He + K > _ && (Ne = _ - He - K), Ne = Math.max(Ne, K);
2109
- const Gt = Math.min(
2110
- ve,
2111
- Math.max(Re ? ke : ze, 50)
2103
+ const g = c.value.getBoundingClientRect(), y = window.innerHeight || document.documentElement.clientHeight, _ = window.innerWidth || document.documentElement.clientWidth, q = 8, se = 8, fe = t.maxHeight || 300, ke = y - g.bottom - se - q, ze = g.top - se - q, De = ke >= ze, Re = Math.max(_ - q * 2, 0);
2104
+ let { width: Pe } = g;
2105
+ Re > 0 && Pe > Re && (Pe = Re);
2106
+ let { left: He } = g;
2107
+ He + Pe + q > _ && (He = _ - Pe - q), He = Math.max(He, q);
2108
+ const Nt = Math.min(
2109
+ fe,
2110
+ Math.max(De ? ke : ze, 50)
2112
2111
  );
2113
- C.value = Re ? "bottom" : "top", h.value = {
2112
+ C.value = De ? "bottom" : "top", h.value = {
2114
2113
  position: "fixed",
2115
- left: `${Ne}px`,
2116
- width: `${He}px`,
2114
+ left: `${He}px`,
2115
+ width: `${Pe}px`,
2117
2116
  minWidth: "300px",
2118
- maxHeight: `${Gt}px`,
2119
- transform: Re ? "none" : "translateY(-100%)",
2120
- top: Re ? `${g.bottom + se}px` : `${g.top - se}px`
2117
+ maxHeight: `${Nt}px`,
2118
+ transform: De ? "none" : "translateY(-100%)",
2119
+ top: De ? `${g.bottom + se}px` : `${g.top - se}px`
2121
2120
  };
2122
2121
  }, Ie = async (g) => {
2123
- a.value || !v.value && (g.key === "ArrowDown" || g.key === "ArrowUp") && (g.preventDefault(), await De());
2124
- }, Be = (g) => {
2122
+ a.value || !v.value && (g.key === "ArrowDown" || g.key === "ArrowUp") && (g.preventDefault(), await Ue());
2123
+ }, Se = (g) => {
2125
2124
  if (!v.value) return;
2126
2125
  const { key: y } = g;
2127
2126
  if (y === "ArrowDown")
2128
- g.preventDefault(), $.value + 1 < q.value.length && ($.value += 1, oe(A.value[$.value], f.value));
2127
+ g.preventDefault(), $.value + 1 < S.value.length && ($.value += 1, oe(A.value[$.value], f.value));
2129
2128
  else if (y === "ArrowUp")
2130
2129
  g.preventDefault(), $.value > 0 && ($.value -= 1, oe(A.value[$.value], f.value));
2131
2130
  else if (y === "Enter") {
2132
2131
  g.preventDefault();
2133
- const _ = q.value[$.value];
2134
- _ && N(_), O.value?.blur();
2135
- } else y === "Escape" ? (g.preventDefault(), Se()) : y === "Backspace" ? n.value && E.value === "" && x.value.length && (x.value = x.value.slice(0, -1), r.value = [...x.value], s("change", r.value)) : y === "Home" ? ($.value = 0, oe(A.value[0], f.value)) : y === "End" ? ($.value = q.value.length - 1, oe(A.value[$.value], f.value)) : y === "Tab" && Se();
2136
- }, dt = () => {
2132
+ const _ = S.value[$.value];
2133
+ _ && J(_), O.value?.blur();
2134
+ } else y === "Escape" ? (g.preventDefault(), Le()) : y === "Backspace" ? n.value && E.value === "" && x.value.length && (x.value = x.value.slice(0, -1), r.value = [...x.value], s("change", r.value)) : y === "Home" ? ($.value = 0, oe(A.value[0], f.value)) : y === "End" ? ($.value = S.value.length - 1, oe(A.value[$.value], f.value)) : y === "Tab" && Le();
2135
+ }, Be = () => {
2137
2136
  a.value || (k.value = !0);
2138
- }, ct = () => {
2137
+ }, dt = () => {
2139
2138
  k.value = !1, E.value = "";
2139
+ }, ct = (g) => {
2140
+ g.key === "Escape" && v.value && Le();
2140
2141
  }, pt = (g) => {
2141
- g.key === "Escape" && v.value && Se();
2142
- }, ft = (g) => {
2143
2142
  const y = g.target;
2144
- u.value?.contains(y) || p.value?.contains(y) || Se();
2145
- }, vt = (g) => {
2143
+ u.value?.contains(y) || p.value?.contains(y) || Le();
2144
+ }, ft = (g) => {
2146
2145
  v.value && f.value && !f.value.contains(g.target) && Ve();
2147
- }, mt = () => {
2146
+ }, vt = () => {
2148
2147
  v.value && Ve();
2149
- }, ht = () => {
2148
+ }, mt = () => {
2150
2149
  v.value && Ve();
2151
2150
  };
2152
2151
  ue(() => t.options, (g) => {
2153
- g?.length && (I.value = [...g], Ze());
2152
+ g?.length && (I.value = [...g], We());
2154
2153
  }, { immediate: !0 });
2155
- async function Ze() {
2154
+ async function We() {
2156
2155
  if (n.value)
2157
- Array.isArray(r.value) ? x.value = [...r.value] : (x.value = r.value == null ? [] : [r.value], r.value = [...x.value]), t.data && x.value.length && (await lt(x.value), await je());
2156
+ Array.isArray(r.value) ? x.value = [...r.value] : (x.value = r.value == null ? [] : [r.value], r.value = [...x.value]), t.data && x.value.length && (await et(x.value), await je());
2158
2157
  else {
2159
2158
  if (Array.isArray(r.value)) {
2160
2159
  const g = r.value[0] ?? null;
2161
2160
  r.value = g ?? null;
2162
2161
  }
2163
- r.value != null && (m.value = await We(r.value)), le(m.value ?? null);
2162
+ r.value != null && (m.value = await Ke(r.value)), H(m.value ?? null);
2164
2163
  }
2165
2164
  }
2166
2165
  ue(r, () => {
2167
- Ze();
2166
+ We();
2168
2167
  }), ye(async () => {
2169
- addEventListener("keydown", pt), addEventListener("scroll", vt, !0), addEventListener("resize", mt), document.addEventListener("click", ft, !0), c.value && Me(c.value).addEventListener("scroll", ht, !0), t.options?.length && !t.data ? I.value = [...t.options] : t.data && (I.value = await we("")), await Ze(), yt.value = !1;
2170
- }), Qe(() => {
2171
- removeEventListener("keydown", pt), removeEventListener("scroll", vt, !0), removeEventListener("resize", mt), document.removeEventListener("click", ft, !0), c.value && Me(c.value).removeEventListener("scroll", ht, !0);
2168
+ addEventListener("keydown", ct), addEventListener("scroll", ft, !0), addEventListener("resize", vt), document.addEventListener("click", pt, !0), c.value && ae(c.value).addEventListener("scroll", mt, !0), t.options?.length && !t.data ? I.value = [...t.options] : t.data && (I.value = await ge("")), await We(), bt.value = !1;
2169
+ }), Xe(() => {
2170
+ removeEventListener("keydown", ct), removeEventListener("scroll", ft, !0), removeEventListener("resize", vt), document.removeEventListener("click", pt, !0), c.value && ae(c.value).removeEventListener("scroll", mt, !0);
2172
2171
  });
2173
- const Je = w(!1), ot = w({}), gt = w([]), bt = w(null);
2174
- async function Rt() {
2175
- if (!t.add?.token || bt?.value.validate())
2172
+ const Ze = w(!1), lt = w({}), ht = w([]), gt = w(null);
2173
+ async function Dt() {
2174
+ if (!t.add?.token || gt?.value.validate())
2176
2175
  return;
2177
2176
  const y = t.add.api ?? `/api/table/${t.add.token}`, { id: _ } = await fetch(y, {
2178
2177
  method: "POST",
2179
2178
  headers: { "Content-Type": "application/json" },
2180
- body: JSON.stringify(ot.value)
2181
- }).then((K) => K.json());
2179
+ body: JSON.stringify(lt.value)
2180
+ }).then((q) => q.json());
2182
2181
  if (!t.options?.length && t.data) {
2183
- const { data: K } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${_}`).then((se) => se.json());
2184
- m.value = K[0], I.value.push(K[0]), r.value = _;
2182
+ const { data: q } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${_}`).then((se) => se.json());
2183
+ m.value = q[0], I.value.push(q[0]), r.value = _;
2185
2184
  }
2186
- Je.value = !1, ce({ title: "Success!", message: "Object created." });
2185
+ Ze.value = !1, ce({ title: "Success!", message: "Object created." });
2187
2186
  }
2188
- async function Pt() {
2187
+ async function Rt() {
2189
2188
  if (!t.add) return null;
2190
2189
  const g = await fetch(`/api/template/form/${t.add.form}`).then((y) => y.json());
2191
- return gt.value = g.schema, Je.value = !0, null;
2190
+ return ht.value = g.schema, Ze.value = !0, null;
2192
2191
  }
2193
- function Ht(g, y = 200) {
2192
+ function Pt(g, y = 200) {
2194
2193
  let _;
2195
- return (...K) => {
2196
- _ && clearTimeout(_), _ = window.setTimeout(() => g(...K), y);
2194
+ return (...q) => {
2195
+ _ && clearTimeout(_), _ = window.setTimeout(() => g(...q), y);
2197
2196
  };
2198
2197
  }
2199
- const Nt = Ht(async (g) => {
2200
- I.value = await we(g);
2198
+ const Ht = Pt(async (g) => {
2199
+ I.value = await ge(g);
2201
2200
  }, 200);
2202
2201
  ue(E, (g) => {
2203
- t.data && Nt(g.trim());
2202
+ t.data && Ht(g.trim());
2204
2203
  }), ue(() => t.options, (g) => {
2205
- !t.data && g?.length && (I.value = [...g], Ze());
2204
+ !t.data && g?.length && (I.value = [...g], We());
2206
2205
  }, { immediate: !0 }), ue(() => t.parent ?? t.parentValue, () => {
2207
- t.data && Ue();
2206
+ t.data && we();
2208
2207
  });
2209
- const yt = w(!0);
2210
- return ue(pe, async () => {
2211
- t.data && (yt.value || (n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null))), await Ue());
2208
+ const bt = w(!0);
2209
+ return ue(ee, async () => {
2210
+ t.data && (bt.value || (n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null))), await we());
2212
2211
  }), (g, y) => (i(), d(re, null, [
2213
- R(te(zt), {
2214
- visible: Je.value,
2215
- "onUpdate:visible": y[1] || (y[1] = (_) => Je.value = _),
2212
+ R(le(It), {
2213
+ visible: Ze.value,
2214
+ "onUpdate:visible": y[1] || (y[1] = (_) => Ze.value = _),
2216
2215
  title: "Додати",
2217
2216
  buttonText: "Додати",
2218
- onDone: Rt,
2217
+ onDone: Dt,
2219
2218
  teleport: g.teleport
2220
2219
  }, {
2221
2220
  default: Ee(() => [
2222
- R(Ke, {
2223
- schema: gt.value,
2224
- modelValue: ot.value,
2225
- "onUpdate:modelValue": y[0] || (y[0] = (_) => ot.value = _),
2221
+ R(qe, {
2222
+ schema: ht.value,
2223
+ modelValue: lt.value,
2224
+ "onUpdate:modelValue": y[0] || (y[0] = (_) => lt.value = _),
2226
2225
  ref_key: "addForm",
2227
- ref: bt
2226
+ ref: gt
2228
2227
  }, null, 8, ["schema", "modelValue"])
2229
2228
  ]),
2230
2229
  _: 1
@@ -2261,7 +2260,7 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2261
2260
  "aria-expanded": v.value,
2262
2261
  "aria-haspopup": "listbox",
2263
2262
  onKeydown: Ie,
2264
- onClick: b,
2263
+ onClick: Te,
2265
2264
  "data-focus": v.value || k.value ? "true" : "false"
2266
2265
  }, [
2267
2266
  l("div", {
@@ -2269,33 +2268,33 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2269
2268
  ref_key: "triggerRef",
2270
2269
  ref: c
2271
2270
  }, [
2272
- n.value ? (i(), d("div", fa, [
2273
- (i(!0), d(re, null, fe(B.value, (_) => (i(), d("div", {
2271
+ n.value ? (i(), d("div", pa, [
2272
+ (i(!0), d(re, null, pe(j.value, (_) => (i(), d("div", {
2274
2273
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",
2275
2274
  key: _.id
2276
2275
  }, [
2277
- l("div", va, [
2276
+ l("div", fa, [
2278
2277
  _?.color ? (i(), d("span", {
2279
2278
  key: 0,
2280
2279
  class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
2281
2280
  style: be({ backgroundColor: _?.color })
2282
- }, null, 4)) : U("", !0),
2281
+ }, null, 4)) : D("", !0),
2283
2282
  l("div", {
2284
2283
  class: "truncate text-gray-900 overflow-hidden max-w-[200px] px-0.5 py-[2px] pl-1.5",
2285
- title: H(_)
2284
+ title: z(_)
2286
2285
  }, [
2287
- F.value ? (i(), d("span", {
2286
+ U.value ? (i(), d("span", {
2288
2287
  key: 0,
2289
- innerHTML: z(_)
2290
- }, null, 8, ha)) : (i(), d(re, { key: 1 }, [
2291
- ge(W(_.text), 1)
2288
+ innerHTML: F(_)
2289
+ }, null, 8, ma)) : (i(), d(re, { key: 1 }, [
2290
+ he(K(_.text), 1)
2292
2291
  ], 64))
2293
- ], 8, ma)
2292
+ ], 8, va)
2294
2293
  ]),
2295
2294
  l("div", {
2296
2295
  role: "button",
2297
2296
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b] flex-shrink-0",
2298
- onClick: $e((K) => J(_.id), ["stop"])
2297
+ onClick: $e((q) => V(_.id), ["stop"])
2299
2298
  }, y[6] || (y[6] = [
2300
2299
  l("svg", {
2301
2300
  height: "14",
@@ -2307,9 +2306,9 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2307
2306
  }, [
2308
2307
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2309
2308
  ], -1)
2310
- ]), 8, ga)
2309
+ ]), 8, ha)
2311
2310
  ]))), 128)),
2312
- l("div", ba, [
2311
+ l("div", ga, [
2313
2312
  !a.value && g.search ? ne((i(), d("input", {
2314
2313
  key: 0,
2315
2314
  ref_key: "inputRef",
@@ -2322,14 +2321,14 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2322
2321
  type: "text",
2323
2322
  tabindex: "0",
2324
2323
  "aria-autocomplete": "list",
2325
- placeholder: x.value.length ? " " : V.value,
2324
+ placeholder: x.value.length ? " " : M.value,
2326
2325
  "onUpdate:modelValue": y[2] || (y[2] = (_) => E.value = _),
2327
- onFocus: dt,
2328
- onBlur: ct,
2329
- onKeydown: Be
2330
- }, null, 40, ya)), [
2331
- [he, E.value]
2332
- ]) : U("", !0)
2326
+ onFocus: Be,
2327
+ onBlur: dt,
2328
+ onKeydown: Se
2329
+ }, null, 40, ba)), [
2330
+ [me, E.value]
2331
+ ]) : D("", !0)
2333
2332
  ])
2334
2333
  ])) : !n.value && !k.value && P.value && E.value === "" ? (i(), d("div", {
2335
2334
  key: 1,
@@ -2340,18 +2339,17 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2340
2339
  key: 0,
2341
2340
  class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2342
2341
  style: be({ backgroundColor: m.value?.color })
2343
- }, null, 4)) : U("", !0),
2344
- F.value ? (i(), d("span", {
2342
+ }, null, 4)) : D("", !0),
2343
+ U.value ? (i(), d("span", {
2345
2344
  key: 1,
2346
2345
  class: T({ "pl-5": m.value?.color }),
2347
- innerHTML: z(m.value)
2348
- }, null, 10, wa)) : (i(), d("span", {
2346
+ innerHTML: F(m.value)
2347
+ }, null, 10, xa)) : (i(), d("span", {
2349
2348
  key: 2,
2350
2349
  class: T({ "pl-5": m.value?.color })
2351
- }, W(m.value?.text), 3))
2352
- ], 8, xa)) : U("", !0),
2353
- ee.value ? (i(), d("div", ka, W(V.value), 1)) : U("", !0),
2354
- n.value ? U("", !0) : (i(), d("div", _a, [
2350
+ }, K(m.value?.text), 3))
2351
+ ], 8, ya)) : D("", !0),
2352
+ n.value ? D("", !0) : (i(), d("div", wa, [
2355
2353
  !a.value && g.search ? ne((i(), d("input", {
2356
2354
  key: 0,
2357
2355
  ref_key: "inputRef",
@@ -2366,22 +2364,22 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2366
2364
  "aria-autocomplete": "list",
2367
2365
  placeholder: k.value && !E.value?.length && P.value || " ",
2368
2366
  "onUpdate:modelValue": y[3] || (y[3] = (_) => E.value = _),
2369
- onFocus: dt,
2370
- onBlur: ct,
2371
- onKeydown: Be
2372
- }, null, 40, $a)), [
2373
- [he, E.value]
2374
- ]) : U("", !0)
2367
+ onFocus: Be,
2368
+ onBlur: dt,
2369
+ onKeydown: Se
2370
+ }, null, 40, ka)), [
2371
+ [me, E.value]
2372
+ ]) : D("", !0)
2375
2373
  ]))
2376
2374
  ], 512),
2377
- l("div", Ca, [
2378
- Q.value ? (i(), d("button", {
2375
+ l("div", _a, [
2376
+ te.value ? (i(), d("button", {
2379
2377
  key: 0,
2380
2378
  type: "button",
2381
2379
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2382
2380
  "aria-hidden": "true",
2383
2381
  disabled: a.value,
2384
- onClick: $e(M, ["stop"])
2382
+ onClick: $e(b, ["stop"])
2385
2383
  }, y[7] || (y[7] = [
2386
2384
  l("svg", {
2387
2385
  height: "20",
@@ -2391,14 +2389,14 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2391
2389
  }, [
2392
2390
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2393
2391
  ], -1)
2394
- ]), 8, Va)) : U("", !0),
2392
+ ]), 8, $a)) : D("", !0),
2395
2393
  y[9] || (y[9] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2396
2394
  l("button", {
2397
2395
  type: "button",
2398
2396
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2399
2397
  "aria-hidden": "true",
2400
2398
  disabled: a.value,
2401
- onClick: y[4] || (y[4] = $e((_) => Te(), ["stop"])),
2399
+ onClick: y[4] || (y[4] = $e((_) => tt(), ["stop"])),
2402
2400
  title: v.value ? "Закрити список" : "Відкрити список"
2403
2401
  }, y[8] || (y[8] = [
2404
2402
  l("svg", {
@@ -2409,10 +2407,10 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2409
2407
  }, [
2410
2408
  l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
2411
2409
  ], -1)
2412
- ]), 8, Ma)
2410
+ ]), 8, Ca)
2413
2411
  ])
2414
- ], 42, pa),
2415
- (i(), me(It, { to: "body" }, [
2412
+ ], 42, ca),
2413
+ (i(), ve(Et, { to: "body" }, [
2416
2414
  v.value ? (i(), d("div", {
2417
2415
  key: 0,
2418
2416
  ref_key: "dropdownRef",
@@ -2429,62 +2427,62 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2429
2427
  ref_key: "listRef",
2430
2428
  ref: f
2431
2429
  }, [
2432
- q.value.length ? (i(!0), d(re, { key: 0 }, fe(q.value, (_, K) => (i(), d("div", {
2430
+ S.value.length ? (i(!0), d(re, { key: 0 }, pe(S.value, (_, q) => (i(), d("div", {
2433
2431
  key: _.id,
2434
2432
  ref_for: !0,
2435
- ref: (se) => A.value[K] = se,
2433
+ ref: (se) => A.value[q] = se,
2436
2434
  class: T([
2437
2435
  "flex px-3 py-2 cursor-default select-none text-gray-900 ",
2438
- j(_.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
2439
- $.value === K && !j(_.id) ? "bg-blue-100" : ""
2436
+ X(_.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
2437
+ $.value === q && !X(_.id) ? "bg-blue-100" : ""
2440
2438
  ]),
2441
- "aria-disabled": j(_.id) ? "true" : "false",
2439
+ "aria-disabled": X(_.id) ? "true" : "false",
2442
2440
  role: "option",
2443
2441
  tabindex: "-1",
2444
- onClick: (se) => ae(_)
2442
+ onClick: (se) => N(_)
2445
2443
  }, [
2446
2444
  _?.color ? (i(), d("span", {
2447
2445
  key: 0,
2448
2446
  class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2449
2447
  style: be({ backgroundColor: _?.color })
2450
- }, null, 4)) : U("", !0),
2448
+ }, null, 4)) : D("", !0),
2451
2449
  l("div", {
2452
2450
  class: T([
2453
2451
  "leading-[19px]",
2454
2452
  $.value === _.id ? "text-white" : "",
2455
2453
  // active style like react-select
2456
- ($.value === K, "")
2454
+ ($.value === q, "")
2457
2455
  ])
2458
2456
  }, [
2459
- F.value ? (i(), d("span", {
2457
+ U.value ? (i(), d("span", {
2460
2458
  key: 0,
2461
- innerHTML: z(_)
2462
- }, null, 8, Sa)) : (i(), d(re, { key: 1 }, [
2463
- ge(W(_.text), 1)
2459
+ innerHTML: F(_)
2460
+ }, null, 8, Ma)) : (i(), d(re, { key: 1 }, [
2461
+ he(K(_.text), 1)
2464
2462
  ], 64))
2465
2463
  ], 2)
2466
- ], 10, La))), 128)) : (i(), d("div", Ba, " No options "))
2464
+ ], 10, Va))), 128)) : (i(), d("div", La, " No options "))
2467
2465
  ], 4)
2468
- ], 4)) : U("", !0)
2466
+ ], 4)) : D("", !0)
2469
2467
  ]))
2470
2468
  ], 2),
2471
2469
  t.add ? (i(), d("button", {
2472
2470
  key: 0,
2473
- onClick: Pt,
2471
+ onClick: Rt,
2474
2472
  class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
2475
2473
  disabled: a.value,
2476
2474
  type: "button"
2477
2475
  }, [
2478
- R(qe, {
2476
+ R(Ge, {
2479
2477
  width: "16",
2480
2478
  height: "16"
2481
2479
  }),
2482
2480
  y[12] || (y[12] = l("span", null, "Додати", -1))
2483
- ], 8, ja)) : U("", !0)
2481
+ ], 8, Sa)) : D("", !0)
2484
2482
  ], 512)
2485
2483
  ], 64));
2486
2484
  }
2487
- }), Ea = ["placeholder", "disabled"], Ia = /* @__PURE__ */ G({
2485
+ }), Ba = ["placeholder", "disabled"], ja = /* @__PURE__ */ G({
2488
2486
  __name: "vs-input-textarea",
2489
2487
  props: /* @__PURE__ */ ie({
2490
2488
  style: { default: () => ({}) },
@@ -2506,15 +2504,15 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2506
2504
  placeholder: n.placeholder,
2507
2505
  disabled: n.disabled,
2508
2506
  row: "2",
2509
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [te(t)]]),
2507
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [le(t)]]),
2510
2508
  style: {
2511
2509
  border: "1px solid #CFD9E0"
2512
2510
  }
2513
- }, null, 10, Ea)), [
2514
- [he, s.value]
2511
+ }, null, 10, Ba)), [
2512
+ [me, s.value]
2515
2513
  ]);
2516
2514
  }
2517
- }), za = {}, Aa = {
2515
+ }), Ea = {}, Ia = {
2518
2516
  xmlns: "http://www.w3.org/2000/svg",
2519
2517
  viewBox: "0 0 24 24",
2520
2518
  fill: "none",
@@ -2524,8 +2522,8 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2524
2522
  "stroke-linejoin": "round",
2525
2523
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2526
2524
  };
2527
- function Ta(o, e) {
2528
- return i(), d("svg", Aa, e[0] || (e[0] = [
2525
+ function za(o, e) {
2526
+ return i(), d("svg", Ia, e[0] || (e[0] = [
2529
2527
  l("path", {
2530
2528
  stroke: "none",
2531
2529
  d: "M0 0h24v24H0z",
@@ -2535,7 +2533,7 @@ function Ta(o, e) {
2535
2533
  l("path", { d: "M21 21l-6 -6" }, null, -1)
2536
2534
  ]));
2537
2535
  }
2538
- const Fa = /* @__PURE__ */ Y(za, [["render", Ta]]), Oa = {}, Ua = {
2536
+ const Aa = /* @__PURE__ */ Y(Ea, [["render", za]]), Ta = {}, Fa = {
2539
2537
  class: "flex-shrink-0 mt-0.5 size-3.5",
2540
2538
  xmlns: "http://www.w3.org/2000/svg",
2541
2539
  viewBox: "0 0 24 24",
@@ -2545,15 +2543,15 @@ const Fa = /* @__PURE__ */ Y(za, [["render", Ta]]), Oa = {}, Ua = {
2545
2543
  "stroke-linecap": "round",
2546
2544
  "stroke-linejoin": "round"
2547
2545
  };
2548
- function Da(o, e) {
2549
- return i(), d("svg", Ua, e[0] || (e[0] = [
2546
+ function Oa(o, e) {
2547
+ return i(), d("svg", Fa, e[0] || (e[0] = [
2550
2548
  l("path", { d: "m3 16 4 4 4-4" }, null, -1),
2551
2549
  l("path", { d: "M7 20V4" }, null, -1),
2552
2550
  l("path", { d: "m21 8-4-4-4 4" }, null, -1),
2553
2551
  l("path", { d: "M17 4v16" }, null, -1)
2554
2552
  ]));
2555
2553
  }
2556
- const Ra = /* @__PURE__ */ Y(Oa, [["render", Da]]), Pa = {}, Ha = {
2554
+ const Ua = /* @__PURE__ */ Y(Ta, [["render", Oa]]), Da = {}, Ra = {
2557
2555
  xmlns: "http://www.w3.org/2000/svg",
2558
2556
  width: "14",
2559
2557
  height: "14",
@@ -2564,8 +2562,8 @@ const Ra = /* @__PURE__ */ Y(Oa, [["render", Da]]), Pa = {}, Ha = {
2564
2562
  "stroke-linecap": "round",
2565
2563
  "stroke-linejoin": "round"
2566
2564
  };
2567
- function Na(o, e) {
2568
- return i(), d("svg", Ha, e[0] || (e[0] = [
2565
+ function Pa(o, e) {
2566
+ return i(), d("svg", Ra, e[0] || (e[0] = [
2569
2567
  l("path", {
2570
2568
  stroke: "none",
2571
2569
  d: "M0 0h24v24H0z",
@@ -2576,7 +2574,7 @@ function Na(o, e) {
2576
2574
  l("path", { d: "M12 4l0 12" }, null, -1)
2577
2575
  ]));
2578
2576
  }
2579
- const Ga = /* @__PURE__ */ Y(Pa, [["render", Na]]), qa = {}, Ka = {
2577
+ const Ha = /* @__PURE__ */ Y(Da, [["render", Pa]]), Na = {}, Ga = {
2580
2578
  xmlns: "http://www.w3.org/2000/svg",
2581
2579
  viewBox: "0 0 24 24",
2582
2580
  fill: "none",
@@ -2585,8 +2583,8 @@ const Ga = /* @__PURE__ */ Y(Pa, [["render", Na]]), qa = {}, Ka = {
2585
2583
  "stroke-linecap": "round",
2586
2584
  "stroke-linejoin": "round"
2587
2585
  };
2588
- function Wa(o, e) {
2589
- return i(), d("svg", Ka, e[0] || (e[0] = [
2586
+ function qa(o, e) {
2587
+ return i(), d("svg", Ga, e[0] || (e[0] = [
2590
2588
  l("path", {
2591
2589
  stroke: "none",
2592
2590
  d: "M0 0h24v24H0z",
@@ -2597,7 +2595,7 @@ function Wa(o, e) {
2597
2595
  l("path", { d: "M12 4l0 12" }, null, -1)
2598
2596
  ]));
2599
2597
  }
2600
- const Za = /* @__PURE__ */ Y(qa, [["render", Wa]]), Ja = {}, Ya = {
2598
+ const Ka = /* @__PURE__ */ Y(Na, [["render", qa]]), Wa = {}, Za = {
2601
2599
  xmlns: "http://www.w3.org/2000/svg",
2602
2600
  viewBox: "0 0 24 24",
2603
2601
  fill: "none",
@@ -2606,22 +2604,22 @@ const Za = /* @__PURE__ */ Y(qa, [["render", Wa]]), Ja = {}, Ya = {
2606
2604
  "stroke-linecap": "round",
2607
2605
  "stroke-linejoin": "round"
2608
2606
  };
2609
- function Xa(o, e) {
2610
- return i(), d("svg", Ya, e[0] || (e[0] = [
2607
+ function Ja(o, e) {
2608
+ return i(), d("svg", Za, e[0] || (e[0] = [
2611
2609
  xe('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>', 6)
2612
2610
  ]));
2613
2611
  }
2614
- const Lt = /* @__PURE__ */ Y(Ja, [["render", Xa]]), Qa = {}, es = {
2612
+ const Mt = /* @__PURE__ */ Y(Wa, [["render", Ja]]), Ya = {}, Xa = {
2615
2613
  viewBox: "0 0 178 90",
2616
2614
  fill: "none",
2617
2615
  xmlns: "http://www.w3.org/2000/svg"
2618
2616
  };
2619
- function ts(o, e) {
2620
- return i(), d("svg", es, e[0] || (e[0] = [
2617
+ function Qa(o, e) {
2618
+ return i(), d("svg", Xa, e[0] || (e[0] = [
2621
2619
  xe('<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)
2622
2620
  ]));
2623
2621
  }
2624
- const ls = /* @__PURE__ */ Y(Qa, [["render", ts]]), os = {}, ns = {
2622
+ const es = /* @__PURE__ */ Y(Ya, [["render", Qa]]), ts = {}, ls = {
2625
2623
  xmlns: "http://www.w3.org/2000/svg",
2626
2624
  viewBox: "0 0 24 24",
2627
2625
  fill: "none",
@@ -2630,25 +2628,25 @@ const ls = /* @__PURE__ */ Y(Qa, [["render", ts]]), os = {}, ns = {
2630
2628
  "stroke-linecap": "round",
2631
2629
  "stroke-linejoin": "round"
2632
2630
  };
2633
- function as(o, e) {
2634
- return i(), d("svg", ns, e[0] || (e[0] = [
2631
+ function os(o, e) {
2632
+ return i(), d("svg", ls, e[0] || (e[0] = [
2635
2633
  l("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
2636
2634
  ]));
2637
2635
  }
2638
- const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable border rounded-xl w-full flex-grow" }, is = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, us = { class: "relative w-full" }, ds = { class: "table-wrapper flex gap-2" }, cs = { class: "vs-popover inline-block text-slate-700" }, ps = { class: "text-center" }, fs = { class: "" }, vs = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 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" }, ms = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, hs = { class: "text-sm items-center text-gray-800 flex gap-1" }, gs = { class: "w-full overflow-x-auto" }, bs = { class: "w-full table-auto caption-bottom text-sm" }, ys = { class: "[&_tr]:border-b" }, xs = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ws = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, ks = {
2636
+ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ss = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, rs = { class: "relative w-full" }, is = { class: "table-wrapper flex gap-2" }, us = { class: "vs-popover inline-block text-slate-700" }, ds = { class: "text-center" }, cs = { class: "" }, ps = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 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" }, fs = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, vs = { class: "text-sm items-center text-gray-800 flex gap-1" }, ms = { class: "w-full overflow-x-auto" }, hs = { class: "w-full table-auto caption-bottom text-sm" }, gs = { class: "[&_tr]:border-b" }, bs = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ys = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, xs = {
2639
2637
  key: 0,
2640
2638
  colspan: "100%",
2641
2639
  class: "text-center"
2642
- }, _s = { class: "w-full" }, $s = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Cs = ["onDragstart", "onDragover", "onDrop"], Vs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Ms = { class: "flex items-center justify-center" }, Ls = {
2640
+ }, ws = { class: "w-full" }, ks = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, _s = ["onDragstart", "onDragover", "onDrop"], $s = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Cs = { class: "flex items-center justify-center" }, Vs = {
2643
2641
  key: 0,
2644
2642
  class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"
2645
- }, Ss = { key: 0 }, Bs = ["src"], js = {
2643
+ }, Ms = { key: 0 }, Ls = ["src"], Ss = {
2646
2644
  key: 1,
2647
2645
  class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
2648
- }, Es = ["innerHTML"], Is = {
2646
+ }, Bs = ["innerHTML"], js = {
2649
2647
  key: 2,
2650
2648
  class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"
2651
- }, zs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, As = { class: "flex items-center justify-center gap-2" }, Ts = ["onClick"], Fs = ["onClick"], Os = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Us = /* @__PURE__ */ G({
2649
+ }, Es = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Is = { class: "flex items-center justify-center gap-2" }, zs = ["onClick"], As = ["onClick"], Ts = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Fs = /* @__PURE__ */ G({
2652
2650
  __name: "vs-input-datatable",
2653
2651
  props: /* @__PURE__ */ ie({
2654
2652
  colModel: {},
@@ -2665,90 +2663,90 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2665
2663
  }),
2666
2664
  emits: ["update:modelValue"],
2667
2665
  setup(o) {
2668
- const e = o, t = de(o, "modelValue"), s = w({}), n = w(""), a = S(() => {
2666
+ const e = o, t = de(o, "modelValue"), s = w({}), n = w(""), a = B(() => {
2669
2667
  if (!n.value) return t.value ?? [];
2670
- const D = n.value.toLowerCase();
2668
+ const U = n.value.toLowerCase();
2671
2669
  return t.value.filter((F) => e.colModel?.some((z) => {
2672
2670
  const H = F[z.key];
2673
- return H ? Array.isArray(H) ? H.join(", ").toLowerCase().includes(D) : String(H).toLowerCase().includes(D) : !1;
2671
+ return H ? Array.isArray(H) ? H.join(", ").toLowerCase().includes(U) : String(H).toLowerCase().includes(U) : !1;
2674
2672
  }));
2675
- }), r = w(null), u = w(null), c = w(!1), f = w(null), p = w({ top: 0, left: 0 }), v = (D) => {
2676
- r.value = D;
2677
- }, k = (D) => {
2678
- u.value = D;
2679
- }, m = (D) => {
2680
- if (r.value === null || r.value === D) {
2673
+ }), r = w(null), u = w(null), c = w(!1), f = w(null), p = w({ top: 0, left: 0 }), v = (U) => {
2674
+ r.value = U;
2675
+ }, k = (U) => {
2676
+ u.value = U;
2677
+ }, m = (U) => {
2678
+ if (r.value === null || r.value === U) {
2681
2679
  r.value = null, u.value = null;
2682
2680
  return;
2683
2681
  }
2684
2682
  const F = [...t.value], [z] = F.splice(r.value, 1);
2685
- F.splice(D, 0, z), t.value = F, r.value = null, u.value = null;
2686
- }, I = (D) => {
2687
- const z = D.currentTarget.getBoundingClientRect();
2683
+ F.splice(U, 0, z), t.value = F, r.value = null, u.value = null;
2684
+ }, I = (U) => {
2685
+ const z = U.currentTarget.getBoundingClientRect();
2688
2686
  p.value = { top: z.bottom + window.scrollY, left: z.left + window.scrollX }, c.value = !c.value;
2689
2687
  }, $ = () => {
2690
2688
  f.value && f.value.click();
2691
- }, A = (D) => {
2692
- const F = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], z = D.toLowerCase();
2689
+ }, A = (U) => {
2690
+ const F = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], z = U.toLowerCase();
2693
2691
  return F.some((H) => z.endsWith(H));
2694
- }, E = (D) => {
2695
- const z = D.target.files?.[0];
2692
+ }, E = (U) => {
2693
+ const z = U.target.files?.[0];
2696
2694
  if (!z) return;
2697
2695
  const H = new FileReader();
2698
- H.onload = (le) => {
2696
+ H.onload = (ee) => {
2699
2697
  try {
2700
- const pe = le.target?.result;
2701
- if (typeof pe == "string") {
2702
- const we = JSON.parse(pe);
2698
+ const ge = ee.target?.result;
2699
+ if (typeof ge == "string") {
2700
+ const we = JSON.parse(ge);
2703
2701
  Array.isArray(we) && t.value.push(...we);
2704
2702
  }
2705
- } catch (pe) {
2706
- console.error("Error parsing file:", pe);
2703
+ } catch (ge) {
2704
+ console.error("Error parsing file:", ge);
2707
2705
  }
2708
2706
  }, H.readAsText(z);
2709
2707
  }, O = () => {
2710
- const D = JSON.stringify(t.value, null, 2), F = new Blob([D], { type: "application/json" }), z = URL.createObjectURL(F), H = document.createElement("a");
2708
+ const U = JSON.stringify(t.value, null, 2), F = new Blob([U], { type: "application/json" }), z = URL.createObjectURL(F), H = document.createElement("a");
2711
2709
  H.href = z, H.download = "data.json", H.click(), URL.revokeObjectURL(z);
2712
2710
  };
2713
2711
  ye(async () => {
2714
- const D = e.colModel?.filter((F) => F.data);
2715
- D?.length && Promise.all(D.map(async (F) => {
2712
+ const U = e.colModel?.filter((F) => F.data);
2713
+ U?.length && Promise.all(U.map(async (F) => {
2716
2714
  const H = await (await fetch(`/api/suggest/${F.data}`)).json();
2717
2715
  s.value[F.key] = H.data;
2718
2716
  }));
2719
2717
  });
2720
2718
  const C = w(""), h = w(!1);
2721
- let x = "edit", B = 0;
2722
- const V = w({}), P = w({});
2723
- async function ee() {
2724
- C.value = "Додати", h.value = !0, x = "add", V.value = {};
2719
+ let x = "edit", j = 0;
2720
+ const M = w({}), P = w({});
2721
+ async function te() {
2722
+ C.value = "Додати", h.value = !0, x = "add", M.value = {};
2725
2723
  }
2726
- function Q(D, F) {
2724
+ function X(U, F) {
2727
2725
  const z = F.key || F.name;
2728
- return s.value[z] && D[z] ? s.value[z].find((H) => H.id.toString() === D[z].toString())?.text ?? D[z] : D[z] || "-";
2726
+ return s.value[z] && U[z] ? s.value[z].find((H) => H.id.toString() === U[z].toString())?.text ?? U[z] : U[z] || "-";
2729
2727
  }
2730
- async function j(D, F) {
2731
- C.value = "Редагувати", h.value = !0, x = "edit", B = F, V.value = { ...D };
2728
+ async function S(U, F) {
2729
+ C.value = "Редагувати", h.value = !0, x = "edit", j = F, M.value = { ...U };
2732
2730
  }
2733
- function q() {
2734
- const D = P.value.validate();
2735
- if (D) {
2736
- ce({ type: "warning", title: "Помилка валідації", message: Object.entries(D).map(([F, z]) => `${F}: ${z}`).join(`
2731
+ function W() {
2732
+ const U = P.value.validate();
2733
+ if (U) {
2734
+ ce({ type: "warning", title: "Помилка валідації", message: Object.entries(U).map(([F, z]) => `${F}: ${z}`).join(`
2737
2735
  `) });
2738
2736
  return;
2739
2737
  }
2740
- x === "add" ? Array.isArray(t.value) ? t.value = [...t.value, V.value] : t.value = [V.value] : t.value = t.value.map((F, z) => z === B ? V.value : F), h.value = !1;
2738
+ x === "add" ? Array.isArray(t.value) ? t.value = [...t.value, M.value] : t.value = [M.value] : t.value = t.value.map((F, z) => z === j ? M.value : F), h.value = !1;
2741
2739
  }
2742
- function X(D) {
2743
- t.value = t.value.filter((F, z) => z !== D);
2740
+ function Q(U) {
2741
+ t.value = t.value.filter((F, z) => z !== U);
2744
2742
  }
2745
2743
  function Z() {
2746
2744
  h.value = !1;
2747
2745
  }
2748
- return (D, F) => (i(), d("div", rs, [
2749
- l("div", is, [
2750
- l("div", us, [
2751
- R(Fa, {
2746
+ return (U, F) => (i(), d("div", as, [
2747
+ l("div", ss, [
2748
+ l("div", rs, [
2749
+ R(Aa, {
2752
2750
  width: "14",
2753
2751
  height: "14",
2754
2752
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
@@ -2759,10 +2757,10 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2759
2757
  placeholder: "Пошук",
2760
2758
  class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
2761
2759
  }, null, 512), [
2762
- [he, n.value]
2760
+ [me, n.value]
2763
2761
  ])
2764
2762
  ]),
2765
- l("div", ds, [
2763
+ l("div", is, [
2766
2764
  l("input", {
2767
2765
  ref_key: "fileInput",
2768
2766
  ref: f,
@@ -2771,14 +2769,14 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2771
2769
  accept: ".json",
2772
2770
  type: "file"
2773
2771
  }, null, 544),
2774
- l("div", cs, [
2775
- l("div", ps, [
2776
- l("div", fs, [
2772
+ l("div", us, [
2773
+ l("div", ds, [
2774
+ l("div", cs, [
2777
2775
  l("button", {
2778
2776
  onClick: I,
2779
2777
  class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2780
2778
  }, [
2781
- R(Ra, {
2779
+ R(Ua, {
2782
2780
  height: "16",
2783
2781
  width: "16"
2784
2782
  })
@@ -2787,152 +2785,152 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2787
2785
  ])
2788
2786
  ])
2789
2787
  ]),
2790
- (i(), me(It, { to: "body" }, [
2788
+ (i(), ve(Et, { to: "body" }, [
2791
2789
  c.value ? (i(), d("div", {
2792
2790
  key: 0,
2793
2791
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2794
2792
  style: be([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: p.value.top + "px", left: p.value.left + "px" }])
2795
2793
  }, [
2796
- l("div", vs, [
2797
- l("div", ms, [
2794
+ l("div", ps, [
2795
+ l("div", fs, [
2798
2796
  l("button", {
2799
2797
  onClick: $,
2800
2798
  class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2801
2799
  }, [
2802
- R(Ga, {
2800
+ R(Ha, {
2803
2801
  class: "text-black",
2804
2802
  width: "14",
2805
2803
  height: "14"
2806
2804
  }),
2807
- F[4] || (F[4] = ge(" Імпортувати ", -1))
2805
+ F[4] || (F[4] = he(" Імпортувати ", -1))
2808
2806
  ]),
2809
2807
  l("button", {
2810
2808
  onClick: O,
2811
2809
  class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2812
2810
  }, [
2813
- l("span", hs, [
2814
- R(Za, {
2811
+ l("span", vs, [
2812
+ R(Ka, {
2815
2813
  class: "text-black",
2816
2814
  width: "14",
2817
2815
  height: "14"
2818
2816
  }),
2819
- F[5] || (F[5] = ge(" Експортувати ", -1))
2817
+ F[5] || (F[5] = he(" Експортувати ", -1))
2820
2818
  ])
2821
2819
  ])
2822
2820
  ])
2823
2821
  ])
2824
- ], 4)) : U("", !0)
2822
+ ], 4)) : D("", !0)
2825
2823
  ])),
2826
2824
  l("button", {
2827
- onClick: ee,
2825
+ onClick: te,
2828
2826
  class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2829
2827
  }, [
2830
- R(qe),
2831
- F[6] || (F[6] = ge(" Додати ", -1))
2828
+ R(Ge),
2829
+ F[6] || (F[6] = he(" Додати ", -1))
2832
2830
  ])
2833
2831
  ]),
2834
- l("div", gs, [
2835
- l("table", bs, [
2836
- l("thead", ys, [
2837
- l("tr", xs, [
2838
- l("th", ws, [
2839
- R(Lt, {
2832
+ l("div", ms, [
2833
+ l("table", hs, [
2834
+ l("thead", gs, [
2835
+ l("tr", bs, [
2836
+ l("th", ys, [
2837
+ R(Mt, {
2840
2838
  width: "24",
2841
2839
  height: "24",
2842
2840
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2843
2841
  })
2844
2842
  ]),
2845
- (i(!0), d(re, null, fe(D.colModel, (z) => (i(), d("th", {
2843
+ (i(!0), d(re, null, pe(U.colModel, (z) => (i(), d("th", {
2846
2844
  key: z.key,
2847
2845
  class: "h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"
2848
- }, W(z.ua || z.label), 1))), 128)),
2846
+ }, K(z.ua || z.label), 1))), 128)),
2849
2847
  F[7] || (F[7] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2850
2848
  ])
2851
2849
  ]),
2852
2850
  l("tbody", {
2853
2851
  class: T({ "[&_tr:last-child]:border-0": !u.value })
2854
2852
  }, [
2855
- a.value.length === 0 ? (i(), d("td", ks, [
2856
- l("div", _s, [
2857
- l("div", $s, [
2858
- R(ls, { class: "w-48 mx-auto" }),
2853
+ a.value.length === 0 ? (i(), d("td", xs, [
2854
+ l("div", ws, [
2855
+ l("div", ks, [
2856
+ R(es, { class: "w-48 mx-auto" }),
2859
2857
  F[8] || (F[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2860
2858
  l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2861
2859
  l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2862
2860
  ], -1))
2863
2861
  ])
2864
2862
  ])
2865
- ])) : U("", !0),
2866
- (i(!0), d(re, null, fe(a.value, (z, H) => (i(), d("tr", {
2863
+ ])) : D("", !0),
2864
+ (i(!0), d(re, null, pe(a.value, (z, H) => (i(), d("tr", {
2867
2865
  key: z.id,
2868
2866
  class: T(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2869
2867
  "opacity-50": r.value === H,
2870
2868
  "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": u.value === H
2871
2869
  }]),
2872
2870
  draggable: "true",
2873
- onDragstart: (le) => v(H),
2874
- onDragover: $e((le) => k(H), ["prevent"]),
2875
- onDrop: (le) => m(H)
2871
+ onDragstart: (ee) => v(H),
2872
+ onDragover: $e((ee) => k(H), ["prevent"]),
2873
+ onDrop: (ee) => m(H)
2876
2874
  }, [
2877
- l("td", Vs, [
2878
- l("div", Ms, [
2879
- R(Lt, {
2875
+ l("td", $s, [
2876
+ l("div", Cs, [
2877
+ R(Mt, {
2880
2878
  width: "24",
2881
2879
  height: "24",
2882
2880
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2883
2881
  })
2884
2882
  ])
2885
2883
  ]),
2886
- (i(!0), d(re, null, fe(D.colModel, (le) => (i(), d("td", {
2887
- key: le.key,
2884
+ (i(!0), d(re, null, pe(U.colModel, (ee) => (i(), d("td", {
2885
+ key: ee.key,
2888
2886
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2889
2887
  }, [
2890
- le.type === "file" ? (i(), d("div", Ls, [
2891
- A(Q(z, le)) ? (i(), d("div", Ss, [
2888
+ ee.type === "file" ? (i(), d("div", Vs, [
2889
+ A(X(z, ee)) ? (i(), d("div", Ms, [
2892
2890
  l("img", {
2893
- src: Q(z, le),
2891
+ src: X(z, ee),
2894
2892
  alt: "alt",
2895
2893
  width: "45",
2896
2894
  class: "rounded-md max-w-[45px] h-[45px] object-cover"
2897
- }, null, 8, Bs)
2898
- ])) : (i(), d("div", js, [
2899
- R(Tt, { class: "w-[25px] min-w-[25px] h-[25px]" })
2895
+ }, null, 8, Ls)
2896
+ ])) : (i(), d("div", Ss, [
2897
+ R(At, { class: "w-[25px] min-w-[25px] h-[25px]" })
2900
2898
  ]))
2901
- ])) : le.type === "tiptap-editor" ? (i(), d("div", {
2899
+ ])) : ee.type === "tiptap-editor" ? (i(), d("div", {
2902
2900
  key: 1,
2903
2901
  class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors",
2904
- innerHTML: Q(z, le)
2905
- }, null, 8, Es)) : (i(), d("div", Is, W(Q(z, le)), 1))
2902
+ innerHTML: X(z, ee)
2903
+ }, null, 8, Bs)) : (i(), d("div", js, K(X(z, ee)), 1))
2906
2904
  ]))), 128)),
2907
- l("td", zs, [
2908
- l("div", As, [
2905
+ l("td", Es, [
2906
+ l("div", Is, [
2909
2907
  l("button", {
2910
- onClick: (le) => j(z, H),
2908
+ onClick: (ee) => S(z, H),
2911
2909
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2912
2910
  }, [
2913
- R(ss, {
2911
+ R(ns, {
2914
2912
  width: "24",
2915
2913
  height: "24",
2916
2914
  class: "w-3 h-3"
2917
2915
  })
2918
- ], 8, Ts),
2916
+ ], 8, zs),
2919
2917
  l("button", {
2920
- onClick: (le) => X(H),
2918
+ onClick: (ee) => Q(H),
2921
2919
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2922
2920
  }, [
2923
- R(tt, {
2921
+ R(Qe, {
2924
2922
  width: "24",
2925
2923
  height: "24",
2926
2924
  class: "w-3 h-3"
2927
2925
  })
2928
- ], 8, Fs)
2926
+ ], 8, As)
2929
2927
  ])
2930
2928
  ])
2931
- ], 42, Cs))), 128))
2929
+ ], 42, _s))), 128))
2932
2930
  ], 2)
2933
2931
  ])
2934
2932
  ]),
2935
- R(te(zt), {
2933
+ R(le(It), {
2936
2934
  teleport: "#modal",
2937
2935
  visible: h.value,
2938
2936
  title: C.value,
@@ -2940,21 +2938,21 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2940
2938
  onClose: Z
2941
2939
  }, {
2942
2940
  default: Ee(() => [
2943
- R(Ke, {
2941
+ R(qe, {
2944
2942
  schema: e.colModel,
2945
- values: V.value,
2946
- "onUpdate:values": F[1] || (F[1] = (z) => V.value = z),
2943
+ values: M.value,
2944
+ "onUpdate:values": F[1] || (F[1] = (z) => M.value = z),
2947
2945
  form: P.value,
2948
2946
  "onUpdate:form": F[2] || (F[2] = (z) => P.value = z)
2949
2947
  }, null, 8, ["schema", "values", "form"]),
2950
- l("div", Os, [
2948
+ l("div", Ts, [
2951
2949
  l("button", {
2952
2950
  type: "button",
2953
2951
  onClick: F[3] || (F[3] = (z) => h.value = !1),
2954
2952
  class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
2955
2953
  }, " Скасувати "),
2956
2954
  l("button", {
2957
- onClick: q,
2955
+ onClick: W,
2958
2956
  type: "button",
2959
2957
  class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
2960
2958
  }, " Зберегти ")
@@ -2964,7 +2962,7 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2964
2962
  }, 8, ["visible", "title"])
2965
2963
  ]));
2966
2964
  }
2967
- }), Ds = {
2965
+ }), Os = {
2968
2966
  draw: {
2969
2967
  toolbar: {
2970
2968
  actions: {
@@ -3072,33 +3070,33 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
3072
3070
  }
3073
3071
  }
3074
3072
  };
3075
- function Ge(o) {
3073
+ function Ne(o) {
3076
3074
  return o ? o.type === "Polygon" ? {
3077
3075
  type: "MultiPolygon",
3078
3076
  coordinates: [o.coordinates]
3079
3077
  } : o.type === "Feature" ? {
3080
3078
  ...o,
3081
- geometry: Ge(o.geometry)
3079
+ geometry: Ne(o.geometry)
3082
3080
  } : o.type === "FeatureCollection" ? {
3083
3081
  ...o,
3084
- features: (o.features || []).map((e) => Ge(e)).filter(Boolean)
3082
+ features: (o.features || []).map((e) => Ne(e)).filter(Boolean)
3085
3083
  } : o : null;
3086
3084
  }
3087
- function Rs(o) {
3088
- return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ge(o) : o.geom ? {
3085
+ function Us(o) {
3086
+ return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ne(o) : o.geom ? {
3089
3087
  type: "Feature",
3090
- geometry: Ge({
3088
+ geometry: Ne({
3091
3089
  type: o.geom.type,
3092
3090
  coordinates: o.geom.coordinates
3093
3091
  }),
3094
3092
  properties: {}
3095
3093
  } : o.type && o.coordinates ? {
3096
3094
  type: "Feature",
3097
- geometry: Ge(o),
3095
+ geometry: Ne(o),
3098
3096
  properties: {}
3099
3097
  } : null : null;
3100
3098
  }
3101
- const Ps = {}, Hs = {
3099
+ const Ds = {}, Rs = {
3102
3100
  xmlns: "http://www.w3.org/2000/svg",
3103
3101
  viewBox: "0 0 24 24",
3104
3102
  stroke: "currentColor",
@@ -3108,8 +3106,8 @@ const Ps = {}, Hs = {
3108
3106
  "stroke-linejoin": "round",
3109
3107
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
3110
3108
  };
3111
- function Ns(o, e) {
3112
- return i(), d("svg", Hs, e[0] || (e[0] = [
3109
+ function Ps(o, e) {
3110
+ return i(), d("svg", Rs, e[0] || (e[0] = [
3113
3111
  l("path", {
3114
3112
  stroke: "none",
3115
3113
  d: "M0 0h24v24H0z",
@@ -3119,7 +3117,7 @@ function Ns(o, e) {
3119
3117
  l("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
3120
3118
  ]));
3121
3119
  }
3122
- const Gs = /* @__PURE__ */ Y(Ps, [["render", Ns]]), qs = {}, Ks = {
3120
+ const Hs = /* @__PURE__ */ Y(Ds, [["render", Ps]]), Ns = {}, Gs = {
3123
3121
  xmlns: "http://www.w3.org/2000/svg",
3124
3122
  viewBox: "0 0 24 24",
3125
3123
  fill: "none",
@@ -3129,8 +3127,8 @@ const Gs = /* @__PURE__ */ Y(Ps, [["render", Ns]]), qs = {}, Ks = {
3129
3127
  "stroke-linejoin": "round",
3130
3128
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
3131
3129
  };
3132
- function Ws(o, e) {
3133
- return i(), d("svg", Ks, e[0] || (e[0] = [
3130
+ function qs(o, e) {
3131
+ return i(), d("svg", Gs, e[0] || (e[0] = [
3134
3132
  l("path", {
3135
3133
  stroke: "none",
3136
3134
  d: "M0 0h24v24H0z",
@@ -3141,7 +3139,7 @@ function Ws(o, e) {
3141
3139
  l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
3142
3140
  ]));
3143
3141
  }
3144
- const Zs = /* @__PURE__ */ Y(qs, [["render", Ws]]), Js = {}, Ys = {
3142
+ const Ks = /* @__PURE__ */ Y(Ns, [["render", qs]]), Ws = {}, Zs = {
3145
3143
  xmlns: "http://www.w3.org/2000/svg",
3146
3144
  viewBox: "0 0 24 24",
3147
3145
  fill: "none",
@@ -3151,12 +3149,12 @@ const Zs = /* @__PURE__ */ Y(qs, [["render", Ws]]), Js = {}, Ys = {
3151
3149
  "stroke-linejoin": "round",
3152
3150
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
3153
3151
  };
3154
- function Xs(o, e) {
3155
- return i(), d("svg", Ys, e[0] || (e[0] = [
3152
+ function Js(o, e) {
3153
+ return i(), d("svg", Zs, e[0] || (e[0] = [
3156
3154
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
3157
3155
  ]));
3158
3156
  }
3159
- const Qs = /* @__PURE__ */ Y(Js, [["render", Xs]]), er = {}, tr = {
3157
+ const Ys = /* @__PURE__ */ Y(Ws, [["render", Js]]), Xs = {}, Qs = {
3160
3158
  xmlns: "http://www.w3.org/2000/svg",
3161
3159
  viewBox: "0 0 24 24",
3162
3160
  fill: "none",
@@ -3166,12 +3164,12 @@ const Qs = /* @__PURE__ */ Y(Js, [["render", Xs]]), er = {}, tr = {
3166
3164
  "stroke-linejoin": "round",
3167
3165
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
3168
3166
  };
3169
- function lr(o, e) {
3170
- return i(), d("svg", tr, e[0] || (e[0] = [
3167
+ function er(o, e) {
3168
+ return i(), d("svg", Qs, e[0] || (e[0] = [
3171
3169
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
3172
3170
  ]));
3173
3171
  }
3174
- const or = /* @__PURE__ */ Y(er, [["render", lr]]), nr = {}, ar = {
3172
+ const tr = /* @__PURE__ */ Y(Xs, [["render", er]]), lr = {}, or = {
3175
3173
  version: "1.1",
3176
3174
  viewBox: "0 0 14 14",
3177
3175
  xmlns: "http://www.w3.org/2000/svg",
@@ -3179,8 +3177,8 @@ const or = /* @__PURE__ */ Y(er, [["render", lr]]), nr = {}, ar = {
3179
3177
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
3180
3178
  class: "fullscreen-icon"
3181
3179
  };
3182
- function sr(o, e) {
3183
- return i(), d("svg", ar, e[0] || (e[0] = [
3180
+ function nr(o, e) {
3181
+ return i(), d("svg", or, e[0] || (e[0] = [
3184
3182
  l("title", null, null, -1),
3185
3183
  l("desc", null, null, -1),
3186
3184
  l("defs", null, null, -1),
@@ -3209,20 +3207,20 @@ function sr(o, e) {
3209
3207
  ], -1)
3210
3208
  ]));
3211
3209
  }
3212
- const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, ur = {
3210
+ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, rr = {
3213
3211
  key: 0,
3214
3212
  class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
3215
- }, dr = ["onClick"], cr = { class: "relative flex-1 min-w-[140px]" }, pr = ["placeholder"], fr = "https://data.softpro.ua/api-user/gis-url-proxy", vr = "https://geo.rv.ua/api-user/dzk.api", mr = /* @__PURE__ */ G({
3213
+ }, ir = ["onClick"], ur = { class: "relative flex-1 min-w-[140px]" }, dr = ["placeholder"], cr = "https://data.softpro.ua/api-user/gis-url-proxy", pr = "https://geo.rv.ua/api-user/dzk.api", fr = /* @__PURE__ */ G({
3216
3214
  __name: "map-search",
3217
3215
  props: {
3218
3216
  config: {}
3219
3217
  },
3220
3218
  emits: ["goToCoordinates"],
3221
3219
  setup(o, { emit: e }) {
3222
- const t = o, s = e, n = ["here", "xy", "parcel"], a = S(() => {
3220
+ const t = o, s = e, n = ["here", "xy", "parcel"], a = B(() => {
3223
3221
  const h = t.config?.tools?.filter((x) => n.includes(x));
3224
3222
  return h && h.length ? h : n;
3225
- }), r = S(() => t.config?.placeholder?.trim() || "Пошук…"), u = w(a.value[0] ?? n[0]);
3223
+ }), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), u = w(a.value[0] ?? n[0]);
3226
3224
  ue(a, (h) => {
3227
3225
  h.includes(u.value) || (u.value = h[0]);
3228
3226
  });
@@ -3240,7 +3238,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3240
3238
  }
3241
3239
  ye(() => {
3242
3240
  window.addEventListener("click", k, !0);
3243
- }), it(() => {
3241
+ }), rt(() => {
3244
3242
  window.removeEventListener("click", k, !0);
3245
3243
  });
3246
3244
  function m(h) {
@@ -3249,47 +3247,47 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3249
3247
  function I(h) {
3250
3248
  const x = h.replace(/[,]+/g, " ").trim();
3251
3249
  if (!x) return null;
3252
- const B = x.split(/\s+/).filter(Boolean);
3253
- if (B.length < 2) return null;
3254
- const V = B.slice(0, 2).map(Number);
3255
- if (!V.every((Z) => Number.isFinite(Z))) return null;
3256
- let [P, ee] = V, Q = P, j = ee;
3257
- const q = (Z) => Math.abs(Z) <= 90, X = (Z) => Math.abs(Z) <= 180;
3258
- if (!q(Q) || !X(j))
3259
- if (q(j) && X(Q))
3260
- Q = ee, j = P;
3250
+ const j = x.split(/\s+/).filter(Boolean);
3251
+ if (j.length < 2) return null;
3252
+ const M = j.slice(0, 2).map(Number);
3253
+ if (!M.every((Z) => Number.isFinite(Z))) return null;
3254
+ let [P, te] = M, X = P, S = te;
3255
+ const W = (Z) => Math.abs(Z) <= 90, Q = (Z) => Math.abs(Z) <= 180;
3256
+ if (!W(X) || !Q(S))
3257
+ if (W(S) && Q(X))
3258
+ X = te, S = P;
3261
3259
  else
3262
3260
  return null;
3263
- return { lat: Q, lng: j };
3261
+ return { lat: X, lng: S };
3264
3262
  }
3265
3263
  function $(h) {
3266
- return (h?.items || []).map((B, V) => ({
3267
- id: String(B?.id ?? V),
3268
- title: B?.title || B?.address?.label || "Знайдений обʼєкт",
3269
- lat: Number(B?.position?.lat),
3270
- lng: Number(B?.position?.lng)
3271
- })).filter((B) => Number.isFinite(B.lat) && Number.isFinite(B.lng));
3264
+ return (h?.items || []).map((j, M) => ({
3265
+ id: String(j?.id ?? M),
3266
+ title: j?.title || j?.address?.label || "Знайдений обʼєкт",
3267
+ lat: Number(j?.position?.lat),
3268
+ lng: Number(j?.position?.lng)
3269
+ })).filter((j) => Number.isFinite(j.lat) && Number.isFinite(j.lng));
3272
3270
  }
3273
3271
  function A(h) {
3274
3272
  const x = h?.result || h?.data || h;
3275
3273
  if (!x) return [];
3276
- const B = x.geom_centroid;
3277
- if (!B || !Array.isArray(B.coordinates)) return [];
3278
- const [V, P] = B.coordinates;
3279
- return !Number.isFinite(P) || !Number.isFinite(V) ? [] : [
3274
+ const j = x.geom_centroid;
3275
+ if (!j || !Array.isArray(j.coordinates)) return [];
3276
+ const [M, P] = j.coordinates;
3277
+ return !Number.isFinite(P) || !Number.isFinite(M) ? [] : [
3280
3278
  {
3281
3279
  id: "parcel",
3282
3280
  title: x.cadnum || x.cad_num || "Земельна ділянка",
3283
3281
  lat: P,
3284
- lng: V
3282
+ lng: M
3285
3283
  }
3286
3284
  ];
3287
3285
  }
3288
3286
  function E(h) {
3289
- const B = h.replace(/\s+/g, "").split(":");
3290
- if (B.length !== 4) return !1;
3291
- const V = [10, 2, 3, 4];
3292
- return B.every((P, ee) => P.length === V[ee] && /^\d+$/.test(P));
3287
+ const j = h.replace(/\s+/g, "").split(":");
3288
+ if (j.length !== 4) return !1;
3289
+ const M = [10, 2, 3, 4];
3290
+ return j.every((P, te) => P.length === M[te] && /^\d+$/.test(P));
3293
3291
  }
3294
3292
  function O(h) {
3295
3293
  s("goToCoordinates", [h.lat, h.lng]);
@@ -3307,7 +3305,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3307
3305
  return;
3308
3306
  }
3309
3307
  try {
3310
- const x = new URL(u.value === "here" ? fr : vr);
3308
+ const x = new URL(u.value === "here" ? cr : pr);
3311
3309
  if (u.value === "here")
3312
3310
  x.searchParams.set("searchtext", h);
3313
3311
  else {
@@ -3317,22 +3315,22 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3317
3315
  }
3318
3316
  x.searchParams.set("cad_num", h);
3319
3317
  }
3320
- const B = await fetch(x.toString());
3321
- if (!B.ok) throw new Error(`HTTP ${B.status}`);
3322
- const V = await B.json(), P = u.value === "here" ? $(V) : A(V);
3318
+ const j = await fetch(x.toString());
3319
+ if (!j.ok) throw new Error(`HTTP ${j.status}`);
3320
+ const M = await j.json(), P = u.value === "here" ? $(M) : A(M);
3323
3321
  if (!P.length)
3324
3322
  ce({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
3325
3323
  else {
3326
- const ee = P[0];
3327
- O(ee), c.value = "";
3324
+ const te = P[0];
3325
+ O(te), c.value = "";
3328
3326
  }
3329
3327
  } catch (x) {
3330
- const B = x?.message || "Помилка пошуку";
3331
- ce({ type: "error", title: "Пошук", message: B });
3328
+ const j = x?.message || "Помилка пошуку";
3329
+ ce({ type: "error", title: "Пошук", message: j });
3332
3330
  }
3333
3331
  }
3334
3332
  }
3335
- return (h, x) => (i(), d("div", ir, [
3333
+ return (h, x) => (i(), d("div", sr, [
3336
3334
  l("form", {
3337
3335
  class: "flex gap-2",
3338
3336
  onSubmit: $e(C, ["prevent"])
@@ -3346,9 +3344,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3346
3344
  l("button", {
3347
3345
  type: "button",
3348
3346
  class: "vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",
3349
- onClick: x[0] || (x[0] = (B) => f.value = !f.value)
3347
+ onClick: x[0] || (x[0] = (j) => f.value = !f.value)
3350
3348
  }, [
3351
- l("span", null, W(m(u.value)), 1),
3349
+ l("span", null, K(m(u.value)), 1),
3352
3350
  (i(), d("svg", {
3353
3351
  class: T(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": f.value }]),
3354
3352
  viewBox: "0 0 24 24",
@@ -3364,25 +3362,25 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3364
3362
  }, null, -1)
3365
3363
  ]), 2))
3366
3364
  ]),
3367
- f.value ? (i(), d("div", ur, [
3365
+ f.value ? (i(), d("div", rr, [
3368
3366
  l("ul", null, [
3369
- (i(!0), d(re, null, fe(a.value, (B) => (i(), d("li", {
3370
- key: B,
3367
+ (i(!0), d(re, null, pe(a.value, (j) => (i(), d("li", {
3368
+ key: j,
3371
3369
  class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
3372
- onClick: (V) => v(B)
3373
- }, W(m(B)), 9, dr))), 128))
3370
+ onClick: (M) => v(j)
3371
+ }, K(m(j)), 9, ir))), 128))
3374
3372
  ])
3375
- ])) : U("", !0)
3376
- ], 512)) : U("", !0),
3377
- l("div", cr, [
3373
+ ])) : D("", !0)
3374
+ ], 512)) : D("", !0),
3375
+ l("div", ur, [
3378
3376
  ne(l("input", {
3379
- "onUpdate:modelValue": x[1] || (x[1] = (B) => c.value = B),
3377
+ "onUpdate:modelValue": x[1] || (x[1] = (j) => c.value = j),
3380
3378
  placeholder: r.value,
3381
3379
  type: "text",
3382
3380
  class: "vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"
3383
- }, null, 8, pr), [
3381
+ }, null, 8, dr), [
3384
3382
  [
3385
- he,
3383
+ me,
3386
3384
  c.value,
3387
3385
  void 0,
3388
3386
  { trim: !0 }
@@ -3412,7 +3410,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3412
3410
  ], 32)
3413
3411
  ]));
3414
3412
  }
3415
- }), hr = /* @__PURE__ */ Y(mr, [["__scopeId", "data-v-3048520a"]]), gr = { class: "bg-white/30 p-1 rounded-md shadow" }, br = { class: "flex gap-2" }, yr = ["onClick", "title"], xr = ["src"], wr = /* @__PURE__ */ G({
3413
+ }), vr = /* @__PURE__ */ Y(fr, [["__scopeId", "data-v-3048520a"]]), mr = { class: "bg-white/30 p-1 rounded-md shadow" }, hr = { class: "flex gap-2" }, gr = ["onClick", "title"], br = ["src"], yr = /* @__PURE__ */ G({
3416
3414
  __name: "map-layers",
3417
3415
  props: {
3418
3416
  basemaps: {}
@@ -3423,9 +3421,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3423
3421
  function a(r) {
3424
3422
  n("onLayerChange", r), s.value = r;
3425
3423
  }
3426
- return (r, u) => (i(), d("div", gr, [
3427
- l("div", br, [
3428
- (i(!0), d(re, null, fe(r.basemaps, (c, f) => (i(), d("div", {
3424
+ return (r, u) => (i(), d("div", mr, [
3425
+ l("div", hr, [
3426
+ (i(!0), d(re, null, pe(r.basemaps, (c, f) => (i(), d("div", {
3429
3427
  key: f,
3430
3428
  class: T(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": s.value === f }]),
3431
3429
  onClick: (p) => a(f),
@@ -3437,24 +3435,24 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3437
3435
  src: c.preview,
3438
3436
  alt: "",
3439
3437
  class: "w-10 h-10 object-cover"
3440
- }, null, 8, xr)
3441
- ], 10, yr))), 128))
3438
+ }, null, 8, br)
3439
+ ], 10, gr))), 128))
3442
3440
  ])
3443
3441
  ]));
3444
3442
  }
3445
- }), kr = {
3443
+ }), xr = {
3446
3444
  key: 0,
3447
3445
  class: "absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"
3448
- }, _r = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, $r = { class: "text-sm font-medium" }, Cr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Vr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Mr = { class: "flex items-center gap-1" }, Lr = ["disabled"], Sr = { class: "absolute top-4 right-4 z-[1000]" }, Br = { class: "flex flex-col gap-[2px]" }, jr = ["aria-pressed"], Er = ["aria-pressed"], Ir = ["aria-pressed"], zr = ["aria-pressed"], Ar = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Tr = {
3446
+ }, wr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, kr = { class: "text-sm font-medium" }, _r = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, $r = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Cr = { class: "flex items-center gap-1" }, Vr = ["disabled"], Mr = { class: "absolute top-4 right-4 z-[1000]" }, Lr = { class: "flex flex-col gap-[2px]" }, Sr = ["aria-pressed"], Br = ["aria-pressed"], jr = ["aria-pressed"], Er = ["aria-pressed"], Ir = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, zr = {
3449
3447
  key: 0,
3450
3448
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3451
- }, Fr = { class: "mr-auto" }, Or = { class: "font-bold" }, Ur = { class: "flex items-center" }, Dr = { class: "text-xs mr-2" }, Rr = {
3449
+ }, Ar = { class: "mr-auto" }, Tr = { class: "font-bold" }, Fr = { class: "flex items-center" }, Or = { class: "text-xs mr-2" }, Ur = {
3452
3450
  key: 0,
3453
3451
  class: "text-xs"
3454
- }, Pr = {
3452
+ }, Dr = {
3455
3453
  key: 1,
3456
3454
  class: "text-xs"
3457
- }, Hr = /* @__PURE__ */ G({
3455
+ }, Rr = /* @__PURE__ */ G({
3458
3456
  __name: "vs-input-map",
3459
3457
  props: {
3460
3458
  tools: {},
@@ -3470,7 +3468,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3470
3468
  },
3471
3469
  emits: ["update:modelValue"],
3472
3470
  setup(o, { emit: e }) {
3473
- const t = Wt(), s = o, n = e, a = S(() => s.geomType ? s.geomType.map((b) => b.toLowerCase()).filter((b) => ["marker", "polyline", "polygon", "rectangle"].includes(b)) : ["marker", "polyline", "polygon", "rectangle"]), r = w(!1), u = w("");
3471
+ const t = Kt(), s = o, n = e, a = B(() => s.geomType ? s.geomType.map((b) => b.toLowerCase()).filter((b) => ["marker", "polyline", "polygon", "rectangle"].includes(b)) : ["marker", "polyline", "polygon", "rectangle"]), r = w(!1), u = w("");
3474
3472
  function c() {
3475
3473
  const b = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
3476
3474
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
@@ -3483,9 +3481,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3483
3481
  function A() {
3484
3482
  if (!s.handleZoom) return null;
3485
3483
  let b;
3486
- const M = (N) => {
3487
- const ae = N.ctrlKey || N.metaKey, oe = N.shiftKey;
3488
- if (!ae && !oe) {
3484
+ const V = (N) => {
3485
+ const oe = N.ctrlKey || N.metaKey, ae = N.shiftKey;
3486
+ if (!oe && !ae) {
3489
3487
  r.value = !0, u.value = c(), clearTimeout(b), b = window.setTimeout(() => {
3490
3488
  r.value = !1;
3491
3489
  }, 1e3);
@@ -3503,86 +3501,86 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3503
3501
  }
3504
3502
  r.value = !1;
3505
3503
  };
3506
- return f.value && (f.value.addEventListener("wheel", M, { passive: !1 }), f.value.addEventListener("touchstart", J, { passive: !0 })), p && p.on("wheel", (N) => {
3507
- const ae = N.originalEvent.ctrlKey || N.originalEvent.metaKey, oe = N.originalEvent.shiftKey;
3508
- !ae && !oe && (N.originalEvent.preventDefault(), N.originalEvent.stopPropagation());
3504
+ return f.value && (f.value.addEventListener("wheel", V, { passive: !1 }), f.value.addEventListener("touchstart", J, { passive: !0 })), p && p.on("wheel", (N) => {
3505
+ const oe = N.originalEvent.ctrlKey || N.originalEvent.metaKey, ae = N.originalEvent.shiftKey;
3506
+ !oe && !ae && (N.originalEvent.preventDefault(), N.originalEvent.stopPropagation());
3509
3507
  }), () => {
3510
- f.value && (f.value.removeEventListener("wheel", M), f.value.removeEventListener("touchstart", J)), p && p.off("wheel"), clearTimeout(b);
3508
+ f.value && (f.value.removeEventListener("wheel", V), f.value.removeEventListener("touchstart", J)), p && p.off("wheel"), clearTimeout(b);
3511
3509
  };
3512
3510
  }
3513
- const E = w(null), O = w(6), C = w(0), h = w(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), x = w(null), B = Se();
3514
- let V;
3511
+ const E = w(null), O = w(6), C = w(0), h = w(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), x = w(null), j = tt();
3512
+ let M;
3515
3513
  const P = w("topo100");
3516
- function ee(b) {
3514
+ function te(b) {
3517
3515
  return b ? b.type === "Polygon" ? {
3518
3516
  type: "MultiPolygon",
3519
3517
  coordinates: [b.coordinates]
3520
3518
  } : (b.type === "MultiPolygon", b) : null;
3521
3519
  }
3522
- function Q() {
3523
- return new Promise((b, M) => {
3520
+ function X() {
3521
+ return new Promise((b, V) => {
3524
3522
  window.L && window.L.Draw && b(0);
3525
- const J = (ae) => {
3526
- if (Array.from(document.styleSheets).some((Ve) => Ve?.href?.includes(ae))) return;
3527
- const Me = document.createElement("link");
3528
- Me.rel = "stylesheet", Me.href = ae, document.head.appendChild(Me);
3529
- }, N = (ae) => new Promise((oe, Me) => {
3530
- const Ve = Array.from(document.scripts).find((Be) => Be.src === ae);
3531
- if (Ve) {
3532
- Ve.addEventListener("load", () => oe()), Ve.addEventListener("error", (Be) => Me(Be));
3523
+ const J = (oe) => {
3524
+ if (Array.from(document.styleSheets).some((Ie) => Ie?.href?.includes(oe))) return;
3525
+ const Ve = document.createElement("link");
3526
+ Ve.rel = "stylesheet", Ve.href = oe, document.head.appendChild(Ve);
3527
+ }, N = (oe) => new Promise((ae, Ve) => {
3528
+ const Ie = Array.from(document.scripts).find((Be) => Be.src === oe);
3529
+ if (Ie) {
3530
+ Ie.addEventListener("load", () => ae()), Ie.addEventListener("error", (Be) => Ve(Be));
3533
3531
  return;
3534
3532
  }
3535
- const Ie = document.createElement("script");
3536
- Ie.src = ae, Ie.async = !0, Ie.onload = () => oe(), Ie.onerror = (Be) => Me(Be), document.body.appendChild(Ie);
3533
+ const Se = document.createElement("script");
3534
+ Se.src = oe, Se.async = !0, Se.onload = () => ae(), Se.onerror = (Be) => Ve(Be), document.body.appendChild(Se);
3537
3535
  });
3538
- J("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), J("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(M);
3536
+ J("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), J("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(V);
3539
3537
  });
3540
3538
  }
3541
- function j() {
3542
- const b = v.toGeoJSON(), M = [];
3539
+ function S() {
3540
+ const b = v.toGeoJSON(), V = [];
3543
3541
  let J = null;
3544
- const N = (oe) => {
3545
- if (oe)
3546
- switch (oe.type) {
3542
+ const N = (ae) => {
3543
+ if (ae)
3544
+ switch (ae.type) {
3547
3545
  case "Point":
3548
- J = oe;
3546
+ J = ae;
3549
3547
  break;
3550
3548
  case "Polygon":
3551
- M.push(oe.coordinates);
3549
+ V.push(ae.coordinates);
3552
3550
  break;
3553
3551
  case "MultiPolygon":
3554
- M.push(...oe.coordinates);
3552
+ V.push(...ae.coordinates);
3555
3553
  break;
3556
3554
  case "GeometryCollection":
3557
- (oe.geometries || []).forEach(N);
3555
+ (ae.geometries || []).forEach(N);
3558
3556
  break;
3559
3557
  }
3560
3558
  };
3561
- (b?.features || []).forEach((oe) => N(oe.geometry));
3562
- const ae = J || (M.length ? { type: "MultiPolygon", coordinates: M } : null);
3563
- n("update:modelValue", ae ? ee(ae) : null), C.value = v.getLayers().length;
3559
+ (b?.features || []).forEach((ae) => N(ae.geometry));
3560
+ const oe = J || (V.length ? { type: "MultiPolygon", coordinates: V } : null);
3561
+ n("update:modelValue", oe ? te(oe) : null), C.value = v.getLayers().length;
3564
3562
  }
3565
- function q(b = 30) {
3566
- const M = v.getLayers();
3567
- if (!M.length) return;
3568
- const N = L.featureGroup(M).getBounds();
3563
+ function W(b = 30) {
3564
+ const V = v.getLayers();
3565
+ if (!V.length) return;
3566
+ const N = L.featureGroup(V).getBounds();
3569
3567
  N && N.isValid() && p.fitBounds(N, { padding: [b, b] });
3570
3568
  }
3571
- function X() {
3569
+ function Q() {
3572
3570
  I.value?.click();
3573
3571
  }
3574
3572
  const Z = w("");
3575
- function D(b) {
3573
+ function U(b) {
3576
3574
  return b instanceof L.Circle ? "Circle" : b instanceof L.Rectangle ? "Rectangle" : b instanceof L.Polygon && !(b instanceof L.Rectangle) ? "Polygon" : b instanceof L.Polyline && !(b instanceof L.Polygon) ? "Polyline" : b instanceof L.Marker ? "Point" : "Feature";
3577
3575
  }
3578
3576
  function F(b) {
3579
3577
  if (b instanceof L.Circle) {
3580
- const M = b.getRadius();
3581
- return Math.PI * (M * M) / 1e6;
3578
+ const V = b.getRadius();
3579
+ return Math.PI * (V * V) / 1e6;
3582
3580
  }
3583
3581
  if (b instanceof L.Polygon || b instanceof L.Rectangle)
3584
3582
  try {
3585
- const M = b.getLatLngs(), J = Array.isArray(M[0]) ? M[0] : M, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(J) : 0;
3583
+ const V = b.getLatLngs(), J = Array.isArray(V[0]) ? V[0] : V, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(J) : 0;
3586
3584
  return N ? N / 1e6 : 0;
3587
3585
  } catch {
3588
3586
  return null;
@@ -3598,50 +3596,50 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3598
3596
  x.value = null, C.value = 0;
3599
3597
  return;
3600
3598
  }
3601
- const M = b[b.length - 1], J = D(M), N = z(M), ae = F(M);
3599
+ const V = b[b.length - 1], J = U(V), N = z(V), oe = F(V);
3602
3600
  x.value = {
3603
3601
  type: J,
3604
3602
  center: N,
3605
- areaKm2: ae,
3606
- layer: M
3603
+ areaKm2: oe,
3604
+ layer: V
3607
3605
  }, C.value = b.length;
3608
3606
  }
3609
- function le() {
3607
+ function ee() {
3610
3608
  const b = x.value?.layer;
3611
3609
  b && (b instanceof L.Circle && b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && p.setView(b.getLatLng(), Math.max(O.value, 14)));
3612
3610
  }
3613
- function pe() {
3611
+ function ge() {
3614
3612
  const b = x.value?.layer;
3615
- b && (v.removeLayer(b), j(), H());
3613
+ b && (v.removeLayer(b), S(), H());
3616
3614
  }
3617
3615
  ye(async () => {
3618
- document.addEventListener("wheel", $, { passive: !1 }), await Q(), L.drawLocal = Ds;
3616
+ document.addEventListener("wheel", $, { passive: !1 }), await X(), L.drawLocal = Os;
3619
3617
  const b = s.handleZoom;
3620
3618
  p = L.map(f.value, {
3621
3619
  zoomControl: !1,
3622
3620
  scrollWheelZoom: !b
3623
3621
  }).setView(h.value, 10), setTimeout(() => {
3624
3622
  m = A();
3625
- }, 100), L.control.zoom({ position: "bottomright" }).addTo(p), P.value = Object.keys(B)[0], V = L.tileLayer(B[P.value].url, { maxZoom: 19, minZoom: 6 }).addTo(p), v = new L.FeatureGroup().addTo(p), p.on(L.Draw.Event.CREATED, (N) => {
3626
- const { layer: ae } = N;
3627
- v.clearLayers(), v.addLayer(ae), j(), H(), q(), Z.value = "";
3623
+ }, 100), L.control.zoom({ position: "bottomright" }).addTo(p), P.value = Object.keys(j)[0], M = L.tileLayer(j[P.value].url, { maxZoom: 19, minZoom: 6 }).addTo(p), v = new L.FeatureGroup().addTo(p), p.on(L.Draw.Event.CREATED, (N) => {
3624
+ const { layer: oe } = N;
3625
+ v.clearLayers(), v.addLayer(oe), S(), H(), W(), Z.value = "";
3628
3626
  }), p.on(L.Draw.Event.EDITED, () => {
3629
- j(), H(), q();
3627
+ S(), H(), W();
3630
3628
  }), p.on(L.Draw.Event.DELETED, () => {
3631
- j(), H(), q();
3629
+ S(), H(), W();
3632
3630
  });
3633
- let M = !1;
3631
+ let V = !1;
3634
3632
  p.on("mousemove", (N) => {
3635
- M || (p.invalidateSize(), M = !0), E.value = N.latlng;
3633
+ V || (p.invalidateSize(), V = !0), E.value = N.latlng;
3636
3634
  }), p.on("zoomend", () => {
3637
3635
  O.value = p.getZoom();
3638
3636
  });
3639
- const J = Rs(s.modelValue);
3637
+ const J = Us(s.modelValue);
3640
3638
  if (J) {
3641
3639
  const N = [];
3642
- L.geoJSON(J).eachLayer((ae) => N.push(ae)), N.length && v.addLayer(N[0]), j(), H(), q();
3640
+ L.geoJSON(J).eachLayer((oe) => N.push(oe)), N.length && v.addLayer(N[0]), S(), H(), W();
3643
3641
  }
3644
- }), Qe(() => {
3642
+ }), Xe(() => {
3645
3643
  document.removeEventListener("wheel", $), m && m();
3646
3644
  });
3647
3645
  function we(b) {
@@ -3666,51 +3664,51 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3666
3664
  k && (k.enable(), Z.value = b);
3667
3665
  }
3668
3666
  }
3669
- function Ue() {
3670
- const b = v.toGeoJSON(), M = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), J = URL.createObjectURL(M), N = document.createElement("a");
3667
+ function Ke() {
3668
+ const b = v.toGeoJSON(), V = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), J = URL.createObjectURL(V), N = document.createElement("a");
3671
3669
  N.href = J, N.download = "data.geojson", N.click(), URL.revokeObjectURL(J);
3672
3670
  }
3673
- function We(b) {
3674
- const M = b.target, J = M.files?.[0];
3671
+ function et(b) {
3672
+ const V = b.target, J = V.files?.[0];
3675
3673
  if (!J) return;
3676
3674
  const N = new FileReader();
3677
3675
  N.onload = () => {
3678
3676
  if (typeof N.result == "string")
3679
3677
  try {
3680
- const ae = JSON.parse(N.result);
3681
- v.clearLayers(), ae && L.geoJSON({ type: "Feature", geometry: ae }).eachLayer((oe) => {
3682
- v.addLayer(oe);
3683
- }), j(), H(), q();
3678
+ const oe = JSON.parse(N.result);
3679
+ v.clearLayers(), oe && L.geoJSON({ type: "Feature", geometry: oe }).eachLayer((ae) => {
3680
+ v.addLayer(ae);
3681
+ }), S(), H(), W();
3684
3682
  } finally {
3685
- M.value = "";
3683
+ V.value = "";
3686
3684
  }
3687
3685
  }, N.readAsText(J);
3688
3686
  }
3689
- function lt(b) {
3690
- p && (V && p.removeLayer(V), V = L.tileLayer(B[b].url, { maxZoom: 19, minZoom: 6 }).addTo(p), P.value = b);
3687
+ function Ue(b) {
3688
+ p && (M && p.removeLayer(M), M = L.tileLayer(j[b].url, { maxZoom: 19, minZoom: 6 }).addTo(p), P.value = b);
3691
3689
  }
3692
- function De(b) {
3693
- const M = L.latLng(b[0], b[1]);
3694
- p.setView(M, 13);
3690
+ function Le(b) {
3691
+ const V = L.latLng(b[0], b[1]);
3692
+ p.setView(V, 13);
3695
3693
  }
3696
3694
  ue(
3697
3695
  () => s.modelValue,
3698
3696
  (b) => {
3699
- const M = ee(b);
3700
- if (b && M !== b) {
3701
- n("update:modelValue", M);
3697
+ const V = te(b);
3698
+ if (b && V !== b) {
3699
+ n("update:modelValue", V);
3702
3700
  return;
3703
3701
  }
3704
- v.clearLayers(), M && L.geoJSON({ type: "Feature", geometry: M }).eachLayer((J) => {
3702
+ v.clearLayers(), V && L.geoJSON({ type: "Feature", geometry: V }).eachLayer((J) => {
3705
3703
  v.addLayer(J), J.dragging?.enable(), J.dragging?.enabled(), J.on("dragend", (N) => {
3706
- const oe = N.target.getLatLng();
3707
- n("update:modelValue", { type: "Point", coordinates: [oe.lng, oe.lat] });
3704
+ const ae = N.target.getLatLng();
3705
+ n("update:modelValue", { type: "Point", coordinates: [ae.lng, ae.lat] });
3708
3706
  });
3709
- }), C.value = v.getLayers().length, H(), q();
3707
+ }), C.value = v.getLayers().length, H(), W();
3710
3708
  }
3711
3709
  );
3712
- function Se() {
3713
- return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((b, M) => Object.assign(b, { key: `b${M}`, preview: b.preview || b.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((b, M) => ({ ...b, [M.key]: M }), {}) : {
3710
+ function tt() {
3711
+ return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((b, V) => Object.assign(b, { key: `b${V}`, preview: b.preview || b.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((b, V) => ({ ...b, [V.key]: V }), {}) : {
3714
3712
  topo100: {
3715
3713
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
3716
3714
  preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
@@ -3730,7 +3728,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3730
3728
  setTimeout(() => {
3731
3729
  p.invalidateSize();
3732
3730
  }, 50);
3733
- }), (b, M) => (i(), d("div", {
3731
+ }), (b, V) => (i(), d("div", {
3734
3732
  class: T(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: Te.value }])
3735
3733
  }, [
3736
3734
  l("div", {
@@ -3748,143 +3746,143 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3748
3746
  "leave-to-class": "opacity-0"
3749
3747
  }, {
3750
3748
  default: Ee(() => [
3751
- r.value && s.handleZoom ? (i(), d("div", kr, [
3752
- l("div", _r, [
3753
- l("p", $r, W(u.value), 1)
3749
+ r.value && s.handleZoom ? (i(), d("div", xr, [
3750
+ l("div", wr, [
3751
+ l("p", kr, K(u.value), 1)
3754
3752
  ])
3755
- ])) : U("", !0)
3753
+ ])) : D("", !0)
3756
3754
  ]),
3757
3755
  _: 1
3758
3756
  }),
3759
- l("div", Cr, [
3760
- R(hr, { onGoToCoordinates: De }),
3761
- l("div", Vr, [
3762
- l("div", Mr, [
3757
+ l("div", _r, [
3758
+ R(vr, { onGoToCoordinates: Le }),
3759
+ l("div", $r, [
3760
+ l("div", Cr, [
3763
3761
  l("button", {
3764
3762
  type: "button",
3765
3763
  class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition",
3766
- onClick: X
3764
+ onClick: Q
3767
3765
  }, "Import"),
3768
3766
  l("button", {
3769
3767
  type: "button",
3770
3768
  class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200 disabled:hover:bg-gray-100 disabled:hover:text-gray-400",
3771
- onClick: Ue,
3769
+ onClick: Ke,
3772
3770
  disabled: C.value === 0
3773
- }, "Export", 8, Lr)
3771
+ }, "Export", 8, Vr)
3774
3772
  ]),
3775
3773
  l("input", {
3776
3774
  ref_key: "importRef",
3777
3775
  ref: I,
3778
3776
  type: "file",
3779
- onChange: We,
3777
+ onChange: et,
3780
3778
  accept: ".json,.geojson",
3781
3779
  class: "hidden"
3782
3780
  }, null, 544)
3783
3781
  ])
3784
3782
  ]),
3785
- l("div", Sr, [
3786
- l("div", Br, [
3783
+ l("div", Mr, [
3784
+ l("div", Lr, [
3787
3785
  a.value.includes("marker") ? (i(), d("button", {
3788
3786
  key: 0,
3789
3787
  class: T(["vs-btn", { "vs-active": Z.value === "marker" }]),
3790
3788
  "aria-pressed": Z.value === "marker",
3791
3789
  title: "Point (P)",
3792
3790
  "aria-label": "Draw point",
3793
- onClick: M[0] || (M[0] = (J) => we("marker"))
3791
+ onClick: V[0] || (V[0] = (J) => we("marker"))
3794
3792
  }, [
3795
- R(Gs)
3796
- ], 10, jr)) : U("", !0),
3793
+ R(Hs)
3794
+ ], 10, Sr)) : D("", !0),
3797
3795
  a.value.includes("polyline") ? (i(), d("button", {
3798
3796
  key: 1,
3799
3797
  class: T(["vs-btn", { "vs-active": Z.value === "polyline" }]),
3800
3798
  "aria-pressed": Z.value === "polyline",
3801
3799
  title: "Line (L)",
3802
3800
  "aria-label": "Draw polyline",
3803
- onClick: M[1] || (M[1] = (J) => we("polyline"))
3801
+ onClick: V[1] || (V[1] = (J) => we("polyline"))
3804
3802
  }, [
3805
- R(Zs)
3806
- ], 10, Er)) : U("", !0),
3803
+ R(Ks)
3804
+ ], 10, Br)) : D("", !0),
3807
3805
  a.value.includes("polygon") ? (i(), d("button", {
3808
3806
  key: 2,
3809
3807
  class: T(["vs-btn", { "vs-active": Z.value === "polygon" }]),
3810
3808
  "aria-pressed": Z.value === "polygon",
3811
3809
  title: "Polygon (G)",
3812
3810
  "aria-label": "Draw polygon",
3813
- onClick: M[2] || (M[2] = (J) => we("polygon"))
3811
+ onClick: V[2] || (V[2] = (J) => we("polygon"))
3814
3812
  }, [
3815
- R(Qs)
3816
- ], 10, Ir)) : U("", !0),
3813
+ R(Ys)
3814
+ ], 10, jr)) : D("", !0),
3817
3815
  a.value.includes("rectangle") ? (i(), d("button", {
3818
3816
  key: 3,
3819
3817
  class: T(["vs-btn", { "vs-active": Z.value === "rectangle" }]),
3820
3818
  "aria-pressed": Z.value === "rectangle",
3821
3819
  title: "Rectangle (R)",
3822
3820
  "aria-label": "Draw rectangle",
3823
- onClick: M[3] || (M[3] = (J) => we("rectangle"))
3821
+ onClick: V[3] || (V[3] = (J) => we("rectangle"))
3824
3822
  }, [
3825
- R(or)
3826
- ], 10, zr)) : U("", !0),
3823
+ R(tr)
3824
+ ], 10, Er)) : D("", !0),
3827
3825
  l("button", {
3828
3826
  class: "vs-btn mt-5",
3829
- onClick: M[4] || (M[4] = (J) => {
3827
+ onClick: V[4] || (V[4] = (J) => {
3830
3828
  Te.value = !Te.value;
3831
3829
  }),
3832
3830
  title: "Full Screen",
3833
3831
  "aria-label": "Full Screen"
3834
3832
  }, [
3835
- R(rr, { style: { width: "12px", height: "12px" } })
3833
+ R(ar, { style: { width: "12px", height: "12px" } })
3836
3834
  ])
3837
3835
  ])
3838
3836
  ]),
3839
3837
  l("div", {
3840
3838
  class: T(["absolute left-4 z-[1000]", x.value ? "bottom-8" : "bottom-4"])
3841
3839
  }, [
3842
- R(wr, {
3843
- basemaps: te(B),
3844
- onOnLayerChange: lt
3840
+ R(yr, {
3841
+ basemaps: le(j),
3842
+ onOnLayerChange: Ue
3845
3843
  }, null, 8, ["basemaps"])
3846
3844
  ], 2),
3847
- l("div", Ar, [
3848
- x.value ? (i(), d("div", Tr, [
3849
- l("div", Fr, [
3850
- M[7] || (M[7] = ge(" Тип: ", -1)),
3851
- l("span", Or, W(x.value.type), 1)
3845
+ l("div", Ir, [
3846
+ x.value ? (i(), d("div", zr, [
3847
+ l("div", Ar, [
3848
+ V[7] || (V[7] = he(" Тип: ", -1)),
3849
+ l("span", Tr, K(x.value.type), 1)
3852
3850
  ]),
3853
- l("div", Ur, [
3854
- l("div", Dr, [
3855
- M[8] || (M[8] = ge(" Центр: ", -1)),
3856
- l("b", null, W(x.value.center.lat.toFixed(5)) + ", " + W(x.value.center.lng.toFixed(5)), 1)
3851
+ l("div", Fr, [
3852
+ l("div", Or, [
3853
+ V[8] || (V[8] = he(" Центр: ", -1)),
3854
+ l("b", null, K(x.value.center.lat.toFixed(5)) + ", " + K(x.value.center.lng.toFixed(5)), 1)
3857
3855
  ]),
3858
- x.value.areaKm2 !== null ? (i(), d("div", Rr, [
3859
- M[9] || (M[9] = ge(" Площа: ", -1)),
3860
- l("b", null, W(x.value.areaKm2.toFixed(1)) + "км²", 1)
3861
- ])) : (i(), d("div", Pr, M[10] || (M[10] = [
3862
- ge(" Площа: ", -1),
3856
+ x.value.areaKm2 !== null ? (i(), d("div", Ur, [
3857
+ V[9] || (V[9] = he(" Площа: ", -1)),
3858
+ l("b", null, K(x.value.areaKm2.toFixed(1)) + "км²", 1)
3859
+ ])) : (i(), d("div", Dr, V[10] || (V[10] = [
3860
+ he(" Площа: ", -1),
3863
3861
  l("b", null, "—", -1)
3864
3862
  ]))),
3865
3863
  l("button", {
3866
3864
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3867
3865
  title: "Наблизити",
3868
- onClick: M[5] || (M[5] = (J) => le())
3869
- }, M[11] || (M[11] = [
3866
+ onClick: V[5] || (V[5] = (J) => ee())
3867
+ }, V[11] || (V[11] = [
3870
3868
  xe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-77633b64><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-77633b64></path><path d="M7 10l6 0" data-v-77633b64></path><path d="M10 7l0 6" data-v-77633b64></path><path d="M21 21l-6 -6" data-v-77633b64></path></svg>', 1)
3871
3869
  ])),
3872
3870
  l("button", {
3873
3871
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3874
3872
  title: "Видалити",
3875
- onClick: M[6] || (M[6] = (J) => pe())
3873
+ onClick: V[6] || (V[6] = (J) => ge())
3876
3874
  }, [
3877
- R(tt, { class: "w-3 h-3" })
3875
+ R(Qe, { class: "w-3 h-3" })
3878
3876
  ])
3879
3877
  ])
3880
- ])) : U("", !0)
3878
+ ])) : D("", !0)
3881
3879
  ])
3882
3880
  ], 2));
3883
3881
  }
3884
- }), Nr = /* @__PURE__ */ Y(Hr, [["__scopeId", "data-v-77633b64"]]), Gr = ["data-focus"], qr = { class: "flex items-center" }, Kr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Wr = ["onClick", "aria-label"], Zr = {
3882
+ }), Pr = /* @__PURE__ */ Y(Rr, [["__scopeId", "data-v-77633b64"]]), Hr = ["data-focus"], Nr = { class: "flex items-center" }, Gr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, qr = ["onClick", "aria-label"], Kr = {
3885
3883
  key: 0,
3886
3884
  class: "absolute text-gray-500 truncate pl-2"
3887
- }, Jr = { class: "flex-1 min-w-[2px]" }, Yr = ["placeholder"], Xr = { class: "flex items-center shrink-0" }, Qr = ["disabled"], ei = /* @__PURE__ */ G({
3885
+ }, Wr = { class: "flex-1 min-w-[2px]" }, Zr = ["placeholder"], Jr = { class: "flex items-center shrink-0" }, Yr = ["disabled"], Xr = /* @__PURE__ */ G({
3888
3886
  __name: "vs-input-tag",
3889
3887
  props: /* @__PURE__ */ ie({
3890
3888
  unique: { type: Boolean, default: !0 },
@@ -3903,32 +3901,32 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3903
3901
  setup(o, { emit: e }) {
3904
3902
  const t = o, s = e;
3905
3903
  Ce(t.style);
3906
- const n = w(null), a = w(null), r = w(null), u = w(!1), c = w(""), f = de(o, "modelValue"), p = S(() => t.placeholder || "Add tag…"), v = S(() => f.value?.length === 0 && c.value === ""), k = S(() => !t.disabled && f.value?.length > 0), m = S(() => t.disabled), I = async () => {
3904
+ const n = w(null), a = w(null), r = w(null), u = w(!1), c = w(""), f = de(o, "modelValue"), p = B(() => t.placeholder || "Add tag…"), v = B(() => f.value?.length === 0 && c.value === ""), k = B(() => !t.disabled && f.value?.length > 0), m = B(() => t.disabled), I = async () => {
3907
3905
  m.value || await je(() => r.value?.focus());
3908
- }, $ = (B) => {
3909
- const V = B.trim();
3910
- V !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [V] : t.unique ? f.value.includes(V) || (f.value = [...f.value, V]) : f.value = [...f.value, V], c.value = "");
3906
+ }, $ = (j) => {
3907
+ const M = j.trim();
3908
+ M !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [M] : t.unique ? f.value.includes(M) || (f.value = [...f.value, M]) : f.value = [...f.value, M], c.value = "");
3911
3909
  }, A = () => {
3912
- const B = c.value;
3913
- B.trim() !== "" && $(B), c.value = "";
3914
- }, E = (B) => {
3915
- const V = f.value.slice();
3916
- V.splice(B, 1), s("update:modelValue", V);
3910
+ const j = c.value;
3911
+ j.trim() !== "" && $(j), c.value = "";
3912
+ }, E = (j) => {
3913
+ const M = f.value.slice();
3914
+ M.splice(j, 1), s("update:modelValue", M);
3917
3915
  }, O = () => {
3918
3916
  s("update:modelValue", []);
3919
3917
  }, C = () => {
3920
3918
  m.value || (u.value = !0);
3921
3919
  }, h = () => {
3922
3920
  u.value = !1, !m.value && A();
3923
- }, x = (B) => {
3924
- const { key: V } = B;
3925
- V === "Enter" ? (B.preventDefault(), A()) : V === "Backspace" && c.value === "" && f.value.length > 0 && E(f.value.length - 1);
3921
+ }, x = (j) => {
3922
+ const { key: M } = j;
3923
+ M === "Enter" ? (j.preventDefault(), A()) : M === "Backspace" && c.value === "" && f.value.length > 0 && E(f.value.length - 1);
3926
3924
  };
3927
- return (B, V) => (i(), d("div", {
3925
+ return (j, M) => (i(), d("div", {
3928
3926
  class: "flex gap-1 w-full",
3929
3927
  ref_key: "root",
3930
3928
  ref: n,
3931
- onClick: V[1] || (V[1] = $e(() => {
3929
+ onClick: M[1] || (M[1] = $e(() => {
3932
3930
  }, ["stop"]))
3933
3931
  }, [
3934
3932
  l("div", {
@@ -3951,19 +3949,19 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3951
3949
  ref_key: "chipsRef",
3952
3950
  ref: a
3953
3951
  }, [
3954
- (i(!0), d(re, null, fe(f.value, (P, ee) => (i(), d("div", {
3955
- key: ee,
3952
+ (i(!0), d(re, null, pe(f.value, (P, te) => (i(), d("div", {
3953
+ key: te,
3956
3954
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3957
3955
  }, [
3958
- l("div", qr, [
3959
- l("div", Kr, W(P), 1)
3956
+ l("div", Nr, [
3957
+ l("div", Gr, K(P), 1)
3960
3958
  ]),
3961
3959
  l("div", {
3962
3960
  role: "button",
3963
3961
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3964
- onClick: $e((Q) => E(ee), ["stop"]),
3962
+ onClick: $e((X) => E(te), ["stop"]),
3965
3963
  "aria-label": `Remove ${P}`
3966
- }, V[2] || (V[2] = [
3964
+ }, M[2] || (M[2] = [
3967
3965
  l("svg", {
3968
3966
  height: "14",
3969
3967
  width: "14",
@@ -3974,11 +3972,11 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3974
3972
  }, [
3975
3973
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3976
3974
  ], -1)
3977
- ]), 8, Wr)
3975
+ ]), 8, qr)
3978
3976
  ]))), 128)),
3979
- v.value ? (i(), d("div", Zr, W(p.value), 1)) : U("", !0),
3980
- l("div", Jr, [
3981
- m.value ? U("", !0) : ne((i(), d("input", {
3977
+ v.value ? (i(), d("div", Kr, K(p.value), 1)) : D("", !0),
3978
+ l("div", Wr, [
3979
+ m.value ? D("", !0) : ne((i(), d("input", {
3982
3980
  key: 0,
3983
3981
  ref_key: "inputRef",
3984
3982
  ref: r,
@@ -3990,17 +3988,17 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3990
3988
  type: "text",
3991
3989
  tabindex: "0",
3992
3990
  "aria-label": "Add tag",
3993
- "onUpdate:modelValue": V[0] || (V[0] = (P) => c.value = P),
3991
+ "onUpdate:modelValue": M[0] || (M[0] = (P) => c.value = P),
3994
3992
  onFocus: C,
3995
3993
  onBlur: h,
3996
3994
  onKeydown: x,
3997
3995
  placeholder: f.value && f.value.length ? "" : void 0
3998
- }, null, 40, Yr)), [
3999
- [he, c.value]
3996
+ }, null, 40, Zr)), [
3997
+ [me, c.value]
4000
3998
  ])
4001
3999
  ])
4002
4000
  ], 512),
4003
- l("div", Xr, [
4001
+ l("div", Jr, [
4004
4002
  k.value ? (i(), d("button", {
4005
4003
  key: 0,
4006
4004
  type: "button",
@@ -4008,7 +4006,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4008
4006
  "aria-label": "Clear all tags",
4009
4007
  disabled: m.value,
4010
4008
  onClick: $e(O, ["stop"])
4011
- }, V[3] || (V[3] = [
4009
+ }, M[3] || (M[3] = [
4012
4010
  l("svg", {
4013
4011
  height: "20",
4014
4012
  width: "20",
@@ -4017,13 +4015,13 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4017
4015
  }, [
4018
4016
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
4019
4017
  ], -1)
4020
- ]), 8, Qr)) : U("", !0)
4018
+ ]), 8, Yr)) : D("", !0)
4021
4019
  ])
4022
- ], 10, Gr)
4020
+ ], 10, Hr)
4023
4021
  ], 2)
4024
4022
  ], 512));
4025
4023
  }
4026
- }), ti = { class: "relative flex gap-1 bg-white w-full" }, li = ["disabled", "placeholder"], oi = /* @__PURE__ */ G({
4024
+ }), Qr = { class: "relative flex gap-1 bg-white w-full" }, ei = ["disabled", "placeholder"], ti = /* @__PURE__ */ G({
4027
4025
  __name: "vs-input-slug",
4028
4026
  props: /* @__PURE__ */ ie({
4029
4027
  disabled: { type: Boolean },
@@ -4082,15 +4080,15 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4082
4080
  const r = e?.value?.[t.parent || ""]?.toString(), u = n(r);
4083
4081
  s.value = u.toString();
4084
4082
  };
4085
- return (r, u) => (i(), d("div", ti, [
4083
+ return (r, u) => (i(), d("div", Qr, [
4086
4084
  ne(l("input", {
4087
4085
  ref: "vsText",
4088
4086
  disabled: r.disabled,
4089
4087
  placeholder: r.placeholder,
4090
4088
  "onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
4091
4089
  class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
4092
- }, null, 8, li), [
4093
- [he, s.value]
4090
+ }, null, 8, ei), [
4091
+ [me, s.value]
4094
4092
  ]),
4095
4093
  l("button", {
4096
4094
  class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",
@@ -4098,7 +4096,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4098
4096
  }, " Gen ")
4099
4097
  ]));
4100
4098
  }
4101
- }), ni = /* @__PURE__ */ Y(oi, [["__scopeId", "data-v-b0eba370"]]), ai = { class: "relative flex gap-1 bg-white w-full" }, si = ["disabled", "placeholder"], ri = ["disabled"], ii = { key: 0 }, ui = { key: 1 }, di = /* @__PURE__ */ G({
4099
+ }), li = /* @__PURE__ */ Y(ti, [["__scopeId", "data-v-b0eba370"]]), oi = { class: "relative flex gap-1 bg-white w-full" }, ni = ["disabled", "placeholder"], ai = ["disabled"], si = { key: 0 }, ri = { key: 1 }, ii = /* @__PURE__ */ G({
4102
4100
  __name: "vs-input-codegen",
4103
4101
  props: /* @__PURE__ */ ie({
4104
4102
  table: {},
@@ -4119,7 +4117,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4119
4117
  }),
4120
4118
  emits: ["update:modelValue"],
4121
4119
  setup(o) {
4122
- const e = o, t = de(o, "modelValue"), s = w(!1), n = S(() => e.init !== !1), a = S(() => !!e.table && !!e.code), r = () => {
4120
+ const e = o, t = de(o, "modelValue"), s = w(!1), n = B(() => e.init !== !1), a = B(() => !!e.table && !!e.code), r = () => {
4123
4121
  if (!a.value) return "";
4124
4122
  const f = encodeURIComponent(String(e.table)), p = encodeURIComponent(String(e.code));
4125
4123
  return `/api/code-gen/${f}/${p}`;
@@ -4145,31 +4143,31 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4145
4143
  () => {
4146
4144
  c();
4147
4145
  }
4148
- ), (f, p) => (i(), d("div", ai, [
4146
+ ), (f, p) => (i(), d("div", oi, [
4149
4147
  ne(l("input", {
4150
4148
  disabled: f.disabled,
4151
4149
  placeholder: f.placeholder,
4152
4150
  "onUpdate:modelValue": p[0] || (p[0] = (v) => t.value = v),
4153
4151
  class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
4154
- }, null, 8, si), [
4155
- [he, t.value]
4152
+ }, null, 8, ni), [
4153
+ [me, t.value]
4156
4154
  ]),
4157
4155
  l("button", {
4158
4156
  class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed",
4159
4157
  disabled: s.value || f.disabled || !a.value,
4160
4158
  onClick: u
4161
4159
  }, [
4162
- s.value ? (i(), d("span", ui, "...")) : (i(), d("span", ii, "Gen"))
4163
- ], 8, ri)
4160
+ s.value ? (i(), d("span", ri, "...")) : (i(), d("span", si, "Gen"))
4161
+ ], 8, ai)
4164
4162
  ]));
4165
4163
  }
4166
- }), ci = /* @__PURE__ */ Y(di, [["__scopeId", "data-v-6ee5237d"]]), pi = { class: "w-full" }, fi = {
4164
+ }), ui = /* @__PURE__ */ Y(ii, [["__scopeId", "data-v-6ee5237d"]]), di = { class: "w-full" }, ci = {
4167
4165
  ref: "sortableContainer",
4168
4166
  class: "flex flex-col gap-1"
4169
- }, vi = ["onDragstart", "onDrop"], mi = { class: "w-1/3" }, hi = { class: "w-2/3" }, gi = ["onClick"], bi = {
4167
+ }, pi = ["onDragstart", "onDrop"], fi = { class: "w-1/3" }, vi = { class: "w-2/3" }, mi = ["onClick"], hi = {
4170
4168
  key: 0,
4171
4169
  class: "text-[14px] text-gray-700"
4172
- }, yi = { class: "mt-2 w-full flex items-center" }, xi = ["disabled"], wi = /* @__PURE__ */ G({
4170
+ }, gi = { class: "mt-2 w-full flex items-center" }, bi = ["disabled"], yi = /* @__PURE__ */ G({
4173
4171
  __name: "vs-input-key-value",
4174
4172
  props: {
4175
4173
  parent: {},
@@ -4196,7 +4194,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4196
4194
  const E = c.value.splice(f.value, 1)[0];
4197
4195
  c.value.splice(A, 0, E), f.value = null;
4198
4196
  }
4199
- const m = S(
4197
+ const m = B(
4200
4198
  () => c.value.some((A) => A.key && !A.value || !A.key && A.value)
4201
4199
  ), I = () => {
4202
4200
  c.value.push({ id: t("key-value-"), key: "", value: "" });
@@ -4219,9 +4217,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4219
4217
  }), a("update:modelValue", E);
4220
4218
  },
4221
4219
  { deep: !0 }
4222
- ), (A, E) => (i(), d("div", pi, [
4223
- l("div", fi, [
4224
- (i(!0), d(re, null, fe(c.value, (O, C) => (i(), d("div", {
4220
+ ), (A, E) => (i(), d("div", di, [
4221
+ l("div", ci, [
4222
+ (i(!0), d(re, null, pe(c.value, (O, C) => (i(), d("div", {
4225
4223
  key: O.id,
4226
4224
  class: T(["flex items-center gap-2 w-full", { "opacity-50": f.value === C }]),
4227
4225
  draggable: "true",
@@ -4231,15 +4229,15 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4231
4229
  onDrop: (h) => k(C)
4232
4230
  }, [
4233
4231
  E[1] || (E[1] = xe('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>', 1)),
4234
- l("div", mi, [
4235
- R(Xe, {
4232
+ l("div", fi, [
4233
+ R(Ye, {
4236
4234
  modelValue: O.key,
4237
4235
  "onUpdate:modelValue": (h) => O.key = h,
4238
4236
  placeholder: "Ключ"
4239
4237
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
4240
4238
  ]),
4241
- l("div", hi, [
4242
- R(Xe, {
4239
+ l("div", vi, [
4240
+ R(Ye, {
4243
4241
  modelValue: O.value,
4244
4242
  "onUpdate:modelValue": (h) => O.value = h,
4245
4243
  placeholder: "Значення"
@@ -4249,31 +4247,31 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4249
4247
  onClick: (h) => $(O.id),
4250
4248
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
4251
4249
  }, [
4252
- R(te(Kl), {
4250
+ R(le(ql), {
4253
4251
  height: "16",
4254
4252
  width: "16"
4255
4253
  })
4256
- ], 8, gi)
4257
- ], 42, vi))), 128))
4254
+ ], 8, mi)
4255
+ ], 42, pi))), 128))
4258
4256
  ], 512),
4259
- c.value.length ? U("", !0) : (i(), d("span", bi, " Дані для відображення відсутні ")),
4260
- l("div", yi, [
4257
+ c.value.length ? D("", !0) : (i(), d("span", hi, " Дані для відображення відсутні ")),
4258
+ l("div", gi, [
4261
4259
  l("button", {
4262
4260
  type: "button",
4263
4261
  onClick: I,
4264
4262
  disabled: m.value,
4265
4263
  class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
4266
4264
  }, [
4267
- R(qe, {
4265
+ R(Ge, {
4268
4266
  height: "14",
4269
4267
  width: "14"
4270
4268
  }),
4271
- ge(" " + W(te(r)), 1)
4272
- ], 8, xi)
4269
+ he(" " + K(le(r)), 1)
4270
+ ], 8, bi)
4273
4271
  ])
4274
4272
  ]));
4275
4273
  }
4276
- }), ki = /* @__PURE__ */ Y(wi, [["__scopeId", "data-v-a0f7fbfc"]]), _i = { class: "flex items-center gap-2 w-full" }, $i = ["disabled"], Ci = /* @__PURE__ */ G({
4274
+ }), xi = /* @__PURE__ */ Y(yi, [["__scopeId", "data-v-a0f7fbfc"]]), wi = { class: "flex items-center gap-2 w-full" }, ki = ["disabled"], _i = /* @__PURE__ */ G({
4277
4275
  __name: "vs-input-color",
4278
4276
  props: {
4279
4277
  style: { default: () => ({}) },
@@ -4286,30 +4284,30 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4286
4284
  },
4287
4285
  emits: ["update:modelValue"],
4288
4286
  setup(o, { emit: e }) {
4289
- const t = o, { inputClass: s } = Ce(t.style), n = e, a = S({
4287
+ const t = o, { inputClass: s } = Ce(t.style), n = e, a = B({
4290
4288
  get: () => t.modelValue || "#000000",
4291
4289
  set: (r) => n("update:modelValue", r)
4292
4290
  });
4293
- return (r, u) => (i(), d("div", _i, [
4291
+ return (r, u) => (i(), d("div", wi, [
4294
4292
  ne(l("input", {
4295
4293
  type: "color",
4296
4294
  "onUpdate:modelValue": u[0] || (u[0] = (c) => a.value = c),
4297
4295
  disabled: r.disabled,
4298
4296
  ref: "color",
4299
- class: T(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", te(s)].join(" ")]),
4297
+ class: T(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", le(s)].join(" ")]),
4300
4298
  style: { border: "1px solid #CFD9E0" }
4301
- }, null, 10, $i), [
4302
- [he, a.value]
4299
+ }, null, 10, ki), [
4300
+ [me, a.value]
4303
4301
  ]),
4304
4302
  ne(l("input", {
4305
4303
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
4306
4304
  "onUpdate:modelValue": u[1] || (u[1] = (c) => a.value = c)
4307
4305
  }, null, 512), [
4308
- [he, a.value]
4306
+ [me, a.value]
4309
4307
  ])
4310
4308
  ]));
4311
4309
  }
4312
- }), Vi = { class: "flex items-center gap-2 w-full" }, Mi = ["min", "max", "step", "disabled"], Li = /* @__PURE__ */ G({
4310
+ }), $i = { class: "flex items-center gap-2 w-full" }, Ci = ["min", "max", "step", "disabled"], Vi = /* @__PURE__ */ G({
4313
4311
  __name: "vs-input-range",
4314
4312
  props: {
4315
4313
  style: { default: () => ({}) },
@@ -4325,11 +4323,11 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4325
4323
  },
4326
4324
  emits: ["update:modelValue"],
4327
4325
  setup(o, { emit: e }) {
4328
- const t = o, { inputClass: s } = Ce(t.style), n = e, a = S({
4326
+ const t = o, { inputClass: s } = Ce(t.style), n = e, a = B({
4329
4327
  get: () => Number(t.modelValue ?? t.min),
4330
4328
  set: (r) => n("update:modelValue", Number(r))
4331
4329
  });
4332
- return (r, u) => (i(), d("div", Vi, [
4330
+ return (r, u) => (i(), d("div", $i, [
4333
4331
  ne(l("input", {
4334
4332
  type: "range",
4335
4333
  "onUpdate:modelValue": u[0] || (u[0] = (c) => a.value = c),
@@ -4338,20 +4336,20 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4338
4336
  step: r.step,
4339
4337
  disabled: r.disabled,
4340
4338
  ref: "range",
4341
- class: T(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", te(s)].join(" ")])
4342
- }, null, 10, Mi), [
4343
- [he, a.value]
4339
+ class: T(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", le(s)].join(" ")])
4340
+ }, null, 10, Ci), [
4341
+ [me, a.value]
4344
4342
  ]),
4345
4343
  ne(l("input", {
4346
4344
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
4347
4345
  type: "number",
4348
4346
  "onUpdate:modelValue": u[1] || (u[1] = (c) => a.value = c)
4349
4347
  }, null, 512), [
4350
- [he, a.value]
4348
+ [me, a.value]
4351
4349
  ])
4352
4350
  ]));
4353
4351
  }
4354
- }), Si = ["type", "value", "onInput", "placeholder", "disabled"], Bi = /* @__PURE__ */ G({
4352
+ }), Mi = ["type", "value", "onInput", "placeholder", "disabled"], Li = /* @__PURE__ */ G({
4355
4353
  __name: "vs-input-array",
4356
4354
  props: /* @__PURE__ */ ie({
4357
4355
  count: { default: 1 },
@@ -4371,7 +4369,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4371
4369
  emits: ["update:modelValue"],
4372
4370
  setup(o) {
4373
4371
  const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
4374
- Zt(() => {
4372
+ Wt(() => {
4375
4373
  const a = s.value?.length ?? 0;
4376
4374
  a < e.count && (s.value = [
4377
4375
  ...s.value ?? [],
@@ -4385,49 +4383,49 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4385
4383
  return (a, r) => (i(), d("div", {
4386
4384
  class: T(["grid gap-2", `grid-cols-${a.limit}`])
4387
4385
  }, [
4388
- (i(!0), d(re, null, fe(a.count, (u) => (i(), d("input", {
4386
+ (i(!0), d(re, null, pe(a.count, (u) => (i(), d("input", {
4389
4387
  type: a.inputType,
4390
4388
  value: s.value?.[u - 1] ?? "",
4391
4389
  onInput: (c) => n(c, u - 1),
4392
4390
  placeholder: a.placeholder,
4393
4391
  disabled: a.disabled,
4394
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": a.error }]]),
4392
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": a.error }]]),
4395
4393
  style: {
4396
4394
  border: "1px solid #CFD9E0"
4397
4395
  }
4398
- }, null, 42, Si))), 256))
4396
+ }, null, 42, Mi))), 256))
4399
4397
  ], 2));
4400
4398
  }
4401
- }), ji = {
4402
- VsInputText: Xe,
4403
- VsInputRadio: _t,
4404
- "vs-input-text": Xe,
4405
- "vs-input-password": wl,
4406
- "vs-input-textarea": Ia,
4407
- "vs-input-mask": no,
4408
- "vs-input-number": $l,
4409
- "vs-input-radio": _t,
4410
- "vs-input-select": Mt,
4411
- "vs-input-switcher": At,
4412
- "vs-input-static": kt,
4413
- "vs-input-container": ca,
4414
- "vs-input-date": ko,
4415
- "vs-input-checkbox": xo,
4416
- "vs-input-file": dn,
4417
- "vs-input-html": kt,
4418
- "vs-input-email": ro,
4419
- "vs-input-datatable": Us,
4420
- "vs-input-map": Nr,
4421
- "vs-input-file-list": Dn,
4422
- "vs-input-tags": ei,
4423
- "vs-input-slug": ni,
4424
- "vs-input-codegen": ci,
4425
- "vs-input-key-value": ki,
4426
- "vs-input-range": Li,
4427
- "vs-input-color": Ci,
4428
- "vs-input-native-select": Mt,
4429
- "vs-input-array": Bi
4430
- }, Ei = /* @__PURE__ */ G({
4399
+ }), Si = {
4400
+ VsInputText: Ye,
4401
+ VsInputRadio: kt,
4402
+ "vs-input-text": Ye,
4403
+ "vs-input-password": xl,
4404
+ "vs-input-textarea": ja,
4405
+ "vs-input-mask": oo,
4406
+ "vs-input-number": _l,
4407
+ "vs-input-radio": kt,
4408
+ "vs-input-select": Vt,
4409
+ "vs-input-switcher": zt,
4410
+ "vs-input-static": wt,
4411
+ "vs-input-container": da,
4412
+ "vs-input-date": wo,
4413
+ "vs-input-checkbox": yo,
4414
+ "vs-input-file": un,
4415
+ "vs-input-html": wt,
4416
+ "vs-input-email": so,
4417
+ "vs-input-datatable": Fs,
4418
+ "vs-input-map": Pr,
4419
+ "vs-input-file-list": Un,
4420
+ "vs-input-tags": Xr,
4421
+ "vs-input-slug": li,
4422
+ "vs-input-codegen": ui,
4423
+ "vs-input-key-value": xi,
4424
+ "vs-input-range": Vi,
4425
+ "vs-input-color": _i,
4426
+ "vs-input-native-select": Vt,
4427
+ "vs-input-array": Li
4428
+ }, Bi = /* @__PURE__ */ G({
4431
4429
  __name: "behavior",
4432
4430
  props: {
4433
4431
  api: {},
@@ -4457,12 +4455,12 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4457
4455
  return (n, a) => (i(), d("button", {
4458
4456
  onClick: s,
4459
4457
  class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
4460
- }, W(n.button), 1));
4458
+ }, K(n.button), 1));
4461
4459
  }
4462
- }), Ii = { class: "flex flex-col gap-1 w-full" }, zi = {
4460
+ }), ji = { class: "flex flex-col gap-1 w-full" }, Ei = {
4463
4461
  key: 0,
4464
4462
  class: "text-sm text-gray-500"
4465
- }, Ut = /* @__PURE__ */ G({
4463
+ }, Ot = /* @__PURE__ */ G({
4466
4464
  __name: "vs-compact-form-layout",
4467
4465
  props: /* @__PURE__ */ ie({
4468
4466
  item: { default: {} },
@@ -4477,18 +4475,18 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4477
4475
  }),
4478
4476
  emits: ["update:modelValue"],
4479
4477
  setup(o) {
4480
- const e = o, t = de(o, "modelValue"), s = S(() => yl[`${e.layout}`]), n = S(() => ji?.[`vs-input-${e.item.type}`]), a = S(() => {
4481
- const u = te(n);
4478
+ const e = o, t = de(o, "modelValue"), s = B(() => bl[`${e.layout}`]), n = B(() => Si?.[`vs-input-${e.item.type}`]), a = B(() => {
4479
+ const u = le(n);
4482
4480
  if (!u) return /* @__PURE__ */ new Set();
4483
4481
  const c = u.props ?? u.__vccOpts?.props;
4484
4482
  if (!c) return /* @__PURE__ */ new Set();
4485
4483
  const f = Array.isArray(c) ? c : Object.keys(c);
4486
4484
  return new Set(f);
4487
- }), r = S(() => {
4485
+ }), r = B(() => {
4488
4486
  const u = e.item ?? {}, c = a.value;
4489
4487
  return c.size ? Object.fromEntries(Object.entries(u).filter(([f]) => c.has(f))) : {};
4490
4488
  });
4491
- return (u, c) => ne((i(), me(Oe(s.value), {
4489
+ return (u, c) => (i(), ve(Oe(s.value), {
4492
4490
  ua: e.item.ua,
4493
4491
  error: e.error || "",
4494
4492
  item: u.item,
@@ -4499,22 +4497,20 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4499
4497
  l("div", {
4500
4498
  class: T(["flex w-full", `${e.item.type}-component`])
4501
4499
  }, [
4502
- l("div", Ii, [
4503
- (i(), me(Oe(n.value), Fe(r.value, {
4500
+ l("div", ji, [
4501
+ (i(), ve(Oe(n.value), Fe(r.value, {
4504
4502
  modelValue: t.value,
4505
4503
  "onUpdate:modelValue": c[0] || (c[0] = (f) => t.value = f)
4506
4504
  }), null, 16, ["modelValue"])),
4507
- u.item.description && e.layout !== "settings" ? (i(), d("p", zi, W(u.item.description), 1)) : U("", !0)
4505
+ u.item.description && e.layout !== "settings" ? (i(), d("p", Ei, K(u.item.description), 1)) : D("", !0)
4508
4506
  ]),
4509
- u.item.behavior?.api && u.item.behavior?.button ? (i(), me(Ei, Fe({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : U("", !0)
4507
+ u.item.behavior?.api && u.item.behavior?.button ? (i(), ve(Bi, Fe({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
4510
4508
  ], 2)
4511
4509
  ]),
4512
4510
  _: 1
4513
- }, 8, ["ua", "error", "item", "columns", "label"])), [
4514
- [et, !u.item.hidden]
4515
- ]);
4511
+ }, 8, ["ua", "error", "item", "columns", "label"]));
4516
4512
  }
4517
- }), Ai = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, Ti = { class: "vs-compact-form-navigation__rail mt-[6px]" }, Fi = ["onClick"], Oi = /* @__PURE__ */ G({
4513
+ }), Ii = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, zi = { class: "vs-compact-form-navigation__rail mt-[6px]" }, Ai = ["onClick"], Ti = /* @__PURE__ */ G({
4518
4514
  __name: "vs-compact-form-navigation",
4519
4515
  props: {
4520
4516
  target: {},
@@ -4524,176 +4520,176 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4524
4520
  width: { default: 400 }
4525
4521
  },
4526
4522
  setup(o, { expose: e }) {
4527
- const t = o, s = w([]), n = w(""), a = w(""), r = S(() => !!t.enabled), u = S(() => [
4523
+ const t = o, s = w([]), n = w(""), a = w(""), r = B(() => !!t.enabled), u = B(() => [
4528
4524
  "vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
4529
4525
  "sticky top-0 self-start shrink-0",
4530
4526
  "max-h-full min-h-0 overflow-y-auto"
4531
- ]), c = S(() => {
4532
- const j = t.width;
4533
- if (j == null) return {};
4534
- const q = typeof j == "number" ? `${j}px` : `${j}`;
4535
- return { width: q, minWidth: q };
4527
+ ]), c = B(() => {
4528
+ const S = t.width;
4529
+ if (S == null) return {};
4530
+ const W = typeof S == "number" ? `${S}px` : `${S}`;
4531
+ return { width: W, minWidth: W };
4536
4532
  });
4537
4533
  let f = null, p = 0, v = 0, k = null, m = null, I = null;
4538
- const $ = () => ee(), A = () => O();
4534
+ const $ = () => te(), A = () => O();
4539
4535
  ue(
4540
4536
  () => t.target,
4541
- async (j) => {
4542
- if (B(), !j) {
4537
+ async (S) => {
4538
+ if (j(), !S) {
4543
4539
  k = null, s.value = [], n.value = "";
4544
4540
  return;
4545
4541
  }
4546
- k = j, r.value && (await je(), x(j), O());
4542
+ k = S, r.value && (await je(), x(S), O());
4547
4543
  },
4548
4544
  { immediate: !0 }
4549
4545
  ), ue(
4550
4546
  () => t.scrollContainer,
4551
- (j) => {
4547
+ (S) => {
4552
4548
  if (!r.value) {
4553
- m = j ?? null;
4549
+ m = S ?? null;
4554
4550
  return;
4555
4551
  }
4556
- E(j ?? null), je(() => O());
4552
+ E(S ?? null), je(() => O());
4557
4553
  },
4558
4554
  { immediate: !0 }
4559
4555
  ), ye(() => {
4560
4556
  t.scrollContainer || E(null), O();
4561
- }), it(() => {
4562
- B(), E(null, !0), k = null, typeof window < "u" && (p && window.cancelAnimationFrame(p), v && window.cancelAnimationFrame(v));
4557
+ }), rt(() => {
4558
+ j(), E(null, !0), k = null, typeof window < "u" && (p && window.cancelAnimationFrame(p), v && window.cancelAnimationFrame(v));
4563
4559
  });
4564
- function E(j, q = !1) {
4565
- if (I && (I(), I = null), q) {
4560
+ function E(S, W = !1) {
4561
+ if (I && (I(), I = null), W) {
4566
4562
  m = null;
4567
4563
  return;
4568
4564
  }
4569
- if (m = j ?? null, typeof window > "u") return;
4570
- const X = j ?? window, Z = window;
4571
- X.addEventListener("scroll", $, { passive: !0 }), Z.addEventListener("resize", A), I = () => {
4572
- X.removeEventListener("scroll", $), Z.removeEventListener("resize", A);
4565
+ if (m = S ?? null, typeof window > "u") return;
4566
+ const Q = S ?? window, Z = window;
4567
+ Q.addEventListener("scroll", $, { passive: !0 }), Z.addEventListener("resize", A), I = () => {
4568
+ Q.removeEventListener("scroll", $), Z.removeEventListener("resize", A);
4573
4569
  };
4574
4570
  }
4575
4571
  function O() {
4576
4572
  if (!r.value || !k) return;
4577
4573
  p && typeof window < "u" && window.cancelAnimationFrame(p);
4578
- const j = () => {
4574
+ const S = () => {
4579
4575
  C(), p = 0;
4580
4576
  };
4581
- typeof window > "u" ? j() : p = window.requestAnimationFrame(j);
4577
+ typeof window > "u" ? S() : p = window.requestAnimationFrame(S);
4582
4578
  }
4583
4579
  function C() {
4584
4580
  if (!r.value || !k) return;
4585
- const j = Array.from(k.querySelectorAll("h1, h2")), q = /* @__PURE__ */ new Set(), X = [];
4586
- j.forEach((Z, D) => {
4581
+ const S = Array.from(k.querySelectorAll("h1, h2")), W = /* @__PURE__ */ new Set(), Q = [];
4582
+ S.forEach((Z, U) => {
4587
4583
  const F = Z.textContent?.trim() ?? "";
4588
4584
  if (!F) return;
4589
4585
  let z = (Z.getAttribute("id") ?? "").trim();
4590
- z || (z = h(F) || `heading-${D + 1}`);
4591
- let H = z, le = 1;
4592
- for (; q.has(H); )
4593
- H = `${z}-${le += 1}`;
4594
- Z.id !== H && Object.assign(Z, { id: H }), q.add(H), X.push({
4586
+ z || (z = h(F) || `heading-${U + 1}`);
4587
+ let H = z, ee = 1;
4588
+ for (; W.has(H); )
4589
+ H = `${z}-${ee += 1}`;
4590
+ Z.id !== H && Object.assign(Z, { id: H }), W.add(H), Q.push({
4595
4591
  id: H,
4596
4592
  text: F,
4597
4593
  level: Z.tagName.toLowerCase() === "h1" ? 1 : 2
4598
4594
  });
4599
- }), s.value = X, X.length || (n.value = ""), P();
4595
+ }), s.value = Q, Q.length || (n.value = ""), P();
4600
4596
  }
4601
- function h(j) {
4602
- return j.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
4597
+ function h(S) {
4598
+ return S.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
4603
4599
  }
4604
- function x(j) {
4605
- !j || !r.value || typeof MutationObserver > "u" || (B(), f = new MutationObserver(() => O()), f.observe(j, { childList: !0, subtree: !0 }));
4600
+ function x(S) {
4601
+ !S || !r.value || typeof MutationObserver > "u" || (j(), f = new MutationObserver(() => O()), f.observe(S, { childList: !0, subtree: !0 }));
4606
4602
  }
4607
- function B() {
4603
+ function j() {
4608
4604
  f && (f.disconnect(), f = null);
4609
4605
  }
4610
- function V(j) {
4611
- const q = m;
4612
- if (!q)
4613
- return typeof window > "u" ? j.offsetTop : j.getBoundingClientRect().top + window.scrollY;
4614
- const X = j.getBoundingClientRect(), Z = q.getBoundingClientRect();
4615
- return X.top - Z.top + q.scrollTop;
4606
+ function M(S) {
4607
+ const W = m;
4608
+ if (!W)
4609
+ return typeof window > "u" ? S.offsetTop : S.getBoundingClientRect().top + window.scrollY;
4610
+ const Q = S.getBoundingClientRect(), Z = W.getBoundingClientRect();
4611
+ return Q.top - Z.top + W.scrollTop;
4616
4612
  }
4617
4613
  function P() {
4618
4614
  if (!r.value || !s.value.length) return;
4619
- const j = m, q = (j ? j.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), X = (j ? j.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Z = q + X;
4620
- let D = null;
4615
+ const S = m, W = (S ? S.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), Q = (S ? S.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Z = W + Q;
4616
+ let U = null;
4621
4617
  for (let z = 0; z < s.value.length; z += 1) {
4622
- const H = s.value[z], le = document.getElementById(H.id);
4623
- if (le) {
4624
- const pe = V(le);
4625
- pe + le.offsetHeight > q && pe < Z && (D = H.id);
4618
+ const H = s.value[z], ee = document.getElementById(H.id);
4619
+ if (ee) {
4620
+ const ge = M(ee);
4621
+ ge + ee.offsetHeight > W && ge < Z && (U = H.id);
4626
4622
  }
4627
4623
  }
4628
- !D && a.value && (D = a.value), D && (a.value = D);
4629
- const F = j ? j.scrollHeight - j.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
4630
- q + 5 >= F && (D = s.value[s.value.length - 1].id), D && (n.value = D);
4624
+ !U && a.value && (U = a.value), U && (a.value = U);
4625
+ const F = S ? S.scrollHeight - S.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
4626
+ W + 5 >= F && (U = s.value[s.value.length - 1].id), U && (n.value = U);
4631
4627
  }
4632
- function ee() {
4628
+ function te() {
4633
4629
  r.value && (v && window.cancelAnimationFrame(v), v = window.requestAnimationFrame(() => {
4634
4630
  P(), v = 0;
4635
4631
  }));
4636
4632
  }
4637
- function Q(j) {
4633
+ function X(S) {
4638
4634
  if (!r.value) return;
4639
- const q = document.getElementById(j);
4640
- if (!q) return;
4641
- const X = m, Z = Math.max(0, V(q));
4642
- X ? X.scrollTo({ top: Z, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: Z, behavior: "smooth" });
4635
+ const W = document.getElementById(S);
4636
+ if (!W) return;
4637
+ const Q = m, Z = Math.max(0, M(W));
4638
+ Q ? Q.scrollTo({ top: Z, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: Z, behavior: "smooth" });
4643
4639
  }
4644
- return e({ refresh: O }), (j, q) => r.value && s.value.length ? (i(), d("div", {
4640
+ return e({ refresh: O }), (S, W) => r.value && s.value.length ? (i(), d("div", {
4645
4641
  key: 0,
4646
4642
  class: T(u.value),
4647
4643
  style: be(c.value)
4648
4644
  }, [
4649
- l("h2", Ai, W(j.title), 1),
4650
- l("div", Ti, [
4651
- (i(!0), d(re, null, fe(s.value, (X) => (i(), d("div", {
4652
- key: X.id,
4645
+ l("h2", Ii, K(S.title), 1),
4646
+ l("div", zi, [
4647
+ (i(!0), d(re, null, pe(s.value, (Q) => (i(), d("div", {
4648
+ key: Q.id,
4653
4649
  class: T([
4654
4650
  "vs-compact-form-navigation__item relative",
4655
- X.level === 2 ? "vs-compact-form-navigation__item--nested" : "",
4656
- X.id === n.value ? "vs-compact-form-navigation__item--active" : ""
4651
+ Q.level === 2 ? "vs-compact-form-navigation__item--nested" : "",
4652
+ Q.id === n.value ? "vs-compact-form-navigation__item--active" : ""
4657
4653
  ])
4658
4654
  }, [
4659
4655
  l("button", {
4660
4656
  type: "button",
4661
- onClick: (Z) => Q(X.id),
4657
+ onClick: (Z) => X(Q.id),
4662
4658
  class: T([
4663
4659
  "vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",
4664
- X.level === 2 ? "pl-[15px]" : "pl-[18px]",
4665
- X.id === n.value ? "text-gray-800" : "text-gray-500"
4660
+ Q.level === 2 ? "pl-[15px]" : "pl-[18px]",
4661
+ Q.id === n.value ? "text-gray-800" : "text-gray-500"
4666
4662
  ])
4667
4663
  }, [
4668
- l("span", null, W(X.text), 1)
4669
- ], 10, Fi)
4664
+ l("span", null, K(Q.text), 1)
4665
+ ], 10, Ai)
4670
4666
  ], 2))), 128))
4671
4667
  ])
4672
- ], 6)) : U("", !0);
4668
+ ], 6)) : D("", !0);
4673
4669
  }
4674
- }), Ui = /* @__PURE__ */ Y(Oi, [["__scopeId", "data-v-1584a562"]]), Dt = {
4670
+ }), Fi = /* @__PURE__ */ Y(Ti, [["__scopeId", "data-v-1584a562"]]), Ut = {
4675
4671
  required: "Це поле є обов’язковим",
4676
4672
  email: "Неправильний email"
4677
- }, Di = (o) => o ? !1 : Dt.required, Ri = (o) => {
4673
+ }, Oi = (o) => o ? !1 : Ut.required, Ui = (o) => {
4678
4674
  const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
4679
- return o ? e.test(o) ? !1 : Dt.email : !1;
4680
- }, Pi = (o, e) => {
4675
+ return o ? e.test(o) ? !1 : Ut.email : !1;
4676
+ }, Di = (o, e) => {
4681
4677
  const t = e.pattern ?? e.regexp;
4682
4678
  return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
4683
- }, Hi = (o, e) => !1, Ni = (o, e) => {
4679
+ }, Ri = (o, e) => !1, Pi = (o, e) => {
4684
4680
  switch (typeof e == "string" ? e : e.type) {
4685
4681
  case "required":
4686
- return Di(o);
4682
+ return Oi(o);
4687
4683
  case "email":
4688
- return Ri(o);
4684
+ return Ui(o);
4689
4685
  case "regexp":
4690
- return Pi(o, e);
4686
+ return Di(o, e);
4691
4687
  case "custom":
4692
- return Hi();
4688
+ return Ri();
4693
4689
  default:
4694
4690
  return !1;
4695
4691
  }
4696
- }, Gi = {
4692
+ }, Hi = {
4697
4693
  autocomplete: "select",
4698
4694
  combobox: "select",
4699
4695
  datepicker: "date",
@@ -4706,16 +4702,16 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4706
4702
  dropzone: "file"
4707
4703
  // mask: 'text',
4708
4704
  };
4709
- function St(o) {
4705
+ function Lt(o) {
4710
4706
  const e = o.toLowerCase();
4711
- return Gi[e] || e;
4707
+ return Hi[e] || e;
4712
4708
  }
4713
- function at(o, e = !1) {
4709
+ function nt(o, e = !1) {
4714
4710
  if (Array.isArray(o)) {
4715
4711
  const s = [];
4716
4712
  return o.forEach((n) => {
4717
4713
  const a = { ...n };
4718
- a.name = (n.name || n.id || n.key || "").toString(), a.type = St(n.type), a.label = n.label || n.ua, a.rules = n.rules || n.validators, a.type === "email" && !a.rules && (a.rules = ["email"]), n.data && (a.api = `/api/suggest/${n.data}`), a.disabled = e || a.disabled, Array.isArray(a.schema) && (a.schema = at(a.schema, a.disabled)), s.push(a);
4714
+ a.name = (n.name || n.id || n.key || "").toString(), a.type = Lt(n.type), a.label = n.label || n.ua, a.rules = n.rules || n.validators, a.type === "email" && !a.rules && (a.rules = ["email"]), n.data && (a.api = `/api/suggest/${n.data}`), a.disabled = e || a.disabled, Array.isArray(a.schema) && (a.schema = nt(a.schema, a.disabled)), s.push(a);
4719
4715
  }), s;
4720
4716
  }
4721
4717
  const t = [];
@@ -4723,16 +4719,16 @@ function at(o, e = !1) {
4723
4719
  const n = {
4724
4720
  name: s[0],
4725
4721
  ...s[1],
4726
- type: St(s[1].type),
4722
+ type: Lt(s[1].type),
4727
4723
  label: s[1].label || s[1].ua,
4728
4724
  rules: s[1].rules || s[1].validators,
4729
4725
  disabled: e
4730
4726
  };
4731
- n.type === "email" && !n.rules && (n.rules = ["email"]), s[1].type.includes("list") && (n.multiple = !0), !n.api && s[1].data && (n.api = `/api/suggest/${s[1].data}`), Array.isArray(n.schema) && (n.schema = at(n.schema, n.disabled)), t.push(n);
4727
+ n.type === "email" && !n.rules && (n.rules = ["email"]), s[1].type.includes("list") && (n.multiple = !0), !n.api && s[1].data && (n.api = `/api/suggest/${s[1].data}`), Array.isArray(n.schema) && (n.schema = nt(n.schema, n.disabled)), t.push(n);
4732
4728
  }), t;
4733
4729
  }
4734
- function qi(o, e, t = !1) {
4735
- const s = S(() => at(
4730
+ function Ni(o, e, t = !1) {
4731
+ const s = B(() => nt(
4736
4732
  (Array.isArray(e), e),
4737
4733
  typeof t == "boolean" ? t : t.value
4738
4734
  )), n = w({});
@@ -4740,7 +4736,7 @@ function qi(o, e, t = !1) {
4740
4736
  const p = f?.conditions;
4741
4737
  if (!p) return !0;
4742
4738
  const v = Array.isArray(p) ? p[0] : p, k = o?.value?.[v];
4743
- return Ot(k, p);
4739
+ return Ft(k, p);
4744
4740
  }
4745
4741
  const r = (f = s.value, p = !0) => (f.forEach((v) => {
4746
4742
  if (v.rules) {
@@ -4750,12 +4746,12 @@ function qi(o, e, t = !1) {
4750
4746
  }
4751
4747
  let k = !1, m = null;
4752
4748
  v.rules.forEach((I) => {
4753
- const $ = Ni(o.value[v.name], I);
4749
+ const $ = Pi(o.value[v.name], I);
4754
4750
  $ && (k = !0, !m && typeof $ == "string" && (m = $));
4755
4751
  }), k && m ? n.value[v.name] = m : delete n.value[v.name];
4756
4752
  }
4757
4753
  v.schema && r(v.schema, !1);
4758
- }), p && Object.values(n.value).some(Boolean) ? n.value : null), u = S(() => s.value?.filter((f) => a(f)));
4754
+ }), p && Object.values(n.value).some(Boolean) ? n.value : null), u = B(() => s.value?.filter((f) => f.hidden !== !0 && a(f)));
4759
4755
  return {
4760
4756
  errors: n,
4761
4757
  validate: r,
@@ -4765,12 +4761,12 @@ function qi(o, e, t = !1) {
4765
4761
  visibleSchema: u
4766
4762
  };
4767
4763
  }
4768
- const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4764
+ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
4769
4765
  key: 0,
4770
4766
  "data-orientation": "horizontal",
4771
4767
  role: "none",
4772
4768
  class: "mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"
4773
- }, Ke = /* @__PURE__ */ G({
4769
+ }, qe = /* @__PURE__ */ G({
4774
4770
  __name: "vs-compact-form",
4775
4771
  props: /* @__PURE__ */ ie({
4776
4772
  schema: { default: () => [] },
@@ -4795,7 +4791,7 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4795
4791
  validate: c,
4796
4792
  reset: f,
4797
4793
  visibleSchema: p
4798
- } = qi(r, n.schema, Jt(n, "disabled")), v = w(null), k = w(null), m = S(() => n.navigation), I = S(() => n.navWidth), $ = S(() => n.style?.columns), A = Object.freeze({ container: 12, label: 3 }), E = S(() => n.columns ?? $.value ?? A), O = S(() => n.columns != null || $.value != null), C = S(() => O.value ? "horizontal" : n.layout), h = (P) => P?.columns ? "horizontal" : C.value, x = (P) => P?.columns ?? E.value, B = () => {
4794
+ } = Ni(r, n.schema, Zt(n, "disabled")), v = w(null), k = w(null), m = B(() => n.navigation), I = B(() => n.navWidth), $ = B(() => n.style?.columns), A = Object.freeze({ container: 12, label: 3 }), E = B(() => n.columns ?? $.value ?? A), O = B(() => n.columns != null || $.value != null), C = B(() => O.value ? "horizontal" : n.layout), h = (P) => P?.columns ? "horizontal" : C.value, x = (P) => P?.columns ?? E.value, j = () => {
4799
4795
  s("update:modelValue", r.value), c(), s("handle-submit", r.value);
4800
4796
  };
4801
4797
  e({
@@ -4811,13 +4807,13 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4811
4807
  formId: n.formId
4812
4808
  };
4813
4809
  });
4814
- function V(P, ee) {
4815
- if (P === ee) return !0;
4816
- if (typeof P != "object" || typeof ee != "object" || !P || !ee) return !1;
4817
- const Q = Object.keys(P), j = Object.keys(ee);
4818
- return Q.length !== j.length ? !1 : Q.every((q) => P[q] === ee[q]);
4810
+ function M(P, te) {
4811
+ if (P === te) return !0;
4812
+ if (typeof P != "object" || typeof te != "object" || !P || !te) return !1;
4813
+ const X = Object.keys(P), S = Object.keys(te);
4814
+ return X.length !== S.length ? !1 : X.every((W) => P[W] === te[W]);
4819
4815
  }
4820
- return wt("form", a), wt("values", r), (P, ee) => (i(), d("div", Ki, [
4816
+ return xt("form", a), xt("values", r), (P, te) => (i(), d("div", Gi, [
4821
4817
  l("div", {
4822
4818
  class: "flex-1 min-h-0 overflow-y-auto overflow-x-visible",
4823
4819
  ref_key: "formScrollContainer",
@@ -4826,30 +4822,30 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4826
4822
  l("form", {
4827
4823
  ref_key: "formRef",
4828
4824
  ref: v,
4829
- onSubmit: $e(B, ["prevent"]),
4825
+ onSubmit: $e(j, ["prevent"]),
4830
4826
  class: T(["grid grid-cols-12 p-1", C.value === "default" ? "gap-6" : "gap-4"])
4831
4827
  }, [
4832
- (i(!0), d(re, null, fe(te(p), (Q, j) => (i(), d("div", {
4833
- key: Q.name,
4834
- class: T(h(Q) === "horizontal" ? "col-span-12" : `col-span-${Q.col || 12}`)
4828
+ (i(!0), d(re, null, pe(le(p), (X, S) => (i(), d("div", {
4829
+ key: X.name,
4830
+ class: T(h(X) === "horizontal" ? "col-span-12" : `col-span-${X.col || 12}`)
4835
4831
  }, [
4836
- R(Ut, {
4832
+ R(Ot, {
4837
4833
  style: be(P.style),
4838
- item: Q,
4839
- layout: h(Q),
4840
- columns: x(Q),
4841
- "model-value": r.value[Q.name],
4842
- "onUpdate:modelValue": (q) => {
4843
- const X = r.value[Q.name];
4844
- V(X, q) || (r.value[Q.name] = q);
4834
+ item: X,
4835
+ layout: h(X),
4836
+ columns: x(X),
4837
+ "model-value": r.value[X.name],
4838
+ "onUpdate:modelValue": (W) => {
4839
+ const Q = r.value[X.name];
4840
+ M(Q, W) || (r.value[X.name] = W);
4845
4841
  },
4846
- error: te(u)[Q.name]
4842
+ error: le(u)[X.name]
4847
4843
  }, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
4848
- h(Q) === "settings" && j + 1 !== te(p).length ? (i(), d("div", Wi)) : U("", !0)
4844
+ h(X) === "settings" && S + 1 !== le(p).length ? (i(), d("div", qi)) : D("", !0)
4849
4845
  ], 2))), 128))
4850
4846
  ], 34)
4851
4847
  ], 512),
4852
- R(Ui, {
4848
+ R(Fi, {
4853
4849
  target: v.value,
4854
4850
  "scroll-container": k.value,
4855
4851
  enabled: m.value,
@@ -4857,7 +4853,7 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4857
4853
  }, null, 8, ["target", "scroll-container", "enabled", "width"])
4858
4854
  ]));
4859
4855
  }
4860
- }), Zi = { class: "relative" }, Ji = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Yi = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Xi = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Qi = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, eu = { class: "p-4 mim-h-0 h-full overflow-auto" }, tu = /* @__PURE__ */ G({
4856
+ }), Ki = { class: "relative" }, Wi = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Zi = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Ji = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Yi = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Xi = { class: "p-4 mim-h-0 h-full overflow-auto" }, Qi = /* @__PURE__ */ G({
4861
4857
  __name: "modal-edit",
4862
4858
  props: {
4863
4859
  schema: {},
@@ -4953,11 +4949,11 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4953
4949
  message: v.message || "Unexpected error"
4954
4950
  }), console.error(v);
4955
4951
  }
4956
- }), (v, k) => (i(), d("div", Zi, [
4957
- l("div", Ji, [
4958
- l("div", Yi, [
4959
- l("div", Xi, [
4960
- l("h3", Qi, W(c.value === "add" ? "Додати" : "Змінити"), 1),
4952
+ }), (v, k) => (i(), d("div", Ki, [
4953
+ l("div", Wi, [
4954
+ l("div", Zi, [
4955
+ l("div", Ji, [
4956
+ l("h3", Yi, K(c.value === "add" ? "Додати" : "Змінити"), 1),
4961
4957
  l("button", {
4962
4958
  onClick: p,
4963
4959
  type: "button",
@@ -4981,15 +4977,15 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4981
4977
  ], -1)
4982
4978
  ]))
4983
4979
  ]),
4984
- l("div", eu, [
4985
- n.value ? (i(), me(Ke, {
4980
+ l("div", Xi, [
4981
+ n.value ? (i(), ve(qe, {
4986
4982
  key: 0,
4987
4983
  schema: n.value,
4988
4984
  values: a.value,
4989
4985
  "onUpdate:values": k[0] || (k[0] = (m) => a.value = m),
4990
4986
  form: r.value,
4991
4987
  "onUpdate:form": k[1] || (k[1] = (m) => r.value = m)
4992
- }, null, 8, ["schema", "values", "form"])) : U("", !0)
4988
+ }, null, 8, ["schema", "values", "form"])) : D("", !0)
4993
4989
  ]),
4994
4990
  l("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
4995
4991
  l("button", {
@@ -5007,14 +5003,14 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
5007
5003
  ])
5008
5004
  ]));
5009
5005
  }
5010
- }), Bt = (o = { mode: "edit", schema: null }) => new Promise((e) => {
5011
- const { close: t } = Yt({
5006
+ }), St = (o = { mode: "edit", schema: null }) => new Promise((e) => {
5007
+ const { close: t } = Jt({
5012
5008
  title: o.mode === "add" ? "Додати" : "Редагувати",
5013
5009
  template: "",
5014
5010
  visible: !0,
5015
5011
  size: "medium",
5016
5012
  closeClickBack: !0,
5017
- content: tu,
5013
+ content: Qi,
5018
5014
  contentProps: {
5019
5015
  ...o,
5020
5016
  onClose: () => {
@@ -5026,37 +5022,37 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
5026
5022
  }
5027
5023
  });
5028
5024
  });
5029
- Ke.install = function(e) {
5030
- e.component("VForm", Ke), Object.assign(e.config.globalProperties, {
5031
- $form: Bt
5032
- }), e.provide("form", Bt), window.v3plugin || (window.v3plugin = {});
5025
+ qe.install = function(e) {
5026
+ e.component("VForm", qe), Object.assign(e.config.globalProperties, {
5027
+ $form: St
5028
+ }), e.provide("form", St), window.v3plugin || (window.v3plugin = {});
5033
5029
  };
5034
5030
  export {
5035
- tu as ModalEdit,
5036
- Ke as VForm,
5037
- Bi as VsInputArray,
5038
- xo as VsInputCheckbox,
5039
- ci as VsInputCodegen,
5040
- Ci as VsInputColor,
5041
- ca as VsInputContainer,
5042
- ko as VsInputDate,
5043
- ro as VsInputEmail,
5044
- dn as VsInputFile,
5045
- Dn as VsInputFileList,
5046
- ki as VsInputKeyValue,
5047
- no as VsInputMask,
5048
- $l as VsInputNumber,
5049
- _t as VsInputRadio,
5050
- Li as VsInputRange,
5051
- Mt as VsInputSelect,
5052
- ni as VsInputSlug,
5053
- kt as VsInputStatic,
5054
- At as VsInputSwitcher,
5055
- ei as VsInputTag,
5056
- Xe as VsInputText,
5057
- Ia as VsInputTextarea,
5058
- Ke as default,
5059
- ji as inputs,
5060
- Us as vsInputDatatable,
5061
- Nr as vsInputMap
5031
+ Qi as ModalEdit,
5032
+ qe as VForm,
5033
+ Li as VsInputArray,
5034
+ yo as VsInputCheckbox,
5035
+ ui as VsInputCodegen,
5036
+ _i as VsInputColor,
5037
+ da as VsInputContainer,
5038
+ wo as VsInputDate,
5039
+ so as VsInputEmail,
5040
+ un as VsInputFile,
5041
+ Un as VsInputFileList,
5042
+ xi as VsInputKeyValue,
5043
+ oo as VsInputMask,
5044
+ _l as VsInputNumber,
5045
+ kt as VsInputRadio,
5046
+ Vi as VsInputRange,
5047
+ Vt as VsInputSelect,
5048
+ li as VsInputSlug,
5049
+ wt as VsInputStatic,
5050
+ zt as VsInputSwitcher,
5051
+ Xr as VsInputTag,
5052
+ Ye as VsInputText,
5053
+ ja as VsInputTextarea,
5054
+ qe as default,
5055
+ Si as inputs,
5056
+ Fs as vsInputDatatable,
5057
+ Pr as vsInputMap
5062
5058
  };