@opengis/gis 0.2.128 → 0.2.130
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-DgpYeKbG.js → CardIcon-BeZkp0PF.js} +1 -1
- package/dist/{EntityTablePage-DNdVavT4.js → EntityTablePage-A1oEJgB4.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DQnIBCpE.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Wr8oJ-ni.js} +24 -22
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-Cg2y4sIa.js → HeaderActions.vue_vue_type_script_setup_true_lang-6BnXldBs.js} +345 -321
- package/dist/{MapSettings-CHF3VpUu.js → MapSettings-EmXkXJ90.js} +12 -12
- package/dist/{RastersTablePage-Ci3P3r4c.js → RastersTablePage-Cgecxbky.js} +1 -1
- package/dist/cartocss-C29B9mz3.js +1024 -0
- package/dist/{import-utils-ElncWVJV.js → import-utils-CFjQD50e.js} +1 -1
- package/dist/{index-UGx54M0Q.js → index-1vaLWtnh.js} +377 -386
- package/dist/index.css +1 -1
- package/dist/index.js +4 -4
- package/dist/index.umd.cjs +41 -41
- package/dist/raster-DFuH49fc.js +792 -0
- package/dist/{register-BfNUPbey.js → register-COO0Y_MS.js} +3 -3
- package/dist/{service-DsykdHry.js → service-DagZaIev.js} +911 -879
- package/dist/{vs-datatable-D6g7tjZo.js → vs-datatable-BaMRTZVi.js} +1 -1
- package/package.json +2 -2
- package/server/routes/gis/cartocss/get.cartocss.js +11 -2
- package/server/routes/gis/registers/add.registry.js +3 -4
- package/server/routes/gis/registers/funcs/columns.js +2 -4
- package/server/routes/mapnik/controllers/pretile.js +6 -7
- package/server/routes/mapnik/controllers/rasterInfo.js +5 -1
- package/server/routes/mapnik/functions/cartoBounds.js +6 -2
- package/dist/cartocss-BsaIlSRb.js +0 -894
- package/dist/raster-BDWEafwx.js +0 -663
|
@@ -0,0 +1,792 @@
|
|
|
1
|
+
import { defineComponent as H, resolveDirective as Oe, openBlock as u, createElementBlock as m, createElementVNode as n, Fragment as O, renderList as G, toDisplayString as p, withDirectives as be, createTextVNode as Ge, normalizeClass as re, ref as $, watch as j, computed as h, vModelText as Qe, onMounted as We, onBeforeUnmount as Xe, unref as Ke, createCommentVNode as q, createVNode as N, withCtx as Ye, createBlock as F, resolveDynamicComponent as Ze } from "vue";
|
|
2
|
+
import { useRouter as He, useRoute as Je } from "vue-router";
|
|
3
|
+
import { TooltipDirective as et, notify as I } from "@opengis/core";
|
|
4
|
+
import { _ as tt, u as st, f as nt, M as lt, i as rt, j as ye, F as ot } from "./index-1vaLWtnh.js";
|
|
5
|
+
import { _ as it, a as at, b as ut, c as ct } from "./HeaderActions.vue_vue_type_script_setup_true_lang-6BnXldBs.js";
|
|
6
|
+
import { _ as xe } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Wr8oJ-ni.js";
|
|
7
|
+
const dt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, ft = { class: "space-y-3" }, mt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, pt = { class: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2" }, gt = { class: "text-xs text-gray-500 mb-1" }, yt = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "text-base text-md font-semibold text-gray-900"
|
|
10
|
+
}, xt = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "text-base text-md font-semibold text-gray-900"
|
|
13
|
+
}, vt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, bt = { class: "space-y-2" }, ht = { class: "bg-gradient-to-br from-blue-50 to-blue-100/30 p-4 rounded-lg border border-blue-200" }, _t = { class: "text-sm font-semibold text-gray-900" }, wt = { class: "text-xs text-gray-600 mt-1" }, $t = { class: "grid grid-cols-2 gap-3" }, kt = { class: "text-xs text-gray-500 mb-1" }, Ct = { class: "text-sm font-semibold text-gray-900" }, Et = { class: "bg-gray-50 p-4 rounded-lg" }, Lt = { class: "grid grid-cols-2 gap-4" }, Rt = { class: "text-xs text-gray-500 mb-1" }, Mt = { class: "text-sm font-semibold text-gray-900" }, St = /* @__PURE__ */ H({
|
|
14
|
+
directives: {
|
|
15
|
+
tooltip: et
|
|
16
|
+
},
|
|
17
|
+
__name: "raster-info-tab",
|
|
18
|
+
props: {
|
|
19
|
+
details: {}
|
|
20
|
+
},
|
|
21
|
+
setup(_) {
|
|
22
|
+
return (x, v) => {
|
|
23
|
+
const a = Oe("tooltip");
|
|
24
|
+
return u(), m("div", dt, [
|
|
25
|
+
n("div", ft, [
|
|
26
|
+
n("div", mt, [
|
|
27
|
+
v[0] || (v[0] = n("div", { class: "mb-4" }, [
|
|
28
|
+
n("h4", { class: "text-sm font-semibold text-gray-900 uppercase tracking-wide" }, "Основні параметри")
|
|
29
|
+
], -1)),
|
|
30
|
+
n("div", pt, [
|
|
31
|
+
(u(!0), m(O, null, G(_.details.baseParams, (f) => (u(), m("div", {
|
|
32
|
+
key: f.label,
|
|
33
|
+
class: "bg-gray-50 p-2 rounded-lg"
|
|
34
|
+
}, [
|
|
35
|
+
n("p", gt, p(f.label), 1),
|
|
36
|
+
f.tooltip ? be((u(), m("p", yt, [
|
|
37
|
+
Ge(p(f.value), 1)
|
|
38
|
+
])), [
|
|
39
|
+
[a, f.tooltip]
|
|
40
|
+
]) : (u(), m("p", xt, p(f.value), 1))
|
|
41
|
+
]))), 128))
|
|
42
|
+
])
|
|
43
|
+
]),
|
|
44
|
+
n("div", vt, [
|
|
45
|
+
v[3] || (v[3] = n("div", { class: "mb-2" }, [
|
|
46
|
+
n("h4", { class: "text-sm font-semibold text-gray-900 uppercase tracking-wide" }, "Просторова інформація")
|
|
47
|
+
], -1)),
|
|
48
|
+
n("div", bt, [
|
|
49
|
+
n("div", null, [
|
|
50
|
+
v[1] || (v[1] = n("p", { class: "text-xs text-gray-500 mb-2" }, "Система координат", -1)),
|
|
51
|
+
n("div", ht, [
|
|
52
|
+
n("p", _t, p(_.details.spatial.crs.code), 1),
|
|
53
|
+
n("p", wt, p(_.details.spatial.crs.description), 1)
|
|
54
|
+
])
|
|
55
|
+
]),
|
|
56
|
+
n("div", null, [
|
|
57
|
+
v[2] || (v[2] = n("p", { class: "text-xs text-gray-500 mb-2" }, "Межі покриття", -1)),
|
|
58
|
+
n("div", $t, [
|
|
59
|
+
(u(!0), m(O, null, G(_.details.spatial.bounds, (f) => (u(), m("div", {
|
|
60
|
+
key: f.label,
|
|
61
|
+
class: "bg-gray-50 p-2 rounded-lg border border-gray-200"
|
|
62
|
+
}, [
|
|
63
|
+
n("p", kt, p(f.label), 1),
|
|
64
|
+
n("p", Ct, p(f.value), 1)
|
|
65
|
+
]))), 128))
|
|
66
|
+
])
|
|
67
|
+
]),
|
|
68
|
+
n("div", Et, [
|
|
69
|
+
n("div", Lt, [
|
|
70
|
+
(u(!0), m(O, null, G(_.details.spatial.resolution, (f) => (u(), m("div", {
|
|
71
|
+
key: f.label
|
|
72
|
+
}, [
|
|
73
|
+
n("p", Rt, p(f.label), 1),
|
|
74
|
+
n("p", Mt, p(f.value), 1)
|
|
75
|
+
]))), 128))
|
|
76
|
+
])
|
|
77
|
+
])
|
|
78
|
+
])
|
|
79
|
+
])
|
|
80
|
+
])
|
|
81
|
+
]);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}), It = { class: "flex-1 overflow-y-auto space-y-3 pr-1" }, jt = { class: "font-medium text-sm text-gray-800" }, zt = { class: "text-xs text-gray-500" }, Bt = /* @__PURE__ */ H({
|
|
85
|
+
__name: "raster-files-tab",
|
|
86
|
+
props: {
|
|
87
|
+
files: {}
|
|
88
|
+
},
|
|
89
|
+
setup(_) {
|
|
90
|
+
return (x, v) => (u(), m("div", It, [
|
|
91
|
+
(u(!0), m(O, null, G(_.files, (a) => (u(), m("div", {
|
|
92
|
+
key: a.name,
|
|
93
|
+
class: "border border-gray-100 rounded-xl p-4 shadow-sm bg-white flex items-start justify-between"
|
|
94
|
+
}, [
|
|
95
|
+
n("div", null, [
|
|
96
|
+
n("p", jt, p(a.name), 1),
|
|
97
|
+
n("p", zt, p(a.resolution) + " • " + p(a.size) + "MB", 1)
|
|
98
|
+
]),
|
|
99
|
+
n("span", {
|
|
100
|
+
class: re(["text-[11px] font-semibold px-2 py-0.5 rounded-full", a.statusClass])
|
|
101
|
+
}, p(a.status), 3)
|
|
102
|
+
]))), 128))
|
|
103
|
+
]));
|
|
104
|
+
}
|
|
105
|
+
}), Nt = {}, Pt = {
|
|
106
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
107
|
+
width: "24",
|
|
108
|
+
height: "24",
|
|
109
|
+
viewBox: "0 0 24 24",
|
|
110
|
+
fill: "none",
|
|
111
|
+
stroke: "currentColor",
|
|
112
|
+
"stroke-width": "2",
|
|
113
|
+
"stroke-linecap": "round",
|
|
114
|
+
"stroke-linejoin": "round"
|
|
115
|
+
};
|
|
116
|
+
function Dt(_, x) {
|
|
117
|
+
return u(), m("svg", Pt, [...x[0] || (x[0] = [
|
|
118
|
+
n("circle", {
|
|
119
|
+
cx: "12",
|
|
120
|
+
cy: "12",
|
|
121
|
+
r: "9"
|
|
122
|
+
}, null, -1),
|
|
123
|
+
n("line", {
|
|
124
|
+
x1: "12",
|
|
125
|
+
y1: "8",
|
|
126
|
+
x2: "12",
|
|
127
|
+
y2: "8"
|
|
128
|
+
}, null, -1),
|
|
129
|
+
n("path", { d: "M11 12h1v4h1" }, null, -1)
|
|
130
|
+
])]);
|
|
131
|
+
}
|
|
132
|
+
const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top-[5.5rem] left-4 z-30 flex flex-col items-start gap-2" }, qt = { class: "rounded-2xl bg-white/90 px-3 py-2 text-xs font-medium text-slate-600 shadow-sm backdrop-blur" }, Ft = { class: "flex items-center gap-2" }, Vt = { class: "rounded-2xl bg-white/90 px-3 py-2 text-xs font-medium text-slate-600 shadow-sm backdrop-blur" }, At = { class: "inline-flex items-center gap-2 text-[11px] text-slate-600" }, Ot = ["checked"], Gt = /* @__PURE__ */ H({
|
|
133
|
+
__name: "RasterLayer",
|
|
134
|
+
props: {
|
|
135
|
+
tileUrl: {},
|
|
136
|
+
extent: {},
|
|
137
|
+
layerId: {},
|
|
138
|
+
beforeId: {},
|
|
139
|
+
showRasterExtent: { type: Boolean }
|
|
140
|
+
},
|
|
141
|
+
emits: ["toggle-extent"],
|
|
142
|
+
setup(_) {
|
|
143
|
+
const x = _, v = x.layerId || "raster-preview-layer", a = `${v}-source`, f = x.extent && x.extent.length === 4 ? [...x.extent] : void 0, g = st(v, {
|
|
144
|
+
sourceId: a,
|
|
145
|
+
source: {
|
|
146
|
+
type: "raster",
|
|
147
|
+
tiles: x.tileUrl ? [x.tileUrl + "?nottl=1"] : [],
|
|
148
|
+
tileSize: 256,
|
|
149
|
+
...f ? { bounds: f } : {}
|
|
150
|
+
},
|
|
151
|
+
layer: {
|
|
152
|
+
id: `${v}-raster`,
|
|
153
|
+
type: "raster",
|
|
154
|
+
paint: { "raster-opacity": 1 }
|
|
155
|
+
},
|
|
156
|
+
beforeId: x.beforeId ?? null
|
|
157
|
+
}), { fitBounds: c } = nt(), E = $(1);
|
|
158
|
+
j(
|
|
159
|
+
() => x.tileUrl,
|
|
160
|
+
(d) => {
|
|
161
|
+
if (!d) {
|
|
162
|
+
g.setVisible(!1);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
g.setVisible(!0), g.setTiles([d]);
|
|
166
|
+
},
|
|
167
|
+
{ immediate: !0 }
|
|
168
|
+
), j(
|
|
169
|
+
() => E.value,
|
|
170
|
+
(d) => {
|
|
171
|
+
g.setOpacity(d);
|
|
172
|
+
},
|
|
173
|
+
{ immediate: !0 }
|
|
174
|
+
);
|
|
175
|
+
let P = null, L = !1;
|
|
176
|
+
j(
|
|
177
|
+
() => x.extent,
|
|
178
|
+
(d) => {
|
|
179
|
+
if (!d || d.length !== 4) return;
|
|
180
|
+
const b = d.join(",");
|
|
181
|
+
if (b !== P) {
|
|
182
|
+
if (P = b, !L) {
|
|
183
|
+
L = !0;
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
c == null || c([[d[0], d[1]], [d[2], d[3]]], {
|
|
187
|
+
padding: 40,
|
|
188
|
+
maxZoom: 17
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{ immediate: !0 }
|
|
193
|
+
);
|
|
194
|
+
const V = h(() => `${Math.round(E.value * 100)}%`);
|
|
195
|
+
return (d, b) => (u(), m("div", Tt, [
|
|
196
|
+
n("div", qt, [
|
|
197
|
+
n("div", Ft, [
|
|
198
|
+
b[2] || (b[2] = n("span", null, "Прозорість:", -1)),
|
|
199
|
+
be(n("input", {
|
|
200
|
+
type: "range",
|
|
201
|
+
min: "0",
|
|
202
|
+
max: "1",
|
|
203
|
+
step: "0.01",
|
|
204
|
+
"onUpdate:modelValue": b[0] || (b[0] = (k) => E.value = k),
|
|
205
|
+
class: "h-1 w-28 cursor-pointer appearance-none rounded-full bg-slate-300 focus:outline-none",
|
|
206
|
+
style: { "accent-color": "#3b82f6" }
|
|
207
|
+
}, null, 512), [
|
|
208
|
+
[
|
|
209
|
+
Qe,
|
|
210
|
+
E.value,
|
|
211
|
+
void 0,
|
|
212
|
+
{ number: !0 }
|
|
213
|
+
]
|
|
214
|
+
]),
|
|
215
|
+
n("span", null, p(V.value), 1)
|
|
216
|
+
])
|
|
217
|
+
]),
|
|
218
|
+
n("div", Vt, [
|
|
219
|
+
n("label", At, [
|
|
220
|
+
n("input", {
|
|
221
|
+
type: "checkbox",
|
|
222
|
+
class: "h-3.5 w-3.5 rounded border-slate-300 text-blue-600 focus:ring-blue-200",
|
|
223
|
+
checked: _.showRasterExtent,
|
|
224
|
+
onChange: b[1] || (b[1] = (k) => d.$emit("toggle-extent", k.target.checked))
|
|
225
|
+
}, null, 40, Ot),
|
|
226
|
+
b[3] || (b[3] = n("span", null, "Межі растру", -1))
|
|
227
|
+
])
|
|
228
|
+
])
|
|
229
|
+
]));
|
|
230
|
+
}
|
|
231
|
+
}), Qt = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, Wt = { class: "flex-1 relative overflow-hidden" }, Xt = { class: "absolute top-0 left-0 w-full z-20" }, Kt = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, Yt = { class: "flex items-start justify-between gap-4" }, Zt = { class: "flex-1 min-w-0" }, Ht = { class: "flex items-center text-sm text-gray-500 mb-3" }, Jt = { class: "text-gray-900 font-medium truncate max-w-xs" }, es = { class: "flex items-center justify-between gap-4" }, ts = { class: "flex-1 min-w-0" }, ss = { class: "flex items-center gap-3 mb-1" }, ns = { class: "text-base font-semibold text-gray-900 truncate" }, ls = ["title"], rs = { class: "flex items-center gap-4 min-w-0" }, os = { class: "flex-1 min-w-0" }, is = ["title"], as = { class: "w-full h-full bg-gradient-to-br from-sky-50 via-white to-blue-50 flex items-center justify-center relative pt-[105px]" }, us = { class: "relative w-full h-full" }, cs = { class: "absolute top-4 left-4 z-20" }, ds = {
|
|
232
|
+
key: 1,
|
|
233
|
+
class: "absolute bottom-4 left-1/2 z-30 -translate-x-1/2 rounded-2xl border border-sky-200 bg-white/95 px-4 py-2 text-xs font-medium text-slate-700 shadow-lg backdrop-blur"
|
|
234
|
+
}, fs = { class: "absolute top-[6.5rem] right-2 space-y-1 z-20" }, ms = { class: "flex-1 flex flex-col h-full" }, ps = { class: "px-3 pt-3 pb-2 border-b border-gray-100" }, gs = { class: "items-center justify-center text-muted-foreground grid w-full grid-cols-3 h-12 p-1 bg-gray-50 rounded-xl shadow-sm" }, ys = ["aria-selected", "onClick"], xs = { class: "leading-none" }, vs = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, bs = {
|
|
235
|
+
key: 0,
|
|
236
|
+
class: "mb-3 text-xs text-slate-500"
|
|
237
|
+
}, hs = {
|
|
238
|
+
key: 1,
|
|
239
|
+
class: "mb-3 text-xs text-rose-600"
|
|
240
|
+
}, _s = "OpenGIS", ve = 2, Z = 5, ws = 5, Ss = /* @__PURE__ */ H({
|
|
241
|
+
__name: "raster",
|
|
242
|
+
setup(_) {
|
|
243
|
+
const x = [
|
|
244
|
+
{ cardClass: "bg-gradient-to-br from-green-50 to-green-100/30 border-green-200", titleClass: "text-green-900" },
|
|
245
|
+
{ cardClass: "bg-gradient-to-br from-blue-50 to-blue-100/30 border-blue-200", titleClass: "text-blue-900" },
|
|
246
|
+
{ cardClass: "bg-gradient-to-br from-purple-50 to-purple-100/30 border-purple-200", titleClass: "text-purple-900" },
|
|
247
|
+
{ cardClass: "bg-gradient-to-br from-gray-50 to-gray-100/30 border-gray-200", titleClass: "text-gray-900" }
|
|
248
|
+
], v = He(), a = Je(), f = $(null), g = h(() => {
|
|
249
|
+
var t;
|
|
250
|
+
const e = (t = a.params) == null ? void 0 : t.id;
|
|
251
|
+
return typeof e == "string" ? e : void 0;
|
|
252
|
+
}), c = $(null), E = $(!1), P = $(!1), L = $(null), V = $(!0), d = $(!1), b = $(null);
|
|
253
|
+
let k = null, D = null;
|
|
254
|
+
const J = $(!1);
|
|
255
|
+
let z = null, A = !1;
|
|
256
|
+
function Q(e) {
|
|
257
|
+
if (Array.isArray(e)) return Q(e[0]);
|
|
258
|
+
if (typeof e != "string" && typeof e != "number") return null;
|
|
259
|
+
const t = typeof e == "number" ? e : Number(e.trim());
|
|
260
|
+
return Number.isFinite(t) ? t : null;
|
|
261
|
+
}
|
|
262
|
+
function ee(e, t) {
|
|
263
|
+
return e.toFixed(t);
|
|
264
|
+
}
|
|
265
|
+
function te(e, t, s) {
|
|
266
|
+
const l = 0.5 * 10 ** -s;
|
|
267
|
+
return Math.abs(e - t) > l;
|
|
268
|
+
}
|
|
269
|
+
function B() {
|
|
270
|
+
var e;
|
|
271
|
+
return (e = f.value) == null ? void 0 : e.ctx;
|
|
272
|
+
}
|
|
273
|
+
function oe() {
|
|
274
|
+
var i, y, S, C;
|
|
275
|
+
const e = (y = (i = B()) == null ? void 0 : i.map) == null ? void 0 : y.value;
|
|
276
|
+
if (!e) return;
|
|
277
|
+
const t = Q(a.query.z), s = Q(a.query.x), l = Q(a.query.y);
|
|
278
|
+
if (t == null || s == null || l == null) return;
|
|
279
|
+
const r = (S = e.getCenter) == null ? void 0 : S.call(e), o = (C = e.getZoom) == null ? void 0 : C.call(e);
|
|
280
|
+
(!r || te(r.lng, s, Z) || te(r.lat, l, Z) || te(o ?? 0, t, ve)) && (J.value = !0, e.jumpTo({ center: [s, l], zoom: t }), J.value = !1);
|
|
281
|
+
}
|
|
282
|
+
function he() {
|
|
283
|
+
var r, o, w, i;
|
|
284
|
+
if (J.value) return;
|
|
285
|
+
const e = (o = (r = B()) == null ? void 0 : r.map) == null ? void 0 : o.value;
|
|
286
|
+
if (!e) return;
|
|
287
|
+
const t = (w = e.getCenter) == null ? void 0 : w.call(e), s = (i = e.getZoom) == null ? void 0 : i.call(e);
|
|
288
|
+
if (!t || s == null) return;
|
|
289
|
+
const l = {
|
|
290
|
+
...a.query,
|
|
291
|
+
z: ee(s, ve),
|
|
292
|
+
x: ee(t.lng, Z),
|
|
293
|
+
y: ee(t.lat, Z)
|
|
294
|
+
};
|
|
295
|
+
a.query.z === l.z && a.query.x === l.x && a.query.y === l.y || v.replace({ query: l });
|
|
296
|
+
}
|
|
297
|
+
function _e() {
|
|
298
|
+
var t;
|
|
299
|
+
if (typeof document > "u") return;
|
|
300
|
+
const e = (t = T.value) == null ? void 0 : t.name;
|
|
301
|
+
document.title = e ? `${e} — Растер` : _s;
|
|
302
|
+
}
|
|
303
|
+
function W(e) {
|
|
304
|
+
return Number(e.toFixed(ws));
|
|
305
|
+
}
|
|
306
|
+
function ie(e, t) {
|
|
307
|
+
const [s, l] = e, [r, o] = t;
|
|
308
|
+
return [
|
|
309
|
+
W(Math.min(s, r)),
|
|
310
|
+
W(Math.min(l, o)),
|
|
311
|
+
W(Math.max(s, r)),
|
|
312
|
+
W(Math.max(l, o))
|
|
313
|
+
];
|
|
314
|
+
}
|
|
315
|
+
function we(e) {
|
|
316
|
+
const [t, s, l, r] = e;
|
|
317
|
+
return {
|
|
318
|
+
type: "Polygon",
|
|
319
|
+
coordinates: [[
|
|
320
|
+
[t, s],
|
|
321
|
+
[l, s],
|
|
322
|
+
[l, r],
|
|
323
|
+
[t, r],
|
|
324
|
+
[t, s]
|
|
325
|
+
]]
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
function se(e) {
|
|
329
|
+
var l, r, o;
|
|
330
|
+
const t = (r = (l = B()) == null ? void 0 : l.map) == null ? void 0 : r.value, s = (o = t == null ? void 0 : t.getCanvas) == null ? void 0 : o.call(t);
|
|
331
|
+
s != null && s.style && (s.style.cursor = e);
|
|
332
|
+
}
|
|
333
|
+
async function $e(e, t) {
|
|
334
|
+
if (!(!g.value || !c.value))
|
|
335
|
+
try {
|
|
336
|
+
const s = we(e), l = await fetch(`/api/gis-metadata/raster/${encodeURIComponent(g.value)}`, {
|
|
337
|
+
method: "POST",
|
|
338
|
+
headers: { "Content-Type": "application/json" },
|
|
339
|
+
body: JSON.stringify({ geom: s })
|
|
340
|
+
});
|
|
341
|
+
if (!l.ok) throw new Error(`Failed to save raster metadata geom: ${l.status}`);
|
|
342
|
+
I({
|
|
343
|
+
type: "success",
|
|
344
|
+
title: "Extent збережено",
|
|
345
|
+
message: "Нові межі успішно збережено."
|
|
346
|
+
}), await K();
|
|
347
|
+
} catch (s) {
|
|
348
|
+
console.error("Failed to save raster extent", s), c.value && (c.value = {
|
|
349
|
+
...c.value,
|
|
350
|
+
extent: t ? [...t] : void 0
|
|
351
|
+
}), I({
|
|
352
|
+
type: "error",
|
|
353
|
+
title: "Помилка",
|
|
354
|
+
message: "Не вдалося зберегти Extent"
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function ae(e) {
|
|
359
|
+
var s, l, r;
|
|
360
|
+
const t = (l = (s = B()) == null ? void 0 : s.map) == null ? void 0 : l.value;
|
|
361
|
+
if ((r = t == null ? void 0 : t.dragPan) != null && r.enable && t.dragPan.enable(), (e == null ? void 0 : e.length) === 4 && c.value) {
|
|
362
|
+
const o = Array.isArray(c.value.extent) ? [...c.value.extent] : null;
|
|
363
|
+
c.value = {
|
|
364
|
+
...c.value,
|
|
365
|
+
extent: [...e]
|
|
366
|
+
}, $e(e, o);
|
|
367
|
+
}
|
|
368
|
+
z = null, A = !1, b.value = null, d.value = !1, se("");
|
|
369
|
+
}
|
|
370
|
+
function ne() {
|
|
371
|
+
ae(null);
|
|
372
|
+
}
|
|
373
|
+
function ke() {
|
|
374
|
+
var o, w;
|
|
375
|
+
const e = (w = (o = B()) == null ? void 0 : o.map) == null ? void 0 : w.value;
|
|
376
|
+
if (!e) return;
|
|
377
|
+
const t = (i) => {
|
|
378
|
+
var S, C, Y;
|
|
379
|
+
if (!d.value || ((S = i == null ? void 0 : i.originalEvent) == null ? void 0 : S.button) != null && i.originalEvent.button !== 0) return;
|
|
380
|
+
const y = i == null ? void 0 : i.lngLat;
|
|
381
|
+
y && (z = [y.lng, y.lat], A = !0, b.value = [y.lng, y.lat, y.lng, y.lat], (Y = (C = e.dragPan) == null ? void 0 : C.disable) == null || Y.call(C));
|
|
382
|
+
}, s = (i) => {
|
|
383
|
+
if (!d.value || !A || !z) return;
|
|
384
|
+
const y = i == null ? void 0 : i.lngLat;
|
|
385
|
+
y && (b.value = ie(z, [y.lng, y.lat]));
|
|
386
|
+
}, l = (i) => {
|
|
387
|
+
if (!d.value || !A || !z) return;
|
|
388
|
+
const y = i == null ? void 0 : i.lngLat;
|
|
389
|
+
if (!y) {
|
|
390
|
+
ne();
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
const S = ie(z, [y.lng, y.lat]), [C, Y, Ve, Ae] = S;
|
|
394
|
+
if (!(Math.abs(Ve - C) > 0 && Math.abs(Ae - Y) > 0)) {
|
|
395
|
+
I({
|
|
396
|
+
type: "warning",
|
|
397
|
+
title: "Bounds не змінено",
|
|
398
|
+
message: "Потрібно протягнути прямокутник з ненульовою площею."
|
|
399
|
+
}), ne();
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
ae(S);
|
|
403
|
+
}, r = (i) => {
|
|
404
|
+
d.value && i.key === "Escape" && (i.preventDefault(), ne());
|
|
405
|
+
};
|
|
406
|
+
e.on("mousedown", t), e.on("mousemove", s), e.on("mouseup", l), window.addEventListener("keydown", r), D = () => {
|
|
407
|
+
e.off("mousedown", t), e.off("mousemove", s), e.off("mouseup", l), window.removeEventListener("keydown", r);
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
async function Ce() {
|
|
411
|
+
var s;
|
|
412
|
+
if (d.value) return;
|
|
413
|
+
const e = B();
|
|
414
|
+
!(e != null && e.ready) || (await e.ready(), !((s = e.map) == null ? void 0 : s.value)) || (D || ke(), d.value = !0, A = !1, z = null, b.value = null, se("crosshair"), I({
|
|
415
|
+
type: "info",
|
|
416
|
+
title: "Редагування Bounds",
|
|
417
|
+
message: "Протягніть прямокутник на карті, щоб задати нові межі."
|
|
418
|
+
}));
|
|
419
|
+
}
|
|
420
|
+
const ue = h(() => {
|
|
421
|
+
var t;
|
|
422
|
+
const e = (t = c.value) == null ? void 0 : t.url;
|
|
423
|
+
return e ? /^https?:\/\//i.test(e) || typeof window > "u" || typeof location > "u" ? e : `${location.origin}${e}` : "";
|
|
424
|
+
}), U = h(() => {
|
|
425
|
+
var e;
|
|
426
|
+
return ((e = c.value) == null ? void 0 : e.extent) ?? null;
|
|
427
|
+
}), ce = h(() => g.value ? `raster-${g.value}` : void 0), Ee = h(() => g.value ? `raster-extent-${g.value}` : "raster-extent"), Le = h(() => g.value ? `raster-extent-draft-${g.value}` : "raster-extent-draft"), Re = h(() => {
|
|
428
|
+
const e = ce.value ?? "raster", t = U.value && U.value.length === 4 ? U.value.join(",") : "no-extent";
|
|
429
|
+
return `${e}-${t}`;
|
|
430
|
+
}), Me = h(() => !!ue.value), de = h(() => {
|
|
431
|
+
const e = U.value;
|
|
432
|
+
if (!e || e.length !== 4) return null;
|
|
433
|
+
const [t, s, l, r] = e;
|
|
434
|
+
return [t, s, l, r].some(
|
|
435
|
+
(o) => typeof o != "number" || Number.isNaN(o)
|
|
436
|
+
) ? null : [(t + l) / 2, (s + r) / 2];
|
|
437
|
+
}), T = h(() => {
|
|
438
|
+
var o, w;
|
|
439
|
+
const e = c.value, t = e == null ? void 0 : e.extent, l = g.value ?? "—", r = [
|
|
440
|
+
e != null && e.extension ? `Формат ${String(e.extension).toUpperCase()}` : null,
|
|
441
|
+
(e == null ? void 0 : e.resolution) || null
|
|
442
|
+
].filter(Boolean).join(", ");
|
|
443
|
+
return {
|
|
444
|
+
id: l,
|
|
445
|
+
name: (e == null ? void 0 : e.name) || ((w = (o = e == null ? void 0 : e.files) == null ? void 0 : o[0]) == null ? void 0 : w.name),
|
|
446
|
+
description: (e == null ? void 0 : e.description) || r || "Попередній перегляд растрового шару.",
|
|
447
|
+
coverage: t && t.length === 4 ? `${M(t[0])}, ${M(t[1])} → ${M(t[2])}, ${M(t[3])}` : "Покриття уточнюється",
|
|
448
|
+
crs: e != null && e.srid ? `EPSG:${e.srid}` : "EPSG:4326",
|
|
449
|
+
source: e != null && e.proj4 ? e.proj4 : "Джерело: Mapnik",
|
|
450
|
+
updatedAt: e != null && e.cache ? "Дані кешовано" : "Нові дані"
|
|
451
|
+
};
|
|
452
|
+
}), le = h(() => {
|
|
453
|
+
const e = c.value;
|
|
454
|
+
return e ? [
|
|
455
|
+
e.source_path,
|
|
456
|
+
e.srid ? `SRID: ${e.srid}` : null,
|
|
457
|
+
e.is_public ? "Публічна" : "Не публічна",
|
|
458
|
+
e.is_active ? "Активна" : "Неактивна",
|
|
459
|
+
e.cache ? "Кешовано" : null
|
|
460
|
+
].filter((t) => t).join(", ") : "";
|
|
461
|
+
}), fe = [
|
|
462
|
+
{ key: "info", label: "Інформація", icon: Ut },
|
|
463
|
+
{ key: "files", label: "Файли", icon: ot },
|
|
464
|
+
{ key: "metadata", label: "Метадані", icon: ct }
|
|
465
|
+
], me = fe.map((e) => e.key), R = $(me.includes(a.query.tab) ? a.query.tab : "info"), X = $(!0);
|
|
466
|
+
j(() => a.query.tab, (e) => {
|
|
467
|
+
e && me.includes(e) && R.value !== e && (R.value = e);
|
|
468
|
+
}), j(R, (e) => {
|
|
469
|
+
a.query.tab !== e && v.replace({ query: { ...a.query, tab: e } });
|
|
470
|
+
});
|
|
471
|
+
const Se = h(() => ze(c.value)), pe = h(() => Ne(c.value));
|
|
472
|
+
j(
|
|
473
|
+
() => c.value,
|
|
474
|
+
() => {
|
|
475
|
+
_e();
|
|
476
|
+
},
|
|
477
|
+
{ immediate: !0 }
|
|
478
|
+
);
|
|
479
|
+
async function Ie() {
|
|
480
|
+
var l;
|
|
481
|
+
const e = B();
|
|
482
|
+
if (!(e != null && e.ready)) return;
|
|
483
|
+
await e.ready(), oe();
|
|
484
|
+
const t = (l = e.map) == null ? void 0 : l.value;
|
|
485
|
+
if (!t) return;
|
|
486
|
+
const s = () => he();
|
|
487
|
+
t.on("moveend", s), t.on("zoomend", s), k = () => {
|
|
488
|
+
t.off("moveend", s), t.off("zoomend", s);
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
j(
|
|
492
|
+
() => [a.query.z, a.query.x, a.query.y],
|
|
493
|
+
() => {
|
|
494
|
+
oe();
|
|
495
|
+
}
|
|
496
|
+
), We(() => {
|
|
497
|
+
Ie();
|
|
498
|
+
}), Xe(() => {
|
|
499
|
+
k == null || k(), k = null, D == null || D(), D = null, se("");
|
|
500
|
+
}), j(g, () => {
|
|
501
|
+
K();
|
|
502
|
+
}, { immediate: !0 });
|
|
503
|
+
async function je(e) {
|
|
504
|
+
var t;
|
|
505
|
+
K(), ((t = c.value) == null ? void 0 : t.srid) !== e.srid && (I({ title: "XML start", type: "info", message: "зміна системи координат, оновлюємо карту ..." }), await ge(`/api/gis-xml/${encodeURIComponent(g.value)}`), I({ title: "XML created", type: "info", message: "карта створена" }), location.reload());
|
|
506
|
+
}
|
|
507
|
+
async function K() {
|
|
508
|
+
const e = g.value;
|
|
509
|
+
if (!e) {
|
|
510
|
+
c.value = null, L.value = null;
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
E.value = !0, L.value = null;
|
|
514
|
+
try {
|
|
515
|
+
const t = await fetch(`/api/gis-raster/${encodeURIComponent(e)}`);
|
|
516
|
+
if (!t.ok)
|
|
517
|
+
throw new Error(`HTTP ${t.status}`);
|
|
518
|
+
const s = await t.json();
|
|
519
|
+
s.xml && (P.value = !0), c.value = s, s.xml || (I({ title: "XML not found", type: "info", message: "йде створення xml ... зачекайте" }), await ge(`/api/gis-xml/${encodeURIComponent(e)}`), I({ title: "XML created", type: "info", message: "карта створена" }), fetch(`/api/gis-raster/${encodeURIComponent(e)}?nocache=1`), P.value = !0);
|
|
520
|
+
} catch (t) {
|
|
521
|
+
console.error("Failed to load raster info", t), c.value = null, L.value = t instanceof Error ? t.message : String(t);
|
|
522
|
+
} finally {
|
|
523
|
+
E.value = !1;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
function ge(e) {
|
|
527
|
+
return new Promise((t, s) => {
|
|
528
|
+
const l = new EventSource(e), r = [];
|
|
529
|
+
l.onmessage = (o) => {
|
|
530
|
+
r.push(o.data), console.log("Received:", o.data);
|
|
531
|
+
}, l.addEventListener("end", () => {
|
|
532
|
+
l.close(), t(r);
|
|
533
|
+
}), l.onerror = (o) => {
|
|
534
|
+
l.close(), t(o);
|
|
535
|
+
};
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
function ze(e) {
|
|
539
|
+
var t;
|
|
540
|
+
return (t = e == null ? void 0 : e.files) != null && t.length ? e.files.map((s) => ({
|
|
541
|
+
name: s.name,
|
|
542
|
+
resolution: Be(s.name, e),
|
|
543
|
+
size: s.size || "—",
|
|
544
|
+
status: "Готово",
|
|
545
|
+
statusClass: "bg-emerald-50 text-emerald-600 border border-emerald-100"
|
|
546
|
+
})) : [];
|
|
547
|
+
}
|
|
548
|
+
function Be(e, t) {
|
|
549
|
+
const s = e.toLowerCase();
|
|
550
|
+
return s.endsWith(".tfw") ? "Georeference" : s.endsWith(".xml") ? "Опис" : s.endsWith(".tif") || s.endsWith(".tiff") ? t != null && t.resolution ? t.resolution : "Растер" : (t == null ? void 0 : t.resolution) ?? "Файл";
|
|
551
|
+
}
|
|
552
|
+
function Ne(e) {
|
|
553
|
+
return e ? {
|
|
554
|
+
baseParams: De(e),
|
|
555
|
+
spatial: {
|
|
556
|
+
crs: {
|
|
557
|
+
code: e.srid ? `EPSG:${e.srid}` : "EPSG:4326",
|
|
558
|
+
description: e.proj4 || "WGS 84 — World Geodetic System 1984"
|
|
559
|
+
},
|
|
560
|
+
bounds: Ue(e.extent),
|
|
561
|
+
resolution: Te(e)
|
|
562
|
+
},
|
|
563
|
+
statistics: qe(e),
|
|
564
|
+
technical: Fe(e)
|
|
565
|
+
} : null;
|
|
566
|
+
}
|
|
567
|
+
function Pe(e) {
|
|
568
|
+
return e != null && e.length ? e.map((s) => {
|
|
569
|
+
var r;
|
|
570
|
+
if (!s) return "";
|
|
571
|
+
const l = s.trim().split(/\s+/)[0];
|
|
572
|
+
return ((r = l == null ? void 0 : l[0]) == null ? void 0 : r.toUpperCase()) || "";
|
|
573
|
+
}).filter(Boolean).join("") : "";
|
|
574
|
+
}
|
|
575
|
+
function De(e) {
|
|
576
|
+
var o, w;
|
|
577
|
+
const t = e.bands_count ?? ((o = e.bands) == null ? void 0 : o.length) ?? "—", s = Pe(e.bands), l = (e.bands ?? []).map((i) => i.trim()).filter((i) => i.length > 0), r = l.length ? l.join(", ") : void 0;
|
|
578
|
+
return [
|
|
579
|
+
{
|
|
580
|
+
label: "Розмір растру, px",
|
|
581
|
+
value: e.width && e.height ? `${e.width}×${e.height}` : "—"
|
|
582
|
+
},
|
|
583
|
+
{ label: "Формат файлу", value: ((w = e.extension) == null ? void 0 : w.toUpperCase()) ?? "—" },
|
|
584
|
+
{ label: "Розмір файлу, mb", value: e.total_size ? `${e.total_size}` : "—" },
|
|
585
|
+
{
|
|
586
|
+
label: "Кількість каналів",
|
|
587
|
+
value: typeof t == "number" ? `${t}${s ? ` (${s})` : ""}` : `${t}${s ? ` (${s})` : ""}`,
|
|
588
|
+
tooltip: r
|
|
589
|
+
},
|
|
590
|
+
{ label: "Глибина кольору", value: e.color_depth ? `${e.color_depth} біт/канал` : "—" },
|
|
591
|
+
{ label: "Стиснення", value: e.compression || "—" }
|
|
592
|
+
];
|
|
593
|
+
}
|
|
594
|
+
function Ue(e) {
|
|
595
|
+
return !e || e.length !== 4 ? [] : [
|
|
596
|
+
{ label: "Північ", value: M(e[3], "N") },
|
|
597
|
+
{ label: "Схід", value: M(e[2], "E") },
|
|
598
|
+
{ label: "Південь", value: M(e[1], "S") },
|
|
599
|
+
{ label: "Захід", value: M(e[0], "W") }
|
|
600
|
+
];
|
|
601
|
+
}
|
|
602
|
+
function Te(e) {
|
|
603
|
+
const t = [
|
|
604
|
+
{ label: "Роздільна здатність", value: e.resolution || "—" }
|
|
605
|
+
];
|
|
606
|
+
return e.width && e.height && t.push({ label: "Розмір пікселя", value: `${e.width} × ${e.height} px` }), t;
|
|
607
|
+
}
|
|
608
|
+
function qe(e) {
|
|
609
|
+
var t;
|
|
610
|
+
return (t = e.bands) != null && t.length ? e.bands.map((s, l) => {
|
|
611
|
+
const r = x[l % x.length];
|
|
612
|
+
return {
|
|
613
|
+
label: `Канал ${l + 1}${s ? ` (${s})` : ""}`,
|
|
614
|
+
cardClass: r.cardClass,
|
|
615
|
+
titleClass: r.titleClass,
|
|
616
|
+
metrics: [
|
|
617
|
+
{ label: "Назва", value: s || `Канал ${l + 1}` },
|
|
618
|
+
{ label: "Глибина", value: e.color_depth ? `${e.color_depth} біт` : "—" },
|
|
619
|
+
{ label: "Статус", value: e.cache ? "Кешовано" : "Готово" }
|
|
620
|
+
]
|
|
621
|
+
};
|
|
622
|
+
}) : [];
|
|
623
|
+
}
|
|
624
|
+
function Fe(e) {
|
|
625
|
+
var t;
|
|
626
|
+
return [
|
|
627
|
+
{ label: "Тип даних", value: e.color_depth ? `Unsigned Integer ${e.color_depth}-bit` : "—" },
|
|
628
|
+
{ label: "Компресія", value: e.compression || "—" },
|
|
629
|
+
{ label: "Кольорова інтерпретація", value: ((t = e.bands) == null ? void 0 : t.join(", ")) || "—" },
|
|
630
|
+
{ label: "SRID", value: e.srid ? `EPSG:${e.srid}` : "—" },
|
|
631
|
+
{ label: "Проекція (proj4)", value: e.proj4 || "—" },
|
|
632
|
+
{ label: "URL тайла", value: e.url || "—" }
|
|
633
|
+
];
|
|
634
|
+
}
|
|
635
|
+
function M(e, t) {
|
|
636
|
+
if (e == null || Number.isNaN(e)) return "—";
|
|
637
|
+
const s = `${e.toFixed(5)}°`;
|
|
638
|
+
return t ? `${s} ${t}` : s;
|
|
639
|
+
}
|
|
640
|
+
return (e, t) => (u(), m("div", Qt, [
|
|
641
|
+
n("div", Wt, [
|
|
642
|
+
n("div", Xt, [
|
|
643
|
+
n("div", Kt, [
|
|
644
|
+
n("div", Yt, [
|
|
645
|
+
n("div", Zt, [
|
|
646
|
+
n("div", Ht, [
|
|
647
|
+
n("button", {
|
|
648
|
+
type: "button",
|
|
649
|
+
class: "hover:text-gray-700 cursor-pointer transition-colors",
|
|
650
|
+
onClick: t[0] || (t[0] = (s) => Ke(v).push("/gis.rasters"))
|
|
651
|
+
}, " Растри "),
|
|
652
|
+
t[3] || (t[3] = n("svg", {
|
|
653
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
654
|
+
width: "24",
|
|
655
|
+
height: "24",
|
|
656
|
+
viewBox: "0 0 24 24",
|
|
657
|
+
fill: "none",
|
|
658
|
+
stroke: "currentColor",
|
|
659
|
+
"stroke-width": "2",
|
|
660
|
+
"stroke-linecap": "round",
|
|
661
|
+
"stroke-linejoin": "round",
|
|
662
|
+
class: "lucide lucide-chevron-right w-4 h-4 mx-1"
|
|
663
|
+
}, [
|
|
664
|
+
n("path", { d: "m9 18 6-6-6-6" })
|
|
665
|
+
], -1)),
|
|
666
|
+
n("span", Jt, p(T.value.name || "Растер"), 1)
|
|
667
|
+
]),
|
|
668
|
+
n("div", es, [
|
|
669
|
+
n("div", ts, [
|
|
670
|
+
n("div", ss, [
|
|
671
|
+
n("h1", ns, p(T.value.name || "Растер"), 1)
|
|
672
|
+
]),
|
|
673
|
+
le.value ? (u(), m("p", {
|
|
674
|
+
key: 0,
|
|
675
|
+
class: "text-xs text-gray-500 truncate",
|
|
676
|
+
title: le.value
|
|
677
|
+
}, p(le.value), 9, ls)) : q("", !0)
|
|
678
|
+
])
|
|
679
|
+
])
|
|
680
|
+
]),
|
|
681
|
+
n("div", rs, [
|
|
682
|
+
n("div", os, [
|
|
683
|
+
n("div", {
|
|
684
|
+
class: "w-full text-xs text-gray-600 truncate",
|
|
685
|
+
title: T.value.description
|
|
686
|
+
}, p(T.value.description), 9, is)
|
|
687
|
+
]),
|
|
688
|
+
N(it, {
|
|
689
|
+
"entity-id": g.value || "",
|
|
690
|
+
"entity-info": { name: T.value.name },
|
|
691
|
+
table: "gis.rasters.table",
|
|
692
|
+
"entity-label": "Растер",
|
|
693
|
+
"save-method": "put",
|
|
694
|
+
"edit-button-text": "Редагувати",
|
|
695
|
+
onSaved: je
|
|
696
|
+
}, null, 8, ["entity-id", "entity-info"])
|
|
697
|
+
])
|
|
698
|
+
])
|
|
699
|
+
])
|
|
700
|
+
]),
|
|
701
|
+
n("div", as, [
|
|
702
|
+
n("div", us, [
|
|
703
|
+
N(lt, {
|
|
704
|
+
ref_key: "mapViewRef",
|
|
705
|
+
ref: f
|
|
706
|
+
}, {
|
|
707
|
+
default: Ye(() => [
|
|
708
|
+
Me.value && P.value ? (u(), F(Gt, {
|
|
709
|
+
key: Re.value,
|
|
710
|
+
"tile-url": ue.value,
|
|
711
|
+
extent: U.value,
|
|
712
|
+
"layer-id": ce.value,
|
|
713
|
+
"show-raster-extent": V.value,
|
|
714
|
+
onToggleExtent: t[1] || (t[1] = (s) => V.value = s)
|
|
715
|
+
}, null, 8, ["tile-url", "extent", "layer-id", "show-raster-extent"])) : q("", !0),
|
|
716
|
+
N(xe, {
|
|
717
|
+
extent: V.value ? U.value : null,
|
|
718
|
+
"layer-id": Ee.value
|
|
719
|
+
}, null, 8, ["extent", "layer-id"]),
|
|
720
|
+
N(xe, {
|
|
721
|
+
extent: b.value,
|
|
722
|
+
"layer-id": Le.value,
|
|
723
|
+
"line-color": "#0ea5e9",
|
|
724
|
+
"line-width": 3
|
|
725
|
+
}, null, 8, ["extent", "layer-id"]),
|
|
726
|
+
n("div", cs, [
|
|
727
|
+
N(rt)
|
|
728
|
+
]),
|
|
729
|
+
d.value ? (u(), m("div", ds, " Потягніть на карті, щоб намалювати нові Bounds. Esc скасовує редагування. ")) : q("", !0),
|
|
730
|
+
n("div", fs, [
|
|
731
|
+
N(ye),
|
|
732
|
+
de.value ? (u(), F(ye, {
|
|
733
|
+
key: 0,
|
|
734
|
+
targetCenter: de.value,
|
|
735
|
+
targetLabel: "Центр даних",
|
|
736
|
+
targetAriaLabel: "Перейти до центру даних"
|
|
737
|
+
}, null, 8, ["targetCenter"])) : q("", !0)
|
|
738
|
+
])
|
|
739
|
+
]),
|
|
740
|
+
_: 1
|
|
741
|
+
}, 512)
|
|
742
|
+
])
|
|
743
|
+
]),
|
|
744
|
+
N(at, {
|
|
745
|
+
open: X.value,
|
|
746
|
+
onToggle: t[2] || (t[2] = (s) => X.value = !X.value)
|
|
747
|
+
}, null, 8, ["open"])
|
|
748
|
+
]),
|
|
749
|
+
n("div", {
|
|
750
|
+
class: re(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", X.value ? "w-[650px]" : "w-0"])
|
|
751
|
+
}, [
|
|
752
|
+
n("div", ms, [
|
|
753
|
+
n("div", ps, [
|
|
754
|
+
n("div", gs, [
|
|
755
|
+
(u(), m(O, null, G(fe, (s) => n("button", {
|
|
756
|
+
key: s.key,
|
|
757
|
+
type: "button",
|
|
758
|
+
role: "tab",
|
|
759
|
+
"aria-selected": R.value === s.key,
|
|
760
|
+
class: re(["whitespace-nowrap flex flex-col items-center justify-center gap-0.5 py-1 px-1 text-[9px] font-medium transition-all duration-300 hover:bg-white/70 rounded-lg group", R.value === s.key ? "bg-white shadow-sm text-gray-700" : ""]),
|
|
761
|
+
onClick: (l) => R.value = s.key
|
|
762
|
+
}, [
|
|
763
|
+
(u(), F(Ze(s.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
|
|
764
|
+
n("span", xs, p(s.label), 1)
|
|
765
|
+
], 10, ys)), 64))
|
|
766
|
+
])
|
|
767
|
+
]),
|
|
768
|
+
n("div", vs, [
|
|
769
|
+
E.value ? (u(), m("div", bs, " Завантаження метаданих растру… ")) : L.value ? (u(), m("div", hs, " Не вдалося отримати дані: " + p(L.value), 1)) : q("", !0),
|
|
770
|
+
R.value === "files" ? (u(), F(Bt, {
|
|
771
|
+
key: 2,
|
|
772
|
+
files: Se.value
|
|
773
|
+
}, null, 8, ["files"])) : R.value === "metadata" ? (u(), F(ut, {
|
|
774
|
+
key: 3,
|
|
775
|
+
data: c.value,
|
|
776
|
+
"entity-id": g.value,
|
|
777
|
+
"entity-type": "raster",
|
|
778
|
+
onSaved: K,
|
|
779
|
+
onEditCssBounds: Ce
|
|
780
|
+
}, null, 8, ["data", "entity-id"])) : pe.value ? (u(), F(St, {
|
|
781
|
+
key: 4,
|
|
782
|
+
details: pe.value
|
|
783
|
+
}, null, 8, ["details"])) : q("", !0)
|
|
784
|
+
])
|
|
785
|
+
])
|
|
786
|
+
], 2)
|
|
787
|
+
]));
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
export {
|
|
791
|
+
Ss as default
|
|
792
|
+
};
|