@opengis/surveyor 0.0.19 → 0.0.21

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.
Files changed (57) hide show
  1. package/dist/chunks/{AppIcon-CO70tpMX.js → AppIcon-Di5F4Bu_.js} +1 -1
  2. package/dist/chunks/{AppealDetailField-ByK9ZqR4.js → AppealDetailField-CWayoaII.js} +2 -2
  3. package/dist/chunks/AppealStatusBadge-RQkpbDmk.js +430 -0
  4. package/dist/chunks/{AppealStatusBadge-BlAaNUSK.js → AppealStatusBadge-z77wwkFD.js} +2 -2
  5. package/dist/chunks/{ApplicationGeometryExportModal-DhKC31To.js → ApplicationGeometryExportModal-CH9VrqxO.js} +312 -324
  6. package/dist/chunks/{BaseModal-BJxKuONh.js → BaseModal-X-hzV_I2.js} +2 -2
  7. package/dist/chunks/{FormFilePicker-DxPQlxgy.js → FormFilePicker-D5fAUE0Z.js} +2 -2
  8. package/dist/chunks/{MapLayerMenu-B0TEoCJm.js → MapLayerMenu-CyVxRSNX.js} +1 -1
  9. package/dist/chunks/{RegistryForm-Dpis_ncj.js → RegistryForm-J7R4RWO3.js} +1 -1
  10. package/dist/chunks/{RegistryFormModal-CH4DbTvC.js → RegistryFormModal-B_EDwu9O.js} +3 -3
  11. package/dist/chunks/{RegistryToolbar-DisEejvi.js → RegistryToolbar-BDVaZ2Rf.js} +5 -5
  12. package/dist/chunks/{SurveyorTeleport-Cd6D92mo.js → SurveyorTeleport-Y-NJhfsb.js} +1 -1
  13. package/dist/chunks/{TablePagination-thQkE5iA.js → TablePagination-CZhRgCVr.js} +2 -2
  14. package/dist/chunks/{UserAccessBadge-DyZDv7Oo.js → UserAccessBadge-B5Q1LvNv.js} +1 -1
  15. package/dist/chunks/{UserTypeBadge-LvnMuKGo.js → UserTypeBadge-CuAMctTK.js} +1 -1
  16. package/dist/chunks/{VerifiedBadge-bk0n-rlC.js → VerifiedBadge-D6L7mCdp.js} +2 -2
  17. package/dist/chunks/{card-n83dNORm.js → card-BMe6jQRR.js} +10 -10
  18. package/dist/chunks/{card-DVuqR0rL.js → card-Bw_EXY3D.js} +4 -4
  19. package/dist/chunks/{card-Cs8_8A8i.js → card-Cll0FQ0z.js} +6 -6
  20. package/dist/chunks/{card-u5I--_Gb.js → card-DMt5SAoD.js} +5 -5
  21. package/dist/chunks/{card-DuGbROGY.js → card-Dy333mEd.js} +9 -9
  22. package/dist/chunks/card-pTFhEtmI.js +1264 -0
  23. package/dist/chunks/{certificates-CDunSANR.js → certificates-URuwsRqg.js} +6 -6
  24. package/dist/chunks/{create-DQPxIZMW.js → create-CJXITPL0.js} +9 -9
  25. package/dist/chunks/downloadAttachmentFilename-B_4jZuOa.js +11 -0
  26. package/dist/chunks/{forgot-DfsFu-yY.js → forgot-JFlAKndO.js} +2 -2
  27. package/dist/chunks/{login-Dl0nTWs9.js → login-Bd6krLDP.js} +2 -2
  28. package/dist/chunks/{map-BoHEgBCw.js → map-BZg1CvsE.js} +44 -44
  29. package/dist/chunks/{map-layers-CRE8lZzH.js → map-layers-BgK6h6AD.js} +6 -6
  30. package/dist/chunks/{organizations-D6aazMAe.js → organizations-BLYhVQwf.js} +7 -7
  31. package/dist/chunks/{profile-CkwMFh82.js → profile-F7mr0poI.js} +3 -3
  32. package/dist/chunks/{registration-BSz1iLbO.js → registration-DIA4xV-t.js} +2 -2
  33. package/dist/chunks/{requests-D1ix8U5f.js → requests-CPVQ1Yy_.js} +5 -5
  34. package/dist/chunks/{requests-B9Ejt4av.js → requests-DhLUiL_6.js} +9 -9
  35. package/dist/chunks/{reset-D5G0x5Zi.js → reset-DR3GXwrH.js} +2 -2
  36. package/dist/chunks/{useEntityPath-C5Owtidc.js → useEntityPath-8s0Y1tjA.js} +1 -1
  37. package/dist/chunks/{users-DMe6JYI0.js → users-BsWV3iTt.js} +7 -7
  38. package/dist/index.js +40 -40
  39. package/migrations/20261016120000_map_layers.sql +156 -156
  40. package/migrations/20261016150000_password_reset.sql +15 -15
  41. package/migrations/20261016180000_settlement_lookup.sql +16 -16
  42. package/package.json +80 -80
  43. package/server/dictionaries/index.ts +17 -17
  44. package/server/dictionaries/surveyor/map_layer_components.ts +11 -11
  45. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -10
  46. package/server/dictionaries/surveyor/map_layer_types.ts +11 -11
  47. package/server/modules/surveyor/route.ts +20 -0
  48. package/server/modules/surveyor/schema.ts +11 -0
  49. package/server/modules/surveyor/services/changeApplicationStatus.ts +100 -0
  50. package/server/modules/surveyor/services/mapLayers.ts +61 -61
  51. package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -79
  52. package/server/resources/helpers/settlement_lookup.ts +7 -7
  53. package/server/resources/surveyor-admin/applications.ts +126 -126
  54. package/server/resources/surveyor-admin/certificates.ts +113 -113
  55. package/server/resources/surveyor-admin/organization_surveyors.ts +31 -31
  56. package/dist/chunks/AppealStatusBadge-DzMn4RVy.js +0 -295
  57. package/dist/chunks/card-BP2byleo.js +0 -1327
@@ -1,15 +1,16 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./SurveyorTeleport-Cd6D92mo.js";
2
+ import { t } from "./SurveyorTeleport-Y-NJhfsb.js";
3
3
  import { a as n, c as r, i, n as a, r as o, t as s, u as c } from "./appealMapLayers-CQMK3rrz.js";
4
4
  import { t as l } from "./application_status-BhNGiY2I.js";
5
5
  import { a as u, d, i as f, l as p, r as m, s as h, t as g, u as _ } from "./mapLayersApi-CBLcbADa.js";
6
6
  import { i as v, n as y, t as b } from "./geometry-DyhIVRcw.js";
7
- import { t as ee } from "./MapLayerMenu-B0TEoCJm.js";
8
- import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createVNode as D, defineComponent as O, mergeModels as k, nextTick as te, normalizeClass as A, normalizeStyle as j, onBeforeUnmount as M, onMounted as ne, onUnmounted as re, openBlock as N, ref as P, renderList as F, shallowRef as ie, toDisplayString as I, useModel as L, vModelText as ae, watch as R, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
9
- import { ChevronDown as H, Crosshair as oe, History as U, MapPin as se, MapPinned as ce, MessageSquare as W, Send as G, ZoomIn as le, ZoomOut as ue } from "lucide-vue-next";
10
- import { VsInputRichtext as K } from "@opengis/form";
7
+ import { t as x } from "./downloadAttachmentFilename-B_4jZuOa.js";
8
+ import { t as S } from "./MapLayerMenu-CyVxRSNX.js";
9
+ import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createVNode as k, defineComponent as A, mergeModels as ee, nextTick as j, normalizeClass as M, normalizeStyle as N, onBeforeUnmount as P, onMounted as te, onUnmounted as ne, openBlock as F, ref as I, renderList as L, shallowRef as re, toDisplayString as R, useModel as z, vModelText as ie, watch as B, withCtx as V, withDirectives as H, withModifiers as U } from "vue";
10
+ import { ChevronDown as W, Crosshair as ae, History as G, MapPin as oe, MapPinned as se, MessageSquare as K, Send as q, ZoomIn as ce, ZoomOut as le } from "lucide-vue-next";
11
+ import { VsInputRichtext as J } from "@opengis/form";
11
12
  //#region shared/map/components/AppealDetailMap.vue?vue&type=script&setup=true&lang.ts
12
- var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
13
+ var ue = "appeal-map-popup-style", de = /*@__PURE__*/ A({
13
14
  __name: "AppealDetailMap",
14
15
  props: {
15
16
  geom: {
@@ -45,18 +46,18 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
45
46
  },
46
47
  setup(e, { expose: t }) {
47
48
  t();
48
- let l = e, x = i, C = a, w = o, T = [30.5234, 50.4501], E = {
49
+ let l = e, x = i, C = a, T = o, E = [30.5234, 50.4501], D = {
49
50
  padding: 30,
50
51
  maxZoom: 17
51
- }, D = P(null), O = P(null), k = ie(null), te = P(""), A = P(!0), j = P(s), M = P([]), N = P(r), F = P([]);
52
- function I(e) {
53
- return j.value.find((t) => t.id === e) ?? j.value[0] ?? s[0];
54
- }
52
+ }, O = I(null), k = I(null), A = re(null), ee = I(""), j = I(!0), M = I(s), N = I([]), P = I(r), F = I([]);
55
53
  function L(e) {
54
+ return M.value.find((t) => t.id === e) ?? M.value[0] ?? s[0];
55
+ }
56
+ function R(e) {
56
57
  return e.kind === "applications";
57
58
  }
58
- function ae() {
59
- let e = n.find(L);
59
+ function z() {
60
+ let e = n.find(R);
60
61
  if (!e) throw Error("Static applications overlay is missing");
61
62
  let t = typeof window < "u" ? window.location.origin : "";
62
63
  return {
@@ -64,10 +65,10 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
64
65
  tiles: e.tiles.map((e) => e.startsWith("/") ? `${t}${e}` : e)
65
66
  };
66
67
  }
67
- async function z() {
68
+ async function ie() {
68
69
  let e = await g("application-card");
69
- j.value = e.baseLayers, N.value = e.defaultBaseId;
70
- let t = e.overlays.filter((e) => e.kind !== "geometry" && e.kind !== "applications"), n = e.overlays.find(L) ?? ae(), r = {
70
+ M.value = e.baseLayers, P.value = e.defaultBaseId;
71
+ let t = e.overlays.filter((e) => e.kind !== "geometry" && e.kind !== "applications"), n = e.overlays.find(R) ?? z(), r = {
71
72
  id: n.id,
72
73
  label: n.label,
73
74
  kind: "applications",
@@ -77,27 +78,27 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
77
78
  hasFilters: n.hasFilters,
78
79
  defaultVisible: !1
79
80
  };
80
- M.value = [r, ...t], F.value = M.value.filter((e) => e.defaultVisible).map((e) => e.id);
81
+ N.value = [r, ...t], F.value = N.value.filter((e) => e.defaultVisible).map((e) => e.id);
81
82
  }
82
- let B = null, V, H = null, U = null, W = !1, G = S(() => v(l.geom)), K = S(() => G.value ? y(G.value) : null), q = S(() => K.value ? b(K.value) : null), fe = S(() => l.variant === "panel" ? "relative min-h-[320px] w-full flex-1" : ["relative w-full transition-all duration-300", l.expanded ? "h-[520px]" : "h-[340px]"]);
83
- function pe() {
83
+ let V = null, H, U = null, W = null, G = !1, K = w(() => v(l.geom)), q = w(() => K.value ? y(K.value) : null), J = w(() => q.value ? b(q.value) : null), de = w(() => l.variant === "panel" ? "relative min-h-[320px] w-full flex-1" : ["relative w-full transition-all duration-300", l.expanded ? "h-[520px]" : "h-[340px]"]);
84
+ function fe() {
84
85
  return {
85
86
  type: "FeatureCollection",
86
- features: G.value ? [{
87
+ features: K.value ? [{
87
88
  type: "Feature",
88
- geometry: G.value,
89
+ geometry: K.value,
89
90
  properties: {}
90
91
  }] : []
91
92
  };
92
93
  }
93
- function J(e) {
94
- K.value && e.fitBounds(K.value, {
95
- ...E,
94
+ function Y(e) {
95
+ q.value && e.fitBounds(q.value, {
96
+ ...D,
96
97
  duration: 500
97
98
  });
98
99
  }
99
- function Y(e, t) {
100
- let n = pe(), r = e.getSource(x);
100
+ function X(e, t) {
101
+ let n = fe(), r = e.getSource(x);
101
102
  r?.setData ? r.setData(n) : (e.addSource(x, {
102
103
  type: "geojson",
103
104
  data: n
@@ -110,16 +111,16 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
110
111
  "fill-opacity": .35
111
112
  }
112
113
  }), e.addLayer({
113
- id: w,
114
+ id: T,
114
115
  type: "line",
115
116
  source: x,
116
117
  paint: {
117
118
  "line-color": "#2563eb",
118
119
  "line-width": 3
119
120
  }
120
- })), _e(e, t), ye(e, t);
121
+ })), ge(e, t), ve(e, t);
121
122
  }
122
- function me(e, t) {
123
+ function pe(e, t) {
123
124
  let n = e.trim(), r = n.match(/^(.+?)\s*\(([^)]+)\)\s*,?\s*(.*)$/);
124
125
  if (r) {
125
126
  let e = r[1].trim(), t = r[2].trim();
@@ -147,31 +148,31 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
147
148
  subtitle: t?.trim() || ""
148
149
  };
149
150
  }
150
- function he() {
151
+ function me() {
151
152
  let e = l.address?.trim(), t = l.location?.trim(), n = !!(e && e !== "—"), r = !!(t && t !== "—");
152
- return !n && !r ? null : n ? me(e, r ? t : void 0) : {
153
+ return !n && !r ? null : n ? pe(e, r ? t : void 0) : {
153
154
  title: t,
154
155
  subtitle: ""
155
156
  };
156
157
  }
157
- function ge() {
158
+ function he() {
158
159
  let e = document.createElement("div");
159
160
  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;
160
161
  }
161
- function _e(e, t) {
162
- U?.remove(), U = null, q.value && (U = new t.Marker({
163
- element: ge(),
162
+ function ge(e, t) {
163
+ W?.remove(), W = null, J.value && (W = new t.Marker({
164
+ element: he(),
164
165
  anchor: "bottom"
165
- }).setLngLat(q.value).addTo(e));
166
+ }).setLngLat(J.value).addTo(e));
166
167
  }
167
- function ve() {
168
- let e = document.getElementById(de) ?? document.createElement("style");
169
- e.id = de, e.textContent = "\n.appeal-map-popup .maplibregl-popup-content {\n min-width: 0;\n padding: 8px 8px 8px 10px !important;\n margin: 0;\n border: 1px solid #e2e8f0 !important;\n border-radius: 14px !important;\n background: #fff !important;\n box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06) !important;\n}\n.appeal-map-popup .maplibregl-popup-tip {\n width: 0 !important;\n height: 0 !important;\n border: 8px solid transparent !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {\n border-top-color: #fff !important;\n border-bottom-width: 0 !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {\n border-bottom-color: #fff !important;\n border-top-width: 0 !important;\n}\n.appeal-map-popup-body {\n position: relative;\n display: block;\n max-width: 260px;\n margin: 0 !important;\n padding: 2px 28px 2px 2px !important;\n text-align: left;\n}\n.appeal-map-popup-text {\n min-width: 0;\n margin: 0 !important;\n padding: 2px 0 !important;\n}\n.appeal-map-popup-title {\n margin: 0 !important;\n padding: 0 !important;\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 1.35 !important;\n color: #0f172a !important;\n}\n.appeal-map-popup-subtitle {\n margin: 2px 0 0 !important;\n padding: 0 !important;\n font-size: 12px !important;\n font-weight: 400 !important;\n line-height: 1.35 !important;\n color: #64748b !important;\n}\n.appeal-map-popup-close,\n.appeal-map-popup-close:focus,\n.appeal-map-popup-close:focus-visible,\n.appeal-map-popup-close:active {\n position: absolute !important;\n top: -6px !important;\n right: -6px !important;\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 20px !important;\n height: 20px !important;\n padding: 0 !important;\n margin: 0 !important;\n border: 0 !important;\n border-radius: 6px !important;\n background: transparent !important;\n color: #94a3b8 !important;\n opacity: 1 !important;\n outline: none !important;\n outline-offset: 0 !important;\n box-shadow: none !important;\n appearance: none !important;\n -webkit-appearance: none !important;\n cursor: pointer !important;\n}\n.appeal-map-popup-close::-moz-focus-inner {\n border: 0 !important;\n padding: 0 !important;\n}\n.appeal-map-popup-close svg {\n display: block;\n width: 12px !important;\n height: 12px !important;\n}\n.appeal-map-popup-close:hover {\n background: #f1f5f9 !important;\n color: #334155 !important;\n}\n", e.parentNode || document.head.appendChild(e);
168
+ function _e() {
169
+ let e = document.getElementById(ue) ?? document.createElement("style");
170
+ e.id = ue, e.textContent = "\n.appeal-map-popup .maplibregl-popup-content {\n min-width: 0;\n padding: 8px 8px 8px 10px !important;\n margin: 0;\n border: 1px solid #e2e8f0 !important;\n border-radius: 14px !important;\n background: #fff !important;\n box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06) !important;\n}\n.appeal-map-popup .maplibregl-popup-tip {\n width: 0 !important;\n height: 0 !important;\n border: 8px solid transparent !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {\n border-top-color: #fff !important;\n border-bottom-width: 0 !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {\n border-bottom-color: #fff !important;\n border-top-width: 0 !important;\n}\n.appeal-map-popup-body {\n position: relative;\n display: block;\n max-width: 260px;\n margin: 0 !important;\n padding: 2px 28px 2px 2px !important;\n text-align: left;\n}\n.appeal-map-popup-text {\n min-width: 0;\n margin: 0 !important;\n padding: 2px 0 !important;\n}\n.appeal-map-popup-title {\n margin: 0 !important;\n padding: 0 !important;\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 1.35 !important;\n color: #0f172a !important;\n}\n.appeal-map-popup-subtitle {\n margin: 2px 0 0 !important;\n padding: 0 !important;\n font-size: 12px !important;\n font-weight: 400 !important;\n line-height: 1.35 !important;\n color: #64748b !important;\n}\n.appeal-map-popup-close,\n.appeal-map-popup-close:focus,\n.appeal-map-popup-close:focus-visible,\n.appeal-map-popup-close:active {\n position: absolute !important;\n top: -6px !important;\n right: -6px !important;\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 20px !important;\n height: 20px !important;\n padding: 0 !important;\n margin: 0 !important;\n border: 0 !important;\n border-radius: 6px !important;\n background: transparent !important;\n color: #94a3b8 !important;\n opacity: 1 !important;\n outline: none !important;\n outline-offset: 0 !important;\n box-shadow: none !important;\n appearance: none !important;\n -webkit-appearance: none !important;\n cursor: pointer !important;\n}\n.appeal-map-popup-close::-moz-focus-inner {\n border: 0 !important;\n padding: 0 !important;\n}\n.appeal-map-popup-close svg {\n display: block;\n width: 12px !important;\n height: 12px !important;\n}\n.appeal-map-popup-close:hover {\n background: #f1f5f9 !important;\n color: #334155 !important;\n}\n", e.parentNode || document.head.appendChild(e);
170
171
  }
171
- function ye(e, t) {
172
- ve(), H?.remove(), H = null;
173
- let n = he();
174
- if (!q.value || !n) return;
172
+ function ve(e, t) {
173
+ _e(), U?.remove(), U = null;
174
+ let n = me();
175
+ if (!J.value || !n) return;
175
176
  let { title: r, subtitle: i } = n, a = document.createElement("div");
176
177
  a.className = "appeal-map-popup-body";
177
178
  let o = document.createElement("div");
@@ -183,184 +184,184 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
183
184
  }
184
185
  let c = document.createElement("button");
185
186
  c.type = "button", c.className = "appeal-map-popup-close", c.setAttribute("aria-label", "Закрити"), c.style.setProperty("outline", "none", "important"), c.style.setProperty("border", "0", "important"), c.style.setProperty("box-shadow", "none", "important"), c.innerHTML = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>", c.addEventListener("click", (e) => {
186
- e.preventDefault(), e.stopPropagation(), H?.remove();
187
- }), a.append(o, c), H = new t.Popup({
187
+ e.preventDefault(), e.stopPropagation(), U?.remove();
188
+ }), a.append(o, c), U = new t.Popup({
188
189
  closeButton: !1,
189
190
  closeOnClick: !1,
190
191
  offset: 42,
191
192
  maxWidth: "280px",
192
193
  className: "appeal-map-popup",
193
194
  anchor: "bottom"
194
- }).setLngLat(q.value).setDOMContent(a).addTo(e);
195
+ }).setLngLat(J.value).setDOMContent(a).addTo(e);
195
196
  }
196
- function X(e) {
197
- u(e, I(N.value), f(e, M.value, [C]));
197
+ function ye(e) {
198
+ u(e, L(P.value), f(e, N.value, [C]));
198
199
  }
199
200
  function Z(e) {
200
- h(e, M.value, F.value, C);
201
+ h(e, N.value, F.value, C);
201
202
  }
202
203
  function be(e) {
203
- N.value !== e && (N.value = e);
204
+ P.value !== e && (P.value = e);
204
205
  }
205
206
  function xe(e) {
206
207
  let t = F.value;
207
208
  F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
208
209
  }
209
210
  function Q() {
210
- let e = B, t = O.value, n = D.value;
211
- if (!e || !t || !n || k.value || n.clientWidth === 0 || n.clientHeight === 0) return;
211
+ let e = V, t = k.value, n = O.value;
212
+ if (!e || !t || !n || A.value || n.clientWidth === 0 || n.clientHeight === 0) return;
212
213
  let r = new e.Map({
213
214
  container: t,
214
- style: c(I(N.value)),
215
- ...K.value ? {
216
- bounds: K.value,
217
- fitBoundsOptions: E
215
+ style: c(L(P.value)),
216
+ ...q.value ? {
217
+ bounds: q.value,
218
+ fitBoundsOptions: D
218
219
  } : {
219
- center: T,
220
+ center: E,
220
221
  zoom: 16
221
222
  },
222
223
  attributionControl: !1,
223
224
  locale: _
224
225
  });
225
226
  r.on("load", () => {
226
- r.resize(), Y(r, e), Z(r), A.value = !1;
227
+ r.resize(), X(r, e), Z(r), j.value = !1;
227
228
  }), r.on("error", (e) => {
228
229
  console.warn("[AppealDetailMap]", e?.error ?? e);
229
- }), k.value = r;
230
+ }), A.value = r;
230
231
  }
231
232
  function Se() {
232
- k.value?.zoomIn({ duration: 250 });
233
- }
234
- function $() {
235
- k.value?.zoomOut({ duration: 250 });
233
+ A.value?.zoomIn({ duration: 250 });
236
234
  }
237
235
  function Ce() {
238
- let e = k.value;
239
- e && J(e);
236
+ A.value?.zoomOut({ duration: 250 });
237
+ }
238
+ function $() {
239
+ let e = A.value;
240
+ e && Y(e);
240
241
  }
241
242
  function we() {
242
- let e = k.value, t = B;
243
+ let e = A.value, t = V;
243
244
  if (!e || !t) return;
244
245
  let n = () => {
245
- Y(e, t), J(e);
246
+ X(e, t), Y(e);
246
247
  };
247
248
  e.isStyleLoaded() ? n() : e.once("load", n);
248
249
  }
249
- R(() => [
250
- G.value,
250
+ B(() => [
251
+ K.value,
251
252
  l.address,
252
253
  l.location
253
- ], we), R(N, () => {
254
- let e = k.value;
254
+ ], we), B(P, () => {
255
+ let e = A.value;
255
256
  if (!e) return;
256
- let t = () => X(e);
257
+ let t = () => ye(e);
257
258
  e.isStyleLoaded() ? t() : e.once("load", t);
258
- }), R(F, () => {
259
- let e = k.value;
260
- e?.isStyleLoaded() && m(e, M.value, F.value);
261
- }), ne(async () => {
259
+ }), B(F, () => {
260
+ let e = A.value;
261
+ e?.isStyleLoaded() && m(e, N.value, F.value);
262
+ }), te(async () => {
262
263
  try {
263
- let [e] = await Promise.all([d(), z()]);
264
- B = e;
264
+ let [e] = await Promise.all([d(), ie()]);
265
+ V = e;
265
266
  } catch (e) {
266
- console.error(e), A.value = !1, te.value = p;
267
+ console.error(e), j.value = !1, ee.value = p;
267
268
  return;
268
269
  }
269
- !W && D.value && (V = new ResizeObserver(() => {
270
- k.value ? k.value.resize() : Q();
271
- }), V.observe(D.value));
272
- }), re(() => {
273
- W = !0, V?.disconnect(), H?.remove(), H = null, U?.remove(), U = null, k.value?.remove(), k.value = null;
270
+ !G && O.value && (H = new ResizeObserver(() => {
271
+ A.value ? A.value.resize() : Q();
272
+ }), H.observe(O.value));
273
+ }), ne(() => {
274
+ G = !0, H?.disconnect(), U?.remove(), U = null, W?.remove(), W = null, A.value?.remove(), A.value = null;
274
275
  });
275
276
  let Te = {
276
277
  props: l,
277
278
  POLYGON_SOURCE_ID: x,
278
279
  POLYGON_FILL_ID: C,
279
- POLYGON_LINE_ID: w,
280
- FALLBACK_CENTER: T,
281
- FIT_OPTIONS: E,
282
- mapAreaRef: D,
283
- containerRef: O,
284
- mapRef: k,
285
- mapLoadError: te,
286
- mapLoading: A,
287
- baseLayers: j,
288
- overlayLayers: M,
289
- activeBaseId: N,
280
+ POLYGON_LINE_ID: T,
281
+ FALLBACK_CENTER: E,
282
+ FIT_OPTIONS: D,
283
+ mapAreaRef: O,
284
+ containerRef: k,
285
+ mapRef: A,
286
+ mapLoadError: ee,
287
+ mapLoading: j,
288
+ baseLayers: M,
289
+ overlayLayers: N,
290
+ activeBaseId: P,
290
291
  activeOverlayIds: F,
291
- baseLayer: I,
292
- isApplications: L,
293
- fallbackApplicationsOverlay: ae,
294
- loadLayerSettings: z,
292
+ baseLayer: L,
293
+ isApplications: R,
294
+ fallbackApplicationsOverlay: z,
295
+ loadLayerSettings: ie,
295
296
  get ml() {
296
- return B;
297
+ return V;
297
298
  },
298
299
  set ml(e) {
299
- B = e;
300
+ V = e;
300
301
  },
301
302
  get resizeObserver() {
302
- return V;
303
+ return H;
303
304
  },
304
305
  set resizeObserver(e) {
305
- V = e;
306
+ H = e;
306
307
  },
307
308
  get addressPopup() {
308
- return H;
309
+ return U;
309
310
  },
310
311
  set addressPopup(e) {
311
- H = e;
312
+ U = e;
312
313
  },
313
314
  get addressMarker() {
314
- return U;
315
+ return W;
315
316
  },
316
317
  set addressMarker(e) {
317
- U = e;
318
+ W = e;
318
319
  },
319
320
  get disposed() {
320
- return W;
321
+ return G;
321
322
  },
322
323
  set disposed(e) {
323
- W = e;
324
+ G = e;
324
325
  },
325
- geometry: G,
326
- bounds: K,
327
- center: q,
328
- mapAreaClass: fe,
329
- buildGeoJson: pe,
330
- fitToGeometry: J,
331
- ensureLayers: Y,
332
- splitAddressLabel: me,
333
- resolvePopupText: he,
334
- createPinElement: ge,
335
- showAddressMarker: _e,
336
- POPUP_STYLE_ID: de,
337
- ensurePopupStyles: ve,
338
- showAddressPopup: ye,
339
- remountBasemap: X,
326
+ geometry: K,
327
+ bounds: q,
328
+ center: J,
329
+ mapAreaClass: de,
330
+ buildGeoJson: fe,
331
+ fitToGeometry: Y,
332
+ ensureLayers: X,
333
+ splitAddressLabel: pe,
334
+ resolvePopupText: me,
335
+ createPinElement: he,
336
+ showAddressMarker: ge,
337
+ POPUP_STYLE_ID: ue,
338
+ ensurePopupStyles: _e,
339
+ showAddressPopup: ve,
340
+ remountBasemap: ye,
340
341
  remountOverlays: Z,
341
342
  selectBase: be,
342
343
  toggleOverlay: xe,
343
344
  initMap: Q,
344
345
  zoomIn: Se,
345
- zoomOut: $,
346
- resetView: Ce,
346
+ zoomOut: Ce,
347
+ resetView: $,
347
348
  refreshLayers: we,
348
349
  get Crosshair() {
349
- return oe;
350
+ return ae;
350
351
  },
351
352
  get MapPin() {
352
- return se;
353
+ return oe;
353
354
  },
354
355
  get MapPinned() {
355
- return ce;
356
+ return se;
356
357
  },
357
358
  get ZoomIn() {
358
- return le;
359
+ return ce;
359
360
  },
360
361
  get ZoomOut() {
361
- return ue;
362
+ return le;
362
363
  },
363
- MapLayerMenu: ee
364
+ MapLayerMenu: S
364
365
  };
365
366
  return Object.defineProperty(Te, "__isScriptSetup", {
366
367
  enumerable: !1,
@@ -370,10 +371,10 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
370
371
  }), fe = {
371
372
  key: 0,
372
373
  class: "flex shrink-0 items-center justify-between border-b border-slate-100 px-5 py-3.5"
373
- }, pe = { class: "flex items-center gap-2.5" }, J = {
374
+ }, Y = { class: "flex items-center gap-2.5" }, X = {
374
375
  ref: "containerRef",
375
376
  class: "absolute inset-0 h-full w-full"
376
- }, Y = {
377
+ }, pe = {
377
378
  key: 0,
378
379
  class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
379
380
  }, me = {
@@ -384,19 +385,19 @@ var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
384
385
  class: "flex shrink-0 items-center gap-2 border-t border-slate-100 px-5 py-2.5 text-xs text-slate-400"
385
386
  }, _e = { class: "break-words" };
386
387
  function ve(e, t, n, r, i, a) {
387
- return N(), T("div", { class: A(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : void 0) }, [
388
- n.variant === "panel" ? (N(), T("header", fe, [E("div", pe, [D(r.MapPinned, {
388
+ return F(), D("div", { class: M(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : void 0) }, [
389
+ n.variant === "panel" ? (F(), D("header", fe, [O("div", Y, [k(r.MapPinned, {
389
390
  class: "h-[18px] w-[18px] text-[#1f5ae0]",
390
391
  "stroke-width": 2,
391
392
  "aria-hidden": "true"
392
- }), t[0] ||= E("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Інтерактивна карта", -1)]), t[1] ||= E("span", { class: "rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500" }, " Межі заявки ", -1)])) : w("", !0),
393
- E("div", {
393
+ }), t[0] ||= O("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Інтерактивна карта", -1)]), t[1] ||= O("span", { class: "rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500" }, " Межі заявки ", -1)])) : E("", !0),
394
+ O("div", {
394
395
  ref: "mapAreaRef",
395
- class: A(r.mapAreaClass)
396
+ class: M(r.mapAreaClass)
396
397
  }, [
397
- E("div", J, null, 512),
398
- r.mapLoadError ? (N(), T("p", Y, I(r.mapLoadError), 1)) : r.mapLoading ? (N(), T("p", me, " Завантаження карти… ")) : w("", !0),
399
- D(r.MapLayerMenu, {
398
+ O("div", X, null, 512),
399
+ r.mapLoadError ? (F(), D("p", pe, R(r.mapLoadError), 1)) : r.mapLoading ? (F(), D("p", me, " Завантаження карти… ")) : E("", !0),
400
+ k(r.MapLayerMenu, {
400
401
  "base-id": r.activeBaseId,
401
402
  "active-overlay-ids": r.activeOverlayIds,
402
403
  "base-layers": r.baseLayers,
@@ -409,65 +410,65 @@ function ve(e, t, n, r, i, a) {
409
410
  "base-layers",
410
411
  "overlays"
411
412
  ]),
412
- E("div", he, [
413
- E("button", {
413
+ O("div", he, [
414
+ O("button", {
414
415
  type: "button",
415
416
  title: "Збільшити",
416
417
  "aria-label": "Збільшити",
417
418
  class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
418
419
  onClick: r.zoomIn
419
- }, [D(r.ZoomIn, {
420
+ }, [k(r.ZoomIn, {
420
421
  class: "h-4 w-4",
421
422
  "stroke-width": 2,
422
423
  "aria-hidden": "true"
423
424
  })]),
424
- E("button", {
425
+ O("button", {
425
426
  type: "button",
426
427
  title: "Зменшити",
427
428
  "aria-label": "Зменшити",
428
429
  class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
429
430
  onClick: r.zoomOut
430
- }, [D(r.ZoomOut, {
431
+ }, [k(r.ZoomOut, {
431
432
  class: "h-4 w-4",
432
433
  "stroke-width": 2,
433
434
  "aria-hidden": "true"
434
435
  })]),
435
- E("button", {
436
+ O("button", {
436
437
  type: "button",
437
438
  title: "Відновити масштаб",
438
439
  "aria-label": "Відновити масштаб",
439
440
  class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
440
441
  onClick: r.resetView
441
- }, [D(r.Crosshair, {
442
+ }, [k(r.Crosshair, {
442
443
  class: "h-4 w-4",
443
444
  "stroke-width": 2,
444
445
  "aria-hidden": "true"
445
446
  })])
446
447
  ])
447
448
  ], 2),
448
- n.variant === "panel" ? (N(), T("footer", ge, [
449
- D(r.MapPin, {
449
+ n.variant === "panel" ? (F(), D("footer", ge, [
450
+ k(r.MapPin, {
450
451
  class: "h-3 w-3 shrink-0",
451
452
  "stroke-width": 2,
452
453
  "aria-hidden": "true"
453
454
  }),
454
- E("span", null, "Площа ділянки: " + I(n.area ?? "—") + " га", 1),
455
- t[2] ||= E("span", { class: "text-slate-300" }, "·", -1),
456
- E("span", _e, I(n.location), 1)
457
- ])) : w("", !0)
455
+ O("span", null, "Площа ділянки: " + R(n.area ?? "—") + " га", 1),
456
+ t[2] ||= O("span", { class: "text-slate-300" }, "·", -1),
457
+ O("span", _e, R(n.location), 1)
458
+ ])) : E("", !0)
458
459
  ], 2);
459
460
  }
460
- var ye = /*#__PURE__*/ e(q, [
461
+ var ye = /*#__PURE__*/ e(de, [
461
462
  ["render", ve],
462
463
  ["__scopeId", "data-v-ded53fc4"],
463
- ["__file", "C:/softpro/surveyor/shared/map/components/AppealDetailMap.vue"]
464
+ ["__file", "D:/softpro/surveyor/shared/map/components/AppealDetailMap.vue"]
464
465
  ]);
465
466
  //#endregion
466
467
  //#region shared/comments/applicationNotesApi.ts
467
- function X(e, t, n) {
468
+ function Z(e, t, n) {
468
469
  return `/api/resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${n}`;
469
470
  }
470
- async function Z(e) {
471
+ async function be(e) {
471
472
  let t = await e.text();
472
473
  try {
473
474
  let n = JSON.parse(t);
@@ -476,29 +477,29 @@ async function Z(e) {
476
477
  return t || `HTTP ${e.status}`;
477
478
  }
478
479
  }
479
- async function be(e, t) {
480
- let n = "".replace(/\/$/, ""), r = await fetch(`${n}${X(e, t, "comments")}`, { credentials: "include" });
481
- if (!r.ok) throw Error(await Z(r));
480
+ async function xe(e, t) {
481
+ let n = "".replace(/\/$/, ""), r = await fetch(`${n}${Z(e, t, "comments")}`, { credentials: "include" });
482
+ if (!r.ok) throw Error(await be(r));
482
483
  return [...(await r.json()).rows ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")));
483
484
  }
484
- async function xe(e, t, n) {
485
+ async function Q(e, t, n) {
485
486
  let r = n.trim();
486
487
  if (!r) throw Error("Введіть текст коментаря");
487
- let i = "".replace(/\/$/, ""), a = await fetch(`${i}${X(e, t, "notes")}`, {
488
+ let i = "".replace(/\/$/, ""), a = await fetch(`${i}${Z(e, t, "notes")}`, {
488
489
  method: "POST",
489
490
  credentials: "include",
490
491
  headers: { "Content-Type": "application/json" },
491
492
  body: JSON.stringify({ body: r })
492
493
  });
493
- if (!a.ok) throw Error(await Z(a));
494
+ if (!a.ok) throw Error(await be(a));
494
495
  return a.json();
495
496
  }
496
497
  //#endregion
497
498
  //#region shared/comments/noteDisplay.ts
498
- function Q(e) {
499
+ function Se(e) {
499
500
  return e.split(/\s+/).map((e) => e[0]).filter(Boolean).join("").slice(0, 2).toUpperCase();
500
501
  }
501
- function Se(e) {
502
+ function Ce(e) {
502
503
  if (!e) return "";
503
504
  let t = e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})/);
504
505
  if (t) return `${t[3]}.${t[2]}.${t[1]} ${t[4]}:${t[5]}`;
@@ -508,7 +509,7 @@ function Se(e) {
508
509
  var $ = {
509
510
  name: "Невідомий користувач",
510
511
  initials: "НК"
511
- }, Ce = /* @__PURE__ */ new Set(/* @__PURE__ */ "A.B.BLOCKQUOTE.BR.CODE.DEL.EM.H1.H2.H3.H4.H5.H6.HR.I.IMG.LI.MARK.OL.P.PRE.S.SPAN.STRONG.SUB.SUP.TABLE.TBODY.TD.TH.THEAD.TR.U.UL".split(".")), we = /* @__PURE__ */ new Set([
512
+ }, we = /* @__PURE__ */ new Set(/* @__PURE__ */ "A.B.BLOCKQUOTE.BR.CODE.DEL.EM.H1.H2.H3.H4.H5.H6.HR.I.IMG.LI.MARK.OL.P.PRE.S.SPAN.STRONG.SUB.SUP.TABLE.TBODY.TD.TH.THEAD.TR.U.UL".split(".")), Te = /* @__PURE__ */ new Set([
512
513
  "SCRIPT",
513
514
  "STYLE",
514
515
  "IFRAME",
@@ -517,14 +518,14 @@ var $ = {
517
518
  "LINK",
518
519
  "META"
519
520
  ]);
520
- function Te(e) {
521
+ function Ee(e) {
521
522
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
522
523
  }
523
- function Ee(e, t) {
524
+ function De(e, t) {
524
525
  let n = e.trim();
525
526
  return t === "src" && /^data:image\/(?:png|jpe?g|gif|webp);/i.test(n) || /^(https?:|mailto:)/i.test(n) ? !0 : t === "href" && (n.startsWith("/") || n.startsWith("#"));
526
527
  }
527
- function De(e) {
528
+ function Oe(e) {
528
529
  let t = [];
529
530
  for (let n of e.split(";")) {
530
531
  let [e, ...r] = n.split(":"), i = e?.trim().toLowerCase(), a = r.join(":").trim();
@@ -532,50 +533,50 @@ function De(e) {
532
533
  }
533
534
  return t.join("; ");
534
535
  }
535
- function Oe(e) {
536
+ function ke(e) {
536
537
  let t = e.tagName, n = e.getAttribute("href"), r = e.getAttribute("src"), i = e.getAttribute("alt"), a = e.getAttribute("title"), o = e.getAttribute("width"), s = e.getAttribute("height"), c = e.getAttribute("style"), l = e.getAttribute("colspan"), u = e.getAttribute("rowspan"), d = e.getAttribute("target");
537
538
  for (let t of [...e.attributes]) e.removeAttribute(t.name);
538
- t === "A" && n && Ee(n, "href") && (e.setAttribute("href", n.trim()), a && e.setAttribute("title", a), d === "_blank" && (e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"))), t === "IMG" && r && Ee(r, "src") && (e.setAttribute("src", r.trim()), i != null && e.setAttribute("alt", i), a && e.setAttribute("title", a), o && /^\d+$/.test(o) && e.setAttribute("width", o), s && /^\d+$/.test(s) && e.setAttribute("height", s)), (t === "TD" || t === "TH") && (l && /^\d+$/.test(l) && e.setAttribute("colspan", l), u && /^\d+$/.test(u) && e.setAttribute("rowspan", u));
539
- let f = c ? De(c) : "";
539
+ t === "A" && n && De(n, "href") && (e.setAttribute("href", n.trim()), a && e.setAttribute("title", a), d === "_blank" && (e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"))), t === "IMG" && r && De(r, "src") && (e.setAttribute("src", r.trim()), i != null && e.setAttribute("alt", i), a && e.setAttribute("title", a), o && /^\d+$/.test(o) && e.setAttribute("width", o), s && /^\d+$/.test(s) && e.setAttribute("height", s)), (t === "TD" || t === "TH") && (l && /^\d+$/.test(l) && e.setAttribute("colspan", l), u && /^\d+$/.test(u) && e.setAttribute("rowspan", u));
540
+ let f = c ? Oe(c) : "";
540
541
  f && e.setAttribute("style", f);
541
542
  }
542
- function ke(e) {
543
+ function Ae(e) {
543
544
  for (let t of [...e.childNodes]) {
544
545
  if (t.nodeType !== Node.ELEMENT_NODE) {
545
546
  t.nodeType === Node.COMMENT_NODE && t.remove();
546
547
  continue;
547
548
  }
548
549
  let e = t;
549
- if (we.has(e.tagName)) {
550
+ if (Te.has(e.tagName)) {
550
551
  e.remove();
551
552
  continue;
552
553
  }
553
- if (ke(e), !Ce.has(e.tagName)) {
554
+ if (Ae(e), !we.has(e.tagName)) {
554
555
  e.replaceWith(...e.childNodes);
555
556
  continue;
556
557
  }
557
- Oe(e);
558
+ ke(e);
558
559
  }
559
560
  }
560
- function Ae(e) {
561
+ function je(e) {
561
562
  return /<img\b/i.test(e) ? !0 : e.replace(/<[^>]*>/g, " ").replace(/&nbsp;|&#160;/gi, " ").replace(/\s+/g, " ").trim().length > 0;
562
563
  }
563
- function je(e) {
564
+ function Me(e) {
564
565
  let t = e ?? "";
565
- if (!/<\/?[a-z][\s\S]*?>/i.test(t)) return Te(t).replace(/\n/g, "<br>");
566
+ if (!/<\/?[a-z][\s\S]*?>/i.test(t)) return Ee(t).replace(/\n/g, "<br>");
566
567
  let n = new DOMParser().parseFromString(t, "text/html");
567
- return ke(n.body), n.body.innerHTML;
568
+ return Ae(n.body), n.body.innerHTML;
568
569
  }
569
- function Me(e, t) {
570
+ function Ne(e, t) {
570
571
  let n = e.created_by_data?.text?.trim();
571
572
  return n ? {
572
573
  ...t,
573
574
  name: n,
574
- initials: Q(n) || t.initials
575
+ initials: Se(n) || t.initials
575
576
  } : t;
576
577
  }
577
- function Ne(e) {
578
- let t = Me(e, $);
578
+ function Pe(e) {
579
+ let t = Ne(e, $);
579
580
  if (t.name !== $.name) return t;
580
581
  let n = e.created_by?.trim();
581
582
  return n ? {
@@ -585,7 +586,7 @@ function Ne(e) {
585
586
  }
586
587
  //#endregion
587
588
  //#region shared/comments/ApplicationCommentsSection.vue?vue&type=script&setup=true&lang.ts
588
- var Pe = /*@__PURE__*/ O({
589
+ var Fe = /*@__PURE__*/ A({
589
590
  __name: "ApplicationCommentsSection",
590
591
  props: {
591
592
  applicationId: {
@@ -623,15 +624,15 @@ var Pe = /*@__PURE__*/ O({
623
624
  "strike",
624
625
  "text_align",
625
626
  "italic"
626
- ], r = e, i = P([]), a = P({}), o = P(!0), s = P(""), c = P(""), l = P(!1), u = P(""), d = S(() => r.variant === "admin"), f = S(() => Ae(c.value) && !l.value), p = S(() => d.value ? "rounded-2xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), m = S(() => d.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"), h = S(() => d.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), g = S(() => (d.value, "flex flex-col gap-4 p-5"));
627
+ ], r = e, i = I([]), a = I({}), o = I(!0), s = I(""), c = I(""), l = I(!1), u = I(""), d = w(() => r.variant === "admin"), f = w(() => je(c.value) && !l.value), p = w(() => d.value ? "rounded-2xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), m = w(() => d.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"), h = w(() => d.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), g = w(() => (d.value, "flex flex-col gap-4 p-5"));
627
628
  function _(e) {
628
- return Me(e, a.value[e.note_id] ?? r.resolveAuthor?.(e) ?? Ne(e));
629
+ return Ne(e, a.value[e.note_id] ?? r.resolveAuthor?.(e) ?? Pe(e));
629
630
  }
630
631
  async function v(e) {
631
632
  if (r.applicationId) {
632
633
  e?.silent || (o.value = !0), s.value = "";
633
634
  try {
634
- i.value = await be(r.resource, r.applicationId), a.value = {};
635
+ i.value = await xe(r.resource, r.applicationId), a.value = {};
635
636
  } catch (e) {
636
637
  i.value = [], s.value = e instanceof Error ? e.message : "Не вдалося завантажити коментарі";
637
638
  } finally {
@@ -641,10 +642,10 @@ var Pe = /*@__PURE__*/ O({
641
642
  }
642
643
  async function y() {
643
644
  let e = c.value.trim();
644
- if (Ae(e) && !l.value && r.applicationId) {
645
+ if (je(e) && !l.value && r.applicationId) {
645
646
  l.value = !0, u.value = "";
646
647
  try {
647
- await xe(r.resource, r.applicationId, e), c.value = "", await v({ silent: !0 });
648
+ await Q(r.resource, r.applicationId, e), c.value = "", await v({ silent: !0 });
648
649
  } catch (e) {
649
650
  u.value = e instanceof Error ? e.message : "Не вдалося надіслати коментар";
650
651
  } finally {
@@ -652,7 +653,7 @@ var Pe = /*@__PURE__*/ O({
652
653
  }
653
654
  }
654
655
  }
655
- R(() => r.applicationId, () => {
656
+ B(() => r.applicationId, () => {
656
657
  v();
657
658
  }, { immediate: !0 });
658
659
  let b = {
@@ -675,19 +676,19 @@ var Pe = /*@__PURE__*/ O({
675
676
  loadNotes: v,
676
677
  submit: y,
677
678
  get VsInputRichtext() {
678
- return K;
679
+ return J;
679
680
  },
680
681
  get MessageSquare() {
681
- return W;
682
+ return K;
682
683
  },
683
684
  get Send() {
684
- return G;
685
+ return q;
685
686
  },
686
687
  get formatNoteDateTime() {
687
- return Se;
688
+ return Ce;
688
689
  },
689
690
  get noteBodyHtml() {
690
- return je;
691
+ return Me;
691
692
  }
692
693
  };
693
694
  return Object.defineProperty(b, "__isScriptSetup", {
@@ -695,56 +696,56 @@ var Pe = /*@__PURE__*/ O({
695
696
  value: !0
696
697
  }), b;
697
698
  }
698
- }), Fe = {
699
+ }), Ie = {
699
700
  key: 1,
700
701
  class: "text-center text-sm text-red-600"
701
- }, Ie = {
702
+ }, Le = {
702
703
  key: 1,
703
704
  class: "flex flex-col gap-4"
704
- }, Le = { class: "min-w-0 flex-1" }, Re = { class: "flex flex-wrap items-baseline justify-between gap-x-2" }, ze = { class: "text-[14px] font-semibold text-slate-800" }, Be = { class: "text-xs text-slate-400" }, Ve = {
705
+ }, Re = { class: "min-w-0 flex-1" }, ze = { class: "flex flex-wrap items-baseline justify-between gap-x-2" }, Be = { class: "text-[14px] font-semibold text-slate-800" }, Ve = { class: "text-xs text-slate-400" }, He = {
705
706
  key: 0,
706
707
  class: "mb-1.5 text-xs font-medium text-[#1f5ae0]"
707
- }, He = ["innerHTML"], Ue = {
708
+ }, Ue = ["innerHTML"], We = {
708
709
  key: 1,
709
710
  class: "rounded-xl bg-gray-50 px-4 py-3"
710
- }, We = { class: "mb-1 flex items-center justify-between gap-2" }, Ge = { class: "text-xs font-semibold text-gray-800" }, Ke = { class: "text-xs text-gray-400" }, qe = {
711
+ }, Ge = { class: "mb-1 flex items-center justify-between gap-2" }, Ke = { class: "text-xs font-semibold text-gray-800" }, qe = { class: "text-xs text-gray-400" }, Je = {
711
712
  key: 0,
712
713
  class: "mb-1 text-xs font-medium text-[#2663EB]"
713
- }, Je = ["innerHTML"], Ye = { class: "min-w-0 flex-1" }, Xe = { class: "!h-full relative overflow-hidden" }, Ze = { class: "mt-2 flex justify-end" }, Qe = ["disabled", "aria-label"], $e = { key: 0 }, et = {
714
+ }, Ye = ["innerHTML"], Xe = { class: "min-w-0 flex-1" }, Ze = { class: "!h-full relative overflow-hidden" }, Qe = { class: "mt-2 flex justify-end" }, $e = ["disabled", "aria-label"], et = { key: 0 }, tt = {
714
715
  key: 2,
715
716
  class: "text-xs text-red-600"
716
717
  };
717
- function tt(e, t, n, r, i, a) {
718
- return N(), T("section", { class: A(r.sectionClass) }, [E("header", { class: A(r.headerClass) }, [D(r.MessageSquare, {
719
- class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
718
+ function nt(e, t, n, r, i, a) {
719
+ return F(), D("section", { class: M(r.sectionClass) }, [O("header", { class: M(r.headerClass) }, [k(r.MessageSquare, {
720
+ class: M(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
720
721
  "stroke-width": 2,
721
722
  "aria-hidden": "true"
722
- }, null, 8, ["class"]), E("h2", { class: A(r.titleClass) }, "Коментарі", 2)], 2), E("div", { class: A(r.bodyClass) }, [r.loading ? (N(), T("p", {
723
+ }, null, 8, ["class"]), O("h2", { class: M(r.titleClass) }, "Коментарі", 2)], 2), O("div", { class: M(r.bodyClass) }, [r.loading ? (F(), D("p", {
723
724
  key: 0,
724
- class: A(["text-center text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
725
- }, " Завантаження… ", 2)) : r.loadError ? (N(), T("p", Fe, I(r.loadError), 1)) : (N(), T(x, { key: 2 }, [
726
- r.notes.length === 0 ? (N(), T("p", {
725
+ class: M(["text-center text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
726
+ }, " Завантаження… ", 2)) : r.loadError ? (F(), D("p", Ie, R(r.loadError), 1)) : (F(), D(C, { key: 2 }, [
727
+ r.notes.length === 0 ? (F(), D("p", {
727
728
  key: 0,
728
- class: A(["text-center text-sm italic", r.isAdmin ? "py-2 text-slate-400" : "py-4 text-gray-400"])
729
- }, " Коментарів ще немає ", 2)) : (N(), T("ul", Ie, [(N(!0), T(x, null, F(r.notes, (e) => (N(), T("li", {
729
+ class: M(["text-center text-sm italic", r.isAdmin ? "py-2 text-slate-400" : "py-4 text-gray-400"])
730
+ }, " Коментарів ще немає ", 2)) : (F(), D("ul", Le, [(F(!0), D(C, null, L(r.notes, (e) => (F(), D("li", {
730
731
  key: e.note_id,
731
732
  class: "flex gap-3"
732
- }, [E("div", { class: A(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white text-xs"]) }, I(r.authorFor(e).initials), 3), E("div", Le, [r.isAdmin ? (N(), T(x, { key: 0 }, [
733
- E("div", Re, [E("span", ze, I(r.authorFor(e).name), 1), E("time", Be, I(r.formatNoteDateTime(e.created_at)), 1)]),
734
- r.authorFor(e).role ? (N(), T("p", Ve, I(r.authorFor(e).role), 1)) : w("", !0),
735
- E("div", {
733
+ }, [O("div", { class: M(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white text-xs"]) }, R(r.authorFor(e).initials), 3), O("div", Re, [r.isAdmin ? (F(), D(C, { key: 0 }, [
734
+ O("div", ze, [O("span", Be, R(r.authorFor(e).name), 1), O("time", Ve, R(r.formatNoteDateTime(e.created_at)), 1)]),
735
+ r.authorFor(e).role ? (F(), D("p", He, R(r.authorFor(e).role), 1)) : E("", !0),
736
+ O("div", {
736
737
  class: "comment-body comment-body--admin text-[13px] leading-relaxed text-slate-600",
737
738
  innerHTML: r.noteBodyHtml(e.body)
738
- }, null, 8, He)
739
- ], 64)) : (N(), T("div", Ue, [
740
- E("div", We, [E("span", Ge, I(r.authorFor(e).name), 1), E("time", Ke, I(r.formatNoteDateTime(e.created_at)), 1)]),
741
- r.authorFor(e).role ? (N(), T("p", qe, I(r.authorFor(e).role), 1)) : w("", !0),
742
- E("div", {
739
+ }, null, 8, Ue)
740
+ ], 64)) : (F(), D("div", We, [
741
+ O("div", Ge, [O("span", Ke, R(r.authorFor(e).name), 1), O("time", qe, R(r.formatNoteDateTime(e.created_at)), 1)]),
742
+ r.authorFor(e).role ? (F(), D("p", Je, R(r.authorFor(e).role), 1)) : E("", !0),
743
+ O("div", {
743
744
  class: "comment-body text-sm text-gray-700",
744
745
  innerHTML: r.noteBodyHtml(e.body)
745
- }, null, 8, Je)
746
+ }, null, 8, Ye)
746
747
  ]))])]))), 128))])),
747
- E("div", { class: A(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]) }, [E("div", { class: A(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white"]) }, I(n.currentAuthor.initials), 3), E("div", Ye, [E("div", Xe, [D(r.VsInputRichtext, {
748
+ O("div", { class: M(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]) }, [O("div", { class: M(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white"]) }, R(n.currentAuthor.initials), 3), O("div", Xe, [O("div", Ze, [k(r.VsInputRichtext, {
748
749
  modelValue: r.draft,
749
750
  "onUpdate:modelValue": t[0] ||= (e) => r.draft = e,
750
751
  disabled: r.sending,
@@ -758,24 +759,24 @@ function tt(e, t, n, r, i, a) {
758
759
  "disabled",
759
760
  "placeholder",
760
761
  "richtext-props"
761
- ])]), E("div", Ze, [E("button", {
762
+ ])]), O("div", Qe, [O("button", {
762
763
  type: "button",
763
764
  disabled: !r.canSend,
764
765
  onClick: r.submit,
765
766
  "aria-label": r.isAdmin ? void 0 : "Надіслати",
766
- class: A(r.isAdmin ? "inline-flex items-center gap-1.5 rounded-lg bg-[#1f5ae0] px-4 py-2.5 text-sm font-medium text-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-all hover:bg-[#1a46b8] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#2663EB] p-1.5 text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40")
767
- }, [D(r.Send, {
767
+ class: M(r.isAdmin ? "inline-flex items-center gap-1.5 rounded-lg bg-[#1f5ae0] px-4 py-2.5 text-sm font-medium text-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-all hover:bg-[#1a46b8] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#2663EB] p-1.5 text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40")
768
+ }, [k(r.Send, {
768
769
  class: "h-3.5 w-3.5",
769
770
  "stroke-width": 2
770
- }), r.isAdmin ? (N(), T("span", $e, I(r.sending ? "Надсилання…" : "Надіслати"), 1)) : w("", !0)], 10, Qe)])])], 2),
771
- r.sendError ? (N(), T("p", et, I(r.sendError), 1)) : w("", !0)
771
+ }), r.isAdmin ? (F(), D("span", et, R(r.sending ? "Надсилання…" : "Надіслати"), 1)) : E("", !0)], 10, $e)])])], 2),
772
+ r.sendError ? (F(), D("p", tt, R(r.sendError), 1)) : E("", !0)
772
773
  ], 64))], 2)], 2);
773
774
  }
774
- var nt = /*#__PURE__*/ e(Pe, [
775
- ["render", tt],
775
+ var rt = /*#__PURE__*/ e(Fe, [
776
+ ["render", nt],
776
777
  ["__scopeId", "data-v-0f2a55e0"],
777
- ["__file", "C:/softpro/surveyor/shared/comments/ApplicationCommentsSection.vue"]
778
- ]), rt = /*@__PURE__*/ O({
778
+ ["__file", "D:/softpro/surveyor/shared/comments/ApplicationCommentsSection.vue"]
779
+ ]), it = /*@__PURE__*/ A({
779
780
  __name: "ApplicationHistorySection",
780
781
  props: {
781
782
  items: {
@@ -791,7 +792,7 @@ var nt = /*#__PURE__*/ e(Pe, [
791
792
  },
792
793
  setup(e, { expose: t }) {
793
794
  t();
794
- let n = e, r = P(!0), i = S(() => n.variant === "admin"), a = S(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = S(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), s = S(() => 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"), c = S(() => i.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), u = S(() => i.value ? "px-5 py-4" : "p-5");
795
+ let n = e, r = I(!0), i = w(() => n.variant === "admin"), a = w(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = w(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), s = w(() => 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"), c = w(() => i.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), u = w(() => i.value ? "px-5 py-4" : "p-5");
795
796
  function d(e, t) {
796
797
  return t?.text?.trim() || (e ? l.items.find((t) => t.code === e)?.name ?? e : "");
797
798
  }
@@ -819,10 +820,10 @@ var nt = /*#__PURE__*/ e(Pe, [
819
820
  historyTitle: f,
820
821
  formatDateTime: p,
821
822
  get ChevronDown() {
822
- return H;
823
+ return W;
823
824
  },
824
825
  get History() {
825
- return U;
826
+ return G;
826
827
  }
827
828
  };
828
829
  return Object.defineProperty(m, "__isScriptSetup", {
@@ -830,51 +831,38 @@ var nt = /*#__PURE__*/ e(Pe, [
830
831
  value: !0
831
832
  }), m;
832
833
  }
833
- }), it = {
834
+ }), at = {
834
835
  key: 0,
835
836
  class: "relative list-none"
836
- }, at = { class: "relative z-10 mt-1 shrink-0" }, ot = { class: "min-w-0 flex-1" }, st = { class: "flex flex-wrap items-baseline justify-between gap-x-2 gap-y-1" };
837
- function ct(e, t, n, r, i, a) {
838
- return N(), T("section", { class: A(r.sectionClass) }, [E("header", { class: A(r.headerClass) }, [D(r.History, {
839
- class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
837
+ }, ot = { class: "relative z-10 mt-1 shrink-0" }, st = { class: "min-w-0 flex-1" }, ct = { class: "flex flex-wrap items-baseline justify-between gap-x-2 gap-y-1" };
838
+ function lt(e, t, n, r, i, a) {
839
+ return F(), D("section", { class: M(r.sectionClass) }, [O("header", { class: M(r.headerClass) }, [k(r.History, {
840
+ class: M(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
840
841
  "stroke-width": 2,
841
842
  "aria-hidden": "true"
842
- }, null, 8, ["class"]), E("h2", { class: A(r.titleClass) }, "Історія", 2)], 2), E("div", { class: A(r.bodyClass) }, [E("button", {
843
+ }, null, 8, ["class"]), O("h2", { class: M(r.titleClass) }, "Історія", 2)], 2), O("div", { class: M(r.bodyClass) }, [O("button", {
843
844
  type: "button",
844
- class: A(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-[#1f5ae0]" : "text-gray-500 hover:text-[#2663EB]"]),
845
+ class: M(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-[#1f5ae0]" : "text-gray-500 hover:text-[#2663EB]"]),
845
846
  onClick: t[0] ||= (e) => r.open = !r.open
846
- }, [E("span", null, I(r.open ? "Згорнути" : `Розгорнути (${r.events.length} подій)`), 1), D(r.ChevronDown, {
847
- class: A(["h-4 w-4 transition-transform", r.open ? "" : "rotate-180"]),
847
+ }, [O("span", null, R(r.open ? "Згорнути" : `Розгорнути (${r.events.length} подій)`), 1), k(r.ChevronDown, {
848
+ class: M(["h-4 w-4 transition-transform", r.open ? "" : "rotate-180"]),
848
849
  "aria-hidden": "true"
849
- }, null, 8, ["class"])], 2), r.open && r.events.length ? (N(), T("ol", it, [t[1] ||= E("div", { class: "absolute bottom-2 left-[7px] top-2 w-px bg-slate-200" }, null, -1), (N(!0), T(x, null, F(r.events, (e, t) => (N(), T("li", {
850
+ }, null, 8, ["class"])], 2), r.open && r.events.length ? (F(), D("ol", at, [t[1] ||= O("div", { class: "absolute bottom-2 left-[7px] top-2 w-px bg-slate-200" }, null, -1), (F(!0), D(C, null, L(r.events, (e, t) => (F(), D("li", {
850
851
  key: e.history_id,
851
852
  class: "relative flex gap-4 pb-6 last:pb-0"
852
- }, [E("div", at, [E("span", { class: A(["block h-[15px] w-[15px] rounded-full border-2 border-white", t === r.events.length - 1 ? "bg-[#3479f6]" : "bg-slate-300"]) }, null, 2)]), E("div", ot, [
853
- E("div", st, [E("p", { class: A(["text-[14px] font-semibold", r.isAdmin ? "text-slate-800" : "text-gray-900"]) }, I(r.historyTitle(e)), 3), E("time", { class: A(["text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, I(r.formatDateTime(e.created_at) || "—"), 3)]),
854
- e.reason ? (N(), T("p", {
853
+ }, [O("div", ot, [O("span", { class: M(["block h-[15px] w-[15px] rounded-full border-2 border-white", t === r.events.length - 1 ? "bg-[#3479f6]" : "bg-slate-300"]) }, null, 2)]), O("div", st, [
854
+ O("div", ct, [O("p", { class: M(["text-[14px] font-semibold", r.isAdmin ? "text-slate-800" : "text-gray-900"]) }, R(r.historyTitle(e)), 3), O("time", { class: M(["text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, R(r.formatDateTime(e.created_at) || "—"), 3)]),
855
+ e.reason ? (F(), D("p", {
855
856
  key: 0,
856
- class: A(["mt-1 text-[13px] leading-relaxed", r.isAdmin ? "text-slate-600" : "text-gray-600"])
857
- }, I(e.reason), 3)) : w("", !0),
858
- E("p", { class: A(["mt-1 text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, I(e.changed_by_data?.text || "—"), 3)
859
- ])]))), 128))])) : r.events.length ? w("", !0) : (N(), T("p", {
857
+ class: M(["mt-1 text-[13px] leading-relaxed", r.isAdmin ? "text-slate-600" : "text-gray-600"])
858
+ }, R(e.reason), 3)) : E("", !0),
859
+ O("p", { class: M(["mt-1 text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, R(e.changed_by_data?.text || "—"), 3)
860
+ ])]))), 128))])) : r.events.length ? E("", !0) : (F(), D("p", {
860
861
  key: 1,
861
- class: A(["text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
862
+ class: M(["text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
862
863
  }, " Історія відсутня. ", 2))], 2)], 2);
863
864
  }
864
- var lt = /*#__PURE__*/ e(rt, [["render", ct], ["__file", "C:/softpro/surveyor/shared/history/ApplicationHistorySection.vue"]]);
865
- //#endregion
866
- //#region shared/export/downloadAttachmentFilename.ts
867
- function ut(e, t) {
868
- let n = e.match(/filename\*?=(?:UTF-8''|")?([^";]+)/i)?.[1]?.replace(/"/g, "") ?? t;
869
- try {
870
- return decodeURIComponent(n);
871
- } catch {
872
- return n || t;
873
- }
874
- }
875
- //#endregion
876
- //#region shared/export/CrsSuggestionSelect.vue?vue&type=script&setup=true&lang.ts
877
- var dt = /*@__PURE__*/ O({
865
+ var ut = /*#__PURE__*/ e(it, [["render", lt], ["__file", "D:/softpro/surveyor/shared/history/ApplicationHistorySection.vue"]]), dt = /*@__PURE__*/ A({
878
866
  __name: "CrsSuggestionSelect",
879
867
  props: {
880
868
  modelValue: {
@@ -921,14 +909,14 @@ var dt = /*@__PURE__*/ O({
921
909
  ],
922
910
  setup(e, { expose: n, emit: r }) {
923
911
  n();
924
- let i = e, a = r, o = P(!1), s = P(""), c = P(null), l = P(null), u = P(null), d = P(null), f = S(() => {
912
+ let i = e, a = r, o = I(!1), s = I(""), c = I(null), l = I(null), u = I(null), d = I(null), f = w(() => {
925
913
  let e = s.value.trim().toLowerCase();
926
914
  return e ? i.options.filter((t) => t.text.toLowerCase().includes(e) || t.id.toLowerCase().includes(e)) : i.options;
927
- }), p = S(() => d.value ? {
915
+ }), p = w(() => d.value ? {
928
916
  left: `${d.value.left}px`,
929
917
  width: `${d.value.width}px`,
930
918
  top: `${d.value.bottom + 4}px`
931
- } : { visibility: "hidden" }), m = S(() => i.variant === "cabinet" ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-[#8ec1ff] bg-white text-slate-900 ring-2 ring-[#d9eaff]"), h = S(() => i.variant === "cabinet" ? "border-gray-200 bg-white text-gray-900 hover:border-gray-300" : "border-slate-200 bg-white text-slate-900 hover:border-slate-300"), g = S(() => i.variant === "cabinet" ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "bg-[#eef6ff] font-medium text-[#1a46b8]");
919
+ } : { visibility: "hidden" }), m = w(() => i.variant === "cabinet" ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-[#8ec1ff] bg-white text-slate-900 ring-2 ring-[#d9eaff]"), h = w(() => i.variant === "cabinet" ? "border-gray-200 bg-white text-gray-900 hover:border-gray-300" : "border-slate-200 bg-white text-slate-900 hover:border-slate-300"), g = w(() => i.variant === "cabinet" ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "bg-[#eef6ff] font-medium text-[#1a46b8]");
932
920
  function _() {
933
921
  d.value = c.value?.getBoundingClientRect() ?? null;
934
922
  }
@@ -941,22 +929,22 @@ var dt = /*@__PURE__*/ O({
941
929
  function b() {
942
930
  i.disabled || (o.value = !o.value);
943
931
  }
944
- function ee(e) {
932
+ function x(e) {
945
933
  a("update:modelValue", e.id), a("update:displayValue", e.text), o.value = !1;
946
934
  }
947
- function x(e) {
935
+ function S(e) {
948
936
  let t = e.target;
949
937
  c.value?.contains(t) || l.value?.contains(t) || (o.value = !1);
950
938
  }
951
939
  let C;
952
- R(s, (e) => {
940
+ B(s, (e) => {
953
941
  o.value && (clearTimeout(C), C = setTimeout(() => a("search", e.trim()), 280));
954
- }), R(o, async (e) => {
955
- y(), e && (s.value = "", _(), v(), a("search", ""), await te(), u.value?.focus());
956
- }), ne(() => document.addEventListener("mousedown", x)), M(() => {
957
- document.removeEventListener("mousedown", x), y(), clearTimeout(C);
942
+ }), B(o, async (e) => {
943
+ y(), e && (s.value = "", _(), v(), a("search", ""), await j(), u.value?.focus());
944
+ }), te(() => document.addEventListener("mousedown", S)), P(() => {
945
+ document.removeEventListener("mousedown", S), y(), clearTimeout(C);
958
946
  });
959
- let w = {
947
+ let T = {
960
948
  props: i,
961
949
  emit: a,
962
950
  open: o,
@@ -974,8 +962,8 @@ var dt = /*@__PURE__*/ O({
974
962
  bindPositionListeners: v,
975
963
  unbindPositionListeners: y,
976
964
  toggle: b,
977
- select: ee,
978
- onDocumentClick: x,
965
+ select: x,
966
+ onDocumentClick: S,
979
967
  get searchTimer() {
980
968
  return C;
981
969
  },
@@ -984,10 +972,10 @@ var dt = /*@__PURE__*/ O({
984
972
  },
985
973
  SurveyorTeleport: t
986
974
  };
987
- return Object.defineProperty(w, "__isScriptSetup", {
975
+ return Object.defineProperty(T, "__isScriptSetup", {
988
976
  enumerable: !1,
989
977
  value: !0
990
- }), w;
978
+ }), T;
991
979
  }
992
980
  }), ft = {
993
981
  ref: "rootRef",
@@ -1000,41 +988,41 @@ var dt = /*@__PURE__*/ O({
1000
988
  class: "px-3 py-3 text-center text-xs text-slate-400"
1001
989
  }, vt = ["onClick"];
1002
990
  function yt(e, t, n, r, i, a) {
1003
- return N(), T("div", null, [E("label", { class: A(["mb-1 block text-xs font-medium", n.variant === "cabinet" ? "text-gray-700" : "text-slate-500"]) }, I(n.label), 3), E("div", ft, [E("button", {
991
+ return F(), D("div", null, [O("label", { class: M(["mb-1 block text-xs font-medium", n.variant === "cabinet" ? "text-gray-700" : "text-slate-500"]) }, R(n.label), 3), O("div", ft, [O("button", {
1004
992
  type: "button",
1005
993
  disabled: n.disabled,
1006
- class: A(["flex w-full items-center justify-between rounded-lg border px-3 py-2 text-left text-sm shadow-sm transition-all disabled:cursor-not-allowed disabled:bg-slate-50 disabled:text-slate-400", n.disabled ? "border-slate-200" : r.open ? r.triggerOpenClass : r.triggerIdleClass]),
994
+ class: M(["flex w-full items-center justify-between rounded-lg border px-3 py-2 text-left text-sm shadow-sm transition-all disabled:cursor-not-allowed disabled:bg-slate-50 disabled:text-slate-400", n.disabled ? "border-slate-200" : r.open ? r.triggerOpenClass : r.triggerIdleClass]),
1007
995
  onClick: r.toggle
1008
- }, [E("span", { class: A(n.displayValue ? "" : "text-slate-400") }, I(n.displayValue || n.placeholder), 3), (N(), T("svg", {
1009
- class: A(["h-4 w-4 shrink-0 text-slate-400 transition-transform", r.open ? "rotate-180" : ""]),
996
+ }, [O("span", { class: M(n.displayValue ? "" : "text-slate-400") }, R(n.displayValue || n.placeholder), 3), (F(), D("svg", {
997
+ class: M(["h-4 w-4 shrink-0 text-slate-400 transition-transform", r.open ? "rotate-180" : ""]),
1010
998
  viewBox: "0 0 24 24",
1011
999
  fill: "none",
1012
1000
  stroke: "currentColor",
1013
1001
  "stroke-width": "2",
1014
1002
  "aria-hidden": "true"
1015
- }, [...t[2] ||= [E("path", { d: "m6 9 6 6 6-6" }, null, -1)]], 2))], 10, pt), D(r.SurveyorTeleport, null, {
1016
- default: z(() => [r.open ? (N(), T("div", {
1003
+ }, [...t[2] ||= [O("path", { d: "m6 9 6 6 6-6" }, null, -1)]], 2))], 10, pt), k(r.SurveyorTeleport, null, {
1004
+ default: V(() => [r.open ? (F(), D("div", {
1017
1005
  key: 0,
1018
1006
  ref: "panelRef",
1019
1007
  class: "fixed z-[100] overflow-hidden rounded-lg border border-slate-200 bg-white shadow-lg",
1020
- style: j(r.dropdownStyle),
1021
- onMousedown: t[1] ||= V(() => {}, ["stop"])
1022
- }, [E("div", mt, [B(E("input", {
1008
+ style: N(r.dropdownStyle),
1009
+ onMousedown: t[1] ||= U(() => {}, ["stop"])
1010
+ }, [O("div", mt, [H(O("input", {
1023
1011
  ref: "inputRef",
1024
1012
  "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
1025
1013
  type: "text",
1026
1014
  placeholder: "Пошук…",
1027
1015
  class: "w-full rounded-md border border-slate-200 px-3 py-1.5 text-xs outline-none focus:border-[#8ec1ff] focus:ring-2 focus:ring-[#d9eaff]"
1028
- }, null, 512), [[ae, r.query]])]), E("div", ht, [n.loading && r.filtered.length === 0 ? (N(), T("p", gt, " Завантаження… ")) : r.filtered.length === 0 ? (N(), T("p", _t, " Нічого не знайдено ")) : w("", !0), (N(!0), T(x, null, F(r.filtered, (e) => (N(), T("button", {
1016
+ }, null, 512), [[ie, r.query]])]), O("div", ht, [n.loading && r.filtered.length === 0 ? (F(), D("p", gt, " Завантаження… ")) : r.filtered.length === 0 ? (F(), D("p", _t, " Нічого не знайдено ")) : E("", !0), (F(!0), D(C, null, L(r.filtered, (e) => (F(), D("button", {
1029
1017
  key: e.id,
1030
1018
  type: "button",
1031
- class: A(["w-full px-3 py-2 text-left text-sm transition-colors hover:bg-slate-50", n.modelValue === e.id ? r.selectedOptionClass : "text-slate-700"]),
1019
+ class: M(["w-full px-3 py-2 text-left text-sm transition-colors hover:bg-slate-50", n.modelValue === e.id ? r.selectedOptionClass : "text-slate-700"]),
1032
1020
  onClick: (t) => r.select(e)
1033
- }, I(e.text), 11, vt))), 128))])], 36)) : w("", !0)]),
1021
+ }, R(e.text), 11, vt))), 128))])], 36)) : E("", !0)]),
1034
1022
  _: 1
1035
1023
  })], 512)]);
1036
1024
  }
1037
- var bt = /*#__PURE__*/ e(dt, [["render", yt], ["__file", "C:/softpro/surveyor/shared/export/CrsSuggestionSelect.vue"]]);
1025
+ var bt = /*#__PURE__*/ e(dt, [["render", yt], ["__file", "D:/softpro/surveyor/shared/export/CrsSuggestionSelect.vue"]]);
1038
1026
  //#endregion
1039
1027
  //#region shared/export/crsUtils.ts
1040
1028
  function xt(e) {
@@ -1087,14 +1075,14 @@ async function wt(e, t, n) {
1087
1075
  } catch {}
1088
1076
  throw Error(t);
1089
1077
  }
1090
- let a = await i.blob(), o = ut(i.headers.get("Content-Disposition") ?? "", `boundary_${t}.geojson`), s = URL.createObjectURL(a), c = document.createElement("a");
1091
- c.href = s, c.download = o, c.click(), URL.revokeObjectURL(s);
1078
+ let a = await i.blob(), o = i.headers.get("Content-Disposition") ?? "", s = x(o, `boundary_${t}.geojson`), c = URL.createObjectURL(a), l = document.createElement("a");
1079
+ l.href = c, l.download = s, l.click(), URL.revokeObjectURL(c);
1092
1080
  }
1093
1081
  //#endregion
1094
1082
  //#region shared/export/ApplicationGeometryExportModal.vue?vue&type=script&setup=true&lang.ts
1095
- var Tt = /*@__PURE__*/ O({
1083
+ var Tt = /*@__PURE__*/ A({
1096
1084
  __name: "ApplicationGeometryExportModal",
1097
- props: /*@__PURE__*/ k({
1085
+ props: /*@__PURE__*/ ee({
1098
1086
  applicationId: {
1099
1087
  type: String,
1100
1088
  required: !0
@@ -1122,7 +1110,7 @@ var Tt = /*@__PURE__*/ O({
1122
1110
  emits: ["update:modelValue"],
1123
1111
  setup(e, { expose: n }) {
1124
1112
  n();
1125
- let r = e, i = L(e, "modelValue"), a = P(""), o = P(""), s = P(!1), c = P(""), l = P(!1), u = P([]), d = Ct((e) => r.buildUrl(e), (e, t) => (r.errorMessage ?? ((e, t) => e || `HTTP ${t}`))(e, t));
1113
+ let r = e, i = z(e, "modelValue"), a = I(""), o = I(""), s = I(!1), c = I(""), l = I(!1), u = I([]), d = Ct((e) => r.buildUrl(e), (e, t) => (r.errorMessage ?? ((e, t) => e || `HTTP ${t}`))(e, t));
1126
1114
  function f() {
1127
1115
  d.invalidateInFlight(), a.value = "", o.value = "", u.value = [], c.value = "", s.value = !1;
1128
1116
  }
@@ -1137,9 +1125,9 @@ var Tt = /*@__PURE__*/ O({
1137
1125
  l.value = !1;
1138
1126
  }
1139
1127
  }
1140
- R(i, (e) => {
1128
+ B(i, (e) => {
1141
1129
  e && (f(), p(""));
1142
- }), R(a, () => {
1130
+ }), B(a, () => {
1143
1131
  c.value = "";
1144
1132
  });
1145
1133
  async function m() {
@@ -1187,26 +1175,26 @@ var Tt = /*@__PURE__*/ O({
1187
1175
  }
1188
1176
  }), Et = ["disabled"], Dt = ["disabled"];
1189
1177
  function Ot(e, t, n, r, i, a) {
1190
- return N(), C(r.SurveyorTeleport, null, {
1191
- default: z(() => [r.open ? (N(), T("div", {
1178
+ return F(), T(r.SurveyorTeleport, null, {
1179
+ default: V(() => [r.open ? (F(), D("div", {
1192
1180
  key: 0,
1193
- class: A(r.shellClass),
1194
- onMousedown: V(r.cancel, ["self"])
1195
- }, [E("div", {
1196
- class: A(r.panelClass),
1181
+ class: M(r.shellClass),
1182
+ onMousedown: U(r.cancel, ["self"])
1183
+ }, [O("div", {
1184
+ class: M(r.panelClass),
1197
1185
  role: "dialog",
1198
1186
  "aria-labelledby": "geometry-export-title"
1199
1187
  }, [
1200
- E("div", { class: A(["flex items-center justify-between border-b px-6 py-4", n.variant === "cabinet" ? "border-gray-100 py-5" : "border-slate-100"]) }, [E("h2", {
1188
+ O("div", { class: M(["flex items-center justify-between border-b px-6 py-4", n.variant === "cabinet" ? "border-gray-100 py-5" : "border-slate-100"]) }, [O("h2", {
1201
1189
  id: "geometry-export-title",
1202
- class: A(["font-semibold text-slate-900", n.variant === "cabinet" ? "text-base" : "text-lg"])
1203
- }, " Експорт меж заявки ", 2), E("button", {
1190
+ class: M(["font-semibold text-slate-900", n.variant === "cabinet" ? "text-base" : "text-lg"])
1191
+ }, " Експорт меж заявки ", 2), O("button", {
1204
1192
  type: "button",
1205
1193
  class: "rounded-lg p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
1206
1194
  "aria-label": "Закрити",
1207
1195
  onClick: r.cancel
1208
1196
  }, " × ")], 2),
1209
- E("div", { class: A(["space-y-4 px-6 py-4", n.variant === "cabinet" ? "py-5" : ""]) }, [D(r.CrsSuggestionSelect, {
1197
+ O("div", { class: M(["space-y-4 px-6 py-4", n.variant === "cabinet" ? "py-5" : ""]) }, [k(r.CrsSuggestionSelect, {
1210
1198
  modelValue: r.srid,
1211
1199
  "onUpdate:modelValue": t[0] ||= (e) => r.srid = e,
1212
1200
  "display-value": r.sridLabel,
@@ -1224,25 +1212,25 @@ function Ot(e, t, n, r, i, a) {
1224
1212
  "loading",
1225
1213
  "disabled",
1226
1214
  "variant"
1227
- ]), r.error ? (N(), T("p", {
1215
+ ]), r.error ? (F(), D("p", {
1228
1216
  key: 0,
1229
- class: A(["text-xs text-red-700", n.variant === "cabinet" ? "rounded-lg border border-red-200 bg-red-50 px-3 py-2" : ""])
1230
- }, I(r.error), 3)) : w("", !0)], 2),
1231
- E("div", { class: A(["flex justify-end gap-2 border-t px-6 py-4", n.variant === "cabinet" ? "border-transparent pt-0" : "border-slate-100"]) }, [E("button", {
1217
+ class: M(["text-xs text-red-700", n.variant === "cabinet" ? "rounded-lg border border-red-200 bg-red-50 px-3 py-2" : ""])
1218
+ }, R(r.error), 3)) : E("", !0)], 2),
1219
+ O("div", { class: M(["flex justify-end gap-2 border-t px-6 py-4", n.variant === "cabinet" ? "border-transparent pt-0" : "border-slate-100"]) }, [O("button", {
1232
1220
  type: "button",
1233
- class: A(["px-4 py-2 text-sm text-slate-600 transition-colors hover:bg-slate-100", n.variant === "cabinet" ? "rounded-xl bg-gray-100 py-2.5 font-medium text-gray-600 hover:bg-gray-200" : "rounded-lg"]),
1221
+ class: M(["px-4 py-2 text-sm text-slate-600 transition-colors hover:bg-slate-100", n.variant === "cabinet" ? "rounded-xl bg-gray-100 py-2.5 font-medium text-gray-600 hover:bg-gray-200" : "rounded-lg"]),
1234
1222
  disabled: r.busy,
1235
1223
  onClick: r.cancel
1236
- }, " Скасувати ", 10, Et), E("button", {
1224
+ }, " Скасувати ", 10, Et), O("button", {
1237
1225
  type: "button",
1238
- class: A(["px-4 py-2 text-sm font-semibold text-white disabled:opacity-50", n.variant === "cabinet" ? "rounded-xl bg-[#2663EB] py-2.5 font-medium hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#1f5ae0] hover:bg-[#1a46b8]"]),
1226
+ class: M(["px-4 py-2 text-sm font-semibold text-white disabled:opacity-50", n.variant === "cabinet" ? "rounded-xl bg-[#2663EB] py-2.5 font-medium hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#1f5ae0] hover:bg-[#1a46b8]"]),
1239
1227
  disabled: r.busy || r.optionsLoading || !r.srid,
1240
1228
  onClick: r.submit
1241
- }, I(r.busy ? "Експорт…" : "Експортувати"), 11, Dt)], 2)
1242
- ], 2)], 34)) : w("", !0)]),
1229
+ }, R(r.busy ? "Експорт…" : "Експортувати"), 11, Dt)], 2)
1230
+ ], 2)], 34)) : E("", !0)]),
1243
1231
  _: 1
1244
1232
  });
1245
1233
  }
1246
- var kt = /*#__PURE__*/ e(Tt, [["render", Ot], ["__file", "C:/softpro/surveyor/shared/export/ApplicationGeometryExportModal.vue"]]);
1234
+ var kt = /*#__PURE__*/ e(Tt, [["render", Ot], ["__file", "D:/softpro/surveyor/shared/export/ApplicationGeometryExportModal.vue"]]);
1247
1235
  //#endregion
1248
- export { ut as a, Q as c, bt as i, $ as l, Ct as n, lt as o, St as r, nt as s, kt as t, ye as u };
1236
+ export { ut as a, $ as c, bt as i, ye as l, Ct as n, rt as o, St as r, Se as s, kt as t };