@opengis/gis 0.2.122 → 0.2.124
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/{CardIcon-Bu_mm6QX.js → CardIcon-BLMtCXLH.js} +1 -1
- package/dist/{EntityTablePage-BQKMFYxV.js → EntityTablePage-C4myYlFG.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-CF1EEob3.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DbJh2Fwh.js} +1 -1
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-B2ErIdAR.js → HeaderActions.vue_vue_type_script_setup_true_lang-K7A_UX_L.js} +1 -1
- package/dist/{MapSettings-eE5rNSLf.js → MapSettings-DB00GdG3.js} +1 -1
- package/dist/{RastersTablePage-B_vF9yl7.js → RastersTablePage-BJ8Fx2lR.js} +1 -1
- package/dist/{cartocss-DcepkzNt.js → cartocss-C9FsDCQE.js} +5 -5
- package/dist/{import-utils-CDIgsIUf.js → import-utils-CGjOAbEq.js} +1 -1
- package/dist/{index-CActL7Mw.js → index-DWGGabsq.js} +441 -441
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +20 -20
- package/dist/{raster-BsBJMgM3.js → raster-fgKYYXVI.js} +3 -3
- package/dist/{register-BSlpAeRe.js → register-C-I3igBi.js} +3 -3
- package/dist/{service-CbPCldfY.js → service-dErle1NR.js} +5 -5
- package/dist/{vs-datatable-RkRQEa10.js → vs-datatable-BKFXZaVJ.js} +1 -1
- package/module/test/cls/doc_status.json +31 -31
- package/module/test/select/core.user_uid.sql +1 -1
- package/package.json +1 -1
|
@@ -14,11 +14,11 @@ const vn = /* @__PURE__ */ he({
|
|
|
14
14
|
columnsConfig: { default: () => [] }
|
|
15
15
|
},
|
|
16
16
|
setup(n) {
|
|
17
|
-
const t = n, a = At(), l = tr(),
|
|
17
|
+
const t = n, a = At(), l = tr(), x = B(() => {
|
|
18
18
|
const f = String(a.params.id ?? ""), v = String(a.params.action ?? "");
|
|
19
19
|
return f ? v === t.editAction ? t.components.edit : f === t.createParam ? t.components.create : t.components.card : t.components.table;
|
|
20
20
|
});
|
|
21
|
-
return (f, v) => (o(), fe(qn(
|
|
21
|
+
return (f, v) => (o(), fe(qn(x.value), {
|
|
22
22
|
"entity-key": t.entityKey,
|
|
23
23
|
"entity-base-path": t.entityBasePath,
|
|
24
24
|
"columns-config": t.columnsConfig
|
|
@@ -35,16 +35,16 @@ const vn = /* @__PURE__ */ he({
|
|
|
35
35
|
__name: "RegistersWrapper",
|
|
36
36
|
setup(n) {
|
|
37
37
|
const t = Ge(
|
|
38
|
-
() => import("./EntityTablePage-
|
|
38
|
+
() => import("./EntityTablePage-C4myYlFG.js")
|
|
39
39
|
), a = Ge(
|
|
40
40
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
41
41
|
), l = Ge(
|
|
42
42
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
43
|
-
),
|
|
43
|
+
), x = Ge(() => import("./register-C-I3igBi.js")), f = {
|
|
44
44
|
table: t,
|
|
45
45
|
create: a,
|
|
46
46
|
edit: l,
|
|
47
|
-
card:
|
|
47
|
+
card: x
|
|
48
48
|
}, v = [
|
|
49
49
|
{
|
|
50
50
|
ua: "Назва",
|
|
@@ -86,16 +86,16 @@ const vn = /* @__PURE__ */ he({
|
|
|
86
86
|
__name: "DatasetsWrapper",
|
|
87
87
|
setup(n) {
|
|
88
88
|
const t = Ge(
|
|
89
|
-
() => import("./EntityTablePage-
|
|
89
|
+
() => import("./EntityTablePage-C4myYlFG.js")
|
|
90
90
|
), a = Ge(
|
|
91
91
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
92
92
|
), l = Ge(
|
|
93
93
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
94
|
-
),
|
|
94
|
+
), x = Ge(() => import("./service-dErle1NR.js")), f = {
|
|
95
95
|
table: t,
|
|
96
96
|
create: a,
|
|
97
97
|
edit: l,
|
|
98
|
-
card:
|
|
98
|
+
card: x
|
|
99
99
|
}, v = [
|
|
100
100
|
{
|
|
101
101
|
ua: "Назва",
|
|
@@ -154,16 +154,16 @@ const vn = /* @__PURE__ */ he({
|
|
|
154
154
|
__name: "RastersWrapper",
|
|
155
155
|
setup(n) {
|
|
156
156
|
const t = Ge(
|
|
157
|
-
() => import("./RastersTablePage-
|
|
157
|
+
() => import("./RastersTablePage-BJ8Fx2lR.js")
|
|
158
158
|
), a = Ge(
|
|
159
159
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
160
160
|
), l = Ge(
|
|
161
161
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
162
|
-
),
|
|
162
|
+
), x = Ge(() => import("./raster-fgKYYXVI.js")), f = {
|
|
163
163
|
table: t,
|
|
164
164
|
create: a,
|
|
165
165
|
edit: l,
|
|
166
|
-
card:
|
|
166
|
+
card: x
|
|
167
167
|
}, v = [
|
|
168
168
|
{
|
|
169
169
|
ua: "Назва",
|
|
@@ -211,16 +211,16 @@ const vn = /* @__PURE__ */ he({
|
|
|
211
211
|
__name: "CartocssWrapper",
|
|
212
212
|
setup(n) {
|
|
213
213
|
const t = Ge(
|
|
214
|
-
() => import("./EntityTablePage-
|
|
214
|
+
() => import("./EntityTablePage-C4myYlFG.js")
|
|
215
215
|
), a = Ge(
|
|
216
216
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
217
217
|
), l = Ge(
|
|
218
218
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
219
|
-
),
|
|
219
|
+
), x = Ge(() => import("./cartocss-C9FsDCQE.js")), f = {
|
|
220
220
|
table: t,
|
|
221
221
|
create: a,
|
|
222
222
|
edit: l,
|
|
223
|
-
card:
|
|
223
|
+
card: x
|
|
224
224
|
}, v = [
|
|
225
225
|
{
|
|
226
226
|
ua: "Назва",
|
|
@@ -283,8 +283,8 @@ const vn = /* @__PURE__ */ he({
|
|
|
283
283
|
}
|
|
284
284
|
}), Ue = (n, t) => {
|
|
285
285
|
const a = n.__vccOpts || n;
|
|
286
|
-
for (const [l,
|
|
287
|
-
a[l] =
|
|
286
|
+
for (const [l, x] of t)
|
|
287
|
+
a[l] = x;
|
|
288
288
|
return a;
|
|
289
289
|
}, Rr = {}, Ir = {
|
|
290
290
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -321,16 +321,16 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
321
321
|
__name: "MapsWrapper",
|
|
322
322
|
setup(n) {
|
|
323
323
|
const t = Ge(
|
|
324
|
-
() => import("./EntityTablePage-
|
|
324
|
+
() => import("./EntityTablePage-C4myYlFG.js")
|
|
325
325
|
), a = Ge(
|
|
326
326
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
327
327
|
), l = Ge(
|
|
328
328
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
329
|
-
),
|
|
329
|
+
), x = Ge(() => import("./MapSettings-DB00GdG3.js")), f = {
|
|
330
330
|
table: t,
|
|
331
331
|
create: a,
|
|
332
332
|
edit: l,
|
|
333
|
-
card:
|
|
333
|
+
card: x
|
|
334
334
|
}, v = [
|
|
335
335
|
{
|
|
336
336
|
ua: "Назва",
|
|
@@ -418,26 +418,26 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
418
418
|
},
|
|
419
419
|
emits: ["update:counts"],
|
|
420
420
|
setup(n, { expose: t, emit: a }) {
|
|
421
|
-
const l = n,
|
|
422
|
-
const
|
|
423
|
-
return A.value.slice(
|
|
421
|
+
const l = n, x = a, f = Dt(), v = At(), p = N(Number(v.query.page) || 1), P = N(!1), E = N(0), A = N([]), c = B(() => {
|
|
422
|
+
const w = (p.value - 1) * Rn, T = w + Rn;
|
|
423
|
+
return A.value.slice(w, T);
|
|
424
424
|
}), b = N(!0), r = N(null), u = N(null);
|
|
425
425
|
let _ = null, d = null;
|
|
426
|
-
const i = (
|
|
427
|
-
const z = new URLSearchParams(), H =
|
|
426
|
+
const i = (w = "", T = "") => {
|
|
427
|
+
const z = new URLSearchParams(), H = w.trim();
|
|
428
428
|
H && z.set("search", H);
|
|
429
429
|
const Y = (T || "").trim();
|
|
430
430
|
Y && z.set("type", Y);
|
|
431
431
|
const ne = z.toString();
|
|
432
432
|
return ne ? `/api/user-cls?${ne}` : "/api/user-cls";
|
|
433
|
-
}, k = async (
|
|
433
|
+
}, k = async (w = "", T = "") => {
|
|
434
434
|
try {
|
|
435
435
|
b.value = !0, r.value = null;
|
|
436
|
-
const z = i(
|
|
436
|
+
const z = i(w, T), H = await fetch(z);
|
|
437
437
|
if (!H.ok)
|
|
438
438
|
throw new Error(`HTTP error: ${H.status}`);
|
|
439
439
|
const Y = await H.json();
|
|
440
|
-
if (A.value = Y.data, !
|
|
440
|
+
if (A.value = Y.data, !w.trim())
|
|
441
441
|
E.value = Y.data.length;
|
|
442
442
|
else if (E.value === 0) {
|
|
443
443
|
const ne = await fetch(i("", T));
|
|
@@ -446,7 +446,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
446
446
|
E.value = ie.data.length;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
x("update:counts", {
|
|
450
450
|
filtered: A.value.length,
|
|
451
451
|
total: E.value
|
|
452
452
|
});
|
|
@@ -460,22 +460,22 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
460
460
|
P.value = !0, k(l.search, l.type ?? "");
|
|
461
461
|
}), de(
|
|
462
462
|
() => [l.search, l.type],
|
|
463
|
-
([
|
|
463
|
+
([w, T]) => {
|
|
464
464
|
_ && clearTimeout(_), _ = setTimeout(() => {
|
|
465
|
-
k(
|
|
465
|
+
k(w, T ?? ""), p.value = 1;
|
|
466
466
|
}, 300);
|
|
467
467
|
}
|
|
468
468
|
);
|
|
469
|
-
const L = (
|
|
469
|
+
const L = (w) => {
|
|
470
470
|
f.push({
|
|
471
471
|
name: "classifier-detail",
|
|
472
|
-
params: { name:
|
|
472
|
+
params: { name: w.name }
|
|
473
473
|
});
|
|
474
474
|
}, $ = () => {
|
|
475
475
|
k(l.search, l.type ?? "");
|
|
476
|
-
}, I = async (
|
|
476
|
+
}, I = async (w) => {
|
|
477
477
|
try {
|
|
478
|
-
await navigator.clipboard.writeText(
|
|
478
|
+
await navigator.clipboard.writeText(w), u.value = w, d && clearTimeout(d), d = setTimeout(() => {
|
|
479
479
|
u.value = null;
|
|
480
480
|
}, 500);
|
|
481
481
|
} catch (T) {
|
|
@@ -485,12 +485,12 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
485
485
|
t({
|
|
486
486
|
refetch: $
|
|
487
487
|
});
|
|
488
|
-
const C = (
|
|
489
|
-
p.value =
|
|
490
|
-
query: { ...v.query, page: String(
|
|
488
|
+
const C = (w) => {
|
|
489
|
+
p.value = w, f.replace({
|
|
490
|
+
query: { ...v.query, page: String(w) }
|
|
491
491
|
});
|
|
492
492
|
};
|
|
493
|
-
return (
|
|
493
|
+
return (w, T) => (o(), g("div", Vr, [
|
|
494
494
|
e("div", qr, [
|
|
495
495
|
b.value ? (o(), g("div", Wr, [
|
|
496
496
|
pe(oe(Mo), {
|
|
@@ -589,7 +589,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
589
589
|
},
|
|
590
590
|
emits: ["update:modelValue", "update:filter", "refresh"],
|
|
591
591
|
setup(n, { emit: t }) {
|
|
592
|
-
const a = n, l = t,
|
|
592
|
+
const a = n, l = t, x = (v) => {
|
|
593
593
|
const p = v.target.value;
|
|
594
594
|
l("update:filter", p);
|
|
595
595
|
}, f = N(!1);
|
|
@@ -611,7 +611,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
611
611
|
id: "dictionary-filter",
|
|
612
612
|
class: "w-full md:w-[140px] h-[38px] rounded-lg border border-stone-300 bg-white px-3 text-sm text-stone-800 focus:border-blue-500 focus:ring-blue-500 selection:border-blue-500 selection:text-white active:border-blue-500 active:text-white",
|
|
613
613
|
value: a.filter,
|
|
614
|
-
onChange:
|
|
614
|
+
onChange: x
|
|
615
615
|
}, [...p[5] || (p[5] = [
|
|
616
616
|
e("option", { value: "" }, "Всі", -1),
|
|
617
617
|
e("option", { value: "cls" }, "Довідники", -1),
|
|
@@ -704,12 +704,12 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
704
704
|
width: "w-4/12",
|
|
705
705
|
align: "text-left"
|
|
706
706
|
}
|
|
707
|
-
],
|
|
707
|
+
], x = N([]), f = N(!0), v = N(null), p = B(() => {
|
|
708
708
|
var c;
|
|
709
709
|
if (!((c = a.search) != null && c.trim()))
|
|
710
|
-
return
|
|
710
|
+
return x.value;
|
|
711
711
|
const A = a.search.toLowerCase().trim();
|
|
712
|
-
return
|
|
712
|
+
return x.value.filter(
|
|
713
713
|
(b) => {
|
|
714
714
|
var r, u;
|
|
715
715
|
return ((r = b.text) == null ? void 0 : r.toLowerCase().includes(A)) || ((u = b.id) == null ? void 0 : u.toLowerCase().includes(A));
|
|
@@ -724,7 +724,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
724
724
|
if (!c.ok)
|
|
725
725
|
throw new Error(`HTTP error: ${c.status}`);
|
|
726
726
|
const b = await c.json();
|
|
727
|
-
|
|
727
|
+
x.value = b.data;
|
|
728
728
|
} catch (c) {
|
|
729
729
|
v.value = c instanceof Error ? c.message : "Failed to load items", console.error("Error fetching suggest items:", c);
|
|
730
730
|
} finally {
|
|
@@ -750,7 +750,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
750
750
|
"stroke-width": 2,
|
|
751
751
|
class: "text-sky-600 animate-spin"
|
|
752
752
|
})
|
|
753
|
-
])) : v.value ? (o(), g("div", $s, G(v.value), 1)) :
|
|
753
|
+
])) : v.value ? (o(), g("div", $s, G(v.value), 1)) : x.value.length === 0 ? (o(), g("div", Cs, " Записи відсутні ")) : (o(), g("table", Ls, [
|
|
754
754
|
e("thead", Ss, [
|
|
755
755
|
e("tr", null, [
|
|
756
756
|
(o(), g(ee, null, ve(l, (b) => e("th", {
|
|
@@ -786,7 +786,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
786
786
|
}, Us = ["disabled"], Vs = ["disabled"], qs = { class: "flex items-center gap-3" }, Ws = { class: "bg-white rounded-lg shadow-sm border border-gray-200 p-4 mb-4" }, Zs = { class: "relative max-w-md" }, Hs = { class: "vs-form-text relative w-full border-transparent text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 rounded-sm" }, Gs = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Ys = /* @__PURE__ */ he({
|
|
787
787
|
__name: "DictionaryDetails",
|
|
788
788
|
setup(n) {
|
|
789
|
-
const t = Dt(), a = At(), l = B(() => a.params.name),
|
|
789
|
+
const t = Dt(), a = At(), l = B(() => a.params.name), x = N(!1), f = N(null), v = N(null), p = N(""), P = N(""), E = N(""), A = N(!1), c = N(!1), b = N(null), r = async () => {
|
|
790
790
|
var L;
|
|
791
791
|
try {
|
|
792
792
|
const $ = await fetch(
|
|
@@ -814,7 +814,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
814
814
|
name: l.value,
|
|
815
815
|
description: E.value.trim() || null,
|
|
816
816
|
data: I
|
|
817
|
-
},
|
|
817
|
+
}, w = await fetch(
|
|
818
818
|
`/api/user-cls/${encodeURIComponent(l.value)}`,
|
|
819
819
|
{
|
|
820
820
|
method: "PUT",
|
|
@@ -824,8 +824,8 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
824
824
|
body: JSON.stringify(C)
|
|
825
825
|
}
|
|
826
826
|
);
|
|
827
|
-
if (!
|
|
828
|
-
throw new Error(`HTTP error: ${
|
|
827
|
+
if (!w.ok)
|
|
828
|
+
throw new Error(`HTTP error: ${w.status}`);
|
|
829
829
|
P.value = E.value, A.value = !1;
|
|
830
830
|
} catch (L) {
|
|
831
831
|
console.error("Error saving description:", L);
|
|
@@ -839,9 +839,9 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
839
839
|
r();
|
|
840
840
|
});
|
|
841
841
|
const i = () => {
|
|
842
|
-
f.value = null,
|
|
842
|
+
f.value = null, x.value = !0;
|
|
843
843
|
}, k = (L) => {
|
|
844
|
-
f.value = L,
|
|
844
|
+
f.value = L, x.value = !0;
|
|
845
845
|
};
|
|
846
846
|
return (L, $) => (o(), g("div", zs, [
|
|
847
847
|
e("div", null, [
|
|
@@ -962,11 +962,11 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
962
962
|
}), Xs = { class: "flex-col justify-between h-full" }, Js = { class: "classifiers-component space-y-6 p-8 pt-2 max-w-[90%] mx-auto h-[calc(100vh-95px)]" }, Yp = /* @__PURE__ */ he({
|
|
963
963
|
__name: "index",
|
|
964
964
|
setup(n) {
|
|
965
|
-
const t = At(), a = N(""), l = N(""),
|
|
965
|
+
const t = At(), a = N(""), l = N(""), x = N(null), f = N({ filtered: 0, total: 0 }), v = (P) => {
|
|
966
966
|
f.value = P;
|
|
967
967
|
}, p = () => {
|
|
968
968
|
var P;
|
|
969
|
-
(P =
|
|
969
|
+
(P = x.value) == null || P.refetch();
|
|
970
970
|
};
|
|
971
971
|
return (P, E) => (o(), g("div", Xs, [
|
|
972
972
|
e("div", Js, [
|
|
@@ -982,7 +982,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
982
982
|
oe(t).params.name ? (o(), fe(Ys, { key: 2 })) : (o(), fe(us, {
|
|
983
983
|
key: 1,
|
|
984
984
|
ref_key: "gridRef",
|
|
985
|
-
ref:
|
|
985
|
+
ref: x,
|
|
986
986
|
search: a.value,
|
|
987
987
|
type: l.value,
|
|
988
988
|
"onUpdate:counts": v
|
|
@@ -1012,7 +1012,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1012
1012
|
},
|
|
1013
1013
|
emits: ["update:modelValue"],
|
|
1014
1014
|
setup(n, { expose: t, emit: a }) {
|
|
1015
|
-
const l = n,
|
|
1015
|
+
const l = n, x = a, f = B(() => l.actions && l.actions.length ? l.actions : ["view"]), v = N({}), p = N({}), P = B(() => {
|
|
1016
1016
|
var L;
|
|
1017
1017
|
return ((L = l.data) == null ? void 0 : L.routers) || [];
|
|
1018
1018
|
});
|
|
@@ -1031,7 +1031,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1031
1031
|
id: $,
|
|
1032
1032
|
actions: Array.from(I)
|
|
1033
1033
|
}));
|
|
1034
|
-
|
|
1034
|
+
x("update:modelValue", L);
|
|
1035
1035
|
}
|
|
1036
1036
|
function A(L) {
|
|
1037
1037
|
return L ? L.id || L.path || L.table || L.ua || JSON.stringify(L) : "";
|
|
@@ -1067,16 +1067,16 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1067
1067
|
function i(L, $, I) {
|
|
1068
1068
|
var C;
|
|
1069
1069
|
if ((C = L.menu) != null && C.length) {
|
|
1070
|
-
const
|
|
1070
|
+
const w = { ...p.value };
|
|
1071
1071
|
L.menu.forEach((T) => {
|
|
1072
|
-
const z = A(T), H = new Set(
|
|
1073
|
-
I ? H.add($) : H.delete($),
|
|
1074
|
-
}), p.value =
|
|
1072
|
+
const z = A(T), H = new Set(w[z] || []);
|
|
1073
|
+
I ? H.add($) : H.delete($), w[z] = H;
|
|
1074
|
+
}), p.value = w, E();
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
function k(L, $, I) {
|
|
1078
|
-
const C = A(L),
|
|
1079
|
-
I ?
|
|
1078
|
+
const C = A(L), w = new Set(p.value[C] || []);
|
|
1079
|
+
I ? w.add($) : w.delete($), p.value = { ...p.value, [C]: w }, E();
|
|
1080
1080
|
}
|
|
1081
1081
|
return t({
|
|
1082
1082
|
getSelected: () => l.modelValue
|
|
@@ -1101,7 +1101,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1101
1101
|
C != null && C.menu ? (o(), g("td", {
|
|
1102
1102
|
key: 0,
|
|
1103
1103
|
class: "px-6 py-3.5 cursor-pointer",
|
|
1104
|
-
onClick: (
|
|
1104
|
+
onClick: (w) => _(C)
|
|
1105
1105
|
}, [
|
|
1106
1106
|
e("button", rl, [
|
|
1107
1107
|
pe(oe(To), {
|
|
@@ -1113,8 +1113,8 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1113
1113
|
e("div", ll, G(C.ua), 1),
|
|
1114
1114
|
e("div", al, G(C.path || C.table), 1)
|
|
1115
1115
|
])),
|
|
1116
|
-
(o(!0), g(ee, null, ve(f.value, (
|
|
1117
|
-
key:
|
|
1116
|
+
(o(!0), g(ee, null, ve(f.value, (w) => (o(), g("td", {
|
|
1117
|
+
key: w,
|
|
1118
1118
|
class: "px-4 py-3.5 text-center"
|
|
1119
1119
|
}, [
|
|
1120
1120
|
C != null && C.menu ? (o(), g("label", il, [
|
|
@@ -1122,28 +1122,28 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1122
1122
|
e("input", {
|
|
1123
1123
|
type: "checkbox",
|
|
1124
1124
|
class: "sr-only peer",
|
|
1125
|
-
checked: d(C,
|
|
1126
|
-
onChange: (T) => i(C,
|
|
1125
|
+
checked: d(C, w),
|
|
1126
|
+
onChange: (T) => i(C, w, T.target.checked)
|
|
1127
1127
|
}, null, 40, cl),
|
|
1128
1128
|
$[1] || ($[1] = e("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" }, null, -1))
|
|
1129
1129
|
])
|
|
1130
1130
|
])) : (o(), g("input", {
|
|
1131
1131
|
key: 1,
|
|
1132
1132
|
type: "checkbox",
|
|
1133
|
-
checked: r(C,
|
|
1134
|
-
onChange: (T) => k(C,
|
|
1133
|
+
checked: r(C, w),
|
|
1134
|
+
onChange: (T) => k(C, w, T.target.checked),
|
|
1135
1135
|
class: "w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 cursor-pointer"
|
|
1136
1136
|
}, null, 40, dl))
|
|
1137
1137
|
]))), 128))
|
|
1138
1138
|
]),
|
|
1139
|
-
C != null && C.menu && u(C) ? (o(!0), g(ee, { key: 0 }, ve(C.menu, (
|
|
1140
|
-
key: A(
|
|
1139
|
+
C != null && C.menu && u(C) ? (o(!0), g(ee, { key: 0 }, ve(C.menu, (w) => (o(), g("tr", {
|
|
1140
|
+
key: A(w),
|
|
1141
1141
|
class: "hover:bg-gray-50 transition-colors"
|
|
1142
1142
|
}, [
|
|
1143
1143
|
e("td", fl, [
|
|
1144
1144
|
e("div", pl, [
|
|
1145
|
-
e("div", gl, G(
|
|
1146
|
-
e("div", vl, G(
|
|
1145
|
+
e("div", gl, G(w.ua), 1),
|
|
1146
|
+
e("div", vl, G(w.path || w.table), 1)
|
|
1147
1147
|
])
|
|
1148
1148
|
]),
|
|
1149
1149
|
(o(!0), g(ee, null, ve(f.value, (T) => (o(), g("td", {
|
|
@@ -1152,8 +1152,8 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1152
1152
|
}, [
|
|
1153
1153
|
e("input", {
|
|
1154
1154
|
type: "checkbox",
|
|
1155
|
-
checked: r(
|
|
1156
|
-
onChange: (z) => k(
|
|
1155
|
+
checked: r(w, T),
|
|
1156
|
+
onChange: (z) => k(w, T, z.target.checked),
|
|
1157
1157
|
class: "w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 cursor-pointer"
|
|
1158
1158
|
}, null, 40, ml)
|
|
1159
1159
|
]))), 128))
|
|
@@ -1174,7 +1174,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1174
1174
|
}), bl = { class: "flex flex-col gap-4 mt-2 mx-2" }, xl = { class: "flex items-center gap-3" }, wl = { class: "flex-1 relative" }, Xp = /* @__PURE__ */ he({
|
|
1175
1175
|
__name: "VsPermissions",
|
|
1176
1176
|
setup(n) {
|
|
1177
|
-
const t = At(), a = N(""), l = N(null),
|
|
1177
|
+
const t = At(), a = N(""), l = N(null), x = N({ categories: [], layers: [] }), f = N([]), v = N(["edit"]), p = B(() => E(x.value)), P = B(() => {
|
|
1178
1178
|
const b = a.value.toLowerCase().trim();
|
|
1179
1179
|
return b ? p.value.map((r) => {
|
|
1180
1180
|
const u = String(r.ua || "").toLowerCase().includes(b), _ = (r.menu || []).filter((d) => String(d.ua || "").toLowerCase().includes(b));
|
|
@@ -1199,7 +1199,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
|
|
|
1199
1199
|
fetch("/api/catalog").then((u) => u.json()),
|
|
1200
1200
|
fetch(`/api/catalog-permissions/${t.params.id}`).then((u) => u.json())
|
|
1201
1201
|
]);
|
|
1202
|
-
|
|
1202
|
+
x.value = b, f.value = ((r == null ? void 0 : r.layer_list) || []).filter((u) => u.service_id).map((u) => ({
|
|
1203
1203
|
id: String(u.service_id),
|
|
1204
1204
|
actions: u.actions || []
|
|
1205
1205
|
}));
|
|
@@ -1275,14 +1275,14 @@ function Ht(n) {
|
|
|
1275
1275
|
return Ht(t.coordinates);
|
|
1276
1276
|
const a = t.lng ?? t.lon ?? t.long ?? t.longitude ?? t.x, l = t.lat ?? t.latitude ?? t.y;
|
|
1277
1277
|
if (a != null && l != null) {
|
|
1278
|
-
const
|
|
1279
|
-
if (
|
|
1280
|
-
return [
|
|
1278
|
+
const x = en(a), f = en(l);
|
|
1279
|
+
if (x != null && f != null)
|
|
1280
|
+
return [x, f];
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
if (typeof n == "string" && n.includes(",")) {
|
|
1284
|
-
const [t, a] = n.split(","), l = en(t),
|
|
1285
|
-
return l != null &&
|
|
1284
|
+
const [t, a] = n.split(","), l = en(t), x = en(a);
|
|
1285
|
+
return l != null && x != null ? [l, x] : null;
|
|
1286
1286
|
}
|
|
1287
1287
|
return null;
|
|
1288
1288
|
}
|
|
@@ -1290,12 +1290,12 @@ const Ro = Symbol("MapContext");
|
|
|
1290
1290
|
function _l(n) {
|
|
1291
1291
|
const t = Lo(null), a = N(!1);
|
|
1292
1292
|
let l = !1;
|
|
1293
|
-
const
|
|
1294
|
-
l = !0,
|
|
1293
|
+
const x = [], f = () => {
|
|
1294
|
+
l = !0, x.length && x.forEach((r) => r());
|
|
1295
1295
|
}, v = () => {
|
|
1296
1296
|
const r = n.container;
|
|
1297
1297
|
return typeof r == "string" ? document.getElementById(r) : (r == null ? void 0 : r.value) !== void 0 ? r.value : r;
|
|
1298
|
-
}, p = () => l ? Promise.resolve() : new Promise((r) =>
|
|
1298
|
+
}, p = () => l ? Promise.resolve() : new Promise((r) => x.push(r)), P = (r, u) => {
|
|
1299
1299
|
if (r == null) return u;
|
|
1300
1300
|
const _ = Number(typeof r == "string" ? r.trim() : r);
|
|
1301
1301
|
return Number.isFinite(_) ? _ : u;
|
|
@@ -1314,7 +1314,7 @@ function _l(n) {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
r.bounds && t.value.fitBounds(r.bounds, { animate: !1 });
|
|
1316
1316
|
}, A = async () => {
|
|
1317
|
-
var $, I, C,
|
|
1317
|
+
var $, I, C, w, T, z, H;
|
|
1318
1318
|
if (typeof window > "u" || t.value) return;
|
|
1319
1319
|
const r = v();
|
|
1320
1320
|
if (!r) throw new Error("Map container not found");
|
|
@@ -1329,7 +1329,7 @@ function _l(n) {
|
|
|
1329
1329
|
...n.mapOptions || {},
|
|
1330
1330
|
container: r
|
|
1331
1331
|
};
|
|
1332
|
-
L.maxZoom == null && (L.maxZoom = i), t.value = new maplibregl.Map(L), (
|
|
1332
|
+
L.maxZoom == null && (L.maxZoom = i), t.value = new maplibregl.Map(L), (w = n.controls) != null && w.navigation && (t.value.addControl(new maplibregl.NavigationControl(
|
|
1333
1333
|
typeof n.controls.navigation == "object" ? n.controls.navigation : {}
|
|
1334
1334
|
), "top-right"), t.value.once("load", () => {
|
|
1335
1335
|
var ie;
|
|
@@ -1441,7 +1441,7 @@ function Hn() {
|
|
|
1441
1441
|
const kl = /* @__PURE__ */ he({
|
|
1442
1442
|
__name: "MapView",
|
|
1443
1443
|
setup(n, { expose: t }) {
|
|
1444
|
-
const a = N(null), l = N(null),
|
|
1444
|
+
const a = N(null), l = N(null), x = Hn(), f = _l({
|
|
1445
1445
|
container: a,
|
|
1446
1446
|
mapOptions: {
|
|
1447
1447
|
style: {
|
|
@@ -1453,7 +1453,7 @@ const kl = /* @__PURE__ */ he({
|
|
|
1453
1453
|
canvasContextAttributes: { preserveDrawingBuffer: !0 }
|
|
1454
1454
|
},
|
|
1455
1455
|
controls: { navigation: !0, scale: !0 },
|
|
1456
|
-
settings:
|
|
1456
|
+
settings: x
|
|
1457
1457
|
});
|
|
1458
1458
|
async function v() {
|
|
1459
1459
|
var A;
|
|
@@ -1529,7 +1529,7 @@ function zl(n, t = {}) {
|
|
|
1529
1529
|
if (!a) return [];
|
|
1530
1530
|
const l = Tl(a);
|
|
1531
1531
|
if (!l) return [];
|
|
1532
|
-
const
|
|
1532
|
+
const x = l, f = (t.geometry || n.type || "point").toString().toLowerCase(), v = Qe(n, ["text-font", "textFont"]), p = In(Qe(n, ["text-size", "textSize"]), Ll), P = Qe(n, ["text-allow-overlap", "textAllowOverlap"]), E = Qe(n, [
|
|
1533
1533
|
"text-minzoom",
|
|
1534
1534
|
"textMinZoom",
|
|
1535
1535
|
"textZoom",
|
|
@@ -1537,13 +1537,13 @@ function zl(n, t = {}) {
|
|
|
1537
1537
|
]), A = Qe(n, ["text-maxzoom", "textMaxZoom", "maxzoom"]), c = Qe(n, ["text-color", "textColor"]) || Sl, b = Qe(n, ["text-halo-color", "textHaloColor"]) || El, r = Qe(n, ["text-halo-width", "textHaloWidth"]), u = Qe(n, ["text-halo-blur", "textHaloBlur"]), _ = Qe(n, ["text-offset", "textOffset"]), d = Qe(n, ["text-anchor", "textAnchor"]), i = Qe(n, ["text-justify", "textJustify"]), k = Qe(n, ["text-letter-spacing", "textLetterSpacing"]), L = Qe(n, ["text-transform", "textTransform"]), $ = Qe(n, ["symbol-placement", "symbolPlacement"]), I = Qe(n, ["symbol-spacing", "symbolSpacing"]), C = Qe(n, [
|
|
1538
1538
|
"text-rotation-alignment",
|
|
1539
1539
|
"textRotationAlignment"
|
|
1540
|
-
]),
|
|
1541
|
-
"text-field":
|
|
1540
|
+
]), w = Qe(n, ["text-pitch-alignment", "textPitchAlignment"]), T = Qe(n, ["text-opacity", "textOpacity"]), z = {
|
|
1541
|
+
"text-field": x,
|
|
1542
1542
|
"text-font": Al(v),
|
|
1543
1543
|
"text-size": p,
|
|
1544
1544
|
"text-allow-overlap": P ?? !1
|
|
1545
1545
|
};
|
|
1546
|
-
_ && (z["text-offset"] = _), f !== "line" && (z["text-anchor"] = d ?? "center"), i && (z["text-justify"] = i), k !== void 0 && (z["text-letter-spacing"] = k), L && (z["text-transform"] = L), I !== void 0 && (z["symbol-spacing"] = I), f === "line" ? (z["symbol-placement"] = $ || "line", z["text-rotation-alignment"] = C || "map", z["text-pitch-alignment"] =
|
|
1546
|
+
_ && (z["text-offset"] = _), f !== "line" && (z["text-anchor"] = d ?? "center"), i && (z["text-justify"] = i), k !== void 0 && (z["text-letter-spacing"] = k), L && (z["text-transform"] = L), I !== void 0 && (z["symbol-spacing"] = I), f === "line" ? (z["symbol-placement"] = $ || "line", z["text-rotation-alignment"] = C || "map", z["text-pitch-alignment"] = w || "map") : (C && (z["text-rotation-alignment"] = C), w && (z["text-pitch-alignment"] = w), $ && (z["symbol-placement"] = $)), d && f === "line" && (z["text-anchor"] = d);
|
|
1547
1547
|
const H = {
|
|
1548
1548
|
"text-color": c,
|
|
1549
1549
|
"text-opacity": T ?? 1
|
|
@@ -1589,7 +1589,7 @@ function Rl(n) {
|
|
|
1589
1589
|
["get", n.colorAttr],
|
|
1590
1590
|
...Object.entries(n.colors).reduce(
|
|
1591
1591
|
// eslint-disable-next-line
|
|
1592
|
-
(l, [
|
|
1592
|
+
(l, [x, f], v) => l.concat([x, t[v]]),
|
|
1593
1593
|
[]
|
|
1594
1594
|
),
|
|
1595
1595
|
n.icon
|
|
@@ -1601,14 +1601,14 @@ function tn(n, t) {
|
|
|
1601
1601
|
function Il(n, t) {
|
|
1602
1602
|
const a = (n == null ? void 0 : n.clusterZoom) ?? (n == null ? void 0 : n.pointZoom) ?? (n == null ? void 0 : n.iconZoom) ?? 12, l = Number(a);
|
|
1603
1603
|
if (!Number.isFinite(l)) return null;
|
|
1604
|
-
const
|
|
1604
|
+
const x = ["get", "point_count"], f = ["has", "point_count"], v = ["!", f], E = {
|
|
1605
1605
|
type: "circle",
|
|
1606
1606
|
maxzoom: l,
|
|
1607
1607
|
filter: f,
|
|
1608
1608
|
paint: {
|
|
1609
1609
|
"circle-color": [
|
|
1610
1610
|
"step",
|
|
1611
|
-
|
|
1611
|
+
x,
|
|
1612
1612
|
"#3b82f6",
|
|
1613
1613
|
10,
|
|
1614
1614
|
"#fde047",
|
|
@@ -1623,7 +1623,7 @@ function Il(n, t) {
|
|
|
1623
1623
|
],
|
|
1624
1624
|
"circle-radius": [
|
|
1625
1625
|
"step",
|
|
1626
|
-
|
|
1626
|
+
x,
|
|
1627
1627
|
16,
|
|
1628
1628
|
10,
|
|
1629
1629
|
22,
|
|
@@ -1647,7 +1647,7 @@ function Il(n, t) {
|
|
|
1647
1647
|
"text-field": ["to-string", [
|
|
1648
1648
|
"coalesce",
|
|
1649
1649
|
["get", "point_count_abbreviated"],
|
|
1650
|
-
|
|
1650
|
+
x
|
|
1651
1651
|
]],
|
|
1652
1652
|
"text-font": ["Noto Sans Regular"],
|
|
1653
1653
|
"text-size": 12,
|
|
@@ -1677,8 +1677,8 @@ function io(n, t) {
|
|
|
1677
1677
|
"circle-stroke-width": n.width || 1,
|
|
1678
1678
|
"circle-radius": n.radius || 5
|
|
1679
1679
|
}
|
|
1680
|
-
},
|
|
1681
|
-
return
|
|
1680
|
+
}, x = Il(n, l);
|
|
1681
|
+
return x || l;
|
|
1682
1682
|
}
|
|
1683
1683
|
function jl(n) {
|
|
1684
1684
|
const t = Gn(n);
|
|
@@ -1720,12 +1720,12 @@ function uo(n, t = {}) {
|
|
|
1720
1720
|
if (!Dl(n)) return [];
|
|
1721
1721
|
const a = [];
|
|
1722
1722
|
n.icon && tn(a, Ol(n)), n.pointZoom && tn(a, io(n, n.pointZoom)), n.type === "polygon" ? tn(a, jl(n)) : n.type === "line" ? tn(a, Nl(n)) : tn(a, io(n));
|
|
1723
|
-
const
|
|
1723
|
+
const x = t.sourceType !== "raster" ? zl(n, {
|
|
1724
1724
|
geometry: n.type || "point",
|
|
1725
1725
|
filter: n.filter,
|
|
1726
1726
|
excludeClusters: !!n.clusterZoom
|
|
1727
1727
|
}) : [];
|
|
1728
|
-
return tn(a,
|
|
1728
|
+
return tn(a, x), a.filter(Boolean);
|
|
1729
1729
|
}
|
|
1730
1730
|
function Dl(n) {
|
|
1731
1731
|
return n ? !!((/* @__PURE__ */ new Set(["point", "line", "polygon"])).has(n.type) || n.icon || n.attrType || n.color || n.stroke || n.radius || n.width || n.colorAttr && n.colors && typeof n.colors == "object" && Object.keys(n.colors).length > 0) : !1;
|
|
@@ -1735,9 +1735,9 @@ function co(n, {
|
|
|
1735
1735
|
filter: a,
|
|
1736
1736
|
allowFallback: l = !1
|
|
1737
1737
|
} = {}) {
|
|
1738
|
-
let
|
|
1739
|
-
if (
|
|
1740
|
-
return uo(
|
|
1738
|
+
let x = Fl(n);
|
|
1739
|
+
if (x && a && (x.filter = a), x)
|
|
1740
|
+
return uo(x, { sourceType: t });
|
|
1741
1741
|
if (l && ["vector", "geojson"].includes(t || "")) {
|
|
1742
1742
|
const f = { type: "point", color: nn };
|
|
1743
1743
|
return a && (f.filter = a), uo(f, { sourceType: t });
|
|
@@ -1762,9 +1762,9 @@ function Bl(n) {
|
|
|
1762
1762
|
};
|
|
1763
1763
|
}
|
|
1764
1764
|
async function fo(n, t, a) {
|
|
1765
|
-
const l = [t],
|
|
1765
|
+
const l = [t], x = t.split("+")[0];
|
|
1766
1766
|
Object.values(a || {}).forEach((f) => {
|
|
1767
|
-
l.push(`${
|
|
1767
|
+
l.push(`${x}+${f.replace("#", "")}.png`);
|
|
1768
1768
|
});
|
|
1769
1769
|
for (const f of l) {
|
|
1770
1770
|
if (n.getImage(f))
|
|
@@ -1777,7 +1777,7 @@ function Oe(n, t, a) {
|
|
|
1777
1777
|
var ne, ie;
|
|
1778
1778
|
if (!n) return Nn;
|
|
1779
1779
|
if (!t) return Nn[n];
|
|
1780
|
-
const { map: l, ready:
|
|
1780
|
+
const { map: l, ready: x = () => Promise.resolve() } = at(a), f = n || ((ne = t.layer) == null ? void 0 : ne.id), v = t.sourceId ?? n, p = { ...t };
|
|
1781
1781
|
p.point && (p.source = Bl(p.point)), !p.layer && ((ie = p.source) == null ? void 0 : ie.type) === "raster" && (p.layer = { id: v, type: "raster", source: v }), p.layer && !p.layer.source && Object.assign(p.layer, { source: v });
|
|
1782
1782
|
let P = !1, E = !1;
|
|
1783
1783
|
const A = () => {
|
|
@@ -1810,7 +1810,7 @@ function Oe(n, t, a) {
|
|
|
1810
1810
|
P = !0;
|
|
1811
1811
|
}
|
|
1812
1812
|
};
|
|
1813
|
-
|
|
1813
|
+
x().then(A);
|
|
1814
1814
|
const c = (J, te) => l.value ? (l.value.on(J, f, te), () => {
|
|
1815
1815
|
var W;
|
|
1816
1816
|
return (W = l.value) == null ? void 0 : W.off(J, f, te);
|
|
@@ -1966,10 +1966,10 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
1966
1966
|
if ($)
|
|
1967
1967
|
return $.replace(/{z}/gi, String(a.z)).replace(/{x}/gi, String(a.x)).replace(/{y}/gi, String(a.y));
|
|
1968
1968
|
}
|
|
1969
|
-
function
|
|
1970
|
-
let C = $ || `layers-${Object.keys(I).length}`,
|
|
1969
|
+
function x($, I) {
|
|
1970
|
+
let C = $ || `layers-${Object.keys(I).length}`, w = 1;
|
|
1971
1971
|
for (; I[C]; )
|
|
1972
|
-
C = `${$}-${
|
|
1972
|
+
C = `${$}-${w}`, w += 1;
|
|
1973
1973
|
return C;
|
|
1974
1974
|
}
|
|
1975
1975
|
const f = Gt(), v = (i = f == null ? void 0 : f.appContext.config.globalProperties) == null ? void 0 : i.$settings, p = v == null ? void 0 : v.map, P = At(), E = Dt();
|
|
@@ -1981,8 +1981,8 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
1981
1981
|
const $ = Array.isArray(p == null ? void 0 : p.basemaps) ? p == null ? void 0 : p.basemaps : [];
|
|
1982
1982
|
if (!$.length) return {};
|
|
1983
1983
|
const I = {};
|
|
1984
|
-
return $.forEach((C,
|
|
1985
|
-
const T = C.name ?? C.title ?? `basemap-${
|
|
1984
|
+
return $.forEach((C, w) => {
|
|
1985
|
+
const T = C.name ?? C.title ?? `basemap-${w}`, z = (C.id ?? T ?? `basemap-${w}`).toString().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, ""), H = x(z || `basemap-${w}`, I), Y = C.preview || (C.url ? l(C.url) : void 0);
|
|
1986
1986
|
I[H] = {
|
|
1987
1987
|
url: C.url,
|
|
1988
1988
|
preview: Y,
|
|
@@ -2034,13 +2034,13 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2034
2034
|
_.setVisible(!0), _.setTiles([I.url]);
|
|
2035
2035
|
}
|
|
2036
2036
|
), ($, I) => (o(), g("div", Ul, [
|
|
2037
|
-
(o(!0), g(ee, null, ve(r.value, (C,
|
|
2038
|
-
key:
|
|
2039
|
-
onClick: (T) => d(
|
|
2037
|
+
(o(!0), g(ee, null, ve(r.value, (C, w) => (o(), g("div", {
|
|
2038
|
+
key: w,
|
|
2039
|
+
onClick: (T) => d(w)
|
|
2040
2040
|
}, [
|
|
2041
|
-
|
|
2041
|
+
w !== "none" && C.url ? (o(), g("div", {
|
|
2042
2042
|
key: 0,
|
|
2043
|
-
class: Ce(["lg:w-14 lg:h-14 w-10 h-10 flex items-center justify-center bg-gray-200 rounded-xl shadow-2xs cursor-pointer transition-all border-4", u.value ===
|
|
2043
|
+
class: Ce(["lg:w-14 lg:h-14 w-10 h-10 flex items-center justify-center bg-gray-200 rounded-xl shadow-2xs cursor-pointer transition-all border-4", u.value === w ? "border-blue-500" : "border-gray-200"])
|
|
2044
2044
|
}, [
|
|
2045
2045
|
C.preview ? (o(), g("img", {
|
|
2046
2046
|
key: 0,
|
|
@@ -2050,7 +2050,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2050
2050
|
}, null, 8, ql)) : K("", !0)
|
|
2051
2051
|
], 2)) : (o(), g("div", {
|
|
2052
2052
|
key: 1,
|
|
2053
|
-
class: Ce(["lg:w-14 lg:h-14 w-10 h-10 flex items-center justify-center bg-gray-200/80 rounded-xl shadow-2xs cursor-pointer transition-all border-4", u.value ===
|
|
2053
|
+
class: Ce(["lg:w-14 lg:h-14 w-10 h-10 flex items-center justify-center bg-gray-200/80 rounded-xl shadow-2xs cursor-pointer transition-all border-4", u.value === w ? "border-blue-500" : "border-gray-200"])
|
|
2054
2054
|
}, [
|
|
2055
2055
|
pe(oe(pr), { class: "w-4 h-4 text-gray-500" })
|
|
2056
2056
|
], 2))
|
|
@@ -2063,7 +2063,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2063
2063
|
items: {}
|
|
2064
2064
|
},
|
|
2065
2065
|
setup(n, { expose: t }) {
|
|
2066
|
-
const a = n, l = bt({ open: !1, top: 0, left: 0, transform: "translateX(-50%)" }),
|
|
2066
|
+
const a = n, l = bt({ open: !1, top: 0, left: 0, transform: "translateX(-50%)" }), x = N(null), f = N(null);
|
|
2067
2067
|
let v = null;
|
|
2068
2068
|
const p = B(() => l.open ? {
|
|
2069
2069
|
position: "absolute",
|
|
@@ -2084,17 +2084,17 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2084
2084
|
b();
|
|
2085
2085
|
return;
|
|
2086
2086
|
}
|
|
2087
|
-
|
|
2087
|
+
x.value = i, l.open = !0, Xe(() => {
|
|
2088
2088
|
E(), r(), requestAnimationFrame(() => {
|
|
2089
2089
|
E();
|
|
2090
2090
|
});
|
|
2091
2091
|
});
|
|
2092
2092
|
}
|
|
2093
2093
|
function E() {
|
|
2094
|
-
if (!l.open || !
|
|
2095
|
-
const _ =
|
|
2096
|
-
let
|
|
2097
|
-
|
|
2094
|
+
if (!l.open || !x.value || !f.value) return;
|
|
2095
|
+
const _ = x.value.getBoundingClientRect(), d = 12, i = window.scrollX + d, k = window.scrollX + window.innerWidth - d, L = window.scrollY + d, $ = window.scrollY + window.innerHeight - d, I = f.value.offsetWidth || Math.min(300, window.innerWidth - 24), C = f.value.offsetHeight || 0;
|
|
2096
|
+
let w = _.left + window.scrollX + (_.width - I) / 2;
|
|
2097
|
+
w < i && (w = i), w + I > k && (w = Math.max(i, k - I)), l.left = w;
|
|
2098
2098
|
let T = _.bottom + window.scrollY + d;
|
|
2099
2099
|
T + C > $ && (T = _.top + window.scrollY - C - d, T < L && (T = Math.max(L, $ - C))), T < L && (T = L), T + C > $ && (T = Math.max(L, $ - C)), l.top = T, l.transform = "none";
|
|
2100
2100
|
}
|
|
@@ -2102,13 +2102,13 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2102
2102
|
var i, k;
|
|
2103
2103
|
if (!l.open) return;
|
|
2104
2104
|
const d = _.target;
|
|
2105
|
-
(i =
|
|
2105
|
+
(i = x.value) != null && i.contains(d) || (k = f.value) != null && k.contains(d) || b();
|
|
2106
2106
|
}
|
|
2107
2107
|
function c(_) {
|
|
2108
2108
|
_.key === "Escape" && b();
|
|
2109
2109
|
}
|
|
2110
2110
|
function b() {
|
|
2111
|
-
u(), l.open = !1,
|
|
2111
|
+
u(), l.open = !1, x.value = null, f.value = null;
|
|
2112
2112
|
}
|
|
2113
2113
|
function r() {
|
|
2114
2114
|
u(), f.value && (v = new ResizeObserver(() => {
|
|
@@ -2131,7 +2131,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2131
2131
|
), t({ close: b }), (_, d) => (o(), g("div", {
|
|
2132
2132
|
class: "mapLayer-info",
|
|
2133
2133
|
ref_key: "anchorEl",
|
|
2134
|
-
ref:
|
|
2134
|
+
ref: x
|
|
2135
2135
|
}, [
|
|
2136
2136
|
e("a", {
|
|
2137
2137
|
class: "mapLayer-info__trigger",
|
|
@@ -2181,7 +2181,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2181
2181
|
mapDescription: {}
|
|
2182
2182
|
},
|
|
2183
2183
|
setup(n) {
|
|
2184
|
-
const t = n, a = N(null), l = N(!1),
|
|
2184
|
+
const t = n, a = N(null), l = N(!1), x = N(null), f = N(null), v = N({ top: 0, left: 0 });
|
|
2185
2185
|
Dt();
|
|
2186
2186
|
const p = N(!0), P = N(!1), E = B(() => Array.isArray(t.links) ? t.links.filter(($) => ($ == null ? void 0 : $.name) && ($ == null ? void 0 : $.slug)) : []), A = B(() => ({
|
|
2187
2187
|
top: `${v.value.top}px`,
|
|
@@ -2198,11 +2198,11 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2198
2198
|
$.stopPropagation(), l.value = !l.value;
|
|
2199
2199
|
}
|
|
2200
2200
|
function d() {
|
|
2201
|
-
const $ =
|
|
2201
|
+
const $ = x.value;
|
|
2202
2202
|
if (!$ || !f.value) return;
|
|
2203
|
-
const I = $.getBoundingClientRect(), C = 12,
|
|
2204
|
-
let J = I.bottom + window.scrollY +
|
|
2205
|
-
te + ne > z && (te = I.right + window.scrollX - ne, te < T && (te = T)), te < T && (te = T), J + ie > Y && (J = I.top + window.scrollY - ie -
|
|
2203
|
+
const I = $.getBoundingClientRect(), C = 12, w = 8, T = window.scrollX + C, z = window.scrollX + window.innerWidth - C, H = window.scrollY + C, Y = window.scrollY + window.innerHeight - C, ne = f.value.offsetWidth || 160, ie = f.value.offsetHeight || 0;
|
|
2204
|
+
let J = I.bottom + window.scrollY + w, te = I.left + window.scrollX;
|
|
2205
|
+
te + ne > z && (te = I.right + window.scrollX - ne, te < T && (te = T)), te < T && (te = T), J + ie > Y && (J = I.top + window.scrollY - ie - w, J < H && (J = Math.max(H, Y - ie))), J < H && (J = H), J + ie > Y && (J = Math.max(H, Y - ie)), v.value = {
|
|
2206
2206
|
top: J,
|
|
2207
2207
|
left: te
|
|
2208
2208
|
};
|
|
@@ -2248,7 +2248,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2248
2248
|
E.value.length ? (o(), g("div", Xl, [
|
|
2249
2249
|
e("button", {
|
|
2250
2250
|
ref_key: "menuButton",
|
|
2251
|
-
ref:
|
|
2251
|
+
ref: x,
|
|
2252
2252
|
type: "button",
|
|
2253
2253
|
class: "map-info__menu-button",
|
|
2254
2254
|
onClick: _,
|
|
@@ -2339,9 +2339,9 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
|
|
|
2339
2339
|
}), po = /* @__PURE__ */ Ue(Ql, [["__scopeId", "data-v-813e24fb"]]), mt = N([]);
|
|
2340
2340
|
function ea(n, t) {
|
|
2341
2341
|
return typeof n != "string" ? "" : n.includes("{{") ? n.replace(/\{\{\s*([a-zA-Z0-9_]+)\s*}}/g, (a, l) => {
|
|
2342
|
-
const
|
|
2343
|
-
if (!
|
|
2344
|
-
const f = t[
|
|
2342
|
+
const x = String(l || "").trim();
|
|
2343
|
+
if (!x) return "";
|
|
2344
|
+
const f = t[x];
|
|
2345
2345
|
return f != null ? String(f) : "";
|
|
2346
2346
|
}) : n;
|
|
2347
2347
|
}
|
|
@@ -2360,9 +2360,9 @@ function na(n) {
|
|
|
2360
2360
|
if (!(n != null && n.getStyle)) return;
|
|
2361
2361
|
const t = ((a = n.getStyle()) == null ? void 0 : a.layers) || [];
|
|
2362
2362
|
for (let l = 0; l < t.length; l += 1) {
|
|
2363
|
-
const
|
|
2364
|
-
if (!(!
|
|
2365
|
-
return
|
|
2363
|
+
const x = t[l];
|
|
2364
|
+
if (!(!x || typeof x.id != "string") && x.type && x.type !== "background" && x.type !== "raster")
|
|
2365
|
+
return x.id;
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
2368
|
function Io(n) {
|
|
@@ -2435,7 +2435,7 @@ function Io(n) {
|
|
|
2435
2435
|
);
|
|
2436
2436
|
(c = A == null ? void 0 : A.handle) != null && c.setOpacity && A.handle.setOpacity(p);
|
|
2437
2437
|
}
|
|
2438
|
-
function
|
|
2438
|
+
function x(v) {
|
|
2439
2439
|
if (!mt.value.length) return;
|
|
2440
2440
|
const p = [];
|
|
2441
2441
|
mt.value.forEach((P) => {
|
|
@@ -2453,7 +2453,7 @@ function Io(n) {
|
|
|
2453
2453
|
activateTemporaryLayer: t,
|
|
2454
2454
|
deactivateTemporaryLayer: a,
|
|
2455
2455
|
setTemporaryLayerOpacity: l,
|
|
2456
|
-
clearTemporaryLayers:
|
|
2456
|
+
clearTemporaryLayers: x,
|
|
2457
2457
|
isTemporaryLayerActive: f
|
|
2458
2458
|
};
|
|
2459
2459
|
}
|
|
@@ -2469,16 +2469,16 @@ function ra(n) {
|
|
|
2469
2469
|
function l() {
|
|
2470
2470
|
fn.value = a(), t.value = !0;
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function x() {
|
|
2473
2473
|
fn.value === a() && (fn.value = null), t.value = !1;
|
|
2474
2474
|
}
|
|
2475
2475
|
function f() {
|
|
2476
|
-
t.value ?
|
|
2476
|
+
t.value ? x() : l();
|
|
2477
2477
|
}
|
|
2478
2478
|
return {
|
|
2479
2479
|
isOpen: t,
|
|
2480
2480
|
open: l,
|
|
2481
|
-
close:
|
|
2481
|
+
close: x,
|
|
2482
2482
|
toggle: f
|
|
2483
2483
|
};
|
|
2484
2484
|
}
|
|
@@ -2494,11 +2494,11 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2494
2494
|
const t = Ge(() => import("@opengis/filter")), a = n, l = B(() => {
|
|
2495
2495
|
var y;
|
|
2496
2496
|
return ((y = a.layer) == null ? void 0 : y.id) ?? "";
|
|
2497
|
-
}),
|
|
2497
|
+
}), x = B(() => `filter-popover-${l.value}`), {
|
|
2498
2498
|
isOpen: f,
|
|
2499
2499
|
close: v,
|
|
2500
2500
|
toggle: p
|
|
2501
|
-
} = ra(
|
|
2501
|
+
} = ra(x), P = bt({ top: 0, left: 0, transform: "translateX(-50%)" }), E = N(null), A = N(null);
|
|
2502
2502
|
let c = null;
|
|
2503
2503
|
const b = N({}), r = bt({
|
|
2504
2504
|
visible: !1,
|
|
@@ -2511,7 +2511,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2511
2511
|
}), d = B(() => _.value.length > 0), i = B(() => {
|
|
2512
2512
|
var y;
|
|
2513
2513
|
return ((y = a.layer) == null ? void 0 : y.name) ?? "";
|
|
2514
|
-
}), k = B(() => _.value), L = N(null), $ = B(() => _.value.length), I = B(() => $.value <= 2), C = B(() => I.value ? "body" : typeof window > "u" || L.value ? Bn : "body"),
|
|
2514
|
+
}), k = B(() => _.value), L = N(null), $ = B(() => _.value.length), I = B(() => $.value <= 2), C = B(() => I.value ? "body" : typeof window > "u" || L.value ? Bn : "body"), w = B(() => {
|
|
2515
2515
|
if (!u.value || !I.value)
|
|
2516
2516
|
return {};
|
|
2517
2517
|
const y = typeof window < "u" ? window.innerWidth : 280, M = Math.max(280, y - 16 * 2);
|
|
@@ -2650,7 +2650,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2650
2650
|
}, [
|
|
2651
2651
|
e("div", {
|
|
2652
2652
|
class: Ce(["vst-popover__content inline-block z-50 rounded-[16px] bg-white text-sm text-gray-500 rounded-md shadow-lg bottom mapLayer-filter__popover", { "mapLayer-filter__popover--static": !I.value }]),
|
|
2653
|
-
style: rt(
|
|
2653
|
+
style: rt(w.value),
|
|
2654
2654
|
ref_key: "panel",
|
|
2655
2655
|
ref: A,
|
|
2656
2656
|
onClick: m[1] || (m[1] = Je(() => {
|
|
@@ -2699,12 +2699,12 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2699
2699
|
layerId: {}
|
|
2700
2700
|
},
|
|
2701
2701
|
setup(n) {
|
|
2702
|
-
const t = n, a = N(!1), l = N(100),
|
|
2702
|
+
const t = n, a = N(!1), l = N(100), x = N(null), f = N(null), v = bt({ top: 0, left: 0 });
|
|
2703
2703
|
function p() {
|
|
2704
2704
|
var I;
|
|
2705
2705
|
const c = (I = f.value) == null ? void 0 : I.querySelector("button");
|
|
2706
|
-
if (!c || !
|
|
2707
|
-
const b = c.getBoundingClientRect(), r = 260, u =
|
|
2706
|
+
if (!c || !x.value) return;
|
|
2707
|
+
const b = c.getBoundingClientRect(), r = 260, u = x.value.offsetHeight || 60, _ = 8, d = 12, i = window.innerWidth, k = window.innerHeight;
|
|
2708
2708
|
let L = b.bottom + _ + window.scrollY, $ = b.left + window.scrollX;
|
|
2709
2709
|
$ + r > i - d && ($ = i - r - d + window.scrollX), $ < d + window.scrollX && ($ = d + window.scrollX), L + u > k + window.scrollY - d && (L = b.top - u - _ + window.scrollY, L < d + window.scrollY && (L = k - u - d + window.scrollY)), v.top = L, v.left = $;
|
|
2710
2710
|
}
|
|
@@ -2742,7 +2742,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2742
2742
|
var r, u;
|
|
2743
2743
|
if (!a.value) return;
|
|
2744
2744
|
const b = c.target;
|
|
2745
|
-
(r =
|
|
2745
|
+
(r = x.value) != null && r.contains(b) || (u = f.value) != null && u.contains(b) || (a.value = !1);
|
|
2746
2746
|
}
|
|
2747
2747
|
return Be(() => {
|
|
2748
2748
|
document.addEventListener("click", A), window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
|
|
@@ -2767,7 +2767,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2767
2767
|
a.value ? (o(), g("div", {
|
|
2768
2768
|
key: 0,
|
|
2769
2769
|
ref_key: "popoverEl",
|
|
2770
|
-
ref:
|
|
2770
|
+
ref: x,
|
|
2771
2771
|
class: "opacity-popover",
|
|
2772
2772
|
style: rt({ top: v.top + "px", left: v.left + "px" })
|
|
2773
2773
|
}, [
|
|
@@ -2801,7 +2801,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2801
2801
|
},
|
|
2802
2802
|
emits: ["action"],
|
|
2803
2803
|
setup(n, { emit: t }) {
|
|
2804
|
-
const a = n, l = N({}),
|
|
2804
|
+
const a = n, l = N({}), x = N(!0), f = N(!1), v = at(), {
|
|
2805
2805
|
temporaryLayers: p,
|
|
2806
2806
|
activateTemporaryLayer: P,
|
|
2807
2807
|
deactivateTemporaryLayer: E,
|
|
@@ -2975,7 +2975,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
2975
2975
|
y.action === "deactivate" && (E(M.id, m), delete l.value[M.id]);
|
|
2976
2976
|
}
|
|
2977
2977
|
}
|
|
2978
|
-
function
|
|
2978
|
+
function w(y) {
|
|
2979
2979
|
y instanceof CustomEvent && C(y.detail);
|
|
2980
2980
|
}
|
|
2981
2981
|
de(
|
|
@@ -3069,7 +3069,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
3069
3069
|
A(), y.forEach((m) => delete l.value[m]);
|
|
3070
3070
|
}
|
|
3071
3071
|
function S() {
|
|
3072
|
-
|
|
3072
|
+
x.value = !x.value;
|
|
3073
3073
|
}
|
|
3074
3074
|
function R() {
|
|
3075
3075
|
f.value = window.innerWidth <= 768;
|
|
@@ -3077,8 +3077,8 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
3077
3077
|
return Be(() => {
|
|
3078
3078
|
i(), window.addEventListener(
|
|
3079
3079
|
go,
|
|
3080
|
-
|
|
3081
|
-
), R(), f.value && (
|
|
3080
|
+
w
|
|
3081
|
+
), R(), f.value && (x.value = !1), window.addEventListener("resize", R);
|
|
3082
3082
|
}), de(
|
|
3083
3083
|
() => {
|
|
3084
3084
|
var y;
|
|
@@ -3090,7 +3090,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
3090
3090
|
), De(() => {
|
|
3091
3091
|
window.removeEventListener(
|
|
3092
3092
|
go,
|
|
3093
|
-
|
|
3093
|
+
w
|
|
3094
3094
|
), window.removeEventListener("resize", R);
|
|
3095
3095
|
}), (y, m) => (o(), g("div", pa, [
|
|
3096
3096
|
e("div", ga, [
|
|
@@ -3123,7 +3123,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
3123
3123
|
viewBox: "0 0 24 24",
|
|
3124
3124
|
fill: "none",
|
|
3125
3125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3126
|
-
class: Ce({ "layers-panel__toggle-icon--rotated":
|
|
3126
|
+
class: Ce({ "layers-panel__toggle-icon--rotated": x.value })
|
|
3127
3127
|
}, [...m[1] || (m[1] = [
|
|
3128
3128
|
e("path", {
|
|
3129
3129
|
d: "M6 9L12 15L18 9",
|
|
@@ -3144,7 +3144,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
3144
3144
|
])
|
|
3145
3145
|
]),
|
|
3146
3146
|
e("div", {
|
|
3147
|
-
class: Ce(["layers-panel__content", { "layers-panel__content--collapsed": !
|
|
3147
|
+
class: Ce(["layers-panel__content", { "layers-panel__content--collapsed": !x.value }])
|
|
3148
3148
|
}, [
|
|
3149
3149
|
(o(!0), g(ee, null, ve(c.value, (M) => {
|
|
3150
3150
|
var D;
|
|
@@ -3209,7 +3209,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
|
|
|
3209
3209
|
}
|
|
3210
3210
|
}), vo = /* @__PURE__ */ Ue(Pa, [["__scopeId", "data-v-4706ee79"]]);
|
|
3211
3211
|
function za() {
|
|
3212
|
-
const { map: n, ready: t } = at(), a = N(null), l = N(null),
|
|
3212
|
+
const { map: n, ready: t } = at(), a = N(null), l = N(null), x = N(null), f = N(null);
|
|
3213
3213
|
let v = [];
|
|
3214
3214
|
function p() {
|
|
3215
3215
|
v.forEach((r) => r()), v = [];
|
|
@@ -3246,7 +3246,7 @@ function za() {
|
|
|
3246
3246
|
popupFields: l,
|
|
3247
3247
|
popupValues: f,
|
|
3248
3248
|
disable: b,
|
|
3249
|
-
title:
|
|
3249
|
+
title: x
|
|
3250
3250
|
};
|
|
3251
3251
|
}
|
|
3252
3252
|
const Fa = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-200 bg-white/90 p-3 text-xs shadow-lg backdrop-blur" }, Ra = { class: "space-y-1.5" }, Ia = { class: "font-bold text-slate-700" }, ja = { class: "text-slate-700" }, Na = /* @__PURE__ */ he({
|
|
@@ -3256,7 +3256,7 @@ const Fa = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
3256
3256
|
popupCoords: t,
|
|
3257
3257
|
popupFields: a,
|
|
3258
3258
|
popupValues: l,
|
|
3259
|
-
disable:
|
|
3259
|
+
disable: x
|
|
3260
3260
|
} = za(), { map: f } = at(), v = N(null), p = N({ left: "-9999px", top: "-9999px" }), P = new Intl.NumberFormat("uk-UA", {
|
|
3261
3261
|
maximumFractionDigits: 2
|
|
3262
3262
|
});
|
|
@@ -3302,10 +3302,10 @@ const Fa = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
3302
3302
|
top: 0,
|
|
3303
3303
|
width: window.innerWidth,
|
|
3304
3304
|
height: window.innerHeight
|
|
3305
|
-
}, k = ((R = (S = f.value) == null ? void 0 : S.getContainer) == null ? void 0 : R.call(S)) || void 0, L = (k == null ? void 0 : k.getBoundingClientRect()) ?? i, $ = L.left - i.left, I = L.top - i.top, C = _.offsetWidth || 0,
|
|
3305
|
+
}, k = ((R = (S = f.value) == null ? void 0 : S.getContainer) == null ? void 0 : R.call(S)) || void 0, L = (k == null ? void 0 : k.getBoundingClientRect()) ?? i, $ = L.left - i.left, I = L.top - i.top, C = _.offsetWidth || 0, w = _.offsetHeight || 0, T = 12, z = 8, [H, Y] = t.value;
|
|
3306
3306
|
let ne = $ + H + T, ie = I + Y + T;
|
|
3307
|
-
ne + C + z > i.width && (ne = $ + H - C - T), ie +
|
|
3308
|
-
const J = z, te = z, W = Math.max(z, i.width - C - z), F = Math.max(z, i.height -
|
|
3307
|
+
ne + C + z > i.width && (ne = $ + H - C - T), ie + w + z > i.height && (ie = I + Y - w - T);
|
|
3308
|
+
const J = z, te = z, W = Math.max(z, i.width - C - z), F = Math.max(z, i.height - w - z);
|
|
3309
3309
|
ne = Math.min(Math.max(ne, J), W), ie = Math.min(Math.max(ie, te), F), p.value = { left: `${ne}px`, top: `${ie}px` };
|
|
3310
3310
|
}
|
|
3311
3311
|
return de([t, r], () => {
|
|
@@ -3313,7 +3313,7 @@ const Fa = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
3313
3313
|
}), Be(() => {
|
|
3314
3314
|
window.addEventListener("resize", u);
|
|
3315
3315
|
}), De(() => {
|
|
3316
|
-
window.removeEventListener("resize", u),
|
|
3316
|
+
window.removeEventListener("resize", u), x();
|
|
3317
3317
|
}), (_, d) => r.value.length ? (o(), g("div", {
|
|
3318
3318
|
key: 0,
|
|
3319
3319
|
ref_key: "popupRef",
|
|
@@ -3336,22 +3336,22 @@ const Fa = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
3336
3336
|
}
|
|
3337
3337
|
});
|
|
3338
3338
|
function Oa() {
|
|
3339
|
-
const n = At(), t = Dt(), a = N(null), l = N(null),
|
|
3339
|
+
const n = At(), t = Dt(), a = N(null), l = N(null), x = N(null), f = N(!1), v = N([]), p = N(0), P = B(() => v.value.length), E = B(() => f.value || !!a.value || !!x.value);
|
|
3340
3340
|
let A = !1;
|
|
3341
3341
|
function c() {
|
|
3342
|
-
a.value = null, l.value = null,
|
|
3342
|
+
a.value = null, l.value = null, x.value = null, f.value = !1, v.value = [], p.value = 0;
|
|
3343
3343
|
}
|
|
3344
|
-
function b(
|
|
3345
|
-
if (!
|
|
3344
|
+
function b(w, T = 0) {
|
|
3345
|
+
if (!w.length) {
|
|
3346
3346
|
c(), I(null);
|
|
3347
3347
|
return;
|
|
3348
3348
|
}
|
|
3349
|
-
v.value =
|
|
3349
|
+
v.value = w, r(T);
|
|
3350
3350
|
}
|
|
3351
|
-
function r(
|
|
3352
|
-
const T = v.value[
|
|
3351
|
+
function r(w) {
|
|
3352
|
+
const T = v.value[w];
|
|
3353
3353
|
if (!T) return;
|
|
3354
|
-
p.value =
|
|
3354
|
+
p.value = w;
|
|
3355
3355
|
const z = Oe(T.source);
|
|
3356
3356
|
d(T, z == null ? void 0 : z.card);
|
|
3357
3357
|
}
|
|
@@ -3361,13 +3361,13 @@ function Oa() {
|
|
|
3361
3361
|
function _() {
|
|
3362
3362
|
p.value <= 0 || r(p.value - 1);
|
|
3363
3363
|
}
|
|
3364
|
-
async function d(
|
|
3364
|
+
async function d(w, T) {
|
|
3365
3365
|
var Y, ne, ie, J, te;
|
|
3366
|
-
if (!((Y =
|
|
3366
|
+
if (!((Y = w == null ? void 0 : w.properties) != null && Y.id)) return;
|
|
3367
3367
|
const z = new URLSearchParams();
|
|
3368
|
-
z.set("layer",
|
|
3368
|
+
z.set("layer", w.source), z.set("id", String((ne = w.properties) == null ? void 0 : ne.id));
|
|
3369
3369
|
const H = Array.isArray(T) && T.length > 0;
|
|
3370
|
-
f.value = H,
|
|
3370
|
+
f.value = H, x.value = null, a.value = null, l.value = w || null;
|
|
3371
3371
|
try {
|
|
3372
3372
|
const W = await fetch(`/api/map-format?${z.toString()}`);
|
|
3373
3373
|
if (!W.ok) throw new Error(`Failed (${W.status})`);
|
|
@@ -3410,31 +3410,31 @@ function Oa() {
|
|
|
3410
3410
|
}
|
|
3411
3411
|
C(L()), De(() => k());
|
|
3412
3412
|
function L() {
|
|
3413
|
-
const
|
|
3414
|
-
if (typeof
|
|
3415
|
-
const T =
|
|
3413
|
+
const w = Array.isArray(n.query.info) ? n.query.info[0] : n.query.info;
|
|
3414
|
+
if (typeof w != "string") return null;
|
|
3415
|
+
const T = w.trim();
|
|
3416
3416
|
return T.startsWith("external:") ? null : T || null;
|
|
3417
3417
|
}
|
|
3418
|
-
function $(
|
|
3418
|
+
function $(w) {
|
|
3419
3419
|
var Y, ne;
|
|
3420
|
-
const T = (
|
|
3420
|
+
const T = (w == null ? void 0 : w.source) ?? ((Y = w == null ? void 0 : w.layer) == null ? void 0 : Y.id), z = (ne = w == null ? void 0 : w.properties) == null ? void 0 : ne.id;
|
|
3421
3421
|
return !T || z === void 0 || z === null ? null : `${T},${z}`.trim() || null;
|
|
3422
3422
|
}
|
|
3423
|
-
function I(
|
|
3424
|
-
const T = $(
|
|
3423
|
+
function I(w) {
|
|
3424
|
+
const T = $(w), z = L();
|
|
3425
3425
|
if (T === z) return;
|
|
3426
3426
|
const H = { ...n.query };
|
|
3427
3427
|
T ? H.info = T : delete H.info, t.push({ query: H }).catch(() => {
|
|
3428
3428
|
});
|
|
3429
3429
|
}
|
|
3430
|
-
async function C(
|
|
3431
|
-
if (!
|
|
3430
|
+
async function C(w) {
|
|
3431
|
+
if (!w) {
|
|
3432
3432
|
c();
|
|
3433
3433
|
return;
|
|
3434
3434
|
}
|
|
3435
|
-
if (
|
|
3435
|
+
if (w === $(l.value))
|
|
3436
3436
|
return;
|
|
3437
|
-
const [T, z] =
|
|
3437
|
+
const [T, z] = w.split(","), H = T == null ? void 0 : T.trim(), Y = z == null ? void 0 : z.trim();
|
|
3438
3438
|
if (!H || !Y) {
|
|
3439
3439
|
c(), I(null);
|
|
3440
3440
|
return;
|
|
@@ -3451,19 +3451,19 @@ function Oa() {
|
|
|
3451
3451
|
}
|
|
3452
3452
|
return de(
|
|
3453
3453
|
() => L(),
|
|
3454
|
-
(
|
|
3455
|
-
|
|
3454
|
+
(w) => {
|
|
3455
|
+
w !== $(l.value) && (A = !0, C(w).finally(() => {
|
|
3456
3456
|
A = !1;
|
|
3457
3457
|
}));
|
|
3458
3458
|
}
|
|
3459
3459
|
), {
|
|
3460
3460
|
card: a,
|
|
3461
3461
|
cardFeature: l,
|
|
3462
|
-
cardError:
|
|
3462
|
+
cardError: x,
|
|
3463
3463
|
cardLoading: f,
|
|
3464
3464
|
isOpen: E,
|
|
3465
3465
|
close: i,
|
|
3466
|
-
openFeature: (
|
|
3466
|
+
openFeature: (w) => b(w ? [w] : [], 0),
|
|
3467
3467
|
openFeatures: b,
|
|
3468
3468
|
next: u,
|
|
3469
3469
|
prev: _,
|
|
@@ -3472,7 +3472,7 @@ function Oa() {
|
|
|
3472
3472
|
};
|
|
3473
3473
|
}
|
|
3474
3474
|
function Da() {
|
|
3475
|
-
const { map: n, ready: t } = at(), a = N([]), l = N(0),
|
|
3475
|
+
const { map: n, ready: t } = at(), a = N([]), l = N(0), x = N(0), f = N(!1), v = N(null), p = N({}), P = N(null), E = N([]), A = B(() => a.value[x.value] || null), c = B(() => a.value.length > 0);
|
|
3476
3476
|
let b = null;
|
|
3477
3477
|
const r = () => {
|
|
3478
3478
|
b == null || b.remove(), b = null;
|
|
@@ -3498,7 +3498,7 @@ function Da() {
|
|
|
3498
3498
|
}, k = async (T, z, H) => {
|
|
3499
3499
|
var ie, J;
|
|
3500
3500
|
const [Y, ne] = [d(T), d(z)];
|
|
3501
|
-
P.value = { x: Y, y: ne }, E.value = H, f.value = !0, v.value = null, a.value = [], p.value = {},
|
|
3501
|
+
P.value = { x: Y, y: ne }, E.value = H, f.value = !0, v.value = null, a.value = [], p.value = {}, x.value = 0;
|
|
3502
3502
|
try {
|
|
3503
3503
|
const te = H.map(async (y) => {
|
|
3504
3504
|
const m = `/api/map-info-point?x=${Y}&y=${ne}&layers=${y}`, M = await fetch(m);
|
|
@@ -3541,13 +3541,13 @@ function Da() {
|
|
|
3541
3541
|
f.value = !1;
|
|
3542
3542
|
}
|
|
3543
3543
|
}, $ = async () => {
|
|
3544
|
-
|
|
3544
|
+
x.value < l.value - 1 && (x.value += 1, p.value[x.value] || await L(x.value));
|
|
3545
3545
|
}, I = async () => {
|
|
3546
|
-
|
|
3546
|
+
x.value > 0 && (x.value -= 1, p.value[x.value] || await L(x.value));
|
|
3547
3547
|
}, C = () => {
|
|
3548
|
-
a.value = [], l.value = 0,
|
|
3548
|
+
a.value = [], l.value = 0, x.value = 0, p.value = {}, P.value = null, E.value = [], r();
|
|
3549
3549
|
};
|
|
3550
|
-
de(
|
|
3550
|
+
de(x, async () => {
|
|
3551
3551
|
var z, H;
|
|
3552
3552
|
const T = A.value;
|
|
3553
3553
|
if (T) {
|
|
@@ -3555,9 +3555,9 @@ function Da() {
|
|
|
3555
3555
|
await i(Y);
|
|
3556
3556
|
}
|
|
3557
3557
|
});
|
|
3558
|
-
let
|
|
3558
|
+
let w = null;
|
|
3559
3559
|
return Be(async () => {
|
|
3560
|
-
await t(), n.value && (
|
|
3560
|
+
await t(), n.value && (w = async (T) => {
|
|
3561
3561
|
const { lng: z, lat: H } = T.lngLat, Y = Oe(), ie = Object.entries(Y).map(([J, te]) => {
|
|
3562
3562
|
var W, F, S, R;
|
|
3563
3563
|
return {
|
|
@@ -3575,13 +3575,13 @@ function Da() {
|
|
|
3575
3575
|
};
|
|
3576
3576
|
}).filter((J) => J.service === "ogc" && J.visible).map((J) => J.id);
|
|
3577
3577
|
ie.length > 0 && await k(z, H, ie);
|
|
3578
|
-
}, n.value.on("dblclick",
|
|
3578
|
+
}, n.value.on("dblclick", w));
|
|
3579
3579
|
}), De(() => {
|
|
3580
|
-
n.value &&
|
|
3580
|
+
n.value && w && n.value.off("dblclick", w), r();
|
|
3581
3581
|
}), {
|
|
3582
3582
|
features: a,
|
|
3583
3583
|
count: l,
|
|
3584
|
-
index:
|
|
3584
|
+
index: x,
|
|
3585
3585
|
current: A,
|
|
3586
3586
|
loading: f,
|
|
3587
3587
|
error: v,
|
|
@@ -3602,7 +3602,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
3602
3602
|
emits: ["activate"],
|
|
3603
3603
|
setup(n, { emit: t }) {
|
|
3604
3604
|
const a = n, l = t;
|
|
3605
|
-
function
|
|
3605
|
+
function x(E) {
|
|
3606
3606
|
const A = E.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
|
|
3607
3607
|
if (A) return A;
|
|
3608
3608
|
const c = Array.from(E).map((b) => b.charCodeAt(0).toString(16)).join("").slice(0, 8);
|
|
@@ -3610,7 +3610,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
3610
3610
|
}
|
|
3611
3611
|
const f = B(() => {
|
|
3612
3612
|
var E;
|
|
3613
|
-
return ((E = a.id) == null ? void 0 : E.trim()) ||
|
|
3613
|
+
return ((E = a.id) == null ? void 0 : E.trim()) || x(a.title);
|
|
3614
3614
|
}), v = B(() => a.buttonText || "Показати шар");
|
|
3615
3615
|
function p() {
|
|
3616
3616
|
return {
|
|
@@ -3679,7 +3679,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
3679
3679
|
mapId: {}
|
|
3680
3680
|
},
|
|
3681
3681
|
setup(n) {
|
|
3682
|
-
const t = n, a = Oa(), l = Da(),
|
|
3682
|
+
const t = n, a = Oa(), l = Da(), x = Dt(), f = N([]), v = N(0), p = B(() => f.value[v.value] || null), P = B(() => {
|
|
3683
3683
|
var s;
|
|
3684
3684
|
return ((s = p.value) == null ? void 0 : s.type) === "external" ? p.value : null;
|
|
3685
3685
|
}), E = B(() => f.value.length > 0), A = B(() => {
|
|
@@ -3725,7 +3725,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
3725
3725
|
delete Q.info;
|
|
3726
3726
|
else
|
|
3727
3727
|
return;
|
|
3728
|
-
|
|
3728
|
+
x.push({ query: Q }).catch(() => {
|
|
3729
3729
|
});
|
|
3730
3730
|
}
|
|
3731
3731
|
function i(s) {
|
|
@@ -3779,9 +3779,9 @@ const mo = /* @__PURE__ */ he({
|
|
|
3779
3779
|
}), De(() => {
|
|
3780
3780
|
typeof window > "u" || (window.removeEventListener(Vn, C), window.removeEventListener(ho, I));
|
|
3781
3781
|
});
|
|
3782
|
-
const
|
|
3782
|
+
const w = B(() => l.active.value), T = B(() => w.value || a.isOpen.value || A.value), z = B(() => w.value ? l.loading.value : a.cardLoading.value), H = B(() => w.value ? l.error.value : a.cardError.value), Y = B(() => {
|
|
3783
3783
|
var s, h, O;
|
|
3784
|
-
return
|
|
3784
|
+
return w.value ? ((s = l.current.value) == null ? void 0 : s.html) || null : A.value ? ((h = P.value) == null ? void 0 : h.html) || null : ((O = a.card.value) == null ? void 0 : O.html) || null;
|
|
3785
3785
|
}), ne = at(), ie = Hn(), J = B(() => {
|
|
3786
3786
|
var s, h;
|
|
3787
3787
|
return ((h = (s = ie.value) == null ? void 0 : s.map) == null ? void 0 : h.cardHideEmpty) ?? null;
|
|
@@ -3947,12 +3947,12 @@ const mo = /* @__PURE__ */ he({
|
|
|
3947
3947
|
};
|
|
3948
3948
|
}
|
|
3949
3949
|
const xt = B(() => {
|
|
3950
|
-
if (
|
|
3950
|
+
if (w.value && l.current.value)
|
|
3951
3951
|
return l.current.value.data ?? {};
|
|
3952
3952
|
const s = a.card.value;
|
|
3953
3953
|
return (s == null ? void 0 : s.rows) ?? {};
|
|
3954
3954
|
}), wt = B(() => {
|
|
3955
|
-
if (
|
|
3955
|
+
if (w.value && l.current.value) {
|
|
3956
3956
|
const Q = l.current.value, ae = Array.isArray(Q.columns) ? Q.columns : [];
|
|
3957
3957
|
return ae.length ? ae : Q.fields ?? [];
|
|
3958
3958
|
}
|
|
@@ -4208,7 +4208,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4208
4208
|
prev: le,
|
|
4209
4209
|
count: Me,
|
|
4210
4210
|
index: Re
|
|
4211
|
-
} = l, Pe = B(() => a.count.value), qe = B(() => a.index.value), st = B(() =>
|
|
4211
|
+
} = l, Pe = B(() => a.count.value), qe = B(() => a.index.value), st = B(() => w.value ? !1 : E.value ? f.value.length > 1 : Pe.value > 1), Ie = B(() => w.value ? Me.value : E.value ? f.value.length : Pe.value), tt = B(() => w.value ? Re.value : E.value ? v.value : qe.value), Ze = () => {
|
|
4212
4212
|
if (E.value) {
|
|
4213
4213
|
if (v.value >= f.value.length - 1) return;
|
|
4214
4214
|
i(v.value + 1);
|
|
@@ -4453,7 +4453,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4453
4453
|
const h = ue.value;
|
|
4454
4454
|
if ($())
|
|
4455
4455
|
return;
|
|
4456
|
-
if (!s ||
|
|
4456
|
+
if (!s || w.value) {
|
|
4457
4457
|
Ye();
|
|
4458
4458
|
return;
|
|
4459
4459
|
}
|
|
@@ -4508,9 +4508,9 @@ const mo = /* @__PURE__ */ he({
|
|
|
4508
4508
|
), de(
|
|
4509
4509
|
() => a.index.value,
|
|
4510
4510
|
() => {
|
|
4511
|
-
|
|
4511
|
+
w.value || an(a.cardFeature.value);
|
|
4512
4512
|
}
|
|
4513
|
-
), de(
|
|
4513
|
+
), de(w, (s) => {
|
|
4514
4514
|
if (s) {
|
|
4515
4515
|
A.value || Ye();
|
|
4516
4516
|
return;
|
|
@@ -4525,7 +4525,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4525
4525
|
$();
|
|
4526
4526
|
return;
|
|
4527
4527
|
}
|
|
4528
|
-
!
|
|
4528
|
+
!w.value && a.cardFeature.value && an(a.cardFeature.value);
|
|
4529
4529
|
}), de(ln, (s) => {
|
|
4530
4530
|
$() || (s ? an(a.cardFeature.value) : Ye());
|
|
4531
4531
|
}), de(
|
|
@@ -4553,7 +4553,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4553
4553
|
e("div", Va, [
|
|
4554
4554
|
e("div", qa, [
|
|
4555
4555
|
e("p", Wa, [
|
|
4556
|
-
|
|
4556
|
+
w.value ? (o(), g(ee, { key: 1 }, [
|
|
4557
4557
|
ke(" Об’єкт " + G(tt.value + 1) + " / " + G(Ie.value), 1)
|
|
4558
4558
|
], 64)) : (o(), g(ee, { key: 0 }, [
|
|
4559
4559
|
st.value ? (o(), g(ee, { key: 0 }, [
|
|
@@ -4564,7 +4564,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4564
4564
|
], 64))
|
|
4565
4565
|
])
|
|
4566
4566
|
]),
|
|
4567
|
-
|
|
4567
|
+
w.value && oe(Me) > 1 ? (o(), g("div", Za, [
|
|
4568
4568
|
e("button", {
|
|
4569
4569
|
onClick: h[0] || (h[0] = //@ts-ignore
|
|
4570
4570
|
(...O) => oe(le) && oe(le)(...O)),
|
|
@@ -4581,7 +4581,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4581
4581
|
}, [
|
|
4582
4582
|
pe(oe(ro), { class: "h-4 w-4" })
|
|
4583
4583
|
], 8, Ga)
|
|
4584
|
-
])) : !
|
|
4584
|
+
])) : !w.value && st.value ? (o(), g("div", Ya, [
|
|
4585
4585
|
e("button", {
|
|
4586
4586
|
onClick: He,
|
|
4587
4587
|
disabled: tt.value === 0,
|
|
@@ -4726,7 +4726,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4726
4726
|
items: {}
|
|
4727
4727
|
},
|
|
4728
4728
|
setup(n) {
|
|
4729
|
-
const t = n, { map: a, ready: l } = at(),
|
|
4729
|
+
const t = n, { map: a, ready: l } = at(), x = N([]);
|
|
4730
4730
|
let f = null;
|
|
4731
4731
|
function v(A) {
|
|
4732
4732
|
return A ? A.map((c, b) => {
|
|
@@ -4759,7 +4759,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4759
4759
|
const A = a.value;
|
|
4760
4760
|
if (!A) return;
|
|
4761
4761
|
const c = (b = A.getStyle) == null ? void 0 : b.call(A);
|
|
4762
|
-
|
|
4762
|
+
x.value = p(c);
|
|
4763
4763
|
}
|
|
4764
4764
|
function E() {
|
|
4765
4765
|
a.value && (f == null || f());
|
|
@@ -4767,16 +4767,16 @@ const mo = /* @__PURE__ */ he({
|
|
|
4767
4767
|
return de(
|
|
4768
4768
|
() => t.items,
|
|
4769
4769
|
async (A) => {
|
|
4770
|
-
A != null ? (
|
|
4770
|
+
A != null ? (x.value = v(A), f == null || f()) : (await l(), E(), P());
|
|
4771
4771
|
},
|
|
4772
4772
|
{ immediate: !0, deep: !0 }
|
|
4773
4773
|
), Be(async () => {
|
|
4774
4774
|
(t.items === void 0 || t.items === null) && (await l(), E(), P());
|
|
4775
4775
|
}), De(() => {
|
|
4776
4776
|
f == null || f(), f = null;
|
|
4777
|
-
}), (A, c) =>
|
|
4777
|
+
}), (A, c) => x.value.length ? (o(), g("div", _i, [
|
|
4778
4778
|
e("div", ki, [
|
|
4779
|
-
(o(!0), g(ee, null, ve(
|
|
4779
|
+
(o(!0), g(ee, null, ve(x.value, (b) => (o(), g("div", {
|
|
4780
4780
|
key: b.id,
|
|
4781
4781
|
class: "flex items-center"
|
|
4782
4782
|
}, [
|
|
@@ -4834,7 +4834,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
4834
4834
|
},
|
|
4835
4835
|
emits: ["toggle-layer", "update:search", "open-filter"],
|
|
4836
4836
|
setup(n, { emit: t }) {
|
|
4837
|
-
const a = n, l = t,
|
|
4837
|
+
const a = n, l = t, x = bt({}), f = N(null), v = bt({
|
|
4838
4838
|
visible: !1,
|
|
4839
4839
|
text: "Спочатку активуйте шар, щоб застосувати фільтр",
|
|
4840
4840
|
top: 0,
|
|
@@ -4854,10 +4854,10 @@ const mo = /* @__PURE__ */ he({
|
|
|
4854
4854
|
set: (i) => l("update:search", i)
|
|
4855
4855
|
});
|
|
4856
4856
|
function A(i) {
|
|
4857
|
-
|
|
4857
|
+
x[i] = !x[i], oa();
|
|
4858
4858
|
}
|
|
4859
4859
|
function c(i) {
|
|
4860
|
-
return !!
|
|
4860
|
+
return !!x[i];
|
|
4861
4861
|
}
|
|
4862
4862
|
function b(i, k) {
|
|
4863
4863
|
if (a.selected.includes(k)) {
|
|
@@ -5032,7 +5032,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5032
5032
|
top: 0,
|
|
5033
5033
|
left: 0,
|
|
5034
5034
|
transform: "translateX(-50%)"
|
|
5035
|
-
}),
|
|
5035
|
+
}), x = N(null), f = N(null);
|
|
5036
5036
|
let v = null;
|
|
5037
5037
|
const p = B(() => {
|
|
5038
5038
|
if (!l.open) return { display: "none" };
|
|
@@ -5052,7 +5052,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5052
5052
|
b();
|
|
5053
5053
|
return;
|
|
5054
5054
|
}
|
|
5055
|
-
if (!
|
|
5055
|
+
if (!x.value) {
|
|
5056
5056
|
b();
|
|
5057
5057
|
return;
|
|
5058
5058
|
}
|
|
@@ -5063,10 +5063,10 @@ const mo = /* @__PURE__ */ he({
|
|
|
5063
5063
|
});
|
|
5064
5064
|
}
|
|
5065
5065
|
function E() {
|
|
5066
|
-
if (!l.open || !
|
|
5067
|
-
const _ =
|
|
5068
|
-
let
|
|
5069
|
-
|
|
5066
|
+
if (!l.open || !x.value || !f.value) return;
|
|
5067
|
+
const _ = x.value.getBoundingClientRect(), d = 12, i = window.scrollX + d, k = window.scrollX + window.innerWidth - d, L = window.scrollY + d, $ = window.scrollY + window.innerHeight - d, I = f.value.offsetWidth || Math.min(460, window.innerWidth - 24), C = f.value.offsetHeight || 0;
|
|
5068
|
+
let w = _.left + window.scrollX + (_.width - I) / 2;
|
|
5069
|
+
w < i && (w = i), w + I > k && (w = Math.max(i, k - I)), l.left = w;
|
|
5070
5070
|
let T = _.bottom + window.scrollY + d;
|
|
5071
5071
|
T + C > $ && (T = _.top + window.scrollY - C - d, T < L && (T = Math.max(L, $ - C))), T < L && (T = L), T + C > $ && (T = Math.max(L, $ - C)), l.top = T, l.transform = "none";
|
|
5072
5072
|
}
|
|
@@ -5074,13 +5074,13 @@ const mo = /* @__PURE__ */ he({
|
|
|
5074
5074
|
var i, k;
|
|
5075
5075
|
if (!l.open) return;
|
|
5076
5076
|
const d = _.target;
|
|
5077
|
-
(i =
|
|
5077
|
+
(i = x.value) != null && i.contains(d) || (k = f.value) != null && k.contains(d) || b();
|
|
5078
5078
|
}
|
|
5079
5079
|
function c(_) {
|
|
5080
5080
|
_.key === "Escape" && b();
|
|
5081
5081
|
}
|
|
5082
5082
|
function b() {
|
|
5083
|
-
u(), l.open = !1,
|
|
5083
|
+
u(), l.open = !1, x.value = null, f.value = null;
|
|
5084
5084
|
}
|
|
5085
5085
|
function r() {
|
|
5086
5086
|
u(), f.value && (v = new ResizeObserver(() => {
|
|
@@ -5103,7 +5103,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5103
5103
|
), t({ close: b }), (_, d) => (o(), g("div", {
|
|
5104
5104
|
class: "inline-flex relative",
|
|
5105
5105
|
ref_key: "anchorEl",
|
|
5106
|
-
ref:
|
|
5106
|
+
ref: x
|
|
5107
5107
|
}, [
|
|
5108
5108
|
e("div", {
|
|
5109
5109
|
onClick: Je(P, ["prevent", "stop"])
|
|
@@ -5146,7 +5146,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5146
5146
|
},
|
|
5147
5147
|
emits: ["select-layer", "reorder", "remove", "toggle-layer"],
|
|
5148
5148
|
setup(n, { emit: t }) {
|
|
5149
|
-
const a = n, l = t,
|
|
5149
|
+
const a = n, l = t, x = bt({}), f = N(null), v = N(null), p = /* @__PURE__ */ new Map(), P = bt({ top: 0, left: 0 }), E = N(null), A = bt({ top: 0, left: 0 }), c = N(null), b = /* @__PURE__ */ new Map(), r = bt({});
|
|
5150
5150
|
function u(S) {
|
|
5151
5151
|
var R;
|
|
5152
5152
|
for (const y of ((R = a.catalog) == null ? void 0 : R.groups) ?? []) {
|
|
@@ -5157,7 +5157,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5157
5157
|
}
|
|
5158
5158
|
de(() => a.selected, (S) => {
|
|
5159
5159
|
S.forEach((R) => {
|
|
5160
|
-
|
|
5160
|
+
x[R] == null && (x[R] = 100);
|
|
5161
5161
|
});
|
|
5162
5162
|
}, { immediate: !0 });
|
|
5163
5163
|
function _() {
|
|
@@ -5219,17 +5219,17 @@ const mo = /* @__PURE__ */ he({
|
|
|
5219
5219
|
}), De(() => {
|
|
5220
5220
|
document.removeEventListener("click", I), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
|
|
5221
5221
|
});
|
|
5222
|
-
const { map:
|
|
5222
|
+
const { map: w } = at();
|
|
5223
5223
|
function T(S) {
|
|
5224
5224
|
var M, D, X;
|
|
5225
5225
|
if (!S) return;
|
|
5226
5226
|
const R = Oe(S), y = u(S);
|
|
5227
5227
|
if (!R && !y) return;
|
|
5228
|
-
if (((M = y == null ? void 0 : y.extent) == null ? void 0 : M.length) === 4 && ((D =
|
|
5228
|
+
if (((M = y == null ? void 0 : y.extent) == null ? void 0 : M.length) === 4 && ((D = w.value) != null && D.fitBounds)) {
|
|
5229
5229
|
const re = y.extent.map((ue) => Number(ue));
|
|
5230
5230
|
if (re.every((ue) => Number.isFinite(ue))) {
|
|
5231
5231
|
const [ue, ge, Se, we] = re;
|
|
5232
|
-
|
|
5232
|
+
w.value.fitBounds([
|
|
5233
5233
|
[ue, ge],
|
|
5234
5234
|
[Se, we]
|
|
5235
5235
|
], { padding: 40 }), E.value = null;
|
|
@@ -5510,12 +5510,12 @@ const mo = /* @__PURE__ */ he({
|
|
|
5510
5510
|
},
|
|
5511
5511
|
emits: ["change"],
|
|
5512
5512
|
setup(n, { emit: t }) {
|
|
5513
|
-
const a = Ge(() => import("@opengis/filter")), l = n,
|
|
5513
|
+
const a = Ge(() => import("@opengis/filter")), l = n, x = t, f = B(() => {
|
|
5514
5514
|
var P;
|
|
5515
5515
|
return ((P = l.layer) == null ? void 0 : P.filters) ?? [];
|
|
5516
5516
|
}), v = B(() => f.value.length > 0);
|
|
5517
5517
|
function p(P) {
|
|
5518
|
-
|
|
5518
|
+
x("change", P.data);
|
|
5519
5519
|
}
|
|
5520
5520
|
return (P, E) => (o(), g("div", ou, [
|
|
5521
5521
|
n.layer && v.value ? (o(), g("div", ru, [
|
|
@@ -5551,7 +5551,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5551
5551
|
const F = t.query["catalog-tab"];
|
|
5552
5552
|
return (Array.isArray(F) ? F[0] : F) === "selected" ? "selected" : "catalog";
|
|
5553
5553
|
}
|
|
5554
|
-
const
|
|
5554
|
+
const x = N(l()), f = N({ groups: [] }), v = N([]), p = N(""), { map: P } = at(), E = bt({}), A = N(null), c = N(!0), b = N(!1);
|
|
5555
5555
|
function r(F) {
|
|
5556
5556
|
return f.value.groups.map((S) => S.layers.find((R) => R.id === F)).find(Boolean) || null;
|
|
5557
5557
|
}
|
|
@@ -5653,10 +5653,10 @@ const mo = /* @__PURE__ */ he({
|
|
|
5653
5653
|
});
|
|
5654
5654
|
}
|
|
5655
5655
|
function C(F) {
|
|
5656
|
-
!F || !Array.isArray(F.filters) || F.filters.length === 0 || v.value.includes(F.id) && (A.value = F.id, E[F.id] || (E[F.id] = {}),
|
|
5656
|
+
!F || !Array.isArray(F.filters) || F.filters.length === 0 || v.value.includes(F.id) && (A.value = F.id, E[F.id] || (E[F.id] = {}), x.value = "filter");
|
|
5657
5657
|
}
|
|
5658
|
-
function
|
|
5659
|
-
|
|
5658
|
+
function w() {
|
|
5659
|
+
x.value = "catalog";
|
|
5660
5660
|
}
|
|
5661
5661
|
const T = B(() => A.value ? r(A.value) : null), z = B(() => {
|
|
5662
5662
|
const F = A.value;
|
|
@@ -5664,9 +5664,9 @@ const mo = /* @__PURE__ */ he({
|
|
|
5664
5664
|
}), H = B(() => f.value.groups.reduce(
|
|
5665
5665
|
(F, S) => F + S.layers.filter(u).length,
|
|
5666
5666
|
0
|
|
5667
|
-
)), Y = B(() =>
|
|
5667
|
+
)), Y = B(() => x.value === "selected" ? "Вибрані шари" : x.value === "filter" ? "Фільтр шарів" : "Каталог"), ne = B(() => x.value === "selected" ? v.value.length : x.value === "catalog" ? H.value : null), ie = B(() => {
|
|
5668
5668
|
var F;
|
|
5669
|
-
return
|
|
5669
|
+
return x.value === "filter" ? ((F = T.value) == null ? void 0 : F.name) ?? "" : "";
|
|
5670
5670
|
});
|
|
5671
5671
|
async function J() {
|
|
5672
5672
|
const S = await (await fetch("/api/gis-layer-list")).json(), R = /* @__PURE__ */ new Map();
|
|
@@ -5689,7 +5689,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5689
5689
|
});
|
|
5690
5690
|
}
|
|
5691
5691
|
de(A, (F) => {
|
|
5692
|
-
!F &&
|
|
5692
|
+
!F && x.value === "filter" && (x.value = "catalog");
|
|
5693
5693
|
}), de(T, (F) => {
|
|
5694
5694
|
!F && A.value && (A.value = null);
|
|
5695
5695
|
}), de(
|
|
@@ -5712,7 +5712,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5712
5712
|
}), De(() => {
|
|
5713
5713
|
window.removeEventListener("resize", W);
|
|
5714
5714
|
}), (F, S) => (o(), g("div", {
|
|
5715
|
-
class: Ce(["map-catalog-widget w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm widget",
|
|
5715
|
+
class: Ce(["map-catalog-widget w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm widget", c.value && (x.value === "selected" || ne.value > 1) ? "min-h-[250px]" : "min-h-[0px]"])
|
|
5716
5716
|
}, [
|
|
5717
5717
|
e("div", du, [
|
|
5718
5718
|
e("div", fu, [
|
|
@@ -5744,7 +5744,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5744
5744
|
class: "p-1 rounded-full hover:bg-gray-200 transition-colors",
|
|
5745
5745
|
"aria-label": "Reset layers"
|
|
5746
5746
|
}, [...S[6] || (S[6] = [
|
|
5747
|
-
Eo('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-
|
|
5747
|
+
Eo('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-a5b24fc9><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-a5b24fc9></path><path d="M21 3v5h-5" data-v-a5b24fc9></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-a5b24fc9></path><path d="M8 16H3v5" data-v-a5b24fc9></path></svg>', 1)
|
|
5748
5748
|
])]),
|
|
5749
5749
|
e("button", {
|
|
5750
5750
|
type: "button",
|
|
@@ -5776,22 +5776,22 @@ const mo = /* @__PURE__ */ he({
|
|
|
5776
5776
|
}, [
|
|
5777
5777
|
e("div", hu, [
|
|
5778
5778
|
e("button", {
|
|
5779
|
-
onClick: S[0] || (S[0] = (R) =>
|
|
5779
|
+
onClick: S[0] || (S[0] = (R) => x.value = "catalog"),
|
|
5780
5780
|
class: Ce([
|
|
5781
5781
|
"px-4 py-2 text-sm font-medium",
|
|
5782
|
-
|
|
5782
|
+
x.value === "catalog" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
5783
5783
|
])
|
|
5784
5784
|
}, " Каталог ", 2),
|
|
5785
5785
|
e("button", {
|
|
5786
|
-
onClick: S[1] || (S[1] = (R) =>
|
|
5786
|
+
onClick: S[1] || (S[1] = (R) => x.value = "selected"),
|
|
5787
5787
|
class: Ce([
|
|
5788
5788
|
"px-4 py-2 text-sm font-medium",
|
|
5789
|
-
|
|
5789
|
+
x.value === "selected" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
5790
5790
|
])
|
|
5791
5791
|
}, " Вибрані шари ", 2)
|
|
5792
5792
|
]),
|
|
5793
5793
|
e("div", yu, [
|
|
5794
|
-
|
|
5794
|
+
x.value === "catalog" ? (o(), fe(Di, {
|
|
5795
5795
|
key: 0,
|
|
5796
5796
|
class: "map-catalog-widget__scroll",
|
|
5797
5797
|
catalog: f.value,
|
|
@@ -5800,12 +5800,12 @@ const mo = /* @__PURE__ */ he({
|
|
|
5800
5800
|
"onUpdate:search": S[2] || (S[2] = (R) => p.value = R),
|
|
5801
5801
|
onToggleLayer: L,
|
|
5802
5802
|
onOpenFilter: C
|
|
5803
|
-
}, null, 8, ["catalog", "selected", "search"])) :
|
|
5803
|
+
}, null, 8, ["catalog", "selected", "search"])) : x.value === "selected" ? (o(), fe(nu, {
|
|
5804
5804
|
key: 1,
|
|
5805
5805
|
catalog: f.value,
|
|
5806
5806
|
selected: v.value,
|
|
5807
5807
|
onToggleLayer: L,
|
|
5808
|
-
onSelectLayer: S[3] || (S[3] = (R) =>
|
|
5808
|
+
onSelectLayer: S[3] || (S[3] = (R) => x.value = "catalog"),
|
|
5809
5809
|
onReorder: I,
|
|
5810
5810
|
onRemove: S[4] || (S[4] = (R) => v.value = v.value.filter((y) => y !== R))
|
|
5811
5811
|
}, null, 8, ["catalog", "selected"])) : (o(), fe(cu, {
|
|
@@ -5813,13 +5813,13 @@ const mo = /* @__PURE__ */ he({
|
|
|
5813
5813
|
layer: T.value,
|
|
5814
5814
|
value: z.value,
|
|
5815
5815
|
onChange: i,
|
|
5816
|
-
onClose:
|
|
5816
|
+
onClose: w
|
|
5817
5817
|
}, null, 8, ["layer", "value"]))
|
|
5818
5818
|
])
|
|
5819
5819
|
], 2)
|
|
5820
5820
|
], 2));
|
|
5821
5821
|
}
|
|
5822
|
-
}), wo = /* @__PURE__ */ Ue(bu, [["__scopeId", "data-v-
|
|
5822
|
+
}), wo = /* @__PURE__ */ Ue(bu, [["__scopeId", "data-v-a5b24fc9"]]), xu = {
|
|
5823
5823
|
key: 1,
|
|
5824
5824
|
class: "flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget"
|
|
5825
5825
|
}, wu = { class: "flex items-start justify-between gap-3 p-5 pb-3" }, _u = { class: "inline-block text-xl font-semibold text-gray-800" }, ku = {
|
|
@@ -5840,7 +5840,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5840
5840
|
config: {}
|
|
5841
5841
|
},
|
|
5842
5842
|
setup(n) {
|
|
5843
|
-
const t = ["#3a7a57", "#d970d5", "#8e997b", "#b4c039", "#a855f7", "#71823a", "#f79d92", "#8b5cf6", "#a6514e", "#6b7280"], a = n, l = N(!0),
|
|
5843
|
+
const t = ["#3a7a57", "#d970d5", "#8e997b", "#b4c039", "#a855f7", "#71823a", "#f79d92", "#8b5cf6", "#a6514e", "#6b7280"], a = n, l = N(!0), x = N(!1), f = N([]), v = N(null), p = N(null), P = N(null), E = N(null), A = N(null), c = N({}), b = N(null);
|
|
5844
5844
|
function r(W) {
|
|
5845
5845
|
return W && JSON.parse(JSON.stringify(W));
|
|
5846
5846
|
}
|
|
@@ -5954,7 +5954,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5954
5954
|
}
|
|
5955
5955
|
return R.json();
|
|
5956
5956
|
}
|
|
5957
|
-
function
|
|
5957
|
+
function w(W) {
|
|
5958
5958
|
const F = /* @__PURE__ */ new Map();
|
|
5959
5959
|
return W && (W.rules || []).forEach((R) => {
|
|
5960
5960
|
const y = (R == null ? void 0 : R.value) ?? (R == null ? void 0 : R.id);
|
|
@@ -5965,12 +5965,12 @@ const mo = /* @__PURE__ */ he({
|
|
|
5965
5965
|
if (typeof (F == null ? void 0 : F.color) == "string" && F.color.trim()) return F.color.trim();
|
|
5966
5966
|
const m = a.config.colors || {};
|
|
5967
5967
|
if (m[W]) return m[W];
|
|
5968
|
-
const D =
|
|
5968
|
+
const D = w(S == null ? void 0 : S.style).get(W);
|
|
5969
5969
|
return typeof (D == null ? void 0 : D.color) == "string" && D.color.trim() ? D.color.trim() : t[y % t.length];
|
|
5970
5970
|
}
|
|
5971
5971
|
function z(W, F, S, R) {
|
|
5972
5972
|
var y;
|
|
5973
|
-
return (F == null ? void 0 : F.text) || (F == null ? void 0 : F.label) || (F == null ? void 0 : F.name) || (F == null ? void 0 : F[`${R}_text`]) || ((y =
|
|
5973
|
+
return (F == null ? void 0 : F.text) || (F == null ? void 0 : F.label) || (F == null ? void 0 : F.name) || (F == null ? void 0 : F[`${R}_text`]) || ((y = w(S == null ? void 0 : S.style).get(W)) == null ? void 0 : y.label) || W;
|
|
5974
5974
|
}
|
|
5975
5975
|
function H(W, F, S, R) {
|
|
5976
5976
|
if (!W) return;
|
|
@@ -5994,7 +5994,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
5994
5994
|
const W = u.value, F = i.value;
|
|
5995
5995
|
if (!F)
|
|
5996
5996
|
return;
|
|
5997
|
-
|
|
5997
|
+
x.value = !0;
|
|
5998
5998
|
const S = await $(W);
|
|
5999
5999
|
I(W, S);
|
|
6000
6000
|
const R = await C(W, F), y = Array.isArray(R == null ? void 0 : R.rows) ? R.rows.map((D, X) => {
|
|
@@ -6008,7 +6008,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6008
6008
|
color: we
|
|
6009
6009
|
};
|
|
6010
6010
|
}).filter(Boolean) : [];
|
|
6011
|
-
f.value = y, v.value = ((m = R == null ? void 0 : R.field) == null ? void 0 : m.label) || ((M = R == null ? void 0 : R.field) == null ? void 0 : M.name) || null, H(p.value, S, y, F),
|
|
6011
|
+
f.value = y, v.value = ((m = R == null ? void 0 : R.field) == null ? void 0 : m.label) || ((M = R == null ? void 0 : R.field) == null ? void 0 : M.name) || null, H(p.value, S, y, F), x.value = !1;
|
|
6012
6012
|
}
|
|
6013
6013
|
de(
|
|
6014
6014
|
() => [u.value, i.value],
|
|
@@ -6080,7 +6080,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6080
6080
|
]))), 128))
|
|
6081
6081
|
])
|
|
6082
6082
|
])) : K("", !0),
|
|
6083
|
-
|
|
6083
|
+
x.value ? (o(), g("div", Mu, "Завантаження…")) : f.value.length ? (o(), g(ee, { key: 3 }, [
|
|
6084
6084
|
e("h4", Tu, G(ie.value), 1),
|
|
6085
6085
|
e("ul", Pu, [
|
|
6086
6086
|
(o(!0), g(ee, null, ve(f.value, (S) => (o(), g("li", {
|
|
@@ -6153,20 +6153,20 @@ const mo = /* @__PURE__ */ he({
|
|
|
6153
6153
|
const q = U.tooltipRightHandlers;
|
|
6154
6154
|
q && (U.removeEventListener("mouseenter", q.show), U.removeEventListener("mouseleave", q.hide));
|
|
6155
6155
|
}
|
|
6156
|
-
}, a = n, l = at(),
|
|
6156
|
+
}, a = n, l = at(), x = Gt();
|
|
6157
6157
|
function f() {
|
|
6158
6158
|
return typeof globalThis < "u" && globalThis.proxy ? globalThis.proxy : typeof window < "u" && window.proxy ? window.proxy : null;
|
|
6159
6159
|
}
|
|
6160
6160
|
function v() {
|
|
6161
6161
|
var ce, me, $e;
|
|
6162
|
-
const U = (ce =
|
|
6162
|
+
const U = (ce = x == null ? void 0 : x.appContext.config.globalProperties) == null ? void 0 : ce.$settings, q = (me = U == null ? void 0 : U.map) == null ? void 0 : me.searchViewbox;
|
|
6163
6163
|
if (q) return q;
|
|
6164
6164
|
const V = f();
|
|
6165
6165
|
return ($e = V == null ? void 0 : V.map) == null ? void 0 : $e.searchViewbox;
|
|
6166
6166
|
}
|
|
6167
6167
|
function p() {
|
|
6168
6168
|
var me, $e, Fe;
|
|
6169
|
-
const U = (me =
|
|
6169
|
+
const U = (me = x == null ? void 0 : x.appContext.config.globalProperties) == null ? void 0 : me.$settings, q = ($e = U == null ? void 0 : U.map) == null ? void 0 : $e.addressSuggest;
|
|
6170
6170
|
if (typeof q == "string" && q.trim()) return q.trim();
|
|
6171
6171
|
const V = f(), ce = (Fe = V == null ? void 0 : V.map) == null ? void 0 : Fe.addressSuggest;
|
|
6172
6172
|
if (typeof ce == "string" && ce.trim()) return ce.trim();
|
|
@@ -6185,14 +6185,14 @@ const mo = /* @__PURE__ */ he({
|
|
|
6185
6185
|
de(c, (U) => {
|
|
6186
6186
|
U.includes(r.value) || (r.value = U[0]);
|
|
6187
6187
|
});
|
|
6188
|
-
const u = N(""), _ = N(!1), d = N(null), i = N(null), k = N(null), L = N(null), $ = N([]), I = N(null), C = N(!1),
|
|
6188
|
+
const u = N(""), _ = N(!1), d = N(null), i = N(null), k = N(null), L = N(null), $ = N([]), I = N(null), C = N(!1), w = N([]), T = B(
|
|
6189
6189
|
() => (r.value === "address" || r.value === "nominatim") && C.value
|
|
6190
6190
|
), z = B(() => {
|
|
6191
6191
|
var U;
|
|
6192
6192
|
return ((U = a.config) == null ? void 0 : U.addressDebounceMs) ?? 1e3;
|
|
6193
6193
|
});
|
|
6194
6194
|
let H = null;
|
|
6195
|
-
const Y = N(!1), ne = B(() => u.value.trim().length > 0 ? $.value :
|
|
6195
|
+
const Y = N(!1), ne = B(() => u.value.trim().length > 0 ? $.value : w.value), ie = B(() => u.value.trim().length ? `Знайдено ${$.value.length}` : "Історія пошуку"), J = B(() => u.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
|
|
6196
6196
|
function te() {
|
|
6197
6197
|
var U, q;
|
|
6198
6198
|
if (typeof window > "u") return [];
|
|
@@ -6210,8 +6210,8 @@ const mo = /* @__PURE__ */ he({
|
|
|
6210
6210
|
typeof window > "u" || (V = (q = window.localStorage) == null ? void 0 : q.setItem) == null || V.call(q, ko, JSON.stringify(U));
|
|
6211
6211
|
}
|
|
6212
6212
|
function F(U) {
|
|
6213
|
-
const V = [U, ...
|
|
6214
|
-
|
|
6213
|
+
const V = [U, ...w.value.filter((ce) => ce.id !== U.id)].slice(0, 10);
|
|
6214
|
+
w.value = V, W(V);
|
|
6215
6215
|
}
|
|
6216
6216
|
let S = null;
|
|
6217
6217
|
function R() {
|
|
@@ -6314,7 +6314,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6314
6314
|
return;
|
|
6315
6315
|
}
|
|
6316
6316
|
if (!U.trim()) {
|
|
6317
|
-
$.value = [], C.value =
|
|
6317
|
+
$.value = [], C.value = w.value.length > 0, we();
|
|
6318
6318
|
return;
|
|
6319
6319
|
}
|
|
6320
6320
|
we(), C.value = !0, H = window.setTimeout(() => {
|
|
@@ -6356,7 +6356,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6356
6356
|
}
|
|
6357
6357
|
}
|
|
6358
6358
|
Be(() => {
|
|
6359
|
-
|
|
6359
|
+
w.value = te(), window.addEventListener("click", Ve, !0), window.addEventListener("scroll", Se, !0), window.addEventListener("resize", Se);
|
|
6360
6360
|
}), De(() => {
|
|
6361
6361
|
window.removeEventListener("click", Ve, !0), window.removeEventListener("scroll", Se, !0), window.removeEventListener("resize", Se), we(), R(), y();
|
|
6362
6362
|
});
|
|
@@ -6525,7 +6525,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6525
6525
|
}
|
|
6526
6526
|
}
|
|
6527
6527
|
function Vt() {
|
|
6528
|
-
r.value !== "address" && r.value !== "nominatim" || u.value.trim().length ||
|
|
6528
|
+
r.value !== "address" && r.value !== "nominatim" || u.value.trim().length || w.value.length && (C.value = !0, Xe(() => {
|
|
6529
6529
|
ge();
|
|
6530
6530
|
}));
|
|
6531
6531
|
}
|
|
@@ -6753,7 +6753,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6753
6753
|
}), $o = /* @__PURE__ */ Ue(ec, [["__scopeId", "data-v-ba50488b"]]), tc = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.css", nc = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.js", oc = /* @__PURE__ */ he({
|
|
6754
6754
|
__name: "MapPrintControl",
|
|
6755
6755
|
setup(n) {
|
|
6756
|
-
const { map: t, ready: a, addControl: l, removeControl:
|
|
6756
|
+
const { map: t, ready: a, addControl: l, removeControl: x } = at(), f = N(null), v = N(null), p = N(null), P = N(null);
|
|
6757
6757
|
let E = null;
|
|
6758
6758
|
function A() {
|
|
6759
6759
|
!window.mapboxgl && window.maplibregl && (window.mapboxgl = window.maplibregl);
|
|
@@ -6767,23 +6767,23 @@ const mo = /* @__PURE__ */ he({
|
|
|
6767
6767
|
T.rel = "stylesheet", T.href = C, document.head.appendChild(T);
|
|
6768
6768
|
}
|
|
6769
6769
|
function b(C) {
|
|
6770
|
-
return new Promise((
|
|
6770
|
+
return new Promise((w, T) => {
|
|
6771
6771
|
const z = Array.from(document.scripts).find((Y) => Y.src === C);
|
|
6772
6772
|
if (z) {
|
|
6773
|
-
if (z._loaded) return
|
|
6774
|
-
z.addEventListener("load", () =>
|
|
6773
|
+
if (z._loaded) return w();
|
|
6774
|
+
z.addEventListener("load", () => w()), z.addEventListener("error", () => T(new Error(`Failed ${C}`)));
|
|
6775
6775
|
return;
|
|
6776
6776
|
}
|
|
6777
6777
|
const H = document.createElement("script");
|
|
6778
6778
|
H.src = C, H.async = !0, H.onload = () => {
|
|
6779
|
-
H._loaded = !0,
|
|
6779
|
+
H._loaded = !0, w();
|
|
6780
6780
|
}, H.onerror = () => T(new Error(`Failed ${C}`)), document.head.appendChild(H);
|
|
6781
6781
|
});
|
|
6782
6782
|
}
|
|
6783
6783
|
function r() {
|
|
6784
|
-
var
|
|
6784
|
+
var w, T, z;
|
|
6785
6785
|
const C = window;
|
|
6786
|
-
return C.MapboxExportControl || ((
|
|
6786
|
+
return C.MapboxExportControl || ((w = C.mapboxgl) == null ? void 0 : w.MapboxExportControl) || ((T = C.mapboxglExport) == null ? void 0 : T.MapboxExportControl) || ((z = C.mapboxglExport) == null ? void 0 : z.default) || null;
|
|
6787
6787
|
}
|
|
6788
6788
|
function u() {
|
|
6789
6789
|
const C = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -6807,13 +6807,13 @@ const mo = /* @__PURE__ */ he({
|
|
|
6807
6807
|
"bg-white text-gray-700 hover:bg-gray-50 hover:scale-105",
|
|
6808
6808
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400/60 focus-visible:ring-offset-2"
|
|
6809
6809
|
].join(" "), C.setAttribute("aria-label", "Друк карти");
|
|
6810
|
-
const
|
|
6810
|
+
const w = u(), T = document.createElement("span");
|
|
6811
6811
|
return T.className = [
|
|
6812
6812
|
"absolute right-full mr-3 px-1.5 py-0.5",
|
|
6813
6813
|
"bg-gray-700 text-white text-[0.75rem] font-medium rounded-md",
|
|
6814
6814
|
"opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
6815
6815
|
"pointer-events-none transition-opacity duration-200 whitespace-nowrap"
|
|
6816
|
-
].join(" "), T.textContent = "Друк карти", T.setAttribute("aria-hidden", "true"), C.appendChild(
|
|
6816
|
+
].join(" "), T.textContent = "Друк карти", T.setAttribute("aria-hidden", "true"), C.appendChild(w), C.appendChild(T), C.addEventListener("click", (z) => {
|
|
6817
6817
|
z.stopPropagation(), d();
|
|
6818
6818
|
}), P.value = C, C;
|
|
6819
6819
|
}
|
|
@@ -6822,19 +6822,19 @@ const mo = /* @__PURE__ */ he({
|
|
|
6822
6822
|
p.value.style.display === "block" ? k() : i();
|
|
6823
6823
|
}
|
|
6824
6824
|
function i() {
|
|
6825
|
-
var C,
|
|
6826
|
-
p.value && (p.value.style.display = "block", (C = P.value) == null || C.classList.add("scale-105", "shadow-xl"), (
|
|
6825
|
+
var C, w, T;
|
|
6826
|
+
p.value && (p.value.style.display = "block", (C = P.value) == null || C.classList.add("scale-105", "shadow-xl"), (w = v.value) == null || w.toggleCrosshair(!0), (T = v.value) == null || T.togglePrintableArea(!0), document.addEventListener("click", L));
|
|
6827
6827
|
}
|
|
6828
6828
|
function k() {
|
|
6829
|
-
var C,
|
|
6830
|
-
p.value && (p.value.style.display = "none", (C = P.value) == null || C.classList.remove("scale-105", "shadow-xl"), (
|
|
6829
|
+
var C, w, T;
|
|
6830
|
+
p.value && (p.value.style.display = "none", (C = P.value) == null || C.classList.remove("scale-105", "shadow-xl"), (w = v.value) == null || w.toggleCrosshair(!1), (T = v.value) == null || T.togglePrintableArea(!1), document.removeEventListener("click", L));
|
|
6831
6831
|
}
|
|
6832
6832
|
function L(C) {
|
|
6833
|
-
const
|
|
6834
|
-
|
|
6833
|
+
const w = f.value;
|
|
6834
|
+
w && (C.target && w.contains(C.target) || k());
|
|
6835
6835
|
}
|
|
6836
6836
|
function $(C) {
|
|
6837
|
-
const
|
|
6837
|
+
const w = {
|
|
6838
6838
|
Size: "Розмір",
|
|
6839
6839
|
Orientation: "Орієнтація",
|
|
6840
6840
|
Format: "Формат",
|
|
@@ -6851,27 +6851,27 @@ const mo = /* @__PURE__ */ he({
|
|
|
6851
6851
|
C.querySelectorAll("label, option").forEach((z) => {
|
|
6852
6852
|
var Y;
|
|
6853
6853
|
const H = (Y = z.textContent) == null ? void 0 : Y.trim();
|
|
6854
|
-
H &&
|
|
6854
|
+
H && w[H] && (z.textContent = w[H]);
|
|
6855
6855
|
});
|
|
6856
6856
|
const T = C.querySelector("button");
|
|
6857
6857
|
T && (T.textContent = "Друкувати");
|
|
6858
6858
|
}
|
|
6859
6859
|
function I(C) {
|
|
6860
|
-
const
|
|
6861
|
-
if (!
|
|
6862
|
-
p.value =
|
|
6860
|
+
const w = C.querySelector(".mapboxgl-export-list");
|
|
6861
|
+
if (!w || !f.value) return;
|
|
6862
|
+
p.value = w;
|
|
6863
6863
|
const T = C.querySelector("button");
|
|
6864
6864
|
if (T && (T.style.display = "none"), C.style.display = "none", !P.value) {
|
|
6865
6865
|
const H = _();
|
|
6866
6866
|
f.value.appendChild(H);
|
|
6867
6867
|
}
|
|
6868
|
-
|
|
6868
|
+
w.style.display = "none";
|
|
6869
6869
|
const z = "_printControlBound";
|
|
6870
|
-
if (!
|
|
6870
|
+
if (!w[z]) {
|
|
6871
6871
|
const H = (Y) => Y.stopPropagation();
|
|
6872
|
-
|
|
6872
|
+
w.addEventListener("click", H), w.addEventListener("mousedown", H), w[z] = !0;
|
|
6873
6873
|
}
|
|
6874
|
-
f.value.appendChild(
|
|
6874
|
+
f.value.appendChild(w), $(w);
|
|
6875
6875
|
}
|
|
6876
6876
|
return Be(async () => {
|
|
6877
6877
|
await (a == null ? void 0 : a());
|
|
@@ -6884,9 +6884,9 @@ const mo = /* @__PURE__ */ he({
|
|
|
6884
6884
|
console.warn("[MapPrintControl] load error", z);
|
|
6885
6885
|
return;
|
|
6886
6886
|
}
|
|
6887
|
-
const
|
|
6888
|
-
if (!
|
|
6889
|
-
const T = new
|
|
6887
|
+
const w = r();
|
|
6888
|
+
if (!w) return;
|
|
6889
|
+
const T = new w({
|
|
6890
6890
|
PageSize: "A4",
|
|
6891
6891
|
PageOrientation: "landscape",
|
|
6892
6892
|
Format: "pdf",
|
|
@@ -6909,11 +6909,11 @@ const mo = /* @__PURE__ */ he({
|
|
|
6909
6909
|
const C = t.value;
|
|
6910
6910
|
if (v.value)
|
|
6911
6911
|
try {
|
|
6912
|
-
|
|
6912
|
+
x ? x(v.value) : C == null || C.removeControl(v.value);
|
|
6913
6913
|
} catch {
|
|
6914
6914
|
}
|
|
6915
6915
|
v.value = null;
|
|
6916
|
-
}), (C,
|
|
6916
|
+
}), (C, w) => (o(), g("div", {
|
|
6917
6917
|
ref_key: "root",
|
|
6918
6918
|
ref: f,
|
|
6919
6919
|
class: "map-print-control"
|
|
@@ -6934,7 +6934,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6934
6934
|
targetAriaLabel: {}
|
|
6935
6935
|
},
|
|
6936
6936
|
setup(n) {
|
|
6937
|
-
const t = n, { map: a, ready: l } = at(),
|
|
6937
|
+
const t = n, { map: a, ready: l } = at(), x = N(null), f = N(null), v = N(null), p = N(null), P = Hn(), E = B(() => {
|
|
6938
6938
|
var k;
|
|
6939
6939
|
return ((k = P.value) == null ? void 0 : k.map) ?? null;
|
|
6940
6940
|
});
|
|
@@ -6946,9 +6946,9 @@ const mo = /* @__PURE__ */ he({
|
|
|
6946
6946
|
if (k && typeof k == "object") {
|
|
6947
6947
|
const L = k, $ = L.lng ?? L.lon ?? L.long ?? L.x, I = L.lat ?? L.y;
|
|
6948
6948
|
if ($ != null && I != null) {
|
|
6949
|
-
const C = Number($),
|
|
6950
|
-
if (!Number.isNaN(C) && !Number.isNaN(
|
|
6951
|
-
return [C,
|
|
6949
|
+
const C = Number($), w = Number(I);
|
|
6950
|
+
if (!Number.isNaN(C) && !Number.isNaN(w))
|
|
6951
|
+
return [C, w];
|
|
6952
6952
|
}
|
|
6953
6953
|
}
|
|
6954
6954
|
if (typeof k == "string") {
|
|
@@ -6960,7 +6960,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
6960
6960
|
}
|
|
6961
6961
|
function c(k) {
|
|
6962
6962
|
const L = A(k);
|
|
6963
|
-
L && (
|
|
6963
|
+
L && (x.value = L);
|
|
6964
6964
|
}
|
|
6965
6965
|
function b(k) {
|
|
6966
6966
|
const L = Number(k);
|
|
@@ -7014,9 +7014,9 @@ const mo = /* @__PURE__ */ he({
|
|
|
7014
7014
|
await (l == null ? void 0 : l());
|
|
7015
7015
|
const k = a.value;
|
|
7016
7016
|
if (k) {
|
|
7017
|
-
if (!
|
|
7017
|
+
if (!x.value) {
|
|
7018
7018
|
const L = k.getCenter();
|
|
7019
|
-
|
|
7019
|
+
x.value = [L.lng, L.lat];
|
|
7020
7020
|
}
|
|
7021
7021
|
f.value == null && (f.value = k.getZoom());
|
|
7022
7022
|
}
|
|
@@ -7024,7 +7024,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
7024
7024
|
function d() {
|
|
7025
7025
|
const k = a.value;
|
|
7026
7026
|
if (!k) return;
|
|
7027
|
-
const L =
|
|
7027
|
+
const L = x.value || (() => {
|
|
7028
7028
|
const I = k.getCenter();
|
|
7029
7029
|
return [I.lng, I.lat];
|
|
7030
7030
|
})(), $ = f.value ?? k.getZoom();
|
|
@@ -7084,13 +7084,13 @@ const mo = /* @__PURE__ */ he({
|
|
|
7084
7084
|
},
|
|
7085
7085
|
setup(n) {
|
|
7086
7086
|
var L, $, I, C;
|
|
7087
|
-
const t = n, a = (($ = (L = Gt()) == null ? void 0 : L.appContext.config.globalProperties) == null ? void 0 : $.$settings) || null, l = Ht((I = a == null ? void 0 : a.map) == null ? void 0 : I.center) || [30, 50],
|
|
7088
|
-
function P(
|
|
7089
|
-
return typeof
|
|
7087
|
+
const t = n, a = (($ = (L = Gt()) == null ? void 0 : L.appContext.config.globalProperties) == null ? void 0 : $.$settings) || null, l = Ht((I = a == null ? void 0 : a.map) == null ? void 0 : I.center) || [30, 50], x = N(null), f = Lo(null), v = (C = t.options) == null ? void 0 : C.active, p = N(v === void 0 ? !1 : !!v);
|
|
7088
|
+
function P(w, T) {
|
|
7089
|
+
return typeof w == "number" && Number.isFinite(w) ? w : T;
|
|
7090
7090
|
}
|
|
7091
7091
|
const E = B(() => {
|
|
7092
7092
|
var Y, ne;
|
|
7093
|
-
const
|
|
7093
|
+
const w = (Y = t.options) == null ? void 0 : Y.width, T = (ne = t.options) == null ? void 0 : ne.height, z = P(t.width ?? w, 210), H = P(t.height ?? T, 150);
|
|
7094
7094
|
return {
|
|
7095
7095
|
width: `${z}px`,
|
|
7096
7096
|
height: `${H}px`
|
|
@@ -7098,10 +7098,10 @@ const mo = /* @__PURE__ */ he({
|
|
|
7098
7098
|
});
|
|
7099
7099
|
function A() {
|
|
7100
7100
|
var T, z;
|
|
7101
|
-
const
|
|
7102
|
-
if (!
|
|
7101
|
+
const w = (z = (T = t.mapContext) == null ? void 0 : T.map) == null ? void 0 : z.value;
|
|
7102
|
+
if (!w || typeof w.getStyle != "function") return null;
|
|
7103
7103
|
try {
|
|
7104
|
-
const H =
|
|
7104
|
+
const H = w.getStyle();
|
|
7105
7105
|
return H ? JSON.parse(JSON.stringify(H)) : null;
|
|
7106
7106
|
} catch {
|
|
7107
7107
|
return null;
|
|
@@ -7110,10 +7110,10 @@ const mo = /* @__PURE__ */ he({
|
|
|
7110
7110
|
let c = null;
|
|
7111
7111
|
function b() {
|
|
7112
7112
|
var Y;
|
|
7113
|
-
if (typeof window > "u" || f.value || !
|
|
7114
|
-
const
|
|
7115
|
-
container:
|
|
7116
|
-
style:
|
|
7113
|
+
if (typeof window > "u" || f.value || !x.value) return;
|
|
7114
|
+
const w = A(), T = l, z = {
|
|
7115
|
+
container: x.value,
|
|
7116
|
+
style: w ?? {
|
|
7117
7117
|
version: 8,
|
|
7118
7118
|
sources: {
|
|
7119
7119
|
voyager: {
|
|
@@ -7144,10 +7144,10 @@ const mo = /* @__PURE__ */ he({
|
|
|
7144
7144
|
}
|
|
7145
7145
|
function r() {
|
|
7146
7146
|
if (!f.value) return;
|
|
7147
|
-
const
|
|
7148
|
-
|
|
7147
|
+
const w = A();
|
|
7148
|
+
w && (f.value.once("styledata", () => {
|
|
7149
7149
|
u(), d();
|
|
7150
|
-
}), f.value.setStyle(
|
|
7150
|
+
}), f.value.setStyle(w));
|
|
7151
7151
|
}
|
|
7152
7152
|
function u() {
|
|
7153
7153
|
if (f.value) {
|
|
@@ -7189,21 +7189,21 @@ const mo = /* @__PURE__ */ he({
|
|
|
7189
7189
|
}
|
|
7190
7190
|
function _() {
|
|
7191
7191
|
p.value = !p.value, p.value && Xe(() => {
|
|
7192
|
-
var
|
|
7193
|
-
return (
|
|
7192
|
+
var w;
|
|
7193
|
+
return (w = f.value) == null ? void 0 : w.resize();
|
|
7194
7194
|
});
|
|
7195
7195
|
}
|
|
7196
7196
|
function d() {
|
|
7197
7197
|
var ie, J;
|
|
7198
|
-
const
|
|
7199
|
-
if (!f.value || !
|
|
7198
|
+
const w = (J = (ie = t.mapContext) == null ? void 0 : ie.map) == null ? void 0 : J.value;
|
|
7199
|
+
if (!f.value || !w || !w.getBounds) return;
|
|
7200
7200
|
if (typeof f.value.isStyleLoaded == "function" && !f.value.isStyleLoaded()) {
|
|
7201
7201
|
f.value.once("styledata", () => {
|
|
7202
7202
|
d();
|
|
7203
7203
|
});
|
|
7204
7204
|
return;
|
|
7205
7205
|
}
|
|
7206
|
-
const T =
|
|
7206
|
+
const T = w.getBounds();
|
|
7207
7207
|
if (!T) return;
|
|
7208
7208
|
const z = T.getNorthEast(), H = T.getSouthWest();
|
|
7209
7209
|
if (!z || !H) return;
|
|
@@ -7229,15 +7229,15 @@ const mo = /* @__PURE__ */ he({
|
|
|
7229
7229
|
}
|
|
7230
7230
|
function i() {
|
|
7231
7231
|
var z;
|
|
7232
|
-
const
|
|
7233
|
-
!(
|
|
7232
|
+
const w = t.mapContext, T = (z = w == null ? void 0 : w.map) == null ? void 0 : z.value;
|
|
7233
|
+
!(w != null && w.on) || !T || (c == null || c(), c = w.on("move", d), d());
|
|
7234
7234
|
}
|
|
7235
7235
|
async function k() {
|
|
7236
|
-
const
|
|
7237
|
-
if (
|
|
7238
|
-
if (typeof
|
|
7236
|
+
const w = t.mapContext;
|
|
7237
|
+
if (w) {
|
|
7238
|
+
if (typeof w.ready == "function")
|
|
7239
7239
|
try {
|
|
7240
|
-
await
|
|
7240
|
+
await w.ready();
|
|
7241
7241
|
} catch {
|
|
7242
7242
|
return;
|
|
7243
7243
|
}
|
|
@@ -7253,8 +7253,8 @@ const mo = /* @__PURE__ */ he({
|
|
|
7253
7253
|
}
|
|
7254
7254
|
), de(
|
|
7255
7255
|
() => {
|
|
7256
|
-
var
|
|
7257
|
-
return (T = (
|
|
7256
|
+
var w, T;
|
|
7257
|
+
return (T = (w = t.mapContext) == null ? void 0 : w.map) == null ? void 0 : T.value;
|
|
7258
7258
|
},
|
|
7259
7259
|
() => {
|
|
7260
7260
|
f.value && (r(), k());
|
|
@@ -7263,8 +7263,8 @@ const mo = /* @__PURE__ */ he({
|
|
|
7263
7263
|
E,
|
|
7264
7264
|
() => {
|
|
7265
7265
|
f.value && Xe(() => {
|
|
7266
|
-
var
|
|
7267
|
-
return (
|
|
7266
|
+
var w;
|
|
7267
|
+
return (w = f.value) == null ? void 0 : w.resize();
|
|
7268
7268
|
});
|
|
7269
7269
|
}
|
|
7270
7270
|
), de(
|
|
@@ -7272,15 +7272,15 @@ const mo = /* @__PURE__ */ he({
|
|
|
7272
7272
|
() => {
|
|
7273
7273
|
var T;
|
|
7274
7274
|
c == null || c(), c = null, f.value && (f.value.remove(), f.value = null);
|
|
7275
|
-
const
|
|
7276
|
-
typeof
|
|
7275
|
+
const w = (T = t.options) == null ? void 0 : T.active;
|
|
7276
|
+
typeof w == "boolean" && (p.value = w), Xe(() => {
|
|
7277
7277
|
b(), k();
|
|
7278
7278
|
});
|
|
7279
7279
|
},
|
|
7280
7280
|
{ deep: !0 }
|
|
7281
7281
|
), De(() => {
|
|
7282
7282
|
c == null || c(), c = null, f.value && (f.value.remove(), f.value = null);
|
|
7283
|
-
}), (
|
|
7283
|
+
}), (w, T) => (o(), g("div", {
|
|
7284
7284
|
class: Ce(["minimap", { "minimap--open": p.value }])
|
|
7285
7285
|
}, [
|
|
7286
7286
|
e("button", {
|
|
@@ -7295,7 +7295,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
7295
7295
|
et(e("div", gc, [
|
|
7296
7296
|
e("div", {
|
|
7297
7297
|
ref_key: "minimapRoot",
|
|
7298
|
-
ref:
|
|
7298
|
+
ref: x,
|
|
7299
7299
|
class: "mapboxgl-ctrl-minimap mapboxgl-ctrl mapboxgl-map",
|
|
7300
7300
|
style: rt(E.value),
|
|
7301
7301
|
id: "mapboxgl-minimap"
|
|
@@ -7312,13 +7312,13 @@ const mo = /* @__PURE__ */ he({
|
|
|
7312
7312
|
__name: "AddCoordinates",
|
|
7313
7313
|
emits: ["submit", "cancel"],
|
|
7314
7314
|
setup(n, { emit: t }) {
|
|
7315
|
-
const a = t, l = N(null),
|
|
7316
|
-
if (l.value === null ||
|
|
7315
|
+
const a = t, l = N(null), x = N(null), f = (P, E, A) => Math.min(Math.max(P, E), A), v = () => {
|
|
7316
|
+
if (l.value === null || x.value === null || !Number.isFinite(l.value) || !Number.isFinite(x.value))
|
|
7317
7317
|
return;
|
|
7318
|
-
const P = f(l.value, -90, 90), E = f(
|
|
7319
|
-
a("submit", { lat: P, lng: E }), l.value = null,
|
|
7318
|
+
const P = f(l.value, -90, 90), E = f(x.value, -180, 180);
|
|
7319
|
+
a("submit", { lat: P, lng: E }), l.value = null, x.value = null;
|
|
7320
7320
|
}, p = () => {
|
|
7321
|
-
l.value = null,
|
|
7321
|
+
l.value = null, x.value = null, a("cancel");
|
|
7322
7322
|
};
|
|
7323
7323
|
return (P, E) => (o(), g("div", yc, [
|
|
7324
7324
|
E[2] || (E[2] = e("p", { class: "text-xs text-gray-600 mb-1" }, "Додати точку за координатами:", -1)),
|
|
@@ -7338,7 +7338,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
7338
7338
|
]
|
|
7339
7339
|
]),
|
|
7340
7340
|
et(e("input", {
|
|
7341
|
-
"onUpdate:modelValue": E[1] || (E[1] = (A) =>
|
|
7341
|
+
"onUpdate:modelValue": E[1] || (E[1] = (A) => x.value = A),
|
|
7342
7342
|
type: "number",
|
|
7343
7343
|
step: "0.0001",
|
|
7344
7344
|
class: "w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-500",
|
|
@@ -7346,7 +7346,7 @@ const mo = /* @__PURE__ */ he({
|
|
|
7346
7346
|
}, null, 512), [
|
|
7347
7347
|
[
|
|
7348
7348
|
$t,
|
|
7349
|
-
|
|
7349
|
+
x.value,
|
|
7350
7350
|
void 0,
|
|
7351
7351
|
{ number: !0 }
|
|
7352
7352
|
]
|
|
@@ -7436,7 +7436,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7436
7436
|
},
|
|
7437
7437
|
emits: ["update", "delete"],
|
|
7438
7438
|
setup(n, { emit: t }) {
|
|
7439
|
-
const a = n, l = t,
|
|
7439
|
+
const a = n, l = t, x = B(
|
|
7440
7440
|
() => `${a.coords.lat.toFixed(4)}°, ${a.coords.lng.toFixed(4)}°`
|
|
7441
7441
|
), f = N(!1), v = N(a.coords.lat), p = N(a.coords.lng);
|
|
7442
7442
|
de(
|
|
@@ -7500,7 +7500,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7500
7500
|
type: "button",
|
|
7501
7501
|
onClick: A
|
|
7502
7502
|
}, " ✓ ")
|
|
7503
|
-
])) : (o(), g("span", Sc, G(
|
|
7503
|
+
])) : (o(), g("span", Sc, G(x.value), 1)),
|
|
7504
7504
|
f.value ? K("", !0) : (o(), g("button", {
|
|
7505
7505
|
key: 2,
|
|
7506
7506
|
class: "text-blue-500 hover:text-blue-600 px-0.5",
|
|
@@ -7555,7 +7555,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7555
7555
|
},
|
|
7556
7556
|
emits: ["update-point", "delete-point"],
|
|
7557
7557
|
setup(n) {
|
|
7558
|
-
const t = n, a = N(!1), l = N("km2"),
|
|
7558
|
+
const t = n, a = N(!1), l = N("km2"), x = [
|
|
7559
7559
|
{ id: "km2", label: "км²" },
|
|
7560
7560
|
{ id: "ha", label: "га" },
|
|
7561
7561
|
{ id: "m2", label: "м²" }
|
|
@@ -7638,13 +7638,13 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7638
7638
|
]),
|
|
7639
7639
|
_[2] || (_[2] = e("span", { class: "text-xs font-medium text-gray-600 flex-1" }, "Площа", -1)),
|
|
7640
7640
|
e("div", Ic, [
|
|
7641
|
-
(o(), g(ee, null, ve(
|
|
7641
|
+
(o(), g(ee, null, ve(x, (d, i) => e("button", {
|
|
7642
7642
|
key: d.id,
|
|
7643
7643
|
type: "button",
|
|
7644
7644
|
class: Ce([
|
|
7645
7645
|
"px-2.5 py-1 text-xs font-medium transition-colors border-r border-gray-200 last:border-r-0",
|
|
7646
7646
|
i === 0 && "rounded-l-md",
|
|
7647
|
-
i ===
|
|
7647
|
+
i === x.length - 1 && "rounded-r-md",
|
|
7648
7648
|
l.value === d.id ? "bg-white text-green-600 font-semibold shadow-sm" : "text-gray-600 hover:bg-gray-50"
|
|
7649
7649
|
]),
|
|
7650
7650
|
onClick: Je((k) => l.value = d.id, ["stop"])
|
|
@@ -7717,7 +7717,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7717
7717
|
function l(f) {
|
|
7718
7718
|
return No(f);
|
|
7719
7719
|
}
|
|
7720
|
-
const
|
|
7720
|
+
const x = B(() => {
|
|
7721
7721
|
const f = [], v = t.points;
|
|
7722
7722
|
if (v.length < 2) return f;
|
|
7723
7723
|
for (let p = 0; p < v.length; p++) {
|
|
@@ -7735,7 +7735,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7735
7735
|
return (f, v) => (o(), g("div", Yc, [
|
|
7736
7736
|
v[0] || (v[0] = e("p", { class: "text-xs font-medium text-gray-600 mb-1.5" }, "Відстань між точками:", -1)),
|
|
7737
7737
|
e("div", Xc, [
|
|
7738
|
-
(o(!0), g(ee, null, ve(
|
|
7738
|
+
(o(!0), g(ee, null, ve(x.value, (p, P) => (o(), g("div", {
|
|
7739
7739
|
key: P,
|
|
7740
7740
|
class: "flex items-center justify-between text-xs py-1 px-2 rounded bg-gray-50"
|
|
7741
7741
|
}, [
|
|
@@ -7763,7 +7763,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7763
7763
|
"shape-closed-change"
|
|
7764
7764
|
],
|
|
7765
7765
|
setup(n, { expose: t, emit: a }) {
|
|
7766
|
-
const l = a,
|
|
7766
|
+
const l = a, x = N([]), f = B(() => x.value.length > 0), v = N(!1), p = N(!1), P = N("general");
|
|
7767
7767
|
function E(Y) {
|
|
7768
7768
|
P.value = Y, l("tab-change", Y);
|
|
7769
7769
|
}
|
|
@@ -7771,31 +7771,31 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7771
7771
|
l("tab-change", P.value);
|
|
7772
7772
|
});
|
|
7773
7773
|
const A = B(
|
|
7774
|
-
() =>
|
|
7774
|
+
() => x.value.length >= 3 && !p.value
|
|
7775
7775
|
);
|
|
7776
7776
|
let c = 1;
|
|
7777
|
-
const b = () =>
|
|
7778
|
-
|
|
7777
|
+
const b = () => x.value.map((Y) => ({ id: Y.id, coords: { ...Y.coords } })), r = () => {
|
|
7778
|
+
x.value.length < 3 && p.value && (p.value = !1, l("shape-closed-change", !1)), l("points-change", b());
|
|
7779
7779
|
}, u = () => {
|
|
7780
7780
|
const Y = c;
|
|
7781
7781
|
return c += 1, Y;
|
|
7782
7782
|
}, _ = (Y) => {
|
|
7783
|
-
|
|
7784
|
-
...
|
|
7783
|
+
x.value = [
|
|
7784
|
+
...x.value,
|
|
7785
7785
|
{ id: u(), coords: { lat: Y.lat, lng: Y.lng } }
|
|
7786
7786
|
], r();
|
|
7787
7787
|
}, d = ({
|
|
7788
7788
|
id: Y,
|
|
7789
7789
|
coords: ne
|
|
7790
7790
|
}) => {
|
|
7791
|
-
const ie =
|
|
7791
|
+
const ie = x.value.findIndex((te) => te.id === Y);
|
|
7792
7792
|
if (ie === -1) return;
|
|
7793
|
-
const J = [...
|
|
7794
|
-
J[ie] = { id: Y, coords: { ...ne } },
|
|
7793
|
+
const J = [...x.value];
|
|
7794
|
+
J[ie] = { id: Y, coords: { ...ne } }, x.value = J, r();
|
|
7795
7795
|
}, i = (Y) => {
|
|
7796
|
-
|
|
7796
|
+
x.value = x.value.filter((ne) => ne.id !== Y), r();
|
|
7797
7797
|
}, k = () => {
|
|
7798
|
-
|
|
7798
|
+
x.value = [], p.value && (p.value = !1, l("shape-closed-change", !1)), r();
|
|
7799
7799
|
}, L = (Y) => {
|
|
7800
7800
|
d(Y);
|
|
7801
7801
|
}, $ = (Y) => {
|
|
@@ -7804,7 +7804,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7804
7804
|
v.value = !0, l("add-request");
|
|
7805
7805
|
}, C = (Y) => {
|
|
7806
7806
|
_(Y), v.value = !1;
|
|
7807
|
-
},
|
|
7807
|
+
}, w = () => {
|
|
7808
7808
|
v.value = !1;
|
|
7809
7809
|
}, T = () => {
|
|
7810
7810
|
A.value && (p.value = !0, l("complete"), l("shape-closed-change", !0));
|
|
@@ -7813,7 +7813,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7813
7813
|
id: ie.id ?? u(),
|
|
7814
7814
|
coords: { ...ie.coords }
|
|
7815
7815
|
}));
|
|
7816
|
-
|
|
7816
|
+
x.value = ne, ne.length === 0 ? c = 1 : c = Math.max(...ne.map((ie) => ie.id)) + 1, r();
|
|
7817
7817
|
}, H = () => {
|
|
7818
7818
|
k(), v.value = !1, l("close");
|
|
7819
7819
|
};
|
|
@@ -7867,7 +7867,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7867
7867
|
P.value === "general" ? (o(), g(ee, { key: 0 }, [
|
|
7868
7868
|
f.value ? (o(), fe(Wc, {
|
|
7869
7869
|
key: 1,
|
|
7870
|
-
points:
|
|
7870
|
+
points: x.value,
|
|
7871
7871
|
"is-shape-closed": p.value,
|
|
7872
7872
|
onUpdatePoint: L,
|
|
7873
7873
|
onDeletePoint: $
|
|
@@ -7875,7 +7875,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7875
7875
|
], 64)) : (o(), g("div", ld, [
|
|
7876
7876
|
f.value ? (o(), fe(Qc, {
|
|
7877
7877
|
key: 0,
|
|
7878
|
-
points:
|
|
7878
|
+
points: x.value,
|
|
7879
7879
|
"is-shape-closed": p.value
|
|
7880
7880
|
}, null, 8, ["points", "is-shape-closed"])) : (o(), g("p", ad, "Додайте точки на карті, щоб бачити відстані між ними."))
|
|
7881
7881
|
])),
|
|
@@ -7893,7 +7893,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7893
7893
|
v.value ? (o(), fe(xc, {
|
|
7894
7894
|
key: 0,
|
|
7895
7895
|
onSubmit: C,
|
|
7896
|
-
onCancel:
|
|
7896
|
+
onCancel: w
|
|
7897
7897
|
})) : K("", !0),
|
|
7898
7898
|
f.value ? (o(), fe(_c, {
|
|
7899
7899
|
key: 1,
|
|
@@ -7922,7 +7922,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7922
7922
|
function a(d) {
|
|
7923
7923
|
return No(d);
|
|
7924
7924
|
}
|
|
7925
|
-
const l = n, { map:
|
|
7925
|
+
const l = n, { map: x, ready: f } = at();
|
|
7926
7926
|
function v() {
|
|
7927
7927
|
return { type: "FeatureCollection", features: [] };
|
|
7928
7928
|
}
|
|
@@ -7934,9 +7934,9 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7934
7934
|
I += t(d[C - 1].coords, d[C].coords), $.push(I);
|
|
7935
7935
|
return i && d.length >= 2 && (I += t(d[d.length - 1].coords, d[0].coords)), {
|
|
7936
7936
|
type: "FeatureCollection",
|
|
7937
|
-
features: d.map((C,
|
|
7938
|
-
const T = L === "general" ?
|
|
7939
|
-
t(d[
|
|
7937
|
+
features: d.map((C, w) => {
|
|
7938
|
+
const T = L === "general" ? w === 0 ? "0" : a($[w]) : w === 0 ? "0" : a(
|
|
7939
|
+
t(d[w - 1].coords, d[w].coords)
|
|
7940
7940
|
);
|
|
7941
7941
|
return {
|
|
7942
7942
|
type: "Feature",
|
|
@@ -7944,7 +7944,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7944
7944
|
type: "Point",
|
|
7945
7945
|
coordinates: [C.coords.lng, C.coords.lat]
|
|
7946
7946
|
},
|
|
7947
|
-
properties: { id: C.id, index:
|
|
7947
|
+
properties: { id: C.id, index: w + 1, label: T }
|
|
7948
7948
|
};
|
|
7949
7949
|
})
|
|
7950
7950
|
};
|
|
@@ -7955,7 +7955,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7955
7955
|
for (let L = 0; L < d.length; L++) {
|
|
7956
7956
|
const $ = L === d.length - 1 && i ? 0 : L + 1;
|
|
7957
7957
|
if ($ >= d.length) break;
|
|
7958
|
-
const I = d[L].coords, C = d[$].coords,
|
|
7958
|
+
const I = d[L].coords, C = d[$].coords, w = t(I, C);
|
|
7959
7959
|
k.push({
|
|
7960
7960
|
type: "Feature",
|
|
7961
7961
|
geometry: {
|
|
@@ -7965,7 +7965,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7965
7965
|
[C.lng, C.lat]
|
|
7966
7966
|
]
|
|
7967
7967
|
},
|
|
7968
|
-
properties: { distance: a(
|
|
7968
|
+
properties: { distance: a(w) }
|
|
7969
7969
|
});
|
|
7970
7970
|
}
|
|
7971
7971
|
return { type: "FeatureCollection", features: k };
|
|
@@ -8090,7 +8090,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8090
8090
|
}
|
|
8091
8091
|
function _() {
|
|
8092
8092
|
f().then(() => {
|
|
8093
|
-
const d =
|
|
8093
|
+
const d = x.value;
|
|
8094
8094
|
d && (c || b(d), u(d));
|
|
8095
8095
|
});
|
|
8096
8096
|
}
|
|
@@ -8099,7 +8099,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8099
8099
|
() => _(),
|
|
8100
8100
|
{ deep: !0, immediate: !0 }
|
|
8101
8101
|
), De(() => {
|
|
8102
|
-
f().then(() => r(
|
|
8102
|
+
f().then(() => r(x.value));
|
|
8103
8103
|
}), (d, i) => null;
|
|
8104
8104
|
}
|
|
8105
8105
|
}), fd = { class: "geolocation-panel-wrap absolute bottom-12 right-0 z-20 animate-slide-up flex items-end gap-2" }, pd = { class: "bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden w-72" }, gd = { class: "bg-gradient-to-r from-blue-400 to-blue-500 px-3 py-2 flex items-center justify-between" }, vd = { class: "flex items-center gap-2" }, md = ["disabled"], hd = { class: "px-3 py-3 border-t border-gray-100 flex items-center justify-between gap-3" }, yd = { class: "text-sm font-mono text-slate-700" }, bd = { class: "flex items-center gap-2 shrink-0" }, xd = {
|
|
@@ -8113,7 +8113,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8113
8113
|
},
|
|
8114
8114
|
emits: ["close", "recenter"],
|
|
8115
8115
|
setup(n, { emit: t }) {
|
|
8116
|
-
const a = n, l = t,
|
|
8116
|
+
const a = n, l = t, x = B(() => a.position != null ? a.position.lng.toFixed(6) : "—"), f = B(() => a.position != null ? a.position.lat.toFixed(6) : "—"), v = N(!1);
|
|
8117
8117
|
let p = null;
|
|
8118
8118
|
function P() {
|
|
8119
8119
|
if (a.position == null) return;
|
|
@@ -8167,7 +8167,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8167
8167
|
b[4] || (b[4] = e("p", { class: "text-xs font-medium text-gray-500 mb-1" }, "Координати", -1)),
|
|
8168
8168
|
e("p", yd, [
|
|
8169
8169
|
b[1] || (b[1] = e("span", { class: "text-gray-500" }, "x:", -1)),
|
|
8170
|
-
ke(" " + G(
|
|
8170
|
+
ke(" " + G(x.value) + " ", 1),
|
|
8171
8171
|
b[2] || (b[2] = e("br", null, null, -1)),
|
|
8172
8172
|
b[3] || (b[3] = e("span", { class: "text-gray-500" }, "y:", -1)),
|
|
8173
8173
|
ke(" " + G(f.value), 1)
|
|
@@ -8198,7 +8198,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8198
8198
|
},
|
|
8199
8199
|
setup(n) {
|
|
8200
8200
|
const t = n, { map: a, ready: l } = at();
|
|
8201
|
-
let
|
|
8201
|
+
let x = !1;
|
|
8202
8202
|
function f() {
|
|
8203
8203
|
return { type: "FeatureCollection", features: [] };
|
|
8204
8204
|
}
|
|
@@ -8226,14 +8226,14 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8226
8226
|
"circle-stroke-width": 2,
|
|
8227
8227
|
"circle-stroke-color": "#dddddd"
|
|
8228
8228
|
}
|
|
8229
|
-
}),
|
|
8229
|
+
}), x = !0);
|
|
8230
8230
|
}
|
|
8231
8231
|
function P(c) {
|
|
8232
8232
|
try {
|
|
8233
8233
|
c.getLayer(`${jt}-circle`) && c.removeLayer(`${jt}-circle`), c.getSource(jt) && c.removeSource(jt);
|
|
8234
8234
|
} catch {
|
|
8235
8235
|
}
|
|
8236
|
-
|
|
8236
|
+
x = !1;
|
|
8237
8237
|
}
|
|
8238
8238
|
function E(c) {
|
|
8239
8239
|
const b = c.getSource(jt);
|
|
@@ -8253,10 +8253,10 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8253
8253
|
const c = a.value;
|
|
8254
8254
|
if (c) {
|
|
8255
8255
|
if (t.position == null) {
|
|
8256
|
-
|
|
8256
|
+
x && P(c);
|
|
8257
8257
|
return;
|
|
8258
8258
|
}
|
|
8259
|
-
|
|
8259
|
+
x || p(c), E(c);
|
|
8260
8260
|
}
|
|
8261
8261
|
});
|
|
8262
8262
|
}
|
|
@@ -8273,7 +8273,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8273
8273
|
__name: "index",
|
|
8274
8274
|
emits: ["close", "clear", "download", "finish-polygon", "undo", "update:tool", "update:stroke-color", "update:stroke-width"],
|
|
8275
8275
|
setup(n, { expose: t, emit: a }) {
|
|
8276
|
-
const l = a,
|
|
8276
|
+
const l = a, x = [
|
|
8277
8277
|
{ id: "pen", icon: Un, title: "Олівець" },
|
|
8278
8278
|
{ id: "line", icon: wr, title: "Лінія" },
|
|
8279
8279
|
{ id: "rect", icon: _r, title: "Прямокутник" },
|
|
@@ -8331,7 +8331,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8331
8331
|
e("section", Ed, [
|
|
8332
8332
|
d[3] || (d[3] = e("span", { class: "block text-[11px] font-semibold text-gray-500 uppercase tracking-wider mb-2" }, " Інструмент ", -1)),
|
|
8333
8333
|
e("div", Md, [
|
|
8334
|
-
(o(), g(ee, null, ve(
|
|
8334
|
+
(o(), g(ee, null, ve(x, (i) => e("button", {
|
|
8335
8335
|
key: i.id,
|
|
8336
8336
|
type: "button",
|
|
8337
8337
|
class: Ce([
|
|
@@ -8444,7 +8444,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8444
8444
|
strokeWidth: { default: 3 }
|
|
8445
8445
|
},
|
|
8446
8446
|
setup(n, { expose: t }) {
|
|
8447
|
-
const a = N(null), l = N(null),
|
|
8447
|
+
const a = N(null), l = N(null), x = N(null), f = N({ x: 0, y: 0 }), v = N(!1), p = n, P = B(() => Math.max(p.strokeWidth * 3, 12)), E = B(() => {
|
|
8448
8448
|
const m = P.value * 2;
|
|
8449
8449
|
return {
|
|
8450
8450
|
width: `${m}px`,
|
|
@@ -8457,7 +8457,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8457
8457
|
}), { ready: A } = at(), c = N(!1), b = N([]), r = N([]);
|
|
8458
8458
|
let u = 0, _ = 0, d = 0, i = 0, k = null;
|
|
8459
8459
|
function L() {
|
|
8460
|
-
const m = l.value, M =
|
|
8460
|
+
const m = l.value, M = x.value, D = a.value;
|
|
8461
8461
|
if (!m || !D) return;
|
|
8462
8462
|
const X = D.parentElement;
|
|
8463
8463
|
if (!X) return;
|
|
@@ -8486,11 +8486,11 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8486
8486
|
return m ? m.getContext("2d") : null;
|
|
8487
8487
|
}
|
|
8488
8488
|
function C() {
|
|
8489
|
-
const m =
|
|
8489
|
+
const m = x.value;
|
|
8490
8490
|
return m ? m.getContext("2d") : null;
|
|
8491
8491
|
}
|
|
8492
|
-
function
|
|
8493
|
-
const m =
|
|
8492
|
+
function w() {
|
|
8493
|
+
const m = x.value;
|
|
8494
8494
|
if (!m) return;
|
|
8495
8495
|
const M = window.devicePixelRatio || 1, D = m.getContext("2d");
|
|
8496
8496
|
D && D.clearRect(0, 0, m.width / M, m.height / M);
|
|
@@ -8498,7 +8498,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8498
8498
|
function T() {
|
|
8499
8499
|
const m = C();
|
|
8500
8500
|
if (m) {
|
|
8501
|
-
if (
|
|
8501
|
+
if (w(), m.globalCompositeOperation = "source-over", m.strokeStyle = p.strokeColor, m.lineWidth = p.strokeWidth, m.lineCap = "round", m.lineJoin = "round", p.tool === "line")
|
|
8502
8502
|
m.beginPath(), m.moveTo(u, _), m.lineTo(d, i), m.stroke();
|
|
8503
8503
|
else if (p.tool === "rect") {
|
|
8504
8504
|
const M = Math.min(u, d), D = Math.min(_, i), X = Math.abs(d - u), re = Math.abs(i - _);
|
|
@@ -8590,7 +8590,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8590
8590
|
return;
|
|
8591
8591
|
}
|
|
8592
8592
|
if (p.tool === "paint") {
|
|
8593
|
-
|
|
8593
|
+
w(), c.value = !1, m.globalCompositeOperation = "source-over";
|
|
8594
8594
|
return;
|
|
8595
8595
|
}
|
|
8596
8596
|
if (p.tool === "line")
|
|
@@ -8604,17 +8604,17 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8604
8604
|
const M = Math.sqrt((d - u) ** 2 + (i - _) ** 2);
|
|
8605
8605
|
m.beginPath(), m.arc(u, _, Math.max(M, 1), 0, 2 * Math.PI), m.stroke();
|
|
8606
8606
|
}
|
|
8607
|
-
|
|
8607
|
+
w(), c.value = !1, m.globalCompositeOperation = "source-over";
|
|
8608
8608
|
}
|
|
8609
8609
|
function F() {
|
|
8610
8610
|
const m = I(), M = b.value;
|
|
8611
8611
|
if (!m || M.length < 2) {
|
|
8612
|
-
b.value = [],
|
|
8612
|
+
b.value = [], w();
|
|
8613
8613
|
return;
|
|
8614
8614
|
}
|
|
8615
8615
|
H(), m.globalCompositeOperation = "source-over", z(m), m.beginPath(), m.moveTo(M[0].x, M[0].y);
|
|
8616
8616
|
for (let D = 1; D < M.length; D++) m.lineTo(M[D].x, M[D].y);
|
|
8617
|
-
m.closePath(), m.stroke(), b.value = [],
|
|
8617
|
+
m.closePath(), m.stroke(), b.value = [], w(), m.globalCompositeOperation = "source-over";
|
|
8618
8618
|
}
|
|
8619
8619
|
function S() {
|
|
8620
8620
|
const m = l.value;
|
|
@@ -8630,7 +8630,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8630
8630
|
const M = m.getContext("2d");
|
|
8631
8631
|
if (!M) return;
|
|
8632
8632
|
const D = window.devicePixelRatio || 1;
|
|
8633
|
-
M.clearRect(0, 0, m.width / D, m.height / D), b.value = [], r.value = [],
|
|
8633
|
+
M.clearRect(0, 0, m.width / D, m.height / D), b.value = [], r.value = [], w();
|
|
8634
8634
|
}
|
|
8635
8635
|
function y() {
|
|
8636
8636
|
return l.value;
|
|
@@ -8638,7 +8638,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8638
8638
|
return de(
|
|
8639
8639
|
() => p.tool,
|
|
8640
8640
|
(m, M) => {
|
|
8641
|
-
M === "polygon" && m !== "polygon" && (b.value = [],
|
|
8641
|
+
M === "polygon" && m !== "polygon" && (b.value = [], w());
|
|
8642
8642
|
}
|
|
8643
8643
|
), Be(() => {
|
|
8644
8644
|
A().then(() => {
|
|
@@ -8668,7 +8668,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8668
8668
|
}, null, 512),
|
|
8669
8669
|
e("canvas", {
|
|
8670
8670
|
ref_key: "previewRef",
|
|
8671
|
-
ref:
|
|
8671
|
+
ref: x,
|
|
8672
8672
|
class: "drawing-canvas drawing-canvas--preview"
|
|
8673
8673
|
}, null, 512),
|
|
8674
8674
|
et(e("div", {
|
|
@@ -8689,7 +8689,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8689
8689
|
},
|
|
8690
8690
|
setup(n) {
|
|
8691
8691
|
var b, r;
|
|
8692
|
-
const t = n, a = ((r = (b = Gt()) == null ? void 0 : b.appContext.config.globalProperties) == null ? void 0 : r.$settings) || null, { map: l, ready:
|
|
8692
|
+
const t = n, a = ((r = (b = Gt()) == null ? void 0 : b.appContext.config.globalProperties) == null ? void 0 : r.$settings) || null, { map: l, ready: x } = at();
|
|
8693
8693
|
let f = null;
|
|
8694
8694
|
function v() {
|
|
8695
8695
|
f == null || f.remove(), f = null;
|
|
@@ -8738,7 +8738,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8738
8738
|
v();
|
|
8739
8739
|
return;
|
|
8740
8740
|
}
|
|
8741
|
-
typeof
|
|
8741
|
+
typeof x == "function" && await x().catch(() => {
|
|
8742
8742
|
});
|
|
8743
8743
|
const u = t.boundary ?? ((i = t.settingsMap) == null ? void 0 : i.boundary) ?? ((k = a == null ? void 0 : a.map) == null ? void 0 : k.boundary) ?? null, _ = t.katottg ?? ((L = t.settingsMap) == null ? void 0 : L.katottg) ?? (($ = a == null ? void 0 : a.map) == null ? void 0 : $.katottg) ?? null;
|
|
8744
8744
|
if (!u && !_) {
|
|
@@ -8808,7 +8808,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8808
8808
|
},
|
|
8809
8809
|
setup(n) {
|
|
8810
8810
|
var yn, ln, bn, xn;
|
|
8811
|
-
const t = n, a = At(), l = Dt(),
|
|
8811
|
+
const t = n, a = At(), l = Dt(), x = N(null), f = N({}), v = N(null), p = N(!1), P = N(null), E = N(!1), A = N([]), c = N(null), b = B(() => c.value === "ruler"), r = B(() => c.value === "draw"), u = B(() => c.value === "geolocation"), _ = N("general"), d = N(null), i = N(null), k = N(null), L = N("pen"), $ = N("#2563eb"), I = N(3), C = N([]), w = N(!1), T = N(null), z = N(!1), H = N(null), Y = B(() => t.id || "main"), ne = B(() => {
|
|
8812
8812
|
var j, Z;
|
|
8813
8813
|
return {
|
|
8814
8814
|
height: ((j = t.height) == null ? void 0 : j.trim()) || ((Z = f.value) == null ? void 0 : Z.height) || "calc(100vh - 65px)"
|
|
@@ -8836,7 +8836,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8836
8836
|
return `${Z.toFixed(6)}, ${j.toFixed(6)}`;
|
|
8837
8837
|
}), y = B(() => {
|
|
8838
8838
|
var j;
|
|
8839
|
-
return ((j =
|
|
8839
|
+
return ((j = x.value) == null ? void 0 : j.ctx) ?? null;
|
|
8840
8840
|
}), m = B(() => {
|
|
8841
8841
|
var j;
|
|
8842
8842
|
return ((j = f.value) == null ? void 0 : j.minimap) ?? null;
|
|
@@ -8886,12 +8886,12 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
8886
8886
|
async function ft() {
|
|
8887
8887
|
var Z;
|
|
8888
8888
|
await Xe();
|
|
8889
|
-
const j = (Z =
|
|
8889
|
+
const j = (Z = x.value) == null ? void 0 : Z.ctx;
|
|
8890
8890
|
return j ? (j.ready && await j.ready(), j) : null;
|
|
8891
8891
|
}
|
|
8892
8892
|
function Tt() {
|
|
8893
8893
|
var j, Z, ye;
|
|
8894
|
-
return ((ye = (Z = (j =
|
|
8894
|
+
return ((ye = (Z = (j = x.value) == null ? void 0 : j.ctx) == null ? void 0 : Z.map) == null ? void 0 : ye.value) ?? null;
|
|
8895
8895
|
}
|
|
8896
8896
|
function rn() {
|
|
8897
8897
|
const j = Tt();
|
|
@@ -9065,10 +9065,10 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
9065
9065
|
}
|
|
9066
9066
|
function ce() {
|
|
9067
9067
|
var j;
|
|
9068
|
-
c.value === "ruler" ? (C.value = [],
|
|
9068
|
+
c.value === "ruler" ? (C.value = [], w.value = !1, (j = d.value) == null || j.clearPoints(), c.value = null) : (T.value = null, H.value = null, c.value = "ruler");
|
|
9069
9069
|
}
|
|
9070
9070
|
function me() {
|
|
9071
|
-
c.value = null, C.value = [],
|
|
9071
|
+
c.value = null, C.value = [], w.value = !1;
|
|
9072
9072
|
}
|
|
9073
9073
|
function $e() {
|
|
9074
9074
|
c.value === "draw" ? c.value = null : (T.value = null, H.value = null, c.value = "draw");
|
|
@@ -9121,7 +9121,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
9121
9121
|
}
|
|
9122
9122
|
function Mn() {
|
|
9123
9123
|
var se, Te, Le, le;
|
|
9124
|
-
const j = (Le = (Te = (se =
|
|
9124
|
+
const j = (Le = (Te = (se = x.value) == null ? void 0 : se.ctx) == null ? void 0 : Te.map) == null ? void 0 : Le.value, Z = (le = k.value) == null ? void 0 : le.getCanvas();
|
|
9125
9125
|
if (!j || !Z) return;
|
|
9126
9126
|
const ye = (Me, Re) => {
|
|
9127
9127
|
const Pe = document.createElement("a");
|
|
@@ -9249,7 +9249,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
9249
9249
|
}, null, -1)),
|
|
9250
9250
|
pe($l, {
|
|
9251
9251
|
ref_key: "mapViewRef",
|
|
9252
|
-
ref:
|
|
9252
|
+
ref: x,
|
|
9253
9253
|
class: "map-widget__view"
|
|
9254
9254
|
}, {
|
|
9255
9255
|
default: St(() => {
|
|
@@ -9295,7 +9295,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
9295
9295
|
onClose: me,
|
|
9296
9296
|
onTabChange: Z[4] || (Z[4] = (Le) => _.value = Le),
|
|
9297
9297
|
onPointsChange: kt,
|
|
9298
|
-
onShapeClosedChange: Z[5] || (Z[5] = (Le) =>
|
|
9298
|
+
onShapeClosedChange: Z[5] || (Z[5] = (Le) => w.value = Le)
|
|
9299
9299
|
}, null, 512)) : K("", !0),
|
|
9300
9300
|
A.value.includes("geolocation") && u.value ? (o(), fe(wd, {
|
|
9301
9301
|
key: 2,
|
|
@@ -9355,7 +9355,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
9355
9355
|
E.value && b.value && C.value.length > 0 ? (o(), fe(dd, {
|
|
9356
9356
|
key: 4,
|
|
9357
9357
|
points: C.value,
|
|
9358
|
-
"is-shape-closed":
|
|
9358
|
+
"is-shape-closed": w.value,
|
|
9359
9359
|
"label-mode": _.value
|
|
9360
9360
|
}, null, 8, ["points", "is-shape-closed", "label-mode"])) : K("", !0),
|
|
9361
9361
|
E.value && T.value != null ? (o(), fe(_d, {
|
|
@@ -9504,9 +9504,9 @@ function mn(n) {
|
|
|
9504
9504
|
if (!n) return "";
|
|
9505
9505
|
const [t, a] = n.split(" ");
|
|
9506
9506
|
if (!t) return n;
|
|
9507
|
-
const [l,
|
|
9508
|
-
if (!l || !
|
|
9509
|
-
const v = parseInt(
|
|
9507
|
+
const [l, x, f] = t.split("-");
|
|
9508
|
+
if (!l || !x || !f) return n;
|
|
9509
|
+
const v = parseInt(x, 10), p = af[v] || x;
|
|
9510
9510
|
let P = `${parseInt(f, 10)} ${p} ${l}`;
|
|
9511
9511
|
if (a) {
|
|
9512
9512
|
const E = a.split(".")[0], [A, c, b] = E.split(":");
|
|
@@ -9544,7 +9544,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9544
9544
|
hideDetailsButton: { type: Boolean, default: !1 }
|
|
9545
9545
|
},
|
|
9546
9546
|
setup(n) {
|
|
9547
|
-
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (c) => (c == null ? void 0 : c.service_id) && (c == null ? void 0 : c.is_map) && c[t.id_key] && (c == null ? void 0 : c.geom),
|
|
9547
|
+
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (c) => (c == null ? void 0 : c.service_id) && (c == null ? void 0 : c.is_map) && c[t.id_key] && (c == null ? void 0 : c.geom), x = B(() => t.columns.find((c) => c.meta === "title")), f = B(() => t.columns.filter((c) => c.meta === "category")), v = B(() => t.columns.filter((c) => c.meta === "tags")), p = B(() => t.columns.filter((c) => c.meta !== "title")), P = (c, b) => {
|
|
9548
9548
|
if (b)
|
|
9549
9549
|
return c[b];
|
|
9550
9550
|
}, E = (c) => {
|
|
@@ -9564,7 +9564,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9564
9564
|
e("div", uf, [
|
|
9565
9565
|
e("div", cf, [
|
|
9566
9566
|
e("div", df, [
|
|
9567
|
-
e("h2", ff, G(r[`${(u =
|
|
9567
|
+
e("h2", ff, G(r[`${(u = x.value) == null ? void 0 : u.name}_text`] || r[(_ = x.value) == null ? void 0 : _.name] || r[(d = x.value) == null ? void 0 : d.label] || "Не вказано"), 1),
|
|
9568
9568
|
Array.isArray(f.value) && f.value.length ? (o(), g("div", pf, [
|
|
9569
9569
|
(o(!0), g(ee, null, ve(f.value, (i) => (o(), g(ee, {
|
|
9570
9570
|
key: i.name
|
|
@@ -9680,7 +9680,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9680
9680
|
hideDetailsButton: { type: Boolean, default: !1 }
|
|
9681
9681
|
},
|
|
9682
9682
|
setup(n) {
|
|
9683
|
-
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (c) => (c == null ? void 0 : c.service_id) && (c == null ? void 0 : c.is_map) && c[t.id_key] && (c == null ? void 0 : c.geom),
|
|
9683
|
+
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (c) => (c == null ? void 0 : c.service_id) && (c == null ? void 0 : c.is_map) && c[t.id_key] && (c == null ? void 0 : c.geom), x = B(() => t.columns.find((c) => c.meta === "title")), f = B(() => t.columns.filter((c) => c.meta === "category")), v = B(() => t.columns.filter((c) => c.meta === "tags")), p = B(() => t.columns.filter((c) => c.meta !== "title")), P = (c, b) => {
|
|
9684
9684
|
if (b)
|
|
9685
9685
|
return c[b];
|
|
9686
9686
|
}, E = (c) => {
|
|
@@ -9701,7 +9701,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9701
9701
|
e("div", Cf, [
|
|
9702
9702
|
e("div", Lf, [
|
|
9703
9703
|
e("div", Sf, [
|
|
9704
|
-
e("h2", Ef, G(r[`${(u =
|
|
9704
|
+
e("h2", Ef, G(r[`${(u = x.value) == null ? void 0 : u.name}_text`] || r[(_ = x.value) == null ? void 0 : _.name] || r[(d = x.value) == null ? void 0 : d.label] || "Не вказано"), 1),
|
|
9705
9705
|
Array.isArray(f.value) && f.value.length ? (o(!0), g(ee, { key: 0 }, ve(f.value, (i) => (o(), g(ee, {
|
|
9706
9706
|
key: i.name
|
|
9707
9707
|
}, [
|
|
@@ -9817,7 +9817,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9817
9817
|
hideDetailsButton: { type: Boolean, default: !1 }
|
|
9818
9818
|
},
|
|
9819
9819
|
setup(n) {
|
|
9820
|
-
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (b) => (b == null ? void 0 : b.service_id) && (b == null ? void 0 : b.is_map) && b[t.id_key] && (b == null ? void 0 : b.geom),
|
|
9820
|
+
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (b) => (b == null ? void 0 : b.service_id) && (b == null ? void 0 : b.is_map) && b[t.id_key] && (b == null ? void 0 : b.geom), x = B(() => t.columns.find((b) => b.meta === "title")), f = B(() => t.columns.filter((b) => b.meta === "category")), v = B(() => t.columns.filter((b) => b.meta === "tags")), p = B(() => t.columns.filter((b) => b.meta !== "title")), P = B(() => "bg-blue-500"), E = (b, r) => {
|
|
9821
9821
|
if (r)
|
|
9822
9822
|
return b[r];
|
|
9823
9823
|
}, A = (b) => {
|
|
@@ -9843,7 +9843,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9843
9843
|
class: Ce(["w-1 h-6 lg:h-8 rounded-full mr-2 lg:mr-3 mt-1", P.value])
|
|
9844
9844
|
}, null, 2),
|
|
9845
9845
|
e("div", qf, [
|
|
9846
|
-
e("p", Wf, G(u[`${(_ =
|
|
9846
|
+
e("p", Wf, G(u[`${(_ = x.value) == null ? void 0 : _.name}_text`] || u[(d = x.value) == null ? void 0 : d.name] || u[(i = x.value) == null ? void 0 : i.label] || "Не вказано"), 1),
|
|
9847
9847
|
Array.isArray(f.value) && f.value.length ? (o(), g("div", Zf, [
|
|
9848
9848
|
(o(!0), g(ee, null, ve(f.value, (k) => (o(), g(ee, {
|
|
9849
9849
|
key: k.name
|
|
@@ -9955,7 +9955,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9955
9955
|
hideDetailsButton: { type: Boolean, default: !1 }
|
|
9956
9956
|
},
|
|
9957
9957
|
setup(n) {
|
|
9958
|
-
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (c) => (c == null ? void 0 : c.service_id) && (c == null ? void 0 : c.is_map) && c[t.id_key] && (c == null ? void 0 : c.geom),
|
|
9958
|
+
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (c) => (c == null ? void 0 : c.service_id) && (c == null ? void 0 : c.is_map) && c[t.id_key] && (c == null ? void 0 : c.geom), x = B(() => t.columns.find((c) => c.meta === "title")), f = B(() => t.columns.filter((c) => c.meta === "category")), v = B(() => t.columns.filter((c) => c.meta === "tags")), p = B(() => t.columns.filter((c) => c.meta !== "title")), P = (c, b) => {
|
|
9959
9959
|
if (b)
|
|
9960
9960
|
return c[b];
|
|
9961
9961
|
}, E = (c) => {
|
|
@@ -9974,7 +9974,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
9974
9974
|
}, [
|
|
9975
9975
|
e("div", op, [
|
|
9976
9976
|
e("div", rp, [
|
|
9977
|
-
e("h3", sp, G(r[`${(u =
|
|
9977
|
+
e("h3", sp, G(r[`${(u = x.value) == null ? void 0 : u.name}_text`] || r[(_ = x.value) == null ? void 0 : _.name] || r[(d = x.value) == null ? void 0 : d.label] || "Не вказано"), 1),
|
|
9978
9978
|
Array.isArray(f.value) && f.value.length ? (o(!0), g(ee, { key: 0 }, ve(f.value, (i) => (o(), g(ee, {
|
|
9979
9979
|
key: i.name
|
|
9980
9980
|
}, [
|
|
@@ -10058,7 +10058,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
10058
10058
|
hideDetailsButton: { type: Boolean, default: !1 }
|
|
10059
10059
|
},
|
|
10060
10060
|
setup(n) {
|
|
10061
|
-
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (r) => (r == null ? void 0 : r.service_id) && (r == null ? void 0 : r.is_map) && r[t.id_key] && (r == null ? void 0 : r.geom),
|
|
10061
|
+
const t = n, a = B(() => t.items && t.items.length || t.items ? t.items : t.item != null ? [t.item] : []), l = (r) => (r == null ? void 0 : r.service_id) && (r == null ? void 0 : r.is_map) && r[t.id_key] && (r == null ? void 0 : r.geom), x = B(() => t.columns.find((r) => r.meta === "title")), f = B(() => t.columns.filter((r) => r.meta === "category")), v = B(() => t.columns.filter((r) => r.meta === "tags")), p = B(() => t.columns.filter((r) => r.meta !== "title")), P = B(() => t.columns.find((r) => r.meta === "image")), E = B(
|
|
10062
10062
|
() => t.columns.find((r) => r.meta === "desc") || t.columns.find((r) => r.name === "description")
|
|
10063
10063
|
), A = (r, u) => {
|
|
10064
10064
|
if (u)
|
|
@@ -10071,7 +10071,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
10071
10071
|
return `/map?layers=${u}&info=${u},${_}`;
|
|
10072
10072
|
};
|
|
10073
10073
|
return (r, u) => (o(!0), g(ee, null, ve(a.value, (_) => {
|
|
10074
|
-
var d, i, k, L, $, I, C,
|
|
10074
|
+
var d, i, k, L, $, I, C, w, T;
|
|
10075
10075
|
return o(), g("div", {
|
|
10076
10076
|
key: _.id,
|
|
10077
10077
|
class: "bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200 hover:shadow-md"
|
|
@@ -10093,7 +10093,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
10093
10093
|
])])),
|
|
10094
10094
|
e("div", xp, [
|
|
10095
10095
|
e("div", wp, [
|
|
10096
|
-
e("h3", _p, G(_[`${(k =
|
|
10096
|
+
e("h3", _p, G(_[`${(k = x.value) == null ? void 0 : k.name}_text`] || _[(L = x.value) == null ? void 0 : L.name] || _[($ = x.value) == null ? void 0 : $.label] || "Не вказано"), 1),
|
|
10097
10097
|
e("div", kp, [
|
|
10098
10098
|
Array.isArray(f.value) && f.value.length ? (o(!0), g(ee, { key: 0 }, ve(f.value, (z) => (o(), g(ee, {
|
|
10099
10099
|
key: z.name
|
|
@@ -10102,7 +10102,7 @@ const uf = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
10102
10102
|
], 64))), 128)) : K("", !0)
|
|
10103
10103
|
])
|
|
10104
10104
|
]),
|
|
10105
|
-
e("p", Cp, G(((C = _[((I = E.value) == null ? void 0 : I.name) + "_data"]) == null ? void 0 : C.text) || _[((
|
|
10105
|
+
e("p", Cp, G(((C = _[((I = E.value) == null ? void 0 : I.name) + "_data"]) == null ? void 0 : C.text) || _[((w = E.value) == null ? void 0 : w.name) + "_text"] || _[(T = E.value) == null ? void 0 : T.name]), 1),
|
|
10106
10106
|
e("div", Lp, [
|
|
10107
10107
|
(o(!0), g(ee, null, ve(p.value, (z) => {
|
|
10108
10108
|
var H;
|