@opengis/surveyor 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { a as t, c as n, i as r, n as i, r as a, t as o, u as s } from "./appealMapLayers-CQMK3rrz.js";
3
3
  import { t as c } from "./application_status-BhNGiY2I.js";
4
- import { a as l, d as u, i as d, l as f, r as p, s as m, t as ee, u as h } from "./mapLayersApi-CWoQ2be-.js";
5
- import { i as te, n as ne, t as g } from "./geometry-DyhIVRcw.js";
6
- import { t as re } from "./MapLayerMenu-AUeTqgEp.js";
7
- import { Fragment as _, computed as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, normalizeClass as T, onMounted as ie, onUnmounted as ae, openBlock as E, ref as D, renderList as O, shallowRef as oe, toDisplayString as k, vModelText as A, watch as j, withDirectives as M, withKeys as N, withModifiers as P } from "vue";
8
- import { ChevronDown as F, Crosshair as se, History as I, MapPin as ce, MapPinned as le, MessageSquare as L, Send as R, ZoomIn as ue, ZoomOut as de } from "lucide-vue-next";
4
+ import { a as l, d as u, i as d, l as f, r as p, s as m, t as ee, u as h } from "./mapLayersApi-CBLcbADa.js";
5
+ import { i as g, n as te, t as _ } from "./geometry-DyhIVRcw.js";
6
+ import { t as ne } from "./MapLayerMenu-AUeTqgEp.js";
7
+ import { Fragment as v, computed as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, normalizeClass as E, onMounted as re, onUnmounted as ie, openBlock as D, ref as O, renderList as k, shallowRef as ae, toDisplayString as A, vModelText as j, watch as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
8
+ import { ChevronDown as I, Crosshair as oe, History as L, MapPin as se, MapPinned as ce, MessageSquare as R, Send as z, ZoomIn as le, ZoomOut as ue } from "lucide-vue-next";
9
9
  //#region shared/map/components/AppealDetailMap.vue?vue&type=script&setup=true&lang.ts
10
- var z = /*@__PURE__*/ w({
10
+ var B = /*@__PURE__*/ T({
11
11
  __name: "AppealDetailMap",
12
12
  props: {
13
13
  geom: {
@@ -43,18 +43,18 @@ var z = /*@__PURE__*/ w({
43
43
  },
44
44
  setup(e, { expose: c }) {
45
45
  c();
46
- let _ = e, y = r, b = i, x = a, S = [30.5234, 50.4501], C = {
46
+ let v = e, b = r, x = i, S = a, C = [30.5234, 50.4501], w = {
47
47
  padding: 30,
48
48
  maxZoom: 17
49
- }, w = D(null), T = D(null), E = oe(null), O = D(""), k = D(!0), A = D(o), M = D([]), N = D(n), P = D([]);
50
- function F(e) {
51
- return A.value.find((t) => t.id === e) ?? A.value[0] ?? o[0];
52
- }
49
+ }, T = O(null), E = O(null), D = ae(null), k = O(""), A = O(!0), j = O(o), N = O([]), P = O(n), F = O([]);
53
50
  function I(e) {
51
+ return j.value.find((t) => t.id === e) ?? j.value[0] ?? o[0];
52
+ }
53
+ function L(e) {
54
54
  return e.kind === "applications";
55
55
  }
56
- function L() {
57
- let e = t.find(I);
56
+ function R() {
57
+ let e = t.find(L);
58
58
  if (!e) throw Error("Static applications overlay is missing");
59
59
  let n = typeof window < "u" ? window.location.origin : "";
60
60
  return {
@@ -62,10 +62,10 @@ var z = /*@__PURE__*/ w({
62
62
  tiles: e.tiles.map((e) => e.startsWith("/") ? `${n}${e}` : e)
63
63
  };
64
64
  }
65
- async function R() {
65
+ async function z() {
66
66
  let e = await ee("application-card");
67
- A.value = e.baseLayers, N.value = e.defaultBaseId;
68
- let t = e.overlays.filter((e) => e.kind !== "geometry" && e.kind !== "applications"), n = e.overlays.find(I) ?? L(), r = {
67
+ j.value = e.baseLayers, P.value = e.defaultBaseId;
68
+ let t = e.overlays.filter((e) => e.kind !== "geometry" && e.kind !== "applications"), n = e.overlays.find(L) ?? R(), r = {
69
69
  id: n.id,
70
70
  label: n.label,
71
71
  kind: "applications",
@@ -75,49 +75,49 @@ var z = /*@__PURE__*/ w({
75
75
  hasFilters: n.hasFilters,
76
76
  defaultVisible: !1
77
77
  };
78
- M.value = [r, ...t], P.value = M.value.filter((e) => e.defaultVisible).map((e) => e.id);
78
+ N.value = [r, ...t], F.value = N.value.filter((e) => e.defaultVisible).map((e) => e.id);
79
79
  }
80
- let z = null, B, V = null, H = null, U = !1, W = v(() => te(_.geom)), G = v(() => W.value ? ne(W.value) : null), K = v(() => G.value ? g(G.value) : null), fe = v(() => _.variant === "panel" ? "relative min-h-[320px] w-full flex-1" : ["relative w-full transition-all duration-300", _.expanded ? "h-[520px]" : "h-[340px]"]);
81
- function q() {
80
+ let B = null, V, H = null, U = null, W = !1, G = y(() => g(v.geom)), K = y(() => G.value ? te(G.value) : null), q = y(() => K.value ? _(K.value) : null), de = y(() => v.variant === "panel" ? "relative min-h-[320px] w-full flex-1" : ["relative w-full transition-all duration-300", v.expanded ? "h-[520px]" : "h-[340px]"]);
81
+ function J() {
82
82
  return {
83
83
  type: "FeatureCollection",
84
- features: W.value ? [{
84
+ features: G.value ? [{
85
85
  type: "Feature",
86
- geometry: W.value,
86
+ geometry: G.value,
87
87
  properties: {}
88
88
  }] : []
89
89
  };
90
90
  }
91
- function J(e) {
92
- G.value && e.fitBounds(G.value, {
93
- ...C,
91
+ function Y(e) {
92
+ K.value && e.fitBounds(K.value, {
93
+ ...w,
94
94
  duration: 500
95
95
  });
96
96
  }
97
- function Y(e, t) {
98
- let n = q(), r = e.getSource(y);
99
- r?.setData ? r.setData(n) : (e.addSource(y, {
97
+ function X(e, t) {
98
+ let n = J(), r = e.getSource(b);
99
+ r?.setData ? r.setData(n) : (e.addSource(b, {
100
100
  type: "geojson",
101
101
  data: n
102
102
  }), e.addLayer({
103
- id: b,
103
+ id: x,
104
104
  type: "fill",
105
- source: y,
105
+ source: b,
106
106
  paint: {
107
107
  "fill-color": "#3b82f6",
108
108
  "fill-opacity": .35
109
109
  }
110
110
  }), e.addLayer({
111
- id: x,
111
+ id: S,
112
112
  type: "line",
113
- source: y,
113
+ source: b,
114
114
  paint: {
115
115
  "line-color": "#2563eb",
116
116
  "line-width": 3
117
117
  }
118
118
  })), pe(e, t), me(e, t);
119
119
  }
120
- function X(e, t) {
120
+ function Z(e, t) {
121
121
  let n = e.trim(), r = n.match(/^(.+?)\s*\(([^)]+)\)\s*,?\s*(.*)$/);
122
122
  if (r) {
123
123
  let e = r[1].trim(), t = r[2].trim();
@@ -142,27 +142,27 @@ var z = /*@__PURE__*/ w({
142
142
  subtitle: t?.trim() || ""
143
143
  };
144
144
  }
145
- function Z() {
146
- let e = _.address?.trim(), t = _.location?.trim(), n = !!(e && e !== "—"), r = !!(t && t !== "—");
147
- return !n && !r ? null : n ? X(e, r ? t : void 0) : {
145
+ function Q() {
146
+ let e = v.address?.trim(), t = v.location?.trim(), n = !!(e && e !== "—"), r = !!(t && t !== "—");
147
+ return !n && !r ? null : n ? Z(e, r ? t : void 0) : {
148
148
  title: t,
149
149
  subtitle: ""
150
150
  };
151
151
  }
152
- function Q() {
152
+ function fe() {
153
153
  let e = document.createElement("div");
154
154
  return e.className = "appeal-map-pin", e.innerHTML = "\n <svg width=\"28\" height=\"36\" viewBox=\"0 0 28 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M14 0C6.268 0 0 6.268 0 14c0 10.5 14 22 14 22s14-11.5 14-22C28 6.268 21.732 0 14 0z\" fill=\"#2563EB\"/>\n <circle cx=\"14\" cy=\"14\" r=\"5.5\" fill=\"white\"/>\n </svg>\n ", e;
155
155
  }
156
156
  function pe(e, t) {
157
- H?.remove(), H = null, K.value && (H = new t.Marker({
158
- element: Q(),
157
+ U?.remove(), U = null, q.value && (U = new t.Marker({
158
+ element: fe(),
159
159
  anchor: "bottom"
160
- }).setLngLat(K.value).addTo(e));
160
+ }).setLngLat(q.value).addTo(e));
161
161
  }
162
162
  function me(e, t) {
163
- V?.remove(), V = null;
164
- let n = Z();
165
- if (!K.value || !n) return;
163
+ H?.remove(), H = null;
164
+ let n = Q();
165
+ if (!q.value || !n) return;
166
166
  let { title: r, subtitle: i } = n, a = document.createElement("div");
167
167
  a.className = "appeal-map-popup-body";
168
168
  let o = document.createElement("p");
@@ -170,154 +170,154 @@ var z = /*@__PURE__*/ w({
170
170
  let e = document.createElement("p");
171
171
  e.className = "appeal-map-popup-subtitle", e.textContent = i, a.appendChild(e);
172
172
  }
173
- V = new t.Popup({
173
+ H = new t.Popup({
174
174
  closeButton: !0,
175
175
  closeOnClick: !1,
176
176
  offset: 36,
177
177
  maxWidth: "260px",
178
178
  className: "appeal-map-popup",
179
179
  anchor: "bottom"
180
- }).setLngLat(K.value).setDOMContent(a).addTo(e);
180
+ }).setLngLat(q.value).setDOMContent(a).addTo(e);
181
181
  }
182
182
  function $(e) {
183
- l(e, F(N.value), d(e, M.value, [b]));
183
+ l(e, I(P.value), d(e, N.value, [x]));
184
184
  }
185
185
  function he(e) {
186
- m(e, M.value, P.value, b);
186
+ m(e, N.value, F.value, x);
187
187
  }
188
188
  function ge(e) {
189
- N.value !== e && (N.value = e);
189
+ P.value !== e && (P.value = e);
190
190
  }
191
191
  function _e(e) {
192
- let t = P.value;
193
- P.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
192
+ let t = F.value;
193
+ F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
194
194
  }
195
195
  function ve() {
196
- let e = z, t = T.value, n = w.value;
197
- if (!e || !t || !n || E.value || n.clientWidth === 0 || n.clientHeight === 0) return;
196
+ let e = B, t = E.value, n = T.value;
197
+ if (!e || !t || !n || D.value || n.clientWidth === 0 || n.clientHeight === 0) return;
198
198
  let r = new e.Map({
199
199
  container: t,
200
- style: s(F(N.value)),
201
- ...G.value ? {
202
- bounds: G.value,
203
- fitBoundsOptions: C
200
+ style: s(I(P.value)),
201
+ ...K.value ? {
202
+ bounds: K.value,
203
+ fitBoundsOptions: w
204
204
  } : {
205
- center: S,
205
+ center: C,
206
206
  zoom: 16
207
207
  },
208
208
  attributionControl: !1,
209
209
  locale: h
210
210
  });
211
211
  r.on("load", () => {
212
- r.resize(), Y(r, e), he(r), k.value = !1;
212
+ r.resize(), X(r, e), he(r), A.value = !1;
213
213
  }), r.on("error", (e) => {
214
214
  console.warn("[AppealDetailMap]", e?.error ?? e);
215
- }), E.value = r;
215
+ }), D.value = r;
216
216
  }
217
217
  function ye() {
218
- E.value?.zoomIn({ duration: 250 });
218
+ D.value?.zoomIn({ duration: 250 });
219
219
  }
220
220
  function be() {
221
- E.value?.zoomOut({ duration: 250 });
221
+ D.value?.zoomOut({ duration: 250 });
222
222
  }
223
223
  function xe() {
224
- let e = E.value;
225
- e && J(e);
224
+ let e = D.value;
225
+ e && Y(e);
226
226
  }
227
227
  function Se() {
228
- let e = E.value, t = z;
228
+ let e = D.value, t = B;
229
229
  if (!e || !t) return;
230
230
  let n = () => {
231
- Y(e, t), J(e);
231
+ X(e, t), Y(e);
232
232
  };
233
233
  e.isStyleLoaded() ? n() : e.once("load", n);
234
234
  }
235
- j(() => [
236
- W.value,
237
- _.address,
238
- _.location
239
- ], Se), j(N, () => {
240
- let e = E.value;
235
+ M(() => [
236
+ G.value,
237
+ v.address,
238
+ v.location
239
+ ], Se), M(P, () => {
240
+ let e = D.value;
241
241
  if (!e) return;
242
242
  let t = () => $(e);
243
243
  e.isStyleLoaded() ? t() : e.once("load", t);
244
- }), j(P, () => {
245
- let e = E.value;
246
- e?.isStyleLoaded() && p(e, M.value, P.value);
247
- }), ie(async () => {
244
+ }), M(F, () => {
245
+ let e = D.value;
246
+ e?.isStyleLoaded() && p(e, N.value, F.value);
247
+ }), re(async () => {
248
248
  try {
249
- let [e] = await Promise.all([u(), R()]);
250
- z = e;
249
+ let [e] = await Promise.all([u(), z()]);
250
+ B = e;
251
251
  } catch (e) {
252
- console.error(e), k.value = !1, O.value = f;
252
+ console.error(e), A.value = !1, k.value = f;
253
253
  return;
254
254
  }
255
- !U && w.value && (B = new ResizeObserver(() => {
256
- E.value ? E.value.resize() : ve();
257
- }), B.observe(w.value));
258
- }), ae(() => {
259
- U = !0, B?.disconnect(), V?.remove(), V = null, H?.remove(), H = null, E.value?.remove(), E.value = null;
255
+ !W && T.value && (V = new ResizeObserver(() => {
256
+ D.value ? D.value.resize() : ve();
257
+ }), V.observe(T.value));
258
+ }), ie(() => {
259
+ W = !0, V?.disconnect(), H?.remove(), H = null, U?.remove(), U = null, D.value?.remove(), D.value = null;
260
260
  });
261
261
  let Ce = {
262
- props: _,
263
- POLYGON_SOURCE_ID: y,
264
- POLYGON_FILL_ID: b,
265
- POLYGON_LINE_ID: x,
266
- FALLBACK_CENTER: S,
267
- FIT_OPTIONS: C,
268
- mapAreaRef: w,
269
- containerRef: T,
270
- mapRef: E,
271
- mapLoadError: O,
272
- mapLoading: k,
273
- baseLayers: A,
274
- overlayLayers: M,
275
- activeBaseId: N,
276
- activeOverlayIds: P,
277
- baseLayer: F,
278
- isApplications: I,
279
- fallbackApplicationsOverlay: L,
280
- loadLayerSettings: R,
262
+ props: v,
263
+ POLYGON_SOURCE_ID: b,
264
+ POLYGON_FILL_ID: x,
265
+ POLYGON_LINE_ID: S,
266
+ FALLBACK_CENTER: C,
267
+ FIT_OPTIONS: w,
268
+ mapAreaRef: T,
269
+ containerRef: E,
270
+ mapRef: D,
271
+ mapLoadError: k,
272
+ mapLoading: A,
273
+ baseLayers: j,
274
+ overlayLayers: N,
275
+ activeBaseId: P,
276
+ activeOverlayIds: F,
277
+ baseLayer: I,
278
+ isApplications: L,
279
+ fallbackApplicationsOverlay: R,
280
+ loadLayerSettings: z,
281
281
  get ml() {
282
- return z;
282
+ return B;
283
283
  },
284
284
  set ml(e) {
285
- z = e;
285
+ B = e;
286
286
  },
287
287
  get resizeObserver() {
288
- return B;
288
+ return V;
289
289
  },
290
290
  set resizeObserver(e) {
291
- B = e;
291
+ V = e;
292
292
  },
293
293
  get addressPopup() {
294
- return V;
294
+ return H;
295
295
  },
296
296
  set addressPopup(e) {
297
- V = e;
297
+ H = e;
298
298
  },
299
299
  get addressMarker() {
300
- return H;
300
+ return U;
301
301
  },
302
302
  set addressMarker(e) {
303
- H = e;
303
+ U = e;
304
304
  },
305
305
  get disposed() {
306
- return U;
306
+ return W;
307
307
  },
308
308
  set disposed(e) {
309
- U = e;
309
+ W = e;
310
310
  },
311
- geometry: W,
312
- bounds: G,
313
- center: K,
314
- mapAreaClass: fe,
315
- buildGeoJson: q,
316
- fitToGeometry: J,
317
- ensureLayers: Y,
318
- splitAddressLabel: X,
319
- resolvePopupText: Z,
320
- createPinElement: Q,
311
+ geometry: G,
312
+ bounds: K,
313
+ center: q,
314
+ mapAreaClass: de,
315
+ buildGeoJson: J,
316
+ fitToGeometry: Y,
317
+ ensureLayers: X,
318
+ splitAddressLabel: Z,
319
+ resolvePopupText: Q,
320
+ createPinElement: fe,
321
321
  showAddressMarker: pe,
322
322
  showAddressPopup: me,
323
323
  remountBasemap: $,
@@ -330,57 +330,57 @@ var z = /*@__PURE__*/ w({
330
330
  resetView: xe,
331
331
  refreshLayers: Se,
332
332
  get Crosshair() {
333
- return se;
333
+ return oe;
334
334
  },
335
335
  get MapPin() {
336
- return ce;
336
+ return se;
337
337
  },
338
338
  get MapPinned() {
339
- return le;
339
+ return ce;
340
340
  },
341
341
  get ZoomIn() {
342
- return ue;
342
+ return le;
343
343
  },
344
344
  get ZoomOut() {
345
- return de;
345
+ return ue;
346
346
  },
347
- MapLayerMenu: re
347
+ MapLayerMenu: ne
348
348
  };
349
349
  return Object.defineProperty(Ce, "__isScriptSetup", {
350
350
  enumerable: !1,
351
351
  value: !0
352
352
  }), Ce;
353
353
  }
354
- }), B = {
354
+ }), V = {
355
355
  key: 0,
356
356
  class: "flex shrink-0 items-center justify-between border-b border-slate-100 px-5 py-3.5"
357
- }, V = { class: "flex items-center gap-2.5" }, H = {
357
+ }, H = { class: "flex items-center gap-2.5" }, U = {
358
358
  ref: "containerRef",
359
359
  class: "absolute inset-0 h-full w-full"
360
- }, U = {
360
+ }, W = {
361
361
  key: 0,
362
362
  class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
363
- }, W = {
363
+ }, G = {
364
364
  key: 1,
365
365
  class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/80 text-sm text-slate-500"
366
- }, G = { class: "absolute right-3 top-3 z-10 flex flex-col gap-1.5" }, K = {
366
+ }, K = { class: "absolute right-3 top-3 z-10 flex flex-col gap-1.5" }, q = {
367
367
  key: 1,
368
368
  class: "flex shrink-0 items-center gap-2 border-t border-slate-100 px-5 py-2.5 text-xs text-slate-400"
369
- }, fe = { class: "break-words" };
370
- function q(e, t, n, r, i, a) {
371
- return E(), b("div", { class: T(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-card" : void 0) }, [
372
- n.variant === "panel" ? (E(), b("header", B, [x("div", V, [C(r.MapPinned, {
369
+ }, de = { class: "break-words" };
370
+ function J(e, t, n, r, i, a) {
371
+ return D(), x("div", { class: E(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-card" : void 0) }, [
372
+ n.variant === "panel" ? (D(), x("header", V, [S("div", H, [w(r.MapPinned, {
373
373
  class: "h-[18px] w-[18px] text-brand-600",
374
374
  "stroke-width": 2,
375
375
  "aria-hidden": "true"
376
- }), t[0] ||= x("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Інтерактивна карта", -1)]), t[1] ||= x("span", { class: "rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500" }, " Межі заявки ", -1)])) : y("", !0),
377
- x("div", {
376
+ }), t[0] ||= S("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Інтерактивна карта", -1)]), t[1] ||= S("span", { class: "rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500" }, " Межі заявки ", -1)])) : b("", !0),
377
+ S("div", {
378
378
  ref: "mapAreaRef",
379
- class: T(r.mapAreaClass)
379
+ class: E(r.mapAreaClass)
380
380
  }, [
381
- x("div", H, null, 512),
382
- r.mapLoadError ? (E(), b("p", U, k(r.mapLoadError), 1)) : r.mapLoading ? (E(), b("p", W, " Завантаження карти… ")) : y("", !0),
383
- C(r.MapLayerMenu, {
381
+ S("div", U, null, 512),
382
+ r.mapLoadError ? (D(), x("p", W, A(r.mapLoadError), 1)) : r.mapLoading ? (D(), x("p", G, " Завантаження карти… ")) : b("", !0),
383
+ w(r.MapLayerMenu, {
384
384
  "base-id": r.activeBaseId,
385
385
  "active-overlay-ids": r.activeOverlayIds,
386
386
  "base-layers": r.baseLayers,
@@ -393,65 +393,65 @@ function q(e, t, n, r, i, a) {
393
393
  "base-layers",
394
394
  "overlays"
395
395
  ]),
396
- x("div", G, [
397
- x("button", {
396
+ S("div", K, [
397
+ S("button", {
398
398
  type: "button",
399
399
  title: "Збільшити",
400
400
  "aria-label": "Збільшити",
401
401
  class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-card transition-colors hover:bg-brand-50 hover:text-brand-600",
402
402
  onClick: r.zoomIn
403
- }, [C(r.ZoomIn, {
403
+ }, [w(r.ZoomIn, {
404
404
  class: "h-4 w-4",
405
405
  "stroke-width": 2,
406
406
  "aria-hidden": "true"
407
407
  })]),
408
- x("button", {
408
+ S("button", {
409
409
  type: "button",
410
410
  title: "Зменшити",
411
411
  "aria-label": "Зменшити",
412
412
  class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-card transition-colors hover:bg-brand-50 hover:text-brand-600",
413
413
  onClick: r.zoomOut
414
- }, [C(r.ZoomOut, {
414
+ }, [w(r.ZoomOut, {
415
415
  class: "h-4 w-4",
416
416
  "stroke-width": 2,
417
417
  "aria-hidden": "true"
418
418
  })]),
419
- x("button", {
419
+ S("button", {
420
420
  type: "button",
421
421
  title: "Відновити масштаб",
422
422
  "aria-label": "Відновити масштаб",
423
423
  class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-card transition-colors hover:bg-brand-50 hover:text-brand-600",
424
424
  onClick: r.resetView
425
- }, [C(r.Crosshair, {
425
+ }, [w(r.Crosshair, {
426
426
  class: "h-4 w-4",
427
427
  "stroke-width": 2,
428
428
  "aria-hidden": "true"
429
429
  })])
430
430
  ])
431
431
  ], 2),
432
- n.variant === "panel" ? (E(), b("footer", K, [
433
- C(r.MapPin, {
432
+ n.variant === "panel" ? (D(), x("footer", q, [
433
+ w(r.MapPin, {
434
434
  class: "h-3 w-3 shrink-0",
435
435
  "stroke-width": 2,
436
436
  "aria-hidden": "true"
437
437
  }),
438
- x("span", null, "Площа ділянки: " + k(n.area ?? "—") + " га", 1),
439
- t[2] ||= x("span", { class: "text-slate-300" }, "·", -1),
440
- x("span", fe, k(n.location), 1)
441
- ])) : y("", !0)
438
+ S("span", null, "Площа ділянки: " + A(n.area ?? "—") + " га", 1),
439
+ t[2] ||= S("span", { class: "text-slate-300" }, "·", -1),
440
+ S("span", de, A(n.location), 1)
441
+ ])) : b("", !0)
442
442
  ], 2);
443
443
  }
444
- var J = /*#__PURE__*/ e(z, [
445
- ["render", q],
444
+ var Y = /*#__PURE__*/ e(B, [
445
+ ["render", J],
446
446
  ["__scopeId", "data-v-ded53fc4"],
447
447
  ["__file", "C:/softpro/surveyor/shared/map/components/AppealDetailMap.vue"]
448
448
  ]);
449
449
  //#endregion
450
450
  //#region shared/comments/applicationNotesApi.ts
451
- function Y(e, t) {
452
- return `/api/resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}/notes`;
451
+ function X(e, t, n) {
452
+ return `/api/resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${n}`;
453
453
  }
454
- async function X(e) {
454
+ async function Z(e) {
455
455
  let t = await e.text();
456
456
  try {
457
457
  let n = JSON.parse(t);
@@ -460,21 +460,21 @@ async function X(e) {
460
460
  return t || `HTTP ${e.status}`;
461
461
  }
462
462
  }
463
- async function Z(e, t) {
464
- let n = "".replace(/\/$/, ""), r = await fetch(`${n}${Y(e, t)}`, { credentials: "include" });
465
- if (!r.ok) throw Error(await X(r));
463
+ async function Q(e, t) {
464
+ let n = "".replace(/\/$/, ""), r = await fetch(`${n}${X(e, t, "comments")}`, { credentials: "include" });
465
+ if (!r.ok) throw Error(await Z(r));
466
466
  return [...(await r.json()).rows ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")));
467
467
  }
468
- async function Q(e, t, n) {
468
+ async function fe(e, t, n) {
469
469
  let r = n.trim();
470
470
  if (!r) throw Error("Введіть текст коментаря");
471
- let i = "".replace(/\/$/, ""), a = await fetch(`${i}${Y(e, t)}`, {
471
+ let i = "".replace(/\/$/, ""), a = await fetch(`${i}${X(e, t, "notes")}`, {
472
472
  method: "POST",
473
473
  credentials: "include",
474
474
  headers: { "Content-Type": "application/json" },
475
475
  body: JSON.stringify({ body: r })
476
476
  });
477
- if (!a.ok) throw Error(await X(a));
477
+ if (!a.ok) throw Error(await Z(a));
478
478
  return a.json();
479
479
  }
480
480
  //#endregion
@@ -489,15 +489,20 @@ function me(e) {
489
489
  let n = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
490
490
  return n ? `${n[3]}.${n[2]}.${n[1]}` : e;
491
491
  }
492
- function $(e) {
493
- return {
492
+ var $ = {
493
+ name: "Невідомий користувач",
494
+ initials: "НК"
495
+ };
496
+ function he(e) {
497
+ let t = e.created_by?.trim();
498
+ return t ? {
494
499
  name: "Користувач",
495
- initials: e.created_by?.trim().slice(0, 2).toUpperCase() || "К"
496
- };
500
+ initials: t.slice(0, 2).toUpperCase()
501
+ } : $;
497
502
  }
498
503
  //#endregion
499
504
  //#region shared/comments/ApplicationCommentsSection.vue?vue&type=script&setup=true&lang.ts
500
- var he = /*@__PURE__*/ w({
505
+ var ge = /*@__PURE__*/ T({
501
506
  __name: "ApplicationCommentsSection",
502
507
  props: {
503
508
  applicationId: {
@@ -524,15 +529,15 @@ var he = /*@__PURE__*/ w({
524
529
  },
525
530
  setup(e, { expose: t }) {
526
531
  t();
527
- let n = e, r = D([]), i = D({}), a = D(!0), o = D(""), s = D(""), c = D(!1), l = D(""), u = v(() => n.variant === "admin"), d = v(() => u.value ? "rounded-2xl border border-slate-200 bg-white shadow-card" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), f = v(() => u.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), p = v(() => u.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), m = v(() => (u.value, "flex flex-col gap-4 p-5"));
532
+ let n = e, r = O([]), i = O({}), a = O(!0), o = O(""), s = O(""), c = O(!1), l = O(""), u = y(() => n.variant === "admin"), d = y(() => u.value ? "rounded-2xl border border-slate-200 bg-white shadow-card" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), f = y(() => u.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), p = y(() => u.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), m = y(() => (u.value, "flex flex-col gap-4 p-5"));
528
533
  function ee(e) {
529
- return i.value[e.note_id] ?? n.resolveAuthor?.(e) ?? $(e);
534
+ return i.value[e.note_id] ?? n.resolveAuthor?.(e) ?? he(e);
530
535
  }
531
536
  async function h() {
532
537
  if (n.applicationId) {
533
538
  a.value = !0, o.value = "";
534
539
  try {
535
- r.value = await Z(n.resource, n.applicationId), i.value = {};
540
+ r.value = await Q(n.resource, n.applicationId), i.value = {};
536
541
  } catch (e) {
537
542
  r.value = [], o.value = e instanceof Error ? e.message : "Не вдалося завантажити коментарі";
538
543
  } finally {
@@ -540,12 +545,12 @@ var he = /*@__PURE__*/ w({
540
545
  }
541
546
  }
542
547
  }
543
- async function te() {
548
+ async function g() {
544
549
  let e = s.value.trim();
545
550
  if (e && !c.value && n.applicationId) {
546
551
  c.value = !0, l.value = "";
547
552
  try {
548
- let t = await Q(n.resource, n.applicationId, e);
553
+ let t = await fe(n.resource, n.applicationId, e);
549
554
  i.value = {
550
555
  ...i.value,
551
556
  [t.note_id]: n.currentAuthor
@@ -557,13 +562,13 @@ var he = /*@__PURE__*/ w({
557
562
  }
558
563
  }
559
564
  }
560
- function ne(e) {
561
- e.preventDefault(), te();
565
+ function te(e) {
566
+ e.preventDefault(), g();
562
567
  }
563
- j(() => n.applicationId, () => {
568
+ M(() => n.applicationId, () => {
564
569
  h();
565
570
  }, { immediate: !0 });
566
- let g = {
571
+ let _ = {
567
572
  props: n,
568
573
  notes: r,
569
574
  localAuthors: i,
@@ -579,106 +584,106 @@ var he = /*@__PURE__*/ w({
579
584
  bodyClass: m,
580
585
  authorFor: ee,
581
586
  loadNotes: h,
582
- submit: te,
583
- onSubmit: ne,
587
+ submit: g,
588
+ onSubmit: te,
584
589
  get MessageSquare() {
585
- return L;
590
+ return R;
586
591
  },
587
592
  get Send() {
588
- return R;
593
+ return z;
589
594
  },
590
595
  get formatNoteDateTime() {
591
596
  return me;
592
597
  }
593
598
  };
594
- return Object.defineProperty(g, "__isScriptSetup", {
599
+ return Object.defineProperty(_, "__isScriptSetup", {
595
600
  enumerable: !1,
596
601
  value: !0
597
- }), g;
602
+ }), _;
598
603
  }
599
- }), ge = {
604
+ }), _e = {
600
605
  key: 1,
601
606
  class: "text-center text-sm text-red-600"
602
- }, _e = {
607
+ }, ve = {
603
608
  key: 1,
604
609
  class: "flex flex-col gap-4"
605
- }, ve = { class: "min-w-0 flex-1" }, ye = { class: "flex flex-wrap items-baseline justify-between gap-x-2" }, be = { class: "text-[14px] font-semibold text-slate-800" }, xe = { class: "text-xs text-slate-400" }, Se = {
610
+ }, ye = { class: "min-w-0 flex-1" }, be = { class: "flex flex-wrap items-baseline justify-between gap-x-2" }, xe = { class: "text-[14px] font-semibold text-slate-800" }, Se = { class: "text-xs text-slate-400" }, Ce = {
606
611
  key: 0,
607
612
  class: "mb-1.5 text-xs font-medium text-brand-600"
608
- }, Ce = { class: "whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600" }, we = {
613
+ }, we = { class: "whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600" }, Te = {
609
614
  key: 1,
610
615
  class: "rounded-xl bg-gray-50 px-4 py-3"
611
- }, Te = { class: "mb-1 flex items-center justify-between gap-2" }, Ee = { class: "text-xs font-semibold text-gray-800" }, De = { class: "text-xs text-gray-400" }, Oe = {
616
+ }, Ee = { class: "mb-1 flex items-center justify-between gap-2" }, De = { class: "text-xs font-semibold text-gray-800" }, Oe = { class: "text-xs text-gray-400" }, ke = {
612
617
  key: 0,
613
618
  class: "mb-1 text-xs font-medium text-[#2663EB]"
614
- }, ke = { class: "whitespace-pre-wrap text-sm text-gray-700" }, Ae = { class: "relative min-w-0 flex-1" }, je = [
619
+ }, Ae = { class: "whitespace-pre-wrap text-sm text-gray-700" }, je = { class: "relative min-w-0 flex-1" }, Me = [
615
620
  "disabled",
616
621
  "placeholder",
617
622
  "onKeydown"
618
- ], Me = ["disabled"], Ne = ["disabled"], Pe = {
623
+ ], Ne = ["disabled"], Pe = ["disabled"], Fe = {
619
624
  key: 2,
620
625
  class: "text-xs text-red-600"
621
626
  };
622
- function Fe(e, t, n, r, i, a) {
623
- return E(), b("section", { class: T(r.sectionClass) }, [x("header", { class: T(r.headerClass) }, [C(r.MessageSquare, {
624
- class: T(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-brand-600" : "h-3.5 w-3.5 text-gray-400"]),
627
+ function Ie(e, t, n, r, i, a) {
628
+ return D(), x("section", { class: E(r.sectionClass) }, [S("header", { class: E(r.headerClass) }, [w(r.MessageSquare, {
629
+ class: E(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-brand-600" : "h-3.5 w-3.5 text-gray-400"]),
625
630
  "stroke-width": 2,
626
631
  "aria-hidden": "true"
627
- }, null, 8, ["class"]), x("h2", { class: T(r.titleClass) }, "Коментарі", 2)], 2), x("div", { class: T(r.bodyClass) }, [r.loading ? (E(), b("p", {
632
+ }, null, 8, ["class"]), S("h2", { class: E(r.titleClass) }, "Коментарі", 2)], 2), S("div", { class: E(r.bodyClass) }, [r.loading ? (D(), x("p", {
628
633
  key: 0,
629
- class: T(["text-center text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
630
- }, " Завантаження… ", 2)) : r.loadError ? (E(), b("p", ge, k(r.loadError), 1)) : (E(), b(_, { key: 2 }, [
631
- r.notes.length === 0 ? (E(), b("p", {
634
+ class: E(["text-center text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
635
+ }, " Завантаження… ", 2)) : r.loadError ? (D(), x("p", _e, A(r.loadError), 1)) : (D(), x(v, { key: 2 }, [
636
+ r.notes.length === 0 ? (D(), x("p", {
632
637
  key: 0,
633
- class: T(["text-center text-sm italic", r.isAdmin ? "py-2 text-slate-400" : "py-4 text-gray-400"])
634
- }, " Коментарів ще немає ", 2)) : (E(), b("ul", _e, [(E(!0), b(_, null, O(r.notes, (e) => (E(), b("li", {
638
+ class: E(["text-center text-sm italic", r.isAdmin ? "py-2 text-slate-400" : "py-4 text-gray-400"])
639
+ }, " Коментарів ще немає ", 2)) : (D(), x("ul", ve, [(D(!0), x(v, null, k(r.notes, (e) => (D(), x("li", {
635
640
  key: e.note_id,
636
641
  class: "flex gap-3"
637
- }, [x("div", { class: T(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-brand-100 text-brand-700" : "bg-[#2663EB] text-white text-xs"]) }, k(r.authorFor(e).initials), 3), x("div", ve, [r.isAdmin ? (E(), b(_, { key: 0 }, [
638
- x("div", ye, [x("span", be, k(r.authorFor(e).name), 1), x("time", xe, k(r.formatNoteDateTime(e.created_at)), 1)]),
639
- r.authorFor(e).role ? (E(), b("p", Se, k(r.authorFor(e).role), 1)) : y("", !0),
640
- x("p", Ce, k(e.body), 1)
641
- ], 64)) : (E(), b("div", we, [
642
- x("div", Te, [x("span", Ee, k(r.authorFor(e).name), 1), x("time", De, k(r.formatNoteDateTime(e.created_at)), 1)]),
643
- r.authorFor(e).role ? (E(), b("p", Oe, k(r.authorFor(e).role), 1)) : y("", !0),
644
- x("p", ke, k(e.body), 1)
642
+ }, [S("div", { class: E(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-brand-100 text-brand-700" : "bg-[#2663EB] text-white text-xs"]) }, A(r.authorFor(e).initials), 3), S("div", ye, [r.isAdmin ? (D(), x(v, { key: 0 }, [
643
+ S("div", be, [S("span", xe, A(r.authorFor(e).name), 1), S("time", Se, A(r.formatNoteDateTime(e.created_at)), 1)]),
644
+ r.authorFor(e).role ? (D(), x("p", Ce, A(r.authorFor(e).role), 1)) : b("", !0),
645
+ S("p", we, A(e.body), 1)
646
+ ], 64)) : (D(), x("div", Te, [
647
+ S("div", Ee, [S("span", De, A(r.authorFor(e).name), 1), S("time", Oe, A(r.formatNoteDateTime(e.created_at)), 1)]),
648
+ r.authorFor(e).role ? (D(), x("p", ke, A(r.authorFor(e).role), 1)) : b("", !0),
649
+ S("p", Ae, A(e.body), 1)
645
650
  ]))])]))), 128))])),
646
- x("form", {
647
- class: T(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]),
651
+ S("form", {
652
+ class: E(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]),
648
653
  onSubmit: r.onSubmit
649
654
  }, [
650
- x("div", { class: T(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-brand-100 text-brand-700" : "bg-[#2663EB] text-white"]) }, k(n.currentAuthor.initials), 3),
651
- x("div", Ae, [M(x("textarea", {
655
+ S("div", { class: E(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-brand-100 text-brand-700" : "bg-[#2663EB] text-white"]) }, A(n.currentAuthor.initials), 3),
656
+ S("div", je, [N(S("textarea", {
652
657
  "onUpdate:modelValue": t[0] ||= (e) => r.draft = e,
653
658
  rows: "3",
654
659
  disabled: r.sending,
655
660
  placeholder: r.isAdmin ? "Додати коментар…" : "Напишіть коментар...",
656
- class: T(["w-full resize-none rounded-xl border px-4 py-3 text-sm transition-colors focus:outline-none focus:ring-2 disabled:opacity-60", r.isAdmin ? "border-slate-200 bg-slate-50 text-slate-700 placeholder:text-slate-400 focus:border-brand-400 focus:bg-white focus:ring-brand-400/30" : "border-gray-200 pr-12 text-gray-900 placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-[#2663EB]/20"]),
657
- onKeydown: N(P(r.submit, ["exact", "prevent"]), ["enter"])
658
- }, null, 42, je), [[A, r.draft]]), r.isAdmin ? y("", !0) : (E(), b("button", {
661
+ class: E(["w-full resize-none rounded-xl border px-4 py-3 text-sm transition-colors focus:outline-none focus:ring-2 disabled:opacity-60", r.isAdmin ? "border-slate-200 bg-slate-50 text-slate-700 placeholder:text-slate-400 focus:border-brand-400 focus:bg-white focus:ring-brand-400/30" : "border-gray-200 pr-12 text-gray-900 placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-[#2663EB]/20"]),
662
+ onKeydown: P(F(r.submit, ["exact", "prevent"]), ["enter"])
663
+ }, null, 42, Me), [[j, r.draft]]), r.isAdmin ? b("", !0) : (D(), x("button", {
659
664
  key: 0,
660
665
  type: "submit",
661
666
  disabled: !r.draft.trim() || r.sending,
662
667
  class: "absolute bottom-3 right-3 rounded-lg bg-[#2663EB] p-1.5 text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40",
663
668
  "aria-label": "Надіслати"
664
- }, [C(r.Send, {
669
+ }, [w(r.Send, {
665
670
  class: "h-3.5 w-3.5",
666
671
  "stroke-width": 2
667
- })], 8, Me))]),
668
- r.isAdmin ? (E(), b("button", {
672
+ })], 8, Ne))]),
673
+ r.isAdmin ? (D(), x("button", {
669
674
  key: 0,
670
675
  type: "submit",
671
676
  disabled: !r.draft.trim() || r.sending,
672
677
  class: "inline-flex shrink-0 items-center gap-1.5 rounded-lg bg-brand-600 px-4 py-2.5 text-sm font-medium text-white shadow-card transition-all hover:bg-brand-700 disabled:cursor-not-allowed disabled:opacity-40"
673
- }, [C(r.Send, {
678
+ }, [w(r.Send, {
674
679
  class: "h-3.5 w-3.5",
675
680
  "stroke-width": 2
676
- }), S(" " + k(r.sending ? "Надсилання…" : "Надіслати"), 1)], 8, Ne)) : y("", !0)
681
+ }), C(" " + A(r.sending ? "Надсилання…" : "Надіслати"), 1)], 8, Pe)) : b("", !0)
677
682
  ], 34),
678
- r.sendError ? (E(), b("p", Pe, k(r.sendError), 1)) : y("", !0)
683
+ r.sendError ? (D(), x("p", Fe, A(r.sendError), 1)) : b("", !0)
679
684
  ], 64))], 2)], 2);
680
685
  }
681
- var Ie = /*#__PURE__*/ e(he, [["render", Fe], ["__file", "C:/softpro/surveyor/shared/comments/ApplicationCommentsSection.vue"]]), Le = /*@__PURE__*/ w({
686
+ var Le = /*#__PURE__*/ e(ge, [["render", Ie], ["__file", "C:/softpro/surveyor/shared/comments/ApplicationCommentsSection.vue"]]), Re = /*@__PURE__*/ T({
682
687
  __name: "ApplicationHistorySection",
683
688
  props: {
684
689
  items: {
@@ -694,7 +699,7 @@ var Ie = /*#__PURE__*/ e(he, [["render", Fe], ["__file", "C:/softpro/surveyor/sh
694
699
  },
695
700
  setup(e, { expose: t }) {
696
701
  t();
697
- let n = e, r = D(!0), i = v(() => n.variant === "admin"), a = v(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = v(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-card" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), s = v(() => i.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), l = v(() => i.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), u = v(() => i.value ? "px-5 py-4" : "p-5");
702
+ let n = e, r = O(!0), i = y(() => n.variant === "admin"), a = y(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = y(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-card" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), s = y(() => i.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), l = y(() => i.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), u = y(() => i.value ? "px-5 py-4" : "p-5");
698
703
  function d(e, t) {
699
704
  return t?.text?.trim() || (e ? c.items.find((t) => t.code === e)?.name ?? e : "");
700
705
  }
@@ -722,10 +727,10 @@ var Ie = /*#__PURE__*/ e(he, [["render", Fe], ["__file", "C:/softpro/surveyor/sh
722
727
  historyTitle: f,
723
728
  formatDateTime: p,
724
729
  get ChevronDown() {
725
- return F;
730
+ return I;
726
731
  },
727
732
  get History() {
728
- return I;
733
+ return L;
729
734
  }
730
735
  };
731
736
  return Object.defineProperty(m, "__isScriptSetup", {
@@ -733,37 +738,37 @@ var Ie = /*#__PURE__*/ e(he, [["render", Fe], ["__file", "C:/softpro/surveyor/sh
733
738
  value: !0
734
739
  }), m;
735
740
  }
736
- }), Re = {
741
+ }), ze = {
737
742
  key: 0,
738
743
  class: "relative list-none"
739
- }, ze = { class: "relative z-10 mt-1 shrink-0" }, Be = { class: "min-w-0 flex-1" }, Ve = { class: "flex flex-wrap items-baseline justify-between gap-x-2 gap-y-1" };
740
- function He(e, t, n, r, i, a) {
741
- return E(), b("section", { class: T(r.sectionClass) }, [x("header", { class: T(r.headerClass) }, [C(r.History, {
742
- class: T(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-brand-600" : "h-3.5 w-3.5 text-gray-400"]),
744
+ }, Be = { class: "relative z-10 mt-1 shrink-0" }, Ve = { class: "min-w-0 flex-1" }, He = { class: "flex flex-wrap items-baseline justify-between gap-x-2 gap-y-1" };
745
+ function Ue(e, t, n, r, i, a) {
746
+ return D(), x("section", { class: E(r.sectionClass) }, [S("header", { class: E(r.headerClass) }, [w(r.History, {
747
+ class: E(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-brand-600" : "h-3.5 w-3.5 text-gray-400"]),
743
748
  "stroke-width": 2,
744
749
  "aria-hidden": "true"
745
- }, null, 8, ["class"]), x("h2", { class: T(r.titleClass) }, "Історія", 2)], 2), x("div", { class: T(r.bodyClass) }, [x("button", {
750
+ }, null, 8, ["class"]), S("h2", { class: E(r.titleClass) }, "Історія", 2)], 2), S("div", { class: E(r.bodyClass) }, [S("button", {
746
751
  type: "button",
747
- class: T(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-brand-600" : "text-gray-500 hover:text-[#2663EB]"]),
752
+ class: E(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-brand-600" : "text-gray-500 hover:text-[#2663EB]"]),
748
753
  onClick: t[0] ||= (e) => r.open = !r.open
749
- }, [x("span", null, k(r.open ? "Згорнути" : `Розгорнути (${r.events.length} подій)`), 1), C(r.ChevronDown, {
750
- class: T(["h-4 w-4 transition-transform", r.open ? "" : "rotate-180"]),
754
+ }, [S("span", null, A(r.open ? "Згорнути" : `Розгорнути (${r.events.length} подій)`), 1), w(r.ChevronDown, {
755
+ class: E(["h-4 w-4 transition-transform", r.open ? "" : "rotate-180"]),
751
756
  "aria-hidden": "true"
752
- }, null, 8, ["class"])], 2), r.open && r.events.length ? (E(), b("ol", Re, [t[1] ||= x("div", { class: "absolute bottom-2 left-[7px] top-2 w-px bg-slate-200" }, null, -1), (E(!0), b(_, null, O(r.events, (e, t) => (E(), b("li", {
757
+ }, null, 8, ["class"])], 2), r.open && r.events.length ? (D(), x("ol", ze, [t[1] ||= S("div", { class: "absolute bottom-2 left-[7px] top-2 w-px bg-slate-200" }, null, -1), (D(!0), x(v, null, k(r.events, (e, t) => (D(), x("li", {
753
758
  key: e.history_id,
754
759
  class: "relative flex gap-4 pb-6 last:pb-0"
755
- }, [x("div", ze, [x("span", { class: T(["block h-[15px] w-[15px] rounded-full border-2 border-white", t === r.events.length - 1 ? "bg-brand-500" : "bg-slate-300"]) }, null, 2)]), x("div", Be, [
756
- x("div", Ve, [x("p", { class: T(["text-[14px] font-semibold", r.isAdmin ? "text-slate-800" : "text-gray-900"]) }, k(r.historyTitle(e)), 3), x("time", { class: T(["text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, k(r.formatDateTime(e.created_at) || "—"), 3)]),
757
- e.reason ? (E(), b("p", {
760
+ }, [S("div", Be, [S("span", { class: E(["block h-[15px] w-[15px] rounded-full border-2 border-white", t === r.events.length - 1 ? "bg-brand-500" : "bg-slate-300"]) }, null, 2)]), S("div", Ve, [
761
+ S("div", He, [S("p", { class: E(["text-[14px] font-semibold", r.isAdmin ? "text-slate-800" : "text-gray-900"]) }, A(r.historyTitle(e)), 3), S("time", { class: E(["text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, A(r.formatDateTime(e.created_at) || "—"), 3)]),
762
+ e.reason ? (D(), x("p", {
758
763
  key: 0,
759
- class: T(["mt-1 text-[13px] leading-relaxed", r.isAdmin ? "text-slate-600" : "text-gray-600"])
760
- }, k(e.reason), 3)) : y("", !0),
761
- x("p", { class: T(["mt-1 text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, k(e.changed_by_data?.text || "—"), 3)
762
- ])]))), 128))])) : r.events.length ? y("", !0) : (E(), b("p", {
764
+ class: E(["mt-1 text-[13px] leading-relaxed", r.isAdmin ? "text-slate-600" : "text-gray-600"])
765
+ }, A(e.reason), 3)) : b("", !0),
766
+ S("p", { class: E(["mt-1 text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, A(e.changed_by_data?.text || "—"), 3)
767
+ ])]))), 128))])) : r.events.length ? b("", !0) : (D(), x("p", {
763
768
  key: 1,
764
- class: T(["text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
769
+ class: E(["text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
765
770
  }, " Історія відсутня. ", 2))], 2)], 2);
766
771
  }
767
- var Ue = /*#__PURE__*/ e(Le, [["render", He], ["__file", "C:/softpro/surveyor/shared/history/ApplicationHistorySection.vue"]]);
772
+ var We = /*#__PURE__*/ e(Re, [["render", Ue], ["__file", "C:/softpro/surveyor/shared/history/ApplicationHistorySection.vue"]]);
768
773
  //#endregion
769
- export { J as i, Ie as n, pe as r, Ue as t };
774
+ export { Y as a, $ as i, Le as n, pe as r, We as t };