@opengis/form 0.1.16 → 0.1.18

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as me, ref as V, createElementBlock as m, openBlock as u, Fragment as Me, createElementVNode as c, createBlock as be, renderSlot as ut, createVNode as Z, unref as z, Teleport as Xt, createCommentVNode as Y, normalizeStyle as Ee, toDisplayString as de, computed as h, inject as Je, mergeProps as nn, createTextVNode as et, normalizeProps as Pl, guardReactiveProps as Ol, onMounted as at, onUnmounted as bn, normalizeClass as re, mergeModels as Re, useModel as ze, withDirectives as Oe, vModelText as ot, useAttrs as Pa, vModelCheckbox as Oa, resolveDynamicComponent as ht, withCtx as rt, withModifiers as Te, onBeforeUnmount as Vt, watch as pe, vModelRadio as Ba, renderList as Pe, reactive as Bl, getCurrentInstance as nl, resolveComponent as vt, createSlots as Ra, nextTick as Ze, watchEffect as Rl, vShow as Rt, Transition as ll, isRef as Jn, defineAsyncComponent as jo, createStaticVNode as Nl, useSlots as zo, provide as yn, withKeys as Uo, toRef as Ho } from "vue";
1
+ import { defineComponent as me, ref as V, createElementBlock as m, openBlock as u, Fragment as Me, createElementVNode as c, createBlock as be, renderSlot as ut, createVNode as Z, unref as z, Teleport as Xt, createCommentVNode as Y, normalizeStyle as Ee, toDisplayString as de, computed as y, inject as Je, mergeProps as nn, createTextVNode as et, normalizeProps as Pl, guardReactiveProps as Ol, onMounted as at, onUnmounted as bn, normalizeClass as re, mergeModels as Re, useModel as ze, withDirectives as Oe, vModelText as ot, useAttrs as Pa, vModelCheckbox as Oa, resolveDynamicComponent as ht, withCtx as rt, withModifiers as Te, onBeforeUnmount as Vt, watch as pe, vModelRadio as Ba, renderList as Pe, reactive as Bl, getCurrentInstance as nl, resolveComponent as vt, createSlots as Ra, nextTick as Ze, watchEffect as Rl, vShow as Rt, Transition as ll, isRef as Jn, defineAsyncComponent as jo, createStaticVNode as Nl, useSlots as zo, provide as yn, withKeys as Uo, toRef as Ho } from "vue";
2
2
  import { Info as dn, Check as Na, Mail as Wo, Phone as qo, ChevronRight as Ko, ChevronLeft as Yo, ChevronDown as wn, ChevronUp as Go, X as _t, Clock3 as Xo, CalendarDays as Zo, Table as Jo, FileCode as Qo, FileText as Qn, FileArchive as er, Plus as Tt, Trash2 as an, Eye as jl, Download as al, Upload as ja, Search as ol, GripVertical as hn, Pencil as tr, Circle as nr, MapPin as za, Ruler as Ua, LoaderCircle as el, Minimize as lr, Maximize as ar, ZoomIn as or, Copy as rr } from "lucide-vue-next";
3
3
  import { notify as Ae, VsModal as Mn, modal as sr } from "@opengis/core";
4
4
  function Vl(e, t, n) {
@@ -81,16 +81,16 @@ const Ha = /* @__PURE__ */ me({
81
81
  columns: {}
82
82
  },
83
83
  setup(e) {
84
- const t = e, n = h(() => typeof t.item?.label == "string" && t.item.label ? t.item.label : t.item?.ua || t.label || t.ua), l = h(() => !!n.value), o = h(() => !!t.item?.rules?.includes("required")), a = h(() => t.item?.info || ""), i = Je("schema-by-name"), r = {
84
+ const t = e, n = y(() => typeof t.item?.label == "string" && t.item.label ? t.item.label : t.item?.ua || t.label || t.ua), l = y(() => !!n.value), o = y(() => !!t.item?.rules?.includes("required")), a = y(() => t.item?.info || ""), i = Je("schema-by-name"), r = {
85
85
  en: zl?.form?.autofillFrom,
86
86
  uk: Ul?.form?.autofillFrom
87
- }, d = h(() => {
87
+ }, d = y(() => {
88
88
  const f = t.item?.__autoMeta;
89
89
  if (!f || f?.source !== "parent-auto" || !f?.parentField) return "";
90
- const _ = String(t.item?.__locale || "uk"), $ = String(f.parentField), w = i?.value?.[$], k = w?.[`label:${_}`] || (_ !== "uk" ? w?.[_] : void 0) || w?.label || w?.ua || w?.en || $;
91
- return `${r[_] || r.uk}: ${k}`;
90
+ const k = String(t.item?.__locale || "uk"), $ = String(f.parentField), w = i?.value?.[$], _ = w?.[`label:${k}`] || (k !== "uk" ? w?.[k] : void 0) || w?.label || w?.ua || w?.en || $;
91
+ return `${r[k] || r.uk}: ${_}`;
92
92
  });
93
- return (f, _) => (u(), m("div", cr, [
93
+ return (f, k) => (u(), m("div", cr, [
94
94
  l.value ? (u(), m("div", fr, [
95
95
  c("span", pr, de(n.value), 1),
96
96
  o.value ? (u(), m("span", mr, "*")) : Y("", !0),
@@ -130,36 +130,36 @@ const Ha = /* @__PURE__ */ me({
130
130
  columns: { default: () => ({ container: 12, label: 3 }) }
131
131
  },
132
132
  setup(e) {
133
- const t = e, n = h(() => t.item?.label || t.label || t.ua), l = h(() => t.item?.info || ""), o = Je("schema-by-name"), a = {
133
+ const t = e, n = y(() => t.item?.label || t.label || t.ua), l = y(() => t.item?.info || ""), o = Je("schema-by-name"), a = {
134
134
  en: zl?.form?.autofillFrom,
135
135
  uk: Ul?.form?.autofillFrom
136
- }, i = h(() => {
136
+ }, i = y(() => {
137
137
  const w = t.item?.__autoMeta;
138
138
  if (!w || w?.source !== "parent-auto" || !w?.parentField) return "";
139
- const k = String(t.item?.__locale || "uk"), v = String(w.parentField), x = o?.value?.[v], b = x?.[`label:${k}`] || (k !== "uk" ? x?.[k] : void 0) || x?.label || x?.ua || x?.en || v;
140
- return `${a[k] || a.uk}: ${b}`;
141
- }), r = h(() => t.columns ?? { container: 12, label: 3 }), d = h(() => {
142
- const { container: w, label: k } = r.value;
143
- return !w || w <= 0 ? 0 : Math.min(Math.max(k ?? 0, 0), w) / w;
144
- }), f = h(() => t.item?.type === "html" || d.value <= 0 ? !1 : !!n.value), _ = h(() => {
139
+ const _ = String(t.item?.__locale || "uk"), v = String(w.parentField), x = o?.value?.[v], b = x?.[`label:${_}`] || (_ !== "uk" ? x?.[_] : void 0) || x?.label || x?.ua || x?.en || v;
140
+ return `${a[_] || a.uk}: ${b}`;
141
+ }), r = y(() => t.columns ?? { container: 12, label: 3 }), d = y(() => {
142
+ const { container: w, label: _ } = r.value;
143
+ return !w || w <= 0 ? 0 : Math.min(Math.max(_ ?? 0, 0), w) / w;
144
+ }), f = y(() => t.item?.type === "html" || d.value <= 0 ? !1 : !!n.value), k = y(() => {
145
145
  if (!f.value) return {};
146
146
  const w = `${d.value * 100}%`;
147
147
  return { flexBasis: w, maxWidth: w };
148
- }), $ = h(() => {
149
- const { container: w, label: k } = r.value;
148
+ }), $ = y(() => {
149
+ const { container: w, label: _ } = r.value;
150
150
  if (!w || w <= 0) return {};
151
151
  if (t.item?.type === "html") return { flexBasis: "100%", maxWidth: "100%" };
152
152
  if (!f.value) return { flexBasis: "100%", maxWidth: "100%" };
153
- const v = Math.max(w - Math.max(k ?? 0, 0), 0) / w;
153
+ const v = Math.max(w - Math.max(_ ?? 0, 0), 0) / w;
154
154
  if (!v) return {};
155
155
  const x = `${v * 100}%`;
156
156
  return { flexBasis: x, maxWidth: x };
157
157
  });
158
- return (w, k) => (u(), m("div", hr, [
158
+ return (w, _) => (u(), m("div", hr, [
159
159
  f.value ? (u(), m("span", {
160
160
  key: 0,
161
161
  class: "text-sm text-gray-900 font-medium flex shrink-0 items-center gap-1",
162
- style: Ee(_.value)
162
+ style: Ee(k.value)
163
163
  }, [
164
164
  et(de(n.value) + " ", 1),
165
165
  w.item?.rules?.includes("required") && n.value ? (u(), m("span", br, "*")) : Y("", !0),
@@ -226,8 +226,8 @@ const Ha = /* @__PURE__ */ me({
226
226
  },
227
227
  setup(e) {
228
228
  const t = e, n = V("uk");
229
- h(() => (t.item ?? {})?.[n.value] ?? t.ua ?? t.label ?? "");
230
- const l = h(() => t.item?.description ?? ""), o = h(() => Array.isArray(t.item?.rules) && t.item.rules.includes("required")), a = h(() => (typeof t.error == "string" ? t.error : "") ?? ""), i = () => {
229
+ y(() => (t.item ?? {})?.[n.value] ?? t.ua ?? t.label ?? "");
230
+ const l = y(() => t.item?.description ?? ""), o = y(() => Array.isArray(t.item?.rules) && t.item.rules.includes("required")), a = y(() => (typeof t.error == "string" ? t.error : "") ?? ""), i = () => {
231
231
  const r = typeof localStorage < "u" ? localStorage.getItem("locale") : null;
232
232
  n.value = r || "uk";
233
233
  };
@@ -273,7 +273,7 @@ const Ha = /* @__PURE__ */ me({
273
273
  };
274
274
  function bt(e) {
275
275
  return {
276
- inputClass: h(() => {
276
+ inputClass: y(() => {
277
277
  const n = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
278
278
  return e?.size === "sm" ? `${n}h-[32px]` : `${n}h-[38px]`;
279
279
  })
@@ -297,7 +297,7 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
297
297
  }),
298
298
  emits: ["update:modelValue"],
299
299
  setup(e) {
300
- const t = e, { inputClass: n } = bt(t.style), l = ze(e, "modelValue"), o = h(() => !!t.disabled), a = h(() => t.placeholder ?? "");
300
+ const t = e, { inputClass: n } = bt(t.style), l = ze(e, "modelValue"), o = y(() => !!t.disabled), a = y(() => t.placeholder ?? "");
301
301
  return (i, r) => Oe((u(), m("input", {
302
302
  type: "password",
303
303
  "onUpdate:modelValue": r[0] || (r[0] = (d) => l.value = d),
@@ -324,27 +324,35 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
324
324
  maxlength: {},
325
325
  minlength: {}
326
326
  }, {
327
- modelValue: { default: "" },
327
+ modelValue: { default: null },
328
328
  modelModifiers: {}
329
329
  }),
330
330
  emits: ["update:modelValue"],
331
331
  setup(e) {
332
- const t = e, { inputClass: n } = bt(t.style), l = ze(e, "modelValue"), o = h(() => !!t.disabled), a = h(() => t.placeholder ?? ""), i = h(() => t.maxlength ?? void 0), r = h(() => t.minlength ?? void 0);
333
- function d() {
334
- typeof l.value == "string" && (l.value = l.value.trim());
332
+ const t = e, { inputClass: n } = bt(t.style), l = ze(e, "modelValue"), o = y({
333
+ get: () => l.value ?? "",
334
+ set: (k) => {
335
+ l.value = k === "" ? null : k;
336
+ }
337
+ }), a = y(() => !!t.disabled), i = y(() => t.placeholder ?? ""), r = y(() => t.maxlength ?? void 0), d = y(() => t.minlength ?? void 0);
338
+ function f() {
339
+ if (typeof l.value == "string") {
340
+ const k = l.value.trim();
341
+ l.value = k === "" ? null : k;
342
+ }
335
343
  }
336
- return (f, _) => Oe((u(), m("input", {
344
+ return (k, $) => Oe((u(), m("input", {
337
345
  type: "text",
338
- "onUpdate:modelValue": _[0] || (_[0] = ($) => l.value = $),
339
- placeholder: a.value,
340
- disabled: o.value,
341
- maxlength: i.value,
342
- minlength: r.value,
343
- onBlur: d,
344
- class: re(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [f.customClass, z(n), { "!border-red-600": f.error }]]),
346
+ "onUpdate:modelValue": $[0] || ($[0] = (w) => o.value = w),
347
+ placeholder: i.value,
348
+ disabled: a.value,
349
+ maxlength: r.value,
350
+ minlength: d.value,
351
+ onBlur: f,
352
+ class: re(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [k.customClass, z(n), { "!border-red-600": k.error }]]),
345
353
  style: { border: "1px solid #CFD9E0" }
346
354
  }, null, 42, Pr)), [
347
- [ot, l.value]
355
+ [ot, o.value]
348
356
  ]);
349
357
  }
350
358
  }), Or = ["step", "placeholder", "disabled", "min", "max"], Br = /* @__PURE__ */ me({
@@ -380,16 +388,16 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
380
388
  }),
381
389
  emits: ["update:modelValue"],
382
390
  setup(e) {
383
- const t = e, { inputClass: n } = bt(t.style), l = Pa(), o = ze(e, "modelValue"), a = h(() => !!t.disabled), i = (_) => {
384
- if (_ == null || _ === "") return;
385
- const $ = typeof _ == "string" ? _.trim().replace(",", ".") : _, w = Number($);
391
+ const t = e, { inputClass: n } = bt(t.style), l = Pa(), o = ze(e, "modelValue"), a = y(() => !!t.disabled), i = (k) => {
392
+ if (k == null || k === "") return;
393
+ const $ = typeof k == "string" ? k.trim().replace(",", ".") : k, w = Number($);
386
394
  return Number.isFinite(w) ? w : void 0;
387
- }, r = h(() => i(t.min ?? l.min)), d = h(() => i(t.max ?? l.max)), f = h(() => {
395
+ }, r = y(() => i(t.min ?? l.min)), d = y(() => i(t.max ?? l.max)), f = y(() => {
388
396
  if (t.step !== void 0 && t.step !== null && t.step !== "") return t.step;
389
- const _ = l.step;
390
- return typeof _ == "number" || typeof _ == "string" ? _ : "any";
397
+ const k = l.step;
398
+ return typeof k == "number" || typeof k == "string" ? k : "any";
391
399
  });
392
- return (_, $) => Oe((u(), m("input", {
400
+ return (k, $) => Oe((u(), m("input", {
393
401
  type: "number",
394
402
  step: f.value,
395
403
  "onUpdate:modelValue": $[0] || ($[0] = (w) => o.value = w),
@@ -431,10 +439,10 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
431
439
  },
432
440
  emits: ["update:modelValue"],
433
441
  setup(e, { emit: t }) {
434
- const n = t, l = e, o = h({
442
+ const n = t, l = e, o = y({
435
443
  get: () => l.modelValue,
436
- set: (k) => n("update:modelValue", k)
437
- }), a = h(() => !!l.disabled), i = h(() => Dn(l.option)), r = h(() => In(l.option)), d = h(() => ln(l.option)), f = h(() => !!(d.value && !i.value && !r.value)), _ = h(() => !!(i.value && d.value)), $ = h(() => d.value ? { color: d.value } : void 0), w = h(() => {
444
+ set: (_) => n("update:modelValue", _)
445
+ }), a = y(() => !!l.disabled), i = y(() => Dn(l.option)), r = y(() => In(l.option)), d = y(() => ln(l.option)), f = y(() => !!(d.value && !i.value && !r.value)), k = y(() => !!(i.value && d.value)), $ = y(() => d.value ? { color: d.value } : void 0), w = y(() => {
438
446
  if (!(!i.value || !d.value))
439
447
  return {
440
448
  backgroundColor: d.value,
@@ -448,37 +456,37 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
448
456
  maskPosition: "center"
449
457
  };
450
458
  });
451
- return (k, v) => (u(), m("div", Rr, [
459
+ return (_, v) => (u(), m("div", Rr, [
452
460
  Oe(c("input", {
453
461
  type: "checkbox",
454
- value: k.value,
462
+ value: _.value,
455
463
  "onUpdate:modelValue": v[0] || (v[0] = (x) => o.value = x),
456
464
  class: re(["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.value }]),
457
- id: k.id,
465
+ id: _.id,
458
466
  disabled: a.value
459
467
  }, null, 10, Nr), [
460
468
  [Oa, o.value]
461
469
  ]),
462
470
  c("label", {
463
- for: k.id,
471
+ for: _.id,
464
472
  class: re(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": a.value }])
465
473
  }, [
466
474
  c("div", {
467
- class: re(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [o.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", k.error ? "border-red-600" : ""]])
475
+ class: re(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [o.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", _.error ? "border-red-600" : ""]])
468
476
  }, [
469
477
  Z(z(Na), { class: "h-4 w-4" })
470
478
  ], 2),
471
- k.html ? (u(), m("div", {
479
+ _.html ? (u(), m("div", {
472
480
  key: 0,
473
481
  class: "w-full",
474
- innerHTML: k.html
482
+ innerHTML: _.html
475
483
  }, null, 8, zr)) : (u(), m("span", Ur, [
476
484
  f.value ? (u(), m("span", {
477
485
  key: 0,
478
486
  class: "inline-flex h-3 w-3 rounded-full border border-gray-200",
479
487
  style: Ee({ background: d.value })
480
488
  }, null, 4)) : Y("", !0),
481
- _.value ? (u(), m("span", {
489
+ k.value ? (u(), m("span", {
482
490
  key: 1,
483
491
  class: "inline-block h-4 w-4",
484
492
  style: Ee(w.value)
@@ -494,8 +502,8 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
494
502
  class: "h-4 w-4",
495
503
  style: Ee($.value)
496
504
  }, null, 8, ["style"])) : Y("", !0),
497
- ut(k.$slots, "default", {}, () => [
498
- et(de(k.label), 1)
505
+ ut(_.$slots, "default", {}, () => [
506
+ et(de(_.label), 1)
499
507
  ])
500
508
  ]))
501
509
  ], 10, jr)
@@ -523,20 +531,20 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
523
531
  },
524
532
  emits: ["update:modelValue"],
525
533
  setup(e, { emit: t }) {
526
- const n = e, l = t, o = h({
534
+ const n = e, l = t, o = y({
527
535
  get: () => n.modelValue,
528
536
  set: (x) => {
529
537
  l("update:modelValue", x);
530
538
  }
531
- }), a = h(() => Array.isArray(o.value) ? o.value.includes(n.value) : o.value === !0 || o.value === n.value), i = h(() => n.style?.size === "xs" ? "p-1.5 text-xs" : n.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs"), r = h(() => ({
539
+ }), a = y(() => Array.isArray(o.value) ? o.value.includes(n.value) : o.value === !0 || o.value === n.value), i = y(() => n.style?.size === "xs" ? "p-1.5 text-xs" : n.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs"), r = y(() => ({
532
540
  ...n.option ?? {},
533
541
  icon: n.option?.icon ?? n.icon,
534
542
  imgUrl: n.option?.imgUrl ?? n.imgUrl,
535
543
  color: n.option?.color
536
- })), d = h(() => Dn(r.value)), f = h(() => In(r.value)), _ = h(() => ln(r.value)), $ = h(() => !!(_.value && !d.value && !f.value)), w = h(() => !!(d.value && _.value)), k = h(() => _.value ? { color: _.value } : void 0), v = h(() => {
537
- if (!(!d.value || !_.value))
544
+ })), d = y(() => Dn(r.value)), f = y(() => In(r.value)), k = y(() => ln(r.value)), $ = y(() => !!(k.value && !d.value && !f.value)), w = y(() => !!(d.value && k.value)), _ = y(() => k.value ? { color: k.value } : void 0), v = y(() => {
545
+ if (!(!d.value || !k.value))
538
546
  return {
539
- backgroundColor: _.value,
547
+ backgroundColor: k.value,
540
548
  WebkitMaskImage: `url(${d.value})`,
541
549
  maskImage: `url(${d.value})`,
542
550
  WebkitMaskRepeat: "no-repeat",
@@ -568,7 +576,7 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
568
576
  $.value ? (u(), m("span", {
569
577
  key: 0,
570
578
  class: "inline-flex h-3 w-3 rounded-full border border-gray-200",
571
- style: Ee({ background: _.value })
579
+ style: Ee({ background: k.value })
572
580
  }, null, 4)) : Y("", !0),
573
581
  w.value ? (u(), m("span", {
574
582
  key: 1,
@@ -584,7 +592,7 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
584
592
  }, null, 8, Xr)) : f.value ? (u(), be(ht(f.value), {
585
593
  key: 1,
586
594
  class: "h-4 w-4",
587
- style: Ee(k.value)
595
+ style: Ee(_.value)
588
596
  }, null, 8, ["style"])) : Y("", !0)
589
597
  ])) : Y("", !0),
590
598
  ut(x.$slots, "default", {}, () => [
@@ -611,7 +619,7 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
611
619
  },
612
620
  emits: ["update:modelValue"],
613
621
  setup(e, { emit: t }) {
614
- const n = e, l = t, o = `radio-${Math.floor(Math.random() * 1e4)}`, a = h({
622
+ const n = e, l = t, o = `radio-${Math.floor(Math.random() * 1e4)}`, a = y({
615
623
  get: () => Array.isArray(n.modelValue) ? Array.isArray(n.modelValue) && n.modelValue.includes(n.value) : n.modelValue,
616
624
  set: (r) => {
617
625
  if (Array.isArray(n.modelValue)) {
@@ -752,15 +760,15 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
752
760
  9: /[0-9]/,
753
761
  A: /[a-zA-Z]/,
754
762
  "*": /[a-zA-Z0-9]/
755
- }, _ = /* @__PURE__ */ new Set();
763
+ }, k = /* @__PURE__ */ new Set();
756
764
  let $ = !1;
757
- for (let k = 0; k < d.length; k += 1) {
758
- const v = d[k];
759
- v === "{" ? $ = !0 : v === "}" ? $ = !1 : $ && _.add(v);
765
+ for (let _ = 0; _ < d.length; _ += 1) {
766
+ const v = d[_];
767
+ v === "{" ? $ = !0 : v === "}" ? $ = !1 : $ && k.add(v);
760
768
  }
761
769
  const w = {};
762
- return Object.keys(f).forEach((k) => {
763
- _.has(k) || (w[k] = f[k]);
770
+ return Object.keys(f).forEach((_) => {
771
+ k.has(_) || (w[_] = f[_]);
764
772
  }), {
765
773
  mask: d,
766
774
  definitions: w,
@@ -873,56 +881,56 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
873
881
  }),
874
882
  emits: ["update:modelValue"],
875
883
  setup(e) {
876
- const t = e, n = h(() => `^\\+[1-9]\\d{${(tn(t.mask || Gt) || tn(Gt)) - 1}}$`), { inputClass: l } = bt(t.style), o = ze(e, "modelValue"), a = V(null);
884
+ const t = e, n = y(() => `^\\+[1-9]\\d{${(tn(t.mask || Gt) || tn(Gt)) - 1}}$`), { inputClass: l } = bt(t.style), o = ze(e, "modelValue"), a = V(null);
877
885
  let i = null;
878
- function r(_) {
886
+ function r(k) {
879
887
  const $ = {
880
888
  9: /[0-9]/,
881
889
  A: /[a-zA-Z]/,
882
890
  "*": /[a-zA-Z0-9]/
883
891
  }, w = /* @__PURE__ */ new Set();
884
- let k = !1;
885
- for (let x = 0; x < _.length; x += 1) {
886
- const b = _[x];
887
- b === "{" ? k = !0 : b === "}" ? k = !1 : k && w.add(b);
892
+ let _ = !1;
893
+ for (let x = 0; x < k.length; x += 1) {
894
+ const b = k[x];
895
+ b === "{" ? _ = !0 : b === "}" ? _ = !1 : _ && w.add(b);
888
896
  }
889
897
  const v = {};
890
898
  return Object.keys($).forEach((x) => {
891
899
  w.has(x) || (v[x] = $[x]);
892
900
  }), {
893
- mask: _,
901
+ mask: k,
894
902
  definitions: v,
895
903
  lazy: !1,
896
904
  disabled: t.disabled
897
905
  };
898
906
  }
899
- function d(_) {
900
- if (_ == null || _ === "") return "";
901
- const $ = String(_).trim();
907
+ function d(k) {
908
+ if (k == null || k === "") return "";
909
+ const $ = String(k).trim();
902
910
  return $ ? $.replace(/\D/g, "") : "";
903
911
  }
904
912
  function f() {
905
913
  if (!i) return;
906
- const _ = i.unmaskedValue ?? "";
907
- o.value = _ ? `+${_}` : "";
914
+ const k = i.unmaskedValue ?? "";
915
+ o.value = k ? `+${k}` : "";
908
916
  }
909
917
  return at(async () => {
910
918
  if (!a.value) return;
911
- const { default: _ } = await import("./index-W-qQIppj.js"), $ = r(t.mask || "");
912
- i = _(a.value, $), i.on("accept", f), i.on("complete", f);
919
+ const { default: k } = await import("./index-W-qQIppj.js"), $ = r(t.mask || "");
920
+ i = k(a.value, $), i.on("accept", f), i.on("complete", f);
913
921
  const w = d(o.value);
914
922
  i.unmaskedValue = w;
915
923
  }), Vt(() => {
916
924
  i?.destroy(), i = null;
917
- }), pe(() => t.mask, (_) => {
918
- i && i.updateOptions(r(_ || ""));
919
- }), pe(() => t.disabled, (_) => {
920
- i && i.updateOptions({ disabled: _ });
921
- }), pe(o, (_) => {
925
+ }), pe(() => t.mask, (k) => {
926
+ i && i.updateOptions(r(k || ""));
927
+ }), pe(() => t.disabled, (k) => {
928
+ i && i.updateOptions({ disabled: k });
929
+ }), pe(o, (k) => {
922
930
  if (!i) return;
923
- const $ = d(_);
931
+ const $ = d(k);
924
932
  i.unmaskedValue !== $ && (i.unmaskedValue = $);
925
- }), (_, $) => (u(), m("div", is, [
933
+ }), (k, $) => (u(), m("div", is, [
926
934
  c("div", us, [
927
935
  Z(z(qo), { class: "h-4 w-4 stroke-gray-500 transition-all" })
928
936
  ]),
@@ -930,13 +938,13 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
930
938
  ref_key: "inputEl",
931
939
  ref: a,
932
940
  type: "tel",
933
- name: _.name,
934
- placeholder: _.placeholder,
935
- disabled: _.disabled,
941
+ name: k.name,
942
+ placeholder: k.placeholder,
943
+ disabled: k.disabled,
936
944
  pattern: n.value,
937
945
  title: "Міжнародний номер (E.164), наприклад +380XXXXXXXXX",
938
946
  autocomplete: "tel",
939
- class: re(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [z(l), { "!border-red-600": _.error }]]),
947
+ class: re(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [z(l), { "!border-red-600": k.error }]]),
940
948
  style: {
941
949
  border: "1px solid #CFD9E0"
942
950
  }
@@ -968,7 +976,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
968
976
  }),
969
977
  emits: ["update:modelValue"],
970
978
  setup(e) {
971
- const t = e, n = ze(e, "modelValue"), l = h(() => !!t.disabled), o = h(() => Dn(t.option)), a = h(() => In(t.option)), i = h(() => ln(t.option)), r = h(() => !!(i.value && !o.value && !a.value)), d = h(() => !!(o.value && i.value)), f = h(() => i.value ? { color: i.value } : void 0), _ = h(() => {
979
+ const t = e, n = ze(e, "modelValue"), l = y(() => !!t.disabled), o = y(() => Dn(t.option)), a = y(() => In(t.option)), i = y(() => ln(t.option)), r = y(() => !!(i.value && !o.value && !a.value)), d = y(() => !!(o.value && i.value)), f = y(() => i.value ? { color: i.value } : void 0), k = y(() => {
972
980
  if (!(!o.value || !i.value))
973
981
  return {
974
982
  backgroundColor: i.value,
@@ -986,7 +994,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
986
994
  class: re(["flex items-center gap-0", [t.customClass, l.value ? "cursor-not-allowed opacity-60" : ""]])
987
995
  }, [
988
996
  Oe(c("input", {
989
- "onUpdate:modelValue": w[0] || (w[0] = (k) => n.value = k),
997
+ "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
990
998
  type: "radio",
991
999
  value: t.value,
992
1000
  disabled: l.value,
@@ -1018,7 +1026,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1018
1026
  d.value ? (u(), m("span", {
1019
1027
  key: 1,
1020
1028
  class: "inline-block h-4 w-4",
1021
- style: Ee(_.value)
1029
+ style: Ee(k.value)
1022
1030
  }, null, 4)) : o.value ? (u(), m("img", {
1023
1031
  key: 2,
1024
1032
  class: "block",
@@ -1060,7 +1068,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1060
1068
  }),
1061
1069
  emits: ["update:modelValue"],
1062
1070
  setup(e) {
1063
- const t = e, n = ze(e, "modelValue"), l = h(() => !!t.disabled), o = h(() => Dn(t.option)), a = h(() => In(t.option)), i = h(() => ln(t.option)), r = h(() => !!(i.value && !o.value && !a.value)), d = h(() => !!(o.value && i.value)), f = h(() => i.value ? { color: i.value } : void 0), _ = h(() => {
1071
+ const t = e, n = ze(e, "modelValue"), l = y(() => !!t.disabled), o = y(() => Dn(t.option)), a = y(() => In(t.option)), i = y(() => ln(t.option)), r = y(() => !!(i.value && !o.value && !a.value)), d = y(() => !!(o.value && i.value)), f = y(() => i.value ? { color: i.value } : void 0), k = y(() => {
1064
1072
  if (!(!o.value || !i.value))
1065
1073
  return {
1066
1074
  backgroundColor: i.value,
@@ -1082,7 +1090,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1082
1090
  ]])
1083
1091
  }, [
1084
1092
  Oe(c("input", {
1085
- "onUpdate:modelValue": w[0] || (w[0] = (k) => n.value = k),
1093
+ "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
1086
1094
  type: "radio",
1087
1095
  value: t.value,
1088
1096
  disabled: l.value,
@@ -1103,7 +1111,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1103
1111
  d.value ? (u(), m("span", {
1104
1112
  key: 1,
1105
1113
  class: "inline-block h-4 w-4",
1106
- style: Ee(_.value)
1114
+ style: Ee(k.value)
1107
1115
  }, null, 4)) : o.value ? (u(), m("img", {
1108
1116
  key: 2,
1109
1117
  class: "block",
@@ -1133,7 +1141,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1133
1141
  return o.options ? [...o.options] : [];
1134
1142
  try {
1135
1143
  const a = new URLSearchParams();
1136
- a.set("json", "1"), l && a.set("key", l), o.parentValue !== void 0 && o.parentValue !== null && o.parentValue !== "" && a.set("parent", String(o.parentValue)), o.start === 1 && a.set("start", "1");
1144
+ l && a.set("key", l), o.parentValue !== void 0 && o.parentValue !== null && o.parentValue !== "" && a.set("parent", String(o.parentValue)), o.start === 1 && a.set("start", "1");
1137
1145
  const r = await (await fetch(`${ba(o)}?${a.toString()}`)).json();
1138
1146
  return ha(r);
1139
1147
  } catch {
@@ -1160,7 +1168,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1160
1168
  formValues: t = null,
1161
1169
  watchParent: n = !0
1162
1170
  }) => {
1163
- const l = V([]), o = h(() => e.parent ? t?.value?.[e.parent]?.toString?.() ?? null : null), {
1171
+ const l = V([]), o = y(() => e.parent ? t?.value?.[e.parent]?.toString?.() ?? null : null), {
1164
1172
  fetchOptions: a,
1165
1173
  fetchOptionByValue: i
1166
1174
  } = $s(() => ({
@@ -1225,23 +1233,23 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1225
1233
  }),
1226
1234
  emits: ["update:modelValue"],
1227
1235
  setup(e) {
1228
- const t = e, n = ze(e, "modelValue"), l = h(() => _s[`vs-input-radio-${t.view}`]), o = h(() => t.slot ?? t?.optionTemplate ?? ""), a = h(() => rl(o.value)), i = (k) => il(k, o.value), r = (k) => ul(k, o.value), d = h(() => t.position === "horizontal" ? "flex w-full flex-row flex-wrap gap-[10px]" : "flex w-full flex-col gap-2"), f = h(() => {
1236
+ const t = e, n = ze(e, "modelValue"), l = y(() => _s[`vs-input-radio-${t.view}`]), o = y(() => t.slot ?? t?.optionTemplate ?? ""), a = y(() => rl(o.value)), i = (_) => il(_, o.value), r = (_) => ul(_, o.value), d = y(() => t.position === "horizontal" ? "flex w-full flex-row flex-wrap gap-[10px]" : "flex w-full flex-col gap-2"), f = y(() => {
1229
1237
  if (t.position === "horizontal" && t.customClass?.includes("50%"))
1230
1238
  return {
1231
1239
  flex: "0 0 calc(50% - 5px)"
1232
1240
  };
1233
- }), _ = Je("values", null), { optionsList: $, loadOptions: w } = sl({
1241
+ }), k = Je("values", null), { optionsList: $, loadOptions: w } = sl({
1234
1242
  props: t,
1235
- formValues: _
1243
+ formValues: k
1236
1244
  });
1237
1245
  return at(async () => {
1238
1246
  await w();
1239
- }), (k, v) => (u(), m("div", {
1247
+ }), (_, v) => (u(), m("div", {
1240
1248
  class: re(d.value)
1241
1249
  }, [
1242
1250
  (u(!0), m(Me, null, Pe(z($), (x) => (u(), m("div", {
1243
1251
  key: x?.id,
1244
- class: re(["flex items-stretch", k.position === "horizontal" ? t.customClass : ""]),
1252
+ class: re(["flex items-stretch", _.position === "horizontal" ? t.customClass : ""]),
1245
1253
  style: Ee(f.value)
1246
1254
  }, [
1247
1255
  (u(), be(ht(l.value), nn({
@@ -1250,10 +1258,10 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1250
1258
  option: x,
1251
1259
  value: x.id.toString(),
1252
1260
  checked: n.value?.toString?.() === x.id?.toString?.(),
1253
- "custom-class": k.position === "horizontal" ? "" : t.customClass,
1261
+ "custom-class": _.position === "horizontal" ? "" : t.customClass,
1254
1262
  modelValue: n.value,
1255
1263
  "onUpdate:modelValue": v[0] || (v[0] = (b) => n.value = b)
1256
- }, { ref_for: !0 }, k.$attrs), null, 16, ["text", "html", "option", "value", "checked", "custom-class", "modelValue"]))
1264
+ }, { ref_for: !0 }, _.$attrs), null, 16, ["text", "html", "option", "value", "checked", "custom-class", "modelValue"]))
1257
1265
  ], 6))), 128))
1258
1266
  ], 2));
1259
1267
  }
@@ -1298,10 +1306,10 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1298
1306
  options: n.options
1299
1307
  },
1300
1308
  formValues: a
1301
- }), d = h(() => i.value), f = (C) => C?.value || C?.id || C?.text || C, _ = h(() => n.slot ?? n?.optionTemplate ?? ""), $ = h(() => rl(_.value)), w = (C) => il(C, _.value), k = (C) => ul(C, _.value), v = (C) => `lg:col-span-${C || 12}`, x = h(() => [
1309
+ }), d = y(() => i.value), f = (C) => C?.value || C?.id || C?.text || C, k = y(() => n.slot ?? n?.optionTemplate ?? ""), $ = y(() => rl(k.value)), w = (C) => il(C, k.value), _ = (C) => ul(C, k.value), v = (C) => `lg:col-span-${C || 12}`, x = y(() => [
1302
1310
  n.position === "vertical" ? "flex flex-col" : "",
1303
1311
  n.colSpan ? "grid" : "flex justify-start"
1304
- ]), b = (C) => C == null || C === "" ? null : typeof C == "string" || typeof C == "number" ? C : String(C), S = h(() => {
1312
+ ]), b = (C) => C == null || C === "" ? null : typeof C == "string" || typeof C == "number" ? C : String(C), S = y(() => {
1305
1313
  if (!n.group)
1306
1314
  return [];
1307
1315
  const C = /* @__PURE__ */ new Map();
@@ -1391,7 +1399,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1391
1399
  value: f(K),
1392
1400
  class: re(v(C.colSpan)),
1393
1401
  disabled: n.disabled || K.disabled,
1394
- label: k(K),
1402
+ label: _(K),
1395
1403
  labelHtml: $.value ? w(K) : "",
1396
1404
  key: `${D.key}-${f(K)}`,
1397
1405
  icon: K?.icon,
@@ -1411,7 +1419,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
1411
1419
  value: f(D),
1412
1420
  class: re(v(C.colSpan)),
1413
1421
  disabled: n.disabled || D.disabled,
1414
- label: k(D),
1422
+ label: _(D),
1415
1423
  labelHtml: $.value ? w(D) : "",
1416
1424
  key: f(D),
1417
1425
  icon: D?.icon,
@@ -1584,7 +1592,7 @@ function _a(e, t) {
1584
1592
  return gt(r) ? r : null;
1585
1593
  }
1586
1594
  case "dd.MM.yyyy HH:mm": {
1587
- const [, o, a, i, r, d, f] = l, _ = new Date(
1595
+ const [, o, a, i, r, d, f] = l, k = new Date(
1588
1596
  Number(i),
1589
1597
  Number(a) - 1,
1590
1598
  Number(o),
@@ -1592,7 +1600,7 @@ function _a(e, t) {
1592
1600
  Number(d),
1593
1601
  Number(f || 0)
1594
1602
  );
1595
- return gt(_) ? _ : null;
1603
+ return gt(k) ? k : null;
1596
1604
  }
1597
1605
  case "HH:mm": {
1598
1606
  const [, o, a, i] = l, r = /* @__PURE__ */ new Date();
@@ -1659,10 +1667,10 @@ const Qs = ["year", "month", "day", "time", "custom"], ei = me({
1659
1667
  }
1660
1668
  },
1661
1669
  setup() {
1662
- const t = nl()?.appContext?.config?.globalProperties?.$t, n = h(() => {
1670
+ const t = nl()?.appContext?.config?.globalProperties?.$t, n = y(() => {
1663
1671
  const o = t?.("form.date.today");
1664
1672
  return o && o !== "form.date.today" ? o : "Сьогодні";
1665
- }), l = h(() => {
1673
+ }), l = y(() => {
1666
1674
  const o = t?.("form.date.clear");
1667
1675
  return o && o !== "form.date.clear" ? o : "Очистити";
1668
1676
  });
@@ -1805,7 +1813,7 @@ const cl = /* @__PURE__ */ qe(ei, [["render", si]]), ii = me({
1805
1813
  }
1806
1814
  },
1807
1815
  setup(e, { emit: t }) {
1808
- const n = h(() => Bs(e.pageDate)), l = h(() => Rs(e.pageDate)), o = ($, w, k) => !w && !k ? !0 : !(w && Dt($) < Dt(w) || k && Dt($) > Dt(k)), a = h(() => zs({
1816
+ const n = y(() => Bs(e.pageDate)), l = y(() => Rs(e.pageDate)), o = ($, w, _) => !w && !_ ? !0 : !(w && Dt($) < Dt(w) || _ && Dt($) > Dt(_)), a = y(() => zs({
1809
1817
  start: n.value,
1810
1818
  end: l.value
1811
1819
  }).map(
@@ -1816,12 +1824,12 @@ const cl = /* @__PURE__ */ qe(ei, [["render", si]]), ii = me({
1816
1824
  selected: !!e.selected && Dt($) === Dt(e.selected),
1817
1825
  disabled: !o($, e.lowerLimit, e.upperLimit)
1818
1826
  })
1819
- )), i = h(() => {
1827
+ )), i = y(() => {
1820
1828
  const $ = Dt(n.value), w = Dt(l.value);
1821
1829
  return `${$} - ${w}`;
1822
- }), r = h(
1830
+ }), r = y(
1823
1831
  () => e.lowerLimit && (Rn(e.lowerLimit) === Rn(e.pageDate) || An(e.pageDate, e.lowerLimit))
1824
- ), d = h(
1832
+ ), d = y(
1825
1833
  () => e.upperLimit && (Rn(e.upperLimit) === Rn(e.pageDate) || Vn(e.pageDate, e.upperLimit))
1826
1834
  );
1827
1835
  return {
@@ -1888,9 +1896,9 @@ const di = /* @__PURE__ */ qe(ii, [["render", ui]]), ci = me({
1888
1896
  }
1889
1897
  },
1890
1898
  setup(e, { emit: t }) {
1891
- const n = h(() => Ga(e.pageDate)), l = h(() => Xa(e.pageDate)), o = h(
1899
+ const n = y(() => Ga(e.pageDate)), l = y(() => Xa(e.pageDate)), o = y(
1892
1900
  () => (w) => Sn(w, e.format)
1893
- ), a = (w, k, v) => !k && !v ? !0 : !(k && An(w, Wl(k)) || v && Vn(w, ql(v))), i = h(() => js({
1901
+ ), a = (w, _, v) => !_ && !v ? !0 : !(_ && An(w, Wl(_)) || v && Vn(w, ql(v))), i = y(() => js({
1894
1902
  start: n.value,
1895
1903
  end: l.value
1896
1904
  }).map(
@@ -1901,9 +1909,9 @@ const di = /* @__PURE__ */ qe(ii, [["render", ui]]), ci = me({
1901
1909
  selected: !!e.selected && Il(e.selected, w),
1902
1910
  disabled: !a(w, e.lowerLimit, e.upperLimit)
1903
1911
  })
1904
- )), r = h(() => Dt(n.value)), d = h(
1912
+ )), r = y(() => Dt(n.value)), d = y(
1905
1913
  () => e.lowerLimit && (xa(e.lowerLimit, e.pageDate) || An(e.pageDate, e.lowerLimit))
1906
- ), f = h(
1914
+ ), f = y(
1907
1915
  () => e.upperLimit && (xa(e.upperLimit, e.pageDate) || Vn(e.pageDate, e.upperLimit))
1908
1916
  );
1909
1917
  return {
@@ -2000,21 +2008,21 @@ const pi = /* @__PURE__ */ qe(ci, [["render", fi]]), mi = me({
2000
2008
  }
2001
2009
  },
2002
2010
  setup(e, { emit: t }) {
2003
- const n = h(
2011
+ const n = y(
2004
2012
  () => (b) => (S) => Sn(S, b)
2005
- ), l = h(() => Wl(e.pageDate)), o = h(() => ql(e.pageDate)), a = h(() => ({
2013
+ ), l = y(() => Wl(e.pageDate)), o = y(() => ql(e.pageDate)), a = y(() => ({
2006
2014
  start: l.value,
2007
2015
  end: o.value
2008
- })), i = h(() => ({
2016
+ })), i = y(() => ({
2009
2017
  start: Yl(l.value, e.weekStartsOn),
2010
2018
  end: Us(o.value, e.weekStartsOn)
2011
- })), r = h(() => e.customWeekdays?.length === 7 ? e.customWeekdays : null), d = h(() => {
2019
+ })), r = y(() => e.customWeekdays?.length === 7 ? e.customWeekdays : null), d = y(() => {
2012
2020
  const b = e.weekStartsOn, S = r.value;
2013
2021
  if (S)
2014
2022
  return Array.from({ length: 7 }).map((E, D) => S[(b + D) % 7]);
2015
2023
  const C = n.value(e.weekdayFormat);
2016
2024
  return Array.from(Array(7)).map((E, D) => (b + D) % 7).map((E) => Hs(/* @__PURE__ */ new Date(), E, e.weekStartsOn)).map(C);
2017
- }), f = (b, S, C, E) => E?.dates?.some((D) => Zn(b, D)) || E?.predicate?.(b) ? !1 : !S && !C ? !0 : !(S && An(b, cn(S)) || C && Vn(b, Tn(C))), _ = h(() => {
2025
+ }), f = (b, S, C, E) => E?.dates?.some((D) => Zn(b, D)) || E?.predicate?.(b) ? !1 : !S && !C ? !0 : !(S && An(b, cn(S)) || C && Vn(b, Tn(C))), k = y(() => {
2018
2026
  const b = /* @__PURE__ */ new Date(), S = n.value(e.format);
2019
2027
  return Ns(i.value).map(
2020
2028
  (C) => ({
@@ -2031,17 +2039,17 @@ const pi = /* @__PURE__ */ qe(ci, [["render", fi]]), mi = me({
2031
2039
  key: n.value("yyyy-MM-dd")(C)
2032
2040
  })
2033
2041
  );
2034
- }), $ = h(() => n.value(e.headingFormat)(e.pageDate)), w = h(
2042
+ }), $ = y(() => n.value(e.headingFormat)(e.pageDate)), w = y(
2035
2043
  () => e.lowerLimit && (Il(e.lowerLimit, e.pageDate) || An(e.pageDate, e.lowerLimit))
2036
- ), k = h(
2044
+ ), _ = y(
2037
2045
  () => e.upperLimit && (Il(e.upperLimit, e.pageDate) || Vn(e.pageDate, e.upperLimit))
2038
2046
  );
2039
2047
  return {
2040
2048
  weekDays: d,
2041
- days: _,
2049
+ days: k,
2042
2050
  heading: $,
2043
2051
  leftDisabled: w,
2044
- rightDisabled: k,
2052
+ rightDisabled: _,
2045
2053
  previousPage: () => t("update:pageDate", Os(e.pageDate)),
2046
2054
  nextPage: () => t("update:pageDate", Kl(e.pageDate, 1))
2047
2055
  };
@@ -2116,33 +2124,33 @@ const gi = /* @__PURE__ */ qe(mi, [["render", vi]]), yi = me({
2116
2124
  }
2117
2125
  },
2118
2126
  setup(e, { emit: t }) {
2119
- const n = h(() => e.pageDate ?? e.selected), l = V(n.value.getHours()), o = V(n.value.getMinutes());
2127
+ const n = y(() => e.pageDate ?? e.selected), l = V(n.value.getHours()), o = V(n.value.getMinutes());
2120
2128
  pe(
2121
2129
  () => e.selected,
2122
- (k) => {
2130
+ (_) => {
2123
2131
  let v = 0, x = 0;
2124
- k && (v = k.getHours(), x = k.getMinutes()), l.value = v, o.value = x;
2132
+ _ && (v = _.getHours(), x = _.getMinutes()), l.value = v, o.value = x;
2125
2133
  }
2126
2134
  );
2127
- const a = (k, v) => {
2135
+ const a = (_, v) => {
2128
2136
  const x = Gs(new Date(n.value.getTime()), {
2129
- hours: k,
2137
+ hours: _,
2130
2138
  minutes: v,
2131
2139
  seconds: 0
2132
2140
  });
2133
- $(x) && (l.value = k, o.value = v, t("select", x));
2134
- }, i = (k, v) => k < 0 ? v : k > v ? 0 : k, r = () => a(i(l.value + 1, 23), o.value), d = () => a(i(l.value - 1, 23), o.value), f = () => a(l.value, i(o.value + 1, 59)), _ = () => a(l.value, i(o.value - 1, 59)), $ = (k) => !(e.disabledTime?.dates?.some(
2135
- (v) => Za(k, v) && Ws(k, v)
2136
- ) || e.disabledTime?.predicate?.(k));
2141
+ $(x) && (l.value = _, o.value = v, t("select", x));
2142
+ }, i = (_, v) => _ < 0 ? v : _ > v ? 0 : _, r = () => a(i(l.value + 1, 23), o.value), d = () => a(i(l.value - 1, 23), o.value), f = () => a(l.value, i(o.value + 1, 59)), k = () => a(l.value, i(o.value - 1, 59)), $ = (_) => !(e.disabledTime?.dates?.some(
2143
+ (v) => Za(_, v) && Ws(_, v)
2144
+ ) || e.disabledTime?.predicate?.(_));
2137
2145
  return {
2138
2146
  hours: l,
2139
2147
  minutes: o,
2140
- padStartZero: (k) => `0${k}`.substr(-2),
2148
+ padStartZero: (_) => `0${_}`.substr(-2),
2141
2149
  isEnabled: $,
2142
2150
  incrementHours: r,
2143
2151
  decrementHours: d,
2144
2152
  incrementMinutes: f,
2145
- decrementMinutes: _
2153
+ decrementMinutes: k
2146
2154
  };
2147
2155
  }
2148
2156
  }), hi = {
@@ -2421,12 +2429,12 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2421
2429
  closed: () => !0
2422
2430
  },
2423
2431
  setup(e, { emit: t }) {
2424
- const n = V("none"), l = V(e.startingViewDate), o = V(null), a = V(null), i = V(null), r = V({}), d = V(!1), f = V(!1), _ = V(!1);
2432
+ const n = V("none"), l = V(e.startingViewDate), o = V(null), a = V(null), i = V(null), r = V({}), d = V(!1), f = V(!1), k = V(!1);
2425
2433
  let $ = null;
2426
- const w = V(""), k = (le) => {
2434
+ const w = V(""), _ = (le) => {
2427
2435
  const we = le.replace(/[a-zA-Z]/g, "0");
2428
2436
  return /0/.test(we) ? we : "";
2429
- }, v = h(() => k(e.inputFormat));
2437
+ }, v = y(() => _(e.inputFormat));
2430
2438
  let x = null, b = null;
2431
2439
  const S = () => {
2432
2440
  x?.destroy(), x = null;
@@ -2461,7 +2469,7 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2461
2469
  f.value && e.typeable || D(e.modelValue);
2462
2470
  }
2463
2471
  ), at(() => {
2464
- _.value = !0, v.value && Ze(() => {
2472
+ k.value = !0, v.value && Ze(() => {
2465
2473
  K();
2466
2474
  });
2467
2475
  }), Vt(() => {
@@ -2471,7 +2479,7 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2471
2479
  K();
2472
2480
  }) : S();
2473
2481
  });
2474
- const G = h(() => n.value !== "none"), F = h(() => e.startingView === "time" && e.minimumView === "time"), O = h(() => e.startingView === "day" && e.minimumView === "time"), B = (le) => {
2482
+ const G = y(() => n.value !== "none"), F = y(() => e.startingView === "time" && e.minimumView === "time"), O = y(() => e.startingView === "day" && e.minimumView === "time"), B = (le) => {
2475
2483
  e.disabled || (G.value || (l.value = e.modelValue || Di(e.lowerLimit, e.upperLimit, l.value), t("opened")), n.value = le, Ze(() => tt()));
2476
2484
  }, T = () => {
2477
2485
  G.value && ($ !== null && (cancelAnimationFrame($), $ = null), n.value = "none", t("closed"));
@@ -2523,10 +2531,10 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2523
2531
  return;
2524
2532
  }
2525
2533
  e.typeable && De && (N({ closeOnSuccess: !0, revertOnInvalid: !0 }) || a.value?.focus());
2526
- }, ye = h(() => {
2534
+ }, ye = y(() => {
2527
2535
  const le = jn.indexOf(e.startingView), we = jn.indexOf(e.minimumView);
2528
2536
  return le < we ? e.minimumView : e.startingView;
2529
- }), se = h(() => e.weekDayNames?.length === 7 ? e.weekDayNames : void 0), Se = () => e.startingView === "time" && e.minimumView === "time" ? null : B("day"), Ie = () => {
2537
+ }), se = y(() => e.weekDayNames?.length === 7 ? e.weekDayNames : void 0), Se = () => e.startingView === "time" && e.minimumView === "time" ? null : B("day"), Ie = () => {
2530
2538
  if (!a.value || !i.value) return;
2531
2539
  const le = 4, we = 8, Ve = a.value.getBoundingClientRect(), De = i.value.getBoundingClientRect(), Ge = i.value.firstElementChild?.getBoundingClientRect(), yt = window.innerWidth, je = window.innerHeight, Ke = window.scrollX || window.pageXOffset, $t = window.scrollY || window.pageYOffset, R = Math.max(160, je - we * 2), te = Math.min(De.height || 0, R), ue = je - Ve.bottom - le - we, A = Ve.top - le - we, g = ue < te && A > ue;
2532
2540
  let L = g ? Ve.top - le - te : Ve.bottom + le;
@@ -2614,7 +2622,7 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2614
2622
  log: (le) => console.log(le),
2615
2623
  popupAnchorStyle: r,
2616
2624
  popupRef: i,
2617
- isMounted: _
2625
+ isMounted: k
2618
2626
  };
2619
2627
  }
2620
2628
  }), Ti = {
@@ -2622,7 +2630,7 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2622
2630
  class: "relative"
2623
2631
  }, Fi = { class: "p-datepicker p-component p-inputwrapper relative" }, Ei = ["readonly", "value", "placeholder", "disabled", "tabindex"], Pi = { class: "p-datepicker-input-icon-container absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400" }, Oi = { class: "absolute right-8 top-1/2 -translate-y-1/2" };
2624
2632
  function Bi(e, t, n, l, o, a) {
2625
- const i = vt("Clock3"), r = vt("CalendarDays"), d = vt("X"), f = vt("year-picker"), _ = vt("month-picker"), $ = vt("time-picker"), w = vt("day-picker");
2633
+ const i = vt("Clock3"), r = vt("CalendarDays"), d = vt("X"), f = vt("year-picker"), k = vt("month-picker"), $ = vt("time-picker"), w = vt("day-picker");
2626
2634
  return u(), m("div", Ti, [
2627
2635
  c("div", Fi, [
2628
2636
  c("input", nn({
@@ -2635,11 +2643,11 @@ function Bi(e, t, n, l, o, a) {
2635
2643
  placeholder: e.placeholder,
2636
2644
  disabled: e.disabled,
2637
2645
  tabindex: e.disabled ? -1 : 0,
2638
- onInput: t[0] || (t[0] = (...k) => e.onInput && e.onInput(...k)),
2639
- onKeyup: t[1] || (t[1] = (...k) => e.keyUp && e.keyUp(...k)),
2640
- onBlur: t[2] || (t[2] = (...k) => e.blur && e.blur(...k)),
2641
- onFocus: t[3] || (t[3] = (...k) => e.focus && e.focus(...k)),
2642
- onClick: t[4] || (t[4] = (...k) => e.click && e.click(...k))
2646
+ onInput: t[0] || (t[0] = (..._) => e.onInput && e.onInput(..._)),
2647
+ onKeyup: t[1] || (t[1] = (..._) => e.keyUp && e.keyUp(..._)),
2648
+ onBlur: t[2] || (t[2] = (..._) => e.blur && e.blur(..._)),
2649
+ onFocus: t[3] || (t[3] = (..._) => e.focus && e.focus(..._)),
2650
+ onClick: t[4] || (t[4] = (..._) => e.click && e.click(..._))
2643
2651
  }), null, 16, Ei),
2644
2652
  c("span", Pi, [
2645
2653
  e.isTimeOnlyMode ? (u(), be(i, {
@@ -2656,7 +2664,7 @@ function Bi(e, t, n, l, o, a) {
2656
2664
  type: "button",
2657
2665
  class: "inline-flex h-5 w-5 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 focus:outline-none focus:ring-2 focus:ring-blue-500/30",
2658
2666
  "aria-label": "Очистити дату",
2659
- onClick: t[5] || (t[5] = (k) => e.clearModelValue())
2667
+ onClick: t[5] || (t[5] = (_) => e.clearModelValue())
2660
2668
  }, [
2661
2669
  Z(d, { class: "h-3 w-3" })
2662
2670
  ])
@@ -2675,7 +2683,7 @@ function Bi(e, t, n, l, o, a) {
2675
2683
  }, [
2676
2684
  Oe(Z(f, {
2677
2685
  pageDate: e.pageDate,
2678
- "onUpdate:pageDate": t[6] || (t[6] = (k) => e.updatePageDate("year", k)),
2686
+ "onUpdate:pageDate": t[6] || (t[6] = (_) => e.updatePageDate("year", _)),
2679
2687
  selected: e.modelValue,
2680
2688
  lowerLimit: e.lowerLimit,
2681
2689
  upperLimit: e.upperLimit,
@@ -2683,21 +2691,21 @@ function Bi(e, t, n, l, o, a) {
2683
2691
  }, null, 8, ["pageDate", "selected", "lowerLimit", "upperLimit", "onSelect"]), [
2684
2692
  [Rt, e.viewShown === "year"]
2685
2693
  ]),
2686
- Oe(Z(_, {
2694
+ Oe(Z(k, {
2687
2695
  pageDate: e.pageDate,
2688
- "onUpdate:pageDate": t[7] || (t[7] = (k) => e.updatePageDate("month", k)),
2696
+ "onUpdate:pageDate": t[7] || (t[7] = (_) => e.updatePageDate("month", _)),
2689
2697
  selected: e.modelValue,
2690
2698
  onSelect: e.selectMonth,
2691
2699
  lowerLimit: e.lowerLimit,
2692
2700
  upperLimit: e.upperLimit,
2693
2701
  format: e.monthListFormat,
2694
- onBack: t[8] || (t[8] = (k) => e.viewShown = "year")
2702
+ onBack: t[8] || (t[8] = (_) => e.viewShown = "year")
2695
2703
  }, null, 8, ["pageDate", "selected", "onSelect", "lowerLimit", "upperLimit", "format"]), [
2696
2704
  [Rt, e.viewShown === "month"]
2697
2705
  ]),
2698
2706
  Oe(Z(w, {
2699
2707
  pageDate: e.pageDate,
2700
- "onUpdate:pageDate": t[9] || (t[9] = (k) => e.updatePageDate("day", k)),
2708
+ "onUpdate:pageDate": t[9] || (t[9] = (_) => e.updatePageDate("day", _)),
2701
2709
  selected: e.modelValue,
2702
2710
  weekStartsOn: e.weekStartsOn,
2703
2711
  lowerLimit: e.lowerLimit,
@@ -2711,7 +2719,7 @@ function Bi(e, t, n, l, o, a) {
2711
2719
  onSelect: e.selectDay,
2712
2720
  onToday: e.selectToday,
2713
2721
  onClear: e.clearModelValue,
2714
- onBack: t[10] || (t[10] = (k) => e.viewShown = "month")
2722
+ onBack: t[10] || (t[10] = (_) => e.viewShown = "month")
2715
2723
  }, Ra({ _: 2 }, [
2716
2724
  e.isDateTimeMode ? {
2717
2725
  name: "after-calendar",
@@ -2772,31 +2780,31 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
2772
2780
  },
2773
2781
  emits: ["update:modelValue"],
2774
2782
  setup(e, { emit: t }) {
2775
- const n = e, l = t, { inputClass: o } = bt(n.style), a = nl(), i = h(() => n.mode ? n.mode : n.time ? "datetime" : "date"), r = h(() => [
2783
+ const n = e, l = t, { inputClass: o } = bt(n.style), a = nl(), i = y(() => n.mode ? n.mode : n.time ? "datetime" : "date"), r = y(() => [
2776
2784
  "py-1.5 px-3 block w-full placeholder:text-[#767f8f] bg-white",
2777
2785
  o.value,
2778
2786
  n.customClass,
2779
2787
  { "!border-red-600": n.error }
2780
- ]), d = h(() => !n.modelValue && n.now ? /* @__PURE__ */ new Date() : null), f = h({
2788
+ ]), d = y(() => !n.modelValue && n.now ? /* @__PURE__ */ new Date() : null), f = y({
2781
2789
  get: () => O(
2782
2790
  n.modelValue ?? d.value,
2783
2791
  i.value
2784
2792
  ) || void 0,
2785
2793
  set: (j) => l("update:modelValue", B(j, i.value))
2786
- }), _ = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], $ = h(() => {
2794
+ }), k = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], $ = y(() => {
2787
2795
  if (n.dayNames?.length)
2788
- return n.dayNames.length === 7 ? n.dayNames : _;
2789
- }), w = h(() => {
2796
+ return n.dayNames.length === 7 ? n.dayNames : k;
2797
+ }), w = y(() => {
2790
2798
  const j = n.weekStart, J = typeof j == "string" ? Number(j) : j;
2791
2799
  return J === void 0 || Number.isNaN(J) ? 1 : Math.min(6, Math.max(0, J));
2792
- }), k = h(() => {
2800
+ }), _ = y(() => {
2793
2801
  const j = n.maxDaysFromNow;
2794
2802
  if (j == null || j === "") return;
2795
2803
  const J = typeof j == "string" ? Number(j) : j;
2796
2804
  if (!Number.isFinite(J) || J < 0) return;
2797
2805
  const N = /* @__PURE__ */ new Date();
2798
2806
  return N.setHours(0, 0, 0, 0), N.setDate(N.getDate() + J), N.setHours(23, 59, 59, 999), N;
2799
- }), v = h(() => {
2807
+ }), v = y(() => {
2800
2808
  switch (i.value) {
2801
2809
  case "time":
2802
2810
  return { startingView: "time", minimumView: "time" };
@@ -2842,7 +2850,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
2842
2850
  function C(j) {
2843
2851
  return j ? j.replaceAll("dd", "__DAY2__").replaceAll("d", "__DAY1__").replaceAll("mm", "__MONTH2__").replaceAll("m", "__MONTH1__").replaceAll("yy", "__YEAR2__").replaceAll("y", "__YEAR1__").replaceAll("__DAY2__", "dd").replaceAll("__DAY1__", "d").replaceAll("__MONTH2__", "MM").replaceAll("__MONTH1__", "M").replaceAll("__YEAR2__", "yy").replaceAll("__YEAR1__", "yyyy") : "";
2844
2852
  }
2845
- const E = h(() => {
2853
+ const E = y(() => {
2846
2854
  const j = x[i.value] || "dd.MM.yyyy";
2847
2855
  if (i.value === "time") return j;
2848
2856
  const J = n.dateFormat || S();
@@ -2860,7 +2868,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
2860
2868
  week: "рррр-тиждень",
2861
2869
  time: "гг:хх",
2862
2870
  year: "рррр"
2863
- }, G = h(() => {
2871
+ }, G = y(() => {
2864
2872
  if (n.placeholder) return n.placeholder;
2865
2873
  const j = i.value;
2866
2874
  return D(E.value, j) || K[j] || "";
@@ -2984,7 +2992,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
2984
2992
  "starting-view": v.value.startingView,
2985
2993
  "minimum-view": v.value.minimumView,
2986
2994
  "input-format": E.value,
2987
- "upper-limit": k.value,
2995
+ "upper-limit": _.value,
2988
2996
  name: n.name,
2989
2997
  class: re(r.value)
2990
2998
  }, null, 8, ["modelValue", "placeholder", "disabled", "clearable", "typeable", "week-day-names", "week-starts-on", "starting-view", "minimum-view", "input-format", "upper-limit", "name", "class"])
@@ -3035,10 +3043,10 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3035
3043
  } = t, d = n || `/file/upload/uploads?id=${l || ""}&form=${o || ""}&table=${a || ""}`, f = zi(d, i);
3036
3044
  if (e instanceof File)
3037
3045
  return await Ui(e, f, r);
3038
- const _ = new FormData();
3039
- return _.append("unique", "true"), _.append("file", e), (await fetch(f, {
3046
+ const k = new FormData();
3047
+ return k.append("unique", "true"), k.append("file", e), (await fetch(f, {
3040
3048
  method: "POST",
3041
- body: _
3049
+ body: k
3042
3050
  }).then((w) => w.json()))?.result;
3043
3051
  } catch (n) {
3044
3052
  return Ae({
@@ -3109,19 +3117,19 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3109
3117
  }),
3110
3118
  emits: /* @__PURE__ */ Re(["click"], ["update:value", "update:item"]),
3111
3119
  setup(e, { emit: t }) {
3112
- const n = ze(e, "value"), l = ze(e, "item"), o = t, a = e, i = h(() => a.action), r = h(() => l.value ? typeof l.value == "string" ? l.value : l.value.file_path : ""), d = h(() => a.disabled ? "opacity-50 cursor-not-allowed" : a.isUploading ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), f = h(() => a.progressPercent > 0 ? `${a.progressPercent}%` : "Завантаження..."), _ = (v) => typeof v == "string" ? v : v?.file_path || "", $ = () => {
3120
+ const n = ze(e, "value"), l = ze(e, "item"), o = t, a = e, i = y(() => a.action), r = y(() => l.value ? typeof l.value == "string" ? l.value : l.value.file_path : ""), d = y(() => a.disabled ? "opacity-50 cursor-not-allowed" : a.isUploading ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), f = y(() => a.progressPercent > 0 ? `${a.progressPercent}%` : "Завантаження..."), k = (v) => typeof v == "string" ? v : v?.file_path || "", $ = () => {
3113
3121
  const v = r.value;
3114
- Wi(v), a.multiple && Array.isArray(n.value) ? n.value = n.value.filter((x) => _(x) !== v) : n.value = "";
3122
+ Wi(v), a.multiple && Array.isArray(n.value) ? n.value = n.value.filter((x) => k(x) !== v) : n.value = "";
3115
3123
  }, w = () => {
3116
3124
  r.value && window.open(r.value, "_blank");
3117
- }, k = () => {
3125
+ }, _ = () => {
3118
3126
  a.disabled || a.isUploading || o("click");
3119
3127
  };
3120
3128
  return (v, x) => i.value ? (u(), m("div", {
3121
3129
  key: 0,
3122
3130
  title: v.title,
3123
3131
  class: re(["relative h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300", d.value]),
3124
- onClick: k
3132
+ onClick: _
3125
3133
  }, [
3126
3134
  v.isUploading ? (u(), m("div", Yi, [
3127
3135
  x[2] || (x[2] = c("div", { class: "loader" }, null, -1)),
@@ -3189,12 +3197,12 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3189
3197
  if (!a) return;
3190
3198
  const [i, r] = a.split("="), d = i?.trim(), f = r?.trim();
3191
3199
  if (!d || !f) return;
3192
- const _ = o[f];
3193
- if (_ == null || _ === "") {
3200
+ const k = o[f];
3201
+ if (k == null || k === "") {
3194
3202
  l.push(f);
3195
3203
  return;
3196
3204
  }
3197
- n[d] = _;
3205
+ n[d] = k;
3198
3206
  }), l.length ? (Ae({
3199
3207
  type: "warning",
3200
3208
  title: "Заповніть поля",
@@ -3228,7 +3236,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3228
3236
  }),
3229
3237
  emits: /* @__PURE__ */ Re(["change"], ["update:modelValue"]),
3230
3238
  setup(e, { emit: t }) {
3231
- const n = e, l = ze(e, "modelValue"), o = t, a = V(null), i = V(!1), r = V([]), d = Je("values"), f = Je("map-file-import-uploading", null), _ = h(() => Qa(l.value, !!n.multiple)), $ = h(() => eo(l.value, !!n.multiple)), w = h(() => Gl(n.format)), k = h(() => Ja(n.customParams, d)), v = (G) => {
3239
+ const n = e, l = ze(e, "modelValue"), o = t, a = V(null), i = V(!1), r = V([]), d = Je("values"), f = Je("map-file-import-uploading", null), k = y(() => Qa(l.value, !!n.multiple)), $ = y(() => eo(l.value, !!n.multiple)), w = y(() => Gl(n.format)), _ = y(() => Ja(n.customParams, d)), v = (G) => {
3232
3240
  Ae({
3233
3241
  type: "error",
3234
3242
  title: "Помилка завантаження",
@@ -3236,11 +3244,11 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3236
3244
  position: "right-bottom"
3237
3245
  });
3238
3246
  }, x = () => {
3239
- n.disabled || i.value || k.value.ok && a.value?.click();
3247
+ n.disabled || i.value || _.value.ok && a.value?.click();
3240
3248
  }, b = async (G, F) => {
3241
3249
  const O = {
3242
3250
  api: n.api,
3243
- customParams: Object.keys(k.value.params).length ? k.value.params : void 0,
3251
+ customParams: Object.keys(_.value.params).length ? _.value.params : void 0,
3244
3252
  onProgress: (T) => {
3245
3253
  F && (F.status = "uploading", F.progressPercent = T);
3246
3254
  }
@@ -3250,7 +3258,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3250
3258
  pe(i, (G) => {
3251
3259
  f && (f.value = G);
3252
3260
  }, { immediate: !0 });
3253
- const S = h(() => r.value.filter((G) => G.status !== "done")), C = h(() => S.value[0] || null), E = (G) => typeof G == "string" ? G : G?.file_path || "", D = (G, F) => ({
3261
+ const S = y(() => r.value.filter((G) => G.status !== "done")), C = y(() => S.value[0] || null), E = (G) => typeof G == "string" ? G : G?.file_path || "", D = (G, F) => ({
3254
3262
  key: `${Date.now()}-${F}-${G.name}`,
3255
3263
  file: G,
3256
3264
  size: G.size,
@@ -3262,7 +3270,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3262
3270
  }), K = async (G) => {
3263
3271
  const { files: F } = G.target;
3264
3272
  if (!F || F.length === 0) return;
3265
- if (!k.value.ok) {
3273
+ if (!_.value.ok) {
3266
3274
  a.value && (a.value.value = "");
3267
3275
  return;
3268
3276
  }
@@ -3327,7 +3335,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3327
3335
  "onUpdate:value": F[0] || (F[0] = (O) => l.value = O)
3328
3336
  }, null, 8, ["item", "value"])) : Y("", !0),
3329
3337
  n.multiple ? (u(), m(Me, { key: 1 }, [
3330
- (u(!0), m(Me, null, Pe(_.value, (O, B) => (u(), be(It, {
3338
+ (u(!0), m(Me, null, Pe(k.value, (O, B) => (u(), be(It, {
3331
3339
  key: `${B}-${E(O)}`,
3332
3340
  multiple: !0,
3333
3341
  item: O,
@@ -3394,16 +3402,16 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3394
3402
  }),
3395
3403
  emits: ["update:modelValue"],
3396
3404
  setup(e) {
3397
- const t = e, n = ze(e, "modelValue"), l = V(null), o = V(!1), a = V(""), i = V([]), r = Je("values"), d = h(() => !!t.multiple), f = h(() => Gl(t.format)), _ = h(() => {
3405
+ const t = e, n = ze(e, "modelValue"), l = V(null), o = V(!1), a = V(""), i = V([]), r = Je("values"), d = y(() => !!t.multiple), f = y(() => Gl(t.format)), k = y(() => {
3398
3406
  if (f.value.length)
3399
3407
  return f.value.map((O) => `.${O}`).join(",");
3400
- }), $ = h(() => Qa(n.value, d.value)), w = h(() => eo(n.value, d.value)), k = h(() => Ja(t.customParams, r)), v = h(() => i.value.filter((O) => O.status !== "done")), x = h(() => d.value ? null : v.value[0] || null), b = h(() => {
3408
+ }), $ = y(() => Qa(n.value, d.value)), w = y(() => eo(n.value, d.value)), _ = y(() => Ja(t.customParams, r)), v = y(() => i.value.filter((O) => O.status !== "done")), x = y(() => d.value ? null : v.value[0] || null), b = y(() => {
3401
3409
  const O = v.value, B = O.reduce((H, fe) => H + fe.size, 0);
3402
3410
  if (!B) return 0;
3403
3411
  const T = O.reduce((H, fe) => H + Math.min(fe.uploaded, fe.size), 0);
3404
3412
  return Math.min(100, Math.round(T / B * 100));
3405
3413
  }), S = () => {
3406
- t.disabled || o.value || k.value.ok && l.value?.click();
3414
+ t.disabled || o.value || _.value.ok && l.value?.click();
3407
3415
  }, C = async (O, B) => {
3408
3416
  const T = B || G(O, 0);
3409
3417
  try {
@@ -3413,7 +3421,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3413
3421
  fileName: T.file.name,
3414
3422
  subdir: t.subdir,
3415
3423
  size: T.file.size,
3416
- ...k.value.params
3424
+ ..._.value.params
3417
3425
  }, fe = await fetch(`${t.api || "/file/upload2"}/start`, {
3418
3426
  method: "POST",
3419
3427
  headers: { "Content-Type": "application/json" },
@@ -3464,7 +3472,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3464
3472
  }), F = async (O) => {
3465
3473
  const B = O.target, T = D(B.files);
3466
3474
  if (!T.length) return;
3467
- if (!k.value.ok) {
3475
+ if (!_.value.ok) {
3468
3476
  B.value = "";
3469
3477
  return;
3470
3478
  }
@@ -3505,7 +3513,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3505
3513
  type: "file",
3506
3514
  class: "hidden",
3507
3515
  multiple: d.value,
3508
- accept: _.value,
3516
+ accept: k.value,
3509
3517
  disabled: o.value || t.disabled,
3510
3518
  onChange: F
3511
3519
  }, null, 40, lu),
@@ -3608,11 +3616,11 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3608
3616
  }),
3609
3617
  emits: ["update:modelValue"],
3610
3618
  setup(e) {
3611
- const t = /* @__PURE__ */ new Set(["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"]), n = e, l = ze(e, "modelValue"), o = V(null), a = V(!1), i = V("Обробка…"), r = V(""), d = V([]), f = V([]), _ = h(() => !!(n.multiple || n.multi)), $ = h(() => Gl(n.format)), w = h(() => {
3619
+ const t = /* @__PURE__ */ new Set(["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"]), n = e, l = ze(e, "modelValue"), o = V(null), a = V(!1), i = V("Обробка…"), r = V(""), d = V([]), f = V([]), k = y(() => !!(n.multiple || n.multi)), $ = y(() => Gl(n.format)), w = y(() => {
3612
3620
  if ($.value.length)
3613
3621
  return $.value.map((F) => `.${F}`).join(",");
3614
3622
  });
3615
- function k() {
3623
+ function _() {
3616
3624
  d.value.forEach((F) => URL.revokeObjectURL(F)), d.value = [];
3617
3625
  }
3618
3626
  function v(F) {
@@ -3628,7 +3636,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3628
3636
  };
3629
3637
  }
3630
3638
  function b() {
3631
- if (k(), _.value) {
3639
+ if (_(), k.value) {
3632
3640
  const F = Array.isArray(l.value) ? l.value.filter(Sl) : [];
3633
3641
  f.value = F.map(x);
3634
3642
  return;
@@ -3643,16 +3651,16 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3643
3651
  });
3644
3652
  }
3645
3653
  pe(
3646
- [() => l.value, _],
3654
+ [() => l.value, k],
3647
3655
  () => b(),
3648
3656
  { immediate: !0, deep: !0 }
3649
3657
  ), Vt(() => {
3650
- k();
3658
+ _();
3651
3659
  });
3652
3660
  const C = () => {
3653
3661
  n.disabled || a.value || o.value?.click();
3654
3662
  }, E = (F) => {
3655
- if (_.value && Array.isArray(l.value)) {
3663
+ if (k.value && Array.isArray(l.value)) {
3656
3664
  l.value = l.value.filter((O, B) => B !== F);
3657
3665
  return;
3658
3666
  }
@@ -3674,7 +3682,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3674
3682
  a.value = !0, i.value = T.length > 1 ? `Обробка… (${T.length})` : `Обробка… ${T[0].name}`, r.value = "", await S();
3675
3683
  try {
3676
3684
  const H = await Promise.all(T.map((fe) => ru(fe)));
3677
- if (_.value) {
3685
+ if (k.value) {
3678
3686
  const fe = Array.isArray(l.value) ? l.value.filter(Sl) : [];
3679
3687
  l.value = [...fe, ...H];
3680
3688
  } else
@@ -3703,7 +3711,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3703
3711
  ref: o,
3704
3712
  type: "file",
3705
3713
  class: "hidden",
3706
- multiple: _.value,
3714
+ multiple: k.value,
3707
3715
  accept: w.value,
3708
3716
  disabled: F.disabled || a.value,
3709
3717
  onChange: G
@@ -3754,10 +3762,10 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3754
3762
  }, [
3755
3763
  O[0] || (O[0] = c("div", { class: "h-6 w-6 shrink-0 animate-spin rounded-full border-[3px] border-blue-100 border-t-blue-600" }, null, -1)),
3756
3764
  c("span", xu, de(i.value), 1)
3757
- ], 8, wu)) : !F.disabled && (_.value || !f.value.length) ? (u(), m("div", {
3765
+ ], 8, wu)) : !F.disabled && (k.value || !f.value.length) ? (u(), m("div", {
3758
3766
  key: 1,
3759
3767
  class: "flex h-[120px] w-[120px] cursor-pointer items-center justify-center rounded-lg border border-dashed border-[#CFD9E0] text-gray-300 transition-all hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500",
3760
- title: _.value ? "Добавить файлы" : "Выбрать файл",
3768
+ title: k.value ? "Добавить файлы" : "Выбрать файл",
3761
3769
  onClick: C
3762
3770
  }, [
3763
3771
  Z(z(Tt), { class: "h-4 w-4" })
@@ -3772,7 +3780,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3772
3780
  item: { default: null }
3773
3781
  },
3774
3782
  setup(e) {
3775
- const t = e, n = h(() => {
3783
+ const t = e, n = y(() => {
3776
3784
  try {
3777
3785
  return new Date(t.item.cdate).toLocaleDateString("uk-UA", {
3778
3786
  day: "2-digit",
@@ -3862,14 +3870,14 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3862
3870
  updateListOnConfirm: !0
3863
3871
  });
3864
3872
  }
3865
- function _($) {
3873
+ function k($) {
3866
3874
  (n.item.ext === "jpg" || n.item.ext === "png") && l("openLightbox", { item: n.item, index: $ });
3867
3875
  }
3868
3876
  return ($, w) => (u(), m("div", Vu, [
3869
3877
  $.item.ext === "jpg" || $.item.ext === "png" ? (u(), m("div", Du, [
3870
3878
  c("div", {
3871
3879
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
3872
- onClick: w[0] || (w[0] = (k) => _($.index))
3880
+ onClick: w[0] || (w[0] = (_) => k($.index))
3873
3881
  }, [
3874
3882
  Z(zn, { item: $.item }, null, 8, ["item"])
3875
3883
  ])
@@ -3891,7 +3899,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3891
3899
  c("div", Bu, [
3892
3900
  c("button", {
3893
3901
  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",
3894
- onClick: w[1] || (w[1] = (k) => r($.item))
3902
+ onClick: w[1] || (w[1] = (_) => r($.item))
3895
3903
  }, [
3896
3904
  Z(z(jl), { class: "h-4 w-4" })
3897
3905
  ])
@@ -3899,7 +3907,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3899
3907
  c("div", Ru, [
3900
3908
  c("button", {
3901
3909
  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",
3902
- onClick: w[2] || (w[2] = (k) => i($.item))
3910
+ onClick: w[2] || (w[2] = (_) => i($.item))
3903
3911
  }, [
3904
3912
  Z(z(al), { class: "h-4 w-4" })
3905
3913
  ])
@@ -3909,7 +3917,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3909
3917
  c("button", {
3910
3918
  type: "button",
3911
3919
  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",
3912
- onClick: w[3] || (w[3] = (k) => f())
3920
+ onClick: w[3] || (w[3] = (_) => f())
3913
3921
  }, [
3914
3922
  Z(z(an), { class: "h-4 w-4" })
3915
3923
  ])
@@ -3941,13 +3949,13 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3941
3949
  },
3942
3950
  emits: ["update"],
3943
3951
  setup(e, { emit: t }) {
3944
- const n = e, l = Je("form"), o = h(() => l.value.formId), a = V(!1), i = V(0), r = t, d = V(!1), f = V({}), _ = V([]), $ = V(""), w = h(() => Array.isArray(_.value) ? _.value.filter((E) => E.ext === "jpg" || E.ext === "png").map((E) => E?.file_path) : []), k = h(() => $.value === "" ? _.value : _.value.filter((E) => E?.uploaded_name?.includes($.value))), v = (E) => {
3952
+ const n = e, l = Je("form"), o = y(() => l.value.formId), a = V(!1), i = V(0), r = t, d = V(!1), f = V({}), k = V([]), $ = V(""), w = y(() => Array.isArray(k.value) ? k.value.filter((E) => E.ext === "jpg" || E.ext === "png").map((E) => E?.file_path) : []), _ = y(() => $.value === "" ? k.value : k.value.filter((E) => E?.uploaded_name?.includes($.value))), v = (E) => {
3945
3953
  const D = w.value.findIndex((K) => K === E.item.file_path);
3946
3954
  D !== -1 && (a.value = !0, i.value = D);
3947
3955
  }, x = async () => {
3948
3956
  try {
3949
3957
  const E = await fetch(`${n.prefix}/widget/file/${o.value}`).then((D) => D.json());
3950
- _.value = E?.rows;
3958
+ k.value = E?.rows;
3951
3959
  } catch (E) {
3952
3960
  console.error(E);
3953
3961
  }
@@ -3990,7 +3998,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3990
3998
  const K = vt("Lightbox"), G = vt("MessageBox");
3991
3999
  return u(), m("div", zu, [
3992
4000
  c("div", Uu, [
3993
- c("h2", Hu, " Файлів: " + de(_.value?.length), 1),
4001
+ c("h2", Hu, " Файлів: " + de(k.value?.length), 1),
3994
4002
  c("div", Wu, [
3995
4003
  c("label", null, [
3996
4004
  c("input", {
@@ -4004,7 +4012,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
4004
4012
  ])
4005
4013
  ])
4006
4014
  ]),
4007
- _.value?.length > 4 ? (u(), m("div", Ku, [
4015
+ k.value?.length > 4 ? (u(), m("div", Ku, [
4008
4016
  c("div", null, [
4009
4017
  c("div", Yu, [
4010
4018
  c("div", Gu, [
@@ -4026,8 +4034,8 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
4026
4034
  ])
4027
4035
  ])
4028
4036
  ])) : Y("", !0),
4029
- _.value?.length ? (u(), m("div", Xu, [
4030
- (u(!0), m(Me, null, Pe(k.value, (F, O) => (u(), be(ju, {
4037
+ k.value?.length ? (u(), m("div", Xu, [
4038
+ (u(!0), m(Me, null, Pe(_.value, (F, O) => (u(), be(ju, {
4031
4039
  key: O,
4032
4040
  prefix: E.prefix,
4033
4041
  item: F,
@@ -4036,7 +4044,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
4036
4044
  onOpenModal: D[3] || (D[3] = (B) => C(B)),
4037
4045
  onOpenLightbox: D[4] || (D[4] = (B) => v(B))
4038
4046
  }, null, 8, ["prefix", "item", "index"]))), 128)),
4039
- k.value.length ? Y("", !0) : (u(), m("div", Zu, D[8] || (D[8] = [
4047
+ _.value.length ? Y("", !0) : (u(), m("div", Zu, D[8] || (D[8] = [
4040
4048
  c("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
4041
4049
  ])))
4042
4050
  ])) : Y("", !0),
@@ -4245,11 +4253,11 @@ const $d = /* @__PURE__ */ me({
4245
4253
  }
4246
4254
  },
4247
4255
  setup(e) {
4248
- const t = e, n = Je("values", V({})), l = Je("form"), o = h(() => t.schema?.filter((r) => no(
4256
+ const t = e, n = Je("values", V({})), l = Je("form"), o = y(() => t.schema?.filter((r) => no(
4249
4257
  n.value,
4250
4258
  r?.conditions,
4251
4259
  t.name || void 0
4252
- ))), a = h(() => dd[t.view]), i = h(() => {
4260
+ ))), a = y(() => dd[t.view]), i = y(() => {
4253
4261
  if (n.value || (n.value = {}), !t.name) return n.value;
4254
4262
  const r = n.value[t.name];
4255
4263
  if (r) return r;
@@ -4270,7 +4278,7 @@ const $d = /* @__PURE__ */ me({
4270
4278
  }, { ref_for: !0 }, f, {
4271
4279
  item: f,
4272
4280
  modelValue: i.value[f.name],
4273
- "onUpdate:modelValue": (_) => i.value[f.name] = _,
4281
+ "onUpdate:modelValue": (k) => i.value[f.name] = k,
4274
4282
  style: e.style,
4275
4283
  error: z(l)?.errors?.[f.name]
4276
4284
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
@@ -4286,13 +4294,13 @@ const $d = /* @__PURE__ */ me({
4286
4294
  modelValue: o,
4287
4295
  onCreated: a
4288
4296
  }) => {
4289
- const i = V(!1), r = V({}), d = V([]), f = V(null), _ = h(() => e.add?.title || "Додати"), $ = h(() => e.add?.token || e.add?.model || ""), w = h(() => e.add?.pk || "id");
4297
+ const i = V(!1), r = V({}), d = V([]), f = V(null), k = y(() => e.add?.title || "Додати"), $ = y(() => e.add?.token || e.add?.model || ""), w = y(() => e.add?.pk || "id");
4290
4298
  return {
4291
4299
  isOpenAdd: i,
4292
4300
  addData: r,
4293
4301
  addSchema: d,
4294
4302
  addForm: f,
4295
- addTitle: _,
4303
+ addTitle: k,
4296
4304
  addOption: async () => {
4297
4305
  if (!(!$.value || f?.value.validate()))
4298
4306
  try {
@@ -4385,7 +4393,7 @@ const $d = /* @__PURE__ */ me({
4385
4393
  },
4386
4394
  emits: ["update:keyWord"],
4387
4395
  setup(e, { emit: t }) {
4388
- const n = e, l = t, o = h({
4396
+ const n = e, l = t, o = y({
4389
4397
  get: () => n.keyWord,
4390
4398
  set: (a) => l("update:keyWord", a)
4391
4399
  });
@@ -4671,28 +4679,28 @@ const $d = /* @__PURE__ */ me({
4671
4679
  },
4672
4680
  emits: ["change", "update:modelValue", "value-selected"],
4673
4681
  setup(e, { emit: t }) {
4674
- const n = e, l = t, o = h(() => n.multiple), a = h(() => n.disabled), i = h(() => n.search);
4682
+ const n = e, l = t, o = y(() => n.multiple), a = y(() => n.disabled), i = y(() => n.search);
4675
4683
  bt(n.style);
4676
- const r = h({
4684
+ const r = y({
4677
4685
  get: () => n.modelValue,
4678
4686
  set: (U) => l("update:modelValue", U)
4679
4687
  });
4680
4688
  (r.value === null || r.value === void 0 || r.value === "") && n.defaultValue != null && (r.value = n.defaultValue);
4681
- const d = V(null), f = V(null), _ = V(null), $ = V(null), w = V(!1), k = V(!1), v = V(null), x = V(-1), b = V([]), S = V(""), C = V(null), E = (U) => {
4689
+ const d = V(null), f = V(null), k = V(null), $ = V(null), w = V(!1), _ = V(!1), v = V(null), x = V(-1), b = V([]), S = V(""), C = V(null), E = (U) => {
4682
4690
  f.value = U;
4683
4691
  }, D = (U) => {
4684
4692
  C.value = U;
4685
4693
  }, K = (U) => {
4686
4694
  $.value = U;
4687
4695
  }, G = (U) => {
4688
- _.value = U;
4696
+ k.value = U;
4689
4697
  }, F = (U, ae) => {
4690
4698
  b.value[ae] = U;
4691
- }, O = V({}), B = V([]), T = h(() => {
4699
+ }, O = V({}), B = V([]), T = y(() => {
4692
4700
  if (!B.value.length) return [];
4693
4701
  const U = Le.value, ae = new Map(U.map((_e) => [_e.id?.toString(), _e]));
4694
4702
  return B.value.map((_e) => ae.get(_e?.toString())).filter((_e) => !!_e);
4695
- }), H = h(() => n.placeholder || "Select..."), fe = h(() => he(v.value)), ke = h(() => a.value ? !1 : o.value ? B.value.length > 0 : r.value !== null && r.value !== void 0 && r.value !== ""), ee = (U) => o.value ? B.value.some((ae) => ae?.toString() === U?.toString()) : r.value?.toString() === U?.toString(), ne = h(() => {
4703
+ }), H = y(() => n.placeholder || "Select..."), fe = y(() => he(v.value)), ke = y(() => a.value ? !1 : o.value ? B.value.length > 0 : r.value !== null && r.value !== void 0 && r.value !== ""), ee = (U) => o.value ? B.value.some((ae) => ae?.toString() === U?.toString()) : r.value?.toString() === U?.toString(), ne = y(() => {
4696
4704
  let U = Le.value ?? [];
4697
4705
  if (!n.data && S.value.trim() !== "") {
4698
4706
  const ae = S.value.toLowerCase();
@@ -4706,7 +4714,7 @@ const $d = /* @__PURE__ */ me({
4706
4714
  U = U.filter((_e) => !ae.has(_e.id?.toString()));
4707
4715
  }
4708
4716
  return U;
4709
- }), ge = Je("values"), X = Je("field-props"), Q = h(() => n.slot ?? n?.optionTemplate ?? ""), ie = (U) => il(U, Q.value), he = (U) => ul(U, Q.value), j = h(() => rl(Q.value)), J = (U) => In(U), N = (U) => !!(!j.value && ln(U) && !J(U)), ve = (U) => {
4717
+ }), ge = Je("values"), X = Je("field-props"), Q = y(() => n.slot ?? n?.optionTemplate ?? ""), ie = (U) => il(U, Q.value), he = (U) => ul(U, Q.value), j = y(() => rl(Q.value)), J = (U) => In(U), N = (U) => !!(!j.value && ln(U) && !J(U)), ve = (U) => {
4710
4718
  const ae = ln(U);
4711
4719
  return ae ? { color: ae } : void 0;
4712
4720
  }, ye = (U) => !!(!j.value && (Dn(U) || J(U))), se = (U, ae, _e) => {
@@ -4809,7 +4817,7 @@ const $d = /* @__PURE__ */ me({
4809
4817
  _e >= 0 && (U = _e);
4810
4818
  }
4811
4819
  x.value = U, Ze(() => {
4812
- P(b.value[U], _.value);
4820
+ P(b.value[U], k.value);
4813
4821
  });
4814
4822
  }, je = async () => {
4815
4823
  a.value || (w.value = !0, await Ze(() => {
@@ -4902,25 +4910,25 @@ const $d = /* @__PURE__ */ me({
4902
4910
  if (!w.value) return;
4903
4911
  const { key: ae } = U;
4904
4912
  if (ae === "ArrowDown")
4905
- U.preventDefault(), x.value + 1 < ne.value.length && (x.value += 1, P(b.value[x.value], _.value));
4913
+ U.preventDefault(), x.value + 1 < ne.value.length && (x.value += 1, P(b.value[x.value], k.value));
4906
4914
  else if (ae === "ArrowUp")
4907
- U.preventDefault(), x.value > 0 && (x.value -= 1, P(b.value[x.value], _.value));
4915
+ U.preventDefault(), x.value > 0 && (x.value -= 1, P(b.value[x.value], k.value));
4908
4916
  else if (ae === "Enter") {
4909
4917
  U.preventDefault();
4910
4918
  const _e = ne.value[x.value];
4911
4919
  _e && g(_e), C.value?.blur();
4912
- } else ae === "Escape" ? (U.preventDefault(), Ke()) : ae === "Backspace" ? o.value && S.value === "" && B.value.length && (B.value = B.value.slice(0, -1), r.value = [...B.value], l("change", r.value)) : ae === "Home" ? (x.value = 0, P(b.value[0], _.value)) : ae === "End" ? (x.value = ne.value.length - 1, P(b.value[x.value], _.value)) : ae === "Tab" && Ke();
4920
+ } else ae === "Escape" ? (U.preventDefault(), Ke()) : ae === "Backspace" ? o.value && S.value === "" && B.value.length && (B.value = B.value.slice(0, -1), r.value = [...B.value], l("change", r.value)) : ae === "Home" ? (x.value = 0, P(b.value[0], k.value)) : ae === "End" ? (x.value = ne.value.length - 1, P(b.value[x.value], k.value)) : ae === "Tab" && Ke();
4913
4921
  }, it = () => {
4914
- a.value || (k.value = !0);
4922
+ a.value || (_.value = !0);
4915
4923
  }, dt = () => {
4916
- k.value = !1, S.value = "";
4924
+ _.value = !1, S.value = "";
4917
4925
  }, St = (U) => {
4918
4926
  U.key === "Escape" && w.value && Ke();
4919
4927
  }, ct = (U) => {
4920
4928
  const ae = U.target;
4921
4929
  d.value?.contains(ae) || $.value?.contains(ae) || Ke();
4922
4930
  }, xt = (U) => {
4923
- w.value && _.value && !_.value.contains(U.target) && Ce();
4931
+ w.value && k.value && !k.value.contains(U.target) && Ce();
4924
4932
  }, Zt = () => {
4925
4933
  w.value && Ce();
4926
4934
  }, Fn = () => {
@@ -5046,7 +5054,7 @@ const $d = /* @__PURE__ */ me({
5046
5054
  "onUpdate:keyWord": ae[3] || (ae[3] = (_e) => S.value = _e),
5047
5055
  disabled: a.value,
5048
5056
  "is-open": w.value,
5049
- "input-focus": k.value,
5057
+ "input-focus": _.value,
5050
5058
  "is-multi": o.value,
5051
5059
  "selected-options": T.value,
5052
5060
  "selected-ids": B.value,
@@ -5147,12 +5155,12 @@ const $d = /* @__PURE__ */ me({
5147
5155
  setup(e, { emit: t }) {
5148
5156
  const n = e, l = t;
5149
5157
  bt(n.style);
5150
- const o = h({
5158
+ const o = y({
5151
5159
  get: () => Array.isArray(n.modelValue) ? n.modelValue[0] ?? null : n.modelValue ?? null,
5152
5160
  set: (se) => l("update:modelValue", se)
5153
5161
  });
5154
5162
  o.value == null && n.defaultValue != null && (o.value = n.defaultValue);
5155
- const a = Je("values"), i = Je("field-props"), r = h(() => !!n.disabled), d = V(null), f = V(!1), _ = V(null), $ = V(null), w = V(null), k = V({}), v = `vs-input-inline-select-${Jl()}`, x = h(() => n.placeholder || "Оберіть значення"), b = h(() => K(d.value) || n.placeholder || "Оберіть значення"), S = h(() => n.slot ?? ""), C = h(() => rl(S.value)), E = h(() => n.teleport || "body"), D = /^#(?:[\da-fA-F]{3}|[\da-fA-F]{6}|[\da-fA-F]{8})$/, K = (se) => ul(se, S.value), G = (se) => !!(!C.value && ln(se)), F = h(() => {
5163
+ const a = Je("values"), i = Je("field-props"), r = y(() => !!n.disabled), d = V(null), f = V(!1), k = V(null), $ = V(null), w = V(null), _ = V({}), v = `vs-input-inline-select-${Jl()}`, x = y(() => n.placeholder || "Оберіть значення"), b = y(() => K(d.value) || n.placeholder || "Оберіть значення"), S = y(() => n.slot ?? ""), C = y(() => rl(S.value)), E = y(() => n.teleport || "body"), D = /^#(?:[\da-fA-F]{3}|[\da-fA-F]{6}|[\da-fA-F]{8})$/, K = (se) => ul(se, S.value), G = (se) => !!(!C.value && ln(se)), F = y(() => {
5156
5164
  const se = ln(d.value).trim();
5157
5165
  return se ? D.test(se) ? `bg-[${se}] border-[${se}]` : `bg-${se.toLowerCase()}-500 border-${se.toLowerCase()}-500` : "";
5158
5166
  }), {
@@ -5195,7 +5203,7 @@ const $d = /* @__PURE__ */ me({
5195
5203
  let le = se.left;
5196
5204
  le + We + Se > Ue && (le = Ue - We - Se), le = Math.max(le, Se);
5197
5205
  const we = Le - se.bottom - Ie - Se, Ve = se.top - Ie - Se, De = we < Math.min(He, 260) && Ve > we, st = Math.max(120, Math.min(320, De ? Ve : we));
5198
- k.value = {
5206
+ _.value = {
5199
5207
  position: "fixed",
5200
5208
  left: `${le}px`,
5201
5209
  top: De ? `${se.top - Ie}px` : `${se.bottom + Ie}px`,
@@ -5240,7 +5248,7 @@ const $d = /* @__PURE__ */ me({
5240
5248
  d.value = se, o.value = se.id, l("change", se.id), J(se), ee(se), he();
5241
5249
  }, ve = (se) => {
5242
5250
  const Se = se.target;
5243
- _.value?.contains(Se) || w.value?.contains(Se) || he();
5251
+ k.value?.contains(Se) || w.value?.contains(Se) || he();
5244
5252
  }, ye = () => {
5245
5253
  f.value && ge();
5246
5254
  };
@@ -5257,7 +5265,7 @@ const $d = /* @__PURE__ */ me({
5257
5265
  }), (se, Se) => (u(), m("div", {
5258
5266
  class: "relative inline-flex w-full max-w-full",
5259
5267
  ref_key: "rootRef",
5260
- ref: _,
5268
+ ref: k,
5261
5269
  onClick: Se[0] || (Se[0] = Te(() => {
5262
5270
  }, ["stop"]))
5263
5271
  }, [
@@ -5282,7 +5290,7 @@ const $d = /* @__PURE__ */ me({
5282
5290
  ref_key: "dropdownRef",
5283
5291
  ref: w,
5284
5292
  class: "z-[3000] w-44 transition-[opacity,margin] duration-150 bg-white text-gray-900 border border-gray-200 rounded-xl shadow-lg",
5285
- style: Ee(k.value),
5293
+ style: Ee(_.value),
5286
5294
  role: "menu",
5287
5295
  "aria-orientation": "vertical"
5288
5296
  }, [
@@ -5342,7 +5350,7 @@ const $d = /* @__PURE__ */ me({
5342
5350
  }),
5343
5351
  emits: ["update:modelValue"],
5344
5352
  setup(e) {
5345
- const t = e, { inputClass: n } = bt(t.style), l = ze(e, "modelValue"), o = h(() => !!t.disabled), a = h(() => t.placeholder ?? "");
5353
+ const t = e, { inputClass: n } = bt(t.style), l = ze(e, "modelValue"), o = y(() => !!t.disabled), a = y(() => t.placeholder ?? "");
5346
5354
  function i() {
5347
5355
  typeof l.value == "string" && (l.value = l.value.trim());
5348
5356
  }
@@ -5380,7 +5388,7 @@ const $d = /* @__PURE__ */ me({
5380
5388
  }),
5381
5389
  emits: ["update:modelValue"],
5382
5390
  setup(e) {
5383
- const t = jo(() => import("./vs-richtext-GbFdHLA3.js")), n = e, l = ze(e, "modelValue"), o = h(() => !!n.disabled), a = h(() => n.placeholder ?? ""), i = h(() => ({
5391
+ const t = jo(() => import("./vs-richtext-f-mdnB37.js")), n = e, l = ze(e, "modelValue"), o = y(() => !!n.disabled), a = y(() => n.placeholder ?? ""), i = y(() => ({
5384
5392
  height: n.richtextProps.height || "300px",
5385
5393
  format: n.format,
5386
5394
  ...n.richtextProps
@@ -5451,12 +5459,12 @@ const wc = /* @__PURE__ */ qe(yc, [["render", bc]]), xc = { class: "bg-white rou
5451
5459
  }),
5452
5460
  emits: ["update:modelValue"],
5453
5461
  setup(e) {
5454
- const t = e, n = zo(), l = Je("values", null), o = Je("form-root-values", null), a = (R) => t.actions === void 0 ? !0 : t.actions.includes(R), i = ["search", "import", "export", "add"], r = h(() => i.some((R) => a(R))), d = ze(e, "modelValue"), f = V({}), _ = V(""), $ = V(null), w = V("asc"), k = h(() => {
5455
- const R = d.value ?? [], te = _.value ? R.filter((g) => v.value?.some((L) => {
5462
+ const t = e, n = zo(), l = Je("values", null), o = Je("form-root-values", null), a = (R) => t.actions === void 0 ? !0 : t.actions.includes(R), i = ["search", "import", "export", "add"], r = y(() => i.some((R) => a(R))), d = ze(e, "modelValue"), f = V({}), k = V(""), $ = V(null), w = V("asc"), _ = y(() => {
5463
+ const R = d.value ?? [], te = k.value ? R.filter((g) => v.value?.some((L) => {
5456
5464
  const P = L.key || L.name;
5457
5465
  if (!P) return !1;
5458
5466
  const oe = g[P];
5459
- return oe ? Array.isArray(oe) ? oe.join(", ").toLowerCase().includes(_.value.toLowerCase()) : String(oe).toLowerCase().includes(_.value.toLowerCase()) : !1;
5467
+ return oe ? Array.isArray(oe) ? oe.join(", ").toLowerCase().includes(k.value.toLowerCase()) : String(oe).toLowerCase().includes(k.value.toLowerCase()) : !1;
5460
5468
  })) : R;
5461
5469
  if (!$.value) return te;
5462
5470
  const ue = $.value, A = [...te].sort((g, L) => {
@@ -5464,7 +5472,7 @@ const wc = /* @__PURE__ */ qe(yc, [["render", bc]]), xc = { class: "bg-white rou
5464
5472
  return typeof P == "number" && typeof oe == "number" ? P - oe : String(P).localeCompare(String(oe));
5465
5473
  });
5466
5474
  return w.value === "asc" ? A : A.reverse();
5467
- }), v = h(() => (t.colModel ?? []).filter((R) => !R.tableHidden)), x = V(null), b = V(null), S = V(null);
5475
+ }), v = y(() => (t.colModel ?? []).filter((R) => !R.tableHidden)), x = V(null), b = V(null), S = V(null);
5468
5476
  function C(R) {
5469
5477
  return R.pointerType === "touch" || R.pointerType === "pen";
5470
5478
  }
@@ -5589,7 +5597,7 @@ const wc = /* @__PURE__ */ qe(yc, [["render", bc]]), xc = { class: "bg-white rou
5589
5597
  );
5590
5598
  const j = V(""), J = V(!1);
5591
5599
  let N = "edit", ve = 0;
5592
- const ye = (R) => (R?.format || R?.type || "").toString().toLowerCase(), se = h(() => (t.colModel?.filter((te) => ye(te) !== "slot") ?? []).map((te) => {
5600
+ const ye = (R) => (R?.format || R?.type || "").toString().toLowerCase(), se = y(() => (t.colModel?.filter((te) => ye(te) !== "slot") ?? []).map((te) => {
5593
5601
  const ue = te.key || te.name;
5594
5602
  return ue ? { ...te, name: ue, key: ue } : te;
5595
5603
  })), Se = V({}), Ie = V({}), Le = (R) => typeof R != "string" ? !1 : !!n[R], Ue = (R, te) => te ? te.split(".").reduce((ue, A) => ue == null ? ue : ue[A.trim()], R) : R, He = (R, te) => typeof R != "string" ? "" : R.replace(/{{\s*([^}]+)\s*}}/g, (ue, A) => {
@@ -5682,11 +5690,11 @@ const wc = /* @__PURE__ */ qe(yc, [["render", bc]]), xc = { class: "bg-white rou
5682
5690
  Z(z(ol), { class: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" }),
5683
5691
  Oe(c("input", {
5684
5692
  type: "text",
5685
- "onUpdate:modelValue": te[0] || (te[0] = (ue) => _.value = ue),
5693
+ "onUpdate:modelValue": te[0] || (te[0] = (ue) => k.value = ue),
5686
5694
  placeholder: "Пошук",
5687
5695
  class: "w-full rounded-md border border-gray-200 bg-white pl-10 pr-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100"
5688
5696
  }, null, 512), [
5689
- [ot, _.value]
5697
+ [ot, k.value]
5690
5698
  ])
5691
5699
  ])) : Y("", !0),
5692
5700
  c("div", $c, [
@@ -5754,7 +5762,7 @@ const wc = /* @__PURE__ */ qe(yc, [["render", bc]]), xc = { class: "bg-white rou
5754
5762
  c("tbody", {
5755
5763
  class: re(["divide-y divide-gray-200", { "[&_tr:last-child]:border-0": !b.value }])
5756
5764
  }, [
5757
- k.value.length === 0 ? (u(), m("td", Ic, [
5765
+ _.value.length === 0 ? (u(), m("td", Ic, [
5758
5766
  c("div", Tc, [
5759
5767
  c("div", Fc, [
5760
5768
  Z(wc, { class: "w-48 mx-auto" }),
@@ -5765,7 +5773,7 @@ const wc = /* @__PURE__ */ qe(yc, [["render", bc]]), xc = { class: "bg-white rou
5765
5773
  ])
5766
5774
  ])
5767
5775
  ])) : Y("", !0),
5768
- (u(!0), m(Me, null, Pe(k.value, (ue, A) => (u(), m("tr", {
5776
+ (u(!0), m(Me, null, Pe(_.value, (ue, A) => (u(), m("tr", {
5769
5777
  key: ue.id,
5770
5778
  "data-row-index": A,
5771
5779
  class: re(["border-b transition-colors hover:bg-gray-50 cursor-move text-sm text-gray-700", {
@@ -5997,9 +6005,9 @@ const vf = ["title", "aria-expanded"], gf = ["src"], yf = { class: "map-layers__
5997
6005
  },
5998
6006
  emits: ["onLayerChange", "onOverlayToggle", "onVectorOverlayToggle"],
5999
6007
  setup(e, { emit: t }) {
6000
- const n = e, l = t, o = 10 * Un, a = 400 * Un, i = 400 * Un, r = 320 * Un, d = V(null), f = V(null), _ = V(null), $ = V(!1), w = V({}), k = h(() => Object.keys(n.basemaps || {}).length > 0), v = h(() => Object.keys(n.tileOverlays || {}).length > 0), x = h(() => n.vectorOverlays ?? []), b = h(() => x.value.length > 0), S = h(
6001
- () => k.value || v.value || b.value
6002
- ), C = h(() => n.basemaps?.[n.activeBaseKey]?.name || n.activeBaseKey || "Шари"), E = h(() => K(n.basemaps)), D = h(() => K(n.tileOverlays || {}));
6008
+ const n = e, l = t, o = 10 * Un, a = 400 * Un, i = 400 * Un, r = 320 * Un, d = V(null), f = V(null), k = V(null), $ = V(!1), w = V({}), _ = y(() => Object.keys(n.basemaps || {}).length > 0), v = y(() => Object.keys(n.tileOverlays || {}).length > 0), x = y(() => n.vectorOverlays ?? []), b = y(() => x.value.length > 0), S = y(
6009
+ () => _.value || v.value || b.value
6010
+ ), C = y(() => n.basemaps?.[n.activeBaseKey]?.name || n.activeBaseKey || "Шари"), E = y(() => K(n.basemaps)), D = y(() => K(n.tileOverlays || {}));
6003
6011
  function K(Q) {
6004
6012
  const ie = n.previewTile;
6005
6013
  return ie ? Object.fromEntries(
@@ -6015,7 +6023,7 @@ const vf = ["title", "aria-expanded"], gf = ["src"], yf = { class: "map-layers__
6015
6023
  function F(Q) {
6016
6024
  return D.value[Q] || n.tileOverlays?.[Q]?.preview || "";
6017
6025
  }
6018
- const O = h(() => G(n.activeBaseKey));
6026
+ const O = y(() => G(n.activeBaseKey));
6019
6027
  function B(Q) {
6020
6028
  return Array.isArray(n.activeTileOverlayKeys) && n.activeTileOverlayKeys.includes(Q);
6021
6029
  }
@@ -6053,7 +6061,7 @@ const vf = ["title", "aria-expanded"], gf = ["src"], yf = { class: "map-layers__
6053
6061
  function ge(Q) {
6054
6062
  if (!$.value) return;
6055
6063
  const ie = Q.target;
6056
- d.value?.contains(ie) || _.value?.contains(ie) || fe();
6064
+ d.value?.contains(ie) || k.value?.contains(ie) || fe();
6057
6065
  }
6058
6066
  function X(Q) {
6059
6067
  Q.key === "Escape" && fe();
@@ -6093,7 +6101,7 @@ const vf = ["title", "aria-expanded"], gf = ["src"], yf = { class: "map-layers__
6093
6101
  $.value ? (u(), m("div", {
6094
6102
  key: 0,
6095
6103
  ref_key: "panelRef",
6096
- ref: _,
6104
+ ref: k,
6097
6105
  class: "map-layers__panel",
6098
6106
  style: Ee(w.value),
6099
6107
  role: "dialog",
@@ -6132,7 +6140,7 @@ const vf = ["title", "aria-expanded"], gf = ["src"], yf = { class: "map-layers__
6132
6140
  ], 10, xf))), 128))
6133
6141
  ])
6134
6142
  ])) : Y("", !0),
6135
- k.value ? (u(), m("section", Sf, [
6143
+ _.value ? (u(), m("section", Sf, [
6136
6144
  ie[2] || (ie[2] = c("h4", { class: "map-layers__section-title" }, "Базові шари", -1)),
6137
6145
  c("div", Cf, [
6138
6146
  (u(!0), m(Me, null, Pe(Q.basemaps, (he, j) => (u(), m("button", {
@@ -6202,14 +6210,14 @@ function Of(e, t, n) {
6202
6210
  ]
6203
6211
  };
6204
6212
  const o = [], a = [];
6205
- if (l.forEach((f, _) => {
6206
- const $ = _ + 1, w = t === "decimal" ? Bf(f, $, n) : oo(f, $, n);
6213
+ if (l.forEach((f, k) => {
6214
+ const $ = k + 1, w = t === "decimal" ? Bf(f, $, n) : oo(f, $, n);
6207
6215
  if (!w.ok) {
6208
6216
  o.push(...w.errors);
6209
6217
  return;
6210
6218
  }
6211
- const k = a[a.length - 1];
6212
- if (k && Da(k, w.point)) {
6219
+ const _ = a[a.length - 1];
6220
+ if (_ && Da(_, w.point)) {
6213
6221
  o.push({ line: $, message: "Послідовні точки не повинні дублюватися." });
6214
6222
  return;
6215
6223
  }
@@ -6319,8 +6327,8 @@ function Va(e, t, n) {
6319
6327
  return { ok: !1, error: { line: t, message: "Хвилини повинні бути в діапазоні 0..59." } };
6320
6328
  if (a < 0 || a > 60)
6321
6329
  return { ok: !1, error: { line: t, message: "Секунди повинні бути в діапазоні 0..60." } };
6322
- const f = Math.abs(l), _ = n === "lat" ? 90 : 180;
6323
- if (f > _)
6330
+ const f = Math.abs(l), k = n === "lat" ? 90 : 180;
6331
+ if (f > k)
6324
6332
  return {
6325
6333
  ok: !1,
6326
6334
  error: {
@@ -6328,7 +6336,7 @@ function Va(e, t, n) {
6328
6336
  message: n === "lat" ? "Градуси широти повинні бути в діапазоні 0..90." : "Градуси довготи повинні бути в діапазоні 0..180."
6329
6337
  }
6330
6338
  };
6331
- if (f === _ && (o !== 0 || a !== 0))
6339
+ if (f === k && (o !== 0 || a !== 0))
6332
6340
  return {
6333
6341
  ok: !1,
6334
6342
  error: {
@@ -6440,21 +6448,21 @@ const Uf = ["title"], Hf = {
6440
6448
  const L = i(), P = L?.map?.cadastreSuggest ?? L?.map?.parcelSuggest ?? L?.map?.parcelSearch;
6441
6449
  if (typeof P == "string" && P.trim()) return P.trim();
6442
6450
  }
6443
- const _ = !!d(), $ = !!r(), w = h(() => {
6451
+ const k = !!d(), $ = !!r(), w = y(() => {
6444
6452
  const A = ["nominatim", "xy", "parcel"];
6445
- return _ && A.unshift("address"), $ ? A : A.filter((g) => g !== "nominatim");
6446
- }), k = h(() => {
6453
+ return k && A.unshift("address"), $ ? A : A.filter((g) => g !== "nominatim");
6454
+ }), _ = y(() => {
6447
6455
  const A = w.value, g = l.config?.tools?.filter((L) => A.includes(L));
6448
6456
  return g && g.length ? g : A;
6449
- }), v = h(() => l.config?.placeholder?.trim() || "Пошук…"), x = V(k.value[0]);
6450
- pe(k, (A) => {
6457
+ }), v = y(() => l.config?.placeholder?.trim() || "Пошук…"), x = V(_.value[0]);
6458
+ pe(_, (A) => {
6451
6459
  A.includes(x.value) || (x.value = A[0]);
6452
6460
  });
6453
- const b = V(""), S = V(!1), C = V(null), E = V(null), D = V(null), K = V(null), G = V([]), F = V(null), O = V(!1), B = V([]), T = h(
6461
+ const b = V(""), S = V(!1), C = V(null), E = V(null), D = V(null), K = V(null), G = V([]), F = V(null), O = V(!1), B = V([]), T = y(
6454
6462
  () => (x.value === "address" || x.value === "nominatim") && O.value
6455
- ), H = h(() => l.config?.addressDebounceMs ?? 1e3);
6463
+ ), H = y(() => l.config?.addressDebounceMs ?? 1e3);
6456
6464
  let fe = null;
6457
- const ke = V(!1), ee = h(() => b.value.trim().length > 0 ? G.value : B.value), ne = h(() => b.value.trim().length ? `Знайдено ${G.value.length}` : "Історія пошуку"), ge = h(
6465
+ const ke = V(!1), ee = y(() => b.value.trim().length > 0 ? G.value : B.value), ne = y(() => b.value.trim().length ? `Знайдено ${G.value.length}` : "Історія пошуку"), ge = y(
6458
6466
  () => b.value.trim().length ? "Нічого не знайдено" : "Історія порожня"
6459
6467
  );
6460
6468
  function X() {
@@ -6792,7 +6800,7 @@ const Uf = ["title"], Hf = {
6792
6800
  class: "flex gap-2 text-gray-900",
6793
6801
  onSubmit: Te(ue, ["prevent"])
6794
6802
  }, [
6795
- k.value.length > 1 ? (u(), m("div", {
6803
+ _.value.length > 1 ? (u(), m("div", {
6796
6804
  key: 0,
6797
6805
  ref_key: "dropdownRef",
6798
6806
  ref: C,
@@ -6830,7 +6838,7 @@ const Uf = ["title"], Hf = {
6830
6838
  ]),
6831
6839
  S.value ? (u(), m("div", Hf, [
6832
6840
  c("ul", null, [
6833
- (u(!0), m(Me, null, Pe(k.value, (L) => Oe((u(), m("li", {
6841
+ (u(!0), m(Me, null, Pe(_.value, (L) => Oe((u(), m("li", {
6834
6842
  key: L,
6835
6843
  class: "px-3 py-2 cursor-pointer hover:bg-gray-100 text-gray-900",
6836
6844
  onClick: (P) => se(L, P)
@@ -6950,7 +6958,7 @@ const Uf = ["title"], Hf = {
6950
6958
  __name: "AddCoordinates",
6951
6959
  emits: ["submit", "cancel"],
6952
6960
  setup(e, { emit: t }) {
6953
- const n = t, l = V(null), o = V(null), a = (d, f, _) => Math.min(Math.max(d, f), _), i = () => {
6961
+ const n = t, l = V(null), o = V(null), a = (d, f, k) => Math.min(Math.max(d, f), k), i = () => {
6954
6962
  if (l.value === null || o.value === null || !Number.isFinite(l.value) || !Number.isFinite(o.value))
6955
6963
  return;
6956
6964
  const d = a(l.value, -90, 90), f = a(o.value, -180, 180);
@@ -6962,7 +6970,7 @@ const Uf = ["title"], Hf = {
6962
6970
  f[2] || (f[2] = c("p", { class: "text-xs text-gray-600 mb-1" }, "Додати точку за координатами:", -1)),
6963
6971
  c("div", rp, [
6964
6972
  Oe(c("input", {
6965
- "onUpdate:modelValue": f[0] || (f[0] = (_) => l.value = _),
6973
+ "onUpdate:modelValue": f[0] || (f[0] = (k) => l.value = k),
6966
6974
  type: "number",
6967
6975
  step: "0.0001",
6968
6976
  class: "w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-500",
@@ -6976,7 +6984,7 @@ const Uf = ["title"], Hf = {
6976
6984
  ]
6977
6985
  ]),
6978
6986
  Oe(c("input", {
6979
- "onUpdate:modelValue": f[1] || (f[1] = (_) => o.value = _),
6987
+ "onUpdate:modelValue": f[1] || (f[1] = (k) => o.value = k),
6980
6988
  type: "number",
6981
6989
  step: "0.0001",
6982
6990
  class: "w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-500",
@@ -7074,7 +7082,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7074
7082
  },
7075
7083
  emits: ["update", "delete"],
7076
7084
  setup(e, { emit: t }) {
7077
- const n = e, l = t, o = h(
7085
+ const n = e, l = t, o = y(
7078
7086
  () => `${n.coords.lat.toFixed(4)}°, ${n.coords.lng.toFixed(4)}°`
7079
7087
  ), a = V(!1), i = V(n.coords.lat), r = V(n.coords.lng);
7080
7088
  pe(
@@ -7084,17 +7092,17 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7084
7092
  },
7085
7093
  { deep: !0, immediate: !0 }
7086
7094
  );
7087
- const d = (w, k, v) => Math.min(Math.max(w, k), v), f = () => {
7095
+ const d = (w, _, v) => Math.min(Math.max(w, _), v), f = () => {
7088
7096
  a.value = !0;
7089
- }, _ = () => {
7097
+ }, k = () => {
7090
7098
  if (!Number.isFinite(i.value) || !Number.isFinite(r.value))
7091
7099
  return;
7092
- const w = d(i.value, -90, 90), k = d(r.value, -180, 180);
7093
- l("update", { id: n.id, coords: { lat: w, lng: k } }), a.value = !1;
7100
+ const w = d(i.value, -90, 90), _ = d(r.value, -180, 180);
7101
+ l("update", { id: n.id, coords: { lat: w, lng: _ } }), a.value = !1;
7094
7102
  }, $ = () => {
7095
7103
  l("delete", n.id);
7096
7104
  };
7097
- return (w, k) => (u(), m("div", fp, [
7105
+ return (w, _) => (u(), m("div", fp, [
7098
7106
  Z(z(za), {
7099
7107
  size: 12,
7100
7108
  "stroke-width": 2,
@@ -7102,7 +7110,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7102
7110
  }),
7103
7111
  a.value ? (u(), m("div", pp, [
7104
7112
  Oe(c("input", {
7105
- "onUpdate:modelValue": k[0] || (k[0] = (v) => i.value = v),
7113
+ "onUpdate:modelValue": _[0] || (_[0] = (v) => i.value = v),
7106
7114
  type: "number",
7107
7115
  step: "0.0001",
7108
7116
  min: "-90",
@@ -7118,7 +7126,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7118
7126
  ]
7119
7127
  ]),
7120
7128
  Oe(c("input", {
7121
- "onUpdate:modelValue": k[1] || (k[1] = (v) => r.value = v),
7129
+ "onUpdate:modelValue": _[1] || (_[1] = (v) => r.value = v),
7122
7130
  type: "number",
7123
7131
  step: "0.0001",
7124
7132
  min: "-180",
@@ -7136,7 +7144,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7136
7144
  c("button", {
7137
7145
  class: "px-1.5 py-0.5 bg-emerald-500 text-white rounded hover:bg-emerald-600 text-xs",
7138
7146
  type: "button",
7139
- onClick: _
7147
+ onClick: k
7140
7148
  }, " ✓ ")
7141
7149
  ])) : (u(), m("span", mp, de(o.value), 1)),
7142
7150
  a.value ? Y("", !0) : (u(), m("button", {
@@ -7206,7 +7214,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7206
7214
  K * K + Math.cos(E) * Math.cos(D) * G * G
7207
7215
  )
7208
7216
  ));
7209
- }, r = h(() => {
7217
+ }, r = y(() => {
7210
7218
  if (t.points.length < 2) return 0;
7211
7219
  let v = 0;
7212
7220
  for (let x = 1; x < t.points.length; x += 1)
@@ -7215,7 +7223,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7215
7223
  t.points[t.points.length - 1].coords,
7216
7224
  t.points[0].coords
7217
7225
  )), v;
7218
- }), d = h(() => r.value >= 1e3 ? `${sn(r.value / 1e3)} км` : `${sn(r.value)} м`);
7226
+ }), d = y(() => r.value >= 1e3 ? `${sn(r.value / 1e3)} км` : `${sn(r.value)} м`);
7219
7227
  function f(v) {
7220
7228
  if (v.length < 3) return 0;
7221
7229
  const x = v[0].lat, b = v[0].lng, S = (E, D) => {
@@ -7229,12 +7237,12 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7229
7237
  }
7230
7238
  return Math.abs(C) * 0.5;
7231
7239
  }
7232
- const _ = h(() => {
7240
+ const k = y(() => {
7233
7241
  if (!t.isShapeClosed || t.points.length < 3) return 0;
7234
7242
  const v = t.points.map((x) => x.coords);
7235
7243
  return f(v);
7236
- }), $ = h(() => _.value > 0), w = h(() => {
7237
- const v = _.value;
7244
+ }), $ = y(() => k.value > 0), w = y(() => {
7245
+ const v = k.value;
7238
7246
  if (v === 0) return "—";
7239
7247
  if (l.value === "km2") {
7240
7248
  const b = v / 1e6;
@@ -7246,7 +7254,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7246
7254
  }
7247
7255
  const x = v >= 1 ? Math.round(v) : v;
7248
7256
  return `${sn(x)} м²`;
7249
- }), k = h(() => {
7257
+ }), _ = y(() => {
7250
7258
  const v = t.points.length;
7251
7259
  return v === 1 ? "1 точка" : v >= 2 && v <= 4 ? `${v} точки` : `${v} точок`;
7252
7260
  });
@@ -7300,7 +7308,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7300
7308
  "stroke-width": 2.5
7301
7309
  })
7302
7310
  ]),
7303
- c("span", Vp, de(k.value), 1),
7311
+ c("span", Vp, de(_.value), 1),
7304
7312
  c("button", {
7305
7313
  type: "button",
7306
7314
  class: "text-xs text-blue-500 hover:text-blue-600 font-medium transition-colors",
@@ -7345,17 +7353,17 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7345
7353
  setup(e) {
7346
7354
  const t = e;
7347
7355
  function n(a, i) {
7348
- const r = (k) => k * Math.PI / 180, d = r(i.lat - a.lat), f = r(i.lng - a.lng), _ = r(a.lat), $ = r(i.lat);
7356
+ const r = (_) => _ * Math.PI / 180, d = r(i.lat - a.lat), f = r(i.lng - a.lng), k = r(a.lat), $ = r(i.lat);
7349
7357
  return 6371e3 * (2 * Math.asin(
7350
7358
  Math.sqrt(
7351
- Math.sin(d / 2) ** 2 + Math.cos(_) * Math.cos($) * Math.sin(f / 2) ** 2
7359
+ Math.sin(d / 2) ** 2 + Math.cos(k) * Math.cos($) * Math.sin(f / 2) ** 2
7352
7360
  )
7353
7361
  ));
7354
7362
  }
7355
7363
  function l(a) {
7356
7364
  return ro(a);
7357
7365
  }
7358
- const o = h(() => {
7366
+ const o = y(() => {
7359
7367
  const a = [], i = t.points;
7360
7368
  if (i.length < 2) return a;
7361
7369
  for (let r = 0; r < i.length; r++) {
@@ -7401,18 +7409,18 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7401
7409
  "shape-closed-change"
7402
7410
  ],
7403
7411
  setup(e, { expose: t, emit: n }) {
7404
- const l = n, o = V([]), a = h(() => o.value.length > 0), i = V(!1), r = V(!1), d = V("general");
7412
+ const l = n, o = V([]), a = y(() => o.value.length > 0), i = V(!1), r = V(!1), d = V("general");
7405
7413
  function f(T) {
7406
7414
  d.value = T, l("tab-change", T);
7407
7415
  }
7408
7416
  at(() => {
7409
7417
  l("tab-change", d.value);
7410
7418
  });
7411
- const _ = h(
7419
+ const k = y(
7412
7420
  () => o.value.length >= 3 && !r.value
7413
7421
  );
7414
7422
  let $ = 1;
7415
- const w = () => o.value.map((T) => ({ id: T.id, coords: { ...T.coords } })), k = () => {
7423
+ const w = () => o.value.map((T) => ({ id: T.id, coords: { ...T.coords } })), _ = () => {
7416
7424
  o.value.length < 3 && r.value && (r.value = !1, l("shape-closed-change", !1)), l("points-change", w());
7417
7425
  }, v = () => {
7418
7426
  const T = $;
@@ -7421,7 +7429,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7421
7429
  o.value = [
7422
7430
  ...o.value,
7423
7431
  { id: v(), coords: { lat: T.lat, lng: T.lng } }
7424
- ], k();
7432
+ ], _();
7425
7433
  }, b = ({
7426
7434
  id: T,
7427
7435
  coords: H
@@ -7429,11 +7437,11 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7429
7437
  const fe = o.value.findIndex((ee) => ee.id === T);
7430
7438
  if (fe === -1) return;
7431
7439
  const ke = [...o.value];
7432
- ke[fe] = { id: T, coords: { ...H } }, o.value = ke, k();
7440
+ ke[fe] = { id: T, coords: { ...H } }, o.value = ke, _();
7433
7441
  }, S = (T) => {
7434
- o.value = o.value.filter((H) => H.id !== T), k();
7442
+ o.value = o.value.filter((H) => H.id !== T), _();
7435
7443
  }, C = () => {
7436
- o.value = [], r.value && (r.value = !1, l("shape-closed-change", !1)), k();
7444
+ o.value = [], r.value && (r.value = !1, l("shape-closed-change", !1)), _();
7437
7445
  }, E = (T) => {
7438
7446
  b(T);
7439
7447
  }, D = (T) => {
@@ -7445,7 +7453,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7445
7453
  }, F = () => {
7446
7454
  i.value = !1;
7447
7455
  }, O = () => {
7448
- _.value && (r.value = !0, l("complete"), l("shape-closed-change", !0));
7456
+ k.value && (r.value = !0, l("complete"), l("shape-closed-change", !0));
7449
7457
  }, B = () => {
7450
7458
  C(), i.value = !1, l("close");
7451
7459
  };
@@ -7516,7 +7524,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7516
7524
  key: 0,
7517
7525
  onClick: K
7518
7526
  })),
7519
- _.value ? (u(), be(dp, {
7527
+ k.value ? (u(), be(dp, {
7520
7528
  key: 1,
7521
7529
  onClick: O
7522
7530
  })) : Y("", !0)
@@ -7631,7 +7639,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7631
7639
  };
7632
7640
  }
7633
7641
  let f = !1;
7634
- function _(v) {
7642
+ function k(v) {
7635
7643
  v.getSource(kt) || (v.addSource(kt, {
7636
7644
  type: "geojson",
7637
7645
  data: o()
@@ -7720,17 +7728,17 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7720
7728
  D === "topoint" ? i(E, l.isShapeClosed) : o()
7721
7729
  );
7722
7730
  }
7723
- function k() {
7731
+ function _() {
7724
7732
  const v = l.map;
7725
- v && (f || _(v), w(v));
7733
+ v && (f || k(v), w(v));
7726
7734
  }
7727
7735
  return pe(
7728
7736
  () => [l.points, l.isShapeClosed, l.labelMode],
7729
- () => k(),
7737
+ () => _(),
7730
7738
  { deep: !0, immediate: !0 }
7731
7739
  ), pe(
7732
7740
  () => l.map,
7733
- () => k(),
7741
+ () => _(),
7734
7742
  { immediate: !0 }
7735
7743
  ), Vt(() => {
7736
7744
  $(l.map);
@@ -7745,19 +7753,19 @@ function Qp(e = {}) {
7745
7753
  function r() {
7746
7754
  t.value = !1, n.value = [], l.value = !1, a.value?.clearPoints(), e.onDeactivate?.();
7747
7755
  }
7748
- function d(k) {
7749
- n.value = k;
7756
+ function d(_) {
7757
+ n.value = _;
7750
7758
  }
7751
- function f(k) {
7752
- o.value = k;
7759
+ function f(_) {
7760
+ o.value = _;
7753
7761
  }
7754
- function _(k) {
7755
- l.value = k;
7762
+ function k(_) {
7763
+ l.value = _;
7756
7764
  }
7757
- function $(k) {
7758
- t.value && a.value?.addPoint({ lat: k.lat, lng: k.lng });
7765
+ function $(_) {
7766
+ t.value && a.value?.addPoint({ lat: _.lat, lng: _.lng });
7759
7767
  }
7760
- const w = h(() => n.value.length > 0);
7768
+ const w = y(() => n.value.length > 0);
7761
7769
  return {
7762
7770
  isRulerActive: t,
7763
7771
  rulerPoints: n,
@@ -7769,7 +7777,7 @@ function Qp(e = {}) {
7769
7777
  closeRuler: r,
7770
7778
  onRulerPointsChange: d,
7771
7779
  onRulerTabChange: f,
7772
- onRulerShapeClosedChange: _,
7780
+ onRulerShapeClosedChange: k,
7773
7781
  handleRulerMapClick: $
7774
7782
  };
7775
7783
  }
@@ -7893,10 +7901,10 @@ const sm = { class: "vs-map-body" }, im = {
7893
7901
  },
7894
7902
  emits: ["update:modelValue", "valueSelected"],
7895
7903
  setup(e, { emit: t }) {
7896
- const n = e, l = t, o = Pa(), a = Je("values", V({})), i = typeof document < "u" && document.querySelector("#modal") ? "#modal" : "body", r = h(() => {
7897
- const s = o?.multiple, p = o?.multi, y = (M) => M === "" || M === !0 || M === "true" || M === 1 || M === "1";
7898
- return !!n.multi || !!n.multiple || y(p) || y(s);
7899
- }), d = h(() => !!n.disabled), f = V(!1), _ = V(null), $ = V(0), w = V(""), k = V(null), v = V([]), x = V(null), b = V(null), S = Qp({
7904
+ const n = e, l = t, o = Pa(), a = Je("values", V({})), i = typeof document < "u" && document.querySelector("#modal") ? "#modal" : "body", r = y(() => {
7905
+ const s = o?.multiple, p = o?.multi, h = (M) => M === "" || M === !0 || M === "true" || M === 1 || M === "1";
7906
+ return !!n.multi || !!n.multiple || h(p) || h(s);
7907
+ }), d = y(() => !!n.disabled), f = V(!1), k = V(null), $ = V(0), w = V(""), _ = V(null), v = V([]), x = V(null), b = V(null), S = Qp({
7900
7908
  onActivate() {
7901
7909
  if ($e)
7902
7910
  try {
@@ -7911,7 +7919,7 @@ const sm = { class: "vs-map-body" }, im = {
7911
7919
  function C() {
7912
7920
  S.toggleRuler();
7913
7921
  }
7914
- const E = nl(), D = E?.appContext?.config?.globalProperties?.$settings ?? {}, K = D?.map ?? {}, G = h(() => {
7922
+ const E = nl(), D = E?.appContext?.config?.globalProperties?.$settings ?? {}, K = D?.map ?? {}, G = y(() => {
7915
7923
  const s = K.layerPresets;
7916
7924
  return Array.isArray(s) ? s : [];
7917
7925
  }), F = E?.vnode?.props ?? {};
@@ -7925,17 +7933,17 @@ const sm = { class: "vs-map-body" }, im = {
7925
7933
  function H(s) {
7926
7934
  if (s != null) {
7927
7935
  if (Array.isArray(s) && s.length >= 2) {
7928
- const p = Number(s[0]), y = Number(s[1]);
7929
- return !Number.isFinite(p) || !Number.isFinite(y) ? void 0 : [p, y];
7936
+ const p = Number(s[0]), h = Number(s[1]);
7937
+ return !Number.isFinite(p) || !Number.isFinite(h) ? void 0 : [p, h];
7930
7938
  }
7931
7939
  if (typeof s == "object") {
7932
- const p = s, y = p.geom;
7940
+ const p = s, h = p.geom;
7933
7941
  if (p.type === "Point" && Array.isArray(p.coordinates)) {
7934
7942
  const q = p.coordinates, ce = Number(q[0]), xe = Number(q[1]);
7935
7943
  if (Number.isFinite(ce) && Number.isFinite(xe)) return [ce, xe];
7936
7944
  }
7937
- if (y?.type === "Point" && Array.isArray(y.coordinates)) {
7938
- const q = y.coordinates, ce = Number(q[0]), xe = Number(q[1]);
7945
+ if (h?.type === "Point" && Array.isArray(h.coordinates)) {
7946
+ const q = h.coordinates, ce = Number(q[0]), xe = Number(q[1]);
7939
7947
  if (Number.isFinite(ce) && Number.isFinite(xe)) return [ce, xe];
7940
7948
  }
7941
7949
  const M = Number(p.lat), I = Number(
@@ -7945,16 +7953,16 @@ const sm = { class: "vs-map-body" }, im = {
7945
7953
  }
7946
7954
  }
7947
7955
  }
7948
- const fe = h(() => {
7956
+ const fe = y(() => {
7949
7957
  const s = H(n.center);
7950
7958
  if (s) return s;
7951
7959
  if (!O("center"))
7952
7960
  return H(K.center) ?? H(D.center);
7953
- }), ke = h(
7961
+ }), ke = y(
7954
7962
  () => O("zoom") ? n.zoom : K.zoom ?? n.zoom
7955
- ), ee = h(
7963
+ ), ee = y(
7956
7964
  () => O("katottg") ? String(n.katottg ?? "") : String(K.katottg ?? n.katottg ?? "")
7957
- ), ne = h(() => O("layers") ? n.layers ?? [] : K.layers ?? n.layers ?? []), ge = h(() => O("bounds") ? n.bounds : K.bounds ?? n.bounds), X = V(
7965
+ ), ne = y(() => O("layers") ? n.layers ?? [] : K.layers ?? n.layers ?? []), ge = y(() => O("bounds") ? n.bounds : K.bounds ?? n.bounds), X = V(
7958
7966
  Array.isArray(fe.value) && fe.value.length === 2 ? [...fe.value] : B
7959
7967
  ), Q = V(
7960
7968
  typeof ke.value == "number" ? ke.value : T
@@ -7967,9 +7975,9 @@ const sm = { class: "vs-map-body" }, im = {
7967
7975
  Math.max(Xm, Math.round(p))
7968
7976
  );
7969
7977
  }
7970
- function J(s, p, y) {
7978
+ function J(s, p, h) {
7971
7979
  if (!Number.isFinite(s) || !Number.isFinite(p)) return;
7972
- const M = ff(s, p, j(y)), I = ie.value;
7980
+ const M = ff(s, p, j(h)), I = ie.value;
7973
7981
  I && I.z === M.z && I.x === M.x && I.y === M.y || (ie.value = M);
7974
7982
  }
7975
7983
  function N() {
@@ -7990,19 +7998,19 @@ const sm = { class: "vs-map-body" }, im = {
7990
7998
  J(X.value[0], X.value[1]);
7991
7999
  const ye = V(n.modelValue), se = V(null), Se = V([]), Ie = V(!1), Le = V(!1), Ue = V(!1), He = V(!1), Ne = V(!1);
7992
8000
  yn("map-file-import-uploading", Ne);
7993
- const tt = h(() => Ne.value ? "Завантаження файлу на сервер..." : He.value ? "Конвертація геометрії..." : ""), We = V([]), le = V({
8001
+ const tt = y(() => Ne.value ? "Завантаження файлу на сервер..." : He.value ? "Конвертація геометрії..." : ""), We = V([]), le = V({
7994
8002
  srid: "",
7995
8003
  encoding: "UTF-8",
7996
8004
  file: ""
7997
- }), we = h(() => {
7998
- const s = a.value ?? {}, p = s.id ?? o.id ?? "1", y = o.form ?? s.form ?? "form", M = o.table ?? s.table ?? "table", I = n.name ?? o.field ?? "geom";
8005
+ }), we = y(() => {
8006
+ const s = a.value ?? {}, p = s.id ?? o.id ?? "1", h = o.form ?? s.form ?? "form", M = o.table ?? s.table ?? "table", I = n.name ?? o.field ?? "geom";
7999
8007
  return `/file/upload/temp?${new URLSearchParams({
8000
8008
  id: String(p),
8001
- form: String(y),
8009
+ form: String(h),
8002
8010
  table: String(M),
8003
8011
  field: String(I)
8004
8012
  }).toString()}`;
8005
- }), Ve = h(() => ({
8013
+ }), Ve = y(() => ({
8006
8014
  srid: {
8007
8015
  type: "Autocomplete",
8008
8016
  label: "Система координат",
@@ -8061,19 +8069,19 @@ const sm = { class: "vs-map-body" }, im = {
8061
8069
  }
8062
8070
  };
8063
8071
  let Ge = !1, yt = !1;
8064
- const je = Bl({}), Ke = V([]), $t = h(
8072
+ const je = Bl({}), Ke = V([]), $t = y(
8065
8073
  () => Ke.value.map((s) => je[s]).filter(Boolean)
8066
- ), R = V(null), te = h(() => R.value?.entries ?? []), ue = h(() => {
8074
+ ), R = V(null), te = y(() => R.value?.entries ?? []), ue = y(() => {
8067
8075
  if (R.value)
8068
8076
  return {
8069
8077
  left: `${R.value.point.x + 12}px`,
8070
8078
  top: `${R.value.point.y + 12}px`
8071
8079
  };
8072
- }), A = h(() => {
8080
+ }), A = y(() => {
8073
8081
  if (Array.isArray(n.tools) && n.tools.length) return n.tools;
8074
8082
  const s = o?.tools;
8075
8083
  return Array.isArray(s) ? s.map((p) => String(p)) : typeof s == "string" ? s.split(",").map((p) => p.trim()).filter(Boolean) : [];
8076
- }), g = h(() => {
8084
+ }), g = y(() => {
8077
8085
  const s = {
8078
8086
  search: !1,
8079
8087
  import: !1,
@@ -8094,7 +8102,7 @@ const sm = { class: "vs-map-body" }, im = {
8094
8102
  polygon: !0,
8095
8103
  rectangle: !0
8096
8104
  };
8097
- const p = new Set(A.value.map((y) => y.toLowerCase()));
8105
+ const p = new Set(A.value.map((h) => h.toLowerCase()));
8098
8106
  return {
8099
8107
  search: p.has("search"),
8100
8108
  import: p.has("import"),
@@ -8110,13 +8118,13 @@ const sm = { class: "vs-map-body" }, im = {
8110
8118
  const p = typeof s == "string" ? s.trim() : "";
8111
8119
  if (!p) return "";
8112
8120
  if (/^https?:\/\//i.test(p)) return p;
8113
- const y = window?.location?.origin ?? "", M = p.replace(/^\/+/, "");
8114
- return M ? y ? `${y}/${M}` : `/${M}` : y;
8121
+ const h = window?.location?.origin ?? "", M = p.replace(/^\/+/, "");
8122
+ return M ? h ? `${h}/${M}` : `/${M}` : h;
8115
8123
  }
8116
8124
  function P() {
8117
8125
  const s = Array.isArray(K.basemaps) && K.basemaps.length ? K.basemaps : D.basemaps;
8118
8126
  if (Array.isArray(s) && s.length) {
8119
- const y = s.map((M, I) => {
8127
+ const h = s.map((M, I) => {
8120
8128
  const q = String(M?.key ?? M?.id ?? M?.name ?? `b${I}`), ce = L(String(M?.url ?? ""));
8121
8129
  if (!ce) return null;
8122
8130
  const xe = typeof M?.preview == "string" && M.preview ? L(M.preview) : "";
@@ -8127,7 +8135,7 @@ const sm = { class: "vs-map-body" }, im = {
8127
8135
  (M, [I, q]) => (M[I] = q, M),
8128
8136
  {}
8129
8137
  );
8130
- if (Object.keys(y).length) return y;
8138
+ if (Object.keys(h).length) return h;
8131
8139
  }
8132
8140
  return {
8133
8141
  voyager: {
@@ -8150,23 +8158,23 @@ const sm = { class: "vs-map-body" }, im = {
8150
8158
  const oe = P(), Ce = Object.keys(oe), Xe = V(Ce.length ? Ce[0] : "");
8151
8159
  function Ye() {
8152
8160
  const s = Array.isArray(K.overlays) && K.overlays.length ? K.overlays : D.overlays;
8153
- return !Array.isArray(s) || !s.length ? {} : s.map((y, M) => {
8154
- const q = (typeof y?.name == "string" ? y.name.trim() : "") || `o${M}`, ce = L(String(y?.url ?? ""));
8161
+ return !Array.isArray(s) || !s.length ? {} : s.map((h, M) => {
8162
+ const q = (typeof h?.name == "string" ? h.name.trim() : "") || `o${M}`, ce = L(String(h?.url ?? ""));
8155
8163
  if (!ce) return null;
8156
- const xe = typeof y?.preview == "string" && y.preview ? L(y.preview) : "";
8157
- return [q, { ...y, name: q, url: ce, preview: xe }];
8164
+ const xe = typeof h?.preview == "string" && h.preview ? L(h.preview) : "";
8165
+ return [q, { ...h, name: q, url: ce, preview: xe }];
8158
8166
  }).filter(
8159
- (y) => Array.isArray(y) && y.length === 2
8167
+ (h) => Array.isArray(h) && h.length === 2
8160
8168
  ).reduce(
8161
- (y, [M, I]) => (y[M] = I, y),
8169
+ (h, [M, I]) => (h[M] = I, h),
8162
8170
  {}
8163
8171
  );
8164
8172
  }
8165
8173
  const it = Ye(), dt = V(
8166
8174
  Object.keys(it).filter((s) => !!it[s]?.visible)
8167
- ), St = h(
8175
+ ), St = y(
8168
8176
  () => g.value.point || g.value.line || g.value.polygon || g.value.rectangle
8169
- ), ct = h(
8177
+ ), ct = y(
8170
8178
  () => $t.value.filter((s) => s.config?.overlay !== !1).map((s) => ({
8171
8179
  id: s.id,
8172
8180
  label: String(s.config.title || s.config.name || s.id),
@@ -8187,7 +8195,7 @@ const sm = { class: "vs-map-body" }, im = {
8187
8195
  if (Array.from(document.styleSheets).some((Fe) => Fe?.href?.includes(q))) return;
8188
8196
  const xe = document.createElement("link");
8189
8197
  xe.rel = "stylesheet", xe.href = q, document.head.appendChild(xe);
8190
- }, y = async () => {
8198
+ }, h = async () => {
8191
8199
  const q = new Function("u", "return import(u)"), ce = await q("https://esm.sh/maplibre-gl@3.6.2"), xe = ce?.default ?? ce;
8192
8200
  if (!xe) throw new Error("maplibre esm fallback failed");
8193
8201
  window.maplibregl = xe, window.mapboxgl = xe;
@@ -8195,7 +8203,7 @@ const sm = { class: "vs-map-body" }, im = {
8195
8203
  if (!Qe) throw new Error("mapbox draw esm fallback failed");
8196
8204
  window.MapboxDraw = Qe;
8197
8205
  }, I = (async () => {
8198
- p("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css"), p("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.css"), (!window.maplibregl || !window.MapboxDraw) && await y();
8206
+ p("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css"), p("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.css"), (!window.maplibregl || !window.MapboxDraw) && await h();
8199
8207
  const q = window.maplibregl, ce = window.MapboxDraw;
8200
8208
  if (!q) throw new Error("maplibregl not available after load");
8201
8209
  if (!ce) throw new Error("MapboxDraw not available after load");
@@ -8249,14 +8257,14 @@ const sm = { class: "vs-map-body" }, im = {
8249
8257
  },
8250
8258
  onMouseMove(s, p) {
8251
8259
  if (!s.startPoint) return;
8252
- const [y, M] = s.startPoint, I = p.lngLat.lng, q = p.lngLat.lat;
8260
+ const [h, M] = s.startPoint, I = p.lngLat.lng, q = p.lngLat.lat;
8253
8261
  s.rectangle.setCoordinates([
8254
8262
  [
8255
- [y, M],
8263
+ [h, M],
8256
8264
  [I, M],
8257
8265
  [I, q],
8258
- [y, q],
8259
- [y, M]
8266
+ [h, q],
8267
+ [h, M]
8260
8268
  ]
8261
8269
  ]);
8262
8270
  },
@@ -8273,14 +8281,14 @@ const sm = { class: "vs-map-body" }, im = {
8273
8281
  ]);
8274
8282
  return;
8275
8283
  }
8276
- const [y, M] = s.startPoint, I = p.lngLat.lng, q = p.lngLat.lat;
8277
- return Math.abs(y - I) > 0 && Math.abs(M - q) > 0 ? (s.rectangle.setCoordinates([
8284
+ const [h, M] = s.startPoint, I = p.lngLat.lng, q = p.lngLat.lat;
8285
+ return Math.abs(h - I) > 0 && Math.abs(M - q) > 0 ? (s.rectangle.setCoordinates([
8278
8286
  [
8279
- [y, M],
8287
+ [h, M],
8280
8288
  [I, M],
8281
8289
  [I, q],
8282
- [y, q],
8283
- [y, M]
8290
+ [h, q],
8291
+ [h, M]
8284
8292
  ]
8285
8293
  ]), this.map.fire("draw.create", { features: [s.rectangle.toGeoJSON()] }), this.changeMode("simple_select", { featureIds: [s.rectangle.id] })) : (this.deleteFeature([s.rectangle.id], { silent: !0 }), s.hasCoordinates = !1, this.changeMode("simple_select"));
8286
8294
  },
@@ -8289,9 +8297,9 @@ const sm = { class: "vs-map-body" }, im = {
8289
8297
  onTrash(s) {
8290
8298
  this.deleteFeature([s.rectangle.id], { silent: !0 }), this.changeMode("simple_select");
8291
8299
  },
8292
- toDisplayFeatures(s, p, y) {
8300
+ toDisplayFeatures(s, p, h) {
8293
8301
  const M = p.properties.id === s.rectangle.id;
8294
- M && !s.hasCoordinates || (p.properties.active = M ? "true" : "false", y(p));
8302
+ M && !s.hasCoordinates || (p.properties.active = M ? "true" : "false", h(p));
8295
8303
  }
8296
8304
  };
8297
8305
  }
@@ -8435,17 +8443,17 @@ const sm = { class: "vs-map-body" }, im = {
8435
8443
  const p = String(s?.url ?? "").trim();
8436
8444
  if (!p) return "";
8437
8445
  if (/^https?:\/\//i.test(p)) return p;
8438
- const y = window.location?.origin ?? "", M = p.replace(/^\/+/, "");
8439
- return `${y}/${M}`;
8446
+ const h = window.location?.origin ?? "", M = p.replace(/^\/+/, "");
8447
+ return `${h}/${M}`;
8440
8448
  }
8441
8449
  function mt(s) {
8442
8450
  s && R.value?.layerId !== s || (R.value = null);
8443
8451
  }
8444
8452
  function Et(s, p = {}) {
8445
8453
  if (s.popup === !1) return [];
8446
- const y = Number(p?.point_count);
8447
- if (Number.isFinite(y) && y > 1)
8448
- return [{ key: "Об'єктів у кластері", value: String(y) }];
8454
+ const h = Number(p?.point_count);
8455
+ if (Number.isFinite(h) && h > 1)
8456
+ return [{ key: "Об'єктів у кластері", value: String(h) }];
8449
8457
  const M = lt(s), I = Vl(s, M, G.value);
8450
8458
  return Array.isArray(s.popup) ? s.popup.length ? s.popup.map((q) => {
8451
8459
  const ce = q?.field || q?.name;
@@ -8458,36 +8466,36 @@ const sm = { class: "vs-map-body" }, im = {
8458
8466
  }
8459
8467
  function Ct(s) {
8460
8468
  if (!Array.isArray(s)) return [];
8461
- const p = (M) => Array.isArray(M) && M.length >= 2 && Number.isFinite(Number(M[0])) && Number.isFinite(Number(M[1])), y = (M) => {
8469
+ const p = (M) => Array.isArray(M) && M.length >= 2 && Number.isFinite(Number(M[0])) && Number.isFinite(Number(M[1])), h = (M) => {
8462
8470
  if (!M.length) return M;
8463
8471
  const I = M[0], q = M[M.length - 1];
8464
8472
  return !q || I[0] !== q[0] || I[1] !== q[1] ? [...M, I] : M;
8465
8473
  };
8466
8474
  if (s.length && p(s[0])) {
8467
8475
  const M = s.map((I) => [Number(I[0]), Number(I[1])]).filter(p);
8468
- return M.length ? [y(M)] : [];
8476
+ return M.length ? [h(M)] : [];
8469
8477
  }
8470
8478
  return s.length && Array.isArray(s[0]) && p(s[0][0]) ? s.map(
8471
8479
  (I) => Array.isArray(I) ? I.map((q) => [Number(q[0]), Number(q[1])]) : []
8472
- ).filter((I) => I.length).map(y) : s.length && Array.isArray(s[0]) && Array.isArray(s[0][0]) && p(s[0][0][0]) ? s.flatMap((I) => Array.isArray(I) ? I : []).map(
8480
+ ).filter((I) => I.length).map(h) : s.length && Array.isArray(s[0]) && Array.isArray(s[0][0]) && p(s[0][0][0]) ? s.flatMap((I) => Array.isArray(I) ? I : []).map(
8473
8481
  (I) => Array.isArray(I) ? I.map((q) => [Number(q[0]), Number(q[1])]) : []
8474
- ).filter((I) => I.length).map(y) : [];
8482
+ ).filter((I) => I.length).map(h) : [];
8475
8483
  }
8476
8484
  function Pt(s) {
8477
- const p = s.style ?? {}, y = p.color ?? "#3b82f6";
8478
- if (!p.colorAttr || !p.colorSet) return y;
8485
+ const p = s.style ?? {}, h = p.color ?? "#3b82f6";
8486
+ if (!p.colorAttr || !p.colorSet) return h;
8479
8487
  const M = Object.keys(p.colorSet);
8480
- if (!M.length) return y;
8488
+ if (!M.length) return h;
8481
8489
  const I = ["match", ["to-string", ["get", p.colorAttr]]];
8482
8490
  return M.forEach((q) => {
8483
- I.push(String(q), p.colorSet?.[q] ?? y);
8484
- }), I.push(y), I;
8491
+ I.push(String(q), p.colorSet?.[q] ?? h);
8492
+ }), I.push(h), I;
8485
8493
  }
8486
8494
  function Mt(s) {
8487
8495
  if (!W) return;
8488
8496
  const p = W.getStyle()?.layers;
8489
- Array.isArray(p) && [...p].reverse().forEach((y) => {
8490
- y.source === s && W.getLayer(y.id) && W.removeLayer(y.id);
8497
+ Array.isArray(p) && [...p].reverse().forEach((h) => {
8498
+ h.source === s && W.getLayer(h.id) && W.removeLayer(h.id);
8491
8499
  });
8492
8500
  }
8493
8501
  function Qt(s) {
@@ -8500,12 +8508,12 @@ const sm = { class: "vs-map-body" }, im = {
8500
8508
  }), s.handlers = [], [...s.layerIds, ...s.boundsIds].forEach((M) => {
8501
8509
  W.getLayer(M) && W.removeLayer(M);
8502
8510
  }), Mt(s.sourceId), W.getSource(s.sourceId) && W.removeSource(s.sourceId);
8503
- const p = `vs-ov-bounds-src-${s.id}`, y = `vs-ov-bounds-line-${s.id}`;
8504
- W.getLayer(y) && W.removeLayer(y), W.getSource(p) && W.removeSource(p), mt(s.id);
8511
+ const p = `vs-ov-bounds-src-${s.id}`, h = `vs-ov-bounds-line-${s.id}`;
8512
+ W.getLayer(h) && W.removeLayer(h), W.getSource(p) && W.removeSource(p), mt(s.id);
8505
8513
  }
8506
8514
  function uo(s, p) {
8507
8515
  if (!W) return [];
8508
- const y = `vs-ov-bounds-src-${p}`, M = `vs-ov-bounds-line-${p}`, I = s.bounds ?? ge.value ?? Se.value, q = Ct(I);
8516
+ const h = `vs-ov-bounds-src-${p}`, M = `vs-ov-bounds-line-${p}`, I = s.bounds ?? ge.value ?? Se.value, q = Ct(I);
8509
8517
  if (!q.length) return [];
8510
8518
  const ce = {
8511
8519
  type: "FeatureCollection",
@@ -8515,10 +8523,10 @@ const sm = { class: "vs-map-body" }, im = {
8515
8523
  geometry: { type: "LineString", coordinates: xe }
8516
8524
  }))
8517
8525
  };
8518
- return W.getLayer(M) && W.removeLayer(M), W.getSource(y) && W.removeSource(y), W.addSource(y, { type: "geojson", data: ce }), W.addLayer({
8526
+ return W.getLayer(M) && W.removeLayer(M), W.getSource(h) && W.removeSource(h), W.addSource(h, { type: "geojson", data: ce }), W.addLayer({
8519
8527
  id: M,
8520
8528
  type: "line",
8521
- source: y,
8529
+ source: h,
8522
8530
  paint: {
8523
8531
  "line-color": s.style?.stroke ?? s.style?.color ?? "#2563eb",
8524
8532
  "line-width": s.style?.width ?? 2,
@@ -8538,7 +8546,7 @@ const sm = { class: "vs-map-body" }, im = {
8538
8546
  } catch {
8539
8547
  }
8540
8548
  });
8541
- const y = [];
8549
+ const h = [];
8542
8550
  p.forEach((M) => {
8543
8551
  const I = (ce) => {
8544
8552
  if (fl()) return;
@@ -8557,33 +8565,33 @@ const sm = { class: "vs-map-body" }, im = {
8557
8565
  point: { x: ce.point.x, y: ce.point.y }
8558
8566
  };
8559
8567
  }, q = () => mt(s.id);
8560
- W.on("mousemove", M, I), W.on("mouseleave", M, q), y.push(
8568
+ W.on("mousemove", M, I), W.on("mouseleave", M, q), h.push(
8561
8569
  { layerId: M, type: "mousemove", handler: I },
8562
8570
  { layerId: M, type: "mouseleave", handler: q }
8563
8571
  );
8564
- }), s.handlers = y;
8572
+ }), s.handlers = h;
8565
8573
  }
8566
8574
  function pl(s, p) {
8567
8575
  if (!W) return;
8568
8576
  s.layerIds = p, s.boundsIds = uo(s.config, s.id), co(s, p);
8569
- const y = s.visible ? "visible" : "none";
8577
+ const h = s.visible ? "visible" : "none";
8570
8578
  [...s.layerIds, ...s.boundsIds].forEach((M) => {
8571
- W.getLayer(M) && W.setLayoutProperty(M, "visibility", y);
8579
+ W.getLayer(M) && W.setLayoutProperty(M, "visibility", h);
8572
8580
  }), Ot();
8573
8581
  }
8574
8582
  function mn(s) {
8575
8583
  if (!W) return;
8576
8584
  Qt(s), s.renderToken = (s.renderToken ?? 0) + 1;
8577
- const p = s.renderToken, y = s.config, M = lt(y);
8585
+ const p = s.renderToken, h = s.config, M = lt(h);
8578
8586
  if (!M) return;
8579
- const I = [], q = /\.v(?:m)?t(?:\?|$|\/)/i.test(M) || /\.pbf(?:\?|$)/i.test(M) || /\/vtile(?:\/|\?|$)/i.test(M) || String(y?.service ?? "").toLowerCase() === "vector" || String(y?.format ?? "").toLowerCase() === "mvt", ce = Vl(y, M, G.value);
8587
+ const I = [], q = /\.v(?:m)?t(?:\?|$|\/)/i.test(M) || /\.pbf(?:\?|$)/i.test(M) || /\/vtile(?:\/|\?|$)/i.test(M) || String(h?.service ?? "").toLowerCase() === "vector" || String(h?.format ?? "").toLowerCase() === "mvt", ce = Vl(h, M, G.value);
8580
8588
  if (q && ce) {
8581
- const xe = y.sourceLayer || y.layer || y.service_layer || y.dataset?.layer || y.id;
8589
+ const xe = h.sourceLayer || h.layer || h.service_layer || h.dataset?.layer || h.id;
8582
8590
  W.addSource(s.sourceId, {
8583
8591
  type: "vector",
8584
8592
  tiles: [M],
8585
- minzoom: typeof y.minzoom == "number" ? y.minzoom : 0,
8586
- maxzoom: typeof y.maxzoom == "number" ? y.maxzoom : 22
8593
+ minzoom: typeof h.minzoom == "number" ? h.minzoom : 0,
8594
+ maxzoom: typeof h.maxzoom == "number" ? h.maxzoom : 22
8587
8595
  }), (async () => {
8588
8596
  try {
8589
8597
  if (!W || !W.getSource(s.sourceId) || s.renderToken !== p) return;
@@ -8593,7 +8601,7 @@ const sm = { class: "vs-map-body" }, im = {
8593
8601
  sourceId: s.sourceId,
8594
8602
  sourceLayer: xe,
8595
8603
  url: M,
8596
- config: y
8604
+ config: h
8597
8605
  });
8598
8606
  if (!W || !W.getSource(s.sourceId) || s.renderToken !== p) {
8599
8607
  Fe.forEach((Qe) => {
@@ -8609,14 +8617,14 @@ const sm = { class: "vs-map-body" }, im = {
8609
8617
  return;
8610
8618
  }
8611
8619
  if (q) {
8612
- const xe = y.sourceLayer || y.layer || y.service_layer || y.dataset?.layer || y.id;
8620
+ const xe = h.sourceLayer || h.layer || h.service_layer || h.dataset?.layer || h.id;
8613
8621
  W.addSource(s.sourceId, {
8614
8622
  type: "vector",
8615
8623
  tiles: [M],
8616
- minzoom: typeof y.minzoom == "number" ? y.minzoom : 0,
8617
- maxzoom: typeof y.maxzoom == "number" ? y.maxzoom : 22
8624
+ minzoom: typeof h.minzoom == "number" ? h.minzoom : 0,
8625
+ maxzoom: typeof h.maxzoom == "number" ? h.maxzoom : 22
8618
8626
  });
8619
- const Fe = Array.isArray(y.style?.types) ? y.style.types.map((Wt) => String(Wt).toLowerCase()) : [String(y.style?.type ?? "polygon").toLowerCase()], Qe = Pt(y), Ht = y.style?.opacity ?? 0.5, _l = (Wt) => {
8627
+ const Fe = Array.isArray(h.style?.types) ? h.style.types.map((Wt) => String(Wt).toLowerCase()) : [String(h.style?.type ?? "polygon").toLowerCase()], Qe = Pt(h), Ht = h.style?.opacity ?? 0.5, _l = (Wt) => {
8620
8628
  if (Wt === "point") {
8621
8629
  const $n = `vs-ov-point-${s.id}`;
8622
8630
  W.addLayer({
@@ -8626,7 +8634,7 @@ const sm = { class: "vs-map-body" }, im = {
8626
8634
  "source-layer": xe,
8627
8635
  paint: {
8628
8636
  "circle-color": Qe,
8629
- "circle-radius": y.style?.radius ?? 5,
8637
+ "circle-radius": h.style?.radius ?? 5,
8630
8638
  "circle-opacity": Ht
8631
8639
  }
8632
8640
  }), I.push($n);
@@ -8642,7 +8650,7 @@ const sm = { class: "vs-map-body" }, im = {
8642
8650
  layout: { "line-cap": "round", "line-join": "round" },
8643
8651
  paint: {
8644
8652
  "line-color": Qe,
8645
- "line-width": y.style?.width ?? 2,
8653
+ "line-width": h.style?.width ?? 2,
8646
8654
  "line-opacity": Ht
8647
8655
  }
8648
8656
  }), I.push($n);
@@ -8664,8 +8672,8 @@ const sm = { class: "vs-map-body" }, im = {
8664
8672
  source: s.sourceId,
8665
8673
  "source-layer": xe,
8666
8674
  paint: {
8667
- "line-color": y.style?.stroke ?? y.style?.color ?? "#2563eb",
8668
- "line-width": y.style?.width ?? 1,
8675
+ "line-color": h.style?.stroke ?? h.style?.color ?? "#2563eb",
8676
+ "line-width": h.style?.width ?? 1,
8669
8677
  "line-opacity": Ht
8670
8678
  }
8671
8679
  }), I.push(va, ga);
@@ -8675,7 +8683,7 @@ const sm = { class: "vs-map-body" }, im = {
8675
8683
  } else {
8676
8684
  W.addSource(
8677
8685
  s.sourceId,
8678
- Ll(M, y, { safe: !1 })
8686
+ Ll(M, h, { safe: !1 })
8679
8687
  );
8680
8688
  const xe = `vs-ov-raster-${s.id}`;
8681
8689
  W.addLayer({
@@ -8683,7 +8691,7 @@ const sm = { class: "vs-map-body" }, im = {
8683
8691
  type: "raster",
8684
8692
  source: s.sourceId,
8685
8693
  paint: {
8686
- "raster-opacity": y.style?.opacity ?? 1
8694
+ "raster-opacity": h.style?.opacity ?? 1
8687
8695
  }
8688
8696
  }), I.push(xe);
8689
8697
  }
@@ -8693,10 +8701,10 @@ const sm = { class: "vs-map-body" }, im = {
8693
8701
  if (!W) return;
8694
8702
  const p = {
8695
8703
  type: "FeatureCollection",
8696
- features: Ct(ge.value ?? Se.value).map((y) => ({
8704
+ features: Ct(ge.value ?? Se.value).map((h) => ({
8697
8705
  type: "Feature",
8698
8706
  properties: {},
8699
- geometry: { type: "LineString", coordinates: y }
8707
+ geometry: { type: "LineString", coordinates: h }
8700
8708
  }))
8701
8709
  };
8702
8710
  W.getSource(Yn) ? W.getSource(Yn).setData(p) : W.addSource(Yn, { type: "geojson", data: p }), W.getLayer(gn) || W.addLayer({
@@ -8716,25 +8724,25 @@ const sm = { class: "vs-map-body" }, im = {
8716
8724
  const p = je[s];
8717
8725
  if (!p) return;
8718
8726
  p.visible = !p.visible;
8719
- const y = p.visible ? "visible" : "none";
8727
+ const h = p.visible ? "visible" : "none";
8720
8728
  [...p.layerIds, ...p.boundsIds].forEach((M) => {
8721
- W.getLayer(M) && W.setLayoutProperty(M, "visibility", y);
8729
+ W.getLayer(M) && W.setLayoutProperty(M, "visibility", h);
8722
8730
  }), Ot(), p.visible || mt(s);
8723
8731
  }
8724
8732
  function ea(s) {
8725
8733
  if (!W) return;
8726
8734
  const p = it[s];
8727
8735
  if (!p?.url) return;
8728
- const y = xt(s), M = Zt(s);
8729
- W.getLayer(M) && W.removeLayer(M), W.getSource(y) && W.removeSource(y), W.addSource(
8730
- y,
8736
+ const h = xt(s), M = Zt(s);
8737
+ W.getLayer(M) && W.removeLayer(M), W.getSource(h) && W.removeSource(h), W.addSource(
8738
+ h,
8731
8739
  Ll(p.url, p, { safe: !0 })
8732
8740
  );
8733
8741
  const I = p?.opacity ?? p?.style?.opacity, q = typeof I == "number" ? I : Jm;
8734
8742
  W.addLayer({
8735
8743
  id: M,
8736
8744
  type: "raster",
8737
- source: y,
8745
+ source: h,
8738
8746
  paint: {
8739
8747
  "raster-opacity": q
8740
8748
  }
@@ -8742,29 +8750,29 @@ const sm = { class: "vs-map-body" }, im = {
8742
8750
  }
8743
8751
  function po(s) {
8744
8752
  if (!W) return;
8745
- const p = xt(s), y = Zt(s);
8746
- W.getLayer(y) && W.removeLayer(y), W.getSource(p) && W.removeSource(p);
8753
+ const p = xt(s), h = Zt(s);
8754
+ W.getLayer(h) && W.removeLayer(h), W.getSource(p) && W.removeSource(p);
8747
8755
  }
8748
8756
  function ta() {
8749
8757
  W && dt.value.forEach((s) => ea(s));
8750
8758
  }
8751
8759
  function mo(s) {
8752
8760
  if (!W || d.value || !it[s]) return;
8753
- dt.value.includes(s) ? (dt.value = dt.value.filter((y) => y !== s), po(s)) : (dt.value = [...dt.value, s], ea(s)), Ot();
8761
+ dt.value.includes(s) ? (dt.value = dt.value.filter((h) => h !== s), po(s)) : (dt.value = [...dt.value, s], ea(s)), Ot();
8754
8762
  }
8755
8763
  function Ot() {
8756
8764
  if (!W) return;
8757
- const s = dt.value.map((Fe) => Zt(Fe)).filter((Fe) => W.getLayer(Fe)), p = [], y = [], M = [], I = [];
8765
+ const s = dt.value.map((Fe) => Zt(Fe)).filter((Fe) => W.getLayer(Fe)), p = [], h = [], M = [], I = [];
8758
8766
  Ke.value.forEach((Fe) => {
8759
8767
  const Qe = je[Fe];
8760
8768
  if (!Qe) return;
8761
8769
  const Ht = String(Qe.config?.url ?? ""), _l = /\.v(?:m)?t(?:\?|$|\/)/i.test(Ht) || /\/vtile(?:\/|\?|$)/i.test(Ht) || ir(Qe.config, Ht, G.value), Wt = /\.png(?:\?|$)/i.test(Ht);
8762
- _l ? M.push(...Qe.layerIds) : Wt ? p.push(...Qe.layerIds) : y.push(...Qe.layerIds), I.push(...Qe.boundsIds);
8770
+ _l ? M.push(...Qe.layerIds) : Wt ? p.push(...Qe.layerIds) : h.push(...Qe.layerIds), I.push(...Qe.boundsIds);
8763
8771
  });
8764
8772
  const q = [
8765
8773
  ...s,
8766
8774
  ...p,
8767
- ...y,
8775
+ ...h,
8768
8776
  ...M,
8769
8777
  ...I
8770
8778
  ];
@@ -8783,9 +8791,9 @@ const sm = { class: "vs-map-body" }, im = {
8783
8791
  if (!oe[s] || (Xe.value = s, !W)) return;
8784
8792
  const p = nt();
8785
8793
  if (!p) return;
8786
- const y = W.getSource("rasterSource");
8787
- if (y && typeof y.setTiles == "function") {
8788
- y.setTiles([p]), Ot();
8794
+ const h = W.getSource("rasterSource");
8795
+ if (h && typeof h.setTiles == "function") {
8796
+ h.setTiles([p]), Ot();
8789
8797
  return;
8790
8798
  }
8791
8799
  const M = W.getCenter?.(), I = W.getZoom?.(), q = $e?.getAll?.();
@@ -8832,7 +8840,7 @@ const sm = { class: "vs-map-body" }, im = {
8832
8840
  if (!I?.type) return [];
8833
8841
  const ce = { ...q ?? {} };
8834
8842
  return I.type === "MultiPoint" && Array.isArray(I.coordinates) ? I.coordinates.map((xe) => ml({ type: "Point", coordinates: xe })).map((xe) => ({ ...xe, properties: ce })) : I.type === "MultiLineString" && Array.isArray(I.coordinates) ? I.coordinates.map((xe) => ml({ type: "LineString", coordinates: xe })).map((xe) => ({ ...xe, properties: ce })) : I.type === "MultiPolygon" && Array.isArray(I.coordinates) ? I.coordinates.map((xe) => ml({ type: "Polygon", coordinates: xe })).map((xe) => ({ ...xe, properties: ce })) : I.type === "GeometryCollection" && Array.isArray(I.geometries) ? I.geometries.flatMap((xe) => p(xe, ce)) : [{ type: "Feature", properties: ce, geometry: Bt(I) }];
8835
- }, y = (I) => {
8843
+ }, h = (I) => {
8836
8844
  if (!I) return null;
8837
8845
  if (I.type === "Feature") {
8838
8846
  const q = vl(I);
@@ -8847,12 +8855,12 @@ const sm = { class: "vs-map-body" }, im = {
8847
8855
  ) : I.type === "GeometryCollection" && Array.isArray(I.geometries) ? p(I, I.properties ?? {}) : typeof I.type == "string" && Array.isArray(I.coordinates) ? p(Bt(I), I.properties ?? {}) : null;
8848
8856
  };
8849
8857
  if (s.type === "FeatureCollection")
8850
- return (s.features ?? []).flatMap(y).filter(Boolean);
8858
+ return (s.features ?? []).flatMap(h).filter(Boolean);
8851
8859
  if (Array.isArray(s))
8852
8860
  return s.flatMap(
8853
- (I) => I?.type === "FeatureCollection" ? En(I) : [y(I)]
8861
+ (I) => I?.type === "FeatureCollection" ? En(I) : [h(I)]
8854
8862
  ).flat().filter(Boolean);
8855
- const M = y(s);
8863
+ const M = h(s);
8856
8864
  return M ? Array.isArray(M) ? M : [M] : [];
8857
8865
  }
8858
8866
  function na(s) {
@@ -8875,8 +8883,8 @@ const sm = { class: "vs-map-body" }, im = {
8875
8883
  }
8876
8884
  function go(s, p) {
8877
8885
  if (!Array.isArray(s) || !Array.isArray(p) || s.length < 2 || p.length < 2) return !1;
8878
- const y = 1e-12;
8879
- return Math.abs(Number(s[0]) - Number(p[0])) < y && Math.abs(Number(s[1]) - Number(p[1])) < y;
8886
+ const h = 1e-12;
8887
+ return Math.abs(Number(s[0]) - Number(p[0])) < h && Math.abs(Number(s[1]) - Number(p[1])) < h;
8880
8888
  }
8881
8889
  function aa(s, p) {
8882
8890
  if (!Array.isArray(s) || s.length < 4) return null;
@@ -8885,27 +8893,27 @@ const sm = { class: "vs-map-body" }, im = {
8885
8893
  }
8886
8894
  function oa(s, p) {
8887
8895
  if (!Array.isArray(s) || s.length < 2 || !Number.isInteger(p) || p < 0 || p >= s.length || s.length <= 2) return null;
8888
- const y = s.slice();
8889
- return y.splice(p, 1), y.length < 2 ? null : y;
8896
+ const h = s.slice();
8897
+ return h.splice(p, 1), h.length < 2 ? null : h;
8890
8898
  }
8891
8899
  function yo(s, p) {
8892
- const y = Bt(s);
8893
- if (!y || !Array.isArray(p)) return null;
8894
- if (y.type === "LineString") {
8895
- const [M] = p, I = oa(y.coordinates, M);
8896
- return I ? (y.coordinates = I, y) : null;
8900
+ const h = Bt(s);
8901
+ if (!h || !Array.isArray(p)) return null;
8902
+ if (h.type === "LineString") {
8903
+ const [M] = p, I = oa(h.coordinates, M);
8904
+ return I ? (h.coordinates = I, h) : null;
8897
8905
  }
8898
- if (y.type === "MultiLineString") {
8899
- const [M, I] = p, q = y.coordinates?.[M], ce = oa(q, I);
8900
- return ce ? (y.coordinates[M] = ce, y) : null;
8906
+ if (h.type === "MultiLineString") {
8907
+ const [M, I] = p, q = h.coordinates?.[M], ce = oa(q, I);
8908
+ return ce ? (h.coordinates[M] = ce, h) : null;
8901
8909
  }
8902
- if (y.type === "Polygon") {
8903
- const [M, I] = p, q = y.coordinates?.[M], ce = aa(q, I);
8904
- return ce ? (y.coordinates[M] = ce, y) : null;
8910
+ if (h.type === "Polygon") {
8911
+ const [M, I] = p, q = h.coordinates?.[M], ce = aa(q, I);
8912
+ return ce ? (h.coordinates[M] = ce, h) : null;
8905
8913
  }
8906
- if (y.type === "MultiPolygon") {
8907
- const [M, I, q] = p, ce = y.coordinates?.[M]?.[I], xe = aa(ce, q);
8908
- return xe ? (y.coordinates[M][I] = xe, y) : null;
8914
+ if (h.type === "MultiPolygon") {
8915
+ const [M, I, q] = p, ce = h.coordinates?.[M]?.[I], xe = aa(ce, q);
8916
+ return xe ? (h.coordinates[M][I] = xe, h) : null;
8909
8917
  }
8910
8918
  return null;
8911
8919
  }
@@ -8913,7 +8921,7 @@ const sm = { class: "vs-map-body" }, im = {
8913
8921
  return s ? s.split(".").map((p) => Number(p)).filter((p) => Number.isInteger(p) && p >= 0) : [];
8914
8922
  }
8915
8923
  function ra(s) {
8916
- return !$e || !s ? null : typeof $e.get == "function" ? $e.get(s) ?? null : $e.getAll?.()?.features?.find((y) => String(y?.id ?? "") === s) ?? null;
8924
+ return !$e || !s ? null : typeof $e.get == "function" ? $e.get(s) ?? null : $e.getAll?.()?.features?.find((h) => String(h?.id ?? "") === s) ?? null;
8917
8925
  }
8918
8926
  function sa(s) {
8919
8927
  const p = s?.properties?.id ?? s?.id;
@@ -8932,13 +8940,13 @@ const sm = { class: "vs-map-body" }, im = {
8932
8940
  }
8933
8941
  function wo(s, p) {
8934
8942
  if (!$e || !s || !p.length) return;
8935
- const y = ra(s);
8936
- if (!y?.geometry) return;
8937
- const M = yo(y.geometry, p);
8943
+ const h = ra(s);
8944
+ if (!h?.geometry) return;
8945
+ const M = yo(h.geometry, p);
8938
8946
  if (!M) return;
8939
8947
  const I = {
8940
- ...y,
8941
- id: y.id ?? s,
8948
+ ...h,
8949
+ id: h.id ?? s,
8942
8950
  geometry: M
8943
8951
  };
8944
8952
  yt = !0, Ge = !0;
@@ -8953,10 +8961,10 @@ const sm = { class: "vs-map-body" }, im = {
8953
8961
  if (!W || !$e || d.value || S.isRulerActive.value || w.value !== "edit") return;
8954
8962
  const p = s?.point;
8955
8963
  if (!p) return;
8956
- const y = [
8964
+ const h = [
8957
8965
  [p.x - 8, p.y - 8],
8958
8966
  [p.x + 8, p.y + 8]
8959
- ], I = W.queryRenderedFeatures(y).find(
8967
+ ], I = W.queryRenderedFeatures(h).find(
8960
8968
  (ce) => ce?.properties?.meta === "vertex" && ce?.properties?.parent && ce?.properties?.coord_path
8961
8969
  );
8962
8970
  if (!I) return;
@@ -8967,8 +8975,8 @@ const sm = { class: "vs-map-body" }, im = {
8967
8975
  function ko(s) {
8968
8976
  const p = da(s);
8969
8977
  if (!p) return null;
8970
- const [[y, M], [I, q]] = p;
8971
- return { lat: (M + q) / 2, lng: (y + I) / 2 };
8978
+ const [[h, M], [I, q]] = p;
8979
+ return { lat: (M + q) / 2, lng: (h + I) / 2 };
8972
8980
  }
8973
8981
  function ia(s) {
8974
8982
  if (!Array.isArray(s) || s.length < 3) return 0;
@@ -8976,12 +8984,12 @@ const sm = { class: "vs-map-body" }, im = {
8976
8984
  const q = M * 2003750834e-2 / 180, ce = Math.log(Math.tan((90 + I) * Math.PI / 360)) / (Math.PI / 180);
8977
8985
  return [q, ce * 2003750834e-2 / 180];
8978
8986
  };
8979
- let y = 0;
8987
+ let h = 0;
8980
8988
  for (let M = 0; M < s.length - 1; M += 1) {
8981
8989
  const [I, q] = p(Number(s[M][0]), Number(s[M][1])), [ce, xe] = p(Number(s[M + 1][0]), Number(s[M + 1][1]));
8982
- y += I * xe - ce * q;
8990
+ h += I * xe - ce * q;
8983
8991
  }
8984
- return Math.abs(y / 2) / 1e6;
8992
+ return Math.abs(h / 2) / 1e6;
8985
8993
  }
8986
8994
  function _o(s) {
8987
8995
  if (!s?.type || !s?.coordinates) return null;
@@ -8989,22 +8997,22 @@ const sm = { class: "vs-map-body" }, im = {
8989
8997
  const p = s.coordinates?.[0];
8990
8998
  return Array.isArray(p) ? ia(p) : null;
8991
8999
  }
8992
- return s.type === "MultiPolygon" ? s.coordinates.reduce((p, y) => {
8993
- const M = y?.[0];
9000
+ return s.type === "MultiPolygon" ? s.coordinates.reduce((p, h) => {
9001
+ const M = h?.[0];
8994
9002
  return Array.isArray(M) ? p + ia(M) : p;
8995
9003
  }, 0) : null;
8996
9004
  }
8997
9005
  function gl(s) {
8998
9006
  if (!s) {
8999
- k.value = null;
9007
+ _.value = null;
9000
9008
  return;
9001
9009
  }
9002
9010
  const p = ko(s);
9003
9011
  if (!p) {
9004
- k.value = null;
9012
+ _.value = null;
9005
9013
  return;
9006
9014
  }
9007
- k.value = {
9015
+ _.value = {
9008
9016
  type: String(s.type ?? "Feature"),
9009
9017
  center: p,
9010
9018
  areaKm2: _o(s)
@@ -9016,15 +9024,15 @@ const sm = { class: "vs-map-body" }, im = {
9016
9024
  zt = I, gl(I);
9017
9025
  return;
9018
9026
  }
9019
- const p = wt.find((M) => String(M?.id ?? "") === String(s)) ?? null, y = Bt(p?.geometry ?? null);
9020
- zt = y, gl(y);
9027
+ const p = wt.find((M) => String(M?.id ?? "") === String(s)) ?? null, h = Bt(p?.geometry ?? null);
9028
+ zt = h, gl(h);
9021
9029
  }
9022
9030
  function hl(s) {
9023
- v.value = (s ?? []).map((p, y) => {
9024
- const M = String(p?.id ?? `feature-${y + 1}`), I = bl(String(p?.geometry?.type ?? "Feature"));
9031
+ v.value = (s ?? []).map((p, h) => {
9032
+ const M = String(p?.id ?? `feature-${h + 1}`), I = bl(String(p?.geometry?.type ?? "Feature"));
9025
9033
  return {
9026
9034
  id: M,
9027
- label: `${I} ${y + 1}`
9035
+ label: `${I} ${h + 1}`
9028
9036
  };
9029
9037
  });
9030
9038
  }
@@ -9050,24 +9058,24 @@ const sm = { class: "vs-map-body" }, im = {
9050
9058
  }
9051
9059
  function ua(s, p) {
9052
9060
  if (!Array.isArray(s) || !Array.isArray(p) || s.length !== 2 || p.length !== 2) return !1;
9053
- const y = 1e-9;
9054
- return Math.abs(Number(s[0]) - Number(p[0])) < y && Math.abs(Number(s[1]) - Number(p[1])) < y;
9061
+ const h = 1e-9;
9062
+ return Math.abs(Number(s[0]) - Number(p[0])) < h && Math.abs(Number(s[1]) - Number(p[1])) < h;
9055
9063
  }
9056
9064
  function da(s) {
9057
9065
  if (!s) return null;
9058
- let p = 1 / 0, y = 1 / 0, M = -1 / 0, I = -1 / 0;
9066
+ let p = 1 / 0, h = 1 / 0, M = -1 / 0, I = -1 / 0;
9059
9067
  const q = (ce) => {
9060
9068
  if (Array.isArray(ce)) {
9061
9069
  if (ce.length >= 2 && Number.isFinite(ce[0]) && Number.isFinite(ce[1])) {
9062
9070
  const xe = Number(ce[0]), Fe = Number(ce[1]);
9063
- p = Math.min(p, xe), y = Math.min(y, Fe), M = Math.max(M, xe), I = Math.max(I, Fe);
9071
+ p = Math.min(p, xe), h = Math.min(h, Fe), M = Math.max(M, xe), I = Math.max(I, Fe);
9064
9072
  return;
9065
9073
  }
9066
9074
  ce.forEach(q);
9067
9075
  }
9068
9076
  };
9069
- return q(s.coordinates), !Number.isFinite(p) || !Number.isFinite(y) ? null : [
9070
- [p, y],
9077
+ return q(s.coordinates), !Number.isFinite(p) || !Number.isFinite(h) ? null : [
9078
+ [p, h],
9071
9079
  [M, I]
9072
9080
  ];
9073
9081
  }
@@ -9075,9 +9083,9 @@ const sm = { class: "vs-map-body" }, im = {
9075
9083
  if (!W || !s) return;
9076
9084
  const p = da(s);
9077
9085
  if (!p) return;
9078
- const [[y, M], [I, q]] = p;
9079
- if (y === I && M === q) {
9080
- W.easeTo({ center: [y, M], zoom: Math.max(Q.value, 14) }), ve();
9086
+ const [[h, M], [I, q]] = p;
9087
+ if (h === I && M === q) {
9088
+ W.easeTo({ center: [h, M], zoom: Math.max(Q.value, 14) }), ve();
9081
9089
  return;
9082
9090
  }
9083
9091
  W.fitBounds(p, { padding: 30, duration: 250, maxZoom: 18 }), ve();
@@ -9092,12 +9100,12 @@ const sm = { class: "vs-map-body" }, im = {
9092
9100
  }
9093
9101
  function _n() {
9094
9102
  if (!$e) return null;
9095
- const p = $e.getAll?.()?.features ?? [], y = (q) => !!q && p.some((ce) => String(ce?.id ?? "") === String(q ?? "")), M = $e.getSelectedIds?.();
9103
+ const p = $e.getAll?.()?.features ?? [], h = (q) => !!q && p.some((ce) => String(ce?.id ?? "") === String(q ?? "")), M = $e.getSelectedIds?.();
9096
9104
  if (Array.isArray(M) && M.length > 0) {
9097
9105
  const q = M[0];
9098
9106
  return q != null ? String(q) : null;
9099
9107
  }
9100
- if (y(ft)) return String(ft);
9108
+ if (h(ft)) return String(ft);
9101
9109
  if (!p.length) return null;
9102
9110
  const I = r.value ? p[p.length - 1] : p[0];
9103
9111
  return I?.id !== void 0 && I?.id !== null ? String(I.id) : null;
@@ -9106,13 +9114,13 @@ const sm = { class: "vs-map-body" }, im = {
9106
9114
  if (!$e) return;
9107
9115
  const s = $e.getAll();
9108
9116
  if ($.value = s?.features?.length ?? 0, !s?.features?.length) {
9109
- wt = [], v.value = [], zt = null, ft = null, k.value = null, Ge || (Ft = "__null__", l("update:modelValue", null));
9117
+ wt = [], v.value = [], zt = null, ft = null, _.value = null, Ge || (Ft = "__null__", l("update:modelValue", null));
9110
9118
  return;
9111
9119
  }
9112
9120
  const p = (s.features ?? []).map(vl).filter(Boolean);
9113
9121
  if (wt = p, hl(p), ft = _n(), yl(ft), !Ge) {
9114
- const y = na(p);
9115
- Ft = la(y), l("update:modelValue", y);
9122
+ const h = na(p);
9123
+ Ft = la(h), l("update:modelValue", h);
9116
9124
  }
9117
9125
  }
9118
9126
  function Pn() {
@@ -9121,13 +9129,13 @@ const sm = { class: "vs-map-body" }, im = {
9121
9129
  }
9122
9130
  function On(s) {
9123
9131
  if (!$e) return;
9124
- const p = En(s), y = r.value ? p : p.slice(0, 1);
9125
- Ge = !0, Pn(), y.forEach((q) => {
9132
+ const p = En(s), h = r.value ? p : p.slice(0, 1);
9133
+ Ge = !0, Pn(), h.forEach((q) => {
9126
9134
  try {
9127
9135
  $e.add(q);
9128
9136
  } catch {
9129
9137
  }
9130
- }), Ge = !1, wt = ($e.getAll?.()?.features ?? y).map(vl).filter(Boolean), hl(wt), ft = null;
9138
+ }), Ge = !1, wt = ($e.getAll?.()?.features ?? h).map(vl).filter(Boolean), hl(wt), ft = null;
9131
9139
  const I = Bt(wt[wt.length - 1]?.geometry ?? null);
9132
9140
  zt = Bt(I), wl(), gl(I), I && (ca(I), d.value || Ut());
9133
9141
  }
@@ -9165,10 +9173,10 @@ const sm = { class: "vs-map-body" }, im = {
9165
9173
  }
9166
9174
  function Ut(s) {
9167
9175
  if (d.value || !$e || !$e.getAll()?.features?.length) return;
9168
- const y = s || _n();
9169
- if (y)
9176
+ const h = s || _n();
9177
+ if (h)
9170
9178
  try {
9171
- $e.changeMode("direct_select", { featureId: y }), ft = y, yl(ft), w.value = "edit";
9179
+ $e.changeMode("direct_select", { featureId: h }), ft = h, yl(ft), w.value = "edit";
9172
9180
  } catch {
9173
9181
  w.value = "";
9174
9182
  }
@@ -9190,7 +9198,7 @@ const sm = { class: "vs-map-body" }, im = {
9190
9198
  pn = !1;
9191
9199
  }
9192
9200
  }
9193
- vn(), Pn(), wt = [], v.value = [], ft = null, Ft = "__null__", k.value = null, l("update:modelValue", null);
9201
+ vn(), Pn(), wt = [], v.value = [], ft = null, Ft = "__null__", _.value = null, l("update:modelValue", null);
9194
9202
  }
9195
9203
  }
9196
9204
  function Mo() {
@@ -9251,10 +9259,10 @@ const sm = { class: "vs-map-body" }, im = {
9251
9259
  filepath: s,
9252
9260
  limit: !0
9253
9261
  })
9254
- }), y = await p.json().catch(() => null);
9262
+ }), h = await p.json().catch(() => null);
9255
9263
  if (!p.ok)
9256
- throw new Error(y?.message || y?.error || `Код помилки: ${p.status}`);
9257
- const M = Fo(y);
9264
+ throw new Error(h?.message || h?.error || `Код помилки: ${p.status}`);
9265
+ const M = Fo(h);
9258
9266
  if (!M) {
9259
9267
  Ae({
9260
9268
  type: "warning",
@@ -9307,12 +9315,12 @@ const sm = { class: "vs-map-body" }, im = {
9307
9315
  function Ro(s) {
9308
9316
  if (!s.length) return;
9309
9317
  const p = 5;
9310
- s.slice(0, p).forEach((y) => {
9311
- const M = y.line > 0 ? `Рядок ${y.line}` : "Загальна помилка";
9318
+ s.slice(0, p).forEach((h) => {
9319
+ const M = h.line > 0 ? `Рядок ${h.line}` : "Загальна помилка";
9312
9320
  Ae({
9313
9321
  type: "warning",
9314
9322
  title: "Імпорт координат",
9315
- message: `${M} — ${y.message}`
9323
+ message: `${M} — ${h.message}`
9316
9324
  });
9317
9325
  }), s.length > p && Ae({
9318
9326
  type: "warning",
@@ -9322,22 +9330,22 @@ const sm = { class: "vs-map-body" }, im = {
9322
9330
  }
9323
9331
  function No() {
9324
9332
  if (d.value || !$e) return;
9325
- const s = $e.getAll(), p = new Blob([JSON.stringify(s, null, 2)], { type: "application/json" }), y = URL.createObjectURL(p), M = document.createElement("a");
9326
- M.href = y, M.download = "data.geojson", M.click(), URL.revokeObjectURL(y);
9333
+ const s = $e.getAll(), p = new Blob([JSON.stringify(s, null, 2)], { type: "application/json" }), h = URL.createObjectURL(p), M = document.createElement("a");
9334
+ M.href = h, M.download = "data.geojson", M.click(), URL.revokeObjectURL(h);
9327
9335
  }
9328
9336
  at(async () => {
9329
- if (window.addEventListener("click", fa, !0), !_.value) return;
9337
+ if (window.addEventListener("click", fa, !0), !k.value) return;
9330
9338
  const s = await Fn();
9331
9339
  jt = s.maplibregl, Jt = s.MapboxDraw;
9332
9340
  const p = nt();
9333
9341
  p && (W = new jt.Map({
9334
- container: _.value,
9342
+ container: k.value,
9335
9343
  style: fn(p),
9336
9344
  center: [X.value[0], X.value[1]],
9337
9345
  zoom: Q.value,
9338
9346
  attributionControl: !1
9339
- }), x.value = W, W.addControl(new jt.NavigationControl({ showCompass: !0 }), "bottom-right"), W.on("error", (y) => {
9340
- const M = y?.error?.message ?? y?.message ?? "";
9347
+ }), x.value = W, W.addControl(new jt.NavigationControl({ showCompass: !0 }), "bottom-right"), W.on("error", (h) => {
9348
+ const M = h?.error?.message ?? h?.message ?? "";
9341
9349
  rm(M);
9342
9350
  }), W.on("load", () => {
9343
9351
  if (!(!Jt || !W)) {
@@ -9354,33 +9362,33 @@ const sm = { class: "vs-map-body" }, im = {
9354
9362
  trash: !1
9355
9363
  },
9356
9364
  styles: Be
9357
- }), W.addControl($e), W.on("click", (y) => {
9365
+ }), W.addControl($e), W.on("click", (h) => {
9358
9366
  if (S.isRulerActive.value) {
9359
- const I = y?.lngLat;
9367
+ const I = h?.lngLat;
9360
9368
  if (!I) return;
9361
9369
  b.value?.addPoint?.({ lat: I.lat, lng: I.lng });
9362
9370
  return;
9363
9371
  }
9364
9372
  if (!$e || d.value || w.value !== "edit") return;
9365
- const M = bo(y?.point);
9373
+ const M = bo(h?.point);
9366
9374
  !M || M === ft || requestAnimationFrame(() => {
9367
9375
  !$e || d.value || Ut(M);
9368
9376
  });
9369
9377
  }), W.on("draw.create", () => {
9370
9378
  if ($e && !S.isRulerActive.value) {
9371
9379
  if (!r.value) {
9372
- const y = $e.getAll();
9373
- if (y.features.length > 1) {
9374
- const M = y.features[y.features.length - 1];
9375
- Ge = !0, y.features.slice(0, -1).forEach((I) => $e.delete(I.id)), Ge = !1, M && (Ge = !0, $e.add(M), Ge = !1);
9380
+ const h = $e.getAll();
9381
+ if (h.features.length > 1) {
9382
+ const M = h.features[h.features.length - 1];
9383
+ Ge = !0, h.features.slice(0, -1).forEach((I) => $e.delete(I.id)), Ge = !1, M && (Ge = !0, $e.add(M), Ge = !1);
9376
9384
  }
9377
9385
  }
9378
9386
  en(), Ut();
9379
9387
  }
9380
- }), W.on("draw.update", (y) => {
9388
+ }), W.on("draw.update", (h) => {
9381
9389
  if (on || S.isRulerActive.value || fl()) return;
9382
- const M = Array.isArray(y?.features) ? y.features : [], I = y?.action === "move" && M.length > 0 && M.every((q) => q?.geometry?.type === "Point");
9383
- if (y?.action === "move") {
9390
+ const M = Array.isArray(h?.features) ? h.features : [], I = h?.action === "move" && M.length > 0 && M.every((q) => q?.geometry?.type === "Point");
9391
+ if (h?.action === "move") {
9384
9392
  if (I) {
9385
9393
  en();
9386
9394
  return;
@@ -9399,10 +9407,10 @@ const sm = { class: "vs-map-body" }, im = {
9399
9407
  en();
9400
9408
  }), W.on("draw.delete", () => {
9401
9409
  yt || pn || S.isRulerActive.value || w.value === "marker" || w.value === "polyline" || w.value === "polygon" || w.value === "rectangle" || (en(), $e?.getAll?.()?.features?.length || (ft = null), w.value = "", vn());
9402
- }), W.on("draw.selectionchange", (y) => {
9410
+ }), W.on("draw.selectionchange", (h) => {
9403
9411
  if (!$e || on || S.isRulerActive.value || w.value === "marker" || w.value === "polyline" || w.value === "polygon" || w.value === "rectangle")
9404
9412
  return;
9405
- const M = y?.features?.[0]?.id !== void 0 && y?.features?.[0]?.id !== null ? String(y.features[0].id) : null;
9413
+ const M = h?.features?.[0]?.id !== void 0 && h?.features?.[0]?.id !== null ? String(h.features[0].id) : null;
9406
9414
  if (!d.value && M) {
9407
9415
  if (w.value === "edit" && ft === M) return;
9408
9416
  requestAnimationFrame(() => {
@@ -9423,13 +9431,13 @@ const sm = { class: "vs-map-body" }, im = {
9423
9431
  } catch {
9424
9432
  }
9425
9433
  }), ye.value !== void 0) {
9426
- const y = ye.value;
9434
+ const h = ye.value;
9427
9435
  ye.value = void 0, requestAnimationFrame(() => {
9428
- $e && On(y);
9436
+ $e && On(h);
9429
9437
  });
9430
9438
  }
9431
- kn(), ta(), Ke.value.forEach((y) => {
9432
- const M = je[y];
9439
+ kn(), ta(), Ke.value.forEach((h) => {
9440
+ const M = je[h];
9433
9441
  M && mn(M);
9434
9442
  }), Ot(), N();
9435
9443
  }
@@ -9450,8 +9458,8 @@ const sm = { class: "vs-map-body" }, im = {
9450
9458
  if (fl()) return;
9451
9459
  const p = na(
9452
9460
  (r.value ? En(s) : En(s).slice(0, 1)) || []
9453
- ), y = la(p);
9454
- if (Ft && y === Ft) {
9461
+ ), h = la(p);
9462
+ if (Ft && h === Ft) {
9455
9463
  Ft = null;
9456
9464
  return;
9457
9465
  }
@@ -9461,11 +9469,11 @@ const sm = { class: "vs-map-body" }, im = {
9461
9469
  ), pe(
9462
9470
  () => ne.value,
9463
9471
  (s) => {
9464
- const p = Array.isArray(s) ? s : [], y = [], M = /* @__PURE__ */ new Set();
9472
+ const p = Array.isArray(s) ? s : [], h = [], M = /* @__PURE__ */ new Set();
9465
9473
  p.forEach((I, q) => {
9466
9474
  if (!I) return;
9467
9475
  const ce = pt(I, q);
9468
- y.push(ce), M.add(ce);
9476
+ h.push(ce), M.add(ce);
9469
9477
  const xe = { ...I, id: ce }, Fe = je[ce], Qe = Fe?.visible ?? !!xe.visible;
9470
9478
  Fe && W && Qt(Fe), je[ce] = {
9471
9479
  id: ce,
@@ -9481,7 +9489,7 @@ const sm = { class: "vs-map-body" }, im = {
9481
9489
  if (M.has(I)) return;
9482
9490
  const q = je[I];
9483
9491
  q && W && Qt(q), delete je[I];
9484
- }), Ke.value = y, W && (Ke.value.forEach((I) => {
9492
+ }), Ke.value = h, W && (Ke.value.forEach((I) => {
9485
9493
  const q = je[I];
9486
9494
  q && mn(q);
9487
9495
  }), Ot());
@@ -9501,8 +9509,8 @@ const sm = { class: "vs-map-body" }, im = {
9501
9509
  async (s) => {
9502
9510
  if (Se.value = [], !s) {
9503
9511
  W && (kn(), Ke.value.forEach((p) => {
9504
- const y = je[p];
9505
- y && mn(y);
9512
+ const h = je[p];
9513
+ h && mn(h);
9506
9514
  }), Ot());
9507
9515
  return;
9508
9516
  }
@@ -9516,8 +9524,8 @@ const sm = { class: "vs-map-body" }, im = {
9516
9524
  } finally {
9517
9525
  if (!W) return;
9518
9526
  kn(), Ke.value.forEach((p) => {
9519
- const y = je[p];
9520
- y && mn(y);
9527
+ const h = je[p];
9528
+ h && mn(h);
9521
9529
  }), Ot();
9522
9530
  }
9523
9531
  },
@@ -9528,8 +9536,8 @@ const sm = { class: "vs-map-body" }, im = {
9528
9536
  if (!Array.isArray(s) || s.length !== 2) return;
9529
9537
  const p = [Number(s[0]), Number(s[1])];
9530
9538
  if (ua(X.value, p) || (X.value = [...p], !W)) return;
9531
- const y = W.getCenter?.();
9532
- y && ua([y.lng, y.lat], X.value) || W.easeTo({ center: [X.value[0], X.value[1]] });
9539
+ const h = W.getCenter?.();
9540
+ h && ua([h.lng, h.lat], X.value) || W.easeTo({ center: [X.value[0], X.value[1]] });
9533
9541
  },
9534
9542
  { deep: !0 }
9535
9543
  ), pe(
@@ -9538,7 +9546,7 @@ const sm = { class: "vs-map-body" }, im = {
9538
9546
  typeof s == "number" && (Q.value = s, W && W.setZoom(s));
9539
9547
  }
9540
9548
  ), pe(
9541
- () => k.value?.center,
9549
+ () => _.value?.center,
9542
9550
  (s) => {
9543
9551
  s && J(s.lng, s.lat, W?.getZoom?.());
9544
9552
  },
@@ -9552,18 +9560,18 @@ const sm = { class: "vs-map-body" }, im = {
9552
9560
  }
9553
9561
  U || vn();
9554
9562
  });
9555
- const pa = h(
9556
- () => v.value.length > 0 || !!k.value
9557
- ), xl = h(() => {
9563
+ const pa = y(
9564
+ () => v.value.length > 0 || !!_.value
9565
+ ), xl = y(() => {
9558
9566
  const s = v.value, p = s.length > 1;
9559
- return s.length ? s.map((y) => ({
9560
- id: y.id,
9561
- label: p ? y.label : k.value?.type ? bl(k.value.type) : y.label,
9567
+ return s.length ? s.map((h) => ({
9568
+ id: h.id,
9569
+ label: p ? h.label : _.value?.type ? bl(_.value.type) : h.label,
9562
9570
  interactive: p
9563
- })) : k.value?.type ? [
9571
+ })) : _.value?.type ? [
9564
9572
  {
9565
9573
  id: "__feature",
9566
- label: bl(k.value.type),
9574
+ label: bl(_.value.type),
9567
9575
  interactive: !1
9568
9576
  }
9569
9577
  ] : [];
@@ -9588,7 +9596,7 @@ const sm = { class: "vs-map-body" }, im = {
9588
9596
  c("div", sm, [
9589
9597
  c("div", {
9590
9598
  ref_key: "mapContainer",
9591
- ref: _,
9599
+ ref: k,
9592
9600
  class: "vs-map-canvas"
9593
9601
  }, null, 512),
9594
9602
  g.value.search || g.value.import || g.value.export ? (u(), m("div", im, [
@@ -9641,7 +9649,7 @@ const sm = { class: "vs-map-body" }, im = {
9641
9649
  ])) : Y("", !0),
9642
9650
  Z(z(Mn), {
9643
9651
  visible: Ue.value,
9644
- "onUpdate:visible": p[1] || (p[1] = (y) => Ue.value = y),
9652
+ "onUpdate:visible": p[1] || (p[1] = (h) => Ue.value = h),
9645
9653
  title: "Імпорт геометрії",
9646
9654
  size: "lg",
9647
9655
  teleport: z(i)
@@ -9654,7 +9662,7 @@ const sm = { class: "vs-map-body" }, im = {
9654
9662
  Z(Nt, {
9655
9663
  schema: Ve.value,
9656
9664
  values: le.value,
9657
- "onUpdate:values": p[0] || (p[0] = (y) => le.value = y)
9665
+ "onUpdate:values": p[0] || (p[0] = (h) => le.value = h)
9658
9666
  }, null, 8, ["schema", "values"]),
9659
9667
  c("div", vm, [
9660
9668
  c("button", {
@@ -9681,7 +9689,7 @@ const sm = { class: "vs-map-body" }, im = {
9681
9689
  }, 8, ["visible", "teleport"]),
9682
9690
  Z(z(Mn), {
9683
9691
  visible: Le.value,
9684
- "onUpdate:visible": p[3] || (p[3] = (y) => Le.value = y),
9692
+ "onUpdate:visible": p[3] || (p[3] = (h) => Le.value = h),
9685
9693
  title: "Імпорт координат полігону",
9686
9694
  size: "lg",
9687
9695
  teleport: z(i)
@@ -9690,7 +9698,7 @@ const sm = { class: "vs-map-body" }, im = {
9690
9698
  Z(Nt, {
9691
9699
  schema: st,
9692
9700
  values: De.value,
9693
- "onUpdate:values": p[2] || (p[2] = (y) => De.value = y)
9701
+ "onUpdate:values": p[2] || (p[2] = (h) => De.value = h)
9694
9702
  }, null, 8, ["values"]),
9695
9703
  c("div", hm, [
9696
9704
  c("button", {
@@ -9715,7 +9723,7 @@ const sm = { class: "vs-map-body" }, im = {
9715
9723
  key: 0,
9716
9724
  class: re(["vs-btn", { "vs-active": w.value === "marker" }]),
9717
9725
  title: "Точка",
9718
- onClick: p[4] || (p[4] = (y) => Bn("marker")),
9726
+ onClick: p[4] || (p[4] = (h) => Bn("marker")),
9719
9727
  disabled: d.value
9720
9728
  }, [
9721
9729
  Z(z(za), { class: "vs-btn-icon" })
@@ -9724,7 +9732,7 @@ const sm = { class: "vs-map-body" }, im = {
9724
9732
  key: 1,
9725
9733
  class: re(["vs-btn", { "vs-active": w.value === "polyline" }]),
9726
9734
  title: "Лінія",
9727
- onClick: p[5] || (p[5] = (y) => Bn("polyline")),
9735
+ onClick: p[5] || (p[5] = (h) => Bn("polyline")),
9728
9736
  disabled: d.value
9729
9737
  }, [
9730
9738
  Z(nf, { class: "vs-btn-icon" })
@@ -9733,7 +9741,7 @@ const sm = { class: "vs-map-body" }, im = {
9733
9741
  key: 2,
9734
9742
  class: re(["vs-btn", { "vs-active": w.value === "polygon" }]),
9735
9743
  title: "Полігон",
9736
- onClick: p[6] || (p[6] = (y) => Bn("polygon")),
9744
+ onClick: p[6] || (p[6] = (h) => Bn("polygon")),
9737
9745
  disabled: d.value
9738
9746
  }, [
9739
9747
  Z(rf, { class: "vs-btn-icon" })
@@ -9742,7 +9750,7 @@ const sm = { class: "vs-map-body" }, im = {
9742
9750
  key: 3,
9743
9751
  class: re(["vs-btn", { "vs-active": w.value === "rectangle" }]),
9744
9752
  title: "Прямокутник",
9745
- onClick: p[7] || (p[7] = (y) => Bn("rectangle")),
9753
+ onClick: p[7] || (p[7] = (h) => Bn("rectangle")),
9746
9754
  disabled: d.value
9747
9755
  }, [
9748
9756
  Z(cf, { class: "vs-btn-icon" })
@@ -9759,7 +9767,7 @@ const sm = { class: "vs-map-body" }, im = {
9759
9767
  ], 2)) : Y("", !0),
9760
9768
  c("button", {
9761
9769
  class: "vs-btn",
9762
- onClick: p[8] || (p[8] = (y) => f.value = !f.value),
9770
+ onClick: p[8] || (p[8] = (h) => f.value = !f.value),
9763
9771
  title: f.value ? "Згорнути" : "На весь екран"
9764
9772
  }, [
9765
9773
  f.value ? (u(), be(z(lr), {
@@ -9776,7 +9784,7 @@ const sm = { class: "vs-map-body" }, im = {
9776
9784
  key: 1,
9777
9785
  ref_key: "rulerPanelRefEl",
9778
9786
  ref: b,
9779
- onClose: p[9] || (p[9] = (y) => z(S).closeRuler()),
9787
+ onClose: p[9] || (p[9] = (h) => z(S).closeRuler()),
9780
9788
  onTabChange: z(S).onRulerTabChange,
9781
9789
  onPointsChange: z(S).onRulerPointsChange,
9782
9790
  onShapeClosedChange: z(S).onRulerShapeClosedChange
@@ -9795,12 +9803,12 @@ const sm = { class: "vs-map-body" }, im = {
9795
9803
  }, [
9796
9804
  c("div", Lm, [
9797
9805
  c("dl", Am, [
9798
- (u(!0), m(Me, null, Pe(te.value, (y) => (u(), m("div", {
9799
- key: `${y.key}-${y.value}`,
9806
+ (u(!0), m(Me, null, Pe(te.value, (h) => (u(), m("div", {
9807
+ key: `${h.key}-${h.value}`,
9800
9808
  class: "flex justify-between gap-2"
9801
9809
  }, [
9802
- c("dt", Vm, de(y.key), 1),
9803
- c("dd", Dm, de(y.value), 1)
9810
+ c("dt", Vm, de(h.key), 1),
9811
+ c("dd", Dm, de(h.value), 1)
9804
9812
  ]))), 128))
9805
9813
  ])
9806
9814
  ])
@@ -9826,16 +9834,16 @@ const sm = { class: "vs-map-body" }, im = {
9826
9834
  c("div", Em, [
9827
9835
  p[11] || (p[11] = c("span", { class: "vs-map-status__label" }, "Тип:", -1)),
9828
9836
  c("div", Pm, [
9829
- xl.value.length ? (u(!0), m(Me, { key: 0 }, Pe(xl.value, (y, M) => (u(), m(Me, {
9830
- key: y.id
9837
+ xl.value.length ? (u(!0), m(Me, { key: 0 }, Pe(xl.value, (h, M) => (u(), m(Me, {
9838
+ key: h.id
9831
9839
  }, [
9832
- y.interactive ? (u(), m("button", {
9840
+ h.interactive ? (u(), m("button", {
9833
9841
  key: 0,
9834
9842
  type: "button",
9835
- class: re(["vs-map-status__chip", { "vs-map-status__chip--active": y.id === z(ft) }]),
9836
- onClick: (I) => So(y.id),
9843
+ class: re(["vs-map-status__chip", { "vs-map-status__chip--active": h.id === z(ft) }]),
9844
+ onClick: (I) => So(h.id),
9837
9845
  disabled: d.value
9838
- }, de(y.label), 11, Om)) : (u(), m("span", Bm, de(y.label), 1)),
9846
+ }, de(h.label), 11, Om)) : (u(), m("span", Bm, de(h.label), 1)),
9839
9847
  M < xl.value.length - 1 ? (u(), m("span", Rm, ", ")) : Y("", !0)
9840
9848
  ], 64))), 128)) : (u(), m("span", Nm, "—"))
9841
9849
  ])
@@ -9843,11 +9851,11 @@ const sm = { class: "vs-map-body" }, im = {
9843
9851
  c("div", jm, [
9844
9852
  c("span", zm, [
9845
9853
  p[12] || (p[12] = c("span", { class: "vs-map-status__label" }, "Центр:", -1)),
9846
- k.value ? (u(), m("span", Um, de(k.value.center.lng.toFixed(5)) + ", " + de(k.value.center.lat.toFixed(5)), 1)) : (u(), m("span", Hm, "—"))
9854
+ _.value ? (u(), m("span", Um, de(_.value.center.lng.toFixed(5)) + ", " + de(_.value.center.lat.toFixed(5)), 1)) : (u(), m("span", Hm, "—"))
9847
9855
  ]),
9848
- k.value && k.value.areaKm2 !== null ? (u(), m("span", Wm, [
9856
+ _.value && _.value.areaKm2 !== null ? (u(), m("span", Wm, [
9849
9857
  p[13] || (p[13] = c("span", { class: "vs-map-status__label" }, "Площа:", -1)),
9850
- c("span", qm, de(k.value.areaKm2.toFixed(1)) + " km²", 1)
9858
+ c("span", qm, de(_.value.areaKm2.toFixed(1)) + " km²", 1)
9851
9859
  ])) : Y("", !0),
9852
9860
  c("div", Km, [
9853
9861
  c("button", {
@@ -9899,8 +9907,8 @@ const sm = { class: "vs-map-body" }, im = {
9899
9907
  setup(e, { emit: t }) {
9900
9908
  const n = e, l = t;
9901
9909
  bt(n.style);
9902
- const o = V(null), a = V(null), i = V(null), r = V(!1), d = V(""), f = ze(e, "modelValue"), _ = h(() => n.placeholder || "Add tag…"), $ = h(() => f.value?.length === 0 && d.value === ""), w = h(() => !n.disabled && f.value?.length > 0), k = h(() => n.disabled), v = async () => {
9903
- k.value || await Ze(() => i.value?.focus());
9910
+ const o = V(null), a = V(null), i = V(null), r = V(!1), d = V(""), f = ze(e, "modelValue"), k = y(() => n.placeholder || "Add tag…"), $ = y(() => f.value?.length === 0 && d.value === ""), w = y(() => !n.disabled && f.value?.length > 0), _ = y(() => n.disabled), v = async () => {
9911
+ _.value || await Ze(() => i.value?.focus());
9904
9912
  }, x = (G) => {
9905
9913
  const F = G.trim();
9906
9914
  F !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [F] : n.unique ? f.value.includes(F) || (f.value = [...f.value, F]) : f.value = [...f.value, F], d.value = "");
@@ -9913,9 +9921,9 @@ const sm = { class: "vs-map-body" }, im = {
9913
9921
  }, C = () => {
9914
9922
  l("update:modelValue", []);
9915
9923
  }, E = () => {
9916
- k.value || (r.value = !0);
9924
+ _.value || (r.value = !0);
9917
9925
  }, D = () => {
9918
- r.value = !1, !k.value && b();
9926
+ r.value = !1, !_.value && b();
9919
9927
  }, K = (G) => {
9920
9928
  const { key: F } = G;
9921
9929
  F === "Enter" ? (G.preventDefault(), b()) : F === "Backspace" && d.value === "" && f.value.length > 0 && S(f.value.length - 1);
@@ -9937,7 +9945,7 @@ const sm = { class: "vs-map-body" }, im = {
9937
9945
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
9938
9946
  "border-gray-300 hover:border-gray-400",
9939
9947
  r.value ? "border-blue-500 ring-1 ring-blue-500" : "",
9940
- k.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
9948
+ _.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
9941
9949
  ]),
9942
9950
  "data-focus": r.value ? "true" : "false",
9943
9951
  onClick: v
@@ -9967,9 +9975,9 @@ const sm = { class: "vs-map-body" }, im = {
9967
9975
  })
9968
9976
  ], 8, sv)
9969
9977
  ]))), 128)),
9970
- $.value ? (u(), m("div", iv, de(_.value), 1)) : Y("", !0),
9978
+ $.value ? (u(), m("div", iv, de(k.value), 1)) : Y("", !0),
9971
9979
  c("div", uv, [
9972
- k.value ? Y("", !0) : Oe((u(), m("input", {
9980
+ _.value ? Y("", !0) : Oe((u(), m("input", {
9973
9981
  key: 0,
9974
9982
  ref_key: "inputRef",
9975
9983
  ref: i,
@@ -9997,7 +10005,7 @@ const sm = { class: "vs-map-body" }, im = {
9997
10005
  type: "button",
9998
10006
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
9999
10007
  "aria-label": "Clear all tags",
10000
- disabled: k.value,
10008
+ disabled: _.value,
10001
10009
  onClick: Te(C, ["stop"])
10002
10010
  }, [
10003
10011
  Z(z(_t), { class: "h-4 w-4" })
@@ -10105,10 +10113,10 @@ const sm = { class: "vs-map-body" }, im = {
10105
10113
  }),
10106
10114
  emits: ["update:modelValue"],
10107
10115
  setup(e) {
10108
- const t = e, n = ze(e, "modelValue"), l = V(!1), o = h(() => t.init !== !1), a = h(() => !!t.table && !!t.code), i = () => {
10116
+ const t = e, n = ze(e, "modelValue"), l = V(!1), o = y(() => t.init !== !1), a = y(() => !!t.table && !!t.code), i = () => {
10109
10117
  if (!a.value) return "";
10110
- const f = encodeURIComponent(String(t.table)), _ = encodeURIComponent(String(t.code));
10111
- return `/api/code-gen/${f}/${_}`;
10118
+ const f = encodeURIComponent(String(t.table)), k = encodeURIComponent(String(t.code));
10119
+ return `/api/code-gen/${f}/${k}`;
10112
10120
  }, r = async () => {
10113
10121
  if (!a.value || l.value) return;
10114
10122
  const f = i();
@@ -10131,11 +10139,11 @@ const sm = { class: "vs-map-body" }, im = {
10131
10139
  () => {
10132
10140
  d();
10133
10141
  }
10134
- ), (f, _) => (u(), m("div", hv, [
10142
+ ), (f, k) => (u(), m("div", hv, [
10135
10143
  Oe(c("input", {
10136
10144
  disabled: f.disabled,
10137
10145
  placeholder: f.placeholder,
10138
- "onUpdate:modelValue": _[0] || (_[0] = ($) => n.value = $),
10146
+ "onUpdate:modelValue": k[0] || (k[0] = ($) => n.value = $),
10139
10147
  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"
10140
10148
  }, null, 8, bv), [
10141
10149
  [ot, n.value]
@@ -10185,7 +10193,7 @@ const sm = { class: "vs-map-body" }, im = {
10185
10193
  const S = d.value.splice(f.value, 1)[0];
10186
10194
  d.value.splice(b, 0, S), f.value = null;
10187
10195
  }
10188
- const k = h(() => d.value.some((b) => b.key && !b.value || !b.key && b.value)), v = () => {
10196
+ const _ = y(() => d.value.some((b) => b.key && !b.value || !b.key && b.value)), v = () => {
10189
10197
  d.value.push({ id: n("key-value-"), key: "", value: "" });
10190
10198
  }, x = (b) => {
10191
10199
  d.value = d.value.filter((S) => S.id !== b);
@@ -10247,7 +10255,7 @@ const sm = { class: "vs-map-body" }, im = {
10247
10255
  c("button", {
10248
10256
  type: "button",
10249
10257
  onClick: v,
10250
- disabled: k.value,
10258
+ disabled: _.value,
10251
10259
  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"
10252
10260
  }, [
10253
10261
  Z(z(Tt), { class: "h-4 w-4" }),
@@ -10276,23 +10284,23 @@ const sm = { class: "vs-map-body" }, im = {
10276
10284
  }),
10277
10285
  emits: ["update:modelValue"],
10278
10286
  setup(e) {
10279
- const t = e, n = ze(e, "modelValue"), l = V([]), o = V(null), a = h(() => !!t.disabled), i = h(() => t.placeholder ?? ""), r = h(() => t.addButtonText ?? "Додати");
10287
+ const t = e, n = ze(e, "modelValue"), l = V([]), o = V(null), a = y(() => !!t.disabled), i = y(() => t.placeholder ?? ""), r = y(() => t.addButtonText ?? "Додати");
10280
10288
  let d = !1;
10281
- const f = (b) => `${b}-${Math.random().toString(36).substring(2, 15)}`, _ = (b) => {
10289
+ const f = (b) => `${b}-${Math.random().toString(36).substring(2, 15)}`, k = (b) => {
10282
10290
  const S = b ?? n.value ?? [];
10283
10291
  l.value = S.map((C, E) => ({
10284
10292
  id: l.value[E]?.id ?? f("text-array"),
10285
10293
  value: C ?? ""
10286
10294
  }));
10287
10295
  };
10288
- _(), pe(
10296
+ k(), pe(
10289
10297
  () => n.value,
10290
10298
  (b) => {
10291
10299
  if (d) {
10292
10300
  d = !1;
10293
10301
  return;
10294
10302
  }
10295
- _(b || []);
10303
+ k(b || []);
10296
10304
  },
10297
10305
  { deep: !0 }
10298
10306
  ), pe(
@@ -10302,11 +10310,11 @@ const sm = { class: "vs-map-body" }, im = {
10302
10310
  },
10303
10311
  { deep: !0 }
10304
10312
  );
10305
- const $ = h(() => a.value || l.value.some((b) => !b.value));
10313
+ const $ = y(() => a.value || l.value.some((b) => !b.value));
10306
10314
  function w() {
10307
10315
  $.value || (l.value = [...l.value, { id: f("text-array"), value: "" }]);
10308
10316
  }
10309
- function k(b) {
10317
+ function _(b) {
10310
10318
  a.value || (l.value = l.value.filter((S) => S.id !== b));
10311
10319
  }
10312
10320
  function v(b) {
@@ -10368,7 +10376,7 @@ const sm = { class: "vs-map-body" }, im = {
10368
10376
  ]),
10369
10377
  c("button", {
10370
10378
  type: "button",
10371
- onClick: (D) => k(C.id),
10379
+ onClick: (D) => _(C.id),
10372
10380
  disabled: a.value,
10373
10381
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200 disabled:opacity-50"
10374
10382
  }, [
@@ -10405,10 +10413,10 @@ const sm = { class: "vs-map-body" }, im = {
10405
10413
  },
10406
10414
  emits: ["update:modelValue"],
10407
10415
  setup(e, { emit: t }) {
10408
- const n = e, { inputClass: l } = bt(n.style), o = t, a = h({
10416
+ const n = e, { inputClass: l } = bt(n.style), o = t, a = y({
10409
10417
  get: () => n.modelValue || "#000000",
10410
10418
  set: (r) => o("update:modelValue", r)
10411
- }), i = h(() => !!n.disabled);
10419
+ }), i = y(() => !!n.disabled);
10412
10420
  return (r, d) => (u(), m("div", Yv, [
10413
10421
  Oe(c("input", {
10414
10422
  type: "color",
@@ -10447,28 +10455,28 @@ const sm = { class: "vs-map-body" }, im = {
10447
10455
  },
10448
10456
  emits: ["update:modelValue"],
10449
10457
  setup(e, { emit: t }) {
10450
- const n = e, { inputClass: l } = bt(n.style), o = t, a = (_) => {
10451
- const $ = Number(_), w = Number(n.min), k = Number(n.max);
10452
- return Number.isNaN($) ? w : Math.min(k, Math.max(w, $));
10453
- }, i = h({
10458
+ const n = e, { inputClass: l } = bt(n.style), o = t, a = (k) => {
10459
+ const $ = Number(k), w = Number(n.min), _ = Number(n.max);
10460
+ return Number.isNaN($) ? w : Math.min(_, Math.max(w, $));
10461
+ }, i = y({
10454
10462
  get: () => a(n.modelValue ?? n.min),
10455
- set: (_) => o("update:modelValue", a(_))
10456
- }), r = (_) => {
10457
- const $ = _.target, w = a($.value);
10463
+ set: (k) => o("update:modelValue", a(k))
10464
+ }), r = (k) => {
10465
+ const $ = k.target, w = a($.value);
10458
10466
  $.value = String(w), o("update:modelValue", w);
10459
- }, d = (_) => {
10460
- Number(n.min) >= 0 && _.key === "-" && _.preventDefault();
10461
- }, f = h(() => !!n.disabled);
10462
- return (_, $) => (u(), m("div", Jv, [
10467
+ }, d = (k) => {
10468
+ Number(n.min) >= 0 && k.key === "-" && k.preventDefault();
10469
+ }, f = y(() => !!n.disabled);
10470
+ return (k, $) => (u(), m("div", Jv, [
10463
10471
  Oe(c("input", {
10464
10472
  type: "range",
10465
10473
  "onUpdate:modelValue": $[0] || ($[0] = (w) => i.value = w),
10466
- min: _.min,
10467
- max: _.max,
10468
- step: _.step,
10474
+ min: k.min,
10475
+ max: k.max,
10476
+ step: k.step,
10469
10477
  disabled: f.value,
10470
10478
  ref: "range",
10471
- class: re(["w-full cursor-pointer accent-blue-500", [_.modelValue ? "" : "text-opacity-50", z(l)].join(" ")])
10479
+ class: re(["w-full cursor-pointer accent-blue-500", [k.modelValue ? "" : "text-opacity-50", z(l)].join(" ")])
10472
10480
  }, null, 10, Qv), [
10473
10481
  [ot, i.value]
10474
10482
  ]),
@@ -10476,9 +10484,9 @@ const sm = { class: "vs-map-body" }, im = {
10476
10484
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
10477
10485
  type: "number",
10478
10486
  value: i.value,
10479
- min: _.min,
10480
- max: _.max,
10481
- step: _.step,
10487
+ min: k.min,
10488
+ max: k.max,
10489
+ step: k.step,
10482
10490
  onInput: r,
10483
10491
  onKeydown: d,
10484
10492
  disabled: f.value
@@ -10509,7 +10517,7 @@ const sm = { class: "vs-map-body" }, im = {
10509
10517
  }),
10510
10518
  emits: ["update:modelValue"],
10511
10519
  setup(e) {
10512
- const t = e, n = V(t.count), l = h(() => t.limit), { inputClass: o } = bt(t.style), a = ze(e, "modelValue"), i = h(() => !!t.disabled), r = h(() => t.placeholder ?? "");
10520
+ const t = e, n = V(t.count), l = y(() => t.limit), { inputClass: o } = bt(t.style), a = ze(e, "modelValue"), i = y(() => !!t.disabled), r = y(() => t.placeholder ?? "");
10513
10521
  Rl(() => {
10514
10522
  const x = a.value?.length ?? 0;
10515
10523
  x < n.value && (a.value = [
@@ -10518,7 +10526,7 @@ const sm = { class: "vs-map-body" }, im = {
10518
10526
  ]);
10519
10527
  });
10520
10528
  const d = V({}), f = V({});
10521
- function _(x, b) {
10529
+ function k(x, b) {
10522
10530
  x && (d.value[b] = x);
10523
10531
  }
10524
10532
  async function $(x, b) {
@@ -10545,7 +10553,7 @@ const sm = { class: "vs-map-body" }, im = {
10545
10553
  const S = x.target.value ?? null, C = [...a.value];
10546
10554
  C[b] = t.inputType === "text" ? S : Number(S), a.value = C;
10547
10555
  }
10548
- function k() {
10556
+ function _() {
10549
10557
  n.value += 1;
10550
10558
  const x = t.inputType === "text" || t.inputType === "mask" ? null : 0;
10551
10559
  a.value = [...a.value, x], t.inputType === "mask" && setTimeout(() => {
@@ -10597,7 +10605,7 @@ const sm = { class: "vs-map-body" }, im = {
10597
10605
  key: 0,
10598
10606
  type: "text",
10599
10607
  ref_for: !0,
10600
- ref: (C) => _(C, S - 1),
10608
+ ref: (C) => k(C, S - 1),
10601
10609
  placeholder: x.placeholder,
10602
10610
  disabled: x.disabled,
10603
10611
  name: `${x.name}[${S - 1}]`,
@@ -10620,7 +10628,7 @@ const sm = { class: "vs-map-body" }, im = {
10620
10628
  !x.disabled && S === n.value && x.isAdded ? (u(), m("button", {
10621
10629
  key: 2,
10622
10630
  type: "button",
10623
- onClick: Te(k, ["stop"]),
10631
+ onClick: Te(_, ["stop"]),
10624
10632
  class: "cursor-pointer shrink-0 w-[38px] text-green-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
10625
10633
  }, [
10626
10634
  Z(z(Tt), { class: "h-4 w-4" })
@@ -10671,23 +10679,23 @@ const sm = { class: "vs-map-body" }, im = {
10671
10679
  }),
10672
10680
  emits: /* @__PURE__ */ Re(["change", "update:modelValue", "value-selected"], ["update:modelValue"]),
10673
10681
  setup(e, { emit: t }) {
10674
- const n = e, l = t, o = ze(e, "modelValue"), a = V([]), i = V(n.options ?? []), r = V({}), d = V({}), f = V({ keyword: "", parent: null }), _ = V(""), $ = V(!1), w = V(null), k = V(null), v = V(null), x = V(null), b = V(null), S = V({});
10682
+ const n = e, l = t, o = ze(e, "modelValue"), a = V([]), i = V(n.options ?? []), r = V({}), d = V({}), f = V({ keyword: "", parent: null }), k = V(""), $ = V(!1), w = V(null), _ = V(null), v = V(null), x = V(null), b = V(null), S = V({});
10675
10683
  let C = !1, E = !1;
10676
- const D = Je("values"), K = h(() => !!n.disabled), G = h(() => n.placeholder ?? "Оберіть значення"), F = h(() => n.search !== !1), O = h(() => {
10684
+ const D = Je("values"), K = y(() => !!n.disabled), G = y(() => n.placeholder ?? "Оберіть значення"), F = y(() => n.search !== !1), O = y(() => {
10677
10685
  const g = n.parent ?? n.parentValue;
10678
10686
  return g ? String(g) : "";
10679
- }), B = h(() => O.value ? D?.value?.[O.value] ?? null : null), T = (g) => g == null ? "__null__" : String(g), H = (g) => {
10687
+ }), B = y(() => O.value ? D?.value?.[O.value] ?? null : null), T = (g) => g == null ? "__null__" : String(g), H = (g) => {
10680
10688
  if (!g) return "";
10681
10689
  const L = g.label ?? g.text ?? g.name ?? g.ua ?? g.en;
10682
10690
  return L ? String(L) : g.id !== void 0 && g.id !== null ? String(g.id) : "";
10683
10691
  }, fe = (g) => {
10684
10692
  const L = T(g);
10685
10693
  return d.value[L] || (d.value[L] = `array-select-${L}-${Math.random().toString(36).slice(2, 8)}`), d.value[L];
10686
- }, ke = h(() => new Set(a.value.map((g) => T(g.id)))), ee = h(() => {
10694
+ }, ke = y(() => new Set(a.value.map((g) => T(g.id)))), ee = y(() => {
10687
10695
  const g = ke.value;
10688
10696
  let L = [...i.value];
10689
- if (!n.data && _.value.trim()) {
10690
- const P = _.value.toLowerCase();
10697
+ if (!n.data && k.value.trim()) {
10698
+ const P = k.value.toLowerCase();
10691
10699
  L = L.filter((oe) => H(oe).toLowerCase().includes(P));
10692
10700
  }
10693
10701
  return L.filter((P) => !g.has(T(P.id)));
@@ -10775,7 +10783,7 @@ const sm = { class: "vs-map-body" }, im = {
10775
10783
  top: dt ? `${g.bottom + Ce}px` : `${g.top - Ce}px`
10776
10784
  };
10777
10785
  }, Ie = async (g = "click") => {
10778
- K.value || $.value || (se.value = g, await N(_.value.trim()), $.value = !0, await Ze(), Se(), b.value?.focus());
10786
+ K.value || $.value || (se.value = g, await N(k.value.trim()), $.value = !0, await Ze(), Se(), b.value?.focus());
10779
10787
  }, Le = () => {
10780
10788
  $.value = !1, se.value = null, Ze(() => {
10781
10789
  b.value?.blur();
@@ -10800,7 +10808,7 @@ const sm = { class: "vs-map-body" }, im = {
10800
10808
  x.value?.contains(L) || Le();
10801
10809
  }, tt = (g) => {
10802
10810
  const L = g.target;
10803
- k.value?.contains(L) || x.value?.contains(L) || Le();
10811
+ _.value?.contains(L) || x.value?.contains(L) || Le();
10804
10812
  }, We = (g) => {
10805
10813
  if (g.key === "Escape") {
10806
10814
  g.preventDefault(), Le();
@@ -10821,7 +10829,7 @@ const sm = { class: "vs-map-body" }, im = {
10821
10829
  text: H(g) || String(g.id ?? ""),
10822
10830
  key: fe(g.id)
10823
10831
  };
10824
- a.value = [...a.value, P], we(g), _.value = "", Ze(() => {
10832
+ a.value = [...a.value, P], we(g), k.value = "", Ze(() => {
10825
10833
  b.value?.focus();
10826
10834
  });
10827
10835
  }, we = (g) => {
@@ -10892,14 +10900,14 @@ const sm = { class: "vs-map-body" }, im = {
10892
10900
  return;
10893
10901
  }
10894
10902
  ue();
10895
- }, { deep: !0 }), pe(_, (g) => {
10903
+ }, { deep: !0 }), pe(k, (g) => {
10896
10904
  !n.data || !$.value || ye(g.trim());
10897
10905
  }), pe(K, (g) => {
10898
10906
  g && Le();
10899
10907
  }), pe(() => n.options, async (g) => {
10900
10908
  n.data || (Q(g ?? []), await ue());
10901
10909
  }, { immediate: !0, deep: !0 }), pe(() => n.data, async (g) => {
10902
- g && (await N(_.value.trim()), await ue());
10910
+ g && (await N(k.value.trim()), await ue());
10903
10911
  }, { immediate: !0 });
10904
10912
  const A = V(!1);
10905
10913
  return pe(B, async () => {
@@ -10908,7 +10916,7 @@ const sm = { class: "vs-map-body" }, im = {
10908
10916
  A.value = !0;
10909
10917
  return;
10910
10918
  }
10911
- a.value = [], await N(_.value.trim()), await ue();
10919
+ a.value = [], await N(k.value.trim()), await ue();
10912
10920
  }
10913
10921
  }), at(async () => {
10914
10922
  document.addEventListener("click", tt, !0), window.addEventListener("keydown", He), window.addEventListener("scroll", Ne, !0), await ue();
@@ -10937,7 +10945,7 @@ const sm = { class: "vs-map-body" }, im = {
10937
10945
  c("div", {
10938
10946
  class: "flex flex-col gap-2 w-full",
10939
10947
  ref_key: "rootRef",
10940
- ref: k
10948
+ ref: _
10941
10949
  }, [
10942
10950
  c("div", rg, [
10943
10951
  c("div", {
@@ -10963,7 +10971,7 @@ const sm = { class: "vs-map-body" }, im = {
10963
10971
  Oe(c("input", {
10964
10972
  ref_key: "inputRef",
10965
10973
  ref: b,
10966
- "onUpdate:modelValue": L[2] || (L[2] = (P) => _.value = P),
10974
+ "onUpdate:modelValue": L[2] || (L[2] = (P) => k.value = P),
10967
10975
  placeholder: G.value,
10968
10976
  disabled: K.value,
10969
10977
  readonly: !F.value,
@@ -10971,7 +10979,7 @@ const sm = { class: "vs-map-body" }, im = {
10971
10979
  onKeydown: We,
10972
10980
  class: "flex-1 bg-transparent border-0 outline-none px-0 py-1 text-sm text-stone-900 placeholder:text-stone-400"
10973
10981
  }, null, 40, ig), [
10974
- [ot, _.value]
10982
+ [ot, k.value]
10975
10983
  ]),
10976
10984
  c("span", {
10977
10985
  class: re(["text-stone-400 transition-transform duration-150", $.value ? "rotate-180" : ""]),
@@ -11084,18 +11092,18 @@ const sm = { class: "vs-map-body" }, im = {
11084
11092
  }),
11085
11093
  emits: /* @__PURE__ */ Re(["update:modelValue", "update:geom"], ["update:modelValue"]),
11086
11094
  setup(e, { emit: t }) {
11087
- const n = /{{\s*([^}]+?)\s*}}/g, l = e, o = t, { inputClass: a } = bt(l.style), i = ze(e, "modelValue"), r = h({
11095
+ const n = /{{\s*([^}]+?)\s*}}/g, l = e, o = t, { inputClass: a } = bt(l.style), i = ze(e, "modelValue"), r = y({
11088
11096
  get: () => i.value,
11089
11097
  set: (F) => {
11090
11098
  i.value = F;
11091
11099
  }
11092
- }), d = V(!1), f = V([]), _ = V(!1), $ = V(null);
11093
- pe(_, (F) => {
11100
+ }), d = V(!1), f = V([]), k = V(!1), $ = V(null);
11101
+ pe(k, (F) => {
11094
11102
  typeof document > "u" || (F ? ($.value = document.body.style.overflow, document.body.style.overflow = "hidden") : $.value != null ? (document.body.style.overflow = $.value, $.value = null) : document.body.style.removeProperty("overflow"));
11095
11103
  }), Vt(() => {
11096
11104
  typeof document > "u" || ($.value != null ? document.body.style.overflow = $.value : document.body.style.removeProperty("overflow"));
11097
11105
  });
11098
- const w = h(() => l.placeholder ?? ""), k = h(() => !!l.disabled), v = (F) => {
11106
+ const w = y(() => l.placeholder ?? ""), _ = y(() => !!l.disabled), v = (F) => {
11099
11107
  if (!F) return null;
11100
11108
  if (Array.isArray(F)) return F;
11101
11109
  if (typeof F == "string") {
@@ -11103,21 +11111,21 @@ const sm = { class: "vs-map-body" }, im = {
11103
11111
  return O.length !== 4 ? null : O.map(Number);
11104
11112
  }
11105
11113
  return null;
11106
- }, x = h(() => {
11114
+ }, x = y(() => {
11107
11115
  const F = v(l.bbox);
11108
11116
  if (!F || F.length !== 4) return null;
11109
11117
  const O = F.map(Number);
11110
11118
  return O.some((B) => Number.isNaN(B)) ? null : O;
11111
- }), b = h(() => {
11119
+ }), b = y(() => {
11112
11120
  const F = x.value;
11113
11121
  if (!F) return "";
11114
11122
  const [O, B, T, H] = F;
11115
11123
  return `${O},${Math.max(B, H)},${T},${Math.min(B, H)}`;
11116
11124
  });
11117
- h(() => b.value ? "1" : "0");
11125
+ y(() => b.value ? "1" : "0");
11118
11126
  const S = Je("values");
11119
11127
  function C() {
11120
- !k.value && r.value.trim() && E();
11128
+ !_.value && r.value.trim() && E();
11121
11129
  }
11122
11130
  async function E() {
11123
11131
  const F = (r.value || "").trim();
@@ -11132,7 +11140,7 @@ const sm = { class: "vs-map-body" }, im = {
11132
11140
  d.value = !0;
11133
11141
  try {
11134
11142
  const H = await (await fetch(B)).json();
11135
- f.value = Array.isArray(H) ? H : [], _.value = !0;
11143
+ f.value = Array.isArray(H) ? H : [], k.value = !0;
11136
11144
  } catch (T) {
11137
11145
  console.error("Address search error:", T);
11138
11146
  } finally {
@@ -11141,11 +11149,11 @@ const sm = { class: "vs-map-body" }, im = {
11141
11149
  }
11142
11150
  }
11143
11151
  function D() {
11144
- _.value = !_.value;
11152
+ k.value = !k.value;
11145
11153
  }
11146
11154
  function K(F) {
11147
11155
  if (!F) return;
11148
- _.value = !1;
11156
+ k.value = !1;
11149
11157
  const O = parseFloat(F.lat), T = {
11150
11158
  type: "Point",
11151
11159
  coordinates: [parseFloat(F.lon), O]
@@ -11166,7 +11174,7 @@ const sm = { class: "vs-map-body" }, im = {
11166
11174
  type: "text",
11167
11175
  "onUpdate:modelValue": O[0] || (O[0] = (B) => r.value = B),
11168
11176
  placeholder: w.value,
11169
- disabled: k.value,
11177
+ disabled: _.value,
11170
11178
  class: re(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [z(a), { "!border-red-600": l.error }]]),
11171
11179
  style: { border: "1px solid #CFD9E0" },
11172
11180
  onKeydown: Uo(Te(C, ["prevent"]), ["enter"])
@@ -11198,13 +11206,13 @@ const sm = { class: "vs-map-body" }, im = {
11198
11206
  }))
11199
11207
  ], 8, _g),
11200
11208
  (u(), be(Xt, { to: "body" }, [
11201
- _.value ? (u(), m("div", $g, [
11209
+ k.value ? (u(), m("div", $g, [
11202
11210
  c("div", Sg, [
11203
11211
  c("div", Cg, [
11204
11212
  O[2] || (O[2] = c("span", null, "Результати пошуку", -1)),
11205
11213
  c("button", {
11206
11214
  class: "text-gray-500 hover:text-blue-600",
11207
- onClick: O[1] || (O[1] = (B) => _.value = !1),
11215
+ onClick: O[1] || (O[1] = (B) => k.value = !1),
11208
11216
  title: "Close"
11209
11217
  }, [
11210
11218
  Z(z(_t), { class: "h-4 w-4" })
@@ -11249,17 +11257,17 @@ const sm = { class: "vs-map-body" }, im = {
11249
11257
  }),
11250
11258
  emits: ["update:modelValue"],
11251
11259
  setup(e) {
11252
- const t = e, n = ze(e, "modelValue"), l = h(() => Array.isArray(n.value) ? n.value : []), o = V([]), a = h(() => t.schema?.map((b) => ({
11260
+ const t = e, n = ze(e, "modelValue"), l = y(() => Array.isArray(n.value) ? n.value : []), o = V([]), a = y(() => t.schema?.map((b) => ({
11253
11261
  ...b,
11254
11262
  disabled: t.disabled || b.disabled
11255
- })) ?? []), i = h(() => a.value.map((b) => x(b))), r = h(() => a.value.reduce((S, C) => {
11263
+ })) ?? []), i = y(() => a.value.map((b) => x(b))), r = y(() => a.value.reduce((S, C) => {
11256
11264
  const E = Number(C?.col ?? 12);
11257
11265
  return S + (Number.isFinite(E) && E > 0 ? E : 12);
11258
- }, 0) > 12), d = h(() => t.disabled ? !1 : t.maxItems ? l.value.length < t.maxItems : !0), f = h(() => t.disabled || l.value.length <= (t.minItems || 0));
11266
+ }, 0) > 12), d = y(() => t.disabled ? !1 : t.maxItems ? l.value.length < t.maxItems : !0), f = y(() => t.disabled || l.value.length <= (t.minItems || 0));
11259
11267
  pe(() => l.value.length, () => {
11260
- _(), $();
11268
+ k(), $();
11261
11269
  }, { immediate: !0 }), pe(() => t.schema, $, { immediate: !0, deep: !0 });
11262
- function _() {
11270
+ function k() {
11263
11271
  const b = l.value.length;
11264
11272
  o.value.length < b ? o.value = [...o.value, ...Array.from({ length: b - o.value.length }, () => Jl())] : o.value.length > b && o.value.splice(b);
11265
11273
  }
@@ -11274,11 +11282,11 @@ const sm = { class: "vs-map-body" }, im = {
11274
11282
  b[S.name] = S?.default ?? null;
11275
11283
  }), b;
11276
11284
  }
11277
- function k() {
11278
- d.value && (n.value = [...l.value, w()], _());
11285
+ function _() {
11286
+ d.value && (n.value = [...l.value, w()], k());
11279
11287
  }
11280
11288
  function v(b) {
11281
- f.value || (n.value = l.value.filter((S, C) => C !== b), _(), $());
11289
+ f.value || (n.value = l.value.filter((S, C) => C !== b), k(), $());
11282
11290
  }
11283
11291
  function x(b) {
11284
11292
  return {
@@ -11315,7 +11323,7 @@ const sm = { class: "vs-map-body" }, im = {
11315
11323
  c("button", {
11316
11324
  type: "button",
11317
11325
  class: "flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",
11318
- onClick: k,
11326
+ onClick: _,
11319
11327
  disabled: !d.value
11320
11328
  }, [
11321
11329
  Z(z(Tt), { class: "h-4 w-4" }),
@@ -11355,10 +11363,10 @@ const sm = { class: "vs-map-body" }, im = {
11355
11363
  }),
11356
11364
  emits: ["update:modelValue"],
11357
11365
  setup(e) {
11358
- const t = e, n = ze(e, "modelValue"), l = V([]), o = V([]), a = V(0), i = V(null), r = V(null), d = V(null), f = h(() => t.groupLabel ?? "Group"), _ = h(() => t.emptyLabel ?? "Ще немає груп"), $ = h(() => t.schema?.map((N) => ({
11366
+ const t = e, n = ze(e, "modelValue"), l = V([]), o = V([]), a = V(0), i = V(null), r = V(null), d = V(null), f = y(() => t.groupLabel ?? "Group"), k = y(() => t.emptyLabel ?? "Ще немає груп"), $ = y(() => t.schema?.map((N) => ({
11359
11367
  ...N,
11360
11368
  disabled: t.disabled || N.disabled
11361
- })) ?? []), w = h(() => $.value.map((N) => B(N))), k = h(() => t.view === "accordion"), v = h(() => !!(t.collapsible || k.value)), x = h(() => t.draggable !== !1), b = h(() => t.disabled ? !1 : t.maxGroups ? n.value.length < t.maxGroups : !0), S = h(() => t.disabled || n.value.length <= (t.minGroups || 0));
11369
+ })) ?? []), w = y(() => $.value.map((N) => B(N))), _ = y(() => t.view === "accordion"), v = y(() => !!(t.collapsible || _.value)), x = y(() => t.draggable !== !1), b = y(() => t.disabled ? !1 : t.maxGroups ? n.value.length < t.maxGroups : !0), S = y(() => t.disabled || n.value.length <= (t.minGroups || 0));
11362
11370
  pe(() => n.value.length, () => {
11363
11371
  C(), E(), D();
11364
11372
  }, { immediate: !0 }), pe(() => t.schema, D, { immediate: !0, deep: !0 }), pe(() => t.view, () => {
@@ -11370,7 +11378,7 @@ const sm = { class: "vs-map-body" }, im = {
11370
11378
  }
11371
11379
  function E() {
11372
11380
  const N = n.value.length;
11373
- k.value ? N === 0 ? a.value = -1 : a.value >= N ? a.value = N - 1 : a.value < 0 && (a.value = 0) : o.value.length < N ? o.value = [...o.value, ...Array.from({ length: N - o.value.length }, () => !1)] : o.value.length > N && o.value.splice(N);
11381
+ _.value ? N === 0 ? a.value = -1 : a.value >= N ? a.value = N - 1 : a.value < 0 && (a.value = 0) : o.value.length < N ? o.value = [...o.value, ...Array.from({ length: N - o.value.length }, () => !1)] : o.value.length > N && o.value.splice(N);
11374
11382
  }
11375
11383
  function D() {
11376
11384
  if (!t.minGroups || n.value.length >= t.minGroups) return;
@@ -11387,7 +11395,7 @@ const sm = { class: "vs-map-body" }, im = {
11387
11395
  b.value && (n.value = [...n.value, K()], C(), E());
11388
11396
  }
11389
11397
  function F(N) {
11390
- S.value || (n.value = n.value.filter((ve, ye) => ye !== N), C(), k.value ? a.value >= n.value.length && (a.value = n.value.length - 1) : o.value.splice(N, 1), D());
11398
+ S.value || (n.value = n.value.filter((ve, ye) => ye !== N), C(), _.value ? a.value >= n.value.length && (a.value = n.value.length - 1) : o.value.splice(N, 1), D());
11391
11399
  }
11392
11400
  function O(N) {
11393
11401
  if (t.disabled) return;
@@ -11396,7 +11404,7 @@ const sm = { class: "vs-map-body" }, im = {
11396
11404
  ...n.value.slice(0, N + 1),
11397
11405
  ve,
11398
11406
  ...n.value.slice(N + 1)
11399
- ], C(), k.value ? a.value > N && (a.value += 1) : o.value.splice(N + 1, 0, o.value[N] ?? !1);
11407
+ ], C(), _.value ? a.value > N && (a.value += 1) : o.value.splice(N + 1, 0, o.value[N] ?? !1);
11400
11408
  }
11401
11409
  function B(N) {
11402
11410
  return {
@@ -11404,11 +11412,11 @@ const sm = { class: "vs-map-body" }, im = {
11404
11412
  };
11405
11413
  }
11406
11414
  function T(N) {
11407
- return k.value ? a.value === -1 && N === 0 ? !1 : a.value !== N : !!o.value[N];
11415
+ return _.value ? a.value === -1 && N === 0 ? !1 : a.value !== N : !!o.value[N];
11408
11416
  }
11409
11417
  function H(N) {
11410
11418
  if (v.value) {
11411
- if (k.value) {
11419
+ if (_.value) {
11412
11420
  a.value = N;
11413
11421
  return;
11414
11422
  }
@@ -11442,7 +11450,7 @@ const sm = { class: "vs-map-body" }, im = {
11442
11450
  const ye = [...n.value], [se] = ye.splice(N, 1);
11443
11451
  ye.splice(ve, 0, se), n.value = ye;
11444
11452
  const Se = [...l.value], [Ie] = Se.splice(N, 1);
11445
- if (Se.splice(ve, 0, Ie), l.value = Se, k.value)
11453
+ if (Se.splice(ve, 0, Ie), l.value = Se, _.value)
11446
11454
  a.value === N && (a.value = ve);
11447
11455
  else {
11448
11456
  const Le = [...o.value], [Ue] = Le.splice(N, 1);
@@ -11550,7 +11558,7 @@ const sm = { class: "vs-map-body" }, im = {
11550
11558
  [Rt, !T(se)]
11551
11559
  ])
11552
11560
  ], 42, Bg))), 128)),
11553
- n.value.length === 0 ? (u(), m("div", Wg, de(_.value), 1)) : Y("", !0),
11561
+ n.value.length === 0 ? (u(), m("div", Wg, de(k.value), 1)) : Y("", !0),
11554
11562
  c("button", {
11555
11563
  type: "button",
11556
11564
  class: "flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",
@@ -11584,7 +11592,7 @@ const sm = { class: "vs-map-body" }, im = {
11584
11592
  }),
11585
11593
  emits: ["update:modelValue"],
11586
11594
  setup(e, { expose: t }) {
11587
- const n = e, l = ze(e, "modelValue"), o = V(null), a = h(() => typeof n.height == "number" ? `${n.height}px` : n.height || "280px");
11595
+ const n = e, l = ze(e, "modelValue"), o = V(null), a = y(() => typeof n.height == "number" ? `${n.height}px` : n.height || "280px");
11588
11596
  let i = null, r = null, d = !1;
11589
11597
  const f = () => {
11590
11598
  if (r) return Promise.resolve(r);
@@ -11635,7 +11643,7 @@ const sm = { class: "vs-map-body" }, im = {
11635
11643
  throw delete v[Gn], S;
11636
11644
  });
11637
11645
  return v[Gn] = b, b;
11638
- }, _ = () => {
11646
+ }, k = () => {
11639
11647
  !o.value || !r || (i && (i.dispose(), i = null), i = r.editor.create(o.value, {
11640
11648
  value: l.value || "",
11641
11649
  language: n.syntax,
@@ -11648,7 +11656,7 @@ const sm = { class: "vs-map-body" }, im = {
11648
11656
  }));
11649
11657
  }, $ = () => {
11650
11658
  i?.focus();
11651
- }, w = () => i, k = () => r;
11659
+ }, w = () => i, _ = () => r;
11652
11660
  return pe(
11653
11661
  () => l.value,
11654
11662
  (v) => {
@@ -11680,7 +11688,7 @@ const sm = { class: "vs-map-body" }, im = {
11680
11688
  try {
11681
11689
  const v = await f();
11682
11690
  if (!v || !v.editor) return;
11683
- r = v, _();
11691
+ r = v, k();
11684
11692
  } catch (v) {
11685
11693
  console.error("Failed to load Monaco editor", v);
11686
11694
  }
@@ -11689,7 +11697,7 @@ const sm = { class: "vs-map-body" }, im = {
11689
11697
  }), t({
11690
11698
  focus: $,
11691
11699
  getEditor: w,
11692
- getMonaco: k
11700
+ getMonaco: _
11693
11701
  }), (v, x) => (u(), m("div", {
11694
11702
  class: "w-full",
11695
11703
  style: Ee({ height: a.value })
@@ -11815,11 +11823,11 @@ const sm = { class: "vs-map-body" }, im = {
11815
11823
  }),
11816
11824
  emits: /* @__PURE__ */ Re(["value-selected"], ["update:modelValue"]),
11817
11825
  setup(e, { emit: t }) {
11818
- const n = e, l = ze(e, "modelValue"), o = t, a = h(() => Tr[`${n.layout}`]), i = ["label", "placeholder", "info", "description", "text", "html"], r = V(fe()), d = h(() => B(n.item, r.value)), f = h(() => {
11826
+ const n = e, l = ze(e, "modelValue"), o = t, a = y(() => Tr[`${n.layout}`]), i = ["label", "placeholder", "info", "description", "text", "html"], r = V(fe()), d = y(() => B(n.item, r.value)), f = y(() => {
11819
11827
  const ee = { ...d.value ?? {} }, ne = n.item?.name;
11820
11828
  return ne && $?.value?.[ne] && Object.assign(ee, $.value[ne]), ee.__locale = r.value, ee;
11821
- }), _ = h(() => Xg?.[`vs-input-${n.item.type}`]), $ = Je("field-props"), w = h(() => {
11822
- const ee = z(_);
11829
+ }), k = y(() => Xg?.[`vs-input-${n.item.type}`]), $ = Je("field-props"), w = y(() => {
11830
+ const ee = z(k);
11823
11831
  if (!ee) return /* @__PURE__ */ new Set();
11824
11832
  const ne = ee.props ?? ee.__vccOpts?.props;
11825
11833
  if (!ne) return /* @__PURE__ */ new Set();
@@ -11869,7 +11877,7 @@ const sm = { class: "vs-map-body" }, im = {
11869
11877
  Q !== void 0 && (ne[X] = Q);
11870
11878
  }), ne;
11871
11879
  }
11872
- const S = h(() => {
11880
+ const S = y(() => {
11873
11881
  const ee = { ...d.value ?? {} }, ne = n.item?.name;
11874
11882
  ne && $?.value?.[ne] && Object.assign(ee, $.value[ne]);
11875
11883
  const ge = w.value;
@@ -11884,7 +11892,7 @@ const sm = { class: "vs-map-body" }, im = {
11884
11892
  ...ne,
11885
11893
  name: ne.name ?? n.item?.name
11886
11894
  });
11887
- }, E = /{{\s*([^}]+?)\s*}}/g, D = Je("values"), K = V(!1), G = h(() => {
11895
+ }, E = /{{\s*([^}]+?)\s*}}/g, D = Je("values"), K = V(!1), G = y(() => {
11888
11896
  const ee = n.item?.api, ne = n.item?.type?.toLowerCase();
11889
11897
  return typeof ee == "string" && ee.trim().length > 0 && (ne === "text" || ne === "mask");
11890
11898
  });
@@ -11987,7 +11995,7 @@ const sm = { class: "vs-map-body" }, im = {
11987
11995
  class: re(["flex items-center gap-2 w-full", { "flex-1": G.value }])
11988
11996
  }, [
11989
11997
  c("div", Qg, [
11990
- (u(), be(ht(_.value), nn(S.value, {
11998
+ (u(), be(ht(k.value), nn(S.value, {
11991
11999
  modelValue: l.value,
11992
12000
  "onUpdate:modelValue": ne[0] || (ne[0] = (ge) => l.value = ge),
11993
12001
  onValueSelected: C
@@ -12031,17 +12039,17 @@ const sm = { class: "vs-map-body" }, im = {
12031
12039
  width: { default: 400 }
12032
12040
  },
12033
12041
  setup(e, { expose: t }) {
12034
- const n = e, l = V([]), o = V(""), a = V(""), i = h(() => !!n.enabled), r = h(() => [
12042
+ const n = e, l = V([]), o = V(""), a = V(""), i = y(() => !!n.enabled), r = y(() => [
12035
12043
  "vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
12036
12044
  "sticky top-0 self-start shrink-0",
12037
12045
  "max-h-full min-h-0 overflow-y-auto"
12038
- ]), d = h(() => {
12046
+ ]), d = y(() => {
12039
12047
  const H = n.width;
12040
12048
  if (H == null) return {};
12041
12049
  const fe = typeof H == "number" ? `${H}px` : `${H}`;
12042
12050
  return { width: fe, minWidth: fe };
12043
12051
  });
12044
- let f = null, _ = 0, $ = 0, w = null, k = null, v = null;
12052
+ let f = null, k = 0, $ = 0, w = null, _ = null, v = null;
12045
12053
  const x = () => B(), b = () => C();
12046
12054
  pe(
12047
12055
  () => n.target,
@@ -12057,7 +12065,7 @@ const sm = { class: "vs-map-body" }, im = {
12057
12065
  () => n.scrollContainer,
12058
12066
  (H) => {
12059
12067
  if (!i.value) {
12060
- k = H ?? null;
12068
+ _ = H ?? null;
12061
12069
  return;
12062
12070
  }
12063
12071
  S(H ?? null), Ze(() => C());
@@ -12066,14 +12074,14 @@ const sm = { class: "vs-map-body" }, im = {
12066
12074
  ), at(() => {
12067
12075
  n.scrollContainer || S(null), C();
12068
12076
  }), Vt(() => {
12069
- G(), S(null, !0), w = null, typeof window < "u" && (_ && window.cancelAnimationFrame(_), $ && window.cancelAnimationFrame($));
12077
+ G(), S(null, !0), w = null, typeof window < "u" && (k && window.cancelAnimationFrame(k), $ && window.cancelAnimationFrame($));
12070
12078
  });
12071
12079
  function S(H, fe = !1) {
12072
12080
  if (v && (v(), v = null), fe) {
12073
- k = null;
12081
+ _ = null;
12074
12082
  return;
12075
12083
  }
12076
- if (k = H ?? null, typeof window > "u") return;
12084
+ if (_ = H ?? null, typeof window > "u") return;
12077
12085
  const ke = H ?? window, ee = window;
12078
12086
  ke.addEventListener("scroll", x, { passive: !0 }), ee.addEventListener("resize", b), v = () => {
12079
12087
  ke.removeEventListener("scroll", x), ee.removeEventListener("resize", b);
@@ -12081,11 +12089,11 @@ const sm = { class: "vs-map-body" }, im = {
12081
12089
  }
12082
12090
  function C() {
12083
12091
  if (!i.value || !w) return;
12084
- _ && typeof window < "u" && window.cancelAnimationFrame(_);
12092
+ k && typeof window < "u" && window.cancelAnimationFrame(k);
12085
12093
  const H = () => {
12086
- E(), _ = 0;
12094
+ E(), k = 0;
12087
12095
  };
12088
- typeof window > "u" ? H() : _ = window.requestAnimationFrame(H);
12096
+ typeof window > "u" ? H() : k = window.requestAnimationFrame(H);
12089
12097
  }
12090
12098
  function E() {
12091
12099
  if (!i.value || !w) return;
@@ -12115,7 +12123,7 @@ const sm = { class: "vs-map-body" }, im = {
12115
12123
  f && (f.disconnect(), f = null);
12116
12124
  }
12117
12125
  function F(H) {
12118
- const fe = k;
12126
+ const fe = _;
12119
12127
  if (!fe)
12120
12128
  return typeof window > "u" ? H.offsetTop : H.getBoundingClientRect().top + window.scrollY;
12121
12129
  const ke = H.getBoundingClientRect(), ee = fe.getBoundingClientRect();
@@ -12123,7 +12131,7 @@ const sm = { class: "vs-map-body" }, im = {
12123
12131
  }
12124
12132
  function O() {
12125
12133
  if (!i.value || !l.value.length) return;
12126
- const H = k, fe = (H ? H.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), ke = (H ? H.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), ee = fe + ke;
12134
+ const H = _, fe = (H ? H.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), ke = (H ? H.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), ee = fe + ke;
12127
12135
  let ne = null;
12128
12136
  for (let X = 0; X < l.value.length; X += 1) {
12129
12137
  const Q = l.value[X], ie = document.getElementById(Q.id);
@@ -12145,7 +12153,7 @@ const sm = { class: "vs-map-body" }, im = {
12145
12153
  if (!i.value) return;
12146
12154
  const fe = document.getElementById(H);
12147
12155
  if (!fe) return;
12148
- const ke = k, ee = Math.max(0, F(fe));
12156
+ const ke = _, ee = Math.max(0, F(fe));
12149
12157
  ke ? ke.scrollTo({ top: ee, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: ee, behavior: "smooth" });
12150
12158
  }
12151
12159
  return t({ refresh: C }), (H, fe) => i.value && l.value.length ? (u(), m("div", {
@@ -12310,7 +12318,7 @@ function El(e, t = !1) {
12310
12318
  }), n;
12311
12319
  }
12312
12320
  function ky(e, t, n = !1) {
12313
- const l = h(() => El(
12321
+ const l = y(() => El(
12314
12322
  (Array.isArray(t), t),
12315
12323
  typeof n == "boolean" ? n : n.value
12316
12324
  )), o = V({});
@@ -12319,19 +12327,19 @@ function ky(e, t, n = !1) {
12319
12327
  }
12320
12328
  const i = /* @__PURE__ */ new Set(["maxField"]);
12321
12329
  function r(w) {
12322
- return typeof w.maxField == "string" && w.maxField ? !0 : (w.rules || []).some((k) => {
12323
- const v = typeof k == "string" ? k : k.type;
12330
+ return typeof w.maxField == "string" && w.maxField ? !0 : (w.rules || []).some((_) => {
12331
+ const v = typeof _ == "string" ? _ : _.type;
12324
12332
  return v ? i.has(v) : !1;
12325
12333
  });
12326
12334
  }
12327
12335
  function d(w) {
12328
- const k = [], v = Number(w?.minlength), x = Number(w?.maxlength), b = Number(w?.min), S = Number(w?.max);
12329
- !Number.isNaN(v) && Number.isFinite(v) && k.push({ type: "minlength", value: v }), !Number.isNaN(x) && Number.isFinite(x) && k.push({ type: "maxlength", value: x }), !Number.isNaN(b) && Number.isFinite(b) && k.push({ type: "min", value: b }), !Number.isNaN(S) && Number.isFinite(S) && k.push({ type: "max", value: S }), typeof w?.maxField == "string" && w.maxField && k.push({
12336
+ const _ = [], v = Number(w?.minlength), x = Number(w?.maxlength), b = Number(w?.min), S = Number(w?.max);
12337
+ !Number.isNaN(v) && Number.isFinite(v) && _.push({ type: "minlength", value: v }), !Number.isNaN(x) && Number.isFinite(x) && _.push({ type: "maxlength", value: x }), !Number.isNaN(b) && Number.isFinite(b) && _.push({ type: "min", value: b }), !Number.isNaN(S) && Number.isFinite(S) && _.push({ type: "max", value: S }), typeof w?.maxField == "string" && w.maxField && _.push({
12330
12338
  type: "maxField",
12331
12339
  field: w.maxField,
12332
12340
  message: w.maxFieldMessage
12333
12341
  });
12334
- const C = [...k, ...w.rules || []];
12342
+ const C = [..._, ...w.rules || []];
12335
12343
  if (!C.length) return;
12336
12344
  if (!a(w)) {
12337
12345
  delete o.value[w.name];
@@ -12348,29 +12356,29 @@ function ky(e, t, n = !1) {
12348
12356
  G && (E = !0, !D && typeof G == "string" && (D = G));
12349
12357
  }), E && D ? o.value[w.name] = D : delete o.value[w.name];
12350
12358
  }
12351
- const f = (w = l.value, k = !0) => (w.forEach((v) => {
12359
+ const f = (w = l.value, _ = !0) => (w.forEach((v) => {
12352
12360
  d(v), v.schema && f(v.schema, !1);
12353
- }), k && Object.values(o.value).some(Boolean) ? o.value : null);
12361
+ }), _ && Object.values(o.value).some(Boolean) ? o.value : null);
12354
12362
  pe(
12355
12363
  e,
12356
12364
  () => {
12357
- const w = [], k = (v) => {
12365
+ const w = [], _ = (v) => {
12358
12366
  v.forEach((x) => {
12359
- r(x) && w.push(x), x.schema && k(x.schema);
12367
+ r(x) && w.push(x), x.schema && _(x.schema);
12360
12368
  });
12361
12369
  };
12362
- k(l.value), w.forEach(d);
12370
+ _(l.value), w.forEach(d);
12363
12371
  },
12364
12372
  { deep: !0 }
12365
12373
  );
12366
- const _ = h(() => l.value?.filter((w) => w.hidden !== !0 && a(w)));
12374
+ const k = y(() => l.value?.filter((w) => w.hidden !== !0 && a(w)));
12367
12375
  return {
12368
12376
  errors: o,
12369
12377
  validate: f,
12370
12378
  reset: () => {
12371
12379
  e.value = {}, o.value = {};
12372
12380
  },
12373
- visibleSchema: _
12381
+ visibleSchema: k
12374
12382
  };
12375
12383
  }
12376
12384
  const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
@@ -12401,17 +12409,17 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12401
12409
  }),
12402
12410
  emits: /* @__PURE__ */ Re(["handle-submit", "update:modelValue", "value-selected"], ["update:form", "update:modelValue", "update:values"]),
12403
12411
  setup(e, { expose: t, emit: n }) {
12404
- const l = n, o = e, a = h(() => !!o.formId || o.allowIdField), i = ze(e, "form"), r = ze(e, "modelValue"), d = ze(e, "values"), f = h({
12412
+ const l = n, o = e, a = y(() => !!o.formId || o.allowIdField), i = ze(e, "form"), r = ze(e, "modelValue"), d = ze(e, "values"), f = y({
12405
12413
  get: () => d.value ?? r.value,
12406
12414
  set: (X) => {
12407
12415
  r.value = X, d.value = X;
12408
12416
  }
12409
12417
  }), {
12410
- errors: _,
12418
+ errors: k,
12411
12419
  validate: $,
12412
12420
  reset: w,
12413
- visibleSchema: k
12414
- } = ky(f, o.schema, Ho(o, "disabled")), v = V(null), x = V(null), b = V({}), S = h(() => o.navigation), C = h(() => o.navWidth), E = h(() => o.style?.columns), D = Object.freeze({ container: 12, label: 3 }), K = h(() => o.columns ?? E.value ?? D), G = h(() => o.columns != null || E.value != null), F = h(() => G.value ? "horizontal" : o.layout), O = (X) => X?.columns ? "horizontal" : F.value, B = (X) => X?.columns ?? K.value, T = h(() => {
12421
+ visibleSchema: _
12422
+ } = ky(f, o.schema, Ho(o, "disabled")), v = V(null), x = V(null), b = V({}), S = y(() => o.navigation), C = y(() => o.navWidth), E = y(() => o.style?.columns), D = Object.freeze({ container: 12, label: 3 }), K = y(() => o.columns ?? E.value ?? D), G = y(() => o.columns != null || E.value != null), F = y(() => G.value ? "horizontal" : o.layout), O = (X) => X?.columns ? "horizontal" : F.value, B = (X) => X?.columns ?? K.value, T = y(() => {
12415
12423
  const X = {}, Q = (ie) => {
12416
12424
  if (!ie) return;
12417
12425
  (Array.isArray(ie) ? ie.map((j, J) => ({ key: String(J), entry: j })) : typeof ie == "object" ? Object.entries(ie).map(([j, J]) => ({ key: j, entry: J })) : []).forEach(({ key: j, entry: J }) => {
@@ -12432,11 +12440,11 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12432
12440
  t({
12433
12441
  validate: $,
12434
12442
  reset: w,
12435
- errors: _
12443
+ errors: k
12436
12444
  }), at(() => {
12437
12445
  i.value = {
12438
12446
  value: f.value,
12439
- errors: _.value,
12447
+ errors: k.value,
12440
12448
  reset: w,
12441
12449
  validate: $,
12442
12450
  formId: o.formId
@@ -12459,7 +12467,7 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12459
12467
  });
12460
12468
  }
12461
12469
  return pe(
12462
- k,
12470
+ _,
12463
12471
  (X) => {
12464
12472
  ne(X);
12465
12473
  },
@@ -12476,7 +12484,7 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12476
12484
  onSubmit: Te(H, ["prevent"]),
12477
12485
  class: re(["grid grid-cols-12 p-1", F.value === "default" ? "gap-6" : "gap-4"])
12478
12486
  }, [
12479
- (u(!0), m(Me, null, Pe(z(k), (ie, he) => (u(), m("div", {
12487
+ (u(!0), m(Me, null, Pe(z(_), (ie, he) => (u(), m("div", {
12480
12488
  key: ie.name,
12481
12489
  class: re(O(ie) === "horizontal" ? "col-span-12" : `col-span-12 md:col-span-${ie.col || 12}`)
12482
12490
  }, [
@@ -12491,10 +12499,10 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12491
12499
  const J = f.value[ie.name];
12492
12500
  ke(J, j) || (f.value[ie.name] = j);
12493
12501
  },
12494
- error: z(_)[ie.name],
12502
+ error: z(k)[ie.name],
12495
12503
  onValueSelected: fe
12496
12504
  }, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
12497
- O(ie) === "settings" && he + 1 !== z(k).length ? (u(), m("div", $y)) : Y("", !0)
12505
+ O(ie) === "settings" && he + 1 !== z(_).length ? (u(), m("div", $y)) : Y("", !0)
12498
12506
  ], 2))), 128))
12499
12507
  ], 34)
12500
12508
  ], 512),
@@ -12519,7 +12527,7 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12519
12527
  },
12520
12528
  emits: ["close", "save", "edit"],
12521
12529
  setup(e, { emit: t }) {
12522
- const n = e, l = t, o = V(n.schema), a = V(n.defaultValue ? JSON.parse(JSON.stringify(n.defaultValue)) : {}), i = V({}), r = V(n.token || ""), d = V(n.token || ""), f = V(n.mode), _ = () => {
12530
+ const n = e, l = t, o = V(n.schema), a = V(n.defaultValue ? JSON.parse(JSON.stringify(n.defaultValue)) : {}), i = V({}), r = V(n.token || ""), d = V(n.token || ""), f = V(n.mode), k = () => {
12523
12531
  const b = n.method?.trim().toUpperCase();
12524
12532
  return b === "GET" || b === "POST" || b === "PUT" ? b : f.value === "add" ? "POST" : "PUT";
12525
12533
  }, $ = () => {
@@ -12534,7 +12542,7 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12534
12542
  ...a.value,
12535
12543
  ...S
12536
12544
  });
12537
- }, k = async (b) => {
12545
+ }, _ = async (b) => {
12538
12546
  if (console.log(b), b.ok) {
12539
12547
  await b.json().catch(() => ({})), $(), l("save", a.value);
12540
12548
  return;
@@ -12584,7 +12592,7 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12584
12592
  f.value === "add" && a.value && delete a.value.id;
12585
12593
  const S = n.api?.trim();
12586
12594
  if (S) {
12587
- const C = _();
12595
+ const C = k();
12588
12596
  try {
12589
12597
  const E = await fetch(S, {
12590
12598
  method: C,
@@ -12593,7 +12601,7 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12593
12601
  },
12594
12602
  body: C === "GET" ? void 0 : JSON.stringify(a.value)
12595
12603
  });
12596
- await k(E);
12604
+ await _(E);
12597
12605
  } catch (E) {
12598
12606
  Ae({
12599
12607
  type: "error",
@@ -12612,7 +12620,7 @@ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12612
12620
  },
12613
12621
  body: JSON.stringify(a.value)
12614
12622
  });
12615
- await k(C);
12623
+ await _(C);
12616
12624
  } catch (C) {
12617
12625
  Ae({
12618
12626
  type: "error",