@opengis/surveyor 0.0.14 → 0.0.16
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/chunks/AppealStatusBadge-7KruOSVI.js +295 -0
- package/dist/chunks/ApplicationGeometryExportModal-DJbnKPm6.js +1245 -0
- package/dist/chunks/{BaseModal-SjP521X9.js → BaseModal-BJxKuONh.js} +1 -1
- package/dist/chunks/{RegistryFormModal-DhzEpxys.js → RegistryFormModal-BmBsUOF3.js} +1 -1
- package/dist/chunks/SurveyorTeleport-Cd6D92mo.js +30 -0
- package/dist/chunks/{applications-D6pHAQaK.js → applications-B6GAxopO.js} +16 -19
- package/dist/chunks/card-B113dNzv.js +1327 -0
- package/dist/chunks/card-COmcUdms.js +639 -0
- package/dist/chunks/{card-BBx1zR0E.js → card-Deae73xd.js} +2 -2
- package/dist/chunks/{certificates-DtfZTFN9.js → certificates-DHf1zGQs.js} +18 -8
- package/dist/chunks/{create-Cgeu7aKO.js → create-BVPqfJOb.js} +10 -10
- package/dist/chunks/{map-DkKsEnCM.js → map-BZi4eVl3.js} +893 -897
- package/dist/chunks/{map-layers-BmuIMLHa.js → map-layers-CKZK50de.js} +2 -2
- package/dist/chunks/{organizations-BO1dIl7v.js → organizations-DYGfYfHS.js} +2 -2
- package/dist/chunks/{requests-rWq8ok3C.js → requests-D1ix8U5f.js} +1 -1
- package/dist/chunks/requests-v1jHarHb.js +303 -0
- package/dist/chunks/{users-DOiQeVwn.js → users-frk3gmmd.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +21 -21
- package/package.json +1 -1
- package/server/modules/surveyor/route.ts +13 -12
- package/server/modules/surveyor/services/applicationTile.ts +3 -3
- package/server/modules/surveyor/services/cancelApplication.ts +2 -1
- package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +1 -1
- package/server/modules/surveyor/services/completeApplication.ts +1 -1
- package/server/modules/surveyor/services/identifyApplications.ts +2 -2
- package/server/modules/surveyor/services/issueSourceData.ts +1 -1
- package/server/modules/surveyor/services/registerSurveyor.ts +1 -1
- package/server/modules/surveyor/services/resendRegistration.ts +1 -1
- package/server/modules/surveyor/services/searchApplications.ts +2 -2
- package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +1 -1
- package/server/modules/surveyor/services/updateSurveyorStatus.ts +1 -1
- package/server/modules/surveyor/services/verifyApplication.ts +1 -1
- package/server/modules/surveyor/utils/shared.ts +28 -6
- package/server/resources/surveyor-admin/application_comments.ts +1 -1
- package/server/resources/surveyor-admin/application_status_history.ts +1 -1
- package/server/resources/surveyor-admin/applications.ts +12 -11
- package/server/resources/surveyor-admin/certificates.ts +26 -26
- package/server/resources/surveyor-admin/map_layers.ts +1 -1
- package/server/resources/surveyor-admin/organizations.ts +1 -1
- package/server/resources/surveyor-admin/surveyors.ts +1 -1
- package/server/suggests/index.ts +18 -1
- package/dist/chunks/AppealStatusBadge-Ct3EcB4_.js +0 -185
- package/dist/chunks/ApplicationHistorySection-D7KPV2cX.js +0 -788
- package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +0 -23
- package/dist/chunks/card-Bj4zFzbe.js +0 -1193
- package/dist/chunks/card-C-ohjNkC.js +0 -609
- package/dist/chunks/requests-BZ2jrt5J.js +0 -234
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { a as t, d as n, l as r, s as i, t as a } from "./resources-Cj8BzrBX.js";
|
|
3
3
|
import { l as o, o as s } from "./filterQuery-Dka-mIso.js";
|
|
4
|
-
import { t as c } from "./SurveyorTeleport-
|
|
4
|
+
import { t as c } from "./SurveyorTeleport-Cd6D92mo.js";
|
|
5
5
|
import { c as l, d as u, f as d, l as f, m as p, p as m, t as h, u as g } from "./appealMapLayers-CQMK3rrz.js";
|
|
6
|
-
import { a as _,
|
|
7
|
-
import { t as
|
|
8
|
-
import { a as ee, c as C, d as w, i as T, l as te, n as E, o as ne, r as D, s as re, t as ie, u as ae } from "./mapLayersApi-CBLcbADa.js";
|
|
6
|
+
import { a as _, c as v, l as y, o as b, s as x, t as S, u as C } from "./AppealStatusBadge-7KruOSVI.js";
|
|
7
|
+
import { a as w, c as T, d as ee, i as E, l as D, n as te, o as O, r as ne, s as re, t as ie, u as ae } from "./mapLayersApi-CBLcbADa.js";
|
|
9
8
|
import { i as oe, n as se } from "./geometry-DyhIVRcw.js";
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { RouterLink as me, useRoute as he, useRouter as
|
|
12
|
-
import { AlertTriangle as
|
|
9
|
+
import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createTextVNode as F, createVNode as I, defineComponent as L, nextTick as ce, normalizeClass as R, normalizeStyle as z, onMounted as le, onUnmounted as ue, openBlock as B, ref as V, renderList as H, shallowRef as de, toDisplayString as U, useTemplateRef as W, vModelText as fe, watch as G, withCtx as K, withDirectives as q, withModifiers as pe } from "vue";
|
|
10
|
+
import { RouterLink as me, useRoute as he, useRouter as J } from "vue-router";
|
|
11
|
+
import { AlertTriangle as ge, Check as Y, ChevronDown as _e, ChevronLeft as X, ChevronRight as Z, Compass as Q, GripVertical as ve, Layers2 as $, Loader2 as ye, Map as be, Minus as xe, MoreHorizontal as Se, Plus as Ce, RotateCcw as we, Search as Te, SlidersHorizontal as Ee, X as De, ZoomIn as Oe } from "lucide-vue-next";
|
|
13
12
|
//#region admin/src/api/map.ts
|
|
14
|
-
var
|
|
15
|
-
function
|
|
13
|
+
var ke = 2021;
|
|
14
|
+
function Ae() {
|
|
16
15
|
return [String((/* @__PURE__ */ new Date()).getFullYear())];
|
|
17
16
|
}
|
|
18
|
-
function
|
|
19
|
-
return e && e.length === 0 ? "all" : (e?.length ? e :
|
|
17
|
+
function je(e) {
|
|
18
|
+
return e && e.length === 0 ? "all" : (e?.length ? e : Ae()).map((e) => e.trim()).filter(Boolean).join(",");
|
|
20
19
|
}
|
|
21
|
-
var
|
|
20
|
+
var Me = [
|
|
22
21
|
"awaitingData",
|
|
23
22
|
"dataIssued",
|
|
24
23
|
"reserve",
|
|
25
24
|
"underReview",
|
|
26
25
|
"verified"
|
|
27
|
-
],
|
|
28
|
-
function
|
|
26
|
+
], Ne = "__no_match__";
|
|
27
|
+
function Pe(e) {
|
|
29
28
|
let t = new Set(e);
|
|
30
29
|
if (t.size === 0) return "all";
|
|
31
|
-
let n = [...t].every((e) =>
|
|
32
|
-
return n && r && t.size ===
|
|
30
|
+
let n = [...t].every((e) => Me.includes(e)), r = Me.every((e) => t.has(e));
|
|
31
|
+
return n && r && t.size === Me.length ? "active" : "all";
|
|
33
32
|
}
|
|
34
|
-
function
|
|
33
|
+
function Fe(e, t) {
|
|
35
34
|
let n = {}, r = !1, i = new Set(t);
|
|
36
|
-
|
|
35
|
+
Pe(i) === "all" && (x.every((e) => i.has(e)) || (r = !0, n.status = i.size === 0 ? { in: Ne } : i.size === 1 ? [...i][0] : { in: [...i].sort().join(",") }));
|
|
37
36
|
let a = (e.workType ?? []).map((e) => e.trim()).filter(Boolean);
|
|
38
37
|
if (a.length === 1 ? (n.work_type = a[0], r = !0) : a.length > 1 && (n.work_type = { in: a.join(",") }, r = !0), e.dateFrom?.trim() || e.dateTo?.trim()) {
|
|
39
38
|
let t = {};
|
|
@@ -46,25 +45,25 @@ function Pe(e, t) {
|
|
|
46
45
|
let c = (e.address ?? []).map((e) => e.trim()).filter(Boolean);
|
|
47
46
|
return c.length === 1 ? (n.address_id = c[0], r = !0) : c.length > 1 && (n.address_id = { in: c.join(",") }, r = !0), r ? n : void 0;
|
|
48
47
|
}
|
|
49
|
-
function
|
|
48
|
+
function Ie(e = {}, t = x) {
|
|
50
49
|
let n = new URLSearchParams();
|
|
51
|
-
return
|
|
50
|
+
return Pe(t) === "active" && n.set("scope", "active"), n.set("year", je(e.year)), a(n, Fe(e, t)), `${r("/api/surveyor/vtile/applications/{z}/{x}/{y}")}?${n.toString()}`;
|
|
52
51
|
}
|
|
53
|
-
async function
|
|
54
|
-
let e = await t(
|
|
52
|
+
async function Le() {
|
|
53
|
+
let e = await t(C, {
|
|
55
54
|
page: 1,
|
|
56
55
|
limit: 1
|
|
57
|
-
}), n = Object.fromEntries(
|
|
58
|
-
for (let t of
|
|
56
|
+
}), n = Object.fromEntries(x.map((e) => [e, 0]));
|
|
57
|
+
for (let t of x) {
|
|
59
58
|
let r = Number(e.summary?.[t] ?? 0);
|
|
60
59
|
n[t] = Number.isFinite(r) ? r : 0;
|
|
61
60
|
}
|
|
62
61
|
return n;
|
|
63
62
|
}
|
|
64
|
-
function
|
|
63
|
+
function Re(e) {
|
|
65
64
|
return i(`/api/resource/applications/${encodeURIComponent(e)}?include=organization,surveyor`);
|
|
66
65
|
}
|
|
67
|
-
function
|
|
66
|
+
function ze(e, t = {}) {
|
|
68
67
|
let n = e.trim(), r = new URLSearchParams({
|
|
69
68
|
search: n,
|
|
70
69
|
page: String(t.page ?? 1),
|
|
@@ -74,7 +73,7 @@ function Re(e, t = {}) {
|
|
|
74
73
|
}
|
|
75
74
|
//#endregion
|
|
76
75
|
//#region admin/src/api/mock-map-settings.ts
|
|
77
|
-
var
|
|
76
|
+
var Be = {
|
|
78
77
|
center: "49.8397, 24.0297",
|
|
79
78
|
zoom: 13,
|
|
80
79
|
katottg: "UA4610100000",
|
|
@@ -85,69 +84,66 @@ var ze = {
|
|
|
85
84
|
adminCabinet: "https://cabinet.geodesist.gov.ua/admin",
|
|
86
85
|
gis: "https://gis.geodesist.gov.ua"
|
|
87
86
|
}
|
|
88
|
-
},
|
|
89
|
-
function
|
|
87
|
+
}, Ve = "surveyor:map-settings", He = V({ ...Be });
|
|
88
|
+
function Ue(e) {
|
|
90
89
|
let t = Number(e.trim().replace(",", "."));
|
|
91
90
|
return Number.isFinite(t) ? t : null;
|
|
92
91
|
}
|
|
93
|
-
function
|
|
94
|
-
let t = e.split(",").map((e) =>
|
|
92
|
+
function We(e) {
|
|
93
|
+
let t = e.split(",").map((e) => Ue(e));
|
|
95
94
|
return t.length !== 2 || t[0] == null || t[1] == null ? null : {
|
|
96
95
|
lat: t[0],
|
|
97
96
|
lng: t[1]
|
|
98
97
|
};
|
|
99
98
|
}
|
|
100
|
-
function
|
|
99
|
+
function Ge(e) {
|
|
101
100
|
let t = typeof e == "number" ? e : Number(String(e ?? "").trim().replace(",", "."));
|
|
102
|
-
return Number.isFinite(t) && t >= 1 && t <= 19 ? t :
|
|
101
|
+
return Number.isFinite(t) && t >= 1 && t <= 19 ? t : Be.zoom;
|
|
103
102
|
}
|
|
104
|
-
function
|
|
103
|
+
function Ke() {
|
|
105
104
|
try {
|
|
106
|
-
let e = localStorage.getItem(
|
|
105
|
+
let e = localStorage.getItem(Ve);
|
|
107
106
|
if (!e) return;
|
|
108
107
|
let t = JSON.parse(e), { bounds: n, ...r } = t;
|
|
109
|
-
|
|
110
|
-
...
|
|
108
|
+
He.value = {
|
|
109
|
+
...Be,
|
|
111
110
|
...r,
|
|
112
|
-
zoom:
|
|
111
|
+
zoom: Ge(t.zoom)
|
|
113
112
|
};
|
|
114
113
|
} catch {
|
|
115
|
-
|
|
114
|
+
He.value = { ...Be };
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
|
-
|
|
119
|
-
function
|
|
120
|
-
let e =
|
|
117
|
+
Ke();
|
|
118
|
+
function qe() {
|
|
119
|
+
let e = A(() => We(He.value.center)), t = A(() => e.value ? [e.value.lng, e.value.lat] : null);
|
|
121
120
|
function n(e) {
|
|
122
|
-
|
|
121
|
+
He.value = { ...e }, localStorage.setItem(Ve, JSON.stringify(He.value));
|
|
123
122
|
}
|
|
124
123
|
function r() {
|
|
125
|
-
|
|
124
|
+
He.value = { ...Be }, localStorage.removeItem(Ve);
|
|
126
125
|
}
|
|
127
126
|
return {
|
|
128
|
-
settings:
|
|
127
|
+
settings: He,
|
|
129
128
|
center: e,
|
|
130
129
|
centerLngLat: t,
|
|
131
|
-
zoom:
|
|
130
|
+
zoom: A(() => Ge(He.value.zoom)),
|
|
132
131
|
saveSettings: n,
|
|
133
132
|
resetSettings: r
|
|
134
133
|
};
|
|
135
134
|
}
|
|
136
135
|
//#endregion
|
|
137
|
-
//#region admin/src/
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
label: e.name
|
|
141
|
-
})), Je = Object.fromEntries(S.items.map((e) => [e.code, e.name])), Ye = "map-applications", Xe = "applications", Ze = "map-applications-fill", Qe = "map-applications-line";
|
|
142
|
-
function $e() {
|
|
136
|
+
//#region admin/src/pages/map/components/map-styles.ts
|
|
137
|
+
var Je = "map-applications", Ye = "applications", Xe = "map-applications-fill", Ze = "map-applications-line";
|
|
138
|
+
function Qe() {
|
|
143
139
|
return [
|
|
144
140
|
"match",
|
|
145
141
|
["get", "status"],
|
|
146
|
-
...Object.entries(
|
|
142
|
+
...Object.entries(v).flatMap(([e, t]) => [e, t]),
|
|
147
143
|
"#64748b"
|
|
148
144
|
];
|
|
149
145
|
}
|
|
150
|
-
function
|
|
146
|
+
function $e(e) {
|
|
151
147
|
return [
|
|
152
148
|
"*",
|
|
153
149
|
e,
|
|
@@ -169,18 +165,18 @@ function et(e) {
|
|
|
169
165
|
]
|
|
170
166
|
];
|
|
171
167
|
}
|
|
172
|
-
function
|
|
168
|
+
function et(e) {
|
|
173
169
|
if (!e) return !1;
|
|
174
170
|
let { lng: t, lat: n, zoom: r } = e;
|
|
175
171
|
return Number.isFinite(t) && Number.isFinite(n) && Number.isFinite(r) && t >= -180 && t <= 180 && n >= -90 && n <= 90 && r >= 1 && r <= 19;
|
|
176
172
|
}
|
|
177
|
-
var
|
|
173
|
+
var tt = [
|
|
178
174
|
"status",
|
|
179
175
|
"workType",
|
|
180
176
|
"year",
|
|
181
177
|
"organization",
|
|
182
178
|
"address"
|
|
183
|
-
],
|
|
179
|
+
], nt = "_", rt = [
|
|
184
180
|
"dateFrom",
|
|
185
181
|
"dateTo",
|
|
186
182
|
"workType",
|
|
@@ -188,35 +184,35 @@ var nt = [
|
|
|
188
184
|
"organization",
|
|
189
185
|
"address",
|
|
190
186
|
"year"
|
|
191
|
-
],
|
|
187
|
+
], it = /* @__PURE__ */ new Set([
|
|
192
188
|
"workType",
|
|
193
189
|
"year",
|
|
194
190
|
"organization",
|
|
195
191
|
"address"
|
|
196
192
|
]);
|
|
197
|
-
function
|
|
193
|
+
function at(e) {
|
|
198
194
|
let t = Number(String(e ?? "").trim().replace(",", "."));
|
|
199
195
|
return Number.isFinite(t) ? t : null;
|
|
200
196
|
}
|
|
201
|
-
function
|
|
202
|
-
let t =
|
|
197
|
+
function ot(e) {
|
|
198
|
+
let t = at(e.x), n = at(e.y), r = at(e.z), i = t != null && n != null && r != null ? {
|
|
203
199
|
lng: t,
|
|
204
200
|
lat: n,
|
|
205
201
|
zoom: r
|
|
206
|
-
} : null, a =
|
|
202
|
+
} : null, a = et(i) ? i : null, o = String(e.filter ?? ""), c = s(o, tt), l = null, u = c.status;
|
|
207
203
|
if (u != null && u !== "") {
|
|
208
204
|
let e = Array.isArray(u) ? u.join(",") : String(u);
|
|
209
|
-
if (e ===
|
|
205
|
+
if (e === nt) l = /* @__PURE__ */ new Set();
|
|
210
206
|
else {
|
|
211
207
|
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
212
|
-
l = new Set(t.filter((e) =>
|
|
208
|
+
l = new Set(t.filter((e) => x.includes(e)));
|
|
213
209
|
}
|
|
214
210
|
}
|
|
215
211
|
let d = String(c.search ?? "").trim(), f = {};
|
|
216
|
-
for (let e of
|
|
212
|
+
for (let e of rt) {
|
|
217
213
|
let t = c[e];
|
|
218
214
|
if (t == null || t === "") continue;
|
|
219
|
-
if (
|
|
215
|
+
if (it.has(e)) {
|
|
220
216
|
if (e === "year" && String(t).trim() === "all") {
|
|
221
217
|
f.year = [];
|
|
222
218
|
continue;
|
|
@@ -232,12 +228,12 @@ function st(e) {
|
|
|
232
228
|
p != null && String(p) !== "" ? m = String(p).split(",").map((e) => e.trim()).filter(Boolean) : p != null && String(p) === "" && (m = []);
|
|
233
229
|
let h = e.app, g = null;
|
|
234
230
|
h != null && String(h) !== "" && (g = String(h) !== "0");
|
|
235
|
-
let _ =
|
|
231
|
+
let _ = at(e.p), v = _ != null && _ > 0 ? Math.floor(_) : 1, y = String(e.basemap ?? e.base ?? "").trim() || null;
|
|
236
232
|
return {
|
|
237
233
|
view: a,
|
|
238
234
|
sel: String(e.sel ?? "").trim() || null,
|
|
239
|
-
identifyPage:
|
|
240
|
-
basemapId:
|
|
235
|
+
identifyPage: v,
|
|
236
|
+
basemapId: y,
|
|
241
237
|
layerIds: m,
|
|
242
238
|
applicationsVisible: g,
|
|
243
239
|
visibleStatuses: l,
|
|
@@ -245,18 +241,18 @@ function st(e) {
|
|
|
245
241
|
advancedFilters: f
|
|
246
242
|
};
|
|
247
243
|
}
|
|
248
|
-
function
|
|
244
|
+
function st(e) {
|
|
249
245
|
let t = {};
|
|
250
|
-
|
|
246
|
+
x.every((t) => e.visibleStatuses.has(t)) || (t.status = e.visibleStatuses.size ? [...e.visibleStatuses].sort().join(",") : nt);
|
|
251
247
|
let n = e.search.trim();
|
|
252
248
|
n && (t.search = n);
|
|
253
249
|
let r = e.advancedFilters.year;
|
|
254
250
|
if (r && r.length === 0) t.year = "all";
|
|
255
251
|
else {
|
|
256
|
-
let e = r?.length ? r :
|
|
252
|
+
let e = r?.length ? r : Ae(), n = Ae()[0];
|
|
257
253
|
(e.length !== 1 || e[0] !== n) && (t.year = e);
|
|
258
254
|
}
|
|
259
|
-
for (let n of
|
|
255
|
+
for (let n of rt) {
|
|
260
256
|
if (n === "year") continue;
|
|
261
257
|
let r = e.advancedFilters[n];
|
|
262
258
|
if (n === "workType" || n === "organization" || n === "address") {
|
|
@@ -269,20 +265,20 @@ function ct(e) {
|
|
|
269
265
|
}
|
|
270
266
|
return t;
|
|
271
267
|
}
|
|
272
|
-
function
|
|
268
|
+
function ct(e) {
|
|
273
269
|
let t = {};
|
|
274
|
-
e.view &&
|
|
275
|
-
let n = o(
|
|
270
|
+
e.view && et(e.view) && (t.z = String(Math.round(e.view.zoom * 100) / 100), t.x = e.view.lng.toFixed(5), t.y = e.view.lat.toFixed(5)), e.sel && (t.sel = e.sel), e.identifyPage > 1 && (t.p = String(e.identifyPage));
|
|
271
|
+
let n = o(st(e));
|
|
276
272
|
return n && (t.filter = n), e.basemapId && e.defaultBasemapId && e.basemapId !== e.defaultBasemapId && (t.basemap = e.basemapId), e.activeOverlayIds.length > 0 && (t.layers = [...e.activeOverlayIds].sort().join(",")), e.applicationsVisible || (t.app = "0"), t;
|
|
277
273
|
}
|
|
278
|
-
function
|
|
274
|
+
function lt(e, t) {
|
|
279
275
|
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
280
276
|
for (let r of n) if (String(e[r] ?? "") !== String(t[r] ?? "")) return !1;
|
|
281
277
|
return !0;
|
|
282
278
|
}
|
|
283
279
|
//#endregion
|
|
284
280
|
//#region admin/src/pages/map/components/MapView.vue?vue&type=script&setup=true&lang.ts
|
|
285
|
-
var
|
|
281
|
+
var ut = /*@__PURE__*/ L({
|
|
286
282
|
__name: "MapView",
|
|
287
283
|
props: {
|
|
288
284
|
basemap: {
|
|
@@ -345,11 +341,11 @@ var dt = /*@__PURE__*/ I({
|
|
|
345
341
|
let r = {
|
|
346
342
|
padding: 48,
|
|
347
343
|
maxZoom: 18
|
|
348
|
-
}, i = e, a = n, { centerLngLat: o, zoom: s, settings: c } =
|
|
344
|
+
}, i = e, a = n, { centerLngLat: o, zoom: s, settings: c } = qe(), l = V(null), d = de(null), f = V(null), h = V(""), v = [], y, b = null, x = !1, S = !1, C = [Xe, Ze];
|
|
349
345
|
function ie(e) {
|
|
350
346
|
return Number.isFinite(e) ? Math.min(19, Math.max(1, e)) : s.value;
|
|
351
347
|
}
|
|
352
|
-
function
|
|
348
|
+
function k() {
|
|
353
349
|
return i.initialView ? {
|
|
354
350
|
center: [i.initialView.lng, i.initialView.lat],
|
|
355
351
|
zoom: ie(i.initialView.zoom)
|
|
@@ -358,8 +354,8 @@ var dt = /*@__PURE__*/ I({
|
|
|
358
354
|
zoom: ie(s.value)
|
|
359
355
|
};
|
|
360
356
|
}
|
|
361
|
-
function
|
|
362
|
-
if (
|
|
357
|
+
function A() {
|
|
358
|
+
if (S) return;
|
|
363
359
|
let e = d.value;
|
|
364
360
|
if (!e) return;
|
|
365
361
|
let t = e.getCenter(), n = {
|
|
@@ -369,9 +365,9 @@ var dt = /*@__PURE__*/ I({
|
|
|
369
365
|
};
|
|
370
366
|
a("viewChange", n), a("zoom", n.zoom);
|
|
371
367
|
}
|
|
372
|
-
function
|
|
368
|
+
function j(e, t = !1) {
|
|
373
369
|
let n = d.value;
|
|
374
|
-
n && (
|
|
370
|
+
n && (S = !0, t ? n.flyTo({
|
|
375
371
|
center: [e.lng, e.lat],
|
|
376
372
|
zoom: e.zoom,
|
|
377
373
|
bearing: 0,
|
|
@@ -381,42 +377,42 @@ var dt = /*@__PURE__*/ I({
|
|
|
381
377
|
center: [e.lng, e.lat],
|
|
382
378
|
zoom: e.zoom
|
|
383
379
|
}), a("zoom", e.zoom), window.setTimeout(() => {
|
|
384
|
-
|
|
380
|
+
S = !1;
|
|
385
381
|
}, 0));
|
|
386
382
|
}
|
|
387
|
-
function
|
|
383
|
+
function M(e) {
|
|
388
384
|
return e.isStyleLoaded() && !!e.getLayer("map-applications-fill");
|
|
389
385
|
}
|
|
390
|
-
function
|
|
391
|
-
if (!
|
|
386
|
+
function N(e) {
|
|
387
|
+
if (!M(e)) return;
|
|
392
388
|
let t = i.applicationsVisible ? "visible" : "none", n = i.applicationsOpacity / 100;
|
|
393
|
-
for (let n of
|
|
394
|
-
e.setPaintProperty(
|
|
389
|
+
for (let n of C) e.getLayer(n) && e.setLayoutProperty(n, "visibility", t);
|
|
390
|
+
e.setPaintProperty(Xe, "fill-opacity", $e(n)), e.setPaintProperty(Ze, "line-opacity", n);
|
|
395
391
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
392
|
+
function P(e, t) {
|
|
393
|
+
w(e, t, E(e, i.overlays, [Xe]));
|
|
398
394
|
}
|
|
399
|
-
function
|
|
400
|
-
e.getSource("map-applications") || e.addSource(
|
|
395
|
+
function F(e) {
|
|
396
|
+
e.getSource("map-applications") || e.addSource(Je, {
|
|
401
397
|
type: "vector",
|
|
402
|
-
tiles: [
|
|
398
|
+
tiles: [Ie(i.filters, i.visibleStatuses)],
|
|
403
399
|
promoteId: "id"
|
|
404
400
|
}), e.getLayer("map-applications-fill") || e.addLayer({
|
|
405
|
-
id:
|
|
401
|
+
id: Xe,
|
|
406
402
|
type: "fill",
|
|
407
|
-
source:
|
|
408
|
-
"source-layer":
|
|
403
|
+
source: Je,
|
|
404
|
+
"source-layer": Ye,
|
|
409
405
|
paint: {
|
|
410
|
-
"fill-color":
|
|
411
|
-
"fill-opacity":
|
|
406
|
+
"fill-color": Qe(),
|
|
407
|
+
"fill-opacity": $e(i.applicationsOpacity / 100)
|
|
412
408
|
}
|
|
413
409
|
}), e.getLayer("map-applications-line") || e.addLayer({
|
|
414
|
-
id:
|
|
410
|
+
id: Ze,
|
|
415
411
|
type: "line",
|
|
416
|
-
source:
|
|
417
|
-
"source-layer":
|
|
412
|
+
source: Je,
|
|
413
|
+
"source-layer": Ye,
|
|
418
414
|
paint: {
|
|
419
|
-
"line-color":
|
|
415
|
+
"line-color": Qe(),
|
|
420
416
|
"line-width": [
|
|
421
417
|
"case",
|
|
422
418
|
[
|
|
@@ -434,83 +430,83 @@ var dt = /*@__PURE__*/ I({
|
|
|
434
430
|
1.5
|
|
435
431
|
]
|
|
436
432
|
}
|
|
437
|
-
}),
|
|
433
|
+
}), N(e);
|
|
438
434
|
}
|
|
439
|
-
function
|
|
435
|
+
function I(e) {
|
|
440
436
|
return i.overlayOpacities[e.id] ?? Math.round(p(e) * 100);
|
|
441
437
|
}
|
|
442
|
-
function
|
|
443
|
-
for (let t of i.overlays)
|
|
438
|
+
function L(e) {
|
|
439
|
+
for (let t of i.overlays) te(e, t, I(t));
|
|
444
440
|
}
|
|
445
441
|
function ce(e) {
|
|
446
|
-
re(e, i.overlays, i.activeOverlayIds,
|
|
447
|
-
}
|
|
448
|
-
let L = /* @__PURE__ */ new Set();
|
|
449
|
-
function R(e) {
|
|
450
|
-
let t = e;
|
|
451
|
-
t.sourceId && t.isSourceLoaded && i.overlays.some((e) => e.id === t.sourceId) && (L.add(t.sourceId), a("overlayLoad", t.sourceId, "ready"));
|
|
442
|
+
re(e, i.overlays, i.activeOverlayIds, Xe), L(e);
|
|
452
443
|
}
|
|
444
|
+
let R = /* @__PURE__ */ new Set();
|
|
453
445
|
function z(e) {
|
|
454
446
|
let t = e;
|
|
455
|
-
|
|
447
|
+
t.sourceId && t.isSourceLoaded && i.overlays.some((e) => e.id === t.sourceId) && (R.add(t.sourceId), a("overlayLoad", t.sourceId, "ready"));
|
|
456
448
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
449
|
+
function B(e) {
|
|
450
|
+
let t = e;
|
|
451
|
+
!t.sourceId || t.tile || R.has(t.sourceId) || i.overlays.some((e) => e.id === t.sourceId) && a("overlayLoad", t.sourceId, "error");
|
|
459
452
|
}
|
|
460
453
|
function H(e) {
|
|
454
|
+
F(e), ce(e);
|
|
455
|
+
}
|
|
456
|
+
function U(e) {
|
|
461
457
|
return {
|
|
462
|
-
source:
|
|
463
|
-
sourceLayer:
|
|
458
|
+
source: Je,
|
|
459
|
+
sourceLayer: Ye,
|
|
464
460
|
id: e
|
|
465
461
|
};
|
|
466
462
|
}
|
|
467
|
-
function
|
|
468
|
-
if (!
|
|
469
|
-
|
|
463
|
+
function W(e) {
|
|
464
|
+
if (!v.length || !e.getSource("map-applications")) {
|
|
465
|
+
v.length = 0;
|
|
470
466
|
return;
|
|
471
467
|
}
|
|
472
|
-
for (let t of
|
|
473
|
-
e.setFeatureState(
|
|
468
|
+
for (let t of v) try {
|
|
469
|
+
e.setFeatureState(U(t), { hover: !1 });
|
|
474
470
|
} catch {}
|
|
475
|
-
|
|
471
|
+
v.length = 0;
|
|
476
472
|
}
|
|
477
473
|
function fe(e, t) {
|
|
478
474
|
let n = new Set(t);
|
|
479
475
|
if (e.getSource("map-applications")) {
|
|
480
|
-
for (let t of
|
|
481
|
-
e.setFeatureState(
|
|
476
|
+
for (let t of v) if (!n.has(t)) try {
|
|
477
|
+
e.setFeatureState(U(t), { hover: !1 });
|
|
482
478
|
} catch {}
|
|
483
479
|
for (let n of t) try {
|
|
484
|
-
e.setFeatureState(
|
|
480
|
+
e.setFeatureState(U(n), { hover: !0 });
|
|
485
481
|
} catch {}
|
|
486
482
|
}
|
|
487
|
-
|
|
483
|
+
v.length = 0, v.push(...t);
|
|
488
484
|
}
|
|
489
|
-
function
|
|
485
|
+
function K(e, t) {
|
|
490
486
|
let n = f.value;
|
|
491
487
|
if (n && n !== t && e.getSource("map-applications")) try {
|
|
492
|
-
e.setFeatureState(
|
|
488
|
+
e.setFeatureState(U(n), { selected: !1 });
|
|
493
489
|
} catch {}
|
|
494
490
|
if (f.value = t, t && e.getSource("map-applications")) try {
|
|
495
|
-
e.setFeatureState(
|
|
491
|
+
e.setFeatureState(U(t), { selected: !0 });
|
|
496
492
|
} catch {}
|
|
497
493
|
}
|
|
498
|
-
function
|
|
494
|
+
function q(e, t = "") {
|
|
499
495
|
return (e == null ? "" : String(e).trim()) || t;
|
|
500
496
|
}
|
|
501
|
-
function
|
|
502
|
-
let n = e.queryRenderedFeatures(t, { layers: [
|
|
497
|
+
function pe(e, t) {
|
|
498
|
+
let n = e.queryRenderedFeatures(t, { layers: [Xe] }), r = [], i = /* @__PURE__ */ new Set();
|
|
503
499
|
for (let e of n) {
|
|
504
|
-
let t =
|
|
500
|
+
let t = q(e.id ?? e.properties?.id);
|
|
505
501
|
if (!t || i.has(t)) continue;
|
|
506
|
-
let n =
|
|
502
|
+
let n = q(e.properties?.status);
|
|
507
503
|
i.add(t);
|
|
508
|
-
let a =
|
|
504
|
+
let a = q(e.properties?.work_type), o = q(e.properties?.org_name ?? e.properties?.organization);
|
|
509
505
|
r.push({
|
|
510
506
|
id: t,
|
|
511
|
-
number:
|
|
507
|
+
number: q(e.properties?.number, "—"),
|
|
512
508
|
status: n,
|
|
513
|
-
workType: a &&
|
|
509
|
+
workType: a && _[a] || a || "—",
|
|
514
510
|
organization: o || "—"
|
|
515
511
|
});
|
|
516
512
|
}
|
|
@@ -521,15 +517,15 @@ var dt = /*@__PURE__*/ I({
|
|
|
521
517
|
}
|
|
522
518
|
function me() {
|
|
523
519
|
let e = d.value;
|
|
524
|
-
e && (
|
|
520
|
+
e && (W(e), e.getCanvas().style.cursor = ""), a("pointHover", null, null);
|
|
525
521
|
}
|
|
526
522
|
let he = !1;
|
|
527
|
-
function
|
|
523
|
+
function J(e) {
|
|
528
524
|
let t = d.value;
|
|
529
|
-
if (!t || he || !
|
|
530
|
-
let n =
|
|
525
|
+
if (!t || he || !M(t)) return;
|
|
526
|
+
let n = pe(t, e.point);
|
|
531
527
|
if (t.getCanvas().style.cursor = n ? "pointer" : "", !n) {
|
|
532
|
-
|
|
528
|
+
W(t), a("pointHover", null, null);
|
|
533
529
|
return;
|
|
534
530
|
}
|
|
535
531
|
fe(t, n.points.map((e) => e.id)), a("pointHover", n, {
|
|
@@ -537,10 +533,10 @@ var dt = /*@__PURE__*/ I({
|
|
|
537
533
|
y: e.point.y
|
|
538
534
|
});
|
|
539
535
|
}
|
|
540
|
-
function
|
|
536
|
+
function ge(e) {
|
|
541
537
|
let t = d.value;
|
|
542
|
-
if (!t || !
|
|
543
|
-
let n =
|
|
538
|
+
if (!t || !M(t)) return;
|
|
539
|
+
let n = pe(t, e.point);
|
|
544
540
|
if (!n?.points.length) {
|
|
545
541
|
a("pointSelect", null);
|
|
546
542
|
return;
|
|
@@ -551,10 +547,10 @@ var dt = /*@__PURE__*/ I({
|
|
|
551
547
|
lat: e.lngLat.lat
|
|
552
548
|
});
|
|
553
549
|
}
|
|
554
|
-
function
|
|
550
|
+
function Y() {
|
|
555
551
|
let e = l.value;
|
|
556
|
-
if (!
|
|
557
|
-
let t =
|
|
552
|
+
if (!b || !e || d.value || e.clientWidth === 0 || e.clientHeight === 0) return;
|
|
553
|
+
let t = k(), n = new b.Map({
|
|
558
554
|
container: e,
|
|
559
555
|
style: g(i.basemap),
|
|
560
556
|
center: t.center,
|
|
@@ -569,51 +565,51 @@ var dt = /*@__PURE__*/ I({
|
|
|
569
565
|
} : { url: e }
|
|
570
566
|
});
|
|
571
567
|
n.on("load", () => {
|
|
572
|
-
n.setMaxBounds(null), n.resize(),
|
|
573
|
-
}), n.on("moveend",
|
|
568
|
+
n.setMaxBounds(null), n.resize(), H(n), K(n, i.selectedId ?? null), A();
|
|
569
|
+
}), n.on("moveend", A), n.on("sourcedata", z), n.on("error", B), n.on("mousemove", (e) => J(e)), n.on("dragstart", () => {
|
|
574
570
|
he = !0, me();
|
|
575
571
|
}), n.on("dragend", () => {
|
|
576
572
|
he = !1;
|
|
577
|
-
}), n.on("click", (e) =>
|
|
573
|
+
}), n.on("click", (e) => ge(e)), d.value = n;
|
|
578
574
|
}
|
|
579
|
-
async function
|
|
575
|
+
async function _e() {
|
|
580
576
|
try {
|
|
581
|
-
|
|
577
|
+
b = await ee();
|
|
582
578
|
} catch (e) {
|
|
583
|
-
console.error(e), h.value =
|
|
579
|
+
console.error(e), h.value = D;
|
|
584
580
|
return;
|
|
585
581
|
}
|
|
586
|
-
!
|
|
587
|
-
d.value ? d.value.resize() :
|
|
588
|
-
}),
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
let t = d.value, n = t?.getSource(
|
|
592
|
-
t && n && (
|
|
593
|
-
}),
|
|
582
|
+
!x && l.value && (y = new ResizeObserver(() => {
|
|
583
|
+
d.value ? d.value.resize() : Y();
|
|
584
|
+
}), y.observe(l.value));
|
|
585
|
+
}
|
|
586
|
+
G(() => [Ie(i.filters, i.visibleStatuses), Array.from(i.visibleStatuses).sort().join(",")], ([e]) => {
|
|
587
|
+
let t = d.value, n = t?.getSource(Je);
|
|
588
|
+
t && n && (W(t), t.getCanvas().style.cursor = "", a("pointHover", null, null), n.setTiles([e]));
|
|
589
|
+
}), G(() => [i.applicationsVisible, i.applicationsOpacity], () => {
|
|
594
590
|
let e = d.value;
|
|
595
|
-
e && (i.applicationsVisible || (
|
|
596
|
-
}),
|
|
591
|
+
e && (i.applicationsVisible || (W(e), e.getCanvas().style.cursor = "", a("pointHover", null, null)), N(e));
|
|
592
|
+
}), G(() => i.overlays, () => {
|
|
597
593
|
let e = d.value;
|
|
598
594
|
e?.isStyleLoaded() && ce(e);
|
|
599
|
-
}),
|
|
595
|
+
}), G(() => i.activeOverlayIds, () => {
|
|
600
596
|
let e = d.value;
|
|
601
|
-
e?.isStyleLoaded() &&
|
|
602
|
-
}),
|
|
597
|
+
e?.isStyleLoaded() && ne(e, i.overlays, i.activeOverlayIds);
|
|
598
|
+
}), G(() => i.overlayOpacities, () => {
|
|
603
599
|
let e = d.value;
|
|
604
|
-
e?.isStyleLoaded() &&
|
|
605
|
-
}, { deep: !0 }),
|
|
600
|
+
e?.isStyleLoaded() && L(e);
|
|
601
|
+
}, { deep: !0 }), G(() => i.basemap, (e) => {
|
|
606
602
|
let t = d.value;
|
|
607
603
|
if (!t) return;
|
|
608
|
-
let n = () =>
|
|
604
|
+
let n = () => P(t, e);
|
|
609
605
|
t.isStyleLoaded() ? n() : t.once("style.load", n);
|
|
610
|
-
}),
|
|
606
|
+
}), G(() => i.selectedId ?? null, (e) => {
|
|
611
607
|
let t = d.value;
|
|
612
|
-
t?.getSource("map-applications") &&
|
|
613
|
-
}),
|
|
608
|
+
t?.getSource("map-applications") && K(t, e);
|
|
609
|
+
}), G(() => [c.value.center, c.value.zoom].join("|"), () => {
|
|
614
610
|
let e = d.value;
|
|
615
611
|
if (!e?.isStyleLoaded()) return;
|
|
616
|
-
let t =
|
|
612
|
+
let t = k();
|
|
617
613
|
e.flyTo({
|
|
618
614
|
center: t.center,
|
|
619
615
|
zoom: t.zoom,
|
|
@@ -622,14 +618,14 @@ var dt = /*@__PURE__*/ I({
|
|
|
622
618
|
duration: 500
|
|
623
619
|
});
|
|
624
620
|
});
|
|
625
|
-
function
|
|
621
|
+
function X() {
|
|
626
622
|
d.value?.zoomIn({ duration: 250 });
|
|
627
623
|
}
|
|
628
|
-
function
|
|
624
|
+
function Z() {
|
|
629
625
|
d.value?.zoomOut({ duration: 250 });
|
|
630
626
|
}
|
|
631
|
-
function
|
|
632
|
-
let e =
|
|
627
|
+
function Q() {
|
|
628
|
+
let e = k();
|
|
633
629
|
d.value?.flyTo({
|
|
634
630
|
center: e.center,
|
|
635
631
|
zoom: e.zoom,
|
|
@@ -638,11 +634,11 @@ var dt = /*@__PURE__*/ I({
|
|
|
638
634
|
duration: 500
|
|
639
635
|
});
|
|
640
636
|
}
|
|
641
|
-
function
|
|
637
|
+
function ve(e) {
|
|
642
638
|
let t = d.value;
|
|
643
639
|
return !!(t?.isStyleLoaded() && t.isSourceLoaded(e));
|
|
644
640
|
}
|
|
645
|
-
function
|
|
641
|
+
function $(e) {
|
|
646
642
|
let t = d.value, n = i.overlays.find((t) => t.id === e);
|
|
647
643
|
if (!t || !n || !u(n)) return;
|
|
648
644
|
let r = t.getZoom(), a = m(n), o = n.kind === "raster" || n.kind === "vector" ? n.maxzoom ?? 18 : 18, s = a != null && r < a ? a : Math.min(o, r + 1), c = t.getCenter();
|
|
@@ -652,34 +648,34 @@ var dt = /*@__PURE__*/ I({
|
|
|
652
648
|
duration: 600
|
|
653
649
|
});
|
|
654
650
|
}
|
|
655
|
-
function
|
|
651
|
+
function ye(e) {
|
|
656
652
|
let t = oe(e), n = d.value;
|
|
657
653
|
t && n && n.fitBounds(se(t), {
|
|
658
654
|
...r,
|
|
659
655
|
duration: 500
|
|
660
656
|
});
|
|
661
657
|
}
|
|
662
|
-
function
|
|
658
|
+
function be(e) {
|
|
663
659
|
let t = d.value, n = i.overlays.find((t) => t.id === e);
|
|
664
660
|
if (!t || !n) return;
|
|
665
661
|
let r = () => {
|
|
666
|
-
|
|
662
|
+
R.delete(e), T(t, n), O(t, n, i.activeOverlayIds.includes(e), Xe), te(t, n, I(n));
|
|
667
663
|
};
|
|
668
664
|
t.isStyleLoaded() ? r() : t.once("load", r);
|
|
669
665
|
}
|
|
670
666
|
t({
|
|
671
|
-
zoomIn:
|
|
672
|
-
zoomOut:
|
|
673
|
-
resetView:
|
|
674
|
-
setView:
|
|
675
|
-
overlaySourceReady:
|
|
676
|
-
zoomToOverlay:
|
|
677
|
-
reloadOverlay:
|
|
678
|
-
fitApplicationGeometry:
|
|
679
|
-
}), le(
|
|
680
|
-
|
|
667
|
+
zoomIn: X,
|
|
668
|
+
zoomOut: Z,
|
|
669
|
+
resetView: Q,
|
|
670
|
+
setView: j,
|
|
671
|
+
overlaySourceReady: ve,
|
|
672
|
+
zoomToOverlay: $,
|
|
673
|
+
reloadOverlay: be,
|
|
674
|
+
fitApplicationGeometry: ye
|
|
675
|
+
}), le(_e), ue(() => {
|
|
676
|
+
x = !0, y?.disconnect(), d.value?.remove(), d.value = null;
|
|
681
677
|
});
|
|
682
|
-
let
|
|
678
|
+
let xe = {
|
|
683
679
|
FIT_APPLICATION_OPTIONS: r,
|
|
684
680
|
props: i,
|
|
685
681
|
emit: a,
|
|
@@ -690,53 +686,53 @@ var dt = /*@__PURE__*/ I({
|
|
|
690
686
|
mapRef: d,
|
|
691
687
|
selectedFeatureId: f,
|
|
692
688
|
mapLoadError: h,
|
|
693
|
-
hoveredFeatureIds:
|
|
689
|
+
hoveredFeatureIds: v,
|
|
694
690
|
get resizeObserver() {
|
|
695
|
-
return
|
|
691
|
+
return y;
|
|
696
692
|
},
|
|
697
693
|
set resizeObserver(e) {
|
|
698
|
-
|
|
694
|
+
y = e;
|
|
699
695
|
},
|
|
700
696
|
get ml() {
|
|
701
|
-
return
|
|
697
|
+
return b;
|
|
702
698
|
},
|
|
703
699
|
set ml(e) {
|
|
704
|
-
|
|
700
|
+
b = e;
|
|
705
701
|
},
|
|
706
702
|
get disposed() {
|
|
707
|
-
return
|
|
703
|
+
return x;
|
|
708
704
|
},
|
|
709
705
|
set disposed(e) {
|
|
710
|
-
|
|
706
|
+
x = e;
|
|
711
707
|
},
|
|
712
708
|
get suppressViewEmit() {
|
|
713
|
-
return
|
|
709
|
+
return S;
|
|
714
710
|
},
|
|
715
711
|
set suppressViewEmit(e) {
|
|
716
|
-
|
|
712
|
+
S = e;
|
|
717
713
|
},
|
|
718
|
-
interactiveLayers:
|
|
714
|
+
interactiveLayers: C,
|
|
719
715
|
clampZoom: ie,
|
|
720
|
-
getViewOptions:
|
|
721
|
-
emitCurrentView:
|
|
722
|
-
setView:
|
|
723
|
-
applicationsLayersReady:
|
|
724
|
-
applyApplicationsAppearance:
|
|
725
|
-
replaceBasemap:
|
|
726
|
-
ensureApplicationsLayers:
|
|
727
|
-
overlayPercent:
|
|
728
|
-
paintOverlayOpacities:
|
|
716
|
+
getViewOptions: k,
|
|
717
|
+
emitCurrentView: A,
|
|
718
|
+
setView: j,
|
|
719
|
+
applicationsLayersReady: M,
|
|
720
|
+
applyApplicationsAppearance: N,
|
|
721
|
+
replaceBasemap: P,
|
|
722
|
+
ensureApplicationsLayers: F,
|
|
723
|
+
overlayPercent: I,
|
|
724
|
+
paintOverlayOpacities: L,
|
|
729
725
|
ensureOverlayLayers: ce,
|
|
730
|
-
readyOverlaySources:
|
|
731
|
-
handleSourceData:
|
|
732
|
-
handleOverlayError:
|
|
733
|
-
ensureMapLayers:
|
|
734
|
-
featureTarget:
|
|
735
|
-
clearHoverState:
|
|
726
|
+
readyOverlaySources: R,
|
|
727
|
+
handleSourceData: z,
|
|
728
|
+
handleOverlayError: B,
|
|
729
|
+
ensureMapLayers: H,
|
|
730
|
+
featureTarget: U,
|
|
731
|
+
clearHoverState: W,
|
|
736
732
|
setHoveredFeatures: fe,
|
|
737
|
-
applySelection:
|
|
738
|
-
propertyText:
|
|
739
|
-
hoverPayloadAt:
|
|
733
|
+
applySelection: K,
|
|
734
|
+
propertyText: q,
|
|
735
|
+
hoverPayloadAt: pe,
|
|
740
736
|
clearPointHover: me,
|
|
741
737
|
get mapDragging() {
|
|
742
738
|
return he;
|
|
@@ -744,42 +740,42 @@ var dt = /*@__PURE__*/ I({
|
|
|
744
740
|
set mapDragging(e) {
|
|
745
741
|
he = e;
|
|
746
742
|
},
|
|
747
|
-
handleMouseMove:
|
|
748
|
-
handleClick:
|
|
749
|
-
initMap:
|
|
750
|
-
setupMap:
|
|
751
|
-
zoomIn:
|
|
752
|
-
zoomOut:
|
|
753
|
-
resetView:
|
|
754
|
-
overlaySourceReady:
|
|
755
|
-
zoomToOverlay:
|
|
756
|
-
fitApplicationGeometry:
|
|
757
|
-
reloadOverlay:
|
|
743
|
+
handleMouseMove: J,
|
|
744
|
+
handleClick: ge,
|
|
745
|
+
initMap: Y,
|
|
746
|
+
setupMap: _e,
|
|
747
|
+
zoomIn: X,
|
|
748
|
+
zoomOut: Z,
|
|
749
|
+
resetView: Q,
|
|
750
|
+
overlaySourceReady: ve,
|
|
751
|
+
zoomToOverlay: $,
|
|
752
|
+
fitApplicationGeometry: ye,
|
|
753
|
+
reloadOverlay: be
|
|
758
754
|
};
|
|
759
|
-
return Object.defineProperty(
|
|
755
|
+
return Object.defineProperty(xe, "__isScriptSetup", {
|
|
760
756
|
enumerable: !1,
|
|
761
757
|
value: !0
|
|
762
|
-
}),
|
|
758
|
+
}), xe;
|
|
763
759
|
}
|
|
764
|
-
}),
|
|
760
|
+
}), dt = {
|
|
765
761
|
key: 0,
|
|
766
762
|
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
767
763
|
};
|
|
768
|
-
function
|
|
769
|
-
return
|
|
764
|
+
function ft(e, t, n, r, i, a) {
|
|
765
|
+
return B(), N(k, null, [P("div", {
|
|
770
766
|
ref: "containerRef",
|
|
771
767
|
class: "absolute inset-0 h-full w-full",
|
|
772
768
|
onMouseleave: r.clearPointHover
|
|
773
|
-
}, null, 544), r.mapLoadError ? (
|
|
769
|
+
}, null, 544), r.mapLoadError ? (B(), N("p", dt, U(r.mapLoadError), 1)) : M("", !0)], 64);
|
|
774
770
|
}
|
|
775
|
-
var
|
|
776
|
-
["render",
|
|
771
|
+
var pt = /*#__PURE__*/ e(ut, [
|
|
772
|
+
["render", ft],
|
|
777
773
|
["__scopeId", "data-v-ea235a7a"],
|
|
778
774
|
["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapView.vue"]
|
|
779
775
|
]);
|
|
780
776
|
//#endregion
|
|
781
777
|
//#region admin/src/api/suggest.ts
|
|
782
|
-
async function
|
|
778
|
+
async function mt(e, t, i) {
|
|
783
779
|
let a = new URLSearchParams();
|
|
784
780
|
if (a.set("limit", String(i?.limit ?? 20)), i?.search && a.set("search", i.search), i?.filter) for (let [e, t] of Object.entries(i.filter)) a.set(`filter[${e}]`, String(t));
|
|
785
781
|
let o = await fetch(r(`/api/suggest/${encodeURIComponent(e)}/${encodeURIComponent(t)}?${a}`), { credentials: "include" });
|
|
@@ -788,7 +784,7 @@ async function ht(e, t, i) {
|
|
|
788
784
|
}
|
|
789
785
|
//#endregion
|
|
790
786
|
//#region admin/src/pages/map/components/MapFilterSelect.vue?vue&type=script&setup=true&lang.ts
|
|
791
|
-
var
|
|
787
|
+
var ht = 4, gt = 208, _t = /*@__PURE__*/ L({
|
|
792
788
|
__name: "MapFilterSelect",
|
|
793
789
|
props: {
|
|
794
790
|
modelValue: {
|
|
@@ -807,16 +803,16 @@ var gt = 4, _t = 208, vt = /*@__PURE__*/ I({
|
|
|
807
803
|
emits: ["update:modelValue"],
|
|
808
804
|
setup(e, { expose: t, emit: n }) {
|
|
809
805
|
t();
|
|
810
|
-
let r = e, i = n, a =
|
|
806
|
+
let r = e, i = n, a = V(!1), o = V(null), s = W("buttonRef"), l = W("menuRef"), u = A(() => r.modelValue.length ? r.modelValue.map((e) => r.options.find((t) => t.value === e)?.label ?? e).join(", ") : "Усі значення");
|
|
811
807
|
function d() {
|
|
812
808
|
let e = s.value?.getBoundingClientRect();
|
|
813
809
|
if (!e) return;
|
|
814
|
-
let t = window.innerHeight - e.bottom -
|
|
810
|
+
let t = window.innerHeight - e.bottom - ht - 8;
|
|
815
811
|
o.value = {
|
|
816
|
-
top: `${e.bottom +
|
|
812
|
+
top: `${e.bottom + ht}px`,
|
|
817
813
|
left: `${e.left}px`,
|
|
818
814
|
width: `${e.width}px`,
|
|
819
|
-
maxHeight: `${Math.max(Math.min(
|
|
815
|
+
maxHeight: `${Math.max(Math.min(gt, t), 80)}px`
|
|
820
816
|
};
|
|
821
817
|
}
|
|
822
818
|
function f(e) {
|
|
@@ -837,7 +833,7 @@ var gt = 4, _t = 208, vt = /*@__PURE__*/ I({
|
|
|
837
833
|
let t = new Set(r.modelValue);
|
|
838
834
|
t.has(e) ? t.delete(e) : t.add(e), i("update:modelValue", [...t]);
|
|
839
835
|
}
|
|
840
|
-
|
|
836
|
+
G(a, async (e) => {
|
|
841
837
|
if (m(), !e) {
|
|
842
838
|
o.value = null;
|
|
843
839
|
return;
|
|
@@ -847,8 +843,8 @@ var gt = 4, _t = 208, vt = /*@__PURE__*/ I({
|
|
|
847
843
|
let g = {
|
|
848
844
|
props: r,
|
|
849
845
|
emit: i,
|
|
850
|
-
MENU_GAP:
|
|
851
|
-
MENU_MAX_HEIGHT:
|
|
846
|
+
MENU_GAP: ht,
|
|
847
|
+
MENU_MAX_HEIGHT: gt,
|
|
852
848
|
open: a,
|
|
853
849
|
menuStyle: o,
|
|
854
850
|
buttonRef: s,
|
|
@@ -861,10 +857,10 @@ var gt = 4, _t = 208, vt = /*@__PURE__*/ I({
|
|
|
861
857
|
toggle: h,
|
|
862
858
|
SurveyorTeleport: c,
|
|
863
859
|
get Check() {
|
|
864
|
-
return
|
|
860
|
+
return Y;
|
|
865
861
|
},
|
|
866
862
|
get ChevronDown() {
|
|
867
|
-
return
|
|
863
|
+
return _e;
|
|
868
864
|
}
|
|
869
865
|
};
|
|
870
866
|
return Object.defineProperty(g, "__isScriptSetup", {
|
|
@@ -872,18 +868,18 @@ var gt = 4, _t = 208, vt = /*@__PURE__*/ I({
|
|
|
872
868
|
value: !0
|
|
873
869
|
}), g;
|
|
874
870
|
}
|
|
875
|
-
}),
|
|
876
|
-
function
|
|
877
|
-
return
|
|
871
|
+
}), vt = ["aria-expanded", "aria-label"], yt = { class: "min-w-0 truncate" }, bt = ["aria-label"], xt = ["aria-selected"], St = ["aria-selected", "onClick"], Ct = { class: "min-w-0 truncate" };
|
|
872
|
+
function wt(e, t, n, r, i, a) {
|
|
873
|
+
return B(), N(k, null, [P("button", {
|
|
878
874
|
ref: "buttonRef",
|
|
879
875
|
type: "button",
|
|
880
876
|
"data-map-filter-ui": "",
|
|
881
877
|
"aria-expanded": r.open,
|
|
882
878
|
"aria-label": n.label,
|
|
883
|
-
class:
|
|
879
|
+
class: R(["flex h-9 w-full items-center justify-between gap-2 rounded-lg border bg-white px-2.5 text-left text-xs text-slate-700 outline-none transition-colors focus:border-brand-400 focus:ring-1 focus:ring-brand-100", r.open ? "border-brand-400 ring-1 ring-brand-100" : "border-slate-200"]),
|
|
884
880
|
onClick: t[0] ||= (e) => r.open = !r.open
|
|
885
|
-
}, [
|
|
886
|
-
default:
|
|
881
|
+
}, [P("span", yt, U(r.selectedLabel), 1), I(r.ChevronDown, { class: R(["h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform", r.open ? "rotate-180" : ""]) }, null, 8, ["class"])], 10, vt), I(r.SurveyorTeleport, null, {
|
|
882
|
+
default: K(() => [r.open && r.menuStyle ? (B(), N("div", {
|
|
887
883
|
key: 0,
|
|
888
884
|
ref: "menuRef",
|
|
889
885
|
"data-map-filter-ui": "",
|
|
@@ -891,31 +887,31 @@ function Tt(e, t, n, r, i, a) {
|
|
|
891
887
|
"aria-multiselectable": "true",
|
|
892
888
|
"aria-label": n.label,
|
|
893
889
|
class: "fixed z-[80] overflow-y-auto rounded-lg border border-slate-200 bg-white py-1 shadow-xl",
|
|
894
|
-
style:
|
|
895
|
-
}, [
|
|
890
|
+
style: z(r.menuStyle)
|
|
891
|
+
}, [P("button", {
|
|
896
892
|
type: "button",
|
|
897
893
|
role: "option",
|
|
898
894
|
"aria-selected": !n.modelValue.length,
|
|
899
|
-
class:
|
|
895
|
+
class: R(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.length ? "text-slate-700" : "bg-brand-50 font-medium text-brand-700"]),
|
|
900
896
|
onClick: t[1] ||= (e) => r.toggle("")
|
|
901
|
-
}, [
|
|
897
|
+
}, [P("span", { class: R(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.length ? "border-slate-300 bg-white" : "border-brand-600 bg-brand-600 text-white"]) }, [n.modelValue.length ? M("", !0) : (B(), j(r.Check, {
|
|
902
898
|
key: 0,
|
|
903
899
|
class: "h-2.5 w-2.5"
|
|
904
|
-
}))], 2), t[2] ||=
|
|
900
|
+
}))], 2), t[2] ||= P("span", { class: "min-w-0 truncate" }, "Усі значення", -1)], 10, xt), (B(!0), N(k, null, H(n.options, (e) => (B(), N("button", {
|
|
905
901
|
key: e.value,
|
|
906
902
|
type: "button",
|
|
907
903
|
role: "option",
|
|
908
904
|
"aria-selected": n.modelValue.includes(e.value),
|
|
909
|
-
class:
|
|
905
|
+
class: R(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.includes(e.value) ? "bg-brand-50 font-medium text-brand-700" : "text-slate-700"]),
|
|
910
906
|
onClick: (t) => r.toggle(e.value)
|
|
911
|
-
}, [
|
|
907
|
+
}, [P("span", { class: R(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.includes(e.value) ? "border-brand-600 bg-brand-600 text-white" : "border-slate-300 bg-white"]) }, [n.modelValue.includes(e.value) ? (B(), j(r.Check, {
|
|
912
908
|
key: 0,
|
|
913
909
|
class: "h-2.5 w-2.5"
|
|
914
|
-
})) :
|
|
910
|
+
})) : M("", !0)], 2), P("span", Ct, U(e.label), 1)], 10, St))), 128))], 12, bt)) : M("", !0)]),
|
|
915
911
|
_: 1
|
|
916
912
|
})], 64);
|
|
917
913
|
}
|
|
918
|
-
var
|
|
914
|
+
var Tt = /*#__PURE__*/ e(_t, [["render", wt], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapFilterSelect.vue"]]), Et = 4, Dt = 240, Ot = /*@__PURE__*/ L({
|
|
919
915
|
__name: "MapFilterSuggest",
|
|
920
916
|
props: {
|
|
921
917
|
modelValue: {
|
|
@@ -948,16 +944,16 @@ var Et = /*#__PURE__*/ e(vt, [["render", Tt], ["__file", "C:/softpro/surveyor/ad
|
|
|
948
944
|
emits: ["update:modelValue", "update:labels"],
|
|
949
945
|
setup(e, { expose: t, emit: n }) {
|
|
950
946
|
t();
|
|
951
|
-
let r = e, i = n, a =
|
|
947
|
+
let r = e, i = n, a = V(!1), o = V(""), s = V(!1), l = V([]), u = V(null), d = W("buttonRef"), f = W("menuRef"), p = W("inputRef"), m, h = 0, g = A(() => r.modelValue.length ? r.modelValue.map((e) => r.labels[e] ?? e).join(", ") : r.placeholder);
|
|
952
948
|
function _() {
|
|
953
949
|
let e = d.value?.getBoundingClientRect();
|
|
954
950
|
if (!e) return;
|
|
955
|
-
let t = window.innerHeight - e.bottom -
|
|
951
|
+
let t = window.innerHeight - e.bottom - Et - 8;
|
|
956
952
|
u.value = {
|
|
957
|
-
top: `${e.bottom +
|
|
953
|
+
top: `${e.bottom + Et}px`,
|
|
958
954
|
left: `${e.left}px`,
|
|
959
955
|
width: `${e.width}px`,
|
|
960
|
-
maxHeight: `${Math.max(Math.min(
|
|
956
|
+
maxHeight: `${Math.max(Math.min(Dt, t), 120)}px`
|
|
961
957
|
};
|
|
962
958
|
}
|
|
963
959
|
function v(e) {
|
|
@@ -974,7 +970,7 @@ var Et = /*#__PURE__*/ e(vt, [["render", Tt], ["__file", "C:/softpro/surveyor/ad
|
|
|
974
970
|
let t = ++h;
|
|
975
971
|
s.value = !0;
|
|
976
972
|
try {
|
|
977
|
-
let n = await
|
|
973
|
+
let n = await mt(r.resource, r.field, {
|
|
978
974
|
search: e.trim() || void 0,
|
|
979
975
|
limit: 20
|
|
980
976
|
});
|
|
@@ -992,19 +988,19 @@ var Et = /*#__PURE__*/ e(vt, [["render", Tt], ["__file", "C:/softpro/surveyor/ad
|
|
|
992
988
|
x(e);
|
|
993
989
|
}, 280);
|
|
994
990
|
}
|
|
995
|
-
function
|
|
991
|
+
function C() {
|
|
996
992
|
i("update:modelValue", []), i("update:labels", {});
|
|
997
993
|
}
|
|
998
|
-
function C(e) {
|
|
999
|
-
e.stopPropagation(), ee();
|
|
1000
|
-
}
|
|
1001
994
|
function w(e) {
|
|
995
|
+
e.stopPropagation(), C();
|
|
996
|
+
}
|
|
997
|
+
function T(e) {
|
|
1002
998
|
let t = new Set(r.modelValue), n = { ...r.labels };
|
|
1003
999
|
t.has(e.id) ? (t.delete(e.id), delete n[e.id]) : (t.add(e.id), n[e.id] = e.text), i("update:modelValue", [...t]), i("update:labels", n);
|
|
1004
1000
|
}
|
|
1005
|
-
|
|
1001
|
+
G(o, (e) => {
|
|
1006
1002
|
a.value && S(e);
|
|
1007
|
-
}),
|
|
1003
|
+
}), G(a, async (e) => {
|
|
1008
1004
|
if (b(), clearTimeout(m), !e) {
|
|
1009
1005
|
u.value = null, o.value = "";
|
|
1010
1006
|
return;
|
|
@@ -1013,11 +1009,11 @@ var Et = /*#__PURE__*/ e(vt, [["render", Tt], ["__file", "C:/softpro/surveyor/ad
|
|
|
1013
1009
|
}), ue(() => {
|
|
1014
1010
|
b(), clearTimeout(m);
|
|
1015
1011
|
});
|
|
1016
|
-
let
|
|
1012
|
+
let ee = {
|
|
1017
1013
|
props: r,
|
|
1018
1014
|
emit: i,
|
|
1019
|
-
MENU_GAP:
|
|
1020
|
-
MENU_MAX_HEIGHT:
|
|
1015
|
+
MENU_GAP: Et,
|
|
1016
|
+
MENU_MAX_HEIGHT: Dt,
|
|
1021
1017
|
open: a,
|
|
1022
1018
|
query: o,
|
|
1023
1019
|
loading: s,
|
|
@@ -1045,53 +1041,53 @@ var Et = /*#__PURE__*/ e(vt, [["render", Tt], ["__file", "C:/softpro/surveyor/ad
|
|
|
1045
1041
|
detachListeners: b,
|
|
1046
1042
|
loadOptions: x,
|
|
1047
1043
|
scheduleSearch: S,
|
|
1048
|
-
clearAll:
|
|
1049
|
-
clearSelection:
|
|
1050
|
-
toggle:
|
|
1044
|
+
clearAll: C,
|
|
1045
|
+
clearSelection: w,
|
|
1046
|
+
toggle: T,
|
|
1051
1047
|
SurveyorTeleport: c,
|
|
1052
1048
|
get Check() {
|
|
1053
|
-
return
|
|
1049
|
+
return Y;
|
|
1054
1050
|
},
|
|
1055
1051
|
get ChevronDown() {
|
|
1056
|
-
return
|
|
1052
|
+
return _e;
|
|
1057
1053
|
},
|
|
1058
1054
|
get Search() {
|
|
1059
|
-
return
|
|
1055
|
+
return Te;
|
|
1060
1056
|
},
|
|
1061
1057
|
get X() {
|
|
1062
|
-
return
|
|
1058
|
+
return De;
|
|
1063
1059
|
}
|
|
1064
1060
|
};
|
|
1065
|
-
return Object.defineProperty(
|
|
1061
|
+
return Object.defineProperty(ee, "__isScriptSetup", {
|
|
1066
1062
|
enumerable: !1,
|
|
1067
1063
|
value: !0
|
|
1068
|
-
}),
|
|
1064
|
+
}), ee;
|
|
1069
1065
|
}
|
|
1070
|
-
}),
|
|
1066
|
+
}), kt = { class: "relative" }, At = ["aria-expanded", "aria-label"], jt = { class: "flex shrink-0 items-center gap-1" }, Mt = ["aria-label"], Nt = ["aria-label"], Pt = { class: "border-b border-slate-100 p-2" }, Ft = { class: "relative" }, It = ["aria-selected"], Lt = {
|
|
1071
1067
|
key: 0,
|
|
1072
1068
|
class: "px-2.5 py-3 text-center text-xs text-slate-400"
|
|
1073
|
-
},
|
|
1069
|
+
}, Rt = {
|
|
1074
1070
|
key: 1,
|
|
1075
1071
|
class: "px-2.5 py-3 text-center text-xs text-slate-400"
|
|
1076
|
-
},
|
|
1077
|
-
function
|
|
1078
|
-
return
|
|
1072
|
+
}, zt = ["aria-selected", "onClick"], Bt = { class: "min-w-0 truncate" };
|
|
1073
|
+
function Vt(e, t, n, r, i, a) {
|
|
1074
|
+
return B(), N("div", kt, [P("button", {
|
|
1079
1075
|
ref: "buttonRef",
|
|
1080
1076
|
type: "button",
|
|
1081
1077
|
"data-map-filter-ui": "",
|
|
1082
1078
|
"aria-expanded": r.open,
|
|
1083
1079
|
"aria-label": n.label,
|
|
1084
|
-
class:
|
|
1080
|
+
class: R(["flex h-9 w-full items-center justify-between gap-2 rounded-lg border bg-white px-2.5 text-left text-xs outline-none transition-colors focus:border-brand-400 focus:ring-1 focus:ring-brand-100", r.open || n.modelValue.length ? "border-brand-400 text-slate-700 ring-1 ring-brand-100" : "border-slate-200 text-slate-700"]),
|
|
1085
1081
|
onClick: t[0] ||= (e) => r.open = !r.open
|
|
1086
|
-
}, [
|
|
1082
|
+
}, [P("span", { class: R(["min-w-0 truncate", n.modelValue.length ? "text-slate-700" : "text-slate-400"]) }, U(r.selectedLabel), 3), P("span", jt, [n.modelValue.length ? (B(), N("span", {
|
|
1087
1083
|
key: 0,
|
|
1088
1084
|
role: "button",
|
|
1089
1085
|
tabindex: "-1",
|
|
1090
1086
|
class: "rounded p-0.5 text-slate-400 hover:bg-slate-100 hover:text-slate-600",
|
|
1091
1087
|
"aria-label": `Очистити ${n.label}`,
|
|
1092
1088
|
onClick: r.clearSelection
|
|
1093
|
-
}, [
|
|
1094
|
-
default:
|
|
1089
|
+
}, [I(r.X, { class: "h-3 w-3" })], 8, Mt)) : M("", !0), I(r.ChevronDown, { class: R(["h-3.5 w-3.5 text-slate-400 transition-transform", r.open ? "rotate-180" : ""]) }, null, 8, ["class"])])], 10, At), I(r.SurveyorTeleport, null, {
|
|
1090
|
+
default: K(() => [r.open && r.menuStyle ? (B(), N("div", {
|
|
1095
1091
|
key: 0,
|
|
1096
1092
|
ref: "menuRef",
|
|
1097
1093
|
"data-map-filter-ui": "",
|
|
@@ -1099,45 +1095,45 @@ function Ht(e, t, n, r, i, a) {
|
|
|
1099
1095
|
"aria-multiselectable": "true",
|
|
1100
1096
|
"aria-label": n.label,
|
|
1101
1097
|
class: "fixed z-[80] overflow-hidden rounded-lg border border-slate-200 bg-white shadow-xl",
|
|
1102
|
-
style:
|
|
1103
|
-
}, [
|
|
1098
|
+
style: z(r.menuStyle)
|
|
1099
|
+
}, [P("div", Pt, [P("div", Ft, [I(r.Search, { class: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }), q(P("input", {
|
|
1104
1100
|
ref: "inputRef",
|
|
1105
1101
|
"onUpdate:modelValue": t[1] ||= (e) => r.query = e,
|
|
1106
1102
|
type: "text",
|
|
1107
1103
|
placeholder: "Пошук...",
|
|
1108
1104
|
class: "h-8 w-full rounded-md border border-slate-200 py-1.5 pl-8 pr-2 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100",
|
|
1109
|
-
onClick: t[2] ||=
|
|
1110
|
-
}, null, 512), [[fe, r.query]])])]),
|
|
1105
|
+
onClick: t[2] ||= pe(() => {}, ["stop"])
|
|
1106
|
+
}, null, 512), [[fe, r.query]])])]), P("div", {
|
|
1111
1107
|
class: "overflow-y-auto",
|
|
1112
|
-
style:
|
|
1108
|
+
style: z({ maxHeight: `calc(${r.menuStyle.maxHeight} - 48px)` })
|
|
1113
1109
|
}, [
|
|
1114
|
-
|
|
1110
|
+
P("button", {
|
|
1115
1111
|
type: "button",
|
|
1116
1112
|
role: "option",
|
|
1117
1113
|
"aria-selected": !n.modelValue.length,
|
|
1118
|
-
class:
|
|
1114
|
+
class: R(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.length ? "text-slate-700" : "bg-brand-50 font-medium text-brand-700"]),
|
|
1119
1115
|
onClick: r.clearAll
|
|
1120
|
-
}, [
|
|
1116
|
+
}, [P("span", { class: R(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.length ? "border-slate-300 bg-white" : "border-brand-600 bg-brand-600 text-white"]) }, [n.modelValue.length ? M("", !0) : (B(), j(r.Check, {
|
|
1121
1117
|
key: 0,
|
|
1122
1118
|
class: "h-2.5 w-2.5"
|
|
1123
|
-
}))], 2), t[3] ||=
|
|
1124
|
-
r.loading && r.options.length === 0 ? (
|
|
1125
|
-
(
|
|
1119
|
+
}))], 2), t[3] ||= P("span", { class: "min-w-0 truncate" }, "Усі значення", -1)], 10, It),
|
|
1120
|
+
r.loading && r.options.length === 0 ? (B(), N("p", Lt, " Завантаження… ")) : !r.loading && r.options.length === 0 ? (B(), N("p", Rt, " Нічого не знайдено ")) : M("", !0),
|
|
1121
|
+
(B(!0), N(k, null, H(r.options, (e) => (B(), N("button", {
|
|
1126
1122
|
key: e.id,
|
|
1127
1123
|
type: "button",
|
|
1128
1124
|
role: "option",
|
|
1129
1125
|
"aria-selected": n.modelValue.includes(e.id),
|
|
1130
|
-
class:
|
|
1126
|
+
class: R(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.includes(e.id) ? "bg-brand-50 font-medium text-brand-700" : "text-slate-700"]),
|
|
1131
1127
|
onClick: (t) => r.toggle(e)
|
|
1132
|
-
}, [
|
|
1128
|
+
}, [P("span", { class: R(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.includes(e.id) ? "border-brand-600 bg-brand-600 text-white" : "border-slate-300 bg-white"]) }, [n.modelValue.includes(e.id) ? (B(), j(r.Check, {
|
|
1133
1129
|
key: 0,
|
|
1134
1130
|
class: "h-2.5 w-2.5"
|
|
1135
|
-
})) :
|
|
1136
|
-
], 4)], 12,
|
|
1131
|
+
})) : M("", !0)], 2), P("span", Bt, U(e.text), 1)], 10, zt))), 128))
|
|
1132
|
+
], 4)], 12, Nt)) : M("", !0)]),
|
|
1137
1133
|
_: 1
|
|
1138
1134
|
})]);
|
|
1139
1135
|
}
|
|
1140
|
-
var
|
|
1136
|
+
var Ht = /*#__PURE__*/ e(Ot, [["render", Vt], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapFilterSuggest.vue"]]), Ut = 208, Wt = 182, Gt = 12, Kt = /*@__PURE__*/ L({
|
|
1141
1137
|
__name: "OverlayLayerRow",
|
|
1142
1138
|
props: {
|
|
1143
1139
|
layer: {
|
|
@@ -1180,10 +1176,10 @@ var Ut = /*#__PURE__*/ e(kt, [["render", Ht], ["__file", "C:/softpro/surveyor/ad
|
|
|
1180
1176
|
],
|
|
1181
1177
|
setup(e, { expose: t, emit: n }) {
|
|
1182
1178
|
t();
|
|
1183
|
-
let r = e, i = n, a =
|
|
1179
|
+
let r = e, i = n, a = W("menuButtonRef"), o = W("menuRef"), s = V(null), l = A(() => m(r.layer)), f = A(() => d(r.layer)), p = A(() => r.layer.legendLabel || r.layer.label), h = A(() => u(r.layer) ? l.value != null && r.mapZoom < l.value ? "unavailable" : r.loadState ?? "ready" : "missing"), g = A(() => h.value === "missing" || h.value === "unavailable" && !r.visible), _ = A(() => u(r.layer)), v = A(() => h.value === "missing" || h.value === "unavailable"), y = A(() => {
|
|
1184
1180
|
let e = l.value;
|
|
1185
1181
|
return e == null ? "" : `Доступний з ${Number.isInteger(e) ? String(e) : e.toFixed(1)} масштабу`;
|
|
1186
|
-
}), b =
|
|
1182
|
+
}), b = A(() => {
|
|
1187
1183
|
let e = f.value ?? "#94a3b8";
|
|
1188
1184
|
return {
|
|
1189
1185
|
backgroundColor: `color-mix(in srgb, ${e} 22%, white)`,
|
|
@@ -1193,7 +1189,7 @@ var Ut = /*#__PURE__*/ e(kt, [["render", Ht], ["__file", "C:/softpro/surveyor/ad
|
|
|
1193
1189
|
function x() {
|
|
1194
1190
|
let e = a.value?.getBoundingClientRect();
|
|
1195
1191
|
if (!e) return;
|
|
1196
|
-
let t = e.right +
|
|
1192
|
+
let t = e.right + Gt + Ut <= window.innerWidth - 8 ? e.right + Gt : Math.max(8, e.left - Ut - Gt), n = Math.min(Math.max(8, e.top - 12), window.innerHeight - Wt - 8);
|
|
1197
1193
|
s.value = {
|
|
1198
1194
|
top: n,
|
|
1199
1195
|
left: t
|
|
@@ -1203,26 +1199,26 @@ var Ut = /*#__PURE__*/ e(kt, [["render", Ht], ["__file", "C:/softpro/surveyor/ad
|
|
|
1203
1199
|
let t = e.target;
|
|
1204
1200
|
t instanceof Node && (o.value?.contains(t) || a.value?.contains(t) || i("closeMenu"));
|
|
1205
1201
|
}
|
|
1206
|
-
function
|
|
1202
|
+
function C(e) {
|
|
1207
1203
|
e.key === "Escape" && i("closeMenu");
|
|
1208
1204
|
}
|
|
1209
|
-
function
|
|
1210
|
-
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0), document.removeEventListener("pointerdown", S), document.removeEventListener("keydown",
|
|
1205
|
+
function w() {
|
|
1206
|
+
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0), document.removeEventListener("pointerdown", S), document.removeEventListener("keydown", C);
|
|
1211
1207
|
}
|
|
1212
|
-
|
|
1213
|
-
if (
|
|
1208
|
+
G(() => r.menuOpen, async (e) => {
|
|
1209
|
+
if (w(), !e) {
|
|
1214
1210
|
s.value = null;
|
|
1215
1211
|
return;
|
|
1216
1212
|
}
|
|
1217
|
-
await ce(), x(), window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), document.addEventListener("pointerdown", S), document.addEventListener("keydown",
|
|
1218
|
-
}), ue(
|
|
1219
|
-
function
|
|
1213
|
+
await ce(), x(), window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), document.addEventListener("pointerdown", S), document.addEventListener("keydown", C);
|
|
1214
|
+
}), ue(w);
|
|
1215
|
+
function T(e) {
|
|
1220
1216
|
i("update:opacity", Number(e.target.value));
|
|
1221
1217
|
}
|
|
1222
|
-
let
|
|
1223
|
-
MENU_WIDTH:
|
|
1224
|
-
MENU_HEIGHT:
|
|
1225
|
-
MENU_GAP:
|
|
1218
|
+
let ee = {
|
|
1219
|
+
MENU_WIDTH: Ut,
|
|
1220
|
+
MENU_HEIGHT: Wt,
|
|
1221
|
+
MENU_GAP: Gt,
|
|
1226
1222
|
props: r,
|
|
1227
1223
|
emit: i,
|
|
1228
1224
|
menuButtonRef: a,
|
|
@@ -1239,110 +1235,110 @@ var Ut = /*#__PURE__*/ e(kt, [["render", Ht], ["__file", "C:/softpro/surveyor/ad
|
|
|
1239
1235
|
swatchStyle: b,
|
|
1240
1236
|
updateMenuPosition: x,
|
|
1241
1237
|
handleOutsidePointer: S,
|
|
1242
|
-
handleEscape:
|
|
1243
|
-
detachMenuListeners:
|
|
1244
|
-
onOpacityInput:
|
|
1238
|
+
handleEscape: C,
|
|
1239
|
+
detachMenuListeners: w,
|
|
1240
|
+
onOpacityInput: T,
|
|
1245
1241
|
SurveyorTeleport: c,
|
|
1246
1242
|
get AlertTriangle() {
|
|
1247
|
-
return
|
|
1243
|
+
return ge;
|
|
1248
1244
|
},
|
|
1249
1245
|
get GripVertical() {
|
|
1250
|
-
return
|
|
1246
|
+
return ve;
|
|
1251
1247
|
},
|
|
1252
1248
|
get Loader2() {
|
|
1253
|
-
return
|
|
1249
|
+
return ye;
|
|
1254
1250
|
},
|
|
1255
1251
|
get MapIcon() {
|
|
1256
|
-
return
|
|
1252
|
+
return be;
|
|
1257
1253
|
},
|
|
1258
1254
|
get MoreHorizontal() {
|
|
1259
|
-
return
|
|
1255
|
+
return Se;
|
|
1260
1256
|
},
|
|
1261
1257
|
get ZoomIn() {
|
|
1262
|
-
return
|
|
1258
|
+
return Oe;
|
|
1263
1259
|
}
|
|
1264
1260
|
};
|
|
1265
|
-
return Object.defineProperty(
|
|
1261
|
+
return Object.defineProperty(ee, "__isScriptSetup", {
|
|
1266
1262
|
enumerable: !1,
|
|
1267
1263
|
value: !0
|
|
1268
|
-
}),
|
|
1264
|
+
}), ee;
|
|
1269
1265
|
}
|
|
1270
|
-
}),
|
|
1266
|
+
}), qt = { class: "flex items-center gap-2.5" }, Jt = [
|
|
1271
1267
|
"aria-checked",
|
|
1272
1268
|
"aria-label",
|
|
1273
1269
|
"disabled"
|
|
1274
|
-
],
|
|
1270
|
+
], Yt = { class: "min-w-0 flex-1" }, Xt = ["title"], Zt = {
|
|
1275
1271
|
key: 0,
|
|
1276
1272
|
class: "mt-0.5 flex items-center gap-1 text-[10px] text-amber-600"
|
|
1277
|
-
},
|
|
1273
|
+
}, Qt = {
|
|
1278
1274
|
key: 1,
|
|
1279
1275
|
class: "mt-0.5 flex items-center gap-1 text-[10px] text-amber-600"
|
|
1280
|
-
},
|
|
1276
|
+
}, $t = {
|
|
1281
1277
|
key: 2,
|
|
1282
1278
|
class: "mt-0.5 flex items-center gap-1 text-[10px] text-brand-600"
|
|
1283
|
-
},
|
|
1279
|
+
}, en = {
|
|
1284
1280
|
key: 3,
|
|
1285
1281
|
class: "mt-0.5 flex items-center gap-1 text-[10px] text-red-600"
|
|
1286
|
-
},
|
|
1282
|
+
}, tn = {
|
|
1287
1283
|
key: 4,
|
|
1288
1284
|
class: "block text-[11px] text-slate-400"
|
|
1289
|
-
},
|
|
1285
|
+
}, nn = ["aria-expanded", "aria-label"], rn = { class: "mb-2 flex items-center justify-between text-xs font-semibold text-slate-600" }, an = { class: "tabular-nums text-slate-400" }, on = ["value", "aria-label"], sn = ["disabled", "title"], cn = {
|
|
1290
1286
|
key: 0,
|
|
1291
1287
|
class: "mt-2 rounded-lg border border-slate-100 bg-slate-50 px-3 py-2 text-[11px] text-slate-600"
|
|
1292
|
-
},
|
|
1293
|
-
function
|
|
1294
|
-
return
|
|
1295
|
-
|
|
1296
|
-
|
|
1288
|
+
}, ln = { class: "flex items-center gap-2" };
|
|
1289
|
+
function un(e, t, n, r, i, a) {
|
|
1290
|
+
return B(), N("div", { class: R(["relative rounded-xl border border-slate-200 px-3 py-2.5 transition-colors", [n.visible ? "bg-white" : "bg-slate-50", r.faded ? "opacity-65" : ""]]) }, [
|
|
1291
|
+
P("div", qt, [
|
|
1292
|
+
I(r.GripVertical, {
|
|
1297
1293
|
class: "h-4 w-4 shrink-0 text-slate-300",
|
|
1298
1294
|
"aria-hidden": "true"
|
|
1299
1295
|
}),
|
|
1300
|
-
|
|
1296
|
+
P("button", {
|
|
1301
1297
|
type: "button",
|
|
1302
1298
|
role: "switch",
|
|
1303
1299
|
"aria-checked": n.visible,
|
|
1304
1300
|
"aria-label": `Показати шар ${n.layer.label}`,
|
|
1305
1301
|
disabled: r.toggleDisabled,
|
|
1306
|
-
class:
|
|
1302
|
+
class: R(["map-switch-track relative h-5 w-9 shrink-0 overflow-hidden rounded-full focus:outline-none focus:ring-2 focus:ring-brand-200 focus:ring-offset-1 disabled:cursor-not-allowed", n.visible ? "bg-brand-600" : "bg-slate-200"]),
|
|
1307
1303
|
onClick: t[0] ||= (e) => r.emit("toggle")
|
|
1308
|
-
}, [
|
|
1309
|
-
|
|
1304
|
+
}, [P("span", { class: R(["map-switch-knob pointer-events-none absolute top-0.5 h-4 w-4 rounded-full bg-white shadow-sm", n.visible ? "left-[18px]" : "left-0.5"]) }, null, 2)], 10, Jt),
|
|
1305
|
+
P("span", {
|
|
1310
1306
|
class: "h-2.5 w-8 shrink-0 rounded-sm border",
|
|
1311
|
-
style:
|
|
1307
|
+
style: z(r.swatchStyle),
|
|
1312
1308
|
"aria-hidden": "true"
|
|
1313
1309
|
}, null, 4),
|
|
1314
|
-
|
|
1310
|
+
P("div", Yt, [P("span", {
|
|
1315
1311
|
class: "block truncate text-sm font-medium text-slate-700",
|
|
1316
1312
|
title: n.layer.label
|
|
1317
|
-
},
|
|
1318
|
-
r.status === "error" ? (
|
|
1313
|
+
}, U(n.layer.label), 9, Xt), r.status === "unavailable" ? (B(), N("span", Zt, [I(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), F(" " + U(r.zoomText), 1)])) : r.status === "missing" ? (B(), N("span", Qt, [I(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), t[5] ||= F(" Джерело не налаштовано ", -1)])) : r.status === "loading" ? (B(), N("span", $t, [I(r.Loader2, { class: "h-3 w-3 shrink-0 animate-spin" }), t[6] ||= F(" Завантаження шару… ", -1)])) : r.status === "error" ? (B(), N("span", en, [I(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), t[7] ||= F(" Помилка завантаження ", -1)])) : (B(), N("span", tn, U(n.opacity) + "% прозорості", 1))]),
|
|
1314
|
+
r.status === "error" ? (B(), N("button", {
|
|
1319
1315
|
key: 0,
|
|
1320
1316
|
type: "button",
|
|
1321
1317
|
class: "rounded-md px-1.5 py-1 text-[10px] font-semibold text-red-700 hover:bg-red-50 focus:outline-none focus:ring-2 focus:ring-red-200",
|
|
1322
1318
|
onClick: t[1] ||= (e) => r.emit("retry")
|
|
1323
|
-
}, " Повторити ")) :
|
|
1324
|
-
|
|
1319
|
+
}, " Повторити ")) : M("", !0),
|
|
1320
|
+
P("button", {
|
|
1325
1321
|
ref: "menuButtonRef",
|
|
1326
1322
|
type: "button",
|
|
1327
1323
|
"aria-expanded": n.menuOpen,
|
|
1328
1324
|
"aria-label": `Меню шару ${n.layer.label}`,
|
|
1329
1325
|
class: "rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1330
1326
|
onClick: t[2] ||= (e) => r.emit("toggleMenu")
|
|
1331
|
-
}, [
|
|
1327
|
+
}, [I(r.MoreHorizontal, { class: "h-4 w-4" })], 8, nn)
|
|
1332
1328
|
]),
|
|
1333
|
-
|
|
1334
|
-
default:
|
|
1329
|
+
I(r.SurveyorTeleport, null, {
|
|
1330
|
+
default: K(() => [n.menuOpen && r.menuPosition ? (B(), N("div", {
|
|
1335
1331
|
key: 0,
|
|
1336
1332
|
ref: "menuRef",
|
|
1337
1333
|
role: "menu",
|
|
1338
1334
|
class: "fixed z-[70] w-52 rounded-xl border border-slate-200 bg-white p-3 shadow-xl",
|
|
1339
|
-
style:
|
|
1335
|
+
style: z({
|
|
1340
1336
|
top: `${r.menuPosition.top}px`,
|
|
1341
1337
|
left: `${r.menuPosition.left}px`
|
|
1342
1338
|
})
|
|
1343
1339
|
}, [
|
|
1344
|
-
|
|
1345
|
-
|
|
1340
|
+
P("div", rn, [t[8] ||= P("span", null, "Прозорість", -1), P("span", an, U(n.opacity) + "%", 1)]),
|
|
1341
|
+
P("input", {
|
|
1346
1342
|
type: "range",
|
|
1347
1343
|
min: "0",
|
|
1348
1344
|
max: "100",
|
|
@@ -1350,32 +1346,32 @@ function dn(e, t, n, r, i, a) {
|
|
|
1350
1346
|
"aria-label": `Прозорість шару ${n.layer.label}`,
|
|
1351
1347
|
class: "mb-3 w-full accent-brand-600",
|
|
1352
1348
|
onInput: r.onOpacityInput
|
|
1353
|
-
}, null, 40,
|
|
1354
|
-
|
|
1349
|
+
}, null, 40, on),
|
|
1350
|
+
P("button", {
|
|
1355
1351
|
type: "button",
|
|
1356
1352
|
disabled: !r.canZoom,
|
|
1357
1353
|
title: r.canZoom ? void 0 : "Немає геометрії шару",
|
|
1358
1354
|
class: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs text-slate-600 hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-brand-200 disabled:cursor-not-allowed disabled:text-slate-300 disabled:hover:bg-transparent",
|
|
1359
1355
|
onClick: t[3] ||= (e) => r.emit("zoom")
|
|
1360
|
-
}, [
|
|
1361
|
-
|
|
1356
|
+
}, [I(r.ZoomIn, { class: R(["h-3.5 w-3.5", r.canZoom ? "text-slate-400" : "text-slate-300"]) }, null, 8, ["class"]), t[9] ||= F(" Наблизити до шару ", -1)], 8, sn),
|
|
1357
|
+
P("button", {
|
|
1362
1358
|
type: "button",
|
|
1363
1359
|
class: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs text-slate-600 hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1364
1360
|
onClick: t[4] ||= (e) => r.emit("toggleLegend")
|
|
1365
|
-
}, [
|
|
1366
|
-
], 4)) :
|
|
1361
|
+
}, [I(r.MapIcon, { class: "h-3.5 w-3.5 text-slate-400" }), t[10] ||= F(" Переглянути легенду ", -1)])
|
|
1362
|
+
], 4)) : M("", !0)]),
|
|
1367
1363
|
_: 1
|
|
1368
1364
|
}),
|
|
1369
|
-
n.legendOpen ? (
|
|
1365
|
+
n.legendOpen ? (B(), N("div", cn, [t[11] ||= P("div", { class: "mb-1 font-semibold text-slate-700" }, "Легенда шару", -1), P("div", ln, [P("span", {
|
|
1370
1366
|
class: "h-2.5 w-7 rounded-sm",
|
|
1371
|
-
style:
|
|
1372
|
-
}, null, 4),
|
|
1367
|
+
style: z({ backgroundColor: r.legendColor ?? "#94a3b8" })
|
|
1368
|
+
}, null, 4), F(" " + U(r.legendText), 1)])])) : M("", !0)
|
|
1373
1369
|
], 2);
|
|
1374
1370
|
}
|
|
1375
|
-
var
|
|
1371
|
+
var dn = /*#__PURE__*/ e(Kt, [["render", un], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/OverlayLayerRow.vue"]]);
|
|
1376
1372
|
//#endregion
|
|
1377
1373
|
//#region admin/src/pages/map/components/mock-map-data.ts
|
|
1378
|
-
function
|
|
1374
|
+
function fn(e) {
|
|
1379
1375
|
let t = e.status ? y[e.status] ?? e.status : "";
|
|
1380
1376
|
return {
|
|
1381
1377
|
app_id: e.id,
|
|
@@ -1386,14 +1382,14 @@ function pn(e) {
|
|
|
1386
1382
|
org_id_data: e.organization === "—" ? null : { text: e.organization }
|
|
1387
1383
|
};
|
|
1388
1384
|
}
|
|
1389
|
-
function
|
|
1390
|
-
return e.map(
|
|
1385
|
+
function pn(e) {
|
|
1386
|
+
return e.map(fn);
|
|
1391
1387
|
}
|
|
1392
|
-
var
|
|
1388
|
+
var mn = Object.entries(y).map(([e, t]) => ({
|
|
1393
1389
|
key: e,
|
|
1394
1390
|
label: t,
|
|
1395
|
-
color:
|
|
1396
|
-
})),
|
|
1391
|
+
color: v[e] ?? "#64748b"
|
|
1392
|
+
})), hn = "Звернення на видачу вихідних даних", gn = 208, _n = 96, vn = 12, yn = /*@__PURE__*/ L({
|
|
1397
1393
|
__name: "MapLayersPanel",
|
|
1398
1394
|
props: {
|
|
1399
1395
|
searchQuery: {
|
|
@@ -1498,30 +1494,30 @@ var hn = Object.entries(y).map(([e, t]) => ({
|
|
|
1498
1494
|
organization: "Організація",
|
|
1499
1495
|
address: "Адреса",
|
|
1500
1496
|
year: "Рік"
|
|
1501
|
-
}, i = e, a = n, o =
|
|
1497
|
+
}, i = e, a = n, o = V(!1), s = V(!0), l = V(!0), d = V(!1), m = V(!1), h = V({}), g = V({}), v = V({}), y = V({}), x = V({}), S = W("filtersFormRef"), C = V(!1), w = V(null), T = W("menuButtonRef"), ee = W("menuRef"), E = V(null), D = V(null), te = V(null), O = V(0), ne = A(() => i.filters.year?.length === 0 ? [] : i.filters.year?.length ? i.filters.year : Ae()), re = (/* @__PURE__ */ new Date()).getFullYear(), ie = A(() => Array.from({ length: Math.max(1, re - ke + 1) }, (e, t) => String(re - t))), ae = A(() => Math.max(0, ie.value.length - 3)), oe = A(() => ie.value.slice(O.value, O.value + 3)), se = A({
|
|
1502
1498
|
get: () => i.searchQuery,
|
|
1503
1499
|
set: (e) => a("update:searchQuery", e)
|
|
1504
|
-
}),
|
|
1505
|
-
function
|
|
1500
|
+
}), k = A(() => !!i.searchQuery.trim() && (i.searchLoading || i.searchError || i.searchEmpty || (i.searchResults?.length ?? 0) > 0)), j = A(() => i.applicationsName || hn), M = A(() => +!!i.applicationsVisible + i.overlays.filter((e) => i.activeOverlayIds.includes(e.id)).length), N = A(() => i.baseLayers.find((e) => e.id === i.basemapId) ?? i.baseLayers[0]), P = A(() => mn.filter((e) => i.visibleStatuses.has(e.key)).reduce((e, t) => e + (i.statusCounts[t.key] ?? 0), 0));
|
|
1501
|
+
function F(e) {
|
|
1506
1502
|
let t = i.statusCounts[e] ?? 0;
|
|
1507
|
-
return
|
|
1503
|
+
return P.value > 0 && i.visibleStatuses.has(e) ? Math.round(t / P.value * 100) : 0;
|
|
1508
1504
|
}
|
|
1509
|
-
function
|
|
1505
|
+
function I(e) {
|
|
1510
1506
|
return e.toLocaleString("uk-UA");
|
|
1511
1507
|
}
|
|
1512
|
-
let
|
|
1508
|
+
let L = A(() => Object.keys(r).filter((e) => {
|
|
1513
1509
|
if (e === "year") return i.filters.year?.length !== 0 && ne.value.length > 0;
|
|
1514
1510
|
let t = i.filters[e];
|
|
1515
1511
|
return Array.isArray(t) ? t.length > 0 : !!t;
|
|
1516
1512
|
}).map((e) => ({
|
|
1517
1513
|
key: e,
|
|
1518
|
-
label: `${r[e]}: ${
|
|
1519
|
-
}))),
|
|
1520
|
-
function
|
|
1514
|
+
label: `${r[e]}: ${le(e, e === "year" ? ne.value : i.filters[e] ?? "")}`
|
|
1515
|
+
}))), R = A(() => L.value.length), z = A(() => !!(h.value.dateFrom && h.value.dateTo && h.value.dateFrom > h.value.dateTo));
|
|
1516
|
+
function le(e, t) {
|
|
1521
1517
|
let n = Array.isArray(t) ? t : [t];
|
|
1522
|
-
return e === "workType" ? n.map((e) =>
|
|
1518
|
+
return e === "workType" ? n.map((e) => _[e] ?? e).join(", ") : e === "dateFrom" || e === "dateTo" ? n[0]?.split("-").reverse().join(".") ?? "" : e === "organization" ? n.map((e) => g.value[e] ?? e).join(", ") : e === "address" ? n.map((e) => v.value[e] ?? e).join(", ") : n.join(", ");
|
|
1523
1519
|
}
|
|
1524
|
-
function
|
|
1520
|
+
function B(e) {
|
|
1525
1521
|
let t = {};
|
|
1526
1522
|
for (let n of [
|
|
1527
1523
|
"workType",
|
|
@@ -1541,7 +1537,7 @@ var hn = Object.entries(y).map(([e, t]) => ({
|
|
|
1541
1537
|
}
|
|
1542
1538
|
return t;
|
|
1543
1539
|
}
|
|
1544
|
-
function
|
|
1540
|
+
function H() {
|
|
1545
1541
|
return {
|
|
1546
1542
|
dateFrom: "",
|
|
1547
1543
|
dateTo: "",
|
|
@@ -1551,85 +1547,85 @@ var hn = Object.entries(y).map(([e, t]) => ({
|
|
|
1551
1547
|
address: []
|
|
1552
1548
|
};
|
|
1553
1549
|
}
|
|
1554
|
-
function
|
|
1550
|
+
function de(e, t) {
|
|
1555
1551
|
let n = {};
|
|
1556
1552
|
for (let r of e) t[r] && (n[r] = t[r]);
|
|
1557
1553
|
return n;
|
|
1558
1554
|
}
|
|
1559
|
-
async function
|
|
1555
|
+
async function U(e, t, n, r, i) {
|
|
1560
1556
|
let a = n.filter((e) => e && !r[e]);
|
|
1561
1557
|
if (!a.length) return;
|
|
1562
1558
|
let o = { ...r };
|
|
1563
1559
|
await Promise.all(a.map(async (n) => {
|
|
1564
1560
|
try {
|
|
1565
|
-
let r = (await
|
|
1561
|
+
let r = (await mt(e, t, {
|
|
1566
1562
|
search: n,
|
|
1567
1563
|
limit: 10
|
|
1568
1564
|
})).find((e) => e.id === n);
|
|
1569
1565
|
r?.text && (o[n] = r.text);
|
|
1570
1566
|
} catch {}
|
|
1571
|
-
})), i(
|
|
1567
|
+
})), i(de(n, o));
|
|
1572
1568
|
}
|
|
1573
|
-
|
|
1569
|
+
G(() => i.filters.organization, (e) => {
|
|
1574
1570
|
let t = (e ?? []).map((e) => e.trim()).filter(Boolean);
|
|
1575
1571
|
if (!t.length) {
|
|
1576
1572
|
g.value = {};
|
|
1577
1573
|
return;
|
|
1578
1574
|
}
|
|
1579
|
-
g.value =
|
|
1575
|
+
g.value = de(t, g.value), U("organizations", "org_id", t, g.value, (e) => {
|
|
1580
1576
|
g.value = e;
|
|
1581
1577
|
});
|
|
1582
|
-
}, { immediate: !0 }),
|
|
1578
|
+
}, { immediate: !0 }), G(() => i.filters.address, (e) => {
|
|
1583
1579
|
let t = (e ?? []).map((e) => e.trim()).filter(Boolean);
|
|
1584
1580
|
if (!t.length) {
|
|
1585
|
-
|
|
1581
|
+
v.value = {};
|
|
1586
1582
|
return;
|
|
1587
1583
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1584
|
+
v.value = de(t, v.value), U("applications", "address_id", t, v.value, (e) => {
|
|
1585
|
+
v.value = e;
|
|
1590
1586
|
});
|
|
1591
1587
|
}, { immediate: !0 });
|
|
1592
|
-
function
|
|
1588
|
+
function fe() {
|
|
1593
1589
|
m.value || (h.value = {
|
|
1594
|
-
...
|
|
1590
|
+
...H(),
|
|
1595
1591
|
...i.filters,
|
|
1596
1592
|
workType: [...i.filters.workType ?? []],
|
|
1597
1593
|
organization: [...i.filters.organization ?? []],
|
|
1598
1594
|
address: [...i.filters.address ?? []]
|
|
1599
|
-
},
|
|
1595
|
+
}, y.value = { ...g.value }, x.value = { ...v.value }), m.value = !m.value;
|
|
1600
1596
|
}
|
|
1601
|
-
function
|
|
1602
|
-
if (
|
|
1603
|
-
let e =
|
|
1604
|
-
g.value =
|
|
1597
|
+
function K() {
|
|
1598
|
+
if (z.value) return;
|
|
1599
|
+
let e = B(h.value);
|
|
1600
|
+
g.value = de(e.organization ?? [], y.value), v.value = de(e.address ?? [], x.value), a("update:filters", {
|
|
1605
1601
|
...e,
|
|
1606
1602
|
year: i.filters.year
|
|
1607
1603
|
}), m.value = !1;
|
|
1608
1604
|
}
|
|
1609
|
-
function
|
|
1610
|
-
h.value =
|
|
1605
|
+
function q() {
|
|
1606
|
+
h.value = H(), y.value = {}, x.value = {}, g.value = {}, v.value = {}, a("update:filters", {});
|
|
1611
1607
|
}
|
|
1612
|
-
function
|
|
1613
|
-
let e = ne.value, t =
|
|
1608
|
+
function pe() {
|
|
1609
|
+
let e = ne.value, t = Ae()[0];
|
|
1614
1610
|
if (e.length === 1 && e[0] === t) {
|
|
1615
|
-
|
|
1611
|
+
J();
|
|
1616
1612
|
return;
|
|
1617
1613
|
}
|
|
1618
1614
|
let n = { ...i.filters };
|
|
1619
1615
|
delete n.year, a("update:filters", n);
|
|
1620
1616
|
}
|
|
1621
|
-
function
|
|
1617
|
+
function me(e) {
|
|
1622
1618
|
if (e === "year") {
|
|
1623
|
-
|
|
1619
|
+
pe();
|
|
1624
1620
|
return;
|
|
1625
1621
|
}
|
|
1626
1622
|
let t = { ...i.filters };
|
|
1627
|
-
delete t[e], e === "organization" && (g.value = {},
|
|
1623
|
+
delete t[e], e === "organization" && (g.value = {}, y.value = {}), e === "address" && (v.value = {}, x.value = {}), a("update:filters", t), m.value && (h.value = {
|
|
1628
1624
|
...h.value,
|
|
1629
1625
|
[e]: e === "workType" || e === "organization" || e === "address" ? [] : ""
|
|
1630
1626
|
});
|
|
1631
1627
|
}
|
|
1632
|
-
function
|
|
1628
|
+
function he(e) {
|
|
1633
1629
|
let t = new Set(ne.value);
|
|
1634
1630
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
1635
1631
|
let n = [...t].sort((e, t) => Number(t) - Number(e));
|
|
@@ -1638,74 +1634,74 @@ var hn = Object.entries(y).map(([e, t]) => ({
|
|
|
1638
1634
|
year: n.length ? n : []
|
|
1639
1635
|
});
|
|
1640
1636
|
}
|
|
1641
|
-
function
|
|
1637
|
+
function J() {
|
|
1642
1638
|
a("update:filters", {
|
|
1643
1639
|
...i.filters,
|
|
1644
1640
|
year: []
|
|
1645
1641
|
});
|
|
1646
1642
|
}
|
|
1647
1643
|
function ge(e) {
|
|
1648
|
-
|
|
1644
|
+
O.value = Math.min(ae.value, Math.max(0, O.value + e));
|
|
1649
1645
|
}
|
|
1650
|
-
function
|
|
1646
|
+
function Q() {
|
|
1651
1647
|
a("update:applicationsVisible", !i.applicationsVisible);
|
|
1652
1648
|
}
|
|
1653
|
-
function
|
|
1654
|
-
|
|
1649
|
+
function ve() {
|
|
1650
|
+
E.value = null, C.value = !C.value;
|
|
1655
1651
|
}
|
|
1656
|
-
function
|
|
1652
|
+
function ye(e) {
|
|
1657
1653
|
return i.overlayOpacities[e.id] ?? Math.round(p(e) * 100);
|
|
1658
1654
|
}
|
|
1659
|
-
function
|
|
1660
|
-
|
|
1655
|
+
function be(e) {
|
|
1656
|
+
C.value = !1, E.value = E.value === e ? null : e;
|
|
1661
1657
|
}
|
|
1662
|
-
function
|
|
1663
|
-
|
|
1658
|
+
function xe(e) {
|
|
1659
|
+
D.value = D.value === e ? null : e;
|
|
1664
1660
|
}
|
|
1665
|
-
function
|
|
1666
|
-
u(e) && (
|
|
1661
|
+
function Ce(e) {
|
|
1662
|
+
u(e) && (E.value = null, te.value = `Карту наближено до шару «${e.label}».`, a("zoomToOverlay", e.id));
|
|
1667
1663
|
}
|
|
1668
|
-
function
|
|
1669
|
-
let e =
|
|
1664
|
+
function Oe() {
|
|
1665
|
+
let e = T.value?.getBoundingClientRect();
|
|
1670
1666
|
if (!e) return;
|
|
1671
|
-
let t = e.right +
|
|
1672
|
-
|
|
1667
|
+
let t = e.right + vn + gn <= window.innerWidth - 8 ? e.right + vn : Math.max(8, e.left - gn - vn), n = Math.min(Math.max(8, e.top - 12), window.innerHeight - _n - 8);
|
|
1668
|
+
w.value = {
|
|
1673
1669
|
top: n,
|
|
1674
1670
|
left: t
|
|
1675
1671
|
};
|
|
1676
1672
|
}
|
|
1677
|
-
function
|
|
1673
|
+
function je(e) {
|
|
1678
1674
|
let t = e.target;
|
|
1679
|
-
|
|
1675
|
+
ee.value?.contains(t) || T.value?.contains(t) || (C.value = !1);
|
|
1680
1676
|
}
|
|
1681
|
-
function
|
|
1682
|
-
e.key === "Escape" && (
|
|
1677
|
+
function Me(e) {
|
|
1678
|
+
e.key === "Escape" && (C.value = !1);
|
|
1683
1679
|
}
|
|
1684
|
-
function
|
|
1685
|
-
window.removeEventListener("resize",
|
|
1680
|
+
function Ne() {
|
|
1681
|
+
window.removeEventListener("resize", Oe), window.removeEventListener("scroll", Oe, !0), document.removeEventListener("pointerdown", je), document.removeEventListener("keydown", Me);
|
|
1686
1682
|
}
|
|
1687
|
-
|
|
1688
|
-
if (
|
|
1689
|
-
|
|
1683
|
+
G(C, async (e) => {
|
|
1684
|
+
if (Ne(), !e) {
|
|
1685
|
+
w.value = null;
|
|
1690
1686
|
return;
|
|
1691
1687
|
}
|
|
1692
|
-
await ce(),
|
|
1688
|
+
await ce(), Oe(), window.addEventListener("resize", Oe), window.addEventListener("scroll", Oe, !0), document.addEventListener("pointerdown", je), document.addEventListener("keydown", Me);
|
|
1693
1689
|
});
|
|
1694
|
-
function
|
|
1690
|
+
function Pe(e) {
|
|
1695
1691
|
e.key === "Escape" && (document.querySelector("[data-map-filter-ui][role=\"listbox\"]") || (m.value = !1));
|
|
1696
1692
|
}
|
|
1697
|
-
|
|
1698
|
-
e ? (document.addEventListener("keydown",
|
|
1699
|
-
}),
|
|
1700
|
-
e && (
|
|
1693
|
+
G(m, async (e) => {
|
|
1694
|
+
e ? (document.addEventListener("keydown", Pe), await ce(), S.value?.scrollIntoView({ block: "nearest" })) : document.removeEventListener("keydown", Pe);
|
|
1695
|
+
}), G(o, (e) => {
|
|
1696
|
+
e && (C.value = !1, m.value = !1, E.value = null, D.value = null, te.value = null);
|
|
1701
1697
|
}), ue(() => {
|
|
1702
|
-
|
|
1698
|
+
Ne(), document.removeEventListener("keydown", Pe);
|
|
1703
1699
|
});
|
|
1704
|
-
let
|
|
1705
|
-
DEFAULT_APPLICATIONS_LAYER_NAME:
|
|
1706
|
-
MENU_WIDTH:
|
|
1707
|
-
MENU_HEIGHT:
|
|
1708
|
-
MENU_GAP:
|
|
1700
|
+
let Fe = {
|
|
1701
|
+
DEFAULT_APPLICATIONS_LAYER_NAME: hn,
|
|
1702
|
+
MENU_WIDTH: gn,
|
|
1703
|
+
MENU_HEIGHT: _n,
|
|
1704
|
+
MENU_GAP: vn,
|
|
1709
1705
|
FILTER_LABELS: r,
|
|
1710
1706
|
props: i,
|
|
1711
1707
|
emit: a,
|
|
@@ -1716,345 +1712,345 @@ var hn = Object.entries(y).map(([e, t]) => ({
|
|
|
1716
1712
|
filtersOpen: m,
|
|
1717
1713
|
draftFilters: h,
|
|
1718
1714
|
organizationLabels: g,
|
|
1719
|
-
addressLabels:
|
|
1720
|
-
draftOrganizationLabels:
|
|
1721
|
-
draftAddressLabels:
|
|
1722
|
-
filtersFormRef:
|
|
1723
|
-
menuOpen:
|
|
1724
|
-
menuPosition:
|
|
1725
|
-
menuButtonRef:
|
|
1726
|
-
menuRef:
|
|
1727
|
-
overlayMenuId:
|
|
1728
|
-
legendLayerId:
|
|
1715
|
+
addressLabels: v,
|
|
1716
|
+
draftOrganizationLabels: y,
|
|
1717
|
+
draftAddressLabels: x,
|
|
1718
|
+
filtersFormRef: S,
|
|
1719
|
+
menuOpen: C,
|
|
1720
|
+
menuPosition: w,
|
|
1721
|
+
menuButtonRef: T,
|
|
1722
|
+
menuRef: ee,
|
|
1723
|
+
overlayMenuId: E,
|
|
1724
|
+
legendLayerId: D,
|
|
1729
1725
|
layerNotice: te,
|
|
1730
|
-
yearWindowStart:
|
|
1726
|
+
yearWindowStart: O,
|
|
1731
1727
|
selectedYears: ne,
|
|
1732
|
-
currentYear:
|
|
1733
|
-
quickYears:
|
|
1734
|
-
maxYearWindowStart:
|
|
1735
|
-
visibleYears:
|
|
1736
|
-
searchModel:
|
|
1737
|
-
searchDropdownOpen:
|
|
1738
|
-
applicationsLayerName:
|
|
1739
|
-
activeLayersCount:
|
|
1740
|
-
activeBasemap:
|
|
1741
|
-
visibleStatusCount:
|
|
1742
|
-
statusPercent:
|
|
1743
|
-
formatCount:
|
|
1744
|
-
activeFilterChips:
|
|
1745
|
-
activeFilterCount:
|
|
1746
|
-
dateRangeInvalid:
|
|
1747
|
-
filterValueText:
|
|
1748
|
-
cleanFilters:
|
|
1749
|
-
emptyDraft:
|
|
1750
|
-
pruneLabels:
|
|
1751
|
-
resolveMissingSuggestLabels:
|
|
1752
|
-
toggleFilters:
|
|
1753
|
-
applyFilters:
|
|
1754
|
-
resetFilters:
|
|
1755
|
-
removeYearFilterChip:
|
|
1756
|
-
removeFilter:
|
|
1757
|
-
toggleYear:
|
|
1758
|
-
resetYearFilter:
|
|
1728
|
+
currentYear: re,
|
|
1729
|
+
quickYears: ie,
|
|
1730
|
+
maxYearWindowStart: ae,
|
|
1731
|
+
visibleYears: oe,
|
|
1732
|
+
searchModel: se,
|
|
1733
|
+
searchDropdownOpen: k,
|
|
1734
|
+
applicationsLayerName: j,
|
|
1735
|
+
activeLayersCount: M,
|
|
1736
|
+
activeBasemap: N,
|
|
1737
|
+
visibleStatusCount: P,
|
|
1738
|
+
statusPercent: F,
|
|
1739
|
+
formatCount: I,
|
|
1740
|
+
activeFilterChips: L,
|
|
1741
|
+
activeFilterCount: R,
|
|
1742
|
+
dateRangeInvalid: z,
|
|
1743
|
+
filterValueText: le,
|
|
1744
|
+
cleanFilters: B,
|
|
1745
|
+
emptyDraft: H,
|
|
1746
|
+
pruneLabels: de,
|
|
1747
|
+
resolveMissingSuggestLabels: U,
|
|
1748
|
+
toggleFilters: fe,
|
|
1749
|
+
applyFilters: K,
|
|
1750
|
+
resetFilters: q,
|
|
1751
|
+
removeYearFilterChip: pe,
|
|
1752
|
+
removeFilter: me,
|
|
1753
|
+
toggleYear: he,
|
|
1754
|
+
resetYearFilter: J,
|
|
1759
1755
|
shiftYearWindow: ge,
|
|
1760
|
-
toggleApplications:
|
|
1761
|
-
toggleApplicationsMenu:
|
|
1762
|
-
overlayOpacity:
|
|
1763
|
-
toggleOverlayMenu:
|
|
1764
|
-
toggleLegend:
|
|
1765
|
-
zoomToLayer:
|
|
1766
|
-
updateMenuPosition:
|
|
1767
|
-
handleOutsidePointer:
|
|
1768
|
-
handleEscape:
|
|
1769
|
-
detachMenuListeners:
|
|
1770
|
-
handleFiltersEscape:
|
|
1756
|
+
toggleApplications: Q,
|
|
1757
|
+
toggleApplicationsMenu: ve,
|
|
1758
|
+
overlayOpacity: ye,
|
|
1759
|
+
toggleOverlayMenu: be,
|
|
1760
|
+
toggleLegend: xe,
|
|
1761
|
+
zoomToLayer: Ce,
|
|
1762
|
+
updateMenuPosition: Oe,
|
|
1763
|
+
handleOutsidePointer: je,
|
|
1764
|
+
handleEscape: Me,
|
|
1765
|
+
detachMenuListeners: Ne,
|
|
1766
|
+
handleFiltersEscape: Pe,
|
|
1771
1767
|
SurveyorTeleport: c,
|
|
1772
1768
|
get Check() {
|
|
1773
|
-
return
|
|
1769
|
+
return Y;
|
|
1774
1770
|
},
|
|
1775
1771
|
get ChevronDown() {
|
|
1776
|
-
return
|
|
1772
|
+
return _e;
|
|
1777
1773
|
},
|
|
1778
1774
|
get ChevronLeft() {
|
|
1779
|
-
return
|
|
1775
|
+
return X;
|
|
1780
1776
|
},
|
|
1781
1777
|
get ChevronRight() {
|
|
1782
|
-
return
|
|
1778
|
+
return Z;
|
|
1783
1779
|
},
|
|
1784
1780
|
get Layers2() {
|
|
1785
|
-
return
|
|
1781
|
+
return $;
|
|
1786
1782
|
},
|
|
1787
1783
|
get MoreHorizontal() {
|
|
1788
|
-
return
|
|
1784
|
+
return Se;
|
|
1789
1785
|
},
|
|
1790
1786
|
get RotateCcw() {
|
|
1791
|
-
return
|
|
1787
|
+
return we;
|
|
1792
1788
|
},
|
|
1793
1789
|
get Search() {
|
|
1794
|
-
return
|
|
1790
|
+
return Te;
|
|
1795
1791
|
},
|
|
1796
1792
|
get SlidersHorizontal() {
|
|
1797
|
-
return
|
|
1793
|
+
return Ee;
|
|
1798
1794
|
},
|
|
1799
1795
|
get X() {
|
|
1800
|
-
return
|
|
1796
|
+
return De;
|
|
1801
1797
|
},
|
|
1802
|
-
MapFilterSelect:
|
|
1803
|
-
MapFilterSuggest:
|
|
1804
|
-
OverlayLayerRow:
|
|
1798
|
+
MapFilterSelect: Tt,
|
|
1799
|
+
MapFilterSuggest: Ht,
|
|
1800
|
+
OverlayLayerRow: dn,
|
|
1805
1801
|
get WORK_TYPE_OPTIONS() {
|
|
1806
|
-
return
|
|
1802
|
+
return b;
|
|
1807
1803
|
},
|
|
1808
1804
|
get MAP_LEGEND() {
|
|
1809
|
-
return
|
|
1805
|
+
return mn;
|
|
1810
1806
|
},
|
|
1811
1807
|
get basemapPreview() {
|
|
1812
1808
|
return f;
|
|
1813
1809
|
}
|
|
1814
1810
|
};
|
|
1815
|
-
return Object.defineProperty(
|
|
1811
|
+
return Object.defineProperty(Fe, "__isScriptSetup", {
|
|
1816
1812
|
enumerable: !1,
|
|
1817
1813
|
value: !0
|
|
1818
|
-
}),
|
|
1814
|
+
}), Fe;
|
|
1819
1815
|
}
|
|
1820
|
-
}),
|
|
1816
|
+
}), bn = { class: "rounded-full bg-brand-50 px-1.5 py-0.5 text-[11px] text-brand-700" }, xn = {
|
|
1821
1817
|
key: 1,
|
|
1822
1818
|
class: "absolute inset-x-3 bottom-3 z-30 flex max-h-[calc(100%-6rem)] flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_16px_50px_rgba(15,23,42,0.18)] xl:inset-x-auto xl:bottom-auto xl:left-4 xl:top-4 xl:max-h-[calc(100%-2rem)] xl:w-[400px]",
|
|
1823
1819
|
"aria-label": "Панель шарів карти"
|
|
1824
|
-
},
|
|
1820
|
+
}, Sn = { class: "border-b border-slate-100 p-3" }, Cn = { class: "flex items-center gap-2" }, wn = { class: "relative block min-w-0 flex-1" }, Tn = {
|
|
1825
1821
|
class: "pointer-events-none absolute inset-y-0 left-0 flex w-9 items-center justify-center text-slate-400",
|
|
1826
1822
|
"aria-hidden": "true"
|
|
1827
|
-
},
|
|
1823
|
+
}, En = {
|
|
1828
1824
|
key: 0,
|
|
1829
1825
|
class: "mt-2 max-h-56 overflow-y-auto rounded-lg border border-slate-200 bg-white shadow-sm",
|
|
1830
1826
|
role: "listbox",
|
|
1831
1827
|
"aria-label": "Результати пошуку"
|
|
1832
|
-
},
|
|
1828
|
+
}, Dn = {
|
|
1833
1829
|
key: 0,
|
|
1834
1830
|
class: "px-3 py-2.5 text-sm text-slate-500"
|
|
1835
|
-
},
|
|
1831
|
+
}, On = {
|
|
1836
1832
|
key: 1,
|
|
1837
1833
|
class: "px-3 py-2.5 text-sm text-red-600"
|
|
1838
|
-
},
|
|
1834
|
+
}, kn = {
|
|
1839
1835
|
key: 2,
|
|
1840
1836
|
class: "px-3 py-2.5 text-sm text-slate-500"
|
|
1841
|
-
},
|
|
1837
|
+
}, An = {
|
|
1842
1838
|
key: 3,
|
|
1843
1839
|
class: "divide-y divide-slate-100"
|
|
1844
|
-
},
|
|
1840
|
+
}, jn = ["onClick"], Mn = { class: "text-sm font-medium text-slate-800" }, Nn = { class: "line-clamp-2 text-xs text-slate-500" }, Pn = { class: "min-h-0 flex-1 overflow-y-auto px-3 pb-3" }, Fn = { class: "flex items-center justify-between pb-2 pt-3" }, In = { class: "text-[11px] text-slate-400" }, Ln = {
|
|
1845
1841
|
key: 0,
|
|
1846
1842
|
class: "space-y-2"
|
|
1847
|
-
},
|
|
1843
|
+
}, Rn = { class: "flex items-center gap-2.5 p-3" }, zn = ["aria-checked"], Bn = ["title"], Vn = { class: "block truncate text-sm font-semibold text-slate-800" }, Hn = { class: "mt-1 flex flex-wrap items-center gap-1.5 text-xs text-slate-500" }, Un = { class: "font-medium tabular-nums text-slate-700" }, Wn = {
|
|
1848
1844
|
key: 0,
|
|
1849
1845
|
class: "rounded-full bg-amber-100 px-1.5 py-0.5 font-medium text-amber-700"
|
|
1850
|
-
},
|
|
1846
|
+
}, Gn = {
|
|
1851
1847
|
key: 1,
|
|
1852
1848
|
class: "text-slate-400"
|
|
1853
|
-
},
|
|
1849
|
+
}, Kn = ["aria-expanded"], qn = {
|
|
1854
1850
|
class: "mb-2 flex items-center gap-1.5",
|
|
1855
1851
|
role: "group",
|
|
1856
1852
|
"aria-label": "Фільтр заявок за роком"
|
|
1857
|
-
},
|
|
1853
|
+
}, Jn = ["disabled"], Yn = { class: "flex min-w-0 flex-1 gap-1.5" }, Xn = ["aria-pressed", "onClick"], Zn = ["disabled"], Qn = { class: "mb-1 flex items-center justify-between" }, $n = { class: "text-[11px] tabular-nums text-slate-400" }, er = { class: "space-y-0.5 py-0.5" }, tr = ["title", "onClick"], nr = { class: "min-w-0 flex-1 whitespace-normal break-words text-xs font-medium leading-4 text-slate-700" }, rr = { class: "w-10 shrink-0 pt-0.5 text-right text-xs tabular-nums text-slate-500" }, ir = { class: "w-8 shrink-0 pt-0.5 text-right text-[11px] tabular-nums text-slate-400" }, ar = {
|
|
1858
1854
|
key: 1,
|
|
1859
1855
|
class: "mt-2 rounded-lg border border-dashed border-slate-200 bg-white px-3 py-3 text-center text-xs text-slate-500"
|
|
1860
|
-
},
|
|
1856
|
+
}, or = ["aria-expanded"], sr = {
|
|
1861
1857
|
key: 0,
|
|
1862
1858
|
class: "rounded-full bg-brand-600 px-1.5 text-[10px] text-white"
|
|
1863
|
-
},
|
|
1859
|
+
}, cr = {
|
|
1864
1860
|
key: 2,
|
|
1865
1861
|
class: "mt-2 flex flex-wrap gap-1.5"
|
|
1866
|
-
},
|
|
1862
|
+
}, lr = ["title", "onClick"], ur = { class: "max-w-[150px] truncate" }, dr = { class: "mb-3 flex items-start justify-between" }, fr = { class: "grid grid-cols-2 gap-3" }, pr = { class: "block" }, mr = ["max"], hr = { class: "block" }, gr = ["min"], _r = {
|
|
1867
1863
|
key: 0,
|
|
1868
1864
|
class: "col-span-2 -mt-1 text-[11px] text-red-600"
|
|
1869
|
-
},
|
|
1865
|
+
}, vr = { class: "col-span-2 block" }, yr = { class: "col-span-2 block" }, br = { class: "col-span-2 block" }, xr = { class: "col-span-2 block" }, Sr = { class: "mt-4 flex gap-2 border-t border-slate-100 pt-3" }, Cr = ["disabled"], wr = { class: "mt-4 flex items-center justify-between border-t border-slate-100 pb-2 pt-3" }, Tr = {
|
|
1870
1866
|
key: 2,
|
|
1871
1867
|
class: "grid grid-cols-2 gap-2"
|
|
1872
|
-
},
|
|
1873
|
-
function
|
|
1874
|
-
return
|
|
1868
|
+
}, Er = ["onClick"], Dr = ["src", "alt"], Or = ["src", "alt"], kr = { class: "min-w-0 flex-1" }, Ar = { class: "block text-sm font-semibold text-slate-700" }, jr = { class: "mb-2 flex items-center justify-between text-xs font-semibold text-slate-600" }, Mr = { class: "tabular-nums text-slate-400" }, Nr = ["value"];
|
|
1869
|
+
function Pr(e, t, n, r, i, a) {
|
|
1870
|
+
return B(), N(k, null, [r.collapsed ? (B(), N("button", {
|
|
1875
1871
|
key: 0,
|
|
1876
1872
|
type: "button",
|
|
1877
1873
|
class: "absolute bottom-4 left-4 z-30 inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-3 text-sm font-semibold text-slate-700 shadow-card-hover transition-all hover:border-brand-300 hover:text-brand-700 xl:bottom-auto xl:top-4",
|
|
1878
1874
|
onClick: t[0] ||= (e) => r.collapsed = !1
|
|
1879
1875
|
}, [
|
|
1880
|
-
|
|
1881
|
-
t[25] ||=
|
|
1882
|
-
|
|
1883
|
-
])) : (
|
|
1884
|
-
|
|
1885
|
-
|
|
1876
|
+
I(r.Layers2, { class: "h-4 w-4 text-brand-600" }),
|
|
1877
|
+
t[25] ||= F(" Шари ", -1),
|
|
1878
|
+
P("span", bn, U(r.activeLayersCount), 1)
|
|
1879
|
+
])) : (B(), N("section", xn, [P("div", Sn, [P("div", Cn, [P("label", wn, [
|
|
1880
|
+
P("span", Tn, [I(r.Search, { class: "h-4 w-4" })]),
|
|
1881
|
+
q(P("input", {
|
|
1886
1882
|
"onUpdate:modelValue": t[1] ||= (e) => r.searchModel = e,
|
|
1887
1883
|
type: "text",
|
|
1888
1884
|
autocomplete: "off",
|
|
1889
1885
|
placeholder: "Пошук на карті…",
|
|
1890
1886
|
class: "h-10 w-full rounded-lg border border-slate-200 bg-slate-50 pl-9 pr-9 text-sm text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:border-brand-400 focus:bg-white focus:ring-2 focus:ring-brand-100"
|
|
1891
1887
|
}, null, 512), [[fe, r.searchModel]]),
|
|
1892
|
-
n.searchQuery ? (
|
|
1888
|
+
n.searchQuery ? (B(), N("button", {
|
|
1893
1889
|
key: 0,
|
|
1894
1890
|
type: "button",
|
|
1895
1891
|
title: "Очистити пошук",
|
|
1896
1892
|
"aria-label": "Очистити пошук",
|
|
1897
1893
|
class: "absolute inset-y-0 right-0 flex w-9 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-200/60 hover:text-slate-700",
|
|
1898
1894
|
onClick: t[2] ||= (e) => r.searchModel = ""
|
|
1899
|
-
}, [
|
|
1900
|
-
]),
|
|
1895
|
+
}, [I(r.X, { class: "h-3.5 w-3.5" })])) : M("", !0)
|
|
1896
|
+
]), P("button", {
|
|
1901
1897
|
type: "button",
|
|
1902
1898
|
title: "Згорнути панель шарів",
|
|
1903
1899
|
"aria-label": "Згорнути панель шарів",
|
|
1904
1900
|
class: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-slate-200 text-slate-500 transition-colors hover:border-brand-300 hover:bg-brand-50 hover:text-brand-700",
|
|
1905
1901
|
onClick: t[3] ||= (e) => r.collapsed = !0
|
|
1906
|
-
}, [
|
|
1902
|
+
}, [I(r.X, { class: "h-4 w-4" })])]), r.searchDropdownOpen ? (B(), N("div", En, [n.searchLoading ? (B(), N("p", Dn, "Пошук…")) : n.searchError ? (B(), N("p", On, U(n.searchError), 1)) : n.searchEmpty ? (B(), N("p", kn, "Нічого не знайдено")) : (B(), N("ul", An, [(B(!0), N(k, null, H(n.searchResults, (e) => (B(), N("li", { key: e.id }, [P("button", {
|
|
1907
1903
|
type: "button",
|
|
1908
1904
|
role: "option",
|
|
1909
1905
|
class: "flex w-full flex-col gap-0.5 px-3 py-2.5 text-left transition-colors hover:bg-brand-50",
|
|
1910
1906
|
onClick: (t) => r.emit("selectSearchResult", e)
|
|
1911
|
-
}, [
|
|
1912
|
-
|
|
1907
|
+
}, [P("span", Mn, U(e.number || "Без номера"), 1), P("span", Nn, U(e.address), 1)], 8, jn)]))), 128))]))])) : M("", !0)]), P("div", Pn, [
|
|
1908
|
+
P("div", Fn, [P("button", {
|
|
1913
1909
|
type: "button",
|
|
1914
1910
|
class: "flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.12em] text-slate-400",
|
|
1915
1911
|
onClick: t[4] ||= (e) => r.layersOpen = !r.layersOpen
|
|
1916
|
-
}, [
|
|
1917
|
-
r.layersOpen ? (
|
|
1918
|
-
|
|
1912
|
+
}, [I(r.ChevronDown, { class: R(["h-3.5 w-3.5 transition-transform", r.layersOpen ? "" : "-rotate-90"]) }, null, 8, ["class"]), t[26] ||= F(" Додаткові шари ", -1)]), P("span", In, U(r.activeLayersCount) + " активні", 1)]),
|
|
1913
|
+
r.layersOpen ? (B(), N("div", Ln, [P("div", { class: R(["overflow-hidden rounded-xl border transition-colors", n.applicationsVisible ? "border-brand-300 bg-brand-50/40" : "border-slate-200 bg-white"]) }, [P("div", Rn, [
|
|
1914
|
+
P("button", {
|
|
1919
1915
|
type: "button",
|
|
1920
1916
|
role: "switch",
|
|
1921
1917
|
"aria-checked": n.applicationsVisible,
|
|
1922
1918
|
"aria-label": "Показати звернення",
|
|
1923
|
-
class:
|
|
1919
|
+
class: R(["map-switch-track relative h-5 w-9 shrink-0 overflow-hidden rounded-full focus:outline-none focus:ring-2 focus:ring-brand-200 focus:ring-offset-1", n.applicationsVisible ? "bg-brand-600" : "bg-slate-200"]),
|
|
1924
1920
|
onClick: r.toggleApplications
|
|
1925
|
-
}, [
|
|
1926
|
-
|
|
1921
|
+
}, [P("span", { class: R(["map-switch-knob pointer-events-none absolute top-0.5 h-4 w-4 rounded-full bg-white shadow-sm", n.applicationsVisible ? "left-[18px]" : "left-0.5"]) }, null, 2)], 10, zn),
|
|
1922
|
+
P("button", {
|
|
1927
1923
|
type: "button",
|
|
1928
1924
|
title: r.applicationsLayerName,
|
|
1929
1925
|
class: "min-w-0 flex-1 text-left focus:outline-none",
|
|
1930
1926
|
onClick: t[5] ||= (e) => r.applicationsOpen = !r.applicationsOpen
|
|
1931
|
-
}, [
|
|
1932
|
-
|
|
1933
|
-
t[27] ||=
|
|
1934
|
-
r.activeFilterCount > 0 ? (
|
|
1935
|
-
n.applicationsOpacity < 100 ? (
|
|
1936
|
-
])], 8,
|
|
1937
|
-
|
|
1927
|
+
}, [P("span", Vn, U(r.applicationsLayerName), 1), P("span", Hn, [
|
|
1928
|
+
P("span", Un, U(r.formatCount(r.visibleStatusCount)), 1),
|
|
1929
|
+
t[27] ||= F(" об'єктів ", -1),
|
|
1930
|
+
r.activeFilterCount > 0 ? (B(), N("span", Wn, " фільтри: " + U(r.activeFilterCount), 1)) : M("", !0),
|
|
1931
|
+
n.applicationsOpacity < 100 ? (B(), N("span", Gn, "· " + U(n.applicationsOpacity) + "% непрозорості", 1)) : M("", !0)
|
|
1932
|
+
])], 8, Bn),
|
|
1933
|
+
P("button", {
|
|
1938
1934
|
ref: "menuButtonRef",
|
|
1939
1935
|
type: "button",
|
|
1940
1936
|
"aria-expanded": r.menuOpen,
|
|
1941
1937
|
"aria-label": "Меню шару звернень",
|
|
1942
1938
|
class: "rounded-md p-1 text-slate-400 transition-colors hover:bg-white hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1943
1939
|
onClick: r.toggleApplicationsMenu
|
|
1944
|
-
}, [
|
|
1945
|
-
|
|
1940
|
+
}, [I(r.MoreHorizontal, { class: "h-4 w-4" })], 8, Kn),
|
|
1941
|
+
P("button", {
|
|
1946
1942
|
type: "button",
|
|
1947
1943
|
"aria-label": "Розгорнути фільтри звернень",
|
|
1948
1944
|
class: "rounded-md p-1 text-slate-400 transition-colors hover:bg-white hover:text-brand-600",
|
|
1949
1945
|
onClick: t[6] ||= (e) => r.applicationsOpen = !r.applicationsOpen
|
|
1950
|
-
}, [
|
|
1951
|
-
]), r.applicationsOpen ? (
|
|
1946
|
+
}, [I(r.ChevronDown, { class: R(["h-4 w-4 transition-transform", r.applicationsOpen ? "" : "-rotate-90"]) }, null, 8, ["class"])])
|
|
1947
|
+
]), r.applicationsOpen ? (B(), N("div", {
|
|
1952
1948
|
key: 0,
|
|
1953
|
-
class:
|
|
1949
|
+
class: R(["border-t border-brand-100 px-3 pt-2", r.filtersOpen ? "pb-0" : "pb-3"])
|
|
1954
1950
|
}, [
|
|
1955
|
-
|
|
1956
|
-
|
|
1951
|
+
P("div", qn, [
|
|
1952
|
+
P("button", {
|
|
1957
1953
|
type: "button",
|
|
1958
1954
|
"aria-label": "Попередні роки",
|
|
1959
1955
|
class: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 transition-colors hover:border-brand-300 hover:text-brand-700 disabled:cursor-not-allowed disabled:opacity-35",
|
|
1960
1956
|
disabled: r.yearWindowStart === 0,
|
|
1961
1957
|
onClick: t[7] ||= (e) => r.shiftYearWindow(-1)
|
|
1962
|
-
}, [
|
|
1963
|
-
|
|
1958
|
+
}, [I(r.ChevronLeft, { class: "h-3.5 w-3.5" })], 8, Jn),
|
|
1959
|
+
P("div", Yn, [(B(!0), N(k, null, H(r.visibleYears, (e) => (B(), N("button", {
|
|
1964
1960
|
key: e,
|
|
1965
1961
|
type: "button",
|
|
1966
1962
|
"aria-pressed": r.selectedYears.includes(e),
|
|
1967
|
-
class:
|
|
1963
|
+
class: R(["min-w-0 flex-1 rounded-md px-2 py-1 text-[11px] font-semibold transition-colors", r.selectedYears.includes(e) ? "bg-brand-600 text-white" : "border border-slate-200 bg-white text-slate-500 hover:border-brand-300 hover:text-brand-700"]),
|
|
1968
1964
|
onClick: (t) => r.toggleYear(e)
|
|
1969
|
-
},
|
|
1970
|
-
|
|
1965
|
+
}, U(e), 11, Xn))), 128))]),
|
|
1966
|
+
P("button", {
|
|
1971
1967
|
type: "button",
|
|
1972
1968
|
"aria-label": "Наступні роки",
|
|
1973
1969
|
class: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 transition-colors hover:border-brand-300 hover:text-brand-700 disabled:cursor-not-allowed disabled:opacity-35",
|
|
1974
1970
|
disabled: r.yearWindowStart >= r.maxYearWindowStart,
|
|
1975
1971
|
onClick: t[8] ||= (e) => r.shiftYearWindow(1)
|
|
1976
|
-
}, [
|
|
1972
|
+
}, [I(r.ChevronRight, { class: "h-3.5 w-3.5" })], 8, Zn)
|
|
1977
1973
|
]),
|
|
1978
|
-
r.selectedYears.length > 0 ? (
|
|
1974
|
+
r.selectedYears.length > 0 ? (B(), N("button", {
|
|
1979
1975
|
key: 0,
|
|
1980
1976
|
type: "button",
|
|
1981
1977
|
class: "mb-2 inline-flex items-center gap-1 text-[11px] font-semibold text-brand-700 hover:text-brand-900",
|
|
1982
1978
|
onClick: r.resetYearFilter
|
|
1983
|
-
}, [
|
|
1984
|
-
|
|
1985
|
-
|
|
1979
|
+
}, [I(r.X, { class: "h-3 w-3" }), t[28] ||= F(" Скинути рік ", -1)])) : M("", !0),
|
|
1980
|
+
P("div", Qn, [t[29] ||= P("span", { class: "text-[11px] font-semibold text-slate-400" }, "Швидкі фільтри за статусом", -1), P("span", $n, U(r.formatCount(r.visibleStatusCount)) + " з " + U(r.formatCount(n.totalCount)), 1)]),
|
|
1981
|
+
P("div", er, [(B(!0), N(k, null, H(r.MAP_LEGEND, (e) => (B(), N("button", {
|
|
1986
1982
|
key: e.key,
|
|
1987
1983
|
type: "button",
|
|
1988
1984
|
title: e.label,
|
|
1989
|
-
class:
|
|
1985
|
+
class: R(["flex w-full items-start gap-2 rounded-lg px-2 py-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand-200", n.visibleStatuses.has(e.key) ? "hover:bg-white" : "opacity-45 hover:bg-white/70"]),
|
|
1990
1986
|
onClick: (t) => r.emit("toggleStatus", e.key)
|
|
1991
1987
|
}, [
|
|
1992
|
-
|
|
1988
|
+
P("span", {
|
|
1993
1989
|
class: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
|
|
1994
|
-
style:
|
|
1990
|
+
style: z({ backgroundColor: e.color })
|
|
1995
1991
|
}, null, 4),
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
], 10,
|
|
2000
|
-
n.visibleStatuses.size === 0 ? (
|
|
2001
|
-
|
|
2002
|
-
|
|
1992
|
+
P("span", nr, U(e.label), 1),
|
|
1993
|
+
P("span", rr, U(r.formatCount(n.statusCounts[e.key] ?? 0)), 1),
|
|
1994
|
+
P("span", ir, U(r.statusPercent(e.key)) + "% ", 1)
|
|
1995
|
+
], 10, tr))), 128))]),
|
|
1996
|
+
n.visibleStatuses.size === 0 ? (B(), N("div", ar, " За вибраними статусами об'єктів не знайдено. ")) : M("", !0),
|
|
1997
|
+
P("div", { class: R(["mt-2 flex items-center gap-2 border-t border-brand-100 pt-2", r.filtersOpen ? "pb-2" : "pb-0"]) }, [
|
|
1998
|
+
P("button", {
|
|
2003
1999
|
type: "button",
|
|
2004
2000
|
class: "text-xs font-semibold text-brand-700 hover:text-brand-900",
|
|
2005
2001
|
onClick: t[9] ||= (e) => r.emit("selectAllStatuses")
|
|
2006
2002
|
}, " Усі "),
|
|
2007
|
-
t[31] ||=
|
|
2008
|
-
|
|
2003
|
+
t[31] ||= P("span", { class: "text-slate-300" }, "·", -1),
|
|
2004
|
+
P("button", {
|
|
2009
2005
|
type: "button",
|
|
2010
2006
|
class: "text-xs font-medium text-slate-500 hover:text-slate-700",
|
|
2011
2007
|
onClick: t[10] ||= (e) => r.emit("clearStatuses")
|
|
2012
2008
|
}, " Скинути "),
|
|
2013
|
-
|
|
2009
|
+
P("button", {
|
|
2014
2010
|
type: "button",
|
|
2015
2011
|
"aria-expanded": r.filtersOpen,
|
|
2016
|
-
class:
|
|
2012
|
+
class: R(["ml-auto inline-flex items-center gap-1.5 rounded-md border bg-white px-2 py-1.5 text-xs font-semibold transition-colors", r.filtersOpen || r.activeFilterCount ? "border-brand-200 text-brand-700" : "border-slate-200 text-slate-600 hover:border-brand-300 hover:text-brand-700"]),
|
|
2017
2013
|
onClick: r.toggleFilters
|
|
2018
2014
|
}, [
|
|
2019
|
-
|
|
2020
|
-
t[30] ||=
|
|
2021
|
-
r.activeFilterCount > 0 ? (
|
|
2022
|
-
], 10,
|
|
2015
|
+
I(r.SlidersHorizontal, { class: "h-3.5 w-3.5" }),
|
|
2016
|
+
t[30] ||= F(" Фільтри ", -1),
|
|
2017
|
+
r.activeFilterCount > 0 ? (B(), N("span", sr, U(r.activeFilterCount), 1)) : M("", !0)
|
|
2018
|
+
], 10, or)
|
|
2023
2019
|
], 2),
|
|
2024
|
-
r.activeFilterChips.length ? (
|
|
2020
|
+
r.activeFilterChips.length ? (B(), N("div", cr, [(B(!0), N(k, null, H(r.activeFilterChips, (e) => (B(), N("button", {
|
|
2025
2021
|
key: e.key,
|
|
2026
2022
|
type: "button",
|
|
2027
2023
|
title: `Прибрати фільтр «${e.label}»`,
|
|
2028
2024
|
class: "inline-flex max-w-full items-center gap-1 rounded-full border border-brand-100 bg-white px-2 py-1 text-[11px] text-brand-700 hover:border-brand-300",
|
|
2029
2025
|
onClick: (t) => r.removeFilter(e.key)
|
|
2030
|
-
}, [
|
|
2031
|
-
r.filtersOpen ? (
|
|
2026
|
+
}, [P("span", ur, U(e.label), 1), I(r.X, { class: "h-3 w-3 shrink-0" })], 8, lr))), 128))])) : M("", !0),
|
|
2027
|
+
r.filtersOpen ? (B(), N("form", {
|
|
2032
2028
|
key: 3,
|
|
2033
2029
|
ref: "filtersFormRef",
|
|
2034
2030
|
class: "-mx-3 border-t border-slate-100 bg-white px-3 py-3",
|
|
2035
|
-
onSubmit:
|
|
2031
|
+
onSubmit: pe(r.applyFilters, ["prevent"])
|
|
2036
2032
|
}, [
|
|
2037
|
-
|
|
2033
|
+
P("div", dr, [t[32] ||= P("div", null, [P("h3", { class: "text-sm font-bold text-slate-800" }, "Розширені фільтри"), P("p", { class: "mt-0.5 text-xs text-slate-400" }, "Звужуйте вибір об'єктів звернень")], -1), P("button", {
|
|
2038
2034
|
type: "button",
|
|
2039
2035
|
"aria-label": "Закрити фільтри",
|
|
2040
2036
|
class: "rounded-md p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700",
|
|
2041
2037
|
onClick: t[11] ||= (e) => r.filtersOpen = !1
|
|
2042
|
-
}, [
|
|
2043
|
-
|
|
2044
|
-
|
|
2038
|
+
}, [I(r.X, { class: "h-4 w-4" })])]),
|
|
2039
|
+
P("div", fr, [
|
|
2040
|
+
P("label", pr, [t[33] ||= P("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Дата від", -1), q(P("input", {
|
|
2045
2041
|
"onUpdate:modelValue": t[12] ||= (e) => r.draftFilters.dateFrom = e,
|
|
2046
2042
|
type: "date",
|
|
2047
2043
|
max: r.draftFilters.dateTo || void 0,
|
|
2048
2044
|
class: "h-9 w-full rounded-lg border border-slate-200 px-2 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
2049
|
-
}, null, 8,
|
|
2050
|
-
|
|
2045
|
+
}, null, 8, mr), [[fe, r.draftFilters.dateFrom]])]),
|
|
2046
|
+
P("label", hr, [t[34] ||= P("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Дата до", -1), q(P("input", {
|
|
2051
2047
|
"onUpdate:modelValue": t[13] ||= (e) => r.draftFilters.dateTo = e,
|
|
2052
2048
|
type: "date",
|
|
2053
2049
|
min: r.draftFilters.dateFrom || void 0,
|
|
2054
2050
|
class: "h-9 w-full rounded-lg border border-slate-200 px-2 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
2055
|
-
}, null, 8,
|
|
2056
|
-
r.dateRangeInvalid ? (
|
|
2057
|
-
|
|
2051
|
+
}, null, 8, gr), [[fe, r.draftFilters.dateTo]])]),
|
|
2052
|
+
r.dateRangeInvalid ? (B(), N("p", _r, " Дата «від» не може бути пізнішою за дату «до». ")) : M("", !0),
|
|
2053
|
+
P("div", vr, [t[35] ||= P("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Вид робіт", -1), I(r.MapFilterSelect, {
|
|
2058
2054
|
"model-value": r.draftFilters.workType ?? [],
|
|
2059
2055
|
label: "Вид робіт",
|
|
2060
2056
|
options: r.WORK_TYPE_OPTIONS.map((e) => ({
|
|
@@ -2063,12 +2059,12 @@ function Fr(e, t, n, r, i, a) {
|
|
|
2063
2059
|
})),
|
|
2064
2060
|
"onUpdate:modelValue": t[14] ||= (e) => r.draftFilters.workType = e
|
|
2065
2061
|
}, null, 8, ["model-value", "options"])]),
|
|
2066
|
-
|
|
2062
|
+
P("label", yr, [t[36] ||= P("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Перевірив", -1), q(P("input", {
|
|
2067
2063
|
"onUpdate:modelValue": t[15] ||= (e) => r.draftFilters.verifiedBy = e,
|
|
2068
2064
|
type: "text",
|
|
2069
2065
|
class: "h-9 w-full rounded-lg border border-slate-200 px-2.5 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
2070
2066
|
}, null, 512), [[fe, r.draftFilters.verifiedBy]])]),
|
|
2071
|
-
|
|
2067
|
+
P("div", br, [t[37] ||= P("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Організація", -1), I(r.MapFilterSuggest, {
|
|
2072
2068
|
"model-value": r.draftFilters.organization ?? [],
|
|
2073
2069
|
labels: r.draftOrganizationLabels,
|
|
2074
2070
|
label: "Організація",
|
|
@@ -2077,7 +2073,7 @@ function Fr(e, t, n, r, i, a) {
|
|
|
2077
2073
|
"onUpdate:modelValue": t[16] ||= (e) => r.draftFilters.organization = e,
|
|
2078
2074
|
"onUpdate:labels": t[17] ||= (e) => r.draftOrganizationLabels = e
|
|
2079
2075
|
}, null, 8, ["model-value", "labels"])]),
|
|
2080
|
-
|
|
2076
|
+
P("div", xr, [t[38] ||= P("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Адреса", -1), I(r.MapFilterSuggest, {
|
|
2081
2077
|
"model-value": r.draftFilters.address ?? [],
|
|
2082
2078
|
labels: r.draftAddressLabels,
|
|
2083
2079
|
label: "Адреса",
|
|
@@ -2087,17 +2083,17 @@ function Fr(e, t, n, r, i, a) {
|
|
|
2087
2083
|
"onUpdate:labels": t[19] ||= (e) => r.draftAddressLabels = e
|
|
2088
2084
|
}, null, 8, ["model-value", "labels"])])
|
|
2089
2085
|
]),
|
|
2090
|
-
|
|
2086
|
+
P("div", Sr, [P("button", {
|
|
2091
2087
|
type: "button",
|
|
2092
2088
|
class: "inline-flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-slate-200 px-3 py-2 text-xs font-semibold text-slate-600 hover:bg-slate-50",
|
|
2093
2089
|
onClick: r.resetFilters
|
|
2094
|
-
}, [
|
|
2090
|
+
}, [I(r.RotateCcw, { class: "h-3.5 w-3.5" }), t[39] ||= F(" Скинути ", -1)]), P("button", {
|
|
2095
2091
|
type: "submit",
|
|
2096
2092
|
disabled: r.dateRangeInvalid,
|
|
2097
2093
|
class: "flex-1 rounded-lg bg-brand-600 px-3 py-2 text-xs font-semibold text-white hover:bg-brand-700 disabled:cursor-not-allowed disabled:opacity-50"
|
|
2098
|
-
}, " Застосувати ", 8,
|
|
2099
|
-
], 544)) :
|
|
2100
|
-
], 2)) :
|
|
2094
|
+
}, " Застосувати ", 8, Cr)])
|
|
2095
|
+
], 544)) : M("", !0)
|
|
2096
|
+
], 2)) : M("", !0)], 2), (B(!0), N(k, null, H(n.overlays, (e) => (B(), j(r.OverlayLayerRow, {
|
|
2101
2097
|
key: e.id,
|
|
2102
2098
|
layer: e,
|
|
2103
2099
|
visible: n.activeOverlayIds.includes(e.id),
|
|
@@ -2127,56 +2123,56 @@ function Fr(e, t, n, r, i, a) {
|
|
|
2127
2123
|
"onToggleMenu",
|
|
2128
2124
|
"onToggleLegend",
|
|
2129
2125
|
"onRetry"
|
|
2130
|
-
]))), 128))])) :
|
|
2131
|
-
r.layerNotice ? (
|
|
2126
|
+
]))), 128))])) : M("", !0),
|
|
2127
|
+
r.layerNotice ? (B(), N("button", {
|
|
2132
2128
|
key: 1,
|
|
2133
2129
|
type: "button",
|
|
2134
2130
|
class: "mt-2 flex w-full items-center justify-between rounded-lg border border-brand-100 bg-brand-50 px-3 py-2 text-left text-xs text-brand-800",
|
|
2135
2131
|
role: "status",
|
|
2136
2132
|
onClick: t[21] ||= (e) => r.layerNotice = null
|
|
2137
|
-
}, [
|
|
2138
|
-
|
|
2133
|
+
}, [P("span", null, U(r.layerNotice), 1), I(r.X, { class: "h-3.5 w-3.5 shrink-0" })])) : M("", !0),
|
|
2134
|
+
P("div", wr, [P("button", {
|
|
2139
2135
|
type: "button",
|
|
2140
2136
|
class: "flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.12em] text-slate-400",
|
|
2141
2137
|
onClick: t[22] ||= (e) => r.baseOpen = !r.baseOpen
|
|
2142
|
-
}, [
|
|
2143
|
-
r.baseOpen ? (
|
|
2138
|
+
}, [I(r.ChevronDown, { class: R(["h-3.5 w-3.5 transition-transform", r.baseOpen ? "" : "-rotate-90"]) }, null, 8, ["class"]), t[40] ||= F(" Базові шари ", -1)]), t[41] ||= P("span", { class: "text-[11px] text-slate-400" }, "1 активний", -1)]),
|
|
2139
|
+
r.baseOpen ? (B(), N("div", Tr, [(B(!0), N(k, null, H(n.baseLayers, (e) => (B(), N("button", {
|
|
2144
2140
|
key: e.id,
|
|
2145
2141
|
type: "button",
|
|
2146
|
-
class:
|
|
2142
|
+
class: R(["group rounded-xl border p-1.5 text-left transition-all focus:outline-none focus:ring-2 focus:ring-brand-200", n.basemapId === e.id ? "border-brand-500 bg-brand-50 shadow-sm" : "border-slate-200 bg-white hover:border-brand-300"]),
|
|
2147
2143
|
onClick: (t) => r.emit("basemapChange", e.id)
|
|
2148
|
-
}, [
|
|
2144
|
+
}, [P("img", {
|
|
2149
2145
|
src: r.basemapPreview(e),
|
|
2150
2146
|
alt: e.label,
|
|
2151
2147
|
class: "block h-12 w-full rounded-md object-cover"
|
|
2152
|
-
}, null, 8,
|
|
2148
|
+
}, null, 8, Dr), P("span", { class: R(["mt-1.5 flex items-center gap-1 px-0.5 text-xs font-semibold", n.basemapId === e.id ? "text-brand-700" : "text-slate-600"]) }, [n.basemapId === e.id ? (B(), j(r.Check, {
|
|
2153
2149
|
key: 0,
|
|
2154
2150
|
class: "h-3 w-3"
|
|
2155
|
-
})) :
|
|
2151
|
+
})) : M("", !0), F(" " + U(e.label), 1)], 2)], 10, Er))), 128))])) : r.activeBasemap ? (B(), N("button", {
|
|
2156
2152
|
key: 3,
|
|
2157
2153
|
type: "button",
|
|
2158
2154
|
class: "flex w-full items-center gap-3 rounded-xl border border-slate-200 bg-slate-50 p-2 text-left transition-colors hover:border-brand-300 hover:bg-brand-50/40",
|
|
2159
2155
|
onClick: t[23] ||= (e) => r.baseOpen = !0
|
|
2160
2156
|
}, [
|
|
2161
|
-
|
|
2157
|
+
P("img", {
|
|
2162
2158
|
src: r.basemapPreview(r.activeBasemap),
|
|
2163
2159
|
alt: r.activeBasemap.label,
|
|
2164
2160
|
class: "block h-12 w-16 shrink-0 rounded-md object-cover"
|
|
2165
|
-
}, null, 8,
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
])) :
|
|
2169
|
-
])])),
|
|
2170
|
-
default:
|
|
2161
|
+
}, null, 8, Or),
|
|
2162
|
+
P("span", kr, [P("span", Ar, U(r.activeBasemap.label), 1), t[42] ||= P("span", { class: "block text-[11px] text-slate-400" }, "Підложка карти", -1)]),
|
|
2163
|
+
I(r.ChevronDown, { class: "h-4 w-4 text-slate-400" })
|
|
2164
|
+
])) : M("", !0)
|
|
2165
|
+
])])), I(r.SurveyorTeleport, null, {
|
|
2166
|
+
default: K(() => [r.menuOpen && r.menuPosition ? (B(), N("div", {
|
|
2171
2167
|
key: 0,
|
|
2172
2168
|
ref: "menuRef",
|
|
2173
2169
|
role: "menu",
|
|
2174
2170
|
class: "fixed z-[70] w-52 rounded-xl border border-slate-200 bg-white p-3 shadow-xl",
|
|
2175
|
-
style:
|
|
2171
|
+
style: z({
|
|
2176
2172
|
top: `${r.menuPosition.top}px`,
|
|
2177
2173
|
left: `${r.menuPosition.left}px`
|
|
2178
2174
|
})
|
|
2179
|
-
}, [
|
|
2175
|
+
}, [P("div", jr, [t[43] ||= P("span", null, "Непрозорість", -1), P("span", Mr, U(n.applicationsOpacity) + "%", 1)]), P("input", {
|
|
2180
2176
|
type: "range",
|
|
2181
2177
|
min: "0",
|
|
2182
2178
|
max: "100",
|
|
@@ -2184,11 +2180,11 @@ function Fr(e, t, n, r, i, a) {
|
|
|
2184
2180
|
"aria-label": "Непрозорість шару звернень",
|
|
2185
2181
|
class: "w-full accent-brand-600",
|
|
2186
2182
|
onInput: t[24] ||= (e) => r.emit("update:applicationsOpacity", Number(e.target.value))
|
|
2187
|
-
}, null, 40,
|
|
2183
|
+
}, null, 40, Nr)], 4)) : M("", !0)]),
|
|
2188
2184
|
_: 1
|
|
2189
2185
|
})], 64);
|
|
2190
2186
|
}
|
|
2191
|
-
var
|
|
2187
|
+
var Fr = /*#__PURE__*/ e(yn, [["render", Pr], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapLayersPanel.vue"]]), Ir = "flex h-9 w-9 items-center justify-center text-slate-600 transition-colors hover:bg-brand-50 hover:text-brand-600", Lr = /*@__PURE__*/ L({
|
|
2192
2188
|
__name: "MapControls",
|
|
2193
2189
|
props: { visibleCount: {
|
|
2194
2190
|
type: Number,
|
|
@@ -2203,15 +2199,15 @@ var Ir = /*#__PURE__*/ e(bn, [["render", Fr], ["__file", "C:/softpro/surveyor/ad
|
|
|
2203
2199
|
t();
|
|
2204
2200
|
let r = {
|
|
2205
2201
|
emit: n,
|
|
2206
|
-
groupedButtonClass:
|
|
2202
|
+
groupedButtonClass: Ir,
|
|
2207
2203
|
get Compass() {
|
|
2208
|
-
return
|
|
2204
|
+
return Q;
|
|
2209
2205
|
},
|
|
2210
2206
|
get Minus() {
|
|
2211
|
-
return
|
|
2207
|
+
return xe;
|
|
2212
2208
|
},
|
|
2213
2209
|
get Plus() {
|
|
2214
|
-
return
|
|
2210
|
+
return Ce;
|
|
2215
2211
|
}
|
|
2216
2212
|
};
|
|
2217
2213
|
return Object.defineProperty(r, "__isScriptSetup", {
|
|
@@ -2219,39 +2215,39 @@ var Ir = /*#__PURE__*/ e(bn, [["render", Fr], ["__file", "C:/softpro/surveyor/ad
|
|
|
2219
2215
|
value: !0
|
|
2220
2216
|
}), r;
|
|
2221
2217
|
}
|
|
2222
|
-
}),
|
|
2223
|
-
function
|
|
2224
|
-
return
|
|
2225
|
-
|
|
2218
|
+
}), Rr = { class: "absolute right-3 top-3 z-20 flex flex-col gap-1.5" }, zr = { class: "flex flex-col overflow-hidden rounded-lg border border-slate-200 bg-white shadow-card" }, Br = { class: "absolute bottom-3 right-3 z-10 flex items-center gap-2 rounded-md bg-white/80 px-2.5 py-1 text-[11px] text-slate-400 backdrop-blur-sm" };
|
|
2219
|
+
function Vr(e, t, n, r, i, a) {
|
|
2220
|
+
return B(), N(k, null, [P("div", Rr, [P("div", zr, [
|
|
2221
|
+
P("button", {
|
|
2226
2222
|
type: "button",
|
|
2227
2223
|
title: "Збільшити",
|
|
2228
2224
|
"aria-label": "Збільшити",
|
|
2229
|
-
class:
|
|
2225
|
+
class: R(r.groupedButtonClass),
|
|
2230
2226
|
onClick: t[0] ||= (e) => r.emit("zoomIn")
|
|
2231
|
-
}, [
|
|
2232
|
-
t[3] ||=
|
|
2233
|
-
|
|
2227
|
+
}, [I(r.Plus, { class: "h-4 w-4" })]),
|
|
2228
|
+
t[3] ||= P("div", { class: "h-px bg-slate-100" }, null, -1),
|
|
2229
|
+
P("button", {
|
|
2234
2230
|
type: "button",
|
|
2235
2231
|
title: "Зменшити",
|
|
2236
2232
|
"aria-label": "Зменшити",
|
|
2237
|
-
class:
|
|
2233
|
+
class: R(r.groupedButtonClass),
|
|
2238
2234
|
onClick: t[1] ||= (e) => r.emit("zoomOut")
|
|
2239
|
-
}, [
|
|
2240
|
-
t[4] ||=
|
|
2241
|
-
|
|
2235
|
+
}, [I(r.Minus, { class: "h-4 w-4" })]),
|
|
2236
|
+
t[4] ||= P("div", { class: "h-px bg-slate-100" }, null, -1),
|
|
2237
|
+
P("button", {
|
|
2242
2238
|
type: "button",
|
|
2243
2239
|
title: "Північ/Південь/Захід/Схід",
|
|
2244
2240
|
"aria-label": "Північ/Південь/Захід/Схід",
|
|
2245
|
-
class:
|
|
2241
|
+
class: R(r.groupedButtonClass),
|
|
2246
2242
|
onClick: t[2] ||= (e) => r.emit("resetView")
|
|
2247
|
-
}, [
|
|
2248
|
-
])]),
|
|
2249
|
-
t[5] ||=
|
|
2250
|
-
t[6] ||=
|
|
2251
|
-
|
|
2243
|
+
}, [I(r.Compass, { class: "h-4 w-4" })])
|
|
2244
|
+
])]), P("div", Br, [
|
|
2245
|
+
t[5] ||= P("span", null, "MapLibre", -1),
|
|
2246
|
+
t[6] ||= P("span", { class: "text-slate-300" }, "·", -1),
|
|
2247
|
+
P("span", null, "Точок: " + U(n.visibleCount), 1)
|
|
2252
2248
|
])], 64);
|
|
2253
2249
|
}
|
|
2254
|
-
var
|
|
2250
|
+
var Hr = /*#__PURE__*/ e(Lr, [["render", Vr], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapControls.vue"]]), Ur = /*@__PURE__*/ L({
|
|
2255
2251
|
__name: "MapPointTooltip",
|
|
2256
2252
|
props: {
|
|
2257
2253
|
points: {
|
|
@@ -2277,7 +2273,7 @@ var Ur = /*#__PURE__*/ e(Rr, [["render", Hr], ["__file", "C:/softpro/surveyor/ad
|
|
|
2277
2273
|
},
|
|
2278
2274
|
setup(e, { expose: t }) {
|
|
2279
2275
|
t();
|
|
2280
|
-
let n = e, r =
|
|
2276
|
+
let n = e, r = A(() => n.points.slice(0, 6)), i = A(() => n.points.length === 1 && n.total <= 1), a = A(() => Math.max(n.total - r.value.length, 0)), o = A(() => i.value ? 156 : 40 + r.value.length * 52 + (a.value ? 28 : 8)), s = A(() => {
|
|
2281
2277
|
let e = n.position.x + 15;
|
|
2282
2278
|
return e + 256 > n.containerWidth - 8 && (e = n.position.x - 256 - 15), e = Math.min(Math.max(e, 8), Math.max(n.containerWidth - 256 - 8, 8)), n.position.y + 15 + o.value > n.containerHeight - 8 ? {
|
|
2283
2279
|
left: `${e}px`,
|
|
@@ -2289,7 +2285,7 @@ var Ur = /*#__PURE__*/ e(Rr, [["render", Hr], ["__file", "C:/softpro/surveyor/ad
|
|
|
2289
2285
|
};
|
|
2290
2286
|
});
|
|
2291
2287
|
function c(e) {
|
|
2292
|
-
return
|
|
2288
|
+
return v[e] ?? "#64748b";
|
|
2293
2289
|
}
|
|
2294
2290
|
function l(e) {
|
|
2295
2291
|
return y[e] ?? e;
|
|
@@ -2303,42 +2299,42 @@ var Ur = /*#__PURE__*/ e(Rr, [["render", Hr], ["__file", "C:/softpro/surveyor/ad
|
|
|
2303
2299
|
style: s,
|
|
2304
2300
|
color: c,
|
|
2305
2301
|
statusLabel: l,
|
|
2306
|
-
point:
|
|
2302
|
+
point: A(() => n.points[0])
|
|
2307
2303
|
};
|
|
2308
2304
|
return Object.defineProperty(u, "__isScriptSetup", {
|
|
2309
2305
|
enumerable: !1,
|
|
2310
2306
|
value: !0
|
|
2311
2307
|
}), u;
|
|
2312
2308
|
}
|
|
2313
|
-
}),
|
|
2309
|
+
}), Wr = { class: "mb-2 flex items-center gap-2" }, Gr = { class: "text-sm font-semibold text-slate-800" }, Kr = { class: "space-y-1.5 text-xs" }, qr = { class: "flex justify-between gap-2" }, Jr = { class: "font-medium text-slate-700" }, Yr = { class: "flex justify-between gap-2" }, Xr = { class: "font-medium text-slate-700" }, Zr = { class: "flex justify-between gap-2" }, Qr = { class: "text-right font-medium text-slate-700" }, $r = { class: "flex justify-between gap-2" }, ei = { class: "text-right font-medium text-slate-700" }, ti = { class: "mb-2 text-xs font-semibold text-slate-500" }, ni = { class: "space-y-2" }, ri = { class: "flex items-center gap-2" }, ii = { class: "truncate text-sm font-semibold text-slate-800" }, ai = { class: "truncate pl-4 text-[11px] text-slate-500" }, oi = {
|
|
2314
2310
|
key: 0,
|
|
2315
2311
|
class: "mt-2 text-[11px] font-medium text-slate-400"
|
|
2316
2312
|
};
|
|
2317
|
-
function
|
|
2318
|
-
return
|
|
2313
|
+
function si(e, t, n, r, i, a) {
|
|
2314
|
+
return B(), N("div", {
|
|
2319
2315
|
class: "pointer-events-none absolute z-30 w-64 rounded-lg border border-slate-200 bg-white p-3 shadow-card-hover",
|
|
2320
|
-
style:
|
|
2321
|
-
}, [r.single && r.point ? (
|
|
2316
|
+
style: z(r.style)
|
|
2317
|
+
}, [r.single && r.point ? (B(), N(k, { key: 0 }, [P("div", Wr, [P("span", {
|
|
2322
2318
|
class: "h-2.5 w-2.5 shrink-0 rounded-full",
|
|
2323
|
-
style:
|
|
2324
|
-
}, null, 4),
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
])], 64)) : (
|
|
2330
|
-
|
|
2331
|
-
|
|
2319
|
+
style: z({ backgroundColor: r.color(r.point.status) })
|
|
2320
|
+
}, null, 4), P("span", Gr, U(r.point.number), 1)]), P("dl", Kr, [
|
|
2321
|
+
P("div", qr, [t[0] ||= P("dt", { class: "text-slate-400" }, "Ідентифікатор", -1), P("dd", Jr, U(r.point.id), 1)]),
|
|
2322
|
+
P("div", Yr, [t[1] ||= P("dt", { class: "text-slate-400" }, "Статус", -1), P("dd", Xr, U(r.statusLabel(r.point.status)), 1)]),
|
|
2323
|
+
P("div", Zr, [t[2] ||= P("dt", { class: "text-slate-400" }, "Вид робіт", -1), P("dd", Qr, U(r.point.workType), 1)]),
|
|
2324
|
+
P("div", $r, [t[3] ||= P("dt", { class: "text-slate-400" }, "Організація", -1), P("dd", ei, U(r.point.organization), 1)])
|
|
2325
|
+
])], 64)) : (B(), N(k, { key: 1 }, [
|
|
2326
|
+
P("p", ti, " Звернення в точці · " + U(n.total), 1),
|
|
2327
|
+
P("ul", ni, [(B(!0), N(k, null, H(r.visiblePoints, (e) => (B(), N("li", {
|
|
2332
2328
|
key: e.id,
|
|
2333
2329
|
class: "min-w-0"
|
|
2334
|
-
}, [
|
|
2330
|
+
}, [P("div", ri, [P("span", {
|
|
2335
2331
|
class: "h-2 w-2 shrink-0 rounded-full",
|
|
2336
|
-
style:
|
|
2337
|
-
}, null, 4),
|
|
2338
|
-
r.hiddenCount ? (
|
|
2332
|
+
style: z({ backgroundColor: r.color(e.status) })
|
|
2333
|
+
}, null, 4), P("span", ii, U(e.number), 1)]), P("p", ai, U(r.statusLabel(e.status)) + " · " + U(e.organization), 1)]))), 128))]),
|
|
2334
|
+
r.hiddenCount ? (B(), N("p", oi, " Ще " + U(r.hiddenCount), 1)) : M("", !0)
|
|
2339
2335
|
], 64))], 4);
|
|
2340
2336
|
}
|
|
2341
|
-
var
|
|
2337
|
+
var ci = /*#__PURE__*/ e(Ur, [["render", si], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapPointTooltip.vue"]]), li = /*@__PURE__*/ L({
|
|
2342
2338
|
__name: "MapApplicationPanel",
|
|
2343
2339
|
props: {
|
|
2344
2340
|
rows: {
|
|
@@ -2394,7 +2390,7 @@ var li = /*#__PURE__*/ e(Wr, [["render", ci], ["__file", "C:/softpro/surveyor/ad
|
|
|
2394
2390
|
e.middle_name
|
|
2395
2391
|
].filter(Boolean).join(" ") : "";
|
|
2396
2392
|
}
|
|
2397
|
-
let c =
|
|
2393
|
+
let c = A(() => a(r.application?.organization)), l = A(() => a(r.application?.surveyor)), u = {
|
|
2398
2394
|
props: r,
|
|
2399
2395
|
emit: i,
|
|
2400
2396
|
firstRelation: a,
|
|
@@ -2402,8 +2398,8 @@ var li = /*#__PURE__*/ e(Wr, [["render", ci], ["__file", "C:/softpro/surveyor/ad
|
|
|
2402
2398
|
personName: s,
|
|
2403
2399
|
organization: c,
|
|
2404
2400
|
surveyor: l,
|
|
2405
|
-
showList:
|
|
2406
|
-
fields:
|
|
2401
|
+
showList: A(() => !r.application),
|
|
2402
|
+
fields: A(() => {
|
|
2407
2403
|
let e = r.application;
|
|
2408
2404
|
if (!e) return [];
|
|
2409
2405
|
let t = s(l.value) || e.surveyor_id_data?.text || "—", n = l.value?.phone || c.value?.phone || "—";
|
|
@@ -2470,96 +2466,96 @@ var li = /*#__PURE__*/ e(Wr, [["render", ci], ["__file", "C:/softpro/surveyor/ad
|
|
|
2470
2466
|
return me;
|
|
2471
2467
|
},
|
|
2472
2468
|
get ChevronLeft() {
|
|
2473
|
-
return
|
|
2469
|
+
return X;
|
|
2474
2470
|
},
|
|
2475
2471
|
get X() {
|
|
2476
|
-
return
|
|
2472
|
+
return De;
|
|
2477
2473
|
},
|
|
2478
|
-
AppealStatusBadge:
|
|
2474
|
+
AppealStatusBadge: S
|
|
2479
2475
|
};
|
|
2480
2476
|
return Object.defineProperty(u, "__isScriptSetup", {
|
|
2481
2477
|
enumerable: !1,
|
|
2482
2478
|
value: !0
|
|
2483
2479
|
}), u;
|
|
2484
2480
|
}
|
|
2485
|
-
}),
|
|
2481
|
+
}), ui = { class: "absolute right-16 top-3 z-20 flex max-h-[calc(100%-3.75rem)] w-[min(360px,calc(100vw-6rem))] flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-card-hover" }, di = { class: "flex items-start justify-between gap-3 border-b border-slate-100 px-4 py-3" }, fi = { class: "flex min-w-0 items-start gap-1" }, pi = { class: "min-w-0" }, mi = { class: "text-[11px] font-semibold uppercase tracking-wide text-slate-400" }, hi = { class: "truncate text-base font-semibold text-slate-900" }, gi = { class: "min-h-0 flex-auto overflow-y-auto px-4 py-3" }, _i = {
|
|
2486
2482
|
key: 0,
|
|
2487
2483
|
class: "py-8 text-center text-sm text-slate-400"
|
|
2488
|
-
},
|
|
2484
|
+
}, vi = {
|
|
2489
2485
|
key: 1,
|
|
2490
2486
|
class: "py-8 text-center text-sm text-red-600"
|
|
2491
|
-
},
|
|
2487
|
+
}, yi = {
|
|
2492
2488
|
key: 2,
|
|
2493
2489
|
class: "py-8 text-center text-sm text-slate-400"
|
|
2494
|
-
},
|
|
2490
|
+
}, bi = {
|
|
2495
2491
|
key: 3,
|
|
2496
2492
|
class: "space-y-2"
|
|
2497
|
-
},
|
|
2493
|
+
}, xi = ["onClick"], Si = { class: "flex items-center justify-between gap-2" }, Ci = { class: "truncate text-sm font-semibold text-slate-800" }, wi = { class: "truncate text-xs text-slate-500" }, Ti = { class: "truncate text-xs text-slate-400" }, Ei = {
|
|
2498
2494
|
key: 4,
|
|
2499
2495
|
class: "py-8 text-center text-sm text-slate-400"
|
|
2500
|
-
},
|
|
2496
|
+
}, Di = { class: "space-y-2.5" }, Oi = { class: "text-[11px] font-medium text-slate-400" }, ki = { class: "text-[13px] font-medium leading-snug text-slate-800" }, Ai = {
|
|
2501
2497
|
key: 0,
|
|
2502
2498
|
class: "flex items-center justify-between gap-3 border-t border-slate-100 px-4 py-3"
|
|
2503
|
-
},
|
|
2499
|
+
}, ji = ["disabled"], Mi = { class: "text-xs text-slate-400" }, Ni = ["disabled"], Pi = {
|
|
2504
2500
|
key: 1,
|
|
2505
2501
|
class: "border-t border-slate-100 px-4 py-3"
|
|
2506
2502
|
};
|
|
2507
|
-
function
|
|
2508
|
-
return
|
|
2509
|
-
|
|
2503
|
+
function Fi(e, t, n, r, i, a) {
|
|
2504
|
+
return B(), N("aside", ui, [
|
|
2505
|
+
P("header", di, [P("div", fi, [n.application && n.total > 1 ? (B(), N("button", {
|
|
2510
2506
|
key: 0,
|
|
2511
2507
|
type: "button",
|
|
2512
2508
|
class: "mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
2513
2509
|
"aria-label": "До списку",
|
|
2514
2510
|
onClick: t[0] ||= (e) => r.emit("back")
|
|
2515
|
-
}, [
|
|
2511
|
+
}, [I(r.ChevronLeft, { class: "h-4 w-4" })])) : M("", !0), P("div", pi, [P("p", mi, U(r.showList ? "Звернення в точці" : "Звернення"), 1), P("h2", hi, [r.showList ? (B(), N(k, { key: 0 }, [F(U(n.total), 1)], 64)) : (B(), N(k, { key: 1 }, [F(U(n.application?.number || (n.loading ? "Завантаження…" : "—")), 1)], 64))])])]), P("button", {
|
|
2516
2512
|
type: "button",
|
|
2517
2513
|
class: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
2518
2514
|
"aria-label": "Закрити",
|
|
2519
2515
|
onClick: t[1] ||= (e) => r.emit("close")
|
|
2520
|
-
}, [
|
|
2521
|
-
|
|
2516
|
+
}, [I(r.X, { class: "h-4 w-4" })])]),
|
|
2517
|
+
P("div", gi, [n.loading && !n.rows.length ? (B(), N("p", _i, "Завантаження…")) : n.error ? (B(), N("p", vi, U(n.error), 1)) : r.showList && !n.rows.length ? (B(), N("p", yi, " У цій точці немає звернень ")) : r.showList ? (B(), N("ul", bi, [(B(!0), N(k, null, H(n.rows, (e) => (B(), N("li", { key: e.app_id }, [P("button", {
|
|
2522
2518
|
type: "button",
|
|
2523
2519
|
class: "flex w-full flex-col gap-1 rounded-lg border border-slate-200 px-3 py-2.5 text-left transition-colors hover:border-brand-300 hover:bg-brand-50",
|
|
2524
2520
|
onClick: (t) => r.emit("select", e)
|
|
2525
2521
|
}, [
|
|
2526
|
-
|
|
2522
|
+
P("span", Si, [P("span", Ci, U(e.number || "—"), 1), I(r.AppealStatusBadge, {
|
|
2527
2523
|
status: e.status || "",
|
|
2528
2524
|
label: e.status_data?.text || void 0,
|
|
2529
2525
|
size: "sm"
|
|
2530
2526
|
}, null, 8, ["status", "label"])]),
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
], 8,
|
|
2527
|
+
P("span", wi, U(e.work_type_data?.text || "—"), 1),
|
|
2528
|
+
P("span", Ti, U(e.org_id_data?.text || "—"), 1)
|
|
2529
|
+
], 8, xi)]))), 128))])) : n.loading ? (B(), N("p", Ei, "Завантаження…")) : n.application ? (B(), N(k, { key: 5 }, [I(r.AppealStatusBadge, {
|
|
2534
2530
|
class: "mb-3",
|
|
2535
2531
|
status: n.application.status || "",
|
|
2536
2532
|
label: n.application.status_data?.text || void 0,
|
|
2537
2533
|
size: "sm"
|
|
2538
|
-
}, null, 8, ["status", "label"]),
|
|
2539
|
-
r.showList && n.pageCount > 1 ? (
|
|
2540
|
-
|
|
2534
|
+
}, null, 8, ["status", "label"]), P("dl", Di, [(B(!0), N(k, null, H(r.fields, (e) => (B(), N("div", { key: e.label }, [P("dt", Oi, U(e.label), 1), P("dd", ki, U(e.value), 1)]))), 128))])], 64)) : M("", !0)]),
|
|
2535
|
+
r.showList && n.pageCount > 1 ? (B(), N("footer", Ai, [
|
|
2536
|
+
P("button", {
|
|
2541
2537
|
type: "button",
|
|
2542
2538
|
class: "rounded-md px-2 py-1 text-[13px] font-medium text-slate-600 transition-colors hover:bg-slate-100 disabled:pointer-events-none disabled:text-slate-300",
|
|
2543
2539
|
disabled: n.page <= 1 || n.loading,
|
|
2544
2540
|
onClick: t[2] ||= (e) => r.emit("page", n.page - 1)
|
|
2545
|
-
}, " Назад ", 8,
|
|
2546
|
-
|
|
2547
|
-
|
|
2541
|
+
}, " Назад ", 8, ji),
|
|
2542
|
+
P("span", Mi, U(n.page) + " / " + U(n.pageCount), 1),
|
|
2543
|
+
P("button", {
|
|
2548
2544
|
type: "button",
|
|
2549
2545
|
class: "rounded-md px-2 py-1 text-[13px] font-medium text-slate-600 transition-colors hover:bg-slate-100 disabled:pointer-events-none disabled:text-slate-300",
|
|
2550
2546
|
disabled: n.page >= n.pageCount || n.loading,
|
|
2551
2547
|
onClick: t[3] ||= (e) => r.emit("page", n.page + 1)
|
|
2552
|
-
}, " Далі ", 8,
|
|
2553
|
-
])) : n.application?.app_id && !n.loading && !n.error ? (
|
|
2548
|
+
}, " Далі ", 8, Ni)
|
|
2549
|
+
])) : n.application?.app_id && !n.loading && !n.error ? (B(), N("footer", Pi, [I(r.RouterLink, {
|
|
2554
2550
|
to: `/requests/${n.application.app_id}`,
|
|
2555
2551
|
class: "inline-flex text-[13px] font-medium text-brand-600 transition-colors hover:text-brand-800 hover:underline"
|
|
2556
2552
|
}, {
|
|
2557
|
-
default:
|
|
2553
|
+
default: K(() => [...t[4] ||= [F(" Відкрити картку звернення ", -1)]]),
|
|
2558
2554
|
_: 1
|
|
2559
|
-
}, 8, ["to"])])) :
|
|
2555
|
+
}, 8, ["to"])])) : M("", !0)
|
|
2560
2556
|
]);
|
|
2561
2557
|
}
|
|
2562
|
-
var
|
|
2558
|
+
var Ii = /*#__PURE__*/ e(li, [["render", Fi], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapApplicationPanel.vue"]]), Li = 300, Ri = [
|
|
2563
2559
|
"z",
|
|
2564
2560
|
"x",
|
|
2565
2561
|
"y",
|
|
@@ -2571,10 +2567,10 @@ var Li = /*#__PURE__*/ e(ui, [["render", Ii], ["__file", "C:/softpro/surveyor/ad
|
|
|
2571
2567
|
"layers",
|
|
2572
2568
|
"app"
|
|
2573
2569
|
];
|
|
2574
|
-
function
|
|
2575
|
-
let n = he(), r =
|
|
2570
|
+
function zi(e, t = {}) {
|
|
2571
|
+
let n = he(), r = J(), i = !1, a = !1, o, s = "";
|
|
2576
2572
|
function c() {
|
|
2577
|
-
return JSON.stringify(
|
|
2573
|
+
return JSON.stringify(ct({
|
|
2578
2574
|
view: e.mapView.value,
|
|
2579
2575
|
sel: e.sel.value,
|
|
2580
2576
|
identifyPage: e.identifyPage.value,
|
|
@@ -2588,15 +2584,15 @@ function Bi(e, t = {}) {
|
|
|
2588
2584
|
}));
|
|
2589
2585
|
}
|
|
2590
2586
|
function l() {
|
|
2591
|
-
let r =
|
|
2587
|
+
let r = ot(n.query);
|
|
2592
2588
|
i = !0, r.view && (e.mapView.value = r.view, t.onViewFromRoute?.(r.view)), e.sel.value = r.sel, e.identifyPage.value = r.identifyPage, r.basemapId && (e.basemapId.value = r.basemapId), r.layerIds != null && (e.activeOverlayIds.value = [...r.layerIds]), r.applicationsVisible != null && (e.applicationsVisible.value = r.applicationsVisible), r.visibleStatuses && (e.visibleStatuses.value = new Set(r.visibleStatuses)), e.searchQuery.value = r.search, e.appliedSearch.value = r.search, e.advancedFilters.value = { ...r.advancedFilters }, s = c(), i = !1;
|
|
2593
2589
|
}
|
|
2594
2590
|
function u() {
|
|
2595
|
-
return l(),
|
|
2591
|
+
return l(), ot(n.query);
|
|
2596
2592
|
}
|
|
2597
2593
|
function d() {
|
|
2598
2594
|
if (i) return;
|
|
2599
|
-
let t =
|
|
2595
|
+
let t = ct({
|
|
2600
2596
|
view: e.mapView.value,
|
|
2601
2597
|
sel: e.sel.value,
|
|
2602
2598
|
identifyPage: e.identifyPage.value,
|
|
@@ -2609,29 +2605,29 @@ function Bi(e, t = {}) {
|
|
|
2609
2605
|
advancedFilters: e.advancedFilters.value
|
|
2610
2606
|
}), o = JSON.stringify(t);
|
|
2611
2607
|
if (o === s) return;
|
|
2612
|
-
if (
|
|
2608
|
+
if (lt(n.query, t)) {
|
|
2613
2609
|
s = o;
|
|
2614
2610
|
return;
|
|
2615
2611
|
}
|
|
2616
2612
|
s = o, a = !0;
|
|
2617
2613
|
let c = {};
|
|
2618
|
-
for (let e of
|
|
2614
|
+
for (let e of Ri) c[e] = t[e];
|
|
2619
2615
|
r.replace({ query: c });
|
|
2620
2616
|
}
|
|
2621
2617
|
function f() {
|
|
2622
2618
|
i || d();
|
|
2623
2619
|
}
|
|
2624
2620
|
function p() {
|
|
2625
|
-
i || (clearTimeout(o), o = setTimeout(d,
|
|
2621
|
+
i || (clearTimeout(o), o = setTimeout(d, Li));
|
|
2626
2622
|
}
|
|
2627
2623
|
function m() {
|
|
2628
|
-
|
|
2624
|
+
G(() => n.query, () => {
|
|
2629
2625
|
if (a) {
|
|
2630
2626
|
a = !1;
|
|
2631
2627
|
return;
|
|
2632
2628
|
}
|
|
2633
2629
|
l();
|
|
2634
|
-
}, { deep: !0 }),
|
|
2630
|
+
}, { deep: !0 }), G([
|
|
2635
2631
|
e.sel,
|
|
2636
2632
|
e.identifyPage,
|
|
2637
2633
|
e.basemapId,
|
|
@@ -2641,7 +2637,7 @@ function Bi(e, t = {}) {
|
|
|
2641
2637
|
e.visibleStatuses,
|
|
2642
2638
|
e.appliedSearch,
|
|
2643
2639
|
e.advancedFilters
|
|
2644
|
-
], () => f(), { deep: !0 }),
|
|
2640
|
+
], () => f(), { deep: !0 }), G(e.mapView, () => p(), { deep: !0 });
|
|
2645
2641
|
}
|
|
2646
2642
|
function h() {
|
|
2647
2643
|
clearTimeout(o);
|
|
@@ -2655,136 +2651,136 @@ function Bi(e, t = {}) {
|
|
|
2655
2651
|
}
|
|
2656
2652
|
//#endregion
|
|
2657
2653
|
//#region admin/src/pages/map/index.vue?vue&type=script&setup=true&lang.ts
|
|
2658
|
-
var
|
|
2654
|
+
var Bi = 350, Vi = /*@__PURE__*/ L({
|
|
2659
2655
|
__name: "index",
|
|
2660
2656
|
setup(e, { expose: t }) {
|
|
2661
2657
|
t();
|
|
2662
|
-
let n = he(), r =
|
|
2663
|
-
function
|
|
2664
|
-
return
|
|
2665
|
-
lng:
|
|
2666
|
-
lat:
|
|
2667
|
-
zoom:
|
|
2658
|
+
let n = he(), r = W("mapViewRef"), i = V(null), a = V(""), o = V(""), s = V([]), c = V(!1), d = V(!1), f = V(""), g = V({}), _ = A(() => ({ ...g.value })), v, y, b = 0, S = V(!0), C = V(100), w = V(l), T = V(h), ee = V(null), E = V([]), D = V([]), te = V({}), O = V({}), { zoom: ne, centerLngLat: re } = qe();
|
|
2659
|
+
function ae() {
|
|
2660
|
+
return re.value ? {
|
|
2661
|
+
lng: re.value[0],
|
|
2662
|
+
lat: re.value[1],
|
|
2663
|
+
zoom: ne.value
|
|
2668
2664
|
} : null;
|
|
2669
2665
|
}
|
|
2670
|
-
function
|
|
2671
|
-
return
|
|
2666
|
+
function oe() {
|
|
2667
|
+
return ot(n.query).view ?? ae();
|
|
2672
2668
|
}
|
|
2673
|
-
let
|
|
2669
|
+
let se = oe(), k = V(se?.zoom ?? ne.value), j = V(se), M = V(se), N = /* @__PURE__ */ new Map(), P = A(() => T.value[0]?.id ?? l), F = A(() => T.value.find((e) => e.id === w.value) ?? T.value[0] ?? h[0]);
|
|
2674
2670
|
function I(e) {
|
|
2675
|
-
if (e.basemapId &&
|
|
2676
|
-
|
|
2677
|
-
let t =
|
|
2671
|
+
if (e.basemapId && T.value.some((t) => t.id === e.basemapId) && (w.value = e.basemapId), e.layerIds != null) {
|
|
2672
|
+
D.value = e.layerIds.filter((e) => {
|
|
2673
|
+
let t = E.value.find((t) => t.id === e);
|
|
2678
2674
|
if (!t || !u(t)) return !1;
|
|
2679
2675
|
let n = m(t);
|
|
2680
|
-
return n == null ||
|
|
2681
|
-
}),
|
|
2682
|
-
for (let e of
|
|
2676
|
+
return n == null || k.value >= n;
|
|
2677
|
+
}), O.value = {};
|
|
2678
|
+
for (let e of D.value) z(e, "loading");
|
|
2683
2679
|
}
|
|
2684
2680
|
e.applicationsVisible != null && (S.value = e.applicationsVisible);
|
|
2685
2681
|
}
|
|
2686
2682
|
async function L() {
|
|
2687
2683
|
let e = await ie("map");
|
|
2688
|
-
|
|
2684
|
+
T.value = e.baseLayers, w.value = e.baseLayers[0]?.id ?? e.defaultBaseId, ee.value = e.overlays.find((e) => e.kind === "applications") ?? null, E.value = e.overlays.filter((e) => e.kind === "raster" || e.kind === "vector"), D.value = E.value.filter((e) => {
|
|
2689
2685
|
if (!e.defaultVisible || !u(e)) return !1;
|
|
2690
2686
|
let t = m(e);
|
|
2691
|
-
return t == null ||
|
|
2692
|
-
}).map((e) => e.id),
|
|
2693
|
-
for (let e of
|
|
2694
|
-
|
|
2687
|
+
return t == null || k.value >= t;
|
|
2688
|
+
}).map((e) => e.id), te.value = Object.fromEntries(E.value.map((e) => [e.id, Math.round(p(e) * 100)])), O.value = {};
|
|
2689
|
+
for (let e of D.value) z(e, "loading");
|
|
2690
|
+
ee.value && (S.value = ee.value.defaultVisible, C.value = Math.round(ee.value.opacity * 100));
|
|
2695
2691
|
}
|
|
2696
2692
|
function R(e) {
|
|
2697
2693
|
let t = N.get(e);
|
|
2698
2694
|
t && (clearTimeout(t), N.delete(e));
|
|
2699
2695
|
}
|
|
2700
2696
|
function z(e, t) {
|
|
2701
|
-
R(e),
|
|
2702
|
-
...
|
|
2697
|
+
R(e), O.value = {
|
|
2698
|
+
...O.value,
|
|
2703
2699
|
[e]: t
|
|
2704
2700
|
}, t === "loading" && N.set(e, setTimeout(() => {
|
|
2705
|
-
|
|
2706
|
-
...
|
|
2701
|
+
O.value[e] === "loading" && (O.value = {
|
|
2702
|
+
...O.value,
|
|
2707
2703
|
[e]: "error"
|
|
2708
2704
|
}), N.delete(e);
|
|
2709
2705
|
}, 1e4));
|
|
2710
2706
|
}
|
|
2711
|
-
function
|
|
2712
|
-
let t =
|
|
2707
|
+
function B(e) {
|
|
2708
|
+
let t = E.value.find((t) => t.id === e);
|
|
2713
2709
|
if (!t || !u(t)) return !1;
|
|
2714
2710
|
let n = m(t);
|
|
2715
|
-
return n == null ||
|
|
2711
|
+
return n == null || k.value >= n;
|
|
2716
2712
|
}
|
|
2717
|
-
function
|
|
2718
|
-
let t =
|
|
2719
|
-
if (!n ||
|
|
2720
|
-
if (
|
|
2713
|
+
function H(e) {
|
|
2714
|
+
let t = D.value, n = !t.includes(e);
|
|
2715
|
+
if (!n || B(e)) {
|
|
2716
|
+
if (D.value = n ? [...t, e] : t.filter((t) => t !== e), !n) {
|
|
2721
2717
|
R(e);
|
|
2722
|
-
let t = { ...
|
|
2723
|
-
delete t[e],
|
|
2718
|
+
let t = { ...O.value };
|
|
2719
|
+
delete t[e], O.value = t;
|
|
2724
2720
|
return;
|
|
2725
2721
|
}
|
|
2726
2722
|
r.value?.overlaySourceReady(e) ? z(e, "ready") : z(e, "loading");
|
|
2727
2723
|
}
|
|
2728
2724
|
}
|
|
2729
|
-
function
|
|
2730
|
-
|
|
2731
|
-
...
|
|
2725
|
+
function de(e, t) {
|
|
2726
|
+
te.value = {
|
|
2727
|
+
...te.value,
|
|
2732
2728
|
[e]: t
|
|
2733
2729
|
};
|
|
2734
2730
|
}
|
|
2735
|
-
function
|
|
2736
|
-
if (!
|
|
2737
|
-
if (!
|
|
2738
|
-
|
|
2731
|
+
function U(e) {
|
|
2732
|
+
if (!D.value.includes(e)) {
|
|
2733
|
+
if (!B(e)) return;
|
|
2734
|
+
D.value = [...D.value, e];
|
|
2739
2735
|
}
|
|
2740
2736
|
z(e, "loading"), r.value?.reloadOverlay(e);
|
|
2741
2737
|
}
|
|
2742
|
-
function
|
|
2738
|
+
function fe(e) {
|
|
2743
2739
|
r.value?.zoomToOverlay(e);
|
|
2744
2740
|
}
|
|
2745
|
-
let
|
|
2741
|
+
let K = V(Object.fromEntries(x.map((e) => [e, 0]))), q = V(new Set(mn.map((e) => e.key))), pe = V(null), me = V(null), J = V(null), ge = V(null), Y = V([]), _e = V(0), X = V(1), Z = V(null), Q = V(!1), ve = V(""), $ = 0, ye = V({
|
|
2746
2742
|
width: 0,
|
|
2747
2743
|
height: 0
|
|
2748
|
-
}), be =
|
|
2744
|
+
}), be = A(() => x.reduce((e, t) => e + (K.value[t] ?? 0), 0)), xe = A(() => S.value ? [...q.value].reduce((e, t) => e + (K.value[t] ?? 0), 0) : 0);
|
|
2749
2745
|
function Se() {
|
|
2750
|
-
|
|
2746
|
+
q.value = new Set(mn.map((e) => e.key));
|
|
2751
2747
|
}
|
|
2752
2748
|
function Ce() {
|
|
2753
|
-
|
|
2749
|
+
q.value = /* @__PURE__ */ new Set();
|
|
2754
2750
|
}
|
|
2755
2751
|
function we(e) {
|
|
2756
|
-
let t = new Set(
|
|
2757
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
2752
|
+
let t = new Set(q.value);
|
|
2753
|
+
t.has(e) ? t.delete(e) : t.add(e), q.value = t;
|
|
2758
2754
|
}
|
|
2759
|
-
let Te =
|
|
2760
|
-
let e = (
|
|
2761
|
-
return
|
|
2755
|
+
let Te = A(() => Math.max(1, Math.ceil(Y.value.length / 10))), Ee = A(() => {
|
|
2756
|
+
let e = (X.value - 1) * 10;
|
|
2757
|
+
return Y.value.slice(e, e + 10);
|
|
2762
2758
|
});
|
|
2763
2759
|
function De(e, t) {
|
|
2764
|
-
|
|
2760
|
+
pe.value = e, me.value = t;
|
|
2765
2761
|
}
|
|
2766
2762
|
function Oe() {
|
|
2767
|
-
$ += 1,
|
|
2763
|
+
$ += 1, ge.value = null, Y.value = [], _e.value = 0, X.value = 1, J.value = null, Z.value = null, Q.value = !1, ve.value = "";
|
|
2768
2764
|
}
|
|
2769
2765
|
function ke(e) {
|
|
2770
|
-
|
|
2766
|
+
Z.value = e, J.value = e.app_id;
|
|
2771
2767
|
}
|
|
2772
2768
|
async function Ae(e, t = ++$) {
|
|
2773
|
-
|
|
2769
|
+
J.value = e.app_id, ve.value = "", Q.value = !0, Z.value = {
|
|
2774
2770
|
app_id: e.app_id,
|
|
2775
2771
|
number: e.number,
|
|
2776
2772
|
status: e.status ?? null,
|
|
2777
2773
|
status_data: e.status_data ?? null
|
|
2778
2774
|
};
|
|
2779
2775
|
try {
|
|
2780
|
-
let n = await
|
|
2776
|
+
let n = await Re(e.app_id);
|
|
2781
2777
|
if (t !== $) return;
|
|
2782
2778
|
ke(n);
|
|
2783
2779
|
} catch (e) {
|
|
2784
2780
|
if (t !== $) return;
|
|
2785
|
-
|
|
2781
|
+
ve.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
|
|
2786
2782
|
} finally {
|
|
2787
|
-
t === $ && (
|
|
2783
|
+
t === $ && (Q.value = !1);
|
|
2788
2784
|
}
|
|
2789
2785
|
}
|
|
2790
2786
|
async function je(e) {
|
|
@@ -2793,31 +2789,31 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
2793
2789
|
lng: 24.0297,
|
|
2794
2790
|
lat: 49.8397
|
|
2795
2791
|
};
|
|
2796
|
-
|
|
2792
|
+
ge.value = {
|
|
2797
2793
|
lng: t.lng,
|
|
2798
2794
|
lat: t.lat
|
|
2799
|
-
},
|
|
2795
|
+
}, ve.value = "", Q.value = !0;
|
|
2800
2796
|
try {
|
|
2801
|
-
let t = await
|
|
2802
|
-
|
|
2797
|
+
let t = await Re(e.sel);
|
|
2798
|
+
Y.value = [t], _e.value = 1, X.value = 1, ke(t);
|
|
2803
2799
|
} catch (e) {
|
|
2804
|
-
|
|
2800
|
+
ve.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
|
|
2805
2801
|
} finally {
|
|
2806
|
-
|
|
2802
|
+
Q.value = !1;
|
|
2807
2803
|
}
|
|
2808
2804
|
}
|
|
2809
2805
|
function Me(e) {
|
|
2810
|
-
j.value = e,
|
|
2806
|
+
j.value = e, k.value = e.zoom;
|
|
2811
2807
|
}
|
|
2812
|
-
let { readInitialRouteState: Ne, bindMapRouteSync: Pe, syncRouteNow: Fe, clearViewDebounce:
|
|
2808
|
+
let { readInitialRouteState: Ne, bindMapRouteSync: Pe, syncRouteNow: Fe, clearViewDebounce: Ie } = zi({
|
|
2813
2809
|
mapView: j,
|
|
2814
|
-
sel:
|
|
2815
|
-
identifyPage:
|
|
2816
|
-
basemapId:
|
|
2810
|
+
sel: J,
|
|
2811
|
+
identifyPage: X,
|
|
2812
|
+
basemapId: w,
|
|
2817
2813
|
defaultBasemapId: P,
|
|
2818
|
-
activeOverlayIds:
|
|
2814
|
+
activeOverlayIds: D,
|
|
2819
2815
|
applicationsVisible: S,
|
|
2820
|
-
visibleStatuses:
|
|
2816
|
+
visibleStatuses: q,
|
|
2821
2817
|
searchQuery: a,
|
|
2822
2818
|
appliedSearch: o,
|
|
2823
2819
|
advancedFilters: g
|
|
@@ -2826,15 +2822,15 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
2826
2822
|
} });
|
|
2827
2823
|
function Be(e) {
|
|
2828
2824
|
let t = ++$;
|
|
2829
|
-
if (
|
|
2825
|
+
if (ge.value = {
|
|
2830
2826
|
lng: e.lng,
|
|
2831
2827
|
lat: e.lat
|
|
2832
|
-
},
|
|
2833
|
-
|
|
2828
|
+
}, X.value = 1, Z.value = null, J.value = null, ve.value = "", Q.value = !1, !q.value.size) {
|
|
2829
|
+
Y.value = [], _e.value = 0;
|
|
2834
2830
|
return;
|
|
2835
2831
|
}
|
|
2836
|
-
let n =
|
|
2837
|
-
|
|
2832
|
+
let n = pn(e.points);
|
|
2833
|
+
Y.value = n, _e.value = n.length, n.length === 1 && Ae(n[0], t);
|
|
2838
2834
|
}
|
|
2839
2835
|
function Ve(e) {
|
|
2840
2836
|
if (!e?.points.length) {
|
|
@@ -2844,10 +2840,10 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
2844
2840
|
Be(e);
|
|
2845
2841
|
}
|
|
2846
2842
|
function He(e) {
|
|
2847
|
-
e < 1 || e > Te.value || (
|
|
2843
|
+
e < 1 || e > Te.value || (X.value = e, Z.value = null, J.value = null);
|
|
2848
2844
|
}
|
|
2849
2845
|
function Ue() {
|
|
2850
|
-
$ += 1,
|
|
2846
|
+
$ += 1, Z.value = null, J.value = null, Q.value = !1, ve.value = "";
|
|
2851
2847
|
}
|
|
2852
2848
|
function We() {
|
|
2853
2849
|
i.value && (ye.value = {
|
|
@@ -2855,56 +2851,56 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
2855
2851
|
height: i.value.clientHeight
|
|
2856
2852
|
});
|
|
2857
2853
|
}
|
|
2858
|
-
|
|
2859
|
-
|
|
2854
|
+
G(() => Array.from(q.value).sort().join(","), () => {
|
|
2855
|
+
ge.value && (Y.value = Y.value.filter((e) => q.value.has(e.status ?? "")), _e.value = Y.value.length, Z.value && !q.value.has(Z.value.status ?? "") && ($ += 1, Z.value = null, J.value = null, Q.value = !1), X.value > Te.value && (X.value = 1));
|
|
2860
2856
|
});
|
|
2861
2857
|
function Ge() {
|
|
2862
2858
|
s.value = [], c.value = !1, d.value = !1, f.value = "";
|
|
2863
2859
|
}
|
|
2864
|
-
function
|
|
2865
|
-
Oe(),
|
|
2860
|
+
function Ke(e) {
|
|
2861
|
+
Oe(), J.value = e.id, r.value?.fitApplicationGeometry(e.geometry);
|
|
2866
2862
|
}
|
|
2867
2863
|
async function Je(e) {
|
|
2868
2864
|
let t = e.trim();
|
|
2869
|
-
if (
|
|
2865
|
+
if (y?.abort(), !t) {
|
|
2870
2866
|
Ge();
|
|
2871
2867
|
return;
|
|
2872
2868
|
}
|
|
2873
|
-
let n = ++
|
|
2874
|
-
|
|
2869
|
+
let n = ++b, r = new AbortController();
|
|
2870
|
+
y = r, c.value = !0, d.value = !1, f.value = "", s.value = [];
|
|
2875
2871
|
try {
|
|
2876
|
-
let e = await
|
|
2877
|
-
if (n !==
|
|
2878
|
-
s.value = e.data, d.value = e.total === 0, e.total === 1 && e.data[0] &&
|
|
2872
|
+
let e = await ze(t, { signal: r.signal });
|
|
2873
|
+
if (n !== b) return;
|
|
2874
|
+
s.value = e.data, d.value = e.total === 0, e.total === 1 && e.data[0] && Ke(e.data[0]);
|
|
2879
2875
|
} catch (e) {
|
|
2880
|
-
if (r.signal.aborted || n !==
|
|
2876
|
+
if (r.signal.aborted || n !== b) return;
|
|
2881
2877
|
s.value = [], d.value = !1, f.value = e instanceof Error ? e.message : "Не вдалося виконати пошук";
|
|
2882
2878
|
} finally {
|
|
2883
|
-
n ===
|
|
2879
|
+
n === b && (c.value = !1);
|
|
2884
2880
|
}
|
|
2885
2881
|
}
|
|
2886
|
-
|
|
2887
|
-
clearTimeout(
|
|
2882
|
+
G(a, (e) => {
|
|
2883
|
+
clearTimeout(v);
|
|
2888
2884
|
let t = e.trim();
|
|
2889
2885
|
if (!t) {
|
|
2890
|
-
o.value = "",
|
|
2886
|
+
o.value = "", b += 1, y?.abort(), Ge();
|
|
2891
2887
|
return;
|
|
2892
2888
|
}
|
|
2893
|
-
|
|
2889
|
+
v = setTimeout(() => {
|
|
2894
2890
|
o.value = t, Je(e);
|
|
2895
|
-
},
|
|
2891
|
+
}, Bi);
|
|
2896
2892
|
});
|
|
2897
2893
|
let Ye;
|
|
2898
2894
|
le(async () => {
|
|
2899
2895
|
We(), i.value && (Ye = new ResizeObserver(We), Ye.observe(i.value));
|
|
2900
|
-
let e = Ne(), t = e.view ??
|
|
2901
|
-
M.value = t, !e.view && t && (j.value = t,
|
|
2902
|
-
|
|
2896
|
+
let e = Ne(), t = e.view ?? ae();
|
|
2897
|
+
M.value = t, !e.view && t && (j.value = t, k.value = t.zoom), e.search && Je(e.search), await L(), I(e), await ce(), t && r.value?.setView(t, !1), await je(e), Pe(), Fe(), Le().then((e) => {
|
|
2898
|
+
K.value = e;
|
|
2903
2899
|
}).catch((e) => {
|
|
2904
2900
|
console.error(e);
|
|
2905
2901
|
});
|
|
2906
2902
|
}), ue(() => {
|
|
2907
|
-
Ye?.disconnect(), clearTimeout(
|
|
2903
|
+
Ye?.disconnect(), clearTimeout(v), Ie(), y?.abort();
|
|
2908
2904
|
for (let e of N.values()) clearTimeout(e);
|
|
2909
2905
|
N.clear();
|
|
2910
2906
|
});
|
|
@@ -2912,7 +2908,7 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
2912
2908
|
route: n,
|
|
2913
2909
|
mapViewRef: r,
|
|
2914
2910
|
containerRef: i,
|
|
2915
|
-
SEARCH_DEBOUNCE_MS:
|
|
2911
|
+
SEARCH_DEBOUNCE_MS: Bi,
|
|
2916
2912
|
searchQuery: a,
|
|
2917
2913
|
appliedSearch: o,
|
|
2918
2914
|
searchResults: s,
|
|
@@ -2922,38 +2918,38 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
2922
2918
|
advancedFilters: g,
|
|
2923
2919
|
mapFilters: _,
|
|
2924
2920
|
get searchTimer() {
|
|
2925
|
-
return
|
|
2921
|
+
return v;
|
|
2926
2922
|
},
|
|
2927
2923
|
set searchTimer(e) {
|
|
2928
|
-
|
|
2924
|
+
v = e;
|
|
2929
2925
|
},
|
|
2930
2926
|
get searchAbort() {
|
|
2931
|
-
return
|
|
2927
|
+
return y;
|
|
2932
2928
|
},
|
|
2933
2929
|
set searchAbort(e) {
|
|
2934
|
-
|
|
2930
|
+
y = e;
|
|
2935
2931
|
},
|
|
2936
2932
|
get searchRequestId() {
|
|
2937
|
-
return
|
|
2933
|
+
return b;
|
|
2938
2934
|
},
|
|
2939
2935
|
set searchRequestId(e) {
|
|
2940
|
-
|
|
2936
|
+
b = e;
|
|
2941
2937
|
},
|
|
2942
2938
|
applicationsVisible: S,
|
|
2943
|
-
applicationsOpacity:
|
|
2944
|
-
basemapId:
|
|
2945
|
-
baseLayers:
|
|
2946
|
-
applicationsLayer:
|
|
2947
|
-
overlayLayers:
|
|
2948
|
-
activeOverlayIds:
|
|
2949
|
-
overlayOpacities:
|
|
2950
|
-
overlayLoad:
|
|
2951
|
-
settingsZoom:
|
|
2952
|
-
centerLngLat:
|
|
2953
|
-
settingsMapView:
|
|
2954
|
-
resolveInitialMapView:
|
|
2955
|
-
initialMapView:
|
|
2956
|
-
mapZoom:
|
|
2939
|
+
applicationsOpacity: C,
|
|
2940
|
+
basemapId: w,
|
|
2941
|
+
baseLayers: T,
|
|
2942
|
+
applicationsLayer: ee,
|
|
2943
|
+
overlayLayers: E,
|
|
2944
|
+
activeOverlayIds: D,
|
|
2945
|
+
overlayOpacities: te,
|
|
2946
|
+
overlayLoad: O,
|
|
2947
|
+
settingsZoom: ne,
|
|
2948
|
+
centerLngLat: re,
|
|
2949
|
+
settingsMapView: ae,
|
|
2950
|
+
resolveInitialMapView: oe,
|
|
2951
|
+
initialMapView: se,
|
|
2952
|
+
mapZoom: k,
|
|
2957
2953
|
mapView: j,
|
|
2958
2954
|
mapInitialView: M,
|
|
2959
2955
|
overlayLoadTimers: N,
|
|
@@ -2963,23 +2959,23 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
2963
2959
|
loadLayerSettings: L,
|
|
2964
2960
|
clearOverlayLoadTimer: R,
|
|
2965
2961
|
setOverlayLoad: z,
|
|
2966
|
-
overlayCanTurnOn:
|
|
2967
|
-
toggleOverlay:
|
|
2968
|
-
setOverlayOpacity:
|
|
2969
|
-
retryOverlay:
|
|
2970
|
-
zoomToOverlay:
|
|
2971
|
-
statusCounts:
|
|
2972
|
-
visibleStatuses:
|
|
2973
|
-
hovered:
|
|
2974
|
-
hoverPosition:
|
|
2975
|
-
selectedId:
|
|
2976
|
-
identifyPoint:
|
|
2977
|
-
identifyRows:
|
|
2978
|
-
identifyTotal:
|
|
2979
|
-
identifyPage:
|
|
2980
|
-
selectedApplication:
|
|
2981
|
-
selectedLoading:
|
|
2982
|
-
selectedError:
|
|
2962
|
+
overlayCanTurnOn: B,
|
|
2963
|
+
toggleOverlay: H,
|
|
2964
|
+
setOverlayOpacity: de,
|
|
2965
|
+
retryOverlay: U,
|
|
2966
|
+
zoomToOverlay: fe,
|
|
2967
|
+
statusCounts: K,
|
|
2968
|
+
visibleStatuses: q,
|
|
2969
|
+
hovered: pe,
|
|
2970
|
+
hoverPosition: me,
|
|
2971
|
+
selectedId: J,
|
|
2972
|
+
identifyPoint: ge,
|
|
2973
|
+
identifyRows: Y,
|
|
2974
|
+
identifyTotal: _e,
|
|
2975
|
+
identifyPage: X,
|
|
2976
|
+
selectedApplication: Z,
|
|
2977
|
+
selectedLoading: Q,
|
|
2978
|
+
selectedError: ve,
|
|
2983
2979
|
get selectRequestId() {
|
|
2984
2980
|
return $;
|
|
2985
2981
|
},
|
|
@@ -3003,14 +2999,14 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
3003
2999
|
readInitialRouteState: Ne,
|
|
3004
3000
|
bindMapRouteSync: Pe,
|
|
3005
3001
|
syncRouteNow: Fe,
|
|
3006
|
-
clearViewDebounce:
|
|
3002
|
+
clearViewDebounce: Ie,
|
|
3007
3003
|
openSelectionFromTiles: Be,
|
|
3008
3004
|
handlePointSelect: Ve,
|
|
3009
3005
|
showIdentifyPage: He,
|
|
3010
3006
|
backToIdentifyList: Ue,
|
|
3011
3007
|
updateContainerSize: We,
|
|
3012
3008
|
clearSearchState: Ge,
|
|
3013
|
-
selectSearchResult:
|
|
3009
|
+
selectSearchResult: Ke,
|
|
3014
3010
|
runMapSearch: Je,
|
|
3015
3011
|
get resizeObserver() {
|
|
3016
3012
|
return Ye;
|
|
@@ -3018,24 +3014,24 @@ var Vi = 350, Hi = /*@__PURE__*/ I({
|
|
|
3018
3014
|
set resizeObserver(e) {
|
|
3019
3015
|
Ye = e;
|
|
3020
3016
|
},
|
|
3021
|
-
MapView:
|
|
3022
|
-
MapLayersPanel:
|
|
3023
|
-
MapControls:
|
|
3024
|
-
MapPointTooltip:
|
|
3025
|
-
MapApplicationPanel:
|
|
3017
|
+
MapView: pt,
|
|
3018
|
+
MapLayersPanel: Fr,
|
|
3019
|
+
MapControls: Hr,
|
|
3020
|
+
MapPointTooltip: ci,
|
|
3021
|
+
MapApplicationPanel: Ii
|
|
3026
3022
|
};
|
|
3027
3023
|
return Object.defineProperty(Xe, "__isScriptSetup", {
|
|
3028
3024
|
enumerable: !1,
|
|
3029
3025
|
value: !0
|
|
3030
3026
|
}), Xe;
|
|
3031
3027
|
}
|
|
3032
|
-
}),
|
|
3028
|
+
}), Hi = { class: "flex h-full min-h-0 w-full flex-1 flex-col" }, Ui = {
|
|
3033
3029
|
ref: "containerRef",
|
|
3034
3030
|
class: "relative h-full min-h-0 flex-1 overflow-hidden bg-slate-100"
|
|
3035
3031
|
};
|
|
3036
|
-
function
|
|
3037
|
-
return
|
|
3038
|
-
|
|
3032
|
+
function Wi(e, t, n, r, i, a) {
|
|
3033
|
+
return B(), N("div", Hi, [P("div", Ui, [
|
|
3034
|
+
I(r.MapView, {
|
|
3039
3035
|
ref: "mapViewRef",
|
|
3040
3036
|
basemap: r.activeBasemap,
|
|
3041
3037
|
overlays: r.overlayLayers,
|
|
@@ -3064,7 +3060,7 @@ function Gi(e, t, n, r, i, a) {
|
|
|
3064
3060
|
"filters",
|
|
3065
3061
|
"initial-view"
|
|
3066
3062
|
]),
|
|
3067
|
-
|
|
3063
|
+
I(r.MapLayersPanel, {
|
|
3068
3064
|
"search-query": r.searchQuery,
|
|
3069
3065
|
"onUpdate:searchQuery": t[1] ||= (e) => r.searchQuery = e,
|
|
3070
3066
|
"applications-visible": r.applicationsVisible,
|
|
@@ -3118,13 +3114,13 @@ function Gi(e, t, n, r, i, a) {
|
|
|
3118
3114
|
"search-empty",
|
|
3119
3115
|
"search-error"
|
|
3120
3116
|
]),
|
|
3121
|
-
|
|
3117
|
+
I(r.MapControls, {
|
|
3122
3118
|
"visible-count": r.visibleCount,
|
|
3123
3119
|
onZoomIn: t[6] ||= (e) => r.mapViewRef?.zoomIn(),
|
|
3124
3120
|
onZoomOut: t[7] ||= (e) => r.mapViewRef?.zoomOut(),
|
|
3125
3121
|
onResetView: t[8] ||= (e) => r.mapViewRef?.resetView()
|
|
3126
3122
|
}, null, 8, ["visible-count"]),
|
|
3127
|
-
r.identifyPoint ? (
|
|
3123
|
+
r.identifyPoint ? (B(), j(r.MapApplicationPanel, {
|
|
3128
3124
|
key: 0,
|
|
3129
3125
|
rows: r.pagedIdentifyRows,
|
|
3130
3126
|
total: r.identifyTotal,
|
|
@@ -3145,8 +3141,8 @@ function Gi(e, t, n, r, i, a) {
|
|
|
3145
3141
|
"application",
|
|
3146
3142
|
"loading",
|
|
3147
3143
|
"error"
|
|
3148
|
-
])) :
|
|
3149
|
-
r.hovered?.points.length && r.hoverPosition ? (
|
|
3144
|
+
])) : M("", !0),
|
|
3145
|
+
r.hovered?.points.length && r.hoverPosition ? (B(), j(r.MapPointTooltip, {
|
|
3150
3146
|
key: 1,
|
|
3151
3147
|
points: r.hovered.points,
|
|
3152
3148
|
total: r.hovered.total,
|
|
@@ -3159,9 +3155,9 @@ function Gi(e, t, n, r, i, a) {
|
|
|
3159
3155
|
"position",
|
|
3160
3156
|
"container-width",
|
|
3161
3157
|
"container-height"
|
|
3162
|
-
])) :
|
|
3158
|
+
])) : M("", !0)
|
|
3163
3159
|
], 512)]);
|
|
3164
3160
|
}
|
|
3165
|
-
var
|
|
3161
|
+
var Gi = /*#__PURE__*/ e(Vi, [["render", Wi], ["__file", "C:/softpro/surveyor/admin/src/pages/map/index.vue"]]);
|
|
3166
3162
|
//#endregion
|
|
3167
|
-
export {
|
|
3163
|
+
export { Gi as default };
|