@opengis/form 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BABsOLAW.js → index-BIES3-my.js} +4 -4
- package/dist/{index-BIxgijjs.js → index-D9Xz9S5T.js} +663 -650
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +45 -45
- package/dist/src/components/inputs/file-list/vs-input-file-list.vue.d.ts.map +1 -1
- package/dist/src/components/inputs/file-list/vs-widget-file-info.vue.d.ts.map +1 -1
- package/dist/src/components/inputs/file-list/vs-widget-file-item.vue.d.ts.map +1 -1
- package/dist/src/composables/useInputSelectAddOption.d.ts.map +1 -1
- package/dist/{vs-richtext-CMobYafA.js → vs-richtext-CEawSRdP.js} +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as ve, ref as T, onMounted as lt, onBeforeUnmount as _t, createElementBlock as v, openBlock as u, Fragment as Ce, createElementVNode as c, createBlock as ye, renderSlot as dt, createVNode as X, unref as U, Teleport as Pt, createCommentVNode as G, normalizeStyle as Fe, toDisplayString as de, nextTick as Ye, computed as y, inject as Ge, mergeProps as Gt, createTextVNode as nt, normalizeProps as Hl, guardReactiveProps as Wl, onUnmounted as vn, normalizeClass as se, mergeModels as Re, useModel as Ue, withDirectives as Pe, vModelText as at, useAttrs as Yo, vModelCheckbox as Go, resolveDynamicComponent as yt, withCtx as rt, withModifiers as De, watch as me, vModelRadio as Xo, renderList as Ee, reactive as ql, getCurrentInstance as rl, resolveComponent as ft, createSlots as Zo, watchEffect as Kl, vShow as Et, Transition as sl, isRef as nl, defineAsyncComponent as ar, createStaticVNode as Yl, useSlots as rr, provide as fn, withKeys as sr, toRef as ir } from "vue";
|
|
2
2
|
import { Info as on, Check as Jo, Mail as ur, Phone as dr, ChevronRight as cr, ChevronLeft as pr, ChevronDown as gn, ChevronUp as fr, X as $t, Clock3 as mr, CalendarDays as vr, Table as gr, FileCode as yr, FileText as ll, FileArchive as hr, Plus as Dt, Trash2 as Zt, Eye as Gl, Download as il, Upload as Qo, Search as ul, GripVertical as mn, Pencil as br, Circle as wr, MapPin as ea, Ruler as ta, LoaderCircle as ol, Minimize as xr, Maximize as kr, ZoomIn as _r, Copy as $r } from "lucide-vue-next";
|
|
3
|
-
import { notify as
|
|
3
|
+
import { notify as Ae, VsModal as Mn, modal as Sr } from "@opengis/core";
|
|
4
4
|
function Rl(e, t, n) {
|
|
5
5
|
if (!Array.isArray(n) || !n.length) return null;
|
|
6
6
|
const l = String(e?.preset ?? e?.renderer ?? "").trim().toLowerCase();
|
|
@@ -2605,7 +2605,7 @@ const Yi = /* @__PURE__ */ He(Ei, [["render", Ki]]), Wn = ["time", "day", "month
|
|
|
2605
2605
|
overflowY: "auto",
|
|
2606
2606
|
zIndex: "2147483000"
|
|
2607
2607
|
}, P.value && n.value === "day" && (s.value.minWidth = "345px");
|
|
2608
|
-
},
|
|
2608
|
+
}, Ve = (oe, be) => oe.bottom > be.top && oe.top < be.bottom && oe.right > be.left && oe.left < be.right, Ne = (oe) => {
|
|
2609
2609
|
const be = [];
|
|
2610
2610
|
let Le = oe.parentElement;
|
|
2611
2611
|
for (; Le; ) {
|
|
@@ -2616,7 +2616,7 @@ const Yi = /* @__PURE__ */ He(Ei, [["render", Ki]]), Wn = ["time", "day", "month
|
|
|
2616
2616
|
}, st = () => {
|
|
2617
2617
|
if (!o.value) return !1;
|
|
2618
2618
|
const oe = o.value.getBoundingClientRect(), be = new DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
2619
|
-
return
|
|
2619
|
+
return Ve(oe, be) ? Ne(o.value).every((Me) => Ve(oe, Me.getBoundingClientRect())) : !1;
|
|
2620
2620
|
}, je = () => {
|
|
2621
2621
|
if (Y.value) {
|
|
2622
2622
|
if (!st()) {
|
|
@@ -3102,7 +3102,7 @@ const lu = /* @__PURE__ */ He(Xi, [["render", nu]]), ou = /* @__PURE__ */ ve({
|
|
|
3102
3102
|
body: k
|
|
3103
3103
|
}).then((b) => b.json()))?.result;
|
|
3104
3104
|
} catch (n) {
|
|
3105
|
-
return
|
|
3105
|
+
return Ae({
|
|
3106
3106
|
type: "error",
|
|
3107
3107
|
title: "Помилка!",
|
|
3108
3108
|
message: "Сталась помилка під час завантаження файлу",
|
|
@@ -3227,7 +3227,7 @@ const lu = /* @__PURE__ */ He(Xi, [["render", nu]]), ou = /* @__PURE__ */ ve({
|
|
|
3227
3227
|
])
|
|
3228
3228
|
], 8, fu));
|
|
3229
3229
|
}
|
|
3230
|
-
}), Vt = /* @__PURE__ */ He(vu, [["__scopeId", "data-v-b03cac5c"]]), lo = (e) => e ? e.split(",").map((t) => t.trim().toLowerCase()).filter(Boolean).map((t) => t.startsWith(".") ? t.slice(1) : t) : [], oo = (e, t) => !t || e.size <= t * 1024 * 1024 ? !0 : (
|
|
3230
|
+
}), Vt = /* @__PURE__ */ He(vu, [["__scopeId", "data-v-b03cac5c"]]), lo = (e) => e ? e.split(",").map((t) => t.trim().toLowerCase()).filter(Boolean).map((t) => t.startsWith(".") ? t.slice(1) : t) : [], oo = (e, t) => !t || e.size <= t * 1024 * 1024 ? !0 : (Ae({
|
|
3231
3231
|
type: "error",
|
|
3232
3232
|
title: "Помилка!",
|
|
3233
3233
|
message: `Файл "${e.name}" занадто великий. Максимальний розмір: ${t} МБ`,
|
|
@@ -3235,7 +3235,7 @@ const lu = /* @__PURE__ */ He(Xi, [["render", nu]]), ou = /* @__PURE__ */ ve({
|
|
|
3235
3235
|
}), !1), ao = (e, t) => {
|
|
3236
3236
|
if (!t.length) return !0;
|
|
3237
3237
|
const n = e.name.split(".").pop()?.toLowerCase() || "";
|
|
3238
|
-
return t.includes(n) ? !0 : (
|
|
3238
|
+
return t.includes(n) ? !0 : (Ae({
|
|
3239
3239
|
type: "error",
|
|
3240
3240
|
title: "Помилка!",
|
|
3241
3241
|
message: `Неприпустимий формат файлу "${e.name}". Дозволені формати: ${t.map((l) => `.${l}`).join(", ")}`,
|
|
@@ -3256,7 +3256,7 @@ const lu = /* @__PURE__ */ He(Xi, [["render", nu]]), ou = /* @__PURE__ */ ve({
|
|
|
3256
3256
|
return;
|
|
3257
3257
|
}
|
|
3258
3258
|
n[d] = k;
|
|
3259
|
-
}), l.length ? (
|
|
3259
|
+
}), l.length ? (Ae({
|
|
3260
3260
|
type: "warning",
|
|
3261
3261
|
title: "Заповніть поля",
|
|
3262
3262
|
message: `Поля (${l.join(", ")}) необхідні для завантаження файлу`,
|
|
@@ -3290,7 +3290,7 @@ const lu = /* @__PURE__ */ He(Xi, [["render", nu]]), ou = /* @__PURE__ */ ve({
|
|
|
3290
3290
|
emits: /* @__PURE__ */ Re(["change"], ["update:modelValue"]),
|
|
3291
3291
|
setup(e, { emit: t }) {
|
|
3292
3292
|
const n = e, l = Ue(e, "modelValue"), a = t, o = T(null), i = T(!1), s = T([]), d = Ge("values"), f = Ge("map-file-import-uploading", null), k = y(() => ca(l.value, !!n.multiple)), $ = y(() => pa(l.value, !!n.multiple)), b = y(() => lo(n.format)), _ = y(() => da(n.customParams, d)), m = (Y) => {
|
|
3293
|
-
|
|
3293
|
+
Ae({
|
|
3294
3294
|
type: "error",
|
|
3295
3295
|
title: "Помилка завантаження",
|
|
3296
3296
|
message: Y || "Не вдалося завантажити файл. Спробуйте ще раз.",
|
|
@@ -3543,12 +3543,12 @@ const lu = /* @__PURE__ */ He(Xi, [["render", nu]]), ou = /* @__PURE__ */ ve({
|
|
|
3543
3543
|
o.value = "Не вдалося завантажити файл";
|
|
3544
3544
|
return;
|
|
3545
3545
|
}
|
|
3546
|
-
Q.length > 0 ?
|
|
3546
|
+
Q.length > 0 ? Ae({
|
|
3547
3547
|
type: "warning",
|
|
3548
3548
|
title: "Частина файлів не завантажилась",
|
|
3549
3549
|
message: Q.join(", "),
|
|
3550
3550
|
position: "right-bottom"
|
|
3551
|
-
}) :
|
|
3551
|
+
}) : Ae({
|
|
3552
3552
|
type: "success",
|
|
3553
3553
|
title: "Файл завантажено",
|
|
3554
3554
|
message: W.length > 1 ? `Завантажено ${_e.length} файлів` : W[0].name,
|
|
@@ -3740,14 +3740,14 @@ const Lu = { class: "vs-input-file64 flex flex-col gap-2" }, Mu = { class: "flex
|
|
|
3740
3740
|
l.value = [...pe, ...W];
|
|
3741
3741
|
} else
|
|
3742
3742
|
l.value = W[0] || null;
|
|
3743
|
-
|
|
3743
|
+
Ae({
|
|
3744
3744
|
type: "success",
|
|
3745
3745
|
title: "Файл додано",
|
|
3746
3746
|
message: W.length > 1 ? `Додано ${W.length} файлів` : W[0].name,
|
|
3747
3747
|
position: "right-bottom"
|
|
3748
3748
|
});
|
|
3749
3749
|
} catch (W) {
|
|
3750
|
-
console.error(W), s.value = "Помилка при обробці файлу",
|
|
3750
|
+
console.error(W), s.value = "Помилка при обробці файлу", Ae({
|
|
3751
3751
|
type: "error",
|
|
3752
3752
|
title: "Помилка!",
|
|
3753
3753
|
message: "Помилка при обробці файлу",
|
|
@@ -3827,7 +3827,7 @@ const Lu = { class: "vs-input-file64 flex flex-col gap-2" }, Mu = { class: "flex
|
|
|
3827
3827
|
s.value ? (u(), v("p", ju, de(s.value), 1)) : G("", !0)
|
|
3828
3828
|
]));
|
|
3829
3829
|
}
|
|
3830
|
-
}), zu = { class: "flex items-center justify-center h-[30px] w-[30px]" }, Uu = { class: "
|
|
3830
|
+
}), zu = { class: "flex items-center justify-center h-[30px] w-[30px]" }, Uu = { class: "min-w-0 flex-1" }, Hu = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, Wu = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, qu = { class: "px-[5px]" }, Ku = { class: "" }, qn = /* @__PURE__ */ ve({
|
|
3831
3831
|
__name: "vs-widget-file-info",
|
|
3832
3832
|
props: {
|
|
3833
3833
|
item: { default: null }
|
|
@@ -3868,18 +3868,18 @@ const Lu = { class: "vs-input-file64 flex flex-col gap-2" }, Mu = { class: "flex
|
|
|
3868
3868
|
])
|
|
3869
3869
|
], 64));
|
|
3870
3870
|
}
|
|
3871
|
-
}), Yu = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, Gu = {
|
|
3871
|
+
}), Yu = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full min-w-0" }, Gu = {
|
|
3872
3872
|
key: 0,
|
|
3873
|
-
class: "flex w-full gap-x-3 items-center"
|
|
3873
|
+
class: "flex w-full min-w-0 gap-x-3 items-center"
|
|
3874
3874
|
}, Xu = {
|
|
3875
3875
|
key: 1,
|
|
3876
|
-
class: "flex gap-x-3 w-full items-center"
|
|
3876
|
+
class: "flex min-w-0 gap-x-3 w-full items-center"
|
|
3877
3877
|
}, Zu = {
|
|
3878
3878
|
key: 2,
|
|
3879
|
-
class: "flex gap-x-3 w-full items-center"
|
|
3879
|
+
class: "flex min-w-0 gap-x-3 w-full items-center"
|
|
3880
3880
|
}, Ju = ["href"], Qu = {
|
|
3881
3881
|
key: 3,
|
|
3882
|
-
class: "flex gap-x-3 w-full items-center"
|
|
3882
|
+
class: "flex min-w-0 gap-x-3 w-full items-center"
|
|
3883
3883
|
}, ed = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, td = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, nd = { class: "inline-block" }, ld = { class: "inline-block" }, od = { class: "inline-block" }, ad = /* @__PURE__ */ ve({
|
|
3884
3884
|
__name: "vs-widget-file-item",
|
|
3885
3885
|
props: {
|
|
@@ -3929,7 +3929,7 @@ const Lu = { class: "vs-input-file64 flex flex-col gap-2" }, Mu = { class: "flex
|
|
|
3929
3929
|
return ($, b) => (u(), v("div", Yu, [
|
|
3930
3930
|
$.item.ext === "jpg" || $.item.ext === "png" ? (u(), v("div", Gu, [
|
|
3931
3931
|
c("div", {
|
|
3932
|
-
class: "
|
|
3932
|
+
class: "min-w-0 flex-1 cursor-pointer flex gap-x-3 w-full items-center",
|
|
3933
3933
|
onClick: b[0] || (b[0] = (_) => k($.index))
|
|
3934
3934
|
}, [
|
|
3935
3935
|
X(qn, { item: $.item }, null, 8, ["item"])
|
|
@@ -3940,7 +3940,7 @@ const Lu = { class: "vs-input-file64 flex flex-col gap-2" }, Mu = { class: "flex
|
|
|
3940
3940
|
c("a", {
|
|
3941
3941
|
href: `/api/file-preview?id=${$.item.file_id}`,
|
|
3942
3942
|
target: "_blank",
|
|
3943
|
-
class: "flex gap-x-3 w-full items-center"
|
|
3943
|
+
class: "flex min-w-0 gap-x-3 w-full items-center"
|
|
3944
3944
|
}, [
|
|
3945
3945
|
X(qn, { item: $.item }, null, 8, ["item"])
|
|
3946
3946
|
], 8, Ju)
|
|
@@ -3979,12 +3979,12 @@ const Lu = { class: "vs-input-file64 flex flex-col gap-2" }, Mu = { class: "flex
|
|
|
3979
3979
|
])
|
|
3980
3980
|
]));
|
|
3981
3981
|
}
|
|
3982
|
-
}), rd = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700
|
|
3982
|
+
}), rd = { class: "flex flex-col widget-file min-w-0 w-full xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700" }, sd = { class: "flex w-full mb-[12px] items-center gap-x-2" }, id = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, ud = { class1: "ml-auto" }, dd = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, cd = {
|
|
3983
3983
|
key: 0,
|
|
3984
3984
|
class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
|
|
3985
3985
|
}, pd = { class: "relative" }, fd = { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, md = {
|
|
3986
3986
|
key: 1,
|
|
3987
|
-
class: "space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
|
3987
|
+
class: "space-y-3 max-h-[300px] min-w-0 overflow-x-hidden overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
|
3988
3988
|
}, vd = { key: 0 }, gd = /* @__PURE__ */ ve({
|
|
3989
3989
|
__name: "vs-input-file-list",
|
|
3990
3990
|
props: {
|
|
@@ -4019,13 +4019,13 @@ const Lu = { class: "vs-input-file64 flex flex-col gap-2" }, Mu = { class: "flex
|
|
|
4019
4019
|
q.append("file", D);
|
|
4020
4020
|
try {
|
|
4021
4021
|
const Y = `${n.prefix}/widget/file/${a.value}`, O = await fetch(Y, { method: "POST", body: q });
|
|
4022
|
-
return O.ok ? (s("update", "file-list"), D) : (
|
|
4022
|
+
return O.ok ? (s("update", "file-list"), D) : (Ae({
|
|
4023
4023
|
type: O.status >= 400 && O.status < 500 ? "warning" : "error",
|
|
4024
4024
|
title: "Error",
|
|
4025
4025
|
message: `Error code: ${O.status}`
|
|
4026
4026
|
}), null);
|
|
4027
4027
|
} catch (Y) {
|
|
4028
|
-
return
|
|
4028
|
+
return Ae({
|
|
4029
4029
|
type: "error",
|
|
4030
4030
|
title: "Error",
|
|
4031
4031
|
message: Y.message || "Unknown error"
|
|
@@ -4370,6 +4370,10 @@ function Wd(e) {
|
|
|
4370
4370
|
return !l || !a.length || (t[l] = a.join("=")), t;
|
|
4371
4371
|
}, {});
|
|
4372
4372
|
}
|
|
4373
|
+
function qd(e, t) {
|
|
4374
|
+
const n = Array.isArray(e) ? e.find((l) => (l?.name ?? l?.id ?? l?.key) === t) : e?.[t];
|
|
4375
|
+
return !n || typeof n != "object" ? t : n["label:uk"] || n.label || n.ua || n.uk || t;
|
|
4376
|
+
}
|
|
4373
4377
|
const va = ({
|
|
4374
4378
|
props: e,
|
|
4375
4379
|
fetchOptionByValue: t,
|
|
@@ -4386,42 +4390,51 @@ const va = ({
|
|
|
4386
4390
|
addForm: f,
|
|
4387
4391
|
addTitle: k,
|
|
4388
4392
|
addOption: async () => {
|
|
4389
|
-
if (
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
title: "Помилка",
|
|
4411
|
-
type: "error",
|
|
4412
|
-
message: "Обʼєкт створено, але в відповіді відсутній ID."
|
|
4413
|
-
});
|
|
4414
|
-
return;
|
|
4415
|
-
}
|
|
4416
|
-
const P = await t(O);
|
|
4417
|
-
P && (n.value.some((E) => String(E?.id) === String(P.id)) || n.value.push(P)), o ? await o(P, O) : P && (l.value = P, a.value = O), i.value = !1, Ve({ title: "Успіх", message: "Обʼєкт успішно створено." });
|
|
4418
|
-
} catch (h) {
|
|
4419
|
-
Ve({
|
|
4393
|
+
if (!$.value) return;
|
|
4394
|
+
const w = f?.value.validate();
|
|
4395
|
+
if (w) {
|
|
4396
|
+
Ae({
|
|
4397
|
+
title: "Помилка валідації",
|
|
4398
|
+
type: "warning",
|
|
4399
|
+
message: `Перевірте поля: ${Object.keys(w).map((h) => qd(d.value, h)).join(", ")}`
|
|
4400
|
+
});
|
|
4401
|
+
return;
|
|
4402
|
+
}
|
|
4403
|
+
try {
|
|
4404
|
+
const h = {
|
|
4405
|
+
...Wd(e.add?.obj),
|
|
4406
|
+
...s.value
|
|
4407
|
+
}, S = e.add?.api ?? `/api/table/${$.value}`, L = await fetch(S, {
|
|
4408
|
+
method: "POST",
|
|
4409
|
+
headers: { "Content-Type": "application/json" },
|
|
4410
|
+
body: JSON.stringify(h)
|
|
4411
|
+
}), F = await L.json().catch(() => ({})), D = F?.error || F?.message, q = Number(F?.code) >= 400;
|
|
4412
|
+
if (!L.ok || q) {
|
|
4413
|
+
Ae({
|
|
4420
4414
|
title: "Помилка",
|
|
4421
4415
|
type: "error",
|
|
4422
|
-
message:
|
|
4416
|
+
message: D || `Код помилки: ${F?.code || L.status}`
|
|
4423
4417
|
});
|
|
4418
|
+
return;
|
|
4424
4419
|
}
|
|
4420
|
+
const Y = F?.rows?.[0], O = F?.[b.value] ?? F?.id ?? Y?.[b.value] ?? Y?.id;
|
|
4421
|
+
if (!O) {
|
|
4422
|
+
Ae({
|
|
4423
|
+
title: "Помилка",
|
|
4424
|
+
type: "error",
|
|
4425
|
+
message: "Обʼєкт створено, але в відповіді відсутній ID."
|
|
4426
|
+
});
|
|
4427
|
+
return;
|
|
4428
|
+
}
|
|
4429
|
+
const P = await t(O);
|
|
4430
|
+
P && (n.value.some((E) => String(E?.id) === String(P.id)) || n.value.push(P)), o ? await o(P, O) : P && (l.value = P, a.value = O), i.value = !1, Ae({ title: "Успіх", message: "Обʼєкт успішно створено." });
|
|
4431
|
+
} catch (h) {
|
|
4432
|
+
Ae({
|
|
4433
|
+
title: "Помилка",
|
|
4434
|
+
type: "error",
|
|
4435
|
+
message: h?.message || "Не вдалося створити обʼєкт."
|
|
4436
|
+
});
|
|
4437
|
+
}
|
|
4425
4438
|
},
|
|
4426
4439
|
onAddValue: async () => {
|
|
4427
4440
|
if (!e.add) return null;
|
|
@@ -4429,22 +4442,22 @@ const va = ({
|
|
|
4429
4442
|
return d.value = w.schema, s.value = {}, i.value = !0, null;
|
|
4430
4443
|
}
|
|
4431
4444
|
};
|
|
4432
|
-
},
|
|
4445
|
+
}, Kd = ["aria-expanded", "data-focus"], Yd = { class: "vs-input-select__value-area relative flex flex-1 items-center gap-1 py-0.5 pl-1 pr-0 overflow-hidden h-full min-w-0" }, Gd = {
|
|
4433
4446
|
key: 0,
|
|
4434
4447
|
class: "flex flex-nowrap items-center gap-1 overflow-x-auto overflow-y-hidden min-w-0 flex-1 py-0.5"
|
|
4435
|
-
},
|
|
4448
|
+
}, Xd = { class: "flex items-center gap-1 min-w-0" }, Zd = ["title"], Jd = ["innerHTML"], Qd = ["onClick"], ec = { class: "flex-1 min-w-[2px]" }, tc = ["placeholder"], nc = ["title"], lc = ["innerHTML"], oc = {
|
|
4436
4449
|
key: 3,
|
|
4437
4450
|
class: "truncate flex-1 min-w-0"
|
|
4438
|
-
},
|
|
4451
|
+
}, ac = {
|
|
4439
4452
|
key: 2,
|
|
4440
4453
|
class: "flex-1 min-w-[2px]"
|
|
4441
|
-
},
|
|
4454
|
+
}, rc = ["placeholder"], sc = {
|
|
4442
4455
|
key: 3,
|
|
4443
4456
|
class: "flex-1 flex items-center min-h-[30px] py-0.5 pl-2 text-sm truncate text-inherit"
|
|
4444
|
-
},
|
|
4457
|
+
}, ic = { class: "vs-input-select__actions relative z-10 flex items-center shrink-0 bg-white" }, uc = ["disabled"], dc = {
|
|
4445
4458
|
key: 1,
|
|
4446
4459
|
class: "self-stretch w-px bg-[#ccc] my-[1px]"
|
|
4447
|
-
},
|
|
4460
|
+
}, cc = ["disabled", "title"], pc = /* @__PURE__ */ ve({
|
|
4448
4461
|
__name: "vs-select-control",
|
|
4449
4462
|
props: {
|
|
4450
4463
|
disabled: { type: Boolean },
|
|
@@ -4499,13 +4512,13 @@ const va = ({
|
|
|
4499
4512
|
"data-focus": o.isOpen || o.inputFocus ? "true" : "false",
|
|
4500
4513
|
ref: o.setTriggerRef
|
|
4501
4514
|
}, [
|
|
4502
|
-
c("div",
|
|
4503
|
-
o.isMulti ? (u(), v("div",
|
|
4515
|
+
c("div", Yd, [
|
|
4516
|
+
o.isMulti ? (u(), v("div", Gd, [
|
|
4504
4517
|
(u(!0), v(Ce, null, Ee(o.selectedOptions, (s) => (u(), v("div", {
|
|
4505
4518
|
key: s.id,
|
|
4506
4519
|
class: "flex min-w-0 bg-[rgb(230,230,230)] rounded-[2px] m-[2px] box-border max-w-full"
|
|
4507
4520
|
}, [
|
|
4508
|
-
c("div",
|
|
4521
|
+
c("div", Xd, [
|
|
4509
4522
|
o.shouldShowColorDot(s) ? (u(), v("span", {
|
|
4510
4523
|
key: 0,
|
|
4511
4524
|
class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
|
|
@@ -4529,10 +4542,10 @@ const va = ({
|
|
|
4529
4542
|
o.optionTemplate ? (u(), v("div", {
|
|
4530
4543
|
key: 0,
|
|
4531
4544
|
innerHTML: o.renderTemplate(s)
|
|
4532
|
-
}, null, 8,
|
|
4545
|
+
}, null, 8, Jd)) : (u(), v(Ce, { key: 1 }, [
|
|
4533
4546
|
nt(de(s.text), 1)
|
|
4534
4547
|
], 64))
|
|
4535
|
-
], 8,
|
|
4548
|
+
], 8, Zd)
|
|
4536
4549
|
]),
|
|
4537
4550
|
c("div", {
|
|
4538
4551
|
role: "button",
|
|
@@ -4544,9 +4557,9 @@ const va = ({
|
|
|
4544
4557
|
focusable: "false",
|
|
4545
4558
|
class: "inline-block h-4 w-4"
|
|
4546
4559
|
})
|
|
4547
|
-
], 8,
|
|
4560
|
+
], 8, Qd)
|
|
4548
4561
|
]))), 128)),
|
|
4549
|
-
c("div",
|
|
4562
|
+
c("div", ec, [
|
|
4550
4563
|
!o.disabled && o.search ? Pe((u(), v("input", {
|
|
4551
4564
|
key: 0,
|
|
4552
4565
|
ref: o.setInputRef,
|
|
@@ -4566,7 +4579,7 @@ const va = ({
|
|
|
4566
4579
|
(...s) => o.onInputBlur && o.onInputBlur(...s)),
|
|
4567
4580
|
onKeydown: i[3] || (i[3] = //@ts-ignore
|
|
4568
4581
|
(...s) => o.onInputKeydown && o.onInputKeydown(...s))
|
|
4569
|
-
}, null, 40,
|
|
4582
|
+
}, null, 40, tc)), [
|
|
4570
4583
|
[at, a.value]
|
|
4571
4584
|
]) : G("", !0)
|
|
4572
4585
|
])
|
|
@@ -4595,9 +4608,9 @@ const va = ({
|
|
|
4595
4608
|
key: 2,
|
|
4596
4609
|
class: "truncate flex-1 min-w-0",
|
|
4597
4610
|
innerHTML: o.renderTemplate(o.selectedOption)
|
|
4598
|
-
}, null, 8,
|
|
4599
|
-
], 10,
|
|
4600
|
-
!o.isMulti && !o.disabled && o.search ? (u(), v("div",
|
|
4611
|
+
}, null, 8, lc)) : (u(), v("span", oc, de(o.selectedOption?.text), 1))
|
|
4612
|
+
], 10, nc)) : G("", !0),
|
|
4613
|
+
!o.isMulti && !o.disabled && o.search ? (u(), v("div", ac, [
|
|
4601
4614
|
Pe(c("input", {
|
|
4602
4615
|
ref: o.setInputRef,
|
|
4603
4616
|
class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900 hover:cursor-pointer",
|
|
@@ -4616,12 +4629,12 @@ const va = ({
|
|
|
4616
4629
|
(...s) => o.onInputBlur && o.onInputBlur(...s)),
|
|
4617
4630
|
onKeydown: i[7] || (i[7] = //@ts-ignore
|
|
4618
4631
|
(...s) => o.onInputKeydown && o.onInputKeydown(...s))
|
|
4619
|
-
}, null, 40,
|
|
4632
|
+
}, null, 40, rc), [
|
|
4620
4633
|
[at, a.value]
|
|
4621
4634
|
])
|
|
4622
|
-
])) : !o.isMulti && o.disabled && (!o.selectedOptionLabel || a.value !== "") ? (u(), v("div",
|
|
4635
|
+
])) : !o.isMulti && o.disabled && (!o.selectedOptionLabel || a.value !== "") ? (u(), v("div", sc, de(o.placeholder), 1)) : G("", !0)
|
|
4623
4636
|
]),
|
|
4624
|
-
c("div",
|
|
4637
|
+
c("div", ic, [
|
|
4625
4638
|
o.showClear ? (u(), v("button", {
|
|
4626
4639
|
key: 0,
|
|
4627
4640
|
type: "button",
|
|
@@ -4635,8 +4648,8 @@ const va = ({
|
|
|
4635
4648
|
))
|
|
4636
4649
|
}, [
|
|
4637
4650
|
X(U($t), { class: "h-4 w-4" })
|
|
4638
|
-
], 8,
|
|
4639
|
-
o.showClear ? (u(), v("div",
|
|
4651
|
+
], 8, uc)) : G("", !0),
|
|
4652
|
+
o.showClear ? (u(), v("div", dc)) : G("", !0),
|
|
4640
4653
|
c("button", {
|
|
4641
4654
|
type: "button",
|
|
4642
4655
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
@@ -4650,14 +4663,14 @@ const va = ({
|
|
|
4650
4663
|
title: o.isOpen ? "Закрити список" : "Відкрити список"
|
|
4651
4664
|
}, [
|
|
4652
4665
|
X(U(gn), { class: "h-4 w-4" })
|
|
4653
|
-
], 8,
|
|
4666
|
+
], 8, cc)
|
|
4654
4667
|
])
|
|
4655
|
-
], 42,
|
|
4668
|
+
], 42, Kd));
|
|
4656
4669
|
}
|
|
4657
|
-
}),
|
|
4670
|
+
}), fc = ["aria-disabled", "onMousedown"], mc = { class: "leading-[19px]" }, vc = ["innerHTML"], gc = {
|
|
4658
4671
|
key: 1,
|
|
4659
4672
|
class: "px-3 py-2 text-center text-gray-500"
|
|
4660
|
-
},
|
|
4673
|
+
}, yc = /* @__PURE__ */ ve({
|
|
4661
4674
|
__name: "vs-select-dropdown",
|
|
4662
4675
|
props: {
|
|
4663
4676
|
isOpen: { type: Boolean },
|
|
@@ -4721,20 +4734,20 @@ const va = ({
|
|
|
4721
4734
|
focusable: "false"
|
|
4722
4735
|
}))
|
|
4723
4736
|
], 6)) : G("", !0),
|
|
4724
|
-
c("div",
|
|
4737
|
+
c("div", mc, [
|
|
4725
4738
|
t.optionTemplate ? (u(), v("div", {
|
|
4726
4739
|
key: 0,
|
|
4727
4740
|
innerHTML: t.renderTemplate(l)
|
|
4728
|
-
}, null, 8,
|
|
4741
|
+
}, null, 8, vc)) : (u(), v(Ce, { key: 1 }, [
|
|
4729
4742
|
nt(de(l.text), 1)
|
|
4730
4743
|
], 64))
|
|
4731
4744
|
])
|
|
4732
|
-
], 42,
|
|
4745
|
+
], 42, fc))), 128)) : (u(), v("div", gc, " No options "))
|
|
4733
4746
|
], 4)
|
|
4734
4747
|
], 4)) : G("", !0)
|
|
4735
4748
|
]));
|
|
4736
4749
|
}
|
|
4737
|
-
}),
|
|
4750
|
+
}), hc = { class: "flex justify-end items-center gap-x-2 py-3 px-4 border-t border-gray-200 w-full" }, bc = ["onClick"], wc = ["disabled"], xc = "__autoMeta", Ro = "w-[16px] h-[16px] flex items-center justify-center flex-shrink-0 text-current", kc = /* @__PURE__ */ ve({
|
|
4738
4751
|
__name: "vs-input-select",
|
|
4739
4752
|
props: {
|
|
4740
4753
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -4785,10 +4798,10 @@ const va = ({
|
|
|
4785
4798
|
h.value[ae] = H;
|
|
4786
4799
|
}, P = T({}), B = T([]), E = y(() => {
|
|
4787
4800
|
if (!B.value.length) return [];
|
|
4788
|
-
const H =
|
|
4801
|
+
const H = Ve.value, ae = new Map(H.map((A) => [A.id?.toString(), A]));
|
|
4789
4802
|
return B.value.map((A) => ae.get(A?.toString())).filter((A) => !!A);
|
|
4790
4803
|
}), W = y(() => n.placeholder || "Select..."), pe = y(() => $e(m.value)), _e = y(() => o.value ? !1 : a.value ? B.value.length > 0 : s.value !== null && s.value !== void 0 && s.value !== ""), Q = (H) => a.value ? B.value.some((ae) => ae?.toString() === H?.toString()) : s.value?.toString() === H?.toString(), le = y(() => {
|
|
4791
|
-
let H =
|
|
4804
|
+
let H = Ve.value ?? [];
|
|
4792
4805
|
if (!n.data && S.value.trim() !== "") {
|
|
4793
4806
|
const ae = S.value.toLowerCase();
|
|
4794
4807
|
H = H.filter((A) => {
|
|
@@ -4825,7 +4838,7 @@ const va = ({
|
|
|
4825
4838
|
...J.value || {},
|
|
4826
4839
|
[n.name]: {
|
|
4827
4840
|
...ae,
|
|
4828
|
-
[
|
|
4841
|
+
[xc]: H
|
|
4829
4842
|
}
|
|
4830
4843
|
};
|
|
4831
4844
|
}, Te = (H) => {
|
|
@@ -4839,7 +4852,7 @@ const va = ({
|
|
|
4839
4852
|
Ke.length && ie(qe, Ke, ze ?? null) || ae && (ae[qe] = ze ?? null);
|
|
4840
4853
|
});
|
|
4841
4854
|
}, {
|
|
4842
|
-
optionsList:
|
|
4855
|
+
optionsList: Ve,
|
|
4843
4856
|
parentValue: Ne,
|
|
4844
4857
|
fetchOptions: st,
|
|
4845
4858
|
fetchOptionByValue: je,
|
|
@@ -4851,47 +4864,47 @@ const va = ({
|
|
|
4851
4864
|
}), We = (H) => H == null ? "" : String(H), oe = (H) => {
|
|
4852
4865
|
if (a.value) {
|
|
4853
4866
|
if (!B.value.length) {
|
|
4854
|
-
|
|
4867
|
+
Ve.value = H;
|
|
4855
4868
|
return;
|
|
4856
4869
|
}
|
|
4857
4870
|
} else if (!m.value) {
|
|
4858
|
-
|
|
4871
|
+
Ve.value = H;
|
|
4859
4872
|
return;
|
|
4860
4873
|
}
|
|
4861
4874
|
const ae = new Set(H.map((re) => We(re.id)).filter(Boolean));
|
|
4862
4875
|
if (a.value) {
|
|
4863
|
-
const re = new Set(B.value.map((ot) => We(ot)).filter(Boolean)), ze = (
|
|
4876
|
+
const re = new Set(B.value.map((ot) => We(ot)).filter(Boolean)), ze = (Ve.value ?? []).filter((ot) => {
|
|
4864
4877
|
const qe = We(ot.id);
|
|
4865
4878
|
return !qe || !re.has(qe) ? !1 : !ae.has(qe);
|
|
4866
4879
|
});
|
|
4867
|
-
|
|
4880
|
+
Ve.value = [...ze, ...H];
|
|
4868
4881
|
return;
|
|
4869
4882
|
}
|
|
4870
4883
|
const A = We(m.value?.id);
|
|
4871
4884
|
if (A && !ae.has(A)) {
|
|
4872
|
-
|
|
4885
|
+
Ve.value = [m.value, ...H];
|
|
4873
4886
|
return;
|
|
4874
4887
|
}
|
|
4875
|
-
|
|
4888
|
+
Ve.value = H;
|
|
4876
4889
|
}, be = T(0), Le = async (H) => {
|
|
4877
4890
|
const ae = ++be.value, A = await st(H);
|
|
4878
4891
|
return ae !== be.value ? null : A;
|
|
4879
4892
|
}, Me = async () => {
|
|
4880
4893
|
if (n.data) {
|
|
4881
4894
|
const H = await Le(S.value);
|
|
4882
|
-
return H && oe(H),
|
|
4895
|
+
return H && oe(H), Ve.value;
|
|
4883
4896
|
}
|
|
4884
4897
|
return Je();
|
|
4885
4898
|
}, Xe = async (H) => {
|
|
4886
4899
|
if (H == null || H === "") return null;
|
|
4887
|
-
const ae =
|
|
4900
|
+
const ae = Ve.value?.find((A) => A?.id?.toString() === String(H));
|
|
4888
4901
|
return ae || je(H);
|
|
4889
4902
|
}, ct = async (H) => {
|
|
4890
|
-
const ae = new Set(
|
|
4903
|
+
const ae = new Set(Ve.value.map((re) => re.id?.toString())), A = H.filter((re) => !ae.has(re?.toString()));
|
|
4891
4904
|
A.length && await A.reduce(async (re, ze) => {
|
|
4892
4905
|
await re;
|
|
4893
4906
|
const ot = await Xe(ze);
|
|
4894
|
-
ot &&
|
|
4907
|
+
ot && Ve.value.push(ot);
|
|
4895
4908
|
}, Promise.resolve());
|
|
4896
4909
|
}, Qe = () => {
|
|
4897
4910
|
if (!le.value.length) {
|
|
@@ -5036,7 +5049,7 @@ const va = ({
|
|
|
5036
5049
|
sn();
|
|
5037
5050
|
}), lt(async () => {
|
|
5038
5051
|
if (addEventListener("keydown", St), addEventListener("scroll", gt, !0), addEventListener("resize", rn), document.addEventListener("click", Oe, !0), f.value && ne(f.value).addEventListener("scroll", qt, !0), n.options?.length && !n.data)
|
|
5039
|
-
|
|
5052
|
+
Ve.value = [...n.options];
|
|
5040
5053
|
else if (n.data) {
|
|
5041
5054
|
const H = await Le("");
|
|
5042
5055
|
H && oe(H);
|
|
@@ -5056,7 +5069,7 @@ const va = ({
|
|
|
5056
5069
|
} = va({
|
|
5057
5070
|
props: n,
|
|
5058
5071
|
fetchOptionByValue: je,
|
|
5059
|
-
optionsList:
|
|
5072
|
+
optionsList: Ve,
|
|
5060
5073
|
selectedOption: m,
|
|
5061
5074
|
modelValue: s
|
|
5062
5075
|
});
|
|
@@ -5073,12 +5086,12 @@ const va = ({
|
|
|
5073
5086
|
me(S, (H) => {
|
|
5074
5087
|
n.data && gl(H.trim());
|
|
5075
5088
|
}), me(() => n.options, (H) => {
|
|
5076
|
-
!n.data && H?.length && (
|
|
5089
|
+
!n.data && H?.length && (Ve.value = [...H], sn());
|
|
5077
5090
|
}, { immediate: !0 });
|
|
5078
5091
|
const xn = T(!0);
|
|
5079
5092
|
return me(Ne, async () => {
|
|
5080
|
-
if (n.data && (xn.value || (a.value ? (B.value = [], s.value = [], l("change", [])) : (m.value = null, s.value = null, l("change", null))), await Me(), n.auto === 1 && Ne.value &&
|
|
5081
|
-
const H =
|
|
5093
|
+
if (n.data && (xn.value || (a.value ? (B.value = [], s.value = [], l("change", [])) : (m.value = null, s.value = null, l("change", null))), await Me(), n.auto === 1 && Ne.value && Ve.value.length > 0)) {
|
|
5094
|
+
const H = Ve.value[0];
|
|
5082
5095
|
H && x(H, "parent-auto");
|
|
5083
5096
|
}
|
|
5084
5097
|
}), (H, ae) => (u(), v(Ce, null, [
|
|
@@ -5090,12 +5103,12 @@ const va = ({
|
|
|
5090
5103
|
teleport: H.teleport
|
|
5091
5104
|
}, {
|
|
5092
5105
|
footer: rt(({ handleClose: A }) => [
|
|
5093
|
-
c("div",
|
|
5106
|
+
c("div", hc, [
|
|
5094
5107
|
c("button", {
|
|
5095
5108
|
type: "button",
|
|
5096
5109
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 hover:bg-gray-50",
|
|
5097
5110
|
onClick: A
|
|
5098
|
-
}, " Скасувати ", 8,
|
|
5111
|
+
}, " Скасувати ", 8, bc),
|
|
5099
5112
|
c("button", {
|
|
5100
5113
|
type: "button",
|
|
5101
5114
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700",
|
|
@@ -5137,7 +5150,7 @@ const va = ({
|
|
|
5137
5150
|
role: "log",
|
|
5138
5151
|
class: "sr-only"
|
|
5139
5152
|
}, null, -1)),
|
|
5140
|
-
X(
|
|
5153
|
+
X(pc, {
|
|
5141
5154
|
keyWord: S.value,
|
|
5142
5155
|
"onUpdate:keyWord": ae[3] || (ae[3] = (A) => S.value = A),
|
|
5143
5156
|
disabled: o.value,
|
|
@@ -5170,7 +5183,7 @@ const va = ({
|
|
|
5170
5183
|
"on-clear-selected": te,
|
|
5171
5184
|
"on-toggle-select": vt
|
|
5172
5185
|
}, null, 8, ["keyWord", "disabled", "is-open", "input-focus", "is-multi", "selected-options", "selected-ids", "placeholder", "search", "option-template", "selected-option-label", "selected-option", "show-clear"]),
|
|
5173
|
-
X(
|
|
5186
|
+
X(yc, {
|
|
5174
5187
|
"is-open": b.value,
|
|
5175
5188
|
"dropdown-style": P.value,
|
|
5176
5189
|
"filtered-options-list": le.value,
|
|
@@ -5199,14 +5212,14 @@ const va = ({
|
|
|
5199
5212
|
}, [
|
|
5200
5213
|
X(U(Dt), { class: "h-4 w-4" }),
|
|
5201
5214
|
ae[8] || (ae[8] = c("span", null, "Додати", -1))
|
|
5202
|
-
], 8,
|
|
5215
|
+
], 8, wc)) : G("", !0)
|
|
5203
5216
|
], 512)
|
|
5204
5217
|
], 64));
|
|
5205
5218
|
}
|
|
5206
|
-
}), Bo = /* @__PURE__ */ He(
|
|
5219
|
+
}), Bo = /* @__PURE__ */ He(kc, [["__scopeId", "data-v-29653ef8"]]), ro = (e = "") => `${e}${Math.floor(Math.random() * 1e4)}`, _c = ["disabled", "aria-expanded"], $c = { class: "truncate" }, Sc = { class: "py-2 px-4" }, Cc = { class: "block font-medium text-[13px] text-foreground" }, Lc = { class: "truncate" }, Mc = { class: "p-1 border-t border-gray-200" }, Ac = { class: "space-y-0.5 max-h-48 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-none [&::-webkit-scrollbar-track]:bg-scrollbar-track [&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb" }, Vc = ["onClick"], Dc = ["checked"], Tc = { class: "shrink-0 size-3.5 flex justify-center items-center" }, Ic = {
|
|
5207
5220
|
key: 1,
|
|
5208
5221
|
class: "shrink-0 size-2 block mx-auto rounded-full bg-secondary/60"
|
|
5209
|
-
},
|
|
5222
|
+
}, Fc = { class: "truncate" }, Ec = {
|
|
5210
5223
|
key: 0,
|
|
5211
5224
|
class: "px-3 py-2 text-xs text-stone-500"
|
|
5212
5225
|
}, Il = /* @__PURE__ */ ve({
|
|
@@ -5263,14 +5276,14 @@ const va = ({
|
|
|
5263
5276
|
watchParent: !1
|
|
5264
5277
|
}), _e = (ie, ke, Te) => {
|
|
5265
5278
|
if (!i) return !1;
|
|
5266
|
-
const
|
|
5279
|
+
const Ve = i.value?.[ie] ?? {}, Ne = (je, Je, We) => {
|
|
5267
5280
|
if (!Je.length) return je;
|
|
5268
5281
|
const [oe, ...be] = Je, Le = { ...je };
|
|
5269
5282
|
if (!be.length)
|
|
5270
5283
|
return Le[oe] = We, Le;
|
|
5271
5284
|
const Me = typeof je[oe] == "object" && je[oe] !== null ? je[oe] : {};
|
|
5272
5285
|
return Le[oe] = Ne(Me, be, We), Le;
|
|
5273
|
-
}, st = Ne(
|
|
5286
|
+
}, st = Ne(Ve, ke, Te);
|
|
5274
5287
|
return i.value = {
|
|
5275
5288
|
...i.value || {},
|
|
5276
5289
|
[ie]: st
|
|
@@ -5278,19 +5291,19 @@ const va = ({
|
|
|
5278
5291
|
}, Q = (ie) => {
|
|
5279
5292
|
if (!n.set) return;
|
|
5280
5293
|
const ke = o?.value;
|
|
5281
|
-
!ke && !i || Object.entries(n.set).forEach(([Te,
|
|
5294
|
+
!ke && !i || Object.entries(n.set).forEach(([Te, Ve]) => {
|
|
5282
5295
|
if (!Te) return;
|
|
5283
|
-
const Ne = ie ? ie[
|
|
5296
|
+
const Ne = ie ? ie[Ve] : null, st = Te.split(".").map((We) => We.trim()).filter(Boolean);
|
|
5284
5297
|
if (!st.length) return;
|
|
5285
5298
|
const [je, ...Je] = st;
|
|
5286
5299
|
Je.length && _e(je, Je, Ne ?? null) || ke && (ke[je] = Ne ?? null);
|
|
5287
5300
|
});
|
|
5288
5301
|
}, le = (ie) => a.value?.toString?.() === ie?.toString?.(), he = () => {
|
|
5289
5302
|
if (!$.value || typeof window > "u") return;
|
|
5290
|
-
const ie = $.value.getBoundingClientRect(), ke = 8, Te = 8,
|
|
5303
|
+
const ie = $.value.getBoundingClientRect(), ke = 8, Te = 8, Ve = window.innerHeight || document.documentElement.clientHeight, Ne = window.innerWidth || document.documentElement.clientWidth, st = b.value?.offsetHeight || 260, je = Math.max(ie.width, 176), Je = Math.max(Ne - ke * 2, 120), We = Math.min(je, Je);
|
|
5291
5304
|
let oe = ie.left;
|
|
5292
5305
|
oe + We + ke > Ne && (oe = Ne - We - ke), oe = Math.max(oe, ke);
|
|
5293
|
-
const be =
|
|
5306
|
+
const be = Ve - ie.bottom - Te - ke, Le = ie.top - Te - ke, Me = be < Math.min(st, 260) && Le > be, Xe = Math.max(120, Math.min(320, Me ? Le : be));
|
|
5294
5307
|
_.value = {
|
|
5295
5308
|
position: "fixed",
|
|
5296
5309
|
left: `${oe}px`,
|
|
@@ -5370,8 +5383,8 @@ const va = ({
|
|
|
5370
5383
|
]),
|
|
5371
5384
|
onClick: z
|
|
5372
5385
|
}, [
|
|
5373
|
-
c("span",
|
|
5374
|
-
], 10,
|
|
5386
|
+
c("span", $c, de(h.value), 1)
|
|
5387
|
+
], 10, _c),
|
|
5375
5388
|
(u(), ye(Pt, { to: F.value }, [
|
|
5376
5389
|
f.value ? (u(), v("div", {
|
|
5377
5390
|
key: 0,
|
|
@@ -5382,17 +5395,17 @@ const va = ({
|
|
|
5382
5395
|
role: "menu",
|
|
5383
5396
|
"aria-orientation": "vertical"
|
|
5384
5397
|
}, [
|
|
5385
|
-
c("div",
|
|
5386
|
-
c("span",
|
|
5387
|
-
c("span",
|
|
5398
|
+
c("div", Sc, [
|
|
5399
|
+
c("span", Cc, [
|
|
5400
|
+
c("span", Lc, de(w.value), 1)
|
|
5388
5401
|
])
|
|
5389
5402
|
]),
|
|
5390
|
-
c("div",
|
|
5391
|
-
c("div",
|
|
5403
|
+
c("div", Mc, [
|
|
5404
|
+
c("div", Ac, [
|
|
5392
5405
|
(u(!0), v(Ce, null, Ee(U(P), (Te) => (u(), v("label", {
|
|
5393
5406
|
key: Te.id,
|
|
5394
5407
|
class: "py-1.5 px-3 group flex items-center gap-x-3 rounded-lg cursor-pointer text-[13px] text-gray-800 hover:bg-gray-100",
|
|
5395
|
-
onClick: De((
|
|
5408
|
+
onClick: De((Ve) => N(Te), ["prevent"])
|
|
5396
5409
|
}, [
|
|
5397
5410
|
c("input", {
|
|
5398
5411
|
type: "radio",
|
|
@@ -5400,27 +5413,27 @@ const va = ({
|
|
|
5400
5413
|
name: m,
|
|
5401
5414
|
checked: le(Te.id),
|
|
5402
5415
|
tabindex: "-1"
|
|
5403
|
-
}, null, 8,
|
|
5404
|
-
c("span",
|
|
5416
|
+
}, null, 8, Dc),
|
|
5417
|
+
c("span", Tc, [
|
|
5405
5418
|
Y(Te) ? (u(), v("span", {
|
|
5406
5419
|
key: 0,
|
|
5407
5420
|
class: "shrink-0 size-2 block mx-auto rounded-full",
|
|
5408
5421
|
style: Fe({ backgroundColor: Te.color })
|
|
5409
|
-
}, null, 4)) : (u(), v("span",
|
|
5422
|
+
}, null, 4)) : (u(), v("span", Ic))
|
|
5410
5423
|
]),
|
|
5411
|
-
c("span",
|
|
5424
|
+
c("span", Fc, de(q(Te)), 1),
|
|
5412
5425
|
X(U(Jo), {
|
|
5413
5426
|
class: se(["shrink-0 size-3.5 ms-auto transition-opacity", le(Te.id) ? "opacity-100" : "opacity-0"])
|
|
5414
5427
|
}, null, 8, ["class"])
|
|
5415
|
-
], 8,
|
|
5428
|
+
], 8, Vc))), 128))
|
|
5416
5429
|
]),
|
|
5417
|
-
U(P).length ? G("", !0) : (u(), v("p",
|
|
5430
|
+
U(P).length ? G("", !0) : (u(), v("p", Ec, "Немає варіантів"))
|
|
5418
5431
|
])
|
|
5419
5432
|
], 4)) : G("", !0)
|
|
5420
5433
|
], 8, ["to"]))
|
|
5421
5434
|
], 512));
|
|
5422
5435
|
}
|
|
5423
|
-
}),
|
|
5436
|
+
}), Pc = ["placeholder", "disabled"], Oc = /* @__PURE__ */ ve({
|
|
5424
5437
|
__name: "vs-input-textarea",
|
|
5425
5438
|
props: /* @__PURE__ */ Re({
|
|
5426
5439
|
style: { default: () => ({}) },
|
|
@@ -5452,11 +5465,11 @@ const va = ({
|
|
|
5452
5465
|
style: {
|
|
5453
5466
|
border: "1px solid #CFD9E0"
|
|
5454
5467
|
}
|
|
5455
|
-
}, null, 42,
|
|
5468
|
+
}, null, 42, Pc)), [
|
|
5456
5469
|
[at, l.value]
|
|
5457
5470
|
]);
|
|
5458
5471
|
}
|
|
5459
|
-
}),
|
|
5472
|
+
}), Rc = /* @__PURE__ */ ve({
|
|
5460
5473
|
__name: "vs-input-richtext",
|
|
5461
5474
|
props: /* @__PURE__ */ Re({
|
|
5462
5475
|
style: { default: () => ({}) },
|
|
@@ -5476,7 +5489,7 @@ const va = ({
|
|
|
5476
5489
|
}),
|
|
5477
5490
|
emits: ["update:modelValue"],
|
|
5478
5491
|
setup(e) {
|
|
5479
|
-
const t = ar(() => import("./vs-richtext-
|
|
5492
|
+
const t = ar(() => import("./vs-richtext-CEawSRdP.js")), n = e, l = Ue(e, "modelValue"), a = y(() => !!n.disabled), o = y(() => n.placeholder ?? ""), i = y(() => ({
|
|
5480
5493
|
height: n.richtextProps.height || "300px",
|
|
5481
5494
|
format: n.format,
|
|
5482
5495
|
...n.richtextProps
|
|
@@ -5492,42 +5505,42 @@ const va = ({
|
|
|
5492
5505
|
}, i.value), null, 16, ["modelValue", "placeholder"])
|
|
5493
5506
|
], 6));
|
|
5494
5507
|
}
|
|
5495
|
-
}),
|
|
5508
|
+
}), Bc = {}, Nc = {
|
|
5496
5509
|
viewBox: "0 0 178 90",
|
|
5497
5510
|
fill: "none",
|
|
5498
5511
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5499
5512
|
};
|
|
5500
|
-
function
|
|
5501
|
-
return u(), v("svg",
|
|
5513
|
+
function jc(e, t) {
|
|
5514
|
+
return u(), v("svg", Nc, t[0] || (t[0] = [
|
|
5502
5515
|
Yl('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
|
5503
5516
|
]));
|
|
5504
5517
|
}
|
|
5505
|
-
const
|
|
5518
|
+
const zc = /* @__PURE__ */ He(Bc, [["render", jc]]), Uc = { class: "bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden flex flex-col" }, Hc = {
|
|
5506
5519
|
key: 0,
|
|
5507
5520
|
class: "flex flex-col gap-2 !p-4 border-b border-gray-200 md:flex-row md:items-center md:justify-between bg-gray-50"
|
|
5508
|
-
},
|
|
5521
|
+
}, Wc = {
|
|
5509
5522
|
key: 0,
|
|
5510
5523
|
class: "relative flex-1 min-w-0"
|
|
5511
|
-
},
|
|
5524
|
+
}, qc = { class: "flex md:flex-nowrap flex-wrap items-center md:justify-end justify-start gap-2 shrink-0" }, Kc = { class: "w-full overflow-x-auto" }, Yc = { class: "w-full min-w-[640px] table-auto divide-y divide-gray-200" }, Gc = { class: "bg-gray-50" }, Xc = { class: "border-b border-gray-200" }, Zc = { class: "px-4 py-3 text-left text-xs font-semibold text-gray-900 w-12 text-center" }, Jc = ["onClick"], Qc = {
|
|
5512
5525
|
key: 0,
|
|
5513
5526
|
class: "text-gray-400"
|
|
5514
|
-
},
|
|
5527
|
+
}, ep = {
|
|
5515
5528
|
key: 0,
|
|
5516
5529
|
colspan: "100%",
|
|
5517
5530
|
class: "text-center"
|
|
5518
|
-
},
|
|
5531
|
+
}, tp = { class: "w-full" }, np = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, lp = ["data-row-index", "onDragstart", "onDragover", "onDrop"], op = ["onPointerdown"], ap = { class: "flex items-center justify-center" }, rp = ["innerHTML"], sp = {
|
|
5519
5532
|
key: 0,
|
|
5520
5533
|
class: "flex items-center gap-3 text-sm text-gray-700"
|
|
5521
|
-
},
|
|
5534
|
+
}, ip = { key: 0 }, up = ["src"], dp = {
|
|
5522
5535
|
key: 1,
|
|
5523
5536
|
class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
|
|
5524
|
-
},
|
|
5537
|
+
}, cp = {
|
|
5525
5538
|
key: 1,
|
|
5526
5539
|
class: "flex items-center justify-center"
|
|
5527
|
-
},
|
|
5540
|
+
}, pp = ["innerHTML"], fp = {
|
|
5528
5541
|
key: 3,
|
|
5529
5542
|
class: "text-sm font-medium text-gray-900"
|
|
5530
|
-
},
|
|
5543
|
+
}, mp = { class: "px-4 py-3 text-right whitespace-nowrap" }, vp = { class: "flex items-center justify-end gap-2" }, gp = ["onClick"], yp = ["onClick"], hp = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, bp = /* @__PURE__ */ ve({
|
|
5531
5544
|
__name: "vs-input-datatable",
|
|
5532
5545
|
props: /* @__PURE__ */ Re({
|
|
5533
5546
|
actions: {},
|
|
@@ -5688,7 +5701,7 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5688
5701
|
const we = (j) => (j?.format || j?.type || "").toString().toLowerCase(), ie = y(() => (t.colModel?.filter((te) => we(te) !== "slot") ?? []).map((te) => {
|
|
5689
5702
|
const ue = te.key || te.name;
|
|
5690
5703
|
return ue ? { ...te, name: ue, key: ue } : te;
|
|
5691
|
-
})), ke = T({}), Te = T({}),
|
|
5704
|
+
})), ke = T({}), Te = T({}), Ve = (j) => typeof j != "string" ? !1 : !!n[j], Ne = (j, te) => te ? te.split(".").reduce((ue, V) => ue == null ? ue : ue[V.trim()], j) : j, st = (j, te) => typeof j != "string" ? "" : j.replace(/{{\s*([^}]+)\s*}}/g, (ue, V) => {
|
|
5692
5705
|
const x = Ne(te, V.trim());
|
|
5693
5706
|
return x ?? "";
|
|
5694
5707
|
}), je = (j) => {
|
|
@@ -5759,7 +5772,7 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5759
5772
|
function Ze() {
|
|
5760
5773
|
const j = Te.value.validate();
|
|
5761
5774
|
if (j) {
|
|
5762
|
-
|
|
5775
|
+
Ae({ type: "warning", title: "Помилка валідації", message: Object.entries(j).map(([ue, V]) => `${ue}: ${V}`).join(`
|
|
5763
5776
|
`) });
|
|
5764
5777
|
return;
|
|
5765
5778
|
}
|
|
@@ -5772,9 +5785,9 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5772
5785
|
function vt() {
|
|
5773
5786
|
Z.value = !1;
|
|
5774
5787
|
}
|
|
5775
|
-
return (j, te) => (u(), v("div",
|
|
5776
|
-
s.value ? (u(), v("div",
|
|
5777
|
-
o("search") ? (u(), v("div",
|
|
5788
|
+
return (j, te) => (u(), v("div", Uc, [
|
|
5789
|
+
s.value ? (u(), v("div", Hc, [
|
|
5790
|
+
o("search") ? (u(), v("div", Wc, [
|
|
5778
5791
|
X(U(ul), { class: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" }),
|
|
5779
5792
|
Pe(c("input", {
|
|
5780
5793
|
type: "text",
|
|
@@ -5785,7 +5798,7 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5785
5798
|
[at, k.value]
|
|
5786
5799
|
])
|
|
5787
5800
|
])) : G("", !0),
|
|
5788
|
-
c("div",
|
|
5801
|
+
c("div", qc, [
|
|
5789
5802
|
o("import") ? (u(), v("input", {
|
|
5790
5803
|
key: 0,
|
|
5791
5804
|
ref_key: "fileInput",
|
|
@@ -5824,11 +5837,11 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5824
5837
|
])) : G("", !0)
|
|
5825
5838
|
])
|
|
5826
5839
|
])) : G("", !0),
|
|
5827
|
-
c("div",
|
|
5828
|
-
c("table",
|
|
5829
|
-
c("thead",
|
|
5830
|
-
c("tr",
|
|
5831
|
-
c("th",
|
|
5840
|
+
c("div", Kc, [
|
|
5841
|
+
c("table", Yc, [
|
|
5842
|
+
c("thead", Gc, [
|
|
5843
|
+
c("tr", Xc, [
|
|
5844
|
+
c("th", Zc, [
|
|
5832
5845
|
X(U(mn), { class: "mx-auto h-4 w-4 text-gray-400" })
|
|
5833
5846
|
]),
|
|
5834
5847
|
(u(!0), v(Ce, null, Ee(m.value, (ue) => (u(), v("th", {
|
|
@@ -5841,8 +5854,8 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5841
5854
|
class: "flex items-center gap-1 text-xs font-semibold text-gray-700 hover:text-gray-900 transition-colors"
|
|
5842
5855
|
}, [
|
|
5843
5856
|
c("span", null, de(ue.ua || ue.label), 1),
|
|
5844
|
-
$.value === (ue.key || ue.name) ? (u(), v("span",
|
|
5845
|
-
], 8,
|
|
5857
|
+
$.value === (ue.key || ue.name) ? (u(), v("span", Qc, de(b.value === "asc" ? "▲" : "▼"), 1)) : G("", !0)
|
|
5858
|
+
], 8, Jc)
|
|
5846
5859
|
]))), 128)),
|
|
5847
5860
|
te[7] || (te[7] = c("th", { class: "px-4 py-3 text-left text-xs font-semibold text-gray-900 text-center w-[1%] whitespace-nowrap" }, " Дії ", -1))
|
|
5848
5861
|
])
|
|
@@ -5850,10 +5863,10 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5850
5863
|
c("tbody", {
|
|
5851
5864
|
class: se(["divide-y divide-gray-200", { "[&_tr:last-child]:border-0": !h.value }])
|
|
5852
5865
|
}, [
|
|
5853
|
-
_.value.length === 0 ? (u(), v("td",
|
|
5854
|
-
c("div",
|
|
5855
|
-
c("div",
|
|
5856
|
-
X(
|
|
5866
|
+
_.value.length === 0 ? (u(), v("td", ep, [
|
|
5867
|
+
c("div", tp, [
|
|
5868
|
+
c("div", np, [
|
|
5869
|
+
X(zc, { class: "w-48 mx-auto" }),
|
|
5857
5870
|
te[8] || (te[8] = c("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
5858
5871
|
c("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
|
|
5859
5872
|
c("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
@@ -5880,16 +5893,16 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5880
5893
|
onPointerup: Y,
|
|
5881
5894
|
onPointercancel: O
|
|
5882
5895
|
}, [
|
|
5883
|
-
c("div",
|
|
5896
|
+
c("div", ap, [
|
|
5884
5897
|
X(U(mn), { class: "mx-auto h-4 w-4 text-slate-400 dark:text-slate-500" })
|
|
5885
5898
|
])
|
|
5886
|
-
], 40,
|
|
5899
|
+
], 40, op),
|
|
5887
5900
|
(u(!0), v(Ce, null, Ee(m.value, (x) => (u(), v("td", {
|
|
5888
5901
|
key: x.key,
|
|
5889
5902
|
class: "px-4 py-3 align-middle"
|
|
5890
5903
|
}, [
|
|
5891
5904
|
we(x) === "slot" ? (u(), v(Ce, { key: 0 }, [
|
|
5892
|
-
|
|
5905
|
+
Ve(x.slot) ? dt(j.$slots, x.slot, {
|
|
5893
5906
|
key: 0,
|
|
5894
5907
|
row: ue,
|
|
5895
5908
|
value: ue[x.key],
|
|
@@ -5898,20 +5911,20 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5898
5911
|
key: 1,
|
|
5899
5912
|
class: "text-sm text-gray-900",
|
|
5900
5913
|
innerHTML: st(x.slot, ue)
|
|
5901
|
-
}, null, 8,
|
|
5914
|
+
}, null, 8, rp))
|
|
5902
5915
|
], 64)) : (u(), v(Ce, { key: 1 }, [
|
|
5903
|
-
we(x) === "file" ? (u(), v("div",
|
|
5904
|
-
pe(Me(ue, x)) ? (u(), v("div",
|
|
5916
|
+
we(x) === "file" ? (u(), v("div", sp, [
|
|
5917
|
+
pe(Me(ue, x)) ? (u(), v("div", ip, [
|
|
5905
5918
|
c("img", {
|
|
5906
5919
|
src: `/file/resize?filepath=${Me(ue, x)}&format=webp`,
|
|
5907
5920
|
alt: "alt",
|
|
5908
5921
|
width: "45",
|
|
5909
5922
|
class: "rounded-md max-w-[45px] h-[45px] object-cover"
|
|
5910
|
-
}, null, 8,
|
|
5911
|
-
])) : (u(), v("div",
|
|
5923
|
+
}, null, 8, up)
|
|
5924
|
+
])) : (u(), v("div", dp, [
|
|
5912
5925
|
X(U(ll), { class: "h-4 w-4 min-w-4" })
|
|
5913
5926
|
]))
|
|
5914
|
-
])) : we(x) === "color" ? (u(), v("div",
|
|
5927
|
+
])) : we(x) === "color" ? (u(), v("div", cp, [
|
|
5915
5928
|
c("span", {
|
|
5916
5929
|
class: "inline-flex h-6 w-6 rounded border border-gray-200",
|
|
5917
5930
|
style: Fe({ backgroundColor: Me(ue, x) || "#ffffff" })
|
|
@@ -5920,26 +5933,26 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5920
5933
|
key: 2,
|
|
5921
5934
|
class: "text-sm font-medium text-gray-900 datatable-tiptap-editor line-clamp-4",
|
|
5922
5935
|
innerHTML: Me(ue, x)
|
|
5923
|
-
}, null, 8,
|
|
5936
|
+
}, null, 8, pp)) : (u(), v("div", fp, de(Me(ue, x)), 1))
|
|
5924
5937
|
], 64))
|
|
5925
5938
|
]))), 128)),
|
|
5926
|
-
c("td",
|
|
5927
|
-
c("div",
|
|
5939
|
+
c("td", mp, [
|
|
5940
|
+
c("div", vp, [
|
|
5928
5941
|
c("button", {
|
|
5929
5942
|
onClick: (x) => Qe(ue, V),
|
|
5930
5943
|
class: "p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"
|
|
5931
5944
|
}, [
|
|
5932
5945
|
X(U(br), { class: "h-4 w-4" })
|
|
5933
|
-
], 8,
|
|
5946
|
+
], 8, gp),
|
|
5934
5947
|
c("button", {
|
|
5935
5948
|
onClick: (x) => it(V),
|
|
5936
5949
|
class: "p-1.5 text-gray-600 hover:text-red-600 hover:bg-red-50 rounded transition-colors"
|
|
5937
5950
|
}, [
|
|
5938
5951
|
X(U(Zt), { class: "h-4 w-4" })
|
|
5939
|
-
], 8,
|
|
5952
|
+
], 8, yp)
|
|
5940
5953
|
])
|
|
5941
5954
|
])
|
|
5942
|
-
], 42,
|
|
5955
|
+
], 42, lp))), 128))
|
|
5943
5956
|
], 2)
|
|
5944
5957
|
])
|
|
5945
5958
|
]),
|
|
@@ -5959,7 +5972,7 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5959
5972
|
form: Te.value,
|
|
5960
5973
|
"onUpdate:form": te[2] || (te[2] = (ue) => Te.value = ue)
|
|
5961
5974
|
}, null, 8, ["schema", "values", "form"]),
|
|
5962
|
-
c("div",
|
|
5975
|
+
c("div", hp, [
|
|
5963
5976
|
c("button", {
|
|
5964
5977
|
type: "button",
|
|
5965
5978
|
onClick: te[3] || (te[3] = (ue) => Z.value = !1),
|
|
@@ -5976,7 +5989,7 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5976
5989
|
}, 8, ["visible", "title"])
|
|
5977
5990
|
]));
|
|
5978
5991
|
}
|
|
5979
|
-
}),
|
|
5992
|
+
}), wp = /* @__PURE__ */ He(bp, [["__scopeId", "data-v-ef50558b"]]), xp = {}, kp = {
|
|
5980
5993
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5981
5994
|
viewBox: "0 0 24 24",
|
|
5982
5995
|
fill: "none",
|
|
@@ -5986,8 +5999,8 @@ const jc = /* @__PURE__ */ He(Rc, [["render", Nc]]), zc = { class: "bg-white rou
|
|
|
5986
5999
|
"stroke-linejoin": "round",
|
|
5987
6000
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
|
|
5988
6001
|
};
|
|
5989
|
-
function
|
|
5990
|
-
return u(), v("svg",
|
|
6002
|
+
function _p(e, t) {
|
|
6003
|
+
return u(), v("svg", kp, t[0] || (t[0] = [
|
|
5991
6004
|
c("path", {
|
|
5992
6005
|
stroke: "none",
|
|
5993
6006
|
d: "M0 0h24v24H0z",
|
|
@@ -5998,7 +6011,7 @@ function kp(e, t) {
|
|
|
5998
6011
|
c("path", { d: "M7.5 16.5l9 -9" }, null, -1)
|
|
5999
6012
|
]));
|
|
6000
6013
|
}
|
|
6001
|
-
const
|
|
6014
|
+
const $p = /* @__PURE__ */ He(xp, [["render", _p]]), Sp = {}, Cp = {
|
|
6002
6015
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6003
6016
|
viewBox: "0 0 24 24",
|
|
6004
6017
|
fill: "none",
|
|
@@ -6008,12 +6021,12 @@ const _p = /* @__PURE__ */ He(wp, [["render", kp]]), $p = {}, Sp = {
|
|
|
6008
6021
|
"stroke-linejoin": "round",
|
|
6009
6022
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
|
|
6010
6023
|
};
|
|
6011
|
-
function
|
|
6012
|
-
return u(), v("svg",
|
|
6024
|
+
function Lp(e, t) {
|
|
6025
|
+
return u(), v("svg", Cp, t[0] || (t[0] = [
|
|
6013
6026
|
Yl('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
|
|
6014
6027
|
]));
|
|
6015
6028
|
}
|
|
6016
|
-
const
|
|
6029
|
+
const Mp = /* @__PURE__ */ He(Sp, [["render", Lp]]), Ap = {}, Vp = {
|
|
6017
6030
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6018
6031
|
viewBox: "0 0 24 24",
|
|
6019
6032
|
fill: "none",
|
|
@@ -6023,19 +6036,19 @@ const Lp = /* @__PURE__ */ He($p, [["render", Cp]]), Mp = {}, Ap = {
|
|
|
6023
6036
|
"stroke-linejoin": "round",
|
|
6024
6037
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
|
|
6025
6038
|
};
|
|
6026
|
-
function
|
|
6027
|
-
return u(), v("svg",
|
|
6039
|
+
function Dp(e, t) {
|
|
6040
|
+
return u(), v("svg", Vp, t[0] || (t[0] = [
|
|
6028
6041
|
Yl('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
|
|
6029
6042
|
]));
|
|
6030
6043
|
}
|
|
6031
|
-
const
|
|
6032
|
-
function
|
|
6044
|
+
const Tp = /* @__PURE__ */ He(Ap, [["render", Dp]]);
|
|
6045
|
+
function Ip(e, t, n) {
|
|
6033
6046
|
const l = Math.max(0, Math.min(22, Math.floor(n))), a = 2 ** l, o = Math.floor((e + 180) / 360 * a), i = t * Math.PI / 180, s = Math.floor(
|
|
6034
6047
|
(1 - Math.log(Math.tan(i) + 1 / Math.cos(i)) / Math.PI) / 2 * a
|
|
6035
6048
|
);
|
|
6036
6049
|
return { z: l, x: o, y: s };
|
|
6037
6050
|
}
|
|
6038
|
-
function
|
|
6051
|
+
function Fp(e, t) {
|
|
6039
6052
|
if (typeof e != "string" || !e.trim() || !/\{z\}/i.test(e)) return;
|
|
6040
6053
|
const n = {
|
|
6041
6054
|
"{z}": t.z,
|
|
@@ -6058,9 +6071,9 @@ function jo(e, t) {
|
|
|
6058
6071
|
);
|
|
6059
6072
|
return n !== e ? n : void 0;
|
|
6060
6073
|
}
|
|
6061
|
-
function
|
|
6074
|
+
function Ep(e, t) {
|
|
6062
6075
|
if (e?.url) {
|
|
6063
|
-
const n =
|
|
6076
|
+
const n = Fp(e.url, t);
|
|
6064
6077
|
if (n) return n;
|
|
6065
6078
|
const l = jo(e.url, t);
|
|
6066
6079
|
if (l) return l;
|
|
@@ -6070,16 +6083,16 @@ function Fp(e, t) {
|
|
|
6070
6083
|
return n || e.preview;
|
|
6071
6084
|
}
|
|
6072
6085
|
}
|
|
6073
|
-
const
|
|
6086
|
+
const Pp = ["title", "aria-expanded"], Op = ["src"], Rp = { class: "map-layers__header" }, Bp = { class: "map-layers__body" }, Np = {
|
|
6074
6087
|
key: 0,
|
|
6075
6088
|
class: "map-layers__section"
|
|
6076
|
-
},
|
|
6089
|
+
}, jp = { class: "map-layers__grid map-layers__grid--4" }, zp = ["disabled", "title", "onClick"], Up = { class: "map-layers__thumb" }, Hp = ["src"], Wp = { class: "map-layers__option-label" }, qp = {
|
|
6077
6090
|
key: 1,
|
|
6078
6091
|
class: "map-layers__section"
|
|
6079
|
-
},
|
|
6092
|
+
}, Kp = { class: "map-layers__grid map-layers__grid--4" }, Yp = ["title", "onClick"], Gp = { class: "map-layers__thumb" }, Xp = ["src"], Zp = { class: "map-layers__option-label" }, Jp = {
|
|
6080
6093
|
key: 2,
|
|
6081
6094
|
class: "map-layers__section map-layers__section--vector"
|
|
6082
|
-
},
|
|
6095
|
+
}, Qp = { class: "map-layers__vector-list" }, ef = ["checked", "disabled", "onChange"], Kn = 0.8, tf = /* @__PURE__ */ ve({
|
|
6083
6096
|
__name: "map-layers",
|
|
6084
6097
|
props: {
|
|
6085
6098
|
basemaps: {},
|
|
@@ -6101,7 +6114,7 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6101
6114
|
return ce ? Object.fromEntries(
|
|
6102
6115
|
Object.entries(ee).map(([$e, z]) => [
|
|
6103
6116
|
String($e),
|
|
6104
|
-
|
|
6117
|
+
Ep(z, ce) ?? z.preview ?? ""
|
|
6105
6118
|
])
|
|
6106
6119
|
) : {};
|
|
6107
6120
|
}
|
|
@@ -6181,8 +6194,8 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6181
6194
|
src: P.value,
|
|
6182
6195
|
alt: "",
|
|
6183
6196
|
class: "map-layers__trigger-img"
|
|
6184
|
-
}, null, 8,
|
|
6185
|
-
], 8,
|
|
6197
|
+
}, null, 8, Op)) : G("", !0)
|
|
6198
|
+
], 8, Pp),
|
|
6186
6199
|
(u(), ye(Pt, { to: "body" }, [
|
|
6187
6200
|
X(sl, { name: "map-layers-panel" }, {
|
|
6188
6201
|
default: rt(() => [
|
|
@@ -6195,7 +6208,7 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6195
6208
|
role: "dialog",
|
|
6196
6209
|
"aria-label": "Шари карти"
|
|
6197
6210
|
}, [
|
|
6198
|
-
c("header",
|
|
6211
|
+
c("header", Rp, [
|
|
6199
6212
|
ce[0] || (ce[0] = c("h3", { class: "map-layers__title" }, "Шари карти", -1)),
|
|
6200
6213
|
c("button", {
|
|
6201
6214
|
type: "button",
|
|
@@ -6206,10 +6219,10 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6206
6219
|
X(U($t), { class: "map-layers__close-icon" })
|
|
6207
6220
|
])
|
|
6208
6221
|
]),
|
|
6209
|
-
c("div",
|
|
6210
|
-
m.value ? (u(), v("section",
|
|
6222
|
+
c("div", Bp, [
|
|
6223
|
+
m.value ? (u(), v("section", Np, [
|
|
6211
6224
|
ce[1] || (ce[1] = c("h4", { class: "map-layers__section-title" }, "Додаткові шари", -1)),
|
|
6212
|
-
c("div",
|
|
6225
|
+
c("div", jp, [
|
|
6213
6226
|
(u(!0), v(Ce, null, Ee(ee.tileOverlays, ($e, z) => (u(), v("button", {
|
|
6214
6227
|
key: `tile-${z}`,
|
|
6215
6228
|
type: "button",
|
|
@@ -6218,19 +6231,19 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6218
6231
|
title: $e.name || String(z),
|
|
6219
6232
|
onClick: (Z) => Q(String(z))
|
|
6220
6233
|
}, [
|
|
6221
|
-
c("span",
|
|
6234
|
+
c("span", Up, [
|
|
6222
6235
|
c("img", {
|
|
6223
6236
|
src: O(String(z)),
|
|
6224
6237
|
alt: ""
|
|
6225
|
-
}, null, 8,
|
|
6238
|
+
}, null, 8, Hp)
|
|
6226
6239
|
]),
|
|
6227
|
-
c("span",
|
|
6228
|
-
], 10,
|
|
6240
|
+
c("span", Wp, de($e.name || z), 1)
|
|
6241
|
+
], 10, zp))), 128))
|
|
6229
6242
|
])
|
|
6230
6243
|
])) : G("", !0),
|
|
6231
|
-
_.value ? (u(), v("section",
|
|
6244
|
+
_.value ? (u(), v("section", qp, [
|
|
6232
6245
|
ce[2] || (ce[2] = c("h4", { class: "map-layers__section-title" }, "Базові шари", -1)),
|
|
6233
|
-
c("div",
|
|
6246
|
+
c("div", Kp, [
|
|
6234
6247
|
(u(!0), v(Ce, null, Ee(ee.basemaps, ($e, z) => (u(), v("button", {
|
|
6235
6248
|
key: `base-${z}`,
|
|
6236
6249
|
type: "button",
|
|
@@ -6238,19 +6251,19 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6238
6251
|
title: $e.name || String(z),
|
|
6239
6252
|
onClick: (Z) => _e(String(z))
|
|
6240
6253
|
}, [
|
|
6241
|
-
c("span",
|
|
6254
|
+
c("span", Gp, [
|
|
6242
6255
|
c("img", {
|
|
6243
6256
|
src: Y(String(z)),
|
|
6244
6257
|
alt: ""
|
|
6245
|
-
}, null, 8,
|
|
6258
|
+
}, null, 8, Xp)
|
|
6246
6259
|
]),
|
|
6247
|
-
c("span",
|
|
6248
|
-
], 10,
|
|
6260
|
+
c("span", Zp, de($e.name || z), 1)
|
|
6261
|
+
], 10, Yp))), 128))
|
|
6249
6262
|
])
|
|
6250
6263
|
])) : G("", !0),
|
|
6251
|
-
h.value ? (u(), v("section",
|
|
6264
|
+
h.value ? (u(), v("section", Jp, [
|
|
6252
6265
|
ce[3] || (ce[3] = c("h4", { class: "map-layers__section-title" }, "Дані", -1)),
|
|
6253
|
-
c("div",
|
|
6266
|
+
c("div", Qp, [
|
|
6254
6267
|
(u(!0), v(Ce, null, Ee(w.value, ($e) => (u(), v("label", {
|
|
6255
6268
|
key: $e.id,
|
|
6256
6269
|
class: "map-layers__vector-item"
|
|
@@ -6261,7 +6274,7 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6261
6274
|
checked: $e.visible,
|
|
6262
6275
|
disabled: ee.disabled,
|
|
6263
6276
|
onChange: (z) => le($e.id)
|
|
6264
|
-
}, null, 40,
|
|
6277
|
+
}, null, 40, ef),
|
|
6265
6278
|
c("span", null, de($e.label), 1)
|
|
6266
6279
|
]))), 128))
|
|
6267
6280
|
])
|
|
@@ -6274,8 +6287,8 @@ const Ep = ["title", "aria-expanded"], Pp = ["src"], Op = { class: "map-layers__
|
|
|
6274
6287
|
]))
|
|
6275
6288
|
], 2)) : G("", !0);
|
|
6276
6289
|
}
|
|
6277
|
-
}),
|
|
6278
|
-
function
|
|
6290
|
+
}), nf = /* @__PURE__ */ He(tf, [["__scopeId", "data-v-c1206d48"]]), ln = 1e-10, Yn = /([+-]?\d{1,3})\s*[°º˚]\s*(\d{1,2})\s*['’′`]\s*(\d{1,2}(?:\.\d+)?)\s*["”″]\s*([NSEW])/gi, lf = /^[+-]?\d+(?:\.\d+)?$/;
|
|
6291
|
+
function of(e, t, n) {
|
|
6279
6292
|
const l = e.split(/\r?\n/).map((f) => f.trim()).filter(Boolean);
|
|
6280
6293
|
if (l.length < 3)
|
|
6281
6294
|
return {
|
|
@@ -6299,7 +6312,7 @@ function lf(e, t, n) {
|
|
|
6299
6312
|
};
|
|
6300
6313
|
const a = [], o = [];
|
|
6301
6314
|
if (l.forEach((f, k) => {
|
|
6302
|
-
const $ = k + 1, b = t === "decimal" ?
|
|
6315
|
+
const $ = k + 1, b = t === "decimal" ? af(f, $, n) : ya(f, $, n);
|
|
6303
6316
|
if (!b.ok) {
|
|
6304
6317
|
a.push(...b.errors);
|
|
6305
6318
|
return;
|
|
@@ -6312,7 +6325,7 @@ function lf(e, t, n) {
|
|
|
6312
6325
|
o.push(b.point);
|
|
6313
6326
|
}), a.length)
|
|
6314
6327
|
return { ok: !1, errors: a };
|
|
6315
|
-
if (new Set(o.map(
|
|
6328
|
+
if (new Set(o.map(sf)).size < 3)
|
|
6316
6329
|
return {
|
|
6317
6330
|
ok: !1,
|
|
6318
6331
|
errors: [
|
|
@@ -6324,7 +6337,7 @@ function lf(e, t, n) {
|
|
|
6324
6337
|
};
|
|
6325
6338
|
const s = [...o];
|
|
6326
6339
|
let d = !1;
|
|
6327
|
-
return Uo(s[0], s[s.length - 1]) || (s.push(s[0]), d = !0),
|
|
6340
|
+
return Uo(s[0], s[s.length - 1]) || (s.push(s[0]), d = !0), uf(s) ? {
|
|
6328
6341
|
ok: !1,
|
|
6329
6342
|
errors: [
|
|
6330
6343
|
{
|
|
@@ -6338,13 +6351,13 @@ function lf(e, t, n) {
|
|
|
6338
6351
|
wasClosedAutomatically: d
|
|
6339
6352
|
};
|
|
6340
6353
|
}
|
|
6341
|
-
function
|
|
6354
|
+
function af(e, t, n) {
|
|
6342
6355
|
return ga(e, "decimal", n, t);
|
|
6343
6356
|
}
|
|
6344
6357
|
function ga(e, t, n, l = 1) {
|
|
6345
|
-
return t === "decimal" ?
|
|
6358
|
+
return t === "decimal" ? rf(e, l, n) : ya(e, l, n);
|
|
6346
6359
|
}
|
|
6347
|
-
function
|
|
6360
|
+
function rf(e, t, n) {
|
|
6348
6361
|
const l = [];
|
|
6349
6362
|
if (/[A-Za-zА-Яа-яІіЇїЄєҐґ]/.test(e))
|
|
6350
6363
|
return {
|
|
@@ -6362,7 +6375,7 @@ function af(e, t, n) {
|
|
|
6362
6375
|
ok: !1,
|
|
6363
6376
|
errors: [{ line: t, message: "У рядку дозволено лише одну пару координат." }]
|
|
6364
6377
|
};
|
|
6365
|
-
if (!a.every((f) =>
|
|
6378
|
+
if (!a.every((f) => lf.test(f)))
|
|
6366
6379
|
return {
|
|
6367
6380
|
ok: !1,
|
|
6368
6381
|
errors: [{ line: t, message: "Не вдалося розпізнати десяткові координати." }]
|
|
@@ -6435,25 +6448,25 @@ function zo(e, t, n) {
|
|
|
6435
6448
|
const $ = f + a / 60 + o / 3600;
|
|
6436
6449
|
return { ok: !0, value: i === "S" || i === "W" ? -$ : $ };
|
|
6437
6450
|
}
|
|
6438
|
-
function
|
|
6451
|
+
function sf(e) {
|
|
6439
6452
|
return `${e[0].toFixed(12)}:${e[1].toFixed(12)}`;
|
|
6440
6453
|
}
|
|
6441
6454
|
function Uo(e, t) {
|
|
6442
6455
|
return Math.abs(e[0] - t[0]) < ln && Math.abs(e[1] - t[1]) < ln;
|
|
6443
6456
|
}
|
|
6444
|
-
function
|
|
6457
|
+
function uf(e) {
|
|
6445
6458
|
if (e.length < 4) return !1;
|
|
6446
6459
|
for (let t = 0; t < e.length - 1; t += 1) {
|
|
6447
6460
|
const n = e[t], l = e[t + 1];
|
|
6448
6461
|
for (let a = t + 1; a < e.length - 1; a += 1) {
|
|
6449
6462
|
if (Math.abs(t - a) <= 1 || t === 0 && a === e.length - 2) continue;
|
|
6450
6463
|
const o = e[a], i = e[a + 1];
|
|
6451
|
-
if (
|
|
6464
|
+
if (df(n, l, o, i)) return !0;
|
|
6452
6465
|
}
|
|
6453
6466
|
}
|
|
6454
6467
|
return !1;
|
|
6455
6468
|
}
|
|
6456
|
-
function
|
|
6469
|
+
function df(e, t, n, l) {
|
|
6457
6470
|
const a = Gn(e, t, n), o = Gn(e, t, l), i = Gn(n, l, e), s = Gn(n, l, t);
|
|
6458
6471
|
return !!(a !== o && i !== s || a === 0 && Xn(e, n, t) || o === 0 && Xn(e, l, t) || i === 0 && Xn(n, e, l) || s === 0 && Xn(n, t, l));
|
|
6459
6472
|
}
|
|
@@ -6464,16 +6477,16 @@ function Gn(e, t, n) {
|
|
|
6464
6477
|
function Xn(e, t, n) {
|
|
6465
6478
|
return t[0] <= Math.max(e[0], n[0]) + ln && t[0] + ln >= Math.min(e[0], n[0]) && t[1] <= Math.max(e[1], n[1]) + ln && t[1] + ln >= Math.min(e[1], n[1]);
|
|
6466
6479
|
}
|
|
6467
|
-
const
|
|
6480
|
+
const cf = ["title"], pf = {
|
|
6468
6481
|
key: 0,
|
|
6469
6482
|
class: "vs-select__options absolute z-50 mt-1 w-auto min-w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm text-gray-900"
|
|
6470
|
-
},
|
|
6483
|
+
}, ff = ["onClick"], mf = ["placeholder"], vf = { class: "absolute inset-y-0 right-2 flex items-center gap-1" }, gf = { class: "flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-100" }, yf = { class: "text-xs font-semibold uppercase tracking-wide text-gray-500" }, hf = { class: "max-h-[260px] overflow-auto" }, bf = {
|
|
6471
6484
|
key: 0,
|
|
6472
6485
|
class: "divide-y divide-gray-100"
|
|
6473
|
-
},
|
|
6486
|
+
}, wf = ["onClick"], xf = {
|
|
6474
6487
|
key: 1,
|
|
6475
6488
|
class: "px-3 py-3 text-xs text-gray-500"
|
|
6476
|
-
}, Ho = "formMapSearchAddressHistory",
|
|
6489
|
+
}, Ho = "formMapSearchAddressHistory", kf = 12, _f = "https://geo.rv.ua/api-user/dzk.api", $f = "https://nominatim.openstreetmap.org/search", Sf = /* @__PURE__ */ ve({
|
|
6477
6490
|
__name: "map-search",
|
|
6478
6491
|
props: {
|
|
6479
6492
|
config: {}
|
|
@@ -6580,7 +6593,7 @@ const df = ["title"], cf = {
|
|
|
6580
6593
|
});
|
|
6581
6594
|
function z() {
|
|
6582
6595
|
if (!q.value) return;
|
|
6583
|
-
const V = q.value.getBoundingClientRect(), x = D.value?.getBoundingClientRect(), M = x?.width ?? V.width, R = (x?.left ?? V.left) + window.scrollX, ne = V.bottom + window.scrollY +
|
|
6596
|
+
const V = q.value.getBoundingClientRect(), x = D.value?.getBoundingClientRect(), M = x?.width ?? V.width, R = (x?.left ?? V.left) + window.scrollX, ne = V.bottom + window.scrollY + kf;
|
|
6584
6597
|
$e.left = `${R}px`, $e.top = `${ne}px`, $e.width = `${M}px`, $e.display = "block";
|
|
6585
6598
|
}
|
|
6586
6599
|
const Z = () => {
|
|
@@ -6607,7 +6620,7 @@ const df = ["title"], cf = {
|
|
|
6607
6620
|
N(), P.value = !0, pe = window.setTimeout(() => {
|
|
6608
6621
|
Ze(V).catch((x) => {
|
|
6609
6622
|
const M = x?.message || "Помилка пошуку адреси";
|
|
6610
|
-
|
|
6623
|
+
Ae({ type: "error", title: "Пошук адреси", message: M });
|
|
6611
6624
|
});
|
|
6612
6625
|
}, W.value);
|
|
6613
6626
|
});
|
|
@@ -6644,7 +6657,7 @@ const df = ["title"], cf = {
|
|
|
6644
6657
|
}), _t(() => {
|
|
6645
6658
|
window.removeEventListener("click", Te, !0), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z), N();
|
|
6646
6659
|
});
|
|
6647
|
-
function
|
|
6660
|
+
function Ve(V) {
|
|
6648
6661
|
return V === "xy" ? "Координати" : V === "parcel" ? "Кадастр" : V === "nominatim" ? "Адреса" : "Адресний";
|
|
6649
6662
|
}
|
|
6650
6663
|
function Ne(V) {
|
|
@@ -6733,7 +6746,7 @@ const df = ["title"], cf = {
|
|
|
6733
6746
|
}).filter((M) => !!M?.title);
|
|
6734
6747
|
}
|
|
6735
6748
|
function Me(V) {
|
|
6736
|
-
const x = f() ||
|
|
6749
|
+
const x = f() || _f;
|
|
6737
6750
|
if (x.includes(":id"))
|
|
6738
6751
|
return x.replace(":id", encodeURIComponent(V));
|
|
6739
6752
|
if (x.includes(":name"))
|
|
@@ -6766,7 +6779,7 @@ const df = ["title"], cf = {
|
|
|
6766
6779
|
return Le(R);
|
|
6767
6780
|
}
|
|
6768
6781
|
async function Qe(V) {
|
|
6769
|
-
const x = new URL(
|
|
6782
|
+
const x = new URL($f);
|
|
6770
6783
|
x.searchParams.set("format", "geojson"), x.searchParams.set("q", V), x.searchParams.set("addressdetails", "1"), x.searchParams.set("bounded", "1");
|
|
6771
6784
|
const M = s();
|
|
6772
6785
|
M && x.searchParams.set("viewbox", M);
|
|
@@ -6778,7 +6791,7 @@ const df = ["title"], cf = {
|
|
|
6778
6791
|
async function Ze(V) {
|
|
6779
6792
|
if (Y.value = [], N(), w.value === "address") {
|
|
6780
6793
|
if (!d()) {
|
|
6781
|
-
|
|
6794
|
+
Ae({
|
|
6782
6795
|
type: "warning",
|
|
6783
6796
|
title: "Пошук адреси",
|
|
6784
6797
|
message: "Не налаштовано addressSuggest"
|
|
@@ -6787,7 +6800,7 @@ const df = ["title"], cf = {
|
|
|
6787
6800
|
}
|
|
6788
6801
|
const R = await ct(V);
|
|
6789
6802
|
if (!R.length) {
|
|
6790
|
-
|
|
6803
|
+
Ae({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
|
|
6791
6804
|
return;
|
|
6792
6805
|
}
|
|
6793
6806
|
Y.value = R;
|
|
@@ -6795,7 +6808,7 @@ const df = ["title"], cf = {
|
|
|
6795
6808
|
}
|
|
6796
6809
|
const x = await Qe(V);
|
|
6797
6810
|
if (!x.length) {
|
|
6798
|
-
|
|
6811
|
+
Ae({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
|
|
6799
6812
|
return;
|
|
6800
6813
|
}
|
|
6801
6814
|
Y.value = x;
|
|
@@ -6805,7 +6818,7 @@ const df = ["title"], cf = {
|
|
|
6805
6818
|
te(V), ce(V);
|
|
6806
6819
|
return;
|
|
6807
6820
|
}
|
|
6808
|
-
|
|
6821
|
+
Ae({
|
|
6809
6822
|
type: "warning",
|
|
6810
6823
|
title: "Пошук адреси",
|
|
6811
6824
|
message: "Геометрія для обраної адреси відсутня"
|
|
@@ -6836,7 +6849,7 @@ const df = ["title"], cf = {
|
|
|
6836
6849
|
if (w.value === "xy") {
|
|
6837
6850
|
const x = st(V);
|
|
6838
6851
|
if (!x) {
|
|
6839
|
-
|
|
6852
|
+
Ae({
|
|
6840
6853
|
type: "warning",
|
|
6841
6854
|
title: "Пошук координат",
|
|
6842
6855
|
message: "Використайте `lat lon` або DMS у форматі `50°27'00\"N 30°31'24\"E`."
|
|
@@ -6851,13 +6864,13 @@ const df = ["title"], cf = {
|
|
|
6851
6864
|
await Ze(V);
|
|
6852
6865
|
} catch (x) {
|
|
6853
6866
|
const M = x?.message || "Помилка пошуку адреси";
|
|
6854
|
-
|
|
6867
|
+
Ae({ type: "error", title: "Пошук адреси", message: M });
|
|
6855
6868
|
}
|
|
6856
6869
|
return;
|
|
6857
6870
|
}
|
|
6858
6871
|
try {
|
|
6859
6872
|
if (!j(V)) {
|
|
6860
|
-
|
|
6873
|
+
Ae({
|
|
6861
6874
|
type: "warning",
|
|
6862
6875
|
title: "Пошук кадастру",
|
|
6863
6876
|
message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ"
|
|
@@ -6868,18 +6881,18 @@ const df = ["title"], cf = {
|
|
|
6868
6881
|
if (!x.ok) throw new Error(`HTTP ${x.status}`);
|
|
6869
6882
|
const M = await x.json(), R = je(M);
|
|
6870
6883
|
if (!R.length)
|
|
6871
|
-
|
|
6884
|
+
Ae({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
|
|
6872
6885
|
else {
|
|
6873
6886
|
const ne = R.find(We);
|
|
6874
6887
|
if (!ne) {
|
|
6875
|
-
|
|
6888
|
+
Ae({ type: "warning", title: "Пошук", message: "Геометрія ділянки відсутня" });
|
|
6876
6889
|
return;
|
|
6877
6890
|
}
|
|
6878
6891
|
te(ne);
|
|
6879
6892
|
}
|
|
6880
6893
|
} catch (x) {
|
|
6881
6894
|
const M = x?.message || "Помилка пошуку";
|
|
6882
|
-
|
|
6895
|
+
Ae({ type: "error", title: "Пошук", message: M });
|
|
6883
6896
|
}
|
|
6884
6897
|
}
|
|
6885
6898
|
}
|
|
@@ -6907,10 +6920,10 @@ const df = ["title"], cf = {
|
|
|
6907
6920
|
ref_key: "selectedToolLabelRef",
|
|
6908
6921
|
ref: F,
|
|
6909
6922
|
class: "block w-full truncate",
|
|
6910
|
-
title:
|
|
6923
|
+
title: Ve(w.value)
|
|
6911
6924
|
}, [
|
|
6912
|
-
nt(de(
|
|
6913
|
-
], 8,
|
|
6925
|
+
nt(de(Ve(w.value)), 1)
|
|
6926
|
+
], 8, cf)), [
|
|
6914
6927
|
[n, Ne(w.value)]
|
|
6915
6928
|
]),
|
|
6916
6929
|
(u(), v("svg", {
|
|
@@ -6928,15 +6941,15 @@ const df = ["title"], cf = {
|
|
|
6928
6941
|
}, null, -1)
|
|
6929
6942
|
]), 2))
|
|
6930
6943
|
]),
|
|
6931
|
-
S.value ? (u(), v("div",
|
|
6944
|
+
S.value ? (u(), v("div", pf, [
|
|
6932
6945
|
c("ul", null, [
|
|
6933
6946
|
(u(!0), v(Ce, null, Ee(_.value, (M) => Pe((u(), v("li", {
|
|
6934
6947
|
key: M,
|
|
6935
6948
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100 text-gray-900",
|
|
6936
6949
|
onClick: (R) => ie(M, R)
|
|
6937
6950
|
}, [
|
|
6938
|
-
nt(de(
|
|
6939
|
-
], 8,
|
|
6951
|
+
nt(de(Ve(M)), 1)
|
|
6952
|
+
], 8, ff)), [
|
|
6940
6953
|
[n, Ne(M)]
|
|
6941
6954
|
])), 128))
|
|
6942
6955
|
])
|
|
@@ -6960,7 +6973,7 @@ const df = ["title"], cf = {
|
|
|
6960
6973
|
type: "text",
|
|
6961
6974
|
class: se(["vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid py-1.5 pl-3 text-sm", _e.value ? "!pr-14" : "!pr-8"]),
|
|
6962
6975
|
onFocus: vt
|
|
6963
|
-
}, null, 42,
|
|
6976
|
+
}, null, 42, mf)), [
|
|
6964
6977
|
[
|
|
6965
6978
|
at,
|
|
6966
6979
|
h.value,
|
|
@@ -6968,7 +6981,7 @@ const df = ["title"], cf = {
|
|
|
6968
6981
|
{ trim: !0 }
|
|
6969
6982
|
]
|
|
6970
6983
|
]),
|
|
6971
|
-
c("div",
|
|
6984
|
+
c("div", vf, [
|
|
6972
6985
|
_e.value ? (u(), v("button", {
|
|
6973
6986
|
key: 0,
|
|
6974
6987
|
type: "button",
|
|
@@ -7022,8 +7035,8 @@ const df = ["title"], cf = {
|
|
|
7022
7035
|
class: "vs-select__options mt-1 bg-white border border-gray-300 rounded-lg shadow-lg text-sm text-gray-900 z-50",
|
|
7023
7036
|
style: Fe($e)
|
|
7024
7037
|
}, [
|
|
7025
|
-
c("div",
|
|
7026
|
-
c("span",
|
|
7038
|
+
c("div", gf, [
|
|
7039
|
+
c("span", yf, de(le.value), 1),
|
|
7027
7040
|
c("button", {
|
|
7028
7041
|
type: "button",
|
|
7029
7042
|
class: "text-gray-400 hover:text-gray-600",
|
|
@@ -7031,14 +7044,14 @@ const df = ["title"], cf = {
|
|
|
7031
7044
|
onClick: x[2] || (x[2] = (M) => P.value = !1)
|
|
7032
7045
|
}, " ✕ ")
|
|
7033
7046
|
]),
|
|
7034
|
-
c("div",
|
|
7035
|
-
Q.value.length ? (u(), v("ul",
|
|
7047
|
+
c("div", hf, [
|
|
7048
|
+
Q.value.length ? (u(), v("ul", bf, [
|
|
7036
7049
|
(u(!0), v(Ce, null, Ee(Q.value, (M) => (u(), v("li", {
|
|
7037
7050
|
key: M.id,
|
|
7038
7051
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-50",
|
|
7039
7052
|
onClick: (R) => it(M)
|
|
7040
|
-
}, de(M.title), 9,
|
|
7041
|
-
])) : (u(), v("div",
|
|
7053
|
+
}, de(M.title), 9, wf))), 128))
|
|
7054
|
+
])) : (u(), v("div", xf, de(he.value), 1))
|
|
7042
7055
|
])
|
|
7043
7056
|
], 4)
|
|
7044
7057
|
])) : G("", !0)
|
|
@@ -7046,7 +7059,7 @@ const df = ["title"], cf = {
|
|
|
7046
7059
|
], 32)
|
|
7047
7060
|
], 512));
|
|
7048
7061
|
}
|
|
7049
|
-
}),
|
|
7062
|
+
}), Cf = /* @__PURE__ */ He(Sf, [["__scopeId", "data-v-d9026eaa"]]), Lf = { class: "pt-1 border-t border-gray-100" }, Mf = { class: "space-y-1" }, Af = /* @__PURE__ */ ve({
|
|
7050
7063
|
__name: "AddCoordinates",
|
|
7051
7064
|
emits: ["submit", "cancel"],
|
|
7052
7065
|
setup(e, { emit: t }) {
|
|
@@ -7058,9 +7071,9 @@ const df = ["title"], cf = {
|
|
|
7058
7071
|
}, s = () => {
|
|
7059
7072
|
l.value = null, a.value = null, n("cancel");
|
|
7060
7073
|
};
|
|
7061
|
-
return (d, f) => (u(), v("div",
|
|
7074
|
+
return (d, f) => (u(), v("div", Lf, [
|
|
7062
7075
|
f[2] || (f[2] = c("p", { class: "text-xs text-gray-600 mb-1" }, "Додати точку за координатами:", -1)),
|
|
7063
|
-
c("div",
|
|
7076
|
+
c("div", Mf, [
|
|
7064
7077
|
Pe(c("input", {
|
|
7065
7078
|
"onUpdate:modelValue": f[0] || (f[0] = (k) => l.value = k),
|
|
7066
7079
|
type: "number",
|
|
@@ -7104,7 +7117,7 @@ const df = ["title"], cf = {
|
|
|
7104
7117
|
])
|
|
7105
7118
|
]));
|
|
7106
7119
|
}
|
|
7107
|
-
}),
|
|
7120
|
+
}), Vf = /* @__PURE__ */ ve({
|
|
7108
7121
|
__name: "BtnAdd",
|
|
7109
7122
|
emits: ["click"],
|
|
7110
7123
|
setup(e) {
|
|
@@ -7119,7 +7132,7 @@ const df = ["title"], cf = {
|
|
|
7119
7132
|
n[1] || (n[1] = nt(" Додати ", -1))
|
|
7120
7133
|
]));
|
|
7121
7134
|
}
|
|
7122
|
-
}),
|
|
7135
|
+
}), Df = /* @__PURE__ */ ve({
|
|
7123
7136
|
__name: "BtnClear",
|
|
7124
7137
|
emits: ["click"],
|
|
7125
7138
|
setup(e) {
|
|
@@ -7134,7 +7147,7 @@ const df = ["title"], cf = {
|
|
|
7134
7147
|
n[1] || (n[1] = nt(" Очистити ", -1))
|
|
7135
7148
|
]));
|
|
7136
7149
|
}
|
|
7137
|
-
}),
|
|
7150
|
+
}), Tf = /* @__PURE__ */ ve({
|
|
7138
7151
|
__name: "BtnComplete",
|
|
7139
7152
|
emits: ["click"],
|
|
7140
7153
|
setup(e) {
|
|
@@ -7149,23 +7162,23 @@ const df = ["title"], cf = {
|
|
|
7149
7162
|
n[1] || (n[1] = nt("Замкнути ", -1))
|
|
7150
7163
|
]));
|
|
7151
7164
|
}
|
|
7152
|
-
}),
|
|
7165
|
+
}), If = new Intl.NumberFormat("uk-UA", {
|
|
7153
7166
|
minimumFractionDigits: 2,
|
|
7154
7167
|
maximumFractionDigits: 2
|
|
7155
7168
|
});
|
|
7156
7169
|
function nn(e) {
|
|
7157
|
-
return
|
|
7170
|
+
return If.format(e);
|
|
7158
7171
|
}
|
|
7159
7172
|
function ha(e) {
|
|
7160
7173
|
return e >= 1e3 ? `${nn(e / 1e3)} км` : `${nn(e)} м`;
|
|
7161
7174
|
}
|
|
7162
|
-
const
|
|
7175
|
+
const Ff = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5" }, Ef = {
|
|
7163
7176
|
key: 0,
|
|
7164
7177
|
class: "flex-1 flex gap-1"
|
|
7165
|
-
},
|
|
7178
|
+
}, Pf = {
|
|
7166
7179
|
key: 1,
|
|
7167
7180
|
class: "flex-1 font-mono text-gray-700"
|
|
7168
|
-
},
|
|
7181
|
+
}, Of = /* @__PURE__ */ ve({
|
|
7169
7182
|
__name: "DotListItem",
|
|
7170
7183
|
props: {
|
|
7171
7184
|
id: {},
|
|
@@ -7194,13 +7207,13 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7194
7207
|
}, $ = () => {
|
|
7195
7208
|
l("delete", n.id);
|
|
7196
7209
|
};
|
|
7197
|
-
return (b, _) => (u(), v("div",
|
|
7210
|
+
return (b, _) => (u(), v("div", Ff, [
|
|
7198
7211
|
X(U(ea), {
|
|
7199
7212
|
size: 12,
|
|
7200
7213
|
"stroke-width": 2,
|
|
7201
7214
|
class: "text-gray-400 flex-shrink-0"
|
|
7202
7215
|
}),
|
|
7203
|
-
o.value ? (u(), v("div",
|
|
7216
|
+
o.value ? (u(), v("div", Ef, [
|
|
7204
7217
|
Pe(c("input", {
|
|
7205
7218
|
"onUpdate:modelValue": _[0] || (_[0] = (m) => i.value = m),
|
|
7206
7219
|
type: "number",
|
|
@@ -7238,7 +7251,7 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7238
7251
|
type: "button",
|
|
7239
7252
|
onClick: k
|
|
7240
7253
|
}, " ✓ ")
|
|
7241
|
-
])) : (u(), v("span",
|
|
7254
|
+
])) : (u(), v("span", Pf, de(a.value), 1)),
|
|
7242
7255
|
o.value ? G("", !0) : (u(), v("button", {
|
|
7243
7256
|
key: 2,
|
|
7244
7257
|
class: "text-blue-500 hover:text-blue-600 px-0.5",
|
|
@@ -7252,40 +7265,40 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7252
7265
|
}, " ✕ ")
|
|
7253
7266
|
]));
|
|
7254
7267
|
}
|
|
7255
|
-
}),
|
|
7268
|
+
}), Rf = { class: "ruler-control px-3 py-2.5 space-y-2" }, Bf = {
|
|
7256
7269
|
type: "button",
|
|
7257
7270
|
class: "ruler-row w-full flex items-center gap-2 cursor-pointer group text-left"
|
|
7258
|
-
},
|
|
7271
|
+
}, Nf = {
|
|
7259
7272
|
class: /* @__PURE__ */ se([
|
|
7260
7273
|
"flex items-center justify-center w-5 h-5 rounded-full shrink-0 transition-colors pointer-events-none"
|
|
7261
7274
|
]),
|
|
7262
7275
|
title: "Сумарна довжина всіх відрізків",
|
|
7263
7276
|
"aria-hidden": "true"
|
|
7264
|
-
},
|
|
7277
|
+
}, jf = { class: "text-sm font-semibold text-slate-700" }, zf = { class: "ruler-row" }, Uf = {
|
|
7265
7278
|
type: "button",
|
|
7266
7279
|
class: "w-full flex items-center gap-2 cursor-pointer group text-left"
|
|
7267
|
-
},
|
|
7280
|
+
}, Hf = {
|
|
7268
7281
|
class: /* @__PURE__ */ se([
|
|
7269
7282
|
"flex items-center justify-center w-5 h-5 rounded-full shrink-0 transition-colors pointer-events-none"
|
|
7270
7283
|
]),
|
|
7271
7284
|
title: "Площа замкнутого контуру",
|
|
7272
7285
|
"aria-hidden": "true"
|
|
7273
|
-
},
|
|
7286
|
+
}, Wf = { class: "inline-flex rounded-md overflow-hidden border border-gray-200 bg-gray-100" }, qf = ["onClick"], Kf = { class: "flex items-center gap-2 mt-0.5 pl-7" }, Yf = {
|
|
7274
7287
|
key: 0,
|
|
7275
7288
|
class: "text-base font-semibold text-green-600"
|
|
7276
|
-
},
|
|
7289
|
+
}, Gf = {
|
|
7277
7290
|
key: 1,
|
|
7278
7291
|
class: "text-xs text-gray-400"
|
|
7279
|
-
},
|
|
7292
|
+
}, Xf = { class: "ruler-row flex items-center gap-2 cursor-pointer" }, Zf = {
|
|
7280
7293
|
class: /* @__PURE__ */ se([
|
|
7281
7294
|
"flex items-center justify-center w-5 h-5 rounded-full shrink-0 transition-colors pointer-events-none"
|
|
7282
7295
|
]),
|
|
7283
7296
|
title: "Список точок",
|
|
7284
7297
|
"aria-hidden": "true"
|
|
7285
|
-
},
|
|
7298
|
+
}, Jf = { class: "text-xs font-medium text-gray-600 flex-1" }, Qf = {
|
|
7286
7299
|
key: 0,
|
|
7287
7300
|
class: "pt-1.5 border-t border-gray-100 max-h-32 overflow-y-auto space-y-1"
|
|
7288
|
-
},
|
|
7301
|
+
}, em = /* @__PURE__ */ ve({
|
|
7289
7302
|
__name: "ControlPanel",
|
|
7290
7303
|
props: {
|
|
7291
7304
|
points: {},
|
|
@@ -7355,27 +7368,27 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7355
7368
|
() => {
|
|
7356
7369
|
t.points.length === 0 && (n.value = !1);
|
|
7357
7370
|
}
|
|
7358
|
-
), (m, w) => (u(), v("div",
|
|
7359
|
-
c("button",
|
|
7360
|
-
c("span",
|
|
7371
|
+
), (m, w) => (u(), v("div", Rf, [
|
|
7372
|
+
c("button", Bf, [
|
|
7373
|
+
c("span", Nf, [
|
|
7361
7374
|
X(U(on), {
|
|
7362
7375
|
size: 12,
|
|
7363
7376
|
"stroke-width": 2.5
|
|
7364
7377
|
})
|
|
7365
7378
|
]),
|
|
7366
7379
|
w[1] || (w[1] = c("span", { class: "text-xs font-medium text-gray-600 flex-1" }, "Загальна відстань", -1)),
|
|
7367
|
-
c("span",
|
|
7380
|
+
c("span", jf, de(d.value), 1)
|
|
7368
7381
|
]),
|
|
7369
|
-
c("div",
|
|
7370
|
-
c("button",
|
|
7371
|
-
c("span",
|
|
7382
|
+
c("div", zf, [
|
|
7383
|
+
c("button", Uf, [
|
|
7384
|
+
c("span", Hf, [
|
|
7372
7385
|
X(U(on), {
|
|
7373
7386
|
size: 12,
|
|
7374
7387
|
"stroke-width": 2.5
|
|
7375
7388
|
})
|
|
7376
7389
|
]),
|
|
7377
7390
|
w[2] || (w[2] = c("span", { class: "text-xs font-medium text-gray-600 flex-1" }, "Площа", -1)),
|
|
7378
|
-
c("div",
|
|
7391
|
+
c("div", Wf, [
|
|
7379
7392
|
(u(), v(Ce, null, Ee(a, (h, S) => c("button", {
|
|
7380
7393
|
key: h.id,
|
|
7381
7394
|
type: "button",
|
|
@@ -7386,29 +7399,29 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7386
7399
|
l.value === h.id ? "bg-white text-green-600 font-semibold shadow-sm" : "text-gray-600 hover:bg-gray-50"
|
|
7387
7400
|
]),
|
|
7388
7401
|
onClick: De((L) => l.value = h.id, ["stop"])
|
|
7389
|
-
}, de(h.label), 11,
|
|
7402
|
+
}, de(h.label), 11, qf)), 64))
|
|
7390
7403
|
])
|
|
7391
7404
|
]),
|
|
7392
|
-
c("div",
|
|
7393
|
-
$.value ? (u(), v("span",
|
|
7405
|
+
c("div", Kf, [
|
|
7406
|
+
$.value ? (u(), v("span", Yf, de(b.value), 1)) : (u(), v("span", Gf, "—"))
|
|
7394
7407
|
])
|
|
7395
7408
|
]),
|
|
7396
|
-
c("div",
|
|
7397
|
-
c("span",
|
|
7409
|
+
c("div", Xf, [
|
|
7410
|
+
c("span", Zf, [
|
|
7398
7411
|
X(U(on), {
|
|
7399
7412
|
size: 12,
|
|
7400
7413
|
"stroke-width": 2.5
|
|
7401
7414
|
})
|
|
7402
7415
|
]),
|
|
7403
|
-
c("span",
|
|
7416
|
+
c("span", Jf, de(_.value), 1),
|
|
7404
7417
|
c("button", {
|
|
7405
7418
|
type: "button",
|
|
7406
7419
|
class: "text-xs text-blue-500 hover:text-blue-600 font-medium transition-colors",
|
|
7407
7420
|
onClick: De(o, ["stop"])
|
|
7408
7421
|
}, " Координати ")
|
|
7409
7422
|
]),
|
|
7410
|
-
n.value ? (u(), v("div",
|
|
7411
|
-
(u(!0), v(Ce, null, Ee(m.points, (h, S) => (u(), ye(
|
|
7423
|
+
n.value ? (u(), v("div", Qf, [
|
|
7424
|
+
(u(!0), v(Ce, null, Ee(m.points, (h, S) => (u(), ye(Of, {
|
|
7412
7425
|
key: h.id,
|
|
7413
7426
|
id: h.id,
|
|
7414
7427
|
index: S + 1,
|
|
@@ -7419,11 +7432,11 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7419
7432
|
])) : G("", !0)
|
|
7420
7433
|
]));
|
|
7421
7434
|
}
|
|
7422
|
-
}),
|
|
7435
|
+
}), tm = { class: "px-3 py-3 bg-blue-50/50 border-b border-blue-100" }, nm = { class: "flex items-start gap-2" }, lm = /* @__PURE__ */ ve({
|
|
7423
7436
|
__name: "InfoHint",
|
|
7424
7437
|
setup(e) {
|
|
7425
|
-
return (t, n) => (u(), v("div",
|
|
7426
|
-
c("div",
|
|
7438
|
+
return (t, n) => (u(), v("div", tm, [
|
|
7439
|
+
c("div", nm, [
|
|
7427
7440
|
X(U(on), {
|
|
7428
7441
|
size: 16,
|
|
7429
7442
|
"stroke-width": 2,
|
|
@@ -7436,7 +7449,7 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7436
7449
|
])
|
|
7437
7450
|
]));
|
|
7438
7451
|
}
|
|
7439
|
-
}),
|
|
7452
|
+
}), om = { class: "space-y-1.5" }, am = { class: "space-y-1 max-h-40 overflow-y-auto" }, rm = { class: "text-gray-700" }, sm = { class: "font-semibold text-slate-800" }, im = /* @__PURE__ */ ve({
|
|
7440
7453
|
__name: "ToPointList",
|
|
7441
7454
|
props: {
|
|
7442
7455
|
points: {},
|
|
@@ -7470,26 +7483,26 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7470
7483
|
}
|
|
7471
7484
|
return o;
|
|
7472
7485
|
});
|
|
7473
|
-
return (o, i) => (u(), v("div",
|
|
7486
|
+
return (o, i) => (u(), v("div", om, [
|
|
7474
7487
|
i[0] || (i[0] = c("p", { class: "text-xs font-medium text-gray-600 mb-1.5" }, "Відстань між точками:", -1)),
|
|
7475
|
-
c("div",
|
|
7488
|
+
c("div", am, [
|
|
7476
7489
|
(u(!0), v(Ce, null, Ee(a.value, (s, d) => (u(), v("div", {
|
|
7477
7490
|
key: d,
|
|
7478
7491
|
class: "flex items-center justify-between text-xs py-1 px-2 rounded bg-gray-50"
|
|
7479
7492
|
}, [
|
|
7480
|
-
c("span",
|
|
7481
|
-
c("span",
|
|
7493
|
+
c("span", rm, "Точка " + de(s.from) + " → Точка " + de(s.to), 1),
|
|
7494
|
+
c("span", sm, de(s.label), 1)
|
|
7482
7495
|
]))), 128))
|
|
7483
7496
|
])
|
|
7484
7497
|
]));
|
|
7485
7498
|
}
|
|
7486
|
-
}),
|
|
7499
|
+
}), um = { class: "ruler-panel-wrap absolute bottom-12 right-4 z-[1001] animate-slide-up" }, dm = { class: "bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden w-72" }, cm = { class: "bg-gradient-to-r from-blue-400 to-blue-500 px-3 py-2 flex items-center justify-between" }, pm = { class: "flex items-center gap-2" }, fm = { class: "w-6 h-6 bg-white/20 rounded-lg flex items-center justify-center" }, mm = { class: "flex border-b border-gray-200" }, vm = {
|
|
7487
7500
|
key: 1,
|
|
7488
7501
|
class: "px-3 py-2.5"
|
|
7489
|
-
},
|
|
7502
|
+
}, gm = {
|
|
7490
7503
|
key: 1,
|
|
7491
7504
|
class: "text-xs text-gray-500"
|
|
7492
|
-
},
|
|
7505
|
+
}, ym = { class: "px-2.5 py-1.5 bg-gray-50 border-t border-gray-200 space-y-1.5" }, hm = { class: "flex gap-1.5" }, bm = /* @__PURE__ */ ve({
|
|
7493
7506
|
name: "RulerPanel",
|
|
7494
7507
|
__name: "RulerPanel",
|
|
7495
7508
|
emits: [
|
|
@@ -7552,11 +7565,11 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7552
7565
|
return t({
|
|
7553
7566
|
addPoint: w,
|
|
7554
7567
|
clearPoints: L
|
|
7555
|
-
}), (E, W) => (u(), v("div",
|
|
7556
|
-
c("div",
|
|
7557
|
-
c("div",
|
|
7558
|
-
c("div",
|
|
7559
|
-
c("div",
|
|
7568
|
+
}), (E, W) => (u(), v("div", um, [
|
|
7569
|
+
c("div", dm, [
|
|
7570
|
+
c("div", cm, [
|
|
7571
|
+
c("div", pm, [
|
|
7572
|
+
c("div", fm, [
|
|
7560
7573
|
X(U(ta), {
|
|
7561
7574
|
size: 14,
|
|
7562
7575
|
"stroke-width": 2,
|
|
@@ -7577,7 +7590,7 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7577
7590
|
})
|
|
7578
7591
|
])
|
|
7579
7592
|
]),
|
|
7580
|
-
c("div",
|
|
7593
|
+
c("div", mm, [
|
|
7581
7594
|
c("button", {
|
|
7582
7595
|
type: "button",
|
|
7583
7596
|
class: se([
|
|
@@ -7596,37 +7609,37 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7596
7609
|
}, " До точки ", 2)
|
|
7597
7610
|
]),
|
|
7598
7611
|
d.value === "general" ? (u(), v(Ce, { key: 0 }, [
|
|
7599
|
-
o.value ? (u(), ye(
|
|
7612
|
+
o.value ? (u(), ye(em, {
|
|
7600
7613
|
key: 1,
|
|
7601
7614
|
points: a.value,
|
|
7602
7615
|
"is-shape-closed": s.value,
|
|
7603
7616
|
onUpdatePoint: F,
|
|
7604
7617
|
onDeletePoint: D
|
|
7605
|
-
}, null, 8, ["points", "is-shape-closed"])) : (u(), ye(
|
|
7606
|
-
], 64)) : (u(), v("div",
|
|
7607
|
-
o.value ? (u(), ye(
|
|
7618
|
+
}, null, 8, ["points", "is-shape-closed"])) : (u(), ye(lm, { key: 0 }))
|
|
7619
|
+
], 64)) : (u(), v("div", vm, [
|
|
7620
|
+
o.value ? (u(), ye(im, {
|
|
7608
7621
|
key: 0,
|
|
7609
7622
|
points: a.value,
|
|
7610
7623
|
"is-shape-closed": s.value
|
|
7611
|
-
}, null, 8, ["points", "is-shape-closed"])) : (u(), v("p",
|
|
7624
|
+
}, null, 8, ["points", "is-shape-closed"])) : (u(), v("p", gm, "Додайте точки на карті, щоб бачити відстані між ними."))
|
|
7612
7625
|
])),
|
|
7613
|
-
c("div",
|
|
7614
|
-
c("div",
|
|
7615
|
-
i.value ? G("", !0) : (u(), ye(
|
|
7626
|
+
c("div", ym, [
|
|
7627
|
+
c("div", hm, [
|
|
7628
|
+
i.value ? G("", !0) : (u(), ye(Vf, {
|
|
7616
7629
|
key: 0,
|
|
7617
7630
|
onClick: q
|
|
7618
7631
|
})),
|
|
7619
|
-
k.value ? (u(), ye(
|
|
7632
|
+
k.value ? (u(), ye(Tf, {
|
|
7620
7633
|
key: 1,
|
|
7621
7634
|
onClick: P
|
|
7622
7635
|
})) : G("", !0)
|
|
7623
7636
|
]),
|
|
7624
|
-
i.value ? (u(), ye(
|
|
7637
|
+
i.value ? (u(), ye(Af, {
|
|
7625
7638
|
key: 0,
|
|
7626
7639
|
onSubmit: Y,
|
|
7627
7640
|
onCancel: O
|
|
7628
7641
|
})) : G("", !0),
|
|
7629
|
-
o.value ? (u(), ye(
|
|
7642
|
+
o.value ? (u(), ye(Df, {
|
|
7630
7643
|
key: 1,
|
|
7631
7644
|
onClick: L
|
|
7632
7645
|
})) : G("", !0)
|
|
@@ -7634,7 +7647,7 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7634
7647
|
])
|
|
7635
7648
|
]));
|
|
7636
7649
|
}
|
|
7637
|
-
}), kt = "ruler-points", zt = "ruler-line", Ut = "ruler-polygon", Ht = "ruler-segments",
|
|
7650
|
+
}), kt = "ruler-points", zt = "ruler-line", Ut = "ruler-polygon", Ht = "ruler-segments", wm = /* @__PURE__ */ ve({
|
|
7638
7651
|
__name: "RulerLayer",
|
|
7639
7652
|
props: {
|
|
7640
7653
|
map: {},
|
|
@@ -7837,7 +7850,7 @@ const If = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7837
7850
|
}), (m, w) => null;
|
|
7838
7851
|
}
|
|
7839
7852
|
});
|
|
7840
|
-
function
|
|
7853
|
+
function xm(e = {}) {
|
|
7841
7854
|
const t = T(!1), n = T([]), l = T(!1), a = T("general"), o = T(null);
|
|
7842
7855
|
function i() {
|
|
7843
7856
|
t.value ? s() : (t.value = !0, e.onActivate?.());
|
|
@@ -7875,97 +7888,97 @@ function wm(e = {}) {
|
|
|
7875
7888
|
}
|
|
7876
7889
|
const so = "vs-safe-raster", Ln = new ArrayBuffer(0);
|
|
7877
7890
|
let zl = !1;
|
|
7878
|
-
function
|
|
7891
|
+
function km(e) {
|
|
7879
7892
|
const t = `${so}://`;
|
|
7880
7893
|
return typeof e != "string" || !e.startsWith(t) ? e : e.slice(t.length);
|
|
7881
7894
|
}
|
|
7882
|
-
function
|
|
7895
|
+
function _m(e) {
|
|
7883
7896
|
if (!e || e.byteLength < 4) return !1;
|
|
7884
7897
|
const t = new Uint8Array(e);
|
|
7885
7898
|
return t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71 || t[0] === 255 && t[1] === 216 && t[2] === 255 || t[0] === 82 && t[1] === 73 && t[2] === 70 && t[3] === 70 && e.byteLength >= 12 && String.fromCharCode(t[8], t[9], t[10], t[11]) === "WEBP";
|
|
7886
7899
|
}
|
|
7887
|
-
async function
|
|
7900
|
+
async function $m(e, t) {
|
|
7888
7901
|
try {
|
|
7889
7902
|
const n = await fetch(e, { signal: t });
|
|
7890
7903
|
if (!n.ok || n.status === 204) return Ln;
|
|
7891
7904
|
const l = await n.arrayBuffer();
|
|
7892
|
-
return !l.byteLength || !
|
|
7905
|
+
return !l.byteLength || !_m(l) ? Ln : l;
|
|
7893
7906
|
} catch {
|
|
7894
7907
|
return Ln;
|
|
7895
7908
|
}
|
|
7896
7909
|
}
|
|
7897
|
-
function
|
|
7910
|
+
function Sm(e) {
|
|
7898
7911
|
zl || !e?.addProtocol || (zl = !0, e.addProtocol(
|
|
7899
7912
|
so,
|
|
7900
7913
|
(t, n) => {
|
|
7901
|
-
const l =
|
|
7914
|
+
const l = km(String(t?.url ?? ""));
|
|
7902
7915
|
if (!l)
|
|
7903
7916
|
return n(null, { data: Ln }), { cancel: () => {
|
|
7904
7917
|
} };
|
|
7905
7918
|
const a = new AbortController();
|
|
7906
|
-
return
|
|
7919
|
+
return $m(l, a.signal).then((o) => n(null, { data: o })).catch(() => n(null, { data: Ln })), { cancel: () => a.abort() };
|
|
7907
7920
|
}
|
|
7908
7921
|
));
|
|
7909
7922
|
}
|
|
7910
|
-
function
|
|
7923
|
+
function Cm(e) {
|
|
7911
7924
|
const t = typeof e == "string" ? e.trim() : "";
|
|
7912
7925
|
if (!t) return t;
|
|
7913
7926
|
const n = `${so}://`;
|
|
7914
7927
|
return t.startsWith(n) ? t : `${n}${t}`;
|
|
7915
7928
|
}
|
|
7916
|
-
function
|
|
7929
|
+
function Lm(e, t) {
|
|
7917
7930
|
const n = typeof e == "string" ? e.trim() : "";
|
|
7918
|
-
return n ? t && zl ? [
|
|
7931
|
+
return n ? t && zl ? [Cm(n)] : [n] : [];
|
|
7919
7932
|
}
|
|
7920
7933
|
function Fl(e, t, n) {
|
|
7921
7934
|
const l = {
|
|
7922
7935
|
type: "raster",
|
|
7923
|
-
tiles:
|
|
7936
|
+
tiles: Lm(e, !!n?.safe),
|
|
7924
7937
|
tileSize: typeof t?.tileSize == "number" ? t.tileSize : 256
|
|
7925
7938
|
};
|
|
7926
7939
|
return typeof t?.minzoom == "number" && (l.minzoom = t.minzoom), typeof t?.maxzoom == "number" && (l.maxzoom = t.maxzoom), Array.isArray(t?.bounds) && t.bounds.length === 4 && (l.bounds = t.bounds), l;
|
|
7927
7940
|
}
|
|
7928
|
-
function
|
|
7941
|
+
function Mm(e) {
|
|
7929
7942
|
const t = String(e ?? "").toLowerCase();
|
|
7930
7943
|
return t.includes("could not be decoded") || t.includes("source image could not be decoded") || t.includes("unsupported image type");
|
|
7931
7944
|
}
|
|
7932
|
-
const
|
|
7945
|
+
const Am = { class: "vs-map-body" }, Vm = {
|
|
7933
7946
|
key: 0,
|
|
7934
7947
|
class: "absolute top-2 left-2 z-[1000] w-[calc(100%-16px)] sm:w-[320px]"
|
|
7935
|
-
},
|
|
7948
|
+
}, Dm = {
|
|
7936
7949
|
key: 1,
|
|
7937
7950
|
class: "form-geom__panel flex items-center gap-1 mt-1"
|
|
7938
|
-
},
|
|
7951
|
+
}, Tm = { class: "flex items-center gap-1" }, Im = ["disabled"], Fm = {
|
|
7939
7952
|
key: 0,
|
|
7940
7953
|
class: "absolute z-[1600] left-0 top-full mt-1 w-full min-w-[140px] bg-white border border-gray-200 shadow-lg rounded-lg text-sm overflow-hidden"
|
|
7941
|
-
},
|
|
7954
|
+
}, Em = ["disabled"], Pm = {
|
|
7942
7955
|
key: 0,
|
|
7943
7956
|
class: "mb-3 flex items-center gap-2 rounded-md border border-blue-100 bg-blue-50 px-3 py-2 text-sm text-blue-700"
|
|
7944
|
-
},
|
|
7957
|
+
}, Om = { class: "mt-4 flex justify-end gap-2" }, Rm = ["disabled"], Bm = ["disabled"], Nm = { class: "mt-4 flex justify-end gap-2" }, jm = ["disabled"], zm = { class: "vs-map-controls vs-map-controls--tr" }, Um = { class: "vs-map-toolbar" }, Hm = ["disabled"], Wm = ["disabled"], qm = ["disabled"], Km = ["disabled"], Ym = {
|
|
7945
7958
|
key: 1,
|
|
7946
7959
|
class: "vs-map-toolbar__divider"
|
|
7947
|
-
},
|
|
7960
|
+
}, Gm = ["title"], Xm = { class: "bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900" }, Zm = { class: "space-y-0.5" }, Jm = { class: "text-gray-500" }, Qm = { class: "text-gray-900 text-right break-all" }, ev = { class: "absolute left-2 bottom-2 z-[1000]" }, tv = {
|
|
7948
7961
|
key: 0,
|
|
7949
7962
|
class: "vs-map-status"
|
|
7950
|
-
},
|
|
7963
|
+
}, nv = { class: "form-geom__feature vs-map-status__inner" }, lv = { class: "vs-map-status__type" }, ov = { class: "vs-map-status__values" }, av = ["onClick", "disabled"], rv = {
|
|
7951
7964
|
key: 1,
|
|
7952
7965
|
class: "vs-map-status__chip"
|
|
7953
|
-
},
|
|
7966
|
+
}, sv = {
|
|
7954
7967
|
key: 2,
|
|
7955
7968
|
class: "vs-map-status__sep"
|
|
7956
|
-
},
|
|
7969
|
+
}, iv = {
|
|
7957
7970
|
key: 1,
|
|
7958
7971
|
class: "vs-map-status__chip"
|
|
7959
|
-
},
|
|
7972
|
+
}, uv = { class: "vs-map-status__meta" }, dv = { class: "vs-map-status__coords" }, cv = {
|
|
7960
7973
|
key: 0,
|
|
7961
7974
|
class: "vs-map-status__value"
|
|
7962
|
-
},
|
|
7975
|
+
}, pv = {
|
|
7963
7976
|
key: 1,
|
|
7964
7977
|
class: "vs-map-status__value"
|
|
7965
|
-
},
|
|
7978
|
+
}, fv = {
|
|
7966
7979
|
key: 0,
|
|
7967
7980
|
class: "vs-map-status__area"
|
|
7968
|
-
},
|
|
7981
|
+
}, mv = { class: "vs-map-status__value" }, vv = { class: "vs-map-status__actions" }, gv = ["disabled"], yv = ["disabled"], hv = "#2563eb", bv = "#2563eb", wv = "#modal", xv = 11, kv = 15, _v = 0.7, $v = "vs-tile-ov-src-", Sv = "vs-tile-ov-raster-", Zn = "__vs_form_maplibre_loader__", Cv = "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf", Sn = "form-search-geom-source", El = "form-search-geom-layer-fill", Pl = "form-search-geom-layer-line", Jn = "vs-global-bounds-src", pn = "vs-global-bounds-line", Wo = "rasterLayer", Lv = /* @__PURE__ */ ve({
|
|
7969
7982
|
__name: "vs-input-map",
|
|
7970
7983
|
props: {
|
|
7971
7984
|
tools: {},
|
|
@@ -8000,7 +8013,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8000
8013
|
const n = e, l = t, a = Yo(), o = Ge("values", T({})), i = typeof document < "u" && document.querySelector("#modal") ? "#modal" : "body", s = y(() => {
|
|
8001
8014
|
const r = a?.multiple, p = a?.multi, g = (C) => C === "" || C === !0 || C === "true" || C === 1 || C === "1";
|
|
8002
8015
|
return !!n.multi || !!n.multiple || g(p) || g(r);
|
|
8003
|
-
}), d = y(() => !!n.disabled), f = T(!1), k = T(null), $ = T(0), b = T(""), _ = T(null), m = T([]), w = T(null), h = T(null), S =
|
|
8016
|
+
}), d = y(() => !!n.disabled), f = T(!1), k = T(null), $ = T(0), b = T(""), _ = T(null), m = T([]), w = T(null), h = T(null), S = xm({
|
|
8004
8017
|
onActivate() {
|
|
8005
8018
|
if (re)
|
|
8006
8019
|
try {
|
|
@@ -8035,7 +8048,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8035
8048
|
return I || g;
|
|
8036
8049
|
}
|
|
8037
8050
|
function W(r, p) {
|
|
8038
|
-
return typeof r == "string" && r.trim() ? r.trim() : r && typeof r == "object" ? r : typeof p == "string" && p.trim() ? p.trim() :
|
|
8051
|
+
return typeof r == "string" && r.trim() ? r.trim() : r && typeof r == "object" ? r : typeof p == "string" && p.trim() ? p.trim() : wv;
|
|
8039
8052
|
}
|
|
8040
8053
|
function pe(r) {
|
|
8041
8054
|
if (typeof r != "string") return r;
|
|
@@ -8056,13 +8069,13 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8056
8069
|
() => E(
|
|
8057
8070
|
P("polyColor") ? n.polyColor : void 0,
|
|
8058
8071
|
q.polyColor,
|
|
8059
|
-
|
|
8072
|
+
bv
|
|
8060
8073
|
)
|
|
8061
8074
|
), le = y(
|
|
8062
8075
|
() => E(
|
|
8063
8076
|
P("markerColor") ? n.markerColor : void 0,
|
|
8064
8077
|
q.markerColor,
|
|
8065
|
-
|
|
8078
|
+
hv
|
|
8066
8079
|
)
|
|
8067
8080
|
), he = y(
|
|
8068
8081
|
() => W(
|
|
@@ -8110,19 +8123,19 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8110
8123
|
Array.isArray(Z.value) && Z.value.length === 2 ? [...Z.value] : ce
|
|
8111
8124
|
), Te = T(
|
|
8112
8125
|
typeof N.value == "number" ? N.value : $e
|
|
8113
|
-
),
|
|
8126
|
+
), Ve = T(null);
|
|
8114
8127
|
let Ne = null;
|
|
8115
8128
|
function st(r) {
|
|
8116
8129
|
const p = typeof r == "number" && Number.isFinite(r) ? r : Te.value;
|
|
8117
8130
|
return Math.min(
|
|
8118
|
-
|
|
8119
|
-
Math.max(
|
|
8131
|
+
kv,
|
|
8132
|
+
Math.max(xv, Math.round(p))
|
|
8120
8133
|
);
|
|
8121
8134
|
}
|
|
8122
8135
|
function je(r, p, g) {
|
|
8123
8136
|
if (!Number.isFinite(r) || !Number.isFinite(p)) return;
|
|
8124
|
-
const C =
|
|
8125
|
-
I && I.z === C.z && I.x === C.x && I.y === C.y || (
|
|
8137
|
+
const C = Ip(r, p, st(g)), I = Ve.value;
|
|
8138
|
+
I && I.z === C.z && I.x === C.x && I.y === C.y || (Ve.value = C);
|
|
8126
8139
|
}
|
|
8127
8140
|
function Je() {
|
|
8128
8141
|
if (A) {
|
|
@@ -8327,10 +8340,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8327
8340
|
}))
|
|
8328
8341
|
);
|
|
8329
8342
|
function bn(r) {
|
|
8330
|
-
return `${
|
|
8343
|
+
return `${$v}${r}`;
|
|
8331
8344
|
}
|
|
8332
8345
|
function wn(r) {
|
|
8333
|
-
return `${
|
|
8346
|
+
return `${Sv}${r}`;
|
|
8334
8347
|
}
|
|
8335
8348
|
async function gl() {
|
|
8336
8349
|
if (typeof window > "u") return null;
|
|
@@ -8352,7 +8365,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8352
8365
|
const K = window.maplibregl, fe = window.MapboxDraw;
|
|
8353
8366
|
if (!K) throw new Error("maplibregl not available after load");
|
|
8354
8367
|
if (!fe) throw new Error("MapboxDraw not available after load");
|
|
8355
|
-
return
|
|
8368
|
+
return Sm(K), { maplibregl: K, MapboxDraw: fe };
|
|
8356
8369
|
})().catch((K) => {
|
|
8357
8370
|
throw delete r[Zn], K;
|
|
8358
8371
|
});
|
|
@@ -8361,7 +8374,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8361
8374
|
function xn(r) {
|
|
8362
8375
|
return {
|
|
8363
8376
|
version: 8,
|
|
8364
|
-
glyphs:
|
|
8377
|
+
glyphs: Cv,
|
|
8365
8378
|
sources: {
|
|
8366
8379
|
rasterSource: Fl(r, void 0, { safe: !1 })
|
|
8367
8380
|
},
|
|
@@ -8925,7 +8938,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
8925
8938
|
g,
|
|
8926
8939
|
Fl(p.url, p, { safe: !0 })
|
|
8927
8940
|
);
|
|
8928
|
-
const I = p?.opacity ?? p?.style?.opacity, K = typeof I == "number" ? I :
|
|
8941
|
+
const I = p?.opacity ?? p?.style?.opacity, K = typeof I == "number" ? I : _v;
|
|
8929
8942
|
A.addLayer({
|
|
8930
8943
|
id: C,
|
|
8931
8944
|
type: "raster",
|
|
@@ -9423,7 +9436,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9423
9436
|
if (d.value || !re || Qe.value) return;
|
|
9424
9437
|
const r = Za(j.value.file);
|
|
9425
9438
|
if (!r) {
|
|
9426
|
-
|
|
9439
|
+
Ae({
|
|
9427
9440
|
type: "warning",
|
|
9428
9441
|
title: "Імпорт геометрії",
|
|
9429
9442
|
message: "Оберіть файл для імпорту."
|
|
@@ -9446,20 +9459,20 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9446
9459
|
throw new Error(g?.message || g?.error || `Код помилки: ${p.status}`);
|
|
9447
9460
|
const C = Ja(g);
|
|
9448
9461
|
if (!C) {
|
|
9449
|
-
|
|
9462
|
+
Ae({
|
|
9450
9463
|
type: "warning",
|
|
9451
9464
|
title: "Імпорт геометрії",
|
|
9452
9465
|
message: "Файл не містить коректні геодані."
|
|
9453
9466
|
});
|
|
9454
9467
|
return;
|
|
9455
9468
|
}
|
|
9456
|
-
Nn(C), Kt(), ct.value = !1,
|
|
9469
|
+
Nn(C), Kt(), ct.value = !1, Ae({
|
|
9457
9470
|
type: "success",
|
|
9458
9471
|
title: "Успіх",
|
|
9459
9472
|
message: "Геометрію успішно імпортовано."
|
|
9460
9473
|
});
|
|
9461
9474
|
} catch (p) {
|
|
9462
|
-
|
|
9475
|
+
Ae({
|
|
9463
9476
|
type: "error",
|
|
9464
9477
|
title: "Помилка",
|
|
9465
9478
|
message: p?.message || "Помилка імпорту файла геометрії"
|
|
@@ -9476,7 +9489,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9476
9489
|
}
|
|
9477
9490
|
function nr() {
|
|
9478
9491
|
if (d.value || !re) return;
|
|
9479
|
-
const r =
|
|
9492
|
+
const r = of(
|
|
9480
9493
|
V.value.coordinates ?? "",
|
|
9481
9494
|
V.value.format || "decimal",
|
|
9482
9495
|
V.value.order || "lat-lon"
|
|
@@ -9488,7 +9501,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9488
9501
|
vt.value = [], Nn({
|
|
9489
9502
|
type: "Polygon",
|
|
9490
9503
|
coordinates: [r.ring]
|
|
9491
|
-
}), Kt(), Xe.value = !1, r.wasClosedAutomatically &&
|
|
9504
|
+
}), Kt(), Xe.value = !1, r.wasClosedAutomatically && Ae({
|
|
9492
9505
|
type: "info",
|
|
9493
9506
|
title: "Імпорт координат",
|
|
9494
9507
|
message: "Полігон був автоматично замкнений (перша і остання точки різнилися)."
|
|
@@ -9499,12 +9512,12 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9499
9512
|
const p = 5;
|
|
9500
9513
|
r.slice(0, p).forEach((g) => {
|
|
9501
9514
|
const C = g.line > 0 ? `Рядок ${g.line}` : "Загальна помилка";
|
|
9502
|
-
|
|
9515
|
+
Ae({
|
|
9503
9516
|
type: "warning",
|
|
9504
9517
|
title: "Імпорт координат",
|
|
9505
9518
|
message: `${C} — ${g.message}`
|
|
9506
9519
|
});
|
|
9507
|
-
}), r.length > p &&
|
|
9520
|
+
}), r.length > p && Ae({
|
|
9508
9521
|
type: "warning",
|
|
9509
9522
|
title: "Імпорт координат",
|
|
9510
9523
|
message: `Ще помилок: ${r.length - p}`
|
|
@@ -9528,7 +9541,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9528
9541
|
attributionControl: !1
|
|
9529
9542
|
}), w.value = A, A.addControl(new H.NavigationControl({ showCompass: !0 }), "bottom-right"), A.on("error", (g) => {
|
|
9530
9543
|
const C = g?.error?.message ?? g?.message ?? "";
|
|
9531
|
-
|
|
9544
|
+
Mm(C);
|
|
9532
9545
|
}), A.on("load", () => {
|
|
9533
9546
|
if (!(!ae || !A)) {
|
|
9534
9547
|
if (re = new ae({
|
|
@@ -9775,20 +9788,20 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9775
9788
|
c("div", {
|
|
9776
9789
|
class: se(["vs-map-wrapper w-full", { fullscreen: f.value }])
|
|
9777
9790
|
}, [
|
|
9778
|
-
c("div",
|
|
9791
|
+
c("div", Am, [
|
|
9779
9792
|
c("div", {
|
|
9780
9793
|
ref_key: "mapContainer",
|
|
9781
9794
|
ref: k,
|
|
9782
9795
|
class: "vs-map-canvas"
|
|
9783
9796
|
}, null, 512),
|
|
9784
|
-
Oe.value.search || Oe.value.import || Oe.value.export ? (u(), v("div",
|
|
9785
|
-
Oe.value.search ? (u(), ye(
|
|
9797
|
+
Oe.value.search || Oe.value.import || Oe.value.export ? (u(), v("div", Vm, [
|
|
9798
|
+
Oe.value.search ? (u(), ye(Cf, {
|
|
9786
9799
|
key: 0,
|
|
9787
9800
|
config: ee.value,
|
|
9788
9801
|
onGoToCoordinates: ka
|
|
9789
9802
|
}, null, 8, ["config"])) : G("", !0),
|
|
9790
|
-
Oe.value.import || Oe.value.export ? (u(), v("div",
|
|
9791
|
-
c("div",
|
|
9803
|
+
Oe.value.import || Oe.value.export ? (u(), v("div", Dm, [
|
|
9804
|
+
c("div", Tm, [
|
|
9792
9805
|
Oe.value.import ? (u(), v("div", {
|
|
9793
9806
|
key: 0,
|
|
9794
9807
|
ref_key: "importMenuRef",
|
|
@@ -9805,8 +9818,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9805
9818
|
X(U(gn), {
|
|
9806
9819
|
class: se(["h-3.5 w-3.5 shrink-0 transition-transform", { "rotate-180": Me.value }])
|
|
9807
9820
|
}, null, 8, ["class"])
|
|
9808
|
-
], 8,
|
|
9809
|
-
Me.value ? (u(), v("div",
|
|
9821
|
+
], 8, Im),
|
|
9822
|
+
Me.value ? (u(), v("div", Fm, [
|
|
9810
9823
|
Oe.value.import ? (u(), v("button", {
|
|
9811
9824
|
key: 0,
|
|
9812
9825
|
type: "button",
|
|
@@ -9826,7 +9839,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9826
9839
|
class: "vs-map-action-btn",
|
|
9827
9840
|
onClick: or,
|
|
9828
9841
|
disabled: d.value || $.value === 0
|
|
9829
|
-
}, " Експорт ", 8,
|
|
9842
|
+
}, " Експорт ", 8, Em)) : G("", !0)
|
|
9830
9843
|
])
|
|
9831
9844
|
])) : G("", !0)
|
|
9832
9845
|
])) : G("", !0),
|
|
@@ -9838,7 +9851,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9838
9851
|
teleport: U(i)
|
|
9839
9852
|
}, {
|
|
9840
9853
|
default: rt(() => [
|
|
9841
|
-
Ze.value || Qe.value ? (u(), v("div",
|
|
9854
|
+
Ze.value || Qe.value ? (u(), v("div", Pm, [
|
|
9842
9855
|
X(U(ol), { class: "h-4 w-4 shrink-0 animate-spin" }),
|
|
9843
9856
|
c("span", null, de(it.value), 1)
|
|
9844
9857
|
])) : G("", !0),
|
|
@@ -9847,13 +9860,13 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9847
9860
|
values: j.value,
|
|
9848
9861
|
"onUpdate:values": p[0] || (p[0] = (g) => j.value = g)
|
|
9849
9862
|
}, null, 8, ["schema", "values"]),
|
|
9850
|
-
c("div",
|
|
9863
|
+
c("div", Om, [
|
|
9851
9864
|
c("button", {
|
|
9852
9865
|
type: "button",
|
|
9853
9866
|
class: "px-3 py-2 rounded-md border border-gray-300 text-gray-700 text-sm hover:bg-gray-100",
|
|
9854
9867
|
onClick: Xa,
|
|
9855
9868
|
disabled: Ze.value || Qe.value
|
|
9856
|
-
}, " Скасувати ", 8,
|
|
9869
|
+
}, " Скасувати ", 8, Rm),
|
|
9857
9870
|
c("button", {
|
|
9858
9871
|
type: "button",
|
|
9859
9872
|
class: "px-3 py-2 rounded-md bg-blue-600 text-white text-sm hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center gap-2",
|
|
@@ -9865,7 +9878,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9865
9878
|
class: "h-4 w-4 animate-spin"
|
|
9866
9879
|
})) : G("", !0),
|
|
9867
9880
|
nt(" " + de(Qe.value ? "Обробка..." : "Додати"), 1)
|
|
9868
|
-
], 8,
|
|
9881
|
+
], 8, Bm)
|
|
9869
9882
|
])
|
|
9870
9883
|
]),
|
|
9871
9884
|
_: 1
|
|
@@ -9883,7 +9896,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9883
9896
|
values: V.value,
|
|
9884
9897
|
"onUpdate:values": p[2] || (p[2] = (g) => V.value = g)
|
|
9885
9898
|
}, null, 8, ["values"]),
|
|
9886
|
-
c("div",
|
|
9899
|
+
c("div", Nm, [
|
|
9887
9900
|
c("button", {
|
|
9888
9901
|
type: "button",
|
|
9889
9902
|
class: "px-3 py-2 rounded-md border border-gray-300 text-gray-700 text-sm hover:bg-gray-100",
|
|
@@ -9894,13 +9907,13 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9894
9907
|
class: "px-3 py-2 rounded-md bg-blue-600 text-white text-sm hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
9895
9908
|
onClick: nr,
|
|
9896
9909
|
disabled: d.value
|
|
9897
|
-
}, " Побудувати ", 8,
|
|
9910
|
+
}, " Побудувати ", 8, jm)
|
|
9898
9911
|
])
|
|
9899
9912
|
]),
|
|
9900
9913
|
_: 1
|
|
9901
9914
|
}, 8, ["visible", "teleport"]),
|
|
9902
|
-
c("div",
|
|
9903
|
-
c("div",
|
|
9915
|
+
c("div", zm, [
|
|
9916
|
+
c("div", Um, [
|
|
9904
9917
|
En.value ? (u(), v(Ce, { key: 0 }, [
|
|
9905
9918
|
Oe.value.point ? (u(), v("button", {
|
|
9906
9919
|
key: 0,
|
|
@@ -9910,7 +9923,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9910
9923
|
disabled: d.value
|
|
9911
9924
|
}, [
|
|
9912
9925
|
X(U(ea), { class: "vs-btn-icon" })
|
|
9913
|
-
], 10,
|
|
9926
|
+
], 10, Hm)) : G("", !0),
|
|
9914
9927
|
Oe.value.line ? (u(), v("button", {
|
|
9915
9928
|
key: 1,
|
|
9916
9929
|
class: se(["vs-btn", { "vs-active": b.value === "polyline" }]),
|
|
@@ -9918,8 +9931,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9918
9931
|
onClick: p[5] || (p[5] = (g) => jn("polyline")),
|
|
9919
9932
|
disabled: d.value
|
|
9920
9933
|
}, [
|
|
9921
|
-
X(
|
|
9922
|
-
], 10,
|
|
9934
|
+
X($p, { class: "vs-btn-icon" })
|
|
9935
|
+
], 10, Wm)) : G("", !0),
|
|
9923
9936
|
Oe.value.polygon ? (u(), v("button", {
|
|
9924
9937
|
key: 2,
|
|
9925
9938
|
class: se(["vs-btn", { "vs-active": b.value === "polygon" }]),
|
|
@@ -9927,8 +9940,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9927
9940
|
onClick: p[6] || (p[6] = (g) => jn("polygon")),
|
|
9928
9941
|
disabled: d.value
|
|
9929
9942
|
}, [
|
|
9930
|
-
X(
|
|
9931
|
-
], 10,
|
|
9943
|
+
X(Mp, { class: "vs-btn-icon" })
|
|
9944
|
+
], 10, qm)) : G("", !0),
|
|
9932
9945
|
Oe.value.rectangle ? (u(), v("button", {
|
|
9933
9946
|
key: 3,
|
|
9934
9947
|
class: se(["vs-btn", { "vs-active": b.value === "rectangle" }]),
|
|
@@ -9936,10 +9949,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9936
9949
|
onClick: p[7] || (p[7] = (g) => jn("rectangle")),
|
|
9937
9950
|
disabled: d.value
|
|
9938
9951
|
}, [
|
|
9939
|
-
X(
|
|
9940
|
-
], 10,
|
|
9952
|
+
X(Tp, { class: "vs-btn-icon" })
|
|
9953
|
+
], 10, Km)) : G("", !0)
|
|
9941
9954
|
], 64)) : G("", !0),
|
|
9942
|
-
En.value ? (u(), v("div",
|
|
9955
|
+
En.value ? (u(), v("div", Ym)) : G("", !0),
|
|
9943
9956
|
Oe.value.ruler ? (u(), v("button", {
|
|
9944
9957
|
key: 2,
|
|
9945
9958
|
class: se(["vs-btn", { "vs-active": U(S).isRulerActive.value }]),
|
|
@@ -9960,10 +9973,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9960
9973
|
key: 1,
|
|
9961
9974
|
class: "vs-btn-icon"
|
|
9962
9975
|
}))
|
|
9963
|
-
], 8,
|
|
9976
|
+
], 8, Gm)
|
|
9964
9977
|
])
|
|
9965
9978
|
]),
|
|
9966
|
-
Oe.value.ruler && U(S).isRulerActive.value ? (u(), ye(
|
|
9979
|
+
Oe.value.ruler && U(S).isRulerActive.value ? (u(), ye(bm, {
|
|
9967
9980
|
key: 1,
|
|
9968
9981
|
ref_key: "rulerPanelRefEl",
|
|
9969
9982
|
ref: h,
|
|
@@ -9972,7 +9985,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9972
9985
|
onPointsChange: U(S).onRulerPointsChange,
|
|
9973
9986
|
onShapeClosedChange: U(S).onRulerShapeClosedChange
|
|
9974
9987
|
}, null, 8, ["onTabChange", "onPointsChange", "onShapeClosedChange"])) : G("", !0),
|
|
9975
|
-
Oe.value.ruler && U(S).isRulerActive.value && U(S).hasRulerPoints.value ? (u(), ye(
|
|
9988
|
+
Oe.value.ruler && U(S).isRulerActive.value && U(S).hasRulerPoints.value ? (u(), ye(wm, {
|
|
9976
9989
|
key: 2,
|
|
9977
9990
|
map: w.value,
|
|
9978
9991
|
points: U(S).rulerPoints.value,
|
|
@@ -9987,28 +10000,28 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
9987
10000
|
class: "pointer-events-none fixed z-[10000]",
|
|
9988
10001
|
style: Fe(Mt.value)
|
|
9989
10002
|
}, [
|
|
9990
|
-
c("div",
|
|
9991
|
-
c("dl",
|
|
10003
|
+
c("div", Xm, [
|
|
10004
|
+
c("dl", Zm, [
|
|
9992
10005
|
(u(!0), v(Ce, null, Ee(pt.value, (g) => (u(), v("div", {
|
|
9993
10006
|
key: `${g.key}-${g.value}`,
|
|
9994
10007
|
class: "flex justify-between gap-2"
|
|
9995
10008
|
}, [
|
|
9996
|
-
c("dt",
|
|
9997
|
-
c("dd",
|
|
10009
|
+
c("dt", Jm, de(g.key), 1),
|
|
10010
|
+
c("dd", Qm, de(g.value), 1)
|
|
9998
10011
|
]))), 128))
|
|
9999
10012
|
])
|
|
10000
10013
|
])
|
|
10001
10014
|
], 4)
|
|
10002
10015
|
], 8, ["to"])) : G("", !0),
|
|
10003
|
-
c("div",
|
|
10004
|
-
X(
|
|
10016
|
+
c("div", ev, [
|
|
10017
|
+
X(nf, {
|
|
10005
10018
|
compact: "",
|
|
10006
10019
|
basemaps: U(qt),
|
|
10007
10020
|
"active-base-key": Jt.value,
|
|
10008
10021
|
"tile-overlays": U(Qt),
|
|
10009
10022
|
"active-tile-overlay-keys": Tt.value,
|
|
10010
10023
|
"vector-overlays": Pn.value,
|
|
10011
|
-
"preview-tile":
|
|
10024
|
+
"preview-tile": Ve.value,
|
|
10012
10025
|
disabled: d.value,
|
|
10013
10026
|
onOnLayerChange: Fa,
|
|
10014
10027
|
onOnOverlayToggle: Ia,
|
|
@@ -10016,11 +10029,11 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10016
10029
|
}, null, 8, ["basemaps", "active-base-key", "tile-overlays", "active-tile-overlay-keys", "vector-overlays", "preview-tile", "disabled"])
|
|
10017
10030
|
])
|
|
10018
10031
|
]),
|
|
10019
|
-
$o.value ? (u(), v("div",
|
|
10020
|
-
c("div",
|
|
10021
|
-
c("div",
|
|
10032
|
+
$o.value ? (u(), v("div", tv, [
|
|
10033
|
+
c("div", nv, [
|
|
10034
|
+
c("div", lv, [
|
|
10022
10035
|
p[11] || (p[11] = c("span", { class: "vs-map-status__label" }, "Тип:", -1)),
|
|
10023
|
-
c("div",
|
|
10036
|
+
c("div", ov, [
|
|
10024
10037
|
Ll.value.length ? (u(!0), v(Ce, { key: 0 }, Ee(Ll.value, (g, C) => (u(), v(Ce, {
|
|
10025
10038
|
key: g.id
|
|
10026
10039
|
}, [
|
|
@@ -10030,21 +10043,21 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10030
10043
|
class: se(["vs-map-status__chip", { "vs-map-status__chip--active": g.id === U(Ke) }]),
|
|
10031
10044
|
onClick: (I) => Ha(g.id),
|
|
10032
10045
|
disabled: d.value
|
|
10033
|
-
}, de(g.label), 11,
|
|
10034
|
-
C < Ll.value.length - 1 ? (u(), v("span",
|
|
10035
|
-
], 64))), 128)) : (u(), v("span",
|
|
10046
|
+
}, de(g.label), 11, av)) : (u(), v("span", rv, de(g.label), 1)),
|
|
10047
|
+
C < Ll.value.length - 1 ? (u(), v("span", sv, ", ")) : G("", !0)
|
|
10048
|
+
], 64))), 128)) : (u(), v("span", iv, "—"))
|
|
10036
10049
|
])
|
|
10037
10050
|
]),
|
|
10038
|
-
c("div",
|
|
10039
|
-
c("span",
|
|
10051
|
+
c("div", uv, [
|
|
10052
|
+
c("span", dv, [
|
|
10040
10053
|
p[12] || (p[12] = c("span", { class: "vs-map-status__label" }, "Центр:", -1)),
|
|
10041
|
-
_.value ? (u(), v("span",
|
|
10054
|
+
_.value ? (u(), v("span", cv, de(_.value.center.lng.toFixed(5)) + ", " + de(_.value.center.lat.toFixed(5)), 1)) : (u(), v("span", pv, "—"))
|
|
10042
10055
|
]),
|
|
10043
|
-
_.value && _.value.areaKm2 !== null ? (u(), v("span",
|
|
10056
|
+
_.value && _.value.areaKm2 !== null ? (u(), v("span", fv, [
|
|
10044
10057
|
p[13] || (p[13] = c("span", { class: "vs-map-status__label" }, "Площа:", -1)),
|
|
10045
|
-
c("span",
|
|
10058
|
+
c("span", mv, de(_.value.areaKm2.toFixed(1)) + " km²", 1)
|
|
10046
10059
|
])) : G("", !0),
|
|
10047
|
-
c("div",
|
|
10060
|
+
c("div", vv, [
|
|
10048
10061
|
c("button", {
|
|
10049
10062
|
type: "button",
|
|
10050
10063
|
class: "vs-status-btn vs-status-btn--zoom",
|
|
@@ -10053,7 +10066,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10053
10066
|
disabled: d.value
|
|
10054
10067
|
}, [
|
|
10055
10068
|
X(U(_r), { class: "vs-status-btn__icon" })
|
|
10056
|
-
], 8,
|
|
10069
|
+
], 8, gv),
|
|
10057
10070
|
c("button", {
|
|
10058
10071
|
type: "button",
|
|
10059
10072
|
class: "vs-status-btn vs-status-btn--delete",
|
|
@@ -10062,7 +10075,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10062
10075
|
disabled: d.value
|
|
10063
10076
|
}, [
|
|
10064
10077
|
X(U(Zt), { class: "vs-status-btn__icon" })
|
|
10065
|
-
], 8,
|
|
10078
|
+
], 8, yv)
|
|
10066
10079
|
])
|
|
10067
10080
|
])
|
|
10068
10081
|
])
|
|
@@ -10070,10 +10083,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10070
10083
|
], 2)
|
|
10071
10084
|
], 8, ["disabled"]));
|
|
10072
10085
|
}
|
|
10073
|
-
}),
|
|
10086
|
+
}), Mv = /* @__PURE__ */ He(Lv, [["__scopeId", "data-v-d2948dbb"]]), Av = ["data-focus"], Vv = { class: "flex items-center" }, Dv = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Tv = ["onClick", "aria-label"], Iv = {
|
|
10074
10087
|
key: 0,
|
|
10075
10088
|
class: "absolute text-gray-500 truncate pl-2"
|
|
10076
|
-
},
|
|
10089
|
+
}, Fv = { class: "flex-1 min-w-[2px]" }, Ev = ["placeholder"], Pv = { class: "flex items-center shrink-0" }, Ov = ["disabled"], Rv = /* @__PURE__ */ ve({
|
|
10077
10090
|
__name: "vs-input-tag",
|
|
10078
10091
|
props: /* @__PURE__ */ Re({
|
|
10079
10092
|
unique: { type: Boolean, default: !0 },
|
|
@@ -10146,8 +10159,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10146
10159
|
key: B,
|
|
10147
10160
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
10148
10161
|
}, [
|
|
10149
|
-
c("div",
|
|
10150
|
-
c("div",
|
|
10162
|
+
c("div", Vv, [
|
|
10163
|
+
c("div", Dv, de(P), 1)
|
|
10151
10164
|
]),
|
|
10152
10165
|
c("div", {
|
|
10153
10166
|
role: "button",
|
|
@@ -10160,10 +10173,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10160
10173
|
focusable: "false",
|
|
10161
10174
|
class: "inline-block h-4 w-4"
|
|
10162
10175
|
})
|
|
10163
|
-
], 8,
|
|
10176
|
+
], 8, Tv)
|
|
10164
10177
|
]))), 128)),
|
|
10165
|
-
$.value ? (u(), v("div",
|
|
10166
|
-
c("div",
|
|
10178
|
+
$.value ? (u(), v("div", Iv, de(k.value), 1)) : G("", !0),
|
|
10179
|
+
c("div", Fv, [
|
|
10167
10180
|
_.value ? G("", !0) : Pe((u(), v("input", {
|
|
10168
10181
|
key: 0,
|
|
10169
10182
|
ref_key: "inputRef",
|
|
@@ -10181,12 +10194,12 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10181
10194
|
onBlur: D,
|
|
10182
10195
|
onKeydown: q,
|
|
10183
10196
|
placeholder: f.value && f.value.length ? "" : void 0
|
|
10184
|
-
}, null, 40,
|
|
10197
|
+
}, null, 40, Ev)), [
|
|
10185
10198
|
[at, d.value]
|
|
10186
10199
|
])
|
|
10187
10200
|
])
|
|
10188
10201
|
], 512),
|
|
10189
|
-
c("div",
|
|
10202
|
+
c("div", Pv, [
|
|
10190
10203
|
b.value ? (u(), v("button", {
|
|
10191
10204
|
key: 0,
|
|
10192
10205
|
type: "button",
|
|
@@ -10196,13 +10209,13 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10196
10209
|
onClick: De(L, ["stop"])
|
|
10197
10210
|
}, [
|
|
10198
10211
|
X(U($t), { class: "h-4 w-4" })
|
|
10199
|
-
], 8,
|
|
10212
|
+
], 8, Ov)) : G("", !0)
|
|
10200
10213
|
])
|
|
10201
|
-
], 10,
|
|
10214
|
+
], 10, Av)
|
|
10202
10215
|
], 2)
|
|
10203
10216
|
], 512));
|
|
10204
10217
|
}
|
|
10205
|
-
}),
|
|
10218
|
+
}), Bv = { class: "relative flex gap-1 bg-white w-full" }, Nv = ["disabled", "placeholder"], jv = /* @__PURE__ */ ve({
|
|
10206
10219
|
__name: "vs-input-slug",
|
|
10207
10220
|
props: /* @__PURE__ */ Re({
|
|
10208
10221
|
disabled: { type: Boolean },
|
|
@@ -10261,14 +10274,14 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10261
10274
|
const i = t?.value?.[n.parent || ""]?.toString(), s = a(i);
|
|
10262
10275
|
l.value = s.toString();
|
|
10263
10276
|
};
|
|
10264
|
-
return (i, s) => (u(), v("div",
|
|
10277
|
+
return (i, s) => (u(), v("div", Bv, [
|
|
10265
10278
|
Pe(c("input", {
|
|
10266
10279
|
ref: "vsText",
|
|
10267
10280
|
disabled: i.disabled,
|
|
10268
10281
|
placeholder: i.placeholder,
|
|
10269
10282
|
"onUpdate:modelValue": s[0] || (s[0] = (d) => l.value = d),
|
|
10270
10283
|
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"
|
|
10271
|
-
}, null, 8,
|
|
10284
|
+
}, null, 8, Nv), [
|
|
10272
10285
|
[at, l.value]
|
|
10273
10286
|
]),
|
|
10274
10287
|
c("button", {
|
|
@@ -10277,7 +10290,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10277
10290
|
}, " Gen ")
|
|
10278
10291
|
]));
|
|
10279
10292
|
}
|
|
10280
|
-
}),
|
|
10293
|
+
}), zv = /* @__PURE__ */ He(jv, [["__scopeId", "data-v-b0eba370"]]), Uv = { class: "relative flex gap-1 bg-white w-full" }, Hv = ["disabled", "placeholder"], Wv = ["disabled"], qv = { key: 0 }, Kv = { key: 1 }, Yv = /* @__PURE__ */ ve({
|
|
10281
10294
|
__name: "vs-input-codegen",
|
|
10282
10295
|
props: /* @__PURE__ */ Re({
|
|
10283
10296
|
table: {},
|
|
@@ -10326,13 +10339,13 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10326
10339
|
() => {
|
|
10327
10340
|
d();
|
|
10328
10341
|
}
|
|
10329
|
-
), (f, k) => (u(), v("div",
|
|
10342
|
+
), (f, k) => (u(), v("div", Uv, [
|
|
10330
10343
|
Pe(c("input", {
|
|
10331
10344
|
disabled: f.disabled,
|
|
10332
10345
|
placeholder: f.placeholder,
|
|
10333
10346
|
"onUpdate:modelValue": k[0] || (k[0] = ($) => n.value = $),
|
|
10334
10347
|
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"
|
|
10335
|
-
}, null, 8,
|
|
10348
|
+
}, null, 8, Hv), [
|
|
10336
10349
|
[at, n.value]
|
|
10337
10350
|
]),
|
|
10338
10351
|
c("button", {
|
|
@@ -10340,20 +10353,20 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10340
10353
|
disabled: l.value || f.disabled || !o.value,
|
|
10341
10354
|
onClick: s
|
|
10342
10355
|
}, [
|
|
10343
|
-
l.value ? (u(), v("span",
|
|
10344
|
-
], 8,
|
|
10356
|
+
l.value ? (u(), v("span", Kv, "...")) : (u(), v("span", qv, "Gen"))
|
|
10357
|
+
], 8, Wv)
|
|
10345
10358
|
]));
|
|
10346
10359
|
}
|
|
10347
|
-
}),
|
|
10360
|
+
}), Gv = /* @__PURE__ */ He(Yv, [["__scopeId", "data-v-6ee5237d"]]), Xv = { class: "w-full" }, Zv = {
|
|
10348
10361
|
ref: "sortableContainer",
|
|
10349
10362
|
class: "flex flex-col gap-1"
|
|
10350
|
-
},
|
|
10363
|
+
}, Jv = ["onDragstart", "onDrop"], Qv = {
|
|
10351
10364
|
class: "cursor-move",
|
|
10352
10365
|
type: "button"
|
|
10353
|
-
},
|
|
10366
|
+
}, eg = { class: "w-1/3" }, tg = { class: "w-2/3" }, ng = ["onClick"], lg = {
|
|
10354
10367
|
key: 0,
|
|
10355
10368
|
class: "text-[14px] text-gray-700"
|
|
10356
|
-
},
|
|
10369
|
+
}, og = { class: "mt-2 w-full flex items-center" }, ag = ["disabled"], rg = /* @__PURE__ */ ve({
|
|
10357
10370
|
__name: "vs-input-key-value",
|
|
10358
10371
|
props: {
|
|
10359
10372
|
parent: {},
|
|
@@ -10401,8 +10414,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10401
10414
|
}), o("update:modelValue", S);
|
|
10402
10415
|
},
|
|
10403
10416
|
{ deep: !0 }
|
|
10404
|
-
), (h, S) => (u(), v("div",
|
|
10405
|
-
c("div",
|
|
10417
|
+
), (h, S) => (u(), v("div", Xv, [
|
|
10418
|
+
c("div", Zv, [
|
|
10406
10419
|
(u(!0), v(Ce, null, Ee(d.value, (L, F) => (u(), v("div", {
|
|
10407
10420
|
key: L.id,
|
|
10408
10421
|
class: se(["flex items-center gap-2 w-full", { "opacity-50": f.value === F }]),
|
|
@@ -10412,17 +10425,17 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10412
10425
|
}, ["prevent"])),
|
|
10413
10426
|
onDrop: (D) => b(F)
|
|
10414
10427
|
}, [
|
|
10415
|
-
c("button",
|
|
10428
|
+
c("button", Qv, [
|
|
10416
10429
|
X(U(mn), { class: "h-4 w-4" })
|
|
10417
10430
|
]),
|
|
10418
|
-
c("div",
|
|
10431
|
+
c("div", eg, [
|
|
10419
10432
|
X(An, {
|
|
10420
10433
|
modelValue: L.key,
|
|
10421
10434
|
"onUpdate:modelValue": (D) => L.key = D,
|
|
10422
10435
|
placeholder: "Ключ"
|
|
10423
10436
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
10424
10437
|
]),
|
|
10425
|
-
c("div",
|
|
10438
|
+
c("div", tg, [
|
|
10426
10439
|
X(An, {
|
|
10427
10440
|
modelValue: L.value,
|
|
10428
10441
|
"onUpdate:modelValue": (D) => L.value = D,
|
|
@@ -10434,11 +10447,11 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10434
10447
|
class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
|
|
10435
10448
|
}, [
|
|
10436
10449
|
X(U($t), { class: "h-4 w-4" })
|
|
10437
|
-
], 8,
|
|
10438
|
-
], 42,
|
|
10450
|
+
], 8, ng)
|
|
10451
|
+
], 42, Jv))), 128))
|
|
10439
10452
|
], 512),
|
|
10440
|
-
d.value.length ? G("", !0) : (u(), v("span",
|
|
10441
|
-
c("div",
|
|
10453
|
+
d.value.length ? G("", !0) : (u(), v("span", lg, " Дані для відображення відсутні ")),
|
|
10454
|
+
c("div", og, [
|
|
10442
10455
|
c("button", {
|
|
10443
10456
|
type: "button",
|
|
10444
10457
|
onClick: m,
|
|
@@ -10447,17 +10460,17 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10447
10460
|
}, [
|
|
10448
10461
|
X(U(Dt), { class: "h-4 w-4" }),
|
|
10449
10462
|
nt(" " + de(U(i)), 1)
|
|
10450
|
-
], 8,
|
|
10463
|
+
], 8, ag)
|
|
10451
10464
|
])
|
|
10452
10465
|
]));
|
|
10453
10466
|
}
|
|
10454
|
-
}),
|
|
10467
|
+
}), sg = /* @__PURE__ */ He(rg, [["__scopeId", "data-v-d8c3f9d6"]]), ig = { class: "w-full" }, ug = {
|
|
10455
10468
|
ref: "sortableContainer",
|
|
10456
10469
|
class: "flex flex-col gap-1"
|
|
10457
|
-
},
|
|
10470
|
+
}, dg = ["onDragstart", "onDrop"], cg = ["disabled"], pg = { class: "flex-1" }, fg = ["onClick", "disabled"], mg = {
|
|
10458
10471
|
key: 0,
|
|
10459
10472
|
class: "text-[14px] text-gray-700"
|
|
10460
|
-
},
|
|
10473
|
+
}, vg = { class: "mt-2 w-full flex items-center" }, gg = ["disabled"], yg = /* @__PURE__ */ ve({
|
|
10461
10474
|
__name: "vs-input-text-array",
|
|
10462
10475
|
props: /* @__PURE__ */ Re({
|
|
10463
10476
|
addButtonText: { default: "Додати" },
|
|
@@ -10512,8 +10525,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10512
10525
|
const S = [...l.value], [L] = S.splice(a.value, 1);
|
|
10513
10526
|
S.splice(h, 0, L), l.value = S, a.value = null;
|
|
10514
10527
|
}
|
|
10515
|
-
return (h, S) => (u(), v("div",
|
|
10516
|
-
c("div",
|
|
10528
|
+
return (h, S) => (u(), v("div", ig, [
|
|
10529
|
+
c("div", ug, [
|
|
10517
10530
|
(u(!0), v(Ce, null, Ee(l.value, (L, F) => (u(), v("div", {
|
|
10518
10531
|
key: L.id,
|
|
10519
10532
|
class: se(["flex items-center gap-2 w-full", { "opacity-50": a.value === F }]),
|
|
@@ -10529,8 +10542,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10529
10542
|
disabled: o.value
|
|
10530
10543
|
}, [
|
|
10531
10544
|
X(U(mn), { class: "h-4 w-4" })
|
|
10532
|
-
], 8,
|
|
10533
|
-
c("div",
|
|
10545
|
+
], 8, cg),
|
|
10546
|
+
c("div", pg, [
|
|
10534
10547
|
h.inputType === "text" ? (u(), ye(An, {
|
|
10535
10548
|
key: 0,
|
|
10536
10549
|
modelValue: L.value,
|
|
@@ -10568,11 +10581,11 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10568
10581
|
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"
|
|
10569
10582
|
}, [
|
|
10570
10583
|
X(U($t), { class: "h-4 w-4" })
|
|
10571
|
-
], 8,
|
|
10572
|
-
], 42,
|
|
10584
|
+
], 8, fg)
|
|
10585
|
+
], 42, dg))), 128))
|
|
10573
10586
|
], 512),
|
|
10574
|
-
l.value.length ? G("", !0) : (u(), v("span",
|
|
10575
|
-
c("div",
|
|
10587
|
+
l.value.length ? G("", !0) : (u(), v("span", mg, " Дані для відображення відсутні ")),
|
|
10588
|
+
c("div", vg, [
|
|
10576
10589
|
c("button", {
|
|
10577
10590
|
type: "button",
|
|
10578
10591
|
onClick: b,
|
|
@@ -10581,11 +10594,11 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10581
10594
|
}, [
|
|
10582
10595
|
X(U(Dt), { class: "h-4 w-4" }),
|
|
10583
10596
|
nt(" " + de(s.value), 1)
|
|
10584
|
-
], 8,
|
|
10597
|
+
], 8, gg)
|
|
10585
10598
|
])
|
|
10586
10599
|
]));
|
|
10587
10600
|
}
|
|
10588
|
-
}),
|
|
10601
|
+
}), hg = /* @__PURE__ */ He(yg, [["__scopeId", "data-v-2c229b1f"]]), bg = { class: "flex items-center gap-2 w-full" }, wg = ["disabled"], xg = ["disabled"], kg = /* @__PURE__ */ ve({
|
|
10589
10602
|
__name: "vs-input-color",
|
|
10590
10603
|
props: {
|
|
10591
10604
|
style: { default: () => ({}) },
|
|
@@ -10604,7 +10617,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10604
10617
|
get: () => n.modelValue || "#000000",
|
|
10605
10618
|
set: (s) => a("update:modelValue", s)
|
|
10606
10619
|
}), i = y(() => !!n.disabled);
|
|
10607
|
-
return (s, d) => (u(), v("div",
|
|
10620
|
+
return (s, d) => (u(), v("div", bg, [
|
|
10608
10621
|
Pe(c("input", {
|
|
10609
10622
|
type: "color",
|
|
10610
10623
|
"onUpdate:modelValue": d[0] || (d[0] = (f) => o.value = f),
|
|
@@ -10612,19 +10625,19 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10612
10625
|
ref: "color",
|
|
10613
10626
|
class: se(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [s.modelValue ? "" : "text-opacity-50", U(l)].join(" ")]),
|
|
10614
10627
|
style: { border: "1px solid #CFD9E0" }
|
|
10615
|
-
}, null, 10,
|
|
10628
|
+
}, null, 10, wg), [
|
|
10616
10629
|
[at, o.value]
|
|
10617
10630
|
]),
|
|
10618
10631
|
Pe(c("input", {
|
|
10619
10632
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
|
|
10620
10633
|
"onUpdate:modelValue": d[1] || (d[1] = (f) => o.value = f),
|
|
10621
10634
|
disabled: i.value
|
|
10622
|
-
}, null, 8,
|
|
10635
|
+
}, null, 8, xg), [
|
|
10623
10636
|
[at, o.value]
|
|
10624
10637
|
])
|
|
10625
10638
|
]));
|
|
10626
10639
|
}
|
|
10627
|
-
}),
|
|
10640
|
+
}), _g = { class: "flex items-center gap-2 w-full" }, $g = ["min", "max", "step", "disabled"], Sg = ["value", "min", "max", "step", "disabled"], Cg = /* @__PURE__ */ ve({
|
|
10628
10641
|
__name: "vs-input-range",
|
|
10629
10642
|
props: {
|
|
10630
10643
|
style: { default: () => ({}) },
|
|
@@ -10654,7 +10667,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10654
10667
|
}, d = (k) => {
|
|
10655
10668
|
Number(n.min) >= 0 && k.key === "-" && k.preventDefault();
|
|
10656
10669
|
}, f = y(() => !!n.disabled);
|
|
10657
|
-
return (k, $) => (u(), v("div",
|
|
10670
|
+
return (k, $) => (u(), v("div", _g, [
|
|
10658
10671
|
Pe(c("input", {
|
|
10659
10672
|
type: "range",
|
|
10660
10673
|
"onUpdate:modelValue": $[0] || ($[0] = (b) => i.value = b),
|
|
@@ -10664,7 +10677,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10664
10677
|
disabled: f.value,
|
|
10665
10678
|
ref: "range",
|
|
10666
10679
|
class: se(["w-full cursor-pointer accent-blue-500", [k.modelValue ? "" : "text-opacity-50", U(l)].join(" ")])
|
|
10667
|
-
}, null, 10,
|
|
10680
|
+
}, null, 10, $g), [
|
|
10668
10681
|
[at, i.value]
|
|
10669
10682
|
]),
|
|
10670
10683
|
c("input", {
|
|
@@ -10677,10 +10690,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10677
10690
|
onInput: s,
|
|
10678
10691
|
onKeydown: d,
|
|
10679
10692
|
disabled: f.value
|
|
10680
|
-
}, null, 40,
|
|
10693
|
+
}, null, 40, Sg)
|
|
10681
10694
|
]));
|
|
10682
10695
|
}
|
|
10683
|
-
}),
|
|
10696
|
+
}), Lg = ["placeholder", "disabled", "name"], Mg = ["type", "value", "onInput", "placeholder", "disabled"], Ag = ["onClick"], Vg = /* @__PURE__ */ ve({
|
|
10684
10697
|
__name: "vs-input-array",
|
|
10685
10698
|
props: /* @__PURE__ */ Re({
|
|
10686
10699
|
count: { default: 1 },
|
|
@@ -10800,7 +10813,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10800
10813
|
style: {
|
|
10801
10814
|
border: "1px solid #CFD9E0"
|
|
10802
10815
|
}
|
|
10803
|
-
}, null, 10,
|
|
10816
|
+
}, null, 10, Lg)) : (u(), v("input", {
|
|
10804
10817
|
key: 1,
|
|
10805
10818
|
type: w.inputType,
|
|
10806
10819
|
value: o.value?.[S - 1],
|
|
@@ -10811,7 +10824,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10811
10824
|
style: {
|
|
10812
10825
|
border: "1px solid #CFD9E0"
|
|
10813
10826
|
}
|
|
10814
|
-
}, null, 42,
|
|
10827
|
+
}, null, 42, Mg)),
|
|
10815
10828
|
!w.disabled && S === n.value && w.isAdded ? (u(), v("button", {
|
|
10816
10829
|
key: 2,
|
|
10817
10830
|
type: "button",
|
|
@@ -10827,17 +10840,17 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10827
10840
|
class: "cursor-pointer shrink-0 w-[38px] text-red-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
|
|
10828
10841
|
}, [
|
|
10829
10842
|
X(U($t), { class: "h-4 w-4" })
|
|
10830
|
-
], 8,
|
|
10843
|
+
], 8, Ag)) : G("", !0)
|
|
10831
10844
|
]))), 128))
|
|
10832
10845
|
], 2));
|
|
10833
10846
|
}
|
|
10834
|
-
}),
|
|
10847
|
+
}), Dg = { class: "flex gap-1 w-full" }, Tg = ["aria-expanded", "data-focus"], Ig = ["placeholder", "disabled", "readonly"], Fg = { class: "max-h-full" }, Eg = ["onClick", "disabled"], Pg = {
|
|
10835
10848
|
key: 0,
|
|
10836
10849
|
class: "px-3 py-2 text-sm text-stone-500"
|
|
10837
|
-
},
|
|
10850
|
+
}, Og = ["disabled"], Rg = { class: "flex flex-col gap-1" }, Bg = ["onDragstart", "onDrop"], Ng = ["disabled"], jg = ["title"], zg = ["disabled", "onClick", "aria-label"], Ug = {
|
|
10838
10851
|
key: 0,
|
|
10839
10852
|
class: "text-xs text-stone-500"
|
|
10840
|
-
},
|
|
10853
|
+
}, Hg = /* @__PURE__ */ ve({
|
|
10841
10854
|
__name: "vs-input-array-select",
|
|
10842
10855
|
props: /* @__PURE__ */ Re({
|
|
10843
10856
|
options: { default: () => [] },
|
|
@@ -10971,7 +10984,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10971
10984
|
};
|
|
10972
10985
|
}, Te = async (x = "click") => {
|
|
10973
10986
|
q.value || $.value || (ie.value = x, await N(k.value.trim()), $.value = !0, await Ye(), ke(), h.value?.focus());
|
|
10974
|
-
},
|
|
10987
|
+
}, Ve = () => {
|
|
10975
10988
|
$.value = !1, ie.value = null, Ye(() => {
|
|
10976
10989
|
h.value?.blur();
|
|
10977
10990
|
});
|
|
@@ -10982,23 +10995,23 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
10982
10995
|
ie.value = null;
|
|
10983
10996
|
return;
|
|
10984
10997
|
}
|
|
10985
|
-
|
|
10998
|
+
Ve();
|
|
10986
10999
|
return;
|
|
10987
11000
|
}
|
|
10988
11001
|
await Te("click");
|
|
10989
11002
|
}
|
|
10990
11003
|
}, st = (x) => {
|
|
10991
|
-
x.key === "Escape" &&
|
|
11004
|
+
x.key === "Escape" && Ve();
|
|
10992
11005
|
}, je = (x) => {
|
|
10993
11006
|
if (!$.value) return;
|
|
10994
11007
|
const M = x.target;
|
|
10995
|
-
w.value?.contains(M) ||
|
|
11008
|
+
w.value?.contains(M) || Ve();
|
|
10996
11009
|
}, Je = (x) => {
|
|
10997
11010
|
const M = x.target;
|
|
10998
|
-
_.value?.contains(M) || w.value?.contains(M) ||
|
|
11011
|
+
_.value?.contains(M) || w.value?.contains(M) || Ve();
|
|
10999
11012
|
}, We = (x) => {
|
|
11000
11013
|
if (x.key === "Escape") {
|
|
11001
|
-
x.preventDefault(),
|
|
11014
|
+
x.preventDefault(), Ve();
|
|
11002
11015
|
return;
|
|
11003
11016
|
}
|
|
11004
11017
|
if (x.key === "Enter") {
|
|
@@ -11090,7 +11103,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11090
11103
|
}, { deep: !0 }), me(k, (x) => {
|
|
11091
11104
|
!n.data || !$.value || we(x.trim());
|
|
11092
11105
|
}), me(q, (x) => {
|
|
11093
|
-
x &&
|
|
11106
|
+
x && Ve();
|
|
11094
11107
|
}), me(() => n.options, async (x) => {
|
|
11095
11108
|
n.data || (ee(x ?? []), await ue());
|
|
11096
11109
|
}, { immediate: !0, deep: !0 }), me(() => n.data, async (x) => {
|
|
@@ -11134,7 +11147,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11134
11147
|
ref_key: "rootRef",
|
|
11135
11148
|
ref: _
|
|
11136
11149
|
}, [
|
|
11137
|
-
c("div",
|
|
11150
|
+
c("div", Dg, [
|
|
11138
11151
|
c("div", {
|
|
11139
11152
|
class: "relative flex-1",
|
|
11140
11153
|
onClick: M[4] || (M[4] = De(() => {
|
|
@@ -11165,7 +11178,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11165
11178
|
onFocus: M[3] || (M[3] = () => Te("focus")),
|
|
11166
11179
|
onKeydown: We,
|
|
11167
11180
|
class: "flex-1 bg-transparent border-0 outline-none px-0 py-1 text-sm text-stone-900 placeholder:text-stone-400"
|
|
11168
|
-
}, null, 40,
|
|
11181
|
+
}, null, 40, Ig), [
|
|
11169
11182
|
[at, k.value]
|
|
11170
11183
|
]),
|
|
11171
11184
|
c("span", {
|
|
@@ -11174,7 +11187,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11174
11187
|
}, [
|
|
11175
11188
|
X(U(gn), { class: "h-4 w-4" })
|
|
11176
11189
|
], 2)
|
|
11177
|
-
], 10,
|
|
11190
|
+
], 10, Tg),
|
|
11178
11191
|
(u(), ye(Pt, { to: "body" }, [
|
|
11179
11192
|
X(sl, { name: "fade" }, {
|
|
11180
11193
|
default: rt(() => [
|
|
@@ -11185,15 +11198,15 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11185
11198
|
class: "fixed z-[3000] rounded-md border border-stone-200 bg-white shadow-lg overflow-auto",
|
|
11186
11199
|
style: Fe(S.value)
|
|
11187
11200
|
}, [
|
|
11188
|
-
c("div",
|
|
11201
|
+
c("div", Fg, [
|
|
11189
11202
|
(u(!0), v(Ce, null, Ee(Q.value, (R) => (u(), v("button", {
|
|
11190
11203
|
key: E(R.id),
|
|
11191
11204
|
type: "button",
|
|
11192
11205
|
class: "w-full px-3 py-2 text-left text-sm text-stone-900 hover:bg-stone-100 disabled:opacity-50",
|
|
11193
11206
|
onClick: De((ne) => oe(R), ["stop"]),
|
|
11194
11207
|
disabled: q.value
|
|
11195
|
-
}, de(W(R)), 9,
|
|
11196
|
-
Q.value.length === 0 ? (u(), v("p",
|
|
11208
|
+
}, de(W(R)), 9, Eg))), 128)),
|
|
11209
|
+
Q.value.length === 0 ? (u(), v("p", Pg, " Немає варіантів ")) : G("", !0)
|
|
11197
11210
|
])
|
|
11198
11211
|
], 4)) : G("", !0)
|
|
11199
11212
|
]),
|
|
@@ -11211,9 +11224,9 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11211
11224
|
}, [
|
|
11212
11225
|
X(U(Dt), { class: "h-4 w-4" }),
|
|
11213
11226
|
M[8] || (M[8] = c("span", null, "Додати", -1))
|
|
11214
|
-
], 8,
|
|
11227
|
+
], 8, Og)) : G("", !0)
|
|
11215
11228
|
]),
|
|
11216
|
-
c("div",
|
|
11229
|
+
c("div", Rg, [
|
|
11217
11230
|
(u(!0), v(Ce, null, Ee(o.value, (R, ne) => (u(), v("div", {
|
|
11218
11231
|
key: R.key,
|
|
11219
11232
|
class: se(["flex items-center gap-2 rounded-md border border-stone-200 bg-white px-2 py-2", { "opacity-60": b.value === ne }]),
|
|
@@ -11231,11 +11244,11 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11231
11244
|
"aria-label": "Перетягнути"
|
|
11232
11245
|
}, [
|
|
11233
11246
|
X(U(mn), { class: "h-4 w-4" })
|
|
11234
|
-
], 8,
|
|
11247
|
+
], 8, Ng),
|
|
11235
11248
|
c("div", {
|
|
11236
11249
|
class: "flex-1 text-sm text-stone-900",
|
|
11237
11250
|
title: R.text
|
|
11238
|
-
}, de(R.text), 9,
|
|
11251
|
+
}, de(R.text), 9, jg),
|
|
11239
11252
|
c("button", {
|
|
11240
11253
|
type: "button",
|
|
11241
11254
|
class: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-stone-400 hover:text-stone-900",
|
|
@@ -11244,20 +11257,20 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11244
11257
|
"aria-label": `Видалити ${R.text}`
|
|
11245
11258
|
}, [
|
|
11246
11259
|
X(U($t), { class: "h-4 w-4" })
|
|
11247
|
-
], 8,
|
|
11248
|
-
], 42,
|
|
11249
|
-
o.value.length === 0 ? (u(), v("p",
|
|
11260
|
+
], 8, zg)
|
|
11261
|
+
], 42, Bg))), 128)),
|
|
11262
|
+
o.value.length === 0 ? (u(), v("p", Ug, "Немає вибраних значень")) : G("", !0)
|
|
11250
11263
|
])
|
|
11251
11264
|
], 512)
|
|
11252
11265
|
], 64));
|
|
11253
11266
|
}
|
|
11254
|
-
}), Ol = /* @__PURE__ */ He(
|
|
11267
|
+
}), Ol = /* @__PURE__ */ He(Hg, [["__scopeId", "data-v-da4b4da7"]]), Wg = { class: "flex items-center gap-2 w-full" }, qg = { class: "relative flex-1" }, Kg = ["placeholder", "disabled", "onKeydown"], Yg = ["disabled"], Gg = {
|
|
11255
11268
|
key: 0,
|
|
11256
11269
|
class: "fixed inset-0 z-[1000] flex items-center justify-center bg-black/50"
|
|
11257
|
-
},
|
|
11270
|
+
}, Xg = { class: "bg-white text-gray-900 rounded-lg shadow-lg w-[480px] max-h-[80vh] overflow-y-auto" }, Zg = { class: "p-3 border-b font-semibold text-gray-900 flex justify-between items-center" }, Jg = ["onClick"], Qg = {
|
|
11258
11271
|
key: 0,
|
|
11259
11272
|
class: "p-4 text-sm text-gray-500"
|
|
11260
|
-
},
|
|
11273
|
+
}, ey = /* @__PURE__ */ ve({
|
|
11261
11274
|
__name: "vs-input-address",
|
|
11262
11275
|
props: /* @__PURE__ */ Re({
|
|
11263
11276
|
api: { default: "" },
|
|
@@ -11355,8 +11368,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11355
11368
|
};
|
|
11356
11369
|
return l.api.replace(n, (B, E) => P[E.trim()] ?? "");
|
|
11357
11370
|
}
|
|
11358
|
-
return (O, P) => (u(), v("div",
|
|
11359
|
-
c("div",
|
|
11371
|
+
return (O, P) => (u(), v("div", Wg, [
|
|
11372
|
+
c("div", qg, [
|
|
11360
11373
|
Pe(c("input", {
|
|
11361
11374
|
type: "text",
|
|
11362
11375
|
"onUpdate:modelValue": P[0] || (P[0] = (B) => s.value = B),
|
|
@@ -11365,7 +11378,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11365
11378
|
class: se(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [U(o), { "!border-red-600": l.error }]]),
|
|
11366
11379
|
style: { border: "1px solid #CFD9E0" },
|
|
11367
11380
|
onKeydown: sr(De(L, ["prevent"]), ["enter"])
|
|
11368
|
-
}, null, 42,
|
|
11381
|
+
}, null, 42, Kg), [
|
|
11369
11382
|
[at, s.value]
|
|
11370
11383
|
]),
|
|
11371
11384
|
f.value.length ? (u(), v("button", {
|
|
@@ -11391,11 +11404,11 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11391
11404
|
key: 0,
|
|
11392
11405
|
class: "h-4 w-4"
|
|
11393
11406
|
}))
|
|
11394
|
-
], 8,
|
|
11407
|
+
], 8, Yg),
|
|
11395
11408
|
(u(), ye(Pt, { to: "body" }, [
|
|
11396
|
-
k.value ? (u(), v("div",
|
|
11397
|
-
c("div",
|
|
11398
|
-
c("div",
|
|
11409
|
+
k.value ? (u(), v("div", Gg, [
|
|
11410
|
+
c("div", Xg, [
|
|
11411
|
+
c("div", Zg, [
|
|
11399
11412
|
P[2] || (P[2] = c("span", null, "Результати пошуку", -1)),
|
|
11400
11413
|
c("button", {
|
|
11401
11414
|
class: "text-gray-500 hover:text-blue-600",
|
|
@@ -11410,18 +11423,18 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11410
11423
|
key: E,
|
|
11411
11424
|
onClick: (W) => q(B),
|
|
11412
11425
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"
|
|
11413
|
-
}, de(B.display_name), 9,
|
|
11426
|
+
}, de(B.display_name), 9, Jg))), 128))
|
|
11414
11427
|
]),
|
|
11415
|
-
f.value.length ? G("", !0) : (u(), v("div",
|
|
11428
|
+
f.value.length ? G("", !0) : (u(), v("div", Qg, " Не знайдено результатів "))
|
|
11416
11429
|
])
|
|
11417
11430
|
])) : G("", !0)
|
|
11418
11431
|
]))
|
|
11419
11432
|
]));
|
|
11420
11433
|
}
|
|
11421
|
-
}),
|
|
11434
|
+
}), ty = { class: "vs-datalist space-y-3" }, ny = { class: "space-y-3" }, ly = ["onClick", "disabled"], oy = {
|
|
11422
11435
|
key: 0,
|
|
11423
11436
|
class: "rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"
|
|
11424
|
-
},
|
|
11437
|
+
}, ay = ["disabled"], ry = /* @__PURE__ */ ve({
|
|
11425
11438
|
__name: "vs-input-datalist",
|
|
11426
11439
|
props: /* @__PURE__ */ Re({
|
|
11427
11440
|
schema: { default: () => [] },
|
|
@@ -11480,8 +11493,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11480
11493
|
...h
|
|
11481
11494
|
};
|
|
11482
11495
|
}
|
|
11483
|
-
return (h, S) => (u(), v("div",
|
|
11484
|
-
c("div",
|
|
11496
|
+
return (h, S) => (u(), v("div", ty, [
|
|
11497
|
+
c("div", ny, [
|
|
11485
11498
|
(u(!0), v(Ce, null, Ee(l.value, (L, F) => (u(), v("div", {
|
|
11486
11499
|
key: a.value[F],
|
|
11487
11500
|
class: se(["flex items-center gap-3 rounded-lg transition-colors", {
|
|
@@ -11503,9 +11516,9 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11503
11516
|
disabled: f.value
|
|
11504
11517
|
}, [
|
|
11505
11518
|
X(U(Zt), { class: "h-4 w-4" })
|
|
11506
|
-
], 8,
|
|
11519
|
+
], 8, ly)
|
|
11507
11520
|
], 2))), 128)),
|
|
11508
|
-
l.value.length === 0 ? (u(), v("div",
|
|
11521
|
+
l.value.length === 0 ? (u(), v("div", oy, de(t.emptyLabel), 1)) : G("", !0)
|
|
11509
11522
|
]),
|
|
11510
11523
|
c("button", {
|
|
11511
11524
|
type: "button",
|
|
@@ -11515,13 +11528,13 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11515
11528
|
}, [
|
|
11516
11529
|
X(U(Dt), { class: "h-4 w-4" }),
|
|
11517
11530
|
nt(" " + de(t.addButtonText), 1)
|
|
11518
|
-
], 8,
|
|
11531
|
+
], 8, ay)
|
|
11519
11532
|
]));
|
|
11520
11533
|
}
|
|
11521
|
-
}),
|
|
11534
|
+
}), sy = /* @__PURE__ */ He(ry, [["__scopeId", "data-v-d0065868"]]), iy = { class: "vs-dataform space-y-4" }, uy = ["draggable", "onDragstart", "onDragover", "onDragenter", "onDrop"], dy = { class: "flex items-center gap-2" }, cy = ["onClick"], py = { class: "text-sm font-medium text-gray-700" }, fy = { class: "flex items-center gap-2" }, my = ["title", "onClick", "disabled"], vy = ["title", "onClick", "disabled"], gy = {
|
|
11522
11535
|
key: 0,
|
|
11523
11536
|
class: "rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"
|
|
11524
|
-
},
|
|
11537
|
+
}, yy = ["disabled"], hy = /* @__PURE__ */ ve({
|
|
11525
11538
|
__name: "vs-input-dataform",
|
|
11526
11539
|
props: /* @__PURE__ */ Re({
|
|
11527
11540
|
schema: { default: () => [] },
|
|
@@ -11640,8 +11653,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11640
11653
|
if (ke.splice(ge, 0, Te), l.value = ke, _.value)
|
|
11641
11654
|
o.value === N && (o.value = ge);
|
|
11642
11655
|
else {
|
|
11643
|
-
const
|
|
11644
|
-
|
|
11656
|
+
const Ve = [...a.value], [Ne] = Ve.splice(N, 1);
|
|
11657
|
+
Ve.splice(ge, 0, Ne), a.value = Ve;
|
|
11645
11658
|
}
|
|
11646
11659
|
}
|
|
11647
11660
|
function ee() {
|
|
@@ -11668,7 +11681,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11668
11681
|
function Z() {
|
|
11669
11682
|
d.value = null, i.value = null, s.value = null;
|
|
11670
11683
|
}
|
|
11671
|
-
return (N, ge) => (u(), v("div",
|
|
11684
|
+
return (N, ge) => (u(), v("div", iy, [
|
|
11672
11685
|
(u(!0), v(Ce, null, Ee(n.value, (we, ie) => (u(), v("div", {
|
|
11673
11686
|
key: l.value[ie],
|
|
11674
11687
|
class: se(["relative border border-gray-200 rounded-lg bg-white transition vs-dataform__group", [
|
|
@@ -11687,7 +11700,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11687
11700
|
t.view !== "accordion" && !E(ie) ? "rounded-t-lg" : "rounded-lg"
|
|
11688
11701
|
]])
|
|
11689
11702
|
}, [
|
|
11690
|
-
c("div",
|
|
11703
|
+
c("div", dy, [
|
|
11691
11704
|
w.value ? (u(), ye(U(mn), {
|
|
11692
11705
|
key: 0,
|
|
11693
11706
|
class: "h-4 w-4 text-gray-400",
|
|
@@ -11702,10 +11715,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11702
11715
|
X(U(gn), {
|
|
11703
11716
|
class: se(["h-4 w-4 transition", E(ie) ? "-rotate-90" : "rotate-0"])
|
|
11704
11717
|
}, null, 8, ["class"])
|
|
11705
|
-
], 8,
|
|
11706
|
-
c("div",
|
|
11718
|
+
], 8, cy)) : G("", !0),
|
|
11719
|
+
c("div", py, de(`${f.value} (${ie + 1})`), 1)
|
|
11707
11720
|
]),
|
|
11708
|
-
c("div",
|
|
11721
|
+
c("div", fy, [
|
|
11709
11722
|
c("button", {
|
|
11710
11723
|
type: "button",
|
|
11711
11724
|
class: "p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",
|
|
@@ -11715,7 +11728,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11715
11728
|
draggable: "false"
|
|
11716
11729
|
}, [
|
|
11717
11730
|
X(U($r), { class: "h-4 w-4" })
|
|
11718
|
-
], 8,
|
|
11731
|
+
], 8, my),
|
|
11719
11732
|
c("button", {
|
|
11720
11733
|
type: "button",
|
|
11721
11734
|
class: "p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",
|
|
@@ -11725,7 +11738,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11725
11738
|
draggable: "false"
|
|
11726
11739
|
}, [
|
|
11727
11740
|
X(U(Zt), { class: "h-4 w-4" })
|
|
11728
|
-
], 8,
|
|
11741
|
+
], 8, vy)
|
|
11729
11742
|
])
|
|
11730
11743
|
], 2),
|
|
11731
11744
|
Pe(c("div", {
|
|
@@ -11744,8 +11757,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11744
11757
|
], 2), [
|
|
11745
11758
|
[Et, !E(ie)]
|
|
11746
11759
|
])
|
|
11747
|
-
], 42,
|
|
11748
|
-
n.value.length === 0 ? (u(), v("div",
|
|
11760
|
+
], 42, uy))), 128)),
|
|
11761
|
+
n.value.length === 0 ? (u(), v("div", gy, de(k.value), 1)) : G("", !0),
|
|
11749
11762
|
c("button", {
|
|
11750
11763
|
type: "button",
|
|
11751
11764
|
class: "flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",
|
|
@@ -11754,10 +11767,10 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11754
11767
|
}, [
|
|
11755
11768
|
X(U(Dt), { class: "h-4 w-4" }),
|
|
11756
11769
|
nt(" " + de(t.addButtonText), 1)
|
|
11757
|
-
], 8,
|
|
11770
|
+
], 8, yy)
|
|
11758
11771
|
]));
|
|
11759
11772
|
}
|
|
11760
|
-
}),
|
|
11773
|
+
}), by = /* @__PURE__ */ He(hy, [["__scopeId", "data-v-cfbcfed8"]]), Qn = "__vs_form_monaco_loader__", tn = "__vs_form_monaco_script_loader__", el = "__vs_form_monaco_editor_loader__", wy = /* @__PURE__ */ ve({
|
|
11761
11774
|
__name: "vs-input-monaco",
|
|
11762
11775
|
props: /* @__PURE__ */ Re({
|
|
11763
11776
|
syntax: { default: "xml" },
|
|
@@ -11896,14 +11909,14 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11896
11909
|
}, null, 512)
|
|
11897
11910
|
], 4));
|
|
11898
11911
|
}
|
|
11899
|
-
}),
|
|
11912
|
+
}), xy = {
|
|
11900
11913
|
VsInputText: An,
|
|
11901
11914
|
VsInputRadio: Do,
|
|
11902
11915
|
VsInputInlineSelect: Il,
|
|
11903
11916
|
"vs-input-text": An,
|
|
11904
11917
|
"vs-input-password": Qr,
|
|
11905
|
-
"vs-input-textarea":
|
|
11906
|
-
"vs-input-richtext":
|
|
11918
|
+
"vs-input-textarea": Oc,
|
|
11919
|
+
"vs-input-richtext": Rc,
|
|
11907
11920
|
"vs-input-mask": Jl,
|
|
11908
11921
|
"vs-input-number": ns,
|
|
11909
11922
|
"vs-input-radio": Do,
|
|
@@ -11925,31 +11938,31 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11925
11938
|
"vs-input-html": Mo,
|
|
11926
11939
|
"vs-input-email": oa,
|
|
11927
11940
|
"vs-input-tel": aa,
|
|
11928
|
-
"vs-input-datatable":
|
|
11941
|
+
"vs-input-datatable": wp,
|
|
11929
11942
|
// 20kb
|
|
11930
|
-
"vs-input-map":
|
|
11943
|
+
"vs-input-map": Mv,
|
|
11931
11944
|
// 50kb
|
|
11932
11945
|
"vs-input-file-list": gd,
|
|
11933
|
-
"vs-input-tags":
|
|
11934
|
-
"vs-input-slug":
|
|
11935
|
-
"vs-input-codegen":
|
|
11936
|
-
"vs-input-key-value":
|
|
11937
|
-
"vs-input-text[]":
|
|
11938
|
-
"vs-input-range":
|
|
11939
|
-
"vs-input-color":
|
|
11946
|
+
"vs-input-tags": Rv,
|
|
11947
|
+
"vs-input-slug": zv,
|
|
11948
|
+
"vs-input-codegen": Gv,
|
|
11949
|
+
"vs-input-key-value": sg,
|
|
11950
|
+
"vs-input-text[]": hg,
|
|
11951
|
+
"vs-input-range": Cg,
|
|
11952
|
+
"vs-input-color": kg,
|
|
11940
11953
|
"vs-input-native-select": Bo,
|
|
11941
11954
|
VsInputArraySelect: Ol,
|
|
11942
|
-
"vs-input-array":
|
|
11955
|
+
"vs-input-array": Vg,
|
|
11943
11956
|
"vs-input-array-select": Ol,
|
|
11944
11957
|
"array-select": Ol,
|
|
11945
|
-
"vs-input-address":
|
|
11958
|
+
"vs-input-address": ey,
|
|
11946
11959
|
// 7kb
|
|
11947
|
-
"vs-input-datalist":
|
|
11960
|
+
"vs-input-datalist": sy,
|
|
11948
11961
|
// 3kb
|
|
11949
|
-
"vs-input-dataform":
|
|
11962
|
+
"vs-input-dataform": by,
|
|
11950
11963
|
// 5kb
|
|
11951
|
-
"vs-input-monaco":
|
|
11952
|
-
},
|
|
11964
|
+
"vs-input-monaco": wy
|
|
11965
|
+
}, ky = /* @__PURE__ */ ve({
|
|
11953
11966
|
__name: "behavior",
|
|
11954
11967
|
props: {
|
|
11955
11968
|
api: {},
|
|
@@ -11979,7 +11992,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11979
11992
|
d = null;
|
|
11980
11993
|
}
|
|
11981
11994
|
}
|
|
11982
|
-
|
|
11995
|
+
Ae({ type: "warning", title: "Validation", message: l(i, d) });
|
|
11983
11996
|
return;
|
|
11984
11997
|
}
|
|
11985
11998
|
const s = await i.json();
|
|
@@ -11995,7 +12008,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
11995
12008
|
class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
|
|
11996
12009
|
}, de(o.button), 1));
|
|
11997
12010
|
}
|
|
11998
|
-
}),
|
|
12011
|
+
}), _y = { class: "flex flex-col gap-1 w-full" }, $y = { class: "w-full" }, Sy = ["disabled"], Cy = ["innerHTML"], Ly = 2e3, My = 10, ba = /* @__PURE__ */ ve({
|
|
11999
12012
|
__name: "vs-compact-form-layout",
|
|
12000
12013
|
props: /* @__PURE__ */ Re({
|
|
12001
12014
|
item: { default: {} },
|
|
@@ -12013,7 +12026,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12013
12026
|
const n = e, l = Ue(e, "modelValue"), a = t, o = y(() => Zr[`${n.layout}`]), i = ["label", "placeholder", "info", "description", "text", "html"], s = T(pe()), d = y(() => B(n.item, s.value)), f = y(() => {
|
|
12014
12027
|
const Q = { ...d.value ?? {} }, le = n.item?.name;
|
|
12015
12028
|
return le && $?.value?.[le] && Object.assign(Q, $.value[le]), Q.__locale = s.value, Q;
|
|
12016
|
-
}), k = y(() =>
|
|
12029
|
+
}), k = y(() => xy?.[`vs-input-${n.item.type}`]), $ = Ge("field-props"), b = y(() => {
|
|
12017
12030
|
const Q = U(k);
|
|
12018
12031
|
if (!Q) return /* @__PURE__ */ new Set();
|
|
12019
12032
|
const le = Q.props ?? Q.__vccOpts?.props;
|
|
@@ -12099,16 +12112,16 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12099
12112
|
q.value = !0;
|
|
12100
12113
|
try {
|
|
12101
12114
|
let J = await fetch(he), ee = 0;
|
|
12102
|
-
for (; J.status === 202 && ee <
|
|
12115
|
+
for (; J.status === 202 && ee < My; )
|
|
12103
12116
|
ee += 1, await new Promise((N) => {
|
|
12104
|
-
setTimeout(N,
|
|
12117
|
+
setTimeout(N, Ly);
|
|
12105
12118
|
}), J = await fetch(he);
|
|
12106
12119
|
if (J.status === 202) {
|
|
12107
|
-
|
|
12120
|
+
Ae({ type: "warning", title: "Validation", message: "Сервер ще обробляє запит. Спробуйте пізніше." });
|
|
12108
12121
|
return;
|
|
12109
12122
|
}
|
|
12110
12123
|
if (!J.ok) {
|
|
12111
|
-
|
|
12124
|
+
Ae({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
|
|
12112
12125
|
return;
|
|
12113
12126
|
}
|
|
12114
12127
|
const ce = await J.json(), $e = ce?.result !== void 0 ? ce.result : ce, z = n.item?.set;
|
|
@@ -12122,7 +12135,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12122
12135
|
D.value[N] = ie ?? null;
|
|
12123
12136
|
});
|
|
12124
12137
|
} catch (J) {
|
|
12125
|
-
console.error("API lookup error:", J),
|
|
12138
|
+
console.error("API lookup error:", J), Ae({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
|
|
12126
12139
|
} finally {
|
|
12127
12140
|
q.value = !1;
|
|
12128
12141
|
}
|
|
@@ -12177,11 +12190,11 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12177
12190
|
c("div", {
|
|
12178
12191
|
class: se(["flex w-full", `${n.item.type}-component`])
|
|
12179
12192
|
}, [
|
|
12180
|
-
c("div",
|
|
12193
|
+
c("div", _y, [
|
|
12181
12194
|
c("div", {
|
|
12182
12195
|
class: se(["flex items-center gap-2 w-full", { "flex-1": Y.value }])
|
|
12183
12196
|
}, [
|
|
12184
|
-
c("div",
|
|
12197
|
+
c("div", $y, [
|
|
12185
12198
|
(u(), ye(yt(k.value), Gt(S.value, {
|
|
12186
12199
|
modelValue: l.value,
|
|
12187
12200
|
"onUpdate:modelValue": le[0] || (le[0] = (he) => l.value = he),
|
|
@@ -12202,21 +12215,21 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12202
12215
|
key: 0,
|
|
12203
12216
|
class: "h-4 w-4"
|
|
12204
12217
|
}))
|
|
12205
|
-
], 8,
|
|
12218
|
+
], 8, Sy)) : G("", !0)
|
|
12206
12219
|
], 2),
|
|
12207
12220
|
f.value.description && n.layout !== "settings" ? (u(), v("p", {
|
|
12208
12221
|
key: 0,
|
|
12209
12222
|
class: "text-sm text-gray-500",
|
|
12210
12223
|
innerHTML: f.value.description
|
|
12211
|
-
}, null, 8,
|
|
12224
|
+
}, null, 8, Cy)) : G("", !0)
|
|
12212
12225
|
]),
|
|
12213
|
-
f.value.behavior?.api && f.value.behavior?.button ? (u(), ye(
|
|
12226
|
+
f.value.behavior?.api && f.value.behavior?.button ? (u(), ye(ky, Gt({ key: 0 }, f.value.behavior, { value: l.value }), null, 16, ["value"])) : G("", !0)
|
|
12214
12227
|
], 2)
|
|
12215
12228
|
]),
|
|
12216
12229
|
_: 1
|
|
12217
12230
|
}, 8, ["ua", "error", "item", "columns", "label"]));
|
|
12218
12231
|
}
|
|
12219
|
-
}),
|
|
12232
|
+
}), Ay = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, Vy = { class: "vs-compact-form-navigation__rail mt-[6px]" }, Dy = ["onClick"], Ty = /* @__PURE__ */ ve({
|
|
12220
12233
|
__name: "vs-compact-form-navigation",
|
|
12221
12234
|
props: {
|
|
12222
12235
|
target: {},
|
|
@@ -12348,8 +12361,8 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12348
12361
|
class: se(s.value),
|
|
12349
12362
|
style: Fe(d.value)
|
|
12350
12363
|
}, [
|
|
12351
|
-
c("h2",
|
|
12352
|
-
c("div",
|
|
12364
|
+
c("h2", Ay, de(W.title), 1),
|
|
12365
|
+
c("div", Vy, [
|
|
12353
12366
|
(u(!0), v(Ce, null, Ee(l.value, (_e) => (u(), v("div", {
|
|
12354
12367
|
key: _e.id,
|
|
12355
12368
|
class: se([
|
|
@@ -12368,12 +12381,12 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12368
12381
|
])
|
|
12369
12382
|
}, [
|
|
12370
12383
|
c("span", null, de(_e.text), 1)
|
|
12371
|
-
], 10,
|
|
12384
|
+
], 10, Dy)
|
|
12372
12385
|
], 2))), 128))
|
|
12373
12386
|
])
|
|
12374
12387
|
], 6)) : G("", !0);
|
|
12375
12388
|
}
|
|
12376
|
-
}),
|
|
12389
|
+
}), Iy = /* @__PURE__ */ He(Ty, [["__scopeId", "data-v-1584a562"]]), Lt = {
|
|
12377
12390
|
required: "Це поле є обов’язковим",
|
|
12378
12391
|
email: "Неправильний email",
|
|
12379
12392
|
tel: "Неправильний телефон",
|
|
@@ -12381,20 +12394,20 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12381
12394
|
maxlength: (e) => `Максимальна довжина — ${e} символів`,
|
|
12382
12395
|
min: (e) => `Значення має бути не менше ${e}`,
|
|
12383
12396
|
max: (e) => `Значення має бути не більше ${e}`
|
|
12384
|
-
},
|
|
12397
|
+
}, Fy = /* @__PURE__ */ new Set(["select", "inline-select", "array-select"]), Ey = (e, t) => typeof e == "string" ? e.trim() ? !1 : Lt.required : Array.isArray(e) ? e.map((l) => typeof l == "string" ? l.trim() : l).filter((l) => l != null && l !== "").length ? !1 : Lt.required : typeof e == "number" ? Number?.isNaN(e) ? Lt?.required : !1 : typeof e == "boolean" ? t && Fy.has(t) || e ? !1 : Lt.required : e ? !1 : Lt.required, Py = (e) => {
|
|
12385
12398
|
const t = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
|
|
12386
12399
|
return e ? t.test(e) ? !1 : Lt.email : !1;
|
|
12387
|
-
},
|
|
12400
|
+
}, Oy = (e, t) => {
|
|
12388
12401
|
if (!e) return !1;
|
|
12389
12402
|
const n = String(e).trim();
|
|
12390
12403
|
if (!/^\+[1-9]\d{1,14}$/.test(n)) return Lt.tel;
|
|
12391
12404
|
const o = (typeof t?.digits == "number" && Number.isFinite(t.digits) && t.digits > 0 ? t.digits : Yt(Wt)) || Yt(Wt);
|
|
12392
12405
|
return n.length - 1 !== o ? Lt.tel : !1;
|
|
12393
|
-
}, wa = (e) => e == null ? 0 : typeof e == "string" ? e.trim().length : Array.isArray(e) ? e.length : typeof e == "number" ? e.toString().length : String(e).length,
|
|
12406
|
+
}, wa = (e) => e == null ? 0 : typeof e == "string" ? e.trim().length : Array.isArray(e) ? e.length : typeof e == "number" ? e.toString().length : String(e).length, Ry = (e, t) => {
|
|
12394
12407
|
if (e == null) return !1;
|
|
12395
12408
|
const n = Number(t?.value ?? t?.length);
|
|
12396
12409
|
return Number.isFinite(n) && wa(e) < n ? t?.message || Lt.minlength(n) : !1;
|
|
12397
|
-
},
|
|
12410
|
+
}, By = (e, t) => {
|
|
12398
12411
|
if (e == null || e === "") return !1;
|
|
12399
12412
|
const n = Number(t?.value ?? t?.length);
|
|
12400
12413
|
return Number.isFinite(n) && wa(e) > n ? t?.message || Lt.maxlength(n) : !1;
|
|
@@ -12405,19 +12418,19 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12405
12418
|
return t ? Number(t) : Number.NaN;
|
|
12406
12419
|
}
|
|
12407
12420
|
return Number(e);
|
|
12408
|
-
},
|
|
12421
|
+
}, Ny = (e, t) => {
|
|
12409
12422
|
if (e == null || e === "") return !1;
|
|
12410
12423
|
const n = Number(t?.value);
|
|
12411
12424
|
if (!Number.isFinite(n)) return !1;
|
|
12412
12425
|
const l = al(e);
|
|
12413
12426
|
return Number.isFinite(l) && l < n ? t?.message || Lt.min(n) : !1;
|
|
12414
|
-
},
|
|
12427
|
+
}, jy = (e, t) => {
|
|
12415
12428
|
if (e == null || e === "") return !1;
|
|
12416
12429
|
const n = Number(t?.value);
|
|
12417
12430
|
if (!Number.isFinite(n)) return !1;
|
|
12418
12431
|
const l = al(e);
|
|
12419
12432
|
return Number.isFinite(l) && l > n ? t?.message || Lt.max(n) : !1;
|
|
12420
|
-
},
|
|
12433
|
+
}, zy = (e, t, n) => {
|
|
12421
12434
|
if (e == null || e === "") return !1;
|
|
12422
12435
|
const l = t?.field;
|
|
12423
12436
|
if (!l || !n) return !1;
|
|
@@ -12425,39 +12438,39 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12425
12438
|
if (a == null || a === "") return !1;
|
|
12426
12439
|
const o = al(e), i = al(a);
|
|
12427
12440
|
return !Number.isFinite(o) || !Number.isFinite(i) ? !1 : o > i ? t?.message || `Значення має бути не більше ${i}` : !1;
|
|
12428
|
-
},
|
|
12441
|
+
}, Uy = (e, t) => {
|
|
12429
12442
|
const n = t.pattern ?? t.regexp, l = typeof n == "string" ? new RegExp(n) : n;
|
|
12430
12443
|
if (Array.isArray(e)) {
|
|
12431
12444
|
const a = e.filter(Boolean);
|
|
12432
12445
|
return a.length === 0 || a.every((o) => l.test(o)) ? !1 : t.message;
|
|
12433
12446
|
}
|
|
12434
12447
|
return !l.test(e) && e ? t.message : !1;
|
|
12435
|
-
},
|
|
12448
|
+
}, Hy = (e, t) => !1, Wy = (e, t, n, l) => {
|
|
12436
12449
|
switch (typeof t == "string" ? t : t.type) {
|
|
12437
12450
|
case "required":
|
|
12438
|
-
return
|
|
12451
|
+
return Ey(e, l);
|
|
12439
12452
|
case "email":
|
|
12440
|
-
return
|
|
12453
|
+
return Py(e);
|
|
12441
12454
|
case "tel":
|
|
12442
|
-
return
|
|
12455
|
+
return Oy(e, typeof t == "object" ? t : void 0);
|
|
12443
12456
|
case "regexp":
|
|
12444
|
-
return
|
|
12457
|
+
return Uy(e, t);
|
|
12445
12458
|
case "minlength":
|
|
12446
|
-
return Oy(e, t);
|
|
12447
|
-
case "maxlength":
|
|
12448
12459
|
return Ry(e, t);
|
|
12449
|
-
case "
|
|
12460
|
+
case "maxlength":
|
|
12450
12461
|
return By(e, t);
|
|
12451
|
-
case "
|
|
12462
|
+
case "min":
|
|
12452
12463
|
return Ny(e, t);
|
|
12464
|
+
case "max":
|
|
12465
|
+
return jy(e, t);
|
|
12453
12466
|
case "maxField":
|
|
12454
|
-
return
|
|
12467
|
+
return zy(e, t, n);
|
|
12455
12468
|
case "custom":
|
|
12456
|
-
return
|
|
12469
|
+
return Hy();
|
|
12457
12470
|
default:
|
|
12458
12471
|
return !1;
|
|
12459
12472
|
}
|
|
12460
|
-
},
|
|
12473
|
+
}, qy = {
|
|
12461
12474
|
autocomplete: "select",
|
|
12462
12475
|
combobox: "select",
|
|
12463
12476
|
datepicker: "date",
|
|
@@ -12473,7 +12486,7 @@ const Mm = { class: "vs-map-body" }, Am = {
|
|
|
12473
12486
|
};
|
|
12474
12487
|
function qo(e) {
|
|
12475
12488
|
const t = e?.toLowerCase();
|
|
12476
|
-
return
|
|
12489
|
+
return qy[t] || t;
|
|
12477
12490
|
}
|
|
12478
12491
|
function Ul(e, t = !1) {
|
|
12479
12492
|
if (Array.isArray(e)) {
|
|
@@ -12504,7 +12517,7 @@ function Ul(e, t = !1) {
|
|
|
12504
12517
|
l[1].type?.includes("list") && (a.multiple = !0), !a.api && l[1].data && (a.api = `/api/suggest/${l[1].data}`), Array.isArray(a.schema) && (a.schema = Ul(a.schema, a.disabled)), n.push(a);
|
|
12505
12518
|
}), n;
|
|
12506
12519
|
}
|
|
12507
|
-
function
|
|
12520
|
+
function Ky(e, t, n = !1) {
|
|
12508
12521
|
const l = y(() => Ul(
|
|
12509
12522
|
(Array.isArray(t), t),
|
|
12510
12523
|
typeof n == "boolean" ? n : n.value
|
|
@@ -12534,7 +12547,7 @@ function qy(e, t, n = !1) {
|
|
|
12534
12547
|
}
|
|
12535
12548
|
let F = !1, D = null;
|
|
12536
12549
|
L.forEach((q) => {
|
|
12537
|
-
const Y =
|
|
12550
|
+
const Y = Wy(
|
|
12538
12551
|
e.value[b.name],
|
|
12539
12552
|
q,
|
|
12540
12553
|
e.value,
|
|
@@ -12568,7 +12581,7 @@ function qy(e, t, n = !1) {
|
|
|
12568
12581
|
visibleSchema: k
|
|
12569
12582
|
};
|
|
12570
12583
|
}
|
|
12571
|
-
const
|
|
12584
|
+
const Yy = { class: "flex w-full h-full min-h-0 gap-6" }, Gy = {
|
|
12572
12585
|
key: 0,
|
|
12573
12586
|
"data-orientation": "horizontal",
|
|
12574
12587
|
role: "none",
|
|
@@ -12606,7 +12619,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12606
12619
|
validate: $,
|
|
12607
12620
|
reset: b,
|
|
12608
12621
|
visibleSchema: _
|
|
12609
|
-
} =
|
|
12622
|
+
} = Ky(f, a.schema, ir(a, "disabled")), m = T(null), w = T(null), h = T({}), S = y(() => a.navigation), L = y(() => a.navWidth), F = y(() => a.style?.columns), D = Object.freeze({ container: 12, label: 3 }), q = y(() => a.columns ?? F.value ?? D), Y = y(() => a.columns != null || F.value != null), O = y(() => Y.value ? "horizontal" : a.layout), P = (J) => J?.columns ? "horizontal" : O.value, B = (J) => J?.columns ?? q.value, E = y(() => {
|
|
12610
12623
|
const J = {}, ee = (ce) => {
|
|
12611
12624
|
if (!ce) return;
|
|
12612
12625
|
(Array.isArray(ce) ? ce.map((z, Z) => ({ key: String(Z), entry: z })) : typeof ce == "object" ? Object.entries(ce).map(([z, Z]) => ({ key: z, entry: Z })) : []).forEach(({ key: z, entry: Z }) => {
|
|
@@ -12659,7 +12672,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12659
12672
|
le(J);
|
|
12660
12673
|
},
|
|
12661
12674
|
{ immediate: !0, deep: !0 }
|
|
12662
|
-
), fn("form", i), fn("values", f), Ge("form-root-values", null) || fn("form-root-values", f), fn("field-props", h), fn("schema-by-name", E), (J, ee) => (u(), v("div",
|
|
12675
|
+
), fn("form", i), fn("values", f), Ge("form-root-values", null) || fn("form-root-values", f), fn("field-props", h), fn("schema-by-name", E), (J, ee) => (u(), v("div", Yy, [
|
|
12663
12676
|
c("div", {
|
|
12664
12677
|
class: "flex-1 min-h-0 overflow-y-auto overflow-x-visible",
|
|
12665
12678
|
ref_key: "formScrollContainer",
|
|
@@ -12689,11 +12702,11 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12689
12702
|
error: U(k)[ce.name],
|
|
12690
12703
|
onValueSelected: pe
|
|
12691
12704
|
}, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
|
|
12692
|
-
P(ce) === "settings" && $e + 1 !== U(_).length ? (u(), v("div",
|
|
12705
|
+
P(ce) === "settings" && $e + 1 !== U(_).length ? (u(), v("div", Gy)) : G("", !0)
|
|
12693
12706
|
], 2))), 128))
|
|
12694
12707
|
], 34)
|
|
12695
12708
|
], 512),
|
|
12696
|
-
X(
|
|
12709
|
+
X(Iy, {
|
|
12697
12710
|
target: m.value,
|
|
12698
12711
|
"scroll-container": w.value,
|
|
12699
12712
|
enabled: S.value,
|
|
@@ -12701,7 +12714,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12701
12714
|
}, null, 8, ["target", "scroll-container", "enabled", "width"])
|
|
12702
12715
|
]));
|
|
12703
12716
|
}
|
|
12704
|
-
}),
|
|
12717
|
+
}), Xy = { class: "relative" }, Zy = { class: "w-full h-full fixed top-0 start-0 bg-black bg-opacity-50" }, Jy = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Qy = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, eh = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, th = { class: "p-4 mim-h-0 h-full overflow-auto" }, nh = /* @__PURE__ */ ve({
|
|
12705
12718
|
__name: "modal-edit",
|
|
12706
12719
|
props: {
|
|
12707
12720
|
schema: {},
|
|
@@ -12718,7 +12731,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12718
12731
|
const h = n.method?.trim().toUpperCase();
|
|
12719
12732
|
return h === "GET" || h === "POST" || h === "PUT" ? h : f.value === "add" ? "POST" : "PUT";
|
|
12720
12733
|
}, $ = () => {
|
|
12721
|
-
|
|
12734
|
+
Ae({
|
|
12722
12735
|
type: "success",
|
|
12723
12736
|
title: "Успішно",
|
|
12724
12737
|
message: `Дані успішно ${f.value === "add" ? "збережено" : "оновлено"}`
|
|
@@ -12736,7 +12749,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12736
12749
|
}
|
|
12737
12750
|
const S = await h.json().catch(() => ({})), L = S.message || S.error;
|
|
12738
12751
|
if (h.status === 400) {
|
|
12739
|
-
|
|
12752
|
+
Ae({
|
|
12740
12753
|
type: "warning",
|
|
12741
12754
|
title: "Помилка валідації",
|
|
12742
12755
|
message: L || "Некоректні дані (400)"
|
|
@@ -12744,7 +12757,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12744
12757
|
return;
|
|
12745
12758
|
}
|
|
12746
12759
|
if (h.status === 403) {
|
|
12747
|
-
|
|
12760
|
+
Ae({
|
|
12748
12761
|
type: "warning",
|
|
12749
12762
|
title: "Доступ заборонено",
|
|
12750
12763
|
message: L || "Доступ заборонено (403)"
|
|
@@ -12752,14 +12765,14 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12752
12765
|
return;
|
|
12753
12766
|
}
|
|
12754
12767
|
if (h.status === 500) {
|
|
12755
|
-
|
|
12768
|
+
Ae({
|
|
12756
12769
|
type: "error",
|
|
12757
12770
|
title: "Серверна помилка",
|
|
12758
12771
|
message: L || "Виникла помилка на сервері (500)"
|
|
12759
12772
|
});
|
|
12760
12773
|
return;
|
|
12761
12774
|
}
|
|
12762
|
-
|
|
12775
|
+
Ae({
|
|
12763
12776
|
type: "error",
|
|
12764
12777
|
title: "Помилка",
|
|
12765
12778
|
message: L || `Статус: ${h.status}`
|
|
@@ -12768,7 +12781,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12768
12781
|
async function m() {
|
|
12769
12782
|
const h = i.value.validate();
|
|
12770
12783
|
if (h) {
|
|
12771
|
-
|
|
12784
|
+
Ae({
|
|
12772
12785
|
type: "warning",
|
|
12773
12786
|
title: "Помилка валідації",
|
|
12774
12787
|
message: Object.entries(h).map(([L, F]) => `${L}: ${F}`).join(`
|
|
@@ -12790,7 +12803,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12790
12803
|
});
|
|
12791
12804
|
await _(F);
|
|
12792
12805
|
} catch (F) {
|
|
12793
|
-
|
|
12806
|
+
Ae({
|
|
12794
12807
|
type: "error",
|
|
12795
12808
|
title: "Помилка з’єднання",
|
|
12796
12809
|
message: F.message || "Не вдалося виконати запит"
|
|
@@ -12809,7 +12822,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12809
12822
|
});
|
|
12810
12823
|
await _(L);
|
|
12811
12824
|
} catch (L) {
|
|
12812
|
-
|
|
12825
|
+
Ae({
|
|
12813
12826
|
type: "error",
|
|
12814
12827
|
title: "Помилка з’єднання",
|
|
12815
12828
|
message: L.message || "Не вдалося виконати запит"
|
|
@@ -12826,7 +12839,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12826
12839
|
if (n.form && !n.schema) {
|
|
12827
12840
|
const h = await fetch(`/api/template/form/${n.form}`);
|
|
12828
12841
|
if (!h.ok) {
|
|
12829
|
-
|
|
12842
|
+
Ae({
|
|
12830
12843
|
type: h.status >= 400 && h.status < 500 ? "warning" : "error",
|
|
12831
12844
|
title: "Error",
|
|
12832
12845
|
message: `Error code: ${h.status}`
|
|
@@ -12839,7 +12852,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12839
12852
|
s.value = n.token;
|
|
12840
12853
|
const h = await fetch(`/api/form/${s.value}`);
|
|
12841
12854
|
if (!h.ok) {
|
|
12842
|
-
|
|
12855
|
+
Ae({
|
|
12843
12856
|
type: h.status >= 400 && h.status < 500 ? "warning" : "error",
|
|
12844
12857
|
title: "Error",
|
|
12845
12858
|
message: `Error code: ${h.status}`
|
|
@@ -12853,17 +12866,17 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12853
12866
|
});
|
|
12854
12867
|
}
|
|
12855
12868
|
} catch (h) {
|
|
12856
|
-
|
|
12869
|
+
Ae({
|
|
12857
12870
|
type: "error",
|
|
12858
12871
|
title: "Error",
|
|
12859
12872
|
message: h.message || "Unexpected error"
|
|
12860
12873
|
}), console.error(h);
|
|
12861
12874
|
}
|
|
12862
|
-
}), (h, S) => (u(), v("div",
|
|
12863
|
-
c("div",
|
|
12864
|
-
c("div",
|
|
12865
|
-
c("div",
|
|
12866
|
-
c("h3",
|
|
12875
|
+
}), (h, S) => (u(), v("div", Xy, [
|
|
12876
|
+
c("div", Zy, [
|
|
12877
|
+
c("div", Jy, [
|
|
12878
|
+
c("div", Qy, [
|
|
12879
|
+
c("h3", eh, de(f.value === "add" ? "Додати" : "Змінити"), 1),
|
|
12867
12880
|
c("button", {
|
|
12868
12881
|
onClick: w,
|
|
12869
12882
|
type: "button",
|
|
@@ -12873,7 +12886,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12873
12886
|
X(U($t), { class: "h-4 w-4 flex-shrink-0" })
|
|
12874
12887
|
])
|
|
12875
12888
|
]),
|
|
12876
|
-
c("div",
|
|
12889
|
+
c("div", th, [
|
|
12877
12890
|
a.value ? (u(), ye(Ot, {
|
|
12878
12891
|
key: 0,
|
|
12879
12892
|
schema: a.value,
|
|
@@ -12900,15 +12913,15 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12900
12913
|
])
|
|
12901
12914
|
]));
|
|
12902
12915
|
}
|
|
12903
|
-
}),
|
|
12916
|
+
}), lh = Xl.form.richtext, oh = Zl.form.richtext, ih = {
|
|
12904
12917
|
en: {
|
|
12905
12918
|
form: {
|
|
12906
|
-
richtext:
|
|
12919
|
+
richtext: lh
|
|
12907
12920
|
}
|
|
12908
12921
|
},
|
|
12909
12922
|
uk: {
|
|
12910
12923
|
form: {
|
|
12911
|
-
richtext:
|
|
12924
|
+
richtext: oh
|
|
12912
12925
|
}
|
|
12913
12926
|
}
|
|
12914
12927
|
}, Ko = (e = { mode: "edit", schema: null }) => new Promise((t) => {
|
|
@@ -12918,7 +12931,7 @@ const Ky = { class: "flex w-full h-full min-h-0 gap-6" }, Yy = {
|
|
|
12918
12931
|
visible: !0,
|
|
12919
12932
|
size: "medium",
|
|
12920
12933
|
closeClickBack: !0,
|
|
12921
|
-
content:
|
|
12934
|
+
content: nh,
|
|
12922
12935
|
contentProps: {
|
|
12923
12936
|
...e,
|
|
12924
12937
|
onClose: () => {
|
|
@@ -12939,40 +12952,40 @@ export {
|
|
|
12939
12952
|
Hd as A,
|
|
12940
12953
|
Bo as B,
|
|
12941
12954
|
Il as C,
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
+
Oc as D,
|
|
12956
|
+
Rc as E,
|
|
12957
|
+
lh as F,
|
|
12958
|
+
oh as G,
|
|
12959
|
+
wp as H,
|
|
12960
|
+
Mv as I,
|
|
12961
|
+
Rv as J,
|
|
12962
|
+
zv as K,
|
|
12963
|
+
Gv as L,
|
|
12964
|
+
sg as M,
|
|
12965
|
+
hg as N,
|
|
12966
|
+
Vg as O,
|
|
12967
|
+
ey as P,
|
|
12955
12968
|
Ol as Q,
|
|
12956
12969
|
Xs as V,
|
|
12957
12970
|
He as _,
|
|
12958
12971
|
Ot as a,
|
|
12959
|
-
|
|
12972
|
+
wy as b,
|
|
12960
12973
|
Rl as c,
|
|
12961
|
-
|
|
12974
|
+
nh as d,
|
|
12962
12975
|
An as e,
|
|
12963
12976
|
ns as f,
|
|
12964
12977
|
la as g,
|
|
12965
12978
|
Cr as h,
|
|
12966
|
-
|
|
12979
|
+
xy as i,
|
|
12967
12980
|
Mo as j,
|
|
12968
12981
|
Jl as k,
|
|
12969
12982
|
oa as l,
|
|
12970
12983
|
aa as m,
|
|
12971
|
-
|
|
12972
|
-
|
|
12984
|
+
Cg as n,
|
|
12985
|
+
kg as o,
|
|
12973
12986
|
Do as p,
|
|
12974
12987
|
au as q,
|
|
12975
|
-
|
|
12988
|
+
ih as r,
|
|
12976
12989
|
hu as s,
|
|
12977
12990
|
Vl as t,
|
|
12978
12991
|
Tl as u,
|